[mshr] 01/03: Imported Upstream version 2016.1.0

Johannes Ring johannr-guest at moszumanska.debian.org
Mon Jul 4 12:20:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

johannr-guest pushed a commit to branch master
in repository mshr.

commit e3d6e5c1c295428a34637b597f23bc2b654c551c
Author: Johannes Ring <johannr at simula.no>
Date:   Mon Jun 27 18:41:09 2016 +0200

    Imported Upstream version 2016.1.0
---
 3rdparty/CGAL-4.6/CHANGES                          |   4043 -
 3rdparty/CGAL-4.6/CMakeLists.txt                   |   1060 -
 3rdparty/CGAL-4.6/INSTALL.md                       |    215 -
 3rdparty/CGAL-4.6/LICENSE                          |     42 -
 3rdparty/CGAL-4.6/VERSION                          |      1 -
 .../CGAL-4.6/auxiliary/cgal_create_cmake_script.1  |     42 -
 .../modules/2.6.2-to-2.8.1/FindQt4-Copyright.txt   |     50 -
 .../cmake/modules/2.6.2-to-2.8.1/FindQt4.cmake     |   1188 -
 .../Qt4ConfigDependentSettings.cmake               |    373 -
 .../cmake/modules/2.6.2-to-2.8.1/Qt4Macros.cmake   |    399 -
 .../cmake/modules/2.6.2-to-2.8.1/UseQt4.cmake      |     93 -
 .../cmake/modules/CGALConfig_binary.cmake.in       |    141 -
 .../cmake/modules/CGALConfig_install.cmake.in      |    140 -
 3rdparty/CGAL-4.6/cmake/modules/CGAL_Common.cmake  |     60 -
 .../modules/CGAL_GeneratorSpecificSettings.cmake   |     53 -
 3rdparty/CGAL-4.6/cmake/modules/CGAL_Macros.cmake  |    734 -
 .../CGAL-4.6/cmake/modules/CGAL_SetupBoost.cmake   |     38 -
 .../cmake/modules/CGAL_SetupDependencies.cmake     |     85 -
 .../CGAL-4.6/cmake/modules/CGAL_VersionUtils.cmake |    230 -
 3rdparty/CGAL-4.6/cmake/modules/FindCGAL.cmake     |     91 -
 .../CGAL-4.6/cmake/modules/FindQGLViewer.cmake     |     61 -
 .../CGAL-4.6/cmake/modules/FindQt3-patched.cmake   |    318 -
 3rdparty/CGAL-4.6/cmake/modules/FindTBB.cmake      |    422 -
 .../CGAL-4.6/cmake/modules/Qt3Macros-patched.cmake |    169 -
 3rdparty/CGAL-4.6/cmake/modules/UseCGAL.cmake      |     66 -
 .../CGAL-4.6/config/support/print_QT4_version.cpp  |     27 -
 .../CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp      |     30 -
 3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.cpp     |     65 -
 3rdparty/CGAL-4.6/demo/AABB_tree/CMakeLists.txt    |     98 -
 3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.cpp    |    425 -
 3rdparty/CGAL-4.6/demo/AABB_tree/Scene.cpp         |    899 -
 3rdparty/CGAL-4.6/demo/AABB_tree/Scene.h           |    195 -
 3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.cpp        |     63 -
 3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.h          |     31 -
 .../demo/Alpha_shapes_2/Alpha_shapes_2.cpp         |    309 -
 .../CGAL-4.6/demo/Alpha_shapes_2/CMakeLists.txt    |     57 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape  |     28 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape2 |     44 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_1 |    339 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_2 |    230 -
 .../CGAL-4.6/demo/Alpha_shapes_2/data/degenere.pts |      4 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dipper  |      8 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dixie   |   3374 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fout    |    174 -
 .../CGAL-4.6/demo/Alpha_shapes_2/data/kleeblatt    |     76 -
 .../CGAL-4.6/demo/Alpha_shapes_2/data/m30f.jpg     |    Bin 87958 -> 0 bytes
 .../CGAL-4.6/demo/Alpha_shapes_2/data/noisy_circle |     74 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/torus   |    128 -
 .../CGAL-4.6/demo/Alpha_shapes_2/data/usa-outline  |    207 -
 .../CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.cpp |     26 -
 .../CGAL-4.6/demo/Alpha_shapes_3/CMakeLists.txt    |     52 -
 .../CGAL-4.6/demo/Alpha_shapes_3/MainWindow.cpp    |    111 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.h |     40 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.cpp   |    138 -
 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.h     |     39 -
 .../demo/Apollonius_graph_2/Apollonius_graph_2.cpp |    293 -
 .../demo/Apollonius_graph_2/CMakeLists.txt         |     55 -
 .../CGAL-4.6/demo/Apollonius_graph_2/data/algo.dat |      9 -
 .../demo/Apollonius_graph_2/data/hierarchy.dat     |    500 -
 .../ArrangementDemoPropertiesDialog.cpp            |    230 -
 .../ArrangementDemoWindow.cpp                      |   1216 -
 .../ArrangementDemoWindow.h                        |    147 -
 .../ArrangementGraphicsItem.h                      |   1309 -
 .../ArrangementPainterOstream.h                    |   1009 -
 .../Arrangement_on_surface_2/ArrangementTypes.h    |    330 -
 .../demo/Arrangement_on_surface_2/CMakeLists.txt   |     84 -
 .../Arrangement_on_surface_2/ColorItemEditor.cpp   |     71 -
 .../DeleteCurveModeItemEditor.cpp                  |     50 -
 .../Arrangement_on_surface_2/OverlayDialog.cpp     |    294 -
 .../PropertyValueDelegate.cpp                      |    138 -
 .../PropertyValueDelegate.h                        |     55 -
 .../CGAL-4.6/demo/Arrangement_on_surface_2/Utils.h |   1630 -
 .../old_demo/CMakeLists.txt                        |     50 -
 .../old_demo/Conic_reader.h                        |    218 -
 .../old_demo/MyWindow_files.cpp                    |    691 -
 .../old_demo/MyWindow_operations.cpp               |    785 -
 .../old_demo/MyWindow_overlay.cpp                  |    296 -
 .../old_demo/arrangement_2.cpp                     |    474 -
 .../old_demo/arrangement_2.h                       |    291 -
 .../Arrangement_on_surface_2/old_demo/cgal_types.h |    292 -
 .../Arrangement_on_surface_2/old_demo/demo_tab.cpp |     24 -
 .../Arrangement_on_surface_2/old_demo/demo_tab.h   |   3056 -
 .../Arrangement_on_surface_2/old_demo/forms.cpp    |    519 -
 .../demo/Arrangement_on_surface_2/old_demo/forms.h |    290 -
 .../old_demo/overlay_functor.h                     |     82 -
 .../Arrangement_on_surface_2/old_demo/qt_layer.cpp |     82 -
 .../Arrangement_on_surface_2/old_demo/qt_layer.h   |     44 -
 .../demo/Boolean_set_operations_2/CMakeLists.txt   |     43 -
 .../Qt_widget_X_monotone_circle_segment_2.h        |     95 -
 .../Qt_widget_circ_polygon.h                       |     92 -
 .../Qt_widget_circle_segment_2.h                   |     94 -
 .../Qt_widget_get_circ_polygon.h                   |    636 -
 .../Qt_widget_locate_layer.cpp                     |     87 -
 .../Qt_widget_locate_layer.h                       |     69 -
 .../boolean_operations_2.cpp                       |   1178 -
 .../boolean_operations_2.h                         |    180 -
 .../boolean_operations_2_toolbar.cpp               |    117 -
 .../boolean_operations_2_toolbar.h                 |     86 -
 .../demo/Boolean_set_operations_2/data/vlsi_1.dxf  | 135404 ------------------
 .../demo/Boolean_set_operations_2/help/index.html  |    248 -
 .../demo/Boolean_set_operations_2/icons/comp_P.bmp |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/comp_P.xpm |     54 -
 .../demo/Boolean_set_operations_2/icons/comp_Q.bmp |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/comp_Q.xpm |     55 -
 .../demo/Boolean_set_operations_2/icons/del_P.bmp  |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/del_P.xpm  |     47 -
 .../demo/Boolean_set_operations_2/icons/del_Q.bmp  |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/del_Q.xpm  |     56 -
 .../Boolean_set_operations_2/icons/diff_PQ.bmp     |    Bin 3126 -> 0 bytes
 .../Boolean_set_operations_2/icons/diff_PQ.xpm     |     66 -
 .../Boolean_set_operations_2/icons/diff_QP.bmp     |    Bin 3126 -> 0 bytes
 .../Boolean_set_operations_2/icons/diff_QP.xpm     |     66 -
 .../icons/insert_circle.bmp                        |    Bin 3126 -> 0 bytes
 .../icons/insert_circle.xpm                        |     46 -
 .../icons/insert_polygon.bmp                       |    Bin 3126 -> 0 bytes
 .../icons/insert_polygon.xpm                       |     45 -
 .../icons/intersection.bmp                         |    Bin 3126 -> 0 bytes
 .../icons/intersection.xpm                         |     66 -
 .../demo/Boolean_set_operations_2/icons/locate.bmp |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/locate.xpm |     54 -
 .../demo/Boolean_set_operations_2/icons/make_P.bmp |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/make_P.xpm |     54 -
 .../demo/Boolean_set_operations_2/icons/make_Q.bmp |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/make_Q.xpm |     57 -
 .../Boolean_set_operations_2/icons/mink_sum.bmp    |    Bin 3126 -> 0 bytes
 .../Boolean_set_operations_2/icons/mink_sum.xpm    |     66 -
 .../Boolean_set_operations_2/icons/refresh.bmp     |    Bin 3126 -> 0 bytes
 .../Boolean_set_operations_2/icons/refresh.xpm     |     73 -
 .../Boolean_set_operations_2/icons/symm_diff.bmp   |    Bin 3126 -> 0 bytes
 .../Boolean_set_operations_2/icons/symm_diff.xpm   |     66 -
 .../demo/Boolean_set_operations_2/icons/union.bmp  |    Bin 3126 -> 0 bytes
 .../demo/Boolean_set_operations_2/icons/union.xpm  |     66 -
 .../demo/Boolean_set_operations_2/typedefs.h       |     73 -
 .../demo/Bounding_volumes/Bounding_volumes.cpp     |    549 -
 .../CGAL-4.6/demo/Bounding_volumes/CMakeLists.txt  |     59 -
 3rdparty/CGAL-4.6/demo/CGAL_ipelets/CMakeLists.txt |    142 -
 3rdparty/CGAL-4.6/demo/CGAL_ipelets/distance.cpp   |    104 -
 3rdparty/CGAL-4.6/demo/CGAL_ipelets/hyperbolic.cpp |    241 -
 3rdparty/CGAL-4.6/demo/CMakeLists.txt              |     42 -
 .../CGAL-4.6/demo/Circular_kernel_2/CMakeLists.txt |     57 -
 .../demo/Circular_kernel_2/Circular_kernel_2.cpp   |    297 -
 .../CGAL-4.6/demo/Circular_kernel_3/CMakeLists.txt |     41 -
 .../demo/Circular_kernel_3/Circular_kernel_3.cpp   |     24 -
 .../CGAL-4.6/demo/Circular_kernel_3/Viewer.cpp     |    155 -
 3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.h  |     18 -
 .../CGAL-4.6/demo/Convex_hull_3/CMakeLists.txt     |     29 -
 3rdparty/CGAL-4.6/demo/Envelope_3/CMakeLists.txt   |     55 -
 .../demo/Envelope_3/data/planes/plane1.txt         |    501 -
 .../demo/Envelope_3/data/planes/plane2.txt         |      5 -
 .../demo/Envelope_3/data/planes/plane3.txt         |    209 -
 .../demo/Envelope_3/data/planes/plane4.txt         |      4 -
 .../demo/Envelope_3/data/planes/plane5.txt         |    861 -
 .../demo/Envelope_3/data/planes/plane6.txt         |    361 -
 .../demo/Envelope_3/data/planes/plane7.txt         |     22 -
 .../demo/Envelope_3/data/planes/plane8.txt         |    227 -
 .../demo/Envelope_3/data/spheres/sphere1.txt       |      5 -
 .../demo/Envelope_3/data/spheres/sphere2.txt       |      3 -
 .../demo/Envelope_3/data/spheres/sphere3.txt       |      6 -
 .../demo/Envelope_3/data/triangles/triangle1.txt   |     51 -
 .../demo/Envelope_3/data/triangles/triangle2.txt   |      9 -
 .../demo/Envelope_3/data/triangles/triangle3.txt   |      9 -
 .../demo/Envelope_3/data/triangles/triangle4.txt   |     12 -
 .../demo/Envelope_3/data/triangles/triangle5.txt   |    865 -
 .../demo/Envelope_3/data/triangles/triangle6.txt   |  12482 --
 3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.cpp   |    316 -
 3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.h     |    214 -
 3rdparty/CGAL-4.6/demo/Envelope_3/help/index.html  |    107 -
 3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.bmp  |    Bin 3126 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.xpm  |     42 -
 3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.bmp  |    Bin 3126 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.xpm  |     43 -
 .../CGAL-4.6/demo/Envelope_3/icons/vertices.bmp    |    Bin 3126 -> 0 bytes
 .../CGAL-4.6/demo/Envelope_3/icons/vertices.xpm    |     42 -
 3rdparty/CGAL-4.6/demo/Envelope_3/typedefs.h       |    431 -
 3rdparty/CGAL-4.6/demo/Generator/CMakeLists.txt    |     55 -
 3rdparty/CGAL-4.6/demo/Generator/Generator_2.cpp   |    347 -
 3rdparty/CGAL-4.6/demo/Geomview/CMakeLists.txt     |     31 -
 3rdparty/CGAL-4.6/demo/GraphicsView/CMakeLists.txt |     42 -
 3rdparty/CGAL-4.6/demo/GraphicsView/min.cpp        |     28 -
 .../CGAL-4.6/demo/Interpolation/CMakeLists.txt     |     32 -
 .../demo/Kinetic_data_structures/CMakeLists.txt    |     61 -
 .../KDS_Delaunay_triangulation_2.cpp               |    135 -
 .../KDS_Delaunay_triangulation_stable_subset_2.cpp |    105 -
 .../Kinetic_data_structures/KDS_generate_data.cpp  |     85 -
 .../demo/Kinetic_data_structures/KDS_gui_2.cpp     |     41 -
 .../demo/Kinetic_data_structures/data/after002     |     20 -
 .../demo/Kinetic_data_structures/data/after010     |     95 -
 .../demo/Kinetic_data_structures/data/after088     |   1156 -
 .../demo/Kinetic_data_structures/data/after103     |   1313 -
 .../demo/Kinetic_data_structures/data/after106     |   1323 -
 .../demo/Kinetic_data_structures/data/before002    |     20 -
 .../demo/Kinetic_data_structures/data/before010    |     95 -
 .../demo/Kinetic_data_structures/data/before088    |   1156 -
 .../demo/Kinetic_data_structures/data/before103    |   1313 -
 .../demo/Kinetic_data_structures/data/before106    |   1323 -
 .../demo/Kinetic_data_structures/data/before107    |   1041 -
 .../include/Qt_Delaunay_stable_subset_2.h          |    146 -
 .../include/SoQt_examiner_viewer.h                 |     88 -
 .../Kinetic_data_structures/include/SoQt_handle.h  |     59 -
 .../include/SoQt_moving_points_3.h                 |    465 -
 .../include/SoQt_moving_weighted_points_3.h        |    454 -
 .../include/SoQt_triangulation_3.h                 |    427 -
 .../include/SoQt_widget_3.h                        |    181 -
 .../Kinetic_data_structures/include/control_coin.h |      1 -
 .../demo/L1_Voronoi_diagram_2/CMakeLists.txt       |     58 -
 .../L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp  |    395 -
 .../include/CGAL/L1_voronoi_traits_2.h             |    343 -
 .../include/CGAL/Qt/ArrangementPointInput.h        |     78 -
 .../demo/Largest_empty_rect_2/CMakeLists.txt       |     55 -
 .../Largest_empty_rectangle_2.cpp                  |    287 -
 .../demo/Linear_cell_complex/CMakeLists.txt        |     78 -
 .../Linear_cell_complex_3_demo.cpp                 |     48 -
 .../Linear_cell_complex_3_subdivision.cpp          |    202 -
 .../Linear_cell_complex_pqq_subdivision.cpp        |    327 -
 .../demo/Linear_cell_complex/MainWindow.cpp        |   2991 -
 .../CGAL-4.6/demo/Linear_cell_complex/MainWindow.h |    269 -
 .../demo/Linear_cell_complex/MainWindow.ui         |    234 -
 .../CGAL-4.6/demo/Linear_cell_complex/Viewer.cpp   |    370 -
 .../CGAL-4.6/demo/Linear_cell_complex/Viewer.h     |     86 -
 .../CGAL-4.6/demo/Linear_cell_complex/typedefs.h   |    131 -
 3rdparty/CGAL-4.6/demo/Mesh_2/CMakeLists.txt       |     38 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/CMakeLists.txt   |     43 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Debug_layer.h    |     47 -
 .../demo/Mesh_2/Qt3/Qt_layer_show_circles.h        |    159 -
 .../demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h  |     76 -
 .../Qt3/Qt_layer_show_triangulation_constraints.h  |     83 -
 .../demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h   |    144 -
 .../demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp     |    127 -
 .../demo/Mesh_2/Qt3/Qt_widget_style_editor.h       |     55 -
 .../demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp     |    125 -
 .../demo/Mesh_2/Qt3/Qt_widget_styled_layer.h       |     95 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_clusters.h  |    213 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.cpp  |     69 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.h    |    129 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments.h  |     97 -
 .../demo/Mesh_2/Qt3/Show_segments_base.cpp         |     61 -
 .../CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.h  |     53 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/contraints.xpm   |     37 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.cpp        |     32 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.h          |     28 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/marked.xpm       |     39 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/mesh_2_demo.cpp  |   1531 -
 3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/seeds.xpm        |     39 -
 3rdparty/CGAL-4.6/demo/Mesh_2/README.txt           |      5 -
 3rdparty/CGAL-4.6/demo/Mesh_3/C3t3_type.h          |     60 -
 3rdparty/CGAL-4.6/demo/Mesh_3/CMakeLists.txt       |    411 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Io_c3t3_plugin.cpp   |     69 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Io_image_plugin.cpp  |     94 -
 .../demo/Mesh_3/Io_implicit_function_plugin.cpp    |    203 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Io_off_plugin.cpp    |     94 -
 3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.cpp       |    601 -
 3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.h         |    108 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.cpp           |     43 -
 .../demo/Mesh_3/Mesh_3_optimization_plugin.cpp     |    623 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin.cpp    |    431 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_function.h      |    279 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.cpp   |     91 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.h     |     96 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.cpp |     84 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.h   |    101 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.cpp  |    619 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.h    |    140 -
 .../CGAL-4.6/demo/Mesh_3/Scene_c3t3_item_config.h  |     10 -
 .../demo/Mesh_3/Scene_implicit_function_item.cpp   |    257 -
 .../demo/Mesh_3/Scene_implicit_function_item.h     |     72 -
 .../CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.cpp    |    406 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.h |     44 -
 .../CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.cpp |    106 -
 .../CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.h   |     48 -
 .../demo/Mesh_3/Scene_segmented_image_item.cpp     |    692 -
 .../demo/Mesh_3/Scene_segmented_image_item.h       |     59 -
 3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.h             |    346 -
 3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane.h       |    401 -
 .../CGAL-4.6/demo/Mesh_3/Volume_plane_interface.h  |     51 -
 .../demo/Mesh_3/Volume_plane_intersection.cpp      |     62 -
 .../demo/Mesh_3/Volume_plane_intersection.h        |     52 -
 .../CGAL-4.6/demo/Mesh_3/Volume_plane_thread.h     |    128 -
 .../CGAL-4.6/demo/Mesh_3/Volume_planes_plugin.cpp  |    381 -
 .../demo/Mesh_3/cmake/modules/FindGLEW.cmake       |    108 -
 .../demo/Mesh_3/implicit_functions/CMakeLists.txt  |     81 -
 .../implicit_functions/Klein_implicit_function.cpp |     55 -
 .../Sphere_implicit_function.cpp                   |     57 -
 .../Tanglecube_implicit_function.cpp               |     59 -
 .../demo/Mesh_3/include/CGAL/compute_normal.h      |     44 -
 .../CGAL-4.6/demo/Mesh_3/include/CGAL/gl_render.h  |     80 -
 .../Mesh_3/include/CGAL_demo/Io_plugin_interface.h |     26 -
 .../CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene.h |    140 -
 .../include/CGAL_demo/Scene_draw_interface.h       |     12 -
 .../demo/Mesh_3/include/CGAL_demo/Scene_item.h     |     95 -
 .../CGAL_demo/Scene_item_with_display_list.h       |     36 -
 .../demo/Mesh_3/include/CGAL_demo/Viewer.h         |     49 -
 .../demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp    |    109 -
 .../CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene.cpp   |    592 -
 .../demo/Mesh_3/src/CGAL_demo/Scene_item.cpp       |     31 -
 .../src/CGAL_demo/Scene_item_with_display_list.cpp |     72 -
 .../CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Viewer.cpp  |    167 -
 3rdparty/CGAL-4.6/demo/Nef_2/CMakeLists.txt        |     42 -
 3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.cpp |     89 -
 3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.h   |     59 -
 3rdparty/CGAL-4.6/demo/Nef_2/cgal_types.h          |     55 -
 .../Nef_2/filtered_homogeneous_data/complex.nef    |    422 -
 .../Nef_2/filtered_homogeneous_data/symmdif.nef    |    116 -
 3rdparty/CGAL-4.6/demo/Nef_2/help/index.html       |    392 -
 .../demo/Nef_2/homogeneous_data/box_and_line.nef   |    130 -
 .../CGAL-4.6/demo/Nef_2/homogeneous_data/cake.nef  |     38 -
 .../demo/Nef_2/homogeneous_data/dangling.nef       |     55 -
 .../CGAL-4.6/demo/Nef_2/homogeneous_data/disk.nef  |     59 -
 .../demo/Nef_2/homogeneous_data/line_cross.nef     |    106 -
 .../CGAL-4.6/demo/Nef_2/homogeneous_data/mpii.nef  |    202 -
 .../CGAL-4.6/demo/Nef_2/homogeneous_data/star.nef  |    160 -
 .../demo/Nef_2/homogeneous_data/symmdiff.nef       |     52 -
 .../demo/Nef_2/homogeneous_data/triangle.nef       |     40 -
 3rdparty/CGAL-4.6/demo/Nef_2/nef_2.cpp             |    792 -
 3rdparty/CGAL-4.6/demo/Nef_2/nef_2.h               |    451 -
 3rdparty/CGAL-4.6/demo/Nef_2/nef_2_layers.h        |     53 -
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.gif        |    Bin 257 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.pcx        |    Bin 1419 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic2.pcx       |    Bin 854 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.pcx     |    Bin 1344 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.xpm     |    Bin 7313 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.pcx      |    Bin 1344 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.xpm      |    Bin 7312 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.pcx   |    Bin 1274 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.xpm   |    Bin 7345 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.pcx         |    Bin 1836 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.xpm         |    Bin 7414 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.pcx         |    Bin 1830 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.xpm         |    Bin 7414 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.pcx     |    Bin 1274 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.xpm     |    Bin 7343 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.pcx |    Bin 1839 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.xpm |     55 -
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/nef.xpm          |    425 -
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/newclosed.pcx    |    Bin 941 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/newopen.pcx      |    Bin 941 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/newpoly.pcx      |    Bin 941 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.pcx        |    Bin 1830 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.xpm        |    Bin 7415 -> 0 bytes
 3rdparty/CGAL-4.6/demo/Nef_3/CMakeLists.txt        |     72 -
 3rdparty/CGAL-4.6/demo/Nef_3/README                |     62 -
 3rdparty/CGAL-4.6/demo/Nef_3/cube.off              |     18 -
 .../demo/Nef_3/include/CGAL/Nef_3/demo_stack.h     |    601 -
 .../Nef_3/include/CGAL/Nef_3/visual_hull_creator.h |    295 -
 3rdparty/CGAL-4.6/demo/Nef_3/mpi.vsh               |     48 -
 3rdparty/CGAL-4.6/demo/Nef_3/nef_3_extended.cpp    |     53 -
 3rdparty/CGAL-4.6/demo/Nef_3/nef_3_filtered.cpp    |     43 -
 3rdparty/CGAL-4.6/demo/Nef_3/nef_3_homogeneous.cpp |     54 -
 3rdparty/CGAL-4.6/demo/Nef_3/visual_hull.cpp       |    161 -
 3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cin  |    207 -
 3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cpp  |     51 -
 3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cin |    207 -
 3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cpp |     42 -
 3rdparty/CGAL-4.6/demo/Nef_S2/CMakeLists.txt       |     37 -
 .../include/CGAL/Nef_S2/create_random_Nef_S2.h     |     64 -
 3rdparty/CGAL-4.6/demo/Nef_S2/nef_S2.cpp           |     45 -
 .../demo/Periodic_2_triangulation_2/CMakeLists.txt |     65 -
 .../Periodic_2_Delaunay_triangulation_2.cpp        |    457 -
 .../TriangulationConflictZone.h                    |    162 -
 .../TriangulationMovingPoint.h                     |    149 -
 .../TriangulationPointInputAndConflictZone.h       |    122 -
 .../TriangulationRemoveVertex.h                    |     79 -
 .../CGAL/Qt/PeriodicTriangulationGraphicsItem.h    |    402 -
 .../demo/Periodic_3_triangulation_3/CMakeLists.txt |    102 -
 .../demo/Periodic_3_triangulation_3/MainWindow.h   |    160 -
 .../demo/Periodic_3_triangulation_3/MainWindow.ui  |    610 -
 .../demo/Periodic_3_triangulation_3/Scene.cpp      |   1400 -
 .../demo/Periodic_3_triangulation_3/Scene.h        |    262 -
 .../demo/Periodic_3_triangulation_3/Scene_utils.h  |    151 -
 .../periodic_3_triangulation_3_demo.cpp            |     17 -
 .../CGAL-4.6/demo/Periodic_Lloyd_3/CMakeLists.txt  |     93 -
 .../CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.cpp  |    226 -
 .../CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.h    |     52 -
 .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp     |     22 -
 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.cpp |    200 -
 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.h   |     49 -
 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/typedefs.h |     69 -
 3rdparty/CGAL-4.6/demo/Polygon/CMakeLists.txt      |     63 -
 3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.cpp       |    582 -
 .../demo/Polyhedron/CGAL_demo/Scene_interface.h    |    112 -
 .../CGAL_demo/Scene_item_with_display_list.h       |     49 -
 .../demo/Polyhedron/CGAL_demo/Viewer_interface.h   |     50 -
 3rdparty/CGAL-4.6/demo/Polyhedron/CMakeLists.txt   |    507 -
 .../demo/Polyhedron/Camera_positions_list.cpp      |    138 -
 .../demo/Polyhedron/Camera_positions_list.h        |     41 -
 .../demo/Polyhedron/Camera_positions_list.ui       |    114 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Color_map.h      |     26 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.cpp   |    126 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Deform_mesh.ui   |    353 -
 .../CGAL-4.6/demo/Polyhedron/FileLoaderDialog.ui   |    121 -
 .../demo/Polyhedron/GlSplat/CMakeLists.txt         |     35 -
 .../CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.cpp   |    514 -
 .../CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.h     |    144 -
 .../CGAL-4.6/demo/Polyhedron/GlSplat/Shader.cpp    |    136 -
 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.h |    148 -
 .../demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake   |    105 -
 .../Polyhedron/GlSplat/shaders/Finalization.glsl   |    106 -
 .../Polyhedron/Io_implicit_function_plugin.cpp     |    215 -
 3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.cpp   |   1433 -
 3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.h     |    190 -
 3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.ui    |    661 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.cpp  |      3 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.h    |     27 -
 .../CGAL-4.6/demo/Polyhedron/Meshing_dialog.ui     |    362 -
 .../Polyhedron/Point_inside_polyhedron_widget.ui   |     67 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.cpp |     86 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.qrc |     19 -
 .../Polyhedron_demo_camera_positions_plugin.cpp    |     49 -
 .../Polyhedron_demo_convex_hull_plugin.cpp         |    123 -
 .../Polyhedron_demo_corefinement_plugin.cpp        |    179 -
 .../demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp |    375 -
 .../Polyhedron_demo_edit_polyhedron_plugin.cpp     |    397 -
 .../Polyhedron/Polyhedron_demo_gocad_plugin.cpp    |    110 -
 .../Polyhedron_demo_inside_out_plugin.cpp          |     71 -
 .../Polyhedron_demo_intersection_plugin.cpp        |    218 -
 .../Polyhedron/Polyhedron_demo_io_nef_plugin.cpp   |     78 -
 .../Polyhedron_demo_io_plugin_interface.h          |     27 -
 .../Polyhedron_demo_jet_fitting_plugin.cpp         |    131 -
 ...hedron_demo_join_and_split_polyhedra_plugin.cpp |    134 -
 .../Polyhedron/Polyhedron_demo_kernel_plugin.cpp   |    138 -
 .../Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp   |    189 -
 .../Polyhedron_demo_mesh_3_plugin_cgal_code.cpp    |    407 -
 .../Polyhedron_demo_mesh_segmentation_plugin.cpp   |    353 -
 .../Polyhedron_demo_mesh_simplification_plugin.cpp |     84 -
 .../demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp |    293 -
 .../Polyhedron_demo_normal_estimation_plugin.cpp   |    219 -
 .../Polyhedron_demo_normal_estimation_plugin.ui    |    132 -
 .../demo/Polyhedron/Polyhedron_demo_off_plugin.cpp |     88 -
 .../Polyhedron_demo_off_to_nef_plugin.cpp          |     58 -
 .../Polyhedron_demo_off_to_xyz_plugin.cpp          |     70 -
 .../Polyhedron_demo_orient_soup_plugin.cpp         |    170 -
 .../Polyhedron_demo_parameterization_plugin.cpp    |    150 -
 .../demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp |    212 -
 .../Polyhedron/Polyhedron_demo_plugin_helper.cpp   |    128 -
 .../Polyhedron/Polyhedron_demo_plugin_helper.h     |     62 -
 .../Polyhedron/Polyhedron_demo_plugin_interface.h  |     36 -
 ...yhedron_demo_point_inside_polyhedron_plugin.cpp |    232 -
 ...edron_demo_point_set_average_spacing_plugin.cpp |    109 -
 ...dron_demo_point_set_outliers_removal_plugin.cpp |    117 -
 ...edron_demo_point_set_outliers_removal_plugin.ui |    109 -
 ...hedron_demo_point_set_simplification_plugin.cpp |    143 -
 ...yhedron_demo_point_set_simplification_plugin.ui |    142 -
 .../Polyhedron_demo_point_set_smoothing_plugin.cpp |     84 -
 .../Polyhedron/Polyhedron_demo_poisson_plugin.cpp  |    129 -
 .../Polyhedron/Polyhedron_demo_poisson_plugin.ui   |    163 -
 .../Polyhedron_demo_poisson_plugin_impl.cpp        |    213 -
 .../Polyhedron_demo_polyhedron_slicer_plugin.cpp   |    363 -
 ...Polyhedron_demo_polyhedron_stitching_plugin.cpp |    157 -
 .../Polyhedron_demo_polylines_io_plugin.cpp        |    124 -
 .../Polyhedron_demo_remeshing_plugin.cpp           |    141 -
 .../Polyhedron_demo_remeshing_plugin_cgal_code.cpp |    371 -
 ...dron_demo_scale_space_reconstruction_plugin.cpp |    163 -
 ...edron_demo_scale_space_reconstruction_plugin.ui |    128 -
 .../Polyhedron_demo_selection_io_plugin.cpp        |     42 -
 .../Polyhedron_demo_selection_plugin.cpp           |    283 -
 .../Polyhedron_demo_self_intersection_plugin.cpp   |     93 -
 .../demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp |     92 -
 .../Polyhedron_demo_subdivision_methods_plugin.cpp |     96 -
 ...Polyhedron_demo_transform_polyhedron_plugin.cpp |    144 -
 .../Polyhedron_demo_triangulate_facets_plugin.cpp  |    142 -
 .../Polyhedron/Polyhedron_demo_trivial_plugin.cpp  |    151 -
 .../demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp |     80 -
 .../demo/Polyhedron/Polyhedron_slicer_widget.ui    |    121 -
 .../CGAL-4.6/demo/Polyhedron/Polyhedron_type.h     |    186 -
 .../CGAL-4.6/demo/Polyhedron/Polyhedron_type_fwd.h |     62 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Scene.cpp        |    873 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Scene.h          |    182 -
 .../CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.cpp   |      3 -
 .../CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.h     |    119 -
 .../Polyhedron/Scene_combinatorial_map_item.cpp    |    400 -
 .../demo/Polyhedron/Scene_combinatorial_map_item.h |     82 -
 .../demo/Polyhedron/Scene_display_list_item.h      |     13 -
 .../demo/Polyhedron/Scene_draw_interface.h         |     18 -
 .../demo/Polyhedron/Scene_edit_polyhedron_item.cpp |    395 -
 .../demo/Polyhedron/Scene_edit_polyhedron_item.h   |    671 -
 .../CGAL-4.6/demo/Polyhedron/Scene_find_items.h    |    121 -
 .../Polyhedron/Scene_implicit_function_item.cpp    |    309 -
 .../demo/Polyhedron/Scene_implicit_function_item.h |     82 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.cpp   |    111 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.h     |    159 -
 .../CGAL-4.6/demo/Polyhedron/Scene_item_config.h   |     16 -
 .../Polyhedron/Scene_item_with_display_list.cpp    |     86 -
 .../demo/Polyhedron/Scene_nef_polyhedron_item.cpp  |    323 -
 .../demo/Polyhedron/Scene_nef_polyhedron_item.h    |     70 -
 .../demo/Polyhedron/Scene_nef_rendering.cpp        |    216 -
 .../CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.h |      5 -
 .../CGAL-4.6/demo/Polyhedron/Scene_plane_item.cpp  |      3 -
 .../CGAL-4.6/demo/Polyhedron/Scene_plane_item.h    |    170 -
 .../Polyhedron/Scene_points_with_normal_item.cpp   |    352 -
 .../Polyhedron/Scene_points_with_normal_item.h     |     94 -
 .../demo/Polyhedron/Scene_polygon_soup_item.cpp    |    327 -
 .../demo/Polyhedron/Scene_polygon_soup_item.h      |    166 -
 .../demo/Polyhedron/Scene_polyhedron_item.cpp      |    453 -
 .../demo/Polyhedron/Scene_polyhedron_item.h        |    100 -
 .../Polyhedron/Scene_polyhedron_item_decorator.cpp |    102 -
 .../Polyhedron/Scene_polyhedron_item_decorator.h   |     65 -
 .../Scene_polyhedron_item_k_ring_selection.cpp     |      2 -
 .../Scene_polyhedron_item_k_ring_selection.h       |    199 -
 .../Polyhedron/Scene_polyhedron_selection_item.cpp |      2 -
 .../Polyhedron/Scene_polyhedron_selection_item.h   |    740 -
 .../Polyhedron/Scene_polyhedron_transform_item.cpp |     67 -
 .../Polyhedron/Scene_polyhedron_transform_item.h   |     49 -
 .../demo/Polyhedron/Scene_polylines_item.cpp       |    475 -
 .../demo/Polyhedron/Scene_polylines_item.h         |     93 -
 .../Polyhedron/Scene_textured_polyhedron_item.cpp  |    126 -
 .../Polyhedron/Scene_textured_polyhedron_item.h    |     50 -
 .../CGAL-4.6/demo/Polyhedron/Selection_widget.ui   |    268 -
 .../CGAL-4.6/demo/Polyhedron/Show_point_dialog.cpp |     91 -
 .../CGAL-4.6/demo/Polyhedron/Show_point_dialog.h   |     35 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.cpp       |    290 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.h         |     55 -
 3rdparty/CGAL-4.6/demo/Polyhedron/Viewer_config.h  |     16 -
 .../Polyhedron/implicit_functions/CMakeLists.txt   |     81 -
 .../Implicit_function_interface.h                  |     58 -
 .../implicit_functions/Klein_implicit_function.cpp |     55 -
 .../Sphere_implicit_function.cpp                   |     57 -
 .../Tanglecube_implicit_function.cpp               |     59 -
 .../demo/Polyhedron/include/CGAL/check_gl_error.h  |     46 -
 .../demo/Polyhedron/include/CGAL/gl_render.h       |    103 -
 .../Polyhedron/include/CGAL/textured_polyhedron.h  |    252 -
 .../CGAL-4.6/demo/Polyhedron/include/Point_set_3.h |    376 -
 .../CGAL-4.6/demo/Polyhedron/include/UI_point_3.h  |    140 -
 3rdparty/CGAL-4.6/demo/Polyhedron/opengl_tools.h   |     68 -
 .../demo/Polyhedron/polyhedron_demo_macros.cmake   |     41 -
 3rdparty/CGAL-4.6/demo/Polyhedron/texture.cpp      |   1100 -
 .../CGAL-4.6/demo/Polyhedron_IO/CMakeLists.txt     |     30 -
 .../demo/Polyline_simplification_2/CMakeLists.txt  |     55 -
 .../Polyline_simplification_2.cpp                  |    554 -
 .../about_Polyline_simplification_2.html           |     10 -
 .../Principal_component_analysis/CMakeLists.txt    |     94 -
 .../Principal_component_analysis/MainWindow.cpp    |    208 -
 .../demo/Principal_component_analysis/PCA_demo.cpp |     63 -
 .../demo/Principal_component_analysis/Viewer.cpp   |     30 -
 .../demo/Principal_component_analysis/cleanup.bat  |      1 -
 .../Principal_component_analysis/render_edges.h    |     30 -
 .../demo/Segment_Delaunay_graph_2/CMakeLists.txt   |     59 -
 .../Segment_Delaunay_graph_2/Segment_voronoi_2.cpp |    385 -
 .../Segment_Delaunay_graph_2/Segment_voronoi_2.ui  |    249 -
 .../about_Segment_voronoi_2.html                   |     10 -
 .../CGAL-4.6/demo/Snap_rounding_2/CMakeLists.txt   |     56 -
 .../demo/Snap_rounding_2/Snap_rounding_2.cpp       |    318 -
 .../demo/Spatial_searching_2/CMakeLists.txt        |     56 -
 .../Spatial_searching_2/Spatial_searching_2.cpp    |    300 -
 .../demo/Straight_skeleton_2/CMakeLists.txt        |     50 -
 .../CGAL-4.6/demo/Straight_skeleton_2/cgal_types.h |     57 -
 .../demo/Straight_skeleton_2/data/complex_0.poly   |      2 -
 .../demo/Straight_skeleton_2/data/complex_1.poly   |      2 -
 .../demo/Straight_skeleton_2/data/complex_2.poly   |      2 -
 .../demo/Straight_skeleton_2/data/complex_3.poly   |      2 -
 .../demo/Straight_skeleton_2/data/complex_4.poly   |      2 -
 .../demo/Straight_skeleton_2/data/complex_5.poly   |      2 -
 .../demo/Straight_skeleton_2/data/large_1.poly     |   1788 -
 .../demo/Straight_skeleton_2/data/large_2.poly     |   1037 -
 .../demo/Straight_skeleton_2/data/large_3.poly     |    995 -
 .../demo/Straight_skeleton_2/data/large_4.poly     |    643 -
 .../demo/Straight_skeleton_2/help/index.html       |    231 -
 .../CGAL-4.6/demo/Straight_skeleton_2/ss_types.h   |    202 -
 .../Straight_skeleton_2/straight_skeleton_2.cpp    |    568 -
 .../straight_skeleton_2_layers.h                   |    241 -
 .../straight_skeleton_2_toolbar.cpp                |     72 -
 .../straight_skeleton_2_toolbar.h                  |     51 -
 .../straight_skeleton_2_toolbar_layers.cpp         |    112 -
 .../straight_skeleton_2_toolbar_layers.h           |     65 -
 .../CGAL-4.6/demo/Stream_lines_2/CMakeLists.txt    |     55 -
 .../demo/Stream_lines_2/Stream_lines_2.cpp         |    250 -
 .../CGAL-4.6/demo/Surface_mesher/CMakeLists.txt    |    108 -
 .../demo/Surface_mesher/Raw_image_dialog.cpp       |     29 -
 .../demo/Surface_mesher/Raw_image_dialog.h         |     19 -
 .../demo/Surface_mesher/Surface_mesher.cpp         |     22 -
 .../CGAL-4.6/demo/Surface_mesher/binary_image.h    |    193 -
 .../demo/Surface_mesher/colorlisteditor.cpp        |     68 -
 .../CGAL-4.6/demo/Surface_mesher/mainwindow.cpp    |    156 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.h |     38 -
 .../demo/Surface_mesher/polyhedral_surface.cpp     |    494 -
 .../demo/Surface_mesher/polyhedral_surface.h       |    103 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/surface.h    |     36 -
 .../CGAL-4.6/demo/Surface_mesher/ui/mainwindow.ui  |    797 -
 .../demo/Surface_mesher/ui/optionsdialog.ui        |    128 -
 .../CGAL-4.6/demo/Surface_mesher/ui/raw_image.ui   |    454 -
 .../CGAL-4.6/demo/Surface_mesher/values_list.cpp   |    271 -
 .../CGAL-4.6/demo/Surface_mesher/values_list.h     |     79 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.cpp   |     69 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.h     |     29 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/volume.cpp   |   1521 -
 3rdparty/CGAL-4.6/demo/Surface_mesher/volume.h     |    367 -
 .../CGAL-4.6/demo/Surface_modeling/CMakeLists.txt  |     38 -
 .../deform_mesh_for_botsch08_format.cpp            |     96 -
 .../CGAL-4.6/demo/Triangulation_2/CMakeLists.txt   |    105 -
 .../Constrained_Delaunay_triangulation_2.cpp       |    734 -
 .../Constrained_Delaunay_triangulation_2.ui        |    334 -
 .../Triangulation_2/Delaunay_triangulation_2.cpp   |    400 -
 .../RegularTriangulationRemoveVertex.h             |     80 -
 .../Triangulation_2/Regular_triangulation_2.cpp    |    312 -
 .../Triangulation_2/TriangulationMovingPoint.h     |    147 -
 .../TriangulationPointInputAndConflictZone.h       |    120 -
 .../Triangulation_2/TriangulationRemoveVertex.h    |     81 -
 .../include/CGAL/Lipschitz_sizing_field_2.h        |    250 -
 .../CGAL/Lipschitz_sizing_field_criteria_2.h       |    204 -
 .../Triangulation_2/include/CGAL/Sizing_field_2.h  |     30 -
 .../CGAL-4.6/demo/Triangulation_3/CMakeLists.txt   |    104 -
 .../CGAL-4.6/demo/Triangulation_3/MainWindow.cpp   |    243 -
 .../CGAL-4.6/demo/Triangulation_3/MainWindow.h     |     55 -
 .../demo/Triangulation_3/PreferenceDlg.cpp         |    399 -
 .../CGAL-4.6/demo/Triangulation_3/PreferenceDlg.h  |     70 -
 3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.cpp |     38 -
 3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.cpp  |   1294 -
 3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.h    |    290 -
 .../Triangulation_3_Geomview_demos/CMakeLists.txt  |     32 -
 3rdparty/CGAL-4.6/doc_html/index.html              |     58 -
 .../CGAL-4.6/examples/AABB_tree/CMakeLists.txt     |     44 -
 .../examples/Algebraic_foundations/CMakeLists.txt  |     37 -
 .../examples/Algebraic_kernel_d/CMakeLists.txt     |     35 -
 .../examples/Alpha_shapes_2/CMakeLists.txt         |     34 -
 3rdparty/CGAL-4.6/examples/Alpha_shapes_2/data/fin |    207 -
 .../Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp  |     99 -
 .../examples/Alpha_shapes_3/CMakeLists.txt         |     38 -
 .../Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp  |     64 -
 .../examples/Apollonius_graph_2/CMakeLists.txt     |     36 -
 .../Apollonius_graph_2/ag2_exact_traits_sqrt.cpp   |     77 -
 .../Approximate_min_ellipsoid_d/CMakeLists.txt     |     34 -
 .../Arrangement_on_surface_2/CMakeLists.txt        |     81 -
 .../Arrangement_on_surface_2/arr_rational_nt.h     |     23 -
 .../Arrangement_on_surface_2/bgl_dual_adapter.cpp  |     85 -
 .../bgl_primal_adapter.cpp                         |    144 -
 .../examples/Arrangement_on_surface_2/circles.cpp  |     60 -
 .../Arrangement_on_surface_2/circular_arcs.cpp     |     93 -
 .../consolidated_curve_data.cpp                    |    113 -
 .../Arrangement_on_surface_2/curve_history.cpp     |     74 -
 .../Arrangement_on_surface_2/dcel_extension.cpp    |     97 -
 .../Arrangement_on_surface_2/dcel_extension_io.cpp |    137 -
 .../Arrangement_on_surface_2/dual_lines.cpp        |    112 -
 .../Arrangement_on_surface_2/dual_with_data.cpp    |     82 -
 .../edge_manipulation_curve_history.cpp            |     86 -
 .../Arrangement_on_surface_2/face_extension.cpp    |     88 -
 .../face_extension_overlay.cpp                     |     89 -
 .../generic_curve_data.cpp                         |     71 -
 .../examples/Arrangement_on_surface_2/io.cpp       |     48 -
 .../Arrangement_on_surface_2/io_curve_history.cpp  |     57 -
 .../Arrangement_on_surface_2/io_unbounded.cpp      |     68 -
 .../examples/Arrangement_on_surface_2/overlay.cpp  |     59 -
 .../examples/BGL_arrangement_2/CMakeLists.txt      |     34 -
 .../examples/BGL_polyhedron_3/CMakeLists.txt       |     39 -
 .../CGAL-4.6/examples/BGL_polyhedron_3/range.cpp   |     68 -
 .../examples/BGL_surface_mesh/CMakeLists.txt       |     34 -
 .../examples/BGL_triangulation_2/CMakeLists.txt    |     36 -
 .../Barycentric_coordinates_2/CMakeLists.txt       |     39 -
 .../Boolean_set_operations_2/CMakeLists.txt        |     43 -
 .../examples/Box_intersection_d/CMakeLists.txt     |     39 -
 .../CGAL-4.6/examples/CGAL_ipelets/CMakeLists.txt  |     33 -
 .../CGAL-4.6/examples/CGALimageIO/CMakeLists.txt   |     23 -
 3rdparty/CGAL-4.6/examples/CMakeLists.txt          |     42 -
 .../examples/Circular_kernel_2/CMakeLists.txt      |     34 -
 .../examples/Circular_kernel_3/CMakeLists.txt      |     35 -
 .../CGAL-4.6/examples/Circulator/CMakeLists.txt    |     35 -
 .../examples/Combinatorial_map/CMakeLists.txt      |     39 -
 .../examples/Combinatorial_map/map_3_marks.cpp     |     53 -
 .../examples/Convex_decomposition_3/CMakeLists.txt |     33 -
 .../CGAL-4.6/examples/Convex_hull_2/CMakeLists.txt |     41 -
 .../CGAL-4.6/examples/Convex_hull_3/CMakeLists.txt |     35 -
 .../Convex_hull_3/halfspace_intersection_3.cpp     |     46 -
 3rdparty/CGAL-4.6/examples/Core/CMakeLists.txt     |     57 -
 .../CGAL-4.6/examples/Envelope_2/CMakeLists.txt    |     35 -
 .../CGAL-4.6/examples/Envelope_3/CMakeLists.txt    |     35 -
 .../examples/Filtered_kernel/CMakeLists.txt        |     33 -
 .../CGAL-4.6/examples/Generator/CMakeLists.txt     |     46 -
 .../Generator/random_degenerate_point_set.cpp      |     53 -
 .../CGAL-4.6/examples/Generator/random_polygon.cpp |     56 -
 .../CGAL-4.6/examples/HalfedgeDS/CMakeLists.txt    |     41 -
 .../examples/Inscribed_areas/CMakeLists.txt        |     35 -
 .../CGAL-4.6/examples/Interpolation/CMakeLists.txt |     39 -
 .../examples/Interval_skip_list/CMakeLists.txt     |     34 -
 .../CGAL-4.6/examples/Jet_fitting_3/CMakeLists.txt |     60 -
 .../examples/Jet_fitting_3/Mesh_estimation.cpp     |    304 -
 .../CGAL-4.6/examples/Kernel_23/CMakeLists.txt     |     38 -
 .../CGAL-4.6/examples/Kernel_23/intersections.cpp  |     70 -
 .../Kinetic_data_structures/CMakeLists.txt         |     38 -
 .../examples/Kinetic_framework/CMakeLists.txt      |     38 -
 .../Linear_cell_complex/CMakeLCCViewerQt.inc       |     33 -
 .../Linear_cell_complex/CMakeLCCViewerVtk.inc      |     40 -
 .../examples/Linear_cell_complex/CMakeLists.txt    |     66 -
 .../examples/Linear_cell_complex/README.txt        |     34 -
 .../linear_cell_complex_3_triangulation.cpp        |    272 -
 .../linear_cell_complex_3_viewer_qt.h              |    446 -
 .../linear_cell_complex_3_viewer_vtk.h             |    245 -
 .../examples/Linear_cell_complex/voronoi_2.cpp     |    179 -
 .../examples/Linear_cell_complex/voronoi_3.cpp     |    178 -
 .../CGAL-4.6/examples/Matrix_search/CMakeLists.txt |     33 -
 3rdparty/CGAL-4.6/examples/Mesh_2/CMakeLists.txt   |     36 -
 3rdparty/CGAL-4.6/examples/Mesh_3/CMakeLists.txt   |     91 -
 .../CGAL-4.6/examples/Mesh_3/mesh_3D_image.cpp     |     54 -
 .../Mesh_3/mesh_3D_image_variable_size.cpp         |     66 -
 .../examples/Mesh_3/mesh_optimization_example.cpp  |     64 -
 .../Mesh_3/mesh_optimization_lloyd_example.cpp     |     65 -
 .../examples/Mesh_3/mesh_polyhedral_domain.cpp     |     70 -
 .../mesh_polyhedral_domain_with_features.cpp       |     52 -
 .../CGAL-4.6/examples/Min_annulus_d/CMakeLists.txt |     34 -
 .../CGAL-4.6/examples/Min_circle_2/CMakeLists.txt  |     33 -
 .../CGAL-4.6/examples/Min_ellipse_2/CMakeLists.txt |     33 -
 .../examples/Min_quadrilateral_2/CMakeLists.txt    |     35 -
 .../CGAL-4.6/examples/Min_sphere_d/CMakeLists.txt  |     33 -
 .../Min_sphere_of_spheres_d/CMakeLists.txt         |     36 -
 .../examples/Minkowski_sum_2/CMakeLists.txt        |     39 -
 .../examples/Minkowski_sum_2/approx_inset.cpp      |     63 -
 .../examples/Minkowski_sum_2/approx_offset.cpp     |     57 -
 .../examples/Minkowski_sum_2/exact_inset.cpp       |     80 -
 .../examples/Minkowski_sum_2/exact_offset.cpp      |     75 -
 .../Minkowski_sum_2/sum_by_decomposition.cpp       |     44 -
 .../examples/Minkowski_sum_2/sum_triangles.cpp     |     42 -
 .../examples/Minkowski_sum_2/sum_with_holes.cpp    |     40 -
 .../examples/Minkowski_sum_3/CMakeLists.txt        |     34 -
 .../examples/Modular_arithmetic/CMakeLists.txt     |     33 -
 3rdparty/CGAL-4.6/examples/Nef_2/CMakeLists.txt    |     35 -
 3rdparty/CGAL-4.6/examples/Nef_3/CMakeLists.txt    |     49 -
 3rdparty/CGAL-4.6/examples/Nef_S2/CMakeLists.txt   |     38 -
 .../CGAL-4.6/examples/Partition_2/CMakeLists.txt   |     36 -
 .../Periodic_2_triangulation_2/CMakeLists.txt      |     43 -
 .../Periodic_3_triangulation_3/CMakeLists.txt      |     39 -
 .../colored_vertices.cpp                           |     40 -
 .../Periodic_3_triangulation_3/covering.cpp        |     48 -
 .../Periodic_3_triangulation_3/find_conflicts.cpp  |     55 -
 .../geometric_access.cpp                           |     39 -
 .../Periodic_3_triangulation_3/large_point_set.cpp |     61 -
 .../periodic_adding_handles.cpp                    |     69 -
 .../Periodic_3_triangulation_3/simple_example.cpp  |     77 -
 .../CGAL-4.6/examples/Point_set_2/CMakeLists.txt   |     34 -
 .../examples/Point_set_processing_3/CMakeLists.txt |     93 -
 .../average_spacing_example.cpp                    |     59 -
 .../bilateral_smooth_point_set_example.cpp         |     70 -
 .../edge_aware_upsample_point_set_example.cpp      |     73 -
 .../jet_smoothing_example.cpp                      |     29 -
 .../Point_set_processing_3/normal_estimation.cpp   |    299 -
 .../Point_set_processing_3/normals_example.cpp     |     58 -
 .../random_simplification_example.cpp              |     48 -
 .../read_write_xyz_point_set_example.cpp           |     52 -
 .../remove_outliers_example.cpp                    |     41 -
 ...p_simplify_and_regularize_point_set_example.cpp |     56 -
 3rdparty/CGAL-4.6/examples/Polygon/CMakeLists.txt  |     36 -
 .../CGAL-4.6/examples/Polyhedron/CMakeLists.txt    |     50 -
 .../include/CGAL/Point_inside_polyhedron_3.h       |    403 -
 .../CGAL-4.6/examples/Polyhedron_IO/CMakeLists.txt |     44 -
 .../Polyline_simplification_2/CMakeLists.txt       |     36 -
 .../CGAL-4.6/examples/Polynomial/CMakeLists.txt    |     39 -
 .../CGAL-4.6/examples/Polynomial/construction.cpp  |     47 -
 .../examples/Polytope_distance_d/CMakeLists.txt    |     36 -
 .../Principal_component_analysis/CMakeLists.txt    |     37 -
 .../examples/Profiling_tools/CMakeLists.txt        |     35 -
 .../CGAL-4.6/examples/QP_solver/CMakeLists.txt     |     58 -
 .../QP_solver/infeasibility_certificate.cpp        |     68 -
 .../QP_solver/unboundedness_certificate.cpp        |     75 -
 .../examples/RangeSegmentTrees/CMakeLists.txt      |     48 -
 .../examples/Rectangular_p_center_2/CMakeLists.txt |     33 -
 3rdparty/CGAL-4.6/examples/Ridges_3/CMakeLists.txt |     55 -
 .../examples/Ridges_3/Compute_Ridges_Umbilics.cpp  |    370 -
 .../CGAL-4.6/examples/Ridges_3/PolyhedralSurf.cpp  |     35 -
 .../CGAL-4.6/examples/Ridges_3/PolyhedralSurf.h    |     73 -
 .../examples/Ridges_3/PolyhedralSurf_operations.h  |     19 -
 .../examples/Ridges_3/PolyhedralSurf_rings.h       |    172 -
 .../CGAL-4.6/examples/STL_Extension/CMakeLists.txt |     37 -
 .../Scale_space_reconstruction_3/CMakeLists.txt    |     47 -
 .../Scale_space_reconstruction_3/scale_space.cpp   |     49 -
 .../Segment_Delaunay_graph_2/CMakeLists.txt        |     39 -
 .../Segment_Delaunay_graph_2/sdg-red-blue-info.cpp |    139 -
 .../examples/Skin_surface_3/CMakeLists.txt         |     48 -
 .../examples/Snap_rounding_2/CMakeLists.txt        |     35 -
 .../examples/Spatial_searching/CMakeLists.txt      |     98 -
 .../searching_with_circular_query.cpp              |     56 -
 .../examples/Spatial_sorting/CMakeLists.txt        |     41 -
 .../examples/Straight_skeleton_2/CMakeLists.txt    |     41 -
 ...e_skeleton_and_offset_polygons_with_holes_2.cpp |     58 -
 .../examples/Straight_skeleton_2/dump_to_eps.h     |    171 -
 .../CGAL-4.6/examples/Straight_skeleton_2/print.h  |     82 -
 .../examples/Stream_lines_2/CMakeLists.txt         |     34 -
 .../examples/Subdivision_method_3/CMakeLists.txt   |     36 -
 .../CGAL-4.6/examples/Surface_mesh/CMakeLists.txt  |     40 -
 .../CGAL-4.6/examples/Surface_mesh/sm_aabbtree.cpp |     90 -
 .../examples/Surface_mesh/sm_iterators.cpp         |     69 -
 .../CGAL-4.6/examples/Surface_mesh/sm_memory.cpp   |     69 -
 .../Authalic_parameterization.cpp                  |    111 -
 .../Surface_mesh_parameterization/CMakeLists.txt   |     93 -
 .../Complete_parameterization_example.cpp          |    289 -
 .../Eigen_parameterization.cmd                     |      1 -
 .../Eigen_parameterization.cpp                     |    124 -
 .../Mesh_cutting_parameterization.cpp              |    197 -
 .../Simple_parameterization.cpp                    |    109 -
 .../Square_border_parameterization.cpp             |    116 -
 .../polyhedron_ex_parameterization.cpp             |    488 -
 .../Surface_mesh_segmentation/CMakeLists.txt       |     81 -
 ...gmentation_from_sdf_values_OpenMesh_example.cpp |     64 -
 .../Surface_mesh_simplification/CMakeLists.txt     |     86 -
 .../edge_collapse_OpenMesh.cpp                     |     97 -
 .../edge_collapse_constrain_sharp_edges.cpp        |    189 -
 ...edge_collapse_constrained_border_polyhedron.cpp |    125 -
 ...ge_collapse_constrained_border_surface_mesh.cpp |    120 -
 .../edge_collapse_enriched_polyhedron.cpp          |    187 -
 .../edge_collapse_polyhedron.cpp                   |     55 -
 .../edge_collapse_surface_mesh.cpp                 |    161 -
 .../examples/Surface_mesher/CMakeLists.txt         |     34 -
 .../examples/Surface_modeling/CMakeLists.txt       |     54 -
 .../all_roi_assign_example_custom_polyhedron.cpp   |    155 -
 .../custom_weight_for_edges_example.cpp            |     85 -
 .../Surface_reconstruction_points_3/CMakeLists.txt |     70 -
 .../include/compute_normal.h                       |     44 -
 .../poisson_reconstruction.cpp                     |    396 -
 .../poisson_reconstruction_example.cpp             |    108 -
 .../CGAL-4.6/examples/Triangulation/CMakeLists.txt |     44 -
 .../Triangulation/delaunay_triangulation.cpp       |     66 -
 .../examples/Triangulation/triangulation.cpp       |     41 -
 .../examples/Triangulation_2/CMakeLists.txt        |     50 -
 .../examples/Triangulation_3/CMakeLists.txt        |     55 -
 .../examples/Triangulation_3/fast_location_3.cpp   |     35 -
 .../Triangulation_3/sequential_parallel.cpp        |     57 -
 .../examples/Voronoi_diagram_2/CMakeLists.txt      |     33 -
 3rdparty/CGAL-4.6/include/CGAL/AABB_tree.h         |   1239 -
 .../CGAL/Algebraic_kernel_d/Curve_analysis_2.h     |   2558 -
 .../CGAL/Algebraic_kernel_d/Xy_coordinate_2.h      |    786 -
 .../CGAL-4.6/include/CGAL/Apollonius_graph_2.h     |   1345 -
 .../Apollonius_graph_hierarchy_vertex_base_2.h     |     71 -
 3rdparty/CGAL-4.6/include/CGAL/Apollonius_site_2.h |     90 -
 .../Approximate_min_ellipsoid_d_impl.h             |    282 -
 .../Khachiyan_approximation_impl.h                 |    666 -
 .../include/CGAL/Arr_Bezier_curve_traits_2.h       |    826 -
 3rdparty/CGAL-4.6/include/CGAL/Arr_accessor.h      |    874 -
 .../include/CGAL/Arr_circle_segment_traits_2.h     |    702 -
 .../CGAL-4.6/include/CGAL/Arr_conic_traits_2.h     |    822 -
 3rdparty/CGAL-4.6/include/CGAL/Arr_dcel_base.h     |   1672 -
 .../CGAL/Arr_geodesic_arc_on_sphere_traits_2.h     |   3245 -
 .../CGAL/Arr_geometry_traits/Bezier_curve_2.h      |    956 -
 .../CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h |   2820 -
 .../CGAL/Arr_geometry_traits/Circle_segment_2.h    |   2458 -
 .../include/CGAL/Arr_geometry_traits/Conic_arc_2.h |   1870 -
 .../Arr_geometry_traits/Conic_x_monotone_arc_2.h   |   2140 -
 .../include/CGAL/Arr_geometry_traits/Polyline_2.h  |    556 -
 .../CGAL-4.6/include/CGAL/Arr_linear_traits_2.h    |   1892 -
 .../CGAL/Arr_non_caching_segment_basic_traits_2.h  |    282 -
 .../CGAL/Arr_non_caching_segment_traits_2.h        |    430 -
 .../Arr_simple_point_location_impl.h               |    444 -
 .../Trapezoidal_decomposition_2.h                  |   2320 -
 .../Trapezoidal_decomposition_2_impl.h             |   3110 -
 .../CGAL-4.6/include/CGAL/Arr_polyline_traits_2.h  |   3007 -
 .../CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h      |    126 -
 .../include/CGAL/Arr_rat_arc/Rational_arc_d_1.h    |   2606 -
 .../Rational_function_canonicalized_pair.h         |    509 -
 .../CGAL-4.6/include/CGAL/Arr_rat_arc/Singleton.h  |     56 -
 .../include/CGAL/Arr_rational_function_traits_2.h  |   1314 -
 .../CGAL-4.6/include/CGAL/Arr_segment_traits_2.h   |   1186 -
 .../Arr_spherical_topology_traits_2_impl.h         |    878 -
 .../CGAL/Arr_unb_planar_topology_traits_2.h        |    637 -
 .../CGAL/Arrangement_2/Arrangement_2_iterators.h   |    548 -
 .../Arrangement_2/Arrangement_on_surface_2_impl.h  |   5476 -
 .../include/CGAL/Arrangement_on_surface_2.h        |   2926 -
 .../CGAL/Barycentric_mapping_parameterizer_3.h     |    179 -
 .../CGAL-4.6/include/CGAL/Basic_sweep_line_2.h     |    533 -
 3rdparty/CGAL-4.6/include/CGAL/Bbox_2.h            |    233 -
 .../include/CGAL/Bbox_2_Line_2_intersection.h      |     99 -
 3rdparty/CGAL-4.6/include/CGAL/Bbox_3.h            |    261 -
 .../include/CGAL/Bigfloat_interval_traits.h        |     65 -
 .../Boolean_set_operations_2/Gps_agg_op_sweep.h    |    296 -
 .../Boolean_set_operations_2/Gps_default_dcel.h    |    107 -
 .../Gps_on_surface_base_2.h                        |   1417 -
 .../Gps_on_surface_base_2_impl.h                   |    793 -
 .../Gps_polygon_simplifier.h                       |    165 -
 .../Gps_polygon_validation.h                       |    815 -
 .../Gps_simplifier_traits.h                        |    478 -
 .../Boolean_set_operations_2/Gps_traits_adaptor.h  |    175 -
 .../CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v6.h    |   1030 -
 .../CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v7.h    |   1035 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloat.h     |    628 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloatRep.h  |    447 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/BigInt.h       |    562 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/BigRat.h       |    489 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/CORE.h         |     71 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Config.h       |     42 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/CoreAux.h      |    184 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/CoreDefs.h     |    254 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Expr.h         |    551 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/ExprRep.h      |   1314 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Filter.h       |    194 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Gmp.h          |     42 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Impl.h         |     69 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/MemoryPool.h   |    109 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Promote.h      |    158 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Real.h         |    496 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/RealRep.h      |    514 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/RefCount.h     |    118 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/Timer.h        |     78 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/extLong.h      |    297 -
 .../CGAL-4.6/include/CGAL/CORE/geom2d/circle2d.h   |    153 -
 .../CGAL-4.6/include/CGAL/CORE/geom2d/line2d.h     |    175 -
 .../CGAL-4.6/include/CGAL/CORE/geom2d/point2d.h    |    187 -
 .../CGAL-4.6/include/CGAL/CORE/geom2d/segment2d.h  |    196 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/line3d.h     |    140 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/plane3d.h    |    159 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/point3d.h    |    176 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/polygon3d.h  |    180 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/segment3d.h  |    177 -
 .../CGAL-4.6/include/CGAL/CORE/geom3d/triangle3d.h |    182 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/geombase.h     |     66 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/geometry2d.h   |     74 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/geometry3d.h   |     83 -
 .../CGAL-4.6/include/CGAL/CORE/linearAlgebra.h     |    176 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.h  |    527 -
 .../CGAL-4.6/include/CGAL/CORE/poly/Curves.tcc     |   1429 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.h    |    435 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.tcc  |   1560 -
 3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Sturm.h   |   1149 -
 3rdparty/CGAL-4.6/include/CGAL/CORE_BigFloat.h     |    548 -
 .../CGAL-4.6/include/CGAL/CORE_coercion_traits.h   |    163 -
 .../CGAL-4.6/include/CGAL/Cartesian/Circle_2.h     |     82 -
 .../CGAL-4.6/include/CGAL/Cartesian/Circle_3.h     |    299 -
 .../CGAL-4.6/include/CGAL/Cartesian/Direction_2.h  |    104 -
 .../CGAL-4.6/include/CGAL/Cartesian/Direction_3.h  |    136 -
 .../CGAL-4.6/include/CGAL/Cartesian/Iso_cuboid_3.h |    338 -
 .../include/CGAL/Cartesian/Iso_rectangle_2.h       |     73 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_2.h  |     97 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_3.h  |    157 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Plane_3.h |    311 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_2.h |    107 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_3.h |    139 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_2.h   |     76 -
 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_3.h   |    192 -
 .../CGAL-4.6/include/CGAL/Cartesian/Segment_2.h    |     69 -
 .../CGAL-4.6/include/CGAL/Cartesian/Segment_3.h    |    221 -
 .../CGAL-4.6/include/CGAL/Cartesian/Sphere_3.h     |    294 -
 .../include/CGAL/Cartesian/Tetrahedron_3.h         |    224 -
 .../CGAL-4.6/include/CGAL/Cartesian/Triangle_2.h   |     75 -
 .../CGAL-4.6/include/CGAL/Cartesian/Triangle_3.h   |    146 -
 .../CGAL-4.6/include/CGAL/Cartesian/Vector_2.h     |    153 -
 .../CGAL-4.6/include/CGAL/Cartesian/Vector_3.h     |    266 -
 .../include/CGAL/Cell_attribute_with_point.h       |    161 -
 3rdparty/CGAL-4.6/include/CGAL/Cell_iterators.h    |    453 -
 3rdparty/CGAL-4.6/include/CGAL/Circle_2.h          |    302 -
 .../CGAL/Circular_kernel_2/Circular_arc_point_2.h  |    164 -
 .../CGAL/Circular_kernel_3/Circular_arc_3.h        |    323 -
 .../CGAL/Circular_kernel_3/Circular_arc_point_3.h  |    255 -
 .../include/CGAL/Circular_kernel_3/Line_arc_3.h    |    206 -
 .../include/CGAL/Circulator/Circulator_adapters.h  |    690 -
 .../CGAL-4.6/include/CGAL/Circulator_identity.h    |    144 -
 .../CGAL-4.6/include/CGAL/Circulator_on_node.h     |    101 -
 3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map.h |   3796 -
 .../CGAL/Combinatorial_map_basic_operations.h      |    357 -
 .../include/CGAL/Combinatorial_map_functors.h      |    133 -
 .../include/CGAL/Combinatorial_map_insertions.h    |    729 -
 .../CGAL/Combinatorial_map_iterators_base.h        |    604 -
 .../include/CGAL/Combinatorial_map_operations.h    |    811 -
 .../include/CGAL/Combinatorial_map_storages.h      |    409 -
 3rdparty/CGAL-4.6/include/CGAL/Compact_container.h |   1166 -
 .../include/CGAL/Compact_mesh_cell_base_3.h        |    713 -
 .../include/CGAL/Concurrent_compact_container.h    |   1026 -
 .../CGAL/Constrained_Delaunay_triangulation_2.h    |    984 -
 .../CGAL/Constrained_triangulation_plus_2.h        |   1198 -
 .../include/CGAL/Convex_decomposition_3/SM_walls.h |    591 -
 .../include/CGAL/Convex_hull_2/ch_melkman_impl.h   |    130 -
 .../Convex_hull_3/dual/Convex_hull_traits_dual_3.h |    281 -
 .../Convex_hull_3/dual/halfspace_intersection_3.h  |    331 -
 .../halfspace_intersection_with_constructions_3.h  |    216 -
 .../Convex_hull_3/dual/interior_polyhedron_3.h     |    161 -
 .../CGAL/Curved_kernel_via_analysis_2/Arc_2.h      |   3368 -
 .../Make_x_monotone_2.h                            |    339 -
 .../CGAL/Curved_kernel_via_analysis_2/Point_2.h    |    840 -
 .../Qt_widget_Curve_renderer_2.h                   |    134 -
 .../gfx/Curve_renderer_internals.h                 |   1081 -
 .../gfx/Curve_renderer_traits.h                    |    599 -
 3rdparty/CGAL-4.6/include/CGAL/Dart.h              |    343 -
 .../CGAL-4.6/include/CGAL/Dart_const_iterators.h   |    331 -
 3rdparty/CGAL-4.6/include/CGAL/Dart_iterators.h    |   2727 -
 3rdparty/CGAL-4.6/include/CGAL/Deform_mesh.h       |    112 -
 .../Deformation_Eigen_closest_rotation_traits_3.h  |    109 -
 ...rmation_Eigen_polar_closest_rotation_traits_3.h |     84 -
 3rdparty/CGAL-4.6/include/CGAL/Delaunay_d.h        |   1071 -
 .../include/CGAL/Delaunay_mesh_face_base_2.h       |     79 -
 .../include/CGAL/Delaunay_triangulation_2.h        |   2549 -
 .../include/CGAL/Delaunay_triangulation_3.h        |   1927 -
 3rdparty/CGAL-4.6/include/CGAL/Direction_2.h       |    282 -
 3rdparty/CGAL-4.6/include/CGAL/Direction_3.h       |    242 -
 .../CGAL/Discrete_authalic_parameterizer_3.h       |    187 -
 .../CGAL/Discrete_conformal_map_parameterizer_3.h  |    185 -
 3rdparty/CGAL-4.6/include/CGAL/Eigen_matrix.h      |    285 -
 .../CGAL-4.6/include/CGAL/Eigen_solver_traits.h    |    187 -
 .../CGAL-4.6/include/CGAL/Env_triangle_traits_3.h  |   1666 -
 .../Envelope_2/Env_divide_and_conquer_2_impl.h     |   1241 -
 .../CGAL/Envelope_3/Envelope_element_visitor_3.h   |   3220 -
 .../Exact_predicates_exact_constructions_kernel.h  |     93 -
 ...Exact_predicates_inexact_constructions_kernel.h |     50 -
 3rdparty/CGAL-4.6/include/CGAL/FPU.h               |    511 -
 3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_d.h |     72 -
 .../CGAL-4.6/include/CGAL/Filtered_predicate.h     |    424 -
 .../include/CGAL/Fixed_border_parameterizer_3.h    |    633 -
 3rdparty/CGAL-4.6/include/CGAL/Fuzzy_sphere.h      |    158 -
 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type.h    |   1100 -
 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type.h    |   1340 -
 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpq_type.h     |    633 -
 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpz_type.h     |    457 -
 .../CGAL-4.6/include/CGAL/General_polygon_set_2.h  |    121 -
 .../CGAL/General_polygon_set_on_surface_2.h        |    155 -
 .../include/CGAL/Gps_circle_segment_traits_2.h     |     44 -
 3rdparty/CGAL-4.6/include/CGAL/Gps_traits_2.h      |    174 -
 3rdparty/CGAL-4.6/include/CGAL/Handle_for.h        |    314 -
 .../CGAL-4.6/include/CGAL/Hilbert_sort_middle_2.h  |    137 -
 .../CGAL/Homogeneous/Aff_transformationH3.h        |    899 -
 .../CGAL-4.6/include/CGAL/Homogeneous/CircleH2.h   |    255 -
 .../include/CGAL/Homogeneous/DirectionH2.h         |    120 -
 .../include/CGAL/Homogeneous/DirectionH3.h         |    136 -
 .../include/CGAL/Homogeneous/Iso_cuboidH3.h        |    398 -
 .../include/CGAL/Homogeneous/Iso_rectangleH2.h     |    102 -
 .../CGAL-4.6/include/CGAL/Homogeneous/LineH2.h     |    100 -
 .../CGAL-4.6/include/CGAL/Homogeneous/PlaneH3.h    |    545 -
 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/RayH3.h |    177 -
 .../CGAL-4.6/include/CGAL/Homogeneous/SphereH3.h   |    231 -
 .../CGAL-4.6/include/CGAL/Homogeneous/VectorH2.h   |    254 -
 .../CGAL-4.6/include/CGAL/Homogeneous/VectorH3.h   |    249 -
 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_iostream.h   |    126 -
 .../include/CGAL/IO/Arrangement_2_writer.h         |    344 -
 3rdparty/CGAL-4.6/include/CGAL/IO/Color.h          |     98 -
 ...mplex_2_in_triangulation_3_polyhedron_builder.h |    190 -
 .../CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h  |     92 -
 .../CGAL-4.6/include/CGAL/IO/Custom_zoom_layer.h   |     78 -
 .../CGAL-4.6/include/CGAL/IO/File_header_OFF.h     |    120 -
 .../include/CGAL/IO/File_header_extended_OFF.h     |    128 -
 3rdparty/CGAL-4.6/include/CGAL/IO/File_medit.h     |    908 -
 .../CGAL-4.6/include/CGAL/IO/File_scanner_OFF.h    |    466 -
 .../CGAL-4.6/include/CGAL/IO/File_writer_OFF.h     |    108 -
 .../CGAL-4.6/include/CGAL/IO/File_writer_VRML_2.h  |     59 -
 .../include/CGAL/IO/File_writer_inventor.h         |     56 -
 .../include/CGAL/IO/File_writer_wavefront.h        |     60 -
 .../CGAL-4.6/include/CGAL/IO/Geomview_stream.h     |    596 -
 .../CGAL-4.6/include/CGAL/IO/Navigation_layer.h    |     55 -
 3rdparty/CGAL-4.6/include/CGAL/IO/OFF_reader.h     |     71 -
 3rdparty/CGAL-4.6/include/CGAL/IO/Qt_help_window.h |     87 -
 3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget.h      |    772 -
 .../include/CGAL/IO/Qt_widget_Alpha_shape_2.h      |     57 -
 .../include/CGAL/IO/Qt_widget_Apollonius_site_2.h  |     47 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_2.h   |     96 -
 .../include/CGAL/IO/Qt_widget_Conic_arc_2.h        |    112 -
 .../IO/Qt_widget_Constrained_triangulation_2.h     |     42 -
 .../CGAL/IO/Qt_widget_Delaunay_triangulation_2.h   |     41 -
 .../include/CGAL/IO/Qt_widget_Hyperbola_2.h        |     48 -
 .../include/CGAL/IO/Qt_widget_Linear_object_2.h    |     55 -
 .../include/CGAL/IO/Qt_widget_Min_ellipse_2.h      |     45 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_2.h     |    238 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_3.h     |     74 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_S2.h    |     74 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_OpenGL.h    |    105 -
 .../CGAL/IO/Qt_widget_Optimisation_circle_2.h      |     45 -
 .../CGAL/IO/Qt_widget_Optimisation_ellipse_2.h     |     72 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_Polygon_2.h |     50 -
 .../include/CGAL/IO/Qt_widget_Polyline_2.h         |     43 -
 .../CGAL/IO/Qt_widget_Regular_triangulation_2.h    |     41 -
 .../include/CGAL/IO/Qt_widget_Triangulation_2.h    |     69 -
 .../include/CGAL/IO/Qt_widget_circular_arc_2.h     |     73 -
 .../CGAL/IO/Qt_widget_circular_arc_endpoint_2.h    |     44 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_focus.h     |    134 -
 .../include/CGAL/IO/Qt_widget_get_circle.h         |    186 -
 .../include/CGAL/IO/Qt_widget_get_iso_rectangle.h  |    198 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_get_line.h  |    178 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_get_point.h |     82 -
 .../include/CGAL/IO/Qt_widget_get_polygon.h        |    247 -
 .../include/CGAL/IO/Qt_widget_get_segment.h        |    176 -
 .../include/CGAL/IO/Qt_widget_get_simple_polygon.h |     93 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_handtool.h  |    168 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_history.h   |     98 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_layer.h     |     73 -
 .../include/CGAL/IO/Qt_widget_rotation_layer.h     |    219 -
 .../CGAL/IO/Qt_widget_show_mouse_coordinates.h     |     62 -
 .../include/CGAL/IO/Qt_widget_standard_toolbar.h   |     79 -
 .../CGAL-4.6/include/CGAL/IO/Qt_widget_zoomrect.h  |    195 -
 3rdparty/CGAL-4.6/include/CGAL/IO/STL_reader.h     |    110 -
 3rdparty/CGAL-4.6/include/CGAL/IO/io.h             |    358 -
 .../include/CGAL/IO/pixmaps/alpha_shape.xpm        |     24 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/arrow.xpm     |     24 -
 3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/back.xpm |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/circle.xpm    |     23 -
 .../include/CGAL/IO/pixmaps/constrained.xpm        |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/demoicon.xpm  |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/focus.xpm     |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/focus1.xpm    |     21 -
 .../include/CGAL/IO/pixmaps/focus1_mask.xpm        |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/focus2.xpm    |     21 -
 .../include/CGAL/IO/pixmaps/focus2_mask.xpm        |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/focus3.xpm    |     21 -
 .../include/CGAL/IO/pixmaps/focus3_mask.xpm        |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/forward.xpm   |     23 -
 .../include/CGAL/IO/pixmaps/greene_approx.xpm      |     23 -
 3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/hand.xpm |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/handtool.xpm  |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/holddown.xpm  |     21 -
 .../include/CGAL/IO/pixmaps/iso_rectangle.xpm      |     23 -
 3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/line.xpm |     23 -
 .../include/CGAL/IO/pixmaps/min_parallelogram.xpm  |     23 -
 .../include/CGAL/IO/pixmaps/min_rectangle.xpm      |     23 -
 .../include/CGAL/IO/pixmaps/mouse_coord.xpm        |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/movepoint.xpm |     23 -
 .../include/CGAL/IO/pixmaps/nearest_vertex.xpm     |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/notool.xpm    |     23 -
 .../include/CGAL/IO/pixmaps/optimal_convex.xpm     |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/point.xpm     |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/points.xpm    |     24 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/polygon.xpm   |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/rotation.xpm  |     22 -
 .../include/CGAL/IO/pixmaps/show_polygon.xpm       |     23 -
 .../include/CGAL/IO/pixmaps/triangulation.xpm      |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/voronoi.xpm   |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/ymonotone.xpm |     23 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in.xpm   |     21 -
 .../include/CGAL/IO/pixmaps/zoom_in_rect.xpm       |     21 -
 .../CGAL-4.6/include/CGAL/IO/pixmaps/zoom_out.xpm  |     21 -
 .../CGAL-4.6/include/CGAL/IO/read_off_points.h     |    431 -
 .../CGAL-4.6/include/CGAL/IO/read_xyz_points.h     |    427 -
 .../CGAL-4.6/include/CGAL/IO/write_xyz_points.h    |    250 -
 3rdparty/CGAL-4.6/include/CGAL/ImageIO.h           |    704 -
 3rdparty/CGAL-4.6/include/CGAL/Image_3.h           |    499 -
 .../CGAL-4.6/include/CGAL/Image_3_vtk_interface.h  |    132 -
 .../CGAL-4.6/include/CGAL/Implicit_mesh_domain_3.h |     93 -
 .../CGAL/Implicit_to_labeling_function_wrapper.h   |    290 -
 3rdparty/CGAL-4.6/include/CGAL/In_place_list.h     |    755 -
 .../include/CGAL/Incremental_neighbor_search.h     |    547 -
 .../CGAL-4.6/include/CGAL/Intersection_traits.h    |    271 -
 .../CGAL/Intersections_3/intersection_3_1_impl.h   |   1721 -
 3rdparty/CGAL-4.6/include/CGAL/Iso_cuboid_3.h      |    265 -
 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2.h   |    258 -
 3rdparty/CGAL-4.6/include/CGAL/Iterator_range.h    |     95 -
 3rdparty/CGAL-4.6/include/CGAL/Kd_tree.h           |    446 -
 3rdparty/CGAL-4.6/include/CGAL/Kd_tree_node.h      |    483 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_checker.h    |    323 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Matrix__.h |    829 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Pair_d.h   |     97 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Sphere_d.h |    338 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Tuple_d.h  |    284 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector__.h |    464 -
 .../include/CGAL/Kernel_d/function_objectsCd.h     |    812 -
 .../include/CGAL/Kernel_d/function_objectsHd.h     |    513 -
 3rdparty/CGAL-4.6/include/CGAL/Kernel_traits.h     |     39 -
 .../include/CGAL/Kinetic/Active_objects_vector.h   |    378 -
 .../Kinetic/Handle_degeneracy_function_kernel.h    |    121 -
 .../include/CGAL/Kinetic/IO/Qt_moving_points_2.h   |    246 -
 .../include/CGAL/Kinetic/IO/Qt_triangulation_2.h   |    130 -
 .../CGAL-4.6/include/CGAL/Kinetic/IO/Qt_widget_2.h |    254 -
 .../include/CGAL/Kinetic/IO/internal/GUI_base.h    |    332 -
 .../include/CGAL/Kinetic/IO/internal/Qt_core.h     |    149 -
 .../include/CGAL/Kinetic/IO/internal/Qt_timer.h    |     63 -
 .../CGAL/Kinetic/IO/internal/Qt_widget_2_core.h    |     96 -
 .../include/CGAL/Kinetic/IO/internal/Qt_window_2.h |     89 -
 .../include/CGAL/Kinetic/IO/internal/pixmaps.h     |     41 -
 .../CGAL-4.6/include/CGAL/Kinetic/Ref_counted.h    |    129 -
 .../include/CGAL/Kinetic/Regular_triangulation_3.h |   1217 -
 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort.h      |    471 -
 .../CGAL/Kinetic/Two_list_pointer_event_queue.h    |   1039 -
 .../include/CGAL/Kinetic/internal/debug_counters.h |     32 -
 .../CGAL-4.6/include/CGAL/LSCM_parameterizer_3.h   |    670 -
 .../include/CGAL/Labeled_image_mesh_domain_3.h     |     93 -
 .../CGAL-4.6/include/CGAL/Labeled_mesh_domain_3.h  |    641 -
 .../include/CGAL/Lapack/Linear_algebra_lapack.h    |    171 -
 3rdparty/CGAL-4.6/include/CGAL/Lazy.h              |   1769 -
 3rdparty/CGAL-4.6/include/CGAL/Lazy_exact_nt.h     |   1444 -
 3rdparty/CGAL-4.6/include/CGAL/Line_2.h            |    292 -
 3rdparty/CGAL-4.6/include/CGAL/Line_3.h            |    171 -
 .../CGAL-4.6/include/CGAL/Linear_cell_complex.h    |    933 -
 .../CGAL/Linear_cell_complex_constructors.h        |    622 -
 .../CGAL/Linear_cell_complex_incremental_builder.h |    159 -
 .../include/CGAL/Linear_cell_complex_storages.h    |    441 -
 3rdparty/CGAL-4.6/include/CGAL/MP_Float.h          |    909 -
 .../CGAL/Mean_value_coordinates_parameterizer_3.h  |    203 -
 3rdparty/CGAL-4.6/include/CGAL/Memory_sizer.h      |    173 -
 .../CGAL-4.6/include/CGAL/Mesh_3/C3T3_helpers.h    |   3902 -
 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Dump_c3t3.h  |     87 -
 .../Mesh_3/Image_to_labeled_function_wrapper.h     |    119 -
 .../include/CGAL/Mesh_3/Labeled_mesh_domain_3.h    |    623 -
 .../Mesh_complex_3_in_triangulation_3_base.h       |    639 -
 .../include/CGAL/Mesh_3/Mesh_global_optimizer.h    |   1159 -
 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_3.h   |    711 -
 .../CGAL-4.6/include/CGAL/Mesh_3/Mesher_level.h    |   1214 -
 .../CGAL/Mesh_3/Protect_edges_sizing_field.h       |   1705 -
 .../CGAL-4.6/include/CGAL/Mesh_3/Refine_facets_3.h |   1886 -
 ...obust_weighted_circumcenter_filtered_traits_3.h |    415 -
 .../include/CGAL/Mesh_3/Sliver_perturber.h         |   1663 -
 .../CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder.h  |   1869 -
 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/config.h     |     83 -
 .../include/CGAL/Mesh_3/global_parameters.h        |     92 -
 .../CGAL/Mesh_domain_with_polyline_features_3.h    |   1086 -
 .../CGAL-4.6/include/CGAL/Mesh_facet_criteria_3.h  |    174 -
 .../CGAL-4.6/include/CGAL/Mesh_facet_topology.h    |     38 -
 .../CGAL-4.6/include/CGAL/Mesh_vertex_base_3.h     |    310 -
 .../include/CGAL/Meshes/Double_map_container.h     |     95 -
 3rdparty/CGAL-4.6/include/CGAL/Min_annulus_d.h     |    873 -
 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2.h      |    589 -
 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2.h     |    584 -
 .../CGAL/Min_ellipse_2/Optimisation_ellipse_2.h    |    448 -
 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d.h      |    462 -
 .../CGAL/Minkowski_sum_2/Approx_offset_base_2.h    |    601 -
 .../CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h    |    421 -
 .../Decomposition_strategy_adapter.h               |    165 -
 .../CGAL/Minkowski_sum_2/Exact_offset_base_2.h     |    297 -
 .../CGAL-4.6/include/CGAL/Minkowski_sum_2/Labels.h |    288 -
 .../CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h    |    684 -
 .../CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h  |    285 -
 .../include/CGAL/Minkowski_sum_2/Offset_conv_2.h   |    201 -
 .../include/CGAL/Minkowski_sum_2/Offset_decomp_2.h |    127 -
 .../Minkowski_sum_2/Polygon_convex_decomposition.h |    131 -
 .../CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h |    254 -
 .../CGAL/Minkowski_sum_2/Union_of_cycles_2.h       |    226 -
 .../Minkowski_sum_2/Union_of_segment_cycles_2.h    |    135 -
 .../include/CGAL/Minkowski_sum_3/Gaussian_map.h    |   1231 -
 .../include/CGAL/Modular_arithmetic/Residue_type.h |    328 -
 .../CGAL-4.6/include/CGAL/Monge_via_jet_fitting.h  |    784 -
 3rdparty/CGAL-4.6/include/CGAL/Mpzf.h              |   1127 -
 .../CGAL-4.6/include/CGAL/Nef_2/PM_point_locator.h |   1058 -
 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Polynomial.h  |   1984 -
 .../CGAL-4.6/include/CGAL/Nef_2/iterator_tools.h   |    111 -
 .../CGAL-4.6/include/CGAL/Nef_3/Pluecker_line_3.h  |    356 -
 .../CGAL-4.6/include/CGAL/Nef_3/SNC_FM_decorator.h |    672 -
 .../include/CGAL/Nef_3/SNC_external_structure.h    |   1360 -
 .../CGAL-4.6/include/CGAL/Nef_3/SNC_io_parser.h    |   2086 -
 .../CGAL-4.6/include/CGAL/Nef_3/SNC_ray_shooter.h  |    233 -
 .../CGAL-4.6/include/CGAL/Nef_S2/SM_io_parser.h    |    492 -
 .../CGAL-4.6/include/CGAL/Nef_S2/SM_overlayer.h    |   2444 -
 .../CGAL-4.6/include/CGAL/Nef_S2/SM_triangulator.h |    744 -
 .../include/CGAL/Nef_S2/Sphere_geometry_OGL.h      |    824 -
 .../CGAL-4.6/include/CGAL/Nef_S2/Sphere_triangle.h |    118 -
 .../include/CGAL/Nef_S2/sphere_predicates.h        |    411 -
 3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_2.h  |   1129 -
 3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_3.h  |   2076 -
 .../include/CGAL/NewKernel_d/KernelD_converter.h   |    196 -
 .../include/CGAL/NewKernel_d/Kernel_d_interface.h  |    224 -
 .../CGAL/NewKernel_d/LA_eigen/constructors.h       |    151 -
 .../include/CGAL/NewKernel_d/Types/Hyperplane.h    |    154 -
 .../include/CGAL/NewKernel_d/Types/Sphere.h        |    159 -
 .../include/CGAL/NewKernel_d/Vector/array.h        |    165 -
 ...f_iterator_to_points_from_iterator_to_vectors.h |     76 -
 .../include/CGAL/NewKernel_d/Vector/vector.h       |    167 -
 .../CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h      |    294 -
 .../CGAL/NewKernel_d/Wrapper/Hyperplane_d.h        |    131 -
 .../include/CGAL/NewKernel_d/Wrapper/Point_d.h     |    284 -
 .../CGAL/NewKernel_d/Wrapper/Ref_count_obj.h       |    120 -
 .../include/CGAL/NewKernel_d/Wrapper/Segment_d.h   |    133 -
 .../include/CGAL/NewKernel_d/Wrapper/Sphere_d.h    |    130 -
 .../include/CGAL/NewKernel_d/Wrapper/Vector_d.h    |    266 -
 .../CGAL/NewKernel_d/function_objects_cartesian.h  |   1159 -
 .../include/CGAL/NewKernel_d/functor_tags.h        |    350 -
 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/utils.h |    296 -
 .../CGAL-4.6/include/CGAL/OpenNL/linear_solver.h   |    475 -
 3rdparty/CGAL-4.6/include/CGAL/Origin.h            |     45 -
 .../CGAL/Orthogonal_incremental_neighbor_search.h  |    620 -
 3rdparty/CGAL-4.6/include/CGAL/PCA_util.h          |    755 -
 .../include/CGAL/Param_mesh_patch_vertex.h         |    441 -
 .../CGAL/Partition_2/partition_approx_convex_2.h   |    275 -
 .../include/CGAL/Periodic_3_triangulation_3.h      |   4140 -
 .../Periodic_3_triangulation_filtered_traits_3.h   |    222 -
 ..._3_triangulation_statically_filtered_traits_3.h |     72 -
 .../CGAL/Periodic_3_triangulation_traits_3.h       |    285 -
 3rdparty/CGAL-4.6/include/CGAL/Plane_3.h           |    281 -
 3rdparty/CGAL-4.6/include/CGAL/Point_2.h           |    270 -
 3rdparty/CGAL-4.6/include/CGAL/Point_3.h           |    302 -
 .../include/CGAL/Point_inside_polyhedron_3.h       |    140 -
 .../include/CGAL/Poisson_reconstruction_function.h |   1210 -
 .../include/CGAL/Polygon_2/Polygon_2_impl.h        |    159 -
 .../CGAL-4.6/include/CGAL/Polygon_2_algorithms.h   |    465 -
 .../include/CGAL/Polygon_convex_decomposition_2.h  |     87 -
 .../include/CGAL/PolyhedralSurf_neighbors.h        |    299 -
 .../include/CGAL/Polyhedral_mesh_domain_3.h        |    791 -
 .../CGAL/Polyhedral_mesh_domain_with_features_3.h  |    245 -
 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_3.h      |   1542 -
 .../CGAL/Polyhedron_incremental_builder_3.h        |    914 -
 .../CGAL-4.6/include/CGAL/Polyhedron_slicer_3.h    |    444 -
 .../CGAL-4.6/include/CGAL/Polyhedron_stitching.h   |    286 -
 .../include/CGAL/Polyline_constraint_hierarchy_2.h |   1173 -
 .../Hybrid_squared_distance_cost.h                 |    114 -
 .../Scaled_squared_distance_cost.h                 |    117 -
 .../Stop_above_cost_threshold.h                    |     68 -
 .../CGAL/Polyline_simplification_2/simplify.h      |    472 -
 .../include/CGAL/Polynomial/CORE_Expr_root_stack.h |    268 -
 .../include/CGAL/Polynomial/Polynomial_type.h      |   1478 -
 .../CGAL/Polynomial/internal/CORE_polynomial.h     |    278 -
 .../CGAL/Polynomial/internal/numeric_solvers.h     |    112 -
 .../Polynomial/internal/numeric_solvers_support.h  |     60 -
 .../CGAL-4.6/include/CGAL/Polytope_distance_d.h    |    932 -
 .../include/CGAL/QP_solver/QP_basis_inverse.h      |   1136 -
 .../include/CGAL/QP_solver/QP_basis_inverse_impl.h |    713 -
 .../CGAL/QP_solver/QP_partial_exact_pricing.h      |    252 -
 .../CGAL/QP_solver/QP_partial_filtered_pricing.h   |    432 -
 .../CGAL-4.6/include/CGAL/QP_solver/QP_solver.h    |   1999 -
 .../include/CGAL/QP_solver/QP_solver_impl.h        |   3390 -
 3rdparty/CGAL-4.6/include/CGAL/QP_solver/basic.h   |     34 -
 .../CGAL-4.6/include/CGAL/Qt/CGAL_Qt4_config.h     |     36 -
 3rdparty/CGAL-4.6/include/CGAL/Qt/Converter.h      |    187 -
 .../Qt/DelaunayMeshTriangulationGraphicsItem.h     |    111 -
 .../CGAL-4.6/include/CGAL/Qt/DemosMainWindow.h     |    128 -
 3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsItem.h   |     53 -
 .../include/CGAL/Qt/GraphicsViewCircleInput.h      |    211 -
 .../include/CGAL/Qt/GraphicsViewCircularArcInput.h |    214 -
 .../CGAL-4.6/include/CGAL/Qt/GraphicsViewInput.h   |     56 -
 .../CGAL/Qt/GraphicsViewIsoRectangleInput.h        |    158 -
 .../include/CGAL/Qt/GraphicsViewLineInput.h        |    182 -
 .../include/CGAL/Qt/GraphicsViewNavigation.h       |     72 -
 .../CGAL/Qt/GraphicsViewPolygonWithHolesInput.h    |    197 -
 .../include/CGAL/Qt/GraphicsViewPolylineInput.h    |    110 -
 .../include/CGAL/Qt/PointsInKdTreeGraphicsItem.h   |    196 -
 .../CGAL-4.6/include/CGAL/Qt/PolygonGraphicsItem.h |    190 -
 .../CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h     |    283 -
 .../include/CGAL/Qt/SegmentsGraphicsItem.h         |    163 -
 .../include/CGAL/Qt/TriangulationGraphicsItem.h    |    308 -
 3rdparty/CGAL-4.6/include/CGAL/Qt/debug.h          |     47 -
 3rdparty/CGAL-4.6/include/CGAL/Qt/resources.h      |     33 -
 3rdparty/CGAL-4.6/include/CGAL/Qt/utility.h        |     42 -
 3rdparty/CGAL-4.6/include/CGAL/RS/dyadic.h         |    438 -
 3rdparty/CGAL-4.6/include/CGAL/Random.h            |    240 -
 3rdparty/CGAL-4.6/include/CGAL/Range_tree_d.h      |    623 -
 3rdparty/CGAL-4.6/include/CGAL/Ray_2.h             |    275 -
 .../include/CGAL/Ray_2_Bbox_2_intersection.h       |     80 -
 3rdparty/CGAL-4.6/include/CGAL/Ray_3.h             |    244 -
 3rdparty/CGAL-4.6/include/CGAL/Real_timer.h        |    118 -
 .../include/CGAL/Regular_triangulation_3.h         |   2152 -
 .../CGAL/Regular_triangulation_filtered_traits_3.h |     43 -
 3rdparty/CGAL-4.6/include/CGAL/Ridges.h            |    899 -
 .../CGAL-4.6/include/CGAL/Root_for_circles_2_2.h   |    137 -
 .../Scale_space_surface_reconstruction_3_impl.h    |    539 -
 .../Weighted_PCA_approximation_3.h                 |    177 -
 .../CGAL/Scale_space_surface_reconstruction_3.h    |    890 -
 .../CGAL-4.6/include/CGAL/Search_traits_adapter.h  |    180 -
 3rdparty/CGAL-4.6/include/CGAL/Segment_2.h         |    310 -
 3rdparty/CGAL-4.6/include/CGAL/Segment_3.h         |    226 -
 .../include/CGAL/Segment_Delaunay_graph_2.h        |   1945 -
 .../Filtered_traits_base_2.h                       |    470 -
 .../Segment_Delaunay_graph_2/Oriented_side_C2.h    |    104 -
 .../Segment_Delaunay_graph_2_impl.h                |   3284 -
 .../Segment_Delaunay_graph_hierarchy_2_impl.h      |   1153 -
 .../CGAL/Segment_Delaunay_graph_2/Traits_base_2.h  |    283 -
 .../CGAL/Segment_Delaunay_graph_hierarchy_2.h      |    506 -
 .../include/CGAL/Self_intersection_polyhedron_3.h  |    293 -
 .../include/CGAL/Skin_surface_filtered_traits_3.h  |     71 -
 .../Small_side_angle_bisector_decomposition_2.h    |    941 -
 .../CGAL-4.6/include/CGAL/Snap_rounding_traits_2.h |    208 -
 3rdparty/CGAL-4.6/include/CGAL/Sphere_3.h          |    349 -
 .../include/CGAL/Sqrt_extension/convert_to_bfi.h   |    106 -
 .../Straight_skeleton_builder_2_impl.h             |   1820 -
 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh.h      |     35 -
 .../include/CGAL/Surface_mesh/Surface_mesh.h       |   2792 -
 .../include/CGAL/Surface_mesh/Surface_mesh_fwd.h   |     39 -
 .../include/CGAL/Surface_mesh_deformation.h        |   1509 -
 .../Surface_mesh_simplification/edge_collapse.h    |    169 -
 .../CGAL/Surface_mesher/Polyhedral_oracle.h        |    409 -
 .../CGAL/Surface_mesher/Surface_mesher_manifold.h  |    241 -
 .../include/CGAL/Sweep_line_2_algorithms.h         |    222 -
 3rdparty/CGAL-4.6/include/CGAL/Tetrahedron_3.h     |    185 -
 3rdparty/CGAL-4.6/include/CGAL/Timer.h             |    116 -
 3rdparty/CGAL-4.6/include/CGAL/Tools/Log.h         |    168 -
 3rdparty/CGAL-4.6/include/CGAL/Triangle_2.h        |    211 -
 .../CGAL/Triangle_2_Iso_rectangle_2_intersection.h |    330 -
 3rdparty/CGAL-4.6/include/CGAL/Triangle_3.h        |    154 -
 3rdparty/CGAL-4.6/include/CGAL/Triangulation.h     |   1330 -
 3rdparty/CGAL-4.6/include/CGAL/Triangulation_2.h   |   3655 -
 .../Triangulation_2_filtered_projection_traits_3.h |     91 -
 .../CGAL/Triangulation_2_projection_traits_3.h     |    444 -
 3rdparty/CGAL-4.6/include/CGAL/Triangulation_3.h   |   6684 -
 .../include/CGAL/Triangulation_data_structure_2.h  |   2323 -
 .../include/CGAL/Triangulation_data_structure_3.h  |   3979 -
 .../include/CGAL/Triangulation_ds_cell_base_3.h    |    271 -
 .../include/CGAL/Triangulation_full_cell.h         |    162 -
 .../Triangulation_structural_filtering_traits.h    |     49 -
 .../CGAL-4.6/include/CGAL/Triangulation_vertex.h   |    127 -
 3rdparty/CGAL-4.6/include/CGAL/Umbilics.h          |    292 -
 3rdparty/CGAL-4.6/include/CGAL/Union_find.h        |    255 -
 3rdparty/CGAL-4.6/include/CGAL/Vector_2.h          |    352 -
 3rdparty/CGAL-4.6/include/CGAL/Vector_3.h          |    334 -
 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2.h |    829 -
 3rdparty/CGAL-4.6/include/CGAL/Weighted_point.h    |    144 -
 .../include/CGAL/aff_transformation_tags.h         |     47 -
 .../CGAL-4.6/include/CGAL/approximated_offset_2.h  |    169 -
 .../include/CGAL/arrange_offset_polygons_2.h       |    117 -
 3rdparty/CGAL-4.6/include/CGAL/assertions.h        |    346 -
 3rdparty/CGAL-4.6/include/CGAL/auto_link/CGALQt3.h |     32 -
 3rdparty/CGAL-4.6/include/CGAL/auto_link/Qt4.h     |     38 -
 .../CGAL-4.6/include/CGAL/auto_link/auto_link.h    |    446 -
 .../include/CGAL/bilateral_smooth_point_set.h      |    649 -
 .../include/CGAL/boost/graph/Euler_operations.h    |   1340 -
 .../include/CGAL/boost/graph/Graph_geometry.h      |    235 -
 .../CGAL/boost/graph/dijkstra_shortest_paths.h     |     40 -
 .../CGAL/boost/graph/dijkstra_shortest_paths.hpp   |    629 -
 .../include/CGAL/boost/graph/graph_concepts.h      |    203 -
 .../boost/graph/graph_traits_CombinatorialMap.h    |    331 -
 .../graph/graph_traits_Delaunay_triangulation_2.h  |    392 -
 .../CGAL/boost/graph/graph_traits_HalfedgeDS.h     |    220 -
 .../graph/graph_traits_PolyMesh_ArrayKernelT.h     |    663 -
 .../CGAL/boost/graph/graph_traits_Polyhedron_3.h   |    492 -
 .../CGAL/boost/graph/graph_traits_Surface_mesh.h   |    539 -
 .../boost/graph/graph_traits_Triangulation_2.h     |    816 -
 .../CGAL-4.6/include/CGAL/boost/graph/helpers.h    |    262 -
 .../include/CGAL/boost/graph/internal/helpers.h    |    178 -
 .../CGAL-4.6/include/CGAL/boost/graph/iterator.h   |   1295 -
 .../CGAL/boost/graph/named_function_params.h       |    451 -
 .../boost/graph/properties_PolyMesh_ArrayKernelT.h |    289 -
 .../CGAL/boost/graph/properties_Surface_mesh.h     |    279 -
 .../CGAL-4.6/include/CGAL/boost/graph/selection.h  |    398 -
 .../CGAL/boost/graph/split_graph_into_polylines.h  |    234 -
 .../include/CGAL/compute_average_spacing.h         |    221 -
 3rdparty/CGAL-4.6/include/CGAL/config.h            |    442 -
 .../constructions_on_weighted_points_cartesian_3.h |    499 -
 3rdparty/CGAL-4.6/include/CGAL/convex_hull_3.h     |    955 -
 .../include/CGAL/create_offset_polygons_2.h        |    351 -
 ...ate_offset_polygons_from_polygon_with_holes_2.h |    105 -
 ...e_straight_skeleton_from_polygon_with_holes_2.h |     45 -
 .../include/CGAL/edge_aware_upsample_point_set.h   |    651 -
 3rdparty/CGAL-4.6/include/CGAL/eigen.h             |    229 -
 3rdparty/CGAL-4.6/include/CGAL/eigen_2.h           |    121 -
 3rdparty/CGAL-4.6/include/CGAL/export/CORE.h       |     73 -
 3rdparty/CGAL-4.6/include/CGAL/export/Qt4.h        |     49 -
 3rdparty/CGAL-4.6/include/CGAL/export/helpers.h    |     39 -
 .../CGAL-4.6/include/CGAL/extremal_polygon_2.h     |    752 -
 3rdparty/CGAL-4.6/include/CGAL/exude_mesh_3.h      |     78 -
 3rdparty/CGAL-4.6/include/CGAL/generators.h        |    110 -
 3rdparty/CGAL-4.6/include/CGAL/gl.h                |     32 -
 .../include/CGAL/graph_traits_Arrangement_2.h      |    606 -
 .../include/CGAL/graph_traits_Dual_Arrangement_2.h |    745 -
 3rdparty/CGAL-4.6/include/CGAL/hilbert_sort.h      |    166 -
 .../CGAL/internal/AABB_tree/AABB_drawing_traits.h  |     92 -
 .../internal/Combinatorial_map_copy_functors.h     |    413 -
 .../internal/Combinatorial_map_group_functors.h    |    973 -
 .../internal/Combinatorial_map_internal_functors.h |    951 -
 .../CGAL/internal/Combinatorial_map_sewable.h      |    331 -
 .../include/CGAL/internal/Lazy_alpha_nt_2.h        |    296 -
 .../include/CGAL/internal/Lazy_alpha_nt_3.h        |    342 -
 .../Point_inside_vertical_ray_cast.h               |    102 -
 .../Ray_3_Triangle_3_traversal_traits.h            |    220 -
 .../Operations_on_polyhedra/compute_normal.h       |     67 -
 .../include/CGAL/internal/Projection_traits_3.h    |    723 -
 .../CGAL-4.6/include/CGAL/internal/Rich_grid.h     |    514 -
 .../Static_filters/Compare_squared_radius_3.h      |    420 -
 .../Compare_weighted_squared_radius_3.h            |    393 -
 .../include/CGAL/internal/Static_filters/Equal_3.h |     91 -
 .../Static_filters/Periodic_2_orientation_2.h      |    268 -
 .../Periodic_2_side_of_oriented_circle_2.h         |    245 -
 .../CGAL/internal/Static_filters/Power_test_3.h    |    789 -
 .../internal/Static_filters/Static_filter_error.h  |    169 -
 .../CGAL/internal/Static_filters/Static_filters.h  |    300 -
 .../include/CGAL/internal/Static_filters/tools.h   |     96 -
 .../Surface_mesh_segmentation/AABB_traits.h        |     96 -
 .../Alpha_expansion_graph_cut.h                    |    686 -
 .../CGAL/internal/Surface_modeling/Weights.h       |    313 -
 .../include/CGAL/internal/auxiliary/graph.h        |   1749 -
 .../CGAL/internal/boost/array_binary_tree.hpp      |    190 -
 .../corefinement/Polyhedron_subset_extraction.h    |    256 -
 .../include/CGAL/intersection_of_Polyhedra_3.h     |   1999 -
 ...ntersection_of_Polyhedra_3_refinement_visitor.h |   2265 -
 3rdparty/CGAL-4.6/include/CGAL/iterator.h          |   2500 -
 .../CGAL-4.6/include/CGAL/jet_estimate_normals.h   |    297 -
 .../CGAL-4.6/include/CGAL/jet_smooth_point_set.h   |    277 -
 3rdparty/CGAL-4.6/include/CGAL/leda_rational.h     |    296 -
 .../include/CGAL/linear_least_squares_fitting_2.h  |     92 -
 .../include/CGAL/linear_least_squares_fitting_3.h  |     97 -
 .../CGAL/linear_least_squares_fitting_circles_2.h  |    260 -
 .../CGAL/linear_least_squares_fitting_cuboids_3.h  |    328 -
 .../CGAL/linear_least_squares_fitting_points_2.h   |    108 -
 .../CGAL/linear_least_squares_fitting_points_3.h   |    101 -
 .../linear_least_squares_fitting_rectangles_2.h    |    225 -
 .../CGAL/linear_least_squares_fitting_segments_2.h |    175 -
 .../CGAL/linear_least_squares_fitting_segments_3.h |    166 -
 .../CGAL/linear_least_squares_fitting_spheres_3.h  |    160 -
 .../linear_least_squares_fitting_tetrahedra_3.h    |    316 -
 .../linear_least_squares_fitting_triangles_2.h     |    223 -
 .../linear_least_squares_fitting_triangles_3.h     |    233 -
 .../CGAL-4.6/include/CGAL/lloyd_optimize_mesh_3.h  |     98 -
 3rdparty/CGAL-4.6/include/CGAL/make_mesh_3.h       |    437 -
 3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_2.h   |     93 -
 .../CGAL-4.6/include/CGAL/mst_orient_normals.h     |    716 -
 3rdparty/CGAL-4.6/include/CGAL/number_type_basic.h |     81 -
 .../CGAL-4.6/include/CGAL/odt_optimize_mesh_3.h    |     98 -
 3rdparty/CGAL-4.6/include/CGAL/offset_polygon_2.h  |    165 -
 .../CGAL-4.6/include/CGAL/orient_polygon_soup.h    |    406 -
 .../CGAL-4.6/include/CGAL/orient_polyhedron_3.h    |     87 -
 .../CGAL-4.6/include/CGAL/pca_estimate_normals.h   |    254 -
 3rdparty/CGAL-4.6/include/CGAL/perturb_mesh_3.h    |    123 -
 .../CGAL-4.6/include/CGAL/point_generators_2.h     |    499 -
 .../CGAL-4.6/include/CGAL/point_generators_3.h     |    200 -
 .../CGAL-4.6/include/CGAL/point_generators_d.h     |    211 -
 .../include/CGAL/polygon_soup_to_polyhedron_3.h    |     92 -
 3rdparty/CGAL-4.6/include/CGAL/primes.h            |     66 -
 3rdparty/CGAL-4.6/include/CGAL/property_map.h      |    361 -
 .../CGAL-4.6/include/CGAL/random_convex_set_2.h    |    125 -
 3rdparty/CGAL-4.6/include/CGAL/random_selection.h  |     65 -
 3rdparty/CGAL-4.6/include/CGAL/refine_mesh_3.h     |    493 -
 .../CGAL-4.6/include/CGAL/sorted_matrix_search.h   |    415 -
 3rdparty/CGAL-4.6/include/CGAL/spatial_sort.h      |    197 -
 3rdparty/CGAL-4.6/include/CGAL/sse2.h              |     36 -
 .../surface_reconstruction_points_assertions.h     |    368 -
 .../include/CGAL/transforming_pair_iterator.h      |    126 -
 .../include/CGAL/triangulate_mixed_complex_3.h     |   1324 -
 .../CGAL-4.6/include/CGAL/triangulate_polyhedron.h |    225 -
 3rdparty/CGAL-4.6/include/CGAL/tuple.h             |    240 -
 3rdparty/CGAL-4.6/include/CGAL/vector.h            |    620 -
 3rdparty/CGAL-4.6/include/CGAL/version.h           |     35 -
 .../CGAL/wlop_simplify_and_regularize_point_set.h  |    713 -
 3rdparty/CGAL-4.6/scripts/cgal_create_CMakeLists   |    709 -
 3rdparty/CGAL-4.6/scripts/cgal_create_cmake_script |    242 -
 .../CGAL-4.6/src/CGAL/Bbox_2_intersections.cpp     |    367 -
 3rdparty/CGAL-4.6/src/CGAL/Color.cpp               |     46 -
 3rdparty/CGAL-4.6/src/CGAL/File_header_OFF.cpp     |    392 -
 .../CGAL-4.6/src/CGAL/File_header_extended_OFF.cpp |    196 -
 3rdparty/CGAL-4.6/src/CGAL/File_scanner_OFF.cpp    |    125 -
 3rdparty/CGAL-4.6/src/CGAL/File_writer_OFF.cpp     |     49 -
 3rdparty/CGAL-4.6/src/CGAL/File_writer_VRML_2.cpp  |     75 -
 .../CGAL-4.6/src/CGAL/File_writer_inventor.cpp     |     64 -
 .../CGAL-4.6/src/CGAL/File_writer_wavefront.cpp    |     50 -
 3rdparty/CGAL-4.6/src/CGAL/Geomview_stream.cpp     |    571 -
 3rdparty/CGAL-4.6/src/CGAL/Interval_arithmetic.cpp |     57 -
 3rdparty/CGAL-4.6/src/CGAL/JAMA_numeric_solver.cpp |    128 -
 3rdparty/CGAL-4.6/src/CGAL/KDS_Log.cpp             |     47 -
 3rdparty/CGAL-4.6/src/CGAL/NefPolynomial.cpp       |    194 -
 3rdparty/CGAL-4.6/src/CGAL/Random.cpp              |     88 -
 3rdparty/CGAL-4.6/src/CGAL/Real_timer.cpp          |    110 -
 3rdparty/CGAL-4.6/src/CGAL/Residue_type.cpp        |     37 -
 3rdparty/CGAL-4.6/src/CGAL/Timer.cpp               |    138 -
 .../CGAL-4.6/src/CGAL/Turkowski_numeric_solver.cpp |    461 -
 3rdparty/CGAL-4.6/src/CGAL/assertions.cpp          |    222 -
 3rdparty/CGAL-4.6/src/CGAL/io.cpp                  |    125 -
 3rdparty/CGAL-4.6/src/CGAL/kernel.cpp              |     39 -
 .../CGAL-4.6/src/CGAL/numeric_solvers_support.cpp  |    267 -
 3rdparty/CGAL-4.6/src/CGAL/primes.cpp              |    294 -
 .../CGAL-4.6/src/CGAL/test_FPU_rounding_mode.cpp   |     51 -
 3rdparty/CGAL-4.6/src/CGAL_Core/BigFloat.cpp       |   1287 -
 3rdparty/CGAL-4.6/src/CGAL_Core/CMakeLists.txt     |     18 -
 3rdparty/CGAL-4.6/src/CGAL_Core/CoreAux.cpp        |    213 -
 3rdparty/CGAL-4.6/src/CGAL_Core/CoreDefs.cpp       |    155 -
 3rdparty/CGAL-4.6/src/CGAL_Core/CoreIO.cpp         |    458 -
 3rdparty/CGAL-4.6/src/CGAL_Core/Expr.cpp           |   1152 -
 3rdparty/CGAL-4.6/src/CGAL_Core/GmpIO.cpp          |    268 -
 3rdparty/CGAL-4.6/src/CGAL_Core/Real.cpp           |    276 -
 3rdparty/CGAL-4.6/src/CGAL_Core/extLong.cpp        |    195 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt  |     72 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/ImageIO.cpp     |   1586 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/Image_3.cpp     |    223 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.cpp     |    838 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.h       |     71 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.cpp         |    505 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.h           |     62 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.cpp   |    241 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.h     |     72 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.cpp     |   1225 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.h       |     77 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.cpp     |    481 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.h       |    106 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.cpp      |     41 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.h        |     29 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.cpp         |    658 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.h           |     35 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.cpp         |    718 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.h           |    138 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.cpp         |    506 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.h           |     61 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.cpp        |    491 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.h          |     34 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.cpp      |    497 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.h        |     73 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.cpp         |    630 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.h           |     43 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.cpp   |   1737 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.h     |    199 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.cpp     |    675 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.h       |    232 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.cpp    |   3126 -
 3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.h      |    284 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt      |     87 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_core.cpp |     78 -
 .../CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_timer.cpp     |     46 -
 .../src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp      |     43 -
 .../CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp  |    115 -
 .../CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake   |     18 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_faster.xpm  |     60 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pause.xpm   |     52 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pixmaps.cpp |     48 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play.xpm    |     59 -
 .../CGAL-4.6/src/CGAL_Qt3/Kinetic_play_through.xpm |     60 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_to.xpm |     63 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_print.xpm   |     44 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_reverse.xpm |     71 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_slower.xpm  |     60 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_stop.xpm    |     52 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Nef_S2.qtmoc.cmake  |      5 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_help_window.cpp  |    247 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.cpp       |    571 -
 .../CGAL-4.6/src/CGAL_Qt3/Qt_widget.qtmoc.cmake    |     26 -
 .../CGAL-4.6/src/CGAL_Qt3/Qt_widget_OpenGL.cpp     |    252 -
 .../CGAL-4.6/src/CGAL_Qt3/Qt_widget_history.cpp    |     95 -
 3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_layer.cpp |     70 -
 .../src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp    |    258 -
 .../CGAL-4.6/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp  |   2101 -
 3rdparty/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt      |     87 -
 3rdparty/CGAL-4.6/src/CGAL_Qt4/DemosMainWindow.cpp |    438 -
 .../CGAL-4.6/src/CGAL_Qt4/GraphicsView.qtmoc.cmake |      9 -
 .../src/CGAL_Qt4/GraphicsViewNavigation.cpp        |    338 -
 .../src/CGAL_Qt4/GraphicsViewPolylineInput.cpp     |    196 -
 3rdparty/CGAL-4.6/src/CGAL_Qt4/debug.cpp           |     53 -
 3rdparty/CGAL-4.6/src/CGAL_Qt4/resources.cpp       |     30 -
 3rdparty/CGAL-4.6/src/CGAL_Qt4/utility.cpp         |     54 -
 3rdparty/CGAL-4.6/src/CMakeLists.txt               |    167 -
 3rdparty/{CGAL-4.6 => CGAL-4.8}/AUTHORS            |      0
 3rdparty/CGAL-4.8/CHANGES                          |   4448 +
 3rdparty/CGAL-4.8/CMakeLists.txt                   |   1036 +
 3rdparty/CGAL-4.8/INSTALL.md                       |    211 +
 3rdparty/CGAL-4.8/LICENSE                          |     42 +
 3rdparty/{CGAL-4.6 => CGAL-4.8}/LICENSE.BSL        |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/LICENSE.FREE_USE   |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/LICENSE.GPL        |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/LICENSE.LGPL       |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/README             |      0
 3rdparty/CGAL-4.8/VERSION                          |      1 +
 .../{CGAL-4.6 => CGAL-4.8}/auxiliary/cgal_app.icns |    Bin
 .../CGAL-4.8/auxiliary/cgal_create_cmake_script.1  |     42 +
 .../auxiliary/gdb/python/CGAL/__init__.py          |      0
 .../auxiliary/gdb/python/CGAL/printers.py          |      0
 .../auxiliary/gdb/test-gdb.py                      |      0
 .../{CGAL-4.6 => CGAL-4.8}/auxiliary/gdb/test.cpp  |      0
 .../{CGAL-4.6 => CGAL-4.8}/auxiliary/gmp/README    |      0
 .../cmake/modules/CGALConfig_binary.cmake.in       |    167 +
 .../cmake/modules/CGALConfig_install.cmake.in      |    122 +
 .../CGAL-4.8/cmake/modules/CGALLibConfig.cmake.in  |     32 +
 .../cmake/modules/CGAL_CheckCXXFileRuns.cmake      |      0
 3rdparty/CGAL-4.8/cmake/modules/CGAL_Common.cmake  |     58 +
 .../CGAL_CreateSingleSourceCGALProgram.cmake       |      0
 .../modules/CGAL_GeneratorSpecificSettings.cmake   |     56 +
 .../cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake     |      0
 3rdparty/CGAL-4.8/cmake/modules/CGAL_Macros.cmake  |    724 +
 .../cmake/modules/CGAL_SCM.cmake                   |      0
 .../CGAL-4.8/cmake/modules/CGAL_SetupBoost.cmake   |     59 +
 .../cmake/modules/CGAL_SetupDependencies.cmake     |     85 +
 .../cmake/modules/CGAL_SetupFlags.cmake            |      0
 .../CGAL-4.8/cmake/modules/CGAL_SetupVLD.cmake     |     37 +
 .../cmake/modules/CGAL_TweakFindBoost.cmake        |      0
 .../cmake/modules/CGAL_UseBLAS.cmake               |      0
 .../cmake/modules/CGAL_UseLAPACK.cmake             |      0
 .../cmake/modules/CGAL_UseLEDA.cmake               |      0
 .../cmake/modules/CGAL_UseMKL.cmake                |      0
 .../cmake/modules/CGAL_UseMPFI.cmake               |      0
 .../cmake/modules/CGAL_UseRS.cmake                 |      0
 .../cmake/modules/CGAL_UseRS3.cmake                |      0
 .../cmake/modules/CGAL_UseTAUCS.cmake              |      0
 .../CGAL-4.8/cmake/modules/CGAL_VersionUtils.cmake |    228 +
 .../cmake/modules/FindBLAS.cmake                   |      0
 3rdparty/CGAL-4.8/cmake/modules/FindCGAL.cmake     |     89 +
 .../cmake/modules/FindCGAL_CORE.cmake              |      0
 .../cmake/modules/FindCORE.cmake                   |      0
 .../cmake/modules/FindESBTL.cmake                  |      0
 .../cmake/modules/FindEigen3.cmake                 |      0
 .../cmake/modules/FindF2C.cmake                    |      0
 3rdparty/CGAL-4.8/cmake/modules/FindGLEW.cmake     |    108 +
 .../cmake/modules/FindGMP.cmake                    |      0
 .../cmake/modules/FindGMPXX.cmake                  |      0
 .../cmake/modules/FindIPE.cmake                    |      0
 .../cmake/modules/FindLAPACK.cmake                 |      0
 .../cmake/modules/FindLEDA.cmake                   |      0
 .../cmake/modules/FindMKL.cmake                    |      0
 .../cmake/modules/FindMPFI.cmake                   |      0
 .../cmake/modules/FindMPFR.cmake                   |      0
 .../cmake/modules/FindNTL.cmake                    |      0
 .../cmake/modules/FindOpenGL.cmake                 |      0
 .../cmake/modules/FindOpenMesh.cmake               |      0
 .../CGAL-4.8/cmake/modules/FindQGLViewer.cmake     |     75 +
 .../cmake/modules/FindRS.cmake                     |      0
 .../cmake/modules/FindRS3.cmake                    |      0
 .../cmake/modules/FindTAUCS.cmake                  |      0
 3rdparty/CGAL-4.8/cmake/modules/FindTBB.cmake      |    433 +
 3rdparty/CGAL-4.8/cmake/modules/UseCGAL.cmake      |     60 +
 .../cmake/modules/UseESBTL.cmake                   |      0
 .../cmake/modules/UseEigen3.cmake                  |      0
 .../cmake/modules/UseOpenMesh.cmake                |      0
 .../cmake/modules/UseTBB.cmake                     |      0
 .../cmake/modules/test_MPFI.cpp                    |      0
 .../config/support/print_BOOST_version.cpp         |      0
 .../config/support/print_GCC_version.cpp           |      0
 .../config/support/print_GMP_version.cpp           |      0
 .../config/support/print_IntelCompiler_version.cpp |      0
 .../config/support/print_LEDA_version.cpp          |      0
 .../config/support/print_MPFI_version.cpp          |      0
 .../config/support/print_MPFR_version.cpp          |      0
 .../config/support/print_OPENGL_version.cpp        |      0
 .../CGAL-4.8/config/support/print_QT4_version.cpp  |     27 +
 .../config/support/print_QT_version.cpp            |      0
 .../config/support/print_ZLIB_version.cpp          |      0
 .../config/support/test_ATLAS.cpp                  |      0
 .../config/support/test_BLAS.cpp                   |      0
 .../config/support/test_BOOST.cpp                  |      0
 .../config/support/test_BOOST_PROGRAM_OPTIONS.cpp  |      0
 .../config/support/test_BOOST_THREAD.cpp           |      0
 .../config/support/test_GMP.cpp                    |      0
 .../config/support/test_GMPXX.cpp                  |      0
 .../config/support/test_LAPACK.cpp                 |      0
 .../config/support/test_LEDA.cpp                   |      0
 .../config/support/test_LEDAWIN.cpp                |      0
 .../config/support/test_LIDIA.cpp                  |      0
 .../config/support/test_MPFR.cpp                   |      0
 .../config/support/test_OPENGL.cpp                 |      0
 .../config/support/test_QT.cpp                     |      0
 .../config/support/test_X11.cpp                    |      0
 .../config/support/test_ZLIB.cpp                   |      0
 .../config/support/test_syntaxonly.cpp             |      0
 .../testfiles/CGAL_CFG_BOOST_VARIANT_SWAP_BUG.cpp  |      0
 .../testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp   |      0
 ...CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp |      0
 .../config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp     |      0
 .../config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp  |      0
 .../config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp   |      0
 .../config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp   |      0
 .../config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp   |      0
 .../config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp   |      0
 ...GAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp |      0
 .../config/testfiles/CGAL_CFG_NO_LIMITS.cpp        |      0
 .../config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp     |      0
 .../config/testfiles/CGAL_CFG_NO_STL.cpp           |      0
 .../testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp      |      0
 .../CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp   |      0
 .../CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp |      0
 ...AL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp |      0
 .../testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp |      0
 .../{CGAL-4.6 => CGAL-4.8}/config/version.h.in     |      0
 3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.cpp     |     70 +
 .../demo/AABB_tree/AABB_demo.pdf                   |    Bin
 .../demo/AABB_tree/AABB_demo.qrc                   |      0
 3rdparty/CGAL-4.8/demo/AABB_tree/CMakeLists.txt    |     94 +
 .../demo/AABB_tree/Color_ramp.h                    |      0
 3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.cpp    |    434 +
 .../demo/AABB_tree/MainWindow.h                    |      0
 .../demo/AABB_tree/MainWindow.ui                   |      0
 .../demo/AABB_tree/Refiner.h                       |      0
 3rdparty/CGAL-4.8/demo/AABB_tree/Scene.cpp         |   1339 +
 3rdparty/CGAL-4.8/demo/AABB_tree/Scene.h           |    264 +
 3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.cpp        |     65 +
 3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.h          |     31 +
 .../demo/AABB_tree/benchmarks.cpp                  |      0
 .../demo/AABB_tree/data/hand.off                   |      0
 .../demo/AABB_tree/data/knot.off                   |      0
 .../demo/AABB_tree/data/part.off                   |      0
 .../demo/AABB_tree/data/u.off                      |      0
 .../demo/AABB_tree/resources/about.html            |      0
 .../demo/AABB_tree/resources/cgal_logo.xpm         |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/AABB_tree/types.h  |      0
 .../demo/Alpha_shapes_2/Alpha_shapes_2.cpp         |    309 +
 .../demo/Alpha_shapes_2/Alpha_shapes_2.qrc         |      0
 .../demo/Alpha_shapes_2/Alpha_shapes_2.ui          |      0
 .../CGAL-4.8/demo/Alpha_shapes_2/CMakeLists.txt    |     50 +
 .../demo/Alpha_shapes_2/about_Alpha_shapes_2.html  |      0
 .../CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.cpp |     31 +
 .../demo/Alpha_shapes_3/Alpha_shape_3.qrc          |      0
 .../CGAL-4.8/demo/Alpha_shapes_3/CMakeLists.txt    |     49 +
 .../CGAL-4.8/demo/Alpha_shapes_3/MainWindow.cpp    |    112 +
 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.h |     40 +
 .../demo/Alpha_shapes_3/MainWindow.ui              |      0
 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.cpp   |    389 +
 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.h     |     76 +
 .../demo/Alpha_shapes_3/about_Alpha_shapes_3.html  |      0
 .../demo/Alpha_shapes_3/typedefs.h                 |      0
 .../demo/Apollonius_graph_2/Apollonius_graph_2.cpp |    294 +
 .../demo/Apollonius_graph_2/Apollonius_graph_2.qrc |      0
 .../demo/Apollonius_graph_2/Apollonius_graph_2.ui  |      0
 .../demo/Apollonius_graph_2/CMakeLists.txt         |     48 +
 .../about_Apollonius_graph_2.html                  |      0
 .../ArrangementCurveInputCallback.h                |      0
 .../ArrangementDemoGraphicsView.cpp                |      0
 .../ArrangementDemoGraphicsView.h                  |      0
 .../ArrangementDemoPropertiesDialog.cpp            |    241 +
 .../ArrangementDemoPropertiesDialog.h              |      0
 .../ArrangementDemoPropertiesDialog.ui             |      0
 .../ArrangementDemoTab.cpp                         |      0
 .../Arrangement_on_surface_2/ArrangementDemoTab.h  |      0
 .../ArrangementDemoWindow.cpp                      |   1255 +
 .../ArrangementDemoWindow.h                        |    145 +
 .../ArrangementDemoWindow.qrc                      |      0
 .../ArrangementDemoWindow.ui                       |      0
 .../ArrangementGraphicsItem.cpp                    |      0
 .../ArrangementGraphicsItem.h                      |   1308 +
 .../ArrangementPainterOstream.h                    |   1006 +
 .../ArrangementSegmentInputCallback.h              |      0
 .../Arrangement_on_surface_2/ArrangementTypes.h    |    324 +
 .../demo/Arrangement_on_surface_2/CMakeLists.txt   |     83 +
 .../demo/Arrangement_on_surface_2/Callback.cpp     |      0
 .../demo/Arrangement_on_surface_2/Callback.h       |      0
 .../Arrangement_on_surface_2/ColorItemEditor.cpp   |     73 +
 .../Arrangement_on_surface_2/ColorItemEditor.h     |      0
 .../demo/Arrangement_on_surface_2/Conic_reader.h   |      0
 .../Arrangement_on_surface_2/CurveGraphicsItem.h   |      0
 .../Arrangement_on_surface_2/DeleteCurveCallback.h |      0
 .../Arrangement_on_surface_2/DeleteCurveMode.cpp   |      0
 .../Arrangement_on_surface_2/DeleteCurveMode.h     |      0
 .../DeleteCurveModeItemEditor.cpp                  |     49 +
 .../DeleteCurveModeItemEditor.h                    |      0
 .../Arrangement_on_surface_2/EnvelopeCallback.cpp  |      0
 .../Arrangement_on_surface_2/EnvelopeCallback.h    |      0
 .../Arrangement_on_surface_2/FillFaceCallback.cpp  |      0
 .../Arrangement_on_surface_2/FillFaceCallback.h    |      0
 .../GraphicsViewCurveInput.cpp                     |      0
 .../GraphicsViewCurveInput.h                       |      0
 .../GraphicsViewSegmentInput.cpp                   |      0
 .../GraphicsViewSegmentInput.h                     |      0
 .../demo/Arrangement_on_surface_2/ISnappable.h     |      0
 .../Arrangement_on_surface_2/MergeEdgeCallback.h   |      0
 .../demo/Arrangement_on_surface_2/NewTabDialog.cpp |      0
 .../demo/Arrangement_on_surface_2/NewTabDialog.h   |      0
 .../demo/Arrangement_on_surface_2/NewTabDialog.ui  |      0
 .../Arrangement_on_surface_2/OverlayDialog.cpp     |    307 +
 .../demo/Arrangement_on_surface_2/OverlayDialog.h  |      0
 .../demo/Arrangement_on_surface_2/OverlayDialog.ui |      0
 .../PointLocationCallback.h                        |      0
 .../PointsGraphicsItem.cpp                         |      0
 .../Arrangement_on_surface_2/PointsGraphicsItem.h  |      0
 .../PropertyValueDelegate.cpp                      |    163 +
 .../PropertyValueDelegate.h                        |     58 +
 .../Arrangement_on_surface_2/SplitEdgeCallback.cpp |      0
 .../Arrangement_on_surface_2/SplitEdgeCallback.h   |      0
 .../demo/Arrangement_on_surface_2/Utils.cpp        |      0
 .../CGAL-4.8/demo/Arrangement_on_surface_2/Utils.h |   1627 +
 .../VerticalRayGraphicsItem.cpp                    |      0
 .../VerticalRayGraphicsItem.h                      |      0
 .../VerticalRayShootCallback.cpp                   |      0
 .../VerticalRayShootCallback.h                     |      0
 .../Arrangement_on_surface_2/arrangement_2.cpp     |      0
 .../data/algebraic/alg_circle.arr                  |      0
 .../data/algebraic/cubic.arr                       |      0
 .../data/algebraic/erdos_lemiscate.arr             |      0
 .../data/algebraic/infinitesimal.arr               |      0
 .../data/algebraic/trifolium.arr                   |      0
 .../data/conic/big_circ_arcs.arr                   |      0
 .../data/conic/big_circ_arcs.dat                   |      0
 .../data/conic/circles_21.dat                      |      0
 .../data/polyline/ps_circs.dat                     |      0
 .../data/polyline/random_polylines_10_20.dat       |      0
 .../data/polyline/sines.dat                        |      0
 .../data/segment/fork0505_mc.seg.rand.dat          |      0
 .../data/segment/non_degenerate_100_x.dat          |      0
 .../data/segment/onebig_100.dat                    |      0
 .../data/segment/onebig_100_x.dat                  |      0
 .../data/segment/onebig_250_x.dat                  |      0
 .../data/segment/polygon_100.dat                   |      0
 .../data/segment/random_segments_100.dat           |      0
 .../data/segment/random_segments_100_x.dat         |      0
 .../data/segment/random_segments_500_x.dat         |      0
 .../data/segment/tilt_grid_200.dat                 |      0
 .../data/segment/world.seg.cut.rand.dat            |      0
 .../demo/Arrangement_on_surface_2/help/about.html  |      0
 .../demo/Arrangement_on_surface_2/help/index.html  |      0
 .../Arrangement_on_surface_2/icons/blue_icon.xpm   |      0
 .../demo/Arrangement_on_surface_2/icons/conic.xpm  |      0
 .../Arrangement_on_surface_2/icons/conic_types.xpm |      0
 .../demo/Arrangement_on_surface_2/icons/delete.xpm |      0
 .../icons/demo_arrow_down.xpm                      |      0
 .../icons/demo_arrow_up.xpm                        |      0
 .../Arrangement_on_surface_2/icons/demo_colors.xpm |      0
 .../icons/demo_conic_3points.xpm                   |      0
 .../icons/demo_conic_5points.xpm                   |      0
 .../icons/demo_conic_circle.xpm                    |      0
 .../icons/demo_conic_ellipse.xpm                   |      0
 .../icons/demo_conic_line.xpm                      |      0
 .../icons/demo_conic_ray.xpm                       |      0
 .../icons/demo_conic_segment.xpm                   |      0
 .../Arrangement_on_surface_2/icons/demo_delete.bmp |    Bin
 .../Arrangement_on_surface_2/icons/demo_delete.xpm |      0
 .../Arrangement_on_surface_2/icons/demo_fill.xpm   |      0
 .../Arrangement_on_surface_2/icons/demo_insert.bmp |    Bin
 .../Arrangement_on_surface_2/icons/demo_insert.xpm |      0
 .../Arrangement_on_surface_2/icons/demo_merge.bmp  |    Bin
 .../Arrangement_on_surface_2/icons/demo_merge.xpm  |      0
 .../icons/demo_pointlocation.bmp                   |    Bin
 .../icons/demo_pointlocation.xpm                   |      0
 .../icons/demo_rayshoot.bmp                        |    Bin
 .../icons/demo_rayshoot.xpm                        |      0
 .../icons/demo_rayshoot_down.xpm                   |      0
 .../icons/demo_rayshoot_up.xpm                     |      0
 .../icons/demo_snapgrid.bmp                        |    Bin
 .../icons/demo_snapgrid.xpm                        |      0
 .../icons/demo_snapvertex.bmp                      |    Bin
 .../icons/demo_snapvertex.xpm                      |      0
 .../Arrangement_on_surface_2/icons/demo_split.bmp  |    Bin
 .../Arrangement_on_surface_2/icons/demo_split.xpm  |      0
 .../Arrangement_on_surface_2/icons/demo_zoomin.bmp |    Bin
 .../Arrangement_on_surface_2/icons/demo_zoomin.xpm |      0
 .../icons/demo_zoomout.bmp                         |    Bin
 .../icons/demo_zoomout.xpm                         |      0
 .../demo/Arrangement_on_surface_2/icons/draw.xpm   |      0
 .../Arrangement_on_surface_2/icons/green_icon.xpm  |      0
 .../demo/Arrangement_on_surface_2/icons/grid.xpm   |      0
 .../demo/Arrangement_on_surface_2/icons/hand.xpm   |      0
 .../demo/Arrangement_on_surface_2/icons/insert.xpm |      0
 .../icons/lower_env_xpm.bmp                        |    Bin
 .../icons/lower_env_xpm.xpm                        |      0
 .../demo/Arrangement_on_surface_2/icons/merge.xpm  |      0
 .../demo/Arrangement_on_surface_2/icons/none.xpm   |      0
 .../demo/Arrangement_on_surface_2/icons/po.xpm     |      0
 .../demo/Arrangement_on_surface_2/icons/points.xpm |      0
 .../Arrangement_on_surface_2/icons/polyline.xpm    |      0
 .../icons/ray_shooting.xpm                         |      0
 .../icons/ray_shooting2.xpm                        |      0
 .../Arrangement_on_surface_2/icons/red_icon.xpm    |      0
 .../demo/Arrangement_on_surface_2/icons/snap.xpm   |      0
 .../demo/Arrangement_on_surface_2/icons/split.xpm  |      0
 .../icons/upper_env_xpm.bmp                        |    Bin
 .../icons/upper_env_xpm.xpm                        |      0
 .../Arrangement_on_surface_2/icons/voronoi.xpm     |      0
 .../Arrangement_on_surface_2/icons/yellow_icon.xpm |      0
 .../Arrangement_on_surface_2/tests/CMakeLists.txt  |      0
 .../demo/Arrangement_on_surface_2/tests/Test.cpp   |      0
 .../tests/TestAlgebraic.cpp                        |      0
 .../Arrangement_on_surface_2/tests/TestRayPL.cpp   |      0
 .../demo/Bounding_volumes/Bounding_volumes.cpp     |    550 +
 .../demo/Bounding_volumes/Bounding_volumes.qrc     |      0
 .../demo/Bounding_volumes/Bounding_volumes.ui      |      0
 .../CGAL-4.8/demo/Bounding_volumes/CMakeLists.txt  |     53 +
 .../demo/Bounding_volumes/Ellipse.h                |      0
 .../Bounding_volumes/about_Bounding_volumes.html   |      0
 .../demo/Bounding_volumes/icons/convex_hull.png    |    Bin
 .../demo/Bounding_volumes/icons/min_circle.pdf     |    Bin
 .../demo/Bounding_volumes/icons/min_circle.png     |    Bin
 .../demo/Bounding_volumes/icons/min_ellipse.png    |    Bin
 .../Bounding_volumes/icons/min_parallelogram.png   |    Bin
 .../Bounding_volumes/icons/min_quadrilateral.png   |    Bin
 .../demo/Bounding_volumes/icons/p_center.png       |    Bin
 3rdparty/CGAL-4.8/demo/CGAL_ipelets/CMakeLists.txt |    151 +
 .../demo/CGAL_ipelets/alpha_shapes.cpp             |      0
 .../demo/CGAL_ipelets/arrangement.cpp              |      0
 .../demo/CGAL_ipelets/bbox_restriction.cpp         |      0
 .../demo/CGAL_ipelets/circle_pencils.cpp           |      0
 .../demo/CGAL_ipelets/diagrams.cpp                 |      0
 3rdparty/CGAL-4.8/demo/CGAL_ipelets/distance.cpp   |    104 +
 .../demo/CGAL_ipelets/generator.cpp                |      0
 .../demo/CGAL_ipelets/hilbert_sort.cpp             |      0
 .../demo/CGAL_ipelets/hull.cpp                     |      0
 3rdparty/CGAL-4.8/demo/CGAL_ipelets/hyperbolic.cpp |    241 +
 .../CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h |      0
 .../CGAL_ipelets/include/CGAL_ipelets/pencils.h    |      0
 .../demo/CGAL_ipelets/lua/libCGAL_alpha_shapes.lua |      0
 .../demo/CGAL_ipelets/lua/libCGAL_arrangement.lua  |      0
 .../CGAL_ipelets/lua/libCGAL_bbox_restriction.lua  |      0
 .../CGAL_ipelets/lua/libCGAL_circle_pencils.lua    |      0
 .../demo/CGAL_ipelets/lua/libCGAL_diagrams.lua     |      0
 .../demo/CGAL_ipelets/lua/libCGAL_distance.lua     |      0
 .../demo/CGAL_ipelets/lua/libCGAL_generator.lua    |      0
 .../demo/CGAL_ipelets/lua/libCGAL_hilbert_sort.lua |      0
 .../demo/CGAL_ipelets/lua/libCGAL_hull.lua         |      0
 .../demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua   |      0
 .../demo/CGAL_ipelets/lua/libCGAL_mesh_2.lua       |      0
 .../demo/CGAL_ipelets/lua/libCGAL_minkowski.lua    |      0
 .../CGAL_ipelets/lua/libCGAL_multi_delaunay.lua    |      0
 .../CGAL_ipelets/lua/libCGAL_multi_regular.lua     |      0
 .../demo/CGAL_ipelets/lua/libCGAL_partition.lua    |      0
 .../demo/CGAL_ipelets/lua/libCGAL_pca.lua          |      0
 .../lua/libCGAL_simple_triangulation.lua           |      0
 .../demo/CGAL_ipelets/lua/libCGAL_skeleton.lua     |      0
 .../demo/CGAL_ipelets/lua/libCGAL_svdlinf.lua      |     25 +
 .../CGAL_ipelets/lua/libCGAL_triangulation.lua     |      0
 .../demo/CGAL_ipelets/mesh_2.cpp                   |      0
 .../demo/CGAL_ipelets/minkowski.cpp                |      0
 .../demo/CGAL_ipelets/multi_delaunay.cpp           |      0
 .../demo/CGAL_ipelets/multi_regular.cpp            |      0
 .../demo/CGAL_ipelets/partition.cpp                |      0
 .../demo/CGAL_ipelets/pca.cpp                      |      0
 .../demo/CGAL_ipelets/simple_triangulation.cpp     |      0
 .../demo/CGAL_ipelets/skeleton.cpp                 |      0
 3rdparty/CGAL-4.8/demo/CGAL_ipelets/svdlinf.cpp    |    127 +
 .../demo/CGAL_ipelets/triangulation.cpp            |      0
 3rdparty/CGAL-4.8/demo/CMakeLists.txt              |     42 +
 .../demo/Circular_kernel_2/ArcsGraphicsItem.h      |      0
 .../CGAL-4.8/demo/Circular_kernel_2/CMakeLists.txt |     53 +
 .../demo/Circular_kernel_2/Circular_kernel_2.cpp   |    296 +
 .../demo/Circular_kernel_2/Circular_kernel_2.qrc   |      0
 .../demo/Circular_kernel_2/Circular_kernel_2.ui    |      0
 .../Circular_kernel_2/about_Circular_kernel_2.html |      0
 .../demo/Circular_kernel_2/arcs.arc                |      0
 .../demo/Circular_kernel_2/data/circle_grid.cgal   |      0
 .../demo/Circular_kernel_2/data/circles_21.cgal    |      0
 .../CGAL-4.8/demo/Circular_kernel_3/CMakeLists.txt |     36 +
 .../demo/Circular_kernel_3/Circular_kernel_3.cpp   |     22 +
 .../CGAL-4.8/demo/Circular_kernel_3/Viewer.cpp     |    911 +
 3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.h  |     57 +
 .../CGAL-4.8/demo/Convex_hull_3/CMakeLists.txt     |     27 +
 .../demo/Convex_hull_3/README                      |      0
 .../demo/Convex_hull_3/quickhull_3_demo.cpp        |      0
 3rdparty/CGAL-4.8/demo/Generator/CMakeLists.txt    |     50 +
 3rdparty/CGAL-4.8/demo/Generator/Generator_2.cpp   |    349 +
 .../demo/Generator/Generator_2.qrc                 |      0
 .../demo/Generator/Generator_2.ui                  |      0
 .../demo/Generator/about_Generator_2.html          |      0
 3rdparty/CGAL-4.8/demo/Geomview/CMakeLists.txt     |     29 +
 .../{CGAL-4.6 => CGAL-4.8}/demo/Geomview/README    |      0
 .../demo/Geomview/data/points3                     |      0
 .../demo/Geomview/gv_terrain.cpp                   |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/Geomview/input.cpp |      0
 .../demo/Geomview/kernel.cpp                       |      0
 3rdparty/CGAL-4.8/demo/GraphicsView/CMakeLists.txt |     35 +
 3rdparty/CGAL-4.8/demo/GraphicsView/min.cpp        |     31 +
 .../CGAL-4.8/demo/Interpolation/CMakeLists.txt     |     30 +
 .../demo/Interpolation/README                      |      0
 .../demo/Interpolation/interpolation_2_demo.cpp    |      0
 .../demo/Interpolation/surface_voronoi.cpp         |      0
 .../demo/L1_Voronoi_diagram_2/CMakeLists.txt       |     52 +
 .../L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp  |    396 +
 .../L1_Voronoi_diagram_2/L1_voronoi_diagram_2.qrc  |      0
 .../L1_Voronoi_diagram_2/L1_voronoi_diagram_2.ui   |      0
 .../about_L1_voronoi_diagram_2.html                |      0
 .../include/CGAL/L1_voronoi_traits_2.h             |    343 +
 .../include/CGAL/Qt/ArrangementGraphicsItem.h      |      0
 .../include/CGAL/Qt/ArrangementPointInput.h        |     78 +
 .../include/CGAL/Qt/SetGraphicsItem.h              |      0
 .../demo/Largest_empty_rect_2/CMakeLists.txt       |     51 +
 .../Largest_empty_rectangle_2.cpp                  |    293 +
 .../Largest_empty_rectangle_2.qrc                  |      0
 .../Largest_empty_rectangle_2.ui                   |      0
 .../about_Largest_empty_rectangle_2.html           |      0
 .../demo/Linear_cell_complex/CMakeLists.txt        |     78 +
 .../demo/Linear_cell_complex/CreateMenger.ui       |      0
 .../demo/Linear_cell_complex/CreateMesh.ui         |      0
 .../Linear_cell_complex/CreateSierpinskiCarpet.ui  |      0
 .../CreateSierpinskiTriangle.ui                    |      0
 .../Linear_cell_complex/Linear_cell_complex_3.qrc  |      0
 .../Linear_cell_complex_3_demo.cpp                 |     53 +
 .../Linear_cell_complex_3_subdivision.cpp          |    202 +
 .../Linear_cell_complex_pqq_subdivision.cpp        |    327 +
 .../demo/Linear_cell_complex/MainWindow.cpp        |   3405 +
 .../CGAL-4.8/demo/Linear_cell_complex/MainWindow.h |    278 +
 .../demo/Linear_cell_complex/MainWindow.ui         |    266 +
 .../CGAL-4.8/demo/Linear_cell_complex/Viewer.cpp   |    810 +
 .../CGAL-4.8/demo/Linear_cell_complex/Viewer.h     |    104 +
 .../about_Linear_cell_complex_3.html               |      0
 .../demo/Linear_cell_complex/import_moka.h         |    192 +
 .../CGAL-4.8/demo/Linear_cell_complex/typedefs.h   |    205 +
 3rdparty/CGAL-4.8/demo/Mesh_2/CMakeLists.txt       |     34 +
 3rdparty/CGAL-4.8/demo/Mesh_2/README.txt           |      5 +
 .../{CGAL-4.6 => CGAL-4.8}/demo/Mesh_2/conform.cpp |      0
 .../demo/Mesh_2/data/butterfly.edg                 |      0
 .../demo/Mesh_2/data/clusters.edg                  |      0
 .../demo/Mesh_2/data/clusters.poly                 |      0
 .../demo/Mesh_2/data/clusters2.edg                 |      0
 .../demo/Mesh_2/data/fish.edg                      |      0
 .../demo/Mesh_2/data/fish.poly                     |      0
 .../demo/Mesh_2/data/img1.edg                      |      0
 .../demo/Mesh_2/data/img2.edg                      |      0
 .../demo/Mesh_2/data/img3.edg                      |      0
 .../demo/Mesh_2/data/img4.edg                      |      0
 .../demo/Mesh_2/data/img5.edg                      |      0
 .../demo/Mesh_2/data/img6.edg                      |      0
 .../demo/Mesh_2/data/img7.edg                      |      0
 .../demo/Mesh_2/data/img8.edg                      |      0
 .../demo/Mesh_2/data/lettre_A.edg                  |      0
 .../demo/Mesh_2/data/lettre_A_2.edg                |      0
 .../demo/Mesh_2/data/trivial.poly                  |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/Mesh_2/mesh.cpp    |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/C3t3_type.h          |     64 +
 3rdparty/CGAL-4.8/demo/Mesh_3/CMakeLists.txt       |    393 +
 .../demo/Mesh_3/Color_ramp.cpp                     |      0
 .../demo/Mesh_3/Color_ramp.h                       |      0
 .../demo/Mesh_3/Image_type.h                       |      0
 .../demo/Mesh_3/Image_type_fwd.h                   |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/Io_c3t3_plugin.cpp   |     67 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Io_image_plugin.cpp  |     90 +
 .../demo/Mesh_3/Io_implicit_function_plugin.cpp    |    202 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Io_off_plugin.cpp    |     93 +
 3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.cpp       |    604 +
 3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.h         |    106 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.cpp           |     47 +
 .../{CGAL-4.6 => CGAL-4.8}/demo/Mesh_3/Mesh_3.qrc  |      0
 .../demo/Mesh_3/Mesh_3_optimization_plugin.cpp     |    620 +
 .../Mesh_3_optimization_plugin_cgal_code.cpp       |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin.cpp    |    431 +
 .../demo/Mesh_3/Mesh_3_plugin_image_cgal_code.cpp  |      0
 .../Mesh_3_plugin_implicit_function_cgal_code.cpp  |      0
 .../Mesh_3/Mesh_3_plugin_polyhedron_cgal_code.cpp  |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_function.h      |    265 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.cpp   |     88 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.h     |     96 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.cpp |     81 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.h   |    101 +
 .../demo/Mesh_3/Polyhedron_type.h                  |      0
 .../demo/Mesh_3/Polyhedron_type_fwd.h              |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.cpp  |   1031 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.h    |    174 +
 .../CGAL-4.8/demo/Mesh_3/Scene_c3t3_item_config.h  |     14 +
 .../demo/Mesh_3/Scene_implicit_function_item.cpp   |    585 +
 .../demo/Mesh_3/Scene_implicit_function_item.h     |    127 +
 .../Mesh_3/Scene_implicit_function_item_config.h   |      0
 .../CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.cpp    |    726 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.h |     81 +
 .../demo/Mesh_3/Scene_polygon_soup_config.h        |      0
 .../CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp |    465 +
 .../CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.h   |     85 +
 .../demo/Mesh_3/Scene_polyhedron_item_config.h     |      0
 .../demo/Mesh_3/Scene_segmented_image_item.cpp     |    917 +
 .../demo/Mesh_3/Scene_segmented_image_item.h       |     83 +
 .../Mesh_3/Scene_segmented_image_item_config.h     |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/Mesh_3/StdAfx.cpp  |      0
 3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.h             |    344 +
 3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane.h       |    445 +
 .../CGAL-4.8/demo/Mesh_3/Volume_plane_interface.h  |     51 +
 .../demo/Mesh_3/Volume_plane_intersection.cpp      |    200 +
 .../demo/Mesh_3/Volume_plane_intersection.h        |     77 +
 .../CGAL-4.8/demo/Mesh_3/Volume_plane_thread.h     |    128 +
 .../CGAL-4.8/demo/Mesh_3/Volume_planes_plugin.cpp  |    389 +
 .../demo/Mesh_3/concurrent_mesher_config.cfg       |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/Mesh_3/config.h    |      0
 .../demo/Mesh_3/implicit_functions/CMakeLists.txt  |     75 +
 .../Implicit_function_interface.h                  |      0
 .../implicit_functions/Klein_implicit_function.cpp |     55 +
 .../Sphere_implicit_function.cpp                   |     53 +
 .../Tanglecube_implicit_function.cpp               |     55 +
 .../Mesh_3/include/CGAL_demo/Io_plugin_interface.h |     27 +
 .../Mesh_3/include/CGAL_demo/Messages_interface.h  |      0
 .../demo/Mesh_3/include/CGAL_demo/Plugin_helper.h  |      0
 .../Mesh_3/include/CGAL_demo/Plugin_interface.h    |      0
 .../CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h |    138 +
 .../include/CGAL_demo/Scene_draw_interface.h       |     13 +
 .../Mesh_3/include/CGAL_demo/Scene_interface.h     |      0
 .../demo/Mesh_3/include/CGAL_demo/Scene_item.h     |     99 +
 .../Mesh_3/include/CGAL_demo/Scene_item_config.h   |      0
 .../demo/Mesh_3/include/CGAL_demo/Viewer.h         |     50 +
 .../demo/Mesh_3/include/CGAL_demo/Viewer_config.h  |      0
 .../demo/Mesh_3/resources/about.html               |      0
 .../demo/Mesh_3/resources/cgal_logo.xpm            |      0
 .../demo/Mesh_3/resources/check-off.png            |    Bin
 .../demo/Mesh_3/resources/check-off.svg            |      0
 .../demo/Mesh_3/resources/check-on.png             |    Bin
 .../demo/Mesh_3/resources/check.svg                |      0
 .../demo/Mesh_3/resources/editcopy.png             |    Bin
 .../demo/Mesh_3/resources/minus.png                |    Bin
 .../demo/Mesh_3/resources/plus.png                 |    Bin
 .../demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp    |    111 +
 .../CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp   |    588 +
 .../demo/Mesh_3/src/CGAL_demo/Scene_item.cpp       |     31 +
 .../CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp  |    169 +
 .../demo/Mesh_3/ui_files/Function_dialog.ui        |      0
 .../demo/Mesh_3/ui_files/Image_res_dialog.ui       |      0
 .../demo/Mesh_3/ui_files/LocalOptim_dialog.ui      |      0
 .../demo/Mesh_3/ui_files/MainWindow.ui             |      0
 .../demo/Mesh_3/ui_files/Meshing_dialog.ui         |      0
 .../demo/Mesh_3/ui_files/Rib_dialog.ui             |      0
 .../demo/Mesh_3/ui_files/Smoother_dialog.ui        |      0
 .../CMakeLists.txt                                 |    116 +
 .../Otr2_demo.cpp                                  |     12 +
 .../Otr2_kerneled.h                                |    153 +
 .../data/blob00.xy                                 |    320 +
 .../data/maple_leaf_embroidery.bmp                 |    Bin 0 -> 58726 bytes
 .../data/round_rect00.xy                           |    288 +
 .../data/skyline_noisy00.xy                        |    430 +
 .../data/stair-noise00.xy                          |    160 +
 .../dialog_options.h                               |     77 +
 .../glviewer.cpp                                   |    170 +
 .../glviewer.h                                     |    111 +
 .../icons/Voronoi_diagram_2.png                    |    Bin
 .../icons/fileNew.png                              |    Bin
 .../icons/fileOpen.png                             |    Bin
 .../icons/fileSave.png                             |    Bin
 .../icons/fit-page-32.png                          |    Bin
 .../icons/inputPoint.png                           |    Bin
 .../icons/snapshot.png                             |    Bin 0 -> 9179 bytes
 .../icons/triangulation.png                        |    Bin
 .../icons/until.png                                |    Bin 0 -> 1380 bytes
 .../icons/vertex.png                               |    Bin 0 -> 360 bytes
 .../options.ui                                     |    236 +
 .../pwsrec.qrc                                     |     14 +
 .../pwsrec.ui                                      |    612 +
 .../random.h                                       |     26 +
 .../render.cpp                                     |    892 +
 .../scene.h                                        |    908 +
 .../window.cpp                                     |    642 +
 .../window.h                                       |    119 +
 .../demo/Periodic_2_triangulation_2/CMakeLists.txt |     61 +
 .../Periodic_2_Delaunay_triangulation_2.cpp        |    458 +
 .../Periodic_2_triangulation_2.qrc                 |      0
 .../Periodic_2_triangulation_2.ui                  |      0
 .../TriangulationCircumcircle.h                    |      0
 .../TriangulationConflictZone.h                    |    164 +
 .../TriangulationMovingPoint.h                     |    149 +
 .../TriangulationPointInputAndConflictZone.h       |    124 +
 .../TriangulationRemoveVertex.h                    |     79 +
 .../about_Periodic_2_triangulation_2.html          |      0
 .../icons/circumcenter.pdf                         |      0
 .../icons/circumcenter.png                         |    Bin
 .../icons/conflict_zone.pdf                        |    Bin
 .../icons/conflict_zone.png                        |    Bin
 .../icons/constrained_triangulation.pdf            |    Bin
 .../icons/constrained_triangulation.png            |    Bin
 .../constrained_triangulation_show_constraints.pdf |    Bin
 .../constrained_triangulation_show_constraints.png |    Bin
 .../constrained_triangulation_show_in_domain.pdf   |    Bin
 .../constrained_triangulation_show_in_domain.png   |    Bin
 .../icons/fit-page-32.png                          |    Bin
 .../icons/inputPoint.png                           |    Bin
 .../icons/moving_point.pdf                         |    Bin
 .../icons/moving_point.png                         |    Bin
 .../icons/triangulation.pdf                        |    Bin
 .../icons/triangulation.png                        |    Bin
 .../CGAL/Qt/PeriodicTriangulationGraphicsItem.h    |    403 +
 .../include/CGAL/Qt/PeriodicVoronoiGraphicsItem.h  |      0
 .../demo/Periodic_3_triangulation_3/CMakeLists.txt |    102 +
 .../demo/Periodic_3_triangulation_3/MainWindow.h   |    163 +
 .../demo/Periodic_3_triangulation_3/MainWindow.ui  |    611 +
 .../Periodic_3_triangulation_3.qhcp                |      0
 .../Periodic_3_triangulation_3.qhp                 |      0
 .../Periodic_3_triangulation_3.qrc                 |      0
 .../demo/Periodic_3_triangulation_3/Scene.cpp      |   2267 +
 .../demo/Periodic_3_triangulation_3/Scene.h        |    329 +
 .../demo/Periodic_3_triangulation_3/Scene_utils.h  |    151 +
 .../demo/Periodic_3_triangulation_3/Viewer.cpp     |      8 +
 .../demo/Periodic_3_triangulation_3/Viewer.h       |     13 +
 .../demo/Periodic_3_triangulation_3/data/oneH.xyz  |      0
 .../demo/Periodic_3_triangulation_3/data/oneK.xyz  |      0
 .../demo/Periodic_3_triangulation_3/data/points    |      0
 .../documentation/images/mainwindow.png            |    Bin
 .../documentation/index.html                       |      0
 .../documentation/introduction.html                |      0
 .../documentation/menu.html                        |      0
 .../demo/Periodic_3_triangulation_3/icons/ball.png |    Bin
 .../Periodic_3_triangulation_3/icons/camera.png    |    Bin
 .../Periodic_3_triangulation_3/icons/clipping.png  |    Bin
 .../icons/clippingOff.png                          |    Bin
 .../Periodic_3_triangulation_3/icons/conflict.png  |    Bin
 .../Periodic_3_triangulation_3/icons/cover1.png    |    Bin
 .../Periodic_3_triangulation_3/icons/cover27.png   |    Bin
 .../Periodic_3_triangulation_3}/icons/fileOpen.png |    Bin
 .../Periodic_3_triangulation_3/icons/init0.png     |    Bin
 .../Periodic_3_triangulation_3/icons/init1.png     |    Bin
 .../Periodic_3_triangulation_3/icons/initGrid.png  |    Bin
 .../Periodic_3_triangulation_3/icons/initRand.png  |    Bin
 .../icons/initRandPlanar.png                       |    Bin
 .../icons/inputPointBall.png                       |    Bin
 .../icons/inputPointRandom.png                     |    Bin
 .../Periodic_3_triangulation_3/icons/license.txt   |      0
 .../Periodic_3_triangulation_3/icons/locate.png    |    Bin
 .../Periodic_3_triangulation_3/icons/multiple.png  |    Bin
 .../icons/multipleOff.png                          |    Bin
 .../Periodic_3_triangulation_3/icons/pause.png     |    Bin
 .../Periodic_3_triangulation_3/icons/planar.png    |    Bin
 .../demo/Periodic_3_triangulation_3/icons/play.png |    Bin
 .../icons/twoColorClipping.png                     |    Bin
 .../Periodic_3_triangulation_3/icons/wireframe.png |    Bin
 .../icons/wireframeOff.png                         |    Bin
 .../periodic_3_triangulation_3_demo.cpp            |     18 +
 .../resources/about.html                           |      0
 .../resources/about_CGAL.html                      |      0
 .../CGAL-4.8/demo/Periodic_Lloyd_3/CMakeLists.txt  |     90 +
 .../CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.cpp  |    227 +
 .../CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.h    |     53 +
 .../demo/Periodic_Lloyd_3/MainWindow.ui            |      0
 .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp     |     26 +
 .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhcp    |      0
 .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhp     |      0
 .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc     |      0
 .../demo/Periodic_Lloyd_3/Scene.h                  |      0
 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.cpp |    319 +
 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.h   |     79 +
 .../demo/Periodic_Lloyd_3/about_CGAL.html          |      0
 .../Periodic_Lloyd_3/about_Periodic_Lloyd_3.html   |      0
 .../documentation/images/mainwindow.png            |    Bin
 .../demo/Periodic_Lloyd_3/documentation/index.html |      0
 .../documentation/introduction.html                |      0
 .../demo/Periodic_Lloyd_3/documentation/menu.html  |      0
 .../demo/Periodic_Lloyd_3/icons/cp8.png            |    Bin
 .../demo/Periodic_Lloyd_3}/icons/fileNew.png       |    Bin
 .../demo/Periodic_Lloyd_3}/icons/fileOpen.png      |    Bin
 .../demo/Periodic_Lloyd_3}/icons/fileSave.png      |    Bin
 .../demo/Periodic_Lloyd_3/icons/pause.png          |    Bin
 .../demo/Periodic_Lloyd_3/icons/planar.png         |    Bin
 .../demo/Periodic_Lloyd_3/icons/play.png           |    Bin
 .../demo/Periodic_Lloyd_3/icons/step.png           |    Bin
 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/typedefs.h |     69 +
 3rdparty/CGAL-4.8/demo/Polygon/CMakeLists.txt      |     59 +
 3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.cpp       |    582 +
 .../demo/Polygon/Polygon_2.qrc                     |      0
 .../demo/Polygon/Polygon_2.ui                      |      0
 .../demo/Polygon/about_Polygon_2.html              |      0
 .../demo/Polygon/unweighted_polygon.poly           |      0
 .../demo/Polygon/weighted_polygon.wsl              |      0
 .../demo/Polyhedron/C2t3_type.h                    |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/C3t3_type.h      |     79 +
 .../Polyhedron/CGAL_polyhedron_demoConfig.cmake.in |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/CMakeLists.txt   |    382 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Color_map.h      |     27 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.cpp   |    127 +
 .../demo/Polyhedron/Color_ramp.h                   |      0
 .../CGAL-4.8/demo/Polyhedron/FileLoaderDialog.ui   |    121 +
 .../demo/Polyhedron/File_loader_dialog.h           |      0
 .../demo/Polyhedron/GlSplat/CMakeLists.txt         |     35 +
 .../CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp   |    521 +
 .../CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.h     |    158 +
 .../demo/Polyhedron/GlSplat/GlSplat_config.h       |      0
 .../CGAL-4.8/demo/Polyhedron/GlSplat/Shader.cpp    |    140 +
 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.h |    139 +
 .../Polyhedron/GlSplat/cmake/FindQGLViewer.cmake   |      0
 .../demo/Polyhedron/GlSplat/demo.cpp               |      0
 .../demo/Polyhedron/GlSplat/glsplat.qrc            |      0
 .../Polyhedron/GlSplat/shaders/Finalization.glsl   |    106 +
 .../Polyhedron/GlSplat/shaders/Raycasting.glsl     |      0
 .../demo/Polyhedron}/Image_type.h                  |      0
 .../demo/Polyhedron}/Image_type_fwd.h              |      0
 .../demo/Polyhedron/Kernel_type.h                  |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.cpp   |   1871 +
 3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.h     |    386 +
 3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.ui    |    691 +
 .../CGAL-4.8/demo/Polyhedron/MainWindow_config.h   |     16 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Mainpage.md      |    240 +
 .../demo/Polyhedron/Messages_interface.h           |      0
 .../demo/Polyhedron/Nef_type.h                     |      0
 .../demo/Polyhedron/Nef_type_fwd.h                 |      0
 .../demo/Polyhedron/One_ring_iterators.h           |      0
 .../Polyhedron/Plugins/AABB_tree/CMakeLists.txt    |      4 +
 .../Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp    |    495 +
 .../Plugins/Camera_position/CMakeLists.txt         |      9 +
 .../Camera_position/Camera_positions_list.cpp      |    278 +
 .../Camera_position/Camera_positions_list.h        |     46 +
 .../Camera_position/Camera_positions_list.ui       |    223 +
 .../Camera_position/Camera_positions_plugin.cpp    |     52 +
 .../Plugins/Convex_decomposition/CMakeLists.txt    |      4 +
 .../Plugins/Convex_decomposition/Nef_plugin.cpp    |    312 +
 .../Polyhedron/Plugins/Convex_hull/CMakeLists.txt  |      6 +
 .../Plugins/Convex_hull/Convex_hull_plugin.cpp     |    133 +
 .../Plugins/Convex_hull/Kernel_plugin.cpp          |    137 +
 .../Polyhedron/Plugins/IO/Add_point_set_dialog.ui  |     85 +
 .../Polyhedron/Plugins/IO/Add_polylines_dialog.ui  |     91 +
 .../demo/Polyhedron/Plugins/IO/CMakeLists.txt      |     57 +
 .../demo/Polyhedron/Plugins/IO}/Function_dialog.ui |      0
 .../demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp |    109 +
 .../Plugins/IO/Implicit_function_io_plugin.cpp     |    213 +
 .../demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp   |     79 +
 .../demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp   |    141 +
 .../Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp |     57 +
 .../Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp |     85 +
 .../Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp |     73 +
 .../Polyhedron/Plugins/IO/Polylines_io_plugin.cpp  |    272 +
 .../demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp   |     92 +
 .../Polyhedron/Plugins/IO/Selection_io_plugin.cpp  |     42 +
 .../demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp   |    396 +
 .../demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp   |    223 +
 .../demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt  |      8 +
 .../Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp    |    437 +
 .../Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui     |    231 +
 .../Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp   |    424 +
 .../demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt  |     32 +
 .../Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp   |    124 +
 .../Plugins/Mesh_3/Facet_extra_criterion.h         |    124 +
 .../Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui  |    105 +
 .../Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp  |    136 +
 .../Plugins/Mesh_3/Io_implicit_function_plugin.cpp |    213 +
 .../Plugins/Mesh_3/Local_optimizers_dialog.ui}     |      0
 .../Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp    |    449 +
 .../Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp     |    168 +
 .../Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h       |     55 +
 .../demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h |    274 +
 .../Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui    |    440 +
 .../Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp   |     88 +
 .../Polyhedron/Plugins/Mesh_3/Meshing_thread.h     |     96 +
 .../Plugins/Mesh_3/Optimization_plugin.cpp         |    630 +
 .../Mesh_3/Optimization_plugin_cgal_code.cpp       |    770 +
 .../Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp |     79 +
 .../Polyhedron/Plugins/Mesh_3/Optimizer_thread.h   |    101 +
 .../Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h |    266 +
 .../Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp |     28 +
 .../Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h   |     19 +
 .../Polyhedron/Plugins/Mesh_3}/Smoother_dialog.ui  |      0
 .../demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h  |    458 +
 .../Plugins/Mesh_3/Volume_plane_interface.h        |     52 +
 .../Plugins/Mesh_3/Volume_plane_intersection.cpp   |    200 +
 .../Plugins/Mesh_3/Volume_plane_intersection.h     |     78 +
 .../Plugins/Mesh_3/Volume_plane_thread.h           |    128 +
 .../Plugins/Mesh_3/Volume_planes_plugin.cpp        |    390 +
 .../demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h |    124 +
 .../demo/Polyhedron/Plugins/Mesh_3/raw_image.ui    |    454 +
 .../Plugins/Operations_on_polyhedra/CMakeLists.txt |      8 +
 .../Clip_polyhedron_plugin.cpp                     |    232 +
 .../Clip_polyhedron_plugin.ui                      |     90 +
 .../Corefinement_plugin.cpp                        |    181 +
 .../Intersection_plugin.cpp                        |    220 +
 .../Scene_combinatorial_map_item.cpp               |    522 +
 .../Scene_combinatorial_map_item.h                 |    117 +
 .../Scene_combinatorial_map_item_config.h          |      0
 .../demo/Polyhedron/Plugins/PCA/CMakeLists.txt     |     11 +
 .../Plugins/PCA/Create_bbox_mesh_plugin.cpp        |    156 +
 .../demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp     |    232 +
 .../PCA/Scene_polyhedron_transform_item.cpp        |    124 +
 .../Plugins/PCA/Scene_polyhedron_transform_item.h  |     61 +
 .../Plugins/PCA/Transform_polyhedron_plugin.cpp    |    143 +
 .../demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp |    199 +
 .../demo/Polyhedron/Plugins/PMP/CMakeLists.txt     |     77 +
 .../demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp |    135 +
 .../demo/Polyhedron/Plugins/PMP/Fairing_widget.ui  |    144 +
 .../Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp |    702 +
 .../Plugins/PMP/Hole_filling_polyline_plugin.cpp   |    170 +
 .../Polyhedron/Plugins/PMP/Hole_filling_widget.ui  |    314 +
 .../Polyhedron/Plugins/PMP/Inside_out_plugin.cpp   |     83 +
 .../Plugins/PMP/Isotropic_remeshing_dialog.ui      |    250 +
 .../Plugins/PMP/Isotropic_remeshing_plugin.cpp     |    733 +
 .../Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp  |    142 +
 .../PMP/Join_and_split_polyhedra_plugin.cpp        |    176 +
 .../PMP/Mean_curvature_flow_skeleton_plugin.cpp    |    920 +
 .../PMP/Mean_curvature_flow_skeleton_plugin.ui     |    174 +
 .../Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp  |    172 +
 .../Plugins/PMP/Point_inside_polyhedron_plugin.cpp |    257 +
 .../Plugins/PMP/Point_inside_polyhedron_widget.ui  |     95 +
 .../Plugins/PMP/Polyhedron_slicer_plugin.cpp       |    348 +
 .../Plugins/PMP/Polyhedron_slicer_widget.ui        |    136 +
 .../Plugins/PMP/Polyhedron_stitching_plugin.cpp    |    167 +
 .../Plugins/PMP/Repair_polyhedron_plugin.cpp       |    115 +
 .../Polyhedron/Plugins/PMP/Selection_plugin.cpp    |    418 +
 .../Polyhedron/Plugins/PMP/Selection_widget.ui     |    369 +
 .../Plugins/PMP/Self_intersection_plugin.cpp       |    101 +
 .../Plugins/PMP/Triangulate_facets_plugin.cpp      |    144 +
 .../Polyhedron/Plugins/Point_set/CMakeLists.txt    |     61 +
 .../Point_set/Features_detection_plugin.cpp        |    115 +
 .../Plugins/Point_set/Features_detection_plugin.ui |    133 +
 .../Plugins/Point_set/Merge_point_sets_plugin.cpp  |     91 +
 .../Point_set/Point_set_average_spacing_plugin.cpp |    117 +
 .../Point_set_bilateral_smoothing_plugin.cpp       |    128 +
 .../Point_set_bilateral_smoothing_plugin.ui        |    130 +
 .../Point_set_normal_estimation_plugin.cpp         |    288 +
 .../Point_set_normal_estimation_plugin.ui          |    415 +
 .../Point_set_outliers_removal_plugin.cpp          |    116 +
 .../Point_set/Point_set_outliers_removal_plugin.ui |    109 +
 .../Point_set/Point_set_selection_plugin.cpp       |    509 +
 .../Point_set/Point_set_selection_widget.ui        |    151 +
 .../Point_set/Point_set_shape_detection_plugin.cpp |    307 +
 .../Point_set/Point_set_shape_detection_plugin.ui  |    261 +
 .../Point_set/Point_set_simplification_plugin.cpp  |    201 +
 .../Point_set/Point_set_simplification_plugin.ui   |    204 +
 .../Point_set/Point_set_smoothing_plugin.cpp       |     97 +
 .../Point_set/Point_set_upsampling_plugin.cpp      |    146 +
 .../Point_set/Point_set_upsampling_plugin.ui       |    156 +
 .../Plugins/Point_set/Point_set_wlop_plugin.cpp    |    128 +
 .../Plugins/Point_set/Point_set_wlop_plugin.ui     |    122 +
 .../Point_set/Surface_reconstruction_plugin.cpp    |    873 +
 .../Point_set/Surface_reconstruction_plugin.ui     |    483 +
 .../Surface_reconstruction_plugin_impl.cpp         |    245 +
 .../Plugins/Subdivision_methods/CMakeLists.txt     |      5 +
 .../Subdivision_methods_plugin.cpp                 |    125 +
 .../Polyhedron/Plugins/Surface_mesh/CMakeLists.txt |     25 +
 .../Surface_mesh/Mesh_segmentation_plugin.cpp      |    349 +
 .../Surface_mesh}/Mesh_segmentation_widget.ui      |      0
 .../Surface_mesh/Mesh_simplification_plugin.cpp    |     97 +
 .../Plugins/Surface_mesh/Mesher_base.cpp           |      2 +
 .../Polyhedron/Plugins/Surface_mesh/Mesher_base.h  |     27 +
 .../Surface_mesh/Parameterization_plugin.cpp       |    193 +
 .../Plugins/Surface_mesh}/Remeshing_dialog.ui      |      0
 .../Plugins/Surface_mesh/Remeshing_plugin.cpp      |    142 +
 .../Surface_mesh/Remeshing_plugin_cgal_code.cpp    |    366 +
 .../Scene_polyhedron_shortest_path_item.cpp        |    531 +
 .../Scene_polyhedron_shortest_path_item.h          |    159 +
 .../Plugins/Surface_mesh/Shortest_path_plugin.cpp  |    311 +
 .../Plugins/Surface_mesh/Shortest_path_widget.ui   |     71 +
 .../Surface_mesh_deformation/CMakeLists.txt        |      7 +
 .../Surface_mesh_deformation/Deform_mesh.ui        |    423 +
 .../Edit_polyhedron_plugin.cpp                     |    418 +
 .../Scene_edit_polyhedron_item.cpp                 |    973 +
 .../Scene_edit_polyhedron_item.h                   |    777 +
 .../Scene_edit_polyhedron_item_config.h            |      0
 .../demo/Polyhedron/Point_dialog_config.h          |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.cpp |     13 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.qrc |     42 +
 .../CGAL-4.8/demo/Polyhedron/Polyhedron_demo.cpp   |    126 +
 .../CGAL-4.8/demo/Polyhedron/Polyhedron_demo.h     |     42 +
 .../demo/Polyhedron/Polyhedron_demo_config.h       |     10 +
 .../Polyhedron_demo_detect_sharp_edges.h           |     32 +
 .../Polyhedron/Polyhedron_demo_plugin_helper.cpp   |    132 +
 .../CGAL-4.8/demo/Polyhedron/Polyhedron_type.h     |    202 +
 .../CGAL-4.8/demo/Polyhedron/Polyhedron_type_fwd.h |     64 +
 .../demo/Polyhedron/Preferences.ui                 |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/Scene.cpp        |   1251 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Scene.h          |    325 +
 .../demo/Polyhedron/Scene_basic_objects_config.h   |      0
 .../CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.cpp   |      2 +
 .../CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.h     |    112 +
 .../demo/Polyhedron/Scene_c2t3_item_config.h       |      0
 .../CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.cpp   |   1280 +
 .../CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.h     |    263 +
 .../demo/Polyhedron/Scene_c3t3_item_config.h       |     14 +
 .../demo/Polyhedron/Scene_config.h                 |      0
 .../Polyhedron/Scene_edit_polyhedron_item_config.h |      0
 .../CGAL-4.8/demo/Polyhedron/Scene_find_items.h    |    121 +
 .../CGAL-4.8/demo/Polyhedron/Scene_group_item.cpp  |    116 +
 .../Polyhedron/Scene_implicit_function_item.cpp    |    593 +
 .../demo/Polyhedron/Scene_implicit_function_item.h |    130 +
 .../Scene_implicit_function_item_config.h          |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_item.cpp   |    165 +
 .../demo/Polyhedron/Scene_nef_polyhedron_item.cpp  |    678 +
 .../demo/Polyhedron/Scene_nef_polyhedron_item.h    |    112 +
 .../Polyhedron/Scene_nef_polyhedron_item_config.h  |      0
 .../CGAL-4.8/demo/Polyhedron/Scene_plane_item.cpp  |    130 +
 .../CGAL-4.8/demo/Polyhedron/Scene_plane_item.h    |    182 +
 .../Polyhedron/Scene_points_with_normal_item.cpp   |    598 +
 .../Polyhedron/Scene_points_with_normal_item.h     |    128 +
 .../Scene_points_with_normal_item_config.h         |      0
 .../demo/Polyhedron/Scene_polygon_soup_item.cpp    |    710 +
 .../demo/Polyhedron/Scene_polygon_soup_item.h      |    202 +
 .../Polyhedron/Scene_polygon_soup_item_config.h    |      0
 .../demo/Polyhedron/Scene_polyhedron_item.cpp      |   1278 +
 .../demo/Polyhedron/Scene_polyhedron_item.h        |    186 +
 .../demo/Polyhedron/Scene_polyhedron_item_config.h |      0
 .../Polyhedron/Scene_polyhedron_item_decorator.cpp |    102 +
 .../Polyhedron/Scene_polyhedron_item_decorator.h   |     65 +
 .../Scene_polyhedron_item_decorator_config.h       |      0
 .../Scene_polyhedron_item_k_ring_selection.cpp     |      1 +
 .../Scene_polyhedron_item_k_ring_selection.h       |    236 +
 ...Scene_polyhedron_item_k_ring_selection_config.h |      0
 .../Polyhedron/Scene_polyhedron_selection_item.cpp |    233 +
 .../Polyhedron/Scene_polyhedron_selection_item.h   |    926 +
 .../Scene_polyhedron_selection_item_config.h       |      0
 .../Scene_polyhedron_shortest_path_item_config.h   |     10 +
 .../Scene_polyhedron_transform_item_config.h       |      0
 .../demo/Polyhedron/Scene_polylines_item.cpp       |    682 +
 .../demo/Polyhedron/Scene_polylines_item.h         |    135 +
 .../demo/Polyhedron/Scene_polylines_item_config.h  |      0
 .../demo/Polyhedron/Scene_segmented_image_item.cpp |    862 +
 .../demo/Polyhedron/Scene_segmented_image_item.h   |     89 +
 .../Scene_segmented_image_item_config.h            |      0
 .../Polyhedron/Scene_textured_polyhedron_item.cpp  |    365 +
 .../Polyhedron/Scene_textured_polyhedron_item.h    |     88 +
 .../Scene_textured_polyhedron_item_config.h        |      0
 .../CGAL-4.8/demo/Polyhedron/Show_point_dialog.cpp |     90 +
 .../CGAL-4.8/demo/Polyhedron/Show_point_dialog.h   |     35 +
 .../demo/Polyhedron/Show_point_dialog.ui           |      0
 .../demo/Polyhedron/Statistics_on_item_dialog.ui   |    103 +
 .../demo/Polyhedron/Textured_polyhedron_type.h     |      0
 .../demo/Polyhedron/Textured_polyhedron_type_fwd.h |      0
 .../demo/Polyhedron/Travel_isolated_components.h   |      0
 .../demo/Polyhedron/UseCGAL_polyhedron_demo.cmake  |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.cpp       |   1164 +
 3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.h         |    138 +
 .../demo/Polyhedron}/concurrent_mesher_config.cfg  |      0
 .../demo/Polyhedron/config.h                       |      0
 3rdparty/CGAL-4.8/demo/Polyhedron/create_sphere.h  |    360 +
 .../demo/Polyhedron/data/anchor.off                |      0
 .../demo/Polyhedron/data/bones.off                 |      0
 .../demo/Polyhedron/data/couplingdown.off          |      0
 .../demo/Polyhedron/data/cow.off                   |      0
 .../demo/Polyhedron/data/cross.off                 |      0
 .../demo/Polyhedron/data/cube-ouvert.off           |      0
 .../demo/Polyhedron/data/cube-shuffled.off         |     47 +
 .../demo/Polyhedron/data/cube.off                  |      0
 .../demo/Polyhedron/data/cube4-shuffled.off        |     41 +
 .../demo/Polyhedron/data/dragknob.off              |      0
 .../demo/Polyhedron/data/elephant.off              |      0
 .../demo/Polyhedron/data/ellipsoid.off             |      0
 .../demo/Polyhedron/data/handle.off                |      0
 .../demo/Polyhedron/data/icosahedron.off           |      0
 .../demo/Polyhedron/data/joint.off                 |      0
 .../demo/Polyhedron/data/knot1.off                 |      0
 .../demo/Polyhedron/data/knot2.off                 |      0
 .../demo/Polyhedron/data/man.off                   |      0
 .../demo/Polyhedron/data/mushroom.off              |      0
 .../demo/Polyhedron/data/negative.off              |      0
 .../demo/Polyhedron/data/oblong-shuffled.off       |   1291 +
 .../demo/Polyhedron/data/oblong.off                |      0
 .../demo/Polyhedron/data/pinion.off                |      0
 .../demo/Polyhedron/data/pipe.off                  |      0
 .../demo/Polyhedron/data/pyramid.off               |      0
 .../demo/Polyhedron/data/rotor.off                 |      0
 .../demo/Polyhedron/data/sphere.off                |      0
 .../demo/Polyhedron/data/spool.off                 |      0
 .../demo/Polyhedron/data/star.off                  |      0
 .../demo/Polyhedron/data/translated-cube.off       |      0
 .../demo/Polyhedron/data/tripod.off                |      0
 .../Polyhedron/implicit_functions/CMakeLists.txt   |     78 +
 .../Implicit_function_interface.h                  |     58 +
 .../implicit_functions/Klein_implicit_function.cpp |     54 +
 .../Sphere_implicit_function.cpp                   |     54 +
 .../Tanglecube_implicit_function.cpp               |     56 +
 .../demo/Polyhedron/include/CGAL/Dualizer.h        |      0
 .../demo/Polyhedron/include/CGAL/Make_bar.h        |      0
 .../demo/Polyhedron/include/CGAL/Make_quad_soup.h  |      0
 .../Polyhedron/include/CGAL/Make_triangle_soup.h   |      0
 .../Polyhedron/include/CGAL/Polyhedron_kernel.h    |      0
 .../include/CGAL/Textured_polyhedron_builder.h     |      0
 .../include/CGAL/Triangulation_file_input.h        |    103 +
 .../demo/Polyhedron/include/CGAL/gocad_io.h        |      0
 .../Polyhedron/include/CGAL/statistics_helpers.h   |    141 +
 .../Polyhedron/include/CGAL/textured_polyhedron.h  |    252 +
 .../demo/Polyhedron/include/CGAL/translate.h       |      0
 .../CGAL-4.8/demo/Polyhedron/include/Point_set_3.h |    323 +
 .../CGAL-4.8/demo/Polyhedron/include/UI_point_3.h  |    124 +
 3rdparty/CGAL-4.8/demo/Polyhedron/opengl_tools.h   |     64 +
 .../demo/Polyhedron/polyhedron_demo_macros.cmake   |     45 +
 .../demo/Polyhedron/resources/about.html           |      0
 .../CGAL-4.8/demo/Polyhedron/resources/back.png    |    Bin 0 -> 383 bytes
 .../demo/Polyhedron/resources/boolean-diff.png     |    Bin
 .../Polyhedron/resources/boolean-intersection.png  |    Bin
 .../demo/Polyhedron/resources/boolean-union.png    |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/bot.png     |    Bin 0 -> 440 bytes
 .../demo/Polyhedron/resources/cgal_logo.xpm        |      0
 .../demo/Polyhedron/resources/check-off.png        |    Bin
 .../demo/Polyhedron/resources/check-off.svg        |      0
 .../demo/Polyhedron/resources/check-on.png         |    Bin
 .../demo/Polyhedron/resources/check.svg            |      0
 .../demo/Polyhedron/resources/convex-hull.png      |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/down.png    |    Bin 0 -> 258 bytes
 .../demo/Polyhedron/resources/editcopy.png         |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/front.png   |    Bin 0 -> 489 bytes
 .../demo/Polyhedron/resources/kernel.png           |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/left.png    |    Bin 0 -> 399 bytes
 .../demo/Polyhedron/resources/minus.png            |    Bin
 .../demo/Polyhedron/resources/plus.png             |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/right.png   |    Bin 0 -> 427 bytes
 .../demo/Polyhedron/resources/shader_c3t3.f        |     41 +
 .../demo/Polyhedron/resources/shader_c3t3.v        |     21 +
 .../demo/Polyhedron/resources/shader_c3t3_edges.f  |      9 +
 .../demo/Polyhedron/resources/shader_c3t3_edges.v  |     19 +
 .../demo/Polyhedron/resources/shader_instanced.v   |     19 +
 .../resources/shader_no_light_no_selection.f       |      6 +
 .../Polyhedron/resources/shader_plane_two_faces.f  |     17 +
 .../demo/Polyhedron/resources/shader_with_light.f  |     36 +
 .../demo/Polyhedron/resources/shader_with_light.v  |     16 +
 .../Polyhedron/resources/shader_with_texture.f     |      9 +
 .../Polyhedron/resources/shader_with_texture.v     |     34 +
 .../resources/shader_with_textured_edges.f         |      9 +
 .../resources/shader_with_textured_edges.v         |     14 +
 .../Polyhedron/resources/shader_without_light.f    |     10 +
 .../Polyhedron/resources/shader_without_light.v    |     12 +
 .../demo/Polyhedron/resources/simplification.png   |    Bin
 .../CGAL-4.8/demo/Polyhedron/resources/top.png     |    Bin 0 -> 473 bytes
 3rdparty/CGAL-4.8/demo/Polyhedron/resources/up.png |    Bin 0 -> 264 bytes
 3rdparty/CGAL-4.8/demo/Polyhedron/texture.cpp      |   1100 +
 .../demo/Polyhedron/texture.h                      |      0
 .../CGAL-4.8/demo/Polyhedron_IO/CMakeLists.txt     |     28 +
 .../demo/Polyhedron_IO/README                      |      0
 .../demo/Polyhedron_IO/geomview_demo.cpp           |      0
 .../demo/Polyhedron_IO/viewpoint2off.cpp           |      0
 .../demo/Polyline_simplification_2/CMakeLists.txt  |     51 +
 .../Polyline_simplification_2.cpp                  |    553 +
 .../Polyline_simplification_2.qrc                  |      0
 .../Polyline_simplification_2.ui                   |      0
 .../about_Polyline_simplification_2.html           |     10 +
 .../data/all_crossed.poly                          |      0
 .../demo/Polyline_simplification_2/data/bee.poly   |      0
 .../Polyline_simplification_2/data/letter_G.poly   |      0
 .../Polyline_simplification_2/data/letter_P.poly   |      0
 .../Polyline_simplification_2/data/letter_T.poly   |      0
 .../Polyline_simplification_2/data/letter_c.poly   |      0
 .../Polyline_simplification_2/data/letter_d.poly   |      0
 .../Polyline_simplification_2/data/letter_q.poly   |      0
 .../Polyline_simplification_2/data/letter_u.poly   |      0
 .../Polyline_simplification_2/data/letters_cd.poly |      0
 .../demo/Polyline_simplification_2/data/map_1.poly |      0
 .../demo/Polyline_simplification_2/data/map_2.poly |      0
 .../demo/Polyline_simplification_2/data/map_3.poly |      0
 .../demo/Polyline_simplification_2/data/maps.poly  |      0
 .../Polyline_simplification_2/data/norway.poly     |      0
 .../icons/triangulation.pdf                        |    Bin
 .../icons/triangulation.png                        |    Bin
 .../Qt/Polyline_simplification_2_graphics_item.h   |      0
 .../CGAL/Qt/TriangulationArrangementGraphicsItem.h |      0
 .../Principal_component_analysis/CMakeLists.txt    |     87 +
 .../Principal_component_analysis/MainWindow.cpp    |    211 +
 .../demo/Principal_component_analysis/MainWindow.h |      0
 .../Principal_component_analysis/MainWindow.ui     |      0
 .../demo/Principal_component_analysis/PCA_demo.cpp |     64 +
 .../demo/Principal_component_analysis/PCA_demo.qrc |      0
 .../demo/Principal_component_analysis/Scene.cpp    |      0
 .../demo/Principal_component_analysis/Scene.h      |      0
 .../demo/Principal_component_analysis/Viewer.cpp   |     30 +
 .../demo/Principal_component_analysis/Viewer.h     |      0
 .../Principal_component_analysis/data/cylinder.off |      0
 .../data/cylinder_locally_refined.off              |      0
 .../data/ellipsoid.off                             |      0
 .../Principal_component_analysis}/render_edges.h   |      0
 .../resources/about.html                           |      0
 .../resources/cgal_logo.xpm                        |      0
 .../demo/Principal_component_analysis/types.h      |      0
 .../demo/Segment_Delaunay_graph_2/CMakeLists.txt   |     59 +
 .../Segment_Delaunay_graph_2/Segment_voronoi_2.cpp |    354 +
 .../Segment_Delaunay_graph_2/Segment_voronoi_2.qrc |      0
 .../Segment_Delaunay_graph_2/Segment_voronoi_2.ui  |    243 +
 .../about_Segment_voronoi_2.html                   |     10 +
 .../icons/circumcenter.pdf                         |      0
 .../icons/circumcenter.png                         |    Bin
 .../icons/conflict_zone.pdf                        |    Bin
 .../icons/conflict_zone.png                        |    Bin
 .../icons/constrained_triangulation.pdf            |    Bin
 .../icons/constrained_triangulation.png            |    Bin
 .../constrained_triangulation_show_constraints.pdf |    Bin
 .../constrained_triangulation_show_constraints.png |    Bin
 .../constrained_triangulation_show_in_domain.pdf   |    Bin
 .../constrained_triangulation_show_in_domain.png   |    Bin
 .../icons/moving_point.pdf                         |    Bin
 .../icons/moving_point.png                         |    Bin
 .../icons/triangulation.pdf                        |    Bin
 .../icons/triangulation.png                        |    Bin
 .../include/CGAL/Constraints_loader.h              |      0
 .../demo/Segment_Delaunay_graph_2/svd-typedefs.h   |      0
 .../Segment_Delaunay_graph_Linf_2/CMakeLists.txt   |     59 +
 .../Segment_voronoi_2.qrc                          |      0
 .../Segment_voronoi_2.ui                           |    243 +
 .../Segment_voronoi_linf_2.cpp                     |    445 +
 .../about_Segment_voronoi_2.html                   |     10 +
 .../icons/circumcenter.pdf                         |      0
 .../icons/circumcenter.png                         |    Bin
 .../icons/conflict_zone.pdf                        |    Bin
 .../icons/conflict_zone.png                        |    Bin
 .../icons/constrained_triangulation.pdf            |    Bin
 .../icons/constrained_triangulation.png            |    Bin
 .../constrained_triangulation_show_constraints.pdf |    Bin
 .../constrained_triangulation_show_constraints.png |    Bin
 .../constrained_triangulation_show_in_domain.pdf   |    Bin
 .../constrained_triangulation_show_in_domain.png   |    Bin
 .../icons/moving_point.pdf                         |    Bin
 .../icons/moving_point.png                         |    Bin
 .../icons/triangulation.pdf                        |    Bin
 .../icons/triangulation.png                        |    Bin
 .../include/CGAL/Constraints_loader.h              |      0
 .../Segment_Delaunay_graph_Linf_2/svd-typedefs.h   |     56 +
 .../CGAL-4.8/demo/Snap_rounding_2/CMakeLists.txt   |     50 +
 .../demo/Snap_rounding_2/Snap_rounding_2.cpp       |    318 +
 .../demo/Snap_rounding_2/Snap_rounding_2.qrc       |      0
 .../demo/Snap_rounding_2/Snap_rounding_2.ui        |      0
 .../Snap_rounding_2/about_Snap_rounding_2.html     |      0
 .../demo/Snap_rounding_2/icons/grid.png            |    Bin
 .../demo/Snap_rounding_2/icons/snapped.png         |    Bin
 .../demo/Snap_rounding_2/icons/unsnapped.png       |    Bin
 .../demo/Spatial_searching_2/CMakeLists.txt        |     52 +
 .../demo/Spatial_searching_2/NearestNeighbor.h     |      0
 .../Spatial_searching_2/Spatial_searching_2.cpp    |    302 +
 .../Spatial_searching_2/Spatial_searching_2.qrc    |      0
 .../Spatial_searching_2/Spatial_searching_2.ui     |      0
 .../about_Spatial_searching_2.html                 |      0
 .../CGAL-4.8/demo/Stream_lines_2/CMakeLists.txt    |     51 +
 .../demo/Stream_lines_2/Stream_lines_2.cpp         |    251 +
 .../demo/Stream_lines_2/Stream_lines_2.qrc         |      0
 .../demo/Stream_lines_2/Stream_lines_2.ui          |      0
 .../demo/Stream_lines_2/about_Stream_lines_2.html  |      0
 .../demo/Stream_lines_2/data/vnoise.vec.cin        |      0
 .../demo/Surface_mesh_deformation/CMakeLists.txt   |     34 +
 .../deform_mesh_for_botsch08_format.cpp            |     96 +
 .../CGAL-4.8/demo/Surface_mesher/CMakeLists.txt    |    128 +
 .../demo/Surface_mesher/File_XT.h                  |      0
 .../demo/Surface_mesher/Raw_image_dialog.cpp       |     28 +
 .../demo/Surface_mesher/Raw_image_dialog.h         |     19 +
 .../demo/Surface_mesher/Surface_mesher.cpp         |     22 +
 .../CGAL-4.8/demo/Surface_mesher/binary_image.h    |    197 +
 .../demo/Surface_mesher/colorlisteditor.cpp        |     67 +
 .../demo/Surface_mesher/colorlisteditor.h          |      0
 .../demo/Surface_mesher/get_polyhedral_surface.h   |      0
 .../demo/Surface_mesher/icons/bbox-red.png         |    Bin
 .../demo/Surface_mesher/icons/bbox-red.svg         |      0
 .../demo/Surface_mesher/icons/bbox.png             |    Bin
 .../demo/Surface_mesher/icons/bbox.svg             |      0
 .../demo/Surface_mesher/icons/cgal_logo.xpm        |      0
 .../demo/Surface_mesher/icons/fileopen.png         |    Bin
 .../demo/Surface_mesher/icons/filesave.png         |    Bin
 .../demo/Surface_mesher/icons/flip.png             |    Bin
 .../demo/Surface_mesher/icons/flip.svg             |      0
 .../demo/Surface_mesher/icons/minus.png            |    Bin
 .../demo/Surface_mesher/icons/plus.png             |    Bin
 .../demo/Surface_mesher/icons/resize.png           |    Bin
 .../demo/Surface_mesher/icons/resize.svg           |      0
 .../demo/Surface_mesher/icons/surface.png          |    Bin
 .../demo/Surface_mesher/icons/surface.svg          |      0
 .../demo/Surface_mesher/icons/twosides.png         |    Bin
 .../demo/Surface_mesher/icons/twosides.svg         |      0
 .../CGAL-4.8/demo/Surface_mesher/mainwindow.cpp    |    179 +
 3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.h |     39 +
 .../demo/Surface_mesher/polyhedral_surface.cpp     |    494 +
 .../demo/Surface_mesher/polyhedral_surface.h       |    103 +
 3rdparty/CGAL-4.8/demo/Surface_mesher/surface.h    |     37 +
 .../demo/Surface_mesher/surface_mesher.qrc         |      0
 .../CGAL-4.8/demo/Surface_mesher/ui/mainwindow.ui  |    808 +
 .../demo/Surface_mesher/ui/optionsdialog.ui        |    128 +
 .../CGAL-4.8/demo/Surface_mesher/ui/raw_image.ui   |    454 +
 .../demo/Surface_mesher/ui/values_list.ui          |      0
 .../CGAL-4.8/demo/Surface_mesher/values_list.cpp   |    272 +
 .../CGAL-4.8/demo/Surface_mesher/values_list.h     |     79 +
 .../demo/Surface_mesher/values_list.qrc            |      0
 3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.cpp   |     68 +
 3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.h     |     29 +
 3rdparty/CGAL-4.8/demo/Surface_mesher/volume.cpp   |   1550 +
 3rdparty/CGAL-4.8/demo/Surface_mesher/volume.h     |    384 +
 3rdparty/CGAL-4.8/demo/Three/CMakeLists.txt        |     25 +
 .../demo/Three/Example_plugin/CMakeLists.txt       |     41 +
 .../Polyhedron_demo_example_plugin.cpp             |    312 +
 .../Polyhedron_demo_example_plugin.ui              |    156 +
 .../demo/Three/Example_plugin/dock_example.ui      |    156 +
 .../CGAL-4.8/demo/Triangulation_2/CMakeLists.txt   |    106 +
 .../Constrained_Delaunay_triangulation_2.cpp       |    871 +
 .../Constrained_Delaunay_triangulation_2.qrc       |      0
 .../Constrained_Delaunay_triangulation_2.ui        |    407 +
 .../demo/Triangulation_2/DelaunayMeshInsertSeeds.h |     79 +
 .../Triangulation_2/Delaunay_triangulation_2.cpp   |    400 +
 .../Triangulation_2/Delaunay_triangulation_2.qrc   |      0
 .../Triangulation_2/Delaunay_triangulation_2.ui    |      0
 .../RegularTriangulationRemoveVertex.h             |     80 +
 .../Triangulation_2/Regular_triangulation_2.cpp    |    312 +
 .../Triangulation_2/Regular_triangulation_2.qrc    |      0
 .../Triangulation_2/Regular_triangulation_2.ui     |      0
 .../Triangulation_2/TriangulationCircumcircle.h    |      0
 .../Triangulation_2/TriangulationConflictZone.h    |      0
 .../Triangulation_2/TriangulationMovingPoint.h     |    147 +
 .../TriangulationPointInputAndConflictZone.h       |    121 +
 .../Triangulation_2/TriangulationRemoveVertex.h    |     81 +
 ...about_Constrained_Delaunay_triangulation_2.html |      0
 .../about_Delaunay_triangulation_2.html            |      0
 .../about_Regular_triangulation_2.html             |      0
 .../demo/Triangulation_2/data/butterfly            |      0
 .../demo/Triangulation_2/data/butterfly.edg        |      0
 .../demo/Triangulation_2/data/clusters.edg         |      0
 .../demo/Triangulation_2/data/clusters.poly        |      0
 .../demo/Triangulation_2/data/clusters2.edg        |      0
 .../demo/Triangulation_2/data/fish                 |      0
 .../demo/Triangulation_2/data/fish.edg             |      0
 .../demo/Triangulation_2/data/fish.poly            |      0
 .../demo/Triangulation_2/data/img1.edg             |      0
 .../demo/Triangulation_2/data/img2.edg             |      0
 .../demo/Triangulation_2/data/img3.edg             |      0
 .../demo/Triangulation_2/data/img4.edg             |      0
 .../demo/Triangulation_2/data/img5.edg             |      0
 .../demo/Triangulation_2/data/img6.edg             |      0
 .../demo/Triangulation_2/data/img7.edg             |      0
 .../demo/Triangulation_2/data/img8.edg             |      0
 .../demo/Triangulation_2/data/lettre_A.edg         |      0
 .../demo/Triangulation_2/data/lettre_A_2.edg       |      0
 .../demo/Triangulation_2/data/norway.edg           |      0
 .../demo/Triangulation_2/data/poisson              |      0
 .../demo/Triangulation_2/data/tr                   |      0
 .../demo/Triangulation_2/data/triangulation.cgal   |      0
 .../demo/Triangulation_2/data/trivial.poly         |      0
 .../demo/Triangulation_2}/icons/circumcenter.pdf   |      0
 .../demo/Triangulation_2}/icons/circumcenter.png   |    Bin
 .../demo/Triangulation_2}/icons/conflict_zone.pdf  |    Bin
 .../demo/Triangulation_2}/icons/conflict_zone.png  |    Bin
 .../icons/constrained_triangulation.pdf            |    Bin
 .../icons/constrained_triangulation.png            |    Bin
 .../constrained_triangulation_show_constraints.pdf |    Bin
 .../constrained_triangulation_show_constraints.png |    Bin
 .../constrained_triangulation_show_in_domain.pdf   |    Bin
 .../constrained_triangulation_show_in_domain.png   |    Bin
 .../demo/Triangulation_2}/icons/moving_point.pdf   |    Bin
 .../demo/Triangulation_2}/icons/moving_point.png   |    Bin
 .../demo/Triangulation_2}/icons/triangulation.pdf  |    Bin
 .../demo/Triangulation_2}/icons/triangulation.png  |    Bin
 .../CGAL/Lipschitz_sizing_field_criteria_2.h       |    204 +
 .../CGAL-4.8/demo/Triangulation_3/CMakeLists.txt   |     99 +
 .../CGAL-4.8/demo/Triangulation_3/MainWindow.cpp   |    245 +
 .../CGAL-4.8/demo/Triangulation_3/MainWindow.h     |     55 +
 .../demo/Triangulation_3/MainWindow.ui             |      0
 .../demo/Triangulation_3/PreferenceDlg.cpp         |    398 +
 .../CGAL-4.8/demo/Triangulation_3/PreferenceDlg.h  |     84 +
 .../demo/Triangulation_3/Scene.cpp                 |      0
 .../demo/Triangulation_3/Scene.h                   |      0
 3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.cpp |     42 +
 .../demo/Triangulation_3/T3_demo.qrc               |      0
 3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.cpp  |   2925 +
 3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.h    |    402 +
 .../demo/Triangulation_3/documentation/about.html  |      0
 .../Triangulation_3/documentation/about_CGAL.html  |      0
 .../demo/Triangulation_3/icons/about_CGAL.html     |      0
 .../demo/Triangulation_3/icons/cgal_logo.xpm       |      0
 .../demo/Triangulation_3/icons/clear.jpeg          |    Bin
 .../demo/Triangulation_3/icons/coordinates.jpeg    |    Bin
 .../demo/Triangulation_3/icons/empty_sphere.jpeg   |    Bin
 .../demo/Triangulation_3}/icons/fileOpen.png       |    Bin
 .../demo/Triangulation_3}/icons/fileSave.png       |    Bin
 .../demo/Triangulation_3/icons/flat.png            |    Bin
 .../demo/Triangulation_3/icons/grid.jpeg           |    Bin
 .../demo/Triangulation_3/icons/insert.jpeg         |    Bin
 .../demo/Triangulation_3/icons/insert_point.jpg    |    Bin
 .../demo/Triangulation_3/icons/move_1.jpeg         |    Bin
 .../demo/Triangulation_3/icons/nearest_nb.png      |    Bin
 .../demo/Triangulation_3/icons/normal_view.jpeg    |    Bin
 .../demo/Triangulation_3/icons/pause.jpeg          |    Bin
 .../demo/Triangulation_3/icons/play.jpeg           |    Bin
 .../demo/Triangulation_3/icons/pointRandom.png     |    Bin
 .../demo/Triangulation_3/icons/preferences.jpeg    |    Bin
 .../demo/Triangulation_3/icons/quit.jpeg           |    Bin
 .../demo/Triangulation_3/icons/select_hand.jpeg    |    Bin
 .../demo/Triangulation_3/icons/show_delaunay.jpeg  |    Bin
 .../demo/Triangulation_3/icons/show_facet.jpeg     |    Bin
 .../demo/Triangulation_3/icons/show_point.jpeg     |    Bin
 .../demo/Triangulation_3/icons/show_voronoi.jpeg   |    Bin
 .../demo/Triangulation_3/icons/stereo.png          |    Bin
 .../demo/Triangulation_3/icons/stop.jpeg           |    Bin
 .../demo/Triangulation_3/typedefs.h                |      0
 .../Triangulation_3_Geomview_demos/CMakeLists.txt  |     30 +
 .../demo/Triangulation_3_Geomview_demos/README     |      0
 .../Triangulation_3_color_demo.cpp                 |      0
 .../Triangulation_3_demo.cpp                       |      0
 .../Triangulation_3_remove_demo.cpp                |      0
 .../Triangulation_3_voronoi_demo.cpp               |      0
 .../Triangulation_3_Geomview_demos/data/points     |      0
 .../demo/icons/Delaunay_triangulation_2.png        |    Bin
 .../{CGAL-4.6 => CGAL-4.8}/demo/icons/File.qrc     |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/icons/Input.qrc    |      0
 .../demo/icons/Triangulation_2.qrc                 |      0
 .../demo/icons/Voronoi_diagram_2.png               |    Bin
 .../demo}/icons/fileNew.png                        |    Bin
 .../demo}/icons/fileOpen.png                       |    Bin
 .../demo}/icons/fileSave.png                       |    Bin
 .../demo}/icons/fit-page-32.png                    |    Bin
 .../demo}/icons/inputPoint.png                     |    Bin
 .../demo/icons/inputPoint.svg                      |      0
 .../demo/icons/inputPolyline.png                   |    Bin
 .../{CGAL-4.6 => CGAL-4.8}/demo/icons/license.txt  |      0
 .../demo/icons/zoom-best-fit.png                   |    Bin
 .../demo/icons/zoom-best-fit.svg                   |      0
 .../{CGAL-4.6 => CGAL-4.8}/demo/resources/CGAL.qrc |      0
 .../demo/resources/about_CGAL.html                 |      0
 .../demo/resources/cgal_logo.xpm                   |      0
 .../demo/resources/cgal_logo_ipe_2013.png          |    Bin
 .../doc_html/Manual/index.html                     |      0
 .../doc_html/Manual/packages.html                  |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/doc_html/cgal.ico  |    Bin
 .../doc_html/images/cgal_2013_grey.png             |    Bin
 3rdparty/CGAL-4.8/doc_html/index.html              |     58 +
 .../examples/AABB_tree/AABB_custom_example.cpp     |      0
 ...B_custom_indexed_triangle_set_array_example.cpp |      0
 .../AABB_custom_indexed_triangle_set_example.cpp   |      0
 .../AABB_custom_triangle_soup_example.cpp          |      0
 .../AABB_tree/AABB_face_graph_triangle_example.cpp |      0
 .../AABB_tree/AABB_halfedge_graph_edge_example.cpp |      0
 .../examples/AABB_tree/AABB_insertion_example.cpp  |      0
 .../AABB_tree/AABB_polyhedron_edge_example.cpp     |      0
 .../AABB_polyhedron_facet_distance_example.cpp     |      0
 .../AABB_polyhedron_facet_intersection_example.cpp |      0
 .../examples/AABB_tree/AABB_segment_3_example.cpp  |      0
 .../examples/AABB_tree/AABB_triangle_3_example.cpp |      0
 .../CGAL-4.8/examples/AABB_tree/CMakeLists.txt     |     37 +
 .../CMakeLists.txt                                 |     29 +
 .../boundaries.cpp                                 |     81 +
 .../data/half.xyz                                  |    325 +
 .../reconstruction_class.cpp                       |     56 +
 .../reconstruction_fct.cpp                         |     85 +
 .../reconstruction_surface_mesh.cpp                |     71 +
 .../examples/Algebraic_foundations/CMakeLists.txt  |     30 +
 .../algebraic_structure_dispatch.cpp               |      0
 .../Algebraic_foundations/fraction_traits.cpp      |      0
 .../implicit_interoperable_dispatch.cpp            |      0
 .../examples/Algebraic_foundations/integralize.cpp |      0
 .../Algebraic_foundations/interoperable.cpp        |      0
 .../examples/Algebraic_kernel_d/CMakeLists.txt     |     31 +
 .../examples/Algebraic_kernel_d/Compare_1.cpp      |      0
 .../Construct_algebraic_real_1.cpp                 |      0
 .../examples/Algebraic_kernel_d/Isolate_1.cpp      |      0
 .../examples/Algebraic_kernel_d/Sign_at_1.cpp      |      0
 .../examples/Algebraic_kernel_d/Solve_1.cpp        |      0
 .../examples/Alpha_shapes_2/CMakeLists.txt         |     27 +
 .../examples/Alpha_shapes_2/README                 |      0
 .../examples}/Alpha_shapes_2/data/fin              |      0
 .../examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp  |      0
 .../Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp  |     99 +
 .../examples/Alpha_shapes_3/CMakeLists.txt         |     31 +
 .../examples/Alpha_shapes_3/README                 |      0
 .../examples/Alpha_shapes_3/data/bunny_1000        |      0
 .../examples/Alpha_shapes_3/data/bunny_5000        |      0
 .../examples/Alpha_shapes_3/data/fin               |      0
 .../examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp  |      0
 .../Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp |      0
 .../ex_alpha_shapes_with_fast_location_3.cpp       |      0
 .../ex_fixed_weighted_alpha_shapes_3.cpp           |      0
 .../Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp  |     64 +
 .../Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp  |      0
 .../examples/Apollonius_graph_2/CMakeLists.txt     |     29 +
 .../examples/Apollonius_graph_2/README             |      0
 .../Apollonius_graph_2/ag2_exact_traits.cpp        |      0
 .../Apollonius_graph_2/ag2_exact_traits_sqrt.cpp   |     76 +
 .../ag2_filtered_traits_no_hidden.cpp              |      0
 .../examples/Apollonius_graph_2/ag2_hierarchy.cpp  |      0
 .../examples/Apollonius_graph_2/data/hierarchy.cin |      0
 .../examples/Apollonius_graph_2/data/sites.cin     |      0
 .../Approximate_min_ellipsoid_d/CMakeLists.txt     |     27 +
 .../Approximate_min_ellipsoid_d/ellipsoid.cpp      |      0
 .../ellipsoid_for_maple.cpp                        |      0
 .../examples/Arrangement_on_surface_2/Bezier.dat   |      0
 .../Arrangement_on_surface_2/Bezier_curves.cpp     |      0
 .../Arrangement_on_surface_2/Bezier_polycurve.dat  |      3 +
 .../Arrangement_on_surface_2/CMakeLists.txt        |     78 +
 .../examples/Arrangement_on_surface_2/Europe.dat   |      0
 .../aggregated_insertion.cpp                       |      0
 .../Arrangement_on_surface_2/algebraic_curves.cpp  |      0
 .../algebraic_segments.cpp                         |      0
 .../arr_inexact_construction_segments.h            |      0
 .../examples/Arrangement_on_surface_2/arr_print.h  |      0
 .../batched_point_location.cpp                     |      0
 .../Arrangement_on_surface_2/bgl_dual_adapter.cpp  |     85 +
 .../bgl_primal_adapter.cpp                         |    144 +
 .../bounded_planar_vertical_decomposition.cpp      |      0
 .../examples/Arrangement_on_surface_2/circles.cpp  |     60 +
 .../Arrangement_on_surface_2/circular_arcs.cpp     |     95 +
 .../circular_line_arcs.cpp                         |      0
 .../Arrangement_on_surface_2/coll_points.dat       |      0
 .../conic_multiplicities.cpp                       |      0
 .../examples/Arrangement_on_surface_2/conics.cpp   |      0
 .../consolidated_curve_data.cpp                    |    113 +
 .../Arrangement_on_surface_2/curve_history.cpp     |     74 +
 .../Arrangement_on_surface_2/dcel_extension.cpp    |     97 +
 .../Arrangement_on_surface_2/dcel_extension_io.cpp |    137 +
 .../Arrangement_on_surface_2/dual_lines.cpp        |    112 +
 .../Arrangement_on_surface_2/dual_with_data.cpp    |     82 +
 .../Arrangement_on_surface_2/edge_insertion.cpp    |      0
 .../Arrangement_on_surface_2/edge_manipulation.cpp |      0
 .../edge_manipulation_curve_history.cpp            |     86 +
 .../Arrangement_on_surface_2/face_extension.cpp    |     88 +
 .../face_extension_overlay.cpp                     |     89 +
 .../Arrangement_on_surface_2/fan_grids.dat         |      0
 .../generic_curve_data.cpp                         |     71 +
 .../Arrangement_on_surface_2/global_insertion.cpp  |      0
 .../Arrangement_on_surface_2/global_removal.cpp    |      0
 .../incremental_insertion.cpp                      |      0
 .../examples/Arrangement_on_surface_2/io.cpp       |     48 +
 .../Arrangement_on_surface_2/io_curve_history.cpp  |     57 +
 .../Arrangement_on_surface_2/io_unbounded.cpp      |     68 +
 .../Arrangement_on_surface_2/isolated_vertices.cpp |      0
 .../examples/Arrangement_on_surface_2/observer.cpp |      0
 .../examples/Arrangement_on_surface_2/overlay.cpp  |     59 +
 .../Arrangement_on_surface_2/overlay_unbounded.cpp |      0
 .../point_location_example.cpp                     |      0
 .../point_location_utils.h                         |      0
 .../examples/Arrangement_on_surface_2/points.dat   |      0
 .../Arrangement_on_surface_2/polycurve_bezier.cpp  |     94 +
 .../polycurve_circular_arc.cpp                     |    131 +
 .../Arrangement_on_surface_2/polycurve_conic.cpp   |    146 +
 .../polycurve_geodesic.cpp                         |     73 +
 .../Arrangement_on_surface_2/polycurves_basic.cpp  |     50 +
 .../Arrangement_on_surface_2/polylines.cpp         |      0
 .../Arrangement_on_surface_2/predefined_kernel.cpp |      0
 .../predefined_kernel_non_intersecting.cpp         |      0
 .../rational_functions.cpp                         |      0
 .../rational_functions_rational_coefficients.cpp   |      0
 .../special_edge_insertion.cpp                     |      0
 .../Arrangement_on_surface_2/spherical_insert.cpp  |      0
 .../Arrangement_on_surface_2/tracing_counting.cpp  |      0
 .../unb_planar_vertical_decomposition.cpp          |      0
 .../unbounded_non_intersecting.cpp                 |      0
 .../unbounded_rational_functions.cpp               |      0
 .../vertical_ray_shooting.cpp                      |      0
 .../CGAL-4.8/examples/BGL_OpenMesh/CMakeLists.txt  |     57 +
 .../CGAL-4.8/examples/BGL_OpenMesh/TriMesh.cpp     |     51 +
 .../examples/BGL_arrangement_2/CMakeLists.txt      |     27 +
 .../examples/BGL_arrangement_2/arr_print.h         |      0
 .../examples/BGL_arrangement_2/arr_rational_nt.h   |      0
 .../BGL_arrangement_2/arrangement_dual.cpp}        |      0
 .../examples/BGL_arrangement_2/primal.cpp          |      0
 .../examples/BGL_polyhedron_3/CMakeLists.txt       |     73 +
 .../examples/BGL_polyhedron_3/cube.off             |      0
 .../examples/BGL_polyhedron_3/distance.cmd         |      0
 .../examples/BGL_polyhedron_3/distance.cpp         |      0
 .../BGL_polyhedron_3/incident_vertices.cmd         |      0
 .../BGL_polyhedron_3/incident_vertices.cpp         |      0
 .../examples/BGL_polyhedron_3/kruskal.cpp          |      0
 .../BGL_polyhedron_3/kruskal_with_stored_id.cpp    |      0
 .../examples/BGL_polyhedron_3/normals.cmd          |      0
 .../examples/BGL_polyhedron_3/normals.cpp          |      0
 .../BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp     |     87 +
 .../examples/BGL_polyhedron_3/range.cmd            |      0
 .../CGAL-4.8/examples/BGL_polyhedron_3/range.cpp   |     68 +
 .../BGL_polyhedron_3/transform_iterator.cmd        |      0
 .../BGL_polyhedron_3/transform_iterator.cpp        |      0
 .../examples/BGL_surface_mesh/CMakeLists.txt       |     27 +
 .../BGL_surface_mesh/connected_components.cpp      |      0
 .../examples/BGL_surface_mesh/data/prim.off        |      0
 .../examples/BGL_surface_mesh/prim.cmd             |      0
 .../examples/BGL_surface_mesh/prim.cpp             |      0
 .../examples/BGL_triangulation_2/CMakeLists.txt    |     29 +
 .../examples/BGL_triangulation_2/dijkstra.cpp      |      0
 .../dijkstra_with_internal_properties.cpp          |      0
 .../examples/BGL_triangulation_2/emst.cpp          |      0
 .../examples/BGL_triangulation_2/face_graph.cpp    |      0
 .../Barycentric_coordinates_2/CMakeLists.txt       |     32 +
 .../Discrete_harmonic_coordinates_example.cpp      |      0
 .../Mean_value_coordinates_example.cpp             |      0
 .../Segment_coordinates_example.cpp                |      0
 .../Terrain_height_modeling.cpp                    |      0
 .../Triangle_coordinates_example.cpp               |      0
 .../Triangle_coordinates_speed_test.cpp            |      0
 .../Wachspress_coordinates_example.cpp             |      0
 .../Boolean_set_operations_2/CMakeLists.txt        |     36 +
 .../examples/Boolean_set_operations_2/README       |      0
 .../examples/Boolean_set_operations_2/amer_a.bps   |      0
 .../examples/Boolean_set_operations_2/amer_b.bps   |      0
 .../examples/Boolean_set_operations_2/amer_c.bps   |      0
 .../examples/Boolean_set_operations_2/amer_d.bps   |      0
 .../examples/Boolean_set_operations_2/amer_e.bps   |      0
 .../examples/Boolean_set_operations_2/amer_f.bps   |      0
 .../examples/Boolean_set_operations_2/amer_g.bps   |      0
 .../examples/Boolean_set_operations_2/amer_h.bps   |      0
 .../examples/Boolean_set_operations_2/amer_i.bps   |      0
 .../examples/Boolean_set_operations_2/amer_j.bps   |      0
 .../examples/Boolean_set_operations_2/amer_k.bps   |      0
 .../bezier_traits_adapter.cpp                      |      0
 .../bezier_traits_adapter2.cpp                     |      0
 .../Boolean_set_operations_2/bso_rational_nt.h     |      0
 .../examples/Boolean_set_operations_2/char_g.bps   |      0
 .../examples/Boolean_set_operations_2/char_g.dat   |      0
 .../examples/Boolean_set_operations_2/char_m.bps   |      0
 .../examples/Boolean_set_operations_2/char_m.dat   |      0
 .../Boolean_set_operations_2/circle_segment.cpp    |      0
 .../conic_traits_adapter.cpp                       |      0
 .../Boolean_set_operations_2/connect_polygon.cpp   |      0
 .../Boolean_set_operations_2/do_intersect.cpp      |      0
 .../Boolean_set_operations_2/dxf_union.cpp         |      0
 .../examples/Boolean_set_operations_2/input_0.bps  |      0
 .../examples/Boolean_set_operations_2/input_1.bps  |      0
 .../Boolean_set_operations_2/pgn_holes.dat         |      0
 .../Boolean_set_operations_2/print_utils.h         |      0
 .../examples/Boolean_set_operations_2/sequence.cpp |      0
 .../Boolean_set_operations_2/set_union.cpp         |      0
 .../simple_join_intersect.cpp                      |      0
 .../symmetric_difference.cpp                       |      0
 .../examples/Boolean_set_operations_2/test.dxf     |      0
 .../examples/Box_intersection_d/CMakeLists.txt     |     32 +
 .../examples/Box_intersection_d/box_grid.cpp       |      0
 .../Box_intersection_d/custom_box_grid.cpp         |      0
 .../examples/Box_intersection_d/data/points.xyz    |      0
 .../examples/Box_intersection_d/data/triangles.xyz |      0
 .../examples/Box_intersection_d/minimal.cpp        |      0
 .../examples/Box_intersection_d/minimal_self.cpp   |      0
 .../proximity_custom_box_traits.cpp                |      0
 .../Box_intersection_d/triangle_self_intersect.cpp |      0
 .../triangle_self_intersect_pointers.cpp           |      0
 .../CGAL-4.8/examples/CGAL_ipelets/CMakeLists.txt  |     26 +
 .../examples/CGAL_ipelets/test_grabbers.cpp        |      0
 .../CGAL-4.8/examples/CGALimageIO/CMakeLists.txt   |     19 +
 .../CGALimageIO/convert_raw_image_to_inr.cpp       |      0
 .../examples/CGALimageIO/test_imageio.cpp          |      0
 3rdparty/CGAL-4.8/examples/CMakeLists.txt          |     42 +
 .../examples/Circular_kernel_2/CMakeLists.txt      |     27 +
 .../Circular_kernel_2/functor_has_on_2.cpp         |      0
 .../Circular_kernel_2/intersecting_arcs.cpp        |      0
 .../examples/Circular_kernel_3/CMakeLists.txt      |     28 +
 .../Circular_kernel_3/functor_compare_theta_3.cpp  |      0
 .../Circular_kernel_3/functor_has_on_3.cpp         |      0
 .../Circular_kernel_3/intersecting_spheres.cpp     |      0
 .../CGAL-4.8/examples/Circulator/CMakeLists.txt    |     28 +
 .../examples/Circulator/circulator_prog1.cpp       |      0
 .../examples/Circulator/circulator_prog2.cpp       |      0
 .../examples/Circulator/circulator_prog3.cpp       |      0
 .../examples/Combinatorial_map/CMakeLists.txt      |     32 +
 .../Combinatorial_map/map_3_dynamic_onmerge.cpp    |      0
 .../examples/Combinatorial_map/map_3_foreach.cpp   |      0
 .../examples/Combinatorial_map/map_3_marks.cpp     |     58 +
 .../Combinatorial_map/map_3_operations.cpp         |      0
 .../Combinatorial_map/map_3_simple_example.cpp     |      0
 .../map_3_with_colored_facets.cpp                  |      0
 .../Combinatorial_map/map_4_simple_example.cpp     |      0
 .../examples/Convex_decomposition_3/CMakeLists.txt |     26 +
 .../list_of_convex_parts.cin                       |      0
 .../list_of_convex_parts.cpp                       |      0
 .../CGAL-4.8/examples/Convex_hull_2/CMakeLists.txt |     34 +
 .../examples/Convex_hull_2/array_convex_hull_2.cpp |      0
 .../examples/Convex_hull_2/ch_from_cin_to_cout.cin |      0
 .../examples/Convex_hull_2/ch_from_cin_to_cout.cpp |      0
 .../examples/Convex_hull_2/ch_graham_anderson.cin  |      0
 .../examples/Convex_hull_2/ch_graham_anderson.cpp  |      0
 .../examples/Convex_hull_2/ch_timing.cpp           |      0
 .../examples/Convex_hull_2/convex_hull_yz.cin      |      0
 .../examples/Convex_hull_2/convex_hull_yz.cpp      |      0
 .../examples/Convex_hull_2/files/CD500             |      0
 .../Convex_hull_2/include/CGAL/ch_timing_2.h       |      0
 .../Convex_hull_2/include/CGAL/ch_timing_2_impl.h  |      0
 .../Convex_hull_2/iostream_convex_hull_2.cin       |      0
 .../Convex_hull_2/iostream_convex_hull_2.cpp       |      0
 .../Convex_hull_2/vector_convex_hull_2.cpp         |      0
 .../CGAL-4.8/examples/Convex_hull_3/CMakeLists.txt |     29 +
 .../examples/Convex_hull_3/dynamic_hull_3.cpp      |      0
 .../Convex_hull_3/halfspace_intersection_3.cpp     |     46 +
 .../examples/Convex_hull_3/lloyd_algorithm.cpp     |    245 +
 .../examples/Convex_hull_3/quickhull_3.cpp         |      0
 3rdparty/CGAL-4.8/examples/Core/CMakeLists.txt     |     49 +
 .../examples/Core/delaunay.cpp                     |      0
 .../CGAL-4.8/examples/Envelope_2/CMakeLists.txt    |     28 +
 .../examples/Envelope_2/ch_points.dat              |      0
 .../examples/Envelope_2/convex_hull.cpp            |      0
 .../examples/Envelope_2/envelope_circles.cpp       |      0
 .../examples/Envelope_2/envelope_segments.cpp      |      0
 .../CGAL-4.8/examples/Envelope_3/CMakeLists.txt    |     28 +
 .../examples/Envelope_3/envelope_planes.cpp        |      0
 .../examples/Envelope_3/envelope_spheres.cpp       |      0
 .../examples/Envelope_3/envelope_triangles.cpp     |      0
 .../examples/Envelope_3/spheres.dat                |      0
 .../examples/Filtered_kernel/CMakeLists.txt        |     26 +
 .../examples/Filtered_kernel/Cartesian_I.h         |      0
 .../Filtered_kernel/Filtered_predicate.cpp         |      0
 .../CGAL-4.8/examples/Generator/CMakeLists.txt     |     41 +
 .../examples/Generator/README                      |      0
 .../examples/Generator/ball_d.cpp                  |      0
 .../examples/Generator/combination_enumerator.cpp  |      0
 .../examples/Generator/cube_d.cpp                  |      0
 .../examples/Generator/grid_d.cpp                  |      0
 .../examples/Generator/name_pairs.cpp              |      0
 .../examples/Generator/random_convex_hull_2.cpp    |      0
 .../examples/Generator/random_convex_set.cpp       |      0
 .../Generator/random_degenerate_point_set.cpp      |     53 +
 .../examples/Generator/random_grid.cpp             |      0
 .../random_points_tetrahedron_and_triangle_3.cpp   |     49 +
 .../Generator/random_points_triangle_2.cpp         |     35 +
 .../CGAL-4.8/examples/Generator/random_polygon.cpp |     57 +
 .../examples/Generator/random_polygon2.cpp         |      0
 .../examples/Generator/random_segments1.cpp        |      0
 .../examples/Generator/random_segments2.cpp        |      0
 .../examples/Generator/sphere_d.cpp                |      0
 .../CGAL-4.8/examples/HalfedgeDS/CMakeLists.txt    |     34 +
 .../examples/HalfedgeDS/hds_prog_color.cpp         |      0
 .../examples/HalfedgeDS/hds_prog_compact.cpp       |      0
 .../examples/HalfedgeDS/hds_prog_compact2.cpp      |      0
 .../examples/HalfedgeDS/hds_prog_default.cpp       |      0
 .../examples/HalfedgeDS/hds_prog_edge_iterator.cpp |      0
 .../examples/HalfedgeDS/hds_prog_graph.cpp         |      0
 .../examples/HalfedgeDS/hds_prog_graph2.cpp        |      0
 .../HalfedgeDS/hds_prog_halfedge_iterator.cpp      |      0
 .../examples/HalfedgeDS/hds_prog_vector.cpp        |      0
 .../examples/Inscribed_areas/CMakeLists.txt        |     28 +
 .../Inscribed_areas/extremal_polygon_2_area.cpp    |      0
 .../extremal_polygon_2_perimeter.cpp               |      0
 .../Inscribed_areas/largest_empty_rectangle.cpp    |      0
 .../CGAL-4.8/examples/Interpolation/CMakeLists.txt |     32 +
 .../examples/Interpolation/README                  |      0
 .../examples/Interpolation/data/points3            |      0
 .../examples/Interpolation/interpolation_2.cpp     |      0
 .../Interpolation/linear_interpolation_2.cpp       |      0
 .../examples/Interpolation/nn_coordinates_2.cpp    |      0
 .../examples/Interpolation/nn_coordinates_3.cpp    |      0
 .../examples/Interpolation/rn_coordinates_2.cpp    |      0
 .../Interpolation/sibson_interpolation_2.cpp       |      0
 .../surface_neighbor_coordinates_3.cpp             |      0
 .../examples/Interval_skip_list/CMakeLists.txt     |     27 +
 .../examples/Interval_skip_list/intervals.cpp      |      0
 .../examples/Interval_skip_list/isl_terrain.cpp    |      0
 .../examples/Interval_skip_list/terrain.pts        |      0
 .../CGAL-4.8/examples/Jet_fitting_3/CMakeLists.txt |     56 +
 .../examples/Jet_fitting_3/Mesh_estimation.cpp     |    304 +
 .../examples/Jet_fitting_3/PolyhedralSurf.h        |      0
 .../Jet_fitting_3/PolyhedralSurf_operations.h      |      0
 .../examples/Jet_fitting_3/PolyhedralSurf_rings.h  |      0
 .../examples/Jet_fitting_3/README                  |      0
 .../examples/Jet_fitting_3/Single_estimation.cpp   |      0
 .../examples/Jet_fitting_3/data/ellipe0.003.off    |      0
 .../examples/Jet_fitting_3/data/in_points_d4.txt   |      0
 .../examples/Jet_fitting_3/data/in_points_file.txt |      0
 .../Jet_fitting_3/data/poly2x^2+y^2-0.062500-off   |      0
 .../CGAL-4.8/examples/Kernel_23/CMakeLists.txt     |     33 +
 .../examples/Kernel_23/MyConstruct_bbox_2.h        |      0
 .../Kernel_23/MyConstruct_coord_iterator.h         |      0
 .../examples/Kernel_23/MyConstruct_point_2.h       |      0
 .../examples/Kernel_23/MyKernel.cpp                |      0
 .../examples/Kernel_23/MyKernel.h                  |      0
 .../examples/Kernel_23/MyPointC2.h                 |      0
 .../examples/Kernel_23/MyPointC2_iostream.h        |      0
 .../examples/Kernel_23/MySegmentC2.h               |      0
 .../examples/Kernel_23/cartesian_converter.cpp     |      0
 .../examples/Kernel_23/exact.cpp                   |      0
 .../examples/Kernel_23/intersection_get.cpp        |     26 +
 .../examples/Kernel_23/intersection_visitor.cpp    |     41 +
 .../CGAL-4.8/examples/Kernel_23/intersections.cpp  |     69 +
 .../examples/Kernel_23/points_and_segment.cpp      |      0
 .../examples/Kernel_23/surprising.cpp              |      0
 .../Kinetic_data_structures/CMakeLists.txt         |     33 +
 .../Kinetic_Delaunay_triangulation_2.cpp           |      0
 .../Kinetic_Delaunay_triangulation_3.cpp           |      0
 .../Kinetic_insert_event.cpp                       |      0
 .../Kinetic_regular_triangulation_3.cpp            |      0
 .../Kinetic_data_structures/Kinetic_sort.cpp       |      0
 .../Kinetic_data_structures/Kinetic_sweepline.cpp  |      0
 .../examples/Kinetic_data_structures/data/points_1 |      0
 .../examples/Kinetic_data_structures/data/points_2 |      0
 .../examples/Kinetic_data_structures/data/points_3 |      0
 .../Kinetic_data_structures/data/sweepline.input   |      0
 .../Kinetic_data_structures/data/weighted_points_3 |      0
 .../defining_a_simulation_traits.cpp               |      0
 .../Kinetic_data_structures}/trivial_kds.cpp       |      0
 .../examples/Kinetic_framework/CMakeLists.txt      |     29 +
 .../Kinetic_framework/adding_a_certificate.cpp     |      0
 .../examples/Kinetic_framework/data/points_2       |      0
 .../Kinetic_framework/data/points_with_color_2     |      0
 .../examples/Kinetic_framework/listener.cpp        |      0
 .../examples/Kinetic_framework/pointer_queue.cpp   |      0
 .../examples/Kinetic_framework/ref_counted.cpp     |      0
 .../Linear_cell_complex/CMakeLCCViewerQt.inc       |     33 +
 .../examples/Linear_cell_complex/CMakeLists.txt    |     59 +
 .../examples/Linear_cell_complex/README.txt        |     28 +
 .../Linear_cell_complex/data/armadillo.off         |      0
 .../examples/Linear_cell_complex/data/graph.txt    |      0
 .../examples/Linear_cell_complex/data/points_2     |      0
 .../examples/Linear_cell_complex/data/points_3     |      0
 .../Linear_cell_complex/data/small_points_2        |      0
 .../Linear_cell_complex/data/small_points_3        |      0
 .../Linear_cell_complex/linear_cell_complex_3.cpp  |      0
 ...linear_cell_complex_3_attributes_management.cpp |      0
 .../linear_cell_complex_3_viewer_qt.h              |    932 +
 ...linear_cell_complex_3_with_colored_vertices.cpp |      0
 .../linear_cell_complex_3_with_mypoint.cpp         |      0
 .../Linear_cell_complex/linear_cell_complex_4.cpp  |      0
 .../Linear_cell_complex/plane_graph_to_lcc_2.cpp   |      0
 .../examples/Linear_cell_complex/voronoi_2.cpp     |    174 +
 .../examples/Linear_cell_complex/voronoi_3.cpp     |    173 +
 .../CGAL-4.8/examples/Matrix_search/CMakeLists.txt |     26 +
 .../Matrix_search/sorted_matrix_search.cpp         |      0
 3rdparty/CGAL-4.8/examples/Mesh_2/CMakeLists.txt   |     30 +
 .../examples/Mesh_2/conforming.cpp                 |      0
 .../examples/Mesh_2/mesh_class.cpp                 |      0
 .../examples/Mesh_2/mesh_global.cpp                |      0
 .../CGAL-4.8/examples/Mesh_2/mesh_optimization.cpp |     59 +
 .../examples/Mesh_2/mesh_with_seeds.cpp            |      0
 3rdparty/CGAL-4.8/examples/Mesh_3/CMakeLists.txt   |    105 +
 .../examples/Mesh_3/data/cheese.off                |      0
 .../examples/Mesh_3/data/elephant.off              |      0
 .../examples/Mesh_3/data/fandisk.off               |      0
 .../examples/Mesh_3/data/liver.inr.gz              |    Bin
 .../examples/Mesh_3}/data/skull_2.9.inr            |    Bin
 .../{CGAL-4.6 => CGAL-4.8}/examples/Mesh_3/debug.h |      0
 .../examples/Mesh_3/implicit_functions.cpp         |      0
 .../examples/Mesh_3/implicit_functions.h           |      0
 .../examples/Mesh_3/mesh_3D_gray_image.cpp         |     54 +
 .../examples/Mesh_3/mesh_3D_gray_vtk_image.cpp     |     89 +
 .../CGAL-4.8/examples/Mesh_3/mesh_3D_image.cpp     |     59 +
 .../Mesh_3/mesh_3D_image_variable_size.cpp         |     70 +
 .../examples/Mesh_3/mesh_cubes_intersection.cpp    |      0
 .../mesh_cubes_intersection_with_features.cpp      |      0
 .../examples/Mesh_3/mesh_implicit_domains.cpp      |      0
 .../examples/Mesh_3/mesh_implicit_domains_2.cpp    |      0
 .../examples/Mesh_3/mesh_implicit_ellipsoid.cpp    |      0
 .../examples/Mesh_3/mesh_implicit_sphere.cpp       |      0
 .../Mesh_3/mesh_implicit_sphere_variable_size.cpp  |      0
 .../examples/Mesh_3/mesh_optimization_example.cpp  |     69 +
 .../Mesh_3/mesh_optimization_lloyd_example.cpp     |     69 +
 .../examples/Mesh_3/mesh_polyhedral_domain.cpp     |     76 +
 .../mesh_polyhedral_domain_with_features.cpp       |     53 +
 .../mesh_two_implicit_spheres_with_balls.cpp       |      0
 .../CGAL-4.8/examples/Min_annulus_d/CMakeLists.txt |     27 +
 .../examples/Min_annulus_d/min_annulus_d.cpp       |      0
 .../Min_annulus_d/min_annulus_d_fast_exact.cpp     |      0
 .../CGAL-4.8/examples/Min_circle_2/CMakeLists.txt  |     26 +
 .../examples/Min_circle_2/min_circle_2.cpp         |      0
 .../CGAL-4.8/examples/Min_ellipse_2/CMakeLists.txt |     26 +
 .../examples/Min_ellipse_2/min_ellipse_2.cpp       |      0
 .../examples/Min_quadrilateral_2/CMakeLists.txt    |     28 +
 .../minimum_enclosing_parallelogram_2.cpp          |      0
 .../minimum_enclosing_rectangle_2.cpp              |      0
 .../minimum_enclosing_strip_2.cpp                  |      0
 .../CGAL-4.8/examples/Min_sphere_d/CMakeLists.txt  |     26 +
 .../examples/Min_sphere_d/min_sphere_d.cpp         |      0
 .../Min_sphere_of_spheres_d/CMakeLists.txt         |     29 +
 .../examples/Min_sphere_of_spheres_d/benchmark.cpp |      0
 .../min_sphere_of_spheres_d_2.cpp                  |      0
 .../min_sphere_of_spheres_d_3.cpp                  |      0
 .../min_sphere_of_spheres_d_d.cpp                  |      0
 .../examples/Minkowski_sum_2/CMakeLists.txt        |     33 +
 .../examples/Minkowski_sum_2/approx_inset.cpp      |     48 +
 .../examples/Minkowski_sum_2/approx_offset.cpp     |     39 +
 .../CGAL-4.8/examples/Minkowski_sum_2/arr_conics.h |     25 +
 .../examples/Minkowski_sum_2/bops_circular.h       |     15 +
 .../examples/Minkowski_sum_2/bops_linear.h         |     15 +
 .../examples/Minkowski_sum_2/exact_inset.cpp       |     60 +
 .../examples/Minkowski_sum_2/exact_offset.cpp      |     56 +
 .../CGAL-4.8/examples/Minkowski_sum_2/holes.dat    |      6 +
 .../examples/Minkowski_sum_2/ms_rational_nt.h      |      0
 .../CGAL-4.8/examples/Minkowski_sum_2/pgn_print.h  |     73 +
 .../examples/Minkowski_sum_2/print_utils.h         |      0
 .../examples/Minkowski_sum_2/rooms_star.dat        |      0
 .../examples/Minkowski_sum_2/spiked.dat            |      0
 .../Minkowski_sum_2/sum_by_decomposition.cpp       |     36 +
 .../examples/Minkowski_sum_2/sum_of_holes.cpp      |     43 +
 .../Minkowski_sum_2/sum_triangle_square.cpp        |     28 +
 .../examples/Minkowski_sum_2/sum_with_holes.cpp    |     30 +
 .../examples/Minkowski_sum_2/tight.dat             |      0
 .../examples/Minkowski_sum_3/CMakeLists.txt        |     27 +
 .../examples/Minkowski_sum_3/cube.nef3             |      0
 .../examples/Minkowski_sum_3/cube_offset.cin       |      0
 .../examples/Minkowski_sum_3/cube_offset.cpp       |      0
 .../examples/Minkowski_sum_3/glide.cin             |      0
 .../examples/Minkowski_sum_3/glide.cpp             |      0
 .../examples/Modular_arithmetic/CMakeLists.txt     |     26 +
 .../examples/Modular_arithmetic/modular_filter.cpp |      0
 3rdparty/CGAL-4.8/examples/Nef_2/CMakeLists.txt    |     28 +
 .../examples/Nef_2/nef_2_construction.cpp          |      0
 .../examples/Nef_2/nef_2_intersection.cpp          |      0
 .../examples/Nef_2/nef_2_polylines.cpp             |      0
 3rdparty/CGAL-4.8/examples/Nef_3/CMakeLists.txt    |     42 +
 .../examples/Nef_3/comparison.cpp                  |      0
 .../examples/Nef_3/complex_construction.cin        |      0
 .../examples/Nef_3/complex_construction.cpp        |      0
 .../examples/Nef_3/exploration_SM.cin              |      0
 .../examples/Nef_3/exploration_SM.cpp              |      0
 .../examples/Nef_3/extended_kernel.cin             |      0
 .../examples/Nef_3/extended_kernel.cpp             |      0
 .../examples/Nef_3/handling_double_coordinates.cin |      0
 .../examples/Nef_3/handling_double_coordinates.cpp |      0
 .../examples/Nef_3/interface_polyhedron.cin        |      0
 .../examples/Nef_3/interface_polyhedron.cpp        |      0
 .../examples/Nef_3/nefIO.cin                       |      0
 .../examples/Nef_3/nefIO.cpp                       |      0
 .../examples/Nef_3/nef_3_construction.cpp          |      0
 .../examples/Nef_3/nef_3_point_location.cin        |      0
 .../examples/Nef_3/nef_3_point_location.cpp        |      0
 .../examples/Nef_3/nef_3_simple.cpp                |      0
 .../examples/Nef_3/offIO.cin                       |      0
 .../examples/Nef_3/offIO.cpp                       |      0
 .../examples/Nef_3/point_set_operations.cpp        |      0
 .../examples/Nef_3/polyline_construction.cpp       |      0
 .../examples/Nef_3/set_operations.cpp              |      0
 .../examples/Nef_3/shell_exploration.cin           |      0
 .../examples/Nef_3/shell_exploration.cpp           |      0
 .../examples/Nef_3/topological_operations.cin      |      0
 .../examples/Nef_3/topological_operations.cpp      |      0
 .../examples/Nef_3/transformation.cpp              |      0
 3rdparty/CGAL-4.8/examples/Nef_S2/CMakeLists.txt   |     31 +
 .../include/CGAL/Nef_S2/create_random_Nef_S2.h     |      0
 .../examples/Nef_S2/nef_s2_construction.cpp        |      0
 .../examples/Nef_S2/nef_s2_exploration.cpp         |      0
 .../examples/Nef_S2/nef_s2_point_location.cpp      |      0
 .../examples/Nef_S2/nef_s2_simple.cpp              |      0
 .../CMakeLists.txt                                 |     34 +
 .../data/stair.xy                                  |    160 +
 .../data/stair.xym                                 |    160 +
 .../otr2_indexed_output_example.cpp                |     68 +
 .../otr2_list_output_example.cpp                   |     57 +
 .../otr2_mass_example.cpp                          |     70 +
 .../otr2_simplest_example.cpp                      |     28 +
 .../CGAL-4.8/examples/Partition_2/CMakeLists.txt   |     29 +
 .../examples/Partition_2/README                    |      0
 .../Partition_2/approx_convex_partition_2.cpp      |      0
 .../greene_approx_convex_partition_2.cpp           |      0
 .../Partition_2/optimal_convex_partition_2.cpp     |      0
 .../Partition_2/y_monotone_partition_2.cpp         |      0
 .../Periodic_2_triangulation_2/CMakeLists.txt      |     36 +
 .../data/triangulation_prog1.cin                   |      0
 .../p2t2_adding_handles.cpp                        |      0
 .../p2t2_colored_vertices.cpp                      |      0
 .../Periodic_2_triangulation_2/p2t2_covering.cpp   |      0
 .../p2t2_find_conflicts.cpp                        |      0
 .../p2t2_geometric_access.cpp                      |      0
 .../Periodic_2_triangulation_2/p2t2_hierarchy.cpp  |      0
 .../p2t2_info_insert_with_pair_iterator_2.cpp      |      0
 .../p2t2_info_insert_with_transform_iterator_2.cpp |      0
 .../p2t2_info_insert_with_zip_iterator_2.cpp       |      0
 .../p2t2_large_point_set.cpp                       |      0
 .../p2t2_simple_example.cpp                        |      0
 .../Periodic_3_triangulation_3/CMakeLists.txt      |     32 +
 .../examples/Periodic_3_triangulation_3/README     |      0
 .../colored_vertices.cpp                           |     40 +
 .../Periodic_3_triangulation_3/covering.cpp        |     48 +
 .../Periodic_3_triangulation_3/find_conflicts.cpp  |     55 +
 .../geometric_access.cpp                           |     39 +
 .../Periodic_3_triangulation_3/large_point_set.cpp |     61 +
 .../periodic_adding_handles.cpp                    |     69 +
 .../Periodic_3_triangulation_3/simple_example.cpp  |     77 +
 .../CGAL-4.8/examples/Point_set_2/CMakeLists.txt   |     27 +
 .../examples/Point_set_2/nearest_neighbor.cpp      |      0
 .../examples/Point_set_2/range_search.cpp          |      0
 .../examples/Point_set_processing_3/CMakeLists.txt |     81 +
 .../average_spacing_example.cpp                    |     67 +
 .../bilateral_smooth_point_set_example.cpp         |     77 +
 .../data/ChineseDragon-10kv.off                    |      0
 .../data/before_upsample.xyz                       |      0
 .../examples/Point_set_processing_3/data/camel.off |      0
 .../Point_set_processing_3/data/fandisk.off        |  47529 ++++++
 .../data/fin90_with_PCA_normals.xyz                |      0
 .../examples/Point_set_processing_3/data/oni.xyz   |      0
 .../Point_set_processing_3/data/sphere_1k.xyz      |      0
 .../Point_set_processing_3/data/sphere_20k.xyz     |      0
 .../data/sphere_20k_normal.xyz                     |      0
 .../edge_aware_upsample_point_set_example.cpp      |     80 +
 .../Point_set_processing_3/edges_example.cpp       |     58 +
 .../grid_simplification_example.cpp                |      0
 .../grid_simplify_indices.cpp                      |     57 +
 .../hierarchy_simplification_example.cpp           |     48 +
 .../jet_smoothing_example.cpp                      |     38 +
 .../Point_set_processing_3/normal_estimation.cmd   |      0
 .../Point_set_processing_3/normal_estimation.cpp   |    346 +
 .../Point_set_processing_3/normals_example.cpp     |     65 +
 .../Point_set_processing_3/property_map.cpp        |      0
 .../random_simplification_example.cpp              |     49 +
 .../read_write_xyz_point_set_example.cpp           |     53 +
 .../remove_outliers_example.cpp                    |     42 +
 ...p_simplify_and_regularize_point_set_example.cpp |     64 +
 .../Point_set_shape_detection_3/CMakeLists.txt     |     36 +
 .../Point_set_shape_detection_3/data/cube.pwn      |  50000 +++++++
 .../efficient_RANSAC_basic.cpp                     |     61 +
 .../efficient_RANSAC_custom_shape.cpp              |     62 +
 .../efficient_RANSAC_custom_shape.h                |     94 +
 .../efficient_RANSAC_parameters.cpp                |    108 +
 .../efficient_RANSAC_point_access.cpp              |    139 +
 .../CMakeLists.txt                                 |     48 +
 .../data/kitten.xyz                                |      0
 .../data/sphere926.pwn                             |      0
 .../poisson_reconstruction.cmd                     |      0
 .../poisson_reconstruction.cpp                     |    393 +
 .../poisson_reconstruction_example.cpp             |    108 +
 3rdparty/CGAL-4.8/examples/Polygon/CMakeLists.txt  |     29 +
 .../examples/Polygon/Example.cpp                   |      0
 .../examples/Polygon/Polygon.cpp                   |      0
 .../examples/Polygon/polygon_algorithms.cpp        |      0
 .../examples/Polygon/projected_polygon.cpp         |      0
 .../Polygon_mesh_processing/CMakeLists.txt         |    116 +
 .../compute_normals_example.cpp                    |     50 +
 .../compute_normals_example_OM.cpp                 |     59 +
 .../connected_components_example.cpp               |    131 +
 .../examples/Polygon_mesh_processing/data/P.off    |     53 +
 .../Polygon_mesh_processing/data/blobby.off        |   6081 +
 .../Polygon_mesh_processing/data/blobby_3cc.off    |   5241 +
 .../Polygon_mesh_processing/data/cube_quad.off     |     16 +
 .../data/degtri_sliding.off                        |     18 +
 .../Polygon_mesh_processing/data/eight.off         |    951 +
 .../data/full_border_quads.off                     |     32 +
 .../data/mech-holes-shark.off                      |  15440 ++
 .../examples/Polygon_mesh_processing/data/pig.off  |   1361 +
 .../Polygon_mesh_processing/data/tet-shuffled.off  |     10 +
 .../hole_filling_example.cpp                       |     62 +
 .../hole_filling_example_OM.cpp                    |     63 +
 .../hole_filling_example_SM.cpp                    |     62 +
 .../isotropic_remeshing_example.cpp                |     71 +
 .../mesh_slicer_example.cpp                        |     56 +
 .../point_inside_example.cpp                       |     73 +
 .../point_inside_example_OM.cpp                    |     77 +
 .../polygon_soup_example.cpp                       |     54 +
 .../refine_fair_example.cpp                        |     83 +
 .../self_intersections_example.cpp                 |     42 +
 .../stitch_borders_example.cpp                     |     39 +
 .../stitch_borders_example_OM.cpp                  |     38 +
 .../triangulate_faces_example.cpp                  |     40 +
 .../triangulate_faces_example_OM.cpp               |     33 +
 .../triangulate_polyline_example.cpp               |     50 +
 .../CGAL-4.8/examples/Polyhedron/CMakeLists.txt    |     41 +
 .../examples/Polyhedron/corner.off                 |      0
 .../examples/Polyhedron/corner_with_hole.off       |      0
 .../examples/Polyhedron/corner_with_sharp_edge.off |      0
 .../examples/Polyhedron/cross.off                  |      0
 .../examples/Polyhedron/polyhedron_prog_color.cpp  |      0
 .../examples/Polyhedron/polyhedron_prog_cube.cpp   |      0
 .../Polyhedron/polyhedron_prog_cut_cube.cpp        |      0
 .../Polyhedron/polyhedron_prog_incr_builder.cpp    |      0
 .../Polyhedron/polyhedron_prog_normals.cpp         |      0
 .../examples/Polyhedron/polyhedron_prog_off.cpp    |      0
 .../examples/Polyhedron/polyhedron_prog_planes.cpp |      0
 .../examples/Polyhedron/polyhedron_prog_simple.cpp |      0
 .../examples/Polyhedron/polyhedron_prog_subdiv.cin |      0
 .../examples/Polyhedron/polyhedron_prog_subdiv.cpp |      0
 .../polyhedron_prog_subdiv_with_boundary.cin       |      0
 .../polyhedron_prog_subdiv_with_boundary.cpp       |      0
 .../examples/Polyhedron/polyhedron_prog_tetra.cpp  |      0
 .../examples/Polyhedron/polyhedron_prog_traits.cpp |      0
 .../examples/Polyhedron/polyhedron_prog_vector.cpp |      0
 .../Polyhedron/polyhedron_prog_vertex_color.cpp    |      0
 .../Polyhedron/polyhedron_prog_vertex_normal.cpp   |      0
 .../Polyhedron/polyhedron_self_intersection.cin    |      0
 .../Polyhedron/polyhedron_self_intersection.cpp    |      0
 .../CGAL-4.8/examples/Polyhedron_IO/CMakeLists.txt |     37 +
 .../examples/Polyhedron_IO/iv2off.cin              |      0
 .../examples/Polyhedron_IO/iv2off.cpp              |      0
 .../examples/Polyhedron_IO/off2iv.cin              |      0
 .../examples/Polyhedron_IO/off2iv.cpp              |      0
 .../examples/Polyhedron_IO/off2off.cin             |      0
 .../examples/Polyhedron_IO/off2off.cpp             |      0
 .../examples/Polyhedron_IO/off2stl.cin             |      0
 .../examples/Polyhedron_IO/off2stl.cpp             |      0
 .../examples/Polyhedron_IO/off2vrml.cin            |      0
 .../examples/Polyhedron_IO/off2vrml.cpp            |      0
 .../examples/Polyhedron_IO/off2wav.cin             |      0
 .../examples/Polyhedron_IO/off2wav.cpp             |      0
 .../examples/Polyhedron_IO/off_bbox.cin            |      0
 .../examples/Polyhedron_IO/off_bbox.cpp            |      0
 .../examples/Polyhedron_IO/off_glue.cin            |      0
 .../examples/Polyhedron_IO/off_glue.cpp            |      0
 .../examples/Polyhedron_IO/off_transform.cin       |      0
 .../examples/Polyhedron_IO/off_transform.cpp       |      0
 .../examples/Polyhedron_IO/polyhedron2vrml.cin     |      0
 .../examples/Polyhedron_IO/polyhedron2vrml.cpp     |      0
 .../examples/Polyhedron_IO/polyhedron_copy.cin     |      0
 .../examples/Polyhedron_IO/polyhedron_copy.cpp     |      0
 .../examples/Polyhedron_IO/terr_trian.cin          |      0
 .../examples/Polyhedron_IO/terr_trian.cpp          |      0
 .../Polyhedron_IO/triangulation_print_OFF.h        |      0
 .../Polyline_simplification_2/CMakeLists.txt       |     29 +
 .../points_and_vertices.cin                        |      0
 .../points_and_vertices.cpp                        |      0
 .../Polyline_simplification_2/simplify.cin         |      0
 .../Polyline_simplification_2/simplify.cpp         |      0
 .../Polyline_simplification_2/simplify_polygon.cin |      0
 .../Polyline_simplification_2/simplify_polygon.cpp |      0
 .../simplify_polyline.cin                          |      0
 .../simplify_polyline.cpp                          |      0
 .../CGAL-4.8/examples/Polynomial/CMakeLists.txt    |     32 +
 .../examples/Polynomial/coefficient_access.cpp     |      0
 .../CGAL-4.8/examples/Polynomial/construction.cpp  |     49 +
 .../examples/Polynomial/degree.cpp                 |      0
 .../Polynomial/gcd_up_to_constant_factor.cpp       |      0
 .../examples/Polynomial/subresultants.cpp          |      0
 .../examples/Polynomial/substitute.cpp             |      0
 .../examples/Polynomial/swap_move.cpp              |      0
 .../examples/Polytope_distance_d/CMakeLists.txt    |     29 +
 .../all_furthest_neighbors_2.cpp                   |      0
 .../Polytope_distance_d/polytope_distance_d.cpp    |      0
 .../polytope_distance_d_fast_exact.cpp             |      0
 .../examples/Polytope_distance_d/width_simplex.cpp |      0
 .../Principal_component_analysis/CMakeLists.txt    |     30 +
 .../Principal_component_analysis/barycenter.cpp    |      0
 .../Principal_component_analysis/bounding_box.cpp  |      0
 .../Principal_component_analysis/centroid.cpp      |      0
 .../linear_least_squares_fitting_points_2.cpp      |      0
 .../linear_least_squares_fitting_triangles_3.cpp   |      0
 .../examples/Profiling_tools/CMakeLists.txt        |     28 +
 .../examples/Profiling_tools/Profile_counter.cpp   |      0
 .../Profiling_tools/Profile_histogram_counter.cpp  |      0
 .../examples/Profiling_tools/Profile_timer.cpp     |      0
 .../CGAL-4.8/examples/QP_solver/CMakeLists.txt     |     51 +
 .../examples/QP_solver/convex_hull_containment.cpp |      0
 .../QP_solver/convex_hull_containment2.cpp         |      0
 .../convex_hull_containment_benchmarks.cpp         |      0
 .../examples/QP_solver/cycling.cpp                 |      0
 .../examples/QP_solver/cycling.mps                 |      0
 .../examples/QP_solver/double_qp_solver.cin        |      0
 .../examples/QP_solver/double_qp_solver.data       |      0
 .../examples/QP_solver/first_lp.cpp                |      0
 .../examples/QP_solver/first_lp.mps                |      0
 .../examples/QP_solver/first_lp_from_iterators.cpp |      0
 .../examples/QP_solver/first_lp_from_mps.cpp       |      0
 .../examples/QP_solver/first_nonnegative_lp.cpp    |      0
 .../examples/QP_solver/first_nonnegative_lp.mps    |      0
 .../first_nonnegative_lp_from_iterators.cpp        |      0
 .../QP_solver/first_nonnegative_lp_from_mps.cpp    |      0
 .../examples/QP_solver/first_nonnegative_qp.cpp    |      0
 .../examples/QP_solver/first_nonnegative_qp.mps    |      0
 .../first_nonnegative_qp_from_iterators.cpp        |      0
 .../QP_solver/first_nonnegative_qp_from_mps.cpp    |      0
 .../examples/QP_solver/first_qp.cpp                |      0
 .../examples/QP_solver/first_qp.mps                |      0
 .../QP_solver/first_qp_basic_constraints.cpp       |      0
 .../examples/QP_solver/first_qp_from_iterators.cpp |      0
 .../examples/QP_solver/first_qp_from_mps.cpp       |      0
 .../examples/QP_solver/important_variables.cpp     |      0
 .../QP_solver/infeasibility_certificate.cpp        |     68 +
 .../examples/QP_solver/integer_qp_solver.cin       |      0
 .../examples/QP_solver/integer_qp_solver.data      |      0
 .../examples/QP_solver/invert_matrix.cpp           |      0
 .../examples/QP_solver/optimality_certificate.cpp  |      0
 .../examples/QP_solver/print_first_lp.cpp          |      0
 .../QP_solver/print_first_nonnegative_lp.cpp       |      0
 .../QP_solver/print_first_nonnegative_qp.cpp       |      0
 .../examples/QP_solver/print_first_qp.cpp          |      0
 .../examples/QP_solver/rational_qp_solver.cin      |      0
 .../examples/QP_solver/rational_qp_solver.data     |      0
 .../QP_solver/solve_convex_hull_containment_lp.h   |      0
 .../QP_solver/solve_convex_hull_containment_lp2.h  |      0
 .../QP_solver/solve_convex_hull_containment_lp3.h  |      0
 .../QP_solver/unboundedness_certificate.cpp        |     75 +
 .../examples/RangeSegmentTrees/CMakeLists.txt      |     41 +
 .../RangeSegmentTrees/include/Tree_Traits.h        |      0
 .../examples/RangeSegmentTrees/range_tree_1.cpp    |      0
 .../examples/RangeSegmentTrees/range_tree_2.cpp    |      0
 .../examples/RangeSegmentTrees/range_tree_3.cpp    |      0
 .../examples/RangeSegmentTrees/range_tree_4.cpp    |      0
 .../RangeSegmentTrees/range_tree_map_2.cpp         |      0
 .../RangeSegmentTrees/range_tree_set_2.cpp         |      0
 .../examples/RangeSegmentTrees/segment_tree_1.cpp  |      0
 .../examples/RangeSegmentTrees/segment_tree_2.cpp  |      0
 .../examples/RangeSegmentTrees/segment_tree_3.cpp  |      0
 .../examples/RangeSegmentTrees/segment_tree_4.cpp  |      0
 .../RangeSegmentTrees/segment_tree_map_2.cpp       |      0
 .../RangeSegmentTrees/segment_tree_set_2.cpp       |      0
 .../RangeSegmentTrees/segment_tree_set_3.cpp       |      0
 .../RangeSegmentTrees/software_design_rgs.cpp      |      0
 .../examples/Rectangular_p_center_2/CMakeLists.txt |     26 +
 .../rectangular_p_center_2.cpp                     |      0
 3rdparty/CGAL-4.8/examples/Ridges_3/CMakeLists.txt |     52 +
 .../examples/Ridges_3/Compute_Ridges_Umbilics.cpp  |    389 +
 .../CGAL-4.8/examples/Ridges_3/PolyhedralSurf.h    |     98 +
 .../examples/Ridges_3/PolyhedralSurf_rings.h       |    170 +
 .../examples/Ridges_3/README                       |      0
 .../examples/Ridges_3/Ridges_Umbilics_SM.cpp       |    389 +
 .../CGAL-4.8/examples/Ridges_3/compute_normals.h   |     62 +
 .../Ridges_3/data/poly2x^2+y^2-0.062500.off        |      0
 .../examples/Ridges_3/skip_vcproj_auto_generation  |      0
 .../CGAL-4.8/examples/STL_Extension/CMakeLists.txt |     31 +
 .../examples/STL_Extension/Default.cpp             |      0
 .../STL_Extension/Dispatch_output_iterator.cpp     |      0
 .../examples/STL_Extension/in_place_list_prog.cpp  |      0
 .../STL_Extension/min_element_if_example.cpp       |      0
 .../STL_Extension/min_max_element_example.cpp      |      0
 .../examples/STL_Extension/unordered_map.cpp       |     19 +
 .../Scale_space_reconstruction_3/CMakeLists.txt    |     40 +
 .../Scale_space_reconstruction_3/data/kitten.off   |      0
 .../Scale_space_reconstruction_3/scale_space.cmd   |      0
 .../Scale_space_reconstruction_3/scale_space.cpp   |     55 +
 .../scale_space_incremental.cmd                    |      0
 .../scale_space_incremental.cpp                    |      0
 .../scale_space_manifold.cmd}                      |      0
 .../scale_space_manifold.cpp                       |     69 +
 .../Segment_Delaunay_graph_2/CMakeLists.txt        |     32 +
 .../Segment_Delaunay_graph_2/data/sites.cin        |      0
 .../Segment_Delaunay_graph_2/data/sites2.cin       |      0
 .../Segment_Delaunay_graph_2/data/sitesx.cin       |      0
 .../Segment_Delaunay_graph_2/data/sitesxx.cin      |      0
 .../Segment_Delaunay_graph_2/data/sitesxx.rb.cin   |      0
 .../Segment_Delaunay_graph_2/sdg-count-sites.cpp   |      0
 .../sdg-fast-sp-polygon.cpp                        |      0
 .../Segment_Delaunay_graph_2/sdg-fast-sp.cpp       |      0
 .../sdg-filtered-traits.cpp                        |      0
 .../Segment_Delaunay_graph_2/sdg-info-set.cpp      |      0
 .../Segment_Delaunay_graph_2/sdg-red-blue-info.cpp |    137 +
 .../Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp |      0
 .../Segment_Delaunay_graph_Linf_2/CMakeLists.txt   |     35 +
 .../Segment_Delaunay_graph_Linf_2}/data/sites.cin  |      0
 .../Segment_Delaunay_graph_Linf_2}/data/sites2.cin |      0
 .../Segment_Delaunay_graph_Linf_2}/data/sitesx.cin |      0
 .../data/sitesxx.cin                               |      0
 .../data/sitesxx.rb.cin                            |      0
 .../print-sdg-linf.cpp                             |     56 +
 .../sdg-count-sites-linf.cpp                       |     71 +
 .../sdg-fast-sp-linf.cpp                           |     44 +
 .../sdg-fast-sp-polygon-linf.cpp                   |     61 +
 .../sdg-filtered-traits-linf.cpp                   |     44 +
 .../sdg-info-set-linf.cpp                          |    246 +
 .../sdg-red-blue-info-linf.cpp                     |    139 +
 .../sdg-voronoi-edges-exact-linf.cpp               |    131 +
 .../sdg-voronoi-edges-linf.cpp                     |    104 +
 .../examples/Skin_surface_3/CMakeLists.txt         |     44 +
 .../examples/Skin_surface_3/data/1IYE.pdb          |      0
 .../examples/Skin_surface_3/data/1mvm.pdb          |      0
 .../examples/Skin_surface_3/data/1t7i.pdb          |      0
 .../examples/Skin_surface_3/data/4lfq.pdb          |      0
 .../examples/Skin_surface_3/data/caffeine.cin      |      0
 .../Skin_surface_3/data/molecule_tunnel.cin        |      0
 .../include/extract_balls_from_pdb.h               |      0
 .../Skin_surface_3/skin_surface_pdb_reader.cpp     |      0
 ...n_surface_retrieve_defining_weighted_points.cpp |      0
 .../Skin_surface_3/skin_surface_simple.cpp         |      0
 .../Skin_surface_3/skin_surface_subdiv.cpp         |      0
 .../skin_surface_subdiv_with_normals.cpp           |      0
 .../examples/Skin_surface_3/skin_surface_writer.h  |      0
 .../Skin_surface_3/union_of_balls_simple.cpp       |      0
 .../Skin_surface_3/union_of_balls_subdiv.cpp       |      0
 .../examples/Snap_rounding_2/CMakeLists.txt        |     28 +
 .../Snap_rounding_2/data/snap_rounding_data        |      0
 .../examples/Snap_rounding_2/snap_rounding.cpp     |      0
 .../Snap_rounding_2/snap_rounding_data.cpp         |      0
 .../Snap_rounding_2/snap_rounding_to_integer.cpp   |      0
 .../examples/Solver_interface/CMakeLists.txt       |     35 +
 .../Solver_interface/diagonalize_matrix.cpp        |     51 +
 .../singular_value_decomposition.cpp               |     37 +
 .../examples/Solver_interface/sparse_solvers.cpp   |     49 +
 .../examples/Spatial_searching/CMakeLists.txt      |     92 +
 .../examples/Spatial_searching/Distance.h          |      0
 .../examples/Spatial_searching/Point.h             |      0
 .../examples/Spatial_searching/circular_query.cpp  |      0
 .../examples/Spatial_searching/data/tripod.off     |      0
 .../Spatial_searching/distance_browsing.cpp        |      0
 .../Spatial_searching/fuzzy_range_query.cpp        |      0
 .../general_neighbor_searching.cpp                 |      0
 .../Spatial_searching/iso_rectangle_2_query.cpp    |      0
 .../nearest_neighbor_searching.cpp                 |      0
 .../searching_polyhedron_vertices.cpp              |      0
 ...ching_polyhedron_vertices_with_fuzzy_sphere.cpp |     55 +
 .../searching_sphere_orthogonally.cpp              |      0
 .../searching_surface_mesh_vertices.cpp            |      0
 .../searching_with_circular_query.cpp              |     62 +
 .../searching_with_point_with_info.cpp             |      0
 .../searching_with_point_with_info_inplace.cpp     |      0
 .../searching_with_point_with_info_pmap.cpp        |      0
 .../Spatial_searching/splitter_worst_cases.cpp     |      0
 .../user_defined_point_and_distance.cpp            |      0
 .../using_fair_splitting_rule.cpp                  |      0
 .../weighted_Minkowski_distance.cpp                |      0
 .../examples/Spatial_sorting/CMakeLists.txt        |     36 +
 .../Spatial_sorting/example_delaunay_2.cpp         |      0
 .../examples/Spatial_sorting/hilbert.cpp           |      0
 .../examples/Spatial_sorting/hilbert_policies.cpp  |      0
 .../Spatial_sorting/hilbert_sort_on_sphere.cpp     |     49 +
 .../examples/Spatial_sorting/myPoint.cpp           |      0
 .../Spatial_sorting/small_example_delaunay_2.cpp   |      0
 .../examples/Spatial_sorting/sort_indices.cpp      |      0
 .../sp_sort_using_property_map_2.cpp               |      0
 .../sp_sort_using_property_map_3.cpp               |      0
 .../sp_sort_using_property_map_d.cpp               |      0
 .../Spatial_sorting/spatial_sort_on_sphere.cpp     |     49 +
 .../examples/Straight_skeleton_2/CMakeLists.txt    |     34 +
 .../Create_offset_polygons_2.cpp                   |      0
 .../Create_saop_from_polygon_with_holes_2.cpp      |      0
 .../Create_skeleton_and_offset_polygons_2.cpp      |      0
 ...e_skeleton_and_offset_polygons_with_holes_2.cpp |     57 +
 .../Create_straight_skeleton_2.cpp                 |      0
 ...straight_skeleton_from_polygon_with_holes_2.cpp |      0
 .../examples/Straight_skeleton_2/Low_level_API.cpp |      0
 .../Straight_skeleton_2/Show_offset_polygon.cpp    |      0
 .../Straight_skeleton_2/Show_straight_skeleton.cpp |      0
 .../examples/Straight_skeleton_2/dump_to_eps.h     |    171 +
 .../Straight_skeleton_2/input_file_format.txt      |      0
 .../CGAL-4.8/examples/Straight_skeleton_2/print.h  |     85 +
 .../examples/Straight_skeleton_2/sample_1.dat      |      0
 .../examples/Straight_skeleton_2/sample_2.dat      |      0
 .../examples/Straight_skeleton_2/sample_3.dat      |      0
 .../examples/Straight_skeleton_2/sample_4.dat      |      0
 .../examples/Stream_lines_2/CMakeLists.txt         |     27 +
 .../examples/Stream_lines_2/data/datap.tri.cin     |      0
 .../examples/Stream_lines_2/data/datav.tri.cin     |      0
 .../Stream_lines_2/data/irregular_data.tri.cin     |      0
 .../examples/Stream_lines_2/data/vnoise.vec.cin    |      0
 .../examples/Stream_lines_2/stl_regular_field.cpp  |      0
 .../Stream_lines_2/stl_triangular_field.cpp        |      0
 .../examples/Subdivision_method_3/CMakeLists.txt   |     29 +
 .../CatmullClark_subdivision.cpp                   |      0
 .../Customized_subdivision.cpp                     |      0
 .../Subdivision_method_3/DooSabin_subdivision.cpp  |      0
 .../Subdivision_method_3/Loop_subdivision.cpp      |      0
 .../examples/Subdivision_method_3/data/corner.off  |      0
 .../data/corner_tris_with_hole.off                 |      0
 .../Subdivision_method_3/data/corner_with_hole.off |      0
 .../data/corner_with_sharp_edge.off                |      0
 .../examples/Subdivision_method_3/data/cross.off   |      0
 .../Subdivision_method_3/data/quint_tris.off       |      0
 .../CGAL-4.8/examples/Surface_mesh/CMakeLists.txt  |     35 +
 .../examples/Surface_mesh/cube.off                 |      0
 .../examples/Surface_mesh/data/elephant.off        |      0
 .../examples/Surface_mesh/data/knot1.off           |      0
 .../CGAL-4.8/examples/Surface_mesh/data/quad.off   |      7 +
 .../examples/Surface_mesh/data/triangle.off        |      6 +
 .../CGAL-4.8/examples/Surface_mesh/sm_aabbtree.cpp |     90 +
 .../examples/Surface_mesh/sm_bgl.cmd               |      0
 .../examples/Surface_mesh/sm_bgl.cpp               |      0
 .../examples/Surface_mesh/sm_circulators.cpp       |      0
 .../examples/Surface_mesh/sm_do_intersect.cmd      |      0
 .../examples/Surface_mesh/sm_do_intersect.cpp      |      0
 .../examples/Surface_mesh/sm_iterators.cpp         |     69 +
 .../CGAL-4.8/examples/Surface_mesh/sm_join.cpp     |     40 +
 .../examples/Surface_mesh/sm_kruskal.cmd           |      0
 .../examples/Surface_mesh/sm_kruskal.cpp           |      0
 .../CGAL-4.8/examples/Surface_mesh/sm_memory.cpp   |     67 +
 .../examples/Surface_mesh/sm_properties.cpp        |      0
 .../Surface_mesh_deformation/CMakeLists.txt        |     48 +
 .../all_roi_assign_example.cpp                     |      0
 .../all_roi_assign_example_Surface_mesh.cpp        |      0
 .../all_roi_assign_example_custom_polyhedron.cpp   |    156 +
 .../all_roi_assign_example_with_OpenMesh.cpp       |      0
 .../custom_weight_for_edges_example.cpp            |     85 +
 .../Surface_mesh_deformation}/data/plane.off       |      0
 .../deform_polyhedron_with_custom_pmap_example.cpp |      0
 .../k_ring_roi_translate_rotate_Surface_mesh.cpp   |      0
 .../k_ring_roi_translate_rotate_example.cpp        |      0
 .../Authalic_parameterization.cmd                  |      0
 .../Authalic_parameterization.cpp                  |    110 +
 .../Surface_mesh_parameterization/CMakeLists.txt   |     75 +
 .../Complete_parameterization_example.cmd          |      0
 .../Complete_parameterization_example.cpp          |    285 +
 .../Mesh_cutting_parameterization.cmd              |      0
 .../Mesh_cutting_parameterization.cpp              |    196 +
 .../Simple_parameterization.cmd                    |      0
 .../Simple_parameterization.cpp                    |    108 +
 .../Square_border_parameterization.cmd             |      0
 .../Square_border_parameterization.cpp             |    115 +
 .../data/check_64x64.bmp                           |    Bin
 .../Surface_mesh_parameterization/data/holes.off   |      0
 .../data/mannequin-devil.off                       |      0
 .../data/mask_cone.off                             |      0
 .../data/nefertiti.off                             |      0
 .../data/parameterization.mtl                      |      0
 .../Surface_mesh_parameterization/data/rotor.off   |      0
 .../data/sphere966.off                             |      0
 .../data/three_peaks.off                           |      0
 .../include/Mesh_cutter.h                          |      0
 .../Parameterization_polyhedron_adaptor_ex.h       |      0
 .../include/Polyhedron_ex.h                        |      0
 .../polyhedron_ex_parameterization.cmd             |      0
 .../polyhedron_ex_parameterization.cpp             |    488 +
 .../quick_test_suite.bat                           |     10 +
 .../quick_test_suite.sh                            |    109 +
 .../Surface_mesh_segmentation/CMakeLists.txt       |     73 +
 .../Surface_mesh_segmentation/data/cactus.off      |      0
 .../sdf_values_example.cpp                         |      0
 ...gmentation_from_sdf_values_OpenMesh_example.cpp |     68 +
 .../segmentation_from_sdf_values_SM_example.cpp    |      0
 .../segmentation_from_sdf_values_example.cpp       |      0
 .../segmentation_via_sdf_values_example.cpp        |      0
 .../segmentation_with_facet_ids_example.cpp        |      0
 .../Surface_mesh_shortest_path/CMakeLists.txt      |     38 +
 .../Surface_mesh_shortest_path}/data/elephant.off  |      0
 .../shortest_path_sequence.cpp                     |    124 +
 .../shortest_paths_OpenMesh.cpp                    |     71 +
 .../shortest_paths_multiple_sources.cpp            |     80 +
 .../shortest_paths_no_id.cpp                       |     84 +
 .../shortest_paths_with_id.cpp                     |     70 +
 .../Surface_mesh_simplification/CMakeLists.txt     |     78 +
 .../Surface_mesh_simplification/cube-meshed.off    |      0
 .../examples/Surface_mesh_simplification/cube.off  |      0
 .../edge_collapse_OpenMesh.cpp                     |     97 +
 .../edge_collapse_constrain_sharp_edges.cmd        |      0
 .../edge_collapse_constrain_sharp_edges.cpp        |    189 +
 ...edge_collapse_constrained_border_polyhedron.cmd |      0
 ...edge_collapse_constrained_border_polyhedron.cpp |    125 +
 ...ge_collapse_constrained_border_surface_mesh.cmd |      0
 ...ge_collapse_constrained_border_surface_mesh.cpp |    120 +
 .../edge_collapse_enriched_polyhedron.cmd          |      0
 .../edge_collapse_enriched_polyhedron.cpp          |    187 +
 .../edge_collapse_polyhedron.cmd                   |      0
 .../edge_collapse_polyhedron.cpp                   |     55 +
 .../edge_collapse_surface_mesh.cmd                 |      0
 .../edge_collapse_surface_mesh.cpp                 |    161 +
 .../mesh_with_border.off                           |      0
 .../Surface_mesh_skeletonization/CMakeLists.txt    |     41 +
 .../MCF_Skeleton_example.cpp                       |     72 +
 .../MCF_Skeleton_sm_example.cpp                    |     70 +
 .../Surface_mesh_skeletonization/data/161.off      |  41476 ++++++
 .../data/elephant.off                              |      0
 .../segmentation_example.cpp                       |     98 +
 .../simple_mcfskel_example.cpp                     |     79 +
 .../simple_mcfskel_sm_example.cpp                  |     57 +
 .../examples/Surface_mesher/CMakeLists.txt         |     30 +
 .../examples/Surface_mesher/data/skull_2.9.inr     |    Bin
 .../examples/Surface_mesher/data/triceratops.off   |      0
 .../Surface_mesher/mesh_a_3d_gray_image.cpp        |      0
 .../Surface_mesher/mesh_an_implicit_function.cpp   |      0
 .../Surface_mesher/skip_vcproj_auto_generation     |      0
 .../CGAL-4.8/examples/Sweep_line_2/CMakeLists.txt  |     63 +
 .../examples/Sweep_line_2}/sweep_line.cpp          |      0
 3rdparty/CGAL-4.8/examples/TDS_3/CMakeLists.txt    |     27 +
 .../examples/TDS_3}/linking_2d_and_3d.cpp          |      0
 .../examples/TDS_3}/tds.cpp                        |      0
 .../CGAL-4.8/examples/Triangulation/CMakeLists.txt |     38 +
 .../Triangulation/barycentric_subdivision.cpp      |      0
 .../Triangulation/delaunay_triangulation.cpp       |     78 +
 .../examples/Triangulation/triangulation.cpp       |     53 +
 .../examples/Triangulation/triangulation1.cpp      |      0
 .../examples/Triangulation/triangulation2.cpp      |      0
 .../triangulation_data_structure_dynamic.cpp       |      0
 .../triangulation_data_structure_static.cpp        |      0
 .../examples/Triangulation_2/CMakeLists.txt        |     43 +
 .../examples/Triangulation_2/README                |      0
 .../examples/Triangulation_2/adding_handles.cpp    |      0
 .../examples/Triangulation_2/colored_face.cpp      |      0
 .../examples/Triangulation_2/constrained.cpp       |      0
 .../Triangulation_2/constrained_hierarchy_plus.cpp |      0
 .../examples/Triangulation_2/constrained_plus.cpp  |      0
 .../Triangulation_2/copy_triangulation_2.cpp       |      0
 .../examples/Triangulation_2/data/constrained.cin  |      0
 .../examples/Triangulation_2/data/regular.cin      |      0
 .../examples/Triangulation_2/data/terrain.cin      |      0
 .../Triangulation_2/data/triangulation_prog1.cin   |      0
 .../examples/Triangulation_2/data/voronoi.cin      |      0
 .../examples/Triangulation_2/hierarchy.cpp         |      0
 .../info_insert_with_pair_iterator_2.cpp           |      0
 .../info_insert_with_pair_iterator_regular_2.cpp   |      0
 .../info_insert_with_transform_iterator_2.cpp      |      0
 .../info_insert_with_zip_iterator_2.cpp            |      0
 .../Triangulation_2/polygon_triangulation.cpp      |      0
 .../Triangulation_2/polylines_triangulation.cpp    |      0
 .../Triangulation_2/print_cropped_voronoi.cpp      |      0
 .../examples/Triangulation_2/regular.cpp           |      0
 .../examples/Triangulation_2/terrain.cpp           |      0
 .../Triangulation_2/triangulation_prog1.cpp        |      0
 .../examples/Triangulation_2/voronoi.cpp           |      0
 .../examples/Triangulation_3/CMakeLists.txt        |     48 +
 .../examples/Triangulation_3/README                |      0
 .../examples/Triangulation_3/adding_handles_3.cpp  |      0
 .../examples/Triangulation_3/color.cpp             |      0
 .../Triangulation_3/copy_triangulation_3.cpp       |      0
 .../examples/Triangulation_3/fast_location_3.cpp   |     35 +
 .../examples/Triangulation_3/find_conflicts_3.cpp  |      0
 .../info_insert_with_pair_iterator.cpp             |      0
 .../info_insert_with_pair_iterator_regular.cpp     |      0
 .../info_insert_with_transform_iterator.cpp        |      0
 .../info_insert_with_zip_iterator.cpp              |      0
 ...parallel_insertion_and_removal_in_regular_3.cpp |      0
 .../parallel_insertion_in_delaunay_3.cpp           |      0
 .../examples/Triangulation_3/regular_3.cpp         |      0
 .../Triangulation_3/sequential_parallel.cpp        |     56 +
 .../Triangulation_3/simple_triangulation_3.cpp     |      0
 .../examples/Triangulation_3/simplex.cpp           |      0
 .../CGAL-4.8/examples/Visibility_2/CMakeLists.txt  |     27 +
 .../Visibility_2/general_polygon_example.cpp       |     67 +
 .../Visibility_2/simple_polygon_visibility_2.cpp   |     74 +
 .../examples/Voronoi_diagram_2/CMakeLists.txt      |     27 +
 .../examples/Voronoi_diagram_2/data/1D.ag.cin      |      0
 .../examples/Voronoi_diagram_2/data/data1.ag.cin   |      0
 .../examples/Voronoi_diagram_2/data/data1.dt.cin   |      0
 .../examples/Voronoi_diagram_2/data/data1.svd.cin  |      0
 .../examples/Voronoi_diagram_2/data/data2.ag.cin   |      0
 .../examples/Voronoi_diagram_2/data/data3.ag.cin   |      0
 .../Voronoi_diagram_2/data/degenerate.ag.cin       |      0
 .../Voronoi_diagram_2/data/queries1.dt.cin         |      0
 .../Voronoi_diagram_2/data/queries1.svd.cin        |      0
 .../Voronoi_diagram_2/vd_2_point_location.cpp      |      0
 .../vd_2_point_location_sdg_linf.cpp               |     90 +
 .../include/CGAL/AABB_C3T3_triangle_primitive.h    |    115 +
 .../CGAL/AABB_face_graph_triangle_primitive.h      |      0
 .../CGAL/AABB_halfedge_graph_segment_primitive.h   |      0
 .../include/CGAL/AABB_intersections.h              |      0
 .../include/CGAL/AABB_polyhedral_oracle.h          |      0
 .../CGAL/AABB_polyhedron_segment_primitive.h       |      0
 .../CGAL/AABB_polyhedron_triangle_primitive.h      |      0
 .../include/CGAL/AABB_primitive.h                  |      0
 .../include/CGAL/AABB_segment_primitive.h          |      0
 .../include/CGAL/AABB_traits.h                     |      0
 3rdparty/CGAL-4.8/include/CGAL/AABB_tree.h         |   1239 +
 .../include/CGAL/AABB_triangle_primitive.h         |      0
 .../CGAL/Advancing_front_surface_reconstruction.h  |   2638 +
 ...cing_front_surface_reconstruction_cell_base_3.h |    253 +
 ...ng_front_surface_reconstruction_vertex_base_3.h |    286 +
 .../include/CGAL/Aff_transformation_2.h            |      0
 .../include/CGAL/Aff_transformation_3.h            |      0
 .../include/CGAL/Algebraic_extension_traits.h      |      0
 .../include/CGAL/Algebraic_kernel_converter.h      |      0
 .../Algebraic_kernel_d/Algebraic_curve_kernel_2.h  |      0
 .../CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h   |      0
 .../Algebraic_real_quadratic_refinement_rep_bfi.h  |      0
 .../CGAL/Algebraic_kernel_d/Algebraic_real_rep.h   |      0
 .../Algebraic_kernel_d/Algebraic_real_rep_bfi.h    |      0
 .../Bitstream_coefficient_kernel.h                 |      0
 .../Bitstream_coefficient_kernel_at_alpha.h        |      0
 .../CGAL/Algebraic_kernel_d/Bitstream_descartes.h  |      0
 .../Bitstream_descartes_E08_tree.h                 |      0
 .../Bitstream_descartes_rndl_tree.h                |      0
 .../Bitstream_descartes_rndl_tree_traits.h         |      0
 .../CGAL/Algebraic_kernel_d/Curve_analysis_2.h     |   2559 +
 .../Algebraic_kernel_d/Curve_pair_analysis_2.h     |      0
 .../include/CGAL/Algebraic_kernel_d/Descartes.h    |      0
 .../CGAL/Algebraic_kernel_d/Event_line_builder.h   |      0
 .../include/CGAL/Algebraic_kernel_d/Float_traits.h |      0
 .../CGAL/Algebraic_kernel_d/Interval_evaluate_1.h  |      0
 .../CGAL/Algebraic_kernel_d/Interval_evaluate_2.h  |      0
 .../CGAL/Algebraic_kernel_d/LRU_hashed_map.h       |      0
 .../Algebraic_kernel_d/Real_embeddable_extension.h |      0
 .../include/CGAL/Algebraic_kernel_d/Real_roots.h   |      0
 .../CGAL/Algebraic_kernel_d/Shear_controller.h     |      0
 .../CGAL/Algebraic_kernel_d/Shear_transformation.h |      0
 .../CGAL/Algebraic_kernel_d/Status_line_CA_1.h     |      0
 .../CGAL/Algebraic_kernel_d/Status_line_CPA_1.h    |      0
 .../CGAL/Algebraic_kernel_d/Xy_coordinate_2.h      |    785 +
 .../algebraic_curve_kernel_2_tools.h               |      0
 .../CGAL/Algebraic_kernel_d/bound_between_1.h      |      0
 .../CGAL/Algebraic_kernel_d/construct_binary.h     |      0
 .../include/CGAL/Algebraic_kernel_d/enums.h        |      0
 .../include/CGAL/Algebraic_kernel_d/exceptions.h   |      0
 .../include/CGAL/Algebraic_kernel_d/flags.h        |      0
 .../include/CGAL/Algebraic_kernel_d/macros.h       |      0
 .../CGAL/Algebraic_kernel_d/refine_zero_against.h  |      0
 .../include/CGAL/Algebraic_kernel_d/shear.h        |      0
 .../univariate_polynomial_utils.h                  |      0
 .../include/CGAL/Algebraic_kernel_d_1.h            |      0
 .../include/CGAL/Algebraic_kernel_d_2.h            |      0
 ...function_objects_on_roots_and_polynomials_2_2.h |      0
 ...nal_functions_comparison_root_for_circles_2_2.h |      0
 ...functions_on_roots_and_polynomial_1_2_and_2_2.h |      0
 ...ternal_functions_on_roots_and_polynomials_2_2.h |      0
 .../CGAL/Algebraic_kernel_for_circles_2_2.h        |      0
 ...function_objects_on_roots_and_polynomials_2_3.h |      0
 ...nal_functions_comparison_root_for_spheres_2_3.h |      0
 ...functions_on_roots_and_polynomial_1_3_and_2_3.h |      0
 ...ternal_functions_on_roots_and_polynomials_1_3.h |      0
 ...ternal_functions_on_roots_and_polynomials_2_3.h |      0
 .../CGAL/Algebraic_kernel_for_spheres_2_3.h        |      0
 .../include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h    |      0
 .../include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h    |      0
 .../include/CGAL/Algebraic_structure_traits.h      |      0
 .../include/CGAL/Alpha_shape_2.h                   |      0
 .../include/CGAL/Alpha_shape_3.h                   |      0
 .../include/CGAL/Alpha_shape_cell_base_3.h         |      0
 .../include/CGAL/Alpha_shape_euclidean_traits_2.h  |      0
 .../include/CGAL/Alpha_shape_euclidean_traits_3.h  |      0
 .../include/CGAL/Alpha_shape_face_base_2.h         |      0
 .../include/CGAL/Alpha_shape_vertex_base_2.h       |      0
 .../include/CGAL/Alpha_shape_vertex_base_3.h       |      0
 .../CGAL-4.8/include/CGAL/Apollonius_graph_2.h     |   1345 +
 .../Apollonius_graph_2/Apollonius_graph_2_impl.h   |      0
 .../Apollonius_graph_hierarchy_2_impl.h            |      0
 .../Bounded_side_of_ccw_circle_C2.h                |      0
 .../CGAL/Apollonius_graph_2/Compare_weight_2.h     |      0
 .../include/CGAL/Apollonius_graph_2/Compare_x_2.h  |      0
 .../include/CGAL/Apollonius_graph_2/Compare_y_2.h  |      0
 .../CGAL/Apollonius_graph_2/Constructions_C2.h     |      0
 .../CGAL/Apollonius_graph_2/Constructions_ftC2.h   |      0
 .../CGAL/Apollonius_graph_2/Constructions_rtH2.h   |      0
 .../CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h |      0
 .../CGAL/Apollonius_graph_2/Finite_edge_test_C2.h  |      0
 .../include/CGAL/Apollonius_graph_2/Incircle8_C2.h |      0
 .../include/CGAL/Apollonius_graph_2/Incircle_C2.h  |      0
 .../Apollonius_graph_2/Infinite_edge_test_C2.h     |      0
 .../Apollonius_graph_2/Is_degenerate_edge_C2.h     |      0
 .../include/CGAL/Apollonius_graph_2/Is_hidden_C2.h |      0
 .../CGAL/Apollonius_graph_2/Kernel_wrapper_2.h     |      0
 .../CGAL/Apollonius_graph_2/Orientation8_C2.h      |      0
 .../CGAL/Apollonius_graph_2/Orientation_2.h        |      0
 .../Oriented_side_of_bisector_C2.h                 |      0
 .../Predicate_constructions_C2.h                   |      0
 .../CGAL/Apollonius_graph_2/Predicates_C2.h        |      0
 .../CGAL/Apollonius_graph_2/Traits_wrapper_2.h     |      0
 .../include/CGAL/Apollonius_graph_2/basic.h        |      0
 .../include/CGAL/Apollonius_graph_2/check_filter.h |      0
 .../CGAL/Apollonius_graph_2/comparator_profiler.h  |      0
 .../CGAL/Apollonius_graph_2/compare_quadratic.h    |      0
 .../CGAL/Apollonius_graph_2/predicate_profiler.h   |      0
 .../Apollonius_graph_uncertain_filtered_traits_2.h |      0
 .../uncertain/Uncertain_is_hidden_C2.h             |      0
 .../Uncertain_oriented_side_of_bisector_C2.h       |      0
 .../uncertain/Uncertain_vertex_conflict_2.h        |      0
 .../uncertain/uncertain_functions_on_signs.h       |      0
 .../CGAL/Apollonius_graph_adaptation_policies_2.h  |      0
 .../CGAL/Apollonius_graph_adaptation_traits_2.h    |      0
 .../CGAL/Apollonius_graph_data_structure_2.h       |      0
 .../CGAL/Apollonius_graph_filtered_traits_2.h      |      0
 .../include/CGAL/Apollonius_graph_hierarchy_2.h    |      0
 .../Apollonius_graph_hierarchy_vertex_base_2.h     |     71 +
 .../include/CGAL/Apollonius_graph_traits_2.h       |      0
 .../include/CGAL/Apollonius_graph_vertex_base_2.h  |      0
 3rdparty/CGAL-4.8/include/CGAL/Apollonius_site_2.h |     90 +
 .../include/CGAL/Approximate_min_ellipsoid_d.h     |      0
 .../Approximate_min_ellipsoid_d_configure.h        |      0
 .../Approximate_min_ellipsoid_d_debug.h            |      0
 .../Approximate_min_ellipsoid_d_impl.h             |    282 +
 .../Khachiyan_approximation.h                      |      0
 .../Khachiyan_approximation_impl.h                 |    667 +
 .../CGAL/Approximate_min_ellipsoid_d_traits_2.h    |      0
 .../CGAL/Approximate_min_ellipsoid_d_traits_3.h    |      0
 .../CGAL/Approximate_min_ellipsoid_d_traits_d.h    |      0
 .../include/CGAL/Arithmetic_kernel.h               |      0
 .../Arithmetic_kernel/Arithmetic_kernel_base.h     |      0
 .../include/CGAL/Arr_Bezier_curve_traits_2.h       |    877 +
 3rdparty/CGAL-4.8/include/CGAL/Arr_accessor.h      |    948 +
 .../include/CGAL/Arr_algebraic_segment_traits_2.h  |      0
 .../include/CGAL/Arr_batched_point_location.h      |      0
 .../CGAL/Arr_bounded_planar_topology_traits_2.h    |      0
 .../include/CGAL/Arr_circle_segment_traits_2.h     |    745 +
 .../include/CGAL/Arr_circular_arc_traits_2.h       |      0
 .../include/CGAL/Arr_circular_line_arc_traits_2.h  |      0
 .../CGAL-4.8/include/CGAL/Arr_conic_traits_2.h     |    875 +
 .../CGAL/Arr_consolidated_curve_data_traits_2.h    |      0
 .../include/CGAL/Arr_counting_traits_2.h           |      0
 .../include/CGAL/Arr_curve_data_traits_2.h         |      0
 3rdparty/CGAL-4.8/include/CGAL/Arr_dcel_base.h     |   1418 +
 .../include/CGAL/Arr_default_dcel.h                |      0
 .../include/CGAL/Arr_default_overlay_traits.h      |      0
 ...irectional_non_caching_segment_basic_traits_2.h |    150 +
 .../include/CGAL/Arr_enums.h                       |      0
 .../include/CGAL/Arr_extended_dcel.h               |      0
 .../include/CGAL/Arr_face_index_map.h              |      0
 .../include/CGAL/Arr_face_map.h                    |      0
 ...Arr_geodesic_arc_on_sphere_partition_traits_2.h |      0
 .../CGAL/Arr_geodesic_arc_on_sphere_traits_2.h     |   3247 +
 .../include/CGAL/Arr_geometry_traits/Arr_plane_3.h |      0
 .../Bezier_bounding_rational_traits.h              |      0
 .../CGAL/Arr_geometry_traits/Bezier_cache.h        |      0
 .../CGAL/Arr_geometry_traits/Bezier_curve_2.h      |    957 +
 .../CGAL/Arr_geometry_traits/Bezier_point_2.h      |      0
 .../CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h |   2836 +
 .../CGAL/Arr_geometry_traits/Circle_segment_2.h    |   2492 +
 .../include/CGAL/Arr_geometry_traits/Conic_arc_2.h |   1870 +
 .../Arr_geometry_traits/Conic_intersections_2.h    |      0
 .../CGAL/Arr_geometry_traits/Conic_point_2.h       |      0
 .../Arr_geometry_traits/Conic_x_monotone_arc_2.h   |   2140 +
 .../Consolidated_curve_data_aux.h                  |      0
 .../CGAL/Arr_geometry_traits/Curve_data_aux.h      |      0
 .../CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h    |      0
 .../Arr_geometry_traits/IO/Polycurve_2_iostream.h  |    163 +
 .../include/CGAL/Arr_geometry_traits/Polycurve_2.h |    465 +
 .../include/CGAL/Arr_geometry_traits/Polyline_2.h  |    145 +
 .../CGAL/Arr_geometry_traits/Rational_arc_2.h      |      0
 .../CGAL/Arr_geometry_traits/Segment_assertions.h  |      0
 .../CGAL/Arr_geometry_traits/de_Casteljau_2.h      |      0
 .../include/CGAL/Arr_landmarks_point_location.h    |      0
 .../include/CGAL/Arr_line_arc_traits_2.h           |      0
 .../CGAL-4.8/include/CGAL/Arr_linear_traits_2.h    |   2025 +
 .../include/CGAL/Arr_naive_point_location.h        |      0
 .../CGAL/Arr_non_caching_segment_basic_traits_2.h  |    278 +
 .../CGAL/Arr_non_caching_segment_traits_2.h        |    429 +
 .../include/CGAL/Arr_observer.h                    |      0
 .../include/CGAL/Arr_overlay.h                     |      0
 .../include/CGAL/Arr_overlay_2.h                   |      0
 .../Arr_batched_point_location_traits_2.h          |      0
 .../Arr_point_location/Arr_landmarks_pl_impl.h     |      0
 .../Arr_point_location/Arr_lm_generator_base.h     |      0
 .../Arr_point_location/Arr_lm_grid_generator.h     |      0
 .../Arr_point_location/Arr_lm_halton_generator.h   |      0
 .../Arr_lm_middle_edges_generator.h                |      0
 .../Arr_point_location/Arr_lm_nearest_neighbor.h   |      0
 .../Arr_point_location/Arr_lm_random_generator.h   |      0
 .../Arr_lm_specified_points_generator.h            |      0
 .../Arr_point_location/Arr_lm_vertices_generator.h |      0
 .../Arr_naive_point_location_impl.h                |      0
 .../Arr_simple_point_location_impl.h               |    444 +
 .../Arr_point_location/Arr_trapezoid_ric_pl_impl.h |      0
 .../Arr_triangulation_pl_functions.h               |      0
 .../Arr_point_location/Arr_triangulation_pl_impl.h |      0
 .../Arr_walk_along_line_pl_impl.h                  |      0
 .../CGAL/Arr_point_location/Td_X_trapezoid.h       |      0
 .../CGAL/Arr_point_location/Td_active_edge.h       |      0
 .../Td_active_fictitious_vertex.h                  |      0
 .../CGAL/Arr_point_location/Td_active_trapezoid.h  |      0
 .../CGAL/Arr_point_location/Td_active_vertex.h     |      0
 .../include/CGAL/Arr_point_location/Td_dag.h       |      0
 .../include/CGAL/Arr_point_location/Td_dag_node.h  |      0
 .../CGAL/Arr_point_location/Td_inactive_edge.h     |      0
 .../Td_inactive_fictitious_vertex.h                |      0
 .../Arr_point_location/Td_inactive_trapezoid.h     |      0
 .../CGAL/Arr_point_location/Td_inactive_vertex.h   |      0
 .../include/CGAL/Arr_point_location/Td_ninetuple.h |      0
 .../CGAL/Arr_point_location/Td_predicates.h        |      0
 .../include/CGAL/Arr_point_location/Td_traits.h    |      0
 .../CGAL/Arr_point_location/Td_traits_functions.h  |      0
 .../Trapezoidal_decomposition_2.h                  |   2317 +
 .../Trapezoidal_decomposition_2_impl.h             |   3112 +
 .../Trapezoidal_decomposition_2_iostream.h         |      0
 .../Trapezoidal_decomposition_2_misc.h             |      0
 .../include/CGAL/Arr_point_location_result.h       |      0
 .../include/CGAL/Arr_polycurve_basic_traits_2.h    |   2713 +
 .../CGAL-4.8/include/CGAL/Arr_polycurve_traits_2.h |   1184 +
 .../CGAL-4.8/include/CGAL/Arr_polyline_traits_2.h  |    600 +
 .../include/CGAL/Arr_rat_arc/Algebraic_point_2.h   |      0
 .../CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h      |    125 +
 .../include/CGAL/Arr_rat_arc/Cache.h               |      0
 .../include/CGAL/Arr_rat_arc/Rational_arc_d_1.h    |   2606 +
 .../include/CGAL/Arr_rat_arc/Rational_function.h   |      0
 .../Rational_function_canonicalized_pair.h         |    510 +
 .../Arr_rat_arc/Rational_function_ordered_pair.h   |      0
 .../CGAL/Arr_rat_arc/Rational_function_pair.h      |      0
 .../CGAL-4.8/include/CGAL/Arr_rat_arc/Singleton.h  |     58 +
 .../include/CGAL/Arr_rational_function_traits_2.h  |   1315 +
 .../CGAL-4.8/include/CGAL/Arr_segment_traits_2.h   |   1172 +
 .../include/CGAL/Arr_simple_point_location.h       |      0
 .../Arr_on_sphere_transformation.h                 |      0
 .../Arr_polyhedral_sgm.h                           |      0
 .../Arr_polyhedral_sgm_arr_dcel.h                  |      0
 .../Arr_polyhedral_sgm_initializer_visitor.h       |      0
 .../Arr_polyhedral_sgm_overlay.h                   |      0
 .../Arr_polyhedral_sgm_polyhedron_3.h              |      0
 .../Arr_polyhedral_sgm_traits.h                    |      0
 .../Arr_polyhedral_sgm_transformation.h            |      0
 .../Arr_spherical_gaussian_map_3.h                 |      0
 .../Arr_transform_on_sphere.h                      |      0
 .../include/CGAL/Arr_spherical_topology_traits_2.h |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Arr_tags.h |      0
 .../Arr_bounded_planar_batched_pl_helper.h         |      0
 .../Arr_bounded_planar_construction_helper.h       |      0
 .../Arr_bounded_planar_insertion_helper.h          |      0
 .../Arr_bounded_planar_overlay_helper.h            |      0
 .../Arr_bounded_planar_topology_traits_2_impl.h    |      0
 .../Arr_bounded_planar_vert_decomp_helper.h        |      0
 .../Arr_inc_insertion_zone_visitor.h               |      0
 .../Arr_planar_topology_traits_base_2.h            |      0
 .../Arr_spherical_batched_pl_helper.h              |      0
 .../Arr_spherical_construction_helper.h            |      0
 .../Arr_spherical_insertion_helper.h               |      0
 .../Arr_spherical_overlay_helper.h                 |      0
 .../Arr_spherical_topology_traits_2_impl.h         |    889 +
 .../Arr_spherical_vert_decomp_helper.h             |      0
 .../Arr_unb_planar_batched_pl_helper.h             |      0
 .../Arr_unb_planar_construction_helper.h           |      0
 .../Arr_unb_planar_insertion_helper.h              |      0
 .../Arr_unb_planar_overlay_helper.h                |      0
 .../Arr_unb_planar_topology_traits_2_impl.h        |      0
 .../Arr_unb_planar_vert_decomp_helper.h            |      0
 .../include/CGAL/Arr_tracing_traits_2.h            |      0
 .../CGAL/Arr_trapezoid_ric_point_location.h        |      0
 .../CGAL/Arr_triangulation_point_location.h        |      0
 .../CGAL/Arr_unb_planar_topology_traits_2.h        |    638 +
 .../include/CGAL/Arr_vertex_index_map.h            |      0
 .../include/CGAL/Arr_vertex_map.h                  |      0
 .../include/CGAL/Arr_vertical_decomposition_2.h    |      0
 .../CGAL/Arr_walk_along_line_point_location.h      |      0
 .../include/CGAL/Arrangement_2.h                   |      0
 .../CGAL/Arrangement_2/Arr_compute_zone_visitor.h  |      0
 .../Arrangement_2/Arr_default_planar_topology.h    |      0
 .../Arrangement_2/Arr_do_intersect_zone_visitor.h  |      0
 .../Arr_on_surface_with_history_2_impl.h           |      0
 .../CGAL/Arrangement_2/Arr_traits_adaptor_2.h      |      0
 .../Arr_traits_adaptor_2_dispatching.h             |      0
 .../CGAL/Arrangement_2/Arr_with_history_accessor.h |      0
 .../CGAL/Arrangement_2/Arrangement_2_iterators.h   |    663 +
 .../Arrangement_on_surface_2_global.h              |      0
 .../Arrangement_2/Arrangement_on_surface_2_impl.h  |   5492 +
 .../CGAL/Arrangement_2/Arrangement_zone_2_impl.h   |      0
 .../include/CGAL/Arrangement_2/Open_hash.h         |      0
 .../CGAL/Arrangement_2/arrangement_type_traits.h   |      0
 .../include/CGAL/Arrangement_on_surface_2.h        |   2938 +
 .../CGAL/Arrangement_on_surface_with_history_2.h   |      0
 .../include/CGAL/Arrangement_with_history_2.h      |      0
 .../include/CGAL/Arrangement_zone_2.h              |      0
 .../include/CGAL/Barycentric_coordinates_2.h       |      0
 .../Discrete_harmonic_2.h                          |      0
 .../Generalized_barycentric_coordinates_2.h        |      0
 .../CGAL/Barycentric_coordinates_2/Mean_value_2.h  |      0
 .../Segment_coordinates_2.h                        |      0
 .../Triangle_coordinates_2.h                       |      0
 .../CGAL/Barycentric_coordinates_2/Wachspress_2.h  |      0
 .../Barycentric_coordinates_2/barycentric_enum_2.h |      0
 .../CGAL/Barycentric_mapping_parameterizer_3.h     |    180 +
 .../CGAL-4.8/include/CGAL/Basic_sweep_line_2.h     |    533 +
 3rdparty/CGAL-4.8/include/CGAL/Bbox_2.h            |    245 +
 .../include/CGAL/Bbox_2_Line_2_intersection.h      |    103 +
 .../include/CGAL/Bbox_2_Line_2_intersection_impl.h |    210 +
 .../include/CGAL/Bbox_2_Ray_2_intersection.h       |      0
 .../include/CGAL/Bbox_2_intersection.h             |      0
 3rdparty/CGAL-4.8/include/CGAL/Bbox_3.h            |    277 +
 .../include/CGAL/Bigfloat_interval_traits.h        |     58 +
 .../include/CGAL/Boolean_set_operations_2.h        |      0
 .../Bso_internal_functions.h                       |      0
 .../Boolean_set_operations_2/Ccb_curve_iterator.h  |      0
 .../Boolean_set_operations_2/Curve_with_halfedge.h |      0
 .../Boolean_set_operations_2/Gps_agg_meta_traits.h |      0
 .../CGAL/Boolean_set_operations_2/Gps_agg_op.h     |      0
 .../Boolean_set_operations_2/Gps_agg_op_sweep.h    |    297 +
 .../Boolean_set_operations_2/Gps_agg_op_visitor.h  |      0
 .../Boolean_set_operations_2/Gps_base_functor.h    |      0
 .../Gps_bfs_base_visitor.h                         |      0
 .../Gps_bfs_intersection_visitor.h                 |      0
 .../Gps_bfs_join_visitor.h                         |      0
 .../Boolean_set_operations_2/Gps_bfs_scanner.h     |      0
 .../Boolean_set_operations_2/Gps_bfs_xor_visitor.h |      0
 .../Boolean_set_operations_2/Gps_default_dcel.h    |    155 +
 .../Boolean_set_operations_2/Gps_default_traits.h  |      0
 .../Gps_difference_functor.h                       |      0
 .../Gps_do_intersect_functor.h                     |      0
 .../Gps_insertion_meta_traits.h                    |      0
 .../Gps_intersection_functor.h                     |      0
 .../Boolean_set_operations_2/Gps_join_functor.h    |      0
 .../CGAL/Boolean_set_operations_2/Gps_merge.h      |      0
 .../Gps_on_surface_base_2.h                        |   1737 +
 .../Gps_on_surface_base_2_impl.h                   |    790 +
 .../Gps_polygon_simplifier.h                       |    165 +
 .../Gps_polygon_validation.h                       |    800 +
 .../Gps_simplifier_traits.h                        |    478 +
 .../Gps_sym_diff_functor.h                         |      0
 .../Boolean_set_operations_2/Gps_traits_adaptor.h  |    178 +
 .../Gps_traits_decorator.h                         |      0
 .../Boolean_set_operations_2/Point_with_vertex.h   |      0
 .../Polygon_2_curve_iterator.h                     |      0
 .../include/CGAL/Bounded_kernel.h                  |      0
 .../include/CGAL/Box_intersection_d/Box_d.h        |      0
 .../include/CGAL/Box_intersection_d/Box_traits_d.h |      0
 .../CGAL/Box_intersection_d/Box_with_handle_d.h    |      0
 .../CGAL/Box_intersection_d/Box_with_info_d.h      |      0
 .../include/CGAL/Box_intersection_d/box_limits.h   |      0
 .../include/CGAL/Box_intersection_d/segment_tree.h |      0
 .../include/CGAL/CC_safe_handle.h                  |      0
 .../include/CGAL/CGAL_Ipelet_base.h                |      0
 .../CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v6.h    |   1031 +
 .../CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v7.h    |   1037 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat.h     |    635 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloatRep.h  |    449 +
 .../CGAL-4.8/include/CGAL/CORE/BigFloat_impl.h     |   1327 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/BigInt.h       |    566 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/BigRat.h       |    491 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/CORE.h         |     71 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Config.h       |     42 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux.h      |    189 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux_impl.h |    229 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs.h     |    278 +
 .../CGAL-4.8/include/CGAL/CORE/CoreDefs_impl.h     |    163 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/CoreIO_impl.h  |    482 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Expr.h         |    561 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/ExprRep.h      |   1340 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Expr_impl.h    |   1255 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Filter.h       |    195 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp.h          |     47 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp_impl.h     |    280 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Impl.h         |     74 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/MemoryPool.h   |    138 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Promote.h      |    158 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Real.h         |    502 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/RealRep.h      |    517 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Real_impl.h    |    292 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/RefCount.h     |    118 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/Timer.h        |     78 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/extLong.h      |    302 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/extLong_impl.h |    212 +
 .../CGAL-4.8/include/CGAL/CORE/geom2d/circle2d.h   |    153 +
 .../CGAL-4.8/include/CGAL/CORE/geom2d/line2d.h     |    175 +
 .../CGAL-4.8/include/CGAL/CORE/geom2d/point2d.h    |    187 +
 .../CGAL-4.8/include/CGAL/CORE/geom2d/segment2d.h  |    196 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/line3d.h     |    140 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/plane3d.h    |    159 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/point3d.h    |    176 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/polygon3d.h  |    180 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/segment3d.h  |    177 +
 .../CGAL-4.8/include/CGAL/CORE/geom3d/triangle3d.h |    182 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/geombase.h     |     66 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/geometry2d.h   |     74 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/geometry3d.h   |     83 +
 .../CGAL-4.8/include/CGAL/CORE/linearAlgebra.h     |    176 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.h  |    527 +
 .../CGAL-4.8/include/CGAL/CORE/poly/Curves.tcc     |   1429 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.h    |    437 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.tcc  |   1560 +
 3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Sturm.h   |   1150 +
 3rdparty/CGAL-4.8/include/CGAL/CORE_BigFloat.h     |    550 +
 .../include/CGAL/CORE_BigInt.h                     |      0
 .../include/CGAL/CORE_BigRat.h                     |      0
 .../include/CGAL/CORE_Expr.h                       |      0
 .../include/CGAL/CORE_algebraic_number_traits.h    |      0
 .../include/CGAL/CORE_arithmetic_kernel.h          |      0
 .../CGAL-4.8/include/CGAL/CORE_coercion_traits.h   |    163 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Cache.h    |      0
 .../include/CGAL/Cartesian.h                       |      0
 .../include/CGAL/Cartesian/Aff_transformation_2.h  |      0
 .../include/CGAL/Cartesian/Aff_transformation_3.h  |      0
 .../CGAL/Cartesian/Aff_transformation_rep_2.h      |      0
 .../CGAL/Cartesian/Aff_transformation_rep_3.h      |      0
 .../include/CGAL/Cartesian/Cartesian_base.h        |      0
 .../CGAL-4.8/include/CGAL/Cartesian/Circle_2.h     |     82 +
 .../CGAL-4.8/include/CGAL/Cartesian/Circle_3.h     |    299 +
 .../include/CGAL/Cartesian/Data_accessor_2.h       |      0
 .../CGAL-4.8/include/CGAL/Cartesian/Direction_2.h  |    104 +
 .../CGAL-4.8/include/CGAL/Cartesian/Direction_3.h  |    136 +
 .../CGAL-4.8/include/CGAL/Cartesian/Iso_cuboid_3.h |    338 +
 .../include/CGAL/Cartesian/Iso_rectangle_2.h       |     73 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_2.h  |     97 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_3.h  |    163 +
 .../include/CGAL/Cartesian/MatrixC33.h             |      0
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Plane_3.h |    311 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_2.h |    107 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_3.h |    139 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_2.h   |     76 +
 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_3.h   |    192 +
 .../include/CGAL/Cartesian/Rotation_rep_2.h        |      0
 .../include/CGAL/Cartesian/Scaling_rep_2.h         |      0
 .../include/CGAL/Cartesian/Scaling_rep_3.h         |      0
 .../CGAL-4.8/include/CGAL/Cartesian/Segment_2.h    |     69 +
 .../CGAL-4.8/include/CGAL/Cartesian/Segment_3.h    |    221 +
 .../CGAL-4.8/include/CGAL/Cartesian/Sphere_3.h     |    294 +
 .../include/CGAL/Cartesian/Tetrahedron_3.h         |    224 +
 .../include/CGAL/Cartesian/Translation_rep_2.h     |      0
 .../include/CGAL/Cartesian/Translation_rep_3.h     |      0
 .../CGAL-4.8/include/CGAL/Cartesian/Triangle_2.h   |     75 +
 .../CGAL-4.8/include/CGAL/Cartesian/Triangle_3.h   |    146 +
 .../CGAL-4.8/include/CGAL/Cartesian/Vector_2.h     |    153 +
 .../CGAL-4.8/include/CGAL/Cartesian/Vector_3.h     |    266 +
 .../include/CGAL/Cartesian/basic_constructions_2.h |      0
 .../include/CGAL/Cartesian/basic_constructions_3.h |      0
 .../include/CGAL/Cartesian/ft_constructions_2.h    |      0
 .../include/CGAL/Cartesian/ft_constructions_3.h    |      0
 .../include/CGAL/Cartesian/function_objects.h      |      0
 .../include/CGAL/Cartesian/line_constructions_2.h  |      0
 .../include/CGAL/Cartesian/plane_constructions_3.h |      0
 .../include/CGAL/Cartesian/point_constructions_2.h |      0
 .../include/CGAL/Cartesian/point_constructions_3.h |      0
 .../CGAL/Cartesian/predicates_on_directions_2.h    |      0
 .../CGAL/Cartesian/predicates_on_planes_3.h        |      0
 .../CGAL/Cartesian/predicates_on_points_2.h        |      0
 .../CGAL/Cartesian/predicates_on_points_3.h        |      0
 .../include/CGAL/Cartesian/solve_3.h               |      0
 .../include/CGAL/Cartesian_converter.h             |      0
 .../include/CGAL/Cartesian_d.h                     |      0
 .../include/CGAL/Cartesian_matrix.h                |      0
 .../include/CGAL/Cell_attribute.h                  |      0
 .../include/CGAL/Cell_attribute_with_point.h       |    162 +
 .../include/CGAL/Cell_const_iterators.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/Cell_iterators.h    |    453 +
 .../include/CGAL/Chinese_remainder_traits.h        |      0
 3rdparty/CGAL-4.8/include/CGAL/Circle_2.h          |    302 +
 .../include/CGAL/Circle_2_Circle_2_intersection.h  |      0
 .../include/CGAL/Circle_2_Line_2_intersection.h    |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Circle_3.h |      0
 .../include/CGAL/Circle_type.h                     |      0
 .../include/CGAL/Circular_arc_2.h                  |      0
 .../include/CGAL/Circular_arc_3.h                  |      0
 .../include/CGAL/Circular_arc_point_2.h            |      0
 .../include/CGAL/Circular_arc_point_3.h            |      0
 .../include/CGAL/Circular_border_parameterizer_3.h |      0
 .../include/CGAL/Circular_kernel_2.h               |      0
 .../CGAL/Circular_kernel_2/Circular_arc_2.h        |      0
 .../CGAL/Circular_kernel_2/Circular_arc_point_2.h  |    164 +
 .../CGAL/Circular_kernel_2/Intersection_traits.h   |      0
 .../include/CGAL/Circular_kernel_2/Line_arc_2.h    |      0
 .../function_objects_on_circle_2.h                 |      0
 .../Circular_kernel_2/function_objects_on_line_2.h |      0
 .../function_objects_polynomial_circular.h         |      0
 .../CGAL/Circular_kernel_2/interface_macros.h      |      0
 .../internal_functions_on_circle_2.h               |      0
 .../internal_functions_on_circular_arc_2.h         |      0
 .../internal_functions_on_line_2.h                 |      0
 .../internal_functions_on_line_arc_2.h             |      0
 .../intersection_line_2_circle_2_map.h             |      0
 .../CGAL/Circular_kernel_3/Circular_arc_3.h        |    323 +
 .../CGAL/Circular_kernel_3/Circular_arc_point_3.h  |    255 +
 .../CGAL/Circular_kernel_3/Intersection_traits.h   |      0
 .../include/CGAL/Circular_kernel_3/Line_arc_3.h    |    206 +
 .../function_objects_polynomial_sphere.h           |      0
 .../get_equation_object_on_curved_kernel_3.h       |      0
 .../CGAL/Circular_kernel_3/interface_macros.h      |      0
 .../internal_function_compare_spherical_kernel.h   |      0
 ...al_function_compare_to_right_spherical_kernel.h |      0
 .../internal_function_has_on_spherical_kernel.h    |      0
 .../internal_functions_on_circle_3.h               |      0
 .../internal_functions_on_circular_arc_3.h         |      0
 .../internal_functions_on_circular_arc_point_3.h   |      0
 .../internal_functions_on_line_3.h                 |      0
 .../internal_functions_on_line_arc_3.h             |      0
 .../internal_functions_on_plane_3.h                |      0
 .../internal_functions_on_sphere_3.h               |      0
 .../include/CGAL/Circular_kernel_converter.h       |      0
 .../include/CGAL/Circular_kernel_intersections.h   |      0
 .../CGAL/Circular_kernel_type_equality_wrapper.h   |      0
 .../include/CGAL/Circulator/Circulator_adapters.h  |    701 +
 .../include/CGAL/Circulator/Circulator_concepts.h  |      0
 .../Circulator/Safe_circulator_from_iterator.h     |      0
 .../CGAL-4.8/include/CGAL/Circulator_identity.h    |    145 +
 .../CGAL-4.8/include/CGAL/Circulator_on_node.h     |    102 +
 .../include/CGAL/Circulator_project.h              |      0
 .../include/CGAL/Coercion_traits.h                 |      0
 .../include/CGAL/Combination_enumerator.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map.h |   3814 +
 .../CGAL/Combinatorial_map_basic_operations.h      |    359 +
 .../include/CGAL/Combinatorial_map_constructors.h  |      0
 .../include/CGAL/Combinatorial_map_functors.h      |    173 +
 .../include/CGAL/Combinatorial_map_insertions.h    |    729 +
 .../CGAL/Combinatorial_map_iterators_base.h        |    616 +
 .../include/CGAL/Combinatorial_map_min_items.h     |      0
 .../include/CGAL/Combinatorial_map_operations.h    |    809 +
 .../include/CGAL/Combinatorial_map_save_load.h     |    800 +
 .../include/CGAL/Combinatorial_map_storages.h      |    419 +
 3rdparty/CGAL-4.8/include/CGAL/Compact_container.h |   1207 +
 .../include/CGAL/Compact_mesh_cell_base_3.h        |    713 +
 .../include/CGAL/Complex_2_in_triangulation_3.h    |      0
 .../CGAL/Complex_2_in_triangulation_cell_base_3.h  |      0
 .../Complex_2_in_triangulation_vertex_base_3.h     |      0
 .../include/CGAL/Complexity_tags.h                 |      0
 .../include/CGAL/Compute_anchor_3.h                |      0
 .../include/CGAL/Concatenate_iterator.h            |      0
 .../include/CGAL/Concurrent_compact_container.h    |   1061 +
 .../include/CGAL/ConicCPA2.h                       |      0
 .../include/CGAL/ConicHPA2.h                       |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Conic_2.h  |      0
 .../include/CGAL/Conic_misc.h                      |      0
 .../CGAL/Constrained_Delaunay_triangulation_2.h    |    982 +
 ...onstrained_Delaunay_triangulation_face_base_2.h |    121 +
 .../include/CGAL/Constrained_triangulation_2.h     |      0
 .../CGAL/Constrained_triangulation_face_base_2.h   |      0
 .../CGAL/Constrained_triangulation_plus_2.h        |   1233 +
 .../include/CGAL/Constrained_voronoi_diagram_2.h   |    514 +
 .../include/CGAL/Constraint_hierarchy_2.h          |      0
 .../include/CGAL/Convertible_circulator_project.h  |      0
 .../include/CGAL/Convertible_filter_iterator.h     |      0
 .../include/CGAL/Convertible_iterator_project.h    |      0
 .../CGAL/Convex_decomposition_3/Edge_sorter.h      |      0
 .../External_structure_builder.h                   |      0
 .../Insert_vertex_into_edge.h                      |      0
 .../Convex_decomposition_3/Ray_hit_generator.h     |      0
 .../Convex_decomposition_3/Ray_hit_generator2.h    |      0
 .../Convex_decomposition_3/Reflex_edge_searcher.h  |      0
 .../Reflex_vertex_searcher.h                       |      0
 .../CGAL/Convex_decomposition_3/SFace_separator.h  |      0
 .../include/CGAL/Convex_decomposition_3/SM_walls.h |    592 +
 .../Convex_decomposition_3/Single_wall_creator.h   |      0
 .../Convex_decomposition_3/Single_wall_creator2.h  |      0
 .../Convex_decomposition_3/Single_wall_creator3.h  |      0
 .../YVertical_wall_builder.h                       |      0
 .../CGAL/Convex_decomposition_3/is_reflex_sedge.h  |      0
 .../CGAL/Convex_hull_2/ch_akl_toussaint_impl.h     |      0
 .../include/CGAL/Convex_hull_2/ch_assertions.h     |      0
 .../include/CGAL/Convex_hull_2/ch_bykat_impl.h     |      0
 .../include/CGAL/Convex_hull_2/ch_eddy_impl.h      |      0
 .../CGAL/Convex_hull_2/ch_graham_andrew_impl.h     |      0
 .../include/CGAL/Convex_hull_2/ch_jarvis_impl.h    |      0
 .../include/CGAL/Convex_hull_2/ch_melkman_impl.h   |    129 +
 .../ch_selected_extreme_points_2_impl.h            |      0
 .../CGAL/Convex_hull_2/convexity_check_2_impl.h    |      0
 .../Convex_hull_3/dual/Convex_hull_traits_dual_2.h |      0
 .../Convex_hull_3/dual/Convex_hull_traits_dual_3.h |    281 +
 .../Convex_hull_3/dual/halfspace_intersection_3.h  |    306 +
 .../halfspace_intersection_with_constructions_3.h  |    179 +
 .../Convex_hull_3/dual/interior_polyhedron_3.h     |    162 +
 .../include/CGAL/Convex_hull_3/dual/predicates.h   |      0
 .../include/CGAL/Convex_hull_d.h                   |      0
 .../include/CGAL/Convex_hull_d_to_polyhedron_3.h   |      0
 .../include/CGAL/Convex_hull_d_traits_3.h          |      0
 .../include/CGAL/Convex_hull_face_base_2.h         |      0
 .../CGAL/Convex_hull_projective_xy_traits_2.h      |      0
 .../CGAL/Convex_hull_projective_xz_traits_2.h      |      0
 .../CGAL/Convex_hull_projective_yz_traits_2.h      |      0
 .../include/CGAL/Convex_hull_traits_3.h            |      0
 .../include/CGAL/Counted_number.h                  |      0
 .../include/CGAL/Counting_iterator.h               |      0
 .../CGAL/Curved_kernel_via_analysis_2/Arc_2.h      |   3367 +
 .../Curve_interval_arcno_cache.h                   |      0
 .../Curve_renderer_facade.h                        |      0
 .../Curved_kernel_via_analysis_2_functors.h        |      0
 .../Curved_kernel_via_analysis_2_impl.h            |      0
 .../Fig_stream_Curve_renderer_2.h                  |      0
 .../Filtered_curved_kernel_via_analysis_2_impl.h   |      0
 .../Curved_kernel_via_analysis_2/Generic_arc_2.h   |      0
 .../Curved_kernel_via_analysis_2/Generic_point_2.h |      0
 .../Make_x_monotone_2.h                            |    339 +
 .../Non_x_monotone_arc_2.h                         |      0
 .../CGAL/Curved_kernel_via_analysis_2/Point_2.h    |    840 +
 .../Sweep_curves_adapter_2.h                       |      0
 .../gfx/Curve_renderer_2.h                         |      0
 .../gfx/Curve_renderer_internals.h                 |   1082 +
 .../gfx/Curve_renderer_traits.h                    |    600 +
 .../gfx/Subdivision_1.h                            |      0
 .../gfx/Subdivision_2.h                            |      0
 .../test/simple_models.h                           |      0
 3rdparty/CGAL-4.8/include/CGAL/Dart.h              |    343 +
 .../CGAL-4.8/include/CGAL/Dart_const_iterators.h   |    338 +
 3rdparty/CGAL-4.8/include/CGAL/Dart_iterators.h    |   2770 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Default.h  |      0
 .../include/CGAL/Default_diagonalize_traits.h      |     81 +
 .../Deformation_Eigen_closest_rotation_traits_3.h  |    109 +
 ...rmation_Eigen_polar_closest_rotation_traits_3.h |     84 +
 3rdparty/CGAL-4.8/include/CGAL/Delaunay_d.h        |   1072 +
 .../include/CGAL/Delaunay_mesh_area_criteria_2.h   |      0
 .../include/CGAL/Delaunay_mesh_criteria_2.h        |      0
 .../include/CGAL/Delaunay_mesh_face_base_2.h       |     79 +
 .../CGAL/Delaunay_mesh_local_size_criteria_2.h     |      0
 .../include/CGAL/Delaunay_mesh_size_criteria_2.h   |      0
 .../include/CGAL/Delaunay_mesh_vertex_base_2.h     |     73 +
 .../include/CGAL/Delaunay_mesher_2.h               |      0
 .../CGAL/Delaunay_mesher_no_edge_refinement_2.h    |      0
 .../include/CGAL/Delaunay_triangulation.h          |      0
 .../include/CGAL/Delaunay_triangulation_2.h        |   2485 +
 .../include/CGAL/Delaunay_triangulation_3.h        |   2081 +
 .../Delaunay_triangulation_adaptation_policies_2.h |      0
 .../Delaunay_triangulation_adaptation_traits_2.h   |      0
 .../CGAL/Delaunay_triangulation_cell_base_3.h      |      0
 ...y_triangulation_cell_base_with_circumcenter_3.h |      0
 .../CGAL-4.8/include/CGAL/Diagonalize_traits.h     |    271 +
 .../include/CGAL/Dimension.h                       |      0
 3rdparty/CGAL-4.8/include/CGAL/Direction_2.h       |    282 +
 3rdparty/CGAL-4.8/include/CGAL/Direction_3.h       |    242 +
 .../CGAL/Discrete_authalic_parameterizer_3.h       |    188 +
 .../CGAL/Discrete_conformal_map_parameterizer_3.h  |    186 +
 .../include/CGAL/Distance_2.h                      |      0
 .../include/CGAL/Double_map.h                      |      0
 .../include/CGAL/Dummy_tds_2.h                     |      0
 .../include/CGAL/Dynamic_matrix.h                  |      0
 .../include/CGAL/Edge_hash_function.h              |      0
 .../include/CGAL/Eigen_diagonalize_traits.h        |    158 +
 3rdparty/CGAL-4.8/include/CGAL/Eigen_matrix.h      |    285 +
 .../CGAL-4.8/include/CGAL/Eigen_solver_traits.h    |    214 +
 .../include/CGAL/Eigen_svd.h                       |      0
 .../include/CGAL/Eigen_vector.h                    |      0
 .../include/CGAL/Enum_converter.h                  |      0
 .../include/CGAL/Env_default_diagram_1.h           |      0
 .../include/CGAL/Env_plane_traits_3.h              |      0
 .../include/CGAL/Env_sphere_traits_3.h             |      0
 .../include/CGAL/Env_surface_data_traits_3.h       |      0
 .../include/CGAL/Env_tracing_traits_3.h            |      0
 .../CGAL-4.8/include/CGAL/Env_triangle_traits_3.h  |   1667 +
 .../CGAL/Envelope_2/Env_divide_and_conquer_2.h     |      0
 .../Envelope_2/Env_divide_and_conquer_2_impl.h     |   1242 +
 .../CGAL/Envelope_3/Env_plane_traits_3_functions.h |      0
 .../include/CGAL/Envelope_3/Envelope_base.h        |      0
 .../Envelope_3/Envelope_diagram_on_surface_2.h     |      0
 .../Envelope_3/Envelope_divide_and_conquer_3.h     |      0
 .../CGAL/Envelope_3/Envelope_element_visitor_3.h   |   3220 +
 .../include/CGAL/Envelope_3/Envelope_overlay_2.h   |      0
 .../CGAL/Envelope_3/Envelope_overlay_functor.h     |      0
 .../include/CGAL/Envelope_3/Envelope_pm_dcel.h     |      0
 .../include/CGAL/Envelope_3/set_dividors.h         |      0
 .../include/CGAL/Envelope_diagram_1.h              |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Epick_d.h  |      0
 .../include/CGAL/Euclidean_distance.h              |      0
 .../include/CGAL/Euclidean_distance_sphere_point.h |      0
 .../include/CGAL/Euler_integrator_2.h              |      0
 .../include/CGAL/Exact_circular_kernel_2.h         |      0
 .../include/CGAL/Exact_integer.h                   |      0
 .../Exact_predicates_exact_constructions_kernel.h  |     98 +
 ...ates_exact_constructions_kernel_with_kth_root.h |     50 +
 ...cates_exact_constructions_kernel_with_root_of.h |     50 +
 ...edicates_exact_constructions_kernel_with_sqrt.h |      0
 ...Exact_predicates_inexact_constructions_kernel.h |     56 +
 .../include/CGAL/Exact_rational.h                  |      0
 .../include/CGAL/Exact_spherical_kernel_3.h        |      0
 .../include/CGAL/Exponent_vector.h                 |      0
 .../include/CGAL/Extended_cartesian.h              |      0
 .../include/CGAL/Extended_homogeneous.h            |      0
 .../include/CGAL/Extremal_polygon_traits_2.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/FPU.h               |    539 +
 .../include/CGAL/FPU_extension.h                   |      0
 .../include/CGAL/FPU_gcc_i386.h                    |      0
 .../include/CGAL/FPU_gcc_i386_sse2.h               |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/FPU_msvc.h |      0
 .../include/CGAL/FaceGraph_to_Polyhedron_3.h       |     92 +
 .../include/CGAL/Filter_circulator.h               |      0
 .../include/CGAL/Filtered_bbox_circular_kernel_2.h |      0
 .../bbox_filtered_predicates.h                     |      0
 .../interface_macros.h                             |      0
 .../include/CGAL/Filtered_construction.h           |      0
 .../include/CGAL/Filtered_extended_homogeneous.h   |      0
 .../include/CGAL/Filtered_kernel.h                 |      0
 .../Cartesian_coordinate_iterator_2.h              |      0
 .../Cartesian_coordinate_iterator_3.h              |      0
 3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_d.h |     70 +
 .../include/CGAL/Filtered_kernel_fwd.h             |      0
 .../CGAL-4.8/include/CGAL/Filtered_predicate.h     |    424 +
 .../include/CGAL/Fixed_alpha_shape_3.h             |      0
 .../include/CGAL/Fixed_alpha_shape_cell_base_3.h   |      0
 .../include/CGAL/Fixed_alpha_shape_vertex_base_3.h |      0
 .../include/CGAL/Fixed_border_parameterizer_3.h    |    634 +
 .../include/CGAL/Flattening_iterator.h             |      0
 .../include/CGAL/Fourtuple.h                       |      0
 .../include/CGAL/Fraction_traits.h                 |      0
 .../include/CGAL/Fuzzy_iso_box.h                   |      0
 3rdparty/CGAL-4.8/include/CGAL/Fuzzy_sphere.h      |    165 +
 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type.h    |   1087 +
 .../include/CGAL/GMP/Gmpfi_type_static.h           |      0
 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type.h    |   1341 +
 .../include/CGAL/GMP/Gmpfr_type_static.h           |      0
 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpq_type.h     |    515 +
 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h     |    438 +
 .../include/CGAL/GMP/Gmpzf_type.h                  |      0
 .../include/CGAL/GMP_arithmetic_kernel.h           |      0
 .../include/CGAL/General_polygon_2.h               |      0
 .../CGAL-4.8/include/CGAL/General_polygon_set_2.h  |    117 +
 .../CGAL/General_polygon_set_on_surface_2.h        |    150 +
 .../include/CGAL/General_polygon_with_holes_2.h    |      0
 .../include/CGAL/Get_arithmetic_kernel.h           |      0
 .../include/CGAL/Gmp_coercion_traits.h             |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Gmpfi.h    |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Gmpfr.h    |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Gmpq.h     |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Gmpz.h     |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Gmpzf.h    |      0
 .../include/CGAL/Gps_circle_segment_traits_2.h     |     44 +
 .../include/CGAL/Gps_segment_traits_2.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/Gps_traits_2.h      |    175 +
 .../include/CGAL/Gray_image_mesh_domain_3.h        |    132 +
 .../include/CGAL/Gray_level_image_3.h              |      0
 .../include/CGAL/HalfedgeDS_const_decorator.h      |      0
 .../include/CGAL/HalfedgeDS_decorator.h            |      0
 .../include/CGAL/HalfedgeDS_default.h              |      0
 .../include/CGAL/HalfedgeDS_face_base.h            |      0
 .../CGAL/HalfedgeDS_face_max_base_with_id.h        |      0
 .../include/CGAL/HalfedgeDS_face_min_base.h        |      0
 .../include/CGAL/HalfedgeDS_halfedge_base.h        |      0
 .../CGAL/HalfedgeDS_halfedge_max_base_with_id.h    |      0
 .../include/CGAL/HalfedgeDS_halfedge_min_base.h    |      0
 .../include/CGAL/HalfedgeDS_items_2.h              |      0
 .../include/CGAL/HalfedgeDS_items_decorator.h      |      0
 .../include/CGAL/HalfedgeDS_iterator.h             |      0
 .../include/CGAL/HalfedgeDS_iterator_adaptor.h     |      0
 .../include/CGAL/HalfedgeDS_list.h                 |      0
 .../include/CGAL/HalfedgeDS_min_items.h            |      0
 .../include/CGAL/HalfedgeDS_vector.h               |      0
 .../include/CGAL/HalfedgeDS_vertex_base.h          |      0
 .../CGAL/HalfedgeDS_vertex_max_base_with_id.h      |      0
 .../include/CGAL/HalfedgeDS_vertex_min_base.h      |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Handle.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Handle_for.h        |    314 +
 .../include/CGAL/Handle_for_virtual.h              |      0
 .../include/CGAL/Handle_hash_function.h            |      0
 .../include/CGAL/Handle_with_policy.h              |      0
 .../include/CGAL/Has_timestamp.h                   |      0
 .../include/CGAL/Hilbert_policy_tags.h             |      0
 .../include/CGAL/Hilbert_sort_2.h                  |      0
 .../include/CGAL/Hilbert_sort_3.h                  |      0
 .../include/CGAL/Hilbert_sort_base.h               |      0
 .../include/CGAL/Hilbert_sort_d.h                  |      0
 .../include/CGAL/Hilbert_sort_median_2.h           |      0
 .../include/CGAL/Hilbert_sort_median_3.h           |      0
 .../include/CGAL/Hilbert_sort_median_d.h           |      0
 .../CGAL-4.8/include/CGAL/Hilbert_sort_middle_2.h  |    154 +
 .../include/CGAL/Hilbert_sort_middle_3.h           |      0
 .../include/CGAL/Hilbert_sort_middle_base.h        |      0
 .../include/CGAL/Hilbert_sort_middle_d.h           |      0
 .../include/CGAL/Hilbert_sort_on_sphere_3.h        |    119 +
 .../include/CGAL/Homogeneous.h                     |      0
 .../CGAL/Homogeneous/Aff_transformationH2.h        |      0
 .../CGAL/Homogeneous/Aff_transformationH3.h        |    898 +
 .../CGAL-4.8/include/CGAL/Homogeneous/CircleH2.h   |    255 +
 .../include/CGAL/Homogeneous/Data_accessorH2.h     |      0
 .../include/CGAL/Homogeneous/DirectionH2.h         |    120 +
 .../include/CGAL/Homogeneous/DirectionH3.h         |    136 +
 .../include/CGAL/Homogeneous/Homogeneous_base.h    |      0
 .../include/CGAL/Homogeneous/Iso_cuboidH3.h        |    398 +
 .../include/CGAL/Homogeneous/Iso_rectangleH2.h     |    102 +
 .../CGAL-4.8/include/CGAL/Homogeneous/LineH2.h     |    100 +
 .../CGAL-4.8/include/CGAL/Homogeneous/PlaneH3.h    |    545 +
 .../include/CGAL/Homogeneous/PointH2.h             |      0
 .../include/CGAL/Homogeneous/PointH3.h             |      0
 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/RayH3.h |    177 +
 .../CGAL-4.8/include/CGAL/Homogeneous/SphereH3.h   |    231 +
 .../CGAL-4.8/include/CGAL/Homogeneous/VectorH2.h   |    254 +
 .../CGAL-4.8/include/CGAL/Homogeneous/VectorH3.h   |    249 +
 .../CGAL/Homogeneous/basic_constructionsH2.h       |      0
 .../CGAL/Homogeneous/basic_constructionsH3.h       |      0
 .../CGAL/Homogeneous/distance_predicatesH2.h       |      0
 .../CGAL/Homogeneous/distance_predicatesH3.h       |      0
 .../include/CGAL/Homogeneous/function_objects.h    |      0
 .../CGAL/Homogeneous/predicates_on_directionsH2.h  |      0
 .../CGAL/Homogeneous/predicates_on_pointsH2.h      |      0
 .../CGAL/Homogeneous/predicates_on_pointsH3.h      |      0
 .../include/CGAL/Homogeneous_converter.h           |      0
 .../include/CGAL/Homogeneous_d.h                   |      0
 .../include/CGAL/Hyperbola_2.h                     |      0
 .../include/CGAL/Hyperbola_ray_2.h                 |      0
 .../include/CGAL/Hyperbola_segment_2.h             |      0
 .../include/CGAL/IEEE_754_unions.h                 |      0
 .../include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_iostream.h   |    122 +
 .../include/CGAL/IO/Arr_text_formatter.h           |      0
 .../include/CGAL/IO/Arr_with_history_2_reader.h    |      0
 .../include/CGAL/IO/Arr_with_history_2_writer.h    |      0
 .../include/CGAL/IO/Arr_with_history_iostream.h    |      0
 .../CGAL/IO/Arr_with_history_text_formatter.h      |      0
 .../include/CGAL/IO/Arrangement_2_reader.h         |      0
 .../include/CGAL/IO/Arrangement_2_writer.h         |    340 +
 3rdparty/CGAL-4.8/include/CGAL/IO/Color.h          |    104 +
 3rdparty/CGAL-4.8/include/CGAL/IO/Color_impl.h     |     42 +
 .../IO/Complex_2_in_triangulation_3_file_writer.h  |      0
 ...mplex_2_in_triangulation_3_polyhedron_builder.h |    193 +
 .../CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h  |     91 +
 .../CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h  |      0
 .../include/CGAL/IO/Dxf_bsop_reader.h              |      0
 .../include/CGAL/IO/Dxf_reader.h                   |      0
 .../include/CGAL/IO/Dxf_reader_doubles.h           |      0
 .../include/CGAL/IO/Dxf_stream.h                   |      0
 .../include/CGAL/IO/Dxf_variant_reader.h           |      0
 .../include/CGAL/IO/Dxf_writer.h                   |      0
 .../include/CGAL/IO/Fig_stream.h                   |      0
 .../include/CGAL/IO/Fig_stream_Conic_arc_2.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/File_avizo.h     |    165 +
 .../include/CGAL/IO/File_binary_mesh_3.h           |      0
 .../CGAL-4.8/include/CGAL/IO/File_header_OFF.h     |    125 +
 .../include/CGAL/IO/File_header_OFF_impl.h         |    409 +
 .../include/CGAL/IO/File_header_extended_OFF.h     |    136 +
 .../CGAL/IO/File_header_extended_OFF_impl.h        |    212 +
 .../include/CGAL/IO/File_maya.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/File_medit.h     |    907 +
 .../include/CGAL/IO/File_poly.h                    |      0
 .../CGAL-4.8/include/CGAL/IO/File_scanner_OFF.h    |    470 +
 .../include/CGAL/IO/File_scanner_OFF_impl.h        |    133 +
 .../include/CGAL/IO/File_tetgen.h                  |      0
 .../CGAL-4.8/include/CGAL/IO/File_writer_OFF.h     |    113 +
 .../include/CGAL/IO/File_writer_OFF_impl.h         |     56 +
 .../CGAL-4.8/include/CGAL/IO/File_writer_VRML_2.h  |     64 +
 .../include/CGAL/IO/File_writer_VRML_2_impl.h      |     82 +
 .../include/CGAL/IO/File_writer_inventor.h         |     61 +
 .../include/CGAL/IO/File_writer_inventor_impl.h    |     73 +
 .../include/CGAL/IO/File_writer_wavefront.h        |     65 +
 .../include/CGAL/IO/File_writer_wavefront_impl.h   |     57 +
 .../include/CGAL/IO/Generic_writer.h               |      0
 .../CGAL-4.8/include/CGAL/IO/Geomview_stream.h     |    605 +
 .../include/CGAL/IO/Geomview_stream_impl.h         |    612 +
 .../include/CGAL/IO/Gps_iostream.h                 |      0
 .../include/CGAL/IO/Inventor_ostream.h             |      0
 .../include/CGAL/IO/Istream_iterator.h             |      0
 .../include/CGAL/IO/Nef_polyhedron_2_PS_stream.h   |      0
 .../CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h       |      0
 .../include/CGAL/IO/Nef_polyhedron_iostream_3.h    |      0
 .../include/CGAL/IO/Nef_polyhedron_iostream_S2.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/OFF_reader.h     |    100 +
 .../include/CGAL/IO/Ostream_iterator.h             |      0
 .../include/CGAL/IO/Polyhedron_VRML_1_ostream.h    |      0
 .../include/CGAL/IO/Polyhedron_VRML_2_ostream.h    |      0
 .../include/CGAL/IO/Polyhedron_builder_from_STL.h  |      0
 .../include/CGAL/IO/Polyhedron_geomview_ostream.h  |      0
 .../include/CGAL/IO/Polyhedron_inventor_ostream.h  |      0
 .../include/CGAL/IO/Polyhedron_iostream.h          |      0
 .../include/CGAL/IO/Polyhedron_scan_OFF.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/STL_reader.h     |    148 +
 .../include/CGAL/IO/Scanner_OFF.h                  |      0
 .../include/CGAL/IO/Tee_for_output_iterator.h      |      0
 .../CGAL/IO/Triangulation_geomview_ostream_2.h     |      0
 .../CGAL/IO/Triangulation_geomview_ostream_3.h     |      0
 .../include/CGAL/IO/Triangulation_ps_stream.h      |      0
 .../include/CGAL/IO/VRML_1_ostream.h               |      0
 .../include/CGAL/IO/VRML_2_ostream.h               |      0
 .../include/CGAL/IO/Verbose_ostream.h              |      0
 .../include/CGAL/IO/Writer_OFF.h                   |      0
 .../CGAL/IO/alpha_shape_geomview_ostream_3.h       |      0
 .../include/CGAL/IO/binary_file_io.h               |      0
 .../include/CGAL/IO/generic_copy_OFF.h             |      0
 .../include/CGAL/IO/generic_print_polyhedron.h     |      0
 3rdparty/CGAL-4.8/include/CGAL/IO/io.h             |    535 +
 3rdparty/CGAL-4.8/include/CGAL/IO/io_impl.h        |    136 +
 .../include/CGAL/IO/io_tags.h                      |      0
 .../CGAL/IO/output_surface_facets_to_polyhedron.h  |      0
 .../IO/output_surface_facets_to_triangle_soup.h    |      0
 .../include/CGAL/IO/print_OFF.h                    |      0
 .../include/CGAL/IO/print_VRML_1.h                 |      0
 .../include/CGAL/IO/print_VRML_2.h                 |      0
 .../include/CGAL/IO/print_inventor.h               |      0
 .../include/CGAL/IO/print_wavefront.h              |      0
 .../CGAL-4.8/include/CGAL/IO/read_off_points.h     |    436 +
 .../CGAL-4.8/include/CGAL/IO/read_ply_points.h     |    615 +
 .../CGAL-4.8/include/CGAL/IO/read_xyz_points.h     |    428 +
 .../include/CGAL/IO/scan_OFF.h                     |      0
 .../include/CGAL/IO/write_off_points.h             |      0
 .../CGAL-4.8/include/CGAL/IO/write_ply_points.h    |    260 +
 .../CGAL-4.8/include/CGAL/IO/write_xyz_points.h    |    250 +
 .../include/CGAL/Identity_policy_2.h               |      0
 3rdparty/CGAL-4.8/include/CGAL/ImageIO.h           |    707 +
 3rdparty/CGAL-4.8/include/CGAL/ImageIO_impl.h      |   1633 +
 3rdparty/CGAL-4.8/include/CGAL/Image_3.h           |    515 +
 3rdparty/CGAL-4.8/include/CGAL/Image_3_impl.h      |    232 +
 .../CGAL-4.8/include/CGAL/Image_3_vtk_interface.h  |    129 +
 .../CGAL-4.8/include/CGAL/Implicit_mesh_domain_3.h |     93 +
 .../include/CGAL/Implicit_surface_3.h              |      0
 .../CGAL/Implicit_to_labeling_function_wrapper.h   |    290 +
 3rdparty/CGAL-4.8/include/CGAL/In_place_list.h     |    812 +
 .../include/CGAL/Incremental_neighbor_search.h     |    549 +
 .../include/CGAL/Index_property_map.h              |      0
 .../CGAL/Interpolation_gradient_fitting_traits_2.h |      0
 .../include/CGAL/Interpolation_traits_2.h          |      0
 .../CGAL-4.8/include/CGAL/Intersection_traits.h    |    271 +
 .../include/CGAL/Intersection_traits_2.h           |      0
 .../include/CGAL/Intersection_traits_3.h           |      0
 .../Triangle_2_Triangle_2_intersection_impl.h      |      0
 .../CGAL/Intersections_3/intersection_3_1_impl.h   |   1722 +
 .../include/CGAL/Interval_arithmetic.h             |      0
 .../include/CGAL/Interval_arithmetic_impl.h        |     72 +
 .../include/CGAL/Interval_nt.h                     |      0
 .../include/CGAL/Interval_skip_list.h              |      0
 .../include/CGAL/Interval_skip_list_interval.h     |      0
 .../include/CGAL/Interval_traits.h                 |      0
 .../include/CGAL/Inverse_index.h                   |      0
 .../include/CGAL/Is_a_predicate.h                  |      0
 .../include/CGAL/Is_extended_kernel.h              |      0
 3rdparty/CGAL-4.8/include/CGAL/Iso_cuboid_3.h      |    265 +
 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2.h   |    258 +
 .../Iso_rectangle_2_Iso_rectangle_2_intersection.h |      0
 .../CGAL/Iso_rectangle_2_Line_2_intersection.h     |      0
 .../CGAL/Iso_rectangle_2_Point_2_intersection.h    |      0
 .../CGAL/Iso_rectangle_2_Ray_2_intersection.h      |      0
 .../CGAL/Iso_rectangle_2_Segment_2_intersection.h  |      0
 .../include/CGAL/Iso_rectangle_d.h                 |      0
 .../include/CGAL/Iterator_project.h                |      0
 3rdparty/CGAL-4.8/include/CGAL/Iterator_range.h    |    115 +
 .../include/CGAL/Iterator_transform.h              |      0
 .../include/CGAL/Join_input_iterator.h             |      0
 .../include/CGAL/K_neighbor_search.h               |      0
 3rdparty/CGAL-4.8/include/CGAL/Kd_tree.h           |    464 +
 3rdparty/CGAL-4.8/include/CGAL/Kd_tree_node.h      |    551 +
 .../include/CGAL/Kd_tree_rectangle.h               |      0
 .../include/CGAL/Kernel/Dimension_utils.h          |      0
 .../include/CGAL/Kernel/Return_base_tag.h          |      0
 .../include/CGAL/Kernel/Same_uncertainty.h         |      0
 .../include/CGAL/Kernel/Type_equality_wrapper.h    |      0
 .../include/CGAL/Kernel/Type_mapper.h              |      0
 .../include/CGAL/Kernel/Wutils.h                   |      0
 .../include/CGAL/Kernel/function_objects.h         |      0
 .../include/CGAL/Kernel/global_functions.h         |      0
 .../include/CGAL/Kernel/global_functions_2.h       |      0
 .../include/CGAL/Kernel/global_functions_3.h       |      0
 .../CGAL/Kernel/global_functions_internal_2.h      |      0
 .../CGAL/Kernel/global_functions_internal_3.h      |      0
 .../include/CGAL/Kernel/interface_macros.h         |      0
 .../include/CGAL/Kernel/mpl.h                      |      0
 .../include/CGAL/Kernel/solve.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_checker.h    |    324 +
 .../include/CGAL/Kernel_d/Aff_transformationCd.h   |      0
 .../include/CGAL/Kernel_d/Aff_transformationHd.h   |      0
 .../include/CGAL/Kernel_d/Aff_transformation_d.h   |      0
 .../CGAL/Kernel_d/Cartesian_const_iterator_d.h     |      0
 .../include/CGAL/Kernel_d/Cartesian_converter_d.h  |      0
 .../include/CGAL/Kernel_d/DirectionCd.h            |      0
 .../include/CGAL/Kernel_d/DirectionCd_impl.h       |      0
 .../include/CGAL/Kernel_d/DirectionHd.h            |      0
 .../include/CGAL/Kernel_d/DirectionHd_impl.h       |      0
 .../include/CGAL/Kernel_d/Direction_d.h            |      0
 .../include/CGAL/Kernel_d/HyperplaneCd.h           |      0
 .../include/CGAL/Kernel_d/HyperplaneCd_impl.h      |      0
 .../include/CGAL/Kernel_d/HyperplaneHd.h           |      0
 .../include/CGAL/Kernel_d/HyperplaneHd_impl.h      |      0
 .../include/CGAL/Kernel_d/Hyperplane_d.h           |      0
 .../include/CGAL/Kernel_d/Interface_classes.h      |      0
 .../CGAL/Kernel_d/Interval_linear_algebra.h        |      0
 .../include/CGAL/Kernel_d/Iso_box_d.h              |      0
 .../include/CGAL/Kernel_d/Kernel_classesCd.h       |      0
 .../include/CGAL/Kernel_d/Kernel_classesHd.h       |      0
 .../include/CGAL/Kernel_d/Line_d.h                 |      0
 .../include/CGAL/Kernel_d/Line_d_impl.h            |      0
 .../include/CGAL/Kernel_d/Linear_algebraCd_impl.h  |      0
 .../include/CGAL/Kernel_d/Linear_algebraHd_impl.h  |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Matrix__.h |    831 +
 .../include/CGAL/Kernel_d/PVDHACd_impl.h           |      0
 .../include/CGAL/Kernel_d/PVDHAHd_impl.h           |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Pair_d.h   |     97 +
 .../include/CGAL/Kernel_d/PointCd.h                |      0
 .../include/CGAL/Kernel_d/PointCd_impl.h           |      0
 .../include/CGAL/Kernel_d/PointHd.h                |      0
 .../include/CGAL/Kernel_d/PointHd_impl.h           |      0
 .../include/CGAL/Kernel_d/Point_d.h                |      0
 .../include/CGAL/Kernel_d/Ray_d.h                  |      0
 .../include/CGAL/Kernel_d/Segment_d.h              |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Sphere_d.h |    340 +
 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Tuple_d.h  |    286 +
 .../include/CGAL/Kernel_d/VectorCd.h               |      0
 .../include/CGAL/Kernel_d/VectorCd_impl.h          |      0
 .../include/CGAL/Kernel_d/VectorHd.h               |      0
 .../include/CGAL/Kernel_d/VectorHd_impl.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector__.h |    466 +
 .../include/CGAL/Kernel_d/Vector_d.h               |      0
 .../include/CGAL/Kernel_d/debug.h                  |      0
 .../include/CGAL/Kernel_d/function_objects.h       |      0
 .../include/CGAL/Kernel_d/function_objectsCd.h     |    814 +
 .../include/CGAL/Kernel_d/function_objectsHd.h     |    514 +
 .../include/CGAL/Kernel_d/interface_macros_d.h     |      0
 .../include/CGAL/Kernel_d/intersection_objectsCd.h |      0
 .../include/CGAL/Kernel_d/intersection_objectsHd.h |      0
 .../include/CGAL/Kernel_d/intersection_objects_d.h |      0
 .../include/CGAL/Kernel_d/simple_objects.h         |      0
 .../include/CGAL/Kernel_profiler.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/Kernel_traits.h     |     67 +
 .../include/CGAL/Kinetic/Active_objects_vector.h   |    378 +
 .../Kinetic/CORE_Expr_exact_simulation_traits.h    |      0
 .../include/CGAL/Kinetic/Cartesian.h               |      0
 .../include/CGAL/Kinetic/Certificate_generator.h   |      0
 .../CGAL/Kinetic/Default_instantaneous_kernel.h    |      0
 .../include/CGAL/Kinetic/Default_simulator.h       |      0
 .../CGAL/Kinetic/Delaunay_triangulation_2.h        |      0
 .../CGAL/Kinetic/Delaunay_triangulation_3.h        |      0
 .../Kinetic/Delaunay_triangulation_cell_base_3.h   |      0
 .../Delaunay_triangulation_default_traits_2.h      |      0
 .../Delaunay_triangulation_event_log_visitor_2.h   |      0
 .../Delaunay_triangulation_event_log_visitor_3.h   |      0
 .../Kinetic/Delaunay_triangulation_face_base_2.h   |      0
 ...Delaunay_triangulation_recent_edges_visitor_2.h |      0
 .../Kinetic/Delaunay_triangulation_vertex_base_2.h |      0
 .../Delaunay_triangulation_visitor_base_2.h        |      0
 .../Delaunay_triangulation_visitor_base_3.h        |      0
 .../Kinetic/Derivitive_filter_function_kernel.h    |      0
 .../include/CGAL/Kinetic/Enclosing_box_2.h         |      0
 .../include/CGAL/Kinetic/Enclosing_box_3.h         |      0
 .../include/CGAL/Kinetic/Erase_event.h             |      0
 .../include/CGAL/Kinetic/Event_base.h              |      0
 .../include/CGAL/Kinetic/Exact_simulation_traits.h |      0
 .../include/CGAL/Kinetic/Free_event_base.h         |      0
 .../Kinetic/Handle_degeneracy_function_kernel.h    |    121 +
 .../CGAL/Kinetic/Heap_pointer_event_queue.h        |      0
 .../CGAL/Kinetic/Inexact_simulation_traits.h       |      0
 .../include/CGAL/Kinetic/Insert_event.h            |      0
 .../include/CGAL/Kinetic/Listener.h                |      0
 .../include/CGAL/Kinetic/Multi_listener.h          |      0
 .../CGAL-4.8/include/CGAL/Kinetic/Ref_counted.h    |    130 +
 .../include/CGAL/Kinetic/Regular_triangulation_3.h |   1221 +
 ...ar_triangulation_CORE_exact_simulation_traits.h |      0
 .../Kinetic/Regular_triangulation_cell_base_3.h    |      0
 .../Regular_triangulation_event_log_visitor_3.h    |      0
 ...Regular_triangulation_exact_simulation_traits.h |      0
 ...gular_triangulation_inexact_simulation_traits.h |      0
 .../Regular_triangulation_instantaneous_kernel.h   |      0
 .../Kinetic/Regular_triangulation_vertex_base_3.h  |      0
 .../Kinetic/Regular_triangulation_visitor_base_3.h |      0
 .../CGAL/Kinetic/Simulator_objects_listener.h      |      0
 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort.h      |    469 +
 .../include/CGAL/Kinetic/Sort_event_log_visitor.h  |      0
 .../include/CGAL/Kinetic/Sort_visitor_base.h       |      0
 .../include/CGAL/Kinetic/Triangulation_2.h         |      0
 .../CGAL/Kinetic/Two_list_pointer_event_queue.h    |   1039 +
 .../include/CGAL/Kinetic/basic.h                   |      0
 .../internal/Delaunay_triangulation_base_3.h       |      0
 .../CGAL/Kinetic/internal/Instantaneous_adaptor.h  |      0
 .../Kernel/Cartesian_kinetic_kernel_base.h         |      0
 .../Kernel/Cartesian_moving_lifted_point_3.h       |      0
 .../Kernel/Cartesian_moving_orthosphere_3.h        |      0
 .../internal/Kernel/Cartesian_moving_point_1.h     |      0
 .../internal/Kernel/Cartesian_moving_point_2.h     |      0
 .../internal/Kernel/Cartesian_moving_point_3.h     |      0
 .../Kernel/Cartesian_moving_weighted_point_3.h     |      0
 .../include/CGAL/Kinetic/internal/Kernel/Center.h  |      0
 .../CGAL/Kinetic/internal/Kernel/Certificate.h     |      0
 .../internal/Kernel/Delaunay_lifted_lifting.h      |      0
 .../Kinetic/internal/Kernel/Delaunay_lifting.h     |      0
 .../CGAL/Kinetic/internal/Kernel/Reverse_time.h    |      0
 .../internal/Kernel/cartesian_predicates_2.h       |      0
 .../internal/Kernel/cartesian_predicates_3.h       |      0
 .../include/CGAL/Kinetic/internal/To_static.h      |      0
 .../CGAL/Kinetic/internal/Triangulation_helper_3.h |      0
 .../include/CGAL/Kinetic/internal/config.h         |      0
 .../include/CGAL/Kinetic/internal/debug_counters.h |     79 +
 .../CGAL/Kinetic/internal/debug_counters_impl.h    |     42 +
 .../CGAL/Kinetic/internal/infinity_or_max.h        |      0
 .../include/CGAL/Kinetic/internal/tds_2_helpers.h  |      0
 .../Kinetic/internal/triangulation_helpers_3.h     |      0
 .../include/CGAL/Kinetic/listeners.h               |      0
 .../include/CGAL/LEDA_arithmetic_kernel.h          |      0
 .../include/CGAL/LEDA_basic.h                      |      0
 .../CGAL-4.8/include/CGAL/LSCM_parameterizer_3.h   |    680 +
 .../include/CGAL/Labeled_image_mesh_domain_3.h     |    108 +
 .../CGAL-4.8/include/CGAL/Labeled_mesh_domain_3.h  |    650 +
 3rdparty/CGAL-4.8/include/CGAL/Lapack_svd.h        |    171 +
 .../include/CGAL/Largest_empty_iso_rectangle_2.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Lazy.h              |   1763 +
 3rdparty/CGAL-4.8/include/CGAL/Lazy_exact_nt.h     |   1447 +
 .../include/CGAL/Lazy_kernel.h                     |      0
 .../include/CGAL/Level_interval.h                  |      0
 .../include/CGAL/Lightweight_vector_3.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/Line_2.h            |    292 +
 .../include/CGAL/Line_2_Bbox_2_intersection.h      |      0
 .../CGAL/Line_2_Iso_rectangle_2_intersection.h     |      0
 .../include/CGAL/Line_2_Line_2_intersection.h      |      0
 .../include/CGAL/Line_2_Point_2_intersection.h     |      0
 .../include/CGAL/Line_2_Ray_2_intersection.h       |      0
 .../include/CGAL/Line_2_Segment_2_intersection.h   |      0
 .../include/CGAL/Line_2_Triangle_2_intersection.h  |      0
 3rdparty/CGAL-4.8/include/CGAL/Line_3.h            |    171 +
 .../include/CGAL/Line_arc_2.h                      |      0
 .../include/CGAL/Line_arc_3.h                      |      0
 .../include/CGAL/Linear_algebraCd.h                |      0
 .../include/CGAL/Linear_algebraHd.h                |      0
 .../CGAL-4.8/include/CGAL/Linear_cell_complex.h    |    936 +
 .../CGAL/Linear_cell_complex_constructors.h        |    622 +
 .../CGAL/Linear_cell_complex_incremental_builder.h |    161 +
 .../include/CGAL/Linear_cell_complex_min_items.h   |      0
 .../include/CGAL/Linear_cell_complex_operations.h  |      0
 .../include/CGAL/Linear_cell_complex_storages.h    |    450 +
 .../include/CGAL/Linear_cell_complex_traits.h      |      0
 .../include/CGAL/Location_policy.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/MP_Float.h          |    912 +
 .../include/CGAL/MP_Float_arithmetic_kernel.h      |      0
 .../include/CGAL/MP_Float_impl.h                   |      0
 .../CGAL/Manhattan_distance_iso_box_point.h        |      0
 .../CGAL/Marching_tetrahedra_observer_default_3.h  |      0
 .../Marching_tetrahedra_traits_skin_surface_3.h    |      0
 .../CGAL/Mean_curvature_flow_skeletonization.h     |   1438 +
 .../CGAL/Mean_value_coordinates_parameterizer_3.h  |    205 +
 3rdparty/CGAL-4.8/include/CGAL/Memory_sizer.h      |    174 +
 .../include/CGAL/Mesh_2/Clusters.h                 |      0
 .../include/CGAL/Mesh_2/Do_not_refine_edges.h      |      0
 .../include/CGAL/Mesh_2/Face_badness.h             |      0
 .../include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h |    291 +
 .../CGAL-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h    |    111 +
 .../include/CGAL/Mesh_2/Mesh_global_optimizer_2.h  |    485 +
 .../include/CGAL/Mesh_2/Mesh_sizing_field.h        |    218 +
 .../include/CGAL/Mesh_2/Output_stream.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/README       |      6 +
 .../include/CGAL/Mesh_2/Refine_edges.h             |      0
 .../include/CGAL/Mesh_2/Refine_edges_visitor.h     |      0
 .../CGAL/Mesh_2/Refine_edges_with_clusters.h       |      0
 .../include/CGAL/Mesh_2/Refine_faces.h             |      0
 .../CGAL-4.8/include/CGAL/Mesh_2/Sizing_field_2.h  |     57 +
 .../include/CGAL/Mesh_2/Uniform_sizing_field_2.h   |     55 +
 .../CGAL-4.8/include/CGAL/Mesh_3/C3T3_helpers.h    |   3906 +
 .../CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h |      0
 .../include/CGAL/Mesh_3/Concurrent_mesher_config.h |      0
 .../include/CGAL/Mesh_3/Creator_weighted_point_3.h |      0
 .../CGAL/Mesh_3/Detect_features_in_polyhedra.h     |      0
 .../CGAL/Mesh_3/Detect_features_in_polyhedra_fwd.h |      0
 .../CGAL/Mesh_3/Detect_polylines_in_polyhedra.h    |      0
 .../Mesh_3/Detect_polylines_in_polyhedra_fwd.h     |      0
 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Dump_c3t3.h  |    103 +
 .../Mesh_3/Facet_criteria_visitor_with_balls.h     |      0
 .../CGAL/Mesh_3/Facet_on_same_surface_criterion.h  |      0
 .../include/CGAL/Mesh_3/Has_features.h             |      0
 .../Mesh_3/Image_to_labeled_function_wrapper.h     |    142 +
 .../CGAL/Mesh_3/Implicit_surface_mesher_visitor.h  |      0
 .../Mesh_3/Implicit_to_labeled_function_wrapper.h  |      0
 .../include/CGAL/Mesh_3/Labeled_mesh_domain_3.h    |    630 +
 .../include/CGAL/Mesh_3/Lloyd_move.h               |      0
 .../Mesh_complex_3_in_triangulation_3_base.h       |    949 +
 .../include/CGAL/Mesh_3/Mesh_global_optimizer.h    |   1158 +
 .../include/CGAL/Mesh_3/Mesh_sizing_field.h        |      0
 .../include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h |      0
 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_3.h   |    714 +
 .../CGAL-4.8/include/CGAL/Mesh_3/Mesher_level.h    |   1214 +
 .../Mesh_3/Mesher_level_default_implementations.h  |      0
 .../include/CGAL/Mesh_3/Null_exuder_visitor.h      |      0
 .../CGAL/Mesh_3/Null_global_optimizer_visitor.h    |      0
 .../include/CGAL/Mesh_3/Null_perturber_visitor.h   |      0
 .../include/CGAL/Mesh_3/Odt_move.h                 |      0
 .../include/CGAL/Mesh_3/Poisson_refine_cells_3.h   |      0
 .../include/CGAL/Mesh_3/Polyline_with_context.h    |      0
 .../include/CGAL/Mesh_3/Profile_counter.h          |      0
 .../include/CGAL/Mesh_3/Profiling_tools.h          |      0
 .../CGAL/Mesh_3/Protect_edges_sizing_field.h       |   1705 +
 .../include/CGAL/Mesh_3/Refine_cells_3.h           |      0
 .../CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_3.h |   1965 +
 .../CGAL/Mesh_3/Refine_facets_manifold_base.h      |    637 +
 .../include/CGAL/Mesh_3/Refine_tets_visitor.h      |      0
 .../CGAL/Mesh_3/Robust_intersection_kernel.h       |      0
 .../CGAL/Mesh_3/Robust_intersection_traits_3.h     |      0
 ...obust_weighted_circumcenter_filtered_traits_3.h |    429 +
 .../include/CGAL/Mesh_3/Sizing_grid.h              |      0
 .../include/CGAL/Mesh_3/Sliver_perturber.h         |   1661 +
 .../CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder.h  |   1869 +
 .../Mesh_3/Slivers_exuder_cell_attributes_traits.h |      0
 .../CGAL/Mesh_3/Triangle_accessor_primitive.h      |      0
 .../include/CGAL/Mesh_3/Triangulation_helpers.h    |      0
 .../CGAL/Mesh_3/Triangulation_sizing_field.h       |      0
 .../include/CGAL/Mesh_3/Uniform_sizing_field.h     |      0
 .../CGAL/Mesh_3/Worksharing_data_structures.h      |      0
 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/config.h     |     84 +
 .../include/CGAL/Mesh_3/dihedral_angle_3.h         |      0
 .../include/CGAL/Mesh_3/global_parameters.h        |    100 +
 .../include/CGAL/Mesh_3/io_signature.h             |      0
 .../CGAL/Mesh_3/mesh_standard_cell_criteria.h      |      0
 .../include/CGAL/Mesh_3/mesh_standard_criteria.h   |      0
 .../CGAL/Mesh_3/mesh_standard_facet_criteria.h     |      0
 .../include/CGAL/Mesh_3/min_dihedral_angle.h       |      0
 .../include/CGAL/Mesh_3/parameters_defaults.h      |      0
 .../polyhedral_to_labeled_function_wrapper.h       |      0
 .../include/CGAL/Mesh_3/polylines_to_protect.h     |    359 +
 .../include/CGAL/Mesh_3/radius_ratio.h             |      0
 .../include/CGAL/Mesh_3/sliver_criteria.h          |      0
 .../Mesh_3/squared_distance_Point_3_Triangle_3.h   |      0
 .../include/CGAL/Mesh_3/utilities.h                |      0
 .../include/CGAL/Mesh_3/vertex_perturbation.h      |      0
 .../include/CGAL/Mesh_cell_base_3.h                |      0
 .../include/CGAL/Mesh_cell_criteria_3.h            |      0
 .../CGAL/Mesh_complex_3_in_triangulation_3.h       |      0
 .../include/CGAL/Mesh_constant_domain_field_3.h    |      0
 .../include/CGAL/Mesh_criteria_3.h                 |      0
 .../CGAL/Mesh_domain_with_polyline_features_3.h    |   1088 +
 .../include/CGAL/Mesh_edge_criteria_3.h            |      0
 .../CGAL-4.8/include/CGAL/Mesh_facet_criteria_3.h  |    182 +
 .../CGAL-4.8/include/CGAL/Mesh_facet_topology.h    |     41 +
 .../include/CGAL/Mesh_optimization_return_code.h   |      0
 .../include/CGAL/Mesh_polyhedron_3.h               |      0
 .../include/CGAL/Mesh_triangulation_3.h            |      0
 .../CGAL-4.8/include/CGAL/Mesh_vertex_base_3.h     |    310 +
 .../include/CGAL/Mesher_level.h                    |      0
 .../CGAL/Mesher_level_default_implementations.h    |      0
 .../include/CGAL/Mesher_level_visitors.h           |      0
 .../include/CGAL/Meshes/Double_map_container.h     |     95 +
 .../include/CGAL/Meshes/Filtered_deque_container.h |      0
 .../CGAL/Meshes/Filtered_multimap_container.h      |      0
 .../include/CGAL/Meshes/Filtered_queue_container.h |      0
 .../include/CGAL/Meshes/Simple_map_container.h     |      0
 .../include/CGAL/Meshes/Simple_queue_container.h   |      0
 .../include/CGAL/Meshes/Simple_set_container.h     |      0
 .../Meshes/Triangulation_mesher_level_traits_2.h   |      0
 .../Meshes/Triangulation_mesher_level_traits_3.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Min_annulus_d.h     |    874 +
 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2.h      |    589 +
 .../CGAL/Min_circle_2/Min_circle_2_adapterC2.h     |      0
 .../CGAL/Min_circle_2/Min_circle_2_adapterH2.h     |      0
 .../include/CGAL/Min_circle_2/Min_circle_2_impl.h  |      0
 .../CGAL/Min_circle_2/Optimisation_circle_2.h      |      0
 .../CGAL/Min_circle_2/Optimisation_circle_2_impl.h |      0
 .../include/CGAL/Min_circle_2_traits_2.h           |      0
 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2.h     |    584 +
 .../CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h   |      0
 .../CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h   |      0
 .../CGAL/Min_ellipse_2/Min_ellipse_2_impl.h        |      0
 .../CGAL/Min_ellipse_2/Optimisation_ellipse_2.h    |    449 +
 .../Min_ellipse_2/Optimisation_ellipse_2_impl.h    |      0
 .../include/CGAL/Min_ellipse_2_traits_2.h          |      0
 .../include/CGAL/Min_quadrilateral_traits_2.h      |      0
 .../include/CGAL/Min_sphere_annulus_d_traits_2.h   |      0
 .../include/CGAL/Min_sphere_annulus_d_traits_3.h   |      0
 .../include/CGAL/Min_sphere_annulus_d_traits_d.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d.h      |    462 +
 .../include/CGAL/Min_sphere_d/Min_sphere_d_impl.h  |      0
 .../CGAL/Min_sphere_d/Optimisation_sphere_d.h      |      0
 .../include/CGAL/Min_sphere_of_points_d_traits_2.h |      0
 .../include/CGAL/Min_sphere_of_points_d_traits_3.h |      0
 .../include/CGAL/Min_sphere_of_points_d_traits_d.h |      0
 .../include/CGAL/Min_sphere_of_spheres_d.h         |      0
 .../Min_sphere_of_spheres_d_configure.h            |      0
 .../Min_sphere_of_spheres_d_impl.h                 |      0
 .../Min_sphere_of_spheres_d_pair.h                 |      0
 .../Min_sphere_of_spheres_d_pivot_impl.h           |      0
 .../Min_sphere_of_spheres_d_support_set.h          |      0
 .../Min_sphere_of_spheres_d_support_set_impl.h     |      0
 .../CGAL/Min_sphere_of_spheres_d_traits_2.h        |      0
 .../CGAL/Min_sphere_of_spheres_d_traits_3.h        |      0
 .../CGAL/Min_sphere_of_spheres_d_traits_d.h        |      0
 .../Minimum_enclosing_quadrilateral_traits_2.h     |      0
 .../Minkowski_sum_2/AABB_collision_detector_2.h    |    102 +
 .../CGAL/Minkowski_sum_2/AABB_node_with_join.h     |    285 +
 .../Minkowski_sum_2/AABB_segment_2_primitive.h     |     69 +
 .../include/CGAL/Minkowski_sum_2/AABB_traits_2.h   |    221 +
 .../AABB_traversal_traits_with_join.h              |    428 +
 .../CGAL/Minkowski_sum_2/AABB_tree_with_join.h     |   1274 +
 .../CGAL/Minkowski_sum_2/Approx_offset_base_2.h    |    598 +
 .../CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h    |    418 +
 .../Decomposition_strategy_adapter.h               |    176 +
 .../CGAL/Minkowski_sum_2/Exact_offset_base_2.h     |    294 +
 .../include/CGAL/Minkowski_sum_2/Hole_filter_2.h   |     88 +
 .../CGAL-4.8/include/CGAL/Minkowski_sum_2/Labels.h |    285 +
 .../Minkowski_sum_by_reduced_convolution_2.h       |    512 +
 .../CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h    |    638 +
 .../CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h  |    421 +
 .../include/CGAL/Minkowski_sum_2/Offset_conv_2.h   |    198 +
 .../include/CGAL/Minkowski_sum_2/Offset_decomp_2.h |    124 +
 .../Minkowski_sum_2/Polygon_convex_decomposition.h |    128 +
 .../CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h |    251 +
 .../CGAL/Minkowski_sum_2/Union_of_cycles_2.h       |    223 +
 .../Minkowski_sum_2/Union_of_segment_cycles_2.h    |    132 +
 .../include/CGAL/Minkowski_sum_3/Gaussian_map.h    |   1233 +
 .../CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h   |      0
 .../include/CGAL/Minkowski_sum_3/PointMark.h       |      0
 .../bipartite_nary_union_sorted_combined.h         |      0
 .../include/CGAL/Modifiable_priority_queue.h       |      0
 .../include/CGAL/Modifier_base.h                   |      0
 .../include/CGAL/Modular_arithmetic/Residue_type.h |    327 +
 .../include/CGAL/Modular_traits.h                  |      0
 .../CGAL-4.8/include/CGAL/Monge_via_jet_fitting.h  |    784 +
 3rdparty/CGAL-4.8/include/CGAL/Mpzf.h              |   1161 +
 .../include/CGAL/Multi_surface_3.h                 |      0
 .../include/CGAL/Multiscale_sort.h                 |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Multiset.h |      0
 .../include/CGAL/NT_converter.h                    |      0
 .../include/CGAL/N_step_adaptor.h                  |      0
 .../include/CGAL/N_step_adaptor_derived.h          |      0
 .../include/CGAL/Needs_parens_as_product.h         |      0
 .../include/CGAL/Nef_2/Bounding_box_2.h            |      0
 .../include/CGAL/Nef_2/Constrained_triang_traits.h |      0
 .../include/CGAL/Nef_2/HDS_items.h                 |      0
 .../include/CGAL/Nef_2/Line_to_epoint.h            |      0
 .../include/CGAL/Nef_2/Object_handle.h             |      0
 .../include/CGAL/Nef_2/Object_index.h              |      0
 .../include/CGAL/Nef_2/PM_checker.h                |      0
 .../include/CGAL/Nef_2/PM_const_decorator.h        |      0
 .../include/CGAL/Nef_2/PM_decorator.h              |      0
 .../include/CGAL/Nef_2/PM_explorer.h               |      0
 .../include/CGAL/Nef_2/PM_io_parser.h              |      0
 .../include/CGAL/Nef_2/PM_overlayer.h              |      0
 .../include/CGAL/Nef_2/PM_persistent_PL.h          |      0
 .../CGAL-4.8/include/CGAL/Nef_2/PM_point_locator.h |   1059 +
 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial.h  |   1979 +
 .../CGAL-4.8/include/CGAL/Nef_2/Polynomial_impl.h  |    204 +
 .../include/CGAL/Nef_2/Segment_overlay_traits.h    |      0
 .../include/CGAL/Nef_2/debug.h                     |      0
 .../include/CGAL/Nef_2/gen_point_location.h        |      0
 .../include/CGAL/Nef_2/geninfo.h                   |      0
 .../CGAL-4.8/include/CGAL/Nef_2/iterator_tools.h   |    112 +
 .../include/CGAL/Nef_3/Binary_operation.h          |      0
 .../include/CGAL/Nef_3/Bounding_box_3.h            |      0
 .../include/CGAL/Nef_3/Combine_with_halfspace.h    |      0
 .../include/CGAL/Nef_3/Default_items.h             |      0
 .../include/CGAL/Nef_3/Edge_edge_overlay.h         |      0
 .../Exact_triangulation_euclidean_traits_xy_3.h    |      0
 .../Exact_triangulation_euclidean_traits_xz_3.h    |      0
 .../Exact_triangulation_euclidean_traits_yz_3.h    |      0
 .../include/CGAL/Nef_3/Halfedge.h                  |      0
 .../include/CGAL/Nef_3/Halffacet.h                 |      0
 .../include/CGAL/Nef_3/ID_support_handler.h        |      0
 .../include/CGAL/Nef_3/Infimaximal_box.h           |      0
 .../include/CGAL/Nef_3/K3_tree.h                   |      0
 .../include/CGAL/Nef_3/Mark_bounded_volumes.h      |      0
 .../include/CGAL/Nef_3/Nef_box.h                   |      0
 .../include/CGAL/Nef_3/OGL_helper.h                |      0
 .../CGAL-4.8/include/CGAL/Nef_3/Pluecker_line_3.h  |    356 +
 .../include/CGAL/Nef_3/SFace.h                     |      0
 .../include/CGAL/Nef_3/SHalfedge.h                 |      0
 .../include/CGAL/Nef_3/SHalfloop.h                 |      0
 .../include/CGAL/Nef_3/SM_visualizor.h             |      0
 .../CGAL-4.8/include/CGAL/Nef_3/SNC_FM_decorator.h |    678 +
 .../include/CGAL/Nef_3/SNC_SM_explorer.h           |      0
 .../include/CGAL/Nef_3/SNC_SM_overlayer.h          |      0
 .../include/CGAL/Nef_3/SNC_SM_visualizor.h         |      0
 .../include/CGAL/Nef_3/SNC_const_decorator.h       |      0
 .../include/CGAL/Nef_3/SNC_constructor.h           |      0
 .../include/CGAL/Nef_3/SNC_decorator.h             |      0
 .../include/CGAL/Nef_3/SNC_decorator_traits.h      |      0
 .../include/CGAL/Nef_3/SNC_external_structure.h    |   1407 +
 .../include/CGAL/Nef_3/SNC_indexed_items.h         |      0
 .../include/CGAL/Nef_3/SNC_intersection.h          |      0
 .../CGAL-4.8/include/CGAL/Nef_3/SNC_io_parser.h    |   2086 +
 .../include/CGAL/Nef_3/SNC_items.h                 |      0
 .../include/CGAL/Nef_3/SNC_iteration.h             |      0
 .../include/CGAL/Nef_3/SNC_k3_tree_traits.h        |      0
 .../include/CGAL/Nef_3/SNC_list.h                  |      0
 .../include/CGAL/Nef_3/SNC_point_locator.h         |      0
 .../include/CGAL/Nef_3/SNC_simplify.h              |      0
 .../include/CGAL/Nef_3/SNC_sphere_map.h            |      0
 .../include/CGAL/Nef_3/SNC_structure.h             |      0
 .../include/CGAL/Nef_3/Vertex.h                    |      0
 .../include/CGAL/Nef_3/Volume.h                    |      0
 .../include/CGAL/Nef_3/binop_intersection_tests.h  |      0
 .../include/CGAL/Nef_3/bounded_side_3.h            |      0
 .../include/CGAL/Nef_3/polyhedron_3_to_nef_3.h     |      0
 .../quotient_coordinates_to_homogeneous_point.h    |      0
 .../include/CGAL/Nef_3/shell_to_nef_3.h            |      0
 .../include/CGAL/Nef_3/vertex_cycle_to_nef_3.h     |      0
 .../include/CGAL/Nef_S2/Generic_handle_map.h       |      0
 .../include/CGAL/Nef_S2/Normalizing.h              |      0
 .../include/CGAL/Nef_S2/OGL_base_object.h          |      0
 .../include/CGAL/Nef_S2/SM_checker.h               |      0
 .../include/CGAL/Nef_S2/SM_const_decorator.h       |      0
 .../CGAL/Nef_S2/SM_constrained_triang_traits.h     |      0
 .../include/CGAL/Nef_S2/SM_decorator.h             |      0
 .../include/CGAL/Nef_S2/SM_decorator_traits.h      |      0
 .../CGAL-4.8/include/CGAL/Nef_S2/SM_io_parser.h    |    492 +
 .../include/CGAL/Nef_S2/SM_items.h                 |      0
 .../include/CGAL/Nef_S2/SM_iteration.h             |      0
 .../include/CGAL/Nef_S2/SM_list.h                  |      0
 .../CGAL-4.8/include/CGAL/Nef_S2/SM_overlayer.h    |   2461 +
 .../include/CGAL/Nef_S2/SM_point_locator.h         |      0
 .../CGAL-4.8/include/CGAL/Nef_S2/SM_triangulator.h |    744 +
 .../include/CGAL/Nef_S2/SM_visualizor.h            |      0
 .../include/CGAL/Nef_S2/Sphere_circle.h            |      0
 .../include/CGAL/Nef_S2/Sphere_direction.h         |      0
 .../include/CGAL/Nef_S2/Sphere_geometry.h          |      0
 .../include/CGAL/Nef_S2/Sphere_geometry_OGL.h      |    824 +
 .../include/CGAL/Nef_S2/Sphere_map.h               |      0
 .../include/CGAL/Nef_S2/Sphere_point.h             |      0
 .../include/CGAL/Nef_S2/Sphere_segment.h           |      0
 .../CGAL-4.8/include/CGAL/Nef_S2/Sphere_triangle.h |    119 +
 .../include/CGAL/Nef_S2/leda_sphere_map.h          |      0
 .../include/CGAL/Nef_S2/sphere_predicates.h        |    411 +
 .../include/CGAL/Nef_nary_intersection_3.h         |      0
 .../include/CGAL/Nef_nary_union_3.h                |      0
 3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_2.h  |   1137 +
 3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_3.h  |   2130 +
 .../include/CGAL/Nef_polyhedron_S2.h               |      0
 .../include/CGAL/Nef_polynomial.h                  |      0
 .../include/CGAL/Nef_polynomial_fwd.h              |      0
 .../include/CGAL/Nested_iterator.h                 |      0
 .../include/CGAL/NewKernel_d/Cartesian_LA_base.h   |      0
 .../CGAL/NewKernel_d/Cartesian_LA_functors.h       |      0
 .../include/CGAL/NewKernel_d/Cartesian_base.h      |      0
 .../include/CGAL/NewKernel_d/Cartesian_change_FT.h |      0
 .../include/CGAL/NewKernel_d/Cartesian_complete.h  |      0
 .../include/CGAL/NewKernel_d/Cartesian_filter_K.h  |      0
 .../include/CGAL/NewKernel_d/Cartesian_filter_NT.h |      0
 .../CGAL/NewKernel_d/Cartesian_per_dimension.h     |      0
 .../CGAL/NewKernel_d/Cartesian_static_filters.h    |      0
 .../include/CGAL/NewKernel_d/Coaffine.h            |      0
 .../include/CGAL/NewKernel_d/Define_kernel_types.h |      0
 .../include/CGAL/NewKernel_d/Dimension_base.h      |      0
 .../include/CGAL/NewKernel_d/Filtered_predicate2.h |      0
 .../include/CGAL/NewKernel_d/KernelD_converter.h   |    199 +
 .../include/CGAL/NewKernel_d/Kernel_2_interface.h  |      0
 .../include/CGAL/NewKernel_d/Kernel_3_interface.h  |      0
 .../include/CGAL/NewKernel_d/Kernel_d_interface.h  |    238 +
 .../CGAL/NewKernel_d/Kernel_object_converter.h     |      0
 .../include/CGAL/NewKernel_d/LA_eigen/LA.h         |      0
 .../CGAL/NewKernel_d/LA_eigen/constructors.h       |    162 +
 .../include/CGAL/NewKernel_d/Lazy_cartesian.h      |      0
 .../CGAL/NewKernel_d/Types/Aff_transformation.h    |      0
 .../include/CGAL/NewKernel_d/Types/Hyperplane.h    |    159 +
 .../include/CGAL/NewKernel_d/Types/Iso_box.h       |      0
 .../include/CGAL/NewKernel_d/Types/Line.h          |      0
 .../include/CGAL/NewKernel_d/Types/Ray.h           |      0
 .../include/CGAL/NewKernel_d/Types/Segment.h       |      0
 .../include/CGAL/NewKernel_d/Types/Sphere.h        |    133 +
 .../include/CGAL/NewKernel_d/Vector/array.h        |    165 +
 .../include/CGAL/NewKernel_d/Vector/avx4.h         |      0
 ...f_iterator_to_points_from_iterator_to_vectors.h |     76 +
 ...determinant_of_iterator_to_points_from_points.h |      0
 ...terminant_of_iterator_to_vectors_from_vectors.h |      0
 .../Vector/determinant_of_points_from_vectors.h    |      0
 .../Vector/determinant_of_vectors_small_dim.h      |      0
 .../determinant_of_vectors_small_dim_internal.h    |      0
 .../include/CGAL/NewKernel_d/Vector/mix.h          |      0
 .../include/CGAL/NewKernel_d/Vector/sse2.h         |      0
 .../include/CGAL/NewKernel_d/Vector/v2int.h        |      0
 .../include/CGAL/NewKernel_d/Vector/vector.h       |    167 +
 .../CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h      |    303 +
 .../CGAL/NewKernel_d/Wrapper/Hyperplane_d.h        |    131 +
 .../include/CGAL/NewKernel_d/Wrapper/Point_d.h     |    284 +
 .../CGAL/NewKernel_d/Wrapper/Ref_count_obj.h       |    120 +
 .../include/CGAL/NewKernel_d/Wrapper/Segment_d.h   |    133 +
 .../include/CGAL/NewKernel_d/Wrapper/Sphere_d.h    |    130 +
 .../include/CGAL/NewKernel_d/Wrapper/Vector_d.h    |    266 +
 .../CGAL/NewKernel_d/function_objects_cartesian.h  |   1298 +
 .../include/CGAL/NewKernel_d/functor_properties.h  |      0
 .../include/CGAL/NewKernel_d/functor_tags.h        |    353 +
 .../include/CGAL/NewKernel_d/static_int.h          |      0
 .../include/CGAL/NewKernel_d/store_kernel.h        |      0
 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/utils.h |    306 +
 .../include/CGAL/Null_matrix.h                     |      0
 .../include/CGAL/Number_type_checker.h             |      0
 .../internal_functions_comparison_root_of_2.h      |      0
 .../include/CGAL/OFF_to_nef_3.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/OTR_2/Cost.h        |    110 +
 .../include/CGAL/OTR_2/Reconstruction_edge_2.h     |    144 +
 .../CGAL/OTR_2/Reconstruction_face_base_2.h        |    266 +
 .../CGAL/OTR_2/Reconstruction_triangulation_2.h    |   1079 +
 .../CGAL/OTR_2/Reconstruction_vertex_base_2.h      |    134 +
 3rdparty/CGAL-4.8/include/CGAL/OTR_2/Sample.h      |    146 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Object.h   |      0
 .../include/CGAL/OpenNL/bicgstab.h                 |      0
 .../include/CGAL/OpenNL/blas.h                     |      0
 .../include/CGAL/OpenNL/conjugate_gradient.h       |      0
 .../include/CGAL/OpenNL/full_vector.h              |      0
 .../CGAL-4.8/include/CGAL/OpenNL/linear_solver.h   |    478 +
 .../include/CGAL/OpenNL/preconditioner.h           |      0
 .../include/CGAL/OpenNL/sparse_matrix.h            |      0
 .../CGAL/Optimal_transportation_reconstruction_2.h |   1673 +
 .../CGAL/Optimisation/Access_coordinates_begin_2.h |      0
 .../CGAL/Optimisation/Access_coordinates_begin_3.h |      0
 .../CGAL/Optimisation/Access_coordinates_begin_d.h |      0
 .../include/CGAL/Optimisation/Access_dimension_2.h |      0
 .../include/CGAL/Optimisation/Access_dimension_3.h |      0
 .../include/CGAL/Optimisation/Access_dimension_d.h |      0
 .../include/CGAL/Optimisation/Construct_point_2.h  |      0
 .../include/CGAL/Optimisation/Construct_point_3.h  |      0
 .../include/CGAL/Optimisation/Construct_point_d.h  |      0
 .../include/CGAL/Optimisation/assertions.h         |      0
 .../include/CGAL/Optimisation/basic.h              |      0
 .../include/CGAL/Optimisation/debug.h              |      0
 .../include/CGAL/Optimisation_d_traits_2.h         |      0
 .../include/CGAL/Optimisation_d_traits_3.h         |      0
 .../include/CGAL/Optimisation_d_traits_d.h         |      0
 .../CGAL-4.8/include/CGAL/Orientation_Linf_2.h     |    156 +
 3rdparty/CGAL-4.8/include/CGAL/Origin.h            |     52 +
 3rdparty/CGAL-4.8/include/CGAL/Origin_impl.h       |     30 +
 .../CGAL/Orthogonal_incremental_neighbor_search.h  |    621 +
 .../include/CGAL/Orthogonal_k_neighbor_search.h    |      0
 3rdparty/CGAL-4.8/include/CGAL/PCA_util.h          |    778 +
 .../include/CGAL/Parabola_2.h                      |      0
 .../include/CGAL/Parabola_segment_2.h              |      0
 .../include/CGAL/Param_mesh_patch_circulators.h    |      0
 .../include/CGAL/Param_mesh_patch_iterators.h      |      0
 .../include/CGAL/Param_mesh_patch_vertex.h         |    442 +
 .../CGAL/Parameterization_mesh_feature_extractor.h |      0
 .../include/CGAL/Parameterization_mesh_patch_3.h   |      0
 .../CGAL/Parameterization_polyhedron_adaptor_3.h   |      0
 .../include/CGAL/Parameterizer_traits_3.h          |      0
 .../include/CGAL/Partition_2/Circulator_pair.h     |      0
 .../CGAL/Partition_2/Indirect_edge_compare.h       |      0
 .../include/CGAL/Partition_2/Indirect_less_xy_2.h  |      0
 .../CGAL/Partition_2/Indirect_not_less_yx_2.h      |      0
 .../include/CGAL/Partition_2/Iterator_list.h       |      0
 .../include/CGAL/Partition_2/Matrix.h              |      0
 .../Partition_2/Partition_opt_cvx_diagonal_list.h  |      0
 .../CGAL/Partition_2/Partition_opt_cvx_edge.h      |      0
 .../CGAL/Partition_2/Partition_opt_cvx_vertex.h    |      0
 .../CGAL/Partition_2/Partition_traits_2_base.h     |      0
 .../CGAL/Partition_2/Partition_vertex_map.h        |      0
 .../CGAL/Partition_2/Partitioned_polygon_2.h       |      0
 .../CGAL/Partition_2/Point_pair_less_xy_2.h        |      0
 .../include/CGAL/Partition_2/Rotation_tree_2.h     |      0
 .../CGAL/Partition_2/Rotation_tree_2_impl.h        |      0
 .../CGAL/Partition_2/Rotation_tree_node_2.h        |      0
 .../include/CGAL/Partition_2/Segment_less_yx_2.h   |      0
 .../Partition_2/Triangulation_indirect_traits_2.h  |      0
 .../include/CGAL/Partition_2/Turn_reverser.h       |      0
 .../CGAL/Partition_2/Vertex_visibility_graph_2.h   |      0
 .../Partition_2/Vertex_visibility_graph_2_impl.h   |      0
 .../CGAL/Partition_2/is_degenerate_polygon_2.h     |      0
 .../CGAL/Partition_2/partition_approx_convex_2.h   |    283 +
 .../CGAL/Partition_2/partition_assertions.h        |      0
 .../Partition_2/partition_greene_approx_convex_2.h |      0
 .../CGAL/Partition_2/partition_optimal_convex_2.h  |      0
 .../CGAL/Partition_2/partition_y_monotone_2.h      |      0
 .../include/CGAL/Partition_is_valid_traits_2.h     |      0
 .../include/CGAL/Partition_traits_2.h              |      0
 .../CGAL/Periodic_2_Delaunay_triangulation_2.h     |      0
 .../Periodic_2_Delaunay_triangulation_traits_2.h   |      0
 .../include/CGAL/Periodic_2_offset_2.h             |      0
 .../include/CGAL/Periodic_2_triangulation_2.h      |      0
 .../CGAL/Periodic_2_triangulation_dummy_12.h       |      0
 .../CGAL/Periodic_2_triangulation_face_base_2.h    |      0
 .../Periodic_2_triangulation_filtered_traits_2.h   |      0
 .../CGAL/Periodic_2_triangulation_hierarchy_2.h    |      0
 ...iodic_2_triangulation_hierarchy_vertex_base_2.h |      0
 .../CGAL/Periodic_2_triangulation_iterators_2.h    |      0
 ..._2_triangulation_statically_filtered_traits_2.h |      0
 .../CGAL/Periodic_2_triangulation_traits_2.h       |      0
 .../CGAL/Periodic_2_triangulation_vertex_base_2.h  |      0
 .../CGAL/Periodic_3_Delaunay_triangulation_3.h     |      0
 ...ic_3_Delaunay_triangulation_filtered_traits_3.h |    161 +
 ...ay_triangulation_statically_filtered_traits_3.h |     62 +
 .../Periodic_3_Delaunay_triangulation_traits_3.h   |    150 +
 .../include/CGAL/Periodic_3_construct_point_3.h    |     55 +
 .../include/CGAL/Periodic_3_offset_3.h             |      0
 .../include/CGAL/Periodic_3_triangulation_3.h      |   4141 +
 .../CGAL/Periodic_3_triangulation_ds_cell_base_3.h |      0
 .../Periodic_3_triangulation_ds_vertex_base_3.h    |      0
 .../CGAL/Periodic_3_triangulation_dummy_36.h       |      0
 .../Periodic_3_triangulation_filtered_traits_3.h   |    203 +
 .../CGAL/Periodic_3_triangulation_hierarchy_3.h    |      0
 .../CGAL/Periodic_3_triangulation_iterators_3.h    |      0
 .../Periodic_3_triangulation_remove_traits_3.h     |      0
 ..._3_triangulation_statically_filtered_traits_3.h |     64 +
 .../CGAL/Periodic_3_triangulation_traits_3.h       |    173 +
 3rdparty/CGAL-4.8/include/CGAL/Plane_3.h           |    281 +
 .../include/CGAL/Plane_separator.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/Point_2.h           |    270 +
 .../CGAL/Point_2_Iso_rectangle_2_intersection.h    |      0
 .../include/CGAL/Point_2_Line_2_intersection.h     |      0
 .../include/CGAL/Point_2_Point_2_intersection.h    |      0
 .../include/CGAL/Point_2_Ray_2_intersection.h      |      0
 .../include/CGAL/Point_2_Segment_2_intersection.h  |      0
 .../include/CGAL/Point_2_Triangle_2_intersection.h |      0
 3rdparty/CGAL-4.8/include/CGAL/Point_3.h           |    301 +
 .../include/CGAL/Point_container.h                 |      0
 .../include/CGAL/Point_set_2.h                     |      0
 .../include/CGAL/Point_traits.h                    |      0
 .../include/CGAL/Point_with_normal_3.h             |      0
 .../include/CGAL/Point_with_psc_localisation.h     |      0
 .../include/CGAL/Point_with_surface_index.h        |      0
 .../CGAL/Point_with_surface_index_geom_traits.h    |      0
 .../include/CGAL/Poisson_implicit_surface_3.h      |      0
 .../include/CGAL/Poisson_mesh_cell_criteria_3.h    |      0
 .../include/CGAL/Poisson_reconstruction_function.h |   1212 +
 3rdparty/CGAL-4.8/include/CGAL/Polychain_2.h       |    859 +
 .../include/CGAL/Polygon_2.h                       |      0
 .../CGAL/Polygon_2/Polygon_2_algorithms_impl.h     |      0
 .../CGAL/Polygon_2/Polygon_2_edge_circulator.h     |      0
 .../CGAL/Polygon_2/Polygon_2_edge_iterator.h       |      0
 .../include/CGAL/Polygon_2/Polygon_2_impl.h        |    159 +
 .../include/CGAL/Polygon_2/Polygon_2_simplicity.h  |      0
 .../CGAL/Polygon_2/Polygon_2_vertex_circulator.h   |      0
 .../include/CGAL/Polygon_2/polygon_assertions.h    |      0
 .../CGAL-4.8/include/CGAL/Polygon_2_algorithms.h   |    466 +
 .../include/CGAL/Polygon_convex_decomposition_2.h  |     78 +
 .../include/CGAL/Polygon_mesh_processing/Weights.h |    766 +
 .../include/CGAL/Polygon_mesh_processing/bbox.h    |     88 +
 .../include/CGAL/Polygon_mesh_processing/border.h  |    199 +
 .../CGAL/Polygon_mesh_processing/compute_normal.h  |    371 +
 .../Polygon_mesh_processing/connected_components.h |   1116 +
 .../CGAL/Polygon_mesh_processing/distance.h        |    182 +
 .../include/CGAL/Polygon_mesh_processing/fair.h    |    165 +
 .../Hole_filling/Triangulate_hole_polygon_mesh.h   |    193 +
 .../Hole_filling/Triangulate_hole_polyline.h       |   1236 +
 .../internal/Hole_filling/do_not_use_DT3.h         |     26 +
 .../Hole_filling/experimental/experimental_code.h  |    236 +
 .../AABB_filtered_projection_traits.h              |    134 +
 .../internal/Isotropic_remeshing/remesh_impl.h     |   1613 +
 .../Axis_parallel_plane_traits.h                   |    160 +
 .../Polygon_mesh_slicer/Traversal_traits.h         |    115 +
 .../AABB_triangle_accessor_3_primitive.h           |      0
 .../Point_inside_vertical_ray_cast.h               |    107 +
 .../Ray_3_Triangle_3_traversal_traits.h            |    231 +
 .../Polygon_mesh_processing/internal/fair_impl.h   |    203 +
 .../internal/named_function_params.h               |    386 +
 .../internal/named_params_helper.h                 |    140 +
 .../Polygon_mesh_processing/internal/refine_impl.h |    335 +
 .../include/CGAL/Polygon_mesh_processing/measure.h |    418 +
 .../Polygon_mesh_processing/orient_polygon_soup.h  |    426 +
 .../CGAL/Polygon_mesh_processing/orientation.h     |    229 +
 .../polygon_soup_to_polygon_mesh.h                 |    162 +
 .../include/CGAL/Polygon_mesh_processing/refine.h  |    119 +
 .../include/CGAL/Polygon_mesh_processing/remesh.h  |    278 +
 .../include/CGAL/Polygon_mesh_processing/repair.h  |    845 +
 .../Polygon_mesh_processing/self_intersections.h   |    404 +
 .../CGAL/Polygon_mesh_processing/stitch_borders.h  |    385 +
 .../Polygon_mesh_processing/triangulate_faces.h    |    381 +
 .../Polygon_mesh_processing/triangulate_hole.h     |    406 +
 .../CGAL-4.8/include/CGAL/Polygon_mesh_slicer.h    |    545 +
 .../include/CGAL/Polygon_offset_builder_2.h        |      0
 .../include/CGAL/Polygon_offset_builder_traits_2.h |      0
 .../include/CGAL/Polygon_set_2.h                   |      0
 .../include/CGAL/Polygon_traits_2.h                |      0
 .../CGAL/Polygon_triangulation_decomposition_2.h   |    204 +
 .../CGAL/Polygon_vertical_decomposition_2.h        |    280 +
 .../include/CGAL/Polygon_with_holes_2.h            |      0
 .../include/CGAL/PolyhedralSurf_neighbors.h        |    321 +
 .../include/CGAL/Polyhedral_mesh_domain_3.h        |    804 +
 .../CGAL/Polyhedral_mesh_domain_with_features_3.h  |    245 +
 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_3.h      |   1546 +
 .../include/CGAL/Polyhedron_copy_3.h               |      0
 .../include/CGAL/Polyhedron_decorator_3.h          |      0
 .../CGAL/Polyhedron_incremental_builder_3.h        |    915 +
 .../include/CGAL/Polyhedron_items_3.h              |      0
 .../include/CGAL/Polyhedron_items_with_id_3.h      |      0
 .../include/CGAL/Polyhedron_min_items_3.h          |      0
 .../include/CGAL/Polyhedron_traits_3.h             |      0
 .../CGAL/Polyhedron_traits_with_normals_3.h        |      0
 .../include/CGAL/Polyline_constraint_hierarchy_2.h |   1174 +
 .../Hybrid_squared_distance_cost.h                 |    114 +
 .../Scaled_squared_distance_cost.h                 |    117 +
 .../Squared_distance_cost.h                        |      0
 .../Stop_above_cost_threshold.h                    |     68 +
 .../Stop_below_count_ratio_threshold.h             |      0
 .../Stop_below_count_threshold.h                   |      0
 .../CGAL/Polyline_simplification_2/Vertex_base_2.h |      0
 .../CGAL/Polyline_simplification_2/simplify.h      |    472 +
 .../include/CGAL/Polynomial.h                      |      0
 .../CGAL/Polynomial/Algebraic_structure_traits.h   |      0
 .../include/CGAL/Polynomial/CORE_Expr_root_stack.h |    268 +
 .../include/CGAL/Polynomial/CORE_kernel.h          |      0
 .../Cached_extended_euclidean_algorithm.h          |      0
 .../CGAL/Polynomial/Chinese_remainder_traits.h     |      0
 .../include/CGAL/Polynomial/Coercion_traits.h      |      0
 .../include/CGAL/Polynomial/Degree.h               |      0
 .../include/CGAL/Polynomial/Fixed_polynomial.h     |      0
 .../include/CGAL/Polynomial/Fraction_traits.h      |      0
 .../CGAL/Polynomial/Get_arithmetic_kernel.h        |      0
 .../include/CGAL/Polynomial/Interpolator.h         |      0
 .../include/CGAL/Polynomial/Interval_polynomial.h  |      0
 .../include/CGAL/Polynomial/Kernel.h               |      0
 .../include/CGAL/Polynomial/Modular_traits.h       |      0
 .../CGAL/Polynomial/Monomial_representation.h      |      0
 .../include/CGAL/Polynomial/Numeric_root_stack.h   |      0
 .../include/CGAL/Polynomial/Polynomial.h           |      0
 .../include/CGAL/Polynomial/Polynomial_type.h      |   1468 +
 .../CGAL/Polynomial/Real_embeddable_traits.h       |      0
 .../CGAL/Polynomial/Root_stack_default_traits.h    |      0
 .../include/CGAL/Polynomial/Scalar_factor_traits.h |      0
 .../include/CGAL/Polynomial/Sturm_root_stack.h     |      0
 .../CGAL/Polynomial/Sturm_root_stack_traits.h      |      0
 .../include/CGAL/Polynomial/basic.h                |      0
 .../include/CGAL/Polynomial/bezout_matrix.h        |      0
 .../include/CGAL/Polynomial/determinant.h          |      0
 .../include/CGAL/Polynomial/fwd.h                  |      0
 .../include/CGAL/Polynomial/hgdelta_update.h       |      0
 .../CGAL/Polynomial/internal/Alternation_counter.h |      0
 .../CGAL/Polynomial/internal/CORE_polynomial.h     |    278 +
 .../Polynomial/internal/Descartes_root_count.h     |      0
 .../Polynomial/internal/Double_with_infinity.h     |      0
 .../CGAL/Polynomial/internal/Filtered_function.h   |      0
 .../CGAL/Polynomial/internal/Filtered_kernel.h     |      0
 .../Filtered_kernel/Filtered_Descartes_has_root.h  |      0
 .../Filtered_Descartes_root_counter.h              |      0
 .../Filtered_kernel/Filtered_are_negations.h       |      0
 .../Filtered_polynomial_rational_kernel.h          |      0
 .../Filtered_root_bound_evaluator.h                |      0
 .../Filtered_kernel/Filtered_root_multiplicity.h   |      0
 .../internal/Filtered_kernel/Filtered_sign_at.h    |      0
 .../CGAL/Polynomial/internal/Filtered_number.h     |      0
 .../Construct_filtered_function.h                  |      0
 .../Filtered_Descartes_has_root.h                  |      0
 .../Filtered_Descartes_root_counter.h              |      0
 .../Filtered_rational/Filtered_Sturm_sequence.h    |      0
 .../Filtered_rational/Filtered_are_negations.h     |      0
 .../Filtered_rational_multiplicity.h               |      0
 .../Filtered_rational_sign_above_rational.h        |      0
 .../Filtered_rational/Filtered_rational_traits.h   |      0
 .../Filtered_root_bound_evaluator.h                |      0
 .../Filtered_sign_Sturm_sequence.h                 |      0
 .../Filtered_rational/Filtered_sign_at_rational.h  |      0
 .../Filtered_rational/Filtered_standard_sequence.h |      0
 .../Polynomial/internal/Fixed_polynomial_impl.h    |      0
 .../CGAL/Polynomial/internal/GSL_numeric_solver.h  |      0
 .../CGAL/Polynomial/internal/Isolating_interval.h  |      0
 .../internal/JAMA_numeric_solvers_impl.h           |    135 +
 .../internal/Kernel/Is_even_multiplicity.h         |      0
 .../CGAL/Polynomial/internal/Kernel/Is_rational.h  |      0
 .../internal/Kernel/Isolating_interval.h           |      0
 .../Polynomial/internal/Kernel/Lower_bound_root.h  |      0
 .../CGAL/Polynomial/internal/Kernel/Multiplicity.h |      0
 .../internal/Kernel/Rational_between_roots.h       |      0
 .../Polynomial/internal/Kernel/Root_container.h    |      0
 .../CGAL/Polynomial/internal/Kernel/Sign_above.h   |      0
 .../CGAL/Polynomial/internal/Kernel/Sign_at.h      |      0
 .../CGAL/Polynomial/internal/Kernel/Sign_below.h   |      0
 .../internal/Kernel/Sign_between_roots.h           |      0
 .../CGAL/Polynomial/internal/Kernel/To_rational.h  |      0
 .../internal/Kernel/predicate_template.h           |      0
 .../CGAL/Polynomial/internal/Polynomial_impl.h     |      0
 .../Polynomial/internal/Rational/Are_negations.h   |      0
 .../internal/Rational/Bezier_root_counter.h        |      0
 .../Rational/Compare_isolated_roots_in_interval.h  |      0
 .../internal/Rational/Construct_function.h         |      0
 .../CGAL/Polynomial/internal/Rational/Derivative.h |      0
 .../internal/Rational/Descartes_has_root.h         |      0
 .../internal/Rational/Descartes_root_counter.h     |      0
 .../internal/Rational/Euclidean_Sturm_sequence.h   |      0
 .../internal/Rational/Evaluate_polynomial.h        |      0
 .../Polynomial/internal/Rational/Invert_variable.h |      0
 .../Rational/Map_rational_interval_to_positive.h   |      0
 .../internal/Rational/Monic_Sturm_sequence.h       |      0
 .../Polynomial/internal/Rational/Negate_variable.h |      0
 .../Rational/Primitive_part_Sturm_sequence.h       |      0
 .../Polynomial/internal/Rational/Pseudo_quotient.h |      0
 .../internal/Rational/Pseudo_remainder.h           |      0
 .../CGAL/Polynomial/internal/Rational/Quotient.h   |      0
 .../internal/Rational/Quotient_remainder.h         |      0
 .../internal/Rational/Rational_multiplicity.h      |      0
 .../internal/Rational/Rational_traits_base.h       |      0
 .../internal/Rational/Rational_translate_zero.h    |      0
 .../internal/Rational/Reduced_Sturm_sequence.h     |      0
 .../CGAL/Polynomial/internal/Rational/Remainder.h  |      0
 .../internal/Rational/Root_bound_evaluator.h       |      0
 .../Polynomial/internal/Rational/Shift_power.h     |      0
 .../internal/Rational/Sign_Sturm_sequence.h        |      0
 .../internal/Rational/Sign_above_rational.h        |      0
 .../internal/Rational/Sign_at_rational.h           |      0
 .../internal/Rational/Sign_below_rational.h        |      0
 .../internal/Rational/Standard_sequence.h          |      0
 .../internal/Rational/Sturm_root_counter.h         |      0
 .../Polynomial/internal/Rational/Sturm_sequence.h  |      0
 .../internal/Rational/Sturm_sequence_base.h        |      0
 .../Rational/Subresultant_Sturm_sequence.h         |      0
 .../Polynomial/internal/Root_stack_traits_base.h   |      0
 .../Polynomial/internal/Sign_variations_counter.h  |      0
 .../Polynomial/internal/Simple_interval_root.h     |      0
 .../include/CGAL/Polynomial/internal/Statistics.h  |      0
 .../Polynomial/internal/Sturm_isolating_interval.h |      0
 .../CGAL/Polynomial/internal/Sturm_root_rep.h      |      0
 .../internal/Turkowski_numeric_solvers_impl.h      |    467 +
 .../include/CGAL/Polynomial/internal/config.h      |      0
 .../internal/filtered_function_leaf_nodes.h        |      0
 .../internal/filtered_function_node_bases.h        |      0
 .../internal/filtered_function_operation_nodes.h   |      0
 .../CGAL/Polynomial/internal/interval_arithmetic.h |      0
 .../include/CGAL/Polynomial/internal/macros.h      |      0
 .../CGAL/Polynomial/internal/nt_converters.h       |      0
 .../CGAL/Polynomial/internal/numeric_solvers.h     |    118 +
 .../Polynomial/internal/numeric_solvers_impl.h     |    135 +
 .../Polynomial/internal/numeric_solvers_support.h  |     65 +
 .../internal/numeric_solvers_support_impl.h        |    276 +
 .../Polynomial/internal/polynomial_generators.h    |      0
 .../include/CGAL/Polynomial/misc.h                 |      0
 .../include/CGAL/Polynomial/modular_filter.h       |      0
 .../include/CGAL/Polynomial/modular_gcd.h          |      0
 .../CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h |      0
 .../CGAL/Polynomial/modular_gcd_utcf_dfai.h        |      0
 .../include/CGAL/Polynomial/modular_gcd_utils.h    |      0
 .../CGAL/Polynomial/polynomial_converters.h        |      0
 .../include/CGAL/Polynomial/polynomial_gcd.h       |      0
 .../Polynomial/polynomial_gcd_implementations.h    |      0
 .../include/CGAL/Polynomial/polynomial_gcd_ntl.h   |      0
 .../include/CGAL/Polynomial/prs_resultant.h        |      0
 .../include/CGAL/Polynomial/resultant.h            |      0
 .../CGAL/Polynomial/square_free_factorize.h        |      0
 .../CGAL/Polynomial/sturm_habicht_sequence.h       |      0
 .../include/CGAL/Polynomial/subresultants.h        |      0
 .../include/CGAL/Polynomial_traits_d.h             |      0
 .../include/CGAL/Polynomial_type_generator.h       |      0
 .../include/CGAL/Polynomials_1_2.h                 |      0
 .../include/CGAL/Polynomials_1_3.h                 |      0
 .../include/CGAL/Polynomials_2_2.h                 |      0
 .../include/CGAL/Polynomials_2_3.h                 |      0
 .../include/CGAL/Polynomials_for_line_3.h          |      0
 .../CGAL-4.8/include/CGAL/Polytope_distance_d.h    |    933 +
 .../include/CGAL/Polytope_distance_d_traits_2.h    |      0
 .../include/CGAL/Polytope_distance_d_traits_3.h    |      0
 .../include/CGAL/Polytope_distance_d_traits_d.h    |      0
 .../include/CGAL/Prevent_deref.h                   |      0
 .../include/CGAL/Profile_counter.h                 |      0
 .../include/CGAL/Profile_timer.h                   |      0
 .../include/CGAL/Projection_traits_xy_3.h          |      0
 .../include/CGAL/Projection_traits_xz_3.h          |      0
 .../include/CGAL/Projection_traits_yz_3.h          |      0
 .../include/CGAL/QP_functions.h                    |      0
 .../include/CGAL/QP_models.h                       |      0
 .../include/CGAL/QP_options.h                      |      0
 .../include/CGAL/QP_solution.h                     |      0
 .../include/CGAL/QP_solver/Initialization.h        |      0
 .../include/CGAL/QP_solver/QP__filtered_base.h     |      0
 .../CGAL/QP_solver/QP__filtered_base_impl.h        |      0
 .../include/CGAL/QP_solver/QP__partial_base.h      |      0
 .../include/CGAL/QP_solver/QP_basis_inverse.h      |   1136 +
 .../include/CGAL/QP_solver/QP_basis_inverse_impl.h |    713 +
 .../CGAL/QP_solver/QP_exact_bland_pricing.h        |      0
 .../include/CGAL/QP_solver/QP_full_exact_pricing.h |      0
 .../CGAL/QP_solver/QP_full_filtered_pricing.h      |      0
 .../include/CGAL/QP_solver/QP_functions_impl.h     |      0
 .../CGAL/QP_solver/QP_partial_exact_pricing.h      |    252 +
 .../CGAL/QP_solver/QP_partial_filtered_pricing.h   |    432 +
 .../include/CGAL/QP_solver/QP_pricing_strategy.h   |      0
 .../include/CGAL/QP_solver/QP_solution_impl.h      |      0
 .../CGAL-4.8/include/CGAL/QP_solver/QP_solver.h    |   1999 +
 .../include/CGAL/QP_solver/QP_solver_bounds_impl.h |      0
 .../include/CGAL/QP_solver/QP_solver_impl.h        |   3390 +
 .../QP_solver/QP_solver_nonstandardform_impl.h     |      0
 .../include/CGAL/QP_solver/Unbounded_direction.h   |      0
 .../include/CGAL/QP_solver/assertions.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/QP_solver/basic.h   |     35 +
 .../include/CGAL/QP_solver/debug.h                 |      0
 .../include/CGAL/QP_solver/functors.h              |      0
 .../include/CGAL/Qt/AlphaShapeGraphicsItem.h       |      0
 .../include/CGAL/Qt/ApolloniusGraphGraphicsItem.h  |      0
 3rdparty/CGAL-4.8/include/CGAL/Qt/CGAL_Qt_config.h |     36 +
 .../include/CGAL/Qt/CircularArcGraphicsItem.h      |      0
 .../CGAL/Qt/ConstrainedTriangulationGraphicsItem.h |      0
 3rdparty/CGAL-4.8/include/CGAL/Qt/Converter.h      |    187 +
 .../CGAL-4.8/include/CGAL/Qt/CreateOpenGLContext.h |     39 +
 .../Qt/DelaunayMeshTriangulationGraphicsItem.h     |    301 +
 .../CGAL-4.8/include/CGAL/Qt/DemosMainWindow.h     |    135 +
 .../include/CGAL/Qt/DemosMainWindow_impl.h         |    474 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsItem.h   |     52 +
 .../include/CGAL/Qt/GraphicsViewCircleInput.h      |    211 +
 .../include/CGAL/Qt/GraphicsViewCircularArcInput.h |    214 +
 .../CGAL-4.8/include/CGAL/Qt/GraphicsViewInput.h   |     58 +
 .../CGAL/Qt/GraphicsViewIsoRectangleInput.h        |    158 +
 .../include/CGAL/Qt/GraphicsViewLineInput.h        |    182 +
 .../include/CGAL/Qt/GraphicsViewNavigation.h       |     77 +
 .../include/CGAL/Qt/GraphicsViewNavigation_impl.h  |    351 +
 .../include/CGAL/Qt/GraphicsViewPointInput.h       |      0
 .../CGAL/Qt/GraphicsViewPolygonWithHolesInput.h    |    197 +
 .../include/CGAL/Qt/GraphicsViewPolylineInput.h    |    117 +
 .../CGAL/Qt/GraphicsViewPolylineInput_impl.h       |    206 +
 .../include/CGAL/Qt/LineGraphicsItem.h             |      0
 .../include/CGAL/Qt/PainterOstream.h               |      0
 .../include/CGAL/Qt/PointsGraphicsItem.h           |      0
 .../include/CGAL/Qt/PointsInKdTreeGraphicsItem.h   |    194 +
 .../CGAL-4.8/include/CGAL/Qt/PolygonGraphicsItem.h |    191 +
 .../include/CGAL/Qt/PolygonWithHolesGraphicsItem.h |      0
 .../include/CGAL/Qt/PolylinesGraphicsItem.h        |      0
 .../include/CGAL/Qt/PowerdiagramGraphicsItem.h     |      0
 .../include/CGAL/Qt/RegularGridGraphicsItem.h      |      0
 .../CGAL/Qt/RegularGridVectorFieldGraphicsItem.h   |      0
 .../CGAL/Qt/RegularTriangulationGraphicsItem.h     |      0
 .../CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h     |    283 +
 .../CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h |    318 +
 .../include/CGAL/Qt/SegmentsGraphicsItem.h         |    163 +
 .../include/CGAL/Qt/StreamLinesGraphicsItem.h      |      0
 .../include/CGAL/Qt/TriangulationGraphicsItem.h    |    309 +
 .../include/CGAL/Qt/VoronoiGraphicsItem.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/Qt/debug.h          |     56 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/debug_impl.h     |     83 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/resources.h      |     37 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/resources_impl.h |     37 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/utility.h        |     47 +
 3rdparty/CGAL-4.8/include/CGAL/Qt/utility_impl.h   |     62 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Quotient.h |      0
 .../include/CGAL/Quotient_fwd.h                    |      0
 .../include/CGAL/RS/Gmpfr_make_unique.h            |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/RS/ak_1.h  |      0
 .../include/CGAL/RS/ak_z_1.h                       |      0
 .../include/CGAL/RS/algebraic_1.h                  |      0
 .../include/CGAL/RS/algebraic_z_1.h                |      0
 .../include/CGAL/RS/bisection_refiner_1.h          |      0
 .../include/CGAL/RS/comparator_1.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/RS/dyadic.h         |    438 +
 .../include/CGAL/RS/exact_signat_1.h               |      0
 .../include/CGAL/RS/functors_1.h                   |      0
 .../include/CGAL/RS/functors_z_1.h                 |      0
 .../include/CGAL/RS/polynomial_converter_1.h       |      0
 .../include/CGAL/RS/rs23_k_isolator_1.h            |      0
 .../include/CGAL/RS/rs2_calls.h                    |      0
 .../include/CGAL/RS/rs2_isolator_1.h               |      0
 .../include/CGAL/RS/rs3_k_refiner_1.h              |      0
 .../include/CGAL/RS/rs3_refiner_1.h                |      0
 .../include/CGAL/RS/signat_1.h                     |      0
 3rdparty/CGAL-4.8/include/CGAL/Random.h            |    254 +
 .../include/CGAL/Random_access_adaptor.h           |      0
 .../include/CGAL/Random_access_value_adaptor.h     |      0
 .../include/CGAL/Random_convex_hull_traits_2.h     |      0
 .../include/CGAL/Random_convex_set_traits_2.h      |      0
 3rdparty/CGAL-4.8/include/CGAL/Random_impl.h       |     94 +
 .../include/CGAL/Random_polygon_2_sweep.h          |      0
 .../include/CGAL/Random_polygon_traits_2.h         |      0
 .../include/CGAL/Range_segment_tree_traits.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/Range_tree_d.h      |    623 +
 .../include/CGAL/Range_tree_k.h                    |      0
 .../include/CGAL/Rational_traits.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/Ray_2.h             |    275 +
 .../include/CGAL/Ray_2_Bbox_2_intersection.h       |     82 +
 .../include/CGAL/Ray_2_Bbox_2_intersection_impl.h  |    208 +
 .../CGAL/Ray_2_Iso_rectangle_2_intersection.h      |      0
 .../include/CGAL/Ray_2_Line_2_intersection.h       |      0
 .../include/CGAL/Ray_2_Point_2_intersection.h      |      0
 .../include/CGAL/Ray_2_Ray_2_intersection.h        |      0
 .../include/CGAL/Ray_2_Segment_2_intersection.h    |      0
 .../include/CGAL/Ray_2_Triangle_2_intersection.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Ray_3.h             |    244 +
 .../include/CGAL/Real_embeddable_traits.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/Real_timer.h        |    133 +
 3rdparty/CGAL-4.8/include/CGAL/Real_timer_impl.h   |    112 +
 .../include/CGAL/Reconstruction_triangulation_3.h  |      0
 .../include/CGAL/Rectangular_p_center_traits_2.h   |      0
 .../include/CGAL/Referenced_argument.h             |      0
 .../include/CGAL/Regular_complex_d.h               |      0
 .../include/CGAL/Regular_grid_2.h                  |      0
 .../include/CGAL/Regular_triangulation_2.h         |      0
 .../include/CGAL/Regular_triangulation_3.h         |   2326 +
 .../Regular_triangulation_adaptation_policies_2.h  |      0
 .../Regular_triangulation_adaptation_traits_2.h    |      0
 .../CGAL/Regular_triangulation_cell_base_3.h       |      0
 ...lation_cell_base_with_weighted_circumcenter_3.h |      0
 .../Regular_triangulation_euclidean_traits_2.h     |      0
 .../Regular_triangulation_euclidean_traits_3.h     |      0
 .../CGAL/Regular_triangulation_face_base_2.h       |      0
 .../CGAL/Regular_triangulation_filtered_traits_2.h |      0
 .../CGAL/Regular_triangulation_vertex_base_2.h     |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Residue.h  |      0
 3rdparty/CGAL-4.8/include/CGAL/Ridges.h            |    916 +
 .../CGAL/Robust_circumcenter_filtered_traits_3.h   |      0
 .../include/CGAL/Robust_circumcenter_traits_3.h    |      0
 .../include/CGAL/Robust_construction.h             |      0
 .../CGAL-4.8/include/CGAL/Root_for_circles_2_2.h   |    137 +
 .../include/CGAL/Root_for_spheres_2_3.h            |      0
 .../include/CGAL/Root_of_traits.h                  |      0
 .../include/CGAL/Root_of_traits_specializations.h  |      0
 .../include/CGAL/Rotational_sweep_visibility_2.h   |    935 +
 .../include/CGAL/Runge_kutta_integrator_2.h        |      0
 .../include/CGAL/Scalar_factor_traits.h            |      0
 .../Scale_space_surface_reconstruction_3_impl.h    |   1221 +
 .../Shape_construction_3.h                         |      0
 .../internal/Auto_count.h                          |      0
 .../CGAL/Scale_space_surface_reconstruction_3.h    |    965 +
 .../include/CGAL/Search_traits.h                   |      0
 .../include/CGAL/Search_traits_2.h                 |      0
 .../include/CGAL/Search_traits_3.h                 |      0
 .../CGAL-4.8/include/CGAL/Search_traits_adapter.h  |    180 +
 .../include/CGAL/Search_traits_d.h                 |      0
 .../include/CGAL/Search_traits_vertex_handle_3.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Segment_2.h         |    310 +
 .../CGAL/Segment_2_Iso_rectangle_2_intersection.h  |      0
 .../include/CGAL/Segment_2_Line_2_intersection.h   |      0
 .../include/CGAL/Segment_2_Point_2_intersection.h  |      0
 .../include/CGAL/Segment_2_Ray_2_intersection.h    |      0
 .../CGAL/Segment_2_Segment_2_intersection.h        |      0
 .../CGAL/Segment_2_Triangle_2_intersection.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/Segment_3.h         |    226 +
 .../include/CGAL/Segment_Delaunay_graph_2.h        |   2043 +
 .../Segment_Delaunay_graph_2/Are_parallel_C2.h     |      0
 .../Segment_Delaunay_graph_2/Are_same_points_C2.h  |      0
 .../Are_same_segments_C2.h                         |      0
 .../Segment_Delaunay_graph_2/Arrangement_enum.h    |      0
 .../Segment_Delaunay_graph_2/Arrangement_type_C2.h |      0
 .../Arrangement_type_non_intersecting_C2.h         |      0
 .../Segment_Delaunay_graph_2/Basic_predicates_C2.h |      0
 .../Segment_Delaunay_graph_2/Cartesian_converter.h |      0
 .../CGAL/Segment_Delaunay_graph_2/Compare_x_2.h    |      0
 .../CGAL/Segment_Delaunay_graph_2/Compare_y_2.h    |      0
 .../Construct_storage_site_2.h                     |      0
 .../Construct_storage_site_with_info_2.h           |      0
 .../Segment_Delaunay_graph_2/Constructions_C2.h    |      0
 .../Filtered_traits_base_2.h                       |    473 +
 .../Filtered_traits_concept_check_tags.h           |      0
 .../Finite_edge_interior_conflict_C2.h             |      0
 .../Infinite_edge_interior_conflict_C2.h           |      0
 .../Is_degenerate_edge_C2.h                        |      0
 .../Segment_Delaunay_graph_2/Kernel_wrapper_2.h    |      0
 .../CGAL/Segment_Delaunay_graph_2/Orientation_C2.h |      0
 .../Segment_Delaunay_graph_2/Oriented_side_C2.h    |    117 +
 .../Oriented_side_of_bisector_C2.h                 |      0
 .../CGAL/Segment_Delaunay_graph_2/Predicates_C2.h  |      0
 .../Segment_Delaunay_graph_2_impl.h                |   3287 +
 .../Segment_Delaunay_graph_hierarchy_2_impl.h      |   1153 +
 .../Segment_Delaunay_graph_2/Sqrt_extension_2.h    |      0
 .../CGAL/Segment_Delaunay_graph_2/Traits_base_2.h  |    286 +
 .../Segment_Delaunay_graph_2/Traits_wrapper_2.h    |      0
 .../Triangulation_face_base_with_edges_2.h         |      0
 .../Segment_Delaunay_graph_2/Vertex_conflict_C2.h  |      0
 .../Segment_Delaunay_graph_2/Voronoi_vertex_C2.h   |      0
 .../Voronoi_vertex_ring_C2.h                       |      0
 .../Voronoi_vertex_sqrt_field_C2.h                 |      0
 .../Voronoi_vertex_sqrt_field_new_C2.h             |      0
 .../include/CGAL/Segment_Delaunay_graph_2/basic.h  |      0
 .../CGAL/Segment_Delaunay_graph_2/edge_list.h      |      0
 .../Segment_Delaunay_graph_2/in_place_edge_list.h  |      0
 .../include/CGAL/Segment_Delaunay_graph_Linf_2.h   |    414 +
 .../Basic_predicates_C2.h                          |   1950 +
 .../Segment_Delaunay_graph_Linf_2/Bisector_Linf.h  |    793 +
 .../Constructions_C2.h                             |   1274 +
 .../Filtered_traits_base_2.h                       |    522 +
 .../Finite_edge_interior_conflict_C2.h             |   1449 +
 .../Infinite_edge_interior_conflict_C2.h           |    727 +
 .../Orientation_Linf_C2.h                          |    192 +
 .../Oriented_side_C2.h                             |    498 +
 .../Oriented_side_of_bisector_C2.h                 |    357 +
 .../Segment_Delaunay_graph_Linf_2/Predicates_C2.h  |     42 +
 .../Segment_Delaunay_graph_Linf_2_impl.h           |    768 +
 .../Segment_Delaunay_graph_Linf_hierarchy_2_impl.h |   1219 +
 .../Segment_Delaunay_graph_Linf_2/Traits_base_2.h  |    173 +
 .../Vertex_conflict_C2.h                           |   1455 +
 .../Voronoi_vertex_C2.h                            |     76 +
 .../Voronoi_vertex_ring_C2.h                       |   3972 +
 .../Voronoi_vertex_sqrt_field_new_C2.h             |   4744 +
 .../CGAL/Segment_Delaunay_graph_Linf_2/basic.h     |     36 +
 ...Segment_Delaunay_graph_Linf_filtered_traits_2.h |    245 +
 .../CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h |     79 +
 .../CGAL/Segment_Delaunay_graph_Linf_traits_2.h    |    166 +
 .../Segment_Delaunay_graph_adaptation_policies_2.h |      0
 .../Segment_Delaunay_graph_adaptation_traits_2.h   |      0
 .../CGAL/Segment_Delaunay_graph_face_base_2.h      |      0
 .../Segment_Delaunay_graph_filtered_traits_2.h     |      0
 .../CGAL/Segment_Delaunay_graph_hierarchy_2.h      |    507 +
 ...egment_Delaunay_graph_hierarchy_vertex_base_2.h |      0
 .../CGAL/Segment_Delaunay_graph_simple_site_2.h    |      0
 .../Segment_Delaunay_graph_simple_storage_site_2.h |      0
 .../include/CGAL/Segment_Delaunay_graph_site_2.h   |      0
 .../CGAL/Segment_Delaunay_graph_storage_site_2.h   |      0
 ...gment_Delaunay_graph_storage_site_with_info_2.h |      0
 .../CGAL/Segment_Delaunay_graph_storage_traits_2.h |      0
 ...ent_Delaunay_graph_storage_traits_with_info_2.h |      0
 .../include/CGAL/Segment_Delaunay_graph_traits_2.h |      0
 .../CGAL/Segment_Delaunay_graph_vertex_base_2.h    |      0
 .../include/CGAL/Segment_tree_d.h                  |      0
 .../include/CGAL/Segment_tree_k.h                  |      0
 3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3.h |     40 +
 .../CGAL-4.8/include/CGAL/Shape_detection_3/Cone.h |    480 +
 .../include/CGAL/Shape_detection_3/Cylinder.h      |    399 +
 .../CGAL/Shape_detection_3/Efficient_RANSAC.h      |    912 +
 .../Shape_detection_3/Efficient_RANSAC_traits.h    |    185 +
 .../include/CGAL/Shape_detection_3/Octree.h        |    727 +
 .../include/CGAL/Shape_detection_3/Plane.h         |    211 +
 .../include/CGAL/Shape_detection_3/Shape_base.h    |    702 +
 .../include/CGAL/Shape_detection_3/Sphere.h        |    565 +
 .../include/CGAL/Shape_detection_3/Torus.h         |    407 +
 .../include/CGAL/Side_of_bounded_square_2.h        |    579 +
 .../include/CGAL/Side_of_oriented_square_2.h       |    180 +
 .../CGAL-4.8/include/CGAL/Side_of_triangle_mesh.h  |    174 +
 .../include/CGAL/Simple_cartesian.h                |      0
 .../include/CGAL/Simple_circular_kernel_2.h        |      0
 .../include/CGAL/Simple_homogeneous.h              |      0
 .../include/CGAL/Simple_polygon_visibility_2.h     |    685 +
 .../include/CGAL/Simple_spherical_kernel_3.h       |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Sixtuple.h |      0
 .../include/CGAL/Skin_surface_3.h                  |      0
 .../include/CGAL/Skin_surface_base_3.h             |      0
 .../include/CGAL/Skin_surface_filtered_traits_3.h  |     71 +
 .../Skin_surface_marching_tetrahedra_observer_3.h  |      0
 .../include/CGAL/Skin_surface_polyhedral_items_3.h |      0
 ...urface_polyhedral_items_with_face_information.h |      0
 .../CGAL/Skin_surface_quadratic_surface_3.h        |      0
 .../CGAL/Skin_surface_refinement_policy_3.h        |      0
 .../include/CGAL/Skin_surface_traits_3.h           |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Skiplist.h |      0
 .../Small_side_angle_bisector_decomposition_2.h    |    869 +
 .../include/CGAL/Snap_rounding_2.h                 |      0
 .../include/CGAL/Snap_rounding_kd_2.h              |      0
 .../CGAL-4.8/include/CGAL/Snap_rounding_traits_2.h |    223 +
 .../CGAL/Sorted_matrix_search_traits_adaptor.h     |      0
 .../include/CGAL/Spatial_lock_grid_3.h             |      0
 .../include/CGAL/Spatial_sort_traits_adapter_2.h   |      0
 .../include/CGAL/Spatial_sort_traits_adapter_3.h   |      0
 .../include/CGAL/Spatial_sort_traits_adapter_d.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Sphere_3.h          |    349 +
 .../include/CGAL/Spherical_kernel_3.h              |      0
 .../include/CGAL/Spherical_kernel_intersections.h  |      0
 .../CGAL/Spherical_kernel_type_equality_wrapper.h  |      0
 .../include/CGAL/Splitters.h                       |      0
 .../include/CGAL/Sqrt_extension.h                  |      0
 .../Sqrt_extension/Algebraic_extension_traits.h    |      0
 .../Sqrt_extension/Algebraic_structure_traits.h    |      0
 .../CGAL/Sqrt_extension/Chinese_remainder_traits.h |      0
 .../include/CGAL/Sqrt_extension/Coercion_traits.h  |      0
 .../include/CGAL/Sqrt_extension/Eigen_NumTraits.h  |      0
 .../include/CGAL/Sqrt_extension/Fraction_traits.h  |      0
 .../CGAL/Sqrt_extension/Get_arithmetic_kernel.h    |      0
 .../include/CGAL/Sqrt_extension/Modular_traits.h   |      0
 .../CGAL/Sqrt_extension/Real_embeddable_traits.h   |      0
 .../CGAL/Sqrt_extension/Scalar_factor_traits.h     |      0
 .../CGAL/Sqrt_extension/Sqrt_extension_type.h      |      0
 .../include/CGAL/Sqrt_extension/Wang_traits.h      |      0
 .../include/CGAL/Sqrt_extension/convert_to_bfi.h   |    107 +
 .../include/CGAL/Sqrt_extension/io.h               |      0
 .../include/CGAL/Sqrt_extension_fwd.h              |      0
 .../include/CGAL/Square_border_parameterizer_3.h   |      0
 .../include/CGAL/Straight_2.h                      |      0
 .../include/CGAL/Straight_skeleton_2.h             |      0
 .../Polygon_offset_builder_2_impl.h                |      0
 .../Straight_skeleton_2/Straight_skeleton_aux.h    |      0
 .../Straight_skeleton_builder_2_impl.h             |   1825 +
 .../Straight_skeleton_builder_events_2.h           |      0
 .../Straight_skeleton_builder_traits_2_aux.h       |      0
 .../include/CGAL/Straight_skeleton_2/assertions.h  |      0
 .../include/CGAL/Straight_skeleton_2/debug.h       |      0
 .../include/CGAL/Straight_skeleton_2/test.h        |      0
 .../include/CGAL/Straight_skeleton_builder_2.h     |      0
 .../CGAL/Straight_skeleton_builder_traits_2.h      |      0
 .../include/CGAL/Straight_skeleton_converter_2.h   |      0
 .../include/CGAL/Straight_skeleton_face_base_2.h   |      0
 .../CGAL/Straight_skeleton_halfedge_base_2.h       |      0
 .../include/CGAL/Straight_skeleton_items_2.h       |      0
 .../include/CGAL/Straight_skeleton_vertex_base_2.h |      0
 .../include/CGAL/Stream_lines_2.h                  |      0
 .../include/CGAL/Subdivision_mask_3.h              |      0
 .../include/CGAL/Subdivision_method_3.h            |      0
 .../include/CGAL/Subdivision_method_impl_3.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh.h      |     35 +
 .../include/CGAL/Surface_mesh/IO.h                 |      0
 .../include/CGAL/Surface_mesh/Properties.h         |      0
 .../include/CGAL/Surface_mesh/Surface_mesh.h       |   3037 +
 .../include/CGAL/Surface_mesh/Surface_mesh_fwd.h   |     37 +
 .../include/CGAL/Surface_mesh_cell_base_3.h        |      0
 .../Surface_mesh_complex_2_in_triangulation_3.h    |      0
 .../include/CGAL/Surface_mesh_default_criteria_3.h |      0
 .../CGAL/Surface_mesh_default_edges_criteria_3.h   |      0
 .../CGAL/Surface_mesh_default_triangulation_3.h    |      0
 .../include/CGAL/Surface_mesh_deformation.h        |   1537 +
 .../include/CGAL/Surface_mesh_shortest_path.h      |     33 +
 .../Surface_mesh_shortest_path.h                   |   2786 +
 .../Surface_mesh_shortest_path_traits.h            |    205 +
 .../CGAL/Surface_mesh_shortest_path/barycentric.h  |    248 +
 .../Surface_mesh_shortest_path/function_objects.h  |    601 +
 .../internal/Cone_expansion_event.h                |     86 +
 .../internal/Cone_tree.h                           |    439 +
 .../internal/misc_functions.h                      |     97 +
 .../Surface_mesh_simplification/Detail/Common.h    |      0
 .../Detail/Edge_collapse.h                         |      0
 .../Detail/Edge_collapse_impl.h                    |      0
 .../Edge_collapse_visitor_base.h                   |      0
 .../HalfedgeGraph_Polyhedron_3.h                   |      0
 .../Policies/Edge_collapse/Constrained_placement.h |      0
 .../Edge_collapse/Count_ratio_stop_predicate.h     |      0
 .../Policies/Edge_collapse/Count_stop_predicate.h  |      0
 .../Edge_collapse/Detail/Lindstrom_Turk_core.h     |      0
 .../Detail/Lindstrom_Turk_core_impl.h              |      0
 .../Policies/Edge_collapse/Edge_length_cost.h      |      0
 .../Policies/Edge_collapse/Edge_profile.h          |      0
 .../Policies/Edge_collapse/Edge_profile_impl.h     |      0
 .../Policies/Edge_collapse/LindstromTurk.h         |      0
 .../Policies/Edge_collapse/LindstromTurk_cost.h    |      0
 .../Policies/Edge_collapse/LindstromTurk_params.h  |      0
 .../Edge_collapse/LindstromTurk_placement.h        |      0
 .../Policies/Edge_collapse/Midpoint_and_length.h   |      0
 .../Policies/Edge_collapse/Midpoint_placement.h    |      0
 .../Surface_mesh_simplification/edge_collapse.h    |    169 +
 .../include/CGAL/Surface_mesh_traits_generator_3.h |      0
 .../CGAL/Surface_mesh_triangulation_generator_3.h  |      0
 .../include/CGAL/Surface_mesh_vertex_base_3.h      |      0
 .../include/CGAL/Surface_mesher/Combining_oracle.h |      0
 .../include/CGAL/Surface_mesher/Has_edges.h        |      0
 .../Surface_mesher/Implicit_surface_oracle_3.h     |      0
 .../Surface_mesher/Intersection_data_structure_3.h |      0
 .../CGAL/Surface_mesher/Null_oracle_visitor.h      |      0
 .../Point_surface_indices_oracle_visitor.h         |      0
 .../Poisson_implicit_surface_oracle_3.h            |      0
 .../CGAL/Surface_mesher/Polyhedral_oracle.h        |    406 +
 .../include/CGAL/Surface_mesher/Profile_counter.h  |      0
 .../include/CGAL/Surface_mesher/Profile_timer.h    |      0
 .../include/CGAL/Surface_mesher/Sphere_oracle_3.h  |      0
 .../CGAL/Surface_mesher/Standard_criteria.h        |      0
 .../include/CGAL/Surface_mesher/Surface_mesher.h   |      0
 .../Surface_mesher/Surface_mesher_edges_level.h    |      0
 .../Surface_mesher_edges_level_visitor.h           |      0
 .../CGAL/Surface_mesher/Surface_mesher_manifold.h  |    241 +
 .../Surface_mesher/Surface_mesher_regular_edges.h  |      0
 .../CGAL/Surface_mesher/Surface_mesher_visitor.h   |      0
 .../include/CGAL/Surface_mesher/Types_generators.h |      0
 .../include/CGAL/Surface_mesher/Verbose_flag.h     |      0
 .../Vertices_on_the_same_psc_element_criterion.h   |      0
 .../Vertices_on_the_same_surface_criterion.h       |      0
 .../include/CGAL/Surface_mesher_generator.h        |      0
 .../include/CGAL/Sweep_line_2.h                    |      0
 .../Sweep_line_2/Arr_basic_insertion_sl_visitor.h  |      0
 .../Sweep_line_2/Arr_basic_insertion_traits_2.h    |      0
 .../CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h  |      0
 .../CGAL/Sweep_line_2/Arr_construction_event.h     |      0
 .../Sweep_line_2/Arr_construction_sl_visitor.h     |      0
 .../CGAL/Sweep_line_2/Arr_construction_subcurve.h  |      0
 .../Sweep_line_2/Arr_default_overlay_traits_base.h |      0
 .../CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h   |      0
 .../CGAL/Sweep_line_2/Arr_insertion_traits_2.h     |      0
 .../CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h     |      0
 .../CGAL/Sweep_line_2/Arr_overlay_subcurve.h       |      0
 .../CGAL/Sweep_line_2/Arr_overlay_traits_2.h       |      0
 .../CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h |      0
 .../CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h    |      0
 .../include/CGAL/Sweep_line_2/Sweep_line_2_debug.h |      0
 .../include/CGAL/Sweep_line_2/Sweep_line_2_impl.h  |      0
 .../include/CGAL/Sweep_line_2/Sweep_line_2_utils.h |      0
 .../CGAL/Sweep_line_2/Sweep_line_2_visitors.h      |      0
 .../CGAL/Sweep_line_2/Sweep_line_curve_pair.h      |      0
 .../include/CGAL/Sweep_line_2/Sweep_line_event.h   |      0
 .../CGAL/Sweep_line_2/Sweep_line_functors.h        |      0
 .../CGAL/Sweep_line_2/Sweep_line_subcurve.h        |      0
 .../include/CGAL/Sweep_line_2_algorithms.h         |    222 +
 .../include/CGAL/Sweep_line_empty_visitor.h        |      0
 .../CGAL/TDS_full_cell_default_storage_policy.h    |      0
 .../CGAL/TDS_full_cell_mirror_storage_policy.h     |      0
 .../include/CGAL/Taucs_fix.h                       |      0
 .../include/CGAL/Taucs_matrix.h                    |      0
 .../include/CGAL/Taucs_solver_traits.h             |      0
 .../include/CGAL/Taucs_vector.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/Tetrahedron_3.h     |    185 +
 .../Three/Polyhedron_demo_io_plugin_interface.h    |     63 +
 .../CGAL/Three/Polyhedron_demo_plugin_helper.h     |     96 +
 .../CGAL/Three/Polyhedron_demo_plugin_interface.h  |     70 +
 .../include/CGAL/Three/Scene_draw_interface.h      |     45 +
 .../CGAL-4.8/include/CGAL/Three/Scene_group_item.h |    141 +
 .../CGAL-4.8/include/CGAL/Three/Scene_interface.h  |    191 +
 3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item.h  |    459 +
 .../include/CGAL/Three/Scene_item_config.h         |     36 +
 .../CGAL-4.8/include/CGAL/Three/Viewer_config.h    |     36 +
 .../CGAL-4.8/include/CGAL/Three/Viewer_interface.h |    162 +
 .../include/CGAL/Threetuple.h                      |      0
 .../include/CGAL/Time_stamper.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/Timer.h             |    131 +
 3rdparty/CGAL-4.8/include/CGAL/Timer_impl.h        |    139 +
 .../include/CGAL/Tools/Counter.h                   |      0
 .../include/CGAL/Tools/Label.h                     |      0
 3rdparty/CGAL-4.8/include/CGAL/Tools/Log.h         |    188 +
 3rdparty/CGAL-4.8/include/CGAL/Tools/Log_impl.h    |     32 +
 .../include/CGAL/Tools/chained_map.h               |      0
 .../include/CGAL/Tools/utility_macros.h            |      0
 .../include/CGAL/Traits_with_offsets_adaptor.h     |     92 +
 .../include/CGAL/Transform_iterator.h              |      0
 .../include/CGAL/Tree_assertions.h                 |      0
 .../include/CGAL/Tree_base.h                       |      0
 .../include/CGAL/Tree_traits.h                     |      0
 3rdparty/CGAL-4.8/include/CGAL/Triangle_2.h        |    211 +
 .../CGAL/Triangle_2_Iso_rectangle_2_intersection.h |    339 +
 .../include/CGAL/Triangle_2_Line_2_intersection.h  |      0
 .../include/CGAL/Triangle_2_Point_2_intersection.h |      0
 .../include/CGAL/Triangle_2_Ray_2_intersection.h   |      0
 .../CGAL/Triangle_2_Segment_2_intersection.h       |      0
 .../CGAL/Triangle_2_Triangle_2_do_intersect.h      |      0
 .../CGAL/Triangle_2_Triangle_2_intersection.h      |      0
 3rdparty/CGAL-4.8/include/CGAL/Triangle_3.h        |    154 +
 .../include/CGAL/Triangle_3_Line_3_do_intersect.h  |      0
 .../include/CGAL/Triangle_3_Plane_3_do_intersect.h |      0
 .../include/CGAL/Triangle_3_Point_3_do_intersect.h |      0
 .../include/CGAL/Triangle_3_Ray_3_do_intersect.h   |      0
 .../CGAL/Triangle_3_Segment_3_do_intersect.h       |      0
 .../CGAL/Triangle_3_Tetrahedron_3_do_intersect.h   |      0
 .../CGAL/Triangle_3_Triangle_3_do_intersect.h      |      0
 .../CGAL/Triangle_3_Triangle_3_intersection.h      |      0
 .../include/CGAL/Triangle_accessor_3.h             |      0
 .../CGAL/Triangular_expansion_visibility_2.h       |    713 +
 .../include/CGAL/Triangular_field_2.h              |      0
 .../CGAL/Triangulated_mixed_complex_observer_3.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/Triangulation.h     |   1331 +
 3rdparty/CGAL-4.8/include/CGAL/Triangulation_2.h   |   3647 +
 .../CGAL/Triangulation_2/insert_constraints.h      |      0
 .../Triangulation_2_filtered_projection_traits_3.h |     85 +
 .../CGAL/Triangulation_2_projection_traits_3.h     |    487 +
 .../include/CGAL/Triangulation_2_traits_3.h        |      0
 3rdparty/CGAL-4.8/include/CGAL/Triangulation_3.h   |   6687 +
 .../include/CGAL/Triangulation_cell_base_3.h       |      0
 .../Triangulation_cell_base_with_circumcenter_3.h  |      0
 .../CGAL/Triangulation_cell_base_with_info_3.h     |      0
 .../include/CGAL/Triangulation_conformer_2.h       |      0
 .../include/CGAL/Triangulation_data_structure.h    |      0
 .../include/CGAL/Triangulation_data_structure_2.h  |   2328 +
 .../include/CGAL/Triangulation_data_structure_3.h  |   3971 +
 .../Triangulation_data_structure_using_list_2.h    |      0
 .../CGAL/Triangulation_default_data_structure_2.h  |      0
 .../include/CGAL/Triangulation_ds_cell_base_3.h    |    272 +
 .../include/CGAL/Triangulation_ds_circulators_2.h  |      0
 .../include/CGAL/Triangulation_ds_face_2.h         |      0
 .../include/CGAL/Triangulation_ds_face_base_2.h    |      0
 .../include/CGAL/Triangulation_ds_full_cell.h      |      0
 .../include/CGAL/Triangulation_ds_iterators_2.h    |      0
 .../include/CGAL/Triangulation_ds_vertex.h         |      0
 .../include/CGAL/Triangulation_ds_vertex_2.h       |      0
 .../include/CGAL/Triangulation_ds_vertex_base_2.h  |      0
 .../include/CGAL/Triangulation_ds_vertex_base_3.h  |      0
 .../CGAL/Triangulation_euclidean_traits_2.h        |      0
 .../CGAL/Triangulation_euclidean_traits_xy_3.h     |      0
 .../CGAL/Triangulation_euclidean_traits_xz_3.h     |      0
 .../CGAL/Triangulation_euclidean_traits_yz_3.h     |      0
 .../include/CGAL/Triangulation_face.h              |      0
 .../include/CGAL/Triangulation_face_base_2.h       |      0
 .../CGAL/Triangulation_face_base_with_info_2.h     |      0
 .../include/CGAL/Triangulation_full_cell.h         |    164 +
 .../include/CGAL/Triangulation_geom_traits_3.h     |      0
 .../include/CGAL/Triangulation_hierarchy_2.h       |      0
 .../include/CGAL/Triangulation_hierarchy_3.h       |      0
 .../CGAL/Triangulation_hierarchy_vertex_base_2.h   |      0
 .../CGAL/Triangulation_hierarchy_vertex_base_3.h   |      0
 .../CGAL/Triangulation_incremental_builder_3.h     |      0
 .../CGAL/Triangulation_iterator_adaptator.h        |      0
 .../CGAL/Triangulation_line_face_circulator_2.h    |      0
 .../include/CGAL/Triangulation_simplex_3.h         |      0
 .../Triangulation_structural_filtering_traits.h    |     35 +
 .../include/CGAL/Triangulation_utils_2.h           |      0
 .../include/CGAL/Triangulation_utils_3.h           |      0
 .../CGAL-4.8/include/CGAL/Triangulation_vertex.h   |    129 +
 .../include/CGAL/Triangulation_vertex_base_2.h     |      0
 .../include/CGAL/Triangulation_vertex_base_3.h     |      0
 .../CGAL/Triangulation_vertex_base_with_id_2.h     |      0
 .../CGAL/Triangulation_vertex_base_with_info_2.h   |      0
 .../CGAL/Triangulation_vertex_base_with_info_3.h   |      0
 .../include/CGAL/Trivial_iterator.h                |      0
 .../include/CGAL/Two_vertices_parameterizer_3.h    |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Twotuple.h |      0
 3rdparty/CGAL-4.8/include/CGAL/Umbilics.h          |    309 +
 .../include/CGAL/Uncertain.h                       |      0
 .../include/CGAL/Unfiltered_predicate_adaptor.h    |      0
 3rdparty/CGAL-4.8/include/CGAL/Union_find.h        |    260 +
 .../include/CGAL/Union_of_balls_3.h                |      0
 .../include/CGAL/Unique_hash_map.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/Vector_2.h          |    352 +
 3rdparty/CGAL-4.8/include/CGAL/Vector_3.h          |    334 +
 .../CGAL/Vertex2Data_Property_Map_with_std_map.h   |     43 +
 .../include/CGAL/Visibility_2/visibility_utils.h   |    435 +
 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2.h |    831 +
 .../include/CGAL/Voronoi_diagram_2/Accessor.h      |      0
 .../Voronoi_diagram_2/Adaptation_traits_base_2.h   |      0
 .../Voronoi_diagram_2/Adaptation_traits_functors.h |      0
 .../Apollonius_graph_degeneracy_testers.h          |      0
 .../Apollonius_graph_nearest_site_2.h              |      0
 .../Voronoi_diagram_2/Cached_degeneracy_testers.h  |      0
 .../CGAL/Voronoi_diagram_2/Circulator_adaptors.h   |      0
 .../CGAL/Voronoi_diagram_2/Connected_components.h  |      0
 .../CGAL/Voronoi_diagram_2/Construct_dual_points.h |      0
 .../Voronoi_diagram_2/Default_site_inserters.h     |      0
 .../CGAL/Voronoi_diagram_2/Default_site_removers.h |      0
 .../Voronoi_diagram_2/Degeneracy_tester_binders.h  |      0
 .../Delaunay_triangulation_degeneracy_testers.h    |      0
 .../Delaunay_triangulation_nearest_site_2.h        |      0
 .../CGAL/Voronoi_diagram_2/Dummy_iterator.h        |      0
 .../include/CGAL/Voronoi_diagram_2/Edge_less.h     |      0
 .../include/CGAL/Voronoi_diagram_2/Face.h          |      0
 .../CGAL/Voronoi_diagram_2/Finder_classes.h        |      0
 .../include/CGAL/Voronoi_diagram_2/Halfedge.h      |      0
 .../CGAL/Voronoi_diagram_2/Handle_adaptor.h        |      0
 .../CGAL/Voronoi_diagram_2/Identity_rejectors.h    |      0
 .../CGAL/Voronoi_diagram_2/Iterator_adaptors.h     |      0
 .../include/CGAL/Voronoi_diagram_2/Policy_base.h   |      0
 .../Regular_triangulation_degeneracy_testers.h     |      0
 .../Regular_triangulation_nearest_site_2.h         |      0
 .../Segment_Delaunay_graph_degeneracy_testers.h    |      0
 .../Segment_Delaunay_graph_nearest_site_2.h        |      0
 .../CGAL/Voronoi_diagram_2/Site_accessors.h        |      0
 .../CGAL/Voronoi_diagram_2/Unbounded_edges.h       |      0
 .../CGAL/Voronoi_diagram_2/Unbounded_faces.h       |      0
 .../CGAL/Voronoi_diagram_2/Validity_testers.h      |      0
 .../include/CGAL/Voronoi_diagram_2/Vertex.h        |      0
 .../include/CGAL/Voronoi_diagram_2/basic.h         |      0
 .../include/CGAL/Voronoi_intersection_2_traits_3.h |      0
 .../include/CGAL/Weighted_Minkowski_distance.h     |      0
 .../CGAL/Weighted_alpha_shape_euclidean_traits_2.h |      0
 .../CGAL/Weighted_alpha_shape_euclidean_traits_3.h |      0
 3rdparty/CGAL-4.8/include/CGAL/Weighted_point.h    |    144 +
 .../CGAL/Weighted_point_with_psc_localisation.h    |      0
 .../CGAL/Weighted_point_with_surface_index.h       |      0
 ...Weighted_point_with_surface_index_geom_traits.h |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/Width_3.h  |      0
 .../include/CGAL/Width_default_traits_3.h          |      0
 .../include/CGAL/Width_polyhedron_3.h              |      0
 .../include/CGAL/Win32_exception.h                 |      0
 .../include/CGAL/aff_transformation_tags.h         |     54 +
 .../include/CGAL/aff_transformation_tags_impl.h    |     33 +
 .../include/CGAL/algorithm.h                       |      0
 .../include/CGAL/all_furthest_neighbors_2.h        |      0
 .../include/CGAL/apply_to_range.h                  |      0
 .../CGAL-4.8/include/CGAL/approximated_offset_2.h  |    166 +
 .../include/CGAL/argument_swaps.h                  |      0
 .../include/CGAL/arrange_offset_polygons_2.h       |    117 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/array.h    |      0
 3rdparty/CGAL-4.8/include/CGAL/assertions.h        |    353 +
 .../include/CGAL/assertions_behaviour.h            |      0
 3rdparty/CGAL-4.8/include/CGAL/assertions_impl.h   |    281 +
 3rdparty/CGAL-4.8/include/CGAL/atomic.h            |     56 +
 .../include/CGAL/auto_link/CGAL.h                  |      0
 .../include/CGAL/auto_link/CORE.h                  |      0
 .../include/CGAL/auto_link/ImageIO.h               |      0
 .../include/CGAL/auto_link/LAPACK.h                |      0
 3rdparty/CGAL-4.8/include/CGAL/auto_link/Qt.h      |     40 +
 .../include/CGAL/auto_link/TAUCS.h                 |      0
 .../CGAL-4.8/include/CGAL/auto_link/auto_link.h    |    449 +
 .../include/CGAL/barycenter.h                      |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/basic.h    |      0
 .../include/CGAL/basic_classes.h                   |      0
 .../include/CGAL/basic_constructions_2.h           |      0
 .../include/CGAL/basic_constructions_3.h           |      0
 .../include/CGAL/bbox_intersection_3.h             |      0
 .../include/CGAL/bilateral_smooth_point_set.h      |    652 +
 3rdparty/CGAL-4.8/include/CGAL/boost/graph/Dual.h  |    329 +
 .../include/CGAL/boost/graph/Euler_operations.h    |   1480 +
 .../include/CGAL/boost/graph/Graph_geometry.h      |    235 +
 .../boost/graph/backward_compatibility_functions.h |      0
 .../CGAL/boost/graph/convert_surface_mesh.h        |     86 +
 .../CGAL/boost/graph/dijkstra_shortest_paths.h     |     43 +
 .../CGAL/boost/graph/dijkstra_shortest_paths.hpp   |    630 +
 .../include/CGAL/boost/graph/graph_concepts.h      |    203 +
 .../CGAL/boost/graph/graph_traits_Arrangement_2.h  |      0
 .../boost/graph/graph_traits_CombinatorialMap.h    |    334 +
 .../graph/graph_traits_Delaunay_triangulation_2.h  |    395 +
 .../boost/graph/graph_traits_Dual_Arrangement_2.h  |      0
 .../CGAL/boost/graph/graph_traits_HalfedgeDS.h     |    252 +
 .../graph/graph_traits_PolyMesh_ArrayKernelT.h     |    697 +
 .../CGAL/boost/graph/graph_traits_Polyhedron_3.h   |    489 +
 .../CGAL/boost/graph/graph_traits_Surface_mesh.h   |    529 +
 .../graph/graph_traits_TriMesh_ArrayKernelT.h      |    614 +
 .../boost/graph/graph_traits_Triangulation_2.h     |    873 +
 .../CGAL/boost/graph/halfedge_graph_traits.h       |      0
 .../boost/graph/halfedge_graph_traits_HalfedgeDS.h |      0
 .../graph/halfedge_graph_traits_Polyhedron_3.h     |      0
 .../CGAL-4.8/include/CGAL/boost/graph/helpers.h    |    722 +
 .../CGAL/boost/graph/internal/Has_member_clear.h   |     45 +
 .../graph/internal/OM_iterator_from_circulator.h   |      0
 .../include/CGAL/boost/graph/internal/helpers.h    |    214 +
 .../CGAL-4.8/include/CGAL/boost/graph/iterator.h   |   1369 +
 .../CGAL/boost/graph/named_function_params.h       |    389 +
 .../include/CGAL/boost/graph/properties.h          |      0
 .../CGAL/boost/graph/properties_CombinatorialMap.h |      0
 .../boost/graph/properties_PolyMesh_ArrayKernelT.h |    367 +
 .../CGAL/boost/graph/properties_Polyhedron_3.h     |      0
 .../CGAL/boost/graph/properties_Surface_mesh.h     |    279 +
 .../boost/graph/properties_TriMesh_ArrayKernelT.h  |    195 +
 .../CGAL-4.8/include/CGAL/boost/graph/selection.h  |    528 +
 .../CGAL/boost/graph/split_graph_into_polylines.h  |    271 +
 .../CGAL-4.8/include/CGAL/boost/graph/visitor.h    |    694 +
 .../CGAL/boost/iterator/counting_iterator.hpp      |      0
 .../CGAL/boost/iterator/transform_iterator.hpp     |      0
 .../include/CGAL/bounding_box.h                    |      0
 .../include/CGAL/box_intersection_d.h              |      0
 .../CGAL/cartesian_homogeneous_conversion.h        |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/centroid.h |      0
 .../include/CGAL/certified_numeric_predicates.h    |      0
 .../include/CGAL/certified_quotient_predicates.h   |      0
 .../include/CGAL/ch_akl_toussaint.h                |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/ch_bykat.h |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/ch_eddy.h  |      0
 .../include/CGAL/ch_function_objects_2.h           |      0
 .../include/CGAL/ch_graham_andrew.h                |      0
 .../include/CGAL/ch_jarvis.h                       |      0
 .../include/CGAL/ch_melkman.h                      |      0
 .../include/CGAL/ch_selected_extreme_points_2.h    |      0
 .../include/CGAL/circulator.h                      |      0
 .../include/CGAL/circulator_bases.h                |      0
 .../include/CGAL/compare_vertices.h                |      0
 .../include/CGAL/compute_average_spacing.h         |    274 +
 .../include/CGAL/compute_outer_frame_margin.h      |      0
 3rdparty/CGAL-4.8/include/CGAL/config.h            |    519 +
 .../include/CGAL/connect_holes.h                   |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/constant.h |      0
 .../CGAL/constructions/Polygon_offset_cons_ftC2.h  |      0
 .../constructions/Straight_skeleton_cons_ftC2.h    |      0
 ...ctions_for_voronoi_intersection_cartesian_2_3.h |      0
 .../constructions_on_weighted_points_cartesian_3.h |    541 +
 .../include/CGAL/constructions/kernel_ftC2.h       |      0
 .../include/CGAL/constructions/kernel_ftC3.h       |      0
 ...squared_radius_smallest_orthogonalcircle_ftC2.h |      0
 .../include/CGAL/constructions_d.h                 |      0
 .../constructions_on_weighted_points_cartesian_2.h |      0
 ...onstructions_on_weighted_points_homogeneous_2.h |      0
 .../include/CGAL/convert_to_bfi.h                  |      0
 .../include/CGAL/convex_decomposition_3.h          |      0
 .../include/CGAL/convex_hull_2.h                   |      0
 3rdparty/CGAL-4.8/include/CGAL/convex_hull_3.h     |    955 +
 .../include/CGAL/convex_hull_3_to_polyhedron_3.h   |      0
 .../CGAL/convex_hull_constructive_traits_2.h       |      0
 .../include/CGAL/convex_hull_incremental_3.h       |      0
 .../include/CGAL/convex_hull_traits_2.h            |      0
 .../include/CGAL/convexity_check_2.h               |      0
 .../include/CGAL/convexity_check_3.h               |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/copy_n.h   |      0
 .../include/CGAL/corefinement_operations.h         |      0
 .../include/CGAL/create_offset_polygons_2.h        |    341 +
 ...ate_offset_polygons_from_polygon_with_holes_2.h |    106 +
 .../include/CGAL/create_straight_skeleton_2.h      |      0
 ...e_straight_skeleton_from_polygon_with_holes_2.h |     45 +
 .../include/CGAL/determinant.h                     |      0
 .../include/CGAL/determinant_of_vectors.h          |      0
 .../include/CGAL/distance_predicates_2.h           |      0
 .../include/CGAL/distance_predicates_3.h           |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/double.h   |      0
 .../include/CGAL/edge_aware_upsample_point_set.h   |    659 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/enum.h     |      0
 .../include/CGAL/envelope_2.h                      |      0
 .../include/CGAL/envelope_3.h                      |      0
 .../include/CGAL/exceptions.h                      |      0
 .../include/CGAL/export/CGAL.h                     |      0
 3rdparty/CGAL-4.8/include/CGAL/export/CORE.h       |     73 +
 .../include/CGAL/export/ImageIO.h                  |      0
 3rdparty/CGAL-4.8/include/CGAL/export/Qt.h         |     49 +
 3rdparty/CGAL-4.8/include/CGAL/export/helpers.h    |     47 +
 .../include/CGAL/extended_euclidean_algorithm.h    |      0
 .../CGAL/extract_mean_curvature_flow_skeleton.h    |     67 +
 .../CGAL-4.8/include/CGAL/extremal_polygon_2.h     |    750 +
 3rdparty/CGAL-4.8/include/CGAL/exude_mesh_3.h      |     84 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/float.h    |      0
 .../include/CGAL/function_objects.h                |      0
 .../include/CGAL/functions_on_enums.h              |      0
 .../include/CGAL/functions_on_signs.h              |      0
 3rdparty/CGAL-4.8/include/CGAL/generators.h        |    110 +
 .../include/CGAL/generic_sweep.h                   |      0
 3rdparty/CGAL-4.8/include/CGAL/gl.h                |     36 +
 .../CGAL/global_functions_circular_kernel_2.h      |      0
 .../CGAL/global_functions_on_root_for_sphere_2_3.h |      0
 ...global_functions_on_roots_and_polynomials_1_3.h |      0
 ...global_functions_on_roots_and_polynomials_2_3.h |      0
 .../CGAL/global_functions_spherical_kernel_3.h     |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/include/CGAL/glu.h |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/include/CGAL/gmp.h |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/gmpxx.h    |      0
 .../include/CGAL/gmpxx_coercion_traits.h           |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/grabbers.h |      0
 .../include/CGAL/graph_traits_Arrangement_2.h      |    609 +
 .../include/CGAL/graph_traits_Dual_Arrangement_2.h |    748 +
 .../include/CGAL/grid_simplify_point_set.h         |      0
 .../include/CGAL/halfedgeDS_cut_component.h        |      0
 .../include/CGAL/halfedgeds_connected_components.h |      0
 .../include/CGAL/hierarchy_simplify_point_set.h    |    385 +
 3rdparty/CGAL-4.8/include/CGAL/hilbert_sort.h      |    163 +
 .../CGAL-4.8/include/CGAL/hilbert_sort_on_sphere.h |    110 +
 .../include/CGAL/in_place_edge_list.h              |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/include/CGAL/int.h |      0
 .../CGAL/internal/AABB_tree/AABB_drawing_traits.h  |     98 +
 .../include/CGAL/internal/AABB_tree/AABB_node.h    |      0
 .../CGAL/internal/AABB_tree/AABB_search_tree.h     |      0
 .../internal/AABB_tree/AABB_traversal_traits.h     |      0
 .../Halfedge_and_face_graph_property_maps.h        |      0
 .../AABB_tree/Has_nested_type_Shared_data.h        |      0
 .../CGAL/internal/AABB_tree/Primitive_helper.h     |      0
 .../internal/AABB_tree/nearest_point_segment_3.h   |      0
 .../internal/AABB_tree/nearest_point_triangle_3.h  |      0
 .../CGAL/internal/AFSR/Surface_face_base_2.h       |    107 +
 .../CGAL/internal/AFSR/Surface_vertex_base_2.h     |     78 +
 .../CGAL/internal/AFSR/construct_polyhedron.h      |     90 +
 .../CGAL/internal/AFSR/construct_surface_2.h       |    147 +
 .../CGAL-4.8/include/CGAL/internal/AFSR/orient.h   |    139 +
 .../CGAL/internal/AFSR/write_triple_indices.h      |     60 +
 .../include/CGAL/internal/Classification_type.h    |      0
 .../include/CGAL/internal/Combination_enumerator.h |      0
 .../internal/Combinatorial_map_copy_functors.h     |    415 +
 .../internal/Combinatorial_map_group_functors.h    |    972 +
 .../internal/Combinatorial_map_internal_functors.h |    927 +
 .../CGAL/internal/Combinatorial_map_sewable.h      |    331 +
 .../CGAL/internal/Combinatorial_map_utility.h      |      0
 .../Combinatorial_map_utility_novariadic.h         |      0
 .../internal/Delaunay_triangulation_hierarchy_3.h  |      0
 .../include/CGAL/internal/Dummy_tds_3.h            |      0
 .../include/CGAL/internal/Exact_type_selector.h    |      0
 .../include/CGAL/internal/Get_dimension_tag.h      |      0
 .../Intersections_3/Bbox_3_Bbox_3_do_intersect.h   |      0
 .../Intersections_3/Bbox_3_Line_3_do_intersect.h   |      0
 .../Intersections_3/Bbox_3_Plane_3_do_intersect.h  |      0
 .../Intersections_3/Bbox_3_Ray_3_do_intersect.h    |      0
 .../Bbox_3_Segment_3_do_intersect.h                |      0
 .../Intersections_3/Bbox_3_Sphere_3_do_intersect.h |      0
 .../Bbox_3_Triangle_3_do_intersect.h               |      0
 .../Triangle_3_Line_3_intersection.h               |      0
 .../Triangle_3_Ray_3_intersection.h                |      0
 .../Triangle_3_Segment_3_intersection.h            |      0
 .../include/CGAL/internal/K_neighbor_search.h      |      0
 .../include/CGAL/internal/Lazy_alpha_nt_2.h        |    296 +
 .../include/CGAL/internal/Lazy_alpha_nt_3.h        |    343 +
 ...domain_of_complex_3_in_triangulation_3_to_off.h |      0
 .../CGAL/internal/Mesh_3/Graph_manipulations.h     |     98 +
 .../include/CGAL/internal/Mesh_3/check_weights.h   |     66 +
 .../include/CGAL/internal/Mesh_3/get_index.h       |      0
 .../CGAL/internal/Mesh_3/split_in_polylines.h      |    219 +
 .../CGAL/internal/Polyhedron_plane_clipping_3.h    |    391 +
 .../include/CGAL/internal/Projection_traits_3.h    |    724 +
 .../Regular_triangulation_filtered_traits_3.h      |      0
 .../CGAL-4.8/include/CGAL/internal/Rich_grid.h     |    514 +
 .../include/CGAL/internal/Static_filters/Angle_3.h |      0
 .../Static_filters/Compare_squared_radius_3.h      |    424 +
 .../Compare_weighted_squared_radius_3.h            |    399 +
 .../internal/Static_filters/Compare_y_at_x_2.h     |      0
 .../Static_filters/Coplanar_orientation_3.h        |      0
 .../Coplanar_side_of_bounded_circle_3.h            |      0
 .../CGAL/internal/Static_filters/Do_intersect_3.h  |      0
 .../include/CGAL/internal/Static_filters/Equal_3.h |    112 +
 .../CGAL/internal/Static_filters/Is_degenerate_3.h |      0
 .../CGAL/internal/Static_filters/Orientation_2.h   |      0
 .../CGAL/internal/Static_filters/Orientation_3.h   |      0
 .../Static_filters/Periodic_2_orientation_2.h      |    270 +
 .../Periodic_2_side_of_oriented_circle_2.h         |    246 +
 .../Static_filters/Periodic_3_orientation_3.h      |      0
 .../Periodic_3_side_of_oriented_sphere_3.h         |      0
 .../CGAL/internal/Static_filters/Power_test_3.h    |    795 +
 ...Regular_triangulation_static_filters_traits_3.h |      0
 .../Static_filters/Side_of_oriented_circle_2.h     |      0
 .../Static_filters/Side_of_oriented_sphere_3.h     |      0
 .../internal/Static_filters/Static_filter_error.h  |    164 +
 .../CGAL/internal/Static_filters/Static_filters.h  |    302 +
 .../include/CGAL/internal/Static_filters/tools.h   |    193 +
 .../CGAL/internal/Static_or_dynamic_array.h        |      0
 .../Spokes_and_rims_iterator.h                     |      0
 .../Surface_mesh_segmentation/AABB_traits.h        |     92 +
 .../AABB_traversal_traits.h                        |      0
 .../Alpha_expansion_graph_cut.h                    |    688 +
 .../Surface_mesh_segmentation/Disk_samplers.h      |      0
 .../Expectation_maximization.h                     |      0
 .../internal/Surface_mesh_segmentation/Filters.h   |      0
 .../Surface_mesh_segmentation/K_means_clustering.h |      0
 .../Surface_mesh_segmentation/SDF_calculation.h    |      0
 .../Surface_mesh_segmentation.h                    |      0
 .../Surface_mesh_skeletonization/Curve_skeleton.h  |    617 +
 .../internal/Surface_mesh_skeletonization/Debug.h  |     54 +
 .../Detect_degeneracy.h                            |    164 +
 .../Surface_mesh_skeletonization/get_normal.h      |     82 +
 .../CGAL/internal/Transform_coordinates_traits_3.h |    267 +
 .../CGAL/internal/Triangulation/Dummy_TDS.h        |      0
 .../Triangulation/Triangulation_ds_iterators.h     |      0
 .../CGAL/internal/Triangulation/utilities.h        |      0
 .../CGAL/internal/Triangulation_ds_circulators_3.h |      0
 .../CGAL/internal/Triangulation_ds_iterators_3.h   |      0
 .../Voronoi_covariance_3/voronoi_covariance_3.h    |    229 +
 .../voronoi_covariance_sphere_3.h                  |    111 +
 .../include/CGAL/internal/auxiliary/graph.h        |   1751 +
 .../CGAL/internal/boost/array_binary_tree.hpp      |    193 +
 .../include/CGAL/internal/boost/mutable_heap.hpp   |      0
 .../include/CGAL/internal/boost/mutable_queue.hpp  |      0
 .../include/CGAL/internal/boost/property_map.h     |      0
 .../include/CGAL/internal/bounded_priority_queue.h |      0
 .../include/CGAL/internal/container_fwd_fixed.hpp  |      0
 .../Combinatorial_map_for_corefinement.h           |      0
 .../corefinement/Polyhedron_constness_types.h      |      0
 .../intersection_coplanar_triangles_3.h            |      0
 .../corefinement/intersection_triangle_segment_3.h |      0
 .../intersection_triangle_segment_3_coplanar.h     |      0
 .../include/CGAL/internal/deprecation_warning.h    |      0
 .../include/CGAL/internal/info_check.h             |      0
 .../include/CGAL/interpolation_functions.h         |      0
 .../include/CGAL/intersection_2.h                  |      0
 .../include/CGAL/intersection_2_1.h                |      0
 .../include/CGAL/intersection_2_2.h                |      0
 .../include/CGAL/intersection_2_3.h                |      0
 .../include/CGAL/intersection_3.h                  |      0
 .../include/CGAL/intersection_3_1.h                |      0
 .../include/CGAL/intersection_of_Polyhedra_3.h     |   2108 +
 ...ntersection_of_Polyhedra_3_refinement_visitor.h |   2260 +
 .../include/CGAL/intersections.h                   |      0
 .../include/CGAL/intersections_d.h                 |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/ipower.h   |      0
 .../include/CGAL/is_convertible.h                  |      0
 .../include/CGAL/is_iterator.h                     |      0
 .../include/CGAL/is_streamable.h                   |      0
 .../include/CGAL/is_y_monotone_2.h                 |      0
 3rdparty/CGAL-4.8/include/CGAL/iterator.h          |   2500 +
 .../include/CGAL/iterator_from_indices.h           |      0
 .../CGAL-4.8/include/CGAL/jet_estimate_normals.h   |    362 +
 .../CGAL-4.8/include/CGAL/jet_smooth_point_set.h   |    345 +
 .../include/CGAL/kernel_assertions.h               |      0
 .../include/CGAL/kernel_basic.h                    |      0
 .../include/CGAL/kernel_config.h                   |      0
 .../include/CGAL/kernel_to_kernel.h                |      0
 .../include/CGAL/known_bit_size_integers.h         |      0
 .../include/CGAL/leda_bigfloat.h                   |      0
 .../include/CGAL/leda_bigfloat_interval.h          |      0
 .../include/CGAL/leda_coercion_traits.h            |      0
 .../include/CGAL/leda_integer.h                    |      0
 3rdparty/CGAL-4.8/include/CGAL/leda_rational.h     |    308 +
 .../include/CGAL/leda_real.h                       |      0
 .../include/CGAL/linear_least_squares_fitting_2.h  |     98 +
 .../include/CGAL/linear_least_squares_fitting_3.h  |    106 +
 .../CGAL/linear_least_squares_fitting_circles_2.h  |    254 +
 .../CGAL/linear_least_squares_fitting_cuboids_3.h  |    343 +
 .../CGAL/linear_least_squares_fitting_points_2.h   |    111 +
 .../CGAL/linear_least_squares_fitting_points_3.h   |    102 +
 .../linear_least_squares_fitting_rectangles_2.h    |    226 +
 .../CGAL/linear_least_squares_fitting_segments_2.h |    173 +
 .../CGAL/linear_least_squares_fitting_segments_3.h |    173 +
 .../CGAL/linear_least_squares_fitting_spheres_3.h  |    163 +
 .../linear_least_squares_fitting_tetrahedra_3.h    |    335 +
 .../linear_least_squares_fitting_triangles_2.h     |    226 +
 .../linear_least_squares_fitting_triangles_3.h     |    246 +
 .../CGAL-4.8/include/CGAL/lloyd_optimize_mesh_2.h  |    178 +
 .../CGAL-4.8/include/CGAL/lloyd_optimize_mesh_3.h  |    108 +
 .../include/CGAL/long_double.h                     |      0
 .../include/CGAL/long_long.h                       |      0
 3rdparty/CGAL-4.8/include/CGAL/make_mesh_3.h       |    452 +
 .../CGAL/make_piecewise_smooth_surface_mesh.h      |      0
 .../include/CGAL/make_skin_surface_mesh_3.h        |      0
 .../include/CGAL/make_surface_mesh.h               |      0
 .../include/CGAL/make_union_of_balls_3.h           |      0
 .../include/CGAL/marching_tetrahedra_3.h           |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/memory.h   |      0
 .../include/CGAL/mesh_segmentation.h               |      0
 .../include/CGAL/mesh_skin_surface_3.h             |      0
 .../include/CGAL/mesh_union_of_balls_3.h           |      0
 .../include/CGAL/min_max_n.h                       |      0
 .../include/CGAL/min_quadrilateral_2.h             |      0
 .../CGAL/minimum_enclosing_quadrilateral_2.h       |      0
 3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_2.h   |    478 +
 .../include/CGAL/minkowski_sum_3.h                 |      0
 .../include/CGAL/monotone_matrix_search.h          |      0
 .../include/CGAL/more_functions_on_signs.h         |      0
 .../include/CGAL/mpfi_coercion_traits.h            |      0
 .../include/CGAL/mpfr_coercion_traits.h            |      0
 .../include/CGAL/mpq_class.h                       |      0
 .../include/CGAL/mpz_class.h                       |      0
 .../CGAL-4.8/include/CGAL/mst_orient_normals.h     |    716 +
 .../include/CGAL/multiset_assertions.h             |      0
 3rdparty/CGAL-4.8/include/CGAL/mutex.h             |     34 +
 .../include/CGAL/natural_neighbor_coordinates_2.h  |      0
 .../include/CGAL/natural_neighbor_coordinates_3.h  |      0
 .../include/CGAL/nearest_neighbor_delaunay_2.h     |      0
 .../include/CGAL/normal_vector_newell_3.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/number_type_basic.h |     80 +
 .../include/CGAL/number_type_config.h              |      0
 .../include/CGAL/number_utils.h                    |      0
 .../include/CGAL/number_utils_classes.h            |      0
 .../CGAL-4.8/include/CGAL/odt_optimize_mesh_3.h    |    107 +
 3rdparty/CGAL-4.8/include/CGAL/offset_polygon_2.h  |    162 +
 .../include/CGAL/optimize_mesh_3.h                 |      0
 .../include/CGAL/parameterize.h                    |      0
 .../include/CGAL/partition_2.h                     |      0
 .../include/CGAL/partition_is_valid_2.h            |      0
 .../CGAL-4.8/include/CGAL/pca_estimate_normals.h   |    317 +
 .../include/CGAL/periodic_3_triangulation_3_io.h   |      0
 3rdparty/CGAL-4.8/include/CGAL/perturb_mesh_3.h    |    133 +
 .../include/CGAL/pierce_rectangles_2.h             |      0
 .../CGAL-4.8/include/CGAL/point_generators_2.h     |    547 +
 .../CGAL-4.8/include/CGAL/point_generators_3.h     |    309 +
 .../CGAL-4.8/include/CGAL/point_generators_d.h     |    211 +
 .../include/CGAL/point_set_processing_assertions.h |      0
 .../include/CGAL/poisson_refine_triangulation.h    |      0
 .../include/CGAL/polygon_function_objects.h        |      0
 .../include/CGAL/polygon_mesh_processing.h         |     43 +
 .../include/CGAL/polyhedron_cut_plane_3.h          |      0
 .../include/CGAL/polynomial_utils.h                |      0
 .../CGAL/predicates/Polygon_offset_pred_ftC2.h     |      0
 .../CGAL/predicates/Regular_triangulation_ftC2.h   |      0
 .../CGAL/predicates/Regular_triangulation_ftC3.h   |      0
 .../CGAL/predicates/Regular_triangulation_rtH2.h   |      0
 .../CGAL/predicates/Regular_triangulation_rtH3.h   |      0
 .../CGAL/predicates/Straight_skeleton_pred_ftC2.h  |      0
 .../predicates/in_smallest_orthogonalcircle_ftC2.h |      0
 .../include/CGAL/predicates/kernel_ftC2.h          |      0
 .../include/CGAL/predicates/kernel_ftC3.h          |      0
 .../predicates/predicates_for_mixed_complex_3.h    |      0
 ...icates_for_voronoi_intersection_cartesian_2_3.h |      0
 .../predicates_on_weighted_points_cartesian_3.h    |      0
 .../include/CGAL/predicates/sign_of_determinant.h  |      0
 .../include/CGAL/predicates_d.h                    |      0
 .../include/CGAL/predicates_on_lines_2.h           |      0
 .../include/CGAL/predicates_on_points_2.h          |      0
 .../include/CGAL/predicates_on_points_3.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/primes.h            |     70 +
 3rdparty/CGAL-4.8/include/CGAL/primes_impl.h       |    293 +
 3rdparty/CGAL-4.8/include/CGAL/property_map.h      |    396 +
 .../include/CGAL/radial_orient_normals.h           |      0
 .../include/CGAL/random_convex_hull_in_disc_2.h    |      0
 .../CGAL-4.8/include/CGAL/random_convex_set_2.h    |    125 +
 .../include/CGAL/random_polygon_2.h                |      0
 3rdparty/CGAL-4.8/include/CGAL/random_selection.h  |     65 +
 .../include/CGAL/random_simplify_point_set.h       |      0
 .../include/CGAL/range_search_delaunay_2.h         |      0
 .../include/CGAL/rational_rotation.h               |      0
 .../CGAL-4.8/include/CGAL/read_vtk_image_data.h    |     95 +
 .../include/CGAL/rectangular_3_center_2.h          |      0
 .../include/CGAL/rectangular_p_center_2.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/refine_mesh_3.h     |    502 +
 .../include/CGAL/regular_neighbor_coordinates_2.h  |      0
 .../include/CGAL/remove_far_points_in_mesh_3.h     |      0
 .../include/CGAL/remove_outliers.h                 |      0
 .../include/CGAL/representation_tags.h             |      0
 .../include/CGAL/result_of.h                       |      0
 .../include/CGAL/segment_intersection_points_2.h   |      0
 .../include/CGAL/sibson_gradient_fitting.h         |      0
 .../include/CGAL/simple_transformations_d.h        |      0
 .../include/CGAL/simplest_rational_in_interval.h   |      0
 .../CGAL-4.8/include/CGAL/sorted_matrix_search.h   |    415 +
 3rdparty/CGAL-4.8/include/CGAL/spatial_sort.h      |    196 +
 .../CGAL-4.8/include/CGAL/spatial_sort_on_sphere.h |    144 +
 .../include/CGAL/squared_distance_2.h              |      0
 .../include/CGAL/squared_distance_2_1.h            |      0
 .../include/CGAL/squared_distance_2_2.h            |      0
 .../include/CGAL/squared_distance_3.h              |      0
 .../include/CGAL/squared_distance_3_0.h            |      0
 .../include/CGAL/squared_distance_3_1.h            |      0
 .../include/CGAL/squared_distance_3_2.h            |      0
 .../include/CGAL/squared_distance_utils.h          |      0
 3rdparty/CGAL-4.8/include/CGAL/sse2.h              |     36 +
 .../include/CGAL/streamlines_assertions.h          |      0
 .../include/CGAL/subdivide_skin_surface_mesh_3.h   |      0
 .../include/CGAL/subdivide_union_of_balls_mesh_3.h |      0
 .../surface_mesh_parameterization_assertions.h     |      0
 .../include/CGAL/surface_neighbor_coordinates_3.h  |      0
 .../include/CGAL/surface_neighbors_3.h             |      0
 .../surface_reconstruction_points_assertions.h     |    368 +
 .../include/CGAL/sweep_observer.h                  |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/tags.h     |      0
 .../include/CGAL/test_FPU_rounding_mode_impl.h     |     70 +
 .../include/CGAL/to_rational.h                     |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/trace.h    |      0
 .../include/CGAL/transforming_iterator.h           |      0
 .../include/CGAL/transforming_pair_iterator.h      |    127 +
 .../include/CGAL/triangulate_mixed_complex_3.h     |   1324 +
 .../include/CGAL/triangulate_power_diagram_3.h     |      0
 .../include/CGAL/triangulation_assertions.h        |      0
 3rdparty/CGAL-4.8/include/CGAL/tss.h               |     53 +
 3rdparty/CGAL-4.8/include/CGAL/tuple.h             |    244 +
 .../include/CGAL/type_traits.h                     |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/typeset.h  |      0
 3rdparty/{CGAL-4.6 => CGAL-4.8}/include/CGAL/use.h |      0
 .../include/CGAL/user_classes.h                    |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/utility.h  |      0
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/utils.h    |      0
 .../include/CGAL/utils_classes.h                   |      0
 .../include/CGAL/value_type_traits.h               |      0
 .../CGAL-4.8/include/CGAL/vcm_estimate_edges.h     |     84 +
 .../CGAL-4.8/include/CGAL/vcm_estimate_normals.h   |    520 +
 3rdparty/CGAL-4.8/include/CGAL/vector.h            |    620 +
 3rdparty/CGAL-4.8/include/CGAL/version.h           |     35 +
 .../include/CGAL/version_macros.h                  |      0
 .../include/CGAL/vtkSurfaceMesherContourFilter.h   |      0
 .../include/CGAL/width_assertions.h                |      0
 .../CGAL/wlop_simplify_and_regularize_point_set.h  |    715 +
 .../{CGAL-4.6 => CGAL-4.8}/include/CGAL/wmult.h    |      0
 3rdparty/CGAL-4.8/scripts/cgal_create_CMakeLists   |    639 +
 .../scripts/cgal_create_assertions.sh              |      0
 3rdparty/CGAL-4.8/scripts/cgal_create_cmake_script |    169 +
 .../scripts/cgal_make_macosx_app                   |      0
 .../CGAL-4.8/src/CGAL/Bbox_2_intersections.cpp     |     33 +
 .../{CGAL-4.6 => CGAL-4.8}/src/CGAL/CMakeLists.txt |      0
 3rdparty/CGAL-4.8/src/CGAL/Color.cpp               |     30 +
 3rdparty/CGAL-4.8/src/CGAL/File_header_OFF.cpp     |     32 +
 .../CGAL-4.8/src/CGAL/File_header_extended_OFF.cpp |     32 +
 3rdparty/CGAL-4.8/src/CGAL/File_scanner_OFF.cpp    |     32 +
 3rdparty/CGAL-4.8/src/CGAL/File_writer_OFF.cpp     |     32 +
 3rdparty/CGAL-4.8/src/CGAL/File_writer_VRML_2.cpp  |     32 +
 .../CGAL-4.8/src/CGAL/File_writer_inventor.cpp     |     32 +
 .../CGAL-4.8/src/CGAL/File_writer_wavefront.cpp    |     32 +
 3rdparty/CGAL-4.8/src/CGAL/Geomview_stream.cpp     |     30 +
 3rdparty/CGAL-4.8/src/CGAL/Interval_arithmetic.cpp |     31 +
 3rdparty/CGAL-4.8/src/CGAL/JAMA_numeric_solver.cpp |     26 +
 3rdparty/CGAL-4.8/src/CGAL/KDS_Log.cpp             |     34 +
 3rdparty/CGAL-4.8/src/CGAL/NefPolynomial.cpp       |     27 +
 3rdparty/CGAL-4.8/src/CGAL/Random.cpp              |     36 +
 3rdparty/CGAL-4.8/src/CGAL/Real_timer.cpp          |     37 +
 3rdparty/CGAL-4.8/src/CGAL/Residue_type.cpp        |     32 +
 3rdparty/CGAL-4.8/src/CGAL/Timer.cpp               |     37 +
 .../CGAL-4.8/src/CGAL/Turkowski_numeric_solver.cpp |     26 +
 3rdparty/CGAL-4.8/src/CGAL/assertions.cpp          |     30 +
 3rdparty/CGAL-4.8/src/CGAL/io.cpp                  |     36 +
 3rdparty/CGAL-4.8/src/CGAL/kernel.cpp              |     31 +
 .../CGAL-4.8/src/CGAL/numeric_solvers_support.cpp  |     27 +
 3rdparty/CGAL-4.8/src/CGAL/primes.cpp              |     25 +
 .../CGAL-4.8/src/CGAL/test_FPU_rounding_mode.cpp   |     26 +
 3rdparty/CGAL-4.8/src/CGAL_Core/BigFloat.cpp       |     49 +
 3rdparty/CGAL-4.8/src/CGAL_Core/CMakeLists.txt     |     20 +
 3rdparty/CGAL-4.8/src/CGAL_Core/CoreAux.cpp        |     41 +
 3rdparty/CGAL-4.8/src/CGAL_Core/CoreDefs.cpp       |     40 +
 3rdparty/CGAL-4.8/src/CGAL_Core/CoreIO.cpp         |     34 +
 3rdparty/CGAL-4.8/src/CGAL_Core/Expr.cpp           |     42 +
 3rdparty/CGAL-4.8/src/CGAL_Core/GmpIO.cpp          |     29 +
 3rdparty/CGAL-4.8/src/CGAL_Core/Real.cpp           |     43 +
 3rdparty/CGAL-4.8/src/CGAL_Core/extLong.cpp        |     47 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/CMakeLists.txt  |     54 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/ImageIO.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/Image_3.cpp     |     26 +
 .../src/CGAL_ImageIO/LICENSE                       |      0
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.h       |     74 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze_impl.h  |    852 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.cpp         |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.h           |     65 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp_impl.h      |    518 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.cpp   |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.h     |     80 +
 .../CGAL-4.8/src/CGAL_ImageIO/bmpendian_impl.h     |    257 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.h       |     87 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread_impl.h  |   1237 +
 .../src/CGAL_ImageIO/bmptypes.h                    |      0
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.h       |    108 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert_impl.h  |    490 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.cpp      |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.h        |     35 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns_impl.h   |     45 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.cpp         |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.h           |     38 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif_impl.h      |    700 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.cpp         |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.h           |    141 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis_impl.h      |    730 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.cpp         |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.h           |     65 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr_impl.h      |    517 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.cpp        |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.h          |     37 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris_impl.h     |    499 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.cpp      |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.h        |     77 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio_impl.h   |    502 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.cpp         |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.h           |     46 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm_impl.h      |    643 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.cpp   |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.h     |    203 +
 .../CGAL-4.8/src/CGAL_ImageIO/recbuffer_impl.h     |   1743 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.h       |    235 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline_impl.h  |    699 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.cpp    |     27 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.h      |    288 +
 3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4_impl.h |   3176 +
 .../src/CGAL_ImageIO/typedefs.h                    |      0
 3rdparty/CGAL-4.8/src/CGAL_Qt5/CMakeLists.txt      |     94 +
 3rdparty/CGAL-4.8/src/CGAL_Qt5/DemosMainWindow.cpp |     27 +
 .../CGAL-4.8/src/CGAL_Qt5/GraphicsView.qtmoc.cmake |      9 +
 .../src/CGAL_Qt5/GraphicsViewNavigation.cpp        |     27 +
 .../src/CGAL_Qt5/GraphicsViewPolylineInput.cpp     |     27 +
 3rdparty/CGAL-4.8/src/CGAL_Qt5/debug.cpp           |     27 +
 3rdparty/CGAL-4.8/src/CGAL_Qt5/resources.cpp       |     26 +
 3rdparty/CGAL-4.8/src/CGAL_Qt5/utility.cpp         |     27 +
 .../src/CGAL_libs_verinfo.rc.in                    |      0
 3rdparty/CGAL-4.8/src/CMakeLists.txt               |    195 +
 3rdparty/CMakeLists.txt                            |     17 +-
 CMakeLists.txt                                     |     46 +-
 ChangeLog                                          |      2 +
 app/mshrable.cpp                                   |     35 +-
 demo/python/csg-subdomains-2D.py                   |      3 +-
 demo/python/extrude.py                             |     30 +
 demo/python/propeller.py                           |      7 +-
 demo/python/remove_degenerate.py                   |      3 +-
 demo/python/simple-csg-3D.py                       |      6 +-
 include/mshr.h                                     |      1 -
 include/mshr/CSGCGALDomain2D.h                     |     41 +-
 include/mshr/CSGCGALDomain3D.h                     |     88 +-
 include/mshr/CSGCGALMeshGenerator2D.h              |     11 +-
 include/mshr/CSGCGALMeshGenerator3D.h              |     16 +-
 include/mshr/CSGGeometry.h                         |     19 +-
 include/mshr/CSGPrimitives3D.h                     |     59 +-
 include/mshr/DolfinMeshUtils.h                     |     15 +-
 include/mshr/MeshGenerator.h                       |      9 +-
 include/mshr/OFFFileReader.h                       |     47 +
 include/mshr/STLFileReader.h                       |      2 +-
 include/mshr/SurfaceConsistency.h                  |     87 +-
 include/mshr/SurfaceReconstruction.h               |     38 +
 include/mshr/TetgenFileWriter.h                    |     48 -
 include/mshr/TetgenMeshGenerator3D.h               |      3 +-
 include/mshr/VTPFileReader.h                       |      2 +-
 src/CSGCGALDomain2D.cpp                            |    646 +-
 src/CSGCGALDomain3D.cpp                            |   2693 +-
 src/CSGCGALMeshGenerator2D.cpp                     |    336 +-
 src/CSGCGALMeshGenerator3D.cpp                     |     66 +-
 src/CSGPrimitives3D.cpp                            |     65 +-
 src/DolfinMeshUtils.cpp                            |    200 +-
 src/FuzzyPointLocator.h                            |    145 +
 src/MeshGenerator.cpp                              |     29 +-
 src/Meshes.cpp                                     |      5 +-
 src/OFFFileReader.cpp                              |    188 +
 src/Point3FuzzyStrictlyLess.h                      |     53 -
 ...al_multicomponent_mesh_domain_with_features_3.h |     37 +-
 src/Polyhedron_utils.h                             |   2826 +-
 src/STLFileReader.cpp                              |    107 +-
 src/SurfaceConsistency.cpp                         |    272 +-
 src/SurfaceReconstruction.cpp                      |    264 +
 src/TetgenFileWriter.cpp                           |     69 -
 src/TetgenMeshGenerator3D.cpp                      |    108 +-
 src/VTPFileReader.cpp                              |      7 +-
 src/make_multicomponent_mesh_3.h                   |      2 +-
 src/meshclean.h                                    |    123 +-
 src/smoothing.h                                    |     73 +
 src/triangulate_polyhedron.h                       |     59 -
 swig/mshr.i                                        |    130 +-
 test/CMakeLists.txt                                |     25 +-
 test/test-fuzzypointmap.py                         |    108 +
 test/test-mesh-generation.py                       |     10 +
 test/test-meshes.py                                |      6 +
 6961 files changed, 757151 insertions(+), 662565 deletions(-)

diff --git a/3rdparty/CGAL-4.6/CHANGES b/3rdparty/CGAL-4.6/CHANGES
deleted file mode 100644
index 936e7a8..0000000
--- a/3rdparty/CGAL-4.6/CHANGES
+++ /dev/null
@@ -1,4043 +0,0 @@
-
--------------------------------- Release 4.6 --------------------------------
-
-Release date: April 2015
-
-
-* Installation
-
-  - The required version of Boost is now 1.48 or higher.
-
-
-* 2D Polyline Simplification (new package)
-
-  - This package enables to simplify polylines with the guarantee that the
-    topology of the polylines does not change. This can be done for a single
-    polyline as well as for a set of polyline constraints in a constrained
-    triangulation. The simplification can be controlled with cost and stop
-    functions.
-
-
-* 2D Generalized Barycentric Coordinates (new package)
-
-  - This package offers an efficient and robust implementation of two-
-    dimensional closed-form generalized barycentric coordinates defined for
-    simple two-dimensional polygons.
-
-
-* Scale-Space Surface Reconstruction (new package)
-
-  - This new package provides a class gathering a dedicated smoothing algorithm
-    and some convenience functions to help the creation of a surface out of a
-    point set using the 3D Alpha Shapes package. The particularity of this
-    reconstruction pipeline is that the input point are in the output and no
-    new points are created. Note that in the current version, the output is a
-    triangle soup that is not necessarily a valid (manifold) polyhedral
-    surface.
-
-
-* Surface Mesh (new package)
-
-  - The surface mesh class provided by this package is an implementation of the
-    halfedge data structure allowing to represent polyhedral surfaces. It is an
-    alternative to the packages CGAL::Polyhedron_3 and CGAL::HalfedgeDS.
-
-
-* dD Triangulation (new package)
-
-  - This new package provides classes for manipulating triangulations in
-    Euclidean spaces whose dimension can be specified at compile-time or at
-    run-time. It also provides a class that represents Delaunay triangulations.
-
-
-* dD Convex Hulls and Delaunay Triangulations
-
-  - This package is deprecated and the new package Triangulation should be used
-    instead.
-
-
-
-
-* dD Geometry Kernel
-
-  - It has been reported that the recently introduced Epick_d kernel may not
-    work with Intel C++ Compiler prior to version 15. Documentation has been
-    updated.
-
-
-* 3D Convex Hulls
-
-  - Add functions halfspace_intersection_3 and
-    halfspace_intersection_with_constructions_3 to compute the intersection of
-    halfspaces defining a closed polyhedron.
-
-  - Fix a bug introduced in CGAL 4.5 that can appear while computing the convex
-    hull of coplanar points.
-
-  - Fix a robustness issue in Convex_hull_traits_3. This traits is used by
-    default with the kernel Exact_predicates_inexact_constructions_kernel.
-
-  - The function CGAL::convex_hull_incremental_3 is deprecated and the function
-    convex_hull_3 should be used instead.
-
-
-
-
-* Combinatorial Maps and Linear Cell Complex
-
-  - Added correct_invalid_attributes, set_automatic_attributes_management and
-    are_attributes_automatically_managed methods in CombinatorialMap concept.
-    This allows high level operations to not update non void attributes during
-    massive calls of these operations, but only after the end of their
-    executions.
-
-
-
-
-* 2D Triangulations
-
-  - The class Constrained_triangulation_plus_2 now can handle polylines as
-    constraints.
-
-  - As a consequence a Constraint_id has been introduced which replaces
-    pair<Vertex_handle,Vertex_handle> as identifier of a constraint.
-
-
-
-
-* 3D Mesh Generation
-
-  - Add member functions output_boundary_to_off and
-    output_facets_in_complex_to_off in the class CGAL::
-    Mesh_complex_3_in_triangulation_3 to export the boundary of a domain or a
-    subdomain.
-
-
-
-
-* 3D Fast Intersection and Distance Computation
-
-  - Add new constructors to AABB_halfedge_graph_segment_primitive and
-    AABB_face_graph_triangle_primitive in order to be able to build primitives
-    one by one.
-
-
-* Spatial Searching
-
-  - Fixed a bug in CGAL::Splitters.h sliding midpoint rule, where degenerated
-    point sets (e.g.,points on segment) caused the kd-tree to get linear.
-
-  - Improved performance of Orthogonal_k_neighbor_search. Note that VC 2013
-    does not compile boost::container::deque of Boost 1_55 and does hence have
-    a workaround which does not have the improvement.
-
-  - Breaking change: The concept OrthogonalDistance has new function overloads
-    for min_distance_to_rectangle and max_distance_to_rectangle with an
-    additional reference parameter std::vector.
-
-  - Breaking change: The order of the points in the iterator range [tree.begin
-    (),tree.end()] is not the order of insertion of the points into the tree.
-    This was not guaranteed before but might have been observed and exploited
-    by users.
-
-  - Derived kd_tree_leaf_node and kd_tree_internal_node from kd_tree_node to
-    save memory.
-
-
-
-
-* Geometric Object Generators
-
-  - Add a new function random_convex_hull_in_disc_2 that efficiently generates
-    a random polygon as the convex hull of uniform random points chosen in a
-    disc.
-
-
--------------------------------- Release 4.5.2 --------------------------------
-
-Release date: February 2015
-
-
-* General
-
-  - Fix a bug that prevented the compilation with recent versions of Boost
-    (>=1.56) when explicit conversions operators (from C++11) are supported.
-    That prevented the compilation with Microsoft Visual Studio 2013.
-
-
-* 3D Convex Hulls
-
-  - Fix a non-robust predicate bug that was showing up when input points where
-    lexicographically sorted.
-
-
-* 3D Mesh Generation
-
-  - Fix a bug in the sliver perturbation optimization method. It could create
-    some holes on the surface of the mesh.
-
-
--------------------------------- Release 4.5.1 --------------------------------
-
-Release date: December 2014
-
-
-* 3D Mesh Generation
-
-  - Fix a bug in the sliver exudation preservation of boundaries.
-
-
--------------------------------- Release 4.5 --------------------------------
-
-Release date: October 2014
-
-
-* Installation
-
-  - Changes in the set of supported platforms:
-
-      - The Microsoft Windows Visual C++ compiler 2008 (VC9) is no longer
-        supported since CGAL-4.5.
-
-
-  - Since CGAL version 4.0, Eigen was the recommended third-party library to
-    use with Planar Parameterization of Triangulated Surface Meshes, Surface
-    Reconstruction from Point Sets, Approximation of Ridges and Umbilics on
-    Triangulated Surface Meshes, and Estimation of Local Differential
-    Properties of Point-Sampled Surfaces packages. From CGAL version 4.5,
-    Taucs, Blas and Lapack are no longer supported.
-
-  - CGAL is now compatible with the new CMake version 3.0.
-
-
-* Triangulated Surface Mesh Deformation (new package)
-
-  - This package allows to deform a triangulated surface mesh under positional
-    constraints of some of its vertices without requiring any additional
-    structure other than the surface mesh itself. The methods provided
-    implements an as-rigid-as-possible deformation. Note that the main class
-    name has changed between the 4.5-beta1 and the 4.5 releases to better match
-    the CGAL naming conventions (from CGAL::Deform_mesh to CGAL::
-    Surface_mesh_deformation).
-
-
-* CGAL and the Boost Graph Library (major changes)
-
-  - Cleanup of the HalfedgeGraph concept. In particular:
-
-      - Introduction of the notion of halfedge_descriptor in the specialization
-        of the class boost::graph_traits.
-
-      - Deprecation of halfedge_graph_traits.
-
-      - A model of HalfedgeGraph is considered as an undirected graph. Thus any
-        call to edges() should be replaced by halfedges() and num_edges() now
-        returns the number of (undirected) edges.
-
-      - Breaking change: is_border_edge and is_border_halfedge properties are
-        removed. The free functions is_border() and is_border_edge() should be
-        used instead.
-
-      - Renaming of HalfedgeGraph specific free functions.
-
-
-  - Introduction of the FaceGraph concept.
-
-  - Adaptation of the package Triangulated Surface Mesh Simplification and of
-    the class AABB_halfedge_graph_segment_primitive from the package 3D Fast
-    Intersection and Distance Computation to the API change.
-
-  - Update of the package Triangulated Surface Mesh Segmentation and of the
-    class AABB_face_graph_triangle_primitive from the package 3D Fast
-    Intersection and Distance Computation to accept model of the newly
-    introduced concepts.
-
-  - Offer Euler operations as free functions for models of the graph concepts
-    provided by CGAL.
-
-  - Specialization of boost::graph_traits for OpenMesh::PolyMesh_ArrayKernelT
-    as proof of concept. A OpenMesh::PolyMesh_ArrayKernelT becomes a model of
-    the aforementioned concepts when including CGAL/boost/graph/
-    graph_traits_PolyMesh_ArrayKernelT.h.
-
-
-* dD Geometry Kernel
-
-  - A new model Epick_d of the Kernel_d concept is introduced. It provides
-    better performance through arithmetic filtering and specializations for
-    fixed dimensions. It may not work with compilers as old as gcc-4.2, but was
-    tested with gcc-4.4.
-
-
-* 3D Convex Hulls
-
-  - Clean up the documentation of the concepts
-
-
-* 2D Arrangements
-
-  - Fixed a bug in removing an unbounded curve (e.g., a ray) from an
-    arrangement induced by unbounded curves.
-
-
-* 2D Snap Rounding
-
-  - Replaced use of private kd_tree with CGAL's official Kd_tree from
-    Spatial_searching package; results in a small performance gain. Removed the
-    private kd_tree package.
-
-
-* 3D Triangulations
-
-  - Add an experimental parallel version of the Delaunay triangulation and the
-    regular triangulation algorithms, which allows parallel insertion and
-    removal of point ranges.
-
-
-* 3D Mesh Generation
-
-  - Add a new constructor for the class Labeled_mesh_domain_3 which takes an
-    Iso_cuboid_3.
-
-  - Add a new labeling function wrapper for meshing multi-domain.
-
-  - The meshing functionality in the Qt demos in demo/Polyhedron/ and demo/
-    Mesh_3/ can now use the handling of 1d-features, that exists in CGAL since
-    version 3.8.
-
-  - Add an experimental parallel version of the 3D mesh refinement and mesh
-    optimization methods.
-
-  - Add caching of circumcenters to Regular_triangulation_cell_base_3. The
-    cache value is computed when cell->circumcenter() or rt.dual(cell)
-    functions are called.
-
-
-* Point Set Processing and Surface Reconstruction from Point Sets
-
-  - The former demo has been removed and is fully merge in the Polyhedron demo.
-
-
-* Point Set Processing
-
-  - Workaround a bug in dijsktra shortest path of boost 1.54 by shipping and
-    using the boost header from the 1.55 release. This header will be used only
-    if you are using the version 1.54 of boost.
-
-
-* Triangulated Surface Mesh Simplification
-
-  - Breaking change: Due to the cleanup of the concepts of the package CGAL and
-    the Boost Graph Library, the named parameter edge_is_border_map has been
-    removed, and the named parameter edge_is_constrained_map now expects a
-    property map with an edge descriptor as key type (vs. halfedge descriptor
-    before).
-
-  - Add some optimization in the code making the implementation faster
-    (depending on the cost and the placement chosen). However, for an edge
-    which collapse is not topologically valid, the vector of vertices of the
-    link provided by its profile might contains duplicates, thus also breaking
-    the orientation guarantee in the vector. This must not be a problem for
-    users as the edge is not collapsible anyway but if it is a absolute
-    requirement for user defined cost/placement, defining the macro
-    CGAL_SMS_EDGE_PROFILE_ALWAYS_NEED_UNIQUE_VERTEX_IN_LINK will restore the
-    former behavior.
-
-
-* dD Spatial Searching
-
-  - Added methods reserve(size_t size) and size_t capacity() to class Kd_tree
-    to allocate memory to store size points and to report that number (STL
-    compliance).
-
-
-* STL Extensions for CGAL
-
-  - Add Compact_container::operator[], allowing a direct access to the ith
-    element of a compact container.
-
-  - Add Concurrent_compact_container, a compact container which allows
-    concurrent insertion and removal.
-
-
--------------------------------- Release 4.4 --------------------------------
-
-Release date: April 2014
-
-
-* Installation
-
-  - Additional supported platforms:
-
-      - The Apple Clang compiler version 5.0 is now supported on
-        OS X Mavericks.
-
-      - The Microsoft Windows Visual C++ compiler 2013 (VC12) is now supported.
-
-
-
-* Triangulated Surface Mesh Segmentation (new package)
-
-  - This package implements the segmentation of triangulated surface meshes
-    based on the Shape Diameter Function (SDF). In addition, it also provides
-    functions to generate segmentations based on a user defined alternative to
-    the SDF.
-
-
-* Number Types
-
-  - A new class CGAL::Mpzf is introduced on some platforms for exact ring
-    operations. It is used to improve the speed of the evaluation of predicates
-    in degenerate situations.
-
-
-* 2D and 3D Geometry Kernel
-
-  - Fix a bug introduced in CGAL 4.3 when computing the intersection of two 3D
-    triangles.
-
-
-* 2D Polygon Partitioning
-
-  - Bug fix to make the partition algorithms working with a Lazy kernel such as
-    Exact_predicates_exact_constructions_kernel.
-
-
-* 2D Regularized Boolean Set-Operations
-
-  - Fix two memory leaks in CGAL::General_polygon_set_2.
-
-
-* Combinatorial Maps and Linear Cell Complex
-
-  - null_dart_handle is no longer a static data member in the CombinatorialMap
-    concept. This implies to move the following methods of Dart concept into
-    CombinatorialMap concept: is_free, highest_nonfree_dimension, opposite and
-    other_extremity. We also transform the static methods vertex_attribute and
-    point of Linear_cell_complex class into non static methods. You can define
-    the CGAL_CMAP_DEPRECATED macro to keep the old behavior.
-
-
-* 2D Arrangements
-
-  - Revise the API of polylines. In particular, construction is now done using
-    functors and iteration is possible only on the segments of a polyline.
-
-  - Fix a bug in the Landmark point-location strategy.
-
-
-* 2D Snap Rounding
-
-  - Fix a memory leak
-
-
-* 2D Triangulations
-
-  - Add different overloads of the function insert_constraints that inserts a
-    range of points and segments, or a range of segments. These functions uses
-    the spatial sorting in order to speed up the time needed for the insertion.
-
-
-* 3D Periodic Triangulations
-
-  - Add a method to locate point with inexact predicates.
-
-
-* 3D Alpha Shapes
-
-  - Add member functions in CGAL::Alpha_shape_3 to give access to the alpha
-    status of edges and facets (get_alpha_status()).
-
-  - Add another filtration method (filtration_with_alpha_values()) that reports
-    the alpha value at which each face appears in the filtration.
-
-
-* 3D Mesh Generation
-
-  - Fix the access to functions number_of_facets and number_of_cells in
-    Mesh_complex_3_in_triangulation_3.
-
-  - Change the internal API of the sliver perturber, to make possible for
-    developers to optimize another criterion than the (default) minimal
-    dihedral angle. Developers can also define a new perturbation vector (for
-    angles we had gradient of squared circumradius, gradient of volume,
-    gradient of minimal dihedral angle, and random) which is better suitable to
-    optimize their criterion.
-
-  - Improve the use of cache values in Mesh_cell_base_3 to (re)compute
-    circumcenters and sliver criterion values only when needed.
-
-
-* Triangulated Surface Mesh Simplification
-
-  - Fix a bug in the way edges can be marked as non-removable by adding a
-    named-parameter edge_is_constrained_map to the function edge_collapse
-
-
-* dD Spatial Searching
-
-  - Fix a documentation bug: The property map passed as template parameter to
-    the classes Search_traits_adapter and Distance_adapter must be a lvalue
-    property map. To avoid incorrect usage, a static assertion has been added
-    in the CGAL code to prevent the user from instantiating these classes with
-    an incorrect property map type.
-
-
-* CGAL ipelets
-
-  - Better description of the demo ipelets in the user manual
-
-  - New ipelet for pencils of circles
-
-  - New ipelet for hyperbolic geometry in Poincaré model
-
-  - The generator ipelet now generates point in a selected zone
-
-  - Hilbert sort ipelet implements two policies
-
-
--------------------------------- Release 4.3 --------------------------------
-
-Release date: October 2013
-
-
-* The CGAL Manual
-
-  - The documentation of CGAL is now generated with Doxygen.
-
-
-* 2D Periodic Triangulations (new package)
-
-  - This package allows to build and handle triangulations of point sets in the
-    two dimensional flat torus. Triangulations are built incrementally and can
-    be modified by insertion or removal of vertices. They offer point location
-    facilities. The package provides Delaunay triangulations and offers nearest
-    neighbor queries and primitives to build the dual Voronoi diagrams.
-
-
-* API Changes
-
- ** 2D and 3D Geometry Kernel
-
-  - The intersection functions and functors used to return a CGAL::Object in
-    order to deal with the different possible return types. However, depending
-    on the arguments it is possible to reduce the possible return types to a
-    small set. For this reason and to take advantage of the type safety, we
-    decided to use boost::variant instead of CGAL::Object. The result_of
-    protocol is now even more useful to determine the return type of the
-    intersection functions and functors. The change should be relatively
-    transparent to the user thanks to the implicit constructor added to CGAL::
-    Object. However, it is recommended to upgrade your code. The previous
-    behavior can be restored by defining the macro CGAL_INTERSECTION_VERSION
-    to 1.
-
-
- ** 2D Arrangements
-
-  - The type of the result of point location queries changed to boost::variant
-    (from CGAL::Object). For convenience, the previous behavior can be restored
-    by defining the macro CGAL_ARR_POINT_LOCATION_VERSION to 1.
-
-  - Introduced an optimization for operations on large and dense arrangements.
-
-
- ** 3D Fast Intersection and Distance Computation
-
-  - Following the intersection API change, Object_and_primitive_id has been
-    replaced by a template class Intersection_and_primitive_id<Query> to
-    determine the type depending on the query object type.
-
-
- ** CGAL and Boost Property Maps
-
-  - The key_type of the property maps provided by CGAL used to be an iterator.
-    In order to be more easily re-used, the key_type has been changed to be the
-    value_type of the iterator. The packages that have been updated to match
-    these changes are Point Set Processing and Surface Reconstruction from
-    Point Sets. However, for most users this change should be transparent if
-    the default property maps were used. For convenience, the former behavior
-    can be enabled by defining the macro CGAL_USE_PROPERTY_MAPS_API_V1.
-
-
-* Algebraic Foundations
-
-  - For convenience, add an overload of make_rational() taking a pair of
-    numbers.
-
-
-* 2D and 3D Geometry Kernel
-
-  - A Iso_rectangle_2 can now be constructed from a Bbox_2 and an Iso_cuboid_3
-    from a Bbox_3.
-
-  - The implementation of CGAL::Object has been updated and now uses boost::
-    shared_ptr and boost::any. This implementation is faster.
-
-  - Add to Bbox_2 and Bbox_3 a += operator as well as free functions to get the
-    bounding box of a range of geometric objects.
-
-
-* Combinatorial Maps
-
-  - Two bug fixes: do not use the 2 least significant bits for cell attribute
-    without dart support; share the mark when copying a CMap_cell_iterator.
-
-  - Add a constructor taking a given combinatorial map as argument, possibly
-    with different dimension and/or different attributes. This allows to
-    transform a combinatorial map.
-
-  - Add operator= and swap method.
-
-  - Add dynamic onmerge/onsplit functions that can be associated dynamically to
-    i-attributes and which are automatically called when i-cells are split/
-    merged.
-
-  - Add a function allowing to reverse the orientation of a combinatorial map,
-    and another one to reverse one connected component of a combinatorial map.
-
-
-* 3D Boolean Operations on Nef Polyhedra
-
-  - Bug-fix in IO when using Lazy_exact_nt as number type or
-    Exact_predicates_exact_constructions_kernel as kernel.
-
-
-* 2D Triangulations
-
-  - Extend the concept TriangulationDataStructure_2 to require a more general
-    copy_tds function that allows a copy between TDS of different types. The
-    CGAL model has been updated.
-
-  - Add a way to efficiently insert a range of points with information into the
-    2D constrained Delaunay triangulations.
-
-
-* 3D Triangulations
-
-  - Extend the concept TriangulationDataStructure_3 to require a more general
-    copy_tds function that allows a copy between TDS of different types. The
-    CGAL model has been updated.
-
-  - Add an advanced function to set the infinite vertex of the triangulation
-    for low level operations
-
-  - Fix a bug in the function inserting a range of points with info when the
-    Fast_location tag is used
-
-
-* 2D Segment Delaunay Graph
-
-  - Add functions insert_points and insert_segments to insert a range of points
-    and segments. These functions uses the spatial sorting in order to speed up
-    the time needed for the insertion. The function insert(Input_iterator
-    first, Input_iterator beyond, Tag_true) has been updated to dispatch the
-    input when possible to these functions.
-
-
-* 2D Apollonius Graphs
-
-  - Modified insertion algorithm so that the code can handle pseudo-circles as
-    well.
-
-  - Updated implementation of the vertex conflict predicate by a faster
-    version.
-
-
-* 3D Mesh Generation
-
-  - Speed-up Mesh_3 and in particular the global optimizers (Lloyd and ODT) by
-    introducing a parameter do_freeze to prevent from moving vertices which
-    would move of very small displacements.
-
-  - Introduce new data structures and options for speed-up and compacity. Note
-    that Compact_mesh_cell_base_3 and Mesh_vertex_base_3 are now our favoured
-    implementations of the concepts MeshCellBase_3 and MeshVertexBase_3.
-
-  - Introduce a new constructor for Polyhedral_mesh_domain_3 that takes a
-    bounding polyhedron to be meshed along with a polyhedral surface entirely
-    included in it. This allows the user to mesh a polyhedral domain with
-    internal surface(s) which can be non-watertight and even non-manifold.
-
-  - Several documentation bug fixes.
-
-  - Provide the ability to plug in custom cell_base/vertex_base classes into
-    the Mesh_triangulation_3 class.
-
-
-* Triangulated Surface Mesh Simplification
-
-  - Fix a segmentation fault that was happening when some edges of length 0
-    were in the input mesh.
-
-
-* 3D Fast Intersection and Distance Computation
-
-  - Following the intersection API change, Object_and_primitive_id has been
-    replaced by a template class Intersection_and_primitive_id<Query> to
-    determine the type depending on the query object type.
-
-  - Introduce the class AABB_halfedge_graph_segment_primitive, which replaces
-    the class AABB_polyhedron_segment_primitive (which is now deprecated). The
-    new class is more general and can be used with any model of HalfedgeGraph.
-
-  - Introduce the class AABB_face_graph_triangle_primitive which replaces the
-    class AABB_polyhedron_triangle_primitive (which is now deprecated).
-
-  - Document the classes AABB_segment_primitive and AABB_triangle_primitive
-    that were already used in some examples.
-
-  - Add a generic primitive class AABB_primitive that allows to define a
-    primitive type by defining only two property maps.
-
-  - Introduce a new concept of primitive AABBPrimitiveWithSharedData. It allows
-    to have some data shared between the primitives stored in a AABB_tree. With
-    this you can, for example have a primitive wrapping an integer which refers
-    to the position of a geometric object in a std::vector. Only one reference
-    to this vector will be stored in the traits of the tree. The concept
-    AABBTraits, its model AABB_traits and the class AABB_tree have been updated
-    accordingly. However, everything is backward compatible.
-
-  - Fix a memory leak in the destructor of the class AABB-tree
-
-
-* STL Extensions for CGAL
-
-  - Add to Dispatch_output_iterator and Dispatch_or_drop_output_iterator an
-    operator to accept and dispatch a tuple of values.
-
-
-* Concurrency in CGAL
-
-  - Add a FindTBB CMake module so that one can easily link with TBB to write
-    shared-memory parallel code.
-
-  - Introduce two new tags: Sequential_tag and Parallel_tag
-
-
--------------------------------- Release 4.2 --------------------------------
-
-Release date: March 2013
-
-
-* Installation
-
-  - Additional supported platforms:
-
-      - The Microsoft Windows Visual C++ compiler 2012 (VC11) is now supported.
-
-
-  - With Microsoft Visual C++ (all supported versions), the compiler flags /
-    bigobj and /wd4503 are added by CGAL CMake scripts.
-
-  - This is the last release whose "UseCGAL.cmake" file (if using CGAL in a
-    CMake build environment) contains the line
-      link_libraries(${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS})
-    as this is a deprecated CMake command. The correct way to link with CGAL's
-    libraries (as for required 3rd party libraries) is to use
-    'target_link_libraries' which specifies for each build target which
-    libraries should be linked. The following serves as example:
-      find_package(CGAL)
-      include(${CGAL_USE_FILE})
-      add_executable(myexe main.cpp)
-      target_link_libraries(myexe ${CGAL_LIBRARIES}
-                                  ${CGAL_3RD_PARTY_LIBRARIES})
-    We also expect further changes in CGAL's CMake setup (change of variable
-    names, consistency of filename and output, removing essential libraries,
-    building executables, removal of '${CGAL_3RD_PARTY_LIBRARIES}').
-
-
-* 2D Arrangements
-
-  - Enhanced the 2D-arrangements demonstration program and ported it to Qt4.
-    The new demonstration program makes use of the CGAL Graphics View
-    framework, in which the 2D primitives are individually represented as
-    objects in a scene. (The implementations of several demos in CGAL already
-    make use of this framework.) This project was carried out as part of the
-    2012 Google Summer of Code program.
-
-  - Fixed a bug in the Walk-Along-A-Line point location strategy for
-    arrangements induced by unbounded curves.
-
-
-* 2D Circular Geometry Kernel
-
-  - Fix the intersection type computed when intersecting two identical circles.
-
-  - Forward correctly the result type of the linear kernel functors
-
-
-* 2D Triangulations
-
-  - Add mechanism to avoid call stack overflow in Delaunay_triangulation_2 and
-    Constrained_Delaunay_triangulation_2.
-
-  - Add a constructor for Regular_triangulation_2 and Delaunay_triangulation_2
-    from a range of points or a range of points with info.
-
-
-* 2D Voronoi Diagram Adaptor
-
-  - Bug-fix: Add ccb() method in face type as documented.
-
-
-* 3D Minkowski Sum of Polyhedra
-
-  - Fix a memory leak.
-
-
-* 3D Fast Intersection and Distance Computation
-
-  - Update requirements of the concepts AABBTraits and AABBGeomTraits to match
-    the implementation of the package.
-
-
-* Generator
-
-  - Addition of the Combination_enumerator
-
-
-* STL Extensions
-
-  - Introduction of CGAL::cpp11::result_of as an alias to the tr1
-    implementation from boost of the result_of mechanism. When all compilers
-    supported by CGAL will have a Standard compliant implemention of the C++11
-    decltype feature, it will become an alias to std::result_of.
-
-
-* Surface Reconstruction from Point Sets
-
-  - Performance improvements and addition of an option to better reconstruct
-    undersampled zones. The poisson reconstruction plugin of the Polyhedron
-    demo has an option to switch it on.
-
-
--------------------------------- Release 4.1 --------------------------------
-
-Release date: October 2012
-
-
-* Installation
-
-  - Additional supported platforms:
-
-      - The Apple Clang compiler versions 3.1 and 3.2 are now supported on
-        Mac OS X.
-
-
-  - Improved configuration for essential and optional external third party
-    software
-
-  - Added more general script to create CMakeLists.txt files:
-    cgal_create_CMakeLists
-
-  - Availability tests for C++11 features are now performed with the help of
-    Boost.Config. A Boost version of 1.40.0 or higher is needed to use C++11
-    features.
-
-
-* 2D Arrangement
-
-  - Improved the implementation of the incremental randomized trapezoidal
-    decomposition point-location strategy. The new implementation enables point
-    location in unbounded arrangements. It constructs a search structure of
-    guaranteed linear size with guaranteed logarithmic query time.
-
-
-* 2D Convex Hulls and Extreme Points
-
-  - Speed up the preprocessing stage of the Akl-Toussaint implementation (used
-    by the free function convex_hull_2 when forward iterators are provided as
-    input).
-
-
-* Combinatorial Maps
-
-  - Minor bugfix; replace some functors by methods.
-
-
-* Linear Cell Complex
-
-  - Improve the demo: add a widget showing all the volumes and an operation to
-    create a Menger sponge.
-
-
-* Kernels
-
-  - All Kernel functors now support the result_of protocol.
-
-
-* STL_Extensions for CGAL
-
-  - The namespace cpp0x has been renamed cpp11. The old name is still available
-    for backward compatibility.
-
-
--------------------------------- Release 4.0.2 --------------------------------
-
-Release date: Jul 2012
-
-This is a bug fix release. It fixes a bug in the CMakeLists.txt for CGAL-4.0.1,
-that prevented even building the libraries.
-
-
--------------------------------- Release 4.0.1 --------------------------------
-
-Release date: Jul 2012
-
-This is a bug fix release. Apart various minor fixes in the documentation, the
-following has been changed since CGAL-4.0:
-
-
-* 2D Voronoi Diagram Adaptor (re-added)
-
-  - The package 2D Voronoi Diagram Adaptor was temporarily removed from the
-    CGAL distribution because of license issues. That package is now back into
-    CGAL.
-
-
-* 2D and 3D Geometry Kernel
-
-  - Fix a bug in the Segment_3-Triangle_3 intersection function in the case the
-    segment is collinear with a triangle edge.
-
-  - Fix a bug in the Projection_traits_.._3 class in the case a segment was
-    parallel to the x-axis.
-
-
-* Algebraic Kernel
-
-  - Avoid the linking error "duplicate symbols" when two compilation units
-    using the algebraic kernel are linked.
-
-
-* 3D Boolean Operations on Nef Polygons Embedded on the Sphere
-
-  - Fix a memory leak due to the usage of an internal mechanism that has been
-    replaced by boost::any. This also influences the packages 2D Boolean
-    Operations on Nef Polygons, 3D Boolean Operations on Nef Polyhedra, Convex
-    Decomposition of Polyhedra, and 3D Minkowski Sum of Polyhedra.
-
-
-* 2D Arrangement
-
-  - Fix several memory leaks.
-
-
-* 2D Mesh Generation
-
-  - Fix a compilation error in the header <CGAL/Mesh_2/Do_not_refine_edges.h>
-    when g++ version 4.7 is used.
-
-
-* Surface Mesh Generation and 3D Mesh Generation
-
-  - Fix an important bug in the CGAL_ImageIO library, that could lead to wrong
-    result when meshing from a 3D image.
-
-  - Fix the compilation of the demo in demo/Surface_mesher, when Boost version
-    1.48 or 1.49 is used.
-
-
-* Surface Mesh Parameterization
-
-  - Fix a memory leak.
-
-  - Fix a compatibility issue with Eigen-3.1 of Eigen_solver_traits. This fix
-    also affects the usage of that class in the package Surface Reconstruction
-    from Point Sets.
-
-
--------------------------------- Release 4.0 --------------------------------
-
-Release date: March 2012
-
-CGAL 4.0 offers the following improvements and new functionality :
-
-
-* License Changes
-The whole CGAL-3.x series was released under a combination of LGPLv2 (for the
-foundations of CGAL), and QPL (for the high-level packages). QPL was the former
-license of the graphical toolkit Qt, but that license is not supported by any
-major free software project. Furthermore, the terms of the LGPLv2 license are
-ambiguous for a library of C++ templates, like CGAL.
-
-The CGAL project, driven by the CGAL Editorial Board, has decided to change the
-license scheme of CGAL. We increased the major number of the CGAL version to
-'4' in order to reflect this license change. The CGAL-4.x series is released
-under:
-
-
-  - LGPLv3+ (that is LGPL "either version 3 of the License, or (at your option)
-    any later version"), for the foundations of CGAL, instead of LGPLv2,
-
-  - GPLv3+ for the high-level packages, instead of QPL.
-
-
-* General
-
-  - On Windows, CGAL libraries are now built by default as shared libraries
-    (also called DLL). To run applications that use .dll files of CGAL, you
-    must either copy the .dll files into the directory of the application, or
-    add the path of the directory that contains those .dll files into the PATH
-    environment variable.
-
-  - On Windows, the CMake scripts of CGAL now search for shared version of the
-    Boost libraries. You must ensure that the .dll files of Boost are found by
-    the dynamic linker. You can, for example, add the path to the Boost .dll
-    files to the PATH environment variable.
-
-  - On Windows, CMake version 2.8.6 or higher is now required.
-
-  - Eigen version 3.1 or later is now the recommended third party library to
-    use in Planar Parameterization of Triangulated Surface Meshes, Surface
-    Reconstruction from Point Sets, Approximation of Ridges and Umbilics on
-    Triangulated Surface Meshes, and Estimation of Local Differential
-    Properties of Point-Sampled Surfaces packages. If you use Eigen you no
-    longer need Taucs, Lapack or Blas to use those packages (and any other in
-    CGAL).
-
-
-* Linear Cell Complex (new package)
-
-  - This package implements linear cell complexes, objects in d-dimension with
-    linear geometry. The combinatorial part of objects is described by a
-    combinatorial map, representing all the cells of the object plus the
-    incidence and adjacency relations between cells. Geometry is added to
-    combinatorial maps simply by associating a point to each vertex of the map.
-    This data structure can be seen as the generalization in dD of the
-    Polyhedron_3.
-
-
-* 2D Voronoi Diagram Adaptor (temporarily removed)
-
-  - As the copyright holder of this package has not granted the right to switch
-    from QPL to GPL, this package is removed from the distribution. Note that
-    it is "only" an adapter, that is the functionality of point/segment/disk
-    Voronoi diagram is offered through the Delaunay triangulation, segment
-    Delaunay graph, and Apollonius graph.
-
-
-* AABB Tree
-
-  - Document constness of member functions of the AABB_tree class.
-
-  - The class AABB_tree is now guaranteed to be read-only thread-safe. As usual
-    in CGAL, this small overhead introduced for thread-safety can be
-    deactivated by defining CGAL_HAS_NO_THREADS.
-
-
-* 2D Alpha Shapes
-
-  - Add an extra template parameter to the class Alpha_shape_2 that allows a
-    certified construction using a traits class with exact predicates and
-    inexact constructions.
-
-  - An object of type Alpha_shape_2 can now be constructed from a
-    triangulation.
-
-
-* 3D Alpha Shapes
-
-  - Add an extra template parameter to the class Alpha_shape_3 that allows a
-    certified construction using a traits class with exact predicates and
-    inexact constructions.
-
-
-* Geometric Object Generators
-
-  - Random_points_in_iso_box_d (deprecated since 3.8) has been removed. Use
-    Random_points_in_cube_d instead.
-
-
-* Linear and Quadratic Programming Solver
-
-  - Minor bugfix.
-
-
-* Spatial Searching
-
-  - The const-correctness of this package have been worked out. The transition
-    for users should be smooth in general, however adding few const in user
-    code might be needed in some cases.
-
-  - The class Kd_tree is now guaranteed to be read-only thread-safe. As usual
-    in CGAL, this small overhead introduced for thread-safety can be
-    deactivated by defining CGAL_HAS_NO_THREADS.
-
-  - Bug-fix in Orthogonal_incremental_neighbor_search and
-    Incremental_neighbor_search classes. Several calls to begin() now allow to
-    make several nearest neighbor search queries independently.
-
-
-* STL Extension
-
-  - CGAL::copy_n is now deprecated for CGAL::cpp0x::copy_n which uses std::
-    copy_n, if available on the platform.
-
-  - CGAL::successor and CGAL::predecessor are now deprecated for CGAL::cpp0x::
-    next and CGAL::cpp0x::prev. These functions use the standard versions if
-    available on the platform. Otherwise, boost::next and boost::prior are
-    used.
-
-
-* Triangulation_2
-
-  - Fix a thread-safety issue in Delaunay_triangulation_2 remove functions. As
-    usual in CGAL, the small overhead introduced for thread-safety can be
-    deactivated by defining CGAL_HAS_NO_THREADS.
-
-  - Add extraction operator for the class Constrained_triangulation_2 (and thus
-    to all inheriting classes).
-
-
--------------------------------- Release 3.9 --------------------------------
-
-Release date: September 2011
-
-CGAL 3.9 offers the following improvements and new functionality :
-
-
-* General
-
-  - The class Root_of_2 is now deprecated. It is recommended to use the class
-    Sqrt_extension instead.
-
-  - The class Sqrt_extension is now used everywhere in CGAL where an algebraic
-    number of degree 2 is needed. This change has been done in the
-    Root_of_traits mechanism (indirectly packages 2D Circular kernel and 3D
-    Spherical kernel) and the packages 2D Segment Delaunay Graphs and 2D
-    Arrangements.
-
-  - Various fixes in the manual.
-
-
-* Combinatorial Maps (new package)
-
-  - This package provides a new combinatorial data structure allowing to
-    describe any orientable subdivided object whatever its dimension. It
-    describes all cells of the subdivision and all the incidence and adjacency
-    relations between these cells. For example it allows to describe a 3D
-    object subdivided in vertices, edges, faces and volumes. This data
-    structure can be seen as the generalization in dD of the halfedge data
-    structure.
-
-
-* 3D Convex Hull (major performance improvement)
-
-  - The quickhull implementation of CGAL (CGAL::convex_hull_3) has been worked
-    out to provide very better performances.
-
-  - The function CGAL::convex_hull_3 no longer computes the plane equations of
-    the facets of the output polyhedron. However an example is provided to show
-    how to compute them easily.
-
-  - A global function convex_hull_3_to_polyhedron_3 is now provided to extract
-    the convex hull of a 3D points set from a triangulation of these points.
-
-
-* dD Spatial Searching (major new feature added)
-
-  - A traits-class and distance adapter that together with a point property
-    map, allow to make nearest neighbor queries on keys instead of points have
-    been added.
-
-  - Few bug fixes in the documentation have revealed some inconsistencies that
-    have been corrected. Two traits class concept are now documented
-    (RangeSearchTraits and SearchTraits). Most other changes concerns only
-    classes documented as advanced. One issue that user can encounter is due to
-    an additional requirement on the nested class
-    Construct_cartesian_const_iterator_d defined in the concept SearchTraits
-    that must provide a nested type result_type.
-
-
-* Spatial Sorting (major new feature added)
-
-  - General dimension is now supported.
-
-  - Hilbert sorting admits now two policies: splitting at median or at middle
-    (see user manual).
-
-  - Using a property map, sorting on keys instead of points is now easier
-
-
-* dD Kernel
-
-  - The d-dimensional kernel concept and models have been modified to
-    additionally provide two new functors Less_coordinate_d and
-    Point_dimension_d.
-
-
-* 2D Arrangements
-
-  - A new geometry-traits class that handles rational arcs, namely
-    Arr_rational_function_traits_2, has been introduced. It replaced an old
-    traits class, which handled the same family of curves, but it was less
-    efficient. The new traits exploits CGAL algebraic kernels and polynomials,
-    which were not available at the time the old traits class was developed.
-
-  - A new geometry traits concept called ArrangementOpenBoundaryTraits_2 has
-    been introduced. A model of this concept supports curves that approach the
-    open boundary of an iso-rectangular area called parameter space, which can
-    be unbounded or bounded. The general code of the package, however, supports
-    only the unbounded parameter space. We intend to enhance the general code
-    to support also bounded parameter spaces in a future release.
-
-  - The deprecated member function is_at_infinity() of Arrangement_2::Vertex
-    has been removed. It has been previously replaced new function
-    is_at_open_boundary().
-
-  - The tags in the geometry traits that indicate the type of boundary of the
-    embedding surface were replaced by the following new tags:
-             Left_side_category
-             Bottom_side_category
-             Top_side_category
-             Right_side_category
-    It is still possible not to indicate the tags at all. Default values are
-    assumed. This however will produce warning messages, and should be avoided.
-
-
--------------------------------- Release 3.8 --------------------------------
-
-Release date: April 2011
-
-CGAL 3.8 offers the following improvements and new functionality :
-
-
-* General
-
-  - Boost version 1.39 at least is now required.
-
-  - Initial support for the LLVM Clang compiler (prereleases of version 2.9).
-
-  - Full support for the options -strict-ansi of the Intel Compiler 11, and -
-    ansi of the GNU g++ compiler.
-
-  - Adding a concept of ranges. In the following releases, it will be the way
-    to provide a set of objects (vs. a couple of iterators).
-
-  - Fix a memory leak in CORE polynomials.
-
-  - Various fixes in the manual.
-
-
-* 3D Mesh Generation (major new feature added)
-
-  - Adding the possibility to handle sharp features: the 3D Mesh generation
-    package now offers the possibility to get in the final mesh an accurate
-    representation of 1-dimensional sharp features present in the description
-    of the input domain.
-
-
-* 2D Triangulations (major new feature added)
-
-  - Add a way to efficiently insert a range of points with information into a
-    2D Delaunay and regular triangulation.
-
-  - Add member function mirror_edge taking an edge as parameter.
-
-  - Fix an infinite loop in constrained triangulation.
-
-
-* 3D Triangulations (major new feature added)
-
-  - Add a way to efficiently insert a range of points with information into a
-    3D Delaunay and regular triangulation.
-
-  - Add a member function to remove a cluster of points from a Delaunay or
-    regular triangulation.
-
-  - function vertices_in_conflict is renamed vertices_on_conflict_zone_boundary
-    for Delaunay and regular triangulation. Function
-    vertices_inside_conflict_zone is added to regular triangulation.
-
-  - Structural filtering is now internally used in locate function of Delaunay
-    and regular triangulation. It improves average construction time by 20%.
-
-  - Added demo.
-
-
-* 3D Alpha Shapes (major new feature added)
-
-  - The new class Fixed_alpha_shape_3 provides a robust and faster way to
-    compute one alpha shape (with a fixed value of alpha).
-
-
-* AABB tree
-
-  - Adding the possibility to iteratively add primitives to an existing tree
-    and to build it only when no further insertion is needed.
-
-
-* 2D and 3D Kernel
-
-  - Better handling of 2D points with elevation (3D points projected onto
-    trivial planes). More general traits classes (Projection_traits_xy_3,
-    Projection_traits_yz_3,Projection_traits_yz_3) are provided to work with
-    triangulations, algorithms on polygons, alpha-shapes, convex hull
-    algorithm... Usage of former equivalent traits classes in different
-    packages is now deprecated.
-
-  - Exact_predicates_exact_constructions_kernel now better use the static
-    filters which leads to performance improvements.
-
-  - Add an overload for the global function angle, taking three 3D points.
-
-  - In the 2D and 3D kernel concept, the constant Boolean
-    Has_filtered_predicates is now deprecated. It is now required to use
-    Has_filtered_predicates_tag (being either Tag_true or Tag_false).
-
-  - Compare_distance_2 and Compare_distance_3 provide additional operators for
-    3 and 4 elements.
-
-  - Add intersection test and intersection computation capabilities between an
-    object of type Ray_3 and either an object of type Line_3, Segment_3 or
-    Ray_3.
-
-  - Improve intersection test performance between an object of type Bbox_3 and
-    an object of type Plane_3 or Triangle_3 by avoiding arithmetic filter
-    failures.
-
-
-* 2D Envelope
-
-  - Env_default_diagram_1 is deprecated, Envelope_diagram_1 should be used
-    instead.
-
-
-* 3D Envelope
-
-  - A new demo program called L1_Voronoi_diagram_2 has been introduced. It
-    demonstrates how 2D Voronoi diagrams of points under the L1 metric are
-    constructed using lower envelopes.
-
-
-* dD Kernel
-
-  - Add functor Compute_coordinate_d to Kernel_d concept.
-
-
-* Geometric Object Generators
-
-  - CGAL::Random uses boost::rand48 instead of std::rand.
-
-  - Adding to CGAL::Random a way to generate random integers.
-
-  - Adding generators for dD points.
-
-
-* Algebraic Foundations
-
-  - Algebraic_structure_traits now provides an Inverse functor for Fields.
-    There is also a new global function inverse.
-
-
-* Bounding Volumes
-
-  - dD Min sphere of spheres has a new traits class for the min sphere of
-    points.
-
-
-* Triangulated Surface Mesh Simplification
-
-  - The priority queue internally used to prioritize edge simplifications is no
-    longer a relaxed heap but a binomial heap. This fix guarantees that all
-    edges satisfying a simplification criteria are removed (if possible).
-
-
-* 3D Boolean Operations on Nef Polyhedra
-
-  - Allow construction of a 3D nef polyhedron from a 3D polyhedron with
-    normals.
-
-
-* 2D Arrangements
-
-  - Fix a bug in the method insert_at_vertices of the Arrangement_2 class.
-
-  - Fix several bugs in the traits class Arr_Bezier_curve_traits_2 for
-    arrangement of Bezier curves.
-
-
-* 2D Minkowski Sums
-
-  - A bug in the convolution method was fixed.
-
-
--------------------------------- Release 3.7 --------------------------------
-
-Release date: October 2010
-
-CGAL 3.7 offers the following improvements and new functionality :
-
-
-* General
-
-  - The configuration of CGAL libraries now requires CMake>=2.6.
-
-  - Changes in the set of supported platforms:
-
-      - GNU g++ 4.5 supported (with or without the compilation option -
-        std=c++0x).
-
-      - Initial support for the option -strict-ansi of the Intel Compiler 11.
-        The CGAL libraries compile with that option, and most CGAL headers have
-        been fixed. The packages "3D Boolean Operations on Nef Polyhedra"
-        (Nef_3), "Convex Decomposition of Polyhedra" (Convex_decomposition_3),
-        and "3D Minkowski Sum of Polyhedra" (Minkowski_sum_3) are known to
-        still fail to compile with that compiler flag.
-
-      - The Microsoft Windows Visual C++ compiler 2010 (VC10), that was
-        experimentally supported by CGAL-3.6.1, is now fully supported. Note
-        that CMake>=2.8.2 is required for that support.
-
-      - The Microsoft Windows Visual C++ compiler 2005 (VC8) is no longer
-        supported by the CGAL project since CGAL-3.7.
-
-      - With Microsoft Windows Visual C++ (VC9 and VC10), the optional
-        dependencies Gmp, Mpfr, Blas, Lapack, Taucs no longer use Boost-style
-        name mangling. Only one variant is now provided by the CGAL Windows
-        installer (release, with dynamic runtime).
-
-
-  - Some demos now require a version of Qt4 >= 4.3.
-
-  - CGAL_PDB is no longer provided with CGAL. An alternative solution for
-    people interested in reading PDB files is to use ESBTL (http://
-    esbtl.sourceforge.net/).
-
-  - Fix issues of the CGAL wrappers around the CORE library, on 64 bits
-    platforms.
-
-
-* Arithmetic and Algebra
-
-  - New models Algebraic_kernel_d_1 and Algebraic_kernel_d_2 for the
-    corresponding concepts. They provide generic support for various
-    coefficient types
-
-
-* Arrangements
-
-  - A new model Arr_algebraic_segment_traits_2 of ArrangementTraits_2 that
-    supports algebraic curves of arbitrary degree in the plane
-
-
-* 2D Triangulations
-
-  - The Delaunay and regular 2D triangulations now use a symbolic perturbation
-    to choose a particular triangulation in co-circular cases.
-
-  - The return type of the template member function insert(It beg, It end),
-    taking an iterator range of points, has been changed from int to std::
-    ptrdiff_t.
-
-  - Classes Triangulation_euclidean_traits_xy_3,
-    Triangulation_euclidean_traits_yz_3 and Triangulation_euclidean_traits_xz_3
-    are now model of the concept ConstrainedTriangulationTraits_2. They can be
-    used with and without intersection of constraints.
-
-  - 2D Delaunay and basic triangulations now provide vertex relocation by the
-    mean of these two new methods: move and move_if_no_collision. The methods
-    are also available for the hierarchy (Triangulation_hierarchy_2).
-
-
-* 3D Triangulations
-
-  - The return type of the template member function insert(It beg, It end),
-    taking an iterator range of points, has been changed from int to std::
-    ptrdiff_t.
-
-  - 3D Delaunay triangulations now provide vertex relocation by the mean of
-    these two new methods: move and move_if_no_collision. This works in both
-    Compact_policy and Fast_policy.
-
-
-* 2D and 3D Alpha Shapes
-
-  - The type int in the API has been changed to std::size_t so that CGAL can
-    deal with large data sets (64 bit addresses).
-
-
-* 2D Mesh Generation
-
-  - The execution of the 2D mesh generator is now deterministic (same at each
-    run).
-
-
-* 3D Mesh Generation
-
-  - The efficiency of the 3D mesh generator has been improved (the number of
-    calls to the oracle per inserted vertex has globally decrease). This is
-    achieved through a slight change of the mesh generator strategy which
-    implies that a surface component that is not detected at the surface mesher
-    level will never be discovered by chance, owing to the refinement of some
-    tetrahedra, as it could happen before. Please note that defining the macro
-    CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE switches back to the
-    old behavior.
-
-  - A demo program is now available.
-
-
-* Surface Reconstruction from Point Sets
-
-  - Improved performance and minor bug fix.
-
-
-* 2D Range and Neighbor Search
-
-  - The type int in the API has been changed to std::size_t so that CGAL can
-    deal with large data sets (64 bit addresses).
-
-
--------------------------------- Release 3.6.1 --------------------------------
-
-Release date: June 2010
-
-This is a bug fix release. The following has been changed since CGAL-3.6:
-
-
-* General
-
-  - Fix compilation errors with recent Boost versions (since 1.40).
-
-  - Initial support for the Microsoft Visual C++ compiler 10.0 (MSVC 2010). For
-    that support, CMake>=2.8.2 is required. Note also that the compiler option
-    "/bigobj" is necessary to compile some CGAL programs with MSVC 2010.
-
-
-* Polynomial
-
-  - Fix compilation errors with the Microsoft Visual C++ compiler and the Intel
-    C++ compiler.
-
-
-* Polyhedron
-
-  - Fix a compilation errors in demo/Polyhedron/:
-
-  - issue with the location of qglobal.h of Qt4 on MacOS X,
-
-  - missing texture.cpp, if TAUCS is used,
-
-  - Fix the location of built plugins of demo/Polyhedron/, when CGAL is
-    configured with WITH_demos=ON
-
-
-* 3D Periodic Triangulations
-
-  - Fixed bug in the triangulation hierarchy for periodic triangulations.
-
-
-* 2D Mesh Generation
-
-  - Fix a bug that lead to precondition violation.
-
-  - Improve the user manual about the member function is_in_domain() of the
-    Face type.
-
-  - The 2D meshing process is now deterministic (sorting of bad faces no longer
-    relies on pointers comparisons).
-
-
-* 3D Mesh Generation
-
-  - Fix a linking errors (duplicate symbols) when <CGAL/refine_mesh_3.h> is
-    included in different compilation units.
-
-
-* Spatial Searching
-
-  - Fix a bug in <CGAL/Orthogonal_k_neighbor_search.h> when several nearest
-    neighbors are at the same distance from the query point.
-
-
-* IO Streams
-
-  - Fix a bug in <CGAL/IO/VRML_2_ostream.h> that generated VRML 2 files with an
-    invalid syntax for IndexedFaceSet nodes.
-
-
-* Triangulation_2
-
-  - Add missing Compare_distance_2 functor in trait classes
-    Triangulation_euclidean_traits_xy_3 Triangulation_euclidean_traits_yz_3 and
-    Triangulation_euclidean_traits_xz_3. This was preventing calling member
-    function nearest_vertex of Delaunay_triangulation_2 instantiated with one
-    of these traits.
-
-
--------------------------------- Release 3.6 --------------------------------
-
-Release date: March 2010
-
-CGAL 3.6 offers the following improvements and new functionality :
-
-
-* General
-
-  - Boost version 1.34.1 at least is now required.
-
-
-* Arithmetic and Algebra
-
- ** Algebraic Kernel (new package)
-
-  - This new package is targeted to provide black-box implementations of state-
-    of-the-art algorithms to determine, compare and approximate real roots of
-    univariate polynomials and bivariate polynomial systems. It includes models
-    of the univariate algebraic kernel concept, based on the library RS.
-
-
- ** Number Types
-
-  - Two new arbitrary fixed-precision floating-point number types have been
-    added: the scalar type Gmpfr and the interval type Gmpfi, based on the MPFR
-    and MPFI libraries respectively.
-
-
-* Geometry Kernels
-
- ** 2D and 3D Geometry Kernel
-
-  - Add new do_intersect() and intersection() overloads:
-
-      - do_intersect(Bbox_3, Bbox_3/Line_3/Ray_3/Segment_3)
-
-      - intersection(Triangle_3, Line_3/Ray_3/Segment_3)
-
-
-
-* Polygons
-
- ** 2D Regularized Boolean Set-Operations
-
-  - Fixed General_polygon_set_2::arrangement() to return the proper type of
-    object.
-
-
-* Arrangement
-
- ** 2D Arrangements
-
-  - Fixed passing a (const) traits object to the constructor of Arrangement_2.
-
-  - Introduced Arrangement_2::fictitious_face(), which returns the fictitious
-    face in case of an unbounded arrangement.
-
-  - Fixed a bug in Bezier-curve handling.
-
-  - Added (back) iterator, number_of_holes(), holes_begin(), and holes_end() to
-    the default DCEL for backward compatibility.
-
-  - Added (simple) versions of the free overlay() function. It employs the
-    default overlay-traits, which practically does nothing.
-
-
-* Polyhedron
-
-  - Fix a compilation errors in demo/Polyhedron/:
-
-      - issue with the location of qglobal.h of Qt4 on MacOS X,
-
-      - missing texture.cpp, if TAUCS is used,
-
-
-  - Fix the location of built plugins of demo/Polyhedron/, when CGAL is
-    configured with WITH_demos=ON
-
-  - Fix a bug in test_facet function of the incremental builder: the function
-    did not test if while a new facet makes a vertex manifold, no other facet
-    incident to that vertex breaks the manifold property.
-
-
-* Triangulations and Delaunay Triangulations
-
- ** 2D/3D Regular Triangulations
-
-  - Weighted_point now has a constructor from Cartesian coordinates.
-
-
- ** 3D Triangulations
-
-  - Regular_triangulation_3 : semi-static floating-point filters are now used
-    in its predicates, which can speed up its construction by a factor of about
-    3 when Exact_predicates_inexact_constructions_kernel is used.
-
-  - The class Regular_triangulation_filtered_traits_3 is deprecated, the class
-    Regular_triangulation_euclidean_traits_3 must be used instead. The
-    predicates of that traits will be filtered if the kernel given as template
-    parameter of that traits is itself a filtered kernel.
-
-  - Triangulation_hierarchy_3 is now deprecated, and replaced by a simpler
-    CGAL::Fast_location policy template parameter of Delaunay_triangulation_3.
-
-  - The old version of remove() (enabled with CGAL_DELAUNAY_3_OLD_REMOVE) has
-    been deleted.
-
-
- ** 3D Periodic Triangulations
-
-  - New demo: 3D periodic Lloyd algorithm.
-
-  - New functionality for Voronoi diagrams: dual of an edge and of a vertex,
-    volume and centroid of the dual of a vertex.
-
-  - The package can now be used with the 3D Alpha Shapes package to compute
-    periodic alpha shapes.
-
-
- ** 3D Alpha shapes
-
-  - The class Weighted_alpha_shape_euclidean_traits_3 is deprecated, the class
-    Regular_triangulation_euclidean_traits_3 must be used instead.
-
-  - The package can now be used together with the 3D Periodic Triangulation
-    package to compute periodic alpha shapes.
-
-
- ** 2D/3D Triangulations, 2D Segment Delaunay Graph, 2D Apollonius Graph, and
-3D Periodic Triangulations
-
-  - The constructor and insert function taking ranges now produce structures
-    whose iterator orders is now deterministic (same at each run).
-
-
-* Mesh Generation
-
- ** 2D Mesh Generation
-
-  - The 2D mesh generator can now be used with a constrained Delaunay
-    triangulation with constraints hierarchy
-    (Constrained_triangulation_plus_2).
-
-  - In some cases (refinement of a constrained edge that is on the convex
-    hull), the 2D mesh generator from CGAL-3.4 and CGAL-3.5 could create
-    invalid triangulations. This bug is now fixed.
-
-
- ** 3D Mesh Generation
-
-  - The mesh generator has been enriched with an optimization phase to provide
-    3D meshes with well shaped tetrahedra (and in particular no slivers). The
-    optimization phase involves four different optimization processes: two
-    global optimization processes (ODT and Lloyd), a perturber and an exuder.
-    Each of these processes can be activated or not, and tuned to the users
-    needs and to available computer resources.
-
-
-* Support library
-
- ** CGAL ipelets
-
-  - Add support for version 7 of Ipe.
-
-
--------------------------------- Release 3.5.1 --------------------------------
-
-Release date: December 2009
-
-This is a bug fix release.
-
-
-* Documentation
-
-  - Fixes in the documentation (the online documentation of CGAL-3.5 is now
-    based on CGAL-3.5.1).
-
-  - Fixes to the bibliographic references.
-
-
-* Windows installer
-
-  - The Windows installer of CGAL-3.5.1 fixes an issue with downloading of
-    precompiled binaries of the external library TAUCS.
-
-
-* Bug fixes in the following CGAL packages
-
- ** AABB tree
-
-  - Fix a linker issue in do_intersect(Bbox_3,Bbox_3).
-
-  - Fix compilation issue in do_intersect(Bbox_3,Ray_3) when using the
-    parameters in this order.
-
-
- ** 3D Mesh Generation
-
-  - Fix a bug in initial points construction of a polyhedral surface.
-
-
--------------------------------- Release 3.5 --------------------------------
-
-Release date: October 2009
-
-CGAL releases will now be published about every six months. As a transition
-release, CGAL-3.5 has been developed during 9 months from the release CGAL-3.4.
-
-Version 3.5 differs from version 3.4 in the platforms that are supported and in
-functionality. There have also been a number of bug fixes for this release.
-
-
-* General
-
-  - Additional supported platforms:
-
-      - GNU g++ 4.4 supported.
-
-      - Intel Compiler 11 supported on Linux
-
-
-  - Fixed ABI incompatibilities when mixing CGAL and Boost Program Options on
-    Windows/Visual C++ (the compilation flag -D_SECURE_SCL=0 is not longer use
-    in Debug mode).
-
-
-* Geometry Kernels
-
- ** 3D Spherical Geometry Kernel
-
-  - Add functionalities to manipulate circles, circular arcs and points that
-    belong to the same sphere.
-
-
-* Polygons
-
- ** 2D Regularized Boolean Set-Operations
-
-  - The polygon validation operations were enhanced and their interface was
-    improved. They are now offered as free functions and applied properly.
-
-
- ** 2D Straight Skeleton and Polygon Offsetting
-
-  - Updated the manual to document the new partial skeletons feature (already
-    in the code since 3.4)
-
-
-* Arrangements
-
- ** 2D Arrangements
-
-  - The member function is_at_infinity() of Arrangement_2::Vertex was replaced
-    by the new function is_at_open_boundary(). The former is deprecated. While
-    still supported in version 3.5, It will not be supported in future
-    releases. The member functions boundary_type_in_x() and boundary_type_in_y
-    () were permanently replaced by the functions parameter_space_in_x() and
-    parameter_space_in_y(), respectively. The 2 new functions return an
-    enumeration of a new type, namely Arr_parameter_space.
-
-  - The tags in the geometry traits that indicate the type of boundary of the
-    embedding surface were replaced by the following new tags:
-    Arr_left_side_tag Arr_bottom_side_tag Arr_top_side_tag Arr_right_side_tag
-    In addition, the code was change, and now it is possible not to indicate
-    the tags at all. Default values are assumed. This however will produce
-    warning messages, and should be avoided.
-
-  - All operations of the geometry traits-class were made 'const'. This change
-    was reflected in the code of this package and all other packages that are
-    based on it. Traits classes that maintain state, should declare the data
-    members that store the state as mutable.
-
-
- ** Envelopes of Surfaces in 3D
-
-  - A few bugs in the code that computes envelopes were fixed, in particular in
-    the code that computes the envelopes of planes.
-
-
-* Triangulations and Delaunay Triangulations
-
- ** 3D Periodic Triangulations (new package)
-
-  - This package allows to build and handle triangulations of point sets in the
-    three dimensional flat torus. Triangulations are built incrementally and
-    can be modified by insertion or removal of vertices. They offer point
-    location facilities.
-
-
-* Mesh Generation
-
- ** Surface Reconstruction from Point Sets (new package)
-
-  - This CGAL package implements an implicit surface reconstruction method:
-    Poisson Surface Reconstruction. The input is an unorganized point set with
-    oriented normals.
-
-
- ** 3D Mesh Generation (new package)
-
-  - This package generates 3 dimensional meshes. It computes isotropic
-    simplicial meshes for domains or multidomains provided that a domain
-    descriptor, able to answer queries from a few different types on the
-    domain, is given. In the current version, Mesh_3 generate meshes for domain
-    described through implicit functional, 3D images or polyhedral boundaries.
-    The output is a 3D mesh of the domain volume and conformal surface meshes
-    for all the boundary and subdividing surfaces.
-
-
-* Geometry Processing
-
- ** Triangulated Surface Mesh Simplification
-
-  - BREAKING API change in the passing of the visitor object.
-
-  - Fixed a bug in the link_condition test
-
-  - Added a geometric test to avoid folding of facets
-
-  - Fixed a bug in the handling of overflow in the LindstromTurk computations
-
-  - Updated the manual to account for the new visitor interface
-
-
- ** Point Set Processing (new package)
-
-  - This packages implements a set of algorithms for analysis, processing, and
-    normal estimation and orientation of point sets.
-
-
-* Spatial Searching and Sorting
-
- ** AABB tree (new package)
-
-  - This package implements a hierarchy of axis-aligned bounding boxes (a AABB
-    tree) for efficient intersection and distance computations between 3D
-    queries and sets of input 3D geometric objects.
-
-
-* Support Library
-
- ** CGAL_ipelets (new package):
-
-  - Object that eases the writing of Ipe's plugins that use CGAL. Plugins for
-    CGAL main 2D algorithm are provided as demo.
-
-
--------------------------------- Release 3.4 --------------------------------
-
-Release date: January 2009
-
-Version 3.4 differs from version 3.3.1 in the platforms that are supported and
-in functionality. There have also been a number of bug fixes for this release.
-
-
-* General
-
-  - GNU g++ 4.3 supported. Support for g++ 3.3 is dropped.
-
-  - Visual 9 supported. Support for Visual 7 is dropped.
-
-  - Boost version 1.33 at least is now required.
-
-  - CGAL now depends on Boost.Threads, which implies to link against a compiled
-    part of Boost.
-
-  - The new macro CGAL_NO_DEPRECATED_CODE can be defined to disable deprecated
-    code, helping users discover if they rely on code that may be removed in
-    subsequent releases.
-
-  - Assertion behaviour: It is not possible anymore to set the CONTINUE mode
-    for assertion failures. Functions that allow to change the assertion
-    behaviour are now declared in <CGAL/assertions_behaviour.h>.
-
-  - Qt3 based demos are still there but the documentation has been removed as
-    the CGAL::Qt_Widget will be deprecated.
-
-  - Qt4 based demos use the Qt GraphicsView framework and the libQGLViewer.
-
-
-* Installation
-
-  - install_cgal has been replaced by CMake.
-
-
-* Polynomial (new package)
-
-  - This package introduces a concept Polynomial_d, a concept for multivariate
-    polynomials in d variables.
-
-
-* Modular Arithmetic (new package)
-
-  - This package provides arithmetic over finite fields.
-
-
-* Number Types
-
-  - the counter Interval_nt::number_of_failures() has been removed, replaced by
-    a profiling counter enabled with CGAL_PROFILE.
-
-  - Fix of a bug in CORE/Expr.h; as a consequence, the arrangement demo works
-    properly when handling arrangements of conics, for example, when defining
-    an arc with 5 points.
-
-
-* 3D Spherical Geometry Kernel (new package)
-
-  - This package is an extension of the linear CGAL Kernel. It offers
-    functionalities on spheres, circles, circular arcs and line segments in the
-    3D space.
-
-
-* Linear Kernel
-
-  - We recommend that you use the object_cast() function instead of assign() to
-    extract an object from a CGAL::Object, for efficiency reasons.
-
-  - The Kernel archetypes provided by the 2D/3D linear kernel have been
-    removed.
-
-  - The deprecated linear kernel functors Construct_supporting_line_2 and
-    Construct_supporting_line_3 have been removed.
-
-  - Ambiant_dimension and Feature_dimenison have been added to retrieve the
-    potentially compile-time dimension of a space or of an object.
-
-  - barycenter() functions have been added.
-
-  - The geometric object Circle_3 as well as predicates and constructions have
-    been added to the kernel
-
-  - The missing intersection/do_intersect between Line_3 and Line_3 has been
-    added as well.
-
-
-* 3D Triangulations
-
-  - Removed the deprecated functions Cell:mirror_index() and Cell::
-    mirror_vertex().
-
-  - Derecursification of two functions that in some cases lead to stack
-    overflows
-
-
-* 3D Nef Polyhedron
-
-  - n-ary union/intersection
-
-  - intersection with halfspace under standard kernel
-
-  - constructor for polylines
-
-
-* CGAL and the Qt4 GraphicsView (new package)
-
-  - 2D CGAL Kernel objects and many data structures have can be rendered in a
-    QGraphicsView
-
-
-* STL Extensions:
-
-  - The functor adaptors for argument binding and composition (bind_*, compose,
-    compose_shared, swap_*, negate, along with the helper functions set_arity_*
-    and Arity class and Arity_tag typedefs) which were provided by <CGAL/
-    functional.h> have been removed. Please use the better boost::bind mecanism
-    instead. The concept AdaptableFunctor has been changed accordingly such
-    that only a nested result_type is required.
-
-  - The accessory classes Twotuple, Threetuple, Fourtuple and Sixtuple are also
-    deprecated (use CGAL::array instead).
-
-  - CGAL::Triple and CGAL::Quadruple are in the process of being replaced by
-    boost::tuple. As a first step, we strongly recommend that you replace the
-    direct access to the data members (.first, .second, .third, .fourth), by
-    the get<i>() member function; and replace the make_triple and
-    make_quadruple maker functions by make_tuple.
-    This way, in a further release, we will be able to switch to boost::tuple
-    more easily.
-
-  - The class CGAL::Uncertain<> has been documented. It is typically used to
-    report uncertain results for predicates using interval arithmetic, and
-    other filtering techniques.
-
-
-* 2D Arrangements
-
-  - Changed the name of the arrangement package from Arrangement_2 to
-    Arrangement_on_surface_2 to reflect the potential capabilities of the
-    package to construct and maintain arrangements induced by curves embedded
-    on two dimensional surfaces in three space. Most of these capabilities will
-    become available only in future releases though.
-
-  - Enhanced the geometry traits concept to handle arrangements embedded on
-    surfaces. Each geometry-traits class must now define the
-    'Boundary_category' tag.
-
-  - Fixed a bug in Arr_polyline_traits_2.h, where the operator that compares
-    two curves failed to evaluate the correct result (true) when the curves are
-    different, but their graphs are identical.
-
-  - Permanently removed IO/Arr_postscript_file_stream.h and IO/
-    Polyline_2_postscript_file_stream.h, as they depend on obsolete features
-    and LEDA.
-
-  - Fixed several bugs in the arrangement demo and enhanced it. e.g., fixed
-    background color change, allowed vertex coloring , enabled "smart" color
-    selection, etc.
-
-  - Enhanced the arrangement demo with new features, such as allowing the
-    abortion of the merge function (de-select), updated the how-to description,
-    etc.
-
-  - Replace the functions CGAL::insert_curve(), CGAL::insert_curves(), CGAL::
-    insert_x_monotone_curve(), and CGAL::insert_x_monotone_curves() with a
-    single overloaded function CGAL::insert(). The former 4 functions are now
-    deprecated, and may no longer be supported in future releases.
-
-
-* Envelopes of Surfaces in 3D
-
-  - Fixed a bug in the computation of the envelope of unbounded planes caused
-    by multiple removals of vertices at infinity.
-
-
-* 2D Regularized Boolean Set-Operations
-
-  - Fixed a bug in connect_holes() that caused failures when connecting holes
-    touching the outer boundary.
-
-  - Fixed the concept GeneralPolygonSetTraits_2. Introduced two new concepts
-    GpsTraitsGeneralPolygon_2 and GpsTraitsGeneralPolygonWithHoles_2. Fixed the
-    definition of the two nested required types Polygon_2 and
-    Polygon_with_holes_2 of the GeneralPolygonSetTraits_2 concept. They must
-    model now the two new concepts above.
-
-  - Added a default template parameter to 'General_polygon_set_2' to allow
-    users to pass their specialized DCEL used to instantiate the underlying
-    arrangement.
-
-  - Enhanced the BOP demo to use multiple windows.
-
-
-* 2D Minkowski Sums
-
-  - Fixed a few bugs in the approximate offset function, making it robust to
-    highly degenerate inputs.
-
-  - Fixed a bug in the exact Minkowski sum computation when processing
-    degenerate inputs that induce overlapping of contiguous segments in the
-    convolution cycles.
-
-  - Optimized the approximate offset function (reduced time consumption up to a
-    factor of 2 in some cases).
-
-  - Added functionality to compute the offset (or to approximate the offset) of
-    a Polygon_with_holes_2 (and not just of a Polygon_2).
-
-  - Added the functionality to compute (or to approximate) the inner offset of
-    a polygon.
-
-
--------------------------------- Release 3.3.1 --------------------------------
-
-Release date: August 2007
-
-This is a bug fix release.
-
-
-* General
-
-  - Intel C++ 9 was wrongly recognized as unsupported by install_cgal.
-
-  - Added autolink (for Visual C++) for the CGALImageIO and CGALPDB libraries.
-
-  - Fixed bug in Memory_sizer when using more than 4GB of memory (64bit).
-
-
-* Number Types
-
-  - Fixed bug in FPU rounding mode macros (affected only the alpha
-    architecture).
-
-  - Fixed bug in MP_Float constructor from double for some particular values.
-
-  - Fixed bug in to_double(Lazy_exact_nt) sometimes returning NaN.
-
-
-* Kernel
-
-  - Fixed forgotten derivation in Circular_kernel_2::Has_on_2
-
-  - Added some missing functions in Bbox_3 compared to Bbox_2.
-
-
-* Skin Surface Meshing
-
-  - The new Skin Surface Meshing package had been forgotten in the list of
-    changes and the release announcement of CGAL 3.3: This package allows to
-    build a triangular mesh of a skin surface. Skin surfaces are used for
-    modeling large molecules in biological computing.
-
-
-* Arrangements
-
-  - Fixed a bug in the Arrangement_2 package in dual arrangement representation
-    for Boost graphs when reporting all halfedges of a face.
-
-  - Fixed a bug in the Arrangement sweep-line when using a specific polyline
-    configuration.
-
-  - Fixed bug in Arrangement_2 in walk along a line point location for
-    unbounded curves.
-
-  - Fixed bug in aggregated insertion to Arrangement_2.
-
-  - Fixed bug in Arrangment_2 class when inserting an unbounded curve from an
-    existing vertex.
-
-  - Fixed bug when dealing with a degenerate conic arc in Arr_conic_traits_2 of
-    the Arrangment package, meaning a line segment which is part of a
-    degenerate parabola/hyperbola.
-
-  - Fixed bug in the Bezier traits-class: properly handle line segments.
-    properly handle comparison near a vertical tangency.
-
-
-* 2D Polygon
-
-  - Fixed bug in degenerate case of Polygon_2::is_convex() for equal points.
-
-
-* 2D Triangulations
-
-  - Fixed bug in Regular_triangulation_2.
-
-
-* 3D Triangulations
-
-  - Added a circumcenter() function in the default Cell type parameter
-    Triangulation_ds_cell_base_3, so that the .dual() member function of
-    Delaunay still work as before, without requiring the explicit use of
-    Triangulation_cell_base.
-
-  - Added missing operator->() to Facet_circulator.
-
-
-* Interpolation
-
-  - Fixed bug in Interpolation 3D about the normalization coefficient
-    initialization.
-
-
-* 3D Boolean Operations on Nef Polyhedra
-
-  - Fixed bug in construction of Nef_polyhedron_3 from off-file. Now, always
-    the inner volume is selected.
-
-  - Fixed bug in conversion from Nef_polyhedron_3 to Polyhedron_3. Polyhedron_3
-    was not cleared at the beginning.
-
-  - Fixed bug in Nef_polyhedron_3 in update of indexes for construction of
-    external structure.
-
-
-* Third Party Libraries Shipped with CGAL
-
-  - TAUCS supports now 64 bits platforms.
-
-  - CAUTION: Since version 3.3.1, CGAL is no longer compatible with the
-    official release of TAUCS (currently 2.2). Make sure to use the version
-    modified by the CGAL project and available from the download section of
-    http://www.cgal.org.
-
-
--------------------------------- Release 3.3 --------------------------------
-
-Release date: May 2007
-
-Version 3.3 differs from version 3.2.1 in the platforms that are supported and
-in functionality. There have also been a number of bug fixes for this release.
-
-Additional supported platforms
-
-  - GNU g++ 4.1 and 4.2
-
-  - Intel C++ compiler 9
-
-  - Microsoft Visual C++ compiler 8.0
-
-
-The following platforms are no longer supported:
-
-  - Intel 8
-
-
-CGAL now supports Visual C++ "Checked iterators" as well as the debug mode of
-GNU g++'s STL (-D_GLIBCXX_DEBUG).
-
-CGAL now works around the preprocessor macros 'min' and 'max' defined in
-<windows.h> which were clashing with min/max functions.
-
-
-* Installation
-
-  - On Windows the libraries built in Developer Studio now have names which
-    encode the compiler version, the runtime and whether it was built in
-    release or debug mode. The libraries to link against are chosen with linker
-    pragmas in header files.
-
-  - On all platforms but Windows shared and static versions of the libraries
-    are generated
-
-
-* Manuals
-
-  - The Package Overview page now also hosts the precompiled demos.
-
-
-* Algebraic Foundations
-
-  - Algebraic Foundations (new package)
-    This package defines what algebra means for CGAL, in terms of concepts,
-    classes and functions. The main features are: (i) explicit concepts for
-    interoperability of types (ii) separation between algebraic types (not
-    necessarily embeddable into the reals), and number types (embeddable into
-    the reals).
-
-  - Number Types
-    Fixed_precision_nt and Filtered_exact number types have been removed.
-
-
-
-* Kernels
-
-  - 2D Circular Kernel
-    Efficiency improved through geometric filtering of predicates, introduced
-    with the filtered kernel Filtered_bbox_circular_kernel_2<.>, and also
-    chosen for the predefined kernel Exact_circular_kernel_2.
-
-  - Linear Kernel
-    Exact_predicates_exact_constructions_kernel memory and run-time
-    improvements through usage of lazy geometric constructions instead of lazy
-    arithmetic.
-
-
-
-* Data Structures and Algorithms
-
-  - Surface Mesh Simplification (new package)
-    This package provides a mesh simplification framework using edge collapse
-    operations, and provides the Turk/Lindstrom simplification algorithm.
-
-  - Skin Surface Meshing (new package)
-    This package allows to build a triangular mesh of a skin surface. Skin
-    surfaces are used for modeling large molecules in biological computing. The
-    surface is defined by a set of balls, representing the atoms of the
-    molecule, and a shrink factor that determines the size of the smooth
-    patches gluing the balls together.
-
-  - Estimation of Local Differential Properties (new package)
-    This package allows to compute local differential quantities of a surface
-    from a point sample
-
-  - Approximation of Ridges and Umbilics on Triangulated Surface Meshes (new
-    package)
-    This package enables the approximation of differential features on
-    triangulated surface meshes. Such curvature related features are lines:
-    ridges or crests, and points: umbilics.
-
-  - Envelopes of Curves in 2D (new package)
-    This package contains two sets of functions that construct the lower and
-    upper envelope diagram for a given range of bounded or unbounded curves.
-
-  - Envelopes of Surfaces in 3D (new package)
-    This package contains two sets of functions that construct the lower and
-    upper envelope diagram for a given range of bounded or unbounded surfaces.
-    The envelope diagram is realized as a 2D arrangement.
-
-  - Minkowski Sums in 2D (new package)
-    This package contains functions for computing planar Minkowski sums of two
-    closed polygons, and for a polygon and a disc (an operation also known as
-    offsetting or dilating a polygon). The package also contains an efficient
-    approximation algorithm for the offset computation, which provides a
-    guaranteed approximation bound while significantly expediting the running
-    times w.r.t. the exact computation procedure.
-
-  - Surface Mesh Parametrization
-    Added Jacobi and SSOR preconditioners to OpenNL solver, which makes it much
-    faster and more stable.
-
-  - 2D Arrangements
-
-      - Added support for unbounded curves.
-
-      - Added a traits class that supports bounded and unbounded linear
-        objects, namely lines, rays and line segments.
-
-      - Added traits classes that handle circular arcs based on the circular
-        kernel.
-
-      - Added a traits class that supports Bezier curves.
-
-      - Enhanced the traits class that supports rational functions to handle
-        unbounded (as well as bounded) arcs
-
-      - Added a free function called decompose() that produces the symbolic
-        vertical decomposition of a given arrangement, performing a batched
-        vertical ray-shooting query from all arrangement vertices.
-
-      - Fixed a memory leak in the sweep-line code.
-
-      - Fixed a bug in computing the minor axis of non-degenerate hyperbolas.
-
-
-  - Boolean Set Operations
-
-      - Added the DCEL as a default template parameter to the
-        General_polygon_set_2 and Polygon_set_2 classes. This allows users to
-        extend the DCEL of the underlying arrangement.
-
-      - Added a function template called connect_holes() that connects the
-        holes in a given polygon with holes, turning it into a sequence of
-        points, where the holes are connceted to the outer boundary using zero-
-        width passages.
-
-      - Added a non-const function member to General_polygon_set_2 that obtains
-        the underlying arrangement.
-
-
-  - 2D and 3D Triangulations
-
-      - The constructors and insert member functions which take an iterator
-        range perform spatial sorting in order to speed up the insertion.
-
-
-  - Optimal Distances
-
-      - Polytope_distance_d: has support for homogeneous points; bugfix in fast
-        exact version.
-
-
-  - Bounding Volumes
-
-      - Min_annulus_d has support for homogeneous points; bugfix in fast exact
-        version.
-
-
-
-
-* Support Library
-
-  - CGAL and the Boost Graph Library (BGL) (new package)
-    This package provides the glue layer for several CGAL data structures such
-    that they become models of the BGL graph concept.
-
-  - Spatial Sorting (new package)
-    This package allows to sort points and other objects along a Hilbert curve
-    which can improve the performance of algorithms like triangulations. It is
-    used by the constructors of the triangulation package which have an
-    iterator range of points as argument.
-
-  - Linear and Quadratic Programming Solver (new package)
-    This package contains algorithms for minimizing linear and convex quadratic
-    functions over polyhedral domains, described by linear equations and
-    inequalities.
-
-
--------------------------------- Release 3.2.1 --------------------------------
-
-Release date: July 2006
-
-This is a bug fix release
-
-
-* Number Types
-
-  - Fix MP_Float constructor which crashed for some values.
-
-
-* Kernel
-
-  - Rename Bool to avoid a clash with a macro in X11 headers.
-
-
-* Arrangement
-
-  - Derived the Arr_segment_traits_2 Arrangement_2 traits class from the
-    parameterized Kernel. This allows the use of this traits class in an
-    extended range of applications that require kernel objects and operations
-    on these objects beyond the ones required by the Arrangement_2 class
-    itself.
-
-  - Fixed a compilation bug in the code that handles overlay of arrangements
-    instantiated with different DCEL classes.
-
-  - Fixed a couple of bugs in the implementation of the Trapezoidal RIC point-
-    location strategy
-
-
-* Triangulation, Alpha Shapes
-
-  - Qualify calls to filter_iterator with "CGAL::" to avoid overload
-    ambiguities with Boost's filter_iterator.
-
-
-* Surface Mesher
-
-  - Fixed a bug in iterators of the class template
-    Surface_mesh_complex_2_in_triangulation_3
-
-
-* Surface Mesh Parametrisation
-
-  - Updated the precompiled taucs lib
-
-
-* Kinetic Data Structures
-
-  - Fixed problems caused by old versions of gcc being confused by operator!
-    and operator int()
-
-  - Added point removal support to the Active_objects_vector
-
-
--------------------------------- Release 3.2 --------------------------------
-
-Release date: May 2006
-
-Version 3.2 differs from version 3.1 in the platforms that are supported and in
-functionality. There have also been a number of bug fixes for this release.
-
-The following platforms are no longer supported:
-
-  - SunPro CC versions 5.4 and 5.5 on Solaris
-
-  - SGI Mips Pro
-
-
-For Visual C++ the installation scripts choose the multi-threaded dynamically
-linked runtime (/MD). Before it was the single-threaded static runtime (/ML).
-
-
-* Installation
-
-  - The install tool tries to find third party libraries at "standard"
-    locations.
-
-  - Installers for Apple, Windows, and rpms.
-
-
-* Manuals
-
-  - User and Reference manual pages of a package are in the same chapter
-
-
-* Kernels
-
-  - 2D Circular Kernel (new package)
-    This package is an extension of the linear CGAL Kernel. It offers
-    functionalities on circles, circular arcs and line segments in the plane.
-
-
-
-* Data Structures and Algorithms
-
-  - 2D Regularized Boolean Set-Operations (new package)
-    This package consists of the implementation of Boolean set-operations on
-    point sets bounded by weakly x-monotone curves in 2-dimensional Euclidean
-    space. In particular, it contains the implementation of regularized Boolean
-    set-operations, intersection predicates, and point containment predicates.
-
-  - 2D Straight Skeleton and Polygon Offsetting (new package)
-    This package implements an algorithm to construct a halfedge data structure
-    representing the straight skeleton in the interior of 2D polygons with
-    holes and an algorithm to construct inward offset polygons at any offset
-    distance given a straight skeleton.
-
-  - 2D Voronoi Diagram Adaptor (new package)
-    This package provides an adaptor that adapts a 2-dimensional triangulated
-    Delaunay graph to the corresponding Voronoi diagram, represented as a
-    doubly connected edge list (DCEL) data structure. The adaptor has the
-    ability to automatically eliminate, in a consistent manner, degenerate
-    features of the Voronoi diagram, that are artifacts of the requirement that
-    Delaunay graphs should be triangulated even in degenerate configurations.
-    Depending on the type of operations that the underlying Delaunay graph
-    supports, the adaptor allows for the incremental or dynamic construction of
-    Voronoi diagrams and can support point location queries.
-
-  - 3D Surface Mesher (new package)
-    This package provides functions to generate surface meshes that interpolate
-    smooth surfaces. The meshing algorithm is based on Delaunay refinement and
-    provides some guarantees on the resulting mesh: the user is able to control
-    the size and shape of the mesh elements and the accuracy of the surface
-    approximation. There is no restriction on the topology and number of
-    components of input surfaces. The surface mesher may also be used for non
-    smooth surfaces but without guarantee.
-    Currently, implementations are provided for implicit surfaces described as
-    the zero level set of some function and surfaces described as a gray level
-    set in a three-dimensional image.
-
-
-  - 3D Surface Subdivision Methods (new package)
-    Subdivision methods recursively refine a control mesh and generate points
-    approximating the limit surface. This package consists of four popular
-    subdivision methods and their refinement hosts. Supported subdivision
-    methods include Catmull-Clark, Loop, Doo-Sabin and sqrt(3) subdivisions.
-    Their respective refinement hosts are PQQ, PTQ, DQQ and sqrt(3)
-    refinements. Variations of those methods can be easily extended by
-    substituting the geometry computation of the refinement host.
-
-  - Planar Parameterization of Triangulated Surface Meshes (new package)
-    Parameterizing a surface amounts to finding a one-to-one mapping from a
-    suitable domain to the surface. In this package, we focus on triangulated
-    surfaces that are homeomorphic to a disk and on piecewise linear mappings
-    into a planar domain. This package implements some of the state-of-the-art
-    surface mesh parameterization methods, such as least squares conformal
-    maps, discrete conformal map, discrete authalic parameterization, Floater
-    mean value coordinates or Tutte barycentric mapping.
-
-  - Principal Component Analysis (new package)
-    This package provides functions to compute global informations on the shape
-    of a set of 2D or 3D objects such as points. It provides the computation of
-    axis-aligned bounding boxes, centroids of point sets, barycenters of
-    weighted point sets, as well as linear least squares fitting for point sets
-    in 2D, and point sets as well as triangle sets in 3D.
-
-  - 2D Placement of Streamlines (new package)
-    Visualizing vector fields is important for many application domains. A good
-    way to do it is to generate streamlines that describe the flow behaviour.
-    This package implements the "Farthest Point Seeding" algorithm for placing
-    streamlines in 2D vector fields. It generates a list of streamlines
-    corresponding to an input flow using a specified separating distance. The
-    algorithm uses a Delaunay triangulation to model objects and adress
-    different queries, and relies on choosing the centers of the biggest empty
-    circles to start the integration of the streamlines.
-
-  - Kinetic Data Structures (new package)
-    Kinetic data structures allow combinatorial structures to be maintained as
-    the primitives move. The package provides implementations of kinetic data
-    structures for Delaunay triangulations in two and three dimensions, sorting
-    of points in one dimension and regular triangulations in three dimensions.
-    The package supports exact or inexact operations on primitives which move
-    along polynomial trajectories.
-
-  - Kinetic Framework (new package)
-    Kinetic data structures allow combinatorial geometric structures to be
-    maintained as the primitives move. The package provides a framework to ease
-    implementing and debugging kinetic data structures. The package supports
-    exact or inexact operations on primitives which move along polynomial
-    trajectories.
-
-  - Smallest Enclosing Ellipsoid (new package)
-    This algorithm is new in the chapter Geometric Optimisation.
-
-  - 2D Arrangement (major revision)
-    This package can be used to construct, maintain, alter, and display
-    arrangements in the plane. Once an arrangement is constructed, the package
-    can be used to obtain results of various queries on the arrangement, such
-    as point location. The package also includes generic implementations of two
-    algorithmic frameworks, that are, computing the zone of an arrangement, and
-    line-sweeping the plane, the arrangements is embedded on.
-    Arrangements and arrangement components can also be extended to store
-    additional data. An important extension stores the construction history of
-    the arrangement, such that it is possible to obtain the originating curve
-    of an arrangement subcurve.
-
-
-  - Geometric Optimisation (major revision)
-    The underlying QP solver which is the foundation for several algorithms in
-    the Geometric Optimisation chapter has been completely rewritten.
-
-  - 3D Triangulation (new functionality)
-    Regular_triangulation_3 now offers vertex removal.
-
-
-
--------------------------------- Release 3.1 --------------------------------
-
-Release date: December 2004
-
-Version 3.1 differs from version 3.0 in the platforms that are supported and in
-functionality. There have also been a number of bug fixes for this release.
-
-Additional supported platforms:
-
-  - MS Visual C++, version 7.3. and 8.0
-
-  - Intel 8.0
-
-  - SunPro CC versions 5.4 and 5.5 on Solaris
-
-  - GNU g++ versions 3.4 on Linux, Solaris, Irix, cygwin, FreeBSD, and MacOS X
-
-  - Darwin (MacOS X) and IA64/Linux support.
-
-
-The following platforms are no longer supported:
-
-  - MS Visual C++, version 7.0
-
-
-The following functionality has been added or changed:
-
-
-
-* All
-
-  - The CORE 1.7 library for exact real arithmetic.
-
-  - Updated GMP to 4.1.3.
-
-  - Added Mpfr a library for multiple-precision floating-point computations
-    with exact rounding.
-
-  - Added Boost 1.32.0 (only include files).
-
-
-* Installation
-
-  - new option --disable-shared to omit building libCGAL.so.
-
-
-* Manuals
-
-  - Merged all major manuals in one multi-part manual, which provides now
-    cross-links between the CGAL Kernel, the CGAL Basic Library, and the CGAL
-    Support Library HTML manuals.
-
-  - Improved layout.
-
-
-* Kernels
-
-  - Improved efficiency of filtered kernels.
-
-  - More predicates and constructions.
-
-
-* Basic Library
-
-  - 2D Segment Voronoi Diagram (new package)
-    A data structure for Voronoi diagrams of segments in the plane under the
-    Euclidean metric. The Voronoi edges are arcs of straight lines and
-    parabolas. The algorithm provided in this package is incremental.
-
-  - 2D Conforming Triangulations and Meshes (new package)
-    An implementation of Shewchuk's algorithm to construct conforming
-    triangulations and 2D meshes.
-
-  - 3D Boolean Operations on Nef Polyhedra (new package)
-    A new class (Nef_polyhedron_3) representing 3D Nef polyhedra, a boundary
-    representation for cell-complexes bounded by halfspaces that supports
-    boolean operations and topological operations in full generality including
-    unbounded cells, mixed dimensional cells (e.g., isolated vertices and
-    antennas). Nef polyhedra distinguish between open and closed sets and can
-    represent non-manifold geometry.
-
-  - 2D and Surface Function Interpolation (new package)
-    This package implements different methods for scattered data interpolation:
-    Given measures of a function on a set of discrete data points, the task is
-    to interpolate this function on an arbitrary query point. The package
-    further offers functions for natural neighbor interpolation.
-
-  - Planar Nef polyhedra embedded on the sphere (new package)
-    A new class (Nef_polyhedron_S2) designed and supported mainly to represent
-    sphere neighborhoods around vertices of the three- dimensional Nef
-    polyhedra.
-
-  - Box_intersection_d (new package)
-    A new efficient algorithm for finding all intersecting pairs for large
-    numbers of iso-oriented boxes, i.e., typically these will be bounding boxes
-    of more complicated geometries. Useful for (self-) intersection tests of
-    surfaces etc.
-
-  - 2D Snap Rounding (new package)
-    Snap Rounding is a well known method for converting arbitrary-precision
-    arrangements of segments into a fixed-precision representation. In the
-    study of robust geometric computing, it can be classified as a finite
-    precision approximation technique. Iterated Snap Roundingis a modification
-    of Snap Rounding in which each vertex is at least half-the-width-of-a-pixel
-    away from any non-incident edge. This package supports both methods.
-
-  - 3D Triangulations
-
-      - Triangulation_3: added operator==(),removed push_back() and
-        copy_triangulation().
-
-      - Delaunay_3 : added nearest_vertex(), move_point(), vertices_in_conflict
-        ().
-
-      - Regular_3 : added filtered traits class, and nearest_power_vertex().
-
-
-  - Planar_map and Arrangement_2
-
-      - The interface of the two traits functions that compute the intersection
-        of two given curves changed. The functions
-        nearest_intersection_to_right() and nearest_intersection_to_left()
-        return an object of type CGAL::Object that represents either an empty
-        intersection, a point, or an overlapping subcurve.
-
-      - Requirements to define two binary tags were added to the traits concept
-        of the Planar_map as follows: Has_left_category - indicates whether the
-        functions curves_compare_y_at_x_left() and nearest_intersection_to_left
-        () are implemented in the traits model. Has_reflect_category -
-        indicates whether the functions point_reflect_in_x_and_y() and
-        curve_reflect_in_x_and_y() are implemented in the traits model. They
-        can be used as an alternative to the two function in the previous item.
-
-      - A new constructor of the Segment_cached_2 type that represents a
-        segment in the Arr_segment_cached_traits_2 traits class was introduced.
-        The new constructor accepts the segment endpoints as well as the
-        coefficients of the underlying line.
-
-      - A new version of the conic-arc traits, based on CORE version 1.7 was
-        introduced. This new traits class makes use of CORE's rootOf() operator
-        to compute the intersection points in the arrangement, making its code
-        much simpler and more elegant than the previous version. In addition,
-        new constructors for conic arcs are provided. The new traits class
-        usually performs about 30% faster than the version included in CGAL 3.0
-
-      - The traits class that handles continuous piecewise linear curves,
-        namely Arr_polyline_traits_2, was rewritten. The new class is
-        parametrized with a traits class that handles segments, say
-        Segment_traits. The polyline curve defined within the
-        Arr_polyline_traits_2 class is implemented as a vector of segments of
-        type Segment_traits::Curve_2.
-
-      - A meta traits class, namely Arr_curve_data_traits_2, that extends the
-        curve type of the planar-map with arbitrary additional data was
-        introduced. It should be instantiated with a regular traits-class and a
-        class that contains all extraneous data associated with a curve.
-
-      - The class that represents the trapezoidal-decomposition point location
-        strategy was renamed to Pm_trapezoid_ric_point_location.
-
-      - The Arrangement demo was rewritten. It covers many more features, has a
-        much better graphical user interface, and comes with online
-        documentation.
-
-      - Few bugs in the sweep-line module related to overlapping vertical
-        segments were fixed. This module is used by the aggregate insert method
-        that inserts a collection of curves at once.
-
-
-  - Triangulation_2
-
-      - added a filtered trait class in the regular triangulation
-
-      - added split and join operations in the triangulation data structure
-        class
-
-
-  - Alpha_shapes_3
-
-      - major changes in the implementation of the class Alpha_shapes_3.
-
-      - New implementation results in a true GENERAL mode allowing null and
-        negative alpha-values. It also fixed the edges classification bug and
-        introduces a classification of vertices.
-
-
-  - Min_ellipse_2
-
-      - made access to approximate double representation public
-
-      - fixed bugs in conversion to double representation
-
-      - added is_circle() method
-
-      - minor performance improvements
-
-
-  - Min_sphere_of_spheres_d:
-
-      - The models Min_sphere_of_spheres_d_traits_2<K,FT,UseSqrt,Algorithm>,
-        Min_sphere_of_spheres_d_traits_3<K,FT,UseSqrt,Algorithm>, and
-        Min_sphere_of_spheres_d_traits_d<K,FT,Dim,UseSqrt,Algorithm> of concept
-        MinSphereOfSpheresTraits now represent a sphere as a std::
-        pair<Point,Radius> (and not any more as a CGAL::
-        Weighted_point<Point,Weight>)
-
-      - Internal code cleanup; in particular, implementation details don't
-        pollute the namespace CGAL anymore
-
-
-  - Polyhedron_3
-
-      - New Tutorial on CGAL Polyhedron for Subdivision Algorithms with
-        interactive demo viewer in source code available.
-
-      - Added example program for efficient self-intersection test. - Added
-        small helper functions, such as vertex_degree, facet_degree, edge_flip,
-        and is_closed.
-
-
-  - Apollonius Graph (Voronoi of Circles)
-
-      - Reduced memory requirements by approximately a factor of two.
-
-
-
--------------------------------- Release 3.0.1 --------------------------------
-
-Release date: February 2004
-
-This is a bug-fix release. No new features have been added in 3.0.1. Here is
-the list of bug-fixes.
-
-
-* Polyhedral Surface
-
-  - Fixed wrong include files for output support. Added example.
-
-
-* Planar_map
-
-  - Fixed the so called "Walk-along-a-line" point-location strategy to
-    correctly handle a degenerate case.
-
-
-* 2D Triangulation
-
-  - added missing figure in html doc
-
-  - in Line_face_circulator_2.h:
-    Fixed changes made to support handles with a typedef to iterator. The fix
-    concerns operator== and !=.
-
-
-* Alpha_shapes_3
-
-  - fixed classify member function for edges.
-
-
-* Number types
-
-  - Lazy_exact_nt:
-
-      - added the possibility to select the relative precision of to_double()
-        (by default 1e-5). This should fix reports that some circumcenters
-        computations have poor coordinates, e.g. nan).
-
-      - when exact computation is triggered, the interval is recomputed, this
-        should speed up some kinds of computations.
-
-
-  - to_interval(Quotient<MP_Float>): avoid spurious overflows.
-
-
-* Kernel
-
-  - missing acknowledgment in the manual and minor clarification of
-    intersection() documentation.
-
-
--------------------------------- Release 3.0 --------------------------------
-
-Release date: October 2003
-
-Version 3.0 differs from version 2.4 in the platforms that are supported and in
-functionality. There have also been a number of bug fixes for this release.
-
-The license has been changed to either the LGPL (GNU Lesser General Public
-License v2.1) or the QPL (Q Public License v1.0) depending on each package. So
-CGAL remains free of use for you, if your usage meets the criteria of these
-licenses, otherwise, a commercial license has to be purchased from
-GeometryFactory.
-
-Additional supported platforms:
-
-  - MS Visual C++, version 7.1.
-
-  - SunPro CC versions 5.4 and 5.5 on Solaris
-
-  - GNU g++ versions 3.2 and 3.3 on Linux, Solaris, Irix, cygwin, and FreeBSD.
-
-  - MipsPRO CC 7.30 and 7.40 with both the n32 and n64 ABIs.
-
-
-The following platforms are no longer supported:
-
-  - MS Visual C++, version 6.
-
-  - GNU g++ 2.95.2 (2.95.3 is still supported)
-
-  - Kai C++ and Borland C++, all versions
-
-
-The following functionality has been added or changed:
-
-All
-
-  - The CORE library for exact computations is now distributed as part of CGAL
-    as well.
-
-
-
-* Kernels
-
-  - 3 typedefs have been added to ease the choice of a robust and fast kernel:
-
-      - Exact_predicates_inexact_constructions_kernel
-
-      - Exact_predicates_exact_constructions_kernel
-
-      - Exact_predicates_exact_constructions_kernel_with_sqrt
-
-
-  - Progress has been made towards the complete adaptability and extensibility
-    of our kernels.
-
-  - New faster Triangle_3 intersection test routines.
-    (see Erratum)
-
-  - Added a Kernel concept archetype to check that generic algorithms don't use
-    more functionality than they should.
-
-  - A few more miscellaneous functions.
-
-
-* Basic Library
-
-  - 2D Apollonius Graph (new package)
-    Algorithms for computing the Apollonius graph in two dimensions. The
-    Apollonius graph is the dual of the Apollonius diagram, also known as the
-    additively weighted Voronoi diagram. The latter can be thought of as the
-    Voronoi diagram of a set of circles under the Euclidean metric, and it is a
-    generalization of the standard Voronoi diagram for points. The algorithms
-    provided are dynamic.
-
-  - dD Min Sphere of Spheres (new package)
-    Algorithms to compute the smallest enclosing sphere of a given set of
-    spheres in Rd. The package provides an algorithm with maximal expected
-    running time O(2O(d) n) and a fast and robust heuristic (for dimension less
-    than 30).
-
-  - Spatial Searching (new package)
-    Provides exact and approximate distance browsing in a set of points in d-
-    dimensional space using implementations of algorithms supporting:
-
-      - both nearest and furthest neighbor searching
-
-      - both exact and approximate searching
-
-      - (approximate) range searching
-
-      - (approximate) k-nearest and k-furthest neighbor searching
-
-      - (approximate) incremental nearest and incremental furthest neighbor
-        searching
-
-      - query items representing points and spatial objects.
-
-
-  - Kd-tree
-    this package is deprecated, its documentation is removed. It is replaced by
-    the Spatial Searching package.
-
-  - Largest_empty_rectangle_2
-    Given a set of points P in the plane, the class
-    Largest_empty_iso_rectangle_2 is a data structure that maintains an iso-
-    rectangle with the largest area among all iso-rectangles that are inside a
-    given iso-rectangle bounding box, and that do not contain any point of the
-    point set P.
-
-  - 2D Triangulation and 3D Triangulation
-
-      - The classes Triangulation_data_structure_2 (and 3), which implements
-        the data structure for 2D triangulation class, now makes use of CGAL::
-        Compact_container (see Support Library section below).
-
-      - The triangulation classes use a Rebind mecanism to provide the full
-        flexibility on Vertex and Face base classes. This means that it is
-        possible for the user to derive its own Face of Vertex base class,
-        adding a functionality that makes use of types defined by the
-        triangulation data structure like Face_handle or Vertex_handle.
-
-      - New classes Triangulation_vertex_base_with_info_2 (and 3) and
-        Triangulation_face_base_with_info_2 (and 3) to make easier the
-        customisation of base classes in most cases.
-
-
-  - 2D Triangulation
-
-      - Regular triangulation provides an easy access to hidden points.
-
-      - The Triangulation_hierarchy_2, which provide an efficient location data
-        structure, can now be used with any 2D triangulation class plugged in
-        (including Regular triangulations).
-
-
-  - 3D Triangulation
-
-      - faster vertex removal function in Delaunay_triangulation_3.
-
-      - Delaunay_triangulation_3 is now independent of the order of insertions
-        of the points (in case of degenerate cosphericity).
-
-      - Regular_triangulation_3 now hides vertices (and updates itself) when
-        inserting a coinciding point with greater weight. This required a new
-        predicate.
-
-      - deprecated functions: copy_triangulation(), push_back(),
-        set_number_of_vertices().
-
-      - Triangulation_3 now gives non-const access to the data structure.
-
-
-  - Interval Skip List (new package)
-    An interval skip list is a data strucure for finding all intervals that
-    contain a point, and for stabbing queries, that is for answering the
-    question whether a given point is contained in an interval or not.
-
-  - Planar Maps and Arrangements
-    The changes concern mainly the traits classes.
-       1. New traits hierarchy and interface: The set of requirements was made
-          sound and complete. A couple of requirements were eliminated, few
-          others were redefined, and some were renamed. A hierarchy of three
-          traits classes for the Planar_map_2, Planar_map_with_intersections_2,
-          and Arrangement_2 types was established to include only the necessary
-          requirements at each level. It was determined that for the aggregate
-          insertion- operation based on a sweep-line algorithm only a subset of
-          the requirements is needed. Preconditions were added where
-          appropriate to tighten the requirements further.
-          The following functions have been renamed:
-
-            - point_is_same() renamed to point_equal()
-
-            - curve_is_same() renamed to curve_equal()
-
-            - curve_is_in_x_range() renamed to point_in_x_range()
-
-            - curve_compare_at_x() renamed to curves_compare_y_at_x()
-              Furthermore, a precondition has been added that the reference
-              point is in the x-range of both curves.
-
-            - curve_compare_at_x_right() renamed to
-              curves_compare_y_at_x_to_right(). Furthermore, a precondition has
-              been added that both curves are equal at the reference point and
-              defined to its right.
-
-            - curve_compare_at_x_left() renamed to
-              curves_compare_y_at_x_to_left(). Furthermore, a precondition has
-              been added that both curves are equal at the reference point and
-              defined to its right.
-
-            - curve_get_point_status() renamed to curve_compare_y_at_x().
-              Furthermore, a precondition has been added that the point is in
-              the x-range of the curve. Consequently, the function now returns
-              a Comparison_result (instead of a special enum).
-
-            - make_x_monotone() renamed to curve_make_x_monotone() See more
-              details below.
-
-            - curve_flip() renamed to curve_opposite()
-
-          The following functions have been removed:
-
-            - curve_is_between_cw()
-
-            - point_to_left()
-
-            - point_to_right()
-
-            - is_x_monotone()
-
-            - point_reflect_in_x_and_y()
-
-            - curve_reflect_in_x_and_y()
-
-            - do_intersect_to_right()
-
-            - do_intersect_to_left()
-
-          Most functions, are required by the PlanarMapTraits_2 concept, except
-          for the make_x_monotone(), nearest_intersection_to_right(),
-          nearest_intersection_to_left(), curves_overlap() and curve_opposite
-          (). PlanarMapWithIntersectionsTraits_2 requires all these functions,
-          except curve_opposite(), needed only by the ArrangementTraits_2
-          concept.
-
-          Furthermore, the two functions curve_compare_at_x_left() and
-          nearest_intersection_to_left() can be omitted, if the two functions
-          point_reflect_in_x() and curve_reflect_in_x() are implemented.
-          Reflection can be avoided, if the two _left functions are supplied.
-
-       2. The type X_curve_2 of the PlanarMapWithIntersectionsTraits_2 concept
-          was renamed to X_monotone_curve_2, and the distinction between this
-          type and the Curve_2 type was made firm. The method is_x_monotone()
-          of the PlanarMapWithIntersectionsTraits_2 concept was removed. The
-          related method curve_make_x_monotone() is now called for each input
-          curve of type Curve_2 when curves are inserted into a
-          Planar_map_with_intersections_2 to subdivide the input curve into x-
-          monotone sub-curves (and in case the curve is already x-monotone,
-          this function is responsible for casting it to an x-monotone curve).
-       3. New and improved traits classes:
-       4. Conic traits - Arr_conic_traits_2 Support finite segments of
-          ellipses, hyperbolas and parabolas, as well as line segments. The
-          traits require an exact real number- type, such as leda_real or
-          CORE::Expr.
-       5. Segment cached traits - Arr_segment_cached_traits_2 This class uses
-          an improved representation for segments that helps avoiding cascaded
-          computations, thus achieving faster running times. To work properly,
-          an exact rational number-type should be used.
-       6. Polyline traits - Arr_polyline_traits_2 The polyline traits class has
-          been reimplemented to work in a more efficient, generic manner. The
-          new class replaces the obsolete Arr_polyline_traits class. It is
-          parameterized with a segment traits class.
-       7. Hyperbola and segment traits - Arr_hyper_segment_traits_2 Supports
-          line segments and segments of canonical hyperbolas. This is the type
-          of curves that arise when projecting segments in three-space
-          rotationally around a line onto a plane containing the line. Such
-          projections are often useful in CAD/CAM problems.
-       8. Removed old traits class:
-
-            - The models of the PlanarMapWithIntersectionsTraits_2 concept
-              below became obsolete, as the new conic traits, namely
-              Arr_conic_traits_2, supports the same functionality and is much
-              more efficient.
-
-                - Arr_circles_real_traits
-
-                - Arr_segment_circle_traits
-
-
-            - The segment traits class and the new polyline traits class were
-              reimplemented using standard CGAL-kernel calls. This essentially
-              eliminated the corresponding leda traits classes, namely:
-
-                - Pm_leda_segment_traits_2
-
-                - Arr_leda_segment_traits_2
-
-                - Arr_leda_polyline_traits
-
-              With the use of the Leda_rat_kernel new external package the same
-              functionality can be achieved with less overhead and more
-              efficiency.
-
-       9. Sweep Line
-
-            - The Sweep_line_2 package was reimplemented. As a consequence it
-              is much more efficient, its traits is tighter (namely neither the
-              two _left nor the reflection functions are required), and its
-              interface has changed a bit.
-                 1. The following global functions have been removed:
-
-                      - sweep_to_produce_subcurves_2()
-
-                      - sweep_to_produce_points_2()
-
-                      - sweep_to_construct_planar_map_2()
-
-                    Instead, the public methods of the Sweep_line_2 class
-                    listed below were introduced:
-
-                      - get_subcurves() - Given a container of curves, this
-                        function returns a list of curves that are created by
-                        intersecting the input curves.
-
-                      - get_intersection_points() - Given a range of curves,
-                        this function returns a list of points that are the
-                        intersection points of the curves.
-
-                      - get_intersecting_curves() - Given a range of curves,
-                        this function returns an iterator to the beginning of a
-                        range that contains the list of curves for each
-                        intersection point between any two curves in the
-                        specified range.
-
-                 2. It is possible to construct a planar map with intersections
-                    (or an arrangement) by inserting a range of curves into an
-                    empty map. This will invoke the sweep-line process to
-                    construct the map more efficiently.
-
-            - New interface functions to the Planar_map_with_intersections_2
-              class. The Planar_map_with_intersections_2 class maintains a
-              planar map of input curves that possibly intersect each other and
-              are not necessarily x-monotone. If an input curve, or a set of
-              input curves, are known to be x-monotone and pairwise disjoint,
-              the new functions below can be used to insert them into the map
-              efficiently.
-
-
-  - Polyhedral Surface
-
-      - The old design that was deprecated since CGAL 2.3 has been removed.
-
-      - Class Polyhedron_incremental_builder_3:
-
-          - Renamed local enum ABSOLUTE to ABSOLUTE_INDEXING, and RELATIVE to
-            RELATIVE_INDEXING to avoid conflicts with similarly named macros of
-            another library.
-
-          - Changed member functions add_vertex(), begin_facet(), and end_facet
-            () to return useful handles.
-
-          - Added test_facet() to check facets for validity before adding them.
-
-          - Added vertex( size_t i) to return Vertex_handle for index i.
-
-
-
-  - Halfedge Data Structure
-
-      - The old design that was deprecated since CGAL 2.3 has been removed.
-
-
-
-* Support Library
-
-  - New container class Compact_container, which (roughly) provides the
-    flexibility of std::list, with the memory compactness of std::vector.
-
-  - Geomview_stream: added a function gv.draw_triangles(InputIterator begin,
-    InputIterator end) which draws a set of triangles much more quickly than
-    one by one.
-
-  - Number types:
-
-      - number types are now required to provide a function: std::pair<double,
-        double> to_interval(const NT &).
-
-      - number types are now required to provide mixed operators with "int".
-
-      - CLN support removed.
-
-      - faster square() for MP_Float.
-
-      - added Gmp_q.
-
-
-  - Qt_widget:
-
-      - New classes:
-
-          - Qt_help_window: provides a simple way to show some helpful
-            information about a demo as an HTML page.
-
-          - Qt_widget_history: provides basic functionality to manipulate
-            intervals of Qt_widget class. The current visible area of Qt_widget
-            is mapped to an interval. Each interval could be stored in the
-            Qt_widget_history object. So you can use this object to navigate in
-            history. It is mostly used by Qt_widget_standard_toolbar.
-
-
-      - Changes:
-
-          - Qt_widget_standard_toolbar: is derived from QToolBar class, so pay
-            attention to modify your code, if you used this class. Some public
-            methods were introduced to control the history object that the
-            toolbar use to navigate.
-
-          - the icons are now part of libCGALQt.
-
-
-      - Deprecated members of Qt_widget:
-
-          - add_to_history(), clear_history(), back(), forth(): use forward(),
-            back() and clear_history() of the Qt_widget_standard_toolbar
-            instead.
-
-          - custom_redraw(): use redraw_on_back() and redraw_on_front()
-            instead.
-
-
-      - Optimizations: the output operators of the following classes have been
-        optimized:
-
-          - CGAL::Segment_2 (now tests for intersection with the drawing area)
-
-          - CGAL::Triangle_2 (now tests for intersection with the drawing area)
-
-          - CGAL::Triangulation_2 (is optimized for faster display on zooming)
-
-
-
-
-* Erratum in the Kernel manual
-
-  - Intersection test routines
-    The documentation of CGAL::do_intersect should mention, for the 3D case:
-    Also, in three-dimensional space Type1 can be
-
-      - either Plane_3<Kernel>
-
-      - or Triangle_3<Kernel>
-
-    and Type2 any of
-
-      - Plane_3<Kernel>
-
-      - Line_3<Kernel>
-
-      - Ray_3<Kernel>
-
-      - Segment_3<Kernel>
-
-      - Triangle_3<Kernel>
-
-
-    In the same way, for Kernel::DoIntersect_3:
-    for all pairs Type1 and Type2, where the type Type1 is
-
-      - either Kernel::Plane_3
-
-      - or Kernel::Triangle_3
-
-    and Type2 can be any of the following:
-
-      - Kernel::Plane_3
-
-      - Kernel::Line_3
-
-      - Kernel::Ray_3
-
-      - Kernel::Segment_3
-
-      - Kernel::Triangle_3
-
-
-    Philippe Guigue (INRIA Sophia-Antipolis) should be mentioned as one of the
-    authors.
-
-
-
--------------------------------- Release 2.4 --------------------------------
-
-Release date: May 2002
-
-Version 2.4 differs from version 2.3 in the platforms that are supported and in
-functionality. There have also been a number of bug fixes for this release.
-
-Additional supported platforms:
-
-  - Microsoft Visual C++, version 7.
-
-  - SunPro 5.3 (with patch 111685-05) on Solaris
-
-  - g++ 3.1 on Linux and Solaris
-
-
-The following functionality has been added or changed:
-
-
-
-* Kernels
-
-  - Point_d has been removed from the 2D and 3D kernels. This type is now
-    available from the d-dimensional kernel only.
-
-
-* Basic Library
-
-  - 2D Polygon Partitioning
-    Traits requirements for optimal partitioning have been changed slightly.
-
-
-  - 2D Sweep line
-    A new package that implements a sweep-line algorithm to compute
-    arrangements of curves for different families of curves, which are not
-    necessarily line segments (e.g., it also works for circular arcs). The
-    resulting output can be the list of vertex points, the resulting subcurves
-    or a planar map.
-
-
-  - Planar Maps and Arrangements
-
-      - New quicker insertion functions of Planar_map_2 for cases where more
-        precomputed information is available regarding the position of the
-        inserted curve in the map.
-
-      - New query function for planar maps that determines whether a given
-        point is within a given face of the planar map.
-
-      - New iterator over edges of planar maps in addition to the existing
-        iterator over halfedges.
-
-      - New copy constructor and assignment operator for arrangements.
-
-
-
-
-  - Polyhedral Surface
-
-      - new design introduced with release 2.3 now supported by VC7 compiler
-
-      - Extended functionality of Polyhedron_incremental_builder: absolute
-        indexing allows one to add new surfaces to existing ones.
-
-
-
-
-  - 2D Triangulation
-
-      - There is a new triangulation data structure replacing the two previous
-        ones. This new data structure is coherent with the 3d triangulation
-        data structure and offer the advantages of both previous ones. Backward
-        compatibility is ensured and this change is transparent for the user of
-        triangulation classes.
-
-      - Constrained and Delaunay constrained triangulations are now able to
-        handle intersecting input constraints. The behavior of constrained
-        triangulations with repect to intersection of input constraints can be
-        customized using an intersection tag.
-
-      - A new class Constrained_triangulation_plus offers a constrained
-        hierarchy on top of a constrained triangulations. This additionnal data
-        structure describes the subdivision of the original constraints into
-        edges of the triangulations.
-
-
-
-
-  - 3D Triangulation
-
-      - Running time improved by a better and more compact management of memory
-        allocation
-
-      - Various improvements and small functionalities added:
-
-          - Triangulation_3<GT,Tds>::triangle() returns a triangle oriented
-            towards the outside of the cell c for facet (c,i)
-
-          - New function insert(Point, Locate_type, Cell_handle, int, int)
-            which avoids the location step.
-
-          - New function to get access to cells in conflict in a Delaunay
-            insertion : find_conflicts() and insert_in_hole()
-
-          - New function TDS::delete_cells(begin, end).
-
-          - New functions : degree(v), reorient(), remove_decrease_dimension(),
-            remove_from_simplex().
-
-
-      - Changes of interface:
-
-          - vertices and cells are the same for the triangulation data
-            structure and the geometric triangulation
-
-          - the triangulation data structure uses Vertex_handle (resp
-            Cell_handle) instead of Vertex* (resp Cell*).
-
-          - incident_cells() and incident_vertices() are templated by output
-            iterators
-
-          - changes in the iterators and circulators interface:
-
-              - Iterators and circulators are convertible to handles
-                automatically, no need to call "->handle()" anymore.
-
-              - Vertex_iterator split into All_vertices_iterator and
-                Finite_vertices_iterator (and similar for cells...).
-
-              - TDS::Edge/Facet iterators now support operator->.
-
-
-
-
-
-
-  - 2D Search structures
-    Additional range search operations taking a predicate functor have been
-    added
-
-
-* Support Library
-
-  - Qt_widget
-
-      - We have added a new class for visualization of 2D CGAL objects. It is
-        derived from Trolltech's Qt class QWidget and privdes a used to scale
-        and pan.
-
-      - Some demos were developed for the following packages: 2D Alpha shapes,
-        2D Convex Hull, Largest empty 2D rectangle, Maximum k-gon, Minimum
-        ellipse, Minimum 2D quadrilateral, 2D polygon partitioning 2D regular
-        and constrained triangulation.
-
-      - Tutorials are available to help users get used to Qt_widget
-
-
-
-
-  - Timer
-    Fixed Timer class (for user process time) to have no wrap-around anymore on
-    Posix-compliant systems.
-
-The following functionality is no longer supported:
-
-  - Planar maps of infinite curves (the so-called planar map bounding-box).
-
-
-Bugs in the following packages have been fixed: 3D Convex hull, 2D Polygon
-partition, simple polygon generator
-
-Also attempts have been made to assure compatability with the upcoming LEDA
-release that introduces the leda namespace.
-
-
-* Known problems
-
-  - 2D Nef Polyhedra contains a memory leak. Memory problems are also the
-    likely cause of occasional run-time errors on some platforms.
-
-  - The d-dimensional convex hull computation produces run-time errors on some
-    platforms because of memory management bugs.
-
-  - The new Halfedge Data Structure design introduced with release 2.3 does not
-    work on VC6. See the release notes in the manual for more information.
-
-  - The following deficiencies relate to planar maps, planar maps of
-    intersecting curves (pmwx), arrangements and sweep line.
-
-      - On KCC, Borland and SunPro we guarantee neither compilation nor correct
-        execution for all of the packages above.
-
-      - On VC6 and VC7 we guarantee neither compilation nor correct execution
-        of the sweep line package.
-
-      - On CC (on Irix 6.5) the trapezoidal decomposition point location
-        strategy is problematic when used with planar maps, pmwx, or
-        arrangements (mind that this is the default for planar maps).
-
-      - On CC (on Irix 6.5) sweep line with polyline traits does not compile
-        (mind that the so-called leda polyline traits does compile).
-
-      - On g++ (on Irix 6.5) the segment-circle (Arr_segment_circle_traits_2)
-        traits does not compile for either of the above packages.
-
-
-
--------------------------------- Release 2.3 --------------------------------
-
-Release date: August 2001
-
-Version 2.3 differs from version 2.2 in the platforms that are supported and in
-functionality.
-
-Additional supported platform:
-
-  - Gnu g++ 3.0 on Solaris and Linux
-
-
-The following functionality has been added:
-
-
-
-* Kernels
-
-  - The 2D and 3D kernels now serve as models of the new kernel concept
-    described in the recent paper, "An Adaptable and Extensible Geometry
-    Kernel" by Susan Hert, Micheal Hoffmann, Lutz Kettner, Sylvain Pion, and
-    Michael Seel to be presented at WAE 2001 (and soon available as a technical
-    report). This new kernel is completely compatible with the previous design
-    but is more flexible in that it allows geometric predicates as well as
-    objects to be easily exchanged and adapted individually to users' needs.
-
-  - A new kernel called Simple_homogeneous is available. It is equivalent to
-    Homogeneous but without reference-counted objects.
-
-  - A new kernel called Filtered_kernel is available that allows one to build
-    kernel traits classes that use exact and efficient predicates.
-
-  - There are two classes, Cartesian_converter and Homogeneous_converter that
-    allows one to convert objects between different Cartesian and homogeneous
-    kernels, respectively.
-
-  - A new d-dimensional kernel, Kernel_d is available. It provides diverse
-    kernel objects, predicates and constructions in d dimensions with two
-    representations based on the kernel families Cartesean_d and Homogeneous_d
-
-
-* Basic Library
-Almost all packages in the basic library have been adapted to the new kernel
-design to realize the flexibility this design makes possible. In several
-packages, this means that the traits class requirements have changed to conform
-to the function objects offered in the kernels so the kernels themselves can be
-used as traits classes in many instances.
-
-
-  - 2D Convex Hull
-    The traits requirements have changed slightly to bring them in line with
-    the CGAL kernels.
-
-  - 3D Convex Hull
-
-      - The function convex_hull_3 now uses a new implementation of the
-        quickhull algorithm and no longer requires LEDA.
-
-      - A new convex_hull_incremental_3 function based on the new d-dimensional
-        convex hull class is available for comparison purposes.
-
-
-
-  - Convex_hull_d, Delaunay_d
-    Two new application classes offering the calculation of d-dimensional
-    convex hulls and delaunay triangulations
-
-
-  - Polygons and Polygon Operations
-
-      - The traits class requirements have been changed.
-
-      - The simplicity test has a completely new implementation.
-
-      - Properties like convexity, simplicity and area can now be cached by
-        polygons. You need to set a flag to select this behaviour.
-
-
-
-
-
-  - Planar Nef Polyhedra
-    A new class (Nef_polyhedron_2) representing planar Nef polyhedra =
-    rectilinearly bounded points sets that are the result of binary and
-    topological operations starting from halfplanes.
-
-
-  - A new package offering functions to partition planar polygons into convex
-    and y-monotone pieces is available.
-
-
-  - Planar Maps and Arrangements
-
-      - A new class Planar_map_with_intersections_2<Planar_map> for planar maps
-        of possibly intersecting, possibly non-x-monotone, possibly overlapping
-        curves (like Arrangement_2 but without the hierarchy tree).
-
-      - I/O utilities for planar maps and arrangements for textual and
-        graphical streams. (It is possible to save and later reload built
-        planar maps or arrangements.)
-
-      - New arrangement traits class for line segments and circular arcs
-        (Arr_segment_circle_traits<NT>).
-
-      - New faster traits for polylines specialized for using the LEDA rational
-        kernel (Arr_leda_polylines_traits). The LEDA traits for segments was
-        also made faster.
-
-      - A new point location strategy (Pm_simple_point_location<Planar_map>).
-
-
-
-
-  - Halfedge Data Structure
-
-    The halfedge data structure has been completely revised. The new design is
-    more in line with the STL naming scheme and it provides a safe and coherent
-    type system throughout the whole design (no void* pointers anymore), which
-    allows for better extendibility. A user can add new incidences in the mesh
-    easily. The new design also uses standard allocators with a new template
-    parameter that has a suitable default.
-
-    The old design is still available, but its use is deprecated, see the
-    manual of deprecated packages for its documentation. Reported bugs in
-    copying the halfedge data structure (and therefore also polyhedral
-    surfaces) have been fixed in both designs. Copying a list-based
-    representation is now based on hash maps instead of std::map and is
-    therefore considerably faster.
-
-
-  - Polyhedral Surface
-
-    The polyhedral surface has been rewritten to work with the new halfedge
-    data structure design. The user level interface of the CGAL::Polyhedron_3
-    class is almost backwards compatible with the previous class. The
-    exceptions are the template parameter list, everything that relies on the
-    flexibility of the underlying halfedge data structure, such as a self-
-    written facet class, and that the distinction between supported normals and
-    supported planes has been removed. Only planes are supported. See the
-    manuals for suggestions how to handle normals instead of planes.
-
-    More example programs are provided with polyhedral surfaces, for example,
-    one about Euler operator and one computing a subdivision surface given a
-    control mesh as input.
-
-    The old design is still available for backwards compatibility and to
-    support older compiler, such as MSVC++6.0. For the polyhedral surface, old
-    and new design cannot be used simultaneously (they have identical include
-    file names and class names). The include files select automatically the old
-    design for MSVC++6.0 and the new design otherwise. This automatism can be
-    overwritten by defining appropriate macros before the include files. The
-    old design is selected with the CGAL_USE_POLYHEDRON_DESIGN_ONE macro. The
-    new design is selected with the CGAL_USE_POLYHEDRON_DESIGN_TWO macro.
-
-
-  - 2D Triangulation
-
-      - The geometric traits class requirements have been changed to conform to
-        the new CGAL kernels. CGAL kernel classes can be used as traits classes
-        for all 2D triangulations except for regular triangulations.
-
-      - Additionnal functionality:
-
-          - dual method for regular triangulations (to build a power diagram)
-
-          - unified names and signatures for various "find_conflicts()" member
-            functions in Delaunay and constrained Delaunay triangulation.
-
-          - As an alternative to the simple insert() member function, insertion
-            of points in those triangulation can be performed using the
-            combination of find_conflicts() and star_hole() which eventually
-            allows the user to keep track of deleted faces.
-
-
-      - More demos and examples
-
-
-
-  - 3D Triangulation
-
-      - Major improvements
-
-          - A new class Triangulation_hierarchy_3 that allows a faster point
-            location, and thus construction of the Delaunay triangulation
-
-          - A new method for removing a vertex from a Delaunay triangulation
-            that solves all degenerate cases
-
-          - Running time of the usual location and insertion methods improved
-
-
-      - A bit more functionality, such as
-
-          - New geomview output
-
-          - dual methods in Delaunay triangulations to draw the Voronoi diagram
-
-
-      - More demos and examples
-
-      - Changes in interface
-
-          - Traits classes requirements have been modified
-
-          - The kernel can be used directly as a traits class (except for
-            regular triangulation)
-
-          - insert methods in Triangulation_data_structure have a new interface
-
-
-
-
-  - A new class (Alpha_shapes_3) that computes Alpha shapes of point sets in 3D
-    is available.
-
-
-  - The traits requirements for matrix search and minimum quadrilaterals have
-    been changed to bring them in line with the CGAL kernels.
-
-
-  - Point_set_2
-
-      - now independent of LEDA; based on the CGAL Delaunay triangulation
-
-      - traits class requirements adapted to new kernel concept.
-
-      - function template versions of the provided query operations are
-        available
-
-
-
-* Support Library
-
-  - Number types:
-
-      - Lazy_exact_nt<NT> is a new number type wrapper to speed up exact number
-        types.
-
-      - MP_Float is a new multiprecision floating point number type. It can do
-        exact additions, subtractions and multiplications over floating point
-        values.
-
-
-  - In_place_list has a new third template parameter (with a suitable default)
-    for an STL-compliant allocator.
-
-  - Unique_hash_map is a new support class.
-
-  - Union_find is a new support class.
-
-  - Geomview_stream :
-
-      - Geomview version 1.8.1 is now required.
-
-      - no need to have a ~/.geomview file anymore.
-
-      - new output operators for triangulations.
-
-      - new output operators for Ray_2, Line_2, Ray_3, Line_3, Sphere_3.
-
-      - various new manipulators.
-
-
-  - Window stream In cooperation with Algorithmic Solutions, GmBH (distributors
-    of the LEDA library), we can now offer a visualization package downloadable
-    in binary form that supports visualization on a ported version of the LEDA
-    window lib.
-
-
--------------------------------- Release 2.2 --------------------------------
-
-Release date: October 2000
-
-Version 2.2 differs from version 2.1 in the platforms that are supported and in
-functionality.
-
-Additional supported platforms:
-
-  - the KAI compiler (4.0) on Solaris 5.8
-
-  - Borland C++ (5.5)
-
-
-The following functionality has been added:
-
-  - There is a new, non-reference-counted kernel, Simple_cartesian. Because
-    reference counting is not used, and thus coordinates are stored within a
-    class, debugging is easier using this kernel. This kernel can also be
-    faster in some cases than the reference-counted Cartesian kernel.
-
-  - New optimisation algorithms
-
-      - Min_annulus_d - Algorithm for computing the smallest enclosing annulus
-        of points in arbitrary dimension
-
-      - Polytope_distance_d - Algorithm for computing the (squared) distance
-        between two convex polytopes in arbitrary dimension
-
-      - Width_3 - Algorithm for computing the (squared) width of points sets in
-        three dimensions
-
-
-  - 2D Triangulations
-
-      - There are now two triangulation data structures available in CGAL. The
-        new one uses a list to store the faces and allows one to represent two-
-        dimensional triangulations embedded in three spaces as well as planar
-        triangulations.
-
-      - The triangulation hierarchy which allows fast location query is now
-        available.
-
-
-  - Inifinite objects can now be included in planar maps.
-
-  - Removal as well as insertions of vertices for 3D Delaunay triangulations is
-    now possible.
-
-  - A generator for ``random'' simple polygons is now available.
-
-  - In directory demo/Robustness, programs that demonstrate typical robustness
-    problems in geometric computing are presented along with the solutions to
-    these problems that CGAL provides.
-
-
-The following functionality has been removed:
-
-  - The binary operations on polygons (union, intersection ...) have been
-    removed. Those operations were not documented in the previous release
-    (2.1). Arrangements can often be used as a substitute.
-
-
-
--------------------------------- Release 2.1 --------------------------------
-
-Release date: January 2000
-
-Version 2.1 differs from version 2.0 in the platforms that are supported and in
-functionality.
-
-Supported platforms:
-
-  - the newest gnu compiler (2.95.2) on Sun, SGI, Linux and Windows.
-
-  - the Microsoft Visual C++ compiler, version 6.
-
-  - the mips CC compiler version 7.3 under Irix.
-
-Support for the old g++ compiler (2.8) and for mips CC 7.2 has been dropped.
-
-The following functionality has been added:
-
-  - Alpha shapes and weighted alpha shapes in 2D. Alpha shapes are a
-    generalization of the convex hull of a point set.
-
-  - Arrangements in 2D. Arrangements are related to and based on planar maps.
-    The major difference between the two is that curves are allowed to
-    intersect in the case of arrangements.
-
-  - Extensions to triangulations in 2D. Constrained triangulations are now
-    dynamic: they support insertions of new constraint as well as removal of
-    existing constraints. There are also constrained Delaunay triangulations.
-
-  - Triangulations in 3D were added, both Delaunay triangulations and regular
-    triangulations.
-
-  - Min_quadrilateral optimisations have been added. These are algorithms to
-    compute the minimum enclosing rectangle/parallelogram (arbitrary
-    orientation) and the minimum enclosing strip of a convex point set.
-
-  - 2d Point_set is a package for 2d range search operations, Delaunay
-    triangulation, nearest neighbor queries. This package works only if LEDA is
-    installed.
-
-  - Support for GeoWin visualization library. This also depends on LEDA.
-
-  - Support for using the CLN number type together with CGAL.
-
-
-
--------------------------------- Release 2.0 --------------------------------
-
-Release date: June 1999
-
-The main difference from release 1.2 is the introduction of namespaces -
-- namespace std for code from the standard library and namespace CGAL for the
-CGAL library.
-
-
--------------------------------- Release 1.2 --------------------------------
-
-Release date: January 1999
-
-Additions to release 1.1 include:
-
-
-  - topological map
-
-  - planar map overlay
-
-  - regular and constrained triangulations
-
-
--------------------------------- Release 1.1 --------------------------------
-
-Release date: July 1998
-
-Additions to release 1.0 include:
-
-  - 3D intersections
-
-  - kD points
-
-  - 3D convex hull
-
-  - kD smallest enclosing sphere
-
-
-
--------------------------------- Release 1.0 --------------------------------
-
-Release date: April 1998
-
-Additions to release 0.9 include:
-
-  - Polyhedral surfaces
-
-  - Halfedge Data Structure
-
-  - Planar maps
-
-
-
--------------------------------- Release 0.9 --------------------------------
-
-Release date: June 1997
-
-Initial (beta) release of the CGAL library.
-
diff --git a/3rdparty/CGAL-4.6/CMakeLists.txt b/3rdparty/CGAL-4.6/CMakeLists.txt
deleted file mode 100644
index bc9fdfd..0000000
--- a/3rdparty/CGAL-4.6/CMakeLists.txt
+++ /dev/null
@@ -1,1060 +0,0 @@
-# Top level CMakeLists.txt for CGAL
-# The name of our project is "CGAL".  CMakeLists files in this project can
-# refer to the root source directory of the project as ${CMAKE_SOURCE_DIR} or
-# ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
-# ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
-project(CGAL CXX C)
-
-# Minimal version of CMake:
-if(WIN32)
-  cmake_minimum_required(VERSION 2.8.6)
-else()
-  cmake_minimum_required(VERSION 2.6.2)
-endif()
-
-# Tested version:
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-#
-# Compatibility with CMake 3.0
-#
-if(POLICY CMP0026)
-  # Allow the LOCATION target property
-  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0026.html
-  cmake_policy(SET CMP0026 OLD)
-endif()
-if(POLICY CMP0042)
-  # Do not enable the use of MACOSX_RPATH
-  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
-  cmake_policy(SET CMP0042 OLD)
-endif()
-
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= PACKAGE SETUP =-
-#
-#--------------------------------------------------------------------------------------------------
-
-message( "== Setting paths ==" )
-
-if ( CGAL_BRANCH_BUILD )
-
-  message( STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}" )
-
-  # list packages
-  file(GLOB CGAL_CONFIGURED_PACKAGES RELATIVE ${CMAKE_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/*")
-  list(REMOVE_ITEM CGAL_CONFIGURED_PACKAGES copyright CMakeLists.txt .svn .git)
-
-  # detect and remove not existing package-directories
-  foreach (package ${CGAL_CONFIGURED_PACKAGES})
-    if (NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}")
-      list(APPEND CGAL_WRONG_PACKAGES ${package})
-    elseif(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}/package_info")
-      list(APPEND CGAL_WRONG_PACKAGES ${package})
-    endif()
-  endforeach()
-
-  find_program(CGAL_CREATE_CMAKE_SCRIPT cgal_create_cmake_script
-               HINT ${CMAKE_SOURCE_DIR}/Scripts/scripts
-	       DOC "Script cgal_create_cmake_script, that creates CMakeLists.txt files"
-	       NO_DEFAULT_PATH
-	       NO_CMAKE_ENVIRONMENT_PATH)
-
-  if (DEFINED CGAL_WRONG_PACKAGES)
-    message(STATUS "Removed not-a-package: ${CGAL_WRONG_PACKAGES}")
-    list(REMOVE_ITEM CGAL_CONFIGURED_PACKAGES ${CGAL_WRONG_PACKAGES})
-  endif()
-
-  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_CONFIGURED_PACKAGES})
-  set(CGAL_CONFIGURED_PACKAGES)
-  foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
-    list(APPEND CGAL_CONFIGURED_PACKAGES "${CMAKE_SOURCE_DIR}/${package}")
-  endforeach()
-
-
-  set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Installation" CACHE INTERNAL "Directory containing the Installation package")
-  set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Maintenance" CACHE INTERNAL "Directory containing the Maintenance package")
-  set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Core" CACHE INTERNAL "Directory containing the Core package")
-
-  message(STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}")
-  message(STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}")
-  message(STATUS "Core package directory: ${CGAL_CORE_PACKAGE_DIR}")
-
-else ( CGAL_BRANCH_BUILD )
-
-  # get release name
-  file(TO_CMAKE_PATH ${CMAKE_SOURCE_DIR} CMAKE_SOURCE_CDIR)
-  string(REGEX REPLACE "^/" "" CMAKE_SOURCE_DDIR ${CMAKE_SOURCE_CDIR})
-  string(REPLACE "/" ";" CMAKE_SOURCE_PDIR ${CMAKE_SOURCE_DDIR})
-  list(GET CMAKE_SOURCE_PDIR -1 CGAL_RELEASE_NAME)
-  message( STATUS "Build CGAL from release in directory ${CGAL_RELEASE_NAME}" )
-
-  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_RELEASE_NAME})
-
-  # list packages
-  set(CGAL_CONFIGURED_PACKAGES "${CMAKE_SOURCE_DIR}")
-
-  set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Installation package")
-  set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Maintenance package")
-  set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Core package")
-
-endif (CGAL_BRANCH_BUILD )
-
-#message(STATUS "Packages found: ${CGAL_CONFIGURED_PACKAGES}")
-
-list(SORT CGAL_CONFIGURED_PACKAGES_NAMES)
-if(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/Documentation")
-  # Rescope CGAL_CONFIGURED_PACKAGES_NAMES
-  # We need this variable in the Doxygen configuration process. Reset it
-  # and change the scope to the parent scope.
-  # Philipp Moeller, 2013-05-302013-05-302013-05-30
-  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_CONFIGURED_PACKAGES_NAMES} PARENT_SCOPE)
-endif()
-
-message(STATUS "Packagenames: ${CGAL_CONFIGURED_PACKAGES_NAMES}")
-message( "== Setting paths (DONE) ==\n" )
-
-message( "== Generate version files ==")
-
-if ( CGAL_BRANCH_BUILD ) 
-    
-  #
-  # Create version files
-  #
-
-  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/MAJOR_NUMBER" CGAL_MAJOR_VERSION REGEX "[0-9]*")
-  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/MINOR_NUMBER" CGAL_MINOR_VERSION REGEX "[0-9]*")
-  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/BUGFIX_NUMBER" CGAL_BUGFIX_VERSION REGEX "[0-9]*")
-
-  set(CGAL_BUILD_VERSION 900)
-  file(REMOVE ${CMAKE_BINARY_DIR}/VERSION)
-  if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0)  
-    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}")
-  else()
-    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
-  endif()
-  
-  # Accessed in the documentation.
-  set(CGAL_CREATED_VERSION_NUM ${CGAL_CREATED_VERSION_NUM} PARENT_SCOPE)
-
-  
-  
-  # TODO EBEB set number of internal release (replace "900")
-  set(CGAL_CREATED_VERSION "${CGAL_CREATED_VERSION_NUM}-I-${CGAL_BUILD_VERSION}")
-  set(CGAL_VERSION "${CGAL_CREATED_VERSION_NUM}-I-${CGAL_BUILD_VERSION}")
-
-  file(WRITE "${CMAKE_BINARY_DIR}/VERSION" "${CGAL_CREATED_VERSION_NUM}")
-
-  message(STATUS "CGAL_VERSION is ${CGAL_CREATED_VERSION}")
-  set(CGAL_FULL_VERSION ${CGAL_CREATED_VERSION})
-
-
-  #define CGAL_VERSION_NR 1030500135
-  string (LENGTH "${CGAL_MAJOR_VERSION}" CGAL_MAJOR_LEN)
-  if ("${CGAL_MAJOR_LEN}" EQUAL 1) 
-    set(CGAL_TMP_MAJOR "0${CGAL_MAJOR_VERSION}")
-  endif()
-  string (LENGTH "${CGAL_MINOR_VERSION}" CGAL_MINOR_LEN)
-  if ("${CGAL_MINOR_LEN}" EQUAL 1) 
-    set(CGAL_TMP_MINOR "0${CGAL_MINOR_VERSION}")
-  else()
-    set(CGAL_TMP_MINOR "${CGAL_MINOR_VERSION}")
-  endif()
-
-  set(CGAL_TMP_BUILD "${CGAL_BUILD_VERSION}")
-  string(LENGTH "${CGAL_TMP_BUILD}" CGAL_BUILD_LEN)
-
-  while(CGAL_BUILD_LEN LESS 4)
-    set(CGAL_TMP_BUILD "0${CGAL_TMP_BUILD}")
-    string(LENGTH "${CGAL_TMP_BUILD}" CGAL_BUILD_LEN)
-  endwhile()
-
-  set(CGAL_CREATED_VERSION_NR "1${CGAL_TMP_MAJOR}${CGAL_TMP_MINOR}${CGAL_BUGFIX_VERSION}${CGAL_TMP_BUILD}")
-  message(STATUS "CGAL_VERSION_NR is ${CGAL_CREATED_VERSION_NR}")
-
-  message(STATUS "CGAL_GIT_HASH is ${CGAL_GIT_HASH}")
-  message(STATUS "CGAL_CREATED_SVN_REVISION is ${CGAL_CREATED_SVN_REVISION} (dummy)")
-
-  file(REMOVE ${CMAKE_BINARY_DIR}/include/CGAL/version.h)
-  configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/config/version.h.in ${CMAKE_BINARY_DIR}/include/CGAL/version.h @ONLY)
-
-  #
-  # Duplicate files
-  #
-
-  if (CGAL_REPORT_DUPLICATE_FILES) 
-
-    message("== Searching for duplicate files ==")
-
-    foreach (package ${CGAL_CONFIGURED_PACKAGES})
-
-      file(GLOB_RECURSE CGAL_PACKAGE_HEADER_FILES FOLLOW_SYMLINKS ${package}/*.h)
-      foreach (file ${CGAL_PACKAGE_HEADER_FILES})
-        string(REPLACE "${package}/" "" pure_file ${file})
-        if (NOT ${pure_file} MATCHES ".*CMakeFiles.*")
-          list(APPEND CGAL_HEADER_FILES ${pure_file})
-        endif()
-      endforeach()
-
-      file(GLOB_RECURSE CGAL_PACKAGE_CPP_FILES FOLLOW_SYMLINKS ${package}/*.cpp)
-      foreach (file ${CGAL_PACKAGE_CPP_FILES})
-        string(REPLACE "${package}/" "" pure_file ${file})
-        if (NOT ${pure_file} MATCHES ".*CMakeFiles.*")
-          list(APPEND CGAL_CPP_FILES ${pure_file})
-        endif()
-      endforeach()
-
-    endforeach()
-
-    list(SORT CGAL_HEADER_FILES)
-    set(CGAL_UNIQUE_HEADER_FILES ${CGAL_HEADER_FILES})
-    set(CGAL_DUPLICATE_HEADER_FILES ${CGAL_HEADER_FILES})
-    list(REMOVE_DUPLICATES CGAL_UNIQUE_HEADER_FILES)
-    #message(STATUS "Headers: ${CGAL_HEADER_FILES}")
-    foreach (file ${CGAL_UNIQUE_HEADER_FILES})
-      list(FIND CGAL_DUPLICATE_HEADER_FILES "${file}" CGAL_FILE_IDX)
-      list(REMOVE_AT CGAL_DUPLICATE_HEADER_FILES ${CGAL_FILE_IDX})
-    endforeach()
-    message(STATUS "Duplicate header files (will be repeated at end): ${CGAL_DUPLICATE_HEADER_FILES}")
-
-    list(SORT CGAL_CPP_FILES)
-    set(CGAL_UNIQUE_CPP_FILES ${CGAL_CPP_FILES})
-    set(CGAL_DUPLICATE_CPP_FILES ${CGAL_CPP_FILES})
-    list(REMOVE_DUPLICATES CGAL_UNIQUE_CPP_FILES)
-    #message(STATUS "CPPs: ${CGAL_CPP_FILES}")
-    foreach (file ${CGAL_UNIQUE_CPP_FILES})
-      list(FIND CGAL_DUPLICATE_CPP_FILES "${file}" CGAL_FILE_IDX)
-      list(REMOVE_AT CGAL_DUPLICATE_CPP_FILES ${CGAL_FILE_IDX})
-    endforeach()
-    message(STATUS "Duplicate cpp files (will be repeated at end): ${CGAL_DUPLICATE_CPP_FILES}")
-
-  endif(CGAL_REPORT_DUPLICATE_FILES)
-
-else()
-
-  if (NOT EXISTS "${CMAKE_SOURCE_DIR}/VERSION" OR NOT EXISTS "${CMAKE_SOURCE_DIR}/include/CGAL/version.h")
-    message(FATAL_ERROR "File VERSION or include/CGAL/version.h are missing, required by release-build.")
-  endif()
-
-  # 
-  # Read and parse CGAL version number from VERSION file
-  #
-
-  file( READ "${CMAKE_SOURCE_DIR}/VERSION" CGAL_VERSION )
-  # Comment from Laurent Rineau, 2012/06/28:
-  #   file(READ ..) should be replace by file(STRINGS ..), and then we take
-  #   the first line. That would avoid parsing errors when the VERSION file
-  #   contains a CR character!
-
-  set(CGAL_FULL_VERSION ${CGAL_VERSION})
-  string( REPLACE "-" "." CGAL_VERSION_TOKENS1 ${CGAL_VERSION} )
-  string( REPLACE "." ";" CGAL_VERSION_TOKENS ${CGAL_VERSION_TOKENS1} )
-  list( LENGTH CGAL_VERSION_TOKENS CGAL_VERSION_TOKENS_LEN )
-  list( GET CGAL_VERSION_TOKENS 0 CGAL_MAJOR_VERSION )
-
-  set(CGAL_MINOR_VERSION)
-  set(CGAL_BUGFIX_VERSION)
-  set(CGAL_BUILD_VERSION 1000)
-
-  if ( CGAL_VERSION_TOKENS_LEN GREATER 1 )
-    list( GET CGAL_VERSION_TOKENS 1 CGAL_MINOR_VERSION )
-  endif()
-
-  if ( CGAL_VERSION_TOKENS_LEN GREATER 2 )
-    list( GET CGAL_VERSION_TOKENS 2 CGAL_BUGFIX_VERSION )
-
-    # The following condition will be true the token #2 is not a number (if
-    # it is for example "I" or "Ic"):
-    if(NOT CGAL_BUGFIX_VERSION GREATER 0 AND NOT CGAL_BUGFIX_VERSION EQUAL 0)
-      set(CGAL_BUGFIX_VERSION 0)
-      if( CGAL_VERSION_TOKENS_LEN GREATER 3 )
-        list( GET CGAL_VERSION_TOKENS 3 CGAL_BUILD_VERSION )
-      endif()
-    else()
-      if( CGAL_VERSION_TOKENS_LEN GREATER 4 )
-        list( GET CGAL_VERSION_TOKENS 4 CGAL_BUILD_VERSION )
-      endif()
-    endif()
-    # If CGAL_BUILD_VERSION is not a strictly positive number, error
-    if(NOT CGAL_BUILD_VERSION GREATER 0)
-      message(WARNING 
-        "Error parsing VERSION file: CGAL_BUILD_VERSION is not a number.\n"
-        "The content of the VERSION file is:\n${CGAL_VERSION}\n"
-        "CGAL_BUILD_VERSION was set to:\n${CGAL_BUILD_VERSION}")
-      set(CGAL_BUILD_VERSION 1000)
-    endif()
-  endif()
-
-  if(NOT CGAL_BUGFIX_VERSION)
-    set(CGAL_BUGFIX_VERSION 0)
-  endif()
-
-endif()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= BASIC SETUP =-
-#
-#--------------------------------------------------------------------------------------------------
-
-message( STATUS "CGAL_MAJOR_VERSION=${CGAL_MAJOR_VERSION}" )
-message( STATUS "CGAL_MINOR_VERSION=${CGAL_MINOR_VERSION}" )
-message( STATUS "CGAL_BUGFIX_VERSION=${CGAL_BUGFIX_VERSION}" )
-if(CGAL_BUILD_VERSION LESS 1000)
-  message( STATUS "CGAL_BUILD_VERSION=${CGAL_BUILD_VERSION}" )
-endif()
-
-# SONAME, SOVERSION
-#
-# The rule is that each new release or bug fix release should increse the soversion.
-#
-# SOVERSION is $(SONAME_VERSION).$(SOVERSION_MINOR).$(SOVERSION_RELEASE)
-#
-# - If the binary interface of libraries do not change from previous release
-#   (example: most bug fix releases), increase SOVERSION_RELEASE (this third number).
-# - If the binary interface is changed, but remains compatible with
-#   previous release (example: only addition of new functions), then increase
-#   SOVERSION_MINOR (second number) and set SOVERSION_RELEASE to 0.
-# - If the binary interface is changed in an incompatible way to previous
-#   release, then increase the SONAME_VERSION, and set the two other
-#   numbers to 0.
-# 
-# SOVERSION history: 
-#   CGAL<=3.5  : (unversionned)
-#   CGAL-3.5   : 4.0.0
-#   CGAL-3.5.1 : 4.0.1
-#   CGAL-3.6   : 5.0.0
-#   CGAL-3.6.1 : 5.0.0 (should have been 5.0.1)
-#   CGAL-3.7   : 6.0.0 (certainly: some types have been turned from int to
-#                        std::size_t, which is different on some platforms)
-#   CGAL-3.8   : 7.0.0 (At least CGAL::Random has changed its member fields.)
-#   CGAL-3.9   : 8.0.0 (No way to check the binary compatibility.)
-#   CGAL-4.0   : 9.0.0 (No way to check the binary compatibility.)
-#   CGAL-4.1   : 10.0.0 (No way to check the binary compatibility.)
-#   CGAL-4.2   : 10.0.1 (Nothing different in CGAL compiled libraries¹.)
-#   CGAL-4.3   : 10.0.2 (Nothing different in CGAL compiled libraries¹.)
-#   CGAL-4.4   : 10.0.3 (Nothing different in CGAL compiled libraries¹.)
-#   CGAL-4.5   : 10.0.4 (Nothing different in CGAL compiled libraries¹.)
-#   CGAL-4.6   : 11.0.0 (int->size_t in CGAL_ImageIO)
-# ¹) According to http://upstream-tracker.org/versions/cgal.html
-
-set( CGAL_SONAME_VERSION "11" )
-set( CGAL_SOVERSION      "11.0.0" )
-
-message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" )
-message( STATUS "CGAL_SOVERSION     =${CGAL_SOVERSION}" )
-set( CGAL_BUILDING_LIBS TRUE )
-
-set( CGAL_VERSION_DIR     CGAL-${CGAL_VERSION} )
-set( CGAL_MODULES_REL_DIR cmake/modules )
-set( CGAL_MODULES_DIR     ${CGAL_INSTALLATION_PACKAGE_DIR}/${CGAL_MODULES_REL_DIR} )
-
-include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
-cgal_setup_module_path()
-
-message( STATUS "CGAL_REFERENCE_CACHE_DIR=${CGAL_REFERENCE_CACHE_DIR}" )
-
-if ( RUNNING_CGAL_AUTO_TEST )
-  message(STATUS "Operating system:")
-  execute_process(COMMAND uname -a
-    TIMEOUT 5
-    OUTPUT_VARIABLE uname_a
-    ERROR_VARIABLE uname_a)
-  message(STATUS "${uname_a}")
-  CGAL_display_compiler_version()
-  if ( NOT "${CGAL_REFERENCE_CACHE_DIR}" STREQUAL "" )
-    if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR} )
-      if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR}/CMakeCache.txt )
-        message( STATUS "Loading reference cache from ${CGAL_REFERENCE_CACHE_DIR}" )
-        load_cache( ${CGAL_REFERENCE_CACHE_DIR} 
-          EXCLUDE CGAL_Core_LIBRARY 
-                  CGAL_CORE_PACKAGE_DIR
-                  WITH_CGAL_Core
-                  CGAL_INSTALLATION_PACKAGE_DIR
-                  CGAL_MAINTENANCE_PACKAGE_DIR
-                  CGAL_PDB_BINARY_DIR
-                  CGAL_PDB_SOURCE_DIR
-                  CGAL_Qt3_SOURCE_DIR
-                  CGAL_BINARY_DIR
-                  CGAL_SOURCE_DIR)
-#        message("List of cache variables:")
-
-        ## The following lines removes nasty loaded cache values. We do not
-        ## want that the current build tree depends on binaries that were
-        ## build in the reference build tree.
-        get_property(cache_variables DIRECTORY PROPERTY CACHE_VARIABLES)
-        foreach(var ${cache_variables}) 
-#          get_property(var_value CACHE ${var} PROPERTY VALUE)
-#          get_property(type CACHE ${var} PROPERTY TYPE)
-          string(REGEX MATCH "^CGAL(_.*_(DEPENDS|BINARY_DIR)|_.*LIBRARY)$" var_name_matches ${var})
-          if(var_name_matches)
-            unset(${var} CACHE)
-#          else()
-#            message("${var}:${var_type}=${var_value}")
-          endif()
-        endforeach()
-
-
-      endif()
-    endif()
-  endif()
-endif()
-
-include(CGAL_Common)
-include(CGAL_GeneratorSpecificSettings)
-include(CGAL_CheckCXXFileRuns)
-
-mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
-
-message( STATUS "USING CMake version: ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" )
-message( STATUS "System: ${CMAKE_SYSTEM_NAME}" )
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= FLAGS =-
-#
-#--------------------------------------------------------------------------------------------------
-
-if( MSVC )
-  
-  uniquely_add_flags ( CGAL_CXX_FLAGS "-D_CRT_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_DEPRECATE;-D_CRT_SECURE_NO_WARNINGS;-D_SCL_SECURE_NO_WARNINGS" )
-  uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:strict" )
-  uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:except-" )
-  uniquely_add_flags ( CGAL_CXX_FLAGS "/wd4503" ) # Suppress warnings C4503 about "decorated name length exceeded"
-  uniquely_add_flags ( CGAL_CXX_FLAGS "/bigobj" ) # Use /bigobj by default
-
-  if ( RUNNING_CGAL_AUTO_TEST )
-    set(CMAKE_CXX_WARNING_LEVEL 2 CACHE STRING "MSVC C++ compiler warning level" FORCE)
-    mark_as_advanced(CMAKE_CXX_WARNING_LEVEL)
-  endif()
-    
-endif()
-
-if( "${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro )
-  message( STATUS "Using SunPro compiler, using STLPort 4." )
-  
-  uniquely_add_flags( CGAL_CXX_FLAGS "-features=extensions;-library=stlport4;-D_GNU_SOURCE" )
-  uniquely_add_flags( CGAL_SHARED_LINKER_FLAGS "-library=stlport4" )
-  uniquely_add_flags( CGAL_EXE_LINKER_FLAGS    "-library=stlport4" )
-endif()
-
-if( "${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
-  message( STATUS "Intel compiler is detected." )
-  set( IntelCompiler_FOUND TRUE )
-
-  get_dependency_version(IntelCompiler)
-
-  if( "${IntelCompiler_VERSION}" LESS "1100" )
-    message("Intel Compiler version ${IntelCompiler_VERSION} is not supported by CGAL-${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}! (too old, must be 11.0 or after)")
-  else()
-    message( STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict" )
-    if(WIN32)
-      uniquely_add_flags( CGAL_CXX_FLAGS "/fp:strict" )
-    else()
-      uniquely_add_flags( CGAL_CXX_FLAGS "-fp-model strict" )
-    endif()
-  endif()
-endif()
-
-
-if ( CMAKE_COMPILER_IS_GNUCXX )
-
-  set( GCC_FOUND TRUE )
-  
-  get_dependency_version(GCC)
-  
-  if ( "${GCC_VERSION}" MATCHES "Not" OR "${GCC_VERSION}" MATCHES "Unknown" )
-    set( GCC_FOUND FALSE )
-  endif()
-  
-  if ( GCC_FOUND )
-  
-    if ( RUNNING_CGAL_AUTO_TEST )
-      uniquely_add_flags( CGAL_CXX_FLAGS "-Wall" )
-    endif()
-    
-    if ( "${GCC_VERSION}" MATCHES "^4." )
-      message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
-      uniquely_add_flags( CGAL_CXX_FLAGS "-frounding-math" )
-    endif()
-    
-    if ( "${GCC_VERSION}" MATCHES "^4.2" )
-      message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" )
-      uniquely_add_flags( CGAL_CXX_FLAGS "-fno-strict-aliasing" )
-    endif()
-    
-    if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" )
-      message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" )
-      uniquely_add_flags( CGAL_CXX_FLAGS "-mieee -mfp-rounding-mode=d" )
-    endif()
-    
-  endif()
-  
-endif()
-
-message( "== Generate version files (DONE) ==\n")
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= External libraries =-
-#
-#--------------------------------------------------------------------------------------------------
- 
-message("== Set up flags ==")
-
-include(CGAL_SetupFlags)
-
-message("== Set up flags (DONE) ==\n")
-
-message("== Detect external libraries ==")
-
-macro( add_config_flag flag )
-
-    if ( ${flag} )
-      file( APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "#define ${flag} 1\n\n")
-    else()
-      file( APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "//#define ${flag} 1\n\n")
-    endif()
-
-endmacro()
- 
-# this is the place to tell which external libs are supporting
-# Remarks: 
-#  External libs Qt3 and Qt34are configured when Qt3 or Qt4 as lib of cgal are required
-#  Coin is used in KDS, but no FindCoin or FindCOIN exists
-#  There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs
-list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
-if (NOT WIN32)
-  # GMPXX is not supported on WIN32 machines
-  list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 1 GMPXX)
-endif()
-
-# Where CMake is run several times, to avoid duplicates
-list(REMOVE_DUPLICATES CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
-hide_variable(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
-
-# set some to have special prefix
-macro( set_special_prefix library prefix)
-set(SPECIAL_PREFIXES "${SPECIAL_PREFIXES}set(CGAL_EXT_LIB_${library}_PREFIX \"${prefix}\")\n")
-set(CGAL_EXT_LIB_${library}_PREFIX ${prefix})
-endmacro()
-
-set_special_prefix(Qt4 QT)
-set_special_prefix(Eigen3 EIGEN3)
-set_special_prefix(QGLViewer QGLVIEWER)
-set_special_prefix(Coin3D COIN3D)
-
-# some libraries are essential (stl and Boost.Thread are treated in another way) 
-if($ENV{CGAL_DISABLE_GMP})
-  set(CGAL_DISABLE_GMP ON CACHE INTERNAL "")
-endif()
-if(CGAL_DISABLE_GMP)
-  message("Disable the GMP support")
-  list(LENGTH CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES CGAL_ESSENTIAL_LENGTH)
-  if(NOT CGAL_ESSENTIAL_LENGTH EQUAL 0)
-    list(REMOVE_ITEM CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
-  endif()
-  unset(CGAL_CONFIGURED_LIBRARIES)
-  unset(CGAL_CONFIGURED_LIBRARIES CACHE)
-  unset(GMP_FOUND)
-  unset(GMP_FOUND CACHE)
-  unset(GMPXX_FOUND)
-  unset(GMPXX_FOUND CACHE)
-  unset(MPFR_FOUND)
-  unset(MPFR_FOUND CACHE)
-  unset(WITH_CGAL_Core)
-  unset(WITH_CGAL_Core CACHE)
-  unset(WITH_GMP)
-  unset(WITH_GMP CACHE)
-  unset(WITH_GMPXX)
-  unset(WITH_GMPXX CACHE)
-  unset(WITH_MPFR)
-  unset(WITH_MPFR CACHE)
-
-  # Nasty trick to make sure <gmp.h> is not used when CGAL_DISABLE_GMP is TRUE
-  file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h"
-    "#error GMP is disabled by the CMake option CGAL_DISABLE_GMP")
-else()
-  list(APPEND      CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
-  # Where CMake is run several times, to avoid duplicates
-  list (REMOVE_DUPLICATES CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
-  file(REMOVE "${CMAKE_BINARY_DIR}/include/gmp.h")
-endif()
-hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
-
-foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) 
-
-  # set standard prefix
-  if(NOT DEFINED CGAL_EXT_LIB_${lib}_PREFIX)
-    set(CGAL_EXT_LIB_${lib}_PREFIX ${lib})
-  endif()
-  hide_variable(CGAL_EXT_LIB_${lib}_PREFIX)
-
-  # add option
-  list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION )
-  if ( "${POSITION}" STRGREATER "-1" ) # if lib is essential
-   option(WITH_${lib} "Select external library ${lib}" ON)
-  else()
-    option(WITH_${lib} "Select external library ${lib}" OFF)
-  endif()
-
-  if (WITH_${lib}) 
-    add_config_flag( ${CGAL_EXT_LIB_${lib}_PREFIX} )
-  endif()
-
-endforeach()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= DEPENDENCIES =-
-#
-#--------------------------------------------------------------------------------------------------
-
-#
-# The following variables are in the cache just so subdirectories can set them persistently.
-# But they are not intended to persist from run to run as normal cache variables.
-# Similar variables are created when a library is detected.
-#
-cache_set(CGAL_3RD_PARTY_PRECONFIGURED  "" )
-
-cache_set(CGAL_3RD_PARTY_DEFINITIONS    "" )
-cache_set(CGAL_3RD_PARTY_INCLUDE_DIRS   "" )
-cache_set(CGAL_3RD_PARTY_LIBRARIES      "" )
-cache_set(CGAL_3RD_PARTY_LIBRARIES_DIRS "" ) 
-
-# default is on, but some use-cases need to set it to off, e.g., debian packages
-option( CGAL_ENABLE_PRECONFIG "Select to allow to preconfiguration of external libraries" ON)
-
-# additional info: some header files in CGAL add additional code if
-# certain optional libs are installed, and some examples/tests rely on
-# this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL
-# and the example/test must be configured with MPFI (just one is not sufficient)
-
-option( CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "Select to allow to use all preconfigured external libraries" OFF)
- 
-include(CGAL_SetupDependencies)
-
-message("== Detect external libraries (DONE) ==\n")
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= Generation of compiler_config.h =-
-#
-#--------------------------------------------------------------------------------------------------
-
-# The variables set are the #defines expected by compiler_config.h
-# Note: CMake will not notice when files are added or removed
-# but this is probably OK for the installation procedure.
-
-message("== Write compiler_config.h ==")
-
-file(GLOB all_config_tests "${CGAL_INSTALLATION_PACKAGE_DIR}/config/testfiles/*.cpp")
-
-list( SORT all_config_tests )
-
-file( WRITE ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "//\n// compiler_config.h is included by CGAL headers to load the needed compiler settings.\n//\n// DO NOT EDIT compiler_config.h. It is generated by CMake.\n//\n\n")
-
-cache_get(CONFIG_CXX_FLAGS)
-
-foreach(config_test_cpp ${all_config_tests})
-    
-    # Test's name is .cpp's base name
-    get_filename_component(config_test_name ${config_test_cpp} NAME_WE)
-    
-    # Compile and run ${config_test_cpp}. Exit code is stored in ${config_test_name}.
-    if( RUNNING_CGAL_AUTO_TEST OR "${config_test_name}" MATCHES "^${config_test_name}$" OR NOT ${CONFIG_CXX_FLAGS} STREQUAL  ${CMAKE_CXX_FLAGS})
-
-      CHECK_CXX_FILE_RUNS(${config_test_cpp} ${config_test_name} ${config_test_name})
-
-      if ( ${config_test_name} )
-        cache_set ( ${config_test_name} 0 )
-      else()
-        cache_set ( ${config_test_name} 1 )
-      endif()  
-      
-    endif()
-    
-    add_config_flag( ${config_test_name} ${config_test_name} )
-    
-endforeach()
-
-cache_set(CONFIG_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-
-add_config_flag( CGAL_USE_GMP )
-add_config_flag( CGAL_USE_MPFR )
-add_config_flag( CGAL_USE_GMPXX )
-add_config_flag( CGAL_USE_LEDA )
-add_config_flag( CGAL_USE_MPFI )
-add_config_flag( CGAL_USE_RS )
-add_config_flag( CGAL_USE_NTL )
-
-add_config_flag( CGAL_BUILD_SHARED_LIBS )
-
-if (NOT ${WITH_CGAL_Core}) 
-  set(CGAL_USE_CORE FALSE)
-else()
-  set(CGAL_USE_CORE ${CGAL_USE_GMP})
-endif()
-add_config_flag( CGAL_USE_CORE )
-# ^^ there is CGAL_USE_CORE and not CGAL_HAS_CORE, as CORE is considered
-# as external lib and not as CGAL component (EBEB: 24 Jan 2012)
-
-if ( RUNNING_CGAL_AUTO_TEST AND MSVC )
-  file( APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h" "#include <CGAL/Testsuite/vc_debug_hook.h>\n\n" )
-endif()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= Installation Setup =-
-#
-#--------------------------------------------------------------------------------------------------
-
-set ( CGAL_INSTALL_INC_DIR "include" CACHE STRING "The folder where CGAL header files will be installed, relative to CMAKE_INSTALL_PREFIX" )
-set ( CGAL_INSTALL_LIB_DIR "lib"     CACHE STRING "The folder where CGAL libraries will be installed, relative to CMAKE_INSTALL_PREFIX" )
-
-if ( CGAL_WIN32_CMAKE_ON_CYGWIN )
-  exec_program(cygpath ARGS -w "${CMAKE_INSTALL_PREFIX}" OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX2 )
-  file ( TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX2} CMAKE_INSTALL_PREFIX )
-endif()
-
-set ( CGAL_INSTALL_BIN_DIR    "bin"                     
-  CACHE STRING "The folder where CGAL user-side scripts will be installed, relative to CMAKE_INSTALL_PREFIX" 
-  )
-
-set ( CGAL_INSTALL_CMAKE_DIR "${CGAL_INSTALL_LIB_DIR}/CGAL"
-  CACHE STRING "The folder where CGAL CMake modules will be installed, relative to CMAKE_INSTALL_PREFIX" 
-  )
-
-set ( CGAL_INSTALL_DOC_DIR "share/doc/${CGAL_VERSION_DIR}"  
-  CACHE STRING "The folder where CGAL documentation and license files will be installed, relative to CMAKE_INSTALL_PREFIX" 
-  )
-
-set ( CGAL_INSTALL_MAN_DIR "share/man/man1"  
-  CACHE STRING "The folder where manual pages for CGAL scripts will be installed, relative to CMAKE_INSTALL_PREFIX" 
-  )
-
-message("== Write compiler_config.h (DONE) ==\n")
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= Build =-
-#
-#--------------------------------------------------------------------------------------------------
-
-message("== Generating build files ==")
-
-set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
-
-set(CGAL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
-
-foreach (package ${CGAL_CONFIGURED_PACKAGES})
-  set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include)
-endforeach()
-
-include_directories (${CGAL_INCLUDE_DIRS})
-
-cache_get(CGAL_LIBRARY)
-cache_get(CGAL_3RD_PARTY_PRECONFIGURED )
-
-cache_get(CGAL_3RD_PARTY_DEFINITIONS   )
-cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS  )
-cache_get(CGAL_3RD_PARTY_LIBRARIES     )
-cache_get(CGAL_3RD_PARTY_LIBRARIES_DIRS) 
-
-add_subdirectory(src)
-
-hide_variable(EXECUTABLE_OUTPUT_PATH)
-hide_variable(LIBRARY_OUTPUT_PATH)
-
-#
-# Repeat some problems
-#
-message("== Generating build files (DONE) ==\n")
-
-if (CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES )
-
-  message( STATUS "Problems: ")
-
-  if (CGAL_DUPLICATE_HEADER_FILES)
-    message(WARNING "WARNING: Duplicate header files")
-    foreach(hfile ${CGAL_DUPLICATE_HEADER_FILES})
-      message(STATUS "  File '${hfile}' multiply found in ")
-      foreach (package ${CGAL_CONFIGURED_PACKAGES})
-        file(GLOB_RECURSE CGAL_PACKAGE_HEADER_FILES FOLLOW_SYMLINKS ${package}/*.h)
-        foreach (file ${CGAL_PACKAGE_HEADER_FILES})
-          string(REPLACE "${package}/" "" pure_file ${file})
-          if ("${pure_file}" STREQUAL "${hfile}")
-            message(STATUS "    ${package}")
-          endif()
-        endforeach()
-      endforeach()
-    endforeach()
-  endif()
-
-  if (CGAL_DUPLICATE_CPP_FILES)
-    message(WARNING "WARNING: Duplicate cpp files")
-    foreach(cfile ${CGAL_DUPLICATE_CPP_FILES})
-      message(STATUS "  File '${cfile}' multiply found in ")
-      foreach (package ${CGAL_CONFIGURED_PACKAGES})
-        file(GLOB_RECURSE CGAL_PACKAGE_CPP_FILES FOLLOW_SYMLINKS ${package}/*.cpp)
-        foreach (file ${CGAL_PACKAGE_CPP_FILES})
-          string(REPLACE "${package}/" "" pure_file ${file})
-          if ("${pure_file}" STREQUAL "${cfile}")
-            message(STATUS "    ${package}")
-          endif()
-        endforeach()
-      endforeach()
-    endforeach()
-  endif()
-
-endif()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= USER SIDE SETTINGS =-
-#
-#--------------------------------------------------------------------------------------------------
-
-# Set CGAL_LIBRARY_INSTALLED, CGAL_Qt3_LIBRARY_INSTALLED and so on. Those
-# variables are the path to the libraries installed by the install
-# target. Used in the generation of the installed CGALConfig.cmake
-foreach(lib ${CGAL_CONFIGURED_LIBRARIES} CGAL) # note the added fake 'CGAL'
- if(${lib}_LIBRARY)
-    get_filename_component(lib_name "${${lib}_LIBRARY}" NAME)
-    set(${lib}_LIBRARY_INSTALLED "${CMAKE_INSTALL_PREFIX}/${CGAL_INSTALL_LIB_DIR}/${lib_name}")
- else()
-    set(${lib}_LIBRARY_INSTALLED "")
-  endif()
-  hide_variable(${lib}_LIBRARY_INSTALLED)
-endforeach()
-
-create_CGALconfig_files()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= Installation Commands =-
-#
-#--------------------------------------------------------------------------------------------------
-
-# DESTINATION option is mandatory; skipping it breaks CPack!
-
-if(CGAL_INSTALL_DOC_DIR)
-  install(FILES AUTHORS CHANGES LICENSE LICENSE.FREE_USE LICENSE.GPL LICENSE.LGPL DESTINATION ${CGAL_INSTALL_DOC_DIR} )
-endif()
-
-#install all includes collected in trunk et cetera
-
-
-foreach (dir ${CGAL_CONFIGURED_PACKAGES})
-  if (EXISTS ${dir}/include/CGAL) 
-    install(DIRECTORY ${dir}/include/CGAL              DESTINATION ${CGAL_INSTALL_INC_DIR} PATTERN ".svn" EXCLUDE)
-  endif()
-endforeach()
-install(DIRECTORY ${CMAKE_BINARY_DIR}/include/CGAL     DESTINATION ${CGAL_INSTALL_INC_DIR} PATTERN ".svn" EXCLUDE)
-
-file(GLOB scripts "scripts/*")
-list(REMOVE_ITEM scripts 
-  ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cgal_create_assertions.sh 
-  ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cgal_create_cmake_script_with_options)
-install(PROGRAMS ${scripts} DESTINATION ${CGAL_INSTALL_BIN_DIR})
-
-install(DIRECTORY ${CGAL_MODULES_REL_DIR}/                DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
-install(FILES     ${CGAL_MODULES_REL_DIR}/UseCGAL.cmake   DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
-
-
-if ( GMP_IN_AUXILIARY )
-  install(DIRECTORY auxiliary/gmp/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
-  install(DIRECTORY auxiliary/gmp/lib/     DESTINATION ${CGAL_INSTALL_LIB_DIR} )
-endif()
-
-if ( ZLIB_IN_AUXILIARY )
-  install(DIRECTORY auxiliary/zlib/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
-  install(DIRECTORY auxiliary/zlib/lib/     DESTINATION ${CGAL_INSTALL_LIB_DIR} )
-endif()
-
-
-install(FILES ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
-
-if(CGAL_INSTALL_MAN_DIR)
-  install(FILES auxiliary/cgal_create_cmake_script.1 DESTINATION ${CGAL_INSTALL_MAN_DIR} )
-endif()
-
-#--------------------------------------------------------------------------------------------------
-#
-#              -= Special installation commands to copy FindCGAL to the cmake directory =-
-#
-#--------------------------------------------------------------------------------------------------
-
-# Installing FindCGAL into cmake itself is implemented as a custom target
-# because it requires superuser privileges
-
-if ( NOT "${CMAKE_ROOT}" STREQUAL "" )
-  if ( EXISTS ${CMAKE_ROOT}/Modules )
-    add_custom_target( install_FindCGAL
-                      COMMAND ${CMAKE_COMMAND} -E copy ${CGAL_MODULES_DIR}/FindCGAL.cmake ${CMAKE_ROOT}/Modules
-                    ) 
-  endif()
-endif()  
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                    -= APPLICATIONS =-
-#
-#--------------------------------------------------------------------------------------------------
-
-macro( add_programs subdir target ON_OFF )
-
-  cache_set( CGAL_EXECUTABLE_TARGETS "" )
-  
-  add_custom_target( ${target} )
-  
-  option( WITH_${target} "Select ${target}" ${ON_OFF} )
-  if ( WITH_${target} )
-    add_subdirectory( ${subdir} EXCLUDE_FROM_ALL )
-  endif()
-  
-  cache_get( CGAL_EXECUTABLE_TARGETS )
-  
-  foreach( CGAL_EXECUTABLE_TARGET ${CGAL_EXECUTABLE_TARGETS} )
-    add_dependencies( ${target} ${CGAL_EXECUTABLE_TARGET} )
-  endforeach()
-     
-endmacro()
-
-# This allows programs to locate CGALConfig.cmake
-set(CGAL_DIR ${CMAKE_BINARY_DIR} )
-
-if ( NOT RUNNING_CGAL_AUTO_TEST )
-
-  add_programs(examples examples OFF )
-  add_programs(demo     demos    OFF )
-  if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
-    add_programs(test     tests    OFF )
-  endif()
-endif()
-
-#--------------------------------------------------------------------------------------------------
-#
-#                                            -= CPack =-
-#
-#--------------------------------------------------------------------------------------------------
-
-#option( WITH_CPACK "Create package generation rules")
-if( WITH_CPACK AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
-
-    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CGAL - Computational Geometry Algorithms Library")
-    set(CPACK_PACKAGE_VENDOR "CGAL Open Source Project")
-    set(CPACK_PACKAGE_DESCRIPTION_FILE "${CGAL_INSTALLATION_PACKAGE_DIR}/README")
-    set(CPACK_RESOURCE_FILE_LICENSE "${CGAL_INSTALLATION_PACKAGE_DIR}/LICENSE")
-    set(CPACK_PACKAGE_VERSION_MAJOR "${CGAL_MAJOR_VERSION}")
-    set(CPACK_PACKAGE_VERSION_MINOR "${CGAL_MINOR_VERSION}")
-    set(CPACK_PACKAGE_VERSION_PATCH "${CGAL_BUGFIX_VERSION}")
-    set(CPACK_PACKAGE_INSTALL_DIRECTORY "CGAL ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
-    set(CPACK_SOURCE_PACKAGE_FILE_NAME "CGAL-${CGAL_VERSION}")
-    set(CPACK_RESOURCE_FILE_LICENSE "${CGAL_INSTALLATION_PACKAGE_DIR}/LICENSE")
-    
-    if(NOT DEFINED CPACK_SYSTEM_NAME)
-      set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
-    endif()
-    
-    if(${CPACK_SYSTEM_NAME} MATCHES Windows)
-      if(CMAKE_CL_64)
-        set(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
-      else()
-        set(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
-      endif()
-    endif()
-    
-    if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
-      set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
-    endif()
-    
-    set(CPACK_PACKAGE_EXECUTABLES "CGAL" "CGAL")
-
-    if(WIN32 AND NOT UNIX)
-        set(CPACK_GENERATOR "NSIS")
-        # There is a bug in NSI that does not handle full unix paths properly. Make
-        # sure there is at least one set of four (4) backlasshes.
-        #set(CPACK_PACKAGE_ICON "${CGAL_INSTALLATION_PACKAGE_DIR}\\\\cgal_install.gif")
-        #set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\CGAL.exe")
-        set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Computational Geometry Algorithms Library")
-        set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.cgal.org")
-        set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.cgal.org")
-        set(CPACK_NSIS_CONTACT "info at cgal.org")
-        set(CPACK_NSIS_MODIfY_PATH ON)
-    else()
-        set(CPACK_STRIP_FILES "")
-        set(CPACK_SOURCE_STRIP_FILES "")
-    endif()
-
-    include(CPack)
-    
-endif()
-
-
-if ( CGAL_BRANCH_BUILD )
-  option(CGAL_ENABLE_CHECK_HEADERS 
-    "Enable the special targets \"check_pkg_headers\", and \"check_pkg_<package>_headers\" for each package"
-    FALSE)
-
-  if(CGAL_ENABLE_CHECK_HEADERS)
-
-    if(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
-      execute_process(COMMAND 
-        ${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CMAKE_CURRENT_SOURCE_DIR}/config/support/test_syntaxonly.cpp
-        ERROR_QUIET
-        RESULT_VARIABLE ok)
-      if(ok EQUAL 0)
-        set(CGAL_CHECK_SYNTAX_ONLY ON CACHE INTERNAL "")
-      else()
-        set(CGAL_CHECK_SYNTAX_ONLY OFF CACHE INTERNAL "")
-      endif()
-    endif(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
-
-    if(NOT CGAL_CHECK_SYNTAX_ONLY)
-      message(FATAL_ERROR "Your compiler does not seem to support -fsyntax-only.
-You must disable CGAL_ENABLE_CHECK_HEADERS.")
-    endif()
-
-    ## Fill the variable include_options with all the -I and -isystem options
-    set(include_options)
-    foreach (incdir ${CGAL_INCLUDE_DIRS})
-      list(APPEND include_options "-I${incdir}")
-    endforeach()
-    foreach (incdir ${CGAL_3RD_PARTY_INCLUDE_DIRS})
-      list(APPEND include_options "-isystem${incdir}")
-    endforeach()
-    include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
-
-    ## Loop on package and headers
-    set(check_pkg_target_list)
-    foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
-      if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
-        set(depends "")
-        file(GLOB ${package}_HEADERS 
-          RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" 
-          "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h")
-        foreach(header ${${package}_HEADERS})
-          string(REPLACE "/" "__" header2 "${header}")
-          string(REPLACE "." "_" header2 "${header2}")
-          add_custom_command(OUTPUT check_${header2}
-            COMMAND ${CMAKE_CXX_COMPILER} ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ${include_options} -x c++ -fsyntax-only "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
-            COMMAND ${CMAKE_COMMAND} -E touch check_${header2}
-            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
-            VERBATIM
-            COMMENT "Check header ${header}"
-            )
-          list(APPEND depends check_${header2})
-        endforeach() # look on headers
-        add_custom_target(check_pkg_${package}_headers DEPENDS ${depends})
-        list(APPEND check_pkg_target_list check_pkg_${package}_headers)
-      endif() # if the package has an include directory
-    endforeach() # loop on packages
-    add_custom_target(check_headers DEPENDS ${check_pkg_target_list})
-  endif()
-endif( CGAL_BRANCH_BUILD )
diff --git a/3rdparty/CGAL-4.6/INSTALL.md b/3rdparty/CGAL-4.6/INSTALL.md
deleted file mode 100644
index e5277a9..0000000
--- a/3rdparty/CGAL-4.6/INSTALL.md
+++ /dev/null
@@ -1,215 +0,0 @@
-INTRODUCTION
-============
-
-This file describes how to install CGAL. The instructions in this file
-are for the most common use cases, and cover the command line tools.
-
-For further information, or in case of problems, please see the
-detailed installation instructions, which can be found in this
-distribution in the file ./doc_html/index.html or on the CGAL website
-http://doc.cgal.org/latest/Manual/installation.html
-
-The documentation of CGAL is available in PDF and HTML formats.
-It is not bundled with the software but can be downloaded separately
-at <http://www.cgal.org/Manual>.
-
-For more information about CGAL, see the <http://www.cgal.org/>.
-
-In the current file, x.y is an implicit replacement for the current version
-of CGAL (3.5.1, 3.6, and so on).
-
-
-PREREQUISITES
-=============
-
-To install CGAL, you need 'cmake' and several third-party libraries.
-Some are essential for entire CGAL, some are mandatory for particular
-CGAL packages, some are only needed for demos.
-
-   * CMake (>= 2.6.2), the build system used by CGAL
-     Required for building CGAL
-     On Windows, CMake >= 2.8.6 is required.
-
-   * Boost (>= 1.48)
-     Required for building CGAL and for applications using CGAL
-     Required compiled Boost library: Boost.Thread, Boost.System
-     Optional compiled Boost library: Boost.Program_options
-     http://www.boost.org/   or   http://www.boostpro.com/products/free/
-     You need the former if you plan to compile the boost libraries yourself,
-     for example because you target 64 bit applications for XP64
-
-   * Exact Arithmetic
-     CGAL combines floating point arithmetic with exact arithmetic, in order
-     to be fast and reliable. CGAL offers support for GMP and MPFR, for LEDA
-     exact number types, as well as a built-in exact number type used when
-     none of the other two is installed.
-     Required by several examples which have hard coded the number type.
-
-     - GMP (>= 4.1.4)
-       http://gmplib.org/
-       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
-       based on http://fp.gladman.plus.com/computing/gmp4win.htm
-
-     - MPFR (>= 2.2.1)
-       http://www.mpfr.org/
-       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
-       based on http://fp.gladman.plus.com/computing/gmp4win.htm
-
-     - LEDA (>= 6.2)
-       http://www.algorithmic-solutions.com/leda/index.htm
-
-   * Visualization
-     Required for most demos
-
-     - Qt3 (>= 3.3)
-       ftp://ftp.qt.nokia.com/qt/source/
-
-     - Qt4 (>= 4.3)
-       http://qt.nokia.com/
-
-     - libQGLViewer
-       http://www.libqglviewer.com/
-
-     - Geomview
-       http://www.geomview.org/
-       Not supported with Visual C++
-
-   * Numerical Libraries
-     - EIGEN (>=3.1)
-       Required by the packages:
-       o Estimation of Local Differential Properties of Point-Sampled Surfaces
-       o Approximation of Ridges and Umbilics on Triangulated Surface Meshes
-       o Planar Parameterization of Triangulated Surface Meshes
-       o Surface Reconstruction from Point Sets
-       http://eigen.tuxfamily.org
-
-     - BLAS, LAPACK, ATLAS
-       Required by the packages (if EIGEN is not available):
-       o Estimation of Local Differential Properties of Point-Sampled Surfaces
-       o Approximation of Ridges and Umbilics on Triangulated Surface Meshes
-       o Planar Parameterization of Triangulated Surface Meshes
-       http://www.netlib.org/blas/, http://www.netlib.org/lapack/
-       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
-
-     - MPFI
-       Required by the package:
-       o Algebraic Kernel
-       https://gforge.inria.fr/projects/mpfi/
-       (or shipped with RS http://vegas.loria.fr/rs/)
-
-     - RS (root isolation)
-       Required by the package:
-       o Algebraic Kernel
-       http://vegas.loria.fr/rs/
-
-     - NTL (Number Type Theory)
-       Optional for the packages:
-       o Polynomial
-       o Algebraic Kernel
-       http://www.shoup.net/ntl/
-
-   * Miscellaneous
-
-     - zlib
-       Optional for the package:
-       o Surface Mesh Generator can read compressed images directly
-       http://www.zlib.net/
-
-     - ESBTL
-       Optional to read PDB files:
-       o Import data from a PDB file as CGAL points or weighted points.
-         An example is given in package Skin_surface (see example skin_surface_pdb_reader.cpp)
-       http://esbtl.sourceforge.net/
-
-CONFIGURATION
-=============
-
-To configure CGAL, type
-```
-  cmake .
-```
-in the directory that contains this INSTALL file. You can add several options
-to this command. The most important ones are
-
-* `-DCMAKE_INSTALL_PREFIX=<dir>`          installation directory [/usr/local]
-* `-DCMAKE_BUILD_TYPE=<Debug|Release>`    build type [Release]
-* `-DBUILD_SHARED_LIBS=<TRUE|FALSE>`      shared or static libraries [TRUE]
-* `-DCMAKE_C_COMPILER=<program>`          C compiler [gcc]
-* `-DCMAKE_CXX_COMPILER=<program>`        C++ compiler [g++]
-
-In case you want to add additional compiler and linker flags, you can use
-
-* `-DCGAL_CXX_FLAGS`                      additional compiler flags
-* `-DCGAL_MODULE_LINKER_FLAGS`            add. linker flags (static libraries)
-* `-DCGAL_SHARED_LINKER_FLAGS`            add. linker flags (shared libraries)
-* `-DCGAL_EXE_LINKER_FLAGS`               add. linker flags (executables)
-
-Variants with the additional suffix "_DEBUG" and "_RELEASE" allow to set
-separate values for debug and release builds. In case you do not want to add
-additional flags, but to override the default flags, replace "CGAL" by
-"CMAKE" in the variable names above.
-
-By default demos and examples are not configured. If you want to configure
-them at the same time as the CGAL library, you can use
-
-*  `-DWITH_examples=true`
-*  `-DWITH_demos=true`
-
-Note that CMake maintains a cache name `CMakeCache.txt`. If you change options
-(or your environment changes), it is best to remove that file to avoid
-problems.
-
-
-BUILDING
-========
-
-To build the CGAL libraries, type
-```
-  make
-```
-(or nmake in a Windows command prompt).
-If you want, you can install the CGAL header and libraries. To do so, type
-```
-  make install
-```
-You can build all demos or examples by typing
-```
-  make demos
-  make examples
-```
-If you are interested in the demos or examples of just a particular module,
-you can build them in the following way:
-```
-  make -C demo/Alpha_shapes_2        (or: cd demo/Alpha_shapes_2; make)
-  make -C examples/Alpha_shapes_2    (or: cd examples/Alpha_shapes_2; make)
-```
-A list of all available make targets can be obtained by
-```
-  make help
-```
-
-OUT-OF-SOURCE BUILDS
-====================
-
-The above instructions build the CGAL library in the same directory tree as
-the CGAL sources. Sometimes it is advisable to place all the generated files
-somewhere else. For example, if you want to build the library in several
-configurations (debug and release, different compilers, and so on). Using
-different build directories keeps all the generated files separated for each
-configuration.
-
-In the following, `$CGAL_SRC` denotes the directory with the CGAL sources;
-`$CGAL_BUILD` is an arbitrary directory where the generated files will be
-placed. You can perform an out-of-source build as follows:
-```
-  mkdir $CGAL_BUILD
-  cd $CGAL_BUILD
-  cmake [options] $CGAL_SRC
-  make
-  make install                       (if desired)
-  make demos                         (if desired)
-  make examples                      (if desired)
-```
-Basically, the only difference is the last parameter of the `cmake` command:
-`$CGAL_SRC` instead of `.` .
-
diff --git a/3rdparty/CGAL-4.6/LICENSE b/3rdparty/CGAL-4.6/LICENSE
deleted file mode 100644
index c33b0a7..0000000
--- a/3rdparty/CGAL-4.6/LICENSE
+++ /dev/null
@@ -1,42 +0,0 @@
-LICENSE
-----------------------------------------------------------------------------
-
-The CGAL software consists of several parts, each of which is licensed under
-an open source license. It is also possible to obtain commercial licenses
-from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL.
-
-The source code of the CGAL library can be found in the directories
-"src/CGAL", "src/CGALQt", "src/CGALQt4" and "include/CGAL" (with the
-exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
-It is specified in each file of the CGAL library which
-license applies to it. This is either the GNU General Public License
-or the GNU Lesser General Public License (as published by the Free Software
-Foundation; either version 3 of the License or (at your option) any later
-version). The texts of both licenses can be found in the files LICENSE.GPL
-and LICENSE.LGPL.
-
-The following files are modified versions taken from Boost and are licensed
-under the Boost Software License (see LICENSE.BSL).
-- include/CGAL/auto_link/auto_link.h
-- include/CGAL/internal/container_fwd_fixed.hpp
-- include/CGAL/internal/boost/array_binary_tree.hpp
-- include/CGAL/internal/boost/mutable_heap.hpp
-- include/CGAL/internal/boost/mutable_queue.hpp
-
-Distributed along with CGAL (for the users' convenience), but not part of
-CGAL, are the following third-party libraries, available under their own
-licenses:
-
-- CORE, in the directories "include/CGAL/CORE" and "src/CGAL_Core", is
-  licensed under the LGPL (see LICENSE.LGPL).
-- ImageIO, in the directory "src/CGAL_ImageIO", is licensed under the LGPL
-  (see LICENSE.LGPL).
-- OpenNL, in the directory "include/CGAL/OpenNL", is licensed under the LGPL
-  (see LICENSE.LGPL).
-
-All other files that do not have an explicit copyright notice (e.g., all
-examples and some demos) are licensed under a very permissive license. The
-exact license text can be found in the file LICENSE.FREE_USE.
-
-More information on the CGAL license can be found at
-http://www.cgal.org/license.html
diff --git a/3rdparty/CGAL-4.6/VERSION b/3rdparty/CGAL-4.6/VERSION
deleted file mode 100644
index be9fc83..0000000
--- a/3rdparty/CGAL-4.6/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-4.6
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/auxiliary/cgal_create_cmake_script.1 b/3rdparty/CGAL-4.6/auxiliary/cgal_create_cmake_script.1
deleted file mode 100644
index 3dfb742..0000000
--- a/3rdparty/CGAL-4.6/auxiliary/cgal_create_cmake_script.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.TH CGAL_CREATE_CMAKE_SCRIPT "1" "April 2015" "CGAL 4.6" "User Commands"
-.SH NAME
-cgal_create_cmake_script \- create a cmake script for applications using CGAL
-.SH SYNOPSIS
-.B cgal_create_cmake_script
-.BR [ example | demo | test ]
-.SH DESCRIPTION
-The script
-.B cgal_create_cmake_script
-allows the simple creation of cmake scripts for applications which use the CGAL
-library. The parameter selects one of three script types, the default type
-is
-.BR example .
-.SH OPTIONS
-.PP
-.TP
-.B example
-Create a cmake script for several simple applications. Each
-.I C
-and
-.IR cpp
-file in the current directory containing a
-.I main()
-function is compiled and linked as a separate executable.
-.TP
-.B demo
-Create a cmake script for a single application including Qt3 support. All
-.I C
-and
-.IR cpp
-files in the current directory are compiled and linked into one executable.
-.TP
-.B test
-Create a cmake script that is suited for the testsuite used by the CGAL developers.
-.SH AUTHOR
-The CGAL project (http://www.cgal.org/).
-.SH "REPORTING BUGS"
-Report bugs to <cgal-discuss at inria.fr> (see http://www.cgal.org/
-for further instructions).
-.SH "SEE ALSO"
-The full documentation for CGAL is available at http://www.cgal.org/ in PDF and
-HTML format.
diff --git a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4-Copyright.txt b/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4-Copyright.txt
deleted file mode 100644
index 834c457..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4-Copyright.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-CMake was initially developed by Kitware with the following sponsorship:
-
- * National Library of Medicine at the National Institutes of Health
-   as part of the Insight Segmentation and Registration Toolkit (ITK).
-
- * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel 
-   Visualization Initiative.
-
- * National Alliance for Medical Image Computing (NAMIC) is funded by the
-   National Institutes of Health through the NIH Roadmap for Medical Research,
-   Grant U54 EB005149.
-
- * Kitware, Inc.
-
-The CMake copyright is as follows:
-
-Copyright (c) 2002 Kitware, Inc., Insight Consortium
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
- * The names of Kitware, Inc., the Insight Consortium, or the names of
-   any consortium members, or of any contributors, may not be used to
-   endorse or promote products derived from this software without
-   specific prior written permission.
-
- * Modified source versions must be plainly marked as such, and must
-   not be misrepresented as being the original software.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-See also the CMake web site: http://www.cmake.org for more information.
diff --git a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4.cmake b/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4.cmake
deleted file mode 100644
index cc7cd63..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/FindQt4.cmake
+++ /dev/null
@@ -1,1188 +0,0 @@
-#   This file, as well as:
-#     Qt4ConfigDependentSettings.cmake
-#     Qt4Macros.cmake
-#     UseQt4.cmake
-#   come from the distribution of CMake-2.8.1, unpatched
-#   See FindQt4-Copyright.txt for the license of those files.
-#   -- Laurent Rineau, 2010/08/02
-
-# - Find QT 4
-# This module can be used to find Qt4.
-# The most important issue is that the Qt4 qmake is available via the system path.
-# This qmake is then used to detect basically everything else.
-# This module defines a number of key variables and macros. 
-# The variable QT_USE_FILE is set which is the path to a CMake file that can be included 
-# to compile Qt 4 applications and libraries.  It sets up the compilation
-# environment for include directories, preprocessor defines and populates a
-# QT_LIBRARIES variable.
-#
-# Typical usage could be something like:
-#   find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
-#   include(${QT_USE_FILE})
-#   add_executable(myexe main.cpp)
-#   target_link_libraries(myexe ${QT_LIBRARIES})
-#
-# The minimum required version can be specified using the standard find_package()-syntax
-# (see example above). 
-# For compatibility with older versions of FindQt4.cmake it is also possible to
-# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the 
-# find_package(Qt4) command. 
-# If both are used, the version used in the find_package() command overrides the
-# one from QT_MIN_VERSION.
-#
-# When using the components argument, QT_USE_QT* variables are automatically set
-# for the QT_USE_FILE to pick up.  If one wishes to manually set them, the
-# available ones to set include:
-#                    QT_DONT_USE_QTCORE
-#                    QT_DONT_USE_QTGUI
-#                    QT_USE_QT3SUPPORT
-#                    QT_USE_QTASSISTANT
-#                    QT_USE_QAXCONTAINER
-#                    QT_USE_QAXSERVER
-#                    QT_USE_QTDESIGNER
-#                    QT_USE_QTMOTIF
-#                    QT_USE_QTMAIN
-#                    QT_USE_QTMULTIMEDIA
-#                    QT_USE_QTNETWORK
-#                    QT_USE_QTNSPLUGIN
-#                    QT_USE_QTOPENGL
-#                    QT_USE_QTSQL
-#                    QT_USE_QTXML
-#                    QT_USE_QTSVG
-#                    QT_USE_QTTEST
-#                    QT_USE_QTUITOOLS
-#                    QT_USE_QTDBUS
-#                    QT_USE_QTSCRIPT
-#                    QT_USE_QTASSISTANTCLIENT
-#                    QT_USE_QTHELP
-#                    QT_USE_QTWEBKIT
-#                    QT_USE_QTXMLPATTERNS
-#                    QT_USE_PHONON
-#                    QT_USE_QTSCRIPTTOOLS
-#
-#  QT_USE_IMPORTED_TARGETS 
-#        If this variable is set to TRUE, FindQt4.cmake will create imported
-#        library targets for the various Qt libraries and set the 
-#        library variables like QT_QTCORE_LIBRARY to point at these imported
-#        targets instead of the library file on disk. This provides much better 
-#        handling of the release and debug versions of the Qt libraries and is 
-#       also always backwards compatible, except for the case that dependencies
-#       of libraries are exported, these will then also list the names of the 
-#       imported targets as dependency and not the file location on disk. This
-#       is much more flexible, but requires that FindQt4.cmake is executed before
-#       such an exported dependency file is processed.
-#
-# There are also some files that need processing by some Qt tools such as moc
-# and uic.  Listed below are macros that may be used to process those files.
-#  
-#  macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
-#        create moc code from a list of files containing Qt class with
-#        the Q_OBJECT declaration.  Per-direcotry preprocessor definitions 
-#        are also added.  Options may be given to moc, such as those found
-#        when executing "moc -help".  
-#
-#  macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
-#        create code from a list of Qt designer ui files.
-#        Options may be given to uic, such as those found
-#        when executing "uic -help"
-#
-#  macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
-#        create code from a list of Qt resource files.
-#        Options may be given to rcc, such as those found
-#        when executing "rcc -help"
-#
-#  macro QT4_GENERATE_MOC(inputfile outputfile )
-#        creates a rule to run moc on infile and create outfile.
-#        Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
-#        because you need a custom filename for the moc file or something similar.
-#
-#  macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
-#        This macro is still experimental.
-#        It can be used to have moc automatically handled.
-#        So if you have the files foo.h and foo.cpp, and in foo.h a 
-#        a class uses the Q_OBJECT macro, moc has to run on it. If you don't
-#        want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
-#        #include "foo.moc"
-#        in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
-#        scan all listed files at cmake-time for such included moc files and if it finds
-#        them cause a rule to be generated to run moc at build time on the 
-#        accompanying header file foo.h.
-#        If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
-#
-#  macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
-#        create a the interface header and implementation files with the 
-#        given basename from the given interface xml file and add it to 
-#        the list of sources
-#
-#  macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
-#        create the interface header and implementation files 
-#        for all listed interface xml files
-#        the name will be automatically determined from the name of the xml file
-#
-#  macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
-#        create a dbus adaptor (header and implementation file) from the xml file
-#        describing the interface, and add it to the list of sources. The adaptor
-#        forwards the calls to a parent class, defined in parentheader and named
-#        parentclassname. The name of the generated files will be
-#        <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
-#        If <classname> is provided, then it will be used as the classname of the
-#        adaptor itself.
-#
-#  macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
-#        generate the xml interface file from the given header.
-#        If the optional argument interfacename is omitted, the name of the 
-#        interface file is constructed from the basename of the header with
-#        the suffix .xml appended.
-#        Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
-#
-#  macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... 
-#                                ts_files ... OPTIONS ...)
-#        out: qm_files
-#        in:  directories sources ts_files
-#        options: flags to pass to lupdate, such as -extensions to specify
-#        extensions for a directory scan.
-#        generates commands to create .ts (vie lupdate) and .qm
-#        (via lrelease) - files from directories and/or sources. The ts files are 
-#        created and/or updated in the source tree (unless given with full paths).
-#        The qm files are generated in the build tree.
-#        Updating the translations can be done by adding the qm_files
-#        to the source list of your library/executable, so they are
-#        always updated, or by adding a custom target to control when
-#        they get updated/generated.
-#
-#  macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
-#        out: qm_files
-#        in:  ts_files
-#        generates commands to create .qm from .ts - files. The generated
-#        filenames can be found in qm_files. The ts_files
-#        must exists and are not updated in any way.
-#
-#
-#  Below is a detailed list of variables that FindQt4.cmake sets.
-#  QT_FOUND         If false, don't try to use Qt.
-#  QT4_FOUND        If false, don't try to use Qt 4.
-#
-#  QT_VERSION_MAJOR The major version of Qt found.
-#  QT_VERSION_MINOR The minor version of Qt found.
-#  QT_VERSION_PATCH The patch version of Qt found.
-#
-#  QT_EDITION               Set to the edition of Qt (i.e. DesktopLight)
-#  QT_EDITION_DESKTOPLIGHT  True if QT_EDITION == DesktopLight
-#  QT_QTCORE_FOUND          True if QtCore was found.
-#  QT_QTGUI_FOUND           True if QtGui was found.
-#  QT_QT3SUPPORT_FOUND      True if Qt3Support was found.
-#  QT_QTASSISTANT_FOUND     True if QtAssistant was found.
-#  QT_QTASSISTANTCLIENT_FOUND  True if QtAssistantClient was found.
-#  QT_QAXCONTAINER_FOUND    True if QAxContainer was found (Windows only).
-#  QT_QAXSERVER_FOUND       True if QAxServer was found (Windows only).
-#  QT_QTDBUS_FOUND          True if QtDBus was found.
-#  QT_QTDESIGNER_FOUND      True if QtDesigner was found.
-#  QT_QTDESIGNERCOMPONENTS  True if QtDesignerComponents was found.
-#  QT_QTHELP_FOUND          True if QtHelp was found.
-#  QT_QTMOTIF_FOUND         True if QtMotif was found.
-#  QT_QTMULTIMEDIA_FOUND    True if QtMultimedia was found (since Qt 4.6.0).
-#  QT_QTNETWORK_FOUND       True if QtNetwork was found.
-#  QT_QTNSPLUGIN_FOUND      True if QtNsPlugin was found.
-#  QT_QTOPENGL_FOUND        True if QtOpenGL was found.
-#  QT_QTSQL_FOUND           True if QtSql was found.
-#  QT_QTSVG_FOUND           True if QtSvg was found.
-#  QT_QTSCRIPT_FOUND        True if QtScript was found.
-#  QT_QTSCRIPTTOOLS_FOUND   True if QtScriptTools was found.
-#  QT_QTTEST_FOUND          True if QtTest was found.
-#  QT_QTUITOOLS_FOUND       True if QtUiTools was found.
-#  QT_QTWEBKIT_FOUND        True if QtWebKit was found.
-#  QT_QTXML_FOUND           True if QtXml was found.
-#  QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
-#  QT_PHONON_FOUND          True if phonon was found.
-#
-#  QT_MAC_USE_COCOA    For Mac OS X, its whether Cocoa or Carbon is used.
-#                      In general, this should not be used, but its useful
-#                      when having platform specific code.
-#
-#  QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
-#                   You do not need to use this if you include QT_USE_FILE.
-#                   The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
-#                   to fit your current build type.  Those are not contained
-#                   in QT_DEFINITIONS.
-#                  
-#  QT_INCLUDES      List of paths to all include directories of 
-#                   Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
-#                   always in this variable even if NOTFOUND,
-#                   all other INCLUDE_DIRS are
-#                   only added if they are found.
-#                   You do not need to use this if you include QT_USE_FILE.
-#   
-#
-#  Include directories for the Qt modules are listed here.
-#  You do not need to use these variables if you include QT_USE_FILE.
-#
-#  QT_INCLUDE_DIR              Path to "include" of Qt4
-#  QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support" 
-#  QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant" 
-#  QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
-#  QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
-#  QT_QAXSERVER_INCLUDE_DIR    Path to "include/ActiveQt" (Windows only)
-#  QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"         
-#  QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus" 
-#  QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner" 
-#  QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
-#  QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui" 
-#  QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
-#  QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif" 
-#  QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" 
-#  QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork" 
-#  QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin" 
-#  QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL" 
-#  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
-#  QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql" 
-#  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
-#  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
-#  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
-#  QT_QTXML_INCLUDE_DIR        Path to "include/QtXml" 
-#  QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
-#  QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
-#  QT_QTSCRIPTTOOLS_INCLUDE_DIR       Path to "include/QtScriptTools"
-#                            
-#  QT_BINARY_DIR               Path to "bin" of Qt4
-#  QT_LIBRARY_DIR              Path to "lib" of Qt4
-#  QT_PLUGINS_DIR              Path to "plugins" for Qt4
-#  QT_TRANSLATIONS_DIR         Path to "translations" of Qt4
-#  QT_DOC_DIR                  Path to "doc" of Qt4
-#  QT_MKSPECS_DIR              Path to "mkspecs" of Qt4
-#
-#
-# The Qt toolkit may contain both debug and release libraries.
-# In that case, the following library variables will contain both.
-# You do not need to use these variables if you include QT_USE_FILE,
-# and use QT_LIBRARIES.
-#
-#  QT_QT3SUPPORT_LIBRARY            The Qt3Support library
-#  QT_QTASSISTANT_LIBRARY           The QtAssistant library
-#  QT_QTASSISTANTCLIENT_LIBRARY     The QtAssistantClient library
-#  QT_QAXCONTAINER_LIBRARY           The QAxContainer library (Windows only)
-#  QT_QAXSERVER_LIBRARY                The QAxServer library (Windows only)
-#  QT_QTCORE_LIBRARY                The QtCore library
-#  QT_QTDBUS_LIBRARY                The QtDBus library
-#  QT_QTDESIGNER_LIBRARY            The QtDesigner library
-#  QT_QTDESIGNERCOMPONENTS_LIBRARY  The QtDesignerComponents library
-#  QT_QTGUI_LIBRARY                 The QtGui library
-#  QT_QTHELP_LIBRARY                The QtHelp library
-#  QT_QTMOTIF_LIBRARY               The QtMotif library
-#  QT_QTMULTIMEDIA_LIBRARY          The QtMultimedia library
-#  QT_QTNETWORK_LIBRARY             The QtNetwork library
-#  QT_QTNSPLUGIN_LIBRARY            The QtNsPLugin library
-#  QT_QTOPENGL_LIBRARY              The QtOpenGL library
-#  QT_QTSCRIPT_LIBRARY              The QtScript library
-#  QT_QTSQL_LIBRARY                 The QtSql library
-#  QT_QTSVG_LIBRARY                 The QtSvg library
-#  QT_QTTEST_LIBRARY                The QtTest library
-#  QT_QTUITOOLS_LIBRARY             The QtUiTools library
-#  QT_QTWEBKIT_LIBRARY              The QtWebKit library
-#  QT_QTXML_LIBRARY                 The QtXml library
-#  QT_QTXMLPATTERNS_LIBRARY         The QtXmlPatterns library
-#  QT_QTMAIN_LIBRARY                The qtmain library for Windows
-#  QT_PHONON_LIBRARY                The phonon library
-#  QT_QTSCRIPTTOOLS_LIBRARY         The QtScriptTools library
-#  
-# also defined, but NOT for general use are
-#  QT_MOC_EXECUTABLE                   Where to find the moc tool.
-#  QT_UIC_EXECUTABLE                   Where to find the uic tool.
-#  QT_UIC3_EXECUTABLE                  Where to find the uic3 tool.
-#  QT_RCC_EXECUTABLE                   Where to find the rcc tool
-#  QT_DBUSCPP2XML_EXECUTABLE           Where to find the qdbuscpp2xml tool.
-#  QT_DBUSXML2CPP_EXECUTABLE           Where to find the qdbusxml2cpp tool.
-#  QT_LUPDATE_EXECUTABLE               Where to find the lupdate tool.
-#  QT_LRELEASE_EXECUTABLE              Where to find the lrelease tool.
-#  QT_QCOLLECTIONGENERATOR_EXECUTABLE  Where to find the qcollectiongenerator tool.
-#  QT_DESIGNER_EXECUTABLE              Where to find the Qt designer tool.
-#  QT_LINGUIST_EXECUTABLE              Where to find the Qt linguist tool.
-#  
-#
-# These are around for backwards compatibility 
-# they will be set
-#  QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
-#  QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
-#  
-# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
-#  QT_MT_REQUIRED         Qt4 is now always multithreaded
-#  
-# These variables are set to "" Because Qt structure changed 
-# (They make no sense in Qt4)
-#  QT_QT_LIBRARY        Qt-Library is now split
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
-IF( Qt4_FIND_COMPONENTS )
-  FOREACH( component ${Qt4_FIND_COMPONENTS} )
-    STRING( TOUPPER ${component} _COMPONENT )
-    SET( QT_USE_${_COMPONENT} 1 )
-  ENDFOREACH( component )
-  
-  # To make sure we don't use QtCore or QtGui when not in COMPONENTS
-  IF(NOT QT_USE_QTCORE)
-    SET( QT_DONT_USE_QTCORE 1 )
-  ENDIF(NOT QT_USE_QTCORE)
-  
-  IF(NOT QT_USE_QTGUI)
-    SET( QT_DONT_USE_QTGUI 1 )
-  ENDIF(NOT QT_USE_QTGUI)
-
-ENDIF( Qt4_FIND_COMPONENTS )
-
-# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
-  IF(Qt4_FIND_REQUIRED)
-    MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.  If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
-  ELSE(Qt4_FIND_REQUIRED)
-    IF(NOT Qt4_FIND_QUIETLY)
-      MESSAGE( STATUS    "Qt3 and Qt4 cannot be used together in one project.  If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
-    ENDIF(NOT Qt4_FIND_QUIETLY)
-    RETURN()
-  ENDIF(Qt4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
-
-
-INCLUDE(CheckSymbolExists)
-INCLUDE(MacroAddFileDependencies)
-
-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
-
-SET( QT_DEFINITIONS "")
-
-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-
-#  macro for asking qmake to process pro files
-MACRO(QT_QUERY_QMAKE outvar invar)
-  IF(QT_QMAKE_EXECUTABLE)
-    FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
-         "message(CMAKE_MESSAGE<$$${invar}>)")
-
-    # Invoke qmake with the tmp.pro program to get the desired
-    # information.  Use the same variable for both stdout and stderr
-    # to make sure we get the output on all platforms.
-    EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
-      WORKING_DIRECTORY  
-      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
-      OUTPUT_VARIABLE _qmake_query_output
-      RESULT_VARIABLE _qmake_result
-      ERROR_VARIABLE _qmake_query_output )
-
-    FILE(REMOVE_RECURSE 
-         "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
-
-    IF(_qmake_result)
-      MESSAGE(WARNING " querying qmake for ${invar}.  qmake reported:\n${_qmake_query_output}")
-    ELSE(_qmake_result)
-      STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
-    ENDIF(_qmake_result)
-
-  ENDIF(QT_QMAKE_EXECUTABLE)
-ENDMACRO(QT_QUERY_QMAKE)
-
-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
-# check for qmake
-# Debian uses qmake-qt4
-# macports' Qt uses qmake-mac
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
-  $ENV{QTDIR}/bin
-)
-
-IF (QT_QMAKE_EXECUTABLE)
-
-  IF(QT_QMAKE_EXECUTABLE_LAST)
-    STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
-  ENDIF(QT_QMAKE_EXECUTABLE_LAST)
-
-  SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-
-  SET(QT4_QMAKE_FOUND FALSE)
-  
-  EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-
-  # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
-  IF("${QTVERSION}" MATCHES "Unknown")
-    SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
-    FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
-      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
-      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
-      $ENV{QTDIR}/bin
-      )
-    IF(QT_QMAKE_EXECUTABLE)
-      EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} 
-        ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-    ENDIF(QT_QMAKE_EXECUTABLE)
-  ENDIF("${QTVERSION}" MATCHES "Unknown")
-
-  # check that we found the Qt4 qmake, Qt3 qmake output won't match here
-  STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
-  IF (qt_version_tmp)
-
-    # we need at least version 4.0.0
-    IF (NOT QT_MIN_VERSION)
-      SET(QT_MIN_VERSION "4.0.0")
-    ENDIF (NOT QT_MIN_VERSION)
-
-    #now parse the parts of the user given version string into variables
-    STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}")
-    IF (NOT req_qt_major_vers)
-      MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"")
-    ENDIF (NOT req_qt_major_vers)
-
-    # now parse the parts of the user given version string into variables
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
-
-    # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 )
-    # This implementation is a hack to avoid duplicating code and make sure we stay
-    # source-compatible with CMake 2.6.x
-    IF( Qt4_FIND_VERSION )
-      SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} )
-      SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} )
-      SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} )
-      SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} )
-    ENDIF( Qt4_FIND_VERSION )
-
-    IF (NOT req_qt_major_vers EQUAL 4)
-      MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
-    ENDIF (NOT req_qt_major_vers EQUAL 4)
-
-    # and now the version string given by qmake
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
-    # compute an overall version number which can be compared at once
-    MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
-    MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}")
-
-    # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT )
-    IF( Qt4_FIND_VERSION_EXACT )
-      IF(found_vers EQUAL req_vers)
-        SET( QT4_QMAKE_FOUND TRUE )
-      ELSE(found_vers EQUAL req_vers)
-        SET( QT4_QMAKE_FOUND FALSE )
-        IF (found_vers LESS req_vers)
-          SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
-        ELSE (found_vers LESS req_vers)
-          SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE)
-        ENDIF (found_vers LESS req_vers)
-      ENDIF(found_vers EQUAL req_vers)
-    ELSE( Qt4_FIND_VERSION_EXACT )
-      IF (found_vers LESS req_vers)
-        SET(QT4_QMAKE_FOUND FALSE)
-        SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
-      ELSE (found_vers LESS req_vers)
-        SET(QT4_QMAKE_FOUND TRUE)
-      ENDIF (found_vers LESS req_vers)
-    ENDIF( Qt4_FIND_VERSION_EXACT )
-  ENDIF (qt_version_tmp)
-
-ENDIF (QT_QMAKE_EXECUTABLE)
-
-IF (QT4_QMAKE_FOUND)
-
-  # ask qmake for the library dir
-  # Set QT_LIBRARY_DIR
-  IF (NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_LIBS"
-      OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
-    IF(EXISTS "${QT_LIBRARY_DIR_TMP}")
-      SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir" FORCE)
-    ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}")
-      MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
-      MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
-    ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}")
-  ENDIF(NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
-  
-  IF (APPLE)
-    IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS ON
-        CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
-    ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS OFF
-        CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
-    ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-    
-    MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
-  ENDIF (APPLE)
-  
-  # ask qmake for the binary dir
-  IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR  OR  QT_QMAKE_CHANGED)
-     EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
-       ARGS "-query QT_INSTALL_BINS"
-       OUTPUT_VARIABLE qt_bins )
-     # make sure we have / and not \ as qmake gives on windows
-     FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
-     SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the include dir
-  IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR  OR  QT_QMAKE_CHANGED)
-      EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-        ARGS "-query QT_INSTALL_HEADERS" 
-        OUTPUT_VARIABLE qt_headers ) 
-      # make sure we have / and not \ as qmake gives on windows
-      FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
-      SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR  OR  QT_QMAKE_CHANGED)
-
-
-  # ask qmake for the documentation directory
-  IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR  OR  QT_QMAKE_CHANGED)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_DOCS"
-      OUTPUT_VARIABLE qt_doc_dir )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
-    SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the mkspecs directory
-  IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR  OR  QT_QMAKE_CHANGED)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QMAKE_MKSPECS"
-      OUTPUT_VARIABLE qt_mkspecs_dirs )
-    # do not replace : on windows as it might be a drive letter
-    # and windows should already use ; as a separator
-    IF(UNIX)
-      STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
-    ENDIF(UNIX)
-    SET(QT_MKSPECS_DIR NOTFOUND)
-    FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
-      DOC "The location of the Qt mkspecs containing qconfig.pri"
-      NO_DEFAULT_PATH )
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the plugins directory
-  IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR  OR  QT_QMAKE_CHANGED)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_PLUGINS"
-      OUTPUT_VARIABLE qt_plugins_dir )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
-    SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the translations directory
-  IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR  OR  QT_QMAKE_CHANGED)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_TRANSLATIONS"
-      OUTPUT_VARIABLE qt_translations_dir )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
-    SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
-                    QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
-
-
-  #############################################
-  #
-  # Find out what window system we're using
-  #
-  #############################################
-  # Save required variable
-  SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
-  SET(CMAKE_REQUIRED_FLAGS_SAVE    ${CMAKE_REQUIRED_FLAGS})
-  # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
-  SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_HEADERS_DIR}")
-  # On Mac OS X when Qt has framework support, also add the framework path
-  IF( QT_USE_FRAMEWORKS )
-    SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
-  ENDIF( QT_USE_FRAMEWORKS )
-  # Check for Window system symbols (note: only one should end up being set)
-  CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
-  CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
-  CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
-  CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
-  IF(Q_WS_MAC)
-    IF(QT_QMAKE_CHANGED)
-      UNSET(QT_MAC_USE_COCOA CACHE)
-    ENDIF(QT_QMAKE_CHANGED)
-    CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
-  ENDIF(Q_WS_MAC)
-
-  IF (QT_QTCOPY_REQUIRED)
-     CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
-     IF (NOT QT_IS_QTCOPY)
-        MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
-     ENDIF (NOT QT_IS_QTCOPY)
-  ENDIF (QT_QTCOPY_REQUIRED)
-
-  # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
-  SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
-  SET(CMAKE_REQUIRED_FLAGS    ${CMAKE_REQUIRED_FLAGS_SAVE})
-  #
-  #############################################
-
-
-
-  ########################################
-  #
-  #       Setting the INCLUDE-Variables
-  #
-  ########################################
-
-  SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools 
-                 QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia
-                 QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools)
-  
-  IF(Q_WS_X11)
-    SET(QT_MODULES ${QT_MODULES} QtMotif)
-  ENDIF(Q_WS_X11)
-
-  IF(QT_QMAKE_CHANGED)
-    FOREACH(QT_MODULE ${QT_MODULES})
-      STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-      SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
-      SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
-      SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
-    ENDFOREACH(QT_MODULE)
-    SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
-    SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
-    SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
-    IF(WIN32)
-      SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND)
-      SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND)
-    ENDIF(WIN32)
-  ENDIF(QT_QMAKE_CHANGED)
-
-  FOREACH(QT_MODULE ${QT_MODULES})
-    STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-    FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
-              PATHS
-              ${QT_HEADERS_DIR}/${QT_MODULE}
-              ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
-              NO_DEFAULT_PATH
-      )
-    # phonon doesn't seem consistent, let's try phonondefs.h for some
-    # installations
-    IF(${QT_MODULE} STREQUAL "phonon")
-      FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR phonondefs.h
-                PATHS
-                ${QT_HEADERS_DIR}/${QT_MODULE}
-                ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
-                NO_DEFAULT_PATH
-        )
-    ENDIF(${QT_MODULE} STREQUAL "phonon")
-  ENDFOREACH(QT_MODULE)
-
-  IF(WIN32)
-    SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
-    # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
-    FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
-      PATHS
-      ${QT_HEADERS_DIR}/ActiveQt
-      NO_DEFAULT_PATH
-      )
-    FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
-      PATHS
-      ${QT_HEADERS_DIR}/ActiveQt
-      NO_DEFAULT_PATH
-      )
-  ENDIF(WIN32)
-
-  # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
-  FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
-    PATHS
-    ${QT_HEADERS_DIR}/QtDesigner
-    ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTASSISTANT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
-    PATHS
-    ${QT_HEADERS_DIR}/QtAssistant
-    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
-    PATHS
-    ${QT_HEADERS_DIR}/QtAssistant
-    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR}
-  IF( QT_QTCORE_INCLUDE_DIR )
-    IF (QT_USE_FRAMEWORKS)
-      SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
-    ELSE (QT_USE_FRAMEWORKS)
-      STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
-      SET( QT_INCLUDE_DIR ${qt4_include_dir})
-    ENDIF (QT_USE_FRAMEWORKS)
-  ENDIF( QT_QTCORE_INCLUDE_DIR )
-
-  IF( NOT QT_INCLUDE_DIR)
-    IF(Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtCore header")
-    ENDIF(Qt4_FIND_REQUIRED)
-  ENDIF( NOT QT_INCLUDE_DIR)
-
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED( QT_INCLUDE_DIR )
-
-  # Set QT_INCLUDES
-  SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
-
-
-
-
-
-  #######################################
-  #
-  #       Qt configuration
-  #
-  #######################################
-  IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
-    FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
-    STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}")
-    STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}")
-  ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
-  IF("${QT_EDITION}" MATCHES "DesktopLight")
-    SET(QT_EDITION_DESKTOPLIGHT 1)
-  ENDIF("${QT_EDITION}" MATCHES "DesktopLight")
-
-  ########################################
-  #
-  #       Setting the LIBRARY-Variables
-  #
-  ########################################
-
-  # find the libraries
-  FOREACH(QT_MODULE ${QT_MODULES})
-    STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-    FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE 
-                 NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
-                 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
-        )
-    FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG 
-                 NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
-                 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
-        )
-  ENDFOREACH(QT_MODULE)
-
-  # QtUiTools not with other frameworks with binary installation (in /usr/lib)
-  IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
-  ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
-
-  IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
-    
-    # try dropping a hint if trying to use Visual Studio with Qt built by mingw
-    IF(QT_LIBRARY_DIR AND MSVC)
-      IF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a)
-        MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw")
-      ENDIF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a)
-    ENDIF(QT_LIBRARY_DIR AND MSVC)
-
-    IF(Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
-    ENDIF(Qt4_FIND_REQUIRED)
-  ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
-
-  # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG   NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-  # Set QT_QTMAIN_LIBRARY
-  IF(WIN32)
-    FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}
-      NO_DEFAULT_PATH)
-    FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR}
-      NO_DEFAULT_PATH)
-  ENDIF(WIN32)
-  
-  # Set QT_QTASSISTANTCLIENT_LIBRARY
-  FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-  FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG   NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-  
-  # Set QT_QTASSISTANT_LIBRARY
-  FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-  FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG   NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-  # Set QT_QTHELP_LIBRARY
-  FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-  FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG   NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-  # QtCLucene not with other frameworks with binary installation (in /usr/lib)
-  IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
-    FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
-  ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
-
-  ############################################
-  #
-  # Check the existence of the libraries.
-  #
-  ############################################
-
-  # On OSX when Qt is found as framework, never use the imported targets for now, since 
-  # in this case the handling of the framework directory currently does not work correctly.
-  IF(QT_USE_FRAMEWORKS)
-    SET(QT_USE_IMPORTED_TARGETS FALSE)
-  ENDIF(QT_USE_FRAMEWORKS)
-
-
-  MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
-
-    STRING(TOUPPER "${_camelCaseBasename}" basename)
-
-    # The name of the imported targets, i.e. the prefix "Qt4::" must not change,
-    # since it is stored in EXPORT-files as name of a required library. If the name would change
-    # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore.
-    IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
-      IF(NOT TARGET Qt4::${_camelCaseBasename})
-        ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED )
-
-        IF (QT_${basename}_LIBRARY_RELEASE)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
-        ENDIF (QT_${basename}_LIBRARY_RELEASE)
-
-        IF (QT_${basename}_LIBRARY_DEBUG)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
-        ENDIF (QT_${basename}_LIBRARY_DEBUG)
-      ENDIF(NOT TARGET Qt4::${_camelCaseBasename})
-
-      # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
-      # imported targets. This works better in general, and is also in almost all cases fully
-      # backward compatible. The only issue is when a project A which had this enabled then exports its 
-      # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project
-      # A will depend on the imported Qt targets, and the names of these imported targets will be stored
-      # in the dependency files on disk. This means when a project B then uses project A, these imported
-      # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a 
-      # library file on disk, and not as a target, and linking will fail:
-      IF(QT_USE_IMPORTED_TARGETS)
-          SET(QT_${basename}_LIBRARY       Qt4::${_camelCaseBasename} )
-          SET(QT_${basename}_LIBRARIES     Qt4::${_camelCaseBasename} )
-      ELSE(QT_USE_IMPORTED_TARGETS)
-
-        # if the release- as well as the debug-version of the library have been found:
-        IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-          # if the generator supports configuration types then set
-          # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
-          IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-            SET(QT_${basename}_LIBRARY       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
-          ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-            # if there are no configuration types and CMAKE_BUILD_TYPE has no value
-            # then just use the release libraries
-            SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE} )
-          ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-          SET(QT_${basename}_LIBRARIES       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
-        ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-
-        # if only the release version was found, set the debug variable also to the release version
-        IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-          SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE})
-          SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE})
-          SET(QT_${basename}_LIBRARIES     ${QT_${basename}_LIBRARY_RELEASE})
-        ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-
-        # if only the debug version was found, set the release variable also to the debug version
-        IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
-          SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG})
-          SET(QT_${basename}_LIBRARY         ${QT_${basename}_LIBRARY_DEBUG})
-          SET(QT_${basename}_LIBRARIES       ${QT_${basename}_LIBRARY_DEBUG})
-        ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
-
-        # put the value in the cache:
-        SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
-
-      ENDIF(QT_USE_IMPORTED_TARGETS)
-
-# message(STATUS "QT_${basename}_LIBRARY: ${QT_${basename}_LIBRARY}")
-
-      SET(QT_${basename}_FOUND 1)
-
-    ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
-    IF (QT_${basename}_INCLUDE_DIR)
-      #add the include directory to QT_INCLUDES
-      SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
-    ENDIF (QT_${basename}_INCLUDE_DIR)
-
-    # Make variables changeble to the advanced user
-    MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
-  ENDMACRO (_QT4_ADJUST_LIB_VARS)
-
-
-  # Set QT_xyz_LIBRARY variable and add 
-  # library include path to QT_INCLUDES
-  _QT4_ADJUST_LIB_VARS(QtCore)
-  _QT4_ADJUST_LIB_VARS(QtGui)
-  _QT4_ADJUST_LIB_VARS(Qt3Support)
-  _QT4_ADJUST_LIB_VARS(QtAssistant)
-  _QT4_ADJUST_LIB_VARS(QtAssistantClient)
-  _QT4_ADJUST_LIB_VARS(QtCLucene)
-  _QT4_ADJUST_LIB_VARS(QtDBus)
-  _QT4_ADJUST_LIB_VARS(QtDesigner)
-  _QT4_ADJUST_LIB_VARS(QtDesignerComponents)
-  _QT4_ADJUST_LIB_VARS(QtHelp)
-  _QT4_ADJUST_LIB_VARS(QtMultimedia)
-  _QT4_ADJUST_LIB_VARS(QtNetwork)
-  _QT4_ADJUST_LIB_VARS(QtNsPlugin)
-  _QT4_ADJUST_LIB_VARS(QtOpenGL)
-  _QT4_ADJUST_LIB_VARS(QtScript)
-  _QT4_ADJUST_LIB_VARS(QtScriptTools)
-  _QT4_ADJUST_LIB_VARS(QtSql)
-  _QT4_ADJUST_LIB_VARS(QtSvg)
-  _QT4_ADJUST_LIB_VARS(QtTest)
-  _QT4_ADJUST_LIB_VARS(QtUiTools)
-  _QT4_ADJUST_LIB_VARS(QtWebKit)
-  _QT4_ADJUST_LIB_VARS(QtXml)
-  _QT4_ADJUST_LIB_VARS(QtXmlPatterns)
-  _QT4_ADJUST_LIB_VARS(phonon)
-
-  # platform dependent libraries
-  IF(Q_WS_X11)
-    _QT4_ADJUST_LIB_VARS(QtMotif)
-  ENDIF(Q_WS_X11)
-  IF(WIN32)
-    _QT4_ADJUST_LIB_VARS(qtmain)
-    _QT4_ADJUST_LIB_VARS(QAxServer)
-    _QT4_ADJUST_LIB_VARS(QAxContainer)
-  ENDIF(WIN32)
-
-  # If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which
-  # is the framework directory in that case), since this will make the cmake include_directories()
-  # command recognize that we need the framework flag with the respective directory (-F)
-  IF(QT_USE_FRAMEWORKS)
-    SET(QT_INCLUDES       ${QT_INCLUDES} ${QT_QTCORE_LIBRARY} )
-    SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR} ${QT_QTCORE_LIBRARY} )
-  ENDIF(QT_USE_FRAMEWORKS)
-
-
-
-  #######################################
-  #
-  #       Check the executables of Qt 
-  #          ( moc, uic, rcc )
-  #
-  #######################################
-
-
-  IF(QT_QMAKE_CHANGED)
-    SET(QT_UIC_EXECUTABLE NOTFOUND)
-    SET(QT_MOC_EXECUTABLE NOTFOUND)
-    SET(QT_UIC3_EXECUTABLE NOTFOUND)
-    SET(QT_RCC_EXECUTABLE NOTFOUND)
-    SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
-    SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
-    SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
-    SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
-    SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND)
-    SET(QT_DESIGNER_EXECUTABLE NOTFOUND)
-    SET(QT_LINGUIST_EXECUTABLE NOTFOUND)
-  ENDIF(QT_QMAKE_CHANGED)
-  
-  FIND_PROGRAM(QT_MOC_EXECUTABLE
-    NAMES moc-qt4 moc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC_EXECUTABLE
-    NAMES uic-qt4 uic
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC3_EXECUTABLE
-    NAMES uic3
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_RCC_EXECUTABLE 
-    NAMES rcc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE 
-    NAMES qdbuscpp2xml
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE 
-    NAMES qdbusxml2cpp
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
-    NAMES lupdate-qt4 lupdate
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
-    NAMES lrelease-qt4 lrelease
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
-    NAMES qcollectiongenerator-qt4 qcollectiongenerator
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
-    NAMES designer-qt4 designer
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
-    NAMES linguist-qt4 linguist
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  IF (QT_MOC_EXECUTABLE)
-     SET(QT_WRAP_CPP "YES")
-  ENDIF (QT_MOC_EXECUTABLE)
-
-  IF (QT_UIC_EXECUTABLE)
-     SET(QT_WRAP_UI "YES")
-  ENDIF (QT_UIC_EXECUTABLE)
-
-
-
-  MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
-    QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE
-    QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE
-    QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE)
-
-
-  # get the directory of the current file, used later on in the file
-  GET_FILENAME_COMPONENT( _qt4_current_dir  "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-  ######################################
-  #
-  #       Macros for building Qt files
-  #
-  ######################################
-
-  INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
-
-
-  ######################################
-  #
-  #       decide if Qt got found
-  #
-  ######################################
-
-  # if the includes,libraries,moc,uic and rcc are found then we have it
-  IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND 
-      QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
-    SET( QT4_FOUND "YES" )
-    INCLUDE(FindPackageMessage)
-    FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})"
-      "[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]")
-  ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
-        QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
-    SET( QT4_FOUND "NO")
-    SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-    IF( Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
-    ENDIF( Qt4_FIND_REQUIRED)
-  ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND 
-         QT_UIC_EXECUTABLE AND  QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
-  
-  SET(QT_FOUND ${QT4_FOUND})
-
-
-  ###############################################
-  #
-  #       configuration/system dependent settings  
-  #
-  ###############################################
-
-  INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake")
-
-
-  #######################################
-  #
-  #       compatibility settings 
-  #
-  #######################################
-  # Backwards compatibility for CMake1.4 and 1.2
-  SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
-  SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-
-  SET( QT_QT_LIBRARY "")
-
-ELSE(QT4_QMAKE_FOUND)
-   
-   SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-   
-   # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x
-   # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and 
-   # QT4_INSTALLED_VERSION_TOO_NEW
-   IF(Qt4_FIND_REQUIRED)
-      IF(QT4_INSTALLED_VERSION_TOO_OLD)
-    IF( Qt4_FIND_VERSION_EXACT )
-      MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required")
-    ELSE( Qt4_FIND_VERSION_EXACT )
-      MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
-    ENDIF( Qt4_FIND_VERSION_EXACT )
-      ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
-      IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
-      MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required")
-    ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
-      MESSAGE( FATAL_ERROR "Qt qmake not found!")
-    ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
-      ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
-   ELSE(Qt4_FIND_REQUIRED)
-      IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
-         MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
-      ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
-   ENDIF(Qt4_FIND_REQUIRED)
- 
-ENDIF (QT4_QMAKE_FOUND)
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4ConfigDependentSettings.cmake b/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4ConfigDependentSettings.cmake
deleted file mode 100644
index 1c5293d..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4ConfigDependentSettings.cmake
+++ /dev/null
@@ -1,373 +0,0 @@
-# This file is included by FindQt4.cmake, don't include it directly.
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-
-###############################################
-#
-#       configuration/system dependent settings  
-#
-###############################################
-
-# find dependencies for some Qt modules
-# when doing builds against a static Qt, they are required
-# when doing builds against a shared Qt, they are not required
-# if a user needs the dependencies, and they couldn't be found, they can set
-# the variables themselves.
-
-SET(QT_QTGUI_LIB_DEPENDENCIES "")
-SET(QT_QTCORE_LIB_DEPENDENCIES "")
-SET(QT_QTNETWORK_LIB_DEPENDENCIES "")
-SET(QT_QTOPENGL_LIB_DEPENDENCIES "")
-SET(QT_QTDBUS_LIB_DEPENDENCIES "")
-SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
-
-
-IF(WIN32)
-  # On Windows, qconfig.pri has "static" for static library builds
-  IF(QT_CONFIG MATCHES "static")
-    SET(QT_IS_STATIC 1)
-  ENDIF(QT_CONFIG MATCHES "static")
-ELSE(WIN32)
-  # On other platforms, check file extension to know if its static
-  IF(QT_QTCORE_LIBRARY_RELEASE)
-    GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT)
-    IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      SET(QT_IS_STATIC 1)
-    ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  ENDIF(QT_QTCORE_LIBRARY_RELEASE)
-  IF(QT_QTCORE_LIBRARY_DEBUG)
-    GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT)
-    IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
-      SET(QT_IS_STATIC 1)
-    ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
-  ENDIF(QT_QTCORE_LIBRARY_DEBUG)
-ENDIF(WIN32)
-
-# build using shared Qt needs -DQT_DLL on Windows
-IF(WIN32  AND  NOT QT_IS_STATIC)
-  SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
-ENDIF(WIN32  AND  NOT QT_IS_STATIC)
-
-
-# QtOpenGL dependencies
-QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL")
-IF(Q_WS_MAC)
-# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be
-# e.g. "-framework OpenGL -framework AGL".  The separate_arguments() call in
-# the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the
-# linker command. So we need to protect the "-framework foo" as
-# non-separatable strings.  We do this by replacing the space after
-# "-framework" with an underscore, then calling separate_arguments(), and
-# then we replace the underscores again with spaces. So we get proper linker
-# commands. Alex
-  STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
-  SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
-  STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
-ELSE(Q_WS_MAC)
-  SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
-ENDIF(Q_WS_MAC)
-SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL})
-
-
-## system png
-IF(QT_QCONFIG MATCHES "system-png")
-  FIND_LIBRARY(QT_PNG_LIBRARY NAMES png)
-  MARK_AS_ADVANCED(QT_PNG_LIBRARY)
-  IF(QT_PNG_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY})
-  ENDIF(QT_PNG_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-png")
-
-
-# for X11, get X11 library directory
-IF(Q_WS_X11)
-  QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11")
-ENDIF(Q_WS_X11)
-
-
-## X11 SM
-IF(QT_QCONFIG MATCHES "x11sm")
-  # ask qmake where the x11 libs are
-  FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11})
-  FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_X11_SM_LIBRARY)
-  MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY)
-  IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY})
-  ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "x11sm")
-
-
-## Xi
-IF(QT_QCONFIG MATCHES "tablet")
-  FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XI_LIBRARY)
-  IF(QT_XI_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY})
-  ENDIF(QT_XI_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "tablet")
-
-
-## Xrender
-IF(QT_QCONFIG MATCHES "xrender")
-  FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XRENDER_LIBRARY)
-  IF(QT_XRENDER_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY})
-  ENDIF(QT_XRENDER_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xrender")
-
-
-## Xrandr
-IF(QT_QCONFIG MATCHES "xrandr")
-  FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XRANDR_LIBRARY)
-  IF(QT_XRANDR_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY})
-  ENDIF(QT_XRANDR_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xrandr")
-
-
-## Xcursor
-IF(QT_QCONFIG MATCHES "xcursor")
-  FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY)
-  IF(QT_XCURSOR_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY})
-  ENDIF(QT_XCURSOR_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xcursor")
-
-
-## Xinerama
-IF(QT_QCONFIG MATCHES "xinerama")
-  FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY)
-  IF(QT_XINERAMA_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY})
-  ENDIF(QT_XINERAMA_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xinerama")
-
-
-## Xfixes
-IF(QT_QCONFIG MATCHES "xfixes")
-  FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11})
-  MARK_AS_ADVANCED(QT_XFIXES_LIBRARY)
-  IF(QT_XFIXES_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY})
-  ENDIF(QT_XFIXES_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xfixes")
-
-
-## system-freetype
-IF(QT_QCONFIG MATCHES "system-freetype")
-  FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype)
-  MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY)
-  IF(QT_FREETYPE_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY})
-  ENDIF(QT_FREETYPE_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-freetype")
-
-
-## fontconfig
-IF(QT_QCONFIG MATCHES "fontconfig")
-  FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig)
-  MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY)
-  IF(QT_FONTCONFIG_LIBRARY)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY})
-  ENDIF(QT_FONTCONFIG_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "fontconfig")
-
-
-## system-zlib
-IF(QT_QCONFIG MATCHES "system-zlib")
-  FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z)
-  MARK_AS_ADVANCED(QT_ZLIB_LIBRARY)
-  IF(QT_ZLIB_LIBRARY)
-    SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY})
-  ENDIF(QT_ZLIB_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-zlib")
-
-
-## openssl
-IF(NOT Q_WS_WIN)
-  SET(_QT_NEED_OPENSSL 0)
-  IF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
-    SET(_QT_NEED_OPENSSL 1)
-  ENDIF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
-  IF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
-    SET(_QT_NEED_OPENSSL 1)
-  ENDIF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
-  IF(_QT_NEED_OPENSSL)
-    FIND_PACKAGE(OpenSSL)
-    IF(OPENSSL_LIBRARIES)
-      SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES})
-    ENDIF(OPENSSL_LIBRARIES)
-  ENDIF(_QT_NEED_OPENSSL)
-ENDIF(NOT Q_WS_WIN)
-
-
-## dbus
-IF(QT_QCONFIG MATCHES "dbus")
-
-  # if the dbus library isn't found, we'll assume its not required to build
-  # shared Qt on Linux doesn't require it
-  IF(NOT QT_DBUS_LIBRARY)
-    EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L dbus-1
-      OUTPUT_VARIABLE _dbus_query_output
-      RESULT_VARIABLE _dbus_result
-      ERROR_VARIABLE _dbus_query_output )
-
-    IF(_dbus_result MATCHES 0)
-      STRING(REPLACE "-L" "" _dbus_query_output "${_dbus_query_output}")
-      SEPARATE_ARGUMENTS(_dbus_query_output)
-    ELSE(_dbus_result MATCHES 0)
-      SET(_dbus_query_output)
-    ENDIF(_dbus_result MATCHES 0)
-
-    FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 PATHS ${_dbus_query_output} )
-
-    IF(QT_DBUS_LIBRARY)
-      SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY})
-    ENDIF(QT_DBUS_LIBRARY)
-
-    MARK_AS_ADVANCED(QT_DBUS_LIBRARY)
-  ENDIF(NOT QT_DBUS_LIBRARY)
-
-ENDIF(QT_QCONFIG MATCHES "dbus")
-
-
-## glib
-IF(QT_QCONFIG MATCHES "glib")
-
-  # if the glib libraries aren't found, we'll assume its not required to build
-  # shared Qt on Linux doesn't require it
-
-  # Qt 4.2.0+ uses glib-2.0
-  IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
-    EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0
-      OUTPUT_VARIABLE _glib_query_output
-      RESULT_VARIABLE _glib_result
-      ERROR_VARIABLE _glib_query_output )
-
-    IF(_glib_result MATCHES 0)
-      STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}")
-      SEPARATE_ARGUMENTS(_glib_query_output)
-    ELSE(_glib_result MATCHES 0)
-      SET(_glib_query_output)
-    ENDIF(_glib_result MATCHES 0)
-
-    FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} )
-    FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} )
-
-    MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
-    MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
-  ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
-
-  IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
-    SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
-        ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
-  ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
-
-
-  # Qt 4.5+ also links to gobject-2.0
-  IF(QT_VERSION_MINOR GREATER 4)
-     IF(NOT QT_GOBJECT_LIBRARY)
-       EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L gobject-2.0
-         OUTPUT_VARIABLE _glib_query_output
-         RESULT_VARIABLE _glib_result
-         ERROR_VARIABLE _glib_query_output )
-
-       IF(_glib_result MATCHES 0)
-         STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}")
-         SEPARATE_ARGUMENTS(_glib_query_output)
-       ELSE(_glib_result MATCHES 0)
-         SET(_glib_query_output)
-       ENDIF(_glib_result MATCHES 0)
-
-       FIND_LIBRARY(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} )
-
-       MARK_AS_ADVANCED(QT_GOBJECT_LIBRARY)
-     ENDIF(NOT QT_GOBJECT_LIBRARY)
-
-     IF(QT_GOBJECT_LIBRARY)
-       SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
-           ${QT_GOBJECT_LIBRARY})
-     ENDIF(QT_GOBJECT_LIBRARY)
-  ENDIF(QT_VERSION_MINOR GREATER 4)
-
-ENDIF(QT_QCONFIG MATCHES "glib")
-
-
-## clock-monotonic, just see if we need to link with rt
-IF(QT_QCONFIG MATCHES "clock-monotonic")
-  SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
-  SET(CMAKE_REQUIRED_LIBRARIES rt)
-  CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS)
-  SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
-  IF(QT_POSIX_TIMERS)
-    FIND_LIBRARY(QT_RT_LIBRARY NAMES rt)
-    MARK_AS_ADVANCED(QT_RT_LIBRARY)
-    IF(QT_RT_LIBRARY)
-      SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY})
-    ENDIF(QT_RT_LIBRARY)
-  ENDIF(QT_POSIX_TIMERS)
-ENDIF(QT_QCONFIG MATCHES "clock-monotonic")
-
-
-IF(Q_WS_X11)
-  # X11 libraries Qt absolutely depends on
-  QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11")
-  SEPARATE_ARGUMENTS(QT_LIBS_X11)
-  FOREACH(QT_X11_LIB ${QT_LIBS_X11})
-    STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}")
-    SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY")
-    FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11})
-    MARK_AS_ADVANCED(${QT_TMP_STR})
-    IF(${QT_TMP_STR})
-      SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}})
-    ENDIF(${QT_TMP_STR})
-  ENDFOREACH(QT_X11_LIB)
-
-  QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD")
-  SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD})
-
-  QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD")
-  SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD})
-
-ENDIF(Q_WS_X11)
-
-
-IF(Q_WS_WIN)
-  SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)
-  SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32)
-ENDIF(Q_WS_WIN)
-
-
-IF(Q_WS_MAC)
-  SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon")
-
-  # Qt 4.0, 4.1, 4.2 use QuickTime
-  IF(QT_VERSION_MINOR LESS 3)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime")
-  ENDIF(QT_VERSION_MINOR LESS 3)
-
-  # Qt 4.2+ use AppKit
-  IF(QT_VERSION_MINOR GREATER 1)
-    SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit")
-  ENDIF(QT_VERSION_MINOR GREATER 1)
-
-  SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices")
-ENDIF(Q_WS_MAC)
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4Macros.cmake b/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4Macros.cmake
deleted file mode 100644
index bd72c8f..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/Qt4Macros.cmake
+++ /dev/null
@@ -1,399 +0,0 @@
-# This file is included by FindQt4.cmake, don't include it directly.
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-
-######################################
-#
-#       Macros for building Qt files
-#
-######################################
-
-
-MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
-  SET(${_qt4_files})
-  SET(${_qt4_options})
-  SET(_QT4_DOING_OPTIONS FALSE)
-  FOREACH(_currentArg ${ARGN})
-    IF ("${_currentArg}" STREQUAL "OPTIONS")
-      SET(_QT4_DOING_OPTIONS TRUE)
-    ELSE ("${_currentArg}" STREQUAL "OPTIONS")
-      IF(_QT4_DOING_OPTIONS) 
-        LIST(APPEND ${_qt4_options} "${_currentArg}")
-      ELSE(_QT4_DOING_OPTIONS)
-        LIST(APPEND ${_qt4_files} "${_currentArg}")
-      ENDIF(_QT4_DOING_OPTIONS)
-    ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
-  ENDFOREACH(_currentArg) 
-ENDMACRO (QT4_EXTRACT_OPTIONS)
-
-
-# macro used to create the names of output files preserving relative dirs
-MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
-  STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
-  STRING(LENGTH ${infile} _infileLength)
-  SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
-  IF(_infileLength GREATER _binlength)
-    STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
-    IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
-      FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
-    ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
-      FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
-    ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
-  ELSE(_infileLength GREATER _binlength)
-    FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
-  ENDIF(_infileLength GREATER _binlength)
-  IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path 
-    STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
-  ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:") 
-  SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
-  STRING(REPLACE ".." "__" _outfile ${_outfile})
-  GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
-  GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
-  FILE(MAKE_DIRECTORY ${outpath})
-  SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
-ENDMACRO (QT4_MAKE_OUTPUT_FILE )
-
-
-MACRO (QT4_GET_MOC_FLAGS _moc_flags)
-  SET(${_moc_flags})
-  GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
-  FOREACH(_current ${_inc_DIRS})
-    IF("${_current}" MATCHES ".framework/?$")
-      STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}")
-      SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
-    ELSE("${_current}" MATCHES ".framework/?$")
-      SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
-    ENDIF("${_current}" MATCHES ".framework/?$")
-  ENDFOREACH(_current ${_inc_DIRS})
-
-  GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
-  FOREACH(_current ${_defines})
-    SET(${_moc_flags} ${${_moc_flags}} "-D${_current}")
-  ENDFOREACH(_current ${_defines})
-
-  IF(Q_WS_WIN)
-    SET(${_moc_flags} ${${_moc_flags}} -DWIN32)
-  ENDIF(Q_WS_WIN)
-
-ENDMACRO(QT4_GET_MOC_FLAGS)
-
-
-# helper macro to set up a moc rule
-MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
-  # For Windows, create a parameters file to work around command line length limit
-  IF (WIN32)
-    # Pass the parameters in a file.  Set the working directory to
-    # be that containing the parameters file and reference it by
-    # just the file name.  This is necessary because the moc tool on
-    # MinGW builds does not seem to handle spaces in the path to the
-    # file given with the @ syntax.
-    GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME)
-    GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH)
-    IF(_moc_outfile_dir)
-      SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
-    ENDIF(_moc_outfile_dir)
-    SET (_moc_parameters_file ${outfile}_parameters)
-    SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
-    FILE (REMOVE ${_moc_parameters_file})
-    FOREACH(arg ${_moc_parameters})
-      FILE (APPEND ${_moc_parameters_file} "${arg}\n")
-    ENDFOREACH(arg)
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-                       COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
-                       DEPENDS ${infile}
-                       ${_moc_working_dir}
-                       VERBATIM)
-  ELSE (WIN32)
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-                       COMMAND ${QT_MOC_EXECUTABLE}
-                       ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
-                       DEPENDS ${infile})
-  ENDIF (WIN32)
-ENDMACRO (QT4_CREATE_MOC_COMMAND)
-
-
-MACRO (QT4_GENERATE_MOC infile outfile )
-# get include dirs and flags
-   QT4_GET_MOC_FLAGS(moc_flags)
-   GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
-   QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_flags}" "")
-   SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE)  # dont run automoc on this file
-ENDMACRO (QT4_GENERATE_MOC)
-
-
-# QT4_WRAP_CPP(outfiles inputfile ... )
-
-MACRO (QT4_WRAP_CPP outfiles )
-  # get include dirs
-  QT4_GET_MOC_FLAGS(moc_flags)
-  QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
-
-  FOREACH (it ${moc_files})
-    GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
-    QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile)
-    QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
-    SET(${outfiles} ${${outfiles}} ${outfile})
-  ENDFOREACH(it)
-
-ENDMACRO (QT4_WRAP_CPP)
-
-
-# QT4_WRAP_UI(outfiles inputfile ... )
-
-MACRO (QT4_WRAP_UI outfiles )
-  QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
-
-  FOREACH (it ${ui_files})
-    GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
-    GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-    SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-      COMMAND ${QT_UIC_EXECUTABLE}
-      ARGS ${ui_options} -o ${outfile} ${infile}
-      MAIN_DEPENDENCY ${infile})
-    SET(${outfiles} ${${outfiles}} ${outfile})
-  ENDFOREACH (it)
-
-ENDMACRO (QT4_WRAP_UI)
-
-
-# QT4_ADD_RESOURCES(outfiles inputfile ... )
-
-MACRO (QT4_ADD_RESOURCES outfiles )
-  QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
-
-  FOREACH (it ${rcc_files})
-    GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
-    GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-    GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
-    SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
-    #  parse file for dependencies 
-    #  all files are absolute paths or relative to the location of the qrc file
-    FILE(READ "${infile}" _RC_FILE_CONTENTS)
-    STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
-    SET(_RC_DEPENDS)
-    FOREACH(_RC_FILE ${_RC_FILES})
-      STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
-      STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
-      IF(NOT _ABS_PATH_INDICATOR)
-        SET(_RC_FILE "${rc_path}/${_RC_FILE}")
-      ENDIF(NOT _ABS_PATH_INDICATOR)
-      SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
-    ENDFOREACH(_RC_FILE)
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-      COMMAND ${QT_RCC_EXECUTABLE}
-      ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
-      MAIN_DEPENDENCY ${infile}
-      DEPENDS ${_RC_DEPENDS})
-    SET(${outfiles} ${${outfiles}} ${outfile})
-  ENDFOREACH (it)
-
-ENDMACRO (QT4_ADD_RESOURCES)
-
-
-MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
-  GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
-  SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
-  SET(_impl   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
-  SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
-  # handling more arguments (as in FindQt4.cmake from KDE4) will come soon, then
-  # _params will be used for more than just -m
-  SET(_params -m)
-
-  ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-      COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
-      DEPENDS ${_infile})
-
-  SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
-
-  QT4_GENERATE_MOC(${_header} ${_moc})
-
-  SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
-  MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-
-ENDMACRO(QT4_ADD_DBUS_INTERFACE)
-
-
-MACRO(QT4_ADD_DBUS_INTERFACES _sources)
-  FOREACH (_current_FILE ${ARGN})
-    GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
-    # get the part before the ".xml" suffix
-    STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
-    STRING(TOLOWER ${_basename} _basename)
-    QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
-  ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_DBUS_INTERFACES)
-
-
-MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
-  QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
-
-  GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
-  GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
-
-  IF (_customName)
-    SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
-  ELSE (_customName)
-    SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
-  ENDIF (_customName)
-
-  ADD_CUSTOM_COMMAND(OUTPUT ${_target}
-      COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target}
-      DEPENDS ${_in_file}
-  )
-ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
-
-
-MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
-  GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
-
-  SET(_optionalBasename "${ARGV4}")
-  IF (_optionalBasename)
-    SET(_basename ${_optionalBasename} )
-  ELSE (_optionalBasename)
-    STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
-    STRING(TOLOWER ${_basename} _basename)
-  ENDIF (_optionalBasename)
-
-  SET(_optionalClassName "${ARGV5}")
-  SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
-  SET(_impl   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
-  SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
-  IF(_optionalClassName)
-    ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-       COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
-       DEPENDS ${_infile}
-    )
-  ELSE(_optionalClassName)
-    ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-       COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
-       DEPENDS ${_infile}
-     )
-  ENDIF(_optionalClassName)
-
-  QT4_GENERATE_MOC(${_header} ${_moc})
-  SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
-  MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-
-  SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
-ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
-
-
-MACRO(QT4_AUTOMOC)
-  QT4_GET_MOC_FLAGS(_moc_INCS)
-
-  SET(_matching_FILES )
-  FOREACH (_current_FILE ${ARGN})
-
-    GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
-    # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
-    # This is required to make uic work correctly:
-    # we need to add generated .cpp files to the sources (to compile them),
-    # but we cannot let automoc handle them, as the .cpp files don't exist yet when
-    # cmake is run for the very first time on them -> however the .cpp files might
-    # exist at a later run. at that time we need to skip them, so that we don't add two
-    # different rules for the same moc file
-    GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
-
-    IF ( NOT _skip AND EXISTS ${_abs_FILE} )
-
-      FILE(READ ${_abs_FILE} _contents)
-
-      GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
-
-      STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}")
-      IF(_match)
-        FOREACH (_current_MOC_INC ${_match})
-          STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
-
-          GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
-          IF(EXISTS ${_abs_PATH}/${_basename}.hpp)
-            SET(_header ${_abs_PATH}/${_basename}.hpp)
-          ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp)
-            SET(_header ${_abs_PATH}/${_basename}.h)
-          ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp)
-          SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
-          QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
-          MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
-        ENDFOREACH (_current_MOC_INC)
-      ENDIF(_match)
-    ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
-  ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_AUTOMOC)
-
-
-MACRO(QT4_CREATE_TRANSLATION _qm_files)
-   QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN})
-   SET(_my_sources)
-   SET(_my_dirs)
-   SET(_my_tsfiles)
-   SET(_ts_pro)
-   FOREACH (_file ${_lupdate_files})
-     GET_FILENAME_COMPONENT(_ext ${_file} EXT)
-     GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE)
-     IF(_ext MATCHES "ts")
-       LIST(APPEND _my_tsfiles ${_abs_FILE})
-     ELSE(_ext MATCHES "ts")
-       IF(NOT _ext)
-         LIST(APPEND _my_dirs ${_abs_FILE})
-       ELSE(NOT _ext)
-         LIST(APPEND _my_sources ${_abs_FILE})
-       ENDIF(NOT _ext)
-     ENDIF(_ext MATCHES "ts")
-   ENDFOREACH(_file)
-   FOREACH(_ts_file ${_my_tsfiles})
-     IF(_my_sources)
-       # make a .pro file to call lupdate on, so we don't make our commands too
-       # long for some systems
-       GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE)
-       SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
-       SET(_pro_srcs)
-       FOREACH(_pro_src ${_my_sources})
-         SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
-       ENDFOREACH(_pro_src ${_my_sources})
-       FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}")
-     ENDIF(_my_sources)
-     ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
-        COMMAND ${QT_LUPDATE_EXECUTABLE}
-        ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
-        DEPENDS ${_my_sources} ${_ts_pro})
-   ENDFOREACH(_ts_file)
-   QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
-ENDMACRO(QT4_CREATE_TRANSLATION)
-
-
-MACRO(QT4_ADD_TRANSLATION _qm_files)
-  FOREACH (_current_FILE ${ARGN})
-    GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
-    GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE)
-    GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION)
-    IF(output_location)
-      FILE(MAKE_DIRECTORY "${output_location}")
-      SET(qm "${output_location}/${qm}.qm")
-    ELSE(output_location)
-      SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
-    ENDIF(output_location)
-
-    ADD_CUSTOM_COMMAND(OUTPUT ${qm}
-       COMMAND ${QT_LRELEASE_EXECUTABLE}
-       ARGS ${_abs_FILE} -qm ${qm}
-       DEPENDS ${_abs_FILE}
-    )
-    SET(${_qm_files} ${${_qm_files}} ${qm})
-  ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_TRANSLATION)
diff --git a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/UseQt4.cmake b/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/UseQt4.cmake
deleted file mode 100644
index a18beaf..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/2.6.2-to-2.8.1/UseQt4.cmake
+++ /dev/null
@@ -1,93 +0,0 @@
-# - Use Module for QT4
-# Sets up C and C++ to use Qt 4.  It is assumed that FindQt.cmake
-# has already been loaded.  See FindQt.cmake for information on
-# how to load Qt 4 into your CMake project.
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
-
-INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
-
-SET(QT_LIBRARIES "")
-
-IF (QT_USE_QTMAIN)
-  IF (WIN32)
-    SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
-  ENDIF (WIN32)
-ENDIF (QT_USE_QTMAIN)
-
-IF(QT_DONT_USE_QTGUI)
-  SET(QT_USE_QTGUI 0)
-ELSE(QT_DONT_USE_QTGUI)
-  SET(QT_USE_QTGUI 1)
-ENDIF(QT_DONT_USE_QTGUI)
-
-IF(QT_DONT_USE_QTCORE)
-  SET(QT_USE_QTCORE 0)
-ELSE(QT_DONT_USE_QTCORE)
-  SET(QT_USE_QTCORE 1)
-ENDIF(QT_DONT_USE_QTCORE)
-
-IF (QT_USE_QT3SUPPORT)
-  ADD_DEFINITIONS(-DQT3_SUPPORT)
-ENDIF (QT_USE_QT3SUPPORT)
-
-# list dependent modules, so dependent libraries are added
-SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-IF(QT_QTDBUS_FOUND)
-  SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
-ELSE(QT_QTDBUS_FOUND)
-  SET(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
-ENDIF(QT_QTDBUS_FOUND)
-SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
-SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
-SET(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
-
-# Qt modules  (in order of dependence)
-FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
-               QAXSERVER QAXCONTAINER QTSCRIPT QTSVG QTUITOOLS QTHELP 
-               QTWEBKIT PHONON QTSCRIPTTOOLS QTGUI QTTEST QTDBUS QTXML QTSQL 
-               QTXMLPATTERNS QTNETWORK QTCORE)
-
-  IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
-    IF (QT_${module}_FOUND)
-      IF(QT_USE_${module})
-        STRING(REPLACE "QT" "" qt_module_def "${module}")
-        ADD_DEFINITIONS(-DQT_${qt_module_def}_LIB)
-        INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR})
-      ENDIF(QT_USE_${module})
-      SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
-      IF(QT_IS_STATIC)
-        SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
-      ENDIF(QT_IS_STATIC)
-      FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
-        SET(QT_USE_${depend_module}_DEPENDS 1)
-      ENDFOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
-    ELSE (QT_${module}_FOUND)
-      MESSAGE("Qt ${module} library not found.")
-    ENDIF (QT_${module}_FOUND)
-  ENDIF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
-  
-ENDFOREACH(module)
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_binary.cmake.in b/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_binary.cmake.in
deleted file mode 100644
index d9225f8..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_binary.cmake.in
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# This files contains definitions needed to use CGAL in a program.
-# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time.
-# This file is loaded by cmake via the command "find_package(CGAL)"
-#
-# This file correspond to a possibly out-of-sources CGAL configuration, thus the actual location
-# must be given by the cmake variable or enviroment variable CGAL_DIR. 
-
-set(CGAL_CONFIG_LOADED TRUE)
-
-set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@")
-set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@")
-
-set(CGAL_MAJOR_VERSION    "@CGAL_MAJOR_VERSION@" )
-set(CGAL_MINOR_VERSION    "@CGAL_MINOR_VERSION@" )
-set(CGAL_BUILD_VERSION    "@CGAL_BUILD_VERSION@" )
-set(CGAL_SCM_BRANCH_NAME  "@CGAL_SCM_BRANCH_NAME@")
-set(CGAL_GIT_SHA1         "@CGAL_GIT_SHA1@")
-
-set(CGAL_BUILD_SHARED_LIBS        "@CGAL_BUILD_SHARED_LIBS@" )
-set(CGAL_Boost_USE_STATIC_LIBS    "@CGAL_Boost_USE_STATIC_LIBS@" )
-
-set(CGAL_CXX_FLAGS_INIT                   "@CMAKE_CXX_FLAGS@" )
-set(CGAL_CXX_FLAGS_RELEASE_INIT           "@CMAKE_CXX_FLAGS_RELEASE@" )
-set(CGAL_CXX_FLAGS_DEBUG_INIT             "@CMAKE_CXX_FLAGS_DEBUG@" )
-set(CGAL_MODULE_LINKER_FLAGS_INIT         "@CMAKE_MODULE_LINKER_FLAGS@" )
-set(CGAL_MODULE_LINKER_FLAGS_RELEASE_INIT "@CMAKE_MODULE_LINKER_FLAGS_RELEASE@" )
-set(CGAL_MODULE_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_MODULE_LINKER_FLAGS_DEBUG@" )
-set(CGAL_SHARED_LINKER_FLAGS_INIT         "@CMAKE_SHARED_LINKER_FLAGS@" )
-set(CGAL_SHARED_LINKER_FLAGS_RELEASE_INIT "@CMAKE_SHARED_LINKER_FLAGS_RELEASE@" )
-set(CGAL_SHARED_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_SHARED_LINKER_FLAGS_DEBUG@" )
-set(CGAL_BUILD_TYPE_INIT                  "@CMAKE_BUILD_TYPE@" )
-
-set(CGAL_INCLUDE_DIRS      "@CGAL_INCLUDE_DIRS@" )
-set(CGAL_MODULES_DIR       "@CGAL_MODULES_DIR@" )
-set(CGAL_LIBRARIES_DIR     "@CGAL_LIBRARIES_DIR@" )
-
-set(WITH_CGAL         "ON" )
-set(WITH_CGAL_Core    "@WITH_CGAL_Core@" )
-set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
-set(WITH_CGAL_Qt3     "@WITH_CGAL_Qt3@" )
-set(WITH_CGAL_Qt4     "@WITH_CGAL_Qt4@" )
-
-set(CGAL_LIBRARY         "@CGAL_LIBRARY@" )
-set(CGAL_Core_LIBRARY    "@CGAL_Core_LIBRARY@" )
-set(CGAL_ImageIO_LIBRARY "@CGAL_ImageIO_LIBRARY@" )
-set(CGAL_Qt3_LIBRARY     "@CGAL_Qt3_LIBRARY@" )
-set(CGAL_Qt4_LIBRARY     "@CGAL_Qt4_LIBRARY@" )
-
-set(CGAL_3RD_PARTY_INCLUDE_DIRS   "@CGAL_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_3RD_PARTY_DEFINITIONS    "@CGAL_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_3RD_PARTY_LIBRARIES_DIRS "@CGAL_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_3RD_PARTY_LIBRARIES      "@CGAL_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_Core_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Core_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Core_3RD_PARTY_DEFINITIONS    "@CGAL_Core_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Core_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Core_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Core_3RD_PARTY_LIBRARIES      "@CGAL_Core_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS   "@CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS    "@CGAL_ImageIO_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_ImageIO_3RD_PARTY_LIBRARIES      "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
-set(CGAL_ImageIO_USE_ZLIB                 "@CGAL_ImageIO_USE_ZLIB@" )
-
-set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Qt3_3RD_PARTY_DEFINITIONS    "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Qt3_3RD_PARTY_LIBRARIES      "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Qt4_3RD_PARTY_DEFINITIONS    "@CGAL_Qt4_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Qt4_3RD_PARTY_LIBRARIES      "@CGAL_Qt4_3RD_PARTY_LIBRARIES@" )
-
-
-set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
-
-set(CGAL_USE_FILE   "${CGAL_MODULES_DIR}/UseCGAL.cmake" )
-
-set(CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "@CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT@")
-
-if ( CGAL_FIND_REQUIRED )
-  set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE        )
-  set( CHECK_CGAL_COMPONENT_ERROR_TYPE   FATAL_ERROR )
-  set( CHECK_CGAL_COMPONENT_ERROR_TITLE  "ERROR:"    )
-else()
-  if ( NOT CGAL_FIND_QUIETLY )
-    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE      )
-    set( CHECK_CGAL_COMPONENT_ERROR_TYPE   STATUS    )
-    set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
-  else()  
-    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
-  endif()
-endif()
-
-set(CGAL_CONFIGURED_LIBRARIES "@CGAL_CONFIGURED_LIBRARIES@")
-
-macro(check_cgal_component COMPONENT)
-
-  set( CGAL_LIB ${COMPONENT} )
-  #message("LIB: ${CGAL_LIB}")
-
-  if ( "${CGAL_LIB}" STREQUAL "CGAL" )
-    set( CGAL_FOUND TRUE )
-    set( CHECK_CGAL_ERROR_TAIL "" )
-  else() 
-    if ( WITH_${CGAL_LIB} )
-      set( ${CGAL_LIB}_FOUND TRUE )
-    else()
-      set( ${CGAL_LIB}_FOUND FALSE )
-    endif()
-    set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
-  endif()  
-
-  if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
-    message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
-  endif()
-  
-endmacro()
-
-check_cgal_component("CGAL")
-
-foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-  list (FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${CGAL_COMPONENT}" POSITION)
-  if ("${POSITION}" STRGREATER "-1") # means: CGAL_COMPONENT is contained in list
-    check_cgal_component("CGAL_${CGAL_COMPONENT}")
-# TODO EBEB do something for supporting lib in check_component?
-  endif()
-endforeach()
-
-# Starting with cmake 2.6.3, CGAL_FIND_COMPONENTS is cleared out when find_package returns.
-# But we need it within UseCGAL.cmake, so we save it aside into another variable
-set( CGAL_REQUESTED_COMPONENTS ${CGAL_FIND_COMPONENTS} )
-
-# for preconfigured libs
-set(CGAL_ENABLE_PRECONFIG "@CGAL_ENABLE_PRECONFIG@")
-set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@")
-set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@")
-
-set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@")
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_install.cmake.in b/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_install.cmake.in
deleted file mode 100644
index 18cea4b..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGALConfig_install.cmake.in
+++ /dev/null
@@ -1,140 +0,0 @@
-#
-# This files contains definitions needed to use CGAL in a program.
-# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time.
-# This file is loaded by cmake via the command "find_package(CGAL)"
-#
-# This file correspond to a CGAL installation with "make install", thus the actual location
-# must be given by the cmake variable or enviroment variable CGAL_DIR. 
-
-set(CGAL_CONFIG_LOADED TRUE)
-
-# CGAL_DIR is the directory where this CGALConfig.cmake is installed
-set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
-
-set(CGAL_MAJOR_VERSION    "@CGAL_MAJOR_VERSION@" )
-set(CGAL_MINOR_VERSION    "@CGAL_MINOR_VERSION@" )
-set(CGAL_BUILD_VERSION    "@CGAL_BUILD_VERSION@" )
-set(CGAL_SCM_BRANCH_NAME  "@CGAL_SCM_BRANCH_NAME@")
-set(CGAL_GIT_SHA1         "@CGAL_GIT_SHA1@")
-
-set(CGAL_BUILD_SHARED_LIBS        "@CGAL_BUILD_SHARED_LIBS@" )
-set(CGAL_Boost_USE_STATIC_LIBS    "@CGAL_Boost_USE_STATIC_LIBS@" )
-
-set(CGAL_CXX_FLAGS_INIT                   "@CMAKE_CXX_FLAGS@" )
-set(CGAL_CXX_FLAGS_RELEASE_INIT           "@CMAKE_CXX_FLAGS_RELEASE@" )
-set(CGAL_CXX_FLAGS_DEBUG_INIT             "@CMAKE_CXX_FLAGS_DEBUG@" )
-set(CGAL_MODULE_LINKER_FLAGS_INIT         "@CMAKE_MODULE_LINKER_FLAGS@" )
-set(CGAL_MODULE_LINKER_FLAGS_RELEASE_INIT "@CMAKE_MODULE_LINKER_FLAGS_RELEASE@" )
-set(CGAL_MODULE_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_MODULE_LINKER_FLAGS_DEBUG@" )
-set(CGAL_SHARED_LINKER_FLAGS_INIT         "@CMAKE_SHARED_LINKER_FLAGS@" )
-set(CGAL_SHARED_LINKER_FLAGS_RELEASE_INIT "@CMAKE_SHARED_LINKER_FLAGS_RELEASE@" )
-set(CGAL_SHARED_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_SHARED_LINKER_FLAGS_DEBUG@" )
-set(CGAL_BUILD_TYPE_INIT                  "@CMAKE_BUILD_TYPE@" )
-
-set(CGAL_INCLUDE_DIRS  "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_INC_DIR@" )
-set(CGAL_MODULES_DIR   "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_CMAKE_DIR@" )
-set(CGAL_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_LIB_DIR@" )
-
-set(WITH_CGAL         "ON" )
-set(WITH_CGAL_Core    "@WITH_CGAL_Core@" )
-set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
-set(WITH_CGAL_Qt3     "@WITH_CGAL_Qt3@" )
-set(WITH_CGAL_Qt4     "@WITH_CGAL_Qt4@" )
-
-set(CGAL_LIBRARY         "@CGAL_LIBRARY_INSTALLED@")
-set(CGAL_Core_LIBRARY    "@CGAL_Core_LIBRARY_INSTALLED@")
-set(CGAL_ImageIO_LIBRARY "@CGAL_ImageIO_LIBRARY_INSTALLED@")
-set(CGAL_Qt3_LIBRARY     "@CGAL_Qt3_LIBRARY_INSTALLED@")
-set(CGAL_Qt4_LIBRARY     "@CGAL_Qt4_LIBRARY_INSTALLED@")
-
-set(CGAL_3RD_PARTY_INCLUDE_DIRS   "@CGAL_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_3RD_PARTY_DEFINITIONS    "@CGAL_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_3RD_PARTY_LIBRARIES_DIRS "@CGAL_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_3RD_PARTY_LIBRARIES      "@CGAL_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_Core_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Core_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Core_3RD_PARTY_DEFINITIONS    "@CGAL_Core_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Core_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Core_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Core_3RD_PARTY_LIBRARIES      "@CGAL_Core_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS   "@CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS    "@CGAL_ImageIO_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_ImageIO_3RD_PARTY_LIBRARIES      "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
-set(CGAL_ImageIO_USE_ZLIB                 "@CGAL_ImageIO_USE_ZLIB@" )
-
-set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Qt3_3RD_PARTY_DEFINITIONS    "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Qt3_3RD_PARTY_LIBRARIES      "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS   "@CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS@" )
-set(CGAL_Qt4_3RD_PARTY_DEFINITIONS    "@CGAL_Qt4_3RD_PARTY_DEFINITIONS@" )
-set(CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS@" )
-set(CGAL_Qt4_3RD_PARTY_LIBRARIES      "@CGAL_Qt4_3RD_PARTY_LIBRARIES@" )
-
-set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
-
-set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" )
-
-set(CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "@CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT@")
-
-if ( CGAL_FIND_REQUIRED )
-  set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE        )
-  set( CHECK_CGAL_COMPONENT_ERROR_TYPE   FATAL_ERROR )
-  set( CHECK_CGAL_COMPONENT_ERROR_TITLE  "ERROR:"    )
-else()
-  if ( NOT CGAL_FIND_QUIETLY )
-    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE      )
-    set( CHECK_CGAL_COMPONENT_ERROR_TYPE   STATUS    )
-    set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
-  else()  
-    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
-  endif()
-endif()
-
-set(CGAL_CONFIGURED_LIBRARIES "@CGAL_CONFIGURED_LIBRARIES@")
-
-macro(check_cgal_component COMPONENT)
-
-  set( CGAL_LIB ${COMPONENT} )
-  #message("LIB: ${CGAL_LIB}")
-
-  if ( "${CGAL_LIB}" STREQUAL "CGAL" )
-    set( CGAL_FOUND TRUE )
-    set( CHECK_CGAL_ERROR_TAIL "" )
-  else() 
-    if ( WITH_${CGAL_LIB} )
-      set( ${CGAL_LIB}_FOUND TRUE )
-    else()
-      set( ${CGAL_LIB}_FOUND FALSE )
-    endif()
-    set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
-  endif()  
-
-  if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
-    message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
-  endif()
-  
-endmacro()
-
-check_cgal_component("CGAL")
-
-foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-  list (FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${CGAL_COMPONENT}" POSITION)
-  if ("${POSITION}" STRGREATER "-1") # means: CGAL_COMPONENT is contained in list
-    check_cgal_component("CGAL_${CGAL_COMPONENT}")
-# TODO EBEB do something for supporting lib in check_component?
-  endif()
-endforeach()
-
-# Starting with cmake 2.6.3, CGAL_FIND_COMPONENTS is cleared out when find_package returns.
-# But we need it within UseCGAL.cmake, so we save it aside into another variable
-set( CGAL_REQUESTED_COMPONENTS ${CGAL_FIND_COMPONENTS} )
-
-# for preconfigured libs
-set(CGAL_ENABLE_PRECONFIG "@CGAL_ENABLE_PRECONFIG@")
-set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@")
-set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@")
-
-set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@")
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_Common.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_Common.cmake
deleted file mode 100644
index 9bcceb0..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_Common.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-# This allows else(), endif(), etc... (without repeating the expression)
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-if ( "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" )
-  set( CGAL_IS_CURRENT_SCRIPT_TOP_LEVEL TRUE )
-else()
-  set( CGAL_IS_CURRENT_SCRIPT_TOP_LEVEL FALSE )
-endif()  
-
-include(CGAL_Macros)
-
-if(RUNNING_CGAL_AUTO_TEST)
-# Just to avoid a warning from CMake if that variable is set on the command line...
-endif()
-
-# Common settings for CGAL cmake scripts
-if( NOT CGAL_COMMON_FILE_INCLUDED )
-  set(CGAL_COMMON_FILE_INCLUDED 1 )
-
-  # CMAKE_ROOT must be properly configured, but is not by the CMake windows installer, so check here
-  if (NOT CMAKE_ROOT)
-    message( FATAL_ERROR "CMAKE_ROOT environment variable not set. It should point to the directory where CMake is installed.")
-  endif()
-
-  # CMAKE_VERSION was introduced in 2.6.3 so we use it to detect the fact
-  if ( CMAKE_VERSION )
-    set( CMAKE_2_6_3_OR_ABOVE TRUE )
-  else()
-    set( CMAKE_2_6_3_OR_ABOVE FALSE )
-  endif()
-    
-  if ( CGAL_BUILDING_LIBS )
-    option(BUILD_SHARED_LIBS "Build shared libraries" ON)
-    set(CGAL_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
-
-    if ( BUILD_SHARED_LIBS )
-      message( STATUS "Building shared libraries" )
-    else()
-      message( STATUS "Building static libraries" )
-    endif()
-  endif()
-  
-  if ( WIN32 )
-    find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
-    if(CMAKE_UNAME)
-      exec_program(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
-      if ( CMAKE_SYSTEM_NAME2 MATCHES "CYGWIN" )
-        message( STATUS "This is the Windows CMake running within the cygwin platform." )
-        set( CGAL_WIN32_CMAKE_ON_CYGWIN TRUE CACHE INTERNAL "This is the cygwin platform." )
-      endif()
-    endif()
-    hide_variable(CMAKE_UNAME)
-  endif()
-
-  set(CMAKE_COLORMAKEFILE ON)
-
-  # set minimal version of some optional libraries:
-  set( Eigen3_FIND_VERSION "3.1.0")
-  
-endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_GeneratorSpecificSettings.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_GeneratorSpecificSettings.cmake
deleted file mode 100644
index 889686b..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_GeneratorSpecificSettings.cmake
+++ /dev/null
@@ -1,53 +0,0 @@
-if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
-  set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 )
-
-  message( STATUS "Targetting ${CMAKE_GENERATOR}")
-
-  if ( MSVC )
-    message( STATUS "Target build enviroment supports auto-linking" )
-    set(CGAL_AUTO_LINK_ENABLED TRUE)
-  endif()
-
-  if ( MSVC13 )
-    set(CGAL_TOOLSET "vc130")
-    message( STATUS "Using VC13 compiler." )
-  elseif ( MSVC12 )
-    set(CGAL_TOOLSET "vc120")
-    message( STATUS "Using VC12 compiler." )
-  elseif ( MSVC11 )
-    set(CGAL_TOOLSET "vc110")
-    message( STATUS "Using VC11 compiler." )
-  elseif ( MSVC10 )
-    set(CGAL_TOOLSET "vc100")
-    message( STATUS "Using VC10 compiler." )
-  elseif ( MSVC90 )
-    set(CGAL_TOOLSET "vc90")
-    message( STATUS "Using VC90 compiler." )
-  elseif ( MSVC80 )
-    set(CGAL_TOOLSET "vc80")
-    message( STATUS "Using VC80 compiler." )
-  elseif ( MSVC71 )
-    set(CGAL_TOOLSET "vc71")
-    message( STATUS "Using VC71 compiler." )
-  else()
-    message( STATUS "Using ${CMAKE_CXX_COMPILER} compiler." )
-  endif()
-
-
-  # From james Bigler, in the cmake users list.
-  IF (APPLE)
-    exec_program(uname ARGS -v  OUTPUT_VARIABLE DARWIN_VERSION)
-    string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
-    message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}")
-    if (DARWIN_VERSION GREATER 8)
-       message(STATUS "Mac Leopard detected")
-      set(CGAL_APPLE_LEOPARD 1)
-    endif()
-  endif()
-
-  if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." )
-    set(HAS_CFG_INTDIR TRUE CACHE INTERNAL "Generator uses intermediate configuration directory" )
-    message( STATUS "Generator uses intermediate configuration directory: ${CMAKE_CFG_INTDIR}" )
-  endif()
-
-endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_Macros.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_Macros.cmake
deleted file mode 100644
index e2b3264..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_Macros.cmake
+++ /dev/null
@@ -1,734 +0,0 @@
-if( NOT CGAL_MACROS_FILE_INCLUDED )
-  set(CGAL_MACROS_FILE_INCLUDED 1 )
-
-  include("${CGAL_MODULES_DIR}/CGAL_VersionUtils.cmake")
-
-  # Probably unused. -- Laurent Rineau, 2011/07/21
-  macro(assert _arg )
-    if ( NOT ${_arg} )
-      message( FATAL_ERROR "Variable ${_arg} must be defined" )
-    endif()
-  endmacro()
-
-  macro( hide_variable var )
-    set ( ${var} ${${var}} CACHE INTERNAL "Variable hidden from user" FORCE )
-  endmacro()
-
-  macro( cache_set var )
-    set ( ${var} ${ARGN} CACHE INTERNAL "" )
-    set ( ${var} ${ARGN} CACHE INTERNAL "" )
-  endmacro()
-
-  macro( typed_cache_set type doc var )
-    set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE )
-    set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE )
-  endmacro()
-
-  macro( cache_get var )
-    set ( ${var} )
-  endmacro()
-
-  # Splits inlist in the first element (head) and the rest (tail)
-  macro( list_split head tail )
-    set( ${head} )
-    set( ${tail} )
-    set( _LS_is_head TRUE )
-    foreach( _LS_item ${ARGN} )
-      if ( _LS_is_head )
-        set( ${head} ${_LS_item} )
-        set( _LS_is_head FALSE )
-      else()
-        list( APPEND ${tail} ${_LS_item} )
-      endif()
-    endforeach()
-  endmacro()
-
-  # adds elements to an internal cached list
-  macro( add_to_cached_list listname )
-    cache_get ( ${listname} )
-    set( _ATC_${listname}_tmp  ${${listname}} )
-    if ( NOT "${ARGN}" STREQUAL "" )
-      list( APPEND _ATC_${listname}_tmp ${ARGN} )
-    endif()
-    cache_set ( ${listname} ${_ATC_${listname}_tmp} )
-  endmacro()
-
-  # adds elements to an in-memory variable named 'listname'
-  macro( add_to_memory_list listname )
-    if ( NOT "${ARGN}" STREQUAL "" )
-      list( APPEND ${listname} ${ARGN} )
-    endif()
-  endmacro()
-
-  # adds elements to a list.
-  # If the first argument after 'listname' is PERSISTENT then 'listname'
-  # is a persistent internal cached variable, otherwise is a memory variable.
-  macro( add_to_list listname )
-    list_split( _ATL_ARGN_HEAD _ATL_ARGN_TAIL ${ARGN} )
-    if ( "${_ATL_ARGN_HEAD}" STREQUAL "PERSISTENT" )
-      add_to_cached_list( ${listname} ${_ATL_ARGN_TAIL} )
-    else()
-      add_to_memory_list( ${listname} ${ARGN} )
-    endif()
-  endmacro()
-
-  # Probably unused. -- Laurent Rineau, 2011/07/21
-  macro( at list idx var )
-    list( LENGTH ${list} ${list}_length )
-    if ( ${idx} LESS ${${list}_length} )
-      list( GET ${list} ${idx} ${var} )
-    else()
-      set( ${var} "NOTFOUND" )
-    endif()
-  endmacro()
-
-  macro( found_in_list item_list item result )
-    set( ${result} "FALSE" )
-    foreach( element ${${item_list}} )
-      if ( "${element}" STREQUAL "${item}" )
-        set( ${result} "TRUE" )
-      endif()
-    endforeach()
-  endmacro()
-
-  macro( uniquely_add_flags target_var )
-    if ( "${ARGC}" GREATER "1"  )
-      set( target_list "${${target_var}}" )
-      set( source_list "${ARGN}" )
-      separate_arguments( target_list )
-      separate_arguments( source_list )
-      foreach( flag ${source_list} )
-        found_in_list( target_list ${flag} ${flag}_FOUND )
-        if ( NOT ${flag}_FOUND )
-          typed_cache_set( STRING "User-defined flags" ${target_var} "${${target_var}} ${flag}" )
-        endif()
-      endforeach()
-    endif()
-  endmacro()
-
-  function( CGAL_display_compiler_version )
-    set(search_dirs "")
-    message("Compiler version:")
-    set(version "Unknown compiler. Cannot display its version")
-    if(MSVC)
-      execute_process(COMMAND "${CMAKE_CXX_COMPILER}"
-        RESULT_VARIABLE ok
-        ERROR_VARIABLE out_version
-        TIMEOUT 5)
-      if(ok EQUAL 0)
-        set(version "${out_version}")
-      endif()
-    else()
-      foreach(flag "-V" "--version" "-v")
-        execute_process(COMMAND "${CMAKE_CXX_COMPILER}" ${flag}
-          RESULT_VARIABLE ok
-          OUTPUT_VARIABLE out_version
-          ERROR_VARIABLE out_version
-          TIMEOUT 5)
-        if(ok EQUAL 0)
-          if("${out_version}" MATCHES "^clang")
-            execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -print-search-dirs
-              RESULT_VARIABLE ok
-              OUTPUT_VARIABLE out_search_dirs
-              TIMEOUT 5)
-            if(ok EQUAL 0)
-              set(search_dirs "${out_search_dirs}")
-            endif()
-          endif()
-          set(version "${out_version}")
-          break()
-        endif()
-      endforeach()
-    endif()
-    message("${version}")
-    if(search_dirs)
-      message("Search dirs:")
-      message("${search_dirs}")
-    endif()
-  endfunction()
-
-  macro( get_dependency_version LIB )
-
-    if ( "${ARGC}" GREATER "1" )
-      set( PKG ${ARGV1} )
-    else()
-      set( PKG ${LIB} )
-    endif()
-
-    if ( ${PKG}_FOUND )
-
-      set ( ${LIB}_VERSION "unknown" )
-
-      try_run( ${LIB}_RUN_RES
-               ${LIB}_COMPILE_RES
-               "${CMAKE_BINARY_DIR}"
-               "${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/print_${LIB}_version.cpp"
-               CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}"
-                           "-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}"
-                           "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}"
-               OUTPUT_VARIABLE ${LIB}_OUTPUT
-            )
-
-      if ( ${LIB}_COMPILE_RES )
-
-        if ( ${LIB}_RUN_RES EQUAL "0" )
-
-          string( REGEX MATCH "version=.*\$" ${LIB}_VERSION_LINE ${${LIB}_OUTPUT}  )
-          string( REPLACE "\n" "" ${LIB}_VERSION_LINE2 ${${LIB}_VERSION_LINE} )
-          string( REPLACE "\r" "" ${LIB}_VERSION_LINE3 ${${LIB}_VERSION_LINE2} )
-          string( REPLACE "version=" "" ${LIB}_VERSION ${${LIB}_VERSION_LINE3} )
-
-        else()
-
-          message( STATUS "WARNING: ${LIB} found but print_${LIB}_version.cpp exited with error condition: ${${LIB}_RUN_RES}" )
-          message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
-          message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
-          message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
-          message( STATUS "${${LIB}_OUTPUT}" )
-
-        endif()
-
-      else()
-
-        message( STATUS "WARNING: ${LIB} found but could not compile print_${LIB}_version.cpp:")
-        message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
-        message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
-        message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
-        message( STATUS "${${LIB}_OUTPUT}" )
-
-      endif()
-
-      message( STATUS "USING ${LIB}_VERSION = '${${LIB}_VERSION}'" )
-
-    endif()
-
-  endmacro()
-
-  macro( use_lib )
-
-    set (lib "${ARGV0}")
-
-    set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
-
-    if ( ${vlib}_FOUND AND (NOT TARGET CGAL OR WITH_${lib}))
-
-      if ( NOT ${vlib}_SETUP ) # avoid double usage
-
-        if ( "${ARGC}" EQUAL "2" )
-
-          set (usefile "${ARGV1}")
-
-          include( ${usefile} )
-          message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}")
-
-          # UseLIB-file has to set ${vlib}_SETUP to TRUE
-          # TODO EBEB what about Qt4, Qt3, zlib?
-
-        else()
-
-          ####message( STATUS "${lib} include:     ${${vlib}_INCLUDE_DIR}" )
-          include_directories ( SYSTEM ${${vlib}_INCLUDE_DIR} )
-
-          # TODO EBEB remove definitions?
-          ####message( STATUS "${lib} definitions: ${${vlib}_DEFINITIONS}" )
-          add_definitions( ${${vlib}_DEFINITIONS} "-DCGAL_USE_${vlib}" )
-
-          if ( ${vlib}_LIBRARIES )
-            ####message( STATUS "${lib} libraries:   ${${vlib}_LIBRARIES}" )
-            link_libraries( ${${vlib}_LIBRARIES} )
-          endif()
-
-          ####message (STATUS "Configured ${lib} in standard way")
-
-          set( ${vlib}_SETUP TRUE )
-
-        endif()
-
-      endif()
-
-      if (NOT ${vlib}_SETUP )
-
-         message( WARNING "${vlib} has not been set up" )
-
-      endif()
-
-    else()
-
-      if ( WITH_${lib} )
-        message( SEND_ERROR "Try to use ${lib} that is not found")
-      endif()
-
-    endif()
-
-  endmacro()
-
-
-  macro( use_component component)
-
-    message (STATUS "Requested component: ${component}")
-
-    if(WITH_CGAL_${component})
-      if(TARGET CGAL_${component})
-        add_to_list( CGAL_LIBRARIES CGAL_${component} )
-      else()
-        add_to_list( CGAL_LIBRARIES ${CGAL_${component}_LIBRARY} )
-      endif()
-      add_to_list( CGAL_3RD_PARTY_LIBRARIES  ${CGAL_${component}_3RD_PARTY_LIBRARIES}  )
-
-      add_to_list( CGAL_3RD_PARTY_INCLUDE_DIRS   ${CGAL_${component}_3RD_PARTY_INCLUDE_DIRS}   )
-      add_to_list( CGAL_3RD_PARTY_DEFINITIONS    ${CGAL_${component}_3RD_PARTY_DEFINITIONS}    )
-      add_to_list( CGAL_3RD_PARTY_LIBRARIES_DIRS ${CGAL_${component}_3RD_PARTY_LIBRARIES_DIRS} )
-
-      # Nothing to add for Core
-
-      if (${component} STREQUAL "ImageIO")
-        find_package( OpenGL )
-        find_package( ZLIB )
-      endif()
-
-      if (${component} STREQUAL "Qt3")
-        find_package( OpenGL )
-        find_package( Qt3-patched )
-      endif()
-
-      if (${component} STREQUAL "Qt4")
-        find_package( OpenGL )
-        find_package( Qt4 )
-      endif()
-
-    else(WITH_CGAL_${component})
-
-      # now we are talking about 3rd party libs
-
-      if ( ${component} STREQUAL "ALL_PRECONFIGURED_LIBS" )
-
-        if (CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT)
-          message( STATUS "External libraries are all used")
-          foreach ( CGAL_3RD_PARTY_LIB ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
-            if (${CGAL_3RD_PARTY_LIB}_FOUND)
-              use_lib( ${CGAL_3RD_PARTY_LIB} ${${CGAL_3RD_PARTY_LIB}_USE_FILE})
-            endif()
-          endforeach()
-        else()
-          message( SEND_ERROR "Component ALL_PRECONFIGURED_LIBS only allow with CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT=ON")
-        endif()
-
-      else()
-
-        list( FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${component}" POSITION )
-        if ( "${POSITION}" EQUAL "-1" ) # if component is not a CGAL_<lib>
-
-          if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX)
-            set(CGAL_EXT_LIB_${component}_PREFIX ${component})
-          endif()
-
-          set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" )
-
-          if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND)
-
-            ####message( STATUS "External library ${component} has been preconfigured")
-            use_lib( ${component} ${${vlib}_USE_FILE})
-
-          else()
-
-            ####message( STATUS "External library ${component} has not been preconfigured")
-            find_package( ${component} )
-            ####message( STATUS "External library ${vlib} after find")
-            if (${vlib}_FOUND)
-              ####message( STATUS "External library ${vlib} about to be used")
-              use_lib( ${component} ${${vlib}_USE_FILE})
-            endif()
-
-          endif()
-        else()
-
-          if (NOT WITH_CGAL_${component}) 
-            message(STATUS "NOTICE: The CGAL_${component} library seems to be required but is not build. Thus, it is expected that some executables will not be compiled.")
-          endif()
-
-        endif()
-
-      endif()
-
-    endif(WITH_CGAL_${component})
-
-  endmacro()
-
-  macro( use_essential_libs )
-
-    # Comment: This is subject to be changed in the future
-    #          - either more specific (giving precise include_dir- and link-order)
-    #          - or even less specific if order becomes less relevant
-    # Eric Berberich 2012/06/29
-
-    if(NOT CGAL_DISABLE_GMP)
-      if(RS_FOUND)
-        use_component( RS )
-      endif()
-
-      if(MPFI_FOUND)
-        use_component( MPFI )
-      endif()
-
-      if(MPFR_FOUND)
-        use_component( MPFR )
-      endif()
-
-      if (GMPXX_FOUND)
-        use_component( GMPXX )
-      endif()
-
-      if(GMP_FOUND)
-        use_component( GMP )
-      endif()
-    endif(NOT CGAL_DISABLE_GMP)
-
-    if(LEDA_FOUND)
-      use_component( LEDA )
-    endif()
-
-    if(NTL_FOUND)
-      use_component( NTL )
-    endif()
-  endmacro()
-
-
-  function( cgal_setup_module_path )
-    # Avoid to modify the modules path twice
-    if(NOT CGAL_MODULE_PATH_IS_SET)
-      # Where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
-      set(CGAL_CMAKE_MODULE_PATH ${CGAL_MODULES_DIR})
-
-      # Use FindQt4 from CMake-2.8.1 if 2.6.2 <= CMake <= 2.8.1
-      if(CMAKE_VERSION)
-        is_version_less("2.6.1" "${CMAKE_VERSION}" CMAKE_VERSION_BETWEEN_2_6_2_AND_2_8_1)
-      else()
-        # It seems CMake <= 2.6.1 does not has that CMAKE_VERSION
-        set(CMAKE_VERSION_BETWEEN_2_6_2_AND_2_8_1 FALSE)
-      endif()
-      if(CMAKE_VERSION_BETWEEN_2_6_2_AND_2_8_1)
-        is_version_less(${CMAKE_VERSION} "2.8.2" CMAKE_VERSION_BETWEEN_2_6_2_AND_2_8_1)
-        if(CMAKE_VERSION_BETWEEN_2_6_2_AND_2_8_1)
-          set(CGAL_CMAKE_MODULE_PATH ${CGAL_CMAKE_MODULE_PATH} ${CGAL_MODULES_DIR}/2.6.2-to-2.8.1)
-        endif()
-      endif()
-
-      set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
-
-      set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CGAL_CMAKE_MODULE_PATH})
-
-      # Export those variables to the parent scope (the scope that calls the function)
-      set(CGAL_MODULE_PATH_IS_SET TRUE PARENT_SCOPE)
-      set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
-      set(CGAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
-      set(ORIGINAL_CMAKE_MODULE_PATH "${ORIGINAL_CMAKE_MODULE_PATH}" PARENT_SCOPE)
-    endif()
-  endfunction()
-
-  macro( create_CGALconfig_files )
-
-    # CGALConfig.cmake is platform specific so it is generated and stored in the binary folder.
-    configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary.cmake.in"  "${CMAKE_BINARY_DIR}/CGALConfig.cmake"        @ONLY)
-
-    # There is also a version of CGALConfig.cmake that is prepared in case CGAL in installed in CMAKE_INSTALL_PREFIX.
-    configure_file("${CGAL_MODULES_DIR}/CGALConfig_install.cmake.in" "${CMAKE_BINARY_DIR}/config/CGALConfig.cmake" @ONLY)
-
-    #write prefix exceptions
-    file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n")
-    file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}")
-
-     foreach( lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES} )
-
-       list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION )
-       # if lib is essential or preconfiguration for an activated library ...
-       if ( ("${POSITION}" STRGREATER "-1") OR ( CGAL_ENABLE_PRECONFIG AND WITH_${lib} ))
-
-         set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
-         #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_FOUND           \"${${vlib}_FOUND}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_USE_FILE        \"${${vlib}_USE_FILE}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_INCLUDE_DIR     \"${${vlib}_INCLUDE_DIR}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_LIBRARIES       \"${${vlib}_LIBRARIES}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_DEFINITIONS     \"${${vlib}_DEFINITIONS}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "endif()\n\n")
-
-
-         #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_FOUND           \"${${vlib}_FOUND}\")\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_USE_FILE        \"${${vlib}_USE_FILE}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_INCLUDE_DIR     \"${${vlib}_INCLUDE_DIR}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_LIBRARIES       \"${${vlib}_LIBRARIES}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_DEFINITIONS     \"${${vlib}_DEFINITIONS}\" )\n")
-         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "endif()\n\n")
-       endif()
-
-     endforeach()
-
-  endmacro()
-
-  macro ( fetch_env_var VAR )
-    if ( "${${VAR}}" STREQUAL "" )
-      set( ${VAR}_env_value "$ENV{${VAR}}" )
-      if ( NOT "${${VAR}_env_value}" STREQUAL "" )
-        # Convert Windows path to Unix-style
-        FILE(TO_CMAKE_PATH ${${VAR}_env_value} ${VAR})
-      endif()
-    endif()
-  endmacro()
-
-
-## All the following macros are probably unused. -- Laurent Rineau, 2011/07/21
-
-  # Composes a tagged list of libraries: a list with interpersed keywords or tags
-  # indicating that all following libraries, up to the next tag, are to be linked only for the
-  # corresponding build type. The 'general' tag indicates libraries that corresponds to all build types.
-  # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitve and
-  # the inital range of libraries listed before any tag is implicitely 'general'
-  #
-  # This macro takes 3 lists of general, optimized and debug libraries, resp, and populates the list
-  # given in the fourth argument.
-  #
-  # The first three parameters must be strings containing a semi-colon separated list of elements.
-  # All three lists must be passed, but any of them can be an empty string "".
-  # The fourth parameter, corresponding to the result, must be a variable name and it will be APPENDED
-  # (retaining any previous contents)
-  #
-  # If there is a last parameter whose value is "PERSISTENT" then the result is an internal cached variable,
-  # otherwise it is an in-memory variable
-  #
-  macro( compose_tagged_libraries libs_general libs_optimized libs_debug libs )
-
-    if ( "${ARGN}" STREQUAL "PERSISTENT" )
-      set( _CTL_IN_CACHE "PERSISTENT" )
-    else()
-      set( _CTL_IN_CACHE )
-    endif()
-
-    if ( NOT "${libs_general}" STREQUAL "" )
-      add_to_list( ${libs} ${_CTL_IN_CACHE} ${libs_general} )
-    endif()
-
-    if ( NOT "${libs_optimized}" STREQUAL "" )
-      add_to_list( ${libs} ${_CTL_IN_CACHE} optimized ${libs_optimized} )
-    endif()
-
-    if ( NOT "${libs_debug}" STREQUAL "" )
-      add_to_list( ${libs} ${_CTL_IN_CACHE} debug ${libs_debug} )
-    endif()
-
-  endmacro()
-
-  # Decomposes a tagged list of libraries (see macro compose_tagged_libraries).
-  # The first argument is the tagged list and the next 3 arguments are the lists
-  # where the general, optimized and debug libraries are collected.
-  #
-  # The first parameter must be a string containing a semi-colon separated list of elements.
-  # It cannot be ommitted, but it can be an empty string ""
-  #
-  # TThe next three arguments must be the names of the variables containing the result, and they
-  # will be APPENDED (retaining any previous contents)
-  #
-  # If there is a last parameter whose value is "PERSISTENT" then the result variables are internal in the cache,
-  # otherwise they are in-memory.
-  #
-  macro( decompose_tagged_libraries libs libs_general libs_optimized libs_debug )
-
-    if ( "${ARGN}" STREQUAL "PERSISTENT" )
-      set( _DTL_IN_CACHE "PERSISTENT" )
-    else()
-      set( _DTL_IN_CACHE )
-    endif()
-
-    set( _DTL_tag general )
-
-    foreach( _DTL_lib ${libs} )
-
-      if ( "${_DTL_lib}" STREQUAL "general" OR "${_DTL_lib}" STREQUAL "optimized" OR "${_DTL_lib}" STREQUAL "debug" )
-
-        set( _DTL_tag "${_DTL_lib}" )
-
-      else()
-
-        if (     "${_DTL_tag}" STREQUAL "general"   )
-                                                       set( _DTL_target ${libs_general}   )
-        elseif ( "${_DTL_tag}" STREQUAL "optimized" )
-                                                       set( _DTL_target ${libs_optimized} )
-        else()
-                                                       set( _DTL_target ${libs_debug}     )
-        endif()
-
-        add_to_list( ${_DTL_target} ${_DTL_IN_CACHE} ${_DTL_lib} )
-
-      endif()
-
-    endforeach()
-
-  endmacro()
-
-  # Given lists of optimized and debug libraries, creates a tagged list which will
-  # contain the libraries listed in the 'general' section if any of the two lists is empty,
-  #
-  # All arguments are variable names (not values), thus the input list can be undefined or empty.
-  # The return variable ('libs') will be APPENDED the result (retaining any previous contents)
-  #
-  # If there is a last parameter whose value is "PERSISTENT" then the result is an internal cached variable,
-  # otherwise it is an in-memory variable
-  #
-  # Example:
-  #
-  #   set( LIBS_1 libA.so libB.so )
-  #   set( LIBS_2 libC.so )
-  #
-  #   tag_libraries( LIBS_1 LIBS_2 LIBS_R )
-  #
-  # LIBS_R -> optimized;libA.so;libB.so;debug;libC.so
-  #
-  #   tag_libraries( LIBS_1 SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_R )
-  #
-  # LIBS_R -> libA.so;libB.so  (implicitely 'general' since there is no tag)
-  #
-  #   tag_libraries( SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_2 LIBS_R )
-  #
-  # LIBS_R -> libC.so  (implicitely 'general' since there is no tag)
-  #
-  macro( tag_libraries libs_general_or_optimized libs_general_or_debug libs )
-
-    list( LENGTH ${libs_general_or_optimized} _TL_libs_general_or_optimized_len )
-    list( LENGTH ${libs_general_or_debug}     _TL_libs_general_or_debug_len     )
-
-    if ( _TL_libs_general_or_optimized_len EQUAL 0 )
-                                                     compose_tagged_libraries( "${${libs_general_or_debug}}"     ""                                 ""                           ${libs} ${ARGN} )
-    elseif ( _TL_libs_general_or_debug_len EQUAL 0 )
-                                                     compose_tagged_libraries( "${${libs_general_or_optimized}}" ""                                 ""                           ${libs} ${ARGN} )
-    else()
-                                                     compose_tagged_libraries( ""                                "${${libs_general_or_optimized}}" "${${libs_general_or_debug}}" ${libs} ${ARGN} )
-    endif()
-
-  endmacro()
-
-  # add_to_tagged_libraries( libsR ${libsA} <PERSISTENT> )
-  #
-  # Appends the list of tagged libraries contained in the variable 'libA' to the list
-  # of tagged libraries contained in the variable 'libR', properly redistributing each tagged subsequence.
-  #
-  # The first argument is the name of the variable recieving the list. It will be APPENDED
-  # (retaining any previous contents).
-  # The second parameter is a single string value containing the tagged
-  # lists of libraries to append (as a semi-colon separated list). It can be empty, in which case noting is added.
-  #
-  # If there is a third parameter whose value is PERSISTENT, then 'libR' is an internal cached variable, otherwise
-  # it is an in-memory variable.
-  #
-  # It is not possible to append more than one list in the same call.
-  #
-  # Example:
-  #
-  #   set( LIBS_1 libG0.so libG1.so optimized libO0.so)
-  #   set( LIBS_2 libG2.so debug libD0.so)
-  #   set( LIBS_3 debug libD1.so optimized libO1.so libO2.so )
-  #
-  #   concat_tagged_libraries( LIBS_R ${LIBS_1} PERSISTENT )
-  #   concat_tagged_libraries( LIBS_R ${LIBS_2} PERSISTENT )
-  #   concat_tagged_libraries( LIBS_R ${LIBS_3} PERSISTENT )
-  #
-  # LIBS_R -> libG0.so;libG1.so;libG2.so;optimized;libO0.so;libO1.so;libO2.so;debug;libD0.so;libD1.so, in the cache
-  #
-  macro( add_to_tagged_libraries libsR in_cache libsA  )
-
-    if ( "${in_cache}" STREQUAL "PERSISTENT" )
-      set( _CTL_IN_CACHE "PERSISTENT" )
-    else()
-      set( _CTL_IN_CACHE )
-    endif()
-
-    set( _CTL_general_0   )
-    set( _CTL_optimized_0 )
-    set( _CTL_debug_0     )
-    set( _CTL_general_1   )
-    set( _CTL_optimized_1 )
-    set( _CTL_debug_0     )
-
-    decompose_tagged_libraries( "${${libsR}}" _CTL_general_0 _CTL_optimized_0 _CTL_debug_0 )
-    decompose_tagged_libraries( "${libsA}"    _CTL_general_1 _CTL_optimized_1 _CTL_debug_1 )
-
-    add_to_list( _CTL_general_0   ${_CTL_general_1}   )
-    add_to_list( _CTL_optimized_0 ${_CTL_optimized_1} )
-    add_to_list( _CTL_debug_0     ${_CTL_debug_1}     )
-
-    if ( "${_CTL_IN_CACHE}" STREQUAL "PERSISTENT" )
-      cache_set( ${libsR} )
-    else()
-      set( ${libsR} )
-    endif()
-
-    compose_tagged_libraries( "${_CTL_general_0}" "${_CTL_optimized_0}" "${_CTL_debug_0}" ${libsR} ${_CTL_IN_CACHE} )
-
-  endmacro()
-
-
-  macro( add_to_persistent_tagged_libraries libsR )
-    add_to_tagged_libraries( ${libsR} PERSISTENT "${ARGN}" )
-  endmacro()
-
-  macro( add_to_in_memory_tagged_libraries libsR )
-    add_to_tagged_libraries( ${libsR} NOT_PERSISTENT "${ARGN}" )
-  endmacro()
-
-
-endif()
-
-
-function(process_CGAL_subdirectory entry subdir type_name)
-  # For example, subdir can be "examples", type_name "example", and entry "Mesh_2"
-
-  if ( CGAL_BRANCH_BUILD )
-    string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/${subdir}/" "" ENTRY_DIR_NAME "${entry}" )
-  else()
-    string( REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" ENTRY_DIR_NAME "${entry}" )
-  endif()
-
-  if( NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") # out-of-source
-    make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
-  endif()
-
-  set(ADD_SUBDIR TRUE)
-
-  if(EXISTS ${entry}/../../dont_submit)
-    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${ENTRY_DIR_NAME}/?\$")
-    if(dont_submit_grep)
-      set(ADD_SUBDIR FALSE)
-    endif()
-    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/${ENTRY_DIR_NAME}/?\$")
-    if(dont_submit_grep)
-      set(ADD_SUBDIR FALSE)
-    endif()
-    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/?\$")
-    if(dont_submit_grep)
-      set(ADD_SUBDIR FALSE)
-    endif()
-  endif()
-
-  if(ADD_SUBDIR)
-    message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}")
-    if(EXISTS ${entry}/CMakeLists.txt)
-      add_subdirectory( ${entry} ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME} )
-    else()
-      if(CGAL_CREATE_CMAKE_SCRIPT)
-#        message("bah ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir ${entry}")
-        execute_process(
-          COMMAND bash ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir "${entry}"
-          WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}"
-          RESULT_VARIABLE RESULT_VAR OUTPUT_QUIET)
-        if(NOT RESULT_VAR)
-#          message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
-          add_subdirectory( "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
-        endif()
-      endif()
-    endif()
-  else()
-    message(STATUS "${subdir}/${ENTRY_DIR_NAME} is in dont_submit")
-  endif()
-endfunction()
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupBoost.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupBoost.cmake
deleted file mode 100644
index 1dd3b7c..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupBoost.cmake
+++ /dev/null
@@ -1,38 +0,0 @@
-if ( NOT CGAL_Boost_Setup )
-
-  include(CGAL_TweakFindBoost)
-  # In the documentation, we say we require Boost-1.48, but technically we
-  # require 1.39. Some packages may require more recent versions, though.
-  find_package( Boost 1.39 REQUIRED thread system )
-
-  if(Boost_FOUND)
-    if(DEFINED Boost_DIR AND NOT Boost_DIR)
-      # Unset that cache variable that is set in the cache by FindBoost
-      # (while it was searching for boost-cmake).
-      unset(Boost_DIR CACHE)
-      set(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "Avoid future search of boost-cmake")
-    endif()
-  endif()
-  
-  message( STATUS "Boost include:     ${Boost_INCLUDE_DIRS}" )
-  message( STATUS "Boost libraries:   ${Boost_LIBRARIES}" )
-  message( STATUS "Boost definitions: ${Boost_DEFINITIONS}" )
-  
-  set ( CGAL_USE_BOOST 1 )
-  
-  include(CGAL_Macros)
-  
-  add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS   ${Boost_INCLUDE_DIRS} )
-  add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${Boost_LIBRARY_DIRS} )
-  add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS    ${Boost_DEFINITIONS}  )
-  
-  if ( NOT MSVC )
-    add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES} )
-  endif()
-  
-  message( STATUS "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" )
-  
-  set ( CGAL_Boost_Setup TRUE )
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupDependencies.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupDependencies.cmake
deleted file mode 100644
index f4697fc..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupDependencies.cmake
+++ /dev/null
@@ -1,85 +0,0 @@
-include(CGAL_Macros)
-
-message ( STATUS "External libraries supported: ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}")
-
-foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
-
-  # Part 1: Try to find lib
-
-  set (vlib "${CGAL_EXT_LIB_${lib}_PREFIX}")
-
-  # Check whether lib is essential or WITH_<lib> is given:
-
-  list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION)
-
-  if ("${POSITION}" STRGREATER "-1" OR WITH_${lib})
-
-    # In both cases CGAL_USE_<lib> will be finally set.
-  
-    #message (STATUS "With ${lib} given or essential: pos=${POSITION}")
-
-    if ( CGAL_ENABLE_PRECONFIG )
-      message (STATUS "Preconfiguring library: ${lib} ...")
-    else()
-      message (STATUS "Configuring library: ${lib} ...")
-    endif()
-  
-    find_package( ${lib} )
-   
-    if ( ${vlib}_FOUND ) 
-      if ( CGAL_ENABLE_PRECONFIG )
-        message( STATUS "${lib} has been preconfigured:") 
-        message( STATUS "  Use${lib}-file:      ${${vlib}_USE_FILE}") 
-        message( STATUS "  ${lib} include:      ${${vlib}_INCLUDE_DIR}" )
-        message( STATUS "  ${lib} libraries:    ${${vlib}_LIBRARIES}" )
-        message( STATUS "  ${lib} definitions:  ${${vlib}_DEFINITIONS}" )
-      else() 
-        message( STATUS "${lib} has been configured") 
-        use_lib( ${vlib} ${${vlib}_USE_FILE})
-      endif()
-   
-      # TODO EBEB what about Qt3, Qt4, zlib etc?
-      set ( CGAL_USE_${vlib} TRUE )
-
-
-      # Part 2: Add some lib-specific definitions or obtain version
-   
-      if (${lib} STREQUAL "GMP") 
-        get_dependency_version(GMP)
-      endif()
-
-      if (${lib} STREQUAL "MPFR") 
-        set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
-        set( MPFR_DEPENDENCY_LIBRARIES   ${GMP_LIBRARIES} )
-        get_dependency_version(MPFR)
-      endif()
-
-      if (${lib} STREQUAL "LEDA") 
-        # special case for LEDA - add a flag
-        message( STATUS "LEDA cxx flags:   ${LEDA_CXX_FLAGS}" )
-        uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} )
-      endif()
-
-    else() 
-   
-      if ("${POSITION}" STRGREATER "-1") # if lib is essential
-        message( FATAL_ERROR "CGAL requires ${lib} to be found" )
-      endif()
-
-    endif()
-
-  endif()
-
-endforeach()
-
-if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) )
-  message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.")
-endif()
-
-if( NOT GMP_FOUND )
-  set(CGAL_NO_CORE ON)
-  message( STATUS "CGAL_Core needs GMP, cannot be configured.")
-endif( NOT GMP_FOUND )
-
-# finally setup Boost
-include(CGAL_SetupBoost)
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_VersionUtils.cmake b/3rdparty/CGAL-4.6/cmake/modules/CGAL_VersionUtils.cmake
deleted file mode 100644
index c5c1868..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/CGAL_VersionUtils.cmake
+++ /dev/null
@@ -1,230 +0,0 @@
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-if ( NOT CGAL_VERSION_UTILS_FILE_INCLUDED )
-  set( CGAL_VERSION_UTILS_FILE_INCLUDED 1 )
-
-#  
-# Given a version string of the form "major.[minor.[patch.[tweak]]]"
-# decomposes it into components
-#
-macro( VERSION_DECOMPOSE v major minor patch tweak )
-
-  string(REPLACE "." ";" VERSION_DECOMPOSE_LIST ${v} )
-
-  list( LENGTH VERSION_DECOMPOSE_LIST VERSION_DECOMPOSE_LIST_LEN )
-  
-  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 0 )
-    list( GET VERSION_DECOMPOSE_LIST 0 ${major} )
-  else()
-    set ( ${major} -1 )
-  endif()  
-  
-  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 1 )
-    list( GET VERSION_DECOMPOSE_LIST 1 ${minor} )
-  else()
-    set ( ${minor} -1 )
-  endif()  
-  
-  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 2 )
-    list( GET VERSION_DECOMPOSE_LIST 2 ${patch} )
-  else()
-    set ( ${patch} -1 )
-  endif()  
-  
-  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 3 )
-    list( GET VERSION_DECOMPOSE_LIST 3 ${tweak} )
-  else()
-    set ( ${tweak} -1 )
-  endif()  
-  
-endmacro()
-
-#  
-# Given two version string of the form "major.[minor.[patch.[tweak]]]"
-# returns TRUE if they are equal, FALSE otherwise.
-#
-macro( IS_VERSION_EQUAL a b r )
-
-  VERSION_DECOMPOSE( ${a} _IVE_a_major _IVE_a_minor _IVE_a_patch _IVE_a_tweak )
-  VERSION_DECOMPOSE( ${b} _IVE_b_major _IVE_b_minor _IVE_b_patch _IVE_b_tweak )
-  
-  set ( ${r} FALSE )  
-  
-  if ( _IVE_a_major EQUAL ${_IVE_b_major} )
-    if ( _IVE_a_minor EQUAL ${_IVE_b_minor} )
-      if ( _IVE_a_patch EQUAL ${_IVE_b_patch} )
-        if ( _IVE_a_tweak EQUAL ${_IVE_b_tweak} )
-          set ( ${r} TRUE )  
-        endif()  
-      endif()
-    endif()
-  endif()
-
-endmacro()
-
-#  
-# Given two version string of the form "major.[minor.[patch.[tweak]]]"
-# returns TRUE if the first is smaller than the second, FALSE otherwise.
-#
-macro( IS_VERSION_LESS a b r )
-
-  VERSION_DECOMPOSE( ${a} _IVL_a_major _IVL_a_minor _IVL_a_patch _IVL_a_tweak )
-  VERSION_DECOMPOSE( ${b} _IVL_b_major _IVL_b_minor _IVL_b_patch _IVL_b_tweak )
-  
-  set ( ${r} FALSE )  
-  
-  if ( _IVL_a_major LESS ${_IVL_b_major} )
-    set ( ${r} TRUE )  
-  elseif( _IVL_a_major EQUAL ${_IVL_b_major})  
-    if ( _IVL_a_minor LESS ${_IVL_b_minor} )
-      set ( ${r} TRUE )  
-    elseif( _IVL_a_minor EQUAL ${_IVL_b_minor} )  
-      if ( _IVL_a_patch LESS ${_IVL_b_patch} )
-        set ( ${r} TRUE )  
-      elseif( _IVL_a_patch EQUAL ${_IVL_b_patch} )   
-        if ( _IVL_a_tweak LESS ${_IVL_b_tweak} )
-          set ( ${r} TRUE )  
-        endif()  
-      endif()
-    endif()
-  endif()
-
-endmacro()
-
-#  
-# Given two version string of the form "major.[minor.[patch.[tweak]]]"
-# returns TRUE if the first is greater than the second, FALSE otherwise.
-#
-macro( IS_VERSION_GREATER a b r )
-
-  IS_VERSION_LESS( ${a} ${b} _IVG_less )
-  
-  if ( _IVG_less )
-    set( ${r} FALSE )
-  else()
-  
-    IS_VERSION_EQUAL( ${a} ${b} _IVG_eq )
-    
-    if ( _IVG_eq )
-      set( ${r} FALSE )
-    else()
-      set( ${r} TRUE )
-    endif()
-    
-  endif()  
-  
-endmacro()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-#                                    -= TESTING =-
-#
-
-
-macro ( TEST_VERSION_DECOMPOSE v expected_major expected_minor expected_patch expected_tweak )
-
-  VERSION_DECOMPOSE( ${v} major minor patch tweak )
-  
-  set ( OK 0 )
-  
-  if ( major EQUAL "${expected_major}" )
-    if ( minor EQUAL "${expected_minor}" )  
-      if ( patch EQUAL "${expected_patch}" ) 
-        if ( tweak EQUAL "${expected_tweak}" ) 
-          set ( OK 1 )
-        endif()  
-      endif()  
-    endif()  
-  endif()  
-
-  if ( OK )
-    message( STATUS "correct - ${v} -> ${major}, ${minor}, ${patch}, ${tweak} " ) 
-  else()
-    message( STATUS "FAILED  - ${v} -> ${major}, ${minor}, ${patch}, ${tweak} " ) 
-  endif()
-  
-endmacro()
-
-macro ( TEST_VERSION_COMPARISON op v0 v1 expected )
-
-  if ( "${op}" STREQUAL "<" )
-    IS_VERSION_LESS( ${v0} ${v1} result )
-  elseif ( "${op}" STREQUAL ">" )
-    IS_VERSION_GREATER( ${v0} ${v1} result )
-  else()
-    IS_VERSION_EQUAL( ${v0} ${v1} result )
-  endif()  
-  
-  if ( result STREQUAL ${expected} )
-    message( STATUS "correct - ${v0} ${op} ${v1} => ${result}" )   
-  else()
-    message( STATUS "FAILED  - ${v0} ${op} ${v1} => ${result}" ) 
-  endif()
-
-endmacro()
-
-if ( UNIT_TEST_VERSION_UTILS )
-
-  TEST_VERSION_DECOMPOSE("1.2.3.4" 1 2 3 4 )
-  TEST_VERSION_DECOMPOSE("1.2.3" 1 2 3 -1 )
-  TEST_VERSION_DECOMPOSE("1.2" 1 2 -1 -1 )
-  TEST_VERSION_DECOMPOSE("1" 1 -1 -1 -1 )
-  
-  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3.4" TRUE )
-  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2.3"   TRUE )
-  TEST_VERSION_COMPARISON( "==" "1.2"     "1.2"     TRUE )
-  TEST_VERSION_COMPARISON( "==" "1"       "1"       TRUE )
-  
-  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3"  FALSE )
-  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2"    FALSE )
-  TEST_VERSION_COMPARISON( "==" "1.2"     "1"      FALSE )
-  
-  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3.5" FALSE )
-  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2.4"   FALSE )
-  TEST_VERSION_COMPARISON( "==" "1.2"     "1.3"     FALSE )
-  TEST_VERSION_COMPARISON( "==" "1"       "2"       FALSE )
-  
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.3.4" FALSE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3"   "1.2.3"   FALSE )
-  TEST_VERSION_COMPARISON( "<" "1.2"     "1.2"     FALSE )
-  TEST_VERSION_COMPARISON( "<" "1"       "1"       FALSE )
-  
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.3.5" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.4.5" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.3.4.5" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "2.3.4.5" TRUE )
-  
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.4" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.3"   TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "2"     TRUE )
-  
-  TEST_VERSION_COMPARISON( "<" "1.2.3" "1.2.4" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2"   "1.3"   TRUE )
-  TEST_VERSION_COMPARISON( "<" "1"     "2"     TRUE )
-  
-  TEST_VERSION_COMPARISON( "<" "1.2.3.6" "1.2.4.5" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.2.5.6" "1.3.4.5" TRUE )
-  TEST_VERSION_COMPARISON( "<" "1.4.5.6" "2.3.4.5" TRUE )
-
-  TEST_VERSION_COMPARISON( ">" "1.2.3.4" "1.2.3.4" FALSE )
-  TEST_VERSION_COMPARISON( ">" "1.2.3"   "1.2.3"   FALSE )
-  TEST_VERSION_COMPARISON( ">" "1.2"     "1.2"     FALSE )
-  TEST_VERSION_COMPARISON( ">" "1"       "1"       FALSE )
-  
-  TEST_VERSION_COMPARISON( ">" "1.2.3.5" "1.2.3.4" TRUE )
-  
-endif()
-
-endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindCGAL.cmake b/3rdparty/CGAL-4.6/cmake/modules/FindCGAL.cmake
deleted file mode 100644
index b7cfa5b..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/FindCGAL.cmake
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# The following module is based on FindVTK.cmake
-#
-
-# - Find a CGAL installation or binary tree.
-# The following variables are set if CGAL is found.  If CGAL is not
-# found, CGAL_FOUND is set to false.
-#
-#  CGAL_FOUND         - Set to true when CGAL is found.
-#  CGAL_USE_FILE      - CMake file to use CGAL.
-#
-
-# Construct consitent error messages for use below.
-set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
-set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")
- 
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
- 
-if ( NOT CGAL_DIR )
-  
-  # Get the system search path as a list.
-  if(UNIX)
-    string(REGEX MATCHALL "[^:]+" CGAL_DIR_SEARCH1 "$ENV{PATH}")
-  else()
-    string(REGEX REPLACE "\\\\" "/" CGAL_DIR_SEARCH1 "$ENV{PATH}")
-  endif()
-  
-  string(REGEX REPLACE "/;" ";" CGAL_DIR_SEARCH2 "${CGAL_DIR_SEARCH1}")
-
-  # Construct a set of paths relative to the system search path.
-  set(CGAL_DIR_SEARCH "")
-  
-  foreach(dir ${CGAL_DIR_SEARCH2})
-  
-    set(CGAL_DIR_SEARCH ${CGAL_DIR_SEARCH} ${dir}/../lib/CGAL )
-      
-  endforeach()
-
-
-  #
-  # Look for an installation or build tree.
-  #
-  find_path(CGAL_DIR CGALConfig.cmake
-
-    # Look for an environment variable CGAL_DIR.
-    $ENV{CGAL_DIR}
-
-    # Look in places relative to the system executable search path.
-    ${CGAL_DIR_SEARCH}
-
-    # Look in standard UNIX install locations.
-    /usr/local/lib/CGAL
-    /usr/lib/CGAL
-
-    # Read from the CMakeSetup registry entries.  It is likely that
-    # CGAL will have been recently built.
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
-    # Help the user find it if we cannot.
-    DOC "The ${CGAL_DIR_DESCRIPTION}"
-  )
-  
-endif()
-
-if ( CGAL_DIR )
-  
-  if ( EXISTS "${CGAL_DIR}/CGALConfig.cmake" )
-    include( "${CGAL_DIR}/CGALConfig.cmake" )
-    set( CGAL_FOUND TRUE )
-  endif()
-
-endif()
-
-if( NOT CGAL_FOUND)
-  if(CGAL_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR ${CGAL_DIR_MESSAGE})
-  else()
-    if(NOT CGAL_FIND_QUIETLY)
-      MESSAGE(STATUS ${CGAL_DIR_MESSAGE})
-    endif()
-  endif()
-endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindQGLViewer.cmake b/3rdparty/CGAL-4.6/cmake/modules/FindQGLViewer.cmake
deleted file mode 100644
index 65723d6..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/FindQGLViewer.cmake
+++ /dev/null
@@ -1,61 +0,0 @@
-# - Try to find QGLViewer
-# Once done this will define
-#
-#  QGLVIEWER_FOUND - system has QGLViewer
-#  QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
-#  QGLVIEWER_LIBRARIES - Link these to use QGLViewer
-#  QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
-#
-
-find_path(QGLVIEWER_INCLUDE_DIR 
-          NAMES QGLViewer/qglviewer.h
-          PATHS /usr/include
-                /usr/local/include
-                ENV QGLVIEWERROOT 
-         )
-
-find_library(QGLVIEWER_LIBRARY_RELEASE 
-             NAMES qglviewer-qt4 qglviewer QGLViewer QGLViewer2
-             PATHS /usr/lib
-                   /usr/local/lib
-                   ENV QGLVIEWERROOT
-                   ENV LD_LIBRARY_PATH
-                   ENV LIBRARY_PATH
-             PATH_SUFFIXES QGLViewer QGLViewer/release
-            )
-
-find_library(QGLVIEWER_LIBRARY_DEBUG
-             NAMES dqglviewer dQGLViewer dQGLViewer2 QGLViewerd2
-             PATHS /usr/lib
-                   /usr/local/lib
-                   ENV QGLVIEWERROOT
-                   ENV LD_LIBRARY_PATH
-                   ENV LIBRARY_PATH
-             PATH_SUFFIXES QGLViewer QGLViewer/debug      
-            )
-
-if(QGLVIEWER_LIBRARY_RELEASE)
-  if(QGLVIEWER_LIBRARY_DEBUG)
-    set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
-  else()
-    set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE})
-  endif()
-
-  set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library")
-
-endif()
-
-IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
-   SET(QGLVIEWER_FOUND TRUE)
-ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
-
-IF(QGLVIEWER_FOUND)
-  IF(NOT QGLViewer_FIND_QUIETLY)
-    MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}")
-  ENDIF(NOT QGLViewer_FIND_QUIETLY)
-ELSE(QGLVIEWER_FOUND)
-  IF(QGLViewer_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find QGLViewer")
-  ENDIF(QGLViewer_FIND_REQUIRED)
-ENDIF(QGLVIEWER_FOUND)
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindQt3-patched.cmake b/3rdparty/CGAL-4.6/cmake/modules/FindQt3-patched.cmake
deleted file mode 100644
index add0a5d..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/FindQt3-patched.cmake
+++ /dev/null
@@ -1,318 +0,0 @@
-# - Locate Qt include paths and libraries
-# This module defines:
-#  QT3_INCLUDE_DIR - where to find qt.h, etc.
-#  QT3_LIBRARIES   - the libraries to link against to use Qt.
-#  QT3_DEFINITIONS - definitions to use when
-#                   compiling code that uses Qt.
-#  QT3_FOUND       - If false, don't try to use Qt.
-#  QT3_VERSION_STRING - the version of Qt found
-#
-# If you need the multithreaded version of Qt, set QT3_MT_REQUIRED to TRUE
-#
-# Also defined, but not for general use are:
-#  QT3_MOC_EXECUTABLE, where to find the moc tool.
-#  QT3_UIC_EXECUTABLE, where to find the uic tool.
-#  QT3_QT_LIBRARY, where to find the Qt library.
-#  QT3_QTMAIN_LIBRARY, where to find the qtmain
-#   library. This is only required by Qt3 on Windows.
-
-# These are around for backwards compatibility
-# they will be set
-#  QT3_WRAP_CPP, set true if QT3_MOC_EXECUTABLE is found
-#  QT3_WRAP_UI set true if QT3_UIC_EXECUTABLE is found
-
-FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin /sw/lib/qt3*/bin)
-FIND_PATH(QT3_INCLUDE_DIR qt.h
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
-  $ENV{QTDIR}/include
-  ${GLOB_PATHS_BIN}
-  /usr/local/qt/include
-  /usr/lib/qt/include
-  /usr/lib/qt3/include
-  /usr/include/qt
-  /usr/share/qt3/include
-  C:/Progra~1/qt/include
-  /usr/include/qt3
-  /usr/X11R6/include
-  )
-
-# if qglobal.h is not in the qt_include_dir then set
-# QT3_INCLUDE_DIR to NOTFOUND
-IF(NOT EXISTS ${QT3_INCLUDE_DIR}/qglobal.h)
-  SET(QT3_INCLUDE_DIR QT3_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE)
-  SET(QT3_INCLUDE_DIR QT3_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE) # double-set to work-around cmake 2.6 bug
-ENDIF(NOT EXISTS ${QT3_INCLUDE_DIR}/qglobal.h)
-
-IF(QT3_INCLUDE_DIR)
-  #extract the version string from qglobal.h
-  FILE(READ ${QT3_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
-  STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}")
-  STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
-
-  # Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
-  # version X.Y.Z, so we need to remove the dots from version
-  STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
-ENDIF(QT3_INCLUDE_DIR)
-
-FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
-IF (QT3_MT_REQUIRED)
-  FIND_LIBRARY(QT3_QT_LIBRARY
-    NAMES
-    qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
-    qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
-    PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
-    $ENV{QTDIR}/lib
-    ${GLOB_PATHS_LIB}
-    /usr/local/qt/lib
-    /usr/lib/qt/lib
-    /usr/lib/qt3/lib
-    /usr/lib/qt3/lib64
-    /usr/share/qt3/lib
-    C:/Progra~1/qt/lib
-    /usr/X11R6/lib
-    )
-
-ELSE (QT3_MT_REQUIRED)
-  FIND_LIBRARY(QT3_QT_LIBRARY
-    NAMES
-    qt qt-${qt_version_str_lib} qt-edu${qt_version_str_lib}
-    qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
-    qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
-    PATHS
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
-    $ENV{QTDIR}/lib
-    ${GLOB_PATHS_LIB}
-    /usr/local/qt/lib
-    /usr/lib/qt/lib
-    /usr/lib/qt3/lib
-    /usr/lib/qt3/lib64
-    /usr/share/qt3/lib
-    C:/Progra~1/qt/lib
-    /usr/X11R6/lib
-    )
-ENDIF (QT3_MT_REQUIRED)
-
-
-
-FIND_LIBRARY(QT3_QASSISTANTCLIENT_LIBRARY
-  NAMES qassistantclient
-  PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
-  $ENV{QTDIR}/lib
-  ${GLOB_PATHS_LIB}
-  /usr/local/qt/lib
-  /usr/lib/qt3/lib
-  /usr/lib/qt3/lib64
-  /usr/share/qt3/lib
-  C:/Progra~1/qt/lib
-  /usr/X11R6/lib
-  )
-
-# qt 3 should prefer QTDIR over the PATH
-FIND_PROGRAM(QT3_MOC_EXECUTABLE
-  NAMES moc-qt3 moc
-  HINTS
-  $ENV{QTDIR}/bin
-  PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
-  $ENV{QTDIR}/bin
-  ${GLOB_PATHS_BIN}
-  /usr/local/qt/bin
-  /usr/lib/qt/bin
-  /usr/lib/qt3/bin
-  /usr/share/qt3/bin
-  C:/Progra~1/qt/bin
-  /usr/X11R6/bin
-  )
-
-IF(QT3_MOC_EXECUTABLE)
-  SET ( QT3_WRAP_CPP "YES")
-ENDIF(QT3_MOC_EXECUTABLE)
-
-# qt 3 should prefer QTDIR over the PATH
-FIND_PROGRAM(QT3_UIC_EXECUTABLE
-  NAMES uic-qt3 uic
-  HINTS
-  $ENV{QTDIR}/bin
-  PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
-  ${GLOB_PATHS_BIN}
-  /usr/local/qt/bin
-  /usr/lib/qt/bin
-  /usr/lib/qt3/bin
-  /usr/share/qt3/bin
-  C:/Progra~1/qt/bin
-  /usr/X11R6/bin
-  )
-
-IF(QT3_UIC_EXECUTABLE)
-  SET ( QT3_WRAP_UI "YES")
-ENDIF(QT3_UIC_EXECUTABLE)
-
-IF (WIN32)
-  FIND_LIBRARY(QT3_QTMAIN_LIBRARY qtmain
-    HINTS
-    $ENV{QTDIR}/lib
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
-    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
-    PATHS
-    "$ENV{ProgramFiles}/qt/lib"
-    "C:/Program Files/qt/lib"
-    DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
-    )
-ENDIF (WIN32)
-
-
-IF (QT3_MIN_VERSION)
-
-  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}")
-  STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers "${qt_version_str}")
-  STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers "${qt_version_str}")
-
-  #now parse the parts of the user given version string into variables
-  STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" req_qt_major_vers "${QT3_MIN_VERSION}")
-  IF (NOT req_qt_major_vers)
-    error_message(  "Invalid Qt version string given: \"${QT3_MIN_VERSION}\", expected e.g. \"3.1.5\"")
-  ENDIF (NOT req_qt_major_vers)
-
-  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT3_MIN_VERSION}")
-  STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT3_MIN_VERSION}")
-  STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT3_MIN_VERSION}")
-
-  # req = "6.5.4", qt = "3.2.1"
-  macro(error_message msg)
-    IF(QT3_REQUIRED)
-      MESSAGE( FATAL_ERROR ${msg})
-    ELSE(QT3_REQUIRED)
-      MESSAGE( STATUS ${msg})
-    ENDIF(QT3_REQUIRED)
-  endmacro(error_message)
-
-  IF (req_qt_major_vers GREATER qt_major_vers)                  # (6 > 3) ?
-    error_message(  "Qt major version not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})")            # yes
-  ELSE  (req_qt_major_vers GREATER qt_major_vers)               # no
-    IF (req_qt_major_vers LESS qt_major_vers)                  # (6 < 3) ?
-      SET( QT3_VERSION_BIG_ENOUGH "YES" )                      # yes
-    ELSE (req_qt_major_vers LESS qt_major_vers)                # ( 6==3) ?
-      IF (req_qt_minor_vers GREATER qt_minor_vers)            # (5>2) ?
-        error_message(  "Qt minor version not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})")      # yes
-      ELSE (req_qt_minor_vers GREATER qt_minor_vers)          # no
-        IF (req_qt_minor_vers LESS qt_minor_vers)            # (5<2) ?
-          SET( QT3_VERSION_BIG_ENOUGH "YES" )                # yes
-        ELSE (req_qt_minor_vers LESS qt_minor_vers)          # (5==2)
-          IF (req_qt_patch_vers GREATER qt_patch_vers)      # (4>1) ?
-            error_message(  "Qt patch level not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})")  # yes
-          ELSE (req_qt_patch_vers GREATER qt_patch_vers)    # (4>1) ?
-            SET( QT3_VERSION_BIG_ENOUGH "YES" )             # yes
-          ENDIF (req_qt_patch_vers GREATER qt_patch_vers)   # (4>1) ?
-        ENDIF (req_qt_minor_vers LESS qt_minor_vers)
-      ENDIF (req_qt_minor_vers GREATER qt_minor_vers)
-    ENDIF (req_qt_major_vers LESS qt_major_vers)
-  ENDIF (req_qt_major_vers GREATER qt_major_vers)
-ENDIF (QT3_MIN_VERSION)
-
-# if the include a library are found then we have it
-IF(QT3_INCLUDE_DIR)
-  IF(QT3_QT_LIBRARY)
-    SET( QT3_FOUND "YES" )
-  ENDIF(QT3_QT_LIBRARY)
-ENDIF(QT3_INCLUDE_DIR)
-
-IF(QT3_FOUND)
-  SET( QT3_LIBRARIES ${QT3_LIBRARIES} ${QT3_QT_LIBRARY} )
-  SET( QT3_DEFINITIONS "")
-
-  IF (WIN32 AND NOT CYGWIN)
-    IF (QT3_QTMAIN_LIBRARY)
-      # for version 3
-      SET (QT3_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG)
-      SET (QT3_LIBRARIES imm32.lib ${QT3_QT_LIBRARY} ${QT3_QTMAIN_LIBRARY} )
-      SET (QT3_LIBRARIES ${QT3_LIBRARIES} winmm wsock32)
-    ELSE (QT3_QTMAIN_LIBRARY)
-      # for version 2
-      SET (QT3_LIBRARIES imm32.lib ws2_32.lib ${QT3_QT_LIBRARY} )
-    ENDIF (QT3_QTMAIN_LIBRARY)
-  ELSE (WIN32 AND NOT CYGWIN)
-    SET (QT3_LIBRARIES ${QT3_QT_LIBRARY} )
-
-    SET (QT3_DEFINITIONS -DQT_SHARED -DQT_NO_DEBUG)
-    IF(QT3_QT_LIBRARY MATCHES "qt-mt")
-      SET (QT3_DEFINITIONS ${QT3_DEFINITIONS} -DQT_THREAD_SUPPORT -D_REENTRANT)
-    ENDIF(QT3_QT_LIBRARY MATCHES "qt-mt")
-
-  ENDIF (WIN32 AND NOT CYGWIN)
-
-  IF (QT3_QASSISTANTCLIENT_LIBRARY)
-    SET (QT3_LIBRARIES ${QT3_QASSISTANTCLIENT_LIBRARY} ${QT3_LIBRARIES})
-  ENDIF (QT3_QASSISTANTCLIENT_LIBRARY)
-
-  # Backwards compatibility for CMake1.4 and 1.2
-  SET (QT3_MOC_EXE ${QT3_MOC_EXECUTABLE} )
-  SET (QT3_UIC_EXE ${QT3_UIC_EXECUTABLE} )
-  # for unix add X11 stuff
-  IF(UNIX)
-    FIND_PACKAGE(X11)
-    IF (X11_FOUND)
-      SET (QT3_LIBRARIES ${QT3_LIBRARIES} ${X11_LIBRARIES})
-    ENDIF (X11_FOUND)
-    IF (CMAKE_DL_LIBS)
-      SET (QT3_LIBRARIES ${QT3_LIBRARIES} ${CMAKE_DL_LIBS})
-    ENDIF (CMAKE_DL_LIBS)
-  ENDIF(UNIX)
-  IF(QT3_QT_LIBRARY MATCHES "qt-mt")
-    FIND_PACKAGE(Threads)
-    SET(QT3_LIBRARIES ${QT3_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-  ENDIF(QT3_QT_LIBRARY MATCHES "qt-mt")
-ENDIF(QT3_FOUND)
-
-EXEC_PROGRAM(${QT3_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
-EXEC_PROGRAM(${QT3_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
-
-SET(_QT3_UIC_VERSION_3 FALSE)
-IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
-  SET(_QT3_UIC_VERSION_3 TRUE)
-ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*")
-
-SET(_QT3_MOC_VERSION_3 FALSE)
-IF("${QTVERSION_MOC}" MATCHES ".* 3..*")
-  SET(_QT3_MOC_VERSION_3 TRUE)
-ENDIF("${QTVERSION_MOC}" MATCHES ".* 3..*")
-
-SET(QT3_WRAP_CPP FALSE)
-IF (QT3_MOC_EXECUTABLE)
-  IF(_QT3_MOC_VERSION_3)
-    SET ( QT3_WRAP_CPP TRUE)
-  ENDIF(_QT3_MOC_VERSION_3)
-ENDIF (QT3_MOC_EXECUTABLE)
-
-SET(QT3_WRAP_UI FALSE)
-IF (QT3_UIC_EXECUTABLE)
-  IF(_QT3_UIC_VERSION_3)
-    SET ( QT3_WRAP_UI TRUE)
-  ENDIF(_QT3_UIC_VERSION_3)
-ENDIF (QT3_UIC_EXECUTABLE)
-
-MARK_AS_ADVANCED(
-  QT3_INCLUDE_DIR
-  QT3_QT_LIBRARY
-  QT3_QTMAIN_LIBRARY
-  QT3_QASSISTANTCLIENT_LIBRARY
-  QT3_UIC_EXECUTABLE
-  QT3_MOC_EXECUTABLE
-  QT3_WRAP_CPP
-  QT3_WRAP_UI
-  )
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindTBB.cmake b/3rdparty/CGAL-4.6/cmake/modules/FindTBB.cmake
deleted file mode 100644
index 096c00c..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/FindTBB.cmake
+++ /dev/null
@@ -1,422 +0,0 @@
-# Locate Intel Threading Building Blocks include paths and libraries
-# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
-# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
-# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
-#   Florian Uhlig <F.Uhlig _at_ gsi.de>,
-#   Jiri Marsik <jiri.marsik89 _at_ gmail.com>
-
-# The MIT License
-#
-# Copyright (c) 2011 Hannes Hofmann
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
-#   e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
-#   TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
-#   in the TBB installation directory (TBB_INSTALL_DIR).
-#
-# GvdB: Mac OS X distribution places libraries directly in lib directory.
-#
-# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
-# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
-#   which architecture to use
-# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
-#   which compiler to use (detected automatically on Windows)
-
-# This module respects
-# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
-
-# This module defines
-# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
-# TBB_LIBRARY_DIRS, where to find TBB libraries
-# TBB_INSTALL_DIR, the base TBB install directory.
-# TBB_LIBRARIES, all the following TBB libraries (both release and debug versions, using "optimized" and "debug" CMake keywords). Note that if the debug versions are not found, the release versions will be used instead for the debug mode.
-#   TBB_RELEASE_LIBRARY, the TBB release library
-#   TBB_MALLOC_RELEASE_LIBRARY, the TBB release malloc library
-#   TBB_DEBUG_LIBRARY, the TBB debug library
-#   TBB_MALLOC_DEBUG_LIBRARY, the TBB debug malloc library
-# TBB_FOUND, If false, don't try to use TBB.
-# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
-# TBB_MALLOCPROXY_DEBUG_LIBRARY, the TBB debug malloc_proxy library (not included in TBB_LIBRARIES since it's optionnal)
-# TBB_MALLOCPROXY_RELEASE_LIBRARY, the TBB release malloc_proxy library (not included in TBB_LIBRARIES since it's optionnal)
-
-include(CheckCXXSourceCompiles)
-
-# Usage:
-#   try_TBB_with_pthread(<result_var_name> [additional linker args...])
-function(try_TBB_with_pthread result_var)
-    set(TBB_try_ts_source "
-          #include <tbb/enumerable_thread_specific.h>
-          int main() {
-            tbb::enumerable_thread_specific<
-              bool*,
-              tbb::cache_aligned_allocator<bool*>,
-              tbb::ets_key_per_instance> grid;
-          }
-          ")
-    set(CMAKE_REQUIRED_LIBRARIES ${ALL_TBB_LIBRARIES} ${ARGN})
-    set(CMAKE_REQUIRED_INCLUDES ${TBB_INCLUDE_DIR})
-    check_cxx_source_compiles("${TBB_try_ts_source}" ${result_var})
-    set(${result_var} ${${result_var}} PARENT_SCOPE)
-endfunction(try_TBB_with_pthread)
-
-if (WIN32)
-    # has em64t/vc8 em64t/vc9
-    # has ia32/vc7.1 ia32/vc8 ia32/vc9
-    set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
-    set(_TBB_LIB_RELEASE_NAME "tbb")
-    set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
-    set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
-    set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
-    set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
-    set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
-    if (MSVC71)
-        set (_TBB_COMPILER "vc7.1")
-    endif(MSVC71)
-    if (MSVC80)
-        set(_TBB_COMPILER "vc8")
-    endif(MSVC80)
-    if (MSVC90)
-        set(_TBB_COMPILER "vc9")
-    endif(MSVC90)
-    if(MSVC10)
-        set(_TBB_COMPILER "vc10")
-    endif(MSVC10)
-    if(MSVC11)
-        set(_TBB_COMPILER "vc11")
-    endif(MSVC11)
-    # Todo: add other Windows compilers such as ICL.
-    set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-endif (WIN32)
-
-if (UNIX)
-    if (APPLE)
-        # MAC
-        set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
-        # libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
-        set(_TBB_LIB_RELEASE_NAME "tbb")
-        set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
-        #set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
-        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
-        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
-        #set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
-        # default flavor on apple: ia32/cc4.0.1_os10.4.9
-        # Jiri: There is no reason to presume there is only one flavor and
-        #       that user's setting of variables should be ignored.
-        if(NOT TBB_COMPILER)
-            set(_TBB_COMPILER "cc4.0.1_os10.4.9")
-        elseif (NOT TBB_COMPILER)
-            set(_TBB_COMPILER ${TBB_COMPILER})
-        endif(NOT TBB_COMPILER)
-        if(NOT TBB_ARCHITECTURE)
-            set(_TBB_ARCHITECTURE "ia32")
-        elseif(NOT TBB_ARCHITECTURE)
-            set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-        endif(NOT TBB_ARCHITECTURE)
-    else (APPLE)
-        # LINUX
-        set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
-        set(_TBB_LIB_RELEASE_NAME "tbb")
-        set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
-        set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
-        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
-        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
-        set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
-        # has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
-        # has ia32/*
-        # has itanium/*
-        set(_TBB_COMPILER ${TBB_COMPILER})
-        set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-    endif (APPLE)
-endif (UNIX)
-
-if (CMAKE_SYSTEM MATCHES "SunOS.*")
-# SUN
-# not yet supported
-# has em64t/cc3.4.3_kernel5.10
-# has ia32/*
-endif (CMAKE_SYSTEM MATCHES "SunOS.*")
-
-
-#-- Clear the public variables
-set (TBB_FOUND "NO")
-
-
-#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
-# first: use CMake variable TBB_INSTALL_DIR
-if (TBB_INSTALL_DIR)
-    set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
-endif (TBB_INSTALL_DIR)
-# second: use environment variable
-if (NOT _TBB_INSTALL_DIR)
-    if (NOT "$ENV{TBBROOT}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBBROOT})
-    endif (NOT "$ENV{TBBROOT}" STREQUAL "")
-    if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
-    endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
-    # Intel recommends setting TBB21_INSTALL_DIR
-    if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
-    endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
-    if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
-    endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
-    if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
-    endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
-endif (NOT _TBB_INSTALL_DIR)
-# third: try to find path automatically
-if (NOT _TBB_INSTALL_DIR)
-    if (_TBB_DEFAULT_INSTALL_DIR)
-        set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
-    endif (_TBB_DEFAULT_INSTALL_DIR)
-endif (NOT _TBB_INSTALL_DIR)
-# sanity check
-if (NOT _TBB_INSTALL_DIR)
-    message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
-else (NOT _TBB_INSTALL_DIR)
-# finally: set the cached CMake variable TBB_INSTALL_DIR
-if (NOT TBB_INSTALL_DIR)
-    set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
-    mark_as_advanced(TBB_INSTALL_DIR)
-endif (NOT TBB_INSTALL_DIR)
-
-
-#-- A macro to rewrite the paths of the library. This is necessary, because
-#   find_library() always found the em64t/vc9 version of the TBB libs
-macro(TBB_CORRECT_LIB_DIR var_name)
-#    if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
-        string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
-#    endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
-    string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
-    string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc11 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-endmacro(TBB_CORRECT_LIB_DIR var_content)
-
-
-#-- Look for include directory and set ${TBB_INCLUDE_DIR}
-set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
-# Jiri: tbbvars now sets the CPATH environment variable to the directory
-#       containing the headers.
-#  LR: search first with NO_DEFAULT_PATH...
-find_path(TBB_INCLUDE_DIR
-    tbb/task_scheduler_init.h
-    PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
-    NO_DEFAULT_PATH
-)
-if(NOT TBB_INCLUDE_DIR)
-#  LR: ... and then search again with NO_DEFAULT_PATH if nothing was found in
-#  hinted paths
-  find_path(TBB_INCLUDE_DIR
-      tbb/task_scheduler_init.h
-      PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
-  )
-endif()
-mark_as_advanced(TBB_INCLUDE_DIR)
-
-
-#-- Look for libraries
-# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
-if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-    set (_TBB_LIBRARY_DIR
-         ${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
-         ${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
-        )
-endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-# Jiri: This block isn't mutually exclusive with the previous one
-#       (hence no else), instead I test if the user really specified
-#       the variables in question.
-if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
-    # HH: deprecated
-    message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
-    # Jiri: It doesn't hurt to look in more places, so I store the hints from
-    #       ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
-    #       variables and search them both.
-    set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
-endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
-
-# GvdB: Mac OS X distribution places libraries directly in lib directory.
-list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
-
-# Jiri: No reason not to check the default paths. From recent versions,
-#       tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
-#       variables, which now point to the directories of the lib files.
-#       It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
-#       argument instead of the implicit PATHS as it isn't hard-coded
-#       but computed by system introspection. Searching the LIBRARY_PATH
-#       and LD_LIBRARY_PATH environment variables is now even more important
-#       that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
-#       the use of TBB built from sources.
-#  LR: search first with NO_DEFAULT_PATH...
-find_library(TBB_RELEASE_LIBRARY ${_TBB_LIB_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-find_library(TBB_MALLOC_RELEASE_LIBRARY ${_TBB_LIB_MALLOC_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-find_library(TBB_MALLOCPROXY_RELEASE_LIBRARY ${_TBB_LIB_MALLOCPROXY_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-if(NOT TBB_RELEASE_LIBRARY OR NOT TBB_MALLOC_RELEASE_LIBRARY OR NOT TBB_MALLOCPROXY_RELEASE_LIBRARY)
-# LR: ... and then search again with NO_DEFAULT_PATH if nothing was found
-#  in hinted paths
-    find_library(TBB_RELEASE_LIBRARY ${_TBB_LIB_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_RELEASE_LIBRARY ${_TBB_LIB_MALLOC_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOCPROXY_RELEASE_LIBRARY ${_TBB_LIB_MALLOCPROXY_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-endif()
-
-#Extract path from TBB_RELEASE_LIBRARY name
-get_filename_component(TBB_RELEASE_LIBRARY_DIR ${TBB_RELEASE_LIBRARY} PATH)
-
-#TBB_CORRECT_LIB_DIR(TBB_RELEASE_LIBRARY)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOC_RELEASE_LIBRARY)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOCPROXY_RELEASE_LIBRARY)
-mark_as_advanced(TBB_RELEASE_LIBRARY TBB_MALLOC_RELEASE_LIBRARY TBB_MALLOCPROXY_RELEASE_LIBRARY)
-
-#-- Look for debug libraries
-# Jiri: Changed the same way as for the release libraries.
-find_library(TBB_DEBUG_LIBRARY ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-find_library(TBB_MALLOC_DEBUG_LIBRARY ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-find_library(TBB_MALLOCPROXY_DEBUG_LIBRARY ${_TBB_LIB_MALLOCPROXY_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
-if(NOT TBB_DEBUG_LIBRARY OR NOT TBB_MALLOC_DEBUG_LIBRARY OR NOT TBB_MALLOCPROXY_DEBUG_LIBRARY)
-    find_library(TBB_DEBUG_LIBRARY ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_DEBUG_LIBRARY ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOCPROXY_DEBUG_LIBRARY ${_TBB_LIB_MALLOCPROXY_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-endif()
-
-# Jiri: Self-built TBB stores the debug libraries in a separate directory.
-#       Extract path from TBB_DEBUG_LIBRARY name
-get_filename_component(TBB_DEBUG_LIBRARY_DIR ${TBB_DEBUG_LIBRARY} PATH)
-
-#TBB_CORRECT_LIB_DIR(TBB_DEBUG_LIBRARY)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOC_DEBUG_LIBRARY)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOCPROXY_DEBUG_LIBRARY)
-mark_as_advanced(TBB_DEBUG_LIBRARY TBB_MALLOC_DEBUG_LIBRARY TBB_MALLOCPROXY_DEBUG_LIBRARY)
-
-if (TBB_INCLUDE_DIR)
-    if (TBB_RELEASE_LIBRARY)
-        set (TBB_FOUND "YES")
-
-        # NOTE: Removed because we don't want to link with the malloc_proxy by default
-        #if (NOT "${TBB_MALLOCPROXY_RELEASE_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_RELEASE_LIBRARY-NOTFOUND")
-        #    mark_as_advanced(TBB_MALLOCPROXY_RELEASE_LIBRARY)
-        #    set (_TBB_MALLOCPROXY optimized ${TBB_MALLOCPROXY_RELEASE_LIBRARY})
-        #endif (NOT "${TBB_MALLOCPROXY_RELEASE_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_RELEASE_LIBRARY-NOTFOUND")
-        #if (NOT "${TBB_MALLOCPROXY_DEBUG_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_DEBUG_LIBRARY-NOTFOUND")
-        #    mark_as_advanced(TBB_MALLOCPROXY_DEBUG_LIBRARY)
-        #    set (_TBB_MALLOCPROXY ${_TBB_MALLOCPROXY} debug ${TBB_MALLOCPROXY_DEBUG_LIBRARY})
-        #endif (NOT "${TBB_MALLOCPROXY_DEBUG_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_DEBUG_LIBRARY-NOTFOUND")
-
-        # TBB release library
-        set (ALL_TBB_LIBRARIES optimized ${TBB_RELEASE_LIBRARY})
-
-        # TBB debug library found?
-        if (TBB_DEBUG_LIBRARY)
-            list(APPEND ALL_TBB_LIBRARIES debug ${TBB_DEBUG_LIBRARY})
-        else (TBB_DEBUG_LIBRARY)
-            # Otherwise, link with the release library even in debug mode
-            list(APPEND ALL_TBB_LIBRARIES debug ${TBB_RELEASE_LIBRARY})
-        endif (TBB_DEBUG_LIBRARY)
-
-        # TBB malloc - release
-        if (TBB_MALLOC_RELEASE_LIBRARY)
-            list(APPEND ALL_TBB_LIBRARIES optimized ${TBB_MALLOC_RELEASE_LIBRARY})
-
-            # TBB malloc - debug
-            if (TBB_MALLOC_DEBUG_LIBRARY)
-                list(APPEND ALL_TBB_LIBRARIES debug ${TBB_MALLOC_DEBUG_LIBRARY})
-            else (TBB_MALLOC_DEBUG_LIBRARY)
-                list(APPEND ALL_TBB_LIBRARIES debug ${TBB_MALLOC_RELEASE_LIBRARY})
-            endif (TBB_MALLOC_DEBUG_LIBRARY)
-        endif (TBB_MALLOC_RELEASE_LIBRARY)
-
-        if(UNIX AND NOT APPLE)
-            # On Fedora, code using TBB might need -pthread
-
-            # First check without pthread
-            try_TBB_with_pthread(TBB_without_pthread)
-
-            if(NOT TBB_without_pthread)
-                # Then check with -pthread
-                try_TBB_with_pthread(TBB_with_pthread -pthread)
-                if(TBB_with_pthread)
-                    list(APPEND ALL_TBB_LIBRARIES general -pthread)
-                endif(TBB_with_pthread)
-                endif(NOT TBB_without_pthread)
-        endif(UNIX AND NOT APPLE)
-
-        set (TBB_LIBRARIES ${ALL_TBB_LIBRARIES}
-             CACHE PATH "TBB libraries" FORCE)
-
-        # Include dirs
-        set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
-
-        # Library dirs
-        if( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
-            set (TBB_LIBRARY_DIRS
-                ${TBB_RELEASE_LIBRARY_DIR}
-                CACHE PATH "TBB library directories" FORCE)
-        else( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
-            set (TBB_LIBRARY_DIRS
-                ${TBB_RELEASE_LIBRARY_DIR} ${TBB_DEBUG_LIBRARY_DIR}
-                CACHE PATH "TBB library directories" FORCE)
-        endif( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
-
-        message(STATUS "Found Intel TBB")
-    endif (TBB_RELEASE_LIBRARY)
-endif (TBB_INCLUDE_DIR)
-
-if (NOT TBB_FOUND)
-    if(NOT TBB_FIND_QUIETLY)
-        message("ERROR: Intel TBB NOT found! Please define the TBBROOT (or TBB_INSTALL_DIR) and/or TBB_ARCH_PLATFORM environment variables.")
-        message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
-    endif(NOT TBB_FIND_QUIETLY)
-    SET(TBB_INSTALL_DIR "TBB_INSTALL_DIR_NOT_FOUND" CACHE STRING "Intel TBB install directory")
-    # do only throw fatal, if this pkg is REQUIRED
-    if (TBB_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find TBB library.")
-    endif (TBB_FIND_REQUIRED)
-endif (NOT TBB_FOUND)
-
-endif (NOT _TBB_INSTALL_DIR)
-
-if (TBB_FOUND)
-    set(TBB_INTERFACE_VERSION 0)
-    FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
-    STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
-    set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
-endif (TBB_FOUND)
-
-set(TBB_USE_FILE "UseTBB")
-
-### ** Emacs settings **
-### Local Variables:
-### cmake-tab-width: 4
-### End:
diff --git a/3rdparty/CGAL-4.6/cmake/modules/Qt3Macros-patched.cmake b/3rdparty/CGAL-4.6/cmake/modules/Qt3Macros-patched.cmake
deleted file mode 100644
index b630cc4..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/Qt3Macros-patched.cmake
+++ /dev/null
@@ -1,169 +0,0 @@
-# This file contains the following macros:
-#  macro QT3_ADD_RESOURCE(outfiles inputfile ... )
-#  macro QT3_AUTOMOC(inputfile ... )
-#  macro QT3_GENERATE_MOC(inputfile outputfile )
-#
-# Adapted to Qt3 and CGAL from FindQt4.cmake (included in CMake 2.4)
-
-INCLUDE(AddFileDependencies)
-
-
-# get include dirs
-MACRO (QT3_GET_MOC_INC_DIRS _moc_INC_DIRS)
-    SET(${_moc_INC_DIRS})
-    GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
-    FOREACH(_current ${_inc_DIRS})
-        SET(${_moc_INC_DIRS} "${${_moc_INC_DIRS}} -I ${_current}")
-    ENDFOREACH(_current ${_inc_DIRS})
-ENDMACRO(QT3_GET_MOC_INC_DIRS)
-
-
-# add rule to generate ${outfile} .moc file from ${infile} (.cpp or .h)
-MACRO (QT3_GENERATE_MOC infile outfile)
-#     QT3_GET_MOC_INC_DIRS(moc_includes)
-
-    GET_FILENAME_COMPONENT(infile ${infile} ABSOLUTE)
-    GET_FILENAME_COMPONENT(outfile ${outfile} ABSOLUTE)
-
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-        COMMAND ${QT3_MOC_EXECUTABLE}
-#         ARGS ${moc_includes} -o ${outfile} ${infile}
-        ARGS -o ${outfile} ${infile}
-        DEPENDS ${infile})
-
-#     ADD_FILE_DEPENDENCIES(${infile} ${outfile})
-ENDMACRO (QT3_GENERATE_MOC)
-
-
-# # QT3_WRAP_CPP(outfiles inputfile ... )
-# MACRO (QT3_WRAP_CPP outfiles )
-#     # get include dirs
-#     QT3_GET_MOC_INC_DIRS(moc_includes)
-#
-#     FOREACH (it ${ARGN})
-#         GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
-#         GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
-#
-#         SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
-#         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-#             COMMAND ${QT3_MOC_EXECUTABLE}
-#             ARGS ${moc_includes} -o ${outfile} ${it}
-#             DEPENDS ${it})
-#         SET(${outfiles} ${${outfiles}} ${outfile})
-#     ENDFOREACH(it)
-# ENDMACRO (QT3_WRAP_CPP)
-
-
-# # QT3_WRAP_UI(outfiles inputfile ... )
-# MACRO (QT3_WRAP_UI outfiles )
-#
-#     FOREACH (it ${ARGN})
-#     GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
-#     GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-#     SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
-#     ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-#         COMMAND ${QT3_UIC_EXECUTABLE}
-#         ARGS -o ${outfile} ${infile}
-#         MAIN_DEPENDENCY ${infile})
-#     SET(${outfiles} ${${outfiles}} ${outfile})
-#     ENDFOREACH (it)
-#
-# ENDMACRO (QT3_WRAP_UI)
-
-
-# QT3_ADD_RESOURCE(outfiles inputfile ... )
-MACRO (QT3_ADD_RESOURCES outfiles )
-
-    FOREACH (it ${ARGN})
-    GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
-    GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-    GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
-    SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
-    #  parse file for dependencies
-    FILE(READ "${infile}" _RC_FILE_CONTENTS)
-    STRING(REGEX MATCHALL "<file>[^<]*" _RC_FILES "${_RC_FILE_CONTENTS}")
-    SET(_RC_DEPENDS)
-    FOREACH(_RC_FILE ${_RC_FILES})
-        STRING(REGEX REPLACE "^<file>" "" _RC_FILE "${_RC_FILE}")
-        SET(_RC_DEPENDS ${_RC_DEPENDS} "${rc_path}/${_RC_FILE}")
-    ENDFOREACH(_RC_FILE)
-    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-        COMMAND ${QT3_RCC_EXECUTABLE}
-        ARGS -name ${outfilename} -o ${outfile} ${infile}
-        MAIN_DEPENDENCY ${infile}
-        DEPENDS ${_RC_DEPENDS})
-    SET(${outfiles} ${${outfiles}} ${outfile})
-    ENDFOREACH (it)
-
-ENDMACRO (QT3_ADD_RESOURCES)
-
-
-# QT3_AUTOMOC(file_cpp_1 ... file_cpp_N)
-#    Call this if you want to have automatic moc file handling.
-#    This means if you include "foo.moc" in the source file foo.cpp
-#    a moc file for the header foo.h will be created automatically.
-#    if foo.h doesn't exit, the moc is created from foo.cpp
-#    You can set the property SKIP_AUTOMOC using SET_SOURCE_FILES_PROPERTIES()
-#    to exclude some files in the list from being processed.
-MACRO(QT3_AUTOMOC)
-    GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
-    # For each parameter _current_FILE
-    FOREACH (_current_FILE ${ARGN})
-        # Get _current_FILE's full path
-        GET_FILENAME_COMPONENT(_current_abs_FILE ${_current_FILE} ABSOLUTE)
-        GET_FILENAME_COMPONENT(_current_abs_PATH ${_current_abs_FILE} PATH)
-
-        # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
-        GET_SOURCE_FILE_PROPERTY(_skip ${_current_abs_FILE} SKIP_AUTOMOC)
-        IF ( NOT _skip AND EXISTS ${_current_abs_FILE} )
-            # Read file
-            FILE(READ ${_current_abs_FILE} _contents)
-
-            STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
-            IF(_match)
-                # For each "#include *.moc"
-                FOREACH (_current_MOC_INCLUDE ${_match})
-                    # Get name of .moc to create (full path)
-                    STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INCLUDE}")
-#                     SET(_moc ${_current_abs_PATH}/${_current_MOC})
-                   SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
-
-                    # Find .moc's source header (full path). The result is cached
-                    # as "${_basename}_h" variable (advanced).
-                    # TODO: search among headers included by ${_current_FILE}.
-                    # TODO: write a macro find_file_no_cache() which does the same as
-                    # find_file() without caching the result (disturbing for user).
-                    GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
-#                    SET(_header ${_abs_PATH}/${_basename}.h)
-                    set(_header "${_basename}_h")
-                    find_file(${_header}
-                              NAMES ${_basename}.h
-                              PATHS ${_current_abs_PATH} ${CMAKE_CURRENT_SOURCE_DIR} ${_inc_DIRS}
-                              NO_DEFAULT_PATH)
-                    set ( ${_header} ${${_header}} CACHE INTERNAL "hide this" FORCE )
-
-                    if (NOT ${_header})
-                      set( moc_source "${_current_abs_FILE}" )
-                    else(NOT ${_header})
-                      set( moc_source ${${_header}} )
-                    endif(NOT ${_header})
-                    
-                        # Add make rule to create .moc
-#                         MESSAGE(STATUS "QT3_AUTOMOC: add rule ${_moc} <- ${moc_source}") # debug
-                     include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-                     ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
-                                        COMMAND ${QT3_MOC_EXECUTABLE}
-#                                          ARGS ${_moc_INCS} ${_header} -o ${_moc}
-                                        ${moc_source} -o ${_moc}
-                                        DEPENDS ${moc_source}
-                                        )
-                     ADD_FILE_DEPENDENCIES(${_current_abs_FILE} ${_moc})
-
-                ENDFOREACH (_current_MOC_INCLUDE)
-            ENDIF(_match)
-        ENDIF ( NOT _skip AND EXISTS ${_current_abs_FILE} )
-    ENDFOREACH (_current_FILE)
-ENDMACRO(QT3_AUTOMOC)
-
diff --git a/3rdparty/CGAL-4.6/cmake/modules/UseCGAL.cmake b/3rdparty/CGAL-4.6/cmake/modules/UseCGAL.cmake
deleted file mode 100644
index 3884667..0000000
--- a/3rdparty/CGAL-4.6/cmake/modules/UseCGAL.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# UseCGAL.cmake can be included in a project to set the needed compiler and linker
-# settings to use CGAL in a program.
-#
-# The variables used here are defined in the CGALConfig.cmake generated when CGAL was installed.
-#
-#
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
-
-cgal_setup_module_path()
-
-if(NOT USE_CGAL_FILE_INCLUDED)
-  set(USE_CGAL_FILE_INCLUDED 1)
-
-  include(CGAL_Common)
-  include(CGAL_SetupFlags)
-  include(CGAL_GeneratorSpecificSettings)
-  include(CGAL_TweakFindBoost)
-
-  set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME})
-  set(CGAL_SCM_BRANCH_NAME "")
-
-  if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" )
-    include(CGAL_SCM)
-    if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" )
-      message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}" )
-      if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}")
-        message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider rebuilding CGAL from this branch.")
-      endif()
-    endif()
-  endif()
-
-  set( CGAL_LIBRARIES )
-
-  foreach ( component ${CGAL_REQUESTED_COMPONENTS} )
-    use_component( ${component} )
-  endforeach()
-
-  use_essential_libs()
-
-  include_directories( "${CMAKE_CURRENT_BINARY_DIR}" )
-
-  # need to get variable from cache while compiling CGAL, while in a demo it is set in CGALConfig.cmake
-  if ( NOT CGAL_LIBRARY )
-    cache_get(CGAL_LIBRARY)
-  endif()
-  if(TARGET CGAL)
-    add_to_list( CGAL_LIBRARIES CGAL )
-  else()
-    add_to_list( CGAL_LIBRARIES ${CGAL_LIBRARY} )
-  endif()
-
-  #message (STATUS "LIB: ${CGAL_LIBRARY}")
-  #message (STATUS "LIBS: ${CGAL_LIBRARIES}")
-
-  include_directories ( ${CGAL_INCLUDE_DIRS})
-  include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
-  add_definitions     ( ${CGAL_3RD_PARTY_DEFINITIONS}  ${CGAL_DEFINITIONS}  )
-
-  link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
-  link_libraries      ( ${CGAL_LIBRARIES}     ${CGAL_3RD_PARTY_LIBRARIES}      )
-
-
-endif()
diff --git a/3rdparty/CGAL-4.6/config/support/print_QT4_version.cpp b/3rdparty/CGAL-4.6/config/support/print_QT4_version.cpp
deleted file mode 100644
index 2398f50..0000000
--- a/3rdparty/CGAL-4.6/config/support/print_QT4_version.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-
-// Tests if QT4 is available and prints its version string.
-
-#include <iostream>
-#include <QtCore/QtGlobal>
-
-int main()
-{
-    std::cout << "version=" << QT_VERSION_STR << std::endl;
-
-    return 0;
-}
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp b/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp
deleted file mode 100644
index cc1ff11..0000000
--- a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2010  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Rineau
-
-//| If a compiler does not support the #warning preprocessor directive.
-//| CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG is set. 
-//| This is not strictly a "bug", as the C++ standard does not speak about
-//| this directive.
-
-#warning "Hello world"
-
-int main()
-{
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.cpp b/3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.cpp
deleted file mode 100644
index ca58bb1..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Pierre Alliez, Camille Wormser
-//
-//******************************************************************************
-// File Description : demo of AABB tree on polyhedral edge and facet primitives
-//
-//******************************************************************************
-
-#include "MainWindow.h"
-#include <QApplication>
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-  app.setOrganizationDomain("inria.fr");
-  app.setOrganizationName("INRIA");
-  app.setApplicationName("AABB tree demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  QStringList args = app.arguments();
-  args.removeAt(0);
-
-  if(!args.empty() && args[0] == "--use-meta")
-  {
-    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
-    args.removeAt(0);
-  }
-
-  Q_FOREACH(QString filename, args)
-    mainWindow.open(filename);
-
-  return app.exec();
-}
-
-#  include "Scene.cpp"
-#  include "Scene_moc.cpp"
-#  include "benchmarks.cpp"
-#  include "Viewer.cpp"
-#  include "Viewer_moc.cpp"
-#  include "MainWindow.cpp"
-#  include "MainWindow_moc.cpp"
-
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/AABB_tree/CMakeLists.txt
deleted file mode 100644
index 84a11b6..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/CMakeLists.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-# This is the CMake script for compiling the AABB tree demo.
-
-project( AABB_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Include this package's headers first
-include_directories( BEFORE ./ ./include ../../include )
-
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4)
-include( ${CGAL_USE_FILE} )
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-# Find OpenGL
-find_package(OpenGL)
-
-# Find QGLViewer
-if(QT4_FOUND)
-  include(${QT_USE_FILE})
-  find_package(QGLViewer )
-endif(QT4_FOUND)
-
-if(CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
-
-  qt4_wrap_ui( UI_FILES MainWindow.ui )
-
-  include(AddFileDependencies)
-
-  qt4_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
-  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
-
-  qt4_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
-  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
-
-  qt4_generate_moc( "Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
-  add_file_dependencies( Scene_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Scene.h" )
-
-  qt4_add_resources ( RESOURCE_FILES AABB_demo.qrc )
-
-  add_file_dependencies( AABB_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
-                                       "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp"
-                                       "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
-
-  add_executable  ( AABB_demo AABB_demo.cpp ${UI_FILES} ${RESOURCE_FILES} )
-
-  # Link with Qt libraries
-  target_link_libraries( AABB_demo ${QT_LIBRARIES} )
-
-  # Link with CGAL
-  target_link_libraries( AABB_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-  # Link with libQGLViewer, OpenGL
-  target_link_libraries( AABB_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo )
-
-
-else (CGAL_FOUND AND CGAL_CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  set(AABB_MISSING_DEPS "")
-
-  if(NOT CGAL_FOUND)
-    set(AABB_MISSING_DEPS "the CGAL library, ${AABB_MISSING_DEPS}")
-  endif()
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(AABB_MISSING_DEPS "the CGAL Qt4 library, ${AABB_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(AABB_MISSING_DEPS "Qt4, ${AABB_MISSING_DEPS}")
-  endif()
-
-  if(NOT OPENGL_FOUND)
-    set(AABB_MISSING_DEPS "OpenGL, ${AABB_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(AABB_MISSING_DEPS "QGLViewer, ${AABB_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.cpp
deleted file mode 100644
index e328201..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.cpp
+++ /dev/null
@@ -1,425 +0,0 @@
-#include "MainWindow.h"
-#include "Scene.h"
-#include <CGAL/Qt/debug.h>
-
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <QTextStream>
-#include <QUrl>
-#include <QFileDialog>
-#include <QSettings>
-#include <QHeaderView>
-#include <QClipboard>
-
-#include "ui_MainWindow.h"
-
-MainWindow::MainWindow(QWidget* parent)
-: CGAL::Qt::DemosMainWindow(parent)
-{
-	ui = new Ui::MainWindow;
-	ui->setupUi(this);
-
-	// saves some pointers from ui, for latter use.
-	m_pViewer = ui->viewer;
-
-	// does not save the state of the viewer 
-	m_pViewer->setStateFileName(QString::null);
-
-	// accepts drop events
-	setAcceptDrops(true);
-
-	// setups scene
-	m_pScene = new Scene;
-	m_pViewer->setScene(m_pScene);
-  m_pViewer->setManipulatedFrame(m_pScene->manipulatedFrame());
-
-	// connects actionQuit (Ctrl+Q) and qApp->quit()
-	connect(ui->actionQuit, SIGNAL(triggered()),
-		this, SLOT(quit()));
-
-	this->addRecentFiles(ui->menuFile, ui->actionQuit);
-	connect(this, SIGNAL(openRecentFile(QString)),
-		this, SLOT(open(QString)));
-
-	readSettings();
-}
-
-MainWindow::~MainWindow()
-{
-	delete ui;
-}
-
-void MainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-	if (event->mimeData()->hasFormat("text/uri-list"))
-		event->acceptProposedAction();
-}
-
-void MainWindow::dropEvent(QDropEvent *event)
-{
-	Q_FOREACH(QUrl url, event->mimeData()->urls()) {
-		QString filename = url.toLocalFile();
-		if(!filename.isEmpty()) {
-			QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
-			open(filename);
-		}
-	}
-	event->acceptProposedAction();
-}
-
-void MainWindow::updateViewerBBox()
-{
-	m_pScene->update_bbox();
-	const Scene::Bbox bbox = m_pScene->bbox();
-	const double xmin = bbox.xmin();
-	const double ymin = bbox.ymin();
-	const double zmin = bbox.zmin();
-	const double xmax = bbox.xmax();
-	const double ymax = bbox.ymax();
-	const double zmax = bbox.zmax();
-	qglviewer::Vec 
-		vec_min(xmin, ymin, zmin),
-		vec_max(xmax, ymax, zmax);
-	m_pViewer->setSceneBoundingBox(vec_min,vec_max);
-	m_pViewer->camera()->showEntireScene();
-}
-
-void MainWindow::open(QString filename)
-{
-	QFileInfo fileinfo(filename);
-	if(fileinfo.isFile() && fileinfo.isReadable())
-	{
-		int index = m_pScene->open(filename);
-		if(index >= 0)
-		{
-			QSettings settings;
-			settings.setValue("OFF open directory",
-				fileinfo.absoluteDir().absolutePath());
-			this->addToRecentFiles(filename);
-
-			// update bbox
-			updateViewerBBox();
-      m_pViewer->update();
-		}
-	}
-}
-
-void MainWindow::readSettings()
-{
-	this->readState("MainWindow", Size|State);
-}
-
-void MainWindow::writeSettings()
-{
-	this->writeState("MainWindow");
-	std::cerr << "Write setting... done.\n";
-}
-
-void MainWindow::quit()
-{
-	writeSettings();
-	close();
-}
-
-void MainWindow::closeEvent(QCloseEvent *event)
-{
-	writeSettings();
-	event->accept();
-}
-
-void MainWindow::on_actionLoadPolyhedron_triggered()
-{
-	QSettings settings;
-	QString directory = settings.value("OFF open directory",
-		QDir::current().dirName()).toString();
-	QStringList filenames = 
-		QFileDialog::getOpenFileNames(this,
-		tr("Load polyhedron..."),
-		directory,
-		tr("OFF files (*.off)\n"
-		"All files (*)"));
-	if(!filenames.isEmpty()) {
-		Q_FOREACH(QString filename, filenames) {
-			open(filename);
-		}
-	}
-}
-
-
-void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
-{
-	m_pViewer->setAddKeyFrameKeyboardModifiers(m);
-}
-
-void MainWindow::on_actionInside_points_triggered()
-{
-	bool ok;
-	const unsigned int nb_points = (unsigned)
-		QInputDialog::getInteger(NULL, "#Points",
-		"#Points:",10000,1,100000000,9,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->generate_inside_points(nb_points);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionPoints_in_interval_triggered()
-{
-	bool ok;
-	const unsigned int nb_points = (unsigned)
-		QInputDialog::getInteger(NULL, "#Points",
-		"#Points:",10000,1,100000000,9,&ok);
-	if(!ok)
-		return;
-
-  const double min = 
-		QInputDialog::getDouble(NULL, "min",
-		"Min:",-0.1,-1000.0,1000.0,9,&ok);
-	if(!ok)
-		return;
-  const double max = 
-		QInputDialog::getDouble(NULL, "max",
-		"Max:",0.1,-1000.0,1000.0,9,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->generate_points_in(nb_points,min,max);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionBoundary_segments_triggered()
-{
-	bool ok;
-	const unsigned int nb_slices = (unsigned)
-		QInputDialog::getInteger(NULL, "#Slices",
-		"Slices:",100,1,1000000,8,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->generate_boundary_segments(nb_slices);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionBoundary_points_triggered()
-{
-	bool ok;
-	const unsigned int nb_points = (unsigned)
-		QInputDialog::getInteger(NULL, "#Points",
-		"Points:",1000,1,10000000,8,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->generate_boundary_points(nb_points);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionEdge_points_triggered()
-{
-	bool ok;
-	const unsigned int nb_points = (unsigned)
-		QInputDialog::getInteger(NULL, "#Points",
-		"Points:",1000,1,10000000,8,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->generate_edge_points(nb_points);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionBench_distances_triggered()
-{
-	bool ok;
-	const double duration = QInputDialog::getDouble(NULL, "Duration",
-		"Duration (s):",1.0,0.01,1000,8,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	std::cout << std::endl << "Benchmark distances" << std::endl;
-	m_pScene->benchmark_distances(duration);
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionBench_intersections_triggered()
-{
-	bool ok;
-	const double duration = QInputDialog::getDouble(NULL, "Duration",
-		"Duration (s):",1.0,0.01,1000.0,8,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	std::cout << std::endl << "Benchmark intersections" << std::endl;
-	m_pScene->benchmark_intersections(duration);
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionUnsigned_distance_function_to_facets_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-    m_pScene->activate_cutting_plane();
-	m_pScene->unsigned_distance_function();
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionUnsigned_distance_function_to_edges_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-    m_pScene->activate_cutting_plane();
-	m_pScene->unsigned_distance_function_to_edges();
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionSigned_distance_function_to_facets_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-    m_pScene->activate_cutting_plane();
-	m_pScene->signed_distance_function();
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionIntersection_cutting_plane_triggered()
-{
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_pScene->activate_cutting_plane();
-  m_pScene->cut_segment_plane();
-  QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionCutting_plane_none_triggered()
-{
-  m_pScene->clear_cutting_plane();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionView_polyhedron_triggered()
-{
-	m_pScene->toggle_view_poyhedron();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionView_points_triggered()
-{
-	m_pScene->toggle_view_points();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionView_segments_triggered()
-{
-	m_pScene->toggle_view_segments();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionView_cutting_plane_triggered()
-{
-  m_pScene->toggle_view_plane();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionClear_points_triggered()
-{
-	m_pScene->clear_points();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionClear_segments_triggered()
-{
-	m_pScene->clear_segments();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionClear_cutting_plane_triggered()
-{
-  m_pScene->clear_cutting_plane();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionRefine_bisection_triggered()
-{
-	bool ok;
-	const double max_len = 
-		QInputDialog::getDouble(NULL, "Max edge len",
-		"Max edge len:",0.1,0.001,100.0,9,&ok);
-	if(!ok)
-		return;
-
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->refine_bisection(max_len * max_len);
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionBench_memory_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->bench_memory();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionBench_construction_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->bench_construction();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionBench_intersections_vs_nbt_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->bench_intersections_vs_nbt();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionBench_distances_vs_nbt_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->bench_distances_vs_nbt();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionRefine_loop_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->refine_loop();
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionSave_snapshot_triggered()
-{
-	// save snapshot to file
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-  QString filename = QFileDialog::getSaveFileName(this,tr("Save snapshot to file..."),"snapshot00.png","*.png");
-  m_pViewer->saveSnapshot(filename);
-	QApplication::restoreOverrideCursor();
-}
-void MainWindow::on_actionCopy_snapshot_triggered()
-{
-  // copy snapshot to clipboard
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-  QClipboard *qb = QApplication::clipboard();
-  m_pViewer->makeCurrent();
-  m_pViewer->raise();
-  QImage snapshot = m_pViewer->grabFrameBuffer(true);
-  qb->setImage(snapshot);
-	QApplication::restoreOverrideCursor();
-}
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.cpp b/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.cpp
deleted file mode 100644
index 43a4c80..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.cpp
+++ /dev/null
@@ -1,899 +0,0 @@
-#include "Scene.h"
-
-#include <iostream>
-#include <fstream>
-
-#include <QtCore/qglobal.h>
-#include <QString>
-#include <QTextStream>
-#include <QFileInfo>
-#include <QInputDialog>
-
-#include "Refiner.h"
-#include "render_edges.h"
-
-#include <CGAL/Timer.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Subdivision_method_3.h>
-
-
-// constants
-const int slow_distance_grid_size = 100;
-const int fast_distance_grid_size = 20;
-
-Scene::Scene()
-  : m_frame (new ManipulatedFrame())
-  , m_view_plane(false)
-  , m_grid_size(slow_distance_grid_size)
-  , m_cut_plane(NONE)
-{
-    m_pPolyhedron = NULL;
-
-    // view options
-    m_view_points = true;
-    m_view_segments = true;
-    m_view_polyhedron = true;
-
-    // distance function
-    m_red_ramp.build_red();
-    m_blue_ramp.build_blue();
-    m_max_distance_function = (FT)0.0;
-}
-
-Scene::~Scene()
-{
-    delete m_pPolyhedron;
-    delete m_frame;
-}
-
-int Scene::open(QString filename)
-{
-    QTextStream cerr(stderr);
-    cerr << QString("Opening file \"%1\"\n").arg(filename);
-    QApplication::setOverrideCursor(QCursor(::Qt::WaitCursor));
-
-    QFileInfo fileinfo(filename);
-    std::ifstream in(filename.toUtf8());
-
-    if(!in || !fileinfo.isFile() || ! fileinfo.isReadable())
-    {
-        std::cerr << "unable to open file" << std::endl;
-        QApplication::restoreOverrideCursor();
-        return -1;
-    }
-
-    if(m_pPolyhedron != NULL)
-        delete m_pPolyhedron;
-
-    // allocate new polyhedron
-    m_pPolyhedron = new Polyhedron;
-    in >> *m_pPolyhedron;
-    if(!in)
-    {
-        std::cerr << "invalid OFF file" << std::endl;
-        QApplication::restoreOverrideCursor();
-
-        delete m_pPolyhedron;
-        m_pPolyhedron = NULL;
-
-        return -1;
-    }
-    
-    // clear tree
-    clear_internal_data();
-
-    QApplication::restoreOverrideCursor();
-    return 0;
-}
-
-void Scene::update_bbox()
-{
-    std::cout << "Compute bbox...";
-    m_bbox = Bbox();
-
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "failed (no polyhedron)." << std::endl;
-        return;
-    }
-
-    if(m_pPolyhedron->empty())
-    {
-        std::cout << "failed (empty polyhedron)." << std::endl;
-        return;
-    }
-
-    Polyhedron::Point_iterator it = m_pPolyhedron->points_begin();
-    m_bbox = (*it).bbox();
-    for(; it != m_pPolyhedron->points_end();it++)
-        m_bbox = m_bbox + (*it).bbox();
-    std::cout << "done (" << m_pPolyhedron->size_of_facets()
-        << " facets)" << std::endl;
-}
-
-void Scene::draw()
-{
-    if(m_view_plane)
-        ::glEnable(GL_DEPTH_TEST);
-    else
-        ::glDisable(GL_DEPTH_TEST);
-  
-    if(m_view_polyhedron)
-        draw_polyhedron();
-
-    if(m_view_points)
-        draw_points();
-
-    if(m_view_segments)
-        draw_segments();
-
-    if (m_view_plane)
-    {
-        switch( m_cut_plane )
-        {
-          case UNSIGNED_EDGES:
-          case UNSIGNED_FACETS:
-              draw_distance_function(m_thermal_ramp, m_thermal_ramp);
-              break;
-          case SIGNED_FACETS:
-              draw_distance_function(m_red_ramp, m_blue_ramp);
-              break;
-          case CUT_SEGMENTS:
-              draw_cut_segment_plane();
-              break;
-          case NONE: // do nothing
-              break;
-        }
-    }
-}
-
-void Scene::draw_polyhedron()
-{
-    // draw black edges
-    if(m_pPolyhedron != NULL)
-    {
-        ::glDisable(GL_LIGHTING);
-        ::glColor3ub(0,0,0);
-        ::glLineWidth(1.0f);
-        gl_render_edges(*m_pPolyhedron);
-    }
-}
-
-void Scene::draw_segments()
-{
-    if(m_segments.size() != 0)
-    {
-        ::glDisable(GL_LIGHTING);
-        ::glColor3ub(0,100,0);
-        ::glLineWidth(2.0f);
-        ::glBegin(GL_LINES);
-        std::list<Segment>::iterator it;
-        for(it = m_segments.begin(); it != m_segments.end(); it++)
-        {
-            const Segment& s = *it;
-            const Point& p = s.source();
-            const Point& q = s.target();
-            ::glVertex3d(p.x(),p.y(),p.z());
-            ::glVertex3d(q.x(),q.y(),q.z());
-        }
-        ::glEnd();
-    }
-}
-
-void Scene::draw_points()
-{
-    // draw red points
-    if(m_points.size() != 0)
-    {
-        ::glDisable(GL_LIGHTING);
-        ::glColor3ub(180,0,0);
-        ::glPointSize(2.0f);
-        ::glBegin(GL_POINTS);
-        std::list<Point>::iterator it;
-        for(it = m_points.begin(); it != m_points.end(); it++)
-        {
-            const Point& p = *it;
-            ::glVertex3d(p.x(),p.y(),p.z());
-        }
-        ::glEnd();
-    }
-}
-
-void Scene::draw_distance_function(const Color_ramp& ramp_pos,
-                                   const Color_ramp& ramp_neg) const
-{
-    ::glDisable(GL_LIGHTING);
-    if ( m_fast_distance ) { ::glShadeModel(GL_FLAT); }
-    else { ::glShadeModel(GL_SMOOTH); }
-    
-    ::glBegin(GL_QUADS);
-    int i,j;
-    const int nb_quads = m_grid_size-1;
-    for(i=0;i<nb_quads;i++)
-    {
-        for(j=0;j<nb_quads;j++)
-        {
-            const Point_distance& pd00 = m_distance_function[i][j];
-            const Point_distance& pd01 = m_distance_function[i][j+1];
-            const Point_distance& pd11 = m_distance_function[i+1][j+1];
-            const Point_distance& pd10 = m_distance_function[i+1][j];
-            const Point& p00 = pd00.first;
-            const Point& p01 = pd01.first;
-            const Point& p11 = pd11.first;
-            const Point& p10 = pd10.first;
-            const FT& d00 = pd00.second;
-            const FT& d01 = pd01.second;
-            const FT& d11 = pd11.second;
-            const FT& d10 = pd10.second;
-            
-            // determines grey level
-            unsigned int i00 = 255-(unsigned)(255.0 * (double)std::fabs(d00) / m_max_distance_function);
-            unsigned int i01 = 255-(unsigned)(255.0 * (double)std::fabs(d01) / m_max_distance_function);
-            unsigned int i11 = 255-(unsigned)(255.0 * (double)std::fabs(d11) / m_max_distance_function);
-            unsigned int i10 = 255-(unsigned)(255.0 * (double)std::fabs(d10) / m_max_distance_function);
-            
-            // assembles one quad
-            if(d00 > 0.0)
-                ::glColor3ub(ramp_pos.r(i00),ramp_pos.g(i00),ramp_pos.b(i00));
-            else
-                ::glColor3ub(ramp_neg.r(i00),ramp_neg.g(i00),ramp_neg.b(i00));
-            ::glVertex3d(p00.x(),p00.y(),p00.z());
-            
-            if(d01 > 0.0)
-                ::glColor3ub(ramp_pos.r(i01),ramp_pos.g(i01),ramp_pos.b(i01));
-            else
-                ::glColor3ub(ramp_neg.r(i01),ramp_neg.g(i01),ramp_neg.b(i01));
-            ::glVertex3d(p01.x(),p01.y(),p01.z());
-            
-            if(d11 > 0)
-                ::glColor3ub(ramp_pos.r(i11),ramp_pos.g(i11),ramp_pos.b(i11));
-            else
-                ::glColor3ub(ramp_neg.r(i11),ramp_neg.g(i11),ramp_neg.b(i11));
-            ::glVertex3d(p11.x(),p11.y(),p11.z());
-            
-            if(d10 > 0)
-                ::glColor3ub(ramp_pos.r(i10),ramp_pos.g(i10),ramp_pos.b(i10));
-            else
-                ::glColor3ub(ramp_neg.r(i10),ramp_neg.g(i10),ramp_neg.b(i10));
-            ::glVertex3d(p10.x(),p10.y(),p10.z());
-        }
-    }
-    ::glEnd();
-}
-
-void Scene::draw_cut_segment_plane() const
-{
-    float diag = .6f * float(bbox_diag());
-
-    ::glDisable(GL_LIGHTING);
-    ::glLineWidth(1.0f);
-    ::glColor3f(.6f, .6f, .6f);
-
-    // draw grid
-    ::glPushMatrix();
-    ::glMultMatrixd(m_frame->matrix());
-    QGLViewer::drawGrid(diag);
-    ::glPopMatrix();
-
-    // draw cut segments
-    ::glLineWidth(2.0f);
-    ::glColor3f(1.f, 0.f, 0.f);
-    ::glBegin(GL_LINES);
-    for ( std::vector<Segment>::const_iterator it = m_cut_segments.begin(), 
-          end = m_cut_segments.end() ; it != end ; ++it )
-    {
-        const Point& a = it->source();
-        const Point& b = it->target();
-      
-        ::glVertex3d(a.x(), a.y(), a.z());
-        ::glVertex3d(b.x(), b.y(), b.z());
-    }
-    ::glEnd();
-  
-    // fill grid with transparent blue
-    ::glPushMatrix();
-    ::glMultMatrixd(m_frame->matrix());
-    ::glColor4f(.6f, .85f, 1.f, .65f);
-
-    ::glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); 
-    ::glEnable(GL_BLEND);
-    ::glBegin(GL_QUADS);
-    ::glVertex3d(-diag, -diag, 0.);
-    ::glVertex3d(-diag,  diag, 0.);
-    ::glVertex3d( diag,  diag, 0.);
-    ::glVertex3d( diag, -diag, 0.);
-    ::glEnd();
-    ::glDisable(GL_BLEND);
-  
-    ::glPopMatrix();
-}
-
-FT Scene::random_in(const double a,
-                    const double b)
-{
-    double r = rand() / (double)RAND_MAX;
-    return (FT)(a + (b - a) * r);
-}
-
-Point Scene::random_point(const CGAL::Bbox_3& bbox)
-{
-    FT x = random_in(bbox.xmin(),bbox.xmax());
-    FT y = random_in(bbox.ymin(),bbox.ymax());
-    FT z = random_in(bbox.zmin(),bbox.zmax());
-    return Point(x,y,z);
-}
-
-Vector Scene::random_vector()
-{
-    FT x = random_in(0.0,1.0);
-    FT y = random_in(0.0,1.0);
-    FT z = random_in(0.0,1.0);
-    return Vector(x,y,z);
-}
-
-Ray Scene::random_ray(const CGAL::Bbox_3& bbox)
-{
-    Point p = random_point(bbox);
-    Point q = random_point(bbox);
-    return Ray(p,q);
-}
-
-Segment Scene::random_segment(const CGAL::Bbox_3& bbox)
-{
-    Point p = random_point(bbox);
-    Point q = random_point(bbox);
-    return Segment(p,q);
-}
-
-Line Scene::random_line(const CGAL::Bbox_3& bbox)
-{
-    Point p = random_point(bbox);
-    Point q = random_point(bbox);
-    return Line(p,q);
-}
-
-Plane Scene::random_plane(const CGAL::Bbox_3& bbox)
-{
-    Point p = random_point(bbox);
-    Vector vec = random_vector();
-    return Plane(p,vec);
-}
-
-Plane Scene::frame_plane() const
-{
-    const qglviewer::Vec& pos = m_frame->position();
-    const qglviewer::Vec& n = m_frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-
-    return Plane(n[0], n[1],  n[2], - n * pos);
-}
-
-Aff_transformation Scene::frame_transformation() const
-{
-    const ::GLdouble* m = m_frame->matrix();
-  
-    // OpenGL matrices are row-major matrices
-    return Aff_transformation (m[0], m[4], m[8], m[12],
-                               m[1], m[5], m[9], m[13],
-                               m[2], m[6], m[10], m[14]);
-}
-
-FT Scene::bbox_diag() const
-{
-  double dx = m_bbox.xmax()-m_bbox.xmin();
-  double dy = m_bbox.ymax()-m_bbox.ymin();
-  double dz = m_bbox.zmax()-m_bbox.zmin();
-  
-  return FT(std::sqrt(dx*dx + dy*dy + dz*dz));
-}
-
-void Scene::build_facet_tree()
-{
-    if ( NULL == m_pPolyhedron )
-    {
-        std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
-        return;
-    }
-
-    // Don't rebuild tree if it is already built
-    if ( !m_facet_tree.empty() ) { return; }
-  
-    // build tree
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Construct Facet AABB tree...";
-    m_facet_tree.rebuild(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
-    m_facet_tree.accelerate_distance_queries();
-    std::cout << "done (" << timer.time() << " s)" << std::endl;
-}
-
-void Scene::build_edge_tree()
-{
-    if ( NULL == m_pPolyhedron )
-    {
-        std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
-        return;
-    }
-  
-    // Don't rebuild tree if it is already built
-    if ( !m_edge_tree.empty() ) { return; }
-    
-    // build tree
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Construct Edge AABB tree...";
-    m_edge_tree.rebuild(edges(*m_pPolyhedron).first,edges(*m_pPolyhedron).second,*m_pPolyhedron);
-    m_edge_tree.accelerate_distance_queries();
-    std::cout << "done (" << timer.time() << " s)" << std::endl;
-}
-
-void Scene::clear_internal_data()
-{
-    m_facet_tree.clear();
-    m_edge_tree.clear();
-
-    clear_points();
-    clear_segments();
-    clear_cutting_plane();
-}
-
-void Scene::clear_cutting_plane()
-{
-    m_cut_segments.clear();
-    m_cut_plane = NONE;
-  
-    deactivate_cutting_plane();
-}
-
-void Scene::update_grid_size()
-{
-    m_grid_size = m_fast_distance ? fast_distance_grid_size
-                                  : slow_distance_grid_size;
-}
-
-void Scene::generate_points_in(const unsigned int nb_points,
-                               const double min,
-                               const double max)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-
-    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-    typedef CGAL::AABB_tree<Traits> Tree;
-
-    std::cout << "Construct AABB tree...";
-    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second, *m_pPolyhedron);
-    std::cout << "done." << std::endl;
-
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Generate " << nb_points << " points in interval ["
-        << min << ";" << max << "]";
-
-    unsigned int nb_trials = 0;
-    Vector vec = random_vector();
-    while(m_points.size() < nb_points)
-    {
-        Point p = random_point(tree.bbox());
-
-        // measure distance
-        FT signed_distance = std::sqrt(tree.squared_distance(p));
-
-        // measure sign
-        Ray ray(p,vec);
-        int nb_intersections = (int)tree.number_of_intersected_primitives(ray);
-        if(nb_intersections % 2 != 0)
-            signed_distance *= -1.0;
-
-        if(signed_distance >= min &&
-            signed_distance <= max)
-        {
-            m_points.push_back(p);
-            if(m_points.size()%(nb_points/10) == 0)
-                std::cout << "."; // ASCII progress bar
-        }
-        nb_trials++;
-    }
-    double speed = (double)nb_trials / timer.time();
-    std::cout << "done (" << nb_trials << " trials, "
-        << timer.time() << " s, "
-        << speed << " queries/s)" << std::endl;
-}
-
-
-void Scene::generate_inside_points(const unsigned int nb_points)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-
-    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-    typedef CGAL::AABB_tree<Traits> Tree;
-
-    std::cout << "Construct AABB tree...";
-    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
-    std::cout << "done." << std::endl;
-
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Generate " << nb_points << " inside points";
-
-    unsigned int nb_trials = 0;
-    Vector vec = random_vector();
-    while(m_points.size() < nb_points)
-    {
-        Point p = random_point(tree.bbox());
-        Ray ray(p,vec);
-        int nb_intersections = (int)tree.number_of_intersected_primitives(ray);
-        if(nb_intersections % 2 != 0)
-        {
-            m_points.push_back(p);
-            if(m_points.size()%(nb_points/10) == 0)
-                std::cout << "."; // ASCII progress bar
-        }
-        nb_trials++;
-    }
-    double speed = (double)nb_trials / timer.time();
-    std::cout << "done (" << nb_trials << " trials, "
-        << timer.time() << " s, "
-        << speed << " queries/s)" << std::endl;
-}
-
-void Scene::generate_boundary_segments(const unsigned int nb_slices)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-
-    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-    typedef CGAL::AABB_tree<Traits> Tree;
-    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
-
-    std::cout << "Construct AABB tree...";
-    Tree tree(faces(*m_pPolyhedron).first,faces(*m_pPolyhedron).second,*m_pPolyhedron);
-    std::cout << "done." << std::endl;
-
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Generate boundary segments from " << nb_slices << " slices: ";
-
-    Vector normal((FT)0.0,(FT)0.0,(FT)1.0);
-    unsigned int i;
-
-    const double dz = m_bbox.zmax() - m_bbox.zmin();
-    for(i=0;i<nb_slices;i++)
-    {
-        FT z = m_bbox.zmin() + (FT)i / (FT)nb_slices * dz;
-        Point p((FT)0.0, (FT)0.0, z);
-        Plane plane(p,normal);
-
-        std::list<Object_and_primitive_id> intersections;
-        tree.all_intersections(plane,std::back_inserter(intersections));
-
-        std::list<Object_and_primitive_id>::iterator it;
-        for(it = intersections.begin();
-            it != intersections.end();
-            it++)
-        {
-            Object_and_primitive_id op = *it;
-            CGAL::Object object = op.first;
-            Segment segment;
-            if(CGAL::assign(segment,object))
-                m_segments.push_back(segment);
-        }
-    }
-    std::cout << m_segments.size() << " segments, " << timer.time() << " s." << std::endl;
-}
-
-void Scene::generate_boundary_points(const unsigned int nb_points)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-
-    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-    typedef CGAL::AABB_tree<Traits> Tree;
-    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
-
-    std::cout << "Construct AABB tree...";
-    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
-    std::cout << "done." << std::endl;
-
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Generate boundary points: ";
-
-    unsigned int nb = 0;
-    unsigned int nb_lines = 0;
-    while(nb < nb_points)
-    {
-        Line line = random_line(tree.bbox());
-
-        std::list<Object_and_primitive_id> intersections;
-        tree.all_intersections(line,std::back_inserter(intersections));
-        nb_lines++;
-
-        std::list<Object_and_primitive_id>::iterator it;
-        for(it = intersections.begin();
-            it != intersections.end();
-            it++)
-        {
-            Object_and_primitive_id op = *it;
-            CGAL::Object object = op.first;
-            Point point;
-            if(CGAL::assign(point,object))
-            {
-                m_points.push_back(point);
-                nb++;
-            }
-        }
-    }
-    std::cout << nb_lines << " line queries, " << timer.time() << " s." << std::endl;
-}
-
-void Scene::generate_edge_points(const unsigned int nb_points)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-
-    typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron> Primitive;
-    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-    typedef CGAL::AABB_tree<Traits> Tree;
-    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
-
-    std::cout << "Construct AABB tree...";
-    Tree tree( CGAL::edges(*m_pPolyhedron).first,
-               CGAL::edges(*m_pPolyhedron).second,
-               *m_pPolyhedron);
-    std::cout << "done." << std::endl;
-
-    CGAL::Timer timer;
-    timer.start();
-    std::cout << "Generate edge points: ";
-
-    unsigned int nb = 0;
-    unsigned int nb_planes = 0;
-    while(nb < nb_points)
-    {
-        Plane plane = random_plane(tree.bbox());
-
-        std::list<Object_and_primitive_id> intersections;
-        tree.all_intersections(plane,std::back_inserter(intersections));
-        nb_planes++;
-
-        std::list<Object_and_primitive_id>::iterator it;
-        for(it = intersections.begin();
-            it != intersections.end();
-            it++)
-        {
-            Object_and_primitive_id op = *it;
-            CGAL::Object object = op.first;
-            Point point;
-            if(CGAL::assign(point,object))
-            {
-                m_points.push_back(point);
-                nb++;
-            }
-        }
-    }
-    std::cout << nb_planes << " plane queries, " << timer.time() << " s." << std::endl;
-}
-
-
-template <typename Tree>
-void Scene::compute_distance_function(const Tree& tree)
-{
-    // Get transformation
-    Aff_transformation t = frame_transformation();
-    
-    m_max_distance_function = FT(0);
-    FT diag = bbox_diag();
-    
-    const FT dx = diag;
-    const FT dy = diag;
-    const FT z (0);
-    
-    for(int i=0 ; i<m_grid_size ; ++i)
-    {
-        FT x = -diag/FT(2) + FT(i)/FT(m_grid_size) * dx;
-        
-        for(int j=0 ; j<m_grid_size ; ++j)
-        {
-            FT y = -diag/FT(2) + FT(j)/FT(m_grid_size) * dy;
-            
-            Point query = t( Point(x,y,z) );
-            FT dist = CGAL::sqrt( tree.squared_distance(query) );
-            
-            m_distance_function[i][j] = Point_distance(query,dist);
-            m_max_distance_function = (std::max)(dist, m_max_distance_function);
-        }
-    }
-}
-
-template <typename Tree>
-void Scene::sign_distance_function(const Tree& tree)
-{
-    typedef typename Tree::size_type size_type;
-    Vector random_vec = random_vector();
-    
-    for(int i=0 ; i<m_grid_size ; ++i)
-    {
-        for(int j=0 ; j<m_grid_size ; ++j)
-        {
-            const Point& p = m_distance_function[i][j].first;
-            const FT unsigned_distance = m_distance_function[i][j].second;
-            
-            // get sign through ray casting (random vector)
-            Ray ray(p, random_vec);
-            size_type nbi = tree.number_of_intersected_primitives(ray);
-            
-            FT sign ( (nbi&1) == 0 ? 1 : -1);
-            m_distance_function[i][j].second = sign * unsigned_distance;
-        }
-    }
-}
-
-
-void Scene::unsigned_distance_function()
-{
-    // Build tree (if build fail, exit)
-    build_facet_tree();
-    if ( m_facet_tree.empty() ) { return; }
-  
-    compute_distance_function(m_facet_tree);
-    
-    m_cut_plane = UNSIGNED_FACETS;
-}
-
-
-void Scene::unsigned_distance_function_to_edges()
-{
-    // Build tree (if build fail, exit)
-    build_edge_tree();
-    if ( m_edge_tree.empty() ) { return; }
-    
-    compute_distance_function(m_edge_tree);
-    
-    m_cut_plane = UNSIGNED_EDGES;
-}
-
-
-void Scene::signed_distance_function()
-{
-    // Build tree (if build fail, exit)
-    build_facet_tree();
-    if ( m_facet_tree.empty() ) { return; }
-    
-    compute_distance_function(m_facet_tree);
-    sign_distance_function(m_facet_tree);
-
-    m_cut_plane = SIGNED_FACETS;
-}
-
-
-void Scene::cut_segment_plane()
-{
-    // Build tree (if build fail, exit)
-    build_facet_tree();
-    if ( m_facet_tree.empty() ) { return; }
-    
-    Plane plane = frame_plane();
-    
-    // Compute intersections
-    typedef std::vector<Facet_tree::Object_and_primitive_id> Intersections;
-    Intersections intersections;
-    m_facet_tree.all_intersections(plane, std::back_inserter(intersections));
-    
-    // Fill data structure
-    m_cut_segments.clear();
-    for ( Intersections::iterator it = intersections.begin(),
-         end = intersections.end() ; it != end ; ++it )
-    {
-        const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
-        
-        if ( NULL != inter_seg )
-        {
-            m_cut_segments.push_back(*inter_seg);
-        }
-    }
-    
-    m_cut_plane = CUT_SEGMENTS;
-}
-
-void Scene::cutting_plane()
-{
-    switch( m_cut_plane )
-    {
-      case UNSIGNED_FACETS:
-          return unsigned_distance_function();
-      case SIGNED_FACETS:
-          return signed_distance_function();
-      case UNSIGNED_EDGES:
-          return unsigned_distance_function_to_edges();
-      case CUT_SEGMENTS:
-          return cut_segment_plane();
-      case NONE: // do nothing 
-          return;
-    }
-    
-    // Should not be here
-    std::cerr << "Unknown cut_plane type" << std::endl;
-    CGAL_assertion(false);
-}
-
-void Scene::toggle_view_poyhedron()
-{
-    m_view_polyhedron = !m_view_polyhedron;
-}
-
-void Scene::toggle_view_segments()
-{
-    m_view_segments = !m_view_segments;
-}
-
-void Scene::toggle_view_points()
-{
-    m_view_points = !m_view_points;
-}
-
-void Scene::toggle_view_plane()
-{
-    m_view_plane = !m_view_plane;
-}
-
-void Scene::refine_bisection(const FT max_sqlen)
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-    std::cout << "Refine through recursive longest edge bisection...";
-    Refiner<Kernel,Polyhedron> refiner(m_pPolyhedron);
-    refiner(max_sqlen);
-    std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
-  
-    clear_internal_data();
-}
-
-void Scene::refine_loop()
-{
-    if(m_pPolyhedron == NULL)
-    {
-        std::cout << "Load polyhedron first." << std::endl;
-        return;
-    }
-    std::cout << "Loop subdivision...";
-    CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron, 1);
-    std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
-  
-    clear_internal_data();
-}
-
-
-void Scene::activate_cutting_plane()
-{
-    connect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane()));
-    m_view_plane = true;
-}
-
-void Scene::deactivate_cutting_plane()
-{
-    disconnect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane()));
-    m_view_plane = false;
-}
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.h b/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.h
deleted file mode 100644
index 648bbd8..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/Scene.h
+++ /dev/null
@@ -1,195 +0,0 @@
-#ifndef SCENE_H
-#define SCENE_H
-
-#include <QtOpenGL/qgl.h>
-#include <iostream>
-#include <cmath>
-
-#include <CGAL/AABB_intersections.h> 
-#include "types.h"
-#include "Color_ramp.h"
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-
-#include <QtCore/qglobal.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-class Scene : public QObject
-{
-    Q_OBJECT
-public:
-    Scene();
-    virtual ~Scene();
-public:
-    // types
-    typedef CGAL::Bbox_3 Bbox;
-    
-private:
-    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron>         Facet_Primitive;
-    typedef CGAL::AABB_traits<Kernel, Facet_Primitive>                  Facet_Traits;
-    typedef CGAL::AABB_tree<Facet_Traits>                               Facet_tree;
-  
-    typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron>     Edge_Primitive;
-    typedef CGAL::AABB_traits<Kernel, Edge_Primitive>                   Edge_Traits;
-    typedef CGAL::AABB_tree<Edge_Traits>                                Edge_tree;
-    
-    typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-    
-    enum Cut_planes_types {
-        NONE, UNSIGNED_FACETS, SIGNED_FACETS, UNSIGNED_EDGES, CUT_SEGMENTS
-    };
-  
-public:
-    void draw(); 
-    void update_bbox();
-    Bbox bbox() { return m_bbox; }
-    ManipulatedFrame* manipulatedFrame() const { return m_frame; }
-
-private:
-    // member data
-    Bbox m_bbox;
-    Polyhedron *m_pPolyhedron;
-    std::list<Point> m_points;
-    std::list<Segment> m_segments;
-    std::vector<Segment> m_cut_segments;
-
-    // distance functions (simple 2D arrays)
-    Color_ramp m_red_ramp;
-    Color_ramp m_blue_ramp;
-    Color_ramp m_thermal_ramp;
-    FT m_max_distance_function;
-    typedef std::pair<Point,FT> Point_distance;
-    Point_distance m_distance_function[100][100];
-  
-    // frame
-    ManipulatedFrame* m_frame;
-    bool m_view_plane;
-    int m_grid_size;
-    bool m_fast_distance;
-
-    // An aabb_tree indexing polyhedron facets/segments
-    Facet_tree m_facet_tree;
-    Edge_tree m_edge_tree;
-    
-    Cut_planes_types m_cut_plane;
-  
-private:
-    // utility functions
-    Vector random_vector();
-    Ray random_ray(const Bbox& bbox);
-    Line random_line(const Bbox& bbox);
-    Point random_point(const Bbox& bbox);
-    Plane random_plane(const Bbox& bbox);
-    Segment random_segment(const Bbox& bbox);
-    FT random_in(const double a,const double b);
-    Plane frame_plane() const;
-    Aff_transformation frame_transformation() const;
-    FT bbox_diag() const;
-    void build_facet_tree();
-    void build_edge_tree();
-    void clear_internal_data();
-    void update_grid_size();
-    
-    template <typename Tree>
-    void compute_distance_function(const Tree& tree);
-    
-    template <typename Tree>
-    void sign_distance_function(const Tree& tree);
-
-public:
-    // file menu
-    int open(QString filename);
-
-    // edit menu
-    void clear_points() { m_points.clear(); }
-    void clear_segments() { m_segments.clear(); }
-    void clear_cutting_plane();
-    
-    // fast distance setter
-    void set_fast_distance(bool b) { m_fast_distance = b; update_grid_size(); }
-
-    // algorithms
-    void generate_edge_points(const unsigned int nb_points);
-    void generate_inside_points(const unsigned int nb_points);
-    void generate_boundary_points(const unsigned int nb_points);
-    void generate_boundary_segments(const unsigned int nb_slices);
-    void generate_points_in(const unsigned int nb_points,
-        const double min, const double max);
-
-    // algorithms/refine
-    void refine_loop();
-    void refine_bisection(const FT max_sqlen);
-
-    // distance functions 
-    void signed_distance_function();
-    void unsigned_distance_function();
-    void unsigned_distance_function_to_edges();
-    void cut_segment_plane();
-
-    // toggle view options
-    void toggle_view_points();
-    void toggle_view_segments();
-    void toggle_view_poyhedron();
-    void toggle_view_plane();
-
-    // view options
-    bool m_view_points;
-    bool m_view_segments;
-    bool m_view_polyhedron;
-
-    // benchmarks 
-    enum {DO_INTERSECT,
-        ANY_INTERSECTION,
-        NB_INTERSECTIONS,
-        ALL_INTERSECTIONS,
-        ANY_INTERSECTED_PRIMITIVE,
-        ALL_INTERSECTED_PRIMITIVES};
-    void bench_memory();
-    void bench_construction();
-    void bench_distances_vs_nbt();
-    void bench_intersections_vs_nbt();
-    void benchmark_intersections(const double duration);
-    std::size_t nb_digits(const std::size_t value);
-
-    template <class Query>
-    void bench_intersection(Facet_tree& tree,const int function,const double duration,
-        const char *query_name, const std::vector<Query>& queries, const int nb_queries);
-    void bench_intersections(Facet_tree& tree, const double duration, const int function,
-        const char *function_name, const std::vector<Ray>& rays,
-        const std::vector<Line>& lines, const std::vector<Plane>& planes,
-        const std::vector<Segment>& segments, const int nb_queries);
-
-    // distance benchmarks
-    enum {SQ_DISTANCE,
-        CLOSEST_POINT,
-        CLOSEST_POINT_AND_PRIMITIVE_ID};
-    void benchmark_distances(const double duration);
-    void bench_closest_point(Facet_tree& tree,const double duration);
-    void bench_squared_distance(Facet_tree& tree,const double duration);
-    void bench_closest_point_and_primitive(Facet_tree& tree,const double duration);
-    void bench_distance(Facet_tree& tree,const int function,const double duration);
-
-    // drawing
-    void draw_points();
-    void draw_segments();
-    void draw_polyhedron();
-    void draw_distance_function(const Color_ramp& ramp_pos,
-                                const Color_ramp& ramp_neg) const;
-    void draw_cut_segment_plane() const;
-  
-    // cutting plane activation/deactivation
-    void activate_cutting_plane();
-    void deactivate_cutting_plane();
-  
-public slots:
-    // cutting plane
-    void cutting_plane();
-  
-}; // end class Scene
-
-#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.cpp b/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.cpp
deleted file mode 100644
index 9fadcbb..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "Viewer.h"
-#include "Scene.h"
-#include <QMouseEvent>
-
-Viewer::Viewer(QWidget* parent)
-  : QGLViewer(parent),
-    m_pScene(NULL),
-    m_custom_mouse(false)
-{
-  setBackgroundColor(::Qt::white);
-}
-
-void Viewer::setScene(Scene* pScene)
-{
-  this->m_pScene = pScene;
-}
-
-void Viewer::draw()
-{
-  QGLViewer::draw();
-  if(m_pScene != NULL)
-  {
-	::glClearColor(1.0f,1.0f,1.0f,0.0f);
-	m_pScene->draw();
-  }
-}
-
-void Viewer::initializeGL()
-{
-  QGLViewer::initializeGL();
-}
-
-void Viewer::mousePressEvent(QMouseEvent* e)
-{
-  if ( e->modifiers() == Qt::ControlModifier )
-  {
-    m_pScene->set_fast_distance(true);
-    // Refresh distance function
-    m_pScene->cutting_plane();
-    m_custom_mouse = true;
-  }
-  
-  QGLViewer::mousePressEvent(e);
-}
-
-void Viewer::mouseReleaseEvent(QMouseEvent* e)
-{
-  if ( m_custom_mouse )
-  {
-    m_pScene->set_fast_distance(false);
-    
-    // Recompute distance function
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    m_pScene->cutting_plane();
-    QApplication::restoreOverrideCursor();
-      
-    m_custom_mouse = false;
-  }
-  
-  QGLViewer::mouseReleaseEvent(e);
-}
-
-
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.h b/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.h
deleted file mode 100644
index 7d5920f..0000000
--- a/3rdparty/CGAL-4.6/demo/AABB_tree/Viewer.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include <QGLViewer/qglviewer.h>
-
-// forward declarations
-class QWidget;
-class Scene;
-
-class Viewer : public QGLViewer {
-
-  Q_OBJECT
-
-public:
-  Viewer(QWidget * parent);
-
-  // overload several QGLViewer virtual functions
-  void draw();
-  void initializeGL();
-  void setScene(Scene* pScene);
-
-protected:
-  virtual void mousePressEvent(QMouseEvent* e);
-  virtual void mouseReleaseEvent(QMouseEvent* e);
-  
-private:
-  Scene* m_pScene;
-  bool m_custom_mouse;
-}; // end class Viewer
-
-#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.cpp b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.cpp
deleted file mode 100644
index 48e5407..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-#include <CGAL/Alpha_shape_2.h>
-
-#include <CGAL/point_generators_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/AlphaShapeGraphicsItem.h>
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Alpha_shapes_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef CGAL::Alpha_shape_vertex_base_2<K> Vb;
-typedef CGAL::Alpha_shape_face_base_2<K>  Fb;
-typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
-typedef CGAL::Delaunay_triangulation_2<K, Tds> Delaunay;
-
-typedef CGAL::Alpha_shape_2<Delaunay> Alpha_shape_2;
-
-typedef Alpha_shape_2::Alpha_iterator Alpha_iterator;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Alpha_shapes_2
-{
-  Q_OBJECT
-  
-private:  
-  double alpha;
-  std::vector<Point_2> points;
-  Alpha_shape_2 as; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::AlphaShapeGraphicsItem<Alpha_shape_2> * agi;
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void alphaChanged(int i);
-
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  // Add a GraphicItem for the alpha shape
-  agi = new CGAL::Qt::AlphaShapeGraphicsItem<Alpha_shape_2>(&as);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   agi, SLOT(modelChanged()));
-
-  agi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  agi->setEdgesPen(QPen(Qt::lightGray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  agi->setRegularEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  agi->setSingularEdgesPen(QPen(Qt::cyan, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  agi->setRegularFacesBrush(QBrush(Qt::cyan));
-  scene.addItem(agi);
-
-  // 
-  // Manual handling of actions
-  //
-
-
-  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
-		   this, SLOT(alphaChanged(int)));
-
-  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)),
-		   this, SLOT(alphaChanged(int)));
-
-  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
-		   this->alphaBox, SLOT(setValue(int)));
-
-  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)), 
-		   this->alphaSlider, SLOT(setValue(int)));
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1, false); // inputs a list with one point
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-   
-  scene.installEventFilter(pi);
-  //this->actionShowAlphaShape->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Alpha_shapes_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::list<Point_2> input;
-  if(CGAL::assign(input, o)){
-    if(input.size() == 1) {
-      points.push_back(input.front());
-      as.make_alpha_shape(points.begin(), points.end());
-      as.set_alpha(alpha);
-    }
-    emit(changed());
-  }
-}
-
-void MainWindow::alphaChanged(int i)
-{
-  if (as.number_of_alphas() > 0){
-    if(i < 100){
-      int n = static_cast<int>((i * as.number_of_alphas())/ 100);
-      if(n == 0) n++;
-      alpha = as.get_nth_alpha(n);
-      as.set_alpha(alpha);
-    } else {
-      Alpha_iterator alpha_end_it = as.alpha_end();
-      alpha = (*(--alpha_end_it))+1;
-      as.set_alpha(alpha);
-    }
-  } else {
-    alpha = 0;
-    as.set_alpha(0);
-  }
-  emit (changed());
-}
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  as.clear();
-  points.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;  
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  points.reserve(points.size() + number_of_points);
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(*pg++);
-  }
-  as.make_alpha_shape(points.begin(), points.end());
-  as.set_alpha(alpha);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-
-void
-MainWindow::open(QString fileName)
-{
-  std::cerr << "open " << std::endl;
-  std::cerr << qPrintable(fileName) << std::endl;
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  while(ifs >> p) {
-    points.push_back(p);
-  }
-  as.make_alpha_shape(points.begin(), points.end());
-  as.set_alpha(alpha);
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(agi->boundingRect());
-  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Alpha_shapes_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Alpha_shape_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/CMakeLists.txt
deleted file mode 100644
index 8feda27..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/CMakeLists.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Alpha_shapes_2_demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ./include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# The "Delaunay" demo: Alpha_shapes_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Alpha_shapes_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Alpha_shapes_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc )
-
-# The executable itself.
-add_executable  ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 )
-
-# Link with Qt libraries
-target_link_libraries( Alpha_shapes_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape
deleted file mode 100644
index 04742f6..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape
+++ /dev/null
@@ -1,28 +0,0 @@
-27
-127.898 322.734
-147.023 327.516
-164.953 329.906
-184.078 333.492
-218.742 347.836
-246.234 371.742
-276.117 387.281
-311.977 390.867
-350.227 387.281
-374.133 358.594
-387.281 321.539
-393.258 285.68
-394.453 247.43
-388.477 173.32
-320.344 100.406
-225.914 102.797
-178.102 181.688
-170.93 241.453
-172.125 258.188
-172.125 272.531
-170.93 280.898
-170.93 292.852
-163.758 302.414
-147.023 304.805
-130.289 302.414
-121.922 309.586
-119.531 319.148
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape2 b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape2
deleted file mode 100644
index 6b7d254..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/Wshape2
+++ /dev/null
@@ -1,44 +0,0 @@
-43
-164.953 378.914
-179.297 380.109
-194.836 380.109
-203.203 376.523
-209.18 368.156
-212.766 359.789
-212.766 349.031
-212.766 337.078
-212.766 322.734
-212.766 311.977
-215.156 301.219
-222.328 298.828
-229.5 297.633
-233.086 302.414
-231.891 310.781
-233.086 317.953
-234.281 327.516
-234.281 339.469
-233.086 347.836
-231.891 356.203
-230.695 366.961
-223.523 377.719
-228.305 371.742
-210.375 303.609
-215.156 328.711
-222.328 387.281
-225.914 396.844
-235.477 404.016
-246.234 407.602
-277.312 411.188
-261.773 408.797
-314.367 414.773
-350.227 388.477
-372.938 347.836
-374.133 276.117
-366.961 213.961
-301.219 155.391
-215.156 138.656
-135.07 167.344
-103.992 243.844
-103.992 319.148
-119.531 360.984
-143.438 377.719
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_1 b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_1
deleted file mode 100644
index adfaca9..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_1
+++ /dev/null
@@ -1,339 +0,0 @@
-338
-165.00 363.00
-166.00 435.00
-169.00 477.00
-175.00 449.00
-178.00 375.00
-192.00 356.00
-197.00 336.00
-205.00 328.00
-223.00 313.00
-231.00 300.00
-235.00 286.00
-231.00 277.00
-234.00 266.00
-246.00 261.00
-261.00 268.00
-274.00 275.00
-280.00 275.00
-273.00 270.00
-267.00 265.00
-258.00 261.00
-264.00 255.00
-271.00 258.00
-277.00 265.00
-284.00 272.00
-319.00 287.00
-342.00 292.00
-355.00 289.00
-368.00 282.00
-374.00 273.00
-378.00 266.00
-378.00 254.00
-387.00 252.00
-392.00 244.00
-394.00 229.00
-391.00 224.00
-385.00 223.00
-379.00 223.00
-381.00 219.00
-386.00 218.00
-390.00 217.00
-393.00 211.00
-389.00 207.00
-391.00 200.00
-388.00 194.00
-386.00 189.00
-381.00 184.00
-375.00 183.00
-376.00 174.00
-372.00 172.00
-364.00 160.00
-357.00 157.00
-355.00 162.00
-347.00 158.00
-351.00 152.00
-349.00 146.00
-344.00 143.00
-338.00 143.00
-329.00 146.00
-329.00 141.00
-325.00 134.00
-323.00 131.00
-313.00 129.00
-309.00 123.00
-302.00 117.00
-298.00 120.00
-293.00 128.00
-289.00 118.00
-284.00 109.00
-278.00 106.00
-268.00 105.00
-260.00 109.00
-250.00 103.00
-243.00 96.00
-232.00 94.00
-231.00 108.00
-226.00 97.00
-219.00 95.00
-217.00 101.00
-215.00 113.00
-214.00 114.00
-212.00 107.00
-207.00 103.00
-201.00 103.00
-196.00 110.00
-200.00 120.00
-194.00 121.00
-187.00 111.00
-192.00 104.00
-193.00 99.00
-191.00 96.00
-180.00 92.00
-168.00 98.00
-167.00 108.00
-169.00 117.00
-175.00 130.00
-180.00 137.00
-180.00 144.00
-186.00 150.00
-193.00 150.00
-200.00 145.00
-206.00 145.00
-211.00 151.00
-216.00 156.00
-226.00 156.00
-230.00 147.00
-235.00 137.00
-246.00 126.00
-251.00 137.00
-255.00 147.00
-263.00 155.00
-279.00 156.00
-283.00 156.00
-293.00 162.00
-305.00 162.00
-302.00 169.00
-295.00 170.00
-289.00 166.00
-277.00 160.00
-266.00 160.00
-256.00 156.00
-250.00 151.00
-248.00 143.00
-243.00 139.00
-238.00 143.00
-233.00 155.00
-224.00 160.00
-212.00 160.00
-208.00 156.00
-200.00 151.00
-194.00 154.00
-189.00 162.00
-182.00 152.00
-173.00 161.00
-175.00 151.00
-168.00 142.00
-168.00 133.00
-161.00 120.00
-150.00 113.00
-145.00 116.00
-146.00 124.00
-154.00 132.00
-158.00 144.00
-154.00 144.00
-152.00 137.00
-147.00 135.00
-141.00 137.00
-136.00 132.00
-128.00 131.00
-125.00 134.00
-122.00 140.00
-125.00 148.00
-128.00 154.00
-137.00 161.00
-125.00 159.00
-120.00 154.00
-113.00 153.00
-109.00 158.00
-111.00 164.00
-98.00 168.00
-103.00 182.00
-114.00 182.00
-123.00 189.00
-132.00 200.00
-130.00 201.00
-118.00 191.00
-108.00 187.00
-100.00 191.00
-85.00 201.00
-81.00 232.00
-85.00 235.00
-93.00 231.00
-101.00 225.00
-109.00 220.00
-121.00 214.00
-126.00 218.00
-114.00 227.00
-109.00 225.00
-100.00 230.00
-92.00 239.00
-81.00 239.00
-82.00 248.00
-82.00 262.00
-85.00 272.00
-91.00 276.00
-91.00 270.00
-95.00 272.00
-98.00 263.00
-108.00 257.00
-118.00 249.00
-127.00 240.00
-127.00 233.00
-133.00 238.00
-143.00 233.00
-154.00 231.00
-151.00 225.00
-164.00 223.00
-173.00 229.00
-179.00 236.00
-191.00 234.00
-193.00 226.00
-192.00 215.00
-199.00 211.00
-205.00 202.00
-207.00 209.00
-213.00 213.00
-205.00 220.00
-205.00 231.00
-207.00 237.00
-200.00 239.00
-196.00 243.00
-191.00 251.00
-183.00 255.00
-185.00 264.00
-188.00 267.00
-189.00 266.00
-182.00 279.00
-182.00 298.00
-178.00 317.00
-173.00 328.00
-169.00 340.00
-166.00 351.00
-137.00 336.00
-143.00 351.00
-151.00 360.00
-161.00 359.00
-163.00 346.00
-165.00 337.00
-173.00 324.00
-170.00 318.00
-165.00 311.00
-158.00 317.00
-160.00 308.00
-154.00 300.00
-162.00 296.00
-174.00 294.00
-179.00 286.00
-181.00 274.00
-172.00 280.00
-178.00 272.00
-176.00 262.00
-165.00 270.00
-173.00 257.00
-167.00 248.00
-163.00 247.00
-158.00 249.00
-160.00 243.00
-153.00 239.00
-149.00 239.00
-142.00 241.00
-144.00 253.00
-144.00 264.00
-141.00 258.00
-136.00 245.00
-130.00 249.00
-131.00 256.00
-127.00 251.00
-122.00 253.00
-125.00 260.00
-124.00 265.00
-126.00 270.00
-137.00 271.00
-131.00 276.00
-137.00 287.00
-130.00 285.00
-128.00 278.00
-125.00 277.00
-124.00 287.00
-122.00 279.00
-118.00 279.00
-120.00 269.00
-115.00 261.00
-110.00 264.00
-110.00 275.00
-103.00 270.00
-98.00 275.00
-99.00 280.00
-109.00 284.00
-115.00 291.00
-103.00 287.00
-97.00 283.00
-95.00 287.00
-98.00 292.00
-114.00 297.00
-107.00 298.00
-99.00 297.00
-98.00 301.00
-112.00 319.00
-121.00 325.00
-132.00 328.00
-136.00 323.00
-241.00 190.00
-271.00 195.00
-292.00 205.00
-306.00 217.00
-310.00 233.00
-300.00 236.00
-291.00 228.00
-281.00 227.00
-280.00 236.00
-273.00 237.00
-264.00 228.00
-260.00 216.00
-251.00 206.00
-239.00 201.00
-228.00 199.00
-214.00 203.00
-210.00 199.00
-225.00 193.00
-235.00 192.00
-351.00 199.00
-355.00 198.00
-352.00 207.00
-351.00 212.00
-341.00 216.00
-341.00 213.00
-348.00 207.00
-159.00 159.00
-159.00 164.00
-164.00 170.00
-169.00 172.00
-168.00 177.00
-161.00 172.00
-157.00 179.00
-152.00 183.00
-158.00 193.00
-151.00 193.00
-149.00 184.00
-133.00 174.00
-143.00 174.00
-148.00 178.00
-154.00 177.00
-157.00 171.00
-153.00 166.00
-367.00 217.00
-369.00 225.00
-363.00 222.00
-361.00 218.00
-364.00 212.00
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_2 b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_2
deleted file mode 100644
index 5ca46b7..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/brain_2
+++ /dev/null
@@ -1,230 +0,0 @@
-229
-113.00 160.00
-100.00 156.00
-96.00 157.00
-90.00 163.00
-88.00 169.00
-87.00 177.00
-78.00 190.00
-73.00 198.00
-75.00 199.00
-77.00 205.00
-83.00 209.00
-90.00 217.00
-83.00 214.00
-73.00 206.00
-72.00 209.00
-73.00 212.00
-70.00 212.00
-66.00 214.00
-61.00 217.00
-59.00 227.00
-59.00 237.00
-66.00 242.00
-61.00 242.00
-57.00 250.00
-61.00 261.00
-61.00 271.00
-72.00 281.00
-84.00 279.00
-94.00 273.00
-96.00 275.00
-106.00 272.00
-115.00 266.00
-123.00 260.00
-133.00 263.00
-141.00 259.00
-148.00 257.00
-160.00 258.00
-176.00 258.00
-184.00 259.00
-191.00 262.00
-195.00 257.00
-192.00 253.00
-188.00 249.00
-186.00 243.00
-186.00 232.00
-192.00 231.00
-189.00 239.00
-190.00 244.00
-194.00 249.00
-198.00 244.00
-204.00 245.00
-203.00 247.00
-201.00 249.00
-202.00 258.00
-210.00 259.00
-213.00 280.00
-220.00 276.00
-229.00 276.00
-236.00 280.00
-244.00 281.00
-250.00 276.00
-251.00 270.00
-250.00 266.00
-260.00 266.00
-262.00 262.00
-284.00 272.00
-290.00 272.00
-301.00 278.00
-344.00 277.00
-354.00 281.00
-364.00 280.00
-375.00 272.00
-380.00 263.00
-386.00 255.00
-390.00 247.00
-388.00 243.00
-391.00 236.00
-397.00 230.00
-395.00 223.00
-394.00 218.00
-379.00 216.00
-383.00 212.00
-388.00 211.00
-392.00 204.00
-390.00 194.00
-385.00 189.00
-375.00 190.00
-377.00 180.00
-360.00 158.00
-353.00 166.00
-354.00 154.00
-352.00 154.00
-344.00 158.00
-345.00 148.00
-337.00 156.00
-328.00 162.00
-336.00 151.00
-332.00 137.00
-323.00 140.00
-322.00 133.00
-319.00 129.00
-313.00 129.00
-309.00 135.00
-307.00 127.00
-300.00 125.00
-293.00 132.00
-295.00 120.00
-281.00 106.00
-272.00 103.00
-260.00 106.00
-254.00 109.00
-249.00 118.00
-243.00 104.00
-239.00 98.00
-231.00 94.00
-220.00 97.00
-214.00 96.00
-202.00 100.00
-196.00 110.00
-193.00 118.00
-192.00 105.00
-190.00 96.00
-183.00 96.00
-181.00 102.00
-178.00 96.00
-172.00 97.00
-170.00 100.00
-159.00 106.00
-163.00 114.00
-169.00 119.00
-170.00 127.00
-173.00 137.00
-173.00 151.00
-175.00 155.00
-171.00 157.00
-168.00 151.00
-171.00 145.00
-170.00 137.00
-165.00 124.00
-159.00 120.00
-153.00 126.00
-152.00 134.00
-154.00 144.00
-150.00 138.00
-150.00 126.00
-152.00 120.00
-152.00 113.00
-148.00 109.00
-138.00 114.00
-124.00 125.00
-115.00 134.00
-115.00 137.00
-119.00 140.00
-128.00 143.00
-112.00 143.00
-105.00 146.00
-108.00 153.00
-81.00 304.00
-96.00 331.00
-111.00 349.00
-121.00 356.00
-131.00 358.00
-142.00 362.00
-151.00 364.00
-168.00 362.00
-176.00 353.00
-181.00 344.00
-174.00 332.00
-185.00 326.00
-200.00 316.00
-214.00 303.00
-215.00 290.00
-200.00 292.00
-184.00 296.00
-191.00 290.00
-199.00 287.00
-198.00 280.00
-194.00 270.00
-184.00 270.00
-178.00 265.00
-166.00 262.00
-154.00 262.00
-138.00 264.00
-123.00 267.00
-115.00 272.00
-109.00 277.00
-91.00 284.00
-92.00 290.00
-87.00 289.00
-80.00 293.00
-204.00 193.00
-227.00 189.00
-252.00 187.00
-280.00 197.00
-299.00 206.00
-310.00 217.00
-314.00 233.00
-308.00 241.00
-300.00 244.00
-294.00 219.00
-282.00 210.00
-264.00 202.00
-221.00 205.00
-207.00 207.00
-195.00 213.00
-189.00 223.00
-182.00 224.00
-174.00 211.00
-184.00 205.00
-198.00 199.00
-132.00 204.00
-139.00 208.00
-142.00 216.00
-137.00 218.00
-139.00 231.00
-147.00 239.00
-152.00 239.00
-164.00 244.00
-171.00 245.00
-165.00 248.00
-155.00 248.00
-149.00 246.00
-137.00 236.00
-100.00 236.00
-105.00 234.00
-104.00 239.00
-361.00 216.00
-355.00 226.00
-357.00 214.00
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/degenere.pts b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/degenere.pts
deleted file mode 100644
index c00dadb..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/degenere.pts
+++ /dev/null
@@ -1,4 +0,0 @@
-3
-331.102 357.398
-314.367 351.422
-136.266 136.266
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dipper b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dipper
deleted file mode 100644
index c91a24c..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dipper
+++ /dev/null
@@ -1,8 +0,0 @@
-7
-19 16
-43 38
-64 37
-91 40
-103 28
-122 70
-147 48
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dixie b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dixie
deleted file mode 100644
index bf57d90..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/dixie
+++ /dev/null
@@ -1,3374 +0,0 @@
-3373 
-4218 9791
-4225 9791
-4217 9793
-4220 9791
-4224 9791
-4226 9792
-4224 9791
-4227 9792
-4221 9793
-4219 9793
-4196 9795
-4187 9797
-4163 9799
-4181 9799
-4177 9800
-4178 9800
-4145 9804
-4139 9805
-4116 9810
-4112 9811
-4110 9811
-4119 9809
-4122 9809
-4096 9813
-4082 9815
-4068 9815
-4072 9815
-4091 9810
-4070 9812
-4076 9811
-4065 9813
-4055 9815
-4055 9815
-4058 9814
-4057 9813
-4056 9801
-4058 9811
-4066 9813
-4102 9805
-4104 9805
-4112 9801
-4127 9799
-4077 9805
-4070 9809
-4100 9804
-4102 9800
-4102 9795
-4144 9793
-4150 9797
-4152 9795
-4152 9795
-4152 9788
-4155 9797
-4208 9792
-4214 9790
-4220 9790
-4223 9790
-4223 9786
-4223 9789
-4225 9785
-4239 9788
-4240 9789
-4241 9784
-4208 9787
-4219 9789
-4210 9792
-4097 9811
-4092 9811
-4087 9810
-4090 9809
-4094 9811
-4061 9816
-4063 9815
-4060 9815
-4047 9817
-4041 9818
-4021 9824
-4016 9825
-4012 9826
-4023 9825
-4020 9825
-4026 9825
-4025 9825
-4027 9821
-4030 9824
-4031 9824
-4032 9824
-4036 9823
-4042 9822
-4039 9823
-4046 9820
-4044 9819
-3988 9827
-3985 9828
-3988 9826
-3986 9827
-3973 9828
-3968 9829
-3967 9829
-3973 9829
-3975 9828
-3972 9827
-3980 9828
-3978 9827
-3973 9827
-3966 9823
-3966 9819
-3960 9829
-3958 9831
-3930 9835
-3943 9833
-3945 9832
-3945 9831
-3957 9830
-3938 9835
-3940 9832
-3943 9828
-3965 9831
-3966 9827
-4022 9837
-3900 9829
-3903 9840
-3898 9844
-3912 9833
-3926 9839
-3927 9816
-3915 9828
-3923 9838
-3923 9840
-3925 9827
-3961 9833
-3931 9826
-3948 9830
-3958 9824
-3966 9830
-3949 9818
-3953 9826
-3943 9828
-3964 9839
-3964 9835
-4168 9829
-4150 9826
-4168 9829
-4155 9826
-4168 9829
-4140 9829
-4121 9835
-4115 9832
-4112 9836
-4114 9832
-4074 9843
-4074 9836
-4057 9846
-4060 9846
-4053 9846
-4052 9845
-4051 9838
-4002 9835
-4102 9837
-4113 9838
-4112 9838
-4126 9834
-4128 9833
-4118 9835
-4114 9831
-4120 9835
-4145 9831
-4148 9830
-4172 9827
-4175 9829
-4162 9831
-4127 9820
-4144 9818
-4157 9827
-4158 9826
-4184 9831
-4178 9826
-4194 9824
-4195 9816
-4178 9823
-4200 9821
-4209 9819
-4267 9807
-4244 9818
-4245 9819
-4257 9815
-4271 9815
-4277 9816
-4279 9800
-4280 9800
-4281 9809
-4271 9816
-4273 9816
-4256 9806
-4256 9819
-4252 9820
-4078 9823
-4087 9824
-4089 9825
-4090 9823
-4088 9824
-4088 9824
-4088 9822
-4088 9822
-4091 9821
-4094 9823
-4091 9824
-4092 9823
-4093 9823
-4090 9824
-4093 9824
-4092 9824
-4095 9824
-4097 9822
-4091 9822
-4086 9822
-4095 9821
-4079 9824
-4075 9824
-4062 9826
-4062 9825
-4058 9828
-4058 9826
-4056 9814
-4062 9816
-4075 9822
-4071 9826
-4045 9829
-4044 9818
-4042 9821
-4035 9816
-4029 9817
-4028 9832
-4036 9823
-4044 9816
-4042 9828
-4048 9815
-4026 9831
-4026 9810
-4032 9826
-4020 9825
-4037 9811
-4007 9819
-4003 9816
-4005 9827
-3999 9836
-3990 9840
-3989 9821
-3992 9811
-4003 9839
-3979 9824
-3975 9840
-3974 9841
-3974 9820
-3977 9810
-3979 9842
-3990 9834
-3994 9817
-3991 9813
-3989 9841
-3989 9838
-3992 9814
-3995 9840
-4014 9828
-4019 9837
-4024 9825
-4025 9836
-4013 9829
-4006 9840
-3991 9823
-3992 9840
-3987 9842
-4044 9836
-4042 9833
-4084 9823
-4062 9833
-4065 9828
-4072 9829
-4080 9828
-4082 9829
-4089 9826
-4130 9820
-4092 9828
-4094 9828
-4097 9827
-4100 9820
-4093 9827
-4095 9828
-4096 9828
-4095 9823
-4093 9828
-4097 9826
-4089 9816
-4101 9819
-4104 9827
-4102 9826
-4117 9823
-4095 9827
-4220 9802
-4233 9788
-4232 9799
-4201 9802
-4198 9788
-4200 9790
-4207 9788
-4216 9767
-4198 9805
-4199 9805
-4190 9807
-4190 9807
-4190 9806
-4209 9804
-4186 9805
-4169 9791
-4167 9810
-4160 9807
-4154 9813
-4157 9793
-4156 9786
-4151 9806
-4175 9768
-4144 9809
-4135 9805
-4137 9819
-4140 9778
-4139 9813
-4136 9815
-4124 9762
-4120 9790
-4151 9747
-4116 9782
-4115 9819
-4127 9782
-4120 9748
-4139 9788
-4149 9758
-4161 9783
-4174 9774
-4177 9794
-3988 9844
-3991 9844
-3993 9843
-3992 9842
-3988 9842
-3972 9846
-3955 9849
-3958 9848
-3940 9852
-3933 9850
-3932 9842
-3925 9853
-3921 9854
-3905 9858
-3905 9857
-3901 9859
-3899 9846
-3944 9835
-3941 9852
-3935 9846
-3929 9847
-3924 9850
-3923 9850
-3923 9854
-3924 9852
-3903 9854
-3897 9851
-3918 9851
-3923 9852
-3928 9851
-3928 9850
-3924 9853
-3921 9853
-3919 9853
-3918 9854
-3916 9857
-3919 9857
-3915 9858
-3902 9854
-3910 9860
-3895 9861
-3896 9864
-3897 9859
-3896 9860
-3894 9860
-3886 9856
-3905 9832
-3903 9841
-3892 9869
-3892 9845
-3905 9857
-3918 9829
-3919 9840
-3930 9844
-3938 9846
-3942 9846
-3952 9853
-3958 9845
-3954 9851
-3959 9848
-3959 9844
-3961 9848
-3964 9851
-3963 9847
-3974 9843
-3977 9845
-3978 9848
-3976 9847
-3981 9844
-3970 9847
-3992 9843
-3992 9843
-4017 9841
-4019 9833
-4010 9842
-4019 9841
-4031 9842
-4032 9835
-4036 9832
-4042 9837
-4042 9838
-4042 9831
-4044 9839
-4044 9838
-4045 9838
-4047 9838
-4047 9838
-4044 9839
-4004 9842
-4005 9845
-3984 9850
-3980 9850
-3980 9850
-3981 9849
-3977 9851
-3976 9850
-3974 9851
-3973 9851
-3975 9850
-3974 9850
-3972 9851
-3963 9848
-3959 9852
-3958 9853
-3957 9850
-3946 9852
-3965 9851
-3959 9852
-3958 9853
-3957 9850
-3946 9852
-3959 9851
-3965 9851
-3973 9849
-3979 9849
-4153 9846
-3918 9858
-3914 9860
-3901 9859
-3923 9856
-3916 9857
-3936 9857
-3946 9853
-3947 9851
-3945 9841
-3952 9837
-3943 9844
-3942 9844
-3937 9841
-3944 9844
-3949 9842
-3950 9844
-3948 9843
-3962 9840
-3935 9843
-3929 9843
-3933 9845
-3924 9844
-3863 9858
-3911 9847
-3904 9849
-3899 9849
-3887 9850
-3876 9851
-3924 9844
-3922 9844
-3928 9845
-3918 9845
-3920 9845
-3919 9846
-3920 9846
-3922 9834
-3864 9857
-3862 9858
-3867 9857
-3874 9854
-3872 9855
-3875 9856
-3878 9855
-3865 9855
-3867 9856
-3876 9856
-3878 9855
-3835 9859
-3841 9860
-3825 9866
-3823 9858
-3850 9857
-3853 9856
-3856 9856
-3858 9862
-3866 9860
-3867 9860
-3884 9858
-3893 9855
-3885 9857
-3886 9854
-3883 9854
-3877 9855
-3876 9855
-3876 9855
-3899 9852
-3902 9848
-3914 9852
-3853 9852
-3847 9851
-3856 9850
-3835 9853
-3843 9852
-3844 9852
-3843 9852
-3851 9847
-3851 9851
-3855 9849
-3857 9848
-3845 9851
-3853 9849
-3848 9850
-3855 9847
-3883 9843
-3890 9842
-3867 9845
-3862 9846
-3864 9843
-3844 9849
-3836 9851
-3832 9852
-3828 9850
-3808 9856
-3803 9855
-3811 9855
-3809 9856
-3845 9847
-3850 9845
-3858 9843
-3857 9843
-3864 9843
-3867 9842
-3868 9842
-3823 9847
-3813 9853
-3814 9850
-3816 9852
-3814 9851
-3816 9852
-3825 9849
-3825 9849
-3820 9850
-3825 9850
-3832 9849
-3820 9853
-3818 9852
-3816 9852
-3793 9856
-3792 9858
-3789 9859
-3787 9860
-3784 9859
-3783 9860
-3783 9861
-3780 9861
-3782 9861
-3781 9861
-3775 9862
-3770 9863
-3768 9864
-3766 9863
-3769 9863
-3763 9864
-3761 9863
-3768 9863
-3770 9862
-3769 9863
-3780 9860
-3759 9864
-3770 9863
-3756 9866
-3746 9866
-3734 9868
-3737 9870
-3740 9868
-3741 9864
-3736 9871
-3732 9872
-3748 9868
-3758 9866
-3765 9864
-3764 9865
-3769 9864
-3746 9871
-3743 9872
-3740 9873
-3766 9865
-3733 9863
-3735 9863
-3738 9865
-3732 9876
-3714 9868
-3698 9885
-3726 9878
-3729 9862
-3734 9876
-3734 9876
-3754 9871
-3754 9871
-3754 9866
-3759 9871
-3775 9868
-3777 9866
-3774 9864
-3783 9863
-3774 9865
-3773 9868
-3819 9858
-3820 9858
-3818 9858
-3817 9859
-3817 9859
-3826 9858
-3829 9857
-3829 9857
-3830 9857
-3837 9858
-3835 9856
-3811 9862
-3738 9863
-3741 9863
-3777 9857
-3786 9856
-3787 9853
-3789 9854
-3767 9854
-3757 9858
-3757 9858
-3757 9860
-3754 9859
-3751 9860
-3749 9861
-3745 9860
-3743 9862
-3743 9863
-3740 9862
-3736 9862
-3737 9862
-3740 9861
-3731 9863
-3730 9863
-3727 9864
-3726 9864
-3726 9864
-3721 9865
-3729 9864
-3717 9866
-3716 9867
-3714 9868
-3713 9868
-3709 9868
-3714 9867
-3712 9867
-3719 9865
-3713 9866
-3735 9859
-3720 9863
-3718 9863
-3709 9865
-3708 9867
-3706 9866
-3704 9867
-3701 9867
-3702 9867
-3688 9870
-3680 9873
-3687 9871
-3693 9870
-3692 9870
-3708 9867
-3706 9867
-3695 9871
-3693 9872
-3685 9874
-3683 9874
-3683 9874
-3671 9877
-3665 9879
-3666 9878
-3663 9880
-3660 9881
-3656 9881
-3665 9878
-3662 9880
-3662 9879
-3661 9880
-3664 9879
-3656 9882
-3655 9882
-3654 9881
-3653 9882
-3659 9879
-3664 9879
-3666 9878
-3651 9883
-3651 9879
-3664 9880
-3669 9879
-3669 9880
-3669 9880
-3650 9885
-3681 9877
-3696 9876
-3698 9877
-3701 9876
-3699 9877
-3692 9879
-3679 9883
-3681 9883
-3677 9884
-3677 9883
-3670 9889
-3670 9888
-3670 9887
-3678 9887
-3673 9888
-3669 9887
-3689 9884
-3681 9885
-3686 9883
-3691 9877
-3694 9879
-3692 9871
-3695 9872
-3712 9871
-3713 9868
-3714 9863
-3706 9873
-3702 9875
-3702 9875
-3720 9867
-3719 9869
-3719 9870
-3724 9864
-3726 9868
-3731 9865
-3735 9864
-3737 9864
-3737 9864
-3737 9863
-3698 9874
-3703 9872
-3704 9872
-3686 9878
-3690 9876
-3677 9882
-3678 9880
-3666 9885
-3656 9887
-3657 9887
-3653 9890
-3647 9891
-3655 9891
-3650 9892
-3639 9897
-3636 9894
-3639 9892
-3623 9898
-3619 9898
-3617 9899
-3620 9877
-3612 9900
-3594 9906
-3595 9907
-3593 9906
-3589 9905
-3590 9902
-3594 9904
-3594 9905
-3600 9903
-3595 9902
-3600 9903
-3614 9897
-3616 9894
-3626 9893
-3636 9889
-3638 9885
-3638 9885
-3638 9885
-3639 9885
-3637 9892
-3638 9892
-3620 9895
-3616 9896
-3612 9896
-3599 9895
-3597 9896
-3596 9897
-3596 9897
-3623 9890
-3634 9888
-3637 9886
-3638 9887
-3613 9891
-3612 9890
-3611 9891
-3606 9892
-3593 9895
-3587 9898
-3587 9898
-3616 9899
-3585 9899
-3582 9899
-3580 9900
-3582 9899
-3556 9907
-3555 9908
-3554 9909
-3556 9908
-3551 9910
-3557 9910
-3545 9913
-3545 9913
-3535 9917
-3529 9919
-3527 9920
-3528 9920
-3528 9921
-3526 9921
-3533 9919
-3539 9918
-3540 9917
-3553 9911
-3559 9908
-3558 9908
-3567 9906
-3568 9906
-3571 9905
-3574 9903
-3574 9902
-3576 9903
-3577 9902
-3595 9900
-3588 9899
-3580 9902
-3574 9906
-3564 9909
-3568 9908
-3564 9909
-3565 9909
-3564 9910
-3563 9910
-3561 9911
-3558 9912
-3537 9909
-3573 9907
-3571 9911
-3571 9911
-3567 9912
-3563 9912
-3563 9912
-3553 9918
-3556 9917
-3558 9916
-3560 9917
-3569 9912
-3585 9908
-3600 9903
-3601 9902
-3604 9901
-3615 9897
-3616 9897
-3621 9896
-3622 9895
-3623 9895
-3621 9893
-3621 9893
-3621 9894
-3632 9891
-3632 9891
-3638 9889
-3630 9891
-3636 9890
-3637 9889
-3638 9889
-3639 9888
-3639 9905
-3641 9903
-3640 9904
-3645 9903
-3650 9901
-3654 9899
-3653 9899
-3658 9897
-3664 9896
-3673 9894
-3671 9894
-3672 9893
-3677 9893
-3677 9892
-3679 9891
-3674 9894
-3670 9894
-3667 9895
-3662 9897
-3659 9897
-3655 9899
-3665 9896
-3666 9895
-3676 9893
-3688 9890
-3703 9887
-3717 9882
-3713 9885
-3713 9884
-3714 9884
-3719 9883
-3728 9881
-3749 9875
-3750 9875
-3753 9874
-3761 9872
-3779 9868
-3650 9900
-3628 9906
-3627 9906
-3614 9909
-3640 9902
-3640 9903
-3636 9884
-3631 9907
-3631 9906
-3623 9907
-3636 9906
-3639 9908
-3642 9906
-3646 9907
-3646 9906
-3643 9904
-3666 9900
-3671 9901
-3710 9890
-3677 9895
-3636 9905
-3667 9901
-3660 9904
-3642 9911
-3630 9913
-3598 9919
-3702 9914
-3603 9914
-3606 9913
-3599 9916
-3591 9916
-3595 9915
-3583 9918
-3577 9918
-3568 9921
-3568 9921
-3571 9920
-3581 9916
-3577 9918
-3562 9922
-3566 9924
-3575 9917
-3577 9918
-3574 9918
-3581 9899
-3551 9928
-3564 9923
-3571 9918
-3549 9913
-3585 9914
-3585 9916
-3589 9913
-3595 9913
-3596 9912
-3600 9912
-3598 9913
-3610 9909
-3611 9909
-3612 9909
-3596 9912
-3600 9910
-3600 9910
-3603 9909
-3614 9904
-3621 9901
-3628 9902
-3632 9902
-3640 9899
-3648 9897
-3623 9906
-3621 9906
-3689 9889
-3702 9885
-3702 9887
-3695 9888
-3697 9888
-3567 9929
-3568 9928
-3568 9930
-3652 9910
-3666 9905
-3667 9907
-3669 9907
-3682 9899
-3687 9899
-3689 9900
-3690 9901
-3692 9899
-3699 9895
-3703 9895
-3702 9898
-3709 9894
-3712 9894
-3708 9891
-3717 9886
-3721 9886
-3721 9886
-3725 9885
-3716 9886
-3710 9884
-3710 9887
-3712 9886
-3717 9886
-3723 9883
-3731 9880
-3732 9980
-3733 9881
-3749 9876
-3843 9879
-3779 9868
-3782 9867
-3783 9869
-3783 9868
-3782 9868
-3806 9868
-3787 9868
-3801 9865
-3805 9864
-3793 9866
-3818 9862
-3796 9862
-3817 9863
-3783 9870
-3794 9870
-3793 9869
-3785 9871
-3817 9863
-3792 9865
-3804 9867
-3821 9866
-3782 9865
-3787 9865
-3808 9867
-3787 9867
-3782 9872
-3817 9868
-3827 9866
-3774 9872
-3789 9875
-3797 9874
-3770 9876
-3769 9877
-3768 9879
-3771 9878
-3771 9878
-3771 9878
-3757 9881
-3728 9891
-3751 9886
-3742 9890
-3736 9893
-3730 9894
-3785 9880
-3784 9831
-3817 9871
-3817 9875
-3821 9875
-3822 9875
-3820 9874
-3826 9874
-3820 9876
-3822 9876
-3822 9876
-3801 9879
-3776 9885
-3754 9888
-3750 9893
-3742 9895
-3717 9896
-3730 9899
-3727 9900
-3760 9897
-3706 9897
-3700 9899
-3699 9900
-3708 9900
-3702 9905
-3698 9907
-3711 9899
-3680 9911
-3670 9916
-3677 9914
-3649 9926
-3674 9921
-3653 9926
-3658 9927
-3621 9924
-3623 9923
-3612 9926
-3608 9929
-3663 9911
-3663 9911
-3666 9910
-3671 9908
-3673 9907
-3674 9908
-3678 9906
-3660 9911
-3658 9909
-3659 9909
-3661 9910
-3667 9908
-3672 9906
-3677 9904
-3677 9904
-3752 9896
-3759 9894
-3761 9894
-3773 9890
-3774 9889
-3756 9895
-3759 9895
-3794 9883
-3809 9881
-3831 9873
-3862 9866
-3860 9868
-3862 9866
-3844 9872
-3847 9871
-3847 9870
-3849 9870
-3843 9873
-3843 9873
-3842 9873
-3843 9873
-3844 9872
-3842 9872
-3844 9873
-3837 9874
-3833 9876
-3830 9877
-3828 9879
-3848 9873
-3849 9872
-3850 9872
-3850 9873
-3848 9873
-3851 9872
-3853 9872
-3858 9871
-3854 9871
-3867 9870
-3864 9871
-3865 9872
-3866 9871
-3864 9873
-3843 9877
-3837 9879
-3827 9879
-3826 9881
-3824 9881
-3822 9882
-3822 9882
-3815 9883
-3817 9883
-3848 9877
-3850 9876
-3848 9876
-3847 9879
-3842 9879
-3842 9880
-3869 9873
-3871 9872
-3878 9869
-3877 9870
-3880 9870
-3879 9870
-3881 9871
-3874 9872
-3884 9868
-3886 9867
-3889 9868
-3889 9869
-3891 9868
-3876 9871
-3873 9872
-3860 9875
-3852 9877
-3864 9872
-3842 9880
-3838 9881
-3830 9882
-3828 9883
-3835 9882
-3830 9882
-3829 9882
-3820 9884
-3819 9884
-3818 9885
-3816 9885
-3817 9885
-3816 9885
-3825 9884
-3824 9884
-3823 9883
-3825 9883
-3827 9883
-3818 9885
-3817 9885
-3813 9885
-3812 9886
-3818 9885
-3822 9884
-3821 9886
-3824 9884
-3816 9888
-3807 9887
-3804 9889
-3806 9889
-3814 9886
-3806 9889
-3799 9890
-3790 9891
-3803 9888
-3798 9888
-3796 9890
-3796 9890
-3785 9892
-3784 9891
-3786 9891
-3780 9892
-3781 9890
-3777 9892
-3774 9892
-3775 9893
-3771 9893
-3770 9893
-3768 9894
-3765 9893
-3760 9895
-3765 9894
-3767 9894
-3761 9895
-3771 9893
-3772 9894
-3756 9899
-3740 9903
-3735 9903
-3717 9907
-3718 9908
-3717 9908
-3719 9909
-3721 9908
-3722 9907
-3721 9909
-3720 9909
-3725 9909
-3723 9909
-3722 9908
-3725 9907
-3728 9907
-3729 9906
-3730 9906
-3732 9906
-3751 9900
-3750 9899
-3751 9898
-3752 9897
-3752 9897
-3750 9899
-3735 9904
-3730 9905
-3736 9903
-3739 9900
-3743 9899
-3747 9898
-3732 9905
-3729 9905
-3716 9908
-3714 9908
-3717 9907
-3720 9906
-3710 9909
-3713 9910
-3704 9912
-3684 9914
-3679 9918
-3703 9914
-3668 9921
-3671 9921
-3672 9922
-3680 9921
-3680 9921
-3682 9920
-3684 9919
-3670 9922
-3670 9923
-3671 9924
-3663 9925
-3658 9927
-3637 9933
-3633 9934
-3621 9938
-3654 9927
-3653 9928
-3698 9918
-3662 9923
-3672 9922
-3688 9918
-3708 9912
-3708 9912
-3710 9911
-3723 9908
-3723 9907
-3708 9911
-3698 9914
-3695 9917
-3694 9917
-3693 9917
-3694 9917
-3700 9913
-3702 9914
-3704 9913
-3705 9912
-3707 9913
-3708 9912
-3705 9913
-3695 9914
-3683 9918
-3695 9914
-3694 9918
-3695 9917
-3685 9920
-3686 9921
-3678 9921
-3675 9922
-3662 9925
-3662 9926
-3652 9928
-3654 9928
-3660 9926
-3663 9925
-3657 9928
-3686 9925
-3671 9923
-3670 9923
-3678 9921
-3676 9921
-3689 9916
-3688 9917
-3683 9917
-3679 9919
-3676 9921
-3685 9917
-3687 9925
-3686 9916
-3689 9914
-3696 9913
-3664 9923
-3663 9925
-3654 9926
-3658 9925
-3644 9928
-3641 9928
-3644 9927
-3630 9932
-3633 9931
-3622 9935
-3614 9940
-3602 9943
-3603 9943
-3610 9941
-3608 9942
-3622 9936
-3624 9937
-3600 9945
-3593 9947
-3591 9948
-3591 9946
-3564 9958
-3570 9959
-3568 9960
-3584 9957
-3576 9955
-3588 9953
-3600 9947
-3621 9939
-3622 9938
-3618 9941
-3623 9940
-3637 9936
-3637 9934
-3619 9940
-3612 9942
-3613 9942
-3618 9941
-3615 9942
-3614 9942
-3620 9941
-3622 9940
-3626 9938
-3624 9939
-3627 9939
-3621 9940
-3622 9940
-3625 9939
-3625 9937
-3630 9939
-3637 9936
-3636 9936
-3650 9934
-3650 9928
-3667 9925
-3646 9932
-3614 9943
-3618 9943
-3613 9944
-3600 9947
-3622 9941
-3622 9942
-3620 9942
-3621 9942
-3624 9941
-3596 9948
-3594 9950
-3621 9951
-3589 9951
-3583 9953
-3574 9957
-3570 9962
-3573 9962
-3570 9960
-3585 9954
-3572 9960
-3567 9960
-3565 9961
-3546 9968
-3656 9930
-3648 9933
-3643 9933
-3641 9935
-3642 9935
-3627 9932
-3636 9937
-3633 9936
-3616 9941
-3641 9935
-3641 9932
-3615 9941
-3611 9943
-3609 9941
-3611 9946
-3610 9946
-3603 9948
-3613 9946
-3609 9946
-3610 9945
-3612 9945
-3615 9943
-3615 9943
-3613 9944
-3609 9946
-3610 9946
-3610 9945
-3611 9950
-3613 9955
-3556 9956
-3547 9959
-3552 9963
-3548 9966
-3549 9965
-3546 9962
-3540 9969
-3540 9967
-3544 9961
-3548 9956
-3542 9956
-3533 9971
-3533 9971
-3531 9970
-3530 9972
-3532 9972
-3530 9972
-3531 9974
-3553 9962
-3565 9956
-3567 9956
-3566 9956
-3561 9957
-3570 9954
-3574 9953
-3572 9954
-3575 9953
-3573 9953
-3581 9951
-3602 9943
-3599 9944
-3605 9941
-3589 9946
-3581 9950
-3575 9950
-3604 9942
-3616 9938
-3616 9937
-3616 9936
-3609 9932
-3619 9930
-3618 9931
-3610 9933
-3604 9936
-3604 9936
-3601 9938
-3595 9939
-3592 9940
-3598 9939
-3593 9939
-3591 9939
-3591 9939
-3590 9938
-3592 9937
-3593 9936
-3593 9935
-3582 9939
-3585 9939
-3583 9940
-3584 9940
-3587 9937
-3576 9940
-3564 9946
-3551 9950
-3547 9953
-3540 9956
-3553 9952
-3554 9952
-3544 9956
-3543 9958
-3545 9959
-3547 9957
-3562 9950
-3562 9951
-3568 9947
-3570 9947
-3574 9945
-3577 9944
-3579 9944
-3570 9945
-3574 9943
-3576 9941
-3577 9942
-3575 9942
-3575 9941
-3573 9943
-3551 9958
-3549 9958
-3542 9961
-3537 9964
-3529 9968
-3528 9969
-3527 9969
-3527 9968
-3509 9978
-3515 9976
-3517 9977
-3529 9971
-3530 9970
-3541 9963
-3542 9963
-3558 9956
-3566 9951
-3546 9964
-3551 9963
-3554 9962
-3561 9956
-3558 9956
-3557 9960
-3556 9958
-3475 9984
-3874 9985
-3493 9976
-3494 9976
-3512 9965
-3497 9973
-3497 9972
-3480 9978
-3499 9970
-3480 9977
-3473 9983
-3470 9985
-3464 9988
-3447 9997
-3444 9999
-3443 10000
-3443 9999
-3441 10000
-3438 10001
-3440 10000
-3443 10003
-3445 10002
-3450 9999
-3453 9998
-3455 9998
-3457 9996
-3458 9996
-3451 9999
-3446 10003
-3452 9999
-3459 9995
-3462 9994
-3463 9994
-3471 9993
-3447 9996
-3447 9990
-3462 9988
-3460 9988
-3463 9987
-3469 9985
-3481 9978
-3481 9979
-3485 9976
-3485 9976
-3489 9977
-3479 9982
-3479 9981
-3479 9980
-3479 9980
-3479 9982
-3479 9980
-3480 9979
-3504 9978
-3462 9984
-3468 9983
-3472 9980
-3474 9978
-3469 9981
-3465 9984
-3457 9988
-3439 9994
-3440 9994
-3445 9992
-3453 9987
-3457 9984
-3455 9982
-3454 9983
-3439 9991
-3438 9991
-3440 9990
-3435 9991
-3442 9988
-3438 9988
-3437 9992
-3432 9993
-3431 9995
-3427 9997
-3441 9988
-3442 9988
-3444 9986
-3449 9984
-3453 9983
-3451 9980
-3457 9979
-3458 9980
-3456 9976
-3468 9973
-3471 9972
-3476 9973
-3469 9975
-3474 9973
-3476 9973
-3475 9973
-3464 9980
-3463 9981
-3471 9976
-3471 9977
-3419 10005
-3418 10004
-3418 10003
-3414 10005
-3412 10005
-3416 10006
-3484 9959
-3489 9957
-3497 9954
-3500 9952
-3501 9953
-3503 9952
-3504 9951
-3511 9945
-3510 9946
-3523 9939
-3532 9933
-3502 9947
-3512 9943
-3509 9944
-3528 9933
-3529 9933
-3496 9952
-3477 9960
-3478 9958
-3472 9962
-3462 9969
-3468 9966
-3468 9963
-3467 9963
-3466 9962
-3464 9965
-3462 9963
-3484 9953
-3491 9948
-3495 9946
-3503 9946
-3506 9944
-3509 9929
-3509 9929
-3507 9933
-3511 9929
-3512 9930
-3513 9931
-3513 9931
-3503 9944
-3505 9947
-3520 9949
-3493 9935
-3493 9938
-3491 9937
-3488 9939
-3483 9942
-3481 9943
-3462 9951
-3465 9949
-3462 9951
-3490 9946
-3488 9947
-3485 9948
-3493 9947
-3497 9946
-3496 9946
-3492 9947
-3477 9953
-3480 9950
-3486 9946
-3490 9945
-3475 9951
-3469 9952
-3471 9952
-3467 9954
-3464 9956
-3465 9956
-3466 9953
-3463 9954
-3463 9955
-3460 9957
-3472 9951
-3473 9950
-3480 9947
-3482 9945
-3482 9946
-3490 9941
-3494 9939
-3500 9937
-3498 9938
-3495 9940
-3496 9940
-3497 9938
-3505 9936
-3503 9936
-3493 9940
-3474 9949
-3468 9952
-3468 9952
-3475 9947
-3472 9948
-3459 9951
-3459 9949
-3448 9959
-3451 9958
-3455 9956
-3448 9960
-3443 9962
-3443 9963
-3440 9962
-3439 9963
-3439 9962
-3431 9968
-3434 9967
-3422 9971
-3421 9974
-3416 9976
-3418 9975
-3416 9977
-3426 9975
-3426 9975
-3429 9972
-3430 9972
-3443 9966
-3437 9969
-3450 9964
-3456 9962
-3454 9962
-3455 9961
-3454 9962
-3446 9965
-3447 9963
-3444 9963
-3442 9965
-3434 9969
-3439 9968
-3441 9966
-3448 9963
-3450 9961
-3448 9962
-3449 9962
-3449 9961
-3449 9961
-3453 9960
-3453 9960
-3458 9957
-3455 9958
-3456 9958
-3456 9957
-3456 9958
-3453 9961
-3520 10011
-3524 10010
-3229 10007
-3544 9999
-3533 10006
-3536 10004
-3528 10004
-3525 10006
-3343 10005
-3327 10015
-3305 10027
-3291 10032
-3175 10038
-3255 10045
-3257 10045
-3260 10044
-3260 10043
-3252 10046
-3250 10046
-3250 10047
-3249 10048
-3246 10047
-3259 10042
-3252 10045
-3253 10045
-3252 10045
-3251 10046
-3245 10047
-3242 10048
-3236 10053
-3234 10051
-3233 10051
-3245 10048
-3254 10048
-3256 10045
-3263 10043
-3272 10039
-3276 10038
-3283 10036
-3285 10035
-3286 10034
-3290 10033
-3292 10033
-3289 10032
-3289 10035
-3296 10030
-3300 10028
-3299 10030
-3298 10028
-3301 10028
-3301 10029
-3321 10020
-3324 10019
-3354 10025
-3306 10028
-3305 10027
-3308 10027
-3312 10026
-3309 10027
-3332 10017
-3333 10016
-3324 10022
-3323 10023
-3326 10019
-3328 10019
-3327 10019
-3331 10018
-3324 10023
-3324 10024
-3318 10026
-3333 10020
-3337 10019
-3339 10019
-3343 10018
-3330 10026
-3349 10020
-3352 10019
-3355 10015
-3321 10030
-3333 10029
-3334 10029
-3339 10025
-3345 10024
-3345 10023
-3349 10022
-3360 10017
-3361 10017
-3329 10031
-3333 10031
-3335 10031
-3333 10033
-3330 10033
-3339 10029
-3341 10028
-3333 10034
-3336 10033
-3338 10030
-3340 10031
-3345 10027
-3345 10027
-3348 10026
-3350 10024
-3370 10023
-3363 10023
-3366 10022
-3364 10021
-3364 10022
-3371 10018
-3371 10017
-3371 10018
-3362 10019
-3361 10020
-3365 10020
-3381 10009
-3382 10010
-3379 10010
-3379 10089
-3364 10016
-3374 10010
-3389 10003
-3390 10002
-3392 10000
-3395 9997
-3398 9995
-3398 9996
-3380 10004
-3371 10009
-3366 10008
-3365 10001
-3358 10011
-3357 10012
-3356 10012
-3351 10012
-3353 10011
-3356 10010
-3368 10007
-3391 9997
-3388 9999
-3386 10000
-3383 10000
-3384 9999
-3340 10033
-3340 10033
-3342 10032
-3337 10033
-3339 10032
-3343 10030
-3328 10038
-3325 10040
-3317 10040
-3325 10034
-3331 10032
-3338 10029
-3306 10043
-3308 10044
-3304 10044
-3302 10044
-3295 10046
-3287 10050
-3281 10051
-3278 10054
-3287 10049
-3287 10049
-3288 10049
-3273 10053
-3273 10052
-3272 10052
-3272 10052
-3273 10051
-3267 10051
-3267 10055
-3259 10055
-3255 10060
-3263 10054
-3272 10053
-3245 10058
-3252 10051
-3214 10054
-3231 10064
-3223 10063
-3212 10068
-3203 10071
-3233 10068
-3216 10070
-3209 10064
-3217 10071
-3201 10067
-3231 10070
-3231 10069
-3236 10068
-3251 10069
-3243 10068
-3256 10066
-3250 10067
-3266 10040
-3258 10057
-3252 10059
-3258 10056
-3259 10045
-3257 10061
-3252 10066
-3253 10065
-3249 10066
-3250 10067
-3250 10067
-3249 10068
-3254 10066
-3251 10065
-3258 10063
-3261 10063
-3267 10062
-3270 10059
-3271 10059
-3274 10059
-3274 10059
-3274 10059
-3275 10059
-3274 10057
-3271 10057
-3269 10060
-3272 10059
-3270 10059
-3281 10056
-3277 10057
-3276 10058
-3290 10051
-3297 10048
-3206 10045
-3311 10042
-3299 10048
-3298 10049
-3297 10049
-3314 10043
-3320 10041
-3322 10043
-3342 10034
-3339 10037
-3338 10039
-3346 10033
-3356 10031
-3359 10032
-3360 10032
-3345 10037
-3344 10037
-3336 10038
-3325 10045
-3339 10040
-3339 10042
-3333 10044
-3318 10050
-3314 10049
-3316 10051
-3340 10041
-3344 10039
-3347 10038
-3346 10039
-3351 10036
-3354 10031
-3351 10028
-3365 10029
-3366 10027
-3374 10026
-3352 10033
-3350 10033
-3351 10039
-3339 10036
-3341 10043
-3335 10044
-3340 10041
-3337 10043
-3343 10035
-3353 10042
-3366 10041
-3367 10041
-3355 10040
-3350 10040
-3345 10044
-3358 10035
-3370 10015
-3379 10018
-3386 10019
-3390 10014
-3405 10001
-3404 10017
-3399 10020
-3399 10015
-3411 10005
-3408 10004
-3413 9999
-3416 10007
-3421 10006
-3415 10010
-3412 10004
-3413 10012
-3403 10012
-3401 9998
-3405 10013
-3371 10027
-3395 10022
-3385 10026
-3381 10028
-3369 10034
-3362 10039
-3299 10057
-3291 10060
-3288 10062
-3366 10037
-3364 10038
-3364 10036
-3362 10036
-3355 10037
-3334 10020
-3340 10022
-3337 10025
-3334 10029
-3335 10029
-3324 10022
-3323 10021
-3323 10028
-3323 10028
-3325 10032
-3320 10033
-3309 10033
-3323 10036
-3316 10038
-3334 10039
-3338 10040
-3328 10043
-3323 10046
-3336 10046
-3303 10055
-3308 10048
-3300 10044
-3295 10046
-3282 10042
-3283 10044
-3284 10045
-3256 10042
-3257 10048
-3257 10046
-3256 10048
-3254 10049
-3253 10049
-3253 10046
-3243 10052
-3246 10056
-3237 10052
-3243 10059
-3243 10058
-3232 10056
-3234 10053
-3229 10051
-3231 10049
-3233 10045
-3233 10045
-3228 10045
-3225 10044
-3226 10044
-3247 10036
-3254 10033
-3264 10031
-3256 10031
-3280 10033
-3266 10026
-3284 10026
-3285 10025
-3292 10024
-3307 10021
-3323 10017
-3452 10014
-3460 10011
-3462 10011
-3497 10006
-3467 10007
-3475 10008
-3468 10008
-3473 10065
-3478 10062
-3490 9997
-3494 9996
-3497 9995
-3467 10009
-3467 10011
-3445 10017
-3406 10032
-3449 10014
-3459 10009
-3453 10012
-3451 10014
-3471 10003
-3481 10000
-3478 10000
-3472 10001
-3471 10001
-3476 10005
-3470 10005
-3459 10006
-3454 10009
-3451 10008
-3455 10009
-3453 10004
-3451 10012
-3442 10002
-3432 10008
-3423 10020
-3421 10021
-3415 10013
-3404 10026
-3402 10029
-3373 10042
-3420 10009
-3428 10022
-3451 10012
-3431 10007
-3416 10019
-3397 10023
-3383 10036
-3387 10013
-3385 10034
-3402 10032
-3400 10030
-3402 10028
-3405 10019
-3375 10024
-3412 10012
-3422 10017
-3421 10021
-3423 10017
-3427 10019
-3429 10015
-3428 10015
-3429 10017
-3429 10017
-3435 10013
-3447 10012
-3439 10008
-3438 10008
-3443 10012
-3445 10013
-3443 10014
-3446 10014
-3440 10005
-3480 9998
-3462 10006
-3471 10000
-3475 9999
-3479 9994
-3449 10005
-3456 10000
-3460 10005
-3466 10002
-3470 9998
-3471 9999
-3476 9997
-3476 9997
-3481 9992
-3484 9987
-3488 9994
-3483 9998
-3480 9997
-3480 9995
-3487 9991
-3487 9991
-3498 9991
-3497 9994
-3491 9980
-3489 9977
-3490 9985
-3497 10000
-3465 9995
-3482 9995
-3484 9995
-3546 9992
-3499 9990
-3499 9992
-3502 9989
-3498 9991
-3492 9995
-3491 9995
-3490 9996
-3488 9998
-3490 9998
-3487 9997
-3479 10002
-3478 10003
-3492 9999
-3505 9990
-3505 9990
-3505 9988
-3510 9987
-3510 9986
-3509 9985
-3507 9987
-3502 9988
-3498 9992
-3513 9986
-3501 9988
-3496 9992
-3490 9990
-3498 9982
-3501 9988
-3500 9989
-3504 9983
-3500 9985
-3503 9987
-3508 9984
-3513 9977
-3516 9975
-3527 9977
-3529 9973
-3527 9972
-3528 9973
-3530 9972
-3518 9978
-3519 9976
-3534 9971
-3517 9979
-3518 9981
-3524 9974
-3529 9974
-3529 9974
-3517 9984
-3528 9975
-3529 9975
-3529 9975
-3532 9977
-3534 9974
-3525 9980
-3518 9984
-3401 10028
-3396 10030
-3393 10029
-3395 10029
-3406 10026
-3409 10025
-3405 10027
-3407 10026
-3411 10024
-3401 10024
-3407 10023
-3464 10009
-3461 10011
-3450 10014
-3457 10012
-3455 10013
-3454 10012
-3448 10016
-3437 10017
-3431 10019
-3436 10018
-3435 10018
-3426 10021
-3433 10019
-3434 10017
-3439 10014
-3449 10012
-3452 10010
-3461 10010
-3470 10003
-3473 10000
-3494 9993
-3496 9989
-3497 9990
-3497 9990
-3503 9988
-3501 9988
-3494 9988
-3492 9989
-3483 9993
-3479 9996
-3476 9997
-3478 9992
-3471 9995
-3465 9998
-3473 9994
-3479 9988
-3482 9989
-3499 9981
-3509 9977
-3498 9979
-3501 9978
-3504 9975
-3508 9974
-3508 9983
-3514 9982
-3497 9980
-3469 9988
-3462 9996
-3451 10000
-3453 10001
-3453 10002
-3458 9999
-3447 10004
-3444 10005
-3443 10006
-3436 10006
-3438 10007
-3433 10008
-3426 10010
-3426 10015
-3421 10014
-3429 10016
-3428 10017
-3444 10014
-3469 10001
-3483 9995
-3483 9994
-3419 10014
-3410 10018
-3402 10022
-3402 10026
-3404 10025
-3409 10024
-3409 10022
-3408 10024
-3415 10021
-3418 10019
-3420 10019
-3424 10018
-3425 10018
-3427 10017
-3398 10028
-3407 10025
-3409 10022
-3428 10016
-3446 10011
-3424 10012
-3413 10014
-3405 10018
-3410 10019
-3414 10018
-3406 10021
-3402 10022
-3400 10022
-3396 10023
-3396 10023
-3385 10027
-3365 10029
-3356 10031
-3345 10035
-3339 10037
-3338 10036
-3370 10033
-3378 10032
-3378 10032
-3390 10029
-3390 10019
-3385 10030
-3388 10025
-3392 10027
-3369 10036
-3365 10037
-3360 10040
-3357 10040
-3426 10024
-3429 10023
-3409 10031
-3402 10035
-3402 10036
-3391 10038
-3389 10038
-3385 10039
-3385 10038
-3379 10039
-3373 10040
-3371 10042
-3369 10042
-3370 10043
-3369 10043
-3363 10044
-3364 10044
-3389 10038
-3394 10037
-3396 10036
-3396 10037
-3396 10037
-3399 10035
-3354 10052
-3356 10053
-3409 10054
-3350 10056
-3350 10056
-3376 10057
-3341 10058
-3343 10059
-3341 10058
-3394 10060
-3331 10061
-3332 10061
-3326 10061
-3324 10062
-3322 10063
-3310 10065
-3309 10064
-3314 10067
-3311 10070
-3310 10070
-3246 10070
-3244 10071
-3241 10071
-3240 10071
-3240 10072
-3225 10073
-3241 10070
-3236 10070
-4236 10068
-3232 10070
-3230 10069
-3235 10068
-3237 10067
-3272 10058
-3307 10058
-3296 10060
-3299 10062
-3270 10071
-3269 10072
-3268 10073
-3263 10074
-3260 10074
-3260 10074
-3260 10073
-3263 10073
-3257 10074
-3257 10073
-3256 10079
-3253 10075
-3252 10075
-3251 10076
-3250 10077
-3248 10076
-3249 10078
-3247 10077
-3246 10078
-3246 10078
-3243 10078
-3243 10078
-3243 10079
-3244 10079
-3243 10079
-3243 10079
-3240 10080
-3239 10079
-3238 10080
-3232 10081
-3229 10084
-3256 10076
-3257 10077
-3257 10076
-3256 10078
-3254 10079
-3256 10079
-3256 10079
-3253 10079
-3249 10079
-3250 10081
-3250 10078
-3252 10078
-3241 10079
-3236 10080
-3230 10082
-3229 10081
-3228 10084
-3228 10084
-3228 10083
-3229 10083
-3225 10085
-3224 10084
-3222 10084
-3222 10084
-3219 10087
-3219 10085
-3215 10084
-3212 10086
-3192 10086
-3211 10086
-3211 10083
-3202 10086
-3202 10087
-3196 10088
-3195 10089
-3193 10088
-3191 10089
-3194 10087
-3199 10085
-3198 10086
-3197 10086
-3192 10086
-3218 10077
-3215 10078
-3212 10077
-3220 10076
-3218 10074
-3212 10075
-3211 10074
-3219 10071
-3225 10070
-3224 10064
-3220 10069
-3217 10070
-3211 10070
-3214 10070
-3215 10070
-3209 10071
-3219 10058
-3218 10066
-3218 10069
-3220 10068
-3224 10066
-3221 10067
-3217 10058
-3221 10069
-3230 10065
-3232 10066
-3237 10064
-3236 10064
-3243 10066
-3256 10055
-3256 10054
-3255 10054
-3262 10055
-3269 10050
-3265 10055
-3266 10055
-3279 10049
-3277 10063
-3224 10063
-3208 10066
-3216 10064
-3217 10063
-3196 10067
-3185 10071
-3175 10072
-3181 10065
-3181 10065
-3188 10059
-3158 10081
-3161 10076
-3147 10066
-3252 10066
-3154 10076
-3151 10070
-3146 10083
-3109 10082
-3152 10080
-3151 10081
-3143 10072
-3135 10084
-3184 10083
-3128 10081
-3126 10086
-3137 10073
-3133 10072
-3119 10086
-3116 10081
-3119 10086
-3102 10081
-3109 10094
-3096 10085
-3092 10081
-3089 10093
-3090 10096
-3085 10087
-3084 10090
-3086 10098
-3081 10094
-3093 10083
-3105 10096
-3094 10094
-3074 10076
-3056 10076
-3095 10078
-3106 10091
-3105 10090
-3105 10094
-3130 10097
-3093 10099
-3104 10087
-3104 10088
-3103 10098
-3100 10097
-3125 10096
-3101 10099
-3094 10099
-3094 10099
-3124 10092
-3137 10082
-3111 10093
-3145 10080
-3112 10094
-3116 10093
-3129 10086
-3121 10089
-3128 10094
-3131 10095
-3128 10095
-3128 10089
-3141 10078
-3135 10087
-3137 10089
-3166 10080
-3163 10079
-3158 10081
-3167 10082
-3163 10082
-3179 10077
-3172 10080
-3182 10075
-3176 10074
-3165 10078
-3178 10062
-3182 10074
-3185 10072
-3207 10065
-3202 10067
-3203 10067
-3201 10076
-3206 10068
-3207 10068
-3211 10067
-3206 10068
-3198 10069
-3191 10074
-3189 10076
-3186 10077
-3185 10076
-3184 10076
-3170 10080
-3170 10081
-3166 10082
-3158 10084
-3157 10086
-3189 10077
-3181 10077
-3184 10076
-3183 10082
-3198 10074
-3175 10087
-3174 10088
-3168 10088
-3166 10087
-3165 10086
-3161 10083
-3160 10085
-3160 10085
-3154 10087
-3154 10088
-3155 10087
-3158 10088
-3151 10089
-3151 10089
-3150 10090
-3144 10089
-3134 10090
-3145 10085
-3146 10086
-3149 10085
-3147 10084
-3124 10092
-3103 10095
-3098 10097
-3098 10100
-3088 10101
-3081 10100
-3084 10107
-3084 10107
-3100 10102
-3102 10102
-3103 10102
-3104 10103
-3106 10101
-3106 10101
-3110 10101
-3108 10101
-3111 10100
-3112 10098
-3110 10099
-3117 10098
-3120 10097
-3129 10092
-3126 10096
-3114 10101
-3132 10097
-3141 10095
-3135 10096
-3141 10096
-3131 10100
-3138 10098
-3141 10094
-3128 10101
-3128 10100
-3155 10093
-3170 10091
-3174 10091
-3179 10090
-3180 10089
-3182 10089
-3189 10087
-3194 10085
-3190 10085
-3195 10087
-3201 10085
-3200 10086
-3198 10086
-3210 10084
-3211 10084
-3211 10084
-3211 10083
-3213 10085
-3217 10084
-3219 10085
-3220 10084
-3221 10084
-3223 10087
-3224 10082
-3227 10082
-3227 10083
-3228 10083
-3230 10082
-3229 10082
-3239 10080
-3231 10084
-3227 10085
-3226 10084
-3224 10086
-3222 10085
-3222 10086
-3219 10087
-3221 10087
-3146 10098
-3122 10004
-3122 10004
-3125 10003
-3122 10004
-3119 10005
-3120 10106
-3118 10106
-3116 10107
-3126 10104
-3107 10108
-3106 10110
-3105 10110
-3104 10110
-3112 10107
-3107 10108
-3101 10110
-3115 10104
-3113 10105
-3112 10105
-3109 10105
-3105 10106
-3107 10106
-3106 10107
-3096 10109
-3091 10109
-3086 10111
-3089 10109
-3082 10109
-3078 10110
-3079 10111
-3079 10111
-3079 10112
-3074 10112
-3071 10113
-3096 10112
-3096 10112
-3095 10112
-3099 10114
-3102 10113
-3115 10112
-3122 10110
-3121 10109
-3124 10109
-3125 10109
-3125 10110
-3132 10108
-3131 10107
-3128 10106
-3190 10097
-3178 10000
-3168 10001
-3161 10099
-3170 10098
-3171 10097
-3170 10097
-3165 10095
-3152 10096
-3089 10091
-3189 10091
-3189 10092
-3091 10093
-3194 10092
-3200 10092
-3228 10092
-3204 10093
-3199 10096
-3200 10096
-3200 10097
-3222 10091
-3216 10092
-3219 10092
-3219 10091
-3213 10093
-3214 10094
-3227 10087
-3230 10085
-3238 10084
-3237 10086
-3236 10087
-3236 10086
-3252 10080
-3249 10085
-3250 10082
-3253 10084
-3258 10084
-3258 10083
-3259 10083
-3262 10082
-3264 10082
-3266 10082
-3271 10080
-3273 10078
-3278 10086
-3269 10089
-3269 10090
-3267 10090
-3258 10093
-3258 10095
-3260 10093
-3252 10098
-3252 10098
-3241 10096
-3245 10094
-3251 10094
-3252 10096
-3255 10093
-3253 10095
-3255 10096
-3254 10092
-3252 10089
-3251 10090
-3251 10092
-3239 10097
-3237 10095
-3231 10092
-3234 10093
-3226 10093
-3213 10097
-3199 10101
-3195 10102
-3194 10102
-3192 10106
-3188 10106
-3189 10106
-3189 10105
-3191 10105
-3197 10106
-3196 10106
-3194 10106
-3191 10106
-3189 10108
-3189 10110
-3177 10110
-3172 10110
-3159 10114
-3153 10112
-3153 10116
-3143 10116
-3178 10111
-3165 10111
-3179 10113
-3177 10112
-3178 10112
-3200 10105
-3206 10103
-3207 10102
-3211 10104
-3215 10102
-3217 10102
-3220 10100
-3218 10101
-3213 10104
-3222 10102
-3224 10104
-3220 10105
-3226 10103
-3220 10107
-3221 10107
-3227 10105
-3235 10102
-3208 10109
-3206 10109
-3203 10110
-3205 10111
-3209 10110
-3210 10110
-3208 10110
-3203 10110
-3204 10111
-3205 10110
-3202 10111
-3194 10112
-3206 10111
-3208 10110
-3207 10110
-3209 10110
-3210 10109
-3213 10109
-3216 10108
-3215 10108
-3221 10106
-3218 10107
-3218 10106
-3219 10107
-3219 10107
-3216 10108
-3215 10109
-3246 10100
-3243 10099
-3241 10102
-3237 10103
-3235 10104
-3233 10105
-3233 10105
-3234 10105
-3234 10105
-3230 10106
-3228 10106
-3230 10107
-3229 10107
-3229 10108
-3229 10107
-3228 10107
-3232 10108
-3228 10108
-3227 10107
-3224 10109
-3224 10107
-3225 10109
-3224 10108
-3223 10110
-3223 10109
-3221 10110
-3218 10110
-3217 10109
-3217 10110
-3217 10110
-3217 10109
-3217 10109
-3211 10110
-3213 10112
-3210 10112
-3209 10112
-3206 10112
-3207 10113
-3208 10112
-3208 10110
-3208 10110
-3196 10114
-3192 10113
-3191 10117
-3249 10115
-3244 10102
-3248 10101
-3263 10093
-3280 10087
-3296 10084
-3281 10091
-3286 10093
-3283 10091
-3282 10089
-3287 10086
-3299 10079
-3296 10081
-3297 10079
-3300 10078
-3300 10078
-3302 10078
-3308 10073
-3312 10071
-3304 10072
-3302 10073
-3300 10075
-3289 10079
-3307 10073
-3309 10072
-3310 10072
-3311 10070
-3310 10073
-3310 10074
-3308 10073
-3308 10073
-3308 10073
-3310 10073
-3311 10072
-3312 10072
-3311 10071
-3319 10066
-3331 10061
-3327 10063
-3334 10063
-3320 10072
-3316 10071
-3316 10071
-3316 10071
-3346 10071
-3323 10071
-3324 10070
-3325 10070
-3326 10070
-3320 10073
-3324 10069
-3313 10074
-3327 10070
-3327 10069
-3331 10068
-3342 10065
-3337 10064
-3335 10064
-3330 10066
-3329 10066
-3321 10070
-3300 10079
-3292 10081
-3293 10080
-3301 10077
-3301 10077
-3306 10074
-3310 10073
-3301 10075
-3300 10076
-3298 10077
-3296 10078
-3297 10078
-3283 10085
-3281 10086
-3281 10085
-3276 10087
-3270 10089
-3266 10090
-3268 10089
-3269 10089
-3270 10089
-3275 10087
-3275 10087
-3262 10092
-3248 10095
-3246 10096
-3246 10096
-3236 10098
-3236 10097
-3241 10096
-3228 10098
-3239 10095
-3240 10098
-3249 10096
-3266 10090
-3270 10091
-3269 10090
-3270 10086
-3283 10081
-3280 10082
-3270 10085
-3242 10090
-3241 10090
-3197 10104
-3195 10005
-3194 10006
-3177 10110
-3173 10110
-3171 10111
-3169 10113
-3184 10109
-3178 10109
-3171 10107
-3144 10111
-3167 10110
-3170 10112
-3168 10111
-3165 10115
-3153 10115
-3153 10116
-3144 10117
-3144 10122
-3140 10120
-3193 10105
-3198 10095
-3195 10103
-3195 10103
-3218 10098
-3237 10090
-3234 10085
-3236 10088
-3230 10091
-3223 10089
-3228 10092
-3240 10087
-3245 10090
-3251 10078
-3244 10087
-3246 10089
-3256 10077
-3244 10088
-3269 10072
-3274 10072
-3261 10077
-3261 10082
-3262 10084
-3267 10085
-3268 10079
-3274 10077
-3280 10078
-3282 10076
-3298 10073
-3298 10074
-3300 10073
-3300 10073
-3296 10076
-3293 10076
-3278 10081
-3276 10082
-3268 10084
-3263 10085
-3261 10085
-3258 10087
-3255 10087
-3255 10084
-3140 10083
-3225 10095
-3224 10098
-3228 10095
-3217 10098
-3215 10099
-3215 10099
-3206 10101
-3214 10100
-3215 10099
-3171 10100
-3170 10100
-3170 10101
-3175 10100
-3153 10106
-3149 10110
-3143 10109
-3142 10109
-3140 10109
-3135 10109
-3118 10115
-3121 10115
-3102 10118
-3099 10116
-3097 10116
-3103 10115
-3109 10114
-3099 10116
-3097 10116
-3095 10116
-3094 10116
-3091 10117
-3109 10114
-3109 10115
-3111 10113
-3112 10110
-3116 10111
-3104 10114
-3094 10115
-3080 10117
-3075 10117
-3077 10116
-3075 10116
-3083 10114
-3086 10114
-3086 10113
-3087 10113
-3090 10113
-3069 10117
-3064 10119
-3074 10116
-3059 10120
-3062 10119
-3064 10117
-3059 10119
-3058 10118
-3055 10117
-3093 10104
-3086 10112
-3085 10112
-3079 10112
-3076 10112
-3071 10114
-3035 10118
-3053 10115
-3049 10115
-3049 10114
-3059 10113
-3032 10117
-3032 10117
-3037 10119
-3038 10115
-3041 10114
-3060 10112
-3061 10113
-3068 10110
-3110 10102
-3111 10102
-3107 10103
-3106 10104
-3109 10103
-2836 10092
-3139 10092
-3151 10085
-3152 10086
-3147 10086
-3144 10089
-3208 10089
-3208 10088
-3158 10088
-3162 10088
-3173 10084
-3179 10084
-3178 10082
-3190 10075
-3184 10075
-3197 10071
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fout b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fout
deleted file mode 100644
index d21efe2..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fout
+++ /dev/null
@@ -1,174 +0,0 @@
-125 60
-130 195
-143 233
-151 232
-112 22
-104 23
-186 141
-69 114
-8 141
-10 151
-247 114
-245 104
-183 152
-72 103
-145 63
-110 192
-118 233
-137 22
-106 232
-149 23
-102 231
-153 24
-111 62
-144 193
-96 70
-159 185
-96 230
-159 25
-87 228
-168 27
-165 229
-90 26
-175 226
-80 29
-158 69
-97 186
-73 223
-182 32
-187 221
-68 34
-196 216
-59 39
-62 218
-193 37
-167 77
-88 178
-13 161
-242 94
-56 41
-84 81
-171 174
-187 119
-68 136
-46 48
-209 207
-34 59
-26 69
-221 196
-229 186
-175 86
-80 169
-51 211
-204 44
-177 166
-78 89
-38 200
-217 55
-180 95
-75 160
-27 187
-228 68
-183 101
-72 154
-8 118
-247 137
-18 173
-237 82
-19 80
-236 175
-14 92
-241 163
-186 113
-69 142
-12 98
-243 157
-9 110
-246 145
-3 2
-5 4
-9 8
-11 10
-12 6
-13 7
-46 9
-32 30
-47 11
-33 31
-30 3
-31 5
-7 52
-6 51
-56 55
-58 57
-24 49
-25 50
-34 14
-35 15
-75 46
-38 32
-76 47
-39 33
-1 23
-0 22
-63 12
-64 13
-23 25
-22 24
-15 1
-14 0
-77 56
-42 61
-78 58
-43 62
-48 41
-18 20
-19 21
-20 26
-21 27
-52 82
-51 81
-83 79
-84 80
-72 68
-71 67
-73 85
-74 86
-26 28
-27 29
-49 64
-50 63
-41 39
-40 38
-68 60
-67 59
-16 18
-17 19
-45 35
-44 34
-59 44
-60 45
-36 42
-37 43
-53 48
-82 72
-81 71
-85 83
-86 84
-79 77
-80 78
-28 36
-29 37
-54 40
-55 53
-57 54
-69 75
-70 76
-61 65
-62 66
-65 69
-66 70
-8 73
-10 74
-2 16
-4 17
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/kleeblatt b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/kleeblatt
deleted file mode 100644
index 4dce0ef..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/kleeblatt
+++ /dev/null
@@ -1,76 +0,0 @@
-75
-220 287
-202 289
-195 295
-190 305
-189 317
-189 334
-190 345
-189 361
-183 382
-169 390
-152 397
-136 397
-120 390
-107 381
-96 364
-94 354
-88 340
-88 327
-86 307
-97 302
-109 290
-123 287
-137 286
-151 278
-163 274
-171 262
-175 246
-166 235
-148 224
-133 222
-109 220
-99 215
-93 200
-92 184
-98 164
-113 150
-130 141
-143 134
-159 129
-177 127
-191 133
-205 141
-205 149
-205 160
-205 171
-205 188
-207 202
-208 215
-212 230
-236 242
-246 240
-265 237
-287 230
-297 221
-311 215
-325 210
-341 199
-362 198
-369 209
-386 220
-384 235
-383 249
-383 266
-379 285
-371 298
-357 306
-346 309
-329 309
-318 312
-305 313
-295 313
-270 311
-260 306
-252 299
-238 292
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/m30f.jpg b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/m30f.jpg
deleted file mode 100644
index 0e96be0..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/m30f.jpg and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/noisy_circle b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/noisy_circle
deleted file mode 100644
index 0634eac..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/noisy_circle
+++ /dev/null
@@ -1,74 +0,0 @@
-73
-175 438
-107 403
-64 296
-97 178
-193 108
-288 84
-413 111
-428 171
-418 264
-400 368
-337 421
-273 445
-210 447
-161 421
-121 387
-87 331
-75 281
-102 317
-130 362
-160 395
-182 413
-219 430
-248 430
-308 416
-341 399
-378 372
-387 351
-335 380
-298 397
-269 406
-237 411
-200 408
-166 391
-193 386
-200 424
-222 416
-239 447
-285 427
-321 433
-143 409
-143 386
-100 372
-111 344
-121 375
-121 409
-139 396
-137 430
-83 338
-348 388
-361 394
-389 394
-376 362
-319 399
-254 377
-238 397
-206 394
-153 362
-130 332
-100 302
-77 308
-86 220
-135 128
-248 86
-372 91
-432 142
-422 213
-426 311
-406 339
-412 352
-372 429
-365 408
-349 430
-176 374
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/torus b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/torus
deleted file mode 100644
index a9d9fc2..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/torus
+++ /dev/null
@@ -1,128 +0,0 @@
-127
-56.00 41.00
-46.00 48.00
-34.00 59.00
-33.00 61.00
-26.00 69.00
-24.00 73.00
-19.00 80.00
-14.00 92.00
-12.00 98.00
-9.00 110.00
-8.00 118.00
-8.00 141.00
-9.00 143.00
-10.00 151.00
-11.00 153.00
-13.00 161.00
-17.00 169.00
-18.00 173.00
-27.00 187.00
-38.00 200.00
-51.00 211.00
-55.00 213.00
-62.00 218.00
-73.00 223.00
-87.00 228.00
-96.00 230.00
-102.00 231.00
-106.00 232.00
-118.00 233.00
-143.00 233.00
-145.00 232.00
-151.00 232.00
-153.00 231.00
-165.00 229.00
-167.00 228.00
-175.00 226.00
-183.00 222.00
-187.00 221.00
-196.00 216.00
-209.00 207.00
-221.00 196.00
-222.00 194.00
-229.00 186.00
-231.00 182.00
-236.00 175.00
-241.00 163.00
-243.00 157.00
-246.00 145.00
-247.00 137.00
-247.00 114.00
-246.00 112.00
-245.00 104.00
-244.00 102.00
-242.00 94.00
-238.00 86.00
-237.00 82.00
-228.00 68.00
-217.00 55.00
-204.00 44.00
-200.00 42.00
-193.00 37.00
-182.00 32.00
-168.00 27.00
-159.00 25.00
-153.00 24.00
-149.00 23.00
-137.00 22.00
-112.00 22.00
-110.00 23.00
-104.00 23.00
-102.00 24.00
-90.00 26.00
-88.00 27.00
-80.00 29.00
-72.00 33.00
-68.00 34.00
-59.00 39.00
-84.00 81.00
-94.00 71.00
-96.00 70.00
-100.00 67.00
-111.00 62.00
-120.00 60.00
-125.00 60.00
-127.00 59.00
-133.00 60.00
-141.00 61.00
-145.00 63.00
-149.00 64.00
-158.00 69.00
-167.00 77.00
-175.00 86.00
-180.00 95.00
-183.00 101.00
-186.00 113.00
-187.00 119.00
-187.00 139.00
-186.00 141.00
-185.00 148.00
-183.00 152.00
-182.00 156.00
-177.00 166.00
-171.00 174.00
-161.00 184.00
-159.00 185.00
-155.00 188.00
-144.00 193.00
-135.00 195.00
-130.00 195.00
-128.00 196.00
-122.00 195.00
-114.00 194.00
-110.00 192.00
-106.00 191.00
-97.00 186.00
-88.00 178.00
-80.00 169.00
-75.00 160.00
-72.00 154.00
-69.00 142.00
-68.00 136.00
-68.00 116.00
-69.00 114.00
-70.00 107.00
-72.00 103.00
-73.00 99.00
-78.00 89.00
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/usa-outline b/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/usa-outline
deleted file mode 100644
index 3567d2f..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/usa-outline
+++ /dev/null
@@ -1,207 +0,0 @@
-206 
-39 498
-57 502
-70 496
-606 495
-25 492
-54 492
-61 494
-78 494
-85 494
-101 485
-114 487
-119 487
-126 490
-140 488
-148 493
-598 485
-623 492
-34 481
-163 480
-169 475
-184 483
-194 478
-337 482
-354 478
-590 477
-621 480
-25 471
-196 467
-211 466
-224 474
-234 466
-244 468
-246 474
-259 465
-267 466
-277 474
-289 469
-298 466
-309 472
-316 467
-333 466
-363 465
-367 465
-576 474
-633 465
-17 458
-383 455
-394 456
-578 456
-617 459
-20 452
-366 451
-413 454
-423 450
-432 449
-441 447
-567 452
-612 449
-20 439
-380 436
-391 439
-399 444
-427 439
-562 440
-606 440
-17 426
-433 431
-453 431
-456 431
-537 433
-545 425
-605 433
-17 417
-424 422
-435 423
-459 421
-532 421
-607 415
-10 414
-419 406
-438 412
-460 413
-469 406
-524 410
-609 412
-13 396
-415 401
-444 403
-482 399
-519 395
-603 395
-13 385
-417 390
-439 386
-479 393
-512 385
-585 392
--5 379
-415 380
-439 384
-478 381
-487 379
-499 380
-584 378
--2 367
-419 371
-431 368
-585 367
-10 356
-576 361
-11 345
-582 353
-9 342
-579 335
-16 331
-567 333
-20 319
-574 320
-23 314
-568 306
-22 299
-582 302
-25 290
-571 293
-31 280
-560 284
-34 268
-547 270
-42 259
-45 263
-553 263
-48 248
-543 248
-58 237
-68 241
-77 241
-539 237
-85 225
-525 229
-536 233
-103 221
-106 224
-171 222
-176 220
-188 218
-526 219
-122 209
-132 209
-144 212
-150 205
-164 209
-202 213
-525 208
-214 204
-452 197
-525 197
-206 192
-430 189
-444 192
-455 193
-469 190
-484 189
-493 188
-535 193
-216 184
-259 183
-363 175
-370 178
-377 183
-387 181
-415 176
-504 177
-511 177
-536 181
-221 173
-230 169
-243 166
-249 171
-269 173
-343 172
-350 172
-404 167
-410 170
-420 171
-517 174
-545 172
-274 158
-342 156
-522 163
-553 155
-279 149
-332 148
-524 149
-548 146
-275 140
-320 138
-530 142
-547 139
-286 127
-296 132
-319 130
-525 126
-538 131
-301 124
-305 117
-321 119
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.cpp b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.cpp
deleted file mode 100644
index 6f529d9..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#include "MainWindow.h"
-#include "typedefs.h"
-#include <QApplication>
-
-
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char** argv)
-{
- QApplication application(argc,argv);
- 
-  application.setOrganizationDomain("geometryfactory.com");
-  application.setOrganizationName("GeometryFactory");
-  application.setApplicationName("Alpha Shape Reconstruction");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Alpha_shape_3);
-  
-  MainWindow mw;
-  mw.show();
-
-  return application.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/CMakeLists.txt
deleted file mode 100644
index e5d395c..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Alpha_shape_3)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL  COMPONENTS Qt4)
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-find_package(OpenGL)
-find_package(QGLViewer)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
-
-  include(${QT_USE_FILE})
-
-  include_directories (${QGLVIEWER_INCLUDE_DIR})
-  include_directories (BEFORE ../../include ./ )
-
-  # ui file, created wih Qt Designer
-  qt4_wrap_ui( uis MainWindow.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( RESOURCE_FILES ./Alpha_shape_3.qrc )
-
-  qt4_automoc( MainWindow.cpp Viewer.cpp)
-
-  add_executable  ( Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis}  ${RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shape_3 )
-
-  target_link_libraries( Alpha_shape_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-  target_link_libraries( Alpha_shape_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
-  target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.cpp
deleted file mode 100644
index 34ef410..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include "MainWindow.h"
-
-MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent)
-{
-  setupUi(this);
-  this->viewer->setScene(&scene);
-  connectActions();
-  this->addAboutDemo(":/cgal/help/about_Alpha_shapes_3.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::connectActions()
-{
-  QObject::connect(this->actionLoad_New_File, SIGNAL(triggered()), 
-		   this, SLOT(open_file()));
-
-  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
-		   this, SLOT(alphaChanged(int)));
-
-  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)),
-		   this, SLOT(alphaChanged(int)));
-
-  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
-		   this->alphaBox, SLOT(setValue(int)));
-
-  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)), 
-		   this->alphaSlider, SLOT(setValue(int)));
-
-  QObject::connect(this, SIGNAL(sceneChanged()), 
-		   this->viewer, SLOT(sceneChanged()));
-
-  QObject::connect(this, SIGNAL(alphaChanged()), 
-		   this->viewer, SLOT(update()));
-
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   qApp, SLOT(quit()));
-}
-
-void
-MainWindow::open_file()
-{
-
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points File"),
-						  "./data",
-						  tr("pts files (*.pts)"));
-
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void 
-MainWindow::alphaChanged(int i)
-{
-  if (scene.alpha_shape.number_of_alphas() > 0){
-    if(i < 100){
-      int n = static_cast<int>((i * scene.alpha_shape.number_of_alphas())/ 100);
-      if(n == 0) n++;
-      scene.alpha_shape.set_alpha(scene.alpha_shape.get_nth_alpha(n));
-    } else {
-      Alpha_iterator alpha_end_it = scene.alpha_shape.alpha_end();
-      scene.alpha_shape.set_alpha((*(--alpha_end_it))+1);
-    }
-  } else {
-    scene.alpha_shape.set_alpha(0);
-  }
-  emit (alphaChanged());
-}
-
-void
-MainWindow::open(QString fileName)
-{
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  scene.alpha_shape.clear();
-  scene.points.clear();
-  std::ifstream ifs(qPrintable(fileName));
-  int n;
-  ifs >> n;
-  Point_3 p;
-  for(int i=0; i<n; i++){
-    ifs >> p;
-    scene.points.push_back(p);
-  }
-  timer.reset();
-  timer.start();
-  scene.alpha_shape.make_alpha_shape(scene.points.begin(), scene.points.end());
-  scene.alpha_shape.set_alpha(16);
-  timer.stop();
-  
-
-  alphaSlider->setRange(0,100);
-  alphaSlider->setSliderPosition(50);
-
-  this->addToRecentFiles(fileName);
-  QApplication::restoreOverrideCursor();
-  emit (sceneChanged());
-}
-
-
-#include "MainWindow.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.h b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.h
deleted file mode 100644
index ef7627f..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef MAIN_WINDOW_H
-#define MAIN_WINDOW_H
-
-#include "typedefs.h"
-#include "ui_MainWindow.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-#include <QSlider>
-#include <QFileDialog>
-class QWidget;
-
-
-
-
-class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
-{
-  Q_OBJECT
-
-  public:
-  MainWindow(QWidget* parent = 0);
-
-  void connectActions();
-
-
-  Scene scene;
-  Timer timer;
-
-public slots:
-  virtual void open(QString fileName);
-  void open_file();
-  void alphaChanged(int i);
-
-  signals:
-  void sceneChanged();
-  void alphaChanged();
-};
-
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.cpp
deleted file mode 100644
index 3842776..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "Viewer.h"
-#include <vector>
-#include <CGAL/bounding_box.h>
-#include <QGLViewer/vec.h>
-
-
-
-
-void
-Viewer::sceneChanged()
-{
-
-  Iso_cuboid_3 bb = CGAL::bounding_box(scene->points.begin(), scene->points.end());
-   
-  this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(), bb.ymin(), bb.zmin()),
-				      qglviewer::Vec(bb.xmax(),
-						     bb.ymax(),
-						     bb.zmax()));
-    
-  this->showEntireScene();
-}
-
-
-void
-Viewer::draw()
-{
-
- // define material
-  float	ambient[]  =   { 0.25f,
-                         0.20725f,
-                         0.20725f,
-                         0.922f };
-  float	diffuse[]  =   { 1.0f,
-                         0.829f,
-                         0.829f,
-                         0.922f };
-
-  float	specular[]  = {  0.296648f,
-                         0.296648f,
-                         0.296648f,
-                         0.522f };
-
-  float	emission[]  = {  0.3f,
-                         0.3f,
-                         0.3f,
-                         1.0f };
-  float shininess[] = {  11.264f };
-
-  // apply material
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT,   ambient);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE,   diffuse);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR,  specular);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,  emission);
-
-  // anti-aliasing (if the OpenGL driver permits that)
-  ::glEnable(GL_LINE_SMOOTH);
-
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); 
-  // draw surface mesh
-  bool m_view_surface = true;
-  bool draw_triangles_edges = true;
-
-  if(m_view_surface)
-  {
-    ::glEnable(GL_LIGHTING);
-    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-    ::glColor3f(0.2f, 0.2f, 1.f);
-    ::glEnable(GL_POLYGON_OFFSET_FILL);
-    ::glPolygonOffset(3.0f,-3.0f);
-    gl_draw_surface();
-
-    if(draw_triangles_edges)
-    {
-      ::glDisable(GL_LIGHTING);
-      ::glLineWidth(1.);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-      ::glColor3ub(0,0,0);
-      ::glDisable(GL_POLYGON_OFFSET_FILL);
-      gl_draw_surface();
-    }
-  }
-
-}
-
-
-
-void 
-Viewer::gl_draw_surface()
-{
-  ::glColor3f(1.0f, 0.0f, 0.0f);
-  ::glDisable(GL_LIGHTING);
-  ::glEnable(GL_POINT_SMOOTH);
-  ::glPointSize(5);
-  ::glBegin(GL_POINTS);
-  for(std::list<Point_3>::iterator it = scene->points.begin();
-      it != scene->points.end();
-      ++it){
-    ::glVertex3d(it->x(), it->y(), it->z());
-  }
-  ::glEnd();
-  ::glDisable(GL_POINT_SMOOTH);
-
-  ::glEnable(GL_LIGHTING);
-  ::glBegin(GL_TRIANGLES);
-
-  ::glColor3f(0.2f, 1.0f, 0.2f);
-
-  std::list<Facet> facets;
-  scene->alpha_shape.get_alpha_shape_facets(std::back_inserter(facets), Alpha_shape_3::REGULAR);
-  
-  for(std::list<Facet>::iterator fit = facets.begin();
-      fit != facets.end();
-      ++fit) {
-    const Cell_handle& ch = fit->first;
-    const int index = fit->second;
-    
-    //const Vector_3& n = ch->normal(index); // must be unit vector
-    
-    const Point_3& a = ch->vertex((index+1)&3)->point();
-    const Point_3& b = ch->vertex((index+2)&3)->point();
-    const Point_3& c = ch->vertex((index+3)&3)->point();
-   
-    Vector_3 v = CGAL::unit_normal(a,b,c);
-
-
-    ::glNormal3d(v.x(),v.y(),v.z());
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-    ::glVertex3d(c.x(),c.y(),c.z());
-  }
-
-  
-  ::glEnd();
-
-}
-
-#include "Viewer.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.h b/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.h
deleted file mode 100644
index 65b42ad..0000000
--- a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Viewer.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include "typedefs.h"
-#include <QGLViewer/qglviewer.h>
-
-
-class Viewer : public QGLViewer {
-  Q_OBJECT
-
-  CGAL::Timer timer;
-  Scene* scene;
-
-  int nr_of_facets;
-public:
-  Viewer(QWidget* parent)
-    : QGLViewer(parent)
-  {}
-
-  void setScene(Scene* scene_)
-  {
-    scene = scene_;
-  }
-
-  void clear();
-
-public:
-  void draw();
-
-  void 
-  gl_draw_surface();
-
- public slots :
-
- void sceneChanged();
-   
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.cpp b/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.cpp
deleted file mode 100644
index c8c3f4c..0000000
--- a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Apollonius_graph_2.h>
-#include <CGAL/Apollonius_graph_hierarchy_2.h>
-#include <CGAL/Apollonius_graph_filtered_traits_2.h>
-#include <CGAL/point_generators_2.h>
-
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_real.hpp>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/ApolloniusGraphGraphicsItem.h>
-#include <CGAL/Qt/GraphicsViewCircleInput.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Apollonius_graph_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef K::Point_2 Point_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef CGAL::Apollonius_graph_filtered_traits_2<K,CGAL::Integral_domain_without_division_tag>  Gt;
-
-typedef Gt::Point_2                           Point_2;
-typedef K::Circle_2                         Circle_2;
-typedef Gt::Site_2                            Apollonius_site_2;
-typedef Gt::Site_2::Weight                    Weight;
-
-typedef CGAL::Apollonius_graph_2<Gt> Apollonius;
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Apollonius_graph_2
-{
-  Q_OBJECT
-  
-private:  
-  Apollonius ag; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::ApolloniusGraphGraphicsItem<Apollonius,K> * agi;
-  CGAL::Qt::GraphicsViewCircleInput<K> * ci;
-
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-  
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  agi = new CGAL::Qt::ApolloniusGraphGraphicsItem<Apollonius, K>(&ag);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   agi, SLOT(modelChanged()));
-
-  agi->setSitesPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  agi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(agi);
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-
-  ci = new CGAL::Qt::GraphicsViewCircleInput<K>(this, &scene);
-  QObject::connect(ci, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  scene.installEventFilter(ci);
-
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Apollonius_graph_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::pair<Point_2, double> center_and_sr;
-  if(CGAL::assign(center_and_sr, o)){
-    ag.insert(Apollonius_site_2(center_and_sr.first, sqrt(center_and_sr.second)));
-    emit(changed());
-  }
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  ag.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;  
-  Iso_rectangle_2 isor = convert(rect);
-  double width = isor.xmax() - isor.xmin();
-  
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::vector<Apollonius_site_2> points;
-  points.reserve(number_of_points);
-  boost::rand48 rng;
-  boost::uniform_real<> dist(0.005*width, 0.05*width);
-  boost::variate_generator<boost::rand48&, boost::uniform_real<> > radius(rng,dist);
-
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(Apollonius_site_2(*pg++,radius()));
-  }
-      ag.insert(points.begin(), points.end());
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  std::vector<K::Point_2> points;
-  while(ifs >> p) {
-    points.push_back(p);
-  }
-  //  ag.insert(points.begin(), points.end());
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  /*
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    for(Delaunay::Finite_vertices_iterator 
-          vit = ag.finite_vertices_begin(),
-          end = ag.finite_vertices_end();
-        vit!= end; ++vit)
-    {
-      ofs << vit->point() << std::endl;
-    }
-  }
-  */
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(agi->boundingRect());
-  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Apollonius_graph_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Apollonius_graph_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Apollonius_graph_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/CMakeLists.txt
deleted file mode 100644
index 914fdbb..0000000
--- a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Apollonius_graph_2_demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Apollonius_graph_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Apollonius_graph_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc )
-
-# The executable itself.
-add_executable  ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 )
-
-# Link with Qt libraries
-target_link_libraries( Apollonius_graph_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/algo.dat b/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/algo.dat
deleted file mode 100644
index 71fb3e1..0000000
--- a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/algo.dat
+++ /dev/null
@@ -1,9 +0,0 @@
-20.0 -20 5
-9 -9 15.
-1000 -1000 20
-10.0 5.0 5
-1.0 1.0 10
--10 -10 11
-95 67 33
--99 -100 31
-
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/hierarchy.dat b/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/hierarchy.dat
deleted file mode 100644
index 5de3093..0000000
--- a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/data/hierarchy.dat
+++ /dev/null
@@ -1,500 +0,0 @@
--199.259 28.7176 0.613542
-141.606 166.862 1.13775
--5.56519 -156.845 3.31008
-50.3311 161.726 1.07564
--64.7456 -87.8027 4.06628
-14.8532 105.665 2.20139
-76.5577 90.566 0.840065
--49.4694 41.2512 3.67553
--174.917 128.685 2.38958
-188.251 -109.254 1.15084
-16.9685 -57.0234 1.1601
--16.1697 -7.94008 0.430175
-26.9857 83.0797 2.86061
--11.288 -52.1136 0.989749
-100.909 33.9376 2.68043
-6.5738 -40.7596 0.366094
--102.86 135.351 3.82307
-138.391 -197.444 0.704697
-67.0764 96.5988 1.01824
-157.823 -112.234 0.871374
--99.2007 -20.1674 3.58348
-92.8592 72.6406 0.881359
--24.0611 107.055 3.71868
-123.825 -64.0966 1.07758
--42.2371 15.0832 4.83895
-117.003 -170.482 2.42112
-52.3544 -141.195 3.63537
-54.9108 164.65 2.86525
--48.4905 -178.974 1.20371
-39.2751 -97.515 0.676493
--180.892 -27.805 1.93648
-91.7483 -141.127 0.597223
--1.19714 -70.6179 2.79646
-134.706 -173.123 1.84428
--50.2105 -86.9171 3.81631
--20.693 -99.8014 2.77885
-38.112 93.8881 0.933284
-2.76229 -15.2827 4.11967
-23.7883 -186.062 1.01354
-126.273 -89.7657 4.00448
--101.532 -35.6463 4.24332
--42.6583 119.272 2.89018
-86.7238 167.05 0.375211
-113.6 -9.23294 4.55904
--173.317 138.309 1.43141
--73.1181 43.6142 3.67274
--179.23 -134.078 1.64915
-5.48731 -59.4149 4.18367
-19.4249 -129.841 1.98103
-129.659 -48.7584 1.05945
--105.987 -128.4 2.2903
--186.715 -188.935 4.25707
-180.336 42.2795 2.84112
--28.8974 72.2964 1.76112
--90.5882 37.0195 2.09466
-153.026 151.532 3.68069
--181.052 45.3517 3.94031
--40.4665 177.283 1.5089
-29.6921 111.977 4.25171
-180.934 -129.54 3.37245
--147.467 -44.7849 4.54762
--136.401 138.439 4.71368
-105.878 79.0047 4.46788
--21.8252 -93.7059 1.60666
--184.806 47.184 2.97431
-166.727 -185.243 2.38713
-12.0782 109.212 2.62399
--10.6384 24.4369 4.61816
--98.6612 145.149 2.48931
--28.2016 85.2863 2.25098
-127.013 -44.9173 2.90765
-65.4525 -81.108 3.70263
--55.5428 -104.013 2.52612
-50.7513 -146.583 4.7533
--102.065 -18.0503 4.94323
--87.3077 -180.106 4.52731
--178.096 10.865 2.17829
-46.3413 -179.216 4.54531
--8.50957 190.237 0.812045
--123.223 -10.6186 2.95952
-31.8595 169.46 2.04719
-150.751 2.0718 0.365349
--153.262 -101.717 2.17106
--99.845 100.372 0.305455
-82.1047 80.6358 1.52965
-101.999 76.0943 2.9383
--87.1359 38.2792 3.2121
--66.3517 -187.458 1.29137
--76.115 176.167 3.685
-113.266 -158.869 4.64471
-82.7263 77.8927 2.54295
--115.202 -158.332 1.92735
--16.9193 -129.104 2.51157
--116.548 44.5811 3.76351
-164.088 69.0175 2.28982
-40.1826 191.389 1.06481
--121.538 26.4532 2.47561
--108.996 -116.578 4.14621
--132.829 -13.2689 0.694777
--91.698 -118.469 4.61061
-186.195 -146.892 3.14469
--172.137 56.5441 4.20466
--101.241 -189.268 1.49317
-143.34 11.6578 2.53633
-12.3573 -87.2613 2.08743
-3.74654 95.9243 0.0897139
--169.8 181.109 1.07049
--86.3787 -20.842 2.20804
-100.352 -89.1449 3.04768
-181.883 -33.5627 4.40146
--165.009 -64.7142 4.22889
-91.5355 186.861 4.57717
-102.267 123.234 0.811658
--86.0748 -157.313 0.103406
-26.6639 45.5936 2.75787
--77.4118 -187.412 0.304705
--96.3027 -180.235 0.682201
-82.8553 -94.5959 2.10247
-193.71 82.0472 0.856872
--39.8523 -74.1384 0.630415
-95.4336 -122.022 1.06781
-82.2942 -183.711 4.712
-5.52791 182.463 3.49034
-48.2153 -152.604 4.91441
--106.191 -144.332 2.74771
--93.6031 76.298 4.28006
--73.8378 100.674 0.576277
-31.5663 155.25 4.11197
--86.3865 -76.5521 4.03335
-39.4751 -8.0024 1.0352
-117.453 42.4308 4.72811
-133.742 127.855 3.25679
-116.205 104.816 0.825892
-163.601 -15.957 3.92858
--180.731 -22.8043 0.101193
-95.5669 197.012 1.43116
--3.75869 139.417 3.00818
--48.5082 185.519 0.902761
-74.9397 114.477 2.32293
--133.063 37.1446 0.316367
-109.368 119.96 4.28453
-37.2235 98.2094 3.45631
--57.961 -41.2472 2.40887
-126.082 24.8242 1.95388
--96.7223 -60.8892 2.19474
--99.71 -52.7938 0.889331
--160.293 61.6986 3.34235
--174.774 -97.6468 0.235995
-139.703 -25.4259 3.67274
--23.1525 160.408 4.50946
--103.192 185.718 3.37656
-195.017 128.48 1.34185
--46.2301 4.9848 3.11734
-178.594 197.695 2.19336
--82.2952 -45.9948 3.48434
-64.9111 129.585 4.73796
--73.3903 -199.269 0.234298
-28.9629 68.119 0.549627
--196.463 86.9986 4.79591
-163.945 -19.1822 2.00651
-149.663 -58.4257 3.2166
-78.1433 -188.301 3.15432
--116.872 -80.9531 0.0764394
--119.177 168.434 4.80886
-34.8278 -56.0969 1.28018
--35.5875 -177.35 4.59156
--34.8563 -198.313 1.17418
--166.737 -179.569 4.03622
-120.261 -135.599 4.08043
--98.9209 -151.926 3.62975
-42.6534 8.59436 3.00054
-54.3523 -134.077 1.47733
-173.399 118.268 2.51643
-141.833 124.383 3.52671
--114.264 109.092 1.46206
--91.6138 -188.494 3.51722
--89.927 178.831 0.581516
--69.4964 -127.234 0.9973
--5.09564 195.664 0.000566293
-42.9782 122.098 1.26406
--148.427 12.4784 4.29722
--82.5049 -147.478 2.47663
--164.237 -29.2921 2.14412
-160.146 172.022 1.41703
-69.238 54.1596 2.48874
-80.7442 171.125 3.84356
-59.5755 52.502 0.219476
-132.342 99.0233 1.85077
-128.005 178.807 4.28708
-50.1037 178.853 2.3243
--137.418 -120.023 2.96896
--84.8963 -176.245 4.43765
-85.8117 21.8849 4.88468
-57.8341 193.414 4.38651
--88.0063 -93.2232 2.75198
--116.882 105.876 1.26129
-135.62 13.3607 4.50598
-34.6435 30.9187 3.66025
-13.4508 178.98 2.76032
--7.69665 121.946 0.886613
-72.2804 -92.1095 1.66889
-96.0352 145.407 3.10769
--82.0799 100.419 1.68033
--88.6656 91.1938 4.90326
-18.1112 42.1145 1.30318
--76.0132 -137.727 2.34216
-137.347 -36.8239 1.53741
--31.7339 -76.3455 4.47045
--52.7535 -183.526 2.13859
--130.807 37.2997 4.54238
--22.9166 108.229 2.94588
--77.5094 -158.26 1.64632
--177.09 90.3548 3.12033
-114.104 -175.219 4.51201
--43.7819 -182.958 2.23839
-18.4912 -78.7035 3.78823
-181.667 108.669 3.00507
--94.6783 -168.338 0.108398
--78.2039 189.298 1.94898
-159.096 -39.6151 2.81389
-67.3245 -76.2247 0.0274314
-109.064 159.446 1.55856
--0.580817 -108.848 1.84494
-24.2006 140.778 0.771231
-41.2427 101.738 2.72396
-162.539 -119.19 0.455097
-71.2081 183.868 0.225937
-102.87 24.2739 1.54246
-92.1677 32.9458 3.06491
--147.447 188.864 2.55361
--23.6721 13.9753 0.895164
--64.2261 16.1698 4.75847
-26.9257 140.855 2.25121
--32.2964 -111.55 0.0537161
--130.558 -49.8517 3.06925
--49.7482 168.065 2.60099
--65.88 -195.527 0.99109
-158.394 -177.452 4.77696
--8.66023 -54.0558 3.42906
--19.7961 191.137 4.08597
-194.179 -4.57438 1.29007
-10.349 67.0388 2.98724
--48.7961 47.7163 0.823812
-39.6537 -172.187 2.92011
-189.802 -167.89 3.78813
-157.867 77.6502 0.666279
-162.339 -114.271 2.34278
-184.887 -34.9835 1.8227
--69.1688 -52.8265 4.21445
--78.0318 -178.502 1.467
-117.394 148.376 1.39424
--15.5675 -148.419 4.0236
--167.851 90.5603 0.913651
--140.038 156.465 3.90932
--107.928 -9.92617 3.78185
-169.722 -106.876 3.25518
--144.548 -53.5733 2.78443
-20.4682 133.849 2.59551
-167.642 -120.335 4.2309
-189.14 -183.179 0.755505
-137.516 -65.8187 4.72293
-189.097 45.7205 2.02833
-79.657 -32.3914 2.43019
-36.1223 40.7007 3.17972
--173.804 -46.5535 4.33062
--80.6796 -144.006 3.95215
-65.7471 116.409 4.64529
--0.403869 -60.8368 2.40114
-79.2614 146.804 1.99667
-96.0828 85.2766 1.86092
--169.736 145.717 1.07986
-75.9847 123.551 0.943572
--156.407 -114.182 4.43928
-84.294 80.2336 2.39081
--162.26 -65.3891 2.71826
--106.265 -118.94 4.20977
--189.856 197.232 2.53161
--50.6931 168.856 0.0265606
--103.889 -39.0528 3.51733
-181.388 120.68 2.21836
-127.105 -130.446 2.59667
-50.656 -44.0573 1.04647
-136.474 31.4285 1.59139
-16.7076 -13.4288 0.145065
-151.319 177.836 0.616821
--167.621 -4.70256 1.78851
--170.389 -67.921 1.9153
-198.467 134.608 3.78164
--40.5861 136.733 4.98303
--119.906 18.1189 4.75038
--50.3519 195.588 3.83919
-105.591 3.32129 1.97239
--62.9807 87.0392 1.17831
-123.591 -185.649 3.88716
-101.427 -174.044 3.27864
--103.276 -124.699 3.68337
-28.8033 18.3818 4.05351
--36.5889 171.606 4.03435
--99.8563 74.1371 1.02702
-118.263 72.7794 2.0282
-113.851 52.8096 3.8988
--82.8281 -40.0555 2.71869
--195.789 117.735 4.43143
--181.438 -188 3.47631
--155.483 122.973 2.24414
--80.1812 -14.736 3.4532
-138.201 -120.066 1.31324
-109.807 -195.785 3.35588
--16.0563 126.963 4.60767
--143.277 -190.876 3.58595
-109.533 -28.6197 2.50909
--130.523 -116.716 3.97373
-187.213 100.779 4.02637
-199.213 55.2933 4.25839
-122.186 -66.602 4.81486
--92.5501 112.929 1.31259
--12.6162 -10.8148 0.540102
--8.40121 94.2442 4.41268
--81.4385 -37.2857 1.71198
--72.3142 -68.6719 2.42102
-99.0661 -181.796 1.29018
-182.35 18.9313 2.15864
-83.1297 -63.17 1.9988
--61.577 -141.06 1.98896
-71.821 199.611 1.01629
--15.2495 184.8 2.35941
-173.936 -110.192 4.70171
-68.1799 -66.9843 2.09669
--169.106 -113.97 3.57871
--37.7777 22.9888 0.174783
--19.5733 -183.33 3.91311
-199.358 -80.1157 3.69249
--63.8121 92.5755 2.23161
--4.87228 -147.521 3.9619
--5.26103 11.5961 2.35966
--20.461 92.899 4.66904
-69.3466 -118.348 4.34324
--197.638 -142.212 2.69549
--111.607 25.5236 3.08166
-111.382 -88.1795 0.109442
-128.052 -74.1968 2.36478
--152.064 -161.148 2.35675
-140.512 134.251 4.0591
-192.991 -87.22 1.4982
-4.58696 -170.268 3.93243
--102.514 18.5048 1.17667
--20.8624 -7.97184 4.5435
-36.9259 -60.5128 4.57303
--137.55 155.126 0.677942
--25.73 1.65912 4.57021
-100.073 10.4145 3.67086
-138.925 199.597 4.27006
-73.1762 -11.8635 3.52645
-185.956 -87.1356 3.43884
--184.312 32.72 0.996175
-34.193 -52.6854 2.21475
--173.779 41.4482 4.45397
--34.2916 4.92842 2.41554
--79.1656 -29.229 3.19616
-122.494 25.0063 0.374536
--67.092 -9.37676 4.12545
--67.4954 -115.708 3.36201
-120.641 -174.103 1.77672
--166.495 108.013 1.60117
-66.2255 -16.8802 1.79727
--186.46 62.8138 4.72469
-54.9883 -160.006 0.0524522
--140.083 196.311 2.12381
-30.6877 -10.4454 3.63424
--144.306 -154.752 2.66541
-46.3173 -124.79 4.32676
-130.609 -194.754 0.983063
-156.506 74.2077 4.99108
-64.5186 -183.655 0.409895
--152.362 -55.5612 3.73771
-110.452 88.2207 3.90696
-150.446 66.1956 2.09432
-146.757 70.3918 2.84328
--63.6882 -159.704 0.726874
--18.4407 131.035 1.42305
-56.7697 -55.7323 4.50202
-62.0162 -109.592 3.63463
--63.7761 -30.9468 3.09095
--47.4311 -31.6606 1.39743
-97.0077 1.13095 1.99291
--14.7717 -99.8519 0.873568
--148.576 -187.295 0.254143
-121.816 -19.7493 4.58861
-162.112 -192.287 1.29251
-93.1475 -134.137 3.562
--162.585 -20.2932 1.77162
--72.1766 -60.132 0.0468209
-96.8767 -169.362 1.74962
--134.784 77.9146 3.65673
-66.347 189.709 2.36933
-166.495 -50.8575 4.68468
-179.2 19.0279 0.327481
--40.549 39.3593 4.35018
--32.836 6.44796 3.87658
-33.0268 109.848 2.54092
--187.266 -5.19188 3.00861
--47.3983 136.538 4.60641
--16.7599 140.283 3.31736
--138.845 -119.747 4.13256
--149.136 172.791 2.4619
-0.00640806 -37.6626 2.04309
--180.966 -62.8882 1.78309
-58.3937 -36.6897 3.77623
--135.158 -88.6754 0.865781
-174.69 -178.549 3.77862
--30.5019 24.7249 3.93779
--93.9643 -134.586 0.845307
--153.681 -166.074 3.13581
--73.4283 99.3156 3.90024
--100.637 29.9208 4.53604
-61.7003 -173.127 2.03612
-198.812 -9.67982 2.27405
--37.8776 132.968 0.50397
-73.447 35.0661 1.31449
-94.898 104.329 0.998115
--80.3772 6.61785 3.11684
--14.9632 -78.3592 4.44229
-18.9633 -10.7346 0.0212741
--81.7211 -159.87 1.60342
-148.2 152.149 2.84546
-175.073 115.032 1.11671
--34.6071 -122.078 1.10186
--101.639 59.8459 3.12839
-133.427 100.164 1.54648
-37.7553 -194.677 0.232704
--155.627 -114.828 1.72799
--33.9861 134.519 4.04095
-155.279 89.9022 1.77799
-195.409 91.6041 3.25648
-147.559 -180.122 2.60897
-62.591 47.5143 2.29738
-140.513 136.851 4.36479
-0.358935 -175 0.594302
--99.4775 75.2715 4.76214
--94.1548 198.99 2.73408
--8.98291 -182.394 3.28874
--74.4637 -44.1547 0.363914
--184.561 -120.879 4.8049
-107.043 21.3604 4.74752
-126.92 -118.121 4.092
--25.5652 90.5964 2.37439
--88.714 -125.613 1.6308
--63.7139 -176.429 4.13529
--188.442 -128.885 0.391819
--189.452 -147.914 1.71488
--171.846 70.8118 4.1026
--16.001 -66.089 0.671801
-63.1202 -36.9759 0.864783
--115.519 -52.5835 4.70282
--33.6409 -72.7818 3.78932
--143.044 -145.422 0.969758
--68.6574 44.5294 2.36083
--45.0868 174.994 4.06441
-26.028 105.817 4.20888
-78.1137 137.162 4.34072
--51.0745 -125.647 4.69265
-82.8366 -197.439 1.99263
--154.139 -143.695 0.281635
--6.72277 -74.5127 1.33764
-120.495 -98.2873 3.41713
-175.074 -195.142 4.12907
-19.6032 -117.561 0.770857
--5.40327 71.3057 2.70727
--99.5867 -3.54152 0.532623
--162.425 -66.8311 4.00904
--88.0717 -119.573 0.870613
--85.5111 -144.161 4.40607
--29.2065 15.2491 4.97933
-96.2809 37.7799 2.39529
-197.994 144.791 1.40149
--197.148 18.1617 1.08991
--114.709 -51.5123 3.83495
-156.597 10.1562 1.26741
--46.9446 -173.262 2.52257
-86.2243 -130.652 2.99227
-166.651 190.071 4.39137
--177.51 -140.28 0.822481
-37.7388 -187.794 2.9574
--124.481 -189.448 1.66091
--179.69 2.17599 1.63583
-38.4717 114.295 1.67148
-186.959 -198.512 2.73762
--2.88438 108.283 2.19508
-23.8536 -190.324 4.10827
-93.2015 11.4819 2.68608
-83.2728 -149.137 2.26922
-142.993 -197.827 2.55034
-155.199 -132.029 0.522073
-165.752 104.563 1.46606
--32.0722 -162.564 1.71993
--117.777 -31.6971 4.70083
--116.29 102.021 4.53782
-191.994 -78.9689 2.00176
--198.33 96.6377 4.79993
-13.1517 25.2997 3.46495
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp
deleted file mode 100644
index 91ff6e8..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#include "ArrangementDemoPropertiesDialog.h"
-#include "ui_ArrangementDemoPropertiesDialog.h"
-#include "ArrangementDemoWindow.h"
-#include "PropertyValueDelegate.h"
-#include "DeleteCurveMode.h"
-#include "ArrangementDemoGraphicsView.h"
-
-ArrangementDemoPropertiesDialog::
-ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_,
-                                 Qt::WindowFlags f ) :
-  QDialog( parent_, f ),
-  parent( parent_ ),
-  ui( new Ui::ArrangementDemoPropertiesDialog )
-{
-  this->setupUi( );
-}
-
-QVariant ArrangementDemoPropertiesDialog::property( int index )
-{
-  // return invalid variant if something goes wrong
-  QVariant res;
-  if ( index < 0 || index >= this->ui->tableWidget->rowCount( ) )
-  {
-    return res;
-  }
-
-  QTableWidgetItem* item = this->ui->tableWidget->item( index, 0 );
-  if ( item == 0 )
-  {
-    return res;
-  }
-
-  // return user data, if it is set
-  QVariant myData = item->data( Qt::UserRole );
-  if ( qVariantCanConvert< QColor >( myData ) ||
-       qVariantCanConvert< DeleteCurveMode >( myData ) )
-  {
-    return myData;
-  }
-  else
-  {
-    res = item->data( Qt::DisplayRole );
-  }
-
-  return res;
-}
-
-void ArrangementDemoPropertiesDialog::setupUi( )
-{
-  this->ui->setupUi( this );
-  PropertyValueDelegate* myDelegate = new PropertyValueDelegate;
-  this->ui->tableWidget->setItemDelegate( myDelegate );
-
-  // populate the table widget with items
-  QTableWidgetItem* edgeColorItem = new QTableWidgetItem;
-  QTableWidgetItem* vertexColorItem = new QTableWidgetItem;
-  QTableWidgetItem* edgeWidthItem = new QTableWidgetItem;
-  QTableWidgetItem* vertexRadiusItem = new QTableWidgetItem;
-  QTableWidgetItem* envelopeEdgeColorItem = new QTableWidgetItem;
-  QTableWidgetItem* envelopeVertexColorItem = new QTableWidgetItem;
-  QTableWidgetItem* envelopeEdgeWidthItem = new QTableWidgetItem;
-  QTableWidgetItem* envelopeVertexRadiusItem = new QTableWidgetItem;
-  QTableWidgetItem* verticalRayEdgeColorItem = new QTableWidgetItem;
-  QTableWidgetItem* verticalRayEdgeWidthItem = new QTableWidgetItem;
-  QTableWidgetItem* deleteCurveModeItem = new QTableWidgetItem;
-  QTableWidgetItem* gridSizeItem = new QTableWidgetItem;
-  QTableWidgetItem* gridColorItem = new QTableWidgetItem;
-
-  this->ui->tableWidget->setItem( int(EDGE_COLOR_KEY), 0, edgeColorItem );
-  this->ui->tableWidget->setItem( int(VERTEX_COLOR_KEY), 0, vertexColorItem );
-  this->ui->tableWidget->setItem( int(EDGE_WIDTH_KEY), 0, edgeWidthItem );
-  this->ui->tableWidget->setItem( int(VERTEX_RADIUS_KEY), 0, vertexRadiusItem );
-  this->ui->tableWidget->setItem( int(ENVELOPE_EDGE_COLOR_KEY), 0,
-                                  envelopeEdgeColorItem );
-  this->ui->tableWidget->setItem( int(ENVELOPE_VERTEX_COLOR_KEY), 0,
-                                  envelopeVertexColorItem );
-  this->ui->tableWidget->setItem( int(ENVELOPE_EDGE_WIDTH_KEY), 0,
-                                  envelopeEdgeWidthItem );
-  this->ui->tableWidget->setItem( int(ENVELOPE_VERTEX_RADIUS_KEY), 0,
-                                  envelopeVertexRadiusItem );
-  this->ui->tableWidget->setItem( int(VERTICAL_RAY_EDGE_COLOR_KEY), 0,
-                                  verticalRayEdgeColorItem );
-  this->ui->tableWidget->setItem( int(VERTICAL_RAY_EDGE_WIDTH_KEY), 0,
-                                  verticalRayEdgeWidthItem );
-  this->ui->tableWidget->setItem( int(DELETE_CURVE_MODE_KEY), 0,
-                                  deleteCurveModeItem );
-  this->ui->tableWidget->setItem( int(GRID_SIZE_KEY), 0, gridSizeItem );
-  this->ui->tableWidget->setItem( int(GRID_COLOR_KEY), 0, gridColorItem );
-
-  // fill in the items with data
-  this->updateUi( );
-}
-
-void ArrangementDemoPropertiesDialog::updateUi( )
-{
-  if ( this->parent == NULL )
-  {
-    return;
-  }
-  ArrangementDemoTabBase* currentTab = this->parent->getCurrentTab( );
-  if ( currentTab == NULL )
-  {
-    return;
-  }
-  CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
-  if ( agi == NULL )
-  {
-    return;
-  }
-
-  ArrangementDemoGraphicsView* view = currentTab->getView( );
-  EnvelopeCallbackBase* envelopeCallback = currentTab->getEnvelopeCallback( );
-  VerticalRayShootCallbackBase* verticalRayShootCallback =
-    currentTab->getVerticalRayShootCallback( );
-
-  QPen vertexPen = agi->getVerticesPen( );
-  QPen edgePen = agi->getEdgesPen( );
-  QBrush vertexPenBrush = vertexPen.brush( );
-  QBrush edgePenBrush = edgePen.brush( );
-  QColor vertexColor = vertexPenBrush.color( );
-  QColor edgeColor = edgePenBrush.color( );
-  unsigned int edgeWidth = edgePen.width( );
-  unsigned int vertexRadius = vertexPen.width( );
-  unsigned int gridSize = view->getGridSize( );
-  QColor gridColor = view->getGridColor( );
-  unsigned int envelopeEdgeWidth = envelopeCallback->getEnvelopeEdgeWidth( );
-  unsigned int envelopeVertexRadius =
-    envelopeCallback->getEnvelopeVertexRadius( );
-  QColor envelopeEdgeColor = envelopeCallback->getEnvelopeEdgeColor( );
-  QColor envelopeVertexColor = envelopeCallback->getEnvelopeVertexColor( );
-  unsigned int verticalRayEdgeWidth = verticalRayShootCallback->edgeWidth( );
-  QColor verticalRayEdgeColor = verticalRayShootCallback->edgeColor( );
-
-  QTableWidgetItem* edgeColorItem =
-    this->ui->tableWidget->item( int(EDGE_COLOR_KEY), 0 );
-  QTableWidgetItem* edgeWidthItem =
-    this->ui->tableWidget->item( int(EDGE_WIDTH_KEY), 0 );
-  QTableWidgetItem* vertexColorItem =
-    this->ui->tableWidget->item( int(VERTEX_COLOR_KEY), 0 );
-  QTableWidgetItem* vertexRadiusItem =
-    this->ui->tableWidget->item( int(VERTEX_RADIUS_KEY), 0 );
-  QTableWidgetItem* deleteCurveModeItem =
-    this->ui->tableWidget->item( int(DELETE_CURVE_MODE_KEY), 0 );
-  QTableWidgetItem* gridSizeItem =
-    this->ui->tableWidget->item( int( GRID_SIZE_KEY ), 0 );
-  QTableWidgetItem* gridColorItem =
-    this->ui->tableWidget->item( int( GRID_COLOR_KEY ), 0 );
-  QTableWidgetItem* envelopeEdgeColorItem =
-    this->ui->tableWidget->item( int(ENVELOPE_EDGE_COLOR_KEY), 0 );
-  QTableWidgetItem* envelopeEdgeWidthItem =
-    this->ui->tableWidget->item( int(ENVELOPE_EDGE_WIDTH_KEY), 0 );
-  QTableWidgetItem* envelopeVertexColorItem =
-    this->ui->tableWidget->item( int(ENVELOPE_VERTEX_COLOR_KEY), 0 );
-  QTableWidgetItem* envelopeVertexRadiusItem =
-    this->ui->tableWidget->item( int(ENVELOPE_VERTEX_RADIUS_KEY), 0 );
-  QTableWidgetItem* verticalRayEdgeColorItem =
-    this->ui->tableWidget->item( int(VERTICAL_RAY_EDGE_COLOR_KEY), 0 );
-  QTableWidgetItem* verticalRayEdgeWidthItem =
-    this->ui->tableWidget->item( int(VERTICAL_RAY_EDGE_WIDTH_KEY), 0 );
-
-  // arrangement properties
-  edgeColorItem->setData( Qt::DisplayRole, edgeColor );
-  edgeColorItem->setData( Qt::DecorationRole, edgeColor );
-  edgeColorItem->setData( Qt::UserRole, QVariant::fromValue( edgeColor ) );
-
-  edgeWidthItem->setData( Qt::DisplayRole, edgeWidth );
-
-  vertexColorItem->setData( Qt::DisplayRole, vertexColor );
-  vertexColorItem->setData( Qt::DecorationRole, vertexColor );
-  vertexColorItem->setData( Qt::UserRole, QVariant::fromValue( vertexColor ) );
-
-  vertexRadiusItem->setData( Qt::DisplayRole, vertexRadius );
-
-  // envelope properties
-  envelopeEdgeColorItem->setData( Qt::DisplayRole, envelopeEdgeColor );
-  envelopeEdgeColorItem->setData( Qt::DecorationRole, envelopeEdgeColor );
-  envelopeEdgeColorItem->setData( Qt::UserRole,
-                                  QVariant::fromValue( envelopeEdgeColor ) );
-
-  envelopeEdgeWidthItem->setData( Qt::DisplayRole, envelopeEdgeWidth );
-
-  envelopeVertexColorItem->setData( Qt::DisplayRole, envelopeVertexColor );
-  envelopeVertexColorItem->setData( Qt::DecorationRole, envelopeVertexColor );
-  envelopeVertexColorItem->setData( Qt::UserRole,
-                                    QVariant::fromValue(envelopeVertexColor));
-
-  envelopeVertexRadiusItem->setData( Qt::DisplayRole, envelopeVertexRadius );
-
-  // vertical ray properties
-  verticalRayEdgeColorItem->setData( Qt::DisplayRole, verticalRayEdgeColor );
-  verticalRayEdgeColorItem->setData( Qt::DecorationRole, verticalRayEdgeColor );
-  verticalRayEdgeColorItem->setData( Qt::UserRole,
-                                     QVariant::fromValue(verticalRayEdgeColor));
-
-  verticalRayEdgeWidthItem->setData( Qt::DisplayRole, verticalRayEdgeWidth );
-
-  // delete curve properties
-  DeleteCurveMode deleteCurveMode;
-  deleteCurveModeItem->setData( Qt::DisplayRole,
-                                DeleteCurveMode::ToString( deleteCurveMode ) );
-  deleteCurveModeItem->setData( Qt::UserRole,
-                                QVariant::fromValue( deleteCurveMode ) );
-
-  // grid properties
-  gridSizeItem->setData( Qt::DisplayRole, gridSize );
-
-  gridColorItem->setData( Qt::DisplayRole, gridColor );
-  gridColorItem->setData( Qt::DecorationRole, gridColor );
-  gridColorItem->setData( Qt::UserRole, QVariant::fromValue( gridColor ) );
-
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp
deleted file mode 100644
index ecb50a7..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp
+++ /dev/null
@@ -1,1216 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#include "ArrangementDemoWindow.h"
-#include "NewTabDialog.h"
-#include "OverlayDialog.h"
-#include "ArrangementDemoPropertiesDialog.h"
-#include "ArrangementDemoTab.h"
-#include "Conic_reader.h"
-#include "DeleteCurveMode.h"
-#include "ArrangementGraphicsItem.h"
-
-#include <boost/math/special_functions/fpclassify.hpp>
-
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QMessageBox>
-#include <QColorDialog>
-
-#include <CGAL/IO/Arr_with_history_iostream.h>
-#include <CGAL/IO/Arr_text_formatter.h>
-#include <CGAL/IO/Arr_with_history_text_formatter.h>
-
-ArrangementDemoWindow::ArrangementDemoWindow(QWidget* parent) :
-  CGAL::Qt::DemosMainWindow( parent ),
-  lastTabIndex(static_cast<unsigned int>(-1)),
-  ui( new Ui::ArrangementDemoWindow )
-{
-  this->setupUi( );
-
-  // set up the demo window
-  // ArrangementDemoTabBase* demoTab =
-  this->makeTab( SEGMENT_TRAITS );
-  this->setupStatusBar( );
-  this->setupOptionsMenu( );
-  this->addAboutDemo( ":/help/about.html" );
-  this->addAboutCGAL( );
-
-  // set up callbacks
-  QObject::connect( this->modeGroup, SIGNAL( triggered( QAction* ) ),
-                    this, SLOT( updateMode( QAction* ) ) );
-  QObject::connect( this->envelopeGroup, SIGNAL( triggered( QAction* ) ),
-                    this, SLOT( updateEnvelope( QAction* ) ) );
-  QObject::connect( this->snapGroup, SIGNAL( triggered( QAction* ) ),
-                    this, SLOT( updateSnapping( QAction* ) ) );
-  QObject::connect( this->conicTypeGroup, SIGNAL( triggered( QAction* ) ),
-                    this, SLOT( updateConicType( QAction* ) ) );
-}
-
-ArrangementDemoWindow::~ArrangementDemoWindow( )
-{
-}
-
-ArrangementDemoTabBase* ArrangementDemoWindow::makeTab( TraitsType tt )
-{
-  static int tabLabelCounter = 1;
-  QString tabLabel;
-
-  ArrangementDemoTabBase* demoTab;
-  Seg_arr* seg_arr;
-  Pol_arr* pol_arr;
-  Conic_arr* conic_arr;
-  Lin_arr* lin_arr;
-  Arc_arr* arc_arr;
-  // Alg_seg_arr* alg_seg_arr;
-  CGAL::Object arr;
-
-  switch ( tt )
-  {
-   default:
-   case SEGMENT_TRAITS:
-    seg_arr = new Seg_arr;
-    demoTab = new ArrangementDemoTab< Seg_arr >( seg_arr, 0 );
-    arr = CGAL::make_object( seg_arr );
-    tabLabel = QString( "%1 - Segment" ).arg( tabLabelCounter++ );
-    break;
-   case POLYLINE_TRAITS:
-    pol_arr = new Pol_arr;
-    demoTab = new ArrangementDemoTab< Pol_arr >( pol_arr, 0 );
-    arr = CGAL::make_object( pol_arr );
-    tabLabel = QString( "%1 - Polyline" ).arg( tabLabelCounter++ );
-    break;
-   case CONIC_TRAITS:
-    conic_arr = new Conic_arr;
-    demoTab = new ArrangementDemoTab< Conic_arr >( conic_arr, 0 );
-    arr = CGAL::make_object( conic_arr );
-    tabLabel = QString( "%1 - Conic" ).arg( tabLabelCounter++ );
-    break;
-   case LINEAR_TRAITS:
-    lin_arr = new Lin_arr;
-    demoTab = new ArrangementDemoTab< Lin_arr >( lin_arr, 0 );
-    arr = CGAL::make_object( lin_arr );
-    tabLabel = QString( "%1 - Linear" ).arg( tabLabelCounter++ );
-    break;
-   case CIRCULAR_ARC_TRAITS:
-    arc_arr = new Arc_arr;
-    demoTab = new ArrangementDemoTab< Arc_arr >( arc_arr, 0 );
-    arr = CGAL::make_object( arc_arr );
-    tabLabel = QString( "%1 - Circular Arc" ).arg( tabLabelCounter++ );
-    break;
-   // case ALGEBRAIC_TRAITS:
-   //  alg_seg_arr = new Alg_seg_arr;
-   //  demoTab = new ArrangementDemoTab< Alg_seg_arr >( alg_seg_arr, 0 );
-   //  arr = CGAL::make_object( alg_seg_arr );
-   //  tabLabel = QString( "%1 - Algebraic" ).arg( tabLabelCounter++ );
-   //  break;
-  }
-
-  this->arrangements.push_back( arr );
-  this->tabs.push_back( demoTab );
-
-  QGraphicsView* view = demoTab->getView( );
-  this->addNavigation( view );
-  this->ui->tabWidget->addTab( demoTab, tabLabel );
-  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
-  this->ui->tabWidget->setCurrentWidget( demoTab );
-
-  this->resetCallbackState( this->ui->tabWidget->currentIndex( ) );
-  this->removeCallback( this->ui->tabWidget->currentIndex( ) );
-  this->updateMode( this->modeGroup->checkedAction( ) );
-  this->updateFillColorSwatch( );
-
-  return demoTab;
-}
-
-ArrangementDemoTabBase* ArrangementDemoWindow::getTab( unsigned int tabIndex )
-  const
-{
-  if (tabIndex > this->tabs.size()) return NULL;
-  return this->tabs[tabIndex];
-}
-
-ArrangementDemoTabBase* ArrangementDemoWindow::getCurrentTab( ) const
-{
-  int currentIndex = this->ui->tabWidget->currentIndex( );
-  if ( currentIndex == -1 )
-    return NULL;
-
-  ArrangementDemoTabBase* res = this->tabs[ currentIndex ];
-  return res;
-}
-
-std::vector< QString > ArrangementDemoWindow::getTabLabels( ) const
-{
-  std::vector< QString > res;
-  for ( int i = 0; i < this->ui->tabWidget->count( ); ++i )
-  {
-    res.push_back( this->ui->tabWidget->tabText( i ) );
-  }
-  return res;
-}
-
-std::vector< CGAL::Object > ArrangementDemoWindow::getArrangements( ) const
-{
-  std::vector< CGAL::Object > res;
-  for ( unsigned int i = 0; i < this->arrangements.size( ); ++i )
-  {
-    res.push_back( this->arrangements[ i ] );
-  }
-  return res;
-}
-
-void ArrangementDemoWindow::setupUi( )
-{
-  this->ui->setupUi( this );
-
-  this->modeGroup = new QActionGroup( this );
-  this->modeGroup->addAction( this->ui->actionDrag );
-  this->modeGroup->addAction( this->ui->actionInsert );
-  this->modeGroup->addAction( this->ui->actionDelete );
-  this->modeGroup->addAction( this->ui->actionPointLocation );
-  this->modeGroup->addAction( this->ui->actionRayShootingUp );
-  this->modeGroup->addAction( this->ui->actionRayShootingDown );
-  this->modeGroup->addAction( this->ui->actionMerge );
-  this->modeGroup->addAction( this->ui->actionSplit );
-  this->modeGroup->addAction( this->ui->actionFill );
-  this->activeModes.push_back( this->ui->actionInsert );
-
-  this->envelopeGroup = new QActionGroup( this );
-  this->envelopeGroup->addAction( this->ui->actionLowerEnvelope );
-  this->envelopeGroup->addAction( this->ui->actionUpperEnvelope );
-  this->envelopeGroup->setExclusive( false );
-
-  this->snapGroup = new QActionGroup( this );
-  this->snapGroup->addAction( this->ui->actionSnapMode );
-  this->snapGroup->addAction( this->ui->actionGridSnapMode );
-  this->snapGroup->setExclusive( false );
-  this->ui->actionGridSnapMode->setEnabled( false );
-
-  this->conicTypeGroup = new QActionGroup( this );
-  this->conicTypeGroup->addAction( this->ui->actionConicSegment );
-  this->conicTypeGroup->addAction( this->ui->actionConicCircle );
-  this->conicTypeGroup->addAction( this->ui->actionConicEllipse );
-  this->conicTypeGroup->addAction( this->ui->actionConicThreePoint );
-  this->conicTypeGroup->addAction( this->ui->actionConicFivePoint );
-  this->conicTypeGroup->addAction( this->ui->actionCurveRay );
-  this->conicTypeGroup->addAction( this->ui->actionCurveLine );
-
-  this->updateFillColorSwatch( );
-}
-
-void ArrangementDemoWindow::updateMode( QAction* newMode )
-{
-  // QWidget* widget = this->ui->tabWidget->currentWidget( );
-  // ArrangementDemoTabBase* demoTab =
-  //   static_cast< ArrangementDemoTabBase* >( widget );
-  const unsigned int TabIndex = this->ui->tabWidget->currentIndex( );
-  if (TabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* activeTab = this->tabs[ TabIndex ];
-  QGraphicsScene* activeScene = activeTab->getScene( );
-  QGraphicsView* activeView = activeTab->getView( );
-
-  this->resetCallbackState( TabIndex );
-  this->removeCallback( TabIndex );
-
-  // update the active mode
-  this->activeModes.at( 0 ) = newMode;
-
-  // hook up the new active mode
-  if ( newMode == this->ui->actionInsert )
-  {
-    activeScene->installEventFilter( activeTab->getCurveInputCallback( ) );
-  }
-  else if ( newMode == this->ui->actionDrag )
-  {
-    activeView->setDragMode( QGraphicsView::ScrollHandDrag );
-  }
-  else if ( newMode == this->ui->actionDelete )
-  {
-    activeScene->installEventFilter( activeTab->getDeleteCurveCallback( ) );
-  }
-  else if ( newMode == this->ui->actionPointLocation )
-  {
-    activeScene->installEventFilter( activeTab->getPointLocationCallback( ) );
-  }
-  else if ( newMode == this->ui->actionRayShootingUp )
-  {
-    // -y is up for Qt, so we shoot down
-    activeTab->getVerticalRayShootCallback( )->setShootingUp( true );
-    activeScene->installEventFilter( activeTab->getVerticalRayShootCallback());
-  }
-  else if ( newMode == this->ui->actionRayShootingDown )
-  {
-    // the bottom of the viewport for Qt is +y, so we shoot up
-    activeTab->getVerticalRayShootCallback( )->setShootingUp( false );
-    activeScene->installEventFilter( activeTab->getVerticalRayShootCallback());
-  }
-  else if ( newMode == this->ui->actionMerge )
-  {
-    activeScene->installEventFilter( activeTab->getMergeEdgeCallback( ) );
-  }
-  else if ( newMode == this->ui->actionSplit )
-  {
-    activeScene->installEventFilter( activeTab->getSplitEdgeCallback( ) );
-  }
-  else if ( newMode == this->ui->actionFill )
-  {
-    activeScene->installEventFilter( activeTab->getFillFaceCallback( ) );
-  }
-  this->updateFillColorSwatch( );
-}
-
-void ArrangementDemoWindow::resetCallbackState( unsigned int tabIndex )
-{
-  if (tabIndex == static_cast<unsigned int>(-1)
-      || tabIndex >= this->tabs.size( )) return;
-
-  ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
-
-  QAction* activeMode = this->activeModes.at( 0 );
-
-  // unhook the old active mode
-  if ( activeMode == this->ui->actionInsert )
-  {  }
-  else if ( activeMode == this->ui->actionDrag )
-  {  }
-  else if ( activeMode == this->ui->actionDelete )
-  {
-    activeTab->getDeleteCurveCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionPointLocation )
-  {
-    activeTab->getPointLocationCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionRayShootingUp )
-  {
-    activeTab->getVerticalRayShootCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionRayShootingDown )
-  {
-    activeTab->getVerticalRayShootCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionMerge )
-  {
-    activeTab->getMergeEdgeCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionSplit )
-  {
-    activeTab->getSplitEdgeCallback( )->reset( );
-  }
-  else if ( activeMode == this->ui->actionFill )
-  {
-    activeTab->getFillFaceCallback( )->reset( );
-  }
-}
-
-void ArrangementDemoWindow::removeCallback( unsigned int tabIndex )
-{
-  if (tabIndex == static_cast<unsigned int>(-1)) return;
-
-  ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
-  QGraphicsScene* activeScene = activeTab->getScene( );
-  QGraphicsView* activeView = activeTab->getView( );
-#if 0
-  QAction* activeMode = this->activeModes[ tabIndex ];
-#endif
-
-  activeScene->removeEventFilter( activeTab->getCurveInputCallback( ) );
-  activeView->setDragMode( QGraphicsView::NoDrag );
-  activeScene->removeEventFilter( activeTab->getDeleteCurveCallback( ) );
-  activeScene->removeEventFilter( activeTab->getPointLocationCallback( ) );
-  activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
-  activeScene->removeEventFilter( activeTab->getMergeEdgeCallback( ) );
-  activeScene->removeEventFilter( activeTab->getSplitEdgeCallback( ) );
-  activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
-  activeScene->removeEventFilter( activeTab->getFillFaceCallback( ) );
-
-  // unhook the old active mode
-#if 0
-  if ( activeMode == this->ui->actionInsert )
-  {
-    activeScene->removeEventFilter( activeTab->getCurveInputCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionDrag )
-  {
-    activeView->setDragMode( QGraphicsView::NoDrag );
-  }
-  else if ( activeMode == this->ui->actionDelete )
-  {
-    activeScene->removeEventFilter( activeTab->getDeleteCurveCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionPointLocation )
-  {
-    activeScene->removeEventFilter( activeTab->getPointLocationCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionRayShootingUp )
-  {
-    activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionRayShootingDown )
-  {
-    activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionMerge )
-  {
-    activeScene->removeEventFilter( activeTab->getMergeEdgeCallback( ) );
-  }
-  else if ( activeMode == this->ui->actionSplit )
-  {
-    activeScene->removeEventFilter( activeTab->getSplitEdgeCallback( ) );
-  }
-#endif
-}
-
-void ArrangementDemoWindow::updateFillColorSwatch( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
-  FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
-  QColor fillColor = fillFaceCallback->getColor( );
-  if ( !fillColor.isValid( ) )
-  {
-    fillColor = ::Qt::black;
-  }
-
-  QPixmap fillColorPixmap( 16, 16 );
-  fillColorPixmap.fill( fillColor );
-  QIcon fillColorIcon( fillColorPixmap );
-  this->ui->actionFillColor->setIcon( fillColorIcon );
-}
-
-void ArrangementDemoWindow::openArrFile( QString filename )
-{
-  int index = this->ui->tabWidget->currentIndex( );
-  if ( index == -1 )
-  {
-    QMessageBox::information( this, "Oops", "Create a new tab first" );
-    return;
-  }
-  if ( filename.isNull( ) )
-  {
-    return;
-  }
-
-  std::ifstream ifs( filename.toStdString( ).c_str( ) );
-  CGAL::Object arr = this->arrangements[ index ];
-  Seg_arr* seg;
-  Pol_arr* pol;
-  Conic_arr* conic;
-  // Alg_seg_arr* alg;
-  if ( CGAL::assign( seg, arr ) )
-  {
-    typedef CGAL::Arr_text_formatter<Seg_arr>           Seg_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
-      ArrFormatter;
-    typedef ArrangementDemoTab<Seg_arr>                 TabType;
-
-    ArrFormatter arrFormatter;
-    CGAL::read( *seg, ifs, arrFormatter );
-    this->arrangements[ index ] = CGAL::make_object( seg );
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-    tab->setArrangement( seg );
-  }
-  else if ( CGAL::assign( pol, arr ) )
-  {
-    typedef CGAL::Arr_text_formatter< Pol_arr >         Pol_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Pol_text_formatter>
-      ArrFormatter;
-    typedef ArrangementDemoTab< Pol_arr >               TabType;
-
-    ArrFormatter arrFormatter;
-    CGAL::read( *pol, ifs, arrFormatter );
-    this->arrangements[ index ] = CGAL::make_object( pol );
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-    tab->setArrangement( pol );
-  }
-  else if ( CGAL::assign( conic, arr ) )
-  {
-#if 0
-    typedef CGAL::Arr_text_formatter<Conic_arr>         Conic_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Conic_text_formatter>
-      ArrFormatter;
-    ArrFormatter                                        arrFormatter;
-    CGAL::read( *conic, ifs, arrFormatter );
-    this->arrangements[ index ] = CGAL::make_object( conic );
-    tab->setArrangement( conic );
-#endif
-    typedef ArrangementDemoTab< Conic_arr > TabType;
-    Conic_reader< Conic_arr::Geometry_traits_2 > conicReader;
-    std::vector< Conic_arr::Curve_2 > curve_list;
-    CGAL::Bbox_2 bbox;
-    conicReader.read_data( filename.toStdString( ).c_str( ),
-                           std::back_inserter( curve_list ), bbox );
-    this->arrangements[ index ] = CGAL::make_object( conic );
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-
-    CGAL::insert( *conic, curve_list.begin(), curve_list.end() );
-    tab->setArrangement( conic );
-    //QMessageBox::information( this, "Oops",
-    //  "Reading conic arrangement not supported" );
-  }
-  // else if ( CGAL::assign( alg, arr ) )
-  // {
-  //   typedef CGAL::Arr_text_formatter< Alg_seg_arr >     Seg_text_formatter;
-  //   typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
-  //     ArrFormatter;
-  //   typedef ArrangementDemoTab< Alg_seg_arr >           TabType;
-
-  //   ArrFormatter arrFormatter;
-  //   CGAL::read( *alg, ifs, arrFormatter );
-  //   this->arrangements[ index ] = CGAL::make_object( alg );
-  //   TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-  //   tab->setArrangement( alg );
-  // }
-  ifs.close( );
-}
-
-void ArrangementDemoWindow::openDatFile( QString filename )
-{
-  int index = this->ui->tabWidget->currentIndex( );
-  if ( index == -1 )
-  {
-    QMessageBox::information( this, "Oops", "Create a new tab first" );
-    return;
-  }
-  if ( filename.isNull( ) )
-  {
-    return;
-  }
-
-  std::ifstream inputFile( filename.toStdString( ).c_str( ) );
-  CGAL::Object arr = this->arrangements[ index ];
-  Seg_arr* seg;
-  Pol_arr* pol;
-  Conic_arr* conic;
-  // Alg_seg_arr* alg;
-
-  // Creates an ofstream object named inputFile
-  if (! inputFile.is_open() ) // Always test file open
-  {
-    std::cerr << "Error opening input file" << std::endl;
-    return;
-  }
-
-  Pol_traits traits;
-  Pol_traits::Construct_curve_2 poly_const =
-    traits.construct_curve_2_object();
-
-
-  if ( CGAL::assign( pol, arr ) )
-  {
-    pol->clear( );
-
-    std::vector<Arr_pol_point_2> points;
-
-    unsigned int num_polylines;
-    inputFile >> num_polylines;
-    std::list<Arr_pol_2> pol_list;
-
-    unsigned int i;
-    for (i = 0; i < num_polylines; i++)
-    {
-      unsigned int num_segments;
-      inputFile >> num_segments;
-      points.clear();
-      unsigned int j;
-      for (j = 0; j < num_segments; j++)
-      {
-        int ix, iy;
-        inputFile >> ix >> iy;
-        points.push_back (Arr_pol_point_2(NT(ix),NT(iy)));
-      }
-
-      Arr_pol_2 curve = poly_const(points.begin(), points.end());
-      pol_list.push_back(curve);
-    }
-    CGAL::insert(*pol, pol_list.begin(), pol_list.end());
-
-    typedef ArrangementDemoTab< Pol_arr > TabType;
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-    tab->setArrangement( pol );
-  }
-  else if ( CGAL::assign( seg, arr ) )
-  {
-    seg->clear( );
-
-    int count;
-    inputFile >> count;
-    int i;
-    std::list<Arr_seg_2> seg_list;
-    for (i = 0; i < count; i++)
-    {
-      NT x0, y0, x1, y1;
-      inputFile >> x0 >> y0 >> x1 >> y1;
-
-      Arr_seg_point_2 p1(x0, y0);
-      Arr_seg_point_2 p2(x1, y1);
-
-      Arr_seg_2 curve(p1, p2);
-
-      seg_list.push_back(curve);
-    }
-
-    CGAL::insert(*(seg), seg_list.begin(), seg_list.end());
-
-    typedef ArrangementDemoTab< Seg_arr > TabType;
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-    tab->setArrangement( seg );
-  }
-#ifdef CGAL_USE_CORE
-  else if ( CGAL::assign( conic, arr ) )
-  {
-    conic->clear( );
-    Conic_reader< Conic_arr::Geometry_traits_2 > reader;
-    std::list<Arr_conic_2> curve_list;
-    CGAL::Bbox_2 bbox;
-    reader.read_data( filename.toStdString().c_str(),
-                      std::back_inserter(curve_list), bbox );
-    CGAL::insert (*conic, curve_list.begin(), curve_list.end());
-
-    typedef ArrangementDemoTab< Conic_arr > TabType;
-    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
-    tab->setArrangement( conic );
-  }
-#endif
-
-  inputFile.close();
-}
-
-void ArrangementDemoWindow::updateEnvelope( QAction* newMode )
-{
-  if ( this->ui->tabWidget->currentIndex( ) == -1 ) return;
-  ArrangementDemoTabBase* activeTab =
-    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
-  // QGraphicsScene* activeScene = activeTab->getScene( );
-  // QGraphicsView* activeView = activeTab->getView( );
-
-  bool show = newMode->isChecked( );
-  if ( newMode == this->ui->actionLowerEnvelope )
-  {
-    activeTab->getEnvelopeCallback( )->showLowerEnvelope( show );
-  }
-  else if ( newMode == this->ui->actionUpperEnvelope )
-  {
-    activeTab->getEnvelopeCallback( )->showUpperEnvelope( show );
-  }
-}
-
-void ArrangementDemoWindow::updateSnapping( QAction* newMode )
-{
-  ArrangementDemoTabBase* activeTab =
-    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
-  QGraphicsScene* activeScene = activeTab->getScene( );
-  ArrangementDemoGraphicsView* activeView = activeTab->getView( );
-
-  bool enabled = newMode->isChecked( );
-  if ( newMode == this->ui->actionSnapMode )
-  {
-    activeTab->getCurveInputCallback( )->setSnappingEnabled( enabled );
-    activeTab->getSplitEdgeCallback( )->setSnappingEnabled( enabled );
-    if ( ! enabled )
-    {
-      this->ui->actionGridSnapMode->setChecked( false );
-      this->ui->actionGridSnapMode->setEnabled( false );
-      activeTab->getCurveInputCallback( )->setSnapToGridEnabled( false );
-      activeTab->getSplitEdgeCallback( )->setSnapToGridEnabled( false );
-    }
-    else
-    {
-      this->ui->actionGridSnapMode->setEnabled( true );
-    }
-  }
-  else if ( newMode == this->ui->actionGridSnapMode )
-  {
-    activeTab->getCurveInputCallback( )->setSnapToGridEnabled( enabled );
-    activeTab->getSplitEdgeCallback( )->setSnapToGridEnabled( enabled );
-    activeView->setShowGrid( enabled );
-  }
-  activeScene->update( );
-}
-
-void ArrangementDemoWindow::updateConicType( QAction* newType )
-{
-  ArrangementDemoTabBase* activeTab =
-    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
-  // QGraphicsScene* activeScene = activeTab->getScene( );
-  // ArrangementDemoGraphicsView* activeView = activeTab->getView( );
-  Conic_arr* conic_arr;
-  Lin_arr* lin_arr;
-  bool isConicArr =
-    CGAL::assign( conic_arr,
-                  this->arrangements[ this->ui->tabWidget->currentIndex( ) ] );
-  bool isLinearArr =
-    CGAL::assign( lin_arr,
-                  this->arrangements[ this->ui->tabWidget->currentIndex( ) ] );
-  if ( isConicArr )
-  {
-    // std::cout << "do something conic arr related" << std::endl;
-    typedef Conic_arr::Geometry_traits_2       Conic_geom_traits;
-    typedef CGAL::Qt::GraphicsViewCurveInput<Conic_geom_traits>
-      ConicCurveInputCallback;
-    ConicCurveInputCallback* curveInputCallback =
-      ( ConicCurveInputCallback* ) activeTab->getCurveInputCallback( );
-    if ( newType == this->ui->actionConicSegment )
-    {
-      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_SEGMENT);
-    }
-    else if ( newType == this->ui->actionConicCircle )
-    {
-      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_CIRCLE);
-    }
-    else if ( newType == this->ui->actionConicEllipse )
-    {
-      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_ELLIPSE);
-    }
-    else if ( newType == this->ui->actionConicThreePoint )
-    {
-      curveInputCallback->setConicType( ConicCurveInputCallback::
-                                        CONIC_THREE_POINT );
-    }
-    else if ( newType == this->ui->actionConicFivePoint )
-    {
-      curveInputCallback->setConicType( ConicCurveInputCallback::
-                                        CONIC_FIVE_POINT );
-    }
-  }
-  else if ( isLinearArr )
-  {
-    typedef Lin_arr::Geometry_traits_2         Line_geom_traits;
-    typedef CGAL::Qt::GraphicsViewCurveInput<Line_geom_traits>
-      LinearCurveInputCallback;
-    LinearCurveInputCallback* curveInputCallback =
-      ( LinearCurveInputCallback* ) activeTab->getCurveInputCallback( );
-    if ( newType == this->ui->actionConicSegment )
-    {
-      curveInputCallback->setCurveType( LinearCurveInputCallback::SEGMENT );
-    }
-    else if ( newType == this->ui->actionCurveRay )
-    {
-      curveInputCallback->setCurveType( LinearCurveInputCallback::RAY );
-    }
-    else if ( newType == this->ui->actionCurveLine )
-    {
-      curveInputCallback->setCurveType( LinearCurveInputCallback::LINE );
-    }
-    //std::cout << "do nothing" << std::endl;
-  }
-}
-
-void ArrangementDemoWindow::on_actionSaveAs_triggered( )
-{
-  int index = this->ui->tabWidget->currentIndex( );
-  if ( index == -1 )
-    return;
-  QString filename =
-    QFileDialog::getSaveFileName( this, tr( "Save file" ),
-                                  "", "Arrangement (*.arr)" );
-  if ( filename.isNull( ) )
-    return;
-
-  std::ofstream ofs( filename.toStdString( ).c_str( ) );
-  CGAL::Object arr = this->arrangements[ index ];
-  Seg_arr* seg;
-  Pol_arr* pol;
-  Conic_arr* conic;
-  if ( CGAL::assign( seg, arr ) )
-  {
-    typedef CGAL::Arr_text_formatter<Seg_arr>           Seg_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
-      ArrFormatter;
-    ArrFormatter                                        arrFormatter;
-    CGAL::write( *seg, ofs, arrFormatter );
-  }
-  else if ( CGAL::assign( pol, arr ) )
-  {
-    typedef CGAL::Arr_text_formatter<Pol_arr>           Pol_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Pol_text_formatter>
-      ArrFormatter;
-    ArrFormatter                                        arrFormatter;
-    CGAL::write( *pol, ofs, arrFormatter );
-  }
-  else if ( CGAL::assign( conic, arr ) )
-  {
-#if 0
-    typedef CGAL::Arr_text_formatter<Conic_arr>         Conic_text_formatter;
-    typedef CGAL::Arr_with_history_text_formatter<Conic_text_formatter>
-      ArrFormatter;
-    ArrFormatter                                        arrFormatter;
-    CGAL::write( *conic, ofs, arrFormatter );
-#endif
-    ofs << conic->number_of_curves( ) << std::endl;
-    for ( Conic_arr::Curve_iterator it = conic->curves_begin( );
-          it != conic->curves_end( ); ++it )
-    {
-      if ( it->is_full_conic( ) )
-      {
-        ofs << "F ";
-        ofs << it->r( ) << " ";
-        ofs << it->s( ) << " ";
-        ofs << it->t( ) << " ";
-        ofs << it->u( ) << " ";
-        ofs << it->v( ) << " ";
-        ofs << it->w( ) << " ";
-        ofs << std::endl;
-      }
-      else if ( it->orientation( ) == CGAL::COLLINEAR )
-      {
-        ofs << "S ";
-        ofs << it->source( ) << " ";
-        ofs << it->target( ) << " ";
-        ofs << std::endl;
-      }
-      else
-      {
-        ofs << "A ";
-        ofs << it->r( ) << " ";
-        ofs << it->s( ) << " ";
-        ofs << it->t( ) << " ";
-        ofs << it->u( ) << " ";
-        ofs << it->v( ) << " ";
-        ofs << it->w( ) << " ";
-        if ( it->orientation( ) == CGAL::COUNTERCLOCKWISE )
-          ofs << "1 ";
-        else if ( it->orientation( ) == CGAL::CLOCKWISE )
-          ofs << "-1 ";
-        else
-          ofs << "0 ";
-        ofs << it->source( ) << " ";
-        ofs << it->target( ) << " ";
-        ofs << std::endl;
-      }
-    }
-  }
-  ofs.close( );
-}
-
-void ArrangementDemoWindow::on_actionOpen_triggered( )
-{
-  int index = this->ui->tabWidget->currentIndex( );
-  if ( index == -1 )
-  {
-    QMessageBox::information( this, "Oops", "Create a new tab first" );
-    return;
-  }
-  QString filename =
-    QFileDialog::getOpenFileName( this, tr( "Open file" ),
-                                  "", "Arrangement files (*.arr *.dat);;All files (*.*)" );
-  if ( filename.isNull( ) )
-    return;
-
-  if ( filename.endsWith( ".arr" ) )
-  {
-    this->openArrFile( filename );
-  }
-  else
-  {
-    this->openDatFile( filename );
-  }
-
-  ArrangementDemoTabBase* currentTab = this->tabs[ index ];
-  CGAL::Qt::ArrangementGraphicsItemBase* agi =
-    currentTab->getArrangementGraphicsItem( );
-  QRectF bb = agi->boundingRect( );
-  QGraphicsView* view = currentTab->getView( );
-  // std::cout << bb.left( ) << " " << bb.bottom( ) << ", " << bb.right( )
-  //           << " " << bb.top( ) << std::endl;
-  if ( boost::math::isinf(bb.left( )) ||
-       boost::math::isinf(bb.right( )) ||
-       boost::math::isinf(bb.top( )) ||
-       boost::math::isinf(bb.bottom( )) )
-  {
-    // std::cout << "unbounded; using default bb" << std::endl;
-    bb = QRectF( -100, -100, 200, 200 );
-    view->setSceneRect( bb );
-  }
-  else
-  {
-    view->fitInView( bb, ::Qt::KeepAspectRatio );
-    view->setSceneRect( bb );
-  }
-#if 0
-  view->centerOn( bb.center( ) );
-#endif
-}
-
-void ArrangementDemoWindow::on_actionQuit_triggered( )
-{
-  qApp->exit( );
-}
-
-void ArrangementDemoWindow::on_actionNewTab_triggered( )
-{
-  NewTabDialog* newTabDialog = new NewTabDialog;
-  if ( newTabDialog->exec( ) == QDialog::Accepted )
-  {
-    int id = newTabDialog->checkedId( );
-    if ( id == SEGMENT_TRAITS )
-    {
-      this->makeTab( SEGMENT_TRAITS );
-    }
-    else if ( id == POLYLINE_TRAITS )
-    {
-      this->makeTab( POLYLINE_TRAITS );
-    }
-    else if ( id == CONIC_TRAITS )
-    {
-      this->makeTab( CONIC_TRAITS );
-    }
-    else if ( id == LINEAR_TRAITS )
-    {
-      this->makeTab( LINEAR_TRAITS );
-    }
-    else if ( id == CIRCULAR_ARC_TRAITS )
-    {
-      this->makeTab( CIRCULAR_ARC_TRAITS );
-    }
-    // else if ( id == ALGEBRAIC_TRAITS )
-    // {
-    //   this->makeTab( ALGEBRAIC_TRAITS );
-    // }
-    else
-    {
-      std::cout << "Sorry, this trait is not yet supported" << std::endl;
-    }
-  }
-  delete newTabDialog;
-}
-
-void ArrangementDemoWindow::on_tabWidget_currentChanged( )
-{
-  // std::cout << "Tab changed" << std::endl;
-  // disable the callback for the previously active tab
-  this->resetCallbackState( this->lastTabIndex );
-  this->removeCallback( this->lastTabIndex );
-  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
-
-  this->updateMode( this->modeGroup->checkedAction( ) );
-
-  CGAL::Object arr;
-  if ( this->ui->tabWidget->currentIndex( ) != -1 )
-    arr = this->arrangements[ this->ui->tabWidget->currentIndex( ) ];
-
-  // Seg_arr* seg;
-  // Pol_arr* pol;
-  Conic_arr* conic;
-  Lin_arr* lin;
-  if ( CGAL::assign( conic, arr ) )
-  {
-    this->ui->actionConicSegment->setChecked( true );
-
-    this->ui->actionCurveRay->setVisible( false );
-    this->ui->actionCurveLine->setVisible( false );
-
-    this->ui->actionConicCircle->setVisible( true );
-    this->ui->actionConicEllipse->setVisible( true );
-    this->ui->actionConicThreePoint->setVisible( true );
-    this->ui->actionConicFivePoint->setVisible( true );
-
-    this->conicTypeGroup->setEnabled( true );
-  }
-  else if ( CGAL::assign( lin, arr ) )
-  {
-    this->ui->actionConicSegment->setChecked( true );
-
-    this->ui->actionCurveRay->setVisible( true );
-    this->ui->actionCurveLine->setVisible( true );
-
-    this->ui->actionConicCircle->setVisible( false );
-    this->ui->actionConicEllipse->setVisible( false );
-    this->ui->actionConicThreePoint->setVisible( false );
-    this->ui->actionConicFivePoint->setVisible( false );
-
-    this->conicTypeGroup->setEnabled( true );
-  }
-  else
-  { // segment or polyline
-    this->ui->actionConicSegment->setChecked( true );
-
-    this->ui->actionCurveRay->setVisible( false );
-    this->ui->actionCurveLine->setVisible( false );
-
-    this->ui->actionConicCircle->setVisible( false );
-    this->ui->actionConicEllipse->setVisible( false );
-    this->ui->actionConicThreePoint->setVisible( false );
-    this->ui->actionConicFivePoint->setVisible( false );
-
-    this->conicTypeGroup->setEnabled( true );
-  }
-}
-
-void ArrangementDemoWindow::on_actionOverlay_triggered( )
-{
-  OverlayDialog* overlayDialog = new OverlayDialog( this );
-  if ( overlayDialog->exec( ) == QDialog::Accepted )
-  {
-    std::vector< CGAL::Object > arrs = overlayDialog->selectedArrangements( );
-    if ( arrs.size( ) == 2 )
-    {
-      Seg_arr* seg_arr;
-      Seg_arr* seg_arr2;
-      Pol_arr* pol_arr;
-      Pol_arr* pol_arr2;
-      Conic_arr* conic_arr;
-      Conic_arr* conic_arr2;
-      Lin_arr* lin_arr;
-      Lin_arr* lin_arr2;
-      Arc_arr* arc_arr;
-      Arc_arr* arc_arr2;
-      // Alg_seg_arr* alg_arr;
-      // Alg_seg_arr* alg_arr2;
-      if ( CGAL::assign( seg_arr, arrs[ 0 ] ) &&
-           CGAL::assign( seg_arr2, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab( seg_arr, seg_arr2 );
-      }
-      if ( CGAL::assign( pol_arr, arrs[ 0 ] ) &&
-           CGAL::assign( pol_arr2, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab( pol_arr, pol_arr2 );
-      }
-      if ( CGAL::assign( conic_arr, arrs[ 0 ] ) &&
-           CGAL::assign( conic_arr2, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab( conic_arr, conic_arr2 );
-      }
-      if ( CGAL::assign( lin_arr, arrs[ 0 ] ) &&
-           CGAL::assign( lin_arr2, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab( lin_arr, lin_arr2 );
-      }
-      if ( CGAL::assign( arc_arr, arrs[ 0 ] ) &&
-           CGAL::assign( arc_arr2, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab( arc_arr, arc_arr2 );
-      }
-      // if ( CGAL::assign( alg_arr, arrs[ 0 ] ) &&
-      //      CGAL::assign( alg_arr2, arrs[ 1 ] ) )
-      // {
-      //   this->makeOverlayTab( alg_arr, alg_arr2 );
-      // }
-
-#if 0
-      if ( CGAL::assign( conic_arr, arrs[ 0 ] ) ||
-           CGAL::assign( conic_arr, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab< Conic_arr >( arrs[ 0 ], arrs[ 1 ] );
-      }
-      else if ( CGAL::assign( pol_arr, arrs[ 0 ] ) ||
-                CGAL::assign( pol_arr, arrs[ 1 ] ) )
-      {
-        this->makeOverlayTab< Pol_arr >( arrs[ 0 ], arrs[ 1 ] );
-      }
-      else
-      {
-        this->makeOverlayTab< Seg_arr >( arrs[ 0 ], arrs[ 1 ] );
-      }
-#endif
-    }
-  }
-  delete overlayDialog;
-}
-
-void ArrangementDemoWindow::on_actionCloseTab_triggered( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (! this->ui->tabWidget->count() ||
-      (currentTabIndex == static_cast<unsigned int>(-1)))
-    return;
-
-  // delete the tab
-  this->ui->tabWidget->removeTab( currentTabIndex );
-  this->tabs.erase( this->tabs.begin( ) + currentTabIndex );
-
-  // delete the arrangement
-  this->arrangements.erase( this->arrangements.begin( ) + currentTabIndex );
-}
-
-void ArrangementDemoWindow::on_actionPrintConicCurves_triggered( )
-{
-  // int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  // Conic_arr* arr;
-  // if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  // CGAL::Object o = this->arrangements[ currentTabIndex ];
-  // if ( ! CGAL::assign( arr, o ) )
-  //     return;
-  // typedef typename Conic_arr::Curve_iterator Curve_iterator;
-  // // std::cout << arr->number_of_curves( ) << std::endl;
-  // Curve_iterator it;
-  // for (it = arr->curves_begin(); it != arr->curves_end(); ++it) {
-  //     std::cout << *it << std::endl;
-  //     if ( it->is_full_conic( ) )
-  //     {
-  //         std::cout << "F ";
-  //         std::cout << it->r( ) << " ";
-  //         std::cout << it->s( ) << " ";
-  //         std::cout << it->t( ) << " ";
-  //         std::cout << it->u( ) << " ";
-  //         std::cout << it->v( ) << " ";
-  //         std::cout << it->w( ) << " ";
-  //         std::cout << std::endl;
-  //     }
-  //     else if ( it->orientation( ) == CGAL::COLLINEAR )
-  //     {
-  //         std::cout << "S ";
-  //         std::cout << it->source( ) << " ";
-  //         std::cout << it->target( ) << " ";
-  //         std::cout << std::endl;
-  //     }
-  //     else
-  //     {
-  //         std::cout << "A ";
-  //         std::cout << it->r( ) << " ";
-  //         std::cout << it->s( ) << " ";
-  //         std::cout << it->t( ) << " ";
-  //         std::cout << it->u( ) << " ";
-  //         std::cout << it->v( ) << " ";
-  //         std::cout << it->w( ) << " ";
-  //         if ( it->orientation( ) == CGAL::COUNTERCLOCKWISE )
-  //             std::cout << "1 ";
-  //         else if ( it->orientation( ) == CGAL::CLOCKWISE )
-  //             std::cout << "-1 ";
-  //         else
-  //             std::cout << "0 ";
-  //         std::cout << it->source( ) << " ";
-  //         std::cout << it->target( ) << " ";
-  //         std::cout << std::endl;
-  //     }
-  // }
-}
-
-void ArrangementDemoWindow::on_actionZoomIn_triggered( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
-  QGraphicsView* view = currentTab->getView( );
-  view->scale( 2.0, 2.0 );
-}
-
-void ArrangementDemoWindow::on_actionZoomOut_triggered( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
-  QGraphicsView* view = currentTab->getView( );
-  view->scale( 0.5, 0.5 );
-}
-
-void ArrangementDemoWindow::on_actionPreferences_triggered( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
-  CGAL::Qt::ArrangementGraphicsItemBase* agi =
-    currentTab->getArrangementGraphicsItem( );
-  ArrangementDemoGraphicsView* view = currentTab->getView( );
-  EnvelopeCallbackBase* envelopeCallback = currentTab->getEnvelopeCallback( );
-  VerticalRayShootCallbackBase* verticalRayShootCallback =
-    currentTab->getVerticalRayShootCallback( );
-  SplitEdgeCallbackBase* splitEdgeCallback = currentTab->getSplitEdgeCallback( );
-
-#if 0
-  QPen vertexPen = agi->getVerticesPen( );
-  QPen edgePen = agi->getEdgesPen( );
-  QBrush vertexPenBrush = vertexPen.brush( );
-  QColor vertexColor = vertexPenBrush.color( );
-  QBrush edgePenBrush = edgePen.brush( );
-  QColor edgeColor = edgePenBrush.color( );
-#endif
-
-  ArrangementDemoPropertiesDialog* dialog =
-    new ArrangementDemoPropertiesDialog( this );
-  if ( dialog->exec( ) == QDialog::Accepted )
-  {
-    typedef ArrangementDemoPropertiesDialog Dialog;
-    QColor edgeColor =
-      qVariantValue<QColor>(dialog->property(Dialog::EDGE_COLOR_KEY));
-    unsigned int edgeWidth =
-      qVariantValue<unsigned int>(dialog->property(Dialog::EDGE_WIDTH_KEY));
-    QColor vertexColor =
-      qVariantValue<QColor>(dialog->property(Dialog::VERTEX_COLOR_KEY));
-    unsigned int vertexRadius =
-      qVariantValue<unsigned int>(dialog->property(Dialog::VERTEX_RADIUS_KEY));
-    QColor envelopeEdgeColor =
-      qVariantValue<QColor>(dialog->property(Dialog::ENVELOPE_EDGE_COLOR_KEY));
-    unsigned int envelopeEdgeWidth =
-      qVariantValue<unsigned int>(dialog->property(Dialog::
-                                                   ENVELOPE_EDGE_WIDTH_KEY));
-    QColor envelopeVertexColor =
-      qVariantValue<QColor>(dialog->property(Dialog::
-                                             ENVELOPE_VERTEX_COLOR_KEY));
-    unsigned int envelopeVertexRadius =
-      qVariantValue<unsigned int>(dialog->property(Dialog::
-                                                   ENVELOPE_VERTEX_RADIUS_KEY));
-    QColor verticalRayEdgeColor =
-      qVariantValue<QColor>(dialog->property(Dialog::
-                                             VERTICAL_RAY_EDGE_COLOR_KEY));
-    unsigned int verticalRayEdgeWidth =
-      qVariantValue<unsigned int>(dialog->property
-                                  (Dialog::VERTICAL_RAY_EDGE_WIDTH_KEY));
-    DeleteCurveMode mode =
-      qVariantValue<DeleteCurveMode>(dialog->property(Dialog::
-                                                      DELETE_CURVE_MODE_KEY));
-    unsigned int gridSize =
-      qVariantValue<unsigned int>(dialog->property(Dialog::GRID_SIZE_KEY));
-    QColor gridColor =
-      qVariantValue<QColor>(dialog->property(Dialog::GRID_COLOR_KEY));
-
-    QPen edgesPen(QBrush(edgeColor), edgeWidth);
-    QPen verticesPen(QBrush(vertexColor), vertexRadius);
-    agi->setEdgesPen( edgesPen );
-    agi->setVerticesPen( verticesPen );
-    agi->modelChanged( );
-    view->setGridSize( gridSize );
-    view->setGridColor( gridColor );
-    envelopeCallback->setEnvelopeEdgeColor( envelopeEdgeColor );
-    envelopeCallback->setEnvelopeEdgeWidth( envelopeEdgeWidth );
-    envelopeCallback->setEnvelopeVertexColor( envelopeVertexColor );
-    envelopeCallback->setEnvelopeVertexRadius( envelopeVertexRadius );
-    verticalRayShootCallback->setEdgeColor( verticalRayEdgeColor );
-    verticalRayShootCallback->setEdgeWidth( verticalRayEdgeWidth );
-    splitEdgeCallback->setColor( edgeColor );
-
-#if 0
-    std::cout << edgeColor.name( ).toStdString( ) << std::endl;
-    std::cout << edgeWidth << std::endl;
-    std::cout << vertexColor.name( ).toStdString( ) << std::endl;
-    std::cout << vertexRadius << std::endl;
-    std::cout << DeleteCurveMode::ToString( mode ).toStdString( ) << std::endl;
-#endif
-
-  }
-}
-
-void ArrangementDemoWindow::on_actionFillColor_triggered( )
-{
-  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
-  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
-  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
-  FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
-  QColor fillColor = fillFaceCallback->getColor( );
-
-  QColor selectedColor = QColorDialog::getColor( fillColor );
-  if ( selectedColor.isValid( ) )
-  {
-    fillFaceCallback->setColor( selectedColor );
-    this->updateFillColorSwatch( );
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h
deleted file mode 100644
index da47f32..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef ARRANGEMENT_DEMO_WINDOW_H
-#define ARRANGEMENT_DEMO_WINDOW_H
-
-#include "ArrangementGraphicsItem.h"
-#include "ArrangementTypes.h"
-#include "DeleteCurveCallback.h"
-#include "PointLocationCallback.h"
-#include "VerticalRayShootCallback.h"
-#include "MergeEdgeCallback.h"
-#include "SplitEdgeCallback.h"
-#include "EnvelopeCallback.h"
-#include "ArrangementDemoTab.h"
-
-#include <CGAL/Arr_overlay_2.h>
-#include <CGAL/Arr_default_overlay_traits.h>
-#include <CGAL/Qt/DemosMainWindow.h>
-#include <CGAL/IO/pixmaps/hand.xpm>
-
-#include <Qt>
-
-#include "ui_ArrangementDemoWindow.h"
-
-//#include <QFileDialog>
-//#include <QInputDialog>
-//#include <QMessageBox>
-//#include <QtGui>
-
-namespace Ui { class ArrangementDemoWindow; }
-
-class QActionGroup;
-
-class ArrangementDemoWindow : public CGAL::Qt::DemosMainWindow
-{
-  Q_OBJECT
-  public:
-#if 0
-  typedef Seg_traits::Point_2 Point;
-  typedef Seg_traits::Segment_2 Segment;
-#endif
-  typedef enum TraitsType {
-    SEGMENT_TRAITS,
-    POLYLINE_TRAITS,
-    CONIC_TRAITS,
-    LINEAR_TRAITS,
-    CIRCULAR_ARC_TRAITS
-    // ALGEBRAIC_TRAITS
-  } TraitsType;
-    
-  ArrangementDemoWindow(QWidget* parent = 0);
-  ~ArrangementDemoWindow();
-
-  ArrangementDemoTabBase* makeTab( TraitsType tt );
-  ArrangementDemoTabBase* getTab( unsigned int tabIndex ) const;
-  ArrangementDemoTabBase* getCurrentTab( ) const;
-
-  std::vector< QString > getTabLabels( ) const;
-  std::vector< CGAL::Object > getArrangements( ) const;
-
-  template < class ArrType >
-  void makeOverlayTab( ArrType* arr1, ArrType* arr2 );
-    
-public slots:
-  void updateMode( QAction* a );
-  void updateEnvelope( QAction* a );
-  void updateSnapping( QAction* a );
-  void updateConicType( QAction* a );
-  void on_actionNewTab_triggered( );
-  void on_actionSaveAs_triggered( );
-  void on_actionOpen_triggered( );
-  void on_actionQuit_triggered( );
-  void on_tabWidget_currentChanged( );
-  void on_actionOverlay_triggered( );
-  void on_actionCloseTab_triggered( );
-  void on_actionPrintConicCurves_triggered( );
-  void on_actionZoomIn_triggered( );
-  void on_actionZoomOut_triggered( );
-  void on_actionPreferences_triggered( );
-  void on_actionFillColor_triggered( );
-    
-
-signals:
-  void modelChanged( );
-
-protected:
-  void setupUi( );
-  void resetCallbackState( unsigned int tabIndex );
-  void removeCallback( unsigned int tabIndex );
-  void updateFillColorSwatch( );
-
-  void openArrFile( QString filename );
-  void openDatFile( QString filename );
-
-  std::vector< ArrangementDemoTabBase* > tabs;
-  std::vector< CGAL::Object > arrangements;
-  std::vector< QAction* > activeModes; // for the current tab; always size 1
-  unsigned int lastTabIndex;
-
-  Ui::ArrangementDemoWindow* ui;
-  QActionGroup* modeGroup;
-  QActionGroup* envelopeGroup;
-  QActionGroup* snapGroup;
-  QActionGroup* conicTypeGroup;
-};
-
-template < class ArrType >
-void
-ArrangementDemoWindow::
-makeOverlayTab( ArrType* arr1, ArrType* arr2 )
-{
-  QString tabLabel = QString( "Overlay Tab" );
-
-  ArrangementDemoTabBase* demoTab;
-  ArrType* overlayArr = new ArrType;
-  CGAL::Arr_default_overlay_traits< ArrType > defaultTraits;
-
-  CGAL::overlay( *arr1, *arr2, *overlayArr, defaultTraits );
-
-  demoTab = new ArrangementDemoTab< ArrType >( overlayArr, 0 );
-  this->arrangements.push_back( CGAL::make_object( overlayArr ) );
-  this->tabs.push_back( demoTab );
-
-  QGraphicsView* view = demoTab->getView( );
-  this->addNavigation( view );
-  this->ui->tabWidget->addTab( demoTab, tabLabel );
-  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
-}
-
-#endif // ARRANGEMENT_DEMO_WINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h
deleted file mode 100644
index ad11ff9..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h
+++ /dev/null
@@ -1,1309 +0,0 @@
-// Copyright (c) 2008, 2012  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
-#define CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-//#include <CGAL/apply_to_range.h>
-// TODO: should be included in PainterOstream.h
-//#include <CGAL/Kernel/global_functions.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Arr_circular_arc_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_algebraic_segment_traits_2.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-//#include <QStyleOption>
-
-#include "ArrangementPainterOstream.h"
-#include "Utils.h"
-
-#include <iostream>
-#ifdef _MSC_VER
-#define _USE_MATH_DEFINES
-#endif
-#include <math.h>
-
-class QGraphicsScene;
-
-namespace CGAL {
-namespace Qt {
-
-class ArrangementGraphicsItemBase :
-    public GraphicsItem, public QGraphicsSceneMixin
-{
-public:
-  ArrangementGraphicsItemBase( );
-
-  const QPen& getVerticesPen( ) const;
-  const QPen& getEdgesPen( ) const;
-  void setVerticesPen( const QPen& pen );
-  void setEdgesPen( const QPen& pen );
-  bool visibleVertices( ) const;
-  void setVisibleVertices( const bool b );
-  bool visibleEdges( ) const;
-  void setVisibleEdges( const bool b );
-  void setBackgroundColor( QColor color );
-  // void setScene( QGraphicsScene* scene_ );
-
-protected:
-  // QRectF getViewportRect( ) const;
-
-  CGAL::Bbox_2 bb;
-  bool bb_initialized;
-
-  QPen verticesPen;
-  QPen edgesPen;
-  bool visible_edges;
-  bool visible_vertices;
-
-  QGraphicsScene* scene;
-
-  QColor backgroundColor;
-
-}; // class ArrangementGraphicsItemBase
-
-template <typename Arr_, typename ArrTraits = typename Arr_::Geometry_traits_2>
-class ArrangementGraphicsItem : public ArrangementGraphicsItemBase
-{
-  typedef Arr_ Arrangement;
-  typedef typename Arrangement::Geometry_traits_2       Traits;
-  typedef typename Arrangement::Vertex_iterator         Vertex_iterator;
-  typedef typename Arrangement::Curve_iterator          Curve_iterator;
-  typedef typename Arrangement::Edge_iterator           Edge_iterator;
-  typedef typename Arrangement::Halfedge                Halfedge;
-  typedef typename Arrangement::Halfedge_handle         Halfedge_handle;
-  typedef typename Arrangement::Face_handle             Face_handle;
-  typedef typename Arrangement::Face_iterator           Face_iterator;
-  typedef typename Arrangement::Hole_iterator           Holes_iterator;
-  typedef typename Arrangement::Ccb_halfedge_circulator Ccb_halfedge_circulator;
-
-  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-  typedef typename Kernel::Point_2                      Kernel_point_2;
-  typedef typename Traits::Point_2                      Point_2;
-  //typedef typename Kernel::Segment_2 Segment_2;
-
-  typedef ArrangementGraphicsItemBase                   Superclass;
-  typedef typename Kernel::Segment_2                    Segment_2;
-
-public:
-  /*! Constructor */
-  ArrangementGraphicsItem( Arrangement* t_ );
-
-  /*! Destructor (virtual) */
-  ~ArrangementGraphicsItem() {}
-
-public:
-  void modelChanged( );
-  QRectF boundingRect( ) const;
-  virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
-                     QWidget* widget);
-
-protected:
-  template < typename TTraits >
-  void paint( QPainter* painter, TTraits traits );
-
-  template < typename Kernel_ >
-  void paint( QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > traits );
-
-  template < typename CircularKernel >
-  void paint( QPainter* painter,
-              CGAL::Arr_circular_arc_traits_2< CircularKernel > traits );
-
-  // template < typename Coefficient_ >
-  // void paint( QPainter* painter,
-  //             CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > traits );
-
-
-  void paintFaces( QPainter* painter )
-  {
-    typename Traits::Left_side_category category;
-    this->paintFaces( painter, category );
-  }
-
-  void paintFaces( QPainter* painter, CGAL::Arr_oblivious_side_tag )
-  {
-    for( Face_iterator fi = this->arr->faces_begin( );
-         fi != this->arr->faces_end( ); ++fi )
-    {
-      fi->set_visited( false );
-    }
-
-    Face_handle unboundedFace = this->arr->unbounded_face( );
-    this->paintFace( unboundedFace, painter );
-  }
-
-  void paintFaces( QPainter* painter, CGAL::Arr_open_side_tag )
-  {
-    for( Face_iterator fi = this->arr->faces_begin( );
-         fi != this->arr->faces_end( ); ++fi )
-    {
-      // if ( fi->is_fictitious( ) )
-      // {
-      //     std::cout << "setting fictitious face not visited" << std::endl;
-      // }
-      fi->set_visited( false );
-    }
-
-    Face_handle fictitiousFace = this->arr->fictitious_face( );
-    this->paintFace( fictitiousFace, painter );
-  }
-
-#if 0
-  template < typename TTraits >
-  void paintFaces( QPainter* painter, TTraits traits ) { }
-
-  template < typename Kernel_ >
-  void paintFaces(QPainter* painter, CGAL::Arr_segment_traits_2<Kernel_>) {}
-
-  template < typename Kernel_ >
-  void paintFaces(QPainter* painter, CGAL::Arr_polyline_traits_2<Kernel_>) {}
-
-  template < typename RatKernel, class AlgKernel, class NtTraits >
-  void paintFaces(QPainter* painter,
-                  CGAL::Arr_conic_traits_2<RatKernel, AlgKernel, NtTraits >)
-  {}
-
-  template < typename CircularKernel >
-  void paintFaces(QPainter* painter,
-                  CGAL::Arr_circular_arc_traits_2<CircularKernel > traits) {}
-
-  template < typename Coefficient_ >
-  void paintFaces(QPainter* painter,
-                  CGAL::Arr_algebraic_segment_traits_2<Coefficient_> traits) {}
-#endif
-
-  void paintFace( Face_handle f, QPainter* painter )
-  {
-    if (! f->visited( ) )
-    {
-      int holes = 0;
-      int inner_faces = 0;
-      Holes_iterator hit; // holes iterator
-      this->paintFace( f, painter, Traits( ) );
-      f->set_visited( true );
-      for ( hit = f->holes_begin(); hit != f->holes_end(); ++hit )
-      {
-        Ccb_halfedge_circulator cc = *hit;
-        do {
-          Halfedge_handle he = cc;
-          Halfedge_handle he2 = he->twin();
-          Face_handle inner_face = he2->face();
-          if ( this->antenna( he ) )
-            continue;
-
-          // move on to next hole
-          if ( ! inner_face->visited( ) )
-            inner_faces++;
-          this->visit_ccb_faces( inner_face, painter );
-        } while ( ++cc != *hit );
-        holes++;
-      }// for
-      // if ( f->is_unbounded( ) )
-      // {
-      //   std::cout << "unbounded face has " << holes << " holes" << std::endl;
-      //   std::cout << "unbounded face has " << inner_faces << " inner faces"
-      //             << std::endl;
-      // }
-      // if ( f->is_fictitious( ) )
-      // {
-      //   std::cout << "fictitious face has " << holes << " holes"
-      //             << std::endl;
-      //   std::cout << "fictitious face has " << inner_faces << " inner faces"
-      //             << std::endl;
-      // }
-    }
-  }
-
-  void visit_ccb_faces( Face_handle & fh, QPainter* painter )
-  {
-    this->paintFace( fh, painter );
-
-    Ccb_halfedge_circulator cc=fh->outer_ccb();
-    do {
-      Halfedge he = *cc;
-      if (! he.twin()->face()->visited())
-      {
-        Face_handle nei = (Face_handle) he.twin()->face();
-        this->visit_ccb_faces( nei , painter );
-      }
-      //created from the outer boundary of the face
-    } while (++cc != fh->outer_ccb());
-  }
-
-  /*! antenna - return true if the halfedge and its
-   *  twin point to the same face.
-   */
-  bool antenna(Halfedge_handle h)
-  {
-    Halfedge_handle twin = h->twin();
-    return (twin->face() == h->face());
-  }
-
-  template < typename Traits >
-  void paintFace(Face_handle /* f */, QPainter* /* painter */,
-                 Traits /* traits */)
-  { }
-
-  template < typename Kernel_ >
-  void paintFace( Face_handle f, QPainter* painter,
-                  CGAL::Arr_segment_traits_2< Kernel_ > )
-  {
-    if (!f->is_unbounded())  // f is not the unbounded face
-    {
-      QVector< QPointF > pts; // holds the points of the polygon
-
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do {
-        double x = CGAL::to_double(cc->source()->point().x());
-        double y = CGAL::to_double(cc->source()->point().y());
-        QPointF coord_source(x , y);
-        pts.push_back(coord_source );
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      QPolygonF pgn (pts);
-
-      // FIXME: get the bg color
-      QColor color = this->backgroundColor;
-      if ( f->color().isValid() )
-      {
-        color = f->color();
-      }
-      QBrush oldBrush = painter->brush( );
-      painter->setBrush( color );
-      painter->drawPolygon( pgn );
-      painter->setBrush( oldBrush );
-    }
-    else
-    {
-      QRectF rect = this->viewportRect( );
-      QColor color = this->backgroundColor;
-      painter->fillRect( rect, color );
-    }
-  }
-
-  template < typename Kernel_ >
-  void paintFace( Face_handle f, QPainter* painter,
-                  CGAL::Arr_polyline_traits_2< Kernel_ > )
-  {
-    if (!f->is_unbounded())  // f is not the unbounded face
-    {
-      typedef typename CGAL::Arr_polyline_traits_2<Kernel_> Arr_poly_traits;
-      typedef typename Arr_poly_traits::Compare_endpoints_xy_2 Comp_end_pts_2;
-      typedef typename Arr_poly_traits::Construct_min_vertex_2 Poly_const_min_v;
-      typedef typename Arr_poly_traits::Construct_max_vertex_2 Poly_const_max_v;
-
-      // Obtain a polyline traits class and construct the needed functors
-      Arr_poly_traits poly_tr;
-      Comp_end_pts_2 comp_end_pts = poly_tr.compare_endpoints_xy_2_object();
-      Poly_const_min_v poly_const_min_v=poly_tr.construct_min_vertex_2_object();
-      Poly_const_max_v poly_const_max_v=poly_tr.construct_max_vertex_2_object();
-
-      // Construct needed functors from the segment traits
-      typedef typename Arr_poly_traits::Segment_traits_2       Segment_traits;
-      typedef typename Segment_traits::Construct_min_vertex_2  Seg_const_min_v;
-      typedef typename Segment_traits::Construct_max_vertex_2  Seg_const_max_v;
-      Seg_const_min_v construct_min_v = poly_tr.segment_traits_2()->
-        construct_min_vertex_2_object();
-      Seg_const_max_v construct_max_v = poly_tr.segment_traits_2()->
-        construct_max_vertex_2_object();
-
-      // Iterator of the segments of an x-monotone polyline
-      typename X_monotone_curve_2::Segment_const_iterator seg_it;
-
-      QVector< QPointF > pts; // holds the points of the polygon
-      X_monotone_curve_2 cv;
-
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc = f->outer_ccb();
-      do {
-        cv = cc->curve();
-
-        // Determine the direction of cv (left-to-right or right-to-left)
-        Comparison_result dir = comp_end_pts(cv);
-
-        for (seg_it = cv.begin_segments();
-             seg_it != cv.end_segments() ; ++seg_it)
-          {
-            if (dir == SMALLER)
-              {
-                // cv is directed from left-to-right
-                // Adding the left-min vertex of the current segment
-                double x = CGAL::to_double((construct_min_v(*seg_it)).x());
-                double y = CGAL::to_double((construct_min_v(*seg_it)).y());
-                QPointF coord_source(x , y);
-                pts.push_back(coord_source );
-              }
-            else
-              {
-                // cv is directed from right-to-left
-                // Adding the right-max vertex of the current segment
-                double x = CGAL::to_double((construct_max_v(*seg_it)).x());
-                double y = CGAL::to_double((construct_max_v(*seg_it)).y());
-                QPointF coord_source(x , y);
-                pts.push_back(coord_source );
-              }
-          }
-
-        if (dir == SMALLER)
-          {
-            // Add the right-most point of cv
-            double x = CGAL::to_double((poly_const_max_v(cv)).x());
-            double y = CGAL::to_double((poly_const_max_v(cv)).y());
-            QPointF coord_source(x , y);
-            pts.push_back(coord_source );
-          }
-        else
-          {
-            // Add the left-most point of cv
-            double x = CGAL::to_double((poly_const_min_v(cv)).x());
-            double y = CGAL::to_double((poly_const_min_v(cv)).y());
-            QPointF coord_source(x , y);
-            pts.push_back(coord_source );
-          }
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      QPolygonF pgn( pts );
-
-      // fill the face according to its color (stored at any of her
-      // incidents curves)
-      QBrush oldBrush = painter->brush( );
-      QColor def_bg_color = this->backgroundColor;
-      if (! f->color().isValid())
-      {
-        painter->setBrush( def_bg_color );
-      }
-      else
-      {
-        painter->setBrush( f->color( ) );
-      }
-      painter->drawPolygon( pgn );
-      painter->setBrush( oldBrush );
-    }
-    else
-    {
-      QRectF rect = this->viewportRect( );
-      QColor color = this->backgroundColor;
-      painter->fillRect( rect, color );
-    }
-  }
-
-  template < typename RatKernel, typename AlgKernel, typename NtTraits >
-  void paintFace( Face_handle f, QPainter* painter,
-                  CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > )
-  {
-    if (! f->is_unbounded())  // f is not the unbounded face
-    {
-      QVector< QPointF > pts; // holds the points of the polygon
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do
-      {
-        if (this->antenna(cc))
-          continue;
-
-        Halfedge_handle he = cc;
-        X_monotone_curve_2 c = he->curve();
-        // Get the co-ordinates of the curve's source and target.
-        double sx = CGAL::to_double(he->source()->point().x()),
-          sy = CGAL::to_double(he->source()->point().y()),
-          tx = CGAL::to_double(he->target()->point().x()),
-          ty = CGAL::to_double(he->target()->point().y());
-
-        QPointF coord_source(sx, sy);
-        QPointF coord_target(tx, ty);
-        QPoint coord_source_viewport = this->fromScene( coord_source );
-        QPoint coord_target_viewport = this->fromScene( coord_target );
-
-        if (c.orientation() == CGAL::COLLINEAR)
-          pts.push_back(coord_source );
-        else
-        {
-          // If the curve is monotone, than its source and its target has the
-          // extreme x co-ordinates on this curve.
-          bool is_source_left = (sx < tx);
-          int  x_min = is_source_left ?
-            coord_source_viewport.x( ) : coord_target_viewport.x( );
-          int  x_max = is_source_left ?
-            coord_target_viewport.x( ) : coord_source_viewport.x( );
-          double curr_x, curr_y;
-          int x;
-
-          Arr_conic_point_2 px;
-
-          pts.push_back(coord_source );
-
-          const int DRAW_FACTOR = 5;
-          if (is_source_left)
-          {
-            for (x = x_min + DRAW_FACTOR; x < x_max; x+=DRAW_FACTOR)
-            {
-              //= COORD_SCALE)
-              curr_x = this->toScene( x );
-              Alg_kernel   ker;
-              Arr_conic_point_2 curr_p(curr_x, 0);
-              if (!(ker.compare_x_2_object()(curr_p, c.left()) !=
-                    CGAL::SMALLER &&
-                    ker.compare_x_2_object()(curr_p, c.right()) !=
-                    CGAL::LARGER))
-                continue;
-              px = c.point_at_x (curr_p);
-              curr_y = CGAL::to_double(px.y());
-              QPointF curr( curr_x, curr_y );
-              pts.push_back( curr );
-            }// for
-          }
-          else
-          {
-            for (x = x_max; x > x_min; x-=DRAW_FACTOR)
-            {
-              curr_x = this->toScene( x );
-              Alg_kernel   ker;
-              Arr_conic_point_2 curr_p(curr_x, 0);
-              if (!(ker.compare_x_2_object() (curr_p, c.left()) !=
-                    CGAL::SMALLER &&
-                    ker.compare_x_2_object() (curr_p, c.right()) !=
-                    CGAL::LARGER))
-                continue;
-              px = c.point_at_x (curr_p);
-              curr_y = CGAL::to_double(px.y());
-              QPointF curr( curr_x, curr_y );
-              pts.push_back( curr );
-            }// for
-          }// else
-          pts.push_back(coord_target );
-        }
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      QPolygonF pgn( pts );
-
-      // fill the face according to its color (stored at any of her
-      // incidents curves)
-      QBrush oldBrush = painter->brush( );
-      QColor def_bg_color = this->backgroundColor;
-      if (! f->color().isValid())
-      {
-        painter->setBrush( def_bg_color );
-      }
-      else
-      {
-        painter->setBrush( f->color( ) );
-      }
-      painter->drawPolygon( pgn );
-      painter->setBrush( oldBrush );
-    }
-    else
-    {
-      QRectF rect = this->viewportRect( );
-      QColor color = this->backgroundColor;
-      painter->fillRect( rect, color );
-    }
-  }
-
-  template < typename CircularKernel >
-  void paintFace(Face_handle f, QPainter* painter,
-                 CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
-  {
-    if ( f->is_unbounded( ) )
-    {
-      QRectF rect = this->viewportRect( );
-      QColor color = this->backgroundColor;
-      if ( f->color().isValid() )
-        color = f->color();
-      painter->fillRect( rect, color );
-      return;
-    }
-    QPainterPath path;
-    bool isFirstArc = true;
-    Ccb_halfedge_circulator cc=f->outer_ccb();
-    do
-    {
-      if ( this->antenna( cc ) )
-        continue;
-
-      if ( isFirstArc )
-      {
-        isFirstArc = false;
-        X_monotone_curve_2 c = cc->curve( );
-
-        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
-        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
-        if ( ! this->isProperOrientation( cc ) )
-        {
-          std::swap( source, target );
-        }
-
-        QPointF circleCenter( to_double(c.supporting_circle().center().x()),
-                              to_double(c.supporting_circle().center().y()) );
-        //this->drawDiagnosticArc( circleCenter, source, target, painter );
-
-        std::swap( source, target );
-        double asource = atan2( -(source - circleCenter).y(),
-                                (source - circleCenter).x() );
-        double atarget = atan2( -(target - circleCenter).y(),
-                                (target - circleCenter).x() );
-        double aspan = atarget - asource;
-        std::swap( source, target );
-
-        path.moveTo( source );
-        path.arcTo( convert(c.supporting_circle().bbox()), asource * 180/M_PI,
-                    aspan * 180/M_PI );
-        path.lineTo( target );
-      }
-      else
-      {
-        X_monotone_curve_2 c = cc->curve( );
-        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
-        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
-        if ( ! this->pathTouchingSource( path, c ) )
-          std::swap( source, target );
-
-        QPointF circleCenter( to_double(c.supporting_circle().center().x()),
-                              to_double(c.supporting_circle().center().y()) );
-        //this->drawDiagnosticArc( circleCenter, source, target, painter );
-
-        std::swap( source, target );
-        double asource = atan2( -(source - circleCenter).y(),
-                                (source - circleCenter).x() );
-        double atarget = atan2( -(target - circleCenter).y(),
-                                (target - circleCenter).x() );
-        double aspan = atarget - asource;
-        std::swap( source, target );
-
-        path.arcTo( convert(c.supporting_circle().bbox()), asource * 180/M_PI,
-                    aspan * 180/M_PI );
-        path.lineTo( target );
-      }
-    } while (++cc != f->outer_ccb());
-
-    if ( f->color().isValid() )
-    {
-      QPen savePen = painter->pen();
-      QBrush saveBrush = painter->brush();
-      QPen pen = painter->pen();
-      pen.setColor( f->color() );
-
-      painter->setPen( pen );
-      painter->setBrush( f->color() );
-      painter->drawPath( path );
-      painter->setPen( savePen );
-      painter->setBrush( saveBrush );
-    }
-  }
-
-  void drawDiagnosticArc( QPointF c, QPointF s, QPointF t, QPainter* qp )
-  {
-    QBrush saveBrush = qp->brush( );
-    double r = QLineF( c, s ).length();
-    QRectF bb( c.x() - r, c.y() - r, 2*r, 2*r );
-
-    QPainterPath path;
-    // because we flipped the y-axis in our view, we need to flip our angles
-    // with respect to the y-axis. we can do this by flipping s and t, then
-    // negating their y-values
-    std::swap( s, t );
-    double as = atan2( -(s - c).y(), (s - c).x() );
-    double at = atan2( -(t - c).y(), (t - c).x() );
-    double aspan = at - as;
-
-    path.moveTo( c );
-    path.lineTo( s );
-    path.arcTo( bb, as * 180/M_PI, aspan * 180/M_PI );
-    path.closeSubpath( );
-    qp->drawEllipse( bb );
-
-    qp->setBrush( ::Qt::red );
-    qp->fillPath( path, qp->brush() );
-    qp->setBrush( saveBrush );
-
-  }
-
-  /**
-     Return false if the tip of the given curve doesn't align with either of the
-     endpoints of the next curve.
-  */
-  bool isProperOrientation( Ccb_halfedge_circulator cc )
-  {
-    Ccb_halfedge_circulator ccnext = cc;
-    Halfedge_handle he = cc;
-    X_monotone_curve_2 thisCurve = he->curve( );
-    ccnext++;
-    while ( this->antenna( ccnext ) ) ccnext++;
-    Halfedge_handle next_he = ccnext;
-    X_monotone_curve_2 nextCurve = next_he->curve( );
-
-    QPointF thisTarget( to_double(thisCurve.target().x()),
-                        to_double(thisCurve.target().y()) );
-    QPointF nextSource( to_double(nextCurve.source().x()),
-                        to_double(nextCurve.source().y()) );
-    QPointF nextTarget( to_double(nextCurve.target().x()),
-                        to_double(nextCurve.target().y()) );
-    double dist1 = QLineF( thisTarget, nextSource ).length();
-    double dist2 = QLineF( thisTarget, nextTarget ).length();
-    bool res = ( dist1 < 1e-2 || dist2 < 1e-2 );
-
-    return res;
-  }
-
-  bool pathTouchingSource( const QPainterPath& path, X_monotone_curve_2 c )
-  {
-    QPointF a = path.currentPosition( );
-    QPointF b( to_double(c.source().x()), to_double(c.source().y()) );
-    // QPointF d( to_double(c.target().x()), to_double(c.target().y()) );
-    bool res = (QLineF( a, b ).length() < 1e-2);
-
-    return res;
-  }
-
-#if 0
-  template < typename CircularKernel >
-  void paintFace(Face_handle f, QPainter* painter,
-                 CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
-  {
-    // std::cout << "face begin" << std::endl;
-    if (! f->is_unbounded())  // f is not the unbounded face
-    {
-      QBrush oldBrush = painter->brush( );
-      QColor def_bg_color = this->backgroundColor;
-      if (! f->color().isValid())
-      {
-        painter->setBrush( def_bg_color );
-      }
-      else
-      {
-        painter->setBrush( f->color( ) );
-      }
-
-      // approach: draw a closed path with arcs
-      QPainterPath path;
-      //path.setFillRule( ::Qt::WindingFill );
-
-      bool isFirstArc = true;
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do
-      {
-        if (this->antenna(cc))
-          continue;
-
-        Halfedge_handle he = cc;
-        X_monotone_curve_2 c = he->curve(); // circular arc
-
-        const typename CircularKernel::Circle_2& circ = c.supporting_circle();
-        const typename CircularKernel::Point_2& center = circ.center();
-        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
-        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
-
-        if ( isFirstArc )
-        {
-          isFirstArc = false;
-          // make sure we are going the right way
-          Ccb_halfedge_circulator ccnext = cc;
-          ccnext++;
-          while ( this->antenna( ccnext ) ) ccnext++;
-          Halfedge_handle next_he = ccnext;
-          X_monotone_curve_2 next_c = next_he->curve( );
-          QPointF next_source( to_double(next_c.source().x()),
-                               to_double(next_c.source().y()) );
-          QPointF next_target( to_double(next_c.target().x()),
-                               to_double(next_c.target().y()) );
-          // std::cout << "next curve's points: " << std::endl
-          //           << "  s: " << next_source.x( )
-          //           << " " << next_source.y( ) << std::endl
-          //           << "  t: " << next_target.x( )
-          //           << " " << next_target.y( ) << std::endl;
-          double dist1 = QLineF( target, next_source ).length();
-          double dist2 = QLineF( target, next_target ).length();
-          if ( dist1 > 1e-2 && dist2 > 1e-2 )
-          {
-            std::cout << "swapping first curve points" << std::endl;
-            std::swap( source, target );
-          }
-
-          path.moveTo( source );
-        }
-        else
-        {
-          //bool source_is_left = (source.x() < target.x());
-          double dist = QLineF( path.currentPosition(), source ).length( );
-          // if ( dist > 1e-2 )
-          // {
-          //     std::cout << "swapping source and target " << dist
-          //               << std::endl;
-          //     std::swap( source, target );
-          // }
-        }
-        // std::cout << "currentPosition: " << path.currentPosition().x()
-        //           << ", " << path.currentPosition().y() << std::endl;
-        std::stringstream ss;
-        ss << "  source: " << to_double(source.x( )) << ", "
-           << to_double(source.y()) << std::endl
-           << "  target: " << to_double(target.x( )) << ", "
-           << to_double(target.y()) << std::endl;
-
-#if 0
-        source = QPointF( to_double(c.source().x()), to_double(c.source().y()));
-        target = QPointF( to_double(c.target().x()), to_double(c.target().y()));
-        double asource = std::atan2( -to_double(source.y() - center.y()),
-                                     to_double(source.x() - center.x()));
-        double atarget = std::atan2( -to_double(target.y() - center.y()),
-                                     to_double(target.x() - center.x()));
-#endif
-        double asource = std::atan2( to_double(source.y() - center.y()),
-                                     to_double(source.x() - center.x()) );
-        double atarget = std::atan2( to_double(target.y() - center.y()),
-                                     to_double(target.x() - center.x()) );
-
-        ss << "  asource: " << (asource * 180/M_PI) << std::endl
-           << "  atarget: " << (atarget * 180/M_PI) << std::endl;
-
-        //std::swap(asource, atarget);
-        double aspan = atarget - asource;
-        ss << "  aspan: " << (aspan * 180/M_PI) << std::endl;
-
-        if(aspan < 0.)
-          aspan += 2 * CGAL_PI;
-
-        const double coeff = 180*16/CGAL_PI;
-        double circR = sqrt(to_double(circ.squared_radius()));
-
-#if 0
-        painter->drawEllipse( to_double( center.x() - circR ),
-                              to_double( center.y() - circR ),
-                              2*circR, 2*circR );
-#endif
-        QPointF curPos = path.currentPosition( );
-        //path.lineTo( to_double(target.x( )), to_double(target.y()) );
-
-#if 0
-        ss << "drawing line from " << curPos.x( ) << ", " << curPos.y( )
-           << " to "
-           << to_double(target.x( )) << ", " << to_double(target.y());
-#endif
-        // std::cout << ss.str( ) << std::endl;
-        path.arcTo( convert(circ.bbox()), asource * 180/CGAL_PI,
-                    aspan *180/CGAL_PI );
-#if 0
-        qp->drawArc(convert(circ.bbox()),
-                    (int)(asource * coeff),
-                    (int)(aspan * coeff));
-#endif
-      } while (++cc != f->outer_ccb());
-
-      // fill the face according to its color (stored at any of her
-      // incidents curves)
-#if 0
-      painter->drawPolygon( pgn );
-#endif
-      path.closeSubpath( );
-#if 0
-      QPainterPathStroker stroker;
-      QPainterPath fillablePath = stroker.createStroke( path );
-#endif
-      painter->fillPath( path, painter->brush() );
-#if 0
-      QPolygonF fillIt = path.toFillPolygon( );
-      painter->drawPolygon( fillIt );
-#endif
-      //painter->drawPath( path );
-      //painter->fillPath( path, painter->brush() );
-      painter->setBrush( oldBrush );
-    }
-    else
-    {
-      QRectF rect = this->viewportRect( );
-      QColor color = this->backgroundColor;
-      painter->fillRect( rect, color );
-    }
-  }
-#endif
-
-  //void cacheCurveBoundingRects( );
-
-  void updateBoundingBox();
-
-  template < typename TTraits>
-  void updateBoundingBox(TTraits traits );
-
-  template < typename Kernel_>
-  void updateBoundingBox(CGAL::Arr_linear_traits_2<Kernel_> traits);
-
-  // template < typename Coefficient_>
-  // void updateBoundingBox(CGAL::Arr_algebraic_segment_traits_2<Coefficient_>
-  //                        traits);
-
-  Arrangement* arr;
-  ArrangementPainterOstream< Traits > painterostream;
-  CGAL::Qt::Converter< Kernel > convert;
-  std::map< Curve_iterator, CGAL::Bbox_2 > curveBboxMap;
-}; // class ArrangementGraphicsItem
-
-  template < typename Arr_, class ArrTraits >
-  ArrangementGraphicsItem< Arr_, ArrTraits >::
-  ArrangementGraphicsItem( Arrangement* arr_ ):
-    arr( arr_ ),
-    painterostream( 0 )
-  {
-    if ( this->arr->number_of_vertices( ) == 0 ) {
-      this->hide( );
-    }
-    this->updateBoundingBox( );
-    this->setZValue( 3 );
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  QRectF
-  ArrangementGraphicsItem< Arr_, ArrTraits >::
-  boundingRect( ) const
-  {
-    QRectF rect = this->convert( this->bb );
-    return rect;
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  void
-  ArrangementGraphicsItem< Arr_, ArrTraits >::
-  paint(QPainter* painter,
-        const QStyleOptionGraphicsItem* /* option */,
-        QWidget*  /*widget*/)
-  {
-    this->paint( painter, ArrTraits( ) );
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  template < typename TTraits >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  paint(QPainter* painter, TTraits /* traits */)
-  {
-    this->paintFaces( painter );
-
-    painter->setPen( this->verticesPen );
-    this->painterostream =
-      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
-    this->painterostream.setScene( this->scene );
-
-    for ( Vertex_iterator it = this->arr->vertices_begin( );
-          it != this->arr->vertices_end( ); ++it )
-    {
-      Point_2 p = it->point( );
-      Kernel_point_2 pt( p.x( ), p.y( ) );
-      this->painterostream << pt;
-    }
-    painter->setPen( this->edgesPen );
-    for ( Edge_iterator it = this->arr->edges_begin( );
-          it != this->arr->edges_end( ); ++it )
-    {
-      X_monotone_curve_2 curve = it->curve( );
-      this->painterostream << curve;
-    }
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  template < typename Kernel_ >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  paint(QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
-  {
-    this->updateBoundingBox( );
-    this->paintFaces( painter );
-    painter->setPen( this->verticesPen );
-
-    this->painterostream =
-      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
-    this->painterostream.setScene( this->scene );
-
-    for ( Vertex_iterator it = this->arr->vertices_begin( );
-          it != this->arr->vertices_end( ); ++it )
-    {
-      Point_2 pt = it->point( );
-      this->painterostream << pt;
-    }
-    painter->setPen( this->edgesPen );
-    for ( Edge_iterator it = this->arr->edges_begin( );
-          it != this->arr->edges_end( ); ++it )
-    {
-      X_monotone_curve_2 curve = it->curve( );
-      this->painterostream << curve;
-    }
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  template < typename CircularKernel >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  paint(QPainter* painter,
-        CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
-  {
-    typedef Kernel_point_2 Non_arc_point_2;
-    typedef typename Traits::Point_2 Arc_point_2;
-
-    this->paintFaces( painter );
-
-    painter->setPen( this->verticesPen );
-    this->painterostream =
-      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
-    this->painterostream.setScene( this->scene );
-
-    for ( Vertex_iterator it = this->arr->vertices_begin( );
-          it != this->arr->vertices_end( ); ++it )
-    {
-      Arc_point_2 pt = it->point( );
-      Non_arc_point_2 pt2(CGAL::to_double(pt.x( )), CGAL::to_double(pt.y()) );
-      this->painterostream << pt2;
-    }
-    painter->setPen( this->edgesPen );
-    for ( Edge_iterator it = this->arr->edges_begin( );
-          it != this->arr->edges_end( ); ++it )
-    {
-      X_monotone_curve_2 curve = it->curve( );
-      this->painterostream << curve;
-    }
-  }
-
-#if 0
-  template < typename Arr_, typename ArrTraits >
-  template < typename Coefficient_ >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  paint(QPainter* painter,
-        CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > /* traits */)
-  {
-    painter->setPen( this->verticesPen );
-    QRectF clipRect = this->boundingRect( );
-    if ( std::isinf(clipRect.left( )) ||
-         std::isinf(clipRect.right( )) ||
-         std::isinf(clipRect.top( )) ||
-         std::isinf(clipRect.bottom( )) )
-    {
-      clipRect = this->viewportRect( );
-    }
-
-    this->painterostream =
-      ArrangementPainterOstream< Traits >( painter, clipRect );
-    this->painterostream.setScene( this->scene );
-
-    for ( Vertex_iterator it = this->arr->vertices_begin( );
-          it != this->arr->vertices_end( ); ++it )
-    {
-      Point_2 p = it->point( );
-      //std::pair< double, double > approx = p.to_double( );
-      //Kernel_point_2 pt( approx.first, approx.second );
-      //this->painterostream << pt;
-      this->painterostream << p;
-    }
-    painter->setPen( this->edgesPen );
-    for ( Edge_iterator it = this->arr->edges_begin( );
-          it != this->arr->edges_end( ); ++it )
-    {
-      X_monotone_curve_2 curve = it->curve( );
-      this->painterostream << curve;
-    }
-  }
-#endif
-
-  // We let the bounding box only grow, so that when vertices get removed
-  // the maximal bbox gets refreshed in the GraphicsView
-  template < typename Arr_, typename ArrTraits >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::updateBoundingBox( )
-  {
-    this->updateBoundingBox( ArrTraits( ) );
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  template < typename TTraits >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  updateBoundingBox(TTraits /* traits */)
-  {
-    this->prepareGeometryChange( );
-    if ( this->arr->number_of_vertices( ) == 0 )
-    {
-      this->bb = Bbox_2( 0, 0, 0, 0 );
-      this->bb_initialized = false;
-      return;
-    }
-    else
-    {
-      this->bb = this->arr->vertices_begin( )->point( ).bbox( );
-      this->bb_initialized = true;
-    }
-
-    for ( Curve_iterator it = this->arr->curves_begin( );
-          it != this->arr->curves_end( );
-          ++it )
-    {
-      if ( this->curveBboxMap.count( it ) == 0 )
-      {
-        this->curveBboxMap[ it ] = it->bbox( );
-      }
-      this->bb = this->bb + this->curveBboxMap[ it ];
-    }
-  }
-
-  template < typename Arr_, typename ArrTraits >
-  template < typename Kernel_ >
-  void
-  ArrangementGraphicsItem< Arr_, ArrTraits >::
-  updateBoundingBox(CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
-  {
-    this->prepareGeometryChange( );
-    QRectF clipRect = this->viewportRect( );
-    this->convert = Converter<Kernel>( clipRect );
-
-    if ( ! clipRect.isValid( ) /*|| this->arr->number_of_vertices( ) == 0*/ )
-    {
-      this->bb = Bbox_2( 0, 0, 0, 0 );
-      this->bb_initialized = false;
-      return;
-    }
-    else
-    {
-      this->bb = this->convert( clipRect ).bbox( );
-      this->bb_initialized = true;
-    }
-
-    for ( Curve_iterator it = this->arr->curves_begin( );
-          it != this->arr->curves_end( );
-          ++it )
-    {
-      if ( it->is_segment( ) )
-      {
-        this->bb = this->bb + it->segment( ).bbox( );
-      }
-      else if ( it->is_ray( ) )
-      {
-        QLineF qclippedRay = this->convert( it->ray( ) );
-        Segment_2 clippedRay = this->convert( qclippedRay );
-        this->bb = this->bb + clippedRay.bbox( );
-      }
-      else // ( it->is_line( ) )
-      {
-        QLineF qclippedLine = this->convert( it->line( ) );
-        Segment_2 clippedLine = this->convert( qclippedLine );
-        this->bb = this->bb + clippedLine.bbox( );
-      }
-    }
-  }
-
-#if 0
-  template < typename Arr_, typename ArrTraits >
-  template < typename Coefficient_ >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::
-  updateBoundingBox(CGAL::Arr_algebraic_segment_traits_2<Coefficient_> traits)
-  {
-    this->prepareGeometryChange( );
-    if ( this->arr->number_of_vertices( ) == 0 )
-    {
-      this->bb = Bbox_2( 0, 0, 0, 0 );
-      this->bb_initialized = false;
-      return;
-    }
-    else
-    {
-      //std::pair< double, double > approx =
-      //  this->arr->vertices_begin( )->point( ).to_double( );
-      //this->bb = CGAL::Bbox_2( approx.first, approx.second,
-      //                         approx.first, approx.second );
-      this->bb = CGAL::Bbox_2( 0, 0, 0, 0 );
-      this->bb_initialized = true;
-    }
-    typename Traits::Make_x_monotone_2 make_x_monotone_2 =
-      traits.make_x_monotone_2_object( );
-    for ( Curve_iterator it = this->arr->curves_begin( );
-          it != this->arr->curves_end( );
-          ++it )
-    {
-      std::vector< CGAL::Object > cvs;
-      make_x_monotone_2( *it, std::back_inserter( cvs ) );
-      for ( unsigned int i = 0 ; i < cvs.size( ); ++i )
-      {
-        X_monotone_curve_2 cv;
-        CGAL::assign( cv, cvs[ i ] );
-        this->bb = this->bb + cv.bbox( );
-      }
-    }
-  }
-#endif
-
-  template < typename Arr_, typename ArrTraits >
-  void ArrangementGraphicsItem< Arr_, ArrTraits >::modelChanged( )
-  {
-    if ( this->arr->is_empty( ) )
-    {
-      this->hide( );
-    }
-    else
-    {
-      this->show( );
-    }
-    this->updateBoundingBox( );
-    this->update( );
-  }
-
-  /**
-     Specialized methods:
-     updateBoundingBox
-  */
-#if 0
-  template < typename Arr_, typename Kernel_ >
-  class ArrangementGraphicsItem< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > > :
-    public ArrangementGraphicsItemBase
-  {
-    typedef Arr_ Arrangement;
-    typedef ArrangementGraphicsItemBase Superclass;
-    typedef typename Arrangement::Geometry_traits_2     Traits;
-    typedef typename Arrangement::Vertex_iterator       Vertex_iterator;
-    typedef typename Arrangement::Curve_iterator        Curve_iterator;
-    typedef typename Arrangement::Edge_iterator         Edge_iterator;
-    typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
-    typedef typename Traits::X_monotone_curve_2         X_monotone_curve_2;
-    typedef typename Kernel::Point_2                    Point_2;
-    typedef typename Kernel::Segment_2                  Segment_2;
-
-  public:
-    ArrangementGraphicsItem( Arrangement* arr_ ):
-      arr( arr_ ),
-      painterostream( 0 )
-    {
-      if ( this->arr->number_of_vertices( ) == 0 ) {
-        this->hide( );
-      }
-      this->updateBoundingBox( );
-      this->setZValue( 3 );
-    }
-
-  public: // methods
-#if 0
-    void modelChanged( )
-    {
-      if ( this->arr->is_empty( ) )
-      {
-        this->hide( );
-      }
-      else
-      {
-        this->show( );
-      }
-      this->updateBoundingBox( );
-      this->update( );
-    }
-
-    // @override QGraphicsItem::boundingRect
-    QRectF boundingRect( ) const
-    {
-      QRectF rect = this->convert( this->bb );
-      return rect;
-    }
-#endif
-
-    // @override QGraphicsItem::paint
-#if 0
-    virtual void paint( QPainter* painter,
-                        const QStyleOptionGraphicsItem* option,
-                        QWidget* widget )
-    {
-      this->updateBoundingBox( );
-      painter->setPen( this->verticesPen );
-      this->painterostream =
-        ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
-      this->painterostream.setScene( this->scene );
-
-      for ( Vertex_iterator it = this->arr->vertices_begin( );
-            it != this->arr->vertices_end( ); ++it )
-      {
-        Point_2 pt = it->point( );
-        this->painterostream << pt;
-      }
-      painter->setPen( this->edgesPen );
-      for ( Edge_iterator it = this->arr->edges_begin( );
-            it != this->arr->edges_end( ); ++it )
-      {
-        X_monotone_curve_2 curve = it->curve( );
-        this->painterostream << curve;
-      }
-    }
-#endif
-
-  protected: // methods
-#if 0
-    void updateBoundingBox( )
-    {
-      this->prepareGeometryChange( );
-      QRectF clipRect = this->viewportRect( );
-      this->convert = Converter<Kernel>( clipRect );
-
-      if ( ! clipRect.isValid( ) /*|| this->arr->number_of_vertices( ) == 0*/ )
-      {
-        this->bb = Bbox_2( 0, 0, 0, 0 );
-        this->bb_initialized = false;
-        return;
-      }
-      else
-      {
-        this->bb = this->convert( clipRect ).bbox( );
-        this->bb_initialized = true;
-      }
-
-      for ( Curve_iterator it = this->arr->curves_begin( );
-            it != this->arr->curves_end( );
-            ++it )
-      {
-        if ( it->is_segment( ) )
-        {
-          this->bb = this->bb + it->segment( ).bbox( );
-        }
-        else if ( it->is_ray( ) )
-        {
-          QLineF qclippedRay = this->convert( it->ray( ) );
-          Segment_2 clippedRay = this->convert( qclippedRay );
-          this->bb = this->bb + clippedRay.bbox( );
-        }
-        else // ( it->is_line( ) )
-        {
-          QLineF qclippedLine = this->convert( it->line( ) );
-          Segment_2 clippedLine = this->convert( qclippedLine );
-          this->bb = this->bb + clippedLine.bbox( );
-        }
-      }
-    }
-#endif
-
-  protected: // fields
-    Arrangement* arr;
-    ArrangementPainterOstream< Traits > painterostream;
-    CGAL::Qt::Converter< Kernel > convert;
-  }; // class ArrangementGraphicsItem
-#endif
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h
deleted file mode 100644
index 6aaf8cf..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h
+++ /dev/null
@@ -1,1009 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
-#define CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
-
-#include <QRectF>
-#include <vector>
-
-// TODO: should be included in PainterOstream.h
-#include <CGAL/Kernel/global_functions.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arr_algebraic_segment_traits_2.h>
-
-#include "Utils.h"
-
-// #include <CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h>
-
-class QPainter;
-
-namespace CGAL {
-namespace Qt {
-
-template < typename ArrTraits >
-class ArrangementPainterOstreamBase : public QGraphicsSceneMixin
-{
-public:
-  // typedefs
-  typedef ArrTraits Traits;
-  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Kernel::Segment_2                    Segment_2;
-  typedef typename Kernel::Ray_2                        Ray_2;
-  typedef typename Kernel::Line_2                       Line_2;
-  typedef typename Kernel::Triangle_2                   Triangle_2;
-  typedef typename Kernel::Iso_rectangle_2              Iso_rectangle_2;
-  typedef typename Kernel::Circle_2                     Circle_2;
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstreamBase( QPainter* p,
-                                 QRectF clippingRectangle = QRectF( ) ) :
-    painterOstream( p, clippingRectangle ),
-    qp( p ),
-    convert( clippingRectangle ),
-    // scene( NULL ),
-    clippingRect( QRectF( ) ), // null rectangle
-    scale( 1.0 )
-  {
-    if ( p != 0 )
-    {
-      this->scale = p->worldTransform( ).m11( );
-    }
-  }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstreamBase() {}
-
-  // methods
-  template < typename T >
-  ArrangementPainterOstreamBase& operator<<( const T& t )
-  {
-    this->painterOstream << t;
-    return *this;
-  }
-
-  void setScene( QGraphicsScene* scene_ )
-  {
-    this->scene = scene_;
-
-    // set the clipping rectangle
-    if ( scene_ == NULL )
-    {
-      return;
-    }
-    this->clippingRect = this->viewportRect( );
-    this->convert = Converter< Kernel >( this->clippingRect );
-  }
-
-#if 0
-  void setScene( QGraphicsScene* scene_ )
-  {
-    this->scene = scene_;
-
-    // set the clipping rectangle
-    if ( scene_ == NULL )
-    {
-      return;
-    }
-    this->clippingRect = this->getViewportRect( );
-  }
-#endif
-
-protected: // methods
-#if 0
-  QRectF getViewportRect( ) const
-  {
-    // assumes scene is not null and attached to exactly one view
-    QGraphicsView* view = this->scene->views( ).first( );
-    QPointF p1 = view->mapToScene( 0, 0 );
-    QPointF p2 = view->mapToScene( view->width( ), view->height( ) );
-    QRectF clipRect = QRectF( p1, p2 );
-
-    return clipRect;
-  }
-#endif
-
-protected:
-  // fields
-  PainterOstream< Kernel > painterOstream;
-  QPainter* qp;
-  Converter< Kernel > convert;
-  // QGraphicsScene* scene;
-  QRectF clippingRect;
-  double scale;
-
-}; // class ArrangementPainterOstreamBase
-
-template < typename ArrTraits >
-class ArrangementPainterOstream :
-    public ArrangementPainterOstreamBase< ArrTraits >
-{
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
-    ArrangementPainterOstreamBase< ArrTraits >( p, clippingRectangle )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-};
-
-template < typename Kernel_ >
-class ArrangementPainterOstream<CGAL::Arr_segment_traits_2< Kernel_> >:
-  public ArrangementPainterOstreamBase<CGAL::Arr_segment_traits_2<Kernel_> >
-{
-public: // typedefs
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_segment_traits_2< Kernel > Traits;
-  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
-  typedef typename Superclass::Point_2                  Point_2;
-  typedef typename Superclass::Segment_2                Segment_2;
-  typedef typename Superclass::Ray_2                    Ray_2;
-  typedef typename Superclass::Line_2                   Line_2;
-  typedef typename Superclass::Triangle_2               Triangle_2;
-  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
-  typedef typename Superclass::Circle_2                 Circle_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
-    Superclass(p, clippingRectangle)
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    const Point_2& p1 = curve.source( );
-    const Point_2& p2 = curve.target( );
-    Segment_2 seg( p1, p2 );
-
-    // skip segments outside our view
-    QRectF seg_bb = this->convert( seg.bbox( ) );
-    if ( this->clippingRect.isValid( ) &&
-         ! this->clippingRect.intersects( seg_bb ) )
-    {
-      return *this;
-    }
-
-    this->painterOstream << seg;
-    return *this;
-  }
-
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    QPointF qpt = this->convert( p );
-    // clip the point if possible
-    if ( this->clippingRect.isValid( ) &&
-         ! this->clippingRect.contains( qpt ) )
-    {
-      return *this;
-    }
-
-    QPen savePen = this->qp->pen( );
-    this->qp->setBrush( QBrush( savePen.color( ) ) );
-    double radius = savePen.width( ) / 2.0;
-    radius /= this->scale;
-
-    this->qp->drawEllipse( qpt, radius, radius );
-
-    this->qp->setBrush( QBrush( ) );
-    this->qp->setPen( savePen );
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-};
-
-template < typename SegmentTraits >
-class ArrangementPainterOstream<CGAL::Arr_polyline_traits_2<SegmentTraits> > :
-  public ArrangementPainterOstreamBase<CGAL::Arr_polyline_traits_2<
-                                         SegmentTraits> >
-{
-public: // typedefs
-  typedef ArrangementPainterOstreamBase<CGAL::Arr_polyline_traits_2<
-                                          SegmentTraits> > Superclass;
-  typedef typename Superclass::Traits                   Traits;
-  typedef typename Superclass::Kernel                   Kernel;
-  typedef typename Superclass::Point_2                  Point_2;
-  typedef typename Superclass::Segment_2                Segment_2;
-  typedef typename Superclass::Ray_2                    Ray_2;
-  typedef typename Superclass::Line_2                   Line_2;
-  typedef typename Superclass::Triangle_2               Triangle_2;
-  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
-  typedef typename Superclass::Circle_2                 Circle_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
-    Superclass( p, clippingRectangle )
-  { }
-
-    /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    for (typename X_monotone_curve_2::Segment_const_iterator it =
-           curve.begin_segments();
-         it != curve.end_segments(); ++it)
-      {
-        this->painterOstream << *it;
-      }
-    // TODO: implement polyline painting
-#if 0
-    const Point_2& p1 = curve.source( );
-    const Point_2& p2 = curve.target( );
-    Segment_2 seg( p1, p2 );
-    this->painterOstream << seg;
-#endif
-    return *this;
-  }
-
-  // cloned from segtraits painter
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    QPointF qpt = this->convert( p );
-    QPen savePen = this->qp->pen( );
-    this->qp->setBrush( QBrush( savePen.color( ) ) );
-    double radius = savePen.width( ) / 2.0;
-    radius /= this->scale;
-
-    this->qp->drawEllipse( qpt, radius, radius );
-
-    this->qp->setBrush( QBrush( ) );
-    this->qp->setPen( savePen );
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-};
-
-template < typename RatKernel, class AlgKernel, class NtTraits >
-class ArrangementPainterOstream<CGAL::Arr_conic_traits_2<RatKernel, AlgKernel,
-                                                         NtTraits > >:
-  public ArrangementPainterOstreamBase< CGAL::Arr_conic_traits_2<RatKernel,
-                                                                 AlgKernel,
-                                                                 NtTraits> >
-{
-public: // typedefs
-  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > Traits;
-  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
-  typedef typename Superclass::Point_2                  Point_2;
-  typedef typename Superclass::Segment_2                Segment_2;
-  typedef typename Superclass::Ray_2                    Ray_2;
-  typedef typename Superclass::Line_2                   Line_2;
-  typedef typename Superclass::Triangle_2               Triangle_2;
-  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
-  typedef typename Superclass::Circle_2                 Circle_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-  typedef typename Traits::Construct_x_monotone_curve_2
-    Construct_x_monotone_curve_2;
-  typedef typename Traits::Point_2                      Intersection_point_2;
-  typedef typename Traits::Intersect_2                  Intersect_2;
-  typedef typename Traits::Multiplicity                 Multiplicity;
-  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
-  typedef typename Kernel::FT                           FT;
-
-public: // inner classes
-  // utility class to use with std::sort on an Intersect_2 result set.
-  class Compare_intersection_point_result
-  {
-  public:
-    typedef std::pair< Intersection_point_2, Multiplicity > Result;
-    // returns whether the point1 < point2, using x-coord to compare
-    bool operator()( const Result& o1, const Result& o2 )
-    {
-      Point_2 p1 = o1.first;
-      Point_2 p2 = o2.first;
-      return ( p1.x( ) < p2.x( ) );
-    }
-  };
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
-    Superclass( p, clippingRectangle ),
-    //intersect_2( this->traits.intersect_2_object( ) ),
-    // Why doesn't this work?
-    construct_x_monotone_curve_2(this->
-                                 traits.construct_x_monotone_curve_2_object())
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    CGAL::Bbox_2 bb = curve.bbox( );
-    QRectF qbb = this->convert( bb );
-    // quick cull
-    if ( this->clippingRect.isValid( ) &&
-         ! this->clippingRect.intersects( qbb ) )
-    {
-      //std::cout << "quick culled curve" << std::endl;
-      return *this;
-    }
-
-#if 0
-    std::cout << "bottom: ("
-              << this->clippingRect.bottomLeft( ).x( )
-              << " "
-              << this->clippingRect.bottomLeft( ).y( )
-              << " "
-              << this->clippingRect.bottomRight( ).x( )
-              << " "
-              << this->clippingRect.bottomRight( ).y( )
-              << ")"
-              << std::endl;
-#endif
-
-    if ( this->clippingRect.isValid( ) )
-    {
-      std::vector< X_monotone_curve_2 > visibleParts;
-      if ( this->clippingRect.contains( qbb ) )
-      {
-        visibleParts.push_back( curve );
-      }
-      else
-      {
-        visibleParts = this->visibleParts( curve );
-      }
-      for ( unsigned int i = 0; i < visibleParts.size( ); ++i )
-      {
-        X_monotone_curve_2 subcurve = visibleParts[ i ];
-        int n;
-        if ( this->scene == NULL )
-          n = 100; // TODO: get an adaptive approximation
-        else
-        {
-          QGraphicsView* view = this->scene->views( ).first( );
-          int xmin, xmax;
-          xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
-          xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
-          n = xmax - xmin;
-        }
-        if ( n == 0 )
-        {
-          return *this;
-        }
-
-        std::pair<double, double>* app_pts =
-          new std::pair<double, double>[n + 1];
-        std::pair<double, double>* end_pts =
-          subcurve.polyline_approximation(n, app_pts);
-        std::pair<double, double>* p_curr = app_pts;
-        std::pair<double, double>* p_next = p_curr + 1;
-        int count = 0;
-        do
-        {
-          QPointF p1( p_curr->first, p_curr->second );
-          QPointF p2( p_next->first, p_next->second );
-#if 0
-          Segment_2 seg( p1, p2 );
-          this->painterOstream << seg;
-#endif
-          this->qp->drawLine( p1, p2 );
-          p_curr++;
-          p_next++;
-          ++count;
-        }
-        while ( p_next != end_pts );
-      }
-    }
-    else
-    { // draw the whole curve
-      int n;
-      if ( this->scene == NULL )
-        n = 100; // TODO: get an adaptive approximation
-      else
-      {
-        QGraphicsView* view = this->scene->views( ).first( );
-        int xmin, xmax;
-        xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
-        xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
-        n = xmax - xmin;
-      }
-      if ( n == 0 )
-      {
-        return *this;
-      }
-
-      std::pair<double, double>* app_pts = new std::pair<double, double>[n + 1];
-      std::pair<double, double>* end_pts =
-        curve.polyline_approximation(n, app_pts);
-      std::pair<double, double>* p_curr = app_pts;
-      std::pair<double, double>* p_next = p_curr + 1;
-      int count = 0;
-      do
-      {
-        QPointF p1( p_curr->first, p_curr->second );
-        QPointF p2( p_next->first, p_next->second );
-#if 0
-        Segment_2 seg( p1, p2 );
-        this->painterOstream << seg;
-#endif
-        this->qp->drawLine( p1, p2 );
-        p_curr++;
-        p_next++;
-        ++count;
-      }
-      while ( p_next != end_pts );
-      //std::cout << count << " approximation points" << std::endl;
-    }
-
-    return *this;
-  }
-
-  // cloned from segtraits painter
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    QPointF qpt = this->convert( p );
-    QPen savePen = this->qp->pen( );
-    this->qp->setBrush( QBrush( savePen.color( ) ) );
-    double radius = savePen.width( ) / 2.0;
-    radius /= this->scale;
-
-    this->qp->drawEllipse( qpt, radius, radius );
-
-    this->qp->setBrush( QBrush( ) );
-    this->qp->setPen( savePen );
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-
-protected: // methods
-  // Returns subcurves of curve that are actually visible in the view.
-  // Assumes that clippingRect is valid.
-  std::vector< X_monotone_curve_2 > visibleParts( X_monotone_curve_2 curve )
-  {
-    // see if we intersect the bottom edge of the viewport
-    Intersect_2 intersect_2 = this->traits.intersect_2_object( );
-    Point_2 bottomLeft = this->convert( this->clippingRect.bottomLeft( ) );
-    Point_2 bottomRight = this->convert( this->clippingRect.bottomRight( ) );
-    Point_2 topLeft = this->convert( this->clippingRect.topLeft( ) );
-    Point_2 topRight = this->convert( this->clippingRect.topRight( ) );
-    X_monotone_curve_2 bottom =
-      this->construct_x_monotone_curve_2( bottomLeft, bottomRight );
-    X_monotone_curve_2 left =
-      this->construct_x_monotone_curve_2( bottomLeft, topLeft );
-    X_monotone_curve_2 top =
-      this->construct_x_monotone_curve_2( topLeft, topRight );
-    X_monotone_curve_2 right =
-      this->construct_x_monotone_curve_2( topRight, bottomRight );
-
-    std::vector< CGAL::Object > bottomIntersections;
-    std::vector< CGAL::Object > leftIntersections;
-    std::vector< CGAL::Object > topIntersections;
-    std::vector< CGAL::Object > rightIntersections;
-    std::vector< CGAL::Object > intersections;
-
-    intersect_2( bottom, curve, std::back_inserter( bottomIntersections ) );
-    intersect_2( left, curve, std::back_inserter( leftIntersections ) );
-    intersect_2( top, curve, std::back_inserter( topIntersections ) );
-    intersect_2( right, curve, std::back_inserter( rightIntersections ) );
-    // int total = bottomIntersections.size( )
-    //   + leftIntersections.size( )
-    //   + topIntersections.size( )
-    //   + rightIntersections.size( );
-
-    intersect_2( bottom, curve, std::back_inserter( intersections ) );
-    intersect_2( left, curve, std::back_inserter( intersections ) );
-    intersect_2( top, curve, std::back_inserter( intersections ) );
-    intersect_2( right, curve, std::back_inserter( intersections ) );
-
-    this->filterIntersectionPoints( intersections );
-    //std::cout << "total intersections: " << intersections.size( )
-    //          << std::endl;
-    //this->printIntersectResult( intersections );
-
-    Point_2 leftEndpt = curve.source( );
-    Point_2 rightEndpt = curve.target( );
-    if ( leftEndpt.x( ) > rightEndpt.x( ) )
-    {
-      std::swap( leftEndpt, rightEndpt );
-    }
-    QPointF qendpt1 = this->convert( leftEndpt );
-    QPointF qendpt2 = this->convert( rightEndpt );
-    std::list< Point_2 > pointList;
-    for ( unsigned int i = 0; i < intersections.size( ); ++i )
-    {
-      CGAL::Object o = intersections[ i ];
-      std::pair< Intersection_point_2, Multiplicity > pair;
-      if ( CGAL::assign( pair, o ) )
-      {
-        Point_2 pt = pair.first;
-        pointList.push_back( pt );
-      }
-    }
-    bool includeLeftEndpoint = this->clippingRect.contains( qendpt1 );
-    bool includeRightEndpoint = this->clippingRect.contains( qendpt2 );
-    if ( includeLeftEndpoint )
-      pointList.push_front( leftEndpt );
-    if ( includeRightEndpoint )
-      pointList.push_back( rightEndpt );
-
-    Construct_x_monotone_subcurve_2< Traits > construct_x_monotone_subcurve_2;
-    std::vector< X_monotone_curve_2 > clippings;
-    typename std::list< Point_2 >::iterator pointListItr = pointList.begin( );
-    for ( unsigned int i = 0; i < pointList.size( ); i += 2 )
-    {
-      Point_2 p1 = *pointListItr++;
-      Point_2 p2 = *pointListItr++;
-      X_monotone_curve_2 subcurve =
-        construct_x_monotone_subcurve_2( curve, p1, p2 );
-      clippings.push_back( subcurve );
-    }
-
-#if 0
-    // std::cout << "pointList size: " << pointList.size( ) << std::endl;
-    // if ( intersections.size( ) % 2 == 0 )
-    // {
-    //   // either both curve endpoints are in view or both are out
-    //     if ( this->clippingRect.contains( qendpt1 ) )
-    //     {
-    //         if ( this->clippingRect.contains( qendpt2 ) )
-    //         {
-    //             std::cout << "both endpoints are in view" << std::endl;
-    //         }
-    //     }
-    //     else if ( !this->clippingRect.contains( qendpt2 ) )
-    //     {
-    //         std::cout << "both endpoints are out of view" << std::endl;
-    //     }
-    // }
-    // else
-    // { // one curve endpoint is in view
-    //     if ( this->clippingRect.contains( qendpt1 ) )
-    //     {
-    //         std::cout << "left endpoint is in view" << std::endl;
-    //     }
-    //     else if ( this->clippingRect.contains( qendpt2 ) )
-    //     {
-    //         std::cout << "right endpoint is in view" << std::endl;
-    //     }
-    // }
-
-    std::vector< X_monotone_curve_2 > res;
-    res.push_back( curve );
-    return res;
-#endif
-    return clippings;
-  }
-
-  // keep only the intersection points ie. throw out overlapping curve segments
-  void filterIntersectionPoints( std::vector< CGAL::Object >& res )
-  {
-    std::vector< std::pair< Intersection_point_2, Multiplicity > > tmp;
-
-    // filter out the non-intersection point results
-    for ( unsigned int i = 0; i < res.size( ); ++i )
-    {
-      CGAL::Object obj = res[ i ];
-      std::pair< Intersection_point_2, Multiplicity > pair;
-      if ( CGAL::assign( pair, obj ) )
-      {
-        tmp.push_back( pair );
-      }
-    }
-    res.clear( );
-
-    // sort the intersection points by x-coord
-    Compare_intersection_point_result compare_intersection_point_result;
-    std::sort( tmp.begin( ), tmp.end( ), compare_intersection_point_result );
-
-    // box up the sorted elements
-    for ( unsigned int i = 0; i < tmp.size( ); ++i )
-    {
-      std::pair< Intersection_point_2, Multiplicity > pair = tmp[ i ];
-      CGAL::Object o = CGAL::make_object( pair );
-      res.push_back( o );
-    }
-  }
-
-  void printIntersectResult( const std::vector< CGAL::Object >& res )
-  {
-    for ( std::vector< CGAL::Object >::const_iterator it = res.begin( );
-          it != res.end( ); ++it )
-    {
-      CGAL::Object obj = *it;
-      std::pair< Intersection_point_2, Multiplicity > pair;
-      if ( CGAL::assign( pair, obj ) )
-      {
-        Point_2 pt = pair.first;
-        /* QPointF qpt = */ this->convert( pt );
-        // std::cout << "(" << pt.x( ) << " " << pt.y( ) < ")" << std::endl;
-      }
-    }
-  }
-
-protected: // members
-  Traits traits;
-  //Intersect_2 intersect_2;
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2;
-};
-
-template < typename Kernel_ >
-class ArrangementPainterOstream< CGAL::Arr_linear_traits_2< Kernel_ > >:
-  public ArrangementPainterOstreamBase< CGAL::Arr_linear_traits_2< Kernel_ > >
-{
-public: // typedefs
-  typedef Kernel_                                       Kernel;
-  typedef CGAL::Arr_linear_traits_2< Kernel >           Traits;
-  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
-  typedef typename Superclass::Point_2                  Point_2;
-  typedef typename Superclass::Segment_2                Segment_2;
-  typedef typename Superclass::Ray_2                    Ray_2;
-  typedef typename Superclass::Line_2                   Line_2;
-  typedef typename Superclass::Triangle_2               Triangle_2;
-  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
-  typedef typename Superclass::Circle_2                 Circle_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
-    Superclass( p, clippingRectangle )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    if ( curve.is_segment( ) )
-    {
-      Segment_2 seg = curve.segment( );
-
-      // skip segments outside our view
-      QRectF seg_bb = this->convert( seg.bbox( ) );
-      if ( this->clippingRect.isValid( ) &&
-           ! this->clippingRect.intersects( seg_bb ) )
-      {
-        return *this;
-      }
-
-      this->painterOstream << seg;
-    }
-    else if ( curve.is_ray( ) )
-    {
-      Ray_2 ray = curve.ray( );
-      QLineF qseg = this->convert( ray );
-      if ( qseg.isNull( ) )
-      { // it's out of view
-        return *this;
-      }
-      Segment_2 seg = this->convert( qseg );
-      this-> painterOstream << seg;
-    }
-    else // curve.is_line( )
-    {
-      Line_2 line = curve.line( );
-      QLineF qseg = this->convert( line );
-      if ( qseg.isNull( ) )
-      { // it's out of view
-        return *this;
-      }
-      Segment_2 seg = this->convert( qseg );
-      this-> painterOstream << seg;
-    }
-    return *this;
-  }
-
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    QPointF qpt = this->convert( p );
-    // clip the point if possible
-    if ( this->clippingRect.isValid( ) &&
-         ! this->clippingRect.contains( qpt ) )
-    {
-      return *this;
-    }
-
-    QPen savePen = this->qp->pen( );
-    this->qp->setBrush( QBrush( savePen.color( ) ) );
-    double radius = savePen.width( ) / 2.0;
-    radius /= this->scale;
-
-    this->qp->drawEllipse( qpt, radius, radius );
-
-    this->qp->setBrush( QBrush( ) );
-    this->qp->setPen( savePen );
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-};
-
-template < typename CircularKernel >
-class ArrangementPainterOstream< CGAL::Arr_circular_arc_traits_2<
-                                   CircularKernel > >:
-  public ArrangementPainterOstreamBase< CGAL::Arr_circular_arc_traits_2<
-                                          CircularKernel > >
-{
-public:
-  typedef CircularKernel                                Kernel;
-  typedef CGAL::Arr_circular_arc_traits_2< Kernel >     Traits;
-  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
-  typedef typename Superclass::Point_2                  Point_2;
-  typedef typename Superclass::Segment_2                Segment_2;
-  typedef typename Superclass::Ray_2                    Ray_2;
-  typedef typename Superclass::Line_2                   Line_2;
-  typedef typename Superclass::Triangle_2               Triangle_2;
-  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
-  typedef typename Superclass::Circle_2                 Circle_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
-    Superclass( p, clippingRectangle )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    this->painterOstream << curve;
-    return *this;
-  }
-
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    QPointF qpt = this->convert( p );
-    // clip the point if possible
-    if ( this->clippingRect.isValid( ) &&
-         ! this->clippingRect.contains( qpt ) )
-    {
-      return *this;
-    }
-
-    QPen savePen = this->qp->pen( );
-    this->qp->setBrush( QBrush( savePen.color( ) ) );
-    double radius = savePen.width( ) / 2.0;
-    radius /= this->scale;
-
-    this->qp->drawEllipse( qpt, radius, radius );
-
-    this->qp->setBrush( QBrush( ) );
-    this->qp->setPen( savePen );
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-};
-
-#if 0
-template < typename Coefficient_ >
-class ArrangementPainterOstream< CGAL::Arr_algebraic_segment_traits_2<
-                                   Coefficient_ > >:
-  public ArrangementPainterOstreamBase< CGAL::Arr_algebraic_segment_traits_2<
-                                          Coefficient_ > >
-{
-public:
-  typedef Coefficient_                                  Coefficient;
-  typedef typename CGAL::Arr_algebraic_segment_traits_2< Coefficient >
-                                                        Traits;
-  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
-  typedef typename Traits::CKvA_2                       CKvA_2;
-  typedef typename Traits::Point_2                      Point_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public:
-  /*! Constructor */
-  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
-    Superclass( p, clippingRectangle )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~ArrangementPainterOstream() {}
-
-public: // methods
-  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
-  {
-    //std::cout << "paint curve stub (alg traits)" << std::endl;
-    typedef Curve_renderer_facade<CKvA_2> Facade;
-    typedef std::pair< int, int > Coord_2;
-    typedef std::vector< Coord_2 > Coord_vec_2;
-    this->setupFacade( );
-
-    boost::optional < Coord_2 > p1, p2;
-    std::list<Coord_vec_2> points;
-
-    Facade::instance().draw( curve, points, &p1, &p2 );
-    if(points.empty())
-      return *this;
-
-    // QPainter *ppnt = this->qp;
-    QGraphicsView* view = this->scene->views( ).first( );
-    // int height = view->height();
-    // std::cerr << ws.width() << " and " <<  ws.height() << "\n";
-    typename std::list<Coord_vec_2>::const_iterator lit = points.begin();
-    //ppnt->moveTo((*p1).first, height - (*p1).second);
-    while(lit != points.end()) {
-
-      const Coord_vec_2& vec = *lit;
-      typename Coord_vec_2::const_iterator vit = vec.begin();
-      //std::cerr << "(" << vit->first << "; " << vit->second << ")\n";
-      //         if(lit == points.begin() &&*/ vit != vec.end()) {
-      //             ppnt->lineTo(vit->first, height - vit->second);
-      //             vit++;
-      //         }
-#if 0
-      if(vit != vec.end())
-        ppnt->moveTo(vit->first, height - vit->second);
-
-      while(vit != vec.end()) {
-        ppnt->lineTo(vit->first, height - vit->second);
-        vit++;
-        //std::cerr << "(" << vit->e0 << "; " << vit->e1 << "\n";
-      }
-      lit++;
-#endif
-      QPainterPath path;
-      QPoint coord( vit->first, vit->second );
-      QPointF qpt = view->mapToScene( coord );
-      if ( vit != vec.end() )
-      {
-        path.moveTo( qpt );
-      }
-      while ( vit != vec.end() )
-      {
-        path.lineTo( qpt );
-        vit++;
-        coord = QPoint( vit->first, vit->second );
-        qpt = view->mapToScene( coord );
-        //std::cout << vit->first << " " << vit->second << std::endl;
-      }
-      this->qp->drawPath( path );
-
-      lit++;
-    }
-    //ppnt->lineTo((*p2).first, height - (*p2).second);
-
-#if 0
-    QPen old_pen = ppnt->pen();
-    ppnt->setPen(QPen(Qt::NoPen)); // avoid drawing outlines
-    // draw with the current brush attributes
-
-    //std::cerr << "endpts1: (" << (*p1).first << "; " << (*p1).second << "\n";
-    //std::cerr << "endpts2: (" << (*p2).first << "; " << (*p2).second << "\n";
-
-    unsigned sz = CGAL_REND_PT_RADIUS;
-    ppnt->drawEllipse((*p1).first - sz, height-(*p1).second - sz, sz*2, sz*2);
-    ppnt->drawEllipse((*p2).first - sz, height-(*p2).second - sz, sz*2, sz*2);
-    ppnt->setPen(old_pen);
-#endif
-
-    return *this;
-  }
-
-  ArrangementPainterOstream& operator<<( const Point_2& p )
-  {
-    typedef Curve_renderer_facade<CKvA_2> Facade;
-    std::pair< int, int > coord;
-    //std::cout << "draw point stub" << std::endl;
-
-    this->setupFacade( );
-
-    if(!Facade::instance().draw(p, coord)) {
-      return *this;
-    }
-    else
-    {
-      //std::cout << coord.first << " " << coord.second << std::endl;
-      QPoint coords( coord.first, coord.second );
-      QGraphicsView* view = this->scene->views( ).first( );
-      QPointF qpt = view->mapToScene( coords );
-
-      QPen savePen = this->qp->pen( );
-      this->qp->setBrush( QBrush( savePen.color( ) ) );
-      double radius = savePen.width( ) / 2.0;
-      radius /= this->scale;
-
-      this->qp->drawEllipse( qpt, radius, radius );
-
-      this->qp->setBrush( QBrush( ) );
-      this->qp->setPen( savePen );
-
-    }
-#if 0
-
-    QPainter *ppnt = &ws.get_painter();
-    QPen old_pen = ppnt->pen();
-    ppnt->setPen(QPen(Qt::NoPen));
-
-    unsigned sz = CGAL_REND_PT_RADIUS;
-    ppnt->drawEllipse(coord.first - sz, ws.height() - coord.second - sz,
-                      sz*2, sz*2);
-    ppnt->setPen(old_pen);
-#endif
-
-    return *this;
-  }
-
-  template < typename T >
-  ArrangementPainterOstream& operator<<( const T& p )
-  {
-    (*(static_cast< Superclass* >(this)) << p);
-    return *this;
-  }
-
-protected:
-  void setupFacade( )
-  {
-    typedef Curve_renderer_facade<CKvA_2> Facade;
-    QGraphicsView* view = this->scene->views( ).first( );
-    QRectF viewport = this->viewportRect( );
-    CGAL::Bbox_2 bbox = this->convert( viewport ).bbox( );
-    Facade::setup(bbox, view->width(), view->height());
-  }
-};
-#endif
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementTypes.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementTypes.h
deleted file mode 100644
index a8fcc5a..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementTypes.h
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright (c) 2005,2012 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/cgal_types.h $
-// $Id: cgal_types.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef ARRANGEMENT_DEMO_TYPES_H
-#define ARRANGEMENT_DEMO_TYPES_H
-
-#include <CGAL/basic.h>
-
-/*
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/IO/Qt_help_window.h>
-*/
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_default_dcel.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_algebraic_segment_traits_2.h>
-#include <CGAL/Arrangement_with_history_2.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Arr_trapezoid_ric_point_location.h>
-#include <CGAL/Arr_simple_point_location.h>
-#include <CGAL/Arr_walk_along_line_point_location.h>
-#include <CGAL/Arr_landmarks_point_location.h>
-#include <CGAL/squared_distance_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Bbox_2.h>
-
-#include <CGAL/Arr_observer.h>
-#include <CGAL/Polygon_2.h>
-
-// Coordinate related typedef - using inexact number type
-typedef float                                           Coord_type;
-typedef CGAL::Cartesian<Coord_type>                     Coord_kernel;
-typedef Coord_kernel::Point_2                           Coord_point;
-typedef Coord_kernel::Segment_2                         Coord_segment;
-typedef Coord_kernel::Circle_2                          Coord_circle;
-
-
-typedef CGAL::Polygon_2<Coord_kernel> My_polygon;
-                                      // polygon is usefull for filling faces
-
-#ifdef CGAL_USE_GMP
-  #include <CGAL/Gmpq.h>
-  typedef CGAL::Gmpq                                    NT;
-#else
-  #include <CGAL/MP_Float.h>
-  #include <CGAL/Quotient.h>
-  typedef CGAL::Quotient<CGAL::MP_Float>                NT;
-#endif
-// instead of
-//typedef CGAL::Cartesian<NT>                           Kernel;
-// workaround for VC++
-struct Kernel : public CGAL::Cartesian<NT> {};
-
-class Face_with_color : public CGAL::Arr_face_base
-{
-  QColor    m_color;
-  bool      m_visited;
-
-public:
-  Face_with_color() : CGAL::Arr_face_base(), m_color(), m_visited(false) { }
-
-  QColor color() const { return m_color; }
-  void set_color(const QColor& c) { m_color = c; }
-  bool visited() const{ return m_visited; }
-  void set_visited(bool b) { m_visited = b; }
-};
-
-template <class Traits>
-class Dcel :
-  public CGAL::Arr_dcel_base<CGAL::Arr_vertex_base<typename Traits::Point_2>,
-                             CGAL::Arr_halfedge_base<
-                               typename Traits::X_monotone_curve_2>,
-                             Face_with_color>
-{
-public:
-   /*! \struct
-   * An auxiliary structure for rebinding the DCEL with a new traits class.
-   */
-  template <typename T>
-  struct rebind
-  {
-    typedef Dcel<T> other;
-  };
-
-  // CREATION
-  Dcel() {}
-};
-
-// Segments:
-typedef CGAL::Arr_segment_traits_2<Kernel>              Seg_traits;
-typedef Seg_traits::Curve_2                             Arr_seg_2;
-typedef Seg_traits::X_monotone_curve_2                  Arr_xseg_2;
-typedef Seg_traits::Point_2                             Arr_seg_point_2;
-typedef Dcel<Seg_traits>                                Seg_dcel;
-typedef CGAL::Arrangement_with_history_2<Seg_traits, Seg_dcel>
-                                                        Seg_arr;
-typedef Seg_arr::Halfedge                               Seg_halfedge;
-typedef Seg_arr::Halfedge_handle                        Seg_halfedge_handle;
-typedef Seg_arr::Face_handle                            Seg_face_handle;
-typedef Seg_arr::Ccb_halfedge_circulator
-  Seg_ccb_halfedge_circulator;
-typedef Seg_arr::Hole_iterator                          Seg_holes_iterator;
-typedef Seg_arr::Face_iterator                          Seg_face_iterator;
-typedef std::list<Arr_seg_2*>                           Arr_seg_list;
-typedef Arr_seg_list::const_iterator                    Arr_seg_const_iter;
-typedef Arr_seg_list::iterator                          Arr_seg_iter;
-
-
-// point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Seg_arr>
-  Seg_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Seg_arr>
-  Seg_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Seg_arr>
-  Seg_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Seg_arr>
-  Seg_lanmarks_point_location;
-
-// Polyline
-typedef CGAL::Arr_polyline_traits_2<Seg_traits>         Pol_traits;
-
-typedef Pol_traits::Curve_2                             Arr_pol_2;
-typedef Pol_traits::X_monotone_curve_2                  Arr_xpol_2;
-
-typedef Pol_traits::Point_2                             Arr_pol_point_2;
-typedef Dcel<Pol_traits>                                Pol_dcel;
-typedef CGAL::Arrangement_with_history_2<Pol_traits,
-                                         Pol_dcel>      Pol_arr;
-typedef Pol_arr::Halfedge_handle                        Pol_halfedge_handle;
-typedef Pol_arr::Face_handle                            Pol_face_handle;
-typedef Pol_arr::Ccb_halfedge_circulator
-  Pol_ccb_halfedge_circulator;
-typedef Pol_arr::Hole_iterator                          Pol_holes_iterator;
-typedef Pol_arr::Halfedge                               Pol_halfedge;
-typedef Pol_arr::Face_iterator                          Pol_face_iterator;
-
-typedef std::list<Arr_pol_2*>                            Arr_pol_list;
-typedef Arr_pol_list::const_iterator                     Arr_pol_const_iter;
-typedef Arr_pol_list::iterator                           Arr_pol_iter;
-
-// point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Pol_arr>
-  Pol_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Pol_arr>
-  Pol_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Pol_arr>
-  Pol_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Pol_arr>
-  Pol_lanmarks_point_location;
-
-
-// Conics
-
-#ifdef CGAL_USE_CORE
-
-#include <CGAL/CORE_algebraic_number_traits.h>
-
-typedef CGAL::CORE_algebraic_number_traits              Nt_traits;
-typedef Nt_traits::Rational                             Rational;
-typedef Nt_traits::Algebraic                            Algebraic;
-typedef CGAL::Cartesian<Rational>                       Rat_kernel;
-typedef CGAL::Cartesian<Algebraic>                      Alg_kernel;
-
-// instead of
-typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
-                                                        Conic_traits;
-// workaround for VC++
-/*
-struct Conic_traits: public CGAL::Arr_conic_traits_2<Rat_kernel,
-                                                     Alg_kernel,
-                                                     Nt_traits>   {};
-*/
-
-typedef  Conic_traits::Curve_2                          Arr_conic_2;
-typedef  Conic_traits::Rat_point_2                      Rat_point_2;
-typedef  Conic_traits::Rat_segment_2                    Rat_segment_2;
-typedef  Conic_traits::Rat_circle_2                     Rat_circle_2;
-typedef  Conic_traits::Rat_line_2                       Rat_line_2;
-
-typedef Conic_traits::X_monotone_curve_2                Arr_xconic_2;
-typedef Conic_traits::Point_2                           Arr_conic_point_2;
-typedef Dcel<Conic_traits>                              Conic_dcel;
-typedef CGAL::Arrangement_with_history_2<Conic_traits, Conic_dcel>
-                                                        Conic_arr;
-typedef Conic_arr::Halfedge_handle                      Conic_halfedge_handle;
-typedef Conic_arr::Face_handle                          Conic_face_handle;
-typedef Conic_arr::Ccb_halfedge_circulator
-  Conic_ccb_halfedge_circulator;
-typedef Conic_arr::Hole_iterator                        Conic_holes_iterator;
-//typedef CGAL::Arr_file_scanner<Conic_arr>                Arr_scanner;
-typedef Conic_arr::Halfedge                             Conic_halfedge;
-typedef Conic_arr::Face_iterator                        Conic_face_iterator;
-
-typedef std::list<Arr_xconic_2*>                        Arr_xconic_list;
-typedef Arr_xconic_list::const_iterator                 Arr_xconic_const_iter;
-typedef Arr_xconic_list::iterator                       Arr_xconic_iter;
-
-// point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Conic_arr>
-  Conic_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Conic_arr>
-  Conic_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Conic_arr>
-  Conic_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Conic_arr>
- Conic_lanmarks_point_location;
-
-#endif
-
-// Linear:
-typedef CGAL::Arr_linear_traits_2<Kernel>               Lin_traits;
-typedef Lin_traits::Curve_2                             Arr_lin_2;
-typedef Lin_traits::X_monotone_curve_2                  Arr_xlin_2;
-typedef Lin_traits::Point_2                             Arr_lin_point_2;
-typedef Dcel<Lin_traits>                                Lin_dcel;
-typedef CGAL::Arrangement_with_history_2<Lin_traits, Lin_dcel>
-                                                        Lin_arr;
-typedef Lin_arr::Halfedge                               Lin_halfedge;
-typedef Lin_arr::Halfedge_handle                        Lin_halfedge_handle;
-typedef Lin_arr::Face_handle                            Lin_face_handle;
-typedef Lin_arr::Ccb_halfedge_circulator
-  Lin_ccb_halfedge_circulator;
-typedef Lin_arr::Hole_iterator                          Lin_holes_iterator;
-typedef Lin_arr::Face_iterator                          Lin_face_iterator;
-typedef std::list<Arr_lin_2*>                           Arr_lin_list;
-typedef Arr_lin_list::const_iterator                    Arr_lin_const_iter;
-typedef Arr_lin_list::iterator                          Arr_lin_iter;
-
-//point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Lin_arr>
-  Lin_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Lin_arr>
-  Lin_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Lin_arr>
-  Lin_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Lin_arr>
-  Lin_landmarks_point_location;
-
-
-#include <CGAL/Exact_circular_kernel_2.h>
-#include <CGAL/Arr_circular_arc_traits_2.h>
-
-// Circular arcs:
-typedef CGAL::Exact_circular_kernel_2                     CircularKernel;
-typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Arc_traits;
-typedef Arc_traits::Curve_2                               Arr_arc_2;
-typedef Arc_traits::X_monotone_curve_2                    Arr_xarc_2;
-typedef Arc_traits::Point_2                               Arr_arc_point_2;
-typedef Dcel<Arc_traits>                                  Arc_dcel;
-typedef CGAL::Arrangement_with_history_2<Arc_traits, Arc_dcel>
-                                                          Arc_arr;
-typedef Arc_arr::Halfedge                                 Arc_halfedge;
-typedef Arc_arr::Halfedge_handle                          Arc_halfedge_handle;
-typedef Arc_arr::Face_handle                              Arc_face_handle;
-typedef Arc_arr::Ccb_halfedge_circulator
-  Arc_ccb_halfedge_circulator;
-typedef Arc_arr::Hole_iterator                            Arc_holes_iterator;
-typedef Arc_arr::Face_iterator                            Arc_face_iterator;
-typedef std::list<Arr_arc_2*>                             Arr_arc_list;
-typedef Arr_arc_list::const_iterator                      Arr_arc_const_iter;
-typedef Arr_arc_list::iterator                            Arr_arc_iter;
-
-//point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Arc_arr>
-  Arc_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Arc_arr>
-  Arc_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Arc_arr>
-  Arc_walk_point_location;
-#if 0 // not supported
-typedef CGAL::Arr_landmarks_point_location<Arc_arr>
-  Arc_landmarks_point_location;
-#endif
-
-typedef Nt_traits::Integer Coefficient;
-typedef CGAL::Arr_algebraic_segment_traits_2<Coefficient> Alg_seg_traits;
-typedef Dcel< Alg_seg_traits >                            Alg_seg_dcel;
-typedef CGAL::Arrangement_with_history_2< Alg_seg_traits, Alg_seg_dcel >
-                                                          Alg_seg_arr;
-
-template <class Arrangement_>
-class My_observer : public CGAL::Arr_observer<Arrangement_>
-{
-public:
-
-  typedef Arrangement_                                  Arrangement;
-  typedef CGAL::Arr_observer<Arrangement>               Arr_observer;
-  typedef typename Arrangement::Face_handle             Face_handle;
-
-  My_observer (Arrangement& arr) : Arr_observer (arr) {}
-
-   virtual void after_split_face (Face_handle  f ,
-                                  Face_handle  new_f ,
-                                  bool         /* is_hole */)
-  {
-    new_f ->set_color(f->color());
-  }
-
-};
-
-//Q_DECLARE_METATYPE( Seg_arr )
-//Q_DECLARE_METATYPE( Pol_arr )
-//Q_DECLARE_METATYPE( Conic_arr )
-Q_DECLARE_METATYPE( CGAL::Object )
-
-#endif // ARRANGEMENT_DEMO_TYPES_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/CMakeLists.txt
deleted file mode 100644
index f192fd3..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/CMakeLists.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Arrangement_2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Core Qt4 )
-include( ${CGAL_USE_FILE} )
-
-find_package( Qt4 )
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND)
-  include( ${QT_USE_FILE} )
-  include_directories( ./ )
-  # Arrangement package includes
-  include_directories( BEFORE ../../include )
-
-  qt4_wrap_ui( arrangement_2_uis
-    ArrangementDemoWindow.ui
-    NewTabDialog.ui
-    OverlayDialog.ui
-    ArrangementDemoPropertiesDialog.ui
-  )
-  qt4_wrap_cpp( arrangement_2_mocs
-    ArrangementDemoWindow.h
-    ArrangementDemoTab.h
-    Callback.h
-#    NewTabDialog.h
-    OverlayDialog.h
-    ArrangementDemoPropertiesDialog.h
-    ColorItemEditor.h
-    DeleteCurveModeItemEditor.h
-    PropertyValueDelegate.h
-    #PropertyValueDelegate.cpp
-  )
-  qt4_add_resources( arrangement_2_resources
-    ArrangementDemoWindow.qrc
-  )
-  add_executable( arrangement_2
-    arrangement_2.cpp
-    ArrangementGraphicsItem.cpp
-    ArrangementDemoWindow.cpp
-    ArrangementDemoTab.cpp
-    ArrangementDemoGraphicsView.cpp
-    Callback.cpp
-    VerticalRayShootCallback.cpp
-    EnvelopeCallback.cpp
-    SplitEdgeCallback.cpp
-    FillFaceCallback.cpp
-    GraphicsViewSegmentInput.cpp
-    GraphicsViewCurveInput.cpp
-    Utils.cpp
-    NewTabDialog.cpp
-    OverlayDialog.cpp
-    ArrangementDemoPropertiesDialog.cpp
-    ColorItemEditor.cpp
-    PropertyValueDelegate.cpp
-    DeleteCurveMode.cpp
-    DeleteCurveModeItemEditor.cpp
-    PointsGraphicsItem.cpp
-    VerticalRayGraphicsItem.cpp
-   ${arrangement_2_mocs}
-   ${arrangement_2_uis}
-   ${arrangement_2_resources}
-  )
-
-  target_link_libraries( arrangement_2
-    ${CGAL_LIBRARIES}
-    ${CGAL_3RD_PARTY_LIBRARIES}
-    ${QT_LIBRARIES}
-  )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
-
-# add_subdirectory( tests )
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ColorItemEditor.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
deleted file mode 100644
index 79ab960..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
- ** All rights reserved.
- ** Contact: Nokia Corporation (qt-info at nokia.com)
- **
- ** This file is part of the examples of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain additional
- ** rights.  These rights are described in the Nokia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file.  Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- ** If you have questions regarding the use of this file, please contact
- ** Nokia at qt-info at nokia.com.
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include <QtGui>
-#include <iostream>
-
-#include "ColorItemEditor.h"
-
-ColorItemEditor::ColorItemEditor( QWidget* widget ) : QPushButton( widget )
-{
-  this->setText( tr("Select a color") );
-}
-
-QColor ColorItemEditor::color( ) const
-{
-  return this->m_color;
-}
-
-void ColorItemEditor::setColor( QColor color )
-{
-  this->m_color = color;
-}
-
-void ColorItemEditor::mousePressEvent(QMouseEvent* /* e */)
-{
-  QColor selectedColor = QColorDialog::getColor(this->m_color);
-  if (selectedColor.isValid()) {
-    // std::cout << selectedColor.name().toStdString() << std::endl;
-    this->setColor( selectedColor );
-  }
-
-  emit confirmed();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp
deleted file mode 100644
index 50e000f..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#include "DeleteCurveModeItemEditor.h"
-
-DeleteCurveModeItemEditor::DeleteCurveModeItemEditor( QWidget* parent ) :
-  QComboBox( parent )
-{
-  this->setFrame( false );
-
-  QVariant deleteCurveOption = QVariant::fromValue( DeleteCurveMode( ) );
-  QVariant deleteEdgeOption =
-    QVariant::fromValue( DeleteCurveMode( DeleteCurveMode::DELETE_EDGE ) );
-  this->insertItem( 0, "Delete Curve", deleteCurveOption );
-  this->insertItem( 1, "Delete Edge", deleteEdgeOption );
-}
-
-DeleteCurveMode DeleteCurveModeItemEditor::mode( ) const
-{
-  return qVariantValue<DeleteCurveMode >(this->itemData(this->currentIndex( ),
-                                                        Qt::UserRole ) );
-}
-
-void DeleteCurveModeItemEditor::setMode( DeleteCurveMode m )
-{
-  if ( m.mode( ) == DeleteCurveMode::DELETE_CURVE )
-  {
-    this->setCurrentIndex( 0 );
-  }
-  else
-  {
-    this->setCurrentIndex( 1 );
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.cpp
deleted file mode 100644
index 8b60853..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#include "OverlayDialog.h"
-#include "ArrangementDemoWindow.h"
-#include "ArrangementTypes.h"
-
-#include <QListWidgetItem>
-#include <QString>
-#include <QItemSelectionModel>
-
-#include "ui_OverlayDialog.h"
-
-// TODO: Don't color the text, but set an icon for each arrangement type...
-// TODO: Or maybe don't bother
-OverlayDialog::OverlayDialog( ArrangementDemoWindow* parent,
-                              Qt::WindowFlags f ) :
-  QDialog( parent, f ),
-  ui( new Ui::OverlayDialog )
-{
-  // An extra parenthesis around QColor to avoid the
-  // http://en.wikipedia.org/wiki/Most_vexing_parse
-  // on clang
-  QBrush segColor( ( QColor( ::Qt::red ) ) );
-  QBrush polyColor( ( QColor( ::Qt::darkGreen ) ) );
-  QBrush conicColor( ( QColor( ::Qt::blue ) ) );
-  this->ui->setupUi( this );
-
-  std::vector< QString > labels = parent->getTabLabels( );
-  std::vector< CGAL::Object > arrangements = parent->getArrangements( );
-    
-  for ( unsigned int i = 0; i < labels.size( ); ++i )
-  {
-    QListWidgetItem* item =
-      new QListWidgetItem( this->ui->arrangementsListWidget );
-    item->setText( labels[ i ] );
-    item->setData( ARRANGEMENT, QVariant::fromValue( arrangements[ i ] ) );
-    QIcon icon;
-    Seg_arr* seg;
-    Pol_arr* pol;
-    Conic_arr* conic;
-    Lin_arr* lin;
-    Arc_arr* arc;
-    // Alg_seg_arr* alg;
-    if ( CGAL::assign( seg, arrangements[ i ] ) )
-    {
-      icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(),
-                   QIcon::Normal, QIcon::Off);
-    }
-    else if ( CGAL::assign( pol, arrangements[ i ] ) )
-    {
-      icon.addFile(QString::fromUtf8(":/icons/yellow_icon.xpm"), QSize(),
-                   QIcon::Normal, QIcon::Off);
-    }
-    else if ( CGAL::assign( conic, arrangements[ i ] ) )
-    {
-      icon.addFile(QString::fromUtf8(":/icons/red_icon.xpm"), QSize(),
-                   QIcon::Normal, QIcon::Off);
-    }
-    else if ( CGAL::assign( lin, arrangements[ i ] ) )
-    {
-      icon.addFile(QString::fromUtf8(":/icons/blue_icon.xpm"), QSize(),
-                   QIcon::Normal, QIcon::Off);
-    }
-    else if ( CGAL::assign( arc, arrangements[ i ] ) )
-    {
-      icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(),
-                   QIcon::Normal, QIcon::Off);
-    }
-    // else if ( CGAL::assign( alg, arrangements[ i ] ) )
-    // {
-    //   icon.addFile(QString::fromUtf8(":/icons/yellow_icon.xpm"), QSize(),
-    //                QIcon::Normal, QIcon::Off);
-    // }
-    item->setIcon( icon );
-  }
-}
-
-std::vector< CGAL::Object >
-OverlayDialog::selectedArrangements( ) const
-{
-  std::vector< CGAL::Object > res;
-  for ( int i = 0; i < this->ui->overlayListWidget->count( ); ++i )
-  {
-    QListWidgetItem* item = this->ui->overlayListWidget->item( i );
-    QVariant data = item->data( ARRANGEMENT );
-    CGAL::Object arr = data.value< CGAL::Object >( );
-    res.push_back( arr );
-  }
-  return res;
-}
-
-void OverlayDialog::on_pickPushButton_pressed( )
-{
-  int currentIndex = this->ui->arrangementsListWidget->currentRow( );
-  if ( currentIndex == -1 )
-    return;
-
-  if ( !(this->ui->arrangementsListWidget->item( currentIndex )->flags( ) &
-         Qt::ItemIsEnabled) )
-  {
-    return;
-  }
-  QListWidgetItem* takenItem =
-    this->ui->arrangementsListWidget->takeItem( currentIndex );
-  this->ui->overlayListWidget->addItem( takenItem );
-
-  if ( this->ui->overlayListWidget->count( ) == 2 )
-  {
-    this->ui->pickPushButton->setEnabled( false );
-  }
-  else
-  {
-    this->ui->pickPushButton->setEnabled( true );
-  }
-  QItemSelectionModel* selectionModel =
-    this->ui->arrangementsListWidget->selectionModel( );
-  selectionModel->clearSelection( );
-  this->restrictSelection( takenItem );
-}
-
-void OverlayDialog::on_unpickPushButton_pressed( )
-{
-  int currentIndex = this->ui->overlayListWidget->currentRow( );
-  if ( currentIndex == -1 )
-    return;
-
-  QListWidgetItem* takenItem =
-    this->ui->overlayListWidget->takeItem( currentIndex );
-  this->ui->arrangementsListWidget->addItem( takenItem );
-
-  if ( this->ui->overlayListWidget->count( ) == 2 )
-  {
-    this->ui->pickPushButton->setEnabled( false );
-  }
-  else
-  {
-    this->ui->pickPushButton->setEnabled( true );
-  }
-  if ( this->ui->overlayListWidget->count( ) == 0 )
-    this->unrestrictSelection( );
-}
-
-void OverlayDialog::restrictSelection( QListWidgetItem* item )
-{
-  CGAL::Object o = item->data( ARRANGEMENT ).value< CGAL::Object >( );
-  Seg_arr* seg;
-  Pol_arr* pol;
-  Conic_arr* conic;
-  Lin_arr* lin;
-  Arc_arr* arc;
-  // Alg_seg_arr* alg;
-  if ( CGAL::assign( seg, o ) )
-  {
-    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-    {
-      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-      bool enabled = CGAL::assign( seg, o2 );
-      Qt::ItemFlags flags = otherItem->flags( );
-      if ( ! enabled )
-      {
-        flags &= ~( Qt::ItemIsEnabled );
-      }
-      else
-      {
-        flags |= Qt::ItemIsEnabled;
-      }
-      otherItem->setFlags( flags );
-    }
-  }
-  else if ( CGAL::assign( pol, o ) )
-  {
-    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-    {
-      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-      bool enabled = CGAL::assign( pol, o2 );
-      Qt::ItemFlags flags = otherItem->flags( );
-      if ( ! enabled )
-      {
-        flags &= ~( Qt::ItemIsEnabled );
-      }
-      else
-      {
-        flags |= Qt::ItemIsEnabled;
-      }
-      otherItem->setFlags( flags );
-    }
-  }
-  else if ( CGAL::assign( conic, o ) )
-  {
-    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-    {
-      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-      bool enabled = CGAL::assign( conic, o2 );
-      Qt::ItemFlags flags = otherItem->flags( );
-      if ( ! enabled )
-      {
-        flags &= ~( Qt::ItemIsEnabled );
-      }
-      else
-      {
-        flags |= Qt::ItemIsEnabled;
-      }
-      otherItem->setFlags( flags );
-    }
-  }
-  else if ( CGAL::assign( lin, o ) )
-  {
-    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-    {
-      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-      bool enabled = CGAL::assign( lin, o2 );
-      Qt::ItemFlags flags = otherItem->flags( );
-      if ( ! enabled )
-      {
-        flags &= ~( Qt::ItemIsEnabled );
-      }
-      else
-      {
-        flags |= Qt::ItemIsEnabled;
-      }
-      otherItem->setFlags( flags );
-    }
-  }
-  else if ( CGAL::assign( arc, o ) )
-  {
-    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-    {
-      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-      bool enabled = CGAL::assign( arc, o2 );
-      Qt::ItemFlags flags = otherItem->flags( );
-      if ( ! enabled )
-      {
-        flags &= ~( Qt::ItemIsEnabled );
-      }
-      else
-      {
-        flags |= Qt::ItemIsEnabled;
-      }
-      otherItem->setFlags( flags );
-    }
-  }
-  // else if ( CGAL::assign( alg, o ) )
-  // {
-  //   for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-  //   {
-  //     QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-  //     CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
-  //     bool enabled = CGAL::assign( alg, o2 );
-  //     Qt::ItemFlags flags = otherItem->flags( );
-  //     if ( ! enabled )
-  //     {
-  //       flags &= ~( Qt::ItemIsEnabled );
-  //     }
-  //     else
-  //     {
-  //       flags |= Qt::ItemIsEnabled;
-  //     }
-  //     otherItem->setFlags( flags );
-  //   }
-  // }
-}
-
-void OverlayDialog::unrestrictSelection( )
-{
-  for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
-  {
-    QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
-    Qt::ItemFlags flags = otherItem->flags( );
-    flags |= Qt::ItemIsEnabled;
-    otherItem->setFlags( flags );
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp
deleted file mode 100644
index 71c7320..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#include "ColorItemEditor.h"
-#include "DeleteCurveModeItemEditor.h"
-#include "PropertyValueDelegate.h"
-#include "DeleteCurveMode.h"
-
-#include <iostream>
-
-PropertyValueDelegate::PropertyValueDelegate( QObject* parent ):
-  QItemDelegate( parent )
-{ 
-  QItemEditorFactory* factory = new QItemEditorFactory;
-  QItemEditorCreatorBase* creator =
-    new QStandardItemEditorCreator< PositiveSpinBox >( );
-  factory->registerEditor( QVariant::UInt, creator );
-  this->setItemEditorFactory( factory );
-}
-
-QWidget* PropertyValueDelegate::
-createEditor( QWidget* parent, const QStyleOptionViewItem& option,
-              const QModelIndex& index ) const
-{
-  QWidget* editor;
-  QVariant myData = index.data( Qt::UserRole );
-
-  // check for data types we need to handle ourselves
-  if ( qVariantCanConvert< QColor >( myData ) )
-  {
-    ColorItemEditor* colorEditor = new ColorItemEditor( parent );
-    editor = colorEditor;
-
-    QObject::connect( colorEditor, SIGNAL(confirmed()), this, SLOT(commit()));
-  }
-  else if ( qVariantCanConvert< DeleteCurveMode >( myData ) )
-  {
-    DeleteCurveModeItemEditor* modeEditor =
-      new DeleteCurveModeItemEditor( parent );
-    modeEditor->setMode( qVariantValue< DeleteCurveMode >( myData ) );
-    editor = modeEditor;
-
-    QObject::connect( modeEditor, SIGNAL( currentIndexChanged( int ) ), this,
-                      SLOT( commit( ) ) );
-  }
-  else
-  { // default handler
-    editor = QItemDelegate::createEditor( parent, option, index );
-  }
-
-  return editor;
-}
-
-void PropertyValueDelegate::setModelData( QWidget* editor,
-                                          QAbstractItemModel* model,
-                                          const QModelIndex& index ) const
-{
-  ColorItemEditor* colorEditor = qobject_cast<ColorItemEditor*>(editor);
-  if (colorEditor)
-  {
-    // std::cout << "set color model data" << std::endl;
-    model->setData(index, colorEditor->color(), Qt::DisplayRole);
-    model->setData(index, colorEditor->color(), Qt::DecorationRole);
-    model->setData(index, QVariant::fromValue(colorEditor->color()),
-                    Qt::UserRole);
-    return;
-  }
-  DeleteCurveModeItemEditor* modeEditor =
-    qobject_cast<DeleteCurveModeItemEditor*>(editor);
-  if (modeEditor) {
-    model->setData(index, DeleteCurveMode::ToString(modeEditor->mode()),
-                   Qt::DisplayRole);
-    model->setData(index, QVariant::fromValue(modeEditor->mode()),
-                   Qt::UserRole);
-    return;
-  }
-  QItemDelegate::setModelData(editor, model, index);
-}
-
-bool PropertyValueDelegate::eventFilter( QObject* object, QEvent* event )
-{
-  QWidget* editor = qobject_cast<QWidget*>(object);
-  if ((event->type() == QEvent::FocusOut) ||
-      (event->type() == QEvent::Hide && editor->isWindow()))
-  {
-    ColorItemEditor* colorEditor = qobject_cast<ColorItemEditor*>(editor);
-    if (colorEditor)
-      return false;
-    DeleteCurveModeItemEditor* modeEditor =
-      qobject_cast<DeleteCurveModeItemEditor*>(editor);
-    if (modeEditor)
-      return false;
-  }
-  return QItemDelegate::eventFilter( object, event );
-}
-
-void PropertyValueDelegate::commit( )
-{
-  // std::cout << "commit selection" << std::endl;
-  QWidget* editor = qobject_cast< QWidget* >( sender( ) );
-  if ( editor )
-  {
-    emit( commitData( editor ) );
-    emit( closeEditor( editor ) );
-  }
-}
-
-PositiveSpinBox::PositiveSpinBox( QWidget* parent ) :
-  QSpinBox( parent )
-{
-  this->setMinimum( 1 );
-}
-
-void PositiveSpinBox::setValue( unsigned int val )
-{
-  QSpinBox::setValue( val );
-}
-
-unsigned int PositiveSpinBox::value( ) const
-{
-  return QSpinBox::value( );
-}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.h
deleted file mode 100644
index db8913d..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PropertyValueDelegate.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef PROPERTY_VALUE_DELEGATE_H
-#define PROPERTY_VALUE_DELEGATE_H
-
-#include <QtGui>
-
-class PropertyValueDelegate : public QItemDelegate
-{
-  Q_OBJECT
-
-  public:
-  PropertyValueDelegate( QObject* parent = 0 );
-
-public:
-  QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,
-                         const QModelIndex& index ) const;
-  void setModelData( QWidget* editor, QAbstractItemModel* model,
-                     const QModelIndex& index ) const;
-  bool eventFilter( QObject* object, QEvent* event );
-
-public slots:
-  void commit( );
-
-};
-
-class PositiveSpinBox : public QSpinBox
-{
-  Q_OBJECT
-  Q_PROPERTY( unsigned int value READ value WRITE setValue USER true )
-
-    public:
-    PositiveSpinBox( QWidget* parent );
-  void setValue( unsigned int );
-  unsigned int value( ) const;
-};
-
-#endif // PROPERTY_VALUE_DELEGATE_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Utils.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Utils.h
deleted file mode 100644
index 488e48b..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Utils.h
+++ /dev/null
@@ -1,1630 +0,0 @@
-// Copyright (c) 2012  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: $
-// $Id: $
-//
-// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
-
-#ifndef CGAL_ARRANGEMENTS_DEMO_UTILS_H
-#define CGAL_ARRANGEMENTS_DEMO_UTILS_H
-
-#include <CGAL/iterator.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QGraphicsView>
-#include <QGraphicsScene>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Arr_circular_arc_traits_2.h>
-#include <CGAL/Arr_algebraic_segment_traits_2.h>
-#include <CGAL/Arr_walk_along_line_point_location.h>
-
-#include "ArrangementTypes.h"
-
-class QGraphicsScene;
-
-class QGraphicsSceneMixin
-{
-public:
-  /*! Costructor */
-  QGraphicsSceneMixin( ) : scene( 0 ) { }
-
-  /*! Destructor (virtual) */
-  virtual ~QGraphicsSceneMixin() {}
-
-  virtual void setScene( QGraphicsScene* scene_ ) { this->scene = scene_; }
-
-  virtual QGraphicsScene* getScene( ) const { return this->scene; }
-
-  virtual QRectF viewportRect( ) const
-  {
-    QRectF res;
-    if ( this->scene == NULL )
-    {
-      return res;
-    }
-
-    QList< QGraphicsView* > views = this->scene->views( );
-    if ( views.size( ) == 0 )
-    {
-      return res;
-    }
-    // assumes the first view is the right one
-    QGraphicsView* viewport = views.first( );
-    QPointF p1 = viewport->mapToScene( 0, 0 );
-    QPointF p2 = viewport->mapToScene(viewport->width(), viewport->height());
-
-    double xmin = (std::min)(p1.x(), p2.x());
-    double xmax = (std::max)(p1.x(), p2.x());
-    double ymin = (std::min)(p1.y(), p2.y());
-    double ymax = (std::max)(p1.y(), p2.y());
-
-    res = QRectF( QPointF( xmin, ymin ), QPointF( xmax, ymax ) );
-
-    return res;
-  }
-
-  QPoint fromScene( QPointF p, bool* ok = 0 )
-  {
-    QPoint res;
-    if ( this->scene == NULL )
-    {
-      if ( ok ) { *ok = false; }
-      return res;
-    }
-    QList< QGraphicsView* > views = this->scene->views( );
-    if ( views.size( ) == 0 )
-    {
-      if ( ok ) { *ok = false; }
-      return res;
-    }
-
-    // assumes the first view is the right one
-    QGraphicsView* viewport = views.first( );
-
-    if ( ok ) { *ok = true; }
-    res = viewport->mapFromScene( p );
-    return res;
-  }
-
-  QPointF toScene( QPoint p, bool* ok = 0 )
-  {
-    QPointF res;
-    if ( this->scene == NULL )
-    {
-      if ( ok ) { *ok = false; }
-      return res;
-    }
-    QList< QGraphicsView* > views = this->scene->views( );
-    if ( views.size( ) == 0 )
-    {
-      if ( ok ) { *ok = false; }
-      return res;
-    }
-
-    // assumes the first view is the right one
-    QGraphicsView* viewport = views.first( );
-
-    if ( ok ) { *ok = true; }
-    res = viewport->mapToScene( p );
-    return res;
-  }
-
-  int fromScene( double d, bool* ok = 0 )
-  {
-    QPointF p( d, 0 );
-    QPoint pp = this->fromScene( p, ok );
-    return pp.x( );
-  }
-
-  double toScene( int i, bool* ok = 0 )
-  {
-    QPoint p( i, 0 );
-    QPointF pp = this->toScene( p, ok );
-    return pp.x( );
-  }
-
-protected: // fields
-  QGraphicsScene* scene;
-};
-
-BOOST_MPL_HAS_XXX_TRAIT_DEF( Approximate_2 )
-
-template < class Arr_, bool b = has_Approximate_2< Arr_ >::value >
-struct Supports_landmarks
-{
-  typedef CGAL::Boolean_tag< b > Tag;
-  struct LandmarksType { };
-};
-
-template < class Arr_ >
-struct Supports_landmarks< Arr_, true >
-{
-  typedef CGAL::Tag_true Tag;
-  typedef CGAL::Arr_landmarks_point_location< Arr_ > LandmarksType;
-};
-
-/**
-   Support for new ArrTraits should specify types:
-
-   * Kernel - a not-necessarily-exact kernel to represent the arrangement
-   graphically. We'll use the Point_2 type provided by this kernel for
-   computing distances
-   * Point_2 - the point type used in the particular arrangement
-   * CoordinateType - the coordinate type used by the point type
-   */
-template < class ArrTraits >
-class ArrTraitsAdaptor
-{ };
-
-template < class Kernel_ >
-class ArrTraitsAdaptor< CGAL::Arr_segment_traits_2< Kernel_ > >
-{
-public:
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_segment_traits_2< Kernel > ArrTraits;
-  typedef typename ArrTraits::Point_2 Point_2;
-  typedef typename Kernel::FT CoordinateType;
-};
-
-template < class Kernel_ >
-class ArrTraitsAdaptor< CGAL::Arr_linear_traits_2< Kernel_ > >
-{
-public:
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_linear_traits_2< Kernel > ArrTraits;
-  typedef typename ArrTraits::Point_2 Point_2;
-  typedef typename Kernel::FT CoordinateType;
-};
-
-template < class SegmentTraits >
-class ArrTraitsAdaptor< CGAL::Arr_polyline_traits_2< SegmentTraits > >
-{
-public:
-  typedef CGAL::Arr_polyline_traits_2< SegmentTraits > ArrTraits;
-  typedef typename SegmentTraits::Kernel Kernel;
-  typedef typename ArrTraits::Point_2 Point_2;
-  typedef typename Kernel::FT CoordinateType;
-};
-
-template < class CircularKernel >
-class ArrTraitsAdaptor< CGAL::Arr_circular_arc_traits_2< CircularKernel > >
-{
-public:
-  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > ArrTraits;
-  typedef CircularKernel Kernel;
-  typedef typename ArrTraits::Point_2 Point_2;
-  typedef typename Kernel::Root_of_2 CoordinateType;
-};
-
-template < class RatKernel, class AlgKernel, class NtTraits >
-class ArrTraitsAdaptor< CGAL::Arr_conic_traits_2< RatKernel, AlgKernel,
-                                                  NtTraits > >
-{
-public:
-  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > ArrTraits;
-  typedef AlgKernel Kernel;
-  typedef typename ArrTraits::Point_2 Point_2;
-  typedef typename Kernel::FT CoordinateType;
-};
-
-template < class Coefficient_ >
-class ArrTraitsAdaptor< CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > >
-{
-public:
-  typedef Coefficient_ Coefficient;
-  typedef typename CGAL::Arr_algebraic_segment_traits_2<Coefficient>
-                                                        ArrTraits;
-  typedef typename ArrTraits::Point_2                   Point_2; // CKvA_2
-  typedef typename ArrTraits::Algebraic_real_1          CoordinateType;
-  typedef CGAL::Cartesian< typename ArrTraits::Bound >  Kernel;
-  //typedef typename ArrTraits::CKvA_2                  Kernel;
-};
-
-template < class ArrTraits >
-class Compute_squared_distance_2_base : public QGraphicsSceneMixin
-{
-public:
-  typedef CGAL::Cartesian< double > InexactKernel;
-
-public:
-  // ctors
-  Compute_squared_distance_2_base( ) { }
-
-public: // methods
-
-  template < class T1, class T2 >
-  double operator() ( const T1& t1, const T2& t2 )
-  {
-    return this->squaredDistance( t1, t2 );
-  }
-
-protected: // fields
-  typename Kernel::Compute_squared_distance_2 squared_distance;
-  InexactKernel::Compute_squared_distance_2 squaredDistance;
-};
-
-template < class ArrTraits >
-class Compute_squared_distance_2 :
-  public Compute_squared_distance_2_base< ArrTraits >
-{ };
-
-template < class Kernel_ >
-class Compute_squared_distance_2< CGAL::Arr_segment_traits_2< Kernel_ > > :
-  public Compute_squared_distance_2_base<CGAL::Arr_segment_traits_2<Kernel_> >
-{
-public:
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_segment_traits_2< Kernel > Traits;
-  typedef Compute_squared_distance_2_base< Traits > Superclass;
-  typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_2 Point_2;
-  typedef typename Kernel::Segment_2 Segment_2;
-  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
-
-  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
-  {
-    Point_2 p1 = c.source( );
-    Point_2 p2 = c.target( );
-    Segment_2 seg( p1, p2 );
-
-    return CGAL::to_double( this->squared_distance( p, seg ) );
-  }
-};
-
-template < class Kernel_ >
-class Compute_squared_distance_2< CGAL::Arr_linear_traits_2< Kernel_ > > :
-  public Compute_squared_distance_2_base<CGAL::Arr_linear_traits_2<Kernel_> >
-{
-public:
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_linear_traits_2< Kernel > Traits;
-  typedef Compute_squared_distance_2_base< Traits > Superclass;
-  typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_2 Point_2;
-  typedef typename Kernel::Segment_2 Segment_2;
-  typedef typename Kernel::Ray_2 Ray_2;
-  typedef typename Kernel::Line_2 Line_2;
-  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
-
-  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
-  {
-    Segment_2 seg;
-    Ray_2 ray;
-    Line_2 line;
-    FT res;
-    if ( c.is_segment( ) )
-    {
-      seg = c.segment( );
-      res = this->squared_distance( p, seg );
-    }
-    else if ( c.is_ray( ) )
-    {
-      ray = c.ray( );
-      res = this->squared_distance( p, ray );
-    }
-    else // ( c.is_line( ) )
-    {
-      line = c.line( );
-      res = this->squared_distance( p, line );
-    }
-    return CGAL::to_double( res );
-  }
-};
-
-template < class Kernel_ >
-class Compute_squared_distance_2< CGAL::Arr_polyline_traits_2< Kernel_ > > :
-  public Compute_squared_distance_2_base<CGAL::Arr_polyline_traits_2<Kernel_> >
-{
-public:
-  typedef Kernel_ Kernel;
-  typedef CGAL::Arr_polyline_traits_2< Kernel > Traits;
-  typedef Compute_squared_distance_2_base< Traits > Superclass;
-  typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_2 Point_2;
-  typedef typename Kernel::Segment_2 Segment_2;
-  typedef typename Traits::Curve_2 Curve_2;
-  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
-  typedef typename Curve_2::Segment_const_iterator Seg_const_it;
-
-  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
-  {
-    Seg_const_it seg_it_s = c.begin_segments();
-
-    bool first = true;
-    FT min_dist = 0;
-
-    while (seg_it_s != c.end_segments())
-      {
-        Segment_2 seg = *seg_it_s;
-        FT dist = this->squared_distance( p, seg );
-
-        if ( first || dist < min_dist )
-          {
-            first = false;
-            min_dist = dist;
-          }
-        seg_it_s++;
-      }
-
-    return CGAL::to_double( min_dist );
-  }
-};
-
-template < class CircularKernel >
-class Compute_squared_distance_2< CGAL::Arr_circular_arc_traits_2<
-                                    CircularKernel > > :
-  public Compute_squared_distance_2_base< CGAL::Arr_circular_arc_traits_2<
-                                            CircularKernel > >
-{
-public: // typedefs
-  typedef CircularKernel Kernel;
-  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Traits;
-  typedef Compute_squared_distance_2_base< Traits > Superclass;
-  typedef typename Traits::Point_2 Point_2;
-  typedef typename Traits::Point_2 Arc_point_2;
-  typedef typename Kernel::Point_2 Non_arc_point_2;
-  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
-  typedef typename Kernel::FT FT;
-
-public: // methods
-  double operator() ( const Point_2& p, const X_monotone_curve_2& c )
-  {
-    // TODO: implement it correctly
-    Non_arc_point_2 center = c.center( );
-    Non_arc_point_2 pp( CGAL::to_double(p.x()), CGAL::to_double(p.y()) );
-    FT res = CGAL::squared_distance( pp, center );
-    return CGAL::to_double( res );
-  }
-};
-
-template < class RatKernel, class AlgKernel, class NtTraits >
-class Compute_squared_distance_2< CGAL::Arr_conic_traits_2< RatKernel,
-                                                            AlgKernel,
-                                                            NtTraits > > :
-  public Compute_squared_distance_2_base< CGAL::Arr_conic_traits_2< RatKernel,
-                                                                    AlgKernel,
-                                                                    NtTraits > >
-{
-public:
-  typedef AlgKernel                                     Kernel;
-  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > Traits;
-  typedef Compute_squared_distance_2_base< Traits >     Superclass;
-  // _Conic_point_2< AlgKernel > : public AlgKernel::Point_2
-  typedef typename Traits::Point_2                      Conic_point_2;
-  typedef typename Kernel::FT                           FT;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Kernel::Segment_2                    Segment_2;
-  typedef typename Traits::Curve_2                      Curve_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public: // methods
-  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
-  {
-    // Get the co-ordinates of the curve's source and target.
-    // double sx = CGAL::to_double( c.source( ).x( ) );
-    // double sy = CGAL::to_double( c.source( ).y( ) );
-    // double tx = CGAL::to_double( c.target( ).x( ) );
-    // double ty = CGAL::to_double( c.target( ).y( ) );
-
-    if ( c.orientation( ) == CGAL::COLLINEAR )
-    {
-      Point_2 ps = c.source( );
-      Point_2 pt = c.target( );
-      Segment_2 seg( ps, pt );
-
-      FT res = CGAL::squared_distance( p, seg );
-      return CGAL::to_double( res );
-    }
-    else
-    {
-      // If the curve is monotone, than its source and its target has the
-      // extreme x co-ordinates on this curve.
-      // bool is_source_left = (sx < tx);
-      //int  x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
-      //int  x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
-      //double   prev_x = is_source_left ? sx : tx;
-      //double   prev_y = is_source_left ? sy : ty;
-      //double   curr_x, curr_y;
-      //int      x;
-      //Arr_conic_point_2 px;
-
-      bool first = true;
-      FT min_dist( 100000000 );
-      // AlgKernel ker;
-
-      int n = 100;
-      if ( this->scene != NULL && this->scene->views( ).size( ) != 0 )
-      { // use the scene to approximate the resolution of the curve
-        QGraphicsView* view = this->scene->views( ).first( );
-        CGAL::Bbox_2 bb = c.bbox( ); // assumes bounded curve
-        int xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
-        int xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
-        n = xmax - xmin;
-        if ( n < 2 )
-        {
-          n = 2;
-        }
-      }
-
-      std::pair<double, double>* app_pts =
-        new std::pair< double, double >[ n + 1 ];
-      std::pair<double, double>* end_pts = c.polyline_approximation(n, app_pts);
-      std::pair<double, double>* p_curr = app_pts;
-      std::pair<double, double>* p_next = p_curr + 1;
-      do
-      {
-        Point_2 p1( p_curr->first, p_curr->second );
-        Point_2 p2( p_next->first, p_next->second );
-        Segment_2 seg( p1, p2 );
-
-        FT dist = CGAL::squared_distance( p, seg );
-        if ( first || dist < min_dist )
-        {
-          first = false;
-          min_dist = dist;
-        }
-
-        p_curr++;
-        p_next++;
-      } while ( p_next != end_pts );
-
-      return CGAL::to_double( min_dist );
-    }
-  }
-};
-
-template < class Coefficient_ >
-class Compute_squared_distance_2< CGAL::Arr_algebraic_segment_traits_2<
-                                    Coefficient_ > > :
-  public Compute_squared_distance_2_base< CGAL::Arr_algebraic_segment_traits_2<
-                                            Coefficient_ > >
-{
-public:
-  typedef Coefficient_                                  Coefficient;
-  typedef CGAL::Arr_algebraic_segment_traits_2<Coefficient>
-                                                        Traits;
-  typedef typename Traits::Bound                        FT; // unused
-  typedef typename ArrTraitsAdaptor<Traits>::Kernel     Kernel;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-public:
-  double operator()(const Point_2& /* p */,
-                    const X_monotone_curve_2& /* c */) const
-  {
-    double res = 0.0;
-    return res;
-  }
-};
-
-template < class ArrTraits >
-class Arr_compute_y_at_x_2 : public QGraphicsSceneMixin
-{
-public:
-  typedef ArrTraits Traits;
-  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
-  typedef typename ArrTraitsAdaptor< Traits >::CoordinateType CoordinateType;
-  // typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Kernel::Line_2                       Line_2;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-  typedef typename Traits::Multiplicity                 Multiplicity;
-  typedef typename Traits::Intersect_2                  Intersect_2;
-  typedef std::pair< typename Traits::Point_2, Multiplicity >
-                                                        IntersectionResult;
-
-  /*! Constructor */
-  Arr_compute_y_at_x_2( ) :
-    intersectCurves( this->traits.intersect_2_object( ) )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~Arr_compute_y_at_x_2() {}
-
-  CoordinateType operator() ( const X_monotone_curve_2& curve,
-                              const CoordinateType& x )
-  {
-    typename Traits::Left_side_category category;
-    return this->operator()( curve, x, this->traits, category );
-  }
-
-  double approx( const X_monotone_curve_2& curve, const CoordinateType& x )
-  {
-    return CGAL::to_double( (*this)( curve, x ) );
-  }
-
-protected:
-  template < class TTraits >
-  CoordinateType operator() ( const X_monotone_curve_2& curve,
-                              const CoordinateType& x, TTraits traits_,
-                              CGAL::Arr_oblivious_side_tag )
-  {
-    typedef typename TTraits::Construct_x_monotone_curve_2
-      Construct_x_monotone_curve_2;
-    Construct_x_monotone_curve_2 construct_x_monotone_curve_2 =
-      traits_.construct_x_monotone_curve_2_object( );
-    CoordinateType res( 0 );
-    CGAL::Bbox_2 clipRect = curve.bbox( );
-    Point_2 p1c1( x, CoordinateType( clipRect.ymin( ) - 1 ) ); // clicked point
-    // upper bounding box
-    Point_2 p2c1( x, CoordinateType( clipRect.ymax( ) + 1 ) );
-
-    const X_monotone_curve_2 verticalLine =
-      construct_x_monotone_curve_2( p1c1, p2c1 );
-    CGAL::Object o;
-    CGAL::Oneset_iterator< CGAL::Object > oi( o );
-
-    this->intersectCurves( curve, verticalLine, oi );
-
-    IntersectionResult pair;
-    if ( CGAL::assign( pair, o ) )
-    {
-      Point_2 pt = pair.first;
-      res = pt.y( );
-    }
-    return res;
-  }
-
-  template < class TTraits >
-  CoordinateType operator() ( const X_monotone_curve_2& curve,
-                              const CoordinateType& x, TTraits traits_,
-                              CGAL::Arr_open_side_tag )
-  {
-    typename TTraits::Construct_x_monotone_curve_2
-      construct_x_monotone_curve_2 =
-      traits_.construct_x_monotone_curve_2_object( );
-    CoordinateType res( 0 );
-    // QRectF clipRect = this->viewportRect( );
-    Line_2 line = curve.supporting_line( );
-    // FIXME: get a better bounding box for an unbounded segment
-    Point_2 p1c1( x, CoordinateType( -10000000 ) ); // clicked point
-    Point_2 p2c1( x, CoordinateType(  10000000 ) ); // upper bounding box
-
-    const X_monotone_curve_2 verticalLine =
-      construct_x_monotone_curve_2( p1c1, p2c1 );
-    CGAL::Object o;
-    CGAL::Oneset_iterator< CGAL::Object > oi( o );
-
-    this->intersectCurves( curve, verticalLine, oi );
-
-    IntersectionResult pair;
-    if ( CGAL::assign( pair, o ) )
-    {
-      Point_2 pt = pair.first;
-      res = pt.y( );
-    }
-    return res;
-  }
-
-protected:
-  Traits traits;
-  Intersect_2 intersectCurves;
-};
-
-template < class CircularKernel >
-class Arr_compute_y_at_x_2< CGAL::Arr_circular_arc_traits_2<CircularKernel> > :
-  public QGraphicsSceneMixin
-{
-public:
-  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Traits;
-  typedef CircularKernel                                Kernel;
-  typedef typename Kernel::FT                           FT;
-  typedef typename Kernel::Root_of_2                    Root_of_2;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Traits::Point_2                      Arc_point_2;
-  typedef typename Kernel::Segment_2                    Segment_2;
-  typedef typename Kernel::Line_arc_2                   Line_arc_2;
-  // Circular_arc_2
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-  typedef typename Traits::Intersect_2                  Intersect_2;
-  typedef typename Traits::Multiplicity                 Multiplicity;
-  typedef std::pair< typename Traits::Point_2, Multiplicity >
-                                                        IntersectionResult;
-
-  /*! Constructor */
-  Arr_compute_y_at_x_2( ) :
-    intersectCurves( this->traits.intersect_2_object( ) )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~Arr_compute_y_at_x_2() {}
-
-  Root_of_2 operator() ( const X_monotone_curve_2& curve, const FT& x )
-  {
-    Root_of_2 res( 0 );
-    CGAL::Bbox_2 clipRect = curve.bbox( );
-    Point_2 p1c1( x, FT( clipRect.ymin( ) - 1 ) ); // clicked point
-    Point_2 p2c1( x, FT( clipRect.ymax( ) + 1 ) ); // upper bounding box
-    Line_arc_2 verticalLine( Segment_2( p1c1, p2c1 ) );
-
-    CGAL::Object o;
-    CGAL::Oneset_iterator< CGAL::Object > oi( o );
-
-    this->intersectCurves( curve, verticalLine, oi );
-
-    IntersectionResult pair;
-    if ( CGAL::assign( pair, o ) )
-    {
-      Arc_point_2 pt = pair.first;
-      res = pt.y( );
-    }
-    return res;
-  }
-
-  double approx( const X_monotone_curve_2& curve, const FT& x )
-  {
-    return CGAL::to_double( (*this)( curve, x ) );
-  }
-
-  // FIXME: inexact projection
-  Root_of_2 operator() ( const X_monotone_curve_2& curve, const Root_of_2& x )
-  {
-    FT approx( CGAL::to_double( x ) );
-    return this->operator()( curve, approx );
-  }
-
-  double approx( const X_monotone_curve_2& curve, const Root_of_2& x )
-  {
-    return CGAL::to_double( (*this)( curve, x ) );
-  }
-
-protected:
-  Traits traits;
-  Intersect_2 intersectCurves;
-};
-
-template < class Coefficient_ >
-class Arr_compute_y_at_x_2< CGAL::Arr_algebraic_segment_traits_2<
-                              Coefficient_ > > : public QGraphicsSceneMixin
-{
-public:
-  typedef Coefficient_ Coefficient;
-  typedef CGAL::Arr_algebraic_segment_traits_2< Coefficient > Traits;
-  typedef typename Traits::Algebraic_real_1             CoordinateType;
-  typedef typename Traits::Point_2                      Point_2;
-  typedef typename Traits::Intersect_2                  Intersect_2;
-  typedef typename Traits::Multiplicity                 Multiplicity;
-  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
-
-  CoordinateType operator() ( const X_monotone_curve_2& curve,
-                              const CoordinateType& x )
-  {
-    CGAL::Object o;
-    CGAL::Oneset_iterator< CGAL::Object > oi( o );
-    Intersect_2 intersect = traits.intersect_2_object( );
-    X_monotone_curve_2 c2 = this->makeVerticalLine( x );
-    intersect( curve, c2, oi );
-    std::pair< Point_2, Multiplicity > res;
-    if ( CGAL::assign( res, o ) ) // TODO: handle failure case
-    {
-      Point_2 p = res.first;
-      // std::cout << "approx y: " << p.to_double( ).second << std::endl;
-      CoordinateType coord = p.y( );
-      return coord;
-    }
-    else
-    {
-      std::cout << "Warning: vertical projection failed" << std::endl;
-      return CoordinateType( 0 );
-    }
-  }
-
-  double approx( const X_monotone_curve_2& curve, const CoordinateType& x )
-  {
-    CGAL::Object o;
-    CGAL::Oneset_iterator< CGAL::Object > oi( o );
-    Intersect_2 intersect = traits.intersect_2_object( );
-    X_monotone_curve_2 c2 = this->makeVerticalLine( x );
-    intersect( curve, c2, oi );
-    std::pair< Point_2, Multiplicity > res;
-    if ( CGAL::assign( res, o ) ) // TODO: handle failure case
-    {
-      Point_2 p = res.first;
-      std::pair< double, double > tmp = p.to_double();
-      return tmp.second;
-    }
-    else
-    {
-      std::cout << "Warning: vertical projection failed" << std::endl;
-      return 0;
-    }
-  }
-
-protected:
-  X_monotone_curve_2 makeVerticalLine( const CoordinateType& x )
-  {
-    typename Traits::Construct_point_2 constructPoint =
-      traits.construct_point_2_object( );
-    typename Traits::Construct_x_monotone_segment_2 constructSegment =
-      traits.construct_x_monotone_segment_2_object( );
-
-    std::vector< X_monotone_curve_2 > curves;
-    Point_2 p1 = constructPoint( x, CoordinateType( -1000000 ) );
-    Point_2 p2 = constructPoint( x, CoordinateType( +1000000 ) );
-    constructSegment( p1, p2, std::back_inserter( curves ) );
-    return curves[ 0 ]; // by construction, there is one curve in curves
-  }
-  Traits traits;
-};
-
-#undef SUBCURVE_1
-
-// TODO: Make Construct_x_monotone_subcurve_2 more generic
-template < class ArrTraits >
-class Construct_x_monotone_subcurve_2
-{
-public:
-  typedef typename ArrTraitsAdaptor<ArrTraits>::Kernel  Kernel;
-  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
-  typedef typename ArrTraits::Split_2                   Split_2;
-  typedef typename ArrTraits::Intersect_2               Intersect_2;
-  typedef typename ArrTraits::Multiplicity              Multiplicity;
-  typedef typename ArrTraits::Construct_min_vertex_2    Construct_min_vertex_2;
-  typedef typename ArrTraits::Construct_max_vertex_2    Construct_max_vertex_2;
-  typedef typename ArrTraits::Compare_x_2               Compare_x_2;
-  typedef typename Kernel::FT                           FT;
-  typedef typename ArrTraitsAdaptor< ArrTraits >::CoordinateType
-                                                        CoordinateType;
-  typedef typename ArrTraits::Point_2                   Point_2;
-  typedef typename Kernel::Point_2                      Kernel_point_2;
-  //typedef typename Kernel::Line_2 Line_2;
-  //typedef typename Kernel::Compute_y_at_x_2 Compute_y_at_x_2;
-
-  Construct_x_monotone_subcurve_2( ):
-    intersect_2( this->traits.intersect_2_object( ) ),
-    split_2( this->traits.split_2_object( ) ),
-    compare_x_2( this->traits.compare_x_2_object( ) ),
-    construct_min_vertex_2( this->traits.construct_min_vertex_2_object( ) ),
-    construct_max_vertex_2( this->traits.construct_max_vertex_2_object( ) )
-  { }
-
-  /*
-    Return the subcurve of curve bracketed by pLeft and pRight.
-
-    We assume pLeft and pRight don't lie on the curve and always do a vertical
-    projection.
-  */
-  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
-                                  const Point_2& pLeft, const Point_2& pRight )
-  {
-    Point_2 pMin = this->construct_min_vertex_2( curve );
-    Point_2 pMax = this->construct_max_vertex_2( curve );
-    X_monotone_curve_2 subcurve;
-    X_monotone_curve_2 unusedTrimmings;
-    X_monotone_curve_2 finalSubcurve;
-    if ( this->compare_x_2( pLeft, pMin ) == CGAL::LARGER )
-    {
-      CoordinateType y1 = this->compute_y_at_x( curve, pLeft.x( ) );
-      Point_2 splitPoint( pLeft.x( ), y1 );
-      this->split_2( curve, splitPoint, unusedTrimmings, subcurve );
-    }
-    else
-    {
-      subcurve = curve;
-    }
-
-    if ( this->compare_x_2( pRight, pMax ) == CGAL::SMALLER )
-    {
-      CoordinateType y2 = this->compute_y_at_x( subcurve, pRight.x( ) );
-      Point_2 splitPoint( pRight.x( ), y2 );
-      this->split_2( subcurve, splitPoint, finalSubcurve, unusedTrimmings );
-    }
-    else
-    {
-      finalSubcurve = subcurve;
-    }
-
-    return finalSubcurve;
-  }
-
-protected:
-  ArrTraits traits;
-  Intersect_2 intersect_2;
-  Split_2 split_2;
-  Compare_x_2 compare_x_2;
-  Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
-  Construct_min_vertex_2 construct_min_vertex_2;
-  Construct_max_vertex_2 construct_max_vertex_2;
-}; // class Construct_x_monotone_subcurve_2
-
-template < class CircularKernel >
-class Construct_x_monotone_subcurve_2< CGAL::Arr_circular_arc_traits_2<
-                                         CircularKernel > >
-{
-public:
-  typedef CGAL::Arr_circular_arc_traits_2<CircularKernel> ArrTraits;
-  typedef typename ArrTraits::Intersect_2               Intersect_2;
-  typedef typename ArrTraits::Split_2                   Split_2;
-  typedef typename ArrTraits::Compare_x_2               Compare_x_2;
-  typedef typename ArrTraits::Construct_min_vertex_2    Construct_min_vertex_2;
-  typedef typename ArrTraits::Construct_max_vertex_2    Construct_max_vertex_2;
-  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
-  typedef typename CircularKernel::Point_2              Non_arc_point_2;
-  typedef typename ArrTraits::Point_2                   Arc_point_2;
-  typedef typename CircularKernel::FT                   FT;
-  typedef typename CircularKernel::Root_of_2            Root_of_2;
-  typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2;
-
-public:
-  Construct_x_monotone_subcurve_2( ):
-    intersect_2( this->traits.intersect_2_object( ) ),
-    split_2( this->traits.split_2_object( ) ),
-    compare_x_2( this->traits.compare_x_2_object( ) ),
-    construct_min_vertex_2( this->traits.construct_min_vertex_2_object( ) ),
-    construct_max_vertex_2( this->traits.construct_max_vertex_2_object( ) )
-  { }
-
-  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
-                                  const Arc_point_2& pLeft,
-                                  const Arc_point_2& pRight )
-  {
-    Arc_point_2 pMin = this->construct_min_vertex_2( curve );
-    Arc_point_2 pMax = this->construct_max_vertex_2( curve );
-    X_monotone_curve_2 subcurve;
-    X_monotone_curve_2 unusedTrimmings;
-    X_monotone_curve_2 finalSubcurve;
-    if ( this->compare_x_2( pLeft, pMin ) == CGAL::LARGER )
-    {
-      Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
-      FT x_approx( CGAL::to_double( pLeft.x( ) ) );
-      Root_of_2 y1 = compute_y_at_x( curve, x_approx );
-      Root_for_circles_2_2 intersectionPoint( x_approx, y1 );
-      Arc_point_2 splitPoint( intersectionPoint );
-      this->split_2( curve, splitPoint, unusedTrimmings, subcurve );
-    }
-    else
-    {
-      subcurve = curve;
-    }
-
-    if ( this->compare_x_2( pRight, pMax ) == CGAL::SMALLER )
-    {
-      Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
-      FT x_approx( CGAL::to_double( pRight.x( ) ) );
-      Root_of_2 y2 = compute_y_at_x( subcurve, x_approx );
-      Root_for_circles_2_2 intersectionPoint( x_approx, y2 );
-      Arc_point_2 splitPoint( intersectionPoint );
-      this->split_2( subcurve, splitPoint, finalSubcurve, unusedTrimmings );
-    }
-    else
-    {
-      finalSubcurve = subcurve;
-    }
-
-    return finalSubcurve;
-  }
-
-protected:
-  ArrTraits traits;
-  Intersect_2 intersect_2;
-  Split_2 split_2;
-  Compare_x_2 compare_x_2;
-  Construct_min_vertex_2 construct_min_vertex_2;
-  Construct_max_vertex_2 construct_max_vertex_2;
-};
-
-/*
- * This specialization for conic traits makes use of X_monotone_curve_2::trim,
- * which is not necessarily available.
- */
-template < class RatKernel, class AlgKernel, class NtTraits >
-class Construct_x_monotone_subcurve_2< CGAL::Arr_conic_traits_2< RatKernel,
-                                                                 AlgKernel,
-                                                                 NtTraits > >
-{
-public:
-  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > ArrTraits;
-  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
-  typedef typename AlgKernel::Point_2 Point_2;
-
-  /*
-    Return the subcurve of curve bracketed by pLeft and pRight.
-  */
-  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
-                                  const Point_2& pLeft, const Point_2& pRight )
-  {
-    // find the points on the curve
-    Point_2 left = curve.point_at_x( pLeft );
-    Point_2 right = curve.point_at_x( pRight );
-
-    // make sure the points are oriented in the direction that the curve is
-    // going
-    AlgKernel ker;
-    if (! (((curve.is_directed_right( )) &&
-            ker.compare_xy_2_object() ( left, right ) == CGAL::SMALLER) ||
-           ((! curve.is_directed_right( )) &&
-            ker.compare_xy_2_object() ( left, right ) == CGAL::LARGER)))
-    {
-      Point_2 tmp = left;
-      left = right;
-      right = tmp;
-    }
-
-    X_monotone_curve_2 res = curve.trim( left, right );
-    return res;
-  }
-}; // class Construct_x_monotone_subcurve_2 for Arr_conic_traits_2
-
-template < class Kernel_ >
-class Construct_x_monotone_subcurve_2< CGAL::Arr_linear_traits_2< Kernel_ > >
-{
-public: // typedefs
-  typedef CGAL::Arr_linear_traits_2< Kernel_ > ArrTraits;
-  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
-  typedef Kernel_ Kernel;
-  typedef typename Kernel::Point_2 Point_2;
-  typedef typename Kernel::Segment_2 Segment_2;
-
-public: // methods
-  // curve can be unbounded. if curve is unbounded to the left,
-  // pLeft is a point on the left edge of viewport.
-  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
-                                  const Point_2& pLeft, const Point_2& pRight )
-  {
-    if ( curve.is_segment( ) )
-    {
-      Segment_2 subsegment =
-        this->constructSubsegment( curve.segment( ), pLeft, pRight );
-      return X_monotone_curve_2( subsegment );
-    }
-    else if ( curve.is_ray( ) )
-    {
-
-    }
-    return curve;
-  }
-
-protected:
-  Construct_x_monotone_subcurve_2< CGAL::Arr_segment_traits_2< Kernel_ > >
-    constructSubsegment;
-};
-
-template < class Coefficient_ >
-class Construct_x_monotone_subcurve_2< CGAL::Arr_algebraic_segment_traits_2<
-                                         Coefficient_ > >
-{
-public: // typedefs
-  typedef Coefficient_ Coefficient;
-  typedef CGAL::Arr_algebraic_segment_traits_2< Coefficient > ArrTraits;
-  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
-  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
-  typedef typename ArrTraits::Point_2                   Point_2;
-  //typedef typename Kernel::Point_2 Point_2;
-  typedef typename Kernel::Segment_2                    Segment_2;
-
-public: // methods
-  // curve can be unbounded. if curve is unbounded to the left, pLeft is a
-  // point on the left edge of viewport.
-  X_monotone_curve_2 operator()(const X_monotone_curve_2& curve,
-                                const Point_2& /* pLeft */,
-                                const Point_2& /* pRight */)
-  {
-    // TODO: trim the algebraic curve
-    return curve;
-  }
-
-protected:
-};
-
-// FIXME: return Traits::Point_2 instead of Kernel::Point_2
-template < class ArrTraits >
-class SnapStrategy : public QGraphicsSceneMixin
-{
-public:
-  //typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
-  typedef typename ArrTraits::Point_2 Point_2;
-
-  virtual Point_2 snapPoint( QGraphicsSceneMouseEvent* event ) = 0;
-
-protected:
-  SnapStrategy( QGraphicsScene* scene_ );
-}; // class SnapStrategy
-
-template < class ArrTraits >
-SnapStrategy< ArrTraits >::SnapStrategy( QGraphicsScene* scene_ )
-{
-  this->scene = scene_;
-}
-
-template < class ArrTraits >
-class SnapToGridStrategy : public SnapStrategy< ArrTraits >
-{
-public:
-  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
-  typedef typename ArrTraits::Point_2                   Point_2;
-  typedef typename Kernel::Point_2                      Kernel_point_2;
-  typedef SnapStrategy< ArrTraits >                     Superclass;
-
-  /*! Constructors */
-  SnapToGridStrategy( ) :
-    Superclass( NULL ),
-    gridSize( 50 )
-  { }
-
-  SnapToGridStrategy( QGraphicsScene* scene ) :
-    Superclass( scene ),
-    gridSize( 50 )
-  { }
-
-  /*! Destructors (virtual) */
-  ~SnapToGridStrategy() {}
-
-  Point_2 snapPoint( QGraphicsSceneMouseEvent* event )
-  {
-    return this->snapPoint( event, ArrTraits( ) );
-  }
-
-  template < class TTraits >
-  Point_2 snapPoint(QGraphicsSceneMouseEvent* event, TTraits /* traits */)
-  {
-    QPointF clickedPoint = event->scenePos( );
-    QRectF viewportRect = this->viewportRect( );
-    if ( viewportRect == QRectF( ) )
-    { // fallback case; we usually shouldn't end up here
-      Kernel_point_2 res = this->convert( event->scenePos( ) );
-      return Point_2( CGAL::to_double(res.x( )), CGAL::to_double(res.y()) );
-    }
-
-    qreal d( this->gridSize / 2.0 );
-    int left = int( viewportRect.left( ) ) -
-      (int( viewportRect.left( ) ) % this->gridSize);
-    int right = int( viewportRect.right( ) ) +
-      (this->gridSize - int( viewportRect.right( ) ) % this->gridSize);
-    int x = int(clickedPoint.x( ));
-    int y = int(clickedPoint.y( ));
-    for ( int i = left - this->gridSize; i <= right; i += this->gridSize )
-    {
-      if ( i - d <= clickedPoint.x( ) && clickedPoint.x( ) <= i + d )
-      {
-        x = i;
-        break;
-      }
-    }
-    int top = int( viewportRect.top( ) ) -
-      (int( viewportRect.top( ) ) % this->gridSize);
-    int bottom = int( viewportRect.bottom( ) ) +
-      (this->gridSize - int( viewportRect.bottom( ) ) % this->gridSize);
-    for ( int i = top - this->gridSize; i <= bottom; i += this->gridSize )
-    {
-      if ( i - d <= clickedPoint.y( ) && clickedPoint.y( ) <= i + d )
-      {
-        y = i;
-        break;
-      }
-    }
-    //return this->convert( QPointF( x, y ) );
-    Point_2 res( x, y );
-    return res;
-  }
-
-  template < class CircularKernel >
-  Point_2 snapPoint(QGraphicsSceneMouseEvent* event,
-                    CGAL::Arr_circular_arc_traits_2<CircularKernel>
-                    /* traits */)
-  {
-    QPointF clickedPoint = event->scenePos( );
-    QRectF viewportRect = this->viewportRect( );
-    if ( viewportRect == QRectF( ) )
-    {
-      Kernel_point_2 res = this->convert( event->scenePos( ) );
-      return Point_2( res );
-    }
-
-    qreal d( this->gridSize / 2.0 );
-    int left = int( viewportRect.left( ) ) -
-      (int( viewportRect.left( ) ) % this->gridSize);
-    int right = int( viewportRect.right( ) ) +
-      (this->gridSize - int( viewportRect.right( ) ) % this->gridSize);
-    int x = int(clickedPoint.x( ));
-    int y = int(clickedPoint.y( ));
-    for ( int i = left - this->gridSize; i <= right; i += this->gridSize )
-    {
-      if ( i - d <= clickedPoint.x( ) && clickedPoint.x( ) <= i + d )
-      {
-        x = i;
-        break;
-      }
-    }
-    int top = int( viewportRect.top( ) ) -
-      (int( viewportRect.top( ) ) % this->gridSize);
-    int bottom = int( viewportRect.bottom( ) ) +
-      (this->gridSize - int( viewportRect.bottom( ) ) % this->gridSize);
-    for ( int i = top - this->gridSize; i <= bottom; i += this->gridSize )
-    {
-      if ( i - d <= clickedPoint.y( ) && clickedPoint.y( ) <= i + d )
-      {
-        y = i;
-        break;
-      }
-    }
-    //return this->convert( QPointF( x, y ) );
-    Kernel_point_2 res( x, y );
-    return Point_2( res );
-  }
-
-  void setGridSize( int size )
-  {
-    this->gridSize = size;
-  }
-
-protected:
-  int gridSize;
-  CGAL::Qt::Converter< Kernel > convert;
-}; // class SnapToGridStrategy
-
-template < class Arr_ >
-class SnapToArrangementVertexStrategy:
-  public SnapStrategy< typename Arr_::Geometry_traits_2 >
-{
-public:
-  typedef Arr_                                          Arrangement;
-  typedef typename Arrangement::Geometry_traits_2       Traits;
-  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
-  typedef SnapStrategy< Traits >                        Superclass;
-  typedef typename Arrangement::Vertex_iterator         Vertex_iterator;
-  typedef typename Kernel::Compute_squared_distance_2
-    Compute_squared_distance_2;
-  typedef typename Kernel::FT                           FT;
-  typedef typename Traits::Point_2                      Point_2;
-  typedef typename Kernel::Point_2                      Kernel_point_2;
-
-  SnapToArrangementVertexStrategy( ):
-    Superclass( NULL ),
-    arrangement( NULL )
-  { }
-
-  SnapToArrangementVertexStrategy( Arrangement* arr, QGraphicsScene* scene_ ):
-    Superclass( scene_ ),
-    arrangement( arr )
-  { }
-
-  Point_2 snapPoint( QGraphicsSceneMouseEvent* event )
-  {
-    Kernel_point_2 clickedPoint = this->convert( event->scenePos( ) );
-    return this->snapPoint( clickedPoint, Traits( ) );
-  }
-
-  template < class TTraits >
-  Point_2 snapPoint(const Kernel_point_2& clickedPoint, TTraits /* traits */)
-  {
-    Point_2 initialPoint( CGAL::to_double(clickedPoint.x()),
-                          CGAL::to_double(clickedPoint.y()) );
-    Point_2 closestPoint( CGAL::to_double(clickedPoint.x()),
-                          CGAL::to_double(clickedPoint.y()) );
-    bool first = true;
-    FT minDist( 0 );
-    QRectF viewportRect = this->viewportRect( );
-    if ( viewportRect == QRectF( ) )
-    {
-      return initialPoint;
-    }
-
-    FT maxDist( ( viewportRect.right( ) - viewportRect.left( ) ) / 4.0 );
-    for ( Vertex_iterator vit = this->arrangement->vertices_begin( );
-          vit != this->arrangement->vertices_end( ); ++vit )
-    {
-      Point_2 point = vit->point( );
-      Kernel_point_2 thisPoint( CGAL::to_double(point.x()),
-                                CGAL::to_double(point.y()) );
-      FT dist = this->compute_squared_distance_2( clickedPoint, thisPoint );
-      if ( first || ( dist < minDist ) )
-      {
-        first = false;
-        minDist = dist;
-        closestPoint = point;
-      }
-    }
-    if ( ! first && minDist < maxDist )
-    {
-      return closestPoint;
-    }
-    else
-    {
-      return initialPoint;
-    }
-  }
-
-  template < class CircularKernel >
-  Point_2 snapPoint(const Kernel_point_2& clickedPoint,
-                    CGAL::Arr_circular_arc_traits_2<CircularKernel>
-                    /* traits */)
-  {
-    typedef Kernel_point_2 Non_arc_point_2;
-    typedef typename CircularKernel::Circular_arc_point_2 Arc_point_2;
-
-    Non_arc_point_2 closestKernelPoint = clickedPoint;
-    Arc_point_2 closestPoint( closestKernelPoint );
-    bool first = true;
-    FT minDist( 0 );
-    QRectF viewportRect = this->viewportRect( );
-    if ( viewportRect == QRectF( ) )
-    {
-      return clickedPoint;
-    }
-
-    FT maxDist( ( viewportRect.right( ) - viewportRect.left( ) ) / 4.0 );
-    for ( Vertex_iterator vit = this->arrangement->vertices_begin( );
-          vit != this->arrangement->vertices_end( ); ++vit )
-    {
-      Arc_point_2 point = vit->point( );
-      Non_arc_point_2 point2( CGAL::to_double(point.x( )),
-                              CGAL::to_double(point.y()) );
-      FT dist = this->compute_squared_distance_2( clickedPoint, point2 );
-      if ( first || ( dist < minDist ) )
-      {
-        first = false;
-        minDist = dist;
-        //closestPoint = point2;
-        closestPoint = point;
-      }
-    }
-    if ( ! first && minDist < maxDist )
-    {
-      return closestPoint;
-    }
-    else
-    {
-      return clickedPoint;
-    }
-  }
-
-  void setArrangement( Arrangement* arr )
-  {
-    this->arrangement = arr;
-  }
-
-protected:
-  Arrangement* arrangement;
-  Compute_squared_distance_2 compute_squared_distance_2;
-  CGAL::Qt::Converter< Kernel > convert;
-}; // class SnapToArrangementVertexStrategy
-
-/**
-   Converts between Kernel points and Arrangement points.
-
-   The conversion is not necessarily exact.
-*/
-template < class ArrTraits >
-class Arr_construct_point_2
-{
-  typedef typename ArrTraits::Point_2                            Point_2;
-  typedef typename ArrTraitsAdaptor< ArrTraits >::CoordinateType CoordinateType;
-  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel         Kernel;
-  typedef typename Kernel::Point_2                               Kernel_point_2;
-
-public:
-  Point_2 operator()( const Kernel_point_2& pt )
-  {
-    return (*this)( pt.x(), pt.y() );
-  }
-
-  template < class T >
-  Point_2 operator()( const T& x, const T& y )
-  {
-    return (*this)( x, y, ArrTraits( ) );
-  }
-
-protected:
-  template < class T, class TTraits >
-  Point_2 operator()(const T& x, const T& y, TTraits /* traits */)
-  {
-    CoordinateType xx( x );
-    CoordinateType yy( y );
-    Point_2 res( xx, yy );
-    return res;
-  }
-
-  template < class T, class CircularKernel >
-  Point_2 operator()(const T& x, const T& y,
-                     CGAL::Arr_circular_arc_traits_2<CircularKernel>
-                     /* traits */)
-  {
-    typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2;
-    CoordinateType xx( x );
-    CoordinateType yy( y );
-    Root_for_circles_2_2 p( xx, yy );
-    Point_2 res( p );
-    return res;
-  }
-};
-
-class Find_nearest_edge_base : public QGraphicsSceneMixin
-{
-public:
-  /*! Destructor (virtual) */
-  virtual ~Find_nearest_edge_base() {}
-};
-
-template < class Arr_, class ArrTraits = typename Arr_::Geometry_traits_2 >
-class Find_nearest_edge : public Find_nearest_edge_base
-{
-public: // typedefs
-  typedef Arr_ Arrangement;
-  //typedef typename Arrangement::Geometry_traits_2 ArrTraits;
-  typedef Compute_squared_distance_2< ArrTraits > Point_curve_distance;
-  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
-  typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
-                                                        Point_location_strategy;
-  typedef typename ArrTraitsAdaptor<ArrTraits>::Kernel  Kernel;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Arrangement::Face_const_handle       Face_const_handle;
-  typedef typename Arrangement::Halfedge_const_handle   Halfedge_const_handle;
-  typedef typename Arrangement::Vertex_const_handle     Vertex_const_handle;
-  typedef typename Arrangement::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-  typedef typename Point_curve_distance::FT             FT;
-  typedef typename Arrangement::Hole_const_iterator     Hole_const_iterator;
-  typedef typename Arrangement::Halfedge_around_vertex_const_circulator
-    Halfedge_around_vertex_const_circulator;
-
-public:
-  /*! constructor */
-  Find_nearest_edge( Arrangement* arr_ ) :
-    Find_nearest_edge_base( ),
-    arr( arr_ ),
-    pointLocationStrategy( Point_location_strategy( *arr_ ) )
-  { }
-
-  /*! Destructor (virtual) */
-  virtual ~Find_nearest_edge() {}
-
-public: // member methods
-  Halfedge_const_handle operator()( const Point_2& queryPt )
-  {
-    typename ArrTraits::Point_2 pt = this->toArrPoint( queryPt );
-    CGAL::Object pointLocationResult = this->pointLocationStrategy.locate( pt );
-    Face_const_handle face = this->getFace( pointLocationResult );
-    bool first = 1;
-    X_monotone_curve_2 closestCurve;
-    Halfedge_const_handle closestEdge;
-    double minDist( 0 );
-
-    if ( ! face->is_unbounded( ) )
-    { // it is an interior face so it has a ccb
-      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
-      do
-      {
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-      }
-      while ( ++cc != face->outer_ccb( ) );
-    }
-#if 0 // we can't do this with bounded arrangements
-    else
-    {
-      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
-      do
-      {
-        if ( cc->is_fictitious( ) )
-        {
-          continue;
-        }
-
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-      }
-      while ( ++cc != face->outer_ccb( ) );
-    }
-#endif
-    Hole_const_iterator hit;
-    Hole_const_iterator eit = face->holes_end( );
-    // int counter = 0;
-    for ( hit = face->holes_begin( ); hit != eit; ++hit )
-    { // check any holes inside this face
-      Ccb_halfedge_const_circulator cc = *hit;
-      do
-      {
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-        cc++;
-      }
-      while ( cc != *hit );
-    }
-
-    return closestEdge;
-  }
-
-  virtual void setScene( QGraphicsScene* scene_ )
-  {
-    this->pointCurveDistance.setScene( scene_ );
-    Find_nearest_edge_base::setScene( scene_ );
-  }
-
-protected: // member methods
-  Face_const_handle getFace( const CGAL::Object& obj )
-  {
-    Face_const_handle f;
-    if ( CGAL::assign( f, obj ) )
-      return f;
-
-    Halfedge_const_handle he;
-    if (CGAL::assign( he, obj ))
-      return (he->face( ));
-
-    Vertex_const_handle v;
-    CGAL_assertion(CGAL::assign( v, obj ));
-    CGAL::assign( v, obj );
-    if ( v->is_isolated( ) )
-      return v->face( );
-    Halfedge_around_vertex_const_circulator eit = v->incident_halfedges( );
-    return  (eit->face( ));
-  }
-
-protected: // member fields
-  Arrangement* arr;
-  Point_curve_distance pointCurveDistance;
-  Point_location_strategy pointLocationStrategy;
-  Arr_construct_point_2< ArrTraits > toArrPoint;
-
-}; // class Find_nearest_edge
-
-#if 0
-template < class Arr_, class Coefficient_ >
-class Find_nearest_edge<Arr_, CGAL::Arr_algebraic_segment_traits_2<
-                                Coefficient_> >: public Find_nearest_edge_base
-{
-public:
-  Halfedge_const_handle operator()( const Point_2& queryPt ) { }
-};
-#endif
-
-template < class Arr_, class Kernel_ >
-class Find_nearest_edge< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > > :
-  public Find_nearest_edge_base
-{
-public: // typedefs
-  typedef Arr_ Arrangement;
-  typedef typename Arrangement::Geometry_traits_2       ArrTraits;
-  typedef Compute_squared_distance_2< ArrTraits >       Point_curve_distance;
-  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
-  typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
-                                                        Point_location_strategy;
-  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
-  typedef typename Kernel::Point_2                      Point_2;
-  typedef typename Arrangement::Face_const_handle       Face_const_handle;
-  typedef typename Arrangement::Halfedge_const_handle   Halfedge_const_handle;
-  typedef typename Arrangement::Vertex_const_handle     Vertex_const_handle;
-  typedef typename Arrangement::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-  typedef typename Point_curve_distance::FT             FT;
-  typedef typename Arrangement::Hole_const_iterator     Hole_const_iterator;
-  typedef typename Arrangement::Halfedge_around_vertex_const_circulator
-    Halfedge_around_vertex_const_circulator;
-
-public: // constructors
-  Find_nearest_edge( Arrangement* arr_ ) :
-    Find_nearest_edge_base( ),
-    arr( arr_ ),
-    pointLocationStrategy( Point_location_strategy( *arr_ ) )
-  { }
-
-public: // member methods
-  Halfedge_const_handle operator()( const Point_2& queryPt )
-  {
-    CGAL::Object pointLocationResult =
-      this->pointLocationStrategy.locate( queryPt );
-    Face_const_handle face = this->getFace( pointLocationResult );
-    bool first = 1;
-    X_monotone_curve_2 closestCurve;
-    Halfedge_const_handle closestEdge;
-    double minDist( 0 );
-
-    if ( ! face->is_unbounded( ) )
-    { // it is an interior face so it has a ccb
-      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
-      do
-      {
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-      }
-      while ( ++cc != face->outer_ccb( ) );
-    }
-    else
-    {
-      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
-      do
-      {
-        if ( cc->is_fictitious( ) )
-        {
-          continue;
-        }
-
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-      }
-      while ( ++cc != face->outer_ccb( ) );
-    }
-    Hole_const_iterator hit;
-    Hole_const_iterator eit = face->holes_end( );
-    for ( hit = face->holes_begin( ); hit != eit; ++hit )
-    { // check any holes inside this face
-      Ccb_halfedge_const_circulator cc = *hit;
-      do
-      {
-        X_monotone_curve_2 curve = cc->curve( );
-        double dist = this->pointCurveDistance( queryPt, curve );
-        if ( first || dist < minDist )
-        {
-          first = 0;
-          minDist = dist;
-          closestEdge = cc;
-        }
-        cc++;
-      }
-      while ( cc != *hit );
-    }
-
-    return closestEdge;
-  }
-
-protected: // member methods
-  Face_const_handle getFace( const CGAL::Object& obj )
-  {
-    Face_const_handle f;
-    if ( CGAL::assign( f, obj ) )
-      return f;
-
-    Halfedge_const_handle he;
-    if (CGAL::assign( he, obj ))
-      return (he->face( ));
-
-    Vertex_const_handle v;
-    CGAL_assertion(CGAL::assign( v, obj ));
-    CGAL::assign( v, obj );
-    if ( v->is_isolated( ) )
-      return v->face( );
-    Halfedge_around_vertex_const_circulator eit = v->incident_halfedges( );
-    return  (eit->face( ));
-  }
-
-protected: // member fields
-  Arrangement* arr;
-  Point_curve_distance pointCurveDistance;
-  Point_location_strategy pointLocationStrategy;
-}; // class Find_nearest_edge
-
-#endif // CGAL_ARRANGEMENTS_DEMO_UTILS_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt
deleted file mode 100644
index 9e2a8cb..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Arrangement_2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL COMPONENTS Core Qt3 )
-
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched)
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND CGAL_Qt3_FOUND AND QT3_FOUND )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  include( Qt3Macros-patched )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/arrangement_2.h" arrangement_2.moc )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/forms.h" forms.moc )
-
-
-  # The executable itself.
-  add_executable  ( arrangement_2 
-                    arrangement_2.cpp arrangement_2.moc
-		    forms.cpp forms.moc
-		    demo_tab.cpp
-		    MyWindow_files.cpp
-		    MyWindow_operations.cpp
-		    MyWindow_overlay.cpp
-		    qt_layer.cpp
-		    )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS arrangement_2 )
-
-  target_link_libraries( arrangement_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h
deleted file mode 100644
index a217a64..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h
+++ /dev/null
@@ -1,218 +0,0 @@
-#ifndef CGAL_CONIC_READER_H
-#define CGAL_CONIC_READER_H
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <list>
-#include <string>
-
-template <class Traits>
-class Conic_reader
-{
-public:
-  typedef typename Traits::Curve_2              Curve_2;
-  typedef typename Traits::X_monotone_curve_2   X_monotone_curve_2;
-  typedef typename Traits::Point_2              Point_2;
-
-  typedef typename Traits::Rational             Rational;
-  typedef typename Traits::Algebraic            Algebraic;
-  typedef typename Traits::Rat_point_2          Rat_point_2;
-  typedef typename Traits::Rat_segment_2        Rat_segment_2;
-  typedef typename Traits::Rat_circle_2         Rat_circle_2;
-
-  template<class OutputIterator>
-  int read_data(const char * filename, OutputIterator curves_out,
-                CGAL::Bbox_2 & bbox)
-  {
-
-    Curve_2 cv;
-    char dummy[256];
-
-    std::ifstream inp(filename);
-    if (!inp.is_open()) {
-      std::cerr << "Cannot open file " << filename << "!" << std::endl;
-      return -1;
-    }
-    int count;
-    inp >> count;
-    inp.getline(dummy, sizeof(dummy));
-    for (int i = 0; i < count; i++) {
-      if (read_curve(inp, cv)) {
-        ++curves_out = cv;
-        CGAL::Bbox_2 curve_bbox = cv.bbox();
-        if (i == 0) bbox = curve_bbox;
-        else bbox = bbox + curve_bbox;
-      }
-    }
-    inp.close();
-    return 0;
-  }
-
-  /*! */
-  bool read_curve(std::ifstream & is, Curve_2 & cv)
-  {
-    // Read a line from the input file.
-    char one_line[128];
-
-    skip_comments (is, one_line);
-    std::istringstream str_line (one_line);
-
-    // Read the arc type and act accordingly.
-    char     type;
-
-    str_line >> type;
-
-    if (type == 's' || type == 'S')
-    {
-      // Construct a line segment. The line should have the format:
-      //   s <x1> <y1> <x2> <y2>
-      // where (x1, y1), (x2, y2) are the endpoints of a segment.
-      Rational    x1, y1, x2, y2;
-
-      str_line >> x1 >> y1 >> x2 >> y2;
-
-      Rat_point_2   p1(x1, y1), p2(x2, y2);
-      Rat_segment_2 seg (p1, p2);
-
-      cv = Curve_2 (seg);
-    }
-    else if (type == 'c' || type == 'C')
-    {
-      // Construct a full circle. The line should have the format:
-      //   c <x0> <y0> <R_sq>
-      // where (x0, y0) is the center of the circle and R_sq is its squared
-      // radius.
-      Rational    x0, y0, R_sq;
-
-      str_line >> x0 >> y0 >> R_sq;
-
-      Rat_point_2   p0(x0, y0);
-      Rat_circle_2  circ(p0, R_sq);
-
-      cv = Curve_2 (circ);
-    }
-    else if (type == 't' || type == 'T')
-    {
-      // Construct a circular arc. The line should have the format:
-      //   t <x1> <y1> <x2> <y2> <x3> <y3>
-      // where (x1, y1), (x2, y2) and (x3, y3) define the arc.
-      Rational    x1, y1, x2, y2, x3, y3;
-
-      str_line >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
-
-      Rat_point_2   p1(x1, y1), p2(x2, y2), p3(x3, y3);
-
-      cv = Curve_2 (p1, p2, p3);
-    }
-    else if (type == 'f' || type == 'F')
-    {
-      // Construct a full conic curve. The line should have the format:
-      //   c <r> <s> <t> <u> <v> <w>
-      // where r, s, t, u, v, w define the conic equation.
-      Rational    r, s, t, u, v, w;
-
-      str_line >> r >> s >> t >> u >> v >> w;
-
-      cv = Curve_2 (r, s, t, u, v, w);
-    }
-    else if (type == 'a' || type == 'A')
-    {
-      // Construct a conic arc. The line should have the format:
-      //   c <r> <s> <t> <u> <v> <w> <orient> <x1> <y1> <x2> <y2>
-      // where r, s, t, u, v, w define the conic equation, while (x1, y1)
-      // and (x2, y2) are the arc's endpoints.
-      Rational    r, s, t, u, v, w;
-
-      str_line >> r >> s >> t >> u >> v >> w;
-
-      // Read the orientation.
-      int               i_orient;
-      CGAL::Orientation orient;
-
-      str_line >> i_orient;
-      if (i_orient > 0)
-        orient = CGAL::COUNTERCLOCKWISE;
-      else if (i_orient < 0)
-        orient = CGAL::CLOCKWISE;
-      else
-        orient = CGAL::COLLINEAR;
-
-      // Read the end points of the arc and create it.
-      // Notice we read the coordinates as strings, then we convert them to
-      // the Algebraic type, as we do not want to initialize Algebraic from a double.
-      char    num[50];
-      Algebraic    x1, y1, x2, y2;
-
-      str_line >> num;
-      x1 = Algebraic(num);
-      str_line >> num;
-      y1 = Algebraic(num);
-
-      str_line >> num;
-      x2 = Algebraic(num);
-      str_line >> num;
-      y2 = Algebraic(num);
-
-      Point_2 ps (x1, y1);
-      Point_2 pt (x2, y2);
-
-      cv = Curve_2 (r, s, t, u, v, w, orient, ps ,pt);
-    }
-    else if (type == 'q' || type == 'Q')
-    {
-      // Construct a circular arc. The line should have the format:
-      //   t <x1> <y1> <x2> <y2> <x3> <y3> <x4> <y4> <x5> <y5>
-      // where (x1, y1), (x2, y2), (x3, y3), (x4, y4) and (x5, y5) define the
-      // arc.
-      Rational    x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;
-
-      str_line >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5;
-
-      Rat_point_2   p1(x1, y1), p2(x2, y2), p3(x3, y3), p4(x4, y4), p5(x5, y5);
-
-      cv = Curve_2 (p1, p2, p3, p4, p5);
-    }
-    else if(type == 'e' || type == 'E')
-    {
-      // Construct a full ellipse. The line should have the format:
-      // e <r1_1> <r2_1>  <x0_1> <y0_1>      // raddi and center of ellipse
-
-      int                x0, y0, r1, r2;
-      Rational           sqr_r1, sqr_r2;
-      Rational           R, S, T, U, V, W;
-
-      str_line >> r1 >> r2 >> x0 >> y0;
-
-      sqr_r1 = Rational (r1*r1);
-      sqr_r2 = Rational (r2*r2);
-      R = sqr_r2;
-      S = sqr_r1;
-      T = 0;
-      U = -2 * sqr_r2 * x0;
-      V = -2 * sqr_r1 * y0;
-      W = sqr_r2*x0*x0 + sqr_r1*y0*y0 - sqr_r1*sqr_r2;
-
-      cv = Curve_2 (R, S, T, U, V, W);
-    }
-    else
-    {
-      std::cerr << "Illegal conic type specification: " << type << "."
-                << std::endl;
-      return false;
-    }
-
-    return true;
-  }
-
-  /*! */
-  void skip_comments( std::ifstream& is, char* one_line )
-  {
-    while (!is.eof()) {
-      is.getline(one_line, 128);
-      if (one_line[0] != '#') break;
-    }
-  }
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp
deleted file mode 100644
index 1754a14..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp
+++ /dev/null
@@ -1,691 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_files.cpp $
-// $Id: MyWindow_files.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-#include "arrangement_2.h"
-#include "forms.h"
-#include "qt_layer.h"
-#include "demo_tab.h"
-
-#ifdef CGAL_USE_CORE
-#include "Conic_reader.h"
-#endif
-
-#include <CGAL/IO/Arr_with_history_iostream.h>
-
-/*! open a segment file and add new tab */
-void MyWindow::fileOpenSegment()
-{
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  bool flag = (w_demo_p->traits_type == SEGMENT_TRAITS);
-  if( w_demo_p->is_empty() ) // pm is empty
-  {
-    updateTraitsType( setSegmentTraits );
-    fileOpen(true);
-  }
-  else
-  {
-    FileOpenOptionsForm
-         *form = new FileOpenOptionsForm(flag);
-    if ( form->exec() )
-    {
-        int id = form->buttonGroup->id(form->buttonGroup->selected());
-		switch ( id )
-		{
-          case 0: // open file in a new tab
-            add_segment_tab();
-            fileOpen();
-            break;
-          case 1: // open file in current tab (delete current Pm)
-            updateTraitsType( setSegmentTraits );
-            fileOpen(true);
-          break;
-          case 2: // merge file into current tab
-            fileOpen();
-          break;
-		}// switch
-	}// if
-  }
-}// fileOpenSegment
-
-/*! open a segment file and add new tab */
-void MyWindow::fileOpenSegmentPm()
-{
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  if( w_demo_p->is_empty() ) // pm is empty
-  {
-    updateTraitsType( setSegmentTraits );
-    fileOpenPm();
-  }
-  else
-  {
-    FileOpenOptionsForm * form = new FileOpenOptionsForm(false);
-    if ( form->exec() )
-    {
-        int id = form->buttonGroup->id(form->buttonGroup->selected());
-		switch ( id )
-		{
-          case 0: // open file in a new tab
-            add_segment_tab();
-            fileOpenPm();
-            break;
-          case 1: // open file in current tab (delete current Pm)
-            updateTraitsType( setSegmentTraits );
-            fileOpenPm();
-          break;
-		}// switch
-	}// if
-  }
-}// fileOpenSegment
-
-/*! open a polyline file and add new tab */
-void MyWindow::fileOpenPolyline()
-{
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  bool flag = (w_demo_p->traits_type == POLYLINE_TRAITS);
-  if( w_demo_p->is_empty() ) // pm is empty
-  {
-    updateTraitsType( setPolylineTraits );
-    fileOpen(true);
-  }
-  else
-  {
-    FileOpenOptionsForm *form = new FileOpenOptionsForm(flag);
-    if ( form->exec() )
-    {
-      int id = form->buttonGroup->id(form->buttonGroup->selected());
-      switch ( id )
-      {
-       case 0: // open file in a new tab
-        add_polyline_tab();
-        fileOpen();
-        break;
-       case 1: // open file in current tab (delete current Pm)
-        updateTraitsType( setPolylineTraits );
-        fileOpen(true);
-        break;
-       case 2: // merge file into current tab
-        fileOpen();
-        break;
-      }// switch
-    }// if
-  }
-}// fileOpenPolyline
-
-/*! open a polyline file and add new tab */
-void MyWindow::fileOpenPolylinePm()
-{
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  if( w_demo_p->is_empty() ) // pm is empty
-  {
-    updateTraitsType( setPolylineTraits );
-    fileOpenPm();
-  }
-  else
-  {
-    FileOpenOptionsForm * form = new FileOpenOptionsForm(false);
-    if ( form->exec() )
-    {
-      int id = form->buttonGroup->id(form->buttonGroup->selected());
-      switch ( id )
-      {
-       case 0: // open file in a new tab
-        add_polyline_tab();
-        fileOpenPm();
-        break;
-       case 1: // open file in current tab (delete current Pm)
-        updateTraitsType( setPolylineTraits );
-        fileOpenPm();
-        break;
-      }// switch
-    }// if
-  }
-}// fileOpenPolylinePm
-
-
-/*! open a file */
-void MyWindow::fileOpen( bool clear_flag )
-{
-  QString filename =
-    QFileDialog::getOpenFileName(QString::null, 0, this,
-                                 "file open", "Demo -- File Open" );
-  if ( !filename.isEmpty() )
-  {
-    load( filename , clear_flag);
-	updateMode( dragMode );
-  }
-  else
-    statusBar()->message( "File Open abandoned", 2000 );
-}
-
-/*! open a Pm file */
-void MyWindow::fileOpenPm()
-{
-  QString filename =
-    QFileDialog::getOpenFileName(QString::null, 0, this,
-                                 "file open", "Demo -- File Open" );
-  if ( filename.isEmpty() )
-  {
-    statusBar()->message( "File Open abandoned", 2000 );
-	return;
-  }
-  std::ifstream inputFile(filename.ascii());
-  // Creates an ifstream object named inputFile
-  if (! inputFile.is_open()) // Always test file open
-  {
-    std::cout << "Error opening input file" << std::endl;
-    return;
-  }
-
-  Qt_widget_base_tab    *w_demo_p1 =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  QCursor old = w_demo_p1->cursor();
-  w_demo_p1->setCursor(Qt::WaitCursor);
-  w_demo_p1->read_from_file = true;
-  switch ( w_demo_p1->traits_type ) {
-   case SEGMENT_TRAITS:
-    {
-      Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->currentPage());
-      inputFile >> (*w_demo_p->m_curves_arr);
-     break;
-    }
-   case POLYLINE_TRAITS: // dosen't work !!
-    {
-      Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->currentPage());
-     inputFile >> (*w_demo_p->m_curves_arr);
-	   break;
-    }
-   case CONIC_TRAITS: // dosen't work !!
-    {
-      /*Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->currentPage());
-     inputFile >> (*w_demo_p->m_curves_arr);*/
-     break;
-    }
-  }
-
-  inputFile.close();
-
-
-  w_demo_p1->set_window(w_demo_p1->bbox.xmin() , w_demo_p1->bbox.xmax() ,
-                     w_demo_p1->bbox.ymin() , w_demo_p1->bbox.ymax());
-
-  inputFile.close();
-  w_demo_p1->setCursor(old);
-  updateMode( dragMode );
-  something_changed();
-
-  setCaption( QString( "Arrangement -- %1" ).arg( m_filename ) );
-  statusBar()->message( QString( "Opened \'%1\'" ).arg( m_filename ), 2000 );
-
-}
-/*! open a polyline or conic file
- * \param filename - name of the file
- */
-void MyWindow::load( const QString& filename , bool clear_flag )
-{
-  std::ifstream inputFile(filename.ascii());
-  // Creates an ofstream object named inputFile
-  if (! inputFile.is_open()) // Always test file open
-  {
-    std::cout << "Error opening input file" << std::endl;
-    return;
-  }
-
-  Qt_widget_base_tab    *w_demo =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  QCursor old = w_demo->cursor();
-  w_demo->setCursor(Qt::WaitCursor);
-
-  if (w_demo->traits_type == POLYLINE_TRAITS)
-  {
-    Qt_widget_demo_tab<Polyline_tab_traits>    *w_demo_p =
-      static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-      (myBar->currentPage());
-    if (clear_flag)
-      w_demo_p->m_curves_arr->clear();
-
-    std::vector<Arr_pol_point_2> points;
-
-    unsigned int num_polylines;
-    inputFile >> num_polylines;
-    std::list<Arr_pol_2> pol_list;
-
-    unsigned int i;
-    for (i = 0; i < num_polylines; i++) {
-      unsigned int num_segments;
-      inputFile >> num_segments;
-      points.clear();
-      unsigned int j;
-      for (j = 0; j < num_segments; j++) {
-        int ix, iy;
-        inputFile >> ix >> iy;
-        points.push_back (Arr_pol_point_2(NT(ix),NT(iy)));
-      }
-
-      Arr_pol_2 curve (points.begin(), points.end());
-
-      CGAL::Bbox_2 curve_bbox = curve.bbox();
-      if (i == 0)
-        w_demo->bbox = curve_bbox;
-      else
-        w_demo->bbox = w_demo->bbox + curve_bbox;
-
-      pol_list.push_back(curve);
-    }
-    CGAL::insert(*(w_demo_p->m_curves_arr), pol_list.begin(), pol_list.end());
-  }
-
-  else if (w_demo->traits_type == SEGMENT_TRAITS)
-  {
-    Qt_widget_demo_tab<Segment_tab_traits>    *w_demo_p =
-      static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-      (myBar->currentPage());
-    if (clear_flag)
-        w_demo_p->m_curves_arr->clear();
-
-    int count;
-    inputFile >> count;
-    int i;
-    std::list<Arr_seg_2> seg_list;
-    for (i = 0; i < count; i++) {
-      NT x0, y0, x1, y1;
-      inputFile >> x0 >> y0 >> x1 >> y1;
-
-      Arr_seg_point_2 p1(x0, y0);
-      Arr_seg_point_2 p2(x1, y1);
-
-	  Arr_seg_2 curve(p1, p2);
-
-      CGAL::Bbox_2 curve_bbox = curve.bbox();
-      if (i == 0)
-        w_demo->bbox = curve_bbox;
-      else
-        w_demo->bbox = w_demo->bbox + curve_bbox;
-
-      seg_list.push_back(curve);
-    }
-
-    CGAL::insert(*(w_demo_p->m_curves_arr), seg_list.begin(), seg_list.end());
-  }
-
-#ifdef CGAL_USE_CORE
-  else if (w_demo->traits_type == CONIC_TRAITS)
-  {
-    Qt_widget_demo_tab<Conic_tab_traits>    *w_demo_p =
-      static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-      (myBar->currentPage());
-    if (clear_flag)
-        w_demo_p->m_curves_arr->clear();
-    typedef Conic_tab_traits::Traits    Conic_traits;
-    Conic_reader<Conic_traits>  reader;
-    std::list<Arr_conic_2>               curve_list;
-    reader.read_data(filename, std::back_inserter(curve_list), w_demo->bbox);
-    CGAL::insert (*(w_demo_p->m_curves_arr), curve_list.begin(),
-                  curve_list.end());
-  }
-#endif
-
-  w_demo->set_window(w_demo->bbox.xmin() , w_demo->bbox.xmax() ,
-                     w_demo->bbox.ymin() , w_demo->bbox.ymax());
-
-  inputFile.close();
-  w_demo->setCursor(old);
-
-  something_changed();
-}
-
-#ifdef CGAL_USE_CORE
-/*! read a conic curve
- * \param is - input file stream
- * \param cv - will hold the reading curve
- */
-void MyWindow::ReadCurve(std::ifstream & is, Arr_conic_2 & cv)
-{
-  // Read a line from the input file.
-  char one_line[128];
-
-  skip_comments (is, one_line);
-  std::istringstream str_line (one_line);
-
-  // Read the arc type and act accordingly.
-  char     type;
-
-  str_line >> type;
-
-  if (type == 's' || type == 'S')
-  {
-    // Construct a line segment. The line should have the format:
-    //   s <x1> <y1> <x2> <y2>
-    // where (x1, y1), (x2, y2) are the endpoints of a segment.
-    Rational    x1, y1, x2, y2;
-
-    str_line >> x1 >> y1 >> x2 >> y2;
-
-    Rat_point_2   p1(x1, y1), p2(x2, y2);
-    Rat_segment_2 seg (p1, p2);
-
-    cv = Arr_conic_2 (seg);
-  }
-  else if (type == 'c' || type == 'C')
-  {
-    // Construct a full circle. The line should have the format:
-    //   c <x0> <y0> <R_sq>
-    // where (x0, y0) is the center of the circle and R_sq is its squared
-    // radius.
-    Rational    x0, y0, R_sq;
-    str_line >> x0 >> y0 >> R_sq;
-
-    Rat_point_2   p0(x0, y0);
-    Rat_circle_2  circ(p0, R_sq);
-
-    cv = Arr_conic_2 (circ);
-  }
-  else if (type == 't' || type == 'T')
-  {
-    // Construct a circular arc. The line should have the format:
-    //   t <x1> <y1> <x2> <y2> <x3> <y3>
-    // where (x1, y1), (x2, y2) and (x3, y3) define the arc.
-    Rational    x1, y1, x2, y2, x3, y3;
-
-    str_line >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
-
-    Rat_point_2   p1(x1, y1), p2(x2, y2), p3(x3, y3);
-
-    cv = Arr_conic_2 (p1, p2, p3);
-  }
-  else if (type == 'f' || type == 'F')
-  {
-    // Construct a full conic curve. The line should have the format:
-    //   c <r> <s> <t> <u> <v> <w>
-    // where r, s, t, u, v, w define the conic equation.
-    Rational    r, s, t, u, v, w;
-
-    str_line >> r >> s >> t >> u >> v >> w;
-
-    cv = Arr_conic_2 (r, s, t, u, v, w);
-  }
-  else if (type == 'a' || type == 'A')
-  {
-    // Construct a conic arc. The line should have the format:
-    //   c <r> <s> <t> <u> <v> <w> <orient> <x1> <y1> <x2> <y2>
-    // where r, s, t, u, v, w define the conic equation, while (x1, y1)
-    // and (x2, y2) are the arc's endpoints.
-    Rational    r, s, t, u, v, w;
-
-    str_line >> r >> s >> t >> u >> v >> w;
-
-    // Read the orientation.
-    int               i_orient;
-    CGAL::Orientation orient;
-
-    str_line >> i_orient;
-    if (i_orient > 0)
-      orient = CGAL::COUNTERCLOCKWISE;
-    else if (i_orient < 0)
-      orient = CGAL::CLOCKWISE;
-    else
-      orient = CGAL::COLLINEAR;
-
-    // Read the end points of the arc and create it.
-    // Notice we read the coordinates as strings, then we convert them to
-    // the Algebraic type, as we do not want to initialize Algebraic from
-    // a double.
-    char    num[50];
-    Algebraic    x1, y1, x2, y2;
-
-    str_line >> num;
-    x1 = Algebraic(num);
-    str_line >> num;
-    y1 = Algebraic(num);
-
-    str_line >> num;
-    x2 = Algebraic(num);
-    str_line >> num;
-    y2 = Algebraic(num);
-
-    Arr_conic_point_2 ps (x1, y1);
-    Arr_conic_point_2 pt (x2, y2);
-
-    cv = Arr_conic_2 (r, s, t, u, v, w, orient, ps ,pt);
-  }
-  else if (type == 'l' || type == 'L')
-  {
-    // Construct a conic arc. The line should have the format:
-    //   c <r> <s> <t> <u> <v> <w> <a> <b> <c>
-    // where r, s, t, u, v, w define the conic equation and a, b, c define
-    // a line that intersects it.
-    Rational    r, s, t, u, v, w;
-    Rational    a, b, c;
-
-    str_line >> r >> s >> t >> u >> v >> w >> a >> b >> c;
-
-    Rat_line_2    line (a, b, c);
-
-  }
-  else if (type == 'q' || type == 'Q')
-  {
-    // Construct a circular arc. The line should have the format:
-    //   t <x1> <y1> <x2> <y2> <x3> <y3> <x4> <y4> <x5> <y5>
-    // where (x1, y1), (x2, y2), (x3, y3), (x4, y4) and (x5, y5) define the
-    // arc.
-    Rational    x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;
-
-    str_line >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5;
-
-    Rat_point_2   p1(x1, y1), p2(x2, y2), p3(x3, y3), p4(x4, y4), p5(x5, y5);
-
-    cv = Arr_conic_2 (p1, p2, p3, p4, p5);
-  }
-  else
-  {
-    std::cerr << "Illegal conic type specification: " << type << "."
-	      << std::endl;
-  }
-
-  return;
-}
-#endif
-
-/*! open a polyline file and add new tab */
-void MyWindow::fileOpenConic()
-{
-#ifdef CGAL_USE_CORE
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  bool flag = (w_demo_p->traits_type == CONIC_TRAITS);
-  if( w_demo_p->is_empty() ) // pm is empty
-  {
-    updateTraitsType( setConicTraits );
-    fileOpen(true);
-  }
-  else
-  {
-    FileOpenOptionsForm * form = new FileOpenOptionsForm(flag);
-    if ( form->exec() )
-    {
-      int id = form->buttonGroup->id(form->buttonGroup->selected());
-      switch ( id )
-      {
-       case 0: // open file in a new tab
-        add_conic_tab();
-        fileOpen();
-        break;
-       case 1: // open file in current tab (delete current Pm)
-        updateTraitsType( setConicTraits );
-        fileOpen(true);
-        break;
-       case 2: // merge file into current tab
-        fileOpen();
-        break;
-      }// switch
-    }// if
-  }// else
-#else
-  CGAL_error_msg("Conics were not compiled");
-#endif
-}// fileOpenConic
-
-/*! calls from readCurve to skip comments in the input file */
-void MyWindow::skip_comments( std::ifstream& is, char* one_line )
-{
-  while( !is.eof() )
-  {
-    is.getline( one_line, 128 );
-    if( one_line[0] != '#' )
-    {
-      break;
-    }
-  }
-}
-
-/*! save file in a different name */
-void MyWindow::fileSaveAs()
-{
-  QString filename =
-    QFileDialog::getSaveFileName(QString::null, "Arrangement (*.arr)", this,
-                                 "file save as", "Arrangement -- File Save As");
-  if ( !filename.isEmpty() )
-  {
-    int answer = 0;
-    if ( QFile::exists( filename ) )
-      answer = QMessageBox::warning(
-                                    this, "Overwrite File",
-                                    QString( "Overwrite\n\'%1\'?" ).
-                                    arg( filename ),
-                                    "&Yes", "&No", QString::null, 1, 1 );
-    if ( answer == 0 )
-    {
-      m_filename = filename;
-      //updateRecentFiles( filename );
-      fileSave();
-      return;
-    }
-  }
-  statusBar()->message( "Saving abandoned", 2000 );
-}
-
-/*! save file */
-void MyWindow::fileSave()
-{
-  if ( m_filename.isEmpty() ) {
-    fileSaveAs();
-    return;
-  }
-
-  std::ofstream outFile(m_filename.ascii());
-  // Creates an ofstream object named outFile
-  if (! outFile.is_open()) // Always test file open
-  {
-    std::cout << "Error opening input file" << std::endl;
-    return;
-  }
-
-  Qt_widget_base_tab    *w_demo_p1 =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  switch ( w_demo_p1->traits_type ) {
-   case SEGMENT_TRAITS:
-    {
-     Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->currentPage());
-     outFile << (*w_demo_p->m_curves_arr);
-     break;
-    }
-   case POLYLINE_TRAITS:
-    {
-      Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->currentPage());
-      outFile << (*w_demo_p->m_curves_arr);
-     break;
-    }
-   case CONIC_TRAITS:
-    {
-      /*Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->currentPage());
-      outFile << (*w_demo_p->m_curves_arr);*/
-     break;
-    }
-  }
-
-  outFile.close();
-
-  setCaption( QString( "Arrangement -- %1" ).arg( m_filename ) );
-  statusBar()->message( QString( "Saved \'%1\'" ).arg( m_filename ), 2000 );
-}
-
-/*! save planar map to post script */
-void MyWindow::fileSave_ps()
-{
-#if 0
-
-  Qt_widget_base_tab    *w_demo_p1 =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  switch ( w_demo_p1->traits_type ) {
-   case SEGMENT_TRAITS:
-    {
-     Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->currentPage());
-     // Print to Postscript file:
-     CGAL::Postscript_file_stream  LPF(m_width, m_height ,"pm.ps");
-     LPF.init(-3,3,-3);
-     LPF.set_line_width(1);
-     //LPF << w_demo_p->m_curves_arr;
-     break;
-    }
-   case POLYLINE_TRAITS:
-    {
-     //Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p =
-     //static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-     //  (myBar->currentPage());
-     //outFile << w_demo_p->m_curves_arr;
-     break;
-    }
-   case CONIC_TRAITS:
-    {
-     //Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p =
-     //static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-      // (myBar->currentPage());
-     //outFile << w_demo_p->m_curves_arr;
-     break;
-    }
-  }
-#endif
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp
deleted file mode 100644
index 4ad434e..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp
+++ /dev/null
@@ -1,785 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_operations.cpp $
-// $Id: MyWindow_operations.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-#include "arrangement_2.h"
-#include "forms.h"
-#include "qt_layer.h"
-#include "demo_tab.h"
-
-#include "icons/demo_delete.xpm"
-#include "icons/draw.xpm"
-
-#include "icons/demo_rayshoot_down.xpm"
-#include "icons/demo_rayshoot_up.xpm"
-#include "icons/demo_arrow_down.xpm"
-#include "icons/demo_arrow_up.xpm"
-
-//global variables
-bool lower_env = false;
-bool upper_env = false;
-
-/*! something_changed - change the current page's current_state
- *  and thats makes him redraw
- */
-void MyWindow::something_changed()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab     *w_demo_p =
-    dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-  w_demo_p->current_state++;
-}
-
-/*! get_new_object - get a point object from current page
- * \param obj - a CGAL object
- */
-void MyWindow::get_new_object(CGAL::Object obj)
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  // point location
-  Coord_point p;
-  if(CGAL::assign(p,obj))
-    w_demo_p->pl_point = p;
-
-  something_changed();
-}
-
-/*! about - message box about the demo */
-void MyWindow::about()
-{
-  QMessageBox::about( this, "About",
-                      "This is a demo for the Arrangement package\n"
-                      "Copyright CGAL @2003");
-}
-
-/*! aboutQt - message box about Qt */
-void MyWindow::aboutQt()
-{
-  QMessageBox::aboutQt( this, "About Qt" );
-}
-
-/*! howto - help menu */
-void MyWindow::howto()
-{
-  QString home;
-  home = "help/index.html";
-  CGAL::Qt_help_window * help =
-    new CGAL::Qt_help_window(home, ".", 0, "help viewer");
-  help->resize(400, 400);
-  help->setCaption("Demo HowTo");
-  help->show();
-}
-
-/*! redraw the widget when timer ends */
-void MyWindow::timer_done()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_demo_tab*,
-  // as we know that only
-  // Qt_widget_demo_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  if(old_state!=w_demo_p->current_state){
-    w_demo_p->redraw();
-    old_state = w_demo_p->current_state;
-  }
-}
-
-
-/*! zoom in - enlarge the picture */
-void MyWindow::zoomin()
-{
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  w_demo_p->zoom(m_scailing_factor);
-}
-
-/*! zoom out - lessen the picture */
-void MyWindow::zoomout()
-{
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  w_demo_p->zoom(1/m_scailing_factor);
-}
-
-/*! properties form dialog */
-void MyWindow::properties()
-{
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  PropertiesForm *optionsForm =
-    new PropertiesForm( myBar , this ,number_of_tabs ,w_demo_p ,
-                m_scailing_factor , colors_flag);
-
-  if ( optionsForm->exec() )
-  {
-    m_width = optionsForm->box1->value();
-    m_height = optionsForm->box2->value();
-    w_demo_p->m_line_width = optionsForm->box3->value();
-        w_demo_p->m_vertex_width = optionsForm->box8->value();
-    double new_factor = static_cast<double> (optionsForm->box4->value());
-    QString paint_mode = optionsForm->box5->currentText();
-    w_demo_p->cube_size = optionsForm->box6->value();
-    if (strcmp(paint_mode,"Different Colors At Overlay") == 0)
-      colors_flag = true;
-    else
-      colors_flag = false;
-        QString remove_mode = optionsForm->box7->currentText();
-        if (strcmp(remove_mode,"Remove entire original curve") == 0)
-      w_demo_p->remove_org_curve = true;
-    else
-      w_demo_p->remove_org_curve = false;
-        QString draw_vertex_mode = optionsForm->box9->currentText();
-    if (strcmp(draw_vertex_mode,"Draw") == 0)
-      w_demo_p->draw_vertex = true;
-    else
-      w_demo_p->draw_vertex = false;
-    m_scailing_factor = (new_factor/10);
-    resize(m_width,m_height);
-    w_demo_p->redraw();
-    something_changed();
-  }
-  delete optionsForm;
-}
-
-
-/*! print planar map */
-void MyWindow::print()
-{
-  Qt_widget_base_tab    *w_demo_p1 =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  w_demo_p1->print_to_ps();
-}
-
-
-/*! show grid without been in a grid snap mode */
-void MyWindow::showGrid()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab     *w_demo_p =
-    dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-  w_demo_p->grid = true;
-  something_changed();
-}
-
-/*! hide the grid (can be applied only when we
- *  are not in a grid snap mode.
- */
-void MyWindow::hideGrid()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab     *w_demo_p =
-    dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-  w_demo_p->grid = false;
-  something_changed();
-}
-
-
-void MyWindow::backGroundColor()
-{
-  QColor c = QColorDialog::getColor();
-  /* if the cancel button is pressed (in the modal color dialog that pops up
-   * as a result of ::getColor()) then an invalid color is returned and no 
-   * change is made
-   */
-  if (c.isValid()) 
-  {  
-    Qt_widget_base_tab     *w_base_p =
-      dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-
-    w_base_p->change_background_flag=TRUE;
-    w_base_p->fill_face_color=c;  
-    TraitsType t = w_base_p->traits_type;
-
-    switch ( t ) {
-    case SEGMENT_TRAITS:
-      {
-        Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p =
-          static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-          (myBar->currentPage());
-        Seg_face_handle ubf = w_demo_p->m_curves_arr->unbounded_face();
-        w_demo_p->set_face_color(ubf,c);         
-        break;
-      }
-    case POLYLINE_TRAITS:
-      {
-        Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p =
-          static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-          (myBar->currentPage());              
-        Pol_face_handle ubf = w_demo_p->m_curves_arr->unbounded_face();
-        w_demo_p->set_face_color(ubf,c);
-        break;
-      }
-    case CONIC_TRAITS:
-      {
-#ifdef CGAL_USE_CORE
-        Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p =
-          static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-          (myBar->currentPage()); 
-        Conic_face_handle       ubf = w_demo_p->m_curves_arr->unbounded_face();
-        w_demo_p->set_face_color(ubf,c); 
-#endif
-        break;
-      }
-    }
-    something_changed();
-  } 
-}
-
-void MyWindow::changeEdgeColor()
-{
-  QColor c = QColorDialog::getColor();
-  /* if the cancel button is pressed (in the modal color dialog that pops up
-   * as a result of ::getColor()) then an invalid color is returned and no 
-   * change is made
-   */  
-  if (c.isValid())
-  {  
-    Qt_widget_base_tab     *w_demo_p =
-      dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-    
-    w_demo_p->edge_color = c;
-    w_demo_p->change_edge_color = true;
-    something_changed();
-  }
-}
-
-void MyWindow::changeVertexColor()
-{
-  QColor c = QColorDialog::getColor();
-  /* if the cancel button is pressed (in the modal color dialog that pops up
-   * as a result of ::getColor()) then an invalid color is returned and no 
-   * change is made
-   */  
-  if (c.isValid()) {  
-    Qt_widget_base_tab     *w_demo_p =
-      dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-    w_demo_p->vertex_color = c;
-    w_demo_p->change_vertex_color = true;
-    something_changed();
-  }
-}
-
-/*! a dialog form to set the pointLocationStrategy */
-void MyWindow::pointLocationStrategy()
-{
-  Qt_widget_base_tab * w_demo_p =
-    dynamic_cast<Qt_widget_base_tab*> (myBar->currentPage());
-  PointLocationStrategyForm form;
-  if ( form.exec() )
-  {
-    QString type = form.arrComboBox1->currentText();
-    if(! strcmp(type,"Simple"))
-      w_demo_p -> change_strategy(SIMPLE);
-    else
-      if(!strcmp(type,"Trapezoiedal"))
-        w_demo_p -> change_strategy(TRAP);
-      else
-        if(!strcmp(type,"Walk"))
-          w_demo_p -> change_strategy(WALK);
-        else
-          if(!strcmp(type,"Land marks"))
-            w_demo_p -> change_strategy(LANDMARKS);
-  }
-}
-
-
-/*! initialize the widget */
-void MyWindow::init(Qt_widget_base_tab *widget)
-{
-  connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-          this, SLOT(get_new_object(CGAL::Object)));
-  widget->attach(testlayer);
-  widget->setCursor(QCursor( QPixmap( (const char**)small_draw_xpm)));
-  rayShootingUpMode->setIconSet(QPixmap((const char**)demo_rayshoot_up_xpm ));
-  rayShootingDownMode->setIconSet(QPixmap((const char**)demo_rayshoot_down_xpm ));
-  widget->setBackgroundColor(def_bg_color);
-  tab_number++;
-  number_of_tabs++;
-  // add the new widget to myBar
-  myBar->insertTab( widget,
-                    QString("Arr " + QString::number( widget->index + 1 ) ),
-                    widget->index );
-  myBar->setCurrentPage(myBar->indexOf(widget));
-
-  update();
-  something_changed();
-
-}
-
-/*! add a tab widget with segment traits */
-void MyWindow::add_segment_tab()
-{
-  Qt_widget_demo_tab<Segment_tab_traits> *widget =
-    new Qt_widget_demo_tab<Segment_tab_traits>
-    (SEGMENT_TRAITS , this, tab_number, colors[tab_number%num_of_colors]);
-  init(widget);
-  widget->draw();
-}
-
-/*! add a tab widget with polyline traits */
-void MyWindow::add_polyline_tab()
-{
-  Qt_widget_demo_tab<Polyline_tab_traits> *widget =
-    new Qt_widget_demo_tab<Polyline_tab_traits>
-    (POLYLINE_TRAITS , this, tab_number, colors[tab_number%num_of_colors]);
-  init(widget);
-  widget->draw();
-}
-
-/*! remove the current page (tab) from myBar */
-void MyWindow::remove_tab()
-{
-  if (number_of_tabs > 1)
-  {
-    QWidget *w_demo_p = myBar->currentPage(); // w_demo_p is a pointer to Qt_widget_demo_tab object
-    myBar->removePage(w_demo_p);
-    delete w_demo_p;  //the destructor of Qt_widget_demo_tab will be called (virtual...)
-    number_of_tabs--;
-  }
-  else
-  {
-    QMessageBox::information( this, "Remove Tab",
-                              "Can not remove last tab");
-  }
-}
-
-
-
-/*! update traits type
- * \param action the new traits type
- */
-void MyWindow::updateTraitsType( QAction *action )
-{
-  Qt_widget_base_tab *old_widget =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  Qt_widget_base_tab * widget = 0;
-  int old_index = old_widget->index;
-
-  if (action == setSegmentTraits)
-  {
-    if (old_widget->traits_type == SEGMENT_TRAITS) return;
-    widget = new Qt_widget_demo_tab<Segment_tab_traits>
-      (SEGMENT_TRAITS , this, old_index, old_widget->edge_color);
-  }
-  else if (action == setPolylineTraits)
-  {
-    if (old_widget->traits_type == POLYLINE_TRAITS) return;
-    widget = new Qt_widget_demo_tab<Polyline_tab_traits>
-      (POLYLINE_TRAITS , this, old_index, old_widget->edge_color);
-  }
-#ifdef CGAL_USE_CORE
-  else if (action == setConicTraits)
-  {
-    if (old_widget->traits_type == CONIC_TRAITS) return;
-    widget = new Qt_widget_demo_tab<Conic_tab_traits>
-      (CONIC_TRAITS , this, old_index, old_widget->edge_color);
-  }
-#endif
-
-  if( !old_widget->is_empty() ) // pm is not empty
-  {
-    switch( QMessageBox::warning( this, "Update Traits Type",
-        "This action will destroy the current planar map.\n"
-        "Do you want to continue ?",
-        "Yes",
-        "No", 0, 0, 1 ) ) {
-      case 0:
-          // continue
-          break;
-      case 1: // The user clicked the Quit or pressed Escape
-                  update();
-          something_changed();
-          return;
-          break;
-    }
-  }
-
-
-  int index = myBar->currentPageIndex();
-  QString label = myBar->label(index);
-  myBar->removePage(myBar->currentPage());
-
-  //initialize the new tab widget
-  *widget << CGAL::LineWidth(2);
-  widget->setBackgroundColor(def_bg_color);
-  widget->setMouseTracking(TRUE);
-  connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-          this, SLOT(get_new_object(CGAL::Object)));
-  widget->attach(testlayer);
-  widget->m_line_width = 2;
-  widget->index = old_index;
-  widget->setCursor(QCursor( QPixmap( (const char**)small_draw_xpm)));
-  rayShootingUpMode->setIconSet(QPixmap((const char**)demo_rayshoot_up_xpm ));
-  rayShootingDownMode->setIconSet(QPixmap((const char**)demo_rayshoot_down_xpm ));
-
-  // add the new widget to myBar
-  myBar->insertTab( widget, label , index );
-
-  myBar->setCurrentPage(index);
-
-  update();
-  something_changed();
-}
-
-/*! change the buttons stste according to the traits type */
-void MyWindow::setTraits( TraitsType t )
-{
-  switch ( t ) {
-   case SEGMENT_TRAITS:
-    setSegmentTraits->setOn( TRUE );
-#ifdef CGAL_USE_CORE
-    conicTypeTool->hide();
-#endif
-    break;
-   case POLYLINE_TRAITS:
-    setPolylineTraits->setOn( TRUE );
-#ifdef CGAL_USE_CORE
-    conicTypeTool->hide();
-#endif
-    break;
-   case CONIC_TRAITS:
-#ifdef CGAL_USE_CORE
-    setConicTraits->setOn( TRUE );
-    conicTypeTool->show();
-#endif
-    break;
-  }
-}
-
-
-/*! open color dialog for faces color */
-void MyWindow::openColorDialog()
-{
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  QColor c = QColorDialog::getColor();
-  if( c.isValid())
-    w_demo_p->fill_face_color = c;
-}
-
-void MyWindow::lowerEnvelope(bool b)
-{
-  lower_env = b;
-  something_changed();
-}
-
-void MyWindow::upperEnvelope(bool b)
-{
-  upper_env = b;
-  something_changed();
-}
-
-/*! add a tab widget with conic traits */
-void MyWindow::add_conic_tab()
-{
-#ifdef CGAL_USE_CORE
-  Qt_widget_demo_tab<Conic_tab_traits> *widget =
-    new Qt_widget_demo_tab<Conic_tab_traits>
-    (CONIC_TRAITS , this , tab_number, colors[tab_number%num_of_colors]);
-  init(widget);
-  widget->draw();
-
-  //widget->set_window(widget->x_pixel(widget->x_min()), widget->x_pixel(widget->x_max()),
-    //                 widget->x_pixel(widget->y_min()), widget->x_pixel(widget->y_max()));
-#else
-  CGAL_error_msg("Conics were not compiled");
-#endif
-}
-
-/*! a dialog form to set the conic type for conics insertion. */
-void MyWindow::conicType()
-{
-#ifdef CGAL_USE_CORE
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab     *w_demo_p =
-    dynamic_cast<Qt_widget_base_tab  *> (myBar->currentPage());
-  OptionsForm *form = new OptionsForm();
-  if ( form->exec() )
-  {
-    QString type = form->arrComboBox1->currentText();
-
-    if (strcmp(type,"Circle") == 0)
-      w_demo_p->conic_type = CIRCLE;
-    else if (strcmp(type,"Segment") == 0)
-      w_demo_p->conic_type = SEGMENT;
-        else if (strcmp(type,"Ellipse") == 0)
-      w_demo_p->conic_type = ELLIPSE;
-        else if (strcmp(type,"Parabola") == 0)
-      w_demo_p->conic_type = PARABOLA;
-        else if (strcmp(type,"Hyperbola") == 0)
-      w_demo_p->conic_type = HYPERBOLA;
-  }
-#else
-  CGAL_error_msg("Conics were not compiled");
-#endif
-}
-
-/*! update widget conic type
- * \param action - the new conic type
- */
-void MyWindow::updateConicType( QAction *action )
-{
-#ifdef CGAL_USE_CORE
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  if ( action == setCircle )
-    w_demo_p->conic_type = CIRCLE;
-  else if ( action == setSegment )
-    w_demo_p->conic_type = SEGMENT;
-  else if ( action == setEllipse )
-    w_demo_p->conic_type = ELLIPSE;
-  else if ( action == setParabola )
-    w_demo_p->conic_type = PARABOLA;
-  else if ( action == setHyperbola )
-    w_demo_p->conic_type = HYPERBOLA;
-#else
-  CGAL_error_msg("Conics were not compiled");
-#endif
-}
-
-/*! change the buttons stste according to the traits type */
-void MyWindow::setConicType( ConicType t )
-{
-#ifdef CGAL_USE_CORE
-  switch ( t ) {
-   case CIRCLE:
-    setCircle->setOn( TRUE );
-    break;
-   case SEGMENT:
-    setSegment->setOn( TRUE );
-    break;
-   case ELLIPSE:
-    setEllipse->setOn( TRUE );
-    break;
-   case PARABOLA:
-    setParabola->setOn( TRUE );
-    break;
-   case HYPERBOLA:
-    setHyperbola->setOn( TRUE );
-    break;
-  }
-#else
-  CGAL_error_msg("Conics were not compiled");
-#endif
-}
-
-
-/*! update snap mode - change the snap mode and the relevant buttons
- *  state after the snap mode button was clicked
- * \param on - true if the user activate the button.
- */
-void MyWindow::updateSnapMode( bool on )
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  if (on)
-  {
-    setGridSnapMode->setEnabled( TRUE );
-        if (w_demo_p->snap_mode == SNAP_GRID)
-          setGridSnapMode->setOn( TRUE );
-        else
-        {
-      setGridSnapMode->setOn( FALSE );
-      w_demo_p->snap_mode = SNAP_POINT;
-        }
-    w_demo_p->snap = true;
-  }
-  else
-  {
-    SnapMode old = w_demo_p->snap_mode;
-    setGridSnapMode->setOn( FALSE );
-        setSnapMode->setOn( FALSE );
-    setGridSnapMode->setEnabled( FALSE );
-    w_demo_p->snap = false;
-    w_demo_p->snap_mode = SNAP_NONE;
-    if (old == SNAP_GRID)
-      something_changed();
-  }
-}
-
-/*! update grid snap mode - we have 2 states of snap
- *  - to grid points
- *  - to closest point in the planar map
- * \param on - true when we choos grid mode
- */
-void MyWindow::updateGridSnapMode( bool on )
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  if (on && w_demo_p->snap)
-    w_demo_p->snap_mode = SNAP_GRID;
-  else
-    w_demo_p->snap_mode = SNAP_POINT;
-
-  something_changed();
-}
-
-/*! update widget mode
- * \param action - the new widget mode
- */
-void MyWindow::updateMode( QAction *action )
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  if ( action == insertMode )
-  {
-    w_demo_p->mode = MODE_INSERT;
-    w_demo_p->setCursor(QCursor( QPixmap( (const char**)small_draw_xpm)));
-    something_changed();
-  }
-  else if ( action == deleteMode )
-  {
-    w_demo_p->mode = MODE_DELETE;
-    w_demo_p->setCursor(QCursor( QPixmap( (const char**)delete_xpm)));
-    something_changed();
-  }
-
-  else if ( action == pointLocationMode )
-  {
-    w_demo_p->mode = MODE_POINT_LOCATION;
-    w_demo_p->setCursor(Qt::CrossCursor);
-    current_label = point_location_label;
-  }
-  else if ( action == rayShootingUpMode )
-  {
-    w_demo_p->mode = MODE_RAY_SHOOTING_UP;
-    w_demo_p->setCursor(QCursor(QPixmap((const char**)demo_arrow_up_xpm)));
-  }
-  else if( action == rayShootingDownMode )
-  {
-    w_demo_p->mode = MODE_RAY_SHOOTING_DOWN;
-    w_demo_p->setCursor(QCursor(QPixmap((const char**)demo_arrow_down_xpm)));
-  }
-  else if ( action == dragMode )
-  {
-    w_demo_p->mode = MODE_DRAG;
-    w_demo_p->setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-    something_changed();
-  }
-  else if ( action == mergeMode )
-  {
-    w_demo_p->mode = MODE_MERGE;
-    w_demo_p->setCursor(Qt::IbeamCursor );
-    something_changed();
-  }
-  else if ( action == splitMode )
-  {
-    w_demo_p->mode = MODE_SPLIT;
-    w_demo_p->setCursor(Qt::SplitHCursor  );
-    something_changed();
-  }
-  else if ( action == fillfaceMode )
-  {
-    w_demo_p->mode = MODE_FILLFACE;
-    w_demo_p->setCursor(Qt::CrossCursor  );
-  }
-}
-
-
-/*! set the buttons state according to the current mode */
-void MyWindow::setMode( Mode m )
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  w_demo_p->mode = m;
-  switch ( m ) {
-   case MODE_INSERT: insertMode->setOn( TRUE ); break;
-   case MODE_DELETE: deleteMode->setOn( TRUE ); break;
-   case MODE_POINT_LOCATION: pointLocationMode->setOn( TRUE ); break;
-   case MODE_RAY_SHOOTING_UP: rayShootingUpMode->setOn( TRUE ); break;
-   case MODE_RAY_SHOOTING_DOWN: rayShootingDownMode->setOn( TRUE ); break;
-   case MODE_DRAG: dragMode->setOn( TRUE ); break;
-   case MODE_MERGE: mergeMode->setOn( TRUE ); break;
-   case MODE_SPLIT: splitMode->setOn( TRUE ); break;
-   case MODE_FILLFACE: fillfaceMode->setOn( TRUE ); break;
-  }
-}
-
-/*! update all modes */
-void MyWindow::update()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-  // as we know that only
-  // Qt_widget_base_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_demo_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-  setMode( w_demo_p->mode );
-  //updateSnapMode( w_demo_p->snap );
-  setTraits( w_demo_p->traits_type );
-#ifdef CGAL_USE_CORE
-  setConicType( w_demo_p->conic_type );
-#endif
-  if ( w_demo_p->snap )
-  {
-    setGridSnapMode->setEnabled( TRUE );
-    setSnapMode->setOn( TRUE );
-    if ( w_demo_p->snap_mode == SNAP_GRID)
-      setGridSnapMode->setOn( TRUE );
-    else
-      setGridSnapMode->setOn( FALSE );
-  }
-  else
-  {
-    setSnapMode->setOn( FALSE );
-    setGridSnapMode->setOn( FALSE );
-    setGridSnapMode->setEnabled( FALSE );
-  }
-}
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp
deleted file mode 100644
index 48eacd8..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_overlay.cpp $
-// $Id: MyWindow_overlay.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-#include "arrangement_2.h"
-#include "forms.h"
-#include "qt_layer.h"
-#include "demo_tab.h"
-#include "overlay_functor.h"
-
-#include <CGAL/Arr_overlay_2.h>
-
-/*! open the overlay dialog form and read its output */
-void MyWindow::overlay_pm()
-{
-  OverlayForm *form = new OverlayForm( myBar , this ,tab_number);
-  if ( form->exec() )
-  {
-    unsigned int i = 2;
-    if (form->listBox2->count() < i)
-    {
-      QMessageBox::information( this, "Overlay",
-          "You need more than one arrangement to perform overlay...");
-      return;
-    }
-    i = 12;
-    if (form->listBox2->count() > i)
-    {
-      QMessageBox::information
-        (this, "Overlay",
-         "Maximal number of arrangements to overlay is 12 !");
-      return;
-    }
-    CheckForm *check_form = new CheckForm( form , this );
-    if ( ! check_form->exec() )
-      return;
-
-    std::list<int>      indexes;
-    std::list<int>      paint_flags;
-    TraitsType          t;
-    Qt_widget_base_tab *w_demo_p;
-    int                 index,real_index = 0;
-
-    for (unsigned int i = 0; i < form->listBox2->count(); i++)
-    {
-      form->listBox2->setCurrentItem(i);
-      char s[100];
-      strcpy(s, form->listBox2->currentText());
-      char * pch;
-      pch = strtok(s," ");
-      pch = strtok(NULL, " ");
-      index = atoi(pch);
-      real_index = realIndex(index-1);
-      indexes.push_back(real_index);
-      QCheckBox *b =
-      static_cast<QCheckBox *> (check_form->button_group->find(i));
-      if ( b->isChecked() )
-        paint_flags.push_back(1);
-      else
-        paint_flags.push_back(0);
-    }
-    delete check_form;
-
-    w_demo_p = static_cast<Qt_widget_base_tab *> (myBar->page( real_index ));
-    t = w_demo_p->traits_type;
-
-    FileOpenOptionsForm * form = new FileOpenOptionsForm(false);
-    if ( form->exec() )
-    {
-    int id = form->buttonGroup->id(form->buttonGroup->selected());
-    switch ( id )
-    {
-      case 0: // open file in a new tab
-      make_overlay( indexes , paint_flags , t , true);
-      break;
-      case 1: // open file in current tab (delete current Pm)
-      make_overlay( indexes , paint_flags , t , false);
-      break;
-    }// switch
-    }// if
-
-  }
-  delete form;
-}
-
-/*! make the overlay
- * \param indexes - list of the planar maps indexes in the overlay
- * \param t - the traits type of the overlay
- */
-void MyWindow::make_overlay(std::list<int> indexes,
-                            std::list<int> /* paint_flags */, TraitsType t,
-                            bool new_tab)
-{
-  switch ( t )
-  {
-    case SEGMENT_TRAITS:
-    {
-       if(new_tab)
-         add_segment_tab();
-       else
-         updateTraitsType( setSegmentTraits );
-        Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p_new =
-         static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->currentPage());
-
-   QCursor old = w_demo_p_new->cursor();
-     w_demo_p_new->setCursor(Qt::WaitCursor);
-
-   Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p1, *w_demo_p2;
-
-     int ind1, ind2;
-
-     ind1 = indexes.front();
-     ind2 = indexes.back();
-
-     w_demo_p1 =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->page( ind1 ));
-
-     w_demo_p2 =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->page( ind2 ));
-
-     w_demo_p_new->bbox = w_demo_p1->bbox + w_demo_p2->bbox;
-
-     // update the vector of colors of unbounded faces
-
-     typedef  Segment_tab_traits::Arrangement_2    Arrangement_2;
-     Overlay_functor<Arrangement_2> func;
-     CGAL::overlay(*(w_demo_p1->m_curves_arr),
-                   *(w_demo_p2->m_curves_arr),
-                   *(w_demo_p_new->m_curves_arr),
-                   func);
-
-   w_demo_p_new->set_window(w_demo_p_new->bbox.xmin(),
-                            w_demo_p_new->bbox.xmax(),
-                            w_demo_p_new->bbox.ymin() ,
-                            w_demo_p_new->bbox.ymax());
-
-     w_demo_p_new->setCursor(old);
-     break;
-     }
-
-    case POLYLINE_TRAITS:
-    {
-      if(new_tab)
-        add_polyline_tab();
-      else
-        updateTraitsType( setPolylineTraits );
-
-
-       Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p_new =
-         static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->currentPage());
-
-   QCursor old = w_demo_p_new->cursor();
-     w_demo_p_new->setCursor(Qt::WaitCursor);
-
-   Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p1, *w_demo_p2;
-
-     int ind1, ind2;
-
-     ind1 = indexes.front();
-     ind2 = indexes.back();
-
-     w_demo_p1 =
-       static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->page( ind1 ));
-
-     w_demo_p2 =
-       static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->page( ind2 ));
-
-     w_demo_p_new->bbox = w_demo_p1->bbox + w_demo_p2->bbox;
-
-     // update the vector of colors of unbounded faces
-
-     typedef  Polyline_tab_traits::Arrangement_2    Arrangement_2;
-     Overlay_functor<Arrangement_2> func;
-     CGAL::overlay(*(w_demo_p1->m_curves_arr),
-                   *(w_demo_p2->m_curves_arr),
-                   *(w_demo_p_new->m_curves_arr),
-                   func);
-
-   w_demo_p_new->set_window(w_demo_p_new->bbox.xmin(),
-                            w_demo_p_new->bbox.xmax(),
-                            w_demo_p_new->bbox.ymin() ,
-                            w_demo_p_new->bbox.ymax());
-
-     w_demo_p_new->setCursor(old);
-     break;
-    }
-
-    case CONIC_TRAITS:
-    {
-#ifdef CGAL_USE_CORE
-      if(new_tab)
-        add_conic_tab();
-      else
-        updateTraitsType( setConicTraits );
-
-       Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p_new =
-         static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->currentPage());
-
-   QCursor old = w_demo_p_new->cursor();
-     w_demo_p_new->setCursor(Qt::WaitCursor);
-
-   Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p1, *w_demo_p2;
-
-     int ind1, ind2;
-
-     ind1 = indexes.front();
-     ind2 = indexes.back();
-
-     w_demo_p1 =
-       static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->page( ind1 ));
-
-     w_demo_p2 =
-       static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->page( ind2 ));
-
-     w_demo_p_new->bbox = w_demo_p1->bbox + w_demo_p2->bbox;
-
-     // update the vector of colors of unbounded faces
-
-     typedef  Conic_tab_traits::Arrangement_2    Arrangement_2;
-     Overlay_functor<Arrangement_2> func;
-     CGAL::overlay(*(w_demo_p1->m_curves_arr),
-                   *(w_demo_p2->m_curves_arr),
-                   *(w_demo_p_new->m_curves_arr),
-                   func);
-
-
-
-   w_demo_p_new->set_window(w_demo_p_new->bbox.xmin(),
-                            w_demo_p_new->bbox.xmax(),
-                            w_demo_p_new->bbox.ymin() ,
-                            w_demo_p_new->bbox.ymax());
-
-     w_demo_p_new->setCursor(old);
-#endif
-
-     break;
-
-    }
-  }
-}
-
-
-
-/*! real index - finds the tab bar index of a tab
- * \param index - the tab index (the same one it was
- *                initialized with)
- *\ return the tab bar index of this tab
- */
-int MyWindow::realIndex(int index)
-{
-  Qt_widget_base_tab * w_demo_p;
-  for (int i = 0; i < tab_number; i++)
-  {
-    if ( myBar->isTabEnabled( myBar->page(i) ) )
-    {
-      // We peform downcasting from QWigdet* to
-      // Qt_widget_base_tab*, as we know that only
-      // Qt_widget_base_tab objects are stored in the tab pages.
-      w_demo_p = static_cast<Qt_widget_base_tab *> (myBar->page(i));
-      if (w_demo_p->index == index)
-        return i;
-    }
-  }
-  return -1;
-}
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp
deleted file mode 100644
index 88f9b13..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp
+++ /dev/null
@@ -1,474 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/arrangement_2.cpp $
-// $Id: arrangement_2.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-#include "arrangement_2.h"
-#include "forms.h"
-#include "qt_layer.h"
-#include "demo_tab.h"
-
-#include <CGAL/IO/pixmaps/hand.xpm>
-#include <CGAL/IO/pixmaps/movepoint.xpm>
-#include <CGAL/IO/pixmaps/point.xpm>
-#include <CGAL/IO/pixmaps/line.xpm>
-#include <CGAL/IO/pixmaps/arrow.xpm>
-#include <CGAL/IO/pixmaps/alpha_shape.xpm>
-#include "icons/polyline.xpm"
-#include "icons/conic.xpm"
-#include "icons/ray_shooting2.xpm"
-#include "icons/conic_types.xpm"
-
-#include "icons/demo_insert.xpm"
-#include "icons/demo_delete.xpm"
-#include "icons/demo_snapgrid.xpm"
-#include "icons/demo_snapvertex.xpm"
-#include "icons/demo_merge.xpm"
-#include "icons/demo_split.xpm"
-#include "icons/demo_zoomout.xpm"
-#include "icons/demo_zoomin.xpm"
-#include "icons/demo_pointlocation.xpm"
-
-#include "icons/demo_conic_3points.xpm"
-#include "icons/demo_conic_5points.xpm"
-#include "icons/demo_conic_circle.xpm"
-#include "icons/demo_conic_ellipse.xpm"
-#include "icons/demo_conic_segment.xpm"
-#include "icons/demo_rayshoot_down.xpm"
-#include "icons/demo_rayshoot_up.xpm"
-#include "icons/lower_env_xpm.xpm"
-#include "icons/upper_env_xpm.xpm"
-#include "icons/demo_fill.xpm"
-#include "icons/demo_colors.xpm"
-
-
-
-
-
-
-//////////////////////////////////////////////////////////////////////////////
-/*! MyWindow constructor
- * \param w - window width
- * \param h - window hight
- */
-MyWindow::MyWindow(int w, int h) : num_of_colors(18)
-{
-  myBar = new QTabWidget(this);
-  setCentralWidget(myBar);
-  m_width = w;
-  m_height = h;
-  tab_number = 0;
-  number_of_tabs = 0;
-  testlayer = new Qt_layer( myBar );
-  colors_flag = true;
-  statusBar();
-
-  m_scailing_factor = 2;
-
-  // Traits Group
-  QActionGroup *traitsGroup = new QActionGroup( this ); // Connected later
-  traitsGroup->setExclusive( TRUE );
-
-  setSegmentTraits = new QAction("Segment Traits",
-                                 QPixmap( (const char**)line_xpm ),
-                                 "&Segment Traits", 0 ,traitsGroup,
-                                 "Segment Traits" );
-  setSegmentTraits->setToggleAction( TRUE );
-
-  setPolylineTraits = new QAction("Polyline Traits",
-                                  QPixmap( (const char**)polyline_xpm ),
-                                  "&Polyline Traits", 0 , traitsGroup,
-                                  "Polyline Traits" );
-  setPolylineTraits->setToggleAction( TRUE );
-
-#ifdef CGAL_USE_CORE
-  setConicTraits = new QAction("Conic Traits",
-                               QPixmap( (const char**)conic_xpm ),
-                               "&Conic Traits", 0 , traitsGroup,
-                               "Conic Traits" );
-  setConicTraits->setToggleAction( TRUE );
-#endif
-
-  // Snap Mode Group
-
-  setSnapMode = new QAction("Snap Mode", QPixmap( (const char**)snapvertex_xpm ),
-                            "&Snap Mode", 0 , this, "Snap Mode" );
-  setSnapMode->setToggleAction( TRUE );
-
-  setGridSnapMode = new QAction("Grid Snap Mode",
-                                QPixmap( (const char**)snapgrid_xpm ),
-                                "&Grid Snap Mode", 0 , this,
-                                "Grid Snap Mode" );
-  setGridSnapMode->setToggleAction( TRUE );
-
-  // insert - delete - point_location Mode Group
-  QActionGroup *modeGroup = new QActionGroup( this ); // Connected later
-  modeGroup->setExclusive( TRUE );
-
-  insertMode = new QAction("Insert", QPixmap( (const char**)insert_xpm ),
-                           "&Insert", 0 , modeGroup, "Insert" );
-  insertMode->setToggleAction( TRUE );
-
-  deleteMode = new QAction("Delete", QPixmap( (const char**)delete_xpm ),
-                           "&Delete", 0 , modeGroup, "Delete" );
-  deleteMode->setToggleAction( TRUE );
-
-  pointLocationMode = new QAction("PointLocation",
-                                  QPixmap( (const char**)pointlocation_xpm ),
-                                  "&Point Location", 0 , modeGroup,
-                                  "Point Location" );
-  pointLocationMode->setToggleAction( TRUE );
-
-  rayShootingUpMode = new QAction("RayShootingUp",
-                                QPixmap( (const char**)demo_rayshoot_up_xpm ),
-                                "&Ray Shooting Up", 0 , modeGroup,
-                                "Ray Shooting Up" );
-  rayShootingUpMode->setToggleAction( TRUE );
-
-  rayShootingDownMode = new QAction("RayShootingDown",
-                                QPixmap( (const char**)demo_rayshoot_down_xpm ),
-                                "&Ray Shooting Down", 0 , modeGroup,
-                                "Ray Shooting Down" );
-  rayShootingDownMode->setToggleAction( TRUE );
-
-  dragMode = new QAction("Drag", QPixmap( (const char**)hand_xpm ),
-                         "&Drag", 0 , modeGroup, "Drag" );
-  dragMode->setToggleAction( TRUE );
-
-  mergeMode = new QAction("Merge", QPixmap( (const char**)merge_xpm ),
-                         "&Merge", 0 , modeGroup, "Merge" );
-  mergeMode->setToggleAction( TRUE );
-
-  splitMode = new QAction("Split", QPixmap( (const char**)split_xpm ),
-                         "&Split", 0 , modeGroup, "Split" );
-  splitMode->setToggleAction( TRUE );
-
-   fillfaceMode = new QAction("Fill", QPixmap( (const char**)demo_fill_xpm ),
-                         "&Fill", 0 , modeGroup, "Fill" );
-  fillfaceMode->setToggleAction( TRUE );
-
-
-
-  // zoom in
-  zoominBt = new QAction("Zoom in", QPixmap( (const char**)zoomin_xpm ),
-                         "&Zoom in", 0 , this, "Zoom in" );
-  // zoom out
-  zoomoutBt = new QAction("Zoom out", QPixmap( (const char**)zoomout_xpm ),
-                          "&Zoom out", 0 , this, "Zoom out" );
-
-   // color dialog
-  color_dialog_bt = new QAction("Choose color", QPixmap( (const char**)demo_colors_xpm ),
-                         "&choose color", 0 , this, "choose color" );
-
-  lower_env_dialog_bt = new QAction("Lower envelope", QPixmap( (const char**)lower_env_xpm ),
-                             "&lower envelope", 0, this, "Lower envelop" );
-  lower_env_dialog_bt->setToggleAction( TRUE );
-
-  upper_env_dialog_bt = new QAction("Upper envelope", QPixmap( (const char**)upper_env_xpm ),
-                             "&upper envelope", 0, this, "Upper envelop" );
-  upper_env_dialog_bt->setToggleAction( TRUE );
-
-#ifdef CGAL_USE_CORE
-  // Conic Type Group
-  QActionGroup *conicTypeGroup = new QActionGroup( this ); // Connected later
-  conicTypeGroup->setExclusive( TRUE );
-
-  setCircle = new QAction("Circle",
-                                 QPixmap( (const char**)demo_conic_circle_xpm ),
-                                 "&Circle", 0 ,conicTypeGroup,
-                                 "Circle" );
-  setCircle->setToggleAction( TRUE );
-  setSegment = new QAction("Segment",
-                                 QPixmap( (const char**)demo_conic_segment_xpm ),
-                                 "&Segment", 0 ,conicTypeGroup,
-                                 "Segment" );
-  setSegment->setToggleAction( TRUE );
-  setEllipse = new QAction("Ellipse",
-                                 QPixmap( (const char**)demo_conic_ellipse_xpm ),
-                                 "&Ellipse", 0 ,conicTypeGroup,
-                                 "Ellipse" );
-  setEllipse->setToggleAction( TRUE );
-  setParabola = new QAction("3 Points Arc",
-                                 QPixmap( (const char**)demo_conic_3points_xpm ),
-                                 "&3 Points Arc", 0 ,conicTypeGroup,
-                                 "3 Points Arc" );
-  setParabola->setToggleAction( TRUE );
-  setHyperbola = new QAction("5 Points Arc",
-                                 QPixmap( (const char**)demo_conic_5points_xpm ),
-                                 "&5 Points Arc", 0 ,conicTypeGroup,
-                                 "5 Points Arc" );
-  setHyperbola->setToggleAction( TRUE );
-#endif
-
-  //create a timer for checking if somthing changed
-  QTimer *timer = new QTimer( this );
-  connect( timer, SIGNAL(timeout()),
-           this, SLOT(timer_done()) );
-  timer->start( 200, FALSE );
-
-  // file menu
-  QPopupMenu * file = new QPopupMenu( this );
-  menuBar()->insertItem( "&File", file );
-  file->insertItem("&Open Segment File...", this, SLOT(fileOpenSegment()));
-  file->insertItem("&Open Polyline File...", this, SLOT(fileOpenPolyline()));\
-
-#ifdef CGAL_USE_CORE
-  file->insertItem("&Open Conic File...", this, SLOT(fileOpenConic()));
-#endif
-
-  file->insertItem("&Open Segment Arr File...", this, SLOT(fileOpenSegmentPm()));
-  file->insertItem("&Open Polyline Arr File...", this, SLOT(fileOpenPolylinePm()));
-  //file->insertItem("&Open Conic Pm File", this, SLOT(fileOpenConicPm()));
-  file->insertItem("&Save...", this, SLOT(fileSave()));
-  file->insertItem("&Save As...", this, SLOT(fileSaveAs()));
-  //file->insertItem("&Save to ps...", this, SLOT(fileSave_ps()));
-  file->insertSeparator();
-  file->insertItem("&Print...", this , SLOT(print()));
-  file->insertSeparator();
-  file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_X );
-  file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
-  menuBar()->insertSeparator();
-
-  // tab menu
-  QPopupMenu * tab = new QPopupMenu( this );
-  menuBar()->insertItem( "&Tab", tab );
-  tab->insertItem("Add &Segment Tab", this, SLOT(add_segment_tab()));
-  tab->insertItem("Add &Polyline Tab", this, SLOT(add_polyline_tab()));
-
-#ifdef CGAL_USE_CORE
-  tab->insertItem("Add &Conic Tab", this, SLOT(add_conic_tab()));
-  tab->insertSeparator();
-#endif
-
-  tab->insertItem("Remove &Tab", this, SLOT(remove_tab()));
-  menuBar()->insertSeparator();
-
-  // mode menu
-  QPopupMenu * mode = new QPopupMenu( this );
-  menuBar()->insertItem( "&Mode", mode );
-  insertMode->addTo( mode );
-  deleteMode->addTo( mode );
-  pointLocationMode->addTo( mode );
-  rayShootingUpMode->addTo( mode );
-  rayShootingDownMode->addTo( mode );
-  dragMode->addTo( mode );
-  mergeMode->addTo( mode );
-  splitMode->addTo( mode );
-  fillfaceMode->addTo( mode );
-  menuBar()->insertSeparator();
-
-  // snap mode menu
-  QPopupMenu * snap_mode = new QPopupMenu( this );
-  menuBar()->insertItem( "&Snap mode", snap_mode );
-  setSnapMode->addTo(snap_mode);
-  setGridSnapMode->addTo(snap_mode);
-  menuBar()->insertSeparator();
-
-  // traits menu
-  QPopupMenu * traits = new QPopupMenu( this );
-  menuBar()->insertItem( "&Traits Type", traits );
-  setSegmentTraits->addTo(traits);
-  setPolylineTraits->addTo(traits);
-#ifdef CGAL_USE_CORE
-  setConicTraits->addTo(traits);
-#endif
-
-  // options menu
-  QPopupMenu * options = new QPopupMenu( this );
-  menuBar()->insertItem( "&Options", options );
-  options->insertSeparator();
-  options->insertItem("Overlay...", this, SLOT(overlay_pm()));
-  options->insertSeparator();
-  options->insertItem("Properties...", this, SLOT(properties()));
-  options->insertSeparator();
-  options->insertItem("Show Grid", this, SLOT(showGrid()));
-  options->insertItem("Hide Grid", this, SLOT(hideGrid()));
-  options->insertSeparator();
-  //options->insertItem("Conic Type", this, SLOT(conicType()));
-  //options->insertSeparator();
-  options->insertItem("Unbounded Face Color...", this, SLOT(backGroundColor()));
-  options->insertSeparator();
-  options->insertItem("Edge Color...", this, SLOT(changeEdgeColor()));
-  options->insertSeparator();
-  options->insertItem("Vertex Color...", this, SLOT(changeVertexColor()));
-  options->insertSeparator();
-  options->insertItem("Point-Locaiton Strategy....", this ,
-                                         SLOT(pointLocationStrategy()));
-
-
-  // help menu
-  QPopupMenu * help = new QPopupMenu( this );
-  menuBar()->insertItem( "&Help", help );
-  help->insertItem("How To...", this, SLOT(howto()), Key_F1);
-  help->insertSeparator();
-  help->insertItem("&About...", this, SLOT(about()), CTRL+Key_A );
-  help->insertItem("About &Qt...", this, SLOT(aboutQt()) );
-
-  QToolBar *modeTools = new QToolBar( this, "mode operations" );
-  modeTools->setLabel( "Mode Operations" );
-  insertMode->addTo( modeTools );
-  deleteMode->addTo( modeTools );
-  dragMode->addTo( modeTools );
-  pointLocationMode->addTo( modeTools );
-  rayShootingUpMode->addTo( modeTools );
-  rayShootingDownMode->addTo( modeTools );
-  mergeMode->addTo( modeTools );
-  splitMode->addTo( modeTools );
-  fillfaceMode->addTo( modeTools );
-  modeTools->addSeparator();
-
-  QToolBar *snapModeTools = new QToolBar( this, "snapMode operations" );
-  snapModeTools->setLabel( "Snap Mode Operations" );
-  snapModeTools->addSeparator();
-  setSnapMode->addTo( snapModeTools );
-  setGridSnapMode->addTo( snapModeTools );
-  snapModeTools->addSeparator();
-
-  QToolBar *traitsTool = new QToolBar( this, "traits type" );
-  traitsTool->setLabel( "Traits Type" );
-  traitsTool->addSeparator();
-  setSegmentTraits->addTo( traitsTool );
-  setPolylineTraits->addTo( traitsTool );
-#ifdef CGAL_USE_CORE
-  setConicTraits->addTo( traitsTool );
-#endif
-  traitsTool->addSeparator();
-
-  QToolBar *zoomTool = new QToolBar( this, "zoom" );
-  zoomTool->setLabel( "Zoom" );
-  zoomTool->addSeparator();
-  zoomoutBt->addTo( zoomTool );
-  zoominBt->addTo( zoomTool );
-  zoomTool->addSeparator();
-
-  QToolBar *colorTool = new QToolBar( this, "color" );
-  colorTool->addSeparator();
-  colorTool->setLabel("Choose color");
-  color_dialog_bt->addTo(colorTool);
-  colorTool->addSeparator();
-
-  QToolBar *envelopeTool = new QToolBar( this, "envelopes" );
-  envelopeTool->addSeparator();
-  envelopeTool->setLabel("Envelopes");
-  lower_env_dialog_bt->addTo(envelopeTool);
-  upper_env_dialog_bt->addTo(envelopeTool);
-  envelopeTool->addSeparator();
-
-
-#ifdef CGAL_USE_CORE
-  conicTypeTool = new QToolBar( this, "conic type" );
-  conicTypeTool->setLabel( "Conic Type" );
-  conicTypeTool->addSeparator();
-  setSegment->addTo( conicTypeTool );
-  setCircle->addTo( conicTypeTool );
-  setEllipse->addTo( conicTypeTool );
-  setParabola->addTo( conicTypeTool );
-  setHyperbola->addTo( conicTypeTool );
-#endif
-
-  connect( zoomoutBt, SIGNAL( activated () ) ,
-       this, SLOT( zoomout() ) );
-
-  connect( zoominBt, SIGNAL( activated () ) ,
-       this, SLOT( zoomin() ) );
-
-  connect (color_dialog_bt , SIGNAL( activated()) ,
-          this , SLOT(openColorDialog() ) );
-
-  connect (lower_env_dialog_bt, SIGNAL(toggled(bool)) ,
-           this, SLOT(lowerEnvelope(bool) ));
-
-  connect (upper_env_dialog_bt, SIGNAL(toggled(bool)) ,
-           this, SLOT(upperEnvelope(bool) ));
-  // connect mode group
-  connect( modeGroup, SIGNAL( selected(QAction*) ),
-           this, SLOT( updateMode(QAction*) ) );
-
-  // connect Traits Group
-  connect( traitsGroup, SIGNAL( selected(QAction*) ),
-           this, SLOT( updateTraitsType(QAction*) ) );
-
-#ifdef CGAL_USE_CORE
-  // connect Conic Type Group
-  connect( conicTypeGroup, SIGNAL( selected(QAction*) ),
-           this, SLOT( updateConicType(QAction*) ) );
-#endif
-
-  // connect Snap Mode
-
-  connect( setSnapMode, SIGNAL( toggled( bool ) ) ,
-           this, SLOT( updateSnapMode( bool ) ) );
-
-  connect( setGridSnapMode, SIGNAL( toggled( bool ) ) ,
-       this, SLOT( updateGridSnapMode( bool ) ) );
-
-  // connect the change of current tab
-  connect( myBar, SIGNAL( currentChanged(QWidget * )  ),
-           this, SLOT( update() ) );
-
-  colors = new QColor[num_of_colors];
-  colors[0]  =  Qt::blue;
-  colors[1]  =  Qt::gray;
-  colors[2]  =  Qt::green;
-  colors[3]  =  Qt::cyan;
-  colors[4]  =  Qt::magenta;
-  colors[5]  =  Qt::darkRed;
-  colors[6]  =  Qt::darkGreen;
-  colors[7]  =  Qt::darkBlue;
-  colors[8]  =  Qt::darkMagenta;
-  colors[9]  =  Qt::darkCyan;
-  colors[10] =  Qt::yellow;
-  colors[11] =  Qt::white;
-  colors[12] =  Qt::darkGray;
-  colors[13] =  Qt::gray;
-  colors[14] =  Qt::red;
-  colors[15] =  Qt::cyan;
-  colors[16] =  Qt::darkYellow;
-  colors[17] =  Qt::lightGray;
-
-  //state flag
-  old_state = 0;
-  add_segment_tab();
-  resize(m_width,m_height);
-}
-
-/*! distructor */
-MyWindow::~MyWindow()
-{
-  delete []colors;
-}
-
-#include "arrangement_2.moc"
-
-
-/*! main */
-int main(int argc, char **argv)
-{
-  const QString my_title_string("Arrangement Demo with CGAL Qt_widget");
-  QApplication app( argc, argv );
-  MyWindow widget(707,707); // physical window size
-  app.setMainWidget(&widget);
-  widget.setCaption(my_title_string);
-  widget.setMouseTracking(TRUE);
-  widget.show();
-  return app.exec();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h
deleted file mode 100644
index 921c6b6..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/arrangement_2.h $
-// $Id: arrangement_2.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_MYWINDOW_H
-#define CGAL_MYWINDOW_H
-/////////////////////////////////////////////////////////////////////////////////////////
-// the demo program includs several calsses:
-// 1. MyWindow - main window, create thw window properties (tool bar, menu bar)
-// 2. Qt_widget_demo_tab - the program give the user an optoin of multiple tabs with
-//    different curve traits (segment_tab, polyline_tab and conic_tab)
-// 3. Qt_layer - the screen object attached to every demo_tab that draw on it.
-// 4. forms classes - the dailogs windows.
-/////////////////////////////////////////////////////////////////////////////////////////
-#include <fstream>
-#include <iostream>
-#include <sstream>
-#include <stack>
-#include <set>
-#include <string>
-#include <list>
-#include <vector>
-#include <math.h>
-
-#include <qaction.h>
-#include <qplatinumstyle.h>
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qtimer.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qcolordialog.h>
-
-#include <qfile.h>
-#include <qpainter.h>
-#include <qprinter.h>
-
-#include "cgal_types.h"
-#include <CGAL/IO/Qt_widget_handtool.h>
-
-//////////////////////////////////////////////////////////////////////////////
-class Qt_layer;
-class Qt_widget_base_tab;
-
-/*! class MyWindow is the main class that controls all the window
-    operations
- */
-class MyWindow : public QMainWindow
-{
-    Q_OBJECT
-public:
-    /*! constructor */
-    MyWindow(int w, int h);
-    /*! distructor */
-    ~MyWindow();
-
-private:
-    /*! something changed in the window*/
-    void something_changed();
-    /*! skip_comments in input file */
-    void skip_comments( std::ifstream& is, char* one_line );
-
-#ifdef CGAL_USE_CORE
-    /*! read conic curve from input file */
-    void ReadCurve(std::ifstream & is, Arr_conic_2 & cv);
-#endif
-
-    /*! read from file */
-    void load( const QString& filename , bool clear_flag = false);
-    /*! find the actual widget tab index of a tab */
-    int realIndex(int index);
-    /*! initialize widget */
-    void init(Qt_widget_base_tab *widget);
-
-
-private slots:
-    /*! get_new_object - connects between the widget and main window */
-    void get_new_object(CGAL::Object obj);
-    /*! open an information dialog*/
-    void about();
-    /*! open an information dialog*/
-    void aboutQt();
-    /*! open an information dialog*/
-    void howto();
-    /*! add a new tab of segment traits */
-    void add_segment_tab();
-    /*! add a new tab of polyline traits */
-    void add_polyline_tab();
-    /*! remove current tab */
-    void remove_tab();
-    /*! connect the timer to main window */
-    void timer_done();
-    /*! change the traits type of current tab */
-    void updateTraitsType( QAction *action );
-    /*! update the window buttons according to change in traits type */
-    void setTraits( TraitsType t );
-    /*! on/off snap mode */
-    void updateSnapMode( bool on );
-    /*! on/off grid/point snap mode */
-    void updateGridSnapMode( bool on );
-    /*! change the mode of current tab */
-    void updateMode( QAction *action );
-    /*! update the window buttons according to change in mode */
-    void setMode( Mode m );
-    /*! update all the window buttons */
-    void update();
-    /*! zoom in the picture */
-    void zoomin();
-    /*! zoom out the picture */
-    void zoomout();
-    /*! open a file */
-    void fileOpen( bool clear_flag = false);
-    /*! open a Pm file */
-    void fileOpenPm();
-    /*! open a file and add a segment tab */
-    void fileOpenSegment();
-    /*! open a pm file and add a segment tab */
-    void fileOpenSegmentPm();
-    /*! open a file and add a polyline tab */
-    void fileOpenPolyline();
-    /*! open a pm file and add a Polyline tab */
-    void fileOpenPolylinePm();
-    /*! overlay planar maps */
-    void overlay_pm();
-    /*! make the overlay */
-    void make_overlay( std::list<int> indexes , std::list<int> paint_flags ,
-                       TraitsType t , bool new_tab );
-    /*! save file */
-    void fileSave();
-    /*! save file to ps */
-    void fileSave_ps();
-    /*! open a save file dialog box */
-    void fileSaveAs();
-    /*! open a print dialog box */
-    void print();
-    /*! change window properties */
-    void properties();
-    /*! show grid */
-    void showGrid();
-    /*! hide grid */
-    void hideGrid();
-    /*! set backGround Color */
-    void backGroundColor();
-    /*! set edge Color */
-    void changeEdgeColor();
-    /*! set vertex Color */
-    void changeVertexColor();
-    /*! choose the point location strategy */
-    void pointLocationStrategy();
-    /*! open the color dialog */
-    void openColorDialog();
-    /* compute and draw lower envelope */
-    void lowerEnvelope(bool);
-     /* compute and draw upper envelope */
-    void upperEnvelope(bool);
-    /*! add a new tab of conic traits */
-    void add_conic_tab();
-    /*! open a file and add a conic tab */
-    void fileOpenConic();
-    /*! choose a conic type to insert */
-    void conicType();
-    /*! change the conic type of current tab */
-    void updateConicType( QAction *action );
-    /*! update the window buttons according to change in conic type */
-    void setConicType( ConicType t );
-
-private:
-    /*! myBar - hold the tab widgets */
-    QTabWidget *myBar;
-    /*! old state of current tab */
-    int old_state;
-    /*! the index number of the next tab in the window */
-    int tab_number;
-    /*! number of tabs in the window */
-    int number_of_tabs;
-    /*! testlayer attached to all widget tabs and show them when needed */
-    Qt_layer *testlayer;
-    /*! segment traits action */
-    QAction *setSegmentTraits;
-    /*! polyline traits action */
-    QAction *setPolylineTraits;
-    /*! snap mode action */
-    QAction *setSnapMode;
-    /*! grid snap mode action */
-    QAction *setGridSnapMode;
-    /*! closest point snap mode action */
-    QAction *setPointSnapMode;
-    /*! insert mode action */
-    QAction *insertMode;
-    /*! delete mode action */
-    QAction *deleteMode;
-    /*! point location mode action */
-    QAction *pointLocationMode;
-    /*! ray shooting up mode action */
-    QAction *rayShootingUpMode;
-    /*! ray shooting down mode action */
-    QAction *rayShootingDownMode;
-    /*! drag mode action */
-    QAction *dragMode;
-    /*! merge mode action */
-    QAction *mergeMode;
-    /*! split mode action */
-    QAction *splitMode;
-    /*! fill face mode action */
-    QAction *fillfaceMode;
-    /*! zoomin button */
-    QAction *zoominBt;
-    /*! zoomout button */
-    QAction *zoomoutBt;
-    ///*! the name of the file to be saved */
-    QString m_filename;
-    /*! window hight */
-    int m_height;
-    /*! window width */
-    int m_width;
-    /*! hand tool layer for dragging the planar map */
-    CGAL::Qt_widget_handtool *handtoollayer;
-    /*! status bar label */
-    QLabel *insert_label;
-    /*! status bar label */
-    QLabel *delete_label;
-    /*! status bar label */
-    QLabel *drag_label;
-    /*! status bar label */
-    QLabel *ray_shooting_label;
-    /*! status bar label */
-    QLabel *point_location_label;
-    /*! status bar current label */
-    QLabel *current_label;
-    /*! scailing factor */
-    double m_scailing_factor;
-    /*! different colors mode */
-    bool colors_flag;
-    /*! color dialog action (for filling faces) */
-    QAction *color_dialog_bt;
-    /*! lower envelope  dialog action */
-    QAction *lower_env_dialog_bt;
-    /*! upper envelope dialog action */
-    QAction *upper_env_dialog_bt;
-    /*! number of colors */
-    const unsigned int num_of_colors;
-    /*! array of colors */
-    QColor *colors;
-
-#ifdef CGAL_USE_CORE
-    /*! conic traits action */
-    QAction *setConicTraits;
-    /*! circle conic type action */
-    QAction *setCircle;
-    /*! segment conic type action */
-    QAction *setSegment;
-    /*! ellipse conic type action */
-    QAction *setEllipse;
-    /*! parabola conic type action */
-    QAction *setParabola;
-    /*! hyperbula conic type action */
-    QAction *setHyperbola;
-    /*! conic type tool bar */
-    QToolBar *conicTypeTool;
-#endif
-};
-
-
-
-#endif // MYWINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/cgal_types.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/cgal_types.h
deleted file mode 100644
index 0e20b07..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/cgal_types.h
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/cgal_types.h $
-// $Id: cgal_types.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_TYPES_HEADER_H
-#define CGAL_TYPES_HEADER_H
-
-#include <CGAL/basic.h>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/IO/Qt_help_window.h>
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_default_dcel.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arrangement_with_history_2.h>
-#include <CGAL/squared_distance_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Bbox_2.h>
-
-#include <CGAL/Arr_trapezoid_ric_point_location.h>
-#include <CGAL/Arr_simple_point_location.h>
-#include <CGAL/Arr_walk_along_line_point_location.h>
-#include <CGAL/Arr_landmarks_point_location.h>
-
-#if 0
-#include <CGAL/IO/Postscript_file_stream.h>
-#endif
-
-#include <qcolordialog.h>
-#include <qcolor.h>  // color of faces (stored in curve data)
-#include <iostream>
-
-#include <CGAL/Gmpz.h>
-#include <CGAL/Gmpq.h>
-
-#include <vector>
-
-#include <CGAL/Arr_observer.h>
-
-
-enum TraitsType { SEGMENT_TRAITS, POLYLINE_TRAITS , CONIC_TRAITS};
-enum SnapMode   { SNAP_NONE, SNAP_GRID, SNAP_POINT};
-enum Mode       { MODE_INSERT, MODE_DELETE, MODE_POINT_LOCATION,
-                  MODE_RAY_SHOOTING_UP, MODE_RAY_SHOOTING_DOWN, MODE_DRAG,
-                  MODE_MERGE , MODE_SPLIT, MODE_FILLFACE};
-enum ConicType  { CIRCLE , SEGMENT ,ELLIPSE , PARABOLA , HYPERBOLA};
-enum Strategy   { SIMPLE , TRAP , WALK, LANDMARKS };
-
-// default background color
-const QColor def_bg_color(0,0,0);
-
-// Coordinate related typedef - using inexact number type
-typedef float                                              Coord_type;
-typedef CGAL::Cartesian<Coord_type>                        Coord_kernel;
-typedef Coord_kernel::Point_2                              Coord_point;
-typedef Coord_kernel::Segment_2                            Coord_segment;
-typedef Coord_kernel::Circle_2                             Coord_circle;
-
-
-typedef CGAL::Polygon_2<Coord_kernel> My_polygon;
-                                      // polygon is usefull for filling faces
-
-#ifdef CGAL_USE_GMP
-
-  #include <CGAL/Gmpq.h>
-
-  typedef CGAL::Gmpq                                         NT;
-
-#else
-
-  #include <CGAL/MP_Float.h>
-  #include <CGAL/Quotient.h>
-
-  typedef CGAL::Quotient<CGAL::MP_Float>                     NT;
-
-#endif
-// instead of
-//typedef CGAL::Cartesian<NT>                                Kernel;
-// workaround for VC++
-struct Kernel : public CGAL::Cartesian<NT> {};
-
-class Face_with_color : public CGAL::Arr_face_base
-{
-  QColor    m_color;
-  bool      m_visited;
-
-public:
-
-  Face_with_color() : CGAL::Arr_face_base(), m_color(), m_visited(false){}
-
-  QColor color() const { return m_color; }
-  void set_color(const QColor& c) { m_color = c; }
-  bool visited() const{ return m_visited; }
-  void set_visited(bool b) { m_visited = b; }
-
-};
-
-template <class Traits>
-class Dcel :
-  public CGAL::Arr_dcel_base<CGAL::Arr_vertex_base<typename Traits::Point_2>,
-                             CGAL::Arr_halfedge_base<typename Traits::X_monotone_curve_2>,
-                             Face_with_color>
-{
-
-public:
-
-   /*! \struct
-   * An auxiliary structure for rebinding the DCEL with a new traits class.
-   */
-  template<typename T>
-  struct rebind
-  {
-    typedef Dcel<T> other;
-  };
-
-  // CREATION
-  Dcel() {}
-};
-
-
-// Segments:
-typedef CGAL::Arr_segment_traits_2<Kernel>              Seg_traits;
-typedef Seg_traits::Curve_2                             Arr_seg_2;
-typedef Seg_traits::X_monotone_curve_2                  Arr_xseg_2;
-typedef Seg_traits::Point_2                             Arr_seg_point_2;
-typedef Dcel<Seg_traits>                                Seg_dcel;
-typedef CGAL::Arrangement_with_history_2<Seg_traits,
-                                         Seg_dcel>      Seg_arr;
-typedef Seg_arr::Halfedge                               Seg_halfedge;
-typedef Seg_arr::Halfedge_handle                        Seg_halfedge_handle;
-typedef Seg_arr::Face_handle                            Seg_face_handle;
-typedef Seg_arr::Ccb_halfedge_circulator
-  Seg_ccb_halfedge_circulator;
-typedef Seg_arr::Hole_iterator                          Seg_holes_iterator;
-typedef Seg_arr::Face_iterator                          Seg_face_iterator;
-typedef std::list<Arr_seg_2*>                           Arr_seg_list;
-typedef Arr_seg_list::const_iterator                    Arr_seg_const_iter;
-typedef Arr_seg_list::iterator                          Arr_seg_iter;
-
-
-//point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Seg_arr>
-  Seg_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Seg_arr>
-  Seg_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Seg_arr>
-  Seg_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Seg_arr>
-  Seg_lanmarks_point_location;
-
-
-
-
-// Polyline
-
-typedef CGAL::Arr_polyline_traits_2<Seg_traits>         Pol_traits;
-
-typedef Pol_traits::Curve_2                             Arr_pol_2;
-typedef Pol_traits::X_monotone_curve_2                  Arr_xpol_2;
-
-typedef Pol_traits::Point_2                             Arr_pol_point_2;
-typedef Dcel<Pol_traits>                                Pol_dcel;
-typedef CGAL::Arrangement_with_history_2<Pol_traits,
-                                         Pol_dcel>      Pol_arr;
-typedef Pol_arr::Halfedge_handle                        Pol_halfedge_handle;
-typedef Pol_arr::Face_handle                            Pol_face_handle;
-typedef Pol_arr::Ccb_halfedge_circulator
-  Pol_ccb_halfedge_circulator;
-typedef Pol_arr::Hole_iterator                          Pol_holes_iterator;
-typedef Pol_arr::Halfedge                               Pol_halfedge;
-typedef Pol_arr::Face_iterator                          Pol_face_iterator;
-
-typedef std::list<Arr_pol_2*>                            Arr_pol_list;
-typedef Arr_pol_list::const_iterator                     Arr_pol_const_iter;
-typedef Arr_pol_list::iterator                           Arr_pol_iter;
-
-//point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Pol_arr>
-  Pol_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Pol_arr>
-  Pol_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Pol_arr>
-  Pol_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Pol_arr>
-  Pol_lanmarks_point_location;
-
-
-// Conics
-
-#ifdef CGAL_USE_CORE
-
-#include <CGAL/CORE_algebraic_number_traits.h>
-
-typedef CGAL::CORE_algebraic_number_traits            Nt_traits;
-typedef Nt_traits::Rational                           Rational;
-typedef Nt_traits::Algebraic                          Algebraic;
-typedef CGAL::Cartesian<Rational>                     Rat_kernel;
-typedef CGAL::Cartesian<Algebraic>                    Alg_kernel;
-
-// instead of
-//typedef CGAL::Arr_conic_traits_2<Rat_kernel,
-//                                 Alg_kernel,
-//                                 Nt_traits>           Conic_traits;
-// workaround for VC++
-struct Conic_traits: public CGAL::Arr_conic_traits_2<Rat_kernel,
-                                                     Alg_kernel,
-                                                     Nt_traits>   {};
-
-typedef  Conic_traits::Curve_2                    Arr_conic_2;
-typedef  Conic_traits::Rat_point_2                Rat_point_2;
-typedef  Conic_traits::Rat_segment_2              Rat_segment_2;
-typedef  Conic_traits::Rat_circle_2               Rat_circle_2;
-typedef  Conic_traits::Rat_line_2                 Rat_line_2;
-
-typedef Conic_traits::X_monotone_curve_2                Arr_xconic_2;
-typedef Conic_traits::Point_2                           Arr_conic_point_2;
-typedef Dcel<Conic_traits>                              Conic_dcel;
-typedef CGAL::Arrangement_with_history_2<Conic_traits,
-                                         Conic_dcel>    Conic_arr;
-typedef Conic_arr::Halfedge_handle                      Conic_halfedge_handle;
-typedef Conic_arr::Face_handle                          Conic_face_handle;
-typedef Conic_arr::Ccb_halfedge_circulator
-  Conic_ccb_halfedge_circulator;
-typedef Conic_arr::Hole_iterator                        Conic_holes_iterator;
-//typedef CGAL::Arr_file_scanner<Conic_arr>                Arr_scanner;
-typedef Conic_arr::Halfedge                             Conic_halfedge;
-typedef Conic_arr::Face_iterator                        Conic_face_iterator;
-
-typedef std::list<Arr_xconic_2*>                         Arr_xconic_list;
-typedef Arr_xconic_list::const_iterator                  Arr_xconic_const_iter;
-typedef Arr_xconic_list::iterator                        Arr_xconic_iter;
-
-//point location
-typedef CGAL::Arr_trapezoid_ric_point_location<Conic_arr>
-  Conic_trap_point_location;
-typedef CGAL::Arr_simple_point_location<Conic_arr>
-  Conic_simple_point_location;
-typedef CGAL::Arr_walk_along_line_point_location<Conic_arr>
-  Conic_walk_point_location;
-typedef CGAL::Arr_landmarks_point_location<Conic_arr>
- Conic_lanmarks_point_location;
-
-#endif
-
-
-
-template <class Arrangement_>
-class My_observer : public CGAL::Arr_observer<Arrangement_>
-{
-public:
-
-  typedef Arrangement_                        Arrangement;
-  typedef CGAL::Arr_observer<Arrangement>     Arr_observer;
-  typedef typename Arrangement::Face_handle   Face_handle;
-
-  My_observer (Arrangement& arr) : Arr_observer (arr)
-  {}
-
-   virtual void after_split_face (Face_handle  f ,
-                                  Face_handle  new_f ,
-                                  bool         /* is_hole */)
-  {
-    new_f ->set_color(f->color());
-  }
-
-};
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp
deleted file mode 100644
index 3edce5b..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.cpp $
-// $Id: demo_tab.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-// Author(s)     : Guy Zucker <guyzucke at post.tau.ac.il>
-
-#include "demo_tab.h"
-
-QColor Qt_widget_base_tab::s_color_order[] = {
-  Qt::red, Qt::yellow, Qt::green, Qt::blue
-};
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.h
deleted file mode 100644
index 2b19800..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/demo_tab.h
+++ /dev/null
@@ -1,3056 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h $
-// $Id: demo_tab.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel       <efif at post.tau.ac.il>
-
-#ifndef DEMO_TAB_H
-#define DEMO_TAB_H
-
-/*! demo_tab.h contain the definetion and implementation of
- *  the demo tab classes and the tabs traits classes.
- *  all the possible shared code is in Qt_widget_demo_tab where
- *  the differences is in the traits classes.
- */
-
-#include <stddef.h>
-#include <math.h>
-#include <limits>
-
-#include <qrect.h>
-#include <qcursor.h>
-#include <qmessagebox.h>
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qpen.h>
-
-#include "cgal_types.h"
-
-#include <CGAL/IO/pixmaps/hand.xpm>
-#include <CGAL/IO/pixmaps/holddown.xpm>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/iterator.h> //for CGAL::Oneset_iterator<T>
-#include <CGAL/Object.h>
-#include <CGAL/envelope_2.h>
-#include <CGAL/Envelope_diagram_1.h>
-
-#include <vector>
-
-//global variables defined at MyWindow_operations.cpp
-extern bool lower_env;
-extern bool upper_env;
-/*! class Qt_widget_base_tab - inherits from CGAL::Qt_widget
- *  contain all data members that are not part of the traits
- */
-class Qt_widget_base_tab : public CGAL::Qt_widget
-{
-private:
-  //! Default color scheme ordering initialized in demo_tab.cpp 
-  static QColor s_color_order[];
-	
-public:
-
-  /*!
-   */
-  Qt_widget_base_tab(TraitsType  t ,  QWidget *parent ,
-                     int tab_number , QColor color ) :
-    CGAL::Qt_widget( parent ),
-    change_background_flag(FALSE),    
-    current_state(0),
-    index(tab_number),
-    snap_mode(SNAP_NONE),
-    mode(MODE_INSERT),
-    m_line_width(2),
-    m_vertex_width(3),
-    first_time(true),
-    active(false),
-    traits_type(t),
-    bbox(CGAL::Bbox_2(-10, -10, 10, 10)),
-    wasrepainted(true),
-    on_first(false),
-    edge_color(color),
-    change_edge_color(FALSE),
-    vertex_color(color),
-    change_vertex_color(FALSE),
-    snap(false),
-    grid(false),
-    conic_type(SEGMENT),
-    cube_size(1),
-    ray_shooting_direction(true),
-    remove_org_curve(true),
-    read_from_file(false),
-    first_time_merge(true),
-    draw_vertex(true),
-    fill_face_color(def_bg_color)
-  {
-    static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(2) <<
-      CGAL::BackgroundColor (CGAL::BLACK);
-    set_window(-10, 10, -10, 10);
-
-    setMouseTracking(TRUE);
-  }
-
-  /*! Destructor */
-  virtual ~Qt_widget_base_tab(){}
-
-  /*! current_state - indecates when a tab state is changed */
-  bool change_background_flag;
-
-  /*! current_state - indecates when a tab state is changed */
-  int current_state;
-  
-  /*! index - each tab has a uniqe index */
-  int index;
-
-  /*! pl_point - the point for point location */
-  Coord_point pl_point;
-
-  /*! snap_mode - current snap mode (none, grid or closest point)  */
-  SnapMode snap_mode;
-
-  /*! mode - current mode (insert,delete or point location) */
-  Mode mode;
-
-  /*! m_line_width - line width */
-  int m_line_width;
-
-  /*! m_vertex_width - vertex width */
-  int m_vertex_width;
-
-  /*! first_time - true when it is the first mouse click of the object */
-  bool first_time;
-
-  /*! active - true if the first point was inserted */
-  bool active;
-
-  /*! traits_type - the actual tab traits */
-  TraitsType   traits_type;
-
-  /*! bbox - bounding box */
-  CGAL::Bbox_2 bbox;
-
-  /*! for use of drag mode */
-  int   first_x, first_y;
-  int   x2, y2;
-  bool    wasrepainted;
-  bool    on_first;
-
-  /*! edge color */
-  QColor edge_color;
-
-  /*! flag to know that edge color has changed */
-  bool change_edge_color;
-
-  /*! vertices color */
-  QColor vertex_color;
-  
-  /*! flag to know that vertices color has changed */  
-  bool change_vertex_color;
-
-  /*! snap flag */
-  bool snap;
-
-  /*! grid flag */
-  bool grid;
-
-  /*! conic insert type */
-  ConicType conic_type;
-
-  /*! grid cube size */
-  int cube_size;
-
-  /*! ray shooting direction */
-  bool ray_shooting_direction; // true for up
-
-  /*! remove all original curve or only a part */
-  bool remove_org_curve;
-
-  /*! pm read from file - need a spcial treatment */
-  bool read_from_file;
-
-  /*! true when it is the first time in merge mode */
-  bool first_time_merge;
-
-  /*! true when you want to draw all vertex, false if
-   * only the intersecting vertex
-   */
-  bool draw_vertex;
-
-  /*! the color for filling faces ( obtained by fill button) */
-  QColor fill_face_color;
-
-  /*! get the color of the unbounded face (its the same as the background
-   * color of the tab)
-   */
-  QColor unbounded_face_color() { return this->backgroundColor(); }
-
-  /*! increment current_state to inidicate that something has changed
-   */
-  void something_changed(){ current_state++ ; }
-
-  virtual void change_strategy(Strategy /* s */){}
-
-  virtual bool is_empty(){return true;}
-  
-  /*function that aids selecting a color that will be visible for drawing.
-   *par_color_order is an array of (at least 4) different colors sorted
-   *according to preferance. Default argument defined in demo_tab.cpp.
-   *bad_color is an optional color that we wish to avoid (usually the color of the
-   *face the point is in.
-   *Since 3 comparisons are done for each color order_color must have more than 3
-   *colors to guarrantee success*/
-  void setCorrectColor(QColor bad_color=Qt::black, 
-                       QColor *par_color_order = s_color_order,
-                       unsigned int order_size = 4)
-  {
-		unsigned int i=0;
-		while (i<order_size) {				
-		if ((unbounded_face_color() != par_color_order[i]) && 
-			(edge_color != par_color_order[i]) &&
-			(bad_color != par_color_order[i])) 
-			{
-				setColor(par_color_order[i]);
-				return;
-			}
-			++i;
-		}
-  		return;
-  }  
-};
-
-
-/*! template class Qt_widget_demo_tab gets a Tab_traits class as
- *  a template parameter. all the Tab_traits classes must support
- *  a set of demands.
- */
-template <class Tab_traits>
-class Qt_widget_demo_tab : public Qt_widget_base_tab
-{
-private:
-  typedef typename Tab_traits::Curves_list             Curves_list;
-  typedef typename Tab_traits::Arrangement_2           Arrangement_2;
-  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-  typedef typename Arrangement_2::Halfedge_around_vertex_const_circulator
-    Halfedge_around_vertex_const_circulator;
-  typedef typename Tab_traits::Traits                  Traits;
-  typedef typename Tab_traits::Curve_2                 Curve_2;
-  typedef typename Tab_traits::X_monotone_curve_2      X_monotone_curve_2;
-  typedef typename Tab_traits::Arr_curve_iter          Arr_curve_iter;
-  typedef typename Tab_traits::Arr_curve_const_iter    Arr_curve_const_iter;
-  typedef typename Tab_traits::Point_2                 Point_2;
-  typedef typename Tab_traits::Halfedge_handle         Halfedge_handle;
-  typedef typename Tab_traits::Face_handle             Face_handle;
-
-  typedef typename Tab_traits::Face_const_handle       Face_const_handle;
-  typedef typename Tab_traits::Halfedge_const_handle   Halfedge_const_handle;
-  typedef typename Tab_traits::Vertex_const_handle     Vertex_const_handle;
-
-  typedef typename Tab_traits::Ccb_halfedge_circulator
-    Ccb_halfedge_circulator;
-  typedef typename Tab_traits::Holes_iterator          Holes_iterator;
-  typedef typename Arrangement_2::Hole_const_iterator  Holes_const_iterator;
-  typedef typename Arrangement_2::Isolated_vertex_const_iterator
-                                               Isolated_vertex_const_iterator;
-  typedef typename Tab_traits::Halfedge_iterator       Halfedge_iterator;
-  typedef typename Tab_traits::Hafledge_list           Hafledge_list;
-  typedef typename Tab_traits::Hafledge_list_iterator
-    Hafledge_list_iterator;
-  typedef typename Tab_traits::Vertex_iterator Vertex_iterator;
-  typedef typename Tab_traits::Halfedge_around_vertex_circulator
-    Halfedge_around_vertex_circulator;
-  typedef typename Tab_traits::Edge_iterator           Edge_iterator;
-  typedef typename Tab_traits::Halfedge                Halfedge;
-  typedef typename Tab_traits::Face_iterator           Face_iterator;
-  typedef typename Tab_traits::Trap_point_location     Trap_point_location;
-  typedef typename Tab_traits::Simple_point_location   Simple_point_location;
-  typedef typename Tab_traits::Walk_point_location     Walk_point_location;
-  typedef typename Tab_traits::Lanmarks_point_location Lanmarks_point_location;
-
-  typedef My_observer<Arrangement_2>                    Observer;
-  typedef typename Arrangement_2::Originating_curve_iterator
-                                                    Originating_curve_iterator;
-  typedef typename Arrangement_2::Induced_edge_iterator Induced_edge_iterator;
-  typedef typename Arrangement_2::Curve_handle          Curve_handle;
-  typedef CGAL::Envelope_diagram_1<Traits>              Diagram_1;
-  
-  typedef typename Traits::Multiplicity                 Multiplicity; 
-
-private:
-  // function object - FillFace
-  class FillFace
-  {
-    /*! */
-    Qt_widget_demo_tab<Tab_traits> *ptr;
-
-  public:
-    /*! constructor */
-    FillFace(Qt_widget_demo_tab<Tab_traits>* tab) : ptr(tab){}
-
-    /*!
-     */
-    void
-    operator()(typename Qt_widget_demo_tab<Tab_traits>::Face_handle& face)
-    {
-      ptr->m_tab_traits.fill_face(ptr,face);
-    }
-  };
-
-
-
-public:
-  /*! m_tab_traits - the traits object */
-  Tab_traits       m_tab_traits;
-
-  /*! m_curves_arr - pointer for the tab planar map */
-  Arrangement_2*   m_curves_arr;
-
-  Observer         m_observer;
-
-  CGAL::Object     m_point_location;
-
-  /*! Original Traits */
-  Traits           m_traits;
-
-  /*! the curve to be merged */
-  Halfedge_iterator closest_curve;
-
-  /*! the second curve to be merged */
-  Halfedge_iterator second_curve;
-
-  /*! the first point in the split curve */
-  Point_2 split_point;
-
-  /*! a removable halfedge iterators (created by move event when
-   * DELETE option is on
-   */
-  Halfedge_iterator removable_halfedge;
-
-
-
-  /*! constructor
-   *\ param t - widget traits type
-   *\ param parent - widget parent window
-   *\ param tab_number - widget program index
-   */
-  Qt_widget_demo_tab(TraitsType t, QWidget * parent , int tab_number, QColor c):
-    Qt_widget_base_tab(t , parent, tab_number, c),
-    m_curves_arr (new Arrangement_2()),
-    m_observer(*m_curves_arr),
-    removable_halfedge()
-  {
-    // set the unbounded face initial color
-    m_curves_arr->unbounded_face()->set_color(def_bg_color);
-    m_point_location =
-      CGAL::make_object(new Walk_point_location(*m_curves_arr));
-  }
-
-  /*! destructor - delete the planar map and the point location pointer
-   */
-  virtual ~Qt_widget_demo_tab()
-  {
-    m_observer.detach ();
-    delete m_curves_arr;
-  }
-
-
-  /*! draw - called everytime something changed, draw the PM and mark the
-   *         point location if the mode is on.
-   */
-  void draw()
-  {
-    QCursor old = cursor();
-    setCursor(Qt::WaitCursor);
-
-    if ( (mode == MODE_FILLFACE)  && (!change_background_flag) 
-           && (!change_edge_color) && (!change_vertex_color) )
-    {
-      Point_2 temp_p (pl_point.x(), pl_point.y());
-      CGAL::Object obj = locate(temp_p);
-      
-      Face_const_handle f;
-      if (CGAL::assign (f, obj))
-      {
-        Face_handle ncf = m_curves_arr->non_const_handle(f);
-        set_face_color(ncf, fill_face_color);
-      }
-    }
-    
-    // draw all faces (fill them with their color)
-    visit_faces(FillFace(this));
-    
-    //reset change_background,edge, and vertex flags to FALSE
-    //in order to allow future fill operations. 
-	 change_background_flag=FALSE;
-	 change_edge_color=FALSE;
-	 change_vertex_color=FALSE;	
-    if (snap_mode == SNAP_GRID || grid)
-      draw_grid();
-
-    for (Edge_iterator ei = m_curves_arr->edges_begin();
-         ei != m_curves_arr->edges_end(); ++ei)
-    {
-      setColor(edge_color);
-      m_tab_traits.draw_xcurve(this , ei->curve() );
-    }
-    // Go over all vertices and for each vertex check the
-    // index numbers of the base curves that go through
-    // it and paint the point if they are different (beacuse we want to
-    // color red the intersection opints between two different planar maps
-    // which are overlayed
-    *this << CGAL::DISC;
-    static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(m_vertex_width);
-
-    Vertex_iterator   vit;
-    for (vit = m_curves_arr->vertices_begin();
-         vit != m_curves_arr->vertices_end(); vit++)
-    {
-        // draw all vertexes of the planar map if 'draw_vertex' is true
-        // draw_vertex is a flag that indicates if we draw the vertexes
-
-          setColor(vertex_color);
-          Coord_point p(CGAL::to_double((*vit).point().x()) /
-                        m_tab_traits.COORD_SCALE,
-                        CGAL::to_double((*vit).point().y()) /
-                        m_tab_traits.COORD_SCALE);
-          static_cast<CGAL::Qt_widget&>(*this) << p;
-
-    }
-    if (mode == MODE_POINT_LOCATION)
-    {
-      static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(3);
-
-
-      Point_2 temp_p (pl_point.x(), pl_point.y());
-      CGAL::Object obj = locate(temp_p);
-
-      Face_const_handle f = get_face(obj);
-		
-		/* more prudent color selection that selects the drawing color
-		according to my_prefrance. replaced setColor(Qt::yellow)*/
-		QColor my_preferance[4]= {Qt::yellow,Qt::green,Qt::red,Qt::blue};		
-		setCorrectColor(f->color(),my_preferance, 4);		
-		
-      if (!f->is_unbounded()) // its an inside face
-      {
-        Ccb_halfedge_const_circulator cc = f->outer_ccb();
-        do
-        {
-          m_tab_traits.draw_xcurve(this , cc->curve() );
-        }
-        while (++cc != f->outer_ccb());
-      }
-
-
-      //color the holes of the located face
-      Holes_const_iterator hit, eit = f->holes_end();
-      for (hit = f->holes_begin(); hit != eit; ++hit)
-      {
-        Ccb_halfedge_const_circulator cc = *hit;
-        do
-        {
-          m_tab_traits.draw_xcurve(this , cc->curve() );
-          cc++;
-        }
-        while (cc != *hit);
-      }
-
-      //color isolated vertices
-      Isolated_vertex_const_iterator ivit = f->isolated_vertices_begin();
-      for (; ivit != f->isolated_vertices_end(); ++ivit)
-      {
-        static_cast<CGAL::Qt_widget&>(*this) << ivit->point();
-      }
-
-      static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(m_line_width);
-    }
-
-    if (mode == MODE_RAY_SHOOTING_UP)
-    {
-		//relevant_face_color will keep the fill color of the face we pass through		
-		QColor relevant_face_color=unbounded_face_color();      
-      Coord_point up;
-      Point_2 temp_p (pl_point.x(), pl_point.y());
-      Coord_point pl_draw(pl_point.x() / m_tab_traits.COORD_SCALE ,
-                          pl_point.y() / m_tab_traits.COORD_SCALE);
-      CGAL::Object    obj = ray_shoot_up (temp_p);
-      if (!obj.is_empty())
-      {
-        Face_const_handle ubf;
-        if (CGAL::assign(ubf, obj))
-        {
-          CGAL_assertion(ubf->is_unbounded());
-			 //relevant_face_color = unbounded_face_color() as initialized          
-          up = Coord_point(pl_draw.x() , y_max());
-          static_cast<CGAL::Qt_widget&>(*this) << Coord_segment(pl_draw, up);
-        }
-        // we shoot something
-        else
-        {
-          Halfedge_const_handle he;
-          if (CGAL::assign(he, obj))
-          {
-            Point_2 p1c1(pl_point.x() , y_max() * m_tab_traits.COORD_SCALE);
-            Point_2 p2c1(pl_point.x() , pl_point.y());
-            const X_monotone_curve_2 c1 =
-              m_tab_traits.curve_make_x_monotone(p1c1 , p2c1);
-            const X_monotone_curve_2 c2 = he->curve();
-
-            CGAL::Object             res;
-            CGAL::Oneset_iterator<CGAL::Object> oi(res);
-
-            m_traits.intersect_2_object()(c1, c2, oi);
-            std::pair<Point_2,Multiplicity> p1;
-            if (CGAL::assign(p1, res))
-            {
-              Coord_type y1 =
-                CGAL::to_double(p1.first.y())/ m_tab_traits.COORD_SCALE;
-              up = Coord_point(pl_draw.x(), y1);
-            }
-            else
-            {
-              up = pl_draw;
-            }
-				relevant_face_color = he->face()->color();				
-				/*choose color to mark the edge that differs from the current 
-				edge_color, the background, and the relevant face color*/				
-				setCorrectColor(relevant_face_color);				 
-            m_tab_traits.draw_xcurve(this , he->curve() );
-          }
-          else
-          {
-            Vertex_const_handle v;
-            CGAL_assertion(CGAL::assign(v, obj));
-            CGAL::assign(v, obj);
-            up = Coord_point(CGAL::to_double(v->point().x()) /
-                        m_tab_traits.COORD_SCALE,
-                            CGAL::to_double(v->point().y()) /
-                        m_tab_traits.COORD_SCALE);
-            
-				//locate face that arrow will be drawn in, and retrieve its color 
-      		CGAL::Object obj1 = locate(temp_p);
-      		Face_const_handle f1 = get_face(obj1);
-      	   relevant_face_color=f1->color();
-            
-            /*choose color to mark the vertice so that it differs from the 
-            edge_color, the background, and the relevant_face_color*/				
-				setCorrectColor(relevant_face_color);				     
-            static_cast<CGAL::Qt_widget&>(*this) << up;
-          }
-        }
-
-        //select arrow color that differs from the color of the face it is in
-		  setCorrectColor(relevant_face_color);        
-        
-        static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(2);
-        static_cast<CGAL::Qt_widget&>(*this) << Coord_segment(pl_draw,up);
-
-        // draw an arrow that points to 'up' point
-        int x = this->x_pixel(CGAL::to_double(up.x()));
-        int y = this->y_pixel(CGAL::to_double(up.y()));
-
-        this->get_painter().drawLine(x-7 , y+7 , x , y);
-        this->get_painter().drawLine(x+7 , y+7 , x , y);
-        static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(m_line_width);
-      }
-    }
-    if (mode == MODE_RAY_SHOOTING_DOWN)
-    {
-		//relevant_face_color will keep the fill color of the face we pass through		
-		QColor relevant_face_color=unbounded_face_color();      
-      Coord_point up;
-      Point_2 temp_p (pl_point.x(), pl_point.y());
-      Coord_point pl_draw(pl_point.x() / m_tab_traits.COORD_SCALE ,
-                          pl_point.y() / m_tab_traits.COORD_SCALE);
-      CGAL::Object    obj = ray_shoot_down (temp_p);
-      
-      
-      if (!obj.is_empty())
-      {
-        Coord_point down;
-        Face_const_handle ubf;
-        if (CGAL::assign(ubf, obj))
-        {
-			 //relevant_face_color = unbounded_face_color() as initialized           
-          down = Coord_point(pl_draw.x() , y_min());
-          static_cast<CGAL::Qt_widget&>(*this) << Coord_segment(pl_draw, down);
-        }
-        // we shoot something
-        else
-        {
-          Halfedge_const_handle he;
-          if (CGAL::assign(he, obj))
-          {
-            Point_2 p1c1(pl_point.x() , y_min() * m_tab_traits.COORD_SCALE);
-            Point_2 p2c1(pl_point.x() , pl_point.y());
-            const X_monotone_curve_2 c1 =
-              m_tab_traits.curve_make_x_monotone(p1c1 , p2c1);
-            const X_monotone_curve_2 c2 = he->curve();
-
-            CGAL::Object             res;
-            CGAL::Oneset_iterator<CGAL::Object> oi(res);
-
-            m_traits.intersect_2_object()(c1, c2, oi);
-            std::pair<Point_2,Multiplicity> p1;
-            if (CGAL::assign(p1, res))
-            {
-              Coord_type y1 =
-                CGAL::to_double(p1.first.y()) / m_tab_traits.COORD_SCALE;
-              down = Coord_point(pl_draw.x(),y1);
-            }
-            else
-            {
-              down = pl_draw;
-            }
-				relevant_face_color = he->face()->color();				
-				/*choose color to mark the edge that differs from the edge_color
-				the background, and the relevant face color*/				
-				setCorrectColor(relevant_face_color);
-            m_tab_traits.draw_xcurve(this , he->curve() );
-          }
-          else
-          {
-            Vertex_const_handle v;
-            CGAL_assertion(CGAL::assign(v, obj));
-            CGAL::assign(v, obj);
-            down = Coord_point(CGAL::to_double(v->point().x()) /
-                          m_tab_traits.COORD_SCALE,
-                          CGAL::to_double(v->point().y()) /
-                          m_tab_traits.COORD_SCALE);
-                          
-				//locate face that arrow will be drawn in, and retrieve its color 
-      		CGAL::Object obj1 = locate(temp_p);
-      		Face_const_handle f1 = get_face(obj1);
-      	   relevant_face_color=f1->color();
-            
-            /*choose color to mark the vertice so that it differs from the 
-            edge_color, the background, and the relevant face color*/				
-				setCorrectColor(relevant_face_color);				       
-            static_cast<CGAL::Qt_widget&>(*this) << down;
-          }
-        }
-
-        //select arrow color that differs from the color of the face it is in
-		  setCorrectColor(relevant_face_color);   
-        
-        static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(2);
-        static_cast<CGAL::Qt_widget&>(*this) << Coord_segment(pl_draw,down);
-        // draw an arrow that points to 'down' point
-        int x = this->x_pixel(CGAL::to_double(down.x()));
-        int y = this->y_pixel(CGAL::to_double(down.y()));
-
-        this->get_painter().drawLine(x-7 , y-7 , x , y);
-        this->get_painter().drawLine(x+7 , y-7 , x , y);
-        static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(m_line_width);
-      }
-    }
-
-    if (lower_env || upper_env)
-    {
-      std::list<X_monotone_curve_2> xcurves;
-      for (Edge_iterator ei = m_curves_arr->edges_begin();
-           ei != m_curves_arr->edges_end();
-           ++ei)
-      {
-        xcurves.push_back(ei->curve());
-      }
-
-      Diagram_1 diag;
-      if (lower_env)
-      {
-        CGAL::lower_envelope_x_monotone_2(xcurves.begin(), xcurves.end(), diag);
-        print_diag_1(diag);
-      }
-      diag.clear();
-      if (upper_env)
-      {
-        CGAL::upper_envelope_x_monotone_2(xcurves.begin(), xcurves.end(), diag);
-        print_diag_1(diag);
-      }
-    }
-    setCursor(old);
-  }
-
-  void print_diag_1(const Diagram_1 & diag)
-  {
-    // Print the minimization diagram.
-    typename Diagram_1::Edge_const_handle     e = diag.leftmost();
-    typename Diagram_1::Vertex_const_handle   v;
-    typename Diagram_1::Curve_const_iterator  cit;
-
-    setCorrectColor();
-    while (e != diag.rightmost())
-    {
-      if (! e->is_empty())
-      {
-        // The edge is not empty: draw a representative curve.
-        // Note that the we only draw the portion of the curve
-        // that overlaps the x-range defined by the two vertices
-        // that are incident to this edge.
-        m_tab_traits.draw_xcurve_segment(this , e->curve(),
-                                         e->left()->point(),
-                                         e->right()->point());
-      }
-
-      v = e->right();
-
-      // Draw the point associated with the current vertex.
-      Coord_point p(CGAL::to_double(v->point().x()) /
-                    m_tab_traits.COORD_SCALE,
-                    CGAL::to_double(v->point().y()) /
-                    m_tab_traits.COORD_SCALE);
-      static_cast<CGAL::Qt_widget&>(*this) << p;
-      
-      e = v->right();
-    }
-  }
-
-
-
-  /*!
-   */
-  void set_face_color(Face_handle f ,QColor& c)
-  {
-    f->set_color(c);
-    if ( f->is_unbounded())
-      this->setBackgroundColor(c);;
-  }
-
-  /*!
-   */
-  template <class Function>
-  void visit_faces(Function func)
-  {
-    Face_iterator  fi = m_curves_arr->faces_begin();
-    for( ; fi != m_curves_arr->faces_end() ; ++fi )
-      fi->set_visited(false);
-    Face_handle ub = m_curves_arr->unbounded_face();    
-    visit_face_rec (ub,func) ;
-}
-
-
-  /*! antenna - return true if the halfedge and its
-   *  twin point to the same face.
-   */
-  bool antenna(Halfedge_handle h)
-  {
-    Halfedge_handle twin = h->twin();
-    return (twin->face() == h->face());
-  }
-
-  /*! draw a face and all its holes recursively
-   */
-  template<class Function>
-  void visit_face_rec( Face_handle &f, Function func )
-  {
-    if (! f->visited())
-    {
-      Holes_iterator hit; // holes iterator
-      func(f);
-      f->set_visited(true);
-      for(hit= f->holes_begin() ; hit!=f->holes_end() ; ++hit)
-      {
-        Ccb_halfedge_circulator cc = *hit;
-        do {
-          Halfedge_handle he = cc;
-          Halfedge_handle he2 = he->twin();
-          Face_handle inner_face = he2->face();
-          if (antenna(he))
-            continue;
-
-          // move on to next hole
-          visit_ccb_faces(inner_face , func);
-        }while (++cc != *hit);
-      }// for
-    }
-  }// visit_face_rec
-
-  template <class Function>
-  void visit_ccb_faces(Face_handle & fh, Function func)
-  {
-    visit_face_rec(fh,func);
-    Ccb_halfedge_circulator cc=fh->outer_ccb();
-    do {
-      Halfedge he = *cc;
-      if (! he.twin()->face()->visited())
-      {
-        Face_handle nei = (Face_handle) he.twin()->face();
-        visit_ccb_faces( nei ,func );
-      }
-      //created from the outer boundary of the face
-    } while (++cc != fh->outer_ccb());
-  }
-
-
-
-  /*! draw_grid - draw the grid
-   */
-  void draw_grid()
-  {
-    setColor(Qt::white);
-    static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(1);
-    // get the edge coordinate
-    int min_x = static_cast<int> (x_min());
-    int max_x = static_cast<int> (x_max());
-    int min_y = static_cast<int> (y_min());
-    int max_y = static_cast<int> (y_max());
-
-    // calculate cube size (minimum of 1)
-    //int cube_size_x = (CGAL::max)(1, abs(max_x - min_x)/20);
-    //int cube_size_y = (CGAL::max)(1, abs(max_y - min_y)/20);
-    if (cube_size < std::abs(max_x - min_x)/40 ||
-        cube_size < std::abs(max_y - min_y)/40)
-      cube_size = (CGAL::max)((CGAL::max)(1, std::abs(max_x - min_x)/20),
-                              (CGAL::max)(1, std::abs(max_y - min_y)/20));
-
-    int cube_size_x = cube_size;
-    int cube_size_y = cube_size;
-    // draw the grid lines
-    for (int i = min_x; i <= max_x; i += cube_size_x)
-      static_cast<CGAL::Qt_widget&>(*this) <<
-        Coord_segment(Coord_point(i, max_y + cube_size_y),
-                      Coord_point( i , min_y - cube_size_y));
-    for (int i = min_y; i <= max_y; i += cube_size_y)
-      static_cast<CGAL::Qt_widget&>(*this) <<
-        Coord_segment(Coord_point( max_x + cube_size_x , i ),
-                      Coord_point( min_x - cube_size_x , i ));
-  }
-
-  /*! mousePressEvent - mouse click on the tab
-   *\ param e - mouse click event
-   */
-  void mousePressEvent(QMouseEvent *e)
-  {
-    QCursor old = cursor();
-    setCursor(Qt::WaitCursor);
-
-    if (mode == MODE_POINT_LOCATION || mode == MODE_RAY_SHOOTING_UP ||
-        mode == MODE_RAY_SHOOTING_DOWN || mode == MODE_FILLFACE)
-    {
-      mousePressEvent_point_location( e );
-      setCursor(old);
-      return;
-    }
-
-    if (mode == MODE_DELETE)
-    {
-      if (removable_halfedge == Halfedge_handle())
-      {
-        setCursor(old);
-        return;
-      }
-      if (remove_org_curve)
-      {
-        Originating_curve_iterator  ocit, temp,
-          ocit_end = m_curves_arr->originating_curves_end (removable_halfedge);
-        Curve_handle                ch;
-        ocit  = m_curves_arr->originating_curves_begin (removable_halfedge);
-        while (ocit != ocit_end)
-        {
-          temp = ocit;
-          ++temp;
-          ch = ocit;
-          CGAL::remove_curve(*m_curves_arr, ocit);
-          ocit = temp;
-        }
-      }
-      else
-        m_curves_arr->remove_edge(removable_halfedge);
-
-      removable_halfedge = Halfedge_handle();
-      redraw();
-
-      setCursor(old);
-      return;
-    }
-
-    if (mode == MODE_INSERT)
-    {
-      Coord_type x, y;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-      Coord_point p = point(x,y);
-
-      lock();
-      QColor old_color = color();
-      RasterOp old_rasterop=rasterOp();
-      get_painter().setRasterOp(XorROP);
-
-      insert( e , p);
-
-      setRasterOp(old_rasterop);
-      setColor(old_color);
-      unlock();
-
-      setCursor(old);
-      return;
-    }
-    if (mode == MODE_DRAG)
-    {
-      mousePressEvent_drag(e);
-      setCursor(old);
-      return;
-    }
-    if (mode == MODE_MERGE)
-    {
-      mousePressEvent_merge(e);
-      setCursor(old);
-      removable_halfedge = Halfedge_handle();
-      return;
-    }
-    if (mode == MODE_SPLIT)
-    {
-      Coord_type x, y;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-      Coord_point p = point(x,y);
-
-      lock();
-		//retain old color and rasterOp t preserve way things
-		// are written to the paint device      
-      QColor old_color = color();
-      RasterOp old_rasterop=rasterOp();
-      get_painter().setRasterOp(XorROP);
-
-      split( e , p);
-
-      setRasterOp(old_rasterop);
-      setColor(old_color);
-      unlock();
-      first_time = true;
-      redraw();
-      setCursor(old);
-      return;
-    }
-  }
-
-  /*! insert - insert a curve to the planar map
-   *\ param e - mouse click event
-   *\ param p - the pressed point
-   */
-  void insert( QMouseEvent *e , Coord_point p)
-  {
-    if (e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      if (!active)
-      {
-        active = true;
-        m_tab_traits.first_point( p , mode );
-      }
-      else
-      {
-        //show the last rubber as edge of the polygon
-        m_tab_traits.middle_point( p , this );
-      }
-    }
-    // finish polyline draw with right button click
-    else if (active && e->button() == Qt::RightButton && is_pure(e->state()))
-    {
-      m_tab_traits.last_point( p , this );
-    }
-  }
-
-  /*! split - split a xcurve into 2 xcurves. If several xcurves intersect
-  	* with the inserted curve they are all split at the intersection point.
-   *\ param e - mouse click event
-   *\ param p - the pressed point
-   */
-  void split( QMouseEvent *e , Coord_point p)
-  {
-    if (e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      if (!active)
-      {
-        active = true;
-        m_tab_traits.first_point( p , mode);
-        split_point = Point_2( p.x() * m_tab_traits.COORD_SCALE ,
-                               p.y() * m_tab_traits.COORD_SCALE);
-      }
-      else
-      {
-        active = false;
-        Point_2 split_point2 =
-          Point_2(p.x() * m_tab_traits.COORD_SCALE,
-                  p.y() * m_tab_traits.COORD_SCALE);
-        const X_monotone_curve_2 split_curve =
-          m_tab_traits.curve_make_x_monotone(split_point , split_point2);
-        std::pair<Point_2,Multiplicity> p1;
-        Point_2 p_right;
-        if (split_point.x() < split_point2.x())
-          p_right = split_point;
-        else
-          p_right = split_point2;
-        Halfedge_iterator hei;
-        for (hei = m_curves_arr->halfedges_begin();
-             hei != m_curves_arr->halfedges_end(); ++hei)
-        {
-          const X_monotone_curve_2 & xcurve = hei->curve();
-          //m_tab_traits.draw_xcurve(this, xcurve); removed, not necessary 
-          CGAL::Object             res;
-          CGAL::Oneset_iterator<CGAL::Object> oi(res);
-
-          m_traits.intersect_2_object()(split_curve, xcurve, oi);
-
-          if (CGAL::assign(p1, res)) {
-          	if (hei == m_curves_arr->halfedges_end())
-      			return; 
-          	// we dont want to split an already existed vertex...
-       		if (m_traits.equal_2_object()(hei->source()->point(), p1.first) ||
-          		m_traits.equal_2_object()(hei->target()->point(), p1.first))
-           		continue;
-          	//m_tab_traits.draw_xcurve(this, hei->curve());
-				//split the desired half edge at the intersection stored by p1        		
-        		m_curves_arr->split_edge(hei , p1.first);
-          }
-        } //for loop
-      }// else
-    }
-  }
-
-  /* mousePressEvent_point_location - creats the point location point
-   param e - mouse click event*/
-  void mousePressEvent_point_location(QMouseEvent *e)
-  {
-    if (e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      Coord_type x, y;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-
-      new_object(make_object(Coord_point(x * m_tab_traits.COORD_SCALE,
-                                         y * m_tab_traits.COORD_SCALE)));
-    }
-  }
-
-  /*! is_pure - insure no special button is pressed
-   *\ param s - keyboard modifier flags that existed
-   *  immediately before the event occurred.
-   *\ return true if one of them existed, false otherway.
-   */
-  bool is_pure(Qt::ButtonState s)
-  {
-    if ((s & Qt::ControlButton) || (s & Qt::ShiftButton) || (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  /*! dist
-   *\ param x1,y1,x2,y2 - points coordinates
-   *\ return the distance between 2 points
-   */
-  Coord_type dist(Coord_type x1, Coord_type y1, Coord_type x2, Coord_type y2)
-  {
-    return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
-  }
-
-  /*! getMid
-   *\ param coord - coord vulue apon the grid
-   *\ return the closest grid point
-   */
-  Coord_type getMid(Coord_type coord, int my_min, int my_max)
-  {
-    //int cube_size = (CGAL::max)(1, abs(my_max - my_min)/20);
-    Coord_type d = static_cast<Coord_type>(cube_size)/2;
-    for (int i = my_min - cube_size; i <= my_max; i += cube_size)
-    {
-      Coord_type id = static_cast<Coord_type>(i);
-      if (coord >= id - d && coord <= id + d)
-      {
-        Coord_type ans  = static_cast<Coord_type>(i);
-        return ans;
-      }
-    }
-    return 0;
-  }
-
-  /*! find_removeable_halfedges - find removable curve in the tab
-   *\ param e - mouse click event
-   */
-  void find_removable_halfedges(QMouseEvent *e)
-  {
-    //  if the arrangement is empty do nothing
-    if ( m_curves_arr->number_of_edges() == 0)
-      return;
-
-    // get the point of the mouse
-    if (removable_halfedge != Halfedge_handle())
-    {
-      setColor(edge_color);
-      if (remove_org_curve)
-      {
-
-        Originating_curve_iterator  ocit, temp;
-        ocit  = m_curves_arr->originating_curves_begin (removable_halfedge);
-        while (ocit !=
-               m_curves_arr->originating_curves_end (removable_halfedge))
-        {
-          temp = ocit;
-          ++temp;
-          Curve_handle          ch = ocit;
-          Induced_edge_iterator itr;
-          for(itr = m_curves_arr->induced_edges_begin(ch);
-              itr != m_curves_arr->induced_edges_end(ch);
-              ++itr)
-          {
-            m_tab_traits.draw_xcurve(this,(*itr)->curve());
-          }
-          ocit = temp;
-        }
-      }
-      else
-        m_tab_traits.draw_xcurve(this, removable_halfedge->curve());
-    }
-
-
-    Coord_point p(x_real(e->x()) * m_tab_traits.COORD_SCALE ,
-                  y_real(e->y()) * m_tab_traits.COORD_SCALE);
-
-    bool is_first = true;
-    Coord_type min_dist = 0;
-    Halfedge_iterator hei;
-    Halfedge_iterator closest_hei;
-
-    for (hei = m_curves_arr->halfedges_begin();
-         hei != m_curves_arr->halfedges_end();
-         ++hei)
-    {
-      X_monotone_curve_2 & xcurve = hei->curve();
-      Coord_type dist = m_tab_traits.xcurve_point_distance(p, xcurve , this);
-      if (is_first || dist < min_dist)
-      {
-        min_dist = dist;
-        closest_hei = hei;
-        is_first = false;
-      }
-    }
-    // now 'closest_hei' holds the cloeset halfedge to the point of the mouse
-
-    removable_halfedge = closest_hei;
-    if (remove_org_curve)
-    {
-      setColor(Qt::red);  // highlight the removable edge with red color
-
-       Originating_curve_iterator  ocit, temp;
-       ocit  = m_curves_arr->originating_curves_begin (removable_halfedge);
-       while(ocit != m_curves_arr->originating_curves_end (removable_halfedge))
-       {
-         temp = ocit;
-         ++temp;
-
-         Curve_handle          ch = ocit;
-         Induced_edge_iterator itr;
-         for(itr = m_curves_arr->induced_edges_begin(ch);
-             itr != m_curves_arr->induced_edges_end(ch);
-             ++itr)
-         {
-           m_tab_traits.draw_xcurve(this,(*itr)->curve());
-         }
-        ocit = temp;
-      }
-    }
-    else
-    {
-      setColor(Qt::red);  // highlight the removable edge with red color
-      m_tab_traits.draw_xcurve(this,closest_hei->curve());
-    }
-  }
-
-  /*! mouseMoveEvent - enable seeing the line to be drawn
-   *\ param e - mouse click event
-   */
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    static_cast<CGAL::Qt_widget&>(*this) << CGAL::LineWidth(m_line_width);
-    if (mode == MODE_DELETE)
-      // find removable edges , store them in the list
-      find_removable_halfedges(e);
-    //'removable_halfedges' and highlight them
-
-    if (mode == MODE_DRAG)
-    {
-      mouseMoveEvent_drag(e);
-      return;
-    }
-    if (mode == MODE_MERGE && !first_time_merge)
-    {//after closest_edge was selected, highlight second curve according to 
-     //the mouse movement
-      if (second_curve != m_curves_arr->halfedges_end())
-      {//case a second curve exists recolor it to edge_color before searching
-      //for a new second_curve using the new mouse position  
-        setColor(edge_color);
-        m_tab_traits.draw_xcurve(this,second_curve->curve());
-      }
-      Coord_type x, y;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-      Coord_point p(x * m_tab_traits.COORD_SCALE,
-                    y * m_tab_traits.COORD_SCALE);
-      second_curve = m_curves_arr->halfedges_end();
-      //search for a new second_curve 
-      find_close_curve(closest_curve, second_curve, p, true);
-		//color the halfedges that are about to be merged      
-      setColor(Qt::red);
-      m_tab_traits.draw_xcurve(this,closest_curve->curve());
-      if (second_curve != m_curves_arr->halfedges_end())
-      {
-        setColor(Qt::green);
-        m_tab_traits.draw_xcurve(this,second_curve->curve());
-      }
-      else
-      { //did not find mergable half edges 
-        first_time_merge = true;
-        redraw();
-      }
-      return;
-    }// merge
-
-    if (active) //case for split action 
-    {
-      Coord_type x, y;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-      Coord_point p = point(x,y);
-      RasterOp old_raster = rasterOp();//save the initial raster mode
-      setRasterOp(XorROP);
-      lock();
-
-      setColor(Qt::green);
-
-      if (!first_time)
-        m_tab_traits.draw_last_segment(this);
-
-      m_tab_traits.draw_current_segment( p , this);
-
-      unlock();
-      setRasterOp(old_raster);
-      first_time = false;
-    }
-  }
-
-  /*! leaveEvent - hide the line if you leave the widget's area on the screen
-   *\ param e - mouse click event
-   */
-  void leaveEvent(QEvent * /* e */)
-  {
-    if (active)
-    {
-      RasterOp old_raster = rasterOp();//save the initial raster mode
-      QColor old_color = color();
-      lock();
-      setRasterOp(XorROP);
-      setColor(Qt::green);
-      m_tab_traits.draw_last_segment(this);
-      setRasterOp(old_raster);
-      setColor(old_color);
-      unlock();
-      first_time = true;
-    }
-  }
-
-  /*! point
-   *\ params x,y - the mouse clicked point coordinates
-   *\    return a point according to the current snap mode and
-   *  recent points.
-   */
-  Coord_point point(Coord_type x, Coord_type y)
-  {
-    int xmin = static_cast<int> (x_min());
-    int xmax = static_cast<int> (x_max());
-    int ymin = static_cast<int> (y_min());
-    int ymax = static_cast<int> (y_max());
-    Coord_type d = (CGAL::max)(0.5 , (x_max() - x_min())/40);
-    switch ( snap_mode ) {
-     case SNAP_POINT:
-      {
-       Coord_type min_dist = 0;
-       Coord_point closest;
-
-       if ( m_curves_arr->number_of_vertices() == 0 )
-         return Coord_point(x , y);
-
-       min_dist = m_tab_traits.closest_point(x,y,closest,this);
-
-       if (min_dist <= d)
-         return closest;
-       else
-         return Coord_point(x , y);
-
-       break;
-      }
-     case SNAP_GRID:
-      return Coord_point(getMid(x, xmin, xmax),
-                         getMid(y, ymin, ymax) );
-
-     case SNAP_NONE: break;
-    }
-    return Coord_point(x,y);
-  }
-
-  /*! mousePressEvent_drag - change the Cursor on the drag mode
-   *  mouse pressed event
-   *\ param e - mouse click event
-   */
-  void mousePressEvent_drag(QMouseEvent *e)
-  {
-    if (e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      setCursor(QCursor( QPixmap( (const char**)holddown_xpm)));
-      if (!on_first) {
-        first_x = e->x();
-        first_y = e->y();
-        on_first = TRUE;
-      }
-    }
-  }
-
-  /*! mouseReleaseEvent - change the Cursor on the drag mode
-   *  mouse pressed event and move the widget center according
-   *  to the drag distance.
-   *\ param e - mouse release event
-   */
-  void mouseReleaseEvent(QMouseEvent *e)
-  {
-    if (e->button() == Qt::LeftButton
-       && mode == MODE_DRAG
-       && is_pure(e->state()))
-    {
-      setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-      double x, y, xfirst2, yfirst2;
-      x_real(e->x(), x);
-      y_real(e->y(), y);
-      x_real(first_x, xfirst2);
-      y_real(first_y, yfirst2);
-
-      // double    xmin, xmax, ymin, ymax;
-      // if (x < xfirst2) { xmin = x; xmax = xfirst2; }
-      // else { xmin = xfirst2; xmax = x; }
-      // if (y < yfirst2) { ymin = y; ymax = yfirst2; }
-      // else { ymin = yfirst2; ymax = y; }
-      double distx = xfirst2 - x;
-      double disty = yfirst2 - y;
-      move_center(distx, disty);
-      on_first = FALSE;
-    }
-  }
-
-  /*! mouseMoveEvent_drag - calculate new widget position
-   *\ param e - mouse release event
-   */
-  void mouseMoveEvent_drag(QMouseEvent *e)
-  {
-    if (on_first)
-    {
-      int x = e->x();
-      int y = e->y();
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      wasrepainted = FALSE;
-    }
-  }
-
-  /*! mousePressEvent_merge -  merge mode
-   *  mouse pressed event
-   *\ param e - mouse click event
-   */
-  void mousePressEvent_merge(QMouseEvent *e)
-  {
-    if (e->button() == Qt::LeftButton && is_pure(e->state()))
-    {//merge only in case of a left click 
-      if ( m_curves_arr->is_empty() )
-        return;
-		
-      setColor(Qt::red);
-      Coord_point p(x_real(e->x()) * m_tab_traits.COORD_SCALE ,
-                    y_real(e->y()) * m_tab_traits.COORD_SCALE);
-      bool       first = true;
-      Coord_type min_dist = 0;
-
-      if (first_time_merge)
-      {//find the closest mergable half edge to point p 
-        first_time_merge = false;
-        Halfedge_iterator hei;
-        closest_curve = m_curves_arr->halfedges_end();
-
-        for (hei = m_curves_arr->halfedges_begin();
-             hei != m_curves_arr->halfedges_end(); ++hei)
-        {//find  closest curve to mouse pointer 
-          Vertex_iterator   vis = hei->source();
-          Vertex_iterator   vit = hei->target();
-			 //case the halfedge can't be merged - next iteration         
-          if (vis->degree() != 2 && vit->degree() != 2)
-            continue;
-          X_monotone_curve_2 & xcurve = hei->curve();
-          Coord_type dist =
-            m_tab_traits.xcurve_point_distance(p, xcurve, this);
-
-          if (first || dist < min_dist)
-          {
-            min_dist = dist;
-            closest_curve = hei;
-            first = false;
-          }
-        }
-        if (first)       // we didn't find any "good" curve
-        {
-          first_time_merge = true;
-          return;
-        }
-        //draw the first half edge to merge with the setColor() chosen above         
-        m_tab_traits.draw_xcurve(this , closest_curve->curve() );
-        second_curve = m_curves_arr->halfedges_end();
-      }   
-      else //not first_time_merge
-      {
-        first_time_merge = true;
-        //look for the second halfedge closest to p that is mergable with
-        //closest_curve and merge them 
-        find_close_curve(closest_curve, second_curve, p, false);
-        redraw();
-      }
-    } else { //not left click event (right click) undo all selections
-    		first_time_merge=TRUE;
-	 		//repaint all curves to edge_color. 
-	 		redraw();    
-    	} 
-  }
-
-  CGAL::Object locate(const Point_2& pt)
-  {
-    Walk_point_location* walk_pl;
-    if (CGAL::assign(walk_pl, m_point_location))
-      return walk_pl->locate(pt);
-
-    Simple_point_location* simple_pl;
-    if (CGAL::assign(simple_pl, m_point_location))
-      return simple_pl->locate(pt);
-
-    Trap_point_location* trap_pl;
-    if (CGAL::assign(trap_pl, m_point_location))
-      return trap_pl->locate(pt);
-
-    Lanmarks_point_location* lm_pl;
-    if (CGAL::assign(lm_pl, m_point_location))
-      return lm_pl->locate(pt);
-
-    // doesnt suppose to reach there
-    CGAL_error();
-    return CGAL::Object();
-  }
-
-  CGAL::Object ray_shoot_up(const Point_2& pt)
-  {
-    Walk_point_location* walk_pl;
-    if (CGAL::assign(walk_pl, m_point_location))
-      return walk_pl->ray_shoot_up(pt);
-
-    Simple_point_location* simple_pl;
-    if (CGAL::assign(simple_pl, m_point_location))
-      return simple_pl->ray_shoot_up(pt);
-
-    Trap_point_location* trap_pl;
-    if (CGAL::assign(trap_pl, m_point_location))
-      return trap_pl->ray_shoot_up(pt);
-
-    Lanmarks_point_location* lm_pl;
-    if (CGAL::assign(lm_pl, m_point_location))
-    {
-      // QMessageBox::information( this, "Ray shoot down", "Land Marks doesn't
-      // support ray shooting");
-      return CGAL::Object();
-    }
-
-    // doesnt suppose to reach there
-    CGAL_error();
-    return CGAL::Object();
-  }
-
-  CGAL::Object ray_shoot_down(const Point_2& pt)
-  {
-    Walk_point_location* walk_pl;
-    if (CGAL::assign(walk_pl, m_point_location))
-      return walk_pl->ray_shoot_down(pt);
-
-    Simple_point_location* simple_pl;
-    if (CGAL::assign(simple_pl, m_point_location))
-      return simple_pl->ray_shoot_down(pt);
-
-    Trap_point_location* trap_pl;
-    if (CGAL::assign(trap_pl, m_point_location))
-      return trap_pl->ray_shoot_down(pt);
-
-    Lanmarks_point_location* lm_pl;
-    if (CGAL::assign(lm_pl, m_point_location))
-    {
-      //QMessageBox::information( this, "Ray shoot up", "Land Marks doesn't
-      // support ray shooting");
-      return CGAL::Object();
-    }
-
-    // doesnt suppose to reach there
-    CGAL_error();
-    return CGAL::Object();
-  }
-
-  virtual void change_strategy(Strategy s)
-  {
-    Walk_point_location* walk_pl = NULL;
-    if (CGAL::assign(walk_pl, m_point_location)) delete walk_pl;
-    else {
-      Simple_point_location* simple_pl = NULL;
-      if (CGAL::assign(simple_pl, m_point_location)) delete simple_pl;
-      else {
-        Trap_point_location* trap_pl = NULL;
-        if (CGAL::assign(trap_pl, m_point_location)) delete trap_pl;
-        else {
-          Lanmarks_point_location* lm_pl = NULL;
-          if (CGAL::assign(lm_pl, m_point_location)) delete lm_pl;
-        }
-      }
-    }
-
-    if (s == WALK)
-    {
-      m_point_location =
-        CGAL::make_object(new Walk_point_location(*m_curves_arr));
-      return;
-    }
-    if (s == SIMPLE)
-    {
-      m_point_location =
-        CGAL::make_object(new Simple_point_location(*m_curves_arr));
-      return;
-    }
-    if (s == TRAP)
-    {
-      QCursor old = cursor();
-      setCursor(Qt::WaitCursor);
-      m_point_location =
-        CGAL::make_object(new Trap_point_location(*m_curves_arr));
-      setCursor(old);
-      return;
-    }
-    if (s == LANDMARKS)
-    {
-     QCursor old = cursor();
-      setCursor(Qt::WaitCursor);
-      m_point_location =
-        CGAL::make_object(new Lanmarks_point_location(*m_curves_arr));
-        setCursor(old);
-      return;
-    }
-  }
-
-  virtual bool is_empty()
-  {
-    return m_curves_arr->is_empty();
-  }
-
-  /*Function that is invoked by move or click mouse event functions related to merge. 
-   It checks if the parameter closest_curve (first halfedge to merge) is mergable
-   with another halfedge (to be stored in second_curve).Second_curve is updated to
-   store the mergable halfedge closest to mouse point p.
-   If this function is not triggered by a move event the closest_edge and second_edge  
-	are merged.	  
-   */
-  void find_close_curve(Halfedge_iterator &closest_curve,
-                        Halfedge_iterator &second_curve,
-                        Coord_point &p,
-                        bool move_event)
-  {
-	 //boolean var - if "good" curves were found changed to false   
-    bool       first = true;
-    Coord_type min_dist = 0;
-
-    for (Halfedge_iterator hei = m_curves_arr->halfedges_begin();
-         hei != m_curves_arr->halfedges_end();
-         ++hei)
-    {
-      if (m_curves_arr->are_mergeable(closest_curve, hei))
-      {
-        X_monotone_curve_2 & xcurve = hei->curve();
-        Coord_type dist = m_tab_traits.xcurve_point_distance(p, xcurve , this);
-        if (first || dist < min_dist)
-        {
-          min_dist = dist;
-          second_curve = hei;
-          first = false;
-        }
-      }
-    }
-    if (first)     // didn't find any "good" curve
-      return;
-
-    if (!move_event)
-    {
-      m_curves_arr->merge_edge( closest_curve, second_curve);
-    }
-  }
-
-
-  private:
-
-    Face_const_handle get_face(const CGAL::Object& obj)
-    {
-      Face_const_handle f;
-      if (CGAL::assign(f, obj))
-        return f;
-
-      Halfedge_const_handle he;
-      if (CGAL::assign(he, obj))
-        return (he->face());
-
-      Vertex_const_handle v;
-      CGAL_assertion(CGAL::assign(v, obj));
-      CGAL::assign(v, obj);
-      if (v->is_isolated())
-        return v->face();
-      Halfedge_around_vertex_const_circulator eit = v->incident_halfedges();
-      return  (eit->face());
-    }
-
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-/*! class Segment_tab_traits defines the segment traits
- */
-class Segment_tab_traits
-{
-public:
-  typedef Kernel::FT                                FT;
-  typedef Arr_seg_list                              Curves_list;
-  typedef Seg_arr                                   Arrangement_2;
-  typedef Arrangement_2::Face_const_handle          Face_const_handle;
-  typedef Arrangement_2::Halfedge_const_handle      Halfedge_const_handle;
-  typedef Arrangement_2::Vertex_const_handle        Vertex_const_handle;
-
-  typedef Arrangement_2::Face_handle                Face_handle;
-  typedef Arrangement_2::Halfedge_handle            Halfedge_handle;
-  typedef Arrangement_2::Vertex_handle              Vertex_handle;
-  typedef Seg_traits                                Traits;
-  typedef Traits::Point_2                           Point_2;
-  typedef Traits::Curve_2                           Curve_2;
-  typedef Traits::X_monotone_curve_2                X_monotone_curve_2;
-
-  typedef Arr_seg_iter                              Arr_curve_iter;
-  typedef Arr_seg_const_iter                        Arr_curve_const_iter;
-
-  typedef Seg_ccb_halfedge_circulator               Ccb_halfedge_circulator;
-  typedef Seg_holes_iterator                        Holes_iterator;
-  typedef Arrangement_2::Halfedge_iterator          Halfedge_iterator;
-  typedef std::list<Halfedge_iterator>              Hafledge_list;
-  typedef Hafledge_list::iterator                   Hafledge_list_iterator;
-  typedef Arrangement_2::Vertex_iterator            Vertex_iterator;
-  typedef Arrangement_2::Halfedge_around_vertex_circulator
-                                          Halfedge_around_vertex_circulator;
-  typedef Arrangement_2::Edge_iterator              Edge_iterator;
-  typedef Seg_halfedge                              Halfedge;
-  typedef Seg_face_iterator                         Face_iterator;
-
-  //point location
-  typedef Seg_trap_point_location                   Trap_point_location;
-  typedef Seg_simple_point_location                 Simple_point_location;
-  typedef Seg_walk_point_location                   Walk_point_location;
-  typedef Seg_lanmarks_point_location               Lanmarks_point_location;
-
-
-public:
-
-  /*! coordinate scale - used in conics*/
-  int COORD_SCALE;
-
-  /*! constructor */
-  Segment_tab_traits():
-  COORD_SCALE(1)
-  {}
-
-  /*! distructor */
-  ~Segment_tab_traits()
-  {}
-
-  /*! curve_has_same_direction - return true if the halfegde and
-   *  its curve has the same direction
-   */
-  bool curve_has_same_direction( Ccb_halfedge_circulator &cc)
-  {
-    return (cc->curve().source() == cc->source()->point());
-  }
-
-  /*! check if curve and its halfedge are at the same direction */
-  bool is_curve_and_halfedge_same_direction (const Halfedge_handle & he,
-                                             const X_monotone_curve_2 & cv)
-  {
-    return (he->source()->point() == cv.source());
-  }
-
-  /*! fill_face - fill a face with its color (which is stored at the face)
-   * it creates a polyong from the outer boundary of the face and
-   * uses CGAL opertaor << of polygons
-   */
-  void fill_face(Qt_widget_demo_tab<Segment_tab_traits> * w , Face_handle f)
-  {
-    if (!f->is_unbounded())  // f is not the unbounded face
-    {
-      std::list< Coord_point > pts; // holds the points of the polygon
-
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do {
-        Coord_type x = CGAL::to_double(cc->source()->point().x());
-        Coord_type y = CGAL::to_double(cc->source()->point().y());
-        Coord_point coord_source(x , y);
-        pts.push_back(coord_source );
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      My_polygon pgn (pts.begin() , pts.end());
-
-      w->setFilled(true);
-
-      // fill the face according to its color (stored at any of her
-      // incidents curves)
-      if (! f->color().isValid())
-        w->setFillColor(def_bg_color);
-      else
-        w->setFillColor(f->color());
-
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-      (*w) << pgn ;  // draw the polyong
-      w->setFilled(false);
-      w->get_painter().setPen(old_penstyle);
-    }
-    else
-    {
-      Coord_point points[4];
-      points[0] = (Coord_point(w->x_min(),w->y_min()));
-      points[1] = (Coord_point(w->x_min(),w->y_max()));
-      points[2] = (Coord_point(w->x_max(),w->y_max()));
-      points[3] = (Coord_point(w->x_max(),w->y_min()));
-
-      w->setFilled(true);
-      w->setFillColor(w->unbounded_face_color());
-
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-      (*w)<<My_polygon(points , points +4 );
-      w->setFilled(false);
-       w->get_painter().setPen(old_penstyle);
-    }
-  }
-
-
-  /*! draw_xcurve - use Qt_Widget operator to draw
-   *\ param w - the demo widget
-   *\ c - xcurve to be drawen
-   */
-  void draw_xcurve(Qt_widget_demo_tab<Segment_tab_traits> * w ,
-                   X_monotone_curve_2 c )
-  {
-    (*w) << c;
-  }
-
-  /*! Use Qt_Widget operator to draw a portion of an x-monotone curve.
-   * \param w The demo widget.
-   * \param xcurve The curve to be drawn.
-   * \param p_left Defines the left end.
-   * \param p_right Defines the right end.
-   */
-  void draw_xcurve_segment(Qt_widget_demo_tab<Segment_tab_traits> * w,
-                           const X_monotone_curve_2 & c,
-                           const Point_2 & p_left, const Point_2 & p_right)
-  {
-    if (m_traits.is_vertical_2_object() (c)) {
-      (*w) << c;
-      return;
-    }
-
-    // Trim the segment, if necessary.
-    const Point_2 & p_min = m_traits.construct_min_vertex_2_object()(c);
-    const Point_2 & p_max = m_traits.construct_max_vertex_2_object()(c);
-    Kernel          ker;
-    Kernel::Line_2  l = ker.construct_line_2_object() (p_min, p_max);
-
-    const Point_2 & p1 =
-      (ker.compare_x_2_object() (p_left, p_min) == CGAL::LARGER) ?
-      Point_2(p_left.x(), ker.compute_y_at_x_2_object()(l, p_left.x())) :
-      p_min;
-
-    const Point_2 & p2 =
-      (ker.compare_x_2_object() (p_right, p_max) == CGAL::SMALLER) ?
-      Point_2(p_right.x(), ker.compute_y_at_x_2_object()(l, p_right.x())) :
-      p_max;
-
-    (*w) << ker.construct_segment_2_object() (p1, p2);
-  }
-
-  /*! Draw a curve to a Qt widget
-   * \param w the demo widget
-   * \param c curve to be drawen
-   */
-  void draw_curve(Qt_widget_demo_tab<Segment_tab_traits> * w , Curve_2 c )
-  {
-    (*w) << c;
-  }
-
-  /*! first_point - a first point of inserted sgment
-   */
-  void first_point( Coord_point p , Mode  )
-  {
-    m_p1 = m_p2 = p;
-  }
-
-  /*! Obtain the last point of a segment
-   */
-  void middle_point(Coord_point p,
-                    Qt_widget_demo_tab<Segment_tab_traits> * w)
-  {
-    Coord_kernel      ker;
-
-    if (! ker.equal_2_object() (m_p1, p))
-    {
-      get_segment( Coord_segment( m_p1 , p ) , w );
-      w->active = false;
-      //w->redraw();  // not working so I use new_object insted
-      w->new_object(make_object(Coord_segment(m_p1 , p)));
-    }
-  }
-
-  /*! last_point - meaningless for segments
-   */
-  void last_point( Coord_point  ,
-                   Qt_widget_demo_tab<Segment_tab_traits> *  )
-  {
-    return;
-  }
-
-  /*! get_segment - create a new segment, insert him into curves_list
-   * and planar map
-   */
-  void get_segment( Coord_segment coord_seg ,
-                    Qt_widget_demo_tab<Segment_tab_traits> * w)
-  {
-    const Coord_point & coord_source = coord_seg.source();
-    const Coord_point & coord_target = coord_seg.target();
-    Arr_seg_point_2 source(coord_source.x(), coord_source.y());
-    Arr_seg_point_2 target(coord_target.x(), coord_target.y());
-    Arr_seg_2 seg (source, target);
-    CGAL::insert(*(w->m_curves_arr), seg);
-    CGAL::Bbox_2 curve_bbox = seg.bbox();
-    w->bbox = w->bbox + curve_bbox;
-  }
-
-
-  /*! xcurve_point_distance - return the distance between a point
-   * and a xsegment
-   */
-  Coord_type xcurve_point_distance(Coord_point p, X_monotone_curve_2 & c ,
-                                   Qt_widget_demo_tab<Segment_tab_traits> * )
-  {
-    const Arr_seg_point_2 & source = c.source();
-    const Arr_seg_point_2 & target = c.target();
-
-    Coord_type x1 = CGAL::to_double(source.x());
-    Coord_type y1 = CGAL::to_double(source.y());
-
-    Coord_type x2 = CGAL::to_double(target.x());
-    Coord_type y2 = CGAL::to_double(target.y());
-
-    Coord_point coord_source(x1 , y1);
-    Coord_point coord_target(x2 , y2);
-    Coord_segment coord_seg(coord_source, coord_target);
-    return CGAL::squared_distance( p, coord_seg);
-  }
-
-
-  /*! draw_last_segment - call from mouse move event
-   */
-  void draw_last_segment( Qt_widget_demo_tab<Segment_tab_traits> * w)
-  {
-    *w << Coord_segment( m_p1 , m_p2 );
-  }
-
-  /*! draw_current_segment - call from mouse move event
-   */
-  void draw_current_segment( Coord_point p ,
-                             Qt_widget_demo_tab<Segment_tab_traits> * w)
-  {
-    *w << Coord_segment( m_p1 , p);
-    m_p2 = p;
-  }
-
-  /*! closest_point - find the closest point in the planar map
-   * to a clicked point
-   */
-  Coord_type closest_point(Coord_type x, Coord_type y, Coord_point &closest,
-                           Qt_widget_demo_tab<Segment_tab_traits> * w)
-  {
-    bool first = true;
-    Coord_type x1,y1,dt,min_dist = 0;
-    Vertex_iterator vit;
-    for (vit = w->m_curves_arr->vertices_begin();
-         vit != w->m_curves_arr->vertices_end(); vit++)
-    {
-      const Point_2& p = (*vit).point();
-      x1 = CGAL::to_double(p.x());
-      y1 = CGAL::to_double(p.y());
-      dt = w->dist(x1 , y1 , x , y);
-      if (first || dt < min_dist)
-      {
-        min_dist = dt;
-        closest = Coord_point(x1 , y1);
-        first = false;
-      }
-    }
-    return min_dist;
-  }
-
-  /*! curve_make_x_monotone
-   */
-  const X_monotone_curve_2 curve_make_x_monotone(Point_2 p1 , Point_2 p2)
-  {
-    const Curve_2 cv(p1 , p2);
-    X_monotone_curve_2 c;
-    CGAL::Object             res;
-    CGAL::Oneset_iterator<CGAL::Object> oi(res);
-    m_traits.make_x_monotone_2_object()(cv, oi);
-    CGAL::assign(c, res);
-    return c;
-  }
-
-
-  /*! temporary points of the created segment */
-  Traits m_traits;
-  Coord_point m_p1,m_p2;
-
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-/*! class Polyline_tab_traits defines the polyline traits */
-class Polyline_tab_traits
-{
-public:
-  typedef Kernel::FT                                FT;
-  typedef Arr_pol_list                              Curves_list;
-  typedef Pol_arr                                   Arrangement_2;
-  typedef Arrangement_2::Face_const_handle          Face_const_handle;
-  typedef Arrangement_2::Halfedge_const_handle      Halfedge_const_handle;
-  typedef Arrangement_2::Vertex_const_handle        Vertex_const_handle;
-  typedef Pol_traits                                Traits;
-  typedef Arr_pol_iter                              Arr_curve_iter;
-  typedef Arr_pol_const_iter                        Arr_curve_const_iter;
-  typedef Arr_pol_point_2                           Point_2;
-  typedef Pol_halfedge_handle                       Halfedge_handle;
-  typedef Arr_pol_2                                 Curve_2;
-  typedef Arr_xpol_2                                X_monotone_curve_2;
-  typedef Pol_face_handle                           Face_handle;
-  typedef Pol_ccb_halfedge_circulator               Ccb_halfedge_circulator;
-  typedef Pol_holes_iterator                        Holes_iterator;
-  typedef Arrangement_2::Halfedge_iterator          Halfedge_iterator;
-  typedef std::list<Halfedge_iterator>              Hafledge_list;
-  typedef Hafledge_list::iterator                   Hafledge_list_iterator;
-  typedef std::vector<Point_2>::iterator            Point_vector_iterator;
-  typedef Curve_2::const_iterator                   Curve_const_iterator;
-  typedef Arrangement_2::Vertex_iterator            Vertex_iterator;
-  typedef Arrangement_2::Halfedge_around_vertex_circulator
-    Halfedge_around_vertex_circulator;
-  typedef Arrangement_2::Edge_iterator              Edge_iterator;
-  typedef Pol_halfedge                              Halfedge;
-  typedef  Pol_face_iterator                        Face_iterator;
-
-  //point location
-  typedef Pol_trap_point_location                   Trap_point_location;
-  typedef Pol_simple_point_location                 Simple_point_location;
-  typedef Pol_walk_point_location                   Walk_point_location;
-  typedef Pol_lanmarks_point_location               Lanmarks_point_location;
-
-
-  /*! coordinate scale - used in conics*/
-  int COORD_SCALE;
-
-  /*! constructor */
-  Polyline_tab_traits():
-  COORD_SCALE(1)
-  {}
-
-  /*! distructor */
-  ~Polyline_tab_traits()
-  {}
-
-
-  /*! curve_has_same_direction - return true if the curve and
-   *  the halfedge has the same direction
-   */
-  bool curve_has_same_direction( Ccb_halfedge_circulator &cc)
-  {
-    return ( *(cc->curve().begin()) == cc->source()->point());
-  }
-
-  /*!
-   */
-  bool is_curve_and_halfedge_same_direction(const Halfedge_handle & he,
-                                            const X_monotone_curve_2 & cv)
-  {
-    return (he->source()->point() == *(cv.begin()));
-  }
-
-  /*! fill_face - fill a face with its color (which is stored at the curves)
-   * it creates a polyong from the outer boundary of the face and
-   * uses CGAL opertaor << of polygons
-   */
-  void fill_face(Qt_widget_demo_tab<Polyline_tab_traits> * w , Face_handle f)
-  {
-    if (!f->is_unbounded())  // f is not the unbounded face
-    {
-      std::list< Coord_point > pts; // holds the points of the polygon
-      X_monotone_curve_2::const_iterator           pt_itr;
-      X_monotone_curve_2::const_reverse_iterator   pt_rev_itr;
-      X_monotone_curve_2 cv;
-
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do {
-        cv = cc->curve();
-        if ( curve_has_same_direction (cc) )
-        {
-          for( pt_itr = cv.begin() , ++pt_itr ; pt_itr != cv.end(); ++pt_itr)
-          {
-            Coord_type x = CGAL::to_double((*pt_itr).x());
-            Coord_type y = CGAL::to_double((*pt_itr).y());
-            Coord_point coord_source(x , y);
-            pts.push_back(coord_source );
-          }
-        }
-        else
-        {
-          for (pt_rev_itr = cv.rbegin() , ++pt_rev_itr; pt_rev_itr != cv.rend();
-               ++pt_rev_itr)
-          {
-            Coord_type x = CGAL::to_double((*pt_rev_itr).x());
-            Coord_type y = CGAL::to_double((*pt_rev_itr).y());
-            Coord_point coord_source(x , y);
-            pts.push_back(coord_source );
-          }
-        }
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      My_polygon pgn (pts.begin() , pts.end());
-
-      w->setFilled(true);
-
-      // fill the face according to its color (stored at any of her
-      // incidents curves)
-      if (! f->color().isValid())
-        w->setFillColor(def_bg_color);
-      else
-        w->setFillColor(f->color());
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-
-      (*w) << pgn ;  // draw the polyong
-      w->setFilled(false);
-      w->get_painter().setPen(old_penstyle);
-    }
-    else
-    {
-      Coord_point points[4];
-      points[0] = (Coord_point(w->x_min(),w->y_min()));
-      points[1] = (Coord_point(w->x_min(),w->y_max()));
-      points[2] = (Coord_point(w->x_max(),w->y_max()));
-      points[3] = (Coord_point(w->x_max(),w->y_min()));
-
-      w->setFilled(true);
-      w->setFillColor(w->unbounded_face_color());
-
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-      (*w)<<My_polygon(points , points +4 );
-      w->setFilled(false);
-       w->get_painter().setPen(old_penstyle);
-    }
-  }
-
-  /*! draw_xcurve - go over the polyline parts and use Qt_Widget operator
-   * to draw
-   */
-  void draw_xcurve(Qt_widget_demo_tab<Polyline_tab_traits> * w,
-                   X_monotone_curve_2 pol )
-  {
-    Curve_2::const_iterator ps = pol.begin();
-    Curve_2::const_iterator pt = ps; ++pt;
-
-    while (pt != pol.end()) {
-      const Point_2 & source = *ps;
-      const Point_2 & target = *pt;
-      Coord_segment coord_seg = convert(source , target);
-      *w << coord_seg;
-      ++ps; ++pt;
-    }
-  }
-
-  /*! Use Qt_Widget operator to draw a portion of an x-monotone polyline.
-   * \param w The demo widget.
-   * \param xcurve The curve to be drawn.
-   * \param p_left Defines the left end.
-   * \param p_right Defines the right end.
-   */
-  void draw_xcurve_segment(Qt_widget_demo_tab<Polyline_tab_traits> * w,
-                           const X_monotone_curve_2 & pol,
-                           const Point_2 & p_left, const Point_2 & p_right)
-  {
-    if (m_traits.is_vertical_2_object() (pol)) {
-      Curve_2::const_iterator pi = pol.begin();
-      const Point_2 & source = *pi++;
-      const Point_2 & target = *pi;
-      Coord_segment coord_seg = convert(source , target);
-      (*w) << coord_seg;
-      return;
-    }
-
-    Curve_2::const_iterator ps = pol.begin();
-    Curve_2::const_iterator pt = ps; ++pt;
-    Kernel                  ker;
-    Kernel::Compare_x_2     comp_x = ker.compare_x_2_object();
-    Point_2                 src, trg;
-
-    while (pt != pol.end()) {
-      // Skip this segment if it is not in the relevant x-range.
-      if (comp_x (p_left, *pt) == CGAL::LARGER)
-        continue;
-
-      if (comp_x (p_right, *ps) == CGAL::SMALLER)
-        break;
-
-      // Trim the current segment, if necessary.
-      Kernel::Line_2      l = ker.construct_line_2_object() (*ps, *pt);
-
-      src = (comp_x (p_left, *ps) == CGAL::LARGER) ?
-        Point_2 (p_left.x(), ker.compute_y_at_x_2_object() (l, p_left.x())) :
-        *ps;
-
-      trg = (comp_x (p_right, *pt) == CGAL::SMALLER) ?
-        Point_2 (p_right.x(), ker.compute_y_at_x_2_object() (l, p_right.x())) :
-        *pt;
-
-      Coord_segment coord_seg = convert (src, trg);
-      (*w) << coord_seg;
-      ++ps; ++pt;
-    }
-  }
-
-
-  /*! Draw a curve
-   */
-  void draw_curve(Qt_widget_demo_tab<Polyline_tab_traits> * w , Curve_2 pol )
-  {
-    std::list<CGAL::Object> obj_list;
-    m_traits.make_x_monotone_2_object()(pol, std::back_inserter(obj_list));
-    for(std::list<CGAL::Object>::iterator itr = obj_list.begin();
-        itr != obj_list.end();
-        ++itr)
-    {
-      X_monotone_curve_2 cv;
-
-      if (CGAL::assign(cv, *itr))
-        draw_xcurve (w, cv);
-    }
-  }
-
-  /*! first_point - a first point of inserted polyline or a splitter
-   */
-  void first_point( Coord_point p , Mode m)
-  {
-    last_of_poly = p;
-    if (m == MODE_INSERT)
-      points.push_back(Arr_pol_point_2(p.x(),p.y()));
-  }
-
-  /*! middle_point - a middle point of a polyline
-   */
-  void middle_point( Coord_point p ,
-                     Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    if (last_of_poly == p) return;
-    rubber_old = p;
-
-    points.push_back(Arr_pol_point_2(p.x(),p.y()));
-
-    *w << CGAL::WHITE;
-    *w << Coord_segment(rubber, last_of_poly);
-    *w << CGAL::GREEN;
-    *w << Coord_segment(rubber, last_of_poly);
-
-    last_of_poly = p;
-  }
-
-  /*! last_point - last point of the polyline, create new
-   * polyline and reset
-   */
-  void last_point( Coord_point p ,Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    get_polyline(w);
-    points.clear();
-    w->active = false;
-    w->first_time = true;
-    //w->redraw();  // not working so I use new_object insted
-    w->new_object(make_object(Coord_segment(p , p)));
-  }
-
-
-  /*! xcurve_point_distance - return the distance between a point
-   * and a polyline
-   */
-  Coord_type xcurve_point_distance(Coord_point p, X_monotone_curve_2 & c,
-                                   Qt_widget_demo_tab<Polyline_tab_traits> * )
-  {
-    Curve_const_iterator ps = c.begin();
-    Curve_const_iterator pt = ps; pt++;
-    bool first = true;
-    Coord_type min_dist = 0;
-
-    while (pt != c.end())
-    {
-      const Point_2 & source = *ps;
-      const Point_2 & target = *pt;
-      Coord_segment coord_seg = convert(source , target);
-      Coord_type dist = CGAL::squared_distance( p, coord_seg);
-
-      if (first || dist < min_dist)
-      {
-        first = false;
-        min_dist = dist;
-      }
-      ps++; pt++;
-    }
-    return min_dist;
-  }
-
-  /*! draw_last_segment - call from mouse move event
-   */
-  void draw_last_segment( Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    *w << Coord_segment(rubber_old, last_of_poly);
-  }
-
-  /*! draw_current_segment - call from mouse move event */
-  void draw_current_segment( Coord_point p ,
-                             Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    *w << Coord_segment(p, last_of_poly);
-    rubber = p;
-    rubber_old = p;
-  }
-
-  /*! closest_point - find the closest point in the planar map
-   * to a clicked point
-   */
-  Coord_type closest_point(Coord_type x, Coord_type y, Coord_point &closest,
-                           Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    bool first = true;
-    Coord_type x1,y1,dt,min_dist = 0;
-    Halfedge_iterator heit;
-    for (heit = w->m_curves_arr->halfedges_begin();
-         heit != w->m_curves_arr->halfedges_end(); heit++)
-    {
-      const X_monotone_curve_2& curve = heit->curve();
-      Curve_const_iterator cit;
-      for (cit = curve.begin(); cit != curve.end(); cit++)
-      {
-        const Point_2& p = *cit;
-        x1 = CGAL::to_double(p.x());
-        y1 = CGAL::to_double(p.y());
-        dt = w->dist(x1 , y1 , x , y);
-        if (first || dt < min_dist)
-        {
-          min_dist = dt;
-          closest = Coord_point(x1 , y1);
-          first = false;
-        }
-      }
-    }
-    Point_vector_iterator it;
-    for (it = points.begin(); it != points.end(); it++)
-    {
-      const Arr_pol_point_2& p = *it;
-      x1 = CGAL::to_double(p.x());
-      y1 = CGAL::to_double(p.y());
-      dt = w->dist(x1 , y1 , x , y);
-      if (first || dt < min_dist)
-      {
-        min_dist = dt;
-        closest = Coord_point(x1 , y1);
-        first = false;
-      }
-    }
-    return min_dist;
-  }
-
-
-  /*! curve_make_x_monotone
-   */
-  const X_monotone_curve_2 curve_make_x_monotone(Point_2 p1 , Point_2 p2)
-  {
-    std::vector<Arr_pol_point_2> temp_points;
-    temp_points.push_back(p1);
-    temp_points.push_back(p2);
-    Curve_2 cv(temp_points.begin(), temp_points.end());
-    CGAL::Object             res;
-    CGAL::Oneset_iterator<CGAL::Object> oi(res);
-    m_traits.make_x_monotone_2_object()(cv, oi);
-    X_monotone_curve_2 c1 ;
-    CGAL::assign(c1, res);
-    return c1;
-  }
-
-
-private:
-
-  /*! get_polyline - create a new polyline
-   */
-  void get_polyline(Qt_widget_demo_tab<Polyline_tab_traits> * w)
-  {
-    Arr_pol_2  pol (points.begin(), points.end());
-    CGAL::insert(*(w->m_curves_arr), pol);
-    CGAL::Bbox_2 curve_bbox = pol.bbox();
-    w->bbox = w->bbox + curve_bbox;
-  }
-
-  /*! convert - convert from Arr_pol_curve to Coord_segment
-   */
-  Coord_segment convert(Arr_pol_point_2 & source , Arr_pol_point_2 & target)
-  {
-    Coord_type x1 = CGAL::to_double(source.x());
-    Coord_type y1 = CGAL::to_double(source.y());
-    Coord_point coord_source(x1, y1);
-
-    Coord_type x2 = CGAL::to_double(target.x());
-    Coord_type y2 = CGAL::to_double(target.y());
-    Coord_point coord_target(x2, y2);
-
-    return Coord_segment(coord_source, coord_target);
-  }
-
-  /*! convert - convert from const Arr_pol_curve to Coord_segment
-   */
-  Coord_segment convert(const Arr_pol_point_2 & source ,
-                        const Arr_pol_point_2 & target)
-  {
-    Coord_type x1 = CGAL::to_double(source.x());
-    Coord_type y1 = CGAL::to_double(source.y());
-    Coord_point coord_source(x1, y1);
-
-    Coord_type x2 = CGAL::to_double(target.x());
-    Coord_type y2 = CGAL::to_double(target.y());
-    Coord_point coord_target(x2, y2);
-
-    return Coord_segment(coord_source, coord_target);
-  }
-
-  Traits m_traits;
-
-  /*! the new point of the rubber band */
-  Coord_point rubber;
-
-  /*! the last point of the polygon */
-  Coord_point last_of_poly;
-
-  /*! the old point of the rubber band */
-  Coord_point rubber_old;
-
-  /*! container to hold the point during polyline creation */
-  std::vector<Arr_pol_point_2> points;
-};
-
-
-//////////////////////////////////////////////////////////////////////////////
-/*!
- */
-#ifdef CGAL_USE_CORE
-class Conic_tab_traits
-{
-public:
-  typedef Alg_kernel::FT                            FT;
-  typedef Arr_xconic_list                           Curves_list;
-  typedef Conic_arr                                 Arrangement_2;
-  typedef Arrangement_2::Face_const_handle          Face_const_handle;
-  typedef Arrangement_2::Halfedge_const_handle      Halfedge_const_handle;
-  typedef Arrangement_2::Vertex_const_handle        Vertex_const_handle;
-  typedef Conic_traits                              Traits;
-  typedef Arr_xconic_iter                           Arr_curve_iter;
-  typedef Arr_xconic_const_iter                     Arr_curve_const_iter;
-  typedef Arr_conic_point_2                         Point_2;
-  typedef Conic_halfedge_handle                     Halfedge_handle;
-  typedef Arrangement_2::Curve_2                    Curve_2;
-  typedef Arr_xconic_2                              X_monotone_curve_2;
-  typedef Conic_face_handle                         Face_handle;
-  typedef Conic_ccb_halfedge_circulator             Ccb_halfedge_circulator;
-  typedef Conic_holes_iterator                      Holes_iterator;
-  typedef Arrangement_2::Halfedge_iterator          Halfedge_iterator;
-  typedef std::list<Halfedge_iterator>              Hafledge_list;
-  typedef Hafledge_list::iterator                   Hafledge_list_iterator;
-  typedef Arrangement_2::Vertex_iterator            Vertex_iterator;
-  typedef Arrangement_2::Halfedge_around_vertex_circulator
-    Halfedge_around_vertex_circulator;
-  typedef Arrangement_2::Edge_iterator              Edge_iterator;
-  typedef Conic_halfedge                            Halfedge;
-  typedef Conic_face_iterator                       Face_iterator;
-
-  //point location
-  typedef Conic_trap_point_location                 Trap_point_location;
-  typedef Conic_simple_point_location               Simple_point_location;
-  typedef Conic_walk_point_location                 Walk_point_location;
-  typedef Conic_lanmarks_point_location             Lanmarks_point_location;
-
-  /*! coordinate scale - used in conics*/
-  int COORD_SCALE;
-  int DRAW_FACTOR;
-
-  /*! constructor */
-  Conic_tab_traits():
-  COORD_SCALE(1),
-  DRAW_FACTOR(5)
-  {}
-
-  /*! distructor */
-  ~Conic_tab_traits()
-  {}
-
-  /*! curve_has_same_direction - return true if the curve and
-   *  the halfedge has the same direction
-   */
-  bool curve_has_same_direction( Ccb_halfedge_circulator &cc)
-  {
-    return (cc->curve().source() == cc->source()->point());
-  }
-
-  /*! check if curve and its halfedge are at the same direction
-   */
-  bool is_curve_and_halfedge_same_direction(const Halfedge_handle & he,
-                                            const X_monotone_curve_2 & cv)
-  {
-    return (he->source()->point() == cv.source());
-  }
-
-  /*!
-   */
-  void fill_face(Qt_widget_demo_tab<Conic_tab_traits> * w , Face_handle f)
-  {
-    if (! f->is_unbounded())  // f is not the unbounded face
-    {
-      std::list< Coord_point > pts; // holds the points of the polygon
-      /* running with around the outer of the face and generate from it
-       * polygon
-       */
-      Ccb_halfedge_circulator cc=f->outer_ccb();
-      do {
-        if (w->antenna(cc))
-          continue;
-
-        Halfedge_handle he = cc;
-        X_monotone_curve_2 c = he->curve();
-        // Get the co-ordinates of the curve's source and target.
-        double sx = CGAL::to_double(he->source()->point().x()),
-               sy = CGAL::to_double(he->source()->point().y()),
-               tx = CGAL::to_double(he->target()->point().x()),
-               ty = CGAL::to_double(he->target()->point().y());
-
-        Coord_point coord_source(sx / COORD_SCALE, sy / COORD_SCALE);
-        Coord_point coord_target(tx / COORD_SCALE, ty / COORD_SCALE);
-
-        if (c.orientation() == CGAL::COLLINEAR)
-            pts.push_back(coord_source );
-        else
-        {
-          // If the curve is monotone, than its source and its target has the
-          // extreme x co-ordinates on this curve.
-          bool is_source_left = (sx < tx);
-          int  x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
-          int  x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
-          double curr_x, curr_y;
-          int  x;
-
-          Arr_conic_point_2 px;
-
-          pts.push_back(coord_source );
-
-          if (is_source_left) {
-            for (x = x_min + DRAW_FACTOR; x < x_max; x+=DRAW_FACTOR) {
-              //= COORD_SCALE)
-              curr_x = (*w).x_real(x);
-              Alg_kernel   ker;
-              Arr_conic_point_2 curr_p(curr_x, 0);
-              if (!(ker.compare_x_2_object()(curr_p, c.left()) !=
-                      CGAL::SMALLER &&
-                    ker.compare_x_2_object()(curr_p, c.right()) !=
-                      CGAL::LARGER))
-                continue;
-              px = c.point_at_x (curr_p);
-              curr_y = CGAL::to_double(px.y());
-              pts.push_back(Coord_point(curr_x / COORD_SCALE,
-                                        curr_y / COORD_SCALE));
-            }// for
-          }
-          else {
-            for (x = x_max; x > x_min; x-=DRAW_FACTOR) {
-              curr_x = (*w).x_real(x);
-              Alg_kernel   ker;
-              Arr_conic_point_2 curr_p(curr_x, 0);
-              if (!(ker.compare_x_2_object() (curr_p, c.left()) !=
-                      CGAL::SMALLER &&
-                    ker.compare_x_2_object() (curr_p, c.right()) !=
-                      CGAL::LARGER))
-                continue;
-              px = c.point_at_x (Arr_conic_point_2(curr_x, 0));
-              curr_y = CGAL::to_double(px.y());
-              pts.push_back(Coord_point(curr_x / COORD_SCALE,
-                                        curr_y / COORD_SCALE));
-            }// for
-          }// else
-          pts.push_back(coord_target );
-        }
-        //created from the outer boundary of the face
-      } while (++cc != f->outer_ccb());
-
-      // make polygon from the outer ccb of the face 'f'
-      My_polygon pgn (pts.begin() , pts.end());
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-      w->setFilled(true);
-
-      // fill the face according to its color (stored at any of her incidents
-      // curves)
-      if (! f->color().isValid())
-        w->setFillColor(def_bg_color);
-      else
-        w->setFillColor(f->color());
-
-      (*w) << pgn ;  // draw the polyong
-      w->get_painter().setPen(old_penstyle);
-      w->setFilled(false);
-    }
-    else
-    {
-      Coord_point points[4];
-      points[0] = (Coord_point(w->x_min(),w->y_min()));
-      points[1] = (Coord_point(w->x_min(),w->y_max()));
-      points[2] = (Coord_point(w->x_max(),w->y_max()));
-      points[3] = (Coord_point(w->x_max(),w->y_min()));
-
-      w->setFilled(true);
-      w->setFillColor(w->unbounded_face_color());
-
-      QPen old_penstyle = w->get_painter().pen();
-      w->get_painter().setPen(Qt::NoPen);
-      (*w)<<My_polygon(points , points +4 );
-      w->setFilled(false);
-       w->get_painter().setPen(old_penstyle);
-    }
-  }
-
-  /*! draw_xcurve - same as draw_curve
-   */
-  void draw_xcurve(Qt_widget_demo_tab<Conic_tab_traits> * w,
-                   X_monotone_curve_2 c )
-  {
-    // Get a polyline approximation of the curve.
-    const Point_2&  p_min = m_traits.construct_min_vertex_2_object() (c);
-    const Point_2&  p_max = m_traits.construct_max_vertex_2_object() (c);
-
-    if (c.orientation() == CGAL::COLLINEAR)
-    {
-      Coord_point s(CGAL::to_double(p_min.x()), CGAL::to_double(p_min.y()));
-      Coord_point t(CGAL::to_double(p_max.x()), CGAL::to_double(p_max.y()));
-
-      Coord_segment seg(s, t);
-      *w << seg;
-      return;
-    }
-    const double    x_min = CGAL::to_double (p_min.x());
-    const double    x_max = CGAL::to_double (p_max.x());
-    const int       ix_min = (*w).x_pixel(x_min);
-    const int       ix_max = (*w).x_pixel(x_max);
-    unsigned int    n = static_cast<unsigned int> (ix_max - ix_min);
-
-    if (w->x_min() > x_max || w->x_max() < x_min)
-      return;
-
-    if (n == 0)
-      return;
-
-    CGAL::Bbox_2    c_bbox = c.bbox();
-
-    if (w->y_min() > c_bbox.ymax() || w->y_max() < c_bbox.ymin())
-      return;
-
-    std::pair<double, double>  *app_pts = new std::pair<double, double> [n + 1];
-    std::pair<double, double>  *end_pts = c.polyline_approximation (n, app_pts);
-    std::pair<double, double>  *p_curr = app_pts;
-    std::pair<double, double>  *p_next = p_curr + 1;
-    Coord_point     ps (p_curr->first, p_curr->second);
-
-    p_curr = app_pts;
-    p_next = p_curr + 1;
-    do
-    {
-      Coord_point     pt (p_next->first, p_next->second);
-
-      *w << Coord_segment(ps, pt);
-      ps = pt;
-      p_curr++;
-      p_next++;
-    } while (p_next != end_pts);
-
-    delete[] app_pts;
-    return;
-  }
-
-  /*! Use Qt_Widget operator to draw a portion of an x-monotone conic arc.
-   * \param w The demo widget.
-   * \param c The curve to be drawn.
-   * \param p_left Defines the left end.
-   * \param p_right Defines the right end.
-   */
-  void draw_xcurve_segment(Qt_widget_demo_tab<Conic_tab_traits> * w,
-                           const X_monotone_curve_2 & c,
-                           const Point_2 & p_left, const Point_2 & p_right)
-  {
-    // Get a polyline approximation of the curve.
-    const Point_2 & p_min = m_traits.construct_min_vertex_2_object() (c);
-    const Point_2 & p_max = m_traits.construct_max_vertex_2_object() (c);
-    Alg_kernel      ker;
-
-    // Trim the curve, if necessary.
-    const Point_2 & p1 =
-      (ker.compare_x_2_object() (p_left, p_min) == CGAL::LARGER) ?
-      p_left : p_min;
-
-    const Point_2 & p2 =
-      (ker.compare_x_2_object() (p_right, p_max) == CGAL::SMALLER) ?
-      p_right : p_max;
-
-    const double    x_min = CGAL::to_double (p1.x());
-    const double    x_max = CGAL::to_double (p2.x());
-    const int       ix_min = (*w).x_pixel(x_min);
-    const int       ix_max = (*w).x_pixel(x_max);
-    unsigned int    n = static_cast<unsigned int> (ix_max - ix_min);
-
-    if (w->x_min() > x_max || w->x_max() < x_min)
-      return;
-
-    if(n == 0)
-      return;
-
-    CGAL::Bbox_2    c_bbox = c.bbox();
-
-    if (w->y_min() > c_bbox.ymax() || w->y_max() < c_bbox.ymin())
-      return;
-
-    std::pair<double, double>  *app_pts = new std::pair<double, double> [n + 1];
-    std::pair<double, double>  *end_pts = c.polyline_approximation (n, app_pts);
-    std::pair<double, double>  *p_curr = app_pts;
-    std::pair<double, double>  *p_next = p_curr + 1;
-    Coord_point     ps (p_curr->first, p_curr->second);
-
-    p_curr = app_pts;
-    p_next = p_curr + 1;
-    do {
-      Coord_point     pt (p_next->first, p_next->second);
-
-      *w << Coord_segment(ps, pt);
-      ps = pt;
-      p_curr++;
-      p_next++;
-    } while (p_next != end_pts);
-
-    delete[] app_pts;
-    return;
-  }
-
-  /*! Draw_a curve
-   */
-  void draw_curve(Qt_widget_demo_tab<Conic_tab_traits> * w , Curve_2 conic )
-  {
-    std::list<CGAL::Object> obj_list;
-    m_traits.make_x_monotone_2_object()(conic, std::back_inserter(obj_list));
-    for(std::list<CGAL::Object>::iterator itr = obj_list.begin();
-        itr != obj_list.end();
-        ++itr)
-    {
-      X_monotone_curve_2 cv;
-
-      if (CGAL::assign(cv, *itr))
-        draw_xcurve (w, cv);
-    }
-  }
-
-  ////////////////////////////////////////////////////////////////////////////
-
-  /*! first_point - a first point of inserted sgment
-   */
-  void first_point( Coord_point p , Mode )
-  {
-    m_p_old = m_p1 = m_p2 = m_p3 = m_p4 = p;
-    num_points = 1;
-    first_time = true;
-  }
-
-  /*! middle_point - the last point of a segment
-   */
-  void middle_point( Coord_point p , Qt_widget_demo_tab<Conic_tab_traits> * w)
-  {
-    Rational r, s, t, u, v, ww;  // The conic coefficients.
-    Rational a, b, c, a_sq, b_sq;
-    Rational x, y, x1, y1, x0, y0, temp;
-    Rational sq_rad;
-
-    x1 = Rational(static_cast<int>(1000 * m_p1.x() + 0.5), 1000);
-    y1 = Rational(static_cast<int>(1000 * m_p1.y() + 0.5), 1000);
-    x = Rational(static_cast<int>(1000 * p.x() + 0.5), 1000);
-    y = Rational(static_cast<int>(1000 * p.y() + 0.5), 1000);
-
-    if (x != x1 || y != y1)
-    {
-      Arr_conic_2 cv;
-
-      switch (w->conic_type)
-      {
-       case CIRCLE:
-        sq_rad = CGAL::square(x - x1) + CGAL::square(y - y1);
-        cv =  Arr_conic_2(Rat_circle_2 (Rat_point_2(x1, y1), sq_rad));
-        break;
-
-       case SEGMENT:
-        cv =  Arr_conic_2(Rat_segment_2 (Rat_point_2(x,y),
-                                                Rat_point_2(x1,y1)));
-        break;
-
-       case ELLIPSE:
-        if (y == y1 || x == x1)
-        {
-          QMessageBox::information( w, "Insert Ellipse", "Invalid Ellipse");
-          w->active = false;
-          return;
-        }
-
-        a = CORE::abs(x1 - x)/2;
-        b = CORE::abs(y1 - y)/2;
-        a_sq = a*a;
-        b_sq = b*b;
-        x0 = (x + x1)/2;
-        y0 = (y + y1)/2;
-
-        r = b_sq;
-        s = a_sq;
-        t = 0;
-        u = -2*x0*b_sq;
-        v = -2*y0*a_sq;
-        ww = x0*x0*b_sq + y0*y0*a_sq - a_sq*b_sq;
-
-        cv =  Arr_conic_2(r, s, t, u, v, ww);
-        break;
-
-        // RWRW: Do nothing ...
-       case PARABOLA:
-        *w << CGAL::LineWidth(3);
-        if (num_points == 1)
-        {
-          m_p2 = p;
-          num_points++;
-          *w << m_p2;
-          return;
-        }
-        if (num_points == 2)
-        {
-          Rational x2 = Rational(static_cast<int>(1000 * m_p2.x() + 0.5), 1000);
-          Rational y2 = Rational(static_cast<int>(1000 * m_p2.y() + 0.5), 1000);
-          Rat_kernel ker;
-          // the three points of the parabola cannot be collinear (
-          if (ker.collinear_2_object()(Rat_point_2(x1,y1),
-                                       Rat_point_2(x,y),Rat_point_2(x2,y2)))
-          {
-            QMessageBox::information( w, "Insert Conic", "Invalid Conic");
-            w->active = false;
-            *w << m_p1 << m_p2 ;
-            return;
-          }
-          cv =  Arr_conic_2 (Rat_point_2(x1,y1),Rat_point_2(x2,y2),
-                                    Rat_point_2(x,y));
-        }
-        break;
-
-       case HYPERBOLA:
-        *w << CGAL::LineWidth(3);
-        if (num_points == 1)
-        {
-          m_p2 = p;
-          num_points++;
-          *w << m_p2;
-          return;
-        }
-        if (num_points == 2)
-        {
-          m_p3 = p;
-          num_points++;
-          *w << m_p3;
-          return;
-        }
-        if (num_points == 3)
-        {
-          m_p4 = p;
-          num_points++;
-          *w << m_p4;
-          return;
-        }
-        if (num_points == 4)
-        {
-          *w << p;
-          Rational x2 = Rational(static_cast<int>(1000 * m_p2.x() + 0.5), 1000);
-          Rational y2 = Rational(static_cast<int>(1000 * m_p2.y() + 0.5), 1000);
-          Rational x3 = Rational(static_cast<int>(1000 * m_p3.x() + 0.5), 1000);
-          Rational y3 = Rational(static_cast<int>(1000 * m_p3.y() + 0.5), 1000);
-          Rational x4 = Rational(static_cast<int>(1000 * m_p4.x() + 0.5), 1000);
-          Rational y4 = Rational(static_cast<int>(1000 * m_p4.y() + 0.5), 1000);
-          cv =  Arr_conic_2 (Rat_point_2(x1,y1),Rat_point_2(x2,y2),
-                             Rat_point_2(x3,y3),Rat_point_2(x4,y4),
-                             Rat_point_2(x,y));
-          if (! cv.is_valid())
-          {
-            QMessageBox::information( w, "Insert Conic", "Invalid Conic");
-            w->active = false;
-            *w << m_p1 << m_p2 << m_p3 << m_p4 << p;
-            return;
-          }
-        }
-        break;
-      }
-
-      CGAL::insert(*(w->m_curves_arr), cv);
-      CGAL::Bbox_2 curve_bbox = cv.bbox();
-      w->bbox = w->bbox + curve_bbox;
-      w->active = false;
-      w->new_object(make_object(Coord_segment(m_p1 , p)));
-    }
-  }
-
-  /*! last_point - meaningless for conics - at least for now
-   */
-  void last_point( Coord_point  , Qt_widget_demo_tab<Conic_tab_traits> *  )
-  {
-    return;
-  }
-
-  /*! draw_last_segment - call from mouse move event
-   */
-  void draw_last_segment( Qt_widget_demo_tab<Conic_tab_traits> * w)
-  {
-    if (w->mode == MODE_SPLIT)
-      *w << Coord_segment( m_p1 , m_p_old );
-    else
-    {
-      switch (w->conic_type)
-      {
-       case CIRCLE:
-        *w << Coord_circle(m_p1, pow(m_p1.x() - m_p_old.x(), 2) +
-                                 pow(m_p1.y() - m_p_old.y(),2));
-        break;
-       case SEGMENT:
-        *w << Coord_segment( m_p1 , m_p_old );
-        break;
-       case ELLIPSE:
-        {
-         *w << Coord_segment( Coord_point(m_p1.x(),m_p_old.y()) , m_p_old );
-         *w << Coord_segment( Coord_point(m_p1.x(),m_p_old.y()) , m_p1 );
-         *w << Coord_segment( Coord_point(m_p_old.x(),m_p1.y()) , m_p_old );
-         *w << Coord_segment( Coord_point(m_p_old.x(),m_p1.y()) , m_p1 );
-         break;
-        }
-       case PARABOLA:
-        if (first_time)
-        {
-          *w << CGAL::LineWidth(3);
-          *w << m_p1;
-          first_time = false;
-        }
-        break;
-       case HYPERBOLA:
-        if (first_time)
-        {
-          *w << CGAL::LineWidth(3);
-          *w << m_p1;
-          first_time = false;
-        }
-        break;
-      }
-    }
-  }
-
-  /*! draw_current_segment - call from mouse move event
-   */
-  void draw_current_segment( Coord_point p ,
-                             Qt_widget_demo_tab<Conic_tab_traits> * w)
-  {
-    m_p_old = p;
-    draw_last_segment(w);
-  }
-
-  /*! closest_point - find the closest point in the planar map
-   * to a clicked point
-   */
-  Coord_type closest_point(Coord_type x, Coord_type y, Coord_point &closest,
-                           Qt_widget_demo_tab<Conic_tab_traits> * w)
-  {
-    bool first = true;
-    Coord_type x1,y1,dt,min_dist = 0;
-    Vertex_iterator vit;
-    for (vit = w->m_curves_arr->vertices_begin();
-         vit != w->m_curves_arr->vertices_end(); vit++)
-    {
-      const Point_2& p = (*vit).point();
-      x1 = CGAL::to_double(p.x()) / COORD_SCALE;
-      y1 = CGAL::to_double(p.y()) / COORD_SCALE;
-      dt = w->dist(x1 , y1 , x , y);
-      if (first || dt < min_dist)
-      {
-        min_dist = dt;
-        closest = Coord_point(x1 , y1);
-        first = false;
-      }
-    }
-    return min_dist;
-  }
-
-
-  /*! xcurve_point_distance - return the distance between
-   * a point and a conic
-   */
-  Coord_type xcurve_point_distance(Coord_point p, X_monotone_curve_2 & c ,
-                                   Qt_widget_demo_tab<Conic_tab_traits> * w)
-  {
-    // Get the co-ordinates of the curve's source and target.
-    double sx = CGAL::to_double(c.source().x()),
-      sy = CGAL::to_double(c.source().y()),
-      tx = CGAL::to_double(c.target().x()),
-      ty = CGAL::to_double(c.target().y());
-
-    if (c.orientation() == CGAL::COLLINEAR)
-    {
-      Coord_point coord_source(sx , sy);
-      Coord_point coord_target(tx , ty);
-      Coord_segment coord_seg(coord_source, coord_target);
-
-      return CGAL::squared_distance( p, coord_seg);
-    }
-    else
-    {
-      // If the curve is monotone, than its source and its target has the
-      // extreme x co-ordinates on this curve.
-        bool is_source_left = (sx < tx);
-        int  x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
-        int  x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
-        double   prev_x = is_source_left ? sx : tx;
-        double   prev_y = is_source_left ? sy : ty;
-        double   curr_x, curr_y;
-        int      x;
-
-        Arr_conic_point_2 px;
-
-        bool         first = true;
-        Coord_type   min_dist = 100000000;
-        Alg_kernel   ker;
-
-
-        for (x = x_min + 1; x < x_max; x++)
-        {
-          curr_x = (*w).x_real(x);
-          Arr_conic_point_2 curr_p(curr_x, 0);
-          if (!(ker.compare_x_2_object() (curr_p, c.left()) != CGAL::SMALLER &&
-                ker.compare_x_2_object() (curr_p, c.right()) != CGAL::LARGER))
-            continue;
-
-          px = c.point_at_x(Arr_conic_point_2(curr_x, 0));
-          curr_y = CGAL::to_double(px.y());
-
-          Coord_segment coord_seg( Coord_point(prev_x, prev_y) ,
-                                   Coord_point(curr_x, curr_y) );
-          Coord_type dist = CGAL::squared_distance( p, coord_seg);
-          if (first || dist < min_dist)
-          {
-            first = false;
-            min_dist = dist;
-          }
-          prev_x = curr_x;
-          prev_y = curr_y;
-        }
-        return min_dist;
-    }
-
-  }
-
-  /*! curve_make_x_monotone
-   */
-  const X_monotone_curve_2 curve_make_x_monotone(Point_2 p1 , Point_2 p2)
-  {
-    Rational x1 (static_cast<int> (1000 * CGAL::to_double(p1.x())+ 0.5), 1000);
-    Rational y1 (static_cast<int> (1000 * CGAL::to_double(p1.y())+ 0.5), 1000);
-
-    Rational x2 (static_cast<int> (1000 * CGAL::to_double(p2.x())+ 0.5), 1000);
-    Rational y2 (static_cast<int> (1000 * CGAL::to_double(p2.y())+ 0.5), 1000);
-
-    Rat_point_2 my_p1 (x1, y1);
-    Rat_point_2 my_p2 (x2, y2);
-    Arr_conic_2 cv (Rat_segment_2 (my_p1, my_p2));
-
-    CGAL::Object             res;
-    CGAL::Oneset_iterator<CGAL::Object> oi(res);
-    m_traits.make_x_monotone_2_object()(cv, oi);
-    X_monotone_curve_2 c1;
-    CGAL::assign(c1, res);
-    return c1;
-  }
-
-
-  Traits m_traits;
-  /*! temporary points of the created conic */
-  Coord_point m_p_old,m_p1,m_p2,m_p3,m_p4;
-  /*! bool flag for hyperbola insertion */
-  bool first_time;
-  /*! counter for the number of points */
-  int num_points;
-};
-#endif
-
-typedef Qt_widget_demo_tab<Segment_tab_traits>       Qt_widget_segment_tab;
-typedef Qt_widget_demo_tab<Polyline_tab_traits>      Qt_widget_polyline_tab;
-#ifdef CGAL_USE_CORE
-typedef Qt_widget_demo_tab<Conic_tab_traits>         Qt_widget_conic_tab;
-#endif
-
-#endif //DEMO_TAB_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.cpp
deleted file mode 100644
index 4b19984..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.cpp
+++ /dev/null
@@ -1,519 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/forms.cpp $
-// $Id: forms.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-////////////////////////////////////////////////////////////////////////
-
-#include "forms.h"
-#include "demo_tab.h"
-
-/*! constructor - build the properties dialog form */
-PropertiesForm::PropertiesForm(QTabWidget * bar, QWidget* parent,
-                               int /* number_of_tabs */,
-                               Qt_widget_base_tab * w_demo_p, double scale,
-                               bool colors_flag):
-  QDialog(parent),
-  myBar(bar)
-{
-  setCaption( "Properties -- Options" );
-  resize( 420, 290 );
-
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-
-  arrLayout1 = new QHBoxLayout( 0, 0, 6 );
-  textLabel1 = new QLabel( "Width", this );
-  arrLayout1->addWidget( textLabel1 );
-  box1 = new QSpinBox( 300, 1000, 50, this, "box1" );
-  box1->setValue(parent->width());
-  arrLayout1->addWidget( box1 );
-  optionsFormLayout->addLayout( arrLayout1 );
-
-  arrLayout2 = new QHBoxLayout( 0, 0, 6 );
-  textLabel2 = new QLabel( "Height", this );
-  arrLayout2->addWidget( textLabel2 );
-  box2 = new QSpinBox( 300, 1000, 50, this, "box2" );
-  box2->setValue(parent->height());
-  arrLayout2->addWidget( box2 );
-  optionsFormLayout->addLayout( arrLayout2 );
-
-  arrLayout3 = new QHBoxLayout( 0, 0, 6 );
-  textLabel3 = new QLabel( "Line Width", this );
-  arrLayout3->addWidget( textLabel3 );
-  box3 = new QSpinBox( 1, 5, 1, this, "box3" );
-  box3->setValue(w_demo_p->m_line_width);
-  arrLayout3->addWidget( box3 );
-  optionsFormLayout->addLayout( arrLayout3 );
-
-  arrLayout4 = new QHBoxLayout( 0, 0, 6 );
-  textLabel4 = new QLabel( "Scaling Factor", this );
-  arrLayout4->addWidget( textLabel4 );
-  box4 = new MySpinBox( 10, 100, 1, this, "box4" );
-  box4->setValue(static_cast<int>(scale*10));
-  arrLayout4->addWidget( box4 );
-  optionsFormLayout->addLayout( arrLayout4 );
-
-  arrLayout5 = new QHBoxLayout( 0, 0, 6 );
-  textLabel5 = new QLabel( "Display Mode", this );
-  arrLayout5->addWidget( textLabel5 );
-  box5 = new QComboBox( FALSE, this );
-  box5->insertItem( "Different Colors At Overlay" );
-  box5->insertItem( "Uniform Color At Overlay" );
-  arrLayout5->addWidget( box5 );
-  optionsFormLayout->addLayout( arrLayout5 );
-  if (!colors_flag)
-    box5->setCurrentItem(1);
-
-  arrLayout6 = new QHBoxLayout( 0, 0, 6 );
-  textLabel6 = new QLabel( "Grid Cube Size", this );
-  arrLayout6->addWidget( textLabel6 );
-  box6 = new QSpinBox( 1, 100, 1, this, "box6" );
-  box6->setValue(w_demo_p->cube_size);
-  arrLayout6->addWidget( box6 );
-  optionsFormLayout->addLayout( arrLayout6 );
-
-  arrLayout7 = new QHBoxLayout( 0, 0, 6 );
-  textLabel7 = new QLabel( "Remove Curve Mode", this );
-  arrLayout7->addWidget( textLabel7 );
-  box7 = new QComboBox( FALSE, this );
-  box7->insertItem( "Remove entire original curve" );
-  box7->insertItem( "Remove Edge" );
-  arrLayout7->addWidget( box7 );
-  optionsFormLayout->addLayout( arrLayout7 );
-  if (!w_demo_p->remove_org_curve)
-    box7->setCurrentItem(1);
-
-  arrLayout8 = new QHBoxLayout( 0, 0, 6 );
-  textLabel8 = new QLabel( "Vertex Radius", this );
-  arrLayout8->addWidget( textLabel8 );
-  box8 = new QSpinBox( 1, 5, 1, this, "box8" );
-  box8->setValue(w_demo_p->m_vertex_width);
-  arrLayout8->addWidget( box8 );
-  optionsFormLayout->addLayout( arrLayout8 );
-
-  arrLayout9 = new QHBoxLayout( 0, 0, 6 );
-  textLabel9 = new QLabel( "Draw vertex not in intersection", this );
-  arrLayout9->addWidget( textLabel9 );
-  box9 = new QComboBox( FALSE, this );
-  box9->insertItem( "Draw" );
-  box9->insertItem( "Don't draw" );
-  arrLayout9->addWidget( box9 );
-  optionsFormLayout->addLayout( arrLayout9 );
-  if (!w_demo_p->draw_vertex)
-    box9->setCurrentItem(1);
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-  optionsFormLayout->addLayout( buttonsLayout );
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
-  textLabel1->setBuddy( box1 );
-  textLabel2->setBuddy( box2 );
-  textLabel3->setBuddy( box3 );
-  textLabel4->setBuddy( box4 );
-
-}
-
-////////////////////////////////////////////////////////////////////////
-
-/*! greem_icon - used in the overlay form */
-const char* green_icon[]={
-  "16 16 2 1",
-  "g c green",
-  ". c None",
-  "................",
-  "................",
-  "..gggggggggggg..",
-  "..gggggggggggg..",
-  "..gggggggggggg..",
-  "..ggg......ggg..",
-  "..ggg......ggg..",
-  "..ggg......ggg..",
-  "..ggg......ggg..",
-  "..ggg......ggg..",
-  "..ggg......ggg..",
-  "..gggggggggggg..",
-  "..gggggggggggg..",
-  "..gggggggggggg..",
-  "................",
-  "................"};
-
-/*! white_icon - used in the overlay form */
-const char* white_icon[]={
-  "16 16 2 1",
-  "g c green",
-  ". c None",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................",
-  "................"};
-
-/*! OverlayForm constructor - build the overlay dialog form */
-OverlayForm::OverlayForm(  QTabWidget * bar, QWidget* parent ,int tab_number ,
-                           const char* name, bool modal, WFlags f  ):
-  QDialog( parent, name, modal, f ),
-  myBar(bar)
-{
-  setCaption( "Planar Maps  --  Overlay" );
-  resize( 590, 390 );
-
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-
-  split = new QSplitter(this);
-  listBox1 = new DDListBox( split );
-  listBox2 = new DDListBox( split );
-  QString traits;
-  Qt_widget_base_tab    *w_demo_p;
-  for (int i=0; i < tab_number; i++)
-  {
-    if ( myBar->isTabEnabled( myBar->page(i) ) )
-    {
-      // We peform downcasting from QWigdet* to Qt_widget_base_tab*,
-      // as we know that only
-      // Qt_widget_base_tab objects are stored in the tab pages.
-      w_demo_p = static_cast<Qt_widget_base_tab *> (myBar->page(i));
-      switch ( w_demo_p->traits_type ) {
-       case SEGMENT_TRAITS:
-        traits = " ( segment traits )";
-        break;
-       case POLYLINE_TRAITS:
-        traits = " ( polyline traits )";
-        break;
-       case CONIC_TRAITS:
-        traits = " ( conic traits )";
-        break;
-      }
-      listBox1->insertItem( QPixmap( green_icon ) ,
-                            myBar->label(i) + traits );
-    }
-  }
-  listBox1->set_max_items(listBox1->count());
-
-  arrLayout = new QHBoxLayout();
-
-  textLabel1 = new QLabel( "Possible Planar Maps", this );
-  arrLayout->addWidget( textLabel1 );
-
-  textLabel2 = new QLabel( "Chosen Planar Maps", this );
-  arrLayout->addWidget( textLabel2 );
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-
-  optionsFormLayout->addLayout( arrLayout );
-  optionsFormLayout->addWidget( split );
-  optionsFormLayout->addLayout( buttonsLayout );
-
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
-  setAcceptDrops(TRUE);
-}
-////////////////////////////////////////////////////////////////////////////////
-//CheckItem::CheckItem(  QListBox * listbox, const QPixmap & pix,
-//                                                               const QString & text ):
-//  QListBoxPixmap( listbox, pix, text )
-//{
-//  check_box = new QCheckBox(listbox);
-//}
-
-
-//////////////////////////////////////////////////////////////////////////////
-
-/*! DDListBox constructor */
-DDListBox::DDListBox( QWidget * parent, const char * name, WFlags f ) :
-  QListBox( parent, name, f ),
-  max_items(0),
-  flag(false)
-{
-  setAcceptDrops( TRUE );
-  dragging = FALSE;
-}
-
-/*! dragEnterEvent - accept drag event */
-void DDListBox::dragEnterEvent( QDragEnterEvent *evt )
-{
-  if (  QTextDrag::canDecode( evt ) )
-    evt->accept();
-}
-
-/*! dropEvent - insert new item. if we are in the first listBox
- *  and all items are there, make all selectable
- */
-void DDListBox::dropEvent( QDropEvent *evt )
-{
-  QString text;
-  if (  QTextDrag::decode( evt, text ) )
-    insertItem( QPixmap( green_icon ) , text );
-  if (count() == max_items && max_items != 0)
-  {
-    flag = true;
-    for (unsigned int i = 0; i < count(); i++)
-      item(i)->setSelectable( true );
-  }
-}
-
-/*! mousePressEvent - mouse click on the list box */
-void DDListBox::mousePressEvent( QMouseEvent *evt )
-{
-  QListBox::mousePressEvent( evt );
-  dragging = TRUE;
-}
-
-/*! mouseMoveEvent - mouse move on the list box */
-void DDListBox::mouseMoveEvent( QMouseEvent * )
-{
-  if (count() == max_items && max_items != 0 && flag)
-  {
-    for (unsigned int i = 0; i < count(); i++)
-      changeItem( QPixmap( green_icon ) , text(i) , i);
-    flag = false;
-  }
-
-  if ( dragging && item(currentItem())->isSelectable() )
-  {
-    QDragObject *d = new  QTextDrag( currentText() , this );
-    d->dragCopy(); // do NOT delete d.
-    dragging = FALSE;
-    unsigned int current = currentItem();
-    if (count() == max_items && max_items != 0)
-    {
-      char s[100];
-      strcpy(s, currentText());
-      char * traits;
-      traits = strtok(s," ");
-      traits = strtok(NULL, " ");
-      traits = strtok(NULL, " ");
-      traits = strtok(NULL, " ");
-
-      for (unsigned int i = 0; i < max_items; i++)
-      {
-        char s_i[100];
-        strcpy(s_i, text(i));
-        char * traits_i;
-        traits_i = strtok(s_i," ");
-        traits_i = strtok(NULL, " ");
-        traits_i = strtok(NULL, " ");
-        traits_i = strtok(NULL, " ");
-        bool b = (strcmp(traits,traits_i) == 0);
-        if (!b && i != current )
-        {
-          changeItem( QPixmap( white_icon ) , text(i) , i);
-          item(i)->setSelectable( b );
-        }
-      }
-    }
-
-    removeItem ( current );
-  }
-}
-
-/*! set_max_items - access to private date member */
-void DDListBox::set_max_items(int num)
-{
-  max_items = num;
-}
-
-/*! OptionsForm constructor */
-OptionsForm::OptionsForm(QWidget * parent, int /* number_of_tabs */,
-                         const char * name, bool modal, WFlags f):
-  QDialog( parent, name, modal, f )
-{
-  setCaption( "Conic Type - Options" );
-  resize( 320, 290 );
-
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-
-  arrLayout1 = new QHBoxLayout( 0, 0, 6 );
-
-  textLabel1 = new QLabel( "Conic Type", this );
-  arrLayout1->addWidget( textLabel1 );
-
-  arrComboBox1 = new QComboBox( FALSE, this );
-
-  arrComboBox1->insertItem( "Circle" );
-  arrComboBox1->insertItem( "Segment" );
-  arrComboBox1->insertItem( "Ellipse" );
-  arrComboBox1->insertItem( "Parabula" );
-  arrComboBox1->insertItem( "Hyperbula" );
-
-  arrLayout1->addWidget( arrComboBox1 );
-  optionsFormLayout->addLayout( arrLayout1 );
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-  optionsFormLayout->addLayout( buttonsLayout );
-
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
-  textLabel1->setBuddy( arrComboBox1 );
-
-}
-
-/*! CheckForm constructor */
-CheckForm::CheckForm( OverlayForm *overlay_form , QWidget* parent ):
-  QDialog( parent )
-{
-  setCaption( "Overlay - paint intersections" );
-  resize( 320, 290 );
-
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-  layout = new QHBoxLayout( 0, 0, 6 );
-  button_group =
-          new QVButtonGroup("Check to paint Planar Maps intersections", this);
-
-  for (unsigned int i = 0; i < overlay_form->listBox2->count(); i++)
-  {
-    overlay_form->listBox2->setCurrentItem(i);
-    QCheckBox *b = new QCheckBox(overlay_form->listBox2->currentText() , button_group);
-        b->setChecked( true );
-        button_group->insert( b , i );
-  }
-
-  layout->addWidget( button_group );
-  optionsFormLayout->addLayout( layout );
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-  optionsFormLayout->addLayout( buttonsLayout );
-
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ));
-
-}
-
-/*! FileOpenOptionsForm constructor */
-FileOpenOptionsForm::FileOpenOptionsForm( bool flag ,QWidget* parent ,
-                                     const char* name, bool modal, WFlags f ):
-  QDialog( parent, name, modal, f )
-{
-  setCaption( "File Open - Options" );
-  resize( 320, 290 );
-
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-
-  buttonGroup = new QButtonGroup( 3, Qt::Vertical ,"Do you want to:",
-                                  this, "buttonGroup" );
-
-  b1 = new QRadioButton( buttonGroup, "b1");
-  b1->setText( "open file in a new tab" );
-
-  b2 = new QRadioButton( buttonGroup, "b2");
-  b2->setText( "open file in current tab (delete current Pm)" );
-
-  if (flag)
-  {
-    b3 = new QRadioButton( buttonGroup, "b3");
-    b3->setText( "merge file into current tab" );
-  }
-
-  buttonGroup->setButton(0);
-
-  optionsFormLayout->addWidget( buttonGroup );
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-  optionsFormLayout->addLayout( buttonsLayout );
-
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
-}
-
-
-/*! PointLocationStrategyForm constructor */
-PointLocationStrategyForm::PointLocationStrategyForm(QWidget * parent ,
-                                                     int /* number_of_tabs */,
-                                                     const char * name,
-                                                     bool modal, WFlags f):
-QDialog( parent, name, modal, f )
-{
-  setCaption( "Point Location - Strategy" );
-  optionsFormLayout = new QVBoxLayout( this, 11, 6 );
-  arrLayout1 = new QHBoxLayout( 0, 0, 6 );
-
-  textLabel1 = new QLabel( "Strategy", this );
-  arrLayout1->addWidget( textLabel1 );
-
-  arrComboBox1 = new QComboBox( FALSE, this );
-
-  arrComboBox1->insertItem( "Simple" );
-  arrComboBox1->insertItem( "Land marks" );
-  arrComboBox1->insertItem( "Trapezoiedal" );
-  arrComboBox1->insertItem( "Walk" );
-
-  arrLayout1->addWidget( arrComboBox1 );
-  optionsFormLayout->addLayout( arrLayout1 );
-
-  buttonsLayout = new QHBoxLayout( 0, 0, 6 );
-  okPushButton = new QPushButton( "OK", this );
-  okPushButton->setDefault( TRUE );
-  buttonsLayout->addWidget( okPushButton );
-  cancelPushButton = new QPushButton( "Cancel", this );
-  buttonsLayout->addWidget( cancelPushButton );
-  optionsFormLayout->addLayout( buttonsLayout );
-
-  connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
-  textLabel1->setBuddy( arrComboBox1 );
-
-}
-
-
-#include "forms.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.h
deleted file mode 100644
index e9cbb22..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/forms.h
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/forms.h $
-// $Id: forms.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_FORMS_H
-#define CGAL_FORMS_H
-
-/*! the forms.h and forms.C files contains all the program
- *  dialog forms and drag-drop class.
- */
-#include <qdialog.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qinputdialog.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qdragobject.h>
-#include <qlistbox.h>
-#include <qiconview.h>
-#include <qsplitter.h>
-#include <qbuttongroup.h>
-#include <qbutton.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qvbuttongroup.h>
-
-#include "cgal_types.h"
-
-class QDragEnterEvent;
-class QDragDropEvent;
-class DDListBox;
-class QWidget;
-
-/*! class MySpinBox is used for the scaling factor properties
- *  dialog. we need to use it to support duoble as a value.
- */
-class MySpinBox : public QSpinBox
-{
-  Q_OBJECT
-public:
-  /*! constructor */
-  MySpinBox ( int minValue, int maxValue, int step = 1,
-              QWidget * parent = 0, const char * name = 0 ):
-    QSpinBox ( minValue, maxValue, step , parent , name )
-  {}
-
-  /*! distructor */
-  ~MySpinBox () {}
-
-  /*! mapValueToText - map value to text
-   *\ param value - the real spin box value
-   *\ return a text of a double number we want to represent
-   */
-  QString mapValueToText( int value )
-  {
-    return QString( "%1.%2" ) // 0.0 to 10.0
-      .arg( value / 10 ).arg( value % 10 );
-  }
-
-  /*! mapTextToValue - map text to value
-   *\ return the corresponding int value
-   */
-  int mapTextToValue( bool * /* ok */)
-  {
-    return (int) ( 10 * text().toFloat() ); // 0 to 100
-  }
-};
-
-/*! class PropertiesForm is the dialog form that allow the user
- *  to set the program properties.
- */
-class Qt_widget_base_tab;
-class PropertiesForm : public QDialog
-{
-  Q_OBJECT
-public:
-  PropertiesForm( QTabWidget * bar = 0 , QWidget* parent = 0 ,
-                  int number_of_tabs = 0 , Qt_widget_base_tab *w_demo_p = 0,
-                                  double scale = 0 , bool colors_flag = true);
-  ~PropertiesForm() {}
-
-  QLabel *textLabel1;
-  QLabel *textLabel2;
-  QLabel *textLabel3;
-  QLabel *textLabel4;
-  QLabel *textLabel5;
-  QLabel *textLabel6;
-  QLabel *textLabel7;
-  QLabel *textLabel8;
-  QLabel *textLabel9;
-  QSpinBox *box1;
-  QSpinBox *box2;
-  QSpinBox *box3;
-  MySpinBox *box4;
-  QComboBox *box5;
-  QSpinBox *box6;
-  QComboBox *box7;
-  QSpinBox *box8;
-  QComboBox *box9;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  QHBoxLayout *arrLayout1;
-  QHBoxLayout *arrLayout2;
-  QHBoxLayout *arrLayout3;
-  QHBoxLayout *arrLayout4;
-  QHBoxLayout *arrLayout5;
-  QHBoxLayout *arrLayout6;
-  QHBoxLayout *arrLayout7;
-  QHBoxLayout *arrLayout8;
-  QHBoxLayout *arrLayout9;
-  QHBoxLayout *buttonsLayout;
-
-private:
-  QTabWidget *myBar;
-};
-
-/*! OverlayForm - the dialog form of the overlay operation */
-class OverlayForm : public QDialog
-{
-  Q_OBJECT
-public:
-  OverlayForm( QTabWidget * bar = 0 , QWidget* parent = 0 ,
-               int number_of_tabs = 0 , const char* name = "options form",
-               bool modal = FALSE, WFlags f = 0  );
-  ~OverlayForm() {}
-
-  QLabel *textLabel1;
-  QLabel *textLabel2;
-  QSplitter *split;
-  DDListBox *listBox1;
-  DDListBox *listBox2;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  QHBoxLayout *arrLayout;
-  QHBoxLayout *buttonsLayout;
-
-private:
-  QTabWidget *myBar;
-};
-
-/*! class DDListBox used for the drag/drop action in the overlay form */
-class DDListBox : public QListBox
-{
-  Q_OBJECT
-public:
-  DDListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
-  // Low-level drag and drop
-  void dragEnterEvent( QDragEnterEvent *evt );
-  void dropEvent( QDropEvent *evt );
-  void mousePressEvent( QMouseEvent *evt );
-  void mouseMoveEvent( QMouseEvent * );
-  void set_max_items(int num);
-private:
-  int dragging;
-  unsigned int max_items;
-  bool flag;
-
-};
-
-///*! class CheckItem used for the drag/drop action in the overlay form */
-//class CheckItem : public QListBoxPixmap
-//{
-//public:
-//  CheckItem(  QListBox * listbox, const QPixmap & pix, const QString & text );
-//private:
-//  QCheckBox *check_box;
-//};
-
-/*! class OptionsForm used for choosing which conic type will be inserted */
-class OptionsForm : public QDialog
-{
-  Q_OBJECT
-public:
-  OptionsForm( QWidget* parent = 0 ,int number_of_tabs = 0 ,const char*
-               name = "options form", bool modal = FALSE, WFlags f = 0);
-  ~OptionsForm() {}
-
-  QLabel *textLabel1;
-  QComboBox *arrComboBox1;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  QHBoxLayout *arrLayout1;
-  QHBoxLayout *buttonsLayout;
-
-};
-
-/*! class CheckForm used for choosing which conic type will be inserted */
-class CheckForm : public QDialog
-{
-  Q_OBJECT
-public:
-  CheckForm( OverlayForm *overlay_form , QWidget* parent = 0);
-  ~CheckForm() {}
-
-  QVButtonGroup *button_group;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  QHBoxLayout *layout;
-  QHBoxLayout *buttonsLayout;
-};
-
-/*! class FileOpenOptionsForm used for choosing which action will be taken
-  when we open a new file
-*/
-class FileOpenOptionsForm : public QDialog
-{
-  Q_OBJECT
-public:
-  FileOpenOptionsForm( bool flag = true ,QWidget* parent = 0 ,
-                       const char* name = "file open options form",
-                       bool modal = FALSE, WFlags f = 0);
-  ~FileOpenOptionsForm() {}
-
-  QLabel *textLabel1;
-  //QComboBox *arrComboBox1;
-  QRadioButton *b1;
-  QRadioButton *b2;
-  QRadioButton *b3;
-  QButtonGroup *buttonGroup;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  //QHBoxLayout *arrLayout1;
-  QHBoxLayout *buttonsLayout;
-
-};
-
-
-
-/*! class PointLocationStrategyForm used for choosing strategy for point location*/
-class PointLocationStrategyForm : public QDialog
-{
-  Q_OBJECT
-public:
-  PointLocationStrategyForm(QWidget* parent = 0 ,int number_of_tabs = 0 ,
-  const char* name = "options form", bool modal = FALSE, WFlags f = 0);
-  ~PointLocationStrategyForm() {}
-
-  QLabel *textLabel1;
-  QComboBox *arrComboBox1;
-  QPushButton *okPushButton;
-  QPushButton *cancelPushButton;
-
-protected:
-  QVBoxLayout *optionsFormLayout;
-  QHBoxLayout *arrLayout1;
-  QHBoxLayout *buttonsLayout;
-
-};
-
-
-
-
-
-
-#endif // FORMS_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h
deleted file mode 100644
index 8395f06..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef CGAL_OVERLAY_FUNCTOR_H
-#define CGAL_OVERLAY_FUNCTOR_H
-
-
-template < class Arrangement_ >
-class Overlay_functor
-{
-public:
-
-  typedef Arrangement_                                  Arrangement;
-
-  typedef typename Arrangement::Face_const_handle       Face_const_handle;
-  typedef typename Arrangement::Vertex_const_handle     Vertex_const_handle;
-  typedef typename Arrangement::Halfedge_const_handle   Halfedge_const_handle;
-
-  typedef typename Arrangement::Face_handle             Face_handle;
-  typedef typename Arrangement::Vertex_handle           Vertex_handle;
-  typedef typename Arrangement::Halfedge_handle         Halfedge_handle;
-
-
-  void create_face (Face_const_handle f1,
-                    Face_const_handle f2,
-                    Face_handle res_f)
-  {
-    const QColor& c1 = f1->color();
-    const QColor& c2 = f2->color();
-    QColor res_c ( (c1.red() + c2.red())/2,
-                   (c1.green() + c2.green())/2,
-                   (c1.blue() + c2.blue())/2 );
-
-    res_f->set_color(res_c);
-  }
-
-  void create_vertex(Halfedge_const_handle ,
-                     Halfedge_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_vertex(Vertex_const_handle ,
-                     Vertex_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_vertex(Vertex_const_handle ,
-                     Halfedge_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_vertex(Halfedge_const_handle ,
-                     Vertex_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_vertex(Face_const_handle ,
-                     Vertex_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_vertex(Vertex_const_handle ,
-                     Face_const_handle ,
-                     Vertex_handle )
-  {}
-
-  void create_edge(Halfedge_const_handle ,
-                   Halfedge_const_handle ,
-                   Halfedge_handle )
-  {}
-
-  void create_edge(Halfedge_const_handle ,
-                   Face_const_handle ,
-                   Halfedge_handle )
-  {}
-
-  void create_edge(Face_const_handle ,
-                   Halfedge_const_handle ,
-                   Halfedge_handle )
-  {}
-
-
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp
deleted file mode 100644
index d4a7ed2..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/qt_layer.cpp $
-// $Id: qt_layer.cpp 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-#include "qt_layer.h"
-#include "demo_tab.h"
-#include <qtabwidget.h>
-
-/*! constructor */
-Qt_layer::Qt_layer( QTabWidget * bar ) :
-  myBar(bar)
-{}
-
-/*! draw - activate the current page widget draw function */
-void Qt_layer::draw()
-{
-  // We peform downcasting from QWigdet* to Qt_widget_demo_tab*
-  // , as we know that only
-  // Qt_widget_demo_tab objects are stored in the tab pages.
-  Qt_widget_base_tab    *w_base_p =
-    static_cast<Qt_widget_base_tab *> (myBar->currentPage());
-
-  TraitsType t = w_base_p->traits_type;
-
-  switch ( t ) {
-   case SEGMENT_TRAITS:
-    {
-     Qt_widget_demo_tab<Segment_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Segment_tab_traits> *>
-       (myBar->currentPage());
-     w_demo_p->lock();
-     w_demo_p->draw();
-     w_demo_p->unlock();
-     break;
-    }
-   case POLYLINE_TRAITS:
-    {
-     Qt_widget_demo_tab<Polyline_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Polyline_tab_traits> *>
-       (myBar->currentPage());
-     w_demo_p->lock();
-     w_demo_p->draw();
-     w_demo_p->unlock();
-     break;
-    }
-   case CONIC_TRAITS:
-    {
-#ifdef CGAL_USE_CORE
-     Qt_widget_demo_tab<Conic_tab_traits> *w_demo_p =
-       static_cast<Qt_widget_demo_tab<Conic_tab_traits> *>
-       (myBar->currentPage());
-     w_demo_p->lock();
-     w_demo_p->draw();
-     w_demo_p->unlock();
-#endif
-     break;
-    }
-  }
-
-
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.h b/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.h
deleted file mode 100644
index bbd0df8..0000000
--- a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/old_demo/qt_layer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/features/gsoc2012-Arrangement_on_surface_2-demo-atsui/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/qt_layer.h $
-// $Id: qt_layer.h 67117 2012-01-13 18:14:48Z lrineau $
-//
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_QT_LAYER_H
-#define CGAL_QT_LAYER_H
-
-/*! class Qt_layer is the main layer in the program.
- *  all the tab widget are attached to it.
- */
-#include <CGAL/IO/Qt_widget_layer.h>
-
-#include "cgal_types.h"
-
-class QTabWidget;
-
-class Qt_layer : public CGAL::Qt_widget_layer
-{
-public:
-    Qt_layer( QTabWidget * );
-	void draw();
-
-private:
-	QTabWidget *myBar;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/CMakeLists.txt
deleted file mode 100644
index 4af8809..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Boolean_operations_2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3 )
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched)
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND CGAL_Qt3_FOUND AND QT3_FOUND )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  include( Qt3Macros-patched )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2_toolbar.h" boolean_operations_2_toolbar.moc )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/boolean_operations_2.h" boolean_operations_2.moc )
-
-
-  # The executable itself.
-  add_executable  ( boolean_operations_2 
-    boolean_operations_2.cpp boolean_operations_2.moc
-    boolean_operations_2_toolbar.cpp boolean_operations_2_toolbar.moc
-    Qt_widget_locate_layer.cpp
-    )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS boolean_operations_2 )
-
-  target_link_libraries( boolean_operations_2  ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h
deleted file mode 100644
index a7eebcb..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
-#define CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
-#include <CGAL/Simple_cartesian.h>
-#include <cmath>
-
-namespace CGAL {
-
-template < class Kernel, bool Filter >
-CGAL::Qt_widget &
-operator<<(CGAL::Qt_widget & widget,
-           const CGAL::_X_monotone_circle_segment_2<Kernel, Filter> &arc)
-{
-  if(arc.is_linear())
-  {
-    typedef Simple_cartesian<double> DK;
-    typedef DK::Segment_2            DS_;
-    typedef DK::Point_2              DP;
-    double sx = CGAL::to_double(arc.source().x());
-    double sy = CGAL::to_double(arc.source().y());
-    double tx = CGAL::to_double(arc.target().x());
-    double ty = CGAL::to_double(arc.target().y());
-    DS_ seg(DP(sx ,sy), DP(tx, ty));
-    widget << seg;
-    return (widget);
-  }
-
-
-  const typename Kernel::Circle_2 & circ = arc.supporting_circle();
-  const typename Kernel::Point_2 & center = circ.center();
-  typedef typename _X_monotone_circle_segment_2<Kernel, Filter>::Point_2 Arc_point_2;
-  Arc_point_2 source;
-  Arc_point_2 target;
-  if(arc.orientation() == COUNTERCLOCKWISE)
-  {
-    source = arc.source();
-    target = arc.target();
-  }
-  else
-  {
-    target = arc.source();
-    source = arc.target();
-  }
-  double rad = std::sqrt(CGAL::to_double(circ.squared_radius()));
-
-  int x_screen   = widget.x_pixel(CGAL::to_double(center.x()));
-  int y_screen   = widget.y_pixel(CGAL::to_double(center.y()));
-  int x_screen_b = widget.x_pixel(CGAL::to_double(center.x()) + rad);
-  int radius     = x_screen_b - x_screen;
-
-  double a   = std::atan2( to_double(source.y() - center.y()),
-                            to_double(source.x() - center.x()));
-  double a2p = std::atan2( to_double(target.y() - center.y()),
-                            to_double(target.x() - center.x()));
-
-  if (a2p <= a)
-      a2p += 2 * CGAL_PI;
-
-  double alen2 = a2p - a;
-
-  double diff = 180/CGAL_PI*16;
-
-  widget.get_painter().drawArc(x_screen - radius,
-                                y_screen - radius,
-                                2 * radius, 2 * radius,
-                                (int)(a * diff),
-                                (int)(alen2 * diff));
-  return widget;
-}
-
-} // namespace CGAL
-
-#endif // CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h
deleted file mode 100644
index 0c6de82..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_CIRC_POLYGON_H
-#define CGAL_QT_WIDGET_CIRC_POLYGON_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/General_polygon_2.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <utility>
-
-namespace CGAL
-{
-  template <class Tr>
-  Qt_widget& operator<<(Qt_widget& w, const General_polygon_2<Tr>& pgn)
-  {
-    typedef typename General_polygon_2<Tr>::Curve_const_iterator  CI;
-    typedef Simple_cartesian<double>    DK;
-    typedef DK::Point_2                 DPT;
-    typedef CGAL::Polygon_2<DK>         DPGN;
-
-    std::list<std::pair<double, double> > pair_list;
-    for(CI citr = pgn.curves_begin();citr != pgn.curves_end(); ++citr)
-    {
-      if(citr->is_linear())
-      {
-        // when the curve is linear approximate will allways return
-        // two pairs (for each endpoint) regardless the parameter of number
-        // of points
-        citr->approximate(std::back_inserter(pair_list), 0);
-        continue;
-      }
-
-      // circular arc
-      double sx = CGAL::to_double(citr->source().x());
-      double tx = CGAL::to_double(citr->target().x());
-      int x_min;
-      int x_max;
-      if(citr->is_directed_right())
-      {
-        x_min =  w.x_pixel(sx);
-        x_max =  w.x_pixel(tx);
-      }
-      else
-      {
-        x_min = w.x_pixel(tx);
-        x_max = w.x_pixel(sx);
-      }
-      const int     n = x_max - x_min + 1;
-      if (n <= 0)
-        continue;
-
-      citr->approximate(std::back_inserter(pair_list), n);
-    }
-
-    DPGN app_pgn;
-    for(std::list<std::pair<double, double> >::iterator it = pair_list.begin();
-        it != pair_list.end();
-        ++it)
-    {
-      DPT pt(it->first, it->second);
-      app_pgn.push_back(pt);
-    }
-
-    w<<app_pgn;
-    return w;
-  }
-
-
-}//end namespace CGAL
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h
deleted file mode 100644
index c8ebe0b..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_CIRCLE_SEGMENT_2_H
-#define CGAL_QT_WIDGET_CIRCLE_SEGMENT_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
-#include <CGAL/Simple_cartesian.h>
-#include <cmath>
-
-namespace CGAL
-{
-  template < class Kernel, bool Filter >
-CGAL::Qt_widget &
-operator<<(CGAL::Qt_widget & widget,
-           const CGAL::_Circle_segment_2<Kernel, Filter> &arc)
-{
-  if(arc.orientation() == COLLINEAR)
-  {
-    typedef Simple_cartesian<double> DK;
-    typedef DK::Segment_2            DS_;
-    typedef DK::Point_2              DP;
-    double sx = CGAL::to_double(arc.source().x());
-    double sy = CGAL::to_double(arc.source().y());
-    double tx = CGAL::to_double(arc.target().x());
-    double ty = CGAL::to_double(arc.target().y());
-    DS_ seg(DP(sx ,sy), DP(tx, ty));
-    widget << seg;
-    return (widget);
-  }
-
-
-  const typename Kernel::Circle_2 & circ = arc.supporting_circle();
-  const typename Kernel::Point_2 & center = circ.center();
-  typedef typename _X_monotone_circle_segment_2<Kernel, Filter>::Point_2 Arc_point_2;
-  Arc_point_2 source;
-  Arc_point_2 target;
-  if(arc.orientation() == COUNTERCLOCKWISE)
-  {
-    source = arc.source();
-    target = arc.target();
-  }
-  else
-  {
-    target = arc.source();
-    source = arc.target();
-  }
-  double rad = std::sqrt(CGAL::to_double(circ.squared_radius()));
-
-  int x_screen   = widget.x_pixel(CGAL::to_double(center.x()));
-  int y_screen   = widget.y_pixel(CGAL::to_double(center.y()));
-  int x_screen_b = widget.x_pixel(CGAL::to_double(center.x()) + rad);
-  int radius     = x_screen_b - x_screen;
-
-  double a   = std::atan2( to_double(source.y() - center.y()),
-                            to_double(source.x() - center.x()));
-  double a2p = std::atan2( to_double(target.y() - center.y()),
-                            to_double(target.x() - center.x()));
-
-  if (a2p <= a)
-      a2p += 2 * CGAL_PI;
-
-  double alen2 = a2p - a;
-
-  double diff = 180/CGAL_PI*16;
-
-  widget.get_painter().drawArc(x_screen - radius,
-                                y_screen - radius,
-                                2 * radius, 2 * radius,
-                                (int)(a * diff),
-                                (int)(alen2 * diff));
-  return widget;
-}
-
-}//end namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_get_circ_polygon.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_get_circ_polygon.h
deleted file mode 100644
index b478832..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_get_circ_polygon.h
+++ /dev/null
@@ -1,636 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_GET_CIRC_POLYGON_H
-#define CGAL_QT_WIDGET_GET_CIRC_POLYGON_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-#include <CGAL/General_polygon_2.h>
-#include "Qt_widget_circle_segment_2.h"
-#include "Qt_widget_X_monotone_circle_segment_2.h"
-#include <qcursor.h>
-
-namespace CGAL
-{
-  template <class Kernel>
-  class  Qt_widget_get_circ_polygon : public Qt_widget_layer
-  {
-  protected:
-    typedef Arr_circle_segment_traits_2<Kernel>          Traits_2;
-    typedef General_polygon_2<Traits_2>                  Polygon;
-    typedef typename Traits_2::Point_2                   Arc_point_2;
-
-    typedef typename Traits_2::Curve_2                   Curve_2;
-    typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
-    typedef typename Polygon::Curve_iterator             Curve_iterator;
-    typedef typename Kernel::FT                          FT;
-    typedef typename Kernel::Point_2                     Point_2;
-    typedef typename Kernel::Segment_2                   Segment_2;
-    typedef typename Kernel::Circle_2                    Circle_2;
-    typedef Cartesian<double>                            Double_kernel;
-    typedef Double_kernel::Point_2                       Double_point_2;
-    typedef Double_kernel::Segment_2                     Double_segment_2;
-
-
-    //Data members
-    Polygon     m_pgn;
-    bool        m_active;      //true if the first point was inserted
-    bool        m_first_time; //true if it is the first time when
-                              //draw the rubber band
-
-    bool        m_is_circ_mode; // true if we are at circular arc mode
-    Point_2     m_rubber;   //the new point of the rubber band
-    Point_2     m_last_of_poly; //the last point of the polygon
-    Point_2     m_rubber_old; //the old point of the rubber band
-
-    Point_2     m_arc_source;  // the arc source (incase of circ arc)
-    Point_2     m_arc_target; // the arc target (incase of circ arc)
-    Curve_2     m_old_arc;
-
-    QWidget::FocusPolicy  m_oldpolicy;
-    QCursor               m_oldcursor;
-    QCursor               m_cursor;
-
-    bool m_ignore_move_event;
-
-
-  public:
-
-    Qt_widget_get_circ_polygon(const QCursor c=QCursor(Qt::crossCursor),
-                               QObject* parent = 0,
-                               const char* name = 0)
-      : Qt_widget_layer(parent, name),
-        m_active(false),
-        m_first_time(true),
-        m_is_circ_mode(false),
-        m_cursor(c) ,
-        m_ignore_move_event(false)
-    {}
-
-    void draw()
-    {
-      if(m_pgn.size() > 1)
-      {
-        widget->lock();
-        RasterOp old_rasterop = widget->rasterOp();
-        widget->get_painter().setRasterOp(XorROP);
-        *widget << CGAL::GREEN;
-        Curve_iterator before_end = m_pgn.curves_end();
-        --before_end;
-
-        for(Curve_iterator it = m_pgn.curves_begin(); it != before_end; ++it)
-          *widget << *it;
-        widget->setRasterOp(old_rasterop);
-        widget->unlock();
-      }
-      return;
-    };
-
-
-  protected:
-
-  bool is_pure(Qt::ButtonState s)
-  {
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return false;
-
-    return true;
-  }
-
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(!is_pure(e->state()) && (e->state() & Qt::ControlButton))
-    {
-      if(m_is_circ_mode)
-        return;
-      if(!m_active)
-        return;
-
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-
-       if (m_last_of_poly == Point_2(x,y))
-          return;
-
-       m_is_circ_mode = true;
-      CircModeEvent(e);
-      return;
-    }
-    if(e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-
-      if(!m_active)
-      {
-        m_active=true;
-        m_last_of_poly = Point_2(x, y);
-      }
-      else
-      {
-        if (m_last_of_poly == Point_2(x,y))
-          return;
-        m_rubber_old = Point_2(x, y);
-        if(is_simple())
-        {
-          if(!m_is_circ_mode)
-          {
-            m_pgn.push_back(X_monotone_curve_2(m_last_of_poly, Point_2(x,y)));
-            //show the last rubber as edge of the polygon
-            widget->lock();
-            RasterOp old_rasterop=widget->rasterOp();
-            widget->get_painter().setRasterOp(XorROP);
-            *widget << CGAL::WHITE;
-            *widget << Segment_2(m_rubber, m_last_of_poly);
-            *widget << CGAL::GREEN;
-            *widget << Segment_2(m_rubber, m_last_of_poly);
-            widget->setRasterOp(old_rasterop);
-            widget->unlock();
-            m_last_of_poly = Point_2(x, y);
-          }
-          else
-          {
-            //circ mode
-             Traits_2 tr;
-             typename Traits_2::Make_x_monotone_2 make_x = tr.make_x_monotone_2_object();
-             std::vector<Object> xcurves_vec;
-             xcurves_vec.reserve(2);
-             make_x(m_old_arc, std::back_inserter(xcurves_vec));
-
-             widget->lock();
-             RasterOp old_rasterop=widget->rasterOp();
-             widget->get_painter().setRasterOp(XorROP);
-             *widget << CGAL::WHITE;
-             *widget << m_old_arc;
-             *widget << CGAL::GREEN;
-              for(unsigned int i=0; i<xcurves_vec.size(); ++i)
-             {
-               X_monotone_curve_2 cv_arc;
-               CGAL::assign(cv_arc, xcurves_vec[i]);
-               m_pgn.push_back(cv_arc);
-               *widget << (cv_arc);
-             }
-             widget->setRasterOp(old_rasterop);
-             widget->unlock();
-             m_last_of_poly = Point_2(x, y);
-             m_is_circ_mode = false;
-             m_last_of_poly = m_arc_target;
-             m_rubber_old = m_arc_target;
-             int xpixel = widget->x_pixel(CGAL::to_double(m_arc_target.x()));
-             int ypixel = widget->y_pixel(CGAL::to_double(m_arc_target.y()));
-
-             QPoint qp(xpixel, ypixel);
-             QPoint qq = widget->mapToGlobal(qp);
-             QCursor::setPos(qq);
-          }
-        }
-      }
-      return;
-    }
-    if(e->button() == Qt::RightButton && is_pure(e->state()))
-    {
-      if (m_active)
-      {
-        if(m_is_circ_mode)
-          return; // if we are at circ mode, ignore
-        if(is_simple(true))
-        {
-          if(m_pgn.is_empty())
-            return;
-          const Arc_point_2& first_point = m_pgn.curves_begin()->source();
-          CGAL_assertion(!first_point.x().is_extended() && !first_point.y().is_extended());
-          FT xs = first_point.x().alpha();
-          FT ys = first_point.y().alpha();
-          m_pgn.push_back(X_monotone_curve_2(m_last_of_poly, Point_2(xs, ys)));
-          widget->new_object(make_object(m_pgn));
-          m_active = false;
-          m_first_time = true;
-          m_pgn.clear();
-        }
-      }
-    }
-  };//end mousePressEvent
-
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() )
-    {
-      case Key_Escape:
-
-          if(m_is_circ_mode)
-          {
-            // special treatment if we are at circ mode
-            widget->lock();
-            RasterOp old_rasterop=widget->rasterOp();
-            widget->get_painter().setRasterOp(XorROP);
-            *widget << CGAL::WHITE;
-            *widget << m_old_arc;
-            *widget << Segment_2(m_rubber, m_arc_source);
-            m_is_circ_mode = false;
-
-            //move the cursor to m_rubber position
-            int rubber_x_pixel = widget->x_pixel(CGAL::to_double(m_rubber.x()));
-            int rubber_y_pixel = widget->y_pixel(CGAL::to_double(m_rubber.y()));
-
-            QPoint qp(rubber_x_pixel, rubber_y_pixel);
-            QPoint qq = widget->mapToGlobal(qp);
-            QCursor::setPos(qq);
-            m_ignore_move_event = true;
-
-            widget->setRasterOp(old_rasterop);
-            widget->unlock();
-
-            return;
-          }
-
-         if(!m_pgn.is_empty())
-         {
-           // segment mode
-           widget->lock();
-           RasterOp old_rasterop=widget->rasterOp();
-           widget->get_painter().setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-
-           Curve_iterator last = m_pgn.curves_end();
-           --last;
-
-           if(last->is_linear())
-           {
-            *widget << *last;
-            *widget << CGAL::WHITE;
-            *widget << Segment_2(m_rubber, m_last_of_poly);
-            const Arc_point_2& last_point = last->source();
-
-            CGAL_assertion(!last_point.x().is_extended() && !last_point.y().is_extended());
-            FT xs = last_point.x().alpha();
-            FT ys = last_point.y().alpha();
-
-            *widget << Segment_2(m_rubber, Point_2(xs, ys));
-            widget->setRasterOp(old_rasterop);
-            widget->unlock();
-            m_last_of_poly = Point_2(xs, ys);
-            m_pgn.erase(last);
-           }
-           else
-           {
-             //circular arc, remove all original xcurves
-
-             Curve_iterator curr = last;
-             Curve_iterator prev = curr;
-             while(curr != m_pgn.curves_begin())
-             {
-               --curr;
-               if(curr->has_same_supporting_curve(*prev))
-               {
-                 prev = curr;
-               }
-               else
-                 break;
-             }
-             Curve_iterator first;
-             if(curr == m_pgn.curves_begin())
-             {
-               Curve_iterator next = curr;
-               ++next;
-               if(next == m_pgn.curves_end())
-               {
-                 first = curr;
-               }
-               else
-                 if(curr->has_same_supporting_curve(*next))
-                   first = curr;
-                 else
-                   first = ++curr;
-             }
-             else
-             {
-               first = ++curr;
-             }
-             Curve_iterator itr;
-             for(itr = first; itr != m_pgn.curves_end(); ++itr)
-             {
-               *widget << *itr;
-             }
-             *widget << CGAL::WHITE;
-             *widget << Segment_2(m_rubber, m_last_of_poly);
-             const Arc_point_2& last_point = first->source();
-
-             CGAL_assertion(!last_point.x().is_extended() && !last_point.y().is_extended());
-             FT xs = last_point.x().alpha();
-             FT ys = last_point.y().alpha();
-
-             *widget << Segment_2(m_rubber, Point_2(xs, ys));
-             widget->setRasterOp(old_rasterop);
-             widget->unlock();
-             m_last_of_poly = Point_2(xs, ys);
-             itr = first;
-             while(itr != m_pgn.curves_end())
-             {
-               Curve_iterator temp = itr;
-               ++itr;
-               m_pgn.erase(temp);
-             }
-
-           }
-         }
-         else
-         {
-           // the polygon is empty. if m_first_time is false,
-           // erase the rubber segment and m_active becomes false
-           if(!m_first_time)
-           {
-            widget->lock();
-            RasterOp old_rasterop=widget->rasterOp();
-            widget->get_painter().setRasterOp(XorROP);
-            *widget << CGAL::WHITE;
-            *widget << Segment_2(m_rubber, m_last_of_poly);
-            widget->setRasterOp(old_rasterop);
-            widget->unlock();
-            m_first_time = true;
-            m_active = false;
-           }
-
-         }
-        break;
-    }//endswitch
-  }//end keyPressEvent
-
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(!m_active)
-      return;
-    if(m_ignore_move_event)
-    {
-      m_ignore_move_event = false;
-      return;
-    }
-
-    FT x, y;
-    widget->x_real(e->x(), x);
-    widget->y_real(e->y(), y);
-    m_rubber = Point_2(x, y);
-
-    if(m_is_circ_mode)
-    {
-      Curve_2 circ_arc(m_arc_source, m_rubber, m_arc_target);
-
-      widget->lock();
-      RasterOp old_rasterop=widget->rasterOp();
-      widget->get_painter().setRasterOp(XorROP);
-      *widget << CGAL::WHITE;
-      if(!m_first_time)
-      {
-        *widget << m_old_arc;
-      }
-      *widget << circ_arc;
-      m_old_arc = circ_arc;
-      m_rubber_old = m_rubber;
-      widget->setRasterOp(old_rasterop);
-      m_first_time = false;
-      widget->unlock();
-
-      return;
-    }
-
-
-
-    widget->lock();
-    RasterOp old_rasterop=widget->rasterOp();
-    widget->get_painter().setRasterOp(XorROP);
-    *widget << CGAL::WHITE;
-    if(!m_first_time)
-      *widget << Segment_2(m_rubber_old, m_last_of_poly);
-    *widget << Segment_2(m_rubber, m_last_of_poly);
-    m_first_time = false;
-    m_rubber_old = m_rubber;
-    widget->setRasterOp(old_rasterop);
-    widget->unlock();
-  };//end mouseMoveEvent
-
-
-  void CircModeEvent(QMouseEvent *e)
-  {
-    if(!m_active)
-      return;
-     FT x, y;
-     widget->x_real(e->x(), x);
-     widget->y_real(e->y(), y);
-
-     m_arc_target = Point_2(x, y);
-
-     FT xs = m_last_of_poly.x();
-     FT ys = m_last_of_poly.y();
-
-     m_arc_source = Point_2(xs, ys);
-     double last_pgn_pt_x = CGAL::to_double(xs);
-     double last_pgn_pt_y = CGAL::to_double(ys);
-
-
-     m_old_arc = Curve_2(m_arc_source, m_arc_target);
-     widget->lock();
-     *widget << CGAL::WHITE;
-     RasterOp old_rasterop=widget->rasterOp();
-     widget->get_painter().setRasterOp(XorROP);
-     *widget << Segment_2(m_rubber, m_last_of_poly);
-     *widget << m_old_arc;
-     widget->setRasterOp(old_rasterop);
-     widget->unlock();
-
-
-     Double_point_2 ptt(last_pgn_pt_x, last_pgn_pt_y);
-
-     double mid_x = (last_pgn_pt_x + CGAL::to_double(x)) /2;
-     double mid_y = (last_pgn_pt_y + CGAL::to_double(y)) /2;
-
-     int mid_point_x_pixel = widget->x_pixel(mid_x);
-     int mid_point_y_pixel = widget->y_pixel(mid_y);
-
-     QPoint qp(mid_point_x_pixel, mid_point_y_pixel);
-     QPoint qq = widget->mapToGlobal(qp);
-     QCursor::setPos(qq);
-     m_ignore_move_event = true;
-
-     m_is_circ_mode = true;
-
-  };//end mouseDoubleClickEvent
-
-
-  void activating()
-  {
-    m_oldcursor = widget->cursor();
-    widget->setCursor(m_cursor);
-    m_oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-  };
-
-  void deactivating()
-  {
-    m_pgn.clear();
-    m_active = false;
-    m_first_time = true;
-    widget->setCursor(m_oldcursor);
-    widget->setFocusPolicy(m_oldpolicy);
-    widget->redraw();
-  };
-
-  private:
-
-  bool is_simple(bool is_last_curve = false)
-  {
-    if(this->m_pgn.size() > 0)
-    {
-      X_monotone_curve_2  rubber_curve;
-      if(!m_is_circ_mode)
-      {
-        if(is_last_curve)
-        {
-          const Arc_point_2& first_point = m_pgn.curves_begin()->source();
-          CGAL_assertion(!first_point.x().is_extended() && !first_point.y().is_extended());
-          FT xs = first_point.x().alpha();
-          FT ys = first_point.y().alpha();
-          rubber_curve = X_monotone_curve_2(m_last_of_poly, Point_2(xs, ys));
-          return(does_curve_disjoint_interior(rubber_curve, is_last_curve));
-        }
-        else
-        {
-          rubber_curve = X_monotone_curve_2(m_last_of_poly, m_rubber_old);
-          return(does_curve_disjoint_interior(rubber_curve, is_last_curve));
-        }
-      }
-      else
-      {
-        // circ mode
-        Traits_2 tr;
-        typename Traits_2::Make_x_monotone_2 make_x = tr.make_x_monotone_2_object();
-        std::vector<Object> xcurves_vec;
-        xcurves_vec.reserve(3);
-        make_x(m_old_arc, std::back_inserter(xcurves_vec));
-        for(unsigned int i=0; i<xcurves_vec.size(); ++i)
-        {
-          X_monotone_curve_2 cv_arc;
-          CGAL::assign(cv_arc, xcurves_vec[i]);
-          if(!does_curve_disjoint_interior(cv_arc, is_last_curve))
-            return false;
-        }
-        return true;
-      }
-    }
-    return true;
-  }
-
-  bool does_curve_disjoint_interior(const X_monotone_curve_2& rubber_curve,
-                                    bool is_last_curve)
-  {
-
-    Curve_iterator before_last_cv = this->m_pgn.curves_end();
-      --before_last_cv;
-
-      Traits_2 tr;
-      typename Traits_2::Intersect_2 intersect_func = tr.intersect_2_object();
-      Curve_iterator it = this->m_pgn.curves_begin();
-
-      std::list<CGAL::Object> obj_list;
-
-      intersect_func(rubber_curve, *it, std::back_inserter(obj_list));
-      if(is_last_curve)
-      {
-        //the last curve will intersect the first one at their common
-        // end point.
-
-        if(m_pgn.size() == 1)
-        {
-          if(m_pgn.curves_begin()->is_linear())
-            return false;
-          //the polygon can have one circular arc (and now we close it)
-          CGAL_assertion(obj_list.size() == 2);
-          return true;
-        }
-        if(obj_list.size() > 1)
-          return false;
-        std::pair<Arc_point_2, unsigned int> inter_point;
-        CGAL_assertion(obj_list.size() == 1);
-        if(! CGAL::assign(inter_point, obj_list.front()))
-          return false;
-        obj_list.clear();
-      }
-      else
-      {
-        if(m_pgn.size() == 1)
-        {
-          // its the second curve,
-          //can intersect the first one at the common end point.
-
-          if(obj_list.empty())
-            return true; // no intersections at all
-          if(obj_list.size() == 1)
-          {
-            std::pair<Arc_point_2, unsigned int> inter_pt;
-            bool succ = CGAL::assign(inter_pt, obj_list.front());
-            if(!succ)
-              return false; // overlap curves!!
-
-            Traits_2 tr;
-            // make sure that the intersection point is equal to the curve target
-            return (tr.equal_2_object()(inter_pt.first, it->target()));
-          }
-          return false;
-        }
-        // its not the last curve (or the secind), cannot intersect the first curve.
-        if(!obj_list.empty())
-        {
-         return false;
-        }
-      }
-      ++it;
-      for(; it != before_last_cv; ++it)
-      {
-        intersect_func(rubber_curve, *it, std::back_inserter(obj_list));
-        if(!obj_list.empty())
-          return false;
-      }
-      //if I'm out of this means that all the edges,
-      //didn't intersect the last one
-      intersect_func(rubber_curve, *it, std::back_inserter(obj_list));
-      if(obj_list.empty())
-        return true;
-      if(obj_list.size() > 1)
-        return false;
-
-      std::pair<Arc_point_2, unsigned int> inter_point;
-      if(CGAL::assign(inter_point, obj_list.front()))
-      {
-        Traits_2 tr;
-        return (tr.equal_2_object()(rubber_curve.source(), it->target()));
-      }
-      return false;
-  }
-
-  };
-
-} // namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp
deleted file mode 100644
index 2f5b50e..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://guyzucke@scm.gforge.inria.fr/svn/cgal/trunk/Boolean_set_operations_2/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h $
-// $Id: Qt_widget_locate_layer.h 37003 2007-03-10 16:55:12Z spion $
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include "Qt_widget_locate_layer.h"
-#include "boolean_operations_2.h"
-
-void Qt_widget_locate_layer::draw()
-{
-	widget->lock();
-	const Polygon_2& outer_boundary = m_pgn.outer_boundary();
-	*widget << CGAL::YELLOW;
-	if(m_found_pgn)
-   {
-     if(outer_boundary.is_empty())
-     {
-       // no boundary -> unbounded polygon
-       Iso_rectangle rect(Point_2(widget->x_min(), widget->y_min()),
-                         Point_2(widget->x_max(), widget->y_max()));
-       *widget << rect;
-     }
-     else
-       *widget << outer_boundary;
-     for(Hole_const_iterator hit = m_pgn.holes_begin();
-         hit != m_pgn.holes_end();
-         ++hit)
-     {
-       *widget << *hit;
-     }
-   }
-   widget->unlock();
-} //end draw 
-
-void Qt_widget_locate_layer::mousePressEvent(QMouseEvent *e)
-{
-	if(e->button() == Qt::LeftButton)
-   {
-      Coord_type x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      typedef  Traits::Point_2                   Arc_point_2;
-      Arc_point_2 query_pt(x, y);
-      if(m_window->red_active)
-        m_found_pgn = m_window->red_set.locate(query_pt, m_pgn);
-      else
-        m_found_pgn = m_window->blue_set.locate(query_pt, m_pgn);
-      widget->redraw();
-    }
-} //end mousePressEvent
-
-void Qt_widget_locate_layer::activating()
-{
-    m_oldcursor = widget->cursor();
-    widget->setCursor(m_cursor);
-    m_oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-}
-
-void Qt_widget_locate_layer::deactivating()
-{
-    reset();
-    widget->setCursor(m_oldcursor);
-    widget->setFocusPolicy(m_oldpolicy);
-    widget->redraw();
-}
-
-void Qt_widget_locate_layer::reset()
-{
-    m_found_pgn = false;
-    m_pgn.clear();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h
deleted file mode 100644
index ea9cc95..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_LOCATE_LAYER_H
-#define CGAL_QT_WIDGET_LOCATE_LAYER_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qcursor.h>
-
-#include "typedefs.h"
-#include "Qt_widget_circ_polygon.h"
-
-class MyWindow;
-
-class  Qt_widget_locate_layer : public CGAL::Qt_widget_layer
-{
-    //Data members
-    Polygon_with_holes     m_pgn;
-
-    QWidget::FocusPolicy  m_oldpolicy;
-    QCursor               m_oldcursor;
-    QCursor               m_cursor;
-	  	
-    bool m_found_pgn;
-	 MyWindow*				 m_window;
-
-  public:
-		/*needed to add window param, so set's are recognized
-		replaced QObject* parent parameter type
-		should be possible to use the inherited Qt_widget* widget
-		member field and not a seperate one  */
-    Qt_widget_locate_layer(MyWindow* parent = 0, const QCursor c=QCursor(Qt::crossCursor),
-                           const char* name = 0 )
-      : CGAL::Qt_widget_layer((QObject*)parent, name),
-        m_cursor(c),
-        m_found_pgn(false),
-        m_window(parent)
-    {}
-
-    void draw();
-
-  protected:
-
-  void mousePressEvent(QMouseEvent *e);
-  void activating();
-  void deactivating();
-
-  public:
-  void reset();
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.cpp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.cpp
deleted file mode 100644
index ce2a85e..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.cpp
+++ /dev/null
@@ -1,1178 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-// 
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-// 
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-
-
-#include <CGAL/basic.h>
- 
-
-#include <fstream>
-#include <string>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/iterator.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_help_window.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-#include <CGAL/IO/pixmaps/voronoi.xpm>
- 
-#include "boolean_operations_2.h"
-#include "typedefs.h"
-#include "boolean_operations_2_toolbar.h"
-#include "Qt_widget_circ_polygon.h"
-
-#include <qplatinumstyle.h>
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h> 
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qfiledialog.h>
-#include <qtimer.h> 
-#include <qstatusbar.h>
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-
- 
-#include "Qt_widget_X_monotone_circle_segment_2.h"
-#include "icons/union.xpm"
-#include "icons/intersection.xpm"
-#include "icons/diff_PQ.xpm"
-#include "icons/diff_QP.xpm"
-#include "icons/symm_diff.xpm"
-#include "icons/make_P.xpm"
-#include "icons/make_Q.xpm"
-#include "icons/comp_P.xpm"
-#include "icons/comp_Q.xpm" 
-#include "icons/del_P.xpm"
-#include "icons/del_Q.xpm"
-#include "icons/refresh.xpm"
-#include "icons/mink_sum.xpm"
-
-#include <CGAL/IO/Dxf_bsop_reader.h>
-#include <qdeepcopy.h>
-//#include<string>
-
-const QString my_title_string("Boolean operations on polygons ");
-
-//global variable to aid naming windows 
-int winsOpened=2;
-
-Qt_layer_show_ch::Qt_layer_show_ch(MyWindow* myWind) {
-	myWin=myWind;
-}
- 
-// this method overrides the virtual method 'draw()' of Qt_widget_layer
-void Qt_layer_show_ch::draw()
-{
-  widget->lock(); // widget has to be locked before drawing
-  RasterOp old_rasterop = widget->rasterOp();
-  widget->get_painter().setRasterOp(XorROP);
-  widget->setFilled (true);
-  widget->setFillColor (CGAL::RED);  
-  *widget <<  CGAL::BLACK; 
-  std::list<Polygon_with_holes> red_pgns_list;
-  myWin->red_set.polygons_with_holes(std::back_inserter(red_pgns_list));
-  std::list<Polygon_with_holes>::iterator itpgn1 = red_pgns_list.begin();
-
-  while (itpgn1 != red_pgns_list.end())
-    {
-      const Polygon_with_holes& pgn_with_hole = *itpgn1;
-      const Polygon_2& outer_boundary = pgn_with_hole.outer_boundary();
-      if (outer_boundary.is_empty()) 
-	{
-	  // no boundary -> unbounded polygon
-	  Iso_rectangle rect(Point_2(widget->x_min(), widget->y_min()),
-			     Point_2(widget->x_max(), widget->y_max()));
-	  *widget << rect;
-	}
-      else
-	*widget << outer_boundary;
-
-      for(Hole_const_iterator hit = pgn_with_hole.holes_begin();
-          hit != pgn_with_hole.holes_end();
-          ++hit)
-	{
-	  *widget << *hit;
-	}
-      ++itpgn1;
-    }
-
-
-  widget->setFilled (true);
-  widget->setFillColor (CGAL::BLUE);
-
-  std::list<Polygon_with_holes> blue_pgns_list;
-  myWin->blue_set.polygons_with_holes(std::back_inserter(blue_pgns_list));
-  std::list<Polygon_with_holes>::iterator itpgn2 = blue_pgns_list.begin();
-
-  while (itpgn2 != blue_pgns_list.end())
-    {
-      const Polygon_with_holes& pgn_with_hole = *itpgn2;
-      const Polygon_2& outer_boundary = pgn_with_hole.outer_boundary();
-      if (outer_boundary.is_empty())
-	{
-	  // no boundary -> unbounded polygon
-	  Iso_rectangle rect(Point_2(widget->x_min(), widget->y_min()),
-			     Point_2(widget->x_max(), widget->y_max()));
-	  *widget << rect;
-	}
-      else
-	{
-	  *widget << outer_boundary;
-	}
-
-      for(Hole_const_iterator hit = pgn_with_hole.holes_begin();
-          hit != pgn_with_hole.holes_end();
-          ++hit)
-	{
-	  *widget << *hit;
-	}
-      ++itpgn2;
-    }
-  widget->get_painter().setRasterOp(old_rasterop);
-  widget->setFilled (false);
-  widget->unlock(); // widget have to be unlocked when finished drawing
-}
-
-/* The QMainWindow class provides a main application window,
- *  with a menu bar, dock windows (e.g. for toolbars), and a status bar
- */
-
-// constructor
-MyWindow::MyWindow(int w, int h) : 
-  red_active(false),
-  red_set(*(new Polygon_set)),
-  blue_set(*(new Polygon_set)),
-  res_set(*(new Polygon_set))										  
-{
-  widget = new CGAL::Qt_widget(this); //Constructs a widget which is a child of this window
-
-
-  /* Sets the central widget for this main window to w.
-   * The central widget is surrounded by the left, top, right and bottom dock areas.
-   * The menu bar is above the top dock area
-   */
-  setCentralWidget(widget);
-
-  file_name= QString::null;
-
-  //create a timer for checking if somthing changed
-  QTimer *timer = new QTimer( this ); // constructs a timer whose parent is this window
-
-  connect( timer, SIGNAL(timeout()),
-           this, SLOT(timer_done()) );  // connects the timer to the window
-  timer->start( 200, FALSE ); // Starts the timer with a msec milliseconds timeout
-
-  // file menu
-  QPopupMenu * file = new QPopupMenu( this );
-  menuBar()->insertItem( "&File", file );
-  file->insertItem("&New", this, SLOT(new_instance()), CTRL+Key_N);
-  file->insertItem("New &Window", this, SLOT(new_window()), CTRL+Key_W);
-  file->insertSeparator();
-  file->insertItem("&Open Linear Polygon file", this, SLOT(open_linear_polygon_file()),CTRL+Key_O);
-  file->insertItem("&Open DXF file", this, SLOT(open_dxf_file()),CTRL+Key_D);
-  file->insertSeparator();
-  //file->insertItem("&Save",this ,SLOT(save_file()),CTRL+Key_S);
-  //file->insertItem("&Save as",this ,SLOT(save_file_as()));
-  file->insertSeparator();
-  file->insertItem("Print", widget, SLOT(print_to_ps()), CTRL+Key_P);
-  file->insertSeparator();
-  file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_X );
-  file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
-
-  // help menu
-  QPopupMenu * help = new QPopupMenu( this );
-  menuBar()->insertItem( "&Help", help );
-  help->insertItem("How To", this, SLOT(howto()), Key_F1);
-  help->insertSeparator();
-  help->insertItem("&About", this, SLOT(about()), CTRL+Key_A );
-  help->insertItem("About &Qt", this, SLOT(aboutQt()) );
-
-  //the standard toolbar
-  stoolbar = new CGAL::Qt_widget_standard_toolbar (widget, this, "ST");
-
-  radiotoolbar = new QToolBar(this, "polygon type");
-  blue_pgn = new QRadioButton ("Blue", radiotoolbar);
-  blue_pgn->toggle();
-  red_pgn = new QRadioButton("Red", radiotoolbar);
-  radio_group = new QVButtonGroup(this,"Radios");
-  radio_group->insert(blue_pgn);
-  radio_group->insert(red_pgn);
-  radio_group->setRadioButtonExclusive(true);
-
-
-  connect(blue_pgn, SIGNAL(toggled (bool)),
-	  this, SLOT(radio_selected()));
-  connect(red_pgn, SIGNAL(toggled (bool)),
-	  this, SLOT(radio_selected()));
-
-
-  //layers
-  //widget->attach(&testlayer);
-
-  //the new tools toolbar
-  newtoolbar = new Tools_toolbar(widget, this);
-
-  // voronoi toolbar
-  bops_toolbar = new QToolBar(this, "Boolean operations");
-
-  QIconSet set0(QPixmap( (const char**)intersection_xpm ),
-		QPixmap( (const char**)intersection_xpm ));
-
-  intersection_but = new QToolButton(bops_toolbar, "Boolean operations");
-  intersection_but->setAutoRaise(TRUE);
-
-  intersection_but->setIconSet(set0);
-  intersection_but->setTextLabel("Intersection ");
-  connect(intersection_but,SIGNAL(pressed()),
-	  this, SLOT(perform_intersection()));
-
-  QIconSet set1(QPixmap( (const char**)union_xpm ),
-		QPixmap( (const char**)union_xpm ));
-
-  bops_toolbar->addSeparator();
-  union_but = new QToolButton(bops_toolbar, "Boolean operations");
-  union_but->setAutoRaise(TRUE);
-
-  union_but->setIconSet(set1);
-  union_but->setTextLabel("Union ");
-  connect(union_but,SIGNAL(pressed()),
-	  this, SLOT(perform_union()));
-
-  QIconSet set2(QPixmap( (const char**)diff_PQ_xpm ),
-		QPixmap( (const char**)diff_PQ_xpm ));
-
-  bops_toolbar->addSeparator();
-  diff_but2 = new QToolButton(bops_toolbar, "Boolean operations");
-  diff_but2->setAutoRaise(TRUE);
-
-  diff_but2->setIconSet(set2);
-  diff_but2->setTextLabel("Difference between Blue and Red");
-  connect(diff_but2, SIGNAL(pressed()),
-	  this, SLOT(perform_diff2()));
-
-  QIconSet set3(QPixmap( (const char**)diff_QP_xpm ),
-		QPixmap( (const char**)diff_QP_xpm ));
-
-  bops_toolbar->addSeparator();
-  diff_but = new QToolButton(bops_toolbar, "Boolean operations");
-  diff_but->setAutoRaise(TRUE);
-
-  diff_but->setIconSet(set3);
-  diff_but->setTextLabel("Difference between Red and Blue");
-  connect(diff_but, SIGNAL(pressed()),
-	  this, SLOT(perform_diff()));
-
-  QIconSet set4(QPixmap( (const char**)symm_diff_xpm ),
-		QPixmap( (const char**)symm_diff_xpm ));
-  bops_toolbar->addSeparator();
-
-  symm_diff_but = new QToolButton(bops_toolbar, "Boolean operations");
-  symm_diff_but->setAutoRaise(TRUE);
-
-  symm_diff_but->setIconSet(set4);
-  symm_diff_but->setTextLabel("Symmetric Difference ");
-  connect(symm_diff_but, SIGNAL(pressed()),
-	  this, SLOT(perform_symm_diff()));
-
-  QIconSet set12(QPixmap( (const char**)mink_sum_xpm ),
-		 QPixmap( (const char**)mink_sum_xpm ));
-  bops_toolbar->addSeparator();
-  mink_sum_but = new QToolButton(bops_toolbar, "Boolean operations");
-  mink_sum_but->setAutoRaise(TRUE);
-  mink_sum_but->setIconSet(set12);
-  mink_sum_but->setTextLabel("Minkowski Sum ");
-  connect(mink_sum_but, SIGNAL(pressed()),
-	  this, SLOT(perform_mink_sum()));
-
-  QIconSet set5(QPixmap( (const char**)comp_P_xpm ),
-		QPixmap( (const char**)comp_P_xpm ));
-  bops_toolbar->addSeparator();
-
-  blue_complement_but = new QToolButton(bops_toolbar, "Boolean operations");
-  blue_complement_but->setAutoRaise(TRUE);
-
-  blue_complement_but->setIconSet(set5);
-  blue_complement_but->setTextLabel("Blue Complement ");
-  connect(blue_complement_but, SIGNAL(pressed()),
-	  this, SLOT(perform_blue_complement()));
-
-  QIconSet set6(QPixmap( (const char**)comp_Q_xpm ),
-		QPixmap( (const char**)comp_Q_xpm ));
-  bops_toolbar->addSeparator();
-
-  red_complement_but = new QToolButton(bops_toolbar, "Boolean operations");
-  red_complement_but->setAutoRaise(TRUE);
-
-  red_complement_but->setIconSet(set6);
-  red_complement_but->setTextLabel("Red Complement ");
-  connect(red_complement_but, SIGNAL(pressed()),
-	  this, SLOT(perform_red_complement()));
-
-
-  QIconSet set7(QPixmap( (const char**)make_P_xpm ),
-		QPixmap( (const char**)make_P_xpm ));
-  bops_toolbar->addSeparator();
-  make_res_blue_but = new QToolButton(bops_toolbar, "Boolean operations");
-  make_res_blue_but->setAutoRaise(TRUE);
-
-
-  make_res_blue_but->setIconSet(set7);
-  make_res_blue_but->setTextLabel("Make Result Blue");
-  connect(make_res_blue_but,SIGNAL(pressed()),
-	  this, SLOT(make_res_blue()));
-
-  QIconSet set8(QPixmap( (const char**)make_Q_xpm ),
-		QPixmap( (const char**)make_Q_xpm ));
-  bops_toolbar->addSeparator();
-  make_res_red_but = new QToolButton(bops_toolbar, "Boolean operations");
-  make_res_red_but->setAutoRaise(TRUE);
-
-
-  make_res_red_but->setIconSet(set8);
-  make_res_red_but->setTextLabel("Make Result Red");
-  connect(make_res_red_but,SIGNAL(pressed()),
-	  this, SLOT(make_res_red()));
-
-  QIconSet set9(QPixmap( (const char**)refresh_xpm ),
-		QPixmap( (const char**)refresh_xpm ));
-  bops_toolbar->addSeparator();
-
-  refresh_but = new QToolButton(bops_toolbar, "Boolean operations");
-  refresh_but->setAutoRaise(TRUE);
-
-  refresh_but->setIconSet(set9);
-  refresh_but->setTextLabel("Refresh ");
-  connect(refresh_but,SIGNAL(pressed()),
-	  this, SLOT(refresh()));
-
-  QIconSet set10(QPixmap( (const char**)del_P_xpm ),
-		 QPixmap( (const char**)del_P_xpm ));
-  bops_toolbar->addSeparator();
-
-  delete_blue_but = new QToolButton(bops_toolbar, "Boolean operations");
-  delete_blue_but->setAutoRaise(TRUE);
-
-  delete_blue_but->setIconSet(set10);
-  delete_blue_but->setTextLabel("Delete Blue Polygons");
-  connect(delete_blue_but,SIGNAL(pressed()),
-	  this, SLOT(delete_blue_polygons()));
-
-
-  QIconSet set11(QPixmap( (const char**)del_Q_xpm ),
-		 QPixmap( (const char**)del_Q_xpm ));
-  bops_toolbar->addSeparator();
-
-  delete_red_but = new QToolButton(bops_toolbar, "Boolean operations");
-  delete_red_but->setAutoRaise(TRUE);
-
-  delete_red_but->setIconSet(set11);
-  delete_red_but->setTextLabel("Delete Red Polygons");
-  connect(delete_red_but,SIGNAL(pressed()),
-	  this, SLOT(delete_red_polygons()));
-
-
-
-
-  *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor (CGAL::BLACK);
-
-  resize(w,h);
-  widget->set_window(-1, 1, -1, 1);
-  widget->setMouseTracking(TRUE);
-
-  //connect the widget to the main function that receives the objects
-  connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-	  this, SLOT(get_new_object(CGAL::Object)));
-
-  //application flag stuff
-  old_state = 0;
-  current_state = 1;
-  red_active = false;
-  red_set.clear();
-  blue_set.clear();
-  res_set.clear();
-}
-
-
-void MyWindow::something_changed(){current_state++;}
-/*not necessary if rado toggle is not const
-  void change_grp_color(int color) {
-  if (color == 1)
-  red_active=true;
-  else
-  red_active=false;   
-  }*/ 
-
-
-   
-bool MyWindow::write_to_file(QString /* str */)
-{
-  /*std::ofstream out_file(str);
-    if (!out_file.is_open())
-    return false;
-
-    std::list<Polygon_with_holes> red_pgns_list;
-    red_set.polygons_with_holes(std::back_inserter(red_pgns_list));
-    int num_of_red_pgns = red_pgns_list.size();
-    out_file << num_of_red_pgns << std::endl;
-    std::list<Polygon_with_holes>::iterator red_itr;
-    for(red_itr = red_pgns_list.begin() ; red_itr != red_pgns_list.end() ; ++red_itr)
-    {
-    const Polygon_with_holes& pgn = *red_itr;
-    out_file<< pgn << std::endl;
-    }
-
-    std::list<Polygon_with_holes> blue_pgns_list;
-    int num_of_blue_pgns = blue_pgns_list.size();
-    out_file << num_of_blue_pgns << std::endl;
-    std::list<Polygon_with_holes>::iterator blue_itr;
-    for(blue_itr = blue_pgns_list.begin() ; blue_itr != blue_pgns_list.end() ; ++blue_itr)
-    {
-    const Polygon_with_holes& pgn = *blue_itr;
-    out_file<< pgn << std::endl;
-    }
-    out_file.close();
-    return true;*/
-  return true;
-}
-
-template <class PgnItr>
-void MyWindow::draw_result(PgnItr begin, PgnItr end)
-{
-  widget->lock();
-  widget->clear();
-  widget->setFilled (true);
-  widget->setColor(CGAL::GREEN);
-
-  for(PgnItr itr = begin; itr != end; ++itr)
-    {
-      const Polygon_with_holes& pgn_with_hole = *itr;
-      const Polygon_2& outer_boundary = pgn_with_hole.outer_boundary();
-      widget->setFillColor (CGAL::ORANGE);
-      if (outer_boundary.is_empty())
-	{
-	  // no boundary -> unbounded polygon
-	  Iso_rectangle rect(Point_2(widget->x_min(), widget->y_min()),
-			     Point_2(widget->x_max(), widget->y_max()));
-	  *widget << rect;
-	}
-      else
-	*widget << outer_boundary;
-
-      widget->setFillColor (CGAL::BLACK) ;
-      for(Hole_const_iterator hit = pgn_with_hole.holes_begin();
-	  hit != pgn_with_hole.holes_end();
-	  ++hit)
-	{
-	  *widget << *hit;
-	}
-    }
-
-  widget->setFilled (false);
-  widget->unlock();
-}
-
-void MyWindow::open_dxf_file()
-{
-
-  QString s = QFileDialog::getOpenFileName(file_name,
-					   QString::null,
-					   this,
-					   "open file dialog",
-					   "Choose a file" );
-  if (s==QString::null)
-    return;
-  file_name=s;
-
-  std::ifstream in_file(s.ascii());
-  if (!in_file.is_open())
-    {
-      QMessageBox::warning( widget,"Open","Can't open file");
-      return ;
-    }
-  bool are_simple;
-  int answer = 0;
-  answer =
-    QMessageBox::question(this, QString("Open file"),
-			  QString("Are all polygons simple and without holes?"),
-			  QString("Yes"), QString("No"), QString::null, 0 , 0);
-  if (answer == 0)
-    are_simple = true;
-  else
-    are_simple = false;
-
-  CGAL::Bbox_2 box = CGAL::Bbox_2 (widget->x_min(), widget->y_min(),
-				   widget->x_max(), widget->y_max());
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  widget->lock();
-  widget->clear_history();
-
-  CGAL::Dxf_bsop_reader<Kernel> reader;
-  std::vector<Polygon_2>  circ_polygons;
-  std::vector<Polygon_with_holes>  circ_polygons_with_holes;
-  reader(in_file,
-	 std::back_inserter(circ_polygons),
-	 std::back_inserter(circ_polygons_with_holes),
-	 !are_simple);
-
-  if (red_active)
-    {
-      red_set.join(circ_polygons.begin(),
-		   circ_polygons.end(),
-		   circ_polygons_with_holes.begin(),
-		   circ_polygons_with_holes.end());
-    }
-  else
-    {
-      blue_set.join(circ_polygons.begin(),
-		    circ_polygons.end(),
-		    circ_polygons_with_holes.begin(),
-		    circ_polygons_with_holes.end());
-    }
-
-  if (!circ_polygons.empty())
-    {
-      box = circ_polygons.front().bbox();
-    }
-  else if (!circ_polygons_with_holes.empty())
-    {
-      box = circ_polygons_with_holes.front().outer_boundary().bbox();
-    }
-
-  std::vector<Polygon_2>::iterator itr1 = circ_polygons.begin();
-  for(itr1 = circ_polygons.begin();
-      itr1 != circ_polygons.end();
-      ++itr1)
-    {
-      box = box + itr1->bbox();
-    }
-  std::vector<Polygon_with_holes>::iterator itr2;
-
-  for (itr2 = circ_polygons_with_holes.begin();
-       itr2 != circ_polygons_with_holes.end();
-       ++itr2)
-    {
-      box = box + itr2->outer_boundary().bbox();
-    }
-
-  widget->set_window(box.xmin(),
-		     box.xmax(),
-		     box.ymin(),
-		     box.ymax());
-  widget->unlock();
-  newtoolbar->reset();
-  something_changed();
-  widget->setCursor(old);
-}
-
-void MyWindow::open_linear_polygon_file()
-{
-
-  QString s = QFileDialog::getOpenFileName(file_name,
-					   QString::null,
-					   this,
-					   "open file dialog",
-					   "Choose a file" );
-  if (s==QString::null)
-    return;
-  file_name=s;
-
-  std::ifstream in_file(s.ascii());
-  if (!in_file.is_open())
-    {
-      QMessageBox::warning( widget,"Open","Can't open file");
-      return ;
-    }
-
-  CGAL::Bbox_2 box = CGAL::Bbox_2 (widget->x_min(), widget->y_min(),
-				   widget->x_max(), widget->y_max());
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  widget->lock();
-  widget->clear_history();
-
-  Linear_polygon_2 pgn;
-  in_file >> pgn;
-  if (pgn.is_empty())
-    {
-      widget->unlock();
-      widget->setCursor(old);
-      return;
-    }
-  if (pgn.orientation() != CGAL::COUNTERCLOCKWISE)
-    pgn.reverse_orientation();
-
-  const Polygon_2& circ_pgn = linear_2_circ(pgn);
-
-
-  if (red_active)
-    red_set.join(circ_pgn);
-  else
-    blue_set.join(circ_pgn);
-
-
-  box = box + circ_pgn.bbox();
-  widget->set_window(box.xmin(),
-		     box.xmax(),
-		     box.ymin(),
-		     box.ymax());
-  widget->unlock();
-  newtoolbar->reset();
-  something_changed();
-  widget->setCursor(old);
-}
-
-
-/*void save_file()
-  {
-  if (file_name==QString::null)
-  save_file_as();
-  else
-  {
-  if (!write_to_file(file_name))
-  QMessageBox::warning( widget,"Save","Can't write to file");
-  }
-  }*/
-
-
-/*void save_file_as()
-  {
-  QString s = QFileDialog::getSaveFileName(
-  "./",
-  QString::null,
-  this,
-  "save file dialog",
-  "Choose a filename to save under" );
-  if (s==QString::null)
-  return;
-  if (!write_to_file(s))
-  {
-  QMessageBox::warning( widget,"Save","Can't write to file");
-  return ;
-  }
-  file_name=s;
-  }*/
-
-
-
-void MyWindow::new_instance()
-{
-  newtoolbar->deactivate();
-  widget->lock();
-  file_name = QString::null;
-
-  red_set.clear();
-  blue_set.clear();
-  widget->clear_history();
-  widget->set_window(-1.1, 1.1, -1.1, 1.1);
-  // set the Visible Area to the Interval
-  widget->unlock();
-
-  something_changed();
-}
-
-void MyWindow::radio_selected() //const
-{
-  if (red_pgn->isOn())
-    red_active = true;
-  else
-    if (blue_pgn->isOn())
-      red_active = false;
-}
-
-
-
-void MyWindow::perform_intersection()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = red_set;
-  res_set.intersection(blue_set);
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_union()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = red_set;
-  res_set.join(blue_set);
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_diff()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = red_set;
-  res_set.difference(blue_set);
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_diff2()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = blue_set;
-  res_set.difference(red_set);
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_symm_diff()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = red_set;
-  res_set.symmetric_difference(blue_set);
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_red_complement()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = red_set;
-  res_set.complement();
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::perform_blue_complement()
-{
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  std::list<Polygon_with_holes> res_pgns;
-  res_set = blue_set;
-  res_set.complement();
-  res_set.polygons_with_holes(std::back_inserter(res_pgns));
-  newtoolbar->reset();
-
-  draw_result(res_pgns.begin(), res_pgns.end());
-  widget->setCursor(old);
-}
-
-void MyWindow::make_res_red()
-{
-  if (res_set.is_empty())
-    {
-      int answer = 0;
-      answer = QMessageBox::warning(this, "Store result",
-                                    QString( "Result is empty, all polygons will be deleted\n continue anyway?\n" ),
-                                    "&Yes", "&No", QString::null, 1, 1 );
-      if (answer == 1)
-	{
-	  // answer in 'no'
-	  make_res_red_but->setDown(FALSE);
-	  return;
-	}
-      make_res_red_but->setDown(FALSE);
-    }
-
-  red_set = res_set;
-  res_set.clear();
-  blue_set.clear();
-  newtoolbar->reset();
-  something_changed();
-}
-
-void MyWindow::make_res_blue()
-{
-  if (res_set.is_empty())
-    {
-      int answer = 0;
-      answer = QMessageBox::warning(this, "Store result",
-                                    QString( "Result is empty, all polygons will be deleted\n continue anyway?\n" ),
-                                    "&Yes", "&No", QString::null, 1, 1 );
-      if (answer == 1)
-	{
-	  // answer in 'no'
-	  make_res_blue_but->setDown(FALSE);
-	  return;
-	}
-      make_res_blue_but->setDown(FALSE);
-    }
-  blue_set = res_set;
-  res_set.clear();
-  red_set.clear();
-  newtoolbar->reset();
-  something_changed();
-}
-
-void MyWindow::perform_mink_sum()
-{
-  if (red_set.number_of_polygons_with_holes() > 1 ||
-     blue_set.number_of_polygons_with_holes() > 1)
-    {
-      mink_sum_warning();
-      return;
-    }
-
-  Polygon_with_holes red_p_wh;
-  CGAL::Oneset_iterator<Polygon_with_holes> oi1(red_p_wh);
-  red_set.polygons_with_holes(oi1);
-  if (red_p_wh.has_holes() || red_p_wh.is_unbounded())
-    {
-      mink_sum_warning();
-      return;
-    }
-  const Polygon_2& red_p = red_p_wh.outer_boundary();
-
-  Polygon_with_holes blue_p_wh;
-  CGAL::Oneset_iterator<Polygon_with_holes> oi2(blue_p_wh);
-  blue_set.polygons_with_holes(oi2);
-  if (blue_p_wh.has_holes() || blue_p_wh.is_unbounded())
-    {
-      mink_sum_warning();
-      return;
-    }
-  QCursor old = widget->cursor();
-  widget->setCursor(Qt::WaitCursor);
-  const Polygon_2& blue_p = blue_p_wh.outer_boundary();
-  if (is_linear(red_p) && is_linear(blue_p))
-    {
-      const Linear_polygon_2& linear_red_p  = circ_2_linear(red_p);
-      const Linear_polygon_2& linear_blue_p = circ_2_linear(blue_p);
-
-      const Linear_polygon_with_holes_2& res_p =
-        CGAL::minkowski_sum_2(linear_red_p, linear_blue_p);
-
-      Polygon_with_holes res_p_wh  = linear_2_circ(res_p);
-      res_set.clear();
-      res_set.insert(res_p_wh);
-      newtoolbar->reset();
-      std::list<Polygon_with_holes> res_pgns;
-      res_pgns.push_back(res_p_wh);
-      draw_result(res_pgns.begin(), res_pgns.end());
-      widget->setCursor(old);
-    }
-  else if (is_disc(red_p) && is_linear(blue_p))
-    {
-      const Linear_polygon_2& linear_blue_p = circ_2_linear(blue_p);
-      const Polygon_with_holes& res_p_wh =
-        CGAL::approximated_offset_2 (linear_blue_p, get_radius(red_p), 0.00001);
-
-      res_set.clear();
-      res_set.insert(res_p_wh);
-      newtoolbar->reset();
-      std::list<Polygon_with_holes> res_pgns;
-      res_pgns.push_back(res_p_wh);
-      draw_result(res_pgns.begin(), res_pgns.end());
-      widget->setCursor(old);
-    }
-  else if (is_disc(blue_p) && is_linear(red_p))
-    {
-      const Linear_polygon_2& linear_red_p = circ_2_linear(red_p);
-      const Polygon_with_holes& res_p_wh =
-        CGAL::approximated_offset_2 (linear_red_p, get_radius(blue_p), 0.00001);
-
-      res_set.clear();
-      res_set.insert(res_p_wh);
-      newtoolbar->reset();
-      std::list<Polygon_with_holes> res_pgns;
-      res_pgns.push_back(res_p_wh);
-      draw_result(res_pgns.begin(), res_pgns.end());
-      widget->setCursor(old);
-    } 
-  else
-    {
-      mink_sum_warning();
-      widget->setCursor(old);
-      return;
-    }
-}
-
-void MyWindow::mink_sum_warning()
-{
-  QMessageBox::warning(this,
-		       "Minkowski Sum",
-		       QString( "Minkowski sum can be performed on two linear polygons without holes\n\
- or on a linear polygon without holes and a disc\n" ),
-		       "&Ok");
-  mink_sum_but->setDown(FALSE);
-}
-
-bool MyWindow::is_linear(const Polygon_2& pgn)
-{
-  typedef Polygon_2::Curve_const_iterator    Curve_const_iterator;
-  for(Curve_const_iterator i = pgn.curves_begin();
-      i != pgn.curves_end();
-      ++i)
-    {
-      if (i->is_circular())
-        return false;
-    }
-  return true;
-}
-
-bool MyWindow::is_disc(const Polygon_2& pgn)
-{
-  if (pgn.size() != 2)
-    return false;
-
-  Polygon_2::Curve_const_iterator ci = pgn.curves_begin();
-
-  if (!ci->is_circular())
-    return false;
-
-  const Circle& c1 = ci->supporting_circle();
-  ++ci;
-  if (!ci->is_circular())
-    return false;
-
-  const Circle& c2 = ci->supporting_circle();
-
-  return ((c1.center() == c2.center()) &&
-	  (c1.squared_radius() == c2.squared_radius()));
-}
-
-Coord_type MyWindow::get_radius(const Polygon_2& pgn)
-{
-  CGAL_assertion(is_disc(pgn));
-  double r =
-    CGAL::sqrt(CGAL::to_double(pgn.curves_begin()->supporting_circle().squared_radius()));
-  return (Coord_type(r));
-}
-
-Linear_polygon_2 MyWindow::circ_2_linear(const Polygon_2& pgn)
-{
-  Linear_polygon_2 linear_pgn;
-  typedef Polygon_2::Curve_const_iterator    Curve_const_iterator;
-  for(Curve_const_iterator i = pgn.curves_begin();
-      i != pgn.curves_end();
-      ++i)
-    {
-      const Circular_point_2& circ_p = i->source();
-      linear_pgn.push_back(Point_2(circ_p.x().alpha(),
-                                   circ_p.y().alpha()));
-    }
-
-  return (linear_pgn);
-}
-
-Polygon_with_holes MyWindow::linear_2_circ(const Linear_polygon_with_holes_2& pgn)
-{
-  Polygon_with_holes p(linear_2_circ(pgn.outer_boundary()));
-
-  typedef Linear_polygon_with_holes_2::Hole_const_iterator
-    Hole_const_iterator;
-  for(Hole_const_iterator hi = pgn.holes_begin();
-      hi != pgn.holes_end();
-      ++hi)
-    {
-      p.add_hole(linear_2_circ(*hi));
-    }
-
-  return (p);
-}
-
-Polygon_2 MyWindow::linear_2_circ(const Linear_polygon_2& pgn)
-{
-  Polygon_2 p;
-  typedef Linear_polygon_2::Edge_const_iterator    Edge_const_iterator;
-  for(Edge_const_iterator ei = pgn.edges_begin();
-      ei != pgn.edges_end();
-      ++ei)
-    {
-      XCurve cv(ei->source(), ei->target());
-      p.push_back(cv);
-    }
-
-  return (p);
-}
-
-void MyWindow::refresh()
-{
-  newtoolbar->reset();
-  something_changed();
-}
-
-void MyWindow::delete_red_polygons()
-{
-  red_set.clear();
-  newtoolbar->reset();
-  something_changed();
-}
-
-void MyWindow::delete_blue_polygons()
-{
-  blue_set.clear();
-  newtoolbar->reset();
-  something_changed();
-}
-
-void MyWindow::get_new_object(CGAL::Object obj)
-{
-  Polygon_2 pgn;
-  if (CGAL::assign(pgn,obj))
-    {
-      if (pgn.orientation() == CGAL::CLOCKWISE)
-        pgn.reverse_orientation();
-      if (red_active)
-        red_set.join(pgn);
-      else
-        blue_set.join(pgn);
-      something_changed();
-    }
-  else
-    {
-      Circle circ;
-      if (CGAL::assign(circ, obj))
-	{
-	  if (circ.is_degenerate()) // radius == 0
-	    return;
-
-	  if (circ.orientation() == CGAL::CLOCKWISE)
-	    circ = circ.opposite();
-
-	  std::vector<CGAL::Object> xcurves;
-	  xcurves.reserve(2);
-	  Traits tr;
-	  Curve full_circ(circ);
-	  tr.make_x_monotone_2_object()(full_circ, std::back_inserter(xcurves));
-
-	  CGAL_assertion(xcurves.size() == 2);
-	  XCurve half_circ1;
-	  XCurve half_circ2;
-	  CGAL::assign(half_circ1, xcurves[0]);
-	  CGAL::assign(half_circ2, xcurves[1]);
-	  pgn.push_back(half_circ1);
-	  pgn.push_back(half_circ2);
-	  if (red_active)
-	    red_set.join(pgn);
-	  else
-	    blue_set.join(pgn);
-	  something_changed();
-	}
-    }
-}
-
-void MyWindow::about()
-{
-  QMessageBox::about( this, my_title_string,
-		      "This is a demo for boolean operations on polygons\n");
-
-}
-
-void MyWindow::aboutQt()
-{
-  QMessageBox::aboutQt( this, my_title_string );
-}
-
-void MyWindow::howto(){
-  QString home;
-  home = "help/index.html";
-  CGAL::Qt_help_window *help = new
-    CGAL::Qt_help_window(home, ".", 0, "help viewer");
-  help->resize(400, 400);
-  help->setCaption("Demo HowTo");
-  help->show();
-}
-void MyWindow::init_layer() 
-{ 
-	testlayer = new Qt_layer_show_ch(this);	
-	widget->attach(&(*testlayer));
-}
-
-void MyWindow::new_window(){
-  MyWindow *ed = new MyWindow(500, 500);
-  ed->init_layer();
-  //give a number to new window
-  //std::string str = "Window ";    
-  QString new_title = "Window ";  
-  //QDeepCopy<QString> new_title = my_title_string;  
-  QString curnum;
-  curnum.setNum(winsOpened,10);
-  new_title.append(curnum);
-  winsOpened++;
-  ed->setCaption(new_title);
-  ed->widget->clear_history();
-  ed->widget->set_window(-1.1, 1.1, -1.1, 1.1);
-  ed->show();
-  something_changed();
-}
-
-
-void MyWindow::timer_done()
-{
-  if (old_state!=current_state) {
-    widget->redraw();
-    old_state = current_state;
-  }
-}
-
-
-#include "boolean_operations_2.moc"
-
-int main(int argc, char **argv)
-{
-  QApplication app( argc, argv );
-  // physical window size  
-  MyWindow widget(600,400);
-  //initialize window's drawing layer  
-  widget.init_layer(); 
-  app.setMainWidget(&widget);
-  widget.setCaption(my_title_string);
-  widget.setMouseTracking(TRUE);
-  QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm);
-  widget.setIcon(cgal_icon);
-  widget.show();
-  //current_state = -1;
-  return app.exec();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.h
deleted file mode 100644
index 9759361..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2.h
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://guyzucke@scm.gforge.inria.fr/svn/cgal/trunk/Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2.cpp $
-// $Id: boolean_operations_2.cpp 37292 2007-03-20 07:53:53Z afabri $
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-
-// if QT is not installed, a message will be issued in runtime.
-#ifndef BOOLEAN_SET_OPERATIONS_2_H
-#define BOOLEAN_SET_OPERATIONS_2_H
-
-#include <CGAL/basic.h>
-
-#include <fstream>
-#include <string>
-
-#include "typedefs.h"
-
-#include <CGAL/IO/Qt_widget.h>
-#include "Qt_widget_circ_polygon.h"
-#include <CGAL/Bbox_2.h>
-#include <CGAL/iterator.h>
-
-
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_help_window.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-#include <CGAL/IO/pixmaps/voronoi.xpm>
-#include "boolean_operations_2_toolbar.h"
-#include "Qt_widget_locate_layer.h"
-
-#include <qplatinumstyle.h>
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qfiledialog.h>
-#include <qtimer.h>
-#include <qstatusbar.h>
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-
-#include <CGAL/IO/Dxf_bsop_reader.h>
-
-class MyWindow;
-class Tools_toolbar;
-class Qt_layer_show_ch : public CGAL::Qt_widget_layer
-{
- public:
-
-  // default constructor
-//make constructor with window parameter?  
-  Qt_layer_show_ch(MyWindow* myWind);
-
-  // this method overrides the virtual method 'draw()' of Qt_widget_layer
-  void draw();
-   private:
-   MyWindow *myWin;
-};//end class
-
-
-/* The QMainWindow class provides a main application window,
- *  with a menu bar, dock windows (e.g. for toolbars), and a status bar
- */
-class MyWindow : public QMainWindow
-{
-  Q_OBJECT
-public:
-
-  // constructor
-  MyWindow(int w, int h);
-  //initialize the window's testlayer. Must follow the MyWindow constructor
-  void init_layer();
-private: 
-  void something_changed();
-
-      	
-  bool write_to_file(QString /* str */);
- 
-  template <class PgnItr>
-    void draw_result(PgnItr begin, PgnItr end);
-  
-public slots:
-  void open_dxf_file();
-  void open_linear_polygon_file();
-  void new_instance();
-  void radio_selected(); //const
-  void perform_intersection();
-  void perform_union();
-  void perform_diff();
-  void perform_diff2();
-  void perform_symm_diff();
-  void perform_red_complement();
-  void perform_blue_complement();
-  void make_res_red();
-  void make_res_blue(); 
-  void perform_mink_sum();
-  void mink_sum_warning();
-  bool is_linear(const Polygon_2& pgn);
-  bool is_disc(const Polygon_2& pgn);
-  Coord_type get_radius(const Polygon_2& pgn);
-  Linear_polygon_2 circ_2_linear(const Polygon_2& pgn);
-  Polygon_with_holes linear_2_circ(const Linear_polygon_with_holes_2& pgn);
-  Polygon_2 linear_2_circ(const Linear_polygon_2& pgn);
-  void refresh();
-  void delete_red_polygons();
-  void delete_blue_polygons();
-  
-private slots:
-   void get_new_object(CGAL::Object obj);
-   void about();
-   void aboutQt();
-   void howto();
-   void new_window();
-   void timer_done();   
- 
-private:
-  CGAL::Qt_widget*                     widget;
-  CGAL::Qt_widget_standard_toolbar*    stoolbar;
-	//refernce type instead of object  
-  Qt_layer_show_ch*                     testlayer;
-  QToolBar*                            radiotoolbar;
-  QRadioButton*                        red_pgn;
-  QRadioButton*                        blue_pgn;
-  QVButtonGroup*                       radio_group;
-  Tools_toolbar*                       newtoolbar;
-  QToolBar*                            bops_toolbar;
-  QToolButton *                         intersection_but;
-  QToolButton *                         union_but;
-  QToolButton *                         diff_but;
-  QToolButton *                         diff_but2;
-  QToolButton *                         symm_diff_but;
-  QToolButton *                         mink_sum_but;
-  QToolButton *                         red_complement_but;
-  QToolButton *                         blue_complement_but;
-  QToolButton *                         make_res_red_but;
-  QToolButton *                         make_res_blue_but;
-  QToolButton *                         refresh_but;
-  QToolButton *                         delete_red_but;
-  QToolButton *                         delete_blue_but;
-
-  int                                  old_state;
-  QString                              file_name;
- 
-public: 
- 	int 											current_state;
-  	bool 											red_active; //init to false 
-  	Polygon_set&                   		red_set;
-  	Polygon_set&                    	 	blue_set;
-  	Polygon_set&                    	   res_set;
-};
-
-#endif
-
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp
deleted file mode 100644
index 5407f07..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/IO/Qt_widget.h>
-
-#include "boolean_operations_2_toolbar.h"
-#include "boolean_operations_2.h"
-
-// icons
-#include <CGAL/IO/pixmaps/arrow.xpm>
-#include "icons/insert_circle.xpm"
-#include "icons/insert_polygon.xpm"
-#include "icons/locate.xpm"
-
-
-
-#include <qiconset.h>
-
-
-class MyWindow;
-//mw used to be QMainWindow 
-Tools_toolbar::Tools_toolbar(CGAL::Qt_widget *w,
-                             MyWindow *mw) :
-    QToolBar(mw, "NT")
-  {
-
-
-    w->attach(&getsimplebut);
-    w->attach(&getcirclebut);
-	 locatebut = new Qt_widget_locate_layer(mw);   
-    //w->attach(&locatebut);
-    w->attach(locatebut);
-    
-    /*w->attach(delete_red_but);
-    w->attach(delete_blue_but);*/
-    //w->attach(&delete_polygon);
-
-    getsimplebut.deactivate();
-    getcirclebut.deactivate();
-    locatebut->deactivate();
-    /*delete_red_but->deactivate();
-    delete_blue_but->deactivate();*/
-    //delete_polygon.deactivate();
-    //set the widget
-    widget = w;
-
-    QIconSet set0(QPixmap( (const char**)arrow_small_xpm ),
-                  QPixmap( (const char**)arrow_xpm ));
-    QIconSet set1(QPixmap( (const char**)insert_polygon_xpm ),
-                  QPixmap( (const char**)insert_polygon_xpm ));
-    QIconSet set2(QPixmap( (const char**)insert_circle_xpm ),
-                  QPixmap( (const char**)insert_circle_xpm ));
-    QIconSet set3(QPixmap( (const char**)locate_xpm ),
-                  QPixmap( (const char**)locate_xpm ));
-
-
-
-
-  but[0] = new QToolButton(this, "deactivate layer");
-  but[0]->setIconSet(set0);
-  but[0]->setTextLabel("Deactivate Layer");
-  but[1] = new QToolButton(this, "polygontool");
-  but[1]->setIconSet(set1);
-  but[1]->setTextLabel("Insert Circluar Polygon");
-  but[2] = new QToolButton(this, "circletool");
-  but[2]->setIconSet(set2);
-  but[2]->setTextLabel("Insert Circle");
-  but[3] = new QToolButton(this, "locatetool");
-  but[3]->setIconSet(set3);
-  but[3]->setTextLabel("Locate Polygon");
-
-
-  int nr_of_buttons = 4;
-  button_group = new QButtonGroup(0, "My_group");
-  for(int i = 0; i < nr_of_buttons; i++)
-  {
-    button_group->insert(but[i]);
-    but[i]->setToggleButton(true);
-  }
-  button_group->setExclusive(true);
-
-
-  connect(but[1], SIGNAL(stateChanged(int)),
-        &getsimplebut, SLOT(stateChanged(int)));
-
-  connect(but[2], SIGNAL(stateChanged(int)),
-        &getcirclebut, SLOT(stateChanged(int)));
-
-  connect(but[3], SIGNAL(stateChanged(int)),
-        locatebut, SLOT(stateChanged(int)));
-}
-
-
-
-
-#include "boolean_operations_2_toolbar.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h
deleted file mode 100644
index 2f26757..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef BOOLEAN_OPERATIONS_2_TOOLBAR_H
-#define BOOLEAN_OPERATIONS_2_TOOLBAR_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Cartesian.h>
-
-
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_get_point.h>
-//#include <CGAL/IO/Qt_widget_get_simple_polygon.h>
-#include "Qt_widget_get_circ_polygon.h"
-
-#include <CGAL/IO/Qt_widget_get_circle.h>
-#include <CGAL/IO/pixmaps/circle.xpm>
-
-
-#include <qobject.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qbuttongroup.h>
-#include <qmainwindow.h>
-#include <qcursor.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-
-
-
-#include "typedefs.h"
-#include "Qt_widget_locate_layer.h"
-
-class MyWindow;
-
-class Tools_toolbar : public QToolBar
-{
-  Q_OBJECT
-public:
-	//mw type was QMainWindow 
-	Tools_toolbar(CGAL::Qt_widget *w, MyWindow *mw);
-  ~Tools_toolbar(){};
-
-  void deactivate()
-  {
-    getsimplebut.deactivate();
-    getcirclebut.deactivate();
-    but[0]->toggle(); // toggle the 'deactivate layer button'
-  }
-
-  void reset()
-  {
-    locatebut->reset();
-  }
-
-private:
-  QToolButton     *but[10];
-  QButtonGroup    *button_group;
-  CGAL::Qt_widget *widget;
-
-  CGAL::Qt_widget_get_circ_polygon<Kernel>     getsimplebut;
-  CGAL::Qt_widget_get_circle<Kernel>           getcirclebut;
-  Qt_widget_locate_layer*                       locatebut;
-
-};//end class
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/data/vlsi_1.dxf b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/data/vlsi_1.dxf
deleted file mode 100644
index 020079b..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/data/vlsi_1.dxf
+++ /dev/null
@@ -1,135404 +0,0 @@
-  0
-SECTION
-  2
-HEADER
-  9
-$EXTMIN
- 10
--76.441550
- 20
--190.625475
-  9
-$EXTMAX
- 10
-77.420395
- 20
--76.368405
-  0
-ENDSEC
-  0
-SECTION
-  2
-ENTITIES
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--94.907330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--94.907330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--95.110580
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--95.110580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--95.059755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--95.008955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--95.059755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--95.008955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--97.675955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--97.675955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.803045
- 20
--96.812330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--96.812330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--97.015580
-  0
-VERTEX
-  8
-0
- 10
-51.803045
- 20
--97.015580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--96.913955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--95.059755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--96.913955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--95.008955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--95.059755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--95.008955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--96.532955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--96.532955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--96.913955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--96.913955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--96.812330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--96.812330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--97.015580
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--97.015580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--96.913955
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--99.199955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--99.199955
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--96.913955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--93.992955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--94.094580
-  0
-VERTEX
-  8
-0
- 10
-61.709045
- 20
--94.094580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-61.709045
- 20
--93.891330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--93.891330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.607420
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
-61.607420
- 20
--102.247955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-61.810670
- 20
--102.247955
-  0
-VERTEX
-  8
-0
- 10
-61.810670
- 20
--93.992955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.709045
- 20
--102.349580
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--102.349580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--102.146330
-  0
-VERTEX
-  8
-0
- 10
-61.709045
- 20
--102.146330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.131420
- 20
--102.247955
-  0
-VERTEX
-  8
-0
- 10
-63.131420
- 20
--103.695755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.334670
- 20
--103.695755
-  0
-VERTEX
-  8
-0
- 10
-63.334670
- 20
--102.247955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--103.797380
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--103.797380
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--103.594130
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--103.594130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--103.594130
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--103.594130
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--103.797380
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--103.797380
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--103.695755
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--102.628955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--102.628955
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--103.695755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--102.527330
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--102.527330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--102.730580
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--102.730580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--102.628955
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--92.468955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--92.468955
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--102.628955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--92.367330
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--92.367330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--92.570580
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--92.570580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.988420
- 20
--92.468955
-  0
-VERTEX
-  8
-0
- 10
-61.988420
- 20
--93.484955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-62.191670
- 20
--93.484955
-  0
-VERTEX
-  8
-0
- 10
-62.191670
- 20
--92.468955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--93.383330
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--93.383330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--93.586580
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--93.586580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--93.484955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--95.008955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--93.484955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--94.907330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--94.907330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--95.110580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--95.110580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--95.008955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--95.059755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--95.008955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--106.184955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--106.184955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--104.406955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--106.083330
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--106.083330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--106.286580
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--106.286580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.478420
- 20
--106.184955
-  0
-VERTEX
-  8
-0
- 10
-45.478420
- 20
--108.851955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.681670
- 20
--108.851955
-  0
-VERTEX
-  8
-0
- 10
-45.681670
- 20
--106.184955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--108.953580
-  0
-VERTEX
-  8
-0
- 10
-45.834045
- 20
--108.953580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.834045
- 20
--108.750330
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--108.750330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.732420
- 20
--108.851955
-  0
-VERTEX
-  8
-0
- 10
-45.732420
- 20
--112.788955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.935670
- 20
--112.788955
-  0
-VERTEX
-  8
-0
- 10
-45.935670
- 20
--108.851955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.834045
- 20
--112.687330
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--112.687330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--112.890580
-  0
-VERTEX
-  8
-0
- 10
-45.834045
- 20
--112.890580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--112.788955
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--119.900955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--119.900955
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--112.788955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--120.002580
-  0
-VERTEX
-  8
-0
- 10
-45.961045
- 20
--120.002580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.961045
- 20
--119.799330
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--119.799330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.723045
- 20
--120.764580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--120.764580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--120.561330
-  0
-VERTEX
-  8
-0
- 10
-46.723045
- 20
--120.561330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--120.662955
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--118.376955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--120.662955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--118.275330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--118.275330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--118.478580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--118.478580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--125.488955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--125.488955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.364670
- 20
--122.821955
-  0
-VERTEX
-  8
-0
- 10
-49.364670
- 20
--120.535955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.161420
- 20
--120.535955
-  0
-VERTEX
-  8
-0
- 10
-49.161420
- 20
--122.821955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.263045
- 20
--120.434330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--120.434330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--120.637580
-  0
-VERTEX
-  8
-0
- 10
-49.263045
- 20
--120.637580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--120.535955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--118.376955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--120.535955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--123.583955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--123.583955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.374045
- 20
--121.323330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--121.323330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--121.526580
-  0
-VERTEX
-  8
-0
- 10
-48.374045
- 20
--121.526580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--121.424955
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--115.328955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--121.424955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--115.227330
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--115.227330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--115.430580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--115.430580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--111.772955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--111.772955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--115.328955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--111.671330
-  0
-VERTEX
-  8
-0
- 10
-46.850045
- 20
--111.671330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.850045
- 20
--111.874580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--111.874580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.951670
- 20
--111.772955
-  0
-VERTEX
-  8
-0
- 10
-46.951670
- 20
--108.089955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.748420
- 20
--108.089955
-  0
-VERTEX
-  8
-0
- 10
-46.748420
- 20
--111.772955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.850045
- 20
--108.191580
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--108.191580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--107.988330
-  0
-VERTEX
-  8
-0
- 10
-46.850045
- 20
--107.988330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--108.089955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--104.406955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--108.089955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--107.200955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--107.200955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--104.406955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--107.302580
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--107.302580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--107.099330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--107.099330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--107.861330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--107.861330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--108.064580
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--108.064580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--107.962955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--104.406955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--107.962955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--106.311955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--106.311955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--104.406955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--106.413580
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--106.413580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--106.210330
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--106.210330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--106.311955
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--110.375955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--110.375955
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--106.311955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--115.201955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--115.100330
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--115.100330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--115.303580
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--115.303580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--116.852955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--116.852955
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--115.201955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--126.504955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--126.504955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--126.606580
-  0
-VERTEX
-  8
-0
- 10
-51.930045
- 20
--126.606580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.930045
- 20
--126.403330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--126.403330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--125.615955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--118.376955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--125.615955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--118.478580
-  0
-VERTEX
-  8
-0
- 10
-58.153045
- 20
--118.478580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-58.153045
- 20
--118.275330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--118.275330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-58.051420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-58.051420
- 20
--125.107955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-58.254670
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
-58.254670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-59.778670
- 20
--123.964955
-  0
-VERTEX
-  8
-0
- 10
-59.778670
- 20
--109.613955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.575420
- 20
--109.613955
-  0
-VERTEX
-  8
-0
- 10
-59.575420
- 20
--123.964955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-58.813420
- 20
--113.804955
-  0
-VERTEX
-  8
-0
- 10
-58.813420
- 20
--147.713955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.016670
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
-59.016670
- 20
--113.804955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.079670
- 20
--160.667955
-  0
-VERTEX
-  8
-0
- 10
-55.079670
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.876420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-54.876420
- 20
--160.667955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.978045
- 20
--160.185330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--160.185330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--160.388580
-  0
-VERTEX
-  8
-0
- 10
-54.978045
- 20
--160.388580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--158.254955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--158.254955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--163.207955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--163.309580
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--163.309580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--163.106330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--163.106330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--162.115755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--162.115755
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--163.207955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--162.217380
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--162.217380
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--162.014130
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--162.014130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--162.115755
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--162.064955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--162.064955
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--162.115755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.440070
- 20
--134.175755
-  0
-VERTEX
-  8
-0
- 10
-68.440070
- 20
--134.124955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.236820
- 20
--134.124955
-  0
-VERTEX
-  8
-0
- 10
-68.236820
- 20
--134.175755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--134.023330
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--134.023330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--134.226580
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--134.226580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--134.124955
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--134.124955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--137.706330
-  0
-VERTEX
-  8
-0
- 10
-61.074045
- 20
--137.706330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-61.074045
- 20
--137.909580
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--137.909580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.175670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-61.175670
- 20
--120.662955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-60.972420
- 20
--120.662955
-  0
-VERTEX
-  8
-0
- 10
-60.972420
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--120.408955
-  0
-VERTEX
-  8
-0
- 10
-67.068420
- 20
--122.948955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--122.948955
-  0
-VERTEX
-  8
-0
- 10
-67.271670
- 20
--120.408955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--123.050580
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--123.050580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--122.847330
-  0
-VERTEX
-  8
-0
- 10
-67.170045
- 20
--122.847330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--122.948955
-  0
-VERTEX
-  8
-0
- 10
-68.211420
- 20
--124.015755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--124.015755
-  0
-VERTEX
-  8
-0
- 10
-68.414670
- 20
--122.948955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--124.117380
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--124.117380
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--123.914130
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--123.914130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--116.294130
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--116.294130
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--116.497380
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--116.497380
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.334670
- 20
--116.395755
-  0
-VERTEX
-  8
-0
- 10
-63.334670
- 20
--114.947955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.131420
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-63.131420
- 20
--116.395755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--115.049580
-  0
-VERTEX
-  8
-0
- 10
-64.376045
- 20
--115.049580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-64.376045
- 20
--114.846330
-  0
-VERTEX
-  8
-0
- 10
-63.233045
- 20
--114.846330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-64.477670
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-64.477670
- 20
--104.787955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-64.274420
- 20
--104.787955
-  0
-VERTEX
-  8
-0
- 10
-64.274420
- 20
--114.947955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-64.376045
- 20
--104.686330
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--104.686330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--104.889580
-  0
-VERTEX
-  8
-0
- 10
-64.376045
- 20
--104.889580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.698670
- 20
--104.787955
-  0
-VERTEX
-  8
-0
- 10
-54.698670
- 20
--103.136955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.495420
- 20
--103.136955
-  0
-VERTEX
-  8
-0
- 10
-54.495420
- 20
--104.787955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--103.035330
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--103.035330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--103.238580
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--103.238580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--103.136955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--104.406955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--103.136955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--112.534955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--112.534955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--104.406955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--109.486955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--104.406955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--109.486955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--101.612955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--101.612955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--101.714580
-  0
-VERTEX
-  8
-0
- 10
-58.153045
- 20
--101.714580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-58.153045
- 20
--101.511330
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--101.511330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-58.254670
- 20
--101.612955
-  0
-VERTEX
-  8
-0
- 10
-58.254670
- 20
--96.024955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-58.051420
- 20
--96.024955
-  0
-VERTEX
-  8
-0
- 10
-58.051420
- 20
--101.612955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--120.789955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--120.789955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--132.778755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--132.778755
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--134.531330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--134.734580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--124.980955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--126.428755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--124.879330
-  0
-VERTEX
-  8
-0
- 10
-27.800045
- 20
--124.879330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.800045
- 20
--125.082580
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--125.082580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.901670
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
-27.901670
- 20
--123.837955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.698420
- 20
--123.837955
-  0
-VERTEX
-  8
-0
- 10
-27.698420
- 20
--124.980955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.871420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-14.871420
- 20
--132.092955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.074670
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
-15.074670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--131.991330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--132.194580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--129.451330
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--129.451330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--129.654580
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--129.654580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--129.552955
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--129.552955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.139955
- 20
--127.241580
-  0
-VERTEX
-  8
-0
- 10
-0.114045
- 20
--127.241580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.114045
- 20
--127.038330
-  0
-VERTEX
-  8
-0
- 10
--0.139955
- 20
--127.038330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.215670
- 20
--127.139955
-  0
-VERTEX
-  8
-0
- 10
-0.215670
- 20
--121.170955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.012420
- 20
--121.170955
-  0
-VERTEX
-  8
-0
- 10
-0.012420
- 20
--127.139955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.114045
- 20
--121.069330
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--121.069330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--121.272580
-  0
-VERTEX
-  8
-0
- 10
-0.114040
- 20
--121.272580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.546330
- 20
--121.170955
-  0
-VERTEX
-  8
-0
- 10
--0.546330
- 20
--81.546955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.749580
- 20
--81.546955
-  0
-VERTEX
-  8
-0
- 10
--0.749580
- 20
--121.170955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--81.648580
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--81.648580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--81.445330
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--81.445330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--81.546955
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--81.546955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--86.017330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--86.220580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--85.179155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--85.179155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--87.566755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--87.566755
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.400580
- 20
--84.340955
-  0
-VERTEX
-  8
-0
- 10
--2.400580
- 20
--121.551955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.197330
- 20
--121.551955
-  0
-VERTEX
-  8
-0
- 10
--2.197330
- 20
--84.340955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.298955
- 20
--121.450330
-  0
-VERTEX
-  8
-0
- 10
--3.568955
- 20
--121.450330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.568955
- 20
--121.653580
-  0
-VERTEX
-  8
-0
- 10
--2.298955
- 20
--121.653580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.670580
- 20
--121.551955
-  0
-VERTEX
-  8
-0
- 10
--3.670580
- 20
--127.139955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.467330
- 20
--127.139955
-  0
-VERTEX
-  8
-0
- 10
--3.467330
- 20
--121.551955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.568955
- 20
--127.241580
-  0
-VERTEX
-  8
-0
- 10
--3.314955
- 20
--127.241580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.314955
- 20
--127.038330
-  0
-VERTEX
-  8
-0
- 10
--3.568955
- 20
--127.038330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--127.139955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--128.968755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--127.139955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--125.234955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--125.234955
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--128.968755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--121.856755
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--121.805955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--121.805955
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--121.856755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--121.907580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--121.907580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--121.704330
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--121.704330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--121.805955
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--121.805955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.580330
- 20
--120.027955
-  0
-VERTEX
-  8
-0
- 10
--18.580330
- 20
--119.392955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.783580
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
--18.783580
- 20
--120.027955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.681955
- 20
--119.291330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--119.291330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--119.494580
-  0
-VERTEX
-  8
-0
- 10
--18.681955
- 20
--119.494580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--119.392955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--111.137955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--111.137955
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--111.239580
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--111.239580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--111.036330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--111.036330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--111.137955
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--111.137955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--92.621330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--92.621330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--92.824580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--92.824580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--87.642955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--92.722955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--94.678755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--94.678755
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--92.722955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--99.149155
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--100.977955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--100.977955
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--99.149155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--119.773955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--119.773955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--117.487955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--123.939580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--123.939580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--123.736330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--123.736330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--123.837955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--124.015755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--124.015755
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--123.837955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.536330
- 20
--124.345955
-  0
-VERTEX
-  8
-0
- 10
--47.536330
- 20
--123.202955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.739580
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--47.739580
- 20
--124.345955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--123.304580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--123.304580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--123.101330
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--123.101330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--129.552955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--129.552955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--127.901955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--129.451330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--129.451330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--129.654580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--129.654580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--133.362955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--132.092955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
--47.510955
- 20
--133.261330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.510955
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--133.464580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.612580
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--47.612580
- 20
--138.823955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.409330
- 20
--138.823955
-  0
-VERTEX
-  8
-0
- 10
--47.409330
- 20
--133.362955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.510955
- 20
--138.722330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--138.722330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--138.925580
-  0
-VERTEX
-  8
-0
- 10
--47.510955
- 20
--138.925580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.549580
- 20
--138.823955
-  0
-VERTEX
-  8
-0
- 10
--51.549580
- 20
--143.776955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.346330
- 20
--143.776955
-  0
-VERTEX
-  8
-0
- 10
--51.346330
- 20
--138.823955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--143.726155
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--143.776955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--143.776955
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--143.726155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--143.878580
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--143.878580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--143.675330
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--143.675330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--143.878580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--143.878580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--143.675330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--143.675330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--143.776955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--144.869155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--144.869155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--143.776955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--144.869155
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--144.919955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--144.919955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--144.869155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--149.771330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--149.771330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--149.974580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--149.974580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--149.949155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--149.872955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--149.872955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--149.949155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--149.974580
-  0
-VERTEX
-  8
-0
- 10
--48.018955
- 20
--149.974580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.018955
- 20
--149.771330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--149.771330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.120580
- 20
--149.872955
-  0
-VERTEX
-  8
-0
- 10
--48.120580
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.917330
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--47.917330
- 20
--149.872955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.018955
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
--48.018955
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--154.851330
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--154.851330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--155.054580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--155.054580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--154.952955
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--154.952955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--155.867330
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--155.867330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--156.070580
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--156.070580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.108330
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
--52.108330
- 20
--155.206955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.311580
- 20
--155.206955
-  0
-VERTEX
-  8
-0
- 10
--52.311580
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--155.105330
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--155.105330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--155.308580
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--155.308580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--155.206955
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--155.156155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--155.156155
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--155.206955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.311580
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
--52.311580
- 20
--162.445955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.108330
- 20
--162.445955
-  0
-VERTEX
-  8
-0
- 10
--52.108330
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--162.547580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--162.547580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--162.344330
-  0
-VERTEX
-  8
-0
- 10
--52.209955
- 20
--162.344330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--160.109155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--160.032955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--160.109155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--159.931330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--159.931330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--160.134580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--160.134580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--155.054580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--155.054580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--154.851330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--154.851330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--154.952955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--155.029155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--155.029155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--154.952955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--151.142955
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--149.669755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--151.142955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--147.332955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--147.332955
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--149.669755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--147.231330
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--147.231330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--147.434580
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--147.434580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--143.726155
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--143.776955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--143.776955
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--143.726155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--143.675330
-  0
-VERTEX
-  8
-0
- 10
--58.813955
- 20
--143.675330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.813955
- 20
--143.878580
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--143.878580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.712330
- 20
--143.776955
-  0
-VERTEX
-  8
-0
- 10
--58.712330
- 20
--143.395955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.915580
- 20
--143.395955
-  0
-VERTEX
-  8
-0
- 10
--58.915580
- 20
--143.776955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--138.239755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--139.712955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--53.886330
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--54.089580
- 20
--138.239755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--53.987955
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--55.080155
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--131.711955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--131.711955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--133.997955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--134.709155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--134.709155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.469580
- 20
--139.585955
-  0
-VERTEX
-  8
-0
- 10
--46.469580
- 20
--140.982955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266330
- 20
--140.982955
-  0
-VERTEX
-  8
-0
- 10
--46.266330
- 20
--139.585955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.367955
- 20
--141.084580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--141.084580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--140.881330
-  0
-VERTEX
-  8
-0
- 10
--46.367955
- 20
--140.881330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--36.360330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--36.360330
- 20
--132.219955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.563580
- 20
--132.219955
-  0
-VERTEX
-  8
-0
- 10
--36.563580
- 20
--133.362955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--36.461955
- 20
--132.118330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--132.118330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--132.321580
-  0
-VERTEX
-  8
-0
- 10
--36.461955
- 20
--132.321580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.477930
- 20
--132.219955
-  0
-VERTEX
-  8
-0
- 10
--37.477930
- 20
--132.092955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.681180
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--37.681180
- 20
--132.219955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--155.054580
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--155.054580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--154.851330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--154.851330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.596330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--19.596330
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.799580
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--19.799580
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--151.650955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--151.549330
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--151.549330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--151.752580
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--151.752580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.596330
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
--19.596330
- 20
--147.713955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.799580
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--19.799580
- 20
--151.650955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--147.815580
-  0
-VERTEX
-  8
-0
- 10
--19.570955
- 20
--147.815580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.570955
- 20
--147.612330
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--147.612330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.469330
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--19.469330
- 20
--144.792955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.672580
- 20
--144.792955
-  0
-VERTEX
-  8
-0
- 10
--19.672580
- 20
--147.713955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--145.554955
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--145.554955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--148.856955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--148.755330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--148.755330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--148.958580
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--148.958580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--148.856955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--145.554955
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--145.554955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--149.872955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--149.872955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--149.771330
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--149.771330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--149.974580
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--149.974580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--149.872955
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--150.253955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--150.253955
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--149.872955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--150.253955
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--150.253955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
-1.180845
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.180845
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--154.952955
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--156.146755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--156.146755
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--154.952955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--153.784580
-  0
-VERTEX
-  8
-0
- 10
-17.132045
- 20
--153.784580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.132045
- 20
--153.581330
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--153.581330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.030420
- 20
--153.682955
-  0
-VERTEX
-  8
-0
- 10
-17.030420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.233670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-17.233670
- 20
--153.682955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--142.252955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-19.164045
- 20
--142.151330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.164045
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--142.354580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--142.151330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--142.354580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--142.354580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--142.151330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.185670
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
-14.185670
- 20
--139.712955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.982420
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
-13.982420
- 20
--142.252955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--152.920955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--152.920955
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--153.022580
-  0
-VERTEX
-  8
-0
- 10
-26.149045
- 20
--153.022580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.149045
- 20
--152.819330
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--152.819330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.250670
- 20
--152.920955
-  0
-VERTEX
-  8
-0
- 10
-26.250670
- 20
--145.681955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.047420
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-26.047420
- 20
--152.920955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.149045
- 20
--145.580330
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--145.580330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--145.783580
-  0
-VERTEX
-  8
-0
- 10
-26.149045
- 20
--145.783580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--145.681955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-25.260045
- 20
--143.040330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.260045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--143.243580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.361670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-25.361670
- 20
--139.204955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.158420
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-25.158420
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.260045
- 20
--139.306580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--139.306580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--139.103330
-  0
-VERTEX
-  8
-0
- 10
-25.260045
- 20
--139.103330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--139.204955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--127.901955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--127.800330
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--127.800330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--128.003580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--128.003580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--119.646955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--119.646955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--127.901955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--119.545330
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--119.545330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--119.748580
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--119.748580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--119.646955
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--119.646955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--116.725955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--116.725955
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--116.624330
-  0
-VERTEX
-  8
-0
- 10
-21.831045
- 20
--116.624330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.831045
- 20
--116.827580
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--116.827580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.932670
- 20
--116.725955
-  0
-VERTEX
-  8
-0
- 10
-21.932670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.729420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-21.729420
- 20
--116.725955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.831045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-21.831045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--163.461955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--163.207955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--163.461955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--163.106330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--163.106330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--163.309580
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--163.309580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--170.929580
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--170.929580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--170.726330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--170.726330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--171.081955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--171.081955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--170.827955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--161.175955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--163.588955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.965955
- 20
--154.292580
-  0
-VERTEX
-  8
-0
- 10
--2.933955
- 20
--154.292580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.933955
- 20
--154.089330
-  0
-VERTEX
-  8
-0
- 10
--4.965955
- 20
--154.089330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.832330
- 20
--154.190955
-  0
-VERTEX
-  8
-0
- 10
--2.832330
- 20
--151.269955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.035580
- 20
--151.269955
-  0
-VERTEX
-  8
-0
- 10
--3.035580
- 20
--154.190955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.933955
- 20
--151.168330
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--151.168330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--151.371580
-  0
-VERTEX
-  8
-0
- 10
--2.933955
- 20
--151.371580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.086330
- 20
--151.269955
-  0
-VERTEX
-  8
-0
- 10
--3.086330
- 20
--147.713955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.289580
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--3.289580
- 20
--151.269955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--153.327330
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--153.327330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--153.530580
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--153.530580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.930670
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
-5.930670
- 20
--135.267955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.727420
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
-5.727420
- 20
--153.428955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--135.166330
-  0
-VERTEX
-  8
-0
- 10
-2.908045
- 20
--135.166330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.908045
- 20
--135.369580
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--135.369580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.009670
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
-3.009670
- 20
--135.140955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.806420
- 20
--135.140955
-  0
-VERTEX
-  8
-0
- 10
-2.806420
- 20
--135.267955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.908045
- 20
--135.039330
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--135.039330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--135.242580
-  0
-VERTEX
-  8
-0
- 10
-2.908045
- 20
--135.242580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.257580
- 20
--135.140955
-  0
-VERTEX
-  8
-0
- 10
--1.257580
- 20
--135.267955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.054330
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
--1.054330
- 20
--135.140955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--135.166330
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--135.166330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--135.369580
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--135.369580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--132.727955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--135.267955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--132.829580
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--132.829580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--132.626330
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--132.626330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--128.968755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--132.727955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--128.917955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--128.968755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--128.917955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--128.968755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--129.019580
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--129.019580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--128.816330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--128.816330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.993670
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-1.993670
- 20
--127.266955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.790420
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-1.790420
- 20
--128.917955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
-7.734045
- 20
--132.194580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.734045
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--131.991330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.835670
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
-7.835670
- 20
--121.678955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.632420
- 20
--121.678955
-  0
-VERTEX
-  8
-0
- 10
-7.632420
- 20
--132.092955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.839420
- 20
--120.281955
-  0
-VERTEX
-  8
-0
- 10
-12.839420
- 20
--133.235955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.042670
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-13.042670
- 20
--120.281955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.941045
- 20
--133.337580
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--133.337580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--133.134330
-  0
-VERTEX
-  8
-0
- 10
-12.941045
- 20
--133.134330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--133.337580
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--133.337580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--133.134330
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--133.134330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.871420
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-14.871420
- 20
--133.997955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.074670
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
-15.074670
- 20
--133.235955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--134.099580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--134.099580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--133.896330
-  0
-VERTEX
-  8
-0
- 10
-14.973045
- 20
--133.896330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--133.997955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--147.205955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--147.307580
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--147.307580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--147.104330
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--147.104330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--147.205955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--153.047955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--152.946330
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--152.946330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--153.149580
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--153.149580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.218670
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-24.218670
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.015420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-24.015420
- 20
--153.047955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--137.655530
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--137.655530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--137.858780
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--137.858780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.015420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-24.015420
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.218670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-24.218670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--137.909580
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--137.909580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--137.706330
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--137.706330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-24.345670
- 20
--136.410955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--136.410955
-  0
-VERTEX
-  8
-0
- 10
-24.142420
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--136.512580
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--136.512580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--136.309330
-  0
-VERTEX
-  8
-0
- 10
-24.244045
- 20
--136.309330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--136.410955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--128.409955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--128.409955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--136.410955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--128.308330
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--128.308330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--128.511580
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--128.511580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--128.409955
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--119.138955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--128.409955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--119.037330
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--119.037330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--119.240580
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--119.240580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--119.138955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--109.740955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--109.740955
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--109.740955
-  0
-VERTEX
-  8
-0
- 10
-19.392670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-19.189420
- 20
--109.740955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--111.264955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--118.021330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--118.224580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.395420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-16.395420
- 20
--130.060955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.598670
- 20
--130.060955
-  0
-VERTEX
-  8
-0
- 10
-16.598670
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--130.162580
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--130.162580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--129.959330
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--129.959330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.903420
- 20
--130.060955
-  0
-VERTEX
-  8
-0
- 10
-16.903420
- 20
--130.187955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.106670
- 20
--130.187955
-  0
-VERTEX
-  8
-0
- 10
-17.106670
- 20
--130.060955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--130.289580
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--130.289580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--130.086330
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--130.086330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--130.187955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--130.187955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--137.909580
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--137.909580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--137.706330
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--137.706330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-22.948670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-22.745420
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--137.655530
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--137.655530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--137.858780
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--137.858780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-19.037045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.037045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.935420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-18.935420
- 20
--153.047955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.138670
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-19.138670
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.037045
- 20
--153.149580
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--153.149580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--152.946330
-  0
-VERTEX
-  8
-0
- 10
-19.037045
- 20
--152.946330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--153.047955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--156.603955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--156.502330
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--156.502330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--156.705580
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--156.705580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.169670
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
-13.169670
- 20
--151.396955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.966420
- 20
--151.396955
-  0
-VERTEX
-  8
-0
- 10
-12.966420
- 20
--156.603955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--151.295330
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--151.295330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--151.498580
-  0
-VERTEX
-  8
-0
- 10
-13.068045
- 20
--151.498580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.407670
- 20
--151.396955
-  0
-VERTEX
-  8
-0
- 10
-12.407670
- 20
--136.664955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.204420
- 20
--136.664955
-  0
-VERTEX
-  8
-0
- 10
-12.204420
- 20
--151.396955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--136.563330
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--136.563330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--136.766580
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--136.766580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.248670
- 20
--136.664955
-  0
-VERTEX
-  8
-0
- 10
-10.248670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.045420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-10.045420
- 20
--136.664955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-9.131045
- 20
--118.021330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.131045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--118.224580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.232670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-9.232670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.029420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-9.029420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.131045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-9.131045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.569420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-11.569420
- 20
--114.439955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.772670
- 20
--114.439955
-  0
-VERTEX
-  8
-0
- 10
-11.772670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--114.541580
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--114.541580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--114.338330
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--114.338330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.585420
- 20
--114.439955
-  0
-VERTEX
-  8
-0
- 10
-12.585420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.788670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-12.788670
- 20
--114.439955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--122.313955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--122.313955
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--122.415580
-  0
-VERTEX
-  8
-0
- 10
-15.735045
- 20
--122.415580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.735045
- 20
--122.212330
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--122.212330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.633420
- 20
--122.313955
-  0
-VERTEX
-  8
-0
- 10
-15.633420
- 20
--132.727955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.836670
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
-15.836670
- 20
--122.313955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.735045
- 20
--132.829580
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--132.829580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--132.626330
-  0
-VERTEX
-  8
-0
- 10
-15.735045
- 20
--132.626330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--132.727955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--153.047955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--153.149580
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--153.149580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--152.946330
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--152.946330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--153.047955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--153.047955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--152.946330
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--152.946330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--153.149580
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--153.149580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--150.126955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--150.126955
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--153.047955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.471670
- 20
--152.539955
-  0
-VERTEX
-  8
-0
- 10
-16.471670
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.268420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-16.268420
- 20
--152.539955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.370045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-15.989045
- 20
--143.040330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.989045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-16.370045
- 20
--143.243580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.090670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-16.090670
- 20
--138.569955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.887420
- 20
--138.569955
-  0
-VERTEX
-  8
-0
- 10
-15.887420
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.989045
- 20
--138.468330
-  0
-VERTEX
-  8
-0
- 10
-14.465045
- 20
--138.468330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.465045
- 20
--138.671580
-  0
-VERTEX
-  8
-0
- 10
-15.989045
- 20
--138.671580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.566670
- 20
--138.569955
-  0
-VERTEX
-  8
-0
- 10
-14.566670
- 20
--133.997955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.363420
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
-14.363420
- 20
--138.569955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.465045
- 20
--133.896330
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--133.896330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--134.099580
-  0
-VERTEX
-  8
-0
- 10
-14.465045
- 20
--134.099580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.966420
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-12.966420
- 20
--150.126955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.169670
- 20
--150.126955
-  0
-VERTEX
-  8
-0
- 10
-13.169670
- 20
--133.235955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.370045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-16.370045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.665420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-17.665420
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.868670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-17.868670
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--144.513580
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--144.513580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--144.310330
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--144.310330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--145.681955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--145.783580
-  0
-VERTEX
-  8
-0
- 10
-27.419045
- 20
--145.783580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.419045
- 20
--145.580330
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--145.580330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.317420
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-27.317420
- 20
--153.428955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.520670
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
-27.520670
- 20
--145.681955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--154.190955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--154.190955
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--154.089330
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--154.089330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--154.292580
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--154.292580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--154.190955
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--154.190955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-26.784045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.784045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.885670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-26.885670
- 20
--141.871955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.682420
- 20
--141.871955
-  0
-VERTEX
-  8
-0
- 10
-26.682420
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.784045
- 20
--141.770330
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--141.770330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--141.973580
-  0
-VERTEX
-  8
-0
- 10
-26.784045
- 20
--141.973580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--141.871955
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--141.871955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--137.045955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--137.045955
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--136.944330
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--136.944330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--137.147580
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--137.147580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--137.045955
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--123.964955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--123.964955
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--137.045955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--123.863330
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--123.863330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--124.066580
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--124.066580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--123.964955
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--123.964955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--115.328955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--115.227330
-  0
-VERTEX
-  8
-0
- 10
-24.371045
- 20
--115.227330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.371045
- 20
--115.430580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--115.430580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.472670
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
-24.472670
- 20
--114.820955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.269420
- 20
--114.820955
-  0
-VERTEX
-  8
-0
- 10
-24.269420
- 20
--115.328955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.472670
- 20
--114.820955
-  0
-VERTEX
-  8
-0
- 10
-24.472670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.269420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-24.269420
- 20
--114.820955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.371045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-24.371045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-26.911045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.911045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.809420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-26.809420
- 20
--106.057955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.012670
- 20
--106.057955
-  0
-VERTEX
-  8
-0
- 10
-27.012670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.911045
- 20
--106.159580
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--106.159580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--105.956330
-  0
-VERTEX
-  8
-0
- 10
-26.911045
- 20
--105.956330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--106.057955
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--108.724955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--108.724955
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--106.057955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--108.724955
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--108.724955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-28.054045
- 20
--118.224580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.054045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--118.021330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.952420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-27.952420
- 20
--123.075955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.155670
- 20
--123.075955
-  0
-VERTEX
-  8
-0
- 10
-28.155670
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.054045
- 20
--123.177580
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--123.177580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--122.974330
-  0
-VERTEX
-  8
-0
- 10
-28.054045
- 20
--122.974330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--123.075955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--127.901955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--123.075955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--127.800330
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--127.800330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--128.003580
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--128.003580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--127.901955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--140.728955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--140.728955
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--140.728955
-  0
-VERTEX
-  8
-0
- 10
-27.825420
- 20
--152.793955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--152.793955
-  0
-VERTEX
-  8
-0
- 10
-28.028670
- 20
--140.728955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--152.895580
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--152.895580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--152.692330
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--152.692330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--152.793955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--152.793955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--156.603955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--154.698955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--154.698955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--154.800580
-  0
-VERTEX
-  8
-0
- 10
-45.199045
- 20
--154.800580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.199045
- 20
--154.597330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--154.597330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.300670
- 20
--154.698955
-  0
-VERTEX
-  8
-0
- 10
-45.300670
- 20
--153.428955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.097420
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
-45.097420
- 20
--154.698955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--150.888955
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--147.967955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--147.967955
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--150.888955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--147.866330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--147.866330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--148.069580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--148.069580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--147.967955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--146.316955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--147.967955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--144.792955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--144.792955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--146.316955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--144.894580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--144.894580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--144.691330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--144.691330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--147.967955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--147.967955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--146.316955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--148.069580
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--148.069580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--147.866330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--147.866330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--147.967955
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--151.650955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--147.967955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--151.752580
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--151.752580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--151.549330
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--151.549330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-62.191670
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
-62.191670
- 20
--141.744955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-61.988420
- 20
--141.744955
-  0
-VERTEX
-  8
-0
- 10
-61.988420
- 20
--151.650955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--141.846580
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--141.846580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--141.643330
-  0
-VERTEX
-  8
-0
- 10
-62.090045
- 20
--141.643330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--141.744955
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--141.795755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--141.795755
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--141.744955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--140.728955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--139.712955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--140.728955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-54.089045
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.089045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.190670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-54.190670
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.987420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-53.987420
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.089045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--130.594330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-54.089045
- 20
--130.797580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--130.797580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--130.594330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.082420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-52.082420
- 20
--134.632955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.285670
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-52.285670
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--132.778755
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--132.778755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--130.594330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--130.797580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--130.797580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--130.594330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--132.778755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--132.778755
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--132.778755
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--132.778755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--130.594330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--130.797580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--130.695955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--130.797580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--130.594330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--132.778755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--132.778755
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--130.594330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--130.594330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--130.797580
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--130.797580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.929045
- 20
--120.383580
-  0
-VERTEX
-  8
-0
- 10
-44.437045
- 20
--120.383580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.437045
- 20
--120.180330
-  0
-VERTEX
-  8
-0
- 10
-43.929045
- 20
--120.180330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.538670
- 20
--120.281955
-  0
-VERTEX
-  8
-0
- 10
-44.538670
- 20
--116.344955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.335420
- 20
--116.344955
-  0
-VERTEX
-  8
-0
- 10
-44.335420
- 20
--120.281955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.437045
- 20
--116.446580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--116.446580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--116.243330
-  0
-VERTEX
-  8
-0
- 10
-44.437045
- 20
--116.243330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--116.344955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--114.058955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--116.344955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--116.344955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--116.344955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--116.243330
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--116.243330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--116.446580
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--116.446580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--107.454955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--107.454955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.272420
- 20
--110.248955
-  0
-VERTEX
-  8
-0
- 10
-48.272420
- 20
--111.772955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.475670
- 20
--111.772955
-  0
-VERTEX
-  8
-0
- 10
-48.475670
- 20
--110.248955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.374045
- 20
--111.874580
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--111.874580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--111.671330
-  0
-VERTEX
-  8
-0
- 10
-48.374045
- 20
--111.671330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--111.772955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--114.058955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--111.772955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--115.582955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--115.582955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--115.481330
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--115.481330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--115.684580
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--115.684580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--108.851955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--108.851955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--100.546155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-39.001420
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-39.001420
- 20
--125.107955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-39.204670
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
-39.204670
- 20
--105.295955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.259045
- 20
--127.165330
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--127.165330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--127.368580
-  0
-VERTEX
-  8
-0
- 10
-17.259045
- 20
--127.368580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.903420
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-16.903420
- 20
--129.552955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.106670
- 20
--129.552955
-  0
-VERTEX
-  8
-0
- 10
-17.106670
- 20
--127.266955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--129.654580
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--129.654580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--129.451330
-  0
-VERTEX
-  8
-0
- 10
-17.005045
- 20
--129.451330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--129.654580
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--129.654580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.084045
- 20
--129.451330
-  0
-VERTEX
-  8
-0
- 10
-14.033245
- 20
--129.451330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.185670
- 20
--129.552955
-  0
-VERTEX
-  8
-0
- 10
-14.185670
- 20
--127.266955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.982420
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-13.982420
- 20
--129.552955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--127.114580
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--127.114580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--126.911330
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--126.911330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--127.012955
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--117.106955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--117.106955
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--127.012955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--117.005330
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--117.005330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--117.208580
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--117.208580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.010670
- 20
--117.106955
-  0
-VERTEX
-  8
-0
- 10
-11.010670
- 20
--114.439955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.807420
- 20
--114.439955
-  0
-VERTEX
-  8
-0
- 10
-10.807420
- 20
--117.106955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.248670
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
-10.248670
- 20
--104.914955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.045420
- 20
--104.914955
-  0
-VERTEX
-  8
-0
- 10
-10.045420
- 20
--115.201955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--107.454955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--107.454955
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--107.454955
-  0
-VERTEX
-  8
-0
- 10
-14.109420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-14.312670
- 20
--107.454955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--118.224580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-14.211045
- 20
--118.021330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--118.224580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.767045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-16.751045
- 20
--118.021330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--118.224580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-19.291045
- 20
--118.021330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--121.678955
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--81.038955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--81.038955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--121.678955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--81.140580
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--81.140580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--80.937330
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--80.937330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.681420
- 20
--81.038955
-  0
-VERTEX
-  8
-0
- 10
-18.681420
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.884670
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-18.884670
- 20
--81.038955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--130.822955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--130.822955
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--115.201955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--130.924580
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--130.924580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--130.721330
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--130.721330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--107.327955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--107.226330
-  0
-VERTEX
-  8
-0
- 10
--25.158955
- 20
--107.226330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.158955
- 20
--107.429580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--107.429580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--159.016955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--159.118580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--159.118580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--158.915330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--158.915330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--162.064955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--162.064955
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--159.016955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--162.166580
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--162.166580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--161.963330
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--161.963330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--162.064955
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--162.115755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--162.115755
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--162.064955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--159.575755
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--159.524955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--159.524955
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--159.575755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--159.423330
-  0
-VERTEX
-  8
-0
- 10
-55.740045
- 20
--159.423330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.740045
- 20
--159.626580
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--159.626580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.638420
- 20
--159.524955
-  0
-VERTEX
-  8
-0
- 10
-55.638420
- 20
--161.556955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.841670
- 20
--161.556955
-  0
-VERTEX
-  8
-0
- 10
-55.841670
- 20
--159.524955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.740045
- 20
--161.455330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--161.455330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--161.658580
-  0
-VERTEX
-  8
-0
- 10
-55.740045
- 20
--161.658580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--161.556955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--161.556955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--158.762955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--158.762955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--158.864580
-  0
-VERTEX
-  8
-0
- 10
-49.263045
- 20
--158.864580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.263045
- 20
--158.661330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--158.661330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--158.254955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--158.254955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--158.356580
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--158.356580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--158.153330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--158.153330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-59.143670
- 20
--158.254955
-  0
-VERTEX
-  8
-0
- 10
-59.143670
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-58.940420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-58.940420
- 20
--158.254955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--154.495755
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--154.444955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--154.444955
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--154.495755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--154.343330
-  0
-VERTEX
-  8
-0
- 10
-59.804045
- 20
--154.343330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.804045
- 20
--154.546580
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--154.546580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-59.702420
- 20
--154.444955
-  0
-VERTEX
-  8
-0
- 10
-59.702420
- 20
--159.016955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.905670
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-59.905670
- 20
--154.444955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-59.804045
- 20
--158.915330
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--158.915330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--159.118580
-  0
-VERTEX
-  8
-0
- 10
-59.804045
- 20
--159.118580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--159.016955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.082420
- 20
--165.239955
-  0
-VERTEX
-  8
-0
- 10
-52.082420
- 20
--167.398955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.285670
- 20
--167.398955
-  0
-VERTEX
-  8
-0
- 10
-52.285670
- 20
--165.239955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--167.500580
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--167.500580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--167.297330
-  0
-VERTEX
-  8
-0
- 10
-52.184045
- 20
--167.297330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--167.398955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--167.398955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--163.969955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--163.969955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--163.868330
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--163.868330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--164.071580
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--164.071580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--172.224955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--172.224955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--171.462955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--171.361330
-  0
-VERTEX
-  8
-0
- 10
-43.548045
- 20
--171.361330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.548045
- 20
--171.564580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--171.564580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.548045
- 20
--171.361330
-  0
-VERTEX
-  8
-0
- 10
-40.754045
- 20
--171.361330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-40.754045
- 20
--171.564580
-  0
-VERTEX
-  8
-0
- 10
-43.548045
- 20
--171.564580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-40.652420
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-40.652420
- 20
--172.351955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-40.855670
- 20
--172.351955
-  0
-VERTEX
-  8
-0
- 10
-40.855670
- 20
--171.462955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-40.754045
- 20
--172.250330
-  0
-VERTEX
-  8
-0
- 10
-37.960045
- 20
--172.250330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.960045
- 20
--172.453580
-  0
-VERTEX
-  8
-0
- 10
-40.754045
- 20
--172.453580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-38.061670
- 20
--172.351955
-  0
-VERTEX
-  8
-0
- 10
-38.061670
- 20
--167.398955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.858420
- 20
--167.398955
-  0
-VERTEX
-  8
-0
- 10
-37.858420
- 20
--172.351955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.960045
- 20
--167.297330
-  0
-VERTEX
-  8
-0
- 10
-37.833045
- 20
--167.297330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.833045
- 20
--167.500580
-  0
-VERTEX
-  8
-0
- 10
-37.960045
- 20
--167.500580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.934670
- 20
--167.398955
-  0
-VERTEX
-  8
-0
- 10
-37.934670
- 20
--141.998955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.731420
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
-37.731420
- 20
--167.398955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.953420
- 20
--140.627355
-  0
-VERTEX
-  8
-0
- 10
-35.953420
- 20
--147.205955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.156670
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-36.156670
- 20
--140.627355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.055045
- 20
--147.104330
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--147.104330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--147.307580
-  0
-VERTEX
-  8
-0
- 10
-36.055045
- 20
--147.307580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--147.205955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--141.490955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--141.490955
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--141.998955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--137.655530
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--137.655530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--137.858780
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--137.858780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.441670
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-30.441670
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.238420
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-30.238420
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.266670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-27.266670
- 20
--127.901955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.063420
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-27.063420
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.165045
- 20
--128.003580
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--128.003580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--127.800330
-  0
-VERTEX
-  8
-0
- 10
-27.165045
- 20
--127.800330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--124.472955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--124.472955
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--127.901955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--124.371330
-  0
-VERTEX
-  8
-0
- 10
-27.038045
- 20
--124.371330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.038045
- 20
--124.574580
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--124.574580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.139670
- 20
--124.472955
-  0
-VERTEX
-  8
-0
- 10
-27.139670
- 20
--119.392955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.936420
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
-26.936420
- 20
--124.472955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.038045
- 20
--119.494580
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--119.494580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--119.291330
-  0
-VERTEX
-  8
-0
- 10
-27.038045
- 20
--119.291330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.213045
- 20
--119.418330
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--119.418330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--119.621580
-  0
-VERTEX
-  8
-0
- 10
-30.213045
- 20
--119.621580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--119.519955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--131.203955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--131.203955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--119.519955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--131.305580
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--131.305580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--131.102330
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--131.102330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.238420
- 20
--131.203955
-  0
-VERTEX
-  8
-0
- 10
-30.238420
- 20
--134.632955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.441670
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-30.441670
- 20
--131.203955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-30.340045
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-33.769045
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.769045
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.667420
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-33.667420
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.870670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-33.870670
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.769045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--143.040330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-33.769045
- 20
--143.243580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.905420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-32.905420
- 20
--149.745955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.108670
- 20
--149.745955
-  0
-VERTEX
-  8
-0
- 10
-33.108670
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--149.644330
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--149.644330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--149.847580
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--149.847580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--149.745955
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--149.745955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--158.762955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--158.762955
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--158.864580
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--158.864580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--158.661330
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--158.661330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.905420
- 20
--158.762955
-  0
-VERTEX
-  8
-0
- 10
-32.905420
- 20
--161.810955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.108670
- 20
--161.810955
-  0
-VERTEX
-  8
-0
- 10
-33.108670
- 20
--158.762955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--163.715955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--163.715955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--161.810955
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--168.160955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--168.160955
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--161.810955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--168.059330
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--168.059330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.022045
- 20
--168.262580
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--168.262580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--168.160955
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--168.160955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--172.224955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--172.224955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--172.326580
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--172.326580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.117045
- 20
--172.123330
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--172.123330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--171.361330
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--171.361330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--171.564580
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--171.564580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-21.043670
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-20.840420
- 20
--171.462955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-19.773670
- 20
--168.414955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--168.414955
-  0
-VERTEX
-  8
-0
- 10
-19.570420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--168.516580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--168.516580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--168.313330
-  0
-VERTEX
-  8
-0
- 10
-19.672045
- 20
--168.313330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--165.239955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--165.239955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--165.239955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--163.207955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--165.239955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--163.309580
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--163.309580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--163.106330
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--163.106330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--157.619955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--157.619955
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--163.207955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--157.721580
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--157.721580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--157.518330
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--157.518330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--157.619955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--157.619955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.695670
- 20
--168.414955
-  0
-VERTEX
-  8
-0
- 10
-30.695670
- 20
--156.603955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.492420
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
-30.492420
- 20
--168.414955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--156.502330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--156.502330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--156.705580
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--156.705580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--151.904955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--156.603955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--151.803330
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--151.803330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--152.006580
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--152.006580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--151.904955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--142.506955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--142.506955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--142.608580
-  0
-VERTEX
-  8
-0
- 10
-28.689045
- 20
--142.608580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.689045
- 20
--142.405330
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--142.405330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.790670
- 20
--142.506955
-  0
-VERTEX
-  8
-0
- 10
-28.790670
- 20
--139.204955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.587420
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-28.587420
- 20
--142.506955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.689045
- 20
--139.103330
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--139.103330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--139.306580
-  0
-VERTEX
-  8
-0
- 10
-28.689045
- 20
--139.306580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-28.663670
- 20
--128.409955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--128.409955
-  0
-VERTEX
-  8
-0
- 10
-28.460420
- 20
--139.204955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--128.511580
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--128.511580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--128.308330
-  0
-VERTEX
-  8
-0
- 10
-28.562045
- 20
--128.308330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--128.409955
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--126.428755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--128.409955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-29.298670
- 20
--103.390955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--103.390955
-  0
-VERTEX
-  8
-0
- 10
-29.095420
- 20
--126.428755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--103.289330
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--103.289330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--103.492580
-  0
-VERTEX
-  8
-0
- 10
-29.197045
- 20
--103.492580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--103.390955
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--103.390955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--95.389955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--95.389955
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--95.389955
-  0
-VERTEX
-  8
-0
- 10
-29.044670
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-28.841420
- 20
--95.389955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--92.722955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--96.786955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--92.722955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--96.685330
-  0
-VERTEX
-  8
-0
- 10
-29.324045
- 20
--96.685330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.324045
- 20
--96.888580
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--96.888580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.222420
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
-29.222420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.425670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-29.425670
- 20
--96.786955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.324045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-29.324045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--105.803955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--105.803955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--105.905580
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--105.905580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--105.702330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--105.702330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--105.803955
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--120.154955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--120.154955
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--105.803955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--120.053330
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--120.053330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--120.256580
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--120.256580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--120.154955
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--120.281955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--120.281955
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--120.154955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--120.180330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--120.180330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--120.383580
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--120.383580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--120.281955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--126.428755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--120.281955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--127.901955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--126.428755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--128.003580
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--128.003580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--127.800330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--127.800330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.746420
- 20
--127.901955
-  0
-VERTEX
-  8
-0
- 10
-30.746420
- 20
--131.457955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.949670
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
-30.949670
- 20
--127.901955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--131.559580
-  0
-VERTEX
-  8
-0
- 10
-35.293045
- 20
--131.559580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.293045
- 20
--131.356330
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--131.356330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.191420
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
-35.191420
- 20
--141.998955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.394670
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
-35.394670
- 20
--131.457955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-40.017420
- 20
--135.140955
-  0
-VERTEX
-  8
-0
- 10
-40.017420
- 20
--162.572955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-40.220670
- 20
--162.572955
-  0
-VERTEX
-  8
-0
- 10
-40.220670
- 20
--135.140955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--168.414955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--168.414955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-39.458670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-39.458670
- 20
--141.490955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-39.255420
- 20
--141.490955
-  0
-VERTEX
-  8
-0
- 10
-39.255420
- 20
--171.462955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-39.458670
- 20
--141.490955
-  0
-VERTEX
-  8
-0
- 10
-39.458670
- 20
--128.917955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-39.255420
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-39.255420
- 20
--141.490955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--129.654580
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--129.654580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--129.451330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--129.451330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--129.552955
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--128.917955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--129.552955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--128.917955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--87.642955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
-34.632670
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-34.429420
- 20
--87.642955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-34.531045
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-38.087045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-38.087045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-38.087045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-38.087045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-36.563045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.563045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.461420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-36.461420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.664670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-36.664670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.563045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--118.021330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.547045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-36.563045
- 20
--118.224580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--106.946955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--106.946955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--105.041955
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--105.041955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.927045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-28.943045
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--100.241330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--100.444580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.940580
- 20
--100.342955
-  0
-VERTEX
-  8
-0
- 10
--4.940580
- 20
--129.806955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.737330
- 20
--129.806955
-  0
-VERTEX
-  8
-0
- 10
--4.737330
- 20
--100.342955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--8.496580
- 20
--129.806955
-  0
-VERTEX
-  8
-0
- 10
--8.496580
- 20
--163.715955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--8.293330
- 20
--163.715955
-  0
-VERTEX
-  8
-0
- 10
--8.293330
- 20
--129.806955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--8.496580
- 20
--163.715955
-  0
-VERTEX
-  8
-0
- 10
--8.496580
- 20
--166.001955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--8.293330
- 20
--166.001955
-  0
-VERTEX
-  8
-0
- 10
--8.293330
- 20
--163.715955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--166.001955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--167.856155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--166.001955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--167.906955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--167.906955
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--167.906955
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--167.856155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--167.906955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--164.985955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--164.985955
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--165.087580
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--165.087580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--164.884330
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--164.884330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--164.985955
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--167.856155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--164.985955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--167.906955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--167.906955
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--158.839155
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--158.635955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--158.635955
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--158.839155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--158.534330
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--158.534330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--158.737580
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--158.737580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--158.635955
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--158.458155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--158.458155
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--158.635955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--158.356530
-  0
-VERTEX
-  8
-0
- 10
-1.104645
- 20
--158.356530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.104645
- 20
--158.559780
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--158.559780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.003020
- 20
--158.458155
-  0
-VERTEX
-  8
-0
- 10
-1.003020
- 20
--158.635955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.206270
- 20
--158.635955
-  0
-VERTEX
-  8
-0
- 10
-1.206270
- 20
--158.458155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.070330
- 20
--154.190955
-  0
-VERTEX
-  8
-0
- 10
--2.070330
- 20
--149.999955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.273580
- 20
--149.999955
-  0
-VERTEX
-  8
-0
- 10
--2.273580
- 20
--154.190955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.171955
- 20
--149.898330
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--149.898330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--150.101580
-  0
-VERTEX
-  8
-0
- 10
--2.171955
- 20
--150.101580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--149.999955
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--149.999955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--147.815580
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--147.815580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--147.612330
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--147.612330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.308330
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--1.308330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.511580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--1.511580
- 20
--147.713955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.308330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--1.308330
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.511580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--1.511580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--143.370580
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--143.370580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--143.167330
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--143.167330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--143.268955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--143.218130
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--143.218130
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.409955
- 20
--143.421380
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--143.421380
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--146.316955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.012950
- 20
--146.215330
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--146.215330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--146.418580
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--146.418580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.592580
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
--14.592580
- 20
--149.999955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.389330
- 20
--149.999955
-  0
-VERTEX
-  8
-0
- 10
--14.389330
- 20
--146.316955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.490955
- 20
--149.898330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--149.898330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--150.101580
-  0
-VERTEX
-  8
-0
- 10
--14.490955
- 20
--150.101580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--149.898330
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--149.898330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--150.101580
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--150.101580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--149.999955
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--149.999955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--148.856955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--146.189955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--146.189955
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--146.291580
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--146.291580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--146.088330
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--146.088330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--146.189955
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--146.189955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--135.775955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--135.775955
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--135.674330
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--135.674330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--135.877580
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--135.877580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--135.775955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--132.092955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--135.775955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
--18.554955
- 20
--131.991330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.554955
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--132.194580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.453330
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--18.453330
- 20
--128.536955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.656580
- 20
--128.536955
-  0
-VERTEX
-  8
-0
- 10
--18.656580
- 20
--132.092955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.196580
- 20
--130.060955
-  0
-VERTEX
-  8
-0
- 10
--21.196580
- 20
--132.092955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.993330
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--20.993330
- 20
--130.060955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.094955
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--132.194580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
--21.094955
- 20
--131.991330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--135.394955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--135.394955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--132.092955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--135.496580
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--135.496580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--135.293330
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--135.293330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--135.394955
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--138.646155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--135.394955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--138.747780
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--138.747780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--138.544530
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--138.544530
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--138.696955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--138.696955
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--138.595330
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--138.595330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--138.798580
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--138.798580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--138.696955
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--138.646155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--138.696955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--136.664955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--136.664955
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--136.766580
-  0
-VERTEX
-  8
-0
- 10
--22.491955
- 20
--136.766580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.491955
- 20
--136.563330
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--136.563330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--131.457955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--131.356330
-  0
-VERTEX
-  8
-0
- 10
--23.634955
- 20
--131.356330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.634955
- 20
--131.559580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--131.559580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.533330
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
--23.533330
- 20
--130.187955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.736580
- 20
--130.187955
-  0
-VERTEX
-  8
-0
- 10
--23.736580
- 20
--131.457955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.634955
- 20
--130.289580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--130.289580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--130.086330
-  0
-VERTEX
-  8
-0
- 10
--23.634955
- 20
--130.086330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--130.187955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--123.202955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--130.187955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.580330
- 20
--123.837955
-  0
-VERTEX
-  8
-0
- 10
--18.580330
- 20
--123.202955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.783580
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--18.783580
- 20
--123.837955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.681955
- 20
--123.101330
-  0
-VERTEX
-  8
-0
- 10
--23.330155
- 20
--123.101330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.330155
- 20
--123.304580
-  0
-VERTEX
-  8
-0
- 10
--18.681955
- 20
--123.304580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.330155
- 20
--123.101330
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--123.101330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--123.304580
-  0
-VERTEX
-  8
-0
- 10
--23.330155
- 20
--123.304580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--121.297955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--121.297955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--123.202955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--121.196330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--121.196330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--121.399580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--121.399580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--121.297955
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--116.217955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--121.297955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--116.319580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--116.319580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--116.116330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--116.116330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--116.217955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--110.502955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--110.502955
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--110.604580
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--110.604580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--110.401330
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--110.401330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--110.502955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--110.502955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--105.321330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--105.321330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--105.524580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--105.524580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--105.422955
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--110.502955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--110.502955
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--105.422955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--111.366580
-  0
-VERTEX
-  8
-0
- 10
--34.048955
- 20
--111.366580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.048955
- 20
--111.163330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--111.163330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.150580
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--34.150580
- 20
--114.185955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.947330
- 20
--114.185955
-  0
-VERTEX
-  8
-0
- 10
--33.947330
- 20
--111.264955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.048955
- 20
--114.287580
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--114.287580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--114.084330
-  0
-VERTEX
-  8
-0
- 10
--34.048955
- 20
--114.084330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.261580
- 20
--114.185955
-  0
-VERTEX
-  8
-0
- 10
--33.261580
- 20
--116.979955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.058330
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--33.058330
- 20
--114.185955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--117.081580
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--117.081580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--116.878330
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--116.878330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.356580
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--31.356580
- 20
--118.503955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.153330
- 20
--118.503955
-  0
-VERTEX
-  8
-0
- 10
--31.153330
- 20
--116.979955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--118.605580
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--118.605580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--118.402330
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--118.402330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--118.503955
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--138.061955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--138.061955
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--118.503955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--137.960330
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--137.960330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.254955
- 20
--138.163580
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--138.163580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.356580
- 20
--138.061955
-  0
-VERTEX
-  8
-0
- 10
--31.356580
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.153330
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--31.153330
- 20
--138.061955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.803330
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--24.803330
- 20
--145.554955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.006580
- 20
--145.554955
-  0
-VERTEX
-  8
-0
- 10
--25.006580
- 20
--152.412955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.904955
- 20
--145.656580
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--145.656580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--145.453330
-  0
-VERTEX
-  8
-0
- 10
--24.904955
- 20
--145.453330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--145.554955
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--145.554955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--153.936955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--152.412955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--159.143955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--159.143955
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--159.245580
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--159.245580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--159.042330
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--159.042330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--159.143955
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--163.588955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--159.143955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--149.999955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--149.999955
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--160.032955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--151.523955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--151.523955
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--151.422330
-  0
-VERTEX
-  8
-0
- 10
--13.728955
- 20
--151.422330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.728955
- 20
--151.625580
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--151.625580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.627330
- 20
--151.523955
-  0
-VERTEX
-  8
-0
- 10
--13.627330
- 20
--139.585955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.830580
- 20
--139.585955
-  0
-VERTEX
-  8
-0
- 10
--13.830580
- 20
--151.523955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.728955
- 20
--139.687580
-  0
-VERTEX
-  8
-0
- 10
--12.966955
- 20
--139.687580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.966955
- 20
--139.484330
-  0
-VERTEX
-  8
-0
- 10
--13.728955
- 20
--139.484330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.865330
- 20
--139.585955
-  0
-VERTEX
-  8
-0
- 10
--12.865330
- 20
--129.298955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.068580
- 20
--129.298955
-  0
-VERTEX
-  8
-0
- 10
--13.068580
- 20
--139.585955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--129.476755
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--128.282955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--128.282955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--129.476755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--128.384580
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--128.384580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--128.181330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--128.181330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.058330
- 20
--128.282955
-  0
-VERTEX
-  8
-0
- 10
--33.058330
- 20
--124.218955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.261580
- 20
--124.218955
-  0
-VERTEX
-  8
-0
- 10
--33.261580
- 20
--128.282955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--124.117330
-  0
-VERTEX
-  8
-0
- 10
--36.080955
- 20
--124.117330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.080955
- 20
--124.320580
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--124.320580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.979330
- 20
--124.218955
-  0
-VERTEX
-  8
-0
- 10
--35.979330
- 20
--123.202955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.182580
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--36.182580
- 20
--124.218955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--36.080955
- 20
--123.101330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--123.101330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--123.304580
-  0
-VERTEX
-  8
-0
- 10
--36.080955
- 20
--123.304580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--36.106330
- 20
--119.900955
-  0
-VERTEX
-  8
-0
- 10
--36.106330
- 20
--112.026955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.309580
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--36.309580
- 20
--119.900955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--36.207955
- 20
--111.925330
-  0
-VERTEX
-  8
-0
- 10
--40.017955
- 20
--111.925330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--40.017955
- 20
--112.128580
-  0
-VERTEX
-  8
-0
- 10
--36.207955
- 20
--112.128580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--39.916330
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--39.916330
- 20
--82.181955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--40.119580
- 20
--82.181955
-  0
-VERTEX
-  8
-0
- 10
--40.119580
- 20
--112.026955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--40.017955
- 20
--82.080330
-  0
-VERTEX
-  8
-0
- 10
--56.908955
- 20
--82.080330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.908955
- 20
--82.283580
-  0
-VERTEX
-  8
-0
- 10
--40.017955
- 20
--82.283580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.010580
- 20
--82.181955
-  0
-VERTEX
-  8
-0
- 10
--57.010580
- 20
--86.372955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.807330
- 20
--86.372955
-  0
-VERTEX
-  8
-0
- 10
--56.807330
- 20
--82.181955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.908955
- 20
--86.271330
-  0
-VERTEX
-  8
-0
- 10
--59.626755
- 20
--86.271330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--59.626755
- 20
--86.474580
-  0
-VERTEX
-  8
-0
- 10
--56.908955
- 20
--86.474580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--59.626755
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
--57.416955
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.416955
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
--59.626755
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.315330
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
--57.315330
- 20
--81.673955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.518580
- 20
--81.673955
-  0
-VERTEX
-  8
-0
- 10
--57.518580
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.416955
- 20
--81.775580
-  0
-VERTEX
-  8
-0
- 10
--39.255955
- 20
--81.775580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--39.255955
- 20
--81.572330
-  0
-VERTEX
-  8
-0
- 10
--57.416955
- 20
--81.572330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--39.357580
- 20
--81.673955
-  0
-VERTEX
-  8
-0
- 10
--39.357580
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--39.154330
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--39.154330
- 20
--81.673955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.516330
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
--14.516330
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.719580
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--14.719580
- 20
--96.786955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--95.161330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--95.161330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--95.364580
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--95.364580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--95.262955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--85.204580
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--85.204580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--85.001330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--85.001330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--86.779330
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--86.779330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--86.982580
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--86.982580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--86.880955
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--86.880955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--92.824580
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--92.824580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--92.621330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--92.621330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--87.642955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--92.722955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--87.744580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--87.744580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--87.541330
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--87.541330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--92.621330
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--92.621330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--92.824580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--92.824580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.940580
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
--4.940580
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.737330
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--4.737330
- 20
--92.722955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--95.161330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--95.161330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--95.364580
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--95.364580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--96.634580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--96.634580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--96.431330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--96.431330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--96.532955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--96.532955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--100.241330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
--4.838955
- 20
--100.444580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--160.134580
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--160.134580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--159.931330
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--159.931330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--163.588955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--160.032955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--154.190955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--154.190955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.937670
- 20
--136.664955
-  0
-VERTEX
-  8
-0
- 10
-61.937670
- 20
--106.184955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-61.734420
- 20
--106.184955
-  0
-VERTEX
-  8
-0
- 10
-61.734420
- 20
--136.664955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.836045
- 20
--106.286580
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--106.286580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--106.083330
-  0
-VERTEX
-  8
-0
- 10
-61.836045
- 20
--106.083330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--106.184955
-  0
-VERTEX
-  8
-0
- 10
-63.156820
- 20
--106.235755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--106.235755
-  0
-VERTEX
-  8
-0
- 10
-63.360070
- 20
--106.184955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--100.596955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--100.596955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--100.495330
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--100.495330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--100.698580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--100.698580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--100.596955
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--101.358955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--101.358955
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--100.596955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--130.060955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--130.060955
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--129.959330
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--129.959330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--130.162580
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--130.162580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.699420
- 20
--130.060955
-  0
-VERTEX
-  8
-0
- 10
-35.699420
- 20
--130.822955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.902670
- 20
--130.822955
-  0
-VERTEX
-  8
-0
- 10
-35.902670
- 20
--130.060955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--130.721330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--130.721330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--130.924580
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--130.924580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.699420
- 20
--130.822955
-  0
-VERTEX
-  8
-0
- 10
-35.699420
- 20
--140.627355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-35.902670
- 20
--140.627355
-  0
-VERTEX
-  8
-0
- 10
-35.902670
- 20
--130.822955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--140.728980
-  0
-VERTEX
-  8
-0
- 10
-36.055045
- 20
--140.728980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.055045
- 20
--140.525730
-  0
-VERTEX
-  8
-0
- 10
-35.801045
- 20
--140.525730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--150.253955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--150.253955
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--147.205955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--150.355580
-  0
-VERTEX
-  8
-0
- 10
-25.641045
- 20
--150.355580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.641045
- 20
--150.152330
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--150.152330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.539420
- 20
--150.253955
-  0
-VERTEX
-  8
-0
- 10
-25.539420
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.742670
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
-25.742670
- 20
--150.253955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.641045
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--152.311330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
-25.641045
- 20
--152.514580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--167.652955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--167.652955
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--152.412955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--167.551330
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--167.551330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--167.754580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--167.754580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--167.652955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--167.652955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--167.906955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--167.906955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--168.008580
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--168.008580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--167.805330
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--167.805330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--167.906955
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--158.508955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--158.508955
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--167.906955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--158.610580
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--158.610580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--158.407330
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--158.407330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--158.508955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--158.508955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--152.666955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--152.666955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--152.565330
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--152.565330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--152.768580
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--152.768580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-50.888670
- 20
--135.267955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
-50.685420
- 20
--141.567155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--135.166330
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--135.166330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--135.369580
-  0
-VERTEX
-  8
-0
- 10
-50.787045
- 20
--135.369580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.974045
- 20
--134.912330
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--134.912330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--135.115580
-  0
-VERTEX
-  8
-0
- 10
-22.974045
- 20
--135.115580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--135.013955
-  0
-VERTEX
-  8
-0
- 10
-22.821670
- 20
--128.917955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-22.618420
- 20
--135.013955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--128.816330
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--128.816330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--129.019580
-  0
-VERTEX
-  8
-0
- 10
-22.720045
- 20
--129.019580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--126.428755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--128.917955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--122.313955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--122.313955
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--126.428755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--122.212330
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--122.212330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--122.415580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--122.415580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.884670
- 20
--122.313955
-  0
-VERTEX
-  8
-0
- 10
-18.884670
- 20
--117.106955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.681420
- 20
--117.106955
-  0
-VERTEX
-  8
-0
- 10
-18.681420
- 20
--122.313955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--117.005330
-  0
-VERTEX
-  8
-0
- 10
-18.529045
- 20
--117.005330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.529045
- 20
--117.208580
-  0
-VERTEX
-  8
-0
- 10
-18.783045
- 20
--117.208580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.630670
- 20
--117.106955
-  0
-VERTEX
-  8
-0
- 10
-18.630670
- 20
--104.152955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.427420
- 20
--104.152955
-  0
-VERTEX
-  8
-0
- 10
-18.427420
- 20
--117.106955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-13.703045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.703045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.804670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-13.804670
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-13.601420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-13.601420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.703045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.687045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-13.703045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--93.230955
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--93.230955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-11.061420
- 20
--108.978955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--108.978955
-  0
-VERTEX
-  8
-0
- 10
-11.264670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--108.877330
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--108.877330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.909045
- 20
--109.080580
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--109.080580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.761420
- 20
--115.963955
-  0
-VERTEX
-  8
-0
- 10
-23.761420
- 20
--119.138955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.964670
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-23.964670
- 20
--115.963955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--119.240580
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--119.240580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--119.037330
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--119.037330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--124.472955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--124.472955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--119.138955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--124.574580
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--124.574580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.387045
- 20
--124.371330
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--124.371330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--124.472955
-  0
-VERTEX
-  8
-0
- 10
-25.285420
- 20
--126.428755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-25.488670
- 20
--124.472955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
-16.649420
- 20
--139.331955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--139.331955
-  0
-VERTEX
-  8
-0
- 10
-16.852670
- 20
--135.267955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--141.490955
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--141.490955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--144.513580
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--144.513580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.942045
- 20
--144.310330
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--144.310330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-24.650420
- 20
--149.745955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--149.745955
-  0
-VERTEX
-  8
-0
- 10
-24.853670
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--149.644330
-  0
-VERTEX
-  8
-0
- 10
-24.625045
- 20
--149.644330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.625045
- 20
--149.847580
-  0
-VERTEX
-  8
-0
- 10
-24.752045
- 20
--149.847580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.523420
- 20
--149.745955
-  0
-VERTEX
-  8
-0
- 10
-24.523420
- 20
--151.777955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.726670
- 20
--151.777955
-  0
-VERTEX
-  8
-0
- 10
-24.726670
- 20
--149.745955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.625045
- 20
--151.879580
-  0
-VERTEX
-  8
-0
- 10
-24.879045
- 20
--151.879580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-24.879045
- 20
--151.676330
-  0
-VERTEX
-  8
-0
- 10
-24.625045
- 20
--151.676330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--150.888955
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--148.856955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--150.888955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--148.856955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--148.755330
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--148.755330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--148.958580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--148.958580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--148.755330
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--148.755330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.854955
- 20
--148.958580
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--148.958580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--148.856955
-  0
-VERTEX
-  8
-0
- 10
--5.753330
- 20
--137.426955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--137.426955
-  0
-VERTEX
-  8
-0
- 10
--5.956580
- 20
--148.856955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--139.712955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--136.537955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.055330
- 20
--137.426955
-  0
-VERTEX
-  8
-0
- 10
--9.055330
- 20
--126.758955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.258580
- 20
--126.758955
-  0
-VERTEX
-  8
-0
- 10
--9.258580
- 20
--137.426955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.734580
- 20
--127.520955
-  0
-VERTEX
-  8
-0
- 10
--7.734580
- 20
--158.889955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--7.531330
- 20
--158.889955
-  0
-VERTEX
-  8
-0
- 10
--7.531330
- 20
--127.520955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--158.991580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--158.991580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--158.788330
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--158.788330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--158.839155
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--158.889955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--158.889955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--158.839155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--158.991580
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--158.991580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--158.788330
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--158.788330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.054330
- 20
--158.889955
-  0
-VERTEX
-  8
-0
- 10
--1.054330
- 20
--157.492955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.257580
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--1.257580
- 20
--158.889955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--157.594580
-  0
-VERTEX
-  8
-0
- 10
--1.130555
- 20
--157.594580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.130555
- 20
--157.391330
-  0
-VERTEX
-  8
-0
- 10
--1.155955
- 20
--157.391330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--157.111955
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--164.985955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--164.985955
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--157.111955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--165.087580
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--165.087580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--164.884330
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--164.884330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.179580
- 20
--164.985955
-  0
-VERTEX
-  8
-0
- 10
--12.179580
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.976330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--11.976330
- 20
--164.985955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--12.001755
- 20
--166.484580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.001755
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--166.281330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--163.588955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--19.774155
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.774155
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.774155
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--21.348955
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.348955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--19.774155
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--30.365955
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.365955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.264330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--30.264330
- 20
--151.523955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.467580
- 20
--151.523955
-  0
-VERTEX
-  8
-0
- 10
--30.467580
- 20
--166.382955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.365955
- 20
--151.422330
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--151.422330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--151.625580
-  0
-VERTEX
-  8
-0
- 10
--30.365955
- 20
--151.625580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--151.523955
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--138.569955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--138.569955
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--151.523955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--138.671580
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--138.671580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--138.468330
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--138.468330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--138.569955
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--117.995955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--138.569955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--117.894330
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--117.894330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--118.097580
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--118.097580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--116.090955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--116.090955
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--117.995955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--115.989330
-  0
-VERTEX
-  8
-0
- 10
--32.651955
- 20
--115.989330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.651955
- 20
--116.192580
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--116.192580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.550330
- 20
--116.090955
-  0
-VERTEX
-  8
-0
- 10
--32.550330
- 20
--112.026955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.753580
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--32.753580
- 20
--116.090955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.651955
- 20
--111.925330
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--111.925330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--112.128580
-  0
-VERTEX
-  8
-0
- 10
--32.651955
- 20
--112.128580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.439330
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--33.439330
- 20
--101.358955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.642580
- 20
--101.358955
-  0
-VERTEX
-  8
-0
- 10
--33.642580
- 20
--112.026955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
--30.848580
- 20
--115.074955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--115.074955
-  0
-VERTEX
-  8
-0
- 10
--30.645330
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--115.176580
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--115.176580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--114.973330
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--114.973330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--115.074955
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--116.979955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--115.074955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--117.081580
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--117.081580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--116.878330
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--116.878330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.324580
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--29.324580
- 20
--140.855955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.121330
- 20
--140.855955
-  0
-VERTEX
-  8
-0
- 10
--29.121330
- 20
--116.979955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--140.754330
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--140.754330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--140.957580
-  0
-VERTEX
-  8
-0
- 10
--29.222955
- 20
--140.957580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--140.855955
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--155.206955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--155.206955
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--140.855955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--155.308580
-  0
-VERTEX
-  8
-0
- 10
--24.269955
- 20
--155.308580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.269955
- 20
--155.105330
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--155.105330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.269955
- 20
--155.308580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--155.308580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--155.105330
-  0
-VERTEX
-  8
-0
- 10
--24.269955
- 20
--155.105330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--155.206955
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--157.111955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--157.111955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--155.206955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--155.206955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--155.206955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--147.713955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--147.612330
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--147.612330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--147.815580
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--147.815580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--147.713955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--146.316955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--147.713955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.105330
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
--28.105330
- 20
--114.566955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.308580
- 20
--114.566955
-  0
-VERTEX
-  8
-0
- 10
--28.308580
- 20
--146.316955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.206955
- 20
--114.465330
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--114.465330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--114.668580
-  0
-VERTEX
-  8
-0
- 10
--28.206955
- 20
--114.668580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--114.566955
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--114.566955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--86.220580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--86.017330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.784580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--26.784580
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.581330
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--26.581330
- 20
--85.102955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--86.220580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--86.017330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--86.880955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--86.880955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--86.982580
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--86.982580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--86.779330
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--86.779330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--86.880955
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--86.880955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--86.880955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--86.880955
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--86.779330
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--86.779330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--86.982580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--86.982580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--85.204580
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--85.204580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--85.001330
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--85.001330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--23.101580
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--22.898330
- 20
--85.102955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--86.220580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
--22.999955
- 20
--86.017330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--104.914955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--104.914955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--105.016580
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--105.016580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--104.813330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--104.813330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--104.914955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--112.026955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--104.914955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--112.128580
-  0
-VERTEX
-  8
-0
- 10
--18.046955
- 20
--112.128580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.046955
- 20
--111.925330
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--111.925330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.148580
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
--18.148580
- 20
--116.217955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.945330
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--17.945330
- 20
--112.026955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.183330
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--17.183330
- 20
--114.058955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.386580
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
--17.386580
- 20
--116.979955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--113.957330
-  0
-VERTEX
-  8
-0
- 10
--17.538955
- 20
--113.957330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.538955
- 20
--114.160580
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--114.160580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.437330
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
--17.437330
- 20
--108.724955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.640580
- 20
--108.724955
-  0
-VERTEX
-  8
-0
- 10
--17.640580
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.538955
- 20
--108.826580
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--108.826580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--108.623330
-  0
-VERTEX
-  8
-0
- 10
--17.538955
- 20
--108.623330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--108.724955
-  0
-VERTEX
-  8
-0
- 10
--17.056330
- 20
--104.152955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--104.152955
-  0
-VERTEX
-  8
-0
- 10
--17.259580
- 20
--108.724955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--104.051330
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--104.051330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--104.254580
-  0
-VERTEX
-  8
-0
- 10
--17.157955
- 20
--104.254580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--104.152955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--104.152955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--95.364580
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--95.364580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--95.161330
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--95.161330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--95.262955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--85.204580
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--85.204580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.332955
- 20
--85.001330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--85.001330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--85.102955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--90.081330
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--90.081330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--90.284580
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--90.284580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.546580
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
--27.546580
- 20
--93.992955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.343330
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
--27.343330
- 20
--90.182955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--94.094580
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--94.094580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--93.891330
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--93.891330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--93.891330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--93.891330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--94.094580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--94.094580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
--26.149580
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--25.946330
- 20
--93.992955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--95.364580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--95.364580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--95.161330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--95.161330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--96.634580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--96.634580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--96.431330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--96.431330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--96.634580
-  0
-VERTEX
-  8
-0
- 10
--23.888955
- 20
--96.634580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.888955
- 20
--96.431330
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--96.431330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.888955
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
--23.888955
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--100.444580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--100.241330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--100.444580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--100.241330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--104.051330
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--104.051330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--104.254580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--104.254580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.546580
- 20
--104.152955
-  0
-VERTEX
-  8
-0
- 10
--27.546580
- 20
--107.962955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.343330
- 20
--107.962955
-  0
-VERTEX
-  8
-0
- 10
--27.343330
- 20
--104.152955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--108.064580
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--108.064580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--107.861330
-  0
-VERTEX
-  8
-0
- 10
--27.444955
- 20
--107.861330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--109.359955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--109.359955
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--109.258330
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--109.258330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--109.461580
-  0
-VERTEX
-  8
-0
- 10
--22.872955
- 20
--109.461580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.387580
- 20
--109.359955
-  0
-VERTEX
-  8
-0
- 10
--25.387580
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.184330
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--25.184330
- 20
--109.359955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--111.163330
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--111.163330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.682955
- 20
--111.366580
-  0
-VERTEX
-  8
-0
- 10
--25.285955
- 20
--111.366580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.784580
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--26.784580
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.581330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--26.581330
- 20
--111.264955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.968955
- 20
--116.319580
-  0
-VERTEX
-  8
-0
- 10
--28.714955
- 20
--116.319580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.714955
- 20
--116.116330
-  0
-VERTEX
-  8
-0
- 10
--28.968955
- 20
--116.116330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.816580
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--28.816580
- 20
--141.998955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.613330
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
--28.613330
- 20
--116.217955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.714955
- 20
--141.897330
-  0
-VERTEX
-  8
-0
- 10
--28.968955
- 20
--141.897330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.968955
- 20
--142.100580
-  0
-VERTEX
-  8
-0
- 10
--28.714955
- 20
--142.100580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.984955
- 20
--139.433580
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--139.433580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--139.230330
-  0
-VERTEX
-  8
-0
- 10
--29.984955
- 20
--139.230330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--139.331955
-  0
-VERTEX
-  8
-0
- 10
--29.629330
- 20
--117.487955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--29.832580
- 20
--139.331955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--117.386330
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--117.386330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--117.589580
-  0
-VERTEX
-  8
-0
- 10
--29.730955
- 20
--117.589580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--30.137330
- 20
--115.582955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--115.582955
-  0
-VERTEX
-  8
-0
- 10
--30.340580
- 20
--117.487955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--115.481330
-  0
-VERTEX
-  8
-0
- 10
--32.143955
- 20
--115.481330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.143955
- 20
--115.684580
-  0
-VERTEX
-  8
-0
- 10
--30.238955
- 20
--115.684580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.042330
- 20
--115.582955
-  0
-VERTEX
-  8
-0
- 10
--32.042330
- 20
--111.518955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.245580
- 20
--111.518955
-  0
-VERTEX
-  8
-0
- 10
--32.245580
- 20
--115.582955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.143955
- 20
--111.417330
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--111.417330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--111.620580
-  0
-VERTEX
-  8
-0
- 10
--32.143955
- 20
--111.620580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.677330
- 20
--111.518955
-  0
-VERTEX
-  8
-0
- 10
--32.677330
- 20
--91.706955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.880580
- 20
--91.706955
-  0
-VERTEX
-  8
-0
- 10
--32.880580
- 20
--111.518955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--91.808580
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--91.808580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--91.605330
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--91.605330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--91.706955
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--92.722955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--92.722955
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--91.706955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--91.706955
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--90.182955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--91.706955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--88.404955
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--114.058955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--88.404955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.952955
- 20
--114.160580
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--114.160580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--113.957330
-  0
-VERTEX
-  8
-0
- 10
--27.952955
- 20
--113.957330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.292580
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
--27.292580
- 20
--139.712955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.089330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--27.089330
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--139.814580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--139.611330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--138.646155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--139.712955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--140.220955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--143.268955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--140.220955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--143.370580
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--143.370580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.792955
- 20
--143.167330
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--143.167330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--143.268955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--142.252955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--142.151330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
--19.062955
- 20
--142.354580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--142.252955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--141.998955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--142.151330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--142.354580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--142.252955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--138.696955
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--138.646155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--138.696955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--21.501330
- 20
--134.251955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--134.251955
-  0
-VERTEX
-  8
-0
- 10
--21.704580
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--134.150330
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--134.150330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--134.353580
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--134.353580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--134.251955
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--131.330955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--131.330955
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--134.251955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--131.432580
-  0
-VERTEX
-  8
-0
- 10
--22.110955
- 20
--131.432580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.110955
- 20
--131.229330
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--131.229330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.009330
- 20
--131.330955
-  0
-VERTEX
-  8
-0
- 10
--22.009330
- 20
--125.107955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.212580
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
--22.212580
- 20
--131.330955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.110955
- 20
--125.006330
-  0
-VERTEX
-  8
-0
- 10
--22.745955
- 20
--125.006330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.745955
- 20
--125.209580
-  0
-VERTEX
-  8
-0
- 10
--22.110955
- 20
--125.209580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.407330
- 20
--127.520955
-  0
-VERTEX
-  8
-0
- 10
--31.407330
- 20
--119.011955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.610580
- 20
--119.011955
-  0
-VERTEX
-  8
-0
- 10
--31.610580
- 20
--127.520955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.508955
- 20
--118.910330
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--118.910330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--119.113580
-  0
-VERTEX
-  8
-0
- 10
--31.508955
- 20
--119.113580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--119.011955
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--117.487955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--119.011955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--117.386330
-  0
-VERTEX
-  8
-0
- 10
--33.667955
- 20
--117.386330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.667955
- 20
--117.589580
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--117.589580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.566330
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--33.566330
- 20
--114.693955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.769580
- 20
--114.693955
-  0
-VERTEX
-  8
-0
- 10
--33.769580
- 20
--117.487955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.667955
- 20
--114.592330
-  0
-VERTEX
-  8
-0
- 10
--35.064955
- 20
--114.592330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.064955
- 20
--114.795580
-  0
-VERTEX
-  8
-0
- 10
--33.667955
- 20
--114.795580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.963330
- 20
--114.693955
-  0
-VERTEX
-  8
-0
- 10
--34.963330
- 20
--96.278955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.166580
- 20
--96.278955
-  0
-VERTEX
-  8
-0
- 10
--35.166580
- 20
--114.693955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.887955
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--15.887955
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--87.642955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--87.744580
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--87.744580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--87.541330
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--87.541330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--87.642955
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--87.642955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--86.220580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--86.017330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.330420
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-4.330420
- 20
--137.426955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.533670
- 20
--137.426955
-  0
-VERTEX
-  8
-0
- 10
-4.533670
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--141.490955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--141.490955
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--141.592580
-  0
-VERTEX
-  8
-0
- 10
-3.670045
- 20
--141.592580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.670045
- 20
--141.389330
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--141.389330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--137.045955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--137.045955
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--138.239755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--136.944330
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--136.944330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--137.147580
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--137.147580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--137.045955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--134.759955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--134.759955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--137.045955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--134.861580
-  0
-VERTEX
-  8
-0
- 10
--54.241955
- 20
--134.861580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.241955
- 20
--134.658330
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--134.658330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.140330
- 20
--134.759955
-  0
-VERTEX
-  8
-0
- 10
--54.140330
- 20
--128.790955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.343580
- 20
--128.790955
-  0
-VERTEX
-  8
-0
- 10
--54.343580
- 20
--134.759955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.241955
- 20
--128.689330
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--128.689330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--128.892580
-  0
-VERTEX
-  8
-0
- 10
--54.241955
- 20
--128.892580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--128.790955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--127.393955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--127.393955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--128.790955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--128.689330
-  0
-VERTEX
-  8
-0
- 10
--57.543955
- 20
--128.689330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.543955
- 20
--128.892580
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--128.892580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.442330
- 20
--128.790955
-  0
-VERTEX
-  8
-0
- 10
--57.442330
- 20
--119.392955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.645580
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
--57.645580
- 20
--128.790955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.543955
- 20
--119.291330
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--119.291330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--119.494580
-  0
-VERTEX
-  8
-0
- 10
--57.543955
- 20
--119.494580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--122.440955
-  0
-VERTEX
-  8
-0
- 10
--55.994580
- 20
--124.091955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--124.091955
-  0
-VERTEX
-  8
-0
- 10
--55.791330
- 20
--122.440955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--61.455580
- 20
--124.853955
-  0
-VERTEX
-  8
-0
- 10
--61.455580
- 20
--146.570955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--61.252330
- 20
--146.570955
-  0
-VERTEX
-  8
-0
- 10
--61.252330
- 20
--124.853955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.458330
- 20
--146.570955
-  0
-VERTEX
-  8
-0
- 10
--58.458330
- 20
--145.427955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.661580
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
--58.661580
- 20
--146.570955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.559955
- 20
--145.529580
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--145.529580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--145.326330
-  0
-VERTEX
-  8
-0
- 10
--58.559955
- 20
--145.326330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--143.726155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--143.726155
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--145.427955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--151.015955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--151.015955
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--149.669755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--150.914330
-  0
-VERTEX
-  8
-0
- 10
--57.162955
- 20
--150.914330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.162955
- 20
--151.117580
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--151.117580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--152.438330
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--152.438330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--152.641580
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--152.641580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--152.539955
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--155.156155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--155.156155
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--152.539955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--155.156155
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--156.603955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--155.156155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--156.705580
-  0
-VERTEX
-  8
-0
- 10
--52.717955
- 20
--156.705580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.717955
- 20
--156.502330
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--156.502330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.819580
- 20
--156.603955
-  0
-VERTEX
-  8
-0
- 10
--52.819580
- 20
--168.922955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.616330
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
--52.616330
- 20
--156.603955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.717955
- 20
--169.024580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--169.024580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--168.821330
-  0
-VERTEX
-  8
-0
- 10
--52.717955
- 20
--168.821330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--159.042330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--159.042330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--159.245580
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--159.245580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--159.143955
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--153.428955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--159.143955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--151.777955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--151.777955
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--153.428955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--151.879580
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--151.879580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--151.676330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--151.676330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--151.777955
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--149.669755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--151.777955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--149.618955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--149.618955
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--149.669755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--152.387580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--152.387580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--152.184330
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--152.184330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--152.285955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--152.336755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--152.336755
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--152.285955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--66.154580
- 20
--152.006555
-  0
-VERTEX
-  8
-0
- 10
--66.154580
- 20
--152.031955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--65.951330
- 20
--152.031955
-  0
-VERTEX
-  8
-0
- 10
--65.951330
- 20
--152.006555
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--66.052955
- 20
--152.133580
-  0
-VERTEX
-  8
-0
- 10
--62.242955
- 20
--152.133580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.242955
- 20
--151.930330
-  0
-VERTEX
-  8
-0
- 10
--66.052955
- 20
--151.930330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--152.031955
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--119.392955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--152.031955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.242955
- 20
--119.291330
-  0
-VERTEX
-  8
-0
- 10
--65.951355
- 20
--119.291330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--65.951355
- 20
--119.494580
-  0
-VERTEX
-  8
-0
- 10
--62.242955
- 20
--119.494580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--68.592930
- 20
--118.021355
-  0
-VERTEX
-  8
-0
- 10
--68.592930
- 20
--117.995955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--68.796180
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--68.796180
- 20
--118.021355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--68.694555
- 20
--117.894330
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--117.894330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--118.097580
-  0
-VERTEX
-  8
-0
- 10
--68.694555
- 20
--118.097580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--70.472580
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--70.472580
- 20
--126.885955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--70.269330
- 20
--126.885955
-  0
-VERTEX
-  8
-0
- 10
--70.269330
- 20
--117.995955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--126.987580
-  0
-VERTEX
-  8
-0
- 10
--62.877955
- 20
--126.987580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.877955
- 20
--126.784330
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--126.784330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.979580
- 20
--126.885955
-  0
-VERTEX
-  8
-0
- 10
--62.979580
- 20
--144.157955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.776330
- 20
--144.157955
-  0
-VERTEX
-  8
-0
- 10
--62.776330
- 20
--126.885955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.877955
- 20
--144.056330
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--144.056330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--144.259580
-  0
-VERTEX
-  8
-0
- 10
--62.877955
- 20
--144.259580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--70.472580
- 20
--144.157955
-  0
-VERTEX
-  8
-0
- 10
--70.472580
- 20
--153.428955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--70.269330
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
--70.269330
- 20
--144.157955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--153.530580
-  0
-VERTEX
-  8
-0
- 10
--68.796155
- 20
--153.530580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--68.796155
- 20
--153.327330
-  0
-VERTEX
-  8
-0
- 10
--70.370955
- 20
--153.327330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--68.694530
- 20
--153.428955
-  0
-VERTEX
-  8
-0
- 10
--68.694530
- 20
--153.378155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--68.897780
- 20
--153.378155
-  0
-VERTEX
-  8
-0
- 10
--68.897780
- 20
--153.428955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--167.754580
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--167.754580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--167.551330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--167.551330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--167.652955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--167.652955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--170.192955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--170.192955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--167.017955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--167.017955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--167.119580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--167.119580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--166.916330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--166.916330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--167.017955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--167.195755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--167.195755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--167.017955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--155.765755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--155.587955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--155.765755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--155.587955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--144.132580
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--144.132580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--143.929330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--143.929330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--144.030955
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--141.567155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--144.030955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-49.618670
- 20
--136.283955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--136.283955
-  0
-VERTEX
-  8
-0
- 10
-49.415420
- 20
--141.567155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--136.182330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--136.182330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--136.385580
-  0
-VERTEX
-  8
-0
- 10
-49.517045
- 20
--136.385580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--136.283955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--134.505955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--134.505955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--136.283955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.478420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-45.478420
- 20
--138.442955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.681670
- 20
--138.442955
-  0
-VERTEX
-  8
-0
- 10
-45.681670
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--138.341330
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--138.341330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--138.544580
-  0
-VERTEX
-  8
-0
- 10
-45.580045
- 20
--138.544580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
-42.151045
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.151045
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.252670
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
-42.252670
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.049420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-42.049420
- 20
--139.712955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--137.071330
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--137.071330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--137.274580
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--137.274580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--137.172955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--136.537955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--137.172955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--136.436330
-  0
-VERTEX
-  8
-0
- 10
-42.151045
- 20
--136.436330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.151045
- 20
--136.639580
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--136.639580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.252670
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
-42.252670
- 20
--135.267955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.049420
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
-42.049420
- 20
--136.537955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--139.306580
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--139.306580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--139.103330
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--139.103330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--141.567155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--139.204955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--144.792955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--144.792955
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--141.567155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--144.691330
-  0
-VERTEX
-  8
-0
- 10
-45.326045
- 20
--144.691330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.326045
- 20
--144.894580
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--144.894580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--143.370580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--143.370580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--143.167330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--143.167330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--143.268955
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--141.567155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--141.567155
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--143.268955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--138.544580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--138.544580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--138.341330
-  0
-VERTEX
-  8
-0
- 10
-52.641245
- 20
--138.341330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.333670
- 20
--138.442955
-  0
-VERTEX
-  8
-0
- 10
-55.333670
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.130420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-55.130420
- 20
--138.442955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--137.909580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--137.909580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--137.706330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--137.706330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--137.985755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--137.985755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--137.807955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--127.825755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--127.647955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--127.647955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--127.825755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--127.546330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--127.546330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--127.749580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--127.749580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--127.546330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--127.546330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--127.749580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--127.749580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--127.647955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--128.028955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--127.647955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--113.677955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--113.677955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--114.058955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--113.779580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--113.779580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--113.576330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--113.576330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--113.779580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--113.779580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--113.576330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--113.576330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--113.677955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--113.855755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--113.855755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--113.677955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--99.885755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--99.707955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--99.707955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--99.885755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--99.606330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--99.606330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--99.809580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--99.809580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.130420
- 20
--99.707955
-  0
-VERTEX
-  8
-0
- 10
-55.130420
- 20
--100.342955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.333670
- 20
--100.342955
-  0
-VERTEX
-  8
-0
- 10
-55.333670
- 20
--99.707955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--100.241330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-53.962045
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--100.444580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--100.342955
-  0
-VERTEX
-  8
-0
- 10
-53.860420
- 20
--100.546155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-54.063670
- 20
--100.342955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--99.072955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--99.072955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--101.993955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--101.993955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--101.892330
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--101.892330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.977045
- 20
--102.095580
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--102.095580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--101.993955
-  0
-VERTEX
-  8
-0
- 10
-46.875420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-47.078670
- 20
--101.993955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--97.548955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--97.548955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--97.447330
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--97.447330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--97.650580
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--97.650580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--97.548955
-  0
-VERTEX
-  8
-0
- 10
-45.808670
- 20
--93.738955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--93.738955
-  0
-VERTEX
-  8
-0
- 10
-45.605420
- 20
--97.548955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--87.007955
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--86.830155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--86.830155
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--87.007955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--86.830155
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--86.830155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.158670
- 20
--85.763355
-  0
-VERTEX
-  8
-0
- 10
-52.158670
- 20
--85.737955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.955420
- 20
--85.737955
-  0
-VERTEX
-  8
-0
- 10
-51.955420
- 20
--85.763355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--85.839580
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--85.839580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--85.636330
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--85.636330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--88.912955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--90.640155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--90.640155
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--88.912955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--90.640155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--90.817955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--90.817955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--90.640155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.761420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-23.761420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.964670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-23.964670
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.847045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-23.863045
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-20.408670
- 20
--101.104955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--101.104955
-  0
-VERTEX
-  8
-0
- 10
-20.205420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--101.003330
-  0
-VERTEX
-  8
-0
- 10
-20.053045
- 20
--101.003330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-20.053045
- 20
--101.206580
-  0
-VERTEX
-  8
-0
- 10
-20.307045
- 20
--101.206580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.665420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-17.665420
- 20
--112.026955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.868670
- 20
--112.026955
-  0
-VERTEX
-  8
-0
- 10
-17.868670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.569420
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
-11.569420
- 20
--127.266955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.772670
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-11.772670
- 20
--115.201955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--127.368580
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--127.368580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--127.165330
-  0
-VERTEX
-  8
-0
- 10
-11.671045
- 20
--127.165330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.204420
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-12.204420
- 20
--133.235955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.407670
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-12.407670
- 20
--127.266955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--133.134330
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--133.134330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--133.337580
-  0
-VERTEX
-  8
-0
- 10
-12.306045
- 20
--133.337580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--133.235955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--133.235955
-  0
-VERTEX
-  8
-0
- 10
-11.391670
- 20
--132.092955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
-11.188420
- 20
--133.235955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--132.194580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
-11.290045
- 20
--131.991330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
-9.385045
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.385045
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--138.468330
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--138.468330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--138.671580
-  0
-VERTEX
-  8
-0
- 10
-10.147045
- 20
--138.671580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.740670
- 20
--138.569955
-  0
-VERTEX
-  8
-0
- 10
-9.740670
- 20
--120.027955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.537420
- 20
--120.027955
-  0
-VERTEX
-  8
-0
- 10
-9.537420
- 20
--138.569955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--119.926330
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--119.926330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--120.129580
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--120.129580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.438670
- 20
--120.027955
-  0
-VERTEX
-  8
-0
- 10
-6.438670
- 20
--106.946955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.235420
- 20
--106.946955
-  0
-VERTEX
-  8
-0
- 10
-6.235420
- 20
--120.027955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--106.845330
-  0
-VERTEX
-  8
-0
- 10
-6.083045
- 20
--106.845330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.083045
- 20
--107.048580
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--107.048580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--107.048580
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--107.048580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--106.845330
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--106.845330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--106.946955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--106.946955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--100.342955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--100.342955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
-7.683245
- 20
--100.444580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.683245
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--100.241330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--97.904580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--97.701330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--111.163330
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--111.163330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--111.366580
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--111.366580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
-8.521420
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-8.724670
- 20
--111.264955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--118.021330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-8.623045
- 20
--118.224580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.394420
- 20
--120.916955
-  0
-VERTEX
-  8
-0
- 10
-8.394420
- 20
--144.665955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.597670
- 20
--144.665955
-  0
-VERTEX
-  8
-0
- 10
-8.597670
- 20
--120.916955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--145.935955
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--142.252955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--145.935955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--142.151330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--142.354580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.993670
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
-1.993670
- 20
--139.966955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.790420
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-1.790420
- 20
--142.252955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--139.865330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--139.865330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--140.068580
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--140.068580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--137.757155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--139.966955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--139.966955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--140.068580
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--140.068580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--139.865330
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--139.865330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.520420
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-0.520420
- 20
--141.998955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.723670
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
-0.723670
- 20
--139.966955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--4.559580
- 20
--136.537955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
--4.356330
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--136.436330
-  0
-VERTEX
-  8
-0
- 10
--7.124955
- 20
--136.436330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--7.124955
- 20
--136.639580
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--136.639580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.023330
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
--7.023330
- 20
--128.155955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--7.226580
- 20
--128.155955
-  0
-VERTEX
-  8
-0
- 10
--7.226580
- 20
--136.537955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.124955
- 20
--128.257580
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--128.257580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--128.054330
-  0
-VERTEX
-  8
-0
- 10
--7.124955
- 20
--128.054330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--128.155955
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--116.217955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--128.155955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--116.116330
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--116.116330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--116.319580
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--116.319580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.531330
- 20
--116.217955
-  0
-VERTEX
-  8
-0
- 10
--7.531330
- 20
--106.565955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--7.734580
- 20
--106.565955
-  0
-VERTEX
-  8
-0
- 10
--7.734580
- 20
--116.217955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--106.464330
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--106.464330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--106.667580
-  0
-VERTEX
-  8
-0
- 10
--7.632955
- 20
--106.667580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.436330
- 20
--106.565955
-  0
-VERTEX
-  8
-0
- 10
--9.436330
- 20
--105.422955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.639580
- 20
--105.422955
-  0
-VERTEX
-  8
-0
- 10
--9.639580
- 20
--106.565955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--105.321330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--105.321330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--105.524580
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--105.524580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--104.254580
-  0
-VERTEX
-  8
-0
- 10
--5.600955
- 20
--104.254580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.600955
- 20
--104.051330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--104.051330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.702580
- 20
--104.152955
-  0
-VERTEX
-  8
-0
- 10
--5.702580
- 20
--105.803955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.499330
- 20
--105.803955
-  0
-VERTEX
-  8
-0
- 10
--5.499330
- 20
--104.152955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.499330
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--5.499330
- 20
--101.612955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.702580
- 20
--101.612955
-  0
-VERTEX
-  8
-0
- 10
--5.702580
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.600955
- 20
--101.511330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--101.511330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--101.714580
-  0
-VERTEX
-  8
-0
- 10
--5.600955
- 20
--101.714580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--9.537955
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--11.315955
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.315955
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.417580
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--11.417580
- 20
--104.914955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.214330
- 20
--104.914955
-  0
-VERTEX
-  8
-0
- 10
--11.214330
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--109.994955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--109.994955
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--110.096580
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--110.096580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--109.893330
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--109.893330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--8.801330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--8.801330
- 20
--111.010955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.004580
- 20
--111.010955
-  0
-VERTEX
-  8
-0
- 10
--9.004580
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--8.902955
- 20
--110.909330
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--110.909330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--111.112580
-  0
-VERTEX
-  8
-0
- 10
--8.902955
- 20
--111.112580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--111.010955
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--107.327955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--111.010955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--107.327955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--107.378780
-  0
-VERTEX
-  8
-0
- 10
--12.585955
- 20
--107.378780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.585955
- 20
--107.175530
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--107.175530
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.687580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--12.687580
- 20
--107.327955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.484330
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
--12.484330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.585955
- 20
--107.226330
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--107.226330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.712955
- 20
--107.429580
-  0
-VERTEX
-  8
-0
- 10
--12.585955
- 20
--107.429580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--111.518955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--111.518955
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--111.620580
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--111.620580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--111.417330
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--111.417330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--111.518955
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--111.518955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--116.979955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--117.081580
-  0
-VERTEX
-  8
-0
- 10
--6.870955
- 20
--117.081580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.870955
- 20
--116.878330
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--116.878330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.972580
- 20
--116.979955
-  0
-VERTEX
-  8
-0
- 10
--6.972580
- 20
--125.869955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.769330
- 20
--125.869955
-  0
-VERTEX
-  8
-0
- 10
--6.769330
- 20
--116.979955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.870955
- 20
--125.768330
-  0
-VERTEX
-  8
-0
- 10
--11.696955
- 20
--125.768330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.696955
- 20
--125.971580
-  0
-VERTEX
-  8
-0
- 10
--6.870955
- 20
--125.971580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.798580
- 20
--125.869955
-  0
-VERTEX
-  8
-0
- 10
--11.798580
- 20
--141.998955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.595330
- 20
--141.998955
-  0
-VERTEX
-  8
-0
- 10
--11.595330
- 20
--125.869955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--148.145755
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--149.872955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--149.872955
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--148.145755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--149.136330
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--149.136330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--149.339580
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--149.339580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--149.237955
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--149.237955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--155.587955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.967955
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
--19.697955
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--153.936955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--155.587955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--20.866330
- 20
--153.682955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--153.682955
-  0
-VERTEX
-  8
-0
- 10
--21.069580
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--161.937955
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--163.588955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--161.937955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--163.842955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--163.842955
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--163.588955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--163.842955
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--163.588955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--163.842955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--163.207955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--163.588955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--163.309580
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--163.309580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--163.106330
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--163.106330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--163.309580
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--163.309580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.172955
- 20
--163.106330
-  0
-VERTEX
-  8
-0
- 10
--12.077955
- 20
--163.106330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--163.207955
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--163.385755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--163.385755
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--163.207955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
--3.899155
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.899155
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.899155
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
--3.899155
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
-3.873245
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.873245
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.873245
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
-3.873245
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--148.501330
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--148.501330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.797045
- 20
--148.704580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--148.704580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--148.602955
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--148.602955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--154.952955
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--156.527755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--156.527755
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--154.952955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--156.426130
-  0
-VERTEX
-  8
-0
- 10
-1.104645
- 20
--156.426130
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.104645
- 20
--156.629380
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--156.629380
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--153.581330
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--153.581330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--153.784580
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--153.784580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.740670
- 20
--153.682955
-  0
-VERTEX
-  8
-0
- 10
-9.740670
- 20
--152.285955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-9.537420
- 20
--152.285955
-  0
-VERTEX
-  8
-0
- 10
-9.537420
- 20
--153.682955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--152.184330
-  0
-VERTEX
-  8
-0
- 10
-6.591045
- 20
--152.184330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.591045
- 20
--152.387580
-  0
-VERTEX
-  8
-0
- 10
-9.639045
- 20
--152.387580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.692670
- 20
--152.285955
-  0
-VERTEX
-  8
-0
- 10
-6.692670
- 20
--140.474955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.489420
- 20
--140.474955
-  0
-VERTEX
-  8
-0
- 10
-6.489420
- 20
--152.285955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.692670
- 20
--140.474955
-  0
-VERTEX
-  8
-0
- 10
-6.692670
- 20
--135.394955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.489420
- 20
--135.394955
-  0
-VERTEX
-  8
-0
- 10
-6.489420
- 20
--140.474955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.591045
- 20
--135.496580
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--135.496580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--135.293330
-  0
-VERTEX
-  8
-0
- 10
-6.591045
- 20
--135.293330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.200670
- 20
--135.394955
-  0
-VERTEX
-  8
-0
- 10
-7.200670
- 20
--133.870955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.997420
- 20
--133.870955
-  0
-VERTEX
-  8
-0
- 10
-6.997420
- 20
--135.394955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--133.769330
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--133.769330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--133.972580
-  0
-VERTEX
-  8
-0
- 10
-7.099045
- 20
--133.972580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.727420
- 20
--133.870955
-  0
-VERTEX
-  8
-0
- 10
-5.727420
- 20
--133.997955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.930670
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
-5.930670
- 20
--133.870955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--133.896330
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--133.896330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--134.099580
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--134.099580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--133.997955
-  0
-VERTEX
-  8
-0
- 10
-1.028420
- 20
--134.632955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-1.231670
- 20
--133.997955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--134.531330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-1.130045
- 20
--134.734580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--134.531330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--134.734580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--133.464580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
--4.457955
- 20
--133.261330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--133.464580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--133.261330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.723670
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
-0.723670
- 20
--125.996955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.520420
- 20
--125.996955
-  0
-VERTEX
-  8
-0
- 10
-0.520420
- 20
--133.362955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--126.098580
-  0
-VERTEX
-  8
-0
- 10
-0.876045
- 20
--126.098580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.876045
- 20
--125.895330
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--125.895330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.977670
- 20
--125.996955
-  0
-VERTEX
-  8
-0
- 10
-0.977670
- 20
--124.599955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.774420
- 20
--124.599955
-  0
-VERTEX
-  8
-0
- 10
-0.774420
- 20
--125.996955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.876045
- 20
--124.701580
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--124.701580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--124.498330
-  0
-VERTEX
-  8
-0
- 10
-0.876045
- 20
--124.498330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--124.599955
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--124.549155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--124.549155
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--124.599955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.977670
- 20
--124.599955
-  0
-VERTEX
-  8
-0
- 10
-0.977670
- 20
--106.184955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.774420
- 20
--106.184955
-  0
-VERTEX
-  8
-0
- 10
-0.774420
- 20
--124.599955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--2.806955
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.806955
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.908580
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--2.908580
- 20
--120.789955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.705330
- 20
--120.789955
-  0
-VERTEX
-  8
-0
- 10
--2.705330
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.806955
- 20
--120.688330
-  0
-VERTEX
-  8
-0
- 10
--4.076955
- 20
--120.688330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.076955
- 20
--120.891580
-  0
-VERTEX
-  8
-0
- 10
--2.806955
- 20
--120.891580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.178580
- 20
--120.789955
-  0
-VERTEX
-  8
-0
- 10
--4.178580
- 20
--128.536955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.975330
- 20
--128.536955
-  0
-VERTEX
-  8
-0
- 10
--3.975330
- 20
--120.789955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--124.015755
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--123.837955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--123.837955
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--124.015755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--123.939580
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--123.939580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--123.736330
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--123.736330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.663420
- 20
--130.695955
-  0
-VERTEX
-  8
-0
- 10
-1.663420
- 20
--133.489955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.866670
- 20
--133.489955
-  0
-VERTEX
-  8
-0
- 10
-1.866670
- 20
--130.695955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.765045
- 20
--133.591580
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.591580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.388330
-  0
-VERTEX
-  8
-0
- 10
-1.765045
- 20
--133.388330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.591580
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--133.591580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--133.388330
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.388330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.533670
- 20
--133.489955
-  0
-VERTEX
-  8
-0
- 10
-4.533670
- 20
--133.362955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.330420
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
-4.330420
- 20
--133.489955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.261330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--133.464580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.279620
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
-4.279620
- 20
--133.489955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.482870
- 20
--133.489955
-  0
-VERTEX
-  8
-0
- 10
-4.482870
- 20
--133.362955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--137.757155
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--139.839955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--139.839955
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--137.757155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--139.738330
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--139.738330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--139.941580
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--139.941580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.289580
- 20
--139.839955
-  0
-VERTEX
-  8
-0
- 10
--3.289580
- 20
--144.792955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.086330
- 20
--144.792955
-  0
-VERTEX
-  8
-0
- 10
--3.086330
- 20
--139.839955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--144.691330
-  0
-VERTEX
-  8
-0
- 10
--3.441955
- 20
--144.691330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.441955
- 20
--144.894580
-  0
-VERTEX
-  8
-0
- 10
--3.187955
- 20
--144.894580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.173420
- 20
--147.078955
-  0
-VERTEX
-  8
-0
- 10
-18.173420
- 20
--154.063955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.376670
- 20
--154.063955
-  0
-VERTEX
-  8
-0
- 10
-18.376670
- 20
--147.078955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.275045
- 20
--154.165580
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--154.165580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.402045
- 20
--153.962330
-  0
-VERTEX
-  8
-0
- 10
-18.275045
- 20
--153.962330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--154.063955
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--154.063955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.440670
- 20
--147.840955
-  0
-VERTEX
-  8
-0
- 10
-22.440670
- 20
--145.681955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.237420
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-22.237420
- 20
--147.840955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--145.580330
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--145.580330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--145.783580
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--145.783580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--145.681955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--145.681955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--142.506955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--142.506955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--142.506955
-  0
-VERTEX
-  8
-0
- 10
-23.583670
- 20
--136.283955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--136.283955
-  0
-VERTEX
-  8
-0
- 10
-23.380420
- 20
--142.506955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--136.385580
-  0
-VERTEX
-  8
-0
- 10
-23.736045
- 20
--136.385580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.736045
- 20
--136.182330
-  0
-VERTEX
-  8
-0
- 10
-23.482045
- 20
--136.182330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.837670
- 20
--136.283955
-  0
-VERTEX
-  8
-0
- 10
-23.837670
- 20
--135.775955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-23.634420
- 20
--135.775955
-  0
-VERTEX
-  8
-0
- 10
-23.634420
- 20
--136.283955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--142.633955
-  0
-VERTEX
-  8
-0
- 10
-25.920420
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-26.123670
- 20
--142.633955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--142.760955
-  0
-VERTEX
-  8
-0
- 10
-37.172670
- 20
--141.236955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--141.236955
-  0
-VERTEX
-  8
-0
- 10
-36.969420
- 20
--142.760955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--141.338580
-  0
-VERTEX
-  8
-0
- 10
-37.833045
- 20
--141.338580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.833045
- 20
--141.135330
-  0
-VERTEX
-  8
-0
- 10
-37.071045
- 20
--141.135330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-37.934670
- 20
--141.236955
-  0
-VERTEX
-  8
-0
- 10
-37.934670
- 20
--123.075955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-37.731420
- 20
--123.075955
-  0
-VERTEX
-  8
-0
- 10
-37.731420
- 20
--141.236955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.428420
- 20
--123.075955
-  0
-VERTEX
-  8
-0
- 10
-26.428420
- 20
--124.980955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.631670
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
-26.631670
- 20
--123.075955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--125.082580
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--125.082580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.657045
- 20
--124.879330
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--124.879330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
-26.555420
- 20
--126.428755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-26.758670
- 20
--124.980955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.276045
- 20
--123.177580
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--123.177580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--122.974330
-  0
-VERTEX
-  8
-0
- 10
-26.276045
- 20
--122.974330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.631670
- 20
--123.075955
-  0
-VERTEX
-  8
-0
- 10
-26.631670
- 20
--107.327955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-26.428420
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
-26.428420
- 20
--123.075955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--107.226330
-  0
-VERTEX
-  8
-0
- 10
-25.514045
- 20
--107.226330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.514045
- 20
--107.429580
-  0
-VERTEX
-  8
-0
- 10
-26.530045
- 20
--107.429580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.615670
- 20
--107.327955
-  0
-VERTEX
-  8
-0
- 10
-25.615670
- 20
--104.279955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-25.412420
- 20
--104.279955
-  0
-VERTEX
-  8
-0
- 10
-25.412420
- 20
--107.327955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--96.786955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--93.129330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--93.129330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--93.332580
-  0
-VERTEX
-  8
-0
- 10
-11.163045
- 20
--93.332580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--93.230955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--90.259155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--90.259155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--93.230955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-4.965420
- 20
--100.342955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--100.342955
-  0
-VERTEX
-  8
-0
- 10
-5.168670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--100.241330
-  0
-VERTEX
-  8
-0
- 10
-4.990845
- 20
--100.241330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-4.990845
- 20
--100.444580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--100.444580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--6.464580
- 20
--113.042955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--6.261330
- 20
--111.264955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--112.941330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--112.941330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--113.144580
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--113.144580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--15.151330
- 20
--103.898955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--103.898955
-  0
-VERTEX
-  8
-0
- 10
--15.354580
- 20
--107.277155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--104.000580
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--104.000580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--103.797330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--103.797330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--130.822955
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--133.159755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--130.822955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--22.974580
- 20
--133.362955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--22.771330
- 20
--133.159755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--163.741330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--163.741330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--163.944580
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--163.944580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--163.842955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--163.919155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--163.919155
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--163.842955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
-3.695420
- 20
--169.557955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--169.557955
-  0
-VERTEX
-  8
-0
- 10
-3.898670
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--170.192955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--168.465755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--168.465755
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--170.192955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--168.465755
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--168.287955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--168.287955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--168.465755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--171.462955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--171.462955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--126.428755
-  0
-VERTEX
-  8
-0
- 10
-21.678670
- 20
--124.599955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--124.599955
-  0
-VERTEX
-  8
-0
- 10
-21.475420
- 20
--126.428755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--124.701580
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--124.701580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--124.498330
-  0
-VERTEX
-  8
-0
- 10
-21.577045
- 20
--124.498330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--124.599955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--119.138955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--124.599955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--119.037330
-  0
-VERTEX
-  8
-0
- 10
-21.450045
- 20
--119.037330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.450045
- 20
--119.240580
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--119.240580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.551670
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-21.551670
- 20
--117.233955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.348420
- 20
--117.233955
-  0
-VERTEX
-  8
-0
- 10
-21.348420
- 20
--119.138955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.450045
- 20
--117.132330
-  0
-VERTEX
-  8
-0
- 10
-21.323045
- 20
--117.132330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.323045
- 20
--117.335580
-  0
-VERTEX
-  8
-0
- 10
-21.450045
- 20
--117.335580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.424670
- 20
--117.233955
-  0
-VERTEX
-  8
-0
- 10
-21.424670
- 20
--96.786955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-21.221420
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
-21.221420
- 20
--117.233955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.323045
- 20
--96.685330
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--96.685330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--96.888580
-  0
-VERTEX
-  8
-0
- 10
-21.323045
- 20
--96.888580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--96.786955
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--93.738955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--93.738955
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--96.786955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--93.738955
-  0
-VERTEX
-  8
-0
- 10
-16.344670
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-16.141420
- 20
--93.738955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-15.227045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-16.243045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.319155
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
--63.512955
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--63.512955
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
--62.319155
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--63.614580
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
--63.614580
- 20
--91.452955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--63.411330
- 20
--91.452955
-  0
-VERTEX
-  8
-0
- 10
--63.411330
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--63.512955
- 20
--91.351330
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--91.351330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--91.554580
-  0
-VERTEX
-  8
-0
- 10
--63.512955
- 20
--91.554580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--96.634580
-  0
-VERTEX
-  8
-0
- 10
--69.227955
- 20
--96.634580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--69.227955
- 20
--96.431330
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--96.431330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--69.126330
- 20
--96.532955
-  0
-VERTEX
-  8
-0
- 10
--69.126330
- 20
--93.992955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--69.329580
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
--69.329580
- 20
--96.532955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--69.227955
- 20
--94.094580
-  0
-VERTEX
-  8
-0
- 10
--62.319155
- 20
--94.094580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.319155
- 20
--93.891330
-  0
-VERTEX
-  8
-0
- 10
--69.227955
- 20
--93.891330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.217530
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
--62.217530
- 20
--86.372955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.420780
- 20
--86.372955
-  0
-VERTEX
-  8
-0
- 10
--62.420780
- 20
--93.992955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
--62.344580
- 20
--96.456755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--96.456755
-  0
-VERTEX
-  8
-0
- 10
--62.141330
- 20
--95.262955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--64.249580
- 20
--99.199955
-  0
-VERTEX
-  8
-0
- 10
--64.249580
- 20
--100.977955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--64.046330
- 20
--100.977955
-  0
-VERTEX
-  8
-0
- 10
--64.046330
- 20
--99.199955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--100.977955
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--105.422955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--105.422955
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--100.977955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--122.669580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--122.669580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--122.466330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--122.466330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--122.567955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--122.390155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--122.390155
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--122.567955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--126.936755
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--127.012955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--127.012955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--126.936755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--126.911330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--126.911330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--127.114580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--127.114580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--132.194580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--131.991330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--132.092955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--132.016755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--132.016755
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--132.092955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--137.172955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--137.172955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--137.071330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--137.071330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--137.274580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--137.274580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--142.176755
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--142.252955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--142.252955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--142.176755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--142.354580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.637955
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--142.151330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--146.062955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--147.332955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--147.332955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--146.062955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--147.332955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--148.602955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--148.602955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--147.332955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--148.501330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--148.501330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--148.704580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--148.704580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--147.231330
-  0
-VERTEX
-  8
-0
- 10
--47.891955
- 20
--147.231330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.891955
- 20
--147.434580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--147.434580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.891955
- 20
--147.231330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--147.231330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--147.434580
-  0
-VERTEX
-  8
-0
- 10
--47.891955
- 20
--147.434580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--147.332955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--147.256755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--147.256755
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--147.332955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--147.231330
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--147.231330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--147.434580
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--147.434580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--147.231330
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--147.231330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--147.434580
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--147.434580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--147.332955
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--149.669755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--149.669755
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--147.332955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--57.899580
- 20
--138.442955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--138.442955
-  0
-VERTEX
-  8
-0
- 10
--57.696330
- 20
--138.239755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--138.341330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--138.341330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--138.544580
-  0
-VERTEX
-  8
-0
- 10
--57.797955
- 20
--138.544580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--138.442955
-  0
-VERTEX
-  8
-0
- 10
--58.331330
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--58.534580
- 20
--138.442955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.705755
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--58.432955
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--157.594580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--157.594580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--157.391330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--157.391330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--157.416755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--157.416755
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--157.492955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--157.416755
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--157.365955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--157.365955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--157.416755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--157.467580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.467580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.264330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--157.264330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.467580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--157.467580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--157.264330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.264330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--157.365955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--157.492955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--157.365955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--157.391330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.391330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--157.594580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--157.594580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.164730
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--46.164730
- 20
--157.365955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.367980
- 20
--157.365955
-  0
-VERTEX
-  8
-0
- 10
--46.367980
- 20
--157.492955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--46.342580
- 20
--160.032955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--46.139330
- 20
--157.492955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--159.931330
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--159.931330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--160.134580
-  0
-VERTEX
-  8
-0
- 10
--46.240955
- 20
--160.134580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--165.011330
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--165.011330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--51.447955
- 20
--165.214580
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--165.214580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--170.269155
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--172.097955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--172.097955
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--170.269155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--171.564580
-  0
-VERTEX
-  8
-0
- 10
--35.572955
- 20
--171.564580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.572955
- 20
--171.361330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--171.361330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--161.226755
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--161.302955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--161.302955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--161.226755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--161.404580
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--161.404580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--161.201330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--161.201330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--161.302955
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--161.226755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--161.226755
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--161.302955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--161.226755
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--160.032955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--161.226755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--154.851330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--154.851330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--155.054580
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--155.054580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--154.952955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--154.876755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--154.876755
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--154.952955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--148.704580
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--148.704580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--148.501330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--148.501330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--147.307580
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--147.307580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--147.104330
-  0
-VERTEX
-  8
-0
- 10
--33.159955
- 20
--147.104330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
--31.661330
- 20
--130.441955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--130.441955
-  0
-VERTEX
-  8
-0
- 10
--31.864580
- 20
--147.205955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--130.340330
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--130.340330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--130.543580
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--130.543580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.169330
- 20
--130.441955
-  0
-VERTEX
-  8
-0
- 10
--32.169330
- 20
--122.821955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.372580
- 20
--122.821955
-  0
-VERTEX
-  8
-0
- 10
--32.372580
- 20
--130.441955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--122.923580
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--122.923580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--122.720330
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--122.720330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.915330
- 20
--122.821955
-  0
-VERTEX
-  8
-0
- 10
--31.915330
- 20
--119.519955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.118580
- 20
--119.519955
-  0
-VERTEX
-  8
-0
- 10
--32.118580
- 20
--122.821955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--119.418330
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--119.418330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--119.621580
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--119.621580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.169330
- 20
--119.519955
-  0
-VERTEX
-  8
-0
- 10
--32.169330
- 20
--117.995955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.372580
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--32.372580
- 20
--119.519955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--117.894330
-  0
-VERTEX
-  8
-0
- 10
--34.175955
- 20
--117.894330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.175955
- 20
--118.097580
-  0
-VERTEX
-  8
-0
- 10
--32.270955
- 20
--118.097580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.074330
- 20
--117.995955
-  0
-VERTEX
-  8
-0
- 10
--34.074330
- 20
--115.201955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.277580
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
--34.277580
- 20
--117.995955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.175955
- 20
--115.100330
-  0
-VERTEX
-  8
-0
- 10
--35.699955
- 20
--115.100330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.699955
- 20
--115.303580
-  0
-VERTEX
-  8
-0
- 10
--34.175955
- 20
--115.303580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.598330
- 20
--115.201955
-  0
-VERTEX
-  8
-0
- 10
--35.598330
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.801580
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--35.801580
- 20
--115.201955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.699955
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--35.699955
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.578580
- 20
--105.422955
-  0
-VERTEX
-  8
-0
- 10
--29.578580
- 20
--111.264955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.375330
- 20
--111.264955
-  0
-VERTEX
-  8
-0
- 10
--29.375330
- 20
--105.422955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--117.487955
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--119.392955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--119.392955
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--117.487955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--119.291330
-  0
-VERTEX
-  8
-0
- 10
--24.955755
- 20
--119.291330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.955755
- 20
--119.494580
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--119.494580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.955755
- 20
--123.304580
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--123.304580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--123.101330
-  0
-VERTEX
-  8
-0
- 10
--24.955755
- 20
--123.101330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--125.107955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--123.202955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--133.159755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--131.457955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--20.434580
- 20
--133.362955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--20.231330
- 20
--133.159755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--133.159755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--133.362955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--17.691330
- 20
--131.457955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--131.457955
-  0
-VERTEX
-  8
-0
- 10
--17.894580
- 20
--133.159755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--138.442955
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--138.646155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--138.442955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--138.646155
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--139.077955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--139.077955
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--138.646155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--139.179580
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--139.179580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--138.976330
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--138.976330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--139.179580
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--139.179580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--138.976330
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--138.976330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--139.077955
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--137.985755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--137.985755
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--139.077955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--137.985755
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--137.807955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--137.807955
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--137.985755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.833330
- 20
--147.840955
-  0
-VERTEX
-  8
-0
- 10
--10.833330
- 20
--126.758955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.036580
- 20
--126.758955
-  0
-VERTEX
-  8
-0
- 10
--11.036580
- 20
--147.840955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--113.042955
-  0
-VERTEX
-  8
-0
- 10
--18.961330
- 20
--107.277155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--107.277155
-  0
-VERTEX
-  8
-0
- 10
--19.164580
- 20
--113.042955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.914330
- 20
--104.914955
-  0
-VERTEX
-  8
-0
- 10
--23.914330
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.117580
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
--24.117580
- 20
--104.914955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--101.714580
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--101.714580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--101.511330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--101.511330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--101.714580
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--101.714580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.015955
- 20
--101.511330
-  0
-VERTEX
-  8
-0
- 10
--25.997155
- 20
--101.511330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--98.818955
-  0
-VERTEX
-  8
-0
- 10
--13.246330
- 20
--94.500955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--94.500955
-  0
-VERTEX
-  8
-0
- 10
--13.449580
- 20
--98.818955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--94.399330
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--94.399330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--94.602580
-  0
-VERTEX
-  8
-0
- 10
--13.347955
- 20
--94.602580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--94.500955
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--94.500955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--86.118955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--90.868755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--86.220580
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--86.220580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--86.017330
-  0
-VERTEX
-  8
-0
- 10
--13.982955
- 20
--86.017330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--86.118955
-  0
-VERTEX
-  8
-0
- 10
--11.341330
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--11.544580
- 20
--86.118955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
--16.980155
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.980155
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
--15.252955
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.605755
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
--18.605755
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
--18.529580
- 20
--83.832955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--83.832955
-  0
-VERTEX
-  8
-0
- 10
--18.326330
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--83.934580
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--83.934580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--83.731330
-  0
-VERTEX
-  8
-0
- 10
--18.427955
- 20
--83.731330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--83.832955
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--85.102955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--83.832955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--85.102955
-  0
-VERTEX
-  8
-0
- 10
--16.624580
- 20
--90.868755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--90.868755
-  0
-VERTEX
-  8
-0
- 10
--16.421330
- 20
--85.102955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--94.094580
-  0
-VERTEX
-  8
-0
- 10
--5.346955
- 20
--94.094580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.346955
- 20
--93.891330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--93.891330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.245330
- 20
--93.992955
-  0
-VERTEX
-  8
-0
- 10
--5.245330
- 20
--90.182955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.448580
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
--5.448580
- 20
--93.992955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.346955
- 20
--90.284580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--90.284580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--90.081330
-  0
-VERTEX
-  8
-0
- 10
--5.346955
- 20
--90.081330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--97.244155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--98.691955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--98.691955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--97.244155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--98.691955
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--100.266755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--100.266755
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--98.691955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--102.959155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--102.959155
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--102.959155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--104.787955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--104.787955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--102.959155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--82.486755
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--82.562955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--82.486755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--82.664580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--82.461330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--82.461330
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--82.461330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--82.664580
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--82.664580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--82.562955
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--90.182955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--82.562955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--90.182955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--103.898955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--103.898955
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--104.000580
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--104.000580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--103.797330
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--103.797330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--103.898955
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--105.676955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--105.676955
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--103.898955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--105.575330
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--105.575330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--105.778580
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--105.778580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--105.676955
-  0
-VERTEX
-  8
-0
- 10
-31.889420
- 20
--119.138955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-32.092670
- 20
--105.676955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--119.240580
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--119.240580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--119.037330
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--119.037330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--119.138955
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--126.123955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--126.123955
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--119.138955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--126.123955
-  0
-VERTEX
-  8
-0
- 10
-32.143420
- 20
--128.282955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--128.282955
-  0
-VERTEX
-  8
-0
- 10
-32.346670
- 20
--126.123955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--128.384580
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--128.384580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--128.181330
-  0
-VERTEX
-  8
-0
- 10
-32.245045
- 20
--128.181330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--128.384580
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--128.384580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--128.181330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--128.181330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--127.368580
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--127.368580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--127.165330
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--127.165330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.124670
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
-34.124670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.921420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-33.921420
- 20
--127.266955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--118.224580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--118.021330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.124670
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-34.124670
- 20
--97.802955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.921420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-33.921420
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--97.701330
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--97.701330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--97.904580
-  0
-VERTEX
-  8
-0
- 10
-34.023045
- 20
--97.904580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--102.781330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.991045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-33.007045
- 20
--102.984580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--101.155755
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--102.882955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--101.155755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--102.984580
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--102.984580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--102.781330
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--102.781330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--102.882955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--104.406955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--102.882955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--104.406955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--106.057955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--106.057955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--104.406955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--112.407955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--114.058955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--114.058955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--112.407955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--118.122955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--118.021330
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--118.021330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--118.224580
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--118.224580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--118.376955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--119.519955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--119.519955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--118.376955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--119.418330
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--119.418330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--119.621580
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--119.621580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--119.519955
-  0
-VERTEX
-  8
-0
- 10
-43.065420
- 20
--121.043955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--121.043955
-  0
-VERTEX
-  8
-0
- 10
-43.268670
- 20
--119.519955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--128.028955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--128.282955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--128.282955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--128.028955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--128.181330
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--128.181330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--128.384580
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--128.384580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-38.493420
- 20
--126.504955
-  0
-VERTEX
-  8
-0
- 10
-38.493420
- 20
--139.966955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-38.696670
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-38.696670
- 20
--126.504955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--139.966955
-  0
-VERTEX
-  8
-0
- 10
-31.381420
- 20
--142.125955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--142.125955
-  0
-VERTEX
-  8
-0
- 10
-31.584670
- 20
--139.966955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--142.024330
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--142.024330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--142.227580
-  0
-VERTEX
-  8
-0
- 10
-31.483045
- 20
--142.227580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--142.125955
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--144.411955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--142.125955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--146.443955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--146.443955
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--146.545580
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--146.545580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--146.342330
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--146.342330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.635420
- 20
--146.443955
-  0
-VERTEX
-  8
-0
- 10
-31.635420
- 20
--172.859955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.838670
- 20
--172.859955
-  0
-VERTEX
-  8
-0
- 10
-31.838670
- 20
--146.443955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--171.462955
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--169.735755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--169.735755
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--171.462955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--168.287955
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--168.110155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--168.110155
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--168.287955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--168.110155
-  0
-VERTEX
-  8
-0
- 10
-34.378670
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
-34.175420
- 20
--168.110155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-38.696670
- 20
--166.001955
-  0
-VERTEX
-  8
-0
- 10
-38.696670
- 20
--150.380955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-38.493420
- 20
--150.380955
-  0
-VERTEX
-  8
-0
- 10
-38.493420
- 20
--166.001955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--151.142955
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--152.870155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--152.870155
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--151.142955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--152.870155
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--153.047955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--153.047955
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--152.870155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--154.317955
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--154.495755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--154.495755
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--154.317955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--154.495755
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--155.587955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--154.495755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.817045
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
-34.912045
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.912045
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
-36.817045
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-34.912045
- 20
--155.486330
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--155.486330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.642045
- 20
--155.689580
-  0
-VERTEX
-  8
-0
- 10
-34.912045
- 20
--155.689580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
-33.743670
- 20
--155.333955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-33.540420
- 20
--155.587955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--155.333955
-  0
-VERTEX
-  8
-0
- 10
-31.203670
- 20
--151.015955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--151.015955
-  0
-VERTEX
-  8
-0
- 10
-31.000420
- 20
--155.333955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--150.914330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--150.914330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--151.117580
-  0
-VERTEX
-  8
-0
- 10
-31.102045
- 20
--151.117580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--151.015955
-  0
-VERTEX
-  8
-0
- 10
-30.568670
- 20
--143.141955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-30.365420
- 20
--151.015955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--143.243580
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--143.243580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--143.040330
-  0
-VERTEX
-  8
-0
- 10
-30.467045
- 20
--143.040330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.695670
- 20
--143.141955
-  0
-VERTEX
-  8
-0
- 10
-30.695670
- 20
--139.204955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.492420
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-30.492420
- 20
--143.141955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--139.306580
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--139.306580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--139.103330
-  0
-VERTEX
-  8
-0
- 10
-30.594045
- 20
--139.103330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--139.204955
-  0
-VERTEX
-  8
-0
- 10
-32.473670
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-32.270420
- 20
--139.204955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-32.372045
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--135.801330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--136.004580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.949670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-30.949670
- 20
--135.140955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-30.746420
- 20
--135.140955
-  0
-VERTEX
-  8
-0
- 10
-30.746420
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--135.039330
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--135.039330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--135.242580
-  0
-VERTEX
-  8
-0
- 10
-30.848045
- 20
--135.242580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--135.140955
-  0
-VERTEX
-  8
-0
- 10
-29.933670
- 20
--131.965955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--131.965955
-  0
-VERTEX
-  8
-0
- 10
-29.730420
- 20
--135.140955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--131.864330
-  0
-VERTEX
-  8
-0
- 10
-29.578045
- 20
--131.864330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-29.578045
- 20
--132.067580
-  0
-VERTEX
-  8
-0
- 10
-29.832045
- 20
--132.067580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
-34.277045
- 20
--133.464580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-34.277045
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
-32.321245
- 20
--133.261330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--132.550155
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--130.822955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--130.822955
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--132.550155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.707045
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
-43.852845
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--146.316955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--146.316955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--146.062955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--146.062955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--146.316955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--145.961330
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--145.961330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.262045
- 20
--146.164580
-  0
-VERTEX
-  8
-0
- 10
-42.532045
- 20
--146.164580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--158.127955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--158.127955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--158.127955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--158.127955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-42.430420
- 20
--160.667955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--160.667955
-  0
-VERTEX
-  8
-0
- 10
-42.633670
- 20
--160.286955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-47.510420
- 20
--156.222955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-47.713670
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--156.324580
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--156.324580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--156.121330
-  0
-VERTEX
-  8
-0
- 10
-47.612045
- 20
--156.121330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-48.983670
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-48.780420
- 20
--156.222955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--156.324580
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--156.324580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--156.121330
-  0
-VERTEX
-  8
-0
- 10
-48.882045
- 20
--156.121330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-50.253670
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-50.050420
- 20
--156.222955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--156.324580
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--156.324580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--156.121330
-  0
-VERTEX
-  8
-0
- 10
-50.152045
- 20
--156.121330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--155.968955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--156.222955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--156.324580
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--156.324580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.692045
- 20
--156.121330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--156.121330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--155.968955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--156.222955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--155.968955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-52.590420
- 20
--157.492955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
-52.793670
- 20
--156.222955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--154.140155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--154.317955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--154.317955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--154.140155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--154.419580
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--154.419580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--154.216330
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--154.216330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--165.646330
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--165.646330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--165.849580
-  0
-VERTEX
-  8
-0
- 10
-59.042045
- 20
--165.849580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--165.747955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--165.570155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--165.570155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--165.747955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--166.890955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--166.890955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-46.240420
- 20
--172.859955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--172.859955
-  0
-VERTEX
-  8
-0
- 10
-46.443670
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--172.758330
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--172.758330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--172.961580
-  0
-VERTEX
-  8
-0
- 10
-46.342045
- 20
--172.961580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.635420
- 20
--172.859955
-  0
-VERTEX
-  8
-0
- 10
-31.635420
- 20
--173.052995
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-31.838670
- 20
--173.052995
-  0
-VERTEX
-  8
-0
- 10
-31.838670
- 20
--172.859955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--172.951370
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--172.951370
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--173.154620
-  0
-VERTEX
-  8
-0
- 10
-31.737045
- 20
--173.154620
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.440670
- 20
--173.052995
-  0
-VERTEX
-  8
-0
- 10
-22.440670
- 20
--171.081955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.237420
- 20
--171.081955
-  0
-VERTEX
-  8
-0
- 10
-22.237420
- 20
--173.052995
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--170.980330
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--170.980330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.212045
- 20
--171.183580
-  0
-VERTEX
-  8
-0
- 10
-22.339045
- 20
--171.183580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--171.081955
-  0
-VERTEX
-  8
-0
- 10
-22.313670
- 20
--169.938955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-22.110420
- 20
--171.081955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--169.938955
-  0
-VERTEX
-  8
-0
- 10
-27.393670
- 20
--166.890955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--166.890955
-  0
-VERTEX
-  8
-0
- 10
-27.190420
- 20
--169.938955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--166.992580
-  0
-VERTEX
-  8
-0
- 10
-27.673045
- 20
--166.992580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-27.673045
- 20
--166.789330
-  0
-VERTEX
-  8
-0
- 10
-27.292045
- 20
--166.789330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--161.937955
-  0
-VERTEX
-  8
-0
- 10
-18.503670
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-18.300420
- 20
--161.937955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--147.866330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--147.866330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--148.069580
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--148.069580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--147.967955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--148.145755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--148.145755
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--147.967955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--147.459955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--147.459955
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--147.358330
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--147.358330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.892045
- 20
--147.561580
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--147.561580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--145.427955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--150.126955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--150.126955
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--148.806155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.012950
- 20
--150.025330
-  0
-VERTEX
-  8
-0
- 10
--0.393955
- 20
--150.025330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.393955
- 20
--150.228580
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--150.228580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.241045
- 20
--150.914330
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--150.914330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--151.117580
-  0
-VERTEX
-  8
-0
- 10
-0.241045
- 20
--151.117580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--151.015955
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--152.412955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--152.412955
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--151.015955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--152.514580
-  0
-VERTEX
-  8
-0
- 10
--1.206755
- 20
--152.514580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.206755
- 20
--152.311330
-  0
-VERTEX
-  8
-0
- 10
--1.282955
- 20
--152.311330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--151.015955
-  0
-VERTEX
-  8
-0
- 10
--1.181330
- 20
--148.806155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--148.806155
-  0
-VERTEX
-  8
-0
- 10
--1.384580
- 20
--151.015955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.337045
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
-4.381245
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--127.266955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--125.819155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--125.819155
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--127.266955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--125.819155
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--125.742955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--125.742955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--125.819155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--125.641330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--125.641330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--125.844580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--125.844580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--126.479580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--126.479580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--126.276330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--126.276330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--126.377955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--126.200155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--126.200155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--126.377955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--136.360155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--136.360155
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--136.360155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--136.537955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--136.360155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-69.557670
- 20
--148.348955
-  0
-VERTEX
-  8
-0
- 10
-69.557670
- 20
--113.804955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-69.354420
- 20
--113.804955
-  0
-VERTEX
-  8
-0
- 10
-69.354420
- 20
--148.348955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-69.456045
- 20
--113.703330
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--113.703330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--113.906580
-  0
-VERTEX
-  8
-0
- 10
-69.456045
- 20
--113.906580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--113.703330
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--113.703330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.313045
- 20
--113.906580
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--113.906580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-68.236820
- 20
--113.804955
-  0
-VERTEX
-  8
-0
- 10
-68.236820
- 20
--113.855755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.440070
- 20
--113.855755
-  0
-VERTEX
-  8
-0
- 10
-68.440070
- 20
--113.804955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--112.230155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--112.407955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--112.407955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--112.230155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--112.306330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--112.306330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--112.509580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--112.509580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--100.977955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--100.546155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--100.977955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--100.546155
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--98.437955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--98.437955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--100.546155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--98.539580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--98.539580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--98.336330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--98.336330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--98.539580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--98.539580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--98.336330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--98.336330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--98.437955
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--98.260155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--98.260155
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--98.437955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--92.265755
-  0
-VERTEX
-  8
-0
- 10
-57.238670
- 20
--92.087955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--92.087955
-  0
-VERTEX
-  8
-0
- 10
-57.035420
- 20
--92.265755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--91.986330
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--91.986330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--92.189580
-  0
-VERTEX
-  8
-0
- 10
-57.137045
- 20
--92.189580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--91.986330
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--91.986330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-52.057045
- 20
--92.189580
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--92.189580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.158670
- 20
--92.087955
-  0
-VERTEX
-  8
-0
- 10
-52.158670
- 20
--92.062555
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.955420
- 20
--92.062555
-  0
-VERTEX
-  8
-0
- 10
-51.955420
- 20
--92.087955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--95.059755
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--95.262955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--95.262955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--95.059755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--95.161330
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--95.161330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--95.364580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--95.364580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--99.530155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--99.530155
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--97.802955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--99.530155
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--99.707955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--99.707955
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--99.530155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--90.182955
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--88.455755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--88.455755
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--90.182955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--81.927955
-  0
-VERTEX
-  8
-0
- 10
-45.173670
- 20
--78.752955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--78.752955
-  0
-VERTEX
-  8
-0
- 10
-44.970420
- 20
--81.927955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--78.752955
-  0
-VERTEX
-  8
-0
- 10
-48.145420
- 20
--81.927955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--81.927955
-  0
-VERTEX
-  8
-0
- 10
-48.348670
- 20
--78.752955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--81.927955
-  0
-VERTEX
-  8
-0
- 10
-51.523670
- 20
--78.752955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--78.752955
-  0
-VERTEX
-  8
-0
- 10
-51.320420
- 20
--81.927955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.495420
- 20
--78.752955
-  0
-VERTEX
-  8
-0
- 10
-54.495420
- 20
--81.927955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.698670
- 20
--81.927955
-  0
-VERTEX
-  8
-0
- 10
-54.698670
- 20
--78.752955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--81.826330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--81.826330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--82.029580
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--82.029580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--81.826330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--81.826330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--82.029580
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--82.029580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--81.826330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--81.826330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--82.029580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--82.029580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--81.826330
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--81.826330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--82.029580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--82.029580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--81.927955
-  0
-VERTEX
-  8
-0
- 10
-41.998670
- 20
--78.752955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--78.752955
-  0
-VERTEX
-  8
-0
- 10
-41.795420
- 20
--81.927955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--78.854580
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--78.854580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--78.651330
-  0
-VERTEX
-  8
-0
- 10
-41.897045
- 20
--78.651330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--78.854580
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--78.854580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--78.651330
-  0
-VERTEX
-  8
-0
- 10
-45.072045
- 20
--78.651330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--78.854580
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--78.854580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--78.651330
-  0
-VERTEX
-  8
-0
- 10
-48.247045
- 20
--78.651330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--78.854580
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--78.854580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.597045
- 20
--78.651330
-  0
-VERTEX
-  8
-0
- 10
-51.422045
- 20
--78.651330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.162045
- 20
--94.526330
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--94.526330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--94.729580
-  0
-VERTEX
-  8
-0
- 10
-3.162045
- 20
--94.729580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--94.627955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--94.551755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--94.551755
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--94.627955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--122.466330
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--122.466330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.552955
- 20
--122.669580
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--122.669580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--122.567955
-  0
-VERTEX
-  8
-0
- 10
--2.451330
- 20
--122.390155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--122.390155
-  0
-VERTEX
-  8
-0
- 10
--2.654580
- 20
--122.567955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--124.574580
-  0
-VERTEX
-  8
-0
- 10
-6.972045
- 20
--124.574580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-6.972045
- 20
--124.371330
-  0
-VERTEX
-  8
-0
- 10
-5.067045
- 20
--124.371330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--128.968755
-  0
-VERTEX
-  8
-0
- 10
-2.425420
- 20
--132.727955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
-2.628670
- 20
--128.968755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--132.829580
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--132.829580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--132.626330
-  0
-VERTEX
-  8
-0
- 10
-2.527045
- 20
--132.626330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--145.427955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--132.727955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--145.529580
-  0
-VERTEX
-  8
-0
- 10
-10.020045
- 20
--145.529580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.020045
- 20
--145.326330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--145.326330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.918420
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
-9.918420
- 20
--151.904955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-10.121670
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
-10.121670
- 20
--145.427955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.020045
- 20
--152.006580
-  0
-VERTEX
-  8
-0
- 10
-12.433045
- 20
--152.006580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.433045
- 20
--151.803330
-  0
-VERTEX
-  8
-0
- 10
-10.020045
- 20
--151.803330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-12.331420
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
-12.331420
- 20
--162.953955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-12.534670
- 20
--162.953955
-  0
-VERTEX
-  8
-0
- 10
-12.534670
- 20
--151.904955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--165.112955
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--166.840155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--166.840155
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--165.112955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--166.840155
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--167.017955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--167.017955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--166.840155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--170.319955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--170.319955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--170.218330
-  0
-VERTEX
-  8
-0
- 10
--9.410955
- 20
--170.218330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.410955
- 20
--170.421580
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--170.421580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.309330
- 20
--170.319955
-  0
-VERTEX
-  8
-0
- 10
--9.309330
- 20
--167.652955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--9.512580
- 20
--167.652955
-  0
-VERTEX
-  8
-0
- 10
--9.512580
- 20
--170.319955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--9.410955
- 20
--167.551330
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--167.551330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--167.754580
-  0
-VERTEX
-  8
-0
- 10
--9.410955
- 20
--167.754580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--167.652955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--165.112955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--165.112955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--167.652955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--165.112955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--163.588955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--165.112955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--165.011330
-  0
-VERTEX
-  8
-0
- 10
--27.952955
- 20
--165.011330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.952955
- 20
--165.214580
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--165.214580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--165.112955
-  0
-VERTEX
-  8
-0
- 10
--27.851330
- 20
--163.919155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--163.919155
-  0
-VERTEX
-  8
-0
- 10
--28.054580
- 20
--165.112955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--32.397955
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--166.306755
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--166.306755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--163.842955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--163.842955
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--166.382955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--163.944580
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--163.944580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--163.741330
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--163.741330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--169.024580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--169.024580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--168.821330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--168.821330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--168.999155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--168.999155
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--168.922955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--169.024580
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--169.024580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.746955
- 20
--168.821330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--168.821330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--157.569155
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--157.619955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--157.619955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--157.569155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--157.518330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--157.518330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--157.721580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--157.721580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.477930
- 20
--157.619955
-  0
-VERTEX
-  8
-0
- 10
--37.477930
- 20
--157.492955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.681180
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--37.681180
- 20
--157.619955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--146.164580
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--146.164580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--145.961330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--145.961330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.852330
- 20
--146.062955
-  0
-VERTEX
-  8
-0
- 10
--35.852330
- 20
--145.046955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.055580
- 20
--145.046955
-  0
-VERTEX
-  8
-0
- 10
--36.055580
- 20
--146.062955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--145.148580
-  0
-VERTEX
-  8
-0
- 10
--34.810955
- 20
--145.148580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.810955
- 20
--144.945330
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--144.945330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.709330
- 20
--145.046955
-  0
-VERTEX
-  8
-0
- 10
--34.709330
- 20
--141.617955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.912580
- 20
--141.617955
-  0
-VERTEX
-  8
-0
- 10
--34.912580
- 20
--145.046955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.810955
- 20
--141.516330
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--141.516330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--141.719580
-  0
-VERTEX
-  8
-0
- 10
--34.810955
- 20
--141.719580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.852330
- 20
--141.617955
-  0
-VERTEX
-  8
-0
- 10
--35.852330
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--36.055580
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--36.055580
- 20
--141.617955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--136.004580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--136.004580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--135.801330
-  0
-VERTEX
-  8
-0
- 10
--35.953955
- 20
--135.801330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--135.826755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--135.826755
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--135.902955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--138.544580
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--138.544580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.778955
- 20
--138.341330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--138.341330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.524955
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--131.991330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
--32.524955
- 20
--132.194580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--134.734580
-  0
-VERTEX
-  8
-0
- 10
--32.905955
- 20
--134.734580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.905955
- 20
--134.531330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--134.531330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.007580
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
--33.007580
- 20
--137.172955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.804330
- 20
--137.172955
-  0
-VERTEX
-  8
-0
- 10
--32.804330
- 20
--134.632955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.905955
- 20
--137.071330
-  0
-VERTEX
-  8
-0
- 10
--35.445955
- 20
--137.071330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.445955
- 20
--137.274580
-  0
-VERTEX
-  8
-0
- 10
--32.905955
- 20
--137.274580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.547580
- 20
--137.172955
-  0
-VERTEX
-  8
-0
- 10
--35.547580
- 20
--141.109955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--35.344330
- 20
--141.109955
-  0
-VERTEX
-  8
-0
- 10
--35.344330
- 20
--137.172955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.445955
- 20
--141.211580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--141.211580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--141.008330
-  0
-VERTEX
-  8
-0
- 10
--35.445955
- 20
--141.008330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--141.109955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--145.986755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--145.986755
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--141.109955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.826955
- 20
--143.421330
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--143.421330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--143.624580
-  0
-VERTEX
-  8
-0
- 10
--35.826955
- 20
--143.624580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--143.421330
-  0
-VERTEX
-  8
-0
- 10
--47.764955
- 20
--143.421330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.764955
- 20
--143.624580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--143.624580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.866580
- 20
--143.522955
-  0
-VERTEX
-  8
-0
- 10
--47.866580
- 20
--145.808955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--47.663330
- 20
--145.808955
-  0
-VERTEX
-  8
-0
- 10
--47.663330
- 20
--143.522955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.764955
- 20
--145.707330
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--145.707330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--145.910580
-  0
-VERTEX
-  8
-0
- 10
--47.764955
- 20
--145.910580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--138.188955
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--138.239755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--138.188955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--138.239755
-  0
-VERTEX
-  8
-0
- 10
--56.629580
- 20
--139.712955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--56.426330
- 20
--138.239755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--139.611330
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--139.611330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--139.814580
-  0
-VERTEX
-  8
-0
- 10
--56.527955
- 20
--139.814580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--157.492955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--139.712955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--157.492955
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--160.667955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--160.667955
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--157.492955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--160.769580
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--160.769580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--160.566330
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--160.566330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.962580
- 20
--160.667955
-  0
-VERTEX
-  8
-0
- 10
--53.962580
- 20
--166.763955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.759330
- 20
--166.763955
-  0
-VERTEX
-  8
-0
- 10
--53.759330
- 20
--160.667955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--166.662330
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--166.662330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.892955
- 20
--166.865580
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--166.865580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--167.576755
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--167.576755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--166.484580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--166.281330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--155.156155
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--153.809955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--153.809955
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--155.156155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--153.911580
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--153.911580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--153.708330
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--153.708330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.521330
- 20
--153.809955
-  0
-VERTEX
-  8
-0
- 10
--54.521330
- 20
--151.904955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--54.724580
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
--54.724580
- 20
--153.809955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--152.006580
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--152.006580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--151.803330
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--151.803330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.124330
- 20
--151.904955
-  0
-VERTEX
-  8
-0
- 10
--53.124330
- 20
--145.808955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.327580
- 20
--145.808955
-  0
-VERTEX
-  8
-0
- 10
--53.327580
- 20
--151.904955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--145.707330
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--145.707330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--145.910580
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--145.910580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--145.808955
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--143.726155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--143.726155
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--145.808955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--143.726155
-  0
-VERTEX
-  8
-0
- 10
--55.156330
- 20
--140.855955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--140.855955
-  0
-VERTEX
-  8
-0
- 10
--55.359580
- 20
--143.726155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--140.957580
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--140.957580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--140.754330
-  0
-VERTEX
-  8
-0
- 10
--55.257955
- 20
--140.754330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.124330
- 20
--140.855955
-  0
-VERTEX
-  8
-0
- 10
--53.124330
- 20
--137.096755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.327580
- 20
--137.096755
-  0
-VERTEX
-  8
-0
- 10
--53.327580
- 20
--140.855955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--137.198380
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--137.198380
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--136.995130
-  0
-VERTEX
-  8
-0
- 10
--53.225955
- 20
--136.995130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--137.198380
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--137.198380
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--136.995130
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--136.995130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--137.096755
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--130.949955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--130.949955
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--137.096755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--130.848330
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--130.848330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--131.051580
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--131.051580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.362330
- 20
--130.949955
-  0
-VERTEX
-  8
-0
- 10
--52.362330
- 20
--121.551955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--52.565580
- 20
--121.551955
-  0
-VERTEX
-  8
-0
- 10
--52.565580
- 20
--130.949955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--121.450330
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--121.450330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--53.860955
- 20
--121.653580
-  0
-VERTEX
-  8
-0
- 10
--52.463955
- 20
--121.653580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--120.561330
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--120.561330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--120.764580
-  0
-VERTEX
-  8
-0
- 10
--46.266355
- 20
--120.764580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--120.662955
-  0
-VERTEX
-  8
-0
- 10
--48.501580
- 20
--128.155955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--128.155955
-  0
-VERTEX
-  8
-0
- 10
--48.298330
- 20
--120.662955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--128.054330
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--128.054330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.542955
- 20
--128.257580
-  0
-VERTEX
-  8
-0
- 10
--48.399955
- 20
--128.257580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--128.155955
-  0
-VERTEX
-  8
-0
- 10
--49.644580
- 20
--129.629155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--129.629155
-  0
-VERTEX
-  8
-0
- 10
--49.441330
- 20
--128.155955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--139.712955
-  0
-VERTEX
-  8
-0
- 10
--59.982330
- 20
--113.931955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--113.931955
-  0
-VERTEX
-  8
-0
- 10
--60.185580
- 20
--139.712955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--113.830330
-  0
-VERTEX
-  8
-0
- 10
--65.951355
- 20
--113.830330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--65.951355
- 20
--114.033580
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--114.033580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--65.849730
- 20
--113.931955
-  0
-VERTEX
-  8
-0
- 10
--65.849730
- 20
--113.906555
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--66.052980
- 20
--113.906555
-  0
-VERTEX
-  8
-0
- 10
--66.052980
- 20
--113.931955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--65.417955
- 20
--96.431330
-  0
-VERTEX
-  8
-0
- 10
--67.957955
- 20
--96.431330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--67.957955
- 20
--96.634580
-  0
-VERTEX
-  8
-0
- 10
--65.417955
- 20
--96.634580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--68.059580
- 20
--96.532955
-  0
-VERTEX
-  8
-0
- 10
--68.059580
- 20
--99.072955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--67.856330
- 20
--99.072955
-  0
-VERTEX
-  8
-0
- 10
--67.856330
- 20
--96.532955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--67.957955
- 20
--98.971330
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--98.971330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--71.132955
- 20
--99.174580
-  0
-VERTEX
-  8
-0
- 10
--67.957955
- 20
--99.174580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--118.122955
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--120.662955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--120.662955
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--118.122955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--120.764580
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--120.764580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.579555
- 20
--120.561330
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--120.561330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--120.662955
-  0
-VERTEX
-  8
-0
- 10
--37.706580
- 20
--121.805955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--121.805955
-  0
-VERTEX
-  8
-0
- 10
--37.503330
- 20
--120.662955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--121.907580
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--121.907580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.302955
- 20
--121.704330
-  0
-VERTEX
-  8
-0
- 10
--37.604955
- 20
--121.704330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--121.805955
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--123.126755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--123.126755
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--121.805955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--123.126755
-  0
-VERTEX
-  8
-0
- 10
--34.404580
- 20
--123.202955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--123.202955
-  0
-VERTEX
-  8
-0
- 10
--34.201330
- 20
--123.126755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--133.159755
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--133.362955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--133.362955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--133.159755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--133.261330
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--133.261330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--133.464580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--133.464580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--143.624580
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--143.624580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.142955
- 20
--143.421330
-  0
-VERTEX
-  8
-0
- 10
--25.412955
- 20
--143.421330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--143.522955
-  0
-VERTEX
-  8
-0
- 10
--24.041330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--24.244580
- 20
--143.522955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--147.078955
-  0
-VERTEX
-  8
-0
- 10
--22.339580
- 20
--151.650955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
--22.136330
- 20
--147.078955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--151.549330
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--151.549330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.507955
- 20
--151.752580
-  0
-VERTEX
-  8
-0
- 10
--22.237955
- 20
--151.752580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--151.650955
-  0
-VERTEX
-  8
-0
- 10
--23.609580
- 20
--153.936955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--23.406330
- 20
--151.650955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--24.879580
- 20
--154.317955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--154.317955
-  0
-VERTEX
-  8
-0
- 10
--24.676330
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--154.216330
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--154.216330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.047955
- 20
--154.419580
-  0
-VERTEX
-  8
-0
- 10
--24.777955
- 20
--154.419580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--153.936955
-  0
-VERTEX
-  8
-0
- 10
--15.989580
- 20
--158.254955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--158.254955
-  0
-VERTEX
-  8
-0
- 10
--15.786330
- 20
--153.936955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.887955
- 20
--158.153330
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--158.153330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--158.356580
-  0
-VERTEX
-  8
-0
- 10
--15.887955
- 20
--158.356580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.719580
- 20
--163.588955
-  0
-VERTEX
-  8
-0
- 10
--14.719580
- 20
--166.382955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.516330
- 20
--166.382955
-  0
-VERTEX
-  8
-0
- 10
--14.516330
- 20
--163.588955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--14.694155
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.694155
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--14.617955
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.694155
- 20
--166.281330
-  0
-VERTEX
-  8
-0
- 10
--17.081755
- 20
--166.281330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--17.081755
- 20
--166.484580
-  0
-VERTEX
-  8
-0
- 10
--14.694155
- 20
--166.484580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--161.937955
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--161.760155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--161.760155
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--161.937955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--161.760155
-  0
-VERTEX
-  8
-0
- 10
--10.071330
- 20
--160.032955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--160.032955
-  0
-VERTEX
-  8
-0
- 10
--10.274580
- 20
--161.760155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--162.674580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--162.674580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--162.471330
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--162.471330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--162.572955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--162.369755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--162.369755
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--162.572955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--169.557955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--169.557955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--167.856155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--169.659580
-  0
-VERTEX
-  8
-0
- 10
--1.917955
- 20
--169.659580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--1.917955
- 20
--169.456330
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--169.456330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.917955
- 20
--169.659580
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--169.659580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.012955
- 20
--169.456330
-  0
-VERTEX
-  8
-0
- 10
--1.917955
- 20
--169.456330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--169.557955
-  0
-VERTEX
-  8
-0
- 10
-0.088670
- 20
--167.856155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--167.856155
-  0
-VERTEX
-  8
-0
- 10
--0.114580
- 20
--169.557955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--156.146755
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--156.222955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--156.146755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--156.121330
-  0
-VERTEX
-  8
-0
- 10
--5.727955
- 20
--156.121330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--5.727955
- 20
--156.324580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--156.324580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--143.624580
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--143.624580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.822955
- 20
--143.421330
-  0
-VERTEX
-  8
-0
- 10
--5.092955
- 20
--143.421330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--143.522955
-  0
-VERTEX
-  8
-0
- 10
--3.721330
- 20
--143.319755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
--3.924580
- 20
--143.522955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--143.319755
-  0
-VERTEX
-  8
-0
- 10
-1.155420
- 20
--147.078955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--147.078955
-  0
-VERTEX
-  8
-0
- 10
-1.358670
- 20
--143.319755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--146.977330
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--146.977330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-0.622045
- 20
--147.180580
-  0
-VERTEX
-  8
-0
- 10
-1.257045
- 20
--147.180580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--146.520155
-  0
-VERTEX
-  8
-0
- 10
-7.505420
- 20
--146.697955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--146.697955
-  0
-VERTEX
-  8
-0
- 10
-7.708670
- 20
--146.520155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--146.799580
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--146.799580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-8.877045
- 20
--146.596330
-  0
-VERTEX
-  8
-0
- 10
-7.607045
- 20
--146.596330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-9.512045
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--142.354580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-9.512045
- 20
--142.151330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--142.354580
-  0
-VERTEX
-  8
-0
- 10
-11.417045
- 20
--142.354580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-11.417045
- 20
--142.151330
-  0
-VERTEX
-  8
-0
- 10
-11.340845
- 20
--142.151330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.030420
- 20
--144.411955
-  0
-VERTEX
-  8
-0
- 10
-17.030420
- 20
--146.062955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-17.233670
- 20
--146.062955
-  0
-VERTEX
-  8
-0
- 10
-17.233670
- 20
--144.411955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--130.924580
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--130.924580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-18.452845
- 20
--130.721330
-  0
-VERTEX
-  8
-0
- 10
-16.497045
- 20
--130.721330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--134.175755
-  0
-VERTEX
-  8
-0
- 10
-36.715420
- 20
--135.902955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--135.902955
-  0
-VERTEX
-  8
-0
- 10
-36.918670
- 20
--134.175755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.691045
- 20
--157.772330
-  0
-VERTEX
-  8
-0
- 10
-44.310045
- 20
--157.772330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.310045
- 20
--157.975580
-  0
-VERTEX
-  8
-0
- 10
-44.691045
- 20
--157.975580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.208420
- 20
--157.873955
-  0
-VERTEX
-  8
-0
- 10
-44.208420
- 20
--159.016955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-44.411670
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-44.411670
- 20
--157.873955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.310045
- 20
--158.915330
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--158.915330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--159.118580
-  0
-VERTEX
-  8
-0
- 10
-44.310045
- 20
--159.118580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--159.016955
-  0
-VERTEX
-  8
-0
- 10
-43.700420
- 20
--160.286955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--160.286955
-  0
-VERTEX
-  8
-0
- 10
-43.903670
- 20
--159.016955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--146.697955
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--146.520155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--146.520155
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--146.697955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--146.520155
-  0
-VERTEX
-  8
-0
- 10
--12.611330
- 20
--144.792955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--144.792955
-  0
-VERTEX
-  8
-0
- 10
--12.814580
- 20
--146.520155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--136.537955
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--136.360155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--136.360155
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--136.537955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--136.360155
-  0
-VERTEX
-  8
-0
- 10
--13.881330
- 20
--134.632955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--134.632955
-  0
-VERTEX
-  8
-0
- 10
--14.084580
- 20
--136.360155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--132.194580
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--132.194580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--4.407155
- 20
--131.991330
-  0
-VERTEX
-  8
-0
- 10
--6.362955
- 20
--131.991330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--157.391330
-  0
-VERTEX
-  8
-0
- 10
--66.052955
- 20
--157.391330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--66.052955
- 20
--157.594580
-  0
-VERTEX
-  8
-0
- 10
--60.083955
- 20
--157.594580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--76.441580
- 20
--174.940215
-  0
-VERTEX
-  8
-0
- 10
--76.441580
- 20
--177.939955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--76.238330
- 20
--177.939955
-  0
-VERTEX
-  8
-0
- 10
--76.238330
- 20
--174.940215
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--76.339955
- 20
--178.041580
-  0
-VERTEX
-  8
-0
- 10
--73.340215
- 20
--178.041580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--73.340215
- 20
--177.838330
-  0
-VERTEX
-  8
-0
- 10
--76.339955
- 20
--177.838330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-70.660005
- 20
--178.041580
-  0
-VERTEX
-  8
-0
- 10
-73.659745
- 20
--178.041580
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-73.659745
- 20
--177.838330
-  0
-VERTEX
-  8
-0
- 10
-70.660005
- 20
--177.838330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-73.761370
- 20
--177.939955
-  0
-VERTEX
-  8
-0
- 10
-73.761370
- 20
--174.940215
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-73.558120
- 20
--174.940215
-  0
-VERTEX
-  8
-0
- 10
-73.558120
- 20
--177.939955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-73.761370
- 20
--80.939895
-  0
-VERTEX
-  8
-0
- 10
-73.761370
- 20
--77.940155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-73.558120
- 20
--77.940155
-  0
-VERTEX
-  8
-0
- 10
-73.558120
- 20
--80.939895
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-73.659745
- 20
--77.838530
-  0
-VERTEX
-  8
-0
- 10
-70.660005
- 20
--77.838530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-70.660005
- 20
--78.041780
-  0
-VERTEX
-  8
-0
- 10
-73.659745
- 20
--78.041780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--73.340215
- 20
--77.838530
-  0
-VERTEX
-  8
-0
- 10
--76.339955
- 20
--77.838530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--76.339955
- 20
--78.041780
-  0
-VERTEX
-  8
-0
- 10
--73.340215
- 20
--78.041780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--76.441580
- 20
--77.940155
-  0
-VERTEX
-  8
-0
- 10
--76.441580
- 20
--80.939895
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--76.238330
- 20
--80.939895
-  0
-VERTEX
-  8
-0
- 10
--76.238330
- 20
--77.940155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--72.782530
- 20
--173.470060
-  0
-VERTEX
-  8
-0
- 10
--72.782530
- 20
--176.469800
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--72.579280
- 20
--176.469800
-  0
-VERTEX
-  8
-0
- 10
--72.579280
- 20
--173.470060
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--72.680905
- 20
--176.571425
-  0
-VERTEX
-  8
-0
- 10
--69.681165
- 20
--176.571425
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--69.681165
- 20
--176.368175
-  0
-VERTEX
-  8
-0
- 10
--72.680905
- 20
--176.368175
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-74.319055
- 20
--176.571425
-  0
-VERTEX
-  8
-0
- 10
-77.318795
- 20
--176.571425
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-77.318795
- 20
--176.368175
-  0
-VERTEX
-  8
-0
- 10
-74.319055
- 20
--176.368175
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-77.420420
- 20
--176.469800
-  0
-VERTEX
-  8
-0
- 10
-77.420420
- 20
--173.470060
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-77.217170
- 20
--173.470060
-  0
-VERTEX
-  8
-0
- 10
-77.217170
- 20
--176.469800
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-77.420420
- 20
--79.469740
-  0
-VERTEX
-  8
-0
- 10
-77.420420
- 20
--76.470000
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-77.217170
- 20
--76.470000
-  0
-VERTEX
-  8
-0
- 10
-77.217170
- 20
--79.469740
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-77.318795
- 20
--76.368375
-  0
-VERTEX
-  8
-0
- 10
-74.319055
- 20
--76.368375
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-74.319055
- 20
--76.571625
-  0
-VERTEX
-  8
-0
- 10
-77.318795
- 20
--76.571625
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--69.681165
- 20
--76.368375
-  0
-VERTEX
-  8
-0
- 10
--72.680905
- 20
--76.368375
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--72.680905
- 20
--76.571625
-  0
-VERTEX
-  8
-0
- 10
--69.681165
- 20
--76.571625
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--72.782530
- 20
--76.470000
-  0
-VERTEX
-  8
-0
- 10
--72.782530
- 20
--79.469740
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--72.579280
- 20
--79.469740
-  0
-VERTEX
-  8
-0
- 10
--72.579280
- 20
--76.470000
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--81.089780
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--81.089780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.802045
- 20
--80.835730
-  0
-VERTEX
-  8
-0
- 10
-43.167045
- 20
--80.835730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.624270
- 20
--80.962755
-  0
-VERTEX
-  8
-0
- 10
-43.624270
- 20
--79.692755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.370220
- 20
--79.692755
-  0
-VERTEX
-  8
-0
- 10
-43.370220
- 20
--80.962755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.411085
- 20
--79.599415
-  0
-VERTEX
-  8
-0
- 10
-43.080885
- 20
--79.904215
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-43.253200
- 20
--80.090890
-  0
-VERTEX
-  8
-0
- 10
-43.583400
- 20
--79.786090
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--81.343730
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--81.597780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.278215
- 20
--81.384080
-  0
-VERTEX
-  8
-0
- 10
--33.633815
- 20
--81.765080
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.448090
- 20
--81.938425
-  0
-VERTEX
-  8
-0
- 10
--33.092490
- 20
--81.557425
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.667980
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--33.667980
- 20
--82.588355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.413930
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--33.413930
- 20
--81.851755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.630775
- 20
--82.678175
-  0
-VERTEX
-  8
-0
- 10
--33.275175
- 20
--83.033775
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.095530
- 20
--82.854130
-  0
-VERTEX
-  8
-0
- 10
--33.451130
- 20
--82.498530
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--83.070980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--82.816930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.536730
- 20
--83.033775
-  0
-VERTEX
-  8
-0
- 10
--32.358930
- 20
--82.855975
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.538575
- 20
--82.676330
-  0
-VERTEX
-  8
-0
- 10
--32.716375
- 20
--82.854130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.321730
- 20
--82.766155
-  0
-VERTEX
-  8
-0
- 10
--32.321730
- 20
--82.207355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.575780
- 20
--82.207355
-  0
-VERTEX
-  8
-0
- 10
--32.575780
- 20
--82.766155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.358930
- 20
--82.117530
-  0
-VERTEX
-  8
-0
- 10
--32.536730
- 20
--81.939730
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.716375
- 20
--82.119375
-  0
-VERTEX
-  8
-0
- 10
--32.538575
- 20
--82.297175
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--81.902530
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--81.902530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.185355
- 20
--82.156580
-  0
-VERTEX
-  8
-0
- 10
--32.626555
- 20
--82.156580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--33.278215
- 20
--81.942880
-  0
-VERTEX
-  8
-0
- 10
--33.633815
- 20
--82.323880
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--33.448090
- 20
--82.497225
-  0
-VERTEX
-  8
-0
- 10
--33.092490
- 20
--82.116225
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.106775
- 20
--82.855975
-  0
-VERTEX
-  8
-0
- 10
--31.928975
- 20
--83.033775
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.749330
- 20
--82.854130
-  0
-VERTEX
-  8
-0
- 10
--31.927130
- 20
--82.676330
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.839155
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--31.102555
- 20
--83.070980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.102555
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--31.839155
- 20
--82.816930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.012730
- 20
--83.033775
-  0
-VERTEX
-  8
-0
- 10
--30.834930
- 20
--82.855975
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.014575
- 20
--82.676330
-  0
-VERTEX
-  8
-0
- 10
--31.192375
- 20
--82.854130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.797730
- 20
--82.766155
-  0
-VERTEX
-  8
-0
- 10
--30.797730
- 20
--82.207355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.051780
- 20
--82.207355
-  0
-VERTEX
-  8
-0
- 10
--31.051780
- 20
--82.766155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.834930
- 20
--82.117530
-  0
-VERTEX
-  8
-0
- 10
--31.012730
- 20
--81.939730
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.192375
- 20
--82.119375
-  0
-VERTEX
-  8
-0
- 10
--31.014575
- 20
--82.297175
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.102555
- 20
--81.902530
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--81.902530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--82.156580
-  0
-VERTEX
-  8
-0
- 10
--31.102555
- 20
--82.156580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--31.889930
- 20
--82.029555
-  0
-VERTEX
-  8
-0
- 10
--31.889930
- 20
--81.470755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--32.143980
- 20
--81.470755
-  0
-VERTEX
-  8
-0
- 10
--32.143980
- 20
--82.029555
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--30.924755
- 20
--81.597780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.924755
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--32.016955
- 20
--81.343730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.023740
- 20
--82.887145
-  0
-VERTEX
-  8
-0
- 10
--30.201540
- 20
--82.531545
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.428765
- 20
--82.645160
-  0
-VERTEX
-  8
-0
- 10
--30.250965
- 20
--83.000760
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.188130
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--30.188130
- 20
--81.851755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.442180
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--30.442180
- 20
--82.588355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.200045
- 20
--81.905470
-  0
-VERTEX
-  8
-0
- 10
--30.022245
- 20
--81.524470
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.252460
- 20
--81.417035
-  0
-VERTEX
-  8
-0
- 10
--30.430260
- 20
--81.798035
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--30.137355
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--29.756355
- 20
--81.597780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.756355
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--30.137355
- 20
--81.343730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.871460
- 20
--81.524470
-  0
-VERTEX
-  8
-0
- 10
--29.693660
- 20
--81.905470
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.463445
- 20
--81.798035
-  0
-VERTEX
-  8
-0
- 10
--29.641245
- 20
--81.417035
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.705580
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--29.705580
- 20
--82.588355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.451530
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--29.451530
- 20
--81.851755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.692165
- 20
--82.531545
-  0
-VERTEX
-  8
-0
- 10
--29.869965
- 20
--82.887145
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--29.642740
- 20
--83.000760
-  0
-VERTEX
-  8
-0
- 10
--29.464940
- 20
--82.645160
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--29.756355
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--30.137355
- 20
--82.816930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--30.137355
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--29.756355
- 20
--83.070980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.791155
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--28.054555
- 20
--83.070980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.054555
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--28.791155
- 20
--82.816930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.283130
- 20
--82.943955
-  0
-VERTEX
-  8
-0
- 10
--28.283130
- 20
--81.470755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.537180
- 20
--81.470755
-  0
-VERTEX
-  8
-0
- 10
--28.537180
- 20
--82.943955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.499975
- 20
--81.380930
-  0
-VERTEX
-  8
-0
- 10
--28.880975
- 20
--81.761930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--28.701330
- 20
--81.941575
-  0
-VERTEX
-  8
-0
- 10
--28.320330
- 20
--81.560575
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--81.343730
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--81.597780
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.182215
- 20
--81.384080
-  0
-VERTEX
-  8
-0
- 10
--27.537815
- 20
--81.765080
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.352090
- 20
--81.938425
-  0
-VERTEX
-  8
-0
- 10
--26.996490
- 20
--81.557425
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.571980
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--27.571980
- 20
--82.588355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.317930
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--27.317930
- 20
--81.851755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.534775
- 20
--82.678175
-  0
-VERTEX
-  8
-0
- 10
--27.179175
- 20
--83.033775
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.999530
- 20
--82.854130
-  0
-VERTEX
-  8
-0
- 10
--27.355130
- 20
--82.498530
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--83.070980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--82.816930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.440730
- 20
--83.033775
-  0
-VERTEX
-  8
-0
- 10
--26.262930
- 20
--82.855975
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.442575
- 20
--82.676330
-  0
-VERTEX
-  8
-0
- 10
--26.620375
- 20
--82.854130
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.225730
- 20
--82.766155
-  0
-VERTEX
-  8
-0
- 10
--26.225730
- 20
--82.207355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.479780
- 20
--82.207355
-  0
-VERTEX
-  8
-0
- 10
--26.479780
- 20
--82.766155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.262930
- 20
--82.117530
-  0
-VERTEX
-  8
-0
- 10
--26.440730
- 20
--81.939730
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--26.620375
- 20
--82.119375
-  0
-VERTEX
-  8
-0
- 10
--26.442575
- 20
--82.297175
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--81.902530
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--81.902530
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.089355
- 20
--82.156580
-  0
-VERTEX
-  8
-0
- 10
--26.530555
- 20
--82.156580
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.182215
- 20
--81.942880
-  0
-VERTEX
-  8
-0
- 10
--27.537815
- 20
--82.323880
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--27.352090
- 20
--82.497225
-  0
-VERTEX
-  8
-0
- 10
--26.996490
- 20
--82.116225
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.451740
- 20
--82.887145
-  0
-VERTEX
-  8
-0
- 10
--25.629540
- 20
--82.531545
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.856765
- 20
--82.645160
-  0
-VERTEX
-  8
-0
- 10
--25.678965
- 20
--83.000760
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.616130
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--25.616130
- 20
--81.851755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.870180
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--25.870180
- 20
--82.588355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.628045
- 20
--81.905470
-  0
-VERTEX
-  8
-0
- 10
--25.450245
- 20
--81.524470
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.680460
- 20
--81.417035
-  0
-VERTEX
-  8
-0
- 10
--25.858260
- 20
--81.798035
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.565355
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--25.184355
- 20
--81.597780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.184355
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--25.565355
- 20
--81.343730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.299460
- 20
--81.524470
-  0
-VERTEX
-  8
-0
- 10
--25.121660
- 20
--81.905470
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.891445
- 20
--81.798035
-  0
-VERTEX
-  8
-0
- 10
--25.069245
- 20
--81.417035
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.133580
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--25.133580
- 20
--82.588355
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--24.879530
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--24.879530
- 20
--81.851755
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.120165
- 20
--82.531545
-  0
-VERTEX
-  8
-0
- 10
--25.297965
- 20
--82.887145
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.070740
- 20
--83.000760
-  0
-VERTEX
-  8
-0
- 10
--24.892940
- 20
--82.645160
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.184355
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--25.565355
- 20
--82.816930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--25.565355
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--25.184355
- 20
--83.070980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907780
- 20
--82.588355
-  0
-VERTEX
-  8
-0
- 10
--21.907780
- 20
--82.766155
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.653730
- 20
--82.766155
-  0
-VERTEX
-  8
-0
- 10
--21.653730
- 20
--82.588355
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.870575
- 20
--82.676330
-  0
-VERTEX
-  8
-0
- 10
--22.048375
- 20
--82.854130
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.868730
- 20
--83.033775
-  0
-VERTEX
-  8
-0
- 10
--21.690930
- 20
--82.855975
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.958555
- 20
--82.816930
-  0
-VERTEX
-  8
-0
- 10
--22.695155
- 20
--82.816930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.695155
- 20
--83.070980
-  0
-VERTEX
-  8
-0
- 10
--21.958555
- 20
--83.070980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.605330
- 20
--82.854130
-  0
-VERTEX
-  8
-0
- 10
--22.783130
- 20
--82.676330
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.962775
- 20
--82.855975
-  0
-VERTEX
-  8
-0
- 10
--22.784975
- 20
--83.033775
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.745930
- 20
--82.766155
-  0
-VERTEX
-  8
-0
- 10
--22.745930
- 20
--81.673955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.999980
- 20
--81.673955
-  0
-VERTEX
-  8
-0
- 10
--22.999980
- 20
--82.766155
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.777355
- 20
--81.757600
-  0
-VERTEX
-  8
-0
- 10
--22.599555
- 20
--81.554400
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.790750
- 20
--81.387105
-  0
-VERTEX
-  8
-0
- 10
--22.968550
- 20
--81.590305
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.695155
- 20
--81.597780
-  0
-VERTEX
-  8
-0
- 10
--21.958555
- 20
--81.597780
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.958555
- 20
--81.343730
-  0
-VERTEX
-  8
-0
- 10
--22.695155
- 20
--81.343730
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.054150
- 20
--81.554400
-  0
-VERTEX
-  8
-0
- 10
--21.876350
- 20
--81.757600
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.685155
- 20
--81.590305
-  0
-VERTEX
-  8
-0
- 10
--21.862955
- 20
--81.387105
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907780
- 20
--81.673955
-  0
-VERTEX
-  8
-0
- 10
--21.907780
- 20
--81.851755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--21.653730
- 20
--81.851755
-  0
-VERTEX
-  8
-0
- 10
--21.653730
- 20
--81.673955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--163.842930
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--163.842930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--165.112980
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--165.112980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--139.458955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--139.458955
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--164.477955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--138.823930
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--138.823930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--140.093980
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--140.093980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--139.458955
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--131.838955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--131.838955
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--139.458955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--132.473980
-  0
-VERTEX
-  8
-0
- 10
--67.322955
- 20
--132.473980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--67.322955
- 20
--131.203930
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--131.203930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--131.838955
-  0
-VERTEX
-  8
-0
- 10
--73.672930
- 20
--106.819955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--106.819955
-  0
-VERTEX
-  8
-0
- 10
--74.942980
- 20
--131.838955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--107.454980
-  0
-VERTEX
-  8
-0
- 10
--67.322955
- 20
--107.454980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--67.322955
- 20
--106.184930
-  0
-VERTEX
-  8
-0
- 10
--74.307955
- 20
--106.184930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.129980
- 20
--85.229955
-  0
-VERTEX
-  8
-0
- 10
--47.129980
- 20
--115.328955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--45.859930
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
--45.859930
- 20
--85.229955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--46.494955
- 20
--115.963980
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--115.963980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--114.693930
-  0
-VERTEX
-  8
-0
- 10
--46.494955
- 20
--114.693930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--42.557980
- 20
--115.328955
-  0
-VERTEX
-  8
-0
- 10
--42.557980
- 20
--174.002955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--41.287930
- 20
--174.002955
-  0
-VERTEX
-  8
-0
- 10
--41.287930
- 20
--115.328955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.002955
- 20
--174.637980
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--174.637980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--173.367930
-  0
-VERTEX
-  8
-0
- 10
--47.002955
- 20
--173.367930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--174.637980
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--174.637980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--31.762955
- 20
--173.367930
-  0
-VERTEX
-  8
-0
- 10
--41.922955
- 20
--173.367930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.967930
- 20
--174.002955
-  0
-VERTEX
-  8
-0
- 10
--20.967930
- 20
--168.922955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--22.237980
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
--22.237980
- 20
--174.002955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--169.557980
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--169.557980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--168.287930
-  0
-VERTEX
-  8
-0
- 10
--21.602955
- 20
--168.287930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.077980
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
--12.077980
- 20
--174.002955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--10.807930
- 20
--174.002955
-  0
-VERTEX
-  8
-0
- 10
--10.807930
- 20
--168.922955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--174.637980
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--174.637980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--173.367930
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--173.367930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.867070
- 20
--174.002955
-  0
-VERTEX
-  8
-0
- 10
-55.867070
- 20
--168.922955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-54.597020
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
-54.597020
- 20
--174.002955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--169.557980
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--169.557980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--168.287930
-  0
-VERTEX
-  8
-0
- 10
-55.232045
- 20
--168.287930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-61.582070
- 20
--168.922955
-  0
-VERTEX
-  8
-0
- 10
-61.582070
- 20
--164.477955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-60.312020
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
-60.312020
- 20
--168.922955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--165.112980
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--165.112980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--163.842930
-  0
-VERTEX
-  8
-0
- 10
-60.947045
- 20
--163.842930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-62.623420
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
-62.623420
- 20
--164.655755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-63.893470
- 20
--164.655755
-  0
-VERTEX
-  8
-0
- 10
-63.893470
- 20
--164.477955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--165.112980
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--165.112980
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.338445
- 20
--163.842930
-  0
-VERTEX
-  8
-0
- 10
-63.258445
- 20
--163.842930
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-67.703420
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
-67.703420
- 20
--164.655755
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
-68.973470
- 20
--164.655755
-  0
-VERTEX
-  8
-0
- 10
-68.973470
- 20
--164.477955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162955
- 20
--173.367930
-  0
-VERTEX
-  8
-0
- 10
--60.972955
- 20
--173.367930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--60.972955
- 20
--174.637980
-  0
-VERTEX
-  8
-0
- 10
--57.162955
- 20
--174.637980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.337930
- 20
--174.002955
-  0
-VERTEX
-  8
-0
- 10
--60.337930
- 20
--172.097955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--61.607980
- 20
--172.097955
-  0
-VERTEX
-  8
-0
- 10
--61.607980
- 20
--174.002955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.337930
- 20
--172.097955
-  0
-VERTEX
-  8
-0
- 10
--60.337930
- 20
--164.477955
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--61.607980
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--61.607980
- 20
--172.097955
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.972955
- 20
--163.842930
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--163.842930
- 42
-1.000000
-  0
-VERTEX
-  8
-0
- 10
--67.424555
- 20
--165.112980
-  0
-VERTEX
-  8
-0
- 10
--60.972955
- 20
--165.112980
- 42
-1.000000
-  0
-SEQEND
-  8
-0
-  0
-CIRCLE
-  8
-0
- 10
--58.432955
- 20
--170.827955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--58.432955
- 20
--163.207955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--165.112955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--160.032955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--157.492955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--154.952955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--52.463955
- 20
--152.285955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--53.987955
- 20
--151.142955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--57.162955
- 20
--151.015955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--55.892955
- 20
--152.539955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--54.622955
- 20
--153.809955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--58.432955
- 20
--153.428955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--57.797955
- 20
--147.332955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--58.559955
- 20
--146.570955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--61.353955
- 20
--146.570955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--58.813955
- 20
--143.395955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--58.432955
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--55.892955
- 20
--133.997955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--134.632955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--132.092955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--127.012955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--123.837955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--122.567955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--53.860955
- 20
--121.551955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--55.892955
- 20
--122.440955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--55.892955
- 20
--117.487955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--57.797955
- 20
--119.392955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--61.353955
- 20
--124.853955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--47.637955
- 20
--124.345955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--46.240955
- 20
--127.901955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--46.240955
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--46.367955
- 20
--139.585955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--47.637955
- 20
--139.712955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--47.637955
- 20
--142.252955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--47.891955
- 20
--147.332955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--51.447955
- 20
--149.872955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--53.987955
- 20
--139.712955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--35.826955
- 20
--143.522955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--33.159955
- 20
--147.205955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.397955
- 20
--148.602955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--31.254955
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.397955
- 20
--154.952955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--35.953955
- 20
--154.952955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.397955
- 20
--161.302955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.397955
- 20
--163.842955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.397955
- 20
--166.382955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--29.222955
- 20
--166.382955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--30.746955
- 20
--168.922955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--35.572955
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--49.542955
- 20
--172.097955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--27.952955
- 20
--160.032955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--25.412955
- 20
--160.032955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.142955
- 20
--157.111955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--26.047955
- 20
--154.317955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.904955
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--22.237955
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--19.697955
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--19.697955
- 20
--155.587955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--16.522955
- 20
--158.254955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.252955
- 20
--160.032955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.887955
- 20
--161.937955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--12.077955
- 20
--163.207955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--10.172955
- 20
--160.032955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--13.982955
- 20
--157.111955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--12.712955
- 20
--149.872955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.252955
- 20
--149.237955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--14.490955
- 20
--146.316955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--12.712955
- 20
--144.792955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--11.696955
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.252955
- 20
--139.077955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--18.427955
- 20
--140.220955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--20.967955
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--20.332955
- 20
--145.554955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--19.570955
- 20
--144.792955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--22.237955
- 20
--147.078955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--23.507955
- 20
--146.316955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--28.206955
- 20
--146.316955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--28.968955
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--29.984955
- 20
--139.331955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.778955
- 20
--138.442955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--32.524955
- 20
--132.092955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--36.461955
- 20
--133.362955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--34.302955
- 20
--128.282955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--34.302955
- 20
--127.266955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--31.508955
- 20
--127.520955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--34.302955
- 20
--121.805955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--36.207955
- 20
--119.900955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--34.302955
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--29.476955
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--26.047955
- 20
--110.502955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--27.190955
- 20
--107.962955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--25.158955
- 20
--107.327955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.015955
- 20
--104.914955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.015955
- 20
--101.612955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.015955
- 20
--100.342955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--23.888955
- 20
--97.802955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--23.888955
- 20
--96.532955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--14.617955
- 20
--96.786955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--13.347955
- 20
--98.818955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--14.617955
- 20
--103.898955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.887955
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--11.315955
- 20
--104.914955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--9.537955
- 20
--106.565955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--10.172955
- 20
--109.994955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--6.362955
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.854955
- 20
--115.201955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.600955
- 20
--105.803955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.600955
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.257045
- 20
--104.787955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-0.876045
- 20
--106.184955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-6.083045
- 20
--106.946955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-7.099045
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.909045
- 20
--108.978955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-14.211045
- 20
--107.454955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.751045
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-17.767045
- 20
--112.026955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-19.291045
- 20
--109.740955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-18.529045
- 20
--104.152955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-20.053045
- 20
--101.104955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-25.514045
- 20
--104.279955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-31.483045
- 20
--105.041955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--106.946955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--108.724955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-24.371045
- 20
--114.820955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-23.863045
- 20
--115.963955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.292045
- 20
--119.392955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-30.213045
- 20
--119.519955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.800045
- 20
--123.837955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-26.276045
- 20
--123.075955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-22.212045
- 20
--124.599955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--128.917955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-17.259045
- 20
--127.266955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-14.973045
- 20
--128.028955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-14.084045
- 20
--127.266955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.909045
- 20
--127.012955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-11.290045
- 20
--128.028955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-11.290045
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--138.569955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-9.385045
- 20
--139.712955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-9.512045
- 20
--142.252955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-8.496045
- 20
--144.665955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-8.877045
- 20
--146.697955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-8.877045
- 20
--147.967955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--148.602955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--145.935955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-2.527045
- 20
--145.427955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.892045
- 20
--147.459955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-0.622045
- 20
--147.078955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.647955
- 20
--146.316955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--2.552955
- 20
--145.554955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--3.441955
- 20
--144.792955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.092955
- 20
--143.522955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--4.457955
- 20
--139.712955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.854955
- 20
--137.426955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--9.156955
- 20
--137.426955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--13.982955
- 20
--134.632955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--12.966955
- 20
--129.298955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--10.934955
- 20
--126.758955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--9.156955
- 20
--126.758955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--7.632955
- 20
--127.520955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--8.394955
- 20
--129.806955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--4.838955
- 20
--129.806955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--4.076955
- 20
--128.536955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--3.314955
- 20
--127.139955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--1.282955
- 20
--127.139955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.139955
- 20
--127.139955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.892045
- 20
--127.266955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.765045
- 20
--130.695955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-0.622045
- 20
--133.362955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.647955
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-4.432045
- 20
--137.426955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-6.337045
- 20
--134.632955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-6.591045
- 20
--140.474955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-3.670045
- 20
--141.490955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-0.622045
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.130045
- 20
--150.253955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.393955
- 20
--150.126955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-0.241045
- 20
--151.015955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--4.457955
- 20
--150.888955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.092955
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--4.965955
- 20
--154.190955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--2.171955
- 20
--154.190955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.257045
- 20
--154.952955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-3.797045
- 20
--154.952955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--152.412955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-8.877045
- 20
--153.428955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-13.068045
- 20
--150.126955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.370045
- 20
--152.539955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--150.126955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-22.339045
- 20
--147.840955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-18.275045
- 20
--147.078955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-17.132045
- 20
--146.062955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-15.227045
- 20
--142.252955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-19.164045
- 20
--142.252955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--141.490955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-23.482045
- 20
--142.506955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-26.022045
- 20
--142.633955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--140.728955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-29.832045
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-32.372045
- 20
--141.490955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-31.483045
- 20
--139.966955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-29.832045
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.165045
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-23.736045
- 20
--135.775955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-22.974045
- 20
--135.013955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.751045
- 20
--135.267955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-14.211045
- 20
--133.997955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.497045
- 20
--130.822955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.751045
- 20
--139.331955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--150.253955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-24.879045
- 20
--151.777955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.419045
- 20
--153.428955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--151.015955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-33.642045
- 20
--150.253955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-36.817045
- 20
--151.142955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-38.595045
- 20
--150.380955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.167045
- 20
--152.666955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.199045
- 20
--153.428955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.342045
- 20
--154.190955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.247045
- 20
--150.888955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.977045
- 20
--144.792955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.326045
- 20
--144.792955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.802045
- 20
--144.411955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.262045
- 20
--146.062955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-39.357045
- 20
--141.490955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-37.833045
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-37.071045
- 20
--142.760955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-35.293045
- 20
--141.998955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-38.595045
- 20
--139.966955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-42.151045
- 20
--137.807955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-42.151045
- 20
--135.267955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-40.119045
- 20
--135.140955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-36.817045
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.277045
- 20
--133.362955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.531045
- 20
--128.917955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-33.642045
- 20
--127.266955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-32.245045
- 20
--126.123955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-38.595045
- 20
--126.504955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-39.103045
- 20
--125.107955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-37.833045
- 20
--123.075955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-39.357045
- 20
--128.917955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.262045
- 20
--128.282955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-36.817045
- 20
--130.822955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-29.578045
- 20
--131.965955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.707045
- 20
--135.902955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.580045
- 20
--137.807955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.342045
- 20
--139.204955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-47.612045
- 20
--143.268955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.882045
- 20
--144.030955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.692045
- 20
--140.728955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--138.442955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-57.137045
- 20
--134.632955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-61.836045
- 20
--136.664955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.152045
- 20
--135.267955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.882045
- 20
--134.505955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-47.612045
- 20
--125.488955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-49.263045
- 20
--122.821955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.152045
- 20
--123.583955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.374045
- 20
--121.424955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.723045
- 20
--120.662955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.961045
- 20
--119.900955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.072045
- 20
--120.789955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.929045
- 20
--120.281955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.167045
- 20
--121.043955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.167045
- 20
--116.344955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.262045
- 20
--118.122955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-42.532045
- 20
--112.407955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.072045
- 20
--109.486955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.342045
- 20
--107.454955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-49.517045
- 20
--107.200955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.057045
- 20
--107.962955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.692045
- 20
--108.851955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.787045
- 20
--110.375955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.374045
- 20
--110.248955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-47.612045
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-49.517045
- 20
--116.852955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.787045
- 20
--115.582955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-53.962045
- 20
--112.534955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--112.407955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--113.677955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-58.915045
- 20
--113.804955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-59.677045
- 20
--109.613955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-61.074045
- 20
--120.662955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-59.677045
- 20
--123.964955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-58.153045
- 20
--125.107955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--126.377955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--127.647955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-51.930045
- 20
--126.504955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.692045
- 20
--125.615955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-67.170045
- 20
--120.408955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-69.456045
- 20
--148.348955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-58.915045
- 20
--147.713955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-59.042045
- 20
--154.317955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-59.042045
- 20
--155.968955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--155.587955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.692045
- 20
--157.492955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.152045
- 20
--158.254955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-49.263045
- 20
--158.762955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-49.517045
- 20
--163.969955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.184045
- 20
--165.239955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-51.422045
- 20
--166.890955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-53.962045
- 20
--167.017955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.247045
- 20
--167.652955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.802045
- 20
--168.414955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.548045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-39.357045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.277045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-29.832045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-30.594045
- 20
--168.414955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-27.673045
- 20
--166.890955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-28.562045
- 20
--165.239955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-29.832045
- 20
--163.715955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-26.657045
- 20
--161.810955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-33.007045
- 20
--161.810955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.277045
- 20
--166.382955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-38.595045
- 20
--166.001955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-40.119045
- 20
--162.572955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-42.532045
- 20
--158.127955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-44.691045
- 20
--157.873955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.912045
- 20
--155.587955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--167.652955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--168.414955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-21.577045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-18.402045
- 20
--171.462955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-24.117045
- 20
--172.224955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-18.402045
- 20
--161.937955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-12.433045
- 20
--162.953955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--165.112955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--170.192955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-3.797045
- 20
--169.557955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--1.917955
- 20
--169.557955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--1.282955
- 20
--166.001955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--8.394955
- 20
--166.001955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.092955
- 20
--162.572955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--5.727955
- 20
--156.222955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--10.934955
- 20
--147.840955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--25.412955
- 20
--143.522955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--22.491955
- 20
--136.664955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--22.872955
- 20
--130.822955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--21.094955
- 20
--130.060955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--20.332955
- 20
--131.457955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--17.792955
- 20
--131.457955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--18.554955
- 20
--128.536955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--22.745955
- 20
--125.107955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.777955
- 20
--125.107955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--24.777955
- 20
--117.487955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--28.968955
- 20
--116.217955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--18.046955
- 20
--116.217955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--17.284955
- 20
--116.979955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--1.282955
- 20
--121.678955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.647955
- 20
--122.567955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--0.647955
- 20
--123.837955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--2.552955
- 20
--125.234955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-6.972045
- 20
--124.472955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-7.734045
- 20
--121.678955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-8.496045
- 20
--120.916955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-12.941045
- 20
--120.281955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-11.671045
- 20
--115.201955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--115.201955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.909045
- 20
--114.439955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--104.914955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-1.257045
- 20
--98.691955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-3.162045
- 20
--94.627955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-16.243045
- 20
--93.738955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-28.943045
- 20
--95.389955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--92.722955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-31.991045
- 20
--90.182955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-34.531045
- 20
--87.642955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.897045
- 20
--85.102955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.897045
- 20
--90.182955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.802045
- 20
--95.262955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-45.707045
- 20
--93.738955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.152045
- 20
--96.532955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-51.803045
- 20
--96.913955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-52.692045
- 20
--97.675955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--98.437955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--99.707955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-50.152045
- 20
--99.072955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.247045
- 20
--99.199955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-48.247045
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-46.977045
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.897045
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-43.167045
- 20
--101.358955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-41.897045
- 20
--97.802955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-42.532045
- 20
--106.057955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-39.103045
- 20
--105.295955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-58.153045
- 20
--96.024955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-60.947045
- 20
--95.008955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-55.232045
- 20
--92.087955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-57.137045
- 20
--88.912955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-54.597045
- 20
--85.737955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--2.298955
- 20
--84.340955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--12.077955
- 20
--86.880955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--15.252955
- 20
--82.562955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--25.285955
- 20
--86.880955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--26.047955
- 20
--87.642955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--27.952955
- 20
--88.404955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--27.190955
- 20
--90.182955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--35.064955
- 20
--96.278955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--33.540955
- 20
--101.358955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--35.953955
- 20
--102.882955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--29.476955
- 20
--105.422955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--39.255955
- 20
--111.264955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--62.242955
- 20
--100.977955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--64.147955
- 20
--100.977955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--62.242955
- 20
--95.262955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--57.797955
- 20
--92.722955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--25.412955
- 20
--133.362955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--6.362955
- 20
--132.092955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--20.967955
- 20
--161.175955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--21.348955
- 20
--166.382955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-47.612045
- 20
--172.224955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-59.042045
- 20
--165.747955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
-54.978045
- 20
--160.667955
- 40
-0.406400
-  0
-CIRCLE
-  8
-0
- 10
--68.592955
- 20
--172.732955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--16.522955
- 20
--172.732955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--8.902955
- 20
--107.962955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--17.792955
- 20
--99.072955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--8.902955
- 20
--90.182955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--68.592955
- 20
--83.832955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-58.407045
- 20
--83.832955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-66.103245
- 20
--82.816955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-70.878445
- 20
--83.375755
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-70.878445
- 20
--172.275755
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-66.103245
- 20
--172.834555
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
-58.407045
- 20
--172.732955
- 40
-0.508000
-  0
-CIRCLE
-  8
-0
- 10
--57.162955
- 20
--174.002955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--47.002955
- 20
--174.002955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--174.002955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--21.602955
- 20
--174.002955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--21.602955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--19.062955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--16.522955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--13.982955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--11.442955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--8.902955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--6.362955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--110.502955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--107.962955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--105.422955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--100.342955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--95.262955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--92.722955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--90.182955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--3.822955
- 20
--87.642955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--6.362955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--8.902955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--11.442955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--13.982955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--16.522955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--19.062955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--21.602955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--24.142955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--26.682955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--29.222955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--87.642955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--90.182955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--92.722955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--95.262955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--100.342955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--105.422955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--107.962955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--31.762955
- 20
--110.502955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--29.222955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--26.682955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--24.142955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--110.502955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--107.962955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--105.422955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--100.342955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--95.262955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--92.722955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--90.182955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--87.642955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--38.112955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--113.042955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--110.502955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--107.962955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--105.422955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--100.342955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--87.642955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--57.797955
- 20
--107.962955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--57.797955
- 20
--105.422955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--65.951355
- 20
--113.906555
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--65.951355
- 20
--116.649755
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--65.951355
- 20
--119.392955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--65.951355
- 20
--122.136155
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--65.951355
- 20
--124.879355
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.694555
- 20
--123.507755
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.694555
- 20
--120.764555
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.694555
- 20
--118.021355
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.694555
- 20
--115.278155
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--71.132955
- 20
--99.072955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--71.132955
- 20
--96.532955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--71.132955
- 20
--93.992955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--71.132955
- 20
--91.452955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.796155
- 20
--147.891755
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.796155
- 20
--150.634955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.796155
- 20
--153.378155
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--68.796155
- 20
--156.121355
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--66.052955
- 20
--154.749755
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--66.052955
- 20
--152.006555
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--66.052955
- 20
--149.263355
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--66.052955
- 20
--146.520155
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--66.052955
- 20
--157.492955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-12.687045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-15.227045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-17.767045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-22.847045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-33.007045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-35.547045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-38.087045
- 20
--118.122955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-12.687045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-15.227045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-17.767045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-22.847045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-33.007045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-35.547045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-38.087045
- 20
--102.882955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-12.687045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-15.227045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-17.767045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-22.847045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-33.007045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-35.547045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-38.087045
- 20
--97.802955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-5.067045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-7.607045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-10.147045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-12.687045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-15.227045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-17.767045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-20.307045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-22.847045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-25.387045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-27.927045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-30.467045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-33.007045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-35.547045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-38.087045
- 20
--82.562955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-46.977045
- 20
--86.372955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
-46.977045
- 20
--91.452955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--85.102955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--90.182955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--95.262955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--53.352955
- 20
--92.722955
- 40
-0.711200
-  0
-CIRCLE
-  8
-0
- 10
--60.972955
- 20
--172.097955
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--167.195755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--164.655755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--162.115755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--159.575755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--157.035755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--154.495755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--151.955755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--149.415755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--146.875755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--144.335755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--141.795755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--139.255755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--136.715755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--134.175755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--131.635755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--129.095755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--126.555755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--124.015755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--121.475755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--118.935755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--116.395755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--113.855755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--111.315755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--108.775755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--106.235755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--103.695755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--101.155755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--98.615755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--96.075755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--93.535755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--90.995755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-63.258445
- 20
--88.455755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--167.195755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--164.655755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--162.115755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--159.575755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--157.035755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--154.495755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--151.955755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--149.415755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--146.875755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--144.335755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--141.795755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--139.255755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--136.715755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--134.175755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--131.635755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--129.095755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--126.555755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--124.015755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--121.475755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--118.935755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--116.395755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--113.855755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--111.315755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--108.775755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--106.235755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--103.695755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--101.155755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--98.615755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--96.075755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--93.535755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--90.995755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
-68.338445
- 20
--88.455755
- 40
-0.762000
-  0
-CIRCLE
-  8
-0
- 10
--67.424555
- 20
--139.509755
- 40
-2.870200
-  0
-CIRCLE
-  8
-0
- 10
--67.424555
- 20
--164.503355
- 40
-2.870200
-  0
-CIRCLE
-  8
-0
- 10
--67.322955
- 20
--106.896155
- 40
-2.870200
-  0
-CIRCLE
-  8
-0
- 10
--67.322955
- 20
--131.889755
- 40
-2.870200
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.315950
- 20
--122.771160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.239750
- 20
--122.694960
-  0
-VERTEX
-  8
-0
- 10
--7.328155
- 20
--122.694960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--7.251955
- 20
--122.771160
-  0
-VERTEX
-  8
-0
- 10
--7.251955
- 20
--124.904755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--7.328155
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
--11.239750
- 20
--124.980955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.315950
- 20
--124.904755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.315950
- 20
--118.961160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.239750
- 20
--118.884960
-  0
-VERTEX
-  8
-0
- 10
--7.328155
- 20
--118.884960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--7.251955
- 20
--118.961160
-  0
-VERTEX
-  8
-0
- 10
--7.251955
- 20
--121.094755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--7.328155
- 20
--121.170955
-  0
-VERTEX
-  8
-0
- 10
--11.239750
- 20
--121.170955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.315950
- 20
--121.094755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.875610
- 20
--184.078605
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.799410
- 20
--184.002405
-  0
-VERTEX
-  8
-0
- 10
--23.919815
- 20
--184.002405
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.843615
- 20
--184.078605
-  0
-VERTEX
-  8
-0
- 10
--23.843615
- 20
--187.431400
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.919815
- 20
--187.507600
-  0
-VERTEX
-  8
-0
- 10
--25.799410
- 20
--187.507600
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.875610
- 20
--187.431400
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--59.550550
- 20
--100.063560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.474350
- 20
--99.987360
-  0
-VERTEX
-  8
-0
- 10
--56.121555
- 20
--99.987360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.045355
- 20
--100.063560
-  0
-VERTEX
-  8
-0
- 10
--56.045355
- 20
--101.943155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.121555
- 20
--102.019355
-  0
-VERTEX
-  8
-0
- 10
--59.474350
- 20
--102.019355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.550550
- 20
--101.943155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.578665
- 20
--188.669680
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.654865
- 20
--188.593480
-  0
-VERTEX
-  8
-0
- 10
-55.007660
- 20
--188.593480
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-55.083860
- 20
--188.669680
-  0
-VERTEX
-  8
-0
- 10
-55.083860
- 20
--190.549275
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-55.007660
- 20
--190.625475
-  0
-VERTEX
-  8
-0
- 10
-51.654865
- 20
--190.625475
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.578665
- 20
--190.549275
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.304450
- 20
--84.848960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380650
- 20
--84.772760
-  0
-VERTEX
-  8
-0
- 10
-53.733445
- 20
--84.772760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.809645
- 20
--84.848960
-  0
-VERTEX
-  8
-0
- 10
-53.809645
- 20
--86.728555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733445
- 20
--86.804755
-  0
-VERTEX
-  8
-0
- 10
-50.380650
- 20
--86.804755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.304450
- 20
--86.728555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--59.550550
- 20
--93.764360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.474350
- 20
--93.688160
-  0
-VERTEX
-  8
-0
- 10
--56.121555
- 20
--93.688160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.045355
- 20
--93.764360
-  0
-VERTEX
-  8
-0
- 10
--56.045355
- 20
--95.643955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.121555
- 20
--95.720155
-  0
-VERTEX
-  8
-0
- 10
--59.474350
- 20
--95.720155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.550550
- 20
--95.643955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.304450
- 20
--91.122760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380650
- 20
--91.046560
-  0
-VERTEX
-  8
-0
- 10
-53.733445
- 20
--91.046560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.809645
- 20
--91.122760
-  0
-VERTEX
-  8
-0
- 10
-53.809645
- 20
--93.002355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733445
- 20
--93.078555
-  0
-VERTEX
-  8
-0
- 10
-50.380650
- 20
--93.078555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.304450
- 20
--93.002355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--66.533595
- 20
--187.843725
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--66.457395
- 20
--187.767525
-  0
-VERTEX
-  8
-0
- 10
--63.104600
- 20
--187.767525
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.028400
- 20
--187.843725
-  0
-VERTEX
-  8
-0
- 10
--63.028400
- 20
--189.723320
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.104600
- 20
--189.799520
-  0
-VERTEX
-  8
-0
- 10
--66.457395
- 20
--189.799520
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--66.533595
- 20
--189.723320
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.078950
- 20
--118.961160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--118.884960
-  0
-VERTEX
-  8
-0
- 10
--17.361155
- 20
--118.884960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--118.961160
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--121.094755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.361155
- 20
--121.170955
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--121.170955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.078950
- 20
--121.094755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.078950
- 20
--122.771160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--122.694960
-  0
-VERTEX
-  8
-0
- 10
--17.361155
- 20
--122.694960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--122.771160
-  0
-VERTEX
-  8
-0
- 10
--17.284955
- 20
--124.904755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.361155
- 20
--124.980955
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--124.980955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.078950
- 20
--124.904755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--126.479560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--126.403360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--126.403360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--126.479560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--128.359155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--128.435355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--128.435355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--128.359155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--162.547560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--162.471360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--162.471360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--162.547560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--164.427155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--164.503355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--164.503355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--164.427155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--158.229560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--158.153360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--158.153360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--158.229560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--160.109155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--160.185355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--160.185355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--160.109155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--130.797560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--130.721360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--130.721360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--130.797560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--132.677155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--132.753355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--132.753355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--132.677155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--118.834160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--118.757960
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--118.757960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--118.834160
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--120.713755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--120.789955
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--120.789955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--120.713755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--123.152160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--123.075960
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--123.075960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--123.152160
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--125.031755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--125.107955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--125.031755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--170.167560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--170.091360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--170.091360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--170.167560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--172.047155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--172.123355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--172.123355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--172.047155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--165.849560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--165.773360
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--165.773360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--165.849560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--167.729155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.699155
- 20
--167.805355
-  0
-VERTEX
-  8
-0
- 10
--57.086750
- 20
--167.805355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.162950
- 20
--167.729155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--154.419560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--154.343360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--154.343360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--154.419560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--155.486355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--155.562555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--155.562555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--155.486355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--159.499560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--159.423360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--159.423360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--159.499560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--160.566355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--160.642555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--160.642555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--160.566355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--163.309560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--163.233360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--163.233360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--163.309560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--164.376355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--164.452555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--164.452555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--164.376355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--165.849560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--165.773360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--165.773360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--165.849560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--166.916355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--166.992555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--166.992555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--166.916355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--168.389560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--168.313360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--168.313360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--168.389560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--169.456355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--169.532555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--169.532555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--169.456355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--170.929560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--170.853360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--170.853360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--170.929560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--171.996355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--172.072555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--172.072555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--171.996355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--117.589560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--117.513360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--117.513360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--117.589560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--118.656355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--118.732555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--118.732555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--118.656355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--120.129560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--120.053360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--120.053360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--120.129560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--121.196355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--121.272555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--121.272555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--121.196355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--122.669560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--122.593360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--122.593360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--122.669560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--123.736355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--123.812555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--123.812555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--123.736355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--117.589560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--117.513360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--117.513360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--117.589560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--118.656355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--118.732555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--118.732555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--118.656355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--120.154960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--120.078760
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--120.078760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--120.154960
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--121.221755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--121.297955
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--121.297955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--121.221755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--122.669560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--122.593360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--122.593360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--122.669560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--123.736355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--123.812555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--123.812555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--123.736355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--125.209560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--125.133360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--125.133360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--125.209560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--126.276355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--126.352555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--126.352555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--126.276355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--129.019560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--128.943360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--128.943360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--129.019560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--130.086355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--130.162555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--130.162555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--130.086355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--131.559560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--131.483360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--131.483360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--131.559560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--132.626355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--132.702555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--132.702555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--132.626355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--134.099560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--134.023360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--134.023360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--134.099560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--135.166355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--135.242555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--135.242555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--135.166355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--136.639560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--136.563360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--136.563360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--136.639560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--137.706355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--137.782555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--137.782555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--137.706355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--140.449560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--140.373360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--140.373360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--140.449560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--141.516355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--141.592555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--141.592555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--141.516355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--142.989560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--142.913360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--142.913360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--142.989560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--144.056355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--144.132555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--144.132555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--144.056355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--145.529560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--145.453360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--145.453360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--145.529560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--146.596355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--146.672555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--146.672555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--146.596355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--148.069560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--147.993360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--147.993360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--148.069560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--149.136355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--149.212555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--149.212555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--149.136355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--151.879560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--151.803360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--151.803360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--151.879560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--152.946355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--153.022555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--153.022555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--152.946355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--129.019560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--128.943360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--128.943360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--129.019560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--130.086355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--130.162555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--130.162555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--130.086355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--156.959560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--156.883360
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--156.883360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--156.959560
-  0
-VERTEX
-  8
-0
- 10
--36.792155
- 20
--158.026355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--36.868355
- 20
--158.102555
-  0
-VERTEX
-  8
-0
- 10
--38.290750
- 20
--158.102555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--38.366950
- 20
--158.026355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--125.209560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--125.133360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--125.133360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--125.209560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--126.276355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--126.352555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--126.352555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--126.276355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--131.559560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--131.483360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--131.483360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--131.559560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--132.626355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--132.702555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--132.702555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--132.626355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--134.099560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--134.023360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--134.023360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--134.099560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--135.166355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--135.242555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--135.242555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--135.166355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--136.639560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--136.563360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--136.563360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--136.639560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--137.706355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--137.782555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--137.782555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--137.706355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--140.449560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--140.373360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--140.373360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--140.449560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--141.516355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--141.592555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--141.592555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--141.516355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--142.989560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--142.913360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--142.913360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--142.989560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--144.056355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--144.132555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--144.132555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--144.056355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--145.529560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--145.453360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--145.453360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--145.529560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--146.596355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--146.672555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--146.672555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--146.596355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--148.069560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--147.993360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--147.993360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--148.069560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--149.136355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--149.212555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--149.212555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--149.136355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--151.879560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--151.803360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--151.803360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--151.879560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--152.946355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--153.022555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--153.022555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--152.946355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--154.419560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--154.343360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--154.343360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--154.419560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--155.486355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--155.562555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--155.562555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--155.486355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--156.959560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--156.883360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--156.883360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--156.959560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--158.026355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--158.102555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--158.102555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--158.026355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--165.849560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--165.773360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--165.773360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--165.849560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--166.916355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--166.992555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--166.992555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--166.916355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--168.389560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--168.313360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--168.313360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--168.389560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--169.456355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--169.532555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--169.532555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--169.456355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--159.499560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--159.423360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--159.423360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--159.499560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--160.566355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--160.642555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--160.642555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--160.566355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--170.929560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--170.853360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--170.853360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--170.929560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--171.996355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--172.072555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--172.072555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--171.996355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--163.309560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--163.233360
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--163.233360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--163.309560
-  0
-VERTEX
-  8
-0
- 10
--45.478955
- 20
--164.376355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--45.555155
- 20
--164.452555
-  0
-VERTEX
-  8
-0
- 10
--46.977550
- 20
--164.452555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--47.053750
- 20
--164.376355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--131.534160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--131.457960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--131.457960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--131.534160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--132.499355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--132.575555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--132.575555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--132.499355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--126.454160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--126.377960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--126.377960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--126.454160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--127.419355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--127.495555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--127.419355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--129.146560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--129.070360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--129.070360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--129.146560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--130.187955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--130.187955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--130.111755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--134.226560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--134.150360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--134.150360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--134.226560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--135.191755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--135.267955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--135.267955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--135.191755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--65.621150
- 20
--95.974160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--65.544950
- 20
--95.897960
-  0
-VERTEX
-  8
-0
- 10
--64.020955
- 20
--95.897960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.944755
- 20
--95.974160
-  0
-VERTEX
-  8
-0
- 10
--63.944755
- 20
--96.939355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--64.020955
- 20
--97.015555
-  0
-VERTEX
-  8
-0
- 10
--65.544950
- 20
--97.015555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--65.621150
- 20
--96.939355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--65.621150
- 20
--98.666560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--65.544950
- 20
--98.590360
-  0
-VERTEX
-  8
-0
- 10
--64.020955
- 20
--98.590360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.944755
- 20
--98.666560
-  0
-VERTEX
-  8
-0
- 10
--63.944755
- 20
--99.631755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--64.020955
- 20
--99.707955
-  0
-VERTEX
-  8
-0
- 10
--65.544950
- 20
--99.707955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--65.621150
- 20
--99.631755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--141.694160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--141.617960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--141.617960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--141.694160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--142.659355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--142.735555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--142.735555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--142.659355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--144.386560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--144.310360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--144.310360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--144.386560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--145.351755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--145.427955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--145.427955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--145.351755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--146.774160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--146.697960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--146.697960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--146.774160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--147.739355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--147.815555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--147.815555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--147.739355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--149.466560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--149.390360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--149.390360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--149.466560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--150.431755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--150.507955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--150.507955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--150.431755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--151.854160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--151.777960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--151.777960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--151.854160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--152.819355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--152.895555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--152.895555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--152.819355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--154.546560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--154.470360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--154.470360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--154.546560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--155.511755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--155.587955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--155.587955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--155.511755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--156.934160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--156.857960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--156.857960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--156.934160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--157.899355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--157.975555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--157.975555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--157.899355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--159.626560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--159.550360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--159.550360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--159.626560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--160.591755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--160.667955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--160.667955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--160.591755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--169.786560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--169.710360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--169.710360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--169.786560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--164.706560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--164.630360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--164.630360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--164.706560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--165.671755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--165.747955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--165.747955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--165.671755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--167.017960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--167.017960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--168.059355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--168.135555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--168.135555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--168.059355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--63.081150
- 20
--98.666560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.004950
- 20
--98.590360
-  0
-VERTEX
-  8
-0
- 10
--61.480955
- 20
--98.590360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.404755
- 20
--98.666560
-  0
-VERTEX
-  8
-0
- 10
--61.404755
- 20
--99.631755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.480955
- 20
--99.707955
-  0
-VERTEX
-  8
-0
- 10
--63.004950
- 20
--99.707955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.081150
- 20
--99.631755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--63.081150
- 20
--95.974160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.004950
- 20
--95.897960
-  0
-VERTEX
-  8
-0
- 10
--61.480955
- 20
--95.897960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.404755
- 20
--95.974160
-  0
-VERTEX
-  8
-0
- 10
--61.404755
- 20
--96.939355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.480955
- 20
--97.015555
-  0
-VERTEX
-  8
-0
- 10
--63.004950
- 20
--97.015555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--63.081150
- 20
--96.939355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.877950
- 20
--85.610960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--62.801750
- 20
--85.534760
-  0
-VERTEX
-  8
-0
- 10
--61.836555
- 20
--85.534760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.760355
- 20
--85.610960
-  0
-VERTEX
-  8
-0
- 10
--61.760355
- 20
--87.134955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.836555
- 20
--87.211155
-  0
-VERTEX
-  8
-0
- 10
--62.801750
- 20
--87.211155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--62.877950
- 20
--87.134955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--62.877950
- 20
--81.800960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--62.801750
- 20
--81.724760
-  0
-VERTEX
-  8
-0
- 10
--61.836555
- 20
--81.724760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.760355
- 20
--81.800960
-  0
-VERTEX
-  8
-0
- 10
--61.760355
- 20
--83.324955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--61.836555
- 20
--83.401155
-  0
-VERTEX
-  8
-0
- 10
--62.801750
- 20
--83.401155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--62.877950
- 20
--83.324955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.185550
- 20
--85.610960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--60.109350
- 20
--85.534760
-  0
-VERTEX
-  8
-0
- 10
--59.144155
- 20
--85.534760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.067955
- 20
--85.610960
-  0
-VERTEX
-  8
-0
- 10
--59.067955
- 20
--87.134955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.144155
- 20
--87.211155
-  0
-VERTEX
-  8
-0
- 10
--60.109350
- 20
--87.211155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--60.185550
- 20
--87.134955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--60.185550
- 20
--81.800960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--60.109350
- 20
--81.724760
-  0
-VERTEX
-  8
-0
- 10
--59.144155
- 20
--81.724760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.067955
- 20
--81.800960
-  0
-VERTEX
-  8
-0
- 10
--59.067955
- 20
--83.324955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--59.144155
- 20
--83.401155
-  0
-VERTEX
-  8
-0
- 10
--60.109350
- 20
--83.401155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--60.185550
- 20
--83.324955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--139.306560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--139.230360
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--139.230360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--139.306560
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--140.271755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--140.347955
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--140.347955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--140.271755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--136.537960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--136.537960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--137.579355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--137.655555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--137.655555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--137.579355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--162.014160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--161.937960
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--161.937960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--162.014160
-  0
-VERTEX
-  8
-0
- 10
--48.704755
- 20
--162.979355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.780955
- 20
--163.055555
-  0
-VERTEX
-  8
-0
- 10
--50.304950
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.381150
- 20
--162.979355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--82.004160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--81.927960
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--81.927960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--82.004160
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--82.969355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--83.045555
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--83.045555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--82.969355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--152.920960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--152.844760
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--152.844760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--152.920960
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--154.444955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--154.521155
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--154.521155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--154.444955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--141.490960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--141.414760
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--141.414760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--141.490960
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--143.014955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--143.091155
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--143.091155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--143.014955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-7.124450
- 20
--99.580960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.200650
- 20
--99.504760
-  0
-VERTEX
-  8
-0
- 10
-8.165845
- 20
--99.504760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.242045
- 20
--99.580960
-  0
-VERTEX
-  8
-0
- 10
-8.242045
- 20
--101.104955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.165845
- 20
--101.181155
-  0
-VERTEX
-  8
-0
- 10
-7.200650
- 20
--101.181155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.124450
- 20
--101.104955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--152.920960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--152.844760
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--152.844760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--152.920960
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--154.444955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--154.521155
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--154.521155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--154.444955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.332950
- 20
--165.620960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.256750
- 20
--165.544760
-  0
-VERTEX
-  8
-0
- 10
--19.291555
- 20
--165.544760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.215355
- 20
--165.620960
-  0
-VERTEX
-  8
-0
- 10
--19.215355
- 20
--167.144955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291555
- 20
--167.221155
-  0
-VERTEX
-  8
-0
- 10
--20.256750
- 20
--167.221155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.332950
- 20
--167.144955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.661150
- 20
--155.664160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.584950
- 20
--155.587960
-  0
-VERTEX
-  8
-0
- 10
--3.060955
- 20
--155.587960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.984755
- 20
--155.664160
-  0
-VERTEX
-  8
-0
- 10
--2.984755
- 20
--156.629355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.060955
- 20
--156.705555
-  0
-VERTEX
-  8
-0
- 10
--4.584950
- 20
--156.705555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.661150
- 20
--156.629355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--84.696560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--84.620360
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--84.620360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--84.696560
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--85.661755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--85.737955
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--85.737955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--85.661755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.457950
- 20
--151.650960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.381750
- 20
--151.574760
-  0
-VERTEX
-  8
-0
- 10
--3.416555
- 20
--151.574760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--151.650960
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--153.174955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.416555
- 20
--153.251155
-  0
-VERTEX
-  8
-0
- 10
--4.381750
- 20
--153.251155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.457950
- 20
--153.174955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.228850
- 20
--121.374160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.305050
- 20
--121.297960
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--121.297960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.905245
- 20
--121.374160
-  0
-VERTEX
-  8
-0
- 10
-5.905245
- 20
--122.339355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--122.415555
-  0
-VERTEX
-  8
-0
- 10
-4.305050
- 20
--122.415555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.228850
- 20
--122.339355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--87.084160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--87.007960
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--87.007960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--87.084160
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--88.049355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--88.125555
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--88.125555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--88.049355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.432050
- 20
--99.580960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.508250
- 20
--99.504760
-  0
-VERTEX
-  8
-0
- 10
-5.473445
- 20
--99.504760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.549645
- 20
--99.580960
-  0
-VERTEX
-  8
-0
- 10
-5.549645
- 20
--101.104955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.473445
- 20
--101.181155
-  0
-VERTEX
-  8
-0
- 10
-4.508250
- 20
--101.181155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.432050
- 20
--101.104955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.958850
- 20
--155.664160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.035050
- 20
--155.587960
-  0
-VERTEX
-  8
-0
- 10
-4.559045
- 20
--155.587960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.635245
- 20
--155.664160
-  0
-VERTEX
-  8
-0
- 10
-4.635245
- 20
--156.629355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.559045
- 20
--156.705555
-  0
-VERTEX
-  8
-0
- 10
-3.035050
- 20
--156.705555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.958850
- 20
--156.629355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--141.490960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--141.414760
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--141.414760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--141.490960
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--143.014955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--143.091155
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--143.091155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--143.014955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--168.516560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--168.440360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--168.440360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--168.516560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--169.481755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--169.557955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--169.557955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--169.481755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--165.824160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--165.747960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--165.747960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--165.824160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--166.789355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--166.865555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--166.865555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--166.789355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--163.436560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--163.360360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--163.360360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--163.436560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--160.744160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--160.667960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--160.667960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--160.744160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--161.709355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--161.785555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--161.785555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--161.709355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--157.086560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--157.010360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--157.010360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--157.086560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--158.051755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--158.127955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--158.127955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--158.051755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--154.394160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--154.317960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--154.317960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--154.394160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--155.359355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--155.435555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--155.435555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--155.359355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--148.196560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--148.196560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--149.161755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--149.237955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--149.237955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--149.161755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--146.469355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--146.545555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--146.545555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--146.469355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--138.036560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--138.036560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--139.001755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--139.077955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--139.077955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--139.001755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--135.344160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--135.267960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--135.267960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--135.344160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--136.309355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--136.385555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--136.385555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--136.309355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--131.686560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--131.610360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--131.610360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--131.686560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--132.651755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--132.727955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--132.727955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--132.651755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--128.994160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--128.917960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--128.917960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--128.994160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--129.959355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--130.035555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--129.959355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--125.336560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--125.260360
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--125.260360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--125.336560
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--126.301755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--126.377955
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--126.377955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--126.301755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--122.644160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--122.567960
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--122.567960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--122.644160
-  0
-VERTEX
-  8
-0
- 10
--33.464755
- 20
--123.609355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--33.540955
- 20
--123.685555
-  0
-VERTEX
-  8
-0
- 10
--35.064950
- 20
--123.685555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--35.141150
- 20
--123.609355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.791150
- 20
--163.436560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--28.714950
- 20
--163.360360
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--163.360360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.114755
- 20
--163.436560
-  0
-VERTEX
-  8
-0
- 10
--27.114755
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--28.714950
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--28.791150
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--28.791150
- 20
--160.744160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--28.714950
- 20
--160.667960
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--160.667960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.114755
- 20
--160.744160
-  0
-VERTEX
-  8
-0
- 10
--27.114755
- 20
--161.709355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.190955
- 20
--161.785555
-  0
-VERTEX
-  8
-0
- 10
--28.714950
- 20
--161.785555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--28.791150
- 20
--161.709355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.688850
- 20
--121.374160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.765050
- 20
--121.297960
-  0
-VERTEX
-  8
-0
- 10
-3.289045
- 20
--121.297960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.365245
- 20
--121.374160
-  0
-VERTEX
-  8
-0
- 10
-3.365245
- 20
--122.339355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.289045
- 20
--122.415555
-  0
-VERTEX
-  8
-0
- 10
-1.765050
- 20
--122.415555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.688850
- 20
--122.339355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--131.330960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--131.254760
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--131.254760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--131.330960
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--132.854955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--132.931155
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--132.931155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--132.854955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.958850
- 20
--158.356560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.035050
- 20
--158.280360
-  0
-VERTEX
-  8
-0
- 10
-4.559045
- 20
--158.280360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.635245
- 20
--158.356560
-  0
-VERTEX
-  8
-0
- 10
-4.635245
- 20
--159.321755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.559045
- 20
--159.397955
-  0
-VERTEX
-  8
-0
- 10
-3.035050
- 20
--159.397955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.958850
- 20
--159.321755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--151.650960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.390650
- 20
--151.574760
-  0
-VERTEX
-  8
-0
- 10
-4.355845
- 20
--151.574760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--151.650960
-  0
-VERTEX
-  8
-0
- 10
-4.432045
- 20
--153.174955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.355845
- 20
--153.251155
-  0
-VERTEX
-  8
-0
- 10
-3.390650
- 20
--153.251155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--153.174955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--138.950960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--138.874760
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--138.874760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--138.950960
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--140.474955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--140.551155
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--140.551155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--140.474955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--131.330960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--131.254760
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--131.254760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--131.330960
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--132.854955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--132.931155
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--132.931155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--132.854955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--128.790960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--128.714760
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--128.714760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--128.790960
-  0
-VERTEX
-  8
-0
- 10
-14.592045
- 20
--130.314955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-14.515845
- 20
--130.391155
-  0
-VERTEX
-  8
-0
- 10
-13.550650
- 20
--130.391155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-13.474450
- 20
--130.314955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-4.228850
- 20
--124.066560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.305050
- 20
--123.990360
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--123.990360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.905245
- 20
--124.066560
-  0
-VERTEX
-  8
-0
- 10
-5.905245
- 20
--125.031755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.829045
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
-4.305050
- 20
--125.107955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.228850
- 20
--125.031755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-1.688850
- 20
--124.066560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.765050
- 20
--123.990360
-  0
-VERTEX
-  8
-0
- 10
-3.289045
- 20
--123.990360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.365245
- 20
--124.066560
-  0
-VERTEX
-  8
-0
- 10
-3.365245
- 20
--125.031755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.289045
- 20
--125.107955
-  0
-VERTEX
-  8
-0
- 10
-1.765050
- 20
--125.107955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.688850
- 20
--125.031755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--12.560550
- 20
--165.620960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.484350
- 20
--165.544760
-  0
-VERTEX
-  8
-0
- 10
--11.519155
- 20
--165.544760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--165.620960
-  0
-VERTEX
-  8
-0
- 10
--11.442955
- 20
--167.144955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.519155
- 20
--167.221155
-  0
-VERTEX
-  8
-0
- 10
--12.484350
- 20
--167.221155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.560550
- 20
--167.144955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.765550
- 20
--151.650960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.689350
- 20
--151.574760
-  0
-VERTEX
-  8
-0
- 10
--0.724155
- 20
--151.574760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--151.650960
-  0
-VERTEX
-  8
-0
- 10
--0.647955
- 20
--153.174955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.724155
- 20
--153.251155
-  0
-VERTEX
-  8
-0
- 10
--1.689350
- 20
--153.251155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.765550
- 20
--153.174955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.640550
- 20
--165.620960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564350
- 20
--165.544760
-  0
-VERTEX
-  8
-0
- 10
--16.599155
- 20
--165.544760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--165.620960
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--167.144955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.599155
- 20
--167.221155
-  0
-VERTEX
-  8
-0
- 10
--17.564350
- 20
--167.221155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.640550
- 20
--167.144955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--89.776560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--89.700360
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--89.700360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--89.776560
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--90.741755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--90.817955
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--90.817955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--90.741755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--94.069160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--93.992960
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--93.992960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--94.069160
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--95.034355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--95.110555
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--95.110555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--95.034355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--128.790960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--128.714760
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--128.714760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--128.790960
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--130.314955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--130.391155
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--130.391155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--130.314955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.252950
- 20
--165.620960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.176750
- 20
--165.544760
-  0
-VERTEX
-  8
-0
- 10
--14.211555
- 20
--165.544760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.135355
- 20
--165.620960
-  0
-VERTEX
-  8
-0
- 10
--14.135355
- 20
--167.144955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.211555
- 20
--167.221155
-  0
-VERTEX
-  8
-0
- 10
--15.176750
- 20
--167.221155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.252950
- 20
--167.144955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--138.950960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--138.874760
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--138.874760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--138.950960
-  0
-VERTEX
-  8
-0
- 10
-11.899645
- 20
--140.474955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-11.823445
- 20
--140.551155
-  0
-VERTEX
-  8
-0
- 10
-10.858250
- 20
--140.551155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-10.782050
- 20
--140.474955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--99.707960
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--99.707960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--100.749355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--100.825555
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--100.825555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--100.749355
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--96.761560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--96.685360
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--96.685360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--96.761560
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--97.726755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--97.802955
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--97.802955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--97.726755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.661150
- 20
--158.356560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.584950
- 20
--158.280360
-  0
-VERTEX
-  8
-0
- 10
--3.060955
- 20
--158.280360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.984755
- 20
--158.356560
-  0
-VERTEX
-  8
-0
- 10
--2.984755
- 20
--159.321755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.060955
- 20
--159.397955
-  0
-VERTEX
-  8
-0
- 10
--4.584950
- 20
--159.397955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.661150
- 20
--159.321755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.622050
- 20
--151.650960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.698250
- 20
--151.574760
-  0
-VERTEX
-  8
-0
- 10
-1.663445
- 20
--151.574760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.739645
- 20
--151.650960
-  0
-VERTEX
-  8
-0
- 10
-1.739645
- 20
--153.174955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.663445
- 20
--153.251155
-  0
-VERTEX
-  8
-0
- 10
-0.698250
- 20
--153.251155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.622050
- 20
--153.174955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--102.476560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--102.400360
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--102.400360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--102.476560
-  0
-VERTEX
-  8
-0
- 10
-2.095245
- 20
--103.441755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.019045
- 20
--103.517955
-  0
-VERTEX
-  8
-0
- 10
-0.495050
- 20
--103.517955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.418850
- 20
--103.441755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.402250
- 20
--131.711960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.478450
- 20
--131.635760
-  0
-VERTEX
-  8
-0
- 10
-45.935645
- 20
--131.635760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.011845
- 20
--131.711960
-  0
-VERTEX
-  8
-0
- 10
-46.011845
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.935645
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
-45.478450
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.402250
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-45.402250
- 20
--140.500360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.478450
- 20
--140.424160
-  0
-VERTEX
-  8
-0
- 10
-45.935645
- 20
--140.424160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.011845
- 20
--140.500360
-  0
-VERTEX
-  8
-0
- 10
-46.011845
- 20
--142.633955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.935645
- 20
--142.710155
-  0
-VERTEX
-  8
-0
- 10
-45.478450
- 20
--142.710155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.402250
- 20
--142.633955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.942250
- 20
--140.500360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.018450
- 20
--140.424160
-  0
-VERTEX
-  8
-0
- 10
-48.475645
- 20
--140.424160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.551845
- 20
--140.500360
-  0
-VERTEX
-  8
-0
- 10
-48.551845
- 20
--142.633955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.475645
- 20
--142.710155
-  0
-VERTEX
-  8
-0
- 10
-48.018450
- 20
--142.710155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.942250
- 20
--142.633955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.672250
- 20
--140.500360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.748450
- 20
--140.424160
-  0
-VERTEX
-  8
-0
- 10
-47.205645
- 20
--140.424160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.281845
- 20
--140.500360
-  0
-VERTEX
-  8
-0
- 10
-47.281845
- 20
--142.633955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.205645
- 20
--142.710155
-  0
-VERTEX
-  8
-0
- 10
-46.748450
- 20
--142.710155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.672250
- 20
--142.633955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--136.944360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--136.868160
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--136.868160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--136.944360
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--137.401555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--137.477755
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--137.477755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--137.401555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--129.324360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--129.248160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--129.248160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--129.324360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--129.781555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--129.857755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--129.857755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--129.781555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--130.594360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--130.518160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--130.518160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--130.594360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--131.051555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--131.127755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--131.127755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--131.051555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--131.864360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--131.788160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--131.788160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--131.864360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--132.321555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--132.397755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--132.397755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--132.321555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--133.134360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--133.058160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--133.058160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--133.134360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--133.591555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--133.667755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--133.667755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--133.591555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--138.214360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--138.138160
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--138.138160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--138.214360
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--138.671555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--138.747755
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--138.747755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--138.671555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.672250
- 20
--131.711960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.748450
- 20
--131.635760
-  0
-VERTEX
-  8
-0
- 10
-47.205645
- 20
--131.635760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.281845
- 20
--131.711960
-  0
-VERTEX
-  8
-0
- 10
-47.281845
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.205645
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
-46.748450
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.672250
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.212250
- 20
--140.500360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.288450
- 20
--140.424160
-  0
-VERTEX
-  8
-0
- 10
-49.745645
- 20
--140.424160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.821845
- 20
--140.500360
-  0
-VERTEX
-  8
-0
- 10
-49.821845
- 20
--142.633955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.745645
- 20
--142.710155
-  0
-VERTEX
-  8
-0
- 10
-49.288450
- 20
--142.710155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.212250
- 20
--142.633955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.942250
- 20
--131.711960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.018450
- 20
--131.635760
-  0
-VERTEX
-  8
-0
- 10
-48.475645
- 20
--131.635760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.551845
- 20
--131.711960
-  0
-VERTEX
-  8
-0
- 10
-48.551845
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.475645
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
-48.018450
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.942250
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--93.764360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--93.688160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--93.688160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--93.764360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--94.221555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--94.297755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--94.297755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--94.221555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--96.304360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--96.228160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--96.228160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--96.304360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--96.761555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--96.837755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--96.837755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--96.761555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--139.484360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--139.408160
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--139.408160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--139.484360
-  0
-VERTEX
-  8
-0
- 10
-44.995845
- 20
--139.941555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.919645
- 20
--140.017755
-  0
-VERTEX
-  8
-0
- 10
-42.786050
- 20
--140.017755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.709850
- 20
--139.941555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--128.054360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--127.978160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--127.978160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--128.054360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--128.511555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--128.587755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--128.587755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--128.511555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--105.194360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--105.118160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--105.118160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--105.194360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--105.651555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--105.727755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--105.727755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--105.651555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.212250
- 20
--131.711960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.288450
- 20
--131.635760
-  0
-VERTEX
-  8
-0
- 10
-49.745645
- 20
--131.635760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.821845
- 20
--131.711960
-  0
-VERTEX
-  8
-0
- 10
-49.821845
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.745645
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
-49.288450
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.212250
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--139.484360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--139.408160
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--139.408160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--139.484360
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--139.941555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--140.017755
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--140.017755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--139.941555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.352250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.428450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-26.885645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.961845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-26.961845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.885645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-26.428450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.352250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.352250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.428450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-26.885645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.961845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-26.961845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.885645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-26.428450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.352250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.082250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.158450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-25.615645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.691845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-25.691845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.615645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-25.158450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.082250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.082250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.158450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-25.615645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.691845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-25.691845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.615645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-25.158450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.082250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.812250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.888450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-24.345645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.421845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-24.421845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.345645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-23.888450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.812250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.812250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.888450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-24.345645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.421845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-24.421845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.345645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-23.888450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.812250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.542250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.618450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-23.075645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.151845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-23.151845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.075645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-22.618450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.542250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-22.542250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.618450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-23.075645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.151845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-23.151845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.075645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-22.618450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.542250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--92.494360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--92.418160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--92.418160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--92.494360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--92.951555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--93.027755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--93.027755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--92.951555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.272250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.348450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-21.805645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.881845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-21.881845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.805645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-21.348450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.272250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.272250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.348450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-21.805645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.881845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-21.881845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.805645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-21.348450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.272250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.002250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.078450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-20.535645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.611845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-20.611845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.535645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-20.078450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.002250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.002250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.078450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-20.535645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.611845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-20.611845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.535645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-20.078450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.002250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--128.054360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--127.978160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--127.978160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--128.054360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--128.511555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--128.587755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--128.587755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--128.511555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--95.034360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--94.958160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--94.958160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--95.034360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--95.491555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--95.567755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--95.567755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--95.491555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--97.574360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--97.498160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--97.498160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--97.574360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--98.031555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--98.107755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--98.107755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--98.031555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--130.594360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--130.518160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--130.518160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--130.594360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--131.051555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--131.127755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--131.127755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--131.051555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--131.864360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--131.788160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--131.788160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--131.864360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--132.321555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--132.397755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--132.397755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--132.321555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--98.844360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--98.768160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--98.768160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--98.844360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--99.301555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--99.377755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--99.377755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--99.301555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--133.134360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--133.058160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--133.058160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--133.134360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--133.591555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--133.667755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--133.667755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--133.591555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--100.114360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--100.038160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--100.038160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--100.114360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--100.571555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--100.647755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--100.647755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--100.571555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.162250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.238450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-30.695645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.771845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-30.771845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.695645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-30.238450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.162250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--103.924360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--103.848160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--103.848160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--103.924360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--104.381555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--104.457755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--104.457755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--104.381555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.557750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.481550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--15.024355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.948155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--14.948155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.024355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--15.481550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.557750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--15.557750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.481550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--15.024355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.948155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--14.948155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.024355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--15.481550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.557750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--101.384360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--101.308160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--101.308160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--101.384360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--101.841555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--101.917755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--101.917755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--101.841555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--102.654360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--102.578160
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--102.578160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--102.654360
-  0
-VERTEX
-  8
-0
- 10
--24.854155
- 20
--103.111555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.930355
- 20
--103.187755
-  0
-VERTEX
-  8
-0
- 10
--27.063950
- 20
--103.187755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--27.140150
- 20
--103.111555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.892250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.968450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-29.425645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.501845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-29.501845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.425645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-28.968450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.892250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.892250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.968450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-29.425645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.501845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-29.501845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.425645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-28.968450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.892250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.622250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.698450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-28.155645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.231845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-28.231845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.155645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-27.698450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.622250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.287750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.211550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--13.754355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.678155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--13.678155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.754355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--14.211550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.287750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.287750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.211550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--13.754355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.678155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--13.678155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.754355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--14.211550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.287750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-27.622250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.698450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-28.155645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.231845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-28.231845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.155645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-27.698450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.622250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
-33.464245
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.388045
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
-31.254450
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.178250
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.017750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.941550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--12.484355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.408155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--12.408155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.484355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--12.941550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.017750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.017750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.941550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--12.484355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.408155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--12.408155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.484355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--12.941550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.017750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.482250
- 20
--140.500360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.558450
- 20
--140.424160
-  0
-VERTEX
-  8
-0
- 10
-51.015645
- 20
--140.424160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.091845
- 20
--140.500360
-  0
-VERTEX
-  8
-0
- 10
-51.091845
- 20
--142.633955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.015645
- 20
--142.710155
-  0
-VERTEX
-  8
-0
- 10
-50.558450
- 20
--142.710155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.482250
- 20
--142.633955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.747750
- 20
--106.210360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.671550
- 20
--106.134160
-  0
-VERTEX
-  8
-0
- 10
--11.214355
- 20
--106.134160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.138155
- 20
--106.210360
-  0
-VERTEX
-  8
-0
- 10
--11.138155
- 20
--108.343955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.214355
- 20
--108.420155
-  0
-VERTEX
-  8
-0
- 10
--11.671550
- 20
--108.420155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.747750
- 20
--108.343955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--11.747750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.671550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--11.214355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.138155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--11.138155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.214355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--11.671550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--11.747750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-50.482250
- 20
--131.711960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.558450
- 20
--131.635760
-  0
-VERTEX
-  8
-0
- 10
-51.015645
- 20
--131.635760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.091845
- 20
--131.711960
-  0
-VERTEX
-  8
-0
- 10
-51.091845
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.015645
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
-50.558450
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.482250
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.162250
- 20
--125.361960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.238450
- 20
--125.285760
-  0
-VERTEX
-  8
-0
- 10
-30.695645
- 20
--125.285760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.771845
- 20
--125.361960
-  0
-VERTEX
-  8
-0
- 10
-30.771845
- 20
--127.495555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.695645
- 20
--127.571755
-  0
-VERTEX
-  8
-0
- 10
-30.238450
- 20
--127.571755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.162250
- 20
--127.495555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--138.214360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--138.138160
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--138.138160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--138.214360
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--138.671555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--138.747755
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--138.747755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--138.671555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--105.194360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--105.118160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--105.118160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--105.194360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--105.651555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--105.727755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--105.727755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--105.651555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--103.924360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--103.848160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--103.848160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--103.924360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--104.381555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--104.457755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--104.457755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--104.381555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--102.654360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--102.578160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--102.578160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--102.654360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--103.111555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--103.187755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--103.187755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--103.111555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--101.384360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--101.308160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--101.308160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--101.384360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--101.841555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--101.917755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--101.917755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--101.841555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--100.114360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--100.038160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--100.038160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--100.114360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--100.571555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--100.647755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--100.647755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--100.571555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--98.844360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--98.768160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--98.768160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--98.844360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--99.301555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--99.377755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--99.377755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--99.301555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--97.574360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--97.498160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--97.498160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--97.574360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--98.031555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--98.107755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--98.107755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--98.031555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--96.304360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--96.228160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--96.228160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--96.304360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--96.761555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--96.837755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--96.837755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--96.761555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--95.034360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--94.958160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--94.958160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--95.034360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--95.491555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--95.567755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--95.567755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--95.491555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--93.764360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--93.688160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--93.688160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--93.764360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--94.221555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--94.297755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--94.297755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--94.221555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--92.494360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--92.418160
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--92.418160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--92.494360
-  0
-VERTEX
-  8
-0
- 10
--8.445755
- 20
--92.951555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--8.521955
- 20
--93.027755
-  0
-VERTEX
-  8
-0
- 10
--10.655550
- 20
--93.027755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.731750
- 20
--92.951555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--133.134360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--133.058160
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--133.058160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--133.134360
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--133.591555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--133.667755
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--133.667755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--133.591555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--131.864360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--131.788160
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--131.788160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--131.864360
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--132.321555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--132.397755
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--132.397755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--132.321555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--130.594360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--130.518160
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--130.518160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--130.594360
-  0
-VERTEX
-  8
-0
- 10
--3.264155
- 20
--131.051555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.340355
- 20
--131.127755
-  0
-VERTEX
-  8
-0
- 10
--5.473950
- 20
--131.127755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--5.550150
- 20
--131.051555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--136.944360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--136.868160
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--136.868160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--136.944360
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--137.401555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--137.477755
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--137.477755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--137.401555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
-53.784245
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.708045
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
-51.574450
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.498250
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--89.801960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--89.725760
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--89.725760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--89.801960
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--91.935555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--92.011755
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--92.011755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--91.935555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--129.324360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--129.248160
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--129.248160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--129.324360
-  0
-VERTEX
-  8
-0
- 10
-19.595845
- 20
--129.781555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.519645
- 20
--129.857755
-  0
-VERTEX
-  8
-0
- 10
-17.386050
- 20
--129.857755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.309850
- 20
--129.781555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--127.901960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--127.825760
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--127.825760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--127.901960
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--130.111755
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--130.035555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--135.674360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--135.598160
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--135.598160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--135.674360
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--136.131555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--136.207755
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--136.207755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--136.131555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--127.901960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--127.825760
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--127.825760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--127.901960
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--130.111755
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--130.035555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--134.404360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--134.328160
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--134.328160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--134.404360
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--134.861555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--134.937755
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--134.937755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--134.861555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--130.594360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--130.518160
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--130.518160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--130.594360
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--131.051555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--131.127755
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--131.127755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--131.051555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--131.864360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--131.788160
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--131.788160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--131.864360
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--132.321555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--132.397755
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--132.397755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--132.321555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--127.901960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--127.825760
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--127.825760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--127.901960
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--130.111755
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--130.035555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--133.134360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--133.058160
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--133.058160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--133.134360
-  0
-VERTEX
-  8
-0
- 10
-5.524245
- 20
--133.591555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-5.448045
- 20
--133.667755
-  0
-VERTEX
-  8
-0
- 10
-3.314450
- 20
--133.667755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.238250
- 20
--133.591555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--136.690360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--136.614160
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--136.614160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--136.690360
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--138.823955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--138.900155
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--138.900155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--138.823955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--127.901960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--127.825760
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--127.825760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--127.901960
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--130.111755
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--130.035555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--127.901960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--127.825760
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--127.825760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--127.901960
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--130.035555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--130.111755
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--130.111755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--130.035555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.643350
- 20
--135.928360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.567150
- 20
--135.852160
-  0
-VERTEX
-  8
-0
- 10
--13.398755
- 20
--135.852160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.322555
- 20
--135.928360
-  0
-VERTEX
-  8
-0
- 10
--13.322555
- 20
--136.791955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.398755
- 20
--136.868155
-  0
-VERTEX
-  8
-0
- 10
--14.567150
- 20
--136.868155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.643350
- 20
--136.791955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.213350
- 20
--121.958360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.137150
- 20
--121.882160
-  0
-VERTEX
-  8
-0
- 10
--1.968755
- 20
--121.882160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.892555
- 20
--121.958360
-  0
-VERTEX
-  8
-0
- 10
--1.892555
- 20
--122.821955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.968755
- 20
--122.898155
-  0
-VERTEX
-  8
-0
- 10
--3.137150
- 20
--122.898155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.213350
- 20
--122.821955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.373350
- 20
--146.088360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.297150
- 20
--146.012160
-  0
-VERTEX
-  8
-0
- 10
--12.128755
- 20
--146.012160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.052555
- 20
--146.088360
-  0
-VERTEX
-  8
-0
- 10
--12.052555
- 20
--146.951955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.128755
- 20
--147.028155
-  0
-VERTEX
-  8
-0
- 10
--13.297150
- 20
--147.028155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.373350
- 20
--146.951955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.188350
- 20
--135.318760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.112150
- 20
--135.242560
-  0
-VERTEX
-  8
-0
- 10
--56.248555
- 20
--135.242560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.172355
- 20
--135.318760
-  0
-VERTEX
-  8
-0
- 10
--56.172355
- 20
--136.487155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.248555
- 20
--136.563355
-  0
-VERTEX
-  8
-0
- 10
--57.112150
- 20
--136.563355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.188350
- 20
--136.487155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--57.188350
- 20
--146.748760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.112150
- 20
--146.672560
-  0
-VERTEX
-  8
-0
- 10
--56.248555
- 20
--146.672560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.172355
- 20
--146.748760
-  0
-VERTEX
-  8
-0
- 10
--56.172355
- 20
--147.917155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.248555
- 20
--147.993355
-  0
-VERTEX
-  8
-0
- 10
--57.112150
- 20
--147.993355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.188350
- 20
--147.917155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.643350
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.567150
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
--13.398755
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.322555
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
--13.322555
- 20
--138.417555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.398755
- 20
--138.493755
-  0
-VERTEX
-  8
-0
- 10
--14.567150
- 20
--138.493755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.643350
- 20
--138.417555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--81.978760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--81.902560
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--81.902560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.446755
- 20
--81.978760
-  0
-VERTEX
-  8
-0
- 10
--16.446755
- 20
--83.147155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.522955
- 20
--83.223355
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--83.223355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--83.147155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.373350
- 20
--147.713960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.297150
- 20
--147.637760
-  0
-VERTEX
-  8
-0
- 10
--12.128755
- 20
--147.637760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.052555
- 20
--147.713960
-  0
-VERTEX
-  8
-0
- 10
--12.052555
- 20
--148.577555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--12.128755
- 20
--148.653755
-  0
-VERTEX
-  8
-0
- 10
--13.297150
- 20
--148.653755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.373350
- 20
--148.577555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--3.213350
- 20
--123.583960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.137150
- 20
--123.507760
-  0
-VERTEX
-  8
-0
- 10
--1.968755
- 20
--123.507760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.892555
- 20
--123.583960
-  0
-VERTEX
-  8
-0
- 10
--1.892555
- 20
--124.447555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.968755
- 20
--124.523755
-  0
-VERTEX
-  8
-0
- 10
--3.137150
- 20
--124.523755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.213350
- 20
--124.447555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.088350
- 20
--81.978760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.012150
- 20
--81.902560
-  0
-VERTEX
-  8
-0
- 10
--18.148555
- 20
--81.902560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.072355
- 20
--81.978760
-  0
-VERTEX
-  8
-0
- 10
--18.072355
- 20
--83.147155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.148555
- 20
--83.223355
-  0
-VERTEX
-  8
-0
- 10
--19.012150
- 20
--83.223355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.088350
- 20
--83.147155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.838150
- 20
--118.808760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.761950
- 20
--118.732560
-  0
-VERTEX
-  8
-0
- 10
--22.898355
- 20
--118.732560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.822155
- 20
--118.808760
-  0
-VERTEX
-  8
-0
- 10
--22.822155
- 20
--119.977155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.898355
- 20
--120.053355
-  0
-VERTEX
-  8
-0
- 10
--23.761950
- 20
--120.053355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838150
- 20
--119.977155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.838150
- 20
--122.618760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.761950
- 20
--122.542560
-  0
-VERTEX
-  8
-0
- 10
--22.898355
- 20
--122.542560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.822155
- 20
--122.618760
-  0
-VERTEX
-  8
-0
- 10
--22.822155
- 20
--123.787155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.898355
- 20
--123.863355
-  0
-VERTEX
-  8
-0
- 10
--23.761950
- 20
--123.863355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838150
- 20
--123.787155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.463750
- 20
--118.808760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.387550
- 20
--118.732560
-  0
-VERTEX
-  8
-0
- 10
--24.523955
- 20
--118.732560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447755
- 20
--118.808760
-  0
-VERTEX
-  8
-0
- 10
--24.447755
- 20
--119.977155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.523955
- 20
--120.053355
-  0
-VERTEX
-  8
-0
- 10
--25.387550
- 20
--120.053355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.463750
- 20
--119.977155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.463750
- 20
--122.618760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.387550
- 20
--122.542560
-  0
-VERTEX
-  8
-0
- 10
--24.523955
- 20
--122.542560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447755
- 20
--122.618760
-  0
-VERTEX
-  8
-0
- 10
--24.447755
- 20
--123.787155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.523955
- 20
--123.863355
-  0
-VERTEX
-  8
-0
- 10
--25.387550
- 20
--123.863355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.463750
- 20
--123.787155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--146.748760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--146.672560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--146.672560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.546755
- 20
--146.748760
-  0
-VERTEX
-  8
-0
- 10
--54.546755
- 20
--147.917155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--147.993355
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--147.993355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--147.917155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--135.318760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--135.242560
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--135.242560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.546755
- 20
--135.318760
-  0
-VERTEX
-  8
-0
- 10
--54.546755
- 20
--136.487155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.622955
- 20
--136.563355
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--136.563355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--136.487155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--90.182960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--90.106760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--90.106760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--90.182960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--91.046555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--91.122755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--91.122755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--91.046555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.833350
- 20
--162.953960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.757150
- 20
--162.877760
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--162.877760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--9.512555
- 20
--162.953960
-  0
-VERTEX
-  8
-0
- 10
--9.512555
- 20
--163.817555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--163.893755
-  0
-VERTEX
-  8
-0
- 10
--10.757150
- 20
--163.893755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.833350
- 20
--163.817555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--10.833350
- 20
--161.328360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.757150
- 20
--161.252160
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--161.252160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--9.512555
- 20
--161.328360
-  0
-VERTEX
-  8
-0
- 10
--9.512555
- 20
--162.191955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--9.588755
- 20
--162.268155
-  0
-VERTEX
-  8
-0
- 10
--10.757150
- 20
--162.268155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--10.833350
- 20
--162.191955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.203350
- 20
--123.583960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.127150
- 20
--123.507760
-  0
-VERTEX
-  8
-0
- 10
--48.958755
- 20
--123.507760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.882555
- 20
--123.583960
-  0
-VERTEX
-  8
-0
- 10
--48.882555
- 20
--124.447555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.958755
- 20
--124.523755
-  0
-VERTEX
-  8
-0
- 10
--50.127150
- 20
--124.523755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.203350
- 20
--124.447555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--86.372960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--86.296760
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--86.296760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--86.372960
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--87.236555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--87.312755
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--87.312755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--87.236555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--87.998560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--87.922360
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--87.922360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--87.998560
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--88.862155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--88.938355
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--88.938355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--88.862155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--91.808560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--91.732360
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--91.732360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--91.808560
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--92.672155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--92.748355
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--92.748355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--92.672155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--97.828360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--97.752160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--97.752160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--97.828360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--98.691955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--98.768155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--98.768155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--98.691955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--99.453960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--99.377760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--99.377760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--99.453960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--100.317555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--100.393755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--100.393755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--100.317555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--111.798360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--111.722160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--111.722160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--111.798360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--112.661955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--112.738155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--112.738155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--112.661955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--113.423960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--113.347760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--113.347760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--113.423960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--114.287555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--114.363755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--114.363755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--114.287555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--125.768360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--125.692160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--125.692160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--125.768360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--126.631955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--126.708155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--126.708155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--126.631955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--127.393960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--127.317760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--127.317760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--127.393960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--128.257555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--128.333755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--128.333755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--128.257555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--135.928360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--135.852160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--135.852160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--135.928360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--136.791955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--136.868155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--136.868155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--136.791955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--138.417555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--138.493755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--138.493755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--138.417555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--153.708360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--153.632160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--153.632160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--153.708360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--154.571955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--154.648155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--154.648155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--154.571955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--155.333960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--155.257760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--155.257760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--155.333960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--156.197555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--156.273755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--156.273755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--156.197555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--99.098360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--99.022160
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--99.022160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--99.098360
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--99.961955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--100.038155
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--100.038155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--99.961955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--165.138360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--165.062160
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--165.062160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--165.138360
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--166.001955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--166.078155
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--166.078155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--166.001955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--154.063960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--153.987760
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--153.987760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--154.063960
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--154.927555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--155.003755
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--155.003755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--154.927555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--166.763960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--166.687760
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--166.687760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--166.763960
-  0
-VERTEX
-  8
-0
- 10
-57.797445
- 20
--167.627555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-57.721245
- 20
--167.703755
-  0
-VERTEX
-  8
-0
- 10
-56.552850
- 20
--167.703755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-56.476650
- 20
--167.627555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--100.723960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--100.647760
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--100.647760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--100.723960
-  0
-VERTEX
-  8
-0
- 10
-42.557445
- 20
--101.587555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.481245
- 20
--101.663755
-  0
-VERTEX
-  8
-0
- 10
-41.312850
- 20
--101.663755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-41.236650
- 20
--101.587555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--132.092960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--132.016760
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--132.016760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--132.092960
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--132.956555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--133.032755
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--133.032755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--132.956555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--133.718560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--133.642360
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--133.642360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--133.718560
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--134.582155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--134.658355
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--134.658355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--134.582155
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--152.438360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--152.362160
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--152.362160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--152.438360
-  0
-VERTEX
-  8
-0
- 10
-37.477445
- 20
--153.301955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-37.401245
- 20
--153.378155
-  0
-VERTEX
-  8
-0
- 10
-36.232850
- 20
--153.378155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-36.156650
- 20
--153.301955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--168.033960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--167.957760
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--167.957760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--168.033960
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--168.897555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--168.973755
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--168.973755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--168.897555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.616650
- 20
--167.678360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.692850
- 20
--167.602160
-  0
-VERTEX
-  8
-0
- 10
-34.861245
- 20
--167.602160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-34.937445
- 20
--167.678360
-  0
-VERTEX
-  8
-0
- 10
-34.937445
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-34.861245
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
-33.692850
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.616650
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.616650
- 20
--169.303960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.692850
- 20
--169.227760
-  0
-VERTEX
-  8
-0
- 10
-34.861245
- 20
--169.227760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-34.937445
- 20
--169.303960
-  0
-VERTEX
-  8
-0
- 10
-34.937445
- 20
--170.167555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-34.861245
- 20
--170.243755
-  0
-VERTEX
-  8
-0
- 10
-33.692850
- 20
--170.243755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.616650
- 20
--170.167555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--50.203350
- 20
--121.958360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.127150
- 20
--121.882160
-  0
-VERTEX
-  8
-0
- 10
--48.958755
- 20
--121.882160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.882555
- 20
--121.958360
-  0
-VERTEX
-  8
-0
- 10
--48.882555
- 20
--122.821955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--48.958755
- 20
--122.898155
-  0
-VERTEX
-  8
-0
- 10
--50.127150
- 20
--122.898155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--50.203350
- 20
--122.821955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--146.088360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--146.012160
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--146.012160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--146.088360
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--146.951955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--147.028155
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--147.028155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--146.951955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--147.713960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--147.637760
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--147.637760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--147.713960
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--148.577555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--148.653755
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--148.653755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--148.577555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--166.408360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--166.332160
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--166.332160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--166.408360
-  0
-VERTEX
-  8
-0
- 10
-8.267445
- 20
--167.271955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-8.191245
- 20
--167.348155
-  0
-VERTEX
-  8
-0
- 10
-7.022850
- 20
--167.348155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-6.946650
- 20
--167.271955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.652750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.576550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--13.119355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.043155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--13.043155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.119355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--13.576550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.652750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--13.652750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.576550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--13.119355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.043155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--13.043155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.119355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--13.576550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--13.652750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.922750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.846550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--14.389355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.313155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--14.313155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.389355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--14.846550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.922750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--14.922750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.846550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--14.389355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.313155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--14.313155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.389355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--14.846550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--14.922750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.192750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.116550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--15.659355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.583155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--15.583155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.659355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--16.116550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.192750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.192750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.116550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--15.659355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.583155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--15.583155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--15.659355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--16.116550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.192750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.827250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-16.903450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-17.360645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.436845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-17.436845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.360645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-16.903450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-16.827250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-16.827250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-16.903450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-17.360645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.436845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-17.436845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-17.360645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-16.903450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-16.827250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--16.929355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.853155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--16.853155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.929355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--16.929355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.853155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--16.853155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.929355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--17.386550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.462750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-18.706845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.630645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-18.173450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-18.097250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-19.976845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.900645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-19.443450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-19.367250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-21.246845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.170645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-20.713450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-20.637250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.732750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.656550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--18.199355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.123155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--18.123155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.199355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--18.656550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.732750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.732750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.656550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--18.199355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.123155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--18.123155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.199355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--18.656550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.732750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-22.516845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-22.440645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-21.983450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-21.907250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-23.786845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.710645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-23.253450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-23.177250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-25.056845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.980645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-24.523450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-24.447250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.926550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--19.469355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.393155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--19.393155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.469355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--19.926550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.926550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--19.469355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.393155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--19.393155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.469355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--19.926550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.002750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-26.326845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.250645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-25.793450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-25.717250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-27.596845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-27.520645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-27.063450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-26.987250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-28.866845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.790645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-28.333450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-28.257250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-30.136845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.060645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-29.603450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-29.527250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.272750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.196550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--20.739355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.663155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--20.663155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.739355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--21.196550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.272750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.272750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.196550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--20.739355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.663155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--20.663155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.739355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--21.196550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.272750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.797250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.873450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-31.330645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.406845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-31.406845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.330645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-30.873450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.797250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-30.797250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.873450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-31.330645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.406845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-31.406845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-31.330645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-30.873450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-30.797250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.542750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.466550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--22.009355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.933155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--21.933155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.009355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--22.466550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.542750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--22.542750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.466550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--22.009355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.933155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--21.933155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.009355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--22.466550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.542750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.067250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.143450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-32.600645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.676845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-32.676845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.600645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-32.143450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.067250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-32.067250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.143450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-32.600645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.676845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-32.676845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.600645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-32.143450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-32.067250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.337250
- 20
--154.521160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.413450
- 20
--154.444960
-  0
-VERTEX
-  8
-0
- 10
-33.870645
- 20
--154.444960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.946845
- 20
--154.521160
-  0
-VERTEX
-  8
-0
- 10
-33.946845
- 20
--156.146755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.870645
- 20
--156.222955
-  0
-VERTEX
-  8
-0
- 10
-33.413450
- 20
--156.222955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.337250
- 20
--156.146755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-33.337250
- 20
--143.599160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.413450
- 20
--143.522960
-  0
-VERTEX
-  8
-0
- 10
-33.870645
- 20
--143.522960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.946845
- 20
--143.599160
-  0
-VERTEX
-  8
-0
- 10
-33.946845
- 20
--145.224755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.870645
- 20
--145.300955
-  0
-VERTEX
-  8
-0
- 10
-33.413450
- 20
--145.300955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-33.337250
- 20
--145.224755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-42.836845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.760645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-42.303450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-42.227250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.812750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.736550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--23.279355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.203155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--23.203155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.279355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--23.736550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.812750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.812750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.736550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--23.279355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.203155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--23.203155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.279355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--23.736550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.812750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-44.106845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.030645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-43.573450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-43.497250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.082750
- 20
--162.776160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.006550
- 20
--162.699960
-  0
-VERTEX
-  8
-0
- 10
--24.549355
- 20
--162.699960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.473155
- 20
--162.776160
-  0
-VERTEX
-  8
-0
- 10
--24.473155
- 20
--164.401755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.549355
- 20
--164.477955
-  0
-VERTEX
-  8
-0
- 10
--25.006550
- 20
--164.477955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.082750
- 20
--164.401755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--113.246160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--113.169960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--113.169960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--113.246160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--114.871755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--114.947955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--114.947955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--114.871755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--117.564160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--117.487960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--117.487960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--117.564160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--119.189755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--119.265955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--119.265955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--119.189755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--127.216160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--127.139960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--127.139960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--127.216160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--128.841755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--128.917955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--128.917955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--128.841755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--103.594160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--103.517960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--103.517960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--103.594160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--105.219755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--105.295955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--105.295955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--105.219755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--145.504160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--145.427960
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--145.427960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--145.504160
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--147.129755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--147.205955
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--147.205955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--147.129755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--25.082750
- 20
--153.124160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.006550
- 20
--153.047960
-  0
-VERTEX
-  8
-0
- 10
--24.549355
- 20
--153.047960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.473155
- 20
--153.124160
-  0
-VERTEX
-  8
-0
- 10
--24.473155
- 20
--154.749755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.549355
- 20
--154.825955
-  0
-VERTEX
-  8
-0
- 10
--25.006550
- 20
--154.825955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--25.082750
- 20
--154.749755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--155.156160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--155.079960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--155.079960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--155.156160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--156.781755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--156.857955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--156.857955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--156.781755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--169.126160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--169.049960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--169.049960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--169.126160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--170.751755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--170.827955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--170.827955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--170.751755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--159.474160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--159.397960
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--159.397960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--159.474160
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--161.099755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--161.175955
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--161.175955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--161.099755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--23.838155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.914355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--24.371550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--24.447750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-47.916845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.840645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-47.383450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-47.307250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--18.758155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.834355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--19.291550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--19.367750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-46.646845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.570645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-46.113450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-46.037250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-49.186845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.110645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-48.653450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-48.577250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--143.040360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--142.964160
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--142.964160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--143.040360
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--144.411955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--144.488155
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--144.488155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--144.411955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--138.925555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--139.001755
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--139.001755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--138.925555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--138.925555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--139.001755
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--139.001755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--138.925555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.638550
- 20
--157.111960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.562350
- 20
--157.035760
-  0
-VERTEX
-  8
-0
- 10
--0.698755
- 20
--157.035760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.622555
- 20
--157.111960
-  0
-VERTEX
-  8
-0
- 10
--0.622555
- 20
--157.873955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.698755
- 20
--157.950155
-  0
-VERTEX
-  8
-0
- 10
--1.562350
- 20
--157.950155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.638550
- 20
--157.873955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-50.456845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-50.380645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-49.923450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-49.847250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--143.040360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--142.964160
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--142.964160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--143.040360
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--144.411955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--144.488155
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--144.488155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--144.411955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--148.983960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--148.907760
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--148.907760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--148.983960
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--150.355555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--150.431755
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--150.431755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--150.355555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--154.470360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--154.394160
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--154.394160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--154.470360
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--155.841955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--155.918155
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--155.918155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--155.841955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--148.983960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--148.907760
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--148.907760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--148.983960
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--150.355555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--150.431755
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--150.431755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--150.355555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--21.298155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.374355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--21.831550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--21.907750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--20.028155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.104355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--20.561550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--20.637750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--148.983960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--148.907760
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--148.907760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--148.983960
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--150.355555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--150.431755
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--150.431755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--150.355555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--154.470360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--154.394160
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--154.394160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--154.470360
-  0
-VERTEX
-  8
-0
- 10
--56.223155
- 20
--155.841955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.299355
- 20
--155.918155
-  0
-VERTEX
-  8
-0
- 10
--56.756550
- 20
--155.918155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--56.832750
- 20
--155.841955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-51.726845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.650645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-51.193450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-51.117250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--143.040360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--142.964160
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--142.964160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--143.040360
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--144.411955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--144.488155
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--144.488155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--144.411955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
--54.953155
- 20
--138.925555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.029355
- 20
--139.001755
-  0
-VERTEX
-  8
-0
- 10
--55.486550
- 20
--139.001755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--55.562750
- 20
--138.925555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--154.470360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--154.394160
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--154.394160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--154.470360
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--155.841955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--155.918155
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--155.918155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--155.841955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--148.983960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--148.907760
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--148.907760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--148.983960
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--150.355555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--150.431755
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--150.431755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--150.355555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--143.040360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--142.964160
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--142.964160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--143.040360
-  0
-VERTEX
-  8
-0
- 10
--53.683155
- 20
--144.411955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--53.759355
- 20
--144.488155
-  0
-VERTEX
-  8
-0
- 10
--54.216550
- 20
--144.488155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--54.292750
- 20
--144.411955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--154.470360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--154.394160
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--154.394160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--154.470360
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--155.841955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--155.918155
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--155.918155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--155.841955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-45.376845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-45.300645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-44.843450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-44.767250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--132.473960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--132.397760
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--132.397760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--132.473960
-  0
-VERTEX
-  8
-0
- 10
--17.488155
- 20
--133.845555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--17.564355
- 20
--133.921755
-  0
-VERTEX
-  8
-0
- 10
--18.021550
- 20
--133.921755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--18.097750
- 20
--133.845555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--16.218155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.294355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--16.751550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--16.827750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--137.960360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--137.884160
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--137.884160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--137.960360
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--139.331955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--139.408155
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--139.408155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--139.331955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--22.568155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--22.644355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--23.101550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--23.177750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
-4.101845
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-4.025645
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
-3.568450
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-3.492250
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-52.996845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.920645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-52.463450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-52.387250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
--2.248155
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.324355
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
--2.781550
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--2.857750
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--3.518155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--3.594355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--4.051550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--4.127750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
--0.978155
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.054355
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--1.511550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--1.587750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--99.860360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--99.784160
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--99.784160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--99.860360
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--101.231955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--101.308155
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--101.308155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--101.231955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--94.373960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--94.297760
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--94.297760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--94.373960
-  0
-VERTEX
-  8
-0
- 10
-54.266845
- 20
--95.745555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-54.190645
- 20
--95.821755
-  0
-VERTEX
-  8
-0
- 10
-53.733450
- 20
--95.821755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-53.657250
- 20
--95.745555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
-2.831845
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.755645
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
-2.298450
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-2.222250
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
-0.291845
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.215645
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
--0.241550
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--0.317750
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--137.553960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--137.477760
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--137.477760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--137.553960
-  0
-VERTEX
-  8
-0
- 10
--57.493155
- 20
--138.925555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--57.569355
- 20
--139.001755
-  0
-VERTEX
-  8
-0
- 10
--58.026550
- 20
--139.001755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
--58.102750
- 20
--138.925555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.596650
- 20
--156.146760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.672850
- 20
--156.070560
-  0
-VERTEX
-  8
-0
- 10
-1.536445
- 20
--156.070560
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.612645
- 20
--156.146760
-  0
-VERTEX
-  8
-0
- 10
-1.612645
- 20
--156.908755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.536445
- 20
--156.984955
-  0
-VERTEX
-  8
-0
- 10
-0.672850
- 20
--156.984955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.596650
- 20
--156.908755
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--142.633960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--142.557760
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--142.557760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--142.633960
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--144.005555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--144.081755
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--144.081755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--144.005555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--148.120360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--148.044160
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--148.044160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--148.120360
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--149.491955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--149.568155
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--149.568155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--149.491955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--161.683960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--161.607760
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--161.607760
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--161.683960
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--163.055555
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--163.131755
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--163.131755
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--163.055555
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--167.170360
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--167.094160
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--167.094160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--167.170360
-  0
-VERTEX
-  8
-0
- 10
-1.561845
- 20
--168.541955
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.485645
- 20
--168.618155
-  0
-VERTEX
-  8
-0
- 10
-1.028450
- 20
--168.618155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.952250
- 20
--168.541955
-  0
-SEQEND
-  8
-0
-  0
-POLYLINE
-  8
-0
-  66
-1
-  70
-1
-  0
-VERTEX
-  8
-0
- 10
-0.596650
- 20
--158.077160
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.672850
- 20
--158.000960
-  0
-VERTEX
-  8
-0
- 10
-1.536445
- 20
--158.000960
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.612645
- 20
--158.077160
-  0
-VERTEX
-  8
-0
- 10
-1.612645
- 20
--158.839155
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-1.536445
- 20
--158.915355
-  0
-VERTEX
-  8
-0
- 10
-0.672850
- 20
--158.915355
- 42
--0.414214
-  0
-VERTEX
-  8
-0
- 10
-0.596650
- 20
--158.839155
-  0
-SEQEND
-  8
-0
-  0
-ENDSEC
-  0
-EOF
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/help/index.html b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/help/index.html
deleted file mode 100644
index 8f530e6..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/help/index.html
+++ /dev/null
@@ -1,248 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>Boolean operations on polygons</title>
-  </head>
-
-  <body>
-    <P align="center"><FONT size="5">How to use the Boolean operations on polygons Demo</FONT></P>
-    <br>
-    Main Functionality
-    <UL>
-      <LI><A href="#new">Reset application</A></LI>
-      <LI><A href="#new_window">Creating a new window</A></LI>
-	  <LI><A href="#open_file">Reading input from DXF file</A></LI>
-      <LI><A href="#print">Print</A></LI>
-      <LI><A href="#close_window">Close the current window</A></LI>
-      <LI><A href="#quit">Quit the application</A></LI>      
-    </UL><br>
-    Editing
-    <UL>
-      <LI><A href="#set">Set the current active polygons (red or blue) </A></LI>
-      <LI><A href="#ins_pgn">Insert circular polygon </A></LI>
-      <LI><A href="#ins_circ">Insert circle </A></LI>
-      <LI><A href="#locate">Locate polygon </A></LI>
-      <LI><A href="#bop">Perform a boolean operation</A></LI>
-      <LI><A href="#make_blue">Make current result blue</A></LI>
-      <LI><A href="#make_red">Make current result red</A></LI>
-      <LI><A href="#ref">Refresh</A></LI>   
-      <LI><A href="#del_blue">Delete all blue polygons</A></LI>
-      <LI><A href="#del_red">Delete all red polygons</A></LI>   
-    </UL>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="new"></A>
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reset application</FONT></STRONG></P>
-    Press Ctrl+N combination keys or go to File menu and choose "New". The 
-    points list will be erased, the window's visible area will be set to 
-    default. (-1, 1, -1, 1)
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="new_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Create a new window</FONT></STRONG></P>
-    Press Ctrl+W combination keys or go to File menu and choose "New Window". 
-    A new window will appear, modifying the visible area to make the points 
-    list fit in the new window.
-	
-	 <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="open_file"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reading input from DXF file</FONT></STRONG></P>
-	  Press Ctrl+O combination keys or go to File menu and choose "Open DXF file".
-	  A file dialog will be opened to choose an existing input file.
-	  
-	  <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="save_file"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Writing input to file</FONT></STRONG></P>
-	  Press Ctrl+S combination keys or go to File menu and choose "Save" or "Save as".
-	  Clicking "Save as" will open a file dialog to enter a file name. 
-	  Clicking "Save" will save the input to the last file name that was chosen, 
-	  and in case there isn't one yet, a file dialog will be opened.
-	  
-	  
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="print">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">Print</FONT>
-      </STRONG></P>
-    Press Ctrl+P combination keys or go to File menu and choose "Print". The 
-    visible area on the screen will be outputed to the print device of your 
-    choice.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="close_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Close the current window</FONT></STRONG></P>
-    Press Ctrl+X combination keys or go to File menu and choose "Close". You 
-    may do it for any window other than the initial one, this operation will 
-    close only the one you have choosen. If you do this for the initial parent 
-    window, it will close the others too.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="quit"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Quit the application</FONT></STRONG></P>
-    Press Ctrl+Q combination keys or go to File menu and choose "Quit". When 
-    you quit the application, all the windows you have created will be 
-    destroyed.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="bop">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Perform a boolean operation</FONT></STRONG></P>
-    Left click on one of the boolean operations button layer (Intersection,
-    Union, Difference between Blue and Red, Difference between Red and Blue,
-    Symmetric Difference, Minkowsky sum, Blue Complement, Red Complement).
-    the result polygon will be filled with orange and its boundary will be
-    green.
-    
-    
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="set">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Set the current active polygons (red or blue)</FONT></STRONG></P>
-	Toggle the radio button to Blue or Red to determine current active polygonal
-	set, if the blue polygons is active, all inserted polygons and circles will be blue,
-	and the point location query will be on the blue polygonal set.
-	
-   	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="ins_pgn">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Insert circular polygon</FONT></STRONG></P>
-    Left click on the "Insert Circular Polygon" layer. Be sure there is no layer activated 
-    in standard toolbar that eat events. To be sure, press the arrow button 
-    situated on the standard toolbar. A new vertex is inserted every time the left
-	mouse button is pressed, if the polyline entered so far is simple. To insert a circular 
-	arc press the left mouse button while pressing the Ctrl key, and the cursor will be moved
-	to the middle point of the current segment and moving the mouse will change the circular arc,
-    another left click will add the circular arc if it doesn't intersect somw other edge.
-    A right click closes the polygon, if it is simple. You can use the Escape key if you
-	want to remove your last entered point in the polygon. The new polygon is created. 
-    To insert more than one polygon, keep doing as mentioned above without deactivating the 
-    "Insert Circular Polygon" layer. To deactivate this layer, just press the arrow button 
-    situated on the same toolbar.
-	
-	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="ins_circ">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Insert circle</FONT></STRONG></P>
-	Left click on the "Insert Circle" layer. Be sure there is no layer activated 
-    in standard toolbar that eat events. To be sure, press the arrow button 
-    situated on the standard toolbar. A left click on the mouse determines the center
-    of the circle, moving the mouse changes its radius, another left click closes the 
-    circle. You can use the Escape key if you want to cancel currect circle before it gets
-    inserted.
-    To insert more than one circle, keep doing as mentioned above without deactivating the 
-    "Insert Circle" layer. To deactivate this layer, just press the arrow button 
-    situated on the same toolbar.
-    
-    
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="locate">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Locate polygon</FONT></STRONG></P>
-	Left click on the "Locate Polygon" layer. Be sure there is no layer activated 
-    in standard toolbar that eat events. To be sure, press the arrow button 
-    situated on the standard toolbar. Move the mouse to desired position where you
-    want to perform the point location query and left click the mouse, if a polygon is 
-    located, its boundary will be painted yellow.
-    To locate more than one polygon, keep doing as mentioned above without deactivating the 
-    "Locate Polygon" layer. To deactivate this layer, just press the arrow button 
-    situated on the same toolbar.
-    
-    
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="make_blue">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Make current result blue</FONT></STRONG></P>
-	Left click on the "Make Result Blue" button layer. Current result will replace
-	the blue polygons, and the red polygons will be deleted.
-	
-	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="make_red">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Make current result red</FONT></STRONG></P>
-	Left click on the "Make Result Red" button layer. Current result will replace
-	the red polygons, and the blue polygons will be deleted.
-	
-	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="ref">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Refresh</FONT></STRONG></P>
-    Left click on the refresh button. All polygons will be redrawn to the widget.
-	
-	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="del_blue">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Delete all blue polygons</FONT></STRONG></P>
-	Left click on the "Delete Blue Polygons" button layer, all blue polygons will be deleted.
-	
-	
-	<P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="del_red">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Delete all red polygons</FONT></STRONG></P>
-	Left click on the "Delete Red Polygons" button layer, all red polygons will be deleted.
-    
-	
-	
-
-
-
-
-
-<br>
-<hr>
-<!-- Created: Mon Jan 13 15:27:00 MET 2003 -->
-<!-- hhmts start -->
-Last modified: Fri May 16 14:53:31 MEST 2003
-<!-- hhmts end -->
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.bmp
deleted file mode 100644
index b3e0bbc..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.xpm
deleted file mode 100644
index f6a964e..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_P.xpm
+++ /dev/null
@@ -1,54 +0,0 @@
-/* XPM */
-static const char *comp_P_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 15 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #5A5AF9",
-"O c #A4A4E0",
-"+ c #3838FD",
-"@ c #AFAFD6",
-"# c #AAAADB",
-"$ c #9E9EE3",
-"% c #808080",
-"& c #7070F4",
-"* c None",
-"= c #4C4CFB",
-"- c #0000FF",
-"; c None",
-/* pixels */
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"**********           ***********",
-"**********%%%%%%%%%%%***********",
-"********************************",
-"********************************",
-"**********-------+&#************",
-"***********#--***Oo-$***********",
-"************--****#-=***********",
-"************--*****--***********",
-"************--*****--***********",
-"************--****@-=***********",
-"************--.**@o-X***********",
-"************------o.************",
-"************--******************",
-"************--******************",
-"************--******************",
-"************--******************",
-"***********@--#*****************",
-"**********------****************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************",
-"********************************"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.bmp
deleted file mode 100644
index b564c7c..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.xpm
deleted file mode 100644
index 1695c12..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/comp_Q.xpm
+++ /dev/null
@@ -1,55 +0,0 @@
-/* XPM */
-static const char *comp_Q_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 16 1",
-/* colors */
-"  c #000000",
-". c #F66666",
-"X c #D6AFAF",
-"o c #DBAAAA",
-"O c #E39E9E",
-"+ c #FB4C4C",
-"@ c #E0A4A4",
-"# c #FF0000",
-"$ c #F27A7A",
-"% c #808080",
-"& c None",
-"* c #E79898",
-"= c #EA9191",
-"- c #ED8A8A",
-"; c #F95A5A",
-": c None",
-/* pixels */
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&            &&&&&&&&&&",
-"&&&&&&&&&&%%%%%%%%%%%%&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&=;##;-&&&&&&&&&&&&&",
-"&&&&&&&&&&&X;;O&&O;;o&&&&&&&&&&&",
-"&&&&&&&&&&&;+&&&&&&+;&&&&&&&&&&&",
-"&&&&&&&&&&-#*&&&&&&=#-&&&&&&&&&&",
-"&&&&&&&&&&;#X&&&&&&o#;&&&&&&&&&&",
-"&&&&&&&&&&##&&&&&&&&##&&&&&&&&&&",
-"&&&&&&&&&&##&&&&&&&&##&&&&&&&&&&",
-"&&&&&&&&&&##&&&&&&&&##&&&&&&&&&&",
-"&&&&&&&&&&+#X&&&&&&&#;&&&&&&&&&&",
-"&&&&&&&&&&$#*&&&&&&*#-&&&&&&&&&&",
-"&&&&&&&&&&X#+&&&&&&+;&&&&&&&&&&&",
-"&&&&&&&&&&&*#;O&&O;;&&&&&&&&&&&&",
-"&&&&&&&&&&&&@.###+=&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&*##&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&*##;&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&**;#&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.bmp
deleted file mode 100644
index 0f19557..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.xpm
deleted file mode 100644
index c62ca86..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_P.xpm
+++ /dev/null
@@ -1,47 +0,0 @@
-/* XPM */
-static const char *del_P_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 8 1",
-/* colors */
-"  c #800000",
-". c #5A5AF9",
-"X c #AFAFD6",
-"o c #AAAADB",
-"O c None",
-"+ c #808000",
-"@ c #0000FF",
-"# c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOO    OOOOOOOOOOOOOO",
-"OOOOOOOOOOO   ++++   OOOOOOOOOOO",
-"OOOOOOOOO  +OOOOOOOO+  OOOOOOOOO",
-"OOOOOOOO +OOOOOOOOOOOO+ OOOOOOOO",
-"OOOOOOO   +OOOOOOOOOOOO+ OOOOOOO",
-"OOOOOO +O  +@@@@@@@.oOOO+ OOOOOO",
-"OOOOOO +OO  +@@OOOo. at oOO+ OOOOOO",
-"OOOOO +OOOO  + at OOOOo@.OOO+ OOOOO",
-"OOOOO +OOOOO  +OOOOO@@OOO+ OOOOO",
-"OOOO +OOOOOOO  +OOOO@@OOOO+ OOOO",
-"OOOO +OOOOOOO@  +OOX at .OOOO+ OOOO",
-"OOOO +OOOOOOO@@  +X. at oOOOO+ OOOO",
-"OOOO +OOOOOOO@@@  +.oOOOOO+ OOOO",
-"OOOO +OOOOOOO@@OO  +OOOOOO+ OOOO",
-"OOOO +OOOOOOO@@OOO  +OOOOO+ OOOO",
-"OOOOO +OOOOOO@@OOOO  +OOO+ OOOOO",
-"OOOOO +OOOOOO@@OOOOO  +OO+ OOOOO",
-"OOOOOO +OOOOX@@XOOOOO  ++ OOOOOO",
-"OOOOOO +OOO@@@@@@OOOOO  + OOOOOO",
-"OOOOOOO +OOOOOOOOOOOOOO  OOOOOOO",
-"OOOOOOOO +OOOOOOOOOOOO+ OOOOOOOO",
-"OOOOOOOOO  +OOOOOOOO+  OOOOOOOOO",
-"OOOOOOOOOOO   ++++   OOOOOOOOOOO",
-"OOOOOOOOOOOOOO    OOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.bmp
deleted file mode 100644
index 11cf2a2..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.xpm
deleted file mode 100644
index 271bfa1..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/del_Q.xpm
+++ /dev/null
@@ -1,56 +0,0 @@
-/* XPM */
-static const char *del_Q_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 17 1",
-/* colors */
-"  c #800000",
-". c #FFA7A7",
-"X c #FF8C8C",
-"o c #D6AFAF",
-"O c #DBAAAA",
-"+ c #E39E9E",
-"@ c #FFB2B2",
-"# c #E0A4A4",
-"$ c #FF0000",
-"% c #FF6868",
-"& c None",
-"* c #E79898",
-"= c #EA9191",
-"- c #ED8A8A",
-"; c #808000",
-": c #F95A5A",
-"> c None",
-/* pixels */
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&    &&&&&&&&&&&&&&",
-"&&&&&&&&&&&   ;;;;   &&&&&&&&&&&",
-"&&&&&&&&&  ;&&&&&&&&;  &&&&&&&&&",
-"&&&&&&&& ;&&&&&&&&&&&&; &&&&&&&&",
-"&&&&&&&   ;&&=:$$:-&&&&; &&&&&&&",
-"&&&&&& ;&  ;::+&&+::O&&&; &&&&&&",
-"&&&&&& ;&&  ;&&&&&&%:&&&; &&&&&&",
-"&&&&& ;&&&-  ;&&&&&=$-&&&; &&&&&",
-"&&&&& ;&&&:$  ;&&&&O$:&&&; &&&&&",
-"&&&& ;&&&&$$&  ;&&&&$$&&&&; &&&&",
-"&&&& ;&&&&$$&&  ;&&&$$&&&&; &&&&",
-"&&&& ;&&&&$$&&&  ;&&$$&&&&; &&&&",
-"&&&& ;&&&&%$o&&&  ;&$:&&&&; &&&&",
-"&&&& ;&&&&.$#&&&&  ;$-&&&&; &&&&",
-"&&&& ;&&&&o$%&&&&&  ;&&&&&; &&&&",
-"&&&&& ;&&&&#$:+&&+:  ;&&&; &&&&&",
-"&&&&& ;&&&&&*X$$$%=&  ;&&; &&&&&",
-"&&&&&& ;&&&&&&&*$$&&&  ;; &&&&&&",
-"&&&&&& ;&&&&&&&&#$$&&&  ; &&&&&&",
-"&&&&&&& ;&&&&&&&&o@:$&&  &&&&&&&",
-"&&&&&&&& ;&&&&&&&&&&&&; &&&&&&&&",
-"&&&&&&&&&  ;&&&&&&&&;  &&&&&&&&&",
-"&&&&&&&&&&&   ;;;;   &&&&&&&&&&&",
-"&&&&&&&&&&&&&&    &&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.bmp
deleted file mode 100644
index dff73f6..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.xpm
deleted file mode 100644
index 22c22e9..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_PQ.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *diff_PQ_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #A4A4E0",
-"& c #E0A4A4",
-"* c #FF0000",
-"= c #F27A7A",
-"- c #3838FD",
-"; c #AFAFD6",
-": c #AAAADB",
-"> c #9E9EE3",
-", c #808080",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"777777-<:11111111111111146*65111",
-"1:7711%O7>111111111111+66#1#66 at 1",
-"1177111:721111111111116$11111$61",
-"11771111771  ,11111115*3111114*5",
-"117711117711  ,1111116*+11111@*6",
-"1177111;72111  ,11111**1111111**",
-"1177.1;O7X1111  ,1111**1111111**",
-"1177777O.111111  ,111**1111111**",
-"1177111111111111  ,11$*+111111*6",
-"11771111111111111  ,1=*3111113*5",
-"117711111111111111  1+*$11111$61",
-"11771111111111111111113*6#1#6611",
-"1;77:111111111111111111&o**$4111",
-"77777711111111111111111113**1111",
-"111111111111111111111111113**611",
-"111111111111111111111111111336*1",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.bmp
deleted file mode 100644
index 945736d..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.xpm
deleted file mode 100644
index d23c02c..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/diff_QP.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *diff_QP_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #A4A4E0",
-"& c #E0A4A4",
-"* c #FF0000",
-"= c #F27A7A",
-"- c #3838FD",
-"; c #AFAFD6",
-": c #AAAADB",
-"> c #9E9EE3",
-", c #808080",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11146*65111111111111111111111111",
-"1+66#1#66 at 111111111111777777-<:1",
-"16$11111$61111111111111:7711%O7>",
-"5*3111114*5111111111111177111:72",
-"6*+11111@*61  ,11111111177111177",
-"**1111111**11  ,1111111177111177",
-"**1111111**111  ,111111177111;72",
-"**1111111**1111  ,11111177.1;O7X",
-"$*+111111*611111  ,1111177777O.1",
-"=*3111113*5111111  ,111177111111",
-"+*$11111$611111111  ,11177111111",
-"13*6#1#661111111111  11177111111",
-"11&o**$4111111111111111177111111",
-"11113**1111111111111111;77:11111",
-"111113**611111111111117777771111",
-"111111336*1111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.bmp
deleted file mode 100644
index 19cd297..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.xpm
deleted file mode 100644
index 8242548..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_circle.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static const char *insert_circle_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 7 1",
-/* colors */
-"  c #00FF00",
-". c #008080",
-"X c #FF0000",
-"o c #808080",
-"O c None",
-"+ c #008000",
-"@ c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOO.++++.OOOOOOOOOOOOO",
-"OOOOOOOOOO++++    ++++OOOOOOOOOO",
-"OOOOOOOO.+            +.OOOOOOOO",
-"OOOOOOO++              ++OOOOOOO",
-"OOOOOO+                  +OOOOOO",
-"OOOOO.+                  +.OOOOO",
-"OOOOO+                    +OOOOO",
-"OOOO+                      +OOOO",
-"OOOO+                      +OOOO",
-"OOOO+                      +OOOO",
-"OOO.+                      +.OOO",
-"OOO+                        +OOO",
-"OOO+                        +OOO",
-"OOO+                        +oOO",
-"OOO+                        +oOO",
-"OOO.+                      +oOOO",
-"OOOO+                      +oOOO",
-"OOOO+ X                    +oOOO",
-"OOOO+ X                    +oOOO",
-"OOOXO+X  X                +oOOOO",
-"OOOOXOX X                +.OOOOO",
-"OOOOOX+X                 +oOOOOO",
-"OXXXXOO+XXXX           ++oOOOOOO",
-"OOOOOXOXO+            +.oOOOOOOO",
-"OOOOXOXOXO++++    ++++oOOOOOOOOO",
-"OOOXOOXOOXOOO.++++.oooOOOOOOOOOO",
-"OOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.bmp
deleted file mode 100644
index 6a0d289..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.xpm
deleted file mode 100644
index d0435ef..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/insert_polygon.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static const char *insert_polygon_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 6 1",
-/* colors */
-"  c #00FF00",
-". c #FF0000",
-"X c #808080",
-"o c None",
-"O c #008000",
-"+ c None",
-/* pixels */
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"ooooooooooooooooOOoooooooooooooo",
-"oooooooooooooOOO  Oooooooooooooo",
-"oooooooooooOO      Ooooooooooooo",
-"oooooooooOO         Oooooooooooo",
-"oooooooooO           Ooooooooooo",
-"ooooooooO             Oooooooooo",
-"ooooooooO              Ooooooooo",
-"oooooooO                Oooooooo",
-"oooooooO                 Ooooooo",
-"ooooooO                   Oooooo",
-"ooooooO                    Ooooo",
-"ooooooO                   OXoooo",
-"oooooO                    OXoooo",
-"oooooO                   OXooooo",
-"ooooO                   OXoooooo",
-"ooooO .                 OXoooooo",
-"oooO  . OOOOOO         OXooooooo",
-"ooo.OO.OX.XXXXO       OXoooooooo",
-"oooX.X.X.ooooooO      OXoooooooo",
-"ooooo.o.ooooooooO    OXooooooooo",
-"o....ooo....oooooO  OXoooooooooo",
-"ooooo.o.ooooooooooO OXoooooooooo",
-"oooo.o.o.ooooooooooOXooooooooooo",
-"ooo.oo.oo.ooooooooooXooooooooooo",
-"oooooo.ooooooooooooooooooooooooo",
-"oooooo.ooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.bmp
deleted file mode 100644
index c041cb7..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.xpm
deleted file mode 100644
index bc8be28..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/intersection.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *intersection_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #A4A4E0",
-"& c #E0A4A4",
-"* c #FF0000",
-"= c #F27A7A",
-"- c #3838FD",
-"; c #AFAFD6",
-": c #AAAADB",
-"> c #9E9EE3",
-", c #808080",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"777777-<:11111111111111146*65111",
-"1:7711%O7>111111111111+66#1#66 at 1",
-"1177111:72111,   ,11116$11111$61",
-"117711117711       115*3111114*5",
-"11771111771  ,111,  16*+11111@*6",
-"1177111;721  11111  1**1111111**",
-"1177.1;O7X1  11111  1**1111111**",
-"1177777O.11  11111  1**1111111**",
-"11771111111  11111  1$*+111111*6",
-"11771111111  11111  1=*3111113*5",
-"11771111111  11111  1+*$11111$61",
-"11771111111  11111  113*6#1#6611",
-"1;77:111111111111111111&o**$4111",
-"77777711111111111111111113**1111",
-"111111111111111111111111113**611",
-"111111111111111111111111111336*1",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.bmp
deleted file mode 100644
index e951543..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.xpm
deleted file mode 100644
index 8bfb6bf..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/locate.xpm
+++ /dev/null
@@ -1,54 +0,0 @@
-/* XPM */
-static const char *locate_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 15 1",
-/* colors */
-"  c #000000",
-". c #A9A9A9",
-"X c #A3A3A3",
-"o c #959595",
-"O c #696969",
-"+ c #FF0000",
-"@ c #9C9C9C",
-"# c #8E8E8E",
-"$ c #808080",
-"% c #7E7E7E",
-"& c #4E4E4E",
-"* c None",
-"= c #3A3A3A",
-"- c #B5B5B5",
-"; c None",
-/* pixels */
-"********************************",
-"********************************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"************#      #************",
-"**********o  =@  @=  o**********",
-"*********% =-**  **-= %*********",
-"********o &****  ****& o********",
-"********  -****$$****-  ********",
-"*******o %************% o*******",
-"*******O X************X O*******",
-"*******  ******++******  *******",
-"**          $*++++*$          **",
-"**          $*++++*$          **",
-"*******  ******++******  *******",
-"*******O .************X O*******",
-"*******o %************% o*******",
-"********= -****$$****-  ********",
-"********o &****  ****& o********",
-"*********% =-**  **-= %*********",
-"**********o  =@  @=  o**********",
-"************#      #************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"***************  ***************",
-"********************************",
-"********************************"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.bmp
deleted file mode 100644
index 67c6783..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.xpm
deleted file mode 100644
index a4c0ed7..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_P.xpm
+++ /dev/null
@@ -1,54 +0,0 @@
-/* XPM */
-static const char *make_P_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 15 1",
-/* colors */
-"  c #D9D9FF",
-". c #7C7CFF",
-"X c #B2B2FF",
-"o c #6868FF",
-"O c #E9E9FF",
-"+ c #F0F0FF",
-"@ c #004080",
-"# c #8C8CFF",
-"$ c #A7A7FF",
-"% c #F8F8FF",
-"& c None",
-"* c #FFFFFF",
-"= c #9A9AFF",
-"- c #0000FF",
-"; c None",
-/* pixels */
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&@----@&&&&&&&&&&&&&",
-"&&&&&&&&&&&@--------@&&&&&&&&&&&",
-"&&&&&&&&&--------------&&&&&&&&&",
-"&&&&&&&&----------------&&&&&&&&",
-"&&&&&&&------------------&&&&&&&",
-"&&&&&&--------------------&&&&&&",
-"&&&&&&-----******% .------&&&&&&",
-"&&&&&-------.**--#O*=------&&&&&",
-"&&&&&--------**---.*+------&&&&&",
-"&&&&---------**----**-------&&&&",
-"&&&&---------**---o*+-------&&&&",
-"&&&&---------**$-oO*X-------&&&&",
-"&&&&---------*****O$--------&&&&",
-"&&&&---------**-------------&&&&",
-"&&&&---------**-------------&&&&",
-"&&&&&--------**------------&&&&&",
-"&&&&&-------o**.-----------&&&&&",
-"&&&&&&-----******---------&&&&&&",
-"&&&&&&--------------------&&&&&&",
-"&&&&&&&------------------&&&&&&&",
-"&&&&&&&&----------------&&&&&&&&",
-"&&&&&&&&&--------------&&&&&&&&&",
-"&&&&&&&&&&&@--------@&&&&&&&&&&&",
-"&&&&&&&&&&&&&@----@&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.bmp
deleted file mode 100644
index a0ae28e..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.xpm
deleted file mode 100644
index 6a8f1d3..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/make_Q.xpm
+++ /dev/null
@@ -1,57 +0,0 @@
-/* XPM */
-static const char *make_Q_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 18 1",
-/* colors */
-"  c #FFF0F0",
-". c #FFE9E9",
-"X c #FF9A9A",
-"o c #FFA7A7",
-"O c #FF0080",
-"+ c #FF8C8C",
-"@ c #FFE1E1",
-"# c #FFB2B2",
-"$ c #FFD9D9",
-"% c #FF0000",
-"& c #FF7C7C",
-"* c #FF6868",
-"= c None",
-"- c #FFFFFF",
-"; c #FFBDBD",
-": c #FFF8F8",
-"> c #FFD0D0",
-", c None",
-/* pixels */
-"================================",
-"================================",
-"================================",
-"================================",
-"=============O%%%%O=============",
-"===========O%%%%%%%%O===========",
-"=========%%%%%%%%%%%%%%=========",
-"========%%%%%%%%%%%%%%%%========",
-"=======%%%%%%%%%%%%%%%%%%=======",
-"======%%%%%%%%%%%%%%%%%%%%======",
-"======%%%%%%%#.--.;%%%%%%%======",
-"=====%%%%%%*..X%%X..&%%%%%%=====",
-"=====%%%%%%. %%%%%% .%%%%%%=====",
-"====%%%%%%;-o%%%%%%#-;%%%%%%====",
-"====%%%%%%.-*%%%%%%&-.%%%%%%====",
-"====%%%%%%--%%%%%%%%--%%%%%%====",
-"====%%%%%%--%%%%%%%%--%%%%%%====",
-"====%%%%%% -*%%%%%%%-.%%%%%%====",
-"====%%%%%%>-o%%%%%%o-;%%%%%%====",
-"=====%%%%%*- %%%%%% .%%%%%%=====",
-"=====%%%%%%o-.X%%X..%%%%%%%=====",
-"======%%%%%%+ at --- #%%%%%%%======",
-"======%%%%%%%%%;--o%%%%%%%======",
-"=======%%%%%%%%%o:-o%%%%%=======",
-"========%%%%%%%%%*@-$%%%========",
-"=========%%%%%%%%%%%%%%=========",
-"===========O%%%%%%%%O===========",
-"=============O%%%%O=============",
-"================================",
-"================================",
-"================================",
-"================================"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.bmp
deleted file mode 100644
index a7c7523..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.xpm
deleted file mode 100644
index 1e5410d..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/mink_sum.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *mink_sum_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #A4A4E0",
-"& c #E0A4A4",
-"* c #FF0000",
-"= c #F27A7A",
-"- c #3838FD",
-"; c #AFAFD6",
-": c #AAAADB",
-"> c #9E9EE3",
-", c #808080",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"777777-<:11111111111111146*65111",
-"1:7711%O7>111111111111+66#1#66 at 1",
-"1177111:72111,   ,11116$11111$61",
-"117711117711  111  115*3111114*5",
-"117711117711 1, ,1 116*+11111@*6",
-"1177111;721 11, ,11 1**1111111**",
-"1177.1;O7X1 ,     , 1**1111111**",
-"1177777O.11 ,     , 1**1111111**",
-"11771111111 11, ,11 1$*+111111*6",
-"117711111111 1, ,1 11=*3111113*5",
-"117711111111  111  11+*$11111$61",
-"1177111111111,   ,11113*6#1#6611",
-"1;77:111111111111111111&o**$4111",
-"77777711111111111111111113**1111",
-"111111111111111111111111113**611",
-"111111111111111111111111111336*1",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.bmp
deleted file mode 100644
index aa2eafd..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.xpm
deleted file mode 100644
index dcb570e..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/refresh.xpm
+++ /dev/null
@@ -1,73 +0,0 @@
-/* XPM */
-static const char *refresh_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 34 1",
-/* colors */
-"q c None",
-"  c #5DBE61",
-". c #A6DFAF",
-"X c #BDE6BF",
-"o c #89D18F",
-"O c #CAECCF",
-"+ c #51B951",
-"@ c #A3DFAF",
-"# c #C7ECCF",
-"$ c #41B341",
-"% c #80CD8F",
-"& c #6FC671",
-"* c #119F11",
-"= c #7CCC81",
-"- c #019901",
-"; c #DEFDFF",
-": c #ABDFAF",
-"> c #CAEDFF",
-", c #9BD99F",
-"< c #7DCB81",
-"1 c #98D6AF",
-"2 c #81CC81",
-"3 c #8CD28F",
-"4 c #71C671",
-"5 c #7ECC81",
-"6 c #DEF2DF",
-"7 c #BDE8CF",
-"8 c #31AC31",
-"9 c #83CE8F",
-"0 c #21A621",
-"w c #8DD29F",
-"e c #8ED28F",
-"r c #00FF80",
-"t c None",
-/* pixels */
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqr@=erq$qqqqqqqqqqqq",
-"qqqqqqqqqqqqr0----0$qqqqqqqqqqqq",
-"qqqqqqqqqqqr*------$qqqqqqqqqqqq",
-"qqqqqqqqqqq8-02$---$qqqqqqqqqqqq",
-"qqqqqqqqqqw-or;#---$qqqqqqqqqqqq",
-"qqqqqqqqqq+9rqr8---$qqqqqqqqqqqq",
-"qqqqqqqqqq+>qq&$$45.7qqqqqqqqqqq",
-"qqqqqqqqqq1qqq#X6rqr2qqqqqqqqqqq",
-"qqqqqqqqqqq$---*rqq3%qqqqqqqqqqq",
-"qqqqqqqqqqq----:qqO*rqqqqqqqqqqq",
-"qqqqqqqqqqq---0rr2-$qqqqqqqqqqqq",
-"qqqqqqqqqqq-------*rqqqqqqqqqqqq",
-"qqqqqqqqqqq-------,rqqqqqqqqqqqq",
-"qqqqqqqqqqq-<$--+rrqqqqqqqqqqqqq",
-"qqqqqqqqqqq rr@=erqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
-"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.bmp
deleted file mode 100644
index a4a6abc..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.xpm
deleted file mode 100644
index 4a33fdb..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/symm_diff.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *symm_diff_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #C0C0C0",
-"& c #A4A4E0",
-"* c #E0A4A4",
-"= c #FF0000",
-"- c #F27A7A",
-"; c #3838FD",
-": c #AFAFD6",
-"> c #AAAADB",
-", c #9E9EE3",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"777777;<>11111111111111146=65111",
-"1>7711&O7,111111111111+66#1#66 at 1",
-"1177111>72111%%11111116$11111$61",
-"1177111177111  1111115=3111114=5",
-"117711117711%  %111116=+11111@=6",
-"1177111:7211    %1111==1111111==",
-"1177.1:O7X1  %%  1111==1111111==",
-"1177777O.1%  11  %111==1111111==",
-"1177111111  1111  111$=+111111=6",
-"117711111%  1111  %11-=3111113=5",
-"11771111%  %1111%  %1+=$11111$61",
-"11771111%          %113=6#1#6611",
-"1:77>11%            %11*o==$4111",
-"77777711111111111111111113==1111",
-"111111111111111111111111113==611",
-"111111111111111111111111111336=1",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.bmp b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.bmp
deleted file mode 100644
index ae70954..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.xpm b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.xpm
deleted file mode 100644
index ccd2184..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/icons/union.xpm
+++ /dev/null
@@ -1,66 +0,0 @@
-/* XPM */
-static const char *union_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 27 1",
-/* colors */
-"  c #000000",
-". c #9898E7",
-"X c #9191EA",
-"o c #F66666",
-"O c #5A5AF9",
-"+ c #D6AFAF",
-"@ c #DBAAAA",
-"# c #E39E9E",
-"$ c #FB4C4C",
-"% c #A4A4E0",
-"& c #E0A4A4",
-"* c #FF0000",
-"= c #F27A7A",
-"- c #3838FD",
-"; c #AFAFD6",
-": c #AAAADB",
-"> c #9E9EE3",
-", c #808080",
-"< c #7070F4",
-"1 c None",
-"2 c #4C4CFB",
-"3 c #E79898",
-"4 c #EA9191",
-"5 c #ED8A8A",
-"6 c #F95A5A",
-"7 c #0000FF",
-"8 c None",
-/* pixels */
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"777777-<:11111111111111146*65111",
-"1:7711%O7>111111111111+66#1#66 at 1",
-"1177111:721  11111  116$11111$61",
-"11771111771  11111  15*3111114*5",
-"11771111771  11111  16*+11111@*6",
-"1177111;721  11111  1**1111111**",
-"1177.1;O7X1  11111  1**1111111**",
-"1177777O.11  11111  1**1111111**",
-"11771111111  11111  1$*+111111*6",
-"11771111111  ,111,  1=*3111113*5",
-"117711111111       11+*$11111$61",
-"1177111111111,   ,11113*6#1#6611",
-"1;77:111111111111111111&o**$4111",
-"77777711111111111111111113**1111",
-"111111111111111111111111113**611",
-"111111111111111111111111111336*1",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111",
-"11111111111111111111111111111111"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/typedefs.h b/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/typedefs.h
deleted file mode 100644
index 151ebcd..0000000
--- a/3rdparty/CGAL-4.6/demo/Boolean_set_operations_2/typedefs.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-#ifndef CGAL_TYPEDEFS_H
-#define CGAL_TYPEDEFS_H
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/Lazy_exact_nt.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/General_polygon_with_holes_2.h>
-#include <CGAL/General_polygon_set_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-#include <CGAL/Iso_rectangle_2.h>
-#include <CGAL/Gps_circle_segment_traits_2.h>
-#include <CGAL/minkowski_sum_2.h>
-#include <CGAL/approximated_offset_2.h>
-
-#ifdef CGAL_USE_GMP
-
-  #include <CGAL/Gmpq.h>
-
-  typedef CGAL::Gmpq                                    Base_nt;
-
-#else
-
-  #include <CGAL/MP_Float.h>
-  #include <CGAL/Quotient.h>
-
-  typedef CGAL::Quotient<CGAL::MP_Float>                Base_nt;
-
-#endif
-
-typedef CGAL::Lazy_exact_nt<Base_nt>                  Coord_type;
-
-// instead of
-//typedef CGAL::Cartesian<Coord_type>		                Kernel;
-// workaround for VC++
-struct Kernel : public CGAL::Cartesian<Coord_type> {};
-
-typedef Kernel::Segment_2			      Segment;
-typedef Kernel::Point_2				      Point_2;
-typedef Kernel::Circle_2                              Circle;
-typedef Kernel::Iso_rectangle_2                       Iso_rectangle;
-
-typedef CGAL::Gps_circle_segment_traits_2<Kernel>     Traits;
-typedef Traits::Curve_2                               Curve;
-typedef Traits::X_monotone_curve_2                    XCurve;
-typedef Traits::Point_2                               Circular_point_2;
-typedef Traits::Polygon_2                             Polygon_2;
-typedef CGAL::General_polygon_with_holes_2<Polygon_2> Polygon_with_holes;
-typedef CGAL::General_polygon_set_2<Traits>           Polygon_set;
-typedef Polygon_with_holes::Hole_const_iterator       Hole_const_iterator;
-
-
-typedef CGAL::Polygon_2<Kernel>                       Linear_polygon_2;
-typedef CGAL::Polygon_with_holes_2<Kernel>            Linear_polygon_with_holes_2;
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.cpp b/3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.cpp
deleted file mode 100644
index 30739b6..0000000
--- a/3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.cpp
+++ /dev/null
@@ -1,549 +0,0 @@
-#include <fstream>
-#include <cmath>
-
-// CGAL headers
-#include <CGAL/Cartesian.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Min_circle_2.h>
-#include <CGAL/Min_circle_2_traits_2.h>
-#include <CGAL/Min_ellipse_2.h>
-#include <CGAL/Min_ellipse_2_traits_2.h>
-#include <CGAL/convex_hull_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/min_quadrilateral_2.h>
-#include <CGAL/rectangular_p_center_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QGraphicsEllipseItem>
-#include <QGraphicsRectItem>
-
-// GraphicsView items and event filters (input classes)
-
-#include <CGAL/Qt/PointsGraphicsItem.h>
-#include <CGAL/Qt/PolygonGraphicsItem.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-
-// the two base classes
-#include "ui_Bounding_volumes.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-#include "Ellipse.h"
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Vector_2 Vector_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef CGAL::Polygon_2<K> Polygon_2;
-
-typedef CGAL::Min_circle_2<CGAL::Min_circle_2_traits_2<K> > Min_circle;
-typedef CGAL::Min_ellipse_2<CGAL::Min_ellipse_2_traits_2<K> > Min_ellipse;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Bounding_volumes
-{
-  Q_OBJECT
-  
-private:  
-  Polygon_2 convex_hull, min_rectangle, min_parallelogram;
-  Min_circle mc; 
-  Min_ellipse me;
-  QGraphicsScene scene;  
-
-  std::vector<Point_2> points; 
-  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
-  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * convex_hull_gi;
-  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * min_rectangle_gi;
-  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * min_parallelogram_gi;
-  QGraphicsEllipseItem *cgi, *egi;
-
-  const std::size_t P;
-  QGraphicsRectItem *p_center[3];
-  Iso_rectangle_2 p_center_iso_rectangle[3];
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-public:
-  MainWindow();
-
-public slots:
-
-  void update();
-
-  void update_from_points();
-
-  void processInput(CGAL::Object o);
-
-  void on_actionShowMinCircle_toggled(bool checked);
-
-  void on_actionShowMinEllipse_toggled(bool checked);
-
-  void on_actionShowMinRectangle_toggled(bool checked);
-
-  void on_actionShowMinParallelogram_toggled(bool checked);
-
-  void on_actionShowConvexHull_toggled(bool checked);
-
-  void on_actionShowPCenter_toggled(bool checked);
-
-  void on_actionInsertPoint_toggled(bool checked);
-  
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow(), P(3)
-{
-  setupUi(this);
-
-  QObject::connect(this, SIGNAL(changed()), this, SLOT(update()));
-
-  // Add a GraphicItem for the Min_circle
-  cgi = new QGraphicsEllipseItem;
-  cgi->setPen(QPen(Qt::red, 0, Qt::SolidLine));
-  cgi->hide();
-  scene.addItem(cgi);
-  
-  egi = new QGraphicsEllipseItem;
-  egi->setPen(QPen(Qt::magenta, 0, Qt::SolidLine));
-  egi->hide();
-  scene.addItem(egi);
-  
-  for(std::size_t i =0; i < P; i++){
-    p_center[i] = new QGraphicsRectItem;
-    p_center[i]->setPen(QPen(Qt::cyan, 0, Qt::SolidLine));
-    p_center[i]->hide(); 
-    scene.addItem(p_center[i]);
-  }
-
-  // Graphics Item for the input point set
-  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pgi, SLOT(modelChanged()));
-  pgi->setVerticesPen(QPen(Qt::black, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(pgi);
-
-
-  // Graphics Item for the convex hull
-  convex_hull_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&convex_hull);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   convex_hull_gi, SLOT(modelChanged()));
-  convex_hull_gi->setEdgesPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(convex_hull_gi);
-
-
-  // Graphics Item for the min rectangle
-  min_rectangle_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&min_rectangle);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   min_rectangle_gi, SLOT(modelChanged()));
-  min_rectangle_gi->setEdgesPen(QPen(Qt::green, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(min_rectangle_gi);
-
-
-  // Graphics Item for the min parallelogram
-  min_parallelogram_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&min_parallelogram);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   min_parallelogram_gi, SLOT(modelChanged()));
-  min_parallelogram_gi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(min_parallelogram_gi);
-
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1);
-
-  scene.installEventFilter(pi);
-
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Bounding_volumes.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-void
-MainWindow::update()
-{
-  if(this->actionShowConvexHull->isChecked()){
-    convex_hull_gi->show();
-  }else {
-    convex_hull_gi->hide();
-  }
-
-  if(this->actionShowMinRectangle->isChecked()){
-    min_rectangle_gi->show();
-  }else {
-    min_rectangle_gi->hide();
-  }
-
-
-  if(this->actionShowMinParallelogram->isChecked()){
-    min_parallelogram_gi->show();
-  }else {
-    min_parallelogram_gi->hide();
-  }
-
-  CGAL::Qt::Converter<K> convert;  
-
-  if(this->actionShowPCenter->isChecked() && convex_hull.size()>=3){
-    for(std::size_t i=0; i< P; i++){
-      p_center[i]->setRect(convert(p_center_iso_rectangle[i]));
-      p_center[i]->show();
-    }
-  }
-
-  if (mc.is_degenerate() || (! this->actionShowMinCircle->isChecked())){
-    cgi->hide();
-  } else {
-    K::Circle_2 c;
-    if (mc.number_of_support_points() == 2) 
-      c = K::Circle_2(mc.support_point(0), mc.support_point(1));
-    else
-      c = K::Circle_2(mc.support_point(0), mc.support_point(1), mc.support_point(2));
-    
-
-    cgi->setRect(convert(c.bbox()));
-    cgi->show();
-  }
-
-  if (me.is_degenerate()  || (! this->actionShowMinEllipse->isChecked()) ){
-    egi->hide();
-  } else {
-    if (me.number_of_support_points() == 2) {
-    } else {
-      Ellipse_2<K> e(me);
-      double half_width = sqrt(e.va() * e.va());
-      double half_height = sqrt(e.vb() * e.vb());
-      double angle = std::atan2( e.va().y(), e.va().x() ) * 180.0/CGAL_PI;
-      Vector_2 wh(half_width, half_height);
-
-      Iso_rectangle_2 isor(e.center()+ wh, e.center()-wh);
-      egi->setRect(convert(isor));
-      // Rotate an item 45 degrees around (x, y).
-      double x = e.center().x();
-      double y = e.center().y();
-      egi->setTransform(QTransform().translate(x, y).rotate(angle).translate(-x, -y));
-      egi->show();
-    } 
-  }
-}
-
-
-void
-MainWindow::update_from_points()
-{
-    convex_hull.clear();
-    CGAL::convex_hull_2(points.begin(), points.end(), std::back_inserter(convex_hull));
-   
-    min_rectangle.clear();
-    CGAL::min_rectangle_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_rectangle));
- 
-    min_parallelogram.clear();
-    CGAL::min_parallelogram_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_parallelogram));
-
-    std::vector<Point_2> center;
-    double radius;
-
-    CGAL::rectangular_p_center_2 (points.begin(), points.end(), std::back_inserter(center), radius, static_cast<int>(P));
-    Vector_2 rvec(radius, radius);
-
-    for(std::size_t i = 0; i < center.size(); i++){
-      p_center_iso_rectangle[i] = Iso_rectangle_2(center[i]-rvec, center[i]+rvec);
-    }
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::list<Point_2> input;
-  if(CGAL::assign(input, o)){
-    Point_2 p = input.front();
-    
-    mc.insert(p);
-    me.insert(p);
-    points.push_back(p);
-
-    convex_hull.push_back(p);
-    Polygon_2 tmp;
-    CGAL::convex_hull_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(tmp));
-    convex_hull = tmp;
-
-    min_rectangle.clear();
-    CGAL::min_rectangle_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_rectangle));
- 
-    min_parallelogram.clear();
-    CGAL::min_parallelogram_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_parallelogram));
-    
-    std::vector<Point_2> center;
-    double radius;
-    if (points.size()>=P){
-      CGAL::rectangular_p_center_2 (points.begin(), points.end(), std::back_inserter(center), radius, static_cast<int>(P));
-      Vector_2 rvec(radius, radius);
-
-      for(std::size_t i=0; i < center.size(); i++){
-        p_center_iso_rectangle[i] = Iso_rectangle_2(center[i]-rvec, center[i]+rvec);
-      }
-    }
-  }
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPoint_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pi);
-  } else {
-    scene.removeEventFilter(pi);
-  }
-}
-
-
-void
-MainWindow::on_actionShowMinCircle_toggled(bool checked)
-{
-  cgi->setVisible(checked);
-  emit (changed());
-}
-
-void
-MainWindow::on_actionShowMinEllipse_toggled(bool checked)
-{
-  egi->setVisible(checked);
-  emit (changed());
-}
-
-
-void
-MainWindow::on_actionShowMinRectangle_toggled(bool checked)
-{
-  min_rectangle_gi->setVisible(checked);
-  emit (changed());
-}
-
-void
-MainWindow::on_actionShowMinParallelogram_toggled(bool checked)
-{
-  min_parallelogram_gi->setVisible(checked);
-  emit (changed());
-}
-
-void
-MainWindow::on_actionShowConvexHull_toggled(bool checked)
-{
-  convex_hull_gi->setVisible(checked);
-  emit (changed());
-}
-
-void
-MainWindow::on_actionShowPCenter_toggled(bool checked)
-{
-  for(std::size_t i =0; i < P; i++){
-    p_center[i]->setVisible(checked);
-  }
-  emit (changed());
-}
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  mc.clear();
-  me.clear();
-  points.clear();
-  convex_hull.clear();
-  min_rectangle.clear();
-  min_parallelogram.clear();
-  for(std::size_t i=0; i < P;i++){
-    p_center[i]->hide();
-  }
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;  
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  for(int i = 0; i < number_of_points; ++i){
-    Point_2 p = *pg++;
-    mc.insert(p);
-    me.insert(p);
-    points.push_back(p);
-  }
-
-  update_from_points();
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  while(ifs >> p) {
-    mc.insert(p);
-    me.insert(p);
-    points.push_back(p);
-  }
-  update_from_points();
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    for(Min_circle::Point_iterator  
-          vit = mc.points_begin(),
-          end = mc.points_end();
-        vit!= end; ++vit)
-    {
-      ofs << *vit << std::endl;
-    }
-  }
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(cgi->boundingRect());
-  this->graphicsView->fitInView(cgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Bounding_volumes.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Bounding_volumes demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Bounding_volumes/CMakeLists.txt
deleted file mode 100644
index 7f1e1c8..0000000
--- a/3rdparty/CGAL-4.6/demo/Bounding_volumes/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Bounding_volumes)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ./include)
-include_directories (BEFORE ../../../Matrix_search/include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#----------------------------------------------
-# The "Bounding volumes" demo: Bounding_volumes
-#----------------------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Bounding_volumes.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Bounding_volumes.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_volumes.moc" )
-
-# The executable itself.
-add_executable  ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Bounding_volumes )
-
-# Link with Qt libraries
-target_link_libraries( Bounding_volumes ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/CGAL_ipelets/CMakeLists.txt
deleted file mode 100644
index 8796cee..0000000
--- a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/CMakeLists.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-macro( remove_leading_zero var )
-  string(SUBSTRING "${${var}}" 0 1 ONECHAR)
-  string(COMPARE EQUAL "${ONECHAR}" "0" ISZERO)
-  if (${ISZERO})
-    string(SUBSTRING "${${var}}" 1 1 ONECHAR)
-    set(${var} ${ONECHAR})
-  endif()
-endmacro()
-
-
-
-#path where to build libraries
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-
-set( IPE_VERSION "AUTODETECT" CACHE STRING "The version of Ipe. Only 6 and 7 are supported.")
-
-find_package(CGAL QUIET COMPONENTS Core)
-
-if ( CGAL_FOUND )
-  include( ${CGAL_USE_FILE} )
-
-  find_package(IPE)
-
-  if ( IPE_FOUND )
-    include_directories(BEFORE ${IPE_INCLUDE_DIR})
-
-    #check IPE version
-    if (${IPE_VERSION} STREQUAL "AUTODETECT")
-      FILE(READ "${IPE_INCLUDE_DIR}/ipebase.h" IPEBASE_H)
-      STRING(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([67])([0-9][0-9])([0-9][0-9]);" found_ipe_version "${IPEBASE_H}")
-      if (found_ipe_version)
-        set(IPE_VERSION ${CMAKE_MATCH_1})
-        set(IPE_MINOR_VERSION_1 ${CMAKE_MATCH_2})
-        set(IPE_MINOR_VERSION_2 ${CMAKE_MATCH_3})
-      endif()
-    endif()
-    if (${IPE_VERSION} EQUAL "7")
-      set(WITH_IPE_7 ON)
-    elseif(${IPE_VERSION} EQUAL "6")
-      set(WITH_IPE_7 OFF)
-    else()
-      message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).")
-      set(IPE_FOUND FALSE)
-    endif()
-  endif()
-
-
-  if ( IPE_FOUND )
-    if (WITH_IPE_7)
-      add_definitions(-DCGAL_USE_IPE_7)
-    endif()
-    
-    message("-- Using IPE version ${IPE_VERSION} compatibility.") 
-    
-    #setting installation directory
-    get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH)
-    if (IPE_FOUND AND NOT IPELET_INSTALL_DIR)
-      if (WITH_IPE_7)
-        remove_leading_zero(IPE_MINOR_VERSION_1)
-        remove_leading_zero(IPE_MINOR_VERSION_2)
-        set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/")
-        find_path(IPELET_INSTALL_DIR 
-                      NAMES libgoodies.lua goodies.lua
-                      PATHS ${INSTALL_PATHS}
-                      DOC "The folder where ipelets will be installed"
-                      ENV IPELETPATH
-                     )
-      else()
-        foreach (VER RANGE 28 40)
-        string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" )
-        set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
-        endforeach()
-        set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
-        set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib64/ipe/6.0/ipelets)
-        set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib/ipe/6.0/ipelets)
-
-
-        find_library(IPELET_INSTALL_DIR_FILES 
-                      NAMES align
-                      PATHS ${INSTALL_PATHS}
-                            ENV IPELETPATH
-                    )
-        if (IPELET_INSTALL_DIR_FILES)
-          get_filename_component(IPELET_INSTALL_DIR ${IPELET_INSTALL_DIR_FILES} PATH)
-        endif()                
-      endif()
-    endif()
-
-    set(CGAL_IPELETS ${CGAL_IPELETS})
-    set(CGAL_IPELETS ${CGAL_IPELETS} alpha_shapes)
-    set(CGAL_IPELETS ${CGAL_IPELETS} arrangement)
-    set(CGAL_IPELETS ${CGAL_IPELETS} bbox_restriction)
-    set(CGAL_IPELETS ${CGAL_IPELETS} diagrams)
-    set(CGAL_IPELETS ${CGAL_IPELETS} hilbert_sort)
-    set(CGAL_IPELETS ${CGAL_IPELETS} hull)
-    set(CGAL_IPELETS ${CGAL_IPELETS} generator)
-    set(CGAL_IPELETS ${CGAL_IPELETS} mesh_2)
-    set(CGAL_IPELETS ${CGAL_IPELETS} minkowski)
-    set(CGAL_IPELETS ${CGAL_IPELETS} multi_delaunay)
-    set(CGAL_IPELETS ${CGAL_IPELETS} multi_regular)
-    set(CGAL_IPELETS ${CGAL_IPELETS} partition)
-    set(CGAL_IPELETS ${CGAL_IPELETS} pca)    
-    set(CGAL_IPELETS ${CGAL_IPELETS} skeleton)
-    set(CGAL_IPELETS ${CGAL_IPELETS} triangulation)
-    set(CGAL_IPELETS ${CGAL_IPELETS} circle_pencils)
-    set(CGAL_IPELETS ${CGAL_IPELETS} hyperbolic)
-    set(CGAL_IPELETS ${CGAL_IPELETS} distance)
-
-
-    if ( IPELET_INSTALL_DIR )
-      message(STATUS "Set Ipelets install dir: ${IPELET_INSTALL_DIR}")
-    endif()
-
-    foreach(IPELET ${CGAL_IPELETS})
-      add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp)
-      add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET})
-      target_link_libraries(CGAL_${IPELET} ${IPE_LIBRARIES})
-      if ( IPELET_INSTALL_DIR )
-        install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR})
-        if (WITH_IPE_7)
-          install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
-        endif()
-      endif ()
-    endforeach(IPELET)
-    #example in doc not installed
-    add_library(simple_triangulation MODULE simple_triangulation.cpp)
-    add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation)
-    target_link_libraries(simple_triangulation ${IPE_LIBRARIES})
-
-  else()
-    message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
-  endif()
-else()
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/distance.cpp b/3rdparty/CGAL-4.6/demo/CGAL_ipelets/distance.cpp
deleted file mode 100644
index 03e966e..0000000
--- a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/distance.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) 2013  INRIA Sophia Antipolis -  Mediterranee,  (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Olivier Devillers
-
-
-#include <CGAL/Exact_circular_kernel_2.h>
-
-#include <CGAL/CGAL_Ipelet_base.h> 
-#include <CGAL/Object.h>
-
-
- 
-#include <CGAL/Cartesian.h>
-namespace CGAL_distance_ipelet{
-
-
-typedef CGAL::Exact_circular_kernel_2 Kernel;
-
-// --------------------------------------------------------------------
-
-const std::string sublabel[] = {
-  "2 marks",
-  "2 marks (cm)"
-  "2 marks (inch)"
-  "Help"
-};
-
-const std::string helpmsg[] = {
-  "Distance between two marks in ipe screen pts",
-  "Distance between two marks in centimeters when printed",
-  "Distance between two marks in inches when printed",
-};
-
-class distanceIpelet 
-  : public CGAL::Ipelet_base<Kernel,4> {
-public:
-  distanceIpelet() 
-    :CGAL::Ipelet_base<Kernel,4>("Distance",sublabel,helpmsg){}
-  void protected_run(int);
-};
-// --------------------------------------------------------------------
-
-void distanceIpelet::protected_run(int fn)
-{
-  if (fn==3) {
-    show_help();
-    return;
-  } 
-  
-  std::list<Point_2> pt_list;
-
-  int i=get_IpePage()->primarySelection(); 
-
-  if (i<0) {
-    print_error_message(("Nothing selected"));
-    return;
-  }
-
-  Iso_rectangle_2 bbox=
-  read_active_objects(
-		      CGAL::dispatch_or_drop_output<Point_2>(
-      std::back_inserter(pt_list)
-    )
-  );
-
-  if (pt_list.empty()) {print_error_message(("No mark selected")); return;}
-  std::list<Point_2>::iterator it=pt_list.begin();
-  Point_2 p1=*it; ++it;
-  if (pt_list.end()==it) {
-    print_error_message(("Only one mark selected")); return;}
-  Point_2 p2=*it; ++it;
-  if (pt_list.end()!=it) {
-    print_error_message(("More than two marks selected")); return;}
-
-  double length = sqrt( CGAL::squared_distance(p1,p2).to_double() );
-  char message[50];
-  if (fn==0)
-    sprintf(message,"Distance between marks is %f in ipe pts",length);
-  else if (fn==1) 
-    sprintf(message,"Distance between marks is %f cm",0.0353*length);
-  else if (fn==2) 
-    sprintf(message,"Distance between marks is %f inches",0.0139*length);
-  print_error_message(message);
-  return;
-}
-}
-
-CGAL_IPELET(CGAL_distance_ipelet::distanceIpelet)
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/hyperbolic.cpp b/3rdparty/CGAL-4.6/demo/CGAL_ipelets/hyperbolic.cpp
deleted file mode 100644
index dcb8c6f..0000000
--- a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/hyperbolic.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2013  INRIA Sophia Antipolis -  Mediterranee,  (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Olivier Devillers
-
-
-#include <CGAL/Exact_circular_kernel_2.h>
-
-#include <CGAL/CGAL_Ipelet_base.h> 
-#include <CGAL/Object.h>
-
-#include "include/CGAL_ipelets/pencils.h"
-
-
- 
-#include <CGAL/Cartesian.h>
-namespace CGAL_hyperbolic{
-
-
-typedef CGAL::Exact_circular_kernel_2 Kernel;
-
-// --------------------------------------------------------------------
-
-const std::string sublabel[] = {
-  "Line through two points",
-  "Segment through two points",
-  "Bisector of two points",
-  "Circle by center and point",
-  "Circle center", 
-  "Help"
-};
-
-const std::string helpmsg[] = {
-  "Draw the hyperbolic line trough two points in Poincare disk",
-  "Draw the hyperbolic segment trough two points in Poincare disk",
-  "Draw the hyperbolic bisector of two points in Poincare disk",
-  "Draw the hyperbolic circle given the center (primary selection) and a point in Poincare disk",
-  "Draw the hyperbolic center given a circle (primary selection) in Poincare disk",
-};
-
-class hyperbolicIpelet 
-  : public CGAL::Ipelet_base<Kernel,6> {
-public:
-  hyperbolicIpelet() 
-    :CGAL::Ipelet_base<Kernel,6>("Hyperbolic",sublabel,helpmsg){}
-  void protected_run(int);
-};
-// --------------------------------------------------------------------
-
-void hyperbolicIpelet::protected_run(int fn)
-{
-  Circle_2 circ;     //constructed circle:
-  Circle_2 p1,p2;
-  Circle_2  poincare,selected;
-  
-  if (fn==5) {
-    show_help();
-    return;
-  } 
-  
-  std::list<Point_2> pt_list,pt_list1;
-  std::list<Circle_2> cir_list,cir_list1;
-
-  int i=get_IpePage()->primarySelection(); 
-
-  if (i<0) {
-    print_error_message(("No mark or circle selected"));
-    return;
-  }
-
-  read_one_active_object(get_IpePage()->object(i),CGAL::dispatch_or_drop_output<Point_2,Circle_2>(
-       std::back_inserter(pt_list1),
-       std::back_inserter(cir_list1))); 
-
-  Iso_rectangle_2 bbox=
-  read_active_objects(
-		      CGAL::dispatch_or_drop_output<Point_2,Circle_2>(
-      std::back_inserter(pt_list),
-      std::back_inserter(cir_list)
-    )
-  );
-
-  
-  std::list<Point_2>::iterator it1=pt_list1.begin();
-  std::list<Circle_2>::iterator cit1=cir_list1.begin();
-  std::list<Point_2>::iterator it=pt_list.begin();
-  std::list<Circle_2>::iterator cit=cir_list.begin();
-
-  if (fn!=4){
-    if (pt_list.empty() || cir_list.empty()){
-      print_error_message(("Two marks and a circle have to be selected"));
-      return;
-    }
-  }else{
-    if (cir_list.empty()){
-      print_error_message(("Two circles have to be selected"));
-      return;
-    }
-  }
-  
-  poincare=*cit;++cit;
-  if(fn==4){
-    if( (cit==cir_list.end()) || (cit1==cir_list1.end())){
-      print_error_message(("Two circles have to be selected"));
-      return;
-    }
-    if (*cit1==poincare) poincare=*cit;
-    selected=*cit1;
-  }else{
-    p1=Circle_2(*it,0);
-    ++it;
-    if (it!=pt_list.end())  {
-      p2=Circle_2(*it,0);
-      ++it;
-    }else{ 
-      print_error_message(("Two marks and a circle have to be selected")); 
-      return;
-    }
-    if( (it!=pt_list.end())||(cit!=cir_list.end())){
-      print_error_message(("Only two marks and a circle have to be selected")); 
-      return;
-    }
-  }
-
-  if (fn==3){//primary selection must be a point (p1)
-    if (pt_list1.empty()){
-      print_error_message(("Primary selection must be a mark (center)"));
-      return;
-    }  
-    if (*it1 != p1.center()) {
-      //swap
-      circ = p1;
-      p1 = p2;
-      p2 = circ;
-    }
-    if (*it1 != p1.center()) {
-      print_error_message(("Primary selection must be a mark (center)"));
-      return;
-    }  
-  }
-
-  switch(fn){
-  case 0:
-    // Circle orthogonal to p1, p2, and poincare
-    circ = compute_circle_orthogonal<Kernel>(p1,p2,poincare);
-    break; //goto clip
-  case 1:
-    // Circle orthogonal to p1, p2, and poincare
-    circ = compute_circle_orthogonal<Kernel>(p1,p2,poincare);
-    if (orientation(poincare.center(),p1.center(),p2.center())>0)
-      draw_in_ipe(Circular_arc_2(circ,p2.center(),p1.center(),circ.orientation()));
-    else if (orientation(poincare.center(),p1.center(),p2.center())==0){
-      print_error_message(
-	"degenerate case, hyperbolic line is on a diameter of Poincare disk");
-      draw_in_ipe(Segment_2(p1.center(),p2.center()));
-    }else
-      draw_in_ipe(Circular_arc_2(circ,p1.center(),p2.center(),circ.orientation()));
-    return;
-  case 2:
-    // Circle of pencil generated by p1 p2 orthogonal to poincare
-    circ = compute_circle_in_pencil<Kernel>(poincare,p1,p2);
-    break; //goto clip
-  case 3:
-    // Circle of pencil p1 poincare through p2
-    circ = compute_circle_in_pencil<Kernel>(p2,poincare,p1);
-    draw_in_ipe(circ);
-    return;
-  case 4:
-    // Zere radius circle of pencil selected poincare inside
-    // translate so that Poincare : x^2+y^2=A
-    // and selected : x^2+y^2 -2ax -2by +a^2+ b^2=C
-    // look for l  so that l.Poincare + selected has zero radius
-    double a=selected.center().x().to_double()-poincare.center().x().to_double();
-    double b=selected.center().y().to_double()-poincare.center().y().to_double();
-    double C=selected.squared_radius().to_double();
-    double A=poincare.squared_radius().to_double();
-    double B=A+C-a*a-b*b;
-    double delta=B*B-4*A*C;
-    double l=(-B+sqrt(delta))/2/A;
-    l = 1/(1+l);
-    Point_2 center=poincare.center()+ (l*(selected.center()-poincare.center()));
-    draw_in_ipe(center);
-    return;
-  }     //end of switch
-
-  // detect degenerate case
-  if (circ==Circle_2()){ 
-    Kernel::Vector_2 v;
-    if (fn==2) v= Kernel::Vector_2
-       (p2.center().y()-p1.center().y(),p2.center().x()-p1.center().x());
-    else v=p2.center()-p1.center();
-    Kernel::FT sqr_length=poincare.squared_radius() / v.squared_length();
-    double length = sqrt( sqr_length.to_double());
-    v = Kernel::FT(length)*v;
-    Point_2 q1=poincare.center()+ v;
-    Point_2 q2=poincare.center()- v;
-    print_error_message(
-	"degenerate case, hyperbolic line is a diameter of Poincare disk");
-    Kernel::Segment_2 s(q1,q2);
-    draw_in_ipe(s);
-    return;
-    }
-
-  // clip circ by poincare 
-  std::vector< CGAL::Object > result;
-  Kernel::Circular_arc_point_2 L,R;
-  std::pair<Kernel::Circular_arc_point_2, unsigned > the_pair;
-
-  CGAL::intersection(circ, poincare, std::back_inserter(result));
-  assert (result.size()==2);
-  assign(the_pair, result[0]);
-  L = the_pair.first;
-  assign(the_pair, result[1]);
-  R = the_pair.first;
-  Point_2 LL(CGAL::to_double(L.x()),CGAL::to_double(L.y()));
-  Point_2 RR(CGAL::to_double(R.x()),CGAL::to_double(R.y()));
-  assert( LL.x() <= RR.x());
-  Circular_arc_2 arc;
-  if ( orientation(poincare.center(),circ.center(),LL) >0)
-    arc = Circular_arc_2(circ,LL,RR,circ.orientation());
-  else arc = Circular_arc_2(circ,RR,LL,circ.orientation());
-  draw_in_ipe( arc );
-}
-}
-
-CGAL_IPELET(CGAL_hyperbolic::hyperbolicIpelet)
diff --git a/3rdparty/CGAL-4.6/demo/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/CMakeLists.txt
deleted file mode 100644
index b68c728..0000000
--- a/3rdparty/CGAL-4.6/demo/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-project(CGAL_DEMOS)
-
-cmake_minimum_required(VERSION 2.6.2)
-
-if (CGAL_BRANCH_BUILD) 
-
-foreach (package ${CGAL_CONFIGURED_PACKAGES})
-  #message (STATUS "Current package: ${package}")
-  file( GLOB listtmp "${package}/demo/*")
-  list(APPEND list ${listtmp})
-endforeach()
-
-else()
-
-  file( GLOB list "*")
-
-endif()
-
-list( SORT list )
-
-if(NOT CGAL_BUILDING_LIBS)
-  find_package(CGAL REQUIRED)
-  include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
-endif()
-
-message("== Generating build files for demos ==")
-foreach( entry ${list} )
-
-  if (NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry} )
-
-    file(GLOB files "${entry}/*.cpp")
-
-    # If there is no .cpp files, ignore the sub-directory
-    if(files)
-     process_CGAL_subdirectory("${entry}" demo demo)
-      # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake
-   endif()
-
-  endif()
-  
-endforeach()
-message("== Generating build files for demos (DONE) ==\n")
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Circular_kernel_2/CMakeLists.txt
deleted file mode 100644
index 56b239c..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/CMakeLists.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Circular_kernel_2)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  include(${QT_USE_FILE})
-
-  #--------------------------------
-  # The demo: Circular_kernel_2
-  #--------------------------------
-  # UI files (Qt Designer files)
-  qt4_wrap_ui( DT_UI_FILES Circular_kernel_2.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( DT_RESOURCE_FILES ./Circular_kernel_2.qrc )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  qt4_generate_moc( "Circular_kernel_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Circular_kernel_2.moc" )
-
-  # The executable itself.
-  add_executable  ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_2 )
-
-  # Link with Qt libraries
-  target_link_libraries( Circular_kernel_2 ${QT_LIBRARIES} )
-  # Link with CGAL
-  target_link_libraries( Circular_kernel_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.cpp b/3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.cpp
deleted file mode 100644
index 868506d..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Cartesian.h>
-#include <CGAL/MP_Float.h>
-#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
-#include <CGAL/Circular_kernel_2.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Circular_kernel_2.h>
-#include <CGAL/Object.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/GraphicsViewCircularArcInput.h>
-#include "ArcsGraphicsItem.h"
-  
-// the two base classes
-#include "ui_Circular_kernel_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Quotient<CGAL::MP_Float>                       NT;
-typedef CGAL::Cartesian<NT>                                 Linear_k;
-
-typedef CGAL::Algebraic_kernel_for_circles_2_2<NT>          Algebraic_k;
-typedef CGAL::Circular_kernel_2<Linear_k,Algebraic_k>       CircularKernel;
-
-typedef CircularKernel::Point_2                                 Point_2;
-typedef CircularKernel::Segment_2                               Segment_2;
-typedef CircularKernel::Line_arc_2                              Line_arc_2;
-typedef CircularKernel::Circular_arc_2                          Circular_arc_2;
-typedef CircularKernel::Circular_arc_point_2                    Circular_arc_point_2;
-
-
-typedef CGAL::Qt::ArcsGraphicsItem<CircularKernel>                 ArcsGraphicsItem;
-
-
-typedef std::vector<CGAL::Object>                           ArcContainer;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Circular_kernel_2
-{
-  Q_OBJECT
-  
-private:  
-  ArcContainer arcs;
-  ArcContainer intersections;
-  QGraphicsScene scene;  
-
-  ArcsGraphicsItem * agi;
-
-
-  CGAL::Qt::GraphicsViewCircularArcInput<CircularKernel> * cai;
-
-public:
-  MainWindow();
-
-public slots:
-
-  virtual void open(QString);
-
-  void processInput(CGAL::Object o);
-
-
-  void on_actionInsertCircularArc_toggled(bool checked);
-  
-  void on_actionClear_triggered();
-
-  void on_actionLoadLineAndCircularArcs_triggered();
-
-  void on_actionRecenter_triggered();
-
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  // Add a GraphicItem for the Circular triangulation
-  agi = new CGAL::Qt::ArcsGraphicsItem<CircularKernel>(arcs, intersections);
-
-  agi->setIntersectionsPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-
-  QObject::connect(this, SIGNAL(changed()),
-		   agi, SLOT(modelChanged()));
-
-  agi->setInputPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(agi);
-  agi->hide();
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  cai = new CGAL::Qt::GraphicsViewCircularArcInput<CircularKernel>(this, &scene);
-
-  QObject::connect(cai, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   qApp, SLOT(quit()));
-
-  // Check two actions 
-  this->actionInsertCircularArc->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-
-  // Uncomment the following line to get antialiasing by default.
-//   actionUse_Antialiasing->setChecked(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Circular_kernel_2.html");
-  this->addAboutCGAL();
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  Circular_arc_2 ca;
-  Line_arc_2 la;
-  bool is_circular = false;
-  
-  if(assign(ca, o)){
-    is_circular = true;
-  } else if(! assign(la, o)){
-    std::cerr << "unknown object" << std::endl;
-    return;
-  }
-
-  for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
-    Circular_arc_2 vca;
-    Line_arc_2 vla;
-    if(assign(vca, *it)){
-      if(is_circular){
-	CGAL::intersection(ca, vca, std::back_inserter(intersections));
-      } else {
-	CGAL::intersection(la, vca, std::back_inserter(intersections));
-      }
-    } else if(assign(vla, *it)){
-      if(is_circular){
-	CGAL::intersection(ca, vla, std::back_inserter(intersections));
-      } else {
-	CGAL::intersection(la, vla, std::back_inserter(intersections));
-      }
-    }
-  }
-  arcs.push_back(o);
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-void
-MainWindow::on_actionInsertCircularArc_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(cai);
-  } else {
-    scene.removeEventFilter(cai);
-  }
-}
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  arcs.clear();
-  intersections.clear();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionLoadLineAndCircularArcs_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Line and Circular Arc File"),
-						  ".",
-						  tr("Edge files (*.arc)\n"));
-  if(! fileName.isEmpty()){
-    open(fileName);
-    this->addToRecentFiles(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-    std::ifstream ifs(qPrintable(fileName));
-    char c;
-    double x,y;
-    Segment_2 s;
-    
-    while(ifs >> c){
-      if(c == 's'){
-	ifs >> x >> y;
-	Point_2 p(x,y);
-	ifs >> x >> y;
-	Point_2 q(x,y);
-	
-	Line_arc_2 la(Segment_2(p,q));
-	for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
-	  Circular_arc_2 vca;
-	  Line_arc_2 vla;
-	  if(assign(vca, *it)){
-	    CGAL::intersection(la, vca, std::back_inserter(intersections));
-	  } else if(assign(vla, *it)){
-	    CGAL::intersection(la, vla, std::back_inserter(intersections));
-	  }
-	}
-	arcs.push_back(make_object(la));
-      } else if(c == 'c'){
-	ifs >> x >> y;
-	Point_2 p(x,y);
-	ifs >> x >> y;
-	Point_2 q(x,y);
-	ifs >> x >> y;
-	Point_2 r(x,y);
-	Circular_arc_2 ca(p,q,r);
-	for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
-	  Circular_arc_2 vca;
-	  Line_arc_2 vla;
-	  if(assign(vca, *it)){
-	    CGAL::intersection(ca, vca, std::back_inserter(intersections));
-	  } else if(assign(vla, *it)){
-	    CGAL::intersection(ca, vla, std::back_inserter(intersections));
-	  }
-	}
-	arcs.push_back(make_object(ca));
-      }
-    }
-    emit (changed());
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(agi->boundingRect());
-  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Circular_kernel_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Circular_kernel_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Circular_kernel_3/CMakeLists.txt
deleted file mode 100644
index 60bd742..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-project (Circular_kernel_3)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL  COMPONENTS Qt4)
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-find_package(OpenGL)
-find_package(QGLViewer)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
-
-  include(${QT_USE_FILE})
-
-  include_directories (${QGLVIEWER_INCLUDE_DIR})
-  include_directories (BEFORE ../../include ./ )
-
-  add_executable  ( Circular_kernel_3 Circular_kernel_3.cpp Viewer.cpp )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_3 )
-
-  target_link_libraries( Circular_kernel_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-  target_link_libraries( Circular_kernel_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
-  target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Circular_kernel_3.cpp b/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Circular_kernel_3.cpp
deleted file mode 100644
index 79d42eb..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Circular_kernel_3.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "Viewer.h"
-#include <qapplication.h>
-
-int main(int argc, char** argv)
-{
-  // Read command lines arguments.
-  QApplication application(argc,argv);
-
-  // Instantiate the viewer.
-  Viewer viewer;
-
-#if QT_VERSION < 0x040000
-  // Set the viewer as the application main widget.
-  application.setMainWidget(&viewer);
-#else
-  viewer.setWindowTitle("Intersection points of randomly generated circles.");
-#endif
-
-  // Make the viewer window visible on screen.
-  viewer.show();
-
-  // Run main loop.
-  return application.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.cpp
deleted file mode 100644
index 0bcab40..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-#include "Viewer.h"
-#include <CGAL/point_generators_3.h>
-#include <CGAL/squared_distance_3.h>
-#include <CGAL/Exact_spherical_kernel_3.h>
-#include <vector>
-
-
-template <class Kernel>
-void Viewer::draw_circle_on_unit_sphere(const typename CGAL::Point_3<Kernel>& center) const {
-  const typename Kernel::Point_3 origin(0,0,0);
-  const typename Kernel::Plane_3 plane(center, center-origin);
-  typename Kernel::Vector_3 base1=plane.base1();
-  typename Kernel::Vector_3 base2=plane.base2();
-  base1=base1/CGAL::sqrt(base1.squared_length());
-  base2=base2/CGAL::sqrt(base2.squared_length());
-  const double radius=CGAL::sqrt( CGAL::to_double( 1 - CGAL::squared_distance(origin,center) ) );
-  const double nb_pt_per_circle=100;
-  const double step=2 * CGAL_PI / nb_pt_per_circle;
-  ::glDisable(GL_LIGHTING);
-  ::glBegin(GL_LINE_LOOP);
-  for (double theta = 0; theta < 2 * CGAL_PI ; theta += step) {
-    const typename Kernel::Point_3 point=center + ( radius*cos(theta)*base1 + radius*sin(theta)*base2 );
-    ::glVertex3f( point.x(),point.y(),point.z() );
-  }
-  ::glEnd();
-  ::glEnable(GL_LIGHTING);
-}
-
-void Viewer::draw()
-{
-  const int sphere_res=30;
-  
-  //draw central sphere
-  ::glPushMatrix();
-  ::glColor3f(1,1,1);
-  ::gluSphere(qsphere,0.999,sphere_res,sphere_res);
-  ::glCallList(dl_nb);
-  ::glCallList(dl_nb+1);
-  ::glPopMatrix();
-}
-
-void Viewer::init()
-{
-  // Restore previous viewer state.
-  restoreStateFromFile();
-  
-  //init quadric to store sphere.
-  qsphere=gluNewQuadric();
-  gluQuadricOrientation(qsphere,GLU_OUTSIDE);
-  
-  //code for antialiasing
-  ::glEnable(GL_BLEND);
-  ::glEnable(GL_LINE_SMOOTH);
-  ::glEnable(GL_POINT_SMOOTH);
-  ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  
-
-  //set intersection point size
-  ::glPointSize(5);
-  
-  //random generator of points within a sphere
-  typedef CGAL::Creator_uniform_3<EPIC::FT,EPIC::Point_3>   Creator;
-  CGAL::Random_points_in_sphere_3<EPIC::Point_3, Creator>   gen;
-  
-  const unsigned nb_circles=20;
-  
-  //vector to store input points
-  std::vector<EPIC::Point_3> points;
-  points.reserve(nb_circles);
-  
-  //disable lighting before drawing segments and points
-  ::glEnable(GL_LIGHTING);
-  
-  //init call lists
-  dl_nb=::glGenLists(2);
-  
-  //store circles in a display list
-  ::glNewList(dl_nb,GL_COMPILE);
-  ::glColor3f(1,0,0);
-  
-  for (unsigned i=0;i<nb_circles;++i){
-    EPIC::Point_3 p=*++gen;
-    //prevent great circles
-    while (p.x()==0 && p.y()==0 && p.z()==0) {  p=*++gen; }
-    draw_circle_on_unit_sphere(p);
-    points.push_back(p);
-  }
-  ::glEndList();
-  
-  std::vector<EPIC::Point_3> intersections;
-  naive_compute_intersection_points(points,std::back_inserter(intersections));
-
-  ::glNewList(dl_nb+1,GL_COMPILE);
-  ::glColor3f(0,1,0);
-  //draw points as small spheres
-  for (std::vector<EPIC::Point_3>::const_iterator it=intersections.begin();it!=intersections.end();++it){
-    glPushMatrix();
-    glTranslatef(it->x(),it->y(),it->z());
-    gluSphere(qsphere,0.005,10,10);
-    glPopMatrix();    
-  }
-  ::glEndList();
-  
-  //lighting
-  ::glEnable(GL_LIGHT0);
-  ::glEnable(GL_LIGHTING);
-  float lpos[4] = { -.2f, .2f, .9797958971f, 0.0f };
-  ::glLightfv(GL_LIGHT0,GL_POSITION,lpos);
-  ::glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, 1.0f);
-
-  ::glEnable(GL_NORMALIZE);
-  ::glShadeModel(GL_SMOOTH);
-}
-
-
-template<class Output_iterator>
-void Viewer::naive_compute_intersection_points(const std::vector<EPIC::Point_3>& points,Output_iterator out) const {
-  typedef CGAL::Exact_spherical_kernel_3 SK;
-  SK::Sphere_3 sphere(SK::Point_3(0,0,0),1);
-  
-  //converter point to exact SK point type
-  CGAL::Cartesian_converter<EPIC,SK> to_exact;
-  std::vector<SK::Circle_3> circles;
-  
-  //create circles from points: need to use a converter to change floating points coordinates into an exact NT.
-  for (std::vector<EPIC::Point_3>::const_iterator it=points.begin();it!=points.end();++it){
-    const SK::Point_3 center=to_exact(*it);
-    circles.push_back( SK::Circle_3(sphere,SK::Plane_3(center,center-CGAL::ORIGIN) ) );
-  }
-  
-  
-  //Look for intersection points among pair of circles: use a naive and quadratic way
-  for (std::vector<SK::Circle_3>::const_iterator it_f=circles.begin();it_f!=--circles.end();++it_f){
-    std::vector<SK::Circle_3>::const_iterator it_s=it_f;
-    ++it_s;
-    for (;it_s!=circles.end();++it_s){
-      std::vector <CGAL::Object> intersections;
-      //ensure_circles are different
-      CGAL_precondition(*it_s!=*it_f);
-      CGAL::intersection(*it_f,*it_s,std::back_inserter(intersections));
-      if (!intersections.empty()){
-        for (std::vector <CGAL::Object>::const_iterator it_pt=intersections.begin();it_pt!=intersections.end();++it_pt){
-          const std::pair<SK::Circular_arc_point_3,unsigned>* pt=
-            CGAL::object_cast< std::pair<SK::Circular_arc_point_3,unsigned> > (&(*it_pt));
-          assert(pt!=NULL);
-          *out++=EPIC::Point_3( CGAL::to_double(pt->first.x()),
-                                CGAL::to_double(pt->first.y()),
-                                CGAL::to_double(pt->first.z()) 
-          );
-        }
-      }
-    }
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.h b/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.h
deleted file mode 100644
index e43abf4..0000000
--- a/3rdparty/CGAL-4.6/demo/Circular_kernel_3/Viewer.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <QGLViewer/qglviewer.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/glu.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
-
-class Viewer : public QGLViewer
-{
-  GLUquadricObj *qsphere;
-  GLuint dl_nb;
-protected :
-  virtual void draw();
-  virtual void init();
-  template <class Kernel>
-  void draw_circle_on_unit_sphere(const typename CGAL::Point_3<Kernel>&) const;
-  template<class Output_iterator>
-  void naive_compute_intersection_points(const std::vector<EPIC::Point_3>&,Output_iterator) const;
-};
diff --git a/3rdparty/CGAL-4.6/demo/Convex_hull_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Convex_hull_3/CMakeLists.txt
deleted file mode 100644
index 821d97f..0000000
--- a/3rdparty/CGAL-4.6/demo/Convex_hull_3/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Convex_hull_3_Demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  create_single_source_cgal_program( "quickhull_3_demo.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/CMakeLists.txt
deleted file mode 100644
index 0ae9ff1..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Envelope_3_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core Qt3 )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  
-  find_package(Qt3-patched QUIET )
-  # FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-  # that it can be used together with FindQt4: all its variables are prefixed
-  # by "QT3_" instead of "QT_".
-  
-  if(CGAL_Qt3_FOUND AND QT3_FOUND AND CGAL_Core_FOUND)
-  
-    include( Qt3Macros-patched )
-    qt3_automoc(  envelope_3.cpp )
-
-    # Make sure the compiler can find generated .moc files
-    include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-  
-    include_directories( ${QT3_INCLUDE_DIR} )
-
-  include_directories (BEFORE ../../include)
-
-    add_executable  (envelope_3  envelope_3.cpp)
-  
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS envelope_3 )
-  
-  
-    # Link the executable to CGAL and third-party libraries
-    target_link_libraries(envelope_3 ${QT3_LIBRARIES} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-  else()
-  
-    message(STATUS "NOTICE: This demo requires Qt3, the CGAL Qt3 and the CGAL Core libraries, and will not be compiled.")
-  
-  endif()
-  
-else()
-  
-    message(STATUS "NOTICE: This demo requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane1.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane1.txt
deleted file mode 100644
index ee875bd..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane1.txt
+++ /dev/null
@@ -1,501 +0,0 @@
-500
-16776/1 13602/1 -1/1 116612145/1
-4264/1 18238/1 -1/1 87701585/1
-11560/1 14854/1 -1/1 88568729/1
-7532/1 17838/1 -1/1 93731317/1
-2424/1 8426/1 -1/1 19218313/1
-11040/1 16814/1 -1/1 101148049/1
-4724/1 12114/1 -1/1 42266293/1
-6684/1 2352/1 -1/1 12551940/1
-5302/1 10234/1 -1/1 33211490/1
-168/1 18272/1 -1/1 83473552/1
-380/1 14682/1 -1/1 53926381/1
-15362/1 19482/1 -1/1 153884842/1
-4768/1 6110/1 -1/1 15016481/1
-9380/1 15976/1 -1/1 85804244/1
-3466/1 18148/1 -1/1 85340765/1
-16538/1 12946/1 -1/1 110276090/1
-13506/1 3888/1 -1/1 49382145/1
-11750/1 5066/1 -1/1 40931714/1
-11986/1 2904/1 -1/1 38024353/1
-18742/1 14410/1 -1/1 139727666/1
-2488/1 3928/1 -1/1 5404832/1
-4034/1 7212/1 -1/1 17071525/1
-10718/1 2268/1 -1/1 30004837/1
-8748/1 8724/1 -1/1 38158920/1
-8916/1 6996/1 -1/1 32109768/1
-5208/1 9296/1 -1/1 28384720/1
-13274/1 8778/1 -1/1 63313090/1
-14384/1 18042/1 -1/1 133103305/1
-3764/1 6722/1 -1/1 14838245/1
-14890/1 19934/1 -1/1 154769114/1
-4132/1 12880/1 -1/1 45741956/1
-4870/1 17638/1 -1/1 83703986/1
-9324/1 15408/1 -1/1 81085860/1
-16768/1 1310/1 -1/1 70720481/1
-8216/1 8426/1 -1/1 34625033/1
-18312/1 3408/1 -1/1 86735952/1
-2346/1 3324/1 -1/1 4138173/1
-5058/1 5770/1 -1/1 14719066/1
-13806/1 14494/1 -1/1 100170418/1
-18296/1 2724/1 -1/1 85540948/1
-3504/1 12020/1 -1/1 39189604/1
-14196/1 16778/1 -1/1 120756925/1
-1284/1 7526/1 -1/1 14572333/1
-13504/1 5048/1 -1/1 51960080/1
-1098/1 4984/1 -1/1 6511465/1
-14248/1 5230/1 -1/1 57589601/1
-11824/1 15572/1 -1/1 95573540/1
-10568/1 13852/1 -1/1 75890132/1
-42/1 15164/1 -1/1 57487165/1
-10980/1 962/1 -1/1 30371461/1
-1996/1 4370/1 -1/1 5770229/1
-16294/1 17046/1 -1/1 139015138/1
-1352/1 2816/1 -1/1 2439440/1
-7694/1 15160/1 -1/1 72255809/1
-5990/1 17884/1 -1/1 88929389/1
-10016/1 2200/1 -1/1 26290064/1
-16916/1 18978/1 -1/1 161578885/1
-2608/1 18200/1 -1/1 84510416/1
-8816/1 15952/1 -1/1 83047040/1
-6504/1 9914/1 -1/1 35147353/1
-13458/1 7848/1 -1/1 60677217/1
-13640/1 17986/1 -1/1 127386449/1
-4210/1 11838/1 -1/1 39465586/1
-16124/1 16956/1 -1/1 136872328/1
-19808/1 17918/1 -1/1 178352897/1
-19706/1 1804/1 -1/1 97895213/1
-16000/1 11556/1 -1/1 97385284/1
-14992/1 17354/1 -1/1 131480345/1
-2686/1 12514/1 -1/1 40953698/1
-14372/1 1380/1 -1/1 52114696/1
-17092/1 16284/1 -1/1 139326280/1
-3102/1 14008/1 -1/1 51461617/1
-5710/1 4912/1 -1/1 14182961/1
-15264/1 7232/1 -1/1 71322880/1
-14472/1 17146/1 -1/1 125856025/1
-866/1 7930/1 -1/1 15908714/1
-14506/1 18620/1 -1/1 139282109/1
-17700/1 11420/1 -1/1 110926600/1
-6528/1 8376/1 -1/1 28193040/1
-10460/1 6338/1 -1/1 37395461/1
-10166/1 846/1 -1/1 26015818/1
-6294/1 18872/1 -1/1 98941705/1
-1286/1 16226/1 -1/1 66234218/1
-12402/1 16676/1 -1/1 107974645/1
-19480/1 10762/1 -1/1 123822761/1
-1444/1 16572/1 -1/1 69179080/1
-17250/1 3286/1 -1/1 77090074/1
-7046/1 2960/1 -1/1 14601929/1
-15014/1 10192/1 -1/1 82324265/1
-8198/1 9488/1 -1/1 39307337/1
-1768/1 10122/1 -1/1 26395177/1
-44/1 8980/1 -1/1 20160584/1
-10448/1 400/1 -1/1 27330176/1
-8744/1 16976/1 -1/1 91160528/1
-11908/1 3314/1 -1/1 38195765/1
-8778/1 14778/1 -1/1 73860642/1
-7776/1 13650/1 -1/1 61697169/1
-4162/1 1768/1 -1/1 5112017/1
-9268/1 11148/1 -1/1 52543432/1
-2580/1 8748/1 -1/1 20795976/1
-4024/1 5322/1 -1/1 11129065/1
-1910/1 1274/1 -1/1 1317794/1
-1662/1 16940/1 -1/1 72431461/1
-1312/1 16676/1 -1/1 69952580/1
-2214/1 18868/1 -1/1 90225805/1
-19836/1 3984/1 -1/1 102334788/1
-12584/1 5668/1 -1/1 47620820/1
-1696/1 3032/1 -1/1 3017360/1
-10440/1 10/1 -1/1 27248425/1
-6068/1 15052/1 -1/1 65845832/1
-7550/1 9830/1 -1/1 38407850/1
-16028/1 8032/1 -1/1 80352452/1
-12894/1 9800/1 -1/1 65573809/1
-16186/1 2164/1 -1/1 66667373/1
-18766/1 10912/1 -1/1 117808625/1
-948/1 15496/1 -1/1 60256180/1
-15564/1 9474/1 -1/1 82998693/1
-8938/1 9930/1 -1/1 44623186/1
-10250/1 19310/1 -1/1 119484650/1
-6414/1 5170/1 -1/1 16967074/1
-18956/1 1858/1 -1/1 90695525/1
-18180/1 11540/1 -1/1 115921000/1
-19876/1 7278/1 -1/1 112006165/1
-7526/1 3020/1 -1/1 16440269/1
-13594/1 10776/1 -1/1 75229753/1
-19992/1 1146/1 -1/1 100248345/1
-8724/1 9178/1 -1/1 40085965/1
-606/1 1620/1 -1/1 747909/1
-16792/1 3784/1 -1/1 74072480/1
-11682/1 8264/1 -1/1 51190705/1
-5334/1 3760/1 -1/1 10647289/1
-7400/1 13602/1 -1/1 59943601/1
-9044/1 3532/1 -1/1 23567240/1
-13234/1 11998/1 -1/1 79772690/1
-12354/1 17168/1 -1/1 111840385/1
-15548/1 11310/1 -1/1 92414101/1
-13728/1 15554/1 -1/1 107596225/1
-19026/1 6308/1 -1/1 100444885/1
-6552/1 2032/1 -1/1 11764432/1
-15536/1 12852/1 -1/1 101635300/1
-15528/1 6702/1 -1/1 71508897/1
-12808/1 16958/1 -1/1 112904657/1
-6118/1 18578/1 -1/1 95643002/1
-8584/1 15616/1 -1/1 79386128/1
-266/1 3880/1 -1/1 3781289/1
-15066/1 18304/1 -1/1 140505193/1
-15170/1 11908/1 -1/1 92982341/1
-344/1 4214/1 -1/1 4469033/1
-13578/1 16214/1 -1/1 111813970/1
-8144/1 5932/1 -1/1 25378340/1
-3692/1 9946/1 -1/1 28138445/1
-13382/1 10124/1 -1/1 70393325/1
-5114/1 16432/1 -1/1 74040905/1
-18206/1 4370/1 -1/1 87638834/1
-6446/1 17222/1 -1/1 84537050/1
-11168/1 1976/1 -1/1 32157200/1
-3976/1 11638/1 -1/1 37812905/1
-3924/1 2800/1 -1/1 5809444/1
-12508/1 18416/1 -1/1 123899780/1
-10216/1 5478/1 -1/1 33593785/1
-17986/1 3784/1 -1/1 84453713/1
-2296/1 13156/1 -1/1 44587988/1
-2640/1 17372/1 -1/1 77188996/1
-15692/1 8922/1 -1/1 81460237/1
-3836/1 7560/1 -1/1 17967124/1
-6290/1 7530/1 -1/1 24066250/1
-12376/1 10358/1 -1/1 65113385/1
-10210/1 17490/1 -1/1 102536050/1
-8416/1 1862/1 -1/1 18574025/1
-19496/1 14864/1 -1/1 150258128/1
-10664/1 9544/1 -1/1 51202208/1
-19084/1 7346/1 -1/1 104540693/1
-15714/1 10146/1 -1/1 87467778/1
-1182/1 926/1 -1/1 563650/1
-4102/1 6406/1 -1/1 14465810/1
-8562/1 2088/1 -1/1 19416897/1
-3562/1 15244/1 -1/1 61266845/1
-10190/1 18906/1 -1/1 115318234/1
-18586/1 7828/1 -1/1 101679245/1
-5320/1 2422/1 -1/1 8542121/1
-11610/1 2656/1 -1/1 35461609/1
-8092/1 3988/1 -1/1 20346152/1
-18304/1 14182/1 -1/1 134041385/1
-13016/1 19424/1 -1/1 136677008/1
-5216/1 6992/1 -1/1 19023680/1
-16044/1 15880/1 -1/1 127396084/1
-7834/1 15930/1 -1/1 78784114/1
-16536/1 16252/1 -1/1 134391700/1
-10422/1 17178/1 -1/1 100925442/1
-6076/1 7228/1 -1/1 22290440/1
-7342/1 9316/1 -1/1 35173205/1
-3584/1 10904/1 -1/1 32935568/1
-6478/1 2514/1 -1/1 12071170/1
-17266/1 5064/1 -1/1 80939713/1
-2586/1 192/1 -1/1 1681065/1
-10344/1 6902/1 -1/1 38658985/1
-18436/1 3594/1 -1/1 88200733/1
-2848/1 9444/1 -1/1 24325060/1
-8568/1 8870/1 -1/1 38021881/1
-17776/1 13784/1 -1/1 126496208/1
-6526/1 2370/1 -1/1 12051394/1
-15862/1 14360/1 -1/1 114453161/1
-5104/1 3316/1 -1/1 9261668/1
-18300/1 8230/1 -1/1 100655725/1
-17082/1 15460/1 -1/1 132701581/1
-494/1 4424/1 -1/1 4953953/1
-16784/1 8034/1 -1/1 86561953/1
-17480/1 3262/1 -1/1 79047761/1
-14746/1 8328/1 -1/1 71700025/1
-10548/1 10038/1 -1/1 53005437/1
-13596/1 9644/1 -1/1 69464488/1
-8520/1 12034/1 -1/1 54351889/1
-4072/1 14182/1 -1/1 54427577/1
-13238/1 5346/1 -1/1 50956090/1
-11014/1 11834/1 -1/1 65337938/1
-3052/1 17540/1 -1/1 79241576/1
-18916/1 4604/1 -1/1 94752968/1
-6908/1 16724/1 -1/1 81853160/1
-5210/1 4954/1 -1/1 12921554/1
-7920/1 14996/1 -1/1 71901604/1
-1120/1 19420/1 -1/1 94597700/1
-13118/1 17904/1 -1/1 123158785/1
-10600/1 1166/1 -1/1 28429889/1
-7454/1 18050/1 -1/1 95341154/1
-10708/1 792/1 -1/1 28822132/1
-2198/1 4304/1 -1/1 5838905/1
-3422/1 9042/1 -1/1 23366962/1
-10436/1 7496/1 -1/1 41275028/1
-3674/1 5546/1 -1/1 11064098/1
-3226/1 7394/1 -1/1 16269578/1
-6278/1 17638/1 -1/1 87628082/1
-17380/1 17898/1 -1/1 155600701/1
-4290/1 14622/1 -1/1 58051746/1
-2244/1 2204/1 -1/1 2473288/1
-2868/1 17200/1 -1/1 76016356/1
-12282/1 3988/1 -1/1 41687917/1
-5400/1 14596/1 -1/1 60550804/1
-16620/1 8704/1 -1/1 87996004/1
-16780/1 6756/1 -1/1 81802984/1
-8468/1 7488/1 -1/1 31944292/1
-10666/1 4496/1 -1/1 33494393/1
-252/1 14090/1 -1/1 49647901/1
-10690/1 14290/1 -1/1 79620050/1
-13540/1 7068/1 -1/1 58322056/1
-16766/1 7166/1 -1/1 83112578/1
-19836/1 15748/1 -1/1 160366600/1
-17216/1 13648/1 -1/1 120664640/1
-4806/1 14210/1 -1/1 56255434/1
-7050/1 16414/1 -1/1 79780474/1
-974/1 2622/1 -1/1 1955890/1
-13256/1 6612/1 -1/1 54860020/1
-13614/1 11362/1 -1/1 78609010/1
-2940/1 66/1 -1/1 2161989/1
-13912/1 12424/1 -1/1 86974880/1
-2380/1 12616/1 -1/1 41206964/1
-19526/1 13048/1 -1/1 137878745/1
-19780/1 7138/1 -1/1 110549861/1
-17112/1 3174/1 -1/1 75723705/1
-3356/1 10242/1 -1/1 29040325/1
-1428/1 122/1 -1/1 513517/1
-1264/1 15872/1 -1/1 63379520/1
-10114/1 11184/1 -1/1 56843713/1
-14920/1 5396/1 -1/1 62930804/1
-2224/1 14674/1 -1/1 55068113/1
-3198/1 17296/1 -1/1 77344705/1
-14514/1 9160/1 -1/1 73640449/1
-8130/1 522/1 -1/1 16592346/1
-16612/1 3774/1 -1/1 72550405/1
-10526/1 8902/1 -1/1 47510570/1
-588/1 12906/1 -1/1 41727645/1
-116/1 5954/1 -1/1 8865893/1
-1518/1 12600/1 -1/1 40266081/1
-11334/1 15774/1 -1/1 94319658/1
-5796/1 14692/1 -1/1 62362120/1
-19928/1 14814/1 -1/1 154144945/1
-18720/1 13896/1 -1/1 135884304/1
-8834/1 5082/1 -1/1 25966570/1
-3390/1 3754/1 -1/1 6396154/1
-5614/1 18428/1 -1/1 92777045/1
-3182/1 1518/1 -1/1 3107362/1
-17696/1 10678/1 -1/1 106792025/1
-8430/1 18530/1 -1/1 103606450/1
-5042/1 2304/1 -1/1 7682545/1
-11200/1 15568/1 -1/1 91950656/1
-11788/1 8476/1 -1/1 52699880/1
-11206/1 4608/1 -1/1 36702025/1
-5428/1 17208/1 -1/1 81394612/1
-7134/1 16764/1 -1/1 82981413/1
-12932/1 11456/1 -1/1 74619140/1
-12982/1 12860/1 -1/1 83477981/1
-4408/1 19462/1 -1/1 99549977/1
-18974/1 13242/1 -1/1 133840810/1
-15070/1 9702/1 -1/1 80308426/1
-4544/1 684/1 -1/1 5278948/1
-430/1 14906/1 -1/1 55593434/1
-834/1 18126/1 -1/1 82311858/1
-9264/1 9362/1 -1/1 43367185/1
-5584/1 14308/1 -1/1 58974980/1
-16784/1 9876/1 -1/1 94809508/1
-11666/1 1278/1 -1/1 34432210/1
-15578/1 18590/1 -1/1 147065546/1
-11056/1 13710/1 -1/1 77549809/1
-18192/1 10474/1 -1/1 110163385/1
-8504/1 11124/1 -1/1 49015348/1
-1486/1 16688/1 -1/1 70174385/1
-14634/1 18598/1 -1/1 140009890/1
-6314/1 11842/1 -1/1 45024890/1
-16150/1 1384/1 -1/1 65684489/1
-13398/1 14772/1 -1/1 99429597/1
-14248/1 13828/1 -1/1 98554772/1
-15082/1 4660/1 -1/1 62295581/1
-9680/1 4348/1 -1/1 28151876/1
-15264/1 11360/1 -1/1 90509824/1
-14022/1 4754/1 -1/1 54804250/1
-18392/1 18736/1 -1/1 172325840/1
-13940/1 6674/1 -1/1 59716469/1
-4998/1 386/1 -1/1 6282250/1
-17326/1 3190/1 -1/1 77591594/1
-5830/1 7018/1 -1/1 20810306/1
-3564/1 22/1 -1/1 3175645/1
-10904/1 18620/1 -1/1 116400404/1
-16410/1 17218/1 -1/1 141436906/1
-12562/1 11306/1 -1/1 71407370/1
-3166/1 18664/1 -1/1 89592113/1
-10118/1 5198/1 -1/1 32348282/1
-6078/1 5202/1 -1/1 16000722/1
-8462/1 2254/1 -1/1 19171490/1
-2562/1 16432/1 -1/1 69143617/1
-16584/1 1186/1 -1/1 69108913/1
-6318/1 7680/1 -1/1 24724881/1
-258/1 7060/1 -1/1 12477541/1
-12626/1 5256/1 -1/1 46760353/1
-9952/1 1150/1 -1/1 25091201/1
-7446/1 8488/1 -1/1 31872265/1
-3714/1 8510/1 -1/1 21553474/1
-872/1 7322/1 -1/1 13593017/1
-17284/1 4540/1 -1/1 79837064/1
-19834/1 2550/1 -1/1 99972514/1
-15706/1 1214/1 -1/1 62038058/1
-8550/1 5824/1 -1/1 26755369/1
-7334/1 3730/1 -1/1 16925114/1
-6412/1 15796/1 -1/1 72656840/1
-8974/1 12228/1 -1/1 57514165/1
-18688/1 18262/1 -1/1 170685497/1
-5006/1 18648/1 -1/1 93201985/1
-6118/1 5266/1 -1/1 16290170/1
-18744/1 3226/1 -1/1 90436153/1
-5708/1 1402/1 -1/1 8636717/1
-5858/1 9890/1 -1/1 33032066/1
-17082/1 9572/1 -1/1 95854477/1
-17954/1 16896/1 -1/1 151955233/1
-11104/1 15238/1 -1/1 88873865/1
-3642/1 17788/1 -1/1 82419277/1
-14140/1 12052/1 -1/1 86297576/1
-15396/1 17878/1 -1/1 139164925/1
-11708/1 2730/1 -1/1 36132541/1
-18120/1 18526/1 -1/1 167886769/1
-14312/1 19800/1 -1/1 149218336/1
-13002/1 10766/1 -1/1 71239690/1
-3460/1 10712/1 -1/1 31679636/1
-9578/1 15978/1 -1/1 86758642/1
-9414/1 8324/1 -1/1 39478093/1
-15122/1 9726/1 -1/1 80817490/1
-11910/1 13684/1 -1/1 82274989/1
-8992/1 3258/1 -1/1 22867657/1
-12320/1 19650/1 -1/1 134476225/1
-3424/1 7594/1 -1/1 17348153/1
-12858/1 19770/1 -1/1 139045266/1
-19702/1 11824/1 -1/1 131993945/1
-18086/1 15098/1 -1/1 138763250/1
-9794/1 10532/1 -1/1 51711365/1
-2406/1 620/1 -1/1 1543309/1
-16718/1 13124/1 -1/1 112932725/1
-9060/1 2424/1 -1/1 21989844/1
-12520/1 13138/1 -1/1 82339361/1
-3890/1 2098/1 -1/1 4883426/1
-6010/1 3126/1 -1/1 11472994/1
-1820/1 13836/1 -1/1 48686824/1
-13730/1 7522/1 -1/1 61273346/1
-5556/1 15426/1 -1/1 67207653/1
-17876/1 7782/1 -1/1 95027725/1
-3484/1 14004/1 -1/1 52062568/1
-9046/1 6480/1 -1/1 30955129/1
-15376/1 8748/1 -1/1 78237220/1
-13462/1 16552/1 -1/1 113798537/1
-18304/1 15962/1 -1/1 147455465/1
-710/1 16582/1 -1/1 68866706/1
-7084/1 10132/1 -1/1 38210120/1
-8848/1 5262/1 -1/1 26493937/1
-9706/1 1368/1 -1/1 24019465/1
-6300/1 16172/1 -1/1 75305896/1
-18400/1 12310/1 -1/1 122524025/1
-220/1 6148/1 -1/1 9461576/1
-12002/1 6656/1 -1/1 47087585/1
-17560/1 14786/1 -1/1 131744849/1
-13670/1 8140/1 -1/1 63282125/1
-17154/1 14850/1 -1/1 128695554/1
-2568/1 6200/1 -1/1 11258656/1
-10648/1 7652/1 -1/1 42983252/1
-1330/1 4112/1 -1/1 4669361/1
-12338/1 74/1 -1/1 38057930/1
-16908/1 5752/1 -1/1 79741492/1
-3994/1 15884/1 -1/1 67063373/1
-9360/1 5546/1 -1/1 29591929/1
-19066/1 6916/1 -1/1 102835853/1
-1146/1 18070/1 -1/1 81959554/1
-12250/1 10382/1 -1/1 64462106/1
-15792/1 12472/1 -1/1 101234512/1
-7794/1 11832/1 -1/1 50185665/1
-16530/1 18058/1 -1/1 149833066/1
-2904/1 18904/1 -1/1 91448608/1
-6618/1 58/1 -1/1 10950322/1
-1892/1 18962/1 -1/1 90784277/1
-13754/1 12540/1 -1/1 86606029/1
-7788/1 9356/1 -1/1 37046920/1
-6614/1 126/1 -1/1 10940218/1
-16228/1 5878/1 -1/1 74474717/1
-2134/1 12926/1 -1/1 42908858/1
-4198/1 18472/1 -1/1 89709497/1
-14466/1 3264/1 -1/1 54979713/1
-15614/1 14040/1 -1/1 110229649/1
-18092/1 7864/1 -1/1 97290740/1
-13884/1 13040/1 -1/1 90701764/1
-4422/1 14384/1 -1/1 56613385/1
-13656/1 12442/1 -1/1 85322425/1
-17576/1 16560/1 -1/1 145787344/1
-16900/1 9322/1 -1/1 93127421/1
-11346/1 18792/1 -1/1 120467745/1
-17804/1 4036/1 -1/1 83317928/1
-8284/1 5592/1 -1/1 24973780/1
-7602/1 18422/1 -1/1 99290122/1
-6098/1 3830/1 -1/1 12963626/1
-936/1 16756/1 -1/1 70409908/1
-4300/1 5136/1 -1/1 11217124/1
-18768/1 1104/1 -1/1 88364160/1
-15230/1 7086/1 -1/1 70541074/1
-6026/1 7654/1 -1/1 23724098/1
-15144/1 19912/1 -1/1 156457120/1
-19566/1 14296/1 -1/1 146800993/1
-696/1 13222/1 -1/1 43826425/1
-10976/1 2486/1 -1/1 31663193/1
-19442/1 7876/1 -1/1 110005685/1
-3494/1 19372/1 -1/1 96870605/1
-11808/1 1298/1 -1/1 35278417/1
-92/1 19596/1 -1/1 96002920/1
-16114/1 400/1 -1/1 64955249/1
-14916/1 4230/1 -1/1 60094989/1
-18018/1 15852/1 -1/1 143983557/1
-15024/1 988/1 -1/1 56674180/1
-13692/1 13792/1 -1/1 94422532/1
-1626/1 13582/1 -1/1 46778650/1
-2094/1 7652/1 -1/1 15734485/1
-17238/1 268/1 -1/1 74305117/1
-1236/1 9510/1 -1/1 22991949/1
-14636/1 15436/1 -1/1 113120648/1
-7268/1 5614/1 -1/1 21085205/1
-19416/1 6194/1 -1/1 103836673/1
-17924/1 2910/1 -1/1 82434469/1
-9732/1 16912/1 -1/1 95181892/1
-5568/1 2530/1 -1/1 9350881/1
-14386/1 2930/1 -1/1 53885474/1
-9212/1 9302/1 -1/1 42847037/1
-7232/1 5154/1 -1/1 19716385/1
-19864/1 2256/1 -1/1 99917008/1
-13556/1 8752/1 -1/1 65090660/1
-18848/1 7886/1 -1/1 104359025/1
-942/1 8244/1 -1/1 17212725/1
-2334/1 10884/1 -1/1 30977253/1
-3570/1 13098/1 -1/1 46075626/1
-8512/1 18208/1 -1/1 100996352/1
-15782/1 16526/1 -1/1 130545050/1
-8536/1 7902/1 -1/1 33826225/1
-19164/1 10812/1 -1/1 121039560/1
-2720/1 8896/1 -1/1 21634304/1
-992/1 11426/1 -1/1 32884385/1
-428/1 8082/1 -1/1 16375477/1
-9642/1 17384/1 -1/1 98792905/1
-14356/1 16874/1 -1/1 122706653/1
-6926/1 11834/1 -1/1 47003258/1
-15244/1 482/1 -1/1 58152965/1
-14092/1 1074/1 -1/1 49934485/1
-586/1 7738/1 -1/1 15055010/1
-15624/1 18622/1 -1/1 147722065/1
-9318/1 19194/1 -1/1 113808690/1
-17830/1 10106/1 -1/1 105010034/1
-4426/1 6316/1 -1/1 14870333/1
-12962/1 14218/1 -1/1 92541242/1
-19336/1 12126/1 -1/1 130230193/1
-14762/1 13726/1 -1/1 101579930/1
-17734/1 15754/1 -1/1 140670818/1
-18164/1 16542/1 -1/1 150892165/1
-17858/1 7806/1 -1/1 94960450/1
-4918/1 17384/1 -1/1 81597545/1
-13926/1 11844/1 -1/1 83553453/1
-1874/1 12328/1 -1/1 38872865/1
-9218/1 15966/1 -1/1 84971170/1
-2508/1 3704/1 -1/1 5002420/1
-6106/1 18132/1 -1/1 91513165/1
-15424/1 10030/1 -1/1 84625169/1
-15032/1 5958/1 -1/1 65364697/1
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane2.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane2.txt
deleted file mode 100644
index 9977f7b..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane2.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-4
-0/1 -1/1  1/1 0/1
--1/1 0/1 1/1 0/1
-0/1  1/1 1/1 0/1
-1/1 0/1 1/1  0/1
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane3.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane3.txt
deleted file mode 100644
index 06edf80..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane3.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-208
-52/1 0/1 -1/1 676/1
-0/1 2/1 -1/1 1/1
-50/1 0/1 -1/1 625/1
-0/1 4/1 -1/1 4/1
-48/1 0/1 -1/1 576/1
-0/1 6/1 -1/1 9/1
-46/1 0/1 -1/1 529/1
-0/1 8/1 -1/1 16/1
-44/1 0/1 -1/1 484/1
-0/1 10/1 -1/1 25/1
-42/1 0/1 -1/1 441/1
-0/1 12/1 -1/1 36/1
-40/1 0/1 -1/1 400/1
-0/1 14/1 -1/1 49/1
-38/1 0/1 -1/1 361/1
-0/1 16/1 -1/1 64/1
-36/1 0/1 -1/1 324/1
-0/1 18/1 -1/1 81/1
-34/1 0/1 -1/1 289/1
-0/1 20/1 -1/1 100/1
-32/1 0/1 -1/1 256/1
-0/1 22/1 -1/1 121/1
-30/1 0/1 -1/1 225/1
-0/1 24/1 -1/1 144/1
-28/1 0/1 -1/1 196/1
-0/1 26/1 -1/1 169/1
-26/1 0/1 -1/1 169/1
-0/1 28/1 -1/1 196/1
-24/1 0/1 -1/1 144/1
-0/1 30/1 -1/1 225/1
-22/1 0/1 -1/1 121/1
-0/1 32/1 -1/1 256/1
-20/1 0/1 -1/1 100/1
-0/1 34/1 -1/1 289/1
-18/1 0/1 -1/1 81/1
-0/1 36/1 -1/1 324/1
-16/1 0/1 -1/1 64/1
-0/1 38/1 -1/1 361/1
-14/1 0/1 -1/1 49/1
-0/1 40/1 -1/1 400/1
-12/1 0/1 -1/1 36/1
-0/1 42/1 -1/1 441/1
-10/1 0/1 -1/1 25/1
-0/1 44/1 -1/1 484/1
-8/1 0/1 -1/1 16/1
-0/1 46/1 -1/1 529/1
-6/1 0/1 -1/1 9/1
-0/1 48/1 -1/1 576/1
-4/1 0/1 -1/1 4/1
-0/1 50/1 -1/1 625/1
-2/1 0/1 -1/1 1/1
-0/1 52/1 -1/1 676/1
-104/1 102/1 -1/1 5305/1
-52/1 104/1 -1/1 3380/1
-104/1 100/1 -1/1 5204/1
-54/1 104/1 -1/1 3433/1
-104/1 98/1 -1/1 5105/1
-56/1 104/1 -1/1 3488/1
-104/1 96/1 -1/1 5008/1
-58/1 104/1 -1/1 3545/1
-104/1 94/1 -1/1 4913/1
-60/1 104/1 -1/1 3604/1
-104/1 92/1 -1/1 4820/1
-62/1 104/1 -1/1 3665/1
-104/1 90/1 -1/1 4729/1
-64/1 104/1 -1/1 3728/1
-104/1 88/1 -1/1 4640/1
-66/1 104/1 -1/1 3793/1
-104/1 86/1 -1/1 4553/1
-68/1 104/1 -1/1 3860/1
-104/1 84/1 -1/1 4468/1
-70/1 104/1 -1/1 3929/1
-104/1 82/1 -1/1 4385/1
-72/1 104/1 -1/1 4000/1
-104/1 80/1 -1/1 4304/1
-74/1 104/1 -1/1 4073/1
-104/1 78/1 -1/1 4225/1
-76/1 104/1 -1/1 4148/1
-104/1 76/1 -1/1 4148/1
-78/1 104/1 -1/1 4225/1
-104/1 74/1 -1/1 4073/1
-80/1 104/1 -1/1 4304/1
-104/1 72/1 -1/1 4000/1
-82/1 104/1 -1/1 4385/1
-104/1 70/1 -1/1 3929/1
-84/1 104/1 -1/1 4468/1
-104/1 68/1 -1/1 3860/1
-86/1 104/1 -1/1 4553/1
-104/1 66/1 -1/1 3793/1
-88/1 104/1 -1/1 4640/1
-104/1 64/1 -1/1 3728/1
-90/1 104/1 -1/1 4729/1
-104/1 62/1 -1/1 3665/1
-92/1 104/1 -1/1 4820/1
-104/1 60/1 -1/1 3604/1
-94/1 104/1 -1/1 4913/1
-104/1 58/1 -1/1 3545/1
-96/1 104/1 -1/1 5008/1
-104/1 56/1 -1/1 3488/1
-98/1 104/1 -1/1 5105/1
-104/1 54/1 -1/1 3433/1
-100/1 104/1 -1/1 5204/1
-104/1 52/1 -1/1 3380/1
-102/1 104/1 -1/1 5305/1
-0/1 52/1 -1/1 676/1
-2/1 104/1 -1/1 2705/1
-0/1 54/1 -1/1 729/1
-4/1 104/1 -1/1 2708/1
-0/1 56/1 -1/1 784/1
-6/1 104/1 -1/1 2713/1
-0/1 58/1 -1/1 841/1
-8/1 104/1 -1/1 2720/1
-0/1 60/1 -1/1 900/1
-10/1 104/1 -1/1 2729/1
-0/1 62/1 -1/1 961/1
-12/1 104/1 -1/1 2740/1
-0/1 64/1 -1/1 1024/1
-14/1 104/1 -1/1 2753/1
-0/1 66/1 -1/1 1089/1
-16/1 104/1 -1/1 2768/1
-0/1 68/1 -1/1 1156/1
-18/1 104/1 -1/1 2785/1
-0/1 70/1 -1/1 1225/1
-20/1 104/1 -1/1 2804/1
-0/1 72/1 -1/1 1296/1
-22/1 104/1 -1/1 2825/1
-0/1 74/1 -1/1 1369/1
-24/1 104/1 -1/1 2848/1
-0/1 76/1 -1/1 1444/1
-26/1 104/1 -1/1 2873/1
-0/1 78/1 -1/1 1521/1
-28/1 104/1 -1/1 2900/1
-0/1 80/1 -1/1 1600/1
-30/1 104/1 -1/1 2929/1
-0/1 82/1 -1/1 1681/1
-32/1 104/1 -1/1 2960/1
-0/1 84/1 -1/1 1764/1
-34/1 104/1 -1/1 2993/1
-0/1 86/1 -1/1 1849/1
-36/1 104/1 -1/1 3028/1
-0/1 88/1 -1/1 1936/1
-38/1 104/1 -1/1 3065/1
-0/1 90/1 -1/1 2025/1
-40/1 104/1 -1/1 3104/1
-0/1 92/1 -1/1 2116/1
-42/1 104/1 -1/1 3145/1
-0/1 94/1 -1/1 2209/1
-44/1 104/1 -1/1 3188/1
-0/1 96/1 -1/1 2304/1
-46/1 104/1 -1/1 3233/1
-0/1 98/1 -1/1 2401/1
-48/1 104/1 -1/1 3280/1
-0/1 100/1 -1/1 2500/1
-50/1 104/1 -1/1 3329/1
-0/1 102/1 -1/1 2601/1
-52/1 104/1 -1/1 3380/1
-52/1 0/1 -1/1 676/1
-104/1 2/1 -1/1 2705/1
-54/1 0/1 -1/1 729/1
-104/1 4/1 -1/1 2708/1
-56/1 0/1 -1/1 784/1
-104/1 6/1 -1/1 2713/1
-58/1 0/1 -1/1 841/1
-104/1 8/1 -1/1 2720/1
-60/1 0/1 -1/1 900/1
-104/1 10/1 -1/1 2729/1
-62/1 0/1 -1/1 961/1
-104/1 12/1 -1/1 2740/1
-64/1 0/1 -1/1 1024/1
-104/1 14/1 -1/1 2753/1
-66/1 0/1 -1/1 1089/1
-104/1 16/1 -1/1 2768/1
-68/1 0/1 -1/1 1156/1
-104/1 18/1 -1/1 2785/1
-70/1 0/1 -1/1 1225/1
-104/1 20/1 -1/1 2804/1
-72/1 0/1 -1/1 1296/1
-104/1 22/1 -1/1 2825/1
-74/1 0/1 -1/1 1369/1
-104/1 24/1 -1/1 2848/1
-76/1 0/1 -1/1 1444/1
-104/1 26/1 -1/1 2873/1
-78/1 0/1 -1/1 1521/1
-104/1 28/1 -1/1 2900/1
-80/1 0/1 -1/1 1600/1
-104/1 30/1 -1/1 2929/1
-82/1 0/1 -1/1 1681/1
-104/1 32/1 -1/1 2960/1
-84/1 0/1 -1/1 1764/1
-104/1 34/1 -1/1 2993/1
-86/1 0/1 -1/1 1849/1
-104/1 36/1 -1/1 3028/1
-88/1 0/1 -1/1 1936/1
-104/1 38/1 -1/1 3065/1
-90/1 0/1 -1/1 2025/1
-104/1 40/1 -1/1 3104/1
-92/1 0/1 -1/1 2116/1
-104/1 42/1 -1/1 3145/1
-94/1 0/1 -1/1 2209/1
-104/1 44/1 -1/1 3188/1
-96/1 0/1 -1/1 2304/1
-104/1 46/1 -1/1 3233/1
-98/1 0/1 -1/1 2401/1
-104/1 48/1 -1/1 3280/1
-100/1 0/1 -1/1 2500/1
-104/1 50/1 -1/1 3329/1
-102/1 0/1 -1/1 2601/1
-104/1 52/1 -1/1 3380/1
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane4.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane4.txt
deleted file mode 100644
index 2451fae..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane4.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-2
-0.0 0.0 -1.0 0.0
-1.0 0.0 -1.0 0.0
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane5.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane5.txt
deleted file mode 100644
index 68a40b6..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane5.txt
+++ /dev/null
@@ -1,861 +0,0 @@
-860
-2560/1 7280/1 -1/1 14888000/1
-2560/1 2480/1 -1/1 3176000/1
-160/1 7280/1 -1/1 13256000/1
-4960/1 7280/1 -1/1 19400000/1
-4960/1 7280/1 -1/1 19400000/1
-4960/1 2480/1 -1/1 7688000/1
-4960/1 2480/1 -1/1 7688000/1
-160/1 2480/1 -1/1 1544000/1
-160/1 2480/1 -1/1 1544000/1
-160/1 7280/1 -1/1 13256000/1
-160/1 4880/1 -1/1 5960000/1
-4960/1 4880/1 -1/1 12104000/1
-2560/1 7280/1 -1/1 14888000/1
-2560/1 2480/1 -1/1 3176000/1
-426/1 7280/1 -1/1 13294969/1
-426/1 2480/1 -1/1 1582969/1
-960/1 7280/1 -1/1 13480000/1
-960/1 2480/1 -1/1 1768000/1
-160/1 7012/1 -1/1 12298436/1
-4960/1 7012/1 -1/1 18442436/1
-160/1 3812/1 -1/1 3639236/1
-4960/1 3812/1 -1/1 9783236/1
-160/1 3146/1 -1/1 2480729/1
-4960/1 3146/1 -1/1 8624729/1
-160/1 2812/1 -1/1 1983236/1
-4960/1 2812/1 -1/1 8127236/1
-694/1 2480/1 -1/1 1658009/1
-4960/1 4612/1 -1/1 11468036/1
-426/1 7012/1 -1/1 12337405/1
-2826/1 2480/1 -1/1 3534169/1
-160/1 7278/1 -1/1 13248721/1
-204/1 7274/1 -1/1 13238173/1
-204/1 7274/1 -1/1 13238173/1
-232/1 7270/1 -1/1 13226681/1
-232/1 7270/1 -1/1 13226681/1
-250/1 7264/1 -1/1 13207049/1
-250/1 7264/1 -1/1 13207049/1
-278/1 7252/1 -1/1 13167197/1
-278/1 7252/1 -1/1 13167197/1
-300/1 7238/1 -1/1 13119661/1
-300/1 7238/1 -1/1 13119661/1
-328/1 7220/1 -1/1 13058996/1
-328/1 7220/1 -1/1 13058996/1
-352/1 7198/1 -1/1 12983777/1
-352/1 7198/1 -1/1 12983777/1
-368/1 7178/1 -1/1 12914777/1
-368/1 7178/1 -1/1 12914777/1
-388/1 7152/1 -1/1 12825412/1
-388/1 7152/1 -1/1 12825412/1
-400/1 7128/1 -1/1 12742096/1
-400/1 7128/1 -1/1 12742096/1
-412/1 7102/1 -1/1 12652037/1
-412/1 7102/1 -1/1 12652037/1
-420/1 7074/1 -1/1 12554469/1
-420/1 7074/1 -1/1 12554469/1
-424/1 7046/1 -1/1 12456473/1
-424/1 7046/1 -1/1 12456473/1
-428/1 7012/1 -1/1 12337832/1
-428/1 7012/1 -1/1 12337832/1
-426/1 2744/1 -1/1 1927753/1
-426/1 2744/1 -1/1 1927753/1
-424/1 2718/1 -1/1 1891825/1
-424/1 2718/1 -1/1 1891825/1
-420/1 2690/1 -1/1 1853125/1
-420/1 2690/1 -1/1 1853125/1
-412/1 2660/1 -1/1 1811336/1
-412/1 2660/1 -1/1 1811336/1
-402/1 2634/1 -1/1 1774890/1
-402/1 2634/1 -1/1 1774890/1
-388/1 2608/1 -1/1 1738052/1
-388/1 2608/1 -1/1 1738052/1
-374/1 2586/1 -1/1 1706818/1
-374/1 2586/1 -1/1 1706818/1
-352/1 2560/1 -1/1 1669376/1
-352/1 2560/1 -1/1 1669376/1
-328/1 2538/1 -1/1 1637257/1
-328/1 2538/1 -1/1 1637257/1
-304/1 2522/1 -1/1 1613225/1
-304/1 2522/1 -1/1 1613225/1
-274/1 2506/1 -1/1 1588778/1
-274/1 2506/1 -1/1 1588778/1
-234/1 2490/1 -1/1 1563714/1
-234/1 2490/1 -1/1 1563714/1
-206/1 2482/1 -1/1 1550690/1
-206/1 2482/1 -1/1 1550690/1
-160/1 2480/1 -1/1 1544000/1
-160/1 2480/1 -1/1 1544000/1
-2774/1 2480/1 -1/1 3461369/1
-2774/1 2480/1 -1/1 3461369/1
-2792/1 2544/1 -1/1 3566800/1
-2792/1 2544/1 -1/1 3566800/1
-2820/1 2640/1 -1/1 3730500/1
-2820/1 2640/1 -1/1 3730500/1
-2862/1 2852/1 -1/1 4081237/1
-2862/1 2852/1 -1/1 4081237/1
-2886/1 3058/1 -1/1 4420090/1
-2886/1 3058/1 -1/1 4420090/1
-2894/1 3208/1 -1/1 4666625/1
-2894/1 3208/1 -1/1 4666625/1
-2892/1 3336/1 -1/1 4873140/1
-2892/1 3336/1 -1/1 4873140/1
-2888/1 3248/1 -1/1 4722512/1
-2888/1 3248/1 -1/1 4722512/1
-2870/1 3170/1 -1/1 4571450/1
-2870/1 3170/1 -1/1 4571450/1
-2848/1 3116/1 -1/1 4455140/1
-2848/1 3116/1 -1/1 4455140/1
-2818/1 3058/1 -1/1 4323122/1
-2818/1 3058/1 -1/1 4323122/1
-2772/1 2994/1 -1/1 4162005/1
-2772/1 2994/1 -1/1 4162005/1
-2730/1 2950/1 -1/1 4038850/1
-2730/1 2950/1 -1/1 4038850/1
-2692/1 2918/1 -1/1 3940397/1
-2692/1 2918/1 -1/1 3940397/1
-2652/1 2888/1 -1/1 3843412/1
-2652/1 2888/1 -1/1 3843412/1
-2594/1 2858/1 -1/1 3724250/1
-2594/1 2858/1 -1/1 3724250/1
-2542/1 2836/1 -1/1 3626165/1
-2542/1 2836/1 -1/1 3626165/1
-2500/1 2826/1 -1/1 3559069/1
-2500/1 2826/1 -1/1 3559069/1
-2446/1 2814/1 -1/1 3475378/1
-2446/1 2814/1 -1/1 3475378/1
-2382/1 2812/1 -1/1 3395317/1
-2382/1 2812/1 -1/1 3395317/1
-960/1 2812/1 -1/1 2207236/1
-960/1 2812/1 -1/1 2207236/1
-960/1 7012/1 -1/1 12522436/1
-960/1 7012/1 -1/1 12522436/1
-962/1 7048/1 -1/1 12649937/1
-962/1 7048/1 -1/1 12649937/1
-974/1 7094/1 -1/1 12818378/1
-974/1 7094/1 -1/1 12818378/1
-984/1 7124/1 -1/1 12929908/1
-984/1 7124/1 -1/1 12929908/1
-998/1 7150/1 -1/1 13029626/1
-998/1 7150/1 -1/1 13029626/1
-1016/1 7176/1 -1/1 13131808/1
-1016/1 7176/1 -1/1 13131808/1
-1036/1 7198/1 -1/1 13221125/1
-1036/1 7198/1 -1/1 13221125/1
-1058/1 7220/1 -1/1 13311941/1
-1058/1 7220/1 -1/1 13311941/1
-1082/1 7238/1 -1/1 13389842/1
-1082/1 7238/1 -1/1 13389842/1
-1112/1 7252/1 -1/1 13457012/1
-1112/1 7252/1 -1/1 13457012/1
-1140/1 7266/1 -1/1 13523589/1
-1140/1 7266/1 -1/1 13523589/1
-1172/1 7274/1 -1/1 13571165/1
-1172/1 7274/1 -1/1 13571165/1
-1218/1 7280/1 -1/1 13620481/1
-1218/1 7280/1 -1/1 13620481/1
-160/1 7278/1 -1/1 13248721/1
--12318/1 7280/1 -1/1 51182881/1
--7518/1 7280/1 -1/1 27379681/1
--7518/1 7280/1 -1/1 27379681/1
--7518/1 2480/1 -1/1 15667681/1
--7518/1 2480/1 -1/1 15667681/1
--12318/1 2480/1 -1/1 39470881/1
--12318/1 2480/1 -1/1 39470881/1
--12318/1 7280/1 -1/1 51182881/1
--12318/1 4880/1 -1/1 43886881/1
--7518/1 4880/1 -1/1 20083681/1
--9918/1 7280/1 -1/1 37841281/1
--9918/1 2480/1 -1/1 26129281/1
--9918/1 4880/1 -1/1 30545281/1
--8538/1 2480/1 -1/1 19761961/1
--9918/1 4880/1 -1/1 30545281/1
--11298/1 7280/1 -1/1 45160801/1
--9918/1 4880/1 -1/1 30545281/1
--7518/1 6260/1 -1/1 23926981/1
--9918/1 4880/1 -1/1 30545281/1
--12318/1 3500/1 -1/1 40995781/1
--8408/1 7286/1 -1/1 30945065/1
--8408/1 2196/1 -1/1 18879220/1
--8940/1 5040/1 -1/1 26331300/1
--8940/1 2196/1 -1/1 21186504/1
--9918/1 4614/1 -1/1 29913930/1
--7518/1 4614/1 -1/1 19452330/1
--8450/1 6698/1 -1/1 29066426/1
--8416/1 6984/1 -1/1 29901328/1
--8416/1 6984/1 -1/1 29901328/1
--8404/1 7282/1 -1/1 30913685/1
--8404/1 7282/1 -1/1 30913685/1
--8634/1 7280/1 -1/1 31886089/1
--8634/1 7280/1 -1/1 31886089/1
--8754/1 7314/1 -1/1 32531778/1
--8754/1 7314/1 -1/1 32531778/1
--9138/1 7392/1 -1/1 34536177/1
--9138/1 7392/1 -1/1 34536177/1
--9558/1 7440/1 -1/1 36677241/1
--9558/1 7440/1 -1/1 36677241/1
--9786/1 7448/1 -1/1 37809625/1
--9786/1 7448/1 -1/1 37809625/1
--10004/1 7440/1 -1/1 38858404/1
--10004/1 7440/1 -1/1 38858404/1
--10220/1 7414/1 -1/1 39853949/1
--10220/1 7414/1 -1/1 39853949/1
--10438/1 7372/1 -1/1 40824557/1
--10438/1 7372/1 -1/1 40824557/1
--10648/1 7312/1 -1/1 41711312/1
--10648/1 7312/1 -1/1 41711312/1
--10852/1 7236/1 -1/1 42531400/1
--10852/1 7236/1 -1/1 42531400/1
--11034/1 7154/1 -1/1 43232218/1
--11034/1 7154/1 -1/1 43232218/1
--11244/1 7038/1 -1/1 43990245/1
--11244/1 7038/1 -1/1 43990245/1
--11432/1 6912/1 -1/1 44616592/1
--11432/1 6912/1 -1/1 44616592/1
--11598/1 6780/1 -1/1 45120501/1
--11598/1 6780/1 -1/1 45120501/1
--11764/1 6626/1 -1/1 45573893/1
--11764/1 6626/1 -1/1 45573893/1
--11912/1 6468/1 -1/1 45932692/1
--11912/1 6468/1 -1/1 45932692/1
--12048/1 6298/1 -1/1 46204777/1
--12048/1 6298/1 -1/1 46204777/1
--12168/1 6116/1 -1/1 46366420/1
--12168/1 6116/1 -1/1 46366420/1
--12276/1 5926/1 -1/1 46454413/1
--12276/1 5926/1 -1/1 46454413/1
--12370/1 5720/1 -1/1 46433825/1
--12370/1 5720/1 -1/1 46433825/1
--12446/1 5514/1 -1/1 46326778/1
--12446/1 5514/1 -1/1 46326778/1
--12504/1 5308/1 -1/1 46131220/1
--12504/1 5308/1 -1/1 46131220/1
--12540/1 5126/1 -1/1 45881869/1
--12540/1 5126/1 -1/1 45881869/1
--12564/1 4938/1 -1/1 45559485/1
--12564/1 4938/1 -1/1 45559485/1
--12570/1 4742/1 -1/1 45122866/1
--12570/1 4742/1 -1/1 45122866/1
--12564/1 4558/1 -1/1 44657365/1
--12564/1 4558/1 -1/1 44657365/1
--12542/1 4372/1 -1/1 44104037/1
--12542/1 4372/1 -1/1 44104037/1
--12504/1 4184/1 -1/1 43463968/1
--12504/1 4184/1 -1/1 43463968/1
--12452/1 4000/1 -1/1 42763076/1
--12452/1 4000/1 -1/1 42763076/1
--12382/1 3812/1 -1/1 41961317/1
--12382/1 3812/1 -1/1 41961317/1
--12306/1 3650/1 -1/1 41190034/1
--12306/1 3650/1 -1/1 41190034/1
--12212/1 3480/1 -1/1 40310836/1
--12212/1 3480/1 -1/1 40310836/1
--12106/1 3322/1 -1/1 39397730/1
--12106/1 3322/1 -1/1 39397730/1
--11992/1 3178/1 -1/1 38476937/1
--11992/1 3178/1 -1/1 38476937/1
--11866/1 3040/1 -1/1 37510889/1
--11866/1 3040/1 -1/1 37510889/1
--11722/1 2906/1 -1/1 36462530/1
--11722/1 2906/1 -1/1 36462530/1
--11576/1 2794/1 -1/1 35452553/1
--11576/1 2794/1 -1/1 35452553/1
--11412/1 2680/1 -1/1 34354036/1
--11412/1 2680/1 -1/1 34354036/1
--11248/1 2590/1 -1/1 33306401/1
--11248/1 2590/1 -1/1 33306401/1
--11074/1 2510/1 -1/1 32233394/1
--11074/1 2510/1 -1/1 32233394/1
--10896/1 2446/1 -1/1 31176433/1
--10896/1 2446/1 -1/1 31176433/1
--10708/1 2392/1 -1/1 30095732/1
--10708/1 2392/1 -1/1 30095732/1
--10524/1 2354/1 -1/1 29073973/1
--10524/1 2354/1 -1/1 29073973/1
--10324/1 2332/1 -1/1 28005800/1
--10324/1 2332/1 -1/1 28005800/1
--10010/1 2320/1 -1/1 26395625/1
--10010/1 2320/1 -1/1 26395625/1
--9920/1 2316/1 -1/1 25942564/1
--9920/1 2316/1 -1/1 25942564/1
--9518/1 2330/1 -1/1 24005306/1
--9518/1 2330/1 -1/1 24005306/1
--9140/1 2374/1 -1/1 22293869/1
--9140/1 2374/1 -1/1 22293869/1
--8748/1 2454/1 -1/1 20637405/1
--8748/1 2454/1 -1/1 20637405/1
--8408/1 2550/1 -1/1 19299241/1
--8408/1 2550/1 -1/1 19299241/1
--8408/1 4362/1 -1/1 22430377/1
--8408/1 4362/1 -1/1 22430377/1
--8402/1 4396/1 -1/1 22479605/1
--8402/1 4396/1 -1/1 22479605/1
--8394/1 4428/1 -1/1 22516605/1
--8394/1 4428/1 -1/1 22516605/1
--8384/1 4456/1 -1/1 22536848/1
--8384/1 4456/1 -1/1 22536848/1
--8368/1 4486/1 -1/1 22536905/1
--8368/1 4486/1 -1/1 22536905/1
--8350/1 4512/1 -1/1 22520161/1
--8350/1 4512/1 -1/1 22520161/1
--8328/1 4536/1 -1/1 22482720/1
--8328/1 4536/1 -1/1 22482720/1
--8304/1 4556/1 -1/1 22428388/1
--8304/1 4556/1 -1/1 22428388/1
--8282/1 4574/1 -1/1 22378250/1
--8282/1 4574/1 -1/1 22378250/1
--8254/1 4588/1 -1/1 22294565/1
--8254/1 4588/1 -1/1 22294565/1
--8228/1 4600/1 -1/1 22214996/1
--8228/1 4600/1 -1/1 22214996/1
--8196/1 4608/1 -1/1 22102020/1
--8196/1 4608/1 -1/1 22102020/1
--8140/1 4614/1 -1/1 21887149/1
--8140/1 4614/1 -1/1 21887149/1
--9200/1 4614/1 -1/1 26482249/1
--9200/1 4614/1 -1/1 26482249/1
--9160/1 4608/1 -1/1 26284816/1
--9160/1 4608/1 -1/1 26284816/1
--9126/1 4600/1 -1/1 26110969/1
--9126/1 4600/1 -1/1 26110969/1
--9106/1 4594/1 -1/1 26006018/1
--9106/1 4594/1 -1/1 26006018/1
--9070/1 4576/1 -1/1 25801169/1
--9070/1 4576/1 -1/1 25801169/1
--9052/1 4562/1 -1/1 25687637/1
--9052/1 4562/1 -1/1 25687637/1
--9032/1 4548/1 -1/1 25565332/1
--9032/1 4548/1 -1/1 25565332/1
--9014/1 4530/1 -1/1 25443274/1
--9014/1 4530/1 -1/1 25443274/1
--9002/1 4518/1 -1/1 25362082/1
--9002/1 4518/1 -1/1 25362082/1
--8988/1 4498/1 -1/1 25254037/1
--8988/1 4498/1 -1/1 25254037/1
--8974/1 4478/1 -1/1 25146290/1
--8974/1 4478/1 -1/1 25146290/1
--8964/1 4456/1 -1/1 25052308/1
--8964/1 4456/1 -1/1 25052308/1
--8956/1 4438/1 -1/1 24976445/1
--8956/1 4438/1 -1/1 24976445/1
--8948/1 4410/1 -1/1 24878701/1
--8948/1 4410/1 -1/1 24878701/1
--8940/1 4366/1 -1/1 24746389/1
--8940/1 4366/1 -1/1 24746389/1
--8940/1 2738/1 -1/1 21855061/1
--8940/1 2738/1 -1/1 21855061/1
--9176/1 2690/1 -1/1 22858769/1
--9176/1 2690/1 -1/1 22858769/1
--9538/1 2646/1 -1/1 24493690/1
--9538/1 2646/1 -1/1 24493690/1
--9668/1 2642/1 -1/1 25112597/1
--9668/1 2642/1 -1/1 25112597/1
--9918/1 2632/1 -1/1 26323537/1
--9918/1 2632/1 -1/1 26323537/1
--10168/1 2644/1 -1/1 27594740/1
--10168/1 2644/1 -1/1 27594740/1
--10248/1 2658/1 -1/1 28021617/1
--10248/1 2658/1 -1/1 28021617/1
--10428/1 2708/1 -1/1 29019112/1
--10428/1 2708/1 -1/1 29019112/1
--10610/1 2774/1 -1/1 30066794/1
--10610/1 2774/1 -1/1 30066794/1
--10774/1 2852/1 -1/1 31053245/1
--10774/1 2852/1 -1/1 31053245/1
--10948/1 2948/1 -1/1 32137352/1
--10948/1 2948/1 -1/1 32137352/1
--11106/1 3054/1 -1/1 33167538/1
--11106/1 3054/1 -1/1 33167538/1
--11256/1 3170/1 -1/1 34186609/1
--11256/1 3170/1 -1/1 34186609/1
--11398/1 3302/1 -1/1 35204402/1
--11398/1 3302/1 -1/1 35204402/1
--11520/1 3436/1 -1/1 36129124/1
--11520/1 3436/1 -1/1 36129124/1
--11642/1 3588/1 -1/1 37102477/1
--11642/1 3588/1 -1/1 37102477/1
--11750/1 3748/1 -1/1 38027501/1
--11750/1 3748/1 -1/1 38027501/1
--11838/1 3908/1 -1/1 38852677/1
--11838/1 3908/1 -1/1 38852677/1
--11920/1 4084/1 -1/1 39691364/1
--11920/1 4084/1 -1/1 39691364/1
--11986/1 4262/1 -1/1 40457210/1
--11986/1 4262/1 -1/1 40457210/1
--12038/1 4448/1 -1/1 41174537/1
--12038/1 4448/1 -1/1 41174537/1
--12076/1 4638/1 -1/1 41835205/1
--12076/1 4638/1 -1/1 41835205/1
--12100/1 4830/1 -1/1 42434725/1
--12100/1 4830/1 -1/1 42434725/1
--12106/1 5018/1 -1/1 42933890/1
--12106/1 5018/1 -1/1 42933890/1
--12096/1 5212/1 -1/1 43369540/1
--12096/1 5212/1 -1/1 43369540/1
--12074/1 5396/1 -1/1 43724573/1
--12074/1 5396/1 -1/1 43724573/1
--12038/1 5580/1 -1/1 44012461/1
--12038/1 5580/1 -1/1 44012461/1
--11988/1 5758/1 -1/1 44216677/1
--11988/1 5758/1 -1/1 44216677/1
--11962/1 5828/1 -1/1 44263757/1
--11962/1 5828/1 -1/1 44263757/1
--11924/1 5904/1 -1/1 44259748/1
--11924/1 5904/1 -1/1 44259748/1
--11838/1 6060/1 -1/1 44215461/1
--11838/1 6060/1 -1/1 44215461/1
--11746/1 6202/1 -1/1 44108330/1
--11746/1 6202/1 -1/1 44108330/1
--11634/1 6342/1 -1/1 43892730/1
--11634/1 6342/1 -1/1 43892730/1
--11514/1 6474/1 -1/1 43621218/1
--11514/1 6474/1 -1/1 43621218/1
--11380/1 6596/1 -1/1 43252904/1
--11380/1 6596/1 -1/1 43252904/1
--11246/1 6700/1 -1/1 42840629/1
--11246/1 6700/1 -1/1 42840629/1
--11100/1 6798/1 -1/1 42355701/1
--11100/1 6798/1 -1/1 42355701/1
--10940/1 6890/1 -1/1 41788925/1
--10940/1 6890/1 -1/1 41788925/1
--10788/1 6960/1 -1/1 41205636/1
--10788/1 6960/1 -1/1 41205636/1
--10616/1 7024/1 -1/1 40509008/1
--10616/1 7024/1 -1/1 40509008/1
--10446/1 7072/1 -1/1 39783025/1
--10446/1 7072/1 -1/1 39783025/1
--10274/1 7104/1 -1/1 39005473/1
--10274/1 7104/1 -1/1 39005473/1
--10116/1 7126/1 -1/1 38278333/1
--10116/1 7126/1 -1/1 38278333/1
--9918/1 7134/1 -1/1 37315170/1
--9918/1 7134/1 -1/1 37315170/1
--9658/1 7126/1 -1/1 36014210/1
--9658/1 7126/1 -1/1 36014210/1
--9544/1 7120/1 -1/1 35445584/1
--9544/1 7120/1 -1/1 35445584/1
--9186/1 7078/1 -1/1 33620170/1
--9186/1 7078/1 -1/1 33620170/1
--8816/1 7004/1 -1/1 31694468/1
--8816/1 7004/1 -1/1 31694468/1
--8638/1 6954/1 -1/1 30743290/1
--8638/1 6954/1 -1/1 30743290/1
--8588/1 6932/1 -1/1 30451592/1
--8588/1 6932/1 -1/1 30451592/1
--8536/1 6896/1 -1/1 30104528/1
--8536/1 6896/1 -1/1 30104528/1
--8500/1 6856/1 -1/1 29813684/1
--8500/1 6856/1 -1/1 29813684/1
--8478/1 6816/1 -1/1 29583585/1
--8478/1 6816/1 -1/1 29583585/1
--8458/1 6756/1 -1/1 29295325/1
--8458/1 6756/1 -1/1 29295325/1
--8450/1 6698/1 -1/1 29066426/1
--5998/1 7280/1 -1/1 22243601/1
--1198/1 7280/1 -1/1 13608401/1
--1198/1 7280/1 -1/1 13608401/1
--1198/1 2480/1 -1/1 1896401/1
--1198/1 2480/1 -1/1 1896401/1
--5998/1 2480/1 -1/1 10531601/1
--5998/1 2480/1 -1/1 10531601/1
--5998/1 7280/1 -1/1 22243601/1
--5998/1 4880/1 -1/1 14947601/1
--1198/1 4880/1 -1/1 6312401/1
--3598/1 7280/1 -1/1 16486001/1
--3598/1 2480/1 -1/1 4774001/1
--5998/1 4614/1 -1/1 14316250/1
--1198/1 4614/1 -1/1 5681050/1
--5998/1 4346/1 -1/1 13715930/1
--1198/1 4346/1 -1/1 5080730/1
--4154/1 7280/1 -1/1 17563529/1
--2146/1 2356/1 -1/1 2539013/1
--3794/1 7816/1 -1/1 18871073/1
--1620/1 2480/1 -1/1 2193700/1
--5554/1 2480/1 -1/1 9249329/1
--3662/1 7856/1 -1/1 18781745/1
--5154/1 2480/1 -1/1 8178529/1
--3464/1 7280/1 -1/1 16249424/1
--3730/1 7662/1 -1/1 18154786/1
--5410/1 2894/1 -1/1 9410834/1
--5410/1 2894/1 -1/1 9410834/1
--5450/1 2810/1 -1/1 9399650/1
--5450/1 2810/1 -1/1 9399650/1
--5468/1 2776/1 -1/1 9401300/1
--5468/1 2776/1 -1/1 9401300/1
--5488/1 2746/1 -1/1 9414665/1
--5488/1 2746/1 -1/1 9414665/1
--5524/1 2700/1 -1/1 9451144/1
--5524/1 2700/1 -1/1 9451144/1
--5544/1 2678/1 -1/1 9476905/1
--5544/1 2678/1 -1/1 9476905/1
--5566/1 2656/1 -1/1 9508673/1
--5566/1 2656/1 -1/1 9508673/1
--5590/1 2634/1 -1/1 9546514/1
--5590/1 2634/1 -1/1 9546514/1
--5614/1 2614/1 -1/1 9587498/1
--5614/1 2614/1 -1/1 9587498/1
--5654/1 2584/1 -1/1 9661193/1
--5654/1 2584/1 -1/1 9661193/1
--5708/1 2554/1 -1/1 9776045/1
--5708/1 2554/1 -1/1 9776045/1
--5754/1 2530/1 -1/1 9877354/1
--5754/1 2530/1 -1/1 9877354/1
--5804/1 2510/1 -1/1 9996629/1
--5804/1 2510/1 -1/1 9996629/1
--5852/1 2498/1 -1/1 10121477/1
--5852/1 2498/1 -1/1 10121477/1
--5906/1 2488/1 -1/1 10267745/1
--5906/1 2488/1 -1/1 10267745/1
--5968/1 2480/1 -1/1 10441856/1
--5968/1 2480/1 -1/1 10441856/1
--4754/1 2480/1 -1/1 7187729/1
--4754/1 2480/1 -1/1 7187729/1
--4828/1 2484/1 -1/1 7369960/1
--4828/1 2484/1 -1/1 7369960/1
--4880/1 2500/1 -1/1 7516100/1
--4880/1 2500/1 -1/1 7516100/1
--4918/1 2520/1 -1/1 7634281/1
--4918/1 2520/1 -1/1 7634281/1
--4948/1 2542/1 -1/1 7736117/1
--4948/1 2542/1 -1/1 7736117/1
--4976/1 2570/1 -1/1 7841369/1
--4976/1 2570/1 -1/1 7841369/1
--5002/1 2602/1 -1/1 7947602/1
--5002/1 2602/1 -1/1 7947602/1
--5020/1 2636/1 -1/1 8037224/1
--5020/1 2636/1 -1/1 8037224/1
--5034/1 2676/1 -1/1 8125533/1
--5034/1 2676/1 -1/1 8125533/1
--5044/1 2722/1 -1/1 8212805/1
--5044/1 2722/1 -1/1 8212805/1
--5046/1 2750/1 -1/1 8256154/1
--5046/1 2750/1 -1/1 8256154/1
--5040/1 2788/1 -1/1 8293636/1
--5040/1 2788/1 -1/1 8293636/1
--5028/1 2840/1 -1/1 8336596/1
--5028/1 2840/1 -1/1 8336596/1
--3784/1 6374/1 -1/1 13736633/1
--3784/1 6374/1 -1/1 13736633/1
--2270/1 2662/1 -1/1 3059786/1
--2270/1 2662/1 -1/1 3059786/1
--2262/1 2620/1 -1/1 2995261/1
--2262/1 2620/1 -1/1 2995261/1
--2266/1 2592/1 -1/1 2963305/1
--2266/1 2592/1 -1/1 2963305/1
--2272/1 2568/1 -1/1 2939152/1
--2272/1 2568/1 -1/1 2939152/1
--2282/1 2546/1 -1/1 2922410/1
--2282/1 2546/1 -1/1 2922410/1
--2296/1 2528/1 -1/1 2915600/1
--2296/1 2528/1 -1/1 2915600/1
--2314/1 2510/1 -1/1 2913674/1
--2314/1 2510/1 -1/1 2913674/1
--2336/1 2496/1 -1/1 2921728/1
--2336/1 2496/1 -1/1 2921728/1
--2362/1 2486/1 -1/1 2939810/1
--2362/1 2486/1 -1/1 2939810/1
--2396/1 2480/1 -1/1 2972804/1
--2396/1 2480/1 -1/1 2972804/1
--1230/1 2480/1 -1/1 1915825/1
--1230/1 2480/1 -1/1 1915825/1
--1294/1 2486/1 -1/1 1963658/1
--1294/1 2486/1 -1/1 1963658/1
--1344/1 2498/1 -1/1 2011585/1
--1344/1 2498/1 -1/1 2011585/1
--1392/1 2510/1 -1/1 2059441/1
--1392/1 2510/1 -1/1 2059441/1
--1440/1 2528/1 -1/1 2116096/1
--1440/1 2528/1 -1/1 2116096/1
--1486/1 2550/1 -1/1 2177674/1
--1486/1 2550/1 -1/1 2177674/1
--1528/1 2572/1 -1/1 2237492/1
--1528/1 2572/1 -1/1 2237492/1
--1568/1 2600/1 -1/1 2304656/1
--1568/1 2600/1 -1/1 2304656/1
--1608/1 2632/1 -1/1 2378272/1
--1608/1 2632/1 -1/1 2378272/1
--1644/1 2664/1 -1/1 2449908/1
--1644/1 2664/1 -1/1 2449908/1
--1678/1 2700/1 -1/1 2526421/1
--1678/1 2700/1 -1/1 2526421/1
--1708/1 2740/1 -1/1 2606216/1
--1708/1 2740/1 -1/1 2606216/1
--1736/1 2782/1 -1/1 2688305/1
--1736/1 2782/1 -1/1 2688305/1
--1760/1 2824/1 -1/1 2768144/1
--1760/1 2824/1 -1/1 2768144/1
--3730/1 7662/1 -1/1 18154786/1
--4506/1 4346/1 -1/1 9797938/1
--4412/1 4614/1 -1/1 10188685/1
--4412/1 4614/1 -1/1 10188685/1
--3076/1 4614/1 -1/1 7687693/1
--3076/1 4614/1 -1/1 7687693/1
--2966/1 4346/1 -1/1 6921218/1
--2966/1 4346/1 -1/1 6921218/1
--4506/1 4346/1 -1/1 9797938/1
--18478/1 7280/1 -1/1 98608721/1
--13678/1 7280/1 -1/1 60021521/1
--13678/1 7280/1 -1/1 60021521/1
--13678/1 2480/1 -1/1 48309521/1
--13678/1 2480/1 -1/1 48309521/1
--18478/1 2480/1 -1/1 86896721/1
--18478/1 2480/1 -1/1 86896721/1
--18478/1 7280/1 -1/1 98608721/1
--18478/1 4880/1 -1/1 91312721/1
--13678/1 4880/1 -1/1 52725521/1
--16078/1 7280/1 -1/1 77875121/1
--16078/1 2480/1 -1/1 66163121/1
--16078/1 4880/1 -1/1 70579121/1
--14698/1 2480/1 -1/1 55545401/1
--16078/1 4880/1 -1/1 70579121/1
--17458/1 7280/1 -1/1 89445041/1
--16078/1 4880/1 -1/1 70579121/1
--13678/1 6260/1 -1/1 56568821/1
--16078/1 4880/1 -1/1 70579121/1
--18478/1 3500/1 -1/1 88421621/1
--16078/1 2480/1 -1/1 66163121/1
--13678/1 4880/1 -1/1 52725521/1
--14610/1 6698/1 -1/1 64578826/1
--14576/1 6984/1 -1/1 65309008/1
--14576/1 6984/1 -1/1 65309008/1
--14564/1 7282/1 -1/1 66284405/1
--14564/1 7282/1 -1/1 66284405/1
--14794/1 7280/1 -1/1 67965209/1
--14794/1 7280/1 -1/1 67965209/1
--14914/1 7314/1 -1/1 68980498/1
--14914/1 7314/1 -1/1 68980498/1
--15298/1 7392/1 -1/1 72167617/1
--15298/1 7392/1 -1/1 72167617/1
--15718/1 7440/1 -1/1 75602281/1
--15718/1 7440/1 -1/1 75602281/1
--15946/1 7448/1 -1/1 77436905/1
--15946/1 7448/1 -1/1 77436905/1
--16164/1 7440/1 -1/1 79157124/1
--16164/1 7440/1 -1/1 79157124/1
--16380/1 7414/1 -1/1 80817949/1
--16380/1 7414/1 -1/1 80817949/1
--16598/1 7372/1 -1/1 82459997/1
--16598/1 7372/1 -1/1 82459997/1
--16808/1 7312/1 -1/1 83993552/1
--16808/1 7312/1 -1/1 83993552/1
--17012/1 7236/1 -1/1 85441960/1
--17012/1 7236/1 -1/1 85441960/1
--17194/1 7154/1 -1/1 86703338/1
--17194/1 7154/1 -1/1 86703338/1
--17404/1 7038/1 -1/1 88108165/1
--17404/1 7038/1 -1/1 88108165/1
--17592/1 6912/1 -1/1 89313552/1
--17592/1 6912/1 -1/1 89313552/1
--17758/1 6780/1 -1/1 90328741/1
--17758/1 6780/1 -1/1 90328741/1
--17924/1 6626/1 -1/1 91293413/1
--17924/1 6626/1 -1/1 91293413/1
--18072/1 6468/1 -1/1 92108052/1
--18072/1 6468/1 -1/1 92108052/1
--18208/1 6298/1 -1/1 92799017/1
--18208/1 6298/1 -1/1 92799017/1
--18328/1 6116/1 -1/1 93330260/1
--18328/1 6116/1 -1/1 93330260/1
--18436/1 5926/1 -1/1 93750893/1
--18436/1 5926/1 -1/1 93750893/1
--18530/1 5720/1 -1/1 94019825/1
--18530/1 5720/1 -1/1 94019825/1
--18606/1 5514/1 -1/1 94146858/1
--18606/1 5514/1 -1/1 94146858/1
--18664/1 5308/1 -1/1 94129940/1
--18664/1 5308/1 -1/1 94129940/1
--18700/1 5126/1 -1/1 93991469/1
--18700/1 5126/1 -1/1 93991469/1
--18724/1 4938/1 -1/1 93743005/1
--18724/1 4938/1 -1/1 93743005/1
--18730/1 4742/1 -1/1 93324866/1
--18730/1 4742/1 -1/1 93324866/1
--18724/1 4558/1 -1/1 92840885/1
--18724/1 4558/1 -1/1 92840885/1
--18702/1 4372/1 -1/1 92219797/1
--18702/1 4372/1 -1/1 92219797/1
--18664/1 4184/1 -1/1 91462688/1
--18664/1 4184/1 -1/1 91462688/1
--18612/1 4000/1 -1/1 90601636/1
--18612/1 4000/1 -1/1 90601636/1
--18542/1 3812/1 -1/1 89584277/1
--18542/1 3812/1 -1/1 89584277/1
--18466/1 3650/1 -1/1 88578914/1
--18466/1 3650/1 -1/1 88578914/1
--18372/1 3480/1 -1/1 87410196/1
--18372/1 3480/1 -1/1 87410196/1
--18266/1 3322/1 -1/1 86170610/1
--18266/1 3322/1 -1/1 86170610/1
--18152/1 3178/1 -1/1 84898697/1
--18152/1 3178/1 -1/1 84898697/1
--17882/1 2906/1 -1/1 82052690/1
--18026/1 3040/1 -1/1 83544569/1
--17882/1 2906/1 -1/1 82052690/1
--17882/1 2906/1 -1/1 82052690/1
--17736/1 2794/1 -1/1 80593033/1
--17736/1 2794/1 -1/1 80593033/1
--17572/1 2680/1 -1/1 78989396/1
--17572/1 2680/1 -1/1 78989396/1
--17408/1 2590/1 -1/1 77436641/1
--17408/1 2590/1 -1/1 77436641/1
--17234/1 2510/1 -1/1 75827714/1
--17234/1 2510/1 -1/1 75827714/1
--17056/1 2446/1 -1/1 74222513/1
--17056/1 2446/1 -1/1 74222513/1
--16868/1 2392/1 -1/1 72562772/1
--16868/1 2392/1 -1/1 72562772/1
--16684/1 2354/1 -1/1 70974293/1
--16684/1 2354/1 -1/1 70974293/1
--16484/1 2332/1 -1/1 69290120/1
--16484/1 2332/1 -1/1 69290120/1
--16170/1 2320/1 -1/1 66712825/1
--16170/1 2320/1 -1/1 66712825/1
--16080/1 2316/1 -1/1 65982564/1
--16080/1 2316/1 -1/1 65982564/1
--15678/1 2330/1 -1/1 62807146/1
--15678/1 2330/1 -1/1 62807146/1
--15300/1 2374/1 -1/1 59931469/1
--15300/1 2374/1 -1/1 59931469/1
--14700/1 2510/1 -1/1 55597525/1
--14700/1 2510/1 -1/1 55597525/1
--14908/1 2454/1 -1/1 57067645/1
--14908/1 2454/1 -1/1 57067645/1
--14700/1 2510/1 -1/1 55597525/1
--14700/1 2510/1 -1/1 55597525/1
--14680/1 2590/1 -1/1 55552625/1
--14680/1 2590/1 -1/1 55552625/1
--14618/1 2894/1 -1/1 55515290/1
--14618/1 2894/1 -1/1 55515290/1
--14584/1 3196/1 -1/1 55726868/1
--14584/1 3196/1 -1/1 55726868/1
--14580/1 3242/1 -1/1 55771741/1
--14580/1 3242/1 -1/1 55771741/1
--14596/1 3182/1 -1/1 55792085/1
--14596/1 3182/1 -1/1 55792085/1
--14618/1 3116/1 -1/1 55848845/1
--14618/1 3116/1 -1/1 55848845/1
--14658/1 3034/1 -1/1 56015530/1
--14658/1 3034/1 -1/1 56015530/1
--14692/1 2988/1 -1/1 56195752/1
--14692/1 2988/1 -1/1 56195752/1
--14732/1 2938/1 -1/1 56415917/1
--14732/1 2938/1 -1/1 56415917/1
--14796/1 2878/1 -1/1 56801125/1
--14796/1 2878/1 -1/1 56801125/1
--14834/1 2846/1 -1/1 57036818/1
--14834/1 2846/1 -1/1 57036818/1
--14898/1 2808/1 -1/1 57458817/1
--14898/1 2808/1 -1/1 57458817/1
--15020/1 2754/1 -1/1 58296229/1
--14952/1 2782/1 -1/1 57825457/1
--15020/1 2754/1 -1/1 58296229/1
--15020/1 2754/1 -1/1 58296229/1
--15084/1 2740/1 -1/1 58758664/1
--15084/1 2740/1 -1/1 58758664/1
--15336/1 2690/1 -1/1 60607249/1
--15336/1 2690/1 -1/1 60607249/1
--15698/1 2646/1 -1/1 63357130/1
--15698/1 2646/1 -1/1 63357130/1
--15828/1 2642/1 -1/1 64376437/1
--15828/1 2642/1 -1/1 64376437/1
--16078/1 2632/1 -1/1 66357377/1
--16078/1 2632/1 -1/1 66357377/1
--16328/1 2644/1 -1/1 68398580/1
--16328/1 2644/1 -1/1 68398580/1
--16408/1 2658/1 -1/1 69071857/1
--16408/1 2658/1 -1/1 69071857/1
--16588/1 2708/1 -1/1 70623752/1
--16588/1 2708/1 -1/1 70623752/1
--16770/1 2774/1 -1/1 72231994/1
--16770/1 2774/1 -1/1 72231994/1
--16934/1 2852/1 -1/1 73723565/1
--16934/1 2852/1 -1/1 73723565/1
--17108/1 2948/1 -1/1 75343592/1
--17108/1 2948/1 -1/1 75343592/1
--17266/1 3054/1 -1/1 76860418/1
--17266/1 3054/1 -1/1 76860418/1
--17416/1 3170/1 -1/1 78341489/1
--17416/1 3170/1 -1/1 78341489/1
--17558/1 3302/1 -1/1 79796642/1
--17558/1 3302/1 -1/1 79796642/1
--17680/1 3436/1 -1/1 81097124/1
--17680/1 3436/1 -1/1 81097124/1
--17802/1 3588/1 -1/1 82446237/1
--17802/1 3588/1 -1/1 82446237/1
--17910/1 3748/1 -1/1 83703901/1
--17910/1 3748/1 -1/1 83703901/1
--17998/1 3908/1 -1/1 84800117/1
--17998/1 3908/1 -1/1 84800117/1
--18080/1 4084/1 -1/1 85891364/1
--18080/1 4084/1 -1/1 85891364/1
--18146/1 4262/1 -1/1 86860490/1
--18146/1 4262/1 -1/1 86860490/1
--18198/1 4448/1 -1/1 87737977/1
--18198/1 4448/1 -1/1 87737977/1
--18236/1 4638/1 -1/1 88515685/1
--18236/1 4638/1 -1/1 88515685/1
--18260/1 4830/1 -1/1 89189125/1
--18260/1 4830/1 -1/1 89189125/1
--18266/1 5018/1 -1/1 89706770/1
--18266/1 5018/1 -1/1 89706770/1
--18256/1 5212/1 -1/1 90111620/1
--18256/1 5212/1 -1/1 90111620/1
--18234/1 5396/1 -1/1 90398893/1
--18234/1 5396/1 -1/1 90398893/1
--18198/1 5580/1 -1/1 90575901/1
--18198/1 5580/1 -1/1 90575901/1
--18148/1 5758/1 -1/1 90626117/1
--18148/1 5758/1 -1/1 90626117/1
--18122/1 5828/1 -1/1 90593117/1
--18122/1 5828/1 -1/1 90593117/1
--18084/1 5904/1 -1/1 90472068/1
--18084/1 5904/1 -1/1 90472068/1
--17998/1 6060/1 -1/1 90162901/1
--17998/1 6060/1 -1/1 90162901/1
--17906/1 6202/1 -1/1 89772410/1
--17906/1 6202/1 -1/1 89772410/1
--17794/1 6342/1 -1/1 89211850/1
--17794/1 6342/1 -1/1 89211850/1
--17674/1 6474/1 -1/1 88570738/1
--17674/1 6474/1 -1/1 88570738/1
--17540/1 6596/1 -1/1 87789704/1
--17540/1 6596/1 -1/1 87789704/1
--17406/1 6700/1 -1/1 86964709/1
--17406/1 6700/1 -1/1 86964709/1
--17260/1 6798/1 -1/1 86030101/1
--17260/1 6798/1 -1/1 86030101/1
--17100/1 6890/1 -1/1 84970525/1
--17100/1 6890/1 -1/1 84970525/1
--16948/1 6960/1 -1/1 83919076/1
--16948/1 6960/1 -1/1 83919076/1
--16776/1 7024/1 -1/1 82692688/1
--16776/1 7024/1 -1/1 82692688/1
--16606/1 7072/1 -1/1 81443105/1
--16606/1 7072/1 -1/1 81443105/1
--16434/1 7104/1 -1/1 80135793/1
--16434/1 7104/1 -1/1 80135793/1
--16276/1 7126/1 -1/1 78922013/1
--16276/1 7126/1 -1/1 78922013/1
--16078/1 7134/1 -1/1 77349010/1
--16078/1 7134/1 -1/1 77349010/1
--15818/1 7126/1 -1/1 75247250/1
--15818/1 7126/1 -1/1 75247250/1
--15704/1 7120/1 -1/1 74327504/1
--15704/1 7120/1 -1/1 74327504/1
--15346/1 7078/1 -1/1 71399450/1
--15346/1 7078/1 -1/1 71399450/1
--14978/1 7004/1 -1/1 68349125/1
--14978/1 7004/1 -1/1 68349125/1
--14798/1 6954/1 -1/1 66834730/1
--14798/1 6954/1 -1/1 66834730/1
--14748/1 6932/1 -1/1 66389032/1
--14748/1 6932/1 -1/1 66389032/1
--14696/1 6896/1 -1/1 65881808/1
--14696/1 6896/1 -1/1 65881808/1
--14660/1 6856/1 -1/1 65480084/1
--14660/1 6856/1 -1/1 65480084/1
--14638/1 6816/1 -1/1 65182225/1
--14638/1 6816/1 -1/1 65182225/1
--14618/1 6756/1 -1/1 64832365/1
--14618/1 6756/1 -1/1 64832365/1
--14610/1 6698/1 -1/1 64578826/1
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane6.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane6.txt
deleted file mode 100644
index fd46845..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane6.txt
+++ /dev/null
@@ -1,361 +0,0 @@
-360
-2/1 0/1 1/1 -1/1
-124981/62500 43631/1250000 1/1 -6250003808561/6250000000000
-999391/500000 69799/1000000 1/1 -160000055357/160000000000
-99863/50000 3271/31250 1/1 -250000233449/250000000000
-249391/125000 139513/1000000 1/1 -3999999613553/4000000000000
-199239/100000 871557/5000000 1/1 -100000059406749/100000000000000
-497261/250000 6533/31250 1/1 -250000027817/250000000000
-496273/250000 121869/500000 1/1 -999999615277/1000000000000
-247567/125000 139173/500000 1/1 -999999835753/1000000000000
-123461/62500 78217/250000 1/1 -9999991817/10000000000
-123101/62500 10853/31250 1/1 -15625006637/15625000000
-981627/500000 190809/500000 1/1 -99999964161/100000000000
-244537/125000 25989/62500 1/1 -62500056853/62500000000
-97437/50000 224951/500000 1/1 -999999849301/1000000000000
-121287/62500 120961/250000 1/1 -10000005817/10000000000
-482963/250000 258819/500000 1/1 -1000000312237/1000000000000
-480631/250000 275637/500000 1/1 -1000000388413/1000000000000
-191261/100000 73093/125000 1/1 -1000000639409/1000000000000
-951057/500000 309017/500000 1/1 -500000461769/500000000000
-945519/500000 10174/15625 1/1 -200000140397/200000000000
-939693/500000 17101/25000 1/1 -1000000614649/1000000000000
-46679/25000 11199/15625 1/1 -62499952489/62500000000
-57949/31250 374607/500000 1/1 -200000114861/200000000000
-184101/100000 390731/500000 1/1 -500000084693/500000000000
-182709/100000 406737/500000 1/1 -499999727097/500000000000
-226577/125000 211309/250000 1/1 -250000041197/250000000000
-449397/250000 438371/500000 1/1 -999999788077/1000000000000
-891007/500000 45399/50000 1/1 -1000000394149/1000000000000
-220737/125000 14671/15625 1/1 -62500070593/62500000000
-43731/25000 48481/50000 1/1 -2000001761/2000000000
-34641/20000 1/1 1/1 -1599998881/1600000000
-857167/500000 257519/250000 1/1 -999999407333/1000000000000
-53003/31250 529919/500000 1/1 -199999911373/200000000000
-838671/500000 544639/500000 1/1 -500000343281/500000000000
-414519/250000 559193/500000 1/1 -1000000816693/1000000000000
-51197/31250 71697/62500 1/1 -3124998209/3125000000
-809017/500000 117557/100000 1/1 -499999856257/500000000000
-199659/125000 120363/100000 1/1 -1000000754721/1000000000000
-788011/500000 615661/500000 1/1 -499999901521/500000000000
-388573/250000 15733/12500 1/1 -249999891929/250000000000
-191511/125000 160697/125000 1/1 -6249998893/6250000000
-75471/50000 656059/500000 1/1 -1000000595581/1000000000000
-148629/100000 669131/500000 1/1 -500000393093/500000000000
-365677/250000 340999/250000 1/1 -24999998633/25000000000
-35967/25000 347329/250000 1/1 -249999943141/250000000000
-707107/500000 707107/500000 1/1 -500000309449/500000000000
-347329/250000 35967/25000 1/1 -249999943141/250000000000
-340999/250000 365677/250000 1/1 -24999998633/25000000000
-669131/500000 148629/100000 1/1 -500000393093/500000000000
-656059/500000 75471/50000 1/1 -1000000595581/1000000000000
-160697/125000 191511/125000 1/1 -6249998893/6250000000
-15733/12500 388573/250000 1/1 -249999891929/250000000000
-615661/500000 788011/500000 1/1 -499999901521/500000000000
-120363/100000 199659/125000 1/1 -1000000754721/1000000000000
-117557/100000 809017/500000 1/1 -499999856257/500000000000
-71697/62500 51197/31250 1/1 -3124998209/3125000000
-559193/500000 414519/250000 1/1 -1000000816693/1000000000000
-544639/500000 838671/500000 1/1 -500000343281/500000000000
-529919/500000 53003/31250 1/1 -199999911373/200000000000
-257519/250000 857167/500000 1/1 -999999407333/1000000000000
-1/1 34641/20000 1/1 -1599998881/1600000000
-48481/50000 43731/25000 1/1 -2000001761/2000000000
-14671/15625 220737/125000 1/1 -62500070593/62500000000
-453991/500000 891007/500000 1/1 -100000130213/100000000000
-438371/500000 449397/250000 1/1 -999999788077/1000000000000
-211309/250000 226577/125000 1/1 -250000041197/250000000000
-406737/500000 182709/100000 1/1 -499999727097/500000000000
-390731/500000 184101/100000 1/1 -500000084693/500000000000
-374607/500000 57949/31250 1/1 -200000114861/200000000000
-11199/15625 46679/25000 1/1 -62499952489/62500000000
-17101/25000 939693/500000 1/1 -1000000614649/1000000000000
-10174/15625 945519/500000 1/1 -200000140397/200000000000
-309017/500000 951057/500000 1/1 -500000461769/500000000000
-73093/125000 191261/100000 1/1 -1000000639409/1000000000000
-275637/500000 480631/250000 1/1 -1000000388413/1000000000000
-258819/500000 482963/250000 1/1 -1000000312237/1000000000000
-120961/250000 121287/62500 1/1 -10000005817/10000000000
-224951/500000 97437/50000 1/1 -999999849301/1000000000000
-25989/62500 244537/125000 1/1 -62500056853/62500000000
-190809/500000 981627/500000 1/1 -99999964161/100000000000
-10853/31250 123101/62500 1/1 -15625006637/15625000000
-78217/250000 123461/62500 1/1 -9999991817/10000000000
-139173/500000 247567/125000 1/1 -999999835753/1000000000000
-121869/500000 496273/250000 1/1 -999999615277/1000000000000
-6533/31250 497261/250000 1/1 -250000027817/250000000000
-871557/5000000 199239/100000 1/1 -100000059406749/100000000000000
-139513/1000000 249391/125000 1/1 -3999999613553/4000000000000
-3271/31250 99863/50000 1/1 -250000233449/250000000000
-69799/1000000 999391/500000 1/1 -160000055357/160000000000
-43631/1250000 124981/62500 1/1 -6250003808561/6250000000000
-17949/5000000000000 2/1 1/1 -100000000000000000322166601/100000000000000000000000000
--43631/1250000 124981/62500 1/1 -6250003808561/6250000000000
--69799/1000000 999391/500000 1/1 -160000055357/160000000000
--3271/31250 99863/50000 1/1 -250000233449/250000000000
--139513/1000000 249391/125000 1/1 -3999999613553/4000000000000
--871557/5000000 199239/100000 1/1 -100000059406749/100000000000000
--6533/31250 497261/250000 1/1 -250000027817/250000000000
--121869/500000 496273/250000 1/1 -999999615277/1000000000000
--139173/500000 247567/125000 1/1 -999999835753/1000000000000
--78217/250000 123461/62500 1/1 -9999991817/10000000000
--10853/31250 123101/62500 1/1 -15625006637/15625000000
--190809/500000 981627/500000 1/1 -99999964161/100000000000
--25989/62500 244537/125000 1/1 -62500056853/62500000000
--224951/500000 97437/50000 1/1 -999999849301/1000000000000
--120961/250000 121287/62500 1/1 -10000005817/10000000000
--258819/500000 482963/250000 1/1 -1000000312237/1000000000000
--275637/500000 480631/250000 1/1 -1000000388413/1000000000000
--73093/125000 191261/100000 1/1 -1000000639409/1000000000000
--309017/500000 951057/500000 1/1 -500000461769/500000000000
--10174/15625 945519/500000 1/1 -200000140397/200000000000
--17101/25000 939693/500000 1/1 -1000000614649/1000000000000
--11199/15625 46679/25000 1/1 -62499952489/62500000000
--374607/500000 57949/31250 1/1 -200000114861/200000000000
--390731/500000 184101/100000 1/1 -500000084693/500000000000
--406737/500000 182709/100000 1/1 -499999727097/500000000000
--211309/250000 226577/125000 1/1 -250000041197/250000000000
--438371/500000 449397/250000 1/1 -999999788077/1000000000000
--45399/50000 891007/500000 1/1 -1000000394149/1000000000000
--14671/15625 220737/125000 1/1 -62500070593/62500000000
--48481/50000 43731/25000 1/1 -2000001761/2000000000
--1/1 34641/20000 1/1 -1599998881/1600000000
--257519/250000 857167/500000 1/1 -999999407333/1000000000000
--529919/500000 53003/31250 1/1 -199999911373/200000000000
--544639/500000 838671/500000 1/1 -500000343281/500000000000
--559193/500000 414519/250000 1/1 -1000000816693/1000000000000
--71697/62500 51197/31250 1/1 -3124998209/3125000000
--117557/100000 809017/500000 1/1 -499999856257/500000000000
--120363/100000 199659/125000 1/1 -1000000754721/1000000000000
--615661/500000 788011/500000 1/1 -499999901521/500000000000
--15733/12500 388573/250000 1/1 -249999891929/250000000000
--160697/125000 191511/125000 1/1 -6249998893/6250000000
--656059/500000 75471/50000 1/1 -1000000595581/1000000000000
--669131/500000 148629/100000 1/1 -500000393093/500000000000
--340999/250000 365677/250000 1/1 -24999998633/25000000000
--347329/250000 35967/25000 1/1 -249999943141/250000000000
--707107/500000 707107/500000 1/1 -500000309449/500000000000
--35967/25000 347329/250000 1/1 -249999943141/250000000000
--365677/250000 340999/250000 1/1 -24999998633/25000000000
--148629/100000 669131/500000 1/1 -500000393093/500000000000
--75471/50000 656059/500000 1/1 -1000000595581/1000000000000
--191511/125000 160697/125000 1/1 -6249998893/6250000000
--388573/250000 15733/12500 1/1 -249999891929/250000000000
--788011/500000 615661/500000 1/1 -499999901521/500000000000
--199659/125000 120363/100000 1/1 -1000000754721/1000000000000
--809017/500000 117557/100000 1/1 -499999856257/500000000000
--51197/31250 71697/62500 1/1 -3124998209/3125000000
--414519/250000 559193/500000 1/1 -1000000816693/1000000000000
--838671/500000 544639/500000 1/1 -500000343281/500000000000
--53003/31250 529919/500000 1/1 -199999911373/200000000000
--857167/500000 257519/250000 1/1 -999999407333/1000000000000
--34641/20000 1/1 1/1 -1599998881/1600000000
--43731/25000 48481/50000 1/1 -2000001761/2000000000
--220737/125000 14671/15625 1/1 -62500070593/62500000000
--891007/500000 453991/500000 1/1 -100000130213/100000000000
--449397/250000 438371/500000 1/1 -999999788077/1000000000000
--226577/125000 211309/250000 1/1 -250000041197/250000000000
--182709/100000 406737/500000 1/1 -499999727097/500000000000
--184101/100000 390731/500000 1/1 -500000084693/500000000000
--57949/31250 374607/500000 1/1 -200000114861/200000000000
--46679/25000 11199/15625 1/1 -62499952489/62500000000
--939693/500000 17101/25000 1/1 -1000000614649/1000000000000
--945519/500000 10174/15625 1/1 -200000140397/200000000000
--951057/500000 309017/500000 1/1 -500000461769/500000000000
--191261/100000 73093/125000 1/1 -1000000639409/1000000000000
--480631/250000 275637/500000 1/1 -1000000388413/1000000000000
--482963/250000 258819/500000 1/1 -1000000312237/1000000000000
--121287/62500 120961/250000 1/1 -10000005817/10000000000
--97437/50000 224951/500000 1/1 -999999849301/1000000000000
--244537/125000 25989/62500 1/1 -62500056853/62500000000
--981627/500000 190809/500000 1/1 -99999964161/100000000000
--123101/62500 10853/31250 1/1 -15625006637/15625000000
--123461/62500 78217/250000 1/1 -9999991817/10000000000
--247567/125000 139173/500000 1/1 -999999835753/1000000000000
--496273/250000 121869/500000 1/1 -999999615277/1000000000000
--497261/250000 6533/31250 1/1 -250000027817/250000000000
--199239/100000 871557/5000000 1/1 -100000059406749/100000000000000
--249391/125000 139513/1000000 1/1 -3999999613553/4000000000000
--99863/50000 3271/31250 1/1 -250000233449/250000000000
--999391/500000 69799/1000000 1/1 -160000055357/160000000000
--124981/62500 43631/1250000 1/1 -6250003808561/6250000000000
--2/1 358979/50000000000000 1/1 -10000000000000000128865922441/10000000000000000000000000000
--124981/62500 -43631/1250000 1/1 -6250003808561/6250000000000
--999391/500000 -69799/1000000 1/1 -160000055357/160000000000
--99863/50000 -3271/31250 1/1 -250000233449/250000000000
--249391/125000 -139513/1000000 1/1 -3999999613553/4000000000000
--199239/100000 -871557/5000000 1/1 -100000059406749/100000000000000
--497261/250000 -6533/31250 1/1 -250000027817/250000000000
--496273/250000 -121869/500000 1/1 -999999615277/1000000000000
--247567/125000 -139173/500000 1/1 -999999835753/1000000000000
--123461/62500 -78217/250000 1/1 -9999991817/10000000000
--123101/62500 -10853/31250 1/1 -15625006637/15625000000
--981627/500000 -190809/500000 1/1 -99999964161/100000000000
--244537/125000 -25989/62500 1/1 -62500056853/62500000000
--97437/50000 -224951/500000 1/1 -999999849301/1000000000000
--121287/62500 -120961/250000 1/1 -10000005817/10000000000
--482963/250000 -258819/500000 1/1 -1000000312237/1000000000000
--480631/250000 -275637/500000 1/1 -1000000388413/1000000000000
--191261/100000 -73093/125000 1/1 -1000000639409/1000000000000
--951057/500000 -309017/500000 1/1 -500000461769/500000000000
--945519/500000 -10174/15625 1/1 -200000140397/200000000000
--939693/500000 -17101/25000 1/1 -1000000614649/1000000000000
--46679/25000 -11199/15625 1/1 -62499952489/62500000000
--57949/31250 -374607/500000 1/1 -200000114861/200000000000
--184101/100000 -390731/500000 1/1 -500000084693/500000000000
--182709/100000 -406737/500000 1/1 -499999727097/500000000000
--226577/125000 -211309/250000 1/1 -250000041197/250000000000
--449397/250000 -438371/500000 1/1 -999999788077/1000000000000
--891007/500000 -45399/50000 1/1 -1000000394149/1000000000000
--220737/125000 -14671/15625 1/1 -62500070593/62500000000
--43731/25000 -48481/50000 1/1 -2000001761/2000000000
--34641/20000 -1/1 1/1 -1599998881/1600000000
--857167/500000 -257519/250000 1/1 -999999407333/1000000000000
--53003/31250 -529919/500000 1/1 -199999911373/200000000000
--838671/500000 -544639/500000 1/1 -500000343281/500000000000
--414519/250000 -559193/500000 1/1 -1000000816693/1000000000000
--51197/31250 -71697/62500 1/1 -3124998209/3125000000
--809017/500000 -117557/100000 1/1 -499999856257/500000000000
--199659/125000 -120363/100000 1/1 -1000000754721/1000000000000
--788011/500000 -615661/500000 1/1 -499999901521/500000000000
--388573/250000 -15733/12500 1/1 -249999891929/250000000000
--191511/125000 -160697/125000 1/1 -6249998893/6250000000
--75471/50000 -656059/500000 1/1 -1000000595581/1000000000000
--148629/100000 -669131/500000 1/1 -500000393093/500000000000
--365677/250000 -340999/250000 1/1 -24999998633/25000000000
--35967/25000 -347329/250000 1/1 -249999943141/250000000000
--707107/500000 -707107/500000 1/1 -500000309449/500000000000
--347329/250000 -35967/25000 1/1 -249999943141/250000000000
--340999/250000 -365677/250000 1/1 -24999998633/25000000000
--669131/500000 -148629/100000 1/1 -500000393093/500000000000
--656059/500000 -75471/50000 1/1 -1000000595581/1000000000000
--160697/125000 -191511/125000 1/1 -6249998893/6250000000
--15733/12500 -388573/250000 1/1 -249999891929/250000000000
--615661/500000 -788011/500000 1/1 -499999901521/500000000000
--120363/100000 -199659/125000 1/1 -1000000754721/1000000000000
--117557/100000 -809017/500000 1/1 -499999856257/500000000000
--71697/62500 -51197/31250 1/1 -3124998209/3125000000
--559193/500000 -414519/250000 1/1 -1000000816693/1000000000000
--544639/500000 -838671/500000 1/1 -500000343281/500000000000
--529919/500000 -53003/31250 1/1 -199999911373/200000000000
--257519/250000 -857167/500000 1/1 -999999407333/1000000000000
--1/1 -34641/20000 1/1 -1599998881/1600000000
--48481/50000 -43731/25000 1/1 -2000001761/2000000000
--14671/15625 -220737/125000 1/1 -62500070593/62500000000
--453991/500000 -891007/500000 1/1 -100000130213/100000000000
--438371/500000 -449397/250000 1/1 -999999788077/1000000000000
--211309/250000 -226577/125000 1/1 -250000041197/250000000000
--406737/500000 -182709/100000 1/1 -499999727097/500000000000
--390731/500000 -184101/100000 1/1 -500000084693/500000000000
--374607/500000 -57949/31250 1/1 -200000114861/200000000000
--11199/15625 -46679/25000 1/1 -62499952489/62500000000
--17101/25000 -939693/500000 1/1 -1000000614649/1000000000000
--10174/15625 -945519/500000 1/1 -200000140397/200000000000
--309017/500000 -951057/500000 1/1 -500000461769/500000000000
--73093/125000 -191261/100000 1/1 -1000000639409/1000000000000
--275637/500000 -480631/250000 1/1 -1000000388413/1000000000000
--258819/500000 -482963/250000 1/1 -1000000312237/1000000000000
--120961/250000 -121287/62500 1/1 -10000005817/10000000000
--224951/500000 -97437/50000 1/1 -999999849301/1000000000000
--25989/62500 -244537/125000 1/1 -62500056853/62500000000
--190809/500000 -981627/500000 1/1 -99999964161/100000000000
--10853/31250 -123101/62500 1/1 -15625006637/15625000000
--78217/250000 -123461/62500 1/1 -9999991817/10000000000
--139173/500000 -247567/125000 1/1 -999999835753/1000000000000
--121869/500000 -496273/250000 1/1 -999999615277/1000000000000
--6533/31250 -497261/250000 1/1 -250000027817/250000000000
--871557/5000000 -199239/100000 1/1 -100000059406749/100000000000000
--139513/1000000 -249391/125000 1/1 -3999999613553/4000000000000
--3271/31250 -99863/50000 1/1 -250000233449/250000000000
--69799/1000000 -999391/500000 1/1 -160000055357/160000000000
--43631/1250000 -124981/62500 1/1 -6250003808561/6250000000000
--538469/50000000000000 -2/1 1/1 -10000000000000000289948863961/10000000000000000000000000000
-43631/1250000 -124981/62500 1/1 -6250003808561/6250000000000
-69799/1000000 -999391/500000 1/1 -160000055357/160000000000
-3271/31250 -99863/50000 1/1 -250000233449/250000000000
-139513/1000000 -249391/125000 1/1 -3999999613553/4000000000000
-871557/5000000 -199239/100000 1/1 -100000059406749/100000000000000
-6533/31250 -497261/250000 1/1 -250000027817/250000000000
-121869/500000 -496273/250000 1/1 -999999615277/1000000000000
-139173/500000 -247567/125000 1/1 -999999835753/1000000000000
-78217/250000 -123461/62500 1/1 -9999991817/10000000000
-10853/31250 -123101/62500 1/1 -15625006637/15625000000
-190809/500000 -981627/500000 1/1 -99999964161/100000000000
-25989/62500 -244537/125000 1/1 -62500056853/62500000000
-224951/500000 -97437/50000 1/1 -999999849301/1000000000000
-120961/250000 -121287/62500 1/1 -10000005817/10000000000
-258819/500000 -482963/250000 1/1 -1000000312237/1000000000000
-275637/500000 -480631/250000 1/1 -1000000388413/1000000000000
-73093/125000 -191261/100000 1/1 -1000000639409/1000000000000
-309017/500000 -951057/500000 1/1 -500000461769/500000000000
-10174/15625 -945519/500000 1/1 -200000140397/200000000000
-17101/25000 -939693/500000 1/1 -1000000614649/1000000000000
-11199/15625 -46679/25000 1/1 -62499952489/62500000000
-374607/500000 -57949/31250 1/1 -200000114861/200000000000
-390731/500000 -184101/100000 1/1 -500000084693/500000000000
-406737/500000 -182709/100000 1/1 -499999727097/500000000000
-211309/250000 -226577/125000 1/1 -250000041197/250000000000
-438371/500000 -449397/250000 1/1 -999999788077/1000000000000
-45399/50000 -891007/500000 1/1 -1000000394149/1000000000000
-14671/15625 -220737/125000 1/1 -62500070593/62500000000
-48481/50000 -43731/25000 1/1 -2000001761/2000000000
-1/1 -34641/20000 1/1 -1599998881/1600000000
-257519/250000 -857167/500000 1/1 -999999407333/1000000000000
-529919/500000 -53003/31250 1/1 -199999911373/200000000000
-544639/500000 -838671/500000 1/1 -500000343281/500000000000
-559193/500000 -414519/250000 1/1 -1000000816693/1000000000000
-71697/62500 -51197/31250 1/1 -3124998209/3125000000
-117557/100000 -809017/500000 1/1 -499999856257/500000000000
-120363/100000 -199659/125000 1/1 -1000000754721/1000000000000
-615661/500000 -788011/500000 1/1 -499999901521/500000000000
-15733/12500 -388573/250000 1/1 -249999891929/250000000000
-160697/125000 -191511/125000 1/1 -6249998893/6250000000
-656059/500000 -75471/50000 1/1 -1000000595581/1000000000000
-669131/500000 -148629/100000 1/1 -500000393093/500000000000
-340999/250000 -365677/250000 1/1 -24999998633/25000000000
-347329/250000 -35967/25000 1/1 -249999943141/250000000000
-707107/500000 -707107/500000 1/1 -500000309449/500000000000
-35967/25000 -347329/250000 1/1 -249999943141/250000000000
-365677/250000 -340999/250000 1/1 -24999998633/25000000000
-148629/100000 -669131/500000 1/1 -500000393093/500000000000
-75471/50000 -656059/500000 1/1 -1000000595581/1000000000000
-191511/125000 -160697/125000 1/1 -6249998893/6250000000
-388573/250000 -15733/12500 1/1 -249999891929/250000000000
-788011/500000 -615661/500000 1/1 -499999901521/500000000000
-199659/125000 -120363/100000 1/1 -1000000754721/1000000000000
-809017/500000 -117557/100000 1/1 -499999856257/500000000000
-51197/31250 -71697/62500 1/1 -3124998209/3125000000
-414519/250000 -559193/500000 1/1 -1000000816693/1000000000000
-838671/500000 -544639/500000 1/1 -500000343281/500000000000
-53003/31250 -529919/500000 1/1 -199999911373/200000000000
-857167/500000 -257519/250000 1/1 -999999407333/1000000000000
-34641/20000 -1/1 1/1 -1599998881/1600000000
-43731/25000 -48481/50000 1/1 -2000001761/2000000000
-220737/125000 -14671/15625 1/1 -62500070593/62500000000
-891007/500000 -453991/500000 1/1 -100000130213/100000000000
-449397/250000 -438371/500000 1/1 -999999788077/1000000000000
-226577/125000 -211309/250000 1/1 -250000041197/250000000000
-182709/100000 -406737/500000 1/1 -499999727097/500000000000
-184101/100000 -390731/500000 1/1 -500000084693/500000000000
-57949/31250 -374607/500000 1/1 -200000114861/200000000000
-46679/25000 -11199/15625 1/1 -62499952489/62500000000
-939693/500000 -17101/25000 1/1 -1000000614649/1000000000000
-945519/500000 -10174/15625 1/1 -200000140397/200000000000
-951057/500000 -309017/500000 1/1 -500000461769/500000000000
-191261/100000 -73093/125000 1/1 -1000000639409/1000000000000
-480631/250000 -275637/500000 1/1 -1000000388413/1000000000000
-482963/250000 -258819/500000 1/1 -1000000312237/1000000000000
-121287/62500 -120961/250000 1/1 -10000005817/10000000000
-97437/50000 -224951/500000 1/1 -999999849301/1000000000000
-244537/125000 -25989/62500 1/1 -62500056853/62500000000
-981627/500000 -190809/500000 1/1 -99999964161/100000000000
-123101/62500 -10853/31250 1/1 -15625006637/15625000000
-123461/62500 -78217/250000 1/1 -9999991817/10000000000
-247567/125000 -139173/500000 1/1 -999999835753/1000000000000
-496273/250000 -121869/500000 1/1 -999999615277/1000000000000
-497261/250000 -6533/31250 1/1 -250000027817/250000000000
-199239/100000 -871557/5000000 1/1 -100000059406749/100000000000000
-249391/125000 -139513/1000000 1/1 -3999999613553/4000000000000
-99863/50000 -3271/31250 1/1 -250000233449/250000000000
-999391/500000 -69799/1000000 1/1 -160000055357/160000000000
-124981/62500 -43631/1250000 1/1 -6250003808561/6250000000000
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane7.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane7.txt
deleted file mode 100644
index aedba81..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane7.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-20
-0/1 0/1 1/1 0/1
-2/1 0/1 1/1 -1/1
-4/1 0/1 1/1 -4/1
-6/1 0/1 1/1 -9/1
-8/1 0/1 1/1 -16/1
-10/1 0/1 1/1 -25/1
-12/1 0/1 1/1 -36/1
-14/1 0/1 1/1 -49/1
-16/1 0/1 1/1 -64/1
-18/1 0/1 1/1 -81/1
-20/1 0/1 1/1 -100/1
-22/1 0/1 1/1 -121/1
-24/1 0/1 1/1 -144/1
-26/1 0/1 1/1 -169/1
-28/1 0/1 1/1 -196/1
-30/1 0/1 1/1 -225/1
-32/1 0/1 1/1 -256/1
-34/1 0/1 1/1 -289/1
-36/1 0/1 1/1 -324/1
-38/1 0/1 1/1 -361/1
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane8.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane8.txt
deleted file mode 100644
index 91837e1..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/planes/plane8.txt
+++ /dev/null
@@ -1,227 +0,0 @@
-225
-0/1 0/1 1/1 0/1
-0/1 2/1 1/1 -1/1
-0/1 4/1 1/1 -4/1
-0/1 6/1 1/1 -9/1
-0/1 8/1 1/1 -16/1
-0/1 10/1 1/1 -25/1
-0/1 12/1 1/1 -36/1
-0/1 14/1 1/1 -49/1
-0/1 16/1 1/1 -64/1
-0/1 18/1 1/1 -81/1
-0/1 20/1 1/1 -100/1
-0/1 22/1 1/1 -121/1
-0/1 24/1 1/1 -144/1
-0/1 26/1 1/1 -169/1
-0/1 28/1 1/1 -196/1
-2/1 0/1 1/1 -1/1
-2/1 2/1 1/1 -2/1
-2/1 4/1 1/1 -5/1
-2/1 6/1 1/1 -10/1
-2/1 8/1 1/1 -17/1
-2/1 10/1 1/1 -26/1
-2/1 12/1 1/1 -37/1
-2/1 14/1 1/1 -50/1
-2/1 16/1 1/1 -65/1
-2/1 18/1 1/1 -82/1
-2/1 20/1 1/1 -101/1
-2/1 22/1 1/1 -122/1
-2/1 24/1 1/1 -145/1
-2/1 26/1 1/1 -170/1
-2/1 28/1 1/1 -197/1
-4/1 0/1 1/1 -4/1
-4/1 2/1 1/1 -5/1
-4/1 4/1 1/1 -8/1
-4/1 6/1 1/1 -13/1
-4/1 8/1 1/1 -20/1
-4/1 10/1 1/1 -29/1
-4/1 12/1 1/1 -40/1
-4/1 14/1 1/1 -53/1
-4/1 16/1 1/1 -68/1
-4/1 18/1 1/1 -85/1
-4/1 20/1 1/1 -104/1
-4/1 22/1 1/1 -125/1
-4/1 24/1 1/1 -148/1
-4/1 26/1 1/1 -173/1
-4/1 28/1 1/1 -200/1
-6/1 0/1 1/1 -9/1
-6/1 2/1 1/1 -10/1
-6/1 4/1 1/1 -13/1
-6/1 6/1 1/1 -18/1
-6/1 8/1 1/1 -25/1
-6/1 10/1 1/1 -34/1
-6/1 12/1 1/1 -45/1
-6/1 14/1 1/1 -58/1
-6/1 16/1 1/1 -73/1
-6/1 18/1 1/1 -90/1
-6/1 20/1 1/1 -109/1
-6/1 22/1 1/1 -130/1
-6/1 24/1 1/1 -153/1
-6/1 26/1 1/1 -178/1
-6/1 28/1 1/1 -205/1
-8/1 0/1 1/1 -16/1
-8/1 2/1 1/1 -17/1
-8/1 4/1 1/1 -20/1
-8/1 6/1 1/1 -25/1
-8/1 8/1 1/1 -32/1
-8/1 10/1 1/1 -41/1
-8/1 12/1 1/1 -52/1
-8/1 14/1 1/1 -65/1
-8/1 16/1 1/1 -80/1
-8/1 18/1 1/1 -97/1
-8/1 20/1 1/1 -116/1
-8/1 22/1 1/1 -137/1
-8/1 24/1 1/1 -160/1
-8/1 26/1 1/1 -185/1
-8/1 28/1 1/1 -212/1
-10/1 0/1 1/1 -25/1
-10/1 2/1 1/1 -26/1
-10/1 4/1 1/1 -29/1
-10/1 6/1 1/1 -34/1
-10/1 8/1 1/1 -41/1
-10/1 10/1 1/1 -50/1
-10/1 12/1 1/1 -61/1
-10/1 14/1 1/1 -74/1
-10/1 16/1 1/1 -89/1
-10/1 18/1 1/1 -106/1
-10/1 20/1 1/1 -125/1
-10/1 22/1 1/1 -146/1
-10/1 24/1 1/1 -169/1
-10/1 26/1 1/1 -194/1
-10/1 28/1 1/1 -221/1
-12/1 0/1 1/1 -36/1
-12/1 2/1 1/1 -37/1
-12/1 4/1 1/1 -40/1
-12/1 6/1 1/1 -45/1
-12/1 8/1 1/1 -52/1
-12/1 10/1 1/1 -61/1
-12/1 12/1 1/1 -72/1
-12/1 14/1 1/1 -85/1
-12/1 16/1 1/1 -100/1
-12/1 18/1 1/1 -117/1
-12/1 20/1 1/1 -136/1
-12/1 22/1 1/1 -157/1
-12/1 24/1 1/1 -180/1
-12/1 26/1 1/1 -205/1
-12/1 28/1 1/1 -232/1
-14/1 0/1 1/1 -49/1
-14/1 2/1 1/1 -50/1
-14/1 4/1 1/1 -53/1
-14/1 6/1 1/1 -58/1
-14/1 8/1 1/1 -65/1
-14/1 10/1 1/1 -74/1
-14/1 12/1 1/1 -85/1
-14/1 14/1 1/1 -98/1
-14/1 16/1 1/1 -113/1
-14/1 18/1 1/1 -130/1
-14/1 20/1 1/1 -149/1
-14/1 22/1 1/1 -170/1
-14/1 24/1 1/1 -193/1
-14/1 26/1 1/1 -218/1
-14/1 28/1 1/1 -245/1
-16/1 0/1 1/1 -64/1
-16/1 2/1 1/1 -65/1
-16/1 4/1 1/1 -68/1
-16/1 6/1 1/1 -73/1
-16/1 8/1 1/1 -80/1
-16/1 10/1 1/1 -89/1
-16/1 12/1 1/1 -100/1
-16/1 14/1 1/1 -113/1
-16/1 16/1 1/1 -128/1
-16/1 18/1 1/1 -145/1
-16/1 20/1 1/1 -164/1
-16/1 22/1 1/1 -185/1
-16/1 24/1 1/1 -208/1
-16/1 26/1 1/1 -233/1
-16/1 28/1 1/1 -260/1
-18/1 0/1 1/1 -81/1
-18/1 2/1 1/1 -82/1
-18/1 4/1 1/1 -85/1
-18/1 6/1 1/1 -90/1
-18/1 8/1 1/1 -97/1
-18/1 10/1 1/1 -106/1
-18/1 12/1 1/1 -117/1
-18/1 14/1 1/1 -130/1
-18/1 16/1 1/1 -145/1
-18/1 18/1 1/1 -162/1
-18/1 20/1 1/1 -181/1
-18/1 22/1 1/1 -202/1
-18/1 24/1 1/1 -225/1
-18/1 26/1 1/1 -250/1
-18/1 28/1 1/1 -277/1
-20/1 0/1 1/1 -100/1
-20/1 2/1 1/1 -101/1
-20/1 4/1 1/1 -104/1
-20/1 6/1 1/1 -109/1
-20/1 8/1 1/1 -116/1
-20/1 10/1 1/1 -125/1
-20/1 12/1 1/1 -136/1
-20/1 14/1 1/1 -149/1
-20/1 16/1 1/1 -164/1
-20/1 18/1 1/1 -181/1
-20/1 20/1 1/1 -200/1
-20/1 22/1 1/1 -221/1
-20/1 24/1 1/1 -244/1
-20/1 26/1 1/1 -269/1
-20/1 28/1 1/1 -296/1
-22/1 0/1 1/1 -121/1
-22/1 2/1 1/1 -122/1
-22/1 4/1 1/1 -125/1
-22/1 6/1 1/1 -130/1
-22/1 8/1 1/1 -137/1
-22/1 10/1 1/1 -146/1
-22/1 12/1 1/1 -157/1
-22/1 14/1 1/1 -170/1
-22/1 16/1 1/1 -185/1
-22/1 18/1 1/1 -202/1
-22/1 20/1 1/1 -221/1
-22/1 22/1 1/1 -242/1
-22/1 24/1 1/1 -265/1
-22/1 26/1 1/1 -290/1
-22/1 28/1 1/1 -317/1
-24/1 0/1 1/1 -144/1
-24/1 2/1 1/1 -145/1
-24/1 4/1 1/1 -148/1
-24/1 6/1 1/1 -153/1
-24/1 8/1 1/1 -160/1
-24/1 10/1 1/1 -169/1
-24/1 12/1 1/1 -180/1
-24/1 14/1 1/1 -193/1
-24/1 16/1 1/1 -208/1
-24/1 18/1 1/1 -225/1
-24/1 20/1 1/1 -244/1
-24/1 22/1 1/1 -265/1
-24/1 24/1 1/1 -288/1
-24/1 26/1 1/1 -313/1
-24/1 28/1 1/1 -340/1
-26/1 0/1 1/1 -169/1
-26/1 2/1 1/1 -170/1
-26/1 4/1 1/1 -173/1
-26/1 6/1 1/1 -178/1
-26/1 8/1 1/1 -185/1
-26/1 10/1 1/1 -194/1
-26/1 12/1 1/1 -205/1
-26/1 14/1 1/1 -218/1
-26/1 16/1 1/1 -233/1
-26/1 18/1 1/1 -250/1
-26/1 20/1 1/1 -269/1
-26/1 22/1 1/1 -290/1
-26/1 24/1 1/1 -313/1
-26/1 26/1 1/1 -338/1
-26/1 28/1 1/1 -365/1
-28/1 0/1 1/1 -196/1
-28/1 2/1 1/1 -197/1
-28/1 4/1 1/1 -200/1
-28/1 6/1 1/1 -205/1
-28/1 8/1 1/1 -212/1
-28/1 10/1 1/1 -221/1
-28/1 12/1 1/1 -232/1
-28/1 14/1 1/1 -245/1
-28/1 16/1 1/1 -260/1
-28/1 18/1 1/1 -277/1
-28/1 20/1 1/1 -296/1
-28/1 22/1 1/1 -317/1
-28/1 24/1 1/1 -340/1
-28/1 26/1 1/1 -365/1
-28/1 28/1 1/1 -392/1
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere1.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere1.txt
deleted file mode 100644
index 4d819d3..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere1.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-4
-0 0 0       9
-1 2 10      9
-2 0 0       9
-7 7 7       4
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere2.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere2.txt
deleted file mode 100644
index 8d2d928..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere2.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-2
-0 0 0       9
-4 0 1       9
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere3.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere3.txt
deleted file mode 100644
index 06e58eb..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/spheres/sphere3.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-5
-0 0 2       16
-1 2 0       9
-4 0 1       9
-1 0 -2      1
-3 2 -10     4
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle1.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle1.txt
deleted file mode 100644
index b940ce6..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle1.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-50
--368262935/1073741824 -245188483/268435456 241700481/536870912	279605747/1073741824 -782835633/1073741824 150645245/1073741824	-1192511121/1073741824 -582258579/536870912 100222465/1073741824
-228459255/536870912 118603079/134217728 -96242409/536870912	53092841/67108864 102148201/67108864 -446242875/536870912	-3524127/536870912 833244631/536870912 -70917467/1073741824
--27723599/536870912 -10728191/1073741824 153767153/536870912	-658209365/1073741824 -207365635/536870912 683496285/1073741824	231769233/1073741824 275832057/1073741824 32202893/134217728
-964454053/1073741824 113951667/268435456 -853679393/1073741824	200686669/1073741824 641331063/1073741824 -654096917/1073741824	402762485/536870912 268342941/268435456 -543721019/536870912
--47909499/134217728 -267395257/536870912 36991549/134217728	-803750735/1073741824 -359107297/1073741824 522601367/1073741824	-352007643/536870912 -358108927/1073741824 336522685/536870912
--49331491/67108864 -394987857/536870912 -68467885/1073741824	-1490648789/1073741824 -346236395/536870912 597303363/1073741824	-205227511/268435456 -695126317/536870912 -12711069/67108864
--294411273/536870912 -266500959/268435456 -26185673/268435456	-703805155/536870912 -321225047/536870912 115663873/536870912	-148344091/1073741824 -758304721/536870912 -277598823/536870912
--331895109/1073741824 -384008705/536870912 251542349/1073741824	-862069919/1073741824 -1004973429/1073741824 8210259/268435456	-509705115/1073741824 -401191475/1073741824 -273281395/536870912
--508940575/536870912 -104480967/268435456 -673624009/1073741824	-897442217/1073741824 -338524475/1073741824 -359363309/536870912	-230436863/536870912 -16175957/1073741824 -321801281/1073741824
-352462555/1073741824 54800937/1073741824 717979767/1073741824	-66768921/1073741824 1518071/33554432 378361687/268435456	-243492099/1073741824 62434873/268435456 780495627/1073741824
-445450447/1073741824 -133884981/268435456 -220278157/1073741824	472632011/1073741824 282685501/1073741824 97191763/1073741824	234719319/536870912 -232884209/268435456 -268035803/536870912
-320533255/1073741824 172858541/536870912 121300183/268435456	3625815/8388608 702766971/1073741824 1358226447/1073741824	-4209777/33554432 91401531/134217728 392060487/536870912
--95492095/134217728 -420490435/1073741824 -65811291/536870912	-45817191/536870912 -59506199/67108864 -197700387/1073741824	-347150781/1073741824 439112561/1073741824 1094089/4194304
-191402933/268435456 -50107001/268435456 221668011/268435456	253115779/1073741824 -120797041/134217728 568291669/536870912	75877923/268435456 522386925/1073741824 187800209/536870912
--421460303/536870912 -244559359/268435456 777384273/1073741824	-762887571/1073741824 -174405267/134217728 371838235/536870912	14297333/536870912 -28299789/33554432 629822369/536870912
--8736789/16777216 3379563/134217728 -679633543/1073741824	-306081061/536870912 -109951195/268435456 111457349/1073741824	-963089017/1073741824 122865419/1073741824 -415129953/536870912
--137854127/268435456 249008909/268435456 -395195575/1073741824	-151954619/536870912 623009499/1073741824 -463944471/536870912	129686359/1073741824 604648229/1073741824 11747089/1073741824
--122846047/536870912 173836161/1073741824 11215463/134217728	64535917/268435456 -26890431/134217728 -167371701/1073741824	-10301447/134217728 -205618825/536870912 -17877889/134217728
-205062931/536870912 71744247/134217728 831570419/1073741824	158881873/268435456 761818705/536870912 634315453/536870912	138974041/268435456 67049479/1073741824 5376179/4194304
--38050939/67108864 218191919/1073741824 887431093/1073741824	-184871933/536870912 8956895/536870912 215564109/268435456	-306678497/1073741824 61156803/536870912 1438736387/1073741824
--17653281/268435456 535827793/536870912 10384489/67108864	27226805/268435456 985027929/1073741824 -47140373/67108864	-42889297/1073741824 850711263/536870912 191062695/1073741824
--399318933/536870912 241557247/536870912 -14441861/33554432	-75335093/67108864 933142243/1073741824 -488338809/536870912	-716693475/1073741824 -373346397/1073741824 -909226015/1073741824
--145386477/1073741824 -90281239/134217728 932135527/1073741824	-187500475/1073741824 -67908491/1073741824 861035703/536870912	28686199/134217728 -190691131/134217728 218432803/268435456
-45495459/67108864 -227329923/268435456 -56596441/67108864	852994321/1073741824 -924485145/536870912 -555785939/536870912	1419831649/1073741824 -57624265/268435456 -36052623/67108864
-205857933/268435456 941806405/1073741824 233452625/268435456	60329021/268435456 130428139/268435456 167270033/536870912	1138604803/1073741824 56577391/33554432 1082991923/1073741824
--55818397/268435456 -811568961/1073741824 -982851929/1073741824	-55109993/536870912 -873766543/536870912 -144806217/134217728	80121351/536870912 -732195577/1073741824 -63410955/536870912
--4702809/16777216 -16627839/134217728 -468264601/1073741824	-178291451/1073741824 69022939/1073741824 -1259775183/1073741824	343359901/1073741824 138329127/1073741824 -4137501/16777216
-946598209/1073741824 16100669/16777216 13515179/268435456	607691709/1073741824 1065649307/1073741824 212807327/1073741824	117717449/67108864 1347880549/1073741824 -85831745/268435456
-223405181/536870912 788271411/1073741824 441055223/536870912	493233277/536870912 1006102867/1073741824 1681152899/1073741824	229042497/1073741824 699061383/536870912 1383747375/1073741824
--408739543/1073741824 75245085/134217728 218494485/1073741824	-184126195/536870912 925837973/1073741824 69242167/134217728	11460225/1073741824 948984117/1073741824 42018671/67108864
--102706445/268435456 -305629319/1073741824 683421285/1073741824	-535473799/1073741824 -4394651/67108864 245655731/536870912	-1364067525/1073741824 -429442839/1073741824 1066782725/1073741824
--500726555/536870912 305972953/1073741824 -460933663/1073741824	-801025315/536870912 -14120413/268435456 -628729785/1073741824	-310477349/1073741824 -331181023/1073741824 -382795317/536870912
--649961197/1073741824 2568229/16777216 -185829705/1073741824	-1172740435/1073741824 364292461/1073741824 -168598349/1073741824	-295201047/536870912 625986889/1073741824 292088573/1073741824
--485539065/1073741824 20785339/67108864 742525643/1073741824	12799479/1073741824 824831867/1073741824 11027039/536870912	-479993093/536870912 426075931/1073741824 168757899/1073741824
--617474483/1073741824 192634101/1073741824 396711163/1073741824	-35498325/268435456 -789523/2097152 65401271/1073741824	-107060209/1073741824 -116562699/536870912 185901351/1073741824
--88825405/268435456 70880999/268435456 146401071/1073741824	2294177/8388608 355641903/536870912 102190341/268435456	167631561/536870912 86589385/536870912 783968149/1073741824
-146354373/268435456 889001219/1073741824 249217327/268435456	694506853/1073741824 1131926253/1073741824 620253665/1073741824	47786871/268435456 226848617/1073741824 644145089/1073741824
-542118485/1073741824 -130679889/1073741824 -94463073/268435456	397915401/536870912 70099521/1073741824 -41526161/33554432	101137591/536870912 1874535/134217728 255318947/1073741824
-32081009/134217728 -161155633/536870912 -252497953/536870912	92334001/1073741824 241405967/1073741824 138067501/536870912	502862455/1073741824 276680967/1073741824 -160850141/134217728
--215133071/1073741824 969925043/1073741824 126944535/134217728	-614900701/1073741824 757535745/1073741824 682781529/1073741824	-119883803/536870912 60942055/1073741824 486940489/1073741824
-276489717/536870912 72450563/134217728 -466925087/1073741824	1514169047/1073741824 489470599/1073741824 -97943387/536870912	124730201/1073741824 892674583/1073741824 -33461149/268435456
--214789437/1073741824 -955070983/1073741824 195990957/1073741824	519670797/1073741824 -642675217/1073741824 12457037/536870912	-165526743/1073741824 -1733010267/1073741824 -32159793/268435456
-1023319043/1073741824 -4197429/67108864 33534959/134217728	1237340573/1073741824 -299972115/1073741824 29360233/1073741824	1559202481/1073741824 -13659957/268435456 227329355/268435456
-70535661/268435456 -398375045/1073741824 692060299/1073741824	-117628289/536870912 -392618821/1073741824 -84446505/536870912	119749493/1073741824 10817027/536870912 1272368855/1073741824
--598965079/1073741824 536038971/536870912 -433610295/536870912	241519295/1073741824 1228533067/1073741824 -143329041/134217728	1305115/33554432 1025453907/1073741824 -79347481/536870912
-758300741/1073741824 72368595/536870912 -410953249/1073741824	1078468045/1073741824 239334481/1073741824 -653498375/536870912	17245257/1073741824 -193369595/1073741824 -1084183391/1073741824
-71695017/134217728 33932337/536870912 307486955/1073741824	228000675/268435456 -57453595/1073741824 1243882075/1073741824	373341021/536870912 290802921/1073741824 -173629485/536870912
--78857697/134217728 381877103/536870912 -176599/1048576	-136980707/268435456 995667379/1073741824 -1040586757/1073741824	-542727015/1073741824 516639987/536870912 -597774549/536870912
-60284491/536870912 -203745881/268435456 -712460715/1073741824	476350319/1073741824 -275529127/268435456 -524540607/536870912	-644015539/1073741824 -1467332703/1073741824 -541082325/536870912
-16752201/1073741824 -218292267/268435456 617929181/1073741824	420506795/1073741824 -336954981/268435456 -92393909/536870912	-21459129/536870912 -542327473/536870912 1541807651/1073741824
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle2.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle2.txt
deleted file mode 100644
index 15ccc43..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle2.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-8
-5/1 0/1 15/1      15/1 0/1 15/1       10/1 15/1 15/1
-9/1 4/1 16/1      7/1 -2/1 14/1       11/1 -2/1 14/1
-8/1 5/1 3/1       20/1 5/1 37/1       17/1 12/1 37/1
-20/1 20/1 23/1    24/1 21/1 23/1      21/1 21/1 23/1
-20/1 20/1 20/1    24/1 21/1 25/1      21/1 21/1 25/1
-0/1 0/1 4/1     4/1 1/1 4/1         1/1 2/1 4/1
-3/2 0/1 3/1     3/1 0/1 3/1         2/1 3/1 3/1
-1/3 2/3 4/1     2/3 4/3 4/1         -1/1 3/1 5/1
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle3.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle3.txt
deleted file mode 100644
index 68d51f9..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle3.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-6
-0/1 -2/1 -2/1      2/1 -2/1 -2/1       1/1 10/1 10/1
-3/1 -2/1 -2/1      5/1 -2/1 -2/1       4/1 10/1 10/1
-6/1 -2/1 -2/1      8/1 -2/1 -2/1       7/1 10/1 10/1
--2/1 0/1 1/1      -2/1 2/1 1/1       10/1 1/1 1/1
--2/1 3/1 4/1      -2/1 5/1 4/1       10/1 4/1 4/1
--2/1 6/1 7/1      -2/1 8/1 7/1       10/1 7/1 7/1
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle4.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle4.txt
deleted file mode 100644
index 33ea39e..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle4.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-4
--1/1 0/1 0/1      1/1 0/1 0/1         0/1 2/1 0/1
--3/1 -2/1 8/1     3/1 -2/1 8/1        0/1 4/1 2/1
--5/1 -4/1 5/1     5/1 -4/1 5/1        0/1 6/1 6/1
--7/1 -6/1 6/1     7/1 -6/1 6/1        0/1 8/1 5/1
-
--3/1 -2/1 8/1     3/1 -2/1 8/1        0/1 4/1 2/1
--5/1 -4/1 5/1     5/1 -4/1 5/1        0/1 6/1 6/1
--7/1 -6/1 6/1     7/1 -6/1 6/1        0/1 8/1 5/1
--1/1 0/1 0/1      1/1 0/1 0/1         0/1 2/1 0/1
-
-// also try this order
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle5.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle5.txt
deleted file mode 100644
index c064915..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle5.txt
+++ /dev/null
@@ -1,865 +0,0 @@
-         284
-         1.50000 1.50000 0.00000
-         1.50000 1.11177 0.05111
-         1.11177 1.50000 0.05111
-         1.50000 1.50000 0.00000
-         1.50000 1.88823 0.05111
-         1.88823 1.50000 0.05111
-         1.11177 1.50000 0.05111
-         1.50000 1.88823 0.05111
-         1.50000 1.50000 0.00000
-         1.88823 1.50000 0.05111
-         1.50000 1.11177 0.05111
-         1.50000 1.50000 0.00000
-         1.11177 1.50000 0.05111
-         1.06982 1.02165 0.14496
-         0.75000 1.50000 0.20096
-         1.50000 0.75000 0.20096
-         1.06982 1.02165 0.14496
-         1.50000 1.11177 0.05111
-         1.50000 1.88823 0.05111
-         1.06982 1.97835 0.14496
-         1.50000 2.25000 0.20096
-         1.93018 1.02165 0.14496
-         1.50000 1.11177 0.05111
-         1.88823 1.50000 0.05111
-         1.06982 1.97835 0.14496
-         1.50000 1.88823 0.05111
-         1.11177 1.50000 0.05111
-         0.75000 1.50000 0.20096
-         1.06982 1.97835 0.14496
-         1.11177 1.50000 0.05111
-         2.25000 1.50000 0.20096
-         1.93018 1.02165 0.14496
-         1.88823 1.50000 0.05111
-         1.88823 1.50000 0.05111
-         1.50000 1.88823 0.05111
-         1.93018 1.97835 0.14496
-         1.50000 1.11177 0.05111
-         1.93018 1.02165 0.14496
-         1.50000 0.75000 0.20096
-         1.50000 2.25000 0.20096
-         1.93018 1.97835 0.14496
-         1.50000 1.88823 0.05111
-         1.88823 1.50000 0.05111
-         1.93018 1.97835 0.14496
-         2.25000 1.50000 0.20096
-         1.11177 1.50000 0.05111
-         1.50000 1.11177 0.05111
-         1.06982 1.02165 0.14496
-         1.06585 0.60236 0.37939
-         0.67825 0.97447 0.36046
-         1.06982 1.02165 0.14496
-         1.06982 1.02165 0.14496
-         1.50000 0.75000 0.20096
-         1.06585 0.60236 0.37939
-         2.32175 2.02553 0.36046
-         2.25000 1.50000 0.20096
-         1.93018 1.97835 0.14496
-         1.93415 2.39764 0.37939
-         2.32175 2.02553 0.36046
-         1.93018 1.97835 0.14496
-         0.67825 0.97447 0.36046
-         0.75000 1.50000 0.20096
-         1.06982 1.02165 0.14496
-         1.93018 1.97835 0.14496
-         1.50000 2.25000 0.20096
-         1.93415 2.39764 0.37939
-         1.06585 2.39764 0.37939
-         1.50000 2.25000 0.20096
-         1.06982 1.97835 0.14496
-         1.93018 1.02165 0.14496
-         2.25000 1.50000 0.20096
-         2.32175 0.97447 0.36046
-         1.93415 0.60236 0.37939
-         1.50000 0.75000 0.20096
-         1.93018 1.02165 0.14496
-         1.06982 1.97835 0.14496
-         0.67825 2.02553 0.36046
-         1.06585 2.39764 0.37939
-         1.93018 1.02165 0.14496
-         2.32175 0.97447 0.36046
-         1.93415 0.60236 0.37939
-         1.06982 1.97835 0.14496
-         0.75000 1.50000 0.20096
-         0.67825 2.02553 0.36046
-         2.56066 1.50000 0.43934
-         2.32175 0.97447 0.36046
-         2.25000 1.50000 0.20096
-         1.50000 2.25000 0.20096
-         1.06585 2.39764 0.37939
-         1.50000 2.56066 0.43934
-         1.50000 2.56066 0.43934
-         1.93415 2.39764 0.37939
-         1.50000 2.25000 0.20096
-         2.25000 1.50000 0.20096
-         2.32175 2.02553 0.36046
-         2.56066 1.50000 0.43934
-         1.50000 0.75000 0.20096
-         1.93415 0.60236 0.37939
-         1.50000 0.43934 0.43934
-         1.50000 0.43934 0.43934
-         1.06585 0.60236 0.37939
-         1.50000 0.75000 0.20096
-         0.75000 1.50000 0.20096
-         0.67825 0.97447 0.36046
-         0.43934 1.50000 0.43934
-         0.43934 1.50000 0.43934
-         0.67825 2.02553 0.36046
-         0.75000 1.50000 0.20096
-         0.67825 2.02553 0.36046
-         0.43934 1.50000 0.43934
-         0.36046 2.02553 0.67825
-         0.67842 0.55132 0.67842
-         0.36046 0.97447 0.67825
-         0.67825 0.97447 0.36046
-         2.63954 2.02553 0.67825
-         2.56066 1.50000 0.43934
-         2.32175 2.02553 0.36046
-         2.32158 2.44868 0.67842
-         2.63954 2.02553 0.67825
-         2.32175 2.02553 0.36046
-         0.36046 0.97447 0.67825
-         0.43934 1.50000 0.43934
-         0.67825 0.97447 0.36046
-         2.32158 0.55132 0.67842
-         1.93415 0.60236 0.37939
-         2.32175 0.97447 0.36046
-         2.32175 0.97447 0.36046
-         2.63954 0.97447 0.67825
-         2.32158 0.55132 0.67842
-         0.67825 2.02553 0.36046
-         0.36046 2.02553 0.67825
-         0.67842 2.44868 0.67842
-         2.32175 0.97447 0.36046
-         2.56066 1.50000 0.43934
-         2.63954 0.97447 0.67825
-         2.32175 2.02553 0.36046
-         1.93415 2.39764 0.37939
-         2.32158 2.44868 0.67842
-         0.67842 2.44868 0.67842
-         1.06585 2.39764 0.37939
-         0.67825 2.02553 0.36046
-         0.67825 0.97447 0.36046
-         1.06585 0.60236 0.37939
-         0.67842 0.55132 0.67842
-         1.06585 0.60236 0.37939
-         1.50000 0.43934 0.43934
-         1.08111 0.29386 0.71275
-         1.08111 0.29386 0.71275
-         0.67842 0.55132 0.67842
-         1.06585 0.60236 0.37939
-         1.91889 2.70614 0.71275
-         2.32158 2.44868 0.67842
-         1.93415 2.39764 0.37939
-         1.93415 2.39764 0.37939
-         1.50000 2.56066 0.43934
-         1.91889 2.70614 0.71275
-         1.91889 0.29386 0.71275
-         1.50000 0.43934 0.43934
-         1.93415 0.60236 0.37939
-         1.93415 0.60236 0.37939
-         2.32158 0.55132 0.67842
-         1.91889 0.29386 0.71275
-         1.08111 2.70614 0.71275
-         1.50000 2.56066 0.43934
-         1.06585 2.39764 0.37939
-         1.06585 2.39764 0.37939
-         0.67842 2.44868 0.67842
-         1.08111 2.70614 0.71275
-         0.20096 1.50000 0.75000
-         0.36046 2.02553 0.67825
-         0.43934 1.50000 0.43934
-         1.50000 2.79904 0.75000
-         1.91889 2.70614 0.71275
-         1.50000 2.56066 0.43934
-         1.50000 0.43934 0.43934
-         1.91889 0.29386 0.71275
-         1.50000 0.20096 0.75000
-         1.50000 2.56066 0.43934
-         1.08111 2.70614 0.71275
-         1.50000 2.79904 0.75000
-         2.79904 1.50000 0.75000
-         2.63954 0.97447 0.67825
-         2.56066 1.50000 0.43934
-         0.43934 1.50000 0.43934
-         0.36046 0.97447 0.67825
-         0.20096 1.50000 0.75000
-         2.56066 1.50000 0.43934
-         2.63954 2.02553 0.67825
-         2.79904 1.50000 0.75000
-         1.50000 0.20096 0.75000
-         1.08111 0.29386 0.71275
-         1.50000 0.43934 0.43934
-         2.62060 0.60236 1.06585
-         2.32158 0.55132 0.67842
-         2.63954 0.97447 0.67825
-         0.37939 2.39764 1.06585
-         0.67842 2.44868 0.67842
-         0.36046 2.02553 0.67825
-         2.85504 1.02165 1.06982
-         2.62060 0.60236 1.06585
-         2.63954 0.97447 0.67825
-         2.63954 0.97447 0.67825
-         2.79904 1.50000 0.75000
-         2.85504 1.02165 1.06982
-         0.14496 1.97835 1.06982
-         0.37939 2.39764 1.06585
-         0.36046 2.02553 0.67825
-         0.36046 2.02553 0.67825
-         0.20096 1.50000 0.75000
-         0.14496 1.97835 1.06982
-         2.63954 2.02553 0.67825
-         2.62060 2.39764 1.06585
-         2.85504 1.97835 1.06982
-         2.63954 2.02553 0.67825
-         2.32158 2.44868 0.67842
-         2.62060 2.39764 1.06585
-         0.14496 1.02165 1.06982
-         0.20096 1.50000 0.75000
-         0.36046 0.97447 0.67825
-         0.36046 0.97447 0.67825
-         0.37939 0.60236 1.06585
-         0.14496 1.02165 1.06982
-         2.85504 1.97835 1.06982
-         2.79904 1.50000 0.75000
-         2.63954 2.02553 0.67825
-         0.36046 0.97447 0.67825
-         0.67842 0.55132 0.67842
-         0.37939 0.60236 1.06585
-         2.28725 2.70614 1.08111
-         2.62060 2.39764 1.06585
-         2.32158 2.44868 0.67842
-         0.67842 0.55132 0.67842
-         1.08111 0.29386 0.71275
-         0.71275 0.29386 1.08111
-         0.71275 0.29386 1.08111
-         0.37939 0.60236 1.06585
-         0.67842 0.55132 0.67842
-         2.32158 2.44868 0.67842
-         1.91889 2.70614 0.71275
-         2.28725 2.70614 1.08111
-         0.71275 2.70614 1.08111
-         1.08111 2.70614 0.71275
-         0.67842 2.44868 0.67842
-         0.67842 2.44868 0.67842
-         0.37939 2.39764 1.06585
-         0.71275 2.70614 1.08111
-         2.28725 0.29386 1.08111
-         1.91889 0.29386 0.71275
-         2.32158 0.55132 0.67842
-         2.32158 0.55132 0.67842
-         2.62060 0.60236 1.06585
-         2.28725 0.29386 1.08111
-         1.90089 0.11127 1.09911
-         1.50000 0.20096 0.75000
-         1.91889 0.29386 0.71275
-         1.91889 2.70614 0.71275
-         1.50000 2.79904 0.75000
-         1.90089 2.88873 1.09911
-         1.91889 0.29386 0.71275
-         2.28725 0.29386 1.08111
-         1.90089 0.11127 1.09911
-         1.08111 0.29386 0.71275
-         1.50000 0.20096 0.75000
-         1.09911 0.11127 1.09911
-         1.90089 2.88873 1.09911
-         2.28725 2.70614 1.08111
-         1.91889 2.70614 0.71275
-         1.09911 2.88873 1.09911
-         1.50000 2.79904 0.75000
-         1.08111 2.70614 0.71275
-         1.08111 2.70614 0.71275
-         0.71275 2.70614 1.08111
-         1.09911 2.88873 1.09911
-         1.09911 0.11127 1.09911
-         0.71275 0.29386 1.08111
-         1.08111 0.29386 0.71275
-         2.94889 1.50000 1.11177
-         2.85504 1.02165 1.06982
-         2.79904 1.50000 0.75000
-         1.50000 0.20096 0.75000
-         1.90089 0.11127 1.09911
-         1.50000 0.05111 1.11177
-         1.50000 2.94889 1.11177
-         1.90089 2.88873 1.09911
-         1.50000 2.79904 0.75000
-         2.79904 1.50000 0.75000
-         2.85504 1.97835 1.06982
-         2.94889 1.50000 1.11177
-         1.50000 2.79904 0.75000
-         1.09911 2.88873 1.09911
-         1.50000 2.94889 1.11177
-         1.50000 0.05111 1.11177
-         1.09911 0.11127 1.09911
-         1.50000 0.20096 0.75000
-         0.05111 1.50000 1.11177
-         0.14496 1.97835 1.06982
-         0.20096 1.50000 0.75000
-         0.20096 1.50000 0.75000
-         0.14496 1.02165 1.06982
-         0.05111 1.50000 1.11177
-         0.37939 2.39764 1.06585
-         0.14496 1.97835 1.06982
-         0.20096 2.25000 1.50000
-         0.20096 0.75000 1.50000
-         0.14496 1.02165 1.06982
-         0.37939 0.60236 1.06585
-         2.62060 0.60236 1.06585
-         2.85504 1.02165 1.06982
-         2.79904 0.75000 1.50000
-         0.37939 0.60236 1.06585
-         0.71275 0.29386 1.08111
-         0.43934 0.43934 1.50000
-         0.37939 0.60236 1.06585
-         0.43934 0.43934 1.50000
-         0.20096 0.75000 1.50000
-         2.62060 2.39764 1.06585
-         2.56066 2.56066 1.50000
-         2.79904 2.25000 1.50000
-         0.43934 2.56066 1.50000
-         0.71275 2.70614 1.08111
-         0.37939 2.39764 1.06585
-         2.62060 2.39764 1.06585
-         2.28725 2.70614 1.08111
-         2.56066 2.56066 1.50000
-         2.79904 2.25000 1.50000
-         2.85504 1.97835 1.06982
-         2.62060 2.39764 1.06585
-         2.56066 0.43934 1.50000
-         2.28725 0.29386 1.08111
-         2.62060 0.60236 1.06585
-         2.79904 0.75000 1.50000
-         2.56066 0.43934 1.50000
-         2.62060 0.60236 1.06585
-         0.20096 2.25000 1.50000
-         0.43934 2.56066 1.50000
-         0.37939 2.39764 1.06585
-         0.14496 1.02165 1.06982
-         0.20096 0.75000 1.50000
-         0.05111 1.11177 1.50000
-         0.05111 1.88823 1.50000
-         0.20096 2.25000 1.50000
-         0.14496 1.97835 1.06982
-         0.14496 1.97835 1.06982
-         0.05111 1.50000 1.11177
-         0.05111 1.88823 1.50000
-         2.85504 1.02165 1.06982
-         2.94889 1.50000 1.11177
-         2.94889 1.11177 1.50000
-         2.94889 1.11177 1.50000
-         2.79904 0.75000 1.50000
-         2.85504 1.02165 1.06982
-         0.05111 1.11177 1.50000
-         0.05111 1.50000 1.11177
-         0.14496 1.02165 1.06982
-         2.85504 1.97835 1.06982
-         2.79904 2.25000 1.50000
-         2.94889 1.88823 1.50000
-         2.94889 1.88823 1.50000
-         2.94889 1.50000 1.11177
-         2.85504 1.97835 1.06982
-         0.71275 0.29386 1.08111
-         0.75000 0.20096 1.50000
-         0.43934 0.43934 1.50000
-         2.25000 0.20096 1.50000
-         1.90089 0.11127 1.09911
-         2.28725 0.29386 1.08111
-         0.75000 2.79904 1.50000
-         1.09911 2.88873 1.09911
-         0.71275 2.70614 1.08111
-         2.28725 2.70614 1.08111
-         2.25000 2.79904 1.50000
-         2.56066 2.56066 1.50000
-         0.43934 2.56066 1.50000
-         0.75000 2.79904 1.50000
-         0.71275 2.70614 1.08111
-         0.71275 0.29386 1.08111
-         1.09911 0.11127 1.09911
-         0.75000 0.20096 1.50000
-         2.28725 2.70614 1.08111
-         1.90089 2.88873 1.09911
-         2.25000 2.79904 1.50000
-         2.56066 0.43934 1.50000
-         2.25000 0.20096 1.50000
-         2.28725 0.29386 1.08111
-         1.88823 0.05111 1.50000
-         1.50000 0.05111 1.11177
-         1.90089 0.11127 1.09911
-         1.11177 2.94889 1.50000
-         1.50000 2.94889 1.11177
-         1.09911 2.88873 1.09911
-         1.09911 0.11127 1.09911
-         1.11177 0.05111 1.50000
-         0.75000 0.20096 1.50000
-         1.09911 0.11127 1.09911
-         1.50000 0.05111 1.11177
-         1.11177 0.05111 1.50000
-         1.90089 2.88873 1.09911
-         1.50000 2.94889 1.11177
-         1.88823 2.94889 1.50000
-         1.90089 2.88873 1.09911
-         1.88823 2.94889 1.50000
-         2.25000 2.79904 1.50000
-         0.75000 2.79904 1.50000
-         1.11177 2.94889 1.50000
-         1.09911 2.88873 1.09911
-         2.25000 0.20096 1.50000
-         1.88823 0.05111 1.50000
-         1.90089 0.11127 1.09911
-         1.50000 0.05111 1.11177
-         1.50000 0.00000 1.50000
-         1.11177 0.05111 1.50000
-         1.50000 2.94889 1.11177
-         1.50000 3.00000 1.50000
-         1.88823 2.94889 1.50000
-         2.94889 1.50000 1.11177
-         2.94889 1.88823 1.50000
-         3.00000 1.50000 1.50000
-         1.11177 2.94889 1.50000
-         1.50000 3.00000 1.50000
-         1.50000 2.94889 1.11177
-         0.05111 1.50000 1.11177
-         0.05111 1.11177 1.50000
-         0.00000 1.50000 1.50000
-         3.00000 1.50000 1.50000
-         2.94889 1.11177 1.50000
-         2.94889 1.50000 1.11177
-         1.88823 0.05111 1.50000
-         1.50000 0.00000 1.50000
-         1.50000 0.05111 1.11177
-         0.00000 1.50000 1.50000
-         0.05111 1.88823 1.50000
-         0.05111 1.50000 1.11177
-         2.85504 1.97835 1.93018
-         2.94889 1.88823 1.50000
-         2.79904 2.25000 1.50000
-         2.62060 2.39764 1.93415
-         2.85504 1.97835 1.93018
-         2.79904 2.25000 1.50000
-         1.09911 0.11127 1.90089
-         0.75000 0.20096 1.50000
-         1.11177 0.05111 1.50000
-         2.94889 1.50000 1.88823
-         3.00000 1.50000 1.50000
-         2.94889 1.88823 1.50000
-         2.85504 1.97835 1.93018
-         2.94889 1.50000 1.88823
-         2.94889 1.88823 1.50000
-         0.71275 0.29386 1.91889
-         0.43934 0.43934 1.50000
-         0.75000 0.20096 1.50000
-         2.94889 1.11177 1.50000
-         2.94889 1.50000 1.88823
-         2.85504 1.02165 1.93018
-         2.94889 1.11177 1.50000
-         3.00000 1.50000 1.50000
-         2.94889 1.50000 1.88823
-         0.75000 0.20096 1.50000
-         1.09911 0.11127 1.90089
-         0.71275 0.29386 1.91889
-         1.50000 0.05111 1.88823
-         1.11177 0.05111 1.50000
-         1.50000 0.00000 1.50000
-         0.43934 0.43934 1.50000
-         0.71275 0.29386 1.91889
-         0.37939 0.60236 1.93415
-         2.79904 0.75000 1.50000
-         2.85504 1.02165 1.93018
-         2.62060 0.60236 1.93415
-         2.79904 0.75000 1.50000
-         2.94889 1.11177 1.50000
-         2.85504 1.02165 1.93018
-         1.50000 3.00000 1.50000
-         1.11177 2.94889 1.50000
-         1.50000 2.94889 1.88823
-         1.11177 2.94889 1.50000
-         0.75000 2.79904 1.50000
-         1.09911 2.88873 1.90089
-         2.62060 0.60236 1.93415
-         2.28725 0.29386 1.91889
-         2.56066 0.43934 1.50000
-         2.62060 2.39764 1.93415
-         2.79904 2.25000 1.50000
-         2.56066 2.56066 1.50000
-         2.56066 2.56066 1.50000
-         2.28725 2.70614 1.91889
-         2.62060 2.39764 1.93415
-         1.09911 2.88873 1.90089
-         1.50000 2.94889 1.88823
-         1.11177 2.94889 1.50000
-         1.11177 0.05111 1.50000
-         1.50000 0.05111 1.88823
-         1.09911 0.11127 1.90089
-         2.56066 0.43934 1.50000
-         2.79904 0.75000 1.50000
-         2.62060 0.60236 1.93415
-         0.75000 2.79904 1.50000
-         0.43934 2.56066 1.50000
-         0.71275 2.70614 1.91889
-         0.71275 2.70614 1.91889
-         1.09911 2.88873 1.90089
-         0.75000 2.79904 1.50000
-         2.28725 2.70614 1.91889
-         2.56066 2.56066 1.50000
-         2.25000 2.79904 1.50000
-         2.25000 2.79904 1.50000
-         1.90089 2.88873 1.90089
-         2.28725 2.70614 1.91889
-         0.20096 2.25000 1.50000
-         0.05111 1.88823 1.50000
-         0.14496 1.97835 1.93018
-         0.20096 2.25000 1.50000
-         0.14496 1.97835 1.93018
-         0.37939 2.39764 1.93415
-         2.28725 0.29386 1.91889
-         1.90089 0.11127 1.90089
-         2.25000 0.20096 1.50000
-         1.90089 2.88873 1.90089
-         2.25000 2.79904 1.50000
-         1.88823 2.94889 1.50000
-         1.88823 2.94889 1.50000
-         1.50000 2.94889 1.88823
-         1.90089 2.88873 1.90089
-         0.37939 0.60236 1.93415
-         0.20096 0.75000 1.50000
-         0.43934 0.43934 1.50000
-         1.50000 2.94889 1.88823
-         1.88823 2.94889 1.50000
-         1.50000 3.00000 1.50000
-         2.25000 0.20096 1.50000
-         2.56066 0.43934 1.50000
-         2.28725 0.29386 1.91889
-         0.37939 0.60236 1.93415
-         0.14496 1.02165 1.93018
-         0.20096 0.75000 1.50000
-         1.90089 0.11127 1.90089
-         1.50000 0.05111 1.88823
-         1.88823 0.05111 1.50000
-         0.37939 2.39764 1.93415
-         0.71275 2.70614 1.91889
-         0.43934 2.56066 1.50000
-         0.05111 1.88823 1.50000
-         0.00000 1.50000 1.50000
-         0.05111 1.50000 1.88823
-         1.88823 0.05111 1.50000
-         2.25000 0.20096 1.50000
-         1.90089 0.11127 1.90089
-         1.50000 0.00000 1.50000
-         1.88823 0.05111 1.50000
-         1.50000 0.05111 1.88823
-         0.05111 1.50000 1.88823
-         0.00000 1.50000 1.50000
-         0.05111 1.11177 1.50000
-         0.14496 1.02165 1.93018
-         0.05111 1.50000 1.88823
-         0.05111 1.11177 1.50000
-         0.43934 2.56066 1.50000
-         0.20096 2.25000 1.50000
-         0.37939 2.39764 1.93415
-         0.14496 1.02165 1.93018
-         0.05111 1.11177 1.50000
-         0.20096 0.75000 1.50000
-         0.05111 1.88823 1.50000
-         0.05111 1.50000 1.88823
-         0.14496 1.97835 1.93018
-         1.50000 2.94889 1.88823
-         1.09911 2.88873 1.90089
-         1.50000 2.79904 2.25000
-         2.94889 1.50000 1.88823
-         2.85504 1.97835 1.93018
-         2.79904 1.50000 2.25000
-         0.20096 1.50000 2.25000
-         0.14496 1.97835 1.93018
-         0.05111 1.50000 1.88823
-         1.50000 0.05111 1.88823
-         1.90089 0.11127 1.90089
-         1.50000 0.20096 2.25000
-         1.50000 2.79904 2.25000
-         1.90089 2.88873 1.90089
-         1.50000 2.94889 1.88823
-         0.05111 1.50000 1.88823
-         0.14496 1.02165 1.93018
-         0.20096 1.50000 2.25000
-         2.79904 1.50000 2.25000
-         2.85504 1.02165 1.93018
-         2.94889 1.50000 1.88823
-         1.50000 0.20096 2.25000
-         1.09911 0.11127 1.90089
-         1.50000 0.05111 1.88823
-         1.09911 0.11127 1.90089
-         1.50000 0.20096 2.25000
-         1.08111 0.29386 2.28725
-         1.08111 0.29386 2.28725
-         0.71275 0.29386 1.91889
-         1.09911 0.11127 1.90089
-         1.90089 2.88873 1.90089
-         1.50000 2.79904 2.25000
-         1.91889 2.70614 2.28725
-         1.91889 2.70614 2.28725
-         2.28725 2.70614 1.91889
-         1.90089 2.88873 1.90089
-         1.91889 0.29386 2.28725
-         1.50000 0.20096 2.25000
-         1.90089 0.11127 1.90089
-         1.90089 0.11127 1.90089
-         2.28725 0.29386 1.91889
-         1.91889 0.29386 2.28725
-         1.09911 2.88873 1.90089
-         0.71275 2.70614 1.91889
-         1.08111 2.70614 2.28725
-         1.08111 2.70614 2.28725
-         1.50000 2.79904 2.25000
-         1.09911 2.88873 1.90089
-         2.28725 2.70614 1.91889
-         1.91889 2.70614 2.28725
-         2.32158 2.44868 2.32158
-         0.67842 0.55132 2.32158
-         0.37939 0.60236 1.93415
-         0.71275 0.29386 1.91889
-         0.71275 0.29386 1.91889
-         1.08111 0.29386 2.28725
-         0.67842 0.55132 2.32158
-         2.32158 2.44868 2.32158
-         2.62060 2.39764 1.93415
-         2.28725 2.70614 1.91889
-         0.67842 2.44868 2.32158
-         1.08111 2.70614 2.28725
-         0.71275 2.70614 1.91889
-         2.32158 0.55132 2.32158
-         1.91889 0.29386 2.28725
-         2.28725 0.29386 1.91889
-         2.28725 0.29386 1.91889
-         2.62060 0.60236 1.93415
-         2.32158 0.55132 2.32158
-         0.71275 2.70614 1.91889
-         0.37939 2.39764 1.93415
-         0.67842 2.44868 2.32158
-         0.14496 1.97835 1.93018
-         0.20096 1.50000 2.25000
-         0.36046 2.02553 2.32175
-         2.85504 1.02165 1.93018
-         2.79904 1.50000 2.25000
-         2.63954 0.97447 2.32175
-         0.36046 2.02553 2.32175
-         0.37939 2.39764 1.93415
-         0.14496 1.97835 1.93018
-         2.63954 0.97447 2.32175
-         2.62060 0.60236 1.93415
-         2.85504 1.02165 1.93018
-         2.63954 2.02553 2.32175
-         2.79904 1.50000 2.25000
-         2.85504 1.97835 1.93018
-         0.36046 0.97447 2.32175
-         0.20096 1.50000 2.25000
-         0.14496 1.02165 1.93018
-         2.85504 1.97835 1.93018
-         2.62060 2.39764 1.93415
-         2.63954 2.02553 2.32175
-         0.14496 1.02165 1.93018
-         0.37939 0.60236 1.93415
-         0.36046 0.97447 2.32175
-         0.37939 0.60236 1.93415
-         0.67842 0.55132 2.32158
-         0.36046 0.97447 2.32175
-         2.63954 0.97447 2.32175
-         2.32158 0.55132 2.32158
-         2.62060 0.60236 1.93415
-         0.36046 2.02553 2.32175
-         0.67842 2.44868 2.32158
-         0.37939 2.39764 1.93415
-         2.62060 2.39764 1.93415
-         2.32158 2.44868 2.32158
-         2.63954 2.02553 2.32175
-         2.56066 1.50000 2.56066
-         2.63954 0.97447 2.32175
-         2.79904 1.50000 2.25000
-         1.50000 2.56066 2.56066
-         1.91889 2.70614 2.28725
-         1.50000 2.79904 2.25000
-         0.20096 1.50000 2.25000
-         0.36046 0.97447 2.32175
-         0.43934 1.50000 2.56066
-         2.79904 1.50000 2.25000
-         2.63954 2.02553 2.32175
-         2.56066 1.50000 2.56066
-         1.50000 0.43934 2.56066
-         1.08111 0.29386 2.28725
-         1.50000 0.20096 2.25000
-         1.50000 2.79904 2.25000
-         1.08111 2.70614 2.28725
-         1.50000 2.56066 2.56066
-         0.43934 1.50000 2.56066
-         0.36046 2.02553 2.32175
-         0.20096 1.50000 2.25000
-         1.50000 0.20096 2.25000
-         1.91889 0.29386 2.28725
-         1.50000 0.43934 2.56066
-         1.08111 2.70614 2.28725
-         0.67842 2.44868 2.32158
-         1.06585 2.39764 2.62060
-         1.06585 0.60236 2.62060
-         0.67842 0.55132 2.32158
-         1.08111 0.29386 2.28725
-         1.93415 0.60236 2.62060
-         1.50000 0.43934 2.56066
-         1.91889 0.29386 2.28725
-         1.91889 2.70614 2.28725
-         1.50000 2.56066 2.56066
-         1.93415 2.39764 2.62060
-         1.08111 0.29386 2.28725
-         1.50000 0.43934 2.56066
-         1.06585 0.60236 2.62060
-         1.06585 2.39764 2.62060
-         1.50000 2.56066 2.56066
-         1.08111 2.70614 2.28725
-         1.93415 2.39764 2.62060
-         2.32158 2.44868 2.32158
-         1.91889 2.70614 2.28725
-         1.91889 0.29386 2.28725
-         2.32158 0.55132 2.32158
-         1.93415 0.60236 2.62060
-         0.67825 2.02553 2.63954
-         1.06585 2.39764 2.62060
-         0.67842 2.44868 2.32158
-         0.67842 0.55132 2.32158
-         1.06585 0.60236 2.62060
-         0.67825 0.97447 2.63954
-         2.32175 2.02553 2.63954
-         2.63954 2.02553 2.32175
-         2.32158 2.44868 2.32158
-         2.32158 2.44868 2.32158
-         1.93415 2.39764 2.62060
-         2.32175 2.02553 2.63954
-         2.32175 0.97447 2.63954
-         1.93415 0.60236 2.62060
-         2.32158 0.55132 2.32158
-         2.32158 0.55132 2.32158
-         2.63954 0.97447 2.32175
-         2.32175 0.97447 2.63954
-         0.67825 0.97447 2.63954
-         0.36046 0.97447 2.32175
-         0.67842 0.55132 2.32158
-         0.67842 2.44868 2.32158
-         0.36046 2.02553 2.32175
-         0.67825 2.02553 2.63954
-         2.32175 2.02553 2.63954
-         2.56066 1.50000 2.56066
-         2.63954 2.02553 2.32175
-         0.67825 0.97447 2.63954
-         0.43934 1.50000 2.56066
-         0.36046 0.97447 2.32175
-         2.63954 0.97447 2.32175
-         2.56066 1.50000 2.56066
-         2.32175 0.97447 2.63954
-         0.36046 2.02553 2.32175
-         0.43934 1.50000 2.56066
-         0.67825 2.02553 2.63954
-         0.43934 1.50000 2.56066
-         0.67825 0.97447 2.63954
-         0.75000 1.50000 2.79904
-         0.75000 1.50000 2.79904
-         0.67825 2.02553 2.63954
-         0.43934 1.50000 2.56066
-         1.50000 2.56066 2.56066
-         1.06585 2.39764 2.62060
-         1.50000 2.25000 2.79904
-         1.50000 0.75000 2.79904
-         1.06585 0.60236 2.62060
-         1.50000 0.43934 2.56066
-         2.25000 1.50000 2.79904
-         2.32175 0.97447 2.63954
-         2.56066 1.50000 2.56066
-         2.56066 1.50000 2.56066
-         2.32175 2.02553 2.63954
-         2.25000 1.50000 2.79904
-         1.50000 2.25000 2.79904
-         1.93415 2.39764 2.62060
-         1.50000 2.56066 2.56066
-         1.50000 0.43934 2.56066
-         1.93415 0.60236 2.62060
-         1.50000 0.75000 2.79904
-         1.06585 2.39764 2.62060
-         0.67825 2.02553 2.63954
-         1.06982 1.97835 2.85504
-         1.93018 1.97835 2.85504
-         2.32175 2.02553 2.63954
-         1.93415 2.39764 2.62060
-         1.93415 2.39764 2.62060
-         1.50000 2.25000 2.79904
-         1.93018 1.97835 2.85504
-         1.06982 1.02165 2.85504
-         0.67825 0.97447 2.63954
-         1.06585 0.60236 2.62060
-         1.93415 0.60236 2.62060
-         2.32175 0.97447 2.63954
-         1.93018 1.02165 2.85504
-         1.06982 1.97835 2.85504
-         1.50000 2.25000 2.79904
-         1.06585 2.39764 2.62060
-         1.93018 1.02165 2.85504
-         1.50000 0.75000 2.79904
-         1.93415 0.60236 2.62060
-         1.06585 0.60236 2.62060
-         1.50000 0.75000 2.79904
-         1.06982 1.02165 2.85504
-         1.93018 1.97835 2.85504
-         2.25000 1.50000 2.79904
-         2.32175 2.02553 2.63954
-         2.32175 0.97447 2.63954
-         2.25000 1.50000 2.79904
-         1.93018 1.02165 2.85504
-         0.67825 2.02553 2.63954
-         0.75000 1.50000 2.79904
-         1.06982 1.97835 2.85504
-         1.06982 1.02165 2.85504
-         0.75000 1.50000 2.79904
-         0.67825 0.97447 2.63954
-         2.25000 1.50000 2.79904
-         1.93018 1.97835 2.85504
-         1.88823 1.50000 2.94889
-         1.88823 1.50000 2.94889
-         1.93018 1.02165 2.85504
-         2.25000 1.50000 2.79904
-         1.50000 2.25000 2.79904
-         1.06982 1.97835 2.85504
-         1.50000 1.88823 2.94889
-         1.50000 0.75000 2.79904
-         1.93018 1.02165 2.85504
-         1.50000 1.11177 2.94889
-         0.75000 1.50000 2.79904
-         1.06982 1.02165 2.85504
-         1.11177 1.50000 2.94889
-         1.50000 1.88823 2.94889
-         1.93018 1.97835 2.85504
-         1.50000 2.25000 2.79904
-         1.11177 1.50000 2.94889
-         1.06982 1.97835 2.85504
-         0.75000 1.50000 2.79904
-         1.50000 1.11177 2.94889
-         1.06982 1.02165 2.85504
-         1.50000 0.75000 2.79904
-         1.50000 1.88823 2.94889
-         1.88823 1.50000 2.94889
-         1.93018 1.97835 2.85504
-         1.93018 1.02165 2.85504
-         1.88823 1.50000 2.94889
-         1.50000 1.11177 2.94889
-         1.06982 1.97835 2.85504
-         1.11177 1.50000 2.94889
-         1.50000 1.88823 2.94889
-         1.50000 1.11177 2.94889
-         1.11177 1.50000 2.94889
-         1.06982 1.02165 2.85504
-         1.50000 1.88823 2.94889
-         1.11177 1.50000 2.94889
-         1.50000 1.50000 3.00000
-         1.50000 1.11177 2.94889
-         1.88823 1.50000 2.94889
-         1.50000 1.50000 3.00000
-         1.50000 1.50000 3.00000
-         1.11177 1.50000 2.94889
-         1.50000 1.11177 2.94889
-         1.50000 1.50000 3.00000
-         1.88823 1.50000 2.94889
-         1.50000 1.88823 2.94889
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle6.txt b/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle6.txt
deleted file mode 100644
index 2e6be52..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/data/triangles/triangle6.txt
+++ /dev/null
@@ -1,12482 +0,0 @@
-4160
--104.532994 -35.487000 -69.705099
--103.358097 -28.996099 -70.331104
--94.126999 -32.889001 -72.998099
--46.496000 -83.823994 -10.856000
--51.401101 -89.661099 -0.450000
--43.398000 -86.236097 -9.037000
--8.676000 25.106002 -3.143000
--11.182999 26.186001 -5.416000
--9.219000 23.919001 -6.218000
--13.584000 -98.457098 -20.534100
--9.614999 -99.194996 -18.584000
--7.729100 -106.490001 -28.719001
-51.589999 36.825001 30.294001
-48.257899 38.129002 29.798001
-49.368899 41.777000 33.948001
-28.989000 27.298000 21.270001
-31.863000 30.486001 21.690000
-31.166900 26.222000 23.024900
--61.500002 31.659901 -31.246999
--58.375001 26.853001 -29.108999
--58.224998 33.594999 -31.018000
--49.729999 32.290999 -27.911000
--47.265999 27.780000 -27.240999
--46.770100 33.754002 -27.341999
-87.502897 -44.826999 17.402001
-98.273002 -43.145999 18.395001
-97.795896 -48.505101 16.825002
--71.004994 24.561999 -31.401001
--74.022099 21.760000 -31.274099
--68.962000 17.148999 -29.521000
--65.376997 -20.876000 -50.186101
--66.400103 -18.764000 -58.972098
--64.538099 -17.590100 -50.007999
--9.982999 38.671002 -27.646000
--7.735100 37.348900 -25.545999
--8.468100 35.143003 -29.138999
--75.772099 -44.354100 -66.344097
--84.849998 -41.951999 -71.333997
--75.769000 -39.724998 -66.726997
-79.007007 25.413001 35.638001
-83.587900 27.037000 42.215899
-82.456000 22.159001 35.409901
--84.652096 -109.789103 -54.513101
--88.197000 -118.152998 -44.175997
--93.153998 -111.726999 -46.356998
-71.456999 -18.232999 66.762999
-72.843999 -22.243099 67.013003
-79.426005 -17.021000 71.987897
--1.890000 31.475000 11.765000
--0.842100 34.365002 11.420000
--2.774000 32.568999 9.449000
--54.389998 -70.805997 -29.441999
--56.564998 -67.790098 -30.810000
--59.597101 -69.614999 -19.225100
-27.690900 20.075001 30.186001
-22.201000 20.534901 30.555001
-25.937900 20.836901 27.822001
-74.861899 -30.733999 67.123003
-68.945900 -29.781999 59.383899
-69.351897 -33.659998 59.284899
--1.890000 31.475000 11.765000
--1.864000 28.402900 11.600001
--0.788000 30.048000 14.109001
-14.383000 -142.159000 -26.732100
-20.211000 -151.848093 -17.351000
-12.251001 -152.744994 -20.085000
--59.576999 -104.259104 -57.380099
--54.548100 -93.365997 -54.848999
--50.791100 -96.991993 -53.234100
--19.630000 -150.672004 -30.865999
--11.745000 -152.037993 -28.208099
--16.805099 -158.565998 -18.618999
-81.620000 -1.823000 72.947897
-91.507003 -0.320000 71.336895
-88.155895 4.478000 71.102895
-67.736901 -27.125999 40.949002
-67.424007 -23.744000 41.202899
-71.786001 -24.329999 32.980900
--60.876001 6.846000 -33.687100
--63.979097 12.704001 -30.335000
--66.004999 9.984001 -30.440999
--91.301098 -21.545999 -73.552102
--81.148103 -21.650000 -72.129995
--82.570001 -26.480000 -72.134100
-10.612001 36.457002 31.493001
-10.203000 32.285899 32.534000
-12.277001 33.459898 35.115000
-60.742002 18.267000 67.681901
-56.956999 20.423900 66.303998
-54.911900 13.012000 64.424001
--89.009099 -103.585996 -56.451999
--78.473002 -100.137100 -60.771000
--84.652096 -109.789103 -54.513101
-33.917900 -155.686989 -1.747000
-35.805002 -148.391992 -11.884000
-42.012002 -153.117999 1.044000
-60.874999 6.846000 33.686001
-63.978001 12.704001 30.333901
-66.003896 9.984001 30.440001
-46.346001 22.218000 28.927000
-44.006001 23.902001 27.915001
-47.264900 27.780000 27.239900
-10.203000 32.285899 32.534000
-11.253000 28.054001 32.638002
-13.071000 28.971002 35.428002
-50.681900 -142.811999 -6.455000
-43.354001 -145.858988 -9.160000
-42.326000 -135.543004 -16.330000
-47.152899 44.847000 45.230899
-50.376900 43.977000 39.595999
-46.330001 44.756901 38.799901
--17.062999 35.237901 -12.069999
--17.594000 37.548900 -14.435099
--19.549999 34.590900 -13.789000
--66.400103 -18.764000 -58.972098
--65.376997 -20.876000 -50.186101
--67.458101 -22.320000 -59.229098
-17.593000 37.548900 14.434000
-17.509000 39.639901 17.027000
-20.267000 37.222002 15.944000
-36.966901 18.291000 32.942999
-34.965001 19.534901 31.100001
-39.875899 21.083901 29.395901
-68.166904 -52.834000 26.065901
-63.408002 -54.817099 35.546001
-64.636000 -51.409099 36.532000
--113.149099 -16.431000 -56.217000
--110.769995 -10.004000 -56.945000
--106.561996 -12.629000 -65.333098
-37.797999 37.109002 25.121901
-34.812000 37.895001 24.211001
-35.096999 41.383900 26.930900
-48.257899 38.129002 29.798001
-51.589999 36.825001 30.294001
-49.729001 32.290999 27.909901
--12.188000 24.986001 -8.278000
--13.195000 24.041001 -11.143000
--9.795999 23.099001 -9.304000
--84.550105 -52.807998 -70.151098
--74.824996 -53.755101 -65.219104
--83.818100 -58.311101 -69.373101
--92.893995 -109.269001 -11.499000
--95.272101 -114.666998 -22.000000
--90.056002 -120.917000 -19.570999
-64.175002 1.363000 34.264900
-69.699898 4.155000 30.395901
-65.639898 -1.542100 34.422003
--50.682999 -142.811999 6.453900
--48.902098 -132.729992 13.741001
--55.242099 -129.489005 11.170000
-99.775001 -2.964000 31.936999
-101.888001 -8.016000 31.003900
-93.192004 -8.185999 26.961001
-32.414000 -101.190105 -9.800999
-36.499999 -99.317104 -7.705000
-43.740001 -107.864000 -13.299000
--35.806000 -148.391992 11.883000
--35.555098 -137.906998 18.927000
--43.354999 -145.858988 9.159001
--90.844102 -96.902996 -5.869000
--94.430096 -91.186993 -8.103000
--97.291999 -103.117995 -13.854999
-21.545000 -141.227990 -24.135999
-14.383000 -142.159000 -26.732100
-14.803001 -129.712999 -29.122999
--39.703000 43.355901 -49.077999
--42.937100 45.311999 -44.113997
--38.849998 45.506001 -42.890001
--39.244000 32.019999 -24.674000
--37.799001 37.109002 -25.122998
--40.792998 36.159001 -25.947999
-74.823901 -53.755101 65.218002
-84.549002 -52.807998 70.150003
-75.457998 -49.036998 65.838896
--64.392999 35.693999 -35.562098
--61.500002 31.659901 -31.246999
--60.632002 37.596002 -35.299998
-6.493000 23.263000 4.122000
-8.675001 25.106002 3.141900
-9.218001 23.919001 6.217000
-16.697900 -104.667000 32.726001
-12.241000 -105.717100 30.739000
-13.267000 -116.031997 37.907001
--17.503999 -97.488999 -22.458099
--21.358998 -96.300103 -24.350999
--24.389001 -93.056999 -12.670999
-25.031000 43.827899 27.531000
-25.694901 41.971002 23.846000
-21.937901 43.409899 26.249999
--40.792998 36.159001 -25.947999
--43.786999 35.041001 -26.688000
--41.947000 30.753901 -25.612000
-56.861900 39.236899 34.944002
-54.916002 35.313901 30.700000
-53.103998 40.630002 34.492999
--3.662000 37.785899 -12.274999
--6.521000 38.555000 -11.023000
--3.704000 37.930001 -9.480000
--62.369000 -11.326999 -49.327001
--62.153000 -8.959000 -57.474997
--61.065000 -8.370000 -48.824102
-80.754898 12.984000 70.195898
-89.896001 14.109001 65.857999
-85.775003 18.333901 65.535001
--92.499100 -70.012100 -9.765999
--94.343103 -64.672999 -11.640999
--102.669999 -73.166996 -14.403000
-1.911000 29.711001 19.131001
-4.030000 27.583901 21.672001
-3.256000 31.076001 21.718001
--66.041999 -24.254000 -50.253000
--67.425102 -23.744000 -41.203998
--67.737997 -27.125999 -40.950101
--13.351000 -96.199997 -6.900100
--9.568000 -96.836001 -4.940100
--5.608000 -99.707097 -16.609000
-22.944901 36.812000 17.402001
-25.638001 36.310002 18.798001
-24.475001 33.165999 17.114900
--44.151101 17.916000 -32.145999
--46.347100 22.218000 -28.927999
--48.638999 20.402901 -29.858999
-87.287001 -22.473000 23.541901
-97.044900 -22.437999 23.825001
-87.816998 -26.813000 22.479000
--20.326100 31.100001 -13.742000
--17.986100 28.600000 -12.030000
--18.143000 32.005999 -11.770099
-84.387004 -10.048999 26.215900
-85.559897 -14.080000 25.412001
-77.351898 -16.055999 28.194901
-64.481005 -10.867000 41.247003
-62.368002 -11.326999 49.325999
-61.063901 -8.370000 48.823003
-1.396000 -107.208997 -24.595000
-5.967900 -107.152097 -22.503100
-8.100000 -117.737003 -29.146999
-47.915999 -92.376001 -1.547100
-43.396901 -86.236097 9.036000
-51.400002 -89.661099 0.449000
-12.206000 32.145903 5.235000
-14.244000 30.836901 7.468900
-12.232000 29.075000 5.070000
--0.842100 34.365002 11.420000
-1.266000 35.901003 13.300000
-1.123000 36.630999 10.618000
--25.302999 24.781000 -20.955000
--27.181000 23.825001 -23.091000
--22.621099 22.312000 -22.958100
--77.431999 -12.616999 -71.709998
--75.191103 -8.454099 -71.291998
--69.846101 -14.403000 -66.383101
-98.273002 -43.145999 18.395001
-107.749999 -48.339099 21.715000
-97.795896 -48.505101 16.825002
-21.031000 -128.824994 -26.691999
-18.746901 -116.531000 -24.636000
-27.173901 -127.527997 -24.254000
--46.243098 16.163001 -33.398997
--44.151101 17.916000 -32.145999
--48.638999 20.402901 -29.858999
--54.203000 36.699999 -59.354998
--49.743101 37.800901 -57.933997
--51.417999 30.825000 -62.473997
--19.507999 -105.344102 16.152000
--14.447000 -98.817103 6.565000
--23.902999 -104.210995 14.029000
--17.090099 -95.358104 -8.844000
--20.774100 -94.307996 -10.770099
--26.010100 -95.608100 0.558000
-52.402902 24.207002 28.541001
-48.638001 20.402901 29.857900
-49.860999 26.068000 27.930900
-84.864900 -85.512102 3.736900
-73.987901 -80.572002 3.713000
-76.647006 -76.361999 5.644900
-51.241003 -83.972998 48.341900
-48.097901 -87.151103 46.861000
-54.547001 -93.365997 54.847900
--5.987000 24.627000 -21.025999
--5.140000 23.913000 -18.018000
--8.827000 22.652000 -19.879000
-1.863000 28.402900 -11.601000
-3.210000 29.589999 -9.469000
-2.604000 26.694901 -8.963999
--1.124000 36.630999 -10.619099
--0.826000 37.021901 -7.933101
-1.355000 35.179999 -8.909999
-61.319001 -125.839993 -8.624000
-55.241000 -129.489005 -11.170999
-55.617001 -115.300104 -12.116999
-2.786000 37.610002 3.756000
--0.713000 37.300900 2.250000
-0.218900 37.201900 5.158900
--15.238000 24.937000 -34.672100
--13.608000 24.402902 -31.792000
--18.444099 21.974999 -32.959998
--103.199996 -69.844104 -64.582102
--109.972097 -76.272100 -55.799998
--111.680098 -68.833999 -57.363000
--4.145000 22.902001 -2.085100
--6.413100 24.398001 -0.916100
--6.494000 23.263000 -4.123100
-25.694901 41.971002 23.846000
-28.766001 41.932900 24.961900
-28.902000 39.007898 22.135001
-14.913000 37.804998 12.883000
-17.062001 35.237901 12.069000
-14.527000 35.861000 10.333000
-118.184902 -44.544000 52.013002
-113.522001 -46.654001 61.326001
-118.206002 -51.999100 50.651003
-74.231006 -5.487000 29.686000
-69.211900 -10.838999 34.347001
-68.166003 -7.650100 34.463000
-1.889000 31.475000 -11.766000
-2.773000 32.568999 -9.450000
-3.210000 29.589999 -9.469000
-33.340901 17.506000 36.922000
-36.966901 18.291000 32.942999
-38.986001 16.958000 34.712002
--55.641998 29.384000 -63.998103
--59.915099 27.590001 -65.385103
--63.335001 33.414003 -61.805099
--89.531995 21.465000 -58.499999
--91.458097 21.899000 -50.161000
--87.278001 25.836900 -50.207101
-14.527000 35.861000 10.333000
-11.897000 36.458001 8.607000
-12.199000 37.987899 11.310000
-24.649901 29.270001 17.597001
-23.447001 25.718901 18.773001
-21.617001 26.652901 16.554002
--61.569098 -1.129000 -63.541099
--64.291999 5.520900 -68.206102
--59.158102 1.636000 -62.500000
-66.932902 -20.416999 41.361000
-65.375902 -20.876000 50.185002
-64.537004 -17.590100 50.006900
--90.304099 -75.281002 -7.821100
--92.499100 -70.012100 -9.765999
--100.348003 -79.286106 -12.374000
-7.264900 35.084900 1.105900
-5.260000 36.866002 2.334000
-8.362001 35.959899 4.043000
--77.051103 25.576901 -64.462997
--68.463996 22.892900 -67.740001
--72.668999 19.975001 -68.705104
--17.510099 39.639901 -17.028000
--20.298099 39.657000 -18.414000
--20.267999 37.222002 -15.945001
--13.351000 -96.199997 -6.900100
--5.608000 -99.707097 -16.609000
--9.614999 -99.194996 -18.584000
--99.725001 -16.681001 -71.164101
--108.853996 -18.965099 -64.804100
--106.561996 -12.629000 -65.333098
-10.883001 23.413001 25.906000
-12.159000 23.888001 28.868001
-8.236000 26.256001 26.916001
--60.876001 6.846000 -33.687100
--57.611998 3.148000 -39.090998
--55.904001 5.618000 -38.369998
--28.076999 -150.393993 14.614000
--25.643000 -157.675996 4.556000
--20.212000 -151.848093 17.350001
--18.368099 -97.961999 4.552000
--9.568000 -96.836001 -4.940100
--13.351000 -96.199997 -6.900100
--45.674998 42.688899 -33.308998
--42.034101 43.376900 -32.577001
--42.370997 45.279898 -37.905999
-63.415997 -65.831102 54.512002
-68.999998 -72.420001 61.611902
-70.949897 -67.836002 62.674902
--68.129994 33.528902 -35.727099
--64.392999 35.693999 -35.562098
--67.088999 38.013000 -41.756101
-12.972000 37.723899 33.778898
-10.612001 36.457002 31.493001
-12.277001 33.459898 35.115000
-58.596000 -3.224000 55.872001
-56.652002 -0.616000 54.889899
-58.080003 -2.830000 47.486000
-84.549002 -52.807998 70.150003
-84.888898 -47.346100 70.804998
-75.457998 -49.036998 65.838896
--64.135104 -81.267998 -59.187099
--61.234102 -85.482098 -57.829000
--71.072996 -90.329103 -62.291998
--52.533101 4.076000 -52.577000
--51.492099 8.559000 -58.605000
--50.388999 6.159900 -51.245999
--28.659999 33.199001 -50.727099
--25.503099 32.784000 -48.384000
--29.157000 27.225001 -50.625000
-85.779898 18.631000 35.083901
-82.400002 12.062000 30.346001
-79.732999 15.508001 30.746000
-43.659899 13.520001 53.602003
-46.250902 12.071000 55.387001
-45.382902 18.003900 59.441000
-2.773000 32.568999 -9.450000
-1.889000 31.475000 -11.766000
-0.841000 34.365002 -11.421000
-42.298000 19.162999 57.527002
-39.298002 20.097001 55.497002
-41.111901 14.781901 51.702902
--99.995099 -108.117998 -24.355000
--104.208998 -101.315103 -26.632000
--102.936000 -104.222998 -37.977099
-75.767897 -39.724998 66.725902
-75.460896 -35.177000 66.986904
-69.517896 -37.613999 59.070900
--7.980100 -116.975002 -35.764001
--12.242000 -105.717100 -30.740000
--7.729100 -106.490001 -28.719001
-38.848899 45.506001 42.888902
-42.369898 45.279898 37.904900
-38.513903 45.561999 36.911901
-115.105003 -23.130000 55.358000
-113.148004 -16.431000 56.215901
-108.852901 -18.965099 64.803004
-17.062001 35.237901 12.069000
-17.593000 37.548900 14.434000
-19.548900 34.590900 13.788000
--49.526099 -76.486096 -26.508000
--48.253000 -79.394996 -37.853099
--52.042000 -73.708996 -28.007001
-91.257006 19.569000 41.789003
-91.457002 21.899000 50.159901
-95.461898 17.589001 49.991999
--115.195997 -42.133000 -31.447999
--115.124099 -48.944999 -29.862000
--107.998103 -42.200100 -23.327999
-43.785900 35.041001 26.687000
-40.791899 36.159001 25.947001
-41.622002 40.137000 28.544001
--39.841998 -118.918002 -49.674999
--47.862001 -128.367990 -48.785999
--45.180999 -115.747102 -51.709998
--73.986098 -26.416099 -67.133099
--81.148103 -21.650000 -72.129995
--72.845101 -22.243099 -67.014001
--10.458999 22.547001 -12.367000
--13.195000 24.041001 -11.143000
--14.245000 23.284001 -13.995000
-9.645000 27.141999 29.801000
-12.159000 23.888001 28.868001
-13.607000 24.402902 31.791002
--89.009099 -103.585996 -56.451999
--97.598001 -105.022103 -48.449099
--92.874102 -97.144999 -58.293998
--1.043000 24.325000 8.010000
--2.605100 26.694901 8.963000
--2.901100 25.017900 6.137000
-50.265901 -112.231106 53.674899
-53.839002 -124.541998 50.979901
-59.500899 -120.324001 53.103998
--87.288104 -22.473000 -23.542998
--78.550100 -23.511998 -26.771000
--86.530998 -18.225100 -24.521001
--85.166998 25.378000 -58.286998
--81.478998 22.159001 -65.070003
--85.776098 18.333901 -65.536104
-8.034000 26.753001 0.158000
-6.190000 26.097000 -2.142000
-7.085900 28.847000 -2.603000
-72.524004 28.589999 63.715003
-64.198896 25.429999 66.632003
-68.462901 22.892900 67.738898
--67.103997 -121.808998 6.105000
--65.458998 -108.042002 7.389900
--72.572000 -117.422000 3.621000
--33.794999 34.125000 -22.555999
--31.864099 30.486001 -21.691000
--31.066999 34.976002 -21.379000
--58.745001 35.241999 -60.646001
--55.641998 29.384000 -63.998103
--63.335001 33.414003 -61.805099
-48.251901 -79.394996 37.852000
-51.241003 -83.972998 48.341900
-50.931901 -76.486997 39.272901
-64.420901 -92.332102 -2.386000
-57.819001 -83.697997 4.328000
-67.869000 -88.578105 -0.308000
-75.767897 -39.724998 66.725902
-84.848903 -41.951999 71.332999
-84.440000 -36.658101 71.732000
-6.705900 29.902902 27.204001
-5.269000 28.728999 24.461001
-8.236000 26.256001 26.916001
-54.881901 22.194900 29.065901
-52.402902 24.207002 28.541001
-58.373999 26.853001 29.107900
--3.882000 22.468001 -5.391000
--1.579000 22.495002 -3.487000
--4.145000 22.902001 -2.085100
--89.009099 -103.585996 -56.451999
--84.652096 -109.789103 -54.513101
--93.153998 -111.726999 -46.356998
--64.821996 -115.745105 -55.152100
--55.074099 -108.392999 -55.568099
--59.501998 -120.324001 -53.105000
--66.749103 -38.430098 -49.458098
--67.818098 -34.015000 -40.149000
--67.571998 -37.499100 -39.607000
--21.986999 22.128901 -38.493998
--25.650000 19.777000 -35.763100
--23.996999 22.156000 -41.169997
--68.962000 17.148999 -29.521000
--63.979097 12.704001 -30.335000
--61.845101 15.288901 -30.143999
--14.420999 -140.884995 -36.925998
--10.330000 -129.052997 -38.646001
--7.276100 -141.955987 -34.417998
--51.716000 14.942001 -62.894098
--54.912999 13.012000 -64.425103
--56.958098 20.423900 -66.305101
--66.445999 19.833000 -29.546000
--67.904003 27.145900 -31.438999
--71.004994 24.561999 -31.401001
--74.022099 21.760000 -31.274099
--71.004994 24.561999 -31.401001
--75.457104 28.392000 -35.765000
--63.867100 -4.120000 -64.448997
--61.569098 -1.129000 -63.541099
--60.436100 -6.007000 -56.735098
--54.096099 6.477000 -60.029998
--51.492099 8.559000 -58.605000
--52.533101 4.076000 -52.577000
-78.065000 -43.027099 21.746000
-70.234999 -45.731999 28.291000
-70.972003 -42.146001 29.284000
--49.369998 41.777000 -33.949099
--50.377999 43.977000 -39.597098
--53.105000 40.630002 -34.493998
--9.646000 27.141999 -29.802099
--11.254000 28.054001 -32.639001
--8.349000 31.093901 -29.896000
-84.917903 8.406000 29.854000
-82.400002 12.062000 30.346001
-88.959903 14.831000 34.658000
-52.859001 4.473900 44.682898
-55.902902 5.618000 38.368899
-57.611000 3.148000 39.090000
--25.643000 -157.675996 4.556000
--21.684999 -160.544991 -7.114000
--17.232999 -159.070998 7.375000
--54.203000 36.699999 -59.354998
--57.360101 40.497001 -54.249100
--52.776102 41.699000 -53.132001
-5.637000 31.163000 -5.020000
-4.401000 30.489901 -7.315100
-3.670000 33.348899 -7.086000
--66.726997 -76.905996 -60.450099
--61.481997 -69.697998 -53.456102
--59.291098 -73.467106 -52.306000
-17.364001 30.729000 40.827900
-19.850001 31.520002 43.428000
-17.111000 35.666000 40.077899
--72.525099 28.589999 -63.716002
--68.463996 22.892900 -67.740001
--77.051103 25.576901 -64.462997
-4.401000 30.489901 -7.315100
-5.637000 31.163000 -5.020000
-5.565000 28.236000 -4.902000
-73.985003 -26.416099 67.132004
-74.861899 -30.733999 67.123003
-82.569003 -26.480000 72.133005
-59.914000 27.590001 65.384001
-63.333899 33.414003 61.804000
-55.640899 29.384000 63.997000
-59.157003 1.636000 62.499002
-58.596000 -3.224000 55.872001
-61.567999 -1.129000 63.540004
-57.813901 -66.976994 43.094002
-59.699003 -63.590996 44.206999
-60.366001 -61.460000 33.331003
--25.938999 20.836901 -27.822999
--31.021001 21.797001 -27.215099
--27.691999 20.075001 -30.187100
-1.235000 22.840001 6.756000
-3.881000 22.468001 5.389900
-3.834000 22.485999 8.654000
--42.298999 19.162999 -57.528000
--39.299000 20.097001 -55.498101
--41.113000 14.781901 -51.703997
-1.042000 24.325000 -8.010999
--1.236000 22.840001 -6.757000
--1.234000 23.538001 -9.919000
-17.232001 -159.070998 -7.375000
-20.211000 -151.848093 -17.351000
-25.642000 -157.675996 -4.557100
--4.145000 22.902001 -2.085100
--2.162000 22.708001 -0.166000
--4.461000 23.940900 1.169000
--31.021001 21.797001 -27.215099
--32.981001 20.701000 -29.189000
--27.691999 20.075001 -30.187100
--34.965999 19.534901 -31.101000
--31.396002 18.423000 -34.743100
--29.510999 19.274000 -32.494999
--78.473002 -100.137100 -60.771000
--89.009099 -103.585996 -56.451999
--82.184002 -94.425105 -62.456101
--98.264001 -32.605000 -21.284999
--88.165097 -35.717998 -20.104999
--88.111997 -31.233000 -21.334000
-8.222000 39.515901 18.634001
-10.737000 40.500000 20.302000
-11.463000 40.215001 17.055901
-78.064002 -95.151097 -0.574100
-86.849898 -102.417000 3.572000
-82.463898 -107.694998 1.223000
--48.531000 16.603000 -61.230000
--46.251997 12.071000 -55.388100
--48.868999 10.420000 -57.055999
--32.028001 33.428002 -52.970100
--28.659999 33.199001 -50.727099
--29.157000 27.225001 -50.625000
--54.625999 1.817000 -53.792000
--52.533101 4.076000 -52.577000
--54.680999 2.176000 -45.722999
--1.560000 24.427000 -12.971000
-0.767000 25.617000 -10.952000
--1.234000 23.538001 -9.919000
-75.239897 6.224900 71.775004
-84.559895 8.916000 70.722900
-80.754898 12.984000 70.195898
-76.482005 -12.443000 28.777901
-84.387004 -10.048999 26.215900
-77.351898 -16.055999 28.194901
--88.156998 4.478000 -71.103998
--93.805999 9.491000 -66.039100
--84.560998 8.916000 -70.723996
--4.739000 33.914000 4.557000
--3.010000 36.069002 3.585000
--5.988000 34.431901 1.804000
--29.087000 22.833001 -25.180100
--25.938999 20.836901 -27.822999
--24.250001 21.576900 -25.413100
-25.649000 19.777000 35.762001
-23.870001 20.166900 33.185001
-29.510001 19.274000 32.493901
-36.966901 18.291000 32.942999
-33.340901 17.506000 36.922000
-31.394999 18.423000 34.742001
-12.159000 23.888001 28.868001
-10.883001 23.413001 25.906000
-15.505901 21.826901 27.239000
-84.387004 -10.048999 26.215900
-91.426998 -3.758000 27.822001
-93.192004 -8.185999 26.961001
--12.972999 37.723899 -33.779997
--15.053100 41.111901 -31.628098
--12.421000 39.930001 -29.673999
--70.833996 -17.455000 -33.846099
--71.397103 -20.864999 -33.459000
--66.933997 -20.416999 -41.361999
-74.021004 21.760000 31.273000
-71.372002 14.295000 29.409900
-68.960898 17.148999 29.520001
-67.869000 -88.578105 -0.308000
-78.064002 -95.151097 -0.574100
-74.168898 -99.680997 -2.803000
--23.976998 -115.427099 22.364000
--29.112000 -113.997102 20.090001
--33.202998 -125.830099 21.809001
--40.160999 -88.477999 -7.180000
--44.264998 -94.900101 3.572000
--36.793001 -90.544999 -5.288100
-90.303004 -75.281002 7.820000
-92.498004 -70.012100 9.765000
-100.346997 -79.286106 12.373000
-87.494001 23.468001 42.057898
-91.257006 19.569000 41.789003
-85.779898 18.631000 35.083901
-104.306899 0.790000 39.583899
-99.775001 -2.964000 31.936999
-97.401999 1.858000 32.770000
-76.933898 18.743001 31.055000
-79.007007 25.413001 35.638001
-82.456000 22.159001 35.409901
-5.986900 34.431901 -1.805000
-7.264900 35.084900 1.105900
-8.496000 32.539003 0.261000
-9.923000 33.590000 3.091000
-10.531000 30.694000 2.585000
-8.496000 32.539003 0.261000
--77.864997 4.761000 -28.563999
--82.401097 12.062000 -30.347100
--84.918998 8.406000 -29.855000
--79.427101 -17.021000 -71.989000
--77.431999 -12.616999 -71.709998
--71.458101 -18.232999 -66.763997
-11.463000 40.215001 17.055901
-10.737000 40.500000 20.302000
-14.163001 40.791001 18.558001
--9.285000 38.998000 -12.563000
--6.226000 38.735002 -13.905000
--8.823000 39.533999 -15.502000
-96.233003 -90.508103 60.032003
-88.260002 -82.454100 65.512002
-85.448898 -88.516995 64.037003
-89.343004 -16.208099 73.614895
-91.300003 -21.545999 73.550999
-99.723898 -16.681001 71.162999
-1.396000 -107.208997 -24.595000
--5.608000 -99.707097 -16.609000
--1.583000 -99.987000 -14.619100
--108.002998 -3.879000 -57.542000
--104.879998 1.919000 -58.001999
--100.833997 -0.876000 -65.970100
-59.611000 17.735001 29.867999
-61.844002 15.288901 30.142900
-57.140898 11.864000 32.754000
--15.108000 29.871000 -38.160000
--17.059999 25.468901 -37.501000
--19.076999 25.975000 -40.272001
--5.261100 36.866002 -2.335100
--2.787000 37.610002 -3.757000
--6.086000 37.444901 -5.298000
-28.208001 -102.822997 -11.911999
-32.414000 -101.190105 -9.800999
-39.013002 -110.205099 -15.553100
--47.265999 27.780000 -27.240999
--44.007000 23.902001 -27.916100
--44.624999 29.340900 -26.466999
-92.901997 -27.115000 73.344000
-83.674006 -31.491000 71.998999
-94.125897 -32.889001 72.997004
-83.674006 -31.491000 71.998999
-84.440000 -36.658101 71.732000
-94.125897 -32.889001 72.997004
--118.775100 -42.957101 -41.522000
--114.822000 -35.433996 -32.933999
--118.262097 -35.813000 -42.909998
--43.786999 35.041001 -26.688000
--44.932000 39.229900 -29.215999
--46.770100 33.754002 -27.341999
--35.534099 23.836000 -26.350100
--36.777101 28.204901 -24.406100
--39.214101 26.892900 -25.652999
--46.331100 44.756901 -38.801000
--50.377999 43.977000 -39.597098
--49.369998 41.777000 -33.949099
-64.391896 35.693999 35.560999
-67.087896 38.013000 41.755002
-68.128899 33.528902 35.726003
--76.648101 -76.361999 -5.646000
--84.865995 -85.512102 -3.738000
--73.988996 -80.572002 -3.714000
--50.873101 18.461000 -30.709000
--46.243098 16.163001 -33.398997
--48.638999 20.402901 -29.858999
--39.876997 21.083901 -29.397000
--41.625001 25.461001 -26.822999
--44.007000 23.902001 -27.916100
--81.621103 -1.823000 -72.949000
--75.191103 -8.454099 -71.291998
--84.472999 -6.327100 -73.317103
--9.614999 -99.194996 -18.584000
--5.608000 -99.707097 -16.609000
--3.175000 -106.987998 -26.670100
--24.250001 21.576900 -25.413100
--19.181000 21.274000 -25.163999
--22.621099 22.312000 -22.958100
-22.576900 -126.198992 43.207001
-21.464001 -139.322996 39.395001
-28.367000 -137.274995 41.823003
-85.448898 -88.516995 64.037003
-76.899000 -80.061994 65.084897
-74.178003 -85.274100 63.740000
--17.059999 25.468901 -37.501000
--21.986999 22.128901 -38.493998
--19.076999 25.975000 -40.272001
--52.860100 4.473900 -44.683997
--52.533101 4.076000 -52.577000
--50.388999 6.159900 -51.245999
-28.076001 -150.393993 -14.615000
-33.917900 -155.686989 -1.747000
-25.642000 -157.675996 -4.557100
-5.260000 36.866002 2.334000
-6.085000 37.444901 5.296900
-8.362001 35.959899 4.043000
-100.832999 -0.876000 65.969005
-91.507003 -0.320000 71.336895
-94.572902 -5.459100 71.425006
-68.309896 -25.997000 59.366003
-68.945900 -29.781999 59.383899
-73.985003 -26.416099 67.132004
--107.998103 -42.200100 -23.327999
--107.749999 -48.339099 -21.716001
--98.274104 -43.145999 -18.395999
--93.623102 -117.786102 -33.473000
--95.272101 -114.666998 -22.000000
--98.541997 -111.140996 -35.766996
-36.215000 16.805001 47.591899
-33.890899 17.600000 45.389902
-37.409000 15.416000 41.055001
-74.231006 -5.487000 29.686000
-79.746999 1.271000 28.107001
-81.468001 -2.366000 27.565001
--15.042000 -106.214993 18.274900
--23.976998 -115.427099 22.364000
--18.747998 -116.531000 24.635000
--5.140000 23.913000 -18.018000
--4.487000 23.291901 -14.962000
--8.034999 22.405000 -16.812999
--8.823000 39.533999 -15.502000
--11.464000 40.215001 -17.057000
--12.021000 39.312001 -14.088999
-51.416900 30.825000 62.472902
-47.271900 31.930000 60.819000
-45.742001 24.979001 61.347000
-88.164002 -35.717998 20.104000
-88.110998 -31.233000 21.333000
-98.263003 -32.605000 21.284001
-84.387004 -10.048999 26.215900
-76.482005 -12.443000 28.777901
-83.017901 -6.141000 26.934000
--12.252000 -152.744994 20.083901
--8.733000 -159.860998 10.196900
--4.243100 -153.076991 22.809001
--74.330099 -105.616994 -58.989000
--63.757002 -99.849999 -59.106998
--69.773100 -110.832103 -57.113998
-66.932902 -20.416999 41.361000
-70.832998 -17.455000 33.845000
-71.396001 -20.864999 33.458002
--15.053100 41.111901 -31.628098
--18.201999 43.110002 -28.983001
--15.353000 42.175900 -27.352000
-44.624001 29.340900 26.465900
-43.785900 35.041001 26.687000
-46.769001 33.754002 27.340900
--115.754999 -72.425105 -34.874100
--112.087995 -69.703102 -24.511999
--113.581099 -62.765002 -26.389999
-47.860999 -128.367990 48.784900
-49.437001 -139.811993 41.088000
-56.247003 -135.838002 43.508898
--72.668999 19.975001 -68.705104
--76.779000 16.670000 -69.525100
--81.478998 22.159001 -65.070003
--87.818101 -26.813000 -22.480000
--88.111997 -31.233000 -21.334000
--78.974001 -31.212000 -25.007999
-1.863000 28.402900 -11.601000
-0.767000 25.617000 -10.952000
-0.136000 26.974000 -13.768000
-66.444904 19.833000 29.545000
-61.844002 15.288901 30.142900
-59.611000 17.735001 29.867999
-52.402902 24.207002 28.541001
-54.881901 22.194900 29.065901
-50.872002 18.461000 30.708000
--8.223000 39.515901 -18.635100
--10.738000 40.500000 -20.303000
--11.464000 40.215001 -17.057000
--72.525099 28.589999 -63.716002
--67.941099 31.200001 -62.827997
--64.199999 25.429999 -66.633105
-39.701901 43.355901 49.076900
-42.936001 45.311999 44.112898
-38.848899 45.506001 42.888902
--63.598998 -63.130103 -22.166999
--58.557998 -64.669997 -32.106999
--60.367100 -61.460000 -33.332098
--23.448000 25.718901 -18.774100
--19.531099 23.822900 -17.938999
--21.618100 26.652901 -16.555099
--22.564000 32.214999 -45.950100
--23.716999 26.811000 -45.612000
--26.340099 27.083000 -48.162997
-20.211000 -151.848093 -17.351000
-14.383000 -142.159000 -26.732100
-21.545000 -141.227990 -24.135999
--2.158000 25.420001 -15.937999
-0.136000 26.974000 -13.768000
--1.560000 24.427000 -12.971000
--1.912000 29.711001 -19.131999
--0.773100 28.343000 -16.486999
--2.991000 26.479000 -18.834000
-79.746999 1.271000 28.107001
-87.274000 4.546000 29.267900
-81.468001 -2.366000 27.565001
--65.055996 -49.369998 -47.778998
--68.495102 -49.749099 -57.755101
--65.839998 -45.722999 -48.438001
--29.087000 22.833001 -25.180100
--27.181000 23.825001 -23.091000
--31.167999 26.222000 -23.025999
--49.126998 -148.504004 -29.489100
--42.332102 -143.302992 -38.606998
--41.374099 -151.871994 -26.830001
--8.223000 39.515901 -18.635100
--5.526100 37.534002 -20.073999
--7.756100 38.812000 -21.996999
--44.007000 23.902001 -27.916100
--46.347100 22.218000 -28.927999
--42.027101 19.555001 -30.810000
--61.569098 -1.129000 -63.541099
--63.867100 -4.120000 -64.448997
--67.248099 2.447900 -69.186993
-53.103998 40.630002 34.492999
-54.497000 42.923000 40.290002
-56.861900 39.236899 34.944002
--32.981001 20.701000 -29.189000
--35.534099 23.836000 -26.350100
--37.710000 22.510000 -27.910000
-96.233003 -90.508103 60.032003
-85.448898 -88.516995 64.037003
-92.873000 -97.144999 58.292899
--17.882001 42.199999 -33.501998
--20.907000 43.172002 -35.294998
--21.210000 43.922000 -30.531099
--1.267000 35.901003 -13.301000
--3.491000 37.240002 -15.129000
--3.662000 37.785899 -12.274999
--55.618100 -115.300104 12.116000
--60.670000 -111.819997 9.739000
--61.319999 -125.839993 8.623000
-3.256000 31.076001 21.718001
-3.779000 34.569900 21.156000
-2.069000 33.117998 18.871000
--63.867100 -4.120000 -64.448997
--60.436100 -6.007000 -56.735098
--62.153000 -8.959000 -57.474997
--51.591001 36.825001 -30.295100
--54.917000 35.313901 -30.701099
--52.658100 30.655000 -28.395999
--85.561000 -14.080000 -25.413100
--84.388100 -10.048999 -26.216999
--93.193099 -8.185999 -26.961999
--4.078100 -129.852995 -36.306001
--10.330000 -129.052997 -38.646001
--7.980100 -116.975002 -35.764001
-8.100000 -117.737003 -29.146999
-13.446900 -117.304102 -26.899099
-14.803001 -129.712999 -29.122999
--21.986999 22.128901 -38.493998
--17.059999 25.468901 -37.501000
--20.136001 22.062000 -35.755102
-102.819003 7.880000 49.278900
-101.433896 7.368900 58.327898
-104.878895 1.919000 58.000900
-43.785900 35.041001 26.687000
-44.930901 39.229900 29.215001
-46.769001 33.754002 27.340900
--72.725996 -4.547000 -70.732102
--66.027999 -7.336000 -65.225996
--68.028003 -10.766000 -65.871105
-24.649901 29.270001 17.597001
-26.934000 32.358002 18.701900
-26.815901 28.309001 19.458901
--60.722098 -2.135000 -40.245000
--58.081102 -2.830000 -47.486998
--56.424998 -0.260000 -46.659101
--16.146000 29.666001 -9.746999
--15.913999 32.937001 -9.785000
--18.143000 32.005999 -11.770099
-55.902902 5.618000 38.368899
-52.859001 4.473900 44.682898
-50.972901 6.638000 43.541901
--16.805099 -158.565998 -18.618999
--21.684999 -160.544991 -7.114000
--25.166100 -156.920001 -21.389000
-41.665003 12.892000 44.846002
-47.062002 10.564900 40.964998
-43.839000 11.435000 46.601001
--55.542000 28.840901 -28.796000
--49.862001 26.068000 -27.931999
--52.658100 30.655000 -28.395999
-66.041000 -24.254000 50.251901
-67.736901 -27.125999 40.949002
-66.516899 -27.712001 50.213002
-63.333899 33.414003 61.804000
-59.914000 27.590001 65.384001
-67.940004 31.200001 62.826902
--75.928099 -135.641992 -26.132999
--70.478998 -135.309994 -37.138999
--69.141999 -140.768990 -23.555100
--70.478998 -135.309994 -37.138999
--63.720100 -140.193000 -34.649000
--69.141999 -140.768990 -23.555100
-17.593000 37.548900 14.434000
-14.913000 37.804998 12.883000
-14.755000 39.525002 15.581001
--60.632002 37.596002 -35.299998
--61.500002 31.659901 -31.246999
--58.224998 33.594999 -31.018000
-111.055002 -87.114997 30.936001
-110.107005 -76.608099 22.545001
-113.676004 -79.808995 32.951899
-95.461898 17.589001 49.991999
-99.261999 12.913000 49.698003
-94.847001 15.345001 41.407000
-110.768899 -10.004000 56.944001
-106.560901 -12.629000 65.332003
-113.148004 -16.431000 56.215901
--3.438000 36.180902 -18.090999
--3.491000 37.240002 -15.129000
--1.494000 34.740001 -16.049000
--15.108000 29.871000 -38.160000
--14.579100 34.596000 -37.632000
--12.278000 33.459898 -35.116099
--0.220000 37.201900 -5.160000
--0.826000 37.021901 -7.933101
--3.439000 37.819002 -6.664100
-20.211000 -151.848093 -17.351000
-28.076001 -150.393993 -14.615000
-25.642000 -157.675996 -4.557100
--13.608000 24.402902 -31.792000
--9.646000 27.141999 -29.802099
--12.159999 23.888001 -28.868999
--73.666997 11.277000 -29.215999
--71.373098 14.295000 -29.410999
--76.935001 18.743001 -31.056000
-101.402000 5.945000 40.305000
-97.401999 1.858000 32.770000
-94.792902 6.438000 33.500001
-24.249000 21.576900 25.412001
-29.086001 22.833001 25.179001
-25.937900 20.836901 27.822001
--104.476996 -62.852100 -65.862000
--112.834997 -61.388999 -58.807999
--105.237998 -55.877998 -67.016996
-52.041002 -73.708996 28.006000
-49.525000 -76.486096 26.506901
-48.251901 -79.394996 37.852000
--23.976998 -115.427099 22.364000
--19.507999 -105.344102 16.152000
--29.112000 -113.997102 20.090001
--99.776097 -2.964000 -31.938002
--101.888999 -8.016000 -31.004999
--93.193099 -8.185999 -26.961999
--22.202000 20.534901 -30.555999
--25.938999 20.836901 -27.822999
--27.691999 20.075001 -30.187100
--68.028003 -10.766000 -65.871105
--66.027999 -7.336000 -65.225996
--63.731000 -12.075000 -58.096100
-28.613999 -139.806002 -21.531999
-21.031000 -128.824994 -26.691999
-27.173901 -127.527997 -24.254000
--36.403999 20.825000 -53.354099
--39.299000 20.097001 -55.498101
--38.674999 26.569901 -57.402998
-57.751901 -139.272988 -3.774000
-61.319001 -125.839993 -8.624000
-64.526998 -135.264993 -1.121100
--42.298999 19.162999 -57.528000
--43.660998 13.520001 -53.603102
--45.383997 18.003900 -59.442099
--9.568000 -96.836001 -4.940100
--18.368099 -97.961999 4.552000
--14.447000 -98.817103 6.565000
--48.531000 16.603000 -61.230000
--45.383997 18.003900 -59.442099
--46.251997 12.071000 -55.388100
-8.821900 39.533999 15.501000
-9.284001 38.998000 12.562000
-6.224900 38.735002 13.904001
-67.940004 31.200001 62.826902
-59.914000 27.590001 65.384001
-64.198896 25.429999 66.632003
--71.787104 -24.329999 -32.981999
--67.425102 -23.744000 -41.203998
--71.397103 -20.864999 -33.459000
--89.448996 0.488000 -28.592000
--87.275103 4.546000 -29.268999
--94.793998 6.438000 -33.500999
--49.729999 32.290999 -27.911000
--51.591001 36.825001 -30.295100
--52.658100 30.655000 -28.395999
-95.835902 -59.292000 13.444000
-94.342001 -64.672999 11.640000
-84.513001 -58.588099 12.776000
--29.399099 31.468000 -20.229999
--31.864099 30.486001 -21.691000
--28.990000 27.298000 -21.271000
--79.748102 1.271000 -28.107999
--81.469104 -2.366000 -27.566001
--74.232101 -5.487000 -29.687099
-24.475001 33.165999 17.114900
-25.638001 36.310002 18.798001
-26.934000 32.358002 18.701900
--112.087995 -69.703102 -24.511999
--104.570001 -66.981100 -16.355000
--106.044002 -60.759000 -18.226000
--46.331100 44.756901 -38.801000
--45.674998 42.688899 -33.308998
--42.370997 45.279898 -37.905999
--74.036099 35.394002 -49.606998
--75.461000 33.179000 -42.202998
--71.292996 35.756901 -42.034101
--3.882000 22.468001 -5.391000
--4.145000 22.902001 -2.085100
--6.494000 23.263000 -4.123100
-7.164900 -142.591998 -29.313998
-12.251001 -152.744994 -20.085000
-4.242000 -153.076991 -22.809999
-118.261002 -35.813000 42.909000
-118.774004 -42.957101 41.520901
-114.820898 -35.433996 32.932900
--67.571998 -37.499100 -39.607000
--67.818098 -34.015000 -40.149000
--71.865998 -34.965098 -31.021999
--64.176105 1.363000 -34.265999
--59.221100 0.564000 -39.715998
--62.583998 4.159900 -34.021001
-64.046897 -52.995998 47.022901
-65.054998 -49.369998 47.777902
-65.665998 -47.959998 37.431899
--58.033101 -89.523099 -56.382000
--61.234102 -85.482098 -57.829000
--54.159999 -80.622099 -49.748100
--113.972999 -15.499000 -46.369001
--115.106098 -23.130000 -55.359099
--115.836002 -22.052100 -45.334000
--31.167999 26.222000 -23.025999
--27.181000 23.825001 -23.091000
--28.990000 27.298000 -21.271000
--85.776098 18.333901 -65.536104
--80.755994 12.984000 -70.197001
--89.897104 14.109001 -65.859102
--14.447000 -98.817103 6.565000
--10.480000 -99.447995 8.583000
--5.753000 -97.262099 -2.968000
-41.625001 25.461001 26.822001
-39.875899 21.083901 29.395901
-37.708901 22.510000 27.908999
-40.159900 -88.477999 7.178900
-44.263899 -94.900101 -3.573000
-36.791902 -90.544999 5.287000
--84.514000 -58.588099 -12.777099
--85.783996 -54.010000 -14.393000
--95.836997 -59.292000 -13.444999
-42.026002 19.555001 30.809000
-44.150002 17.916000 32.145001
-38.986001 16.958000 34.712002
-28.503900 21.989001 46.305902
-26.339000 27.083000 48.161898
-26.170000 22.118000 43.777000
-70.832998 -17.455000 33.845000
-66.932902 -20.416999 41.361000
-66.275999 -17.157000 41.422002
-77.698901 -112.709001 -1.176000
-77.058896 -125.962004 4.072900
-72.570898 -117.422000 -3.622000
--31.864099 30.486001 -21.691000
--29.399099 31.468000 -20.229999
--31.066999 34.976002 -21.379000
--97.402997 1.858000 -32.770999
--89.448996 0.488000 -28.592000
--94.793998 6.438000 -33.500999
--33.794999 34.125000 -22.555999
--34.812998 37.895001 -24.211999
--36.522999 33.143003 -23.656100
--15.358000 22.659000 -16.827000
--14.245000 23.284001 -13.995000
--18.056000 24.642000 -15.388000
--24.475999 33.165999 -17.115999
--26.935000 32.358002 -18.702999
--24.650998 29.270001 -17.597999
--15.238000 24.937000 -34.672100
--18.444099 21.974999 -32.959998
--20.136001 22.062000 -35.755102
-76.899000 -80.061994 65.084897
-88.260002 -82.454100 65.512002
-79.226896 -74.727997 66.324897
-62.104002 -4.944000 40.675901
-63.360997 -7.856000 41.011002
-59.631001 -5.535000 48.208002
-41.665003 12.892000 44.846002
-43.839000 11.435000 46.601001
-41.111901 14.781901 51.702902
-75.767897 -39.724998 66.725902
-84.440000 -36.658101 71.732000
-75.460896 -35.177000 66.986904
-20.211000 -151.848093 -17.351000
-21.545000 -141.227990 -24.135999
-28.076001 -150.393993 -14.615000
--89.531995 21.465000 -58.499999
--85.166998 25.378000 -58.286998
--85.776098 18.333901 -65.536104
-52.235000 10.196000 36.650002
-54.109000 7.967000 37.555002
-49.036898 8.666000 42.303000
-19.628901 -150.672004 30.864900
-25.165001 -156.920001 21.388000
-27.385000 -148.752004 33.490002
--98.541997 -111.140996 -35.766996
--99.995099 -108.117998 -24.355000
--102.936000 -104.222998 -37.977099
-115.753897 -72.425105 34.873001
-113.676004 -79.808995 32.951899
-112.086900 -69.703102 24.510901
--64.176105 1.363000 -34.265999
--62.583998 4.159900 -34.021001
--67.916103 7.132900 -30.462001
-39.298002 20.097001 55.497002
-42.298000 19.162999 57.527002
-42.150002 25.906000 59.436001
--91.508105 -0.320000 -71.337998
--81.621103 -1.823000 -72.949000
--84.472999 -6.327100 -73.317103
-16.506001 -127.833992 40.945899
-21.464001 -139.322996 39.395001
-22.576900 -126.198992 43.207001
--94.848000 15.345001 -41.408099
--95.463000 17.589001 -49.993098
--99.263102 12.913000 -49.699102
--11.182999 26.186001 -5.416000
--10.094000 27.714999 -2.605100
--12.233000 29.075000 -5.071100
-104.306899 0.790000 39.583899
-97.401999 1.858000 32.770000
-101.402000 5.945000 40.305000
-53.173002 22.253901 64.786002
-49.424902 23.767000 63.131899
-48.529901 16.603000 61.229002
-25.364000 -101.764001 36.580000
-23.590000 -113.133103 42.073000
-28.572900 -111.189105 44.082999
--78.065105 -95.151097 0.573000
--86.851001 -102.417000 -3.573000
--82.464993 -107.694998 -1.224000
--65.317102 -59.762102 -23.538999
--63.598998 -63.130103 -22.166999
--60.367100 -61.460000 -33.332098
--58.745001 35.241999 -60.646001
--54.203000 36.699999 -59.354998
--51.417999 30.825000 -62.473997
-1.042000 24.325000 -8.010999
-2.604000 26.694901 -8.963999
-2.900000 25.017900 -6.138100
--51.417999 30.825000 -62.473997
--55.641998 29.384000 -63.998103
--58.745001 35.241999 -60.646001
--38.987000 16.958000 -34.713101
--42.027101 19.555001 -30.810000
--44.151101 17.916000 -32.145999
-70.234999 -45.731999 28.291000
-77.330001 -46.987001 20.500001
-69.300003 -49.298998 27.218001
--74.170001 -99.680997 2.802000
--82.464993 -107.694998 -1.224000
--77.699997 -112.709001 1.174900
--63.529998 -14.403000 -49.722999
--62.369000 -11.326999 -49.327001
--65.456100 -13.971000 -41.384000
-61.319001 -125.839993 -8.624000
-57.751901 -139.272988 -3.774000
-55.241000 -129.489005 -11.170999
--31.864099 30.486001 -21.691000
--33.794999 34.125000 -22.555999
--34.325100 29.399900 -23.084000
-8.222000 39.515901 18.634001
-11.463000 40.215001 17.055901
-8.821900 39.533999 15.501000
--108.002998 -3.879000 -57.542000
--106.100000 2.505000 -48.737001
--104.879998 1.919000 -58.001999
-62.368002 -11.326999 49.325999
-65.455005 -13.971000 41.382901
-63.528903 -14.403000 49.722001
--8.336100 -159.606993 -15.827000
--4.362000 -162.422001 -1.426000
--13.061000 -161.795005 -4.277000
--38.987000 16.958000 -34.713101
--36.968000 18.291000 -32.944098
--42.027101 19.555001 -30.810000
-79.746999 1.271000 28.107001
-74.231006 -5.487000 29.686000
-72.865896 -2.162000 30.010000
--50.974000 6.638000 -43.543000
--54.110099 7.967000 -37.556000
--55.904001 5.618000 -38.369998
-71.352899 1.054000 30.246001
-79.746999 1.271000 28.107001
-72.865896 -2.162000 30.010000
-50.681900 -142.811999 -6.455000
-48.900999 -132.729992 -13.742000
-55.241000 -129.489005 -11.170999
--59.221100 0.564000 -39.715998
--60.722098 -2.135000 -40.245000
--56.424998 -0.260000 -46.659101
--64.176105 1.363000 -34.265999
--60.722098 -2.135000 -40.245000
--59.221100 0.564000 -39.715998
-36.499999 -99.317104 -7.705000
-32.414000 -101.190105 -9.800999
-26.009001 -95.608100 -0.559100
--14.420999 -140.884995 -36.925998
--19.630000 -150.672004 -30.865999
--21.465098 -139.322996 -39.395999
-19.506902 -105.344102 -16.153000
-23.902001 -104.210995 -14.030000
-29.111000 -113.997102 -20.090999
-23.902001 -104.210995 -14.030000
-18.367000 -97.961999 -4.553000
-28.208001 -102.822997 -11.911999
--5.140000 23.913000 -18.018000
--5.987000 24.627000 -21.025999
--2.991000 26.479000 -18.834000
-28.503900 21.989001 46.305902
-30.993000 21.746000 48.749998
-29.155999 27.225001 50.625000
-97.291000 -103.117995 13.854000
-92.892900 -109.269001 11.498000
-90.843000 -96.902996 5.868000
-101.221003 -96.736997 16.141001
-94.429001 -91.186993 8.102001
-97.597897 -85.304096 10.272000
-107.898004 -94.297998 28.826000
-104.669899 -90.165101 18.354001
-107.634999 -83.442099 20.489901
--22.564000 32.214999 -45.950100
--19.850999 31.520002 -43.429099
--23.716999 26.811000 -45.612000
-84.559895 8.916000 70.722900
-89.896001 14.109001 65.857999
-80.754898 12.984000 70.195898
--42.937100 45.311999 -44.113997
--46.331100 44.756901 -38.801000
--42.370997 45.279898 -37.905999
-22.620000 22.312000 22.957001
-27.180001 23.825001 23.089999
-24.249000 21.576900 25.412001
-33.250902 39.090902 51.041000
-31.773999 43.062001 45.823000
-29.579001 38.761001 49.040001
--0.842100 34.365002 11.420000
--0.295000 33.181898 13.944000
-1.266000 35.901003 13.300000
-21.357901 -96.300103 24.350001
-24.388000 -93.056999 12.670000
-17.503001 -97.488999 22.457000
--2.047000 35.707001 6.328000
-0.824900 37.021901 7.932000
-0.218900 37.201900 5.158900
--2.158000 25.420001 -15.937999
--4.487000 23.291901 -14.962000
--5.140000 23.913000 -18.018000
-51.491000 8.559000 58.603998
-51.715001 14.942001 62.893003
-48.868001 10.420000 57.055000
-76.899000 -80.061994 65.084897
-68.999998 -72.420001 61.611902
-66.725902 -76.905996 60.449000
--2.708000 23.593901 3.082000
--0.355000 22.586901 1.656900
--0.895000 23.238001 4.908900
--31.844001 38.527001 -23.216000
--33.794999 34.125000 -22.555999
--31.066999 34.976002 -21.379000
-7.164900 -142.591998 -29.313998
--0.066000 -142.524987 -31.879000
-2.217000 -130.229995 -33.937100
-70.318997 -66.359103 13.187001
-61.691001 -66.418000 20.728001
-63.597903 -63.130103 22.166001
--113.082103 -39.451100 -62.396001
--104.532994 -35.487000 -69.705099
--105.250999 -42.156000 -68.942100
-32.026999 33.428002 52.969001
-29.579001 38.761001 49.040001
-28.659001 33.199001 50.726000
-67.424007 -23.744000 41.202899
-66.932902 -20.416999 41.361000
-71.396001 -20.864999 33.458002
-2.604000 26.694901 -8.963999
-4.131000 27.565001 -6.981000
-2.900000 25.017900 -6.138100
-110.768899 -10.004000 56.944001
-109.072901 -3.198000 48.069902
-108.001903 -3.879000 57.541002
--54.703999 -86.764000 -2.411100
--51.401101 -89.661099 -0.450000
--46.496000 -83.823994 -10.856000
-6.705900 29.902902 27.204001
-8.347901 31.093901 29.895000
-6.531000 33.798900 26.722001
--5.566000 28.236000 4.901000
--4.132000 27.565001 6.980000
--4.402000 30.489901 7.314000
-44.930901 39.229900 29.215001
-43.785900 35.041001 26.687000
-41.622002 40.137000 28.544001
-36.499999 -99.317104 -7.705000
-26.009001 -95.608100 -0.559100
-29.704001 -94.116993 1.414000
-12.663000 41.139901 25.642000
-10.133000 40.014900 23.854000
-9.982000 38.671002 27.645001
--45.674998 42.688899 -33.308998
--49.369998 41.777000 -33.949099
--48.258997 38.129002 -29.798999
--79.748102 1.271000 -28.107999
--77.864997 4.761000 -28.563999
--84.918998 8.406000 -29.855000
--1.805000 37.423000 -0.759100
--5.261100 36.866002 -2.335100
--4.158000 36.416002 0.666000
-1.889000 31.475000 -11.766000
-0.293900 33.181898 -13.944999
-0.841000 34.365002 -11.421000
--5.810000 38.432900 -16.906999
--3.491000 37.240002 -15.129000
--3.438000 36.180902 -18.090999
--9.614999 -99.194996 -18.584000
--13.584000 -98.457098 -20.534100
--17.090099 -95.358104 -8.844000
--67.135103 -40.993098 -38.973000
--67.571998 -37.499100 -39.607000
--71.516000 -38.554098 -30.195000
-43.785900 35.041001 26.687000
-44.624001 29.340900 26.465900
-41.945901 30.753901 25.611000
-111.055002 -87.114997 30.936001
-110.091001 -89.749098 42.118002
-106.789999 -97.075999 40.095001
--10.884000 23.413001 -25.906999
--12.159999 23.888001 -28.868999
--8.237099 26.256001 -26.916999
-52.235000 10.196000 36.650002
-47.062002 10.564900 40.964998
-50.292902 12.305000 35.652000
--63.757002 -99.849999 -59.106998
--54.548100 -93.365997 -54.848999
--59.576999 -104.259104 -57.380099
-0.824900 37.021901 7.932000
-1.123000 36.630999 10.618000
-3.703000 37.930001 9.479000
-10.093001 27.714999 2.604000
-10.531000 30.694000 2.585000
-12.232000 29.075000 5.070000
--70.951000 -67.836002 -62.675998
--79.227999 -74.727997 -66.326000
--81.157997 -69.303103 -67.457102
--12.116999 21.961000 -18.404000
--8.034999 22.405000 -16.812999
--11.231000 22.183999 -15.400000
--50.267000 -112.231106 -53.675998
--55.074099 -108.392999 -55.568099
--46.778999 -100.378998 -51.541101
--0.295000 33.181898 13.944000
--0.842100 34.365002 11.420000
--1.890000 31.475000 11.765000
--118.307002 -57.592001 -38.411997
--117.296994 -65.003999 -36.695000
--114.588998 -55.833999 -28.174000
-54.497000 42.923000 40.290002
-50.376900 43.977000 39.595999
-51.486000 44.090901 46.243001
--21.210000 43.922000 -30.531099
--24.378099 44.597000 -31.989999
--25.031999 43.827899 -27.532000
-4.486000 23.291901 14.961001
-7.401000 22.284001 13.706001
-8.034000 22.405000 16.812000
--10.480000 -99.447995 8.583000
--1.920000 -97.473003 -0.991000
--5.753000 -97.262099 -2.968000
-62.368002 -11.326999 49.325999
-64.481005 -10.867000 41.247003
-65.455005 -13.971000 41.382901
--75.458996 -49.036998 -65.839998
--74.824996 -53.755101 -65.219104
--84.550105 -52.807998 -70.151098
-88.260002 -82.454100 65.512002
-96.233003 -90.508103 60.032003
-99.078000 -83.713993 61.661899
-66.748001 -38.430098 49.457002
-69.434896 -41.625999 58.743000
-69.517896 -37.613999 59.070900
--64.048000 -52.995998 -47.023997
--65.055996 -49.369998 -47.778998
--65.667003 -47.959998 -37.432998
-41.200001 -92.922993 43.682899
-46.777900 -100.378998 51.540002
-44.747002 -90.139002 45.305900
--9.982999 38.671002 -27.646000
--12.421000 39.930001 -29.673999
--12.664000 41.139901 -25.643000
--8.468100 35.143003 -29.138999
--7.735100 37.348900 -25.545999
--6.532100 33.798900 -26.722999
--31.844001 38.527001 -23.216000
--28.903000 39.007898 -22.135999
--28.767100 41.932900 -24.962999
--5.526100 37.534002 -20.073999
--5.669100 35.980899 -23.382999
--7.756100 38.812000 -21.996999
--61.368998 -60.123101 -45.236100
--62.819101 -56.584999 -46.174999
--63.409097 -54.817099 -35.547100
-92.892900 -109.269001 11.498000
-88.041902 -115.153000 9.079001
-86.849898 -102.417000 3.572000
--17.062999 35.237901 -12.069999
--19.549999 34.590900 -13.789000
--18.143000 32.005999 -11.770099
--12.200000 37.987899 -11.311000
--14.913999 37.804998 -12.883999
--14.528000 35.861000 -10.334000
-1.235000 22.840001 6.756000
--1.043000 24.325000 8.010000
--0.895000 23.238001 4.908900
--60.729999 -95.892996 4.506000
--54.703999 -86.764000 -2.411100
--64.421996 -92.332102 2.384900
--84.441103 -36.658101 -71.733102
--94.949998 -38.839098 -72.513998
--94.126999 -32.889001 -72.998099
--45.390997 38.569000 -56.389000
--47.272999 31.930000 -60.819998
--49.743101 37.800901 -57.933997
--28.822999 -93.263097 -28.024999
--32.402098 -91.427103 -29.798100
--34.713101 -88.143997 -18.187100
--21.210000 43.922000 -30.531099
--20.907000 43.172002 -35.294998
--24.378099 44.597000 -31.989999
-101.433896 7.368900 58.327898
-100.832999 -0.876000 65.969005
-104.878895 1.919000 58.000900
-44.624001 29.340900 26.465900
-46.769001 33.754002 27.340900
-47.264900 27.780000 27.239900
-84.917903 8.406000 29.854000
-79.746999 1.271000 28.107001
-77.863902 4.761000 28.562900
-67.087896 38.013000 41.755002
-64.940006 39.911900 48.608001
-69.491901 37.833001 49.166001
-78.236900 -132.360995 14.522000
-75.927004 -135.641992 26.131900
-71.690001 -137.475997 11.913000
-27.697900 45.117002 33.360001
-31.548902 44.195902 29.822901
-28.238000 44.095002 28.721999
-4.537000 25.579000 -4.223100
-6.190000 26.097000 -2.142000
-4.460000 23.940900 -1.170000
--14.245000 23.284001 -13.995000
--13.195000 24.041001 -11.143000
--16.616000 25.537001 -12.813000
-57.751901 -139.272988 -3.774000
-57.472002 -146.320999 6.552000
-50.681900 -142.811999 -6.455000
-55.241000 -129.489005 -11.170999
-57.751901 -139.272988 -3.774000
-50.681900 -142.811999 -6.455000
--2.451000 -100.036100 12.614001
-5.751900 -97.262099 2.967000
-1.919000 -97.473003 0.990000
-65.054998 -49.369998 47.777902
-65.838896 -45.722999 48.436999
-66.499002 -44.484101 38.247000
-19.774901 41.625001 21.357000
-16.930901 41.262999 19.993000
-16.103001 42.179000 23.434000
-64.420901 -92.332102 -2.386000
-67.869000 -88.578105 -0.308000
-74.168898 -99.680997 -2.803000
--69.212995 -10.838999 -34.348000
--70.103996 -14.110000 -34.141999
--65.456100 -13.971000 -41.384000
-90.605006 -76.269999 66.875003
-88.260002 -82.454100 65.512002
-99.078000 -83.713993 61.661899
-48.291001 -105.249099 -11.063000
-44.263899 -94.900101 -3.573000
-52.650001 -102.371104 -8.849000
--75.191103 -8.454099 -71.291998
--77.431999 -12.616999 -71.709998
--84.472999 -6.327100 -73.317103
-28.347000 35.700999 20.125000
-25.638001 36.310002 18.798001
-25.993001 39.352000 20.972000
-25.638001 36.310002 18.798001
-22.944901 36.812000 17.402001
-23.125000 39.562900 19.729000
-79.746999 1.271000 28.107001
-71.352899 1.054000 30.246001
-77.863902 4.761000 28.562900
-66.444904 19.833000 29.545000
-71.003899 24.561999 31.399902
-68.960898 17.148999 29.520001
--17.364999 30.729000 -40.828999
--19.850999 31.520002 -43.429099
--17.112000 35.666000 -40.078998
-15.357001 22.659000 16.826000
-11.229901 22.183999 15.399001
-14.244000 23.284001 13.994001
--63.452996 -77.124096 -8.032000
--65.958999 -73.639996 -9.807999
--73.988996 -80.572002 -3.714000
-54.388899 -70.805997 29.440900
-52.041002 -73.708996 28.006000
-50.931901 -76.486997 39.272901
--12.278000 33.459898 -35.116099
--10.613000 36.457002 -31.493999
--10.204100 32.285899 -32.535002
-22.697000 41.862901 22.642901
-19.774901 41.625001 21.357000
-18.961001 42.854901 24.884000
--7.735100 37.348900 -25.545999
--9.982999 38.671002 -27.646000
--10.133999 40.014900 -23.854999
--64.637102 -51.409099 -36.533099
--64.048000 -52.995998 -47.023997
--65.667003 -47.959998 -37.432998
--0.355000 22.586901 1.656900
-1.577900 22.495002 3.486000
--0.895000 23.238001 4.908900
-102.819003 7.880000 49.278900
-104.878895 1.919000 58.000900
-106.098898 2.505000 48.735999
--110.108100 -76.608099 -22.545999
--107.636102 -83.442099 -20.490998
--102.669999 -73.166996 -14.403000
--7.756100 38.812000 -21.996999
--7.735100 37.348900 -25.545999
--10.133999 40.014900 -23.854999
--106.044002 -60.759000 -18.226000
--104.570001 -66.981100 -16.355000
--95.836997 -59.292000 -13.444999
-38.067002 -106.363997 47.938898
-42.529900 -103.510104 49.772900
-37.471998 -95.488995 41.993901
-63.333899 33.414003 61.804000
-58.743902 35.241999 60.644999
-55.640899 29.384000 63.997000
-29.551001 18.850001 40.726002
-28.503900 21.989001 46.305902
-26.170000 22.118000 43.777000
-52.650001 -102.371104 -8.849000
-56.798901 -99.247098 -6.663100
-60.668901 -111.819997 -9.740000
--28.615000 -139.806002 21.531001
--28.076999 -150.393993 14.614000
--21.545999 -141.227990 24.135001
--80.755994 12.984000 -70.197001
--76.779000 16.670000 -69.525100
--71.782000 9.750000 -70.970103
-80.754898 12.984000 70.195898
-76.777898 16.670000 69.524005
-71.780898 9.750000 70.969000
-10.133000 40.014900 23.854000
-12.663000 41.139901 25.642000
-13.362001 41.388899 21.905001
-39.333001 33.215001 57.130001
-37.124000 39.187901 52.937001
-35.590000 33.443999 55.104900
-5.751900 -97.262099 2.967000
--2.451000 -100.036100 12.614001
-1.582000 -99.987000 14.618000
-13.194000 24.041001 11.142001
-15.192000 26.541000 10.222000
-16.614901 25.537001 12.812001
-48.251901 -79.394996 37.852000
-49.525000 -76.486096 26.506901
-45.395002 -82.151100 36.361001
--38.849998 45.506001 -42.890001
--42.937100 45.311999 -44.113997
--42.370997 45.279898 -37.905999
--36.968000 18.291000 -32.944098
--31.396002 18.423000 -34.743100
--34.965999 19.534901 -31.101000
--113.972999 -15.499000 -46.369001
--113.149099 -16.431000 -56.217000
--115.106098 -23.130000 -55.359099
--72.026104 -31.390000 -31.762000
--67.818098 -34.015000 -40.149000
--67.872100 -30.553000 -40.597100
-58.094002 10.802000 65.819904
-61.229002 8.305000 67.082003
-64.498000 15.770001 68.920895
-83.674006 -31.491000 71.998999
-92.901997 -27.115000 73.344000
-82.569003 -26.480000 72.133005
-104.208000 -101.315103 26.631001
-101.221003 -96.736997 16.141001
-104.669899 -90.165101 18.354001
-69.140896 -140.768990 23.554001
-64.754896 -142.140001 9.253000
-71.690001 -137.475997 11.913000
--10.330000 -129.052997 -38.646001
--14.420999 -140.884995 -36.925998
--16.507000 -127.833992 -40.946998
-72.843999 -22.243099 67.013003
-68.309896 -25.997000 59.366003
-73.985003 -26.416099 67.132004
--50.933000 -76.486997 -39.274000
--48.253000 -79.394996 -37.853099
--51.242098 -83.972998 -48.342999
-74.861899 -30.733999 67.123003
-83.674006 -31.491000 71.998999
-82.569003 -26.480000 72.133005
--5.526100 37.534002 -20.073999
--5.810000 38.432900 -16.906999
--3.438000 36.180902 -18.090999
-2.161000 22.708001 0.165000
-0.354000 22.586901 -1.658000
-2.707000 23.593901 -3.083000
-7.018000 25.413001 23.992000
-9.776000 22.995001 22.909001
-10.883001 23.413001 25.906000
--64.392999 35.693999 -35.562098
--60.632002 37.596002 -35.299998
--62.874101 39.952900 -41.370999
--85.166998 25.378000 -58.286998
--89.531995 21.465000 -58.499999
--87.278001 25.836900 -50.207101
--65.055996 -49.369998 -47.778998
--66.500001 -44.484101 -38.248099
--65.667003 -47.959998 -37.432998
-46.608001 -153.172001 15.501000
-49.125899 -148.504004 29.488001
-41.373000 -151.871994 26.829001
-9.776000 22.995001 22.909001
-14.250000 21.805000 24.325000
-10.883001 23.413001 25.906000
-64.134002 -81.267998 59.186000
-71.071900 -90.329103 62.291000
-74.178003 -85.274100 63.740000
-101.745002 -22.715999 70.817001
-110.721998 -25.569100 64.135998
-108.852901 -18.965099 64.803004
-85.448898 -88.516995 64.037003
-88.260002 -82.454100 65.512002
-76.899000 -80.061994 65.084897
-35.646901 43.333001 47.501899
-31.773999 43.062001 45.823000
-33.250902 39.090902 51.041000
-90.605006 -76.269999 66.875003
-99.078000 -83.713993 61.661899
-101.401001 -76.811999 63.180000
--53.174000 22.253901 -64.787105
--59.915099 27.590001 -65.385103
--55.641998 29.384000 -63.998103
--59.597101 -69.614999 -19.225100
--68.249099 -70.046999 -11.528000
--65.958999 -73.639996 -9.807999
-17.985001 28.600000 12.029001
-16.145000 29.666001 9.746000
-18.142000 32.005999 11.769000
-84.888898 -47.346100 70.804998
-75.771004 -44.354100 66.343002
-75.457998 -49.036998 65.838896
-84.440000 -36.658101 71.732000
-83.674006 -31.491000 71.998999
-75.460896 -35.177000 66.986904
--39.244000 32.019999 -24.674000
--40.792998 36.159001 -25.947999
--41.947000 30.753901 -25.612000
-3.490000 37.240002 15.128001
-3.661000 37.785899 12.274000
-1.266000 35.901003 13.300000
--0.295000 33.181898 13.944000
-1.493000 34.740001 16.048001
-1.266000 35.901003 13.300000
-14.803001 -129.712999 -29.122999
-21.031000 -128.824994 -26.691999
-21.545000 -141.227990 -24.135999
-54.916002 35.313901 30.700000
-56.861900 39.236899 34.944002
-58.223899 33.594999 31.017000
-27.544001 19.343901 38.277000
-29.551001 18.850001 40.726002
-26.170000 22.118000 43.777000
-25.649000 19.777000 35.762001
-27.544001 19.343901 38.277000
-23.996001 22.156000 41.168898
-27.544001 19.343901 38.277000
-33.340901 17.506000 36.922000
-29.551001 18.850001 40.726002
--63.867100 -4.120000 -64.448997
--62.153000 -8.959000 -57.474997
--66.027999 -7.336000 -65.225996
-106.042899 -60.759000 18.225001
-113.580003 -62.765002 26.388900
-112.086900 -69.703102 24.510901
-36.499999 -99.317104 -7.705000
-40.455002 -97.217105 -5.628000
-43.740001 -107.864000 -13.299000
--68.947002 -29.781999 -59.384998
--74.863002 -30.733999 -67.124099
--73.986098 -26.416099 -67.133099
--1.579000 22.495002 -3.487000
--1.236000 22.840001 -6.757000
-0.893900 23.238001 -4.910000
--68.190105 12.932000 -70.018001
--76.779000 16.670000 -69.525100
--72.668999 19.975001 -68.705104
-75.927004 -135.641992 26.131900
-69.140896 -140.768990 23.554001
-71.690001 -137.475997 11.913000
--1.579000 22.495002 -3.487000
-0.893900 23.238001 -4.910000
-0.354000 22.586901 -1.658000
-2.990000 26.479000 18.833000
-2.157000 25.420001 15.937001
-5.138900 23.913000 18.017000
--5.969000 -107.152097 22.502001
--13.448000 -117.304102 26.898000
--8.101000 -117.737003 29.145900
--37.943099 -86.139999 -19.948000
--35.861999 -89.388996 -31.521000
--41.048098 -83.962999 -21.666100
--81.469104 -2.366000 -27.566001
--83.018996 -6.141000 -26.935000
--75.440101 -8.917000 -29.275998
-9.776000 22.995001 22.909001
-7.018000 25.413001 23.992000
-5.986000 24.627000 21.024900
--62.105000 -4.944000 -40.677000
--60.722098 -2.135000 -40.245000
--65.641001 -1.542100 -34.423098
--6.935000 22.329900 -10.555999
--6.639000 22.620000 -7.356000
--9.795999 23.099001 -9.304000
--1.864000 28.402900 11.600001
--3.211000 29.589999 9.468000
--2.605100 26.694901 8.963000
--14.579100 34.596000 -37.632000
--15.108000 29.871000 -38.160000
--17.364999 30.729000 -40.828999
--54.110099 7.967000 -37.556000
--49.037997 8.666000 -42.304099
--52.236099 10.196000 -36.651101
-85.782900 -54.010000 14.392001
-86.777903 -49.417000 15.935000
-96.986003 -53.895999 15.173000
--95.319100 -51.126998 -71.143001
--105.491996 -48.965998 -68.044998
--95.351994 -44.929098 -71.893997
-28.076001 -150.393993 -14.615000
-21.545000 -141.227990 -24.135999
-28.613999 -139.806002 -21.531999
-28.613999 -139.806002 -21.531999
-21.545000 -141.227990 -24.135999
-21.031000 -128.824994 -26.691999
--66.839993 -56.325100 -24.840100
--75.196996 -54.862998 -17.786000
--73.795997 -58.752000 -16.321000
--118.207097 -51.999100 -50.652098
--117.692098 -59.542999 -49.169000
--118.795000 -50.230000 -40.022001
--1.579000 22.495002 -3.487000
--2.162000 22.708001 -0.166000
--4.145000 22.902001 -2.085100
--60.737997 -80.481105 -6.205000
--67.870103 -88.578105 0.307000
--57.820000 -83.697997 -4.329000
-33.348899 25.072001 24.718901
-31.166900 26.222000 23.024900
-34.324002 29.399900 23.083000
-58.556899 -64.669997 32.105900
-60.366001 -61.460000 33.331003
-63.597903 -63.130103 22.166001
--106.561996 -12.629000 -65.333098
--103.877001 -6.591100 -65.722100
--97.324997 -10.919000 -71.365997
--104.476996 -62.852100 -65.862000
--103.199996 -69.844104 -64.582102
--111.680098 -68.833999 -57.363000
--99.725001 -16.681001 -71.164101
--106.561996 -12.629000 -65.333098
--97.324997 -10.919000 -71.365997
-13.607000 24.402902 31.791002
-12.159000 23.888001 28.868001
-16.902000 21.891002 30.120000
--77.431999 -12.616999 -71.709998
--79.427101 -17.021000 -71.989000
--87.057002 -11.127000 -73.540099
--94.573997 -5.459100 -71.426101
--84.472999 -6.327100 -73.317103
--87.057002 -11.127000 -73.540099
-23.870001 20.166900 33.185001
-18.443001 21.974999 32.958899
-22.201000 20.534901 30.555001
-15.192000 26.541000 10.222000
-12.187000 24.986001 8.277001
-13.751000 27.704000 7.631900
-107.997000 -42.200100 23.326900
-115.123004 -48.944999 29.860999
-107.749999 -48.339099 21.715000
--103.723995 -13.285000 -29.972099
--101.888999 -8.016000 -31.004999
--109.235100 -10.358000 -37.807997
-31.166900 26.222000 23.024900
-33.348899 25.072001 24.718901
-29.086001 22.833001 25.179001
-79.746999 1.271000 28.107001
-84.917903 8.406000 29.854000
-87.274000 4.546000 29.267900
-97.401999 1.858000 32.770000
-99.775001 -2.964000 31.936999
-91.426998 -3.758000 27.822001
--15.353000 42.175900 -27.352000
--18.201999 43.110002 -28.983001
--18.962000 42.854901 -24.885099
-63.360997 -7.856000 41.011002
-61.063901 -8.370000 48.823003
-59.631001 -5.535000 48.208002
-84.559895 8.916000 70.722900
-93.805000 9.491000 66.038005
-89.896001 14.109001 65.857999
--6.226000 38.735002 -13.905000
--3.491000 37.240002 -15.129000
--5.810000 38.432900 -16.906999
--0.768100 25.617000 10.951000
--1.864000 28.402900 11.600001
--2.605100 26.694901 8.963000
--25.643000 -157.675996 4.556000
--30.184099 -158.681005 -9.936000
--21.684999 -160.544991 -7.114000
--60.876001 6.846000 -33.687100
--66.004999 9.984001 -30.440999
--62.583998 4.159900 -34.021001
--19.531099 23.822900 -17.938999
--15.358000 22.659000 -16.827000
--18.056000 24.642000 -15.388000
--14.245000 23.284001 -13.995000
--16.616000 25.537001 -12.813000
--18.056000 24.642000 -15.388000
--74.170001 -99.680997 2.802000
--78.065105 -95.151097 0.573000
--82.464993 -107.694998 -1.224000
--21.618100 26.652901 -16.555099
--18.056000 24.642000 -15.388000
--19.800000 27.606001 -14.304000
--6.226000 38.735002 -13.905000
--5.810000 38.432900 -16.906999
--8.823000 39.533999 -15.502000
--64.528003 -135.264993 1.120000
--67.103997 -121.808998 6.105000
--70.974000 -130.817994 -1.499000
-44.006001 23.902001 27.915001
-44.624001 29.340900 26.465900
-47.264900 27.780000 27.239900
-77.058896 -125.962004 4.072900
-77.698901 -112.709001 -1.176000
-82.758002 -120.727994 6.604000
-15.192000 26.541000 10.222000
-13.194000 24.041001 11.142001
-12.187000 24.986001 8.277001
-68.494007 -49.749099 57.754003
-65.838896 -45.722999 48.436999
-65.054998 -49.369998 47.777902
--64.291999 5.520900 -68.206102
--67.248099 2.447900 -69.186993
--71.782000 9.750000 -70.970103
--75.191103 -8.454099 -71.291998
--81.621103 -1.823000 -72.949000
--72.725996 -4.547000 -70.732102
-27.173901 -127.527997 -24.254000
-35.553999 -137.906998 -18.927999
-28.613999 -139.806002 -21.531999
-42.936001 45.311999 44.112898
-47.152899 44.847000 45.230899
-46.330001 44.756901 38.799901
-1.863000 28.402900 -11.601000
-1.889000 31.475000 -11.766000
-3.210000 29.589999 -9.469000
-42.298000 19.162999 57.527002
-43.659899 13.520001 53.602003
-45.382902 18.003900 59.441000
--31.371098 -89.971103 -16.383000
--36.793001 -90.544999 -5.288100
--27.925000 -91.610096 -14.544000
--27.691999 20.075001 -30.187100
--23.871100 20.166900 -33.186100
--22.202000 20.534901 -30.555999
--59.058998 9.413901 -33.264000
--57.141997 11.864000 -32.755099
--61.845101 15.288901 -30.143999
--48.216000 8.079001 -49.805999
--46.027999 9.835000 -48.256099
--50.974000 6.638000 -43.543000
-10.883001 23.413001 25.906000
-14.250000 21.805000 24.325000
-15.505901 21.826901 27.239000
-28.100001 42.569902 44.041000
-31.773999 43.062001 45.823000
-31.138901 45.166902 40.137999
-20.638900 20.899000 27.878901
-22.201000 20.534901 30.555001
-16.902000 21.891002 30.120000
--52.860100 4.473900 -44.683997
--50.388999 6.159900 -51.245999
--50.974000 6.638000 -43.543000
--19.630000 -150.672004 -30.865999
--14.420999 -140.884995 -36.925998
--11.745000 -152.037993 -28.208099
-91.300003 -21.545999 73.550999
-101.745002 -22.715999 70.817001
-99.723898 -16.681001 71.162999
--62.583998 4.159900 -34.021001
--59.221100 0.564000 -39.715998
--57.611998 3.148000 -39.090998
-49.525000 -76.486096 26.506901
-52.041002 -73.708996 28.006000
-57.318002 -72.709002 17.659001
--68.947002 -29.781999 -59.384998
--69.352999 -33.659998 -59.285998
--74.863002 -30.733999 -67.124099
-54.388899 -70.805997 29.440900
-53.423900 -73.440105 40.624000
-56.563899 -67.790098 30.809000
--83.588995 27.037000 -42.216998
--82.958996 29.399000 -50.127998
--87.278001 25.836900 -50.207101
--113.149099 -16.431000 -56.217000
--108.853996 -18.965099 -64.804100
--115.106098 -23.130000 -55.359099
-101.402000 5.945000 40.305000
-102.819003 7.880000 49.278900
-106.098898 2.505000 48.735999
-115.753897 -72.425105 34.873001
-113.580003 -62.765002 26.388900
-117.295898 -65.003999 36.694001
-59.220001 0.564000 39.714999
-54.680001 2.176000 45.722000
-57.611000 3.148000 39.090000
--75.191103 -8.454099 -71.291998
--72.725996 -4.547000 -70.732102
--68.028003 -10.766000 -65.871105
--63.417003 -65.831102 -54.513101
--61.481997 -69.697998 -53.456102
--69.000997 -72.420001 -61.612997
-27.180001 23.825001 23.089999
-28.989000 27.298000 21.270001
-31.166900 26.222000 23.024900
--7.735100 37.348900 -25.545999
--5.669100 35.980899 -23.382999
--6.532100 33.798900 -26.722999
--77.331103 -46.987001 -20.500999
--87.503999 -44.826999 -17.402999
--86.778998 -49.417000 -15.936000
--7.019100 25.413001 -23.993099
--8.237099 26.256001 -26.916999
--5.270000 28.728999 -24.462000
-72.724901 -4.547000 70.730999
-75.190000 -8.454099 71.291000
-81.620000 -1.823000 72.947897
-15.552000 38.923901 35.994899
-12.972000 37.723899 33.778898
-14.578000 34.596000 37.631001
--78.531995 2.365000 -72.434999
--81.621103 -1.823000 -72.949000
--88.156998 4.478000 -71.103998
--84.865995 -85.512102 -3.738000
--90.844102 -96.902996 -5.869000
--81.633106 -90.416998 -1.609000
--98.426104 -37.839100 -19.881999
--98.264001 -32.605000 -21.284999
--107.858099 -36.146000 -24.847999
-59.699003 -63.590996 44.206999
-57.813901 -66.976994 43.094002
-61.480898 -69.697998 53.455003
-50.265901 -112.231106 53.674899
-55.073000 -108.392999 55.567000
-46.777900 -100.378998 51.540002
--84.652096 -109.789103 -54.513101
--79.821996 -115.709998 -52.478101
--88.197000 -118.152998 -44.175997
-63.408002 -54.817099 35.546001
-62.817998 -56.584999 46.173900
-64.636000 -51.409099 36.532000
-19.530000 23.822900 17.937900
-21.617001 26.652901 16.554002
-23.447001 25.718901 18.773001
-21.048000 23.054000 20.464001
-22.620000 22.312000 22.957001
-17.819000 21.680001 22.413000
-39.243001 32.019999 24.673000
-36.521900 33.143003 23.655001
-37.797999 37.109002 25.121901
--33.251997 39.090902 -51.041998
--31.775001 43.062001 -45.824099
--29.580001 38.761001 -49.041100
-43.785900 35.041001 26.687000
-41.945901 30.753901 25.611000
-40.791899 36.159001 25.947001
--28.659999 33.199001 -50.727099
--32.028001 33.428002 -52.970100
--29.580001 38.761001 -49.041100
--19.881999 36.645900 -42.451099
--22.886001 37.507899 -44.737998
--21.385100 41.029900 -40.194098
--58.081102 -2.830000 -47.486998
--60.722098 -2.135000 -40.245000
--62.105000 -4.944000 -40.677000
--26.121099 38.222000 -46.937101
--25.503099 32.784000 -48.384000
--28.659999 33.199001 -50.727099
-8.520001 -130.182996 -31.541098
-14.383000 -142.159000 -26.732100
-7.164900 -142.591998 -29.313998
--65.458998 -108.042002 7.389900
--67.103997 -121.808998 6.105000
--60.670000 -111.819997 9.739000
--12.252000 -152.744994 20.083901
--14.384000 -142.159000 26.731001
--20.212000 -151.848093 17.350001
-9.645000 27.141999 29.801000
-6.705900 29.902902 27.204001
-8.236000 26.256001 26.916001
--33.369999 -154.684991 -24.128100
--27.386000 -148.752004 -33.491101
--25.166100 -156.920001 -21.389000
-79.007007 25.413001 35.638001
-75.456001 28.392000 35.763901
-79.568997 30.273002 42.263899
-79.029903 -72.038099 7.521900
-70.318997 -66.359103 13.187001
-81.138000 -67.621104 9.338000
--68.190105 12.932000 -70.018001
--71.782000 9.750000 -70.970103
--76.779000 16.670000 -69.525100
-31.669002 18.274900 43.097902
-33.890899 17.600000 45.389902
-30.993000 21.746000 48.749998
--57.815000 -66.976994 -43.095101
--58.557998 -64.669997 -32.106999
--55.723000 -70.263997 -41.898999
--61.481997 -69.697998 -53.456102
--59.700102 -63.590996 -44.208098
--57.815000 -66.976994 -43.095101
-102.819003 7.880000 49.278900
-99.261999 12.913000 49.698003
-101.433896 7.368900 58.327898
-99.261999 12.913000 49.698003
-97.704001 12.453000 58.520000
-101.433896 7.368900 58.327898
--88.261098 -82.454100 -65.513097
--76.900102 -80.061994 -65.086000
--85.449994 -88.516995 -64.038098
--34.965999 19.534901 -31.101000
--32.981001 20.701000 -29.189000
--37.710000 22.510000 -27.910000
-33.890899 17.600000 45.389902
-36.215000 16.805001 47.591899
-33.631001 21.367000 51.102001
-76.482005 -12.443000 28.777901
-75.439006 -8.917000 29.274900
-83.017901 -6.141000 26.934000
-97.401999 1.858000 32.770000
-89.447901 0.488000 28.590901
-94.792902 6.438000 33.500001
--10.094000 27.714999 -2.605100
--10.531999 30.694000 -2.586000
--12.233000 29.075000 -5.071100
--6.226000 38.735002 -13.905000
--9.285000 38.998000 -12.563000
--6.521000 38.555000 -11.023000
--14.447000 -98.817103 6.565000
--19.507999 -105.344102 16.152000
--10.480000 -99.447995 8.583000
-74.168898 -99.680997 -2.803000
-78.064002 -95.151097 -0.574100
-82.463898 -107.694998 1.223000
--67.103997 -121.808998 6.105000
--72.572000 -117.422000 3.621000
--70.974000 -130.817994 -1.499000
-1.042000 24.325000 -8.010999
--1.234000 23.538001 -9.919000
-0.767000 25.617000 -10.952000
-4.401000 30.489901 -7.315100
-2.773000 32.568999 -9.450000
-3.670000 33.348899 -7.086000
-84.513001 -58.588099 12.776000
-82.963899 -63.131101 11.090000
-73.794901 -58.752000 16.319901
-0.136000 26.974000 -13.768000
-0.767000 25.617000 -10.952000
--1.560000 24.427000 -12.971000
-66.488899 -57.870001 56.334902
-64.046897 -52.995998 47.022901
-62.817998 -56.584999 46.173900
--24.389001 -93.056999 -12.670999
--33.305101 -92.428103 -3.365100
--29.704999 -94.116993 -1.415000
--97.598001 -105.022103 -48.449099
--89.009099 -103.585996 -56.451999
--93.153998 -111.726999 -46.356998
--88.197000 -118.152998 -44.175997
--93.623102 -117.786102 -33.473000
--93.153998 -111.726999 -46.356998
--78.531995 2.365000 -72.434999
--75.240999 6.224900 -71.776100
--70.069999 -0.909000 -70.029996
--68.463996 22.892900 -67.740001
--72.525099 28.589999 -63.716002
--64.199999 25.429999 -66.633105
--0.137000 26.974000 13.767000
--0.768100 25.617000 10.951000
-1.559000 24.427000 12.970001
--5.608000 -99.707097 -16.609000
-1.396000 -107.208997 -24.595000
--3.175000 -106.987998 -26.670100
--17.503999 -97.488999 -22.458099
--12.242000 -105.717100 -30.740000
--16.698999 -104.667000 -32.727100
-57.472002 -146.320999 6.552000
-57.751901 -139.272988 -3.774000
-64.754896 -142.140001 9.253000
--54.883000 22.194900 -29.066999
--61.141998 24.687000 -29.340100
--57.287998 20.037999 -29.510999
--84.514000 -58.588099 -12.777099
--82.964994 -63.131101 -11.090999
--73.795997 -58.752000 -16.321000
--77.864997 4.761000 -28.563999
--75.834997 8.097000 -28.934099
--82.401097 12.062000 -30.347100
-49.876899 -149.988994 3.812900
-46.608001 -153.172001 15.501000
-42.012002 -153.117999 1.044000
--76.648101 -76.361999 -5.646000
--68.249099 -70.046999 -11.528000
--79.030998 -72.038099 -7.523000
-99.078000 -83.713993 61.661899
-96.233003 -90.508103 60.032003
-104.886003 -90.940103 52.334901
-96.233003 -90.508103 60.032003
-101.512998 -98.075993 50.442003
-104.886003 -90.940103 52.334901
--90.304099 -75.281002 -7.821100
--79.030998 -72.038099 -7.523000
--81.138998 -67.621104 -9.339000
--3.211000 29.589999 9.468000
--1.890000 31.475000 11.765000
--2.774000 32.568999 9.449000
-50.681900 -142.811999 -6.455000
-42.326000 -135.543004 -16.330000
-48.900999 -132.729992 -13.742000
--17.510099 39.639901 -17.028000
--17.594000 37.548900 -14.435099
--14.756000 39.525002 -15.582000
--24.635099 41.883901 -42.163000
--28.100999 42.569902 -44.041999
--27.542001 44.678003 -38.618099
-118.206002 -51.999100 50.651003
-113.522001 -46.654001 61.326001
-113.444000 -53.981997 60.130000
--30.184099 -158.681005 -9.936000
--33.369999 -154.684991 -24.128100
--25.166100 -156.920001 -21.389000
-48.291899 14.293000 34.568999
-50.872002 18.461000 30.708000
-53.040002 16.388001 31.475000
--97.598001 -105.022103 -48.449099
--101.513997 -98.075993 -50.443102
--92.874102 -97.144999 -58.293998
-72.570898 -117.422000 -3.622000
-77.058896 -125.962004 4.072900
-70.972897 -130.817994 1.498000
-42.529900 -103.510104 49.772900
-38.067002 -106.363997 47.938898
-45.180902 -115.747102 51.708899
--1.920000 -97.473003 -0.991000
--6.475000 -99.856101 10.600001
-1.919000 -97.473003 0.990000
--71.998097 -27.841000 -32.416999
--72.026104 -31.390000 -31.762000
--67.872100 -30.553000 -40.597100
--115.124099 -48.944999 -29.862000
--107.749999 -48.339099 -21.716001
--107.998103 -42.200100 -23.327999
-75.767897 -39.724998 66.725902
-69.434896 -41.625999 58.743000
-75.771004 -44.354100 66.343002
-84.848903 -41.951999 71.332999
-75.767897 -39.724998 66.725902
-75.771004 -44.354100 66.343002
--7.019100 25.413001 -23.993099
--9.777100 22.995001 -22.910001
--10.884000 23.413001 -25.906999
--117.296994 -65.003999 -36.695000
--115.754999 -72.425105 -34.874100
--113.581099 -62.765002 -26.389999
-97.597897 -85.304096 10.272000
-94.429001 -91.186993 8.102001
-87.758005 -80.457099 5.809000
-73.985003 -26.416099 67.132004
-68.945900 -29.781999 59.383899
-74.861899 -30.733999 67.123003
-87.816998 -26.813000 22.479000
-97.800002 -27.465999 22.599000
-88.110998 -31.233000 21.333000
-37.124000 39.187901 52.937001
-41.175898 39.021902 54.722000
-39.701901 43.355901 49.076900
-41.175898 39.021902 54.722000
-43.923002 43.108001 50.542898
-39.701901 43.355901 49.076900
--8.034999 22.405000 -16.812999
--4.487000 23.291901 -14.962000
--7.402000 22.284001 -13.707000
--9.777100 22.995001 -22.910001
--5.987000 24.627000 -21.025999
--8.827000 22.652000 -19.879000
-66.488899 -57.870001 56.334902
-72.571896 -63.180096 63.631900
-73.862903 -58.477100 64.482003
-22.944901 36.812000 17.402001
-24.475001 33.165999 17.114900
-22.016000 33.904899 15.472900
--74.170001 -99.680997 2.802000
--69.963999 -103.987001 5.077000
--64.421996 -92.332102 2.384900
--51.401101 -89.661099 -0.450000
--54.703999 -86.764000 -2.411100
--60.729999 -95.892996 4.506000
-31.166900 26.222000 23.024900
-31.863000 30.486001 21.690000
-34.324002 29.399900 23.083000
--97.705103 12.453000 -58.520999
--93.723997 17.155999 -58.577999
--93.805999 9.491000 -66.039100
-42.150002 25.906000 59.436001
-47.271900 31.930000 60.819000
-43.235999 32.720000 59.034899
-17.062001 35.237901 12.069000
-19.548900 34.590900 13.788000
-18.142000 32.005999 11.769000
-24.475001 33.165999 17.114900
-22.489000 30.193999 15.687000
-22.016000 33.904899 15.472900
--83.018996 -6.141000 -26.935000
--84.388100 -10.048999 -26.216999
--76.483101 -12.443000 -28.779000
-22.489000 30.193999 15.687000
-20.325001 31.100001 13.741001
-22.016000 33.904899 15.472900
-104.569003 -66.981100 16.354000
-95.835902 -59.292000 13.444000
-106.042899 -60.759000 18.225001
--28.076999 -150.393993 14.614000
--20.212000 -151.848093 17.350001
--21.545999 -141.227990 24.135001
--53.174000 22.253901 -64.787105
--49.425997 23.767000 -63.133001
--48.531000 16.603000 -61.230000
-94.429001 -91.186993 8.102001
-101.221003 -96.736997 16.141001
-97.291000 -103.117995 13.854000
--26.935000 32.358002 -18.702999
--24.475999 33.165999 -17.115999
--25.638999 36.310002 -18.798999
-25.694901 41.971002 23.846000
-22.697000 41.862901 22.642901
-21.937901 43.409899 26.249999
-23.125000 39.562900 19.729000
-19.774901 41.625001 21.357000
-22.697000 41.862901 22.642901
--54.625999 1.817000 -53.792000
--56.653000 -0.616000 -54.890998
--56.659099 4.171000 -61.329000
--107.636102 -83.442099 -20.490998
--100.348003 -79.286106 -12.374000
--102.669999 -73.166996 -14.403000
-32.159902 27.204001 52.990001
-33.631001 21.367000 51.102001
-35.339002 26.995001 55.250902
--80.664098 28.885901 -57.939999
--82.958996 29.399000 -50.127998
--78.534000 32.583002 -49.929101
-68.831004 -126.556993 48.146900
-74.540004 -121.312000 50.354000
-64.820901 -115.745105 55.151001
-42.298000 19.162999 57.527002
-45.382902 18.003900 59.441000
-45.742001 24.979001 61.347000
--37.799001 37.109002 -25.122998
--39.244000 32.019999 -24.674000
--36.522999 33.143003 -23.656100
-17.364001 30.729000 40.827900
-14.578000 34.596000 37.631001
-15.107000 29.871000 38.159002
--84.472999 -6.327100 -73.317103
--77.431999 -12.616999 -71.709998
--87.057002 -11.127000 -73.540099
--60.722098 -2.135000 -40.245000
--64.176105 1.363000 -34.265999
--65.641001 -1.542100 -34.423098
--24.129000 44.005003 -37.000999
--24.378099 44.597000 -31.989999
--20.907000 43.172002 -35.294998
--2.787000 37.610002 -3.757000
--0.220000 37.201900 -5.160000
--3.439000 37.819002 -6.664100
-8.675001 25.106002 3.141900
-6.412000 24.398001 0.915000
-8.034000 26.753001 0.158000
--15.358000 22.659000 -16.827000
--19.531099 23.822900 -17.938999
--16.548099 22.135001 -19.632999
-6.412000 24.398001 0.915000
-6.190000 26.097000 -2.142000
-8.034000 26.753001 0.158000
--15.358000 22.659000 -16.827000
--16.548099 22.135001 -19.632999
--12.116999 21.961000 -18.404000
-37.124000 39.187901 52.937001
-35.646901 43.333001 47.501899
-33.250902 39.090902 51.041000
-9.923000 33.590000 3.091000
-7.264900 35.084900 1.105900
-8.362001 35.959899 4.043000
--42.332102 -143.302992 -38.606998
--34.966998 -146.289989 -36.071997
--41.374099 -151.871994 -26.830001
--37.124999 39.187901 -52.937999
--33.251997 39.090902 -51.041998
--35.590999 33.443999 -55.105999
-65.151997 -15.346000 58.591899
-69.844998 -14.403000 66.382006
-68.026997 -10.766000 65.870002
--12.278000 33.459898 -35.116099
--14.579100 34.596000 -37.632000
--12.972999 37.723899 -33.779997
--47.265999 27.780000 -27.240999
--46.347100 22.218000 -28.927999
--44.007000 23.902001 -27.916100
--81.621103 -1.823000 -72.949000
--91.508105 -0.320000 -71.337998
--88.156998 4.478000 -71.103998
-64.481005 -10.867000 41.247003
-69.211900 -10.838999 34.347001
-65.455005 -13.971000 41.382901
-92.901997 -27.115000 73.344000
-101.745002 -22.715999 70.817001
-91.300003 -21.545999 73.550999
-82.569003 -26.480000 72.133005
-92.901997 -27.115000 73.344000
-91.300003 -21.545999 73.550999
--21.385100 41.029900 -40.194098
--24.635099 41.883901 -42.163000
--24.129000 44.005003 -37.000999
--3.882000 22.468001 -5.391000
--6.639000 22.620000 -7.356000
--3.835100 22.485999 -8.655000
--1.236000 22.840001 -6.757000
--1.579000 22.495002 -3.487000
--3.882000 22.468001 -5.391000
-70.102900 -14.110000 34.140900
-70.832998 -17.455000 33.845000
-66.275999 -17.157000 41.422002
-3.437900 37.819002 6.663000
-0.218900 37.201900 5.158900
-0.824900 37.021901 7.932000
-69.211900 -10.838999 34.347001
-70.102900 -14.110000 34.140900
-65.455005 -13.971000 41.382901
--110.108100 -76.608099 -22.545999
--112.087995 -69.703102 -24.511999
--113.677099 -79.808995 -32.952998
-67.134000 -40.993098 38.972002
-67.570902 -37.499100 39.605901
-71.514897 -38.554098 30.193999
-67.817003 -34.015000 40.147901
-72.025001 -31.390000 31.760901
-71.864896 -34.965098 31.020900
--63.452996 -77.124096 -8.032000
--57.319101 -72.709002 -17.659999
--65.958999 -73.639996 -9.807999
-11.463000 40.215001 17.055901
-12.020000 39.312001 14.088000
-8.821900 39.533999 15.501000
--28.903000 39.007898 -22.135999
--31.844001 38.527001 -23.216000
--31.066999 34.976002 -21.379000
--110.108100 -76.608099 -22.545999
--104.570001 -66.981100 -16.355000
--112.087995 -69.703102 -24.511999
-85.166000 25.378000 58.285899
-82.957998 29.399000 50.126899
-80.663003 28.885901 57.938900
--39.876997 21.083901 -29.397000
--36.968000 18.291000 -32.944098
--34.965999 19.534901 -31.101000
--26.935000 32.358002 -18.702999
--25.638999 36.310002 -18.798999
--28.347999 35.700999 -20.125000
-13.607000 24.402902 31.791002
-15.237001 24.937000 34.671001
-11.253000 28.054001 32.638002
--36.968000 18.291000 -32.944098
--38.987000 16.958000 -34.713101
--33.342000 17.506000 -36.923099
--31.396002 18.423000 -34.743100
--33.342000 17.506000 -36.923099
--27.545100 19.343901 -38.277999
-54.916002 35.313901 30.700000
-51.589999 36.825001 30.294001
-53.103998 40.630002 34.492999
-42.529900 -103.510104 49.772900
-41.200001 -92.922993 43.682899
-37.471998 -95.488995 41.993901
-51.491000 8.559000 58.603998
-52.532002 4.076000 52.576002
-54.095000 6.477000 60.028899
--32.981001 20.701000 -29.189000
--31.021001 21.797001 -27.215099
--35.534099 23.836000 -26.350100
--49.743101 37.800901 -57.933997
--47.272999 31.930000 -60.819998
--51.417999 30.825000 -62.473997
-40.791899 36.159001 25.947001
-41.945901 30.753901 25.611000
-39.243001 32.019999 24.673000
-51.491000 8.559000 58.603998
-54.095000 6.477000 60.028899
-54.911900 13.012000 64.424001
--35.092000 -134.755999 -44.202000
--34.277100 -121.728994 -47.577001
--28.510999 -124.162100 -45.417998
--64.528003 -135.264993 1.120000
--71.691103 -137.475997 -11.914000
--64.755999 -142.140001 -9.254000
-7.728000 -106.490001 28.718000
-13.583000 -98.457098 20.533001
-9.614000 -99.194996 18.583000
-39.519001 14.215000 42.994902
-41.665003 12.892000 44.846002
-38.624998 15.873000 49.699001
--48.292000 -105.249099 11.062000
--50.320998 -118.459001 14.515000
--43.741100 -107.864000 13.298000
--27.386000 -148.752004 -33.491101
--34.966998 -146.289989 -36.071997
--28.368099 -137.274995 -41.824099
--34.966998 -146.289989 -36.071997
--35.092000 -134.755999 -44.202000
--28.368099 -137.274995 -41.824099
--66.004999 9.984001 -30.440999
--63.979097 12.704001 -30.335000
--71.373098 14.295000 -29.410999
--60.876001 6.846000 -33.687100
--62.583998 4.159900 -34.021001
--57.611998 3.148000 -39.090998
--4.132000 27.565001 6.980000
--5.566000 28.236000 4.901000
--4.538100 25.579000 4.222000
-28.238000 44.095002 28.721999
-31.548902 44.195902 29.822901
-31.902000 41.742001 25.992000
-28.238000 44.095002 28.721999
-25.031000 43.827899 27.531000
-24.377001 44.597000 31.989001
-43.354001 -145.858988 -9.160000
-49.876899 -149.988994 3.812900
-42.012002 -153.117999 1.044000
-64.175002 1.363000 34.264900
-60.721003 -2.135000 40.243901
-59.220001 0.564000 39.714999
-63.451901 -77.124096 8.031000
-60.736902 -80.481105 6.203900
-54.861899 -75.689100 16.034901
-23.447001 25.718901 18.773001
-21.048000 23.054000 20.464001
-19.530000 23.822900 17.937900
--33.578999 -97.824000 -40.245000
--29.539000 -99.918999 -38.438998
--33.408102 -108.930096 -46.041999
--95.351994 -44.929098 -71.893997
--105.491996 -48.965998 -68.044998
--105.250999 -42.156000 -68.942100
-5.986000 24.627000 21.024900
-7.018000 25.413001 23.992000
-4.030000 27.583901 21.672001
--88.197000 -118.152998 -44.175997
--79.821996 -115.709998 -52.478101
--82.749099 -124.250002 -41.910000
-104.475901 -62.852100 65.861002
-103.198901 -69.844104 64.580999
-111.679003 -68.833999 57.361901
-33.348899 25.072001 24.718901
-34.324002 29.399900 23.083000
-36.776002 28.204901 24.405001
--25.365001 -101.764001 -36.581099
--28.573999 -111.189105 -44.084001
--29.539000 -99.918999 -38.438998
-36.402900 20.825000 53.353000
-39.298002 20.097001 55.497002
-38.673900 26.569901 57.402000
-1.266000 35.901003 13.300000
-3.661000 37.785899 12.274000
-1.123000 36.630999 10.618000
-43.235999 32.720000 59.034899
-39.333001 33.215001 57.130001
-38.673900 26.569901 57.402000
-2.157000 25.420001 15.937001
--0.137000 26.974000 13.767000
-1.559000 24.427000 12.970001
-77.058896 -125.962004 4.072900
-82.758002 -120.727994 6.604000
-78.236900 -132.360995 14.522000
--47.862001 -128.367990 -48.785999
--39.841998 -118.918002 -49.674999
--41.603100 -131.779999 -46.523999
-63.528903 -14.403000 49.722001
-66.275999 -17.157000 41.422002
-64.537004 -17.590100 50.006900
--74.824996 -53.755101 -65.219104
--68.495102 -49.749099 -57.755101
--67.625999 -53.819999 -57.098001
--38.626000 15.873000 -49.700100
--36.215998 16.805001 -47.592998
--39.520100 14.215000 -42.995997
-78.472003 -100.137100 60.770001
-74.329004 -105.616994 58.987901
-84.651001 -109.789103 54.512002
--5.969000 -107.152097 22.502001
--2.451000 -100.036100 12.614001
--10.524999 -106.820002 20.392900
--62.819101 -56.584999 -46.174999
--65.086000 -61.882000 -55.473000
--66.489995 -57.870001 -56.335997
--13.448000 -117.304102 26.898000
--5.969000 -107.152097 22.502001
--10.524999 -106.820002 20.392900
-75.771004 -44.354100 66.343002
-69.434896 -41.625999 58.743000
-69.095999 -45.676999 58.304001
--64.528003 -135.264993 1.120000
--70.974000 -130.817994 -1.499000
--71.691103 -137.475997 -11.914000
-35.090901 -134.755999 44.201002
-34.276001 -121.728994 47.575999
-28.510001 -124.162100 45.416899
-83.674006 -31.491000 71.998999
-74.861899 -30.733999 67.123003
-75.460896 -35.177000 66.986904
-15.192000 26.541000 10.222000
-17.985001 28.600000 12.029001
-16.614901 25.537001 12.812001
-13.583000 -98.457098 20.533001
-17.089000 -95.358104 8.843000
-9.614000 -99.194996 18.583000
--62.874101 39.952900 -41.370999
--60.632002 37.596002 -35.299998
--58.668997 41.587003 -40.883001
--40.160999 -88.477999 -7.180000
--36.793001 -90.544999 -5.288100
--31.371098 -89.971103 -16.383000
--22.226000 -96.890002 2.549000
--17.090099 -95.358104 -8.844000
--26.010100 -95.608100 0.558000
-18.367000 -97.961999 -4.553000
-9.567000 -96.836001 4.939000
-13.350001 -96.199997 6.899000
-10.479000 -99.447995 -8.583999
-15.041000 -106.214993 -18.275999
-6.473900 -99.856101 -10.601000
-39.840899 -118.918002 49.673900
-41.602001 -131.779999 46.522900
-47.860999 -128.367990 48.784900
-47.860999 -128.367990 48.784900
-53.839002 -124.541998 50.979901
-45.180902 -115.747102 51.708899
-79.732999 15.508001 30.746000
-82.400002 12.062000 30.346001
-75.833902 8.097000 28.933000
--51.486999 44.090901 -46.243999
--55.909999 43.026999 -47.145098
--54.498099 42.923000 -40.291101
--25.137000 -94.889000 -26.208099
--21.358998 -96.300103 -24.350999
--21.080000 -103.348002 -34.674998
-41.625001 25.461001 26.822001
-44.006001 23.902001 27.915001
-39.875899 21.083901 29.395901
--9.646000 27.141999 -29.802099
--13.608000 24.402902 -31.792000
--11.254000 28.054001 -32.639001
--29.399099 31.468000 -20.229999
--28.990000 27.298000 -21.271000
--26.817000 28.309001 -19.459998
-48.868001 10.420000 57.055000
-46.250902 12.071000 55.387001
-48.215002 8.079001 49.805000
--10.613000 36.457002 -31.493999
--12.278000 33.459898 -35.116099
--12.972999 37.723899 -33.779997
--17.882001 42.199999 -33.501998
--15.053100 41.111901 -31.628098
--15.553100 38.923901 -35.995997
--18.357100 40.034901 -38.137101
--15.553100 38.923901 -35.995997
--17.112000 35.666000 -40.078998
--71.373098 14.295000 -29.410999
--74.022099 21.760000 -31.274099
--76.935001 18.743001 -31.056000
--63.979097 12.704001 -30.335000
--60.876001 6.846000 -33.687100
--59.058998 9.413901 -33.264000
--47.265999 27.780000 -27.240999
--49.729999 32.290999 -27.911000
--52.658100 30.655000 -28.395999
--31.021001 21.797001 -27.215099
--25.938999 20.836901 -27.822999
--29.087000 22.833001 -25.180100
-54.388899 -70.805997 29.440900
-50.931901 -76.486997 39.272901
-53.423900 -73.440105 40.624000
-1.911000 29.711001 19.131001
-2.069000 33.117998 18.871000
-0.537900 31.614900 16.524000
--81.469104 -2.366000 -27.566001
--89.448996 0.488000 -28.592000
--83.018996 -6.141000 -26.935000
-46.346001 22.218000 28.927000
-47.264900 27.780000 27.239900
-49.860999 26.068000 27.930900
-43.354001 -145.858988 -9.160000
-50.681900 -142.811999 -6.455000
-49.876899 -149.988994 3.812900
-50.681900 -142.811999 -6.455000
-57.472002 -146.320999 6.552000
-49.876899 -149.988994 3.812900
-22.016000 33.904899 15.472900
-19.548900 34.590900 13.788000
-20.267000 37.222002 15.944000
-17.062001 35.237901 12.069000
-14.913000 37.804998 12.883000
-17.593000 37.548900 14.434000
-23.715900 26.811000 45.611002
-19.850001 31.520002 43.428000
-21.295000 26.430901 42.978998
--81.633106 -90.416998 -1.609000
--78.065105 -95.151097 0.573000
--71.061000 -84.652096 -1.729000
-9.645000 27.141999 29.801000
-13.607000 24.402902 31.791002
-11.253000 28.054001 32.638002
--81.633106 -90.416998 -1.609000
--71.061000 -84.652096 -1.729000
--73.988996 -80.572002 -3.714000
--104.670994 -90.165101 -18.354999
--97.599000 -85.304096 -10.273000
--100.348003 -79.286106 -12.374000
-65.084897 -61.882000 55.472001
-63.415997 -65.831102 54.512002
-70.949897 -67.836002 62.674902
-5.138900 23.913000 18.017000
-4.486000 23.291901 14.961001
-8.034000 22.405000 16.812000
--61.234102 -85.482098 -57.829000
--67.596100 -95.197998 -60.745999
--71.072996 -90.329103 -62.291998
-84.440000 -36.658101 71.732000
-84.848903 -41.951999 71.332999
-94.948895 -38.839098 72.512999
--43.786999 35.041001 -26.688000
--40.792998 36.159001 -25.947999
--41.623101 40.137000 -28.545098
--54.548100 -93.365997 -54.848999
--63.757002 -99.849999 -59.106998
--58.033101 -89.523099 -56.382000
--56.862999 39.236899 -34.945000
--53.105000 40.630002 -34.493998
--54.498099 42.923000 -40.291101
--14.245000 30.836901 -7.470000
--12.207000 32.145903 -5.236100
--13.594000 33.911899 -7.812000
-42.326000 -135.543004 -16.330000
-35.553999 -137.906998 -18.927999
-33.201899 -125.830099 -21.809999
--58.375001 26.853001 -29.108999
--55.542000 28.840901 -28.796000
--58.224998 33.594999 -31.018000
--10.531999 30.694000 -2.586000
--12.207000 32.145903 -5.236100
--12.233000 29.075000 -5.071100
-108.001903 -3.879000 57.541002
-100.832999 -0.876000 65.969005
-103.875898 -6.591100 65.720998
-50.319899 -118.459001 -14.516000
-55.241000 -129.489005 -11.170999
-48.900999 -132.729992 -13.742000
--23.448000 25.718901 -18.774100
--25.302999 24.781000 -20.955000
--21.049000 23.054000 -20.465100
--22.490000 30.193999 -15.688000
--24.475999 33.165999 -17.115999
--24.650998 29.270001 -17.597999
--66.445999 19.833000 -29.546000
--71.004994 24.561999 -31.401001
--68.962000 17.148999 -29.521000
--0.137000 26.974000 13.767000
-0.772000 28.343000 16.486000
--0.788000 30.048000 14.109001
-19.530000 23.822900 17.937900
-21.048000 23.054000 20.464001
-16.547000 22.135001 19.631900
--22.577999 -126.198992 -43.208100
--16.507000 -127.833992 -40.946998
--21.465098 -139.322996 -39.395999
-15.505901 21.826901 27.239000
-14.250000 21.805000 24.325000
-19.180000 21.274000 25.163000
-62.582999 4.159900 34.019999
-64.175002 1.363000 34.264900
-59.220001 0.564000 39.714999
-68.494007 -49.749099 57.754003
-75.457998 -49.036998 65.838896
-69.095999 -45.676999 58.304001
--11.109999 34.932900 -5.883000
--12.207000 32.145903 -5.236100
--9.924000 33.590000 -3.092100
--4.739000 33.914000 4.557000
--5.988000 34.431901 1.804000
--7.016000 31.773999 2.486000
--47.862001 -128.367990 -48.785999
--53.840101 -124.541998 -50.981000
--45.180999 -115.747102 -51.709998
--29.399099 31.468000 -20.229999
--26.935000 32.358002 -18.702999
--28.347999 35.700999 -20.125000
--15.913999 32.937001 -9.785000
--14.245000 30.836901 -7.470000
--13.594000 33.911899 -7.812000
--12.207000 32.145903 -5.236100
--11.109999 34.932900 -5.883000
--13.594000 33.911899 -7.812000
--1.805000 37.423000 -0.759100
-0.712000 37.300900 -2.251000
--2.787000 37.610002 -3.757000
--6.507000 38.062900 -8.181000
--6.086000 37.444901 -5.298000
--3.439000 37.819002 -6.664100
-48.257899 38.129002 29.798001
-44.930901 39.229900 29.215001
-45.673899 42.688899 33.307899
--113.444999 -53.981997 -60.131099
--117.692098 -59.542999 -49.169000
--118.207097 -51.999100 -50.652098
--22.577999 -126.198992 -43.208100
--18.482100 -114.749998 -40.013101
--16.507000 -127.833992 -40.946998
-105.250001 -42.156000 68.941005
-94.948895 -38.839098 72.512999
-95.350899 -44.929098 71.892902
-105.236903 -55.877998 67.015901
-104.475901 -62.852100 65.861002
-112.833902 -61.388999 58.806900
-104.475901 -62.852100 65.861002
-111.679003 -68.833999 57.361901
-112.833902 -61.388999 58.806900
--35.647999 43.333001 -47.502998
--39.703000 43.355901 -49.077999
--38.849998 45.506001 -42.890001
--65.086000 -61.882000 -55.473000
--62.819101 -56.584999 -46.174999
--61.368998 -60.123101 -45.236100
-31.863000 30.486001 21.690000
-28.989000 27.298000 21.270001
-29.398000 31.468000 20.229001
-22.562901 32.214999 45.949001
-26.339000 27.083000 48.161898
-25.502000 32.784000 48.382901
--61.985102 -58.172099 -34.479100
--59.700102 -63.590996 -44.208098
--61.368998 -60.123101 -45.236100
-4.030000 27.583901 21.672001
-1.911000 29.711001 19.131001
-2.990000 26.479000 18.833000
--96.234098 -90.505995 -60.034100
--104.887098 -90.940103 -52.336000
--99.079102 -83.713993 -61.662998
-104.306899 0.790000 39.583899
-101.402000 5.945000 40.305000
-106.098898 2.505000 48.735999
-21.617001 26.652901 16.554002
-18.054999 24.642000 15.387001
-19.798901 27.606001 14.303001
--17.986100 28.600000 -12.030000
--16.146000 29.666001 -9.746999
--18.143000 32.005999 -11.770099
--22.490000 30.193999 -15.688000
--24.650998 29.270001 -17.597999
--21.618100 26.652901 -16.555099
-65.315999 -59.759997 23.538001
-66.838898 -56.325100 24.839001
-73.794901 -58.752000 16.319901
-37.124000 39.187901 52.937001
-39.701901 43.355901 49.076900
-35.646901 43.333001 47.501899
-1.911000 29.711001 19.131001
-0.772000 28.343000 16.486000
-2.990000 26.479000 18.833000
--41.666098 12.892000 -44.847101
--45.061100 12.338000 -39.534099
--47.063001 10.564900 -40.966000
--71.865998 -34.965098 -31.021999
--78.974001 -31.212000 -25.007999
--78.884102 -35.126001 -24.000999
--8.349000 31.093901 -29.896000
--10.204100 32.285899 -32.535002
--8.468100 35.143003 -29.138999
-91.972001 10.765000 34.130000
-84.917903 8.406000 29.854000
-88.959903 14.831000 34.658000
-104.208000 -101.315103 26.631001
-104.669899 -90.165101 18.354001
-107.898004 -94.297998 28.826000
--32.402098 -91.427103 -29.798100
--29.539000 -99.918999 -38.438998
--33.578999 -97.824000 -40.245000
-67.915000 7.132900 30.461000
-66.003896 9.984001 30.440001
-73.665999 11.277000 29.215001
--0.768100 25.617000 10.951000
--0.137000 26.974000 13.767000
--1.864000 28.402900 11.600001
-90.303004 -75.281002 7.820000
-97.597897 -85.304096 10.272000
-87.758005 -80.457099 5.809000
-94.125897 -32.889001 72.997004
-84.440000 -36.658101 71.732000
-94.948895 -38.839098 72.512999
--61.985102 -58.172099 -34.479100
--65.317102 -59.762102 -23.538999
--60.367100 -61.460000 -33.332098
-64.754896 -142.140001 9.253000
-64.526998 -135.264993 -1.121100
-71.690001 -137.475997 11.913000
--12.242000 -105.717100 -30.740000
--17.503999 -97.488999 -22.458099
--13.584000 -98.457098 -20.534100
-15.237001 24.937000 34.671001
-18.443001 21.974999 32.958899
-20.135000 22.062000 35.754003
--34.913000 45.451000 -41.563999
--35.647999 43.333001 -47.502998
--38.849998 45.506001 -42.890001
--38.514998 45.561999 -36.913000
--34.913000 45.451000 -41.563999
--38.849998 45.506001 -42.890001
--38.514998 45.561999 -36.913000
--34.777999 45.616999 -35.824101
--34.913000 45.451000 -41.563999
--50.377999 43.977000 -39.597098
--51.486999 44.090901 -46.243999
--54.498099 42.923000 -40.291101
--58.557998 -64.669997 -32.106999
--56.564998 -67.790098 -30.810000
--55.723000 -70.263997 -41.898999
--64.135104 -81.267998 -59.187099
--66.726997 -76.905996 -60.450099
--59.291098 -73.467106 -52.306000
-0.772000 28.343000 16.486000
-2.157000 25.420001 15.937001
-2.990000 26.479000 18.833000
--101.402096 -76.811999 -63.180998
--92.483103 -70.008099 -68.125002
--90.606101 -76.269999 -66.876002
--10.613000 36.457002 -31.493999
--12.972999 37.723899 -33.779997
--12.421000 39.930001 -29.673999
-5.986000 24.627000 21.024900
-4.030000 27.583901 21.672001
-2.990000 26.479000 18.833000
-29.551001 18.850001 40.726002
-33.340901 17.506000 36.922000
-31.669002 18.274900 43.097902
-22.885000 37.507899 44.736899
-22.562901 32.214999 45.949001
-25.502000 32.784000 48.382901
--54.444101 -149.563998 -18.232999
--56.590099 -144.601002 -32.097999
--49.126998 -148.504004 -29.489100
-28.503900 21.989001 46.305902
-29.551001 18.850001 40.726002
-31.669002 18.274900 43.097902
--50.293997 12.305000 -35.652999
--45.061100 12.338000 -39.534099
--48.292998 14.293000 -34.570001
-46.346001 22.218000 28.927000
-42.026002 19.555001 30.809000
-44.006001 23.902001 27.915001
--68.028003 -10.766000 -65.871105
--63.731000 -12.075000 -58.096100
--65.153003 -15.346000 -58.592997
-41.945901 30.753901 25.611000
-44.624001 29.340900 26.465900
-41.625001 25.461001 26.822001
--74.170001 -99.680997 2.802000
--67.870103 -88.578105 0.307000
--78.065105 -95.151097 0.573000
--56.424998 -0.260000 -46.659101
--54.625999 1.817000 -53.792000
--54.680999 2.176000 -45.722999
--45.061100 12.338000 -39.534099
--41.666098 12.892000 -44.847101
--39.520100 14.215000 -42.995997
--64.482100 -10.867000 -41.248102
--62.369000 -11.326999 -49.327001
--61.065000 -8.370000 -48.824102
-31.020001 21.797001 27.214000
-27.690900 20.075001 30.186001
-25.937900 20.836901 27.822001
--58.081102 -2.830000 -47.486998
--59.632000 -5.535000 -48.209000
--58.597099 -3.224000 -55.873100
--61.569098 -1.129000 -63.541099
--59.158102 1.636000 -62.500000
--58.597099 -3.224000 -55.873100
--56.424998 -0.260000 -46.659101
--58.081102 -2.830000 -47.486998
--56.653000 -0.616000 -54.890998
--20.907000 43.172002 -35.294998
--17.882001 42.199999 -33.501998
--18.357100 40.034901 -38.137101
-39.213002 26.892900 25.652001
-37.708901 22.510000 27.908999
-35.533000 23.836000 26.349001
-31.020001 21.797001 27.214000
-32.979902 20.701000 29.187901
-27.690900 20.075001 30.186001
-69.211900 -10.838999 34.347001
-64.481005 -10.867000 41.247003
-68.166003 -7.650100 34.463000
--69.846101 -14.403000 -66.383101
--66.400103 -18.764000 -58.972098
--71.458101 -18.232999 -66.763997
--75.191103 -8.454099 -71.291998
--68.028003 -10.766000 -65.871105
--69.846101 -14.403000 -66.383101
--31.167999 45.462999 -34.639001
--27.698999 45.117002 -33.361100
--27.542001 44.678003 -38.618099
--31.902999 41.742001 -25.993099
--28.239099 44.095002 -28.723000
--31.549998 44.195902 -29.824000
--28.239099 44.095002 -28.723000
--24.378099 44.597000 -31.989999
--27.698999 45.117002 -33.361100
--24.378099 44.597000 -31.989999
--24.129000 44.005003 -37.000999
--27.698999 45.117002 -33.361100
-2.786000 37.610002 3.756000
-0.218900 37.201900 5.158900
-3.437900 37.819002 6.663000
-38.506001 -156.218991 12.734001
-33.917900 -155.686989 -1.747000
-42.012002 -153.117999 1.044000
--82.457103 22.159001 -35.411000
--79.008102 25.413001 -35.638999
--83.588995 27.037000 -42.216998
-70.972897 -130.817994 1.498000
-77.058896 -125.962004 4.072900
-71.690001 -137.475997 11.913000
--49.037997 8.666000 -42.304099
--46.027999 9.835000 -48.256099
--43.840099 11.435000 -46.602100
--43.660998 13.520001 -53.603102
--41.113000 14.781901 -51.703997
--43.840099 11.435000 -46.602100
-66.402003 -42.071000 48.998002
-69.434896 -41.625999 58.743000
-66.748001 -38.430098 49.457002
--62.819101 -56.584999 -46.174999
--64.637102 -51.409099 -36.533099
--63.409097 -54.817099 -35.547100
--39.244000 32.019999 -24.674000
--36.777101 28.204901 -24.406100
--36.522999 33.143003 -23.656100
--64.291999 5.520900 -68.206102
--68.190105 12.932000 -70.018001
--61.230000 8.305000 -67.083098
--54.096099 6.477000 -60.029998
--56.659099 4.171000 -61.329000
--58.095101 10.802000 -65.820999
--58.095101 10.802000 -65.820999
--61.230000 8.305000 -67.083098
--64.499103 15.770001 -68.921998
-68.999998 -72.420001 61.611902
-76.899000 -80.061994 65.084897
-79.226896 -74.727997 66.324897
--72.668999 19.975001 -68.705104
--68.463996 22.892900 -67.740001
--64.499103 15.770001 -68.921998
-87.287001 -22.473000 23.541901
-86.529903 -18.225100 24.520000
-96.015900 -17.539000 24.961000
-2.157000 25.420001 15.937001
-0.772000 28.343000 16.486000
--0.137000 26.974000 13.767000
-52.041002 -73.708996 28.006000
-48.251901 -79.394996 37.852000
-50.931901 -76.486997 39.272901
-101.888001 -8.016000 31.003900
-109.233998 -10.358000 37.806898
-103.722900 -13.285000 29.971000
--40.456101 -97.217105 5.626900
--43.741100 -107.864000 13.298000
--36.500998 -99.317104 7.703900
-23.590000 -113.133103 42.073000
-22.576900 -126.198992 43.207001
-28.510001 -124.162100 45.416899
-35.090901 -134.755999 44.201002
-41.602001 -131.779999 46.522900
-34.276001 -121.728994 47.575999
-77.050000 25.576901 64.461902
-72.524004 28.589999 63.715003
-68.462901 22.892900 67.738898
-41.602001 -131.779999 46.522900
-39.840899 -118.918002 49.673900
-34.276001 -121.728994 47.575999
-71.392901 34.699000 56.847900
-67.940004 31.200001 62.826902
-72.524004 28.589999 63.715003
-67.940004 31.200001 62.826902
-64.198896 25.429999 66.632003
-72.524004 28.589999 63.715003
--4.158000 36.416002 0.666000
--5.261100 36.866002 -2.335100
--7.266000 35.084900 -1.107000
--1.805000 37.423000 -0.759100
--2.787000 37.610002 -3.757000
--5.261100 36.866002 -2.335100
-67.817003 -34.015000 40.147901
-71.864896 -34.965098 31.020900
-67.570902 -37.499100 39.605901
--39.090101 -123.741001 19.368000
--29.112000 -113.997102 20.090001
--34.132000 -112.251997 17.818000
--9.414000 38.090002 -9.734999
--11.898000 36.458001 -8.607999
--9.108000 37.012000 -6.919100
--11.898000 36.458001 -8.607999
--11.109999 34.932900 -5.883000
--9.108000 37.012000 -6.919100
-41.012999 15.527001 36.402002
-43.040000 13.989001 38.012002
-37.409000 15.416000 41.055001
--72.725996 -4.547000 -70.732102
--81.621103 -1.823000 -72.949000
--78.531995 2.365000 -72.434999
--61.065000 -8.370000 -48.824102
--59.632000 -5.535000 -48.209000
--63.362002 -7.856000 -41.012101
-85.779898 18.631000 35.083901
-91.257006 19.569000 41.789003
-88.959903 14.831000 34.658000
--49.126998 -148.504004 -29.489100
--56.590099 -144.601002 -32.097999
--49.438000 -139.811993 -41.089099
-78.860998 -27.337000 25.930000
-87.287001 -22.473000 23.541901
-87.816998 -26.813000 22.479000
-67.134000 -40.993098 38.972002
-66.402003 -42.071000 48.998002
-67.570902 -37.499100 39.605901
--68.129994 33.528902 -35.727099
--67.088999 38.013000 -41.756101
--71.292996 35.756901 -42.034101
-118.184902 -44.544000 52.013002
-118.206002 -51.999100 50.651003
-118.774004 -42.957101 41.520901
--44.020101 -81.623100 -23.334000
--49.445000 -81.255995 -12.631000
--41.048098 -83.962999 -21.666100
--103.358097 -28.996099 -70.331104
--110.722996 -25.569100 -64.137101
--101.746105 -22.715999 -70.818096
--71.691103 -137.475997 -11.914000
--70.974000 -130.817994 -1.499000
--77.059999 -125.962004 -4.074000
-75.239897 6.224900 71.775004
-80.754898 12.984000 70.195898
-71.780898 9.750000 70.969000
--117.692098 -59.542999 -49.169000
--118.307002 -57.592001 -38.411997
--118.795000 -50.230000 -40.022001
-28.510001 -124.162100 45.416899
-22.576900 -126.198992 43.207001
-28.367000 -137.274995 41.823003
-72.667897 19.975001 68.704002
-68.462901 22.892900 67.738898
-64.498000 15.770001 68.920895
-53.173002 22.253901 64.786002
-51.715001 14.942001 62.893003
-56.956999 20.423900 66.303998
-83.587900 27.037000 42.215899
-79.007007 25.413001 35.638001
-79.568997 30.273002 42.263899
-75.456001 28.392000 35.763901
-71.822897 31.097000 35.792898
-75.459898 33.179000 42.201899
-79.568997 30.273002 42.263899
-75.456001 28.392000 35.763901
-75.459898 33.179000 42.201899
--5.669100 35.980899 -23.382999
--3.780000 34.569900 -21.157000
--4.796100 32.441001 -24.247998
--11.109999 34.932900 -5.883000
--11.898000 36.458001 -8.607999
--13.594000 33.911899 -7.812000
-8.347901 31.093901 29.895000
-8.467000 35.143003 29.138001
-6.531000 33.798900 26.722001
--14.913999 37.804998 -12.883999
--17.594000 37.548900 -14.435099
--17.062999 35.237901 -12.069999
-52.235998 -78.541100 14.359000
-57.819001 -83.697997 4.328000
-49.444001 -81.255995 12.630000
-28.076001 -150.393993 -14.615000
-28.613999 -139.806002 -21.531999
-35.805002 -148.391992 -11.884000
-33.917900 -155.686989 -1.747000
-28.076001 -150.393993 -14.615000
-35.805002 -148.391992 -11.884000
-42.936001 45.311999 44.112898
-42.369898 45.279898 37.904900
-38.848899 45.506001 42.888902
--82.958996 29.399000 -50.127998
--80.664098 28.885901 -57.939999
--85.166998 25.378000 -58.286998
-31.138901 45.166902 40.137999
-34.911901 45.451000 41.562900
-34.777001 45.616999 35.823002
-42.326000 -135.543004 -16.330000
-43.354001 -145.858988 -9.160000
-35.553999 -137.906998 -18.927999
-43.354001 -145.858988 -9.160000
-35.805002 -148.391992 -11.884000
-35.553999 -137.906998 -18.927999
-35.805002 -148.391992 -11.884000
-28.613999 -139.806002 -21.531999
-35.553999 -137.906998 -18.927999
--84.388100 -10.048999 -26.216999
--83.018996 -6.141000 -26.935000
--91.428101 -3.758000 -27.822999
--9.285000 38.998000 -12.563000
--8.823000 39.533999 -15.502000
--12.021000 39.312001 -14.088999
-104.669899 -90.165101 18.354001
-101.221003 -96.736997 16.141001
-97.597897 -85.304096 10.272000
--97.599000 -85.304096 -10.273000
--104.670994 -90.165101 -18.354999
--101.222098 -96.736997 -16.142100
--107.998103 -42.200100 -23.327999
--98.274104 -43.145999 -18.395999
--98.426104 -37.839100 -19.881999
-92.498004 -70.012100 9.765000
-102.668896 -73.166996 14.402000
-100.346997 -79.286106 12.373000
-15.052000 41.111901 31.626999
-15.352000 42.175900 27.350901
-12.420001 39.930001 29.673001
--34.777999 45.616999 -35.824101
--38.514998 45.561999 -36.913000
--38.458999 43.848898 -31.753100
-10.737000 40.500000 20.302000
-10.133000 40.014900 23.854000
-13.362001 41.388899 21.905001
-18.961001 42.854901 24.884000
-16.103001 42.179000 23.434000
-15.352000 42.175900 27.350901
-8.100000 -117.737003 -29.146999
-5.967900 -107.152097 -22.503100
-13.446900 -117.304102 -26.899099
-18.746901 -116.531000 -24.636000
-21.031000 -128.824994 -26.691999
-13.446900 -117.304102 -26.899099
-95.835902 -59.292000 13.444000
-85.782900 -54.010000 14.392001
-96.986003 -53.895999 15.173000
-57.751901 -139.272988 -3.774000
-64.526998 -135.264993 -1.121100
-64.754896 -142.140001 9.253000
-77.058896 -125.962004 4.072900
-78.236900 -132.360995 14.522000
-71.690001 -137.475997 11.913000
--82.964994 -63.131101 -11.090999
--84.514000 -58.588099 -12.777099
--94.343103 -64.672999 -11.640999
-9.776000 22.995001 22.909001
-8.826001 22.652000 19.878000
-13.121000 21.843001 21.377999
--54.444101 -149.563998 -18.232999
--57.473000 -146.320999 -6.553000
--61.967999 -145.420000 -20.917999
--116.629995 -67.136101 -47.571000
--112.834997 -61.388999 -58.807999
--111.680098 -68.833999 -57.363000
-46.494901 -83.823994 10.854901
-54.702900 -86.764000 2.410000
-51.400002 -89.661099 0.449000
-22.620000 22.312000 22.957001
-24.249000 21.576900 25.412001
-19.180000 21.274000 25.163000
-17.819000 21.680001 22.413000
-14.250000 21.805000 24.325000
-13.121000 21.843001 21.377999
-82.758002 -120.727994 6.604000
-77.698901 -112.709001 -1.176000
-82.463898 -107.694998 1.223000
-88.041902 -115.153000 9.079001
-82.758002 -120.727994 6.604000
-82.463898 -107.694998 1.223000
-112.833001 -82.282998 44.041000
-110.091001 -89.749098 42.118002
-113.676004 -79.808995 32.951899
--48.253000 -79.394996 -37.853099
--50.933000 -76.486997 -39.274000
--52.042000 -73.708996 -28.007001
-71.822897 31.097000 35.792898
-71.003899 24.561999 31.399902
-67.902900 27.145900 31.437900
-64.175002 1.363000 34.264900
-67.915000 7.132900 30.461000
-69.699898 4.155000 30.395901
--8.336100 -159.606993 -15.827000
-0.194000 -160.039991 -13.018000
--4.362000 -162.422001 -1.426000
-8.675001 25.106002 3.141900
-8.034000 26.753001 0.158000
-10.093001 27.714999 2.604000
--39.188001 -87.157995 -33.194099
--41.201100 -92.922993 -43.683998
--42.369999 -84.741995 -34.807999
-111.055002 -87.114997 30.936001
-107.898004 -94.297998 28.826000
-107.634999 -83.442099 20.489901
-1.911000 29.711001 19.131001
-3.256000 31.076001 21.718001
-2.069000 33.117998 18.871000
--23.125000 39.562900 -19.730000
--25.638999 36.310002 -18.798999
--22.945998 36.812000 -17.402999
-104.569003 -66.981100 16.354000
-110.107005 -76.608099 22.545001
-102.668896 -73.166996 14.402000
-75.239897 6.224900 71.775004
-71.780898 9.750000 70.969000
-67.247003 2.447900 69.185898
-107.634999 -83.442099 20.489901
-104.669899 -90.165101 18.354001
-100.346997 -79.286106 12.373000
-52.859001 4.473900 44.682898
-50.388001 6.159900 51.244900
-50.972901 6.638000 43.541901
-59.914000 27.590001 65.384001
-53.173002 22.253901 64.786002
-56.956999 20.423900 66.303998
-64.198896 25.429999 66.632003
-59.914000 27.590001 65.384001
-56.956999 20.423900 66.303998
--33.202998 -125.830099 21.809001
--39.090101 -123.741001 19.368000
--42.326998 -135.543004 16.329000
--92.499100 -70.012100 -9.765999
--82.964994 -63.131101 -11.090999
--94.343103 -64.672999 -11.640999
-31.773999 43.062001 45.823000
-28.100001 42.569902 44.041000
-29.579001 38.761001 49.040001
-46.847001 -79.126999 24.947900
-42.368900 -84.741995 34.806900
-45.395002 -82.151100 36.361001
-49.525000 -76.486096 26.506901
-46.847001 -79.126999 24.947900
-45.395002 -82.151100 36.361001
-51.241003 -83.972998 48.341900
-48.251901 -79.394996 37.852000
-48.097901 -87.151103 46.861000
-4.795000 32.441001 24.246901
-3.256000 31.076001 21.718001
-5.269000 28.728999 24.461001
-82.758002 -120.727994 6.604000
-88.041902 -115.153000 9.079001
-84.370002 -126.829103 17.076001
-78.236900 -132.360995 14.522000
-82.758002 -120.727994 6.604000
-84.370002 -126.829103 17.076001
-46.769001 33.754002 27.340900
-44.930901 39.229900 29.215001
-48.257899 38.129002 29.798001
--40.160999 -88.477999 -7.180000
--31.371098 -89.971103 -16.383000
--34.713101 -88.143997 -18.187100
-68.309896 -25.997000 59.366003
-72.843999 -22.243099 67.013003
-67.456998 -22.320000 59.227999
-2.217000 -130.229995 -33.937100
-8.520001 -130.182996 -31.541098
-7.164900 -142.591998 -29.313998
-72.843999 -22.243099 67.013003
-71.456999 -18.232999 66.762999
-67.456998 -22.320000 59.227999
-110.091001 -89.749098 42.118002
-111.055002 -87.114997 30.936001
-113.676004 -79.808995 32.951899
--65.641001 -1.542100 -34.423098
--71.353994 1.054000 -30.246999
--66.973999 -4.547000 -34.488000
--36.777101 28.204901 -24.406100
--35.534099 23.836000 -26.350100
--33.349998 25.072001 -24.720000
-66.877902 -34.812998 49.812902
-66.800006 -31.234000 50.066002
-67.871004 -30.553000 40.596001
-67.915000 7.132900 30.461000
-64.175002 1.363000 34.264900
-62.582999 4.159900 34.019999
-22.489000 30.193999 15.687000
-24.475001 33.165999 17.114900
-24.649901 29.270001 17.597001
--8.336100 -159.606993 -15.827000
--3.773100 -152.840003 -25.518999
-0.194000 -160.039991 -13.018000
-29.398000 31.468000 20.229001
-28.989000 27.298000 21.270001
-26.815901 28.309001 19.458901
-34.777001 45.616999 35.823002
-38.458001 43.848898 31.752001
-34.958899 44.117998 30.833000
--24.129000 44.005003 -37.000999
--20.907000 43.172002 -35.294998
--21.385100 41.029900 -40.194098
-64.391896 35.693999 35.560999
-62.872998 39.952900 41.369900
-67.087896 38.013000 41.755002
-60.631000 37.596002 35.298899
-62.872998 39.952900 41.369900
-64.391896 35.693999 35.560999
--20.907000 43.172002 -35.294998
--18.357100 40.034901 -38.137101
--21.385100 41.029900 -40.194098
-46.330001 44.756901 38.799901
-49.368899 41.777000 33.948001
-45.673899 42.688899 33.307899
--115.106098 -23.130000 -55.359099
--108.853996 -18.965099 -64.804100
--110.722996 -25.569100 -64.137101
-47.062002 10.564900 40.964998
-41.665003 12.892000 44.846002
-45.060001 12.338000 39.533000
-66.402003 -42.071000 48.998002
-65.838896 -45.722999 48.436999
-69.095999 -45.676999 58.304001
--27.174000 -127.527997 24.253000
--35.555098 -137.906998 18.927000
--28.615000 -139.806002 21.531001
-48.251901 -79.394996 37.852000
-45.395002 -82.151100 36.361001
-48.097901 -87.151103 46.861000
-16.547000 22.135001 19.631900
-17.819000 21.680001 22.413000
-13.121000 21.843001 21.377999
-70.972003 -42.146001 29.284000
-67.134000 -40.993098 38.972002
-71.514897 -38.554098 30.193999
-13.267000 -116.031997 37.907001
-16.506001 -127.833992 40.945899
-18.481001 -114.749998 40.012002
-22.620000 22.312000 22.957001
-19.180000 21.274000 25.163000
-17.819000 21.680001 22.413000
-22.016000 33.904899 15.472900
-20.325001 31.100001 13.741001
-19.548900 34.590900 13.788000
-67.570902 -37.499100 39.605901
-71.864896 -34.965098 31.020900
-71.514897 -38.554098 30.193999
-61.233003 -85.482098 57.827901
-71.071900 -90.329103 62.291000
-64.134002 -81.267998 59.186000
-66.725902 -76.905996 60.449000
-64.134002 -81.267998 59.186000
-74.178003 -85.274100 63.740000
-41.945901 30.753901 25.611000
-39.213002 26.892900 25.652001
-39.243001 32.019999 24.673000
-6.705900 29.902902 27.204001
-9.645000 27.141999 29.801000
-8.347901 31.093901 29.895000
--37.799001 37.109002 -25.122998
--38.341001 40.852003 -27.781999
--40.792998 36.159001 -25.947999
-10.203000 32.285899 32.534000
-8.347901 31.093901 29.895000
-11.253000 28.054001 32.638002
-27.180001 23.825001 23.089999
-31.166900 26.222000 23.024900
-29.086001 22.833001 25.179001
--44.020101 -81.623100 -23.334000
--39.188001 -87.157995 -33.194099
--42.369999 -84.741995 -34.807999
-67.915000 7.132900 30.461000
-62.582999 4.159900 34.019999
-66.003896 9.984001 30.440001
--10.480000 -99.447995 8.583000
--19.507999 -105.344102 16.152000
--15.042000 -106.214993 18.274900
-62.582999 4.159900 34.019999
-60.874999 6.846000 33.686001
-66.003896 9.984001 30.440001
--68.129994 33.528902 -35.727099
--71.292996 35.756901 -42.034101
--71.823999 31.097000 -35.793997
-72.025001 -31.390000 31.760901
-67.817003 -34.015000 40.147901
-67.871004 -30.553000 40.596001
--10.524999 -106.820002 20.392900
--15.042000 -106.214993 18.274900
--18.747998 -116.531000 24.635000
--19.507999 -105.344102 16.152000
--23.976998 -115.427099 22.364000
--15.042000 -106.214993 18.274900
--90.844102 -96.902996 -5.869000
--84.865995 -85.512102 -3.738000
--94.430096 -91.186993 -8.103000
--3.773100 -152.840003 -25.518999
--8.336100 -159.606993 -15.827000
--11.745000 -152.037993 -28.208099
-59.699003 -63.590996 44.206999
-61.984003 -58.172099 34.478001
-60.366001 -61.460000 33.331003
-35.339002 26.995001 55.250902
-36.402900 20.825000 53.353000
-38.673900 26.569901 57.402000
-1.235000 22.840001 6.756000
-1.233000 23.538001 9.918001
--1.043000 24.325000 8.010000
-68.999998 -72.420001 61.611902
-63.415997 -65.831102 54.512002
-61.480898 -69.697998 53.455003
-71.291901 35.756901 42.033002
-71.822897 31.097000 35.792898
-68.128899 33.528902 35.726003
-75.927004 -135.641992 26.131900
-78.236900 -132.360995 14.522000
-82.289003 -130.076990 28.649000
-78.236900 -132.360995 14.522000
-84.370002 -126.829103 17.076001
-82.289003 -130.076990 28.649000
-65.455005 -13.971000 41.382901
-70.102900 -14.110000 34.140900
-66.275999 -17.157000 41.422002
-26.339000 27.083000 48.161898
-28.503900 21.989001 46.305902
-29.155999 27.225001 50.625000
-71.372002 14.295000 29.409900
-76.933898 18.743001 31.055000
-73.665999 11.277000 29.215001
-42.150002 25.906000 59.436001
-45.742001 24.979001 61.347000
-47.271900 31.930000 60.819000
-41.175898 39.021902 54.722000
-37.124000 39.187901 52.937001
-39.333001 33.215001 57.130001
-38.339999 40.852003 27.781000
-40.791899 36.159001 25.947001
-37.797999 37.109002 25.121901
-40.791899 36.159001 25.947001
-39.243001 32.019999 24.673000
-37.797999 37.109002 25.121901
--17.059999 25.468901 -37.501000
--15.238000 24.937000 -34.672100
--20.136001 22.062000 -35.755102
-18.443001 21.974999 32.958899
-15.237001 24.937000 34.671001
-13.607000 24.402902 31.791002
-57.140898 11.864000 32.754000
-61.844002 15.288901 30.142900
-59.057899 9.413901 33.263002
--23.871100 20.166900 -33.186100
--25.650000 19.777000 -35.763100
--20.136001 22.062000 -35.755102
--18.444099 21.974999 -32.959998
--23.871100 20.166900 -33.186100
--20.136001 22.062000 -35.755102
-115.834899 -22.052100 45.333002
-117.274001 -28.833099 44.180002
-112.804003 -22.497000 35.588000
-26.170000 22.118000 43.777000
-23.715900 26.811000 45.611002
-23.996001 22.156000 41.168898
-26.339000 27.083000 48.161898
-23.715900 26.811000 45.611002
-26.170000 22.118000 43.777000
-48.291001 -105.249099 -11.063000
-52.650001 -102.371104 -8.849000
-55.617001 -115.300104 -12.116999
-4.795000 32.441001 24.246901
-3.779000 34.569900 21.156000
-3.256000 31.076001 21.718001
-24.249000 21.576900 25.412001
-27.180001 23.825001 23.089999
-29.086001 22.833001 25.179001
-55.073000 -108.392999 55.567000
-50.265901 -112.231106 53.674899
-59.500899 -120.324001 53.103998
--23.448000 25.718901 -18.774100
--24.650998 29.270001 -17.597999
--26.817000 28.309001 -19.459998
--85.781001 18.631000 -35.085000
--82.457103 22.159001 -35.411000
--87.495103 23.468001 -42.058997
--26.935000 32.358002 -18.702999
--29.399099 31.468000 -20.229999
--26.817000 28.309001 -19.459998
--38.626000 15.873000 -49.700100
--41.666098 12.892000 -44.847101
--41.113000 14.781901 -51.703997
--39.299000 20.097001 -55.498101
--38.626000 15.873000 -49.700100
--41.113000 14.781901 -51.703997
--43.660998 13.520001 -53.603102
--42.298999 19.162999 -57.528000
--41.113000 14.781901 -51.703997
-82.456000 22.159001 35.409901
-83.587900 27.037000 42.215899
-87.494001 23.468001 42.057898
-63.360997 -7.856000 41.011002
-62.104002 -4.944000 40.675901
-66.972904 -4.547000 34.486901
--1.356000 35.179999 8.909000
--2.047000 35.707001 6.328000
--3.671100 33.348899 7.085000
-72.865896 -2.162000 30.010000
-74.231006 -5.487000 29.686000
-68.166003 -7.650100 34.463000
-68.166003 -7.650100 34.463000
-63.360997 -7.856000 41.011002
-66.972904 -4.547000 34.486901
-71.352899 1.054000 30.246001
-72.865896 -2.162000 30.010000
-66.972904 -4.547000 34.486901
--86.778998 -49.417000 -15.936000
--87.503999 -44.826999 -17.402999
--97.796999 -48.505101 -16.826099
-64.498000 15.770001 68.920895
-68.189003 12.932000 70.016898
-72.667897 19.975001 68.704002
-89.447901 0.488000 28.590901
-87.274000 4.546000 29.267900
-94.792902 6.438000 33.500001
-55.541001 28.840901 28.795000
-54.916002 35.313901 30.700000
-58.223899 33.594999 31.017000
--84.514000 -58.588099 -12.777099
--75.196996 -54.862998 -17.786000
--85.783996 -54.010000 -14.393000
-61.229002 8.305000 67.082003
-64.291000 5.520900 68.204999
-68.189003 12.932000 70.016898
--77.331103 -46.987001 -20.500999
--86.778998 -49.417000 -15.936000
--76.375000 -50.937999 -19.181000
--19.850999 31.520002 -43.429099
--17.364999 30.729000 -40.828999
--21.296000 26.430901 -42.980000
-29.538000 -99.918999 38.437899
-28.572900 -111.189105 44.082999
-33.407003 -108.930096 46.041001
-46.250902 12.071000 55.387001
-48.868001 10.420000 57.055000
-48.529901 16.603000 61.229002
-71.997002 -27.841000 32.416001
-72.025001 -31.390000 31.760901
-67.871004 -30.553000 40.596001
--1.560000 24.427000 -12.971000
--1.234000 23.538001 -9.919000
--4.042000 22.797002 -11.844000
-58.080003 -2.830000 47.486000
-56.652002 -0.616000 54.889899
-56.423899 -0.260000 46.658002
--82.964994 -63.131101 -11.090999
--92.499100 -70.012100 -9.765999
--81.138998 -67.621104 -9.339000
-31.773999 43.062001 45.823000
-34.911901 45.451000 41.562900
-31.138901 45.166902 40.137999
--7.402000 22.284001 -13.707000
--10.458999 22.547001 -12.367000
--11.231000 22.183999 -15.400000
--6.935000 22.329900 -10.555999
--10.458999 22.547001 -12.367000
--7.402000 22.284001 -13.707000
--8.034999 22.405000 -16.812999
--7.402000 22.284001 -13.707000
--11.231000 22.183999 -15.400000
-14.244000 23.284001 13.994001
-13.194000 24.041001 11.142001
-16.614901 25.537001 12.812001
-18.201001 43.110002 28.982000
-21.208901 43.922000 30.530000
-21.937901 43.409899 26.249999
--54.883000 22.194900 -29.066999
--57.287998 20.037999 -29.510999
--53.041101 16.388001 -31.475998
-13.593000 33.911899 7.810900
-14.244000 30.836901 7.468900
-12.206000 32.145903 5.235000
-14.527000 35.861000 10.333000
-17.062001 35.237901 12.069000
-15.913000 32.937001 9.784000
-16.145000 29.666001 9.746000
-14.244000 30.836901 7.468900
-15.913000 32.937001 9.784000
--91.258101 19.569000 -41.790102
--94.848000 15.345001 -41.408099
--88.960998 14.831000 -34.659099
-35.805002 -148.391992 -11.884000
-43.354001 -145.858988 -9.160000
-42.012002 -153.117999 1.044000
-46.608001 -153.172001 15.501000
-38.506001 -156.218991 12.734001
-42.012002 -153.117999 1.044000
--47.063001 10.564900 -40.966000
--45.061100 12.338000 -39.534099
--50.293997 12.305000 -35.652999
--55.132002 14.189000 -32.158099
--57.141997 11.864000 -32.755099
--52.236099 10.196000 -36.651101
--49.037997 8.666000 -42.304099
--47.063001 10.564900 -40.966000
--52.236099 10.196000 -36.651101
--63.452996 -77.124096 -8.032000
--60.737997 -80.481105 -6.205000
--54.862998 -75.689100 -16.036000
-25.694901 41.971002 23.846000
-25.031000 43.827899 27.531000
-28.766001 41.932900 24.961900
--71.397103 -20.864999 -33.459000
--70.833996 -17.455000 -33.846099
--77.352993 -16.055999 -28.196000
-33.917900 -155.686989 -1.747000
-38.506001 -156.218991 12.734001
-30.183000 -158.681005 9.935000
--39.876997 21.083901 -29.397000
--34.965999 19.534901 -31.101000
--37.710000 22.510000 -27.910000
--41.625001 25.461001 -26.822999
--39.876997 21.083901 -29.397000
--37.710000 22.510000 -27.910000
--39.244000 32.019999 -24.674000
--41.947000 30.753901 -25.612000
--39.214101 26.892900 -25.652999
--55.074099 -108.392999 -55.568099
--59.576999 -104.259104 -57.380099
--50.791100 -96.991993 -53.234100
-91.426998 -3.758000 27.822001
-84.387004 -10.048999 26.215900
-83.017901 -6.141000 26.934000
--6.226000 38.735002 -13.905000
--6.521000 38.555000 -11.023000
--3.662000 37.785899 -12.274999
--2.787000 37.610002 -3.757000
-0.712000 37.300900 -2.251000
--0.220000 37.201900 -5.160000
-67.625001 -53.819999 57.096999
-74.823901 -53.755101 65.218002
-68.494007 -49.749099 57.754003
-9.413000 38.090002 9.734000
-11.897000 36.458001 8.607000
-9.107000 37.012000 6.918000
--96.234098 -90.505995 -60.034100
--88.261098 -82.454100 -65.513097
--85.449994 -88.516995 -64.038098
-63.451901 -77.124096 8.031000
-73.987901 -80.572002 3.713000
-71.059898 -84.652096 1.728000
--56.590099 -144.601002 -32.097999
--56.248099 -135.838002 -43.509997
--49.438000 -139.811993 -41.089099
--5.969000 -107.152097 22.502001
--8.101000 -117.737003 29.145900
--1.397000 -107.208997 24.593901
--15.053100 41.111901 -31.628098
--17.882001 42.199999 -33.501998
--18.201999 43.110002 -28.983001
--105.237998 -55.877998 -67.016996
--95.319100 -51.126998 -71.143001
--94.834000 -57.397999 -70.263103
--0.842100 34.365002 11.420000
-1.123000 36.630999 10.618000
--1.356000 35.179999 8.909000
-1.123000 36.630999 10.618000
-0.824900 37.021901 7.932000
--1.356000 35.179999 8.909000
--90.844102 -96.902996 -5.869000
--86.851001 -102.417000 -3.573000
--81.633106 -90.416998 -1.609000
--28.239099 44.095002 -28.723000
--27.698999 45.117002 -33.361100
--31.549998 44.195902 -29.824000
--86.851001 -102.417000 -3.573000
--78.065105 -95.151097 0.573000
--81.633106 -90.416998 -1.609000
-39.701901 43.355901 49.076900
-43.923002 43.108001 50.542898
-42.936001 45.311999 44.112898
-43.923002 43.108001 50.542898
-47.152899 44.847000 45.230899
-42.936001 45.311999 44.112898
--94.949998 -38.839098 -72.513998
--104.532994 -35.487000 -69.705099
--94.126999 -32.889001 -72.998099
--50.377999 43.977000 -39.597098
--46.331100 44.756901 -38.801000
--47.153998 44.847000 -45.231998
-113.522001 -46.654001 61.326001
-105.490901 -48.965998 68.043903
-113.444000 -53.981997 60.130000
-39.840899 -118.918002 49.673900
-47.860999 -128.367990 48.784900
-45.180902 -115.747102 51.708899
-76.777898 16.670000 69.524005
-80.754898 12.984000 70.195898
-85.775003 18.333901 65.535001
-22.489000 30.193999 15.687000
-24.649901 29.270001 17.597001
-21.617001 26.652901 16.554002
-36.499999 -99.317104 -7.705000
-29.704001 -94.116993 1.414000
-40.455002 -97.217105 -5.628000
-46.494901 -83.823994 10.854901
-49.444001 -81.255995 12.630000
-54.702900 -86.764000 2.410000
-115.753897 -72.425105 34.873001
-112.833001 -82.282998 44.041000
-113.676004 -79.808995 32.951899
-91.257006 19.569000 41.789003
-95.461898 17.589001 49.991999
-94.847001 15.345001 41.407000
-52.650001 -102.371104 -8.849000
-44.263899 -94.900101 -3.573000
-47.915999 -92.376001 -1.547100
-44.263899 -94.900101 -3.573000
-40.159900 -88.477999 7.178900
-47.915999 -92.376001 -1.547100
-44.263899 -94.900101 -3.573000
-48.291001 -105.249099 -11.063000
-40.455002 -97.217105 -5.628000
--84.849998 -41.951999 -71.333997
--75.772099 -44.354100 -66.344097
--84.890001 -47.346100 -70.805997
--44.264998 -94.900101 3.572000
--48.292000 -105.249099 11.062000
--40.456101 -97.217105 5.626900
--33.305101 -92.428103 -3.365100
--44.264998 -94.900101 3.572000
--40.456101 -97.217105 5.626900
--96.987002 -53.895999 -15.174000
--106.044002 -60.759000 -18.226000
--95.836997 -59.292000 -13.444999
-1.233000 23.538001 9.918001
-1.235000 22.840001 6.756000
-3.834000 22.485999 8.654000
-96.986003 -53.895999 15.173000
-97.795896 -48.505101 16.825002
-107.100897 -54.535002 20.013001
-105.490901 -48.965998 68.043903
-113.522001 -46.654001 61.326001
-105.250001 -42.156000 68.941005
-92.901997 -27.115000 73.344000
-94.125897 -32.889001 72.997004
-103.357002 -28.996099 70.330001
-64.481005 -10.867000 41.247003
-61.063901 -8.370000 48.823003
-63.360997 -7.856000 41.011002
--42.151101 25.906000 -59.437100
--43.237001 32.720000 -59.035998
--38.674999 26.569901 -57.402998
--10.884000 23.413001 -25.906999
--9.777100 22.995001 -22.910001
--14.250000 21.805000 -24.326099
--13.608000 24.402902 -31.792000
--12.159999 23.888001 -28.868999
--16.903000 21.891002 -30.121099
-68.166003 -7.650100 34.463000
-64.481005 -10.867000 41.247003
-63.360997 -7.856000 41.011002
-84.864900 -85.512102 3.736900
-94.429001 -91.186993 8.102001
-90.843000 -96.902996 5.868000
-86.849898 -102.417000 3.572000
-78.064002 -95.151097 -0.574100
-81.632003 -90.416998 1.608000
-38.067002 -106.363997 47.938898
-37.471998 -95.488995 41.993901
-33.577900 -97.824000 40.243901
--78.237996 -132.360995 -14.523000
--82.290098 -130.076990 -28.649999
--75.928099 -135.641992 -26.132999
--4.031100 27.583901 -21.673100
--1.912000 29.711001 -19.131999
--2.991000 26.479000 -18.834000
-33.577900 -97.824000 40.243901
-37.471998 -95.488995 41.993901
-35.861000 -89.388996 31.520002
-75.927004 -135.641992 26.131900
-70.477895 -135.309994 37.138000
-69.140896 -140.768990 23.554001
-0.136000 26.974000 -13.768000
--0.773100 28.343000 -16.486999
-0.787000 30.048000 -14.110000
-0.136000 26.974000 -13.768000
--2.158000 25.420001 -15.937999
--0.773100 28.343000 -16.486999
-5.986000 24.627000 21.024900
-2.990000 26.479000 18.833000
-5.138900 23.913000 18.017000
--84.849998 -41.951999 -71.333997
--95.351994 -44.929098 -71.893997
--94.949998 -38.839098 -72.513998
--49.862001 26.068000 -27.931999
--55.542000 28.840901 -28.796000
--52.403998 24.207002 -28.541999
-23.902001 -104.210995 -14.030000
-19.506902 -105.344102 -16.153000
-14.446000 -98.817103 -6.566000
-92.892900 -109.269001 11.498000
-97.291000 -103.117995 13.854000
-95.271006 -114.666998 21.999000
-101.221003 -96.736997 16.141001
-104.208000 -101.315103 26.631001
-99.994004 -108.117998 24.354000
-58.373999 26.853001 29.107900
-58.223899 33.594999 31.017000
-61.500002 31.659901 31.246001
-67.087896 38.013000 41.755002
-71.291901 35.756901 42.033002
-68.128899 33.528902 35.726003
--110.722996 -25.569100 -64.137101
--108.853996 -18.965099 -64.804100
--101.746105 -22.715999 -70.818096
-60.742002 18.267000 67.681901
-64.498000 15.770001 68.920895
-68.462901 22.892900 67.738898
--35.555098 -137.906998 18.927000
--35.806000 -148.391992 11.883000
--28.615000 -139.806002 21.531001
--35.806000 -148.391992 11.883000
--28.076999 -150.393993 14.614000
--28.615000 -139.806002 21.531001
-15.041000 -106.214993 -18.275999
-10.479000 -99.447995 -8.583999
-19.506902 -105.344102 -16.153000
--44.748101 -90.139002 -45.306999
--45.396000 -82.151100 -36.362000
--42.369999 -84.741995 -34.807999
--84.849998 -41.951999 -71.333997
--94.949998 -38.839098 -72.513998
--84.441103 -36.658101 -71.733102
--0.842100 34.365002 11.420000
--1.356000 35.179999 8.909000
--2.774000 32.568999 9.449000
--4.132000 27.565001 6.980000
--3.211000 29.589999 9.468000
--4.402000 30.489901 7.314000
-33.631001 21.367000 51.102001
-36.215000 16.805001 47.591899
-36.402900 20.825000 53.353000
--62.153000 -8.959000 -57.474997
--62.369000 -11.326999 -49.327001
--63.731000 -12.075000 -58.096100
--66.027999 -7.336000 -65.225996
--62.153000 -8.959000 -57.474997
--63.731000 -12.075000 -58.096100
-1.123000 36.630999 10.618000
-3.661000 37.785899 12.274000
-3.703000 37.930001 9.479000
-35.339002 26.995001 55.250902
-33.631001 21.367000 51.102001
-36.402900 20.825000 53.353000
-32.159902 27.204001 52.990001
-32.026999 33.428002 52.969001
-29.155999 27.225001 50.625000
-4.737900 33.914000 -4.558100
-5.986900 34.431901 -1.805000
-7.014900 31.773999 -2.487000
--39.876997 21.083901 -29.397000
--44.007000 23.902001 -27.916100
--42.027101 19.555001 -30.810000
-46.608001 -153.172001 15.501000
-49.876899 -149.988994 3.812900
-54.443002 -149.563998 18.232001
-49.876899 -149.988994 3.812900
-57.472002 -146.320999 6.552000
-54.443002 -149.563998 18.232001
--36.968000 18.291000 -32.944098
--39.876997 21.083901 -29.397000
--42.027101 19.555001 -30.810000
--48.292998 14.293000 -34.570001
--45.061100 12.338000 -39.534099
--43.041099 13.989001 -38.013101
-56.798901 -99.247098 -6.663100
-52.650001 -102.371104 -8.849000
-47.915999 -92.376001 -1.547100
--42.027101 19.555001 -30.810000
--46.347100 22.218000 -28.927999
--44.151101 17.916000 -32.145999
--86.851001 -102.417000 -3.573000
--90.844102 -96.902996 -5.869000
--92.893995 -109.269001 -11.499000
--49.438000 -139.811993 -41.089099
--56.248099 -135.838002 -43.509997
--47.862001 -128.367990 -48.785999
-33.348899 25.072001 24.718901
-31.020001 21.797001 27.214000
-29.086001 22.833001 25.179001
-15.192000 26.541000 10.222000
-16.145000 29.666001 9.746000
-17.985001 28.600000 12.029001
--67.596100 -95.197998 -60.745999
--61.234102 -85.482098 -57.829000
--58.033101 -89.523099 -56.382000
-84.917903 8.406000 29.854000
-77.863902 4.761000 28.562900
-82.400002 12.062000 30.346001
--51.242098 -83.972998 -48.342999
--54.548100 -93.365997 -54.848999
--58.033101 -89.523099 -56.382000
-20.325001 31.100001 13.741001
-22.489000 30.193999 15.687000
-19.798901 27.606001 14.303001
--63.757002 -99.849999 -59.106998
--67.596100 -95.197998 -60.745999
--58.033101 -89.523099 -56.382000
-76.933898 18.743001 31.055000
-79.732999 15.508001 30.746000
-73.665999 11.277000 29.215001
--44.932000 39.229900 -29.215999
--43.786999 35.041001 -26.688000
--41.623101 40.137000 -28.545098
-34.965001 19.534901 31.100001
-36.966901 18.291000 32.942999
-31.394999 18.423000 34.742001
-23.870001 20.166900 33.185001
-22.201000 20.534901 30.555001
-27.690900 20.075001 30.186001
-60.874999 6.846000 33.686001
-62.582999 4.159900 34.019999
-57.611000 3.148000 39.090000
--104.532994 -35.487000 -69.705099
--94.949998 -38.839098 -72.513998
--105.250999 -42.156000 -68.942100
-21.208901 43.922000 30.530000
-18.201001 43.110002 28.982000
-17.881000 42.199999 33.500899
--98.274104 -43.145999 -18.395999
--87.963998 -40.255100 -18.793000
--98.426104 -37.839100 -19.881999
-27.690900 20.075001 30.186001
-32.979902 20.701000 29.187901
-29.510001 19.274000 32.493901
-97.323902 -10.919000 71.364902
-94.572902 -5.459100 71.425006
-87.055899 -11.127000 73.539004
-39.213002 26.892900 25.652001
-41.945901 30.753901 25.611000
-41.625001 25.461001 26.822001
-0.293900 33.181898 -13.944999
--1.267000 35.901003 -13.301000
-0.841000 34.365002 -11.421000
-44.624001 29.340900 26.465900
-44.006001 23.902001 27.915001
-41.625001 25.461001 26.822001
--41.603100 -131.779999 -46.523999
--35.092000 -134.755999 -44.202000
--42.332102 -143.302992 -38.606998
--49.438000 -139.811993 -41.089099
--41.603100 -131.779999 -46.523999
--42.332102 -143.302992 -38.606998
-89.343004 -16.208099 73.614895
-97.323902 -10.919000 71.364902
-87.055899 -11.127000 73.539004
--1.267000 35.901003 -13.301000
--1.124000 36.630999 -10.619099
-0.841000 34.365002 -11.421000
-3.670000 33.348899 -7.086000
-2.773000 32.568999 -9.450000
-1.355000 35.179999 -8.909999
--25.638999 36.310002 -18.798999
--24.475999 33.165999 -17.115999
--22.945998 36.812000 -17.402999
--54.548100 -93.365997 -54.848999
--51.242098 -83.972998 -48.342999
--48.099000 -87.151103 -46.861999
--51.242098 -83.972998 -48.342999
--48.253000 -79.394996 -37.853099
--48.099000 -87.151103 -46.861999
--64.291999 5.520900 -68.206102
--61.230000 8.305000 -67.083098
--59.158102 1.636000 -62.500000
--20.298099 39.657000 -18.414000
--23.125000 39.562900 -19.730000
--22.945998 36.812000 -17.402999
--65.086000 -61.882000 -55.473000
--61.368998 -60.123101 -45.236100
--63.417003 -65.831102 -54.513101
-107.342005 -30.203000 26.273999
-114.820898 -35.433996 32.932900
-107.857004 -36.146000 24.847001
--39.841998 -118.918002 -49.674999
--34.277100 -121.728994 -47.577001
--41.603100 -131.779999 -46.523999
-21.464001 -139.322996 39.395001
-14.420000 -140.884995 36.924899
-19.628901 -150.672004 30.864900
--4.538100 25.579000 4.222000
--6.191000 26.097000 2.141000
--4.461000 23.940900 1.169000
--0.355000 22.586901 1.656900
--2.162000 22.708001 -0.166000
-0.354000 22.586901 -1.658000
--70.951000 -67.836002 -62.675998
--65.086000 -61.882000 -55.473000
--63.417003 -65.831102 -54.513101
--61.368998 -60.123101 -45.236100
--59.700102 -63.590996 -44.208098
--63.417003 -65.831102 -54.513101
-55.541001 28.840901 28.795000
-58.223899 33.594999 31.017000
-58.373999 26.853001 29.107900
--12.242000 -105.717100 -30.740000
--13.584000 -98.457098 -20.534100
--7.729100 -106.490001 -28.719001
--59.700102 -63.590996 -44.208098
--61.481997 -69.697998 -53.456102
--63.417003 -65.831102 -54.513101
-91.457002 21.899000 50.159901
-91.257006 19.569000 41.789003
-87.494001 23.468001 42.057898
-83.587900 27.037000 42.215899
-87.277003 25.836900 50.206002
-87.494001 23.468001 42.057898
-87.277003 25.836900 50.206002
-91.457002 21.899000 50.159901
-87.494001 23.468001 42.057898
--20.326100 31.100001 -13.742000
--22.490000 30.193999 -15.688000
--19.800000 27.606001 -14.304000
-115.011998 -74.731104 45.860000
-117.295898 -65.003999 36.694001
-116.628900 -67.136101 47.569901
-35.553999 -137.906998 -18.927999
-27.173901 -127.527997 -24.254000
-33.201899 -125.830099 -21.809999
--64.538099 -17.590100 -50.007999
--63.529998 -14.403000 -49.722999
--66.277102 -17.157000 -41.423101
--112.834997 -61.388999 -58.807999
--104.476996 -62.852100 -65.862000
--111.680098 -68.833999 -57.363000
--18.357100 40.034901 -38.137101
--19.881999 36.645900 -42.451099
--21.385100 41.029900 -40.194098
--22.886001 37.507899 -44.737998
--26.121099 38.222000 -46.937101
--24.635099 41.883901 -42.163000
-36.521900 33.143003 23.655001
-33.793900 34.125000 22.555001
-34.812000 37.895001 24.211001
-42.033002 43.376900 32.575998
-38.458001 43.848898 31.752001
-38.513903 45.561999 36.911901
--3.211000 29.589999 9.468000
--4.132000 27.565001 6.980000
--2.605100 26.694901 8.963000
--70.320003 -66.359103 -13.188000
--72.168998 -62.589101 -14.787000
--81.138998 -67.621104 -9.339000
-78.472003 -100.137100 60.770001
-71.071900 -90.329103 62.291000
-67.594998 -95.197998 60.744900
-27.697900 45.117002 33.360001
-31.166900 45.462999 34.637999
-31.548902 44.195902 29.822901
--97.045995 -22.437999 -23.826100
--87.818101 -26.813000 -22.480000
--87.288104 -22.473000 -23.542998
-94.833001 -57.397999 70.262000
-84.549002 -52.807998 70.150003
-83.816998 -58.311101 69.371998
--84.388100 -10.048999 -26.216999
--85.561000 -14.080000 -25.413100
--77.352993 -16.055999 -28.196000
-10.612001 36.457002 31.493001
-12.972000 37.723899 33.778898
-12.420001 39.930001 29.673001
--117.296994 -65.003999 -36.695000
--115.013100 -74.731104 -45.861099
--115.754999 -72.425105 -34.874100
--45.674998 42.688899 -33.308998
--44.932000 39.229900 -29.215999
--42.034101 43.376900 -32.577001
--16.104098 42.179000 -23.435000
--16.931999 41.262999 -19.994000
--13.363000 41.388899 -21.906100
-109.072901 -3.198000 48.069902
-110.768899 -10.004000 56.944001
-111.708000 -9.207000 47.278900
-110.768899 -10.004000 56.944001
-113.148004 -16.431000 56.215901
-111.708000 -9.207000 47.278900
--16.104098 42.179000 -23.435000
--13.363000 41.388899 -21.906100
--12.664000 41.139901 -25.643000
-57.819001 -83.697997 4.328000
-60.736902 -80.481105 6.203900
-67.869000 -88.578105 -0.308000
--94.848000 15.345001 -41.408099
--98.239996 10.800000 -40.911999
--91.972999 10.765000 -34.131099
-7.401000 22.284001 13.706001
-4.040900 22.797002 11.843001
-6.934000 22.329900 10.555000
--5.810000 38.432900 -16.906999
--5.526100 37.534002 -20.073999
--8.223000 39.515901 -18.635100
--13.608000 24.402902 -31.792000
--15.238000 24.937000 -34.672100
--11.254000 28.054001 -32.639001
-25.165001 -156.920001 21.388000
-21.684000 -160.544991 7.112900
-30.183000 -158.681005 9.935000
-11.229901 22.183999 15.399001
-7.401000 22.284001 13.706001
-10.458000 22.547001 12.366001
-76.058902 31.993002 57.458900
-78.532897 32.583002 49.928002
-74.035004 35.394002 49.605899
--15.238000 24.937000 -34.672100
--17.059999 25.468901 -37.501000
--13.072000 28.971002 -35.429101
-77.863902 4.761000 28.562900
-71.352899 1.054000 30.246001
-69.699898 4.155000 30.395901
-87.758005 -80.457099 5.809000
-94.429001 -91.186993 8.102001
-84.864900 -85.512102 3.736900
-79.029903 -72.038099 7.521900
-90.303004 -75.281002 7.820000
-87.758005 -80.457099 5.809000
-90.303004 -75.281002 7.820000
-100.346997 -79.286106 12.373000
-97.597897 -85.304096 10.272000
-64.046897 -52.995998 47.022901
-66.488899 -57.870001 56.334902
-67.625001 -53.819999 57.096999
-62.721997 -131.411001 45.865003
-68.831004 -126.556993 48.146900
-59.500899 -120.324001 53.103998
--94.848000 15.345001 -41.408099
--91.258101 19.569000 -41.790102
--95.463000 17.589001 -49.993098
--91.258101 19.569000 -41.790102
--91.458097 21.899000 -50.161000
--95.463000 17.589001 -49.993098
--15.108000 29.871000 -38.160000
--12.278000 33.459898 -35.116099
--13.072000 28.971002 -35.429101
-35.861000 -89.388996 31.520002
-39.186999 -87.157995 33.193000
-41.046999 -83.962999 21.665001
--64.482100 -10.867000 -41.248102
--68.167001 -7.650100 -34.464099
--69.212995 -10.838999 -34.348000
--75.440101 -8.917000 -29.275998
--70.103996 -14.110000 -34.141999
--69.212995 -10.838999 -34.348000
-28.100001 42.569902 44.041000
-24.634000 41.883901 42.161901
-26.120001 38.222000 46.936002
--31.864099 30.486001 -21.691000
--34.325100 29.399900 -23.084000
--31.167999 26.222000 -23.025999
-101.512998 -98.075993 50.442003
-96.233003 -90.508103 60.032003
-92.873000 -97.144999 58.292899
-89.343004 -16.208099 73.614895
-87.055899 -11.127000 73.539004
-79.426005 -17.021000 71.987897
-21.464001 -139.322996 39.395001
-16.506001 -127.833992 40.945899
-14.420000 -140.884995 36.924899
-9.776000 22.995001 22.909001
-5.986000 24.627000 21.024900
-8.826001 22.652000 19.878000
-8.362001 35.959899 4.043000
-9.107000 37.012000 6.918000
-11.109000 34.932900 5.881900
--29.539000 -99.918999 -38.438998
--32.402098 -91.427103 -29.798100
--28.822999 -93.263097 -28.024999
-54.497000 42.923000 40.290002
-55.909000 43.026999 47.143999
-58.667902 41.587003 40.881902
-14.913000 37.804998 12.883000
-14.527000 35.861000 10.333000
-12.199000 37.987899 11.310000
-71.003899 24.561999 31.399902
-75.456001 28.392000 35.763901
-74.021004 21.760000 31.273000
-14.913000 37.804998 12.883000
-12.020000 39.312001 14.088000
-14.755000 39.525002 15.581001
-11.897000 36.458001 8.607000
-9.413000 38.090002 9.734000
-12.199000 37.987899 11.310000
-12.020000 39.312001 14.088000
-14.913000 37.804998 12.883000
-12.199000 37.987899 11.310000
-64.391896 35.693999 35.560999
-68.128899 33.528902 35.726003
-64.731002 29.510900 31.385902
-71.822897 31.097000 35.792898
-75.456001 28.392000 35.763901
-71.003899 24.561999 31.399902
-79.007007 25.413001 35.638001
-76.933898 18.743001 31.055000
-74.021004 21.760000 31.273000
-66.838898 -56.325100 24.839001
-75.195901 -54.862998 17.784901
-73.794901 -58.752000 16.319901
-75.456001 28.392000 35.763901
-79.007007 25.413001 35.638001
-74.021004 21.760000 31.273000
-49.368899 41.777000 33.948001
-48.257899 38.129002 29.798001
-45.673899 42.688899 33.307899
--47.272999 31.930000 -60.819998
--43.237001 32.720000 -59.035998
--42.151101 25.906000 -59.437100
--41.176997 39.021902 -54.722998
--39.333999 33.215001 -57.131100
--43.237001 32.720000 -59.035998
--47.272999 31.930000 -60.819998
--45.390997 38.569000 -56.389000
--43.237001 32.720000 -59.035998
--45.390997 38.569000 -56.389000
--41.176997 39.021902 -54.722998
--43.237001 32.720000 -59.035998
--51.417999 30.825000 -62.473997
--47.272999 31.930000 -60.819998
--45.743100 24.979001 -61.347999
-19.180000 21.274000 25.163000
-24.249000 21.576900 25.412001
-20.638900 20.899000 27.878901
--9.568000 -96.836001 -4.940100
--14.447000 -98.817103 6.565000
--5.753000 -97.262099 -2.968000
--5.608000 -99.707097 -16.609000
--9.568000 -96.836001 -4.940100
--1.583000 -99.987000 -14.619100
--83.018996 -6.141000 -26.935000
--89.448996 0.488000 -28.592000
--91.428101 -3.758000 -27.822999
-15.505901 21.826901 27.239000
-19.180000 21.274000 25.163000
-20.638900 20.899000 27.878901
--65.317102 -59.762102 -23.538999
--61.985102 -58.172099 -34.479100
--66.839993 -56.325100 -24.840100
--78.974001 -31.212000 -25.007999
--71.865998 -34.965098 -31.021999
--72.026104 -31.390000 -31.762000
-70.832998 -17.455000 33.845000
-70.102900 -14.110000 34.140900
-76.482005 -12.443000 28.777901
--65.376997 -20.876000 -50.186101
--67.425102 -23.744000 -41.203998
--66.041999 -24.254000 -50.253000
-7.164900 -142.591998 -29.313998
-14.383000 -142.159000 -26.732100
-12.251001 -152.744994 -20.085000
--53.174000 22.253901 -64.787105
--56.958098 20.423900 -66.305101
--59.915099 27.590001 -65.385103
-36.521900 33.143003 23.655001
-34.324002 29.399900 23.083000
-33.793900 34.125000 22.555001
-71.003899 24.561999 31.399902
-66.444904 19.833000 29.545000
-67.902900 27.145900 31.437900
-34.324002 29.399900 23.083000
-31.863000 30.486001 21.690000
-33.793900 34.125000 22.555001
-68.128899 33.528902 35.726003
-71.822897 31.097000 35.792898
-67.902900 27.145900 31.437900
-35.646901 43.333001 47.501899
-39.701901 43.355901 49.076900
-38.848899 45.506001 42.888902
-66.444904 19.833000 29.545000
-63.834898 22.346999 29.485000
-67.902900 27.145900 31.437900
-97.704001 12.453000 58.520000
-99.261999 12.913000 49.698003
-95.461898 17.589001 49.991999
-31.773999 43.062001 45.823000
-35.646901 43.333001 47.501899
-34.911901 45.451000 41.562900
-29.538000 -99.918999 38.437899
-25.364000 -101.764001 36.580000
-28.572900 -111.189105 44.082999
-78.042902 -19.747999 27.524900
-78.549005 -23.511998 26.770001
-71.786001 -24.329999 32.980900
-70.832998 -17.455000 33.845000
-76.482005 -12.443000 28.777901
-77.351898 -16.055999 28.194901
-84.559895 8.916000 70.722900
-75.239897 6.224900 71.775004
-78.530900 2.365000 72.433896
-38.067002 -106.363997 47.938898
-33.577900 -97.824000 40.243901
-33.407003 -108.930096 46.041001
-3.670000 33.348899 -7.086000
-2.046000 35.707001 -6.329000
-4.737900 33.914000 -4.558100
-23.590000 -113.133103 42.073000
-28.510001 -124.162100 45.416899
-28.572900 -111.189105 44.082999
-28.510001 -124.162100 45.416899
-34.276001 -121.728994 47.575999
-28.572900 -111.189105 44.082999
--21.385100 41.029900 -40.194098
--22.886001 37.507899 -44.737998
--24.635099 41.883901 -42.163000
-5.637000 31.163000 -5.020000
-3.670000 33.348899 -7.086000
-4.737900 33.914000 -4.558100
--26.121099 38.222000 -46.937101
--28.100999 42.569902 -44.041999
--24.635099 41.883901 -42.163000
-89.343004 -16.208099 73.614895
-99.723898 -16.681001 71.162999
-97.323902 -10.919000 71.364902
-83.017901 -6.141000 26.934000
-81.468001 -2.366000 27.565001
-89.447901 0.488000 28.590901
--108.853996 -18.965099 -64.804100
--113.149099 -16.431000 -56.217000
--106.561996 -12.629000 -65.333098
-99.723898 -16.681001 71.162999
-106.560901 -12.629000 65.332003
-97.323902 -10.919000 71.364902
--109.972097 -76.272100 -55.799998
--115.013100 -74.731104 -45.861099
--111.680098 -68.833999 -57.363000
--93.805999 9.491000 -66.039100
--88.156998 4.478000 -71.103998
--97.462997 4.488900 -66.074997
--110.769995 -10.004000 -56.945000
--108.002998 -3.879000 -57.542000
--103.877001 -6.591100 -65.722100
--51.486999 44.090901 -46.243999
--50.377999 43.977000 -39.597098
--47.153998 44.847000 -45.231998
-8.732000 -159.860998 -10.198000
-13.060001 -161.795005 4.276000
-4.361000 -162.422001 1.424900
-72.570898 -117.422000 -3.622000
-65.458000 -108.042002 -7.391000
-69.962896 -103.987001 -5.078100
--46.331100 44.756901 -38.801000
--42.937100 45.311999 -44.113997
--47.153998 44.847000 -45.231998
--33.251997 39.090902 -51.041998
--32.028001 33.428002 -52.970100
--35.590999 33.443999 -55.105999
-106.470004 -24.396999 27.604001
-107.342005 -30.203000 26.273999
-97.800002 -27.465999 22.599000
--96.234098 -90.505995 -60.034100
--99.079102 -83.713993 -61.662998
--88.261098 -82.454100 -65.513097
-60.729001 -95.892996 -4.507000
-64.420901 -92.332102 -2.386000
-69.962896 -103.987001 -5.078100
-71.392901 34.699000 56.847900
-72.524004 28.589999 63.715003
-76.058902 31.993002 57.458900
-57.140898 11.864000 32.754000
-52.235000 10.196000 36.650002
-55.131000 14.189000 32.157000
--59.700102 -63.590996 -44.208098
--61.985102 -58.172099 -34.479100
--60.367100 -61.460000 -33.332098
--8.101000 -117.737003 29.145900
--13.448000 -117.304102 26.898000
--14.804000 -129.712999 29.121900
--79.227999 -74.727997 -66.326000
--76.900102 -80.061994 -65.086000
--88.261098 -82.454100 -65.513097
--87.963998 -40.255100 -18.793000
--98.274104 -43.145999 -18.395999
--87.503999 -44.826999 -17.402999
--86.851001 -102.417000 -3.573000
--88.042997 -115.153000 -9.080000
--82.464993 -107.694998 -1.224000
--67.135103 -40.993098 -38.973000
--71.516000 -38.554098 -30.195000
--70.973001 -42.146001 -29.285001
--12.252000 -152.744994 20.083901
--4.243100 -153.076991 22.809001
--7.166000 -142.591998 29.312901
--14.384000 -142.159000 26.731001
--12.252000 -152.744994 20.083901
--7.166000 -142.591998 29.312901
--107.998103 -42.200100 -23.327999
--98.426104 -37.839100 -19.881999
--107.858099 -36.146000 -24.847999
--108.853996 -18.965099 -64.804100
--99.725001 -16.681001 -71.164101
--101.746105 -22.715999 -70.818096
-23.870001 20.166900 33.185001
-27.690900 20.075001 30.186001
-29.510001 19.274000 32.493901
-64.820901 -115.745105 55.151001
-74.540004 -121.312000 50.354000
-69.772005 -110.832103 57.112899
-50.790001 -96.991993 53.233001
-55.073000 -108.392999 55.567000
-59.576001 -104.259104 57.379000
--25.650000 19.777000 -35.763100
--21.986999 22.128901 -38.493998
--20.136001 22.062000 -35.755102
-53.423900 -73.440105 40.624000
-50.931901 -76.486997 39.272901
-54.159001 -80.622099 49.747001
-18.054999 24.642000 15.387001
-15.357001 22.659000 16.826000
-14.244000 23.284001 13.994001
--114.822000 -35.433996 -32.933999
--115.195997 -42.133000 -31.447999
--107.858099 -36.146000 -24.847999
--115.195997 -42.133000 -31.447999
--107.998103 -42.200100 -23.327999
--107.858099 -36.146000 -24.847999
--97.801104 -27.465999 -22.600099
--97.045995 -22.437999 -23.826100
--106.471099 -24.396999 -27.604999
-75.190000 -8.454099 71.291000
-72.724901 -4.547000 70.730999
-68.026997 -10.766000 65.870002
-71.456999 -18.232999 66.762999
-77.430904 -12.616999 71.708903
-69.844998 -14.403000 66.382006
-81.156902 -69.303103 67.456000
-72.571896 -63.180096 63.631900
-70.949897 -67.836002 62.674902
-24.388000 -93.056999 12.670000
-27.923901 -91.610096 14.543001
-33.304002 -92.428103 3.364000
-77.430904 -12.616999 71.708903
-75.190000 -8.454099 71.291000
-69.844998 -14.403000 66.382006
--118.307002 -57.592001 -38.411997
--117.692098 -59.542999 -49.169000
--116.629995 -67.136101 -47.571000
-97.704001 12.453000 58.520000
-93.805000 9.491000 66.038005
-97.461902 4.488900 66.073902
--5.969000 -107.152097 22.502001
--1.397000 -107.208997 24.593901
-1.582000 -99.987000 14.618000
-71.392901 34.699000 56.847900
-76.058902 31.993002 57.458900
-74.035004 35.394002 49.605899
-28.822001 -93.263097 28.024001
-31.369999 -89.971103 16.381901
-25.135901 -94.889000 26.207000
-46.769001 33.754002 27.340900
-48.257899 38.129002 29.798001
-49.729001 32.290999 27.909901
-101.433896 7.368900 58.327898
-97.704001 12.453000 58.520000
-97.461902 4.488900 66.073902
-100.832999 -0.876000 65.969005
-101.433896 7.368900 58.327898
-97.461902 4.488900 66.073902
-91.507003 -0.320000 71.336895
-100.832999 -0.876000 65.969005
-97.461902 4.488900 66.073902
-84.864900 -85.512102 3.736900
-81.632003 -90.416998 1.608000
-73.987901 -80.572002 3.713000
--25.503099 32.784000 -48.384000
--22.564000 32.214999 -45.950100
--26.340099 27.083000 -48.162997
--35.340101 26.995001 -55.252001
--32.161001 27.204001 -52.991100
--33.631999 21.367000 -51.103100
-77.351898 -16.055999 28.194901
-85.559897 -14.080000 25.412001
-78.042902 -19.747999 27.524900
--37.799001 37.109002 -25.122998
--34.812998 37.895001 -24.211999
--35.098001 41.383900 -26.931999
-6.705900 29.902902 27.204001
-4.795000 32.441001 24.246901
-5.269000 28.728999 24.461001
--33.794999 34.125000 -22.555999
--31.844001 38.527001 -23.216000
--34.812998 37.895001 -24.211999
-3.256000 31.076001 21.718001
-4.030000 27.583901 21.672001
-5.269000 28.728999 24.461001
-4.030000 27.583901 21.672001
-7.018000 25.413001 23.992000
-5.269000 28.728999 24.461001
--3.439000 37.819002 -6.664100
--0.826000 37.021901 -7.933101
--3.704000 37.930001 -9.480000
-7.085900 28.847000 -2.603000
-6.190000 26.097000 -2.142000
-5.565000 28.236000 -4.902000
-6.190000 26.097000 -2.142000
-4.537000 25.579000 -4.223100
-5.565000 28.236000 -4.902000
--97.801104 -27.465999 -22.600099
--87.818101 -26.813000 -22.480000
--97.045995 -22.437999 -23.826100
-5.637000 31.163000 -5.020000
-7.085900 28.847000 -2.603000
-5.565000 28.236000 -4.902000
--76.833099 -129.981995 -39.562099
--82.290098 -130.076990 -28.649999
--82.749099 -124.250002 -41.910000
-4.401000 30.489901 -7.315100
-5.565000 28.236000 -4.902000
-4.131000 27.565001 -6.981000
-11.253000 28.054001 32.638002
-15.237001 24.937000 34.671001
-13.071000 28.971002 35.428002
--109.235100 -10.358000 -37.807997
--101.888999 -8.016000 -31.004999
--106.928103 -4.651100 -38.751997
--20.212000 -151.848093 17.350001
--14.384000 -142.159000 26.731001
--21.545999 -141.227990 24.135001
-31.166900 45.462999 34.637999
-27.697900 45.117002 33.360001
-27.541000 44.678003 38.617000
-33.250902 39.090902 51.041000
-29.579001 38.761001 49.040001
-32.026999 33.428002 52.969001
-19.850001 31.520002 43.428000
-22.562901 32.214999 45.949001
-19.881001 36.645900 42.450000
--90.304099 -75.281002 -7.821100
--97.599000 -85.304096 -10.273000
--87.759100 -80.457099 -5.810000
--47.862001 -128.367990 -48.785999
--56.248099 -135.838002 -43.509997
--53.840101 -124.541998 -50.981000
--92.483103 -70.008099 -68.125002
--101.402096 -76.811999 -63.180998
--103.199996 -69.844104 -64.582102
-76.058902 31.993002 57.458900
-77.050000 25.576901 64.461902
-80.663003 28.885901 57.938900
--4.031100 27.583901 -21.673100
--7.019100 25.413001 -23.993099
--5.270000 28.728999 -24.462000
--7.019100 25.413001 -23.993099
--10.884000 23.413001 -25.906999
--8.237099 26.256001 -26.916999
--12.159999 23.888001 -28.868999
--9.646000 27.141999 -29.802099
--8.237099 26.256001 -26.916999
--54.096099 6.477000 -60.029998
--52.533101 4.076000 -52.577000
--54.625999 1.817000 -53.792000
--56.424998 -0.260000 -46.659101
--56.653000 -0.616000 -54.890998
--54.625999 1.817000 -53.792000
--57.141997 11.864000 -32.755099
--54.110099 7.967000 -37.556000
--52.236099 10.196000 -36.651101
--52.533101 4.076000 -52.577000
--52.860100 4.473900 -44.683997
--54.680999 2.176000 -45.722999
-31.138901 45.166902 40.137999
-31.166900 45.462999 34.637999
-27.541000 44.678003 38.617000
-39.089002 -123.741001 -19.368999
-44.803001 -121.279001 -16.937099
-48.900999 -132.729992 -13.742000
--66.749103 -38.430098 -49.458098
--69.435999 -41.625999 -58.743998
--69.518998 -37.613999 -59.071999
-70.477895 -135.309994 37.138000
-68.831004 -126.556993 48.146900
-62.721997 -131.411001 45.865003
--74.824996 -53.755101 -65.219104
--75.458996 -49.036998 -65.839998
--68.495102 -49.749099 -57.755101
--75.769000 -39.724998 -66.726997
--75.461999 -35.177000 -66.987999
--69.518998 -37.613999 -59.071999
--67.135103 -40.993098 -38.973000
--66.500001 -44.484101 -38.248099
--65.839998 -45.722999 -48.438001
--97.598001 -105.022103 -48.449099
--93.153998 -111.726999 -46.356998
--98.541997 -111.140996 -35.766996
--83.675101 -31.491000 -71.999997
--74.863002 -30.733999 -67.124099
--75.461999 -35.177000 -66.987999
-8.821900 39.533999 15.501000
-12.020000 39.312001 14.088000
-9.284001 38.998000 12.562000
-12.020000 39.312001 14.088000
-12.199000 37.987899 11.310000
-9.284001 38.998000 12.562000
--84.849998 -41.951999 -71.333997
--84.441103 -36.658101 -71.733102
--75.769000 -39.724998 -66.726997
--75.461999 -35.177000 -66.987999
--69.352999 -33.659998 -59.285998
--69.518998 -37.613999 -59.071999
--43.041099 13.989001 -38.013101
--37.409998 15.416000 -41.056000
--41.014001 15.527001 -36.403000
-12.199000 37.987899 11.310000
-9.413000 38.090002 9.734000
-9.284001 38.998000 12.562000
--0.826000 37.021901 -7.933101
--1.124000 36.630999 -10.619099
--3.704000 37.930001 -9.480000
--74.232101 -5.487000 -29.687099
--68.167001 -7.650100 -34.464099
--72.866999 -2.162000 -30.011000
-27.697900 45.117002 33.360001
-28.238000 44.095002 28.721999
-24.377001 44.597000 31.989001
-11.897000 36.458001 8.607000
-14.527000 35.861000 10.333000
-13.593000 33.911899 7.810900
-60.435001 -6.007000 56.733999
-61.063901 -8.370000 48.823003
-62.152002 -8.959000 57.473902
--67.941099 31.200001 -62.827997
--72.525099 28.589999 -63.716002
--71.393996 34.699000 -56.848999
-28.100001 42.569902 44.041000
-31.138901 45.166902 40.137999
-27.541000 44.678003 38.617000
-24.634000 41.883901 42.161901
-28.100001 42.569902 44.041000
-27.541000 44.678003 38.617000
-14.527000 35.861000 10.333000
-15.913000 32.937001 9.784000
-13.593000 33.911899 7.810900
-15.913000 32.937001 9.784000
-14.244000 30.836901 7.468900
-13.593000 33.911899 7.810900
-13.593000 33.911899 7.810900
-12.206000 32.145903 5.235000
-11.109000 34.932900 5.881900
--22.886001 37.507899 -44.737998
--19.881999 36.645900 -42.451099
--22.564000 32.214999 -45.950100
--1.124000 36.630999 -10.619099
--1.267000 35.901003 -13.301000
--3.662000 37.785899 -12.274999
-117.295898 -65.003999 36.694001
-113.580003 -62.765002 26.388900
-114.587896 -55.833999 28.173000
--26.121099 38.222000 -46.937101
--22.886001 37.507899 -44.737998
--25.503099 32.784000 -48.384000
-6.085000 37.444901 5.296900
-3.437900 37.819002 6.663000
-6.506000 38.062900 8.180000
--3.491000 37.240002 -15.129000
--6.226000 38.735002 -13.905000
--3.662000 37.785899 -12.274999
--39.299000 20.097001 -55.498101
--42.298999 19.162999 -57.528000
--42.151101 25.906000 -59.437100
--32.402098 -91.427103 -29.798100
--33.578999 -97.824000 -40.245000
--35.861999 -89.388996 -31.521000
--33.578999 -97.824000 -40.245000
--38.068101 -106.363997 -47.939997
--37.473001 -95.488995 -41.995000
--1.805000 37.423000 -0.759100
--4.158000 36.416002 0.666000
--0.713000 37.300900 2.250000
--49.438000 -139.811993 -41.089099
--47.862001 -128.367990 -48.785999
--41.603100 -131.779999 -46.523999
--34.277100 -121.728994 -47.577001
--35.092000 -134.755999 -44.202000
--41.603100 -131.779999 -46.523999
-84.848903 -41.951999 71.332999
-75.771004 -44.354100 66.343002
-84.888898 -47.346100 70.804998
-84.848903 -41.951999 71.332999
-84.888898 -47.346100 70.804998
-95.350899 -44.929098 71.892902
-72.667897 19.975001 68.704002
-76.777898 16.670000 69.524005
-81.477895 22.159001 65.068997
--44.264998 -94.900101 3.572000
--33.305101 -92.428103 -3.365100
--36.793001 -90.544999 -5.288100
-29.086001 22.833001 25.179001
-31.020001 21.797001 27.214000
-25.937900 20.836901 27.822001
--52.651100 -102.371104 8.847901
--60.670000 -111.819997 9.739000
--55.618100 -115.300104 12.116000
-60.736902 -80.481105 6.203900
-57.819001 -83.697997 4.328000
-52.235998 -78.541100 14.359000
-22.201000 20.534901 30.555001
-20.638900 20.899000 27.878901
-25.937900 20.836901 27.822001
-20.638900 20.899000 27.878901
-24.249000 21.576900 25.412001
-25.937900 20.836901 27.822001
-28.572900 -111.189105 44.082999
-34.276001 -121.728994 47.575999
-33.407003 -108.930096 46.041001
-39.840899 -118.918002 49.673900
-38.067002 -106.363997 47.938898
-33.407003 -108.930096 46.041001
-34.276001 -121.728994 47.575999
-39.840899 -118.918002 49.673900
-33.407003 -108.930096 46.041001
-50.265901 -112.231106 53.674899
-42.529900 -103.510104 49.772900
-45.180902 -115.747102 51.708899
-33.577900 -97.824000 40.243901
-29.538000 -99.918999 38.437899
-33.407003 -108.930096 46.041001
-109.072901 -3.198000 48.069902
-104.306899 0.790000 39.583899
-106.098898 2.505000 48.735999
--110.722996 -25.569100 -64.137101
--103.358097 -28.996099 -70.331104
--112.140998 -32.410000 -63.334003
--103.358097 -28.996099 -70.331104
--104.532994 -35.487000 -69.705099
--112.140998 -32.410000 -63.334003
--66.698998 37.011001 -56.110099
--64.941101 39.911900 -48.609100
--62.009998 38.938899 -55.242099
-0.767000 25.617000 -10.952000
-1.863000 28.402900 -11.601000
-2.604000 26.694901 -8.963999
-53.839002 -124.541998 50.979901
-50.265901 -112.231106 53.674899
-45.180902 -115.747102 51.708899
-38.067002 -106.363997 47.938898
-39.840899 -118.918002 49.673900
-45.180902 -115.747102 51.708899
-61.368000 -60.123101 45.235001
-59.699003 -63.590996 44.206999
-63.415997 -65.831102 54.512002
--24.650998 29.270001 -17.597999
--23.448000 25.718901 -18.774100
--21.618100 26.652901 -16.555099
--19.531099 23.822900 -17.938999
--18.056000 24.642000 -15.388000
--21.618100 26.652901 -16.555099
-63.834898 22.346999 29.485000
-66.444904 19.833000 29.545000
-59.611000 17.735001 29.867999
--28.368099 -137.274995 -41.824099
--22.577999 -126.198992 -43.208100
--21.465098 -139.322996 -39.395999
-66.488899 -57.870001 56.334902
-62.817998 -56.584999 46.173900
-65.084897 -61.882000 55.472001
-72.571896 -63.180096 63.631900
-66.488899 -57.870001 56.334902
-65.084897 -61.882000 55.472001
-41.665003 12.892000 44.846002
-39.519001 14.215000 42.994902
-45.060001 12.338000 39.533000
-62.817998 -56.584999 46.173900
-61.368000 -60.123101 45.235001
-65.084897 -61.882000 55.472001
-47.860999 -128.367990 48.784900
-41.602001 -131.779999 46.522900
-49.437001 -139.811993 41.088000
-54.881901 22.194900 29.065901
-57.286900 20.037999 29.510001
-53.040002 16.388001 31.475000
-34.965001 19.534901 31.100001
-32.979902 20.701000 29.187901
-37.708901 22.510000 27.908999
--104.887098 -90.940103 -52.336000
--96.234098 -90.505995 -60.034100
--101.513997 -98.075993 -50.443102
-42.026002 19.555001 30.809000
-36.966901 18.291000 32.942999
-39.875899 21.083901 29.395901
--17.819999 21.680001 -22.413999
--21.049000 23.054000 -20.465100
--22.621099 22.312000 -22.958100
--34.325100 29.399900 -23.084000
--33.794999 34.125000 -22.555999
--36.522999 33.143003 -23.656100
-44.006001 23.902001 27.915001
-42.026002 19.555001 30.809000
-39.875899 21.083901 29.395901
--35.092000 -134.755999 -44.202000
--34.966998 -146.289989 -36.071997
--42.332102 -143.302992 -38.606998
--49.126998 -148.504004 -29.489100
--49.438000 -139.811993 -41.089099
--42.332102 -143.302992 -38.606998
-84.370002 -126.829103 17.076001
-88.041902 -115.153000 9.079001
-90.055004 -120.917000 19.569900
-88.041902 -115.153000 9.079001
-92.892900 -109.269001 11.498000
-90.055004 -120.917000 19.569900
--28.368099 -137.274995 -41.824099
--35.092000 -134.755999 -44.202000
--28.510999 -124.162100 -45.417998
-92.892900 -109.269001 11.498000
-95.271006 -114.666998 21.999000
-90.055004 -120.917000 19.569900
-53.839002 -124.541998 50.979901
-47.860999 -128.367990 48.784900
-56.247003 -135.838002 43.508898
-62.721997 -131.411001 45.865003
-53.839002 -124.541998 50.979901
-56.247003 -135.838002 43.508898
-49.437001 -139.811993 41.088000
-56.589000 -144.601002 32.097001
-56.247003 -135.838002 43.508898
--68.832099 -126.556993 -48.147999
--76.833099 -129.981995 -39.562099
--74.541099 -121.312000 -50.354999
--22.577999 -126.198992 -43.208100
--28.368099 -137.274995 -41.824099
--28.510999 -124.162100 -45.417998
--34.277100 -121.728994 -47.577001
--28.573999 -111.189105 -44.084001
--28.510999 -124.162100 -45.417998
--70.951000 -67.836002 -62.675998
--63.417003 -65.831102 -54.513101
--69.000997 -72.420001 -61.612997
--98.274104 -43.145999 -18.395999
--107.749999 -48.339099 -21.716001
--97.796999 -48.505101 -16.826099
--76.900102 -80.061994 -65.086000
--79.227999 -74.727997 -66.326000
--69.000997 -72.420001 -61.612997
-19.850001 31.520002 43.428000
-17.364001 30.729000 40.827900
-21.295000 26.430901 42.978998
--79.227999 -74.727997 -66.326000
--70.951000 -67.836002 -62.675998
--69.000997 -72.420001 -61.612997
-64.820901 -115.745105 55.151001
-69.772005 -110.832103 57.112899
-59.576001 -104.259104 57.379000
-55.073000 -108.392999 55.567000
-64.820901 -115.745105 55.151001
-59.576001 -104.259104 57.379000
-61.233003 -85.482098 57.827901
-54.159001 -80.622099 49.747001
-58.032002 -89.523099 56.381002
-26.339000 27.083000 48.161898
-22.562901 32.214999 45.949001
-23.715900 26.811000 45.611002
--75.457104 28.392000 -35.765000
--71.004994 24.561999 -31.401001
--71.823999 31.097000 -35.793997
-112.833001 -82.282998 44.041000
-115.753897 -72.425105 34.873001
-115.011998 -74.731104 45.860000
-115.753897 -72.425105 34.873001
-117.295898 -65.003999 36.694001
-115.011998 -74.731104 45.860000
-118.305899 -57.592001 38.410898
-117.691003 -59.542999 49.167901
-116.628900 -67.136101 47.569901
-12.972000 37.723899 33.778898
-15.552000 38.923901 35.994899
-15.052000 41.111901 31.626999
--101.434998 7.368000 -58.328997
--104.879998 1.919000 -58.001999
--102.820002 7.880000 -49.279999
--104.879998 1.919000 -58.001999
--106.100000 2.505000 -48.737001
--102.820002 7.880000 -49.279999
--106.100000 2.505000 -48.737001
--101.402998 5.945000 -40.305998
--102.820002 7.880000 -49.279999
--101.402998 5.945000 -40.305998
--98.239996 10.800000 -40.911999
--102.820002 7.880000 -49.279999
--82.570001 -26.480000 -72.134100
--83.675101 -31.491000 -71.999997
--92.903003 -27.115000 -73.345102
-28.766001 41.932900 24.961900
-31.842999 38.527001 23.215000
-28.902000 39.007898 22.135001
--101.746105 -22.715999 -70.818096
--99.725001 -16.681001 -71.164101
--91.301098 -21.545999 -73.552102
--31.864099 30.486001 -21.691000
--31.167999 26.222000 -23.025999
--28.990000 27.298000 -21.271000
-101.745002 -22.715999 70.817001
-92.901997 -27.115000 73.344000
-103.357002 -28.996099 70.330001
-82.182899 -94.425105 62.455002
-85.448898 -88.516995 64.037003
-74.178003 -85.274100 63.740000
--13.351000 -96.199997 -6.900100
--9.614999 -99.194996 -18.584000
--17.090099 -95.358104 -8.844000
--17.090099 -95.358104 -8.844000
--13.584000 -98.457098 -20.534100
--20.774100 -94.307996 -10.770099
--66.500001 -44.484101 -38.248099
--67.135103 -40.993098 -38.973000
--70.973001 -42.146001 -29.285001
--18.444099 21.974999 -32.959998
--13.608000 24.402902 -31.792000
--16.903000 21.891002 -30.121099
--43.041099 13.989001 -38.013101
--45.061100 12.338000 -39.534099
--39.520100 14.215000 -42.995997
--43.237001 32.720000 -59.035998
--39.333999 33.215001 -57.131100
--38.674999 26.569901 -57.402998
--49.445000 -81.255995 -12.631000
--46.496000 -83.823994 -10.856000
--41.048098 -83.962999 -21.666100
--88.042997 -115.153000 -9.080000
--86.851001 -102.417000 -3.573000
--92.893995 -109.269001 -11.499000
--48.292000 -105.249099 11.062000
--44.264998 -94.900101 3.572000
--52.651100 -102.371104 8.847901
--66.004999 9.984001 -30.440999
--71.373098 14.295000 -29.410999
--73.666997 11.277000 -29.215999
--72.168998 -62.589101 -14.787000
--82.964994 -63.131101 -11.090999
--81.138998 -67.621104 -9.339000
--54.862998 -75.689100 -16.036000
--52.237000 -78.541100 -14.359999
--46.847999 -79.126999 -24.948999
-77.330001 -46.987001 20.500001
-78.065000 -43.027099 21.746000
-87.502897 -44.826999 17.402001
-88.164002 -35.717998 20.104000
-98.425001 -37.839100 19.881001
-87.962896 -40.255100 18.791901
--17.364999 30.729000 -40.828999
--15.108000 29.871000 -38.160000
--19.076999 25.975000 -40.272001
--54.444101 -149.563998 -18.232999
--49.126998 -148.504004 -29.489100
--46.609100 -153.172001 -15.502000
-8.347901 31.093901 29.895000
-9.645000 27.141999 29.801000
-11.253000 28.054001 32.638002
-15.237001 24.937000 34.671001
-17.059000 25.468901 37.500001
-13.071000 28.971002 35.428002
-56.798901 -99.247098 -6.663100
-60.729001 -95.892996 -4.507000
-65.458000 -108.042002 -7.391000
-65.151997 -15.346000 58.591899
-63.729897 -12.073000 58.095001
-63.528903 -14.403000 49.722001
--91.458097 21.899000 -50.161000
--89.531995 21.465000 -58.499999
--93.723997 17.155999 -58.577999
--95.463000 17.589001 -49.993098
--91.458097 21.899000 -50.161000
--93.723997 17.155999 -58.577999
--97.705103 12.453000 -58.520999
--95.463000 17.589001 -49.993098
--93.723997 17.155999 -58.577999
-63.729897 -12.073000 58.095001
-62.368002 -11.326999 49.325999
-63.528903 -14.403000 49.722001
-65.455005 -13.971000 41.382901
-66.275999 -17.157000 41.422002
-63.528903 -14.403000 49.722001
--32.161001 27.204001 -52.991100
--30.994000 21.746000 -48.751000
--33.631999 21.367000 -51.103100
--37.943099 -86.139999 -19.948000
--46.496000 -83.823994 -10.856000
--43.398000 -86.236097 -9.037000
--36.403999 20.825000 -53.354099
--36.215998 16.805001 -47.592998
--38.626000 15.873000 -49.700100
--28.208999 -102.822997 11.911000
--39.014000 -110.205099 15.552000
--34.132000 -112.251997 17.818000
--5.566000 28.236000 4.901000
--7.087000 28.847000 2.601900
--6.191000 26.097000 2.141000
-32.026999 33.428002 52.969001
-32.159902 27.204001 52.990001
-35.590000 33.443999 55.104900
--3.010000 36.069002 3.585000
--4.158000 36.416002 0.666000
--5.988000 34.431901 1.804000
-84.549002 -52.807998 70.150003
-74.823901 -53.755101 65.218002
-83.816998 -58.311101 69.371998
-104.475901 -62.852100 65.861002
-105.236903 -55.877998 67.015901
-94.833001 -57.397999 70.262000
-64.526998 -135.264993 -1.121100
-70.972897 -130.817994 1.498000
-71.690001 -137.475997 11.913000
--64.821996 -115.745105 -55.152100
--68.832099 -126.556993 -48.147999
--74.541099 -121.312000 -50.354999
--6.413100 24.398001 -0.916100
--4.145000 22.902001 -2.085100
--4.461000 23.940900 1.169000
-33.250902 39.090902 51.041000
-32.026999 33.428002 52.969001
-35.590000 33.443999 55.104900
-37.124000 39.187901 52.937001
-33.250902 39.090902 51.041000
-35.590000 33.443999 55.104900
-35.339002 26.995001 55.250902
-39.333001 33.215001 57.130001
-35.590000 33.443999 55.104900
-59.631001 -5.535000 48.208002
-58.596000 -3.224000 55.872001
-58.080003 -2.830000 47.486000
-32.159902 27.204001 52.990001
-35.339002 26.995001 55.250902
-35.590000 33.443999 55.104900
--88.042997 -115.153000 -9.080000
--92.893995 -109.269001 -11.499000
--90.056002 -120.917000 -19.570999
-52.532002 4.076000 52.576002
-52.859001 4.473900 44.682898
-54.680001 2.176000 45.722000
--66.400103 -18.764000 -58.972098
--67.458101 -22.320000 -59.229098
--71.458101 -18.232999 -66.763997
--88.042997 -115.153000 -9.080000
--90.056002 -120.917000 -19.570999
--84.371105 -126.829103 -17.076999
--95.272101 -114.666998 -22.000000
--93.623102 -117.786102 -33.473000
--90.056002 -120.917000 -19.570999
--93.623102 -117.786102 -33.473000
--88.196002 -124.112003 -31.100100
--90.056002 -120.917000 -19.570999
--65.376997 -20.876000 -50.186101
--66.041999 -24.254000 -50.253000
--67.458101 -22.320000 -59.229098
-72.025001 -31.390000 31.760901
-71.997002 -27.841000 32.416001
-78.860998 -27.337000 25.930000
-5.260000 36.866002 2.334000
-2.786000 37.610002 3.756000
-6.085000 37.444901 5.296900
-6.085000 37.444901 5.296900
-6.506000 38.062900 8.180000
-9.107000 37.012000 6.918000
-71.396001 -20.864999 33.458002
-78.042902 -19.747999 27.524900
-71.786001 -24.329999 32.980900
--67.458101 -22.320000 -59.229098
--66.041999 -24.254000 -50.253000
--68.310998 -25.997000 -59.367098
-0.893900 23.238001 -4.910000
-1.042000 24.325000 -8.010999
-2.900000 25.017900 -6.138100
--53.840101 -124.541998 -50.981000
--56.248099 -135.838002 -43.509997
--62.722996 -131.411001 -45.866102
--82.570001 -26.480000 -72.134100
--81.148103 -21.650000 -72.129995
--73.986098 -26.416099 -67.133099
--59.158102 1.636000 -62.500000
--61.230000 8.305000 -67.083098
--56.659099 4.171000 -61.329000
--42.013101 -153.117999 -1.045000
--46.609100 -153.172001 -15.502000
--38.507000 -156.218991 -12.735000
--94.573997 -5.459100 -71.426101
--91.508105 -0.320000 -71.337998
--84.472999 -6.327100 -73.317103
-66.800006 -31.234000 50.066002
-68.945900 -29.781999 59.383899
-66.516899 -27.712001 50.213002
-66.800006 -31.234000 50.066002
-67.736901 -27.125999 40.949002
-67.871004 -30.553000 40.596001
--54.096099 6.477000 -60.029998
--54.625999 1.817000 -53.792000
--56.659099 4.171000 -61.329000
--56.653000 -0.616000 -54.890998
--59.158102 1.636000 -62.500000
--56.659099 4.171000 -61.329000
-56.589000 -144.601002 32.097001
-49.437001 -139.811993 41.088000
-49.125899 -148.504004 29.488001
-9.923000 33.590000 3.091000
-8.362001 35.959899 4.043000
-11.109000 34.932900 5.881900
-46.608001 -153.172001 15.501000
-54.443002 -149.563998 18.232001
-49.125899 -148.504004 29.488001
-54.443002 -149.563998 18.232001
-56.589000 -144.601002 32.097001
-49.125899 -148.504004 29.488001
--0.220000 37.201900 -5.160000
-2.046000 35.707001 -6.329000
--0.826000 37.021901 -7.933101
-49.424902 23.767000 63.131899
-51.416900 30.825000 62.472902
-45.742001 24.979001 61.347000
-45.382902 18.003900 59.441000
-49.424902 23.767000 63.131899
-45.742001 24.979001 61.347000
-42.150002 25.906000 59.436001
-42.298000 19.162999 57.527002
-45.742001 24.979001 61.347000
--65.458998 -108.042002 7.389900
--60.729999 -95.892996 4.506000
--69.963999 -103.987001 5.077000
--72.572000 -117.422000 3.621000
--65.458998 -108.042002 7.389900
--69.963999 -103.987001 5.077000
--58.375001 26.853001 -29.108999
--54.883000 22.194900 -29.066999
--52.403998 24.207002 -28.541999
--82.759105 -120.727994 -6.605100
--77.059999 -125.962004 -4.074000
--77.699997 -112.709001 1.174900
--46.347100 22.218000 -28.927999
--47.265999 27.780000 -27.240999
--49.862001 26.068000 -27.931999
--12.159999 23.888001 -28.868999
--10.884000 23.413001 -25.906999
--15.507000 21.826901 -27.240001
--16.903000 21.891002 -30.121099
--15.507000 21.826901 -27.240001
--20.639999 20.899000 -27.880000
--14.245000 23.284001 -13.995000
--15.358000 22.659000 -16.827000
--11.231000 22.183999 -15.400000
--14.250000 21.805000 -24.326099
--13.122000 21.843001 -21.379000
--17.819999 21.680001 -22.413999
-0.293900 33.181898 -13.944999
--0.539000 31.614900 -16.525000
--1.494000 34.740001 -16.049000
--12.116999 21.961000 -18.404000
--13.122000 21.843001 -21.379000
--8.827000 22.652000 -19.879000
--34.812998 37.895001 -24.211999
--31.844001 38.527001 -23.216000
--31.902999 41.742001 -25.993099
-23.715900 26.811000 45.611002
-22.562901 32.214999 45.949001
-19.850001 31.520002 43.428000
--88.196002 -124.112003 -31.100100
--93.623102 -117.786102 -33.473000
--88.197000 -118.152998 -44.175997
-2.069000 33.117998 18.871000
-1.493000 34.740001 16.048001
-0.537900 31.614900 16.524000
--56.659099 4.171000 -61.329000
--61.230000 8.305000 -67.083098
--58.095101 10.802000 -65.820999
--51.492099 8.559000 -58.605000
--54.096099 6.477000 -60.029998
--54.912999 13.012000 -64.425103
--28.903000 39.007898 -22.135999
--25.695998 41.971002 -23.847099
--28.767100 41.932900 -24.962999
--75.769000 -39.724998 -66.726997
--84.441103 -36.658101 -71.733102
--75.461999 -35.177000 -66.987999
-41.200001 -92.922993 43.682899
-42.529900 -103.510104 49.772900
-46.777900 -100.378998 51.540002
-66.838898 -56.325100 24.839001
-61.984003 -58.172099 34.478001
-63.408002 -54.817099 35.546001
-55.073000 -108.392999 55.567000
-50.790001 -96.991993 53.233001
-46.777900 -100.378998 51.540002
--42.326998 -135.543004 16.329000
--35.555098 -137.906998 18.927000
--33.202998 -125.830099 21.809001
-40.791899 36.159001 25.947001
-38.339999 40.852003 27.781000
-41.622002 40.137000 28.544001
--114.822000 -35.433996 -32.933999
--114.018001 -28.879000 -34.313999
--118.262097 -35.813000 -42.909998
--27.174000 -127.527997 24.253000
--23.976998 -115.427099 22.364000
--33.202998 -125.830099 21.809001
--35.555098 -137.906998 18.927000
--27.174000 -127.527997 24.253000
--33.202998 -125.830099 21.809001
--29.112000 -113.997102 20.090001
--39.090101 -123.741001 19.368000
--33.202998 -125.830099 21.809001
--34.132000 -112.251997 17.818000
--39.014000 -110.205099 15.552000
--44.804100 -121.279001 16.936000
-40.455002 -97.217105 -5.628000
-29.704001 -94.116993 1.414000
-33.304002 -92.428103 3.364000
--60.670000 -111.819997 9.739000
--67.103997 -121.808998 6.105000
--61.319999 -125.839993 8.623000
--66.698998 37.011001 -56.110099
--67.941099 31.200001 -62.827997
--71.393996 34.699000 -56.848999
--47.153998 44.847000 -45.231998
--42.937100 45.311999 -44.113997
--43.924000 43.108001 -50.543997
--67.904003 27.145900 -31.438999
--66.445999 19.833000 -29.546000
--63.836001 22.346999 -29.486099
--66.445999 19.833000 -29.546000
--59.611998 17.735001 -29.868999
--63.836001 22.346999 -29.486099
-112.139903 -32.410000 63.332997
-103.357002 -28.996099 70.330001
-104.531899 -35.487000 69.704004
--56.848001 -77.113003 -51.070001
--55.723000 -70.263997 -41.898999
--53.424999 -73.440105 -40.624999
-68.831004 -126.556993 48.146900
-64.820901 -115.745105 55.151001
-59.500899 -120.324001 53.103998
--51.486999 44.090901 -46.243999
--47.153998 44.847000 -45.231998
--48.287999 42.562000 -51.895998
--48.287999 42.562000 -51.895998
--47.153998 44.847000 -45.231998
--43.924000 43.108001 -50.543997
-5.565000 28.236000 -4.902000
-4.537000 25.579000 -4.223100
-4.131000 27.565001 -6.981000
--45.390997 38.569000 -56.389000
--49.743101 37.800901 -57.933997
--48.287999 42.562000 -51.895998
--79.427101 -17.021000 -71.989000
--81.148103 -21.650000 -72.129995
--89.344099 -16.208099 -73.615998
-3.210000 29.589999 -9.469000
-4.131000 27.565001 -6.981000
-2.604000 26.694901 -8.963999
--83.818100 -58.311101 -69.373101
--74.824996 -53.755101 -65.219104
--73.863998 -58.477100 -64.483099
--74.863002 -30.733999 -67.124099
--83.675101 -31.491000 -71.999997
--82.570001 -26.480000 -72.134100
--84.849998 -41.951999 -71.333997
--84.890001 -47.346100 -70.805997
--95.351994 -44.929098 -71.893997
-8.222000 39.515901 18.634001
-5.809000 38.432900 16.906001
-5.525000 37.534002 20.072902
--75.772099 -44.354100 -66.344097
--75.458996 -49.036998 -65.839998
--84.890001 -47.346100 -70.805997
-112.833001 -82.282998 44.041000
-115.011998 -74.731104 45.860000
-109.971002 -76.272100 55.798899
-115.011998 -74.731104 45.860000
-111.679003 -68.833999 57.361901
-109.971002 -76.272100 55.798899
-111.679003 -68.833999 57.361901
-103.198901 -69.844104 64.580999
-109.971002 -76.272100 55.798899
-103.198901 -69.844104 64.580999
-101.401001 -76.811999 63.180000
-109.971002 -76.272100 55.798899
--88.156998 4.478000 -71.103998
--84.560998 8.916000 -70.723996
--78.531995 2.365000 -72.434999
--75.240999 6.224900 -71.776100
--78.531995 2.365000 -72.434999
--84.560998 8.916000 -70.723996
-10.133000 40.014900 23.854000
-10.737000 40.500000 20.302000
-7.755000 38.812000 21.996001
-66.003896 9.984001 30.440001
-63.978001 12.704001 30.333901
-71.372002 14.295000 29.409900
-10.737000 40.500000 20.302000
-8.222000 39.515901 18.634001
-7.755000 38.812000 21.996001
-74.021004 21.760000 31.273000
-76.933898 18.743001 31.055000
-71.372002 14.295000 29.409900
-85.559897 -14.080000 25.412001
-84.387004 -10.048999 26.215900
-93.192004 -8.185999 26.961001
-91.426998 -3.758000 27.822001
-99.775001 -2.964000 31.936999
-93.192004 -8.185999 26.961001
--29.552098 18.850001 -40.727101
--31.670101 18.274900 -43.098997
--28.504999 21.989001 -46.306998
-5.525000 37.534002 20.072902
-5.809000 38.432900 16.906001
-3.437000 36.180902 18.090000
--36.215998 16.805001 -47.592998
--33.631999 21.367000 -51.103100
--33.891998 17.600000 -45.390997
--35.349000 16.510000 -39.028000
--37.409998 15.416000 -41.056000
--33.891998 17.600000 -45.390997
-54.680001 2.176000 45.722000
-52.859001 4.473900 44.682898
-57.611000 3.148000 39.090000
--76.648101 -76.361999 -5.646000
--79.030998 -72.038099 -7.523000
--87.759100 -80.457099 -5.810000
-55.902902 5.618000 38.368899
-60.874999 6.846000 33.686001
-57.611000 3.148000 39.090000
-68.128899 33.528902 35.726003
-67.902900 27.145900 31.437900
-64.731002 29.510900 31.385902
-65.315999 -59.759997 23.538001
-61.984003 -58.172099 34.478001
-66.838898 -56.325100 24.839001
--82.464993 -107.694998 -1.224000
--82.759105 -120.727994 -6.605100
--77.699997 -112.709001 1.174900
-34.911901 45.451000 41.562900
-35.646901 43.333001 47.501899
-38.848899 45.506001 42.888902
-62.582999 4.159900 34.019999
-59.220001 0.564000 39.714999
-57.611000 3.148000 39.090000
-21.208901 43.922000 30.530000
-25.031000 43.827899 27.531000
-21.937901 43.409899 26.249999
--82.958996 29.399000 -50.127998
--85.166998 25.378000 -58.286998
--87.278001 25.836900 -50.207101
-17.509000 39.639901 17.027000
-16.930901 41.262999 19.993000
-20.297000 39.657000 18.413000
-21.684000 -160.544991 7.112900
-13.060001 -161.795005 4.276000
-17.232001 -159.070998 -7.375000
-13.060001 -161.795005 4.276000
-8.732000 -159.860998 -10.198000
-17.232001 -159.070998 -7.375000
-8.732000 -159.860998 -10.198000
-12.251001 -152.744994 -20.085000
-17.232001 -159.070998 -7.375000
-12.251001 -152.744994 -20.085000
-20.211000 -151.848093 -17.351000
-17.232001 -159.070998 -7.375000
-41.200001 -92.922993 43.682899
-42.368900 -84.741995 34.806900
-39.186999 -87.157995 33.193000
-22.944901 36.812000 17.402001
-22.016000 33.904899 15.472900
-20.267000 37.222002 15.944000
-16.930901 41.262999 19.993000
-19.774901 41.625001 21.357000
-20.297000 39.657000 18.413000
-19.548900 34.590900 13.788000
-17.593000 37.548900 14.434000
-20.267000 37.222002 15.944000
-35.861000 -89.388996 31.520002
-37.471998 -95.488995 41.993901
-39.186999 -87.157995 33.193000
-37.471998 -95.488995 41.993901
-41.200001 -92.922993 43.682899
-39.186999 -87.157995 33.193000
-61.984003 -58.172099 34.478001
-61.368000 -60.123101 45.235001
-63.408002 -54.817099 35.546001
-17.509000 39.639901 17.027000
-17.593000 37.548900 14.434000
-14.755000 39.525002 15.581001
-61.368000 -60.123101 45.235001
-62.817998 -56.584999 46.173900
-63.408002 -54.817099 35.546001
-12.020000 39.312001 14.088000
-11.463000 40.215001 17.055901
-14.755000 39.525002 15.581001
-16.103001 42.179000 23.434000
-16.930901 41.262999 19.993000
-13.362001 41.388899 21.905001
-10.737000 40.500000 20.302000
-13.362001 41.388899 21.905001
-14.163001 40.791001 18.558001
-91.300003 -21.545999 73.550999
-89.343004 -16.208099 73.614895
-81.147000 -21.650000 72.128899
-12.663000 41.139901 25.642000
-16.103001 42.179000 23.434000
-13.362001 41.388899 21.905001
-87.055899 -11.127000 73.539004
-77.430904 -12.616999 71.708903
-79.426005 -17.021000 71.987897
-77.430904 -12.616999 71.708903
-71.456999 -18.232999 66.762999
-79.426005 -17.021000 71.987897
-72.843999 -22.243099 67.013003
-73.985003 -26.416099 67.132004
-81.147000 -21.650000 72.128899
-98.540999 -111.140996 35.765901
-102.934897 -104.222998 37.976000
-97.597003 -105.022103 48.448000
-18.054999 24.642000 15.387001
-14.244000 23.284001 13.994001
-16.614901 25.537001 12.812001
-93.152903 -111.726999 46.355899
-84.651001 -109.789103 54.512002
-88.195898 -118.152998 44.174898
--18.357100 40.034901 -38.137101
--17.882001 42.199999 -33.501998
--15.553100 38.923901 -35.995997
--15.053100 41.111901 -31.628098
--12.972999 37.723899 -33.779997
--15.553100 38.923901 -35.995997
--12.972999 37.723899 -33.779997
--14.579100 34.596000 -37.632000
--15.553100 38.923901 -35.995997
--34.777999 45.616999 -35.824101
--34.959998 44.117998 -30.834001
--31.167999 45.462999 -34.639001
--34.777999 45.616999 -35.824101
--31.167999 45.462999 -34.639001
--31.140000 45.166902 -40.139001
--27.698999 45.117002 -33.361100
--31.167999 45.462999 -34.639001
--31.549998 44.195902 -29.824000
--24.129000 44.005003 -37.000999
--24.635099 41.883901 -42.163000
--27.542001 44.678003 -38.618099
--79.734102 15.508001 -30.747000
--85.781001 18.631000 -35.085000
--82.401097 12.062000 -30.347100
--62.153000 -8.959000 -57.474997
--60.436100 -6.007000 -56.735098
--61.065000 -8.370000 -48.824102
--62.874101 39.952900 -41.370999
--64.941101 39.911900 -48.609100
--67.088999 38.013000 -41.756101
--64.392999 35.693999 -35.562098
--62.874101 39.952900 -41.370999
--67.088999 38.013000 -41.756101
--81.157997 -69.303103 -67.457102
--92.483103 -70.008099 -68.125002
--82.689099 -63.819997 -68.472996
--73.666997 11.277000 -29.215999
--79.734102 15.508001 -30.747000
--75.834997 8.097000 -28.934099
--85.781001 18.631000 -35.085000
--88.960998 14.831000 -34.659099
--82.401097 12.062000 -30.347100
--87.275103 4.546000 -29.268999
--79.748102 1.271000 -28.107999
--84.918998 8.406000 -29.855000
-34.965001 19.534901 31.100001
-31.394999 18.423000 34.742001
-29.510001 19.274000 32.493901
-90.605006 -76.269999 66.875003
-92.482001 -70.008099 68.125002
-81.156902 -69.303103 67.456000
-33.340901 17.506000 36.922000
-27.544001 19.343901 38.277000
-31.394999 18.423000 34.742001
-27.544001 19.343901 38.277000
-25.649000 19.777000 35.762001
-31.394999 18.423000 34.742001
-118.261002 -35.813000 42.909000
-118.184902 -44.544000 52.013002
-118.774004 -42.957101 41.520901
--21.032000 -128.824994 26.690900
--27.174000 -127.527997 24.253000
--28.615000 -139.806002 21.531001
-118.206002 -51.999100 50.651003
-118.793897 -50.230000 40.020902
-118.774004 -42.957101 41.520901
-7.979000 -116.975002 35.762999
-2.638000 -117.573999 33.583902
-4.077000 -129.852995 36.304999
--21.545999 -141.227990 24.135001
--14.384000 -142.159000 26.731001
--14.804000 -129.712999 29.121900
--28.615000 -139.806002 21.531001
--21.545999 -141.227990 24.135001
--21.032000 -128.824994 26.690900
--33.631999 21.367000 -51.103100
--36.215998 16.805001 -47.592998
--36.403999 20.825000 -53.354099
--38.626000 15.873000 -49.700100
--39.299000 20.097001 -55.498101
--36.403999 20.825000 -53.354099
--51.716000 14.942001 -62.894098
--48.531000 16.603000 -61.230000
--48.868999 10.420000 -57.055999
--35.340101 26.995001 -55.252001
--33.631999 21.367000 -51.103100
--36.403999 20.825000 -53.354099
-18.443001 21.974999 32.958899
-13.607000 24.402902 31.791002
-16.902000 21.891002 30.120000
-12.159000 23.888001 28.868001
-15.505901 21.826901 27.239000
-16.902000 21.891002 30.120000
-15.505901 21.826901 27.239000
-20.638900 20.899000 27.878901
-16.902000 21.891002 30.120000
-22.201000 20.534901 30.555001
-18.443001 21.974999 32.958899
-16.902000 21.891002 30.120000
-82.456000 22.159001 35.409901
-87.494001 23.468001 42.057898
-85.779898 18.631000 35.083901
--64.637102 -51.409099 -36.533099
--62.819101 -56.584999 -46.174999
--64.048000 -52.995998 -47.023997
--62.819101 -56.584999 -46.174999
--66.489995 -57.870001 -56.335997
--64.048000 -52.995998 -47.023997
--65.055996 -49.369998 -47.778998
--64.048000 -52.995998 -47.023997
--67.625999 -53.819999 -57.098001
--54.548100 -93.365997 -54.848999
--48.099000 -87.151103 -46.861999
--50.791100 -96.991993 -53.234100
--11.182999 26.186001 -5.416000
--8.676000 25.106002 -3.143000
--10.094000 27.714999 -2.605100
-73.987901 -80.572002 3.713000
-81.632003 -90.416998 1.608000
-71.059898 -84.652096 1.728000
--12.233000 29.075000 -5.071100
--14.245000 30.836901 -7.470000
--13.751999 27.704000 -7.633000
--97.045995 -22.437999 -23.826100
--96.016996 -17.539000 -24.962001
--105.259106 -18.750001 -28.836999
-23.715900 26.811000 45.611002
-21.295000 26.430901 42.978998
-23.996001 22.156000 41.168898
-55.722002 -70.263997 41.897900
-57.813901 -66.976994 43.094002
-58.556899 -64.669997 32.105900
--34.966998 -146.289989 -36.071997
--33.369999 -154.684991 -24.128100
--41.374099 -151.871994 -26.830001
--8.823000 39.533999 -15.502000
--5.810000 38.432900 -16.906999
--8.223000 39.515901 -18.635100
--48.292998 14.293000 -34.570001
--50.873101 18.461000 -30.709000
--53.041101 16.388001 -31.475998
--63.836001 22.346999 -29.486099
--59.611998 17.735001 -29.868999
--57.287998 20.037999 -29.510999
--54.883000 22.194900 -29.066999
--58.375001 26.853001 -29.108999
--61.141998 24.687000 -29.340100
--89.897104 14.109001 -65.859102
--80.755994 12.984000 -70.197001
--84.560998 8.916000 -70.723996
-72.865896 -2.162000 30.010000
-68.166003 -7.650100 34.463000
-66.972904 -4.547000 34.486901
--12.207000 32.145903 -5.236100
--14.245000 30.836901 -7.470000
--12.233000 29.075000 -5.071100
--21.358998 -96.300103 -24.350999
--17.503999 -97.488999 -22.458099
--16.698999 -104.667000 -32.727100
-39.186999 -87.157995 33.193000
-42.368900 -84.741995 34.806900
-44.019002 -81.623100 23.333000
-8.222000 39.515901 18.634001
-8.821900 39.533999 15.501000
-5.809000 38.432900 16.906001
--79.734102 15.508001 -30.747000
--73.666997 11.277000 -29.215999
--76.935001 18.743001 -31.056000
--82.457103 22.159001 -35.411000
--79.734102 15.508001 -30.747000
--76.935001 18.743001 -31.056000
--74.022099 21.760000 -31.274099
--79.008102 25.413001 -35.638999
--76.935001 18.743001 -31.056000
--55.723000 -70.263997 -41.898999
--56.564998 -67.790098 -30.810000
--53.424999 -73.440105 -40.624999
--79.008102 25.413001 -35.638999
--82.457103 22.159001 -35.411000
--76.935001 18.743001 -31.056000
--13.195000 24.041001 -11.143000
--12.188000 24.986001 -8.278000
--15.193000 26.541000 -10.222999
--9.219000 23.919001 -6.218000
--11.182999 26.186001 -5.416000
--12.188000 24.986001 -8.278000
--4.402000 30.489901 7.314000
--3.211000 29.589999 9.468000
--2.774000 32.568999 9.449000
--4.487000 23.291901 -14.962000
--2.158000 25.420001 -15.937999
--1.560000 24.427000 -12.971000
-0.824900 37.021901 7.932000
--2.047000 35.707001 6.328000
--1.356000 35.179999 8.909000
--97.599000 -85.304096 -10.273000
--90.304099 -75.281002 -7.821100
--100.348003 -79.286106 -12.374000
--92.499100 -70.012100 -9.765999
--102.669999 -73.166996 -14.403000
--100.348003 -79.286106 -12.374000
--107.636102 -83.442099 -20.490998
--104.670994 -90.165101 -18.354999
--100.348003 -79.286106 -12.374000
--94.343103 -64.672999 -11.640999
--104.570001 -66.981100 -16.355000
--102.669999 -73.166996 -14.403000
-107.898004 -94.297998 28.826000
-111.055002 -87.114997 30.936001
-106.789999 -97.075999 40.095001
--28.573999 -111.189105 -44.084001
--25.365001 -101.764001 -36.581099
--23.590999 -113.133103 -42.074099
--55.074099 -108.392999 -55.568099
--50.267000 -112.231106 -53.675998
--59.501998 -120.324001 -53.105000
--64.821996 -115.745105 -55.152100
--59.576999 -104.259104 -57.380099
--55.074099 -108.392999 -55.568099
--28.510999 -124.162100 -45.417998
--28.573999 -111.189105 -44.084001
--23.590999 -113.133103 -42.074099
--39.014000 -110.205099 15.552000
--32.415099 -101.190105 9.800000
--43.741100 -107.864000 13.298000
--18.482100 -114.749998 -40.013101
--22.577999 -126.198992 -43.208100
--23.590999 -113.133103 -42.074099
--22.577999 -126.198992 -43.208100
--28.510999 -124.162100 -45.417998
--23.590999 -113.133103 -42.074099
--74.863002 -30.733999 -67.124099
--82.570001 -26.480000 -72.134100
--73.986098 -26.416099 -67.133099
-57.286900 20.037999 29.510001
-54.881901 22.194900 29.065901
-61.140899 24.687000 29.339001
--68.310998 -25.997000 -59.367098
--73.986098 -26.416099 -67.133099
--72.845101 -22.243099 -67.014001
--77.431999 -12.616999 -71.709998
--69.846101 -14.403000 -66.383101
--71.458101 -18.232999 -66.763997
--57.752997 -139.272988 3.773000
--50.682999 -142.811999 6.453900
--55.242099 -129.489005 11.170000
-52.402902 24.207002 28.541001
-55.541001 28.840901 28.795000
-58.373999 26.853001 29.107900
--28.208999 -102.822997 11.911000
--18.368099 -97.961999 4.552000
--22.226000 -96.890002 2.549000
-43.659899 13.520001 53.602003
-43.839000 11.435000 46.601001
-46.027001 9.835000 48.255000
--117.296994 -65.003999 -36.695000
--113.581099 -62.765002 -26.389999
--114.588998 -55.833999 -28.174000
--48.902098 -132.729992 13.741001
--50.320998 -118.459001 14.515000
--55.242099 -129.489005 11.170000
-78.472003 -100.137100 60.770001
-84.651001 -109.789103 54.512002
-89.008003 -103.585996 56.451000
-84.651001 -109.789103 54.512002
-93.152903 -111.726999 46.355899
-89.008003 -103.585996 56.451000
-71.003899 24.561999 31.399902
-74.021004 21.760000 31.273000
-68.960898 17.148999 29.520001
-43.839000 11.435000 46.601001
-47.062002 10.564900 40.964998
-49.036898 8.666000 42.303000
-11.229901 22.183999 15.399001
-12.116000 21.961000 18.402901
-8.034000 22.405000 16.812000
-12.116000 21.961000 18.402901
-16.547000 22.135001 19.631900
-13.121000 21.843001 21.377999
-19.180000 21.274000 25.163000
-14.250000 21.805000 24.325000
-17.819000 21.680001 22.413000
-11.229901 22.183999 15.399001
-15.357001 22.659000 16.826000
-12.116000 21.961000 18.402901
--96.016996 -17.539000 -24.962001
--97.045995 -22.437999 -23.826100
--87.288104 -22.473000 -23.542998
-82.569003 -26.480000 72.133005
-91.300003 -21.545999 73.550999
-81.147000 -21.650000 72.128899
-89.343004 -16.208099 73.614895
-79.426005 -17.021000 71.987897
-81.147000 -21.650000 72.128899
-79.426005 -17.021000 71.987897
-72.843999 -22.243099 67.013003
-81.147000 -21.650000 72.128899
-71.372002 14.295000 29.409900
-63.978001 12.704001 30.333901
-68.960898 17.148999 29.520001
-73.985003 -26.416099 67.132004
-82.569003 -26.480000 72.133005
-81.147000 -21.650000 72.128899
-93.152903 -111.726999 46.355899
-98.540999 -111.140996 35.765901
-97.597003 -105.022103 48.448000
-102.934897 -104.222998 37.976000
-101.512998 -98.075993 50.442003
-97.597003 -105.022103 48.448000
-89.008003 -103.585996 56.451000
-93.152903 -111.726999 46.355899
-97.597003 -105.022103 48.448000
-101.512998 -98.075993 50.442003
-92.873000 -97.144999 58.292899
-97.597003 -105.022103 48.448000
-92.873000 -97.144999 58.292899
-89.008003 -103.585996 56.451000
-97.597003 -105.022103 48.448000
-63.978001 12.704001 30.333901
-61.844002 15.288901 30.142900
-68.960898 17.148999 29.520001
--64.941101 39.911900 -48.609100
--66.698998 37.011001 -56.110099
--69.492996 37.833001 -49.167000
-61.844002 15.288901 30.142900
-66.444904 19.833000 29.545000
-68.960898 17.148999 29.520001
--16.931999 41.262999 -19.994000
--17.510099 39.639901 -17.028000
--14.164000 40.791001 -18.559100
--115.106098 -23.130000 -55.359099
--110.722996 -25.569100 -64.137101
--116.614997 -30.073000 -54.369997
--117.650099 -37.223000 -53.255100
--117.275104 -28.833099 -44.181000
--116.614997 -30.073000 -54.369997
--117.275104 -28.833099 -44.181000
--115.836002 -22.052100 -45.334000
--116.614997 -30.073000 -54.369997
--115.836002 -22.052100 -45.334000
--115.106098 -23.130000 -55.359099
--116.614997 -30.073000 -54.369997
--112.140998 -32.410000 -63.334003
--117.650099 -37.223000 -53.255100
--116.614997 -30.073000 -54.369997
-34.324002 29.399900 23.083000
-36.521900 33.143003 23.655001
-36.776002 28.204901 24.405001
--110.722996 -25.569100 -64.137101
--112.140998 -32.410000 -63.334003
--116.614997 -30.073000 -54.369997
-118.793897 -50.230000 40.020902
-118.206002 -51.999100 50.651003
-117.691003 -59.542999 49.167901
-36.521900 33.143003 23.655001
-39.243001 32.019999 24.673000
-36.776002 28.204901 24.405001
--113.972999 -15.499000 -46.369001
--115.836002 -22.052100 -45.334000
--111.200996 -16.314000 -36.752999
-39.243001 32.019999 24.673000
-39.213002 26.892900 25.652001
-36.776002 28.204901 24.405001
--76.779000 16.670000 -69.525100
--80.755994 12.984000 -70.197001
--85.776098 18.333901 -65.536104
--103.723995 -13.285000 -29.972099
--109.235100 -10.358000 -37.807997
--111.200996 -16.314000 -36.752999
--88.156998 4.478000 -71.103998
--91.508105 -0.320000 -71.337998
--97.462997 4.488900 -66.074997
--109.235100 -10.358000 -37.807997
--113.972999 -15.499000 -46.369001
--111.200996 -16.314000 -36.752999
--93.805999 9.491000 -66.039100
--89.897104 14.109001 -65.859102
--84.560998 8.916000 -70.723996
-31.394999 18.423000 34.742001
-25.649000 19.777000 35.762001
-29.510001 19.274000 32.493901
-32.979902 20.701000 29.187901
-34.965001 19.534901 31.100001
-29.510001 19.274000 32.493901
--18.368099 -97.961999 4.552000
--13.351000 -96.199997 -6.900100
--22.226000 -96.890002 2.549000
-67.869000 -88.578105 -0.308000
-60.736902 -80.481105 6.203900
-71.059898 -84.652096 1.728000
--0.539000 31.614900 -16.525000
--1.912000 29.711001 -19.131999
--2.070000 33.117998 -18.872000
--0.539000 31.614900 -16.525000
--2.070000 33.117998 -18.872000
--1.494000 34.740001 -16.049000
--0.773100 28.343000 -16.486999
--1.912000 29.711001 -19.131999
--0.539000 31.614900 -16.525000
--0.539000 31.614900 -16.525000
-0.293900 33.181898 -13.944999
-0.787000 30.048000 -14.110000
-0.293900 33.181898 -13.944999
-1.889000 31.475000 -11.766000
-0.787000 30.048000 -14.110000
--13.351000 -96.199997 -6.900100
--17.090099 -95.358104 -8.844000
--22.226000 -96.890002 2.549000
-46.494901 -83.823994 10.854901
-37.942000 -86.139999 19.947000
-41.046999 -83.962999 21.665001
-49.444001 -81.255995 12.630000
-46.494901 -83.823994 10.854901
-41.046999 -83.962999 21.665001
-61.140899 24.687000 29.339001
-58.373999 26.853001 29.107900
-61.500002 31.659901 31.246001
-63.834898 22.346999 29.485000
-57.286900 20.037999 29.510001
-61.140899 24.687000 29.339001
-63.834898 22.346999 29.485000
-61.140899 24.687000 29.339001
-64.731002 29.510900 31.385902
-7.264900 35.084900 1.105900
-5.986900 34.431901 -1.805000
-4.157000 36.416002 -0.667000
-54.881901 22.194900 29.065901
-58.373999 26.853001 29.107900
-61.140899 24.687000 29.339001
-5.986900 34.431901 -1.805000
-4.737900 33.914000 -4.558100
-3.009000 36.069002 -3.586000
-8.362001 35.959899 4.043000
-6.085000 37.444901 5.296900
-9.107000 37.012000 6.918000
-4.737900 33.914000 -4.558100
-2.046000 35.707001 -6.329000
-3.009000 36.069002 -3.586000
-2.046000 35.707001 -6.329000
--0.220000 37.201900 -5.160000
-3.009000 36.069002 -3.586000
--0.220000 37.201900 -5.160000
-0.712000 37.300900 -2.251000
-3.009000 36.069002 -3.586000
--25.137000 -94.889000 -26.208099
--25.365001 -101.764001 -36.581099
--28.822999 -93.263097 -28.024999
--25.365001 -101.764001 -36.581099
--29.539000 -99.918999 -38.438998
--28.822999 -93.263097 -28.024999
--35.349000 16.510000 -39.028000
--38.987000 16.958000 -34.713101
--41.014001 15.527001 -36.403000
--11.745000 -152.037993 -28.208099
--8.336100 -159.606993 -15.827000
--16.805099 -158.565998 -18.618999
--44.151101 17.916000 -32.145999
--46.243098 16.163001 -33.398997
--41.014001 15.527001 -36.403000
--69.700994 4.155000 -30.397000
--77.864997 4.761000 -28.563999
--71.353994 1.054000 -30.246999
--71.998097 -27.841000 -32.416999
--71.787104 -24.329999 -32.981999
--78.550100 -23.511998 -26.771000
--79.227999 -74.727997 -66.326000
--88.261098 -82.454100 -65.513097
--90.606101 -76.269999 -66.876002
--92.483103 -70.008099 -68.125002
--81.157997 -69.303103 -67.457102
--90.606101 -76.269999 -66.876002
--81.157997 -69.303103 -67.457102
--79.227999 -74.727997 -66.326000
--90.606101 -76.269999 -66.876002
--88.261098 -82.454100 -65.513097
--99.079102 -83.713993 -61.662998
--90.606101 -76.269999 -66.876002
--99.079102 -83.713993 -61.662998
--101.402096 -76.811999 -63.180998
--90.606101 -76.269999 -66.876002
-89.896001 14.109001 65.857999
-93.805000 9.491000 66.038005
-93.722902 17.155999 58.576901
-93.805000 9.491000 66.038005
-97.704001 12.453000 58.520000
-93.722902 17.155999 58.576901
-97.704001 12.453000 58.520000
-95.461898 17.589001 49.991999
-93.722902 17.155999 58.576901
-95.461898 17.589001 49.991999
-91.457002 21.899000 50.159901
-93.722902 17.155999 58.576901
--71.998097 -27.841000 -32.416999
--78.550100 -23.511998 -26.771000
--78.861997 -27.337000 -25.930999
-50.376900 43.977000 39.595999
-49.368899 41.777000 33.948001
-46.330001 44.756901 38.799901
-93.889900 -63.703999 69.253899
-82.688004 -63.819997 68.471998
-92.482001 -70.008099 68.125002
--3.491000 37.240002 -15.129000
--1.267000 35.901003 -13.301000
--1.494000 34.740001 -16.049000
--49.526099 -76.486096 -26.508000
--52.042000 -73.708996 -28.007001
--57.319101 -72.709002 -17.659999
-42.369898 45.279898 37.904900
-42.936001 45.311999 44.112898
-46.330001 44.756901 38.799901
--79.427101 -17.021000 -71.989000
--71.458101 -18.232999 -66.763997
--72.845101 -22.243099 -67.014001
--112.140998 -32.410000 -63.334003
--104.532994 -35.487000 -69.705099
--113.082103 -39.451100 -62.396001
--118.185997 -44.544000 -52.014001
--117.650099 -37.223000 -53.255100
--113.082103 -39.451100 -62.396001
--117.650099 -37.223000 -53.255100
--112.140998 -32.410000 -63.334003
--113.082103 -39.451100 -62.396001
--68.310998 -25.997000 -59.367098
--68.947002 -29.781999 -59.384998
--73.986098 -26.416099 -67.133099
-24.128001 44.005003 37.000000
-24.377001 44.597000 31.989001
-20.905999 43.172002 35.293899
--67.458101 -22.320000 -59.229098
--68.310998 -25.997000 -59.367098
--72.845101 -22.243099 -67.014001
--6.413100 24.398001 -0.916100
--8.676000 25.106002 -3.143000
--6.494000 23.263000 -4.123100
--6.639000 22.620000 -7.356000
--3.882000 22.468001 -5.391000
--6.494000 23.263000 -4.123100
-20.905999 43.172002 35.293899
-21.384001 41.029900 40.192999
-24.128001 44.005003 37.000000
-21.208901 43.922000 30.530000
-17.881000 42.199999 33.500899
-20.905999 43.172002 35.293899
-70.069000 -0.909000 70.028901
-66.027001 -7.336000 65.223902
-72.724901 -4.547000 70.730999
-69.300003 -49.298998 27.218001
-77.330001 -46.987001 20.500001
-76.375000 -50.937999 19.180000
-64.198896 25.429999 66.632003
-56.956999 20.423900 66.303998
-60.742002 18.267000 67.681901
-50.319899 -118.459001 -14.516000
-48.291001 -105.249099 -11.063000
-55.617001 -115.300104 -12.116999
--94.949998 -38.839098 -72.513998
--95.351994 -44.929098 -71.893997
--105.250999 -42.156000 -68.942100
--76.833099 -129.981995 -39.562099
--68.832099 -126.556993 -48.147999
--70.478998 -135.309994 -37.138999
--68.832099 -126.556993 -48.147999
--62.722996 -131.411001 -45.866102
--70.478998 -135.309994 -37.138999
--9.924000 33.590000 -3.092100
--10.531999 30.694000 -2.586000
--8.497000 32.539003 -0.262000
-118.261002 -35.813000 42.909000
-117.274001 -28.833099 44.180002
-117.649004 -37.223000 53.254001
-118.184902 -44.544000 52.013002
-118.261002 -35.813000 42.909000
-117.649004 -37.223000 53.254001
-67.902900 27.145900 31.437900
-63.834898 22.346999 29.485000
-64.731002 29.510900 31.385902
--5.526100 37.534002 -20.073999
--3.438000 36.180902 -18.090999
--3.780000 34.569900 -21.157000
-47.264900 27.780000 27.239900
-46.769001 33.754002 27.340900
-49.729001 32.290999 27.909901
--11.109999 34.932900 -5.883000
--9.924000 33.590000 -3.092100
--8.363000 35.959899 -4.044100
--112.087995 -69.703102 -24.511999
--106.044002 -60.759000 -18.226000
--113.581099 -62.765002 -26.389999
--6.521000 38.555000 -11.023000
--9.285000 38.998000 -12.563000
--9.414000 38.090002 -9.734999
-71.071900 -90.329103 62.291000
-78.472003 -100.137100 60.770001
-82.182899 -94.425105 62.455002
--93.153998 -111.726999 -46.356998
--93.623102 -117.786102 -33.473000
--98.541997 -111.140996 -35.766996
--5.261100 36.866002 -2.335100
--8.363000 35.959899 -4.044100
--7.266000 35.084900 -1.107000
--65.641001 -1.542100 -34.423098
--69.700994 4.155000 -30.397000
--71.353994 1.054000 -30.246999
-10.531000 30.694000 2.585000
-9.923000 33.590000 3.091000
-12.206000 32.145903 5.235000
-10.531000 30.694000 2.585000
-12.206000 32.145903 5.235000
-12.232000 29.075000 5.070000
--82.689099 -63.819997 -68.472996
--92.483103 -70.008099 -68.125002
--93.891002 -63.703999 -69.254994
--92.483103 -70.008099 -68.125002
--103.199996 -69.844104 -64.582102
--93.891002 -63.703999 -69.254994
--103.199996 -69.844104 -64.582102
--104.476996 -62.852100 -65.862000
--93.891002 -63.703999 -69.254994
-111.708000 -9.207000 47.278900
-113.148004 -16.431000 56.215901
-113.972001 -15.499000 46.367999
-113.148004 -16.431000 56.215901
-115.105003 -23.130000 55.358000
-113.972001 -15.499000 46.367999
-115.105003 -23.130000 55.358000
-115.834899 -22.052100 45.333002
-113.972001 -15.499000 46.367999
-109.233998 -10.358000 37.806898
-111.708000 -9.207000 47.278900
-113.972001 -15.499000 46.367999
--58.668997 41.587003 -40.883001
--56.862999 39.236899 -34.945000
--54.498099 42.923000 -40.291101
--53.105000 40.630002 -34.493998
--50.377999 43.977000 -39.597098
--54.498099 42.923000 -40.291101
-93.192004 -8.185999 26.961001
-101.888001 -8.016000 31.003900
-94.725899 -12.783000 26.006000
--60.632002 37.596002 -35.299998
--56.862999 39.236899 -34.945000
--58.668997 41.587003 -40.883001
-85.559897 -14.080000 25.412001
-93.192004 -8.185999 26.961001
-94.725899 -12.783000 26.006000
--93.805999 9.491000 -66.039100
--93.723997 17.155999 -58.577999
--89.897104 14.109001 -65.859102
-101.888001 -8.016000 31.003900
-103.722900 -13.285000 29.971000
-94.725899 -12.783000 26.006000
--67.818098 -34.015000 -40.149000
--66.749103 -38.430098 -49.458098
--66.878997 -34.812998 -49.814001
-75.239897 6.224900 71.775004
-70.069000 -0.909000 70.028901
-78.530900 2.365000 72.433896
--58.095101 10.802000 -65.820999
--60.743101 18.267000 -67.682996
--54.912999 13.012000 -64.425103
-70.069000 -0.909000 70.028901
-72.724901 -4.547000 70.730999
-78.530900 2.365000 72.433896
--17.594000 37.548900 -14.435099
--14.913999 37.804998 -12.883999
--14.756000 39.525002 -15.582000
--51.716000 14.942001 -62.894098
--51.492099 8.559000 -58.605000
--54.912999 13.012000 -64.425103
--66.839993 -56.325100 -24.840100
--61.985102 -58.172099 -34.479100
--63.409097 -54.817099 -35.547100
--54.096099 6.477000 -60.029998
--58.095101 10.802000 -65.820999
--54.912999 13.012000 -64.425103
--61.985102 -58.172099 -34.479100
--61.368998 -60.123101 -45.236100
--63.409097 -54.817099 -35.547100
--81.478998 22.159001 -65.070003
--76.779000 16.670000 -69.525100
--85.776098 18.333901 -65.536104
--77.051103 25.576901 -64.462997
--72.668999 19.975001 -68.705104
--81.478998 22.159001 -65.070003
-77.050000 25.576901 64.461902
-72.667897 19.975001 68.704002
-81.477895 22.159001 65.068997
--85.166998 25.378000 -58.286998
--80.664098 28.885901 -57.939999
--81.478998 22.159001 -65.070003
--80.664098 28.885901 -57.939999
--77.051103 25.576901 -64.462997
--81.478998 22.159001 -65.070003
--15.913999 32.937001 -9.785000
--17.062999 35.237901 -12.069999
--18.143000 32.005999 -11.770099
-76.058902 31.993002 57.458900
-72.524004 28.589999 63.715003
-77.050000 25.576901 64.461902
-68.462901 22.892900 67.738898
-72.667897 19.975001 68.704002
-77.050000 25.576901 64.461902
--19.549999 34.590900 -13.789000
--20.326100 31.100001 -13.742000
--18.143000 32.005999 -11.770099
-57.318002 -72.709002 17.659001
-63.451901 -77.124096 8.031000
-54.861899 -75.689100 16.034901
-49.525000 -76.486096 26.506901
-57.318002 -72.709002 17.659001
-54.861899 -75.689100 16.034901
-52.235998 -78.541100 14.359000
-46.847001 -79.126999 24.947900
-54.861899 -75.689100 16.034901
-60.736902 -80.481105 6.203900
-52.235998 -78.541100 14.359000
-54.861899 -75.689100 16.034901
-46.847001 -79.126999 24.947900
-49.525000 -76.486096 26.506901
-54.861899 -75.689100 16.034901
-4.040900 22.797002 11.843001
-7.401000 22.284001 13.706001
-4.486000 23.291901 14.961001
-4.040900 22.797002 11.843001
-4.486000 23.291901 14.961001
-1.559000 24.427000 12.970001
-8.826001 22.652000 19.878000
-5.138900 23.913000 18.017000
-8.034000 22.405000 16.812000
--66.839993 -56.325100 -24.840100
--63.409097 -54.817099 -35.547100
--68.167999 -52.834000 -26.067000
-56.861900 39.236899 34.944002
-54.497000 42.923000 40.290002
-58.667902 41.587003 40.881902
-91.972001 10.765000 34.130000
-98.238900 10.800000 40.910900
-94.792902 6.438000 33.500001
--75.196996 -54.862998 -17.786000
--66.839993 -56.325100 -24.840100
--68.167999 -52.834000 -26.067000
--63.409097 -54.817099 -35.547100
--64.637102 -51.409099 -36.533099
--68.167999 -52.834000 -26.067000
--10.458999 22.547001 -12.367000
--14.245000 23.284001 -13.995000
--11.231000 22.183999 -15.400000
--64.637102 -51.409099 -36.533099
--69.301099 -49.298998 -27.218999
--68.167999 -52.834000 -26.067000
--51.716000 14.942001 -62.894098
--53.174000 22.253901 -64.787105
--48.531000 16.603000 -61.230000
--10.330000 -129.052997 -38.646001
--4.078100 -129.852995 -36.306001
--7.276100 -141.955987 -34.417998
--82.689099 -63.819997 -68.472996
--93.891002 -63.703999 -69.254994
--83.818100 -58.311101 -69.373101
--49.425997 23.767000 -63.133001
--45.383997 18.003900 -59.442099
--48.531000 16.603000 -61.230000
--48.292000 -105.249099 11.062000
--52.651100 -102.371104 8.847901
--55.618100 -115.300104 12.116000
-104.475901 -62.852100 65.861002
-94.833001 -57.397999 70.262000
-93.889900 -63.703999 69.253899
-103.198901 -69.844104 64.580999
-104.475901 -62.852100 65.861002
-93.889900 -63.703999 69.253899
--55.242099 -129.489005 11.170000
--50.320998 -118.459001 14.515000
--55.618100 -115.300104 12.116000
--50.320998 -118.459001 14.515000
--48.292000 -105.249099 11.062000
--55.618100 -115.300104 12.116000
-8.347901 31.093901 29.895000
-10.203000 32.285899 32.534000
-8.467000 35.143003 29.138001
--64.528003 -135.264993 1.120000
--57.752997 -139.272988 3.773000
--61.319999 -125.839993 8.623000
-8.520001 -130.182996 -31.541098
-8.100000 -117.737003 -29.146999
-14.803001 -129.712999 -29.122999
-14.383000 -142.159000 -26.732100
-8.520001 -130.182996 -31.541098
-14.803001 -129.712999 -29.122999
-13.446900 -117.304102 -26.899099
-21.031000 -128.824994 -26.691999
-14.803001 -129.712999 -29.122999
-34.911901 45.451000 41.562900
-38.848899 45.506001 42.888902
-38.513903 45.561999 36.911901
--75.461000 33.179000 -42.202998
--74.036099 35.394002 -49.606998
--78.534000 32.583002 -49.929101
--52.042000 -73.708996 -28.007001
--50.933000 -76.486997 -39.274000
--54.389998 -70.805997 -29.441999
--110.769995 -10.004000 -56.945000
--103.877001 -6.591100 -65.722100
--106.561996 -12.629000 -65.333098
--53.424999 -73.440105 -40.624999
--56.564998 -67.790098 -30.810000
--54.389998 -70.805997 -29.441999
--50.933000 -76.486997 -39.274000
--53.424999 -73.440105 -40.624999
--54.389998 -70.805997 -29.441999
--54.862998 -75.689100 -16.036000
--49.526099 -76.486096 -26.508000
--57.319101 -72.709002 -17.659999
--52.042000 -73.708996 -28.007001
--54.389998 -70.805997 -29.441999
--59.597101 -69.614999 -19.225100
--45.674998 42.688899 -33.308998
--46.331100 44.756901 -38.801000
--49.369998 41.777000 -33.949099
-15.552000 38.923901 35.994899
-17.881000 42.199999 33.500899
-15.052000 41.111901 31.626999
-48.638001 20.402901 29.857900
-52.402902 24.207002 28.541001
-50.872002 18.461000 30.708000
-41.175898 39.021902 54.722000
-39.333001 33.215001 57.130001
-43.235999 32.720000 59.034899
-68.494007 -49.749099 57.754003
-74.823901 -53.755101 65.218002
-75.457998 -49.036998 65.838896
-39.875899 21.083901 29.395901
-34.965001 19.534901 31.100001
-37.708901 22.510000 27.908999
-25.638001 36.310002 18.798001
-28.347000 35.700999 20.125000
-26.934000 32.358002 18.701900
-24.649901 29.270001 17.597001
-24.475001 33.165999 17.114900
-26.934000 32.358002 18.701900
-28.347000 35.700999 20.125000
-29.398000 31.468000 20.229001
-26.934000 32.358002 18.701900
-10.524000 -106.820002 -20.393999
-5.967900 -107.152097 -22.503100
-2.450000 -100.036100 -12.615000
--41.666098 12.892000 -44.847101
--38.626000 15.873000 -49.700100
--39.520100 14.215000 -42.995997
--37.409998 15.416000 -41.056000
--43.041099 13.989001 -38.013101
--39.520100 14.215000 -42.995997
--36.215998 16.805001 -47.592998
--37.409998 15.416000 -41.056000
--39.520100 14.215000 -42.995997
--31.167999 26.222000 -23.025999
--34.325100 29.399900 -23.084000
--33.349998 25.072001 -24.720000
-62.368002 -11.326999 49.325999
-63.729897 -12.073000 58.095001
-62.152002 -8.959000 57.473902
--59.221100 0.564000 -39.715998
--56.424998 -0.260000 -46.659101
--54.680999 2.176000 -45.722999
--59.058998 9.413901 -33.264000
--60.876001 6.846000 -33.687100
--55.904001 5.618000 -38.369998
--6.532100 33.798900 -26.722999
--4.796100 32.441001 -24.247998
--6.707000 29.902902 -27.205000
--50.791100 -96.991993 -53.234100
--44.748101 -90.139002 -45.306999
--46.778999 -100.378998 -51.541101
--48.099000 -87.151103 -46.861999
--44.748101 -90.139002 -45.306999
--50.791100 -96.991993 -53.234100
--1.912000 29.711001 -19.131999
--4.031100 27.583901 -21.673100
--3.257000 31.076001 -21.718999
-88.110998 -31.233000 21.333000
-97.800002 -27.465999 22.599000
-98.263003 -32.605000 21.284001
--2.070000 33.117998 -18.872000
--1.912000 29.711001 -19.131999
--3.257000 31.076001 -21.718999
-3.490000 37.240002 15.128001
-1.266000 35.901003 13.300000
-1.493000 34.740001 16.048001
-0.537900 31.614900 16.524000
--0.295000 33.181898 13.944000
--0.788000 30.048000 14.109001
--14.913999 37.804998 -12.883999
--12.200000 37.987899 -11.311000
--12.021000 39.312001 -14.088999
--55.542000 28.840901 -28.796000
--58.375001 26.853001 -29.108999
--52.403998 24.207002 -28.541999
--54.883000 22.194900 -29.066999
--50.873101 18.461000 -30.709000
--52.403998 24.207002 -28.541999
--49.862001 26.068000 -27.931999
--52.403998 24.207002 -28.541999
--48.638999 20.402901 -29.858999
--59.058998 9.413901 -33.264000
--54.110099 7.967000 -37.556000
--57.141997 11.864000 -32.755099
-39.519001 14.215000 42.994902
-43.040000 13.989001 38.012002
-45.060001 12.338000 39.533000
--55.132002 14.189000 -32.158099
--59.611998 17.735001 -29.868999
--57.141997 11.864000 -32.755099
--85.783996 -54.010000 -14.393000
--96.987002 -53.895999 -15.174000
--95.836997 -59.292000 -13.444999
--71.004994 24.561999 -31.401001
--67.904003 27.145900 -31.438999
--71.823999 31.097000 -35.793997
-10.203000 32.285899 32.534000
-10.612001 36.457002 31.493001
-8.467000 35.143003 29.138001
-4.795000 32.441001 24.246901
-6.531000 33.798900 26.722001
-5.668000 35.980899 23.381900
-10.612001 36.457002 31.493001
-9.982000 38.671002 27.645001
-8.467000 35.143003 29.138001
-29.704001 -94.116993 1.414000
-26.009001 -95.608100 -0.559100
-20.773001 -94.307996 10.769000
-50.790001 -96.991993 53.233001
-59.576001 -104.259104 57.379000
-54.547001 -93.365997 54.847900
-16.697900 -104.667000 32.726001
-21.079000 -103.348002 34.673899
-21.357901 -96.300103 24.350001
-43.659899 13.520001 53.602003
-42.298000 19.162999 57.527002
-41.111901 14.781901 51.702902
-70.318997 -66.359103 13.187001
-79.029903 -72.038099 7.521900
-68.248004 -70.046999 11.527000
-48.097901 -87.151103 46.861000
-50.790001 -96.991993 53.233001
-54.547001 -93.365997 54.847900
-84.651001 -109.789103 54.512002
-74.329004 -105.616994 58.987901
-79.820901 -115.709998 52.477002
-74.329004 -105.616994 58.987901
-69.772005 -110.832103 57.112899
-79.820901 -115.709998 52.477002
-69.772005 -110.832103 57.112899
-74.540004 -121.312000 50.354000
-79.820901 -115.709998 52.477002
-88.195898 -118.152998 44.174898
-84.651001 -109.789103 54.512002
-79.820901 -115.709998 52.477002
--1.236000 22.840001 -6.757000
-1.042000 24.325000 -8.010999
-0.893900 23.238001 -4.910000
-43.839000 11.435000 46.601001
-43.659899 13.520001 53.602003
-41.111901 14.781901 51.702902
-2.786000 37.610002 3.756000
-5.260000 36.866002 2.334000
-1.804000 37.423000 0.758000
-2.707000 23.593901 -3.083000
-0.893900 23.238001 -4.910000
-2.900000 25.017900 -6.138100
--10.094000 27.714999 -2.605100
--8.768000 29.613001 0.071000
--10.531999 30.694000 -2.586000
--9.924000 33.590000 -3.092100
--12.207000 32.145903 -5.236100
--10.531999 30.694000 -2.586000
-0.712000 37.300900 -2.251000
--1.805000 37.423000 -0.759100
-1.804000 37.423000 0.758000
--0.713000 37.300900 2.250000
-2.786000 37.610002 3.756000
-1.804000 37.423000 0.758000
--1.805000 37.423000 -0.759100
--0.713000 37.300900 2.250000
-1.804000 37.423000 0.758000
--64.291999 5.520900 -68.206102
--61.569098 -1.129000 -63.541099
--67.248099 2.447900 -69.186993
--63.867100 -4.120000 -64.448997
--66.027999 -7.336000 -65.225996
--70.069999 -0.909000 -70.029996
--66.801101 -31.234000 -50.067101
--68.947002 -29.781999 -59.384998
--66.518001 -27.712001 -50.214101
--69.352999 -33.659998 -59.285998
--68.947002 -29.781999 -59.384998
--66.801101 -31.234000 -50.067101
--39.090101 -123.741001 19.368000
--48.902098 -132.729992 13.741001
--42.326998 -135.543004 16.329000
--28.990000 27.298000 -21.271000
--27.181000 23.825001 -23.091000
--25.302999 24.781000 -20.955000
--82.184002 -94.425105 -62.456101
--74.179098 -85.274100 -63.741103
--71.072996 -90.329103 -62.291998
--67.425102 -23.744000 -41.203998
--71.787104 -24.329999 -32.981999
--67.737997 -27.125999 -40.950101
-64.198896 25.429999 66.632003
-60.742002 18.267000 67.681901
-68.462901 22.892900 67.738898
--71.787104 -24.329999 -32.981999
--71.998097 -27.841000 -32.416999
--67.737997 -27.125999 -40.950101
-76.777898 16.670000 69.524005
-72.667897 19.975001 68.704002
-68.189003 12.932000 70.016898
-66.027001 -7.336000 65.223902
-63.729897 -12.073000 58.095001
-68.026997 -10.766000 65.870002
--91.972999 10.765000 -34.131099
--87.275103 4.546000 -29.268999
--84.918998 8.406000 -29.855000
-64.291000 5.520900 68.204999
-61.229002 8.305000 67.082003
-59.157003 1.636000 62.499002
-66.027001 -7.336000 65.223902
-70.069000 -0.909000 70.028901
-63.866004 -4.120000 64.447902
-2.161000 22.708001 0.165000
--0.355000 22.586901 1.656900
-0.354000 22.586901 -1.658000
-110.091001 -89.749098 42.118002
-104.886003 -90.940103 52.334901
-106.789999 -97.075999 40.095001
--2.708000 23.593901 3.082000
--2.162000 22.708001 -0.166000
--0.355000 22.586901 1.656900
-19.774901 41.625001 21.357000
-16.103001 42.179000 23.434000
-18.961001 42.854901 24.884000
-2.161000 22.708001 0.165000
-4.144000 22.902001 2.084000
-1.577900 22.495002 3.486000
--68.249099 -70.046999 -11.528000
--76.648101 -76.361999 -5.646000
--65.958999 -73.639996 -9.807999
-6.638000 22.620000 7.355000
-6.934000 22.329900 10.555000
-3.834000 22.485999 8.654000
--66.489995 -57.870001 -56.335997
--73.863998 -58.477100 -64.483099
--67.625999 -53.819999 -57.098001
-3.703000 37.930001 9.479000
-3.661000 37.785899 12.274000
-6.519900 38.555000 11.022001
-9.284001 38.998000 12.562000
-6.519900 38.555000 11.022001
-6.224900 38.735002 13.904001
-9.284001 38.998000 12.562000
-9.413000 38.090002 9.734000
-6.519900 38.555000 11.022001
-6.519900 38.555000 11.022001
-9.413000 38.090002 9.734000
-6.506000 38.062900 8.180000
--12.116999 21.961000 -18.404000
--16.548099 22.135001 -19.632999
--13.122000 21.843001 -21.379000
--14.250000 21.805000 -24.326099
--9.777100 22.995001 -22.910001
--13.122000 21.843001 -21.379000
--48.253000 -79.394996 -37.853099
--49.526099 -76.486096 -26.508000
--45.396000 -82.151100 -36.362000
--44.748101 -90.139002 -45.306999
--48.099000 -87.151103 -46.861999
--45.396000 -82.151100 -36.362000
--44.020101 -81.623100 -23.334000
--42.369999 -84.741995 -34.807999
--46.847999 -79.126999 -24.948999
-104.569003 -66.981100 16.354000
-102.668896 -73.166996 14.402000
-94.342001 -64.672999 11.640000
--48.099000 -87.151103 -46.861999
--48.253000 -79.394996 -37.853099
--45.396000 -82.151100 -36.362000
--5.669100 35.980899 -23.382999
--7.735100 37.348900 -25.545999
--7.756100 38.812000 -21.996999
--10.738000 40.500000 -20.303000
--8.223000 39.515901 -18.635100
--7.756100 38.812000 -21.996999
-95.835902 -59.292000 13.444000
-104.569003 -66.981100 16.354000
-94.342001 -64.672999 11.640000
--57.611998 3.148000 -39.090998
--52.860100 4.473900 -44.683997
--55.904001 5.618000 -38.369998
-102.668896 -73.166996 14.402000
-92.498004 -70.012100 9.765000
-94.342001 -64.672999 11.640000
--53.840101 -124.541998 -50.981000
--62.722996 -131.411001 -45.866102
--59.501998 -120.324001 -53.105000
--65.641001 -1.542100 -34.423098
--64.176105 1.363000 -34.265999
--69.700994 4.155000 -30.397000
--62.722996 -131.411001 -45.866102
--68.832099 -126.556993 -48.147999
--59.501998 -120.324001 -53.105000
--68.832099 -126.556993 -48.147999
--64.821996 -115.745105 -55.152100
--59.501998 -120.324001 -53.105000
--50.267000 -112.231106 -53.675998
--53.840101 -124.541998 -50.981000
--59.501998 -120.324001 -53.105000
--75.834997 8.097000 -28.934099
--69.700994 4.155000 -30.397000
--67.916103 7.132900 -30.462001
--75.834997 8.097000 -28.934099
--77.864997 4.761000 -28.563999
--69.700994 4.155000 -30.397000
--6.191000 26.097000 2.141000
--7.087000 28.847000 2.601900
--8.034999 26.753001 -0.159000
--69.700994 4.155000 -30.397000
--64.176105 1.363000 -34.265999
--67.916103 7.132900 -30.462001
--66.004999 9.984001 -30.440999
--73.666997 11.277000 -29.215999
--67.916103 7.132900 -30.462001
-68.309896 -25.997000 59.366003
-67.456998 -22.320000 59.227999
-66.041000 -24.254000 50.251901
-6.473900 -99.856101 -10.601000
--1.920000 -97.473003 -0.991000
-1.919000 -97.473003 0.990000
-106.042899 -60.759000 18.225001
-95.835902 -59.292000 13.444000
-96.986003 -53.895999 15.173000
-66.041000 -24.254000 50.251901
-65.375902 -20.876000 50.185002
-67.424007 -23.744000 41.202899
-67.456998 -22.320000 59.227999
-65.375902 -20.876000 50.185002
-66.041000 -24.254000 50.251901
--94.430096 -91.186993 -8.103000
--97.599000 -85.304096 -10.273000
--101.222098 -96.736997 -16.142100
--33.305101 -92.428103 -3.365100
--40.456101 -97.217105 5.626900
--29.704999 -94.116993 -1.415000
--98.541997 -111.140996 -35.766996
--95.272101 -114.666998 -22.000000
--99.995099 -108.117998 -24.355000
--74.036099 35.394002 -49.606998
--71.292996 35.756901 -42.034101
--69.492996 37.833001 -49.167000
--103.877001 -6.591100 -65.722100
--108.002998 -3.879000 -57.542000
--100.833997 -0.876000 -65.970100
--101.434998 7.368000 -58.328997
--97.705103 12.453000 -58.520999
--97.462997 4.488900 -66.074997
--97.705103 12.453000 -58.520999
--93.805999 9.491000 -66.039100
--97.462997 4.488900 -66.074997
--65.317102 -59.762102 -23.538999
--72.168998 -62.589101 -14.787000
--63.598998 -63.130103 -22.166999
--91.258101 19.569000 -41.790102
--88.960998 14.831000 -34.659099
--85.781001 18.631000 -35.085000
--71.865998 -34.965098 -31.021999
--67.818098 -34.015000 -40.149000
--72.026104 -31.390000 -31.762000
-15.352000 42.175900 27.350901
-12.663000 41.139901 25.642000
-12.420001 39.930001 29.673001
--61.692100 -66.418000 -20.729098
--63.598998 -63.130103 -22.166999
--70.320003 -66.359103 -13.188000
--58.557998 -64.669997 -32.106999
--63.598998 -63.130103 -22.166999
--61.692100 -66.418000 -20.729098
-17.881000 42.199999 33.500899
-18.201001 43.110002 28.982000
-15.052000 41.111901 31.626999
--31.140000 45.166902 -40.139001
--31.167999 45.462999 -34.639001
--27.542001 44.678003 -38.618099
--27.698999 45.117002 -33.361100
--24.129000 44.005003 -37.000999
--27.542001 44.678003 -38.618099
-55.131000 14.189000 32.157000
-50.292902 12.305000 35.652000
-53.040002 16.388001 31.475000
--82.184002 -94.425105 -62.456101
--89.009099 -103.585996 -56.451999
--92.874102 -97.144999 -58.293998
-37.797999 37.109002 25.121901
-36.521900 33.143003 23.655001
-34.812000 37.895001 24.211001
-33.793900 34.125000 22.555001
-31.842999 38.527001 23.215000
-34.812000 37.895001 24.211001
--0.355000 22.586901 1.656900
-2.161000 22.708001 0.165000
-1.577900 22.495002 3.486000
--101.513997 -98.075993 -50.443102
--96.234098 -90.505995 -60.034100
--92.874102 -97.144999 -58.293998
--56.862999 39.236899 -34.945000
--60.632002 37.596002 -35.299998
--58.224998 33.594999 -31.018000
--54.498099 42.923000 -40.291101
--55.909999 43.026999 -47.145098
--58.668997 41.587003 -40.883001
--63.757002 -99.849999 -59.106998
--59.576999 -104.259104 -57.380099
--69.773100 -110.832103 -57.113998
--79.821996 -115.709998 -52.478101
--84.652096 -109.789103 -54.513101
--74.330099 -105.616994 -58.989000
--84.652096 -109.789103 -54.513101
--78.473002 -100.137100 -60.771000
--74.330099 -105.616994 -58.989000
--78.473002 -100.137100 -60.771000
--67.596100 -95.197998 -60.745999
--74.330099 -105.616994 -58.989000
--67.596100 -95.197998 -60.745999
--63.757002 -99.849999 -59.106998
--74.330099 -105.616994 -58.989000
-3.881000 22.468001 5.389900
-1.235000 22.840001 6.756000
-1.577900 22.495002 3.486000
--99.776097 -2.964000 -31.938002
--93.193099 -8.185999 -26.961999
--91.428101 -3.758000 -27.822999
-4.144000 22.902001 2.084000
-3.881000 22.468001 5.389900
-1.577900 22.495002 3.486000
--34.959998 44.117998 -30.834001
--34.777999 45.616999 -35.824101
--38.458999 43.848898 -31.753100
--8.363000 35.959899 -4.044100
--5.261100 36.866002 -2.335100
--6.086000 37.444901 -5.298000
-97.044900 -22.437999 23.825001
-106.470004 -24.396999 27.604001
-97.800002 -27.465999 22.599000
--9.414000 38.090002 -9.734999
--9.108000 37.012000 -6.919100
--6.507000 38.062900 -8.181000
--48.292998 14.293000 -34.570001
--43.041099 13.989001 -38.013101
--46.243098 16.163001 -33.398997
-92.873000 -97.144999 58.292899
-85.448898 -88.516995 64.037003
-82.182899 -94.425105 62.455002
-78.472003 -100.137100 60.770001
-89.008003 -103.585996 56.451000
-82.182899 -94.425105 62.455002
-89.008003 -103.585996 56.451000
-92.873000 -97.144999 58.292899
-82.182899 -94.425105 62.455002
-70.234999 -45.731999 28.291000
-78.065000 -43.027099 21.746000
-77.330001 -46.987001 20.500001
--64.538099 -17.590100 -50.007999
--65.153003 -15.346000 -58.592997
--63.529998 -14.403000 -49.722999
--50.873101 18.461000 -30.709000
--48.292998 14.293000 -34.570001
--46.243098 16.163001 -33.398997
--113.444999 -53.981997 -60.131099
--105.491996 -48.965998 -68.044998
--105.237998 -55.877998 -67.016996
--17.594000 37.548900 -14.435099
--17.510099 39.639901 -17.028000
--20.267999 37.222002 -15.945001
--20.298099 39.657000 -18.414000
--22.945998 36.812000 -17.402999
--20.267999 37.222002 -15.945001
--22.945998 36.812000 -17.402999
--24.475999 33.165999 -17.115999
--22.017099 33.904899 -15.474000
--19.549999 34.590900 -13.789000
--17.594000 37.548900 -14.435099
--20.267999 37.222002 -15.945001
-107.997000 -42.200100 23.326900
-98.425001 -37.839100 19.881001
-107.857004 -36.146000 24.847001
--10.458999 22.547001 -12.367000
--6.935000 22.329900 -10.555999
--9.795999 23.099001 -9.304000
-76.899000 -80.061994 65.084897
-66.725902 -76.905996 60.449000
-74.178003 -85.274100 63.740000
-75.927004 -135.641992 26.131900
-82.289003 -130.076990 28.649000
-76.832004 -129.981995 39.561000
-70.477895 -135.309994 37.138000
-75.927004 -135.641992 26.131900
-76.832004 -129.981995 39.561000
-74.540004 -121.312000 50.354000
-68.831004 -126.556993 48.146900
-76.832004 -129.981995 39.561000
-68.831004 -126.556993 48.146900
-70.477895 -135.309994 37.138000
-76.832004 -129.981995 39.561000
-8.675001 25.106002 3.141900
-11.182000 26.186001 5.414900
-9.218001 23.919001 6.217000
-87.277003 25.836900 50.206002
-83.587900 27.037000 42.215899
-82.957998 29.399000 50.126899
-85.166000 25.378000 58.285899
-87.277003 25.836900 50.206002
-82.957998 29.399000 50.126899
-105.250001 -42.156000 68.941005
-113.522001 -46.654001 61.326001
-113.081001 -39.451100 62.394999
-113.522001 -46.654001 61.326001
-118.184902 -44.544000 52.013002
-113.081001 -39.451100 62.394999
-118.184902 -44.544000 52.013002
-117.649004 -37.223000 53.254001
-113.081001 -39.451100 62.394999
-71.071900 -90.329103 62.291000
-82.182899 -94.425105 62.455002
-74.178003 -85.274100 63.740000
-27.180001 23.825001 23.089999
-22.620000 22.312000 22.957001
-25.302000 24.781000 20.954000
-56.563899 -67.790098 30.809000
-53.423900 -73.440105 40.624000
-55.722002 -70.263997 41.897900
-28.989000 27.298000 21.270001
-27.180001 23.825001 23.089999
-25.302000 24.781000 20.954000
-25.302000 24.781000 20.954000
-23.447001 25.718901 18.773001
-26.815901 28.309001 19.458901
-22.620000 22.312000 22.957001
-21.048000 23.054000 20.464001
-25.302000 24.781000 20.954000
-21.048000 23.054000 20.464001
-23.447001 25.718901 18.773001
-25.302000 24.781000 20.954000
-94.948895 -38.839098 72.512999
-84.848903 -41.951999 71.332999
-95.350899 -44.929098 71.892902
-84.549002 -52.807998 70.150003
-94.833001 -57.397999 70.262000
-95.318004 -51.126998 71.141899
-94.833001 -57.397999 70.262000
-105.236903 -55.877998 67.015901
-95.318004 -51.126998 71.141899
-105.236903 -55.877998 67.015901
-105.490901 -48.965998 68.043903
-95.318004 -51.126998 71.141899
-42.529900 -103.510104 49.772900
-50.265901 -112.231106 53.674899
-46.777900 -100.378998 51.540002
-84.888898 -47.346100 70.804998
-84.549002 -52.807998 70.150003
-95.318004 -51.126998 71.141899
--56.564998 -67.790098 -30.810000
--58.557998 -64.669997 -32.106999
--61.692100 -66.418000 -20.729098
-61.691001 -66.418000 20.728001
-58.556899 -64.669997 32.105900
-63.597903 -63.130103 22.166001
-115.123004 -48.944999 29.860999
-107.997000 -42.200100 23.326900
-115.194902 -42.133000 31.447001
-107.997000 -42.200100 23.326900
-107.857004 -36.146000 24.847001
-115.194902 -42.133000 31.447001
-107.857004 -36.146000 24.847001
-114.820898 -35.433996 32.932900
-115.194902 -42.133000 31.447001
-114.820898 -35.433996 32.932900
-118.774004 -42.957101 41.520901
-115.194902 -42.133000 31.447001
-16.930901 41.262999 19.993000
-17.509000 39.639901 17.027000
-14.163001 40.791001 18.558001
-118.774004 -42.957101 41.520901
-118.793897 -50.230000 40.020902
-115.194902 -42.133000 31.447001
-118.793897 -50.230000 40.020902
-115.123004 -48.944999 29.860999
-115.194902 -42.133000 31.447001
--79.734102 15.508001 -30.747000
--82.457103 22.159001 -35.411000
--85.781001 18.631000 -35.085000
--118.185997 -44.544000 -52.014001
--118.207097 -51.999100 -50.652098
--118.775100 -42.957101 -41.522000
-97.044900 -22.437999 23.825001
-97.800002 -27.465999 22.599000
-87.816998 -26.813000 22.479000
--115.195997 -42.133000 -31.447999
--114.822000 -35.433996 -32.933999
--118.775100 -42.957101 -41.522000
-77.698901 -112.709001 -1.176000
-74.168898 -99.680997 -2.803000
-82.463898 -107.694998 1.223000
-13.362001 41.388899 21.905001
-16.930901 41.262999 19.993000
-14.163001 40.791001 18.558001
-14.755000 39.525002 15.581001
-11.463000 40.215001 17.055901
-14.163001 40.791001 18.558001
-76.933898 18.743001 31.055000
-82.456000 22.159001 35.409901
-79.732999 15.508001 30.746000
-17.509000 39.639901 17.027000
-14.755000 39.525002 15.581001
-14.163001 40.791001 18.558001
-74.168898 -99.680997 -2.803000
-77.698901 -112.709001 -1.176000
-69.962896 -103.987001 -5.078100
-86.849898 -102.417000 3.572000
-88.041902 -115.153000 9.079001
-82.463898 -107.694998 1.223000
-58.743902 35.241999 60.644999
-63.333899 33.414003 61.804000
-62.008899 38.938899 55.241000
--50.682999 -142.811999 6.453900
--57.752997 -139.272988 3.773000
--57.473000 -146.320999 -6.553000
-50.972901 6.638000 43.541901
-46.027001 9.835000 48.255000
-49.036898 8.666000 42.303000
-82.456000 22.159001 35.409901
-85.779898 18.631000 35.083901
-79.732999 15.508001 30.746000
-13.060001 -161.795005 4.276000
-16.804000 -158.565998 18.618001
-8.335000 -159.606993 15.826000
-3.661000 37.785899 12.274000
-3.490000 37.240002 15.128001
-6.224900 38.735002 13.904001
--104.670994 -90.165101 -18.354999
--104.208998 -101.315103 -26.632000
--101.222098 -96.736997 -16.142100
--104.208998 -101.315103 -26.632000
--99.995099 -108.117998 -24.355000
--101.222098 -96.736997 -16.142100
--95.272101 -114.666998 -22.000000
--92.893995 -109.269001 -11.499000
--97.291999 -103.117995 -13.854999
--15.913999 32.937001 -9.785000
--16.146000 29.666001 -9.746999
--14.245000 30.836901 -7.470000
-6.519900 38.555000 11.022001
-3.661000 37.785899 12.274000
-6.224900 38.735002 13.904001
-5.809000 38.432900 16.906001
-8.821900 39.533999 15.501000
-6.224900 38.735002 13.904001
--24.475999 33.165999 -17.115999
--22.490000 30.193999 -15.688000
--22.017099 33.904899 -15.474000
-3.490000 37.240002 15.128001
-5.809000 38.432900 16.906001
-6.224900 38.735002 13.904001
--0.066000 -142.524987 -31.879000
--4.078100 -129.852995 -36.306001
-2.217000 -130.229995 -33.937100
--18.482100 -114.749998 -40.013101
--16.698999 -104.667000 -32.727100
--13.268000 -116.031997 -37.908100
--3.175000 -106.987998 -26.670100
-1.396000 -107.208997 -24.595000
-2.730000 -117.829099 -31.378999
--19.549999 34.590900 -13.789000
--20.267999 37.222002 -15.945001
--22.017099 33.904899 -15.474000
--20.267999 37.222002 -15.945001
--22.945998 36.812000 -17.402999
--22.017099 33.904899 -15.474000
--22.490000 30.193999 -15.688000
--20.326100 31.100001 -13.742000
--22.017099 33.904899 -15.474000
--20.326100 31.100001 -13.742000
--19.549999 34.590900 -13.789000
--22.017099 33.904899 -15.474000
--74.022099 21.760000 -31.274099
--71.373098 14.295000 -29.410999
--68.962000 17.148999 -29.521000
--42.013101 -153.117999 -1.045000
--35.806000 -148.391992 11.883000
--43.354999 -145.858988 9.159001
--71.373098 14.295000 -29.410999
--63.979097 12.704001 -30.335000
--68.962000 17.148999 -29.521000
-58.032002 -89.523099 56.381002
-63.756004 -99.849999 59.105899
-67.594998 -95.197998 60.744900
--31.371098 -89.971103 -16.383000
--28.822999 -93.263097 -28.024999
--34.713101 -88.143997 -18.187100
--25.137000 -94.889000 -26.208099
--28.822999 -93.263097 -28.024999
--31.371098 -89.971103 -16.383000
--24.389001 -93.056999 -12.670999
--21.358998 -96.300103 -24.350999
--27.925000 -91.610096 -14.544000
-69.772005 -110.832103 57.112899
-74.329004 -105.616994 58.987901
-63.756004 -99.849999 59.105899
-59.576001 -104.259104 57.379000
-69.772005 -110.832103 57.112899
-63.756004 -99.849999 59.105899
-87.287001 -22.473000 23.541901
-78.860998 -27.337000 25.930000
-78.549005 -23.511998 26.770001
-54.547001 -93.365997 54.847900
-59.576001 -104.259104 57.379000
-63.756004 -99.849999 59.105899
-61.233003 -85.482098 57.827901
-58.032002 -89.523099 56.381002
-67.594998 -95.197998 60.744900
--38.514998 45.561999 -36.913000
--42.034101 43.376900 -32.577001
--38.458999 43.848898 -31.753100
--67.870103 -88.578105 0.307000
--74.170001 -99.680997 2.802000
--64.421996 -92.332102 2.384900
--38.341001 40.852003 -27.781999
--34.959998 44.117998 -30.834001
--38.458999 43.848898 -31.753100
-67.940004 31.200001 62.826902
-71.392901 34.699000 56.847900
-66.697896 37.011001 56.109000
-62.008899 38.938899 55.241000
-63.333899 33.414003 61.804000
-66.697896 37.011001 56.109000
-63.333899 33.414003 61.804000
-67.940004 31.200001 62.826902
-66.697896 37.011001 56.109000
-97.291000 -103.117995 13.854000
-101.221003 -96.736997 16.141001
-99.994004 -108.117998 24.354000
--69.963999 -103.987001 5.077000
--60.729999 -95.892996 4.506000
--64.421996 -92.332102 2.384900
--75.772099 -44.354100 -66.344097
--75.769000 -39.724998 -66.726997
--69.435999 -41.625999 -58.743998
-95.271006 -114.666998 21.999000
-97.291000 -103.117995 13.854000
-99.994004 -108.117998 24.354000
-98.540999 -111.140996 35.765901
-95.271006 -114.666998 21.999000
-99.994004 -108.117998 24.354000
-104.208000 -101.315103 26.631001
-102.934897 -104.222998 37.976000
-99.994004 -108.117998 24.354000
-102.934897 -104.222998 37.976000
-98.540999 -111.140996 35.765901
-99.994004 -108.117998 24.354000
--67.571998 -37.499100 -39.607000
--67.135103 -40.993098 -38.973000
--66.403002 -42.071000 -48.999101
--75.458996 -49.036998 -65.839998
--75.772099 -44.354100 -66.344097
--69.097102 -45.676999 -58.305100
--1.920000 -97.473003 -0.991000
--10.480000 -99.447995 8.583000
--6.475000 -99.856101 10.600001
--10.524999 -106.820002 20.392900
--2.451000 -100.036100 12.614001
--6.475000 -99.856101 10.600001
--14.447000 -98.817103 6.565000
--18.368099 -97.961999 4.552000
--23.902999 -104.210995 14.029000
--10.480000 -99.447995 8.583000
--15.042000 -106.214993 18.274900
--6.475000 -99.856101 10.600001
--15.042000 -106.214993 18.274900
--10.524999 -106.820002 20.392900
--6.475000 -99.856101 10.600001
-27.923901 -91.610096 14.543001
-36.791902 -90.544999 5.287000
-33.304002 -92.428103 3.364000
-36.791902 -90.544999 5.287000
-44.263899 -94.900101 -3.573000
-33.304002 -92.428103 3.364000
-44.263899 -94.900101 -3.573000
-40.455002 -97.217105 -5.628000
-33.304002 -92.428103 3.364000
-29.704001 -94.116993 1.414000
-24.388000 -93.056999 12.670000
-33.304002 -92.428103 3.364000
--84.550105 -52.807998 -70.151098
--95.319100 -51.126998 -71.143001
--84.890001 -47.346100 -70.805997
-34.712002 -88.143997 18.186001
-28.822001 -93.263097 28.024001
-32.400999 -91.427103 29.797001
--95.319100 -51.126998 -71.143001
--95.351994 -44.929098 -71.893997
--84.890001 -47.346100 -70.805997
-13.071000 28.971002 35.428002
-15.107000 29.871000 38.159002
-12.277001 33.459898 35.115000
--75.458996 -49.036998 -65.839998
--84.550105 -52.807998 -70.151098
--84.890001 -47.346100 -70.805997
-13.071000 28.971002 35.428002
-17.059000 25.468901 37.500001
-15.107000 29.871000 38.159002
-2.157000 25.420001 15.937001
-4.486000 23.291901 14.961001
-5.138900 23.913000 18.017000
-14.250000 21.805000 24.325000
-9.776000 22.995001 22.909001
-13.121000 21.843001 21.377999
-8.826001 22.652000 19.878000
-5.986000 24.627000 21.024900
-5.138900 23.913000 18.017000
-36.791902 -90.544999 5.287000
-27.923901 -91.610096 14.543001
-31.369999 -89.971103 16.381901
-59.289999 -73.467106 52.305002
-55.722002 -70.263997 41.897900
-56.846999 -77.113003 51.068999
-50.931901 -76.486997 39.272901
-51.241003 -83.972998 48.341900
-54.159001 -80.622099 49.747001
--15.913999 32.937001 -9.785000
--13.594000 33.911899 -7.812000
--14.528000 35.861000 -10.334000
-40.159900 -88.477999 7.178900
-36.791902 -90.544999 5.287000
-31.369999 -89.971103 16.381901
--82.290098 -130.076990 -28.649999
--88.196002 -124.112003 -31.100100
--82.749099 -124.250002 -41.910000
--19.630000 -150.672004 -30.865999
--27.386000 -148.752004 -33.491101
--21.465098 -139.322996 -39.395999
--27.386000 -148.752004 -33.491101
--28.368099 -137.274995 -41.824099
--21.465098 -139.322996 -39.395999
--16.507000 -127.833992 -40.946998
--14.420999 -140.884995 -36.925998
--21.465098 -139.322996 -39.395999
-49.368899 41.777000 33.948001
-50.376900 43.977000 39.595999
-53.103998 40.630002 34.492999
-51.589999 36.825001 30.294001
-49.368899 41.777000 33.948001
-53.103998 40.630002 34.492999
--78.237996 -132.360995 -14.523000
--71.691103 -137.475997 -11.914000
--77.059999 -125.962004 -4.074000
-50.376900 43.977000 39.595999
-54.497000 42.923000 40.290002
-53.103998 40.630002 34.492999
--82.759105 -120.727994 -6.605100
--78.237996 -132.360995 -14.523000
--77.059999 -125.962004 -4.074000
--58.557998 -64.669997 -32.106999
--57.815000 -66.976994 -43.095101
--60.367100 -61.460000 -33.332098
--70.974000 -130.817994 -1.499000
--72.572000 -117.422000 3.621000
--77.059999 -125.962004 -4.074000
-114.820898 -35.433996 32.932900
-107.342005 -30.203000 26.273999
-114.016898 -28.879000 34.312900
-107.342005 -30.203000 26.273999
-106.470004 -24.396999 27.604001
-114.016898 -28.879000 34.312900
-106.470004 -24.396999 27.604001
-112.804003 -22.497000 35.588000
-114.016898 -28.879000 34.312900
-112.804003 -22.497000 35.588000
-117.274001 -28.833099 44.180002
-114.016898 -28.879000 34.312900
-117.274001 -28.833099 44.180002
-118.261002 -35.813000 42.909000
-114.016898 -28.879000 34.312900
-118.261002 -35.813000 42.909000
-114.820898 -35.433996 32.932900
-114.016898 -28.879000 34.312900
--38.514998 45.561999 -36.913000
--38.849998 45.506001 -42.890001
--42.370997 45.279898 -37.905999
--57.815000 -66.976994 -43.095101
--59.700102 -63.590996 -44.208098
--60.367100 -61.460000 -33.332098
--35.349000 16.510000 -39.028000
--31.670101 18.274900 -43.098997
--33.342000 17.506000 -36.923099
--42.034101 43.376900 -32.577001
--38.514998 45.561999 -36.913000
--42.370997 45.279898 -37.905999
-23.590000 -113.133103 42.073000
-25.364000 -101.764001 36.580000
-21.079000 -103.348002 34.673899
--31.396002 18.423000 -34.743100
--36.968000 18.291000 -32.944098
--33.342000 17.506000 -36.923099
--32.161001 27.204001 -52.991100
--32.028001 33.428002 -52.970100
--29.157000 27.225001 -50.625000
--31.670101 18.274900 -43.098997
--29.552098 18.850001 -40.727101
--33.342000 17.506000 -36.923099
--38.987000 16.958000 -34.713101
--35.349000 16.510000 -39.028000
--33.342000 17.506000 -36.923099
-67.570902 -37.499100 39.605901
-66.402003 -42.071000 48.998002
-66.748001 -38.430098 49.457002
-66.877902 -34.812998 49.812902
-67.817003 -34.015000 40.147901
-66.748001 -38.430098 49.457002
--57.815000 -66.976994 -43.095101
--55.723000 -70.263997 -41.898999
--59.291098 -73.467106 -52.306000
-67.817003 -34.015000 40.147901
-67.570902 -37.499100 39.605901
-66.748001 -38.430098 49.457002
--56.848001 -77.113003 -51.070001
--61.234102 -85.482098 -57.829000
--64.135104 -81.267998 -59.187099
-71.780898 9.750000 70.969000
-64.291000 5.520900 68.204999
-67.247003 2.447900 69.185898
--97.402997 1.858000 -32.770999
--101.402998 5.945000 -40.305998
--104.308002 0.790000 -39.584998
--101.402998 5.945000 -40.305998
--106.100000 2.505000 -48.737001
--104.308002 0.790000 -39.584998
-117.691003 -59.542999 49.167901
-112.833902 -61.388999 58.806900
-116.628900 -67.136101 47.569901
-81.632003 -90.416998 1.608000
-84.864900 -85.512102 3.736900
-90.843000 -96.902996 5.868000
-86.849898 -102.417000 3.572000
-81.632003 -90.416998 1.608000
-90.843000 -96.902996 5.868000
-94.429001 -91.186993 8.102001
-97.291000 -103.117995 13.854000
-90.843000 -96.902996 5.868000
--36.777101 28.204901 -24.406100
--39.244000 32.019999 -24.674000
--39.214101 26.892900 -25.652999
-92.892900 -109.269001 11.498000
-86.849898 -102.417000 3.572000
-90.843000 -96.902996 5.868000
--41.625001 25.461001 -26.822999
--37.710000 22.510000 -27.910000
--39.214101 26.892900 -25.652999
--41.947000 30.753901 -25.612000
--41.625001 25.461001 -26.822999
--39.214101 26.892900 -25.652999
--37.710000 22.510000 -27.910000
--35.534099 23.836000 -26.350100
--39.214101 26.892900 -25.652999
-62.872998 39.952900 41.369900
-58.667902 41.587003 40.881902
-60.402002 41.638900 47.931898
--68.495102 -49.749099 -57.755101
--65.055996 -49.369998 -47.778998
--67.625999 -53.819999 -57.098001
-67.087896 38.013000 41.755002
-62.872998 39.952900 41.369900
-64.940006 39.911900 48.608001
-43.040000 13.989001 38.012002
-48.291899 14.293000 34.568999
-45.060001 12.338000 39.533000
-98.238900 10.800000 40.910900
-101.402000 5.945000 40.305000
-94.792902 6.438000 33.500001
-62.008899 38.938899 55.241000
-66.697896 37.011001 56.109000
-64.940006 39.911900 48.608001
--78.066103 -43.027099 -21.747001
--70.973001 -42.146001 -29.285001
--78.582101 -39.069101 -22.914000
--9.219000 23.919001 -6.218000
--12.188000 24.986001 -8.278000
--9.795999 23.099001 -9.304000
--87.963998 -40.255100 -18.793000
--87.503999 -44.826999 -17.402999
--78.066103 -43.027099 -21.747001
--98.426104 -37.839100 -19.881999
--87.963998 -40.255100 -18.793000
--88.165097 -35.717998 -20.104999
--75.440101 -8.917000 -29.275998
--69.212995 -10.838999 -34.348000
--74.232101 -5.487000 -29.687099
--87.503999 -44.826999 -17.402999
--77.331103 -46.987001 -20.500999
--78.066103 -43.027099 -21.747001
-103.198901 -69.844104 64.580999
-93.889900 -63.703999 69.253899
-92.482001 -70.008099 68.125002
-90.605006 -76.269999 66.875003
-101.401001 -76.811999 63.180000
-92.482001 -70.008099 68.125002
-101.401001 -76.811999 63.180000
-103.198901 -69.844104 64.580999
-92.482001 -70.008099 68.125002
-43.923002 43.108001 50.542898
-41.175898 39.021902 54.722000
-45.389902 38.569000 56.388002
--81.469104 -2.366000 -27.566001
--75.440101 -8.917000 -29.275998
--74.232101 -5.487000 -29.687099
--99.995099 -108.117998 -24.355000
--95.272101 -114.666998 -22.000000
--97.291999 -103.117995 -13.854999
--69.212995 -10.838999 -34.348000
--68.167001 -7.650100 -34.464099
--74.232101 -5.487000 -29.687099
--62.583998 4.159900 -34.021001
--66.004999 9.984001 -30.440999
--67.916103 7.132900 -30.462001
-41.175898 39.021902 54.722000
-43.235999 32.720000 59.034899
-45.389902 38.569000 56.388002
-43.235999 32.720000 59.034899
-47.271900 31.930000 60.819000
-45.389902 38.569000 56.388002
--73.666997 11.277000 -29.215999
--75.834997 8.097000 -28.934099
--67.916103 7.132900 -30.462001
--16.616000 25.537001 -12.813000
--13.195000 24.041001 -11.143000
--15.193000 26.541000 -10.222999
-99.261999 12.913000 49.698003
-102.819003 7.880000 49.278900
-98.238900 10.800000 40.910900
--8.676000 25.106002 -3.143000
--6.413100 24.398001 -0.916100
--8.034999 26.753001 -0.159000
-8.467000 35.143003 29.138001
-9.982000 38.671002 27.645001
-7.734000 37.348900 25.544999
-9.982000 38.671002 27.645001
-10.133000 40.014900 23.854000
-7.734000 37.348900 25.544999
--42.298999 19.162999 -57.528000
--45.383997 18.003900 -59.442099
--45.743100 24.979001 -61.347999
-10.133000 40.014900 23.854000
-7.755000 38.812000 21.996001
-7.734000 37.348900 25.544999
-118.793897 -50.230000 40.020902
-117.691003 -59.542999 49.167901
-118.305899 -57.592001 38.410898
-115.123004 -48.944999 29.860999
-118.793897 -50.230000 40.020902
-118.305899 -57.592001 38.410898
--35.340101 26.995001 -55.252001
--36.403999 20.825000 -53.354099
--38.674999 26.569901 -57.402998
--84.441103 -36.658101 -71.733102
--83.675101 -31.491000 -71.999997
--75.461999 -35.177000 -66.987999
--74.863002 -30.733999 -67.124099
--69.352999 -33.659998 -59.285998
--75.461999 -35.177000 -66.987999
--89.448996 0.488000 -28.592000
--81.469104 -2.366000 -27.566001
--87.275103 4.546000 -29.268999
--75.834997 8.097000 -28.934099
--79.734102 15.508001 -30.747000
--82.401097 12.062000 -30.347100
--6.935000 22.329900 -10.555999
--7.402000 22.284001 -13.707000
--4.042000 22.797002 -11.844000
--81.469104 -2.366000 -27.566001
--79.748102 1.271000 -28.107999
--87.275103 4.546000 -29.268999
--10.738000 40.500000 -20.303000
--7.756100 38.812000 -21.996999
--10.133999 40.014900 -23.854999
--1.234000 23.538001 -9.919000
--1.236000 22.840001 -6.757000
--3.835100 22.485999 -8.655000
--1.236000 22.840001 -6.757000
--3.882000 22.468001 -5.391000
--3.835100 22.485999 -8.655000
--6.639000 22.620000 -7.356000
--6.935000 22.329900 -10.555999
--3.835100 22.485999 -8.655000
-18.961001 42.854901 24.884000
-18.201001 43.110002 28.982000
-21.937901 43.409899 26.249999
--88.960998 14.831000 -34.659099
--94.848000 15.345001 -41.408099
--91.972999 10.765000 -34.131099
-28.766001 41.932900 24.961900
-25.031000 43.827899 27.531000
-28.238000 44.095002 28.721999
-14.244000 23.284001 13.994001
-11.229901 22.183999 15.399001
-10.458000 22.547001 12.366001
-7.401000 22.284001 13.706001
-6.934000 22.329900 10.555000
-10.458000 22.547001 12.366001
-13.194000 24.041001 11.142001
-14.244000 23.284001 13.994001
-10.458000 22.547001 12.366001
--106.044002 -60.759000 -18.226000
--96.987002 -53.895999 -15.174000
--107.101999 -54.535002 -20.013999
-10.458000 22.547001 12.366001
-6.934000 22.329900 10.555000
-9.795000 23.099001 9.303001
-22.697000 41.862901 22.642901
-18.961001 42.854901 24.884000
-21.937901 43.409899 26.249999
--103.199996 -69.844104 -64.582102
--101.402096 -76.811999 -63.180998
--109.972097 -76.272100 -55.799998
-82.957998 29.399000 50.126899
-78.532897 32.583002 49.928002
-80.663003 28.885901 57.938900
-78.532897 32.583002 49.928002
-76.058902 31.993002 57.458900
-80.663003 28.885901 57.938900
--112.833999 -82.282998 -44.041999
--115.013100 -74.731104 -45.861099
--109.972097 -76.272100 -55.799998
--96.987002 -53.895999 -15.174000
--85.783996 -54.010000 -14.393000
--86.778998 -49.417000 -15.936000
--116.629995 -67.136101 -47.571000
--117.692098 -59.542999 -49.169000
--112.834997 -61.388999 -58.807999
--117.692098 -59.542999 -49.169000
--113.444999 -53.981997 -60.131099
--112.834997 -61.388999 -58.807999
--3.257000 31.076001 -21.718999
--4.031100 27.583901 -21.673100
--5.270000 28.728999 -24.462000
-57.286900 20.037999 29.510001
-63.834898 22.346999 29.485000
-59.611000 17.735001 29.867999
--54.680999 2.176000 -45.722999
--52.860100 4.473900 -44.683997
--57.611998 3.148000 -39.090998
-67.456998 -22.320000 59.227999
-71.456999 -18.232999 66.762999
-66.399001 -18.764000 58.970999
-65.375902 -20.876000 50.185002
-67.456998 -22.320000 59.227999
-66.399001 -18.764000 58.970999
-71.456999 -18.232999 66.762999
-69.844998 -14.403000 66.382006
-66.399001 -18.764000 58.970999
-69.844998 -14.403000 66.382006
-65.151997 -15.346000 58.591899
-66.399001 -18.764000 58.970999
--59.221100 0.564000 -39.715998
--54.680999 2.176000 -45.722999
--57.611998 3.148000 -39.090998
--4.538100 25.579000 4.222000
--5.566000 28.236000 4.901000
--6.191000 26.097000 2.141000
--10.094000 27.714999 -2.605100
--8.676000 25.106002 -3.143000
--8.034999 26.753001 -0.159000
--8.034999 26.753001 -0.159000
--7.087000 28.847000 2.601900
--8.768000 29.613001 0.071000
--19.881999 36.645900 -42.451099
--19.850999 31.520002 -43.429099
--22.564000 32.214999 -45.950100
--25.503099 32.784000 -48.384000
--22.886001 37.507899 -44.737998
--22.564000 32.214999 -45.950100
--26.340099 27.083000 -48.162997
--28.504999 21.989001 -46.306998
--29.157000 27.225001 -50.625000
-87.962896 -40.255100 18.791901
-98.425001 -37.839100 19.881001
-98.273002 -43.145999 18.395001
-47.062002 10.564900 40.964998
-45.060001 12.338000 39.533000
-50.292902 12.305000 35.652000
-72.571896 -63.180096 63.631900
-65.084897 -61.882000 55.472001
-70.949897 -67.836002 62.674902
--26.170999 22.118000 -43.777999
--28.504999 21.989001 -46.306998
--26.340099 27.083000 -48.162997
-45.060001 12.338000 39.533000
-48.291899 14.293000 34.568999
-50.292902 12.305000 35.652000
-31.020001 21.797001 27.214000
-33.348899 25.072001 24.718901
-35.533000 23.836000 26.349001
-39.213002 26.892900 25.652001
-41.625001 25.461001 26.822001
-37.708901 22.510000 27.908999
--28.990000 27.298000 -21.271000
--25.302999 24.781000 -20.955000
--26.817000 28.309001 -19.459998
-36.776002 28.204901 24.405001
-39.213002 26.892900 25.652001
-35.533000 23.836000 26.349001
--25.302999 24.781000 -20.955000
--23.448000 25.718901 -18.774100
--26.817000 28.309001 -19.459998
--24.650998 29.270001 -17.597999
--26.935000 32.358002 -18.702999
--26.817000 28.309001 -19.459998
-25.364000 -101.764001 36.580000
-29.538000 -99.918999 38.437899
-28.822001 -93.263097 28.024001
--82.964994 -63.131101 -11.090999
--72.168998 -62.589101 -14.787000
--73.795997 -58.752000 -16.321000
-28.822001 -93.263097 28.024001
-29.538000 -99.918999 38.437899
-32.400999 -91.427103 29.797001
-5.606900 -99.707097 16.607901
-9.567000 -96.836001 4.939000
-1.582000 -99.987000 14.618000
-12.241000 -105.717100 30.739000
-13.583000 -98.457098 20.533001
-7.728000 -106.490001 28.718000
--118.307002 -57.592001 -38.411997
--116.629995 -67.136101 -47.571000
--117.296994 -65.003999 -36.695000
--116.629995 -67.136101 -47.571000
--115.013100 -74.731104 -45.861099
--117.296994 -65.003999 -36.695000
--112.833999 -82.282998 -44.041999
--113.677099 -79.808995 -32.952998
--115.754999 -72.425105 -34.874100
-51.416900 30.825000 62.472902
-58.743902 35.241999 60.644999
-54.201901 36.699999 59.354000
--60.737997 -80.481105 -6.205000
--52.237000 -78.541100 -14.359999
--54.862998 -75.689100 -16.036000
--15.358000 22.659000 -16.827000
--12.116999 21.961000 -18.404000
--11.231000 22.183999 -15.400000
--48.287999 42.562000 -51.895998
--49.743101 37.800901 -57.933997
--52.776102 41.699000 -53.132001
--103.723995 -13.285000 -29.972099
--111.200996 -16.314000 -36.752999
--105.259106 -18.750001 -28.836999
-29.579001 38.761001 49.040001
-26.120001 38.222000 46.936002
-28.659001 33.199001 50.726000
--96.016996 -17.539000 -24.962001
--103.723995 -13.285000 -29.972099
--105.259106 -18.750001 -28.836999
--97.045995 -22.437999 -23.826100
--105.259106 -18.750001 -28.836999
--106.471099 -24.396999 -27.604999
--75.196996 -54.862998 -17.786000
--84.514000 -58.588099 -12.777099
--73.795997 -58.752000 -16.321000
--72.168998 -62.589101 -14.787000
--65.317102 -59.762102 -23.538999
--73.795997 -58.752000 -16.321000
--11.254000 28.054001 -32.639001
--15.238000 24.937000 -34.672100
--13.072000 28.971002 -35.429101
--65.317102 -59.762102 -23.538999
--66.839993 -56.325100 -24.840100
--73.795997 -58.752000 -16.321000
--33.578999 -97.824000 -40.245000
--37.473001 -95.488995 -41.995000
--35.861999 -89.388996 -31.521000
--10.204100 32.285899 -32.535002
--11.254000 28.054001 -32.639001
--13.072000 28.971002 -35.429101
--37.943099 -86.139999 -19.948000
--32.402098 -91.427103 -29.798100
--35.861999 -89.388996 -31.521000
--12.278000 33.459898 -35.116099
--10.204100 32.285899 -32.535002
--13.072000 28.971002 -35.429101
--17.059999 25.468901 -37.501000
--15.108000 29.871000 -38.160000
--13.072000 28.971002 -35.429101
-58.094002 10.802000 65.819904
-54.095000 6.477000 60.028899
-56.658000 4.171000 61.327901
-101.512998 -98.075993 50.442003
-102.934897 -104.222998 37.976000
-106.789999 -97.075999 40.095001
--20.298099 39.657000 -18.414000
--17.510099 39.639901 -17.028000
--16.931999 41.262999 -19.994000
-104.886003 -90.940103 52.334901
-101.512998 -98.075993 50.442003
-106.789999 -97.075999 40.095001
-102.934897 -104.222998 37.976000
-104.208000 -101.315103 26.631001
-106.789999 -97.075999 40.095001
-104.208000 -101.315103 26.631001
-107.898004 -94.297998 28.826000
-106.789999 -97.075999 40.095001
--94.573997 -5.459100 -71.426101
--103.877001 -6.591100 -65.722100
--100.833997 -0.876000 -65.970100
--28.767100 41.932900 -24.962999
--25.695998 41.971002 -23.847099
--25.031999 43.827899 -27.532000
--14.756000 39.525002 -15.582000
--14.913999 37.804998 -12.883999
--12.021000 39.312001 -14.088999
-8.467000 35.143003 29.138001
-7.734000 37.348900 25.544999
-6.531000 33.798900 26.722001
-4.795000 32.441001 24.246901
-6.705900 29.902902 27.204001
-6.531000 33.798900 26.722001
--68.129994 33.528902 -35.727099
--67.904003 27.145900 -31.438999
--64.732105 29.510900 -31.386998
--67.904003 27.145900 -31.438999
--63.836001 22.346999 -29.486099
--64.732105 29.510900 -31.386998
--61.500002 31.659901 -31.246999
--64.392999 35.693999 -35.562098
--64.732105 29.510900 -31.386998
--75.240999 6.224900 -71.776100
--80.755994 12.984000 -70.197001
--71.782000 9.750000 -70.970103
--64.392999 35.693999 -35.562098
--68.129994 33.528902 -35.727099
--64.732105 29.510900 -31.386998
--67.248099 2.447900 -69.186993
--75.240999 6.224900 -71.776100
--71.782000 9.750000 -70.970103
--68.190105 12.932000 -70.018001
--64.291999 5.520900 -68.206102
--71.782000 9.750000 -70.970103
--13.448000 -117.304102 26.898000
--18.747998 -116.531000 24.635000
--21.032000 -128.824994 26.690900
--23.976998 -115.427099 22.364000
--27.174000 -127.527997 24.253000
--18.747998 -116.531000 24.635000
--13.448000 -117.304102 26.898000
--10.524999 -106.820002 20.392900
--18.747998 -116.531000 24.635000
-16.697900 -104.667000 32.726001
-21.357901 -96.300103 24.350001
-17.503001 -97.488999 22.457000
-2.069000 33.117998 18.871000
-3.779000 34.569900 21.156000
-3.437000 36.180902 18.090000
-6.531000 33.798900 26.722001
-7.734000 37.348900 25.544999
-5.668000 35.980899 23.381900
-3.779000 34.569900 21.156000
-4.795000 32.441001 24.246901
-5.668000 35.980899 23.381900
-56.652002 -0.616000 54.889899
-56.658000 4.171000 61.327901
-54.625001 1.817000 53.791001
-7.734000 37.348900 25.544999
-7.755000 38.812000 21.996001
-5.668000 35.980899 23.381900
--8.823000 39.533999 -15.502000
--8.223000 39.515901 -18.635100
--11.464000 40.215001 -17.057000
--23.125000 39.562900 -19.730000
--20.298099 39.657000 -18.414000
--19.776000 41.625001 -21.358000
-94.125897 -32.889001 72.997004
-94.948895 -38.839098 72.512999
-104.531899 -35.487000 69.704004
-103.357002 -28.996099 70.330001
-94.125897 -32.889001 72.997004
-104.531899 -35.487000 69.704004
-61.063901 -8.370000 48.823003
-60.435001 -6.007000 56.733999
-59.631001 -5.535000 48.208002
-113.081001 -39.451100 62.394999
-117.649004 -37.223000 53.254001
-112.139903 -32.410000 63.332997
-60.721003 -2.135000 40.243901
-62.104002 -4.944000 40.675901
-58.080003 -2.830000 47.486000
--28.100999 42.569902 -44.041999
--31.775001 43.062001 -45.824099
--31.140000 45.166902 -40.139001
--33.251997 39.090902 -51.041998
--35.647999 43.333001 -47.502998
--31.775001 43.062001 -45.824099
--35.647999 43.333001 -47.502998
--34.913000 45.451000 -41.563999
--31.775001 43.062001 -45.824099
-61.984003 -58.172099 34.478001
-65.315999 -59.759997 23.538001
-60.366001 -61.460000 33.331003
--66.500001 -44.484101 -38.248099
--70.973001 -42.146001 -29.285001
--70.236102 -45.731999 -28.292000
-89.896001 14.109001 65.857999
-93.722902 17.155999 58.576901
-89.530900 21.465000 58.499001
-85.775003 18.333901 65.535001
-89.896001 14.109001 65.857999
-89.530900 21.465000 58.499001
-85.166000 25.378000 58.285899
-85.775003 18.333901 65.535001
-89.530900 21.465000 58.499001
-93.722902 17.155999 58.576901
-91.457002 21.899000 50.159901
-89.530900 21.465000 58.499001
--77.331103 -46.987001 -20.500999
--69.301099 -49.298998 -27.218999
--70.236102 -45.731999 -28.292000
-91.457002 21.899000 50.159901
-87.277003 25.836900 50.206002
-89.530900 21.465000 58.499001
-87.277003 25.836900 50.206002
-85.166000 25.378000 58.285899
-89.530900 21.465000 58.499001
--70.973001 -42.146001 -29.285001
--78.066103 -43.027099 -21.747001
--70.236102 -45.731999 -28.292000
-23.125000 39.562900 19.729000
-22.697000 41.862901 22.642901
-25.993001 39.352000 20.972000
--78.066103 -43.027099 -21.747001
--77.331103 -46.987001 -20.500999
--70.236102 -45.731999 -28.292000
-25.694901 41.971002 23.846000
-28.902000 39.007898 22.135001
-25.993001 39.352000 20.972000
-25.638001 36.310002 18.798001
-23.125000 39.562900 19.729000
-25.993001 39.352000 20.972000
-28.902000 39.007898 22.135001
-28.347000 35.700999 20.125000
-25.993001 39.352000 20.972000
-22.697000 41.862901 22.642901
-25.694901 41.971002 23.846000
-25.993001 39.352000 20.972000
--44.932000 39.229900 -29.215999
--45.674998 42.688899 -33.308998
--48.258997 38.129002 -29.798999
--62.874101 39.952900 -41.370999
--58.668997 41.587003 -40.883001
--60.403001 41.638900 -47.932997
--48.902098 -132.729992 13.741001
--50.682999 -142.811999 6.453900
--42.326998 -135.543004 16.329000
--49.369998 41.777000 -33.949099
--53.105000 40.630002 -34.493998
--51.591001 36.825001 -30.295100
--82.759105 -120.727994 -6.605100
--88.042997 -115.153000 -9.080000
--84.371105 -126.829103 -17.076999
--0.066000 -142.524987 -31.879000
-7.164900 -142.591998 -29.313998
-4.242000 -153.076991 -22.809999
--3.773100 -152.840003 -25.518999
--0.066000 -142.524987 -31.879000
-4.242000 -153.076991 -22.809999
-0.194000 -160.039991 -13.018000
--3.773100 -152.840003 -25.518999
-4.242000 -153.076991 -22.809999
-12.251001 -152.744994 -20.085000
-8.732000 -159.860998 -10.198000
-4.242000 -153.076991 -22.809999
-8.732000 -159.860998 -10.198000
-0.194000 -160.039991 -13.018000
-4.242000 -153.076991 -22.809999
--78.237996 -132.360995 -14.523000
--82.759105 -120.727994 -6.605100
--84.371105 -126.829103 -17.076999
-50.872002 18.461000 30.708000
-48.291899 14.293000 34.568999
-46.242002 16.163001 33.397898
--82.290098 -130.076990 -28.649999
--78.237996 -132.360995 -14.523000
--84.371105 -126.829103 -17.076999
--90.056002 -120.917000 -19.570999
--88.196002 -124.112003 -31.100100
--84.371105 -126.829103 -17.076999
--88.196002 -124.112003 -31.100100
--82.290098 -130.076990 -28.649999
--84.371105 -126.829103 -17.076999
-42.026002 19.555001 30.809000
-46.346001 22.218000 28.927000
-44.150002 17.916000 32.145001
-75.195901 -54.862998 17.784901
-85.782900 -54.010000 14.392001
-84.513001 -58.588099 12.776000
-46.346001 22.218000 28.927000
-48.638001 20.402901 29.857900
-44.150002 17.916000 32.145001
-85.782900 -54.010000 14.392001
-95.835902 -59.292000 13.444000
-84.513001 -58.588099 12.776000
--105.250999 -42.156000 -68.942100
--105.491996 -48.965998 -68.044998
--113.523103 -46.654001 -61.326999
-90.303004 -75.281002 7.820000
-79.029903 -72.038099 7.521900
-81.138000 -67.621104 9.338000
--69.352999 -33.659998 -59.285998
--66.878997 -34.812998 -49.814001
--69.518998 -37.613999 -59.071999
--113.082103 -39.451100 -62.396001
--105.250999 -42.156000 -68.942100
--113.523103 -46.654001 -61.326999
--105.491996 -48.965998 -68.044998
--113.444999 -53.981997 -60.131099
--113.523103 -46.654001 -61.326999
--66.878997 -34.812998 -49.814001
--66.749103 -38.430098 -49.458098
--69.518998 -37.613999 -59.071999
--118.185997 -44.544000 -52.014001
--113.082103 -39.451100 -62.396001
--113.523103 -46.654001 -61.326999
--113.444999 -53.981997 -60.131099
--118.207097 -51.999100 -50.652098
--113.523103 -46.654001 -61.326999
--118.207097 -51.999100 -50.652098
--118.185997 -44.544000 -52.014001
--113.523103 -46.654001 -61.326999
--69.435999 -41.625999 -58.743998
--75.769000 -39.724998 -66.726997
--69.518998 -37.613999 -59.071999
--35.647999 43.333001 -47.502998
--33.251997 39.090902 -51.041998
--37.124999 39.187901 -52.937999
--101.402998 5.945000 -40.305998
--97.402997 1.858000 -32.770999
--94.793998 6.438000 -33.500999
--91.972999 10.765000 -34.131099
--98.239996 10.800000 -40.911999
--94.793998 6.438000 -33.500999
--98.239996 10.800000 -40.911999
--101.402998 5.945000 -40.305998
--94.793998 6.438000 -33.500999
--87.275103 4.546000 -29.268999
--91.972999 10.765000 -34.131099
--94.793998 6.438000 -33.500999
-34.131002 -112.251997 -17.819099
-23.902001 -104.210995 -14.030000
-28.208001 -102.822997 -11.911999
--39.333999 33.215001 -57.131100
--41.176997 39.021902 -54.722998
--37.124999 39.187901 -52.937999
--41.176997 39.021902 -54.722998
--39.703000 43.355901 -49.077999
--37.124999 39.187901 -52.937999
--39.703000 43.355901 -49.077999
--35.647999 43.333001 -47.502998
--37.124999 39.187901 -52.937999
-5.751900 -97.262099 2.967000
-10.479000 -99.447995 -8.583999
-1.919000 -97.473003 0.990000
-13.194000 24.041001 11.142001
-10.458000 22.547001 12.366001
-9.795000 23.099001 9.303001
-98.425001 -37.839100 19.881001
-107.997000 -42.200100 23.326900
-98.273002 -43.145999 18.395001
--6.475000 -99.856101 10.600001
--2.451000 -100.036100 12.614001
-1.919000 -97.473003 0.990000
-10.479000 -99.447995 -8.583999
-6.473900 -99.856101 -10.601000
-1.919000 -97.473003 0.990000
--7.729100 -106.490001 -28.719001
--3.175000 -106.987998 -26.670100
--2.639000 -117.573999 -33.585001
-8.100000 -117.737003 -29.146999
-8.520001 -130.182996 -31.541098
-2.730000 -117.829099 -31.378999
-1.396000 -107.208997 -24.595000
-8.100000 -117.737003 -29.146999
-2.730000 -117.829099 -31.378999
-8.520001 -130.182996 -31.541098
-2.217000 -130.229995 -33.937100
-2.730000 -117.829099 -31.378999
-7.728000 -106.490001 28.718000
-3.174000 -106.987998 26.669001
-2.638000 -117.573999 33.583902
-7.979000 -116.975002 35.762999
-12.241000 -105.717100 30.739000
-7.728000 -106.490001 28.718000
-118.305899 -57.592001 38.410898
-117.295898 -65.003999 36.694001
-114.587896 -55.833999 28.173000
-5.606900 -99.707097 16.607901
-3.174000 -106.987998 26.669001
-9.614000 -99.194996 18.583000
--8.521000 -130.182996 31.540003
--14.804000 -129.712999 29.121900
--14.384000 -142.159000 26.731001
-114.587896 -55.833999 28.173000
-113.580003 -62.765002 26.388900
-107.100897 -54.535002 20.013001
--14.384000 -142.159000 26.731001
--7.166000 -142.591998 29.312901
--8.521000 -130.182996 31.540003
--2.731000 -117.829099 31.378001
--8.101000 -117.737003 29.145900
--8.521000 -130.182996 31.540003
--95.319100 -51.126998 -71.143001
--84.550105 -52.807998 -70.151098
--94.834000 -57.397999 -70.263103
-97.795896 -48.505101 16.825002
-107.749999 -48.339099 21.715000
-107.100897 -54.535002 20.013001
-98.273002 -43.145999 18.395001
-107.997000 -42.200100 23.326900
-107.749999 -48.339099 21.715000
-12.187000 24.986001 8.277001
-13.194000 24.041001 11.142001
-9.795000 23.099001 9.303001
-6.638000 22.620000 7.355000
-6.493000 23.263000 4.122000
-9.218001 23.919001 6.217000
--21.684999 -160.544991 -7.114000
--16.805099 -158.565998 -18.618999
--13.061000 -161.795005 -4.277000
--112.834997 -61.388999 -58.807999
--113.444999 -53.981997 -60.131099
--105.237998 -55.877998 -67.016996
--105.491996 -48.965998 -68.044998
--95.319100 -51.126998 -71.143001
--105.237998 -55.877998 -67.016996
--84.550105 -52.807998 -70.151098
--83.818100 -58.311101 -69.373101
--94.834000 -57.397999 -70.263103
--61.065000 -8.370000 -48.824102
--60.436100 -6.007000 -56.735098
--59.632000 -5.535000 -48.209000
--56.590099 -144.601002 -32.097999
--54.444101 -149.563998 -18.232999
--61.967999 -145.420000 -20.917999
--25.137000 -94.889000 -26.208099
--31.371098 -89.971103 -16.383000
--27.925000 -91.610096 -14.544000
--58.081102 -2.830000 -47.486998
--62.105000 -4.944000 -40.677000
--59.632000 -5.535000 -48.209000
-81.632003 -90.416998 1.608000
-78.064002 -95.151097 -0.574100
-71.059898 -84.652096 1.728000
-60.736902 -80.481105 6.203900
-63.451901 -77.124096 8.031000
-71.059898 -84.652096 1.728000
-78.064002 -95.151097 -0.574100
-67.869000 -88.578105 -0.308000
-71.059898 -84.652096 1.728000
--58.375001 26.853001 -29.108999
--61.500002 31.659901 -31.246999
--61.141998 24.687000 -29.340100
-78.532897 32.583002 49.928002
-82.957998 29.399000 50.126899
-79.568997 30.273002 42.263899
-82.957998 29.399000 50.126899
-83.587900 27.037000 42.215899
-79.568997 30.273002 42.263899
-105.250001 -42.156000 68.941005
-113.081001 -39.451100 62.394999
-104.531899 -35.487000 69.704004
--64.732105 29.510900 -31.386998
--63.836001 22.346999 -29.486099
--61.141998 24.687000 -29.340100
--67.425102 -23.744000 -41.203998
--65.376997 -20.876000 -50.186101
--66.933997 -20.416999 -41.361999
--61.500002 31.659901 -31.246999
--64.732105 29.510900 -31.386998
--61.141998 24.687000 -29.340100
-113.081001 -39.451100 62.394999
-112.139903 -32.410000 63.332997
-104.531899 -35.487000 69.704004
-94.948895 -38.839098 72.512999
-105.250001 -42.156000 68.941005
-104.531899 -35.487000 69.704004
--71.397103 -20.864999 -33.459000
--67.425102 -23.744000 -41.203998
--66.933997 -20.416999 -41.361999
-78.530900 2.365000 72.433896
-72.724901 -4.547000 70.730999
-81.620000 -1.823000 72.947897
--65.376997 -20.876000 -50.186101
--64.538099 -17.590100 -50.007999
--66.933997 -20.416999 -41.361999
--115.013100 -74.731104 -45.861099
--116.629995 -67.136101 -47.571000
--111.680098 -68.833999 -57.363000
-75.190000 -8.454099 71.291000
-77.430904 -12.616999 71.708903
-84.472001 -6.327100 73.316000
-91.507003 -0.320000 71.336895
-97.461902 4.488900 66.073902
-88.155895 4.478000 71.102895
-97.461902 4.488900 66.073902
-93.805000 9.491000 66.038005
-88.155895 4.478000 71.102895
-77.330001 -46.987001 20.500001
-86.777903 -49.417000 15.935000
-76.375000 -50.937999 19.180000
-85.782900 -54.010000 14.392001
-75.195901 -54.862998 17.784901
-76.375000 -50.937999 19.180000
-86.777903 -49.417000 15.935000
-85.782900 -54.010000 14.392001
-76.375000 -50.937999 19.180000
-43.396901 -86.236097 9.036000
-37.942000 -86.139999 19.947000
-46.494901 -83.823994 10.854901
--19.881999 36.645900 -42.451099
--18.357100 40.034901 -38.137101
--17.112000 35.666000 -40.078998
--15.553100 38.923901 -35.995997
--14.579100 34.596000 -37.632000
--17.112000 35.666000 -40.078998
--14.579100 34.596000 -37.632000
--17.364999 30.729000 -40.828999
--17.112000 35.666000 -40.078998
--19.850999 31.520002 -43.429099
--19.881999 36.645900 -42.451099
--17.112000 35.666000 -40.078998
--59.611998 17.735001 -29.868999
--55.132002 14.189000 -32.158099
--57.287998 20.037999 -29.510999
--79.821996 -115.709998 -52.478101
--74.330099 -105.616994 -58.989000
--69.773100 -110.832103 -57.113998
--64.821996 -115.745105 -55.152100
--74.541099 -121.312000 -50.354999
--69.773100 -110.832103 -57.113998
--74.541099 -121.312000 -50.354999
--79.821996 -115.709998 -52.478101
--69.773100 -110.832103 -57.113998
--59.576999 -104.259104 -57.380099
--64.821996 -115.745105 -55.152100
--69.773100 -110.832103 -57.113998
--61.141998 24.687000 -29.340100
--63.836001 22.346999 -29.486099
--57.287998 20.037999 -29.510999
--68.190105 12.932000 -70.018001
--72.668999 19.975001 -68.705104
--64.499103 15.770001 -68.921998
--68.463996 22.892900 -67.740001
--60.743101 18.267000 -67.682996
--64.499103 15.770001 -68.921998
--61.230000 8.305000 -67.083098
--68.190105 12.932000 -70.018001
--64.499103 15.770001 -68.921998
--60.743101 18.267000 -67.682996
--58.095101 10.802000 -65.820999
--64.499103 15.770001 -68.921998
-31.166900 45.462999 34.637999
-31.138901 45.166902 40.137999
-34.777001 45.616999 35.823002
--72.525099 28.589999 -63.716002
--77.051103 25.576901 -64.462997
--76.059997 31.993002 -57.459999
--77.051103 25.576901 -64.462997
--80.664098 28.885901 -57.939999
--76.059997 31.993002 -57.459999
--80.664098 28.885901 -57.939999
--78.534000 32.583002 -49.929101
--76.059997 31.993002 -57.459999
--78.534000 32.583002 -49.929101
--74.036099 35.394002 -49.606998
--76.059997 31.993002 -57.459999
-51.416900 30.825000 62.472902
-49.424902 23.767000 63.131899
-55.640899 29.384000 63.997000
-58.743902 35.241999 60.644999
-51.416900 30.825000 62.472902
-55.640899 29.384000 63.997000
-53.173002 22.253901 64.786002
-59.914000 27.590001 65.384001
-55.640899 29.384000 63.997000
--21.358998 -96.300103 -24.350999
--16.698999 -104.667000 -32.727100
--21.080000 -103.348002 -34.674998
-49.424902 23.767000 63.131899
-53.173002 22.253901 64.786002
-55.640899 29.384000 63.997000
--23.590999 -113.133103 -42.074099
--25.365001 -101.764001 -36.581099
--21.080000 -103.348002 -34.674998
--16.698999 -104.667000 -32.727100
--18.482100 -114.749998 -40.013101
--21.080000 -103.348002 -34.674998
--18.482100 -114.749998 -40.013101
--23.590999 -113.133103 -42.074099
--21.080000 -103.348002 -34.674998
--25.365001 -101.764001 -36.581099
--25.137000 -94.889000 -26.208099
--21.080000 -103.348002 -34.674998
--96.987002 -53.895999 -15.174000
--86.778998 -49.417000 -15.936000
--97.796999 -48.505101 -16.826099
--87.503999 -44.826999 -17.402999
--98.274104 -43.145999 -18.395999
--97.796999 -48.505101 -16.826099
--107.749999 -48.339099 -21.716001
--107.101999 -54.535002 -20.013999
--97.796999 -48.505101 -16.826099
-31.369999 -89.971103 16.381901
-28.822001 -93.263097 28.024001
-34.712002 -88.143997 18.186001
--107.101999 -54.535002 -20.013999
--96.987002 -53.895999 -15.174000
--97.796999 -48.505101 -16.826099
-40.159900 -88.477999 7.178900
-31.369999 -89.971103 16.381901
-34.712002 -88.143997 18.186001
-37.942000 -86.139999 19.947000
-34.712002 -88.143997 18.186001
-32.400999 -91.427103 29.797001
-37.942000 -86.139999 19.947000
-43.396901 -86.236097 9.036000
-34.712002 -88.143997 18.186001
-43.396901 -86.236097 9.036000
-40.159900 -88.477999 7.178900
-34.712002 -88.143997 18.186001
-24.388000 -93.056999 12.670000
-29.704001 -94.116993 1.414000
-20.773001 -94.307996 10.769000
-10.329001 -129.052997 38.644999
-4.077000 -129.852995 36.304999
-7.275000 -141.955987 34.416899
-3.772000 -152.840003 25.517900
-7.275000 -141.955987 34.416899
-0.064900 -142.524987 31.878002
--4.243100 -153.076991 22.809001
-3.772000 -152.840003 25.517900
-0.064900 -142.524987 31.878002
--7.166000 -142.591998 29.312901
--4.243100 -153.076991 22.809001
-0.064900 -142.524987 31.878002
--115.013100 -74.731104 -45.861099
--112.833999 -82.282998 -44.041999
--115.754999 -72.425105 -34.874100
-0.064900 -142.524987 31.878002
-7.275000 -141.955987 34.416899
-4.077000 -129.852995 36.304999
--2.218000 -130.229995 33.936001
--7.166000 -142.591998 29.312901
-0.064900 -142.524987 31.878002
--59.611998 17.735001 -29.868999
--66.445999 19.833000 -29.546000
--61.845101 15.288901 -30.143999
--113.677099 -79.808995 -32.952998
--112.087995 -69.703102 -24.511999
--115.754999 -72.425105 -34.874100
--19.531099 23.822900 -17.938999
--23.448000 25.718901 -18.774100
--21.049000 23.054000 -20.465100
--27.181000 23.825001 -23.091000
--29.087000 22.833001 -25.180100
--24.250001 21.576900 -25.413100
-4.401000 30.489901 -7.315100
-4.131000 27.565001 -6.981000
-3.210000 29.589999 -9.469000
--16.548099 22.135001 -19.632999
--19.531099 23.822900 -17.938999
--21.049000 23.054000 -20.465100
-87.274000 4.546000 29.267900
-84.917903 8.406000 29.854000
-91.972001 10.765000 34.130000
-2.773000 32.568999 -9.450000
-4.401000 30.489901 -7.315100
-3.210000 29.589999 -9.469000
-1.889000 31.475000 -11.766000
-1.863000 28.402900 -11.601000
-0.787000 30.048000 -14.110000
-21.079000 -103.348002 34.673899
-25.364000 -101.764001 36.580000
-25.135901 -94.889000 26.207000
-31.369999 -89.971103 16.381901
-27.923901 -91.610096 14.543001
-25.135901 -94.889000 26.207000
--23.125000 39.562900 -19.730000
--22.698000 41.862901 -22.643998
--25.993999 39.352000 -20.972999
-25.364000 -101.764001 36.580000
-28.822001 -93.263097 28.024001
-25.135901 -94.889000 26.207000
--25.695998 41.971002 -23.847099
--28.903000 39.007898 -22.135999
--25.993999 39.352000 -20.972999
--25.638999 36.310002 -18.798999
--23.125000 39.562900 -19.730000
--25.993999 39.352000 -20.972999
-5.986900 34.431901 -1.805000
-3.009000 36.069002 -3.586000
-4.157000 36.416002 -0.667000
--22.698000 41.862901 -22.643998
--25.695998 41.971002 -23.847099
--25.993999 39.352000 -20.972999
-1.804000 37.423000 0.758000
-5.260000 36.866002 2.334000
-4.157000 36.416002 -0.667000
-3.009000 36.069002 -3.586000
-0.712000 37.300900 -2.251000
-4.157000 36.416002 -0.667000
-0.712000 37.300900 -2.251000
-1.804000 37.423000 0.758000
-4.157000 36.416002 -0.667000
-5.260000 36.866002 2.334000
-7.264900 35.084900 1.105900
-4.157000 36.416002 -0.667000
--28.767100 41.932900 -24.962999
--28.239099 44.095002 -28.723000
--31.902999 41.742001 -25.993099
--38.341001 40.852003 -27.781999
--37.799001 37.109002 -25.122998
--35.098001 41.383900 -26.931999
-56.861900 39.236899 34.944002
-58.667902 41.587003 40.881902
-60.631000 37.596002 35.298899
--31.844001 38.527001 -23.216000
--28.767100 41.932900 -24.962999
--31.902999 41.742001 -25.993099
--104.208998 -101.315103 -26.632000
--107.899100 -94.297998 -28.827000
--106.791101 -97.075999 -40.096100
-58.223899 33.594999 31.017000
-56.861900 39.236899 34.944002
-60.631000 37.596002 35.298899
-56.563899 -67.790098 30.809000
-55.722002 -70.263997 41.897900
-58.556899 -64.669997 32.105900
-58.667902 41.587003 40.881902
-62.872998 39.952900 41.369900
-60.631000 37.596002 35.298899
-61.691001 -66.418000 20.728001
-56.563899 -67.790098 30.809000
-58.556899 -64.669997 32.105900
-63.729897 -12.073000 58.095001
-66.027001 -7.336000 65.223902
-62.152002 -8.959000 57.473902
-58.743902 35.241999 60.644999
-62.008899 38.938899 55.241000
-57.359003 40.497001 54.248001
-55.909000 43.026999 47.143999
-52.775003 41.699000 53.130999
-57.359003 40.497001 54.248001
-52.775003 41.699000 53.130999
-54.201901 36.699999 59.354000
-57.359003 40.497001 54.248001
-54.201901 36.699999 59.354000
-58.743902 35.241999 60.644999
-57.359003 40.497001 54.248001
-61.063901 -8.370000 48.823003
-62.368002 -11.326999 49.325999
-62.152002 -8.959000 57.473902
-66.027001 -7.336000 65.223902
-63.866004 -4.120000 64.447902
-62.152002 -8.959000 57.473902
-63.866004 -4.120000 64.447902
-60.435001 -6.007000 56.733999
-62.152002 -8.959000 57.473902
--57.141997 11.864000 -32.755099
--59.611998 17.735001 -29.868999
--61.845101 15.288901 -30.143999
--54.203000 36.699999 -59.354998
--58.745001 35.241999 -60.646001
--57.360101 40.497001 -54.249100
--58.745001 35.241999 -60.646001
--62.009998 38.938899 -55.242099
--57.360101 40.497001 -54.249100
-54.201901 36.699999 59.354000
-52.775003 41.699000 53.130999
-49.742002 37.800901 57.932898
-51.416900 30.825000 62.472902
-54.201901 36.699999 59.354000
-49.742002 37.800901 57.932898
-45.389902 38.569000 56.388002
-47.271900 31.930000 60.819000
-49.742002 37.800901 57.932898
-47.271900 31.930000 60.819000
-51.416900 30.825000 62.472902
-49.742002 37.800901 57.932898
--66.445999 19.833000 -29.546000
--68.962000 17.148999 -29.521000
--61.845101 15.288901 -30.143999
--63.979097 12.704001 -30.335000
--59.058998 9.413901 -33.264000
--61.845101 15.288901 -30.143999
-65.084897 -61.882000 55.472001
-61.368000 -60.123101 45.235001
-63.415997 -65.831102 54.512002
-57.813901 -66.976994 43.094002
-55.722002 -70.263997 41.897900
-59.289999 -73.467106 52.305002
-64.134002 -81.267998 59.186000
-66.725902 -76.905996 60.449000
-59.289999 -73.467106 52.305002
--66.400103 -18.764000 -58.972098
--69.846101 -14.403000 -66.383101
--65.153003 -15.346000 -58.592997
-12.241000 -105.717100 30.739000
-7.979000 -116.975002 35.762999
-13.267000 -116.031997 37.907001
--64.538099 -17.590100 -50.007999
--66.400103 -18.764000 -58.972098
--65.153003 -15.346000 -58.592997
--69.846101 -14.403000 -66.383101
--68.028003 -10.766000 -65.871105
--65.153003 -15.346000 -58.592997
--63.731000 -12.075000 -58.096100
--62.369000 -11.326999 -49.327001
--63.529998 -14.403000 -49.722999
-82.688004 -63.819997 68.471998
-72.571896 -63.180096 63.631900
-81.156902 -69.303103 67.456000
--1.890000 31.475000 11.765000
--3.211000 29.589999 9.468000
--1.864000 28.402900 11.600001
-92.482001 -70.008099 68.125002
-82.688004 -63.819997 68.471998
-81.156902 -69.303103 67.456000
-61.368000 -60.123101 45.235001
-61.984003 -58.172099 34.478001
-59.699003 -63.590996 44.206999
--4.739000 33.914000 4.557000
--2.047000 35.707001 6.328000
--3.010000 36.069002 3.585000
--2.047000 35.707001 6.328000
-0.218900 37.201900 5.158900
--3.010000 36.069002 3.585000
--0.713000 37.300900 2.250000
--4.158000 36.416002 0.666000
--3.010000 36.069002 3.585000
-0.218900 37.201900 5.158900
--0.713000 37.300900 2.250000
--3.010000 36.069002 3.585000
--64.941101 39.911900 -48.609100
--62.874101 39.952900 -41.370999
--60.403001 41.638900 -47.932997
--58.668997 41.587003 -40.883001
--55.909999 43.026999 -47.145098
--60.403001 41.638900 -47.932997
--62.009998 38.938899 -55.242099
--64.941101 39.911900 -48.609100
--60.403001 41.638900 -47.932997
--55.909999 43.026999 -47.145098
--57.360101 40.497001 -54.249100
--60.403001 41.638900 -47.932997
--57.360101 40.497001 -54.249100
--62.009998 38.938899 -55.242099
--60.403001 41.638900 -47.932997
--8.237099 26.256001 -26.916999
--9.646000 27.141999 -29.802099
--6.707000 29.902902 -27.205000
--11.254000 28.054001 -32.639001
--10.204100 32.285899 -32.535002
--8.349000 31.093901 -29.896000
-33.348899 25.072001 24.718901
-36.776002 28.204901 24.405001
-35.533000 23.836000 26.349001
-22.576900 -126.198992 43.207001
-23.590000 -113.133103 42.073000
-18.481001 -114.749998 40.012002
-23.590000 -113.133103 42.073000
-21.079000 -103.348002 34.673899
-18.481001 -114.749998 40.012002
-16.697900 -104.667000 32.726001
-13.267000 -116.031997 37.907001
-18.481001 -114.749998 40.012002
-21.079000 -103.348002 34.673899
-16.697900 -104.667000 32.726001
-18.481001 -114.749998 40.012002
-51.715001 14.942001 62.893003
-53.173002 22.253901 64.786002
-48.529901 16.603000 61.229002
-16.506001 -127.833992 40.945899
-22.576900 -126.198992 43.207001
-18.481001 -114.749998 40.012002
-50.972901 6.638000 43.541901
-48.215002 8.079001 49.805000
-46.027001 9.835000 48.255000
-49.424902 23.767000 63.131899
-45.382902 18.003900 59.441000
-48.529901 16.603000 61.229002
-45.382902 18.003900 59.441000
-46.250902 12.071000 55.387001
-48.529901 16.603000 61.229002
-31.166900 45.462999 34.637999
-34.777001 45.616999 35.823002
-34.958899 44.117998 30.833000
-48.868001 10.420000 57.055000
-51.715001 14.942001 62.893003
-48.529901 16.603000 61.229002
-31.548902 44.195902 29.822901
-31.166900 45.462999 34.637999
-34.958899 44.117998 30.833000
-41.622002 40.137000 28.544001
-38.339999 40.852003 27.781000
-38.458001 43.848898 31.752001
--82.689099 -63.819997 -68.472996
--83.818100 -58.311101 -69.373101
--73.863998 -58.477100 -64.483099
--81.157997 -69.303103 -67.457102
--82.689099 -63.819997 -68.472996
--72.572999 -63.180096 -63.633002
--66.500001 -44.484101 -38.248099
--70.236102 -45.731999 -28.292000
--65.667003 -47.959998 -37.432998
-66.402003 -42.071000 48.998002
-67.134000 -40.993098 38.972002
-65.838896 -45.722999 48.436999
-65.665998 -47.959998 37.431899
-65.054998 -49.369998 47.777902
-66.499002 -44.484101 38.247000
--70.236102 -45.731999 -28.292000
--69.301099 -49.298998 -27.218999
--65.667003 -47.959998 -37.432998
--37.943099 -86.139999 -19.948000
--43.398000 -86.236097 -9.037000
--34.713101 -88.143997 -18.187100
--69.301099 -49.298998 -27.218999
--64.637102 -51.409099 -36.533099
--65.667003 -47.959998 -37.432998
-42.369898 45.279898 37.904900
-46.330001 44.756901 38.799901
-45.673899 42.688899 33.307899
--32.402098 -91.427103 -29.798100
--37.943099 -86.139999 -19.948000
--34.713101 -88.143997 -18.187100
--43.398000 -86.236097 -9.037000
--40.160999 -88.477999 -7.180000
--34.713101 -88.143997 -18.187100
-54.109000 7.967000 37.555002
-57.140898 11.864000 32.754000
-59.057899 9.413901 33.263002
-110.107005 -76.608099 22.545001
-111.055002 -87.114997 30.936001
-107.634999 -83.442099 20.489901
-102.668896 -73.166996 14.402000
-110.107005 -76.608099 22.545001
-107.634999 -83.442099 20.489901
-87.758005 -80.457099 5.809000
-84.864900 -85.512102 3.736900
-76.647006 -76.361999 5.644900
-57.819001 -83.697997 4.328000
-64.420901 -92.332102 -2.386000
-54.702900 -86.764000 2.410000
-40.159900 -88.477999 7.178900
-43.396901 -86.236097 9.036000
-47.915999 -92.376001 -1.547100
--0.066000 -142.524987 -31.879000
--3.773100 -152.840003 -25.518999
--7.276100 -141.955987 -34.417998
--3.773100 -152.840003 -25.518999
--11.745000 -152.037993 -28.208099
--7.276100 -141.955987 -34.417998
--11.745000 -152.037993 -28.208099
--14.420999 -140.884995 -36.925998
--7.276100 -141.955987 -34.417998
--4.078100 -129.852995 -36.306001
--0.066000 -142.524987 -31.879000
--7.276100 -141.955987 -34.417998
-79.029903 -72.038099 7.521900
-87.758005 -80.457099 5.809000
-76.647006 -76.361999 5.644900
--6.532100 33.798900 -26.722999
--5.669100 35.980899 -23.382999
--4.796100 32.441001 -24.247998
-76.647006 -76.361999 5.644900
-73.987901 -80.572002 3.713000
-65.958001 -73.639996 9.807000
-59.596002 -69.614999 19.224001
-61.691001 -66.418000 20.728001
-68.248004 -70.046999 11.527000
--56.590099 -144.601002 -32.097999
--61.967999 -145.420000 -20.917999
--63.720100 -140.193000 -34.649000
--56.248099 -135.838002 -43.509997
--56.590099 -144.601002 -32.097999
--63.720100 -140.193000 -34.649000
--70.478998 -135.309994 -37.138999
--62.722996 -131.411001 -45.866102
--63.720100 -140.193000 -34.649000
--62.722996 -131.411001 -45.866102
--56.248099 -135.838002 -43.509997
--63.720100 -140.193000 -34.649000
--106.928103 -4.651100 -38.751997
--101.888999 -8.016000 -31.004999
--99.776097 -2.964000 -31.938002
--97.402997 1.858000 -32.770999
--104.308002 0.790000 -39.584998
--99.776097 -2.964000 -31.938002
--104.308002 0.790000 -39.584998
--106.928103 -4.651100 -38.751997
--99.776097 -2.964000 -31.938002
--9.614999 -99.194996 -18.584000
--3.175000 -106.987998 -26.670100
--7.729100 -106.490001 -28.719001
--5.669100 35.980899 -23.382999
--5.526100 37.534002 -20.073999
--3.780000 34.569900 -21.157000
--3.438000 36.180902 -18.090999
--2.070000 33.117998 -18.872000
--3.780000 34.569900 -21.157000
--2.070000 33.117998 -18.872000
--3.257000 31.076001 -21.718999
--3.780000 34.569900 -21.157000
-58.094002 10.802000 65.819904
-60.742002 18.267000 67.681901
-54.911900 13.012000 64.424001
--106.044002 -60.759000 -18.226000
--107.101999 -54.535002 -20.013999
--113.581099 -62.765002 -26.389999
-56.956999 20.423900 66.303998
-51.715001 14.942001 62.893003
-54.911900 13.012000 64.424001
-51.715001 14.942001 62.893003
-51.491000 8.559000 58.603998
-54.911900 13.012000 64.424001
-17.985001 28.600000 12.029001
-20.325001 31.100001 13.741001
-19.798901 27.606001 14.303001
-54.095000 6.477000 60.028899
-58.094002 10.802000 65.819904
-54.911900 13.012000 64.424001
-16.614901 25.537001 12.812001
-17.985001 28.600000 12.029001
-19.798901 27.606001 14.303001
-18.054999 24.642000 15.387001
-16.614901 25.537001 12.812001
-19.798901 27.606001 14.303001
--50.320998 -118.459001 14.515000
--48.902098 -132.729992 13.741001
--44.804100 -121.279001 16.936000
-22.489000 30.193999 15.687000
-21.617001 26.652901 16.554002
-19.798901 27.606001 14.303001
--48.902098 -132.729992 13.741001
--39.090101 -123.741001 19.368000
--44.804100 -121.279001 16.936000
--39.090101 -123.741001 19.368000
--34.132000 -112.251997 17.818000
--44.804100 -121.279001 16.936000
--79.008102 25.413001 -35.638999
--75.457104 28.392000 -35.765000
--79.570003 30.273002 -42.264998
--72.525099 28.589999 -63.716002
--76.059997 31.993002 -57.459999
--71.393996 34.699000 -56.848999
--76.059997 31.993002 -57.459999
--74.036099 35.394002 -49.606998
--71.393996 34.699000 -56.848999
-27.697900 45.117002 33.360001
-24.377001 44.597000 31.989001
-24.128001 44.005003 37.000000
--79.008102 25.413001 -35.638999
--74.022099 21.760000 -31.274099
--75.457104 28.392000 -35.765000
-19.076001 25.975000 40.270902
-17.059000 25.468901 37.500001
-21.986000 22.128901 38.493000
-53.839002 -124.541998 50.979901
-62.721997 -131.411001 45.865003
-59.500899 -120.324001 53.103998
-64.820901 -115.745105 55.151001
-55.073000 -108.392999 55.567000
-59.500899 -120.324001 53.103998
--53.840101 -124.541998 -50.981000
--50.267000 -112.231106 -53.675998
--45.180999 -115.747102 -51.709998
--38.068101 -106.363997 -47.939997
--39.841998 -118.918002 -49.674999
--45.180999 -115.747102 -51.709998
-25.165001 -156.920001 21.388000
-19.628901 -150.672004 30.864900
-16.804000 -158.565998 18.618001
-13.060001 -161.795005 4.276000
-21.684000 -160.544991 7.112900
-16.804000 -158.565998 18.618001
-21.684000 -160.544991 7.112900
-25.165001 -156.920001 21.388000
-16.804000 -158.565998 18.618001
-23.870001 20.166900 33.185001
-25.649000 19.777000 35.762001
-20.135000 22.062000 35.754003
-27.544001 19.343901 38.277000
-26.170000 22.118000 43.777000
-23.996001 22.156000 41.168898
-59.631001 -5.535000 48.208002
-60.435001 -6.007000 56.733999
-58.596000 -3.224000 55.872001
-60.435001 -6.007000 56.733999
-63.866004 -4.120000 64.447902
-61.567999 -1.129000 63.540004
-59.157003 1.636000 62.499002
-56.652002 -0.616000 54.889899
-58.596000 -3.224000 55.872001
--8.363000 35.959899 -4.044100
--9.924000 33.590000 -3.092100
--7.266000 35.084900 -1.107000
--23.996999 22.156000 -41.169997
--26.170999 22.118000 -43.777999
--23.716999 26.811000 -45.612000
-58.556899 -64.669997 32.105900
-57.813901 -66.976994 43.094002
-60.366001 -61.460000 33.331003
--31.670101 18.274900 -43.098997
--30.994000 21.746000 -48.751000
--28.504999 21.989001 -46.306998
--28.504999 21.989001 -46.306998
--30.994000 21.746000 -48.751000
--29.157000 27.225001 -50.625000
-2.046000 35.707001 -6.329000
-3.670000 33.348899 -7.086000
-1.355000 35.179999 -8.909999
-0.841000 34.365002 -11.421000
--1.124000 36.630999 -10.619099
-1.355000 35.179999 -8.909999
-2.773000 32.568999 -9.450000
-0.841000 34.365002 -11.421000
-1.355000 35.179999 -8.909999
--68.310998 -25.997000 -59.367098
--66.041999 -24.254000 -50.253000
--66.518001 -27.712001 -50.214101
--0.826000 37.021901 -7.933101
-2.046000 35.707001 -6.329000
-1.355000 35.179999 -8.909999
-21.464001 -139.322996 39.395001
-19.628901 -150.672004 30.864900
-27.385000 -148.752004 33.490002
-48.638001 20.402901 29.857900
-46.346001 22.218000 28.927000
-49.860999 26.068000 27.930900
-55.541001 28.840901 28.795000
-52.402902 24.207002 28.541001
-49.860999 26.068000 27.930900
--66.878997 -34.812998 -49.814001
--69.352999 -33.659998 -59.285998
--66.801101 -31.234000 -50.067101
--35.861999 -89.388996 -31.521000
--37.473001 -95.488995 -41.995000
--39.188001 -87.157995 -33.194099
--37.473001 -95.488995 -41.995000
--41.201100 -92.922993 -43.683998
--39.188001 -87.157995 -33.194099
--74.179098 -85.274100 -63.741103
--64.135104 -81.267998 -59.187099
--71.072996 -90.329103 -62.291998
--78.473002 -100.137100 -60.771000
--82.184002 -94.425105 -62.456101
--71.072996 -90.329103 -62.291998
--30.184099 -158.681005 -9.936000
--25.643000 -157.675996 4.556000
--33.918999 -155.686989 1.746000
--67.596100 -95.197998 -60.745999
--78.473002 -100.137100 -60.771000
--71.072996 -90.329103 -62.291998
--37.409998 15.416000 -41.056000
--35.349000 16.510000 -39.028000
--41.014001 15.527001 -36.403000
--35.806000 -148.391992 11.883000
--42.013101 -153.117999 -1.045000
--33.918999 -155.686989 1.746000
--25.643000 -157.675996 4.556000
--28.076999 -150.393993 14.614000
--33.918999 -155.686989 1.746000
--28.076999 -150.393993 14.614000
--35.806000 -148.391992 11.883000
--33.918999 -155.686989 1.746000
--42.013101 -153.117999 -1.045000
--38.507000 -156.218991 -12.735000
--33.918999 -155.686989 1.746000
--38.507000 -156.218991 -12.735000
--30.184099 -158.681005 -9.936000
--33.918999 -155.686989 1.746000
-99.775001 -2.964000 31.936999
-104.306899 0.790000 39.583899
-106.927000 -4.651100 38.750902
-104.306899 0.790000 39.583899
-109.072901 -3.198000 48.069902
-106.927000 -4.651100 38.750902
-109.072901 -3.198000 48.069902
-111.708000 -9.207000 47.278900
-106.927000 -4.651100 38.750902
-111.708000 -9.207000 47.278900
-109.233998 -10.358000 37.806898
-106.927000 -4.651100 38.750902
-109.233998 -10.358000 37.806898
-101.888001 -8.016000 31.003900
-106.927000 -4.651100 38.750902
-101.888001 -8.016000 31.003900
-99.775001 -2.964000 31.936999
-106.927000 -4.651100 38.750902
--38.987000 16.958000 -34.713101
--44.151101 17.916000 -32.145999
--41.014001 15.527001 -36.403000
--35.534099 23.836000 -26.350100
--31.021001 21.797001 -27.215099
--33.349998 25.072001 -24.720000
-54.159001 -80.622099 49.747001
-61.233003 -85.482098 57.827901
-56.846999 -77.113003 51.068999
--46.243098 16.163001 -33.398997
--43.041099 13.989001 -38.013101
--41.014001 15.527001 -36.403000
-53.423900 -73.440105 40.624000
-54.159001 -80.622099 49.747001
-56.846999 -77.113003 51.068999
-64.046897 -52.995998 47.022901
-67.625001 -53.819999 57.096999
-65.054998 -49.369998 47.777902
-61.233003 -85.482098 57.827901
-64.134002 -81.267998 59.186000
-56.846999 -77.113003 51.068999
-55.722002 -70.263997 41.897900
-53.423900 -73.440105 40.624000
-56.846999 -77.113003 51.068999
-67.625001 -53.819999 57.096999
-68.494007 -49.749099 57.754003
-65.054998 -49.369998 47.777902
-64.134002 -81.267998 59.186000
-59.289999 -73.467106 52.305002
-56.846999 -77.113003 51.068999
-31.863000 30.486001 21.690000
-29.398000 31.468000 20.229001
-31.065900 34.976002 21.377999
-70.234999 -45.731999 28.291000
-65.665998 -47.959998 37.431899
-66.499002 -44.484101 38.247000
-7.264900 35.084900 1.105900
-9.923000 33.590000 3.091000
-8.496000 32.539003 0.261000
-70.069000 -0.909000 70.028901
-75.239897 6.224900 71.775004
-67.247003 2.447900 69.185898
--81.148103 -21.650000 -72.129995
--79.427101 -17.021000 -71.989000
--72.845101 -22.243099 -67.014001
-63.866004 -4.120000 64.447902
-70.069000 -0.909000 70.028901
-67.247003 2.447900 69.185898
-67.247003 2.447900 69.185898
-64.291000 5.520900 68.204999
-61.567999 -1.129000 63.540004
--71.458101 -18.232999 -66.763997
--67.458101 -22.320000 -59.229098
--72.845101 -22.243099 -67.014001
--78.861997 -27.337000 -25.930999
--87.818101 -26.813000 -22.480000
--78.974001 -31.212000 -25.007999
-1.042000 24.325000 -8.010999
-0.767000 25.617000 -10.952000
-2.604000 26.694901 -8.963999
-105.258003 -18.750001 28.836001
-97.044900 -22.437999 23.825001
-96.015900 -17.539000 24.961000
--78.550100 -23.511998 -26.771000
--87.288104 -22.473000 -23.542998
--78.861997 -27.337000 -25.930999
-82.688004 -63.819997 68.471998
-93.889900 -63.703999 69.253899
-83.816998 -58.311101 69.371998
--87.288104 -22.473000 -23.542998
--87.818101 -26.813000 -22.480000
--78.861997 -27.337000 -25.930999
--24.378099 44.597000 -31.989999
--28.239099 44.095002 -28.723000
--25.031999 43.827899 -27.532000
-93.889900 -63.703999 69.253899
-94.833001 -57.397999 70.262000
-83.816998 -58.311101 69.371998
--83.588995 27.037000 -42.216998
--79.008102 25.413001 -35.638999
--79.570003 30.273002 -42.264998
--25.695998 41.971002 -23.847099
--22.698000 41.862901 -22.643998
--21.938998 43.409899 -26.250999
--75.457104 28.392000 -35.765000
--75.461000 33.179000 -42.202998
--79.570003 30.273002 -42.264998
--82.958996 29.399000 -50.127998
--83.588995 27.037000 -42.216998
--79.570003 30.273002 -42.264998
--75.461000 33.179000 -42.202998
--78.534000 32.583002 -49.929101
--79.570003 30.273002 -42.264998
--78.534000 32.583002 -49.929101
--82.958996 29.399000 -50.127998
--79.570003 30.273002 -42.264998
-33.631001 21.367000 51.102001
-32.159902 27.204001 52.990001
-30.993000 21.746000 48.749998
-28.503900 21.989001 46.305902
-31.669002 18.274900 43.097902
-30.993000 21.746000 48.749998
-33.890899 17.600000 45.389902
-33.631001 21.367000 51.102001
-30.993000 21.746000 48.749998
--18.201999 43.110002 -28.983001
--17.882001 42.199999 -33.501998
--21.210000 43.922000 -30.531099
--36.777101 28.204901 -24.406100
--34.325100 29.399900 -23.084000
--36.522999 33.143003 -23.656100
--34.812998 37.895001 -24.211999
--37.799001 37.109002 -25.122998
--36.522999 33.143003 -23.656100
-28.208001 -102.822997 -11.911999
-18.367000 -97.961999 -4.553000
-22.225000 -96.890002 -2.550000
-109.233998 -10.358000 37.806898
-113.972001 -15.499000 46.367999
-111.199901 -16.314000 36.751900
-113.972001 -15.499000 46.367999
-115.834899 -22.052100 45.333002
-111.199901 -16.314000 36.751900
-115.834899 -22.052100 45.333002
-112.804003 -22.497000 35.588000
-111.199901 -16.314000 36.751900
-103.722900 -13.285000 29.971000
-109.233998 -10.358000 37.806898
-111.199901 -16.314000 36.751900
-56.589000 -144.601002 32.097001
-54.443002 -149.563998 18.232001
-61.966900 -145.420000 20.916902
--49.425997 23.767000 -63.133001
--51.417999 30.825000 -62.473997
--45.743100 24.979001 -61.347999
--21.938998 43.409899 -26.250999
--18.201999 43.110002 -28.983001
--21.210000 43.922000 -30.531099
--45.383997 18.003900 -59.442099
--49.425997 23.767000 -63.133001
--45.743100 24.979001 -61.347999
--42.151101 25.906000 -59.437100
--42.298999 19.162999 -57.528000
--45.743100 24.979001 -61.347999
--2.158000 25.420001 -15.937999
--5.140000 23.913000 -18.018000
--2.991000 26.479000 -18.834000
--47.272999 31.930000 -60.819998
--42.151101 25.906000 -59.437100
--45.743100 24.979001 -61.347999
-60.366001 -61.460000 33.331003
-65.315999 -59.759997 23.538001
-63.597903 -63.130103 22.166001
-117.295898 -65.003999 36.694001
-118.305899 -57.592001 38.410898
-116.628900 -67.136101 47.569901
--31.066999 34.976002 -21.379000
--29.399099 31.468000 -20.229999
--28.347999 35.700999 -20.125000
-111.679003 -68.833999 57.361901
-115.011998 -74.731104 45.860000
-116.628900 -67.136101 47.569901
--106.928103 -4.651100 -38.751997
--104.308002 0.790000 -39.584998
--109.073997 -3.198000 -48.071001
--104.308002 0.790000 -39.584998
--106.100000 2.505000 -48.737001
--109.073997 -3.198000 -48.071001
--106.100000 2.505000 -48.737001
--108.002998 -3.879000 -57.542000
--109.073997 -3.198000 -48.071001
--108.002998 -3.879000 -57.542000
--110.769995 -10.004000 -56.945000
--109.073997 -3.198000 -48.071001
-112.833902 -61.388999 58.806900
-111.679003 -68.833999 57.361901
-116.628900 -67.136101 47.569901
--28.903000 39.007898 -22.135999
--31.066999 34.976002 -21.379000
--28.347999 35.700999 -20.125000
--25.638999 36.310002 -18.798999
--25.993999 39.352000 -20.972999
--28.347999 35.700999 -20.125000
--15.053100 41.111901 -31.628098
--15.353000 42.175900 -27.352000
--12.421000 39.930001 -29.673999
--25.993999 39.352000 -20.972999
--28.903000 39.007898 -22.135999
--28.347999 35.700999 -20.125000
--9.982999 38.671002 -27.646000
--10.613000 36.457002 -31.493999
--12.421000 39.930001 -29.673999
-1.863000 28.402900 -11.601000
-0.136000 26.974000 -13.768000
-0.787000 30.048000 -14.110000
-5.606900 -99.707097 16.607901
--1.397000 -107.208997 24.593901
-3.174000 -106.987998 26.669001
--0.773100 28.343000 -16.486999
--0.539000 31.614900 -16.525000
-0.787000 30.048000 -14.110000
-4.144000 22.902001 2.084000
-6.412000 24.398001 0.915000
-6.493000 23.263000 4.122000
-15.041000 -106.214993 -18.275999
-19.506902 -105.344102 -16.153000
-23.975901 -115.427099 -22.365000
-12.187000 24.986001 8.277001
-9.795000 23.099001 9.303001
-9.218001 23.919001 6.217000
-65.315999 -59.759997 23.538001
-72.167903 -62.589101 14.786000
-63.597903 -63.130103 22.166001
-6.412000 24.398001 0.915000
-8.675001 25.106002 3.141900
-6.493000 23.263000 4.122000
-102.668896 -73.166996 14.402000
-107.634999 -83.442099 20.489901
-100.346997 -79.286106 12.373000
--17.986100 28.600000 -12.030000
--20.326100 31.100001 -13.742000
--19.800000 27.606001 -14.304000
-3.881000 22.468001 5.389900
-4.144000 22.902001 2.084000
-6.493000 23.263000 4.122000
--4.362000 -162.422001 -1.426000
--8.733000 -159.860998 10.196900
--13.061000 -161.795005 -4.277000
-104.669899 -90.165101 18.354001
-97.597897 -85.304096 10.272000
-100.346997 -79.286106 12.373000
--16.616000 25.537001 -12.813000
--17.986100 28.600000 -12.030000
--19.800000 27.606001 -14.304000
--18.056000 24.642000 -15.388000
--16.616000 25.537001 -12.813000
--19.800000 27.606001 -14.304000
--85.783996 -54.010000 -14.393000
--75.196996 -54.862998 -17.786000
--76.375000 -50.937999 -19.181000
--22.490000 30.193999 -15.688000
--21.618100 26.652901 -16.555099
--19.800000 27.606001 -14.304000
-1.493000 34.740001 16.048001
--0.295000 33.181898 13.944000
-0.537900 31.614900 16.524000
-0.772000 28.343000 16.486000
-1.911000 29.711001 19.131001
-0.537900 31.614900 16.524000
--0.295000 33.181898 13.944000
--1.890000 31.475000 11.765000
--0.788000 30.048000 14.109001
-82.289003 -130.076990 28.649000
-84.370002 -126.829103 17.076001
-88.194899 -124.112003 31.099001
-84.370002 -126.829103 17.076001
-90.055004 -120.917000 19.569900
-88.194899 -124.112003 31.099001
-49.860999 26.068000 27.930900
-47.264900 27.780000 27.239900
-52.657001 30.655000 28.395001
--17.503999 -97.488999 -22.458099
--24.389001 -93.056999 -12.670999
--20.774100 -94.307996 -10.770099
--75.196996 -54.862998 -17.786000
--68.167999 -52.834000 -26.067000
--76.375000 -50.937999 -19.181000
--69.301099 -49.298998 -27.218999
--77.331103 -46.987001 -20.500999
--76.375000 -50.937999 -19.181000
-39.519001 14.215000 42.994902
-36.215000 16.805001 47.591899
-37.409000 15.416000 41.055001
--68.167999 -52.834000 -26.067000
--69.301099 -49.298998 -27.218999
--76.375000 -50.937999 -19.181000
--86.778998 -49.417000 -15.936000
--85.783996 -54.010000 -14.393000
--76.375000 -50.937999 -19.181000
-36.966901 18.291000 32.942999
-42.026002 19.555001 30.809000
-38.986001 16.958000 34.712002
-38.986001 16.958000 34.712002
-41.012999 15.527001 36.402002
-35.347901 16.510000 39.027002
-44.150002 17.916000 32.145001
-41.012999 15.527001 36.402002
-38.986001 16.958000 34.712002
--19.181000 21.274000 -25.163999
--14.250000 21.805000 -24.326099
--17.819999 21.680001 -22.413999
--13.122000 21.843001 -21.379000
--16.548099 22.135001 -19.632999
--17.819999 21.680001 -22.413999
--16.548099 22.135001 -19.632999
--21.049000 23.054000 -20.465100
--17.819999 21.680001 -22.413999
-33.917900 -155.686989 -1.747000
-30.183000 -158.681005 9.935000
-25.642000 -157.675996 -4.557100
--24.389001 -93.056999 -12.670999
--29.704999 -94.116993 -1.415000
--20.774100 -94.307996 -10.770099
--13.584000 -98.457098 -20.534100
--17.503999 -97.488999 -22.458099
--20.774100 -94.307996 -10.770099
-37.942000 -86.139999 19.947000
-35.861000 -89.388996 31.520002
-41.046999 -83.962999 21.665001
--10.531999 30.694000 -2.586000
--8.768000 29.613001 0.071000
--8.497000 32.539003 -0.262000
--83.675101 -31.491000 -71.999997
--84.441103 -36.658101 -71.733102
--94.126999 -32.889001 -72.998099
--71.691103 -137.475997 -11.914000
--78.237996 -132.360995 -14.523000
--75.928099 -135.641992 -26.132999
--82.290098 -130.076990 -28.649999
--76.833099 -129.981995 -39.562099
--75.928099 -135.641992 -26.132999
--76.833099 -129.981995 -39.562099
--70.478998 -135.309994 -37.138999
--75.928099 -135.641992 -26.132999
--10.204100 32.285899 -32.535002
--10.613000 36.457002 -31.493999
--8.468100 35.143003 -29.138999
--7.266000 35.084900 -1.107000
--9.924000 33.590000 -3.092100
--8.497000 32.539003 -0.262000
-75.457998 -49.036998 65.838896
-75.771004 -44.354100 66.343002
-69.095999 -45.676999 58.304001
-69.434896 -41.625999 58.743000
-66.402003 -42.071000 48.998002
-69.095999 -45.676999 58.304001
-74.231006 -5.487000 29.686000
-81.468001 -2.366000 27.565001
-75.439006 -8.917000 29.274900
-65.838896 -45.722999 48.436999
-68.494007 -49.749099 57.754003
-69.095999 -45.676999 58.304001
--75.461000 33.179000 -42.202998
--75.457104 28.392000 -35.765000
--71.823999 31.097000 -35.793997
--71.292996 35.756901 -42.034101
--75.461000 33.179000 -42.202998
--71.823999 31.097000 -35.793997
--67.904003 27.145900 -31.438999
--68.129994 33.528902 -35.727099
--71.823999 31.097000 -35.793997
-69.211900 -10.838999 34.347001
-74.231006 -5.487000 29.686000
-75.439006 -8.917000 29.274900
-76.482005 -12.443000 28.777901
-70.102900 -14.110000 34.140900
-75.439006 -8.917000 29.274900
-33.793900 34.125000 22.555001
-31.863000 30.486001 21.690000
-31.065900 34.976002 21.377999
-70.102900 -14.110000 34.140900
-69.211900 -10.838999 34.347001
-75.439006 -8.917000 29.274900
-27.385000 -148.752004 33.490002
-34.965899 -146.289989 36.070898
-28.367000 -137.274995 41.823003
-31.842999 38.527001 23.215000
-33.793900 34.125000 22.555001
-31.065900 34.976002 21.377999
-28.347000 35.700999 20.125000
-28.902000 39.007898 22.135001
-31.065900 34.976002 21.377999
-28.989000 27.298000 21.270001
-25.302000 24.781000 20.954000
-26.815901 28.309001 19.458901
-28.902000 39.007898 22.135001
-31.842999 38.527001 23.215000
-31.065900 34.976002 21.377999
-29.398000 31.468000 20.229001
-28.347000 35.700999 20.125000
-31.065900 34.976002 21.377999
-34.965899 -146.289989 36.070898
-35.090901 -134.755999 44.201002
-28.367000 -137.274995 41.823003
-21.464001 -139.322996 39.395001
-27.385000 -148.752004 33.490002
-28.367000 -137.274995 41.823003
-35.090901 -134.755999 44.201002
-28.510001 -124.162100 45.416899
-28.367000 -137.274995 41.823003
-26.934000 32.358002 18.701900
-29.398000 31.468000 20.229001
-26.815901 28.309001 19.458901
--101.888999 -8.016000 -31.004999
--103.723995 -13.285000 -29.972099
--94.726995 -12.783000 -26.007000
-23.447001 25.718901 18.773001
-24.649901 29.270001 17.597001
-26.815901 28.309001 19.458901
--7.019100 25.413001 -23.993099
--4.031100 27.583901 -21.673100
--5.987000 24.627000 -21.025999
--9.777100 22.995001 -22.910001
--7.019100 25.413001 -23.993099
--5.987000 24.627000 -21.025999
-79.226896 -74.727997 66.324897
-81.156902 -69.303103 67.456000
-70.949897 -67.836002 62.674902
--57.319101 -72.709002 -17.659999
--52.042000 -73.708996 -28.007001
--59.597101 -69.614999 -19.225100
--1.267000 35.901003 -13.301000
-0.293900 33.181898 -13.944999
--1.494000 34.740001 -16.049000
--2.070000 33.117998 -18.872000
--3.438000 36.180902 -18.090999
--1.494000 34.740001 -16.049000
--63.452996 -77.124096 -8.032000
--54.862998 -75.689100 -16.036000
--57.319101 -72.709002 -17.659999
-87.962896 -40.255100 18.791901
-98.273002 -43.145999 18.395001
-87.502897 -44.826999 17.402001
-78.065000 -43.027099 21.746000
-87.962896 -40.255100 18.791901
-87.502897 -44.826999 17.402001
-86.777903 -49.417000 15.935000
-77.330001 -46.987001 20.500001
-87.502897 -44.826999 17.402001
-86.777903 -49.417000 15.935000
-87.502897 -44.826999 17.402001
-97.795896 -48.505101 16.825002
-21.295000 26.430901 42.978998
-17.364001 30.729000 40.827900
-19.076001 25.975000 40.270902
-15.107000 29.871000 38.159002
-17.059000 25.468901 37.500001
-19.076001 25.975000 40.270902
-29.579001 38.761001 49.040001
-28.100001 42.569902 44.041000
-26.120001 38.222000 46.936002
-17.364001 30.729000 40.827900
-15.107000 29.871000 38.159002
-19.076001 25.975000 40.270902
-24.634000 41.883901 42.161901
-22.885000 37.507899 44.736899
-26.120001 38.222000 46.936002
-22.885000 37.507899 44.736899
-25.502000 32.784000 48.382901
-26.120001 38.222000 46.936002
--41.625001 25.461001 -26.822999
--41.947000 30.753901 -25.612000
--44.624999 29.340900 -26.466999
--41.947000 30.753901 -25.612000
--43.786999 35.041001 -26.688000
--44.624999 29.340900 -26.466999
--46.770100 33.754002 -27.341999
--47.265999 27.780000 -27.240999
--44.624999 29.340900 -26.466999
--53.174000 22.253901 -64.787105
--51.716000 14.942001 -62.894098
--56.958098 20.423900 -66.305101
--43.786999 35.041001 -26.688000
--46.770100 33.754002 -27.341999
--44.624999 29.340900 -26.466999
--44.007000 23.902001 -27.916100
--41.625001 25.461001 -26.822999
--44.624999 29.340900 -26.466999
--54.912999 13.012000 -64.425103
--60.743101 18.267000 -67.682996
--56.958098 20.423900 -66.305101
--8.363000 35.959899 -4.044100
--6.086000 37.444901 -5.298000
--9.108000 37.012000 -6.919100
--11.109999 34.932900 -5.883000
--8.363000 35.959899 -4.044100
--9.108000 37.012000 -6.919100
--1.864000 28.402900 11.600001
--0.137000 26.974000 13.767000
--0.788000 30.048000 14.109001
--67.870103 -88.578105 0.307000
--64.421996 -92.332102 2.384900
--57.820000 -83.697997 -4.329000
-0.772000 28.343000 16.486000
-0.537900 31.614900 16.524000
--0.788000 30.048000 14.109001
--52.237000 -78.541100 -14.359999
--60.737997 -80.481105 -6.205000
--57.820000 -83.697997 -4.329000
-57.286900 20.037999 29.510001
-59.611000 17.735001 29.867999
-55.131000 14.189000 32.157000
--64.421996 -92.332102 2.384900
--54.703999 -86.764000 -2.411100
--57.820000 -83.697997 -4.329000
-52.235000 10.196000 36.650002
-50.292902 12.305000 35.652000
-55.131000 14.189000 32.157000
-59.611000 17.735001 29.867999
-57.140898 11.864000 32.754000
-55.131000 14.189000 32.157000
-75.439006 -8.917000 29.274900
-81.468001 -2.366000 27.565001
-83.017901 -6.141000 26.934000
--14.250000 21.805000 -24.326099
--19.181000 21.274000 -25.163999
--15.507000 21.826901 -27.240001
--10.884000 23.413001 -25.906999
--14.250000 21.805000 -24.326099
--15.507000 21.826901 -27.240001
--16.903000 21.891002 -30.121099
--12.159999 23.888001 -28.868999
--15.507000 21.826901 -27.240001
--67.870103 -88.578105 0.307000
--60.737997 -80.481105 -6.205000
--71.061000 -84.652096 -1.729000
--66.500001 -44.484101 -38.248099
--65.055996 -49.369998 -47.778998
--65.839998 -45.722999 -48.438001
--60.737997 -80.481105 -6.205000
--63.452996 -77.124096 -8.032000
--71.061000 -84.652096 -1.729000
-5.967900 -107.152097 -22.503100
-1.396000 -107.208997 -24.595000
--1.583000 -99.987000 -14.619100
--78.065105 -95.151097 0.573000
--67.870103 -88.578105 0.307000
--71.061000 -84.652096 -1.729000
--0.768100 25.617000 10.951000
-1.233000 23.538001 9.918001
-1.559000 24.427000 12.970001
--9.568000 -96.836001 -4.940100
--5.753000 -97.262099 -2.968000
--1.583000 -99.987000 -14.619100
-1.233000 23.538001 9.918001
-4.040900 22.797002 11.843001
-1.559000 24.427000 12.970001
-4.486000 23.291901 14.961001
-2.157000 25.420001 15.937001
-1.559000 24.427000 12.970001
-9.567000 -96.836001 4.939000
-5.606900 -99.707097 16.607901
-13.350001 -96.199997 6.899000
--6.521000 38.555000 -11.023000
--9.414000 38.090002 -9.734999
--6.507000 38.062900 -8.181000
-10.531000 30.694000 2.585000
-10.093001 27.714999 2.604000
-8.767000 29.613001 -0.072000
--9.108000 37.012000 -6.919100
--6.086000 37.444901 -5.298000
--6.507000 38.062900 -8.181000
-10.093001 27.714999 2.604000
-8.034000 26.753001 0.158000
-8.767000 29.613001 -0.072000
-20.905999 43.172002 35.293899
-17.881000 42.199999 33.500899
-18.356001 40.034901 38.136002
-8.034000 26.753001 0.158000
-7.085900 28.847000 -2.603000
-8.767000 29.613001 -0.072000
-8.496000 32.539003 0.261000
-10.531000 30.694000 2.585000
-8.767000 29.613001 -0.072000
--29.552098 18.850001 -40.727101
--28.504999 21.989001 -46.306998
--26.170999 22.118000 -43.777999
-22.885000 37.507899 44.736899
-24.634000 41.883901 42.161901
-21.384001 41.029900 40.192999
-106.470004 -24.396999 27.604001
-97.044900 -22.437999 23.825001
-105.258003 -18.750001 28.836001
-103.722900 -13.285000 29.971000
-111.199901 -16.314000 36.751900
-105.258003 -18.750001 28.836001
-111.199901 -16.314000 36.751900
-112.804003 -22.497000 35.588000
-105.258003 -18.750001 28.836001
-112.804003 -22.497000 35.588000
-106.470004 -24.396999 27.604001
-105.258003 -18.750001 28.836001
--77.864997 4.761000 -28.563999
--79.748102 1.271000 -28.107999
--71.353994 1.054000 -30.246999
--2.708000 23.593901 3.082000
--4.538100 25.579000 4.222000
--4.461000 23.940900 1.169000
-3.437900 37.819002 6.663000
-3.703000 37.930001 9.479000
-6.506000 38.062900 8.180000
-6.085000 37.444901 5.296900
-2.786000 37.610002 3.756000
-3.437900 37.819002 6.663000
-0.824900 37.021901 7.932000
-3.703000 37.930001 9.479000
-3.437900 37.819002 6.663000
--88.042997 -115.153000 -9.080000
--82.759105 -120.727994 -6.605100
--82.464993 -107.694998 -1.224000
--40.456101 -97.217105 5.626900
--48.292000 -105.249099 11.062000
--43.741100 -107.864000 13.298000
--61.692100 -66.418000 -20.729098
--68.249099 -70.046999 -11.528000
--59.597101 -69.614999 -19.225100
--2.162000 22.708001 -0.166000
--2.708000 23.593901 3.082000
--4.461000 23.940900 1.169000
--6.191000 26.097000 2.141000
--6.413100 24.398001 -0.916100
--4.461000 23.940900 1.169000
-70.234999 -45.731999 28.291000
-69.300003 -49.298998 27.218001
-65.665998 -47.959998 37.431899
--56.564998 -67.790098 -30.810000
--61.692100 -66.418000 -20.729098
--59.597101 -69.614999 -19.225100
-63.729897 -12.073000 58.095001
-65.151997 -15.346000 58.591899
-68.026997 -10.766000 65.870002
-62.817998 -56.584999 46.173900
-64.046897 -52.995998 47.022901
-64.636000 -51.409099 36.532000
-69.844998 -14.403000 66.382006
-75.190000 -8.454099 71.291000
-68.026997 -10.766000 65.870002
--103.723995 -13.285000 -29.972099
--96.016996 -17.539000 -24.962001
--94.726995 -12.783000 -26.007000
-72.724901 -4.547000 70.730999
-66.027001 -7.336000 65.223902
-68.026997 -10.766000 65.870002
-57.813901 -66.976994 43.094002
-59.289999 -73.467106 52.305002
-61.480898 -69.697998 53.455003
--93.193099 -8.185999 -26.961999
--101.888999 -8.016000 -31.004999
--94.726995 -12.783000 -26.007000
-50.319899 -118.459001 -14.516000
-48.900999 -132.729992 -13.742000
-44.803001 -121.279001 -16.937099
--85.561000 -14.080000 -25.413100
--93.193099 -8.185999 -26.961999
--94.726995 -12.783000 -26.007000
-48.900999 -132.729992 -13.742000
-42.326000 -135.543004 -16.330000
-39.089002 -123.741001 -19.368999
-29.111000 -113.997102 -20.090999
-34.131002 -112.251997 -17.819099
-39.089002 -123.741001 -19.368999
-54.625001 1.817000 53.791001
-54.680001 2.176000 45.722000
-56.423899 -0.260000 46.658002
--26.010100 -95.608100 0.558000
--29.704999 -94.116993 -1.415000
--36.500998 -99.317104 7.703900
-62.104002 -4.944000 40.675901
-59.631001 -5.535000 48.208002
-58.080003 -2.830000 47.486000
-95.271006 -114.666998 21.999000
-98.540999 -111.140996 35.765901
-93.621999 -117.786102 33.472002
-88.195898 -118.152998 44.174898
-88.194899 -124.112003 31.099001
-93.621999 -117.786102 33.472002
-98.540999 -111.140996 35.765901
-93.152903 -111.726999 46.355899
-93.621999 -117.786102 33.472002
-93.152903 -111.726999 46.355899
-88.195898 -118.152998 44.174898
-93.621999 -117.786102 33.472002
-88.194899 -124.112003 31.099001
-90.055004 -120.917000 19.569900
-93.621999 -117.786102 33.472002
-90.055004 -120.917000 19.569900
-95.271006 -114.666998 21.999000
-93.621999 -117.786102 33.472002
--39.014000 -110.205099 15.552000
--28.208999 -102.822997 11.911000
--32.415099 -101.190105 9.800000
-56.247003 -135.838002 43.508898
-56.589000 -144.601002 32.097001
-63.719004 -140.193000 34.647901
--28.208999 -102.822997 11.911000
--22.226000 -96.890002 2.549000
--32.415099 -101.190105 9.800000
-52.532002 4.076000 52.576002
-51.491000 8.559000 58.603998
-50.388001 6.159900 51.244900
-69.140896 -140.768990 23.554001
-70.477895 -135.309994 37.138000
-63.719004 -140.193000 34.647901
-70.477895 -135.309994 37.138000
-62.721997 -131.411001 45.865003
-63.719004 -140.193000 34.647901
-62.721997 -131.411001 45.865003
-56.247003 -135.838002 43.508898
-63.719004 -140.193000 34.647901
--20.212000 -151.848093 17.350001
--25.643000 -157.675996 4.556000
--17.232999 -159.070998 7.375000
--8.733000 -159.860998 10.196900
--12.252000 -152.744994 20.083901
--17.232999 -159.070998 7.375000
--12.252000 -152.744994 20.083901
--20.212000 -151.848093 17.350001
--17.232999 -159.070998 7.375000
-52.859001 4.473900 44.682898
-52.532002 4.076000 52.576002
-50.388001 6.159900 51.244900
-51.491000 8.559000 58.603998
-48.868001 10.420000 57.055000
-50.388001 6.159900 51.244900
--27.386000 -148.752004 -33.491101
--19.630000 -150.672004 -30.865999
--25.166100 -156.920001 -21.389000
-48.868001 10.420000 57.055000
-48.215002 8.079001 49.805000
-50.388001 6.159900 51.244900
--38.341001 40.852003 -27.781999
--38.458999 43.848898 -31.753100
--41.623101 40.137000 -28.545098
--109.235100 -10.358000 -37.807997
--106.928103 -4.651100 -38.751997
--111.708999 -9.207000 -47.279999
--40.792998 36.159001 -25.947999
--38.341001 40.852003 -27.781999
--41.623101 40.137000 -28.545098
--42.034101 43.376900 -32.577001
--44.932000 39.229900 -29.215999
--41.623101 40.137000 -28.545098
-64.731002 29.510900 31.385902
-61.140899 24.687000 29.339001
-61.500002 31.659901 31.246001
--38.458999 43.848898 -31.753100
--42.034101 43.376900 -32.577001
--41.623101 40.137000 -28.545098
--8.733000 -159.860998 10.196900
--4.362000 -162.422001 -1.426000
--0.195000 -160.039991 13.017001
--104.208998 -101.315103 -26.632000
--104.670994 -90.165101 -18.354999
--107.899100 -94.297998 -28.827000
--104.670994 -90.165101 -18.354999
--107.636102 -83.442099 -20.490998
--107.899100 -94.297998 -28.827000
--110.108100 -76.608099 -22.545999
--113.677099 -79.808995 -32.952998
--111.056000 -87.114997 -30.937100
--110.092103 -89.749098 -42.119000
--106.791101 -97.075999 -40.096100
--111.056000 -87.114997 -30.937100
--6.086000 37.444901 -5.298000
--2.787000 37.610002 -3.757000
--3.439000 37.819002 -6.664100
--6.521000 38.555000 -11.023000
--6.507000 38.062900 -8.181000
--3.704000 37.930001 -9.480000
-67.736901 -27.125999 40.949002
-66.041000 -24.254000 50.251901
-67.424007 -23.744000 41.202899
-70.832998 -17.455000 33.845000
-77.351898 -16.055999 28.194901
-71.396001 -20.864999 33.458002
--93.723997 17.155999 -58.577999
--89.531995 21.465000 -58.499999
--89.897104 14.109001 -65.859102
-65.375902 -20.876000 50.185002
-66.932902 -20.416999 41.361000
-67.424007 -23.744000 41.202899
-54.916002 35.313901 30.700000
-55.541001 28.840901 28.795000
-52.657001 30.655000 28.395001
-55.541001 28.840901 28.795000
-49.860999 26.068000 27.930900
-52.657001 30.655000 28.395001
-49.729001 32.290999 27.909901
-51.589999 36.825001 30.294001
-52.657001 30.655000 28.395001
--56.848001 -77.113003 -51.070001
--53.424999 -73.440105 -40.624999
--54.159999 -80.622099 -49.748100
-51.589999 36.825001 30.294001
-54.916002 35.313901 30.700000
-52.657001 30.655000 28.395001
-47.264900 27.780000 27.239900
-49.729001 32.290999 27.909901
-52.657001 30.655000 28.395001
-64.754896 -142.140001 9.253000
-69.140896 -140.768990 23.554001
-61.966900 -145.420000 20.916902
-54.443002 -149.563998 18.232001
-57.472002 -146.320999 6.552000
-61.966900 -145.420000 20.916902
-57.472002 -146.320999 6.552000
-64.754896 -142.140001 9.253000
-61.966900 -145.420000 20.916902
-69.140896 -140.768990 23.554001
-63.719004 -140.193000 34.647901
-61.966900 -145.420000 20.916902
-63.719004 -140.193000 34.647901
-56.589000 -144.601002 32.097001
-61.966900 -145.420000 20.916902
--113.677099 -79.808995 -32.952998
--112.833999 -82.282998 -44.041999
--110.092103 -89.749098 -42.119000
--56.653000 -0.616000 -54.890998
--58.081102 -2.830000 -47.486998
--58.597099 -3.224000 -55.873100
-3.772000 -152.840003 25.517900
--4.243100 -153.076991 22.809001
--0.195000 -160.039991 13.017001
--4.243100 -153.076991 22.809001
--8.733000 -159.860998 10.196900
--0.195000 -160.039991 13.017001
--60.436100 -6.007000 -56.735098
--61.569098 -1.129000 -63.541099
--58.597099 -3.224000 -55.873100
--59.632000 -5.535000 -48.209000
--60.436100 -6.007000 -56.735098
--58.597099 -3.224000 -55.873100
--59.158102 1.636000 -62.500000
--56.653000 -0.616000 -54.890998
--58.597099 -3.224000 -55.873100
--2.774000 32.568999 9.449000
--1.356000 35.179999 8.909000
--3.671100 33.348899 7.085000
--3.671100 33.348899 7.085000
--4.739000 33.914000 4.557000
--5.638100 31.163000 5.019000
--41.201100 -92.922993 -43.683998
--44.748101 -90.139002 -45.306999
--42.369999 -84.741995 -34.807999
--50.933000 -76.486997 -39.274000
--51.242098 -83.972998 -48.342999
--54.159999 -80.622099 -49.748100
--51.242098 -83.972998 -48.342999
--58.033101 -89.523099 -56.382000
--54.159999 -80.622099 -49.748100
--61.234102 -85.482098 -57.829000
--56.848001 -77.113003 -51.070001
--54.159999 -80.622099 -49.748100
-48.291001 -105.249099 -11.063000
-50.319899 -118.459001 -14.516000
-43.740001 -107.864000 -13.299000
--53.424999 -73.440105 -40.624999
--50.933000 -76.486997 -39.274000
--54.159999 -80.622099 -49.748100
-50.319899 -118.459001 -14.516000
-44.803001 -121.279001 -16.937099
-43.740001 -107.864000 -13.299000
--87.818101 -26.813000 -22.480000
--97.801104 -27.465999 -22.600099
--88.111997 -31.233000 -21.334000
-40.455002 -97.217105 -5.628000
-48.291001 -105.249099 -11.063000
-43.740001 -107.864000 -13.299000
--17.510099 39.639901 -17.028000
--14.756000 39.525002 -15.582000
--14.164000 40.791001 -18.559100
--74.541099 -121.312000 -50.354999
--76.833099 -129.981995 -39.562099
--82.749099 -124.250002 -41.910000
--97.801104 -27.465999 -22.600099
--98.264001 -32.605000 -21.284999
--88.111997 -31.233000 -21.334000
--16.931999 41.262999 -19.994000
--14.164000 40.791001 -18.559100
--13.363000 41.388899 -21.906100
-8.675001 25.106002 3.141900
-10.093001 27.714999 2.604000
-11.182000 26.186001 5.414900
--11.464000 40.215001 -17.057000
--10.738000 40.500000 -20.303000
--14.164000 40.791001 -18.559100
-12.187000 24.986001 8.277001
-11.182000 26.186001 5.414900
-13.751000 27.704000 7.631900
--73.863998 -58.477100 -64.483099
--66.489995 -57.870001 -56.335997
--72.572999 -63.180096 -63.633002
--66.489995 -57.870001 -56.335997
--65.086000 -61.882000 -55.473000
--72.572999 -63.180096 -63.633002
--70.951000 -67.836002 -62.675998
--81.157997 -69.303103 -67.457102
--72.572999 -63.180096 -63.633002
--82.689099 -63.819997 -68.472996
--73.863998 -58.477100 -64.483099
--72.572999 -63.180096 -63.633002
--55.242099 -129.489005 11.170000
--55.618100 -115.300104 12.116000
--61.319999 -125.839993 8.623000
--65.086000 -61.882000 -55.473000
--70.951000 -67.836002 -62.675998
--72.572999 -63.180096 -63.633002
--67.103997 -121.808998 6.105000
--64.528003 -135.264993 1.120000
--61.319999 -125.839993 8.623000
-60.742002 18.267000 67.681901
-58.094002 10.802000 65.819904
-64.498000 15.770001 68.920895
--57.752997 -139.272988 3.773000
--55.242099 -129.489005 11.170000
--61.319999 -125.839993 8.623000
--113.581099 -62.765002 -26.389999
--107.101999 -54.535002 -20.013999
--114.588998 -55.833999 -28.174000
--107.101999 -54.535002 -20.013999
--107.749999 -48.339099 -21.716001
--114.588998 -55.833999 -28.174000
--107.749999 -48.339099 -21.716001
--115.124099 -48.944999 -29.862000
--114.588998 -55.833999 -28.174000
--115.124099 -48.944999 -29.862000
--118.307002 -57.592001 -38.411997
--114.588998 -55.833999 -28.174000
-88.164002 -35.717998 20.104000
-87.962896 -40.255100 18.791901
-78.580998 -39.069101 22.913000
--16.805099 -158.565998 -18.618999
--8.336100 -159.606993 -15.827000
--13.061000 -161.795005 -4.277000
--115.124099 -48.944999 -29.862000
--115.195997 -42.133000 -31.447999
--118.795000 -50.230000 -40.022001
-78.065000 -43.027099 21.746000
-70.972003 -42.146001 29.284000
-78.580998 -39.069101 22.913000
-87.962896 -40.255100 18.791901
-78.065000 -43.027099 21.746000
-78.580998 -39.069101 22.913000
-92.498004 -70.012100 9.765000
-90.303004 -75.281002 7.820000
-81.138000 -67.621104 9.338000
-70.972003 -42.146001 29.284000
-71.514897 -38.554098 30.193999
-78.580998 -39.069101 22.913000
--17.232999 -159.070998 7.375000
--21.684999 -160.544991 -7.114000
--13.061000 -161.795005 -4.277000
--8.733000 -159.860998 10.196900
--17.232999 -159.070998 7.375000
--13.061000 -161.795005 -4.277000
-38.339999 40.852003 27.781000
-37.797999 37.109002 25.121901
-35.096999 41.383900 26.930900
-70.318997 -66.359103 13.187001
-72.167903 -62.589101 14.786000
-81.138000 -67.621104 9.338000
-5.809000 38.432900 16.906001
-3.490000 37.240002 15.128001
-3.437000 36.180902 18.090000
-38.339999 40.852003 27.781000
-35.096999 41.383900 26.930900
-34.958899 44.117998 30.833000
-28.766001 41.932900 24.961900
-28.238000 44.095002 28.721999
-31.902000 41.742001 25.992000
-57.286900 20.037999 29.510001
-55.131000 14.189000 32.157000
-53.040002 16.388001 31.475000
-50.292902 12.305000 35.652000
-48.291899 14.293000 34.568999
-53.040002 16.388001 31.475000
-50.872002 18.461000 30.708000
-54.881901 22.194900 29.065901
-53.040002 16.388001 31.475000
-38.458001 43.848898 31.752001
-38.339999 40.852003 27.781000
-34.958899 44.117998 30.833000
-70.972897 -130.817994 1.498000
-64.526998 -135.264993 -1.121100
-67.102894 -121.808998 -6.106000
-35.096999 41.383900 26.930900
-31.548902 44.195902 29.822901
-34.958899 44.117998 30.833000
--63.720100 -140.193000 -34.649000
--61.967999 -145.420000 -20.917999
--69.141999 -140.768990 -23.555100
--71.691103 -137.475997 -11.914000
--75.928099 -135.641992 -26.132999
--69.141999 -140.768990 -23.555100
-72.570898 -117.422000 -3.622000
-70.972897 -130.817994 1.498000
-67.102894 -121.808998 -6.106000
-65.458000 -108.042002 -7.391000
-72.570898 -117.422000 -3.622000
-67.102894 -121.808998 -6.106000
--31.670101 18.274900 -43.098997
--35.349000 16.510000 -39.028000
--33.891998 17.600000 -45.390997
-64.526998 -135.264993 -1.121100
-61.319001 -125.839993 -8.624000
-67.102894 -121.808998 -6.106000
--30.994000 21.746000 -48.751000
--31.670101 18.274900 -43.098997
--33.891998 17.600000 -45.390997
--33.631999 21.367000 -51.103100
--30.994000 21.746000 -48.751000
--33.891998 17.600000 -45.390997
-94.572902 -5.459100 71.425006
-97.323902 -10.919000 71.364902
-103.875898 -6.591100 65.720998
--37.409998 15.416000 -41.056000
--36.215998 16.805001 -47.592998
--33.891998 17.600000 -45.390997
-23.902001 -104.210995 -14.030000
-34.131002 -112.251997 -17.819099
-29.111000 -113.997102 -20.090999
-100.832999 -0.876000 65.969005
-94.572902 -5.459100 71.425006
-103.875898 -6.591100 65.720998
-18.746901 -116.531000 -24.636000
-15.041000 -106.214993 -18.275999
-23.975901 -115.427099 -22.365000
-109.072901 -3.198000 48.069902
-106.098898 2.505000 48.735999
-108.001903 -3.879000 57.541002
-106.098898 2.505000 48.735999
-104.878895 1.919000 58.000900
-108.001903 -3.879000 57.541002
-104.878895 1.919000 58.000900
-100.832999 -0.876000 65.969005
-108.001903 -3.879000 57.541002
--77.352993 -16.055999 -28.196000
--85.561000 -14.080000 -25.413100
--78.043997 -19.747999 -27.525999
--71.397103 -20.864999 -33.459000
--77.352993 -16.055999 -28.196000
--78.043997 -19.747999 -27.525999
--76.900102 -80.061994 -65.086000
--74.179098 -85.274100 -63.741103
--85.449994 -88.516995 -64.038098
--74.179098 -85.274100 -63.741103
--82.184002 -94.425105 -62.456101
--85.449994 -88.516995 -64.038098
--82.184002 -94.425105 -62.456101
--92.874102 -97.144999 -58.293998
--85.449994 -88.516995 -64.038098
--92.874102 -97.144999 -58.293998
--96.234098 -90.505995 -60.034100
--85.449994 -88.516995 -64.038098
--78.550100 -23.511998 -26.771000
--71.787104 -24.329999 -32.981999
--78.043997 -19.747999 -27.525999
--50.388999 6.159900 -51.245999
--51.492099 8.559000 -58.605000
--48.868999 10.420000 -57.055999
--71.787104 -24.329999 -32.981999
--71.397103 -20.864999 -33.459000
--78.043997 -19.747999 -27.525999
--43.660998 13.520001 -53.603102
--46.027999 9.835000 -48.256099
--46.251997 12.071000 -55.388100
-12.241000 -105.717100 30.739000
-16.697900 -104.667000 32.726001
-17.503001 -97.488999 22.457000
--46.027999 9.835000 -48.256099
--48.216000 8.079001 -49.805999
--46.251997 12.071000 -55.388100
--45.383997 18.003900 -59.442099
--43.660998 13.520001 -53.603102
--46.251997 12.071000 -55.388100
-25.135901 -94.889000 26.207000
-27.923901 -91.610096 14.543001
-21.357901 -96.300103 24.350001
-21.079000 -103.348002 34.673899
-25.135901 -94.889000 26.207000
-21.357901 -96.300103 24.350001
-27.923901 -91.610096 14.543001
-24.388000 -93.056999 12.670000
-21.357901 -96.300103 24.350001
-97.401999 1.858000 32.770000
-91.426998 -3.758000 27.822001
-89.447901 0.488000 28.590901
-91.426998 -3.758000 27.822001
-83.017901 -6.141000 26.934000
-89.447901 0.488000 28.590901
-81.468001 -2.366000 27.565001
-87.274000 4.546000 29.267900
-89.447901 0.488000 28.590901
-1.233000 23.538001 9.918001
--0.768100 25.617000 10.951000
--1.043000 24.325000 8.010000
--0.768100 25.617000 10.951000
--2.605100 26.694901 8.963000
--1.043000 24.325000 8.010000
--94.343103 -64.672999 -11.640999
--84.514000 -58.588099 -12.777099
--95.836997 -59.292000 -13.444999
--2.605100 26.694901 8.963000
--4.132000 27.565001 6.980000
--2.901100 25.017900 6.137000
--2.708000 23.593901 3.082000
--0.895000 23.238001 4.908900
--2.901100 25.017900 6.137000
--91.258101 19.569000 -41.790102
--85.781001 18.631000 -35.085000
--87.495103 23.468001 -42.058997
--104.570001 -66.981100 -16.355000
--94.343103 -64.672999 -11.640999
--95.836997 -59.292000 -13.444999
--82.457103 22.159001 -35.411000
--83.588995 27.037000 -42.216998
--87.495103 23.468001 -42.058997
--91.458097 21.899000 -50.161000
--91.258101 19.569000 -41.790102
--87.495103 23.468001 -42.058997
--83.588995 27.037000 -42.216998
--87.278001 25.836900 -50.207101
--87.495103 23.468001 -42.058997
--87.278001 25.836900 -50.207101
--91.458097 21.899000 -50.161000
--87.495103 23.468001 -42.058997
-88.164002 -35.717998 20.104000
-78.580998 -39.069101 22.913000
-78.883000 -35.126001 24.000000
-75.195901 -54.862998 17.784901
-84.513001 -58.588099 12.776000
-73.794901 -58.752000 16.319901
-78.580998 -39.069101 22.913000
-71.514897 -38.554098 30.193999
-78.883000 -35.126001 24.000000
--118.307002 -57.592001 -38.411997
--115.124099 -48.944999 -29.862000
--118.795000 -50.230000 -40.022001
--3.257000 31.076001 -21.718999
--5.270000 28.728999 -24.462000
--4.796100 32.441001 -24.247998
-71.514897 -38.554098 30.193999
-71.864896 -34.965098 31.020900
-78.883000 -35.126001 24.000000
--3.780000 34.569900 -21.157000
--3.257000 31.076001 -21.718999
--4.796100 32.441001 -24.247998
--7.266000 35.084900 -1.107000
--8.497000 32.539003 -0.262000
--5.988000 34.431901 1.804000
--11.898000 36.458001 -8.607999
--9.414000 38.090002 -9.734999
--12.200000 37.987899 -11.311000
--4.158000 36.416002 0.666000
--7.266000 35.084900 -1.107000
--5.988000 34.431901 1.804000
--9.414000 38.090002 -9.734999
--9.285000 38.998000 -12.563000
--12.200000 37.987899 -11.311000
--3.175000 -106.987998 -26.670100
-2.730000 -117.829099 -31.378999
--2.639000 -117.573999 -33.585001
--4.078100 -129.852995 -36.306001
--7.980100 -116.975002 -35.764001
--2.639000 -117.573999 -33.585001
--34.966998 -146.289989 -36.071997
--27.386000 -148.752004 -33.491101
--33.369999 -154.684991 -24.128100
--30.184099 -158.681005 -9.936000
--38.507000 -156.218991 -12.735000
--33.369999 -154.684991 -24.128100
-2.730000 -117.829099 -31.378999
-2.217000 -130.229995 -33.937100
--2.639000 -117.573999 -33.585001
-2.217000 -130.229995 -33.937100
--4.078100 -129.852995 -36.306001
--2.639000 -117.573999 -33.585001
--7.980100 -116.975002 -35.764001
--7.729100 -106.490001 -28.719001
--2.639000 -117.573999 -33.585001
--62.105000 -4.944000 -40.677000
--65.641001 -1.542100 -34.423098
--66.973999 -4.547000 -34.488000
--50.293997 12.305000 -35.652999
--55.132002 14.189000 -32.158099
--52.236099 10.196000 -36.651101
--68.167001 -7.650100 -34.464099
--64.482100 -10.867000 -41.248102
--63.362002 -7.856000 -41.012101
--25.650000 19.777000 -35.763100
--31.396002 18.423000 -34.743100
--27.545100 19.343901 -38.277999
--47.063001 10.564900 -40.966000
--50.293997 12.305000 -35.652999
--52.236099 10.196000 -36.651101
--23.996999 22.156000 -41.169997
--25.650000 19.777000 -35.763100
--27.545100 19.343901 -38.277999
--29.552098 18.850001 -40.727101
--26.170999 22.118000 -43.777999
--27.545100 19.343901 -38.277999
--18.444099 21.974999 -32.959998
--16.903000 21.891002 -30.121099
--22.202000 20.534901 -30.555999
--26.170999 22.118000 -43.777999
--23.996999 22.156000 -41.169997
--27.545100 19.343901 -38.277999
--33.342000 17.506000 -36.923099
--29.552098 18.850001 -40.727101
--27.545100 19.343901 -38.277999
--15.507000 21.826901 -27.240001
--19.181000 21.274000 -25.163999
--20.639999 20.899000 -27.880000
--19.181000 21.274000 -25.163999
--24.250001 21.576900 -25.413100
--20.639999 20.899000 -27.880000
--67.737997 -27.125999 -40.950101
--66.801101 -31.234000 -50.067101
--66.518001 -27.712001 -50.214101
--24.250001 21.576900 -25.413100
--25.938999 20.836901 -27.822999
--20.639999 20.899000 -27.880000
--68.947002 -29.781999 -59.384998
--68.310998 -25.997000 -59.367098
--66.518001 -27.712001 -50.214101
--66.041999 -24.254000 -50.253000
--67.737997 -27.125999 -40.950101
--66.518001 -27.712001 -50.214101
--91.301098 -21.545999 -73.552102
--82.570001 -26.480000 -72.134100
--92.903003 -27.115000 -73.345102
--83.818100 -58.311101 -69.373101
--93.891002 -63.703999 -69.254994
--94.834000 -57.397999 -70.263103
--93.891002 -63.703999 -69.254994
--104.476996 -62.852100 -65.862000
--94.834000 -57.397999 -70.263103
--104.476996 -62.852100 -65.862000
--105.237998 -55.877998 -67.016996
--94.834000 -57.397999 -70.263103
--101.746105 -22.715999 -70.818096
--91.301098 -21.545999 -73.552102
--92.903003 -27.115000 -73.345102
--83.675101 -31.491000 -71.999997
--94.126999 -32.889001 -72.998099
--92.903003 -27.115000 -73.345102
--94.126999 -32.889001 -72.998099
--103.358097 -28.996099 -70.331104
--92.903003 -27.115000 -73.345102
-45.673899 42.688899 33.307899
-44.930901 39.229900 29.215001
-42.033002 43.376900 32.575998
--103.358097 -28.996099 -70.331104
--101.746105 -22.715999 -70.818096
--92.903003 -27.115000 -73.345102
--98.264001 -32.605000 -21.284999
--97.801104 -27.465999 -22.600099
--107.343100 -30.203000 -26.275000
--101.402096 -76.811999 -63.180998
--99.079102 -83.713993 -61.662998
--107.707098 -83.655000 -54.124098
--109.972097 -76.272100 -55.799998
--101.402096 -76.811999 -63.180998
--107.707098 -83.655000 -54.124098
--99.079102 -83.713993 -61.662998
--104.887098 -90.940103 -52.336000
--107.707098 -83.655000 -54.124098
--112.833999 -82.282998 -44.041999
--109.972097 -76.272100 -55.799998
--107.707098 -83.655000 -54.124098
--104.887098 -90.940103 -52.336000
--110.092103 -89.749098 -42.119000
--107.707098 -83.655000 -54.124098
--110.092103 -89.749098 -42.119000
--112.833999 -82.282998 -44.041999
--107.707098 -83.655000 -54.124098
-42.369898 45.279898 37.904900
-45.673899 42.688899 33.307899
-42.033002 43.376900 32.575998
-41.622002 40.137000 28.544001
-38.458001 43.848898 31.752001
-42.033002 43.376900 32.575998
--70.103996 -14.110000 -34.141999
--70.833996 -17.455000 -33.846099
--66.277102 -17.157000 -41.423101
-44.930901 39.229900 29.215001
-41.622002 40.137000 28.544001
-42.033002 43.376900 32.575998
--31.167999 45.462999 -34.639001
--34.959998 44.117998 -30.834001
--31.549998 44.195902 -29.824000
--110.092103 -89.749098 -42.119000
--104.887098 -90.940103 -52.336000
--106.791101 -97.075999 -40.096100
--104.887098 -90.940103 -52.336000
--101.513997 -98.075993 -50.443102
--106.791101 -97.075999 -40.096100
--103.877001 -6.591100 -65.722100
--94.573997 -5.459100 -71.426101
--97.324997 -10.919000 -71.365997
-3.881000 22.468001 5.389900
-6.638000 22.620000 7.355000
-3.834000 22.485999 8.654000
-3.703000 37.930001 9.479000
-6.519900 38.555000 11.022001
-6.506000 38.062900 8.180000
-107.749999 -48.339099 21.715000
-114.587896 -55.833999 28.173000
-107.100897 -54.535002 20.013001
-94.847001 15.345001 41.407000
-99.261999 12.913000 49.698003
-98.238900 10.800000 40.910900
--6.413100 24.398001 -0.916100
--6.191000 26.097000 2.141000
--8.034999 26.753001 -0.159000
--8.768000 29.613001 0.071000
--10.094000 27.714999 -2.605100
--8.034999 26.753001 -0.159000
-102.819003 7.880000 49.278900
-101.402000 5.945000 40.305000
-98.238900 10.800000 40.910900
-91.972001 10.765000 34.130000
-94.847001 15.345001 41.407000
-98.238900 10.800000 40.910900
--64.482100 -10.867000 -41.248102
--69.212995 -10.838999 -34.348000
--65.456100 -13.971000 -41.384000
-115.123004 -48.944999 29.860999
-118.305899 -57.592001 38.410898
-114.587896 -55.833999 28.173000
-107.749999 -48.339099 21.715000
-115.123004 -48.944999 29.860999
-114.587896 -55.833999 28.173000
--65.153003 -15.346000 -58.592997
--63.731000 -12.075000 -58.096100
--63.529998 -14.403000 -49.722999
-110.721998 -25.569100 64.135998
-115.105003 -23.130000 55.358000
-108.852901 -18.965099 64.803004
--67.941099 31.200001 -62.827997
--59.915099 27.590001 -65.385103
--64.199999 25.429999 -66.633105
-103.357002 -28.996099 70.330001
-112.139903 -32.410000 63.332997
-110.721998 -25.569100 64.135998
--59.915099 27.590001 -65.385103
--56.958098 20.423900 -66.305101
--64.199999 25.429999 -66.633105
-101.745002 -22.715999 70.817001
-103.357002 -28.996099 70.330001
-110.721998 -25.569100 64.135998
--67.941099 31.200001 -62.827997
--63.335001 33.414003 -61.805099
--59.915099 27.590001 -65.385103
--60.743101 18.267000 -67.682996
--68.463996 22.892900 -67.740001
--64.199999 25.429999 -66.633105
--63.529998 -14.403000 -49.722999
--65.456100 -13.971000 -41.384000
--66.277102 -17.157000 -41.423101
--56.958098 20.423900 -66.305101
--60.743101 18.267000 -67.682996
--64.199999 25.429999 -66.633105
--71.516000 -38.554098 -30.195000
--67.571998 -37.499100 -39.607000
--71.865998 -34.965098 -31.021999
--104.570001 -66.981100 -16.355000
--110.108100 -76.608099 -22.545999
--102.669999 -73.166996 -14.403000
--62.369000 -11.326999 -49.327001
--64.482100 -10.867000 -41.248102
--65.456100 -13.971000 -41.384000
-67.134000 -40.993098 38.972002
-70.972003 -42.146001 29.284000
-66.499002 -44.484101 38.247000
--49.743101 37.800901 -57.933997
--54.203000 36.699999 -59.354998
--52.776102 41.699000 -53.132001
--41.201100 -92.922993 -43.683998
--37.473001 -95.488995 -41.995000
--42.530999 -103.510104 -49.773999
--104.208998 -101.315103 -26.632000
--106.791101 -97.075999 -40.096100
--102.936000 -104.222998 -37.977099
--97.598001 -105.022103 -48.449099
--98.541997 -111.140996 -35.766996
--102.936000 -104.222998 -37.977099
--106.791101 -97.075999 -40.096100
--101.513997 -98.075993 -50.443102
--102.936000 -104.222998 -37.977099
--101.513997 -98.075993 -50.443102
--97.598001 -105.022103 -48.449099
--102.936000 -104.222998 -37.977099
--38.068101 -106.363997 -47.939997
--45.180999 -115.747102 -51.709998
--42.530999 -103.510104 -49.773999
--44.748101 -90.139002 -45.306999
--41.201100 -92.922993 -43.683998
--46.778999 -100.378998 -51.541101
--107.858099 -36.146000 -24.847999
--98.264001 -32.605000 -21.284999
--107.343100 -30.203000 -26.275000
--55.074099 -108.392999 -55.568099
--50.791100 -96.991993 -53.234100
--46.778999 -100.378998 -51.541101
--106.471099 -24.396999 -27.604999
--114.018001 -28.879000 -34.313999
--107.343100 -30.203000 -26.275000
--114.018001 -28.879000 -34.313999
--114.822000 -35.433996 -32.933999
--107.343100 -30.203000 -26.275000
--114.822000 -35.433996 -32.933999
--107.858099 -36.146000 -24.847999
--107.343100 -30.203000 -26.275000
-7.979000 -116.975002 35.762999
-7.728000 -106.490001 28.718000
-2.638000 -117.573999 33.583902
--97.801104 -27.465999 -22.600099
--106.471099 -24.396999 -27.604999
--107.343100 -30.203000 -26.275000
--97.324997 -10.919000 -71.365997
--94.573997 -5.459100 -71.426101
--87.057002 -11.127000 -73.540099
-65.458000 -108.042002 -7.391000
-60.729001 -95.892996 -4.507000
-69.962896 -103.987001 -5.078100
-77.698901 -112.709001 -1.176000
-72.570898 -117.422000 -3.622000
-69.962896 -103.987001 -5.078100
-64.420901 -92.332102 -2.386000
-74.168898 -99.680997 -2.803000
-69.962896 -103.987001 -5.078100
-3.881000 22.468001 5.389900
-6.493000 23.263000 4.122000
-6.638000 22.620000 7.355000
-69.699898 4.155000 30.395901
-67.915000 7.132900 30.461000
-75.833902 8.097000 28.933000
-66.003896 9.984001 30.440001
-71.372002 14.295000 29.409900
-73.665999 11.277000 29.215001
--14.756000 39.525002 -15.582000
--11.464000 40.215001 -17.057000
--14.164000 40.791001 -18.559100
-6.506000 38.062900 8.180000
-9.413000 38.090002 9.734000
-9.107000 37.012000 6.918000
-9.795000 23.099001 9.303001
-6.934000 22.329900 10.555000
-6.638000 22.620000 7.355000
-4.040900 22.797002 11.843001
-1.233000 23.538001 9.918001
-3.834000 22.485999 8.654000
--57.319101 -72.709002 -17.659999
--59.597101 -69.614999 -19.225100
--65.958999 -73.639996 -9.807999
-42.369898 45.279898 37.904900
-42.033002 43.376900 32.575998
-38.513903 45.561999 36.911901
-34.777001 45.616999 35.823002
-34.911901 45.451000 41.562900
-38.513903 45.561999 36.911901
--71.353994 1.054000 -30.246999
--79.748102 1.271000 -28.107999
--72.866999 -2.162000 -30.011000
--66.973999 -4.547000 -34.488000
--71.353994 1.054000 -30.246999
--72.866999 -2.162000 -30.011000
-38.458001 43.848898 31.752001
-34.777001 45.616999 35.823002
-38.513903 45.561999 36.911901
--73.863998 -58.477100 -64.483099
--74.824996 -53.755101 -65.219104
--67.625999 -53.819999 -57.098001
--79.748102 1.271000 -28.107999
--74.232101 -5.487000 -29.687099
--72.866999 -2.162000 -30.011000
--68.167001 -7.650100 -34.464099
--66.973999 -4.547000 -34.488000
--72.866999 -2.162000 -30.011000
-71.392901 34.699000 56.847900
-74.035004 35.394002 49.605899
-69.491901 37.833001 49.166001
-64.940006 39.911900 48.608001
-66.697896 37.011001 56.109000
-69.491901 37.833001 49.166001
-66.697896 37.011001 56.109000
-71.392901 34.699000 56.847900
-69.491901 37.833001 49.166001
-74.035004 35.394002 49.605899
-71.291901 35.756901 42.033002
-69.491901 37.833001 49.166001
-71.291901 35.756901 42.033002
-67.087896 38.013000 41.755002
-69.491901 37.833001 49.166001
-14.244000 30.836901 7.468900
-16.145000 29.666001 9.746000
-13.751000 27.704000 7.631900
--64.048000 -52.995998 -47.023997
--66.489995 -57.870001 -56.335997
--67.625999 -53.819999 -57.098001
-11.182000 26.186001 5.414900
-10.093001 27.714999 2.604000
-12.232000 29.075000 5.070000
--10.738000 40.500000 -20.303000
--10.133999 40.014900 -23.854999
--13.363000 41.388899 -21.906100
--14.164000 40.791001 -18.559100
--10.738000 40.500000 -20.303000
--13.363000 41.388899 -21.906100
--22.698000 41.862901 -22.643998
--23.125000 39.562900 -19.730000
--19.776000 41.625001 -21.358000
--16.931999 41.262999 -19.994000
--16.104098 42.179000 -23.435000
--19.776000 41.625001 -21.358000
--97.462997 4.488900 -66.074997
--91.508105 -0.320000 -71.337998
--100.833997 -0.876000 -65.970100
--22.698000 41.862901 -22.643998
--19.776000 41.625001 -21.358000
--18.962000 42.854901 -24.885099
--20.298099 39.657000 -18.414000
--16.931999 41.262999 -19.994000
--19.776000 41.625001 -21.358000
--104.879998 1.919000 -58.001999
--101.434998 7.368000 -58.328997
--100.833997 -0.876000 -65.970100
--101.434998 7.368000 -58.328997
--97.462997 4.488900 -66.074997
--100.833997 -0.876000 -65.970100
-64.940006 39.911900 48.608001
-62.872998 39.952900 41.369900
-60.402002 41.638900 47.931898
--91.508105 -0.320000 -71.337998
--94.573997 -5.459100 -71.426101
--100.833997 -0.876000 -65.970100
-58.667902 41.587003 40.881902
-55.909000 43.026999 47.143999
-60.402002 41.638900 47.931898
-62.008899 38.938899 55.241000
-64.940006 39.911900 48.608001
-60.402002 41.638900 47.931898
-55.909000 43.026999 47.143999
-57.359003 40.497001 54.248001
-60.402002 41.638900 47.931898
-57.359003 40.497001 54.248001
-62.008899 38.938899 55.241000
-60.402002 41.638900 47.931898
-59.289999 -73.467106 52.305002
-66.725902 -76.905996 60.449000
-61.480898 -69.697998 53.455003
-87.274000 4.546000 29.267900
-91.972001 10.765000 34.130000
-94.792902 6.438000 33.500001
-66.725902 -76.905996 60.449000
-68.999998 -72.420001 61.611902
-61.480898 -69.697998 53.455003
-85.559897 -14.080000 25.412001
-94.725899 -12.783000 26.006000
-86.529903 -18.225100 24.520000
-63.415997 -65.831102 54.512002
-59.699003 -63.590996 44.206999
-61.480898 -69.697998 53.455003
--45.396000 -82.151100 -36.362000
--49.526099 -76.486096 -26.508000
--46.847999 -79.126999 -24.948999
-78.042902 -19.747999 27.524900
-85.559897 -14.080000 25.412001
-86.529903 -18.225100 24.520000
--107.636102 -83.442099 -20.490998
--110.108100 -76.608099 -22.545999
--111.056000 -87.114997 -30.937100
-77.351898 -16.055999 28.194901
-78.042902 -19.747999 27.524900
-71.396001 -20.864999 33.458002
--89.531995 21.465000 -58.499999
--85.776098 18.333901 -65.536104
--89.897104 14.109001 -65.859102
-18.356001 40.034901 38.136002
-15.552000 38.923901 35.994899
-17.111000 35.666000 40.077899
--107.899100 -94.297998 -28.827000
--107.636102 -83.442099 -20.490998
--111.056000 -87.114997 -30.937100
--113.677099 -79.808995 -32.952998
--110.092103 -89.749098 -42.119000
--111.056000 -87.114997 -30.937100
--106.791101 -97.075999 -40.096100
--107.899100 -94.297998 -28.827000
--111.056000 -87.114997 -30.937100
-22.885000 37.507899 44.736899
-21.384001 41.029900 40.192999
-19.881001 36.645900 42.450000
-69.300003 -49.298998 27.218001
-76.375000 -50.937999 19.180000
-68.166904 -52.834000 26.065901
-22.562901 32.214999 45.949001
-22.885000 37.507899 44.736899
-19.881001 36.645900 42.450000
--46.609100 -153.172001 -15.502000
--49.126998 -148.504004 -29.489100
--41.374099 -151.871994 -26.830001
--33.369999 -154.684991 -24.128100
--38.507000 -156.218991 -12.735000
--41.374099 -151.871994 -26.830001
--38.507000 -156.218991 -12.735000
--46.609100 -153.172001 -15.502000
--41.374099 -151.871994 -26.830001
-75.195901 -54.862998 17.784901
-66.838898 -56.325100 24.839001
-68.166904 -52.834000 26.065901
-66.838898 -56.325100 24.839001
-63.408002 -54.817099 35.546001
-68.166904 -52.834000 26.065901
--82.401097 12.062000 -30.347100
--88.960998 14.831000 -34.659099
--84.918998 8.406000 -29.855000
-76.375000 -50.937999 19.180000
-75.195901 -54.862998 17.784901
-68.166904 -52.834000 26.065901
-25.502000 32.784000 48.382901
-26.339000 27.083000 48.161898
-29.155999 27.225001 50.625000
--88.960998 14.831000 -34.659099
--91.972999 10.765000 -34.131099
--84.918998 8.406000 -29.855000
--29.539000 -99.918999 -38.438998
--28.573999 -111.189105 -44.084001
--33.408102 -108.930096 -46.041999
-44.150002 17.916000 32.145001
-48.638001 20.402901 29.857900
-46.242002 16.163001 33.397898
-30.993000 21.746000 48.749998
-32.159902 27.204001 52.990001
-29.155999 27.225001 50.625000
-43.040000 13.989001 38.012002
-39.519001 14.215000 42.994902
-37.409000 15.416000 41.055001
-64.420901 -92.332102 -2.386000
-60.729001 -95.892996 -4.507000
-54.702900 -86.764000 2.410000
-49.444001 -81.255995 12.630000
-57.819001 -83.697997 4.328000
-54.702900 -86.764000 2.410000
-1.577900 22.495002 3.486000
-1.235000 22.840001 6.756000
--0.895000 23.238001 4.908900
--39.841998 -118.918002 -49.674999
--38.068101 -106.363997 -47.939997
--33.408102 -108.930096 -46.041999
--28.573999 -111.189105 -44.084001
--34.277100 -121.728994 -47.577001
--33.408102 -108.930096 -46.041999
--34.277100 -121.728994 -47.577001
--39.841998 -118.918002 -49.674999
--33.408102 -108.930096 -46.041999
--38.068101 -106.363997 -47.939997
--33.578999 -97.824000 -40.245000
--33.408102 -108.930096 -46.041999
-54.547001 -93.365997 54.847900
-63.756004 -99.849999 59.105899
-58.032002 -89.523099 56.381002
-85.775003 18.333901 65.535001
-85.166000 25.378000 58.285899
-81.477895 22.159001 65.068997
-85.166000 25.378000 58.285899
-80.663003 28.885901 57.938900
-81.477895 22.159001 65.068997
-80.663003 28.885901 57.938900
-77.050000 25.576901 64.461902
-81.477895 22.159001 65.068997
-76.777898 16.670000 69.524005
-85.775003 18.333901 65.535001
-81.477895 22.159001 65.068997
-51.241003 -83.972998 48.341900
-54.547001 -93.365997 54.847900
-58.032002 -89.523099 56.381002
-81.138000 -67.621104 9.338000
-72.167903 -62.589101 14.786000
-82.963899 -63.131101 11.090000
-54.159001 -80.622099 49.747001
-51.241003 -83.972998 48.341900
-58.032002 -89.523099 56.381002
-63.451901 -77.124096 8.031000
-57.318002 -72.709002 17.659001
-65.958001 -73.639996 9.807000
-73.987901 -80.572002 3.713000
-63.451901 -77.124096 8.031000
-65.958001 -73.639996 9.807000
-92.498004 -70.012100 9.765000
-81.138000 -67.621104 9.338000
-82.963899 -63.131101 11.090000
-84.513001 -58.588099 12.776000
-94.342001 -64.672999 11.640000
-82.963899 -63.131101 11.090000
-94.342001 -64.672999 11.640000
-92.498004 -70.012100 9.765000
-82.963899 -63.131101 11.090000
-5.668000 35.980899 23.381900
-7.755000 38.812000 21.996001
-5.525000 37.534002 20.072902
-3.779000 34.569900 21.156000
-5.668000 35.980899 23.381900
-5.525000 37.534002 20.072902
-7.755000 38.812000 21.996001
-8.222000 39.515901 18.634001
-5.525000 37.534002 20.072902
--11.898000 36.458001 -8.607999
--12.200000 37.987899 -11.311000
--14.528000 35.861000 -10.334000
--113.972999 -15.499000 -46.369001
--109.235100 -10.358000 -37.807997
--111.708999 -9.207000 -47.279999
--106.928103 -4.651100 -38.751997
--109.073997 -3.198000 -48.071001
--111.708999 -9.207000 -47.279999
--109.073997 -3.198000 -48.071001
--110.769995 -10.004000 -56.945000
--111.708999 -9.207000 -47.279999
--110.769995 -10.004000 -56.945000
--113.149099 -16.431000 -56.217000
--111.708999 -9.207000 -47.279999
--113.149099 -16.431000 -56.217000
--113.972999 -15.499000 -46.369001
--111.708999 -9.207000 -47.279999
--14.913999 37.804998 -12.883999
--17.062999 35.237901 -12.069999
--14.528000 35.861000 -10.334000
--17.062999 35.237901 -12.069999
--15.913999 32.937001 -9.785000
--14.528000 35.861000 -10.334000
--13.594000 33.911899 -7.812000
--11.898000 36.458001 -8.607999
--14.528000 35.861000 -10.334000
--66.749103 -38.430098 -49.458098
--67.571998 -37.499100 -39.607000
--66.403002 -42.071000 -48.999101
--65.839998 -45.722999 -48.438001
--68.495102 -49.749099 -57.755101
--69.097102 -45.676999 -58.305100
--68.495102 -49.749099 -57.755101
--75.458996 -49.036998 -65.839998
--69.097102 -45.676999 -58.305100
--75.772099 -44.354100 -66.344097
--69.435999 -41.625999 -58.743998
--69.097102 -45.676999 -58.305100
--69.435999 -41.625999 -58.743998
--66.749103 -38.430098 -49.458098
--66.403002 -42.071000 -48.999101
-18.201001 43.110002 28.982000
-18.961001 42.854901 24.884000
-15.352000 42.175900 27.350901
-29.538000 -99.918999 38.437899
-33.577900 -97.824000 40.243901
-32.400999 -91.427103 29.797001
-16.103001 42.179000 23.434000
-12.663000 41.139901 25.642000
-15.352000 42.175900 27.350901
-72.571896 -63.180096 63.631900
-82.688004 -63.819997 68.471998
-73.862903 -58.477100 64.482003
-15.052000 41.111901 31.626999
-18.201001 43.110002 28.982000
-15.352000 42.175900 27.350901
-74.823901 -53.755101 65.218002
-67.625001 -53.819999 57.096999
-73.862903 -58.477100 64.482003
-67.625001 -53.819999 57.096999
-66.488899 -57.870001 56.334902
-73.862903 -58.477100 64.482003
-82.688004 -63.819997 68.471998
-83.816998 -58.311101 69.371998
-73.862903 -58.477100 64.482003
-83.816998 -58.311101 69.371998
-74.823901 -53.755101 65.218002
-73.862903 -58.477100 64.482003
--31.902999 41.742001 -25.993099
--31.549998 44.195902 -29.824000
--35.098001 41.383900 -26.931999
--34.812998 37.895001 -24.211999
--31.902999 41.742001 -25.993099
--35.098001 41.383900 -26.931999
--34.959998 44.117998 -30.834001
--38.341001 40.852003 -27.781999
--35.098001 41.383900 -26.931999
-18.054999 24.642000 15.387001
-21.617001 26.652901 16.554002
-19.530000 23.822900 17.937900
--31.549998 44.195902 -29.824000
--34.959998 44.117998 -30.834001
--35.098001 41.383900 -26.931999
-15.357001 22.659000 16.826000
-18.054999 24.642000 15.387001
-19.530000 23.822900 17.937900
-96.986003 -53.895999 15.173000
-86.777903 -49.417000 15.935000
-97.795896 -48.505101 16.825002
-35.096999 41.383900 26.930900
-34.812000 37.895001 24.211001
-31.902000 41.742001 25.992000
-31.548902 44.195902 29.822901
-35.096999 41.383900 26.930900
-31.902000 41.742001 25.992000
-31.842999 38.527001 23.215000
-28.766001 41.932900 24.961900
-31.902000 41.742001 25.992000
-10.203000 32.285899 32.534000
-13.071000 28.971002 35.428002
-12.277001 33.459898 35.115000
-34.812000 37.895001 24.211001
-31.842999 38.527001 23.215000
-31.902000 41.742001 25.992000
-15.107000 29.871000 38.159002
-14.578000 34.596000 37.631001
-12.277001 33.459898 35.115000
-14.578000 34.596000 37.631001
-12.972000 37.723899 33.778898
-12.277001 33.459898 35.115000
--93.193099 -8.185999 -26.961999
--84.388100 -10.048999 -26.216999
--91.428101 -3.758000 -27.822999
-6.934000 22.329900 10.555000
-4.040900 22.797002 11.843001
-3.834000 22.485999 8.654000
--89.448996 0.488000 -28.592000
--97.402997 1.858000 -32.770999
--91.428101 -3.758000 -27.822999
-78.860998 -27.337000 25.930000
-87.816998 -26.813000 22.479000
-78.972898 -31.212000 25.006901
--97.402997 1.858000 -32.770999
--99.776097 -2.964000 -31.938002
--91.428101 -3.758000 -27.822999
-72.025001 -31.390000 31.760901
-78.860998 -27.337000 25.930000
-78.972898 -31.212000 25.006901
-78.883000 -35.126001 24.000000
-71.864896 -34.965098 31.020900
-78.972898 -31.212000 25.006901
-58.223899 33.594999 31.017000
-60.631000 37.596002 35.298899
-61.500002 31.659901 31.246001
-71.864896 -34.965098 31.020900
-72.025001 -31.390000 31.760901
-78.972898 -31.212000 25.006901
--115.195997 -42.133000 -31.447999
--118.775100 -42.957101 -41.522000
--118.795000 -50.230000 -40.022001
--118.775100 -42.957101 -41.522000
--118.207097 -51.999100 -50.652098
--118.795000 -50.230000 -40.022001
-64.391896 35.693999 35.560999
-64.731002 29.510900 31.385902
-61.500002 31.659901 31.246001
-12.972000 37.723899 33.778898
-15.052000 41.111901 31.626999
-12.420001 39.930001 29.673001
-60.631000 37.596002 35.298899
-64.391896 35.693999 35.560999
-61.500002 31.659901 31.246001
-9.982000 38.671002 27.645001
-10.612001 36.457002 31.493001
-12.420001 39.930001 29.673001
-12.663000 41.139901 25.642000
-9.982000 38.671002 27.645001
-12.420001 39.930001 29.673001
-81.620000 -1.823000 72.947897
-75.190000 -8.454099 71.291000
-84.472001 -6.327100 73.316000
-77.430904 -12.616999 71.708903
-87.055899 -11.127000 73.539004
-84.472001 -6.327100 73.316000
-91.507003 -0.320000 71.336895
-81.620000 -1.823000 72.947897
-84.472001 -6.327100 73.316000
-87.055899 -11.127000 73.539004
-94.572902 -5.459100 71.425006
-84.472001 -6.327100 73.316000
-106.560901 -12.629000 65.332003
-110.768899 -10.004000 56.944001
-103.875898 -6.591100 65.720998
-94.572902 -5.459100 71.425006
-91.507003 -0.320000 71.336895
-84.472001 -6.327100 73.316000
-97.323902 -10.919000 71.364902
-106.560901 -12.629000 65.332003
-103.875898 -6.591100 65.720998
--46.347100 22.218000 -28.927999
--49.862001 26.068000 -27.931999
--48.638999 20.402901 -29.858999
-110.768899 -10.004000 56.944001
-108.001903 -3.879000 57.541002
-103.875898 -6.591100 65.720998
-88.260002 -82.454100 65.512002
-90.605006 -76.269999 66.875003
-79.226896 -74.727997 66.324897
--52.403998 24.207002 -28.541999
--50.873101 18.461000 -30.709000
--48.638999 20.402901 -29.858999
-7.401000 22.284001 13.706001
-11.229901 22.183999 15.399001
-8.034000 22.405000 16.812000
-90.605006 -76.269999 66.875003
-81.156902 -69.303103 67.456000
-79.226896 -74.727997 66.324897
--114.018001 -28.879000 -34.313999
--117.275104 -28.833099 -44.181000
--118.262097 -35.813000 -42.909998
--117.275104 -28.833099 -44.181000
--117.650099 -37.223000 -53.255100
--118.262097 -35.813000 -42.909998
--117.650099 -37.223000 -53.255100
--118.185997 -44.544000 -52.014001
--118.262097 -35.813000 -42.909998
--118.185997 -44.544000 -52.014001
--118.775100 -42.957101 -41.522000
--118.262097 -35.813000 -42.909998
-34.965899 -146.289989 36.070898
-27.385000 -148.752004 33.490002
-33.368900 -154.684991 24.127001
-27.385000 -148.752004 33.490002
-25.165001 -156.920001 21.388000
-33.368900 -154.684991 24.127001
-25.165001 -156.920001 21.388000
-30.183000 -158.681005 9.935000
-33.368900 -154.684991 24.127001
-30.183000 -158.681005 9.935000
-38.506001 -156.218991 12.734001
-33.368900 -154.684991 24.127001
-12.116000 21.961000 18.402901
-8.826001 22.652000 19.878000
-8.034000 22.405000 16.812000
--8.034999 22.405000 -16.812999
--12.116999 21.961000 -18.404000
--8.827000 22.652000 -19.879000
--13.122000 21.843001 -21.379000
--9.777100 22.995001 -22.910001
--8.827000 22.652000 -19.879000
--87.057002 -11.127000 -73.540099
--79.427101 -17.021000 -71.989000
--89.344099 -16.208099 -73.615998
--5.140000 23.913000 -18.018000
--8.034999 22.405000 -16.812999
--8.827000 22.652000 -19.879000
--97.324997 -10.919000 -71.365997
--87.057002 -11.127000 -73.540099
--89.344099 -16.208099 -73.615998
--81.148103 -21.650000 -72.129995
--91.301098 -21.545999 -73.552102
--89.344099 -16.208099 -73.615998
--91.301098 -21.545999 -73.552102
--99.725001 -16.681001 -71.164101
--89.344099 -16.208099 -73.615998
--20.774100 -94.307996 -10.770099
--29.704999 -94.116993 -1.415000
--26.010100 -95.608100 0.558000
--99.725001 -16.681001 -71.164101
--97.324997 -10.919000 -71.365997
--89.344099 -16.208099 -73.615998
-18.443001 21.974999 32.958899
-23.870001 20.166900 33.185001
-20.135000 22.062000 35.754003
--66.698998 37.011001 -56.110099
--71.393996 34.699000 -56.848999
--69.492996 37.833001 -49.167000
--32.415099 -101.190105 9.800000
--22.226000 -96.890002 2.549000
--26.010100 -95.608100 0.558000
--71.393996 34.699000 -56.848999
--74.036099 35.394002 -49.606998
--69.492996 37.833001 -49.167000
--67.088999 38.013000 -41.756101
--64.941101 39.911900 -48.609100
--69.492996 37.833001 -49.167000
--71.292996 35.756901 -42.034101
--67.088999 38.013000 -41.756101
--69.492996 37.833001 -49.167000
-17.059000 25.468901 37.500001
-15.237001 24.937000 34.671001
-20.135000 22.062000 35.754003
--21.938998 43.409899 -26.250999
--22.698000 41.862901 -22.643998
--18.962000 42.854901 -24.885099
--88.196002 -124.112003 -31.100100
--88.197000 -118.152998 -44.175997
--82.749099 -124.250002 -41.910000
-106.560901 -12.629000 65.332003
-99.723898 -16.681001 71.162999
-108.852901 -18.965099 64.803004
--79.821996 -115.709998 -52.478101
--74.541099 -121.312000 -50.354999
--82.749099 -124.250002 -41.910000
-113.148004 -16.431000 56.215901
-106.560901 -12.629000 65.332003
-108.852901 -18.965099 64.803004
-59.157003 1.636000 62.499002
-61.229002 8.305000 67.082003
-56.658000 4.171000 61.327901
-99.723898 -16.681001 71.162999
-101.745002 -22.715999 70.817001
-108.852901 -18.965099 64.803004
-56.652002 -0.616000 54.889899
-59.157003 1.636000 62.499002
-56.658000 4.171000 61.327901
-61.229002 8.305000 67.082003
-58.094002 10.802000 65.819904
-56.658000 4.171000 61.327901
-54.095000 6.477000 60.028899
-52.532002 4.076000 52.576002
-54.625001 1.817000 53.791001
--84.865995 -85.512102 -3.738000
--76.648101 -76.361999 -5.646000
--87.759100 -80.457099 -5.810000
--97.599000 -85.304096 -10.273000
--94.430096 -91.186993 -8.103000
--87.759100 -80.457099 -5.810000
--79.030998 -72.038099 -7.523000
--90.304099 -75.281002 -7.821100
--87.759100 -80.457099 -5.810000
-15.357001 22.659000 16.826000
-19.530000 23.822900 17.937900
-16.547000 22.135001 19.631900
--94.430096 -91.186993 -8.103000
--84.865995 -85.512102 -3.738000
--87.759100 -80.457099 -5.810000
-3.772000 -152.840003 25.517900
--0.195000 -160.039991 13.017001
-8.335000 -159.606993 15.826000
-12.116000 21.961000 18.402901
-15.357001 22.659000 16.826000
-16.547000 22.135001 19.631900
-21.048000 23.054000 20.464001
-17.819000 21.680001 22.413000
-16.547000 22.135001 19.631900
--69.000997 -72.420001 -61.612997
--61.481997 -69.697998 -53.456102
--66.726997 -76.905996 -60.450099
--76.900102 -80.061994 -65.086000
--69.000997 -72.420001 -61.612997
--66.726997 -76.905996 -60.450099
--64.135104 -81.267998 -59.187099
--74.179098 -85.274100 -63.741103
--66.726997 -76.905996 -60.450099
-12.232000 29.075000 5.070000
-14.244000 30.836901 7.468900
-13.751000 27.704000 7.631900
--74.179098 -85.274100 -63.741103
--76.900102 -80.061994 -65.086000
--66.726997 -76.905996 -60.450099
-16.145000 29.666001 9.746000
-15.192000 26.541000 10.222000
-13.751000 27.704000 7.631900
--2.218000 -130.229995 33.936001
-2.638000 -117.573999 33.583902
--2.731000 -117.829099 31.378001
-11.182000 26.186001 5.414900
-12.232000 29.075000 5.070000
-13.751000 27.704000 7.631900
--1.397000 -107.208997 24.593901
--8.101000 -117.737003 29.145900
--2.731000 -117.829099 31.378001
--11.182999 26.186001 -5.416000
--12.233000 29.075000 -5.071100
--13.751999 27.704000 -7.633000
-2.638000 -117.573999 33.583902
-3.174000 -106.987998 26.669001
--2.731000 -117.829099 31.378001
-3.174000 -106.987998 26.669001
--1.397000 -107.208997 24.593901
--2.731000 -117.829099 31.378001
--16.146000 29.666001 -9.746999
--17.986100 28.600000 -12.030000
--15.193000 26.541000 -10.222999
--14.245000 30.836901 -7.470000
--16.146000 29.666001 -9.746999
--13.751999 27.704000 -7.633000
--12.188000 24.986001 -8.278000
--11.182999 26.186001 -5.416000
--13.751999 27.704000 -7.633000
--27.691999 20.075001 -30.187100
--32.981001 20.701000 -29.189000
--29.510999 19.274000 -32.494999
--31.396002 18.423000 -34.743100
--25.650000 19.777000 -35.763100
--29.510999 19.274000 -32.494999
--25.650000 19.777000 -35.763100
--23.871100 20.166900 -33.186100
--29.510999 19.274000 -32.494999
--23.871100 20.166900 -33.186100
--27.691999 20.075001 -30.187100
--29.510999 19.274000 -32.494999
--32.981001 20.701000 -29.189000
--34.965999 19.534901 -31.101000
--29.510999 19.274000 -32.494999
-42.150002 25.906000 59.436001
-43.235999 32.720000 59.034899
-38.673900 26.569901 57.402000
-39.333001 33.215001 57.130001
-35.339002 26.995001 55.250902
-38.673900 26.569901 57.402000
-50.388001 6.159900 51.244900
-48.215002 8.079001 49.805000
-50.972901 6.638000 43.541901
-39.298002 20.097001 55.497002
-42.150002 25.906000 59.436001
-38.673900 26.569901 57.402000
-52.235000 10.196000 36.650002
-57.140898 11.864000 32.754000
-54.109000 7.967000 37.555002
-54.109000 7.967000 37.555002
-55.902902 5.618000 38.368899
-50.972901 6.638000 43.541901
--72.725996 -4.547000 -70.732102
--78.531995 2.365000 -72.434999
--70.069999 -0.909000 -70.029996
--19.630000 -150.672004 -30.865999
--16.805099 -158.565998 -18.618999
--25.166100 -156.920001 -21.389000
--21.684999 -160.544991 -7.114000
--30.184099 -158.681005 -9.936000
--25.166100 -156.920001 -21.389000
--2.162000 22.708001 -0.166000
--1.579000 22.495002 -3.487000
-0.354000 22.586901 -1.658000
--75.240999 6.224900 -71.776100
--67.248099 2.447900 -69.186993
--70.069999 -0.909000 -70.029996
--67.248099 2.447900 -69.186993
--63.867100 -4.120000 -64.448997
--70.069999 -0.909000 -70.029996
-33.201899 -125.830099 -21.809999
-29.111000 -113.997102 -20.090999
-39.089002 -123.741001 -19.368999
--66.027999 -7.336000 -65.225996
--72.725996 -4.547000 -70.732102
--70.069999 -0.909000 -70.029996
-42.326000 -135.543004 -16.330000
-33.201899 -125.830099 -21.809999
-39.089002 -123.741001 -19.368999
-34.131002 -112.251997 -17.819099
-44.803001 -121.279001 -16.937099
-39.089002 -123.741001 -19.368999
-19.881001 36.645900 42.450000
-21.384001 41.029900 40.192999
-18.356001 40.034901 38.136002
-21.384001 41.029900 40.192999
-20.905999 43.172002 35.293899
-18.356001 40.034901 38.136002
-17.881000 42.199999 33.500899
-15.552000 38.923901 35.994899
-18.356001 40.034901 38.136002
-71.780898 9.750000 70.969000
-76.777898 16.670000 69.524005
-68.189003 12.932000 70.016898
--111.200996 -16.314000 -36.752999
--115.836002 -22.052100 -45.334000
--112.805098 -22.497000 -35.589099
--115.836002 -22.052100 -45.334000
--117.275104 -28.833099 -44.181000
--112.805098 -22.497000 -35.589099
--117.275104 -28.833099 -44.181000
--114.018001 -28.879000 -34.313999
--112.805098 -22.497000 -35.589099
--114.018001 -28.879000 -34.313999
--106.471099 -24.396999 -27.604999
--112.805098 -22.497000 -35.589099
--106.471099 -24.396999 -27.604999
--105.259106 -18.750001 -28.836999
--112.805098 -22.497000 -35.589099
--105.259106 -18.750001 -28.836999
--111.200996 -16.314000 -36.752999
--112.805098 -22.497000 -35.589099
-64.291000 5.520900 68.204999
-71.780898 9.750000 70.969000
-68.189003 12.932000 70.016898
-64.498000 15.770001 68.920895
-61.229002 8.305000 67.082003
-68.189003 12.932000 70.016898
--13.751999 27.704000 -7.633000
--16.146000 29.666001 -9.746999
--15.193000 26.541000 -10.222999
--61.967999 -145.420000 -20.917999
--57.473000 -146.320999 -6.553000
--64.755999 -142.140001 -9.254000
--71.691103 -137.475997 -11.914000
--69.141999 -140.768990 -23.555100
--64.755999 -142.140001 -9.254000
--69.141999 -140.768990 -23.555100
--61.967999 -145.420000 -20.917999
--64.755999 -142.140001 -9.254000
--57.473000 -146.320999 -6.553000
--57.752997 -139.272988 3.773000
--64.755999 -142.140001 -9.254000
--57.752997 -139.272988 3.773000
--64.528003 -135.264993 1.120000
--64.755999 -142.140001 -9.254000
--17.986100 28.600000 -12.030000
--16.616000 25.537001 -12.813000
--15.193000 26.541000 -10.222999
-2.707000 23.593901 -3.083000
-4.537000 25.579000 -4.223100
-4.460000 23.940900 -1.170000
--12.188000 24.986001 -8.278000
--13.751999 27.704000 -7.633000
--15.193000 26.541000 -10.222999
-0.354000 22.586901 -1.658000
-0.893900 23.238001 -4.910000
-2.707000 23.593901 -3.083000
-4.144000 22.902001 2.084000
-2.161000 22.708001 0.165000
-4.460000 23.940900 -1.170000
-6.412000 24.398001 0.915000
-4.144000 22.902001 2.084000
-4.460000 23.940900 -1.170000
-20.773001 -94.307996 10.769000
-13.583000 -98.457098 20.533001
-17.503001 -97.488999 22.457000
--11.464000 40.215001 -17.057000
--14.756000 39.525002 -15.582000
--12.021000 39.312001 -14.088999
--12.200000 37.987899 -11.311000
--9.285000 38.998000 -12.563000
--12.021000 39.312001 -14.088999
--21.545999 -141.227990 24.135001
--14.804000 -129.712999 29.121900
--21.032000 -128.824994 26.690900
--18.747998 -116.531000 24.635000
--27.174000 -127.527997 24.253000
--21.032000 -128.824994 26.690900
--14.804000 -129.712999 29.121900
--13.448000 -117.304102 26.898000
--21.032000 -128.824994 26.690900
-13.583000 -98.457098 20.533001
-12.241000 -105.717100 30.739000
-17.503001 -97.488999 22.457000
-24.388000 -93.056999 12.670000
-20.773001 -94.307996 10.769000
-17.503001 -97.488999 22.457000
-68.999998 -72.420001 61.611902
-79.226896 -74.727997 66.324897
-70.949897 -67.836002 62.674902
--4.487000 23.291901 -14.962000
--1.560000 24.427000 -12.971000
--4.042000 22.797002 -11.844000
--23.716999 26.811000 -45.612000
--19.850999 31.520002 -43.429099
--21.296000 26.430901 -42.980000
--7.402000 22.284001 -13.707000
--4.487000 23.291901 -14.962000
--4.042000 22.797002 -11.844000
--1.234000 23.538001 -9.919000
--3.835100 22.485999 -8.655000
--4.042000 22.797002 -11.844000
--3.835100 22.485999 -8.655000
--6.935000 22.329900 -10.555999
--4.042000 22.797002 -11.844000
-78.972898 -31.212000 25.006901
-87.816998 -26.813000 22.479000
-88.110998 -31.233000 21.333000
-88.164002 -35.717998 20.104000
-78.883000 -35.126001 24.000000
-88.110998 -31.233000 21.333000
--9.219000 23.919001 -6.218000
--6.639000 22.620000 -7.356000
--6.494000 23.263000 -4.123100
--71.998097 -27.841000 -32.416999
--78.861997 -27.337000 -25.930999
--72.026104 -31.390000 -31.762000
-78.883000 -35.126001 24.000000
-78.972898 -31.212000 25.006901
-88.110998 -31.233000 21.333000
--8.676000 25.106002 -3.143000
--9.219000 23.919001 -6.218000
--6.494000 23.263000 -4.123100
--65.839998 -45.722999 -48.438001
--69.097102 -45.676999 -58.305100
--66.403002 -42.071000 -48.999101
--78.861997 -27.337000 -25.930999
--78.974001 -31.212000 -25.007999
--72.026104 -31.390000 -31.762000
-21.684000 -160.544991 7.112900
-17.232001 -159.070998 -7.375000
-25.642000 -157.675996 -4.557100
-30.183000 -158.681005 9.935000
-21.684000 -160.544991 7.112900
-25.642000 -157.675996 -4.557100
--67.135103 -40.993098 -38.973000
--65.839998 -45.722999 -48.438001
--66.403002 -42.071000 -48.999101
--69.097102 -45.676999 -58.305100
--69.435999 -41.625999 -58.743998
--66.403002 -42.071000 -48.999101
-33.577900 -97.824000 40.243901
-35.861000 -89.388996 31.520002
-32.400999 -91.427103 29.797001
-35.861000 -89.388996 31.520002
-37.942000 -86.139999 19.947000
-32.400999 -91.427103 29.797001
--8.497000 32.539003 -0.262000
--8.768000 29.613001 0.071000
--7.016000 31.773999 2.486000
-88.194899 -124.112003 31.099001
-88.195898 -118.152998 44.174898
-82.748003 -124.250002 41.909002
--8.768000 29.613001 0.071000
--7.087000 28.847000 2.601900
--7.016000 31.773999 2.486000
-74.540004 -121.312000 50.354000
-76.832004 -129.981995 39.561000
-82.748003 -124.250002 41.909002
-88.195898 -118.152998 44.174898
-79.820901 -115.709998 52.477002
-82.748003 -124.250002 41.909002
-79.820901 -115.709998 52.477002
-74.540004 -121.312000 50.354000
-82.748003 -124.250002 41.909002
-76.832004 -129.981995 39.561000
-82.289003 -130.076990 28.649000
-82.748003 -124.250002 41.909002
-82.289003 -130.076990 28.649000
-88.194899 -124.112003 31.099001
-82.748003 -124.250002 41.909002
--7.087000 28.847000 2.601900
--5.566000 28.236000 4.901000
--5.638100 31.163000 5.019000
--5.988000 34.431901 1.804000
--8.497000 32.539003 -0.262000
--7.016000 31.773999 2.486000
--6.532100 33.798900 -26.722999
--8.349000 31.093901 -29.896000
--8.468100 35.143003 -29.138999
--4.402000 30.489901 7.314000
--3.671100 33.348899 7.085000
--5.638100 31.163000 5.019000
-110.091001 -89.749098 42.118002
-112.833001 -82.282998 44.041000
-107.706003 -83.655000 54.122999
--10.613000 36.457002 -31.493999
--9.982999 38.671002 -27.646000
--8.468100 35.143003 -29.138999
-65.375902 -20.876000 50.185002
-66.399001 -18.764000 58.970999
-64.537004 -17.590100 50.006900
-104.886003 -90.940103 52.334901
-110.091001 -89.749098 42.118002
-107.706003 -83.655000 54.122999
-112.833001 -82.282998 44.041000
-109.971002 -76.272100 55.798899
-107.706003 -83.655000 54.122999
-99.078000 -83.713993 61.661899
-104.886003 -90.940103 52.334901
-107.706003 -83.655000 54.122999
-109.971002 -76.272100 55.798899
-101.401001 -76.811999 63.180000
-107.706003 -83.655000 54.122999
-101.401001 -76.811999 63.180000
-99.078000 -83.713993 61.661899
-107.706003 -83.655000 54.122999
-6.473900 -99.856101 -10.601000
-15.041000 -106.214993 -18.275999
-10.524000 -106.820002 -20.393999
-13.446900 -117.304102 -26.899099
-5.967900 -107.152097 -22.503100
-10.524000 -106.820002 -20.393999
-15.041000 -106.214993 -18.275999
-18.746901 -116.531000 -24.636000
-10.524000 -106.820002 -20.393999
-18.746901 -116.531000 -24.636000
-13.446900 -117.304102 -26.899099
-10.524000 -106.820002 -20.393999
--23.716999 26.811000 -45.612000
--26.170999 22.118000 -43.777999
--26.340099 27.083000 -48.162997
--17.364999 30.729000 -40.828999
--19.076999 25.975000 -40.272001
--21.296000 26.430901 -42.980000
-5.269000 28.728999 24.461001
-7.018000 25.413001 23.992000
-8.236000 26.256001 26.916001
-7.018000 25.413001 23.992000
-10.883001 23.413001 25.906000
-8.236000 26.256001 26.916001
-12.159000 23.888001 28.868001
-9.645000 27.141999 29.801000
-8.236000 26.256001 26.916001
--19.076999 25.975000 -40.272001
--21.986999 22.128901 -38.493998
--21.296000 26.430901 -42.980000
--23.996999 22.156000 -41.169997
--23.716999 26.811000 -45.612000
--21.296000 26.430901 -42.980000
--4.538100 25.579000 4.222000
--2.708000 23.593901 3.082000
--2.901100 25.017900 6.137000
--21.986999 22.128901 -38.493998
--23.996999 22.156000 -41.169997
--21.296000 26.430901 -42.980000
--4.132000 27.565001 6.980000
--4.538100 25.579000 4.222000
--2.901100 25.017900 6.137000
--16.104098 42.179000 -23.435000
--15.353000 42.175900 -27.352000
--18.962000 42.854901 -24.885099
--0.895000 23.238001 4.908900
--1.043000 24.325000 8.010000
--2.901100 25.017900 6.137000
--18.201999 43.110002 -28.983001
--21.938998 43.409899 -26.250999
--18.962000 42.854901 -24.885099
--18.368099 -97.961999 4.552000
--28.208999 -102.822997 11.911000
--23.902999 -104.210995 14.029000
--19.776000 41.625001 -21.358000
--16.104098 42.179000 -23.435000
--18.962000 42.854901 -24.885099
--28.208999 -102.822997 11.911000
--34.132000 -112.251997 17.818000
--23.902999 -104.210995 14.029000
--29.112000 -113.997102 20.090001
--19.507999 -105.344102 16.152000
--23.902999 -104.210995 14.029000
--34.132000 -112.251997 17.818000
--29.112000 -113.997102 20.090001
--23.902999 -104.210995 14.029000
-84.559895 8.916000 70.722900
-78.530900 2.365000 72.433896
-88.155895 4.478000 71.102895
-93.805000 9.491000 66.038005
-84.559895 8.916000 70.722900
-88.155895 4.478000 71.102895
-48.215002 8.079001 49.805000
-46.250902 12.071000 55.387001
-46.027001 9.835000 48.255000
-78.530900 2.365000 72.433896
-81.620000 -1.823000 72.947897
-88.155895 4.478000 71.102895
-46.250902 12.071000 55.387001
-43.659899 13.520001 53.602003
-46.027001 9.835000 48.255000
-37.708901 22.510000 27.908999
-32.979902 20.701000 29.187901
-35.533000 23.836000 26.349001
-78.532897 32.583002 49.928002
-79.568997 30.273002 42.263899
-75.459898 33.179000 42.201899
-71.822897 31.097000 35.792898
-71.291901 35.756901 42.033002
-75.459898 33.179000 42.201899
-71.291901 35.756901 42.033002
-74.035004 35.394002 49.605899
-75.459898 33.179000 42.201899
-74.035004 35.394002 49.605899
-78.532897 32.583002 49.928002
-75.459898 33.179000 42.201899
-65.958001 -73.639996 9.807000
-57.318002 -72.709002 17.659001
-59.596002 -69.614999 19.224001
-54.388899 -70.805997 29.440900
-56.563899 -67.790098 30.809000
-59.596002 -69.614999 19.224001
-57.318002 -72.709002 17.659001
-52.041002 -73.708996 28.006000
-59.596002 -69.614999 19.224001
-56.563899 -67.790098 30.809000
-61.691001 -66.418000 20.728001
-59.596002 -69.614999 19.224001
-52.041002 -73.708996 28.006000
-54.388899 -70.805997 29.440900
-59.596002 -69.614999 19.224001
--8.349000 31.093901 -29.896000
--6.532100 33.798900 -26.722999
--6.707000 29.902902 -27.205000
--4.796100 32.441001 -24.247998
--5.270000 28.728999 -24.462000
--6.707000 29.902902 -27.205000
--5.270000 28.728999 -24.462000
--8.237099 26.256001 -26.916999
--6.707000 29.902902 -27.205000
--9.646000 27.141999 -29.802099
--8.349000 31.093901 -29.896000
--6.707000 29.902902 -27.205000
-32.979902 20.701000 29.187901
-31.020001 21.797001 27.214000
-35.533000 23.836000 26.349001
--52.237000 -78.541100 -14.359999
--44.020101 -81.623100 -23.334000
--46.847999 -79.126999 -24.948999
--49.526099 -76.486096 -26.508000
--54.862998 -75.689100 -16.036000
--46.847999 -79.126999 -24.948999
--42.369999 -84.741995 -34.807999
--45.396000 -82.151100 -36.362000
--46.847999 -79.126999 -24.948999
--50.267000 -112.231106 -53.675998
--46.778999 -100.378998 -51.541101
--42.530999 -103.510104 -49.773999
--49.369998 41.777000 -33.949099
--51.591001 36.825001 -30.295100
--48.258997 38.129002 -29.798999
--46.770100 33.754002 -27.341999
--44.932000 39.229900 -29.215999
--48.258997 38.129002 -29.798999
--51.591001 36.825001 -30.295100
--49.729999 32.290999 -27.911000
--48.258997 38.129002 -29.798999
--37.473001 -95.488995 -41.995000
--38.068101 -106.363997 -47.939997
--42.530999 -103.510104 -49.773999
--49.729999 32.290999 -27.911000
--46.770100 33.754002 -27.341999
--48.258997 38.129002 -29.798999
--46.778999 -100.378998 -51.541101
--41.201100 -92.922993 -43.683998
--42.530999 -103.510104 -49.773999
--45.180999 -115.747102 -51.709998
--50.267000 -112.231106 -53.675998
--42.530999 -103.510104 -49.773999
--51.417999 30.825000 -62.473997
--49.425997 23.767000 -63.133001
--55.641998 29.384000 -63.998103
--26.121099 38.222000 -46.937101
--28.659999 33.199001 -50.727099
--29.580001 38.761001 -49.041100
--49.425997 23.767000 -63.133001
--53.174000 22.253901 -64.787105
--55.641998 29.384000 -63.998103
--28.100999 42.569902 -44.041999
--26.121099 38.222000 -46.937101
--29.580001 38.761001 -49.041100
--32.028001 33.428002 -52.970100
--33.251997 39.090902 -51.041998
--29.580001 38.761001 -49.041100
--31.775001 43.062001 -45.824099
--28.100999 42.569902 -44.041999
--29.580001 38.761001 -49.041100
-66.972904 -4.547000 34.486901
-62.104002 -4.944000 40.675901
-65.639898 -1.542100 34.422003
-71.352899 1.054000 30.246001
-66.972904 -4.547000 34.486901
-65.639898 -1.542100 34.422003
-62.104002 -4.944000 40.675901
-60.721003 -2.135000 40.243901
-65.639898 -1.542100 34.422003
-69.699898 4.155000 30.395901
-71.352899 1.054000 30.246001
-65.639898 -1.542100 34.422003
-60.721003 -2.135000 40.243901
-64.175002 1.363000 34.264900
-65.639898 -1.542100 34.422003
-11.897000 36.458001 8.607000
-13.593000 33.911899 7.810900
-11.109000 34.932900 5.881900
-106.042899 -60.759000 18.225001
-96.986003 -53.895999 15.173000
-107.100897 -54.535002 20.013001
-12.206000 32.145903 5.235000
-9.923000 33.590000 3.091000
-11.109000 34.932900 5.881900
-9.107000 37.012000 6.918000
-11.897000 36.458001 8.607000
-11.109000 34.932900 5.881900
-105.236903 -55.877998 67.015901
-112.833902 -61.388999 58.806900
-113.444000 -53.981997 60.130000
-105.490901 -48.965998 68.043903
-105.236903 -55.877998 67.015901
-113.444000 -53.981997 60.130000
-112.833902 -61.388999 58.806900
-117.691003 -59.542999 49.167901
-113.444000 -53.981997 60.130000
-117.691003 -59.542999 49.167901
-118.206002 -51.999100 50.651003
-113.444000 -53.981997 60.130000
-84.888898 -47.346100 70.804998
-95.318004 -51.126998 71.141899
-95.350899 -44.929098 71.892902
-95.318004 -51.126998 71.141899
-105.490901 -48.965998 68.043903
-95.350899 -44.929098 71.892902
-105.490901 -48.965998 68.043903
-105.250001 -42.156000 68.941005
-95.350899 -44.929098 71.892902
-66.877902 -34.812998 49.812902
-66.748001 -38.430098 49.457002
-69.517896 -37.613999 59.070900
-113.580003 -62.765002 26.388900
-106.042899 -60.759000 18.225001
-107.100897 -54.535002 20.013001
-75.460896 -35.177000 66.986904
-74.861899 -30.733999 67.123003
-69.351897 -33.659998 59.284899
-66.877902 -34.812998 49.812902
-69.517896 -37.613999 59.070900
-69.351897 -33.659998 59.284899
-69.434896 -41.625999 58.743000
-75.767897 -39.724998 66.725902
-69.517896 -37.613999 59.070900
-33.340901 17.506000 36.922000
-38.986001 16.958000 34.712002
-35.347901 16.510000 39.027002
-31.669002 18.274900 43.097902
-33.340901 17.506000 36.922000
-35.347901 16.510000 39.027002
-37.409000 15.416000 41.055001
-33.890899 17.600000 45.389902
-35.347901 16.510000 39.027002
-64.046897 -52.995998 47.022901
-65.665998 -47.959998 37.431899
-64.636000 -51.409099 36.532000
-33.890899 17.600000 45.389902
-31.669002 18.274900 43.097902
-35.347901 16.510000 39.027002
-41.012999 15.527001 36.402002
-37.409000 15.416000 41.055001
-35.347901 16.510000 39.027002
-69.300003 -49.298998 27.218001
-68.166904 -52.834000 26.065901
-64.636000 -51.409099 36.532000
-65.665998 -47.959998 37.431899
-69.300003 -49.298998 27.218001
-64.636000 -51.409099 36.532000
-8.767000 29.613001 -0.072000
-7.085900 28.847000 -2.603000
-7.014900 31.773999 -2.487000
-7.085900 28.847000 -2.603000
-5.637000 31.163000 -5.020000
-7.014900 31.773999 -2.487000
--0.773100 28.343000 -16.486999
--2.158000 25.420001 -15.937999
--2.991000 26.479000 -18.834000
-8.496000 32.539003 0.261000
-8.767000 29.613001 -0.072000
-7.014900 31.773999 -2.487000
-5.637000 31.163000 -5.020000
-4.737900 33.914000 -4.558100
-7.014900 31.773999 -2.487000
-5.986900 34.431901 -1.805000
-8.496000 32.539003 0.261000
-7.014900 31.773999 -2.487000
--70.103996 -14.110000 -34.141999
--75.440101 -8.917000 -29.275998
--76.483101 -12.443000 -28.779000
--5.987000 24.627000 -21.025999
--4.031100 27.583901 -21.673100
--2.991000 26.479000 -18.834000
--84.388100 -10.048999 -26.216999
--77.352993 -16.055999 -28.196000
--76.483101 -12.443000 -28.779000
--75.440101 -8.917000 -29.275998
--83.018996 -6.141000 -26.935000
--76.483101 -12.443000 -28.779000
--77.352993 -16.055999 -28.196000
--70.833996 -17.455000 -33.846099
--76.483101 -12.443000 -28.779000
-15.913000 32.937001 9.784000
-17.062001 35.237901 12.069000
-18.142000 32.005999 11.769000
--70.833996 -17.455000 -33.846099
--70.103996 -14.110000 -34.141999
--76.483101 -12.443000 -28.779000
-19.548900 34.590900 13.788000
-20.325001 31.100001 13.741001
-18.142000 32.005999 11.769000
-20.325001 31.100001 13.741001
-17.985001 28.600000 12.029001
-18.142000 32.005999 11.769000
-16.145000 29.666001 9.746000
-15.913000 32.937001 9.784000
-18.142000 32.005999 11.769000
-65.958001 -73.639996 9.807000
-59.596002 -69.614999 19.224001
-68.248004 -70.046999 11.527000
-76.647006 -76.361999 5.644900
-65.958001 -73.639996 9.807000
-68.248004 -70.046999 11.527000
-19.506902 -105.344102 -16.153000
-10.479000 -99.447995 -8.583999
-14.446000 -98.817103 -6.566000
-79.029903 -72.038099 7.521900
-76.647006 -76.361999 5.644900
-68.248004 -70.046999 11.527000
-61.691001 -66.418000 20.728001
-70.318997 -66.359103 13.187001
-68.248004 -70.046999 11.527000
--33.305101 -92.428103 -3.365100
--24.389001 -93.056999 -12.670999
--27.925000 -91.610096 -14.544000
--21.358998 -96.300103 -24.350999
--25.137000 -94.889000 -26.208099
--27.925000 -91.610096 -14.544000
--36.793001 -90.544999 -5.288100
--33.305101 -92.428103 -3.365100
--27.925000 -91.610096 -14.544000
-9.567000 -96.836001 4.939000
-18.367000 -97.961999 -4.553000
-14.446000 -98.817103 -6.566000
-10.479000 -99.447995 -8.583999
-5.751900 -97.262099 2.967000
-14.446000 -98.817103 -6.566000
-5.751900 -97.262099 2.967000
-9.567000 -96.836001 4.939000
-14.446000 -98.817103 -6.566000
-18.367000 -97.961999 -4.553000
-23.902001 -104.210995 -14.030000
-14.446000 -98.817103 -6.566000
-78.042902 -19.747999 27.524900
-86.529903 -18.225100 24.520000
-78.549005 -23.511998 26.770001
-78.860998 -27.337000 25.930000
-71.997002 -27.841000 32.416001
-78.549005 -23.511998 26.770001
--25.503099 32.784000 -48.384000
--26.340099 27.083000 -48.162997
--29.157000 27.225001 -50.625000
-86.529903 -18.225100 24.520000
-87.287001 -22.473000 23.541901
-78.549005 -23.511998 26.770001
-67.424007 -23.744000 41.202899
-71.396001 -20.864999 33.458002
-71.786001 -24.329999 32.980900
-19.628901 -150.672004 30.864900
-14.420000 -140.884995 36.924899
-11.744000 -152.037993 28.207000
--23.871100 20.166900 -33.186100
--18.444099 21.974999 -32.959998
--22.202000 20.534901 -30.555999
--30.994000 21.746000 -48.751000
--32.161001 27.204001 -52.991100
--29.157000 27.225001 -50.625000
-14.420000 -140.884995 36.924899
-7.275000 -141.955987 34.416899
-11.744000 -152.037993 28.207000
-7.275000 -141.955987 34.416899
-3.772000 -152.840003 25.517900
-11.744000 -152.037993 28.207000
-16.804000 -158.565998 18.618001
-19.628901 -150.672004 30.864900
-11.744000 -152.037993 28.207000
-3.772000 -152.840003 25.517900
-8.335000 -159.606993 15.826000
-11.744000 -152.037993 28.207000
-8.335000 -159.606993 15.826000
-16.804000 -158.565998 18.618001
-11.744000 -152.037993 28.207000
--16.903000 21.891002 -30.121099
--20.639999 20.899000 -27.880000
--22.202000 20.534901 -30.555999
--20.639999 20.899000 -27.880000
--25.938999 20.836901 -27.822999
--22.202000 20.534901 -30.555999
-42.368900 -84.741995 34.806900
-46.847001 -79.126999 24.947900
-44.019002 -81.623100 23.333000
-49.444001 -81.255995 12.630000
-41.046999 -83.962999 21.665001
-44.019002 -81.623100 23.333000
-46.847001 -79.126999 24.947900
-52.235998 -78.541100 14.359000
-44.019002 -81.623100 23.333000
-52.235998 -78.541100 14.359000
-49.444001 -81.255995 12.630000
-44.019002 -81.623100 23.333000
-41.046999 -83.962999 21.665001
-39.186999 -87.157995 33.193000
-44.019002 -81.623100 23.333000
-58.596000 -3.224000 55.872001
-60.435001 -6.007000 56.733999
-61.567999 -1.129000 63.540004
--62.009998 38.938899 -55.242099
--58.745001 35.241999 -60.646001
--63.335001 33.414003 -61.805099
--67.941099 31.200001 -62.827997
--66.698998 37.011001 -56.110099
--63.335001 33.414003 -61.805099
--66.698998 37.011001 -56.110099
--62.009998 38.938899 -55.242099
--63.335001 33.414003 -61.805099
-63.866004 -4.120000 64.447902
-67.247003 2.447900 69.185898
-61.567999 -1.129000 63.540004
-21.208901 43.922000 30.530000
-20.905999 43.172002 35.293899
-24.377001 44.597000 31.989001
-64.291000 5.520900 68.204999
-59.157003 1.636000 62.499002
-61.567999 -1.129000 63.540004
-25.031000 43.827899 27.531000
-21.208901 43.922000 30.530000
-24.377001 44.597000 31.989001
--15.353000 42.175900 -27.352000
--16.104098 42.179000 -23.435000
--12.664000 41.139901 -25.643000
--10.133999 40.014900 -23.854999
--9.982999 38.671002 -27.646000
--12.664000 41.139901 -25.643000
--12.421000 39.930001 -29.673999
--15.353000 42.175900 -27.352000
--12.664000 41.139901 -25.643000
-71.071900 -90.329103 62.291000
-61.233003 -85.482098 57.827901
-67.594998 -95.197998 60.744900
-74.329004 -105.616994 58.987901
-78.472003 -100.137100 60.770001
-67.594998 -95.197998 60.744900
--13.363000 41.388899 -21.906100
--10.133999 40.014900 -23.854999
--12.664000 41.139901 -25.643000
-63.756004 -99.849999 59.105899
-74.329004 -105.616994 58.987901
-67.594998 -95.197998 60.744900
--62.105000 -4.944000 -40.677000
--66.973999 -4.547000 -34.488000
--63.362002 -7.856000 -41.012101
--2.047000 35.707001 6.328000
--4.739000 33.914000 4.557000
--3.671100 33.348899 7.085000
--4.402000 30.489901 7.314000
--2.774000 32.568999 9.449000
--3.671100 33.348899 7.085000
--1.397000 -107.208997 24.593901
-5.606900 -99.707097 16.607901
-1.582000 -99.987000 14.618000
--2.451000 -100.036100 12.614001
--5.969000 -107.152097 22.502001
-1.582000 -99.987000 14.618000
-9.567000 -96.836001 4.939000
-5.751900 -97.262099 2.967000
-1.582000 -99.987000 14.618000
--66.973999 -4.547000 -34.488000
--68.167001 -7.650100 -34.464099
--63.362002 -7.856000 -41.012101
--64.482100 -10.867000 -41.248102
--61.065000 -8.370000 -48.824102
--63.362002 -7.856000 -41.012101
--52.237000 -78.541100 -14.359999
--57.820000 -83.697997 -4.329000
--49.445000 -81.255995 -12.631000
--59.632000 -5.535000 -48.209000
--62.105000 -4.944000 -40.677000
--63.362002 -7.856000 -41.012101
-94.847001 15.345001 41.407000
-91.972001 10.765000 34.130000
-88.959903 14.831000 34.658000
-91.257006 19.569000 41.789003
-94.847001 15.345001 41.407000
-88.959903 14.831000 34.658000
-82.400002 12.062000 30.346001
-85.779898 18.631000 35.083901
-88.959903 14.831000 34.658000
--57.820000 -83.697997 -4.329000
--54.703999 -86.764000 -2.411100
--49.445000 -81.255995 -12.631000
--44.020101 -81.623100 -23.334000
--52.237000 -78.541100 -14.359999
--49.445000 -81.255995 -12.631000
--7.016000 31.773999 2.486000
--7.087000 28.847000 2.601900
--5.638100 31.163000 5.019000
--54.703999 -86.764000 -2.411100
--46.496000 -83.823994 -10.856000
--49.445000 -81.255995 -12.631000
--4.739000 33.914000 4.557000
--7.016000 31.773999 2.486000
--5.638100 31.163000 5.019000
--5.566000 28.236000 4.901000
--4.402000 30.489901 7.314000
--5.638100 31.163000 5.019000
-26.009001 -95.608100 -0.559100
-32.414000 -101.190105 -9.800999
-22.225000 -96.890002 -2.550000
-32.414000 -101.190105 -9.800999
-28.208001 -102.822997 -11.911999
-22.225000 -96.890002 -2.550000
-18.367000 -97.961999 -4.553000
-13.350001 -96.199997 6.899000
-22.225000 -96.890002 -2.550000
--60.729999 -95.892996 4.506000
--65.458998 -108.042002 7.389900
--56.800000 -99.247098 6.662000
-60.874999 6.846000 33.686001
-55.902902 5.618000 38.368899
-59.057899 9.413901 33.263002
--51.401101 -89.661099 -0.450000
--60.729999 -95.892996 4.506000
--56.800000 -99.247098 6.662000
--65.458998 -108.042002 7.389900
--60.670000 -111.819997 9.739000
--56.800000 -99.247098 6.662000
--40.160999 -88.477999 -7.180000
--43.398000 -86.236097 -9.037000
--47.917001 -92.376001 1.546000
-43.740001 -107.864000 -13.299000
-44.803001 -121.279001 -16.937099
-39.013002 -110.205099 -15.553100
--60.670000 -111.819997 9.739000
--52.651100 -102.371104 8.847901
--56.800000 -99.247098 6.662000
-32.414000 -101.190105 -9.800999
-43.740001 -107.864000 -13.299000
-39.013002 -110.205099 -15.553100
-44.803001 -121.279001 -16.937099
-34.131002 -112.251997 -17.819099
-39.013002 -110.205099 -15.553100
-110.107005 -76.608099 22.545001
-104.569003 -66.981100 16.354000
-112.086900 -69.703102 24.510901
-34.131002 -112.251997 -17.819099
-28.208001 -102.822997 -11.911999
-39.013002 -110.205099 -15.553100
-104.569003 -66.981100 16.354000
-106.042899 -60.759000 18.225001
-112.086900 -69.703102 24.510901
-13.267000 -116.031997 37.907001
-7.979000 -116.975002 35.762999
-10.329001 -129.052997 38.644999
-113.580003 -62.765002 26.388900
-115.753897 -72.425105 34.873001
-112.086900 -69.703102 24.510901
-113.676004 -79.808995 32.951899
-110.107005 -76.608099 22.545001
-112.086900 -69.703102 24.510901
-55.241000 -129.489005 -11.170999
-50.319899 -118.459001 -14.516000
-55.617001 -115.300104 -12.116999
--2.218000 -130.229995 33.936001
-0.064900 -142.524987 31.878002
-4.077000 -129.852995 36.304999
-7.275000 -141.955987 34.416899
-14.420000 -140.884995 36.924899
-10.329001 -129.052997 38.644999
--39.333999 33.215001 -57.131100
--37.124999 39.187901 -52.937999
--35.590999 33.443999 -55.105999
-2.638000 -117.573999 33.583902
--2.218000 -130.229995 33.936001
-4.077000 -129.852995 36.304999
--95.463000 17.589001 -49.993098
--97.705103 12.453000 -58.520999
--99.263102 12.913000 -49.699102
--45.390997 38.569000 -56.389000
--48.287999 42.562000 -51.895998
--43.924000 43.108001 -50.543997
--42.937100 45.311999 -44.113997
--39.703000 43.355901 -49.077999
--43.924000 43.108001 -50.543997
--39.703000 43.355901 -49.077999
--41.176997 39.021902 -54.722998
--43.924000 43.108001 -50.543997
--41.176997 39.021902 -54.722998
--45.390997 38.569000 -56.389000
--43.924000 43.108001 -50.543997
--32.028001 33.428002 -52.970100
--32.161001 27.204001 -52.991100
--35.590999 33.443999 -55.105999
--35.340101 26.995001 -55.252001
--39.333999 33.215001 -57.131100
--35.590999 33.443999 -55.105999
-115.105003 -23.130000 55.358000
-110.721998 -25.569100 64.135998
-116.613902 -30.073000 54.368902
--32.161001 27.204001 -52.991100
--35.340101 26.995001 -55.252001
--35.590999 33.443999 -55.105999
--79.030998 -72.038099 -7.523000
--68.249099 -70.046999 -11.528000
--70.320003 -66.359103 -13.188000
--68.249099 -70.046999 -11.528000
--61.692100 -66.418000 -20.729098
--70.320003 -66.359103 -13.188000
--63.598998 -63.130103 -22.166999
--72.168998 -62.589101 -14.787000
--70.320003 -66.359103 -13.188000
-117.649004 -37.223000 53.254001
-117.274001 -28.833099 44.180002
-116.613902 -30.073000 54.368902
-117.274001 -28.833099 44.180002
-115.834899 -22.052100 45.333002
-116.613902 -30.073000 54.368902
-115.834899 -22.052100 45.333002
-115.105003 -23.130000 55.358000
-116.613902 -30.073000 54.368902
-112.139903 -32.410000 63.332997
-117.649004 -37.223000 53.254001
-116.613902 -30.073000 54.368902
--34.913000 45.451000 -41.563999
--34.777999 45.616999 -35.824101
--31.140000 45.166902 -40.139001
-110.721998 -25.569100 64.135998
-112.139903 -32.410000 63.332997
-116.613902 -30.073000 54.368902
--31.775001 43.062001 -45.824099
--34.913000 45.451000 -41.563999
--31.140000 45.166902 -40.139001
--27.542001 44.678003 -38.618099
--28.100999 42.569902 -44.041999
--31.140000 45.166902 -40.139001
--46.251997 12.071000 -55.388100
--48.216000 8.079001 -49.805999
--48.868999 10.420000 -57.055999
--48.216000 8.079001 -49.805999
--50.388999 6.159900 -51.245999
--48.868999 10.420000 -57.055999
--51.492099 8.559000 -58.605000
--51.716000 14.942001 -62.894098
--48.868999 10.420000 -57.055999
--71.061000 -84.652096 -1.729000
--63.452996 -77.124096 -8.032000
--73.988996 -80.572002 -3.714000
--84.865995 -85.512102 -3.738000
--81.633106 -90.416998 -1.609000
--73.988996 -80.572002 -3.714000
--65.958999 -73.639996 -9.807999
--76.648101 -76.361999 -5.646000
--73.988996 -80.572002 -3.714000
-50.790001 -96.991993 53.233001
-48.097901 -87.151103 46.861000
-44.747002 -90.139002 45.305900
-48.097901 -87.151103 46.861000
-45.395002 -82.151100 36.361001
-44.747002 -90.139002 45.305900
-42.368900 -84.741995 34.806900
-41.200001 -92.922993 43.682899
-44.747002 -90.139002 45.305900
-45.395002 -82.151100 36.361001
-42.368900 -84.741995 34.806900
-44.747002 -90.139002 45.305900
--31.021001 21.797001 -27.215099
--29.087000 22.833001 -25.180100
--33.349998 25.072001 -24.720000
-46.777900 -100.378998 51.540002
-50.790001 -96.991993 53.233001
-44.747002 -90.139002 45.305900
--39.333999 33.215001 -57.131100
--35.340101 26.995001 -55.252001
--38.674999 26.569901 -57.402998
--39.299000 20.097001 -55.498101
--42.151101 25.906000 -59.437100
--38.674999 26.569901 -57.402998
--29.087000 22.833001 -25.180100
--31.167999 26.222000 -23.025999
--33.349998 25.072001 -24.720000
--34.325100 29.399900 -23.084000
--36.777101 28.204901 -24.406100
--33.349998 25.072001 -24.720000
-65.458000 -108.042002 -7.391000
-67.102894 -121.808998 -6.106000
-60.668901 -111.819997 -9.740000
-55.617001 -115.300104 -12.116999
-52.650001 -102.371104 -8.849000
-60.668901 -111.819997 -9.740000
--41.666098 12.892000 -44.847101
--47.063001 10.564900 -40.966000
--43.840099 11.435000 -46.602100
-56.798901 -99.247098 -6.663100
-65.458000 -108.042002 -7.391000
-60.668901 -111.819997 -9.740000
-67.102894 -121.808998 -6.106000
-61.319001 -125.839993 -8.624000
-60.668901 -111.819997 -9.740000
--47.063001 10.564900 -40.966000
--49.037997 8.666000 -42.304099
--43.840099 11.435000 -46.602100
-61.319001 -125.839993 -8.624000
-55.617001 -115.300104 -12.116999
-60.668901 -111.819997 -9.740000
--46.027999 9.835000 -48.256099
--43.660998 13.520001 -53.603102
--43.840099 11.435000 -46.602100
-68.945900 -29.781999 59.383899
-68.309896 -25.997000 59.366003
-66.516899 -27.712001 50.213002
--41.113000 14.781901 -51.703997
--41.666098 12.892000 -44.847101
--43.840099 11.435000 -46.602100
--0.195000 -160.039991 13.017001
--4.362000 -162.422001 -1.426000
-4.361000 -162.422001 1.424900
-13.060001 -161.795005 4.276000
-8.335000 -159.606993 15.826000
-4.361000 -162.422001 1.424900
-8.335000 -159.606993 15.826000
--0.195000 -160.039991 13.017001
-4.361000 -162.422001 1.424900
--4.362000 -162.422001 -1.426000
-0.194000 -160.039991 -13.018000
-4.361000 -162.422001 1.424900
-0.194000 -160.039991 -13.018000
-8.732000 -159.860998 -10.198000
-4.361000 -162.422001 1.424900
-34.965899 -146.289989 36.070898
-33.368900 -154.684991 24.127001
-41.373000 -151.871994 26.829001
-33.368900 -154.684991 24.127001
-38.506001 -156.218991 12.734001
-41.373000 -151.871994 26.829001
-38.506001 -156.218991 12.734001
-46.608001 -153.172001 15.501000
-41.373000 -151.871994 26.829001
-67.736901 -27.125999 40.949002
-66.800006 -31.234000 50.066002
-66.516899 -27.712001 50.213002
-68.309896 -25.997000 59.366003
-66.041000 -24.254000 50.251901
-66.516899 -27.712001 50.213002
-55.909000 43.026999 47.143999
-54.497000 42.923000 40.290002
-51.486000 44.090901 46.243001
-50.376900 43.977000 39.595999
-47.152899 44.847000 45.230899
-51.486000 44.090901 46.243001
-52.775003 41.699000 53.130999
-55.909000 43.026999 47.143999
-51.486000 44.090901 46.243001
-47.062002 10.564900 40.964998
-52.235000 10.196000 36.650002
-49.036898 8.666000 42.303000
--101.222098 -96.736997 -16.142100
--99.995099 -108.117998 -24.355000
--97.291999 -103.117995 -13.854999
--92.893995 -109.269001 -11.499000
--90.844102 -96.902996 -5.869000
--97.291999 -103.117995 -13.854999
--94.430096 -91.186993 -8.103000
--101.222098 -96.736997 -16.142100
--97.291999 -103.117995 -13.854999
-46.027001 9.835000 48.255000
-43.839000 11.435000 46.601001
-49.036898 8.666000 42.303000
-54.109000 7.967000 37.555002
-50.972901 6.638000 43.541901
-49.036898 8.666000 42.303000
-66.399001 -18.764000 58.970999
-65.151997 -15.346000 58.591899
-64.537004 -17.590100 50.006900
-65.151997 -15.346000 58.591899
-63.528903 -14.403000 49.722001
-64.537004 -17.590100 50.006900
-66.275999 -17.157000 41.422002
-66.932902 -20.416999 41.361000
-64.537004 -17.590100 50.006900
--67.737997 -27.125999 -40.950101
--71.998097 -27.841000 -32.416999
--67.872100 -30.553000 -40.597100
--67.818098 -34.015000 -40.149000
--66.878997 -34.812998 -49.814001
--67.872100 -30.553000 -40.597100
-24.634000 41.883901 42.161901
-27.541000 44.678003 38.617000
-24.128001 44.005003 37.000000
--66.801101 -31.234000 -50.067101
--67.737997 -27.125999 -40.950101
--67.872100 -30.553000 -40.597100
-27.541000 44.678003 38.617000
-27.697900 45.117002 33.360001
-24.128001 44.005003 37.000000
--66.878997 -34.812998 -49.814001
--66.801101 -31.234000 -50.067101
--67.872100 -30.553000 -40.597100
-4.537000 25.579000 -4.223100
-2.707000 23.593901 -3.083000
-2.900000 25.017900 -6.138100
-21.384001 41.029900 40.192999
-24.634000 41.883901 42.161901
-24.128001 44.005003 37.000000
-4.131000 27.565001 -6.981000
-4.537000 25.579000 -4.223100
-2.900000 25.017900 -6.138100
-73.665999 11.277000 29.215001
-79.732999 15.508001 30.746000
-75.833902 8.097000 28.933000
-82.400002 12.062000 30.346001
-77.863902 4.761000 28.562900
-75.833902 8.097000 28.933000
-77.863902 4.761000 28.562900
-69.699898 4.155000 30.395901
-75.833902 8.097000 28.933000
--28.239099 44.095002 -28.723000
--28.767100 41.932900 -24.962999
--25.031999 43.827899 -27.532000
-67.915000 7.132900 30.461000
-73.665999 11.277000 29.215001
-75.833902 8.097000 28.933000
-47.152899 44.847000 45.230899
-43.923002 43.108001 50.542898
-48.286900 42.562000 51.895000
-49.742002 37.800901 57.932898
-52.775003 41.699000 53.130999
-48.286900 42.562000 51.895000
-43.923002 43.108001 50.542898
-45.389902 38.569000 56.388002
-48.286900 42.562000 51.895000
-45.389902 38.569000 56.388002
-49.742002 37.800901 57.932898
-48.286900 42.562000 51.895000
-52.775003 41.699000 53.130999
-51.486000 44.090901 46.243001
-48.286900 42.562000 51.895000
-51.486000 44.090901 46.243001
-47.152899 44.847000 45.230899
-48.286900 42.562000 51.895000
--21.938998 43.409899 -26.250999
--21.210000 43.922000 -30.531099
--25.031999 43.827899 -27.532000
-23.125000 39.562900 19.729000
-22.944901 36.812000 17.402001
-20.297000 39.657000 18.413000
--25.695998 41.971002 -23.847099
--21.938998 43.409899 -26.250999
--25.031999 43.827899 -27.532000
-19.774901 41.625001 21.357000
-23.125000 39.562900 19.729000
-20.297000 39.657000 18.413000
-20.267000 37.222002 15.944000
-17.509000 39.639901 17.027000
-20.297000 39.657000 18.413000
-19.506902 -105.344102 -16.153000
-29.111000 -113.997102 -20.090999
-23.975901 -115.427099 -22.365000
-22.944901 36.812000 17.402001
-20.267000 37.222002 15.944000
-20.297000 39.657000 18.413000
--78.043997 -19.747999 -27.525999
--85.561000 -14.080000 -25.413100
--86.530998 -18.225100 -24.521001
-29.111000 -113.997102 -20.090999
-33.201899 -125.830099 -21.809999
-23.975901 -115.427099 -22.365000
-27.173901 -127.527997 -24.254000
-18.746901 -116.531000 -24.636000
-23.975901 -115.427099 -22.365000
-33.201899 -125.830099 -21.809999
-27.173901 -127.527997 -24.254000
-23.975901 -115.427099 -22.365000
--85.561000 -14.080000 -25.413100
--94.726995 -12.783000 -26.007000
--86.530998 -18.225100 -24.521001
--78.550100 -23.511998 -26.771000
--78.043997 -19.747999 -27.525999
--86.530998 -18.225100 -24.521001
--96.016996 -17.539000 -24.962001
--87.288104 -22.473000 -23.542998
--86.530998 -18.225100 -24.521001
-6.473900 -99.856101 -10.601000
-10.524000 -106.820002 -20.393999
-2.450000 -100.036100 -12.615000
--94.726995 -12.783000 -26.007000
--96.016996 -17.539000 -24.962001
--86.530998 -18.225100 -24.521001
--50.682999 -142.811999 6.453900
--57.473000 -146.320999 -6.553000
--49.877997 -149.988994 -3.814000
--46.609100 -153.172001 -15.502000
--42.013101 -153.117999 -1.045000
--49.877997 -149.988994 -3.814000
--57.473000 -146.320999 -6.553000
--54.444101 -149.563998 -18.232999
--49.877997 -149.988994 -3.814000
--54.444101 -149.563998 -18.232999
--46.609100 -153.172001 -15.502000
--49.877997 -149.988994 -3.814000
--42.013101 -153.117999 -1.045000
--43.354999 -145.858988 9.159001
--49.877997 -149.988994 -3.814000
--43.354999 -145.858988 9.159001
--50.682999 -142.811999 6.453900
--49.877997 -149.988994 -3.814000
-5.967900 -107.152097 -22.503100
--1.583000 -99.987000 -14.619100
-2.450000 -100.036100 -12.615000
--1.920000 -97.473003 -0.991000
-6.473900 -99.856101 -10.601000
-2.450000 -100.036100 -12.615000
--1.583000 -99.987000 -14.619100
--5.753000 -97.262099 -2.968000
-2.450000 -100.036100 -12.615000
--5.753000 -97.262099 -2.968000
--1.920000 -97.473003 -0.991000
-2.450000 -100.036100 -12.615000
-26.120001 38.222000 46.936002
-25.502000 32.784000 48.382901
-28.659001 33.199001 50.726000
-25.502000 32.784000 48.382901
-29.155999 27.225001 50.625000
-28.659001 33.199001 50.726000
-29.155999 27.225001 50.625000
-32.026999 33.428002 52.969001
-28.659001 33.199001 50.726000
-13.583000 -98.457098 20.533001
-20.773001 -94.307996 10.769000
-17.089000 -95.358104 8.843000
--51.486999 44.090901 -46.243999
--48.287999 42.562000 -51.895998
--52.776102 41.699000 -53.132001
--57.360101 40.497001 -54.249100
--55.909999 43.026999 -47.145098
--52.776102 41.699000 -53.132001
--55.909999 43.026999 -47.145098
--51.486999 44.090901 -46.243999
--52.776102 41.699000 -53.132001
-22.225000 -96.890002 -2.550000
-13.350001 -96.199997 6.899000
-17.089000 -95.358104 8.843000
-63.978001 12.704001 30.333901
-60.874999 6.846000 33.686001
-59.057899 9.413901 33.263002
-20.773001 -94.307996 10.769000
-26.009001 -95.608100 -0.559100
-17.089000 -95.358104 8.843000
-26.009001 -95.608100 -0.559100
-22.225000 -96.890002 -2.550000
-17.089000 -95.358104 8.843000
-55.902902 5.618000 38.368899
-54.109000 7.967000 37.555002
-59.057899 9.413901 33.263002
-16.506001 -127.833992 40.945899
-13.267000 -116.031997 37.907001
-10.329001 -129.052997 38.644999
-61.844002 15.288901 30.142900
-63.978001 12.704001 30.333901
-59.057899 9.413901 33.263002
-14.420000 -140.884995 36.924899
-16.506001 -127.833992 40.945899
-10.329001 -129.052997 38.644999
-7.979000 -116.975002 35.762999
-4.077000 -129.852995 36.304999
-10.329001 -129.052997 38.644999
--55.132002 14.189000 -32.158099
--50.293997 12.305000 -35.652999
--53.041101 16.388001 -31.475998
--57.287998 20.037999 -29.510999
--55.132002 14.189000 -32.158099
--53.041101 16.388001 -31.475998
--97.705103 12.453000 -58.520999
--101.434998 7.368000 -58.328997
--99.263102 12.913000 -49.699102
--101.434998 7.368000 -58.328997
--102.820002 7.880000 -49.279999
--99.263102 12.913000 -49.699102
--102.820002 7.880000 -49.279999
--98.239996 10.800000 -40.911999
--99.263102 12.913000 -49.699102
--98.239996 10.800000 -40.911999
--94.848000 15.345001 -41.408099
--99.263102 12.913000 -49.699102
--50.293997 12.305000 -35.652999
--48.292998 14.293000 -34.570001
--53.041101 16.388001 -31.475998
--50.873101 18.461000 -30.709000
--54.883000 22.194900 -29.066999
--53.041101 16.388001 -31.475998
-9.795000 23.099001 9.303001
-6.638000 22.620000 7.355000
-9.218001 23.919001 6.217000
-72.167903 -62.589101 14.786000
-65.315999 -59.759997 23.538001
-73.794901 -58.752000 16.319901
-11.182000 26.186001 5.414900
-12.187000 24.986001 8.277001
-9.218001 23.919001 6.217000
-82.963899 -63.131101 11.090000
-72.167903 -62.589101 14.786000
-73.794901 -58.752000 16.319901
-20.135000 22.062000 35.754003
-25.649000 19.777000 35.762001
-21.986000 22.128901 38.493000
--6.639000 22.620000 -7.356000
--9.219000 23.919001 -6.218000
--9.795999 23.099001 -9.304000
--13.195000 24.041001 -11.143000
--10.458999 22.547001 -12.367000
--9.795999 23.099001 -9.304000
-17.059000 25.468901 37.500001
-20.135000 22.062000 35.754003
-21.986000 22.128901 38.493000
-25.649000 19.777000 35.762001
-23.996001 22.156000 41.168898
-21.986000 22.128901 38.493000
-23.996001 22.156000 41.168898
-21.295000 26.430901 42.978998
-21.986000 22.128901 38.493000
--19.181000 21.274000 -25.163999
--17.819999 21.680001 -22.413999
--22.621099 22.312000 -22.958100
-21.295000 26.430901 42.978998
-19.076001 25.975000 40.270902
-21.986000 22.128901 38.493000
--21.049000 23.054000 -20.465100
--25.302999 24.781000 -20.955000
--22.621099 22.312000 -22.958100
--58.224998 33.594999 -31.018000
--55.542000 28.840901 -28.796000
--54.917000 35.313901 -30.701099
--27.181000 23.825001 -23.091000
--24.250001 21.576900 -25.413100
--22.621099 22.312000 -22.958100
--56.862999 39.236899 -34.945000
--58.224998 33.594999 -31.018000
--54.917000 35.313901 -30.701099
--51.591001 36.825001 -30.295100
--53.105000 40.630002 -34.493998
--54.917000 35.313901 -30.701099
-19.881001 36.645900 42.450000
-18.356001 40.034901 38.136002
-17.111000 35.666000 40.077899
--53.105000 40.630002 -34.493998
--56.862999 39.236899 -34.945000
--54.917000 35.313901 -30.701099
--50.682999 -142.811999 6.453900
--43.354999 -145.858988 9.159001
--42.326998 -135.543004 16.329000
--43.354999 -145.858988 9.159001
--35.555098 -137.906998 18.927000
--42.326998 -135.543004 16.329000
-15.552000 38.923901 35.994899
-14.578000 34.596000 37.631001
-17.111000 35.666000 40.077899
-14.578000 34.596000 37.631001
-17.364001 30.729000 40.827900
-17.111000 35.666000 40.077899
-19.850001 31.520002 43.428000
-19.881001 36.645900 42.450000
-17.111000 35.666000 40.077899
-72.167903 -62.589101 14.786000
-70.318997 -66.359103 13.187001
-63.597903 -63.130103 22.166001
-2.161000 22.708001 0.165000
-2.707000 23.593901 -3.083000
-4.460000 23.940900 -1.170000
--88.165097 -35.717998 -20.104999
--87.963998 -40.255100 -18.793000
--78.582101 -39.069101 -22.914000
-6.190000 26.097000 -2.142000
-6.412000 24.398001 0.915000
-4.460000 23.940900 -1.170000
--71.516000 -38.554098 -30.195000
--71.865998 -34.965098 -31.021999
--78.884102 -35.126001 -24.000999
--78.974001 -31.212000 -25.007999
--88.111997 -31.233000 -21.334000
--78.884102 -35.126001 -24.000999
--50.388999 6.159900 -51.245999
--48.216000 8.079001 -49.805999
--50.974000 6.638000 -43.543000
--88.111997 -31.233000 -21.334000
--88.165097 -35.717998 -20.104999
--78.884102 -35.126001 -24.000999
--49.037997 8.666000 -42.304099
--54.110099 7.967000 -37.556000
--50.974000 6.638000 -43.543000
-78.549005 -23.511998 26.770001
-71.997002 -27.841000 32.416001
-71.786001 -24.329999 32.980900
--46.027999 9.835000 -48.256099
--49.037997 8.666000 -42.304099
--50.974000 6.638000 -43.543000
--56.848001 -77.113003 -51.070001
--64.135104 -81.267998 -59.187099
--59.291098 -73.467106 -52.306000
-71.997002 -27.841000 32.416001
-67.736901 -27.125999 40.949002
-71.786001 -24.329999 32.980900
--54.917000 35.313901 -30.701099
--55.542000 28.840901 -28.796000
--52.658100 30.655000 -28.395999
--49.862001 26.068000 -27.931999
--47.265999 27.780000 -27.240999
--52.658100 30.655000 -28.395999
--55.723000 -70.263997 -41.898999
--56.848001 -77.113003 -51.070001
--59.291098 -73.467106 -52.306000
--61.481997 -69.697998 -53.456102
--57.815000 -66.976994 -43.095101
--59.291098 -73.467106 -52.306000
-97.800002 -27.465999 22.599000
-107.342005 -30.203000 26.273999
-98.263003 -32.605000 21.284001
-98.425001 -37.839100 19.881001
-88.164002 -35.717998 20.104000
-98.263003 -32.605000 21.284001
-107.342005 -30.203000 26.273999
-107.857004 -36.146000 24.847001
-98.263003 -32.605000 21.284001
--69.963999 -103.987001 5.077000
--74.170001 -99.680997 2.802000
--77.699997 -112.709001 1.174900
-107.857004 -36.146000 24.847001
-98.425001 -37.839100 19.881001
-98.263003 -32.605000 21.284001
-8.826001 22.652000 19.878000
-12.116000 21.961000 18.402901
-13.121000 21.843001 21.377999
--72.572000 -117.422000 3.621000
--69.963999 -103.987001 5.077000
--77.699997 -112.709001 1.174900
--50.320998 -118.459001 14.515000
--44.804100 -121.279001 16.936000
--43.741100 -107.864000 13.298000
--77.059999 -125.962004 -4.074000
--72.572000 -117.422000 3.621000
--77.699997 -112.709001 1.174900
-49.437001 -139.811993 41.088000
-41.602001 -131.779999 46.522900
-42.331003 -143.302992 38.605899
-48.291899 14.293000 34.568999
-43.040000 13.989001 38.012002
-46.242002 16.163001 33.397898
--44.804100 -121.279001 16.936000
--39.014000 -110.205099 15.552000
--43.741100 -107.864000 13.298000
-43.040000 13.989001 38.012002
-41.012999 15.527001 36.402002
-46.242002 16.163001 33.397898
-41.012999 15.527001 36.402002
-44.150002 17.916000 32.145001
-46.242002 16.163001 33.397898
-48.638001 20.402901 29.857900
-50.872002 18.461000 30.708000
-46.242002 16.163001 33.397898
-54.702900 -86.764000 2.410000
-60.729001 -95.892996 -4.507000
-51.400002 -89.661099 0.449000
-60.729001 -95.892996 -4.507000
-56.798901 -99.247098 -6.663100
-51.400002 -89.661099 0.449000
-43.396901 -86.236097 9.036000
-46.494901 -83.823994 10.854901
-51.400002 -89.661099 0.449000
-56.798901 -99.247098 -6.663100
-47.915999 -92.376001 -1.547100
-51.400002 -89.661099 0.449000
-39.298002 20.097001 55.497002
-36.402900 20.825000 53.353000
-38.624998 15.873000 49.699001
-36.402900 20.825000 53.353000
-36.215000 16.805001 47.591899
-38.624998 15.873000 49.699001
-36.215000 16.805001 47.591899
-39.519001 14.215000 42.994902
-38.624998 15.873000 49.699001
-41.111901 14.781901 51.702902
-39.298002 20.097001 55.497002
-38.624998 15.873000 49.699001
-1.493000 34.740001 16.048001
-2.069000 33.117998 18.871000
-3.437000 36.180902 18.090000
-41.665003 12.892000 44.846002
-41.111901 14.781901 51.702902
-38.624998 15.873000 49.699001
-3.779000 34.569900 21.156000
-5.525000 37.534002 20.072902
-3.437000 36.180902 18.090000
-56.658000 4.171000 61.327901
-54.095000 6.477000 60.028899
-54.625001 1.817000 53.791001
-3.490000 37.240002 15.128001
-1.493000 34.740001 16.048001
-3.437000 36.180902 18.090000
-52.532002 4.076000 52.576002
-54.680001 2.176000 45.722000
-54.625001 1.817000 53.791001
--2.218000 -130.229995 33.936001
--2.731000 -117.829099 31.378001
--8.521000 -130.182996 31.540003
-13.350001 -96.199997 6.899000
-5.606900 -99.707097 16.607901
-9.614000 -99.194996 18.583000
--71.516000 -38.554098 -30.195000
--78.884102 -35.126001 -24.000999
--78.582101 -39.069101 -22.914000
-3.174000 -106.987998 26.669001
-7.728000 -106.490001 28.718000
-9.614000 -99.194996 18.583000
-17.089000 -95.358104 8.843000
-13.350001 -96.199997 6.899000
-9.614000 -99.194996 18.583000
--7.166000 -142.591998 29.312901
--2.218000 -130.229995 33.936001
--8.521000 -130.182996 31.540003
--8.101000 -117.737003 29.145900
--14.804000 -129.712999 29.121900
--8.521000 -130.182996 31.540003
--78.884102 -35.126001 -24.000999
--88.165097 -35.717998 -20.104999
--78.582101 -39.069101 -22.914000
-86.529903 -18.225100 24.520000
-94.725899 -12.783000 26.006000
-96.015900 -17.539000 24.961000
--43.741100 -107.864000 13.298000
--32.415099 -101.190105 9.800000
--36.500998 -99.317104 7.703900
--87.963998 -40.255100 -18.793000
--78.066103 -43.027099 -21.747001
--78.582101 -39.069101 -22.914000
-97.044900 -22.437999 23.825001
-87.287001 -22.473000 23.541901
-96.015900 -17.539000 24.961000
--70.973001 -42.146001 -29.285001
--71.516000 -38.554098 -30.195000
--78.582101 -39.069101 -22.914000
-94.725899 -12.783000 26.006000
-103.722900 -13.285000 29.971000
-96.015900 -17.539000 24.961000
-103.722900 -13.285000 29.971000
-105.258003 -18.750001 28.836001
-96.015900 -17.539000 24.961000
--29.704999 -94.116993 -1.415000
--40.456101 -97.217105 5.626900
--36.500998 -99.317104 7.703900
--32.415099 -101.190105 9.800000
--26.010100 -95.608100 0.558000
--36.500998 -99.317104 7.703900
-67.817003 -34.015000 40.147901
-66.877902 -34.812998 49.812902
-67.871004 -30.553000 40.596001
-49.125899 -148.504004 29.488001
-49.437001 -139.811993 41.088000
-42.331003 -143.302992 38.605899
-41.602001 -131.779999 46.522900
-35.090901 -134.755999 44.201002
-42.331003 -143.302992 38.605899
-35.090901 -134.755999 44.201002
-34.965899 -146.289989 36.070898
-42.331003 -143.302992 38.605899
-34.965899 -146.289989 36.070898
-41.373000 -151.871994 26.829001
-42.331003 -143.302992 38.605899
-41.373000 -151.871994 26.829001
-49.125899 -148.504004 29.488001
-42.331003 -143.302992 38.605899
-67.736901 -27.125999 40.949002
-71.997002 -27.841000 32.416001
-67.871004 -30.553000 40.596001
-54.680001 2.176000 45.722000
-59.220001 0.564000 39.714999
-56.423899 -0.260000 46.658002
-59.220001 0.564000 39.714999
-60.721003 -2.135000 40.243901
-56.423899 -0.260000 46.658002
-60.721003 -2.135000 40.243901
-58.080003 -2.830000 47.486000
-56.423899 -0.260000 46.658002
-56.652002 -0.616000 54.889899
-54.625001 1.817000 53.791001
-56.423899 -0.260000 46.658002
--39.188001 -87.157995 -33.194099
--44.020101 -81.623100 -23.334000
--41.048098 -83.962999 -21.666100
--6.507000 38.062900 -8.181000
--3.439000 37.819002 -6.664100
--3.704000 37.930001 -9.480000
--1.124000 36.630999 -10.619099
--3.662000 37.785899 -12.274999
--3.704000 37.930001 -9.480000
--46.496000 -83.823994 -10.856000
--37.943099 -86.139999 -19.948000
--41.048098 -83.962999 -21.666100
--79.030998 -72.038099 -7.523000
--70.320003 -66.359103 -13.188000
--81.138998 -67.621104 -9.339000
--35.861999 -89.388996 -31.521000
--39.188001 -87.157995 -33.194099
--41.048098 -83.962999 -21.666100
--92.499100 -70.012100 -9.765999
--90.304099 -75.281002 -7.821100
--81.138998 -67.621104 -9.339000
--52.860100 4.473900 -44.683997
--50.974000 6.638000 -43.543000
--55.904001 5.618000 -38.369998
--54.110099 7.967000 -37.556000
--59.058998 9.413901 -33.264000
--55.904001 5.618000 -38.369998
-68.945900 -29.781999 59.383899
-66.800006 -31.234000 50.066002
-69.351897 -33.659998 59.284899
-66.800006 -31.234000 50.066002
-66.877902 -34.812998 49.812902
-69.351897 -33.659998 59.284899
-69.517896 -37.613999 59.070900
-75.460896 -35.177000 66.986904
-69.351897 -33.659998 59.284899
--12.242000 -105.717100 -30.740000
--7.980100 -116.975002 -35.764001
--13.268000 -116.031997 -37.908100
--7.980100 -116.975002 -35.764001
--10.330000 -129.052997 -38.646001
--13.268000 -116.031997 -37.908100
--16.507000 -127.833992 -40.946998
--18.482100 -114.749998 -40.013101
--13.268000 -116.031997 -37.908100
--10.330000 -129.052997 -38.646001
--16.507000 -127.833992 -40.946998
--13.268000 -116.031997 -37.908100
--80.755994 12.984000 -70.197001
--75.240999 6.224900 -71.776100
--84.560998 8.916000 -70.723996
--16.698999 -104.667000 -32.727100
--12.242000 -105.717100 -30.740000
--13.268000 -116.031997 -37.908100
--51.401101 -89.661099 -0.450000
--56.800000 -99.247098 6.662000
--47.917001 -92.376001 1.546000
--56.800000 -99.247098 6.662000
--52.651100 -102.371104 8.847901
--47.917001 -92.376001 1.546000
--44.264998 -94.900101 3.572000
--40.160999 -88.477999 -7.180000
--47.917001 -92.376001 1.546000
--43.398000 -86.236097 -9.037000
--51.401101 -89.661099 -0.450000
--47.917001 -92.376001 1.546000
--66.933997 -20.416999 -41.361999
--64.538099 -17.590100 -50.007999
--66.277102 -17.157000 -41.423101
--52.651100 -102.371104 8.847901
--44.264998 -94.900101 3.572000
--47.917001 -92.376001 1.546000
--65.456100 -13.971000 -41.384000
--70.103996 -14.110000 -34.141999
--66.277102 -17.157000 -41.423101
-70.972003 -42.146001 29.284000
-70.234999 -45.731999 28.291000
-66.499002 -44.484101 38.247000
-65.838896 -45.722999 48.436999
-67.134000 -40.993098 38.972002
-66.499002 -44.484101 38.247000
--70.833996 -17.455000 -33.846099
--66.933997 -20.416999 -41.361999
--66.277102 -17.157000 -41.423101
--98.264001 -32.605000 -21.284999
--98.426104 -37.839100 -19.881999
--88.165097 -35.717998 -20.104999
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.cpp b/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.cpp
deleted file mode 100644
index 221ecaa..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#include "envelope_3.h"
-#include "icons/vertices.xpm"
-#include "icons/edges.xpm"
-#include "icons/faces.xpm"
-
-// The envelope diagram
-Envelope_tri_diagram_2    tri_diag;
-Envelope_sphere_diagram_2 sphere_diag;
-Envelope_plane_diagram_2  plane_diag;
-bool draw_v;
-bool draw_e;
-bool draw_f;
-
-const QString my_title_string("Envelopes of 3D surfaces");
-
-// overrides the virtual method 'draw()' of Qt_widget_layer
-void Qt_layer_show_diag::draw()
-{
-  widget->lock(); // widget have to be locked before drawing
-
-  if (!tri_diag.is_empty())
-    draw_arr(widget, tri_diag, draw_v, draw_e, draw_f);
-  else if (!sphere_diag.is_empty())
-    draw_arr(widget, sphere_diag, draw_v, draw_e, draw_f);
-  else
-    draw_arr(widget, plane_diag, draw_v, draw_e, draw_f);
-
-  widget->unlock(); // widget have to be unlocked when finished drawing
-}
-
-void Qt_layer_show_statitics::mousePressEvent(QMouseEvent *)
-{
-  QString s("|V|=%1 |E|=%2 |F|=%3");
-  unsigned int n_v = 0,
-    n_e = 0,
-    n_f = 0;
-  if (!tri_diag.is_empty()) {
-    n_v = tri_diag.number_of_vertices();
-    n_e = tri_diag.number_of_edges();
-    n_f = tri_diag.number_of_faces();
-  }
-  else if (!sphere_diag.is_empty()) {
-    n_v = sphere_diag.number_of_vertices();
-    n_e = sphere_diag.number_of_edges();
-    n_f = sphere_diag.number_of_faces();
-  }
-  else if (!plane_diag.is_empty()) {
-    n_v = plane_diag.number_of_vertices();
-    n_e = plane_diag.number_of_edges();
-    n_f = plane_diag.number_of_faces();
-  }
-  QMessageBox::information(widget, "Diagram size",
-                           s.arg(n_v).arg(n_e).arg(n_f));
-}
-
-// constructor
-MyWindow::MyWindow(int w, int h) :
-  current_state(-1)
-{
-  // Constructs a widget which is a child of this window
-  widget = new CGAL::Qt_widget(this);
-
-  /* Sets the central widget for this main window to w.
-   * The central widget is surrounded by the left, top, right and bottom
-   * dock areas. The menu bar is above the top dock area
-   */
-  setCentralWidget(widget);
-
-  curr_dir= QString::null;
-
-  // create a timer for checking if somthing changed
-  // constructs a timer whose parent is this window
-  QTimer * timer = new QTimer(this);
-
-  // connects the timer to the window
-  connect(timer, SIGNAL(timeout()), this, SLOT(timer_done()));
-  timer->start(200, FALSE);         // starts the timer with a timeout
-
-  // file menu
-  QPopupMenu * file = new QPopupMenu(this);
-  menuBar()->insertItem("&File", file);
-  file->insertItem("&New", this, SLOT(new_instance()), CTRL+Key_N);
-  file->insertItem("New &Window", this, SLOT(new_window()), CTRL+Key_W);
-  file->insertSeparator();
-  file->insertItem("&Open Triangles File", this, SLOT(open_triangles_file()),
-                   CTRL+Key_O);
-  file->insertSeparator();
-  file->insertItem("&Open Spheres File", this, SLOT(open_spheres_file()),
-                   CTRL+Key_S);
-  file->insertSeparator();
-  file->insertItem("&Open Planes File", this, SLOT(open_planes_file()),
-                   CTRL+Key_H);
-  file->insertSeparator();
-  
-  file->insertSeparator();
-  file->insertItem("Print", widget, SLOT(print_to_ps()), CTRL+Key_P);
-  file->insertSeparator();
-  file->insertItem("&Close", this, SLOT(close()), CTRL+Key_X);
-  file->insertItem("&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q);
-
-  // help menu
-  QPopupMenu * help = new QPopupMenu(this);
-  menuBar()->insertItem("&Help", help);
-  help->insertItem("How To", this, SLOT(howto()), Key_F1);
-  help->insertSeparator();
-  help->insertItem("&About", this, SLOT(about()), CTRL+Key_A);
-  help->insertItem("About &Qt", this, SLOT(aboutQt()));
-
-  //the standard toolbar
-  stoolbar = new CGAL::Qt_widget_standard_toolbar(widget, this, "ST");
-
-  show_toolbar = new QToolBar(this, "Show features");
-  QIconSet set0(QPixmap((const char**)vertices_icon),
-                QPixmap((const char**)vertices_icon));
-
-  QIconSet set1(QPixmap((const char**)edges), QPixmap((const char**)edges));
-  QIconSet set2(QPixmap((const char**)faces), QPixmap((const char**)faces));
-
-  show_v_button = new QToolButton(show_toolbar, "Show Vertices");
-  show_v_button->setToggleButton(TRUE);
-  show_v_button->setTextLabel("Show Vertices ");
-  connect(show_v_button,SIGNAL(pressed()),
-          this, SLOT(show_v_pressed()));
-  show_v_button->setIconSet(set0);
-
-  show_toolbar->addSeparator();
-  show_e_button = new QToolButton(show_toolbar, "Show Edges");
-  show_e_button->setToggleButton(TRUE);
-  show_e_button->setTextLabel("Show Edges ");
-  connect(show_e_button,SIGNAL(pressed()), this, SLOT(show_e_pressed()));
-  show_e_button->setIconSet(set1);
-
-  show_toolbar->addSeparator();
-  show_f_button = new QToolButton(show_toolbar, "Show Faces");
-  show_f_button->setToggleButton(TRUE);
-  show_f_button->toggle();
-  show_f_button->setTextLabel("Show Faces ");
-  connect(show_f_button,SIGNAL(pressed()), this, SLOT(show_f_pressed()));
-  show_f_button->setIconSet(set2);
-
-  //layers
-  widget->attach(&testlayer);
-  widget->attach(&show_stat_layer);
-  *widget <<CGAL::BackgroundColor (CGAL::BLACK);
-
-  resize(w,h);
-  widget->set_window(-1, 1, -1, 1);
-  widget->setMouseTracking(TRUE);
-
-  //application flag stuff
-  old_state = 0;
-}
-
-void MyWindow::read_surface(std::ifstream& is, Base_triangle_3& tri)
-{
-  is >> tri;
-}
-
-void MyWindow::read_surface(std::ifstream& is, Base_sphere_3& s)
-{
-  Rat_point_3 a;
-  Rational sr;
-  is >> a >> sr;
-  s = Base_sphere_3(a, sr);
-}
-
-void MyWindow::read_surface(std::ifstream& is, Base_plane_3& p)
-{
-  Coord_type a, b, c, d;
-  is >> a >> b >> c >> d;
-  p = Base_plane_3(Plane_3(a, b, c, d));
-}
-
-void MyWindow::open_triangles_file()
-{
-  if (open_file(tri_diag)) {
-    sphere_diag.clear();
-    plane_diag.clear();
-    something_changed();
-  }
-}
-
-void MyWindow::open_spheres_file()
-{
-  if (open_file(sphere_diag)) {
-    tri_diag.clear();
-    plane_diag.clear();
-    something_changed();
-  }
-}
-
-void MyWindow::open_planes_file()
-{
-  if (open_file(plane_diag)) {
-    tri_diag.clear();
-    sphere_diag.clear();
-    something_changed();
-  }
-}
-
-void MyWindow::new_instance()
-{
-  widget->lock();
-  clear_all_diags();
-  widget->clear_history();
-  widget->set_window(-1.1, 1.1, -1.1, 1.1);
-  // set the Visible Area to the Interval
-  widget->unlock();
-
-  something_changed();
-}
-
-void MyWindow::clear_all_diags()
-{
-  tri_diag.clear();
-  sphere_diag.clear();
-  plane_diag.clear();
-}
-
-void MyWindow::show_v_pressed()
-{
-  draw_v = !draw_v;
-  something_changed();
-}
-
-void MyWindow::show_e_pressed()
-{
-  draw_e = !draw_e;
-  something_changed();
-}
-
-void MyWindow::show_f_pressed()
-{
-  draw_f = !draw_f;
-  something_changed();
-}
-
-void MyWindow::about()
-{
-  QMessageBox::about(this, my_title_string,
-                     "This is a demo for 3D envelopes of surfaces\n");
-}
-
-void MyWindow::aboutQt()
-{
-  QMessageBox::aboutQt(this, my_title_string);
-}
-
-void MyWindow::howto()
-{
-  QString home;
-  home = "help/index.html";
-  CGAL::Qt_help_window *help = new
-    CGAL::Qt_help_window(home, ".", 0, "help viewer");
-  help->resize(400, 400);
-  help->setCaption("Demo HowTo");
-  help->show();
-}
-
-void MyWindow::new_window()
-{
-  MyWindow * ed = new MyWindow(500, 500);
-  ed->setCaption("Layer");
-  ed->widget->clear_history();
-  ed->widget->set_window(widget->x_min(), widget->x_max(),
-                         widget->y_min(), widget->y_max());
-  ed->show();
-  something_changed();
-}
-
-void MyWindow::timer_done()
-{
-  if (old_state != current_state) {
-    widget->redraw();
-    old_state = current_state;
-  }
-}
-
-#include "envelope_3.moc"
-
-int main(int argc, char * argv[])
-{
-  QApplication app(argc, argv);
-  MyWindow widget(600,400); // physical window size
-  app.setMainWidget(&widget);
-  widget.setCaption(my_title_string);
-  widget.setMouseTracking(TRUE);
-  QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm);
-  widget.setIcon(cgal_icon);
-  widget.show();
-  draw_v = false;
-  draw_e = false;
-  draw_f = true;
-  return app.exec();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.h b/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.h
deleted file mode 100644
index 43a5a27..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/envelope_3.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef ENVELOPE_3_H
-#define ENVELOPE_3_H
-
-#include <fstream>
-#include <string>
-
-#include <CGAL/basic.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_help_window.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-#include <CGAL/Random.h>
-
-#include <qplatinumstyle.h>
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qfiledialog.h>
-#include <qtimer.h>
-#include <qstatusbar.h>
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-
-#include "typedefs.h"
-
-class Qt_layer_show_diag : public CGAL::Qt_widget_layer {
-public:
-
-  // default constructor
-  Qt_layer_show_diag() {}
-
-  // override the virtual method 'draw()' of Qt_widget_layer
-  void draw();
-};
-
-class Qt_layer_show_statitics : public CGAL::Qt_widget_layer
-{
-public:
-  // default constructor
-  Qt_layer_show_statitics() {};
-
-  void mousePressEvent(QMouseEvent *);
-};
-
-/* The QMainWindow class provides a main application window,
- * with a menu bar, dock windows (e.g. for toolbars), and a status bar
- */
-class MyWindow : public QMainWindow {
-  Q_OBJECT
-
-public:
-  // constructor
-  MyWindow(int w, int h);
-
-private:
-  void something_changed() { current_state++; };
-
-  template<class Arrangement>
-  bool open_file(Arrangement & arr)
-  {
-    typedef typename Arrangement::Traits_3                      Traits_3;
-    typedef typename Traits_3::Surface_3                        Surface_3;
-    typedef typename Traits_3::Base_traits_3:: Surface_3        Base_surface_3;
-    typedef typename Arrangement::Vertex_const_iterator
-      Vertex_const_iterator;
-    QString s = QFileDialog::getOpenFileName(curr_dir, QString::null, this,
-                                             "open file dialog",
-                                             "Choose a file");
-    if (s == QString::null) return false;
-    curr_dir = s;
-
-    std::ifstream in_file(s.ascii());
-    if (!in_file.is_open()) {
-      QMessageBox::warning(widget, "Open", "Can't open file");
-      return false;
-    }
-
-    QCursor old = widget->cursor();
-    widget->setCursor(Qt::WaitCursor);
-    widget->lock();
-    widget->clear_history();
-
-    std::list<Surface_3> surfaces;
-    unsigned int num_of_surfaces = 0;
-    in_file >> num_of_surfaces;
-    CGAL::Random rand;
-    for (unsigned int i=0 ; i<num_of_surfaces; i++) {
-      int r = rand.get_int(128, 256);
-      int g = rand.get_int(0, 256);
-      int b = rand.get_int(0, 256);
-
-      Base_surface_3 s;
-      read_surface(in_file, s);
-      surfaces.push_back(Surface_3(s, CGAL::Color(r, g, b)));
-    }
-    arr.clear();
-    CGAL::lower_envelope_3(surfaces.begin(), surfaces.end(), arr);
-
-    if (arr.number_of_vertices() != 0) {
-      Vertex_const_iterator vit = arr.vertices_begin();
-      double x_min = CGAL::to_double(vit->point().x());
-      double x_max = CGAL::to_double(vit->point().x());
-      double y_min = CGAL::to_double(vit->point().y());
-      double y_max = CGAL::to_double(vit->point().y());
-
-      for (++vit; vit != arr.vertices_end(); ++vit) {
-        double curr_x = CGAL::to_double(vit->point().x());
-        double curr_y = CGAL::to_double(vit->point().y());
-
-        if (curr_x < x_min)
-          x_min = curr_x;
-        else if (curr_x > x_max)
-          x_max = curr_x;
-
-        if (curr_y < y_min)
-          y_min = curr_y;
-        else if (curr_y > y_max)
-          y_max = curr_y;
-      }
-      double w = (x_max - x_min)/10;
-      double h = (y_max - y_min)/10;
-
-      // make sure the bbox is not degenerated
-      if (w == 0.0)
-        w+=10.0;
-      if (h == 0.0)
-        h+=10.0;
-      widget->set_window(x_min - w, x_max + w, y_min - h, y_max + h);
-    }
-    widget->unlock();
-    widget->setCursor(old);
-    return true;
-  }
-
-  void read_surface(std::ifstream & is, Base_triangle_3 & tri);
-
-  void read_surface(std::ifstream & is, Base_sphere_3 & s);
-
-  void read_surface(std::ifstream & is, Base_plane_3 & p);
-
-public slots:
-  void open_triangles_file();
-
-  void open_spheres_file();
-
-  void open_planes_file();
-
-  void new_instance();
-
-  void clear_all_diags();
-
-  void show_v_pressed();
-
-  void show_e_pressed();
-
-  void show_f_pressed();
-
-private slots:
-  void about();
-
-  void aboutQt();
-
-  void howto();
-
-  void new_window();
-
-  void timer_done();
-
-private:
-  CGAL::Qt_widget * widget;
-  CGAL::Qt_widget_standard_toolbar * stoolbar;
-  QToolBar * show_toolbar;
-  QToolButton * show_v_button;
-  QToolButton * show_e_button;
-  QToolButton * show_f_button;
-  Qt_layer_show_diag testlayer;
-  Qt_layer_show_statitics show_stat_layer;
-  int old_state;
-  QString curr_dir;
-  int current_state;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/help/index.html b/3rdparty/CGAL-4.6/demo/Envelope_3/help/index.html
deleted file mode 100644
index 1e9024a..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/help/index.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>3D envelopes of surfaces</title>
-  </head>
-
-  <body>
-    <P align="center"><FONT size="5">How to use the 3D envelopes Demo</FONT></P>
-    <br>
-    Main Functionality
-    <UL>
-      <LI><A href="#new">Reset application</A></LI>
-      <LI><A href="#new_window">Creating a new window</A></LI>
-	  <LI><A href="#open_triangles_file">Reading input from triangles file</A></LI>
-	  <LI><A href="#open_spheres_file">Reading input from spheres file</A></LI>
-	  <LI><A href="#open_planes_file">Reading input from planes file</A></LI>
-      <LI><A href="#print">Print</A></LI>
-      <LI><A href="#close_window">Close the current window</A></LI>
-      <LI><A href="#quit">Quit the application</A></LI>      
-    </UL><br>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="new"></A>
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reset application</FONT></STRONG></P>
-    Press Ctrl+N combination keys or go to File menu and choose "New". The 
-    points list will be erased, the window's visible area will be set to 
-    default. (-1, 1, -1, 1)
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="new_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Create a new window</FONT></STRONG></P>
-    Press Ctrl+W combination keys or go to File menu and choose "New Window". 
-    A new window will appear, modifying the visible area to make the points 
-    list fit in the new window.
-	
-	 <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="open_triangles_file"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reading input from triangles file</FONT></STRONG></P>
-	  Press Ctrl+O combination keys or go to File menu and choose "Open triangles file".
-	  A file dialog will be opened to choose an existing input file.
-	  
-	  <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="open_spheres_file"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reading input from spheres file</FONT></STRONG></P>
-	  Press Ctrl+S combination keys or go to File menu and choose "Open spheres file".
-	  A file dialog will be opened to choose an existing input file.
-	  
-	  <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="open_planes_file"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reading input from planes file</FONT></STRONG></P>
-	  Press Ctrl+H combination keys or go to File menu and choose "Open planes file".
-	  A file dialog will be opened to choose an existing input file. 
-	  
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="print">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">Print</FONT>
-      </STRONG></P>
-    Press Ctrl+P combination keys or go to File menu and choose "Print". The 
-    visible area on the screen will be outputed to the print device of your 
-    choice.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="close_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Close the current window</FONT></STRONG></P>
-    Press Ctrl+X combination keys or go to File menu and choose "Close". You 
-    may do it for any window other than the initial one, this operation will 
-    close only the one you have choosen. If you do this for the initial parent 
-    window, it will close the others too.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="quit"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Quit the application</FONT></STRONG></P>
-    Press Ctrl+Q combination keys or go to File menu and choose "Quit". When 
-    you quit the application, all the windows you have created will be 
-    destroyed.
-<br>
-<hr>
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.bmp b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.bmp
deleted file mode 100644
index f471f14..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.xpm b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.xpm
deleted file mode 100644
index 311b322..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/edges.xpm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* XPM */
-static const char * edges[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 3 1",
-/* colors */
-"  c None",
-". c #0000FF",
-"X c None",
-/* pixels */
-"                                ",
-"                                ",
-"                                ",
-"  .                             ",
-"  ..                            ",
-"  ...                           ",
-"  ....                          ",
-"  .. ..                         ",
-"  ..  ..                        ",
-"  ..   ...............          ",
-"  ..    ..............          ",
-"  ..     ..         ..          ",
-"  ..      ..        ..          ",
-"  ..       ..       ..          ",
-"  ..        ..      ..          ",
-"  ..         ..     ..          ",
-"  ..          ..    ..          ",
-"  ..           ..   ..          ",
-"  ..            ..  ..          ",
-"  ..             .. ..          ",
-"  ..              ....          ",
-"  ..               ...          ",
-"  ..                ..          ",
-"  ..                 ..         ",
-"  ..                  ..        ",
-"  ..                   ..       ",
-"  ........................      ",
-"  .........................     ",
-"                                ",
-"                                ",
-"                                ",
-"                                "
-};
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.bmp b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.bmp
deleted file mode 100644
index ace425e..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.xpm b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.xpm
deleted file mode 100644
index e5dc38f..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/faces.xpm
+++ /dev/null
@@ -1,43 +0,0 @@
-/* XPM */
-static const char *faces[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 4 1",
-/* colors */
-"  c #00FF00",
-". c #FF00FF",
-"X c None",
-"o c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX  XXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX   XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX    XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX     XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXX      XXXXXXXXXXXXXXXXXXXXXX",
-"XXXX       .............XXXXXXXX",
-"XXXX        ............XXXXXXXX",
-"XXXX         ...........XXXXXXXX",
-"XXXX          ..........XXXXXXXX",
-"XXXX           .........XXXXXXXX",
-"XXXX            ........XXXXXXXX",
-"XXXX             .......XXXXXXXX",
-"XXXX              ......XXXXXXXX",
-"XXXX               .....XXXXXXXX",
-"XXXX                ....XXXXXXXX",
-"XXXX                 ...XXXXXXXX",
-"XXXX                  ..XXXXXXXX",
-"XXXX                   .XXXXXXXX",
-"XXXX                    XXXXXXXX",
-"XXXX                     XXXXXXX",
-"XXXX                      XXXXXX",
-"XXXX                       XXXXX",
-"XXXX                        XXXX",
-"XXXX                         XXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.bmp b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.bmp
deleted file mode 100644
index e7545b7..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.bmp and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.xpm b/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.xpm
deleted file mode 100644
index 0596c51..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/icons/vertices.xpm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* XPM */
-static const char * vertices_icon[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 3 1",
-/* colors */
-"  c #FF0000",
-". c None",
-"X c None",
-/* pixels */
-"................................",
-"........................... ....",
-"............. ............   ...",
-".. .........   ............ ....",
-".   ......... ..................",
-".. .............................",
-"...................... .........",
-"...... ..............   ........",
-".....   ....... ...... .........",
-"...... .......   ...............",
-"............... ............ ...",
-"...........................   ..",
-"............................ ...",
-"......... ......................",
-"........   .....................",
-"... ..... ......................",
-"..   ............ ..............",
-"... ............   .............",
-"................. ........ .....",
-".........................   ....",
-".......................... .....",
-"................................",
-"................................",
-"....... ........ ...............",
-"......   ......   ..............",
-"....... ........ ...............",
-"................................",
-"..................... ...... ...",
-"... ......... ......   ....   ..",
-"..   .......   ...... ...... ...",
-"... ......... ..................",
-"................................"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Envelope_3/typedefs.h b/3rdparty/CGAL-4.6/demo/Envelope_3/typedefs.h
deleted file mode 100644
index a501225..0000000
--- a/3rdparty/CGAL-4.6/demo/Envelope_3/typedefs.h
+++ /dev/null
@@ -1,431 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel       <efif at post.tau.ac.il>
-
-#ifndef CGAL_TYPEDEFS_H
-#define CGAL_TYPEDEFS_H
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/Lazy_exact_nt.h>
-#include <CGAL/envelope_3.h>
-#include <CGAL/Env_triangle_traits_3.h>
-#include <CGAL/Env_surface_data_traits_3.h>
-#ifdef CGAL_USE_CORE
-#include <CGAL/CORE_algebraic_number_traits.h>
-#endif
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Env_sphere_traits_3.h>
-#include <CGAL/Env_plane_traits_3.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/IO/Color.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/IO/Qt_widget_Conic_arc_2.h>
-#include <CGAL/IO/Qt_widget_Linear_object_2.h>
-#include <CGAL/Arr_overlay_2.h>
-#include <CGAL/Sweep_line_2/Arr_overlay_traits_2.h>
-
-#include <qpainter.h>
-
-#ifdef CGAL_USE_GMP
-  #include <CGAL/Gmpq.h>
-  typedef CGAL::Gmpq                                    Base_nt;
-#else
-  #include <CGAL/MP_Float.h>
-  #include <CGAL/Quotient.h>
-  typedef CGAL::Quotient<CGAL::MP_Float>                Base_nt;
-#endif
-
-typedef CGAL::Lazy_exact_nt<Base_nt>                    Coord_type;
-// instead of
-//typedef CGAL::Cartesian<Coord_type>                     Kernel;
-// workaround for VC++
-struct Kernel : public CGAL::Cartesian<Coord_type> {};
-
-typedef Kernel::Segment_2                               Segment_2;
-
-typedef Kernel::Point_2                                 Point_2;
-typedef Kernel::Point_3                                 Point_3;
-typedef Kernel::Triangle_2                              Triangle_2;
-typedef Kernel::Triangle_3                              Triangle_3;
-
-typedef CGAL::Env_triangle_traits_3<Kernel>             Base_traits;
-typedef Base_traits::Surface_3                          Base_triangle_3;
-typedef CGAL::Env_surface_data_traits_3<Base_traits, CGAL::Color>
-                                                        Triangle_traits;
-typedef Triangle_traits::Surface_3                      Tri_surface_3;
-typedef Triangle_traits::Xy_monotone_surface_3
-  Xy_monotone_tri_surface_3;
-typedef CGAL::Envelope_diagram_2<Triangle_traits>       Envelope_tri_diagram_2;
-typedef Triangle_traits::X_monotone_curve_2             Tri_x_monotone_curve_2;
-
-typedef Envelope_tri_diagram_2::Ccb_halfedge_const_circulator
-  Tri_ccb_halfedge_const_circulator;
-
-
-typedef CGAL::CORE_algebraic_number_traits              Nt_traits;
-typedef Nt_traits::Rational                             Rational;
-typedef Nt_traits::Algebraic                            Algebraic;
-typedef CGAL::Cartesian<Rational>                       Rat_kernel;
-typedef Rat_kernel::Point_3                             Rat_point_3;
-typedef CGAL::Cartesian<Algebraic>                      Alg_kernel;
-typedef Alg_kernel::Point_2                             Sphere_point_2;
-
-// instead of
-//typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
-//                                                        Conic_traits_2;
-// workaround for VC++
-struct Conic_traits_2 : public CGAL::Arr_conic_traits_2<Rat_kernel,
-			                                Alg_kernel,
-                                                        Nt_traits> {} ;
-
-typedef CGAL::Env_sphere_traits_3<Conic_traits_2>       Base_sphere_traits_3;
-typedef Base_sphere_traits_3::Surface_3                 Base_sphere_3;
-typedef Base_sphere_traits_3::Rat_point_3               Rat_point_3;
-typedef Base_sphere_traits_3::Rational                  Rational;
-
-typedef CGAL::Env_surface_data_traits_3<Base_sphere_traits_3, CGAL::Color>
-                                                        Sphere_traits_3;
-typedef Sphere_traits_3::X_monotone_curve_2
-  Sphere_x_monotone_curve_2;
-typedef Sphere_traits_3::Surface_3                      Sphere_3;
-typedef CGAL::Envelope_diagram_2<Sphere_traits_3>
-  Envelope_sphere_diagram_2;
-typedef Envelope_sphere_diagram_2::Ccb_halfedge_const_circulator
-  Sphere_ccb_halfedge_const_circulator;
-
-
-typedef Kernel::Plane_3                                 Plane_3;
-typedef CGAL::Env_plane_traits_3<Kernel>                Base_plane_traits_3;
-typedef Base_plane_traits_3::Surface_3                  Base_plane_3;
-typedef CGAL::Env_surface_data_traits_3<Base_plane_traits_3, CGAL::Color>
-  Plane_traits_3;
-typedef Plane_traits_3::Surface_3                       Plane_surface_3;
-typedef Plane_traits_3::X_monotone_curve_2              Plane_x_monotone_curve_2;
-typedef CGAL::Envelope_diagram_2<Plane_traits_3>        Envelope_plane_diagram_2;
-typedef Envelope_plane_diagram_2::Ccb_halfedge_const_circulator
-  Plane_ccb_halfedge_const_circulator;
-typedef Envelope_plane_diagram_2::Halfedge_const_handle
-  Plane_halfedge_const_handle;
-
-
-
-typedef CGAL::Cartesian<double>                         Double_kernel;
-typedef Double_kernel::Point_2                          Double_point_2;
-typedef CGAL::Polygon_2<Double_kernel>                  Polygon_2;
-
-template<class Arrangement, class OutputIterator>
-class Faces_visitor :
-  public CGAL::Arr_overlay_traits_2<typename Arrangement::Geometry_traits_2,
-                                    Arrangement,
-                                    Arrangement>
-{
-private:
-  typedef typename Arrangement::Vertex_const_handle     V_const_handle;
-  typedef typename Arrangement::Halfedge_const_handle   He_const_handle;
-  typedef typename Arrangement::Face_const_handle       F_const_handle;
-
-  typedef typename Arrangement::Vertex_handle           V_handle;
-  typedef typename Arrangement::Halfedge_handle         He_handle;
-  typedef typename Arrangement::Face_handle             F_handle;
-
-  typedef typename Arrangement::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-
-  F_const_handle m_f1;
-  F_const_handle m_f2;
-  OutputIterator m_oi;
-
-public:
-  Faces_visitor(F_const_handle f1, F_const_handle f2, OutputIterator oi) :
-    m_f1(f1),
-    m_f2(f2),
-    m_oi(oi)
-  {}
-
-  void create_vertex(V_const_handle, V_const_handle, V_handle) const {}
-  void create_vertex(V_const_handle, He_const_handle, V_handle) const {}
-  void create_vertex(V_const_handle, F_const_handle, V_handle) const {}
-  void create_vertex(He_const_handle, V_const_handle, V_handle) const {}
-  void create_vertex(F_const_handle, V_const_handle, V_handle) const {}
-  void create_vertex(He_const_handle, He_const_handle, V_handle) const {}
-  void create_edge(He_const_handle, He_const_handle, He_handle) const {}
-  void create_edge(He_const_handle, F_const_handle, He_handle) const {}
-  void create_edge(F_const_handle, He_const_handle, He_handle) const {}
-
-  void create_face(F_const_handle f1, F_const_handle f2, F_handle f)
-  {
-    if (f1 == m_f1 && f2 == m_f2) {
-      Polygon_2 pgn;
-      Ccb_halfedge_const_circulator ccb = f->outer_ccb();
-      Ccb_halfedge_const_circulator cc = ccb;
-      do {
-        pgn.push_back(Double_point_2(CGAL::to_double(cc->source()->
-                                                     point().x()),
-                                     CGAL::to_double(cc->source()->
-                                                     point().y())));
-        //created from the outer boundary of the face
-      }
-      while (++cc !=ccb);
-      *m_oi++ = pgn;
-    }
-  }
-};
-
-template <class OutoutIterator>
-void construct_polygon(CGAL::Qt_widget* ,
-                       Tri_ccb_halfedge_const_circulator ccb,
-                       OutoutIterator oi, bool is_unb, bool /* is_hole */)
-{
-  if (is_unb) return;
-  /* running with around the outer of the face and generate from it polygon */
-
-  Polygon_2 pgn;
-
-  Tri_ccb_halfedge_const_circulator cc=ccb;
-  do {
-    pgn.push_back(Double_point_2(CGAL::to_double(cc->source()->point().x()),
-                                 CGAL::to_double(cc->source()->point().y())));
-    //created from the outer boundary of the face
-  }
-  while (++cc !=ccb);
-
-  *oi = pgn;
-}
-
-template <class OutoutIterator>
-void construct_polygon(CGAL::Qt_widget* w,
-                       Sphere_ccb_halfedge_const_circulator ccb,
-                       OutoutIterator oi, bool is_unb, bool /* is_hole */)
-{
-  if (is_unb) return;
-  Polygon_2 pgn;
-
-  Sphere_ccb_halfedge_const_circulator cc=ccb;
-  do {
-    const Sphere_x_monotone_curve_2& cv = cc->curve();
-    // Get the co-ordinates of the curve's source and target.
-    const double  sx = CGAL::to_double(cv.source().x());
-    //const double  sy = CGAL::to_double(cv.source().y());
-    const double  tx = CGAL::to_double(cv.target().x());
-    //const double  ty = CGAL::to_double(cv.target().y());
-
-    if (cv.orientation() == CGAL::COLLINEAR) {
-      // The curve is a segment
-      pgn.push_back(Double_point_2(CGAL::to_double(cc->source()->point().x()),
-                                   CGAL::to_double(cc->source()->
-                                                   point().y())));
-    }
-    else
-    {
-
-      // Draw a curves conic arc: As the arc is x-monotone, its source and its
-      // target has the extreme x-coordinates.
-      const bool    is_source_left = (sx < tx);
-      const int     x_min = is_source_left ? w->x_pixel(sx) : w->x_pixel(tx);
-      const int     x_max = is_source_left ? w->x_pixel(tx) : w->x_pixel(sx);
-      const int     n = x_max - x_min + 1;
-
-      if (n <= 0) return;
-
-      typedef std::pair<double, double>    App_point_2;
-      int                                  i;
-
-      App_point_2  *pts = new App_point_2 [n + 1];
-      cv.polyline_approximation (n, pts);
-
-      if (cc->direction() == CGAL::ARR_RIGHT_TO_LEFT) {
-        std::reverse(pts, pts+n+1);
-      }
-
-      for (i = 0; i < n; i++) {
-        pgn.push_back(Double_point_2(pts[i].first, pts[i].second));
-      }
-      delete[] pts;
-    }
-
-    //created from the outer boundary of the face
-  } while (++cc != ccb);
-  *oi = pgn;
-}
-template <class OutoutIterator>
-void construct_polygon(CGAL::Qt_widget* w,
-                       Plane_ccb_halfedge_const_circulator ccb,
-                       OutoutIterator oi, bool is_unb, bool is_hole)
-{
-  if (is_unb && !is_hole)
-  {
-    Plane_ccb_halfedge_const_circulator curr_ccb = ccb;
-    Plane_ccb_halfedge_const_circulator non_fict;
-    do {
-      if (!curr_ccb->is_fictitious()) {
-        non_fict = curr_ccb;
-        break;
-      }
-      ++curr_ccb;
-    }
-    while(curr_ccb != ccb);
-
-    Polygon_2 pgn;
-    if (non_fict == Plane_ccb_halfedge_const_circulator()) {
-      // didn't find any non-fictitous edge
-      pgn.push_back(Double_point_2(w->x_min(), w->y_min()));
-      pgn.push_back(Double_point_2(w->x_min(), w->y_max()));
-      pgn.push_back(Double_point_2(w->x_max(), w->y_max()));
-      pgn.push_back(Double_point_2(w->x_max(), w->y_min()));
-      *oi = pgn;
-    }
-    else {
-      // create two arrangements: one from the ccb of the unbounded face,
-      // the second fromthe bounding box of the widget and overlay them
-      // construct polygons from the intersection faces.
-
-      Envelope_plane_diagram_2 arr_box;
-      Envelope_plane_diagram_2 arr_unb_f;
-
-      Point_2 p1(w->x_min(), w->y_min());
-      Point_2 p2(w->x_min(), w->y_max());
-      Point_2 p3(w->x_max(), w->y_max());
-      Point_2 p4(w->x_max(), w->y_min());
-
-      Plane_x_monotone_curve_2 c1(p1, p2);
-      Plane_x_monotone_curve_2 c2(p2, p3);
-      Plane_x_monotone_curve_2 c3(p3, p4);
-      Plane_x_monotone_curve_2 c4(p4, p1);
-      Plane_halfedge_const_handle e=
-        CGAL::insert_non_intersecting_curve(arr_box, c1);
-      CGAL::insert_non_intersecting_curve(arr_box, c2);
-      CGAL::insert_non_intersecting_curve(arr_box, c3);
-      CGAL::insert_non_intersecting_curve(arr_box, c4);
-
-      if (e->face()->is_unbounded())
-        e = e->twin();
-
-      Plane_halfedge_const_handle he =
-        insert_non_intersecting_curve(arr_unb_f, non_fict->curve());
-      if (he->direction() != non_fict->direction())
-        he = he->twin();
-
-      std::list<Plane_x_monotone_curve_2> cv_list;
-      Plane_halfedge_const_handle eh;
-      for (eh = non_fict->next(); eh != non_fict; eh = eh->next()) {
-        if (!eh->is_fictitious())
-          cv_list.push_back(eh->curve());
-      }
-      CGAL::insert_non_intersecting_curves(arr_unb_f, cv_list.begin(),
-                                           cv_list.end());
-
-      Faces_visitor<Envelope_plane_diagram_2, OutoutIterator>
-        visitor(e->face(), he->face(), oi);
-      Envelope_plane_diagram_2 res;
-      CGAL::overlay(arr_box, arr_unb_f, res, visitor);
-    }
-    return;
-  }
-
-  // its a a bounded face
-  Polygon_2 pgn;
-
-  Plane_ccb_halfedge_const_circulator cc=ccb;
-  do {
-    pgn.push_back(Double_point_2(CGAL::to_double(cc->source()->point().x()),
-                                 CGAL::to_double(cc->source()->point().y())));
-    //created from the outer boundary of the face
-  }
-  while (++cc !=ccb);
-
-  *oi = pgn;
-}
-
-
-template<class Arr>
-void draw_face(CGAL::Qt_widget* w, typename Arr::Face_const_iterator f)
-{
-  bool is_unb = false;
-  if(f->is_unbounded())
-    is_unb = true;
-
-  Qt::RasterOp old_rasterop = w->rasterOp();
-  w->get_painter().setRasterOp(Qt::XorROP);
-  // make polygon from the outer ccb of the face 'f'
-  std::list<Polygon_2> pgns;
-  construct_polygon(w, f->outer_ccb(), std::back_inserter(pgns), is_unb,
-                    false);
-
-  std::list<Polygon_2>::iterator itr;
-  for (itr = pgns.begin(); itr != pgns.end(); ++itr) {
-    Polygon_2 &pgn = *itr;
-    if (!pgn.is_empty()) {
-      w->setFilled(true);
-      CGAL::Color c = f->surface().data();
-      w->setFillColor(c);
-      (*w) << pgn ;  // draw the polyong
-    }
-  }
-
-  typename Arr::Inner_ccb_const_iterator hit;
-  for (hit = f->holes_begin(); hit != f->holes_end(); ++hit) {
-    pgns.clear();
-    construct_polygon(w, *hit, std::back_inserter(pgns), is_unb, true);
-    CGAL_assertion(pgns.size() == 1);
-    const Polygon_2& hole = pgns.front();
-    if (!hole.is_empty())
-      (*w) << hole;  // draw the polyong
-  }
-  w->get_painter().setRasterOp(old_rasterop);
-  w->setFilled(false);
-}
-
-template <class Arrangement>
-void draw_arr(CGAL::Qt_widget* w, const Arrangement& arr, bool draw_v,
-              bool draw_e, bool draw_f)
-{
-  typedef typename Arrangement::Face_const_iterator     Face_const_iterator;
-  typedef typename Arrangement::Edge_const_iterator     Edge_const_iterator;
-  typedef typename Arrangement::Vertex_const_iterator   Vertex_const_iterator;
-  if (draw_f) {
-    *w <<  CGAL::BLACK;
-
-    Face_const_iterator fit;
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
-      if (! fit->number_of_surfaces()) continue;
-      draw_face<Arrangement>(w, fit);
-    }
-  }
-
-  if (draw_e) {
-    *w <<  CGAL::BLUE;
-    Edge_const_iterator eit;
-    for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
-      *w << eit->curve();
-    }
-  }
-
-  if (draw_v) {
-    *w <<  CGAL::RED;
-    Vertex_const_iterator vit;
-    for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-      *w << vit->point();
-    }
-  }
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Generator/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Generator/CMakeLists.txt
deleted file mode 100644
index 45cbeff..0000000
--- a/3rdparty/CGAL-4.6/demo/Generator/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (GeneratorDemo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  include(${QT_USE_FILE})
-  #--------------------------------
-  # Demo: Generator_2
-  #--------------------------------
-  # UI files (Qt Designer files)
-  qt4_wrap_ui( DT_UI_FILES Generator_2.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( DT_RESOURCE_FILES ./Generator_2.qrc )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  qt4_generate_moc( "Generator_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Generator_2.moc" )
-
-  # The executable itself.
-  add_executable  ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Generator_2 )
-
-  # Link with Qt libraries
-  target_link_libraries( Generator_2 ${QT_LIBRARIES} )
-  # And with CGAL libraries
-  target_link_libraries( Generator_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Generator/Generator_2.cpp b/3rdparty/CGAL-4.6/demo/Generator/Generator_2.cpp
deleted file mode 100644
index 31e90bd..0000000
--- a/3rdparty/CGAL-4.6/demo/Generator/Generator_2.cpp
+++ /dev/null
@@ -1,347 +0,0 @@
-#include <fstream>
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/Join_input_iterator.h>
-#include <CGAL/algorithm.h>
-#ifndef Q_MOC_RUN
-#include <CGAL/random_convex_hull_in_disc_2.h>
-#endif
-
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QFileDialog>
-#include <QGraphicsLineItem>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/PointsGraphicsItem.h>
-#include <CGAL/Qt/utility.h>
-#include <CGAL/Qt/SegmentsGraphicsItem.h>
-  
-// the two base classes
-#include "ui_Generator_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Vector_2 Vector_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Generator_2
-{
-  Q_OBJECT
-  
-private:
-
-
-
-  CGAL::Qt::Converter<K> convert;
-  std::vector<Point_2> points; 
-  std::vector<Segment_2> segments; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
-  CGAL::Qt::SegmentsGraphicsItem<std::vector<Segment_2> > * sgi;
-
-
-  template <typename G>
-  void
-  on_actionGenerate_triggered()
-  {
-    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-    CGAL::Qt::Converter<K> convert;  
-    Iso_rectangle_2 isor = convert(rect);
-    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
-    Vector_2 offset = center - CGAL::ORIGIN;
-    double w = isor.xmax() - isor.xmin();
-    double h = isor.ymax() - isor.ymin();
-    double radius = (w<h) ? w/2 : h/2;
-
-    G pg(radius);
-    bool ok = false;
-    const int number_of_points = 
-      QInputDialog::getInteger(this, 
-                               tr("Number of random points"),
-                               tr("Enter number of random points"),
-                               100,
-                               0,
-                               (std::numeric_limits<int>::max)(),
-                               1,
-                               &ok);
-
-    if(!ok) {
-      return;
-    }
-
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    points.reserve(points.size() + number_of_points);
-    for(int i = 0; i < number_of_points; ++i){
-      points.push_back(*pg + offset);
-      ++pg;
-    }
-    // default cursor
-    QApplication::restoreOverrideCursor();
-    emit(changed());
-  }
-
-public:
-  MainWindow();
-
-public slots:
-
-  void on_actionClear_triggered();
-
-
-  void on_actionRecenter_triggered();
-  void on_actionGeneratePointsOnCircle_triggered();
-  void on_actionGeneratePointsInSquare_triggered();
-  void on_actionGeneratePointsInDisc_triggered();
-  void on_actionGenerateSegments_triggered();
-  void on_actionGenerateSegmentFans_triggered();
-  void on_actionGeneratePolytopeInDisc_triggered();
-  void clear();
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  // Add a GraphicItem for the point set
-  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
-  sgi = new CGAL::Qt::SegmentsGraphicsItem<std::vector<Segment_2> >(&segments);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pgi, SLOT(modelChanged()));
-
-
-    QObject::connect(this, SIGNAL(changed()),
-  		   sgi, SLOT(modelChanged()));
-
-  pgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  sgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(pgi);
-  scene.addItem(sgi);
-
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
- 
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-
-  // Uncomment the following line to get antialiasing by default.
-//   actionUse_Antialiasing->setChecked(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Generator_2.html");
-  this->addAboutCGAL();
-
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  clear();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(pgi->boundingRect());
-  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-void
-MainWindow::on_actionGeneratePointsOnCircle_triggered()
-{
-  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInSquare_triggered()
-{
-  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInDisc_triggered()
-{
-  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGenerateSegments_triggered()
-{
-  segments.reserve(segments.size() + 200);
-  
-  // Prepare point generator for the horizontal segment, length 200.
-  typedef  CGAL::Random_points_on_segment_2<Point_2>  Rpos_generator;
-  Rpos_generator rpos( Point_2(-100,0), Point_2(100,0));
-  
-  // Prepare point generator for random points on circle, radius 250.
-  typedef  CGAL::Random_points_on_circle_2<Point_2>  Rpoc_generator;
-  Rpoc_generator rpoc( 250);
-  
-  // Create 200 segments.
-  typedef CGAL::Creator_uniform_2< Point_2, Segment_2> Seg_creator;
-  typedef CGAL::Join_input_iterator_2< Rpos_generator, Rpoc_generator, Seg_creator> Seg_iterator;
-  Seg_iterator g( rpos, rpoc);
-  CGAL::cpp11::copy_n( g, 200, std::back_inserter(segments));
-  
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionGenerateSegmentFans_triggered()
-{
-  typedef CGAL::Points_on_segment_2<Point_2>                PG;
-  typedef CGAL::Creator_uniform_2< Point_2, Segment_2>        Creator;
-  typedef CGAL::Join_input_iterator_2< PG, PG, Creator>   Segm_iterator;
-  typedef CGAL::Counting_iterator<Segm_iterator,Segment_2>  Count_iterator;
-
-  segments.reserve(segments.size() + 100);
-
-  // A horizontal like fan.
-  PG p1( Point_2(-250, -50), Point_2(-250, 50),50);   // Point generator.
-  PG p2( Point_2( 250,-250), Point_2( 250,250),50);
-  Segm_iterator  t1( p1, p2);                     // Segment generator.
-  Count_iterator t1_begin( t1);                   // Finite range.
-  Count_iterator t1_end(t1, 50);
-  std::copy( t1_begin, t1_end, std::back_inserter(segments));
-  
-  // A vertical like fan.
-  PG p3( Point_2( -50,-250), Point_2(  50,-250),50);
-  PG p4( Point_2(-250, 250), Point_2( 250, 250),50);
-  Segm_iterator  t2( p3, p4);
-  Count_iterator t2_begin( t2);
-  Count_iterator t2_end(t2, 50);
-  std::copy( t2_begin, t2_end, std::back_inserter(segments));
-
-  emit(changed());
-}
-void
-MainWindow::on_actionGeneratePolytopeInDisc_triggered()
-{
-    boost::mt19937 gen;
-    gen.seed(time(0));
-    std::vector<Point_2> points;
-    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-    CGAL::Qt::Converter<K> convert;
-    Iso_rectangle_2 isor = convert(rect);
-    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
-    Vector_2 offset = center - CGAL::ORIGIN;
-    double w = isor.xmax() - isor.xmin();
-    double h = isor.ymax() - isor.ymin();
-    double radius = (w<h) ? w/2 : h/2;
-    
-    //G pg(radius);
-    bool ok = false;
-    const int number_of_points =
-    QInputDialog::getInteger(this,
-                             tr("Number of random points in the disc"),
-                             tr("Enter number of random points.\nThe polytope will be the convex hull of these points."),
-                             100,
-                             0,
-                             (std::numeric_limits<int>::max)(),
-                             1,
-                             &ok);
-    
-    if(!ok) {
-        return;
-    }
-    
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    segments.reserve(segments.size() + 100);
-
-    CGAL::random_convex_hull_in_disc_2(number_of_points,radius,gen,std::back_inserter(points),K());
-    std::vector<Point_2>::iterator it2=points.begin();
-    for(std::vector<Point_2>::iterator it=points.begin();it!=points.end();it++){
-        it2++;
-        if (it2==points.end()) it2=points.begin();
-        Segment_2 p(*it+offset,*it2+offset);
-        segments.push_back(p);
-    }
-
-
-    // default cursor
-    QApplication::restoreOverrideCursor();
-    
-    emit(changed());
-}
-
-void
-MainWindow::clear()
-{
-  points.clear();
-  segments.clear();
-}
-
-
-#include "Generator_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Generator_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Generator_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Geomview/CMakeLists.txt
deleted file mode 100644
index 7b2cd17..0000000
--- a/3rdparty/CGAL-4.6/demo/Geomview/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Geomview_Demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  create_single_source_cgal_program( "input.cpp" )
-  create_single_source_cgal_program( "kernel.cpp" )
-  create_single_source_cgal_program( "gv_terrain.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/GraphicsView/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/GraphicsView/CMakeLists.txt
deleted file mode 100644
index 07a20b1..0000000
--- a/3rdparty/CGAL-4.6/demo/GraphicsView/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project (GraphicsView)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-find_package(Qt4)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  include(${QT_USE_FILE})
-
-
-  add_executable  ( min min.cpp )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS min )
-
-  # Link with Qt libraries
-  target_link_libraries( min ${QT_LIBRARIES} )
-  # Link with CGAL
-  target_link_libraries( min ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/GraphicsView/min.cpp b/3rdparty/CGAL-4.6/demo/GraphicsView/min.cpp
deleted file mode 100644
index 67e8663..0000000
--- a/3rdparty/CGAL-4.6/demo/GraphicsView/min.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <iostream>
-#include <boost/format.hpp>
-#include <QtGui>
-#include <CGAL/Qt/GraphicsViewNavigation.h>
-#include <QLineF>
-#include <QRectF>
-
-int main(int argc, char **argv)
-{
-    QApplication app(argc, argv);
-
-
-    QGraphicsScene scene;
-    scene.setSceneRect(0,0, 100, 100);
-    scene.addRect(QRectF(0,0, 100, 100));
-    scene.addLine(QLineF(0,0, 100, 100));
-    scene.addLine(QLineF(0,100, 100, 0));
-
-    QGraphicsView* view = new QGraphicsView(&scene);
-    CGAL::Qt::GraphicsViewNavigation navigation;
-    view->installEventFilter(&navigation);
-    view->viewport()->installEventFilter(&navigation);
-    view->setRenderHint(QPainter::Antialiasing);
-
-    view->show();
-    return app.exec();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Interpolation/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Interpolation/CMakeLists.txt
deleted file mode 100644
index 00dd438..0000000
--- a/3rdparty/CGAL-4.6/demo/Interpolation/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Interpolation_ )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "interpolation_2_demo.cpp" )
-  create_single_source_cgal_program( "surface_voronoi.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/CMakeLists.txt
deleted file mode 100644
index ec53a19..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Kinetic_data_structures_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3 Core)
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-  
-  find_package(Qt3-patched )
-  # FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-  # that it can be used together with FindQt4: all its variables are prefixed
-  # by "QT3_" instead of "QT_".
-  
-  if(CGAL_Qt3_FOUND AND QT3_FOUND)
-  
-    include( Qt3Macros-patched )
-    qt3_automoc(  KDS_Delaunay_triangulation_2.cpp Delaunay_triangulation_3.cpp KDS_Delaunay_triangulation_stable_subset_2.cpp KDS_generate_data.cpp KDS_gui_2.cpp gui_3.cpp regular_triangulation_3.cpp SoQt_examiner_viewer.cpp )
-
-    # Make sure the compiler can find generated .moc files
-    include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-  
-    include_directories( ${QT3_INCLUDE_DIR} )
-
-    include_directories (BEFORE include)
-    include_directories (BEFORE ../../include)
-    
-    # Link with Boost.ProgramOptions (optional)
-    find_package(Boost COMPONENTS program_options)
-    if(Boost_PROGRAM_OPTIONS_FOUND)
-      add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
-      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
-    endif()
-
-    create_single_source_cgal_program( "KDS_Delaunay_triangulation_2.cpp" )
-    create_single_source_cgal_program( "KDS_gui_2.cpp" )
-    create_single_source_cgal_program( "KDS_generate_data.cpp")
-    create_single_source_cgal_program( "KDS_Delaunay_triangulation_stable_subset_2.cpp" )
- 
-  else()
-  
-    message(STATUS "NOTICE: This demo requires Qt3 and the CGAL Qt3 library, and will not be compiled.")
-  
-  endif()
-  
-else()
-  
-    message(STATUS "NOTICE: This demo requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp
deleted file mode 100644
index 8833629..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-#include <CGAL/basic.h>
-#include <CGAL/Kinetic/Inexact_simulation_traits.h>
-#include <CGAL/Kinetic/Exact_simulation_traits.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_2.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h>
-#include <CGAL/Kinetic/Enclosing_box_2.h>
-#include <CGAL/Kinetic/IO/Qt_moving_points_2.h>
-#include <CGAL/Kinetic/IO/Qt_triangulation_2.h>
-#include <CGAL/Kinetic/IO/Qt_widget_2.h>
-#include <CGAL/Kinetic/Insert_event.h>
-#include <CGAL/Random.h>
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-#include <boost/program_options.hpp>
-#endif
-
-template <class Traits>
-int run(int argc, char *argv[], int n, int d, int seed, std::string file) {
-  // typedefs to set everything up
-  typedef CGAL::Triangulation_data_structure_2<
-  CGAL::Kinetic::Delaunay_triangulation_vertex_base_2<typename Traits::Instantaneous_kernel>,
-    CGAL::Kinetic::Delaunay_triangulation_face_base_2<Traits> > TDS;
-  typedef CGAL::Delaunay_triangulation_2<typename Traits::Instantaneous_kernel, TDS > Del;
-  typedef CGAL::Kinetic::Delaunay_triangulation_recent_edges_visitor_2<Del> Visitor;
-  typedef CGAL::Kinetic::Delaunay_triangulation_2<Traits, Visitor, Del> KDel;
-  typedef CGAL::Kinetic::Qt_widget_2<typename Traits::Simulator> Qt_gui;
-  typedef CGAL::Kinetic::Qt_moving_points_2<Traits, Qt_gui> Qt_mps;
-  typedef CGAL::Kinetic::Qt_triangulation_2<KDel, typename Traits::Instantaneous_kernel, Qt_gui> Qt_triangulation;
-  typedef CGAL::Kinetic::Enclosing_box_2<Traits> Box;
-
-  CGAL_SET_LOG_LEVEL(CGAL::Log::LOTS);
-
-  Traits tr(0, 10000000);
-  typename Box::Handle box= new Box(tr);
-  typename KDel::Handle kdel= new KDel(tr);
-
-  typename Qt_gui::Handle qtsim= new Qt_gui(argc, argv, tr.simulator_handle());
-
-  typename Qt_mps::Handle qtmps= new Qt_mps(qtsim, tr);
-  typename Qt_triangulation::Handle qtdel= new Qt_triangulation(kdel, tr.instantaneous_kernel_object(), qtsim);
-
-
-  if (file.empty()) {
-    // Generate some random points
-    typename CGAL::Random rand= CGAL::Random(seed);
-    typename Traits::Active_points_2_table::Key lk;
-    std::vector<typename Traits::Kinetic_kernel::Point_2> pts;
-
-    for (int i=0; i< n; ++i) {
-      std::vector<double> coefsx, coefsy;
-      for (int j=0; j< d; ++j) {
-	coefsx.push_back((rand.get_double()*10-5.0)/(j+1));
-	coefsy.push_back((rand.get_double()*10-5.0)/(j+1));
-	std::cout << coefsx.back() << " " << coefsy.back() << std::endl;
-      }
-      typename Traits::Kinetic_kernel::Point_2 mp(typename Traits::Kinetic_kernel::Motion_function(coefsx.begin(),
-												   coefsx.end()),
-						  typename Traits::Kinetic_kernel::Motion_function(coefsy.begin(),
-												   coefsy.end()));
-      std::cout << "Adding point " << mp << std::endl;
-      pts.push_back(mp);
-      //std::cout << mp << std::endl;
-    }
-    for (unsigned int i=0; i< pts.size(); ++i) {
-      lk=tr.active_points_2_table_handle()->insert(pts[i]);
-    }
-    tr.active_points_2_table_handle()->erase(lk);
-  } else {
-    // read from a file
-    std::ifstream in(file.c_str());
-    if (!in) {
-      std::cerr << "Error opening input file: " << file << std::endl;
-      return EXIT_FAILURE;
-    }
-    char buf[1000];
-    int nread=0;
-    while (true ) {
-      in.getline(buf, 1000);
-      if (!in) break;
-      std::istringstream il(buf);
-      typename Traits::Kinetic_kernel::Point_2 p;
-      il >> p;
-      tr.active_points_2_table_handle()->insert(p);
-      ++nread;
-    }
-    std::cout << nread << " points read.\n";
-  }
-
-  std::cout << "Green edges just flipped, grey edges will not flip until"
-	    << " their certificate changes and black edges will flip." << std::endl;
-
-  return qtsim->begin_event_loop();
-}
-
-
-int main(int argc, char *argv[])
-{
-  int n=10;
-  int d=2;
-  int seed=std::time(NULL);
-  std::string file;
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-  bool print_help=false;
-  bool exact=false;
-  boost::program_options::options_description desc("Allowed options");
-  desc.add_options()
-    ("help", boost::program_options::bool_switch(&print_help), "produce help message")
-    ("exact", boost::program_options::bool_switch(&exact), "Run an exact simulation")
-    ("num-points,n", boost::program_options::value<int>(&n), "Number of points to use.")
-    ("random-seed,s", boost::program_options::value<int>(&seed), "The value to use for the random seed.")
-    ("degree,d", boost::program_options::value<int>(&d), "The degree of the motions to use.")
-    ("file,f", boost::program_options::value<std::string>(&file), "Read points from a file.");
-
-  boost::program_options::variables_map vm;
-  boost::program_options::store(boost::program_options::command_line_parser(argc, argv).
-				options(desc).run(), vm);
-  boost::program_options::notify(vm);
-
-  if (print_help) {
-    std::cout << desc << "\n";
-    return EXIT_FAILURE;
-  }
-#else
-  std::cerr << "Warning, this demo is not very functional without "
-            << "boost program options. You probably need to modify "
-            << "the code directly.\n";
-#endif
-
-  if (true) {
-    return run<CGAL::Kinetic::Exact_simulation_traits>(argc, argv, n,d,seed, file);
-  } else {
-    //return run<CGAL::Kinetic::Inexact_simulation_traits_2>(argc, argv, n,d,seed, file);
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp
deleted file mode 100644
index 089fea5..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_2.h>
-#include <CGAL/Kinetic/Insert_event.h>
-#include <CGAL/Random.h>
-#include <CGAL/Kinetic/Exact_simulation_traits.h>
-#include <CGAL/Kinetic/Inexact_simulation_traits.h>
-#include "Qt_Delaunay_stable_subset_2.h"
-#include <CGAL/Kinetic/IO/Qt_widget_2.h>
-#include <CGAL/Kinetic/IO/Qt_moving_points_2.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h>
-#include <CGAL/Kinetic/Enclosing_box_2.h>
-
-#include <CGAL/Random.h>
-#include <algorithm>
-#include <fstream>
-#include <sstream>
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-#include <boost/program_options.hpp>
-#endif
-
-
-int main(int argc, char *argv[])
-{
-  double threshold=.9;
-  int n=10;
-  int d=2;
-  bool print_help=false;
-  std::string file;
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-  boost::program_options::options_description desc("Allowed options");
-  desc.add_options()
-    ("help", boost::program_options::bool_switch(&print_help), "produce help message")
-    ("num-points,n", boost::program_options::value<int>(&n), "Number of points to use.")
-    ("degree,d", boost::program_options::value<int>(&d), "The degree of the motions to use.")
-    ("file,f", boost::program_options::value<std::string>(&file), "Read points from a file.")
-    ("threshold,t", boost::program_options::value<double>(&threshold), "The threshold for displaying the edges.");
-
-  boost::program_options::variables_map vm;
-  boost::program_options::store(boost::program_options::command_line_parser(argc, argv).
-				options(desc).run(), vm);
-  boost::program_options::notify(vm);
-
-  if (print_help) {
-    std::cout << desc << "\n";
-    return EXIT_FAILURE;
-  }
-#endif
-
-  typedef CGAL::Kinetic::Inexact_simulation_traits Traits;
-  typedef CGAL::Triangulation_data_structure_2<
-  CGAL::Kinetic::Delaunay_triangulation_vertex_base_2<Traits::Instantaneous_kernel>,
-    CGAL::Kinetic::Delaunay_triangulation_face_base_2<Traits> > TDS;
-  typedef CGAL::Delaunay_triangulation_2<Traits::Instantaneous_kernel, TDS > Del;
-  typedef CGAL::Kinetic::Enclosing_box_2<Traits> EB;
-  typedef CGAL::Kinetic::Delaunay_triangulation_recent_edges_visitor_2<TDS> Visitor;
-  typedef CGAL::Kinetic::Delaunay_triangulation_2<Traits, Visitor, Del> KDel;
-  typedef CGAL::Kinetic::Qt_widget_2<Traits::Simulator> Qt_gui;
-  typedef CGAL::Kinetic::Qt_moving_points_2<Traits, Qt_gui> Qt_mps;
-  typedef CGAL::Kinetic::Qt_Delaunay_stable_subset_2<KDel, Qt_gui, Qt_mps> Qt_triangulation;
-
-  Traits tr(0,100000.0);
-
-  KDel::Handle kdel= new KDel(tr);
-  EB::Handle eb= new EB(tr,-10,10,-10,10);
-  Qt_gui::Handle qtsim= new Qt_gui(argc, argv, tr.simulator_handle(), -10,10,-10,10);
-  Qt_mps::Handle qtmps= new Qt_mps(qtsim, tr);
-
-  Qt_triangulation::Handle qtdel= new Qt_triangulation(qtsim, qtmps, kdel, threshold);
-
-  if (file.empty()) {
-    CGAL::Random rand;
-    for (int i=0; i< n; ++i) {
-      std::vector<double> coefsx, coefsy;
-      for (int j=0; j< d; ++j) {
-	coefsx.push_back((rand.get_double()*10-5)/(j+1));
-	coefsy.push_back((rand.get_double()*10-5)/(j+1));
-      }
-      Traits::Kinetic_kernel::Point_2 mp(Traits::Kinetic_kernel::Motion_function(coefsx.begin(), coefsx.end()),
-					 Traits::Kinetic_kernel::Motion_function(coefsy.begin(), coefsy.end()));
-      tr.active_points_2_table_handle()->insert(mp);
-    }
-  }
-  else {
-    std::ifstream in(file.c_str());
-    if (!in) {
-      std::cerr << "Error opening input file: " << file << std::endl;
-      return EXIT_FAILURE;
-    }
-    char buf[1000];
-    int nread=0;
-    while (true ) {
-      in.getline(buf, 1000);
-      if (!in) break;
-      std::istringstream il(buf);
-      Traits::Kinetic_kernel::Point_2 p;
-      il >> p;
-      tr.active_points_2_table_handle()->insert(p);
-      ++nread;
-    }
-    std::cout << nread << " points read.\n";
-  }
-
-  kdel->set_has_certificates(true);
-  return qtsim->begin_event_loop();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_generate_data.cpp b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_generate_data.cpp
deleted file mode 100644
index a612baf..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_generate_data.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-#include <CGAL/Kinetic/basic.h>
-
-#include <CGAL/Random.h>
-#include <algorithm>
-#include <CGAL/Polynomial/Polynomial.h>
-#if CGAL_USE_BOOST_PROGRAM_OPTIONS
-#include <boost/program_options.hpp>
-#endif
-
-
-template <class NT>
-void generate(int n, int d, int num_coords)
-{
-  CGAL::Random rand;
-  for (int i=0; i< n; ++i) {
-    std::vector<std::vector<double> > coefs(num_coords);
-    for (int j=0; j<= d; ++j) {
-      for (int k=0; k < num_coords; ++k) {
-	coefs[k].push_back((rand.get_double()*10-5)/(j+1));
-      }
-    }
-    for (int j=0; j< num_coords; ++j) {
-      CGAL::POLYNOMIAL::Polynomial<NT> p(coefs[j].begin(), coefs[j].end());
-      std::cout << p;
-      if (j != num_coords-1) {
-	std::cout << ", ";
-      }
-      else {
-	std::cout << std::endl;
-      }
-    }
-
-  }
-}
-
-
-int main(int argc, char *argv[])
-{
-  int n=10;
-  int d=2;
-  bool threed=false;
-  bool inexact=true;
-  bool weighted=false;
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-  bool print_help=false;
-
-  boost::program_options::options_description desc("Allowed options");
-  desc.add_options()
-    ("help", boost::program_options::bool_switch(&print_help), "produce help message")
-    ("num-points,n", boost::program_options::value<int>(&n), "Number of points to use.")
-    ("float,f", boost::program_options::bool_switch(&inexact), "Output the coordinates as floats rather than rationals.")
-    ("three-dimensions,3", boost::program_options::bool_switch(&threed), "Write three dimensional points.")
-    ("weighted,w", boost::program_options::bool_switch(&weighted), "Write weighted points.")
-    ("degree,d", boost::program_options::value<int>(&d), "The degree of the motions to use.");
-
-  boost::program_options::variables_map vm;
-  boost::program_options::store(boost::program_options::command_line_parser(argc, argv).
-				options(desc).run(), vm);
-  boost::program_options::notify(vm);
-
-
-  if (print_help) {
-    std::cout << "This program generates a set of moving points and outputs it to a file.\n";
-    std::cout << desc << "\n";
-    return EXIT_FAILURE;
-  }
-
-#else
-
-  bool boost_program_options_disabled;
-#endif
-
-  int num_coords=2;
-  if (weighted) ++num_coords;
-  if (threed) ++num_coords;
-  if (inexact) {
-    generate<double>(n,d,num_coords);
-  }
-  else {
-    generate<CGAL::Kinetic::Default_field_nt>(n,d,num_coords);
-  }
-
-  return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_gui_2.cpp b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_gui_2.cpp
deleted file mode 100644
index 2dd0c9d..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/KDS_gui_2.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <CGAL/Kinetic/Exact_simulation_traits.h>
-#include <CGAL/Kinetic/Enclosing_box_2.h>
-
-#include <CGAL/Kinetic/IO/Qt_widget_2.h>
-#include <CGAL/Kinetic/IO/Qt_moving_points_2.h>
-
-#include <CGAL/Kinetic/Insert_event.h>
-
-/*!
-  \file coin_check.cc A simple example using the qt GUI.
-*/
-
-int main(int argc, char*argv[])
-{
-
-  CGAL_SET_LOG_LEVEL(CGAL::Log::LOTS);
-
-  typedef CGAL::Kinetic::Exact_simulation_traits Traits;
-
-  typedef CGAL::Kinetic::Qt_widget_2<Traits::Simulator> Gui;
-  typedef CGAL::Kinetic::Qt_moving_points_2<Traits, Gui> Qt_moving_points;
-  typedef CGAL::Kinetic::Insert_event<Traits::Active_points_2_table> Insert_event;
-  typedef Traits::Kinetic_kernel::Point_2 Moving_point;
-  typedef CGAL::Kinetic::Enclosing_box_2<Traits> Box;
-  Traits tr(0,100000.0);
-
-  Gui::Handle qtsim=new Gui(argc, argv, tr.simulator_handle());
-  Qt_moving_points::Handle qtmptp= new Qt_moving_points(qtsim, tr);
-  Box::Handle box= new Box(tr);
-
-  Traits::Kinetic_kernel::Function_kernel::Construct_function cf= tr.kinetic_kernel_object().function_kernel_object().construct_function_object();
-
-  tr.simulator_handle()->new_event(Traits::Simulator::Time(0), Insert_event( Moving_point(cf(0,2,4),
-											  cf(2,-3,4)), tr.active_points_2_table_handle()));
-  tr.simulator_handle()->new_event(Traits::Simulator::Time(.1),
-				   Insert_event( Moving_point(cf(3,2,4),
-							      cf(1,-3,4)),
-						 tr.active_points_2_table_handle()));
-
-  return qtsim->begin_event_loop();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after002 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after002
deleted file mode 100644
index 752f076..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after002
+++ /dev/null
@@ -1,20 +0,0 @@
-0 0
-261.556 368.49
-355.421 321.043
-258.829 257.795
-296.059 374.507
-335.804 340.896
-276.11 389.494
-317.786 278.038
-298.064 258.447
-245.414 349.746
-336.665 298.648
-600 600
-225.064 293.26
-316.217 358.874
-276.658 239.092
-0 600
-225.965 333.489
-208.967 313.376
-242.246 275.883
-600 0
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after010 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after010
deleted file mode 100644
index 4f1632b..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after010
+++ /dev/null
@@ -1,95 +0,0 @@
-271.329 242.211
-274.368 367.54
-323.664 382.291
-376.225 321.603
-373.688 310.637
-346.995 362.614
-242.885 252.793
-202.658 283.662
-291.122 404.544
-275.013 228.762
-207.444 277.668
-210.916 350.911
-243.068 339.01
-217.841 267.229
-257.942 338.105
-199.176 337.761
-331.236 376.831
-120 120
-204.27 343.763
-120 470
-242.755 244.224
-266.036 242.764
-369.97 303.659
-339.659 267.476
-193.802 330.375
-247.927 275.222
-263.729 354.597
-317.376 383.419
-238.885 260.053
-281.178 406.574
-283.41 380.671
-263.138 345.306
-359.18 289.396
-290.757 224.066
-212.509 272.372
-216.773 354.799
-313.943 241.458
-188.009 313.235
-275.447 404.701
-281.978 223.697
-600 600
-349.111 277.84
-315.813 386.726
-255.939 236.205
-232.172 356.37
-224.607 357.748
-296.923 227.337
-248.701 332.818
-190.109 303.977
-283.814 374.155
-236.411 351.029
-250.452 258.776
-237.473 341.503
-298.233 399.564
-260.659 351.611
-302.047 397.833
-193.104 297.354
-249.247 236.742
-266.985 394.873
-272.536 386.37
-244.118 268.872
-352.191 357.529
-231.501 259.203
-374.755 327.205
-319.307 246.632
-373.05 332.38
-190.337 323.557
-470 120
-324.425 251.623
-344.387 272.631
-336.928 371.804
-368.884 339.118
-275.843 239.218
-334.655 262.02
-329.452 256.704
-341.998 367.329
-268.481 362.11
-364.23 295.76
-301.807 230.703
-271.46 400.682
-354.148 283.361
-252.442 268.897
-225.111 261.624
-375.084 315.911
-255.87 358.545
-256.539 262.97
-261.092 238.647
-266.761 388.433
-198.151 289.687
-276.599 383.412
-278.508 370.89
-362.666 346.489
-357.334 352.165
-309.469 393.137
-308.174 236.351
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after088 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after088
deleted file mode 100644
index 20b50f0..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after088
+++ /dev/null
@@ -1,1156 +0,0 @@
-397.227 275.684
-140.243 53.9783
-148.535 417.69
-167.433 374.057
-25.8996 414.488
-303.875 568.924
-266.35 91.8457
-20.9656 416.831
-79.2912 519.914
-319.958 481.014
-264.653 441.578
-264.678 455.194
-91.6605 305.139
-434.875 105.23
-322.376 505.555
-236.574 356.692
-216.93 453.477
-197.917 554.578
-405.775 68.9981
-260.869 491.836
-428.321 150.08
-195.88 121.349
-95.7817 259.664
-211.98 191.74
-325.452 411.504
-57.01 179.062
-112.546 448.43
-257.297 137.671
-377.477 327.769
-263.879 114.378
-483.337 377.688
-470.038 286.026
-318.131 519.071
-319.546 464.506
-279.443 95.296
-389.773 532.089
-236.788 404.452
-390.163 208.992
-183.07 163.38
-379.337 498.52
-51.0438 472.091
-134.5 181.187
-129.073 191.995
-352.713 378.326
-378.219 201.605
-415.289 240.173
-431.891 385.738
-202.985 133.312
-272.721 133.548
-32.3696 284.07
-299.557 461.329
-50.1102 480.993
-495.868 366.546
-360.475 410.489
-326.213 502.686
-325.596 471.767
-75.7638 146.383
-382.712 221.597
-112.984 300.419
-296.41 93.2095
-114.458 180.904
-471.189 367.937
-444.625 454.706
-429.238 103.502
-268.683 409.254
-475.044 366.301
-448.325 157.471
-289.093 374.367
-155.587 382.05
-66.2477 452.624
-114.32 343.517
-69.0401 118.105
-447.044 499.308
-420.38 510.273
-4.56826 331.825
-380.883 324.64
-123.488 334.355
-220.376 507.459
-109.573 184.311
-16.5302 421.62
-57.8022 468.166
-177.992 163.904
-115.462 136.929
-13.1776 396.119
-497.508 339.517
-485.005 370.922
-108.506 379.543
-461.198 336.918
-115.394 485.121
-354.446 555.15
-191.265 405.365
-111.846 295.745
-219.467 227.107
-188.776 509.466
-424.709 239.025
-304.504 513.999
-254.11 46.3337
-99.0935 71.5509
-324.118 30.0243
-442.173 450.208
-236.805 341.822
-99.7592 398.471
-187.156 500.277
-84.7756 488.549
-141.398 508.756
-262.132 213.645
-339.367 380.536
-21.0962 431.463
-395.643 219.559
-120.068 527.284
-449.317 183.476
-252.276 520.665
-217.645 112.458
-244.825 202.251
-155.98 439.601
-454.311 183.656
-81.7632 297.742
-308.203 460.578
-480.908 446.443
-236.521 101.131
-267.781 216.231
-109.592 488.502
-451.077 491.009
-112.681 326.146
-292.039 499.19
-226.004 112.693
-473.124 200.082
-374.975 159.914
-230.726 148.101
-103.374 197.88
-419.142 84.3077
-148.453 425.939
-11.9737 366.913
-105.985 538.644
-252.936 267.463
-76.1406 389.951
-324.78 476.308
-38.1459 287.863
-82.7722 242.57
-301.685 160.317
-116.956 191.364
-20.2455 290.788
-403.122 470.507
-122.112 222.227
-100.113 187.496
-438.666 128.802
-43.4762 298.741
-200.485 71.5026
-232.53 236.14
-434.434 180.365
-600 0
-357.483 388.382
-466.202 212.011
-208.912 182.158
-13.0252 359.064
-189.796 91.9264
-453.076 126.652
-265.932 16.9685
-362.113 45.8508
-253.633 146.579
-85.1947 460.097
-166.489 428.981
-199.44 87.9875
-453.761 157.486
-219.782 143.796
-320.146 25.8847
-251.324 329.462
-422.265 186.269
-492.562 305.44
-236.944 150.791
-368.751 165.436
-392.047 464.631
-168.585 46.2432
-86.4895 299.26
-236.255 362.882
-343.764 483.865
-35.5848 437.465
-122.954 342.898
-311.151 470.7
-25.6016 436.274
-211.705 112.434
-83.0112 525.046
-488.961 264.804
-80.7208 108.658
-470.625 192.55
-399.872 512.76
-45.8905 140.424
-36.4879 163.684
-250.874 545.003
-270.841 39.6849
-292.16 532.133
-169.004 379.53
-92.5659 491.551
-286.869 486.118
-69.8661 402.851
-315.737 485.159
-206.855 532.611
-436.407 247.321
-471.445 449.324
-213.773 84.836
-244.312 270.28
-264.45 418.196
-207.872 188.8
-219.692 242.03
-93.4186 187.627
-246.46 318.811
-306.38 522.251
-104.044 235.204
-268.927 223.91
-401.268 229.439
-49.3779 460.667
-234.807 478.203
-84.4641 283.237
-96.605 294.556
-251.469 212.419
-467.023 166.687
-304.664 508.864
-301.866 484.5
-410.378 505.483
-422.661 474.34
-395.561 235.416
-392.836 313.117
-395.411 60.7788
-37.7401 410.823
-420.8 519.331
-306.991 480.659
-418.19 260.671
-164.498 435.567
-101.112 366.247
-394.468 178.577
-403.639 261.058
-387.426 87.4337
-391.654 236.742
-95.2938 205.001
-299.042 166.058
-463.981 392.985
-216.925 501.338
-101.823 266.471
-74.918 505.567
-80.4484 462.497
-264.441 531.538
-271.708 91.0748
-76.0757 100.24
-236.444 351.45
-210.331 91.2899
-251.926 323.327
-416.938 288.77
-231.466 239.807
-97.7431 536.788
-216.737 78.2584
-326.795 415.413
-0 0
-276.378 495.34
-266.529 133.263
-249.065 438.207
-212.432 185.714
-382.999 564.34
-471.288 212.902
-217.096 375.187
-225.226 452.92
-325.411 392.548
-112.765 276.662
-121.013 188.464
-251.649 334.641
-311.351 475.966
-85.8511 187.007
-337.944 546.918
-110.568 191.714
-412.998 84.5388
-260.581 112.473
-281.88 129.001
-174.147 387.034
-181.962 390.508
-468.224 236.832
-356.687 438.608
-392.747 229.862
-372.791 210.296
-240.841 472.488
-97.1126 323.01
-69.6401 178.148
-491.755 426.859
-446.831 474.463
-391.627 184.898
-154.378 566.172
-107.96 136.449
-42.8058 274.958
-428.6 181.495
-434.577 126.48
-312.238 506.038
-392.352 84.8539
-325.387 400.857
-492.6 320.515
-251.484 214.213
-189.351 180.242
-335.585 386.653
-366.41 157.71
-432.781 221.491
-246.945 100.112
-261.602 342.207
-302.106 498.511
-48.0968 402.482
-106.445 262.816
-244.549 414.119
-389.827 93.2966
-134.369 498.681
-95.4617 278.157
-89.2032 456.919
-138.964 552.224
-12.8599 293.255
-65.2539 175.781
-266.659 36.3086
-392.318 538.801
-151.533 391.198
-422.477 515.083
-438.915 157.489
-186.435 395.209
-244.479 71.5751
-92.3944 533.609
-225.43 240.972
-108.673 317.249
-317.21 505.423
-357.486 397.24
-372.746 183.63
-417.792 229.924
-23.4678 383.057
-62.4697 488.889
-337.566 425.504
-453.917 471.501
-192.374 551.794
-128.416 501.96
-396.691 547.617
-325.55 405.998
-264.453 434.189
-265.007 459.132
-446.34 146.743
-111.283 337.215
-487.957 295.665
-195.069 95.778
-251.357 539.755
-497.849 387.219
-220.561 514.603
-427.019 219.108
-404.422 289.089
-385.194 193.063
-245.738 254.818
-378.178 102.677
-200.401 96.7473
-418.222 473.327
-281.7 526.548
-450.903 245.971
-243.398 146.501
-449.16 388.547
-263.458 125.879
-400.434 315.579
-404.603 280.861
-324.247 573.592
-244.522 425.866
-409.877 515.35
-108.284 396.526
-26.8341 346.822
-328.943 388.516
-17.3314 380.371
-184.108 467.657
-260.324 531.325
-374.684 191.561
-429.607 121.554
-492.492 312.814
-215.628 469.243
-200.145 496.359
-402.325 84.6226
-210.576 133.456
-479.474 281.621
-279.667 500.426
-288.476 30.5536
-251.467 222.315
-196.307 468.508
-353.765 156.076
-317.059 164.842
-437.081 477.52
-414.971 291.975
-308.402 18.604
-344.894 372.298
-196.479 525.294
-67.9989 146.445
-84.4223 449.406
-236.249 396.467
-490.942 366.684
-179.404 388.161
-377.871 217.084
-7.91948 342.598
-243.565 339.479
-429.99 253.879
-402.392 505.518
-81.7493 146.406
-189.902 459.783
-106.934 219.239
-163.426 48.0106
-394.02 530.358
-472.68 235.211
-128.748 73.0968
-293.528 23.9361
-372.869 213.72
-261.754 497.605
-116.537 479.528
-184.743 560.947
-263.483 146.047
-119.14 519.712
-262.384 95.276
-397.759 81.2586
-421.539 280.341
-399.208 203.229
-482.406 333.717
-288.967 380.807
-361.319 153.355
-270.894 116.826
-332.765 496.627
-357.444 403.103
-275.569 487.402
-383.566 509.398
-470.089 336.542
-447.662 484.736
-423.669 225.726
-283.331 492.278
-481.528 230.249
-72.3549 489.708
-116.763 142.933
-232.372 217.939
-280.633 535.494
-68.1819 464.232
-281.784 373.214
-257.569 488.104
-151.129 524.548
-266.283 526.627
-44.3286 407.077
-472.534 341.096
-246.716 330.466
-202.639 523.217
-200.08 452.312
-136.064 71.4768
-391.348 56.0665
-502.213 341.944
-148.58 405.095
-138.591 75.8035
-463.143 191.297
-257.523 264.119
-435.811 380.44
-441.921 195.647
-141.264 557.668
-405.119 219.403
-407.882 84.4521
-261.491 554.446
-87.6328 115.105
-369.906 46.9791
-403.468 515.554
-216.402 440.684
-380.718 233.658
-109.942 442.894
-442.917 477.576
-62.5346 146.508
-450.763 237.667
-276.285 50.2081
-27.945 447.625
-173.164 567.01
-205.821 92.1609
-52.4739 140.351
-382.1 458.562
-402.514 477.578
-502.496 355.134
-267.97 359.049
-272.899 467.064
-287.619 495.03
-377.304 502.991
-378.421 96.1882
-354.331 151.38
-85.6601 139.27
-227.146 149.766
-437.173 512.893
-433.653 195.056
-418.295 221.466
-394.42 543.44
-115.911 271.864
-229.082 91.1203
-276.344 44.2762
-360.267 558.669
-94.8096 243.445
-287.096 87.7004
-331.513 500.561
-100.849 280.827
-101.304 219.576
-335.632 36.6073
-76.7736 449.563
-402.641 178.198
-260.406 86.8968
-268.684 396.742
-298.132 17.9689
-292.959 455.698
-253.482 116.852
-487.341 435.275
-435.609 260.958
-109.608 304.613
-102.798 136.516
-389.984 317.065
-279.413 371.993
-230.414 137.395
-122.03 178.667
-483.749 291.311
-116.558 307.385
-485.055 441.59
-411.269 226.309
-377.768 173.615
-357.404 426.103
-502.592 404.623
-199.598 483.554
-341.876 488.544
-274.65 535.253
-21.6397 354.574
-281.171 381.609
-415.501 518.016
-448.97 191.38
-337.129 382.897
-401.414 293.056
-291.853 91.2194
-389.066 454.32
-429.122 262.493
-324.916 497.356
-112.789 283.314
-22.5579 405.585
-314.443 22.3219
-431.733 381.26
-492.22 300.345
-337.799 373.2
-74.508 287.457
-254.293 125.33
-464.774 449.517
-256.673 337.794
-100.137 377.327
-376.933 167.426
-293.939 459.955
-401.551 254.492
-89.5084 394.493
-426.518 157.301
-251.386 111.906
-439.349 377.48
-222.682 246.773
-431.152 484.275
-255.438 551.045
-87.3043 311.955
-122.337 224.727
-446.759 377.546
-264.371 579.866
-409.369 99.1422
-408.011 274.696
-281.096 485.334
-146.32 52.9005
-435.983 249.288
-58.168 143.371
-406.281 481.229
-105.331 449.468
-454.679 143.999
-483.479 336.782
-149.041 430.81
-251.177 533.969
-311.58 498.479
-250.006 225.293
-327.798 566.701
-89.9707 401.754
-70.5587 283.865
-417.039 250.808
-40.5364 145.373
-96.1666 210.436
-276.394 234.678
-296.192 499.247
-95.5842 249.837
-111.509 477.813
-257.423 504.791
-271.649 583.586
-424.245 270.025
-295.886 99.9075
-96.0501 383.307
-311.362 512.789
-105.322 335.576
-12.5641 400.626
-92.3873 291.91
-426.72 518.634
-269.684 532.524
-314.629 159.535
-269.143 446.031
-241.187 444.967
-146.345 535.7
-432.264 517.517
-176.476 166.754
-3.25595 312.619
-219.109 522.818
-385.182 197.132
-59.982 454.729
-468.797 380.777
-454.297 377.418
-372.292 99.1507
-93.9254 219.283
-18.6632 343.747
-7.48826 302.678
-50.7019 407.683
-370.915 104.788
-396.326 309.56
-80.6895 497.898
-288.892 123.249
-113.327 477.529
-85.0317 290.777
-195.144 91.1018
-396.126 197.334
-424.472 276.074
-148.506 411.109
-401.887 173.191
-195.822 504.546
-479.871 367.097
-304.465 519.069
-232.504 224.693
-330.14 419.044
-443.767 385.662
-215.52 91.4198
-303.628 159.681
-273.356 386.23
-335.36 420.109
-54.8549 487.973
-434.692 150.82
-170.484 426.25
-486.309 271.901
-502.577 362.615
-112.413 320.588
-396.63 301.722
-473.341 281.368
-269.717 49.5864
-69.3071 395.291
-84.7215 82.4975
-251.044 201.782
-339.952 39.6197
-441.022 117.306
-86.2952 97.1617
-406.869 229.433
-176.773 172.567
-442.518 249.334
-104.844 368.751
-216.086 231.04
-304.072 458.168
-330.96 489.862
-36.8895 405.53
-244.305 259.211
-317.034 573.57
-462.662 183.536
-259.109 30.7424
-467.05 204.757
-491.614 324.582
-492.137 374.39
-354.993 39.3227
-309.116 485.653
-164.264 565.524
-106.12 187.491
-499.9 407.197
-403.89 188.507
-285.883 532.65
-478.353 287.667
-396.261 505.607
-41.4437 460.216
-151.619 518.434
-245.493 46.9202
-186.938 410.064
-377.652 227.857
-248.494 275.422
-301.212 569.395
-460.841 388.842
-277.991 17.4988
-242.737 405.974
-87.5929 494.683
-207.439 115.611
-232.885 132.943
-298.233 178.865
-89.2605 232.126
-102.323 291.505
-162.012 373.491
-244.523 434.006
-3.57052 318.611
-17.5053 404.962
-465.959 343.707
-151.78 387.907
-453.031 391.94
-395.631 509.834
-245.01 228.284
-478.331 338.172
-244.533 59.655
-334.007 543.419
-85.3176 233.383
-415.296 96.5929
-240.964 263.57
-215.646 476.131
-250.559 258.521
-37.4154 456.982
-492.666 413.065
-427.701 129.86
-108.471 384.628
-263.596 242.374
-75.9268 464.719
-211.207 495.498
-287.693 526.372
-278.195 581.691
-444.092 504.789
-152.844 438.811
-424.088 383.677
-474.02 377.288
-280.759 87.1814
-261.542 227.068
-310.441 158.376
-264.876 131.26
-415.221 102.028
-272.815 451.383
-244.319 325.411
-274.287 80.3409
-348.27 433.466
-199.731 129.674
-251.102 128.691
-491.581 333.48
-96.0708 199.374
-176.911 420.777
-459.796 160.287
-106.054 281.766
-269.185 365.604
-63.6063 466.479
-293.873 171.852
-173.898 45.5842
-426.455 257.127
-350.03 552.718
-95.2612 388.53
-463.416 372.896
-154.986 54.1869
-492.633 420.423
-317.271 161.414
-394.262 213.926
-107.131 291.944
-187.123 121.945
-241.229 465.022
-358.153 406.281
-55.7468 406.121
-139.648 502.437
-219.469 223.03
-390.596 559.879
-224.547 214.406
-292.838 180.049
-230.954 366.908
-273.009 230.973
-233.11 400.64
-65.9647 123.87
-457.543 191.535
-93.4454 319.395
-272.342 472.187
-496.487 392.387
-265.269 474.432
-276.059 239.209
-393.163 504.335
-295.498 449.99
-192.533 128.944
-424.015 531.395
-477.427 332.22
-244.386 212.373
-412.923 221.549
-335.848 484.166
-95.4255 255.017
-211.133 443.942
-108.519 389.745
-203.985 448.74
-305.333 467.421
-221.16 204.309
-105.445 68.2879
-265.355 46.5633
-91.7729 136.223
-257.105 516.928
-36.9077 155.194
-395.929 170.437
-256.415 511.69
-31.9055 443.504
-114.334 146.394
-236.73 390.357
-395.947 262.621
-272.304 15.9565
-228.548 440.238
-336.462 492.223
-322.176 396.366
-479.504 257.725
-190.417 481.491
-264.391 392.331
-234.784 385.078
-187.787 96.2375
-402.139 271.145
-388.459 498.894
-264.494 424.504
-248.6 146.463
-41.8396 402.703
-32.6483 455.35
-410.083 295.597
-123.104 513.866
-455.403 235.404
-401.474 63.5787
-77.7344 402.452
-251.545 207.305
-478.016 232.324
-103.81 446.13
-357.585 433.104
-64.59 129.947
-261.318 567.483
-202.528 468.216
-307.227 173.931
-76.7259 513.749
-456.313 131.727
-422.348 153.192
-115.316 212.944
-456.992 453.871
-223.403 91.5036
-427.136 485.624
-387.198 239.908
-285.472 501.993
-268.269 82.5149
-244.292 53.648
-440.915 509.809
-409.013 252.484
-342.201 550.984
-227.596 380.792
-183.338 487.151
-194.874 456.505
-213.173 455.345
-47.1137 278.136
-205.747 481.35
-394.09 205.081
-264.456 352.446
-291.139 577.759
-235.843 449.177
-444.899 240.742
-103.536 481.651
-223.606 378.216
-15.3343 374.985
-458.586 343.067
-81.4123 142.376
-6.02772 308.068
-376.959 207.072
-183.705 461.877
-386.835 463.974
-271.516 526.521
-229.917 213.545
-156.78 377.927
-196.68 171.681
-278.437 381.779
-47.1162 180.617
-261.593 239.963
-108.519 230.444
-385.048 96.5401
-82.6739 394.216
-247.39 200.497
-144.467 541.308
-307.083 571.961
-276.538 526.511
-481.455 224.447
-225.285 372.374
-82.5811 404.721
-404.44 307.562
-261.281 573.501
-299.825 454.643
-434.438 121.311
-208.886 70.7826
-415.657 505.822
-139.564 83.3764
-439.911 113.539
-352.859 437.59
-269.049 463.119
-219.836 217.055
-437.694 242.913
-444.287 183.492
-378.917 51.1401
-142.998 546.63
-297.301 575.356
-496.993 382.017
-283.989 577.344
-464.126 208.203
-238.38 110.745
-97.0953 134.331
-422.662 121.721
-289.315 448.314
-398.557 535.631
-410.772 473.944
-396.953 89.0338
-97.8639 484.908
-440.746 149.188
-450.475 449.395
-100.747 146.48
-233.084 116.077
-389.828 509.415
-107.413 146.491
-399.914 188.026
-177.224 482.629
-95.4305 229.239
-102.191 448.467
-133.928 58.4544
-30.6288 405.499
-151.401 400.201
-97.3154 490.031
-277.776 116.602
-62.0005 399.05
-222.232 436.283
-245.805 87.3787
-261.5 232.131
-422.293 481.586
-244.511 420.348
-110.166 212.701
-68.05 138.442
-385.436 272.911
-38.0267 173.528
-358.924 159.161
-377.959 230.931
-466.166 257.17
-391.607 331.613
-36.6156 273.943
-189.813 119.506
-390.437 166.955
-264.735 413.395
-147.644 512.308
-227.488 208.768
-111.457 263.054
-397.842 471.999
-275.25 367.22
-388.206 335.944
-215.07 236.322
-190.501 48.376
-368.325 176.003
-383.405 91.7885
-91.7589 367.464
-244.688 441.243
-418.761 536.774
-148.87 529.226
-37.7044 295.062
-261.436 477.882
-261.225 483.437
-386.399 277.948
-93.71 398.607
-221.699 469.033
-87.3669 530.088
-91.5449 76.0096
-311.154 168.759
-179.507 565.688
-96.5106 450.539
-393.765 278.595
-363.175 160.018
-600 600
-117.277 229.153
-200.977 117.256
-89.797 280.802
-301.667 504.565
-375.259 564.222
-75.5638 143.359
-430.034 225.425
-293.312 527.753
-460.534 232.116
-133.283 65.9536
-320.135 498.653
-283.351 119.831
-236.211 92.8613
-311.79 573.544
-237.385 460.794
-201.177 182.142
-181.105 45.8898
-307.141 498.524
-55.9827 281.232
-28.949 293.687
-32.3214 411.276
-119.927 71.3979
-314.015 522.674
-0 600
-89.2638 485.971
-424.905 263.53
-105.923 398.41
-473.854 257.509
-85.7517 92.147
-129.368 178.591
-202.294 178.498
-420.799 236.252
-131.631 187.011
-383.705 336.656
-185.426 550.487
-57.5945 402.279
-89.5331 315.6
-205.406 553.975
-103.919 329.85
-181.436 177.495
-421.811 97.7471
-342.403 477.449
-475.98 214.795
-17.0242 427.158
-272.299 400.505
-210.333 528.24
-282.513 26.7842
-244.384 65.9101
-476.667 447.616
-261.403 221.831
-233.434 457.219
-411.62 539.883
-409.266 276.229
-70.6971 449.413
-232.469 230.32
-117.306 218.724
-414.376 481.51
-251.039 106.477
-216.773 133.212
-115.74 535.822
-53.1175 300.498
-404.561 193.505
-55.0288 456.833
-244.524 206.254
-302.748 178.059
-79.3502 488.299
-260.606 23.0347
-185.123 481.368
-392.629 459.463
-262.4 141.22
-410.078 241.481
-181.933 505.146
-457.144 248.156
-108.354 372.721
-273.403 50.5912
-377.982 335.554
-16.4185 390.346
-194.157 67.1618
-328.936 544.541
-424.597 525.042
-264.562 355.551
-398.49 319.694
-404.52 75.6462
-252.492 95.7298
-225.155 202.469
-190.737 491.286
-63.8442 282.486
-53.3288 402.627
-461.228 252.214
-402.676 539.324
-98.5971 236.844
-145.023 562.432
-260.204 43.6144
-75.1058 178.925
-384.961 455.217
-287.391 95.5846
-458.22 398.091
-7.58975 336.208
-117.489 331.195
-13.3683 343.607
-87.116 146.468
-327.729 34.0665
-447.543 124.914
-105.146 305.48
-486.609 328.981
-197.585 57.1844
-191.941 169.08
-61.6222 405.681
-385.521 265.888
-430.079 477.929
-433.601 157.509
-328.41 552.617
-211.082 546.493
-457.968 374.099
-93.5163 447.137
-224.602 128.739
-271.821 226.788
-208.679 462.711
-79.7276 181.239
-446.321 459.414
-314.365 464.463
-195.422 481.891
-261.559 560.403
-127.566 508.302
-421.864 243.683
-272.311 405.472
-182.235 509.236
-103.874 488.368
-366.692 560.345
-421.461 89.4734
-189.287 468.555
-78.6173 118.156
-212.277 536.719
-328.709 558.34
-100.402 327.261
-439.536 480.507
-460.666 382.659
-265.196 388.439
-214.127 481.441
-437.963 385.366
-41.5457 291.203
-436.629 255.978
-388.763 322.623
-132.764 79.7907
-409.509 246.976
-309.888 498.518
-244.124 79.0179
-41.9573 178.214
-49.1655 292.701
-108.417 311.598
-439.506 180.836
-481.74 218.179
-469.175 176.466
-418.541 128.665
-431.607 188.373
-183.271 414.025
-208.669 87.7093
-379.7 188.068
-369.295 190.581
-187.702 399.876
-10.008 298.551
-196.746 180.441
-95.2853 146.485
-226.458 446.746
-260.207 526.644
-109.525 269.45
-112.784 72.0046
-264.318 345.398
-239.766 221.077
-382.754 166.067
-78.7987 291.557
-484.625 280.936
-191.557 496.399
-270.979 242.321
-3.25216 324.644
-254.956 87.6189
-226.402 473.206
-228.25 141.864
-23.4342 386.128
-360.534 418.852
-385.902 55.1779
-452.03 464.586
-183.356 392.451
-253.343 133.412
-28.3472 278.238
-457.89 137.878
-353.729 383.147
-409.018 302.51
-461.595 450.519
-220.167 200.022
-95.8403 372.163
-379.571 225.57
-393.604 326.387
-325.231 464.7
-201.531 530.588
-86.8396 246.819
-502.568 348.248
-387.213 262.677
-501.116 366.172
-378.047 162.165
-345.374 39.5072
-483.945 261.336
-244.346 407.641
-502.358 396.438
-187.423 164.734
-277.666 133.19
-343.125 429.962
-396.344 554.671
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after103 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after103
deleted file mode 100644
index 29f8bc3..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after103
+++ /dev/null
@@ -1,1313 +0,0 @@
-392.535 459.043
-306.192 522.234
-131.218 39.186
-382.073 458.527
-380.719 233.669
-239.456 461.337
-308.652 18.5047
-393.845 278.58
-149.843 585.491
-54.8396 456.922
-437.187 512.871
-443.834 385.688
-354.441 555.147
-101.14 280.966
-54.3163 488.324
-272.805 451.389
-179.019 12.4721
-424.246 269.922
-134.152 498.605
-67.3633 464.269
-263.269 9.19823
-379.591 225.547
-271.494 526.456
-97.5634 134.309
-272.26 472.244
-261.652 342.264
-13.8335 292.103
-317.192 161.337
-408.886 99.8138
-192.727 129.01
-495.897 366.559
-116.507 479.855
-484.906 441.776
-232.931 457.835
-415.276 291.713
-229.656 479.204
-119.254 51.3163
-198.698 567.902
-437.461 477.37
-191.891 563.717
-216.722 538.882
-358.722 159.104
-101.057 366.246
-377.762 173.644
-269.187 365.608
-129.319 178.59
-126.529 559.518
-45.8345 481.123
-253.668 146.581
-279.678 22.829
-386.932 464.049
-260.783 527.598
-257.397 95.4671
-187.92 569.636
-105.986 539.593
-223.897 535.454
-328.956 544.521
-326.452 502.459
-58.3204 112.148
-223.967 522.492
-168.584 581.57
-399.673 469.398
-95.7617 259.616
-108.005 136.423
-236.808 341.781
-112.555 57.8398
-140.642 83.6709
-95.1616 388.791
-343.238 430.086
-299.728 454.54
-123.562 568.867
-461.027 336.948
-302.073 498.521
-247.391 497.797
-43.2589 407.216
-411.181 226.293
-117.685 229.078
-263.641 242.377
-231.439 239.822
-79.2069 95.0644
-126.13 41.8741
-77.5995 402.443
-71.5819 489.89
-48.092 402.495
-106.402 187.404
-232.634 50.84
-244.176 324.565
-251.466 321.571
-108.521 389.755
-482.588 332.763
-261.137 112.314
-93.6558 398.612
-412.456 539.791
-245.607 532.316
-387.208 239.911
-245.276 46.9279
-205.222 481.423
-97.332 490.095
-95.6115 278.141
-368.332 175.978
-303.22 18.4568
-392.533 84.7243
-181.87 509.105
-210.068 533.065
-170.465 426.257
-108.47 384.628
-366.967 158.061
-333.892 543.401
-168.382 574.493
-123.03 513.959
-342.285 488.119
-179.319 388.113
-156.165 439.569
-299.272 165.779
-208.689 593.809
-257.517 516.327
-95.2142 205.123
-213.2 91.6259
-70.1585 449.524
-219.772 143.854
-399.665 203.423
-251.47 212.417
-23.3857 164.048
-151.539 518.181
-436.092 249.174
-264.42 580.873
-248.603 146.456
-96.205 199.286
-30.3968 188.044
-251.905 507.792
-339.44 380.47
-251.049 201.8
-307.298 173.853
-335.811 484.163
-191.562 583.215
-215.278 485.56
-461.96 450.236
-37.0375 411.281
-357.465 403.172
-302.728 178.07
-268.506 82.4607
-221.305 204.345
-317.148 164.768
-465.677 211.96
-293.852 460.014
-3.35681 311.657
-388.137 335.988
-437.921 385.347
-422.314 153.219
-112.66 326.106
-145.96 49.9743
-445.362 240.628
-261.654 497.969
-229.673 42.4209
-502.5 355.135
-236.963 150.795
-30.6635 451.002
-142.296 46.2133
-393.432 326.628
-353.737 155.984
-326.69 415.228
-217.644 112.524
-223.402 91.5073
-415.548 505.771
-287.835 495.139
-420.691 519.232
-314.334 464.467
-458.075 374.035
-345.372 39.475
-259.43 43.4347
-376.972 207.079
-222.797 515.108
-446.798 125.018
-312.101 506.289
-196.495 62.2713
-58.1625 143.488
-136.525 40.7102
-190.428 481.531
-483.874 261.263
-295.941 99.959
-207.506 90.4648
-404.4 289.191
-37.9562 287.609
-382.487 564.417
-74.347 143.058
-23.5085 171.363
-37.5019 294.951
-374.189 50.042
-202.391 468.284
-108.716 317.354
-395.606 170.314
-95.8523 372.196
-183.371 487.058
-168.979 379.487
-348.911 374.883
-328.021 566.102
-50.947 407.658
-463.393 372.923
-473.851 257.5
-372.829 210.223
-397.731 81.6276
-159.318 52.4096
-273.244 50.5776
-357.414 425.939
-399.82 512.651
-463.166 164.212
-241.663 73.7342
-448.657 191.435
-103.296 481.727
-402.127 271.158
-335.408 420.131
-117.19 191.32
-218.585 533.342
-105.357 335.616
-111.722 477.773
-288.889 123.256
-206.945 59.1526
-222.253 436.273
-61.6494 399.21
-261.402 221.759
-393.773 219.055
-304.514 513.996
-375.58 160.034
-195.059 95.7258
-244.793 517.359
-45.544 123.325
-270.744 39.6952
-220.705 542.95
-436.429 247.237
-252.157 95.8337
-100.506 327.381
-62.4978 488.569
-213.882 454.387
-222.623 246.795
-17.3978 380.482
-240.574 465.355
-288.969 380.803
-91.7824 136.422
-399.451 297.524
-114.679 146.282
-413.005 84.4382
-391.563 236.805
-270.126 49.8645
-198.206 588.436
-396.084 505.571
-397.204 275.695
-428.174 181.741
-236.384 567.636
-18.5405 343.711
-245.067 87.0279
-107.418 146.515
-453.625 471.842
-470.458 178.152
-84.5274 283.118
-264.841 458.853
-229.232 537.603
-133.273 552.369
-235.685 449.201
-226.038 482.79
-260.13 86.9924
-12.9559 396.752
-123.275 61.3349
-176.622 482.758
-207.111 115.882
-43.479 136.918
-299.34 461.16
-350.701 552.773
-463.987 392.842
-147.694 512.399
-167.86 568.321
-213.294 90.6419
-354.348 151.382
-186.773 395.659
-249.508 438.156
-407.03 229.41
-42.9543 298.501
-12.0766 367.926
-181.883 505.329
-103.798 54.8464
-266.784 35.7159
-106.877 262.618
-348.343 433.513
-251.28 106.981
-148.504 411.108
-33.7333 442.909
-244.545 212.275
-423.861 225.692
-268.683 409.253
-193.78 551.65
-264.564 531.206
-100.113 187.523
-488.992 264.903
-412.931 221.563
-261.615 240.092
-395.539 509.809
-117.405 218.848
-81.7495 146.404
-435.035 381.083
-176.495 166.681
-291.644 577.716
-207.927 188.84
-199.667 530.311
-406.889 74.2227
-138.342 76.3386
-304.304 458.407
-294.071 500.661
-188.003 96.6039
-377.924 230.819
-245.088 555.652
-79.8083 108.438
-492.747 412.955
-357.572 433.196
-449.318 183.513
-95.6017 539.779
-285.646 501.695
-52.204 179.534
-237.549 61.8195
-236.444 351.433
-385.228 193.166
-181.973 390.515
-155.935 54.6503
-200.818 59.5106
-177.02 420.682
-227.934 473.399
-337.67 373.463
-198.172 500.055
-195.244 91.2594
-7.4054 335.218
-0 0
-91.6574 305.152
-261.298 483.272
-234.782 385.097
-93.3827 187.571
-200.232 494.991
-31.6359 283.43
-76.2702 521.553
-255.927 26.7365
-123.505 334.357
-470.603 170.075
-385.41 55.1188
-424.571 525.02
-100.941 539.454
-141.319 508.649
-439.436 479.872
-244.798 441.073
-232.376 217.95
-209.79 488.316
-324.513 497.834
-102.715 136.55
-286.58 577.513
-392.36 538.864
-251.402 112.56
-289.095 374.379
-426.447 157.264
-262.439 95.2887
-459.466 160.167
-35.7779 438.677
-390.013 316.986
-148.925 430.504
-30.628 405.508
-449.092 388.502
-215.317 237.527
-287.929 526.406
-244.359 407.731
-195.257 481.706
-159.741 583.458
-455.307 235.529
-396.507 301.574
-329.997 418.988
-111.268 337.177
-197.573 572.72
-422.033 243.663
-481.256 216.806
-362.449 46.1988
-502.557 362.827
-244.601 271.122
-438.915 157.477
-244.373 65.9133
-357.491 397.24
-148.922 529.058
-398.574 535.612
-307.088 571.926
-89.8008 280.807
-258.338 32.3163
-272.554 91.2116
-238.969 80.3682
-87.0758 246.855
-244.355 53.4997
-196.992 525.54
-434.978 150.723
-226.409 446.684
-37.7039 184.3
-248.715 275.267
-410.227 515.419
-192.091 8.37331
-416.886 288.838
-276.538 526.524
-285.803 532.716
-335.57 386.677
-106.052 281.742
-457.549 191.519
-109.08 304.503
-229.282 91.2752
-282.79 27.3451
-227.523 208.774
-81.7362 297.771
-600 600
-208.711 86.6621
-87.4167 98.1407
-15.486 375.084
-385.197 455.099
-405.309 219.417
-120.886 188.457
-461.218 252.225
-308.929 485.641
-97.1897 323.083
-325.377 400.823
-417.809 229.897
-276.046 239.237
-231.699 570.237
-479.148 287.758
-122.335 222.448
-382.701 221.611
-491.401 333.498
-492.552 305.424
-139.661 502.41
-492.267 300.48
-223.488 378.221
-108.391 311.467
-135.697 68.8074
-339.226 39.4867
-486.711 329.051
-92.5251 291.958
-57.4853 178.789
-191.486 496.492
-484.938 370.901
-466.781 205.052
-480.524 446.738
-244.511 206.23
-290.621 30.1916
-162.272 573.758
-379.179 498.594
-337.408 425.314
-83.7678 74.9433
-109.836 488.496
-115.682 484.704
-20.7139 291.026
-251.488 214.213
-198.632 483.819
-85.2865 68.2307
-113.027 73.7006
-261.535 560.394
-336.62 492.125
-473.472 377.41
-427.686 150.156
-225.454 240.965
-89.3464 315.414
-436.837 110.482
-311.35 475.913
-311.35 512.808
-115.609 137.02
-240.294 548.256
-243.445 469.482
-184.821 585.972
-417.449 255.777
-139.321 550.08
-450.615 246.018
-389.776 531.974
-418.247 221.451
-376.934 167.404
-278.304 584.503
-92.975 491.216
-422.283 474.007
-27.1171 445.426
-197.096 180.468
-236.692 106.118
-421.49 280.416
-460.93 382.409
-409.998 295.703
-496.762 381.289
-35.7343 274.281
-277.662 116.592
-245.005 228.285
-377.682 227.824
-28.7931 147.107
-74.49 287.476
-434.946 126.323
-97.9849 236.613
-484.721 280.839
-409.513 246.965
-337.943 546.928
-458.29 398.127
-383.56 336.651
-245.742 254.822
-322.174 396.378
-262.078 33.7039
-111.585 263.331
-421.707 383.502
-291.594 91.1366
-187.721 400.128
-395.984 61.3673
-215.158 64.3158
-358.018 406.066
-244.859 202.143
-422.509 98.0577
-200.944 117.279
-483.705 377.662
-122.348 224.559
-391.169 55.9364
-483.678 291.39
-262.358 141.177
-279.518 95.3907
-497.942 386.915
-264.452 434.195
-37.05 405.5
-70.8806 283.992
-331.735 500.418
-121.292 46.4064
-0 600
-281.706 526.54
-496.443 392.346
-264.734 413.397
-246.743 330.197
-144.321 540.655
-119.296 518.904
-256.361 523.492
-183.454 392.55
-396.161 262.615
-24.6165 386.115
-251.453 222.43
-456.224 131.544
-394.058 530.397
-244.515 420.347
-230.424 33.2197
-84.8554 488.538
-231.419 53.0986
-401.296 292.855
-491.063 366.656
-232.664 545.885
-384.326 97.523
-415.376 240.123
-444.101 183.479
-388.236 498.786
-293.915 171.765
-133.086 80.138
-488.968 430.372
-387.598 87.3408
-254.982 87.6904
-227.204 149.768
-33.13 139.039
-272.301 400.508
-222.228 589.151
-102.318 291.521
-479.549 281.572
-329.042 388.452
-156.411 378.355
-357.448 388.142
-240.726 564.369
-237.704 540.175
-233.538 116.903
-261.543 227.063
-438.351 128.959
-44.3075 476.595
-374.565 191.584
-254.483 46.3693
-129.079 191.982
-67.9989 146.427
-380.052 96.1827
-6.74141 307.278
-250.547 258.508
-293.574 24.5768
-304.518 508.273
-409.009 276.624
-115.937 534.787
-438.882 377.558
-420.514 510.431
-100.117 377.192
-70.2458 402.714
-224.182 128.859
-409.121 302.408
-117.616 331.298
-472.641 341.13
-31.2372 411.324
-274.83 535.307
-112.921 300.251
-431.353 381.204
-271.873 226.851
-424.67 239.052
-268.68 396.744
-189.794 459.824
-3.52994 318.609
-146.373 535.774
-89.1433 456.833
-315.661 485.188
-76.6879 106.005
-244.209 259.427
-360.524 419.052
-23.6156 181.59
-410.065 241.506
-404.384 193.84
-41.9131 402.668
-37.6896 456.932
-108.994 230.195
-377.482 327.763
-95.4272 255.031
-266.593 8.91421
-70.0156 510.263
-99.7572 398.475
-112.404 63.9957
-452.799 126.36
-72.6605 514.781
-188.605 92.0498
-50.2837 485.315
-162.31 579.123
-294.464 449.125
-251.925 520.616
-226.246 112.511
-89.2376 232.097
-497.56 339.501
-226.091 580.305
-328.661 558.453
-468.681 166.905
-392.082 229.921
-386.425 277.968
-245.397 489.598
-16.7955 426.699
-101.783 266.451
-144.039 546.152
-22.5061 405.569
-172.285 16.8309
-403.039 515.474
-314.84 159.614
-404.841 471.794
-110.105 212.708
-266.572 133.263
-414.368 481.505
-76.4427 464.654
-96.6525 450.136
-236.992 526.457
-151.422 400.126
-389.857 509.436
-212.394 533.246
-319.552 464.503
-148.599 405.011
-317.034 573.551
-189.155 468.56
-442.284 249.423
-155.1 27.3171
-57.2919 402.464
-320.302 498.579
-244.499 425.867
-196.318 468.494
-402.391 505.523
-275.459 487.591
-82.281 404.733
-457.131 453.88
-123.363 563.539
-237.005 404.588
-273.685 80.1625
-295.022 499.194
-157.746 21.2753
-324.133 30.0394
-251.305 546.769
-108.327 372.652
-424.451 276.161
-265.234 388.419
-305.38 467.447
-187.362 122.599
-416.764 101.548
-389.851 93.1741
-32.5715 455.858
-103.67 488.369
-23.1789 382.89
-492.564 320.625
-294.84 18.6222
-474.775 366.376
-201.289 522.213
-431.287 385.783
-201.047 182.061
-108.961 55.3985
-361.861 153.583
-370.827 104.709
-204.731 531.618
-244.624 434.445
-253.597 116.733
-390.91 559.713
-187.107 500.283
-80.455 462.428
-491.883 324.19
-265.002 131.606
-477.21 332.382
-115.301 212.946
-415.706 96.078
-281.209 381.611
-276.394 234.675
-492.338 426.399
-184.062 467.614
-421.645 88.7146
-272.979 467.265
-353.041 437.735
-451.287 490.106
-228.601 516.604
-107.05 219.172
-375.758 564.412
-174.171 387.057
-236.253 362.899
-470.463 336.432
-56.2267 405.921
-123.246 574.971
-216.595 86.4598
-62.1655 146.445
-261.108 531.563
-151.673 387.992
-383.387 509.319
-21.1089 416.636
-457.997 137.928
-90.0894 401.724
-420.879 236.227
-208.853 182.128
-296.904 575.656
-471.312 212.746
-218.308 91.4785
-96.5015 211.765
-207.295 526.703
-213.8 62.4952
-281.446 577.476
-436.608 256.085
-368.875 165.509
-188.541 509.473
-427.129 219.161
-236.586 101.183
-309.888 498.517
-122.186 178.643
-26.9193 346.872
-200.32 71.4457
-247.459 512.528
-250.004 225.288
-77.0688 529.977
-82.7556 242.688
-328.412 552.583
-257.53 264.14
-396.779 89.2324
-401.376 477.34
-3.97528 331.007
-97.3423 485.124
-3.38183 324.796
-50.4052 293.468
-128.008 553.718
-200.889 96.6448
-293.158 455.906
-276.495 495.659
-448.326 157.485
-463.351 191.326
-287.086 486.101
-380.845 324.659
-264.904 587.504
-454.371 377.394
-85.5281 459.953
-454.325 183.57
-130.767 579.064
-230.362 137.355
-211.075 443.962
-464.307 207.707
-437.614 242.943
-301.729 568.829
-444.732 454.863
-186.769 8.65601
-24.1083 159.004
-395.295 213.599
-134.495 181.167
-155.455 382.617
-327.863 34.1987
-446.785 474.474
-379.137 50.7462
-249.083 500.35
-234.148 54.4544
-281.904 128.979
-269.257 446.151
-236.703 389.976
-401.234 77.5278
-214.331 481.326
-114.203 181.002
-280.677 535.47
-93.1001 453.754
-196.002 578.949
-280.842 87.1207
-106.997 291.882
-424.161 531.182
-427.303 485.598
-54.0005 136.088
-272.986 230.941
-212.407 185.648
-395.751 235.232
-112.402 320.465
-353.791 383.345
-261.433 477.642
-272.721 133.549
-203.481 489.446
-216.258 440.805
-75.0856 178.874
-84.3272 449.414
-218.997 15.5688
-492.501 312.815
-393.287 179.023
-225.135 202.361
-392.386 186.205
-360.446 410.248
-287.257 87.7566
-233.104 400.673
-66.236 175.711
-385.554 265.608
-53.3534 402.596
-243.469 339.613
-385.126 197.164
-119.72 57.5146
-187.122 575.094
-317.106 505.385
-251.403 329.458
-471.286 449.359
-95.8591 229.181
-492.509 420.506
-460.348 232.087
-109.643 184.237
-389.793 210.583
-410.394 505.49
-440.846 113.854
-276.239 44.156
-114.273 343.494
-379.701 102.354
-209.1 71.5343
-51.9515 139.881
-257.54 504.595
-404.661 307.148
-120.614 71.2526
-242.969 406.025
-159.673 45.0062
-73.1346 116.848
-356.758 438.506
-409.461 473.75
-216.485 453.422
-243.275 146.535
-255.75 532.537
-263.419 125.841
-183.826 554.832
-252.904 267.444
-212.011 191.75
-332.832 496.393
-263.499 146.04
-42.6102 274.75
-257.26 137.617
-148.47 425.988
-93.5539 447.167
-432.453 221.107
-27.2817 154.331
-264.661 441.596
-197.374 8.69988
-64.7564 112.863
-483.198 336.545
-31.1855 436.379
-240.555 67.4757
-279.722 500.525
-270.918 242.33
-275.234 367.21
-87.7221 494.674
-196.51 504.298
-246.593 319.176
-128.286 72.8404
-396.684 547.023
-186.946 410.068
-433.674 195.075
-115.916 271.902
-192.118 169.233
-369.289 190.548
-265.345 474.406
-429.587 121.478
-265.605 526.971
-265.601 46.6355
-293.086 527.558
-272.377 589.061
-276.426 49.9995
-183.74 461.834
-164.64 435.428
-372.747 183.659
-476.575 447.597
-454.099 157.485
-10.4352 298.321
-103.886 329.799
-501.176 366.124
-452.674 465.333
-84.0065 86.8592
-251.763 334.915
-418.331 260.664
-84.8511 110.341
-393.718 205.038
-183.201 163.393
-264.36 392.273
-216.568 133.304
-85.3273 233.368
-324.256 573.647
-108.279 396.46
-325.26 464.714
-387.316 262.663
-327.656 493.638
-479.299 257.65
-408.458 274.883
-116.581 307.4
-86.578 92.4493
-466.401 257.264
-468.714 380.918
-215.9 231.213
-215.583 476.423
-49.5972 469.047
-218.711 374.765
-396.253 554.856
-103.478 197.839
-244.505 484.882
-478.552 337.469
-62.9057 467.165
-470.616 286.506
-314.884 522.563
-95.9259 383.671
-302.075 484.493
-91.7522 367.472
-184.848 550.584
-13.2014 343.604
-466.283 343.625
-157.844 588.953
-441.23 116.921
-417.328 249.67
-350.394 39.4798
-324.999 475.986
-303.369 568.666
-244.557 72.224
-311.643 573.536
-187.313 164.66
-104.709 368.61
-251.544 207.262
-251.549 539.848
-189.55 180.274
-337.174 382.83
-273.35 386.234
-271.821 12.3255
-188.28 559.159
-80.1052 118.65
-79.0684 291.839
-277.671 133.187
-83.0691 394.387
-198.072 557.842
-320.011 25.7603
-228.593 440.303
-429.113 262.494
-292.507 531.926
-21.111 355.062
-385.431 273.055
-401.251 229.435
-459.879 343.261
-445.466 146.584
-100.748 146.475
-152.915 39.1808
-148.531 417.691
-76.7754 449.543
-377.343 502.981
-131.62 187.052
-287.495 95.5885
-394.15 543.213
-219.833 217.019
-264.495 424.504
-7.56158 301.427
-228.513 543.435
-41.5228 460.351
-429.37 103.7
-261.394 573.735
-446.762 377.536
-422.673 121.943
-21.1087 431.406
-241.117 445.073
-235.856 519.006
-264.319 345.405
-222.021 469.197
-280.681 485.349
-232.521 236.29
-223.819 19.8304
-486.196 272.134
-472.335 235.48
-406.599 481.224
-27.5818 281.044
-292.812 180.044
-41.013 290.901
-112.802 283.322
-460.61 388.347
-256.629 337.717
-31.3417 275.519
-234.271 84.478
-172.016 588.409
-267.781 216.244
-400.444 315.525
-379.752 188.07
-452.969 391.882
-191.311 405.272
-450.329 449.359
-236.574 356.708
-152.908 438.923
-230.992 366.851
-7.94852 342.614
-166.394 429.08
-113.939 477.576
-261.495 232.132
-256.115 511.2
-63.7606 282.452
-253.951 125.383
-112.53 448.211
-487.96 295.618
-319.971 481.027
-502.567 348.227
-210.58 133.445
-241.02 263.414
-95.2853 146.486
-298.252 178.862
-119.827 528.476
-403.625 177.737
-435.589 260.977
-262.142 213.634
-239.985 111.117
-212.936 12.7315
-272.308 405.479
-296.339 93.0008
-343.882 372.095
-200.459 563.083
-122.928 342.926
-264.455 352.453
-110.272 443.197
-75.7637 146.399
-264.567 355.56
-72.3225 96.9762
-415.518 518.062
-396.354 309.564
-395.608 197.49
-80.6872 498.683
-464.609 449.548
-422.2 481.586
-215.708 592.414
-80.0101 80.4976
-325.41 392.538
-382.826 166.112
-90.6985 536.719
-304.537 519.389
-16.5467 421.758
-65.2175 504.527
-269.92 532.687
-165.411 18.3963
-93.4262 59.4297
-17.3681 388.856
-236.095 92.3325
-311.157 470.709
-462.441 183.301
-127.341 509.237
-243.007 531.871
-401.545 254.489
-25.8862 414.681
-453.365 145.351
-447.462 484.848
-264.785 455.097
-289.245 448.863
-224.455 214.502
-86.4997 299.257
-151.21 32.0663
-109.379 269.331
-76.2361 389.949
-407.876 84.4609
-310.395 158.371
-404.673 280.63
-204.003 12.028
-417.938 128.322
-66.1237 139.761
-87.3165 311.937
-142.862 584.142
-226.269 85.8891
-372.84 213.699
-479.514 366.91
-502.214 341.96
-66.148 452.76
-433.595 157.524
-405.269 69.5003
-29.2661 293.778
-388.942 454.359
-250.26 19.5626
-38.9167 137.653
-281.59 373.163
-103.394 448.306
-325.562 471.818
-211.077 112.534
-301.659 160.282
-167.452 374.072
-190.931 491.531
-162.002 373.477
-456.856 247.922
-470.237 192.388
-481.595 224.447
-52.2235 300.686
-430.964 225.188
-183.261 414.026
-86.9373 116.089
-431.553 188.295
-421.915 186.322
-223.966 485.182
-219.478 223.011
-422.852 129.512
-62.3374 405.643
-428.197 129.677
-60.1096 454.648
-253.996 550.346
-440.671 510.142
-188.93 119.262
-177.96 163.918
-176.743 172.513
-442.131 195.631
-370.293 46.6386
-202.102 178.352
-208.903 462.457
-355.681 39.5605
-244.546 414.112
-392.833 313.124
-69.0584 395.45
-232.503 224.69
-199.986 452.403
-227.546 380.751
-392.172 464.587
-390.208 166.84
-424.93 263.497
-444.119 504.715
-442.122 450.258
-471.424 367.785
-251.206 128.7
-203.182 591.88
-446.35 459.442
-303.581 159.697
-226.071 572.552
-378.181 201.646
-57.9954 468.475
-475.754 215.11
-227.712 452.951
-228.256 25.5502
-418.23 473.38
-228.47 141.721
-311.585 498.5
-430.027 253.825
-342.938 551.43
-434.408 121.405
-179.251 593.878
-472.12 281.668
-279.411 371.983
-487.689 435.327
-87.1161 146.467
-403.822 188.304
-12.8524 359.162
-372.351 98.8031
-111.842 295.719
-264.45 418.182
-195.301 121.484
-86.0848 138.403
-46.6668 181.121
-85.1868 532.811
-440.204 149.647
-335.376 36.36
-331.034 489.933
-252.89 132.964
-502.535 405.074
-86.3462 187.237
-426.822 518.614
-261.083 553.491
-241.763 216.477
-477.794 232.276
-230.67 148.1
-150.147 54.0827
-92.9714 219.108
-219.372 227.384
-278.971 14.8508
-202.8 133.279
-49.5734 460.579
-181.505 177.552
-49.6067 115.291
-93.4487 319.394
-218.822 519.62
-426.795 256.948
-110.769 539.085
-311.375 168.533
-105.998 398.387
-23.4628 176.39
-429.001 477.847
-307.141 498.523
-199.872 129.663
-104.584 445.001
-340.098 479.94
-79.761 181.318
-301.776 504.576
-266.322 91.8011
-221.673 453.595
-402.124 84.6758
-307.28 480.43
-442.774 477.259
-283.342 119.812
-352.772 378.709
-600 0
-217.844 71.1228
-325.547 405.995
-447.147 499.233
-46.6667 277.972
-391.612 331.656
-400.142 219.56
-502.349 396.376
-192.191 65.6433
-219.949 200.009
-481.267 230.971
-151.538 391.188
-196.655 171.622
-261.489 567.488
-264.502 114.865
-403.121 64.2659
-308.309 460.592
-422.569 515.256
-219.892 241.881
-377.974 335.541
-325.478 411.697
-393.446 504.546
-473.443 199.436
-98.7627 54.8605
-398.643 319.514
-402.457 539.294
-89.5058 394.414
-388.756 322.621
-84.9558 290.71
-322.909 505.477
-184.905 481.35
-59.064 137.264
-89.0276 63.8478
-116.69 142.919
-261.069 492.194
-247.729 494.524
-247.883 476.398
-82.4686 142.372
-110.629 191.679
-434.266 180.34
-229.93 213.581
-69.6015 178.282
-103.478 235.641
-232.471 230.321
-383.204 91.6945
-420.031 84.731
-106.061 449.619
-79.0183 488.307
-468.215 236.785
-430.965 484.547
-403.644 261.033
-398.511 178.472
-283.264 492.306
-203.811 448.854
-377.761 216.968
-244.519 59.6483
-128.12 502.424
-361.2 559.357
-236.273 396.419
-55.8796 281.207
-195.082 456.394
-25.2791 436.371
-48.4206 132.305
-229.118 524.301
-12.5904 400.582
-71.5647 498.081
-314.375 22.3499
-96.5275 294.576
-225.414 372.334
-267.97 359.049
-268.953 223.989
-343.954 483.366
-101.311 219.618
-233.377 132.563
-467.431 180.565
-269.048 463.116
-215.683 469.183
-108.512 379.538
-491.937 374.332
-17.6396 405.048
-137.875 580.828
-151.232 524.291
-257.576 488.11
-255.66 14.0633
-270.214 116.718
-478.604 377.465
-112.741 276.716
-431.953 517.722
-499.954 407.136
-435.619 105.236
-89.3244 485.892
-128.517 66.561
-367.519 560.394
-239.855 221.127
-105.142 305.625
-399.6 187.723
-409.005 252.493
-378.003 162.202
-201.812 86.7617
-244.592 78.6593
-317.924 518.692
-450.808 237.568
-439.415 180.789
-418.224 537.155
-278.475 381.759
-95.5922 249.746
-94.7463 243.358
-247.517 200.493
-362.964 159.895
-246.991 100.313
-401.612 173.073
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after106 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after106
deleted file mode 100644
index 4be1482..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/after106
+++ /dev/null
@@ -1,1323 +0,0 @@
-261.217 112.3
-211.062 443.966
-95.7593 259.609
-460.967 382.378
-463.979 392.845
-226.277 112.518
-426.859 256.915
-205.133 481.436
-151.226 32.2641
-442.171 195.627
-264.495 424.504
-87.0952 246.865
-396.061 505.568
-457.55 191.515
-393.165 179.106
-187.082 575.353
-186.819 395.724
-244.64 434.507
-442.762 477.285
-353.801 383.379
-383.529 336.65
-384.126 97.6188
-107.063 219.163
-421.653 88.7082
-451.129 489.781
-268.683 409.253
-106.189 449.646
-191.317 405.257
-243.002 406.032
-109.061 230.167
-199.968 452.421
-128.1 502.47
-356.766 438.494
-202.069 178.327
-401.544 254.49
-415.52 518.069
-408.988 276.665
-203.775 448.878
-233.127 23.3157
-200.278 494.928
-307.141 498.522
-299.307 165.727
-251.41 321.369
-101.772 266.444
-99.7568 398.475
-407.055 229.404
-337.634 373.555
-151.251 524.247
-251.417 329.463
-103.247 481.742
-86.4051 187.262
-404.679 280.601
-244.59 78.3642
-259.372 43.427
-431.904 517.752
-247.706 494.395
-415.34 291.659
-197.067 525.499
-492.353 426.398
-215.358 237.697
-215.088 64.4461
-93.5326 447.176
-232.52 236.32
-231.005 366.846
-225.462 240.963
-220.459 13.4443
-249.558 438.138
-183.259 414.025
-12.9038 396.848
-243.257 146.539
-303.571 159.698
-116.677 142.913
-442.244 249.433
-25.2649 436.368
-181.516 177.561
-383.164 91.7195
-328.651 558.468
-360.442 410.209
-492.551 305.421
-51.0021 407.648
-229.171 524.639
-119.328 518.779
-108.324 372.645
-410.396 505.49
-261.662 342.274
-115.294 212.942
-393.858 278.577
-466.746 205.095
-96.6761 449.933
-432.412 221.049
-80.2789 118.638
-69.0086 395.487
-244.988 228.294
-10.5514 298.25
-172.036 16.9715
-181.854 509.091
-276.394 234.677
-156.007 54.6148
-436.881 110.609
-407.248 73.978
-129.313 178.59
-391.986 229.928
-66.1374 452.777
-122.356 222.469
-386.946 464.06
-227.54 380.75
-348.889 374.857
-329.976 418.976
-378.003 162.214
-237.5 61.842
-111.761 477.761
-438.823 377.577
-225.943 580.573
-165.3 18.3994
-350.818 552.782
-222.082 469.204
-244.356 53.4742
-480.471 446.785
-116.587 307.409
-80.7253 498.667
-288.969 380.803
-253.79 550.249
-307.09 571.925
-198.163 500.054
-394.074 543.142
-54.8003 456.939
-252.89 267.443
-6.85583 307.132
-471.973 281.713
-105.347 335.62
-49.6094 460.572
-24.0239 159.123
-391.146 55.9278
-357.994 406.029
-600 600
-343.648 372.017
-263.417 125.831
-454.391 377.4
-502.353 396.378
-467.473 180.538
-314.325 464.468
-481.234 231.062
-262.351 141.171
-79.6687 108.382
-96.5138 294.581
-72.6268 514.78
-97.3338 490.103
-103.49 197.833
-435.551 260.983
-293.189 455.941
-147.7 512.41
-399.582 187.696
-285.631 501.647
-397.201 275.697
-122.214 178.639
-468.204 236.774
-200.256 71.4499
-395.519 509.803
-280.601 485.354
-144.108 546.051
-134.494 181.164
-303.219 18.43
-491.082 366.651
-144.318 540.492
-208.938 462.409
-399.518 297.485
-277.298 83.5984
-17.5155 388.685
-244.495 425.868
-329.058 388.443
-385.246 193.177
-76.8069 106.224
-394.063 530.401
-31.3961 275.31
-145.957 49.9751
-388.925 454.36
-95.5929 249.726
-430.034 253.814
-236.697 389.903
-190.955 491.557
-414.366 481.509
-502.554 362.866
-264.819 458.818
-114.16 181.019
-215.871 231.251
-379.598 225.543
-45.6063 123.137
-431.313 381.483
-200.662 59.5348
-231.434 239.824
-63.7422 282.445
-181.878 505.341
-367.053 158.11
-156.199 439.56
-256.056 26.8592
-502.215 341.962
-427.286 485.58
-420.533 510.454
-427.479 150.224
-492.559 320.639
-95.8526 372.199
-377.742 216.942
-197.665 572.768
-460.579 388.267
-281.218 381.61
-26.9645 346.896
-219.358 227.416
-83.991 86.8471
-117.636 331.317
-95.9086 383.722
-120.87 188.458
-444.073 183.473
-241.642 73.7455
-213.597 62.3347
-84.8021 110.266
-392.55 84.709
-387.631 87.3188
-152.915 438.935
-437.193 512.866
-238.356 540.267
-496.718 381.137
-151.663 387.987
-401.27 292.848
-421.481 280.431
-492.273 300.496
-229.932 213.589
-236.487 567.596
-402.972 515.46
-62.118 146.436
-30.6664 451.04
-298.256 178.861
-402.44 539.323
-304.544 519.434
-55.8613 281.205
-59.0571 137.265
-159.602 44.7884
-195.812 579.485
-427.891 181.703
-117.224 191.31
-232.777 545.967
-379.14 50.7334
-309.888 498.517
-464.588 449.552
-266.586 133.265
-446.666 125.037
-388.203 498.77
-426.054 382.586
-27.5768 281.395
-106.976 291.874
-244.523 72.6402
-244.688 517.456
-85.3258 233.369
-128.238 72.8241
-299.716 454.523
-291.546 91.1199
-119.723 57.5482
-428.822 477.823
-191.888 563.786
-35.7054 274.312
-378.176 201.649
-240.483 548.469
-93.1404 453.775
-146.409 535.755
-375.674 160.053
-248.604 146.456
-422.183 481.579
-283.283 492.264
-32.5745 455.857
-404.701 307.066
-271.485 526.451
-272.804 451.398
-417.372 249.499
-215.244 485.562
-256.364 523.488
-396.679 546.911
-60.1401 454.631
-116.016 534.689
-398.576 535.606
-149.755 585.341
-293.836 460.022
-245.21 555.358
-221.69 453.591
-272.302 400.509
-314.362 22.3469
-236.251 362.902
-40.9314 290.828
-138.37 76.3599
-82.5755 142.335
-389.784 210.711
-148.531 417.691
-207.366 526.81
-66.1092 139.731
-450.306 449.355
-84.3085 449.416
-435.001 150.704
-148.925 529.017
-237.042 404.608
-80.0106 80.4508
-279.758 500.551
-446.353 459.437
-404.375 193.848
-188.517 92.1121
-409.004 252.493
-408.573 274.944
-385.316 55.089
-108.47 384.628
-12.6111 400.61
-227.213 149.768
-189.774 459.831
-418.135 537.217
-210.58 133.443
-251.451 222.451
-486.179 272.181
-348.356 433.521
-179.36 593.874
-76.7758 449.54
-325.264 464.715
-37.0741 405.494
-350.394 39.4709
-54.0013 136.102
-69.5745 178.28
-152.693 38.9684
-261.619 240.113
-123.287 61.3243
-110.096 212.712
-252.039 507.471
-251.47 212.416
-264.455 352.454
-411.171 226.289
-424.662 239.04
-230.663 148.101
-23.4604 176.391
-234.249 84.4799
-261.486 567.488
-294.611 18.7343
-479.275 257.641
-251.303 107.049
-214.338 481.319
-77.0811 529.989
-358.686 159.093
-155.432 382.717
-184.86 481.348
-261.093 492.25
-108.016 136.421
-449.08 388.493
-197.457 8.49515
-79.1173 291.89
-106.946 262.595
-423.875 225.693
-256.081 511.12
-196.303 68.4333
-437.682 477.392
-339.462 380.449
-76.2297 389.951
-123.401 563.39
-136.488 40.6811
-217.731 375.052
-112.516 448.191
-465.632 211.932
-450.569 246.038
-162.508 579.27
-322.982 505.462
-218.395 533.278
-249.029 500.486
-502.522 405.136
-96.213 199.283
-265.55 527.003
-484.936 370.897
-291.763 577.714
-244.671 271.34
-187.905 569.664
-377.482 327.763
-446.795 474.46
-395.581 197.505
-70.9254 284.009
-156.357 378.424
-245.273 46.9325
-89.0208 63.8546
-250.001 225.289
-236.575 356.711
-178.976 12.5302
-112.501 57.6738
-79.7642 181.327
-115.714 484.658
-403.646 261.028
-443.845 385.691
-42.5632 274.718
-89.1298 456.812
-357.492 397.24
-268.956 223.998
-283.339 119.808
-187.294 164.648
-437.614 242.937
-35.6768 438.62
-265.363 474.398
-311.157 470.708
-457.155 453.88
-491.928 324.136
-106.436 187.392
-140.652 83.6679
-148.906 430.451
-93.4296 59.4264
-269.97 532.698
-435.679 105.289
-187.728 400.167
-439.43 479.752
-274.855 535.318
-251.543 207.254
-487.714 435.285
-30.6279 405.51
-415.389 240.116
-452.957 391.87
-74.4903 287.475
-266.749 35.6999
-228.001 473.515
-81.7205 297.767
-229.672 479.063
-183.767 554.706
-257.531 264.143
-254.562 46.3586
-276.227 44.1363
-325.376 400.819
-177.96 163.917
-392.369 538.869
-307.353 480.397
-317.191 161.343
-184.936 550.544
-311.347 475.9
-179.305 388.106
-385.23 455.077
-92.8117 219.066
-296.33 92.9814
-56.3271 405.882
-458.089 374.026
-287.968 526.412
-212.846 91.7126
-161.995 373.475
-422.705 121.934
-216.711 86.4868
-245.116 538.789
-161.871 574.089
-287.29 87.7609
-402.391 505.523
-240.541 564.561
-97.6013 134.302
-82.2604 404.734
-265.239 388.416
-483.275 336.547
-293.567 24.7702
-388.755 322.62
-126.598 559.416
-222.899 589.033
-484.869 441.821
-67.2058 464.284
-377.762 173.647
-112.909 300.222
-16.7737 426.65
-471.468 367.756
-139.662 502.405
-248.795 275.219
-357.418 425.907
-85.6083 459.929
-481.206 216.718
-269.281 446.176
-476.552 447.595
-446.998 499.15
-240.545 465.582
-320.318 498.574
-155.036 27.3574
-228.573 516.588
-311.615 573.533
-137.962 580.86
-479.259 287.782
-292.542 531.903
-436.431 247.216
-328.414 552.576
-319.984 25.7371
-600 0
-188.881 119.257
-420.675 519.219
-497.935 386.876
-390.965 559.687
-275.445 487.624
-232.775 50.7712
-196.522 62.2943
-197.994 557.767
-43.1009 407.244
-91.6578 305.154
-272.721 133.549
-304.501 508.195
-404.892 471.698
-198.603 567.956
-219.902 200.005
-395.537 170.294
-461.217 252.226
-272.307 405.48
-150.185 54.107
-458.295 398.128
-455.282 235.554
-268.534 82.4481
-433.593 157.519
-200.955 117.271
-164.658 435.409
-257.393 95.4633
-188.511 509.487
-257.536 516.286
-27.2562 154.532
-299.305 461.134
-271.88 226.859
-335.421 420.139
-261.038 553.428
-159.768 583.395
-207.071 115.915
-270.192 49.9039
-424.566 525.005
-273.233 50.5739
-499.948 407.134
-192.085 65.5783
-245.355 489.515
-96.5957 212.089
-277.651 116.595
-236.812 341.775
-128.511 66.6139
-232.502 224.689
-302.067 498.508
-97.2663 485.157
-83.1243 394.403
-46.6774 181.122
-434.969 126.296
-479.459 366.883
-61.5845 399.24
-229.309 91.2941
-111.6 263.366
-241.1 445.095
-287.507 95.5889
-231.656 570.258
-97.2053 323.097
-226.053 482.806
-383.367 509.31
-43.3881 136.901
-103.882 329.788
-236.593 101.178
-270.733 39.6863
-470.7 286.562
-195.272 121.49
-20.8458 291.047
-228.825 130.605
-328.955 544.524
-232.584 52.8808
-311.585 498.502
-263.649 242.377
-264.662 441.597
-278.234 584.643
-387.336 262.661
-466.425 257.273
-0 600
-52.5354 300.846
-420.884 236.226
-127.303 509.349
-374.222 50.0593
-142.79 584.164
-244.991 86.9876
-431.092 385.771
-247.541 200.492
-293.923 171.751
-73.0351 116.829
-436.6 256.106
-252.807 132.866
-243.503 469.464
-361.947 153.621
-446.762 377.531
-466.342 343.629
-170.462 426.257
-463.385 191.335
-402.121 271.163
-325.546 405.994
-302.726 178.071
-188.286 559.165
-92.5529 291.965
-222.608 246.8
-223.402 91.4581
-108.997 304.485
-84.8694 488.536
-368.898 165.522
-212.016 191.75
-380.72 233.671
-85.2828 532.85
-222.254 436.271
-108.513 379.537
-33.1491 139.036
-181.974 390.516
-422.217 473.945
-382.07 458.524
-196.651 171.612
-271.698 12.3003
-409.985 295.72
-376.973 207.08
-276.044 239.242
-290.765 30.1275
-189.128 468.56
-398.676 319.476
-34.0161 442.785
-17.3943 380.495
-37.7101 456.942
-431.07 225.156
-391.545 236.817
-71.442 489.914
-198.561 483.82
-229.302 537.567
-478.606 377.46
-463.185 164.222
-167.455 374.074
-456.211 131.506
-58.0658 468.484
-434.912 381.165
-502.567 348.223
-286.583 577.485
-240.002 111.086
-416.88 288.838
-103.384 448.323
-326.67 415.195
-322.174 396.38
-487.956 295.608
-258.442 32.4851
-236.971 150.796
-217.644 112.519
-492.499 420.505
-396.375 309.559
-203.824 12.5656
-111.842 295.715
-207.938 188.848
-440.924 113.913
-314.88 159.626
-243.466 339.619
-417.94 128.259
-131.618 187.061
-301.099 484.336
-402.093 84.687
-94.7382 243.348
-310.388 158.371
-429.39 103.707
-273.608 80.169
-116.502 479.881
-379.946 102.177
-110.69 539.124
-95.2853 146.486
-361.409 559.487
-442.121 450.262
-87.1161 146.467
-50.2845 485.319
-268.68 396.744
-325.024 475.94
-308.687 18.5178
-159.291 52.5319
-404.393 289.234
-266.418 8.83356
-369.287 190.543
-336.644 492.106
-331.034 489.933
-7.95925 342.617
-477.693 232.287
-415.752 95.9822
-148.473 425.995
-304.357 458.461
-311.351 512.834
-176.586 482.785
-459.422 160.138
-265.655 46.6579
-272.582 588.999
-372.747 183.665
-272.982 230.935
-109.112 55.4508
-491.404 333.493
-392.194 464.579
-89.2325 232.094
-13.8927 292.028
-426.826 518.608
-64.944 505.229
-27.1262 445.33
-15.526 375.114
-241.584 216.467
-377.67 227.814
-449.528 494.871
-382.433 564.423
-486.7 329.044
-256.615 337.702
-108.387 311.44
-269.051 463.113
-196.575 504.242
-272.99 467.292
-438.915 157.476
-279.704 22.8963
-42.8569 298.457
-12.0951 368.124
-374.546 191.587
-123.535 568.869
-3.38504 311.502
-23.1232 382.84
-375.803 564.446
-89.8008 280.807
-31.0467 411.342
-123.506 334.354
-3.90777 330.892
-95.1533 388.819
-12.8385 359.143
-317.153 164.768
-460.328 232.085
-497.566 339.507
-345.372 39.4807
-100.524 327.403
-253.903 125.395
-392.519 458.974
-296.838 575.705
-49.2084 115.546
-244.192 259.467
-52.2434 179.518
-23.505 171.363
-496.446 392.347
-376.932 167.399
-244.175 324.474
-208.842 182.123
-103.775 54.8325
-261.4 573.788
-228.493 141.705
-89.3094 315.374
-239.021 80.2957
-190.429 481.532
-247 100.33
-115.917 271.895
-294.82 499.333
-219.773 143.862
-48.265 132.116
-263.502 146.039
-471.261 449.365
-357.442 388.104
-0 0
-264.357 392.265
-244.478 484.968
-295.947 99.9649
-502.501 355.134
-495.904 366.561
-301.659 160.289
-66.2926 175.711
-312.092 506.299
-208.924 86.774
-218.238 91.6113
-244.362 407.749
-199.895 129.66
-452.745 126.315
-195.205 91.2416
-389.873 93.165
-114.035 477.596
-215.777 592.591
-128.165 553.475
-105.137 305.651
-142.297 46.2139
-441.214 116.932
-58.2182 112.152
-324.136 30.0425
-337.182 382.818
-401.269 77.5072
-253.623 116.716
-229.074 42.3485
-21.1034 431.404
-261.494 232.133
-244.873 202.124
-186.77 8.58336
-223.901 535.45
-470.17 192.35
-104.726 444.838
-187.097 500.288
-473.473 199.378
-112.407 64.0049
-123.018 513.971
-401.248 229.435
-213.164 12.3798
-199.357 530.17
-166.378 429.099
-251.223 128.683
-234.12 54.6316
-255.783 532.586
-260.086 87.0126
-228.328 453.01
-7.37095 335.078
-275.231 367.208
-219.827 217.018
-301.911 504.296
-191.47 496.523
-86.9102 116.092
-281.706 526.539
-197.158 180.475
-333.883 543.398
-233.045 458.202
-372.412 98.7516
-81.7495 146.404
-100.748 146.474
-119.787 528.668
-474.729 366.386
-148.503 411.108
-388.125 335.995
-473.851 257.499
-24.6815 386.185
-317.889 518.608
-236.277 396.409
-483.863 261.253
-133.332 552.402
-119.27 51.2131
-90.7235 536.723
-270.908 242.332
-269.188 365.609
-339.135 39.4678
-70.0821 449.539
-87.416 98.1732
-240.549 67.3092
-106.05 281.739
-317.034 573.552
-436.107 249.162
-343.898 483.047
-235.664 449.204
-264.568 355.561
-101.043 366.246
-107.42 146.517
-97.9069 236.577
-194.042 551.757
-315.644 485.184
-226.403 446.675
-244.545 414.111
-328.066 565.997
-418.351 260.658
-282.938 27.507
-244.516 420.347
-247.499 512.458
-472.68 341.123
-395.778 235.203
-261.306 483.252
-37.695 184.289
-37.9088 287.586
-424.177 531.16
-247.419 497.912
-475.713 215.112
-98.7106 54.8942
-215.577 476.474
-113.047 73.7441
-141.309 508.634
-93.4493 319.394
-264.45 418.179
-337.384 425.285
-428.332 129.65
-426.437 157.291
-237.665 526.51
-264.797 455.082
-176.739 172.506
-439.406 180.784
-392.492 186.318
-403.834 188.32
-440.626 510.193
-483.792 377.657
-304.516 513.996
-122.358 224.529
-453.15 145.542
-228.599 440.311
-100.113 187.527
-261.032 531.572
-251.05 201.804
-315.015 522.546
-405.177 69.537
-335.565 386.682
-122.926 342.93
-64.6951 112.836
-184.057 467.608
-262.144 213.634
-95.2005 205.16
-477.11 332.405
-25.8745 414.718
-57.2593 402.487
-308.339 460.598
-224.087 128.898
-396.738 89.2687
-16.5521 421.755
-176.497 166.668
-49.7579 468.93
-387.211 239.911
-192.309 583.443
-95.4275 255.034
-202.379 468.292
-151.528 518.143
-103.63 488.372
-126.154 41.8572
-213.491 90.0019
-325.41 392.536
-272.679 91.2352
-484.729 280.837
-219.483 223.008
-197.823 588.229
-257.56 504.546
-105.995 539.586
-129.082 191.979
-264.589 531.224
-417.805 229.894
-244.47 206.226
-444.15 504.713
-102.315 291.523
-62.758 467.266
-95.3868 539.748
-389.775 531.969
-382.846 166.123
-232.471 230.321
-51.8851 139.84
-262.444 95.2881
-306.196 522.24
-261.544 560.387
-216.703 538.863
-478.709 337.368
-479.567 281.561
-335.338 36.324
-405.344 219.418
-391.615 331.661
-392.831 313.122
-123.378 575.34
-242.933 559.985
-395.514 213.57
-151.539 391.187
-195.125 456.371
-280.841 87.1485
-409.133 302.407
-89.5034 394.406
-406.69 481.24
-80.4722 462.396
-3.39843 324.807
-407.46 539.499
-370.349 46.6518
-385.13 197.174
-200.507 563.333
-352.817 378.775
-192.769 129.025
-385.56 265.556
-67.9988 146.43
-449.318 183.515
-492.503 312.815
-370.811 104.756
-225.79 572.774
-424.246 269.901
-397.677 81.6608
-416.907 101.471
-53.3554 402.593
-277.671 133.187
-17.6584 405.056
-157.558 589.115
-401.109 476.976
-434.405 121.407
-29.3292 293.805
-412.646 539.793
-234.777 385.096
-57.5779 178.771
-444.75 454.893
-367.704 560.403
-261.544 227.062
-458.013 137.959
-93.3791 187.565
-331.744 500.416
-114.714 146.273
-324.255 573.648
-48.0912 402.497
-208.551 594.706
-62.505 488.556
-222.609 515.123
-90.1059 401.717
-360.521 419.086
-246.734 330.196
-112.659 326.102
-177.042 420.663
-223.898 485.196
-472.26 235.544
-422.071 243.653
-241.034 263.382
-243.301 526.751
-62.476 405.633
-362.933 159.881
-335.804 484.165
-108.281 396.448
-233.5 132.507
-202.825 592.752
-23.4066 164.03
-172.217 588.806
-203.301 489.557
-418.233 473.427
-223.881 522.412
-251.355 539.89
-399.804 512.627
-84.5335 283.106
-224.442 214.516
-76.2645 521.53
-174.174 387.061
-216.547 133.317
-437.912 385.348
-228.444 15.4321
-462.388 183.315
-218.901 519.713
-380.838 324.662
-74.4911 101.493
-327.896 34.2249
-244.611 212.432
-251.926 520.629
-301.799 568.764
-357.467 403.179
-102.692 136.55
-280.687 535.466
-470.433 178.263
-421.592 152.395
-95.9173 229.175
-464.325 207.634
-54.3412 488.334
-111.262 337.175
-393.492 504.581
-343.061 551.496
-294.263 448.969
-121.206 46.5064
-195.038 95.7202
-262.104 33.6814
-257.256 137.61
-251.489 214.213
-202.771 133.273
-276.513 495.722
-117.728 229.072
-409.514 246.964
-470.513 336.412
-409.355 473.703
-204.712 531.664
-23.6347 181.659
-220.886 543.05
-87.3313 311.92
-227.529 208.776
-232.376 217.951
-207.646 90.3225
-267.97 359.049
-377.348 502.981
-186.947 410.069
-429.112 262.496
-120.708 71.2328
-396.109 61.4644
-279.505 95.3998
-422.805 129.523
-393.647 205.069
-86.1996 138.311
-471.324 212.75
-445.464 240.604
-380.283 96.0072
-287.1 486.096
-362.478 46.218
-251.407 112.692
-108.52 389.757
-212.403 185.638
-109.882 488.491
-265.022 131.668
-133.16 80.1915
-183.745 461.829
-429.581 121.479
-221.334 204.351
-400.447 315.511
-399.687 203.413
-368.334 175.975
-84.9488 290.703
-407.874 84.4597
-413.008 84.4363
-71.1551 498.128
-139.272 550.102
-50.4703 293.588
-31.3202 436.411
-236.674 106.089
-230.356 137.347
-372.834 210.214
-21.0111 355.2
-279.41 371.981
-130.832 579.003
-452.775 465.465
-491.886 374.323
-192.091 8.44725
-354.441 555.146
-100.114 377.172
-488.994 264.913
-183.374 487.051
-398.519 178.473
-289.096 374.382
-108.721 317.372
-86.5015 299.252
-112.739 276.723
-337.94 546.932
-468.706 380.937
-276.437 49.9816
-417.44 255.805
-83.8047 74.88
-288.888 123.257
-23.9537 350.927
-440.086 149.751
-251.767 334.935
-410.285 515.432
-257.581 488.105
-390.182 166.822
-250.545 258.505
-448.326 157.482
-264.734 413.397
-450.826 237.54
-396.519 301.444
-240.001 221.326
-218.344 70.9972
-13.1677 343.604
-311.412 168.493
-353.078 437.764
-209.106 71.5608
-157.877 21.1828
-386.449 277.968
-332.843 496.361
-281.555 373.154
-327.662 493.637
-473.361 377.438
-410.062 241.51
-278.48 381.757
-263.436 9.15032
-7.58946 301.17
-225.421 372.296
-293.056 527.531
-355.756 39.6014
-307.31 173.839
-189.585 180.28
-36.96 411.323
-93.6456 398.614
-292.809 180.043
-41.5316 460.357
-264.942 587.581
-453.578 471.888
-470.593 169.994
-260.886 527.711
-44.2902 476.63
-454.328 183.566
-317.079 505.388
-326.488 502.426
-31.7097 283.407
-492.764 412.937
-403.333 64.3899
-3.52195 318.608
-252.088 95.8595
-201.027 182.049
-418.237 221.45
-303.34 568.645
-276.538 526.526
-85.2677 68.2532
-415.537 505.765
-264.408 580.832
-319.975 481.03
-272.246 472.256
-281.909 128.975
-219.91 241.845
-74.1372 143.052
-264.452 434.196
-285.783 532.727
-70.3027 402.69
-112.401 320.447
-401.519 173.003
-216.469 453.432
-210.996 112.551
-225.131 202.342
-281.199 577.632
-195.24 481.702
-422.597 98.117
-76.5404 464.644
-253.675 146.581
-389.862 509.439
-75.7637 146.399
-183.47 392.564
-226.365 85.8994
-372.837 213.701
-377.899 230.813
-385.437 273.082
-91.7958 136.439
-324.458 497.875
-115.59 137.026
-250.266 19.6491
-325.558 471.823
-340.66 479.426
-482.738 332.723
-270.114 116.695
-246.56 319.241
-100.937 539.46
-93.0556 491.168
-216.227 440.831
-188.066 96.6293
-379.156 498.605
-325.481 411.73
-445.237 146.578
-454.137 157.503
-58.1771 143.497
-379.761 188.072
-209.818 488.297
-244.826 441.041
-434.221 180.355
-101.31 219.626
-353.733 155.97
-104.68 368.579
-78.9526 488.311
-377.973 335.539
-430.912 484.626
-501.177 366.121
-91.7529 367.473
-211.578 532.789
-267.78 216.245
-187.393 122.692
-433.676 195.082
-148.601 405
-261.433 477.614
-87.7419 494.663
-37.4774 294.93
-438.338 128.982
-196.319 468.492
-408.814 99.952
-247.882 476.508
-211.07 533.594
-393.401 326.671
-110.631 191.678
-168.37 574.489
-233.103 400.679
-468.839 166.999
-134.12 498.596
-305.389 467.452
-261.402 221.745
-72.3482 96.9167
-95.6242 278.142
-207.188 59.1849
-483.674 291.403
-244.519 59.6475
-357.569 433.213
-382.698 221.615
-248.342 530.954
-77.5934 402.446
-396.204 262.613
-168.975 379.48
-45.7504 481.017
-403.69 177.654
-308.89 485.681
-235.807 518.978
-114.279 343.491
-213.962 454.284
-231.417 32.8353
-245.744 254.822
-266.329 91.7908
-456.8 247.876
-89.3435 485.881
-390.019 316.974
-21.1421 416.603
-396.248 554.862
-131.191 39.1913
-70.268 510.361
-294.357 500.713
-261.642 498.032
-425.716 187.006
-228.726 543.421
-117.417 218.862
-46.5883 277.936
-264.32 345.406
-200.913 96.6293
-79.1928 95.0683
-427.129 219.167
-400.136 219.575
-462.025 450.188
-354.352 151.381
-460.948 337.031
-398.313 469
-255.494 14.1382
-236.443 351.43
-215.687 469.179
-135.522 68.6045
-30.486 188.055
-244.377 65.915
-249.79 532.561
-236.082 92.3145
-167.93 568.105
-287.686 495.425
-112.803 283.325
-38.9352 137.654
-412.93 221.565
-106.011 398.386
-239.88 461.476
-424.932 263.494
-151.425 400.116
-109.655 184.226
-103.369 235.719
-448.608 191.444
-183.223 163.395
-202.003 86.7528
-82.7538 242.707
-22.4973 405.568
-233.537 116.909
-86.6207 92.5384
-342.357 488.071
-481.61 224.446
-488.973 430.329
-184.941 585.695
-264.646 114.979
-110.377 443.272
-420.068 84.748
-422.586 515.284
-273.348 386.235
-254.979 87.6982
-393.594 218.966
-278.918 14.7697
-192.153 169.261
-424.447 276.173
-289.236 448.96
-168.584 581.479
-431.559 188.228
-319.554 464.503
-201.176 522.182
-109.36 269.327
-447.429 484.888
-18.5201 343.703
-459.018 343.174
-41.9215 402.663
-463.388 372.928
-223.496 378.195
-251.394 546.955
-28.6975 147.263
-101.191 280.986
-75.0788 178.87
-343.263 430.112
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before002 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before002
deleted file mode 100644
index 1d7750c..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before002
+++ /dev/null
@@ -1,20 +0,0 @@
-0 0
-259.707 369.983
-353.542 321.007
-259.843 258.737
-294.846 373.036
-334.006 338.938
-275.222 389.204
-315.872 279.876
-296.194 260.33
-244.192 350.762
-334.707 300.441
-600 600
-227.067 295.02
-314.47 356.868
-276.516 240.784
-0 600
-227.578 332.056
-210.964 313.35
-243.17 276.691
-600 0
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before010 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before010
deleted file mode 100644
index 7378733..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before010
+++ /dev/null
@@ -1,95 +0,0 @@
-271.385 242.401
-274.477 367.438
-322.448 379.706
-373.26 321.517
-370.932 311.726
-344.957 360.475
-244.424 252.599
-204.969 285.455
-290.011 401.984
-276.218 229.882
-209.647 279.589
-212.817 348.748
-243.13 338.971
-219.726 269.427
-257.782 338.207
-201.46 335.975
-329.417 374.577
-120 120
-206.423 341.85
-120 470
-245.278 245.366
-266.213 242.518
-367.539 305.188
-337.479 269.467
-196.249 328.834
-247.997 275.04
-263.458 354.984
-315.934 380.987
-238.412 261.651
-281.167 403.735
-282.268 380.438
-261.199 345.344
-356.936 291.237
-289.997 226.836
-214.586 274.432
-218.114 352.182
-311.955 243.604
-190.789 313.214
-276.262 402.161
-282.585 226.445
-470 470
-346.951 279.814
-313.515 384.833
-255.877 239.183
-231.08 353.702
-224.928 354.936
-295.328 229.908
-249.02 333.938
-192.871 304.912
-282.681 374.169
-235.913 350.401
-250.395 258.841
-237.672 341.519
-296.644 397.048
-259.256 351.12
-300.603 395.219
-195.647 298.784
-250.561 239.073
-268.119 394.738
-272.396 386.143
-244.193 268.854
-350.116 355.467
-232.127 262.132
-371.814 326.319
-317.27 248.733
-370.368 331.122
-193.034 322.61
-470 120
-322.364 253.699
-342.206 274.627
-334.963 369.608
-366.566 337.424
-275.69 239.165
-332.528 264.028
-327.367 258.757
-339.984 365.125
-268.512 361.964
-361.953 297.49
-299.984 233.023
-271.356 400.588
-351.946 285.287
-252.502 268.93
-226.581 264.151
-372.096 316.621
-256.291 358.474
-256.212 262.857
-261.194 239.293
-268.14 388.768
-200.526 291.349
-276.652 383.517
-278.579 370.803
-360.517 344.571
-355.218 350.144
-307.679 390.912
-306.253 238.525
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before088 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before088
deleted file mode 100644
index 30bfb96..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before088
+++ /dev/null
@@ -1,1156 +0,0 @@
-397.228 275.683
-141.598 56.663
-148.535 417.69
-167.432 374.056
-25.8934 414.473
-303.946 568.968
-266.358 91.8515
-20.96 416.849
-81.9073 518.429
-319.957 481.013
-264.652 441.576
-264.665 455.206
-91.6611 305.137
-434.901 105.253
-322.316 505.518
-236.574 356.691
-216.992 453.475
-197.733 553.081
-405.819 68.9517
-260.849 491.806
-428.436 150.09
-195.966 121.311
-95.7838 259.668
-211.977 191.738
-325.451 411.489
-57.0172 179.25
-112.541 448.449
-257.301 137.676
-377.477 327.77
-263.847 114.355
-483.315 377.691
-469.993 285.975
-318.144 519.099
-319.545 464.506
-279.427 95.2897
-389.772 532.109
-236.772 404.441
-390.193 208.791
-183.059 163.379
-379.35 498.513
-53.4389 473.103
-134.501 181.189
-129.074 191.995
-352.711 378.328
-378.223 201.6
-415.281 240.178
-431.932 385.726
-203.001 133.314
-272.721 133.548
-32.4876 284.142
-299.575 461.342
-52.8238 480.455
-495.866 366.545
-360.477 410.508
-326.199 502.713
-325.599 471.762
-75.764 146.384
-382.713 221.596
-112.988 300.432
-296.418 93.2282
-114.477 180.894
-471.173 367.948
-444.618 454.696
-429.232 103.485
-268.683 409.254
-475.066 366.296
-448.325 157.458
-289.094 374.367
-155.595 382.01
-66.2573 452.611
-114.323 343.52
-70.4064 119.91
-447.039 499.31
-420.369 510.259
-4.61568 331.89
-380.886 324.638
-123.486 334.354
-217.604 508.295
-109.567 184.317
-16.5272 421.591
-58.2021 468.434
-177.999 163.902
-115.445 136.917
-13.1889 396.063
-497.505 339.522
-485.015 370.922
-108.505 379.543
-461.198 336.887
-115.364 485.162
-354.449 555.151
-191.262 405.372
-111.847 295.747
-219.468 227.08
-188.781 509.484
-424.711 239.017
-304.51 513.999
-254.088 46.2882
-100.575 74.0718
-324.117 30.0233
-442.183 450.202
-236.806 341.82
-99.7594 398.47
-187.158 500.278
-84.7708 488.547
-141.405 508.766
-262.131 213.646
-339.363 380.539
-21.0923 431.467
-395.788 219.568
-120.09 527.169
-449.312 183.634
-252.368 520.73
-217.644 112.414
-244.834 202.265
-155.967 439.602
-454.309 183.8
-81.7597 297.735
-308.198 460.577
-480.939 446.42
-236.716 101.113
-267.781 216.229
-109.575 488.496
-451.055 491.09
-112.684 326.152
-291.838 498.909
-225.991 112.835
-473.079 200.166
-374.927 159.909
-230.732 148.101
-103.362 197.884
-418.972 84.2259
-148.451 425.934
-11.9633 366.846
-106.191 536.108
-252.936 267.466
-76.1227 389.951
-324.759 476.335
-38.1492 287.886
-82.7744 242.56
-301.683 160.325
-116.935 191.364
-20.2431 290.757
-403.372 470.738
-122.087 222.202
-100.113 187.493
-438.709 128.788
-43.5015 298.759
-200.523 71.3474
-232.53 236.13
-434.444 180.37
-600 0
-357.486 388.402
-466.35 211.927
-208.917 182.16
-13.0536 359.04
-190.148 92.1066
-453.086 126.683
-267.325 19.3732
-362.081 45.8205
-253.63 146.579
-85.1709 460.106
-166.497 428.975
-199.484 88.4298
-453.748 157.499
-219.784 143.792
-320.154 25.8924
-251.324 329.467
-422.557 186.297
-492.563 305.442
-236.945 150.79
-368.742 165.431
-392.038 464.634
-169.004 49.2865
-86.4875 299.261
-236.256 362.881
-343.781 483.851
-35.3898 437.368
-122.957 342.894
-311.15 470.699
-25.6544 436.312
-211.77 112.434
-85.3847 523.169
-488.958 264.795
-81.119 108.599
-470.644 192.543
-399.874 512.766
-47.3849 142.853
-39.3531 163.527
-250.724 544.847
-270.798 39.738
-292.122 532.154
-169.006 379.533
-92.5543 491.596
-286.838 486.114
-69.8351 402.863
-315.748 485.158
-206.131 533.534
-436.405 247.326
-471.458 449.321
-211.426 83.2204
-244.299 270.235
-264.45 418.197
-207.869 188.798
-219.688 242.029
-93.423 187.633
-246.358 318.869
-306.413 522.26
-104.077 235.172
-268.924 223.902
-401.269 229.44
-49.3765 460.698
-234.287 476.212
-84.4569 283.25
-96.6114 294.557
-251.469 212.42
-465.802 166.914
-304.669 508.924
-302.202 484.563
-410.377 505.482
-422.689 474.361
-395.544 235.428
-392.836 313.116
-395.38 60.7443
-37.8002 410.778
-420.81 519.342
-306.977 480.675
-418.202 260.673
-164.484 435.581
-101.115 366.247
-394.576 178.565
-403.639 261.06
-387.416 87.4417
-391.661 236.738
-95.3011 204.995
-299.024 166.077
-463.97 393.011
-214.499 503.063
-101.825 266.473
-77.5232 505.859
-80.4513 462.499
-264.38 531.68
-271.639 91.0588
-77.4327 100.902
-236.444 351.451
-210.34 91.2749
-251.983 323.531
-416.943 288.762
-231.468 239.805
-98.8927 534.069
-214.519 78.7274
-326.802 415.427
-0 0
-276.372 495.313
-266.528 133.264
-249.004 438.197
-212.434 185.72
-383.052 564.328
-471.179 213.288
-217.329 375.132
-225.105 452.885
-325.411 392.548
-112.767 276.656
-121.025 188.468
-251.615 334.615
-311.352 475.966
-85.8041 186.98
-337.944 546.917
-110.56 191.72
-412.997 84.5501
-260.527 112.488
-281.878 129.003
-174.145 387.032
-181.961 390.508
-468.222 236.837
-356.679 438.623
-392.804 229.856
-372.787 210.304
-238.615 471.228
-97.1075 323.005
-69.6351 178.118
-491.732 426.912
-446.839 474.464
-391.566 184.711
-155.046 563.766
-107.958 136.454
-42.8191 274.976
-428.588 181.481
-434.533 126.499
-312.233 505.97
-392.336 84.8594
-325.387 400.86
-492.603 320.504
-251.484 214.213
-189.336 180.24
-335.585 386.652
-366.366 157.68
-432.815 221.535
-246.944 100.085
-261.597 342.204
-302.109 498.514
-48.0972 402.481
-106.407 262.832
-244.549 414.119
-389.824 93.2997
-134.384 498.685
-95.4509 278.157
-89.2021 456.918
-140.926 551.749
-12.7568 293.41
-65.1355 175.828
-266.671 36.3162
-392.317 538.795
-151.533 391.2
-422.471 515.069
-438.915 157.513
-186.405 395.172
-244.488 71.5734
-94.0728 531.037
-225.429 240.973
-108.67 317.238
-317.214 505.452
-357.485 397.24
-372.746 183.628
-417.786 229.927
-23.4639 383.043
-62.4905 488.933
-337.58 425.52
-453.934 471.476
-192.335 551.99
-128.461 501.912
-396.691 547.661
-325.55 405.998
-264.454 434.189
-265.023 459.154
-446.369 146.753
-111.286 337.22
-487.956 295.668
-195.063 95.7759
-251.288 539.748
-497.836 387.244
-217.954 514.547
-427 219.108
-404.427 289.085
-385.189 193.053
-245.738 254.818
-378.217 102.647
-200.375 96.7559
-418.216 473.329
-281.7 526.548
-450.923 245.969
-243.41 146.498
-449.164 388.55
-263.458 125.881
-400.433 315.582
-404.597 280.879
-324.234 573.563
-244.522 425.866
-409.851 515.345
-108.285 396.522
-26.8224 346.814
-328.934 388.521
-17.3143 380.358
-184.112 467.661
-260.006 531.339
-374.694 191.559
-429.607 121.572
-492.491 312.814
-215.609 469.235
-200.294 497.62
-402.341 84.6144
-210.576 133.458
-479.471 281.619
-279.68 500.436
-288.2 30.5488
-251.468 222.306
-196.306 468.51
-353.766 156.08
-317.048 164.853
-437.084 477.519
-414.95 291.992
-308.365 18.6005
-344.925 372.312
-196.598 525.269
-67.9992 146.502
-84.4286 449.407
-236.248 396.47
-490.933 366.686
-179.411 388.165
-377.879 217.092
-7.91679 342.594
-243.589 339.464
-429.987 253.882
-402.392 505.518
-81.7493 146.404
-189.909 459.78
-106.921 219.246
-163.974 49.9784
-394.02 530.354
-472.7 235.196
-128.789 73.133
-293.542 23.9473
-372.872 213.723
-261.762 497.577
-116.537 479.486
-183.352 559.765
-263.482 146.047
-119.235 519.796
-262.378 95.2722
-397.773 81.2528
-421.542 280.336
-399.078 203.129
-482.432 333.736
-288.966 380.808
-361.276 153.339
-270.948 116.833
-332.761 496.649
-357.443 403.096
-275.573 487.39
-383.582 509.409
-470.06 336.557
-447.66 484.723
-423.645 225.734
-283.352 492.266
-481.554 230.167
-72.4008 489.759
-116.77 142.927
-232.371 217.938
-280.632 535.51
-68.2175 464.2
-281.798 373.217
-257.567 488.106
-151.119 524.566
-266.382 526.59
-44.4126 407.07
-472.534 341.1
-246.697 330.51
-202.88 523.341
-200.086 452.306
-135.732 71.538
-391.365 56.0792
-502.215 341.944
-148.581 405.103
-138.641 75.6245
-463.128 191.3
-257.522 264.118
-435.867 380.389
-441.907 195.647
-143.79 555.942
-405.108 219.405
-407.882 84.4543
-261.516 554.595
-87.3966 114.954
-369.924 46.9908
-403.503 515.561
-216.412 440.676
-380.718 233.657
-109.929 442.872
-442.901 477.579
-62.6068 146.402
-450.762 237.671
-276.273 50.2384
-28.1161 447.977
-172.793 564.547
-205.786 92.1899
-52.7229 140.994
-382.103 458.565
-402.536 477.565
-502.495 355.134
-267.97 359.049
-272.892 467.046
-287.589 495.046
-377.296 502.994
-378.405 96.1987
-354.329 151.38
-85.9234 139.691
-227.142 149.767
-437.173 512.895
-433.649 195.054
-418.298 221.468
-394.432 543.448
-115.911 271.86
-229.048 91.0653
-276.394 44.2656
-360.216 558.629
-94.816 243.454
-287.088 87.6954
-331.48 500.585
-100.828 280.816
-101.303 219.573
-335.652 36.6273
-76.7737 449.564
-402.484 178.208
-260.426 86.8882
-268.684 396.741
-298.405 17.9312
-292.945 455.683
-253.48 116.861
-487.339 435.28
-435.612 260.954
-109.651 304.624
-102.801 136.506
-389.981 317.071
-279.412 371.993
-230.433 137.405
-122.018 178.669
-483.759 291.307
-116.558 307.374
-485.061 441.575
-411.278 226.309
-377.769 173.612
-357.403 426.114
-502.597 404.581
-199.7 483.52
-341.839 488.578
-274.638 535.251
-21.6821 354.54
-281.168 381.609
-415.5 518.012
-448.995 191.377
-337.126 382.903
-401.413 293.066
-291.871 91.2255
-389.082 454.326
-429.123 262.493
-324.959 497.316
-112.788 283.313
-22.5622 405.588
-314.444 22.3191
-431.758 381.267
-492.215 300.331
-337.805 373.187
-74.5103 287.455
-254.321 125.326
-464.79 449.515
-256.677 337.796
-100.138 377.339
-376.932 167.426
-293.945 459.95
-401.551 254.493
-89.5099 394.501
-426.515 157.296
-251.388 111.862
-439.39 377.475
-222.682 246.773
-431.168 484.266
-255.556 551.086
-87.3043 311.953
-122.341 224.739
-446.759 377.547
-265.608 578.141
-409.414 99.109
-407.994 274.689
-281.125 485.334
-146.799 54.6263
-435.974 249.304
-58.1576 143.403
-406.258 481.224
-105.293 449.445
-454.783 143.912
-483.545 336.752
-149.05 430.833
-251.853 534.649
-311.58 498.477
-250.005 225.294
-327.79 566.748
-89.9591 401.754
-70.5292 283.854
-417.028 250.873
-42.973 146.851
-96.147 210.373
-276.394 234.679
-296.305 499.23
-95.5833 249.843
-111.493 477.818
-257.412 504.797
-272.11 580.759
-424.245 270.032
-295.879 99.9029
-96.0617 383.275
-311.373 512.799
-105.319 335.572
-12.5679 400.643
-92.3794 291.902
-426.706 518.634
-269.677 532.487
-314.613 159.528
-269.135 446.024
-241.189 444.959
-146.369 535.706
-432.289 517.5
-176.474 166.759
-3.25043 312.687
-217.234 521.424
-385.184 197.13
-59.9756 454.734
-468.804 380.765
-454.288 377.421
-372.3 99.1402
-94.0115 219.293
-18.6725 343.75
-7.48606 302.741
-50.6879 407.684
-370.914 104.796
-396.326 309.559
-81.3651 498.142
-288.892 123.249
-113.276 477.524
-85.041 290.785
-194.816 90.2682
-396.224 197.313
-424.474 276.066
-148.507 411.109
-401.887 173.175
-195.711 504.449
-479.9 367.113
-304.449 519.039
-232.504 224.693
-330.153 419.048
-443.762 385.66
-215.52 91.4502
-303.632 159.68
-273.356 386.23
-335.36 420.111
-56.2009 486.745
-434.665 150.776
-170.485 426.249
-486.319 271.887
-502.579 362.599
-112.414 320.599
-396.629 301.722
-473.452 281.354
-269.686 49.5638
-69.3237 395.282
-86.7156 83.6625
-251.044 201.782
-340.015 39.6265
-440.945 117.394
-86.1905 97.7264
-406.857 229.435
-176.776 172.572
-442.534 249.326
-104.853 368.76
-216.109 231.036
-304.058 458.154
-330.96 489.86
-36.8764 405.533
-244.312 259.196
-317.034 573.58
-461.983 182.89
-260.891 30.5445
-467.073 204.731
-491.59 324.615
-492.145 374.394
-354.924 39.3038
-309.126 485.636
-164.306 564.667
-106.091 187.5
-499.89 407.205
-403.924 188.553
-285.884 532.639
-478.288 287.662
-396.277 505.609
-41.4513 460.126
-151.625 518.455
-245.578 46.9611
-186.938 410.064
-377.622 227.847
-248.481 275.427
-301.158 569.458
-460.864 388.882
-277.721 18.6238
-242.717 405.969
-87.5069 494.535
-207.472 115.587
-232.853 132.974
-298.231 178.866
-89.2611 232.128
-102.322 291.504
-162.01 373.491
-244.518 433.968
-3.57259 318.611
-17.4921 404.951
-465.932 343.702
-151.79 387.894
-453.035 391.944
-395.636 509.836
-245.011 228.284
-478.328 338.167
-244.539 59.6559
-334.022 543.421
-85.3149 233.387
-415.253 96.6146
-240.961 263.58
-215.658 476.107
-250.559 258.522
-37.3414 457.072
-492.66 413.075
-427.672 129.862
-108.472 384.628
-263.593 242.374
-75.8926 464.761
-210.232 497.927
-287.673 526.37
-277.971 580.232
-444.09 504.795
-152.835 438.799
-424.353 383.711
-474.061 377.284
-280.762 87.1955
-261.542 227.068
-310.444 158.376
-264.867 131.234
-415.039 102.05
-272.815 451.38
-244.354 325.477
-274.37 80.3751
-348.264 433.462
-199.72 129.676
-251.097 128.682
-491.635 333.502
-96.0486 199.391
-176.904 420.784
-459.974 160.1
-106.054 281.768
-269.185 365.603
-63.5876 466.389
-293.87 171.858
-174.033 48.5947
-426.43 257.137
-349.982 552.717
-95.2708 388.502
-463.417 372.894
-154.9 53.9133
-492.64 420.414
-317.279 161.429
-394.24 213.925
-107.141 291.95
-187.108 121.905
-240.093 465.225
-358.163 406.297
-55.7179 406.134
-139.646 502.439
-219.472 223.032
-390.572 559.893
-224.555 214.398
-292.84 180.05
-230.95 366.91
-273.011 230.975
-233.111 400.638
-68.8988 124.778
-457.542 191.535
-93.4452 319.395
-272.348 472.184
-496.497 392.395
-265.265 474.432
-276.06 239.207
-393.141 504.317
-295.564 450.053
-192.523 128.939
-424 531.42
-477.422 332.22
-244.382 212.386
-412.923 221.545
-335.846 484.163
-95.4254 255.016
-211.137 443.94
-108.518 389.744
-203.996 448.732
-305.33 467.42
-221.15 204.306
-105.802 70.9505
-265.344 46.5535
-91.8338 136.258
-257.015 517.017
-39.6913 155.792
-395.952 170.447
-256.447 511.723
-31.8173 443.542
-114.293 146.407
-236.732 390.384
-395.932 262.622
-272.523 18.9985
-228.544 440.231
-336.45 492.23
-322.176 396.365
-479.525 257.733
-190.414 481.485
-264.394 392.336
-234.782 385.075
-187.914 96.1704
-402.139 271.144
-388.478 498.905
-264.494 424.504
-248.6 146.464
-41.8323 402.707
-32.648 455.238
-410.092 295.59
-123.085 513.835
-455.407 235.395
-401.36 63.542
-77.7529 402.454
-251.545 207.308
-478.011 232.339
-103.765 446.179
-357.587 433.096
-67.3912 129.646
-261.076 567.482
-202.543 468.21
-307.222 173.936
-79.5092 512.777
-456.327 131.736
-422.567 153.545
-115.315 212.941
-456.978 453.87
-223.401 91.4869
-427.106 485.62
-387.198 239.907
-285.395 502.033
-268.24 82.5194
-244.264 53.6644
-440.933 509.783
-409.014 252.482
-342.142 550.947
-227.6 380.792
-183.334 487.165
-194.861 456.512
-213.106 455.439
-47.1462 278.144
-205.784 481.344
-394.136 205.131
-264.456 352.446
-291.085 577.73
-235.858 449.175
-444.872 240.75
-103.553 481.648
-223.59 378.223
-15.3289 374.979
-458.849 343.09
-81.0431 141.027
-5.9803 308.11
-376.958 207.072
-183.701 461.882
-386.827 463.968
-271.516 526.525
-229.916 213.543
-156.812 377.896
-196.681 171.686
-278.434 381.781
-47.573 179.853
-261.592 239.953
-108.476 230.468
-385.06 96.5304
-82.6377 394.198
-247.381 200.497
-144.311 541.265
-307.084 571.966
-276.538 526.509
-481.445 224.449
-225.276 372.386
-82.6233 404.721
-404.425 307.591
-262.194 573.011
-299.834 454.65
-434.444 121.297
-208.246 71.1618
-415.669 505.828
-139.227 83.2607
-439.881 113.485
-352.848 437.581
-269.049 463.119
-219.833 217.058
-437.704 242.906
-444.314 183.469
-378.907 51.1362
-142.618 546.507
-297.327 575.317
-497.012 382.063
-284.055 577.54
-464.116 208.225
-237.584 110.132
-97.0354 134.331
-422.69 121.658
-289.324 448.281
-398.554 535.633
-410.854 473.914
-396.964 89.0239
-97.9071 484.886
-440.778 149.166
-450.487 449.397
-100.747 146.481
-232.519 114.81
-389.826 509.413
-107.413 146.489
-399.959 188.073
-177.333 482.599
-95.3893 229.243
-101.934 448.514
-136.155 60.0126
-30.6289 405.498
-151.399 400.209
-97.313 490.018
-277.787 116.603
-62.0262 399.041
-222.229 436.284
-245.941 87.4078
-261.5 232.131
-422.298 481.583
-244.511 420.348
-110.171 212.702
-70.3035 136.919
-385.436 272.902
-40.634 172.516
-358.939 159.164
-377.963 230.94
-466.139 257.16
-391.607 331.609
-36.6949 273.935
-189.945 119.561
-390.46 166.964
-264.735 413.394
-147.639 512.3
-227.486 208.768
-111.442 263.034
-398.171 472.427
-275.251 367.221
-388.211 335.941
-215.04 236.219
-189.074 50.7035
-368.324 176.005
-383.406 91.7889
-91.7613 367.463
-244.686 441.256
-418.808 536.752
-148.866 529.238
-37.7233 295.07
-261.436 477.906
-261.218 483.454
-386.397 277.946
-93.7132 398.607
-221.601 469.12
-89.3763 527.86
-93.1779 78.3696
-311.138 168.776
-178.251 562.914
-96.4874 450.571
-393.758 278.597
-363.193 160.029
-600 600
-117.235 229.161
-200.992 117.251
-89.7965 280.801
-301.653 504.561
-375.206 564.21
-76.1627 142.362
-429.951 225.437
-293.332 527.768
-460.56 232.118
-134.988 66.1595
-320.115 498.659
-283.352 119.833
-236.101 93.0671
-311.801 573.542
-236.895 461.181
-201.187 182.148
-180.706 48.7745
-307.141 498.523
-55.9903 281.235
-28.9263 293.684
-32.3937 411.279
-119.857 71.3085
-313.945 522.678
-0 600
-89.2642 485.98
-424.902 263.535
-105.912 398.412
-473.854 257.51
-86.0519 92.2035
-129.372 178.591
-202.308 178.509
-420.791 236.255
-131.631 187.009
-383.714 336.657
-185.49 550.634
-57.6242 402.262
-89.5452 315.612
-203.811 551.763
-103.921 329.853
-181.43 177.49
-421.744 97.7277
-342.347 477.545
-476.009 214.649
-17.0572 427.204
-272.298 400.505
-209.843 526.31
-282.629 26.6935
-244.384 65.91
-476.671 447.618
-261.403 221.836
-233.697 457.136
-411.555 539.895
-409.296 276.188
-70.7453 449.407
-232.469 230.32
-117.296 218.711
-414.377 481.512
-251.015 106.431
-216.794 133.203
-115.478 535.132
-53.1221 300.445
-404.596 193.429
-55.0423 456.826
-244.526 206.255
-302.75 178.058
-79.3716 488.282
-263.151 24.5022
-185.136 481.373
-392.636 459.495
-262.404 141.224
-410.079 241.479
-181.948 505.112
-457.163 248.172
-108.356 372.729
-273.422 50.5933
-377.983 335.555
-16.3512 390.471
-194.12 67.1838
-328.93 544.547
-424.599 525.038
-264.562 355.55
-398.481 319.705
-404.405 75.7698
-252.51 95.7316
-225.156 202.478
-190.719 491.261
-63.8496 282.487
-53.3258 402.63
-461.229 252.213
-402.702 539.329
-98.6641 236.863
-146.655 560.134
-260.302 43.6797
-75.1034 178.932
-384.938 455.23
-287.381 95.5822
-458.213 398.085
-7.5998 336.287
-117.48 331.187
-13.3796 343.608
-87.116 146.468
-327.723 34.0583
-447.6 124.901
-105.138 305.47
-486.6 328.98
-195.709 58.0154
-191.929 169.069
-61.5755 405.683
-385.519 265.908
-430.157 477.936
-433.602 157.489
-328.411 552.619
-208.493 545.347
-457.958 374.106
-93.5026 447.134
-224.635 128.731
-271.816 226.782
-208.66 462.727
-79.7239 181.232
-446.319 459.41
-314.366 464.462
-195.439 481.912
-261.617 560.401
-127.587 508.211
-421.856 243.683
-272.311 405.471
-182.316 509.26
-103.888 488.377
-366.646 560.341
-421.426 89.6419
-189.295 468.555
-78.5855 118.399
-210.367 536.859
-328.709 558.33
-100.395 327.252
-439.549 480.51
-460.642 382.684
-265.192 388.441
-214.094 481.458
-437.965 385.37
-41.5907 291.219
-436.63 255.972
-388.763 322.623
-132.763 79.7564
-409.509 246.977
-309.888 498.517
-244.084 78.9951
-44.1035 176.185
-49.1329 292.683
-108.421 311.607
-439.522 180.823
-481.778 218.333
-466.826 175.958
-418.715 128.677
-431.612 188.377
-183.271 414.024
-208.333 87.7134
-379.697 188.068
-369.296 190.584
-187.701 399.856
-9.98718 298.553
-196.721 180.439
-95.2853 146.484
-226.463 446.751
-260.137 526.555
-109.539 269.462
-112.535 72.6033
-264.318 345.397
-239.765 221.078
-382.751 166.065
-78.7796 291.535
-484.608 280.955
-191.56 496.399
-270.984 242.32
-3.24212 324.624
-254.951 87.6171
-226.416 472.999
-228.223 141.875
-23.2918 386.176
-360.535 418.837
-385.926 55.1826
-451.982 464.536
-183.349 392.442
-253.371 133.44
-28.5465 278.089
-457.854 137.878
-353.726 383.135
-409.006 302.525
-461.569 450.54
-220.181 200.023
-95.8389 372.161
-379.567 225.57
-393.616 326.37
-325.228 464.699
-201.895 530.208
-86.8182 246.815
-502.568 348.249
-387.206 262.678
-501.107 366.178
-378.053 162.165
-345.374 39.5113
-483.952 261.342
-244.346 407.635
-502.362 396.452
-187.431 164.74
-277.666 133.19
-343.118 429.955
-396.358 554.643
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before103 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before103
deleted file mode 100644
index 2b499ec..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before103
+++ /dev/null
@@ -1,1313 +0,0 @@
-392.54 459.067
-306.192 522.231
-131.226 39.1846
-382.074 458.528
-380.719 233.667
-239.3 461.28
-308.641 18.5001
-393.841 278.581
-149.859 585.563
-54.8527 456.917
-437.185 512.873
-443.831 385.687
-354.441 555.147
-101.122 280.961
-54.3078 488.32
-272.805 451.387
-178.98 12.3424
-424.245 269.929
-134.164 498.608
-67.4176 464.267
-263.206 9.21893
-379.591 225.549
-271.497 526.459
-97.5481 134.312
-272.265 472.24
-261.648 342.26
-13.8065 292.135
-317.193 161.335
-408.911 99.7607
-192.713 129.005
-495.895 366.559
-116.509 479.846
-484.925 441.765
-232.905 457.731
-415.255 291.731
-229.633 479.26
-119.248 51.3531
-198.727 567.895
-437.382 477.365
-191.893 563.686
-216.737 538.885
-358.735 159.108
-101.061 366.246
-377.762 173.643
-269.187 365.608
-129.322 178.59
-126.499 559.555
-45.8643 481.161
-253.665 146.581
-279.667 22.8065
-386.927 464.045
-260.75 527.555
-257.398 95.4684
-187.925 569.622
-105.983 539.594
-223.884 535.509
-328.956 544.52
-326.439 502.471
-58.3538 112.146
-224.009 522.507
-168.582 581.602
-400.291 469.52
-95.7626 259.619
-108.002 136.423
-236.807 341.784
-112.572 57.9067
-140.634 83.6723
-95.168 388.783
-343.23 430.077
-299.733 454.547
-123.57 568.866
-461.129 336.925
-302.074 498.52
-247.377 497.75
-43.3154 407.206
-411.185 226.294
-117.668 229.081
-263.638 242.376
-231.44 239.821
-79.2148 95.0628
-126.121 41.8795
-77.6026 402.442
-71.6301 489.882
-48.0923 402.494
-106.389 187.409
-232.334 50.7079
-244.163 324.598
-251.488 321.646
-108.521 389.755
-482.534 332.778
-261.107 112.32
-93.6594 398.611
-412.409 539.796
-246.084 532.389
-387.208 239.911
-245.278 46.9262
-205.253 481.418
-97.3313 490.093
-95.6061 278.141
-368.332 175.979
-303.221 18.4666
-392.527 84.7279
-181.877 509.11
-209.667 532.919
-170.466 426.256
-108.47 384.628
-366.937 158.044
-333.896 543.402
-168.388 574.495
-123.034 513.954
-342.27 488.137
-179.324 388.116
-156.154 439.571
-299.26 165.798
-208.918 591.117
-257.506 516.342
-95.2184 205.112
-213.237 91.0746
-70.186 449.518
-219.772 143.851
-399.656 203.424
-251.47 212.417
-23.38 164.055
-151.544 518.194
-436.087 249.178
-264.423 580.886
-248.603 146.457
-96.2018 199.287
-30.3617 188.039
-251.768 507.909
-339.434 380.476
-251.048 201.798
-307.293 173.858
-335.81 484.158
-191.274 583.109
-215.291 485.561
-461.938 450.254
-37.0677 411.264
-357.466 403.169
-302.729 178.069
-268.496 82.465
-221.295 204.343
-317.145 164.769
-465.694 211.97
-293.858 460.011
-3.34601 311.714
-388.141 335.985
-437.923 385.347
-422.521 153.55
-112.661 326.107
-145.961 49.974
-445.328 240.635
-261.659 497.947
-230.086 42.3392
-502.5 355.135
-236.961 150.795
-30.6626 450.99
-142.295 46.2136
-393.443 326.613
-353.739 155.989
-326.698 415.239
-217.644 112.525
-223.402 91.5517
-415.552 505.773
-287.831 495.128
-420.697 519.236
-314.337 464.467
-458.069 374.037
-345.372 39.4715
-259.453 43.4367
-376.972 207.078
-222.868 515.103
-446.843 125.012
-312.106 506.284
-196.486 62.2656
-58.1555 143.489
-136.538 40.7196
-190.428 481.53
-483.878 261.267
-295.939 99.9565
-207.443 90.4801
-404.397 289.176
-37.9737 287.617
-382.508 564.415
-74.4172 143.057
-23.5096 171.364
-37.5104 294.959
-374.176 50.0326
-202.396 468.281
-108.714 317.347
-395.628 170.321
-95.852 372.194
-183.37 487.061
-168.981 379.49
-348.919 374.891
-328.006 566.138
-50.9289 407.661
-463.394 372.921
-473.852 257.5
-372.827 210.226
-397.747 81.6133
-159.33 52.3532
-273.249 50.5789
-357.413 425.95
-399.825 512.659
-463.16 164.207
-241.63 73.729
-448.675 191.432
-103.312 481.721
-402.129 271.156
-335.404 420.128
-117.178 191.323
-218.669 533.351
-105.355 335.614
-111.71 477.777
-288.889 123.255
-206.858 59.1414
-222.253 436.273
-61.6713 399.2
-261.402 221.764
-393.849 219.087
-304.514 513.996
-375.546 160.027
-195.065 95.7265
-244.824 517.309
-45.5444 123.387
-270.747 39.6983
-220.637 542.916
-436.428 247.244
-252.181 95.8251
-100.5 327.374
-62.4958 488.574
-213.852 454.425
-222.629 246.794
-17.3984 380.477
-240.588 465.287
-288.969 380.803
-91.7795 136.419
-399.412 297.526
-114.667 146.286
-413.004 84.4419
-391.569 236.801
-270.103 49.8507
-199.366 587.529
-396.092 505.572
-397.206 275.694
-428.164 181.728
-236.348 567.634
-18.5478 343.713
-245.108 87.0425
-107.417 146.514
-453.642 471.828
-470.465 178.109
-84.525 283.122
-264.848 458.868
-229.216 537.528
-133.254 552.352
-235.693 449.199
-226.031 482.783
-260.146 86.9854
-12.9738 396.717
-123.27 61.3398
-176.632 482.753
-207.126 115.87
-43.5094 136.924
-299.352 461.169
-350.661 552.77
-463.99 392.842
-147.691 512.395
-167.834 568.405
-213.31 90.9098
-354.347 151.382
-186.756 395.636
-249.49 438.163
-407.02 229.413
-42.989 298.511
-12.0711 367.859
-181.885 505.324
-103.804 54.8595
-266.796 35.722
-106.853 262.627
-348.339 433.51
-251.27 106.957
-148.504 411.108
-33.6297 442.953
-244.428 212.227
-423.855 225.692
-268.683 409.253
-193.69 551.622
-264.556 531.201
-100.112 187.522
-488.992 264.898
-412.93 221.562
-261.613 240.085
-395.546 509.811
-117.4 218.843
-81.7495 146.404
-435.079 381.051
-176.494 166.686
-291.601 577.712
-207.923 188.837
-199.787 530.345
-406.763 74.3104
-138.336 76.3324
-304.287 458.389
-293.983 500.641
-187.98 96.5916
-377.927 230.819
-244.899 555.772
-79.8621 108.452
-492.739 412.961
-357.572 433.19
-449.318 183.513
-95.6761 539.788
-285.65 501.702
-52.191 179.539
-237.662 61.7637
-236.444 351.435
-385.227 193.165
-181.972 390.515
-155.902 54.6606
-200.87 59.4965
-177.012 420.689
-227.907 473.356
-337.68 373.435
-198.174 500.055
-195.258 91.2688
-7.41744 335.269
-0 0
-91.6573 305.152
-261.295 483.28
-234.784 385.096
-93.3841 187.573
-200.214 495.014
-31.6208 283.448
-76.273 521.56
-255.883 26.6937
-123.505 334.358
-470.603 170.108
-385.442 55.1289
-424.572 525.025
-100.943 539.452
-141.323 508.654
-439.437 479.947
-244.789 441.084
-232.376 217.949
-209.781 488.322
-324.533 497.818
-102.723 136.549
-286.578 577.567
-392.357 538.862
-251.4 112.516
-289.095 374.378
-426.439 157.257
-262.437 95.2889
-459.48 160.179
-35.8093 438.698
-390.011 316.991
-148.932 430.522
-30.6281 405.508
-449.097 388.505
-215.302 237.466
-287.915 526.404
-244.358 407.725
-195.261 481.711
-159.749 583.478
-455.315 235.52
-396.516 301.624
-330.006 418.99
-111.271 337.176
-197.505 572.712
-422.021 243.666
-481.276 216.843
-362.437 46.1903
-502.558 362.814
-244.579 271.053
-438.915 157.477
-244.374 65.9126
-357.492 397.24
-148.92 529.071
-398.574 535.613
-307.087 571.926
-89.8007 280.807
-258.294 32.2457
-272.51 91.2032
-238.955 80.3996
-87.0641 246.855
-244.355 53.5083
-196.967 525.547
-434.966 150.684
-226.411 446.687
-37.707 184.305
-248.689 275.286
-410.208 515.415
-192.09 8.1945
-416.888 288.837
-276.538 526.524
-285.81 532.713
-335.572 386.675
-106.052 281.747
-457.548 191.52
-109.109 304.509
-229.273 91.2742
-282.746 27.292
-227.521 208.774
-81.7408 297.772
-600 600
-208.604 86.6679
-87.4145 98.1253
-15.4745 375.074
-385.185 455.107
-405.297 219.417
-120.892 188.456
-461.218 252.224
-308.94 485.627
-97.1846 323.078
-325.378 400.825
-417.81 229.898
-276.047 239.235
-231.713 570.23
-479.107 287.75
-122.327 222.44
-382.702 221.61
-491.398 333.497
-492.552 305.425
-139.66 502.411
-492.264 300.474
-223.495 378.241
-108.392 311.476
-135.763 68.8958
-339.258 39.4943
-486.716 329.053
-92.5158 291.955
-57.454 178.795
-191.492 496.482
-484.94 370.902
-466.794 205.037
-480.542 446.719
-244.512 206.232
-290.561 30.2145
-162.392 573.658
-379.188 498.591
-337.417 425.325
-83.7543 74.9655
-109.82 488.497
-115.672 484.721
-20.6706 291.018
-251.488 214.213
-198.663 483.819
-85.2927 68.2236
-113.017 73.6835
-261.531 560.395
-336.61 492.129
-473.51 377.398
-427.799 150.169
-225.451 240.965
-89.3594 315.426
-436.821 110.433
-311.35 475.916
-311.35 512.801
-115.605 137.017
-240.207 548.157
-243.436 469.485
-184.801 586.071
-417.453 255.769
-139.34 550.072
-450.634 246.015
-389.776 531.976
-418.25 221.451
-376.934 167.406
-278.333 584.45
-92.9477 491.233
-422.305 474.029
-27.1098 445.457
-197.075 180.466
-236.699 106.129
-421.493 280.41
-460.915 382.42
-410.003 295.696
-496.776 381.339
-35.7475 274.268
-277.666 116.592
-245.005 228.285
-377.685 227.836
-28.8266 147.055
-74.4909 287.475
-434.934 126.332
-98.0131 236.624
-484.718 280.84
-409.513 246.966
-337.944 546.927
-458.288 398.126
-383.57 336.651
-245.742 254.821
-322.174 396.377
-262.071 33.7119
-111.58 263.318
-421.793 383.504
-291.611 91.1421
-187.719 400.114
-395.943 61.3301
-215.204 64.2406
-358.027 406.078
-244.857 202.149
-422.477 98.0356
-200.942 117.282
-483.676 377.663
-122.345 224.569
-391.177 55.9406
-483.68 291.385
-262.36 141.18
-279.52 95.3869
-497.943 386.929
-264.452 434.195
-37.0415 405.502
-70.8647 283.986
-331.73 500.42
-121.321 46.3721
-0 600
-281.705 526.541
-496.443 392.346
-264.734 413.397
-246.746 330.2
-144.323 540.708
-119.285 518.948
-256.359 523.494
-183.449 392.545
-396.147 262.615
-24.5864 386.091
-251.454 222.423
-456.228 131.557
-394.056 530.396
-244.515 420.347
-229.23 33.7375
-84.8505 488.539
-230.27 53.5013
-401.315 292.865
-491.056 366.657
-232.642 545.819
-384.395 97.4951
-415.371 240.126
-444.11 183.481
-388.248 498.791
-293.915 171.771
-133.06 80.1196
-488.98 430.394
-387.587 87.3477
-254.983 87.6888
-227.201 149.767
-33.1233 139.04
-272.301 400.508
-221.264 588.156
-102.319 291.52
-479.543 281.577
-329.037 388.456
-156.43 378.331
-357.449 388.155
-240.847 564.355
-236.987 539.497
-233.539 116.901
-261.543 227.064
-438.358 128.95
-44.3158 476.576
-374.572 191.583
-254.457 46.3727
-129.078 191.983
-67.9989 146.426
-379.967 96.2378
-6.69899 307.33
-250.548 258.509
-293.575 24.5122
-304.524 508.301
-409.018 276.609
-115.909 534.822
-438.905 377.552
-420.507 510.422
-100.118 377.2
-70.2255 402.721
-224.209 128.852
-409.117 302.409
-117.609 331.292
-472.63 341.134
-31.3033 411.319
-274.821 535.303
-112.926 300.261
-431.382 381.205
-271.87 226.848
-424.673 239.056
-268.68 396.744
-189.801 459.821
-3.53305 318.609
-146.363 535.777
-89.1654 456.86
-315.668 485.188
-76.6641 105.952
-244.215 259.413
-360.525 419.04
-23.6093 181.566
-410.065 241.505
-404.388 193.836
-41.9099 402.67
-37.6821 456.928
-108.97 230.206
-377.482 327.764
-95.4271 255.03
-266.662 8.94392
-69.9585 510.242
-99.7573 398.475
-112.406 63.9928
-452.818 126.376
-72.6699 514.788
-188.639 92.026
-50.2832 485.314
-162.198 579.057
-294.532 449.178
-251.927 520.612
-226.235 112.508
-89.2392 232.098
-497.558 339.499
-225.998 580.086
-328.665 558.447
-468.624 166.871
-392.117 229.918
-386.423 277.967
-245.413 489.627
-16.8034 426.718
-101.787 266.453
-144.012 546.19
-22.5091 405.57
-172.37 16.788
-403.062 515.478
-314.827 159.61
-404.892 471.685
-110.108 212.707
-266.568 133.263
-414.369 481.497
-76.4097 464.655
-96.6775 450.214
-236.471 526.727
-151.421 400.129
-389.855 509.435
-212.676 533.438
-319.552 464.504
-148.598 405.016
-317.034 573.551
-189.164 468.56
-442.298 249.418
-155.12 27.2974
-57.3047 402.455
-320.296 498.582
-244.501 425.867
-196.317 468.494
-402.391 505.522
-275.464 487.579
-82.2895 404.732
-457.122 453.878
-123.354 563.594
-236.993 404.58
-273.702 80.1664
-295.08 499.199
-157.704 21.3108
-324.132 30.0384
-251.289 546.701
-108.328 372.655
-424.452 276.156
-265.232 388.42
-305.377 467.445
-187.35 122.564
-416.709 101.569
-389.844 93.1782
-32.5702 455.859
-103.683 488.368
-23.1987 382.906
-492.566 320.62
-294.939 18.5827
-474.791 366.373
-201.339 522.225
-431.324 385.785
-201.054 182.065
-108.906 55.3735
-361.831 153.57
-370.837 104.693
-204.727 531.632
-244.617 434.423
-253.587 116.739
-390.891 559.722
-187.11 500.282
-80.4504 462.436
-491.867 324.21
-264.994 131.585
-477.245 332.375
-115.303 212.947
-415.689 96.1122
-281.207 381.61
-276.394 234.675
-492.321 426.397
-184.064 467.616
-421.642 88.7213
-272.975 467.255
-353.028 437.726
-451.272 490.154
-228.612 516.604
-107.046 219.175
-375.74 564.399
-174.169 387.056
-236.254 362.897
-470.445 336.431
-56.193 405.934
-123.199 574.813
-216.582 86.4629
-62.1808 146.453
-261.117 531.561
-151.677 387.992
-383.394 509.322
-21.0986 416.648
-457.991 137.919
-90.0835 401.726
-420.877 236.227
-208.857 182.13
-296.926 575.636
-471.308 212.745
-218.32 91.3132
-96.4727 211.66
-207.258 526.654
-213.857 62.5507
-281.555 577.421
-436.609 256.078
-368.868 165.505
-188.551 509.469
-427.127 219.159
-236.584 101.185
-309.888 498.517
-122.177 178.644
-26.916 346.87
-200.333 71.4455
-247.47 512.569
-250.004 225.288
-77.0637 529.971
-82.7561 242.681
-328.411 552.586
-257.53 264.139
-396.795 89.2237
-401.551 477.475
-4.0044 331.048
-97.3695 485.112
-3.37535 324.791
-50.3722 293.412
-127.949 553.827
-200.88 96.6542
-293.147 455.894
-276.488 495.637
-448.326 157.485
-463.34 191.323
-287.081 486.103
-380.847 324.657
-264.892 587.476
-454.368 377.395
-85.5 459.956
-454.325 183.572
-130.745 579.093
-230.364 137.358
-211.079 443.961
-464.3 207.732
-437.615 242.946
-301.704 568.853
-444.726 454.853
-186.762 8.64964
-24.1438 158.963
-395.221 213.612
-134.495 181.168
-155.463 382.583
-327.852 34.1895
-446.78 474.476
-379.136 50.7508
-249.122 500.275
-234.102 54.506
-281.902 128.981
-269.249 446.143
-236.704 390.001
-401.223 77.5367
-214.328 481.328
-114.217 180.997
-280.673 535.471
-93.071 453.725
-196.244 578.69
-280.834 87.1198
-107.005 291.886
-424.155 531.19
-427.305 485.605
-53.9999 136.081
-272.987 230.943
-212.409 185.652
-395.742 235.243
-112.403 320.471
-353.789 383.332
-261.433 477.652
-272.721 133.549
-203.546 489.407
-216.268 440.796
-75.088 178.875
-84.3334 449.413
-217.17 17.8593
-492.501 312.815
-393.34 178.995
-225.136 202.368
-392.346 186.163
-360.448 410.262
-287.246 87.7539
-233.104 400.671
-66.2111 175.71
-385.552 265.625
-53.3526 402.598
-243.47 339.61
-385.131 197.158
-119.718 57.5018
-187.15 575.021
-317.115 505.384
-251.398 329.457
-471.295 449.357
-95.8389 229.183
-492.518 420.506
-460.356 232.088
-109.639 184.241
-389.798 210.531
-410.393 505.489
-440.815 113.832
-276.243 44.1633
-114.27 343.499
-379.612 102.411
-209.099 71.5262
-51.9736 139.895
-257.534 504.611
-404.647 307.176
-120.58 71.2595
-242.957 406.023
-159.699 45.0966
-73.1669 116.855
-356.756 438.51
-409.493 473.85
-216.492 453.419
-243.281 146.533
-255.74 532.544
-263.423 125.844
-183.849 554.88
-252.908 267.444
-212.01 191.749
-332.828 496.404
-263.498 146.04
-42.6268 274.762
-257.261 137.62
-148.469 425.985
-93.5577 447.165
-432.468 221.128
-27.2893 154.262
-264.661 441.595
-197.326 8.8813
-64.7782 112.873
-483.174 336.545
-31.1368 436.371
-240.554 67.5235
-279.71 500.517
-270.922 242.329
-275.234 367.21
-87.7153 494.677
-196.487 504.319
-246.594 319.142
-128.304 72.8463
-396.685 547.061
-186.945 410.068
-433.671 195.073
-115.914 271.905
-192.106 169.224
-369.289 190.55
-265.339 474.409
-429.589 121.479
-265.627 526.958
-265.582 46.6297
-293.097 527.568
-272.302 589.084
-276.422 50.0064
-183.739 461.836
-164.633 435.434
-372.747 183.657
-476.582 447.598
-454.083 157.481
-10.3987 298.344
-103.888 329.803
-501.176 366.125
-452.638 465.287
-84.0123 86.8635
-251.761 334.907
-418.322 260.666
-84.8665 110.372
-393.742 205.029
-183.194 163.392
-264.362 392.275
-216.576 133.3
-85.3277 233.368
-324.256 573.647
-108.278 396.465
-325.259 464.713
-387.31 262.664
-327.654 493.639
-479.308 257.653
-408.42 274.865
-116.579 307.394
-86.5636 92.4192
-466.392 257.26
-468.719 380.913
-215.91 231.2
-215.585 476.406
-49.5349 469.097
-219.082 374.639
-396.255 554.853
-103.474 197.841
-244.518 484.849
-478.501 337.505
-62.9553 467.128
-470.585 286.484
-314.84 522.57
-95.9322 383.652
-302.426 484.555
-91.752 367.472
-184.82 550.593
-13.2126 343.604
-466.261 343.623
-157.963 588.832
-441.235 116.918
-417.317 249.734
-350.394 39.483
-324.989 476.003
-303.38 568.673
-244.565 72.0847
-311.653 573.537
-187.32 164.664
-104.718 368.62
-251.544 207.265
-251.563 539.849
-189.538 180.272
-337.171 382.834
-273.351 386.234
-271.864 12.332
-188.277 559.158
-80.0426 118.653
-79.0518 291.821
-277.671 133.187
-83.0496 394.38
-198.122 557.861
-320.021 25.768
-228.591 440.301
-429.114 262.494
-292.493 531.934
-21.1417 355.03
-385.431 273.045
-401.252 229.435
-460.242 343.304
-445.542 146.589
-100.748 146.475
-152.999 39.2606
-148.531 417.691
-76.7752 449.545
-377.341 502.981
-131.621 187.049
-287.49 95.5884
-394.174 543.234
-219.841 217.022
-264.495 424.504
-7.55155 301.516
-228.443 543.446
-41.5194 460.349
-429.361 103.697
-261.392 573.717
-446.762 377.537
-422.661 121.944
-21.111 431.407
-241.123 445.066
-235.869 519.026
-264.319 345.405
-222.001 469.197
-280.708 485.348
-232.522 236.28
-221.643 21.8597
-486.202 272.119
-472.36 235.459
-406.559 481.238
-27.5935 280.895
-292.814 180.044
-41.0413 290.926
-112.801 283.322
-460.622 388.374
-256.634 337.722
-31.3292 275.603
-234.281 84.4773
-171.941 588.284
-267.781 216.244
-400.443 315.529
-379.748 188.07
-452.973 391.886
-191.308 405.277
-450.337 449.36
-236.574 356.707
-152.906 438.918
-230.988 366.853
-7.9452 342.614
-166.4 429.074
-113.906 477.571
-261.495 232.132
-256.128 511.229
-63.7667 282.454
-253.969 125.379
-112.533 448.22
-487.961 295.621
-319.97 481.026
-502.568 348.228
-210.58 133.446
-241.017 263.424
-95.2853 146.486
-298.251 178.862
-119.842 528.409
-403.596 177.778
-435.589 260.977
-262.142 213.635
-239.978 111.131
-212.115 14.2717
-272.308 405.479
-296.342 93.0088
-343.962 372.122
-200.417 562.994
-122.929 342.925
-264.455 352.452
-110.241 443.176
-75.7637 146.399
-264.567 355.559
-72.3193 96.9978
-415.517 518.06
-396.34 309.567
-395.619 197.484
-80.6743 498.689
-464.616 449.547
-422.205 481.587
-215.177 590.146
-80.0102 80.517
-325.41 392.538
-382.819 166.109
-90.6882 536.717
-304.534 519.373
-16.5446 421.758
-65.2906 504.321
-269.904 532.682
-165.448 18.4022
-93.4268 59.4327
-17.3146 388.921
-236.101 92.3396
-311.158 470.709
-462.46 183.294
-127.354 509.194
-240.677 531.97
-401.546 254.489
-25.89 414.669
-453.442 145.28
-447.482 484.826
-264.781 455.102
-289.248 448.83
-224.46 214.497
-86.4995 299.257
-151.214 31.981
-109.386 269.332
-76.2378 389.951
-407.876 84.461
-310.398 158.371
-404.671 280.64
-204.102 11.8099
-417.934 128.35
-66.1271 139.77
-87.3153 311.94
-142.891 584.133
-226.238 85.8821
-372.842 213.699
-479.534 366.919
-502.213 341.96
-66.1522 452.754
-433.595 157.515
-405.302 69.4853
-29.2454 293.769
-388.947 454.358
-250.26 19.5383
-38.91 137.653
-281.602 373.166
-103.394 448.297
-325.564 471.816
-211.106 112.527
-301.663 160.281
-167.451 374.071
-190.922 491.521
-162.004 373.478
-456.875 247.937
-470.261 192.403
-481.589 224.447
-52.0312 300.584
-430.924 225.199
-183.261 414.026
-86.952 116.08
-431.553 188.289
-422.199 186.353
-223.99 485.175
-219.48 223.012
-422.867 129.507
-62.2907 405.647
-428.15 129.688
-60.0997 454.653
-254.069 550.38
-440.686 510.124
-188.95 119.268
-177.96 163.918
-176.745 172.515
-442.117 195.633
-370.271 46.634
-202.113 178.36
-208.891 462.473
-355.652 39.545
-244.546 414.112
-392.835 313.125
-69.0744 395.437
-232.503 224.69
-199.992 452.397
-227.547 380.752
-392.164 464.59
-390.217 166.846
-424.929 263.499
-444.117 504.719
-442.122 450.257
-471.409 367.795
-251.2 128.705
-204.142 589.323
-446.349 459.443
-303.584 159.696
-226.281 572.509
-378.183 201.644
-57.9695 468.467
-475.769 215.109
-227.508 452.932
-225.807 27.1216
-418.23 473.359
-228.461 141.728
-311.585 498.499
-430.025 253.829
-342.895 551.407
-434.408 121.404
-179.233 593.835
-472.175 281.652
-279.412 371.984
-487.668 435.334
-87.1161 146.467
-403.818 188.299
-12.857 359.165
-372.335 98.8334
-111.842 295.72
-264.45 418.183
-195.313 121.48
-86.046 138.44
-46.6629 181.12
-85.1537 532.797
-440.245 149.608
-335.389 36.3723
-331.034 489.934
-252.919 132.997
-502.539 405.052
-86.3242 187.227
-426.821 518.616
-261.1 553.516
-242.101 216.655
-477.824 232.274
-230.673 148.1
-150.134 54.0748
-93.0269 219.12
-219.377 227.372
-278.995 14.8839
-202.81 133.281
-49.561 460.581
-181.502 177.549
-49.7358 115.215
-93.4485 319.394
-218.793 519.6
-426.774 256.959
-110.799 539.072
-311.362 168.546
-105.994 398.388
-23.4637 176.39
-429.063 477.851
-307.141 498.523
-199.864 129.664
-104.535 445.06
-339.889 480.128
-79.7597 181.314
-301.773 504.578
-266.32 91.8045
-221.667 453.597
-402.136 84.6725
-307.261 480.435
-442.782 477.247
-283.343 119.813
-352.756 378.685
-600 0
-217.627 71.1791
-325.547 405.995
-447.141 499.241
-46.6941 277.984
-391.611 331.654
-400.143 219.556
-502.348 396.376
-192.224 65.6811
-219.964 200.011
-481.278 230.938
-151.538 391.188
-196.656 171.625
-261.49 567.488
-264.455 114.827
-403.036 64.223
-308.3 460.591
-422.563 515.246
-219.884 241.892
-377.975 335.542
-325.476 411.686
-393.43 504.533
-473.432 199.458
-98.7798 54.8451
-398.632 319.527
-402.464 539.294
-89.5096 394.422
-388.757 322.621
-84.9586 290.713
-322.883 505.482
-184.92 481.35
-59.0662 137.263
-89.0298 63.8454
-116.691 142.924
-261.06 492.174
-247.733 494.568
-247.879 476.357
-82.4261 142.384
-110.627 191.679
-434.282 180.342
-229.929 213.579
-69.6101 178.282
-103.515 235.614
-232.47 230.321
-383.217 91.6883
-420.012 84.7315
-106.011 449.616
-79.0404 488.306
-468.218 236.788
-430.976 484.509
-403.644 261.035
-398.508 178.468
-283.265 492.311
-203.823 448.846
-377.767 216.977
-244.518 59.6486
-128.128 502.406
-361.13 559.312
-236.271 396.423
-55.8858 281.209
-195.067 456.402
-25.2843 436.375
-48.4689 132.372
-229.144 524.227
-12.5837 400.574
-71.7042 498.063
-314.379 22.3509
-96.5321 294.574
-225.415 372.347
-267.97 359.049
-268.951 223.985
-343.959 483.527
-101.311 219.615
-233.34 132.587
-467.415 180.576
-269.049 463.116
-215.681 469.184
-108.512 379.539
-491.953 374.335
-17.6334 405.045
-137.85 580.814
-151.225 524.306
-257.574 488.112
-255.711 14.0395
-270.251 116.725
-478.603 377.47
-112.742 276.713
-431.97 517.712
-499.956 407.138
-435.592 105.213
-89.3184 485.897
-128.527 66.5404
-367.458 560.391
-239.774 221.083
-105.144 305.616
-399.608 187.733
-409.005 252.493
-378.004 162.198
-201.735 86.7661
-244.59 78.758
-317.938 518.722
-450.803 237.577
-439.419 180.79
-418.255 537.132
-278.473 381.76
-95.5919 249.752
-94.7492 243.362
-247.509 200.494
-362.975 159.901
-246.988 100.307
-401.641 173.093
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before106 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before106
deleted file mode 100644
index ad4ec2b..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before106
+++ /dev/null
@@ -1,1323 +0,0 @@
-261.192 112.303
-211.066 443.965
-95.7601 259.612
-460.955 382.388
-463.982 392.844
-226.267 112.516
-426.838 256.926
-205.162 481.432
-151.219 32.2071
-442.157 195.628
-264.495 424.504
-87.0887 246.863
-396.069 505.569
-457.549 191.516
-393.201 179.08
-187.091 575.261
-186.804 395.703
-244.635 434.487
-442.765 477.279
-353.794 383.37
-383.539 336.65
-384.194 97.5882
-107.059 219.166
-421.65 88.7085
-451.168 489.889
-268.683 409.253
-106.149 449.642
-191.315 405.262
-242.992 406.03
-109.039 230.176
-199.974 452.415
-128.106 502.456
-356.764 438.498
-202.08 178.335
-401.545 254.489
-415.519 518.067
-408.995 276.652
-203.787 448.87
-232.601 23.5625
-200.264 494.948
-307.141 498.522
-299.295 165.743
-251.425 321.432
-101.776 266.446
-99.7569 398.475
-407.047 229.406
-337.647 373.524
-151.245 524.261
-251.413 329.461
-103.263 481.737
-86.3866 187.254
-404.677 280.611
-244.591 78.4634
-259.39 43.4303
-431.92 517.742
-247.713 494.437
-415.319 291.677
-197.044 525.515
-492.35 426.399
-215.345 237.643
-215.107 64.4115
-93.5414 447.173
-232.52 236.31
-231 366.848
-225.459 240.964
-220.499 13.2924
-249.542 438.144
-183.26 414.025
-12.9207 396.817
-243.263 146.538
-303.574 159.698
-116.677 142.915
-442.257 249.43
-25.2695 436.364
-181.512 177.558
-383.177 91.7101
-328.655 558.463
-360.443 410.222
-492.551 305.422
-50.9837 407.652
-229.125 524.528
-119.317 518.82
-108.325 372.647
-410.395 505.49
-261.659 342.271
-115.296 212.943
-393.854 278.578
-466.757 205.081
-96.6579 449.996
-432.425 221.068
-80.2231 118.641
-69.0254 395.475
-244.992 228.293
-10.5117 298.274
-172.115 16.9162
-181.859 509.095
-276.394 234.676
-155.986 54.6217
-436.867 110.57
-407.137 74.054
-129.315 178.59
-392.017 229.925
-66.1406 452.772
-122.35 222.462
-386.942 464.056
-227.542 380.751
-348.897 374.866
-329.983 418.98
-378.003 162.21
-237.498 61.8432
-111.748 477.765
-438.841 377.571
-225.967 580.492
-165.338 18.4001
-350.78 552.779
-222.061 469.202
-244.355 53.4827
-480.489 446.771
-116.585 307.408
-80.7127 498.674
-288.969 380.803
-253.858 550.279
-307.09 571.925
-198.166 500.054
-394.1 543.167
-54.8134 456.934
-252.895 267.443
-6.8194 307.179
-472.019 281.699
-105.349 335.62
-49.5976 460.574
-24.0469 159.084
-391.153 55.9299
-358.002 406.041
-600 600
-343.725 372.043
-263.417 125.834
-454.385 377.401
-502.351 396.377
-467.459 180.546
-314.328 464.467
-481.246 231.034
-262.353 141.173
-79.7145 108.398
-96.5183 294.579
-72.639 514.776
-97.3332 490.101
-103.486 197.835
-435.559 260.978
-293.179 455.929
-147.698 512.407
-399.587 187.705
-285.638 501.683
-397.202 275.696
-122.205 178.64
-468.208 236.778
-200.282 71.4502
-395.525 509.805
-280.627 485.352
-144.087 546.083
-134.494 181.165
-303.219 18.4387
-491.076 366.653
-144.319 540.547
-208.927 462.425
-399.5 297.501
-277.291 83.6078
-17.4691 388.739
-244.496 425.868
-329.053 388.446
-385.241 193.171
-76.7686 106.152
-394.061 530.4
-31.3739 275.373
-145.958 49.9748
-388.93 454.36
-95.5926 249.733
-430.032 253.818
-236.699 389.927
-190.947 491.548
-414.366 481.51
-502.555 362.853
-264.825 458.829
-114.174 181.013
-215.881 231.238
-379.596 225.545
-45.5794 123.199
-431.294 381.203
-200.713 59.5274
-231.435 239.823
-63.7484 282.447
-181.879 505.337
-367.025 158.094
-156.188 439.563
-256.014 26.8188
-502.215 341.962
-427.293 485.585
-420.527 510.447
-427.533 150.197
-492.561 320.634
-95.8526 372.198
-377.748 216.951
-197.65 572.752
-460.589 388.293
-281.215 381.61
-26.9487 346.892
-219.363 227.406
-83.996 86.851
-117.629 331.311
-95.9144 383.706
-120.875 188.458
-444.082 183.475
-241.663 73.7423
-213.666 62.3895
-84.8181 110.289
-392.547 84.7176
-387.62 87.3263
-152.913 438.931
-437.191 512.868
-238.374 540.436
-496.733 381.188
-151.666 387.989
-401.28 292.85
-421.484 280.426
-492.271 300.491
-229.931 213.586
-236.455 567.613
-402.993 515.465
-62.1334 146.439
-30.6655 451.028
-298.255 178.861
-402.442 539.321
-304.542 519.419
-55.8673 281.206
-59.0595 137.264
-159.625 44.8529
-195.882 579.306
-427.986 181.684
-117.213 191.313
-232.74 545.943
-379.139 50.7369
-309.888 498.517
-464.595 449.551
-266.581 133.264
-446.709 125.031
-388.214 498.775
-426.427 382.351
-27.5776 281.295
-106.983 291.876
-244.535 72.5002
-244.723 517.429
-85.3264 233.369
-128.254 72.829
-299.719 454.529
-291.562 91.1256
-119.722 57.5378
-428.881 477.832
-191.889 563.766
-35.7135 274.303
-378.178 201.649
-240.424 548.41
-93.1299 453.773
-146.396 535.763
-375.644 160.047
-248.604 146.456
-422.189 481.581
-283.264 492.297
-32.5735 455.857
-404.688 307.093
-271.488 526.452
-272.804 451.395
-417.358 249.554
-215.255 485.561
-256.363 523.489
-396.681 546.948
-60.1298 454.637
-115.99 534.72
-398.575 535.608
-149.789 585.383
-293.841 460.019
-245.188 555.462
-221.685 453.595
-272.302 400.508
-314.366 22.3479
-236.252 362.901
-40.958 290.852
-138.36 76.352
-82.5432 142.347
-389.786 210.673
-148.531 417.691
-207.345 526.78
-66.1148 139.741
-450.314 449.356
-84.3147 449.416
-434.994 150.715
-148.924 529.031
-237.03 404.602
-80.0104 80.4646
-279.746 500.542
-446.352 459.439
-404.378 193.846
-188.544 92.0933
-409.005 252.493
-408.535 274.923
-385.347 55.099
-108.47 384.628
-12.6041 400.6
-227.21 149.768
-189.781 459.829
-418.164 537.198
-210.58 133.444
-251.452 222.444
-486.185 272.166
-348.352 433.518
-179.315 593.886
-76.7757 449.541
-325.263 464.715
-37.0663 405.496
-350.394 39.4736
-54.0013 136.098
-69.5836 178.281
-152.763 39.0354
-261.617 240.106
-123.284 61.3272
-110.099 212.71
-252.015 507.573
-251.47 212.417
-264.455 352.454
-411.175 226.29
-424.664 239.044
-230.666 148.101
-23.4612 176.391
-234.255 84.4798
-261.487 567.488
-294.678 18.6997
-479.283 257.644
-251.297 107.027
-214.336 481.321
-77.0775 529.986
-358.698 159.097
-155.44 382.684
-184.875 481.349
-261.085 492.232
-108.012 136.421
-449.084 388.496
-197.429 8.5339
-79.1012 291.873
-106.924 262.603
-423.871 225.692
-256.091 511.146
-196.291 68.4514
-437.61 477.384
-339.454 380.457
-76.232 389.95
-123.388 563.437
-136.5 40.6911
-218.038 374.975
-112.522 448.198
-465.646 211.94
-450.584 246.034
-162.452 579.227
-322.959 505.467
-218.451 533.303
-249.033 500.453
-502.526 405.116
-96.2105 199.284
-265.567 526.993
-484.937 370.898
-291.724 577.717
-244.646 271.266
-187.91 569.656
-377.482 327.763
-446.791 474.465
-395.589 197.5
-70.9105 284.004
-156.375 378.402
-245.274 46.9311
-89.0233 63.8525
-250.002 225.289
-236.575 356.71
-178.995 12.5206
-112.518 57.7242
-79.7632 181.324
-115.704 484.673
-403.645 261.029
-443.841 385.69
-42.5783 274.728
-89.1321 456.816
-357.491 397.24
-268.955 223.995
-283.34 119.809
-187.3 164.652
-437.613 242.939
-35.7185 438.625
-265.357 474.4
-311.157 470.709
-457.148 453.88
-491.914 324.153
-106.426 187.396
-140.651 83.6686
-148.913 430.469
-93.4287 59.4278
-269.954 532.695
-435.663 105.273
-187.725 400.154
-439.433 479.779
-274.847 535.315
-251.543 207.257
-487.706 435.299
-30.628 405.509
-415.385 240.118
-452.961 391.874
-74.4882 287.477
-266.76 35.7054
-227.978 473.48
-81.7264 297.767
-229.667 479.105
-183.785 554.745
-257.531 264.142
-254.536 46.3623
-276.231 44.1425
-325.376 400.82
-177.96 163.917
-392.366 538.868
-307.327 480.411
-317.192 161.341
-184.906 550.559
-311.348 475.905
-179.309 388.108
-385.219 455.084
-92.8638 219.081
-296.333 92.9871
-56.2937 405.895
-458.085 374.029
-287.955 526.41
-212.994 91.7174
-161.997 373.476
-422.694 121.937
-216.651 86.4667
-243.681 537.725
-162.008 573.975
-287.279 87.7619
-402.391 505.523
-240.598 564.466
-97.59 134.305
-82.2665 404.734
-265.237 388.417
-483.249 336.546
-293.57 24.706
-388.755 322.62
-126.578 559.448
-222.725 589.129
-484.879 441.805
-67.2575 464.279
-377.762 173.646
-112.913 300.232
-16.7806 426.666
-471.453 367.765
-139.662 502.407
-248.768 275.235
-357.417 425.918
-85.5824 459.938
-481.221 216.744
-269.273 446.167
-476.56 447.596
-447.024 499.159
-240.555 465.503
-320.313 498.576
-155.057 27.346
-228.582 516.595
-311.625 573.534
-137.932 580.849
-479.224 287.774
-292.531 531.91
-436.43 247.223
-328.413 552.578
-319.993 25.7448
-600 0
-188.896 119.257
-420.68 519.223
-497.938 386.888
-390.947 559.696
-275.449 487.613
-232.748 50.8106
-196.514 62.2863
-198.016 557.792
-43.1517 407.235
-91.6577 305.153
-272.721 133.549
-304.506 508.22
-404.879 471.734
-198.632 567.933
-219.918 200.007
-395.561 170.3
-461.217 252.226
-272.307 405.48
-150.172 54.098
-458.294 398.128
-455.291 235.545
-268.525 82.4522
-433.593 157.521
-200.951 117.274
-164.652 435.415
-257.395 95.4646
-188.52 509.482
-257.531 516.299
-27.2651 154.466
-299.316 461.143
-271.878 226.857
-335.416 420.136
-261.052 553.447
-159.753 583.416
-207.084 115.905
-270.171 49.8911
-424.568 525.011
-273.236 50.5751
-499.951 407.134
-192.122 65.5879
-245.369 489.542
-96.563 211.979
-277.654 116.594
-236.81 341.775
-128.51 66.5973
-232.502 224.69
-302.07 498.524
-97.2906 485.145
-83.1064 394.399
-46.674 181.122
-434.963 126.304
-479.477 366.892
-61.6059 399.23
-229.3 91.2903
-111.595 263.355
-241.106 445.088
-287.503 95.5887
-231.672 570.257
-97.2001 323.092
-226.048 482.8
-383.373 509.312
-43.4184 136.907
-103.883 329.792
-236.591 101.18
-270.736 39.6893
-470.673 286.544
-195.28 121.489
-20.8014 291.041
-228.791 130.693
-328.955 544.523
-232.615 52.846
-311.585 498.501
-263.646 242.377
-264.661 441.596
-278.256 584.6
-387.329 262.662
-466.417 257.27
-0 600
-52.4633 300.808
-420.883 236.226
-127.315 509.314
-374.213 50.0525
-142.812 584.158
-245.011 86.9996
-431.213 385.777
-247.533 200.492
-293.921 171.755
-73.0686 116.835
-436.6 256.099
-252.835 132.898
-243.481 469.47
-361.919 153.609
-446.762 377.533
-466.324 343.627
-170.463 426.257
-463.374 191.332
-402.123 271.161
-325.546 405.994
-302.727 178.071
-188.284 559.162
-92.5436 291.963
-222.613 246.799
-223.402 91.4666
-109.024 304.491
-84.8648 488.536
-368.891 165.518
-212.015 191.75
-380.719 233.671
-85.2513 532.837
-222.254 436.271
-108.512 379.537
-33.1429 139.037
-181.974 390.516
-422.239 473.964
-382.071 458.525
-196.652 171.615
-271.738 12.3094
-409.989 295.715
-376.973 207.08
-276.045 239.24
-290.722 30.1481
-189.137 468.56
-398.664 319.489
-33.9254 442.822
-17.3958 380.491
-37.7035 456.939
-431.038 225.168
-391.551 236.813
-71.4879 489.906
-198.581 483.819
-229.293 537.543
-478.605 377.462
-463.178 164.219
-167.454 374.073
-456.215 131.518
-58.0443 468.486
-434.953 381.142
-502.567 348.224
-286.582 577.493
-239.997 111.095
-416.882 288.839
-103.388 448.32
-326.677 415.206
-322.174 396.38
-487.958 295.612
-258.413 32.4328
-236.969 150.796
-217.644 112.52
-492.501 420.505
-396.374 309.562
-203.848 12.5419
-111.842 295.716
-207.934 188.846
-440.9 113.895
-314.867 159.622
-243.468 339.62
-417.94 128.277
-131.619 187.058
-301.41 484.379
-402.103 84.6836
-94.7408 243.351
-310.391 158.371
-429.385 103.705
-273.639 80.1645
-116.503 479.873
-379.867 102.236
-110.715 539.111
-95.2853 146.486
-361.339 559.445
-442.121 450.261
-87.1161 146.467
-50.2843 485.318
-268.68 396.744
-325.017 475.955
-308.675 18.5135
-159.296 52.497
-404.396 289.22
-266.472 8.85889
-369.288 190.545
-336.636 492.113
-331.034 489.933
-7.95559 342.616
-477.729 232.283
-415.738 96.0129
-148.472 425.993
-304.339 458.443
-311.351 512.825
-176.596 482.777
-459.436 160.148
-265.638 46.6476
-272.517 589.018
-372.747 183.663
-272.983 230.937
-109.064 55.4348
-491.404 333.495
-392.187 464.582
-89.2342 232.095
-13.8762 292.05
-426.825 518.61
-65.0402 504.98
-27.121 445.353
-15.5119 375.104
-241.62 216.453
-377.669 227.816
-449.512 494.829
-382.45 564.421
-486.703 329.047
-256.62 337.707
-108.388 311.449
-269.05 463.114
-196.554 504.26
-272.987 467.283
-438.915 157.476
-279.695 22.8741
-42.8894 298.47
-12.088 368.059
-374.552 191.586
-123.545 568.869
-3.37518 311.551
-23.1411 382.857
-375.79 564.435
-89.8008 280.807
-31.1089 411.336
-123.506 334.355
-3.92722 330.928
-95.156 388.81
-12.8432 359.151
-317.152 164.767
-460.334 232.085
-497.564 339.505
-345.372 39.479
-100.519 327.395
-253.919 125.39
-392.524 458.997
-296.859 575.689
-49.3458 115.461
-244.197 259.454
-52.2302 179.523
-23.5062 171.363
-496.445 392.347
-376.933 167.4
-244.175 324.503
-208.846 182.125
-103.783 54.836
-261.398 573.77
-228.486 141.71
-89.3201 315.388
-239.001 80.3171
-190.429 481.531
-246.997 100.325
-115.917 271.896
-294.894 499.308
-219.772 143.86
-48.3188 132.178
-263.501 146.039
-471.269 449.363
-357.445 388.116
-0 0
-264.358 392.268
-244.485 484.941
-295.945 99.9631
-502.501 355.134
-495.902 366.56
-301.661 160.288
-66.2764 175.712
-312.095 506.296
-208.873 86.7263
-218.27 91.5794
-244.361 407.743
-199.887 129.661
-452.762 126.329
-195.218 91.2469
-389.866 93.1684
-114.004 477.589
-215.777 592.611
-128.118 553.545
-105.139 305.642
-142.297 46.2131
-441.219 116.928
-58.2531 112.152
-324.135 30.0415
-337.179 382.822
-401.258 77.5134
-253.615 116.722
-229.175 42.4082
-21.1051 431.405
-261.494 232.133
-244.868 202.131
-186.765 8.5927
-223.904 535.444
-470.191 192.363
-104.68 444.892
-187.101 500.286
-473.464 199.396
-112.406 64.0018
-123.022 513.967
-401.249 229.435
-213.161 12.3338
-199.455 530.219
-166.384 429.093
-251.218 128.689
-234.116 54.5926
-255.773 532.593
-260.1 87.0061
-228.123 452.985
-7.38227 335.122
-275.232 367.209
-219.828 217.018
-301.779 504.57
-191.475 496.513
-86.9163 116.094
-281.706 526.539
-197.138 180.473
-333.886 543.399
-233 458.073
-372.392 98.7651
-81.7495 146.404
-100.748 146.475
-119.8 528.605
-474.744 366.383
-148.504 411.108
-388.129 335.993
-473.851 257.499
-24.6635 386.162
-317.9 518.635
-236.276 396.413
-483.866 261.256
-133.312 552.394
-119.265 51.2464
-90.716 536.722
-270.911 242.331
-269.188 365.609
-339.165 39.4737
-70.1066 449.534
-87.4172 98.1642
-240.556 67.3643
-106.051 281.74
-317.034 573.552
-436.102 249.166
-343.932 483.126
-235.671 449.203
-264.567 355.561
-101.048 366.246
-107.419 146.516
-97.9319 236.589
-193.957 551.718
-315.648 485.186
-226.405 446.678
-244.545 414.111
-328.052 566.031
-418.345 260.66
-282.887 27.4526
-244.516 420.347
-247.48 512.476
-472.667 341.128
-395.77 235.213
-261.303 483.258
-37.6979 184.292
-37.9239 287.593
-424.171 531.167
-247.412 497.876
-475.726 215.112
-98.7254 54.8813
-215.579 476.457
-113.042 73.7304
-141.312 508.639
-93.4491 319.394
-264.45 418.18
-337.392 425.295
-428.287 129.658
-426.442 157.285
-237.704 526.054
-264.793 455.087
-176.741 172.508
-439.409 180.786
-392.46 186.283
-403.83 188.315
-440.642 510.177
-483.763 377.659
-304.516 513.996
-122.354 224.539
-453.219 145.481
-228.597 440.309
-100.113 187.526
-261.052 531.566
-251.05 201.803
-314.972 522.552
-405.207 69.5259
-335.567 386.68
-122.927 342.929
-64.7149 112.845
-184.058 467.61
-262.143 213.634
-95.2052 205.147
-477.143 332.397
-25.8785 414.706
-57.2693 402.48
-308.329 460.596
-224.129 128.873
-396.751 89.2563
-16.5503 421.757
-176.497 166.673
-49.7083 468.964
-387.21 239.911
-192.075 583.38
-95.4274 255.033
-202.383 468.29
-151.532 518.155
-103.643 488.371
-126.146 41.8628
-213.403 90.1816
-325.41 392.536
-272.639 91.2276
-484.726 280.838
-219.482 223.009
-197.872 588.347
-257.554 504.563
-105.992 539.589
-129.081 191.98
-264.581 531.218
-417.806 229.895
-244.474 206.227
-444.136 504.713
-102.316 291.523
-62.8081 467.238
-95.4572 539.758
-389.776 531.97
-382.839 166.12
-232.471 230.321
-51.907 139.854
-262.442 95.2883
-306.194 522.238
-261.541 560.389
-216.707 538.87
-478.657 337.404
-479.561 281.565
-335.35 36.3356
-405.333 219.418
-391.614 331.659
-392.832 313.123
-123.331 575.234
-242.893 559.964
-395.442 213.578
-151.538 391.187
-195.11 456.379
-280.844 87.1404
-409.129 302.406
-89.504 394.408
-406.664 481.229
-80.4654 462.407
-3.39376 324.804
-407.459 539.5
-370.332 46.6477
-385.129 197.174
-200.496 563.252
-352.803 378.754
-192.755 129.02
-385.558 265.573
-67.9989 146.429
-449.318 183.515
-492.502 312.815
-370.815 104.741
-225.84 572.699
-424.246 269.908
-397.699 81.6555
-416.862 101.498
-53.3548 402.594
-277.671 133.187
-17.6522 405.054
-157.632 589.076
-401.177 477.084
-434.406 121.406
-29.3083 293.795
-412.585 539.8
-234.779 385.097
-57.5471 178.777
-444.744 454.883
-367.642 560.4
-261.544 227.063
-458.008 137.948
-93.3802 187.567
-331.741 500.416
-114.703 146.276
-324.255 573.648
-48.0915 402.496
-208.57 594.684
-62.5024 488.56
-222.668 515.118
-90.1006 401.719
-360.522 419.075
-246.737 330.195
-112.659 326.103
-177.034 420.67
-223.92 485.192
-472.285 235.522
-422.059 243.657
-241.029 263.393
-242.242 528.623
-62.4301 405.637
-362.943 159.886
-335.805 484.163
-108.281 396.452
-233.453 132.513
-202.811 592.732
-23.397 164.035
-172.154 588.667
-203.359 489.521
-418.232 473.42
-223.903 522.441
-251.34 539.881
-399.809 512.635
-84.5316 283.11
-224.446 214.512
-76.2659 521.538
-174.173 387.06
-216.553 133.313
-437.915 385.347
-227.656 16.2315
-462.405 183.311
-218.878 519.677
-380.84 324.661
-74.4935 101.494
-327.885 34.2162
-244.61 212.383
-251.925 520.625
-301.776 568.784
-357.466 403.177
-102.7 136.55
-280.684 535.467
-470.44 178.228
-421.843 152.649
-95.8983 229.177
-464.319 207.657
-54.333 488.331
-111.264 337.176
-393.477 504.57
-343.021 551.475
-294.33 449.02
-121.234 46.4736
-195.045 95.7223
-262.095 33.6858
-257.257 137.612
-251.488 214.213
-202.781 133.275
-276.507 495.701
-117.715 229.074
-409.514 246.964
-470.496 336.42
-409.393 473.704
-204.719 531.649
-23.6283 181.636
-220.829 543.019
-87.3191 311.93
-227.527 208.775
-232.376 217.951
-207.599 90.3669
-267.97 359.049
-377.346 502.981
-186.947 410.068
-429.113 262.496
-120.679 71.2384
-396.068 61.4337
-279.51 95.3971
-422.822 129.52
-393.67 205.058
-86.164 138.342
-471.319 212.748
-445.43 240.613
-380.211 96.0673
-287.096 486.098
-362.47 46.2125
-251.405 112.648
-108.52 389.757
-212.405 185.641
-109.867 488.493
-265.015 131.648
-133.136 80.174
-183.743 461.831
-429.583 121.478
-221.324 204.349
-400.446 315.516
-399.681 203.417
-368.333 175.976
-84.9509 290.705
-407.874 84.4602
-413.007 84.4373
-71.287 498.108
-139.287 550.095
-50.4519 293.554
-31.2798 436.396
-236.679 106.098
-230.358 137.349
-372.832 210.217
-21.0471 355.158
-279.41 371.981
-130.811 579.02
-452.742 465.422
-491.903 374.326
-192.091 8.43075
-354.441 555.146
-100.115 377.179
-488.994 264.91
-183.373 487.053
-398.516 178.474
-289.096 374.381
-108.719 317.366
-86.4999 299.257
-112.74 276.721
-337.941 546.931
-468.708 380.931
-276.433 49.9872
-417.443 255.795
-83.7929 74.9006
-288.889 123.257
-23.9587 350.929
-440.124 149.714
-251.766 334.929
-410.266 515.427
-257.58 488.107
-390.19 166.828
-250.546 258.506
-448.326 157.483
-264.734 413.397
-450.82 237.55
-396.515 301.485
-239.972 221.256
-218.202 71.0329
-13.179 343.604
-311.4 168.506
-353.066 437.754
-209.103 71.5539
-157.834 21.2132
-386.429 277.971
-332.839 496.371
-281.567 373.157
-327.66 493.638
-473.397 377.429
-410.063 241.509
-278.478 381.757
-263.385 9.16586
-7.58029 301.254
-225.417 372.309
-293.065 527.539
-355.733 39.5887
-307.306 173.843
-189.573 180.278
-36.9838 411.311
-93.649 398.613
-292.81 180.044
-41.5288 460.355
-264.929 587.557
-453.593 471.872
-470.596 170.019
-260.852 527.673
-44.295 476.622
-454.327 183.567
-317.089 505.387
-326.476 502.436
-31.681 283.411
-492.759 412.943
-403.268 64.351
-3.52442 318.608
-252.111 95.8509
-201.033 182.053
-418.24 221.45
-303.349 568.652
-276.538 526.525
-85.2739 68.2455
-415.54 505.767
-264.412 580.846
-319.974 481.029
-272.25 472.252
-281.907 128.976
-219.905 241.858
-74.2071 143.054
-264.452 434.196
-285.79 532.723
-70.2844 402.698
-112.401 320.453
-401.55 173.028
-216.474 453.428
-211.022 112.546
-225.133 202.348
-281.27 577.586
-195.244 481.705
-422.569 98.0981
-76.5078 464.648
-253.673 146.581
-389.86 509.438
-75.7637 146.399
-183.465 392.559
-226.333 85.8969
-372.838 213.7
-377.902 230.817
-385.43 273.074
-91.7918 136.436
-324.475 497.862
-115.593 137.027
-250.263 19.6179
-325.559 471.821
-340.485 479.59
-482.69 332.736
-270.147 116.701
-246.574 319.221
-100.938 539.458
-93.0286 491.183
-216.237 440.822
-188.046 96.6226
-379.164 498.602
-325.48 411.719
-445.313 146.58
-454.124 157.499
-58.1722 143.494
-379.759 188.07
-209.808 488.303
-244.817 441.052
-434.233 180.337
-101.31 219.624
-353.734 155.974
-104.689 368.59
-78.9744 488.31
-377.974 335.539
-430.932 484.604
-501.177 366.122
-91.7527 367.473
-211.846 532.933
-267.78 216.245
-187.384 122.663
-433.678 195.079
-148.601 405.004
-261.433 477.623
-87.7354 494.667
-37.4853 294.937
-438.341 128.975
-196.319 468.492
-408.837 99.9087
-247.884 476.474
-210.766 533.423
-393.411 326.657
-110.631 191.678
-168.374 574.49
-233.103 400.677
-468.788 166.969
-134.13 498.599
-305.386 467.45
-261.402 221.749
-72.3386 96.9322
-95.6204 278.142
-207.109 59.172
-483.676 291.399
-244.519 59.6478
-357.57 433.207
-382.699 221.613
-246.779 531.192
-77.5949 402.445
-396.19 262.614
-168.976 379.483
-45.7775 481.051
-403.672 177.676
-308.904 485.668
-235.825 518.984
-114.277 343.492
-213.937 454.316
-231.515 32.8871
-245.744 254.822
-266.326 91.7943
-456.819 247.891
-89.3368 485.883
-390.017 316.978
-21.1309 416.614
-396.249 554.861
-131.2 39.1895
-70.1693 510.323
-294.247 500.877
-261.646 498.011
-426.159 187.123
-228.656 543.424
-117.413 218.858
-46.6138 277.947
-264.32 345.406
-200.904 96.6315
-79.1961 95.0671
-427.13 219.165
-400.138 219.57
-462.004 450.204
-354.351 151.382
-460.951 337.006
-398.708 469.119
-255.551 14.1128
-236.444 351.431
-215.686 469.18
-135.575 68.664
-30.4587 188.052
-244.375 65.9145
-250.062 532.533
-236.086 92.3204
-167.907 568.17
-287.701 495.388
-112.802 283.324
-38.9293 137.653
-412.931 221.564
-106.007 398.386
-239.747 461.436
-424.932 263.495
-151.424 400.119
-109.651 184.229
-103.405 235.693
-448.624 191.441
-183.216 163.394
-201.946 86.7529
-82.7539 242.701
-22.5002 405.568
-233.537 116.907
-86.6064 92.5088
-342.331 488.088
-481.606 224.447
-488.97 430.342
-184.894 585.784
-264.598 114.939
-110.342 443.25
-420.057 84.7425
-422.581 515.275
-273.349 386.235
-254.98 87.6956
-393.647 218.994
-278.936 14.7936
-192.141 169.252
-424.448 276.169
-289.239 448.928
-168.584 581.509
-431.566 188.246
-319.553 464.503
-201.209 522.191
-109.366 269.328
-447.437 484.878
-18.5263 343.707
-459.278 343.198
-41.9189 402.665
-463.389 372.926
-223.487 378.203
-251.38 546.892
-28.7289 147.211
-101.174 280.979
-75.081 178.871
-343.255 430.103
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before107 b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before107
deleted file mode 100644
index 18efa71..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/data/before107
+++ /dev/null
@@ -1,1041 +0,0 @@
-89.8008 280.807
-317.153 164.768
-285.783 532.727
-431.092 385.771
-200.662 59.5348
-156.357 378.424
-97.3338 490.103
-232.376 217.951
-179.36 593.874
-253.675 146.581
-273.348 386.235
-401.109 476.976
-256.615 337.702
-350.818 552.782
-294.611 18.7343
-324.136 30.0425
-87.7419 494.663
-396.679 546.911
-280.841 87.1485
-325.481 411.73
-396.248 554.862
-131.191 39.1913
-183.767 554.706
-20.8458 291.047
-279.41 371.981
-460.579 388.267
-230.663 148.101
-252.088 95.8595
-76.8069 106.224
-391.615 331.661
-422.586 515.284
-264.357 392.265
-273.608 80.169
-238.356 540.267
-63.7422 282.445
-119.328 518.779
-492.503 312.815
-170.462 426.257
-49.6094 460.572
-252.807 132.866
-227.213 149.768
-212.016 191.75
-468.706 380.937
-6.85583 307.132
-172.036 16.9715
-329.976 418.976
-306.196 522.24
-497.935 386.876
-237.665 526.51
-356.766 438.494
-353.733 155.97
-433.676 195.082
-139.662 502.405
-166.378 429.099
-357.492 397.24
-101.772 266.444
-480.471 446.785
-91.7529 367.473
-199.968 452.421
-428.822 477.823
-246.734 330.196
-92.8117 219.066
-44.2902 476.63
-174.174 387.061
-437.682 477.392
-270.908 242.332
-268.956 223.998
-362.478 46.218
-176.586 482.785
-436.881 110.609
-270.192 49.9039
-301.099 484.336
-271.698 12.3003
-236.674 106.089
-243.257 146.539
-276.394 234.677
-340.66 479.426
-317.191 161.343
-135.522 68.6045
-100.114 377.172
-89.0208 63.8546
-261.494 232.133
-294.263 448.969
-396.061 505.568
-424.662 239.04
-435.001 150.704
-377.899 230.813
-79.1928 95.0683
-80.7253 498.667
-216.711 86.4868
-196.522 62.2943
-21.0111 355.2
-95.5929 249.726
-270.114 116.695
-262.144 213.634
-479.259 287.782
-213.597 62.3347
-213.962 454.284
-101.191 280.986
-109.882 488.491
-151.528 518.143
-196.575 504.242
-280.601 485.354
-83.991 86.8471
-188.286 559.165
-429.112 262.496
-502.353 396.378
-188.066 96.6293
-208.924 86.774
-31.0467 411.342
-418.135 537.217
-446.762 377.531
-265.655 46.6579
-452.957 391.87
-251.223 128.683
-357.569 433.213
-276.044 239.242
-137.962 580.86
-213.164 12.3798
-33.1491 139.036
-301.659 160.289
-272.99 467.292
-157.558 589.115
-70.0821 449.539
-72.3482 96.9167
-222.082 469.204
-93.3791 187.565
-35.6768 438.62
-446.795 474.46
-186.77 8.58336
-393.594 218.966
-354.441 555.146
-260.886 527.711
-126.154 41.8572
-451.129 489.781
-361.947 153.621
-42.5632 274.718
-293.836 460.022
-369.287 190.543
-134.12 498.596
-27.1262 445.33
-450.306 449.355
-200.913 96.6293
-116.016 534.689
-67.2058 464.284
-221.334 204.351
-57.5779 178.771
-31.3961 275.31
-83.8047 74.88
-192.769 129.025
-62.476 405.633
-250.545 258.505
-471.468 367.756
-253.79 550.249
-314.88 159.626
-219.902 200.005
-195.812 579.485
-372.412 98.7516
-303.571 159.698
-264.646 114.979
-442.762 477.285
-233.537 116.909
-145.957 49.9751
-95.8526 372.199
-114.16 181.019
-151.539 391.187
-207.646 90.3225
-388.755 322.62
-189.128 468.56
-195.272 121.49
-184.86 481.348
-337.94 546.932
-326.67 415.195
-464.588 449.552
-240.545 465.582
-54.8003 456.939
-24.0239 159.123
-502.554 362.866
-267.78 216.245
-109.112 55.4508
-264.568 355.561
-414.366 481.509
-12.8385 359.143
-229.302 537.567
-94.7382 243.348
-108.997 304.485
-303.219 18.43
-449.318 183.515
-251.407 112.692
-261.402 221.745
-218.238 91.6113
-492.764 412.937
-66.1374 452.777
-144.108 546.051
-244.192 259.467
-51.8851 139.84
-74.1372 143.052
-245.744 254.822
-205.133 481.436
-491.928 324.136
-149.755 585.341
-95.1533 388.819
-35.7054 274.312
-388.203 498.77
-380.283 96.0072
-310.388 158.371
-56.3271 405.882
-450.826 237.54
-253.623 116.716
-377.762 173.647
-227.54 380.75
-262.351 141.171
-403.69 177.654
-123.535 568.869
-417.44 255.805
-420.068 84.748
-491.404 333.493
-299.716 454.523
-496.718 381.137
-257.56 504.546
-70.3027 402.69
-244.478 484.968
-240.483 548.469
-355.756 39.6014
-479.459 366.883
-385.56 265.556
-422.805 129.523
-272.302 400.509
-214.338 481.319
-128.511 66.6139
-412.93 221.565
-264.495 424.504
-188.511 509.487
-34.0161 442.785
-123.506 334.354
-27.2562 154.532
-228.599 440.311
-79.7642 181.327
-194.042 551.757
-7.37095 335.078
-390.019 316.974
-200.507 563.333
-434.405 121.407
-48.0912 402.497
-254.562 46.3586
-109.36 269.327
-319.975 481.03
-112.803 283.325
-352.817 378.775
-191.317 405.257
-308.687 18.5178
-251.543 207.254
-247.706 494.395
-264.589 531.224
-119.723 57.5482
-213.491 90.0019
-393.647 205.069
-600 0
-424.566 525.005
-391.146 55.9278
-51.0021 407.648
-66.1092 139.731
-325.264 464.715
-372.747 183.665
-71.442 489.914
-100.748 146.474
-482.738 332.723
-245.355 489.515
-287.507 95.5889
-390.965 559.687
-112.401 320.447
-93.1404 453.775
-265.363 474.398
-184.936 550.544
-325.558 471.823
-23.1232 382.84
-403.646 261.028
-267.97 359.049
-111.6 263.366
-244.671 271.34
-232.777 545.967
-247 100.33
-402.391 505.523
-84.8694 488.536
-268.68 396.744
-435.679 105.289
-309.888 498.517
-280.687 535.466
-404.892 471.698
-60.1401 454.631
-484.869 441.821
-438.915 157.476
-212.403 185.638
-77.5934 402.446
-232.584 52.8808
-456.8 247.876
-228.493 141.705
-394.063 530.401
-93.4296 59.4264
-495.904 366.561
-398.676 319.476
-304.501 508.195
-236.443 351.43
-388.925 454.36
-288.888 123.257
-299.305 461.134
-156.007 54.6148
-186.819 395.724
-462.388 183.315
-446.353 459.437
-281.555 373.154
-229.672 479.063
-122.926 342.93
-287.29 87.7609
-102.315 291.523
-337.182 382.818
-23.4604 176.391
-328.414 552.576
-241.1 445.095
-261.619 240.113
-244.516 420.347
-223.898 485.196
-159.291 52.5319
-37.695 184.289
-403.333 64.3899
-251.451 222.451
-167.93 568.105
-183.47 392.564
-86.4051 187.262
-192.153 169.261
-204.712 531.664
-399.687 203.413
-343.061 551.496
-84.8021 110.266
-418.237 221.45
-159.602 44.7884
-223.881 522.412
-189.774 459.831
-211.578 532.789
-117.636 331.317
-41.5316 460.357
-29.3292 293.805
-292.542 531.903
-329.058 388.443
-424.447 276.173
-198.603 567.956
-264.32 345.406
-59.0571 137.265
-207.938 188.848
-473.473 199.378
-477.693 232.287
-327.662 493.637
-251.47 212.416
-211.07 533.594
-46.6774 181.122
-296.838 575.705
-459.018 343.174
-497.566 339.507
-268.534 82.4481
-181.974 390.516
-123.401 563.39
-476.552 447.595
-231.417 32.8353
-117.417 218.862
-223.402 91.4581
-362.933 159.881
-400.136 219.575
-466.425 257.273
-257.581 488.105
-168.975 379.48
-89.2325 232.094
-244.991 86.9876
-244.47 206.226
-110.69 539.124
-474.729 366.386
-162.508 579.27
-101.31 219.626
-120.708 71.2328
-436.431 247.216
-457.55 191.515
-273.233 50.5739
-384.126 97.6188
-307.141 498.522
-283.283 492.264
-389.784 210.711
-276.538 526.526
-22.4973 405.568
-471.973 281.713
-492.353 426.398
-215.244 485.562
-246.56 319.241
-272.982 230.935
-161.871 574.089
-115.714 484.658
-276.513 495.722
-50.4703 293.588
-289.236 448.96
-264.455 352.454
-392.194 464.579
-264.45 418.179
-263.502 146.039
-105.137 305.651
-148.906 430.451
-386.946 464.06
-357.467 403.179
-225.131 202.342
-87.416 98.1732
-103.49 197.833
-183.259 414.025
-335.565 386.682
-15.526 375.114
-424.177 531.16
-449.528 494.871
-38.9352 137.654
-402.093 84.687
-276.227 44.1363
-393.858 278.577
-200.278 494.928
-167.455 374.074
-261.642 498.032
-111.842 295.715
-217.731 375.052
-220.459 13.4443
-247.541 200.492
-208.551 594.706
-460.948 337.031
-266.586 133.265
-253.903 125.395
-439.406 180.784
-457.155 453.88
-499.948 407.134
-23.9537 350.927
-454.137 157.503
-148.925 529.017
-119.27 51.2131
-335.421 420.139
-375.803 564.446
-197.067 525.499
-142.79 584.164
-13.8927 292.028
-402.44 539.323
-181.854 509.091
-117.224 191.31
-311.157 470.708
-307.31 173.839
-285.631 501.647
-190.955 491.557
-239.88 461.476
-43.1009 407.244
-176.739 172.506
-229.309 91.2941
-219.773 143.862
-103.384 448.323
-150.185 54.107
-236.277 396.409
-247.419 497.912
-192.309 583.443
-202.003 86.7528
-187.728 400.167
-470.7 286.562
-468.204 236.774
-260.086 87.0126
-103.775 54.8325
-462.025 450.188
-442.244 249.433
-401.248 229.435
-210.58 133.443
-187.294 164.648
-261.544 227.062
-448.326 157.482
-96.6761 449.933
-487.956 295.608
-254.979 87.6982
-89.3435 485.881
-86.1996 138.311
-181.516 177.561
-387.211 239.911
-244.356 53.4742
-91.7958 136.439
-191.47 496.523
-472.26 235.544
-108.47 384.628
-473.851 257.499
-219.827 217.018
-86.5015 299.252
-192.085 65.5783
-436.107 249.162
-243.503 469.464
-398.519 178.473
-483.674 291.403
-133.332 552.402
-261.038 553.428
-37.4774 294.93
-112.739 276.723
-236.251 362.902
-16.5521 421.755
-0 0
-422.705 121.934
-231.434 239.824
-17.6584 405.056
-241.642 73.7455
-478.709 337.368
-229.932 213.589
-319.554 464.503
-114.714 146.273
-463.979 392.845
-233.045 458.202
-378.003 162.214
-26.9645 346.896
-481.206 216.718
-407.248 73.978
-7.58946 301.17
-483.792 377.657
-387.336 262.661
-420.675 519.219
-216.547 133.317
-122.358 224.529
-415.52 518.069
-399.518 297.485
-428.332 129.65
-261.306 483.252
-76.5404 464.644
-172.217 588.806
-216.703 538.863
-89.1298 456.812
-31.7097 283.407
-261.433 477.614
-89.5034 394.406
-441.214 116.932
-243.002 406.032
-339.462 380.449
-420.533 510.454
-256.364 523.488
-429.39 103.707
-458.295 398.128
-426.859 256.915
-269.97 532.698
-165.3 18.3994
-427.286 485.58
-407.874 84.4597
-304.544 519.434
-454.328 183.566
-92.5529 291.965
-463.385 191.335
-302.726 178.071
-442.121 450.262
-226.053 482.806
-252.89 267.443
-314.362 22.3469
-231.656 570.258
-372.834 210.214
-261.544 560.387
-187.097 500.288
-324.458 497.875
-239.021 80.2957
-42.8569 298.457
-248.604 146.456
-385.246 193.177
-392.369 538.869
-177.042 420.663
-122.214 178.639
-396.204 262.613
-272.679 91.2352
-379.598 225.543
-114.035 477.596
-257.393 95.4633
-62.758 467.266
-195.24 481.702
-430.912 484.626
-417.372 249.499
-251.303 107.049
-317.889 518.608
-461.217 252.226
-225.462 240.963
-52.5354 300.846
-391.545 236.817
-283.339 119.808
-31.3202 436.411
-385.13 197.174
-395.537 170.294
-215.358 237.697
-207.366 526.81
-228.825 130.605
-258.442 32.4851
-296.33 92.9814
-164.658 435.409
-202.379 468.292
-401.269 77.5072
-240.002 111.086
-13.1677 343.604
-75.7637 146.399
-155.432 382.717
-264.942 587.581
-272.307 405.48
-98.7106 54.8942
-357.418 425.907
-383.164 91.7195
-328.066 565.997
-70.268 510.361
-76.2297 389.951
-405.177 69.537
-134.494 181.164
-103.369 235.719
-62.118 146.436
-203.775 448.878
-370.811 104.756
-251.355 539.89
-111.761 477.761
-222.608 246.8
-444.073 183.473
-360.521 419.086
-209.106 71.5608
-269.051 463.113
-85.6083 459.929
-486.179 272.181
-484.936 370.897
-96.213 199.283
-257.531 264.143
-197.457 8.49515
-187.082 575.353
-467.473 180.538
-49.2084 115.546
-456.211 131.506
-266.418 8.83356
-265.239 388.416
-279.505 95.3998
-389.775 531.969
-84.3085 449.416
-348.356 433.521
-177.96 163.917
-110.096 212.712
-90.1059 401.717
-105.995 539.586
-12.9038 396.848
-218.344 70.9972
-479.275 257.641
-245.116 538.789
-410.285 515.432
-179.305 388.106
-105.347 335.62
-430.034 253.814
-264.452 434.196
-224.442 214.516
-478.606 377.46
-270.733 39.6863
-248.795 275.219
-600 600
-25.2649 436.368
-413.008 84.4363
-325.546 405.994
-128.238 72.8241
-95.2853 146.486
-80.2789 118.638
-437.912 385.348
-37.0741 405.494
-159.768 583.395
-431.904 517.752
-23.505 171.363
-264.819 458.818
-251.394 546.955
-496.446 392.347
-58.0658 468.484
-197.994 557.767
-245.273 46.9325
-409.004 252.493
-396.109 61.4644
-291.546 91.1199
-281.218 381.61
-3.38504 311.502
-383.529 336.65
-269.188 365.609
-108.324 372.645
-36.96 411.323
-103.63 488.372
-377.348 502.981
-219.483 223.008
-422.217 473.945
-245.21 555.358
-293.567 24.7702
-403.834 188.32
-415.389 240.116
-119.787 528.668
-282.938 27.507
-502.567 348.223
-240.541 564.561
-250.001 225.289
-103.882 329.788
-54.0013 136.102
-325.024 475.94
-418.233 473.427
-445.464 240.604
-417.94 128.259
-492.273 300.496
-292.809 180.043
-93.0556 491.168
-335.804 484.165
-483.863 261.253
-32.5745 455.857
-127.303 509.349
-102.692 136.55
-198.163 500.054
-30.6279 405.51
-466.342 343.629
-291.763 577.714
-475.713 215.112
-275.445 487.624
-184.057 467.608
-448.608 191.444
-444.15 504.713
-391.986 229.928
-148.473 425.995
-315.015 522.546
-420.884 236.226
-202.069 178.327
-386.449 277.968
-187.905 569.664
-198.561 483.82
-289.096 374.382
-281.909 128.975
-277.671 133.187
-266.749 35.6999
-357.994 406.029
-453.15 145.542
-200.256 71.4499
-409.985 295.72
-251.767 334.935
-395.514 213.57
-439.43 479.752
-225.421 372.296
-271.485 526.451
-95.9086 383.722
-244.545 414.111
-226.277 112.518
-382.07 458.524
-261.217 112.3
-379.946 102.177
-453.578 471.888
-410.062 241.51
-465.632 211.932
-87.3313 311.92
-244.377 65.915
-415.34 291.659
-353.801 383.379
-392.55 84.709
-221.69 453.591
-262.444 95.2881
-288.969 380.803
-479.567 281.561
-398.313 469
-228.573 516.588
-197.665 572.768
-471.324 212.75
-481.234 231.062
-236.971 150.796
-232.502 224.689
-276.437 49.9816
-257.536 516.286
-377.973 335.539
-471.261 449.365
-168.37 574.489
-211.062 443.966
-434.221 180.355
-278.48 381.757
-189.585 180.28
-110.377 443.272
-91.6578 305.154
-67.9988 146.43
-248.342 530.954
-333.883 543.398
-486.7 329.044
-187.393 122.692
-93.5326 447.176
-207.188 59.1849
-327.896 34.2249
-317.079 505.388
-244.688 517.456
-225.79 572.774
-271.88 226.859
-112.501 57.6738
-24.6815 386.185
-299.307 165.727
-151.251 524.247
-10.5514 298.25
-141.309 508.634
-244.519 59.6475
-45.6063 123.137
-183.223 163.395
-345.372 39.4807
-3.52195 318.608
-477.11 332.405
-424.932 263.494
-108.281 396.448
-195.125 456.371
-383.367 509.31
-243.466 339.619
-302.067 498.508
-481.61 224.446
-400.447 315.511
-108.721 317.372
-447.429 484.888
-75.0788 178.87
-199.895 129.66
-12.6111 400.61
-3.90777 330.892
-129.313 178.59
-81.7205 297.767
-70.9254 284.009
-380.72 233.671
-396.519 301.444
-17.5155 388.685
-501.177 366.121
-375.674 160.053
-28.6975 147.263
-227.529 208.776
-402.972 515.46
-131.618 187.061
-368.898 165.522
-115.917 271.895
-12.0951 368.124
-483.275 336.547
-201.027 182.049
-484.729 280.837
-452.775 465.465
-446.666 125.037
-114.279 343.491
-468.839 166.999
-274.855 535.318
-450.569 246.038
-50.2845 485.319
-25.8745 414.718
-440.924 113.913
-328.955 544.524
-3.39843 324.807
-96.5138 294.581
-255.494 14.1382
-442.171 195.627
-121.206 46.5064
-491.886 374.323
-18.5201 343.703
-315.644 485.184
-196.303 68.4333
-311.585 498.502
-69.0086 395.487
-183.374 487.051
-240.001 221.326
-100.937 539.46
-491.082 366.651
-181.878 505.341
-435.551 260.983
-452.745 126.315
-376.932 167.399
-322.982 505.462
-444.75 454.893
-72.6268 514.78
-335.338 36.324
-216.469 453.432
-275.231 367.208
-82.5755 142.335
-208.842 182.123
-418.351 260.658
-357.442 388.104
-416.907 101.471
-90.7235 536.723
-244.988 228.294
-244.873 202.124
-210.996 112.551
-293.923 171.751
-401.519 173.003
-249.558 438.138
-408.988 276.665
-460.328 232.085
-79.6687 108.382
-129.082 191.979
-16.7737 426.65
-95.6242 278.142
-196.319 468.492
-232.52 236.32
-354.352 151.381
-106.976 291.874
-265.022 131.668
-409.355 473.703
-184.941 585.695
-69.5745 178.28
-250.266 19.6491
-312.092 506.299
-382.433 564.423
-294.82 499.333
-325.41 392.536
-251.05 201.804
-311.615 573.533
-463.388 372.928
-151.425 400.116
-244.175 324.474
-74.4911 101.493
-263.436 9.15032
-73.0351 116.829
-322.174 396.38
-41.9215 402.663
-266.329 91.7908
-219.358 227.416
-382.846 166.123
-460.967 382.378
-463.185 164.222
-422.183 481.579
-251.41 321.369
-255.783 532.586
-429.581 121.479
-224.087 128.898
-431.559 188.228
-387.631 87.3188
-455.282 235.554
-97.2053 323.097
-104.726 444.838
-427.129 219.167
-215.577 476.474
-492.551 305.421
-240.549 67.3092
-55.8613 281.205
-360.442 410.209
-144.318 540.492
-434.912 381.165
-307.353 480.397
-223.496 378.195
-113.047 73.7441
-311.347 475.9
-423.875 225.693
-21.1421 416.603
-112.407 64.0049
-58.2182 112.152
-57.2593 402.487
-393.165 179.106
-268.683 409.253
-314.325 464.468
-130.832 579.003
-183.745 461.829
-236.487 567.596
-404.375 193.848
-502.215 341.962
-54.3412 488.334
-89.3094 315.374
-488.973 430.329
-367.053 158.11
-416.88 288.838
-48.265 132.116
-97.9069 236.577
-107.063 219.163
-84.9488 290.703
-301.911 504.296
-186.947 410.069
-398.576 535.606
-376.973 207.08
-152.915 438.935
-100.113 187.527
-123.287 61.3243
-392.492 186.318
-234.12 54.6316
-295.947 99.9649
-215.088 64.4461
-126.598 559.416
-228.001 473.515
-81.7495 146.404
-93.4493 319.394
-168.584 581.479
-146.409 535.755
-251.489 214.213
-422.071 243.653
-370.349 46.6518
-202.825 592.752
-433.593 157.519
-385.316 55.089
-417.805 229.894
-488.994 264.913
-62.505 488.556
-424.246 269.901
-86.9102 116.092
-409.514 246.964
-87.0952 246.865
-443.845 385.691
-148.503 411.108
-236.575 356.711
-343.263 430.112
-393.401 326.671
-218.395 533.278
-492.499 420.505
-95.9173 229.175
-229.074 42.3485
-66.2926 175.711
-374.222 50.0593
-257.256 137.61
-192.091 8.44725
-103.247 481.742
-148.531 417.691
-199.357 530.17
-217.644 112.519
-23.4066 164.03
-404.679 280.601
-200.955 117.271
-64.6951 112.836
-307.09 571.925
-279.758 500.551
-95.3868 539.748
-148.601 405
-426.054 382.586
-247.882 476.508
-470.17 192.35
-401.544 254.49
-236.812 341.775
-176.497 166.668
-311.412 168.493
-339.135 39.4678
-82.7538 242.707
-82.2604 404.734
-379.156 498.605
-261.4 573.788
-277.651 116.595
-106.189 449.646
-492.559 320.639
-188.517 92.1121
-151.226 32.2641
-425.716 187.006
-264.408 580.832
-472.68 341.123
-133.16 80.1915
-151.663 387.987
-228.328 453.01
-404.701 307.066
-222.609 515.123
-215.871 231.251
-251.926 520.629
-80.0106 80.4508
-197.823 588.229
-46.5883 277.936
-426.437 157.291
-64.944 505.229
-337.384 425.285
-409.133 302.407
-379.14 50.7334
-244.362 407.749
-421.592 152.395
-23.6347 181.659
-243.301 
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h
deleted file mode 100644
index 6194352..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef QT_KINETIC_DELAUNAY_SS_2_H
-#define QT_KINETIC_DELAUNAY_SS_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-//#include <CGAL/Kinetic/IO/Qt_widget_2.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/internal/tds_2_helpers.h>
-#include <CGAL/Kinetic/Listener.h>
-
-namespace CGAL { namespace Kinetic {
-
-//! This class draws a Kinetic_Delaunay_2 triangulation to a Qt_gui_2.
-/*!  The most recently created edges are colored green and the other
-  edges are colored black. See kinetic_Delaunay_2.cc for a useage
-  example. There are no public methods other than the constructor.
-*/
-template <class Kinetic_Delaunay, class Qt_gui, class Qt_mpt>
-class Qt_Delaunay_stable_subset_2: public Ref_counted<Qt_Delaunay_stable_subset_2<Kinetic_Delaunay, Qt_gui, Qt_mpt> >
-{
-  typedef Qt_Delaunay_stable_subset_2<Kinetic_Delaunay, Qt_gui, Qt_mpt> This;
-  typedef Qt_Delaunay_stable_subset_2<Kinetic_Delaunay, Qt_gui, Qt_mpt> Qt_del;
-  typedef internal::Triangulation_data_structure_helper_2<typename Kinetic_Delaunay::Triangulation::Triangulation_data_structure> TDS_helper;
-public:
-  //typedef Kinetic_Delaunay Kinetic_Delaunay;
-  //typedef CGAL::Ref_counted_handle<This> Pointer;
-
-  Qt_Delaunay_stable_subset_2(typename Qt_gui::Handle &gui,
-			      typename Qt_mpt::Handle &mps,
-			      typename Kinetic_Delaunay::Handle &kdel,
-			      double threshold): mpt_(mps),
-						 kdel_(kdel),
-						 threshold_(threshold) {
-    CGAL_KINETIC_INIT_LISTEN(Qt_gui, gui);
-  }
-
-protected:
-  typedef typename Kinetic_Delaunay::Triangulation::Geom_traits::Static_kernel::Point_2 Static_point;
-  typedef typename Kinetic_Delaunay::Triangulation::Geom_traits::Static_kernel::Vector_2 Static_vector;
-  typedef typename Kinetic_Delaunay::Triangulation::Geom_traits::Static_kernel::Segment_2 Static_segment;
-  typedef typename Kinetic_Delaunay::Triangulation::Geom_traits::Static_kernel::RT NT;
-
-  double angle(const Static_point &a, const Static_point &b, const Static_point &c) const
-  {
-    Static_vector va(a-b);
-    Static_vector vb(c-b);
-    double dot= CGAL::to_double(va*vb);
-    double ma= std::sqrt(CGAL::to_double(va*va));
-    double mb= std::sqrt(CGAL::to_double(vb*vb));
-    double ac= dot/(ma*mb);
-    //std::cout << ac << " " << ma << " " << mb << std::endl;
-    //std::cout << "Angle for " << a << ", " << b << ", " << c  << " is " << std::acos(ac) << std::endl;
-    return std::acos(ac);
-  }
-
-  CGAL_KINETIC_LISTEN1(Qt_gui, PICTURE_IS_VALID, draw())
-  
-        typedef typename Qt_gui::Listener QTL;
-
-  //! This class listens for redraw requests (PICTURE_IS_VALID becoming false)
-  /*!
-    It calls the draw method when it recieves a notification.
-  
-  class Listener: public QTL
-  {
-    typedef QTL P;
-  public:
-    Listener(typename Qt_gui::Handle &h, Qt_del *t): P(h), t_(t){}
-    virtual void new_notification(typename QTL::Notification_type nt) {
-      if (nt == QTL::PICTURE_IS_VALID) {
-        t_->draw(*P::widget(), P::notifier()->current_time());
-      }
-    }
-  protected:
-    Qt_del *t_;
-  };
-  friend class Listener;*/
-
-  void draw() const {
-    draw(CGAL_KINETIC_NOTIFIER(Qt_gui)->widget(), CGAL_KINETIC_NOTIFIER(Qt_gui)->current_time());
-  }
-
-  //! Draw the triangulation.
-  void draw( CGAL::Qt_widget &w, double t) const
-  {
-    //std::cout << "Drawing del\n";
-    typedef typename Kinetic_Delaunay::Triangulation Del;
-    const Del  &tri= kdel_->triangulation(typename Del::Geom_traits::Time(t));
-    //tri.geom_traits().set_time(typename Del::Geom_traits::Time(t));
-    w << CGAL::LineWidth(1);
-    // << CGAL::FillColor(CGAL::Color(0,0,0));
-    if (tri.dimension() != 2) return;
-    for (typename Del::Finite_edges_iterator fit = tri.finite_edges_begin();
-	 fit != tri.finite_edges_end(); ++fit) {
-      if (fit->first->vertex((fit->second+1)%3)->point().is_valid()
-	  && fit->first->vertex((fit->second+2)%3)->point().is_valid()
-	  && fit->first->vertex(fit->second)->point().is_valid()
-	  && fit->first->neighbor(fit->second)->vertex(tri.mirror_index(fit->first,fit->second))->point().is_valid()) {
-	Static_point o= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+1)%3)->point());
-	Static_point d= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+2)%3)->point());
-	Static_point a= tri.geom_traits().current_coordinates_object()(fit->first->vertex(fit->second)->point());
-	Static_point b= tri.geom_traits().current_coordinates_object()(fit->first->neighbor(fit->second)->vertex(tri.mirror_index(fit->first,fit->second))->point());
-
-	double angle1= std::abs(angle(o,a, d));
-	double angle2= std::abs(angle(o,b, d));
-
-	Static_segment ss(o,d);
-
-	if (angle1+angle2 < threshold_*3.1415) {
-	  if (kdel_->visitor().contains(*fit) || kdel_->visitor().contains(tri.mirror_edge(*fit))) {
-	    w<< CGAL::Color(255,0,0);
-	  }
-	  else {
-	    w << CGAL::Color(0,0,0);
-	  }
-	  w << ss;
-	} else {
-	  Static_point o= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+1)%3)->point());
-	  Static_point d= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+2)%3)->point());
-	  Static_segment ss(o,d);
-	  w << CGAL::Color(0,0,0);
-	  w << ss;
-	}
-      }
-      else {
-	/*if (kdel_->visitor().contains(*fit) || kdel_->visitor().contains(TDS_helper::mirror_edge(*fit))){
-	  w<< CGAL::Color(255,200,200);
-	  } else {
-	  w << CGAL::Color(200,200,200);
-	  }*/
-	//w << ss;
-      }
-
-      //Static_point p0= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+1)%3)->point());
-      //Static_point p1= tri.geom_traits().current_coordinates_object()(fit->first->vertex((fit->second+2)%3)->point());
-
-    }
-  }
-
-  typename Qt_mpt::Handle mpt_;
-  //Listener listener_;
-  typename Kinetic_Delaunay::Handle kdel_;
-  double threshold_;
-};
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h
deleted file mode 100644
index acc6b19..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_INTERNAL_COIN_SIMULATOR_GUI_H
-#define CGAL_KINETIC_IO_INTERNAL_COIN_SIMULATOR_GUI_H
-
-#include <CGAL/Kinetic/basic.h>
-
-//#ifdef HAVE_INVENTOR_QT_SOQT_H
-//#include <Inventor/Qt/SoQt.h>
-#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
-#include <Inventor/nodes/SoNode.h>
-//#include <Inventor/nodes/SoSeparator.h>
-//#else
-//#ifdef HAVE_COIN2_INVENTOR_QT_SOQT_H
-//#include <Coin2/Inventor/Qt/SoQt.h>
-//#include <Coin2/Inventor/Qt/viewers/SoQtExaminerViewer.h>
-//#include <Coin2/Inventor/nodes/SoSeparator.h>
-//#endif
-//#endif
-
-#include <CGAL/Kinetic/IO/internal/Qt_core.h>
-#include <qapplication.h>
-//#include <qmainwindow.h>
-#include <map>
-
-class QPushButton;
-class SoSeparator;
-
-// I think I need these here explicitly for MOC to work
-namespace CGAL
-{
-  namespace Kinetic
-  {
-    /*  Usage main_window_= SoQt::init(argc, argv, argv[0]);
-	viewer_= new Coin_simulator_viewer(main_window_);
-	SoQt::show(main_window_); SoQt::mainLoop();
-
-	Note that for some reason QObject must come before
-	SoQtExaminerViewer in the inheritence list.
-    */
-    class SoQt_examiner_viewer : public QObject, public SoQtExaminerViewer
-    {
-      Q_OBJECT
-    public:
-      SoQt_examiner_viewer(QWidget * parent);
-
-      virtual ~SoQt_examiner_viewer(){}
-
-      void new_subgraph(SoNode *p);
-
-      void delete_subgraph(SoNode *p);
-
-      typedef internal::Qt_core Button_handler;
-      Button_handler *button_handler() {
-	return &core_;
-      }
-    protected:
-
-      virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist);
-
-      SoSeparator* root_;
-      QPushButton *play_button_, *pause_button_, *stop_button_;
-      QPushButton *play_to_button_, *play_through_button_, *reverse_button_;
-      QPushButton *faster_button_, *slower_button_;
-      internal::Qt_core core_;
-    };
-
-  };
-};
-#endif                                            // guard
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_handle.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_handle.h
deleted file mode 100644
index 809ba75..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_handle.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_COIN_POINTER_H
-#define CGAL_KINETIC_IO_COIN_POINTER_H
-#include <CGAL/basic.h>
-#include <boost/intrusive_ptr.hpp>
-#include <Inventor/nodes/SoNode.h>
-
-//class SoNode;
-void intrusive_ptr_add_ref(SoNode *n)
-{
-  n->ref();
-}
-
-
-void intrusive_ptr_release(SoNode *n)
-{
-  n->unref();
-}
-
-
-namespace CGAL {;
-
-//! A reference counting pointer for storing pointers to Inventor objects.
-/*!  Inventor objects already have reference counts built in, so I
-  have to use the existing reference count.
-*/
-template <class T>
-class SoQt_handle: public boost::intrusive_ptr<T>
-{
-private:
-  typedef boost::intrusive_ptr<T> P;
-public:
-  //! Pointer constructor
-  SoQt_handle(T* t): P(t){}
-  //! default constructor
-  SoQt_handle(): P(){}
-};
-
-} //namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h
deleted file mode 100644
index 83a49fb..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h
+++ /dev/null
@@ -1,465 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_QT_MOVING_POINT_TABLE_3_H
-#define CGAL_KINETIC_QT_MOVING_POINT_TABLE_3_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/Simulator_objects_listener.h>
-#include "SoQt_handle.h"
-
-#include <Inventor/events/SoButtonEvent.h>
-#include <Inventor/events/SoEvent.h>
-#include <Inventor/events/SoKeyboardEvent.h>
-#include <Inventor/nodekits/SoAppearanceKit.h>
-#include <Inventor/nodekits/SoShapeKit.h>
-#include <Inventor/nodes/SoCoordinate3.h>
-#include <Inventor/nodes/SoDrawStyle.h>
-#include <Inventor/nodes/SoEventCallback.h>
-#include <Inventor/nodes/SoGroup.h>
-#include <Inventor/nodes/SoMaterial.h>
-#include <Inventor/nodes/SoPointSet.h>
-#include <Inventor/nodes/SoSeparator.h>
-#include <Inventor/nodes/SoSphere.h>
-#include <Inventor/nodes/SoText2.h>
-#include <Inventor/nodes/SoTransform.h>
-#include <Inventor/sensors/SoOneShotSensor.h>
-
-namespace CGAL { namespace Kinetic {;
-
-//! A graphical moving point set in 3D
-/*!
-  This class shows how to interact with the Coin and Qt based 3D gui.
-
-  The appearance can be controlled from the keyboard.
-  - L toggles labels
-  - S draws the points as constant radius spheres
-  - P draws the points as points
-*/
-template <class SimTraits, class GUI>
-class SoQt_moving_points_3: public Ref_counted< SoQt_moving_points_3<SimTraits, GUI> >
-{
-protected:
-  typedef SoQt_moving_points_3<SimTraits, GUI> This;
-  typedef typename SimTraits::Active_points_3_table MPT;
-  typedef typename SimTraits::Simulator Simulator;
-  typedef typename GUI::Listener Gui_listener;
-  typedef typename SimTraits::Instantaneous_kernel IK;
-  typedef typename MPT::Data::Coordinate::NT NT;
-
- 
-  typedef typename SimTraits::Active_points_3_table Moving_point_table;
-
-  CGAL_KINETIC_LISTEN1(Simulator, DIRECTION_OF_TIME, reverse_time());
-  CGAL_KINETIC_LISTEN1(GUI, CURRENT_TIME, update_coordinates());
-  CGAL_KINETIC_LISTEN1(MPT, IS_EDITING, editing());
-  void editing() {
-    if (CGAL_KINETIC_NOTIFIER(MPT)->inserted_begin() != CGAL_KINETIC_NOTIFIER(MPT)->inserted_end()
-        || CGAL_KINETIC_NOTIFIER(MPT)->erased_begin() != CGAL_KINETIC_NOTIFIER(MPT)->erased_end()) {
-        update_tree();
-        update_coordinates();
-      }
-  }
-private:
-  //! This cannot be trivially copied with out ill effects
-  SoQt_moving_points_3(const This &){CGAL_error();}
-  const This operator=(const This &o) const
-  {
-
-    CGAL_error();
-  }
-
-public:
-  //! The different modes for drawing
-  typedef enum Draw_mode {POINT=1, SPHERE=0}
-    Draw_mode;
-
-  //! Defaults to outline drawing
-  SoQt_moving_points_3(SimTraits tr, typename GUI::Handle sim):  tr_(tr),
-                                                                 ik_(tr.instantaneous_kernel_object()),
-                                                                 rt_(tr.kinetic_kernel_object().reverse_time_object()) {
-    soss_= NULL;
-    draw_labels_= true;
-    radius_=.1;
-    point_size_= 5;
-    direction_of_time_=CGAL::POSITIVE;
-    sim->soqt_examiner_viewer_pointer()->getPointSizeLimits(point_size_bounds_, point_size_granularity_);
-    CGAL_KINETIC_INIT_LISTEN(MPT, tr_.active_points_3_table_handle());
-    CGAL_KINETIC_INIT_LISTEN(Simulator, tr.simulator_handle());
-    CGAL_KINETIC_INIT_LISTEN(GUI, sim);
-    set_up_scene_graph(root());
-  };
-
-  virtual ~SoQt_moving_points_3() {
-    if (soss_!= NULL) {
-      soss_->unschedule();
-      delete soss_;
-    }
-  }
-
-  //! The node where the coordinates are put.
-  SoCoordinate3 *coordinate_node() const
-  {
-    return coords_.get();
-  }
-
-  //! Set the radius to draw the points.
-  void set_radius(double radius);
-  //! The the point size.
-  void set_point_size(double ps);
-  virtual void write(std::ostream &out) const;
-
-  //! The current draw mode
-  Draw_mode draw_mode() {
-    return mode_;
-  }
-
-  //! Set whether points or balls are drawn
-  void set_draw_mode(Draw_mode dm) {
-    mode_= dm;
-    update_tree();
-    update_coordinates();
-  }
-
-  //! Set whether the point labels are displayed
-  bool draw_labels() const
-  {
-    return draw_labels_;
-  }
-  //! Set the draw_labels bit.
-  void set_draw_labels(bool tf) {
-    draw_labels_=tf;
-    update_tree();
-    update_coordinates();
-  }
-protected:
-  SoSeparator* root() const {
-    return listener_GUI_.root();
-  }
-  CGAL::Sign direction_of_time() const
-  {
-    return direction_of_time_;
-  }
-  void reverse_time();
-
-  class Guil: public Gui_listener
-  {
-  public:
-    Guil(typename GUI::Handle& h, This *t): Gui_listener(h), t_(t){}
-    void new_notification(typename Gui_listener::Notification_type nt) {
-      if (nt== Gui_listener::CURRENT_TIME) {
-	t_->update_coordinates();
-      }
-    }
-  protected:
-    This *t_;
-  };
-  friend class Guil;
-
-  void set_up_scene_graph(SoSeparator* parent);
-
-  void update_coordinates();
-
-  void update_tree();
-
-  double label_offset() {
-    return radius_;
-  }
-  double label_size() {
-    return 2*radius_;
-  }
-
-  static void update_callback(void *data, SoSensor *) {
-    This *th = reinterpret_cast<This*>(data);
-    delete th->soss_;
-    th->soss_=NULL;
-    th->update_tree();
-    th->update_coordinates();
-  }
-
-  static void keyboard_callback(void *data, SoEventCallback *eventCB) {
-    This *th = reinterpret_cast<This*>(data);
-    const SoEvent *event= eventCB->getEvent();
-    CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId()));
-    const SoKeyboardEvent *kbe= reinterpret_cast<const SoKeyboardEvent*>(event);
-    //std::cout << "Pressed " << kbe->getPrintableCharacter() << std::endl;
-    bool handled=false;
-    if (kbe->getKey()== SoKeyboardEvent::L && kbe->getState()== SoButtonEvent::UP) {
-      bool dl= th->draw_labels();
-      handled= true;
-      th->draw_labels_=!dl;
-    }
-    else if (kbe->getKey()== SoKeyboardEvent::S && kbe->getState()== SoButtonEvent::UP) {
-      th->mode_=SPHERE;
-      handled=true;
-    }
-    else if (kbe->getKey()== SoKeyboardEvent::P && kbe->getState()== SoButtonEvent::UP) {
-      th->mode_=POINT;
-      handled=true;
-    }
-    if (handled) {
-      //eventCB->setHandled();
-      if (th->soss_ ==NULL) {
-	th->soss_= new SoOneShotSensor(update_callback, th);
-	th->soss_->schedule();
-      }
-    }
-  }
-
-  unsigned int size() {
-    unsigned int ct=0;
-    for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-	 it != tr_.active_points_3_table_handle()->keys_end(); ++it, ++ct);
-    return ct;
-  }
-
-  float fix_point_size(double ps) const {
-    if (ps <= point_size_bounds_[0]) return point_size_bounds_[0];
-    else if (ps >= point_size_bounds_[1]) return point_size_bounds_[1];
-    return ps;
-  }
-
-  Draw_mode mode_;
-  bool draw_labels_;
-  double radius_;
-  SbVec2f point_size_bounds_;
-  float point_size_granularity_;
-  double point_size_;
-  SimTraits tr_;
-  IK ik_;
-  //! I don't really want this mutable, but Inventor doesn't like constant nodes
-  mutable SoQt_handle<SoCoordinate3> coords_;
-  SoQt_handle<SoGroup> spheres_;
-  SoQt_handle<SoShapeKit> points_;
-  SoQt_handle<SoDrawStyle> style_;
-  SoQt_handle<SoGroup> labels_;
-  CGAL::Sign direction_of_time_;
-  SoOneShotSensor* soss_;
-  typename SimTraits::Kinetic_kernel::Reverse_time rt_;
-};
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::update_coordinates()
-{
-  //std::cout << "updateing coordinates\n";
-  //if (parent_==NULL) return;
-  ik_.set_time(NT(CGAL_KINETIC_NOTIFIER(GUI)->current_time()));
-
-  coords_->point.setNum(size());
-  SbVec3f *pts= coords_->point.startEditing();
-
-  SbVec3f *vpts=NULL;
-  if (points_!= NULL) {
-    SoCoordinate3 *c= SO_GET_PART(points_, "coordinate3", SoCoordinate3);
-    vpts= c->point.startEditing();
-  }
-
-  int cp=0;
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-       it != tr_.active_points_3_table_handle()->keys_end(); ++it, ++cp) {
-    //std::cout << "drawing point " << *it  << "= " << ik_.to_static(*it) << std::endl;
-    typename IK::Static_kernel::Point_3 pt= ik_.current_coordinates_object()(*it);
-    pts[it->index()].setValue(CGAL::to_double(pt.x()), CGAL::to_double(pt.y()),
-			      CGAL::to_double(pt.z()));
-    if (vpts != NULL) vpts[cp].setValue(CGAL::to_double(pt.x()),
-					CGAL::to_double(pt.y()),
-					CGAL::to_double(pt.z()));
-    if (spheres_!= NULL) {
-      SoNode *n= spheres_->getChild(cp);
-      CGAL_assertion(n->isOfType(SoShapeKit::getClassTypeId()));
-      SoShapeKit *sh= reinterpret_cast<SoShapeKit*>(n);
-      SoTransform *tr= SO_GET_PART(sh, "localTransform", SoTransform);
-      tr->translation.setValue(CGAL::to_double(pt.x()), CGAL::to_double(pt.y()),
-			       CGAL::to_double(pt.z()));
-    }
-    if (labels_!= NULL) {
-      SoNode *n= labels_->getChild(cp);
-      CGAL_assertion(n->isOfType(SoShapeKit::getClassTypeId()));
-      SoShapeKit *sh= reinterpret_cast<SoShapeKit*>(n);
-      SoTransform *tr= SO_GET_PART(sh, "localTransform", SoTransform);
-      tr->translation.setValue(CGAL::to_double(pt.x())+radius_, CGAL::to_double(pt.y())+radius_,
-			       CGAL::to_double(pt.z())+radius_);
-    }
-  }
-  coords_->point.finishEditing();
-  if (vpts!= NULL) {
-    SoCoordinate3 *c= SO_GET_PART(points_, "coordinate3", SoCoordinate3);
-    c->point.finishEditing();
-  }
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::update_tree()
-{
-  //if (parent_==NULL) return;
-  int maxl=-1;
-  int num=0;
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin(); it != tr_.active_points_3_table_handle()->keys_end(); ++it) {
-    if (static_cast<int>(it->index()) > maxl) maxl= it->index();
-    ++num;
-  }
-
-  if (labels_ != NULL) {
-    root()->removeChild(labels_.get());
-    labels_=NULL;
-  }
-  if (points_ != NULL) {
-    root()->removeChild(points_.get());
-    points_=NULL;
-  }
-  if (spheres_ != NULL) {
-    root()->removeChild(spheres_.get());
-    spheres_=NULL;
-  }
-  if (maxl==-1) return;
-  //std::cout << "updateing tree\n";
-  coords_->point.setNum(maxl+1);
-  if (mode_==POINT ) {
-    points_ = new SoShapeKit;
-    SoQt_handle<SoCoordinate3> c= new SoCoordinate3;
-    c->point.setNum(num);
-    SoQt_handle<SoMaterial> mat= new SoMaterial;
-    mat->diffuseColor.setValue(.8, 0,0);
-    mat->ambientColor.setValue(.8,0,0);
-    points_->setPart("material", mat.get());
-    points_->setPart("coordinate3", c.get());
-    SoQt_handle<SoPointSet> ps= new SoPointSet;
-    ps->numPoints.setValue(num);
-    points_->setPart("shape", ps.get());
-
-    SoQt_handle<SoAppearanceKit> ak= new SoAppearanceKit;
-    ak->setPart("drawStyle", style_.get());
-    points_->setPart("appearance", ak.get());
-
-    root()->addChild(points_.get());
-  }
-  else {
-    spheres_= new SoGroup;
-    root()->addChild(spheres_.get());
-    SoQt_handle<SoMaterial> smat= new SoMaterial;
-    smat->diffuseColor.setValue(.8, 0,0);
-    for (int i=0; i< num; ++i) {
-      SoQt_handle<SoShapeKit> kit = new SoShapeKit;
-      spheres_->addChild(kit.get());
-      SoQt_handle<SoSphere> s= new SoSphere;
-      s->radius.setValue(radius_);
-      kit->setPart("shape", s.get());
-      SoQt_handle<SoTransform> tr= new SoTransform;
-      kit->setPart("localTransform", tr.get());
-      kit->setPart("material", smat.get());
-    }
-  }
-
-  if (draw_labels_ != 0) {
-    SoQt_handle<SoMaterial> mat= new SoMaterial;
-    mat->diffuseColor.setValue(1,1,1);
-    mat->emissiveColor.setValue(1,1,1);
-    labels_= new SoGroup;
-    for (typename MPT::Key_iterator kit = tr_.active_points_3_table_handle()->keys_begin();
-	 kit != tr_.active_points_3_table_handle()->keys_end(); ++kit) {
-      SoQt_handle<SoShapeKit> k = new SoShapeKit;
-      labels_->addChild(k.get());
-      SoQt_handle<SoText2> s= new SoText2;
-      std::string name = kit->string();
-      s->string.setValue(name.c_str());
-      k->setPart("shape", s.get());
-      SoQt_handle<SoTransform> tr= new SoTransform;
-      k->setPart("localTransform", tr.get());
-      k->setPart("material", mat.get());
-    }
-    root()->addChild(labels_.get());
-  }
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::set_up_scene_graph(SoSeparator* parent)
-{
-  std::cout << "add to scene graph\n";
-  SoEventCallback *myevcb= new SoEventCallback;
-  myevcb->addEventCallback(SoKeyboardEvent::getClassTypeId(),keyboard_callback, this);
-  parent->addChild(myevcb);
-
-  style_=new SoDrawStyle;
-  style_->pointSize.setValue(fix_point_size(point_size_));
-
-  coords_= new SoCoordinate3;
-
-  parent->addChild(style_.get());
-  parent->addChild(coords_.get());
-  update_tree();
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::reverse_time()
-{
-  //std::cout << "reversing time.\n";
-  if (direction_of_time_== CGAL::POSITIVE) direction_of_time_=CGAL::NEGATIVE;
-  else  direction_of_time_=CGAL::POSITIVE;
-
-  tr_.active_points_3_table_handle()->set_is_editing(true);
-  //typename MP::Traits::Reverse_time rt= tr_.active_points_3_table_pointer()->traits_object().reverse_time_object();
-  for (typename Tr::Active_points_3_table::Key_iterator kit= tr_.active_points_3_table_handle()->keys_begin(); kit != tr_.active_points_3_table_handle()->keys_end(); ++kit) {
-    tr_.active_points_3_table_handle()->set(*kit, rt_(tr_.active_points_3_table_handle()->at(*kit)));
-  }
-  tr_.active_points_3_table_handle()->set_is_editing(false);
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>:: set_radius(double radius)
-{
-  radius_=radius;
-  if (spheres_!= NULL) {
-    for (int i=0; i< spheres_->getNumChildren(); ++i) {
-      SoNode *c= spheres_->getChild(i);
-      CGAL_assertion(c->isOfType(SoShapeKit::getClassTypeId()));
-      SoShapeKit *kit= reinterpret_cast<SoShapeKit*>(c);
-      SoSphere *s= SO_GET_PART(kit, "shape", SoSphere);
-      s->radius.setValue(radius_);
-    }
-  }
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::set_point_size(double ps)
-{
-  point_size_=ps;
-  style_->pointSize.setValue(ps);
-}
-
-
-template <class Tr, class G>
-void SoQt_moving_points_3<Tr, G>::write(std::ostream &out) const
-{
-  ik_.set_time(NT(CGAL_KINETIC_NOTIFIER(GUI)->current_time()));
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-       it != tr_.active_points_3_table_handle()->keys_end(); ++it) {
-    out << *it;
-    out << ": " << ik_.current_coordinates_object()(*it) << std::endl;
-  }
-}
-
-
-} } //namespace CGAL::Kinetic;
-#endif                                            // guard
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h
deleted file mode 100644
index b8a7f1e..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h
+++ /dev/null
@@ -1,454 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_QT_MOVING_WEIGHTED_POINT_TABLE_3_H
-#define CGAL_KINETIC_QT_MOVING_WEIGHTED_POINT_TABLE_3_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/Simulator_objects_listener.h>
-#include "SoQt_handle.h"
-
-#include <Inventor/nodes/SoSeparator.h>
-#include <Inventor/nodes/SoCoordinate3.h>
-#include <Inventor/nodes/SoSphere.h>
-#include <Inventor/nodekits/SoShapeKit.h>
-#include <Inventor/nodes/SoTransform.h>
-#include <Inventor/nodes/SoPointSet.h>
-#include <Inventor/nodes/SoGroup.h>
-#include <Inventor/nodes/SoDrawStyle.h>
-#include <Inventor/nodes/SoMaterial.h>
-#include <Inventor/nodes/SoText2.h>
-#include <Inventor/nodekits/SoAppearanceKit.h>
-//#include <CGAL/Kinetic/IO/Qt_gui_3.h>
-
-#include <Inventor/events/SoEvent.h>
-#include <Inventor/events/SoButtonEvent.h>
-#include <Inventor/events/SoKeyboardEvent.h>
-#include <Inventor/nodes/SoEventCallback.h>
-#include <Inventor/sensors/SoOneShotSensor.h>
-
-namespace CGAL { namespace Kinetic {;
-
-//! A graphical moving point set in 3D
-/*!
-  This class shows how to interact with the Coin and Qt based 3D gui.
-
-  How points are drawn can be controlled from the keyboard
-  - L toggles drawing labels.
-  - S has the points be drawn as spheres with radius equal to the square root of the weight.
-  - P has the points be drawn as GL points with some (constant) size
-  - T has tbe points be drawn as transparent spheres
-*/
-template <class Traits, class GUI>
-class SoQt_moving_weighted_points_3: public Ref_counted< SoQt_moving_weighted_points_3<Traits, GUI> >
-{
-protected:
-  typedef SoQt_moving_weighted_points_3<Traits, GUI> This;
-  typedef typename Traits::Instantaneous_kernel IK;
-  typedef typename Traits::Active_points_3_table MPT;
-  typedef typename Traits::Simulator Simulator;
-  class Guil;
-
-  typedef typename MPT::Data::Coordinate::NT NT;
-
-  CGAL_KINETIC_LISTEN1(Simulator, DIRECTION_OF_TIME, reverse_time());
-  CGAL_KINETIC_LISTEN1(GUI, CURRENT_TIME, update_coordinates());
-  CGAL_KINETIC_LISTEN1(MPT, IS_EDITING, editing());
-
-private:
-  void editing() {
-    if (CGAL_KINETIC_NOTIFIER(MPT)->inserted_begin() != CGAL_KINETIC_NOTIFIER(MPT)->inserted_end()
-        || CGAL_KINETIC_NOTIFIER(MPT)->erased_begin() != CGAL_KINETIC_NOTIFIER(MPT)->erased_end()) {
-        update_tree();
-        update_coordinates();
-      }
-  }
-
-  //! This cannot be trivially copied with out ill effects
-  SoQt_moving_weighted_points_3(const This &){ CGAL_error();}
-  const This operator=(const This &o) const
-  {
-    CGAL_error();
-  }
-
-public:
-
-  //! This is for a bitfield
-  typedef enum Draw_mode {POINT=1, SPHERE=0, TRANSPARENT_SPHERE=2}
-    Draw_mode;
-
-  //! Defaults to outline drawing
-  SoQt_moving_weighted_points_3( Traits tr,
-				 typename GUI::Handle sim ): tr_(tr),
-							      ik_(tr.instantaneous_kernel_object()),
-							      rt_(tr_.kinetic_kernel_object().reverse_time_object()) {
-
-    soss_= NULL;
-    draw_labels_= true;
-    point_size_= 5;
-    direction_of_time_=CGAL::POSITIVE;
-    CGAL_KINETIC_INIT_LISTEN(MPT, tr_.active_points_3_table_handle());
-    CGAL_KINETIC_INIT_LISTEN(Simulator, tr.simulator_handle());
-    CGAL_KINETIC_INIT_LISTEN(GUI, sim);
-    set_up_scene_graph(root());
-  };
-
-  virtual ~SoQt_moving_weighted_points_3() {
-    if (soss_!= NULL) {
-      soss_->unschedule();
-      delete soss_;
-    }
-  }
-
-  //! Access the SoCoordinate3 where it puts the current coordinates.
-  SoCoordinate3 *coordinate_node() const
-  {
-    return coords_.get();
-  }
-
-  //void set_radius(double radius);
-  void set_point_size(double ps);
-  virtual void write(std::ostream &out) const;
-
-  //! The draw mode.
-  Draw_mode draw_mode() {
-    return mode_;
-  }
-
-  //! Set whether points or balls are drawn
-  void set_draw_mode(Draw_mode dm) {
-    mode_= dm;
-    update_tree();
-    update_coordinates();
-  }
-
-  //! Set whether the point labels are displayed
-  bool draw_labels() const
-  {
-    return draw_labels_;
-  }
-  //! Set if the labels are drawn
-  void set_draw_labels(bool tf) {
-    draw_labels_=tf;
-    update_tree();
-    update_coordinates();
-  }
-protected:
-
-  CGAL::Sign direction_of_time() const
-  {
-    return direction_of_time_;
-  }
-  void reverse_time();
-
-  void set_up_scene_graph(SoSeparator* parent);
-
-  void update_coordinates();
-
-  void update_tree();
-
-  double label_offset() {
-    return .1;
-  }
-  double label_size() {
-    return 2*.1;
-  }
-
-  static void update_callback(void *data, SoSensor *) {
-    This *th = reinterpret_cast<This*>(data);
-    delete th->soss_;
-    th->soss_=NULL;
-    th->update_tree();
-    th->update_coordinates();
-  }
-
-  static void keyboard_callback(void *data, SoEventCallback *eventCB) {
-    This *th = reinterpret_cast<This*>(data);
-    const SoEvent *event= eventCB->getEvent();
-    CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId()));
-    const SoKeyboardEvent *kbe= reinterpret_cast<const SoKeyboardEvent*>(event);
-    //std::cout << "Pressed " << kbe->getPrintableCharacter() << std::endl;
-    bool handled=false;
-    if (kbe->getKey()== SoKeyboardEvent::L && kbe->getState()== SoButtonEvent::UP) {
-      bool dl= th->draw_labels();
-      handled= true;
-      th->draw_labels_=!dl;
-    }
-    else if (kbe->getKey()== SoKeyboardEvent::S && kbe->getState()== SoButtonEvent::UP) {
-      th->mode_=SPHERE;
-      handled=true;
-    }
-    else if (kbe->getKey()== SoKeyboardEvent::P && kbe->getState()== SoButtonEvent::UP) {
-      th->mode_=POINT;
-      handled=true;
-    }
-    else if (kbe->getKey()== SoKeyboardEvent::T && kbe->getState()== SoButtonEvent::UP) {
-      th->mode_=TRANSPARENT_SPHERE;
-      handled=true;
-    }
-    if (handled) {
-      // let keystrokes be reused
-      // eventCB->setHandled();
-      if (th->soss_ ==NULL) {
-	th->soss_= new SoOneShotSensor(update_callback, th);
-	th->soss_->schedule();
-      }
-
-    }
-  }
-
-  unsigned int size() {
-    /*unsigned int ct=0;
-      for (typename MPT::Keys_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-      it != tr_.active_points_3_table_handle()->keys_end(); ++it, ++ct);
-      return ct;*/
-    return tr_.active_points_3_table_handle()->size();
-  }
-
-  SoSeparator* root() const {
-    return listener_GUI_.root();
-  }
-
-  Traits tr_;
-  Draw_mode mode_;
-  bool draw_labels_;
-  double point_size_;
-  IK ik_;
-  //! I don't really want this mutable, but Inventor doesn't like constant nodes
-  mutable SoQt_handle<SoCoordinate3> coords_;
-  SoQt_handle<SoGroup> spheres_;
-  SoQt_handle<SoShapeKit> points_;
-  SoQt_handle<SoDrawStyle> style_;
-  SoQt_handle<SoGroup> labels_;
-  CGAL::Sign direction_of_time_;
-  SoOneShotSensor* soss_;
-  typename Traits::Kinetic_kernel::Reverse_time rt_;
-};
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::update_coordinates()
-{
-  //std::cout << "updateing coordinates\n";
-  //if (parent_==NULL) return;
-  ik_.set_time(NT(CGAL_KINETIC_NOTIFIER(GUI)->current_time()));
-
-  coords_->point.setNum(size());
-  SbVec3f *pts= coords_->point.startEditing();
-
-  SbVec3f *vpts=NULL;
-  if (points_!= NULL) {
-    SoCoordinate3 *c= SO_GET_PART(points_, "coordinate3", SoCoordinate3);
-    vpts= c->point.startEditing();
-  }
-
-  int cp=0;
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-       it != tr_.active_points_3_table_handle()->keys_end(); ++it, ++cp) {
-    //std::cout << "drawing point " << *it  << "= " << ik_.to_static(*it) << std::endl;
-    typename IK::Static_kernel::Weighted_point pt= ik_.current_coordinates_object()(*it);
-    double w= CGAL::to_double(pt.weight());
-    if (w < 0) w=0;
-    double radius = std::sqrt(w);
-    pts[it->index()].setValue(CGAL::to_double(pt.point().x()), CGAL::to_double(pt.point().y()),
-			      CGAL::to_double(pt.point().z()));
-    if (vpts != NULL) vpts[cp].setValue(CGAL::to_double(pt.point().x()),
-					CGAL::to_double(pt.point().y()),
-					CGAL::to_double(pt.point().z()));
-    if (spheres_!= NULL) {
-      SoNode *n= spheres_->getChild(cp);
-      CGAL_assertion(n->isOfType(SoShapeKit::getClassTypeId()));
-      SoShapeKit *sh= reinterpret_cast<SoShapeKit*>(n);
-      SoTransform *tr= SO_GET_PART(sh, "localTransform", SoTransform);
-      tr->translation.setValue(CGAL::to_double(pt.point().x()),
-			       CGAL::to_double(pt.point().y()),
-			       CGAL::to_double(pt.point().z()));
-      SoSphere *sph= SO_GET_PART(sh, "shape", SoSphere);
-      sph->radius.setValue(radius);
-    }
-    if (labels_!= NULL) {
-      double offset;
-      if (mode_ == POINT) {
-	offset=label_offset();
-      }
-      else {
-	offset= 1.2*radius/std::sqrt(3.0);
-      }
-      SoNode *n= labels_->getChild(cp);
-      CGAL_assertion(n->isOfType(SoShapeKit::getClassTypeId()));
-      SoShapeKit *sh= reinterpret_cast<SoShapeKit*>(n);
-      SoTransform *tr= SO_GET_PART(sh, "localTransform", SoTransform);
-      tr->translation.setValue(CGAL::to_double(pt.point().x())+offset, CGAL::to_double(pt.point().y())+offset,
-			       CGAL::to_double(pt.point().z())+offset);
-    }
-  }
-  coords_->point.finishEditing();
-  if (vpts!= NULL) {
-    SoCoordinate3 *c= SO_GET_PART(points_, "coordinate3", SoCoordinate3);
-    c->point.finishEditing();
-  }
-}
-
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::update_tree()
-{
-  //if (parent_==NULL) return;
-  int maxl=-1;
-  int num=0;
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin(); it != tr_.active_points_3_table_handle()->keys_end(); ++it) {
-    if (static_cast<int>(it->index()) > maxl) maxl= it->index();
-    ++num;
-  }
-
-  if (labels_ != NULL) {
-    root()->removeChild(labels_.get());
-    labels_=NULL;
-  }
-  if (points_ != NULL) {
-    root()->removeChild(points_.get());
-    points_=NULL;
-  }
-  if (spheres_ != NULL) {
-    root()->removeChild(spheres_.get());
-    spheres_=NULL;
-  }
-  if (maxl==-1) return;
-  //std::cout << "updateing tree\n";
-  coords_->point.setNum(maxl+1);
-  if (mode_==POINT ) {
-    points_ = new SoShapeKit;
-    SoQt_handle<SoCoordinate3> c= new SoCoordinate3;
-    c->point.setNum(num);
-    SoQt_handle<SoMaterial> mat= new SoMaterial;
-    mat->diffuseColor.setValue(.8, 0,0);
-    mat->ambientColor.setValue(.8,0,0);
-    points_->setPart("material", mat.get());
-    points_->setPart("coordinate3", c.get());
-    SoQt_handle<SoPointSet> ps= new SoPointSet;
-    ps->numPoints.setValue(num);
-    points_->setPart("shape", ps.get());
-
-    SoQt_handle<SoAppearanceKit> ak= new SoAppearanceKit;
-    ak->setPart("drawStyle", style_.get());
-    points_->setPart("appearance", ak.get());
-
-    root()->addChild(points_.get());
-  }
-  else {
-    spheres_= new SoGroup;
-    root()->addChild(spheres_.get());
-    SoQt_handle<SoMaterial> smat= new SoMaterial;
-    smat->diffuseColor.setValue(.8, 0,0);
-    if (mode_== TRANSPARENT_SPHERE) {
-      smat->transparency.setValue(.5);
-    }
-    for (int i=0; i< num; ++i) {
-      SoQt_handle<SoShapeKit> kit = new SoShapeKit;
-      spheres_->addChild(kit.get());
-      SoQt_handle<SoSphere> s= new SoSphere;
-      s->radius.setValue(.01);
-      kit->setPart("shape", s.get());
-      SoQt_handle<SoTransform> tr= new SoTransform;
-      kit->setPart("localTransform", tr.get());
-      kit->setPart("material", smat.get());
-    }
-  }
-
-  if (draw_labels_ != 0) {
-    SoQt_handle<SoMaterial> mat= new SoMaterial;
-    mat->diffuseColor.setValue(1,1,1);
-    mat->emissiveColor.setValue(1,1,1);
-    labels_= new SoGroup;
-    for (typename MPT::Key_iterator kit = tr_.active_points_3_table_handle()->keys_begin();
-	 kit != tr_.active_points_3_table_handle()->keys_end(); ++kit) {
-      SoQt_handle<SoShapeKit> k = new SoShapeKit;
-      labels_->addChild(k.get());
-      SoQt_handle<SoText2> s= new SoText2;
-      std::string name = kit->string();
-      s->string.setValue(name.c_str());
-      k->setPart("shape", s.get());
-      SoQt_handle<SoTransform> tr= new SoTransform;
-      k->setPart("localTransform", tr.get());
-      k->setPart("material", mat.get());
-    }
-    root()->addChild(labels_.get());
-  }
-}
-
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::set_up_scene_graph(SoSeparator* parent)
-{
-  std::cout << "add to scene graph\n";
-  SoEventCallback *myevcb= new SoEventCallback;
-  myevcb->addEventCallback(SoKeyboardEvent::getClassTypeId(),keyboard_callback, this);
-  parent->addChild(myevcb);
-
-  style_=new SoDrawStyle;
-  style_->pointSize.setValue(point_size_);
-
-  coords_= new SoCoordinate3;
-
-  parent->addChild(style_.get());
-  parent->addChild(coords_.get());
-  update_tree();
-}
-
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::reverse_time()
-{
-  //std::cout << "reversing time.\n";
-  if (direction_of_time_== CGAL::POSITIVE) direction_of_time_=CGAL::NEGATIVE;
-  else  direction_of_time_=CGAL::POSITIVE;
-
-  tr_.active_points_3_table_handle()->set_is_editing(true);
-  //typename MP::Traits::Reverse_time rt= tr_.active_points_3_table_handle()->traits_object().reverse_time_object();
-  for (typename MPT::Key_iterator kit= tr_.active_points_3_table_handle()->keys_begin(); kit != tr_.active_points_3_table_handle()->keys_end(); ++kit) {
-    tr_.active_points_3_table_handle()->set(*kit, rt_(tr_.active_points_3_table_handle()->at(*kit)));
-  }
-  tr_.active_points_3_table_handle()->set_is_editing(false);
-}
-
-
-//s->radius.setValue(radius_);
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::set_point_size(double ps)
-{
-  point_size_=ps;
-  style_->pointSize.setValue(ps);
-}
-
-
-template <class T, class G>
-void SoQt_moving_weighted_points_3<T,G>::write(std::ostream &out) const
-{
-  ik_.set_time(NT(CGAL_KINETIC_NOTIFIER(GUI)->current_time()));
-  for (typename MPT::Key_iterator it= tr_.active_points_3_table_handle()->keys_begin();
-       it != tr_.active_points_3_table_handle()->keys_end(); ++it) {
-    out << *it;
-    out << ": " << ik_.current_coordinates_object()(*it) << std::endl;
-  }
-}
-
-
-} } //namespace CGAL::Kinetic;
-#endif                                            // guard
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h
deleted file mode 100644
index a22defd..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h
+++ /dev/null
@@ -1,427 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_COIN_KINETIC_TRIANGULATION_3_H
-#define CGAL_COIN_KINETIC_TRIANGULATION_3_H
-
-#include <CGAL/Kinetic/basic.h>
-
-// Inventor parts
-#include <Inventor/nodes/SoSeparator.h>
-#include <Inventor/nodekits/SoShapeKit.h>
-#include <Inventor/nodekits/SoAppearanceKit.h>
-#include <Inventor/nodes/SoMaterial.h>
-#include <Inventor/nodes/SoShapeHints.h>
-#include <Inventor/nodes/SoIndexedFaceSet.h>
-#include <Inventor/nodes/SoIndexedLineSet.h>
-#include <Inventor/nodes/SoMaterialBinding.h>
-#include <Inventor/nodes/SoDrawStyle.h>
-#include <Inventor/SoOutput.h>
-#include <Inventor/actions/SoWriteAction.h>
-
-#include <Inventor/events/SoEvent.h>
-#include <Inventor/events/SoButtonEvent.h>
-#include <Inventor/events/SoKeyboardEvent.h>
-#include <Inventor/nodes/SoEventCallback.h>
-
-#include "SoQt_handle.h"
-
-#include <CGAL/Kinetic/internal/triangulation_helpers_3.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-
-namespace CGAL { namespace Kinetic {
-
-//! A class to display a 3D triangulation.
-/*!
-
-*/
-template <class KDel, class Qtgui, class Qtmpt>
-class SoQt_triangulation_3: public Ref_counted<SoQt_triangulation_3<KDel, Qtgui, Qtmpt> >
-{
-protected:
-
-  typedef SoQt_triangulation_3<KDel, Qtgui, Qtmpt> This;
-  typedef typename KDel::Triangulation::Facet Facet;
-  typedef typename KDel::Triangulation::Edge Edge;
-  typedef typename KDel::Triangulation::Facet_circulator Facet_circulator;
-  typedef typename KDel::Triangulation::Cell_circulator Cell_circulator;
-  typedef typename KDel::Triangulation::Finite_edges_iterator Finite_edges_iterator;
-  typedef typename KDel::Triangulation::Finite_facets_iterator Finite_facets_iterator;
-  typedef typename KDel::Triangulation::Edge_iterator Edge_iterator;
-  typedef typename KDel::Triangulation::Facet_iterator Facet_iterator;
-  typedef typename KDel::Triangulation::Vertex_handle Vertex_handle;
-  typedef typename KDel::Triangulation::Cell_handle Cell_handle;
-  typedef typename KDel::Triangulation::All_cells_iterator All_cells_iterator;
-  typedef typename KDel::Triangulation::All_edges_iterator All_edges_iterator;
-
-  typedef typename KDel::Triangulation::Geom_traits::Point_3 Object_key;
-
-  void nothing() const{}
-
-  CGAL_KINETIC_LISTEN1(Qtgui, CURRENT_TIME, nothing());
-  CGAL_KINETIC_LISTEN1(KDel, TRIANGULATION, generate_geometry());
-
-  typedef enum {NO_CERT=0, UNFAILING_CERT=1, CERT=2, NEXT_CERT=3, HIDE=-1}
-    Color_id;
-
-  typename KDel::Triangulation::Vertex_handle facet_vertex(typename KDel::Triangulation::Facet f, int i) {
-    return internal::vertex_of_facet(f, i);
-  }
-
-  typename KDel::Triangulation::Vertex_handle edge_vertex(typename KDel::Triangulation::Edge f, int i) {
-    if (i==0) return f.first->vertex(f.second);
-    else return f.first->vertex(f.third);
-  }
-
-public:
-
-  //! The type for draw styles.
-  /*!
-    The currently supported styles are HIDDEN, SHOWN and TRANSPARENT.
-  */
-  typedef enum {HIDDEN, SHOWN, TRANSPARENT}
-    Draw_style;
-
-  //! Initialize everything.
-  /*!
-    Sorry about all the arguments, but they are needed, I think.
-  */
-  SoQt_triangulation_3(typename KDel::Handle kdel,
-		       typename Qtgui::Handle qtgui,
-		       typename Qtmpt::Handle mps): coordinates_(mps->coordinate_node()),
-						     convex_hull_(SHOWN),
-						     facets_style_(SHOWN){
-    CGAL_KINETIC_INIT_LISTEN(Qtgui, qtgui);
-    CGAL_KINETIC_INIT_LISTEN(KDel, kdel);
-    set_scene_graph_parent(root());
-    //if (0) kk.orientation_3_object();
-    // for some reason it does not parse if I remove kk above, I want to get rid of the variable not used warning
-  }
-
-  //! The field for how the convex hull is drawn.
-  Draw_style convex_hull_draw_style() {
-    return convex_hull_;
-  }
-
-  //! Setting the convex hull draw style field.
-  void set_convex_hull_draw_style(Draw_style ds) {
-    convex_hull_=ds;
-    generate_geometry();
-  }
-
-  //! The draw style for non-convex-hull faces.
-  Draw_style facets_draw_style() const
-  {
-    return facets_style_;
-  }
-  //! Set the draw style for non0convex hull faces
-  void set_facets_draw_style(Draw_style ds) {
-    facets_style_= ds;
-    generate_geometry();
-  }
-
-protected:
-  CGAL::SoQt_handle<SoSeparator> parent_;
-  CGAL::SoQt_handle<SoShapeKit> facets_kit_;
-  CGAL::SoQt_handle<SoIndexedFaceSet> facets_;
-  CGAL::SoQt_handle<SoShapeKit> edges_kit_;
-  CGAL::SoQt_handle<SoIndexedLineSet> edges_;
-  CGAL::SoQt_handle<SoCoordinate3> coordinates_;
-  Draw_style convex_hull_;
-  Draw_style facets_style_;
-  SoSeparator* root() const {
-    return listener_Qtgui_.root();
-  }
-
-  const typename KDel::Triangulation& triangulation() const
-  {
-    return CGAL_KINETIC_NOTIFIER(KDel)->triangulation();
-  }
-
-  void set_scene_graph_parent(SoSeparator* sep);
-
-  static void keyboard_callback(void *data, SoEventCallback *eventCB) {
-    This *th = reinterpret_cast<This*>(data);
-    const SoEvent *event= eventCB->getEvent();
-    CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId()));
-    const SoKeyboardEvent *kbe= reinterpret_cast<const SoKeyboardEvent*>(event);
-    //std::cout << "Pressed " << kbe->getPrintableCharacter() << std::endl;
-    if (kbe->getKey()== SoKeyboardEvent::H && kbe->getState()== SoButtonEvent::UP) {
-      Draw_style ds= th->convex_hull_draw_style();
-      switch (ds) {
-      case HIDDEN: ds= SHOWN; break;
-      case SHOWN: ds= HIDDEN; break;
-      default:                      // disable error message
-	;                         // this is needed to compile
-      }
-      eventCB->setHandled();
-      //std::cout << "H pushed.\n";
-      th->set_convex_hull_draw_style(ds);
-    }
-    else if (kbe->getKey() == SoKeyboardEvent::F && kbe->getState()==SoButtonEvent::UP) {
-      Draw_style ds= th->facets_draw_style();
-      switch (ds) {
-      case HIDDEN: ds= SHOWN; break;
-      case SHOWN: ds= HIDDEN; break;
-      default:                      // disable error message
-	;                         // this is needed to compile
-      }
-      eventCB->setHandled();
-      //std::cout << "H pushed.\n";
-      th->set_facets_draw_style(ds);
-    }
-  }
-
-  Color_id color(const Facet &f) const
-  {
-    if (facets_draw_style()== HIDDEN) return HIDE;
-    bool hinf=false;
-    for (int i=0; i<4; ++i) {
-      if (!f.first->vertex(i)->point().is_valid()) {
-	hinf=true;
-	break;
-      }
-    }
-    if (!triangulation().mirror_vertex(f.first, f.second)->point().is_valid()) hinf=true;
-
-    if (hinf && convex_hull_== HIDDEN) return HIDE;
-
-    if (internal::has_degree_3(triangulation(), f)) {
-      return NO_CERT;
-    }
-    else if (internal::facet_label(f).is_valid()) {
-      return CERT;
-    }
-    else {
-      for (unsigned int i=0; i< 3; ++i) {
-	CGAL_assertion(!internal::edge_label(internal::facet_edge(f, i)).is_valid());
-      }
-      return UNFAILING_CERT;
-    }
-  }
-
-  Color_id color(const Edge &f) const
-  {
-    if (!internal::has_degree_3(triangulation(), f)) return HIDE;
-    if (!internal::edge_label(f).is_valid()) {
-      return CERT;
-    }
-    else {
-      return UNFAILING_CERT;
-    }
-  }
-
-  void generate_geometry();
-};
-
-template <class K, class G, class M>
-void SoQt_triangulation_3<K, G, M>::set_scene_graph_parent(SoSeparator* sep)
-{
-  parent_=sep;
-
-  CGAL::SoQt_handle<SoEventCallback> myevcb= new SoEventCallback;
-  myevcb->addEventCallback(SoKeyboardEvent::getClassTypeId(),keyboard_callback, this);
-  parent_->addChild(myevcb.get());
-
-  {
-    facets_kit_ = new SoShapeKit;
-    facets_kit_->setName("Delaunay_facets_kit");
-    {
-      CGAL::SoQt_handle<SoAppearanceKit> ap= new SoAppearanceKit;
-      {
-	CGAL::SoQt_handle<SoMaterial> mat= new SoMaterial;
-	mat->setName("Facet_material");
-	mat->ambientColor.setNum(4);
-	mat->diffuseColor.setNum(4);
-	mat->specularColor.setNum(4);
-	mat->emissiveColor.setNum(4);
-	mat->shininess.setNum(4);
-	mat->transparency.setNum(4);
-	for (unsigned int i=0; i< 4; ++i) {
-	  mat->ambientColor.set1Value(i, SbColor(0.2,0.2,0.2));
-	  mat->specularColor.set1Value(i, SbColor(0.0, 0.0, 0.0));
-	  mat->emissiveColor.set1Value(i, SbColor(0.0,0.0,0.0));
-	  mat->shininess.set1Value(i, .2);
-	  mat->transparency.set1Value(i, 0.0);
-	}
-	mat->diffuseColor.set1Value(0, SbColor(0.3, 0.3, 0.3));
-	mat->diffuseColor.set1Value(1, SbColor(0.4, 0.4, 0.1));
-	mat->diffuseColor.set1Value(2, SbColor(0.1, 0.7, 0.7));
-	mat->diffuseColor.set1Value(3, SbColor(1.0, 0.0, 0.0));
-	ap->setPart("material", mat.get());
-      }
-      facets_kit_->setPart("appearance", ap.get());
-    }
-    facets_kit_->setPart("coordinate3", coordinates_.get());
-    {
-      CGAL::SoQt_handle< SoShapeHints> hint= new SoShapeHints;
-      hint->vertexOrdering.setValue(SoShapeHints::CLOCKWISE);
-      hint->shapeType.setValue(SoShapeHints::UNKNOWN_SHAPE_TYPE);
-      hint->faceType.setValue(SoShapeHints::CONVEX);
-      hint->creaseAngle.setValue(0);
-      facets_kit_->setPart("shapeHints", hint.get());
-    }
-    {
-      CGAL::SoQt_handle<SoMaterialBinding> bind= new SoMaterialBinding;
-      bind->value.setValue(SoMaterialBinding::PER_FACE_INDEXED);
-      facets_kit_->setPart("materialBinding", bind.get());
-    }
-    {
-      facets_= new SoIndexedFaceSet;
-      facets_->coordIndex.setNum(0);
-      facets_kit_->setPart("shape",facets_.get());
-    }
-    parent_->addChild(facets_kit_.get());
-  }
-
-  {
-    edges_kit_= new SoShapeKit;
-    edges_kit_->setName("Delaunay_edges_kit");
-    {
-      CGAL::SoQt_handle<SoAppearanceKit> ap= new SoAppearanceKit;
-      {
-	CGAL::SoQt_handle<SoMaterial> mat= new SoMaterial;
-	mat->setName("Edges_material");
-	mat->ambientColor.setNum(4);
-	mat->diffuseColor.setNum(4);
-	mat->specularColor.setNum(4);
-	mat->emissiveColor.setNum(4);
-	mat->shininess.setNum(4);
-	mat->transparency.setNum(4);
-	for (unsigned int i=0; i< 4; ++i) {
-	  mat->specularColor.set1Value(i, SbColor(0.0, 0.0, 0.0));
-	  mat->emissiveColor.set1Value(i, SbColor(1.0,0.0,0.0));
-	  mat->ambientColor.set1Value(i, SbColor(0.0,1.0,0.0));
-	  mat->diffuseColor.set1Value(i, SbColor(0.0,0.0,1.0));
-	  mat->shininess.set1Value(i, .2);
-	  mat->transparency.set1Value(i, 0.0);
-	}
-	mat->diffuseColor.set1Value(0, SbColor(0.3, 0.3, 0.6));
-	mat->diffuseColor.set1Value(1, SbColor(0.4, 0.4, 0.1));
-	mat->diffuseColor.set1Value(2, SbColor(0.1, 0.7, 0.1));
-	mat->diffuseColor.set1Value(3, SbColor(1.0, 0.0, 0.0));
-
-	ap->setPart("material", mat.get());
-      }
-      {
-	CGAL::SoQt_handle<SoDrawStyle> ds= new SoDrawStyle;
-	ds->lineWidth.setValue(2);
-	ap->setPart("drawStyle", ds.get());
-      }
-      edges_kit_->setPart("appearance", ap.get());
-    }
-    edges_kit_->setPart("coordinate3", coordinates_.get());
-    edges_kit_->setPart("shapeHints", facets_kit_->getPart("shapeHints", true));
-    edges_kit_->setPart("materialBinding", facets_kit_->getPart("materialBinding", true));
-    {
-      edges_= new SoIndexedLineSet;
-      edges_->coordIndex.setNum(0);
-      edges_kit_->setPart("shape", edges_.get());
-    }
-    parent_->addChild(edges_kit_.get());
-  }
-}
-
-
-template <class K, class G, class M>
-void SoQt_triangulation_3<K,G,M>::generate_geometry()
-{
-  if (parent_==NULL) return;
-  if (triangulation().dimension() != 3) return;
-  //print();
-  unsigned int facet_count=0;
-  unsigned int edge_count=0;
-  for (Finite_facets_iterator ffi= triangulation().finite_facets_begin();
-       ffi != triangulation().finite_facets_end(); ++ffi) {
-    if (color(*ffi) != HIDE) ++facet_count;
-  }
-  for (Finite_edges_iterator fei= triangulation().finite_edges_begin();
-       fei != triangulation().finite_edges_end(); ++fei) {
-    if (color(*fei) != HIDE) ++edge_count;
-  }
-  facets_->coordIndex.setNum(4*facet_count);
-  facets_->materialIndex.setNum(facet_count);
-  edges_->coordIndex.setNum(3*edge_count);
-  edges_->materialIndex.setNum(edge_count);
-  {
-    int *coords= facets_->coordIndex.startEditing();
-    int *mat = facets_->materialIndex.startEditing();
-    unsigned int index=0, matindex=0;
-    for (Finite_facets_iterator ffi= triangulation().finite_facets_begin();
-	 ffi != triangulation().finite_facets_end(); ++ffi) {
-      Color_id id= color(*ffi);
-      if (id == HIDE) {
-
-      }
-      else {
-	coords[index]= facet_vertex(*ffi, 0)->point().index();
-	//coords[index]= ffi->vertex(0)->point().index();
-	++index;;
-	coords[index]= facet_vertex(*ffi, 1)->point().index();
-	++index;
-	coords[index]= facet_vertex(*ffi, 2)->point().index();
-	++index;
-	coords[index]= SO_END_LINE_INDEX;
-	++index;
-
-	mat[matindex]= id;
-	++matindex;
-      }
-    }
-    facets_->coordIndex.finishEditing();
-    facets_->materialIndex.finishEditing();
-  }
-
-  {
-    int *coords= edges_->coordIndex.startEditing();
-    int *mat = edges_->materialIndex.startEditing();
-    unsigned int index=0, matindex=0;
-    for (Finite_edges_iterator fei= triangulation().finite_edges_begin();
-	 fei != triangulation().finite_edges_end(); ++fei) {
-      Color_id id= color(*fei);
-      if (id == HIDE) {
-
-      }
-      else {
-	Object_key k= edge_vertex(*fei, 0)->point();
-	coords[index]= k.index();
-	++index;
-	k= edge_vertex(*fei, 1)->point();
-	coords[index]=k.index();
-	++index;
-	coords[index]= SO_END_LINE_INDEX;
-	++index;
-
-	mat[matindex]= id;
-	++matindex;
-      }
-    }
-    edges_->coordIndex.finishEditing();
-    edges_->materialIndex.finishEditing();
-  }
-
-  //SoOutput out;
-  //out.openFile("output.iv");
-  //SoWriteAction wa(&out);
-  //wa.apply(parent_.get());
-};
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_widget_3.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_widget_3.h
deleted file mode 100644
index 604c1e6..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/SoQt_widget_3.h
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_QT_SIMULATOR_3_H_
-#define CGAL_KINETIC_IO_QT_SIMULATOR_3_H_
-#include <CGAL/Kinetic/basic.h>
-#include "SoQt_handle.h"
-#include <CGAL/Kinetic/IO/internal/GUI_base.h>
-#include "SoQt_examiner_viewer.h"
-#include <CGAL/Kinetic/IO/internal/Qt_timer.h>
-#include <CGAL/Kinetic/Listener.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <Inventor/Qt/SoQt.h>
-#include <Inventor/nodes/SoSeparator.h>
-
-class SoSeparator;
-
-namespace CGAL { namespace Kinetic {;
-
-//! This provides a GUI in 3D using Coin.
-/*!  If you want to draw something, extend
-  SoQt_widget_3::Listener. SoQt_widget_3::Listener, in addition to the fields of
-  CGAL::Listener, has an extra field root() which provides a
-  SoSeperator node to act as the root of any scene graph nodes you
-  wish to use.
-
-  The GUI uses the SoQt widget set so Qt must be installed (it is
-  needed for 2D also).
-
-  An example using this GUI and SoQt_moving_points_3 and
-  SoQt_moving_weighted_points_3 can be found in \example 3d_gui.cc.
-*/
-template <class Simulator_t>
-class SoQt_widget_3:
-  public Ref_counted<SoQt_widget_3<Simulator_t> >
-{
-protected:
-  typedef SoQt_widget_3<Simulator_t> This;
-  typedef Gui_base<Simulator_t,  internal::Qt_timer> Graphical_base;
-  typedef typename Simulator_t::Time Time;
-  typedef typename internal::Qt_core_listener<Graphical_base> Window_listener;
-public:
-
-  typedef Simulator_t Simulator;
-
-  //! construct things
-  SoQt_widget_3(int argc, char *argv[], typename Simulator::Handle sh):
-    base_(new Graphical_base(sh)),
-    window_l_(base_){
-    CGAL_KINETIC_INIT_LISTEN(Graphical_base, base_);
-    main_window_= SoQt::init(argc, argv, argv[0]);
-    viewer_= new SoQt_examiner_viewer(main_window_);
-    SoQt::show(main_window_);
-    window_l_.set_notifier(viewer_->button_handler());
-  }
-
-  virtual ~SoQt_widget_3(){}
-
-  //! start the gui
-  int begin_event_loop() {
-    update_coordinates();
-    SoQt::mainLoop();
-    return 0;
-  }
-
-  //! Return a (reference counted) pointer to the simulator.
-  typename Simulator::Handle& simulator() {
-    return base_->simulator();
-  }
-  //! Return a const (reference counted) pointer to the simulator
-  typename Simulator::Handle simulator() const
-  {
-    return base_->simulator();
-  }
-
-  //! Get the current time as a double.
-  double current_time() const
-  {
-    return base_->current_time();
-  }
-
-  SoQt_examiner_viewer* soqt_examiner_viewer_pointer() const  {
-    return  viewer_;
-  }
-
-  /*class Listener_core
-  {
-  public:
-    typedef typename This::Handle Notifier_handle;
-    typedef enum {CURRENT_TIME}
-      Notification_type;
-
-    SoSeparator* root() {
-      return parent_.get();
-    }
-
-    Listener_core(){}
-  private:
-    friend class SoQt_widget_3<Simulator_t>;
-    void set_root(SoSeparator* p) {
-      parent_=SoQt_handle<SoSeparator>(p);
-    }
-    SoQt_handle<SoSeparator> parent_;
-  };
-  */
-  //! Extend this object to listen for events.
-  /*!  If you create an instance of this listener, you will
-    automatically be subscribed.
-  */
-  //typedef Multi_listener<Listener_core> Listener;
-  //friend class Multi_listener<Listener_core>;
-
-  struct Listener_core{						
-    typedef typename This::Handle Notifier_handle;		
-    typedef enum {CURRENT_TIME} Notification_type;
-    SoSeparator* root() const {
-      return parent_.get();
-    }
-  private:
-    friend class SoQt_widget_3<Simulator_t>;
-    void set_root(SoSeparator* p) {
-      parent_=SoQt_handle<SoSeparator>(p);
-    }
-    SoQt_handle<SoSeparator> parent_;
-  };								
-public:								
- 
-  typedef Multi_listener_base<Listener_core> Listener;
-  friend class Multi_listener_base<Listener_core> ;
-private:							
- void new_listener(Listener *sk) {				
-   listeners_.push_back(sk);
-   SoSeparator* sep= new SoSeparator;
-   viewer_->new_subgraph(sep);
-   sk->set_root(sep);
- }								
- void delete_listener(Listener *kds) {				
-   for (unsigned int i=0; i< listeners_.size(); ++i){		
-     if (listeners_[i] == kds) {				
-       std::swap(listeners_[i], listeners_.back());		
-       listeners_.pop_back();	
-       viewer_->delete_subgraph(kds->root());
-       return;							
-     }								
-   }								
- }								
- std::vector<Listener*> listeners_;
-
-private:
-
-  CGAL_KINETIC_LISTEN1(Graphical_base, CURRENT_TIME, update_coordinates());
-
-  void update_coordinates() {
-    CGAL_KINETIC_MULTINOTIFY(CURRENT_TIME);
-  }
-protected:
-  typename Graphical_base::Handle base_;
-  QWidget *main_window_;
-  SoQt_examiner_viewer* viewer_;
-  Window_listener window_l_;
-};
-
-} } //namespace CGAL::Kinetic;
-#endif                                            // qt
diff --git a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/control_coin.h b/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/control_coin.h
deleted file mode 100644
index f17645f..0000000
--- a/3rdparty/CGAL-4.6/demo/Kinetic_data_structures/include/control_coin.h
+++ /dev/null
@@ -1 +0,0 @@
-#define CGAL_USE_COIN
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/CMakeLists.txt
deleted file mode 100644
index 0b7cb87..0000000
--- a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (L1_voronoi_diagram_2)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ./include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES L1_voronoi_diagram_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc )
-
-# The executable itself.
-add_executable  ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS L1_voronoi_diagram_2 )
-
-# Link with Qt libraries
-target_link_libraries( L1_voronoi_diagram_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp b/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp
deleted file mode 100644
index 4d02c18..0000000
--- a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL:  $
-// $Id:  $
-// 
-//
-// Author(s)     : Ophir Setter <ophirset at post.tau.ac.il>
-//                 
-
-// CGAL headers
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/envelope_3.h>
-#include <CGAL/L1_voronoi_traits_2.h>
-#include <CGAL/point_generators_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-#include <fstream>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/ArrangementGraphicsItem.h>
-#include <CGAL/Qt/ArrangementPointInput.h>
-#include <CGAL/Qt/SetGraphicsItem.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_L1_voronoi_diagram_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef Kernel::FT                                       Number_type;
-typedef Kernel::Iso_rectangle_2                          Iso_rectangle_2;
-typedef Kernel::Point_2                                  Point_2;
-typedef std::vector<Point_2>                             Points;
-
-typedef CGAL::L1_voronoi_traits_2<Kernel>                Traits_3;
-typedef Traits_3::Surface_3                              Surface_3;
-typedef CGAL::Envelope_diagram_2<Traits_3>               Envelope_diagram_2;
-
-namespace CGAL {
-  template <typename Kernel, typename T>
-  Qt::PainterOstream<T>&
-  operator<< (Qt::PainterOstream<T>& os,
-              const Arr_linear_object_2<Kernel> &obj) {
-    if (obj.is_segment())
-      os << obj.segment();
-    else if (obj.is_ray())
-      os << obj.ray();
-    else
-      os << obj.line();
-    
-    return os;
-  }
-}
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::L1_voronoi_diagram_2
-{
-  Q_OBJECT
-  
-private:
-  Points m_sites;
-  Envelope_diagram_2 *m_envelope_diagram;
-  QGraphicsScene m_scene;  
-
-  CGAL::Qt::ArrangementGraphicsItem<Envelope_diagram_2> *m_graphics_item;
-  CGAL::Qt::SetGraphicsItem<Points> * m_sites_graphics_item;
-  CGAL::Qt::ArrangementPointInput<Envelope_diagram_2> * m_pi;
-
-
-  void calculate_envelope();
-  QRectF bounding_rect();
-
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionInsertPoint_toggled(bool checked);
-
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void on_actionShowVoronoi_toggled(bool checked);
-
-  void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  // Add a GraphicItem for the diagram
-  m_envelope_diagram = new Envelope_diagram_2();
-  m_graphics_item = new CGAL::Qt::ArrangementGraphicsItem<Envelope_diagram_2>
-    (m_envelope_diagram);
-  
-  QObject::connect(this, SIGNAL(changed()),
-		   m_graphics_item, SLOT(modelChanged()));
-
-  m_graphics_item->
-    setVerticesPen(QPen(Qt::red, 
-                        3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  m_scene.addItem(m_graphics_item);
-  
-  // Add a GraphicItem for the sites
-  m_sites_graphics_item = new CGAL::Qt::SetGraphicsItem<Points>
-    (&m_sites);
-  
-  QObject::connect(this, SIGNAL(changed()),
-		   m_sites_graphics_item, SLOT(modelChanged()));
-
-  m_sites_graphics_item->
-    setPen(QPen(Qt::blue, 
-                5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  m_scene.addItem(m_sites_graphics_item);
-
-  
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism
-  // ophir
-  m_pi = new CGAL::Qt::ArrangementPointInput<Envelope_diagram_2>(this);
-  
-  QObject::connect(m_pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-  
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPoint);
-
-  // Check two actions 
-  this->actionInsertPoint->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  m_scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  m_scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&m_scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_L1_voronoi_diagram_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  Point_2 p;
-  if(CGAL::assign(p, o)){
-    m_sites.push_back(p);
-    calculate_envelope();
-  }
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPoint_toggled(bool checked)
-{
-  if(checked){
-    m_scene.installEventFilter(m_pi);
-  } else {
-    m_scene.removeEventFilter(m_pi);
-  }
-}
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  m_sites.clear();
-  calculate_envelope();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&m_scene);
-  CGAL::Qt::Converter<Kernel> convert;  
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  for(int i = 0; i < number_of_points; ++i){
-    m_sites.push_back(*pg++);
-  }
-  calculate_envelope();
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_sites.clear();
-  
-  std::ifstream ifs(qPrintable(fileName));
-  
-  Kernel::Point_2 p;
-  while(ifs >> p) {
-    m_sites.push_back(p);
-  }
-  calculate_envelope();
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()) {
-    std::ofstream ofs(qPrintable(fileName));
-    for(Points::iterator it = m_sites.begin();
-        it != m_sites.end(); ++it)
-      {
-        ofs << *it << std::endl;
-      }
-  }
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(bounding_rect());
-  this->graphicsView->fitInView(bounding_rect(), Qt::KeepAspectRatio);  
-}
-
-void
-MainWindow::on_actionShowVoronoi_toggled(bool checked)
-{
-  this->m_graphics_item->setVisible(checked);
-}
-
-
-void
-MainWindow::calculate_envelope() {
-  if (m_envelope_diagram != NULL) {
-    m_graphics_item->setArrangement(NULL);
-    delete m_envelope_diagram;
-    m_envelope_diagram = NULL;
-  }
-  
-  m_envelope_diagram = new Envelope_diagram_2();
-  m_graphics_item->setArrangement(m_envelope_diagram);
-    
-  CGAL::lower_envelope_3 (m_sites.begin(), m_sites.end(), *m_envelope_diagram);
-}
-
-QRectF
-MainWindow::bounding_rect() {
-  CGAL::Bbox_2 bbox(0, 0, 0, 0);
-
-  if (m_envelope_diagram != NULL) {
-    for (Envelope_diagram_2::Vertex_iterator it = 
-           m_envelope_diagram->vertices_begin();
-         it != m_envelope_diagram->vertices_end(); ++it) {
-      double x = CGAL::to_double(it->point().x());
-      double y = CGAL::to_double(it->point().y());
-      CGAL::Bbox_2 temp(x, y, x, y);
-      bbox = bbox + temp;
-    }
-  }
-  
-  QRectF rect(bbox.xmin(),
-              bbox.ymin(), 
-              bbox.xmax() - bbox.xmin(),
-              bbox.ymax() - bbox.ymin());
-  
-  return rect;
-}
-
-
-#include "L1_voronoi_diagram_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("L1 Voronoi diagram_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h
deleted file mode 100644
index 37efaa7..0000000
--- a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Envelope_3/include/CGAL/Env_plane_traits_3.h $
-// $Id: Env_plane_traits_3.h 51989 2009-09-21 10:55:53Z efif $
-//
-// Author(s)     : Ophir Setter
-
-#ifndef CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
-#define CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/tags.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/enum.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/number_utils.h> 
-#include <CGAL/Envelope_3/Envelope_base.h>
-#include <CGAL/Envelope_3/Env_plane_traits_3_functions.h>
-
-namespace CGAL{
-
-template <class Kernel_>
-class L1_voronoi_traits_2 : public Arr_linear_traits_2<Kernel_>
-{
-public:
-  typedef Kernel_                              Kernel;
-  typedef typename Kernel::FT                  FT;
-  typedef Arr_linear_traits_2<Kernel>          Base;
-  typedef L1_voronoi_traits_2<Kernel>        Self;
-
-  typedef typename Base::Multiplicity          Multiplicity;
-  typedef typename Base::Point_2               Point_2;
-  typedef typename Base::Curve_2               Curve_2;
-  typedef typename Base::X_monotone_curve_2    X_monotone_curve_2;
-  typedef typename Kernel::Segment_2           Segment_2;
-  typedef typename Kernel::Ray_2               Ray_2;
-  typedef typename Kernel::Line_2              Line_2;
-  typedef typename Kernel::Direction_2         Direction_2;
-  typedef std::pair<Curve_2, Multiplicity>     Intersection_curve;
-
-  typedef typename Base::Left_side_category    Left_side_category;
-  typedef typename Base::Bottom_side_category  Bottom_side_category;
-  typedef typename Base::Top_side_category     Top_side_category;
-  typedef typename Base::Right_side_category   Right_side_category;
-  
-  typedef Point_2                  Xy_monotone_surface_3;
-  typedef Point_2                  Surface_3;
-
-  // Returns the distance between a two points in L1 metric.
-  static FT distance(const Point_2& p1, const Point_2& p2) {
-    FT dist = CGAL::abs(p1.x() - p2.x()) + CGAL::abs(p1.y() - p2.y());
-    return dist;
-  }
-
-  // Returns the midpoint (under the L1 metric) that is on the rectangle
-  // defined by the two points (the rectangle can be degenerate).
-  // As there are to enpoints, the index determines which is returned
-  static Point_2 midpoint(const Point_2& p1, const Point_2& p2, std::size_t index) {
-    const Point_2 *pp1;
-    const Point_2 *pp2;
-    
-    if (index % 2 == 0) {
-      pp1 = &p1;
-      pp2 = &p2;
-    } else {
-      pp1 = &p2;
-      pp2 = &p1;
-    }
-
-
-    FT delta_x = pp2->x() - pp1->x();
-    FT delta_y = pp2->y() - pp1->y();
-    
-    FT sign_x = CGAL::sign(delta_x);
-    FT sign_y = CGAL::sign(delta_y);
-
-    FT abs_x = CGAL::abs(delta_x);
-    FT abs_y = CGAL::abs(delta_y);
-
-    FT dist = (abs_x + abs_y) / 2;
-    FT mid_x = pp1->x();
-    FT mid_y = pp1->y();
-    
-    // Walk on the horizontal edge of the rectangle and then on the vertical.
-
-    // There is a chance that the width of the rectangle is smaller then the mid-dist.
-    FT walk_x = (CGAL::min)(abs_x, dist);
-    mid_x += sign_x * walk_x;
-    dist -= walk_x;
-    
-    CGAL_assertion(abs_y > dist);
-    mid_y += sign_y * dist;
-    
-    return Point_2(mid_x, mid_y);
-  }
-
-  static Comparison_result compare_z_at_xy (const X_monotone_curve_2& cv,
-                                            const Xy_monotone_surface_3& h1,
-                                            const Xy_monotone_surface_3& h2,
-                                            bool above) {
-    CGAL::Comparison_result side = (above == true) ? CGAL::LARGER : CGAL::SMALLER;
-
-    Line_2 l;
-    if (cv.is_segment())
-      l = cv.segment().supporting_line();
-    else if (cv.is_ray())
-      l = cv.ray().supporting_line();
-    else
-      l = cv.line();
-
-    if (l.is_vertical()) {
-      // Could be a tie.
-      // To be "above" the curve, we acutually need to have smaller x coordinate,
-      // the order of the comparison function here is opposite to the none vertical
-      // case.
-      side = CGAL::opposite(side);
-      CGAL::Comparison_result res = CGAL::compare_x_at_y(h1, l);
-      if (res == side)
-        return CGAL::SMALLER;
-
-      res = CGAL::compare_x_at_y(h2, l);
-      if (res == side)
-        return CGAL::LARGER;
-
-      return CGAL::EQUAL;
-    } else {
-      // One of the points in indeed closer (tie can only happen on vertical lines).
-      CGAL::Comparison_result res = CGAL::compare_y_at_x(h1, l);
-      if (l.is_horizontal()) {
-        CGAL_assertion(CGAL::compare_y_at_x(h2, l) != res);
-        if (res == side)
-          return CGAL::SMALLER;
-
-        res = CGAL::compare_y_at_x(h2, l);
-        if (res == side)
-          return CGAL::LARGER;
-        
-        return CGAL::EQUAL;
-      }
-      
-      CGAL_assertion(CGAL::compare_y_at_x(h2, l) == CGAL::opposite(res));
-      if (res == side) 
-        return CGAL::SMALLER;
-      else
-        return CGAL::LARGER;
-    }
-  }
-  class Make_xy_monotone_3 {
-  public:
-    template <class OutputIterator>
-      OutputIterator operator()(const Surface_3& s,
-                                bool /* is_lower */,
-                                OutputIterator o) const {
-      *o++ = s;
-      return o;
-    }
-  };
-  
-  Make_xy_monotone_3 make_xy_monotone_3_object() const {
-    return Make_xy_monotone_3();
-  }
-  
-  class Compare_z_at_xy_3 {
-  public:
-    Comparison_result operator()(const Point_2& p,
-                                 const Xy_monotone_surface_3& h1,
-                                 const Xy_monotone_surface_3& h2) const {
-      return CGAL::compare(distance(p, h1), distance(p, h2));
-    }
-
-    Comparison_result operator()(const X_monotone_curve_2& cv,
-                                 const Xy_monotone_surface_3& h1,
-                                 const Xy_monotone_surface_3& h2) const {
-      Kernel k;
-      Point_2 p;
-      if(cv.is_segment())
-        p = k.construct_midpoint_2_object()(cv.left(), cv.right());
-      else
-        if(cv.is_ray())
-          p = k.construct_point_on_2_object()(cv.ray(), 1);
-        else {
-          CGAL_assertion(cv.is_line());
-          p = k.construct_point_on_2_object()(cv.line(), 1);
-        }
-      return this->operator()(p, h1, h2); 
-    }
-    
-    Comparison_result operator()(const Xy_monotone_surface_3& h1,
-                                 const Xy_monotone_surface_3& h2) const {
-      // should happen only if the points are equal.
-      CGAL_assertion(h1 == h2);
-      return EQUAL;
-    }
-  };
-
-  Compare_z_at_xy_3 compare_z_at_xy_3_object() const
-  {
-    return Compare_z_at_xy_3();
-  }
-
-  class Compare_z_at_xy_above_3
-  {
-  public:
-    Comparison_result operator()(const X_monotone_curve_2& cv,
-                                 const Xy_monotone_surface_3& h1,
-                                 const Xy_monotone_surface_3& h2) const {
-      return compare_z_at_xy (cv, h1, h2, true);
-    }
-
-  };
-
-  Compare_z_at_xy_above_3 compare_z_at_xy_above_3_object() const
-  {
-    return Compare_z_at_xy_above_3();
-  }
-
-  class Compare_z_at_xy_below_3
-  {
-  public:
-    Comparison_result operator()(const X_monotone_curve_2& cv,
-                                 const Xy_monotone_surface_3& h1,
-                                 const Xy_monotone_surface_3& h2) const {
-      return compare_z_at_xy (cv, h1, h2, false);
-    }
-  };
-
-  Compare_z_at_xy_below_3 compare_z_at_xy_below_3_object() const {
-    return Compare_z_at_xy_below_3();
-  }
-  
-  class Construct_projected_boundary_2 {
-  public:
-    template <class OutputIterator>
-    OutputIterator operator()(const Xy_monotone_surface_3& ,
-                              OutputIterator o) const {
-      return o;
-    }
-  };
-
-  Construct_projected_boundary_2 
-  construct_projected_boundary_2_object() const
-  {
-    return Construct_projected_boundary_2();
-  }
-
-
-  class Construct_projected_intersections_2 {
-  public:
-    template <class OutputIterator>
-      OutputIterator operator()(const Xy_monotone_surface_3& s1,
-                                const Xy_monotone_surface_3& s2,
-                                OutputIterator o) const {
-      // The bisector construction is based on the description of the bisector
-      // from Handbook of Computational Geometry - the chapter on Voronoi diagrams
-      // by F. Aurenhammer and R. Klein.
-
-      FT delta_x = s2.x() - s1.x();
-      FT delta_y = s2.y() - s1.y();
-
-      CGAL::Sign s_x = CGAL::sign(delta_x);
-      CGAL::Sign s_y = CGAL::sign(delta_y);
-
-      if (s_x == CGAL::ZERO && s_y == CGAL::ZERO)
-        return o;
-      
-      // The sites have the same x/y coordinate.
-      if (s_x == CGAL::ZERO || s_y == CGAL::ZERO) {
-        *o++ = CGAL::make_object(Intersection_curve(CGAL::bisector(s1, s2), 1));
-        return o;
-      }
-
-      Point_2 p1 = midpoint(s1, s2, 0);
-      Point_2 p2 = midpoint(s1, s2, 1);
-      CGAL_assertion(p1 != p2);
-
-      Point_2 *top, *bottom, *left, *right;
-      if (CGAL::sign(p2.x() - p1.x()) == CGAL::POSITIVE) {
-        left = &p1;
-        right = &p2;
-      }
-      else {
-        CGAL_assertion(CGAL::sign(p2.x() - p1.x()) == CGAL::NEGATIVE);
-        left = &p2;
-        right = &p1;
-      }
-      
-      if (CGAL::sign(p2.y() - p1.y()) == CGAL::POSITIVE) {
-        bottom = &p1;
-        top = &p2;
-      }
-      else {
-        CGAL_assertion(CGAL::sign(p2.y() - p1.y()) == CGAL::NEGATIVE);
-        bottom = &p2;
-        top = &p1;
-      }
-      
-      // We construct the diagonal line either way.
-      *o++ = CGAL::make_object(Intersection_curve(Segment_2(p1, p2), 1));
-
-      // Now construct vertical rays. Two or four rays. If it is only two rays,
-      // then the multiplicity of all the curves is 1.
-      CGAL::Sign s_d = CGAL::sign(CGAL::abs(delta_y) - CGAL::abs(delta_x));
-      int mult = (s_d == CGAL::ZERO) ? 0 : 1;
-
-      if (s_d != CGAL::POSITIVE) {
-        // horizontal rectangle or square = vertical rays.
-        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*top, Direction_2(0, 1)), mult));
-        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*bottom, Direction_2(0, -1)), mult));
-      }
-
-      if (s_d != CGAL::NEGATIVE) {
-        // vertical rectangle or square = horizontal rays.
-        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*right, Direction_2(1, 0)), mult));
-        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*left, Direction_2(-1, 0)), mult));
-      }
-      
-      return o;
-    }
-  };
-
-  Construct_projected_intersections_2
-  construct_projected_intersections_2_object() const {
-    return Construct_projected_intersections_2();
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h b/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h
deleted file mode 100644
index 2663acc..0000000
--- a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h
+++ /dev/null
@@ -1,78 +0,0 @@
-
-#ifndef CGAL_QT_ARRANGEMENT_POINT_INPUT_H
-#define CGAL_QT_ARRANGEMENT_POINT_INPUT_H
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename Arrangement>
-class ArrangementPointInput : public GraphicsViewInput
-{
-public:
-  typedef typename Arrangement::Geometry_traits_2::Kernel Kernel;
-  typedef typename Kernel::Point_2                        Point_2;
-
-  ArrangementPointInput(QObject* parent);
-  
-protected:
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  Converter<Kernel> m_convert;
-  Point_2 m_p;
-};
-
-
-template <typename T>
-ArrangementPointInput<T>::ArrangementPointInput(QObject* parent)
-  :  GraphicsViewInput(parent)
-{}
-
-template <typename T>
-void 
-ArrangementPointInput<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  m_p = m_convert(event->scenePos());
-}
-
-
-template <typename T>
-void 
-ArrangementPointInput<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent* )
-{
-  emit (generate(CGAL::make_object(m_p)));
-}
-
-
-
-template <typename T>
-bool 
-ArrangementPointInput<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_ARRANGEMENT_POINT_INPUT_H
diff --git a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/CMakeLists.txt
deleted file mode 100644
index 3f184a3..0000000
--- a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Largest_empty_rectangleDemo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  include(${QT_USE_FILE})
-  #--------------------------------
-  # Demo: Largest_empty_rectangle_2
-  #--------------------------------
-  # UI files (Qt Designer files)
-  qt4_wrap_ui( DT_UI_FILES Largest_empty_rectangle_2.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( DT_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  qt4_generate_moc( Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc )
-
-  # The executable itself.
-  add_executable  ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Largest_empty_rectangle_2 )
-
-  # Link with Qt libraries
-  target_link_libraries( Largest_empty_rectangle_2 ${QT_LIBRARIES} )
-  # And with CGAL libraries
-  target_link_libraries( Largest_empty_rectangle_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp b/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp
deleted file mode 100644
index 5920a4e..0000000
--- a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp
+++ /dev/null
@@ -1,287 +0,0 @@
-#include <fstream>
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Largest_empty_iso_rectangle_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QFileDialog>
-#include <QGraphicsRectItem>
-#include <QGraphicsLineItem>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/PointsGraphicsItem.h>
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Largest_empty_rectangle_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Vector_2 Vector_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-typedef CGAL::Largest_empty_iso_rectangle_2<K> Largest_empty_iso_rectangle_2;
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Largest_empty_rectangle_2
-{
-  Q_OBJECT
-  
-private:
-
-  Iso_rectangle_2 square;
-  Largest_empty_iso_rectangle_2 ler;
-  CGAL::Qt::Converter<K> convert;
-  std::vector<Point_2> points; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
-  QGraphicsRectItem * rgi;
-  QGraphicsLineItem* frame[4];
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-  template <typename G>
-  void
-  on_actionGenerate_triggered()
-  {
-    Iso_rectangle_2 isor = square;
-    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
-    Vector_2 offset = center - CGAL::ORIGIN;
-    double w = isor.xmax() - isor.xmin();
-    double h = isor.ymax() - isor.ymin();
-    double radius = (w<h) ? w/2 : h/2;
-
-    G pg(radius);
-    bool ok = false;
-    const int number_of_points = 
-      QInputDialog::getInteger(this, 
-                               tr("Number of random points"),
-                               tr("Enter number of random points"),
-                               100,
-                               0,
-                               (std::numeric_limits<int>::max)(),
-                               1,
-                               &ok);
-
-    if(!ok) {
-      return;
-    }
-
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    points.reserve(points.size() + number_of_points);
-    for(int i = 0; i < number_of_points; ++i){
-      points.push_back(*pg + offset);
-      ler.insert(points.back());
-      ++pg;
-    }
-    
-    // default cursor
-    QApplication::restoreOverrideCursor();
-    emit(changed());
-  }
-
-public:
-  MainWindow();
-
-public slots:
-
-  void on_actionClear_triggered();
-
-  void processInput(CGAL::Object);
-
-  void on_actionRecenter_triggered();
-  void on_actionGeneratePointsOnCircle_triggered();
-  void on_actionGeneratePointsInSquare_triggered();
-  void on_actionGeneratePointsInDisc_triggered();
-  void clear();
-
-  void update_largest_empty_rectangle();
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow(), square(Point_2(-1, -1), Point_2(1,1)), ler(square)
-{
-  setupUi(this);
-
-  // Add a GraphicItem for the point set
-  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
-
-  rgi = new QGraphicsRectItem(convert(square));
-
-  Point_2 bl(-1,-1), br(1,-1), tl(-1,1), tr(1,1);
-  
-  frame[0] = new QGraphicsLineItem(convert(Segment_2(bl, br)));
-  frame[1] = new QGraphicsLineItem(convert(Segment_2(br, tr)));
-  frame[2] = new QGraphicsLineItem(convert(Segment_2(tr, tl)));
-  frame[3] = new QGraphicsLineItem(convert(Segment_2(tl, bl)));
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pgi, SLOT(modelChanged()));
-
-  QObject::connect(this, SIGNAL(changed()),
-		   this, SLOT(update_largest_empty_rectangle()));
-
-  pgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  rgi->setBrush(QBrush(Qt::cyan));
-  scene.addItem(pgi);
-  scene.addItem(rgi);
-  scene.addItem(frame[0]);
-  scene.addItem(frame[1]);
-  scene.addItem(frame[2]);
-  scene.addItem(frame[3]);
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
- 
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1, false); // inputs a list with one point
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-   
-  scene.installEventFilter(pi);
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-1, -1, 1, 1);
-  this->graphicsView->setScene(&scene);
-
-  // Uncomment the following line to get antialiasing by default.
-//   actionUse_Antialiasing->setChecked(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Largest_empty_rectangle_2.html");
-  this->addAboutCGAL();
-
-
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::list<Point_2> input;
-  if(CGAL::assign(input, o)){
-    if(input.size() == 1) {
-      Point_2 p = input.front();
-      if(! square.has_on_unbounded_side(p)){
-        points.push_back(p);
-        ler.insert(p);
-      }
-    }
-    emit(changed());
-  }
-
-}
-
-
-void
-MainWindow::update_largest_empty_rectangle()
-{
-  rgi->setRect(convert(ler.get_largest_empty_iso_rectangle()));
-}
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  clear();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(convert(square));
-  this->graphicsView->fitInView(convert(square), Qt::KeepAspectRatio);  
-}
-
-void
-MainWindow::on_actionGeneratePointsOnCircle_triggered()
-{
-  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInSquare_triggered()
-{
-  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInDisc_triggered()
-{
-  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-
-void
-MainWindow::clear()
-{
-  points.clear();
-  ler.clear();
-  rgi->setRect(convert(square));
-}
-
-
-#include "Largest_empty_rectangle_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Largest_empty_rectangle_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Largest_empty_rectangle_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  mainWindow.on_actionRecenter_triggered();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CMakeLists.txt
deleted file mode 100644
index af7de07..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CMakeLists.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# Created by the script cgal_create_cmake_script (and then adapted manually).
-# This is the CMake script for compiling a CGAL application.
-# cmake ../ -DCMAKE_BUILD_TYPE=Debug
-
-project (Linear_cell_complex_3_demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-## To add expensive tests
-# add_definitions("-DCGAL_CHECK_EXPENSIVE")
-
-## For profilling with gprof
-# add_definitions("-pg")
-# SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
-
-## To add an is_valid test after each operation (only in debug mode)
-# add_definitions("-DCGAL_CMAP_TEST_VALID_REMOVALS")
-# add_definitions("-DCGAL_CMAP_TEST_VALID_CONTRACTIONS")
-# add_definitions("-DCGAL_CMAP_TEST_VALID_INSERTIONS")
-
-# Option allowing to profile each operation of the demo (cout times on stdout).
-add_definitions(-DCGAL_PROFILE_LCC_DEMO)
-
-##################
-find_package(CGAL COMPONENTS Qt4)
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-find_package(OpenGL)
-find_package(QGLViewer)
-
-if ( NOT (CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND
-      OPENGL_FOUND AND QGLVIEWER_FOUND) )
-
-  MESSAGE(STATUS "NOTICE: This demo requires CGAL, QGLViewer, OpenGL "
-    "and Qt4, and will not be compiled.")
-
-else()
-
-include(${QT_USE_FILE})
-include_directories(${QGLVIEWER_INCLUDE_DIR})
-include_directories(BEFORE . ../../include/)
-
-# ui file, created wih Qt Designer
-qt4_wrap_ui(uis MainWindow.ui CreateMesh.ui CreateMenger.ui
-                CreateSierpinskiCarpet.ui CreateSierpinskiTriangle.ui)
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources (RESOURCE_FILES ./Linear_cell_complex_3.qrc)
-
-qt4_automoc(MainWindow.cpp Viewer.cpp)
-
-add_executable(Linear_cell_complex_3_demo
-  Linear_cell_complex_3_demo.cpp MainWindow.cpp
-  Viewer.cpp Linear_cell_complex_3_subdivision.cpp
-  Linear_cell_complex_pqq_subdivision.cpp
-  ${uis} ${RESOURCE_FILES} )
-
-add_to_cached_list(CGAL_EXECUTABLE_TARGETS Linear_cell_complex_3_demo)
-
-target_link_libraries(Linear_cell_complex_3_demo ${CGAL_LIBRARIES}
-                                                 ${CGAL_3RD_PARTY_LIBRARIES})
-target_link_libraries(Linear_cell_complex_3_demo ${QT_LIBRARIES}
-                                                 ${QGLVIEWER_LIBRARIES} )
-target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY}
-                                                 ${OPENGL_glu_LIBRARY} )
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp
deleted file mode 100644
index 52a205c..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#include "MainWindow.h"
-#include "typedefs.h"
-#include <QApplication>
-#include <CGAL/Qt/resources.h>
-#include <CGAL/assertions_behaviour.h>
-
-// Global random
-CGAL::Random myrandom;
-
-int main(int argc, char** argv)
-{
-  // std::cout<<"Size of dart: "<<sizeof(LCC::Dart)<<std::endl;
-  CGAL::set_error_behaviour(CGAL::ABORT);
-
-  QApplication application(argc,argv);
-  
-  application.setOrganizationDomain("cgal.org");
-  application.setOrganizationName("CNRS and LIRIS' Establishments");
-  application.setApplicationName("3D Linear Cell Complex");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_Qt4_init_resources(); // that function is in a DLL
-  Q_INIT_RESOURCE(Linear_cell_complex_3);
-  MainWindow mw;
-  mw.show();
-
-  return application.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp
deleted file mode 100644
index 74667e0..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#include "typedefs.h"
-
-#define PI 3.1415926535897932
-
-// Smoth a vertex depending on the vertices of its incident facet.
-class Smooth_old_vertex
-{
-public:
-  /**  Constructor.
-   * @param alcc is the lcc to smooth
-   * @param amark is a mark designing old darts (i.e. darts not created during
-   *        the triangulation step)
-   */
-  Smooth_old_vertex (LCC & alcc, unsigned int /* TODO amark*/):mlcc (alcc)
-  {
-  }
-
-  Vertex operator  () (Vertex & v) const
-  {
-    Dart_handle d = v.dart ();
-
-    int degree = 0;
-    bool open = false;
-
-    LCC::One_dart_per_incident_cell_range<1,0>::iterator it (mlcc, d),
-      itend(mlcc.one_dart_per_incident_cell<1,0>(d).end());
-    for (; it != itend; ++it)
-    {
-      ++degree;
-      if (mlcc.is_free(it, 2)) open = true;
-    }
-
-    if (open)
-      return v;
-
-    LCC::FT alpha = (4.0f - 2.0f *
-                     (LCC::FT) cos (2.0f * PI / (LCC::FT) degree)) / 9.0f;
-    LCC::Vector vec =
-      LCC::Traits::Construct_scaled_vector()
-      ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point()), (1.0f - alpha));
-
-    for (it.rewind (); it != itend; ++it)
-    {
-      CGAL_assertion (!mlcc.is_free(it,2));
-      vec = vec + (mlcc.point(mlcc.beta(it,2)) - CGAL::ORIGIN)
-        * alpha / degree;
-    }
-
-    Vertex res= LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, vec);
-    res.set_dart (d);
-
-    return res;
-  }
-private:
-  LCC & mlcc;
-};
-
-// Flip an edge, work only in 2D and 3D
-Dart_handle
-flip_edge (LCC & m, Dart_handle d)
-{
-  CGAL_assertion ( !m.is_free(d,2) );
-  CGAL_assertion ( !m.is_free(d,1) && !m.is_free(d,0) );
-  CGAL_assertion ( !m.is_free(m.beta(d,2), 0) && !m.is_free(m.beta(d, 2), 1) );
-  
-  if (!CGAL::is_removable<LCC,1>(m,d)) return LCC::null_handle;
-
-  Dart_handle d1 = m.beta(d,1);
-  Dart_handle d2 = m.beta(d,2,0);
-
-  CGAL_assertion ( !m.is_free(d1,1) && !m.is_free(d2,0) );
-
-  Dart_handle d3 = m.beta(d1,1);
-  Dart_handle d4 = m.beta(d2, 0);
-
-  // We isolated the edge
-  m.basic_link_beta_1(m.beta(d,0), m.beta(d,2,1));
-  m.basic_link_beta_0(m.beta(d,1), m.beta(d,2,0));
-  if ( !m.is_free(d,3) )
-  {
-    m.basic_link_beta_0(m.beta(d,0,3), m.beta(d,2,1,3));
-    m.basic_link_beta_1(m.beta(d,1,3), m.beta(d,2,0,3));
-  }
-
-  // Then we push the two extremities.
-  m.basic_link_beta_0(d3, d);
-  m.basic_link_beta_0(d2, m.beta(d,2));
-  m.link_beta_1(d4, d);
-  m.link_beta_1(d1, m.beta(d,2));
-
-  if ( !m.is_free(d,3) )
-  {
-    m.basic_link_beta_0(m.beta(d4,3), m.beta(d,3));
-    m.basic_link_beta_0(m.beta(d1,3), m.beta(d,2,3));
-    m.link_beta_1(m.beta(d3,3), m.beta(d,3));
-    m.link_beta_1(m.beta(d2,3), m.beta(d,2,3));
-  }
-  
-  // CGAL::remove_cell<LCC,1>(m, d);
-  // insert_cell_1_in_cell_2(m, d1, d1->beta(1)->beta(1));
-
-  return d;
-}
-
-// Subdivide each facet of the lcc by using sqrt(3)-subdivision.
-void
-subdivide_lcc_3 (LCC & m)
-{
-  if (m.number_of_darts () == 0)
-    return;
-
-  unsigned int mark = m.get_new_mark ();
-  unsigned int treated = m.get_new_mark ();
-  m.negate_mark (mark);  // All the old darts are marked in O(1).
-
-  // 1) We smoth the old vertices.
-  std::vector < Vertex > vertices;  // smooth the old vertices
-  vertices.reserve (m.number_of_attributes<0> ());  // get intermediate space
-  std::transform (m.vertex_attributes().begin (), 
-		  m.vertex_attributes().end (),
-		  std::back_inserter (vertices), 
-		  Smooth_old_vertex (m, mark));
-
-  // 2) We subdivide each facet.
-  m.negate_mark (treated);  // All the darts are marked in O(1).
-  unsigned int nb = 0;
-  for (LCC::Dart_range::iterator it (m.darts().begin ());
-       m.number_of_marked_darts (treated) > 0; ++it)
-  {
-    ++nb;
-    if (m.is_marked (it, treated))
-    {
-      // We unmark the darts of the facet to process only once dart/facet.
-      CGAL::unmark_cell < LCC, 2 > (m, it, treated);
-      // We triangulate the facet.
-      m.insert_barycenter_in_cell<2>(it);
-    }
-  }
-
-  CGAL_assertion (m.is_whole_map_unmarked (treated));
-  CGAL_assertion (m.is_valid ());
-  m.free_mark (treated);
-
-  // 3) We update the coordinates of old vertices.
-  for (std::vector < Vertex >::iterator vit = vertices.begin ();
-       vit != vertices.end (); ++vit)
-  {
-    m.point(vit->dart())=vit->point();
-  }
-
-  // 4) We flip all the old edges.
-  m.negate_mark (mark);  // Now only new darts are marked.
-  Dart_handle d2 =LCC::null_handle;
-  for (LCC::Dart_range::iterator it (m.darts().begin ());
-       it != m.darts().end ();)
-  {
-    d2 = it++;
-    if (!m.is_marked (d2, mark))  // This is an old dart.
-    {
-      // We process only the last dart of a same edge.
-      if (!m.is_free(d2,2) && (m.beta(d2,2,3)==m.beta(d2,3,2)))
-      {
-        if (m.is_marked(m.beta(d2,2), mark) &&
-            (m.is_free(d2,3) ||
-             (m.is_marked(m.beta(d2,3), mark) &&
-              m.is_marked(m.beta(d2,2,3), mark))))
-        {
-          flip_edge (m, d2);
-          m.mark(d2, mark);
-        }
-        else
-          m.mark (d2, mark);
-      }
-      else
-        m.mark (d2, mark);
-    }
-  }
-
-  CGAL_assertion (m.is_whole_map_marked (mark));
-  m.free_mark (mark);
-  
-  CGAL_postcondition ( m.is_valid ());
-}
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp
deleted file mode 100644
index bb2f1d7..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr> 
-//		   Jérémy Girerd-Rey <jeremy.girerd-rey at etu.univ-lyon1.fr>
-//
-
-#include "typedefs.h"
-
-// Smooth a vertex depending on the vertices of its incidents facets.
-class Smooth_edge_pqq
-{
-public:
-  /**  Constructor.
-   * @param alcc is the lcc to smooth
-   * @param amark is a mark designing old darts (i.e. darts not created during
-   *        the subdivision step)
-   */
-  Smooth_edge_pqq (LCC & alcc, unsigned int o):mlcc (alcc), old(o)
-  {
-  }
-
-  Vertex operator  () (Vertex & v) const
-  {
-    Dart_handle d = v.dart ();
-
-    // Old points aren't concerned.
-    if (mlcc.is_marked(d, old))
-    {       
-    return v;
-    }
-
-    std::vector<LCC::Point> facetsPoints;
-    facetsPoints.resize(0);
-
-    // We search barycenter point of incidents facets.
-    for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it =
-           mlcc.one_dart_per_incident_cell<1,0>(d).begin();
-         it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
-    {
-      // If the vertex is on a border.
-      if (mlcc.is_free(it,2))
-      { 
-        return v;
-      }
-      // If we found barycenter of a facet.
-      if (!mlcc.is_marked(mlcc.opposite(it), old))
-      {       
-        facetsPoints.push_back(mlcc.point(mlcc.opposite(it)));
-      }
-    }
-
-    // If we found more than two points we are on a vertice barycenter of a facet.
-    // They aren't concerned.
-    if (facetsPoints.size() > 2 || facetsPoints.size() < 2)
-    {       
-      return v;
-    }
-
-    // Average.
-    LCC::Vector averageFacetsV = LCC::Traits::Construct_vector() 
-			          ( CGAL::ORIGIN, LCC::Point(0,0,0) );                                                   
-
-    for (unsigned int i=0; i < facetsPoints.size(); i++)
-    {
-      averageFacetsV = LCC::Traits::Construct_sum_of_vectors()
-      		       (averageFacetsV, 
-       		       LCC::Traits::Construct_vector() (CGAL::ORIGIN, facetsPoints[i]));
-     }
-
-    averageFacetsV = LCC::Traits::Construct_scaled_vector()
-                     ( averageFacetsV, (1.0f/facetsPoints.size()) );
-
-    // Barycenter point.
-    LCC::Vector barycenterV = LCC::Traits::Construct_sum_of_vectors()
-      		              ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point()), averageFacetsV );
-
-    barycenterV = LCC::Traits::Construct_scaled_vector()
-                  ( barycenterV, (1.0f/2.0f) );
-
-    Vertex res = LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, barycenterV);
-    res.set_dart (d);
-
-    return res;
-  }
-private:
-  LCC & mlcc;
-  unsigned int old;
-};
-
-// Smooth an old vertex depending on the vertices of its incident facet and edge.
-class Smooth_vertex_pqq
-{
-public:
-  /**  Constructor.
-   * @param alcc is the lcc to smooth
-   * @param amark is a mark designing old darts (i.e. darts not created during
-   *        the triangulation step)
-   */
-  Smooth_vertex_pqq (LCC & alcc, unsigned int o):mlcc (alcc), old(o)
-  {
-  }
-
-  Vertex operator  () (Vertex & v) const
-  {
-    Dart_handle d = v.dart ();
-
-    // Just old points are concerned.
-    if (!mlcc.is_marked(d, old))
-    {       
-      return v;
-    }
-
-    unsigned int degree = 0;
-    std::vector<LCC::Point> edgesPoints;
-    edgesPoints.resize(0);    
-    
-    std::vector<LCC::Point> facetsPoints;
-    facetsPoints.resize(0);    
-
-    // We search barycenter point of incidents facets, and incidents edges points.
-    for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it =
-           mlcc.one_dart_per_incident_cell<1,0>(d).begin();
-        it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
-    {
-      // If the vertex is on a border
-      if (mlcc.is_free(it,2))
-      { 
-        return v;
-      }
-      // If incident isn't an old point, it's an edge point.
-      if (!mlcc.is_marked(mlcc.opposite(it), old))
-      {       
-        edgesPoints.push_back (mlcc.point(mlcc.opposite(it)));
-      }
-      // We go find the "facet point" of incidents facet (barycenter of a facet).
-      facetsPoints.push_back (mlcc.point(mlcc.beta(mlcc.opposite(it), 0)));
-      ++degree;
-    }
-
-    CGAL_assertion (facetsPoints.size() != 0 && edgesPoints.size() != 0);
-
-    if (facetsPoints.size() < 3 || edgesPoints.size() < 3 )
-    {       
-      return v;
-    }
-
-    // Average of incidents "edge points".
-    LCC::Vector averageEdgesV = LCC::Traits::Construct_vector() 
-			        (CGAL::ORIGIN, LCC::Point(0,0,0));                                                   
-
-    for (unsigned int i=0; i < edgesPoints.size(); i++)
-    {
-      averageEdgesV = LCC::Traits::Construct_sum_of_vectors()
-                      ( averageEdgesV, 
-       		      LCC::Traits::Construct_vector() (CGAL::ORIGIN, edgesPoints[i]));
-    }
-
-    averageEdgesV = LCC::Traits::Construct_scaled_vector()
-                    ( averageEdgesV, 1.0f/ (LCC::FT) edgesPoints.size() );
-
-    // Average of incidents "facet points".
-    LCC::Vector averageFacetsV = LCC::Traits::Construct_vector() 
-			         (CGAL::ORIGIN, LCC::Point(0,0,0));                                                   
-
-    for (unsigned int i=0; i < facetsPoints.size(); i++)
-    {
-      averageFacetsV = LCC::Traits::Construct_sum_of_vectors()
-      		       ( averageFacetsV, 
-       		       LCC::Traits::Construct_vector() (CGAL::ORIGIN, facetsPoints[i]));
-    }
-
-    averageFacetsV = LCC::Traits::Construct_scaled_vector()
-                     ( averageFacetsV, (1.0f/ (LCC::FT) facetsPoints.size()) );
-
-    // COEFFICIENTS of PQQ - Catmull–Clark subdivision : 
-    // point = ( averageFacets + 2*averageEdges + point*(degree-3) )/degree
-
-    averageFacetsV = LCC::Traits::Construct_scaled_vector()
-      		     ( averageFacetsV, 1.0f/ (LCC::FT) degree);
-
-    averageEdgesV = LCC::Traits::Construct_scaled_vector()
-      		    ( averageEdgesV, 2.0f/ (LCC::FT) degree);
-
-    LCC::Vector pointV = LCC::Traits::Construct_scaled_vector()
-      		         ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point() ), 
-                         (LCC::FT) (degree-3)/ (LCC::FT) degree );
-
-    // New position of the old point.
-    LCC::Vector	newPosition = LCC::Traits::Construct_sum_of_vectors()
-      		              ( averageFacetsV, averageEdgesV);
-    
-    newPosition = LCC::Traits::Construct_sum_of_vectors()
-      		  ( newPosition, pointV);
-
-    Vertex res = LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, newPosition);
-    res.set_dart (d);
-
-    return res;
-  }
-private:
-  LCC & mlcc;
-  unsigned int old;
-};
-
-
-// Subdivide each facet of the lcc by using pqq-subdivision.
-void
-subdivide_lcc_pqq (LCC & m)
-{
-  if (m.number_of_darts () == 0)
-    return;
-
-  unsigned int old = m.get_new_mark ();
-  unsigned int treated = m.get_new_mark ();
-  m.negate_mark (old);  // All the old darts are marked in O(1).
-
-  // 1) We subdivide each edge.
-  m.negate_mark (treated);  // All the darts are marked in O(1).
-  
-  for (LCC::Dart_range::iterator it (m.darts().begin ());
-       m.number_of_marked_darts (treated) > 0; ++it)
-  {
-    if (m.is_marked (it, treated))
-    {
-      // We unmark the darts of the facet to process only once dart/facet.
-      CGAL::unmark_cell < LCC, 1 > (m, it, treated);
-
-      // We insert barycenter in the middle of the edge.
-      m.insert_barycenter_in_cell<1>(it);
-    }
-  }
-
-  // 2) We create a barycenter point for each facets.
-  Dart_handle dc;
-  std::vector<Dart_handle> remove;
-  remove.resize(0);
-
-  m.negate_mark (treated);  // All the darts are marked in O(1).
-  for (LCC::Dart_range::iterator it (m.darts().begin ());
-       m.number_of_marked_darts (treated) > 0; ++it)
-  {
-    if (m.is_marked (it, treated))
-    {
-      // We unmark the darts of the facet to process only once dart/facet.
-      CGAL::unmark_cell < LCC, 2 > (m, it, treated);
-      // We insert barycenter of the facet.
-      dc =  m.insert_barycenter_in_cell<2>(it);
-
-      // We remove useless edges.
-      for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it2 =
-             m.one_dart_per_incident_cell<1,0>(dc).begin(); 
-          it2 != m.one_dart_per_incident_cell<1,0>(dc).end(); ++it2)
-      {
-        // If the edge join the center and a corner.
-        // We remove the edge.
-        if( m.is_marked(m.beta(it2,1), old) )
-        {
-          remove.push_back(it2);
-        }
-      }
-
-      // Remove edges. 
-      for (std::vector <Dart_handle>::iterator dit = remove.begin ();
-          dit != remove.end (); ++dit)
-      {
-        CGAL_assertion( (CGAL::is_removable<LCC, 1>(m,*dit)) );
-        CGAL::remove_cell<LCC, 1>(m, *dit);
-      }
-      remove.resize(0); 
-      // CGAL_assertion( m.is_valid() );
-    }
-  }
-
-  m.negate_mark (treated);
-  CGAL_assertion (m.is_whole_map_marked (treated));
-  m.free_mark (treated);
-
-  // 3) Smooth old points. 
-  std::vector < Vertex > old_vertices; // smooth the old vertices.
-  old_vertices.reserve (m.number_of_attributes<0> ()); // get intermediate space.
-  std::transform (m.vertex_attributes().begin (), 
-		  m.vertex_attributes().end (),
-		  std::back_inserter (old_vertices), 
-		  Smooth_vertex_pqq (m, old));
-
-  // Update.
-  for (std::vector < Vertex >::iterator vit = old_vertices.begin ();
-      vit != old_vertices.end (); ++vit)
-  {
-    m.point(vit->dart())=vit->point();
-  }
-
-  // 4) Smooth new edges points.	  
-  std::vector < Vertex > vertices; // smooth the old vertices.
-  vertices.reserve (m.number_of_attributes<0> ()); // get intermediate space.
-  std::transform (m.vertex_attributes().begin (), 
-		  m.vertex_attributes().end (),
-		  std::back_inserter (vertices), 
-		  Smooth_edge_pqq (m, old));
-
-  // Update.
-  for (std::vector < Vertex >::iterator vit = vertices.begin ();
-      vit != vertices.end (); ++vit)
-  {
-    m.point(vit->dart())=vit->point();
-  }
-
-  m.unmark_all (old);
-  m.free_mark (old);
-  CGAL_postcondition ( m.is_valid ());
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.cpp
deleted file mode 100644
index b72c1cc..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.cpp
+++ /dev/null
@@ -1,2991 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-// Contributor(s): Kumar Snehasish <kumar.snehasish at gmail.com>
-//                 Sylvain Brandel <sylvain.brandel at liris.cnrs.fr>
-//
-#include "MainWindow.h"
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <QSettings>
-#include "MainWindow.moc"
-#include <CGAL/Timer.h>
-#include <CGAL/ipower.h>
-
-// Function defined in Linear_cell_complex_3_subivision.cpp
-void subdivide_lcc_3 (LCC & m);
-
-// Function defined in Linear_cell_complex_pqq_subivision.cpp
-void subdivide_lcc_pqq (LCC & m);
-
-#define DELAY_STATUSMSG 1500
-
-MainWindow::MainWindow (QWidget * parent):CGAL::Qt::DemosMainWindow (parent),
-  nbcube      (0),
-  dialogmesh  (this),
-  dialogmenger(this),
-  dialogsierpinskicarpet(this),
-  dialogsierpinskitriangle(this)
-{
-  setupUi (this);
-
-  scene.lcc = new LCC;
-
-  volumeListDock = new QDockWidget(QString(tr("Volume List")),this);
-  volumeListDock->setAllowedAreas(Qt::RightDockWidgetArea |
-                                  Qt::LeftDockWidgetArea);
-  volumeList = new QTableWidget(0,4,volumeListDock);
-  volumeList->verticalHeader()->hide();
-  volumeList->setColumnHidden(3,true);
-  QObject::connect(this->volumeList, SIGNAL(cellChanged(int,int)),
-                   this, SLOT(onCellChanged(int,int)));
-
-  QStringList labels(QString(tr("Color")));
-  labels.append(QString(tr("Filled")));
-  labels.append(QString(tr("Hidden")));
-  volumeList->setHorizontalHeaderLabels(labels);
-  //volumeList->resizeColumnsToContents();
-  volumeList->setFixedWidth(200);
-/*  volumeList->setColumnWidth(0,85);
-  volumeList->setColumnWidth(1,35);
-  volumeList->setColumnWidth(2,35);*/
-  volumeList->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
-  volumeList->setSelectionMode(QAbstractItemView::NoSelection);
-  //volumeList->setSelectionBehavior(QAbstractItemView::SelectRows);
-  volumeListDock->setWidget(volumeList);
-  addDockWidget(Qt::RightDockWidgetArea,volumeListDock);
-  menuView->addAction(volumeListDock->toggleViewAction());
-
-  QObject::connect(&dialogmesh, SIGNAL(accepted()),
-                   this, SLOT(onCreateMeshOk()));
-
-  this->viewer->setScene(&scene);
-
-  connect_actions ();
-  this->addAboutDemo (":/cgal/help/about_Linear_cell_complex_3.html");
-  this->addAboutCGAL ();
-
-  this->addRecentFiles (this->menuFile, this->actionQuit);
-  connect (this, SIGNAL (openRecentFile (QString)),
-           this, SLOT (load_off (QString)));
-
-  statusMessage = new QLabel
-      ("Darts: 0,  Vertices: 0  (Points: 0),  Edges: 0, Facets: 0,"
-       " Volume: 0 (Vol color: 0),  Connected components: 0");
-  statusBar ()->addWidget (statusMessage);
-
-}
-
-void MainWindow::connect_actions ()
-{
-  QObject::connect (this->actionQuit, SIGNAL (triggered ()),
-                    qApp, SLOT (quit ()));
-
-  QObject::connect (this, SIGNAL (sceneChanged ()),
-                    this, SLOT (onSceneChanged ()));
-
-  QObject::connect(this->volumeList->horizontalHeader(),
-                   SIGNAL(sectionClicked(int)),
-                   this, SLOT(onHeaderClicked(int)));
-  QObject::connect(dialogmenger.mengerLevel, SIGNAL(valueChanged(int)),
-                   this, SLOT(onMengerChange(int)));
-  QObject::connect(dialogmenger.updateAttributes, SIGNAL(clicked(bool)),
-                   this, SLOT(onMengerUpdateAttributes(bool)));
-  QObject::connect(&dialogmenger, SIGNAL(accepted()),
-                   this, SLOT(onMengerOk()));
-  QObject::connect(&dialogmenger, SIGNAL(rejected()),
-                   this, SLOT(onMengerCancel()));
-
-  QObject::connect(dialogsierpinskicarpet.level, SIGNAL(valueChanged(int)),
-                   this, SLOT(onSierpinskiCarpetChangeLevel(int)));
-  QObject::connect(dialogsierpinskicarpet.updateAttributes, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetUpdateAttributes(bool)));
-/*  QObject::connect(dialogsierpinskicarpet.never, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetNeverUpdateAttributes(bool)));
-  QObject::connect(dialogsierpinskicarpet.during, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetDuringConstructionUpdateAttributes(bool)));
-  QObject::connect(dialogsierpinskicarpet.after, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetAfterConstructionUpdateAttributes(bool)));
-  QObject::connect(dialogsierpinskicarpet.stdmap, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetUpdateAttributesMethodStdMap(bool)));
-  QObject::connect(dialogsierpinskicarpet.traversal, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetUpdateAttributesMethodTraversal(bool)));
-  QObject::connect(dialogsierpinskicarpet.computeGeometry, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiCarpetComputeGeometry(bool)));*/
-  QObject::connect(&dialogsierpinskicarpet, SIGNAL(accepted()),
-                   this, SLOT(onSierpinskiCarpetOk()));
-  QObject::connect(&dialogsierpinskicarpet, SIGNAL(rejected()),
-                   this, SLOT(onSierpinskiCarpetCancel()));
-
-  QObject::connect(dialogsierpinskitriangle.level, SIGNAL(valueChanged(int)),
-                   this, SLOT(onSierpinskiTriangleChangeLevel(int)));
-  QObject::connect(dialogsierpinskitriangle.updateAttributes, SIGNAL(clicked(bool)),
-                   this, SLOT(onSierpinskiTriangleUpdateAttributes(bool)));
-  QObject::connect(&dialogsierpinskitriangle, SIGNAL(accepted()),
-                   this, SLOT(onSierpinskiTriangleOk()));
-  QObject::connect(&dialogsierpinskitriangle, SIGNAL(rejected()),
-                   this, SLOT(onSierpinskiTriangleCancel()));
-}
-
-void MainWindow::connectVolumeListHandlers()
-{
-  QObject::connect(this->volumeList, SIGNAL(cellChanged(int,int)),
-                   this, SLOT(onCellChanged(int,int)));
-}
-
-void MainWindow::update_operations_entries(bool show)
-{
-  actionImportOFF->setEnabled(show);
-  actionAddOFF->setEnabled(show);
-  actionImport3DTDS->setEnabled(show);
-  actionCompute_Voronoi_3D->setEnabled(show);
-  actionClear->setEnabled(show);
-  menuCreations->setEnabled(show);
-  menuOperations->setEnabled(show);
-}
-
-void MainWindow::onSceneChanged ()
-{
-  QApplication::setOverrideCursor( Qt::WaitCursor );
-
-  int mark = scene.lcc->get_new_mark ();
-  scene.lcc->negate_mark (mark);
-
-  std::vector<unsigned int> cells;
-  cells.push_back(0);
-  cells.push_back(1);
-  cells.push_back(2);
-  cells.push_back(3);
-  cells.push_back(4);
-
-  std::vector<unsigned int> res = scene.lcc->count_cells (cells);
-
-  std::ostringstream os;
-  os << "Darts: " << scene.lcc->number_of_darts ()
-     << ",  Vertices:" << res[0]
-     <<",  (Points:"<<scene.lcc->number_of_attributes<0>()<<")"
-    << ",  Edges:" << res[1]
-    << ",  Facets:" << res[2]
-    << ",  Volumes:" << res[3]
-    <<",  (Vol color:"<<scene.lcc->number_of_attributes<3>()<<")"
-   << ",  Connected components:" << res[4]
-   <<",  Valid:"<<(scene.lcc->is_valid()?"true":"FALSE");
-
-  scene.lcc->negate_mark (mark);
-  scene.lcc->free_mark (mark);
-
-  // statusBar()->showMessage (QString ("Update OpenGL lists"), DELAY_STATUSMSG);
-
-  viewer->sceneChanged ();
-
-  statusMessage->setText (os.str().c_str ());
-  QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::clear_all()
-{
-  scene.lcc->clear();
-  nbcube=0;
-
-  volumeList->clearContents();
-  volumeList->setRowCount(0);
-}
-
-void MainWindow::on_new_volume(Dart_handle adart)
-{
-  CGAL_assertion( scene.lcc->attribute<3>(adart)==LCC::null_handle);
-  CGAL::Set_i_attribute_functor<LCC, 3>::
-      run(scene.lcc, adart, scene.lcc->create_attribute<3>());
-  update_volume_list_add(scene.lcc->attribute<3>(adart));
-}
-
-void MainWindow::init_all_new_volumes()
-{
-  for (LCC::One_dart_per_cell_range<3>::iterator
-       it(scene.lcc->one_dart_per_cell<3>().begin());
-       it.cont(); ++it)
-    if ( scene.lcc->attribute<3>(it)==LCC::null_handle )
-    { on_new_volume(it); }
-}
-
-void MainWindow::on_actionImportOFF_triggered ()
-{
-  QString fileName = QFileDialog::getOpenFileName (this,
-                                                   tr ("Import OFF"),
-                                                   "./off",
-                                                   tr ("off files (*.off)"));
-
-  if (!fileName.isEmpty ())
-  {
-    load_off (fileName, true);
-  }
-}
-
-void MainWindow::on_actionImport3DTDS_triggered ()
-{
-  QString fileName = QFileDialog::getOpenFileName (this,
-                                                   tr ("Import 3DTDS"),
-                                                   ".",
-                                                   tr ("Data file (*)"));
-
-  if (!fileName.isEmpty ())
-  {
-    load_3DTDS (fileName, true);
-    statusBar ()->showMessage (QString ("Import 3DTDS file") + fileName,
-                               DELAY_STATUSMSG);
-  }
-}
-
-void MainWindow::on_actionAddOFF_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName (this,
-                                                   tr ("Add OFF"),
-                                                   "./off",
-                                                   tr ("off files (*.off)"));
-
-  if (!fileName.isEmpty ())
-  {
-    load_off (fileName, false);
-  }
-}
-
-void MainWindow::load_off (const QString & fileName, bool clear)
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-  if (clear) this->clear_all();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  std::ifstream ifs (qPrintable (fileName));
-
-  CGAL::import_from_polyhedron_3_flux < LCC > (*scene.lcc, ifs);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to load off "<<qPrintable(fileName)<<": "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  init_all_new_volumes();
-
-  this->addToRecentFiles (fileName);
-  QApplication::restoreOverrideCursor ();
-
-  if (clear)
-    statusBar ()->showMessage (QString ("Load off file") + fileName,
-                               DELAY_STATUSMSG);
-  else
-    statusBar ()->showMessage (QString ("Add off file") + fileName,
-                               DELAY_STATUSMSG);
-  emit (sceneChanged ());
-}
-
-void MainWindow::load_3DTDS (const QString & fileName, bool clear)
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-  if (clear) this->clear_all();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  typedef CGAL::Delaunay_triangulation_3 < LCC::Traits > Triangulation;
-  Triangulation T;
-
-  std::ifstream ifs (qPrintable (fileName));
-  T.insert (std::istream_iterator < Point_3 >(ifs),
-            std::istream_iterator < Point_3 >() );
-
-  CGAL::import_from_triangulation_3 < LCC, Triangulation >(*scene.lcc, T);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to import the 3DTDS from "<<qPrintable(fileName)<<": "
-           <<timer.time()
-           <<" seconds (counting the time to compute denaulay triangulation)."
-           <<std::endl;
-#endif
-
-  init_all_new_volumes();
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-}
-
-Dart_handle MainWindow::make_iso_cuboid(const Point_3 basepoint, LCC::FT lg)
-{
-  return scene.lcc->make_hexahedron(basepoint,
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(lg,0,0)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(lg,lg,0)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(0,lg,0)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(0,lg,lg)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(0,0,lg)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(lg,0,lg)),
-                                    LCC::Traits::Construct_translated_point()
-                                    (basepoint,LCC::Traits::Vector(lg,lg,lg)));
-}
-
-Dart_handle MainWindow::on_actionCreate_cube_triggered ()
-{
-  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
-
-  Dart_handle d = make_iso_cuboid(basepoint, 1);
-
-  on_new_volume(d);
-
-  ++nbcube;
-
-  statusBar ()->showMessage (QString ("Cube created"),DELAY_STATUSMSG);
-
-  emit (sceneChanged ());
-
-  return d;
-}
-
-void MainWindow::on_actionCreate3Cubes_triggered ()
-{
-  Dart_handle d1 = make_iso_cuboid (Point_3 (nbcube, nbcube, nbcube),1);
-  Dart_handle d2 = make_iso_cuboid (Point_3 (nbcube + 1, nbcube, nbcube),1);
-  Dart_handle d3 = make_iso_cuboid (Point_3 (nbcube, nbcube + 1, nbcube), 1);
-
-  on_new_volume(d1);
-  on_new_volume(d2);
-  on_new_volume(d3);
-
-  scene.lcc->sew<3>(scene.lcc->beta(d1,1,1,2), scene.lcc->beta(d2,2));
-  scene.lcc->sew<3>(scene.lcc->beta(d1,2,1,1,2), d3);
-
-  ++nbcube;
-
-  statusBar ()->showMessage (QString ("3 cubes were created"),
-                             DELAY_STATUSMSG);
-
-  emit (sceneChanged ());
-}
-
-void MainWindow::on_actionCreate2Volumes_triggered ()
-{
-  Dart_handle d1 = make_iso_cuboid(Point_3(nbcube, nbcube, nbcube),1);
-  Dart_handle d2 = make_iso_cuboid(Point_3(nbcube + 1, nbcube, nbcube), 1);
-  Dart_handle d3 = make_iso_cuboid(Point_3(nbcube, nbcube + 1, nbcube), 1);
-  Dart_handle d4 = make_iso_cuboid(Point_3(nbcube + 1, nbcube + 1, nbcube), 1);
-
-  scene.lcc->sew<3>(scene.lcc->beta(d1,1,1,2), scene.lcc->beta(d2,2));
-  scene.lcc->sew<3>(scene.lcc->beta(d1,2,1,1,2), d3);
-
-  scene.lcc->sew<3>(scene.lcc->beta(d3,1,1,2), scene.lcc->beta(d4,2));
-  scene.lcc->sew<3>(scene.lcc->beta(d2,2,1,1,2), d4);
-
-  CGAL::remove_cell<LCC,2>(*scene.lcc, d3);
-  CGAL::remove_cell<LCC,2>(*scene.lcc, scene.lcc->beta(d2,2));
-
-  on_new_volume(d1);
-  on_new_volume(d4);
-
-  ++nbcube;
-  statusBar ()->showMessage (QString ("2 volumes were created"),
-                             DELAY_STATUSMSG);
-
-  emit (sceneChanged());
-}
-
-void MainWindow::on_actionCreate_mesh_triggered ()
-{
-  dialogmesh.show();
-}
-
-void MainWindow::onCreateMeshOk()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  for (int x=0; x<dialogmesh.getX(); ++x)
-    for (int y=0; y<dialogmesh.getY(); ++y)
-      for (int z=0; z<dialogmesh.getZ(); ++z)
-      {
-        Dart_handle d = make_iso_cuboid
-          (Point_3 (x+nbcube, y+nbcube, z+nbcube), 1);
-        on_new_volume(d);
-      }
-  nbcube+=dialogmesh.getX();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to create mesh ("<<dialogmesh.getX()<<", "
-           <<dialogmesh.getY()<<", "<<dialogmesh.getZ()<<"): "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  statusBar ()->showMessage (QString ("Mesh created"),DELAY_STATUSMSG);
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-}
-
-void MainWindow::on_actionSubdivide_triggered ()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  subdivide_lcc_3 (*(scene.lcc));
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to subdivide the current LCC: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-  statusBar ()->showMessage (QString ("Objects were subdivided"),
-                             DELAY_STATUSMSG);
-}
-
-void MainWindow::on_actionSubdivide_pqq_triggered ()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  subdivide_lcc_pqq (*(scene.lcc));
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to pqq-subdivide the current LCC: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-  statusBar ()->showMessage (QString ("Objects were subdivided"),
-                             DELAY_STATUSMSG);
-}
-
-
-void MainWindow::on_actionClear_triggered()
-{
-  clear_all();
-  statusBar ()->showMessage (QString ("Scene cleared"), DELAY_STATUSMSG);
-  emit (sceneChanged ());
-}
-
-void MainWindow::on_actionCompute_Voronoi_3D_triggered ()
-{
-  QString fileName = QFileDialog::getOpenFileName (this,
-                                                   tr ("Voronoi 3D"),
-                                                   ".",
-                                                   tr ("Data file (*)"));
-
-  if (fileName.isEmpty ()) return;
-
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-  this->clear_all();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  typedef CGAL::Delaunay_triangulation_3 < LCC::Traits > Triangulation;
-  Triangulation T;
-
-  LCC delaunay_lcc;
-  Dart_handle dh;
-
-  std::ifstream ifs (qPrintable (fileName));
-  T.insert (std::istream_iterator < Point_3 >(ifs),
-            std::istream_iterator < Point_3 >() );
-
-  std::map<Triangulation::Cell_handle,
-      LCC::Dart_handle > vol_to_dart;
-
-  dh = CGAL::import_from_triangulation_3 < LCC, Triangulation >
-      (delaunay_lcc, T, &vol_to_dart);
-
-  Dart_handle ddh=delaunay_lcc.dual(*scene.lcc, dh);
-
-  // We transform all the darts in vol_to_dart into their dual.
-  {
-    LCC::Dart_range::iterator it1=delaunay_lcc.darts().begin();
-    LCC::Dart_range::iterator it2=scene.lcc->darts().begin();
-
-    std::map<LCC::Dart_handle, LCC::Dart_handle> dual;
-
-    for ( ; it1!=delaunay_lcc.darts().end(); ++it1, ++it2 )
-    {
-      dual[it1]=it2;
-    }
-
-    // We update the geometry of dual_lcc by using the std::map face_to_dart.
-    for ( std::map<Triangulation::Cell_handle, LCC::Dart_handle>
-          ::iterator it=vol_to_dart.begin(), itend=vol_to_dart.end();
-          it!=itend; ++it)
-    {
-      vol_to_dart[it->first]=dual[it->second];
-      if ( !T.is_infinite(it->first) )
-        scene.lcc->set_vertex_attribute
-            (it->second,scene.lcc->create_vertex_attribute(T.dual(it->first)));
-      /*       else
-                alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());*/
-    }
-  }
-
-  // We remove the infinite volume and all its adjacent volumes.
-  {
-    std::stack<Dart_handle> toremove;
-    int mark_toremove=scene.lcc->get_new_mark();
-    toremove.push(ddh);
-    CGAL::mark_cell<LCC,3>(*scene.lcc, ddh, mark_toremove);
-    for (LCC::Dart_of_cell_range<3>::iterator
-         it=scene.lcc->darts_of_cell<3>(ddh).begin(),
-         itend=scene.lcc->darts_of_cell<3>(ddh).end(); it!=itend; ++it)
-    {
-      if ( !scene.lcc->is_marked(scene.lcc->beta(it,3), mark_toremove) )
-      {
-        CGAL::mark_cell<LCC,3>(*scene.lcc,
-                               scene.lcc->beta(it,3), mark_toremove);
-        toremove.push(scene.lcc->beta(it,3));
-      }
-    }
-    while( !toremove.empty() )
-    {
-      CGAL::remove_cell<LCC, 3>(*scene.lcc, toremove.top());
-      toremove.pop();
-    }
-    CGAL_assertion(scene.lcc->is_whole_map_unmarked(mark_toremove));
-    scene.lcc->free_mark(mark_toremove);
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to compute Voronoi 3D from "<<qPrintable(fileName)<<": "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  init_all_new_volumes();
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-  statusBar ()->showMessage (QString ("Voronoi 3D of points in ") + fileName,
-                             DELAY_STATUSMSG);
-}
-
-void MainWindow::on_actionDual_3_triggered ()
-{
-  if ( !scene.lcc->is_without_boundary(3) )
-  {
-    statusBar()->showMessage
-        (QString ("Dual impossible: the lcc has some 3-boundary"),
-         DELAY_STATUSMSG);
-    return;
-  }
-
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  LCC* duallcc = new LCC;
-  scene.lcc->dual_points_at_barycenter(*duallcc);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to compute the dual: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  this->clear_all();
-  delete scene.lcc;
-  scene.lcc = duallcc;
-  this->viewer->setScene(&scene);
-  init_all_new_volumes();
-
-  statusBar ()->showMessage (QString ("Dual_3 computed"), DELAY_STATUSMSG);
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-}
-
-void MainWindow::on_actionClose_volume_triggered()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  if ( scene.lcc->close<3>() > 0 )
-  {
-    init_all_new_volumes();
-    statusBar ()->showMessage (QString ("All volume(s) closed"),
-                               DELAY_STATUSMSG);
-    emit (sceneChanged ());
-  }
-  else
-    statusBar ()->showMessage
-        (QString ("LCC already 3-closed"), DELAY_STATUSMSG);
-
-  QApplication::restoreOverrideCursor ();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to 3-close the current lcc: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-}
-
-void MainWindow::on_actionSew3_same_facets_triggered()
-{
-  int mymark = scene.lcc->get_new_mark();
-  mark_all_filled_and_visible_volumes(mymark);
-
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  if ( scene.lcc->sew3_same_facets(mymark) > 0 )
-  {
-    statusBar()->showMessage
-        (QString ("Same facets of visible and filled volume(s) are 3-sewn"),
-         DELAY_STATUSMSG);
-    emit (sceneChanged ());
-  }
-  else
-    statusBar()->showMessage (QString ("No facets 3-sewn"), DELAY_STATUSMSG);
-
-  scene.lcc->free_mark(mymark);
-
-  QApplication::restoreOverrideCursor ();
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to sew3 all same facets: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-}
-
-void MainWindow::on_actionUnsew3_all_triggered()
-{
-  unsigned int nb=0;
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  for (LCC::Dart_range::iterator it=scene.lcc->darts().begin();
-       it!=scene.lcc->darts().end(); ++it)
-  {
-    if ( !scene.lcc->is_free(it,3) &&
-         scene.lcc->info<3>(it).is_filled_and_visible() &&
-         scene.lcc->info<3>(scene.lcc->beta(it,3))
-           .is_filled_and_visible())
-    { scene.lcc->unsew<3>(it); ++nb; }
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to unsew3 all filled volumes: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-  QApplication::restoreOverrideCursor ();
-
-  if ( nb > 0 )
-  {
-    statusBar()->showMessage
-        (QString ("Darts between visible and filled volume(s) are 3-unsewn"),
-         DELAY_STATUSMSG);
-    emit (sceneChanged ());
-  }
-  else
-    statusBar()->showMessage (QString ("No dart 3-unsewn"), DELAY_STATUSMSG);
-}
-
-void MainWindow::on_actionRemove_filled_volumes_triggered()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  unsigned int count = 0;
-  for (LCC::Attribute_range<3>::type::iterator
-       it=scene.lcc->attributes<3>().begin(),
-       itend=scene.lcc->attributes<3>().end(); it!=itend; )
-  {
-    LCC::Attribute_handle<3>::type cur = it++;
-    if( scene.lcc->get_attribute<3>(cur).info().is_filled_and_visible() )
-    {
-      CGAL::remove_cell<LCC,3>(*scene.lcc,scene.lcc->get_attribute<3>(cur).dart());
-      ++count;
-    }
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to remove all filled volumes: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  recreate_whole_volume_list();
-  QApplication::restoreOverrideCursor ();
-  emit(sceneChanged());
-
-  statusBar()->showMessage
-      (QString::number(count)+QString("Visible and filled volume(s) removed"),
-       DELAY_STATUSMSG);
-}
-
-void MainWindow::on_actionTriangulate_all_facets_triggered()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  std::vector<LCC::Dart_handle> v;
-  for (LCC::One_dart_per_cell_range<2>::iterator
-       it(scene.lcc->one_dart_per_cell<2>().begin()); it.cont(); ++it)
-  {
-    if ( scene.lcc->info<3>(it).is_filled_and_visible() )
-      v.push_back(it);
-  }
-  for (std::vector<LCC::Dart_handle>::iterator itv(v.begin());
-       itv!=v.end(); ++itv)
-    scene.lcc->insert_barycenter_in_cell<2>(*itv);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to triangulate all filled faces: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-  statusBar()->showMessage
-      (QString ("Facets of visible and filled volume(s) triangulated"),
-       DELAY_STATUSMSG);
-}
-
-void MainWindow::on_actionMerge_all_volumes_triggered()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  scene.lcc->set_update_attributes(false);
-
-  Dart_handle prev = scene.lcc->null_handle;
-  for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()),
-       itend=scene.lcc->darts().end(); it!=itend; )
-  {
-    if ( !scene.lcc->is_free(it,3) &&
-         scene.lcc->info<3>(it).is_filled_and_visible() &&
-         scene.lcc->info<3>(scene.lcc->beta(it,3))
-          .is_filled_and_visible())
-    {
-      CGAL::remove_cell<LCC,2>(*scene.lcc,it);
-      itend=scene.lcc->darts().end();
-      if ( prev==scene.lcc->null_handle ) it=scene.lcc->darts().begin();
-      else { it=prev; if ( it!=itend ) ++it; }
-    }
-    else
-      ++it;
-  }
-
-  scene.lcc->set_update_attributes(true);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Time to merge all filled volumes: "
-           <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  recreate_whole_volume_list();
-
-  QApplication::restoreOverrideCursor ();
-  emit (sceneChanged ());
-  statusBar()->showMessage
-      (QString ("Visible and filled volume(s) merged"), DELAY_STATUSMSG);
-}
-
-bool MainWindow::is_volume_in_list(LCC::Attribute_handle<3>::type ah)
-{
-  for(int row=0; row < volumeList->rowCount(); ++row)
-  {
-    LCC::Attribute_type<3>::type* ptr=
-        reinterpret_cast<LCC::Attribute_type<3>::type*>
-        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
-
-    if(ptr==&(scene.lcc->get_attribute<3>(ah))) return true;
-  }
-
-  return false;
-}
-
-void MainWindow::update_volume_list_add(LCC::Attribute_handle<3>::type ah)
-{
-  // CGAL_assertion( !is_volume_in_list(ah) );
-
-  volumeList->disconnect(this);
-
-  int newRow = volumeList->rowCount();
-  volumeList->setRowCount(newRow+1);
-
-  QTableWidgetItem* volumeLabel = new QTableWidgetItem
-    (QString((scene.lcc->get_attribute<3>(ah).info().color_name().c_str())));
-  volumeLabel->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
-  volumeLabel->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
-  volumeList->setItem(newRow,0,volumeLabel);
-
-  QTableWidgetItem* fillCB = new QTableWidgetItem;
-  fillCB->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
-  if ( scene.lcc->get_attribute<3>(ah).info().is_filled() )
-    fillCB->setCheckState(Qt::Checked);
-  else
-    fillCB->setCheckState(Qt::Unchecked);
-  volumeList->setItem(newRow,1, fillCB);
-
-  QTableWidgetItem* hiddenCB = new QTableWidgetItem();
-  hiddenCB->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
-  if ( scene.lcc->get_attribute<3>(ah).info().is_visible() )
-    hiddenCB->setCheckState(Qt::Unchecked);
-  else
-    hiddenCB->setCheckState(Qt::Checked);
-  volumeList->setItem(newRow,2,hiddenCB);
-
-  QTableWidgetItem* attribHandle = new QTableWidgetItem;
-  attribHandle->setData
-      (Qt::UserRole,
-       reinterpret_cast<quintptr>(&scene.lcc->get_attribute<3>(ah)));
-
-  volumeList->setItem(newRow,3,attribHandle);
-
-  connectVolumeListHandlers();
-}
-
-void MainWindow::update_volume_list_remove(int i)
-{
-  CGAL_assertion(i<volumeList->rowCount());
-  volumeList->removeRow(i);
-}
-
-void MainWindow::update_volume_list_remove(LCC::Attribute_handle<3>::type ah)
-{
-  for(int row=0; row < volumeList->rowCount(); ++row)
-  {
-    LCC::Attribute_type<3>::type* ptr=
-        reinterpret_cast<LCC::Attribute_type<3>::type*>
-        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
-
-    if(ptr==&scene.lcc->get_attribute<3>(ah))
-    {
-      update_volume_list_remove(row);
-      return;
-    }
-  }
-}
-
-void MainWindow::update_volume_list_all_ckeckstates()
-{
-  volumeList->disconnect(this);
-
-  for(int row=0; row < volumeList->rowCount(); ++row)
-  {
-    LCC::Attribute_type<3>::type* ptr=
-        reinterpret_cast<LCC::Attribute_type<3>::type*>
-        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
-
-    if ( ptr->info().is_filled() )
-      volumeList->item(row,1)->setCheckState(Qt::Checked);
-    else
-      volumeList->item(row,1)->setCheckState(Qt::Unchecked);
-
-    if ( !ptr->info().is_visible() )
-      volumeList->item(row,2)->setCheckState(Qt::Checked);
-    else
-      volumeList->item(row,2)->setCheckState(Qt::Unchecked);
-  }
-
-  connectVolumeListHandlers();
-}
-
-void MainWindow::recreate_whole_volume_list()
-{
-  volumeList->clearContents();
-  volumeList->setRowCount(0);
-
-  for (LCC::Attribute_range<3>::type::iterator
-       it=scene.lcc->attributes<3>().begin(),
-       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
-    update_volume_list_add(it);
-}
-
-void MainWindow::onCellChanged(int row, int col)
-{
-  LCC::Attribute_type<3>::type* ptr=
-      reinterpret_cast<LCC::Attribute_type<3>::type*>
-      ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
-
-  if ( col==1 )
-  {
-    ptr->info().negate_filled();
-  }
-  else if ( col==2 )
-  {
-    ptr->info().negate_visible();
-    if ( !ptr->info().is_visible() )
-      volumeList->item(row,1)->setFlags
-          (volumeList->item(row,1)->flags()^Qt::ItemIsEnabled);
-    else
-      volumeList->item(row,1)->setFlags
-          (volumeList->item(row,1)->flags()|Qt::ItemIsEnabled);
-  }
-
-  emit(sceneChanged());
-}
-
-void MainWindow::onHeaderClicked(int col)
-{
-  if(col != 0)
-  {
-    volumeList->disconnect(this);
-
-    for(int i = 0; i < volumeList->rowCount(); ++i)
-    {
-      LCC::Attribute_type<3>::type* ptr=
-          reinterpret_cast<LCC::Attribute_type<3>::type*>
-          ( volumeList->item(i,3)->data(Qt::UserRole).value<quintptr>() );
-
-      switch(qApp->keyboardModifiers())
-      {
-      case(Qt::ShiftModifier):
-        if (col==1)
-          ptr->info().set_filled(false);
-        else if (col==2)
-        {
-          ptr->info().set_visible(true);
-          volumeList->item(i,1)->setFlags
-              (volumeList->item(i,1)->flags()|Qt::ItemIsEnabled);
-        }
-        volumeList->item(i,col)->setCheckState(Qt::Unchecked);
-        break;
-      case(Qt::ControlModifier):
-        if (col==1)
-          ptr->info().negate_filled();
-        else if (col==2)
-        {
-          ptr->info().negate_visible();
-          if ( !ptr->info().is_visible() )
-            volumeList->item(i,1)->setFlags
-                (volumeList->item(i,1)->flags()^Qt::ItemIsEnabled);
-          else
-            volumeList->item(i,1)->setFlags
-                (volumeList->item(i,1)->flags()|Qt::ItemIsEnabled);
-        }
-        volumeList->item(i,col)->
-            setCheckState(volumeList->item(i,col)->checkState() ?
-                            Qt::Unchecked: Qt::Checked);
-        break;
-      default:
-        if (col==1)
-          ptr->info().set_filled(true);
-        else if (col==2)
-        {
-          if ( ptr->info().is_visible() )
-          {
-            ptr->info().set_visible(false);
-            volumeList->item(i,1)->setFlags
-              (volumeList->item(i,1)->flags()^Qt::ItemIsEnabled);
-          }
-        }
-        volumeList->item(i,col)->setCheckState(Qt::Checked);
-        break;
-      }
-    }
-
-    connectVolumeListHandlers();
-    emit(sceneChanged());
-  }
-}
-
-void MainWindow::mark_all_filled_and_visible_volumes(int amark)
-{
-  for (LCC::Attribute_range<3>::type::iterator
-       it=scene.lcc->attributes<3>().begin(),
-       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
-  {
-    if ( scene.lcc->get_attribute<3>(it).info().is_filled_and_visible() &&
-         !scene.lcc->is_marked(it->dart(), amark) )
-      CGAL::mark_cell<LCC,3>(*scene.lcc,
-                             scene.lcc->get_attribute<3>(it).dart(), amark);
-  }
-}
-
-void MainWindow::on_actionExtend_filled_volumes_triggered()
-{
-  volumeList->disconnect(this);
-
-  std::vector<LCC::Attribute_handle<3>::type> tofill;
-
-  int mark_volume = scene.lcc->get_new_mark();
-  bool already_tofill;
-
-  for (LCC::Attribute_range<3>::type::iterator
-       it=scene.lcc->attributes<3>().begin(),
-       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
-  {
-    if ( !scene.lcc->is_marked(it->dart(), mark_volume) )
-    {
-      if ( !scene.lcc->get_attribute<3>(it).info().is_filled() )
-      {
-        already_tofill = false;
-        for (LCC::Dart_of_cell_basic_range<3>::iterator it2=
-               scene.lcc->darts_of_cell_basic<3>(it->dart(), mark_volume).begin();
-             it2.cont(); ++it2 )
-        {
-          scene.lcc->mark(it2, mark_volume);
-          if ( !scene.lcc->is_free(it2,3) &&
-               scene.lcc->info<3>(scene.lcc->beta(it2,3)).
-                 is_filled() && !already_tofill)
-          {
-            tofill.push_back(scene.lcc->attribute<3>(it2));
-            already_tofill = true;
-          }
-        }
-      }
-      else
-        CGAL::mark_cell<LCC,3>(*scene.lcc, it->dart(), mark_volume);
-    }
-  }
-
-  CGAL_assertion( scene.lcc->is_whole_map_marked(mark_volume) );
-  scene.lcc->free_mark(mark_volume);
-
-  if ( tofill.size()>0 )
-  {
-    for ( std::vector<LCC::Attribute_handle<3>::type>::iterator
-            it=tofill.begin(), itend=tofill.end(); it!=itend; ++it )
-    {
-      scene.lcc->get_attribute<3>(*it).info().set_filled(true);
-    }
-
-    update_volume_list_all_ckeckstates();
-    emit(sceneChanged());
-  }
-
-  connectVolumeListHandlers();
-}
-
-void MainWindow::on_actionExtend_hidden_volumes_triggered()
-{
-  volumeList->disconnect(this);
-
-  std::vector<LCC::Attribute_handle<3>::type> tohide;
-
-  int mark_volume = scene.lcc->get_new_mark();
-  bool already_tohide;
-
-  for (LCC::Attribute_range<3>::type::iterator
-       it=scene.lcc->attributes<3>().begin(),
-       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
-  {
-    if ( !scene.lcc->is_marked(it->dart(), mark_volume) )
-    {
-      if ( scene.lcc->get_attribute<3>(it).info().is_visible() )
-      {
-        already_tohide = false;
-        for (LCC::Dart_of_cell_basic_range<3>::iterator it2=
-               scene.lcc->darts_of_cell_basic<3>(it->dart(), mark_volume).begin();
-             it2.cont(); ++it2 )
-        {
-          scene.lcc->mark(it2, mark_volume);
-          if ( !scene.lcc->is_free(it2,3) &&
-               !scene.lcc->info<3>(scene.lcc->beta(it2,3)).
-                  is_visible() && !already_tohide)
-          {
-            tohide.push_back(scene.lcc->attribute<3>(it2));
-            already_tohide = true;
-          }
-        }
-      }
-      else
-        CGAL::mark_cell<LCC,3>(*scene.lcc, it->dart(), mark_volume);
-    }
-  }
-
-  CGAL_assertion( scene.lcc->is_whole_map_marked(mark_volume) );
-  scene.lcc->free_mark(mark_volume);
-
-  if ( tohide.size()>0 )
-  {
-    for ( std::vector<LCC::Attribute_handle<3>::type>::iterator
-            it=tohide.begin(), itend=tohide.end(); it!=itend; ++it )
-    {
-      scene.lcc->get_attribute<3>(*it).info().set_visible(false);
-    }
-
-    update_volume_list_all_ckeckstates();
-    emit(sceneChanged());
-  }
-
-  connectVolumeListHandlers();
-}
-
-void MainWindow::on_actionCreate_Menger_Sponge_triggered ()
-{
-  dialogmenger.mengerLevel->disconnect(this);
-
-  mengerUpdateAttributes = dialogmenger.updateAttributes->isChecked();
-
-  dialogmenger.mengerLevel->setValue(0);
-  mengerLevel=0;
-  CGAL_assertion( mengerVolumes.empty() );
-  mengerVolumes.push_back(on_actionCreate_cube_triggered());
-  update_operations_entries(false);
-
-  QObject::connect(dialogmenger.mengerLevel, SIGNAL(valueChanged(int)),
-                   this, SLOT(onMengerChange(int)));
-
-  dialogmenger.show();
-}
-
-void MainWindow::onMengerCancel()
-{
-  for(std::vector<Dart_handle>::iterator it=mengerVolumes.begin();
-      it!=mengerVolumes.end(); ++it)
-  {
-    CGAL::remove_cell<LCC,3>(*scene.lcc, *it);
-  }
-
-  recreate_whole_volume_list();
-  mengerVolumes.clear();
-  update_operations_entries(true);
-  statusBar()->showMessage (QString ("Menger sponge creation canceled"),
-                            DELAY_STATUSMSG);
-  emit(sceneChanged());
-}
-
-void MainWindow::onMengerOk()
-{
-  update_operations_entries(true);
-  mengerVolumes.clear();
-}
-
-void MainWindow::onMengerChange(int newLevel)
-{
-  while ( newLevel > mengerLevel ) onMengerInc();
-  while ( newLevel < mengerLevel ) onMengerDec();
-}
-
-void MainWindow::onMengerUpdateAttributes(bool newValue)
-{
-  mengerUpdateAttributes = newValue;
-}
-
-void MainWindow::onMengerInc()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->mengerLevel++;
-
-  if (!mengerUpdateAttributes)
-  {
-    scene.lcc->set_update_attributes(false);
-  }
-
-  std::vector<Dart_handle> edges;
-  std::vector<Dart_handle> faces;
-  std::size_t nbvolinit = mengerVolumes.size();
-
-  int markEdges = (scene.lcc)->get_new_mark();
-  int markFaces = (scene.lcc)->get_new_mark();
-  int markVols  = (scene.lcc)->get_new_mark();
-
-  for(std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    CGAL_assertion( !(scene.lcc)->is_marked(*itvol, markVols) );
-    for (LCC::Dart_of_cell_basic_range<3>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).end();
-         it!=itend; ++it)
-    {
-      if ( !(scene.lcc)->is_marked(it, markEdges) )
-      {
-        edges.push_back(it);
-        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
-      }
-      if ( !(scene.lcc)->is_marked(it, markFaces) )
-      {
-        faces.push_back(it);
-        CGAL::mark_cell<LCC,2>(*(scene.lcc), it, markFaces);
-      }
-    }
-  }
-
-  (scene.lcc)->negate_mark(markVols);
-  for(std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    for (LCC::Dart_of_cell_basic_range<3>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).end();
-         it!=itend; ++it)
-    {
-      (scene.lcc)->unmark(it, markEdges);
-      (scene.lcc)->unmark(it, markFaces);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markVols);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
-
-  (scene.lcc)->free_mark(markEdges);
-  (scene.lcc)->free_mark(markFaces);
-  (scene.lcc)->free_mark(markVols);
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    split_edge_in_three(edges[i]);
-  }
-  edges.clear();
-
-  for(std::size_t i = 0; i < faces.size(); i++)
-  {
-    split_face_in_nine(faces[i]);
-  }
-  faces.clear();
-
-  for(std::size_t i = 0; i < nbvolinit; i++)
-  {
-    split_vol_in_twentyseven(mengerVolumes[i]);
-  }
-
-  if (!mengerUpdateAttributes)
-  {
-    for(std::size_t i = nbvolinit; i < mengerVolumes.size(); i++)
-    {
-      LCC::Attribute_handle<3>::type ah = (scene.lcc)->create_attribute<3>();
-      scene.lcc->set_attribute<3>(mengerVolumes[i], ah);
-      scene.lcc->info<3>(mengerVolumes[i]).color()=
-          (CGAL::Color(myrandom.get_int(0,256),
-                       myrandom.get_int(0,256),
-                       myrandom.get_int(0,256)));
-
-        update_volume_list_add(scene.lcc->attribute<3>(mengerVolumes[i]));
-    }
-
-    scene.lcc->set_update_attributes(true);
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Menger sponge "
-           <<this->mengerLevel-1<<" -> "<<this->mengerLevel<<", "
-          <<"attributes updated "
-         <<(mengerUpdateAttributes ? "DURING" : "AFTER")
-        << " construction: "
-        <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  CGAL_assertion( (scene.lcc)->is_valid() );
-
-  QApplication::restoreOverrideCursor ();
-  statusBar()->showMessage(QString ("Menger sponge creation %1 -> %2").
-                           arg(this->mengerLevel-1).arg(this->mengerLevel),
-                           DELAY_STATUSMSG);
-
-  emit(sceneChanged());
-}
-
-void MainWindow::split_edge_in_three(Dart_handle dh)
-{
-  LCC::Point p1 = scene.lcc->point(dh);
-  LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
-
-  LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
-  LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-
-  LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
-  LCC::Point p4 = LCC::Traits::Construct_translated_point() (p1,v3);
-
-  (scene.lcc)->insert_point_in_cell<1>(dh,p4);
-  (scene.lcc)->insert_point_in_cell<1>(dh,p3);
-}
-
-void MainWindow::split_face_in_three(Dart_handle dh)
-{
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),scene.lcc->beta(dh,1,1,1),
-                                scene.lcc->beta(dh,0,0));
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),scene.lcc->beta(dh,1,1),
-                                scene.lcc->beta(dh,0));
-}
-
-void MainWindow::split_face_in_nine(Dart_handle dh)
-{
-  Dart_handle d2 = scene.lcc->beta(dh,1,1,1,1,1,1,1);
-
-  Dart_handle e2= CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                                scene.lcc->beta(dh,1,1),d2);
-  Dart_handle e1= CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                                scene.lcc->beta(dh,1),
-                                                scene.lcc->beta(d2,1));
-
-  split_edge_in_three(e1);
-  split_edge_in_three(e2);
-
-  split_face_in_three(dh);
-  split_face_in_three(d2);
-  split_face_in_three(scene.lcc->beta(e2,0));
-}
-
-void MainWindow::split_vol_in_three(Dart_handle dh, bool removecenter)
-{
-  std::vector<Dart_handle> edges1;
-  std::vector<Dart_handle> edges2;
-
-  Dart_handle curd = scene.lcc->beta(dh,2,1,1,2);
-  for (unsigned int i=0;i<4;++i)
-  {
-    edges1.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==scene.lcc->beta(dh,2,1,1,2) );
-
-  curd = scene.lcc->beta(curd,1,1,2);
-  for (unsigned int i=0;i<4;++i)
-  {
-    edges2.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==
-                  scene.lcc->beta(dh,2,1,1,2,1,1,2) );
-
-  Dart_handle f1=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
-
-  Dart_handle f2=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
-
-  if (scene.lcc->are_attributes_automatically_managed())
-  {
-    scene.lcc->info<3>(f1).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-    scene.lcc->info<3>(f2).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-
-    update_volume_list_add(scene.lcc->attribute<3>(dh));
-  }
-
-  if ( removecenter )
-    CGAL::remove_cell<LCC,3>(*scene.lcc,f1);
-  else
-  {
-    mengerVolumes.push_back(f1);
-
-    if (scene.lcc->are_attributes_automatically_managed())
-      update_volume_list_add(scene.lcc->attribute<3>(f1));
-  }
-
-  mengerVolumes.push_back(f2);
-}
-
-void MainWindow::split_vol_in_nine(Dart_handle dh, bool removecenter)
-{
-  std::vector<Dart_handle> edges1;
-  std::vector<Dart_handle> edges2;
-
-  Dart_handle curd = scene.lcc->beta(dh,1,2);
-  for (unsigned int i=0;i<8;++i)
-  {
-    edges1.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==scene.lcc->beta(dh,1,2) );
-
-  curd = scene.lcc->beta(curd,1,1,2);
-  for (unsigned int i=0;i<8;++i)
-  {
-    edges2.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==scene.lcc->beta(dh,1,2,1,1,2) );
-
-  Dart_handle f1=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
-
-  Dart_handle f2=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
-
-  if (scene.lcc->are_attributes_automatically_managed())
-  {
-    scene.lcc->info<3>(f1).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-    scene.lcc->info<3>(f2).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-
-    update_volume_list_add(scene.lcc->attribute<3>(dh));
-    if ( !removecenter)
-      update_volume_list_add(scene.lcc->attribute<3>(f1));
-  }
-
-  split_face_in_three(f1);
-  split_face_in_three(f2);
-
-  split_vol_in_three(dh,removecenter);
-
-  mengerVolumes.push_back(scene.lcc->beta(f2,2,1));
-  split_vol_in_three(scene.lcc->beta(f2,2,1),removecenter);
-
-  if ( removecenter )
-    CGAL::remove_cell<LCC,3>(*scene.lcc,f1);
-  else
-  {
-    mengerVolumes.push_back(scene.lcc->beta(f1,2,1));
-    split_vol_in_three(scene.lcc->beta(f1,2,1),true);
-  }
-}
-
-void MainWindow::split_vol_in_twentyseven(Dart_handle dh)
-{
-  std::vector<Dart_handle> edges1;
-  std::vector<Dart_handle> edges2;
-
-  Dart_handle curd = scene.lcc->beta(dh,1,1,2);
-  for (unsigned int i=0;i<12;++i)
-  {
-    edges1.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==scene.lcc->beta(dh,1,1,2) );
-
-  curd = scene.lcc->beta(curd,1,1,2);
-  for (unsigned int i=0;i<12;++i)
-  {
-    edges2.push_back(curd);
-    curd=scene.lcc->beta(curd,1,2,1);
-  }
-  CGAL_assertion( curd==scene.lcc->beta(dh,1,1,2,1,1,2) );
-
-  Dart_handle f1=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
-
-  Dart_handle f2=
-      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
-
-  if (scene.lcc->are_attributes_automatically_managed())
-  {
-    scene.lcc->info<3>(f1).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-    scene.lcc->info<3>(f2).color()=
-      (CGAL::Color(myrandom.get_int(0,256),
-                   myrandom.get_int(0,256),
-                   myrandom.get_int(0,256)));
-    update_volume_list_add(scene.lcc->attribute<3>(dh));
-    update_volume_list_add(scene.lcc->attribute<3>(f1));
-
-  }
-
-  mengerVolumes.push_back(scene.lcc->beta(f1,2));
-  mengerVolumes.push_back(scene.lcc->beta(f2,2));
-
-  split_face_in_nine(scene.lcc->beta(f1,1));
-  split_face_in_nine(scene.lcc->beta(f2,1));
-
-  split_vol_in_nine(dh,false);
-  split_vol_in_nine(scene.lcc->beta(f1,2),true);
-  split_vol_in_nine(scene.lcc->beta(f2,2),false);
-}
-
-void MainWindow::process_full_slice(Dart_handle init,
-                                  std::vector<Dart_handle>& faces,
-                                  int markVols)
-{
-  Dart_handle d[12];
-  d[0]=scene.lcc->beta(init,1,2);
-  d[1]=scene.lcc->beta(d[0],3,1,2,1);
-  d[2]=scene.lcc->beta(d[1],1,2,1);
-  d[3]=scene.lcc->beta(d[2],3,1,2,1);
-
-  d[4]=scene.lcc->beta(init,1,1,2);
-  d[5]=scene.lcc->beta(d[4],3,0,2,0);
-  d[6]=scene.lcc->beta(d[5],0,2,0);
-
-  d[7]=scene.lcc->beta(d[6],3,0,2,0);
-  d[8]=scene.lcc->beta(d[7],3,0,2,0);
-  d[9]=scene.lcc->beta(d[8],0,2,0);
-
-  d[10]=scene.lcc->beta(d[9],3,0,2,0);
-  d[11]=scene.lcc->beta(d[10],3,0,2,0);
-
-  for (unsigned int j=0; j<12; ++j)
-  {
-    if ( !(scene.lcc)->is_marked(d[j], markVols) )
-    {
-      CGAL::mark_cell<LCC,3>(*(scene.lcc), d[j], markVols);
-    }
-    faces.push_back(d[j]);
-  }
-}
-
-void MainWindow::process_inter_slice(Dart_handle init,
-                                   std::vector<Dart_handle>& faces,
-                                   int markVols)
-{
-  Dart_handle d[24];
-  d[0]=init;
-  d[1]=scene.lcc->beta(d[0],0,2,3,2,0);
-  d[2]=scene.lcc->beta(d[1],0,2,3,2,0);
-  d[3]=scene.lcc->beta(d[2],1,1,2,3,2);
-  d[4]=scene.lcc->beta(d[3],1,1,2,3,2);
-  d[5]=scene.lcc->beta(d[0],1,1,2,3,2);
-  d[6]=scene.lcc->beta(d[5],1,1,2,3,2);
-  d[7]=scene.lcc->beta(d[6],0,2,3,2,0);
-
-  init = scene.lcc->beta(init,3,2,1,1,2);
-  d[8]=init;
-  d[9]=scene.lcc->beta(d[8],3,1,2,3,2,1);
-  d[10]=scene.lcc->beta(d[9],1,2,3,2,1,3);
-  d[11]=scene.lcc->beta(d[10],3,0,0,2,3,2);
-  d[12]=scene.lcc->beta(d[11],0,0,2,3,2,3);
-  d[13]=scene.lcc->beta(d[8],3,0,0,2,3,2);
-  d[14]=scene.lcc->beta(d[13],0,0,2,3,2,3);
-  d[15]=scene.lcc->beta(d[14],3,1,2,3,2,1);
-
-  d[16]=scene.lcc->beta(d[0],3,1,2);
-  d[17]=scene.lcc->beta(d[0],3,1,1,2);
-
-  d[18]=scene.lcc->beta(d[4],3,2);
-  d[19]=scene.lcc->beta(d[4],3,0,2);
-
-  d[20]=scene.lcc->beta(d[2],3,0,2);
-  d[21]=scene.lcc->beta(d[2],3,1,1,2);
-
-  d[22]=scene.lcc->beta(d[6],3,2);
-  d[23]=scene.lcc->beta(d[6],3,1,2);
-
-  for (unsigned int j=0; j<24; ++j)
-  {
-    CGAL_assertion( d[j]!=(scene.lcc)->null_dart_handle );
-    if ( !(scene.lcc)->is_marked(d[j], markVols) )
-    {
-      CGAL::mark_cell<LCC,3>(*(scene.lcc), d[j], markVols);
-    }
-    faces.push_back(d[j]);
-  }
-}
-
-void MainWindow::onMengerDec()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->mengerLevel--;
-
-  // We know here the number of Menger volume: 20^mengerLevel
-  // thus we can directly "cut" the std::vector to the correct size.
-  mengerVolumes.resize(CGAL::ipower(20,mengerLevel));
-
-  int markVols     = (scene.lcc)->get_new_mark();
-  int markVertices = (scene.lcc)->get_new_mark();
-
-  std::vector<Dart_handle> faces;
-  std::vector<Dart_handle> edges;
-  std::vector<Dart_handle> vertices;
-
-  // First we remove faces.
-  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    if ( !(scene.lcc)->is_marked(*itvol, markVols) )
-    {
-      Dart_handle init=*itvol;
-      CGAL::mark_cell<LCC,3>(*(scene.lcc), init, markVols);
-      process_full_slice(init, faces, markVols);
-      init=scene.lcc->beta(init, 2,1,1,2);
-      process_inter_slice(init, faces, markVols);
-      init=scene.lcc->beta(init, 3,2,1,1,2,3);
-      process_full_slice(init, faces, markVols);
-    }
-  }
-
-  for(std::size_t i = 0; i < faces.size(); i++)
-  {
-    CGAL::remove_cell<LCC,2>(*scene.lcc, faces[i],mengerUpdateAttributes);
-  }
-  faces.clear();
-
-  // Now we remove edges.
-  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    if ( (scene.lcc)->is_marked(*itvol, markVols) )
-      CGAL::unmark_cell<LCC,3>(*(scene.lcc), *itvol, markVols);
-
-    for (LCC::Dart_of_cell_range<3>::iterator
-           it=scene.lcc->darts_of_cell<3>(*itvol).begin(),
-           itend=scene.lcc->darts_of_cell<3>(*itvol).end();
-         it!=itend; ++it)
-    {
-      if ( scene.lcc->is_free(it,2) &&
-           ( scene.lcc->is_free(it,3) || it<scene.lcc->beta(it,3) ) )
-        edges.push_back(it);
-    }
-  }
-
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],0),mengerUpdateAttributes);
-    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],1),mengerUpdateAttributes);
-    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],mengerUpdateAttributes);
-  }
-  edges.clear();
-
-  // Lastly we remove vertices.
-  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    for (LCC::Dart_of_cell_basic_range<3>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<3>
-           (*itvol, markVols).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<3>
-           (*itvol, markVols).end(); it!=itend; ++it)
-    {
-      if ( !(scene.lcc)->is_marked(it, markVertices) )
-      {
-        if ( CGAL::is_removable<LCC, 0>(*scene.lcc, it) )
-          vertices.push_back(it);
-        CGAL::mark_cell<LCC, 0>(*scene.lcc, it, markVertices);
-      }
-    }
-  }
-
-  (scene.lcc)->negate_mark(markVols);
-  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
-        itvol!=mengerVolumes.end(); ++itvol)
-  {
-    for (LCC::Dart_of_cell_basic_range<3>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<3>
-           (*itvol, markVols).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<3>
-           (*itvol, markVols).end(); it!=itend; ++it)
-    {
-      if ( (scene.lcc)->is_marked(it, markVertices) )
-        CGAL::unmark_cell<LCC, 0>(*scene.lcc, it, markVertices);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markVols);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
-
-  for(std::size_t i = 0; i < vertices.size(); i++)
-  {
-    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],mengerUpdateAttributes);
-  }
-  vertices.clear();
-
-  (scene.lcc)->free_mark(markVols);
-  (scene.lcc)->free_mark(markVertices);
-
-  if (!mengerUpdateAttributes)
-  {
-    scene.lcc->correct_invalid_attributes();
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Menger sponge "
-           <<this->mengerLevel+1<<" -> "<<this->mengerLevel<<", "
-          <<"attributes updated "
-         <<(mengerUpdateAttributes ? "DURING" : "AFTER")
-        << " construction: "
-        <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  recreate_whole_volume_list();
-
-  statusBar()->showMessage(QString ("Menger sponge creation %1 -> %2").
-                           arg(this->mengerLevel+1).arg(this->mengerLevel),
-                           DELAY_STATUSMSG);
-
-  QApplication::restoreOverrideCursor ();
-  emit(sceneChanged());
-}
-
-///////////////////////////////////////////////////////////////////////////////////
-// SIERPINSKI CARPET
-///////////////////////////////////////////////////////////////////////////////////
-
-void MainWindow::on_actionCreate_Sierpinski_Carpet_triggered ()
-{
-  /*neverUpdateAttributes = dialogsierpinskicarpet.never->isChecked();
-  duringConstructionUpdateAttributes = dialogsierpinskicarpet.during->isChecked();
-  afterConstructionUpdateAttributes = dialogsierpinskicarpet.after->isChecked();
-  updateAttributesMethodStdMap = dialogsierpinskicarpet.stdmap->isChecked();
-  updateAttributesMethodTraversal = dialogsierpinskicarpet.traversal->isChecked();
-  // By default, the geometry will be computed after the construction
-  isComputableGeometry = true;*/
-
-  computeGeometry = false;
-
-  sierpinskiCarpetUpdateAttributes
-    = dialogsierpinskicarpet.updateAttributes->isChecked();
-
-  dialogsierpinskicarpet.level->disconnect(this);
-
-  dialogsierpinskicarpet.level->setValue(0);
-  sierpinskiCarpetLevel=0;
-  CGAL_assertion( sierpinskiCarpetSurfaces.empty() );
-
-  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
-
-  Dart_handle d = scene.lcc->make_quadrangle(basepoint,
-                                             LCC::Traits::Construct_translated_point()
-                                             (basepoint,LCC::Traits::Vector(1,0,0)),
-                                             LCC::Traits::Construct_translated_point()
-                                             (basepoint,LCC::Traits::Vector(1,1,0)),
-                                             LCC::Traits::Construct_translated_point()
-                                             (basepoint,LCC::Traits::Vector(0,1,0)));
-
-  on_new_volume(d);
-
-  ++nbcube;
-
-  statusBar ()->showMessage (QString ("Square created"),DELAY_STATUSMSG);
-
-  emit (sceneChanged ());
-
-  sierpinskiCarpetSurfaces.push_back(d);
-  update_operations_entries(false);
-
-  QObject::connect(dialogsierpinskicarpet.level, SIGNAL(valueChanged(int)),
-                   this, SLOT(onSierpinskiCarpetChangeLevel(int)));
-
-  dialogsierpinskicarpet.show();
-}
-
-void MainWindow::onSierpinskiCarpetCancel()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-  for(std::vector<Dart_handle>::iterator it=sierpinskiCarpetSurfaces.begin();
-      it!=sierpinskiCarpetSurfaces.end(); ++it)
-  {
-    CGAL::remove_cell<LCC,2>(*scene.lcc, *it);
-  }
-
-  recreate_whole_volume_list();
-  sierpinskiCarpetSurfaces.clear();
-  update_operations_entries(true);
-  QApplication::restoreOverrideCursor ();
-  emit(sceneChanged());
-}
-
-void MainWindow::onSierpinskiCarpetOk()
-{
-  update_operations_entries(true);
-  sierpinskiCarpetSurfaces.clear();
-}
-
-void MainWindow::onSierpinskiCarpetChangeLevel(int newLevel)
-{
-  while ( newLevel > sierpinskiCarpetLevel ) onSierpinskiCarpetInc();
-  while ( newLevel < sierpinskiCarpetLevel ) onSierpinskiCarpetDec();
-}
-
-void MainWindow::onSierpinskiCarpetUpdateAttributes(bool newValue)
-{
-  sierpinskiCarpetUpdateAttributes = newValue;
-}
-
-/*void MainWindow::onSierpinskiCarpetNeverUpdateAttributes(bool newValue)
-{
-  if (afterConstructionUpdateAttributes)
-  {
-    dialogsierpinskicarpet.groupBox2->setEnabled(false);
-  }
-
-  neverUpdateAttributes = true;
-  duringConstructionUpdateAttributes = false;
-  afterConstructionUpdateAttributes = false;
-}
-
-void MainWindow::onSierpinskiCarpetDuringConstructionUpdateAttributes(bool newValue)
-{
-  if (afterConstructionUpdateAttributes)
-  {
-    dialogsierpinskicarpet.groupBox2->setEnabled(false);
-  }
-
-  neverUpdateAttributes = false;
-  duringConstructionUpdateAttributes = true;
-  afterConstructionUpdateAttributes = false;
-}
-
-void MainWindow::onSierpinskiCarpetAfterConstructionUpdateAttributes(bool newValue)
-{
-  if (!afterConstructionUpdateAttributes)
-  {
-    dialogsierpinskicarpet.groupBox2->setEnabled(true);
-  }
-
-  neverUpdateAttributes = false;
-  duringConstructionUpdateAttributes = false;
-  afterConstructionUpdateAttributes = true;
-}
-
-void MainWindow::onSierpinskiCarpetUpdateAttributesMethodStdMap(bool newValue)
-{
-  updateAttributesMethodStdMap = true;
-  updateAttributesMethodTraversal = false;
-}
-
-void MainWindow::onSierpinskiCarpetUpdateAttributesMethodTraversal(bool newValue)
-{
-  updateAttributesMethodStdMap = false;
-  updateAttributesMethodTraversal = true;
-}
-
-void MainWindow::onSierpinskiCarpetComputeGeometry(bool newValue)
-{
-  sierpinski_carpet_compute_geometry();
-
-  computeGeometry = false;
-  dialogsierpinskicarpet.computeGeometry->setEnabled(false);
-
-  emit(sceneChanged());
-}*/
-
-void MainWindow::onSierpinskiCarpetInc()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->sierpinskiCarpetLevel++;
-
-/*  if (computeGeometry)
-  {
-    // Here case where the geometry could be computed after the construction, but it was not updated.
-    computeGeometry = false;
-    dialogsierpinskicarpet.computeGeometry->setEnabled(false);
-    //  => geometry will not be computed later.
-    isComputableGeometry = false;
-  }*/
-
-  std::vector<Dart_handle> edges;
-  nbfacesinit = sierpinskiCarpetSurfaces.size();
-
-  int markEdges = (scene.lcc)->get_new_mark();
-  int markFaces = (scene.lcc)->get_new_mark();
-
-  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiCarpetSurfaces.begin();
-        itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces)
-  {
-    CGAL_assertion( !(scene.lcc)->is_marked(*itfaces, markFaces) );
-    for (LCC::Dart_of_cell_basic_range<2>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
-         it!=itend; ++it)
-    {
-      if ( !(scene.lcc)->is_marked(it, markEdges) )
-      {
-        edges.push_back(it);
-        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
-      }
-    }
-  }
-
-  (scene.lcc)->negate_mark(markFaces);
-  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiCarpetSurfaces.begin();
-        itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces)
-  {
-    for (LCC::Dart_of_cell_basic_range<2>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
-         it!=itend; ++it)
-    {
-      (scene.lcc)->unmark(it, markEdges);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markFaces);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
-
-  (scene.lcc)->free_mark(markEdges);
-  (scene.lcc)->free_mark(markFaces);
-
-/*  if (afterConstructionUpdateAttributes)
-  {
-    if (updateAttributesMethodStdMap)
-    {
-      // We create a map to associate embeddings to new darts
-      for(std::size_t i = 0; i < edges.size(); i++)
-      {
-        dart_map.insert(std::pair<Dart_handle, LCC::Point>
-                        (edges[i], scene.lcc->point(edges[i])));
-        if (!(scene.lcc)->is_free(edges[i],2))
-        {
-          dart_map.insert(std::pair<Dart_handle, LCC::Point>
-                          ((scene.lcc)->beta(edges[i],2),
-                           scene.lcc->point((scene.lcc)->beta(edges[i],2))));
-        }
-      }
-    }
-  }*/
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    sierpinski_carpet_split_edge_in_three(edges[i]);
-  }
-  edges.clear();
-
-  for(std::size_t i = 0; i < nbfacesinit; i++)
-  {
-    sierpinski_carpet_split_face_in_nine(sierpinskiCarpetSurfaces[i]);
-  }
-
-  if (!sierpinskiCarpetUpdateAttributes)
-  {
-    sierpinski_carpet_update_geometry();
-  }
-
-/*  if (neverUpdateAttributes)
-  {
-    scene.lcc->correct_invalid_attributes();
-
-    // Now that the map is valid, we can compute the geometry
-    if (isComputableGeometry)
-    {
-      computeGeometry = true;
-      dialogsierpinskicarpet.computeGeometry->setEnabled(true);
-    }
-  }*/
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Sierpinski carpet "
-           <<this->sierpinskiCarpetLevel-1<<" -> "
-          <<this->sierpinskiCarpetLevel<<", "
-         <<"attributes updated "
-        <<(sierpinskiCarpetUpdateAttributes ? "DURING" : "AFTER")
-       << " construction: "
-       <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  CGAL_assertion( (scene.lcc)->is_valid() );
-
-  statusBar()->showMessage(QString ("Sierpinski carpet creation %1 -> %2").
-                           arg(this->sierpinskiCarpetLevel-1).
-                           arg(this->sierpinskiCarpetLevel),
-                           DELAY_STATUSMSG);
-
-  QApplication::restoreOverrideCursor ();
-  emit(sceneChanged());
-}
-
-void MainWindow::sierpinski_carpet_update_geometry()
-{
-/*  if (updateAttributesMethodStdMap)
-  {
-    for(std::size_t i = 0; i < new_darts.size(); i++)
-    {
-      sierpinski_carpet_copy_attributes_and_embed_vertex(new_darts[i], dart_map[new_darts[i]]);
-    }
-
-    dart_map.clear();
-    new_darts.clear();
-  }
-
-  if (updateAttributesMethodTraversal)*/
-  {
-    int markVertices = (scene.lcc)->get_new_mark();
-
-    for(std::size_t i = 0; i < nbfacesinit; i++)
-    {
-      // Geometry of the 4 corners of the current face
-      LCC::Point p[4][4];
-      Dart_handle d00 = sierpinskiCarpetSurfaces[i];
-      Dart_handle d03 = scene.lcc->beta(d00,1,2,1,1,2,1,1);
-      Dart_handle d33 = scene.lcc->beta(d03,1,2,1,1,2,1,1);
-      Dart_handle d30 = scene.lcc->beta(d33,1,2,1,1,2,1,1);
-      sierpinski_carpet_compute_4x4_geometry_matrix(p,
-                                                    scene.lcc->point(d00),
-                                                    scene.lcc->point(d03),
-                                                    scene.lcc->point(d33),
-                                                    scene.lcc->point(d30));
-
-      Dart_handle dh = sierpinskiCarpetSurfaces[i];
-
-      // bottom border
-      dh = scene.lcc->beta(dh,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[0][1]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[0][2]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-
-      // right border
-      dh = scene.lcc->beta(dh,1,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][3]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][3]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-
-      // top border
-      dh = scene.lcc->beta(dh,1,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[3][2]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[3][1]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-
-      // left border
-      dh = scene.lcc->beta(dh,1,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][0]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1,2,1);
-      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-      {
-        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][0]);
-        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-      }
-
-      dh = sierpinskiCarpetSurfaces[i];
-
-      // middle vertex, bottom left
-      dh = scene.lcc->beta(dh,1,1);
-      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][1]);
-
-      // middle vertex, top left
-      dh = scene.lcc->beta(dh,2,1,1);
-      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][1]);
-
-      // middle vertex, top right
-      dh = scene.lcc->beta(dh,2,1,2,1,1,2,1);
-      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][2]);
-
-      // middle vertex, bottom right
-      dh = scene.lcc->beta(dh,2,1,1);
-      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][2]);
-    }
-
-    scene.lcc->unmark_all(markVertices);
-    CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
-  }
-}
-
-void MainWindow::sierpinski_carpet_compute_geometry()
-{
-  int markVertices = (scene.lcc)->get_new_mark();
-
-  for(std::size_t i = 0; i < nbfacesinit; i++)
-  {
-    // on récupère la géométrie des 4 coins de la face courante
-    LCC::Point p[4][4];
-    Dart_handle d00 = sierpinskiCarpetSurfaces[i];
-    Dart_handle d03 = scene.lcc->beta(d00,1,2,1,1,2,1,1);
-    Dart_handle d33 = scene.lcc->beta(d03,1,2,1,1,2,1,1);
-    Dart_handle d30 = scene.lcc->beta(d33,1,2,1,1,2,1,1);
-    sierpinski_carpet_compute_4x4_geometry_matrix(p, scene.lcc->point(d00), scene.lcc->point(d03), scene.lcc->point(d33), scene.lcc->point(d30));
-
-    Dart_handle dh = sierpinskiCarpetSurfaces[i];
-
-    // Geometry of the 4 corners of the current face
-    // bottom border
-    dh = scene.lcc->beta(dh,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[0][1];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[0][2];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-
-    // right border
-    dh = scene.lcc->beta(dh,1,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[1][3];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[2][3];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-
-    // top border
-    dh = scene.lcc->beta(dh,1,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[3][2];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[3][1];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-
-    // left border
-    dh = scene.lcc->beta(dh,1,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[2][0];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,2,1);
-    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
-    {
-      scene.lcc->point(dh) = p[1][0];
-      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
-    }
-
-    dh = sierpinskiCarpetSurfaces[i];
-
-    // middle vertex, bottom left
-    dh = scene.lcc->beta(dh,1,1);
-    scene.lcc->point(dh) = p[1][1];
-
-    // middle vertex, top left
-    dh = scene.lcc->beta(dh,2,1,1);
-    scene.lcc->point(dh) = p[2][1];
-
-    // middle vertex, top right
-    dh = scene.lcc->beta(dh,2,1,2,1,1,2,1);
-    scene.lcc->point(dh) = p[2][2];
-
-    // middle vertex, bottom right
-    dh = scene.lcc->beta(dh,2,1,1);
-    scene.lcc->point(dh) = p[1][2];
-
-    }
-
-  scene.lcc->unmark_all(markVertices);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
-}
-
-void MainWindow::sierpinski_carpet_compute_4x4_geometry_matrix
-(LCC::Point p[4][4], LCC::Point& p00, LCC::Point& p03,
- LCC::Point& p33, LCC::Point& p30)
-{
-  p[0][0] = p00;
-  p[0][3] = p03;
-  p[3][3] = p33;
-  p[3][0] = p30;
-
-  LCC::Vector v1, v2, v3;
-
-  // bottom border
-  v1 = LCC::Traits::Construct_vector() (p[0][0],p[0][3]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[0][1] = LCC::Traits::Construct_translated_point() (p[0][0],v2);
-  p[0][2] = LCC::Traits::Construct_translated_point() (p[0][0],v3);
-  // right border
-  v1 = LCC::Traits::Construct_vector() (p[0][3],p[3][3]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[1][3] = LCC::Traits::Construct_translated_point() (p[0][3],v2);
-  p[2][3] = LCC::Traits::Construct_translated_point() (p[0][3],v3);
-  // top border
-  v1 = LCC::Traits::Construct_vector() (p[3][3],p[3][0]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[3][2] = LCC::Traits::Construct_translated_point() (p[3][3],v2);
-  p[3][1] = LCC::Traits::Construct_translated_point() (p[3][3],v3);
-  // left border
-  v1 = LCC::Traits::Construct_vector() (p[3][0],p[0][0]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[2][0] = LCC::Traits::Construct_translated_point() (p[3][0],v2);
-  p[1][0] = LCC::Traits::Construct_translated_point() (p[3][0],v3);
-  // middle, left column
-  v1 = LCC::Traits::Construct_vector() (p[0][1],p[3][1]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[1][1] = LCC::Traits::Construct_translated_point() (p[0][1],v2);
-  p[2][1] = LCC::Traits::Construct_translated_point() (p[0][1],v3);
-  // middle, right column
-  v1 = LCC::Traits::Construct_vector() (p[3][2],p[0][2]);
-  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-  p[2][2] = LCC::Traits::Construct_translated_point() (p[3][2],v2);
-  p[1][2] = LCC::Traits::Construct_translated_point() (p[3][2],v3);
-}
-
-void MainWindow::sierpinski_carpet_copy_attributes_and_embed_vertex
-(Dart_handle dh, LCC::Point& p)
-{
-  LCC::Attribute_handle<0>::type ah = (scene.lcc)->create_vertex_attribute(p);
-  for ( LCC::Dart_of_cell_range<0>::iterator
-        it=(scene.lcc)->darts_of_cell<0>(dh).begin();
-        it != (scene.lcc)->darts_of_cell<0>(dh).end(); ++it )
-  {
-    // We copy all the attributes except for dim=0
-    LCC::Helper::Foreach_enabled_attributes_except
-      <CGAL::internal::Group_attribute_functor_of_dart<LCC>, 0>::
-      run(scene.lcc,sierpinskiCarpetSurfaces[0],it);
-    // We initialise the 0-atttrib to ah
-    CGAL::internal::Set_i_attribute_of_dart_functor<LCC, 0>::
-        run(scene.lcc, it, ah);
-  }
-}
-
-void MainWindow::sierpinski_carpet_split_edge_in_three(Dart_handle dh)
-{
-  if (sierpinskiCarpetUpdateAttributes)
-  {
-    LCC::Point p1 = scene.lcc->point(dh);
-    LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
-
-    LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
-    LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-    LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-
-    LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
-    LCC::Point p4 = LCC::Traits::Construct_translated_point() (p1,v3);
-
-    (scene.lcc)->insert_point_in_cell<1>(dh,p4);
-    (scene.lcc)->insert_point_in_cell<1>(dh,p3);
-  }
-  else
-  {
-    LCC::Point p3, p4;
-
-    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
-    {
-      LCC::Point p1 = dart_map[dh];
-      LCC::Point p2 = dart_map[scene.lcc->other_extremity(dh)];
-      LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
-      LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
-      LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
-
-      p3 = LCC::Traits::Construct_translated_point() (p1,v2);
-      p4 = LCC::Traits::Construct_translated_point() (p1,v3);
-    }*/
-
-    //    Dart_handle d1=
-        CGAL::insert_cell_0_in_cell_1(*(scene.lcc),
-                                      dh,
-                                      LCC::null_handle,
-                                      false);
-
-    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
-    {
-      dart_map.insert(std::pair<Dart_handle, LCC::Point>(d1, p4));
-      if (!(scene.lcc)->is_free(d1,2))
-      {
-        dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(d1,2,1), p4));
-      }
-      new_darts.push_back((scene.lcc)->beta(dh,1));
-    }*/
-
-    //    Dart_handle d2=
-        CGAL::insert_cell_0_in_cell_1(*(scene.lcc),
-                                      dh,
-                                      LCC::null_handle,
-                                      false);
-
-    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
-    {
-      dart_map.insert(std::pair<Dart_handle, LCC::Point>(d2, p3));
-      if (!(scene.lcc)->is_free(d2,2))
-      {
-        dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(d2,2,1), p3));
-      }
-      new_darts.push_back((scene.lcc)->beta(dh,1));
-    }*/
-  }
-}
-
-void MainWindow::sierpinski_carpet_split_face_in_three(Dart_handle dh,
-                                                       bool removecenter)
-{
-  Dart_handle d1=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                scene.lcc->beta(dh,1,1,1),
-                                scene.lcc->beta(dh,0,0),
-                                sierpinskiCarpetUpdateAttributes);
-  Dart_handle d2=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                scene.lcc->beta(dh,1,1),
-                                scene.lcc->beta(dh,0),
-                                sierpinskiCarpetUpdateAttributes);
-
-  if ( removecenter )
-  {
-    CGAL::remove_cell<LCC,2>(*scene.lcc,d2,sierpinskiCarpetUpdateAttributes);
-  }
-  else
-  {
-    sierpinskiCarpetSurfaces.push_back(d2);
-  }
-
-  sierpinskiCarpetSurfaces.push_back(d1);
-}
-
-void MainWindow::sierpinski_carpet_split_face_in_nine(Dart_handle dh)
-{
-  Dart_handle d1 = scene.lcc->beta(dh,1,1);
-  Dart_handle d2 = scene.lcc->beta(dh,1,1,1,1,1,1,1);
-  Dart_handle d3 = scene.lcc->beta(dh,1);
-  Dart_handle d4 = scene.lcc->beta(d2,1);
-
-  Dart_handle e2=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                d1,
-                                d2,
-                                sierpinskiCarpetUpdateAttributes);
-
-  /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
-  {
-    dart_map.insert(std::pair<Dart_handle, LCC::Point>(e2, dart_map[d2]));
-    dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(e2,2), dart_map[d1]));
-  }*/
-
-  Dart_handle e1=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                d3,
-                                d4,
-                                sierpinskiCarpetUpdateAttributes);
-
-  /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
-  {
-    dart_map.insert(std::pair<Dart_handle, LCC::Point>(e1, dart_map[d4]));
-    dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(e1,2), dart_map[d3]));
-  }*/
-
-  sierpinskiCarpetSurfaces.push_back(e2);
-  sierpinskiCarpetSurfaces.push_back(e1);
-
-  // We give the beta2 to not insert in new_darts a dart that will be removed
-  // during the removal of the middle face
-  sierpinski_carpet_split_edge_in_three(scene.lcc->beta(e1,2));
-  sierpinski_carpet_split_edge_in_three(e2);
-
-  sierpinski_carpet_split_face_in_three(dh, false);
-  sierpinski_carpet_split_face_in_three(d2, true);
-  sierpinski_carpet_split_face_in_three(scene.lcc->beta(e2,0), false);
-}
-
-void MainWindow::onSierpinskiCarpetDec()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->sierpinskiCarpetLevel--;
-
-  // We know here the number of Sierpinski surfaces: 8^sierpinskiCarpetLevel
-  // thus we can directly "cut" the std::vector to the correct size.
-  sierpinskiCarpetSurfaces.resize(CGAL::ipower(8,sierpinskiCarpetLevel));
-
-  int markSurfaces = (scene.lcc)->get_new_mark();
-  int markVertices = (scene.lcc)->get_new_mark();
-
-  std::vector<Dart_handle> edges;
-  std::vector<Dart_handle> vertices;
-
-  // First we remove edges.
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiCarpetSurfaces.begin();
-        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = *itsurfaces;
-    dh = scene.lcc->beta(dh,1,1,2,1);
-    edges.push_back(dh);
-    dh = scene.lcc->beta(dh,1,2,1,2,1);
-    edges.push_back(dh);
-    dh = scene.lcc->beta(dh,1,2,1,2,1);
-    edges.push_back(dh);
-    dh = scene.lcc->beta(dh,1,2,1,2,1);
-    edges.push_back(dh);
-  }
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],0),
-                             sierpinskiCarpetUpdateAttributes);
-    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],1),
-                             sierpinskiCarpetUpdateAttributes);
-    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],
-                             sierpinskiCarpetUpdateAttributes);
-  }
-  edges.clear();
-
-  // Lastly we remove vertices.
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiCarpetSurfaces.begin();
-        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
-    // we proceed side by side
-    for (unsigned int i = 0; i < 4; i++)
-    {
-      if ( !(scene.lcc)->is_marked(dh, markVertices) )
-      {
-        vertices.push_back(dh);
-        CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1);
-      if ( !(scene.lcc)->is_marked(dh, markVertices) )
-      {
-        vertices.push_back(dh);
-        CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-      }
-      dh = scene.lcc->beta(dh,1,1);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markSurfaces);
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiCarpetSurfaces.begin();
-        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
-    for (unsigned int i = 0; i < 4; i++)
-    {
-      if ( (scene.lcc)->is_marked(dh, markVertices) )
-        CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-      dh = scene.lcc->beta(dh,1);
-      if ( (scene.lcc)->is_marked(dh, markVertices) )
-        CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-      dh = scene.lcc->beta(dh,1,1);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markSurfaces);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markSurfaces) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
-
-  for(std::size_t i = 0; i < vertices.size(); i++)
-  {
-    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],
-                             sierpinskiCarpetUpdateAttributes);
-  }
-  vertices.clear();
-
-  (scene.lcc)->free_mark(markSurfaces);
-  (scene.lcc)->free_mark(markVertices);
-
-  if (!sierpinskiCarpetUpdateAttributes)
-  {
-    scene.lcc->correct_invalid_attributes();
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Sierpinski carpet "
-           <<this->sierpinskiCarpetLevel+1<<" -> "
-          <<this->sierpinskiCarpetLevel<<", "
-         <<"attributes updated "
-        <<(sierpinskiCarpetUpdateAttributes ? "DURING" : "AFTER")
-       << " construction: "
-       <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  recreate_whole_volume_list();
-  QApplication::restoreOverrideCursor ();
-
-  statusBar()->showMessage(QString ("Sierpinski carpet creation %1 -> %2").
-                           arg(this->sierpinskiCarpetLevel+1).
-                           arg(this->sierpinskiCarpetLevel),
-                           DELAY_STATUSMSG);
-  emit(sceneChanged());
-}
-
-///////////////////////////////////////////////////////////////////////////////////
-// SIERPINSKI TRIANGLE
-///////////////////////////////////////////////////////////////////////////////////
-void MainWindow::on_actionCreate_Sierpinski_Triangle_triggered ()
-{
-  sierpinskiTriangleUpdateAttributes
-    = dialogsierpinskitriangle.updateAttributes->isChecked();
-
-  dialogsierpinskitriangle.level->disconnect(this);
-
-  dialogsierpinskitriangle.level->setValue(0);
-  sierpinskiTriangleLevel=0;
-  CGAL_assertion( sierpinskiTriangleSurfaces.empty() );
-
-  CGAL_assertion( removedTriangles.empty() );
-
-  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
-
-  Dart_handle d = scene.lcc->make_triangle(basepoint,
-                                           LCC::Traits::Construct_translated_point()
-                                           (basepoint,LCC::Traits::Vector(1,0,0)),
-                                           LCC::Traits::Construct_translated_point()
-                                           (basepoint,LCC::Traits::Vector(0.5f,CGAL::sqrt(3.f)/2.f,0)));
-
-  on_new_volume(d);
-
-  ++nbcube;
-
-  statusBar ()->showMessage (QString ("Triangle created"),DELAY_STATUSMSG);
-
-  emit (sceneChanged ());
-
-  sierpinskiTriangleSurfaces.push_back(d);
-  update_operations_entries(false);
-
-  QObject::connect(dialogsierpinskitriangle.level, SIGNAL(valueChanged(int)),
-                   this, SLOT(onSierpinskiTriangleChangeLevel(int)));
-
-  dialogsierpinskitriangle.show();
-}
-
-void MainWindow::onSierpinskiTriangleCancel()
-{
-  for(std::vector<Dart_handle>::iterator it=sierpinskiTriangleSurfaces.begin();
-      it!=sierpinskiTriangleSurfaces.end(); ++it)
-  {
-    CGAL::remove_cell<LCC,2>(*scene.lcc, *it);
-  }
-
-  recreate_whole_volume_list();
-  sierpinskiTriangleSurfaces.clear();
-  update_operations_entries(true);
-  emit(sceneChanged());
-}
-
-void MainWindow::onSierpinskiTriangleOk()
-{
-  update_operations_entries(true);
-  sierpinskiTriangleSurfaces.clear();
-}
-
-void MainWindow::onSierpinskiTriangleChangeLevel(int newLevel)
-{
-  while ( newLevel > sierpinskiTriangleLevel ) onSierpinskiTriangleInc();
-  while ( newLevel < sierpinskiTriangleLevel ) onSierpinskiTriangleDec();
-}
-
-void MainWindow::onSierpinskiTriangleUpdateAttributes(bool newValue)
-{
-  sierpinskiTriangleUpdateAttributes = newValue;
-}
-
-void MainWindow::onSierpinskiTriangleInc()
-{
-  QApplication::setOverrideCursor (Qt::WaitCursor);
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->sierpinskiTriangleLevel++;
-
-  std::vector<Dart_handle> edges;
-  nbfacesinit = sierpinskiTriangleSurfaces.size();
-
-  int markEdges = (scene.lcc)->get_new_mark();
-  int markFaces = (scene.lcc)->get_new_mark();
-
-  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiTriangleSurfaces.begin();
-        itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces)
-  {
-    CGAL_assertion( !(scene.lcc)->is_marked(*itfaces, markFaces) );
-    for (LCC::Dart_of_cell_basic_range<2>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
-         it!=itend; ++it)
-    {
-      if ( !(scene.lcc)->is_marked(it, markEdges) )
-      {
-        edges.push_back(it);
-        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
-      }
-    }
-  }
-
-  (scene.lcc)->negate_mark(markFaces);
-  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiTriangleSurfaces.begin();
-        itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces)
-  {
-    for (LCC::Dart_of_cell_basic_range<2>::iterator
-         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
-         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
-         it!=itend; ++it)
-    {
-      (scene.lcc)->unmark(it, markEdges);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markFaces);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
-
-  (scene.lcc)->free_mark(markEdges);
-  (scene.lcc)->free_mark(markFaces);
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    sierpinski_triangle_split_edge_in_two(edges[i]);
-  }
-  edges.clear();
-
-  for(std::size_t i = 0; i < nbfacesinit; i++)
-  {
-    sierpinski_triangle_split_face_in_four(sierpinskiTriangleSurfaces[i],true);
-  }
-
-  if (!sierpinskiTriangleUpdateAttributes)
-  {
-    for(std::size_t i = nbfacesinit; i < sierpinskiTriangleSurfaces.size(); i++)
-    {
-      LCC::Attribute_handle<3>::type ah = (scene.lcc)->create_attribute<3>();
-        CGAL::Set_i_attribute_functor<LCC, 3>::
-            run(scene.lcc, sierpinskiTriangleSurfaces[i], ah);
-        scene.lcc->info<3>(sierpinskiTriangleSurfaces[i]).color()=
-          (CGAL::Color(myrandom.get_int(0,256),
-                       myrandom.get_int(0,256),
-                       myrandom.get_int(0,256)));
-
-        update_volume_list_add(scene.lcc->attribute<3>(sierpinskiTriangleSurfaces[i]));
-    }
-
-    scene.lcc->correct_invalid_attributes();
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Sierpinski triangle "
-           <<this->sierpinskiTriangleLevel-1<<" -> "
-          <<this->sierpinskiTriangleLevel<<", "
-         <<"attributes updated "
-        <<(sierpinskiTriangleUpdateAttributes ? "DURING" : "AFTER")
-       << " construction: "
-       <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  //CGAL_assertion( (scene.lcc)->is_valid() );
-  statusBar()->showMessage(QString ("Sierpinski triangle creation %1 -> %2").
-                           arg(this->sierpinskiTriangleLevel-1).
-                           arg(this->sierpinskiTriangleLevel),
-                           DELAY_STATUSMSG);
-  QApplication::restoreOverrideCursor ();
-
-  emit(sceneChanged());
-}
-
-void MainWindow::sierpinski_triangle_split_edge_in_two(Dart_handle dh)
-{
-  LCC::Point p1 = scene.lcc->point(dh);
-  LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
-
-  LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
-  LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/2);
-
-  LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
-
-  (scene.lcc)->insert_point_in_cell<1>(dh,p3,sierpinskiTriangleUpdateAttributes);
-}
-
-void MainWindow::sierpinski_triangle_split_face_in_four(Dart_handle dh, bool removecenter)
-{
-  Dart_handle d1=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                scene.lcc->beta(dh,1),
-                                scene.lcc->beta(dh,1,1,1),
-                                sierpinskiTriangleUpdateAttributes);
-
-  Dart_handle d2=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                scene.lcc->beta(d1,2,1),
-                                scene.lcc->beta(d1,2,1,1,1),
-                                sierpinskiTriangleUpdateAttributes);
-
-  Dart_handle d3=
-  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
-                                scene.lcc->beta(d2,2,1),
-                                scene.lcc->beta(d2,2,1,1,1),
-                                sierpinskiTriangleUpdateAttributes);
-  if ( removecenter )
-  {
-    Triplet <Dart_handle, Dart_handle, Dart_handle> triplet(d1,d2,d3);
-    removedTriangles.push_back(triplet);
-
-    // at this step, the map is correctly 0-embedded, any other attribute is set
-    //  (call of insert_point_in_cell<1> with update_attributes set to true)
-
-    CGAL::remove_cell<LCC,2>(*scene.lcc,scene.lcc->beta(d3,2),sierpinskiTriangleUpdateAttributes);
-
-    if (sierpinskiTriangleUpdateAttributes)
-    {
-      update_volume_list_add(scene.lcc->attribute<3>(scene.lcc->beta(d2,0)));
-      update_volume_list_add(scene.lcc->attribute<3>(scene.lcc->beta(d1,0)));
-    }
-    else
-    {
-      // we dupplicate all 0-embeddings to set them to the splitted vertices
-      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d2,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d1)));
-      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d3,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d2)));
-      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d1,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d3)));
-    }
-  }
-  else
-  {
-    sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d3,2));
-  }
-
-  sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d2,0));
-  sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d1,0));
-}
-
-void MainWindow::onSierpinskiTriangleDec()
-{
-  QApplication::setOverrideCursor( Qt::WaitCursor );
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  this->sierpinskiTriangleLevel--;
-
-  int nbt = CGAL::ipower(3,this->sierpinskiTriangleLevel);
-
-  // First we add triangles removed during construction process
-  for ( std::size_t i = removedTriangles.size() - nbt; i < removedTriangles.size(); i++)
-  {
-    Dart_handle d1 = scene.lcc->create_dart();
-    Dart_handle d2 = scene.lcc->create_dart();
-    Dart_handle d3 = scene.lcc->create_dart();
-    scene.lcc->sew<1>(d1,d2);
-    scene.lcc->sew<1>(d2,d3);
-    scene.lcc->sew<1>(d3,d1);
-    scene.lcc->sew<2>(d1, removedTriangles[i].first);
-    scene.lcc->sew<2>(d2, removedTriangles[i].second);
-    scene.lcc->sew<2>(d3, removedTriangles[i].third);
-  }
-
-  removedTriangles.resize(removedTriangles.size() - nbt);
-
-  // We know here the number of Sierpinski surfaces: 3^sierpinskiTriangleLevel
-  // thus we can directly "cut" the std::vector to the correct size.
-  sierpinskiTriangleSurfaces.resize(CGAL::ipower(3,sierpinskiTriangleLevel));
-
-  int markSurfaces = (scene.lcc)->get_new_mark();
-  int markVertices = (scene.lcc)->get_new_mark();
-
-  std::vector<Dart_handle> edges;
-  std::vector<Dart_handle> vertices;
-
-  // Now we remove edges.
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiTriangleSurfaces.begin();
-        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = *itsurfaces;
-    dh = scene.lcc->beta(dh,1);
-    edges.push_back(dh);
-    dh = scene.lcc->beta(dh,2,1,2);
-    edges.push_back(dh);
-    dh = scene.lcc->beta(dh,2,1,2);
-    edges.push_back(dh);
-  }
-
-  for(std::size_t i = 0; i < edges.size(); i++)
-  {
-    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],
-                             sierpinskiTriangleUpdateAttributes);
-  }
-  edges.clear();
-
-  // Lastly we remove vertices.
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiTriangleSurfaces.begin();
-        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
-    if ( !(scene.lcc)->is_marked(dh, markVertices) )
-    {
-      vertices.push_back(dh);
-      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,1);
-    if ( !(scene.lcc)->is_marked(dh, markVertices) )
-    {
-      vertices.push_back(dh);
-      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-    }
-    dh = scene.lcc->beta(dh,1,1);
-    if ( !(scene.lcc)->is_marked(dh, markVertices) )
-    {
-      vertices.push_back(dh);
-      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-    }
-  }
-
-  (scene.lcc)->negate_mark(markSurfaces);
-  for ( std::vector<Dart_handle>::iterator
-        itsurfaces=sierpinskiTriangleSurfaces.begin();
-        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
-  {
-    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
-    if ( (scene.lcc)->is_marked(dh, markVertices) )
-      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-    dh = scene.lcc->beta(dh,1,1);
-    if ( (scene.lcc)->is_marked(dh, markVertices) )
-      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-    dh = scene.lcc->beta(dh,1,1);
-    if ( (scene.lcc)->is_marked(dh, markVertices) )
-      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
-  }
-
-  (scene.lcc)->negate_mark(markSurfaces);
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markSurfaces) );
-  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
-
-  for(std::size_t i = 0; i < vertices.size(); i++)
-  {
-    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],
-                             sierpinskiTriangleUpdateAttributes);
-  }
-  vertices.clear();
-
-  (scene.lcc)->free_mark(markSurfaces);
-  (scene.lcc)->free_mark(markVertices);
-
-  if (!sierpinskiTriangleUpdateAttributes)
-  {
-    scene.lcc->correct_invalid_attributes();
-  }
-
-#ifdef CGAL_PROFILE_LCC_DEMO
-  timer.stop();
-  std::cout<<"Sierpinski triangle "
-           <<this->sierpinskiTriangleLevel+1<<" -> "
-          <<this->sierpinskiTriangleLevel<<", "
-         <<"attributes updated "
-        <<(sierpinskiTriangleUpdateAttributes ? "DURING" : "AFTER")
-       << " construction: "
-       <<timer.time()<<" seconds."<<std::endl;
-#endif
-
-  recreate_whole_volume_list();
-  statusBar()->showMessage(QString ("Sierpinski triangle creation %1 -> %2").
-                           arg(this->sierpinskiTriangleLevel+1).
-                           arg(this->sierpinskiTriangleLevel),
-                           DELAY_STATUSMSG);
-  QApplication::restoreOverrideCursor ();
-
-  emit(sceneChanged());
-}
-
-#undef DELAY_STATUSMSG
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.h b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.h
deleted file mode 100644
index aefe94b..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.h
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-// Contributor(s): Kumar Snehasish <kumar.snehasish at gmail.com>
-//
-#ifndef MAIN_WINDOW_H
-#define MAIN_WINDOW_H
-
-#include "typedefs.h"
-#include "ui_MainWindow.h"
-#include "ui_CreateMesh.h"
-#include "ui_CreateMenger.h"
-#include "ui_CreateSierpinskiCarpet.h"
-#include "ui_CreateSierpinskiTriangle.h"
-
-#include <CGAL/Qt/DemosMainWindow.h>
-
-#include <QDialog>
-#include <QSlider>
-#include <QLabel>
-#include <QFileDialog>
-
-#include <QDockWidget>
-#include <QTableWidget>
-#include <QCheckBox>
-
-class QWidget;
-
-class DialogMesh : public QDialog, public Ui::createMesh
-{
-  Q_OBJECT
-
-public:
-  DialogMesh(QWidget* /*parent*/)
-  { setupUi (this); }
-
-  int getX() { return xvalue->value(); }
-  int getY() { return yvalue->value(); }
-  int getZ() { return zvalue->value(); }
-};
-
-class DialogMenger : public QDialog, public Ui::createMenger
-{
-  Q_OBJECT
-
-public:
-  DialogMenger(QWidget* /*parent*/)
-  { setupUi(this); }
-};
-
-class DialogSierpinskiCarpet : public QDialog,
-    public Ui::createSierpinskiCarpet
-{
-  Q_OBJECT
-
-public:
-  DialogSierpinskiCarpet(QWidget* /*parent*/)
-  { setupUi(this); }
-};
-
-class DialogSierpinskiTriangle : public QDialog,
-    public Ui::createSierpinskiTriangle
-{
-  Q_OBJECT
-
-public:
-  DialogSierpinskiTriangle(QWidget* /*parent*/)
-  { setupUi(this); }
-};
-
-
-template < class First, class Second, class Third > struct Triplet
-{
-  First first;
-  Second second;
-  Third third;
-
-  Triplet(First first, Second second, Third third)
-  {
-    this->first = first;
-    this->second = second;
-    this->third = third;
-  }
-
-  Triplet()
-  {}
-};
-
-class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
-{
-  Q_OBJECT
-
-public:
-  MainWindow(QWidget* parent = 0);
-
-public slots:
-  // File menu
-  void on_actionImportOFF_triggered();
-  void on_actionAddOFF_triggered();
-  void on_actionImport3DTDS_triggered();
-  void on_actionCompute_Voronoi_3D_triggered();
-  void on_actionClear_triggered();
-  
-  // Creations menu
-  Dart_handle on_actionCreate_cube_triggered();
-  void on_actionCreate3Cubes_triggered();
-  void on_actionCreate2Volumes_triggered();
-  void on_actionCreate_mesh_triggered();
-  void on_actionCreate_Menger_Sponge_triggered();
-  void on_actionCreate_Sierpinski_Carpet_triggered();
-  void on_actionCreate_Sierpinski_Triangle_triggered();
-
-  // Operations menu
-  void on_actionSubdivide_triggered();
-  void on_actionSubdivide_pqq_triggered();
-  void on_actionDual_3_triggered();
-  void on_actionClose_volume_triggered();
-  void on_actionTriangulate_all_facets_triggered();
-  void on_actionSew3_same_facets_triggered();
-  void on_actionUnsew3_all_triggered();
-  void on_actionMerge_all_volumes_triggered();
-  void on_actionRemove_filled_volumes_triggered();
-
-  // View menu
-  void on_actionExtend_filled_volumes_triggered();
-  void on_actionExtend_hidden_volumes_triggered();
-
-  // Other slots
-  void load_off(const QString& fileName, bool clear=true);
-  void load_3DTDS(const QString& fileName, bool clear=true);
-
-  void onSceneChanged();
-
-  void connectVolumeListHandlers();
-  void onCellChanged(int, int);
-  void onHeaderClicked(int);
-
-  void onCreateMeshOk();
-  
-  void onMengerInc();
-  void onMengerDec();
-  void onMengerChange(int);
-  void onMengerOk();
-  void onMengerCancel();
-  void onMengerUpdateAttributes(bool);
-
-  void onSierpinskiCarpetChangeLevel(int);
-/*  void onSierpinskiCarpetNeverUpdateAttributes(bool);
-  void onSierpinskiCarpetDuringConstructionUpdateAttributes(bool);
-  void onSierpinskiCarpetAfterConstructionUpdateAttributes(bool);
-  void onSierpinskiCarpetUpdateAttributesMethodStdMap(bool);
-  void onSierpinskiCarpetUpdateAttributesMethodTraversal(bool);
-  void onSierpinskiCarpetComputeGeometry(bool);*/
-  void onSierpinskiCarpetUpdateAttributes(bool);
-  void onSierpinskiCarpetOk();
-  void onSierpinskiCarpetCancel();
-  void onSierpinskiCarpetInc();
-  void onSierpinskiCarpetDec();
-
-  void onSierpinskiTriangleChangeLevel(int);
-  void onSierpinskiTriangleUpdateAttributes(bool);
-  void onSierpinskiTriangleOk();
-  void onSierpinskiTriangleCancel();
-  void onSierpinskiTriangleInc();
-  void onSierpinskiTriangleDec();
-
-signals:
-  void sceneChanged();
-  
-protected:
-  void clear_all();
-  void on_new_volume(Dart_handle adart);
-  void on_delete_volume(Dart_handle adart);
-  void init_all_new_volumes();
-  void mark_all_filled_and_visible_volumes(int amark);
-
-  Dart_handle make_iso_cuboid(const Point_3 basepoint, LCC::FT lg);
-
-  void connect_actions();
-  void update_operations_entries(bool show);
-
-  bool is_volume_in_list(LCC::Attribute_handle<3>::type ah);
-  void recreate_whole_volume_list();
-  void update_volume_list_all_ckeckstates();
-  void update_volume_list_add(LCC::Attribute_handle<3>::type ah);
-  void update_volume_list_remove(int);
-  void update_volume_list_remove(LCC::Attribute_handle<3>::type ah);
-
-  void split_edge_in_three     (Dart_handle dh);
-  void split_face_in_three     (Dart_handle dh);
-  void split_face_in_nine      (Dart_handle dh);
-  void split_vol_in_three      (Dart_handle dh, bool removecenter);
-  void split_vol_in_nine       (Dart_handle dh, bool removecenter);
-  void split_vol_in_twentyseven(Dart_handle dh);
-  void process_full_slice(Dart_handle init,
-                          std::vector<Dart_handle>& faces,
-                          int markVols);
-  void process_inter_slice(Dart_handle init,
-                           std::vector<Dart_handle>& faces,
-                           int markVols);
-
-  void sierpinski_carpet_copy_attributes_and_embed_vertex(Dart_handle dh,
-                                                          LCC::Point& p);
-  void sierpinski_carpet_update_geometry();
-  void sierpinski_carpet_compute_geometry();
-  void sierpinski_carpet_compute_4x4_geometry_matrix(LCC::Point p[4][4],
-  LCC::Point& p00, LCC::Point& p03, LCC::Point& p33, LCC::Point& p30);
-  void sierpinski_carpet_split_edge_in_three(Dart_handle dh);
-  void sierpinski_carpet_split_face_in_three(Dart_handle dh,
-                                             bool removecenter);
-  void sierpinski_carpet_split_face_in_nine(Dart_handle dh);
-
-  void sierpinski_triangle_split_edge_in_two(Dart_handle dh);
-  void sierpinski_triangle_split_face_in_four(Dart_handle dh,
-                                              bool removecenter);
-
-  Scene scene;
-
-  unsigned int nbcube;
-  QLabel*      statusMessage;
-  DialogMesh   dialogmesh;
-  DialogMenger dialogmenger;
-  DialogSierpinskiCarpet dialogsierpinskicarpet;
-  DialogSierpinskiTriangle dialogsierpinskitriangle;
-
-  int mengerLevel;
-  bool mengerUpdateAttributes;
-  std::vector<Dart_handle> mengerVolumes;
-
-  int sierpinskiCarpetLevel;
-  std::size_t nbfacesinit;
-  bool sierpinskiCarpetUpdateAttributes;
-  bool computeGeometry;
-  /*bool neverUpdateAttributes;
-  bool duringConstructionUpdateAttributes;
-  bool afterConstructionUpdateAttributes;
-  bool updateAttributesMethodStdMap;
-  bool updateAttributesMethodTraversal;
-  bool isComputableGeometry;*/
-  std::vector<Dart_handle> sierpinskiCarpetSurfaces;
-  // utilisés seulement lorsque pas de mise à jour d'attributs
-  std::map<Dart_handle, LCC::Point> dart_map;
-  std::vector<Dart_handle> new_darts;
-
-  int sierpinskiTriangleLevel;
-  bool sierpinskiTriangleUpdateAttributes;
-  std::vector<Dart_handle> sierpinskiTriangleSurfaces;
-  std::vector< Triplet<Dart_handle, Dart_handle, Dart_handle> > removedTriangles;
-
-  QDockWidget* volumeListDock;
-  QTableWidget* volumeList;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.ui b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.ui
deleted file mode 100644
index 3a6b68d..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/MainWindow.ui
+++ /dev/null
@@ -1,234 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>635</width>
-    <height>504</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>CGAL 3D Linear Cell Complex</string>
-  </property>
-  <property name="windowIcon">
-   <iconset>
-    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout">
-    <item>
-     <layout class="QHBoxLayout"/>
-    </item>
-    <item>
-     <widget class="Viewer" name="viewer" native="true"/>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>635</width>
-     <height>22</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuFile">
-    <property name="title">
-     <string>&File</string>
-    </property>
-    <addaction name="actionImportOFF"/>
-    <addaction name="actionAddOFF"/>
-    <addaction name="separator"/>
-    <addaction name="actionImport3DTDS"/>
-    <addaction name="actionCompute_Voronoi_3D"/>
-    <addaction name="separator"/>
-    <addaction name="actionClear"/>
-    <addaction name="separator"/>
-    <addaction name="actionQuit"/>
-   </widget>
-   <widget class="QMenu" name="menuOperations">
-    <property name="title">
-     <string>&Operations</string>
-    </property>
-    <addaction name="actionTriangulate_all_facets"/>
-    <addaction name="actionSew3_same_facets"/>
-    <addaction name="actionUnsew3_all"/>
-    <addaction name="actionMerge_all_volumes"/>
-    <addaction name="actionRemove_filled_volumes"/>
-    <addaction name="separator"/>
-    <addaction name="actionSubdivide"/>
-    <addaction name="actionSubdivide_pqq"/>
-    <addaction name="actionClose_volume"/>
-    <addaction name="actionDual_3"/>
-   </widget>
-   <widget class="QMenu" name="menuCreations">
-    <property name="title">
-     <string>&Creations</string>
-    </property>
-    <addaction name="actionCreate_cube"/>
-    <addaction name="actionCreate3Cubes"/>
-    <addaction name="actionCreate2Volumes"/>
-    <addaction name="actionCreate_mesh"/>
-    <addaction name="actionCreate_Menger_Sponge"/>
-    <addaction name="separator"/>
-    <addaction name="actionCreate_Sierpinski_Carpet"/>
-    <addaction name="actionCreate_Sierpinski_Triangle"/>
-   </widget>
-   <widget class="QMenu" name="menuView">
-    <property name="title">
-     <string>&View</string>
-    </property>
-    <addaction name="separator"/>
-    <addaction name="actionExtend_filled_volumes"/>
-    <addaction name="actionExtend_hidden_volumes"/>
-    <addaction name="separator"/>
-   </widget>
-   <addaction name="menuFile"/>
-   <addaction name="menuCreations"/>
-   <addaction name="menuOperations"/>
-   <addaction name="menuView"/>
-  </widget>
-  <widget class="QStatusBar" name="statusbar"/>
-  <action name="actionImportOFF">
-   <property name="text">
-    <string>&Import OFF</string>
-   </property>
-  </action>
-  <action name="actionAddOFF">
-   <property name="text">
-    <string>Add &OFF</string>
-   </property>
-  </action>
-  <action name="actionQuit">
-   <property name="text">
-    <string>&Quit</string>
-   </property>
-  </action>
-  <action name="actionSubdivide">
-   <property name="text">
-    <string>&Subdivide all volumes</string>
-   </property>
-  </action>
-  <action name="actionSubdivide_pqq">
-   <property name="text">
-    <string>&Subdivide all volumes - by Pqq</string>
-   </property>
-  </action>
-  <action name="actionCreate3Cubes">
-   <property name="text">
-    <string>Create &3 cubes</string>
-   </property>
-  </action>
-  <action name="actionImport3DTDS">
-   <property name="text">
-    <string>Import 3D&TS</string>
-   </property>
-  </action>
-  <action name="actionClear">
-   <property name="text">
-    <string>&Clear</string>
-   </property>
-  </action>
-  <action name="actionCreate2Volumes">
-   <property name="text">
-    <string>Create &2 volumes</string>
-   </property>
-  </action>
-  <action name="actionDual_3">
-   <property name="text">
-    <string>&Dual</string>
-   </property>
-  </action>
-  <action name="actionClose_volume">
-   <property name="text">
-    <string>&Close all volumes</string>
-   </property>
-  </action>
-  <action name="actionCreate_cube">
-   <property name="text">
-    <string>Create &cube</string>
-   </property>
-  </action>
-  <action name="actionSew3_same_facets">
-   <property name="text">
-    <string>S&ew3 all same facets</string>
-   </property>
-  </action>
-  <action name="actionCreate_mesh">
-   <property name="text">
-    <string>Create &mesh</string>
-   </property>
-  </action>
-  <action name="actionCreate_Menger_Sponge">
-   <property name="text">
-    <string>Create Menger Sponge</string>
-   </property>
-  </action>
-  <action name="actionRemove_filled_volumes">
-   <property name="text">
-    <string>&Remove volumes</string>
-   </property>
-  </action>
-  <action name="actionTriangulate_all_facets">
-   <property name="text">
-    <string>&Triangulate facets</string>
-   </property>
-  </action>
-  <action name="actionUnsew3_all">
-   <property name="text">
-    <string>&Unsew3 volumes</string>
-   </property>
-  </action>
-  <action name="actionVolume_list">
-   <property name="checkable">
-    <bool>true</bool>
-   </property>
-   <property name="text">
-    <string>Volume list</string>
-   </property>
-  </action>
-  <action name="actionExtend_filled_volumes">
-   <property name="text">
-    <string>Extend &filled volumes</string>
-   </property>
-  </action>
-  <action name="actionExtend_hidden_volumes">
-   <property name="text">
-    <string>Extend &hidden volumes</string>
-   </property>
-  </action>
-  <action name="actionCompute_Voronoi_3D">
-   <property name="text">
-    <string>Compute Voronoi 3D</string>
-   </property>
-  </action>
-  <action name="actionMerge_all_volumes">
-   <property name="text">
-    <string>&Merge volumes</string>
-   </property>
-  </action>
-  <action name="actionCreate_Sierpinski_Carpet">
-   <property name="text">
-    <string>Create Sierpinski Carpet</string>
-   </property>
-  </action>
-  <action name="actionCreate_Sierpinski_Triangle">
-   <property name="text">
-    <string>Create Sierpinski Triangle</string>
-   </property>
-  </action>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>Viewer</class>
-   <extends>QWidget</extends>
-   <header>Viewer.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.cpp
deleted file mode 100644
index 2840bb5..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//                 Kumar Snehasish <kumar.snehasish at gmail.com>
-//
-#include "Viewer.h"
-#include <vector>
-#include <CGAL/bounding_box.h>
-#include <QGLViewer/vec.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-
-void
-Viewer::sceneChanged()
-{
-  this->initDraw();
-
-  this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(),
-						     bb.ymin(),
-						     bb.zmin()),
-				      qglviewer::Vec(bb.xmax(),
-						     bb.ymax(),
-						     bb.zmax()));
-  this->showEntireScene();
-}
-
-void Viewer::drawAllFaces(bool flat)
-{
-  LCC &lcc = *scene->lcc;
-
-  for (LCC::Attribute_range<3>::type::iterator
-         it=lcc.attributes<3>().begin(),
-         itend=lcc.attributes<3>().end(); it!=itend; ++it )
-  {
-    if ( it->info().is_visible() )
-    {
-      for(LCC::One_dart_per_incident_cell_range<2,3>::iterator
-            dartIter=lcc.one_dart_per_incident_cell<2,3>
-            (lcc.dart_of_attribute<3>(it)).begin(); dartIter.cont(); ++dartIter)
-      {
-        // We draw the polygon
-        ::glBegin(GL_POLYGON);
-
-        //  double r = (double)dartIter->attribute<3>()->info().r()/255.0;
-        double r = (double)lcc.info<3>(dartIter).color().r()/255.0;
-        double g = (double)lcc.info<3>(dartIter).color().g()/255.0;
-        double b = (double)lcc.info<3>(dartIter).color().b()/255.0;
-        if ( !lcc.is_free(dartIter, 3) )
-        {
-          r += (double)lcc.info<3>(lcc.beta(dartIter,3)).color().r()/255.0;
-          g += (double)lcc.info<3>(lcc.beta(dartIter,3)).color().g()/255.0;
-          b += (double)lcc.info<3>(lcc.beta(dartIter,3)).color().b()/255.0;
-          r /= 2; g /= 2; b /= 2;
-        }
-
-        ::glColor3f(r,g,b);
-
-        if(flat)
-        {
-          LCC::Vector normal = CGAL::compute_normal_of_cell_2(lcc,dartIter);
-          normal = normal/(CGAL::sqrt(normal*normal));
-          ::glNormal3d(normal.x(), normal.y(), normal.z());
-        }
-
-        for (LCC::Dart_of_orbit_range<1>::const_iterator
-               orbitIter = lcc.darts_of_orbit<1>(dartIter).begin();
-             orbitIter.cont(); ++orbitIter)
-        {
-          if(!flat)
-          {
-            // If Gouraud shading: 1 normal per vertex
-            LCC::Vector normal = CGAL::compute_normal_of_cell_0(lcc,orbitIter);
-            normal = normal/(CGAL::sqrt(normal*normal));
-            ::glNormal3d(normal.x(), normal.y(), normal.z());
-          }
-
-          const LCC::Point& p = lcc.point(orbitIter);
-          ::glVertex3d(p.x(),p.y(),p.z());
-        }
-
-        ::glEnd();
-      }
-    }
-  }
-}
-
-void Viewer::drawAllEdges()
-{
-  LCC &lcc = *scene->lcc;
-
-  if ( lcc.is_empty() ) return;
-
-  //    ::glDepthRange(0.0, 1.0-0.005);
-  ::glBegin(GL_LINES);
-  //::glColor3f(0.0f, 0.0f, 0.0f);
-  ::glColor3f(.2f,.2f,.6f);
-
-  for (LCC::Attribute_range<3>::type::iterator
-         it=lcc.attributes<3>().begin(),
-         itend=lcc.attributes<3>().end(); it!=itend; ++it )
-  {
-    if ( it->info().is_visible() )
-    {
-      for(LCC::One_dart_per_incident_cell_range<1,3>::iterator
-            dartIter=lcc.one_dart_per_incident_cell<1,3>
-            (lcc.dart_of_attribute<3>(it)).begin(); dartIter.cont(); ++dartIter)
-      {
-        const LCC::Point& p =  lcc.point(dartIter);
-        Dart_handle d2 = lcc.other_extremity(dartIter);
-        if ( d2!=NULL )
-        {
-          const LCC::Point& p2 = lcc.point(d2);
-          glVertex3f( p.x(),p.y(),p.z());
-          glVertex3f( p2.x(),p2.y(),p2.z());
-        }
-      }
-    }
-  }
-
-  ::glEnd();
-}
-
-void Viewer::drawAllVertices()
-{
-  LCC &lcc = *scene->lcc;
-
-  if ( lcc.is_empty() )
-  {
-    bb = LCC::Point(CGAL::ORIGIN).bbox();
-    bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer
-    return;
-  }
-
-  //    ::glDepthRange(0.0, 1.0-0.005);
-  ::glPointSize(7.0);
-  ::glBegin(GL_POINTS);
-  ::glColor3f(0.2f, 0.2f, 0.7f);
-
-  bool empty = true;
-  for (LCC::Attribute_range<3>::type::iterator
-         it=lcc.attributes<3>().begin(),
-         itend=lcc.attributes<3>().end(); it!=itend; ++it )
-  {
-    if ( it->info().is_visible() )
-    {
-      for(LCC::One_dart_per_incident_cell_range<0,3>::iterator
-            dartIter=lcc.one_dart_per_incident_cell<0,3>
-            (lcc.dart_of_attribute<3>(it)).begin();
-          dartIter.cont(); ++dartIter)
-      {
-        const LCC::Point& p =  lcc.point(dartIter);
-        ::glVertex3f(p.x(), p.y(), p.z());
-
-        if ( empty )
-        {
-          bb = p.bbox();
-          empty = false;
-        }
-        else
-          bb = bb + p.bbox();
-      }
-    }
-  }
-
-  ::glEnd();
-
-  if ( lcc.is_empty() )
-  {
-    bb = LCC::Point(CGAL::ORIGIN).bbox();
-    bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer
-  }
-}
-
-void Viewer::initDraw()
-{
-    //Compile drawFacet
-    //    std::cout << "Compile Display Lists : Faces, " << std::flush;
-    m_dlFaces = ::glGenLists(1);
-    ::glNewList(m_dlFaces, GL_COMPILE);
-    drawAllFaces(false);
-    ::glEndList();
-
-    //Compile drawFacet with flat shading
-    //    std::cout << "Faces (flat shading), " << std::flush;
-    m_dlFacesFlat = ::glGenLists(1);
-    ::glNewList(m_dlFacesFlat, GL_COMPILE);
-    drawAllFaces(true);
-    ::glEndList();
-
-    //Compile drawEdge
-    //    std::cout << "edges, " << std::flush;
-    m_dlEdges = ::glGenLists(1);
-    ::glNewList(m_dlEdges, GL_COMPILE);
-    drawAllEdges();
-    ::glEndList();
-
-    //Compile drawvertices
-    //    std::cout << "vertices" << std::flush;
-    m_dlVertices = ::glGenLists(1);
-    ::glNewList(m_dlVertices, GL_COMPILE);
-    drawAllVertices();
-    ::glEndList();
-
-    //    std::cout << ". DONE." << std::endl;
-    m_displayListCreated = true;
-}
-
-void Viewer::draw()
-{
-  if(!m_displayListCreated) initDraw();
-
-  if ( !wireframe )
-  {
-    if(flatShading) ::glCallList(m_dlFacesFlat);
-    else ::glCallList(m_dlFaces);
-  }
-
-  if(edges) ::glCallList(m_dlEdges);
-
-  if(vertices) ::glCallList(m_dlVertices);
-}
-
-void Viewer::init()
-{
-  // Restore previous viewer state.
-  restoreStateFromFile();
-
-  // Define 'Control+Q' as the new exit shortcut (default was 'Escape')
-  setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q);
-
-  // Add custom key description (see keyPressEvent).
-  setKeyDescription(Qt::Key_W, "Toggles wire frame display");
-  setKeyDescription(Qt::Key_F, "Toggles flat shading display");
-  setKeyDescription(Qt::Key_E, "Toggles edges display");
-  setKeyDescription(Qt::Key_V, "Toggles vertices display");
-
-  // Light default parameters
-  ::glLineWidth(1.4f);
-  ::glPointSize(4.f);
-  ::glEnable(GL_POLYGON_OFFSET_FILL);
-  ::glPolygonOffset(1.0f,1.0f);
-  ::glClearColor(1.0f,1.0f,1.0f,0.0f);
-  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
-  ::glEnable(GL_LIGHTING);
-
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  // ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
-  if (flatShading)
-  {
-    ::glShadeModel(GL_FLAT);
-    ::glDisable(GL_BLEND);
-    ::glDisable(GL_LINE_SMOOTH);
-    ::glDisable(GL_POLYGON_SMOOTH_HINT);
-    ::glBlendFunc(GL_ONE, GL_ZERO);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-  }
-  else
-  {
-    ::glShadeModel(GL_SMOOTH);
-    ::glEnable(GL_BLEND);
-    ::glEnable(GL_LINE_SMOOTH);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  }
-}
-
-void Viewer::keyPressEvent(QKeyEvent *e)
-{
-  const Qt::KeyboardModifiers modifiers = e->modifiers();
-
-  bool handled = false;
-  if ((e->key()==Qt::Key_W) && (modifiers==Qt::NoButton))
-  {
-    wireframe = !wireframe;
-    if (wireframe)
-      glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-    else
-      glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-    handled = true;
-    updateGL();
-  }
-  else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton))
-  {
-    flatShading = !flatShading;
-    if (flatShading)
-    {
-      ::glShadeModel(GL_FLAT);
-      ::glDisable(GL_BLEND);
-      ::glDisable(GL_LINE_SMOOTH);
-      ::glDisable(GL_POLYGON_SMOOTH_HINT);
-      ::glBlendFunc(GL_ONE, GL_ZERO);
-      ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-    }
-    else
-    {
-      ::glShadeModel(GL_SMOOTH);
-      ::glEnable(GL_BLEND);
-      ::glEnable(GL_LINE_SMOOTH);
-      ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-      ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    }
-    handled = true;
-    updateGL();
-  }
-  else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton))
-  {
-    edges = !edges;
-    handled = true;
-    updateGL();
-  }
-  else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton))
-  {
-    vertices = !vertices;
-    handled = true;
-    updateGL();
-  }
-
-  if (!handled)
-    QGLViewer::keyPressEvent(e);
-}
-
-QString Viewer::helpString() const
-{
-  QString text("<h2>L C C   V i e w e r</h2>");
-  text += "Use the mouse to move the camera around the object. ";
-  text += "You can respectively revolve around, zoom and translate with "
-    "the three mouse buttons. ";
-  text += "Left and middle buttons pressed together rotate around the "
-    "camera view direction axis<br><br>";
-  text += "Pressing <b>Alt</b> and one of the function keys "
-    "(<b>F1</b>..<b>F12</b>) defines a camera keyFrame. ";
-  text += "Simply press the function key again to restore it. Several "
-    "keyFrames define a ";
-  text += "camera path. Paths are saved when you quit the application and "
-    "restored at next start.<br><br>";
-  text += "Press <b>F</b> to display the frame rate, <b>A</b> for the "
-    "world axis, ";
-  text += "<b>Alt+Return</b> for full screen mode and <b>Control+S</b> to "
-    "save a snapshot. ";
-  text += "See the <b>Keyboard</b> tab in this window for a complete "
-    "shortcut list.<br><br>";
-  text += "Double clicks automates single click actions: A left button "
-    "double click aligns the closer axis with the camera (if close enough). ";
-  text += "A middle button double click fits the zoom of the camera and "
-    "the right button re-centers the scene.<br><br>";
-  text += "A left button double click while holding right button pressed "
-    "defines the camera <i>Revolve Around Point</i>. ";
-  text += "See the <b>Mouse</b> tab and the documentation web pages for "
-    "details.<br><br>";
-  text += "Press <b>Escape</b> to exit the viewer.";
-  return text;
-}
-
-#include "Viewer.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.h b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.h
deleted file mode 100644
index cd235db..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Viewer.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//                 Kumar Snehasish <kumar.snehasish at gmail.com>
-//
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include "typedefs.h"
-#include <QGLViewer/qglviewer.h>
-#include <QKeyEvent>
-
-class Viewer : public QGLViewer
-{
-  Q_OBJECT
-
-  CGAL::Timer timer;
-  Scene* scene;
-  bool wireframe;
-  bool flatShading;
-  bool edges;
-  bool vertices;
-  CGAL::Bbox_3 bb;
-
-  GLuint m_dlFaces;
-  GLuint m_dlFacesFlat;
-  GLuint m_dlEdges;
-  GLuint m_dlVertices;
-  bool m_displayListCreated;
-
-  typedef LCC::Dart_handle Dart_handle;
-  typedef LCC::Dart_const_handle Dart_const_handle;
-
-
-public:
-  Viewer(QWidget* parent)
-    : QGLViewer(parent), wireframe(false), flatShading(true),
-      edges(true), vertices(true), m_displayListCreated(false)
-  {
-    QGLFormat newFormat = this->format();
-    newFormat.setSampleBuffers(true);
-    newFormat.setSamples(16);
-    this->setFormat(newFormat);
-  }
-
-  void setScene(Scene* scene_)
-  {
-    scene = scene_;
-  }
-
-public:
-  void draw();
-
-  virtual void init();
-
-  void keyPressEvent(QKeyEvent *e);
-
-  virtual QString helpString() const;
-
-public slots :
-
-  void sceneChanged();
-
-protected:
-  void initDraw();
-  void drawAllFaces(bool flat);
-  void drawAllEdges();
-  void drawAllVertices();
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/typedefs.h b/3rdparty/CGAL-4.6/demo/Linear_cell_complex/typedefs.h
deleted file mode 100644
index d31132c..0000000
--- a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/typedefs.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef TYPEDEFS_H
-#define TYPEDEFS_H
-
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Linear_cell_complex_constructors.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/IO/Color.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Random.h>
-
-#include <cstdio>
-#include <cstring>
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <list>
-
-// Global random
-extern CGAL::Random myrandom;
-
-// Use to define properties on volumes.
-#define LCC_DEMO_VISIBLE 1 // if not visible => hidden
-#define LCC_DEMO_FILLED  2 // if not filled, wireframe
-
-class Volume_info
-{
-public:
-  Volume_info() : m_color(CGAL::Color(myrandom.get_int(0,256),
-                                      myrandom.get_int(0,256),
-                                      myrandom.get_int(0,256))),
-    m_status( LCC_DEMO_VISIBLE | LCC_DEMO_FILLED )
-  {}
-
-  CGAL::Color& color()
-  { return m_color; }
-  const CGAL::Color& color() const
-  { return m_color; }
-
-  std::string color_name() const
-  {
-    std::ostringstream ss;
-    ss<<std::setfill('0');
-    ss<<"#"<<std::hex<<std::setw(2)<<(int)m_color.red()
-     <<std::setw(2)<<(int)m_color.green()<<std::setw(2)<<(int)m_color.blue();
-    return ss.str();
-  }
-
-  bool is_visible() const
-  { return (m_status & LCC_DEMO_VISIBLE)!=0; }
-  bool is_filled() const
-  { return (m_status & LCC_DEMO_FILLED)!=0; }
-  bool is_filled_and_visible() const
-  { return is_filled() && is_visible(); }
-
-  void set_visible(bool val=true)
-  {
-    if ( is_visible()==val ) return;
-    if ( val ) m_status = m_status | LCC_DEMO_VISIBLE;
-    else       m_status = m_status ^ LCC_DEMO_VISIBLE;
-  }
-  void set_filled(bool val=true)
-  {
-    if ( is_filled()==val ) return;
-    if ( val ) m_status = m_status | LCC_DEMO_FILLED;
-    else       m_status = m_status ^ LCC_DEMO_FILLED;
-  }
-
-  void negate_visible()
-  { set_visible(!is_visible()); }
-  void negate_filled()
-  { set_filled(!is_filled()); }
-
-  private:
-  CGAL::Color m_color;
-  char        m_status;
-};
-
-class Myitems
-{
-public:
-  template < class Refs >
-  struct Dart_wrapper 
-  {
-    typedef CGAL::Dart<3, Refs > Dart;
-    
-    typedef CGAL::Cell_attribute_with_point< Refs > Vertex_attrib;
-    typedef CGAL::Cell_attribute< Refs, Volume_info> Volume_attrib;
-    
-    typedef CGAL::cpp11::tuple<Vertex_attrib,void,void,
-                               Volume_attrib> Attributes;
-  };
-};
-
-typedef CGAL::Linear_cell_complex_traits
-<3,CGAL::Exact_predicates_inexact_constructions_kernel> Mytraits;
-
-typedef CGAL::Linear_cell_complex<3,3,Mytraits,Myitems> LCC;
-typedef LCC::Dart_handle      Dart_handle;
-typedef LCC::Vertex_attribute Vertex;
-
-typedef LCC::Point    Point_3;
-typedef LCC::Vector   Vector_3;
-
-typedef CGAL::Timer Timer;
-
-struct Scene {
-  LCC* lcc;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Mesh_2/CMakeLists.txt
deleted file mode 100644
index 9d6fbe7..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script (and then adapted manually).
-# This is the CMake script for compiling a CGAL application.
-
-project( mesh_2_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-add_subdirectory(Qt3)
- 
-find_package(CGAL COMPONENTS Core )
-include( ${CGAL_USE_FILE} )
-
-include_directories(BEFORE ../../include)
-include_directories(BEFORE ../../../Triangulation_2/include)
-
-
-if ( CGAL_FOUND )
-
-  # conform target
-  add_executable  (conform conform.cpp)
-  target_link_libraries(conform ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS conform )
-
-  # mesh target
-  add_executable  (mesh mesh.cpp)
-  target_link_libraries(mesh ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS mesh )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/CMakeLists.txt
deleted file mode 100644
index 699d650..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Created by the script cgal_create_cmake_script (and then adapted manually).
-# This is the CMake script for compiling a CGAL application.
-
-
-project( mesh_2_qt3_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Core Qt3 )
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched )
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND QT3_FOUND AND CGAL_Qt3_FOUND)
-
-  include( Qt3Macros-patched )
-  QT3_AUTOMOC(  icons.cpp mesh_2_demo.cpp Qt_widget_styled_layer.cpp Qt_widget_style_editor.cpp Show_points.cpp Show_segments_base.cpp )
-
-  # Make sure the compiler can find generated .moc files
-  include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-
-  include_directories( ${QT3_INCLUDE_DIR} )
-
-  add_executable  (mesh_2_demo icons.cpp mesh_2_demo.cpp Qt_widget_styled_layer.cpp Qt_widget_style_editor.cpp Show_points.cpp Show_segments_base.cpp)
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS mesh_2_demo )
-
-  # Link the main executable to CGAL and third-party libraries
-  target_link_libraries(mesh_2_demo ${QT3_LIBRARIES} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Debug_layer.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Debug_layer.h
deleted file mode 100644
index 2a915ae..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Debug_layer.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent RINEAU
-
-#ifndef CGAL_DEBUG_LAYER_H
-#define CGAL_DEBUG_LAYER_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <iostream>
-
-namespace CGAL {
-
-class Debug_layer : public Qt_widget_layer
-{
-  std::ostream& stream;
-
-public:
-
-  Debug_layer(std::ostream& s = std::cerr) : stream(s)
-  {
-  }
-
-  void draw()
-  {
-    stream << "redraw()" << std::endl;
-  }
-}; // end class Debug_layer
-
-} // end namespace CGAL
-
-#endif // CGAL_DEBUG_LAYER_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_circles.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_circles.h
deleted file mode 100644
index ae60958..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_circles.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_LAYER_SHOW_CIRCLES_H
-#define CGAL_QT_LAYER_SHOW_CIRCLES_H
-
-#include <CGAL/Circle_2.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Cartesian.h>
-#include <qobject.h>
-#include <qcolor.h>
-
-
-namespace CGAL {
-
-// T::Geom_traits has to be a CGAL kernel!
-template <class T>
-class Qt_layer_show_circles : public Qt_widget_layer {
-public:
-  typedef typename T::Point           Point;
-  typedef typename T::Segment         Segment;
-  typedef typename T::Finite_faces_iterator Finite_faces_iterator;
-  typedef typename T::Locate_type     Locate_type;
-  typedef typename T::Face_handle     Face_handle;
-  typedef typename T::Geom_traits GT;
-  typedef typename GT::Circle_2 Circle;
-  typedef typename GT::FT		FT;
-
-  Qt_layer_show_circles(T* t,
-			CGAL::Color c = CGAL::GRAY,
-			int linewidth = 1,
-			CGAL::Color fill_color = CGAL::WHITE,
-			bool filled = false,
-                        QObject* parent = 0, const char* name = 0) :
-    Qt_widget_layer(parent, name),
-    tr(t), do_erase(false), color(c), width(linewidth),
-    fillcolor(fill_color), fill(filled) {};
-
-  void draw()
-  {
-    Qt_widget_layer::draw();
-    do_erase = false;
-  };
-
-  void mousePressEvent(QMouseEvent* e)
-    {
-      if (tr->dimension()<1) return;
-      FT
-	x=static_cast<FT>(widget->x_real(e->x())),
-	y=static_cast<FT>(widget->y_real(e->y()));
-
-      Point p(x,y);
-
-      int li;
-      Locate_type lt;
-      Face_handle fh = tr->locate(p,lt,li);
-      if(lt == T::FACE)
-	draw_circle(fh);
-    };
-
-  void mouseMoveEvent(QMouseEvent *e)
-    {
-      if (tr->dimension()<1) return;
-      FT
-	x=static_cast<FT>(widget->x_real(e->x())),
-	y=static_cast<FT>(widget->y_real(e->y()));
-
-      Point p(x,y);
-
-      int li;
-      Locate_type lt;
-      Face_handle fh = tr->locate(p,lt,li);
-      if(lt == T::FACE)
-	{
-	  if(fh!=old_face)
-	    {
-	      widget->lock();
-
-	      if(do_erase) draw_circle(old_face);
-	      draw_circle(fh);
-	      old_face=fh;
-
-	      widget->unlock();
-	      do_erase=true;
-	    }
-	}
-      else
-	{
-	  if(do_erase)
-	    draw_circle(old_face);
-	  do_erase=false;
-	}
-    };
-
-  void leaveEvent(QEvent* e)
-    {
-      Qt_widget_layer::leaveEvent(e);
-      if (tr->dimension()<1) return;
-      if(do_erase)
-	draw_circle(old_face);
-    };
-
-private:
-  void draw_circle(const Face_handle& fh) const
-    {
-      RasterOp oldRaster = widget->rasterOp();
-      QColor oldcolor = widget->color();
-      QColor oldFillColor = widget->fillColor();
-      int oldwidth = widget->lineWidth();
-      bool oldFilled = widget->isFilled();
-
-      *widget << color;
-      *widget << LineWidth(width) << FillColor(fillcolor);
-      widget->setFilled(fill);
-      widget->get_painter().setRasterOp(NotROP);
-
-      Point v=((*fh).vertex(0))->point();
-      Point c=tr->circumcenter(fh);
-
-      *widget << Circle(c,squared_distance(v,c));
-      widget->setColor(oldcolor);
-      widget->setLineWidth(oldwidth);
-      widget->setFillColor(oldFillColor);
-      widget->setFilled(oldFilled);
-      widget->setRasterOp(oldRaster);
-      widget->do_paint();
-    }
-
-  T* tr;
-  Face_handle  old_face;
-  bool	       do_erase;
-
-  CGAL::Color color;
-  int width;
-  CGAL::Color fillcolor;
-  bool fill;
-};//end class
-
-} // namespace CGAL
-
-#endif // CGAL_QT_LAYER_SHOW_CIRCLES_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h
deleted file mode 100644
index 9478278..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_LAYER_SHOW_TRIANGULATION_H
-#define CGAL_QT_LAYER_SHOW_TRIANGULATION_H
-
-#include "Qt_widget_styled_layer.h"
-#include <CGAL/IO/Qt_widget_Triangulation_2.h>
-
-namespace CGAL {
-
-template <class T>
-class Qt_layer_show_triangulation : public Qt_widget_styled_layer
-{
-public:
-
-  Qt_layer_show_triangulation(T *t,
-			      CGAL::Color lc = CGAL::BLUE,
-			      int linewidth = 1,
-                              QObject* parent = 0, const char* name = 0)
-    : Qt_widget_styled_layer(0, parent, name),
-      tr(t)
-  {
-    color="Color";
-    width="Line width";
-
-    setColor(QColor(lc.red(), lc.green(), lc.blue()));
-    setLineWidth(linewidth);
-  };
-
-  void setColor(QColor c)
-  { style()->setColor(color, c); }
-
-  void setLineWidth(int line_width)
-  { style()->setInt(width, line_width); }
-
-  void draw()
-  {
-    QColor old_color = widget->color();
-    int old_width = widget->lineWidth();
-
-    widget->setColor(style()->getColor(color));
-    widget->setLineWidth(style()->getInt(width));
-
-    *widget << *tr;
-
-    widget->setLineWidth(old_width);
-    widget->setColor(old_color);
-  };
-
-private:
-  T *tr;
-  QString color;
-  QString width;
-};//end class
-
-} // namespace CGAL
-
-#endif // CGAL_QT_LAYER_SHOW_TRIANGULATION_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h
deleted file mode 100644
index a73b6a4..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
-#define CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
-
-#include "Qt_widget_styled_layer.h"
-
-namespace CGAL {
-
-template <class T>
-class Qt_layer_show_triangulation_constraints
-  : public Qt_widget_styled_layer
-{
-public:
-
-  Qt_layer_show_triangulation_constraints(T *t,
-					  CGAL::Color lc = CGAL::RED,
-					  int linewidth = 1,
-                                          QObject* parent = 0,
-                                          const char* name = 0)
-    : Qt_widget_styled_layer(0, parent, name), tr(t)
-  {
-    color="Color";
-    width="Line width";
-
-    setColor(QColor(lc.red(), lc.green(), lc.blue()));
-    setLineWidth(linewidth);
-  };
-
-  void setColor(QColor c)
-  { style()->setColor(color, c); }
-
-  void setLineWidth(int line_width)
-  { style()->setInt(width, line_width); }
-
-  void draw()
-  {
-    widget->lock();
-
-    QColor old_color = widget->color();
-    int old_width = widget->lineWidth();
-
-    widget->setColor(style()->getColor(color));
-    widget->setLineWidth(style()->getInt(width));
-
-    for(typename T::Edge_iterator it=tr->edges_begin();
-	it!=tr->edges_end();
-	it++)
-      if(tr->is_constrained(*it))
-	*widget << tr->segment(*it);
-
-    widget->setLineWidth(old_width);
-    widget->setColor(old_color);
-    widget->unlock();
-  };
-
-private:
-  T *tr;
-  QString color;
-  QString width;
-};//end class
-
-} // namespace CGAL
-
-#endif // CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h
deleted file mode 100644
index ccfeaa5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
-#define CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
-
-#include <qcolor.h>
-#include <qcolordialog.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
-#include <qpixmap.h>
-
-class Color_selector : public QPushButton
-{
-  Q_OBJECT
-public:
-  Color_selector(QColor c = Qt::black,
-		 QWidget* parent = 0, const char* name = 0)
-    : QPushButton(parent, name)
-  {
-    setColor(c);
-    connect(this, SIGNAL(clicked()),
-	    this, SLOT(color_dialog()) );
-  }
-
-  virtual ~Color_selector() {};
-
-  QColor value() const
-  {
-    return color;
-  }
-
-public slots:
-  void setColor(QColor c)
-  {
-    color = c;
-
-    QPixmap pix(24,20);
-    pix.fill(c);
-    setPixmap(pix);
-
-    emit newColor(c);
-  }
-
-signals:
-  void newColor(QColor);
-
-private slots:
-  void color_dialog()
-  {
-    QColor c = QColorDialog::getColor(value());
-    if( c.isValid() )
-      setColor(c);
-  }
-
-private:
-  QColor color;
-};
-
-class Int_selector : public QSpinBox
-{
-  Q_OBJECT
-public:
-  Int_selector(int i, QWidget *parent = 0, const char *name = 0)
-    : QSpinBox(-INT_MAX, INT_MAX, 1, parent, name)
-  {
-    setValue(i);
-  }
-
-  virtual ~Int_selector() {};
-};
-
-class Bool_selector : public QComboBox
-{
-  Q_OBJECT
-public:
-  Bool_selector(bool b_, QWidget *parent = 0, const char *name = 0)
-    : QComboBox(false, parent, name)
-  {
-    insertItem("False");
-    insertItem("True");
-
-    if(b_)
-      setCurrentItem(1);
-    else
-      setCurrentItem(0);
-  }
-
-  virtual ~Bool_selector() {};
-
-  bool value() const
-  {
-    return currentItem() == 1;
-  }
-};
-
-class Point_style_selector : public QComboBox
-{
-  Q_OBJECT
-public:
-  typedef ::CGAL::PointStyle PointStyle;
-  Point_style_selector(PointStyle s,
-		       QWidget *parent = 0, const char *name = 0)
-    : QComboBox(false, parent, name)
-  {
-    insertItem("Pixel");
-    insertItem("Cross");
-    insertItem("Plus");
-    insertItem("Circle");
-    insertItem("Disc");
-    insertItem("Rect");
-    insertItem("Box");
-
-    setCurrentItem(static_cast<int>(s));
-  }
-
-  virtual ~Point_style_selector() {};
-
-  PointStyle value() const
-  {
-    return PointStyle(currentItem());
-  }
-};
-
-#endif // CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp
deleted file mode 100644
index 183ff6e..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include "Qt_widget_style_editor.h"
-#include "Qt_widget_style_editor-aux.h"
-
-#include <qcolor.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qvariant.h>
-
-namespace CGAL {
-
-Qt_widget_style_editor::Qt_widget_style_editor(Style* style,
-					       QWidget *parent,
-					       const char *name)
-  : QFrame(parent, name), style(style)
-{
-  typedef Style::const_iterator iterator;
-
-  QGridLayout* layout = new QGridLayout(this);
-  layout->addColSpacing(1,5);
-
-  const int labels_col = 0; // column number of labels
-  const int selectors_col = 2; // column number of selectors
-
-  int row = 0;
-  for(iterator it=style->begin();
-      it != style->end();
-      ++it)
-    {
-      QLabel* label = new QLabel( it.key(), this);
-      layout->addWidget(label, row, labels_col);
-
-      QWidget* selector = 0;
-      switch( it.data().type() ) {
-      case QVariant::Color:
-	selector = new Color_selector(it.data().toColor(), this);
-	connect(selector, SIGNAL(newColor(QColor)),
-		this, SLOT(map(QColor)));
-	break;
-      case QVariant::Int:
-	selector = new Int_selector(it.data().toInt(), this);
-	connect(selector, SIGNAL(valueChanged(int)),
-		this, SLOT(map(int)));
-	break;
-      case QVariant::Bool:
-	selector = new Bool_selector(it.data().toBool(),
-				     this);
-	connect(selector, SIGNAL(toggled(bool)),
-		this, SLOT(map(bool)));
-	break;
-      case QVariant::UInt:
-	selector =
-	  new Point_style_selector(PointStyle(it.data().toUInt()),
-				   this);
-	connect(selector, SIGNAL(activated(int)),
-		this, SLOT(pointstyle(int)));
-	break;
-      default:
-	CGAL_error();
-	break;
-      }
-
-      mapper[selector]=it.key();
-
-      layout->addWidget(selector, row, selectors_col);
-
-      ++row;
-    }
-}
-
-void Qt_widget_style_editor::map(QColor c)
-{
-  const QObject* s = sender();
-  if( mapper.contains(s) )
-    style->setColor(mapper[s], c);
-  emit styleChanged();
-}
-
-void Qt_widget_style_editor::map(int i)
-{
-  const QObject* s = sender();
-  if( mapper.contains(s) )
-    style->setInt(mapper[s], i);
-  emit styleChanged();
-}
-
-void Qt_widget_style_editor::map(bool b)
-{
-  const QObject* s = sender();
-  if( mapper.contains(s) )
-    style->setBool(mapper[s], b);
-  emit styleChanged();
-}
-
-} // end namespace CGAL
-
-// moc_source_file: Qt_widget_style_editor.h
-#include "Qt_widget_style_editor.moc"
-
-// moc_source_file: Qt_widget_style_editor-aux.h
-#include "Qt_widget_style_editor-aux.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.h
deleted file mode 100644
index 62aabec..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_style_editor.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef QT_WIDGET_STYLE_EDITOR_H
-#define QT_WIDGET_STYLE_EDITOR_H
-
-#include <qframe.h>
-#include "Qt_widget_styled_layer.h"
-
-namespace CGAL {
-
-class Qt_widget_style_editor : public QFrame {
-  Q_OBJECT
-public:
-
-  typedef Qt_widget_styled_layer::Style Style;
-
-  Qt_widget_style_editor(Style* style,
-			 QWidget *parent = 0 , const char *name = 0);
-
-  virtual ~Qt_widget_style_editor() {}
-
-signals:
-  void styleChanged();
-
-private slots:
-  void map(QColor);
-  void map(int);
-  void map(bool);
-
-private:
-  Style* style;
-  QMap<const QObject*, QString> mapper;
-}; // end of class Qt_widget_style_editor
-
-} // end namespace CGAL
-
-#endif // QT_WIDGET_STYLE_EDITOR_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp
deleted file mode 100644
index 439f99b..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include "Qt_widget_styled_layer.h"
-
-namespace CGAL {
-
-  Qt_widget_styled_layer::Qt_widget_styled_layer(
-	    Qt_widget_styled_layer::Style* style,
-	    QObject * parent,
-	    const char * name)
-    : Qt_widget_layer(parent, name),
-      style_(style), private_style(false)
-  {
-    if( style == 0 )
-      {
-	this->style_ = new Style();
-	private_style = true;
-      }
-  }
-
-  Qt_widget_styled_layer::~Qt_widget_styled_layer()
-  {
-    if( private_style )
-      delete style_;
-  }
-
-  void Qt_widget_styled_layer::setStyle(Qt_widget_styled_layer::Style* s)
-  {
-    if( private_style )
-      delete style_;
-    private_style = false;
-    style_ = s;
-  }
-
-  void Qt_widget_style::setBool(QString name, bool b)
-  {
-    map[name] = b;
-  }
-
-  void Qt_widget_style::setInt(QString name, int i)
-  {
-    map[name] = i;
-  }
-
-  void Qt_widget_style::setColor(QString name, QColor c)
-  {
-    map[name] = c;
-  }
-
-  void Qt_widget_style::setPointStyle(QString name, PointStyle s)
-  {
-    map[name] = static_cast<uint>(s);
-    map[name].cast(QVariant::UInt);
-  }
-
-  bool Qt_widget_style::getBool(QString name)
-  {
-    if( ! map.contains(name) )
-      return false;
-    else
-      {
-	CGAL_assertion( map[name].type() == QVariant::Bool );
-	return map[name].asBool();
-      }
-  }
-
-  int Qt_widget_style::getInt(QString name)
-  {
-    if( ! map.contains(name) )
-      return 0;
-    else
-      {
-	CGAL_assertion( map[name].type() == QVariant::Int );
-	return map[name].asInt();
-      }
-  }
-
-  QColor Qt_widget_style::getColor(QString name)
-  {
-    if( ! map.contains(name) )
-      return QColor();
-    else
-      {
-	CGAL_assertion( map[name].type() == QVariant::Color );
-	return map[name].asColor();
-      }
-  }
-
-  ::CGAL::PointStyle Qt_widget_style::getPointStyle(QString name)
-  {
-    if( ! map.contains(name) )
-      return PointStyle();
-    else
-      {
-	CGAL_assertion( map[name].type() == QVariant::UInt );
-	return PointStyle(map[name].asUInt());
-      }
-  }
-
-} // namespace CGAL
-
-// moc_source_file: Qt_widget_styled_layer.h
-#include "Qt_widget_styled_layer.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h
deleted file mode 100644
index 5a7c347..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef QT_WIDGET_STYLED_LAYER_H
-#define QT_WIDGET_STYLED_LAYER_H
-
-#include <qvariant.h>
-#include <qstring.h>
-#include <qmap.h>
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/function_objects.h>
-
-namespace CGAL {
-
-class Qt_widget_style : public QObject {
-  Q_OBJECT
-
-  typedef QMap<QString,QVariant> Map;
-public:
-
-  typedef Map::const_iterator const_iterator;
-  typedef Map::size_type size_type;
-
-  Qt_widget_style()
-    : map() {};
-
-public slots:
-  void setBool(QString name, bool b);
-  void setInt(QString name, int i);
-  void setColor(QString name, QColor c);
-  void setPointStyle(QString name, PointStyle s);
-
-public:
-  bool getBool(QString name);
-  int getInt(QString name);
-  QColor getColor(QString name);
-  PointStyle getPointStyle(QString name);
-
-  const_iterator begin() const
-  {
-    return map.begin();
-  }
-
-  const_iterator end() const
-  {
-    return map.end();
-  }
-
-  size_type size() const
-  {
-    return map.size();
-  }
-
-private:
-  Map map;
-};
-
-class Qt_widget_styled_layer : public Qt_widget_layer {
-  Q_OBJECT
-public:
-  typedef Qt_widget_style Style;
-
-  Qt_widget_styled_layer(Style* style = 0,
-			 QObject * parent=0, const char * name=0);
-
-  ~Qt_widget_styled_layer();
-
-  void setStyle(Style* style);
-  Style * style()  { return style_; }
-private:
-  Style* style_;
-  bool private_style;
-};
-
-} // namespace CGAL
-
-#endif // QT_WIDGET_STYLED_LAYER_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_clusters.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_clusters.h
deleted file mode 100644
index aeaf3c5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_clusters.h
+++ /dev/null
@@ -1,213 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef MESH_2_SHOW_CLUSTERS_H
-#define MESH_2_SHOW_CLUSTERS_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-
-#include <CGAL/Delaunay_triangulation_2.h>
-
-#include <qpixmap.h>
-
-class Show_clusters_aux : public CGAL::Qt_widget_layer
-{
-  Q_OBJECT
-private:
-  virtual void reinit_clusters() {}
-
-public slots:
-  void reinitClusters()
-  {
-    reinit_clusters();
-  }
-public:
-  Show_clusters_aux(QObject* parent, const char* name)
-    : Qt_widget_layer(parent, name)
-  {
-  }
-};
-
-template <class Mesher>
-class Show_clusters : public Show_clusters_aux
-{
-public:
-  typedef typename Mesher::Triangulation Tr;
-  typedef typename Tr::Point		Point;
-  typedef typename Tr::Geom_traits         Geom_traits;
-  typedef CGAL::Delaunay_triangulation_2<Geom_traits> DT;
-  typedef typename DT::Finite_vertices_iterator Vertices_iterator;
-  typedef typename DT::Vertex_handle DT_vertex_handle;
-  typedef typename Tr::Segment		Segment;
-  typedef typename Tr::Face_handle		Face_handle;
-  typedef typename Tr::Vertex_handle	Vertex_handle;
-  typedef typename Tr::Geom_traits::FT	FT;
-  typedef typename Mesher::Clusters Clusters;
-  typedef typename Clusters::Cluster Cluster;
-  typedef typename Clusters::Cluster_vertices_iterator CVIt;
-  typedef typename Clusters::Vertices_in_cluster_iterator ViCIt;
-  typedef typename Clusters::const_iterator Clusters_const_iterator;
-  typedef std::list<Point> List_of_points;
-  typedef typename List_of_points::const_iterator Point_iterator;
-
-  Show_clusters(Mesher* m,
-		CGAL::Color color_ = CGAL::GREEN,
-		int pointsize = 3,
-		CGAL::PointStyle pointstyle = CGAL::DISC,
-		CGAL::Color lc = CGAL::RED,
-                CGAL::Color reduced_line_color_ = CGAL::BLUE,
-		int linewidth = 2,
-                QObject* parent = 0, const char* name = 0)
-    : Show_clusters_aux(parent, name),
-      mesher(m), dt(), color(color_),
-      size(pointsize), style(pointstyle), line_color(lc),
-      reduced_line_color(reduced_line_color_),
-      width(linewidth)
-    {
-      reinit_clusters();
-    }
-
-  void activating()
-  {
-    reinit_clusters();
-  }
-
-  void change_mesher(Mesher* m)
-  {
-    mesher = m;
-    reinit_clusters();
-  }
-
-  void reinit_clusters()
-  {
-    if(!is_active()) return;
-
-    dt.clear();
-
-    if( mesher != 0 )
-      for(CVIt it = mesher->clusters().clusters_vertices_begin();
-          it != mesher->clusters().clusters_vertices_end();
-          ++it)
-        dt.push_back( (*it)->point() );
-  }
-
-  void draw()
-  {
-    widget->lock();
-
-    QColor oldColor = widget->color();
-    int oldPointSize = widget->pointSize();
-    CGAL::PointStyle oldStyle = widget->pointStyle();
-
-    *widget << color << CGAL::PointStyle(style)
-    	    << CGAL::PointSize(size);
-
-    for(Vertices_iterator it = dt.finite_vertices_begin();
-        it != dt.finite_vertices_end();
-        ++it)
-      *widget << it->point();
-
-    widget->setPointStyle(oldStyle);
-    widget->setPointSize(oldPointSize);
-    widget->setColor(oldColor);
-
-    widget->unlock();
-    oldPixmap = widget->get_pixmap();
-  }
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if( mesher == 0 ) return;
-
-    FT x, y;
-    widget->x_real(e->x(), x);
-    widget->y_real(e->y(), y);
-    Point p(x, y);
-
-    DT_vertex_handle v = dt.nearest_vertex(p);
-
-    if(v == NULL) return;
-    if(v == oldVertex) return;
-
-    oldVertex = v;
-
-    QColor oldColor = widget->color();
-    int oldWidth = widget->lineWidth();
-
-    widget->lock();
-
-    widget->get_painter().drawPixmap(0, 0, oldPixmap);
-
-    *widget << CGAL::LineWidth(width);
-
-    typename Tr::Locate_type lt;
-    int i;
-    Face_handle fh = mesher->triangulation().locate(v->point(), lt, i);
-    CGAL_assertion( lt == Tr::VERTEX );
-
-    Vertex_handle v2 = fh->vertex(i);
-
-    int n = mesher->clusters().number_of_clusters_at_vertex(v2);
-
-    for(int j = 0; j < n; ++j)
-      {
-	std::pair<ViCIt,ViCIt> seq =
-          mesher->clusters().vertices_in_cluster_sequence(v2, j);
-        Cluster c;
-        Clusters_const_iterator dummy_c_it;
-        mesher->clusters().get_cluster(v2, *(seq.first), c, dummy_c_it);
-        if( c.is_reduced() )
-          *widget << reduced_line_color;
-        else
-          *widget << line_color;
-	for(ViCIt it = seq.first;
-	    it != seq.second;
-	    ++it)
-	  *widget << Segment(v2->point(), (*it)->point());
-      }
-
-    widget->setLineWidth(oldWidth);
-    widget->setColor(oldColor);
-
-    widget->unlock();
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    widget->get_painter().drawPixmap(0, 0, oldPixmap);
-    widget->update();
-  }
-
-private:
-  Mesher* mesher;
-  DT dt;
-  DT_vertex_handle oldVertex;
-  QPixmap oldPixmap;
-  bool  should_restore_pixmap;
-  CGAL::Color color;
-  int size;
-  CGAL::PointStyle style;
-  CGAL::Color line_color;
-  CGAL::Color reduced_line_color;
-  int width;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.cpp
deleted file mode 100644
index 597d9e9..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include "Show_points.h"
-
-namespace CGAL {
-
-  Show_points_base::Show_points_base(Color c,
-				     int pointsize,
-				     PointStyle pointstyle,
-				     QObject * parent,
-				     const char * name)
-    : Qt_widget_styled_layer(0, parent, name)
-  {
-    color=tr("Color");
-    size=tr("Point size");
-    style_name=tr("Point style");
-
-    setColor(QColor(c.red(), c.green(), c.blue()));
-    setPointSize(pointsize);
-    setPointStyle(pointstyle);
-  }
-
-  Show_points_base::Show_points_base(Style* style,
-				     QString points_color_name,
-				     QString points_size_name,
-				     QString points_style_name,
-				     QObject * parent,
-				     const char * name)
-    : Qt_widget_styled_layer(style, parent, name),
-      color(points_color_name),
-      size(points_size_name),
-      style_name(points_style_name)
-  {}
-
-  void Show_points_base::setColor(QColor c)
-  { style()->setColor(color, c); }
-
-  void Show_points_base::setPointSize(int pointsize)
-  { style()->setInt(size, pointsize); }
-
-  void Show_points_base::setPointStyle(PointStyle pointstyle)
-  { style()->setInt(style_name, static_cast<int>(pointstyle)); }
-
-} // namespace CGAL
-
-// moc_source_file: Show_points.h
-#include "Show_points.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.h
deleted file mode 100644
index 989ad52..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_points.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef SHOW_POINTS_H
-#define SHOW_POINTS_H
-
-#include <qmap.h>
-#include <qstring.h>
-#include <qvariant.h>
-#include <qcolor.h>
-
-#include "Qt_widget_styled_layer.h"
-#include <CGAL/function_objects.h>
-
-namespace CGAL {
-
-class Show_points_base: public Qt_widget_styled_layer {
-  Q_OBJECT
-public:
-  typedef Qt_widget_styled_layer::Style Style;
-
-  Show_points_base(Color c,
-		   int pointsize,
-		   PointStyle pointstyle,
-		   QObject * parent=0, const char * name=0);
-
-  Show_points_base(Style* style,
-		   QString points_color_name,
-		   QString points_size_name,
-		   QString points_style_name,
-		   QObject * parent=0, const char * name=0);
-
-public slots:
-  void setColor(QColor);
-  void setPointSize(int);
-  void setPointStyle(PointStyle);
-
-protected:
-  QString color;
-  QString size;
-  QString style_name;
-}; // end Show_points_base
-
-template <class C, class It,
-  class Transform = Identity<typename It::value_type> >
-class Show_points : public Show_points_base {
-public:
-  typedef Qt_widget_styled_layer::Style Style;
-
-  typedef It iterator;
-  typedef iterator (C::* iterator_function)() const;
-
-  Show_points(C *container,
-	      iterator_function begin,
-	      iterator_function end,
-	      Color c = CGAL::GREEN,
-	      int pointsize = 3,
-	      PointStyle pointstyle = CGAL::DISC,
-	      QObject * parent=0, const char * name=0)
-    : Show_points_base(c, pointsize, pointstyle,
-		       parent, name),
-      cont(container), _begin(begin), _end(end) {};
-
-  Show_points(C *container,
-	      iterator_function begin,
-	      iterator_function end,
-	      Style* style,
-	      QString points_color_name,
-	      QString points_size_name,
-	      QString points_style_name,
-	      QObject * parent=0, const char * name=0)
-    : Show_points_base(style,
-		       points_color_name,
-		       points_size_name,
-		       points_style_name,
-		       parent, name),
-      cont(container), _begin(begin), _end(end) {};
-
-  void draw()
-  {
-    widget->lock();
-    {
-      QColor old_color = widget->color();
-      int old_size = widget->pointSize();
-      PointStyle old_point_style = widget->pointStyle();
-
-      widget->setColor(style()->getColor(color));
-      widget->setPointSize(style()->getInt(size));
-      widget->setPointStyle(static_cast<CGAL::PointStyle>(style()->
-							  getInt(style_name)));
-
-      for(iterator it = (cont->*_begin)();
-	  it!=(cont->*_end)();
-	  ++it)
-	*widget << Transform()(*it);
-
-      widget->setColor(old_color);
-      widget->setPointSize(old_size);
-      widget->setPointStyle(old_point_style);
-    }
-    widget->unlock();
-  };
-
-private:
-  C	*cont;
-  iterator_function _begin;
-  iterator_function _end;
-};//end class
-
-} // namespace CGAL
-
-#endif // SHOW_POINTS_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments.h
deleted file mode 100644
index 5cca1ae..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef SHOW_SEGMENTS_H
-#define SHOW_SEGMENTS_H
-
-#include "Show_segments_base.h"
-
-namespace CGAL {
-
-template <class C, class It,
-	  class Transform = Identity<typename It::value_type> >
-class Show_segments : public Show_segments_base {
-public:
-  typedef Qt_widget_styled_layer::Style Style;
-
-  typedef It iterator;
-  typedef iterator (C::* iterator_function)() const;
-
-  Show_segments(C *container,
-                iterator_function begin,
-                iterator_function end,
-                Color c=CGAL::GREEN,
-                int linewidth=3,
-                QObject* parent = 0, const char* name = 0)
-    : Show_segments_base(c, linewidth,
-		      parent, name),
-      cont(container), _begin(begin), _end(end) {};
-
-  Show_segments(C *container,
-                iterator_function begin,
-                iterator_function end,
-                Style* style,
-                QString line_color_name,
-                QString line_width_name,
-                QObject* parent = 0, const char* name = 0)
-    : Show_segments_base(style, line_color_name, line_width_name,
-		      parent, name),
-      cont(container), _begin(begin), _end(end) {};
-
-  void set_container(C* container)
-  {
-    cont = container;
-  }
-
-  void draw()
-  {
-    if( cont != 0 )
-      {
-        widget->lock();
-        {
-          QColor old_color = widget->color();
-          int old_width = widget->lineWidth();
-
-          widget->setColor(style()->getColor(color));
-          widget->setLineWidth(style()->getInt(width));
-
-          for(iterator it = (cont->*_begin)();
-              it!=(cont->*_end)();
-              ++it)
-            {
-              *widget << Transform()(*it);
-            }
-
-          widget->setColor(old_color);
-          widget->setLineWidth(old_width);
-        }
-        widget->unlock();
-      }
-  };
-
-private:
-  C	*cont;
-  iterator_function _begin;
-  iterator_function _end;
-};//end class
-
-} // namespace CGAL
-
-#endif // SHOW_SEGMENTS_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.cpp
deleted file mode 100644
index 5af4172..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include "Show_segments_base.h"
-
-namespace CGAL {
-
-  Show_segments_base::Show_segments_base(Color c,
-                                         int linewidth,
-                                         QObject* parent,
-                                         const char* name)
-    : Qt_widget_styled_layer(0, parent, name)
-  {
-    color=tr("Color");
-    width=tr("Line width");
-
-    setColor(QColor(c.red(), c.green(), c.blue()));
-    setLineWidth(linewidth);
-  }
-
-  Show_segments_base::Show_segments_base(Style* style,
-                                         QString line_color_name,
-                                         QString line_width_name,
-                                         QObject* parent,
-                                         const char* name)
-    : Qt_widget_styled_layer(style, parent, name),
-      color(line_color_name),
-      width(line_width_name)
-  {}
-
-  void Show_segments_base::setColor(QColor c)
-  { style()->setColor(color, c); }
-
-  void Show_segments_base::setLineWidth(int line_width)
-  { style()->setInt(width, line_width); }
-
-} // namespace CGAL
-
-// moc_source_file: Show_segments_base.h
-#include "Show_segments_base.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.h
deleted file mode 100644
index 34fb7ae..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/Show_segments_base.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef SHOW_SEGMENTS_BASE_H
-#define SHOW_SEGMENTS_BASE_H
-
-#include "Qt_widget_styled_layer.h"
-
-namespace CGAL {
-
-class Show_segments_base: public Qt_widget_styled_layer {
-  Q_OBJECT
-public:
-  typedef Qt_widget_styled_layer::Style Style;
-
-  Show_segments_base(Color c,
-                     int linewidth,
-                     QObject* parent = 0, const char* name = 0);
-
-  Show_segments_base(Style* style,
-                     QString line_color_name,
-                     QString line_width_name,
-                     QObject* parent = 0, const char* name = 0);
-
-public slots:
-  void setColor(QColor);
-  void setLineWidth(int);
-
-protected:
-  QString color;
-  QString width;
-}; //end Show_segments_base
-
-} // namespace CGAL
-
-#endif // SHOW_SEGMENTS_BASE_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/contraints.xpm b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/contraints.xpm
deleted file mode 100644
index 90533a0..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/contraints.xpm
+++ /dev/null
@@ -1,37 +0,0 @@
-/* XPM */
-const char * contraints_xpm[] = {
-"32 32 2 1",
-" 	c None",
-".	c #FF0000",
-"                                ",
-"                                ",
-"                                ",
-"          .............         ",
-"         ..           ..        ",
-"         .              .       ",
-"        .               .       ",
-"        .                .      ",
-"        .                 .     ",
-"       .                   .    ",
-"       .                   .    ",
-"      .       ...          .    ",
-"      .      ... ....      .    ",
-"      .      . .    .      .    ",
-"     .       .  .   .      .    ",
-"     .       .  .   .       .   ",
-"     .       .   .  .       .   ",
-"    ..      .     . .       .   ",
-"    ..      .     . .       .   ",
-"    .      ..      ..       .   ",
-"    .       .....  ..     ...   ",
-"    .            ....     .     ",
-"    .                    .      ",
-"    .                   .       ",
-"    .                  .        ",
-"    .                  .        ",
-"    .....             .         ",
-"         ........   ..          ",
-"                 ....           ",
-"                                ",
-"                                ",
-"                                "};
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.cpp
deleted file mode 100644
index 93ef11a..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/IO/pixmaps/polygon.xpm>
-#include <CGAL/IO/pixmaps/point.xpm>
-#include <CGAL/IO/pixmaps/points.xpm>
-#include "contraints.xpm"
-#include "marked.xpm"
-#include "seeds.xpm"
-#include <CGAL/IO/pixmaps/circle.xpm>
-#include <CGAL/IO/pixmaps/triangulation.xpm>
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.h b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.h
deleted file mode 100644
index 7e8df26..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/icons.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2003-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-extern const char *polygon_xpm[],
-                  *point_xpm[],
-                  *points_xpm[],
-                  *contraints_xpm[],
-                  *marked_xpm[],
-                  *seeds_xpm[],
-                  *circle_xpm[],
-                  *triangulation_xpm[];
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/marked.xpm b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/marked.xpm
deleted file mode 100644
index 5a1c8d2..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/marked.xpm
+++ /dev/null
@@ -1,39 +0,0 @@
-/* XPM */
-const char * marked_xpm[] = {
-"32 32 4 1",
-" 	c None",
-".	c #000080",
-"+	c #0CFF00",
-"@	c #FFFFFF",
-"                                ",
-"                                ",
-"                                ",
-"          .............         ",
-"         ..++++++++++...        ",
-"         .+.++++++++. at .+.       ",
-"        .++.+++++++.+.++.       ",
-"        .+++.+++++.++.+++.      ",
-"        .+++.++++.+++.++++.     ",
-"       .+++++.++.++++.+++++.    ",
-"       .++++++..++++.++++...    ",
-"      .+++++++...+++.++.. at ..    ",
-"      .+++++.... at ......++.+.    ",
-"      .++++.+. at .@@@@.++++.+.    ",
-"     .+++..++.@@.@@@.+++.++.    ",
-"     .++.++++.@@.@@@.+++.+++.   ",
-"     ...+++++.@@@.@@.++.++++.   ",
-"    ..++++++.@@@@@. at .++.++++.   ",
-"    ...+++++.@@@@@. at .+.+++++.   ",
-"    .++......@@@@@@..+.+++++.   ",
-"    .+++++++.....@@..........   ",
-"    .+++++..+.+++.....++++.     ",
-"    .++++.++++.++++++.+++.      ",
-"    .+++.++++++.+++++.++.       ",
-"    .+..++++++++.+++.++.        ",
-"    ..+++++++++++.++.++.        ",
-"    .....+++++++++.+.+.         ",
-"         ........++...          ",
-"                 ....           ",
-"                                ",
-"                                ",
-"                                "};
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/mesh_2_demo.cpp b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/mesh_2_demo.cpp
deleted file mode 100644
index a842eb7..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/mesh_2_demo.cpp
+++ /dev/null
@@ -1,1531 +0,0 @@
-// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include <climits>
-#include <algorithm>
-#include <functional>
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Polygon_2.h>
-#define CGAL_MESH_2_USE_TIMERS
-#include <CGAL/Triangulation_conformer_2.h>
-#include <CGAL/Delaunay_mesher_2.h>
-#include <CGAL/Delaunay_mesh_local_size_criteria_2.h>
-#include <CGAL/Delaunay_mesh_face_base_2.h>
-
-#include <CGAL/IO/File_poly.h>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_widget_get_point.h>
-#include <CGAL/IO/Qt_widget_get_polygon.h>
-
-#include "icons.h"
-
-#include "Show_points.h"
-#include "Show_segments.h"
-#include "Qt_layer_show_triangulation.h"
-#include "Qt_layer_show_triangulation_constraints.h"
-#include "Qt_layer_show_circles.h"
-#include "Show_clusters.h"
-#include <CGAL/IO/Qt_widget_show_mouse_coordinates.h>
-#include "Qt_widget_styled_layer.h"
-
-#ifdef CGAL_MESH_2_DEBUG_DRAW
-#include "Debug_layer.h"
-#endif
-
-#include "Qt_widget_style_editor.h"
-
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qcolor.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qinputdialog.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qtabwidget.h>
-
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qtimer.h>
-#include <qcursor.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-
-#ifdef TESTING
-#  include <CGAL/MP_Float.h>
-   typedef CGAL::Simple_cartesian<CGAL::MP_Float> Kernel;
-#else // !TESTING
-#  include <CGAL/Filtered_kernel.h>
-   typedef CGAL::Simple_cartesian<double>  K1;
-   typedef CGAL::Filtered_kernel<K1>       Kernel;
-#endif // #ifdef TESTING
-
-struct K : public Kernel {};
-typedef K::FT                           FT;
-
-typedef CGAL::Triangulation_vertex_base_2<K> Vb;
-typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
-typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
-typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds,
-  CGAL::Exact_predicates_tag> Tr;
-typedef CGAL::Delaunay_mesh_local_size_criteria_2<Tr> Criteria;
-
-typedef K::Point_2 Point_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Triangle_2 Triangle_2;
-typedef K::Circle_2 Circle;
-typedef CGAL::Polygon_2<K> CGALPolygon;
-
-typedef CGAL::Delaunay_mesher_2<Tr, Criteria> Mesher;
-typedef Tr::Vertex Vertex;
-typedef Tr::Edge Edge;
-
-template <class CDT>
-void
-read_constraints(CDT& t, std::istream &f)
-{
-  typedef typename CDT::Point Point;
-
-  t.clear();
-
-  int nedges = 0;
-  f>>nedges;
-
-  for(int n = 0; n<nedges; n++) {
-    Point p1, p2;
-    f >> p1 >> p2;
-    t.insert_constraint(p1, p2);
-  }
-}
-
-template <class CDT>
-void
-write_constraints(const CDT& t, std::ostream &f)
-{
-  typedef typename CDT::Finite_edges_iterator Finite_edges_iterator;
-
-  int number_of_constrained_edges = 0;
-  for(Finite_edges_iterator it = t.finite_edges_begin();
-      it != t.finite_edges_end();
-      ++it)
-    if((*it).first->is_constrained((*it).second))
-      ++number_of_constrained_edges;
-
-  f << number_of_constrained_edges << std::endl;
-  for(Finite_edges_iterator eit = t.finite_edges_begin();
-      eit!=t.finite_edges_end();
-      ++eit)
-    if((*eit).first->is_constrained((*eit).second))
-      {
-        f << (*eit).first->vertex(t.cw((*eit).second))->point() << " "
-          << (*eit).first->vertex(t.ccw((*eit).second))->point() <<std::endl;
-      }
-}
-
-struct Vertex_to_point {
-  const Point_2& operator()(const Vertex& v) const
-  {
-    return v.point();
-  }
-};
-
-struct Edge_to_segment {
-  const Segment_2 operator()(const Edge& e) const
-  {
-    return Segment_2(e.first->vertex(Tr::cw (e.second))->point(),
-                     e.first->vertex(Tr::ccw(e.second))->point());
-  }
-};
-
-struct Background_color : public CGAL::Qt_widget_styled_layer
-{
-  Background_color (CGAL::Color c = CGAL::WHITE)
-  {
-    style()->setColor("Back ground color",
-                      QColor(c.red(), c.green(), c.blue()));
-  }
-
-  void draw()
-  {
-    widget->setBackgroundColor(style()->getColor("Back ground color"));
-  }
-};
-
-template <class Tr>
-class Show_in_domain_faces : public CGAL::Qt_widget_styled_layer
-{
-  Tr *cdt;
-public:
-  Show_in_domain_faces(Tr *t, CGAL::Color c=CGAL::GREEN,
-                       QObject* parent = 0, const char* name = 0)
-    : Qt_widget_styled_layer(0, parent, name),
-      cdt(t)
-  {
-    QColor color(c.red(), c.green(), c.blue());
-    style()->setColor("Fill color", color);
-    style()->setInt("Line width", 0);
-    style()->setColor("Segment color", color);
-  }
-
-  typedef typename Tr::Finite_faces_iterator Face_iterator;
-
-  void draw()
-  {
-    QColor old_fill_color = widget->fillColor();
-    int old_line_width = widget->lineWidth();
-    QColor old_line_color = widget->color();
-
-    widget->setColor(style()->getColor("Segment color"));
-    widget->setLineWidth(style()->getInt("Line width"));
-    widget->setFillColor(style()->getColor("Fill color"));
-
-    for(Face_iterator fit=cdt->finite_faces_begin();
-        fit!=cdt->finite_faces_end();
-        ++fit)
-      if(fit->is_in_domain())
-        *widget << cdt->triangle(fit);
-
-    widget->setFillColor(old_fill_color);
-    widget->setLineWidth(old_line_width);
-    widget->setColor(old_line_color);
-  }
-};
-
-template <class Mesher>
-class Show_bad_faces : public CGAL::Qt_widget_layer
-{
-  Mesher *m;
-  CGAL::Color color;
-public:
-  Show_bad_faces(Mesher *mesher,
-                 CGAL::Color c=CGAL::Color(127,0,0),
-                 QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name),
-      m(mesher),
-      color(c)
-  {}
-
-  void set_container(Mesher* mesher)
-  {
-    m = mesher;
-  }
-
-  typedef typename Mesher::Bad_faces_const_iterator Bad_faces_iterator;
-
-  void draw()
-  {
-    if( m != 0 )
-      {
-        widget->lock();
-        {
-          QColor old_fill_color = widget->fillColor();
-          int old_line_width = widget->lineWidth();
-
-          *widget << CGAL::FillColor(color)
-                  << CGAL::LineWidth(0);
-
-          for(Bad_faces_iterator fit=m->bad_faces_begin();
-                fit!=m->bad_faces_end();
-              ++fit)
-            *widget << Triangle_2((*fit)->vertex(0)->point(),
-                                  (*fit)->vertex(1)->point(),
-                                  (*fit)->vertex(2)->point());
-          widget->setFillColor(old_fill_color);
-          widget->setLineWidth(old_line_width);
-        }
-        widget->unlock();
-      }
-  }
-};
-
-class Meshing_debugging_layer : public CGAL::Qt_widget_layer
-{
-  Q_OBJECT
-  Mesher* m;
-  bool point_on;
-public:
-  Meshing_debugging_layer(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), m(0), point_on(false)
-  {
-  }
-
-  void set_container(Mesher* mesher)
-  {
-    m = mesher;
-  }
-
-  void draw()
-  {
-    if( m != 0 )
-      {
-        if( m->is_refinement_done() ) return;
-
-        widget->lock();
-        {
-          QColor old_color = widget->color();
-          int old_line_width = widget->lineWidth();
-          CGAL::PointStyle old_point_style = widget->pointStyle();
-          int old_point_size = widget->pointSize();
-
-          if( m->is_edges_refinement_done() )
-            {
-              QColor old_fill_color = widget->fillColor();
-
-              const Tr::Face_handle fh = m->next_bad_face();
-
-              *widget << CGAL::FillColor(CGAL::RED)
-                      << CGAL::LineWidth(0)
-                      << Triangle_2(fh->vertex(0)->point(),
-                                    fh->vertex(1)->point(),
-                                    fh->vertex(2)->point());
-
-              widget->setFillColor(old_fill_color);
-            }
-          else
-            {
-              Edge_to_segment edge_to_segment;
-
-              *widget << CGAL::PURPLE
-                      << CGAL::LineWidth(2)
-                      << edge_to_segment(m->next_encroached_edge());
-            }
-
-          *widget << CGAL::BLACK
-                  << CGAL::PointStyle(CGAL::PLUS)
-                  << CGAL::PointSize(3)
-                  << m->next_refinement_point()
-                  << CGAL::PointSize(old_point_size)
-                  << CGAL::PointStyle(old_point_style);
-
-          widget->setLineWidth(old_line_width);
-          widget->setColor(old_color);
-        }
-        widget->unlock();
-      }
-  }
-};
-
-
-class Follow_mouse : public CGAL::Qt_widget_layer
-{
-  QCursor oldcursor;
-public:
-  Follow_mouse(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name)
-  {
-  }
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    FT x=static_cast<FT>(widget->x_real(e->x()));
-    FT y=static_cast<FT>(widget->y_real(e->y()));
-    const Point_2 current_point = Point_2(x, y);
-    widget->new_object(CGAL::make_object(current_point));
-    previous_point = current_point;
-    just_entered = false;
-  }
-
-  void enterEvent(QEvent*)
-  {
-    just_entered = true;
-  }
-
-  void leaveEvent(QEvent*)
-  {
-    just_entered = false;
-  }
-
-  void activating()
-  {
-    oldcursor = widget->cursor();
-    widget->setCursor(crossCursor);
-  };
-
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-  };
-
-  Point_2 previous_point;
-  bool just_entered;
-};
-
-class Preferences : public QWidget
-{
-  Q_OBJECT
-private:
-  QGridLayout* layout;
-  QTabWidget* tab;
-
-public:
-  Preferences(QWidget* parent = 0, const char* name = 0, bool modal = false)
-    : QWidget(parent, name, modal)
-  {
-    layout = new QGridLayout(this, 1,1, 11, 6, "pref_layout");
-    tab = new QTabWidget(this);
-    layout->addWidget(tab, 0, 0);
-  }
-
-  template <typename LayersIterator>
-  void setLayers(LayersIterator begin, LayersIterator end)
-  {
-    QWidget* w;
-    while( (w = tab->currentPage()) != 0)
-      {
-	tab->removePage(w);
-	delete w;
-      }
-
-    for(LayersIterator it = begin; it!=end; ++it)
-      {
-	QFrame* box = new QFrame(this);
-	QHBoxLayout* hor = new QHBoxLayout(box, 5, 0);
-	QVBoxLayout* layout = new QVBoxLayout(hor, 5);
-
-	QCheckBox* check = new QCheckBox("&Activated", box);
-	layout->addWidget(check);
-
-	check->setChecked((*it)->is_active());
-
-	connect(check, SIGNAL(stateChanged(int)),
-		*it, SLOT(stateChanged(int)));
-	connect(check, SIGNAL(stateChanged(int)),
-		this, SLOT(is_changed()));
-
-	//	QGroupBox* group = new QGroupBox("&Properties", box);
-	CGAL::Qt_widget_style_editor* editor =
-	  new CGAL::Qt_widget_style_editor((*it)->style(), box);
-	editor->show();
-
-	layout->addWidget(editor);
-	layout->addItem(new QSpacerItem(0, 0,
-					QSizePolicy::Minimum,
-					QSizePolicy::Expanding));
-	hor->addItem(new QSpacerItem(0, 0,
-				     QSizePolicy::Expanding,
-				     QSizePolicy::Minimum));
-
-	connect(editor, SIGNAL(styleChanged()),
-		this, SLOT(is_changed()));
-
-	tab->addTab(box, (*it)->name());
-      }
-  }
-
-private slots:
-  void is_changed() { emit changed(); }
-
-signals:
-  void changed();
-}; // end of class Preferences
-
-class MyWindow : public QMainWindow
-{
-  Q_OBJECT
-
-  typedef std::list<Point_2> Seeds;
-public:
-  MyWindow() : criteria(), mesher(0)
-    {
-      // --- DEMO WINDOW'S LAYOUT ---
-      // a main frame, with a QHBoxLayout (border=0, space=0)
-      QFrame* mainframe = new QFrame(this, "mainframe");
-      QHBoxLayout *mainlayout = new QHBoxLayout(mainframe, 0, 0,
-                                                "mainlayout");
-
-      // a Qt_widget at the left of the main frame
-      widget = new CGAL::Qt_widget(mainframe, "Main widget");
-      widget->setSizePolicy(QSizePolicy( QSizePolicy::Expanding,
-                                         QSizePolicy::Expanding ));
-      mainlayout->addWidget(widget);
-
-      // an other frame "infoframe" at the right of the main frame
-      // with a QVBoxLayout (border=10, space=5)
-      QFrame* infoframe = new QFrame(mainframe, "infoframe");
-      infoframe->setFrameStyle( QFrame::Box | QFrame::Raised );
-      infoframe->setLineWidth(2);
-      QVBoxLayout *infoframelayout = new QVBoxLayout(infoframe, 10, 5,
-                                                     "infoframelayout");
-      mainlayout->addWidget(infoframe);
-
-      // a 3x2 QGridLayout in the info frame (space=5)
-      QGridLayout *numbers_layout = new QGridLayout(infoframelayout,
-                                                    3, 2,
-                                                    5, // space
-                                                    "infolayout");
-      //   number of points
-      numbers_layout->addWidget(new QLabel("Number of points: ",
-                                           infoframe),
-                                0, 0,
-                                AlignRight | AlignTop );
-
-      nb_of_points = new QLabel("0", infoframe);
-      numbers_layout->addWidget(nb_of_points, 0, 1,
-                                AlignLeft | AlignTop );
-
-      //   number of clusters
-      numbers_layout->addWidget(new QLabel("Number of clusters: ",
-                                           infoframe),
-                                1, 0,
-                                AlignRight | AlignTop );
-
-      nb_of_clusters = new QLabel("", infoframe);
-      numbers_layout->addWidget(nb_of_clusters, 1, 1,
-                                AlignLeft | AlignTop );
-
-      //   initialization status
-      numbers_layout->addWidget(new QLabel("init status: ", infoframe),
-                                2, 0,
-                                AlignRight | AlignTop );
-
-      init_status = new QLabel("no", infoframe);
-      numbers_layout->addWidget(init_status, 2, 1,
-                                AlignLeft | AlignTop );
-
-      // a vertical spacer in the info frame
-      infoframelayout->addItem(new
-                               QSpacerItem( 0, 0,
-                                            QSizePolicy::Minimum,
-                                            QSizePolicy::Expanding ));
-
-      // another grid: a 2x3 QGridLayout (space=5)
-      QGridLayout *criteria_layout =
-        new QGridLayout(infoframelayout, 2, 3,
-                        5, // space
-                        "criteria_layout");
-
-      //    angle bound
-      criteria_layout->addWidget(new QLabel("Angle bound: ",
-                                            infoframe),
-                                 0, 0,
-                                 AlignRight | AlignTop);
-      angle_bound = new QLineEdit("0.125", infoframe,
-                                  "angle_bound");
-      angle_bound->setValidator(new QDoubleValidator(angle_bound));
-      criteria_layout->addWidget(angle_bound, 0, 1,
-                                 AlignLeft | AlignTop );
-      connect(angle_bound, SIGNAL(textChanged(const QString&)),
-              this, SLOT(setBound(const QString&)));
-
-
-      //    size bound
-      criteria_layout->addWidget(new QLabel("Size bound: ",
-                                            infoframe),
-                                 1, 0,
-                                 AlignRight | AlignTop);
-      size_bound = new QLineEdit("0", infoframe,
-                                 "size_bound");
-      size_bound->setValidator(new QDoubleValidator(size_bound));
-      criteria_layout->addWidget(size_bound, 1, 1,
-                                 AlignLeft | AlignTop );
-      connect(size_bound, SIGNAL(textChanged(const QString&)),
-              this, SLOT(setSizeBound(const QString&)));
-
-      //    under mouse
-      under_mouse = new QCheckBox("Under mouse only", infoframe,
-                                  "under_mouse");
-      criteria_layout->addMultiCellWidget(under_mouse,
-                                          3, 3, 0, 1);
-      connect(under_mouse, SIGNAL(toggled(bool)),
-              this, SLOT(setLocal(bool)));
-
-      setCentralWidget(mainframe);
-      resize(700,500);
-      mainframe->show();
-
-      // --- STATUSBAR ---
-      statusBar();
-
-      // --- LAYERS ---
-
-      Background_color* background_color_layer = new Background_color();
-
-      show_points =
-        new Show_points_from_triangulation(&cdt,
-                                           &Tr::finite_vertices_begin,
-                                           &Tr::finite_vertices_end,
-                                           CGAL::BLACK, 2,
-                                           CGAL::DISC,
-                                           this, "Show points");
-
-      show_seeds = new Show_seeds(&seeds,
-                                  &Seeds::begin,
-                                  &Seeds::end,
-                                  CGAL::BLUE,
-                                  5,
-                                  CGAL::CROSS,
-                                  this, "Show seeds");
-      show_triangulation =
-        new CGAL::Qt_layer_show_triangulation<Tr>(&cdt,
-                                                  CGAL::BLUE,1,
-                                                  this,
-                                                  "Show triangulation edges");
-      show_in_domain =
-        new Show_in_domain_faces<Tr>(&cdt, CGAL::GREEN,
-                                     this, "Show in_domain faces");
-
-      show_constraints =
-        new CGAL::Qt_layer_show_triangulation_constraints<Tr>
-        (&cdt, CGAL::RED, 1,
-         this, "Show constrained edges");
-
-      show_encroached_edges =
-        new Show_encroached_edges(0,
-                                  &Mesher::encroached_edges_begin,
-                                  &Mesher::encroached_edges_end,
-                                  CGAL::RED, 2,
-                                  this, "Encroached edges layer");
-
-      show_bad_faces =
-        new Show_bad_faces<Mesher>(0, CGAL::Color(0,160,0),
-                                   this, "Show bad faces");
-
-      debug_layer = new Meshing_debugging_layer(this,
-                                                "Debug layer");
-
-      show_circles =
-        new CGAL::Qt_layer_show_circles<Tr>(&cdt, CGAL::GRAY, 1,
-                                            CGAL::WHITE, false,
-                                            this, "Show circles");
-
-      show_coordinates =
-        new CGAL::Qt_widget_show_mouse_coordinates(*this,
-                                                   this,
-                                                   "Follow mouse coordinates");
-
-      show_clusters = new Show_clusters<Mesher>(mesher,
-                                                CGAL::BLACK,3,CGAL::RECT,
-                                                CGAL::BLACK,CGAL::BLUE,2,
-                                                this,
-                                                "Show clusters");
-
-      // layers order, first attached are "under" last attached
-#ifdef CGAL_MESH_2_DEBUG_DRAW
-      widget->attach(new CGAL::Debug_layer());
-#endif
-      widget->attach(background_color_layer);
-      widget->attach(show_in_domain);
-      widget->attach(show_bad_faces);
-      widget->attach(show_triangulation);
-      widget->attach(show_constraints);
-      widget->attach(show_circles);
-      widget->attach(show_encroached_edges);
-      widget->attach(show_points);
-      widget->attach(show_seeds);
-      widget->attach(show_coordinates);
-      widget->attach(debug_layer);
-      widget->attach(show_clusters); // should be last
-
-      show_circles->deactivate();
-      show_encroached_edges->deactivate();
-      show_bad_faces->deactivate();
-      show_clusters->deactivate();
-
-      get_point = new CGAL::Qt_widget_get_point<K>();
-      widget->attach(get_point);
-      get_point->deactivate();
-
-      get_polygon = new CGAL::Qt_widget_get_polygon<CGALPolygon>();
-      widget->attach(get_polygon);
-      get_polygon->deactivate();
-
-      get_seed = new CGAL::Qt_widget_get_point<K>();
-      widget->attach(get_seed);
-      get_seed->deactivate();
-
-      follow_mouse = new Follow_mouse();
-      widget->attach(follow_mouse);
-      follow_mouse->deactivate();
-
-      connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-              this, SLOT(get_cgal_object(CGAL::Object)));
-
-      const int number_of_styled_layers = 6;
-      CGAL::Qt_widget_styled_layer* styled_layers[number_of_styled_layers] =
-        { background_color_layer,
-          show_points,
-          show_seeds,
-          show_triangulation,
-          show_constraints,
-          show_in_domain};
-
-      prefs = new Preferences(0, "Preferences", false);
-      prefs->setCaption("Layers properties");
-      prefs->setLayers(styled_layers, styled_layers + number_of_styled_layers);
-      prefs->resize(300, 200);
-
-      connect(prefs, SIGNAL(changed()),
-	      widget, SLOT(redraw()));
-
-      // --- TOOLBARS ---
-
-      // Actions: bouding box and mesh
-      QToolBar *toolBarActions = new QToolBar("Actions", this);
-      QPushButton *pbBounding =
-        new QPushButton("Insert bounding box", toolBarActions);
-      connect(pbBounding, SIGNAL(clicked()), this,
-              SLOT(insert_bounding_box()));
-
-      QPushButton *pbMesh =
-        new QPushButton("Mesh", toolBarActions);
-      connect(pbMesh, SIGNAL(clicked()), this, SLOT(refineMesh()));
-
-      QPushButton *pbConform =
-        new QPushButton("Conform", toolBarActions);
-      connect(pbConform, SIGNAL(clicked()), this,
-              SLOT(conformMesh()));
-
-      QPushButton *pbAdvanced =
-        new QPushButton("Advanced", toolBarActions);
-      pbAdvanced->setToggleButton(true);
-      pbAdvanced->setOn(false);
-      connect(pbAdvanced, SIGNAL(stateChanged(int)),
-              this, SLOT(advanced(int)));
-
-      // Inputs: polygons or points
-      QToolBar *toolbarInputs = new QToolBar("Inputs",this);
-      QButtonGroup *bgChooseInputs =
-        new QButtonGroup("Choose inputs type", 0,
-                         "InputType");
-      bgChooseInputs->setExclusive(true);
-      QToolButton *pbPolygon =
-        new QToolButton(QPixmap( (const char**)polygon_xpm ),
-                        "Polygon", "Insert polygonal constraints",
-                        this, SLOT(fake_slot()),
-                        toolbarInputs, "polygon");
-      QToolButton *pbPoint =
-        new QToolButton(QPixmap( (const char**)point_xpm ),
-                        "Point", "Insert points",
-                        this, SLOT(fake_slot()),
-                        toolbarInputs, "point");
-      QToolButton *pbSeed =
-        new QToolButton(QPixmap( (const char**)marked_xpm ),
-                        "Seed", "Insert a seed to define a region to mesh",
-                        this, SLOT(fake_slot()),
-                        toolbarInputs, "seed");
-
-      pbPoint->setToggleButton(true);
-      pbPolygon->setToggleButton(true);
-      pbSeed->setToggleButton(true);
-      bgChooseInputs->insert(pbPoint);
-      bgChooseInputs->insert(pbPolygon);
-      bgChooseInputs->insert(pbSeed);
-
-      connect(pbPoint, SIGNAL(stateChanged(int)),
-              get_point, SLOT(stateChanged(int)));
-      connect(pbPolygon, SIGNAL(stateChanged(int)),
-              get_polygon, SLOT(stateChanged(int)));
-      connect(pbSeed, SIGNAL(stateChanged(int)),
-              get_seed, SLOT(stateChanged(int)));
-
-      pbPolygon->setOn(true);
-
-      // Layers: points, edges, constrained edges
-      QToolBar *toolbarLayers = new QToolBar("Layers",this);
-
-      QToolButton *pbShowPoints
-        = new QToolButton(QPixmap( (const char**)points_xpm ),
-                          "Show points", "Display mesh vertices",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers, "show points");
-      pbShowPoints->setToggleButton(true);
-      pbShowPoints->setOn(true);
-      connect(pbShowPoints, SIGNAL(stateChanged(int)),
-              show_points, SLOT(stateChanged(int)));
-
-      QToolButton *pbShowSeeds
-        = new QToolButton(QPixmap( (const char**)seeds_xpm ),
-                          "Show seeds", "Display seeds that define the "
-                          "region not to mesh",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers, "show points");
-      pbShowSeeds->setToggleButton(true);
-      pbShowSeeds->setOn(true);
-      connect(pbShowSeeds, SIGNAL(stateChanged(int)),
-              show_seeds, SLOT(stateChanged(int)));
-
-      QToolButton *pbShowTriangulation
-        = new QToolButton(QPixmap( (const char**)triangulation_xpm ),
-                          "Show triangulation", "Display mesh edges",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers,
-                          "show triangulation");
-      pbShowTriangulation->setToggleButton(true);
-      pbShowTriangulation->setOn(true);
-      connect(pbShowTriangulation, SIGNAL(stateChanged(int)),
-              show_triangulation, SLOT(stateChanged(int)));
-
-      QToolButton *pbShowConstraints
-        = new QToolButton(QPixmap( (const char**)contraints_xpm ),
-                          "Show constraints", "Display mesh constraints edges",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers,
-                          "show constraints");
-      pbShowConstraints->setToggleButton(true);
-      pbShowConstraints->setOn(true);
-      connect(pbShowConstraints, SIGNAL(stateChanged(int)),
-              show_constraints, SLOT(stateChanged(int)));
-
-      QToolButton *pbShowInDomain
-        = new QToolButton(QPixmap( (const char**)marked_xpm ),
-                          "Show faces in domain",
-                          "Display faces that will be refined",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers,
-                          "show in domain");
-      pbShowInDomain->setToggleButton(true);
-      pbShowInDomain->setOn(true);
-      connect(pbShowInDomain, SIGNAL(stateChanged(int)),
-              show_in_domain, SLOT(stateChanged(int)));
-
-      QToolButton *pbShowCircles
-        = new QToolButton(QPixmap( (const char**)circle_xpm ),
-                          "Show circles", "Display circumcircles of faces",
-                          this, SLOT(fake_slot()),
-                          toolbarLayers,
-                          "show circles");
-      pbShowCircles->setToggleButton(true);
-      connect(pbShowCircles, SIGNAL(stateChanged(int)),
-              show_circles, SLOT(stateChanged(int)));
-
-      bgChooseInputs->insert(pbShowCircles);
-
-      // button group trick to connect to widget->redraw() slot
-      QButtonGroup *bgLayers =
-        new QButtonGroup("Layers", 0, "layers");
-      bgLayers->insert(pbShowPoints);
-      bgLayers->insert(pbShowInDomain);
-      bgLayers->insert(pbShowTriangulation);
-      bgLayers->insert(pbShowConstraints);
-      bgLayers->insert(pbShowSeeds);
-      //      bgLayers->insert(pbShowCircles);
-      connect(bgLayers, SIGNAL(clicked(int)),
-              widget, SLOT(redraw()));
-
-      // the standard toolbar
-      CGAL::Qt_widget_standard_toolbar *std_toolbar =
-        new CGAL::Qt_widget_standard_toolbar(widget, this);
-      this->addToolBar(std_toolbar->toolbar(), Top, FALSE);
-
-      // Steps actions: step by step meshing operations
-      toolBarAdvanced = new QToolBar("Advanced operations",this);
-      toolBarAdvanced->hide();
-
-      pbMeshStep =
-        new QPushButton("Mesh 1 step", toolBarAdvanced);
-      connect(pbMeshStep, SIGNAL(clicked()), this,
-              SLOT(refineMeshStep()));
-
-      QSpinBox *sbStepLength =
-        new QSpinBox(1, INT_MAX, 1, toolBarAdvanced);
-      sbStepLength->setValue(1);
-      step_length = 1;
-      connect(sbStepLength, SIGNAL(valueChanged(int)),
-              this, SLOT(updateStepLength(int)));
-
-      timer = new QTimer(this);
-      connect(timer, SIGNAL(timeout()),
-              this, SLOT(refineMeshStep()));
-
-      pbMeshTimer = new QPushButton("Auto step", toolBarAdvanced);
-      pbMeshTimer->setToggleButton(true);
-      connect(pbMeshTimer, SIGNAL(stateChanged(int)),
-              this, SLOT(updateTimer(int)));
-
-      QSpinBox *sbTimerInterval =
-        new QSpinBox(0, INT_MAX, 10, toolBarAdvanced);
-      sbTimerInterval->setValue(1000);
-      sbTimerInterval->setSuffix("ms");
-      timer_interval=1000;
-      connect(sbTimerInterval, SIGNAL(valueChanged(int)),
-              this, SLOT(updateTimerInterval(int)));
-
-      pbShowCluster = new QPushButton("Show clusters", toolBarAdvanced);
-      pbShowCluster->setToggleButton(true);
-      pbShowCluster->setEnabled(false);
-      connect(pbShowCluster, SIGNAL(stateChanged(int)),
-              show_clusters, SLOT(stateChanged(int)));
-      connect(pbShowCluster, SIGNAL(stateChanged(int)),
-              widget, SLOT(redraw()));
-
-      pbShowEncroachedEdges = new QPushButton("Show encroached edges",
-                                              toolBarAdvanced);
-      pbShowEncroachedEdges->setToggleButton(true);
-      pbShowEncroachedEdges->setEnabled(false);
-      connect(pbShowEncroachedEdges, SIGNAL(stateChanged(int)),
-              show_encroached_edges, SLOT(stateChanged(int)));
-      connect(pbShowEncroachedEdges, SIGNAL(stateChanged(int)),
-              widget, SLOT(redraw()));
-
-      pbShowBadFaces = new QPushButton("Show bad faces",
-                                       toolBarAdvanced);
-      pbShowBadFaces->setToggleButton(true);
-      pbShowBadFaces->setEnabled(false);
-      connect(pbShowBadFaces, SIGNAL(stateChanged(int)),
-              show_bad_faces, SLOT(stateChanged(int)));
-      connect(pbShowBadFaces, SIGNAL(stateChanged(int)),
-              widget, SLOT(redraw()));
-
-      setUsesBigPixmaps(true);
-
-      // --- MENUS ---
-      QPopupMenu *pmMesh = new QPopupMenu(this);
-      menuBar()->insertItem("&File", pmMesh);
-      pmMesh->insertItem("&Refine mesh", this, SLOT(refineMesh()),
-                         CTRL+Key_R );
-      pmMesh->insertItem("&Clear mesh", this, SLOT(clearMesh()),
-                         CTRL+Key_C );
-      pmMesh->insertItem("Clear seeds", this, SLOT(clearSeeds()));
-      pmMesh->insertItem("&Open constrained triangulation...", this,
-                         SLOT(openTriangulation()),
-                         CTRL+Key_O );
-      pmMesh->insertItem("&Save constrained edges...", this,
-                         SLOT(saveTriangulation()),
-                         CTRL+Key_S );
-      pmMesh->insertItem("&Quit", qApp, SLOT(closeAllWindows()),
-                         CTRL+Key_Q );
-
-      connect(this, SIGNAL(insertedInput()),
-              this, SLOT(after_inserted_input()));
-      connect(this, SIGNAL(initializedMesher()),
-              this, SLOT(after_initialized_mesher()));
-
-      QPopupMenu *pmOptions = new QPopupMenu(this);
-      menuBar()->insertItem("&Options", pmOptions);
-      pmOptions->insertItem("Set &layer properties...", this,
-                            SLOT(displayPreferences()));
-      pmOptions->setCheckable(true);
-
-      widget->set_window(-1.,1.,-1.,1.);
-      widget->setMouseTracking(TRUE);
-    };
-
-  // compute bounds of the mesh
-  void bounds(FT &xmin, FT &ymin,
-              FT &xmax, FT &ymax)
-    {
-      Tr::Finite_vertices_iterator vi=cdt.finite_vertices_begin();
-      xmin=xmax=vi->point().x();
-      ymin=ymax=vi->point().y();
-      vi++;
-      while(vi != cdt.finite_vertices_end())
-        {
-          if(vi->point().x() < xmin) xmin=vi->point().x();
-          if(vi->point().x() > xmax) xmax=vi->point().x();
-          if(vi->point().y() < ymin) ymin=vi->point().y();
-          if(vi->point().y() > ymax) ymax=vi->point().y();
-          vi++;
-        }
-    }
-
-signals:
-  void insertedInput();
-  void initializedMesher();
-
-private slots:
-  void after_initialized_mesher()
-  {
-    updatePointCounter();
-    if( mesher !=0 )
-      {
-        init_status->setText("yes");
-        pbShowCluster->setEnabled(true);
-        pbShowEncroachedEdges->setEnabled(true);
-        pbShowBadFaces->setEnabled(true);
-      }
-    else
-      {
-        init_status->setText("no");
-        pbShowCluster->setOn(false);
-        pbShowCluster->setEnabled(false);
-        pbShowEncroachedEdges->setOn(false);
-        pbShowEncroachedEdges->setEnabled(false);
-        pbShowBadFaces->setOn(false);
-        pbShowBadFaces->setEnabled(false);
-      }
-    show_clusters->change_mesher(mesher);
-    show_encroached_edges->set_container(mesher);
-    show_bad_faces->set_container(mesher);
-    debug_layer->set_container(mesher);
-  }
-
-  void after_inserted_input()
-  {
-    delete mesher;
-    mesher = 0;
-    emit initializedMesher();
-    mark_facets();
-    nb_of_clusters_has_to_be_updated = true;
-  }
-
-  void mark_facets()
-  {
-    Mesher::mark_facets(cdt, seeds.begin(), seeds.end());
-  }
-
-  void displayPreferences()
-  {
-    prefs->show();
-  }
-
-
-public slots:
-
-  void get_cgal_object(CGAL::Object obj)
-    {
-      Point_2 p;
-      CGALPolygon poly;
-
-      if(CGAL::assign(p,obj))
-        if(follow_mouse->is_active())
-          {
-            typedef Tr::Face_handle Face_handle;
-            Face_handle fh = cdt.locate(p);
-            std::vector<Face_handle> faces_to_check;
-
-            if(cdt.is_infinite(fh) && !follow_mouse->just_entered)
-            { // make the line walk in opposite direction, if p is outside
-              // the triangulation
-              fh = cdt.locate(follow_mouse->previous_point);
-              std::swap(follow_mouse->previous_point, p);
-            }
-
-            if(cdt.is_infinite(fh)) return;
-            Segment_2 segment;
-            if(follow_mouse->just_entered)
-            {
-              faces_to_check.push_back(fh);
-              segment = Segment_2(p, p);
-            }
-            else
-            {
-              const Point_2& previous_point = follow_mouse->previous_point;
-              Tr::Line_face_circulator 
-                fc = cdt.line_walk(p,
-                                   previous_point,
-                                   fh),
-                end(fc);
-              do
-              {
-                faces_to_check.push_back(fc);
-                ++fc;
-              } while(!cdt.is_infinite(fc) &&
-                      cdt.triangle(fc).has_on_unbounded_side(previous_point));
-
-              segment = Segment_2(p, follow_mouse->previous_point);
-            }
-
-            criteria.set_local_size(true);
-            criteria.set_segment(segment);
-
-            std::vector<Face_handle> bad_faces;
-
-            for(std::vector<Face_handle>::const_iterator 
-                  fh_it = faces_to_check.begin(),
-                  end = faces_to_check.end();
-                fh_it != end; ++fh_it)
-            {
-              if( (*fh_it != NULL) && (!cdt.is_infinite(*fh_it)) && (*fh_it)->is_in_domain() )
-              {
-                Criteria::Quality q;
-                if(criteria.is_bad_object().operator()(*fh_it, q) !=
-                   CGAL::Mesh_2::NOT_BAD)
-                  bad_faces.push_back(*fh_it);
-              }
-            }
-
-            if( mesher!=0 )
-            {
-              mesher->set_criteria(criteria, false);
-              mesher->set_bad_faces(bad_faces.begin(), bad_faces.end());
-              while( mesher->step_by_step_refine_mesh() );
-            }
-          }
-        else
-          if(get_seed->is_active())
-            {
-              seeds.push_back(p);
-              mark_facets();
-            }
-          else // get_point is active
-            {
-              cdt.insert(p);
-              emit( insertedInput() );
-            }
-      else
-        if (CGAL::assign(poly,obj))
-          {
-            for(CGALPolygon::Edge_const_iterator it=poly.edges_begin();
-                it!=poly.edges_end();
-                it++)
-              cdt.insert((*it).source(),(*it).target());
-            emit( insertedInput() );
-          }
-        else // obj should be a polygon or a point!
-          CGAL_error();
-      updatePointCounter();
-      widget->redraw();
-    }
-
-  //insert a bounding box around the mesh
-  void insert_bounding_box()
-    {
-      FT xmin, xmax, ymin, ymax;
-      bounds(xmin, ymin, xmax, ymax);
-
-      FT xcenter=(xmin+xmax)/2,
-        ycenter=(ymin+ymax)/2;
-      FT xspan = (xmax-xmin)/2,
-        yspan = (ymax-ymin)/2;
-
-      Point_2 bb1(xcenter - FT(1.5)*xspan, ycenter - FT(1.5)*yspan);
-      Point_2 bb2(xcenter + FT(1.5)*xspan, ycenter - FT(1.5)*yspan);
-      Point_2 bb3(xcenter + FT(1.5)*xspan, ycenter + FT(1.5)*yspan);
-      Point_2 bb4(xcenter - FT(1.5)*xspan, ycenter + FT(1.5)*yspan);
-      cdt.insert(bb1);
-      cdt.insert(bb2);
-      cdt.insert(bb3);
-      cdt.insert(bb4);
-      cdt.insert(bb1, bb2);
-      cdt.insert(bb2, bb3);
-      cdt.insert(bb3, bb4);
-      cdt.insert(bb4, bb1);
-      emit( insertedInput() );
-      widget->redraw();
-    }
-
-  void updatePointCounter()
-    {
-      nb_of_points->setNum(static_cast<int>(cdt.number_of_vertices()));
-      if(nb_of_clusters_has_to_be_updated &&
-         mesher != 0)
-        {
-          nb_of_clusters_has_to_be_updated = false;
-          nb_of_clusters->setNum(mesher->clusters().size());
-        }
-    }
-
-  void refineMesh()
-    {
-      dumpTriangulation("last_input.edg");
-      if( mesher == 0 )
-        mesher = create_mesher();
-      mesher->refine_mesh();
-      emit initializedMesher();
-      widget->redraw();
-    }
-
-  void conformMesh()
-    {
-      dumpTriangulation("last_input.edg");
-      CGAL::make_conforming_Gabriel_2(cdt);
-      mark_facets();
-      delete mesher;
-      mesher = 0;
-      emit initializedMesher();
-      updatePointCounter();
-      widget->redraw();
-    }
-
-  void refineMeshStep()
-    {
-      int counter = step_length;
-      if(mesher == 0)
-        {
-          mesher = create_mesher();
-          mesher->init();
-          emit initializedMesher();
-          dumpTriangulation("last_input.edg");
-        }
-      while(counter>0)
-        {
-          --counter;
-          if(!mesher->try_one_step_refine_mesh())
-            {
-              pbMeshTimer->setOn(false);
-              counter = 0;
-            }
-        }
-      updatePointCounter();
-      widget->redraw();
-    }
-
-  void updateTimer(int i)
-    {
-      if(i==0)
-        timer->stop();
-      else
-        timer->start(timer_interval);
-    }
-
-  void updateStepLength(int i)
-    {
-      step_length = i;
-      QString s;
-      s = "Mesh " + QString::number(i) + " step";
-      if(i > 1)
-        s+="s";
-      pbMeshStep->setText(s);
-    }
-
-  void updateTimerInterval(int i)
-    {
-      timer_interval=i;
-      if(timer->isActive())
-        timer->changeInterval(timer_interval);
-    }
-
-  void clearMesh()
-    {
-      cdt.clear();
-      emit( insertedInput() );
-      updatePointCounter();
-      widget->clear_history();
-      widget->redraw();
-    }
-
-  void clearSeeds_without_redraw()
-    {
-      seeds.clear();
-      delete mesher;
-      mesher = 0;
-      emit initializedMesher();
-      mark_facets();
-    }
-
-  void clearSeeds()
-    {
-      clearSeeds_without_redraw();
-      widget->redraw();
-    }
-
-  void openTriangulation() { openTriangulation(QString()); }
-
-  void openTriangulation(QString filename)
-    {
-      QString s;
-      if( filename.isEmpty() )
-        s = QFileDialog::getOpenFileName( QString::null,
-                                          my_filters, this );
-      else
-        s = filename;
-
-      if ( s.isEmpty() )
-        return;
-      std::ifstream f(s.ascii());
-      if (!f) return;
-
-      if(s.right(5) == ".poly")
-        {
-          clearSeeds_without_redraw();
-          CGAL::read_triangle_poly_file(cdt, f, std::back_inserter(seeds));
-        }
-      else if(s.right(5) == ".data")
-        {
-          int nx, ny, niso, use_threshold;
-          float threshold;
-
-          std::ifstream ins(s.ascii());
-          ins >> nx >> ny >> niso >> use_threshold >> threshold;
-          for(int c = 0; c < niso; c++) {
-            float f;
-            ins >> f;
-          }
-
-          std::vector<Point_2> points(nx * ny);
-          double xmin,xmax,ymin,ymax;
-          ins >> xmin >> xmax >> ymin >> ymax;
-
-          double dx = (xmax-xmin)/(nx-1);
-          double dy = (ymax-ymin)/(ny-1);
-
-          int k2=0;
-          for (int i2=0; i2<nx; i2++) {
-            for (int j=0; j<ny; j++) {
-              points[k2] = Point_2(xmin + i2*dx,  ymin + j*dy);
-              k2++;
-            }
-          }
-
-          std::random_shuffle(points.begin(), points.end());
-          cdt.clear();
-          //      std::copy(points.begin(), points.end(), std::back_inserter(*mesh));
-
-          s.replace(QRegExp("\\.data$"), "_fault.data");
-
-          std::ifstream ins2(s.ascii());
-          int num_lines;
-          ins2 >> num_lines;
-          std::vector<int> num_vertex_per_line(num_lines);
-          for(int n = 0; n < num_lines; n++){
-            ins2 >> num_vertex_per_line[n];
-          }
-
-          CGAL::Bbox_2 b;
-          for(int i = 0; i < num_lines; i++){
-            Point_2 p, q;
-            ins2 >> p;
-            if(i == 0){
-              b = p.bbox();
-            } else {
-              b = b + p.bbox();
-            }
-            for(int j = 1; j < num_vertex_per_line[i]; j++){
-              ins2 >> q;
-              cdt.insert_constraint(p, q);
-              p = q;
-              b = b + p.bbox();
-            }
-          }
-
-          for(unsigned int k = 0; k < points.size(); k++)
-            if (CGAL::do_overlap(b,points[k].bbox()))
-              cdt.insert(points[k]);
-
-          xmax = b.xmax();
-          xmin = b.xmin();
-          ymax = b.ymax();
-          ymin = b.ymin();
-
-          dx = (xmax - xmin)/20.0;
-          dy = (ymax - ymin)/20.0;
-          xmin -= dx;
-          ymin -= dy;
-          xmax += dx;
-          ymax += dy;
-          Point_2 bl(xmin, ymin);
-          Point_2 br(xmax, ymin);
-          Point_2 tl(xmin, ymax);
-          Point_2 tr(xmax, ymax);
-          cdt.insert_constraint(bl, br);
-          cdt.insert_constraint(br, tr);
-          cdt.insert_constraint(tr, tl);
-          cdt.insert_constraint(tl, bl);
-
-          clearSeeds_without_redraw();
-        }
-      else
-        {
-          read_constraints(cdt, f);
-          clearSeeds_without_redraw();
-        }
-
-      // compute bounds
-      FT xmin, xmax, ymin, ymax;
-      bounds(xmin, ymin, xmax, ymax);
-
-      FT xspan = (xmax-xmin)/2,
-        yspan = (ymax-ymin)/2;
-
-      widget->set_window(CGAL::to_double(xmin-FT(1.1)*xspan),
-                         CGAL::to_double(xmax+FT(1.1)*xspan),
-                         CGAL::to_double(ymin-FT(1.1)*yspan),
-                         CGAL::to_double(ymax+FT(1.1)*yspan));
-      widget->clear_history();
-
-      emit( insertedInput() );
-      updatePointCounter();
-      // widget->set_window() calls widget->redraw()
-      //      widget->redraw();
-    }
-
-  void saveTriangulation()
-    {
-      QString s( QFileDialog::getSaveFileName( "filename.edg",
-                                               my_filters, this ) );
-      if ( s.isEmpty() )
-        return;
-      std::ofstream of(s.ascii());
-      if(s.right(5) == ".poly")
-        CGAL::write_triangle_poly_file(cdt, of, seeds.begin(), seeds.end());
-      else
-        write_constraints(cdt, of);
-    }
-
-  void dumpTriangulation(QString s=QString("dump.edg"))
-    {
-      std::ofstream of(s.ascii());
-      write_constraints(cdt, of);
-    }
-
-  inline
-  void fake_slot()
-    {
-    }
-
-  void setBound(const QString& bound)
-    {
-      criteria.set_bound(bound.toDouble());
-      if( mesher != 0 )
-        mesher->set_criteria(criteria);
-    }
-
-  void setSizeBound(const QString& size_bound)
-    {
-      criteria.set_size_bound(size_bound.toDouble());
-      if ( mesher != 0 )
-        mesher->set_criteria(criteria);
-    }
-
-  void setLocal(bool checked)
-    {
-      if( mesher == 0 )
-        {
-          mesher = create_mesher();
-          mesher->init();
-          emit initializedMesher();
-        }
-      if(checked == false)
-      {
-        criteria.set_local_size(false);
-        mesher->set_criteria(criteria);
-      }
-      if(checked)
-        follow_mouse->activate();
-      else
-        follow_mouse->deactivate();
-    }
-
-  void advanced(int state)
-  {
-    if( state == 0 )
-      toolBarAdvanced->hide();
-    else
-      toolBarAdvanced->show();
-  }
-
-private:
-  Mesher* create_mesher()
-  {
-    Mesher* m = new Mesher(cdt, criteria);
-    m->set_seeds(seeds.begin(), seeds.end());
-    return m;
-  }
-
-private:
-  static const QString my_filters;
-  Criteria criteria;
-  Tr cdt;
-  Mesher* mesher;
-  Seeds seeds;
-
-  Preferences* prefs;
-  QPopupMenu *pmCriteria;
-  int menu_id;
-
-  CGAL::Qt_widget* widget;
-  CGAL::Qt_widget_get_point<K>* get_point;
-  CGAL::Qt_widget_get_point<K>* get_seed;
-  CGAL::Qt_widget_get_polygon<CGALPolygon>* get_polygon;
-  Follow_mouse* follow_mouse;
-
-  typedef CGAL::Show_points<Tr,
-                            Tr::Finite_vertices_iterator,
-                            Vertex_to_point>
-    Show_points_from_triangulation;
-
-  typedef CGAL::Show_points<Seeds, Seeds::const_iterator>
-    Show_seeds;
-
-  typedef CGAL::Show_segments<Mesher,
-                              Mesher::Encroached_edges_const_iterator,
-                              Edge_to_segment>
-    Show_encroached_edges;
-
-  Show_points_from_triangulation* show_points;
-  Show_seeds* show_seeds;
-  Show_encroached_edges* show_encroached_edges;
-  Meshing_debugging_layer* debug_layer;
-  Show_bad_faces<Mesher>* show_bad_faces;
-  CGAL::Qt_layer_show_triangulation<Tr>* show_triangulation;
-  CGAL::Qt_layer_show_triangulation_constraints<Tr>* show_constraints;
-  CGAL::Qt_layer_show_circles<Tr>* show_circles;
-  CGAL::Qt_widget_show_mouse_coordinates* show_coordinates;
-  Show_in_domain_faces<Tr>* show_in_domain;
-
-  bool nb_of_clusters_has_to_be_updated;
-  QLabel *nb_of_clusters;
-  Show_clusters<Mesher>* show_clusters;
-
-  QLabel *nb_of_points;
-  QLabel *init_status;
-  QLineEdit* angle_bound;
-  QLineEdit* size_bound;
-  QCheckBox* under_mouse;
-  QTimer* timer;
-  QPushButton *pbMeshTimer;
-  QPushButton *pbMeshStep;
-  QPushButton* pbShowCluster;
-  QPushButton* pbShowEncroachedEdges;
-  QPushButton* pbShowBadFaces;
-  QToolBar *toolBarAdvanced;
-  int timer_interval;
-  int step_length;
-};
-
-const QString MyWindow::my_filters =
-"Constrained edges (*.edg);;"
-"Shewchuk Triangle .poly files (*.poly);;"
-"All files (*)";
-
-int main(int argc, char** argv)
-{
-  QApplication app( argc, argv );
-  MyWindow* W = new MyWindow();
-  app.setMainWidget(W);
-#if !defined (__POWERPC__)
-  QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm);
-  W->setIcon(cgal_icon);
-#endif
-  W->show();
-
-  if( argc == 2 )
-    W->openTriangulation(QString(argv[1]));
-
-  return app.exec();
-}
-
-// moc_source_file: mesh_2_demo.cpp
-#include "mesh_2_demo.moc"
-
-// moc_source_file: Show_clusters.h
-#include "Show_clusters.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/seeds.xpm b/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/seeds.xpm
deleted file mode 100644
index 36601fe..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/Qt3/seeds.xpm
+++ /dev/null
@@ -1,39 +0,0 @@
-/* XPM */
-const char * seeds_xpm[] = {
-"32 32 4 1",
-" 	c None",
-".	c #FF0000",
-"+	c #00FF00",
-"@	c #000000",
-"                ..++++++++++++++",
-"               ..+++++++++++++++",
-"              ..++++++++++++++++",
-"            ..++++++++++++++++++",
-"           ..+++++++++++++++++++",
-"          ..++++++++++++++++++++",
-"         ..++++++++++++ at ++++++++",
-"      @ ..++++++++++++ at +++++++++",
-"      ..++++++++++++@@++++++++++",
-"     ..@@++++++++++@@+++++++++++",
-"    ..+++ at +++++++++@++++++++++++",
-"   ..+++++@@+++++@@+++++++++++++",
-" ..++++++++@@+++@@++++++++++++++",
-"..++++++++++@@+@@+++++++++++++++",
-".++++++++++++@@@++++++++++++++++",
-"+++++++++++++@@@++++++++++++++++",
-"++++++++++++@@+@@+++++++++++++++",
-"+++++++++++@@+++@@@+++++++++++++",
-"++++++++++@@++++++@@++++++++++++",
-"+++++++++@@++++++++@@+++++++++++",
-"++++++++@@++++++++++@@++++++++++",
-"+++++++@@++++++++++++@@+++++++++",
-"++++++@@++++++++++++++@@++++++++",
-"..+++++++++++++++++++++@@+++++++",
-" .....++++++++++++++++++++++++++",
-"     ....+++++++++++++++++++++++",
-"        ....++++++++++++++++++++",
-"            ...+++++++++++++++++",
-"               ....+++++++++++++",
-"                  ....++++++++++",
-"                     ....+++++++",
-"                         ....+++"};
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/README.txt b/3rdparty/CGAL-4.6/demo/Mesh_2/README.txt
deleted file mode 100644
index 2e91b85..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_2/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory contains non-graphical demos of the 2D Mesh Generator
-package. An old Qt3-based demos lies in the qt3/ sub-directory. The
-Constrained Delaunay triangulation Qt4 demos has a 2D meshing feature that
-demonstrates the  2D Mesh Generator package. See in the directory
-demo/Triangulation_2/ of the CGAL tarball.
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/C3t3_type.h b/3rdparty/CGAL-4.6/demo/Mesh_3/C3t3_type.h
deleted file mode 100644
index ba952fb..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/C3t3_type.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef CGAL_DEMO_MESH_3_C3T3_TYPE_H
-#define CGAL_DEMO_MESH_3_C3T3_TYPE_H
-
-#include "Polyhedron_type.h"
-#include "Image_type.h"
-#include "implicit_functions/Implicit_function_interface.h"
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-
-#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
-#include <CGAL/Polyhedral_mesh_domain_3.h>
-#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/tags.h>
-
-template <typename K>
-struct Wrapper
-{
-  typedef int return_type;
-  typedef typename K::Point_3 Point_3;
-  
-  Wrapper(const Implicit_function_interface& f) : f_(f) {}
-  return_type operator()(const Point_3& p, const bool=true) const
-  {
-    return (f_(p.x(),p.y(),p.z()) < 0) ? 1 : 0;
-  }
-  
-private:
-  const Implicit_function_interface& f_;
-};
-
-
-typedef CGAL::Triangle_accessor_3<Polyhedron, Kernel> T_accessor;
-
-typedef CGAL::Polyhedral_mesh_domain_with_features_3<Kernel,
-                                                     Polyhedron,
-                                                     T_accessor,
-                                                     CGAL::Tag_false>
-                                                                        Polyhedral_mesh_domain;
-// The last `Tag_false` says the Patch_id type will be pair<int,int>, like
-// the `Image_mesh_domain`, and `Function_mesh_domain`.
-
-typedef CGAL::Labeled_image_mesh_domain_3<Image,Kernel>                 Image_mesh_domain;
-typedef Wrapper<Kernel>                                                 Function_wrapper;
-typedef CGAL::Labeled_mesh_domain_3<Function_wrapper, Kernel>           Function_mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain, 
-                                     CGAL::Kernel_traits<Polyhedral_mesh_domain>::Kernel,
-                                     CGAL::Parallel_tag>::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// 3D complex
-
-#endif // CGAL_DEMO_MESH_3_C3T3_TYPE_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Mesh_3/CMakeLists.txt
deleted file mode 100644
index 96f5d56..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/CMakeLists.txt
+++ /dev/null
@@ -1,411 +0,0 @@
-# This is the CMake script for compiling the CGAL Mesh_3 demo.
-
-project( Mesh_3_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Compatibility with CMake 3.0
-if(POLICY CMP0042)
-  # Do not enable the use of MACOSX_RPATH
-  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
-  cmake_policy(SET CMP0042 OLD)
-endif()
-
-# Creates a new CMake option, turned ON by default
-option(ACTIVATE_MSVC_PRECOMPILED_HEADERS
-  "Activate precompiled headers in MSVC"
-  OFF)
-
-# Macro to add precompiled headers for MSVC
-# This function does two things:
-# 1. Enable precompiled headers on each file which is listed in "SourcesVar".
-# 2. Add the content of "PrecompiledSource" (e.g. "StdAfx.cpp") to "SourcesVar".
-MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
-  IF(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS)
-    GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
-    SET(Sources ${${SourcesVar}})
-
-    SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
-                                PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\"")
-    SET_SOURCE_FILES_PROPERTIES(${Sources}
-                                PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeader}\"")
-    # Add precompiled header to SourcesVar
-    LIST(APPEND ${SourcesVar} ${PrecompiledSource})
-  ENDIF(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS)
-ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)
-# The compiler might need more memory because of precompiled headers
-if(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS AND NOT(MSVC_VERSION LESS 1310))
-  set(CGAL_C_FLAGS "${CGAL_C_FLAGS} /Zm1000")
-  set(CGAL_CXX_FLAGS "${CGAL_CXX_FLAGS} /Zm1000")
-endif()
-
-# Let plugins be compiled in the same directory as the executable.
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-
-#option(MESH_3_DEMO_ENABLE_FORWARD_DECL "In the Mesh_3 demo, enable " OFF)
-#mark_as_advanced(MESH_3_DEMO_ENABLE_FORWARD_DECL)
-
-# Include this package's headers first
-include_directories( BEFORE ./ ./include ../../include )
-
-# Disable deprecated Mesh_3 names
-add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-                -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS)
-
-# Add specific Find.cmake modules
-set(CMAKE_MODULE_PATH 
-  ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
-
-# Activate concurrency ? (turned OFF by default)
-option(ACTIVATE_CONCURRENT_MESH_3
-  "Activate parallelism in Mesh_3"
-  OFF)
-  
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4 ImageIO)
-include( ${CGAL_USE_FILE} )
-
-# And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
-if( ACTIVATE_CONCURRENT_MESH_3 )
-  add_definitions( -DCGAL_CONCURRENT_MESH_3 )
-  find_package( TBB REQUIRED )
-else( ACTIVATE_CONCURRENT_MESH_3 )
-  option( LINK_WITH_TBB
-    "Link with TBB anyway so we can use TBB timers for profiling"
-    ON)
-  if( LINK_WITH_TBB )
-    find_package( TBB )
-  endif( LINK_WITH_TBB )
-endif()
-
-if( TBB_FOUND )
-  include(${TBB_USE_FILE})
-endif()
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-# Find OpenGL
-find_package(OpenGL)
-
-# Find GLEW (for OpenGL-1.5 and OpenGL extensions)
-find_package(GLEW)
-
-# Find everybodies darling
-find_package(Boost COMPONENTS thread system)
-
-# Find QGLViewer
-if(QT4_FOUND)
-  include(${QT_USE_FILE})
-  find_package(QGLViewer )
-endif(QT4_FOUND)
-
-
-if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
-
-  # Add directory containing implicit function plugin source files
-  add_subdirectory("implicit_functions")
-
-  if(GLEW_FOUND)
-    include_directories ( ${GLEW_INCLUDE_DIR} )
-    add_definitions(-DSCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE)
-  else(GLEW_FOUND)
-    message(STATUS "NOTICE: GLEW library is not found. 3D images rendering will not be available.")
-  endif(GLEW_FOUND)
-
-
-  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
-
-  qt4_wrap_ui( UI_FILES ui_files/MainWindow.ui )
-  qt4_wrap_ui( meshingUI_FILES  ui_files/Meshing_dialog.ui)
-  qt4_wrap_ui( optimUI_FILES  ui_files/Smoother_dialog.ui ui_files/LocalOptim_dialog.ui)
-  qt4_wrap_ui( ribUI_FILES  ui_files/Rib_dialog.ui)
-  qt4_wrap_ui( funcUI_FILES  ui_files/Function_dialog.ui)
-  qt4_wrap_ui( imgUI_FILES ui_files/Image_res_dialog.ui)
-
-  include(AddFileDependencies)
-
-  # Shared demo files directory
-  set(DEMO_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/CGAL_demo")
-  set(DEMO_H_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/CGAL_demo")
-
-  qt4_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
-  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
-
-  qt4_generate_moc( "${DEMO_H_DIR}/Viewer.h" Viewer_moc.cpp )
-  add_file_dependencies( Viewer_moc.cpp "${DEMO_H_DIR}/Viewer.h" )
-
-  qt4_generate_moc( "${DEMO_H_DIR}/Scene.h" Scene_moc.cpp )
-  add_file_dependencies( Scene_moc.cpp "${DEMO_H_DIR}/Scene.h" )
-
-  qt4_generate_moc( "${DEMO_H_DIR}/Scene_item.h" Scene_item_moc.cpp )
-  add_file_dependencies( Scene_item_moc.cpp "${DEMO_H_DIR}/Scene_item.h" )
-
-  qt4_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_thread.h )
-  qt4_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h )
-
-  qt4_add_resources ( RESOURCE_FILES Mesh_3.qrc )
-
-  qt4_automoc( Scene_polyhedron_item.cpp )
-  qt4_automoc( Scene_polygon_soup.cpp )
-  qt4_automoc( Scene_segmented_image_item.cpp )
-  qt4_automoc( Scene_c3t3_item.cpp )
-  qt4_automoc( Scene_implicit_function_item.cpp )
-  qt4_automoc( Optimizer_thread.cpp )
-  qt4_automoc( Meshing_thread.cpp )
-  qt4_automoc( Volume_plane_intersection.cpp )
-
-  # put plugins (which are shared libraries) at the same location as
-  # executable files
-  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
-
-  # prefix for Mesh_3 libs to avoid conflicts with Polyhedron demo
-  set(MESH_3_LIB_PREFIX "mesh_3_demo_")
-
-  # AUXILIARY LIBRARIES
-  set(VIEWER_LIB "${MESH_3_LIB_PREFIX}viewer")
-  add_library(${VIEWER_LIB} SHARED
-    ${DEMO_SRC_DIR}/Viewer.cpp Viewer_moc.cpp)
-  target_link_libraries(${VIEWER_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARIES})
-  set_target_properties(${VIEWER_LIB} PROPERTIES DEFINE_SYMBOL viewer_EXPORTS)
-
-  set(SCENE_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_item")
-  add_library(${SCENE_ITEM_LIB} SHARED
-    ${DEMO_SRC_DIR}/Scene_item.cpp
-    Scene_item_moc.cpp
-    ${DEMO_SRC_DIR}/Scene_item_with_display_list.cpp
-    ${DEMO_SRC_DIR}/Plugin_helper.cpp)
-  set_target_properties(${SCENE_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_item_EXPORTS)
-  target_link_libraries(${SCENE_ITEM_LIB} ${QT_LIBRARIES} ${OPENGL_LIBRARIES})
-
-  set(SCENE_SEGMENTED_IMAGE_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_segmented_image_item")
-  add_library(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} SHARED
-    Scene_segmented_image_item.cpp Scene_segmented_image_item.moc)
-  target_link_libraries(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
-  set_target_properties(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_segmented_image_item_EXPORTS)
-
-  if(GLEW_FOUND)
-    target_link_libraries(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${GLEW_LIBRARIES})
-  endif()
-
-  set(SCENE_POLYHEDRON_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_polyhedron_item")
-  add_library(${SCENE_POLYHEDRON_ITEM_LIB} SHARED
-    Scene_polyhedron_item.cpp Scene_polyhedron_item.moc)
-  target_link_libraries(${SCENE_POLYHEDRON_ITEM_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
-  set_target_properties(${SCENE_POLYHEDRON_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_polyhedron_item_EXPORTS)
-
-  set(POLYGON_SOUP_LIB "${MESH_3_LIB_PREFIX}polygon_soup")
-  add_library(${POLYGON_SOUP_LIB} SHARED
-    Scene_polygon_soup.cpp Scene_polygon_soup.moc)
-  target_link_libraries(${POLYGON_SOUP_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
-  set_target_properties(${POLYGON_SOUP_LIB} PROPERTIES DEFINE_SYMBOL polygon_soup_EXPORTS)
-
-  set(SCENE_C3T3_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_c3t3_item")
-  set (SCENE_C3T3_ITEM_LIB_SOURCE_FILES Scene_c3t3_item.cpp)
-  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" SCENE_C3T3_ITEM_LIB_SOURCE_FILES)
-  LIST(APPEND SCENE_C3T3_ITEM_LIB_SOURCE_FILES Scene_c3t3_item.moc)
-  add_library(${SCENE_C3T3_ITEM_LIB} SHARED
-    ${SCENE_C3T3_ITEM_LIB_SOURCE_FILES})
-  target_link_libraries(${SCENE_C3T3_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES} ${TBB_LIBRARIES})
-  set_target_properties(${SCENE_C3T3_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_c3t3_item_EXPORTS)
-
-  set(SCENE_IMPLICIT_FUNCTION_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_implicit_function_item")
-  add_library(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} SHARED
-    Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
-  target_link_libraries(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${TBB_LIBRARIES})
-  set_target_properties(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_implicit_function_item_EXPORTS)
-
-  
-  add_definitions(-DUSE_FORWARD_DECL)
-  add_definitions(-DQT_STATICPLUGIN)
-    set (MESH_3_SOURCE_FILES 
-      MainWindow.cpp
-      Mesh_3.cpp
-      ${DEMO_SRC_DIR}/Scene.cpp
-      MainWindow_moc.cpp
-      Scene_moc.cpp)
-    #ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_SOURCE_FILES)
-    LIST(APPEND MESH_3_SOURCE_FILES ${UI_FILES} ${RESOURCE_FILES})
-    add_executable( Mesh_3 ${MESH_3_SOURCE_FILES} )
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_3 )
-
-  # Link with Qt libraries
-  target_link_libraries( Mesh_3 ${QT_LIBRARIES} )
-
-  # Link with CGAL
-  target_link_libraries( Mesh_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${TBB_LIBRARIES})
-
-  # Link with libQGLViewer, OpenGL
-  target_link_libraries( Mesh_3 ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-#  # Link with the scene_item library.
-#  target_link_libraries( Mesh_3 scene_item )
-
-  target_link_libraries( Mesh_3 ${VIEWER_LIB} )
-
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_3 )
-
-
-  ###########
-  # PLUGINS #
-  ###########
-  remove_definitions(-DQT_STATICPLUGIN)
-
-  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
-  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
-    list_split(option ARGN_TAIL ${ARGN} )
-    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
-      set(other_sources ${ARGN})
-      set(option "")
-    else()
-      set(other_sources ${ARGN_TAIL})
-    endif()
-    qt4_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
-    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
-
-    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
-    # Link with Qt
-    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
-    # Link with scene_item
-    target_link_libraries( ${plugin_name} ${SCENE_ITEM_LIB})
-    # Link with CGAL
-    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${TBB_LIBRARIES})
-  endmacro(polyhedron_demo_plugin)
-
-  set(IO_IMAGE_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_image_plugin")
-  polyhedron_demo_plugin(${IO_IMAGE_PLUGIN_LIB} Io_image_plugin ${imgUI_FILES})
-  target_link_libraries(${IO_IMAGE_PLUGIN_LIB} ${SCENE_SEGMENTED_IMAGE_ITEM_LIB})
-
-  if(GLEW_FOUND)
-    target_link_libraries(${IO_IMAGE_PLUGIN_LIB} ${GLEW_LIBRARIES})
-  endif()
-
-  set(IO_OFF_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_off_plugin")
-  polyhedron_demo_plugin(${IO_OFF_PLUGIN_LIB} Io_off_plugin)
-  target_link_libraries(${IO_OFF_PLUGIN_LIB} ${SCENE_POLYHEDRON_ITEM_LIB} ${POLYGON_SOUP_LIB})
-
-  if(GLEW_FOUND)
-    set(VOLUME_PLANES_PLUGIN_LIB "${MESH_3_LIB_PREFIX}volume_planes_plugin")
-    polyhedron_demo_plugin(${VOLUME_PLANES_PLUGIN_LIB} Volume_planes_plugin
-                           ${VOLUME_MOC_OUTFILES}
-                           Volume_plane_intersection.cpp)                      
-    target_link_libraries(${VOLUME_PLANES_PLUGIN_LIB} ${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${VIEWER_LIB})
-  else()
-    message(STATUS "NOTICE: The Volume_plane plugin requires GLEW and will not be compiled.")
-  endif()
-
-  set(IO_C3T3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_c3t3_plugin")
-  polyhedron_demo_plugin(${IO_C3T3_PLUGIN_LIB} Io_c3t3_plugin)
-  target_link_libraries(${IO_C3T3_PLUGIN_LIB} ${SCENE_C3T3_ITEM_LIB})
-
-  if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/c3t3_rib_exporter_plugin.cpp" )
-    set(C3T3_RIB_EXPORTER_PLUGIN_LIB "${MESH_3_LIB_PREFIX}c3t3_rib_exporter_plugin")
-    polyhedron_demo_plugin(${C3T3_RIB_EXPORTER_PLUGIN_LIB} C3t3_rib_exporter_plugin ${ribUI_FILES})
-    target_link_libraries(${C3T3_RIB_EXPORTER_PLUGIN_LIB} ${SCENE_C3T3_ITEM_LIB} ${VIEWER_LIB})
-  endif()
-
-  set(IO_IMPLICIT_FUNCTION_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_implicit_function_plugin")
-  polyhedron_demo_plugin(${IO_IMPLICIT_FUNCTION_PLUGIN_LIB} Io_implicit_function_plugin ${funcUI_FILES})
-  target_link_libraries(${IO_IMPLICIT_FUNCTION_PLUGIN_LIB} ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB})
-
-  set(MESH_3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_plugin") 
-  set(MESH_3_PLUGIN_SOURCE_FILES
-    Mesh_3_plugin.cpp
-    Mesh_3_plugin_polyhedron_cgal_code.cpp
-    Mesh_3_plugin_image_cgal_code.cpp
-    Mesh_3_plugin_implicit_function_cgal_code.cpp
-    Meshing_thread.cpp)
-  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_PLUGIN_SOURCE_FILES)
-  LIST(REMOVE_AT MESH_3_PLUGIN_SOURCE_FILES 0) # Remove Mesh_3_plugin.cpp since it's added by polyhedron_demo_plugin
-  LIST(APPEND MESH_3_PLUGIN_SOURCE_FILES "Scene_c3t3_item.moc" ${meshingUI_FILES})
-  polyhedron_demo_plugin(${MESH_3_PLUGIN_LIB} Mesh_3_plugin ${MESH_3_PLUGIN_SOURCE_FILES})
-
-#  set(MESH_3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_plugin") 
-#  polyhedron_demo_plugin(${MESH_3_PLUGIN_LIB} Mesh_3_plugin 
-#                         Mesh_3_plugin_polyhedron_cgal_code.cpp
-#                         Mesh_3_plugin_image_cgal_code.cpp
-#                         Mesh_3_plugin_implicit_function_cgal_code.cpp
-#                         Meshing_thread.cpp
-#                         Scene_c3t3_item.moc
-#                         ${meshingUI_FILES})
-
-  target_link_libraries(${MESH_3_PLUGIN_LIB}
-                        ${SCENE_C3T3_ITEM_LIB}
-                        ${SCENE_POLYHEDRON_ITEM_LIB}
-                        ${SCENE_SEGMENTED_IMAGE_ITEM_LIB}
-                        ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB}
-                        ${QGLVIEWER_LIBRARIES}
-                        ${OPENGL_gl_LIBRARY}
-                        ${OPENGL_glu_LIBRARY}
-                        ${TBB_LIBRARIES})
-
-  set(MESH_3_OPTIMIZATION_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_optimization_plugin")
-  set(MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES
-    Mesh_3_optimization_plugin.cpp
-    Mesh_3_optimization_plugin_cgal_code.cpp
-    Optimizer_thread.cpp)
-  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES)
-  LIST(REMOVE_AT MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES 0) # Remove Mesh_3_optimization_plugin.cpp since it's added by polyhedron_demo_plugin
-  LIST(APPEND MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES "Scene_c3t3_item.moc" ${optimUI_FILES})
-  polyhedron_demo_plugin(${MESH_3_OPTIMIZATION_PLUGIN_LIB} Mesh_3_optimization_plugin ${MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES})
-
-  target_link_libraries(${MESH_3_OPTIMIZATION_PLUGIN_LIB}
-                        ${SCENE_C3T3_ITEM_LIB}
-                        ${SCENE_POLYHEDRON_ITEM_LIB}
-                        ${SCENE_SEGMENTED_IMAGE_ITEM_LIB}
-                        ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB}
-                        ${QGLVIEWER_LIBRARIES}
-                        ${OPENGL_gl_LIBRARY}
-                        ${OPENGL_glu_LIBRARY}
-                        ${TBB_LIBRARIES})
-
-
-else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
-
-  set(MESH_3_MISSING_DEPS "")
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(MESH_3_MISSING_DEPS "the CGAL Qt4 library, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(MESH_3_MISSING_DEPS "Qt4, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT OPENGL_FOUND)
-    set(MESH_3_MISSING_DEPS "OpenGL, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT Boost_FOUND)
-    set(MESH_3_MISSING_DEPS "Boost, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_c3t3_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Io_c3t3_plugin.cpp
deleted file mode 100644
index 9039a0b..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_c3t3_plugin.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include "config.h"
-
-#include "Scene_c3t3_item.h"
-
-#include <CGAL_demo/Io_plugin_interface.h>
-#include <fstream>
-
-class Io_c3t3_plugin :
-  public QObject,
-  public Io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Io_plugin_interface)
-
-public:
-  virtual QStringList nameFilters() const;
-  
-  virtual bool canLoad() const { return false; }
-  virtual Scene_item* load(QFileInfo) { return NULL; }
-
-  virtual bool canSave(const Scene_item*);
-  virtual bool save(const Scene_item*, QFileInfo, QString);
-};
-
-
-QStringList
-Io_c3t3_plugin::nameFilters() const
-{ 
-  return QStringList() << "Mesh (*.mesh)" 
-    << "Maya - surface only (*.ma)" << "Maya - cells (*.ma)";
-}
-
-
-bool
-Io_c3t3_plugin::canSave(const Scene_item* item)
-{
-  const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
-  return c3t3_item != NULL;
-}
-
-bool
-Io_c3t3_plugin::save(const Scene_item* item, QFileInfo fileInfo, QString selectedFilter)
-{
-  const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
-  if ( NULL == c3t3_item )
-  {
-    return false;
-  }
-  
-  QString path = fileInfo.absoluteFilePath();
-  if (fileInfo.suffix() == "mesh")
-  {
-    std::ofstream medit_file (qPrintable(path));
-    c3t3_item->c3t3().output_to_medit(medit_file,true,true);
-  }
-  else if (fileInfo.suffix() == "ma")
-  {
-    std::ofstream maya_file (qPrintable(path));
-    c3t3_item->c3t3().output_to_maya(
-      maya_file, selectedFilter == "Maya - surface only (*.ma)");
-  }
-  
-  return true;
-}
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Io_c3t3_plugin, Io_c3t3_plugin)
-#include "Io_c3t3_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_image_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Io_image_plugin.cpp
deleted file mode 100644
index 13b1b74..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_image_plugin.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "config.h"
-
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-#  include <GL/glew.h>
-#endif
-#include "Scene_segmented_image_item.h"
-#include "Image_type.h"
-#include "ui_Image_res_dialog.h"
-
-#include <CGAL_demo/Io_plugin_interface.h>
-#include <fstream>
-
-class Io_image_plugin :
-  public QObject,
-  public Io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Io_plugin_interface)
-
-public:
-  Io_image_plugin() {
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-    glewInit();
-#endif
-  }
-
-  QStringList nameFilters() const;
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo, QString) { return false; }
-};
-
-QStringList Io_image_plugin::nameFilters() const {
-  return QStringList() << "Inrimage files (*.inr *.inr.gz)"
-                       << "Analyze files (*.hdr *.img *img.gz)"
-                       << "All files (*.*)";
-}
-
-bool Io_image_plugin::canLoad() const {
-  return true;
-}
-
-Scene_item* 
-Io_image_plugin::load(QFileInfo fileinfo) {
-  Image* image = new Image;
-  if(!image->read(fileinfo.filePath().toUtf8()))
-  {
-    delete image;
-    return NULL;
-  }
-  
-  // Get display precision
-  QDialog dialog;
-  Ui::ImagePrecisionDialog ui;
-  ui.setupUi(&dialog);
-  
-  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
-  
-  // Add precision values to the dialog
-  for ( int i=1 ; i<9 ; ++i )
-  {
-    QString s = tr("1:%1").arg(i*i*i);
-    ui.precisionList->addItem(s);
-  }
-  
-  // Open window
-  int return_code = dialog.exec();
-  if(return_code != QDialog::Accepted)
-  {
-    delete image;
-    return NULL;
-  }
-  
-  // Get selected precision
-  int voxel_scale = ui.precisionList->currentIndex() + 1;
-
-  Scene_segmented_image_item* image_item = 
-    new Scene_segmented_image_item(image,voxel_scale);
-  image_item->setName(fileinfo.baseName());
-
-  return image_item;
-}
-
-bool Io_image_plugin::canSave(const Scene_item*)
-{
-  return false;
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Io_image_plugin, Io_image_plugin)
-#include "Io_image_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_implicit_function_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Io_implicit_function_plugin.cpp
deleted file mode 100644
index 57ebd40..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_implicit_function_plugin.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-#include "config.h"
-
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Plugin_helper.h>
-#include "implicit_functions/Implicit_function_interface.h"
-#include "Scene_implicit_function_item.h"
-#include "ui_Function_dialog.h"
-
-#include <iostream>
-
-#include <QAction>
-#include <QMainWindow>
-#include <QPluginLoader>
-#include <QDir>
-#include <QApplication>
-#include <QMenu>
-#include <QList>
-#include <QLibrary>
-
-class Io_implicit_function_plugin :
-  public QObject,
-  protected Plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Plugin_interface)
-  
-public:
-  Io_implicit_function_plugin();
-  virtual ~Io_implicit_function_plugin() {}
-  
-  using Plugin_helper::init;
-  virtual void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  
-  QList<QAction*> actions() const
-  {
-    return QList<QAction*>();
-  }
-  
-public slots:
-  void load_function() const;
-  
-private:
-  void load_function_plugins();
-  
-private:
-  QList<Implicit_function_interface*> functions_;
-};
-
-
-
-Io_implicit_function_plugin::
-Io_implicit_function_plugin()
-{
-  load_function_plugins();
-}
-
-
-void
-Io_implicit_function_plugin::
-init(QMainWindow* mainWindow, Scene_interface* scene_interface)
-{
-  this->scene = scene_interface;
-  this->mw = mainWindow;
-  
-  QAction* actionLoadFunction = new QAction("Load Implicit Function", mw);
-  if( NULL != actionLoadFunction )
-  {
-    connect(actionLoadFunction, SIGNAL(triggered()), this, SLOT(load_function()));
-  }
-  
-  QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
-  if ( NULL != menuFile )
-  {
-    QList<QAction*> menuFileActions = menuFile->actions();
-    
-    // Look for action just after "Load..." action
-    QAction* actionAfterLoad = NULL;
-    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(), 
-         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
-    {
-      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
-      {
-        ++it_action;
-        if ( it_action != end && NULL != *it_action )
-        {
-          actionAfterLoad = *it_action;
-        }
-      }
-    }
-    
-    // Insert "Load implicit function" action
-    if ( NULL != actionAfterLoad )
-    {
-      menuFile->insertAction(actionAfterLoad,actionLoadFunction);      
-    }
-    
-  }
-}
-
-
-void
-Io_implicit_function_plugin::
-load_function() const
-{
-  QDialog dialog(mw);
-  Ui::FunctionDialog ui;
-  ui.setupUi(&dialog);
-  
-  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
-  
-  // Add loaded functions to the dialog
-  int i=0;
-  Q_FOREACH( Implicit_function_interface* f, functions_ )
-  {
-    ui.functionList->insertItem(i++,f->name());
-  }
-
-  // Open window
-  int return_code = dialog.exec();
-  if(return_code == QDialog::Rejected) { return; }
-  
-  // Get selected function
-  i = ui.functionList->currentIndex();
-  Implicit_function_interface* function = functions_[i];
-  
-  // Create Scene_implicit_function object and add it to the framework
-  Scene_implicit_function_item* item =
-    new Scene_implicit_function_item(function);
-  
-  item->setName(tr("%1").arg(function->name()));
-  item->setRenderingMode(FlatPlusEdges);
-
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  scene->itemChanged(index);
-    
-  Scene_interface::Item_id new_item_id = scene->addItem(item);
-  scene->setSelectedItem(new_item_id);
-}
-
-void
-Io_implicit_function_plugin::
-load_function_plugins()
-{
-  QDir pluginsDir(qApp->applicationDirPath());
-  QString dirname = pluginsDir.dirName();
-  if ( !pluginsDir.cd("implicit_functions") ) { 
-    // In that case, dirname may be "Debug" or "Release" and one has to
-    // search in ../implicit_functions/Debug or
-    // ../implicit_functions/Release
-    QString newDir = QString("../implicit_functions/") + dirname;
-    if( !pluginsDir.cd(newDir) ) return; 
-  }
-  
-  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
-  {
-    if ( fileName.contains("plugin") && QLibrary::isLibrary(fileName) )
-    {
-      qDebug("    + Loading Function \"%s\"...", fileName.toUtf8().data());
-      QPluginLoader loader;
-      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
-      QObject *function_plugin = loader.instance();
-      if ( NULL != function_plugin )
-      {
-        Implicit_function_interface* function =
-          qobject_cast<Implicit_function_interface*>(function_plugin);
-        
-        if ( NULL != function )
-        {
-          functions_ << function;
-        }
-      }
-    }
-  }
-}
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Io_implicit_function_plugin, Io_implicit_function_plugin)
-#include "Io_implicit_function_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_off_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Io_off_plugin.cpp
deleted file mode 100644
index fb836f7..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Io_off_plugin.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "config.h"
-
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup.h"
-#include "Polyhedron_type.h"
-
-#include <CGAL_demo/Io_plugin_interface.h>
-#include <fstream>
-
-class Io_off_plugin :
-  public QObject,
-  public Io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Io_plugin_interface)
-
-public:
-  QStringList nameFilters() const;
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo, QString);
-};
-
-QStringList Io_off_plugin::nameFilters() const {
-  return QStringList() << "OFF files (*.off)";
-}
-
-bool Io_off_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Io_off_plugin::load(QFileInfo fileinfo) {
-
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-    
-  // Try to read .off in a polyhedron
-  Scene_polyhedron_item* item = new Scene_polyhedron_item();
-  item->setName(fileinfo.baseName());
-  if(!item->load(in))
-  {
-    delete item;
-
-    // Try to read .off in a polygon soup
-    Scene_polygon_soup* soup_item = new Scene_polygon_soup;
-    soup_item->setName(fileinfo.baseName());
-    in.close();
-    std::ifstream in2(fileinfo.filePath().toUtf8());
-    if(!soup_item->load(in2)) {
-      delete soup_item;
-      return 0;
-    }
-    return soup_item;
-  }
-
-  return item;
-}
-
-bool Io_off_plugin::canSave(const Scene_item* item)
-{
-  // This plugin supports polyhedrons and polygon soups
-  return qobject_cast<const Scene_polyhedron_item*>(item) ||
-    qobject_cast<const Scene_polygon_soup*>(item);
-}
-
-bool Io_off_plugin::save(const Scene_item* item, QFileInfo fileinfo,
-                         QString /* `selecterFilter` is not used: only OFF */)
-{
-  // This plugin supports polyhedrons and polygon soups
-  const Scene_polyhedron_item* poly_item = 
-    qobject_cast<const Scene_polyhedron_item*>(item);
-  const Scene_polygon_soup* soup_item = 
-    qobject_cast<const Scene_polygon_soup*>(item);
-
-  if(!poly_item && !soup_item)
-    return false;
-
-  std::ofstream out(fileinfo.filePath().toUtf8());
-
-  return (poly_item && poly_item->save(out)) || 
-    (soup_item && soup_item->save(out));
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Io_off_plugin, Io_off_plugin)
-#include "Io_off_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.cpp
deleted file mode 100644
index e65b725..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.cpp
+++ /dev/null
@@ -1,601 +0,0 @@
-#include "config.h"
-#include "MainWindow.h"
-#include <CGAL_demo/Scene.h>
-#include <CGAL_demo/Scene_item.h>
-#include <CGAL/Qt/debug.h>
-
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <QtDebug>
-#include <QUrl>
-#include <QFileDialog>
-#include <QFileInfo>
-#include <QSettings>
-#include <QHeaderView>
-#include <QMenu>
-#include <QAction>
-#include <QLibrary>
-#include <QPluginLoader>
-#include <QMessageBox>
-#include <QScrollBar>
-#include <QClipboard>
-
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Io_plugin_interface.h>
-
-#include "ui_MainWindow.h"
-
-MainWindow::~MainWindow()
-{
-  delete ui;
-}
-
-MainWindow::MainWindow(QWidget* parent)
-  : CGAL::Qt::DemosMainWindow(parent)
-{
-  ui = new Ui::MainWindow;
-  ui->setupUi(this);
-
-  // Save some pointers from ui, for latter use.
-  treeView = ui->treeView;
-  viewer = ui->viewer;
-
-  // Setup the submenu of the View menu that can toggle the dockwidgets
-  Q_FOREACH(QDockWidget* widget, findChildren<QDockWidget*>()) {
-    ui->menuDockWindows->addAction(widget->toggleViewAction());
-  }
-  ui->menuDockWindows->removeAction(ui->dummyAction);
-
-  // do not save the state of the viewer (anoying)
-  viewer->setStateFileName(QString::null);
-
-  // accept drop events
-  setAcceptDrops(true);
-
-  // setup scene
-  scene = new Scene(this);
-  viewer->setScene(scene);
-  treeView->setModel(scene);
-
-  // setup the treeview: delegation and columns sizing...
-  treeView->setItemDelegate(new SceneDelegate(this));
-
-  treeView->header()->setStretchLastSection(false);
-  treeView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
-  treeView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
-  treeView->header()->setResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
-  treeView->header()->setResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
-  treeView->header()->setResizeMode(Scene::ABColumn, QHeaderView::Fixed);
-  treeView->header()->setResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
-
-  treeView->resizeColumnToContents(Scene::ColorColumn);
-  treeView->resizeColumnToContents(Scene::RenderingModeColumn);
-  treeView->resizeColumnToContents(Scene::ABColumn);
-  treeView->resizeColumnToContents(Scene::VisibleColumn);
-
-  // setup connections
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          this, SLOT(updateInfo()));
-  
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          this, SLOT(updateDisplayInfo()));
-
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          viewer, SLOT(updateGL()));
-
-  connect(scene, SIGNAL(updated()),
-          viewer, SLOT(update()));
-  
-  connect(scene, SIGNAL(selectionChanged()),
-          this, SLOT(selectSceneItem()));
-
-  connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)),
-          this, SLOT(removeManipulatedFrame(Scene_item*)));
-
-  connect(scene, SIGNAL(updated_bbox()),
-          this, SLOT(updateViewerBBox()));
-
-  connect(treeView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(updateInfo()));
-  
-  connect(treeView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(updateDisplayInfo()));
-
-  connect(treeView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(selectionChanged()));
-
-  connect(viewer, SIGNAL(selected(int)),
-          this, SLOT(selectSceneItem(int)));
-
-  connect(ui->actionAntiAliasing, SIGNAL(toggled(bool)),
-          viewer, SLOT(setAntiAliasing(bool)));
-
-  connect(ui->actionDraw_two_sides, SIGNAL(toggled(bool)),
-          viewer, SLOT(setTwoSides(bool)));
-
-  // enable anti-aliasing by default
-  ui->actionAntiAliasing->setChecked(true);
-
-  // add the "About CGAL..." and "About demo..." entries
-  this->addAboutCGAL();
-  this->addAboutDemo(":/cgal/Mesh_3/about.html");
-
-  // Connect the button "addButton" with actionLoad
-  ui->addButton->setDefaultAction(ui->actionLoad);
-  // Same with "removeButton" and "duplicateButton"
-  ui->removeButton->setDefaultAction(ui->actionErase);
-  ui->duplicateButton->setDefaultAction(ui->actionDuplicate);
-
-  // Connect actionQuit (Ctrl+Q) and qApp->quit()
-  connect(ui->actionQuit, SIGNAL(triggered()),
-          this, SLOT(quit()));
-
-  // Recent files menu
-  this->addRecentFiles(ui->menuFile, ui->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-
-  // Reset the "Operation menu"
-  clearMenu(ui->menuOperations);
-
-  // Load plugins, and re-enable actions that need it.
-  loadPlugins();
-
-  readSettings(); // Among other things, the column widths are stored.
-
-  const char *windowTitle = "CGAL 3D mesh generator demo ["
-#ifdef CGAL_CONCURRENT_MESH_3
-    "Parallel"
-#else
-    "Sequential"
-# ifdef CGAL_LINKED_WITH_TBB
-    " - With TBB"
-# else
-    " - Without TBB"
-# endif
-#endif
-#ifdef _DEBUG
-    " - Debug]";
-#else
-    "]";
-#endif
-  
-  setWindowTitle(QApplication::translate(
-    "MainWindow", windowTitle, 0, QApplication::UnicodeUTF8));
-
-  this->dumpObjectTree();
-}
-
-void MainWindow::loadPlugins()
-{
-  Q_FOREACH(QObject *obj, QPluginLoader::staticInstances())
-  {
-    initPlugin(obj);
-    initIOPlugin(obj);
-  }
-
-  QDir pluginsDir(qApp->applicationDirPath());
-  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files)) {
-    if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) {
-      QDebug qdebug = qDebug();
-      qdebug << "### Loading \"" << fileName.toUtf8().data() << "\"... ";
-      QPluginLoader loader;
-      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
-      QObject *obj = loader.instance();
-      if(obj) {
-        bool init1 = initPlugin(obj);
-        bool init2 = initIOPlugin(obj);
-        if (!init1 && !init2)
-          qdebug << "not for this program";
-        else
-          qdebug << "success";
-      }
-      else {
-        qdebug << "error: " << qPrintable(loader.errorString());
-      }
-    }
-  }
-}
-
-bool MainWindow::initPlugin(QObject* obj)
-{
-  QObjectList childs = this->children();
-  Plugin_interface* plugin =
-    qobject_cast<Plugin_interface*>(obj);
-  if(plugin) {
-    // Call plugin's init() method
-    plugin->init(this, this->scene, this);
-
-    Q_FOREACH(QAction* action, plugin->actions()) {
-      // If action does not belong to the menus, add it to "Operations" menu
-      if(!childs.contains(action)) {
-        ui->menuOperations->addAction(action);
-      }
-      // Show and enable menu item
-      addAction(action);
-    }
-    return true;
-  }
-  else 
-    return false;
-}
-
-bool MainWindow::initIOPlugin(QObject* obj)
-{
-  Io_plugin_interface* plugin =
-    qobject_cast<Io_plugin_interface*>(obj);
-  if(plugin) {
-//     std::cerr << "I/O plugin\n";
-    io_plugins << plugin;
-    return true;
-  }
-  else 
-    return false;
-}
-
-void MainWindow::clearMenu(QMenu* menu)
-{
-  Q_FOREACH(QAction* action, menu->actions())
-  {
-    QMenu* menu = action->menu();
-    if(menu) {
-      clearMenu(menu);
-    }
-    action->setVisible(false);
-  }
-  menu->menuAction()->setEnabled(false);
-}
-
-void MainWindow::addAction(QAction* action)
-{
-  if(!action) return;
-
-  action->setVisible(true);
-  action->setEnabled(true);
-  Q_FOREACH(QWidget* widget, action->associatedWidgets())
-  {
-//     qDebug() << QString("%1 (%2)\n")
-//       .arg(widget->objectName())
-//       .arg(widget->metaObject()->className());
-    QMenu* menu = qobject_cast<QMenu*>(widget);
-    if(menu)
-    {
-      addAction(menu->menuAction());
-    }
-  }
-}
-
-void MainWindow::message(QString message, QString colorName, QString /*font*/) {
-  if (message.endsWith('\n')) {
-    message.remove(message.length()-1, 1);
-  }
-  statusBar()->showMessage(message, 5000);
-  message = "<font color=\"" + colorName + "\" >" + message + "</font><br>";
-  message = "[" + QTime::currentTime().toString() + "] " + message;
-  
-  // Moves cursor to the end of the block
-  ui->consoleTextEdit->moveCursor(QTextCursor::EndOfBlock);
-  ui->consoleTextEdit->insertHtml(message);
-  ui->consoleTextEdit->verticalScrollBar()->setValue(ui->consoleTextEdit->verticalScrollBar()->maximum());
-}
-
-void MainWindow::information(QString text) {
-  this->message("INFO: " + text, "");
-}
-
-void MainWindow::warning(QString text) {
-  this->message("WARNING: " + text, "blue");
-}
-
-void MainWindow::error(QString text) {
-  this->message("ERROR: " + text, "red");
-}
-
-void MainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-  if (event->mimeData()->hasFormat("text/uri-list"))
-    event->acceptProposedAction();
-}
-
-void MainWindow::dropEvent(QDropEvent *event)
-{
-  Q_FOREACH(QUrl url, event->mimeData()->urls()) {
-    QString filename = url.toLocalFile();
-    if(!filename.isEmpty()) {
-      qDebug() << QString("dropEvent(\"%1\")\n").arg(filename);
-      open(filename);
-    }
-  }
-  event->acceptProposedAction();
-}
-
-void MainWindow::updateViewerBBox()
-{
-  const Scene::Bbox bbox = scene->bbox();
-  const double xmin = bbox.xmin;
-  const double ymin = bbox.ymin;
-  const double zmin = bbox.zmin;
-  const double xmax = bbox.xmax;
-  const double ymax = bbox.ymax;
-  const double zmax = bbox.zmax;
-  // qDebug() << QString("Bounding box: (%1, %2, %3) - (%4, %5, %6)\n")
-  // .arg(xmin).arg(ymin).arg(zmin).arg(xmax).arg(ymax).arg(zmax);
-  qglviewer::Vec 
-    vec_min(xmin, ymin, zmin),
-    vec_max(xmax, ymax, zmax);
-  viewer->setSceneBoundingBox(vec_min,
-                              vec_max);
-  viewer->camera()->showEntireScene();
-}
-
-void MainWindow::open(QString filename)
-{
-  QFileInfo fileinfo(filename);
-  Scene_item* item = 0;
-  if(fileinfo.isFile() && fileinfo.isReadable()) {
-    Q_FOREACH(Io_plugin_interface* plugin, 
-              io_plugins)
-    {
-      if(plugin->canLoad()) {
-        item = plugin->load(fileinfo);
-        if(item) break; // go out of the loop
-      }
-    }
-    if(item) {
-      Scene::Item_id index = scene->addItem(item);
-      QSettings settings;
-      settings.setValue("OFF open directory",
-                        fileinfo.absoluteDir().absolutePath());
-      this->addToRecentFiles(filename);
-      selectSceneItem(index);
-    }
-    else {
-      QMessageBox::critical(this,
-                            tr("Cannot open file"),
-                            tr("File %1 has not a known file format.")
-                            .arg(filename));
-    }
-  }
-  else {
-    QMessageBox::critical(this,
-                          tr("Cannot open file"),
-                          tr("File %1 is not a readable file.")
-                          .arg(filename));
-  }
-}
-
-void MainWindow::selectSceneItem(int i)
-{
-  if(i < 0) return;
-  if((unsigned int)i >= scene->numberOfEntries()) return;
-
-  treeView->selectionModel()->select(scene->createSelection(i),
-                                     QItemSelectionModel::ClearAndSelect);
-}
-
-void
-MainWindow::selectSceneItem()
-{
-  selectSceneItem(scene->mainSelectionIndex());
-}
-
-int MainWindow::getSelectedSceneItemIndex() const
-{
-  QModelIndexList selectedRows = treeView->selectionModel()->selectedRows();
-  if(selectedRows.empty())
-    return -1;
-  else
-    return selectedRows.first().row();
-}
-
-void MainWindow::selectionChanged()
-{
-  scene->setSelectedItem(getSelectedSceneItemIndex());
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item != NULL && item->manipulatable()) {
-    viewer->setManipulatedFrame(item->manipulatedFrame());
-//    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
-//            this, SLOT(updateInfo()));
-//    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
-//            this, SLOT(updateDisplayInfo()));
-  }
-  
-  viewer->updateGL();
-}
-
-void MainWindow::removeManipulatedFrame(Scene_item* item)
-{
-  if(item->manipulatable() &&
-     item->manipulatedFrame() == viewer->manipulatedFrame()) {
-    viewer->setManipulatedFrame(0);
-  }
-}
-
-void MainWindow::updateInfo() {
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item)
-    ui->infoLabel->setText(item->toolTip());
-  else 
-    ui->infoLabel->clear();
-}
-
-void MainWindow::updateDisplayInfo() {
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item)
-    ui->displayLabel->setPixmap(item->graphicalToolTip());
-  else 
-    ui->displayLabel->clear();
-}
-
-void MainWindow::readSettings()
-{
-  this->readState("MainWindow", Size|State);
-}
-
-void MainWindow::writeSettings()
-{
-  this->writeState("MainWindow");
-  std::cerr << "Write setting... done.\n";
-}
-
-void MainWindow::quit()
-{
-  close();
-}
-
-void MainWindow::closeEvent(QCloseEvent *event)
-{
-  writeSettings();
-  event->accept();
-}
-
-void MainWindow::on_actionLoad_triggered()
-{
-  QStringList filters;
-  Q_FOREACH(Io_plugin_interface* plugin, io_plugins) {
-    if(plugin->canLoad()) {
-      filters += plugin->nameFilters();
-    }
-  }
-  filters << tr("All files (*)");
-
-  QSettings settings;
-  QString directory = settings.value("OFF open directory",
-                                     QDir::current().dirName()).toString();
-  QStringList filenames = 
-    QFileDialog::getOpenFileNames(this,
-                                  tr("Open File..."),
-                                  directory,
-                                  filters.join(";;"));
-  if(!filenames.isEmpty()) {
-    Q_FOREACH(QString filename, filenames) {
-      open(filename);
-    }
-  }
-}
-
-void MainWindow::on_actionSaveAs_triggered()
-{
-  QModelIndexList selectedRows = treeView->selectionModel()->selectedRows();
-  if(selectedRows.size() != 1)
-    return;
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-
-  if(!item)
-    return;
-
-  QVector<Io_plugin_interface*> canSavePlugins;
-  QStringList filters;
-  Q_FOREACH(Io_plugin_interface* plugin, io_plugins) {
-    if(plugin->canSave(item)) {
-      canSavePlugins << plugin;
-      filters += plugin->nameFilters();
-    }
-  }
-  filters << tr("All files (*)");
-
-  if(canSavePlugins.isEmpty()) {
-    QMessageBox::warning(this,
-                         tr("Cannot save"),
-                         tr("The selected object %1 cannot be saved.")
-                         .arg(item->name()));
-    return;
-  }
-  
-  QString selectedFilter;
-  QString filename = 
-    QFileDialog::getSaveFileName(this,
-                                 tr("Save to File..."),
-                                 QString(),
-                                 filters.join(";;"),
-                                 &selectedFilter);
-  
-  QFileInfo fileinfo(filename);
-  if(!fileinfo.isFile() ||
-     QMessageBox::warning(this,
-                          tr("File exists"),
-                          tr("The file %1 already exists! Continue?")
-                          .arg(filename),
-                          QMessageBox::Yes|QMessageBox::No) == 
-     QMessageBox::Yes)
-  {
-
-    Q_FOREACH(Io_plugin_interface* plugin, canSavePlugins) {
-      if(plugin->save(item, fileinfo, selectedFilter))
-        break;
-    }
-  }
-}
-
-bool MainWindow::on_actionErase_triggered()
-{
-  int index = scene->erase(getSelectedSceneItemIndex());
-  selectSceneItem(index);
-  return index >= 0;
-}
-
-void MainWindow::on_actionEraseAll_triggered()
-{
-  while(on_actionErase_triggered()) {
-  }
-}
-
-void MainWindow::on_actionDuplicate_triggered()
-{
-  int index = scene->duplicate(getSelectedSceneItemIndex());
-  selectSceneItem(index);
-}
-
-void MainWindow::on_actionShowHide_triggered()
-{
-  Q_FOREACH(QModelIndex index, treeView->selectionModel()->selectedRows())
-  {
-    int i = index.row();
-    Scene_item* item = scene->item(i);
-    item->setVisible(!item->visible());
-    scene->itemChanged(i);
-  }
-}
-
-void MainWindow::on_actionSetPolyhedronA_triggered()
-{
-  int i = getSelectedSceneItemIndex();
-  scene->setItemA(i);
-}
-
-void MainWindow::on_actionSetPolyhedronB_triggered()
-{
-  int i = getSelectedSceneItemIndex();
-  scene->setItemB(i);
-}
-
-void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
-{
-  viewer->setAddKeyFrameKeyboardModifiers(m);
-}
-
-void MainWindow::on_actionCopy_snapshot_triggered()
-{
-  // copy snapshot to clipboard
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-  QClipboard *qb = QApplication::clipboard();
-  viewer->makeCurrent();
-  viewer->raise();
-  QImage snapshot = viewer->grabFrameBuffer(true);
-  qb->setImage(snapshot);
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionSave_snapshot_triggered()
-{
-	// save snapshot to file
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-        viewer->saveSnapshot(false, false);
-	QApplication::restoreOverrideCursor();
-}
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.h b/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.h
deleted file mode 100644
index 763d156..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/MainWindow.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-#include "config.h"
-
-#include <QtOpenGL/qgl.h>
-#include <CGAL/Qt/DemosMainWindow.h>
-
-#include <QVector>
-
-class QDragEnterEvent;
-class QDropEvent;
-class Scene;
-class Viewer;
-class QTreeView;
-class QMenu;
-class Io_plugin_interface;
-
-class Scene_item;
-
-namespace Ui {
-  class MainWindow;
-}
-
-#include <CGAL_demo/Messages_interface.h>
-
-class MainWindow : 
-  public CGAL::Qt::DemosMainWindow,
-  public Messages_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Messages_interface)
-public:
-  MainWindow(QWidget* parent = 0);
-  ~MainWindow();
-
-  Viewer* getViewer() { return viewer; }
-        
-public slots:
-  void updateViewerBBox();
-  void open(QString filename);
-
-  void selectSceneItem(int i);
-  void selectSceneItem();
-
-  void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
-
-  void clearMenu(QMenu*);
-  void addAction(QAction*);
-
-  void information(QString);
-  void warning(QString);
-  void error(QString);
-
-protected slots:
-  void selectionChanged();
-  void updateInfo();
-  void updateDisplayInfo();
-  void removeManipulatedFrame(Scene_item*);
-
-  // settings
-  void quit();
-  void readSettings();
-  void writeSettings();
-
-	// snapshot
-	void on_actionCopy_snapshot_triggered();
-	void on_actionSave_snapshot_triggered();
-
-  // load, erase, duplicate
-  void on_actionEraseAll_triggered();
-  void on_actionLoad_triggered();
-  bool on_actionErase_triggered();
-  void on_actionDuplicate_triggered();
-
-  // Show/Hide
-  void on_actionShowHide_triggered();
-
-  // Select A/B
-  void on_actionSetPolyhedronA_triggered();
-  void on_actionSetPolyhedronB_triggered();
-
-  // save as...
-  void on_actionSaveAs_triggered(); 
-
-protected:
-  void message(QString, QString, QString = QString("normal"));
-  void loadPlugins();
-  bool initPlugin(QObject*);
-  bool initIOPlugin(QObject*);
-
-  void dragEnterEvent(QDragEnterEvent *event);
-  void dropEvent(QDropEvent *event);
-  void closeEvent(QCloseEvent *event);
-
-  bool onePolygonIsSelected() const;
-  int getSelectedSceneItemIndex() const;
-
-private:
-  QString strippedName(const QString &fullFileName);
-
-  Scene* scene;
-  Viewer* viewer;
-  QTreeView* treeView;
-  Ui::MainWindow* ui;
-  QVector<Io_plugin_interface*> io_plugins;
-};
-
-#endif // ifndef MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.cpp
deleted file mode 100644
index a8369b9..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "config.h"
-
-#include "MainWindow.h"
-#include <QApplication>
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Mesh_3 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  QStringList args = app.arguments();
-  args.removeAt(0);
-
-  if(!args.empty() && args[0] == "--use-meta")
-  {
-    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
-    args.removeAt(0);
-  }
-
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-  return app.exec();
-}
-
-#ifndef USE_FORWARD_DECL
-#  include "Scene.cpp"
-#  include "Scene_item.cpp"
-#  include "Scene_moc.cpp"
-#  include "Viewer.cpp"
-#  include "Viewer_moc.cpp"
-#  include "MainWindow.cpp"
-#  include "MainWindow_moc.cpp"
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_optimization_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_optimization_plugin.cpp
deleted file mode 100644
index 98f0442..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_optimization_plugin.cpp
+++ /dev/null
@@ -1,623 +0,0 @@
-#include <boost/config.hpp>
-#if defined(BOOST_MSVC)
-#  pragma warning( disable : 4503)
-#endif
-
-#include "config.h"
-#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
-#include <CGAL_demo/Plugin_helper.h>
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Messages_interface.h>
-#include "ui_Smoother_dialog.h"
-#include "ui_LocalOptim_dialog.h"
-
-#include "Scene_c3t3_item.h"
-#include "C3t3_type.h"
-
-#include "Optimizer_thread.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-#include <QFileDialog>
-#include <QMessageBox>
-#include <QTimer>
-
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/parameters_defaults.h> // to get default values
-
-
-// declare the CGAL function
-#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
-Optimizer_thread* cgal_code_odt_mesh_3(Scene_c3t3_item& c3t3_item,
-                                       const double time_limit,
-                                       const double convergence_ratio,
-                                       const double freeze_ratio,
-                                       const int max_iteration_number,
-                                       const bool create_new_item);
-#endif
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
-Optimizer_thread* cgal_code_lloyd_mesh_3(Scene_c3t3_item& c3t3_item,
-                                         const double time_limit,
-                                         const double convergence_ratio,
-                                         const double freeze_ratio,
-                                         const int max_iteration_number,
-                                         const bool create_new_item);
-#endif
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
-Optimizer_thread* cgal_code_perturb_mesh_3(Scene_c3t3_item& c3t3_item,
-                                           const double time_limit,
-                                           const double sliver_bound,
-                                           const bool create_new_item);
-#endif
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
-Optimizer_thread* cgal_code_exude_mesh_3(Scene_c3t3_item& c3t3_item,
-                                         const double time_limit,
-                                         const double sliver_bound,
-                                         const bool create_new_item);
-#endif
-
-QString translate(CGAL::Mesh_optimization_return_code rc);
-
-// Mesh_3_optimization_plugin class
-class Mesh_3_optimization_plugin : 
-  public QObject,
-  protected Plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Plugin_interface)
-  
-  typedef Plugin_helper Base;
-public:
-  Mesh_3_optimization_plugin();
-  
-  using Base::init;
-  virtual void init(QMainWindow*, Scene_interface*, Messages_interface*);
-  inline virtual QList<QAction*> actions() const;
-  
-public slots:
-#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
-  void odt();
-#endif
-#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
-  void lloyd();
-#endif
-#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
-  void perturb();
-#endif
-#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
-  void exude();
-#endif
-  
-  void optimization_done(Optimizer_thread* t);
-  void status_report(QString s);
-  
-private:
-  Scene_c3t3_item* get_c3t3_item() const;
-  
-  void treat_result(Scene_c3t3_item& source_item, Scene_c3t3_item& result_item,
-                    const QString& name) const;
-  
-  void launch_thread(Optimizer_thread* thread, const QString& msg);
-
-private:
-  QAction* actionOdt;
-  QAction* actionLloyd;
-  QAction* actionPerturb;
-  QAction* actionExude;
-  Messages_interface* msg;
-  QMessageBox* message_box_;
-  
-  Scene_c3t3_item* source_item_;
-}; // end class Mesh_3_optimization_plugin
-
-
-Mesh_3_optimization_plugin::
-Mesh_3_optimization_plugin()
-  : actionOdt(NULL)
-  , actionLloyd(NULL)
-  , actionPerturb(NULL)
-  , actionExude(NULL)
-  , msg(NULL)
-  , message_box_(NULL)
-  , source_item_(NULL)
-{
-}
-
-void 
-Mesh_3_optimization_plugin::
-init(QMainWindow* mainWindow,
-     Scene_interface* scene_interface,
-     Messages_interface* msg_interface)
-{
-  this->scene = scene_interface;
-  this->mw = mainWindow;
-  
-  // Create menu items
-#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
-  actionOdt = this->getActionFromMainWindow(mw, "actionOdt");
-  if( NULL != actionOdt )
-  {
-    connect(actionOdt, SIGNAL(triggered()), this, SLOT(odt()));
-  }
-#endif
-  
-#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
-  actionLloyd = this->getActionFromMainWindow(mw, "actionLloyd");
-  if( NULL != actionLloyd )
-  {
-    connect(actionLloyd, SIGNAL(triggered()), this, SLOT(lloyd()));
-  }
-#endif
-  
-#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
-  actionPerturb = this->getActionFromMainWindow(mw, "actionPerturb");
-  if( NULL != actionPerturb )
-  {
-    connect(actionPerturb, SIGNAL(triggered()), this, SLOT(perturb()));
-  }
-#endif
-  
-#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
-  actionExude = this->getActionFromMainWindow(mw, "actionExude");
-  if( NULL != actionExude )
-  {
-    connect(actionExude, SIGNAL(triggered()), this, SLOT(exude()));
-  }
-#endif
-  
-  msg = msg_interface;
-}
-
-
-inline
-QList<QAction*> 
-Mesh_3_optimization_plugin::actions() const
-{
-  return QList<QAction*>() << actionOdt << actionLloyd 
-                           << actionPerturb << actionExude;
-}
-
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
-void
-Mesh_3_optimization_plugin::odt()
-{
-  // -----------------------------------
-  // Get c3t3 item
-  // -----------------------------------
-  Scene_c3t3_item* item = get_c3t3_item();
-  if ( NULL == item ) { return; }
-
-  // -----------------------------------
-  // Dialog box
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::Smoother_dialog ui;
-  ui.setupUi(&dialog);
-  dialog.setWindowTitle(tr("Odt-smoothing parameters"));
-  
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-  
-  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
-          ui.maxTime,     SLOT(setDisabled(bool)));
-  
-  ui.objectName->setText(item->name());
-
-  namespace cgpd = CGAL::parameters::default_values;
-  ui.convergenceRatio->setValue(cgpd::odt_convergence_ratio);
-  ui.freezeRatio->setValue(cgpd::odt_freeze_ratio);
-  
-  int i = dialog.exec();
-  if(i == QDialog::Rejected)
-    return;
-    
-  // 0 means parameter is not considered
-  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
-  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
-  const double convergence = ui.convergenceRatio->value();
-  const double freeze = ui.freezeRatio->value();
-  const bool create_new_item = ui.createNewItem->isChecked();
-  
-  // -----------------------------------
-  // Launch optimization
-  // -----------------------------------
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  
-  Optimizer_thread* opt_thread = cgal_code_odt_mesh_3(*item,
-                                                      max_time,
-                                                      convergence,
-                                                      freeze,
-                                                      max_iteration_nb,
-                                                      create_new_item);
-  
-  if ( NULL == opt_thread )
-  {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-  
-  source_item_ = item;
-  launch_thread(opt_thread, "Odt iterations are running...");
-  QApplication::restoreOverrideCursor();
-}
-#endif
-
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
-void
-Mesh_3_optimization_plugin::lloyd()
-{
-  // -----------------------------------
-  // Get c3t3 item
-  // -----------------------------------
-  Scene_c3t3_item* item = get_c3t3_item();
-  if ( NULL == item ) { return; }
-  
-  // -----------------------------------
-  // Dialog box
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::Smoother_dialog ui;
-  ui.setupUi(&dialog);
-  dialog.setWindowTitle(tr("Lloyd-smoothing parameters"));
-  
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-  
-  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
-          ui.maxTime,     SLOT(setDisabled(bool)));
-  
-  ui.objectName->setText(item->name());
-  
-  namespace cgpd = CGAL::parameters::default_values;
-  ui.convergenceRatio->setValue(cgpd::lloyd_convergence_ratio);
-  ui.freezeRatio->setValue(cgpd::lloyd_freeze_ratio);
-  
-  int i = dialog.exec();
-  if(i == QDialog::Rejected)
-    return;
-  
-  // 0 means parameter is not considered
-  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
-  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
-  const double convergence = ui.convergenceRatio->value();
-  const double freeze = ui.freezeRatio->value();
-  const bool create_new_item = ui.createNewItem->isChecked();
-
-  // -----------------------------------
-  // Launch optimization
-  // -----------------------------------
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  
-  Optimizer_thread* opt_thread = cgal_code_lloyd_mesh_3(*item,
-                                                        max_time,
-                                                        convergence,
-                                                        freeze,
-                                                        max_iteration_nb,
-                                                        create_new_item);
-  
-  if ( NULL == opt_thread )
-  {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-
-  source_item_ = item;
-  launch_thread(opt_thread, "Lloyd iterations are running...");
-  QApplication::restoreOverrideCursor();
-}
-#endif
-
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
-void
-Mesh_3_optimization_plugin::perturb()
-{
-  // -----------------------------------
-  // Get c3t3 item
-  // -----------------------------------
-  Scene_c3t3_item* item = get_c3t3_item();
-  if ( NULL == item ) { return; }
-  
-  // -----------------------------------
-  // Dialog box
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::LocalOptim_dialog ui;
-  ui.setupUi(&dialog);
-  dialog.setWindowTitle(tr("Sliver perturbation parameters"));
-  
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-  
-  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
-          ui.maxTime,     SLOT(setDisabled(bool)));
-  
-  connect(ui.noBound,     SIGNAL(toggled(bool)),
-          ui.sliverBound, SLOT(setDisabled(bool)));
-  
-  ui.objectName->setText(item->name());
-  
-  int i = dialog.exec();
-  if(i == QDialog::Rejected)
-    return;
-  
-  // 0 means parameter is not considered
-  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
-  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
-  const bool create_new_item = ui.createNewItem->isChecked();
-  
-  // -----------------------------------
-  // Launch optimization
-  // -----------------------------------
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  
-  Optimizer_thread* opt_thread = cgal_code_perturb_mesh_3(*item,
-                                                          max_time,
-                                                          sliver_bound,
-                                                          create_new_item);
-  
-
-  if ( NULL == opt_thread )
-  {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-  
-  source_item_ = item;
-  launch_thread(opt_thread, "Sliver perturbation is running...");
-  QApplication::restoreOverrideCursor();
-}
-#endif
-
-
-#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
-void
-Mesh_3_optimization_plugin::exude()
-{
-  // -----------------------------------
-  // Get c3t3 item
-  // -----------------------------------
-  Scene_c3t3_item* item = get_c3t3_item();
-  if ( NULL == item ) { return; }
-  
-  // -----------------------------------
-  // Dialog box
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::LocalOptim_dialog ui;
-  ui.setupUi(&dialog);
-  dialog.setWindowTitle(tr("Sliver exudation parameters"));
-  
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-  
-  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
-          ui.maxTime,     SLOT(setDisabled(bool)));
-  
-  connect(ui.noBound,     SIGNAL(toggled(bool)),
-          ui.sliverBound, SLOT(setDisabled(bool)));
-  
-  ui.objectName->setText(item->name());
-  ui.sliverBound->setValue(25.);
-  
-  int i = dialog.exec();
-  if(i == QDialog::Rejected)
-    return;
-  
-  // 0 means parameter is not considered
-  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
-  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
-  const bool create_new_item = ui.createNewItem->isChecked();
-  
-  // -----------------------------------
-  // Launch optimization
-  // -----------------------------------
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  
-  Optimizer_thread* opt_thread = cgal_code_exude_mesh_3(*item,
-                                                        max_time,
-                                                        sliver_bound,
-                                                        create_new_item);
-
-  if ( NULL == opt_thread )
-  {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-  
-  source_item_ = item;
-  launch_thread(opt_thread, "Sliver exudation is running...");
-  QApplication::restoreOverrideCursor();
-}
-#endif
-
-
-Scene_c3t3_item*
-Mesh_3_optimization_plugin::
-get_c3t3_item() const
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  Scene_c3t3_item* item = qobject_cast<Scene_c3t3_item*>(scene->item(index));
-  
-  if ( NULL == item )
-  {
-    QMessageBox::warning(mw,tr(""),
-                          tr("Selected object is not a mesh... optimization can't be performed"));
-    return NULL;
-  }
-  
-  if ( NULL == item->data_item() )
-  {
-    QMessageBox::critical(mw,tr(""),
-                          tr("Can't perturb: data object has been destroyed !"));
-    return NULL;
-  }
-  
-  return item;
-}
-
-
-
-void
-Mesh_3_optimization_plugin::
-treat_result(Scene_c3t3_item& source_item,
-             Scene_c3t3_item& result_item,
-             const QString& name) const
-{
-  result_item.setName(tr("%1 [%2]").arg(source_item.name())
-                                   .arg(name));
-  
-  result_item.c3t3_changed();
-  
-  // If a new item has been created
-  if ( &source_item != &result_item)
-  {
-    const Scene_item::Bbox& bbox = result_item.bbox();
-    result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
-                            (bbox.ymin + bbox.ymax)/2.f,
-                            (bbox.zmin + bbox.zmax)/2.f);
-    
-    result_item.setColor(QColor(59,74,226));
-    result_item.setRenderingMode(source_item.renderingMode());
-    result_item.set_data_item(source_item.data_item());
-    
-    source_item.setVisible(false);
-    
-    const Scene_interface::Item_id index = scene->mainSelectionIndex();
-    scene->itemChanged(index);
-    
-    Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
-    scene->setSelectedItem(new_item_id);
-  }
-  else
-  {
-    result_item.update_histogram();
-    
-    const Scene_interface::Item_id index = scene->mainSelectionIndex();
-    scene->itemChanged(index);
-  }
-}
-
-
-void
-Mesh_3_optimization_plugin::
-optimization_done(Optimizer_thread* thread)
-{
-  CGAL::Mesh_optimization_return_code return_code = thread->return_code();
-  QString name = thread->optimizer_name();
-  
-  // Print message in console
-  QString str = QString("%1 of \"%2\" done in %3s<br>"
-                        "End reason: '%4'<br>")
-                  .arg(name)
-                  .arg(source_item_->name())
-                  .arg(thread->time())
-                  .arg(translate(return_code));
-  
-  Q_FOREACH( QString param, thread->parameters_log() )
-  {
-    str.append(QString("( %1 )<br>").arg(param));
-  }
-  
-  msg->information(qPrintable(str));
-  
-  // Treat new c3t3 item
-  Scene_c3t3_item* result_item = thread->item();
-  treat_result( *source_item_, *result_item, name);
-
-  // close message box
-  message_box_->close();
-  
-  // free memory
-  delete thread;
-}
-
-
-void
-Mesh_3_optimization_plugin::
-launch_thread(Optimizer_thread* opt_thread, const QString& window_text)
-{
-  // -----------------------------------
-  // Create message box with stop button
-  // -----------------------------------
-  message_box_ = new QMessageBox(QMessageBox::NoIcon,
-                                 "Optimization...",
-                                 window_text,
-                                 QMessageBox::Cancel,
-                                 mw);
-  
-  message_box_->setDefaultButton(QMessageBox::Cancel);
-  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
-  cancelButton->setText(tr("Stop"));
-  
-  QObject::connect(cancelButton, SIGNAL(clicked()),
-                   opt_thread,   SLOT(stop()));
-  
-  message_box_->show();
-  
-  // -----------------------------------
-  // Connect main thread to optimization thread and launch optimizer
-  // -----------------------------------
-  QObject::connect(opt_thread, SIGNAL(done(Optimizer_thread*)),
-                   this,       SLOT(optimization_done(Optimizer_thread*)));
-  
-  QObject::connect(opt_thread, SIGNAL(status_report(QString)),
-                   this,       SLOT(status_report(QString)));
-  
-  opt_thread->start();
-}
-
-
-void
-Mesh_3_optimization_plugin::
-status_report(QString str)
-{
-  if ( NULL == message_box_ ) { return; }
-  
-  message_box_->setInformativeText(str);
-}
-
-
-QString
-translate(CGAL::Mesh_optimization_return_code rc)
-{
-  switch (rc)
-  {
-    case CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR: return QString("Unexpected error");
-    case CGAL::BOUND_REACHED: return QString("Bound reached");
-    case CGAL::TIME_LIMIT_REACHED: return QString("Time limit reached");
-    case CGAL::CANT_IMPROVE_ANYMORE: return QString("Can't improve anymore");
-    case CGAL::CONVERGENCE_REACHED: return QString("Convergence reached");
-    case CGAL::MAX_ITERATION_NUMBER_REACHED: return QString("Max iteration number reached");
-    case CGAL::ALL_VERTICES_FROZEN: return QString("All vertices have been frozen");
-  }
-  
-  return QString("ERROR");
-}
-
-
-Q_EXPORT_PLUGIN2(Mesh_3_optimization_plugin, Mesh_3_optimization_plugin)
-
-#include "Mesh_3_optimization_plugin.moc"
-
-#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin.cpp
deleted file mode 100644
index 82e394f..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin.cpp
+++ /dev/null
@@ -1,431 +0,0 @@
-#include <boost/config.hpp>
-#if defined(BOOST_MSVC)
-#  pragma warning( disable : 4503)
-#endif
-
-#include "config.h"
-
-#include <CGAL_demo/Plugin_helper.h>
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Messages_interface.h>
-#include "ui_Meshing_dialog.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QMessageBox>
-#include <QInputDialog>
-#include <QFileDialog>
-#include <QTimer>
-
-#include "Scene_polyhedron_item.h"
-#include "Scene_segmented_image_item.h"
-#include "Scene_implicit_function_item.h"
-
-#include "implicit_functions/Implicit_function_interface.h"
-#include "Image_type.h"
-#include "Polyhedron_type.h"
-
-#include "Scene_c3t3_item.h"
-#include "Meshing_thread.h"
-
-#include <iostream>
-#include <fstream>
-#include <math.h>
-
-// Constants
-const QColor default_mesh_color(45,169,70);
-
-// declare the CGAL function
-Meshing_thread* cgal_code_mesh_3(const Polyhedron*,
-                                 const double angle,
-                                 const double sizing,
-                                 const double approx,
-                                 const double tets_sizing,
-                                 const double tet_shape,
-                                 const bool protect_features);
-
-#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
-Meshing_thread* cgal_code_mesh_3(const Image*,
-                                 const double angle,
-                                 const double sizing,
-                                 const double approx,
-                                 const double tets_sizing,
-                                 const double tet_shape);
-#endif
-
-#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
-Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface*,
-                                 const double angle,
-                                 const double sizing,
-                                 const double approx,
-                                 const double tets_sizing,
-                                 const double tet_shape);
-#endif
-
-double get_approximate(double d, int precision, int& decimals);
-
-
-
-class Mesh_3_plugin : 
-  public QObject,
-  protected Plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Plugin_interface)
-  
-  typedef Plugin_helper Base;
-public:
-  Mesh_3_plugin();
-  
-  using Base::init;
-  virtual void init(QMainWindow* mainWindow, 
-                    Scene_interface* scene_interface,
-                    Messages_interface* msg_interface)
-  {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionMesh_3 = this->getActionFromMainWindow(mw, "actionMeshing");
-    if(actionMesh_3)
-    {
-      connect(actionMesh_3, SIGNAL(triggered()), this, SLOT(mesh_3()));
-    }
-    
-    this->msg = msg_interface;
-  }
-
-  virtual QList<QAction*> actions() const
-  {
-    return QList<QAction*>() << actionMesh_3;
-  }
-  
-public slots:
-  void mesh_3();
-  void meshing_done(Meshing_thread* t);
-  void status_report(QString str);
-  
-private:
-  void launch_thread(Meshing_thread* mesh_thread);
-  void treat_result(Scene_item& source_item, Scene_c3t3_item& result_item) const;
-
-private:
-  QAction* actionMesh_3;
-  Messages_interface* msg;
-  QMessageBox* message_box_;
-  Scene_item* source_item_;
-  
-}; // end class Mesh_3_plugin
-
-Mesh_3_plugin::
-Mesh_3_plugin()
-  : actionMesh_3(NULL)
-  , msg(NULL)
-  , message_box_(NULL)
-  , source_item_(NULL)
-{
-}
-
-
-void Mesh_3_plugin::mesh_3()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  // -----------------------------------
-  // Check if selected item is meshable
-  // -----------------------------------
-  Scene_polyhedron_item* poly_item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-  Scene_segmented_image_item* image_item = 
-    qobject_cast<Scene_segmented_image_item*>(scene->item(index));
-  Scene_implicit_function_item* function_item = 
-    qobject_cast<Scene_implicit_function_item*>(scene->item(index));
-
-  // Get item
-  Scene_item* item = NULL;
-  if( NULL != poly_item ) { item = poly_item; }
-  else if( NULL != image_item ) { item = image_item; }
-  else if( NULL != function_item ) { item = function_item; }
-
-  if ( NULL == item )
-  {
-    QMessageBox::warning(mw,tr(""),
-                          tr("Selected object can't be meshed")); 
-    return;
-  }
-  
-  // -----------------------------------
-  // Create Mesh dialog
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::Meshing_dialog ui;
-  ui.setupUi(&dialog);
-  ui.sharpFeaturesGroup->setVisible(poly_item != 0);
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-
-  // Connect checkboxes to spinboxes
-  connect(ui.noApprox, SIGNAL(toggled(bool)),
-          ui.approx,   SLOT(setEnabled(bool)));
-
-  connect(ui.noFacetSizing, SIGNAL(toggled(bool)),
-          ui.facetSizing,   SLOT(setEnabled(bool)));
-
-  connect(ui.noAngle,    SIGNAL(toggled(bool)),
-          ui.facetAngle, SLOT(setEnabled(bool)));
-
-  connect(ui.noTetSizing, SIGNAL(toggled(bool)),
-          ui.tetSizing,   SLOT(setEnabled(bool)));
-
-  connect(ui.noTetShape, SIGNAL(toggled(bool)),
-          ui.tetShape,   SLOT(setEnabled(bool)));
-
-  // Set default parameters
-  Scene_interface::Bbox bbox = item->bbox();
-  ui.objectName->setText(item->name());
-  ui.objectNameSize->setText(tr("Object bbox size (w,h,d):  <b>%1</b>,  <b>%2</b>,  <b>%3</b>")
-                             .arg(bbox.width(),0,'g',3)
-                             .arg(bbox.height(),0,'g',3)
-                             .arg(bbox.depth(),0,'g',3) );
-  
-  double diag = bbox.diagonal_length();
-  int decimals = 0;
-  double sizing_default = get_approximate(diag * 0.05, 2, decimals);
-  ui.facetSizing->setDecimals(-decimals+2);
-  ui.facetSizing->setSingleStep(std::pow(10.,decimals));
-  ui.facetSizing->setRange(diag * 10e-6, // min
-                           diag); // max
-  ui.facetSizing->setValue(sizing_default); // default value
-  
-  ui.tetSizing->setDecimals(-decimals+2);
-  ui.tetSizing->setSingleStep(std::pow(10.,decimals));
-  ui.tetSizing->setRange(diag * 10e-6, // min
-                         diag); // max
-  ui.tetSizing->setValue(sizing_default); // default value
-  
-  double approx_default = get_approximate(diag * 0.005, 2, decimals);
-  ui.approx->setDecimals(-decimals+2);
-  ui.approx->setSingleStep(std::pow(10.,decimals));
-  ui.approx->setRange(diag * 10e-7, // min
-                      diag); // max
-  ui.approx->setValue(approx_default);
-
-  // -----------------------------------
-  // Get values
-  // -----------------------------------
-  int i = dialog.exec();
-  if( i == QDialog::Rejected ) { return; }
-  
-  // 0 means parameter is not considered
-  const double angle = !ui.noAngle->isChecked() ? 0 : ui.facetAngle->value();
-  const double approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
-  const double facet_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
-  const double radius_edge = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
-  const double tet_sizing = !ui.noTetSizing->isChecked() ? 0  : ui.tetSizing->value();
-  const bool protect_features = ui.protect->isChecked();
-
-  // -----------------------------------
-  // Dispatch mesh process
-  // -----------------------------------
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  
-  Meshing_thread* thread = NULL;
-  
-  // Polyhedron
-  if ( NULL != poly_item )
-  {
-    Polyhedron* pMesh = poly_item->polyhedron();
-    if( NULL == pMesh )
-    {
-      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
-      return;
-    }
-
-    thread = cgal_code_mesh_3(pMesh,
-                              angle, facet_sizing, approx,
-                              tet_sizing, radius_edge,
-                              protect_features);
-  }
-  // Image  
-#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
-  else if( NULL != image_item )
-  {
-    const Image* pImage = image_item->image();
-    if( NULL == pImage )
-    {
-      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
-      return;
-    }
-    
-    thread = cgal_code_mesh_3(pImage,
-                              angle, facet_sizing, approx,
-                              tet_sizing, radius_edge);
-  }
-#endif 
-  
-  // Function
-#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
-  else if( NULL != function_item )
-  {
-    const Implicit_function_interface* pFunction = function_item->function();
-    if( NULL == pFunction )
-    {
-      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
-      return;
-    }
-    
-    thread = cgal_code_mesh_3(pFunction,
-                              angle, facet_sizing, approx,
-                              tet_sizing, radius_edge);
-    
-  }
-#endif
-
-  if ( NULL == thread )
-  {
-    QMessageBox::critical(mw,tr(""),tr("ERROR: no thread created")); 
-    return;
-  }
-  
-  // Launch thread
-  source_item_ = item;
-  launch_thread(thread);
-  QApplication::restoreOverrideCursor();
-}
-
-
-void
-Mesh_3_plugin::
-launch_thread(Meshing_thread* mesh_thread)
-{
-  // -----------------------------------
-  // Create message box with stop button
-  // -----------------------------------
-  message_box_ = new QMessageBox(QMessageBox::NoIcon,
-                                 "Meshing",
-                                 "Mesh generation in progress...",
-                                 QMessageBox::Cancel,
-                                 mw);
-  
-  message_box_->setDefaultButton(QMessageBox::Cancel);
-  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
-  cancelButton->setText(tr("Stop"));
-  
-  QObject::connect(cancelButton, SIGNAL(clicked()),
-                   mesh_thread,  SLOT(stop()));
-  
-  message_box_->show();
-  
-  // -----------------------------------
-  // Connect main thread to meshing thread
-  // -----------------------------------
-  QObject::connect(mesh_thread, SIGNAL(done(Meshing_thread*)),
-                   this,        SLOT(meshing_done(Meshing_thread*)));
-  
-  QObject::connect(mesh_thread, SIGNAL(status_report(QString)),
-                   this,        SLOT(status_report(QString)));
-  
-  // -----------------------------------
-  // Launch mesher
-  // -----------------------------------
-  mesh_thread->start();
-}
-
-
-void
-Mesh_3_plugin::
-status_report(QString str)
-{
-  if ( NULL == message_box_ ) { return; }
-  
-  message_box_->setInformativeText(str);
-}
-
-
-void
-Mesh_3_plugin::
-meshing_done(Meshing_thread* thread)
-{
-  // Print message in console
-  QString str = QString("Meshing of \"%1\" done in %2s<br>")
-    .arg(source_item_->name())
-    .arg(thread->time());
-  
-  Q_FOREACH( QString param, thread->parameters_log() )
-  {
-    str.append(QString("( %1 )<br>").arg(param));
-  }
-  
-  Scene_c3t3_item* result_item = thread->item();
-  const Scene_item::Bbox& bbox = result_item->bbox();
-  str.append(QString("BBox (x,y,z): [ %1, %2 ], [ %3, %4 ], [ %5, %6 ], <br>")
-    .arg(bbox.xmin)
-    .arg(bbox.xmax)
-    .arg(bbox.ymin)
-    .arg(bbox.ymax)
-    .arg(bbox.zmin)
-    .arg(bbox.zmax));
-  
-  msg->information(qPrintable(str));
-  
-  // Treat new c3t3 item
-  treat_result(*source_item_, *result_item);
-  
-  // close message box
-  message_box_->close();
-  message_box_ = NULL;
-  
-  // free memory
-  // TODO: maybe there is another way to do that
-  delete thread;
-}
-
-
-void
-Mesh_3_plugin::
-treat_result(Scene_item& source_item,
-             Scene_c3t3_item& result_item) const
-{
-  result_item.setName(tr("%1 [3D Mesh]").arg(source_item.name()));
-
-  result_item.c3t3_changed();
-  
-  const Scene_item::Bbox& bbox = result_item.bbox();
-  result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
-                          (bbox.ymin + bbox.ymax)/2.f,
-                          (bbox.zmin + bbox.zmax)/2.f);
-    
-  result_item.setColor(default_mesh_color);
-  result_item.setRenderingMode(source_item.renderingMode());
-  result_item.set_data_item(&source_item);
-  
-  source_item.setVisible(false);
-    
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  scene->itemChanged(index);
-    
-  Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
-  scene->setSelectedItem(new_item_id);
-}
-
-
-double
-get_approximate(double d, int precision, int& decimals)
-{
-  if ( d<0 ) { return 0; }
-  
-  double i = std::pow(10.,precision-1);
-  
-  decimals = 0;
-  while ( d > i*10 ) { d = d/10.; ++decimals; }
-  while ( d < i ) { d = d*10.; --decimals; }
-  
-  return std::floor(d)*std::pow(10.,decimals);
-}
-
-
-Q_EXPORT_PLUGIN2(Mesh_3_plugin, Mesh_3_plugin)
-
-#include "Mesh_3_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_function.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_function.h
deleted file mode 100644
index b9e8e8e..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_function.h
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_DEMO_MESH_3_MESH_FUNCTION_H
-#define CGAL_DEMO_MESH_3_MESH_FUNCTION_H
-
-//#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1
-
-#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
-
-#include <QStringList>
-#include <QString>
-
-#include <CGAL/Mesh_3/Mesher_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
-
-#include "C3t3_type.h"
-#include "Meshing_thread.h"
-#include <CGAL/make_mesh_3.h> // for C3t3_initializer
-#include <CGAL/use.h>
-
-struct Mesh_parameters
-{
-  double facet_angle;
-  double facet_sizing;
-  double facet_approx;
-  
-  double tet_shape;
-  double tet_sizing;
-  bool protect_features;
-  
-  inline QStringList log() const;
-};
-
-
-template < typename EdgeCriteria >
-struct Edge_criteria_sizing_field_wrapper
-{
-  typedef typename EdgeCriteria::Index    Index;
-  typedef typename EdgeCriteria::FT       FT;
-  typedef typename EdgeCriteria::Point_3  Point_3;
-
-  Edge_criteria_sizing_field_wrapper(const EdgeCriteria& ec) : ec_(ec) {}
-  FT operator()(const Point_3& p, const int dim, const Index& index) const
-  { return ec_.sizing_field(p,dim,index); }
-
-private:
-  // No need to copy EdgeCriteria here
-  const EdgeCriteria& ec_;
-};
-
-
-template < typename Domain_ >
-class Mesh_function
-  : public Mesh_function_interface
-{
-  typedef Domain_ Domain;
-  
-public:
-  Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p);
-  
-  ~Mesh_function();
-  
-  // Launch
-  virtual void launch();
-  
-  // Stop
-  virtual void stop();
-  
-  // Logs
-  virtual QStringList parameters_log() const;
-  virtual QString status(double time_period) const;
-
-private:
-  typedef typename Domain::Point_3                  Point_3;
-  typedef typename Domain::Index                    Index;
-  typedef std::vector<std::pair<Point_3, Index> >   Initial_points_vector;
-  typedef typename Initial_points_vector::iterator  Ipv_iterator;
-  typedef C3t3::Vertex_handle                       Vertex_handle;
-  
-  typedef C3t3::Triangulation                       Tr;
-  typedef CGAL::Mesh_criteria_3<Tr>                 Mesh_criteria;
-  typedef Mesh_criteria::Edge_criteria              Edge_criteria;
-  typedef Mesh_criteria::Facet_criteria             Facet_criteria;
-  typedef Mesh_criteria::Cell_criteria              Cell_criteria;
-  
-  typedef CGAL::Mesh_3::Mesher_3<C3t3, Mesh_criteria, Domain>   Mesher;
-  
-private:
-  C3t3& c3t3_;
-  Domain* domain_;
-  Mesh_parameters p_;
-  bool continue_;
-  Mesher* mesher_;
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-  mutable typename Mesher::Mesher_status last_report_;
-#endif
-};
-
-
-
-// -----------------------------------
-// Class Mesh_parameters
-// -----------------------------------
-inline
-QStringList
-Mesh_parameters::
-log() const
-{
-  return QStringList()
-  << QString("facet min angle: %1").arg(facet_angle)
-  << QString("facet max size: %1").arg(facet_sizing)
-  << QString("facet approx error: %1").arg(facet_approx)
-  << QString("tet shape (radius-edge): %1").arg(tet_shape)
-  << QString("tet max size: %1").arg(tet_sizing)
-  << QString("protect features: %1").arg(protect_features);
-}
-
-
-// -----------------------------------
-// Class Mesh_function
-// -----------------------------------
-template < typename D_ >
-Mesh_function<D_>::
-Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p)
-: c3t3_(c3t3)
-, domain_(domain)
-, p_(p)
-, continue_(true)
-, mesher_(NULL)
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-, last_report_(0,0,0)
-#endif
-{
-#ifdef CGAL_CONCURRENT_MESH_3
-  Concurrent_mesher_config::load_config_file(CONFIG_FILENAME, false);
-#endif
-}
-
-
-template < typename D_ >
-Mesh_function<D_>::
-~Mesh_function()
-{
-  delete domain_;
-  delete mesher_;
-}
-
-
-template < typename D_ >
-void
-Mesh_function<D_>::
-launch()
-{
-#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
-  CGAL::default_random = CGAL::Random(0);
-#endif
-
-  // Create mesh criteria
-  Mesh_criteria criteria(Edge_criteria(p_.facet_sizing),
-                         Facet_criteria(p_.facet_angle,
-                                        p_.facet_sizing,
-                                        p_.facet_approx),
-                         Cell_criteria(p_.tet_shape,
-                                       p_.tet_sizing));
-
-  // Initialization of the mesh, either with the protection of sharp
-  // features, or with the initial points (or both).
-  CGAL::internal::Mesh_3::C3t3_initializer<
-    C3t3,
-    Domain,
-    Mesh_criteria,
-    CGAL::internal::Mesh_3::has_Has_features<Domain>::value >()
-    (c3t3_,
-     *domain_,
-     criteria,
-     p_.protect_features);
-
-  // Build mesher and launch refinement process
-  mesher_ = new Mesher(c3t3_, *domain_, criteria);
-  mesher_->refine_mesh();
-  /*mesher_->initialize();
-  
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-  while ( ! mesher_->is_algorithm_done() && continue_ )
-  {
-    mesher_->one_step();
-  }
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Full refinement time (without fix_c3t3): " << t.elapsed() << " seconds." << std::endl;
-#endif
-  */
-  
-  // Ensure c3t3 is ok (usefull if process has been stop by the user)
-  mesher_->fix_c3t3();
-}
-
-
-template < typename D_ >
-void
-Mesh_function<D_>::
-stop()
-{
-  continue_ = false;
-}
-
-
-template < typename D_ >
-QStringList
-Mesh_function<D_>::
-parameters_log() const
-{
-  return p_.log();
-}
-
-
-template < typename D_ >
-QString
-Mesh_function<D_>::
-status(double time_period) const
-{
-  QString result;
-
-  CGAL_USE(time_period); // to avoid a warning when the macro
-                         // CGAL_MESH_3_MESHER_STATUS_ACTIVATED is not
-                         // defined
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-  // If mesher_ is not yet created, it means that either launch() has not
-  // been called or that initial points have not been founded
-  if ( NULL == mesher_ )
-  {
-    return QString("Initialization in progress...");
-  }
-  
-  // Get status and return a string corresponding to it
-  typename Mesher::Mesher_status s = mesher_->status();
-  
-  result = QString("Vertices: %1 \n"
-                           "Vertices inserted last %2s: %3 \n\n"
-                           "Bad facets: %4 \n"
-                           "Bad cells: %5")
-    .arg(s.vertices)
-    .arg(time_period)
-    .arg(s.vertices - last_report_.vertices)
-    .arg(s.facet_queue)
-    .arg(s.cells_queue);
-  
-  last_report_ = s;
-#endif
-  return result;
-}
-
-#endif // CGAL_DEMO_MESH_3_MESH_FUNCTION_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.cpp
deleted file mode 100644
index e21b5a5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include "config.h"
-
-#include <QTime>
-#include <QApplication>
-
-#include "Meshing_thread.h"
-#include "Scene_c3t3_item.h"
-
-
-Meshing_thread::
-Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item)
-  : f_(f)
-  , item_(item)
-  , time_(0)
-  , timer_(new QTimer(this))
-  , timer_period_(1)
-{
-  connect(timer_, SIGNAL(timeout()),
-          this,   SLOT(emit_status()));
-  
-  timer_->start(static_cast<int>(timer_period_*1000));  
-}
-
-
-Meshing_thread::
-~Meshing_thread()
-{
-  delete f_;
-  delete timer_;
-  QApplication::restoreOverrideCursor();
-}
-
-
-void
-Meshing_thread::
-run()
-{
-  QTime timer;
-  timer.start();
-  
-  f_->launch();
-  time_ = double(timer.elapsed()) / 1000;
-  
-  emit done(this);
-}
-
-
-void
-Meshing_thread::
-stop()
-{
-  f_->stop();
-  
-  // Block application until thread is deleted
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-}
-
-
-void
-Meshing_thread::
-emit_status()
-{
-  emit (status_report(f_->status(timer_period_)));
-}
-
-
-#include "Meshing_thread.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.h
deleted file mode 100644
index 9e2fc40..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Meshing_thread.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_DEMO_MESH_3_MESHING_THREAD_H
-#define CGAL_DEMO_MESH_3_MESHING_THREAD_H
-
-#include <QThread>
-#include <QObject>
-#include <QStringList>
-#include <QString>
-#include <QTimer>
-
-class Scene_c3t3_item;
-
-class Mesh_function_interface
-{
-public:
-  virtual ~Mesh_function_interface() {}
-  
-  // Launch
-  virtual void launch() = 0;
-  
-  // Stop
-  virtual void stop() = 0;
-  
-  // Logs
-  virtual QStringList parameters_log() const = 0;
-  virtual QString status(double time_period) const = 0;
-};
-
-
-class Meshing_thread : public QThread
-{
-  Q_OBJECT
-public:
-  // Constructor / Destructor
-  Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item);
-  virtual ~Meshing_thread();
-  
-  // Scene item
-  Scene_c3t3_item* item() const { return item_; }
-  
-  // Infos about meshing
-  double time() const { return time_; }
-  
-  // Logs
-  QStringList parameters_log() const { return f_->parameters_log(); }
-  
-public slots:
-  // Stop
-  void stop();
-  
-private slots:
-  // emit signal status report
-  void emit_status();
-  
-signals:
-  // Emitted at the end of the process
-  void done(Meshing_thread*);
-  // Informs about status of meshing
-  void status_report(QString);
-  
-protected:
-  // Overload of QThread function
-  virtual void run();
-  
-private:
-  Mesh_function_interface* f_;
-  Scene_c3t3_item* item_;
-  double time_; // in seconds
-  QTimer* timer_;
-  double timer_period_;
-};
-
-#endif // CGAL_DEMO_MESH_3_MESHING_THREAD_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.cpp
deleted file mode 100644
index 01ac43a..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include "config.h"
-
-#include <QTime>
-#include <QTimer>
-#include "Optimizer_thread.h"
-#include "Scene_c3t3_item.h"
-
-
-Optimizer_thread::
-Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item)
-  : f_(f)
-  , item_(item)
-  , rc_()
-  , time_(0)
-  , timer_(new QTimer(this))
-  , timer_period_(1)
-{
-  connect(timer_, SIGNAL(timeout()),
-          this,   SLOT(emit_status()));
-  
-  timer_->start(static_cast<int>(timer_period_*1000));  
-}
-
-
-Optimizer_thread::~Optimizer_thread()
-{
-  delete f_;
-}
-
-
-void
-Optimizer_thread::
-run()
-{
-  QTime timer;
-  timer.start();
-  
-  rc_ = f_->launch();
-  time_ = double(timer.elapsed()) / 1000;
-  
-  emit done(this);
-}
-
-
-void
-Optimizer_thread::
-stop()
-{
-  f_->stop();
-}
-
-void
-Optimizer_thread::
-emit_status()
-{
-  emit (status_report(f_->status(timer_period_)));
-}
-
-
-#include "Optimizer_thread.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.h
deleted file mode 100644
index ad46fb4..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Optimizer_thread.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef DEMO_MESH_3_OPTIMIZER_THREAD_H
-#define DEMO_MESH_3_OPTIMIZER_THREAD_H
-
-#include <QThread>
-#include <QObject>
-#include <QString>
-#include <QStringList>
-#include <QTimer>
-
-#include <CGAL/Mesh_optimization_return_code.h>
-
-class Scene_c3t3_item;
-
-class Optimization_function_interface
-{
-public:
-  virtual ~Optimization_function_interface() {}
-  
-  // Launch
-  virtual CGAL::Mesh_optimization_return_code launch() = 0;
-  
-  // Stop
-  virtual void stop() = 0;
-  
-  // Logs
-  virtual QString name() const = 0;
-  virtual QStringList parameters_log() const = 0;
-  virtual QString status(double time_period) const = 0;
-};
-
-
-class Optimizer_thread : public QThread
-{
-  Q_OBJECT
-public:
-  Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item);
-  virtual ~Optimizer_thread();
-  
-  // Scene item
-  Scene_c3t3_item* item() const { return item_; }
-  
-  // Infos about optimization
-  CGAL::Mesh_optimization_return_code return_code() const { return rc_; }
-  double time() const { return time_; }
-  
-  // Logs
-  QString optimizer_name() const { return f_->name(); }
-  QStringList parameters_log() const { return f_->parameters_log(); }
-  
-public slots:
-  // Stop
-  void stop();
-  
-private slots:
-  // emit signal status report
-  void emit_status();
-  
-signals:
-  // Emitted at the end of the process
-  void done(Optimizer_thread*);
-  // Informs about status of the process
-  void status_report(QString);
-  
-protected:
-  // Overload of QThread function
-  virtual void run();
-  
-private:
-  Optimization_function_interface* f_;
-  Scene_c3t3_item* item_;
-  CGAL::Mesh_optimization_return_code rc_;
-  double time_; // in seconds
-  QTimer* timer_;
-  double timer_period_;
-};
-
-#endif // DEMO_MESH_3_OPTIMIZER_THREAD_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.cpp
deleted file mode 100644
index 98207c2..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.cpp
+++ /dev/null
@@ -1,619 +0,0 @@
-#include "config.h"
-
-#include "Scene_c3t3_item.h"
-
-#include <QVector>
-#include <QColor>
-#include <QPixmap>
-#include <QPainter>
-
-#include <map>
-#include <vector>
-#include <CGAL/gl.h>
-#include <CGAL/Mesh_3/dihedral_angle_3.h>
-
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include <CGAL_demo/Scene_interface.h>
-#include <QtCore/qglobal.h>
-#include <CGAL/gl.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-namespace {
-  void CGALglcolor(QColor c, int dv = 0)
-  {
-    if ( 0 != dv )
-    {
-// workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define darker dark
-#endif
-      c = c.darker(dv);
-#undef darker
-    }
-    
-    ::glColor4f(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-  }
-}
-
-template<typename C3t3>
-std::vector<int>
-create_histogram(const C3t3& c3t3, double& min_value, double& max_value);
-
-
-enum { DRAW = 0, DRAW_EDGES = 1 };
-
-void draw_triangle(const Kernel::Point_3& pa,
-                          const Kernel::Point_3& pb,
-                          const Kernel::Point_3& pc) {
-  Kernel::Vector_3 n = cross_product(pb - pa, pc -pa);
-  n = n / CGAL::sqrt(n*n);
-
-  ::glNormal3d(n.x(),n.y(),n.z());
-
-  ::glVertex3d(pa.x(),pa.y(),pa.z());
-  ::glVertex3d(pb.x(),pb.y(),pb.z());
-  ::glVertex3d(pc.x(),pc.y(),pc.z());
-}
-
-double complex_diag(const Scene_item* item) {
-  const Scene_item::Bbox& bbox = item->bbox();
-  const double& xdelta = bbox.xmax-bbox.xmin;
-  const double& ydelta = bbox.ymax-bbox.ymin;
-  const double& zdelta = bbox.zmax-bbox.zmin;
-  const double diag = std::sqrt(xdelta*xdelta +
-                                ydelta*ydelta +
-                                zdelta*zdelta);
-  return diag * 0.7;
-}
-
-
-struct Scene_c3t3_item_priv {
-  Scene_c3t3_item_priv() : c3t3() {}
-  Scene_c3t3_item_priv(const C3t3& c3t3_) : c3t3(c3t3_) {}
-
-  C3t3 c3t3;
-  QVector<QColor> colors;
-};
-
-
-Scene_c3t3_item::
-Scene_c3t3_item()
-  : d(new Scene_c3t3_item_priv())
-  , frame(new ManipulatedFrame())
-  , histogram_()
-  , data_item_(NULL)
-  , indices_()
-{
-  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
-  c3t3_changed();
-}
-
-Scene_c3t3_item::Scene_c3t3_item(const C3t3& c3t3)
-  : d(new Scene_c3t3_item_priv(c3t3)), frame(new ManipulatedFrame())
-  , histogram_(), data_item_(NULL), indices_()
-{
-  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
-  c3t3_changed();
-}
-
-Scene_c3t3_item::~Scene_c3t3_item()
-{
-  delete frame;
-  delete d;
-}
-
-const C3t3& 
-Scene_c3t3_item::c3t3() const {
-  return d->c3t3;
-}
-
-C3t3& 
-Scene_c3t3_item::c3t3()
-{
-  return d->c3t3;
-}
-
-Kernel::Plane_3 
-Scene_c3t3_item::plane() const {
-  const qglviewer::Vec& pos = frame->position();
-  const qglviewer::Vec& n =
-    frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-  return Kernel::Plane_3(n[0], n[1],  n[2], - n * pos);
-}
-
-Scene_item::Bbox 
-Scene_c3t3_item::bbox() const {
-  if(isEmpty())
-    return Bbox();
-  else {
-    CGAL::Bbox_3 result = c3t3().triangulation().finite_vertices_begin()->point().bbox();
-    for(Tr::Finite_vertices_iterator
-          vit = ++c3t3().triangulation().finite_vertices_begin(),
-          end = c3t3().triangulation().finite_vertices_end();
-        vit != end; ++vit)
-    {
-      result = result + vit->point().bbox();
-    }
-    return Bbox(result.xmin(), result.ymin(), result.zmin(),
-                result.xmax(), result.ymax(), result.zmax());
-  }
-}
-
-QString 
-Scene_c3t3_item::toolTip() const {
-  int number_of_tets = 0;
-  for(Tr::Finite_cells_iterator
-        cit = c3t3().triangulation().finite_cells_begin(),
-        end = c3t3().triangulation().finite_cells_end();
-      cit != end; ++cit)
-  {
-    if( c3t3().is_in_complex(cit) )
-      ++number_of_tets;
-  }
-  return tr("<p>3D complex in a 3D triangulation:<br />"
-            "<b>%4</b></p>"
-            "<p>Number of vertices: %1<br />"
-            "Number of surface facets: %2<br />"
-            "Number of volume tetrahedra: %3</p>")
-    .arg(c3t3().triangulation().number_of_vertices())
-    .arg(c3t3().number_of_facets_in_complex())
-    .arg(number_of_tets)
-    .arg(this->name());
-}
-
-void
-Scene_c3t3_item::direct_draw() const {
-  direct_draw(DRAW);
-}
-
-void
-Scene_c3t3_item::direct_draw_edges() const {
-  direct_draw(DRAW_EDGES);
-}
-
-void
-Scene_c3t3_item::direct_draw(int mode) const {
-  ::glPushMatrix();
-  ::glMultMatrixd(frame->matrix());
-  QGLViewer::drawGrid((float)complex_diag(this));
-  ::glPopMatrix();
-
-  if(isEmpty())
-    return;
-
-  CGALglcolor(QColor(0,0,0));
-
-  //std::cerr << "Direct_draw " << mode << "\n";
-  GLboolean lighting = ::glIsEnabled(GL_LIGHTING);
-  GLboolean two_side;
-  ::glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &two_side);
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  if(!lighting)
-    ::glDisable(GL_LIGHTING);
-
-  const Kernel::Plane_3& plane = this->plane();
-
-  ::glBegin(GL_TRIANGLES);
-  for(C3t3::Facets_in_complex_iterator
-        fit = c3t3().facets_in_complex_begin(),
-        end = c3t3().facets_in_complex_end();
-      fit != end; ++fit)
-  {
-    const Tr::Cell_handle& cell = fit->first;
-    const int& index = fit->second;
-    if(cell->subdomain_index() != 0 &&
-       cell->neighbor(index)->subdomain_index() != 0)
-    {
-      continue;
-    }
-
-    const Kernel::Point_3& pa = cell->vertex((index+1)&3)->point();
-    const Kernel::Point_3& pb = cell->vertex((index+2)&3)->point();
-    const Kernel::Point_3& pc = cell->vertex((index+3)&3)->point();
-    typedef Kernel::Oriented_side Side;
-    using CGAL::ON_ORIENTED_BOUNDARY;
-    using CGAL::ON_NEGATIVE_SIDE;
-    const Side sa = plane.oriented_side(pa);
-    const Side sb = plane.oriented_side(pb);
-    const Side sc = plane.oriented_side(pc);
-    if(sa == ON_NEGATIVE_SIDE &&
-       sb == ON_NEGATIVE_SIDE && 
-       sc == ON_NEGATIVE_SIDE)
-    {
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-      if(mode != DRAW_EDGES) 
-      {
-        Tr::Facet mirror_facet = c3t3().triangulation().mirror_facet(*fit);
-        //int mirror_index = c3t3().triangulation().mirror_index(cell, index);
-        bool blueOrRed = false;
-        if(cell->mark == index || mirror_facet.first->mark == mirror_facet.second) 
-        {
-          std::cerr << "================== BAD TRIANGLE =================" << std::endl;
-          blueOrRed = true;
-                    
-          if(cell->mark2 != -1)
-          {
-            const Kernel::Point_3& pa2 = cell->vertex((cell->mark2+1)&3)->point();
-            const Kernel::Point_3& pb2 = cell->vertex((cell->mark2+2)&3)->point();
-            const Kernel::Point_3& pc2 = cell->vertex((cell->mark2+3)&3)->point();
-          
-            CGALglcolor(QColor("blue"));  
-            std::cerr << "================== BLUE =================" << std::endl;
-            draw_triangle(pa2, pb2, pc2);
-            
-            const Tr::Facet f_blue(cell, cell->mark2);
-            Tr::Facet mirror_f_blue = c3t3().triangulation().mirror_facet(f_blue);
-            const Kernel::Point_3& dual_edge_pa = c3t3().triangulation().dual(f_blue.first);
-            const Kernel::Point_3& dual_edge_pb = c3t3().triangulation().dual(mirror_f_blue.first);
-            const Kernel::Point_3& dual_edge_pc = dual_edge_pa + Kernel::Vector_3(0.001, 0., 0.);
-            CGALglcolor(QColor("yellow"));
-            draw_triangle(dual_edge_pa, dual_edge_pb, dual_edge_pc);
-          }
-          else if(mirror_facet.first->mark2 != -1)
-          {
-            const Kernel::Point_3& pa2 = mirror_facet.first->vertex((mirror_facet.first->mark2+1)&3)->point();
-            const Kernel::Point_3& pb2 = mirror_facet.first->vertex((mirror_facet.first->mark2+2)&3)->point();
-            const Kernel::Point_3& pc2 = mirror_facet.first->vertex((mirror_facet.first->mark2+3)&3)->point();
-          
-            CGALglcolor(QColor("blue"));
-            std::cerr << "================== BLUE =================" << std::endl;
-            draw_triangle(pa2, pb2, pc2);
-
-            const Tr::Facet f_blue(mirror_facet.first, mirror_facet.first->mark2);
-            Tr::Facet mirror_f_blue = c3t3().triangulation().mirror_facet(f_blue);
-            const Kernel::Point_3& dual_edge_pa = c3t3().triangulation().dual(f_blue.first);
-            const Kernel::Point_3& dual_edge_pb = c3t3().triangulation().dual(mirror_f_blue.first);
-            const Kernel::Point_3& dual_edge_pc = dual_edge_pa + Kernel::Vector_3(0.001, 0., 0.);
-            CGALglcolor(QColor("yellow"));
-            draw_triangle(dual_edge_pa, dual_edge_pb, dual_edge_pc);
-          }
-
-          /*
-          //const Kernel::Point_3& dual_edge_pa = cell->circumcenter();
-          //const Kernel::Point_3& dual_edge_pb = mirror_facet.first->circumcenter();
-          const Kernel::Point_3& dual_edge_pa = c3t3().triangulation().dual(cell);
-          const Kernel::Point_3& dual_edge_pb = c3t3().triangulation().dual(mirror_facet.first);
-          const Kernel::Point_3& dual_edge_pc = dual_edge_pa + Kernel::Vector_3(0.001, 0., 0.);
-          CGALglcolor(QColor("yellow"));
-          draw_triangle(dual_edge_pa, dual_edge_pb, dual_edge_pc);
-          */
-        }
-        else
-        {
-          if(cell->subdomain_index() == 0) {
-            CGALglcolor(d->colors[cell->neighbor(index)->subdomain_index()]);
-          }
-          else {
-            CGALglcolor(d->colors[cell->subdomain_index()]);
-          }
-          draw_triangle(pa, pb, pc);
-        }
-      }
-
-      /*if(mode != DRAW_EDGES) {
-
-        Tr::Facet mirror_facet = c3t3().triangulation().mirror_facet(*fit);
-        //int mirror_index = c3t3().triangulation().mirror_index(cell, index);
-        bool blueOrRed = false;
-        if(cell->mark == index || mirror_facet.first->mark == mirror_facet.second) {
-        //if (cell->mark != -1 || cell->neighbor(index)->mark != -1) {
-          CGALglcolor(QColor("red"));
-          std::cerr << "================== RED =================" << std::endl;
-          blueOrRed = true;
-        }
-        
-        if(cell->mark2 == index || mirror_facet.first->mark2 == mirror_facet.second) {
-        //if(cell->mark2 != -1 || mirror_facet.first->mark2 != -1) {
-          CGALglcolor(QColor("blue"));
-          std::cerr << "================== BLUE =================" << std::endl;
-          blueOrRed = true;
-        }
-
-        if (!blueOrRed)
-        {
-          if(cell->subdomain_index() == 0) {
-            CGALglcolor(d->colors[cell->neighbor(index)->subdomain_index()]);
-          }
-          else {
-            CGALglcolor(d->colors[cell->subdomain_index()]);
-          }
-        }
-      }
-      draw_triangle(pa, pb, pc);*/
-
-#else
-      if(mode != DRAW_EDGES) {
-        if(cell->subdomain_index() == 0) {
-          CGALglcolor(d->colors[cell->neighbor(index)->subdomain_index()]);
-        }
-        else {
-          CGALglcolor(d->colors[cell->subdomain_index()]);
-        }
-      }
-      draw_triangle(pa, pb, pc);
-#endif
-    }
-  }
-  ::glEnd();
-
-  ::glBegin(GL_TRIANGLES);
-  for(Tr::Finite_cells_iterator
-        cit = c3t3().triangulation().finite_cells_begin(),
-        end = c3t3().triangulation().finite_cells_end();
-      cit != end; ++cit)
-  {
-    if(! c3t3().is_in_complex(cit) )
-      continue;
-
-    const Kernel::Point_3& pa = cit->vertex(0)->point();
-    const Kernel::Point_3& pb = cit->vertex(1)->point();
-    const Kernel::Point_3& pc = cit->vertex(2)->point();
-    const Kernel::Point_3& pd = cit->vertex(3)->point();
-    typedef Kernel::Oriented_side Side;
-    using CGAL::ON_ORIENTED_BOUNDARY;
-    const Side sa = plane.oriented_side(pa);
-    const Side sb = plane.oriented_side(pb);
-    const Side sc = plane.oriented_side(pc);
-    const Side sd = plane.oriented_side(pd);
-
-    if( sa == ON_ORIENTED_BOUNDARY ||
-        sb == ON_ORIENTED_BOUNDARY ||
-        sc == ON_ORIENTED_BOUNDARY ||
-        sd == ON_ORIENTED_BOUNDARY ||
-        sb != sa || sc != sa || sd != sa)
-    {
-      if(mode != DRAW_EDGES) {
-        CGALglcolor(d->colors[cit->subdomain_index()],150);
-      }
-      else
-      {
-        CGALglcolor(d->colors[cit->subdomain_index()],250);
-      }
-      draw_triangle(pa, pb, pc);
-      draw_triangle(pa, pb, pd);
-      draw_triangle(pa, pc, pd);
-      draw_triangle(pb, pc, pd);
-    }
-  }
-  ::glEnd();
-  
-  if(!two_side)
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-  if(lighting)
-    ::glEnable(GL_LIGHTING);
-  else
-    ::glDisable(GL_LIGHTING);
-}
-
-
-QPixmap
-Scene_c3t3_item::graphicalToolTip() const
-{
-  if ( ! histogram_.isNull() )
-  {
-    return histogram_;
-  }
-  else
-  {
-    const_cast<Scene_c3t3_item&>(*this).build_histogram();
-    return histogram_;
-  }
-}
- 
-void
-Scene_c3t3_item::build_histogram()
-{
-#ifdef CGAL_MESH_3_DEMO_BIGGER_HISTOGRAM_WITH_WHITE_BACKGROUNG
-  // Create an histogram_ and display it
-  const int height = 280;
-  const int top_margin = 5;
-  const int left_margin = 20;
-  const int drawing_height = height-top_margin*2;
-  const int width = 804;
-  const int cell_width = 4;
-  const int text_margin = 3;
-  const int text_height = 34;
-  
-  histogram_ = QPixmap(width,height+text_height);
-  histogram_.fill(QColor(255,255,255));
-#else
-  // Create an histogram_ and display it
-  const int height = 140;
-  const int top_margin = 5;
-  const int left_margin = 20;
-  const int drawing_height = height-top_margin*2;
-  const int width = 402;
-  const int cell_width = 2;
-  const int text_margin = 3;
-  const int text_height = 20;
-  
-  histogram_ = QPixmap(width,height+text_height);
-  histogram_.fill(QColor(192,192,192));
-#endif  
-
-  QPainter painter(&histogram_);
-  painter.setPen(Qt::black);
-  painter.setBrush(QColor(128,128,128));
-  //painter.setFont(QFont("Arial", 30));
-  
-  // Build histogram_ data
-  double min_value, max_value;
-  std::vector<int> histo_data = create_histogram(c3t3(),min_value,max_value);
-  
-  // Get maximum value (to normalize)
-  int max_size = 0;
-  for ( std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end() ;
-       it != end ; ++it )
-  {
-    max_size = (std::max)(max_size,*it);
-  }
-  
-  // colored histogram
-  int j = 0;
-  
-  // draw
-  int i=left_margin;
-  for ( std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end() ;
-       it != end ; ++it, i+=cell_width )
-  {
-    int line_height = static_cast<int>( std::ceil(static_cast<double>(drawing_height) *
-      static_cast<double>(*it)/static_cast<double>(max_size)) + .5);
-    
-    painter.fillRect(i,
-                     drawing_height+top_margin-line_height,
-                     cell_width,
-                     line_height,
-                     get_histogram_color(j++));
-  }
-  
-  // draw bottom horizontal line
-  painter.setPen(Qt::blue);
-  
-  painter.drawLine(QPoint(left_margin, drawing_height + top_margin),
-                   QPoint(left_margin + static_cast<int>(histo_data.size())*cell_width, 
-                          drawing_height + top_margin));
-
-  
-  // draw min value and max value
-  const int min_tr_width = static_cast<int>( 2*(std::floor(min_value)*cell_width + left_margin) );
-  const int max_tr_width = static_cast<int>( 
-    2*((histo_data.size()-std::floor(max_value))*cell_width + left_margin) );
-  const int tr_y = drawing_height + top_margin + text_margin;
-  
-  painter.setPen(get_histogram_color(min_value));
-  QRect min_text_rect (0, tr_y, min_tr_width, text_height);
-  painter.drawText(min_text_rect, Qt::AlignCenter, tr("%1").arg(min_value,0,'f',1));
-  
-  painter.setPen(get_histogram_color(max_value));           
-  QRect max_text_rect (width - max_tr_width, tr_y, max_tr_width, text_height);
-  painter.drawText(max_text_rect, Qt::AlignCenter, tr("%1").arg(max_value,0,'f',1));
-}
-
-
-template<typename C3t3>
-std::vector<int>
-create_histogram(const C3t3& c3t3, double& min_value, double& max_value)
-{
-  typedef typename C3t3::Triangulation::Point Point_3;
-  
-	std::vector<int> histo(181,0);
-  
-  min_value = 180.;
-  max_value = 0.;
-  
-	for (typename C3t3::Cells_in_complex_iterator cit = c3t3.cells_in_complex_begin() ;
-       cit != c3t3.cells_in_complex_end() ;
-       ++cit)
-	{
-		if( !c3t3.is_in_complex(cit))
-			continue;
-		
-#ifdef CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
-    if (c3t3.in_dimension(cit->vertex(0)) <= 1
-     || c3t3.in_dimension(cit->vertex(1)) <= 1
-     || c3t3.in_dimension(cit->vertex(2)) <= 1
-     || c3t3.in_dimension(cit->vertex(3)) <= 1)
-      continue;
-#endif //CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
-		
-		const Point_3& p0 = cit->vertex(0)->point();
-		const Point_3& p1 = cit->vertex(1)->point();
-		const Point_3& p2 = cit->vertex(2)->point();
-		const Point_3& p3 = cit->vertex(3)->point();
-		
-		double a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0,p1,p2,p3)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p2, p1, p3)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p3, p1, p2)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p2, p0, p3)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p3, p0, p2)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p2, p3, p0, p1)));
-		histo[static_cast<int>(std::floor(a))] += 1;
-    min_value = (std::min)(min_value, a);
-    max_value = (std::max)(max_value, a);
-    
-	}
-  
-	return histo;	
-}
-
-
-QColor
-Scene_c3t3_item::get_histogram_color(const double v) const
-{
-  if ( v < 5 )            { return Qt::red; }
-  else if ( v < 10 )      { return QColor(215,108,0); }
-  else if ( v < 15 )      { return QColor(138,139,0); }
-  else if ( v < 165 )     { return QColor(60,136,64); }
-  else if ( v < 170 )     { return QColor(138,139,1); }
-  else if ( v < 175 )     { return QColor(215,108,0); }
-  else /* 175<v<=180 */   { return Qt::red; }
-}
-
-
-void
-Scene_c3t3_item::setColor(QColor c)
-{
-  color_ = c;
-  compute_color_map(c);
-}
-
-void
-Scene_c3t3_item::c3t3_changed()
-{
-  // Update colors
-  // Fill indices map and get max subdomain value
-  indices_.clear();
-  
-  int max = 0;
-  for(C3t3::Cells_in_complex_iterator cit = this->c3t3().cells_in_complex_begin(),
-      end = this->c3t3().cells_in_complex_end() ; cit != end; ++cit)
-  {
-    max = (std::max)(max, cit->subdomain_index());
-    indices_.insert(cit->subdomain_index());
-  }
-
-  d->colors.resize(max+1);
-  compute_color_map(color_);
-  
-  // Rebuild histogram
-  build_histogram();
-}
-
-void
-Scene_c3t3_item::compute_color_map(const QColor& c)
-{
-  typedef Indices::size_type size_type;
-
-  size_type nb_domains = indices_.size();
-  size_type i = 0;
-  for(Indices::iterator it = indices_.begin(), end = indices_.end();
-      it != end; ++it, ++i)
-  {
-    double hue = c.hueF() + 1./nb_domains * i;
-    if ( hue > 1 ) { hue -= 1.; }
-    d->colors[*it] = QColor::fromHsvF(hue, c.saturationF(), c.valueF());
-  }
-}
-
-#include "Scene_c3t3_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.h
deleted file mode 100644
index 339ab98..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item.h
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef SCENE_C3T3_ITEM_H
-#define SCENE_C3T3_ITEM_H
-
-#include "Scene_c3t3_item_config.h"
-#include "C3t3_type.h"
-#include <CGAL_demo/Scene_item_with_display_list.h>
-
-#include <QVector>
-#include <QColor>
-#include <set>
-
-#include <QtCore/qglobal.h>
-#include <CGAL/gl.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-struct Scene_c3t3_item_priv;
-
-class SCENE_C3T3_ITEM_EXPORT Scene_c3t3_item
-  : public Scene_item_with_display_list
-{
-  Q_OBJECT
-public:
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
-  Scene_c3t3_item();
-  Scene_c3t3_item(const C3t3& c3t3);
-  ~Scene_c3t3_item();
-
-  const C3t3& c3t3() const;
-  C3t3& c3t3();
-  
-  bool manipulatable() const {
-    return true;
-  }
-
-  ManipulatedFrame* manipulatedFrame() {
-    return frame;
-  }
-
-  void setPosition(float x, float y, float z) {
-    frame->setPosition(x, y, z);
-  }
-
-  void setNormal(float x, float y, float z) {
-    frame->setOrientation(x, y, z, 0.f);
-  }
-
-  Kernel::Plane_3 plane() const;
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const {
-    return c3t3().triangulation().number_of_vertices() == 0;
-  }
-
-  Bbox bbox() const;
-
-  Scene_c3t3_item* clone() const {
-    return 0;
-  }
-
-  QString toolTip() const;
-  virtual QPixmap graphicalToolTip() const;
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m != Gouraud); // CHECK THIS!
-  }
-
-  void direct_draw() const;
-  void direct_draw_edges() const;
-  
-  // data item
-  inline const Scene_item* data_item() const;
-  inline void set_data_item(const Scene_item* data_item);
-  
-  // rebuild histogram
-  inline void update_histogram();
-  
-  // Call this if c3t3 has been modified
-  void c3t3_changed();
-
-public slots:
-  inline void data_item_destroyed();
-  virtual void setColor(QColor c);
-  
-private:
-  void build_histogram();
-  void compute_color_map(const QColor& c);
-  QColor get_histogram_color(const double v) const;
-  
-protected:
-  void direct_draw(int) const;
-  Scene_c3t3_item_priv* d;
-
-  qglviewer::ManipulatedFrame* frame;
-  
-private:
-  QPixmap histogram_;
-  const Scene_item* data_item_;
-  
-  typedef std::set<int> Indices;
-  Indices indices_;
-};
-
-inline
-const Scene_item*
-Scene_c3t3_item::data_item() const
-{
-  return data_item_;
-}
-
-inline
-void
-Scene_c3t3_item::set_data_item(const Scene_item* data_item)
-{
-  data_item_ = data_item;
-  
-  if ( NULL != data_item )
-  {
-    connect(data_item, SIGNAL(aboutToBeDestroyed()),
-            this, SLOT(data_item_destroyed()));
-  }
-}
-
-inline
-void
-Scene_c3t3_item::update_histogram()
-{
-  build_histogram();
-}
-
-inline
-void
-Scene_c3t3_item::data_item_destroyed()
-{
-  set_data_item(NULL);
-}
-
-#endif // SCENE_C3T3_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item_config.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item_config.h
deleted file mode 100644
index 9fb00f6..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_c3t3_item_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef SCENE_C3T3_ITEM_CONFIG_H
-#define SCENE_C3T3_ITEM_CONFIG_H
-
-#ifdef scene_c3t3_item_EXPORTS
-#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_EXPORT
-#else
-#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SCENE_C3T3_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.cpp
deleted file mode 100644
index f302f82..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-#include "config.h"
-
-#include "Scene_implicit_function_item.h"
-#include <QColor>
-#include <map>
-#include <CGAL/gl.h>
-#include <CGAL/Simple_cartesian.h>
-
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-#include "Color_ramp.h"
-
-
-Scene_implicit_function_item::
-Scene_implicit_function_item(Implicit_function_interface* f)
-  : function_(f)
-  , frame_(new ManipulatedFrame())
-  , grid_size_(SCENE_IMPLICIT_GRID_SIZE)
-  , max_value_(0.)
-  , min_value_(0.)
-  , blue_color_ramp_()
-  , red_color_ramp_()
-{
-  blue_color_ramp_.build_blue();
-  red_color_ramp_.build_red();
-  compute_min_max();
-  compute_function_grid();
-  
-  connect(frame_, SIGNAL(modified()), this, SLOT(compute_function_grid()));
-}
-
-
-Scene_implicit_function_item::~Scene_implicit_function_item()
-{
-  delete frame_;
-}
-
-
-Scene_implicit_function_item::Bbox
-Scene_implicit_function_item::bbox() const
-{
-  return function_->bbox();
-}
-
-void
-Scene_implicit_function_item::direct_draw() const
-{
-  
-  draw_function_grid(red_color_ramp_, blue_color_ramp_);
-  draw_bbox();
-}
-
-
-
-QString
-Scene_implicit_function_item::toolTip() const
-{
-  return tr("<p>Function <b>%1</b>")
-    .arg(this->name());
-}
-
-bool
-Scene_implicit_function_item::supportsRenderingMode(RenderingMode m) const
-{ 
-  switch ( m )
-  {
-    case Gouraud:
-      return false;
-      
-    case Points:
-    case Wireframe:
-    case Flat:
-    case FlatPlusEdges:
-      return true;
-      
-    default:
-      return false;
-  }
-  
-  return false;
-}
-
-void
-Scene_implicit_function_item::
-draw_bbox() const
-{
-  const Bbox& b = bbox();
-
-  ::glDisable(GL_LIGHTING);
-  ::glColor3f(0.f,0.f,0.f);
-  ::glBegin(GL_LINES);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glEnd();
-}
-
-void 
-Scene_implicit_function_item::
-draw_function_grid(const Color_ramp& ramp_pos,
-                   const Color_ramp& ramp_neg) const
-{
-  ::glDisable(GL_LIGHTING);
-  ::glShadeModel(GL_SMOOTH);
-  
-  ::glBegin(GL_QUADS);
-  const int nb_quads = grid_size_ - 1;
-  for( int i=0 ; i < nb_quads ; i++ )
-  {
-    for( int j=0 ; j < nb_quads ; j++)
-    {
-      draw_grid_vertex(implicit_grid_[i][j], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i][j+1], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i+1][j+1], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i+1][j], ramp_pos, ramp_neg);
-    }
-  }
-  ::glEnd();
-}
-
-
-void
-Scene_implicit_function_item::
-draw_grid_vertex(const Point_value& pv,
-                 const Color_ramp& ramp_positive,
-                 const Color_ramp& ramp_negative) const
-{
-  const Point& p = pv.first;
-  double v = pv.second;
-  
-  // determines grey level
-  if ( v > 0 )
-  {
-    v = v/max_value_;
-    ::glColor3d(ramp_positive.r(v),ramp_positive.g(v),ramp_positive.b(v));
-  }
-  else
-  {
-    v = v/min_value_;
-    ::glColor3d(ramp_negative.r(v),ramp_negative.g(v),ramp_negative.b(v));
-  }
-  
-  ::glVertex3d(p.x,p.y,p.z);
-}
-
-
-void
-Scene_implicit_function_item::
-compute_function_grid()
-{
-  typedef CGAL::Simple_cartesian<double>  K;
-  typedef K::Aff_transformation_3         Aff_transformation;
-  typedef K::Point_3                      Point_3;
-  
-  // Get transformation
-  const ::GLdouble* m = frame_->matrix();
-  
-  // OpenGL matrices are row-major matrices
-  Aff_transformation t (m[0], m[4], m[8], m[12],
-                        m[1], m[5], m[9], m[13],
-                        m[2], m[6], m[10], m[14]);
-  
-  double diag = bbox().diagonal_length() * .6;
-  
-  const double dx = diag;
-  const double dy = diag;
-  const double z (0);
-  
-  for(int i=0 ; i<grid_size_ ; ++i)
-  {
-    double x = -diag/2. + double(i)/double(grid_size_) * dx;
-    
-    for(int j=0 ; j<grid_size_ ; ++j)
-    {
-      double y = -diag/2. + double(j)/double(grid_size_) * dy;
-      
-      Point_3 query = t( Point_3(x,y,z) );
-      double v = function_->operator()(query.x(), query.y(), query.z());
-      
-      implicit_grid_[i][j] = Point_value(Point(query.x(),query.y(),query.z()),v);
-    }
-  }
-  
-  // Update display list
-  this->changed();
-}
-
-void
-Scene_implicit_function_item::
-compute_min_max()
-{
-  max_value_ = 0;
-  min_value_ = 0;
-  
-  double probes_nb = double(grid_size_) / 2;
-  
-  // Probe bounding box
-  const Bbox& b = bbox();
-  
-  for ( int i = 0 ; i <= probes_nb ; ++i )
-  {
-    double x = b.xmin + double(i) * (b.xmax - b.xmin) / probes_nb;
-    
-    for ( int j = 0 ; j <= probes_nb ; ++j )
-    {
-      double y = b.ymin + double(j) * (b.ymax - b.ymin) / probes_nb;
-      
-      for ( int k = 0 ; k <= probes_nb ; ++k )
-      {
-        double z = b.zmin + double(k) * (b.zmax - b.zmin) / probes_nb;
-        
-        double v = (*function_)(x,y,z);
-        max_value_ = (std::max)(v,max_value_);
-        min_value_ = (std::min)(v,min_value_);
-      }
-    }
-  }
-}
-
-
-#include "Scene_implicit_function_item.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.h
deleted file mode 100644
index 071c472..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef SCENE_IMPLICIT_FUNCTION_ITEM_H
-#define SCENE_IMPLICIT_FUNCTION_ITEM_H
-
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include <CGAL_demo/Scene_interface.h>
-#include "Scene_implicit_function_item_config.h"
-#include "implicit_functions/Implicit_function_interface.h"
-#include "Color_ramp.h"
-
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-#define SCENE_IMPLICIT_GRID_SIZE 120
-
-
-class SCENE_IMPLICIT_FUNCTION_ITEM_EXPORT Scene_implicit_function_item 
-  : public Scene_item_with_display_list
-{
-  Q_OBJECT
-  
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-  
-public:
-  Scene_implicit_function_item(Implicit_function_interface*);
-  virtual ~Scene_implicit_function_item();
-  
-  Implicit_function_interface* function() const { return function_; }
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return false; }
-  Bbox bbox() const;
-
-  Scene_implicit_function_item* clone() const { return NULL; }
-
-  // rendering mode
-  virtual bool supportsRenderingMode(RenderingMode m) const;
-  virtual bool manipulatable() const { return true; }
-  virtual ManipulatedFrame* manipulatedFrame() { return frame_; }
-  
-  // draw (overload only direct_draw() to use display list of base class)
-  virtual void direct_draw() const;
-  
-  virtual QString toolTip() const;
-
-public slots:
-  void compute_function_grid();
-
-private:
-  typedef qglviewer::Vec                  Point;
-  typedef std::pair <Point,double>        Point_value;
-  
-  void draw_bbox() const;
-  void draw_function_grid(const Color_ramp&, const Color_ramp&) const;
-  void draw_grid_vertex(const Point_value&,
-                        const Color_ramp&, const Color_ramp&) const;
-  
-  void compute_min_max();
-  
-private:
-  Implicit_function_interface* function_;
-  ManipulatedFrame* frame_;
-  
-  int grid_size_;
-  double max_value_;
-  double min_value_;
-  Point_value implicit_grid_[SCENE_IMPLICIT_GRID_SIZE][SCENE_IMPLICIT_GRID_SIZE];
-  
-  Color_ramp blue_color_ramp_;
-  Color_ramp red_color_ramp_;
-};
-
-#endif // SCENE_IMPLICIT_FUNCTION_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.cpp
deleted file mode 100644
index 5eb9def..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.cpp
+++ /dev/null
@@ -1,406 +0,0 @@
-#include "config.h"
-
-#include "Scene_polygon_soup.h"
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <QObject>
-#include <QtDebug>
-
-#include <set>
-#include <stack>
-#include <algorithm>
-#include <boost/array.hpp>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/IO/File_scanner_OFF.h>
-#include <CGAL/IO/File_writer_OFF.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point_3;
-
-struct Polygon_soup {
-  typedef std::vector<Point_3> Points;
-  typedef std::vector<std::size_t> Polygon_3;
-  typedef std::map<std::pair<std::size_t, std::size_t>, std::set<std::size_t> > Edges_map;
-  typedef boost::array<std::size_t, 2> Edge;
-  typedef std::vector<Polygon_3> Polygons;
-  typedef std::vector<Edge> Edges;
-  typedef Polygons::size_type size_type;
-  Points points;
-  Polygons polygons;
-  Edges_map edges;
-  Edges non_manifold_edges;
-  bool display_non_manifold_edges;
-
-  Polygon_soup* clone() const {
-    Polygon_soup* result = new Polygon_soup();
-    result->points = points;
-    result->polygons = polygons;
-    result->edges = edges;
-    result->non_manifold_edges = non_manifold_edges;
-    result->display_non_manifold_edges = display_non_manifold_edges;
-    return result;
-  }
-
-  void clear() {
-    points.clear();
-    polygons.clear();
-    edges.clear();
-    non_manifold_edges.clear();
-  }
-
-  void fill_edges() {
-    // Fill edges
-    edges.clear();
-    for(size_type i = 0; i < polygons.size(); ++i)
-    {
-      const size_type size = polygons[i].size();
-      for(size_type j = 0; j < size; ++j) {
-        const std::size_t& i0 = polygons[i][j];
-        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
-        edges[std::make_pair(i0, i1)].insert(i);
-//         qDebug() << tr("edges[std::make_pair(%1, %2)].insert(%3). Size=%4")
-//           .arg(i0).arg(i1).arg(i).arg(edges[std::make_pair(i0, i1)].size());
-      }
-    }
-
-    // Fill non-manifold edges
-    non_manifold_edges.clear();
-    for(size_type i = 0; i < polygons.size(); ++i)
-    {
-      const size_type size = polygons[i].size();
-      for(size_type j = 0; j < size; ++j) {
-        const std::size_t& i0 = polygons[i][j];
-        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
-        if( (i0 < i1) && 
-            (edges[std::make_pair(i0, i1)].size() +
-             edges[std::make_pair(i1, i0)].size() > 2) )
-        {
-          Edge edge;
-          edge[0] = i0;
-          edge[1] = i1;
-          non_manifold_edges.push_back(edge);
-        }
-      }
-    }
-  }
-
-  void inverse_orientation(const std::size_t index) {
-    std::reverse(polygons[index].begin(), polygons[index].end());
-  }
-};
-
-Scene_polygon_soup::Scene_polygon_soup()
-  : Scene_item_with_display_list(),
-    soup(0),
-    oriented(false)
-{
-}
-
-Scene_polygon_soup::~Scene_polygon_soup()
-{
-  delete soup;
-}
-
-Scene_polygon_soup* 
-Scene_polygon_soup::clone() const {
-  Scene_polygon_soup* new_soup = new Scene_polygon_soup();
-  new_soup->soup = soup->clone();
-  new_soup->oriented = oriented;
-  return new_soup;
-}
-
-bool
-Scene_polygon_soup::load(std::istream& in)
-{
-  if(!soup)
-    soup = new Polygon_soup;
-  CGAL::File_scanner_OFF scanner(in);
-  soup->clear();
-  soup->points.resize(scanner.size_of_vertices());
-  soup->polygons.resize(scanner.size_of_facets());
-  for (std::size_t i = 0; i < scanner.size_of_vertices(); ++i) {
-    double x, y, z, w;
-    scanner.scan_vertex( x, y, z, w);
-    soup->points[i] = Point_3(x, y, z, w);
-    scanner.skip_to_next_vertex( i);
-  }
-  if(!in)
-    return false;
-
-  for (std::size_t i = 0; i < scanner.size_of_facets(); ++i) {
-    std::size_t no;
-    scanner.scan_facet( no, i);
-    soup->polygons[i].resize(no);
-    for(std::size_t j = 0; j < no; ++j) {
-      std::size_t id;
-      scanner.scan_facet_vertex_index(id, i);
-      if(id < scanner.size_of_vertices())
-      {
-        soup->polygons[i][j] = id;
-      }
-      else
-        return false;
-    }
-  }
-  soup->fill_edges();
-  oriented = false;
-  return ! in.fail();
-}
-
-void
-Scene_polygon_soup::setDisplayNonManifoldEdges(const bool b)
-{
-  soup->display_non_manifold_edges = b;
-  changed();
-}
-
-bool
-Scene_polygon_soup::displayNonManifoldEdges() const {
-  return soup->display_non_manifold_edges;
-}
-
-void Scene_polygon_soup::shuffle_orientations()
-{
-  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    if(std::rand() % 2 == 0) soup->inverse_orientation(i);
-  }
-  soup->fill_edges();
-  changed();
-}
-
-void Scene_polygon_soup::inside_out()
-{
-  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    soup->inverse_orientation(i);
-  }
-  soup->fill_edges();
-  changed();
-}
-
-bool 
-Scene_polygon_soup::orient()
-{
-  typedef Polygon_soup::Polygons::size_type size_type;
-  typedef Polygon_soup::Edges_map Edges;
-
-  if(isEmpty() || this->oriented)
-    return true; // nothing to do
-
-  Polygon_soup::Polygons& polygons = soup->polygons;
-  Polygon_soup::Edges_map& edges = soup->edges;
-
-  std::vector<bool> oriented;
-  std::stack<std::size_t> stack;
-  using std::make_pair;
-
-  // no polygon is oriented
-  oriented.resize(polygons.size());
-
-  size_type polygon_index = 0;
-  bool success = true;
-
-  while (polygon_index != polygons.size()) 
-  {
-    while ( polygon_index != polygons.size() && oriented[polygon_index] ) {
-      ++polygon_index;
-    }
-    if(polygon_index == polygons.size()) break;
-
-//     qDebug() << tr("Seed %1...\n").arg(polygon_index);
-    oriented[polygon_index] = true;
-    stack.push(polygon_index);
-    while(! stack.empty() )
-    {
-      const size_type to_be_oriented_index = stack.top();
-//       qDebug() << tr("polygon #%1").arg(to_be_oriented_index);
-      stack.pop();
-      const size_type size = polygons[to_be_oriented_index].size();
-      for(size_type ih = 0 ; ih < size ; ++ih) {
-        size_type ihp1 = ih+1;
-        if(ihp1>=size) ihp1 = 0;
-        const std::size_t& i1 = polygons[to_be_oriented_index][ih];
-        const std::size_t& i2 = polygons[to_be_oriented_index][ihp1];
-
-//         qDebug() << tr("edge %3-%4 (%1,%2)").arg(i1).arg(i2).arg(ih).arg(ihp1);
-        // edge (i1,i2)
-        Edges::iterator it_same_orient = edges.find(make_pair(i1, i2));
-        // edges (i2,i1)
-        Edges::iterator it_other_orient = edges.find(make_pair(i2, i1));
-
-        CGAL_assertion(it_same_orient != edges.end());
-        if(it_same_orient->second.size() > 1) {
-          if((it_other_orient != edges.end() && it_other_orient->second.size() > 0) ||
-             it_same_orient->second.size() > 2) {
-            // three polygons at the edge
-//             qDebug() << "three polygons at the edge";
-            success = false; // non-orientable
-          }
-          {
-            // one neighbor polyhedron, opposite orientation
-            size_type index = *(it_same_orient->second.begin());
-            if(index == to_be_oriented_index)
-              index = *(++it_same_orient->second.begin());
-            if(oriented[index]) {
-//               qDebug() << tr("neighbor polygon #%1 is already oriented, but in opposite orientation").arg(index);
-              success = false; // non-orientable
-              continue; // next edge
-            }
-   
-            // reverse the orientation
-            const size_type size = polygons[index].size();
-            for(size_type j = 0; j < size; ++j) {
-              const std::size_t& i0 = polygons[index][j];
-              const std::size_t& i1 = polygons[index][ j+1 < size ? j+1: 0];
-              CGAL_assertion_code(const bool r = )
-                edges[std::make_pair(i0, i1)].erase(index);
-              CGAL_assertion(r);
-            }
-            soup->inverse_orientation(index);
-            for(size_type j = 0; j < size; ++j) {
-              const std::size_t& i0 = polygons[index][j];
-              const std::size_t& i1 = polygons[index][ j+1 < size ? j+1: 0];
-              edges[std::make_pair(i0, i1)].insert(index);
-            }
-//             qDebug() << tr("inverse the orientation of polygon #%1\n").arg(index);
-            oriented[index] = true;
-            stack.push(index);
-          }
-        }
-        else if(it_other_orient != edges.end() && it_other_orient->second.size() == 1) {
-          // one polygon, same orientation
-          const size_type index = *(it_other_orient->second.begin());
-          if(oriented[index])
-            continue;
-          oriented[index] = true;
-//           qDebug() << tr("keep the orientation of polygon #%1\n").arg(index);
-          stack.push(index);
-        }
-        else {
-//           qDebug() << "else" << it_same_orient->second.size() << it_other_orient->second.size();
-          success = false; // non-orientable
-        }
-      } // end for on all edges of one 
-    } // end while loop on the polygons of the connected component
-  } // end while loop on all non-oriented polygons remaining 
-  return success;
-}
-
-
-bool 
-Scene_polygon_soup::save(std::ostream& out) const
-{
-  typedef Polygon_soup::size_type size_type;
-  CGAL::File_writer_OFF writer(true); // verbose
-  writer.write_header(out,
-                      soup->points.size(),
-                      0,
-                      soup->polygons.size());
-  for(size_type i = 0, end = soup->points.size();
-      i < end; ++i)
-  {
-    const Point_3& p = soup->points[i];
-    writer.write_vertex( p.x(), p.y(), p.z() );
-  }
-  writer.write_facet_header();
-  for(size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    const Polygon_soup::Polygon_3& polygon = soup->polygons[i]; 
-    const size_type size = polygon.size();
-    writer.write_facet_begin(size);
-    for(size_type j = 0; j < size; ++j) {
-      writer.write_facet_vertex_index(polygon[j]);
-    }
-    writer.write_facet_end();
-  }
-  writer.write_footer();
-
-  return ! out.fail();
-}
-
-QString 
-Scene_polygon_soup::toolTip() const
-{
-  if(!soup)
-    return QString();
-
-  return QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
-                     "<i>Polygons soup</i></p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of polygons: %3</p>")
-    .arg(this->name())
-    .arg(soup->points.size())
-    .arg(soup->polygons.size())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-void
-Scene_polygon_soup::direct_draw() const {
-  typedef Polygon_soup::Polygons::const_iterator Polygons_iterator;
-  typedef Polygon_soup::Polygons::size_type size_type;
-  for(Polygons_iterator it = soup->polygons.begin();
-      it != soup->polygons.end(); ++it)
-  {
-    const Point_3& pa = soup->points[it->at(0)];
-    const Point_3& pb = soup->points[it->at(1)];
-    const Point_3& pc = soup->points[it->at(2)];
-
-    Kernel::Vector_3 n = CGAL::cross_product(pb-pa, pc -pa);
-    n = n / std::sqrt(n * n);
-    
-    ::glBegin(GL_POLYGON);  
-    ::glNormal3d(n.x(),n.y(),n.z());
-
-    for(size_type i = 0; i < it->size(); ++i) {
-      const Point_3& p = soup->points[it->at(i)];
-      ::glVertex3d(p.x(),p.y(),p.z());
-    }
-    ::glEnd();
-  }
-  if(soup->display_non_manifold_edges) {
-    double current_color[4];
-    ::glGetDoublev(GL_CURRENT_COLOR, current_color);
-    ::glColor3d(1., 0., 0.); // red
-    
-    for(Polygon_soup::size_type 
-          i = 0,
-          end = soup->non_manifold_edges.size();
-        i < end; ++i) 
-    {
-      const Polygon_soup::Edge& edge = soup->non_manifold_edges[i];
-      const Point_3& a = soup->points[edge[0]];
-      const Point_3& b = soup->points[edge[1]];
-      ::glBegin(GL_LINES);
-      ::glVertex3d(a.x(), a.y(), a.z());
-      ::glVertex3d(b.x(), b.y(), b.z());
-      ::glEnd();
-    }
-    ::glColor4dv(current_color);
-  }
-}
-
-bool
-Scene_polygon_soup::isEmpty() const {
-  return (soup == 0 || soup->points.empty());
-}
-
-Scene_polygon_soup::Bbox
-Scene_polygon_soup::bbox() const {
-  const Point_3& p = *(soup->points.begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Polygon_soup::Points::const_iterator it = soup->points.begin();
-      it != soup->points.end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-#include "Scene_polygon_soup.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.h
deleted file mode 100644
index 98bd763..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef SCENE_POLYGON_SOUP_H
-#define SCENE_POLYGON_SOUP_H
-
-#include "Scene_polygon_soup_config.h"
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include <iostream>
-
-struct Polygon_soup;
-
-class SCENE_POLYGON_SOUP_EXPORT Scene_polygon_soup 
-  : public Scene_item_with_display_list 
-{
-  Q_OBJECT
-public:  
-  Scene_polygon_soup();
-  ~Scene_polygon_soup();
-
-  Scene_polygon_soup* clone() const;
-  bool load(std::istream& in);
-  bool save(std::ostream& out) const;
-
-  QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud; } // CHECK THIS!
-  // OpenGL drawing in a display list
-  void direct_draw() const;
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  void shuffle_orientations();
-  bool orient();
-  void inside_out();
-
-  void setDisplayNonManifoldEdges(const bool);
-  bool displayNonManifoldEdges() const;
-private:
-  Polygon_soup* soup;
-  bool oriented;
-}; // end class Scene_polygon_soup
-
-#endif // SCENE_POLYGON_SOUP_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.cpp
deleted file mode 100644
index 2ed00f4..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#include "config.h"
-
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <QObject>
-#include <CGAL/gl_render.h>
-
-Scene_polyhedron_item::Scene_polyhedron_item()
-  : Scene_item_with_display_list(),
-    poly(new Polyhedron)
-{
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(Polyhedron* const p)
-  : Scene_item_with_display_list(),
-    poly(p)
-{
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p)
-  : Scene_item_with_display_list(),
-    poly(new Polyhedron(p))
-{
-}
-
-// Scene_polyhedron_item::Scene_polyhedron_item(const Scene_polyhedron_item& item)
-//   : Scene_item_with_display_list(item),
-//     poly(new Polyhedron(*item.poly))
-// {
-// }
-
-Scene_polyhedron_item::~Scene_polyhedron_item()
-{
-  delete poly;
-}
-
-Scene_polyhedron_item* 
-Scene_polyhedron_item::clone() const {
-  return new Scene_polyhedron_item(*poly);
-}
-
-// Load polyhedron from .OFF file
-bool
-Scene_polyhedron_item::load(std::istream& in)
-{
-  in >> *poly;
-  return in && !isEmpty();
-}
-
-// Write polyhedron to .OFF file
-bool 
-Scene_polyhedron_item::save(std::ostream& out) const
-{
-  out << *poly;
-  return (bool) out;
-}
-
-QString 
-Scene_polyhedron_item::toolTip() const
-{
-  if(!poly)
-    return QString();
-
-  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4</p>")
-    .arg(this->name())
-    .arg(poly->size_of_vertices())
-    .arg(poly->size_of_halfedges()/2)
-    .arg(poly->size_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-void Scene_polyhedron_item::direct_draw() const {
-  gl_render_facets(*poly);
-}
-
-Polyhedron* 
-Scene_polyhedron_item::polyhedron()       { return poly; }
-const Polyhedron* 
-Scene_polyhedron_item::polyhedron() const { return poly; }
-
-bool
-Scene_polyhedron_item::isEmpty() const {
-  return (poly == 0) || poly->empty();
-}
-
-Scene_polyhedron_item::Bbox
-Scene_polyhedron_item::bbox() const {
-  const Point& p = *(poly->points_begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Polyhedron::Point_iterator it = poly->points_begin();
-      it != poly->points_end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-#include "Scene_polyhedron_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.h
deleted file mode 100644
index 9d00099..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_H
-#define SCENE_POLYHEDRON_ITEM_H
-
-#include "Scene_polyhedron_item_config.h"
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include "Polyhedron_type_fwd.h"
-#include <iostream>
-
-// This class represents a polyhedron in the OpenGL scene
-class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item 
-  : public Scene_item_with_display_list {
-  Q_OBJECT
-public:  
-  Scene_polyhedron_item();
-//   Scene_polyhedron_item(const Scene_polyhedron_item&);
-  Scene_polyhedron_item(const Polyhedron& p);
-  Scene_polyhedron_item(Polyhedron* const p);
-  ~Scene_polyhedron_item();
-
-  Scene_polyhedron_item* clone() const;
-  
-  // IO
-  bool load(std::istream& in);
-  bool save(std::ostream& out) const;
-
-  // Function for displaying meta-data of the item
-  virtual QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode) const { return true; }
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  virtual void direct_draw() const;
-
-  // Get wrapped polyhedron
-  Polyhedron*       polyhedron();
-  const Polyhedron* polyhedron() const;
-
-  // Get dimensions
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-private:
-  Polyhedron* poly;
-
-}; // end class Scene_polyhedron_item
-
-#endif // SCENE_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.cpp
deleted file mode 100644
index f8ba4b7..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.cpp
+++ /dev/null
@@ -1,692 +0,0 @@
-#include "config.h"
-
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-#  include <GL/glew.h>
-#endif
-#include "Scene_segmented_image_item.h"
-#include "Image_type.h"
-#include <QColor>
-#include <map>
-#include <CGAL/gl.h>
-#include <CGAL/ImageIO.h>
-#include <CGAL/use.h>
-
-//#define SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-bool gl_vbo_available() {
-  return  glewIsSupported("GL_VERSION_1_4");
-}
-#else
-bool gl_vbo_available() {
-  return false;
-}
-#endif
-
-
-
-// -----------------------------------
-// Internal classes
-// -----------------------------------
-namespace internal {
-
-class Image_accessor
-{
-public:
-  Image_accessor(const Image& im, int dx=1, int dy=1, int dz=1);
-  
-  bool is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const;
-  const QColor& vertex_color(std::size_t i, std::size_t j, std::size_t k) const;
-  void normal(std::size_t i, std::size_t j, std::size_t k,
-              float& x, float& y, float& z) const;
-  
-  int dx() const { return dx_; }
-  int dy() const { return dy_; }
-  int dz() const { return dz_; }
-  std::size_t xdim() const { return im_.xdim(); }
-  std::size_t ydim() const { return im_.ydim(); }
-  std::size_t zdim() const { return im_.zdim(); }
-  double vx() const { return im_.vx(); }
-  double vy() const { return im_.vy(); }
-  double vz() const { return im_.vz(); }
-  
-private:
-  unsigned char non_null_neighbor_data(std::size_t i,
-                                       std::size_t j,
-                                       std::size_t k) const;
-  
-  unsigned char image_data(std::size_t i, std::size_t j, std::size_t k) const;
-  
-  void add_to_normal(unsigned char v,
-                     float& x, float& y, float& z,
-                     int dx, int dy, int dz) const;
-  
-private:
-  const Image& im_;
-  int dx_, dy_, dz_;
-  const QColor default_color_;
-  std::map<unsigned char, QColor> colors_;
-};
-
-
-Image_accessor::Image_accessor(const Image& im, int dx, int dy, int dz)
-: im_(im)
-, dx_(dx)
-, dy_(dy)
-, dz_(dz)
-, default_color_()
-, colors_()
-{
-  const std::size_t xdim = im_.xdim();
-  const std::size_t ydim = im_.ydim();
-  const std::size_t zdim = im_.zdim();  
-  
-  for(std::size_t i=0 ; i<xdim ; i+=dx_)
-  { 
-    for(std::size_t j=0 ; j<ydim ; j+=dy_)
-    { 
-      for(std::size_t k=0 ; k<zdim ; k+=dz_)
-      {
-        unsigned char c = image_data(i,j,k);
-        if ( 0 != c ) { colors_.insert(std::make_pair(c,QColor())); }
-      }
-    }
-  }
-  
-  int i=0;
-  const double starting_hue = 45./360.; // magenta
-  for ( std::map<unsigned char, QColor>::iterator it = colors_.begin(),
-       end = colors_.end() ; it != end ; ++it, ++i )
-  {
-    double hue =  starting_hue + 1./colors_.size() * i;
-    if ( hue > 1. ) { hue -= 1.; }
-    it->second = QColor::fromHsvF(hue, .75, .75);
-  }
-}
-
-bool 
-Image_accessor::
-is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const
-{
-  unsigned char v1 = image_data(i-dx_, j-dy_, k-dz_);
-  unsigned char v2 = image_data(i-dx_, j-dy_, k  );
-  unsigned char v3 = image_data(i-dx_, j    , k-dz_);
-  unsigned char v4 = image_data(i-dx_, j    , k  );
-  unsigned char v5 = image_data(i    , j-dy_, k-dz_);
-  unsigned char v6 = image_data(i    , j-dy_, k  );
-  unsigned char v7 = image_data(i    , j    , k-dz_);
-  unsigned char v8 = image_data(i    , j    , k  );
-  
-  // don't draw interior vertices
-  if ( v1 != 0 && v2 != 0 && v3 != 0 && v4 != 0 && 
-       v5 != 0 && v6 != 0 && v7 != 0 && v8 != 0 )
-  {
-    return false;
-  }
-  
-  return ( v1 != 0 || v2 != 0 || v3 != 0 || v4 != 0 || 
-           v5 != 0 || v6 != 0 || v7 != 0 || v8 != 0 ); 
-}
-
-const QColor&
-Image_accessor::vertex_color(std::size_t i, std::size_t j, std::size_t k) const
-{
-  unsigned char c = non_null_neighbor_data(i,j,k);
-  if ( 0 == c ) { return default_color_; }
-  
-  std::map<unsigned char, QColor>::const_iterator color = colors_.find(c);
-  if ( colors_.end() == color ) { return default_color_; }
-  
-  return color->second;
-}
-
-unsigned char
-Image_accessor::image_data(std::size_t i, std::size_t j, std::size_t k) const
-{
-  if ( i<im_.xdim() && j<im_.ydim() && k<im_.zdim() )
-    return CGAL::IMAGEIO::static_evaluate<unsigned char>(im_.image(),i,j,k);
-  else
-    return 0;
-}
-
-unsigned char
-Image_accessor::
-non_null_neighbor_data(std::size_t i, std::size_t j, std::size_t k) const
-{
-  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
-  if ( v != 0 ) { return v; }
-  
-  v = image_data(i-dx_, j-dy_, k  );
-  if ( v != 0 ) { return v; }
-
-  v = image_data(i-dx_, j    , k-dz_);
-  if ( v != 0 ) { return v; }
-
-  v = image_data(i-dx_, j    , k  );
-  if ( v != 0 ) { return v; }
-
-  v = image_data(i    , j-dy_, k-dz_);
-  if ( v != 0 ) { return v; }
-  
-  v = image_data(i    , j-dy_, k  );
-  if ( v != 0 ) { return v; }
-  
-  v = image_data(i    , j    , k-dz_);
-  if ( v != 0 ) { return v; }
-
-  v = image_data(i    , j    , k  );
-  if ( v != 0 ) { return v; }
-  
-  return 0;
-}
-
-void
-Image_accessor::
-normal(std::size_t i, std::size_t j, std::size_t k,
-       float& x, float& y, float& z) const
-{
-  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
-  add_to_normal(v,x,y,z,       1    , 1    , 1);
-  
-  v = image_data(        i-dx_, j-dy_, k);
-  add_to_normal(v,x,y,z, 1    , 1    , -1);
-  
-  v = image_data(        i-dx_, j    , k-dz_);
-  add_to_normal(v,x,y,z, 1    , -1   , 1);
-  
-  v = image_data(        i-dx_, j    , k  );
-  add_to_normal(v,x,y,z, 1    , -1   , -1);
-  
-  v = image_data(        i    , j-dy_, k-dz_);
-  add_to_normal(v,x,y,z, -1   , 1    , 1);
-  
-  v = image_data(        i    , j-dy_, k  );
-  add_to_normal(v,x,y,z, -1   , 1    , -1);
-  
-  v = image_data(        i    , j    , k-dz_);
-  add_to_normal(v,x,y,z, -1   , -1   , 1);
-  
-  v = image_data(        i    , j    , k);
-  add_to_normal(v,x,y,z, -1   , -1   , -1);
-}
-
-void
-Image_accessor::
-add_to_normal(unsigned char v,
-              float& x, float& y, float& z,
-              int dx, int dy, int dz) const
-{
-  if ( 0 != v )
-  {
-    x += dx;
-    y += dy;
-    z += dz;    
-  }
-}
-
-
-
-class Vertex_buffer_helper
-{
-public:
-  Vertex_buffer_helper(const Image_accessor& data);
-  ~Vertex_buffer_helper();
-  
-  void fill_buffer_data();
-
-  const GLfloat* colors() const { return color_array_; }
-  const GLfloat* normals() const { return normal_array_; }
-  const GLfloat* vertices() const { return vertex_array_; }
-  const GLuint* quads() const { return quad_array_; }
-  
-  std::size_t color_size() const { return color_size_*sizeof(GLfloat); }
-  std::size_t normal_size() const { return normal_size_*sizeof(GLfloat); }
-  std::size_t vertex_size() const { return vertex_size_*sizeof(GLfloat); }
-  std::size_t quad_size() const { return quad_size_*sizeof(GLuint); }
-  
-private:
-  void treat_vertex(std::size_t i, std::size_t j, std::size_t k);
-  
-  void push_color(std::size_t i, std::size_t j, std::size_t k);
-  void push_normal(std::size_t i, std::size_t j, std::size_t k);
-  void push_vertex(std::size_t i, std::size_t j, std::size_t k);
-  void push_quads(std::size_t i, std::size_t j, std::size_t k);
-  void push_quad(int pos1, int pos2, int pos3, int pos4);
-  
-  int compute_position(std::size_t i, std::size_t j, std::size_t k) const;
-  int vertex_index(std::size_t i, std::size_t j, std::size_t k) const;
-  
-  void create_arrays();
-  
-  template <typename T>
-  void create_array(T*& destination, std::size_t& size, const std::vector<T>& source);
-  
-  int dx() const { return data_.dx(); }
-  int dy() const { return data_.dy(); }
-  int dz() const { return data_.dz(); }
-  
-private:
-  static int vertex_not_found_;
-  
-  const Image_accessor& data_;
-  typedef std::map<int, std::size_t> Indices;
-  Indices indices_;
-  std::vector<GLfloat> colors_, normals_, vertices_;
-  std::vector<GLuint> quads_;
-  
-  GLfloat *color_array_, *normal_array_, *vertex_array_;
-  GLuint* quad_array_;
-  std::size_t color_size_, normal_size_, vertex_size_, quad_size_;
-};
-
-int Vertex_buffer_helper::vertex_not_found_ = -1;
-
-Vertex_buffer_helper::
-Vertex_buffer_helper(const Image_accessor& data)
-: data_(data)
-, color_array_(NULL)
-, normal_array_(NULL)
-, vertex_array_(NULL)
-, quad_array_(NULL)
-, color_size_(0)
-, normal_size_(0)
-, vertex_size_(0)
-, quad_size_(0)
-{
-}
-
-Vertex_buffer_helper::
-~Vertex_buffer_helper()
-{
-  delete[] color_array_;
-  delete[] normal_array_;
-  delete[] vertex_array_;
-  delete[] quad_array_;
-}
-
-void
-Vertex_buffer_helper::
-fill_buffer_data()
-{
-  std::size_t i,j,k;
-  
-  for ( i = 0 ; i <= data_.xdim() ; i+=dx() )
-  {  
-    for ( j = 0 ; j <= data_.ydim() ; j+=dy() )
-    {   
-      for ( k = 0 ; k <= data_.zdim() ; k+=dz() )
-      {
-        treat_vertex(i,j,k);
-      }
-    }
-  }
-  
-  create_arrays();
-}
-
-void
-Vertex_buffer_helper::treat_vertex(std::size_t i, std::size_t j, std::size_t k)
-{
-  if ( data_.is_vertex_active(i,j,k) )
-  {
-    push_vertex(i,j,k);
-    push_color(i,j,k);
-    push_normal(i,j,k);
-    push_quads(i,j,k);    
-  }
-}
-
-void
-Vertex_buffer_helper::push_color(std::size_t i, std::size_t j, std::size_t k)
-{
-  const QColor& color = data_.vertex_color(i,j,k);
-  if ( ! color.isValid() ) { return; }
-  
-  colors_.push_back(color.red()/255.f);
-  colors_.push_back(color.green()/255.f);
-  colors_.push_back(color.blue()/255.f);
-}
-
-void
-Vertex_buffer_helper::push_normal(std::size_t i, std::size_t j, std::size_t k)
-{
-  float x=0.f, y=0.f, z=0.f;
-  data_.normal(i,j,k,x,y,z);
-  
-  float norm = std::sqrt(x*x+y*y+z*z);
-  x = x / norm;
-  y = y / norm;
-  z = z / norm;
-  
-  normals_.push_back(x);
-  normals_.push_back(y);
-  normals_.push_back(z);
-}
-
-void
-Vertex_buffer_helper::push_vertex(std::size_t i, std::size_t j, std::size_t k)
-{
-  indices_.insert(std::make_pair(compute_position(i,j,k),
-                                 vertices_.size()/3)); 
-  
-  vertices_.push_back(i*data_.vx());
-  vertices_.push_back(j*data_.vy());
-  vertices_.push_back(k*data_.vz());
-}
-
-void
-Vertex_buffer_helper::push_quads(std::size_t i, std::size_t j, std::size_t k)
-{
-  int pos1 = vertex_index(i-dx(), j     , k);
-  int pos2 = vertex_index(i-dx(), j-dy(), k);
-  int pos3 = vertex_index(i     , j-dy(), k);
-  int pos4 = vertex_index(i     ,j      , k);
-  push_quad(pos1, pos2, pos3, pos4);
-  
-  pos1 = vertex_index(i-dx(), j, k);
-  pos2 = vertex_index(i-dx(), j, k-dz());
-  pos3 = vertex_index(i     , j, k-dz());
-  push_quad(pos1, pos2, pos3, pos4);
-
-  pos1 = vertex_index(i, j-dy(), k);
-  pos2 = vertex_index(i, j-dy(), k-dz());
-  pos3 = vertex_index(i, j     , k-dz());
-  push_quad(pos1, pos2, pos3, pos4);
-}
-
-void
-Vertex_buffer_helper::push_quad(int pos1, int pos2, int pos3, int pos4)
-{
-  if (   pos1 != vertex_not_found_
-      && pos2 != vertex_not_found_
-      && pos3 != vertex_not_found_ )
-  {
-    quads_.push_back(pos1);
-    quads_.push_back(pos2);
-    quads_.push_back(pos3);
-    quads_.push_back(pos4);    
-  }
-}
-
-int
-Vertex_buffer_helper::
-compute_position(std::size_t i, std::size_t j, std::size_t k) const
-{
-  return  static_cast<int>(
-    i/dx() * (data_.ydim()/dy()+1) * (data_.zdim()/dz()+1)
-         + j/dy() * (data_.zdim()/dz()+1)
-         + k/dz());
-}
-
-int
-Vertex_buffer_helper::
-vertex_index(std::size_t i, std::size_t j, std::size_t k) const
-{
-  if ( i > data_.xdim() || j > data_.ydim() || k > data_.zdim() )
-  {
-    return vertex_not_found_;
-  }
-  
-  int vertex_key = compute_position(i,j,k);
-  Indices::const_iterator it = indices_.find(vertex_key);
-  if ( it != indices_.end() )
-  {
-    return static_cast<int>(it->second);
-  }
-  
-  return vertex_not_found_;
-}
-
-
-void
-Vertex_buffer_helper::
-create_arrays()
-{
-  create_array(color_array_, color_size_, colors_);
-  create_array(normal_array_, normal_size_, normals_);
-  create_array(vertex_array_, vertex_size_, vertices_);
-  create_array(quad_array_, quad_size_, quads_);
-}
-
-template <typename T>
-void
-Vertex_buffer_helper::
-create_array(T*& destination, std::size_t& size, const std::vector<T>& source)
-{
-  size = source.size();
-  destination = new T[size];
-  
-  int i=0;
-  for ( typename std::vector<T>::const_iterator it = source.begin(),
-       end = source.end() ; it != end ; ++it )
-  {
-    destination[i++] = *it;
-  }
-}
-  
-} // namespace internal
-
-
-
-// -----------------------------------
-// Scene_segmented_image_item
-// -----------------------------------
-Scene_segmented_image_item::Scene_segmented_image_item(Image* im,
-                                                       int display_scale)
-  : m_image(im)
-  , m_initialized(false)
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  , m_voxel_scale(display_scale)
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-{
-  CGAL_USE(display_scale);
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(gl_vbo_available()) {
-    ::glGenBuffers(3,m_vbo);
-    ::glGenBuffers(1,&m_ibo);
-  }
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  
-  initialize_buffers();
-  setRenderingMode(Flat);
-}
-
-
-Scene_segmented_image_item::~Scene_segmented_image_item()
-{
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(gl_vbo_available()) {
-    ::glDeleteBuffers(3,m_vbo);
-    ::glDeleteBuffers(1,&m_ibo);
-  }
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-}
-
-
-Scene_segmented_image_item::Bbox
-Scene_segmented_image_item::bbox() const
-{
-  if(!m_image) return Bbox();
-  return Bbox(0, 0, 0,
-              m_image->xdim() * m_image->vx(),
-              m_image->ydim() * m_image->vy(),
-              m_image->zdim() * m_image->vz());
-}
-
-
-void
-Scene_segmented_image_item::draw() const
-{
-  if(m_image)
-  {
-    m_image->gl_draw_bbox(3.0f,0,0,0);
-    draw_gl();
-  }
-}
-
-
-QString
-Scene_segmented_image_item::toolTip() const
-{
-  return tr("<p>Image <b>%1</b></p>"
-            "<p>Word type: %2</p>"
-            "<p>Dimensions: %3 x %4 x %5</p>"
-            "<p>Spacings: ( %6 , %7 , %8 )</p>")
-    .arg(this->name())
-    .arg("...")
-    .arg(m_image->xdim()) 
-    .arg(m_image->ydim())
-    .arg(m_image->zdim())
-    .arg(m_image->vx())
-    .arg(m_image->vy())
-    .arg(m_image->vz());
-}
-
-bool
-Scene_segmented_image_item::supportsRenderingMode(RenderingMode m) const
-{ 
-  switch ( m )
-  {
-    case Gouraud:
-      return false;
-      
-    case Points:
-    case Wireframe:
-    case Flat:
-    case FlatPlusEdges:
-      return true;
-      
-    default:
-      return false;
-  }
-  
-  return false;
-}
-
-void
-Scene_segmented_image_item::initialize_buffers() 
-{
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(!gl_vbo_available()) {
-    m_initialized = true;
-    return;
-  }
-
-  internal::Image_accessor image_data_accessor (*m_image,
-                                                m_voxel_scale,
-                                                m_voxel_scale,
-                                                m_voxel_scale);
-  
-  internal::Vertex_buffer_helper helper (image_data_accessor);
-  helper.fill_buffer_data();
-  
-  // Vertex buffer
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[0]);
-  ::glBufferData(GL_ARRAY_BUFFER, helper.vertex_size(), helper.vertices(), GL_STATIC_DRAW);
-  
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[1]);
-  ::glBufferData(GL_ARRAY_BUFFER, helper.normal_size(), helper.normals(), GL_STATIC_DRAW);
-  
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[2]);
-  ::glBufferData(GL_ARRAY_BUFFER, helper.color_size(), helper.colors(), GL_STATIC_DRAW);
-  
-  // Indices buffer
-  ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ibo);
-  ::glBufferData(GL_ELEMENT_ARRAY_BUFFER, helper.quad_size(), helper.quads(), GL_STATIC_DRAW);
-  
-  // Close buffers
-  ::glBindBuffer(GL_ARRAY_BUFFER, 0);
-  ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-  
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-
-  m_initialized = true;
-}
-
-
-void
-Scene_segmented_image_item::draw_gl() const
-{
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(!gl_vbo_available()) return;
-
-  ::glShadeModel(GL_SMOOTH);
-  
-  // Draw faces
-  ::glEnableClientState( GL_VERTEX_ARRAY );
-  ::glEnableClientState( GL_NORMAL_ARRAY );
-  ::glEnableClientState( GL_COLOR_ARRAY );
-  
-  // Get buffers
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[0]);
-  ::glVertexPointer(3, GL_FLOAT, 0, 0);
-  
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[1]);
-  ::glNormalPointer(GL_FLOAT, 0, 0);
-  
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[2]);
-  ::glColorPointer(3, GL_FLOAT, 0, 0);
-  
-  // Render
-  ::glDrawElements(GL_QUADS, ibo_size(), GL_UNSIGNED_INT, 0);
-  
-  // Cleanup
-  ::glBindBuffer(GL_ARRAY_BUFFER, 0);
-  ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-  
-  ::glDisableClientState( GL_COLOR_ARRAY );
-  ::glDisableClientState( GL_NORMAL_ARRAY );
-  ::glDisableClientState( GL_VERTEX_ARRAY );
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-}
-
-
-void
-Scene_segmented_image_item::draw_gl_edges() const
-{
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(!gl_vbo_available()) return;
-
-  // Ensure edges are drawn in black
-  ::glColor3f( 0.f, 0.f, 0.f );
-  
-  // Draw edges
-  ::glEnableClientState( GL_VERTEX_ARRAY );
-
-  // Get buffers
-  ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo[0]);
-  ::glVertexPointer(3, GL_FLOAT, 0, 0);
-
-  ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ibo);
-
-  // Render
-  ::glDrawElements(GL_QUADS, ibo_size(), GL_UNSIGNED_INT, 0);
-
-  // Cleanup
-  ::glBindBuffer(GL_ARRAY_BUFFER, 0);
-  ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
-  ::glDisableClientState( GL_VERTEX_ARRAY ); 
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-}
-
-
-GLint
-Scene_segmented_image_item::ibo_size() const
-{
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  if(gl_vbo_available()) {
-    GLint nb_elts = 0;
-    ::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ibo);
-    ::glGetBufferParameteriv(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SIZE, &nb_elts);
-
-    return nb_elts/sizeof(GLuint);
-  }
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-
-  return 0;
-}
-
-
-#include "Scene_segmented_image_item.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.h
deleted file mode 100644
index fe11991..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef SCENE_SEGMENTED_IMAGE_ITEM_H
-#define SCENE_SEGMENTED_IMAGE_ITEM_H
-
-#include <CGAL_demo/Scene_item.h>
-#include <CGAL_demo/Scene_interface.h>
-#include "Image_type_fwd.h"
-#include "Scene_segmented_image_item_config.h"
-#include <CGAL/gl.h>
-
-typedef CGAL::Image_3 Image;
-
-class SCENE_SEGMENTED_IMAGE_ITEM_EXPORT Scene_segmented_image_item 
-  : public Scene_item
-{
-  Q_OBJECT
-public:
-
-  Scene_segmented_image_item(Image* im, int drawing_scale);
-  ~Scene_segmented_image_item();
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return false; }
-  Bbox bbox() const;
-
-  Scene_segmented_image_item* clone() const { return NULL; }
-
-  // rendering mode
-  virtual bool supportsRenderingMode(RenderingMode m) const;
-
-  // draw
-  virtual void direct_draw() const { draw(); }
-  virtual void direct_draw_edges() const { draw_edges(); }
-  virtual void draw() const;
-  virtual void draw_edges() const { draw_gl_edges(); }
-  
-  virtual QString toolTip() const;
-  
-  const Image* image() const { return m_image; }
-
-private:
-  void draw_gl() const;
-  void draw_gl_edges() const;
-  
-  void initialize_buffers();
-  GLint ibo_size() const;
-  
-public:
-  Image* m_image;
-
-private:
-  bool m_initialized;
-#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  int m_voxel_scale;
-  GLuint m_vbo[3];
-  GLuint m_ibo;
-#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-};
-
-#endif // SCENE_SEGMENTED_IMAGE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.h b/3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.h
deleted file mode 100644
index 490736e..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.h
+++ /dev/null
@@ -1,346 +0,0 @@
-#ifndef STDAFX_H
-#define STDAFX_H
-
-#ifdef CGAL_CONCURRENT_MESH_3
-  // In case some code uses CGAL_PROFILE, it needs to be concurrent
-  #define CGAL_CONCURRENT_PROFILE
-#endif
-
-#include <cmath>
-#include <cassert>
-#include <crtdefs.h>
-
-// STL
-#include <algorithm>
-#include <map>
-#include <vector>
-#include <stack>
-#include <deque>
-#include <fstream>
-#include <typeindex>
-
-// Windows
-#include <windows.h>
-
-// Boost
-#include <boost/assert.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/concept_archetype.hpp>
-#include <boost/concept_check.hpp>
-#include <boost/config.hpp>
-#include <boost/format.hpp>
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/iterator/iterator_traits.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/iterator/zip_iterator.hpp>
-#include <boost/mpl/always.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/mpl/apply_wrap.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/begin.hpp>
-#include <boost/mpl/begin_end.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/clear.hpp>
-#include <boost/mpl/contains.hpp>
-#include <boost/mpl/end.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/has_key.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/insert.hpp>
-#include <boost/mpl/insert_fwd.hpp>
-#include <boost/mpl/iterator_range.hpp>
-#include <boost/mpl/iterator_tags.hpp>
-#include <boost/mpl/lambda.hpp>
-#include <boost/mpl/logical.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/pair.hpp>
-#include <boost/mpl/placeholders.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/mpl/reverse_fold.hpp>
-#include <boost/mpl/sequence_tag.hpp>
-#include <boost/mpl/set/set0.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/none.hpp>
-#include <boost/optional.hpp>
-//#include <boost/parameter.hpp>
-//#include <boost/parameter/binding.hpp>
-//#include <boost/parameter/config.hpp>
-//#include <boost/parameter/keyword.hpp>
-//#include <boost/parameter/macros.hpp>
-//#include <boost/parameter/match.hpp>
-//#include <boost/parameter/name.hpp>
-//#include <boost/parameter/parameters.hpp>
-//#include <boost/parameter/preprocessor.hpp>
-//#include <boost/parameter/value_type.hpp>
-#include <boost/pending/cstddef.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/arithmetic/sub.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comparison/equal.hpp>
-#include <boost/preprocessor/comparison/less_equal.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/config/config.hpp>
-#include <boost/preprocessor/control/expr_if.hpp>
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/debug/error.hpp>
-#include <boost/preprocessor/enum_params.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/facilities/intercept.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/for.hpp>
-#include <boost/preprocessor/identity.hpp>
-#include <boost/preprocessor/iteration/iterate.hpp>
-#include <boost/preprocessor/logical/bool.hpp>
-#include <boost/preprocessor/logical/compl.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repeat.hpp>
-#include <boost/preprocessor/repetition/deduce_r.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_shifted.hpp>
-#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
-#include <boost/preprocessor/repetition/enum_trailing.hpp>
-#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
-#include <boost/preprocessor/repetition/for.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-#include <boost/preprocessor/selection/max.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
-#include <boost/preprocessor/seq/first_n.hpp>
-#include <boost/preprocessor/seq/fold_left.hpp>
-#include <boost/preprocessor/seq/for_each.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/seq/for_each_product.hpp>
-#include <boost/preprocessor/seq/push_back.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/stringize.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/tuple/rem.hpp>
-#include <boost/property_map/property_map.hpp>
-#include <boost/property_map/vector_property_map.hpp>
-#include <boost/random.hpp>
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_smallint.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/thread/tss.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/utility.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/utility/result_of.hpp>
-#include <boost/variant.hpp>
-#include <boost/version.hpp>
-
-// Qt
-#include <QAction>
-#include <QApplication>
-#include <QCheckBox>
-#include <QColor>
-#include <QDialog>
-#include <QDialogButtonBox>
-#include <QDockWidget>
-#include <QDoubleSpinBox>
-#include <QFileDialog>
-#include <QFontMetrics>
-#include <QGLWidget>
-#include <QGridLayout>
-#include <QGroupBox>
-#include <QHBoxLayout>
-#include <QHeaderView>
-#include <QInputDialog>
-#include <QLabel>
-#include <QList>
-#include <QMainWindow>
-#include <QMap>
-#include <QMenu>
-#include <QMessageBox>
-#include <QObject>
-#include <QSlider>
-#include <QSpacerItem>
-#include <QString>
-#include <QStringList>
-#include <QThread>
-#include <QTime>
-#include <QTimer>
-#include <QVBoxLayout>
-#include <QVariant>
-#include <QVector>
-#include <QtCore/qglobal.h>
-#include <QtCore/qobject.h>
-#include <QtCore/qpointer.h>
-#include <QtPlugin>
-#include <qglobal.h>
-#include <QGLWidget>
-#include <QVector>
-#include <QColor>
-#include <QThread>
-
-// QGLViewer
-#include <QGLViewer/qglviewer.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <qglviewer/frame.h>
-#include <qglviewer/constraint.h>
-#include <qglviewer/vec.h>
-#include <qglviewer/config.h>
-#include <qglviewer/mouseGrabber.h>
-
-// CGAL
-//#include <CGAL/AABB_traits.h>
-//#include <CGAL/AABB_tree.h>
-#include <CGAL/assertions.h>
-#include <CGAL/basic.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Cartesian_converter.h>
-#include <CGAL/circulator_bases.h>
-//#include <CGAL/Compact_container.h>
-#include <CGAL/config.h>
-#include <CGAL/Default.h>
-#include <CGAL/determinant.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/enum.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Filtered_kernel.h>
-#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h>
-#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
-#include <CGAL/Filtered_predicate.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/gl.h>
-#include <CGAL/Hilbert_policy_tags.h>
-#include <CGAL/hilbert_sort.h>
-#include <CGAL/Hilbert_sort_2.h>
-#include <CGAL/Hilbert_sort_3.h>
-#include <CGAL/Hilbert_sort_base.h>
-#include <CGAL/Hilbert_sort_d.h>
-#include <CGAL/Hilbert_sort_median_2.h>
-#include <CGAL/Hilbert_sort_median_3.h>
-#include <CGAL/Hilbert_sort_median_d.h>
-#include <CGAL/Hilbert_sort_middle_2.h>
-#include <CGAL/Hilbert_sort_middle_3.h>
-#include <CGAL/Hilbert_sort_middle_base.h>
-#include <CGAL/Hilbert_sort_middle_d.h>
-#include <CGAL/Image_3.h>
-#include <CGAL/internal/Dummy_tds_3.h>
-#include <CGAL/internal/Exact_type_selector.h>
-#include <CGAL/internal/info_check.h>
-//#include <CGAL/internal/Regular_triangulation_filtered_traits_3.h>
-#include <CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h>
-#include <CGAL/internal/Static_filters/Power_test_3.h>
-//#include <CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-#include <CGAL/internal/Static_filters/tools.h>
-//#include <CGAL/internal/Triangulation_ds_circulators_3.h>
-//#include <CGAL/internal/Triangulation_ds_iterators_3.h>
-#include <CGAL/Interval_nt.h>
-#include <CGAL/IO/File_medit.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Kernel/interface_macros.h>
-#include <CGAL/Kernel/Type_equality_wrapper.h>
-#include <CGAL/Kernel_traits.h>
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/Lazy.h>
-#include <CGAL/Lazy_exact_nt.h>
-#include <CGAL/Lazy_kernel.h>
-//#include <CGAL/Mesher_level.h>
-//#include <CGAL/Mesher_level_default_implementations.h>
-//#include <CGAL/Mesher_level_visitors.h>
-//#include <CGAL/Meshes/Filtered_multimap_container.h>
-//#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
-//#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
-//#include <CGAL/Mesh_3/global_parameters.h>
-//#include <CGAL/Mesh_3/Mesher_3.h>
-//#include <CGAL/Mesh_3/mesh_standard_cell_criteria.h>
-//#include <CGAL/Mesh_3/mesh_standard_criteria.h>
-//#include <CGAL/Mesh_3/mesh_standard_facet_criteria.h>
-//#include <CGAL/Mesh_3/Mesh_surface_cell_base_3.h>
-//#include <CGAL/Mesh_3/Refine_cells_3.h>
-//#include <CGAL/Mesh_3/Refine_facets_3.h>
-//#include <CGAL/Mesh_3/Refine_tets_visitor.h>
-//#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
-//#include <CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h>
-//#include <CGAL/Mesh_3/Triangle_accessor_primitive.h>
-//#include <CGAL/Mesh_3/utilities.h>
-//#include <CGAL/Mesh_cell_base_3.h>
-#include <CGAL/Mesh_cell_criteria_3.h>
-#include <CGAL/Mesh_constant_domain_field_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-#include <CGAL/Mesh_edge_criteria_3.h>
-#include <CGAL/Mesh_facet_criteria_3.h>
-#include <CGAL/Mesh_facet_topology.h>
-//#include <CGAL/Mesh_vertex_base_3.h>
-#include <CGAL/Multiscale_sort.h>
-#include <CGAL/number_utils_classes.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Polygon_2/Polygon_2_simplicity.h>
-#include <CGAL/Polygon_2/polygon_assertions.h>
-#include <CGAL/Polygon_2_algorithms.h>
-//#include <CGAL/Polyhedral_mesh_domain_3.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/predicates/predicates_on_weighted_points_cartesian_3.h>
-//#include <CGAL/predicates/Regular_triangulation_ftC3.h>
-//#include <CGAL/predicates/Regular_triangulation_rtH3.h>
-//#include <CGAL/Profile_counter.h>
-//#include <CGAL/Regular_triangulation_cell_base_3.h>
-//#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Robust_construction.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/spatial_sort.h>
-#include <CGAL/Spatial_sort_traits_adapter_3.h>
-//#include <CGAL/Surface_mesh_vertex_base_3.h>
-#include <CGAL/tags.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Triangle_accessor_3.h>
-//#include <CGAL/Triangulation_3.h>
-//#include <CGAL/triangulation_assertions.h>
-//#include <CGAL/Triangulation_cell_base_3.h>
-//#include <CGAL/Triangulation_cell_base_with_circumcenter_3.h>
-//#include <CGAL/Triangulation_data_structure_3.h>
-//#include <CGAL/Triangulation_ds_cell_base_3.h>
-//#include <CGAL/Triangulation_ds_vertex_base_3.h>
-//#include <CGAL/Triangulation_simplex_3.h>
-//#include <CGAL/Triangulation_structural_filtering_traits.h>
-//#include <CGAL/Triangulation_utils_2.h>
-//#include <CGAL/Triangulation_utils_3.h>
-//#include <CGAL/Triangulation_vertex_base_3.h>
-#include <CGAL/tuple.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/utility.h>
-#include <CGAL/Weighted_point.h>
-
-// Mesh_3
-/*#include <CGAL_demo/Viewer.h>
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Plugin_helper.h>
-#include <ui_Meshing_dialog.h>
-#include <Scene_polyhedron_item.h>
-#include <implicit_functions/Implicit_function_interface.h>
-#include <CGAL_demo/Scene_item_with_display_list.h>*/
-
-#endif //STDAFX_H
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane.h
deleted file mode 100644
index 94f2222..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane.h
+++ /dev/null
@@ -1,401 +0,0 @@
-#ifndef CGAL_VOLUME_PLANE_H
-#define CGAL_VOLUME_PLANE_H
-
-
-#if SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
-  #include <GL/glew.h>
-#endif 
-
-#include <CGAL_demo/Scene_item.h>
-
-#include <vector>
-#include <cassert>
-
-#include <QDebug>
-#include <QGLViewer/qglviewer.h>
-
-#include "Volume_plane_interface.h"
-
-#if !defined(NDEBUG)
-inline
-void printGlError(unsigned int line) {
-  GLenum error = glGetError();
-  if(error != GL_NO_ERROR)
-    std::cerr << gluErrorString(error) << "@" << line << std::endl;
-}
-#else
-inline
-void printGlError(unsigned int) {
-}
-#endif
-
-template<int Dim>
-class Length_constraint : public qglviewer::WorldConstraint {
-public:
-  Length_constraint(double max_) : max_(max_) { }
-
-  void constrainTranslation(qglviewer::Vec& t, qglviewer::Frame* frame) {
-    WorldConstraint::constrainTranslation(t, frame);
-    qglviewer::Vec pos = frame->position();
-    double start = pos[Dim];
-    double end = t[Dim];
-    start += end;
-
-    if(start > max_ || (start < 0)) {
-      t[Dim] = 0.0;
-    }
-  }
-
-private:
-  double max_;
-};
-
-struct x_tag {};
-struct y_tag {};
-struct z_tag {};
-
-template<typename Tag>
-class Volume_plane : public Volume_plane_interface, public Tag {
-public:
-  Volume_plane(unsigned int adim, unsigned int bdim, unsigned int cdim, 
-               float xscale, float yscale, float zscale, std::vector<float>& colors);
-
-  virtual ~Volume_plane();
-
-  Volume_plane* clone() const { return NULL; }
-
-  virtual RenderingMode renderingMode() const { return Flat; }
-  bool supportsRenderingMode(RenderingMode m) const { return m == Flat; }
-  
-  QString toolTip() const { return "Plane through a volume"; }
-  QString name() const { return name(*this); }
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return false; }
-  bool manipulatable() const { return true; }
-
-  unsigned int cube() {return currentCube; }
-
-  void draw() const;
-
-  unsigned int aDim() const { return adim_; }
-  unsigned int bDim() const { return bdim_; }
-  unsigned int cDim() const { return cdim_; }
-
-  qglviewer::Vec translationVector() const { return translationVector(*this); }
-  unsigned int getCurrentCube() const { return currentCube; }
-
-  // uses a public init function to make enable construction in
-  // threads without gl-context
-  void init();
-
-private:
-  static const char* vertexShader; 
-
-  static const char* fragmentShader;
-
-  qglviewer::Vec translationVector(x_tag) const {
-    return qglviewer::Vec(xscale_, 0.0, 0.0);
-  }
-  qglviewer::Vec translationVector(y_tag) const {
-    return qglviewer::Vec(0.0, yscale_, 0.0);
-  }
-  qglviewer::Vec translationVector(z_tag) const {
-    return qglviewer::Vec(0.0, 0.0, zscale_);
-  }
-
-  void initShaders();
-
-  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j) {
-    buildVertex(out, i, j, *this);
-  }
-
-  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, x_tag) {
-    out.push_back(0.0f);
-    out.push_back(i * yscale_);
-    out.push_back(j * zscale_);
-  }
-
-  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, y_tag) {
-    out.push_back(i * xscale_);
-    out.push_back(0.0f);
-    out.push_back(j * zscale_);
-  }
-
-  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, z_tag) {
-    out.push_back(i * xscale_);
-    out.push_back(j * yscale_);
-    out.push_back(0.0f);
-  }
-
-  const unsigned int adim_, bdim_, cdim_;
-  const double xscale_, yscale_, zscale_;
-  mutable int currentCube;
-
-  GLuint vVBO;
-  GLuint program;
-  std::vector< std::pair<GLuint, unsigned int> > ebos;
-  std::vector< float > colors_;
-
-  QString name(x_tag) const { return tr("X Slice for %1").arg(name_); }
-  QString name(y_tag) const { return tr("Y Slice for %2").arg(name_); }
-  QString name(z_tag) const { return tr("Z Slice for %2").arg(name_); }
-
-  void drawRectangle(x_tag) const {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f(0.0f, (adim_ - 1) * yscale_, 0.0f);
-      glVertex3f(0.0f, (adim_ - 1) * yscale_, (bdim_ - 1) * zscale_);
-      glVertex3f(0.0f, 0.0f, (bdim_ - 1) * zscale_);
-  }
-
-  void drawRectangle(y_tag) const {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f((adim_ - 1) * xscale_, 0.0f, 0.0f);
-      glVertex3f((adim_ - 1) * xscale_, 0.0f, (bdim_ - 1) * zscale_);
-      glVertex3f(0.0f, 0.0f, (bdim_ - 1) * zscale_);
-  }
-
-  void drawRectangle(z_tag) const {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f((adim_ - 1) * xscale_, 0.0f, 0.0f);
-      glVertex3f((adim_ - 1) * xscale_, (bdim_ - 1) * yscale_, 0.0f);
-      glVertex3f(0.0f, (bdim_ - 1) * yscale_, 0.0f);
-  }
-
-  qglviewer::Constraint* setConstraint(x_tag) {
-    qglviewer::AxisPlaneConstraint* c = new Length_constraint<0>(cdim_ * xscale_);
-    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
-    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(1.0f, 0.0f, 0.0f));
-    return c;
-  }
-  
-  qglviewer::Constraint* setConstraint(y_tag) {
-    qglviewer::AxisPlaneConstraint* c = new Length_constraint<1>(cdim_ * yscale_);
-    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
-    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 1.0f, 0.0f));
-    return c;
-  }
-
-  qglviewer::Constraint* setConstraint(z_tag) {
-    qglviewer::AxisPlaneConstraint* c = new Length_constraint<2>(cdim_ * zscale_);
-    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
-    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 0.0f, 1.0f));
-    return c;
-  }
-
-  void updateCurrentCube() const { currentCube = getTranslation(); }
-
-  GLdouble getTranslation() const { return getTranslation(*this); }
-  GLdouble getTranslation(x_tag) const { return mFrame_->matrix()[12] / xscale_; }
-  GLdouble getTranslation(y_tag) const { return mFrame_->matrix()[13] / yscale_; }
-  GLdouble getTranslation(z_tag) const { return mFrame_->matrix()[14] / zscale_; }
-
-};
-
-template<typename T>
-const char* Volume_plane<T>::vertexShader = 
-      "#version 120 \n"
-      "attribute float color;"
-      "varying vec4 fullColor; \n"
-      "void main() \n"
-      "{ gl_Position = ftransform(); \n"
-      "  fullColor = vec4(color, color, color, 1.0f); } \n";
-
-template<typename T>
-const char* Volume_plane<T>::fragmentShader = 
-      "#version 120 \n"
-      "in vec4 fullColor; \n"
-      "void main() { gl_FragColor = fullColor; } \n";
-
-
-template<typename T>
-Volume_plane<T>::Volume_plane(unsigned int adim, unsigned int bdim, unsigned int cdim, 
-                              float xscale, float yscale, float zscale, std::vector<float>& colors)
-  : Volume_plane_interface(new qglviewer::ManipulatedFrame), adim_(adim), bdim_(bdim), cdim_(cdim), xscale_(xscale), 
-    yscale_(yscale), zscale_(zscale), currentCube(0)
-{
-  colors_.swap(colors);
-  mFrame_->setConstraint(setConstraint(*this));
-}
-
-template<typename T>
-Volume_plane<T>::~Volume_plane() {
-  for(std::vector< std::pair< GLuint, unsigned int> >::const_iterator it = ebos.begin(); 
-      it != ebos.end(); ++it) { 
-    glDeleteBuffers(1, &(it->first));
-  }
-  glDeleteProgram(program);
-}
-
-template<typename T>
-void Volume_plane<T>::draw() const {
-  updateCurrentCube();
-
-  glDisable(GL_LIGHTING);
-
-  glPushMatrix();
-  glMultMatrixd(mFrame_->matrix());
-
-  GLint renderMode;
-  glGetIntegerv(GL_RENDER_MODE, &renderMode);
-  printGlError(__LINE__);
-  if(renderMode == GL_SELECT) {
-    // draw a quick bounding box
-    glBegin(GL_QUADS);
-    drawRectangle(*this);
-    glEnd();
-
-    glPopMatrix();
-    glEnable(GL_LIGHTING);
-    return;
-  }
-
-  glLineWidth(3.0f);
-  glBegin(GL_LINE_LOOP);
-  drawRectangle(*this);
-  glEnd();
-  glLineWidth(1.0f);
-
-  glUseProgram(program);
-
-  glBindBuffer(GL_ARRAY_BUFFER, vVBO);
-  glVertexPointer(3, GL_FLOAT, 0, 0);
-  glEnableClientState(GL_VERTEX_ARRAY);
-
-  glBindBuffer(GL_ARRAY_BUFFER, 0);
-  glVertexAttribPointer(7, 1, GL_FLOAT, GL_FALSE, 0, &(colors_[ currentCube * adim_ * bdim_ ]));
-  glEnableVertexAttribArray(7);
-
-  printGlError(__LINE__);
-
-  for(unsigned int i = 0; i < ebos.size(); ++i)
-  {
-    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebos[i].first);
-    glDrawElements(GL_QUADS, ebos[i].second, GL_UNSIGNED_INT, 0);
-  }
-
-  printGlError(__LINE__);
-
-  glDisableClientState(GL_VERTEX_ARRAY);
-  glDisableVertexAttribArray(7);
-  glPopMatrix();
-
-  glUseProgram(0);
-  glBindBuffer(GL_ARRAY_BUFFER, 0);
-  glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
-  glEnable(GL_LIGHTING);
-
-  printGlError(__LINE__);
-}
-
-template<typename T>
-void Volume_plane<T>::init() {
-  
-  initShaders();
-
-  // for each vertex
-  std::vector< float > vertices;
-  vertices.reserve(bdim_ * adim_ * 3);
-  for(unsigned int i = 0; i < adim_; ++i) 
-  {
-    for(unsigned int j = 0; j < bdim_; ++j)
-    {
-      buildVertex(vertices, i, j);
-    }
-  }
-    
-  assert(vertices.size() == (3 * adim_ * bdim_));
-
-  int maxi, maxv;
-  glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &maxi);
-  glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &maxv);
-  assert((vertices.size( ) / 3) < (unsigned int)maxi);
-
-  glGenBuffers(1, &vVBO);
-  glBindBuffer(GL_ARRAY_BUFFER, vVBO);
-
-  glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertices.size(), &vertices[0], GL_STATIC_DRAW);
-  glBindBuffer(GL_ARRAY_BUFFER, 0);
-  printGlError(__LINE__);
-
-  // for each patch
-  std::vector<unsigned int> indices;
-  for(unsigned int j = 0; j < adim_ - 1; ++j) {
-    for(unsigned int k = 0; k < bdim_ - 1; ++k) {
-      indices.push_back( j * bdim_ + k );
-      assert(indices.back() < (vertices.size() / 3));
-    
-      indices.push_back( j * bdim_ + (k + 1) );
-      assert(indices.back() < (vertices.size() / 3));
-    
-      indices.push_back( (j+1) * bdim_ + (k+1) );
-      assert(indices.back() < (vertices.size() / 3));
-    
-      indices.push_back( (j+1) * bdim_ + (k) );
-      assert(indices.back() < (vertices.size() / 3));
-    }
-  }
-
-  assert((indices.size() / 4) == (adim_ - 1) * (bdim_ - 1));
-
-  const unsigned int slice = 64000;
-  for(unsigned int i = 0; i < indices.size(); i+=slice)
-  {
-    GLuint ebo;
-    unsigned int left_over = (i + slice) > indices.size()  ? std::distance(indices.begin() + i, indices.end()) : slice;
-    glGenBuffers(1, &ebo);
-    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
-    glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * left_over, &indices[i], GL_STATIC_DRAW);
-    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-    ebos.push_back(std::make_pair(ebo, left_over));
-  }
-
-  printGlError(__LINE__);
-}
-
-template<typename T>
-void Volume_plane<T>::initShaders() {
-  program = glCreateProgram();
-  GLint status;
-  char buffer[1024];
-  int len;
-
-  GLuint vertex = glCreateShader(GL_VERTEX_SHADER);
-  GLint* lengths = { 0 };
-  glShaderSource(vertex, 1, &vertexShader, lengths);
-  glCompileShader(vertex);
-  glGetShaderiv(vertex, GL_COMPILE_STATUS, &status);
-
-  glGetShaderInfoLog(vertex, 1024, &len, buffer);
-  std::cout << "VertexShader: " << buffer << std::endl;
-  assert(status == GL_TRUE);
-
-  printGlError(__LINE__);
-
-  GLuint fragment = glCreateShader(GL_FRAGMENT_SHADER);
-  glShaderSource(fragment, 1, &fragmentShader, lengths);
-  glCompileShader(fragment);
-  glGetShaderiv(fragment, GL_COMPILE_STATUS, &status);
-
-  glGetShaderInfoLog(fragment, 1024, &len, buffer);
-  std::cout << "FragmentShader: " << buffer << std::endl;
-
-  assert(status == GL_TRUE);
-
-  printGlError(__LINE__);
-
-  glAttachShader(program, vertex);
-  glAttachShader(program, fragment);
-
-  glBindAttribLocation(program, 7, "color");
-
-  glLinkProgram(program);
-  glGetProgramiv(program, GL_LINK_STATUS, &status);
-  assert(status == GL_TRUE);
-
-  printGlError(__LINE__);
-}
-
-
-#endif /* CGAL_VOLUME_PLANE_H */
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_interface.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_interface.h
deleted file mode 100644
index 3b46a32..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_interface.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef CGAL_VOLUME_PLANE_INTERFACE_H_
-#define CGAL_VOLUME_PLANE_INTERFACE_H_
-
-#include <QObject>
-#include <QGLViewer/qglviewer.h>
-#include <CGAL_demo/Scene_item.h>
-#include <iostream>
-#include <QGLViewer/manipulatedFrame.h>
-
-class Volume_plane_interface : public Scene_item {
-Q_OBJECT
-public:
-  Volume_plane_interface(qglviewer::ManipulatedFrame* f) : mFrame_(f) { 
-    connect(mFrame_, SIGNAL(manipulated()), this, SLOT(propagateManipulation()));
-  }
-
-  virtual ~Volume_plane_interface() {
-    delete mFrame_;
-  }
-
-  virtual void init() = 0;
-
-  virtual unsigned int aDim() const = 0;
-  virtual unsigned int bDim() const = 0;
-  virtual unsigned int cDim() const = 0;
-  virtual qglviewer::Vec translationVector() const = 0;
-  void itemAboutToBeDestroyed(Scene_item* item) {
-    if(this == item) {
-      emit planeDestructionIncoming(this);
-      emit aboutToBeDestroyed();
-    }
-  }
-
-  virtual unsigned int getCurrentCube() const = 0;
-
-  virtual qglviewer::ManipulatedFrame* manipulatedFrame() { return mFrame_; }
-
-signals:
-  void planeDestructionIncoming(Volume_plane_interface*);
-  void manipulated(int);
-private slots:
-  void propagateManipulation() {
-    emit manipulated(getCurrentCube());
-  }
-protected:
-  qglviewer::ManipulatedFrame* mFrame_;
-};
-
-
-#endif /* CGAL_VOLUME_PLANE_INTERFACE_H_ */
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.cpp
deleted file mode 100644
index f691a7d..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "config.h"
-
-#include "Volume_plane_intersection.h"
-#include "Volume_plane_interface.h"
-
-#include <CGAL/gl.h>
-
-
-void Volume_plane_intersection::draw() const {
-  glDisable(GL_LIGHTING);
-  glLineWidth(4.0f);
-
-  if(b && c) {
-    glPushMatrix();
-    glMultMatrixd(b->manipulatedFrame()->matrix());
-    glMultMatrixd(c->manipulatedFrame()->matrix());
-
-    glBegin(GL_LINES);
-    {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f(x, 0.0f, 0.0f);
-    }
-    glEnd();
-
-    glPopMatrix();
-  }
-
-  if(a && c) {
-    glPushMatrix();
-    glMultMatrixd(a->manipulatedFrame()->matrix());
-    glMultMatrixd(c->manipulatedFrame()->matrix());
-
-    glBegin(GL_LINES);
-    {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f(0.0f, y, 0.0f);
-    }
-    glEnd();
-
-    glPopMatrix();
-  }
-
-  if(a && b) {  
-    glPushMatrix();
-    glMultMatrixd(a->manipulatedFrame()->matrix());
-    glMultMatrixd(b->manipulatedFrame()->matrix());
-
-    glBegin(GL_LINES);
-    {
-      glVertex3f(0.0f, 0.0f, 0.0f);
-      glVertex3f(0.0f, 0.0f, z);
-    }
-    glEnd();
-
-    glPopMatrix();
-  }
-
-  glLineWidth(1.0f);
-  glEnable(GL_LIGHTING);
-}
-
-#include "Volume_plane_intersection.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.h
deleted file mode 100644
index 7af5979..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_intersection.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef CGAL_VOLUME_PLANE_INTERSECTION_H_
-#define CGAL_VOLUME_PLANE_INTERSECTION_H_
-
-#include <CGAL_demo/Scene_item.h>
-
-#include <QColor>
-#include <QString>
-
-class Volume_plane_interface;
-
-class Volume_plane_intersection
-  : public Scene_item {
-  typedef std::pair<Volume_plane_interface*, Volume_plane_interface*> Interface_pair;
-Q_OBJECT
-public:
-  Volume_plane_intersection(float x, float y, float z)
-    : a(NULL), b(NULL), c(NULL), x(x), y(y), z(z) {
-    setColor(QColor(255, 0, 0));
-    setName("Volume plane intersection");
-  }
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return false; }
-  bool manipulatable() const { return false; }
-  Volume_plane_intersection* clone() const { return 0; }
-  bool supportsRenderingMode(RenderingMode) const { return true; }
-  QString toolTip() const { return "Tooling"; }
-
-  void draw() const;
-
-  void setX(Volume_plane_interface* x) { a = x; }
-  void setY(Volume_plane_interface* x) { b = x; }
-  void setZ(Volume_plane_interface* x) { c = x; }
-
-public slots:
-  void planeRemoved(Volume_plane_interface* i) {
-    if(a == i) {
-      a = NULL;
-    } else if(b == i) {
-      b = NULL;
-    } else if(c == i) {
-      c = NULL;
-    }
-  }
-
-private:
-  Volume_plane_interface *a, *b, *c;
-  float x, y, z;
-};
-
-#endif /* CGAL_VOLUME_PLANE_INTERSECTION_H_ */
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_thread.h b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_thread.h
deleted file mode 100644
index 582e854..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_plane_thread.h
+++ /dev/null
@@ -1,128 +0,0 @@
-#ifndef CGAL_VOLUME_PLANE_THREAD_H
-#define CGAL_VOLUME_PLANE_THREAD_H
-
-#include <CGAL/Image_3.h>
-#include "Volume_plane.h"
-
-#include "Scene_segmented_image_item.h"
-
-#include <QApplication>
-#include <QThread>
-#include <vector>
-
-struct Clamp_to_one_zero_range {
-  std::pair<float, float> min_max;
-  float operator()(const float& inVal) {
-    float inValNorm = inVal - min_max.first;
-    float aUpperNorm = min_max.second - min_max.first;
-    float bValNorm = inValNorm / aUpperNorm;
-    return bValNorm;
-  }
-};
-
-class Volume_plane_thread : public QThread {
-Q_OBJECT  
-public:
-  Volume_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
-    : img(img), clamper(clamp), item(NULL), name(name) { }
-
-  Volume_plane_interface* getItem() {
-    return item;
-  }
-
-signals:
-  void finished(Volume_plane_thread*);
-
-protected:
-  const CGAL::Image_3* img;
-  Clamp_to_one_zero_range clamper;
-  Volume_plane_interface* item;
-  std::vector<float> buffer;
-  QString name;
-};
-
-template<typename Word>
-class X_plane_thread : public Volume_plane_thread {
-public:
-  X_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
-    : Volume_plane_thread(img, clamp, name) { }
-protected:
-  void run();
-};
-
-template<typename Word>
-class Y_plane_thread : public Volume_plane_thread {
-public:
-  Y_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
-    : Volume_plane_thread(img, clamp, name) { }
-protected:
-  void run();
-};
-
-template<typename Word>
-class Z_plane_thread : public Volume_plane_thread {
-public:
-  Z_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
-    : Volume_plane_thread(img, clamp, name) { }
-protected:
-  void run();
-};
-
-template<typename Word>
-void X_plane_thread<Word>::run() {
-    buffer.reserve(img->size());
-    for(unsigned int i = 0; i < img->xdim(); ++i) {
-      for(unsigned int j = 0; j < img->ydim(); ++j) {
-        for(unsigned int k = 0; k < img->zdim(); ++k) {
-          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), i, j, k);
-          x = clamper(x);
-          buffer.push_back(x);
-        }
-      }
-    }
-    item = new Volume_plane<x_tag>(img->ydim(), img->zdim(), img->xdim(), 
-                                   img->vx(), img->vy(), img->vz(), buffer);
-
-    item->setName(name);
-    item->moveToThread(QApplication::instance()->thread());
-    emit finished(this);
-}
-
-template<typename Word>
-void Y_plane_thread<Word>::run() {
-      buffer.reserve(img->size());
-    for(unsigned int i = 0; i < img->ydim(); ++i) {
-      for(unsigned int j = 0; j < img->xdim(); ++j) {
-        for(unsigned int k = 0; k < img->zdim(); ++k) {
-          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, i, k);
-          x = clamper(x);
-          buffer.push_back(x);
-        }
-      }
-    }
-    item = new Volume_plane<y_tag>(img->xdim(), img->zdim(), img->ydim(), 
-                                   img->vx(), img->vy(), img->vz(), buffer);
-    item->setName(name);
-    item->moveToThread(QApplication::instance()->thread());
-    emit finished(this);
-}
-
-template<typename Word>
-void Z_plane_thread<Word>::run() {
-  for(unsigned int i = 0; i < img->zdim(); ++i) {
-    for(unsigned int j = 0; j < img->xdim(); ++j) {
-      for(unsigned int k = 0; k < img->ydim(); ++k) {
-        float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, k, i);
-        x = clamper(x);
-        buffer.push_back(x);
-      }
-    }
-  }
-  item = new Volume_plane<z_tag>(img->xdim(), img->ydim(), img->zdim(), 
-                                 img->vx(), img->vy(), img->vz(), buffer);
-  item->setName(name);
-  item->moveToThread(QApplication::instance()->thread());
-  emit finished(this);
-}
-
-#endif /* CGAL_VOLUME_PLANE_THREAD_H */
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_planes_plugin.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_planes_plugin.cpp
deleted file mode 100644
index 5172d45..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/Volume_planes_plugin.cpp
+++ /dev/null
@@ -1,381 +0,0 @@
-#include "config.h"
-
-#include <CGAL/Image_3.h>
-
-#include "Volume_plane.h"
-#include "Volume_plane_thread.h"
-#include "Volume_plane_intersection.h"
-
-#include "Scene_segmented_image_item.h"
-#include <CGAL_demo/Plugin_helper.h>
-#include <CGAL_demo/Plugin_interface.h>
-#include <CGAL_demo/Messages_interface.h>
-#include <CGAL_demo/Scene_interface.h>
-#include <CGAL_demo/Scene_item.h>
-#include <CGAL_demo/Viewer.h>
-#include "MainWindow.h"
-
-#include <QAction>
-#include <QMenu>
-#include <QList>
-#include <QInputDialog>
-#include <QSlider>
-#include <QLabel>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QDockWidget>
-#include <QMainWindow>
-#include <QMessageBox>
-#include <QString>
-#include <QFontMetrics>
-
-#include <cassert>
-#include <iostream>
-
-#include <boost/type_traits.hpp>
-#include <boost/optional.hpp>
-
-// Covariant return types don't work for scalar types and we cannot
-// have templates here, hence this unfortunate hack.
-
-// The input float value we are reading is always in
-// 0..1 and min_max is the range it came from.
-struct IntConverter {
-  std::pair<int, int> min_max;
-  
-  int operator()(float f) {
-    float s = f * (min_max.second - min_max.first);
-    return s + min_max.first;
-  }
-};
-
-struct DoubleConverter {
-  std::pair<float, float> min_max;
-
-  float operator()(float f) {
-    float s = f * (min_max.second - min_max.first);
-    return s + min_max.first;
-  }
-};
-
-class PixelReader : public QObject
-{
-Q_OBJECT
-public slots:
-  void update(const QPoint& p) {
-    getPixel(p);
-  }
-signals:
-  void x(int);
-
-public:
-  void setIC(const IntConverter& x) { ic = x; fc = boost::optional<DoubleConverter>(); }
-  void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional<IntConverter>(); }
-
-private:
-  boost::optional<IntConverter> ic;
-  boost::optional<DoubleConverter> fc;
-
-  void getPixel(const QPoint& e) {
-    float data[3];
-    int vp[4];
-    glGetIntegerv(GL_VIEWPORT, vp);
-    glReadPixels(e.x(), vp[3] - e.y(), 1, 1, GL_RGB, GL_FLOAT, data);
-
-    if(fc) {
-      emit x( (*fc)(data[0]) );
-    } else if(ic) {
-      emit x( (*ic)(data[0]) );
-    }
-  }
-};
-
-
-class Plane_slider : public QSlider
-{
-  Q_OBJECT
-public:
-  Plane_slider(const qglviewer::Vec& v, int id, Scene_interface* scene,
-               qglviewer::ManipulatedFrame* frame, Qt::Orientation ori, QWidget* widget) 
-    : QSlider(ori, widget), v(v), id(id), scene(scene), frame(frame) { 
-    this->setTracking(true);
-    connect(frame,  SIGNAL(manipulated()), this, SLOT(updateValue()));
-  }
-
-public:
-  void sliderChange(SliderChange c) {
-    QSlider::sliderChange(c);
-    if(c == SliderValueChange) {
-      qglviewer::Vec v2 = v * (this->value() / scale);
-      frame->setTranslationWithConstraint(v2);
-      scene->itemChanged(id);
-    }
-
-    emit realChange(this->value() / scale);
-  }
-
-public slots:
-  void updateValue() {
-    float a, b, c;
-    frame->getPosition(a, b, c);
-    float sum1 = a + b + c;
-    float sum2 = v.x + v.y + v.z;
-    sum1 /= sum2;
-    setValue(sum1 * scale);
-  }
-
-signals:
-  void realChange(int);
-
-private:
-  static const unsigned int scale;
-
-  qglviewer::Vec v;
-  int id;
-  Scene_interface* scene;
-  qglviewer::ManipulatedFrame* frame;
-};
-
-const unsigned int Plane_slider::scale = 100;
-
-class Volume_plane_plugin :
-  public QObject,
-  public Plugin_interface 
-{
-  Q_OBJECT
-  Q_INTERFACES(Plugin_interface)
-public:
-  Volume_plane_plugin() : planeSwitch(NULL), sc(NULL), mw(NULL)
-    {
-    }
-
-  virtual void init(QMainWindow* mw, Scene_interface* sc) {
-    assert(mw != NULL);
-    assert(sc != NULL);
-    this->sc = sc;
-    this->mw = mw;
-
-    QList<QMenu*> menus = mw->findChildren<QMenu*>();
-
-    planeSwitch = new QAction(mw);
-    planeSwitch->setText("Add Volume Planes");
-
-    connect(planeSwitch, SIGNAL(triggered()), this, SLOT(selectPlanes()));
-    
-    // evil
-    MainWindow* mwTmp;
-    if( !(mwTmp = dynamic_cast<MainWindow*>(mw)) ) {
-      std::cerr << "Volume_planes_plugin cannot init mousegrabber" << std::endl;
-    }
-    Viewer* v = mwTmp->getViewer();
-    connect(v, SIGNAL(pointSelected(QPoint)), &pxr_, SLOT(update(QPoint)));
-
-    createOrGetDockLayout();
-  }
-
-  virtual QList<QAction*> actions() const {
-    return QList<QAction*>() << planeSwitch;
-  }
-
-public slots:
-  void selectPlanes() {
-    std::vector< Scene_segmented_image_item* > seg_items;
-    Scene_segmented_image_item* seg_img = NULL;
-
-    for(unsigned int i = 0; i < sc->numberOfEntries(); ++i) {
-      Scene_segmented_image_item* tmp = qobject_cast<Scene_segmented_image_item*>(sc->item(i));
-      if(tmp != NULL)
-        seg_items.push_back(tmp);
-    }
-    
-    if(seg_items.empty()) {
-      QMessageBox::warning(mw, tr("No suitable item found"), tr("Load an inrimage or hdr file to enable Volume Planes."));
-      return;
-    } else {
-      QList<QString> items;
-      for(std::vector< Scene_segmented_image_item* >::const_iterator it = seg_items.begin(); 
-          it != seg_items.end(); ++it) { 
-        items << (*it)->name();
-      }
-
-      bool ok;
-      QString selected = QInputDialog::getItem(mw, tr("Select a dataset:"), tr("Items"), items, 0, false, &ok);
-      
-      if(!ok || selected.isEmpty())
-        return;
-
-      for(std::vector< Scene_segmented_image_item*>::const_iterator it = seg_items.begin(); 
-          it != seg_items.end(); ++it) { 
-        if(selected == (*it)->name())
-          seg_img = *it;
-      }
-    }
-    
-    if(!(seg_img == NULL)) {
-      const CGAL::Image_3* img = seg_img->image();
-      CGAL_IMAGE_IO_CASE(img->image(), this->launchAdders<Word>(img, seg_img->name()))
-
-      Volume_plane_intersection* i = new Volume_plane_intersection(img->xdim() * img->vx(), 
-                                                                   img->ydim() * img->vy(), 
-                                                                   img->zdim() * img->vz());
-      this->intersectionId = sc->addItem(i);
-    } else {
-      QMessageBox::warning(mw, tr("Something went wrong"), tr("Selected a suitable Object but couldn't get an image pointer."));
-      return;
-    }
-
-  }
-
-  void addVP(Volume_plane_thread* thread) {
-    Volume_plane_interface* plane = thread->getItem();
-    plane->init();
-
-    // add the interface for this Volume_plane
-    int id = sc->addItem(plane);
-    
-    QLayout* layout = createOrGetDockLayout();
-    
-    QWidget* controls = new QWidget;
-    QHBoxLayout* box = new QHBoxLayout(controls);
-    layout->addWidget(controls);
-
-    QLabel* label = new QLabel(controls);
-    label->setText(plane->name());
-
-    QLabel* cubeLabel = new QLabel(controls);
-    cubeLabel->setNum(static_cast<int>(plane->getCurrentCube()));
-    
-    // Find the right width for the label to accommodate at least 9999
-    QFontMetrics metric = cubeLabel->fontMetrics();
-    cubeLabel->setFixedWidth(metric.width(QString("9999")));
-
-    QSlider* slider = new Plane_slider(plane->translationVector(), id, sc, plane->manipulatedFrame(), 
-                                       Qt::Horizontal, controls);
-    slider->setRange(0, (plane->cDim() - 1) * 100);
-
-    connect(slider, SIGNAL(realChange(int)), cubeLabel, SLOT(setNum(int)));
-    connect(plane, SIGNAL(manipulated(int)), cubeLabel, SLOT(setNum(int)));
-    
-    box->addWidget(label);
-    box->addWidget(slider);
-    box->addWidget(cubeLabel);
-    
-    connect(plane, SIGNAL(aboutToBeDestroyed()), controls, SLOT(deleteLater()));
-
-    std::vector<Volume_plane_thread*>::iterator it = std::find(threads.begin(), threads.end(), thread);
-
-    // this slot has been connected to a thread that hasn't been
-    // registered here.
-    assert(it != threads.end());
-    delete *it;
-    threads.erase(it);
-
-    Volume_plane_intersection* intersection = dynamic_cast<Volume_plane_intersection*>(sc->item(intersectionId));
-    if(!intersection) {
-      // the intersection is gone before it was initialized
-      return;
-    }
-    // FIXME downcasting mode
-    // FIXME this will bug if two volume planes are generated simultaneously by the plugin
-    if(Volume_plane<x_tag>* p = dynamic_cast< Volume_plane<x_tag>* >(plane)) {
-      intersection->setX(p);
-    } else if(Volume_plane<y_tag>* p = dynamic_cast< Volume_plane<y_tag>* >(plane)) {
-      intersection->setY(p);
-    } else if(Volume_plane<z_tag>* p = dynamic_cast< Volume_plane<z_tag>* >(plane)) {
-      intersection->setZ(p);
-    }
-
-    connect(plane, SIGNAL(planeDestructionIncoming(Volume_plane_interface*)), 
-            intersection, SLOT(planeRemoved(Volume_plane_interface*)));
-  }
- 
-private:
-  QAction* planeSwitch;
-  Scene_interface* sc;
-  QMainWindow* mw;
-  PixelReader pxr_;
-
-  std::vector<Volume_plane_thread*> threads;
-  unsigned int intersectionId;
-
-  QLayout* createOrGetDockLayout() {
-    QLayout* layout = NULL;
-    QDockWidget* controlDockWidget = mw->findChild<QDockWidget*>("volumePlanesControl");
-    if(!controlDockWidget) {
-      controlDockWidget = new QDockWidget(mw);
-      controlDockWidget->setObjectName("volumePlanesControl");
-      QWidget* content = new QWidget(controlDockWidget);
-      layout = new QVBoxLayout(content);
-      layout->setObjectName("vpSliderLayout");
-      controlDockWidget->setWindowTitle("Control Widget");
-      mw->addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
-      
-      QWidget* vlabels = new QWidget(content);
-      layout->addWidget(vlabels);
-      QHBoxLayout* vbox = new QHBoxLayout(vlabels);
-      vbox->setAlignment(Qt::AlignJustify);
-
-      QLabel* text = new QLabel(vlabels);
-      text->setText("Isovalue at point:");
-      QLabel* x = new QLabel(vlabels);
-
-      connect(&pxr_, SIGNAL(x(int)), x, SLOT(setNum(int)));
-      
-      vbox->addWidget(text); vbox->addWidget(x);
-      controlDockWidget->setWidget(content);
-    } else {
-      layout = controlDockWidget->findChild<QLayout*>("vpSliderLayout");
-    }
-
-    return layout;
-  }
-
-  template<typename Word>
-  void launchAdders(const CGAL::Image_3* img, const QString& name) {
-    const Word* begin = (const Word*)img->data();
-    const Word* end = (const Word*)img->data() + img->size();
-
-    std::pair<Word, Word> minmax = std::make_pair(*std::min_element(begin, end), *std::max_element(begin, end));
-
-    Clamp_to_one_zero_range clamper = { minmax };
-
-    switchReaderConverter< Word >(minmax);
-    
-    threads.push_back(new X_plane_thread<Word>(img, clamper, name));
-    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
-    threads.back()->start();
-    
-    threads.push_back(new Y_plane_thread<Word>(img, clamper, name));
-    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
-    threads.back()->start();
-
-    threads.push_back(new Z_plane_thread<Word>(img, clamper, name));
-    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
-    threads.back()->start();
-
-  }
-
-  template<typename T>
-  void switchReaderConverter(std::pair<T, T> minmax) { 
-    switchReaderConverter(minmax, typename boost::is_integral<T>::type()); 
-  }
-
-  template<typename T>
-  void switchReaderConverter(std::pair<T, T> minmax, boost::true_type) {
-    // IntConverter
-    IntConverter x = { minmax }; pxr_.setIC(x);
-  }
-
-  template<typename T>
-  void switchReaderConverter(std::pair<T, T> minmax, boost::false_type) {
-    // IntConverter
-    DoubleConverter x = { minmax }; pxr_.setFC(x);
-  }
-};
-
-
-
-
-Q_EXPORT_PLUGIN2(Volume_plane_plugin, Volume_plane_plugin)
-
-#include "Volume_planes_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/cmake/modules/FindGLEW.cmake b/3rdparty/CGAL-4.6/demo/Mesh_3/cmake/modules/FindGLEW.cmake
deleted file mode 100644
index cc659f5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/cmake/modules/FindGLEW.cmake
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright (c) 2009 Boudewijn Rempt <boud at valdyas.org>                                                                                          
-#                                                                                                                                                
-# Redistribution and use is allowed according to the terms of the BSD license.                                                                   
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. 
-# 
-# - try to find glew library and include files
-#  GLEW_INCLUDE_DIR, where to find GL/glew.h, etc.
-#  GLEW_LIBRARIES, the libraries to link against
-#  GLEW_FOUND, If false, do not try to use GLEW.
-# Also defined, but not for general use are:
-#  GLEW_GLEW_LIBRARY = the full path to the glew library.
-
-IF (WIN32)
-
-  IF(CYGWIN)
-
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h)
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY glew32
-      ${OPENGL_LIBRARY_DIR}
-      /usr/lib/w32api
-      /usr/X11R6/lib
-    )
-
-
-  ELSE(CYGWIN)
-  
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
-      $ENV{GLEW_ROOT_PATH}/include
-    )
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY
-      NAMES glew glew32
-      PATHS
-      $ENV{GLEW_ROOT_PATH}/lib
-      ${OPENGL_LIBRARY_DIR}
-    )
-
-  ENDIF(CYGWIN)
-
-ELSE (WIN32)
-
-  IF (APPLE)
-# These values for Apple could probably do with improvement.
-    FIND_PATH( GLEW_INCLUDE_DIR glew.h
-      /System/Library/Frameworks/GLEW.framework/Versions/A/Headers
-      ${OPENGL_LIBRARY_DIR}
-    )
-    SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
-    SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
-  ELSE (APPLE)
-
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
-      /usr/include
-      /usr/include/GL
-      /usr/openwin/share/include
-      /usr/openwin/include
-      /usr/X11R6/include
-      /usr/include/X11
-      /opt/graphics/OpenGL/include
-      /opt/graphics/OpenGL/contrib/libglew
-    )
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
-      /usr/openwin/lib
-      /usr/X11R6/lib
-      /usr/lib
-      /usr/lib/x86_64-linux-gnu
-    )
-
-  ENDIF (APPLE)
-
-ENDIF (WIN32)
-
-SET( GLEW_FOUND "NO" )
-IF(GLEW_INCLUDE_DIR)
-  IF(GLEW_GLEW_LIBRARY)
-    # Is -lXi and -lXmu required on all platforms that have it?
-    # If not, we need some way to figure out what platform we are on.
-    SET( GLEW_LIBRARIES
-      ${GLEW_GLEW_LIBRARY}
-      ${GLEW_cocoa_LIBRARY}
-    )
-    SET( GLEW_FOUND "YES" )
-
-#The following deprecated settings are for backwards compatibility with CMake1.4
-    SET (GLEW_LIBRARY ${GLEW_LIBRARIES})
-    SET (GLEW_INCLUDE_PATH ${GLEW_INCLUDE_DIR})
-
-  ENDIF(GLEW_GLEW_LIBRARY)
-ENDIF(GLEW_INCLUDE_DIR)
-
-IF(GLEW_FOUND)
-  IF(NOT GLEW_FIND_QUIETLY)
-    MESSAGE(STATUS "Found Glew: ${GLEW_LIBRARIES}")
-  ENDIF(NOT GLEW_FIND_QUIETLY)
-ELSE(GLEW_FOUND)
-  IF(GLEW_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find Glew")
-  ENDIF(GLEW_FIND_REQUIRED)
-ENDIF(GLEW_FOUND)
-
-MARK_AS_ADVANCED(
-  GLEW_INCLUDE_DIR
-  GLEW_GLEW_LIBRARY
-  GLEW_Xmu_LIBRARY
-  GLEW_Xi_LIBRARY
-)
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/CMakeLists.txt
deleted file mode 100644
index 77fe6e5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/CMakeLists.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-# This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions.
-
-project( Mesh_3_implicit_functions )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Let plugins be compiled in the same directory as the executable.
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-
-# Include directory of demo includes
-include_directories( BEFORE ${Mesh_3_implicit_functions_BINARY_DIR} ../include )
-
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4)
-include( ${CGAL_USE_FILE} )
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-
-if(CGAL_Qt4_FOUND AND QT4_FOUND)
-  include(${QT_USE_FILE})
-
-  # put plugins (which are shared libraries) at the same location as
-  # executable files
-  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
-
-  ###########
-  # PLUGINS #
-  ###########
-  include(AddFileDependencies)
-  remove_definitions(-DQT_STATICPLUGIN)
-
-  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
-  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
-    list_split(option ARGN_TAIL ${ARGN} )
-    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
-      set(other_sources ${ARGN})
-      set(option "")
-    else()
-      set(other_sources ${ARGN_TAIL})
-    endif()
-    qt4_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
-    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
-
-    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
-    # Link with Qt
-    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
-    # Link with CGAL
-    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-  endmacro(polyhedron_demo_plugin)
-
-  polyhedron_demo_plugin(sphere_function_plugin Sphere_implicit_function)
-  polyhedron_demo_plugin(tanglecube_function_plugin Tanglecube_implicit_function)
-  polyhedron_demo_plugin(klein_function_plugin Klein_implicit_function)
-
-else (CGAL_Qt4_FOUND AND QT4_FOUND)
-
-  set(MESH_3_MISSING_DEPS "")
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(MESH_3_MISSING_DEPS "the CGAL Qt4 library, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(MESH_3_MISSING_DEPS "Qt4, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_Qt4_FOUND AND QT4_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp
deleted file mode 100644
index aa480e9..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-class Klein_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Klein function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    return   (x*x+y*y+z*z+2*y-1)
-           * ( (x*x+y*y+z*z-2*y-1) *(x*x+y*y+z*z-2*y-1)-8*z*z)
-           + 16*x*z* (x*x+y*y+z*z-2*y-1);
-  }
-  
-  virtual Bbox bbox() const
-  {
-    const double radius = 6.;
-    double r = radius * 1.1;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Klein_implicit_function, Klein_implicit_function)
-#include "Klein_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp
deleted file mode 100644
index bb02a08..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-
-const double radius = 1.;
-
-class Sphere_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Sphere function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    return (x*x + y*y + z*z - radius);
-  }
-  
-  virtual Bbox bbox() const
-  {
-    double r = radius * 1.2;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Sphere_implicit_function, Sphere_implicit_function)
-#include "Sphere_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp
deleted file mode 100644
index b092fa2..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-
-const double radius = 4.;
-
-class Tanglecube_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Tanglecube function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    double x2=x*x, y2=y*y, z2=z*z;
-    double x4=x2*x2, y4=y2*y2, z4=z2*z2;
-    return x4 - 5*x2 + y4 - 5*y2 + z4 - 5*z2 + 11.8;
-  }
-  
-  virtual Bbox bbox() const
-  {
-    double r = radius * 1.2;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Tanglecube_implicit_function, Tanglecube_implicit_function)
-#include "Tanglecube_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/compute_normal.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/compute_normal.h
deleted file mode 100644
index ad8c190..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/compute_normal.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _COMPUTE_NORMAL_
-#define _COMPUTE_NORMAL_
-
-template <class Facet, class Kernel>
-typename Kernel::Vector_3 compute_facet_normal(const Facet& f)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Facet::Halfedge_around_facet_const_circulator HF_circulator;
-  Vector normal = CGAL::NULL_VECTOR;
-  HF_circulator he = f.facet_begin();
-  HF_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    const Point& prev = he->prev()->vertex()->point();
-    const Point& curr = he->vertex()->point();
-    const Point& next = he->next()->vertex()->point();
-    Vector n = CGAL::cross_product(next-curr,prev-curr);
-    normal = normal + (n / std::sqrt(n*n));
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-template <class Vertex, class Kernel>
-typename Kernel::Vector_3 compute_vertex_normal(const Vertex& v)
-{
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Vertex::Halfedge_around_vertex_const_circulator HV_circulator;
-  typedef typename Vertex::Facet Facet;
-  Vector normal = CGAL::NULL_VECTOR;
-  HV_circulator he = v.vertex_begin();
-  HV_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    if(!he->is_border())
-    {
-      Vector n = compute_facet_normal<Facet,Kernel>(*he->facet());
-      normal = normal + (n / std::sqrt(n*n));
-    }
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-#endif // _COMPUTE_NORMAL_
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/gl_render.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/gl_render.h
deleted file mode 100644
index fe76152..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL/gl_render.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef _GL_RENDER_
-#define _GL_RENDER_
-
-#include <CGAL/gl.h>
-#include <CGAL/compute_normal.h>
-
-template <class Polyhedron>
-void gl_render_facets(Polyhedron& polyhedron)
-{
-  typedef typename Polyhedron::Traits	    Kernel;
-  typedef typename Kernel::Point_3	    Point;
-  typedef typename Kernel::Vector_3	    Vector;
-  typedef typename Polyhedron::Facet	    Facet;
-  typedef typename Polyhedron::Facet_iterator Facet_iterator;
-  typedef typename Polyhedron::Halfedge_around_facet_circulator HF_circulator;
-
-  // Get current shading model
-  GLint shading;
-  ::glGetIntegerv(GL_SHADE_MODEL, &shading);
-
-  Facet_iterator f;
-  for(f = polyhedron.facets_begin();
-    f != polyhedron.facets_end();
-    f++)
-  {
-    ::glBegin(GL_POLYGON);
-
-    // If Flat shading: 1 normal per polygon
-    if (shading == GL_FLAT)
-    {
-      Vector n = compute_facet_normal<Facet,Kernel>(*f);
-      ::glNormal3d(n.x(),n.y(),n.z());
-    }
-
-    // revolve around current face to get vertices
-    HF_circulator he = f->facet_begin();
-    HF_circulator end = he;
-    CGAL_For_all(he,end)
-    {
-      // If Gouraud shading: 1 normal per vertex
-      if (shading == GL_SMOOTH)
-      {
-        Vector n = compute_vertex_normal<typename Polyhedron::Vertex,Kernel>(*he->vertex());
-        ::glNormal3d(n.x(),n.y(),n.z());
-      }
-
-      const Point& p = he->vertex()->point();
-      ::glVertex3d(p.x(),p.y(),p.z());
-    }
-    ::glEnd();
-  }
-} // end gl_render_facets
-
-template <class Polyhedron>
-void gl_render_edges(Polyhedron& polyhedron)
-{
-  typedef typename Polyhedron::Traits		Kernel;
-  typedef typename Kernel::Point_3		Point;
-  typedef typename Polyhedron::Edge_iterator	Edge_iterator;
-
-  ::glBegin(GL_LINES);
-  Edge_iterator he;
-  for(he = polyhedron.edges_begin();
-    he != polyhedron.edges_end();
-    he++)
-  {
-    const Point& a = he->vertex()->point();
-    const Point& b = he->opposite()->vertex()->point();
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-  }
-  ::glEnd();
-} // end gl_render_edges
-
-
-#endif // _GL_RENDER_
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h
deleted file mode 100644
index 1ec16bf..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef MESH_3_DEMO_IO_PLUGIN_INTERFACE_H
-#define MESH_3_DEMO_IO_PLUGIN_INTERFACE_H
-
-#include <QFileInfo>
-#include <QStringList>
-
-class Scene_item;
-
-class Io_plugin_interface 
-{
-public:
-  virtual ~Io_plugin_interface() {}
-
-  virtual QStringList nameFilters() const = 0;
-
-  virtual bool canLoad() const = 0;
-  virtual Scene_item* load(QFileInfo fileinfo) = 0;
-
-  virtual bool canSave(const Scene_item*) = 0;
-  virtual bool save(const Scene_item*, QFileInfo fileinfo, QString selectedFilter) = 0;
-};
-
-Q_DECLARE_INTERFACE(Io_plugin_interface,
-                    "com.geometryfactory.Mesh3Demo.IOPluginInterface/1.0")
-
-#endif // POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene.h
deleted file mode 100644
index 29ce019..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene.h
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef SCENE_H
-#define SCENE_H
-
-#include <CGAL_demo/Scene_interface.h>
-#include <CGAL_demo/Scene_draw_interface.h>
-
-#include <QtOpenGL/qgl.h>
-#include <QAbstractListModel>
-#include <QString>
-#include <QColor>
-#include <QList>
-#include <QItemDelegate>
-#include <QPixmap>
-#include <QItemSelection>
-
-#include <iostream>
-#include <cmath>
-#include <boost/variant.hpp>
-
-class QEvent;
-class QMouseEvent;
-
-class Scene  :
-  public QAbstractListModel, public Scene_interface, public Scene_draw_interface
-{
-  Q_OBJECT
-
-  friend class SceneDelegate;
-
-public:
-  enum Columns { NameColumn = 0, 
-                 ColorColumn, 
-                 RenderingModeColumn, 
-                 VisibleColumn,
-                 ABColumn,
-                 LastColumn = ABColumn,
-                 NumberOfColumns = LastColumn + 1};
-
-  Scene(QObject*  parent);
-  ~Scene();
-
-  Item_id addItem(Scene_item* item);
-
-  int erase(int);     // Returns the index of the polyhedra just before the
-                      // one that is erased, or just after. Returns -1 if
-                      // the list is empty.
-
-  // Duplicate a scene item. Return the ID of the new item (-1 on error).
-  Item_id duplicate(Item_id index); 
-
-  // Accessors (getters)
-  size_t numberOfEntries() const;
-  Scene_item* item(Item_id) const ;
-  Item_id mainSelectionIndex() const;
-  int selectionAindex() const;
-  int selectionBindex() const;
-
-  // initializeGL() is called by Viewer::initializeGL()
-  void initializeGL();
-  // draw() is called by Viewer::draw()
-  void draw();
-  void drawWithNames();
-
-  // Get scene bounding box
-  Bbox bbox() const;
-  double len_diagonal() const
-  {
-    Bbox box = bbox();
-    double dx = box.xmax - box.xmin;
-    double dy = box.ymax - box.ymin;
-    double dz = box.zmax - box.zmin;
-    return std::sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-  // QAbstractItemModel functions
-  int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
-  int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
-  QVariant data ( const QModelIndex & index, int role = ::Qt::DisplayRole ) const;
-  QVariant headerData ( int section, ::Qt::Orientation orientation, int role = ::Qt::DisplayRole ) const;
-  ::Qt::ItemFlags flags ( const QModelIndex & index ) const;
-  bool setData(const QModelIndex &index, const QVariant &value, int role);
-
-  // auxiliary public function for QMainWindow
-  QItemSelection createSelection(int i);
-
-public slots:
-  // Notify the scene that an item was modified
-  void itemChanged(Item_id i); 
-  void itemChanged(Scene_item*);
-
-  virtual void setSelectedItem(Item_id i)
-  {
-    selected_item = i;
-    emit selectionChanged();
-  };
-
-  // Accessors (setters)
-  void setItemVisible(int, bool b);
-  void setItemA(int i);
-  void setItemB(int i);
-
-signals:
-  void updated_bbox();
-  void updated();
-  void itemAboutToBeDestroyed(Scene_item*);
-  void selectionChanged();
-
-private:
-  void draw_aux(bool with_names);
-  typedef QList<Scene_item*> Entries;
-  Entries entries;
-  int selected_item;
-  int item_A;
-  int item_B;
-
-}; // end class Scene
-
-class SceneDelegate : public QItemDelegate
-{
-public:
-  SceneDelegate(QObject * parent = 0)
-    : QItemDelegate(parent),
-      checkOnPixmap(":/cgal/icons/check-on.png"),
-      checkOffPixmap(":/cgal/icons/check-off.png")
-  {
-  }
-
-  bool editorEvent(QEvent *event, QAbstractItemModel *model,
-                   const QStyleOptionViewItem &option,
-                   const QModelIndex &index);
-  void paint(QPainter *painter, const QStyleOptionViewItem &option,
-             const QModelIndex &index) const;
-
-private:
-  QPixmap checkOnPixmap;
-  QPixmap checkOffPixmap;
-  mutable int size;
-}; // end class SceneDelegate
-
-#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h
deleted file mode 100644
index 394ea7e..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef SCENE_DRAW_INTERFACE_H
-#define SCENE_DRAW_INTERFACE_H
-
-class Scene_draw_interface {
-public:
-  virtual ~Scene_draw_interface(){}
-  virtual void initializeGL() = 0;
-  virtual void draw() = 0;
-  virtual void drawWithNames() = 0;
-};
-
-#endif // SCENE_DRAW_INTERFACE_H;
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item.h
deleted file mode 100644
index 531920d..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item.h
+++ /dev/null
@@ -1,95 +0,0 @@
-#ifndef SCENE_ITEM_H
-#define SCENE_ITEM_H
-
-#include <CGAL_demo/Scene_item_config.h>
-#include <CGAL_demo/Scene_interface.h>
-#include <QString>
-#include <QPixmap>
-#include <QFont>
-
-namespace qglviewer {
-  class ManipulatedFrame;
-}
-
-// This class represents an object in the OpenGL scene
-class SCENE_ITEM_EXPORT Scene_item : public QObject {
-  Q_OBJECT
-  Q_PROPERTY(QColor color READ color WRITE setColor)
-  Q_PROPERTY(QString name READ name WRITE setName)
-  Q_PROPERTY(bool visible READ visible WRITE setVisible)
-  Q_ENUMS(RenderingMode)
-  Q_PROPERTY(RenderingMode renderingMode READ renderingMode WRITE setRenderingMode)
-public:
-  typedef Scene_interface::Bbox Bbox;
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
-  static const QColor defaultColor; // defined in Scene_item.cpp
-
-  Scene_item()
-    : name_("unamed"),
-      color_(defaultColor),
-      visible_(true),
-      rendering_mode(FlatPlusEdges)
-  {};
-  virtual ~Scene_item();
-  virtual Scene_item* clone() const = 0;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const = 0;
-  // Flat/Gouraud OpenGL drawing
-  virtual void draw() const = 0;
-  // Wireframe OpenGL drawing
-  virtual void draw_edges() const { draw(); }
-  // Points OpenGL drawing
-  virtual void draw_points() const { draw(); }
-
-  // Functions for displaying meta-data of the item
-  virtual QString toolTip() const = 0;
-  virtual QPixmap graphicalToolTip() const { return QPixmap(); }
-  virtual QFont font() const { return QFont(); }
-
-  // Functions that help the Scene to compute its bbox
-  virtual bool isFinite() const { return true; }
-  virtual bool isEmpty() const { return true; }
-  virtual Bbox bbox() const { return Bbox(); }
-
-  // Function about manipulation
-  virtual bool manipulatable() const { return false; }
-  virtual ManipulatedFrame* manipulatedFrame() { return 0; }
-
-  // Getters for the four basic properties
-  virtual QColor color() const { return color_; }
-  virtual QString name() const { return name_; }
-  virtual bool visible() const { return visible_; }
-  virtual RenderingMode renderingMode() const { return rendering_mode; }
-  virtual QString renderingModeName() const; // Rendering mode as a human readable string
-
-public slots:
-  // Call that once you have finished changing something in the item
-  // (either the properties or internal data)
-  virtual void changed() {}
-
-  // Setters for the four basic properties
-  virtual void setColor(QColor c) { color_ = c; }
-  virtual void setName(QString n) { name_ = n; }
-  virtual void setVisible(bool b) { visible_ = b; }
-  virtual void setRenderingMode(RenderingMode m) { 
-    if (supportsRenderingMode(m))
-      rendering_mode = m; 
-  }
-
-  virtual void itemAboutToBeDestroyed(Scene_item*);
-
-signals:
-  void aboutToBeDestroyed();
-
-protected:
-  // The four basic properties
-  QString name_;
-  QColor color_;
-  bool visible_;
-  RenderingMode rendering_mode;
-
-}; // end class Scene_item
-
-#endif // SCENE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item_with_display_list.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item_with_display_list.h
deleted file mode 100644
index baddc7c..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item_with_display_list.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef SCENE_ITEM_WITH_DISPLAY_LIST_H
-#define SCENE_ITEM_WITH_DISPLAY_LIST_H
-
-#include <CGAL_demo/Scene_item.h>
-#include <CGAL/gl.h>
-
-// This class represents an object in the scene with an OpenGL rendering using display lists
-class SCENE_ITEM_EXPORT Scene_item_with_display_list 
-  : public Scene_item
-{
-public:
-  Scene_item_with_display_list();
-//   Scene_item_with_display_list(const Scene_item_with_display_list&);
-  ~Scene_item_with_display_list();
-
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  virtual void direct_draw() const = 0;
-  virtual void direct_draw_edges() const { draw(); };
-  // OpenGL drawing using a display list
-  virtual void draw() const; 
-  virtual void draw_edges() const;
-public slots:
-  // Call that once you have finished changing something in the item
-  // (either the properties or internal data).
-  virtual void changed();
-
-protected:
-  enum { DRAW = 0, DRAW_EDGES = 1, NB_OF_DISPLAY_LISTS = 2};
-  void draw(int) const;
-  // display lists
-  mutable GLuint display_list[NB_OF_DISPLAY_LISTS];
-  mutable bool display_list_built[NB_OF_DISPLAY_LISTS];
-
-}; // end class Scene_item_with_display_list 
-
-#endif // SCENE_ITEM_WITH_DISPLAY_LIST_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Viewer.h b/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Viewer.h
deleted file mode 100644
index 0e90ae5..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Viewer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include <CGAL_demo/Viewer_config.h>
-#include <QGLViewer/qglviewer.h>
-#include <QPoint>
-
-// forward declarations
-class QWidget;
-class Scene_draw_interface;
-
-class VIEWER_EXPORT Viewer : public QGLViewer {
-
-  Q_OBJECT
-
-public:
-  Viewer(QWidget * parent, bool antialiasing = false);
-
-  // overload several QGLViewer virtual functions
-  void draw();
-  void initializeGL();
-  void drawWithNames();
-  void postSelection(const QPoint&);
-  virtual void postDraw();
-
-  void setScene(Scene_draw_interface* scene);
-  void setMask(bool b, double ratio=1);
-  bool antiAliasing() const { return antialiasing; }
-
-signals:
-  void selected(int);
-  void pointSelected(QPoint);
-
-public slots:
-  void setAntiAliasing(bool b);
-  void setTwoSides(bool b);
-
-private:
-  void draw_aux(bool with_names);
-  void draw_mask();
-
-  Scene_draw_interface* scene;
-  bool antialiasing;
-  bool twosides;
-  bool mask_;
-  double ratio_;
-}; // end class Viewer
-
-#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp
deleted file mode 100644
index 8b9535b..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#include <CGAL_demo/Plugin_helper.h>
-#include <QMainWindow>
-#include <QAction>
-#include <QMetaObject>
-#include <QMetaMethod>
-#include <QtDebug>
-#include <QVector>
-#include <QSet>
-
-QAction*
-Plugin_helper::
-getActionFromMainWindow(QMainWindow* mw,
-                        QString action_name)
-{
-  return mw->findChild<QAction*>(action_name);
-}
-
-QStringList 
-Plugin_helper::actionsNames() const
-{
-  return QStringList();
-}
-
-void
-Plugin_helper::
-init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-  mw = mainWindow;
-  scene = scene_interface;
-  Q_FOREACH(QString actionName, actionsNames())
-  {
-    actions_map[actionName] = getActionFromMainWindow(mw, actionName);
-  }
-  autoConnectActions();
-}
-
-QList<QAction*> 
-Plugin_helper::actions() const
-{
-  return actions_map.values();
-}
-
-// Auto-connect actions to slots
-void Plugin_helper::autoConnectActions()
-{
-  QObject* thisObject = dynamic_cast<QObject*>(this);
-  if(!thisObject)
-    return;
-
-  const QMetaObject* metaObject = thisObject->metaObject();
-  QVector<QMetaMethod> methods;
-  QVector<QString> methodsNames;
-  QSet<QString> connected;
-  for(int i = metaObject->methodOffset();
-      i < metaObject->methodCount();
-      ++i)
-  {
-    const int pos = QString(metaObject->method(i).signature()).indexOf('(');
-    methodsNames << QString(metaObject->method(i).signature()).left(pos);
-    methods << metaObject->method(i);
-  }
-
-  Q_FOREACH(QAction* action, actions())
-  {
-    bool success = false;
-//     qDebug("Autoconnecting action \"%s\"...", 
-//            action->objectName().toUtf8().data());
-    const QMetaObject* action_metaObject = action->metaObject();
-    for(int i = action_metaObject->methodOffset();
-        i < action_metaObject->methodCount(); ++i)
-    {
-      QMetaMethod action_method = action_metaObject->method(i);
-        
-      if(action_method.methodType() == QMetaMethod::Signal)
-      {
-        const int pos = QString(action_method.signature()).indexOf('(');
-        QString methodName = QString(action_method.signature()).left(pos);
-        QString slotName = 
-          QString("on_%1_%2").arg(action->objectName()).arg(methodName);
-//         qDebug() << thisObject->tr("Slot %1 (%2)...").arg(slotName).arg(i);
-        int index = methodsNames.indexOf(slotName);
-        if(index>=0 && !connected.contains(slotName)) {
-          const bool ok = 
-            QObject::connect(action, 
-                             qPrintable(QString("2%1").arg(action_method.signature())),
-                             thisObject,
-                             qPrintable(QString("1%1").arg(methods[index].signature())));
-          if(!ok)
-          {
-            qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
-              .arg(action->objectName())
-              .arg(action_method.signature())
-              .arg(methods[index].signature());
-          }
-          else {
-//             qDebug("  ->Connected!");
-            success = true;
-            connected << slotName;
-          }
-        }
-//         else {
-//           qDebug(" nothing found!\n");
-//         }
-      }
-    } // end for each method of action
-    if(!success)
-      qDebug("ERROR: Failed to autoconnect the action \"%s\"!",
-             action->objectName().toUtf8().data());
-  } // end foreach action of actions()
-}
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene.cpp
deleted file mode 100644
index 04aabbc..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene.cpp
+++ /dev/null
@@ -1,592 +0,0 @@
-#include <CGAL_demo/Scene.h>
-#include <CGAL_demo/Scene_item.h>
-
-#include <QString>
-#include <QGLWidget>
-#include <QEvent>
-#include <QMouseEvent>
-#include <QPainter>
-#include <QColorDialog>
-#include <QApplication>
-#include <QPointer>
-
-namespace {
-  void CGALglcolor(QColor c)
-  {
-    ::glColor4f(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-  }
-}
-
-Scene::Scene(QObject* parent)
-  : QAbstractListModel(parent),
-    selected_item(-1),
-    item_A(-1),
-    item_B(-1)
-{
-}
-
-Scene::Item_id
-Scene::addItem(Scene_item* item)
-{
-  entries.push_back(item);
-  connect(this, SIGNAL(itemAboutToBeDestroyed(Scene_item*)),
-          item, SLOT(itemAboutToBeDestroyed(Scene_item*)));
-
-  emit updated_bbox();
-  emit updated();
-  QAbstractListModel::reset();
-  return entries.size() - 1;
-}
-
-int
-Scene::erase(int index)
-{
-  if(index < 0 || index >= entries.size())
-    return -1;
-
-  Scene_item* item = entries[index];
-  emit itemAboutToBeDestroyed(item);
-  delete item;
-  entries.removeAt(index);
-
-  selected_item = -1;
-  emit updated();
-  QAbstractListModel::reset();
-
-  if(--index >= 0)
-    return index;
-  if(!entries.isEmpty())
-    return 0;
-  return -1;
-}
-
-Scene::~Scene()
-{
-  Q_FOREACH(Scene_item* item_ptr, entries)
-  {
-    delete item_ptr;
-  }
-  entries.clear();
-}
-
-Scene_item*
-Scene::item(Item_id index) const
-{
-  return entries.value(index); // QList::value checks bounds
-}
-
-size_t
-Scene::numberOfEntries() const
-{
-  return entries.size();
-}
-
-// Duplicate a scene item.
-// Return the ID of the new item (-1 on error).
-Scene::Item_id
-Scene::duplicate(Item_id index)
-{
-  if(index < 0 || index >= entries.size())
-    return -1;
-
-  const Scene_item* item = entries[index];
-  Scene_item* new_item = item->clone();
-  if(new_item) {
-    new_item->setName(tr("%1 (copy)").arg(item->name()));
-    new_item->setColor(item->color());
-    new_item->setVisible(item->visible());
-    addItem(new_item);
-    return entries.size() - 1;
-  }
-  else
-    return -1;
-}
-
-void Scene::initializeGL()
-{
-}
-
-// workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define lighter light
-#endif
-
-void 
-Scene::draw()
-{
-  draw_aux(false);
-}
-void 
-Scene::drawWithNames()
-{
-  draw_aux(true);
-}
-
-void 
-Scene::draw_aux(bool with_names)
-{
-  // Flat/Gouraud OpenGL drawing
-  for(int index = 0; index < entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == Flat || item.renderingMode() == FlatPlusEdges || item.renderingMode() == Gouraud)
-      {
-	::glEnable(GL_LIGHTING);
-	::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-	if(index == selected_item)
-	  CGALglcolor(item.color().lighter(120));
-	else
-	  CGALglcolor(item.color());
-	if(item.renderingMode() == Gouraud)
-	  ::glShadeModel(GL_SMOOTH);
-	else
-	  ::glShadeModel(GL_FLAT);
-
-        item.draw();
-      }
-    }
-    if(with_names) {
-      ::glPopName();
-    }
-  }
-
-  // Wireframe OpenGL drawing
-  for(int index = 0; index < entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == FlatPlusEdges || item.renderingMode() == Wireframe)
-      {
-        ::glDisable(GL_LIGHTING);
-        ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-        if(index == selected_item)
-          CGALglcolor(Qt::black);
-        else
-          CGALglcolor(item.color().lighter(50));
-        
-        item.draw_edges();
-      }
-      if(with_names) {
-        ::glPopName();
-      }
-    }
-  }
-
-  // Points OpenGL drawing
-  for(int index = 0; index < entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == Points)
-      {
-        ::glDisable(GL_LIGHTING);
-        ::glPolygonMode(GL_FRONT_AND_BACK,GL_POINT);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-        if(index == selected_item)
-          CGALglcolor(Qt::black);
-        else
-          CGALglcolor(item.color().lighter(50));
-        
-        item.draw_points();
-      }
-      if(with_names) {
-        ::glPopName();
-      }
-    }
-  }
-}
-
-// workaround for Qt-4.2 (see above)
-#undef lighter
-
-int 
-Scene::rowCount(const QModelIndex & parent) const
-{
-  if (parent.isValid())
-    return 0;
-  else
-    return entries.size();
-}
-
-int 
-Scene::columnCount(const QModelIndex & parent) const
-{
-  if (parent.isValid())
-    return 0;
-  else
-    return NumberOfColumns;
-}
-
-QVariant 
-Scene::data(const QModelIndex &index, int role) const
-{
-  if (!index.isValid())
-    return QVariant();
-
-  if(index.row() < 0 || index.row() >= entries.size())
-    return QVariant();
-
-  if(role == ::Qt::ToolTipRole)
-  {
-    return entries[index.row()]->toolTip();
-  }
-  switch(index.column())
-  {
-  case ColorColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return entries.value(index.row())->color();
-    else if(role == ::Qt::DecorationRole)
-      return entries.value(index.row())->color();
-    break;
-  case NameColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return entries.value(index.row())->name();
-    if(role == ::Qt::FontRole)
-      return entries.value(index.row())->font();
-    break;
-  case RenderingModeColumn:
-    if(role == ::Qt::DisplayRole) {
-      return entries.value(index.row())->renderingModeName();
-    }
-    else if(role == ::Qt::EditRole) {
-      return static_cast<int>(entries.value(index.row())->renderingMode());
-    }
-    else if(role == ::Qt::TextAlignmentRole) {
-      return ::Qt::AlignCenter;
-    }
-    break;
-  case ABColumn:
-    if(role == ::Qt::DisplayRole) {
-      if(index.row() == item_A)
-	return "A";
-      if(index.row() == item_B)
-	return "B";
-    }
-    else if(role == ::Qt::TextAlignmentRole) {
-      return ::Qt::AlignCenter;
-    }
-    break;
-  case VisibleColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return entries.value(index.row())->visible();
-    break;
-  default:
-    return QVariant();
-  }
-  return QVariant();
-}
-
-QVariant 
-Scene::headerData ( int section, ::Qt::Orientation orientation, int role ) const
-{
-  if(orientation == ::Qt::Horizontal)  {
-    if (role == ::Qt::DisplayRole)
-    {
-      switch(section)
-      {
-      case NameColumn:
-	return tr("Name");
-	break;
-      case ColorColumn:
-	return tr("Color");
-	break;
-      case RenderingModeColumn:
-	return tr("Mode");
-      case ABColumn:
-	return tr("A/B");
-	break;
-      case VisibleColumn:
-	return tr("View");
-	break;
-      default:
-	return QVariant();
-      }
-    }
-    else if(role == ::Qt::ToolTipRole) {
-      if(section == RenderingModeColumn) {
-	return tr("Rendering mode (points/wireframe/flat/flat+edges/Gouraud)");
-      }
-      else if(section == ABColumn) {
-	return tr("Selection A/Selection B");
-      }
-    }
-  }
-  return QAbstractListModel::headerData(section, orientation, role);
-}
-
-Qt::ItemFlags 
-Scene::flags ( const QModelIndex & index ) const
-{
-  if (index.isValid() && index.column() == NameColumn) {
-    return QAbstractListModel::flags(index) | ::Qt::ItemIsEditable;
-  }
-  else {
-    return QAbstractListModel::flags(index); 
-  }
-}
-
-bool 
-Scene::setData(const QModelIndex &index, 
-	       const QVariant &value,
-	       int role)
-{
-  if( role != ::Qt::EditRole || !index.isValid() )
-    return false;
-
-  if(index.row() < 0 || index.row() >= entries.size())
-    return false;
-
-  Scene_item* item = entries[index.row()];
-  if(!item) return false;
-  switch(index.column())
-  {
-  case NameColumn:
-    item->setName(value.toString());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  case ColorColumn:
-    item->setColor(value.value<QColor>());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  case RenderingModeColumn:
-  {
-    RenderingMode rendering_mode = static_cast<RenderingMode>(value.toInt());
-    // Find next supported rendering mode
-    while ( ! item->supportsRenderingMode(rendering_mode) ) {
-      rendering_mode = static_cast<RenderingMode>( (rendering_mode+1) % NumberOfRenderingMode );
-    }
-    item->setRenderingMode(rendering_mode);
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  }
-  case VisibleColumn:
-    item->setVisible(value.toBool());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-  default:
-    return false;
-  }
-  return false;
-}
-
-Scene::Item_id Scene::mainSelectionIndex() const {
-  return selected_item;
-}
-
-int Scene::selectionAindex() const {
-  return item_A;
-}
-
-int Scene::selectionBindex() const {
-  return item_B;
-}
-
-QItemSelection Scene::createSelection(int i)
-{
-  return QItemSelection(QAbstractItemModel::createIndex(i, 0),
-    QAbstractItemModel::createIndex(i, LastColumn));
-}
-
-void Scene::itemChanged(Item_id i)
-{
-  if(i < 0 || i >= entries.size())
-    return;
-
-  entries[i]->changed();
-  emit dataChanged(QAbstractItemModel::createIndex(i, 0),
-    QAbstractItemModel::createIndex(i, LastColumn));
-}
-
-void Scene::itemChanged(Scene_item* item)
-{
-  item->changed();
-  emit dataChanged(QAbstractItemModel::createIndex(0, 0),
-    QAbstractItemModel::createIndex(entries.size() - 1, LastColumn));
-}
-
-bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
-				const QStyleOptionViewItem &option,
-				const QModelIndex &index)
-{
-  Scene *scene = static_cast<Scene*>(model);
-  Q_ASSERT(scene);
-  switch(index.column()) {
-  case Scene::VisibleColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
-      if(mouseEvent->button() == ::Qt::LeftButton) {
-	int x = mouseEvent->pos().x() - option.rect.x();
-	if(x >= (option.rect.width() - size)/2 && 
-	  x <= (option.rect.width() + size)/2) {
-	    model->setData(index, ! model->data(index).toBool() );
-	}
-      }
-      return false; //so that the selection can change
-    }
-    return true;
-    break;
-  case Scene::ColorColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      QColor color = 
-        QColorDialog::getColor(model->data(index).value<QColor>(),
-                               0/*,
-                               tr("Select color"),
-                               QColorDialog::ShowAlphaChannel*/);
-      if (color.isValid()) {
-	model->setData(index, color );
-      }
-    }
-    else if(event->type() == QEvent::MouseButtonDblClick) {
-      return true; // block double-click
-    }
-    return false;
-    break;
-  case Scene::RenderingModeColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      // Switch rendering mode
-      /*RenderingMode*/int rendering_mode = model->data(index, ::Qt::EditRole).toInt();
-      rendering_mode = (rendering_mode+1) % NumberOfRenderingMode;
-      model->setData(index, rendering_mode);
-    }
-    else if(event->type() == QEvent::MouseButtonDblClick) {
-      return true; // block double-click
-    }
-    return false;
-    break;
-  case Scene::ABColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      if(index.row() == scene->item_B) {
-	scene->item_A = index.row();
-	scene->item_B = -1;
-      }
-      else if(index.row() == scene->item_A) {
-	scene->item_B = index.row();
-	scene->item_A = -1;
-      }
-      else if(scene->item_A == -1) {
-	scene->item_A = index.row();
-      }
-      else {
-	scene->item_B = index.row();
-      }
-      scene->dataChanged(scene->createIndex(Scene::ABColumn, 0),
-	scene->createIndex(Scene::ABColumn, scene->rowCount()));
-    }
-    return false;
-    break;
-  default:
-    return QItemDelegate::editorEvent(event, model, option, index);
-  }
-}
-
-void SceneDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
-			  const QModelIndex &index) const
-{
-  if (index.column() != Scene::VisibleColumn) {
-    QItemDelegate::paint(painter, option, index);
-  } else {
-    const QAbstractItemModel *model = index.model();
-    QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ?
-      (option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive : QPalette::Disabled;
-
-    if (option.state & QStyle::State_Selected)
-      painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight));
-
-    bool checked = model->data(index, ::Qt::DisplayRole).toBool();
-    int width = option.rect.width();
-    int height = option.rect.height();
-    size = (std::min)(width, height);
-    int x = option.rect.x() + (option.rect.width() / 2) - (size / 2);;
-    int y = option.rect.y() + (option.rect.height() / 2) - (size / 2);
-    if(checked) {
-      painter->drawPixmap(x, y, checkOnPixmap.scaled(QSize(size, size),
-	::Qt::KeepAspectRatio,
-	::Qt::SmoothTransformation));
-    }
-    else {
-      painter->drawPixmap(x, y, checkOffPixmap.scaled(QSize(size, size),
-	::Qt::KeepAspectRatio,
-	::Qt::SmoothTransformation));
-    }
-    drawFocus(painter, option, option.rect); // since we draw the grid ourselves
-  }
-}
-
-void Scene::setItemVisible(int index, bool b)
-{
-  if( index < 0 || index >= entries.size() )
-    return;
-  entries[index]->setVisible(b);
-  emit dataChanged(QAbstractItemModel::createIndex(index, VisibleColumn),
-    QAbstractItemModel::createIndex(index, VisibleColumn));
-}
-
-void Scene::setItemA(int i)
-{
-  item_A = i;
-  if(item_A == item_B)
-  {
-    item_B = -1;
-  }
-  emit dataChanged(QAbstractItemModel::createIndex(0, ABColumn),
-    QAbstractItemModel::createIndex(entries.size()-1, ABColumn));
-}
-
-void Scene::setItemB(int i)
-{
-  item_B = i;
-  if(item_A == item_B)
-  {
-    item_A = -1;
-  }
-  emit updated();
-  emit dataChanged(QAbstractItemModel::createIndex(0, ABColumn),
-    QAbstractItemModel::createIndex(entries.size()-1, ABColumn));
-}
-
-Scene::Bbox Scene::bbox() const
-{
-  if(entries.empty())
-    return Bbox();
-
-  bool bbox_initialized = false;
-  Bbox bbox;
-  Q_FOREACH(Scene_item* item, entries) 
-  {
-    if(item->isFinite() && !item->isEmpty()) {
-      if(bbox_initialized) {
-        bbox = bbox + item->bbox();
-      }
-      else { 
-        bbox = item->bbox();
-        bbox_initialized = true;
-      }
-    }
-  }
-  return bbox;
-}
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp
deleted file mode 100644
index 4cceb9d..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <CGAL_demo/Scene_item.h>
-
-const QColor Scene_item::defaultColor = QColor(100, 100, 255);
-
-Scene_item::~Scene_item() {}
-
-void Scene_item::itemAboutToBeDestroyed(Scene_item* item) {
-  if(this == item)
-    emit aboutToBeDestroyed();
-}
-
-// Rendering mode as a human readable string
-QString Scene_item::renderingModeName() const
-{
-  switch(renderingMode()) 
-  {
-    case Points:
-      return tr("points");
-    case Wireframe:
-      return tr("wire");
-    case Flat:
-      return tr("flat");
-    case FlatPlusEdges:
-      return tr("flat+edges");
-    case Gouraud:
-      return tr("Gouraud");
-    default:
-      Q_ASSERT(false);
-      return tr("unknown");
-  }
-} 
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item_with_display_list.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item_with_display_list.cpp
deleted file mode 100644
index 28ea828..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Scene_item_with_display_list.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include <iostream>
-
-Scene_item_with_display_list::Scene_item_with_display_list()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    display_list[i] = 0;
-    display_list_built[i] = false;
-  }
-}
-
-// Scene_item_with_display_list::
-// Scene_item_with_display_list(const Scene_item_with_display_list& item)
-//   : Scene_item(item),
-//     display_list(0),
-//     display_list_built(false)
-// {}
-
-Scene_item_with_display_list::~Scene_item_with_display_list()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    if(display_list_built[i] && display_list[i] != 0) {
-      ::glDeleteLists(display_list[i],1);
-    }
-  }
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-
-void Scene_item_with_display_list::draw() const {
-  draw(DRAW);
-}
-
-void Scene_item_with_display_list::draw_edges() const {
-  draw(DRAW_EDGES);
-}
-
-void Scene_item_with_display_list::draw(int i) const
-{
-  if(!display_list_built[i])
-  {
-    if(display_list[i] == 0) {
-      display_list[i] = ::glGenLists(1);
-      if(display_list[i] == 0)
-      {
-        std::cerr << "Unable to create display list" << std::endl;
-        return;
-      }
-    }
-    // draw the item in a display list
-    ::glNewList(display_list[i],GL_COMPILE_AND_EXECUTE);
-    if(i == 0) {
-      direct_draw();
-    }
-    else {
-      direct_draw_edges();
-    }
-    ::glEndList();
-    display_list_built[i] = true;
-  }
-  else {
-    // draw using the display list
-    ::glCallList(display_list[i]);
-  }
-}
-
-void Scene_item_with_display_list::changed()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    display_list_built[i] = false;
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Viewer.cpp
deleted file mode 100644
index 696eacb..0000000
--- a/3rdparty/CGAL-4.6/demo/Mesh_3/src/CGAL_demo/Viewer.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-#include <CGAL_demo/Viewer.h>
-#include <CGAL_demo/Scene_draw_interface.h>
-
-Viewer::Viewer(QWidget* parent, bool antialiasing)
-  : QGLViewer(parent),
-    scene(0),
-    antialiasing(antialiasing),
-    twosides(false),
-    mask_(false),
-    ratio_(1.)
-{
-  setBackgroundColor(::Qt::white);
-  setMouseTracking(true);
-}
-
-void Viewer::setScene(Scene_draw_interface* scene)
-{
-  this->scene = scene;
-}
-
-void Viewer::setAntiAliasing(bool b)
-{
-  antialiasing = b;
-  updateGL();
-}
-
-void Viewer::setTwoSides(bool b)
-{
-  twosides = b;
-  updateGL();
-}
-
-void Viewer::setMask(bool b, double r)
-{
-  mask_ = b;
-  ratio_ = r;
-  updateGL();
-}
-
-void Viewer::draw()
-{
-  draw_aux(false);
-}
-
-void Viewer::initializeGL()
-{
-  QGLViewer::initializeGL();
-  scene->initializeGL();
-}
-
-void Viewer::draw_aux(bool with_names)
-{
-  QGLViewer::draw();
-  if(scene == 0)
-    return;
-
-  ::glLineWidth(1.0f);
-  ::glPointSize(2.f);
-  ::glEnable(GL_POLYGON_OFFSET_FILL);
-  ::glPolygonOffset(1.0f,1.0f);
-  ::glClearColor(1.0f,1.0f,1.0f,0.0f);
-  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
-  if(twosides)
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  else
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
-  if(antiAliasing())
-  {
-    ::glEnable(GL_BLEND);
-    ::glEnable(GL_LINE_SMOOTH);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  }
-  else
-  {
-    ::glDisable(GL_BLEND);
-    ::glDisable(GL_LINE_SMOOTH);
-    ::glDisable(GL_POLYGON_SMOOTH_HINT);
-    ::glBlendFunc(GL_ONE, GL_ZERO);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-  }
-  if(with_names)
-    scene->drawWithNames();
-  else
-    scene->draw();
-}
-
-void Viewer::drawWithNames()
-{
-  draw_aux(true);
-}
-
-void Viewer::postSelection(const QPoint& p)
-{
-  emit selected(this->selectedName());
-  // do a redraw
-  draw();
-  emit pointSelected(p);
-}
-
-void Viewer::postDraw()
-{
-  QGLViewer::postDraw();
-  
-  if ( mask_ )
-  {
-    draw_mask();
-  }
-}
-
-void Viewer::draw_mask()
-{
-  // fill grid with transparent blue
-  ::glColor4f(.4f, .4f, .4f, .7f);
-  
-  this->startScreenCoordinatesSystem();
-  
-  int width = this->width();
-  int height = this->height();
-  double widthF = static_cast<double>(width);
-  double heightF = static_cast<double>(height);
-  
-  ::glDisable(GL_LIGHTING);
-  ::glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); 
-  ::glEnable(GL_BLEND);
-  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-  
-  // Draws the background quad
-  ::glBegin(GL_QUADS);
-  
-  if ( widthF > (ratio_*heightF) )
-  {
-    int w1 = static_cast<int>( (widthF-(heightF*ratio_)) / 2 );
-    int w2 = width - w1;
-    
-    ::glVertex2i( 0, 0);
-    ::glVertex2i( 0, height);
-    ::glVertex2i( w1, height);
-    ::glVertex2i( w1, 0);
-    
-    ::glVertex2i( w2, 0);
-    ::glVertex2i( w2, height);
-    ::glVertex2i( width, height);
-    ::glVertex2i( width, 0);
-  }
-  else
-  {
-    int h1 = static_cast<int>( (heightF-(widthF/ratio_)) / 2 );
-    int h2 = height - h1;
-    
-    ::glVertex2i( 0, 0);
-    ::glVertex2i( 0, h1);
-    ::glVertex2i( width, h1);
-    ::glVertex2i( width, 0);
-    
-    ::glVertex2i( 0, h2);
-    ::glVertex2i( 0, height);
-    ::glVertex2i( width, height);
-    ::glVertex2i( width, h2);
-  }
-  ::glEnd();
-  
-  ::glDisable(GL_BLEND);
-  this->stopScreenCoordinatesSystem();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Nef_2/CMakeLists.txt
deleted file mode 100644
index d4cabd5..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Nef_2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3 )
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched)
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND CGAL_Qt3_FOUND AND QT3_FOUND )
-
-  include_directories(BEFORE ../../include)
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  include( Qt3Macros-patched )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/nef_2.cpp" nef_2.moc )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/Qt_widget_toolbar.h" Qt_widget_toolbar.moc )
-
-
-  # The executable itself.
-  add_executable  ( nef_2 
-                    nef_2.cpp nef_2.moc
-		    Qt_widget_toolbar.cpp Qt_widget_toolbar.moc )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS nef_2 )
-
-  target_link_libraries( nef_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.cpp b/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.cpp
deleted file mode 100644
index 69bcb23..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/basic.h>
-
-#if defined CGAL_USE_GMP
-
-#include <CGAL/IO/Qt_widget.h>
-#include "Qt_widget_toolbar.h"
-
-// icons
-#include <CGAL/IO/pixmaps/point.xpm>
-#include <CGAL/IO/pixmaps/line.xpm>
-#include <CGAL/IO/pixmaps/arrow.xpm>
-#include <CGAL/IO/pixmaps/polygon.xpm>
-
-#include <qiconset.h>
-
-Tools_toolbar::Tools_toolbar(CGAL::Qt_widget *w,
-			     QMainWindow *mw) : QToolBar(mw, "NT")
-  {
-    w->attach(&input_point);
-    input_point.deactivate();
-    w->attach(&input_line);
-    input_line.deactivate();
-    w->attach(&input_polygon);
-    input_polygon.deactivate();
-
-    //set the widget
-    widget = w;
-
-    QIconSet set0(QPixmap( (const char**)arrow_small_xpm ),
-                  QPixmap( (const char**)arrow_xpm ));
-    QIconSet set1(QPixmap( (const char**)point_small_xpm ),
-                  QPixmap( (const char**)point_xpm ));
-    QIconSet set2(QPixmap( (const char**)line_small_xpm ),
-                  QPixmap( (const char**)line_xpm ));
-    QIconSet set3(QPixmap( (const char**)polygon_small_xpm ),
-                  QPixmap( (const char**)polygon_xpm ));
-
-  but[0] = new QToolButton(this, "Deactivate Layer");
-  but[0]->setIconSet(set0);
-  but[0]->setTextLabel("Deactivate Layer");
-  but[1] = new QToolButton(this, "pointinput layer");
-  but[1]->setIconSet(set1);
-  but[1]->setTextLabel("Input Point");
-  but[2] = new QToolButton(this, "lineinput layer");
-  but[2]->setIconSet(set2);
-  but[2]->setTextLabel("Input Line");
-  but[3] = new QToolButton(this, "polygoninput layer");
-  but[3]->setIconSet(set3);
-  but[3]->setTextLabel("Input Simple Polygon");
-
-  nr_of_buttons = 4;
-  button_group = new QButtonGroup(0, "My_group");
-  for(int i = 0; i<nr_of_buttons; i++) {
-    button_group->insert(but[i]);
-    but[i]->setToggleButton(true);
-  }
-  button_group->setExclusive(true);
-
-  connect(but[1], SIGNAL(stateChanged(int)),
-        &input_point, SLOT(stateChanged(int)));
-  connect(but[2], SIGNAL(stateChanged(int)),
-        &input_line, SLOT(stateChanged(int)));
-  connect(but[3], SIGNAL(stateChanged(int)),
-        &input_polygon, SLOT(stateChanged(int)));
-}
-
-#include "Qt_widget_toolbar.moc"
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.h b/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.h
deleted file mode 100644
index 0d047a3..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/Qt_widget_toolbar.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-
-#ifndef CGAL_QT_WIDGET_TOOLBAR_H
-#define CGAL_QT_WIDGET_TOOLBAR_H
-
-#include "cgal_types.h"
-
-// TODO: check if some of those includes shouldn't be in the .C file
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_get_point.h>
-#include <CGAL/IO/Qt_widget_get_line.h>
-#include <CGAL/IO/Qt_widget_get_simple_polygon.h>
-
-#include <qobject.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qbuttongroup.h>
-#include <qmainwindow.h>
-
-
-class Tools_toolbar : public QToolBar
-{
-  Q_OBJECT
-public:
-  Tools_toolbar(CGAL::Qt_widget *w, QMainWindow *mw);
-  ~Tools_toolbar(){};
-private:
-  QToolButton     *but[10];
-  QButtonGroup    *button_group;
-  CGAL::Qt_widget *widget;
-  int             nr_of_buttons;
-
-
-  CGAL::Qt_widget_get_point<Rp> input_point;
-  CGAL::Qt_widget_get_line<Rp>  input_line;
-  CGAL::Qt_widget_get_simple_polygon<Cartesian_polygon_2>
-                                input_polygon;
-};//end class
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/cgal_types.h b/3rdparty/CGAL-4.6/demo/Nef_2/cgal_types.h
deleted file mode 100644
index 5030caf..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/cgal_types.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/basic.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/Partition_traits_2.h>
-#include <CGAL/Gmpz.h>
-#include <CGAL/Gmpq.h>
-#include <CGAL/Filtered_extended_homogeneous.h>
-#include <CGAL/Nef_polyhedron_2.h>
-
-
-
-//Cartesian types
-typedef CGAL::Cartesian<CGAL::Gmpq>   Rp;
-typedef CGAL::Partition_traits_2<Rp>
-                                  Traits;
-typedef Rp::Point_2               Cartesian_point_2;
-typedef Rp::Line_2                Cartesian_line_2;
-typedef Traits::Polygon_2         Cartesian_polygon_2;
-typedef Cartesian_polygon_2::Vertex_iterator
-                                  Vertex_iterator;
-
-typedef CGAL::Cartesian<double>   RP_double;
-typedef CGAL::Partition_traits_2<RP_double>
-                                  Traits_double;
-typedef Traits_double::Polygon_2  Polygon_2_double;
-typedef Polygon_2_double::Vertex_iterator
-                                  Vertex_iterator_double;
-
-//The Nef_Polyhedron types
-typedef CGAL::Gmpz                RT;
-typedef CGAL::Filtered_extended_homogeneous<RT>
-                                  Extended_kernel;
-typedef CGAL::Nef_polyhedron_2<Extended_kernel>
-                                  Nef_polyhedron;
-typedef Nef_polyhedron::Point     Point_2;
-typedef Nef_polyhedron::Line      Line;
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/complex.nef b/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/complex.nef
deleted file mode 100644
index 3feebf4..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/complex.nef
+++ /dev/null
@@ -1,422 +0,0 @@
-Nef_polyhedron_2<Filtered_extended_homogeneous>
-Plane_map_2
-vertices 87
-halfedges 276
-faces 54
-0 { 0 3, 0, -1 0 -1 0 1}
-1 { 0 5, 0, -1 0 1 0 1}
-2 { 0 9, 1, 0 -95 0 -75 1}
-3 { 0 13, 1, 0 -95 0 10 1}
-4 { 0 17, 1, 0 -89 0 -10 1}
-5 { 0 21, 0, 0 -335 0 -5 4}
-6 { 0 23, 1, 0 -80 0 -45 1}
-7 { 0 25, 0, 0 -80 0 -5 1}
-8 { 0 29, 0, 0 -77 0 10 1}
-9 { 0 33, 0, 0 -84210 0 -43443 1198}
-10 { 0 37, 0, 0 -70 0 -70 1}
-11 { 0 41, 0, 0 -210 0 -175 3}
-12 { 0 45, 0, 0 -910 0 -600 13}
-13 { 0 49, 1, 0 -3640 0 -1907 52}
-14 { 0 53, 1, 0 -70 0 -36 1}
-15 { 0 57, 0, 0 -210 0 65 3}
-16 { 0 61, 0, 0 -70 0 45 1}
-17 { 0 63, 0, 0 -70 0 70 1}
-18 { 0 67, 1, 0 -114621 0 -72405 1729}
-19 { 0 71, 1, 0 -245 0 145 4}
-20 { 0 77, 0, 0 -60 0 -70 1}
-21 { 0 81, 1, 0 -19231 0 -16589 323}
-22 { 0 85, 1, 0 -22354 0 -23405 406}
-23 { 0 87, 1, 0 -55 0 30 1}
-24 { 0 91, 1, 0 -580 0 555 11}
-25 { 0 95, 1, 0 -52233 0 -64449 1021}
-26 { 0 99, 0, 0 -455 0 630 9}
-27 { 0 78, 1, 0 -50 0 -45 1}
-28 { 0 101, 1, 0 -50 0 75 1}
-29 { 0 105, 1, 0 -3377 0 -5110 73}
-30 { 0 109, 0, 0 -275 0 420 6}
-31 { 0 113, 1, 0 -1850 0 2865 43}
-32 { 0 117, 1, 0 -41 0 70 1}
-33 { 0 119, 0, 0 -37 0 -83 1}
-34 { 0 121, 0, 0 -32 0 85 1}
-35 { 0 52, 1, 0 -30 0 0 1}
-36 { 0 125, 1, 0 -3158 0 7630 109}
-37 { 0 127, 1, 0 -25 0 45 1}
-38 { 0 131, 1, 0 -10846 0 20568 451}
-39 { 0 135, 1, 0 -20 0 -85 1}
-40 { 0 139, 0, 0 -24103 0 -93945 1279}
-41 { 0 143, 1, 0 -37 0 -140 2}
-42 { 0 92, 1, 0 -15 0 -35 1}
-43 { 0 147, 0, 0 -872 0 -4970 71}
-44 { 0 149, 0, 0 -10 0 -24 1}
-45 { 0 153, 1, 0 5 0 10 1}
-46 { 0 157, 0, 0 100 0 490 7}
-47 { 0 161, 1, 0 15 0 -25 1}
-48 { 0 165, 0, 0 1256 0 3710 53}
-49 { 0 169, 0, 0 662 0 1944 25}
-50 { 0 171, 0, 0 28 0 82 1}
-51 { 0 175, 0, 0 4297 0 11749 148}
-52 { 0 177, 1, 0 30 0 80 1}
-53 { 0 181, 1, 0 36576 0 -56822 1197}
-54 { 0 185, 0, 0 583 0 1429 19}
-55 { 0 189, 1, 0 220 0 490 7}
-56 { 0 193, 1, 0 1408 0 3010 43}
-57 { 0 195, 1, 0 35 0 45 1}
-58 { 0 199, 1, 0 17687 0 19601 421}
-59 { 0 203, 0, 0 600 0 -910 13}
-60 { 0 207, 1, 0 12395 0 9299 266}
-61 { 0 211, 1, 0 82967 0 -62415 1669}
-62 { 0 215, 1, 0 2428 0 430 43}
-63 { 0 202, 1, 0 60 0 -90 1}
-64 { 0 219, 1, 0 60 0 -10 1}
-65 { 0 221, 0, 0 62 0 -4 1}
-66 { 0 225, 1, 0 2654 0 410 41}
-67 { 0 227, 0, 0 70 0 -70 1}
-68 { 0 231, 0, 0 980 0 -625 14}
-69 { 0 235, 0, 0 9450 0 -3608 135}
-70 { 0 239, 1, 0 70 0 -26 1}
-71 { 0 243, 1, 0 210 0 -10 3}
-72 { 0 247, 1, 0 70 0 10 1}
-73 { 0 251, 1, 0 70 0 37 1}
-74 { 0 255, 0, 0 70 0 49 1}
-75 { 0 259, 0, 0 630 0 475 9}
-76 { 0 190, 0, 0 70 0 70 1}
-77 { 0 263, 0, 0 14420 0 -5442 205}
-78 { 0 267, 0, 0 13150 0 9157 181}
-79 { 0 271, 0, 0 25846 0 18883 353}
-80 { 0 273, 0, 0 78 0 78 1}
-81 { 0 270, 0, 0 80 0 55 1}
-82 { 0 262, 1, 0 85 0 -50 1}
-83 { 0 246, 0, 0 90 0 10 1}
-84 { 0 272, 0, 0 98 0 -12 1}
-85 { 0 275, 0, 1 0 -1 0 1}
-86 { 0 4, 0, 1 0 1 0 1}
-0 { 1, 3, 4, 1, 0, 0 }
-1 { 0, 5, 2, 0, 1, 0 }
-2 { 3, 1, 274, 85, 1, 0 }
-3 { 2, 275, 0, 0, 0, 0 }
-4 { 5, 0, 275, 86, 0, 0 }
-5 { 4, 274, 1, 1, 1, 0 }
-6 { 7, 9, 42, 12, 1, 1 }
-7 { 6, 38, 8, 2, 2, 1 }
-8 { 9, 7, 38, 11, 2, 1 }
-9 { 8, 34, 6, 2, 1, 1 }
-10 { 11, 13, 18, 5, 1, 1 }
-11 { 10, 14, 12, 3, 3, 1 }
-12 { 13, 11, 22, 6, 3, 1 }
-13 { 12, 23, 10, 3, 1, 1 }
-14 { 15, 17, 11, 5, 3, 1 }
-15 { 14, 21, 16, 4, 4, 1 }
-16 { 17, 15, 30, 9, 4, 1 }
-17 { 16, 22, 14, 4, 3, 1 }
-18 { 19, 10, 26, 8, 1, 0 }
-19 { 18, 24, 20, 5, 5, 0 }
-20 { 21, 19, 24, 7, 5, 0 }
-21 { 20, 25, 15, 5, 4, 0 }
-22 { 23, 12, 17, 9, 3, 1 }
-23 { 22, 33, 13, 6, 1, 1 }
-24 { 25, 20, 19, 8, 5, 0 }
-25 { 24, 29, 21, 7, 4, 0 }
-26 { 27, 18, 58, 16, 1, 1 }
-27 { 26, 54, 28, 8, 6, 1 }
-28 { 29, 27, 54, 15, 6, 1 }
-29 { 28, 50, 25, 8, 4, 1 }
-30 { 31, 16, 50, 14, 4, 0 }
-31 { 30, 46, 32, 9, 7, 0 }
-32 { 33, 31, 46, 13, 7, 0 }
-33 { 32, 42, 23, 9, 1, 0 }
-34 { 35, 37, 9, 11, 1, 0 }
-35 { 34, 41, 36, 10, 8, 0 }
-36 { 37, 35, 72, 20, 8, 0 }
-37 { 36, 77, 34, 10, 1, 0 }
-38 { 39, 8, 7, 12, 2, 1 }
-39 { 38, 45, 40, 11, 9, 1 }
-40 { 41, 39, 67, 21, 9, 0 }
-41 { 40, 81, 35, 11, 8, 0 }
-42 { 43, 6, 33, 13, 1, 0 }
-43 { 42, 49, 44, 12, 10, 0 }
-44 { 45, 43, 49, 18, 10, 0 }
-45 { 44, 67, 39, 12, 9, 0 }
-46 { 47, 32, 31, 14, 7, 1 }
-47 { 46, 53, 48, 13, 11, 1 }
-48 { 49, 47, 64, 18, 11, 1 }
-49 { 48, 44, 43, 13, 10, 1 }
-50 { 51, 30, 29, 15, 4, 0 }
-51 { 50, 57, 52, 14, 12, 0 }
-52 { 53, 51, 65, 35, 12, 1 }
-53 { 52, 64, 47, 14, 11, 1 }
-54 { 55, 28, 27, 16, 6, 1 }
-55 { 54, 61, 56, 15, 13, 1 }
-56 { 57, 55, 61, 19, 13, 0 }
-57 { 56, 71, 51, 15, 12, 0 }
-58 { 59, 26, 62, 17, 1, 0 }
-59 { 58, 63, 60, 16, 14, 0 }
-60 { 61, 59, 68, 19, 14, 0 }
-61 { 60, 56, 55, 16, 13, 0 }
-62 { 63, 58, 96, 26, 1, 0 }
-63 { 62, 88, 59, 17, 14, 0 }
-64 { 65, 48, 53, 35, 11, 1 }
-65 { 64, 52, 66, 18, 12, 1 }
-66 { 67, 65, 78, 21, 12, 0 }
-67 { 66, 40, 45, 18, 9, 0 }
-68 { 69, 60, 88, 24, 14, 1 }
-69 { 68, 86, 70, 19, 15, 1 }
-70 { 71, 69, 86, 23, 15, 1 }
-71 { 70, 87, 57, 19, 12, 1 }
-72 { 73, 36, 81, 22, 8, 0 }
-73 { 72, 85, 74, 20, 16, 0 }
-74 { 75, 73, 85, 25, 16, 0 }
-75 { 74, 95, 76, 20, 17, 0 }
-76 { 77, 75, 95, 29, 17, 0 }
-77 { 76, 105, 37, 20, 1, 0 }
-78 { 79, 66, 83, 27, 12, 1 }
-79 { 78, 82, 80, 21, 18, 1 }
-80 { 81, 79, 82, 22, 18, 1 }
-81 { 80, 72, 41, 21, 8, 1 }
-82 { 83, 80, 79, 27, 18, 1 }
-83 { 82, 78, 84, 22, 12, 1 }
-84 { 85, 83, 92, 25, 12, 0 }
-85 { 84, 74, 73, 22, 16, 0 }
-86 { 87, 70, 69, 24, 15, 1 }
-87 { 86, 91, 71, 23, 12, 1 }
-88 { 89, 68, 63, 26, 14, 0 }
-89 { 88, 99, 90, 24, 19, 0 }
-90 { 91, 89, 109, 31, 19, 0 }
-91 { 90, 113, 87, 24, 12, 0 }
-92 { 93, 84, 141, 42, 12, 1 }
-93 { 92, 140, 94, 25, 20, 1 }
-94 { 95, 93, 102, 29, 20, 1 }
-95 { 94, 76, 75, 25, 17, 1 }
-96 { 97, 62, 100, 28, 1, 1 }
-97 { 96, 101, 98, 26, 21, 1 }
-98 { 99, 97, 101, 30, 21, 1 }
-99 { 98, 109, 89, 26, 19, 1 }
-100 { 101, 96, 106, 30, 1, 1 }
-101 { 100, 98, 97, 28, 21, 1 }
-102 { 103, 94, 140, 41, 20, 1 }
-103 { 102, 136, 104, 29, 22, 1 }
-104 { 105, 103, 118, 33, 22, 0 }
-105 { 104, 119, 77, 29, 1, 0 }
-106 { 107, 100, 114, 32, 1, 0 }
-107 { 106, 110, 108, 30, 23, 0 }
-108 { 109, 107, 110, 31, 23, 0 }
-109 { 108, 90, 99, 30, 19, 0 }
-110 { 111, 108, 107, 32, 23, 1 }
-111 { 110, 117, 112, 31, 24, 1 }
-112 { 113, 111, 126, 37, 24, 1 }
-113 { 112, 127, 91, 31, 12, 1 }
-114 { 115, 106, 120, 34, 1, 0 }
-115 { 114, 121, 116, 32, 25, 0 }
-116 { 117, 115, 121, 36, 25, 1 }
-117 { 116, 125, 111, 32, 24, 1 }
-118 { 119, 104, 136, 40, 22, 0 }
-119 { 118, 132, 105, 33, 1, 0 }
-120 { 121, 114, 122, 36, 1, 0 }
-121 { 120, 116, 115, 34, 25, 0 }
-122 { 123, 120, 154, 46, 1, 0 }
-123 { 122, 128, 124, 36, 26, 0 }
-124 { 125, 123, 128, 38, 26, 1 }
-125 { 124, 126, 117, 36, 24, 1 }
-126 { 127, 112, 125, 38, 24, 1 }
-127 { 126, 131, 113, 37, 12, 1 }
-128 { 129, 124, 123, 46, 26, 0 }
-129 { 128, 157, 130, 38, 27, 0 }
-130 { 131, 129, 148, 44, 27, 0 }
-131 { 130, 149, 127, 38, 12, 0 }
-132 { 133, 135, 119, 40, 1, 1 }
-133 { 132, 139, 134, 39, 28, 1 }
-134 { 135, 133, 203, 63, 28, 1 }
-135 { 134, 202, 132, 39, 1, 1 }
-136 { 137, 118, 103, 41, 22, 0 }
-137 { 136, 143, 138, 40, 29, 0 }
-138 { 139, 137, 143, 43, 29, 1 }
-139 { 138, 147, 133, 40, 28, 1 }
-140 { 141, 102, 93, 42, 20, 1 }
-141 { 140, 92, 142, 41, 12, 1 }
-142 { 143, 141, 144, 43, 12, 0 }
-143 { 142, 138, 137, 41, 29, 0 }
-144 { 145, 142, 161, 53, 12, 0 }
-145 { 144, 181, 146, 43, 30, 0 }
-146 { 147, 145, 181, 59, 30, 1 }
-147 { 146, 203, 139, 43, 28, 1 }
-148 { 149, 130, 157, 48, 27, 0 }
-149 { 148, 165, 131, 44, 12, 0 }
-150 { 151, 153, 199, 60, 12, 1 }
-151 { 150, 207, 152, 45, 31, 1 }
-152 { 153, 151, 207, 62, 31, 1 }
-153 { 152, 215, 150, 45, 12, 1 }
-154 { 155, 122, 166, 49, 1, 1 }
-155 { 154, 162, 156, 46, 32, 1 }
-156 { 157, 155, 162, 48, 32, 1 }
-157 { 156, 148, 129, 46, 27, 1 }
-158 { 159, 161, 208, 61, 12, 1 }
-159 { 158, 178, 160, 47, 33, 1 }
-160 { 161, 159, 178, 53, 33, 1 }
-161 { 160, 144, 158, 47, 12, 1 }
-162 { 163, 156, 155, 49, 32, 1 }
-163 { 162, 169, 164, 48, 34, 1 }
-164 { 165, 163, 185, 55, 34, 0 }
-165 { 164, 189, 149, 48, 12, 0 }
-166 { 167, 154, 170, 50, 1, 0 }
-167 { 166, 171, 168, 49, 35, 0 }
-168 { 169, 167, 171, 51, 35, 0 }
-169 { 168, 175, 163, 49, 34, 0 }
-170 { 171, 166, 172, 51, 1, 0 }
-171 { 170, 168, 167, 50, 35, 0 }
-172 { 173, 170, 176, 52, 1, 1 }
-173 { 172, 177, 174, 51, 36, 1 }
-174 { 175, 173, 177, 54, 36, 1 }
-175 { 174, 185, 169, 51, 34, 1 }
-176 { 177, 172, 182, 54, 1, 1 }
-177 { 176, 174, 173, 52, 36, 1 }
-178 { 179, 160, 159, 61, 33, 1 }
-179 { 178, 211, 180, 53, 37, 1 }
-180 { 181, 179, 200, 59, 37, 0 }
-181 { 180, 146, 145, 53, 30, 0 }
-182 { 183, 176, 190, 56, 1, 0 }
-183 { 182, 186, 184, 54, 38, 0 }
-184 { 185, 183, 186, 55, 38, 0 }
-185 { 184, 164, 175, 54, 34, 0 }
-186 { 187, 184, 183, 56, 38, 1 }
-187 { 186, 193, 188, 55, 39, 1 }
-188 { 189, 187, 194, 57, 39, 1 }
-189 { 188, 195, 165, 55, 12, 1 }
-190 { 191, 182, 257, 76, 1, 0 }
-191 { 190, 256, 192, 56, 40, 0 }
-192 { 193, 191, 196, 58, 40, 1 }
-193 { 192, 194, 187, 56, 39, 1 }
-194 { 195, 188, 193, 58, 39, 1 }
-195 { 194, 199, 189, 57, 12, 1 }
-196 { 197, 192, 256, 75, 40, 0 }
-197 { 196, 252, 198, 58, 41, 0 }
-198 { 199, 197, 204, 60, 41, 0 }
-199 { 198, 150, 195, 58, 12, 0 }
-200 { 201, 180, 226, 67, 37, 0 }
-201 { 200, 227, 202, 59, 1, 0 }
-202 { 203, 201, 135, 63, 1, 1 }
-203 { 202, 134, 147, 59, 28, 1 }
-204 { 205, 198, 252, 74, 41, 0 }
-205 { 204, 248, 206, 60, 42, 0 }
-206 { 207, 205, 212, 62, 42, 1 }
-207 { 206, 152, 151, 60, 31, 1 }
-208 { 209, 158, 232, 69, 12, 0 }
-209 { 208, 228, 210, 61, 43, 0 }
-210 { 211, 209, 228, 68, 43, 0 }
-211 { 210, 226, 179, 61, 37, 0 }
-212 { 213, 206, 222, 66, 42, 0 }
-213 { 212, 220, 214, 62, 44, 0 }
-214 { 215, 213, 220, 65, 44, 0 }
-215 { 214, 221, 153, 62, 12, 0 }
-216 { 217, 219, 240, 71, 12, 1 }
-217 { 216, 236, 218, 64, 45, 1 }
-218 { 219, 217, 236, 70, 45, 1 }
-219 { 218, 232, 216, 64, 12, 1 }
-220 { 221, 214, 213, 66, 44, 0 }
-221 { 220, 225, 215, 65, 12, 0 }
-222 { 223, 212, 248, 73, 42, 1 }
-223 { 222, 244, 224, 66, 46, 1 }
-224 { 225, 223, 244, 72, 46, 1 }
-225 { 224, 240, 221, 66, 12, 1 }
-226 { 227, 200, 211, 68, 37, 0 }
-227 { 226, 231, 201, 67, 1, 0 }
-228 { 229, 210, 209, 69, 43, 1 }
-229 { 228, 235, 230, 68, 47, 1 }
-230 { 231, 229, 263, 82, 47, 1 }
-231 { 230, 262, 227, 68, 1, 1 }
-232 { 233, 208, 219, 70, 12, 0 }
-233 { 232, 239, 234, 69, 48, 0 }
-234 { 235, 233, 239, 77, 48, 1 }
-235 { 234, 263, 229, 69, 47, 1 }
-236 { 237, 218, 217, 71, 45, 1 }
-237 { 236, 243, 238, 70, 49, 1 }
-238 { 239, 237, 260, 77, 49, 0 }
-239 { 238, 234, 233, 70, 48, 0 }
-240 { 241, 216, 225, 72, 12, 0 }
-241 { 240, 247, 242, 71, 50, 0 }
-242 { 243, 241, 247, 83, 50, 0 }
-243 { 242, 246, 237, 71, 49, 0 }
-244 { 245, 224, 223, 73, 46, 1 }
-245 { 244, 251, 246, 72, 49, 1 }
-246 { 247, 245, 243, 83, 49, 0 }
-247 { 246, 242, 241, 72, 50, 0 }
-248 { 249, 222, 205, 74, 42, 0 }
-249 { 248, 255, 250, 73, 51, 0 }
-250 { 251, 249, 255, 78, 51, 0 }
-251 { 250, 267, 245, 73, 49, 0 }
-252 { 253, 204, 197, 75, 41, 1 }
-253 { 252, 259, 254, 74, 52, 1 }
-254 { 255, 253, 264, 78, 52, 1 }
-255 { 254, 250, 249, 74, 51, 1 }
-256 { 257, 196, 191, 76, 40, 0 }
-257 { 256, 190, 258, 75, 1, 0 }
-258 { 259, 257, 268, 79, 1, 1 }
-259 { 258, 264, 253, 75, 52, 1 }
-260 { 261, 238, 273, 84, 49, 0 }
-261 { 260, 272, 262, 77, 1, 0 }
-262 { 263, 261, 231, 82, 1, 1 }
-263 { 262, 230, 235, 77, 47, 1 }
-264 { 265, 254, 259, 79, 52, 1 }
-265 { 264, 271, 266, 78, 53, 1 }
-266 { 267, 265, 271, 81, 53, 0 }
-267 { 266, 270, 251, 78, 49, 0 }
-268 { 269, 258, 272, 80, 1, 0 }
-269 { 268, 273, 270, 79, 49, 0 }
-270 { 271, 269, 267, 81, 49, 0 }
-271 { 270, 266, 265, 79, 53, 0 }
-272 { 273, 268, 261, 84, 1, 0 }
-273 { 272, 260, 269, 80, 49, 0 }
-274 { 275, 2, 5, 86, 1, 0 }
-275 { 274, 4, 3, 85, 0, 0 }
-0 { -1, 3 , , 0 }
-1 { 1, 9 , , 1 }
-2 { 7, , , 0 }
-3 { 11, , , 0 }
-4 { 15, , , 1 }
-5 { 19, , , 0 }
-6 { 27, , , 0 }
-7 { 31, , , 0 }
-8 { 35, , , 0 }
-9 { 39, , , 1 }
-10 { 43, , , 0 }
-11 { 47, , , 1 }
-12 { 51, , , 0 }
-13 { 55, , , 1 }
-14 { 59, , , 0 }
-15 { 69, , , 1 }
-16 { 73, , , 1 }
-17 { 75, , , 0 }
-18 { 79, , , 1 }
-19 { 89, , , 1 }
-20 { 93, , , 1 }
-21 { 97, , , 0 }
-22 { 103, , , 0 }
-23 { 107, , , 0 }
-24 { 111, , , 1 }
-25 { 115, , , 0 }
-26 { 123, , , 0 }
-27 { 129, , , 1 }
-28 { 133, , , 0 }
-29 { 137, , , 1 }
-30 { 145, , , 1 }
-31 { 151, , , 1 }
-32 { 155, , , 0 }
-33 { 159, , , 1 }
-34 { 163, , , 1 }
-35 { 167, , , 0 }
-36 { 173, , , 0 }
-37 { 179, , , 0 }
-38 { 183, , , 0 }
-39 { 187, , , 1 }
-40 { 191, , , 0 }
-41 { 197, , , 1 }
-42 { 205, , , 0 }
-43 { 209, , , 1 }
-44 { 213, , , 1 }
-45 { 217, , , 1 }
-46 { 223, , , 1 }
-47 { 229, , , 0 }
-48 { 233, , , 1 }
-49 { 237, , , 0 }
-50 { 241, , , 1 }
-51 { 249, , , 1 }
-52 { 253, , , 0 }
-53 { 265, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/symmdif.nef b/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/symmdif.nef
deleted file mode 100644
index 9ff0fa3..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/filtered_homogeneous_data/symmdif.nef
+++ /dev/null
@@ -1,116 +0,0 @@
-Nef_polyhedron_2<Filtered_extended_homogeneous>
-Plane_map_2
-vertices 26
-halfedges 72
-faces 13
-0 { 0 3, 0, -1 0 -1 0 1}
-1 { 0 5, 0, -1 0 1 0 1}
-2 { 0 9, 1, 0 -89 0 -10 1}
-3 { 0 13, 1, 0 -70 0 -70 1}
-4 { 0 17, 0, 0 -3640 0 -1907 52}
-5 { 0 21, 0, 0 -210 0 65 3}
-6 { 0 23, 1, 0 -70 0 70 1}
-7 { 0 27, 0, 0 -3377 0 -5110 73}
-8 { 0 31, 0, 0 -41 0 70 1}
-9 { 0 33, 1, 0 -37 0 -83 1}
-10 { 0 35, 1, 0 -32 0 85 1}
-11 { 0 39, 0, 0 -3158 0 7630 109}
-12 { 0 43, 0, 0 -872 0 -4970 71}
-13 { 0 45, 0, 0 -10 0 -24 1}
-14 { 0 49, 0, 0 1256 0 3710 53}
-15 { 0 51, 1, 0 28 0 82 1}
-16 { 0 55, 0, 0 1408 0 3010 43}
-17 { 0 57, 0, 0 62 0 -4 1}
-18 { 0 59, 1, 0 70 0 -70 1}
-19 { 0 63, 0, 0 9450 0 -3608 135}
-20 { 0 67, 0, 0 70 0 37 1}
-21 { 0 52, 1, 0 70 0 70 1}
-22 { 0 69, 1, 0 78 0 78 1}
-23 { 0 68, 1, 0 98 0 -12 1}
-24 { 0 71, 0, 1 0 -1 0 1}
-25 { 0 4, 0, 1 0 1 0 1}
-0 { 1, 3, 4, 1, 0, 0 }
-1 { 0, 5, 2, 0, 1, 0 }
-2 { 3, 1, 70, 24, 1, 0 }
-3 { 2, 71, 0, 0, 0, 0 }
-4 { 5, 0, 71, 25, 0, 0 }
-5 { 4, 70, 1, 1, 1, 0 }
-6 { 7, 9, 18, 5, 1, 1 }
-7 { 6, 14, 8, 2, 2, 1 }
-8 { 9, 7, 14, 4, 2, 1 }
-9 { 8, 10, 6, 2, 1, 1 }
-10 { 11, 13, 9, 4, 1, 1 }
-11 { 10, 17, 12, 3, 3, 1 }
-12 { 13, 11, 17, 7, 3, 1 }
-13 { 12, 27, 10, 3, 1, 1 }
-14 { 15, 8, 7, 5, 2, 0 }
-15 { 14, 21, 16, 4, 4, 0 }
-16 { 17, 15, 24, 7, 4, 0 }
-17 { 16, 12, 11, 4, 3, 0 }
-18 { 19, 6, 22, 6, 1, 1 }
-19 { 18, 23, 20, 5, 5, 1 }
-20 { 21, 19, 23, 8, 5, 0 }
-21 { 20, 31, 15, 5, 4, 0 }
-22 { 23, 18, 28, 8, 1, 1 }
-23 { 22, 20, 19, 6, 5, 1 }
-24 { 25, 16, 40, 12, 4, 0 }
-25 { 24, 32, 26, 7, 6, 0 }
-26 { 27, 25, 32, 9, 6, 1 }
-27 { 26, 33, 13, 7, 1, 1 }
-28 { 29, 22, 34, 10, 1, 1 }
-29 { 28, 35, 30, 8, 7, 1 }
-30 { 31, 29, 35, 11, 7, 0 }
-31 { 30, 39, 21, 8, 4, 0 }
-32 { 33, 26, 25, 12, 6, 1 }
-33 { 32, 43, 27, 9, 1, 1 }
-34 { 35, 28, 36, 11, 1, 1 }
-35 { 34, 30, 29, 10, 7, 1 }
-36 { 37, 34, 46, 14, 1, 1 }
-37 { 36, 44, 38, 11, 8, 1 }
-38 { 39, 37, 44, 13, 8, 0 }
-39 { 38, 45, 31, 11, 4, 0 }
-40 { 41, 24, 60, 19, 4, 0 }
-41 { 40, 58, 42, 12, 9, 0 }
-42 { 43, 41, 58, 18, 9, 1 }
-43 { 42, 59, 33, 12, 1, 1 }
-44 { 45, 38, 37, 14, 8, 0 }
-45 { 44, 49, 39, 13, 4, 0 }
-46 { 47, 36, 50, 15, 1, 1 }
-47 { 46, 51, 48, 14, 10, 1 }
-48 { 49, 47, 51, 16, 10, 0 }
-49 { 48, 55, 45, 14, 4, 0 }
-50 { 51, 46, 52, 16, 1, 1 }
-51 { 50, 48, 47, 15, 10, 1 }
-52 { 53, 50, 65, 21, 1, 1 }
-53 { 52, 64, 54, 16, 11, 1 }
-54 { 55, 53, 56, 17, 11, 0 }
-55 { 54, 57, 49, 16, 4, 0 }
-56 { 57, 54, 64, 20, 11, 0 }
-57 { 56, 60, 55, 17, 4, 0 }
-58 { 59, 42, 41, 19, 9, 1 }
-59 { 58, 63, 43, 18, 1, 1 }
-60 { 61, 40, 57, 20, 4, 0 }
-61 { 60, 67, 62, 19, 12, 0 }
-62 { 63, 61, 69, 23, 12, 1 }
-63 { 62, 68, 59, 19, 1, 1 }
-64 { 65, 56, 53, 21, 11, 1 }
-65 { 64, 52, 66, 20, 1, 1 }
-66 { 67, 65, 68, 22, 1, 1 }
-67 { 66, 69, 61, 20, 12, 1 }
-68 { 69, 66, 63, 23, 1, 1 }
-69 { 68, 62, 67, 22, 12, 1 }
-70 { 71, 2, 5, 25, 1, 0 }
-71 { 70, 4, 3, 24, 0, 0 }
-0 { -1, 3 , , 0 }
-1 { 1, 9 , , 0 }
-2 { 7, , , 1 }
-3 { 11, , , 1 }
-4 { 15, , , 0 }
-5 { 19, , , 1 }
-6 { 25, , , 1 }
-7 { 29, , , 1 }
-8 { 37, , , 1 }
-9 { 41, , , 1 }
-10 { 47, , , 1 }
-11 { 53, , , 1 }
-12 { 61, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/help/index.html b/3rdparty/CGAL-4.6/demo/Nef_2/help/index.html
deleted file mode 100644
index 74552ea..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/help/index.html
+++ /dev/null
@@ -1,392 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>Nef_2</title>
-  </head>
-
-  <body>
-    <P align="center"><FONT size="5">How to use Nef_2 Demo</FONT></P>
-    <br>
-    Main Functionality
-    <UL>
-      <LI><A href="#new">Reset application</A></LI>
-      <LI><A href="#new_window">Creating a new window</A></LI>
-      <LI><A href="#print">Print</A></LI>
-      <LI><A href="#close_window">Close the current window</A></LI>
-      <LI><A href="#quit">Quit the application</A></LI>      
-    </UL><br>
-    Nef_2 visualisation using lists
-    <UL>
-      <LI><A href="#sel">Select nef for visualisation</A></LI>
-      <LI><A href="#unsel">Toggle ON/OFF nef visualisation</A></LI>
-    </UL><br>
-
-    Building and erasing nefs
-    <UL>      
-      <LI><A href="#build_nef_p">Create a Nef polyhedron consisting of one 
-	  point</A></LI>
-      <LI><A href="#build_nef_l">Create a Nef polyhedron consisting of 
-	  a halfplane</A></LI>
-      <LI><A href="#build_nef_poly">Create a Nef polyhedron from a simple 
-	  polygon</A></LI>
-      <LI><A href="#erase_nef">Erase an existing Nef polyhedron</A></LI>
-    </UL><br>
-
-    Constructive Operations
-    <UL>
-      <LI><A href="#op_intersection">Intersection</A></LI>
-      <LI><A href="#op_uninon">Union</A></LI>
-      <LI><A href="#op_difference">Difference</A></LI>
-      <LI><A href="#op_symmetric_difference">Symmetric Difference</A></LI>
-      <LI><A href="#op_complement">Complement</A></LI>
-      <LI><A href="#op_interior">Interior</A></LI>
-      <LI><A href="#op_closure">Closure</A></LI>
-      <LI><A href="#op_boundary">Boundary</A></LI>
-      <LI><A href="#op_regularization">Regularization</A></LI>
-    </UL><br>
-
-    Persistance
-    <UL>
-      <LI><A href="#save_nef">Save the current Nef polyhedron</A></LI>
-      <LI><A href="#load_nef">Load an existing Nef polyhedron</A></LI>
-      <LI><A href="#load_poly">Load an existing simple polygon and construct 
-	  the Nef polyhedron from this polygon</A></LI>
-    </UL>
-
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="new">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Reset application</FONT></STRONG></P>
-    Press Ctrl+N combination keys or go to File menu and choose "New". 
-    All nefs constructed will be erased, the window's visible area will be set 
-    to default. (-1, 1, -1, 1)
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="new_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Create a new window</FONT></STRONG></P>
-    Press Ctrl+W combination keys or go to File menu and choose "New Window". 
-    A new window will appear, the window's visible area will be set 
-    to default. (-1, 1, -1, 1)
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="print"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Print</FONT></STRONG></P>
-    Press Ctrl+P combination keys or go to File menu and choose "Print". 
-    The visible area on the screen will be outputed to the print device 
-    of your choice. There are printers that does not support the raster 
-    opertions. I have used XOR to achieve the transparency effect.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="close_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Close the current window</FONT>
-      </STRONG></P>
-    Press Ctrl+X combination keys or go to File menu and choose "Close". 
-    You may do it for any window other than the initial one, this operation 
-    will close only the one you have choosen. If you do this for the initial 
-    parent window, it will close the others too.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="quit"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Quit the application</FONT></STRONG></P>
-    Press Ctrl+Q combination keys or go to File menu and choose "Quit". 
-    When you quit the application, all the windows you have created will 
-    be destroyed.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="sel"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Select Nef for visualisation</FONT>
-      </STRONG></P>
-    You can visualise at most two nef polyhedrons at one time. There are two 
-    lists that correspond to each nef you can display. The left one 
-    corresponds to the blue nef, the right one correspons to the gray one. To 
-    select a nef polyhedron from the list just press the left mouse button 
-    over the item's text. You should see the result on the widget, if the 
-    polyhedron corresponds to the current visible area. The default one 
-    is (-1, 1, -1, 1).
-    You should notice that you can see both nef polyhedrons even if there are 
-    overlapping parts. The gray one is always on top.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="unsel"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Toggle ON/OFF nef visualisation</FONT>
-      </STRONG></P>
-    Selecting and unselecting nef items from the nef_2 lists, you can toggle 
-    ON or OFF the visualisation of nefs already created. To unselect an item 
-    just press once again on it using the left mouse button.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="build_nef_p"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Create a Nef polyhedron consisting of 
-	  one point</FONT>
-      </STRONG></P>
-    Left click on the "Input point" layer. Be sure there is no layer 
-    activated in standard toolbar that eat events. To be sure, press the 
-    arrow button situated on the standard toolbar. Left Click anywhere on the 
-    application's drawing area (the black rectangle) to create the new nef_2.
-    This one will be also added at the end of both nef_2 lists. You will see 
-    only the new created nef on the screen, and the lists will reflect the 
-    changes.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="build_nef_l"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	</FONT></STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Create a Nef polyhedron consisting of 
-	  a halfplane</FONT></STRONG></P>
-    Left click on the "Input line" layer. Be sure there is no layer 
-    activated in standard toolbar that eat events. To be sure, press the 
-    arrow button situated on the standard toolbar. Left Click anywhere on the 
-    application's drawing area (the black rectangle) to fix the first point 
-    that generates the line. Use the mouse to position the second point. Once 
-    you have determined the second point, press the left mouse button once 
-    again. This will create a Nef consisting of a halfplane determined by the 
-    oriented line, the line being also included.
-    
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="build_nef_poly"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Create a Nef polyhedron from a simple 
-	  polygon</FONT>
-      </STRONG></P>
-    Left Click on the "Input Simple Polygon" layer. Be sure there is no layer 
-    activated in the standard toolbar that eat events. To be sure, press the 
-    arrow button situated on the standard toolbar.  Left Click anywhere on the 
-    application's drawing area (the black rectangle) to insert points in the 
-    polygon. You may press "Esc" key if you want to erase the last point. 
-    Once you have completed the polygon press the right click to close the 
-    polygon. This will create a Nef polyhedron from the simple polygon, the 
-    boundary line being included.    
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="erase_nef"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Erase an existing Nef polyhedron</FONT>
-      </STRONG></P>
-    To erase an existing Nef polyhedron, you have to select one from the list, 
-    it does not matter which one, the left or the right, and to press delete 
-    key. This action will remove the nef selected from the lists of the 
-    current window and from all the other lists opened in different windows. 
-    This happens in case you are working with multiple windows.
-    There is one problem that I could not get rid of. If you are working with 
-    multiple windows and remove one nef that is currently displayed in some 
-    other window, that window will continue to display the removed nef. I 
-    will try to remove this drawback in the near future. The workaround could 
-    be to reselect the desired nefs in that window before doing more 
-    operations.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_intersection"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Intersection</FONT>
-      </STRONG></P>
-    After selecting the blue Nef from the left list and the gray Nef from the 
-    right list, press the "INTERSECTION" button on the operations toolbar. 
-    This will compute the INTERSECTION between those two nefs. The exact 
-    operation is AND(BLUE, GRAY). You will see the new Nef added in both top 
-    lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_union"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Union</FONT>
-      </STRONG></P>
-    After selecting the blue Nef from the left list and the gray Nef from the 
-    right list, press the "UNION" button on the operations toolbar. 
-    This will compute the UNION between those two nefs. The exact operation is 
-    OR(BLUE ,GRAY). You will see the new Nef added in both top lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_difference"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Difference</FONT>
-      </STRONG></P>
-    After selecting the blue Nef from the left list and the gray Nef from the 
-    right list, press the "DIFFERENCE" button on the operations toolbar. 
-    This will compute the DIFFERENCE between those two nefs. The exact 
-    operation is DIF(BLUE, GRAY). You will see the new Nef added in both top 
-    lists.
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_symmetric_difference"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Symmetric Difference</FONT>
-      </STRONG></P>
-    After selecting the blue Nef from the left list and the gray Nef from the 
-    right list, press the "SYMMETRIC DIFFERENCE" button on the operations 
-    toolbar. 
-    This will compute the SYMMETRIC DIFFERENCE between those two nefs. The 
-    exact operation is SYM_DIF(BLUE, GRAY) = OR(DIF(BLUE, GRAY), 
-    DIF(GRAY, BLUE)). You will see the new Nef added in both top 
-    lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_complement"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Complement</FONT>
-      </STRONG></P>
-    This unary operation returns the complement of the BLUE Nef polyhedron in 
-    the plane. Select the Nef polyhedron of your choice and press the 
-    COMPLEMENT toolbar button.
-    You will see the new Nef added in both top lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_interior"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Interior</FONT>
-      </STRONG></P>
-    This unary operation returns the interior of the BLUE Nef polyhedron 
-    selected. Select the Nef polyhedron of your choice and press the 
-    INTERIOR toolbar button.
-    You will see the new Nef added in both top lists.
-
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_closure"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Closure</FONT>
-      </STRONG></P>
-    This unary operation returns the closure of the BLUE Nef polyhedron 
-    selected. Select the Nef polyhedron of your choice and press the 
-    CLOSURE toolbar button.
-    You will see the new Nef added in both top lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_boundary"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Boundary</FONT>
-      </STRONG></P>
-    This unary operation returns the boundary of the BLUE Nef polyhedron 
-    selected. Select the Nef polyhedron of your choice and press the 
-    BOUNDARY toolbar button.
-    You will see the new Nef added in both top lists.
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="op_regularization"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Regularization</FONT>
-      </STRONG></P>
-    This unary operation returns the regularized polyhedron of the BLUE Nef 
-    polyhedron selected. It is in fact the closure of the interior. Select the 
-    Nef polyhedron of your choice and press the REGULARIZATION toolbar button.
-    You will see the new Nef added in both top lists.
-
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="save_nef"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Save the current Nef polyhedron</FONT>
-      </STRONG></P>
-    Press Ctrl+S combination keys or go to File menu, then choose 
-    "Save Nef_2". A save file dialog will appear, the default name 
-    given is "nef_2.cgal". You may change the name then press "Save" 
-    or hit "Enter" key. To cancel the save process just press Esc key.<br>
-    <FONT SIZE=3 COLOR="#0000FF"> The Nef polyhedron saved does not contain 
-      the visible area.</FONT>
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="load_nef"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Load an existing Nef polyhedron</FONT>
-      </STRONG></P>
-    Press Ctrl+L combination keys or go to File menu and choose "Load 
-    Nef_2". A load file dialog will appear, having a filter that 
-    displays only the files with "cgal" extension. Choose a file then press 
-    "Open" button or hit "Enter" key.<br>
-    <FONT SIZE=3 COLOR="#0000FF"> The Nef polyhedron saved does not contain 
-      the visible area.</FONT>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="load_poly"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG>
-	<FONT color="#3300cc" size="3">Load an existing simple polygon and 
-	  construct the Nef polyhedron from this polygon</FONT>
-      </STRONG></P>
-    Press Ctrl+O combination keys or go to File menu and choose "Load 
-    Polygon_2". A load file dialog will appear, having a filter that 
-    displays only the files with "cgal" extension. Choose a file then press 
-    "Open" button or hit "Enter" key.<br>
-    <FONT SIZE=3 COLOR="#0000FF"> The CGAL polygon saved does not contain 
-      the visible area.</FONT>
-  <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-  <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-
-
-<br>
-<hr>
-<!-- Created: Mon Jan 13 15:27:00 MET 2003 -->
-<!-- hhmts start -->
-Last modified: Tue Jun  3 10:59:20 MEST 2003
-<!-- hhmts end -->
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/box_and_line.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/box_and_line.nef
deleted file mode 100644
index b1c5dc6..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/box_and_line.nef
+++ /dev/null
@@ -1,130 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 29
-halfedges 82
-faces 14
-0 { 0 3, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 7, 0, 1 0 -85  1 -2850 5  0 85 }
-2 { 0 9, 0, 1 0 -1  1 0 1  0 1 }
-3 { 0 13, 1, 0 -70  0 -70  0 1 }
-4 { 0 17, 0, 0 -1190  0 -500  0 17 }
-5 { 0 19, 1, 0 -70  0 70  0 1 }
-6 { 0 23, 1, 0 -65  0 -90  0 1 }
-7 { 0 27, 0, 0 -1955  0 -2170  0 31 }
-8 { 0 31, 1, 0 -6275  0 -3185  0 106 }
-9 { 0 35, 0, 0 -235  0 -280  0 4 }
-10 { 0 37, 0, 0 -50  0 65  0 1 }
-11 { 0 41, 1, 0 -12880  0 -8530  0 277 }
-12 { 0 43, 0, 0 -40  0 -10  0 1 }
-13 { 0 47, 1, 0 -440  0 -410  0 13 }
-14 { 0 49, 0, 0 -30  0 -45  0 1 }
-15 { 0 51, 0, 0 -15  0 5  0 1 }
-16 { 0 55, 1, 0 570  0 -3420  0 101 }
-17 { 0 59, 0, 0 20  0 5  0 1 }
-18 { 0 63, 0, 0 85  0 210  0 3 }
-19 { 0 67, 0, 0 33  0 70  0 1 }
-20 { 0 60, 1, 0 35  0 80  0 1 }
-21 { 0 69, 0, 0 50  0 -20  0 1 }
-22 { 0 71, 1, 0 70  0 -70  0 1 }
-23 { 0 75, 0, 0 1190  0 -640  0 17 }
-24 { 0 77, 0, 0 70  0 50  0 1 }
-25 { 0 66, 1, 0 70  0 70  0 1 }
-26 { 0 79, 0, 1 0 1  1 0 -1  0 1 }
-27 { 0 81, 0, 1 0 85  1 -2850 -5  0 85 }
-28 { 0 8, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 4, 1, 0, 0 }
-1 { 0, 7, 2, 0, 1, 0 }
-2 { 3, 1, 78, 26, 1, 0 }
-3 { 2, 79, 0, 0, 0, 0 }
-4 { 5, 0, 8, 2, 0, 0 }
-5 { 4, 9, 6, 1, 2, 0 }
-6 { 7, 5, 14, 4, 2, 1 }
-7 { 6, 10, 1, 1, 1, 1 }
-8 { 9, 4, 81, 28, 0, 0 }
-9 { 8, 80, 5, 2, 2, 0 }
-10 { 11, 13, 7, 4, 1, 1 }
-11 { 10, 17, 12, 3, 3, 1 }
-12 { 13, 11, 24, 7, 3, 1 }
-13 { 12, 20, 10, 3, 1, 1 }
-14 { 15, 6, 18, 5, 2, 1 }
-15 { 14, 19, 16, 4, 4, 1 }
-16 { 17, 15, 28, 8, 4, 0 }
-17 { 16, 24, 11, 4, 3, 0 }
-18 { 19, 14, 60, 18, 2, 1 }
-19 { 18, 50, 15, 5, 4, 1 }
-20 { 21, 23, 13, 7, 1, 1 }
-21 { 20, 27, 22, 6, 5, 1 }
-22 { 23, 21, 27, 9, 5, 1 }
-23 { 22, 35, 20, 6, 1, 1 }
-24 { 25, 12, 17, 8, 3, 0 }
-25 { 24, 31, 26, 7, 6, 0 }
-26 { 27, 25, 32, 9, 6, 1 }
-27 { 26, 22, 21, 7, 5, 1 }
-28 { 29, 16, 36, 10, 4, 0 }
-29 { 28, 37, 30, 8, 7, 0 }
-30 { 31, 29, 38, 11, 7, 0 }
-31 { 30, 32, 25, 8, 6, 0 }
-32 { 33, 26, 31, 11, 6, 0 }
-33 { 32, 41, 34, 9, 8, 0 }
-34 { 35, 33, 70, 22, 8, 1 }
-35 { 34, 71, 23, 9, 1, 1 }
-36 { 37, 28, 50, 15, 4, 0 }
-37 { 36, 51, 29, 10, 7, 0 }
-38 { 39, 30, 42, 12, 7, 0 }
-39 { 38, 43, 40, 11, 9, 0 }
-40 { 41, 39, 43, 13, 9, 0 }
-41 { 40, 47, 33, 11, 8, 0 }
-42 { 43, 38, 44, 13, 7, 0 }
-43 { 42, 40, 39, 12, 9, 0 }
-44 { 45, 42, 52, 16, 7, 0 }
-45 { 44, 48, 46, 13, 10, 0 }
-46 { 47, 45, 48, 14, 10, 0 }
-47 { 46, 49, 41, 13, 8, 0 }
-48 { 49, 46, 45, 16, 10, 0 }
-49 { 48, 55, 47, 14, 8, 0 }
-50 { 51, 36, 19, 18, 4, 0 }
-51 { 50, 63, 37, 15, 7, 0 }
-52 { 53, 44, 68, 21, 7, 0 }
-53 { 52, 69, 54, 16, 11, 0 }
-54 { 55, 53, 72, 23, 11, 0 }
-55 { 54, 70, 49, 16, 8, 0 }
-56 { 57, 59, 63, 19, 7, 0 }
-57 { 56, 67, 58, 17, 12, 0 }
-58 { 59, 57, 76, 24, 12, 0 }
-59 { 58, 68, 56, 17, 7, 0 }
-60 { 61, 18, 65, 20, 2, 1 }
-61 { 60, 64, 62, 18, 13, 1 }
-62 { 63, 61, 64, 19, 13, 1 }
-63 { 62, 56, 51, 18, 7, 1 }
-64 { 65, 62, 61, 20, 13, 1 }
-65 { 64, 60, 66, 19, 2, 1 }
-66 { 67, 65, 77, 25, 2, 1 }
-67 { 66, 76, 57, 19, 12, 1 }
-68 { 69, 52, 59, 24, 7, 0 }
-69 { 68, 72, 53, 21, 11, 0 }
-70 { 71, 34, 55, 23, 8, 1 }
-71 { 70, 75, 35, 22, 1, 1 }
-72 { 73, 54, 69, 24, 11, 1 }
-73 { 72, 77, 74, 23, 2, 1 }
-74 { 75, 73, 80, 27, 2, 1 }
-75 { 74, 78, 71, 23, 1, 1 }
-76 { 77, 58, 67, 25, 12, 1 }
-77 { 76, 66, 73, 24, 2, 1 }
-78 { 79, 2, 75, 27, 1, 0 }
-79 { 78, 81, 3, 26, 0, 0 }
-80 { 81, 74, 9, 28, 2, 0 }
-81 { 80, 8, 79, 27, 0, 0 }
-0 { -1, 3 , , 0 }
-1 { 1, , , 0 }
-2 { 5, , , 0 }
-3 { 11, , , 1 }
-4 { 15, , , 1 }
-5 { 21, , , 0 }
-6 { 25, , , 1 }
-7 { 29, , , 1 }
-8 { 33, , , 1 }
-9 { 39, , , 1 }
-10 { 45, , , 1 }
-11 { 53, , , 1 }
-12 { 57, , , 1 }
-13 { 61, , , 0 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/cake.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/cake.nef
deleted file mode 100644
index fa2152e..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/cake.nef
+++ /dev/null
@@ -1,38 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 10
-halfedges 20
-faces 3
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 15, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 5, 1, 0 -70  0 -70  0 1 }
-3 { 0 9, 1, 0 -70  0 70  0 1 }
-4 { 0 11, 1, 0 0  0 0  0 1 }
-5 { 0 8, 1, 0 0  0 70  0 1 }
-6 { 0 17, 1, 0 70  0 -70  0 1 }
-7 { 0 10, 1, 0 70  0 35  0 1 }
-8 { 0 19, 0, 1 0 1  1 0 -1  0 1 }
-9 { 0 14, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 18, 8, 2, 0 }
-1 { 0, 19, 2, 0, 0, 0 }
-2 { 3, 1, 14, 1, 0, 0 }
-3 { 2, 15, 0, 0, 2, 0 }
-4 { 5, 7, 16, 6, 1, 1 }
-5 { 4, 17, 6, 2, 2, 1 }
-6 { 7, 5, 8, 3, 2, 1 }
-7 { 6, 9, 4, 2, 1, 1 }
-8 { 9, 6, 13, 5, 2, 1 }
-9 { 8, 12, 7, 3, 1, 1 }
-10 { 11, 13, 17, 7, 2, 1 }
-11 { 10, 16, 12, 4, 1, 1 }
-12 { 13, 11, 9, 5, 1, 1 }
-13 { 12, 8, 10, 4, 2, 1 }
-14 { 15, 2, 19, 9, 0, 0 }
-15 { 14, 18, 3, 1, 2, 0 }
-16 { 17, 4, 11, 7, 1, 1 }
-17 { 16, 10, 5, 6, 2, 1 }
-18 { 19, 0, 15, 9, 2, 0 }
-19 { 18, 14, 1, 8, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 7, , , 1 }
-2 { 3, 5 , , 0 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/dangling.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/dangling.nef
deleted file mode 100644
index bb33533..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/dangling.nef
+++ /dev/null
@@ -1,55 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 14
-halfedges 32
-faces 4
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 5, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 7, 1, 0 -70  0 -70  0 1 }
-3 { 0 11, 1, 0 -70  0 -35  0 1 }
-4 { 0 15, 1, 0 -70  0 70  0 1 }
-5 { 0 17, 0, 0 0  1 0 -1  0 1 }
-6 { 0 6, 1, 0 0  0 -70  0 1 }
-7 { 0 21, 1, 0 0  0 0  0 1 }
-8 { 0 23, 1, 0 0  0 70  0 1 }
-9 { 0 27, 0, 0 0  1 0 1  0 1 }
-10 { 0 29, 0, 0 70  0 35  0 1 }
-11 { 0 22, 1, 0 70  0 70  0 1 }
-12 { 0 31, 0, 1 0 1  1 0 -1  0 1 }
-13 { 0 26, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 18, 5, 1, 0 }
-1 { 0, 17, 2, 0, 0, 0 }
-2 { 3, 1, 4, 1, 0, 0 }
-3 { 2, 5, 0, 0, 1, 0 }
-4 { 5, 2, 26, 9, 0, 0 }
-5 { 4, 24, 3, 1, 1, 0 }
-6 { 7, 9, 19, 6, 2, 1 }
-7 { 6, 18, 8, 2, 1, 1 }
-8 { 9, 7, 12, 3, 1, 1 }
-9 { 8, 11, 6, 2, 2, 1 }
-10 { 11, 13, 20, 7, 3, 1 }
-11 { 10, 21, 9, 3, 2, 1 }
-12 { 13, 8, 14, 4, 1, 1 }
-13 { 12, 15, 10, 3, 3, 1 }
-14 { 15, 12, 24, 8, 1, 1 }
-15 { 14, 23, 13, 4, 3, 1 }
-16 { 17, 19, 30, 12, 2, 0 }
-17 { 16, 31, 1, 5, 0, 0 }
-18 { 19, 0, 7, 6, 1, 1 }
-19 { 18, 6, 16, 5, 2, 1 }
-20 { 21, 10, 28, 10, 3, 0 }
-21 { 20, 29, 11, 7, 2, 0 }
-22 { 23, 25, 29, 11, 2, 1 }
-23 { 22, 28, 15, 8, 3, 1 }
-24 { 25, 14, 5, 9, 1, 1 }
-25 { 24, 27, 22, 8, 2, 1 }
-26 { 27, 4, 31, 13, 0, 0 }
-27 { 26, 30, 25, 9, 2, 0 }
-28 { 29, 20, 23, 11, 3, 1 }
-29 { 28, 22, 21, 10, 2, 1 }
-30 { 31, 16, 27, 13, 2, 0 }
-31 { 30, 26, 17, 12, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 0 }
-2 { 19, , , 0 }
-3 { 13, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/disk.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/disk.nef
deleted file mode 100644
index 8504c9a..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/disk.nef
+++ /dev/null
@@ -1,59 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 15
-halfedges 34
-faces 5
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 5, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 7, 1, 0 -70  0 -1  0 1 }
-3 { 0 11, 1, 0 -70  0 70  0 1 }
-4 { 0 13, 1, 0 -45  0 20  0 1 }
-5 { 0 17, 1, 0 -45  0 40  0 1 }
-6 { 0 19, 1, 0 -25  0 20  0 1 }
-7 { 0 16, 1, 0 -25  0 40  0 1 }
-8 { 0 21, 0, 0 -2  0 -1  0 1 }
-9 { 0 23, 0, 0 0  1 0 -1  0 1 }
-10 { 0 27, 1, 0 0  0 0  0 1 }
-11 { 0 29, 1, 0 0  0 70  0 1 }
-12 { 0 31, 0, 0 0  1 0 1  0 1 }
-13 { 0 33, 0, 1 0 1  1 0 -1  0 1 }
-14 { 0 30, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 24, 9, 1, 0 }
-1 { 0, 23, 2, 0, 0, 0 }
-2 { 3, 1, 4, 1, 0, 0 }
-3 { 2, 5, 0, 0, 1, 0 }
-4 { 5, 2, 30, 12, 0, 0 }
-5 { 4, 28, 3, 1, 1, 0 }
-6 { 7, 9, 20, 8, 2, 1 }
-7 { 6, 21, 8, 2, 1, 1 }
-8 { 9, 7, 10, 3, 1, 1 }
-9 { 8, 11, 6, 2, 2, 1 }
-10 { 11, 8, 28, 11, 1, 1 }
-11 { 10, 26, 9, 3, 2, 1 }
-12 { 13, 15, 18, 6, 3, 1 }
-13 { 12, 19, 14, 4, 2, 1 }
-14 { 15, 13, 16, 5, 2, 1 }
-15 { 14, 17, 12, 4, 3, 1 }
-16 { 17, 14, 19, 7, 2, 1 }
-17 { 16, 18, 15, 5, 3, 1 }
-18 { 19, 12, 17, 7, 3, 1 }
-19 { 18, 16, 13, 6, 2, 1 }
-20 { 21, 6, 26, 10, 2, 0 }
-21 { 20, 24, 7, 8, 1, 0 }
-22 { 23, 25, 32, 13, 4, 0 }
-23 { 22, 33, 1, 9, 0, 0 }
-24 { 25, 0, 21, 10, 1, 1 }
-25 { 24, 27, 22, 9, 4, 1 }
-26 { 27, 20, 11, 11, 2, 1 }
-27 { 26, 29, 25, 10, 4, 1 }
-28 { 29, 10, 5, 12, 1, 1 }
-29 { 28, 31, 27, 11, 4, 1 }
-30 { 31, 4, 33, 14, 0, 0 }
-31 { 30, 32, 29, 12, 4, 0 }
-32 { 33, 22, 31, 14, 4, 0 }
-33 { 32, 30, 23, 13, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 0 }
-2 { 9, 13 , , 1 }
-3 { 15, , , 0 }
-4 { 25, , , 0 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/line_cross.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/line_cross.nef
deleted file mode 100644
index f76087c..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/line_cross.nef
+++ /dev/null
@@ -1,106 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 24
-halfedges 66
-faces 11
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 5, 0, 1 0 -85  1 800 -20  0 85 }
-2 { 0 9, 0, 1 0 -115  1 1125 80  0 115 }
-3 { 0 13, 0, 1 0 -1  1 0 1  0 1 }
-4 { 0 15, 0, 0 -45  0 -45  0 1 }
-5 { 0 19, 0, 0 -765  0 -20  0 17 }
-6 { 0 23, 1, 0 -45  0 30  0 1 }
-7 { 0 25, 0, 0 -16755  0 16185  0 463 }
-8 { 0 29, 0, 0 0  1 0 -1  0 1 }
-9 { 0 33, 0, 0 0  0 -80  0 1 }
-10 { 0 37, 1, 0 0  0 -855  0 14 }
-11 { 0 39, 1, 0 0  0 -45  0 1 }
-12 { 0 41, 1, 0 0  0 885  0 16 }
-13 { 0 43, 0, 0 0  1 0 1  0 1 }
-14 { 0 45, 1, 0 145  0 3460  0 364 }
-15 { 0 49, 0, 0 1800  0 -675  0 59 }
-16 { 0 53, 1, 0 35  0 -80  0 1 }
-17 { 0 55, 1, 0 50  0 10  0 1 }
-18 { 0 57, 0, 0 27440  0 -15205  0 397 }
-19 { 0 54, 1, 0 80  0 -25  0 1 }
-20 { 0 61, 0, 1 0 1  1 0 -1  0 1 }
-21 { 0 63, 0, 1 0 115  1 1125 -80  0 115 }
-22 { 0 65, 0, 1 0 85  1 800 20  0 85 }
-23 { 0 42, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 30, 8, 1, 0 }
-1 { 0, 29, 2, 0, 0, 0 }
-2 { 3, 1, 6, 1, 0, 0 }
-3 { 2, 5, 0, 0, 1, 0 }
-4 { 5, 7, 20, 5, 2, 1 }
-5 { 4, 16, 3, 1, 1, 1 }
-6 { 7, 2, 10, 2, 0, 0 }
-7 { 6, 9, 4, 1, 2, 0 }
-8 { 9, 11, 26, 7, 3, 1 }
-9 { 8, 22, 7, 2, 2, 1 }
-10 { 11, 6, 12, 3, 0, 0 }
-11 { 10, 13, 8, 2, 3, 0 }
-12 { 13, 10, 42, 13, 0, 0 }
-13 { 12, 40, 11, 3, 3, 0 }
-14 { 15, 17, 36, 10, 4, 0 }
-15 { 14, 34, 16, 4, 1, 0 }
-16 { 17, 15, 5, 5, 1, 0 }
-17 { 16, 19, 14, 4, 4, 0 }
-18 { 19, 21, 25, 14, 5, 0 }
-19 { 18, 45, 17, 5, 4, 0 }
-20 { 21, 4, 22, 6, 2, 1 }
-21 { 20, 23, 18, 5, 5, 1 }
-22 { 23, 20, 9, 7, 2, 1 }
-23 { 22, 25, 21, 6, 5, 1 }
-24 { 25, 27, 46, 14, 6, 0 }
-25 { 24, 18, 23, 7, 5, 0 }
-26 { 27, 8, 40, 12, 3, 1 }
-27 { 26, 41, 24, 7, 6, 1 }
-28 { 29, 31, 60, 20, 7, 0 }
-29 { 28, 61, 1, 8, 0, 0 }
-30 { 31, 0, 34, 9, 1, 1 }
-31 { 30, 33, 28, 8, 7, 1 }
-32 { 33, 35, 52, 16, 8, 1 }
-33 { 32, 53, 31, 9, 7, 1 }
-34 { 35, 30, 15, 10, 1, 0 }
-35 { 34, 37, 32, 9, 8, 0 }
-36 { 37, 14, 38, 11, 4, 1 }
-37 { 36, 39, 35, 10, 8, 1 }
-38 { 39, 36, 45, 15, 4, 1 }
-39 { 38, 49, 37, 11, 8, 1 }
-40 { 41, 26, 13, 13, 3, 0 }
-41 { 40, 43, 27, 12, 6, 0 }
-42 { 43, 12, 65, 23, 0, 0 }
-43 { 42, 64, 41, 13, 6, 0 }
-44 { 45, 47, 50, 15, 9, 1 }
-45 { 44, 38, 19, 14, 4, 1 }
-46 { 47, 24, 64, 22, 6, 0 }
-47 { 46, 62, 44, 14, 9, 0 }
-48 { 49, 51, 58, 18, 10, 0 }
-49 { 48, 52, 39, 15, 8, 0 }
-50 { 51, 44, 54, 17, 9, 1 }
-51 { 50, 55, 48, 15, 10, 1 }
-52 { 53, 32, 49, 18, 8, 1 }
-53 { 52, 57, 33, 16, 7, 1 }
-54 { 55, 50, 59, 19, 9, 1 }
-55 { 54, 58, 51, 17, 10, 1 }
-56 { 57, 59, 62, 21, 9, 1 }
-57 { 56, 60, 53, 18, 7, 1 }
-58 { 59, 48, 55, 19, 10, 1 }
-59 { 58, 54, 56, 18, 9, 1 }
-60 { 61, 28, 57, 21, 7, 0 }
-61 { 60, 63, 29, 20, 0, 0 }
-62 { 63, 56, 47, 22, 9, 0 }
-63 { 62, 65, 61, 21, 0, 0 }
-64 { 65, 46, 43, 23, 6, 0 }
-65 { 64, 42, 63, 22, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 1 }
-2 { 7, , , 0 }
-3 { 8, , , 0 }
-4 { 14, , , 0 }
-5 { 21, , , 1 }
-6 { 24, , , 1 }
-7 { 31, , , 0 }
-8 { 35, , , 1 }
-9 { 56, , , 0 }
-10 { 48, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/mpii.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/mpii.nef
deleted file mode 100644
index 25dc135..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/mpii.nef
+++ /dev/null
@@ -1,202 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 49
-halfedges 130
-faces 18
-0 { 0 3, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 7, 0, 1 0 -55  0 -4675  0 55 }
-2 { 0 11, 0, 1 0 -80  0 -6000  0 80 }
-3 { 0 13, 0, 1 0 -1  1 0 1  0 1 }
-4 { 0 17, 1, 0 -90  0 -65  0 1 }
-5 { 0 19, 1, 0 -90  0 75  0 1 }
-6 { 0 21, 1, 0 -70  0 -65  0 1 }
-7 { 0 23, 1, 0 -70  0 55  0 1 }
-8 { 0 25, 1, 0 -60  0 75  0 1 }
-9 { 0 29, 0, 0 -35  0 -80  0 1 }
-10 { 0 33, 0, 0 -35  0 -75  0 1 }
-11 { 0 37, 1, 0 -140  0 -95  0 4 }
-12 { 0 41, 1, 0 -70  0 25  0 2 }
-13 { 0 43, 1, 0 -35  0 20  0 1 }
-14 { 0 45, 0, 0 -30  0 -35  0 1 }
-15 { 0 47, 0, 0 -30  0 0  0 1 }
-16 { 0 51, 1, 0 -18  0 20  0 1 }
-17 { 0 53, 0, 0 -15  0 -80  0 1 }
-18 { 0 57, 0, 0 -15  0 -75  0 1 }
-19 { 0 59, 1, 0 -15  0 -30  0 1 }
-20 { 0 63, 1, 0 -15  0 -20  0 1 }
-21 { 0 67, 1, 0 -15  0 -11  0 1 }
-22 { 0 69, 0, 0 -15  0 10  0 1 }
-23 { 0 73, 1, 0 -285  0 155  0 47 }
-24 { 0 77, 1, 0 35  0 160  0 8 }
-25 { 0 72, 1, 0 5  0 -5  0 1 }
-26 { 0 79, 1, 0 15  0 75  0 1 }
-27 { 0 83, 1, 0 20  0 -65  0 1 }
-28 { 0 85, 1, 0 20  0 -30  0 1 }
-29 { 0 87, 1, 0 20  0 20  0 1 }
-30 { 0 74, 1, 0 20  0 45  0 1 }
-31 { 0 91, 1, 0 25  0 -70  0 1 }
-32 { 0 95, 1, 0 25  0 -65  0 1 }
-33 { 0 97, 0, 0 25  0 45  0 1 }
-34 { 0 99, 0, 0 40  0 -65  0 1 }
-35 { 0 103, 1, 0 40  0 45  0 1 }
-36 { 0 78, 1, 0 40  0 75  0 1 }
-37 { 0 105, 1, 0 45  0 -70  0 1 }
-38 { 0 102, 1, 0 45  0 45  0 1 }
-39 { 0 109, 0, 0 65  0 -85  0 1 }
-40 { 0 113, 1, 0 65  0 -75  0 1 }
-41 { 0 115, 0, 0 65  0 30  0 1 }
-42 { 0 119, 0, 0 85  0 -85  0 1 }
-43 { 0 123, 1, 0 85  0 -75  0 1 }
-44 { 0 114, 0, 0 85  0 30  0 1 }
-45 { 0 125, 0, 1 0 1  1 0 -1  0 1 }
-46 { 0 127, 0, 1 0 55  0 -4675  0 55 }
-47 { 0 129, 0, 1 0 80  0 -6000  0 80 }
-48 { 0 12, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 4, 1, 0, 0 }
-1 { 0, 7, 2, 0, 1, 0 }
-2 { 3, 1, 124, 45, 1, 0 }
-3 { 2, 125, 0, 0, 0, 0 }
-4 { 5, 0, 8, 2, 0, 0 }
-5 { 4, 11, 6, 1, 2, 0 }
-6 { 7, 5, 106, 39, 2, 1 }
-7 { 6, 109, 1, 1, 1, 1 }
-8 { 9, 4, 12, 3, 0, 0 }
-9 { 8, 13, 10, 2, 3, 0 }
-10 { 11, 9, 30, 10, 3, 0 }
-11 { 10, 26, 5, 2, 2, 0 }
-12 { 13, 8, 129, 48, 0, 0 }
-13 { 12, 128, 9, 3, 3, 0 }
-14 { 15, 17, 18, 5, 3, 1 }
-15 { 14, 19, 16, 4, 4, 1 }
-16 { 17, 15, 20, 6, 4, 1 }
-17 { 16, 21, 14, 4, 3, 1 }
-18 { 19, 14, 24, 8, 3, 1 }
-19 { 18, 25, 15, 5, 4, 1 }
-20 { 21, 16, 22, 7, 4, 1 }
-21 { 20, 23, 17, 6, 3, 1 }
-22 { 23, 20, 34, 11, 4, 1 }
-23 { 22, 30, 21, 7, 3, 1 }
-24 { 25, 18, 38, 12, 3, 1 }
-25 { 24, 34, 19, 8, 4, 1 }
-26 { 27, 29, 11, 10, 2, 0 }
-27 { 26, 33, 28, 9, 5, 0 }
-28 { 29, 27, 52, 17, 5, 0 }
-29 { 28, 53, 26, 9, 2, 0 }
-30 { 31, 10, 23, 11, 3, 1 }
-31 { 30, 37, 32, 10, 6, 1 }
-32 { 33, 31, 54, 18, 6, 1 }
-33 { 32, 52, 27, 10, 5, 1 }
-34 { 35, 22, 25, 12, 4, 0 }
-35 { 34, 41, 36, 11, 7, 0 }
-36 { 37, 35, 44, 14, 7, 0 }
-37 { 36, 45, 31, 11, 6, 0 }
-38 { 39, 24, 42, 13, 3, 1 }
-39 { 38, 43, 40, 12, 8, 1 }
-40 { 41, 39, 46, 15, 8, 0 }
-41 { 40, 47, 35, 12, 7, 0 }
-42 { 43, 38, 48, 16, 3, 1 }
-43 { 42, 46, 39, 13, 8, 1 }
-44 { 45, 36, 64, 21, 7, 0 }
-45 { 44, 60, 37, 14, 6, 0 }
-46 { 47, 40, 43, 16, 8, 0 }
-47 { 46, 51, 41, 15, 7, 0 }
-48 { 49, 42, 78, 26, 3, 1 }
-49 { 48, 79, 50, 16, 9, 1 }
-50 { 51, 49, 74, 24, 9, 0 }
-51 { 50, 70, 47, 16, 7, 0 }
-52 { 53, 28, 33, 18, 5, 0 }
-53 { 52, 57, 29, 17, 2, 0 }
-54 { 55, 32, 58, 19, 6, 1 }
-55 { 54, 59, 56, 18, 3, 1 }
-56 { 57, 55, 110, 40, 3, 0 }
-57 { 56, 106, 53, 18, 2, 0 }
-58 { 59, 54, 84, 28, 6, 1 }
-59 { 58, 80, 55, 19, 3, 1 }
-60 { 61, 63, 45, 21, 6, 1 }
-61 { 60, 67, 62, 20, 10, 1 }
-62 { 63, 61, 73, 25, 10, 1 }
-63 { 62, 72, 60, 20, 6, 1 }
-64 { 65, 44, 68, 22, 7, 0 }
-65 { 64, 69, 66, 21, 11, 0 }
-66 { 67, 65, 69, 23, 11, 1 }
-67 { 66, 73, 61, 21, 10, 1 }
-68 { 69, 64, 70, 23, 7, 0 }
-69 { 68, 66, 65, 22, 11, 0 }
-70 { 71, 68, 51, 24, 7, 0 }
-71 { 70, 77, 72, 23, 6, 0 }
-72 { 73, 71, 63, 25, 6, 1 }
-73 { 72, 62, 67, 23, 10, 1 }
-74 { 75, 50, 87, 30, 9, 1 }
-75 { 74, 86, 76, 24, 12, 1 }
-76 { 77, 75, 86, 29, 12, 1 }
-77 { 76, 84, 71, 24, 6, 1 }
-78 { 79, 48, 101, 36, 3, 1 }
-79 { 78, 100, 49, 26, 9, 1 }
-80 { 81, 83, 59, 28, 3, 1 }
-81 { 80, 85, 82, 27, 9, 1 }
-82 { 83, 81, 92, 32, 9, 1 }
-83 { 82, 88, 80, 27, 3, 1 }
-84 { 85, 58, 77, 29, 6, 1 }
-85 { 84, 87, 81, 28, 9, 1 }
-86 { 87, 76, 75, 30, 12, 1 }
-87 { 86, 74, 85, 29, 9, 1 }
-88 { 89, 91, 83, 32, 3, 1 }
-89 { 88, 95, 90, 31, 13, 1 }
-90 { 91, 89, 104, 37, 13, 1 }
-91 { 90, 105, 88, 31, 3, 1 }
-92 { 93, 82, 96, 33, 9, 0 }
-93 { 92, 97, 94, 32, 14, 0 }
-94 { 95, 93, 98, 34, 14, 0 }
-95 { 94, 99, 89, 32, 13, 0 }
-96 { 97, 92, 100, 35, 9, 0 }
-97 { 96, 98, 93, 33, 14, 0 }
-98 { 99, 94, 97, 35, 14, 0 }
-99 { 98, 103, 95, 34, 13, 0 }
-100 { 101, 96, 79, 36, 9, 1 }
-101 { 100, 78, 102, 35, 3, 1 }
-102 { 103, 101, 105, 38, 3, 1 }
-103 { 102, 104, 99, 35, 13, 1 }
-104 { 105, 90, 103, 38, 13, 1 }
-105 { 104, 102, 91, 37, 3, 1 }
-106 { 107, 6, 57, 40, 2, 1 }
-107 { 106, 113, 108, 39, 15, 1 }
-108 { 109, 107, 116, 42, 15, 0 }
-109 { 108, 119, 7, 39, 1, 0 }
-110 { 111, 56, 114, 41, 3, 0 }
-111 { 110, 115, 112, 40, 16, 0 }
-112 { 113, 111, 120, 43, 16, 1 }
-113 { 112, 116, 107, 40, 15, 1 }
-114 { 115, 110, 121, 44, 3, 0 }
-115 { 114, 120, 111, 41, 16, 0 }
-116 { 117, 108, 113, 43, 15, 1 }
-117 { 116, 123, 118, 42, 17, 1 }
-118 { 119, 117, 126, 46, 17, 1 }
-119 { 118, 124, 109, 42, 1, 1 }
-120 { 121, 112, 115, 44, 16, 0 }
-121 { 120, 114, 122, 43, 3, 0 }
-122 { 123, 121, 128, 47, 3, 0 }
-123 { 122, 126, 117, 43, 17, 0 }
-124 { 125, 2, 119, 46, 1, 0 }
-125 { 124, 127, 3, 45, 0, 0 }
-126 { 127, 118, 123, 47, 17, 0 }
-127 { 126, 129, 125, 46, 0, 0 }
-128 { 129, 122, 13, 48, 3, 0 }
-129 { 128, 12, 127, 47, 0, 0 }
-0 { -1, 3 , , 0 }
-1 { 1, , , 1 }
-2 { 5, , , 0 }
-3 { 9, , , 1 }
-4 { 15, , , 0 }
-5 { 27, , , 1 }
-6 { 31, , , 0 }
-7 { 35, , , 1 }
-8 { 39, , , 0 }
-9 { 49, , , 0 }
-10 { 61, , , 1 }
-11 { 65, , , 0 }
-12 { 75, , , 1 }
-13 { 89, , , 0 }
-14 { 93, , , 1 }
-15 { 107, , , 1 }
-16 { 111, , , 0 }
-17 { 117, , , 0 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/star.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/star.nef
deleted file mode 100644
index 0e629c2..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/star.nef
+++ /dev/null
@@ -1,160 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 36
-halfedges 102
-faces 17
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 5, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 7, 1, 0 -85  0 -60  0 1 }
-3 { 0 11, 1, 0 -70  0 -70  0 1 }
-4 { 0 15, 0, 0 -910  0 -615  0 13 }
-5 { 0 19, 0, 0 -70  0 -42  0 1 }
-6 { 0 23, 1, 0 -70  0 70  0 1 }
-7 { 0 25, 0, 0 -60  0 -30  0 1 }
-8 { 0 27, 0, 0 -60  0 60  0 1 }
-9 { 0 29, 1, 0 -50  0 -75  0 1 }
-10 { 0 33, 0, 0 -335  0 -490  0 7 }
-11 { 0 37, 0, 0 -40  0 15  0 1 }
-12 { 0 14, 0, 0 -20  0 -5  0 1 }
-13 { 0 39, 0, 0 -135  0 910  0 13 }
-14 { 0 43, 0, 0 -5  0 10  0 1 }
-15 { 0 47, 1, 0 -5  0 80  0 1 }
-16 { 0 49, 0, 0 -5  0 490  0 7 }
-17 { 0 53, 0, 0 0  1 0 -1  0 1 }
-18 { 0 57, 1, 0 0  0 -325  0 4 }
-19 { 0 61, 0, 0 0  0 -70  0 1 }
-20 { 0 65, 0, 0 0  0 -25  0 7 }
-21 { 0 69, 0, 0 0  0 25  0 4 }
-22 { 0 73, 0, 0 0  0 205  0 3 }
-23 { 0 77, 1, 0 0  0 70  0 1 }
-24 { 0 81, 0, 0 0  1 0 1  0 1 }
-25 { 0 83, 1, 0 465  0 -1330  0 19 }
-26 { 0 87, 1, 0 25  0 10  0 1 }
-27 { 0 82, 0, 0 30  0 -85  0 1 }
-28 { 0 89, 0, 0 70  0 -70  0 1 }
-29 { 0 91, 1, 0 280  0 -185  0 4 }
-30 { 0 95, 1, 0 910  0 355  0 13 }
-31 { 0 76, 0, 0 70  0 70  0 1 }
-32 { 0 99, 0, 0 75  0 -50  0 1 }
-33 { 0 94, 0, 0 90  0 35  0 1 }
-34 { 0 101, 0, 1 0 1  1 0 -1  0 1 }
-35 { 0 80, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 54, 17, 1, 0 }
-1 { 0, 53, 2, 0, 0, 0 }
-2 { 3, 1, 4, 1, 0, 0 }
-3 { 2, 5, 0, 0, 1, 0 }
-4 { 5, 2, 80, 24, 0, 0 }
-5 { 4, 78, 3, 1, 1, 0 }
-6 { 7, 9, 16, 4, 2, 1 }
-7 { 6, 12, 8, 2, 1, 1 }
-8 { 9, 7, 20, 5, 1, 1 }
-9 { 8, 16, 6, 2, 2, 1 }
-10 { 11, 13, 34, 10, 3, 1 }
-11 { 10, 30, 12, 3, 1, 1 }
-12 { 13, 11, 7, 4, 1, 1 }
-13 { 12, 15, 10, 3, 3, 1 }
-14 { 15, 17, 35, 12, 4, 0 }
-15 { 14, 34, 13, 4, 3, 0 }
-16 { 17, 6, 9, 5, 2, 0 }
-17 { 16, 19, 14, 4, 4, 0 }
-18 { 19, 21, 24, 7, 5, 0 }
-19 { 18, 25, 17, 5, 4, 0 }
-20 { 21, 8, 22, 6, 1, 1 }
-21 { 20, 23, 18, 5, 5, 1 }
-22 { 23, 20, 40, 13, 1, 1 }
-23 { 22, 36, 21, 6, 5, 1 }
-24 { 25, 18, 26, 8, 5, 0 }
-25 { 24, 27, 19, 7, 4, 0 }
-26 { 27, 24, 36, 11, 5, 0 }
-27 { 26, 37, 25, 8, 4, 0 }
-28 { 29, 31, 58, 18, 6, 1 }
-29 { 28, 54, 30, 9, 1, 1 }
-30 { 31, 29, 11, 10, 1, 1 }
-31 { 30, 33, 28, 9, 6, 1 }
-32 { 33, 35, 62, 19, 4, 0 }
-33 { 32, 58, 31, 10, 6, 0 }
-34 { 35, 10, 15, 12, 3, 0 }
-35 { 34, 14, 32, 10, 4, 0 }
-36 { 37, 26, 23, 13, 5, 0 }
-37 { 36, 39, 27, 11, 4, 0 }
-38 { 39, 41, 47, 16, 7, 0 }
-39 { 38, 49, 37, 13, 4, 0 }
-40 { 41, 22, 46, 15, 1, 1 }
-41 { 40, 47, 38, 13, 7, 1 }
-42 { 43, 45, 66, 20, 8, 0 }
-43 { 42, 62, 44, 14, 4, 0 }
-44 { 45, 43, 70, 21, 4, 0 }
-45 { 44, 66, 42, 14, 8, 0 }
-46 { 47, 40, 50, 16, 1, 1 }
-47 { 46, 38, 41, 15, 7, 1 }
-48 { 49, 51, 74, 22, 9, 0 }
-49 { 48, 70, 39, 16, 4, 0 }
-50 { 51, 46, 78, 23, 1, 1 }
-51 { 50, 74, 48, 16, 9, 1 }
-52 { 53, 55, 100, 34, 10, 0 }
-53 { 52, 101, 1, 17, 0, 0 }
-54 { 55, 0, 29, 18, 1, 0 }
-55 { 54, 57, 52, 17, 10, 0 }
-56 { 57, 59, 83, 27, 11, 0 }
-57 { 56, 82, 55, 18, 10, 0 }
-58 { 59, 28, 33, 19, 6, 1 }
-59 { 58, 61, 56, 18, 11, 1 }
-60 { 61, 63, 65, 25, 12, 1 }
-61 { 60, 83, 59, 19, 11, 1 }
-62 { 63, 32, 43, 20, 4, 0 }
-63 { 62, 65, 60, 19, 12, 0 }
-64 { 65, 67, 84, 25, 13, 1 }
-65 { 64, 60, 63, 20, 12, 1 }
-66 { 67, 42, 45, 21, 8, 1 }
-67 { 66, 69, 64, 20, 13, 1 }
-68 { 69, 71, 92, 29, 14, 1 }
-69 { 68, 88, 67, 21, 13, 1 }
-70 { 71, 44, 49, 22, 4, 0 }
-71 { 70, 73, 68, 21, 14, 0 }
-72 { 73, 75, 86, 26, 15, 1 }
-73 { 72, 87, 71, 22, 14, 1 }
-74 { 75, 48, 51, 23, 9, 1 }
-75 { 74, 77, 72, 22, 15, 1 }
-76 { 77, 79, 97, 31, 10, 0 }
-77 { 76, 96, 75, 23, 15, 0 }
-78 { 79, 50, 5, 24, 1, 0 }
-79 { 78, 81, 76, 23, 10, 0 }
-80 { 81, 4, 101, 35, 0, 0 }
-81 { 80, 100, 79, 24, 10, 0 }
-82 { 83, 85, 57, 27, 10, 0 }
-83 { 82, 56, 61, 25, 11, 0 }
-84 { 85, 64, 88, 28, 13, 0 }
-85 { 84, 89, 82, 25, 10, 0 }
-86 { 87, 72, 96, 30, 15, 1 }
-87 { 86, 92, 73, 26, 14, 1 }
-88 { 89, 84, 69, 29, 13, 0 }
-89 { 88, 91, 85, 28, 10, 0 }
-90 { 91, 93, 98, 32, 16, 0 }
-91 { 90, 99, 89, 29, 10, 0 }
-92 { 93, 68, 87, 30, 14, 1 }
-93 { 92, 95, 90, 29, 16, 1 }
-94 { 95, 97, 99, 33, 10, 0 }
-95 { 94, 98, 93, 30, 16, 0 }
-96 { 97, 86, 77, 31, 15, 0 }
-97 { 96, 76, 94, 30, 10, 0 }
-98 { 99, 90, 95, 33, 16, 0 }
-99 { 98, 94, 91, 32, 10, 0 }
-100 { 101, 52, 81, 35, 10, 0 }
-101 { 100, 80, 53, 34, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 0 }
-2 { 9, , , 1 }
-3 { 13, , , 1 }
-4 { 35, , , 0 }
-5 { 21, , , 1 }
-6 { 28, , , 1 }
-7 { 41, , , 1 }
-8 { 42, , , 1 }
-9 { 48, , , 1 }
-10 { 55, , , 1 }
-11 { 56, , , 0 }
-12 { 63, , , 1 }
-13 { 64, , , 0 }
-14 { 68, , , 1 }
-15 { 72, , , 0 }
-16 { 90, , , 0 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/symmdiff.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/symmdiff.nef
deleted file mode 100644
index ce94d23..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/symmdiff.nef
+++ /dev/null
@@ -1,52 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 13
-halfedges 30
-faces 4
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 5, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 7, 0, 0 -70  0 -70  0 1 }
-3 { 0 11, 0, 0 -70  0 70  0 1 }
-4 { 0 13, 0, 0 0  1 0 -1  0 1 }
-5 { 0 17, 0, 0 0  0 -70  0 1 }
-6 { 0 21, 0, 0 0  0 0  0 1 }
-7 { 0 23, 0, 0 0  0 70  0 1 }
-8 { 0 25, 0, 0 0  1 0 1  0 1 }
-9 { 0 27, 1, 0 70  0 -70  0 1 }
-10 { 0 20, 1, 0 70  0 35  0 1 }
-11 { 0 29, 0, 1 0 1  1 0 -1  0 1 }
-12 { 0 24, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 14, 4, 1, 0 }
-1 { 0, 13, 2, 0, 0, 0 }
-2 { 3, 1, 4, 1, 0, 0 }
-3 { 2, 5, 0, 0, 1, 0 }
-4 { 5, 2, 24, 8, 0, 0 }
-5 { 4, 22, 3, 1, 1, 0 }
-6 { 7, 9, 18, 5, 2, 0 }
-7 { 6, 14, 8, 2, 1, 0 }
-8 { 9, 7, 10, 3, 1, 0 }
-9 { 8, 11, 6, 2, 2, 0 }
-10 { 11, 8, 22, 7, 1, 0 }
-11 { 10, 23, 9, 3, 2, 0 }
-12 { 13, 15, 28, 11, 2, 0 }
-13 { 12, 29, 1, 4, 0, 0 }
-14 { 15, 0, 7, 5, 1, 1 }
-15 { 14, 17, 12, 4, 2, 1 }
-16 { 17, 19, 26, 9, 3, 1 }
-17 { 16, 27, 15, 5, 2, 1 }
-18 { 19, 6, 20, 6, 2, 0 }
-19 { 18, 21, 16, 5, 3, 0 }
-20 { 21, 18, 27, 10, 2, 1 }
-21 { 20, 26, 19, 6, 3, 1 }
-22 { 23, 10, 5, 8, 1, 1 }
-23 { 22, 25, 11, 7, 2, 1 }
-24 { 25, 4, 29, 12, 0, 0 }
-25 { 24, 28, 23, 8, 2, 0 }
-26 { 27, 16, 21, 10, 3, 1 }
-27 { 26, 20, 17, 9, 2, 1 }
-28 { 29, 12, 25, 12, 2, 0 }
-29 { 28, 24, 13, 11, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 1 }
-2 { 15, , , 0 }
-3 { 19, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/triangle.nef b/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/triangle.nef
deleted file mode 100644
index 58a641f..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/homogeneous_data/triangle.nef
+++ /dev/null
@@ -1,40 +0,0 @@
-Nef_polyhedron_2<Extended_homogeneous>
-Plane_map_2
-vertices 10
-halfedges 22
-faces 3
-0 { 0 1, 0, 1 0 -1  1 0 -1  0 1 }
-1 { 0 19, 0, 1 0 -1  1 0 1  0 1 }
-2 { 0 5, 1, 0 -70  0 -70  0 1 }
-3 { 0 9, 1, 0 -70  0 -35  0 1 }
-4 { 0 13, 0, 0 -140  0 45  0 2 }
-5 { 0 12, 0, 0 -50  0 -25  0 4 }
-6 { 0 15, 0, 0 0  1 0 -1  0 1 }
-7 { 0 4, 1, 0 0  0 -70  0 1 }
-8 { 0 21, 0, 1 0 1  1 0 -1  0 1 }
-9 { 0 18, 0, 1 0 1  1 0 1  0 1 }
-0 { 1, 3, 16, 6, 1, 0 }
-1 { 0, 15, 2, 0, 0, 0 }
-2 { 3, 1, 18, 1, 0, 0 }
-3 { 2, 19, 0, 0, 1, 0 }
-4 { 5, 7, 17, 7, 1, 1 }
-5 { 4, 16, 6, 2, 1, 1 }
-6 { 7, 5, 10, 3, 1, 1 }
-7 { 6, 9, 4, 2, 1, 1 }
-8 { 9, 11, 13, 5, 2, 1 }
-9 { 8, 12, 7, 3, 1, 1 }
-10 { 11, 6, 12, 4, 1, 1 }
-11 { 10, 13, 8, 3, 2, 1 }
-12 { 13, 10, 9, 5, 1, 0 }
-13 { 12, 8, 11, 4, 2, 0 }
-14 { 15, 17, 20, 8, 1, 0 }
-15 { 14, 21, 1, 6, 0, 0 }
-16 { 17, 0, 5, 7, 1, 1 }
-17 { 16, 4, 14, 6, 1, 1 }
-18 { 19, 2, 21, 9, 0, 0 }
-19 { 18, 20, 3, 1, 1, 0 }
-20 { 21, 14, 19, 9, 1, 0 }
-21 { 20, 18, 15, 8, 0, 0 }
-0 { -1, 1 , , 0 }
-1 { 3, , , 0 }
-2 { 11, , , 1 }
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.cpp b/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.cpp
deleted file mode 100644
index 0dc3821..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.cpp
+++ /dev/null
@@ -1,792 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/basic.h>
-
-#if !defined CGAL_USE_GMP
-#include <iostream>
-int main()
-{
-  std::cout << "Sorry, this demo needs GMP...";
-  std::cout << std::endl;
-  return 0;
-}
-#else
-
-#include <fstream>
-#include <stack>
-#include <set>
-#include <list>
-
-#include "cgal_types.h"
-#include "nef_2.h"
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_Polygon_2.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_help_window.h>
-#include "Qt_widget_toolbar.h"
-#include "nef_2_layers.h"
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-
-#include <qapplication.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qmainwindow.h>
-#include <qmenubar.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qsplitter.h>
-#include <qsplitter.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qstring.h>
-
-const QString my_title_string("Nef_2 Demo with"
-			      " CGAL Qt_widget");
-
-//global flags and variables
-int current_state;
-
-//This class contains a Nef_2 object and a text description
-class Nef_description{
-public:
-  Nef_description(Nef_polyhedron n, QString name_p):
-      N(n), name(name_p){}
-  ~Nef_description(){}
-  Nef_polyhedron N;
-  QString name;
-};
-
-std::list<Nef_description>  nef_2_list;
-bool is_the_first_widget = true; //true only before the creation of
-                                 //the first widget
-
-//This class is a generalisation of QListBox
-class Nef_2_list_box : public QListBox{
-  Q_OBJECT
-public:
-  Nef_2_list_box(QWidget *parent, const char *name):
-    QListBox(parent, name)
-  {
-    setFocusPolicy(QWidget::StrongFocus);
-  }
-  ~Nef_2_list_box(){}
-
-protected:
-  void keyPressEvent(QKeyEvent* e){
-    if ( e->key() == Qt::Key_Delete )
-      if(isSelected(currentItem()))
-        emit(delete_key(item(currentItem())));
-  }
-signals:
-  void delete_key(QListBoxItem *);
-};
-int nef_index; //used to give names to polyhedrons
-
-bool has_built_layout;
-
-
-//This widget contains some widgets in a layout
-class Layout_widget : public QWidget {
-public:
-  Layout_widget(QWidget *parent = 0, const char *name = 0)
-    : QWidget(parent, name)
-  {
-    QBoxLayout *topLayout = new QVBoxLayout( this, 5 );
-    QSplitter *top_splitter = new QSplitter(Qt::Vertical, this);
-    topLayout->addWidget(top_splitter);
-    QSplitter *splitter1 = new QSplitter(top_splitter);
-    nef_list1 = new Nef_2_list_box(splitter1, "Nef_list_1");
-    nef_list2 = new Nef_2_list_box(splitter1, "Nef_list_2");
-    widget = new CGAL::Qt_widget(top_splitter);
-  };
-  CGAL::Qt_widget* get_qt_widget(){return widget;}
-  Nef_2_list_box* get_nef_list1(){return nef_list1;}
-  Nef_2_list_box* get_nef_list2(){return nef_list2;}
-private:
-  CGAL::Qt_widget *widget;
-  Nef_2_list_box  *nef_list1, *nef_list2;
-};
-
-Layout_widget *cwidget;
-
-class MyWindow : public QMainWindow
-{
-  Q_OBJECT
-public:
-  MyWindow(int w, int h){
-    cwidget = new Layout_widget(this);
-    widget = cwidget->get_qt_widget();
-    list1 = cwidget->get_nef_list1();
-    list2 = cwidget->get_nef_list2();
-    setCentralWidget(cwidget);
-
-    if(is_the_first_widget){
-      Line l1(Point_2(0, 0), Point_2(0, 2));
-      Nef_polyhedron N1(l1, Nef_polyhedron::INCLUDED);
-      Nef_visible = N1;
-      Line l2(Point_2(0, 0), Point_2(2, 0));
-      Nef_polyhedron N2(l2, Nef_polyhedron::INCLUDED);
-      Nef_visible2 = N2;
-      insert_in_list(N1, QString("LeftHalf"));
-      insert_in_list(N2, QString("TopHalf"));
-    } else {
-       Nef_visible = Nef_polyhedron(Nef_polyhedron::EMPTY);
-       Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-    }
-    //create a timer for checking if somthing changed
-    QTimer *timer = new QTimer( this );
-    connect( timer, SIGNAL(timeout()),
-           this, SLOT(sl_timer_done()) );
-    timer->start( 200, FALSE );
-
-    // file menu
-    QPopupMenu * file = new QPopupMenu( this );
-    menuBar()->insertItem( "&File", file );
-    file->insertItem("&New", this, SLOT(sl_new_instance()), CTRL+Key_N);
-    file->insertItem("New &Window", this, SLOT(sl_new_window()), CTRL+Key_W);
-    file->insertSeparator();
-    file->insertItem("Load Nef_2", this, SLOT(sl_load_nef()), CTRL+Key_L);
-    file->insertItem("Save Nef_2", this, SLOT(sl_save_nef()), CTRL+Key_S);
-    file->insertItem("Load Polygon_2", this,
-                     SLOT(sl_load_polygon()), CTRL+Key_O);
-    file->insertSeparator();
-    file->insertItem("Print", widget, SLOT(print_to_ps()), CTRL+Key_P);
-    file->insertSeparator();
-    file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_X );
-    file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
-
-    // help menu
-    QPopupMenu * help = new QPopupMenu( this );
-    menuBar()->insertItem( "&Help", help );
-    help->insertItem("How To", this, SLOT(howto()), Key_F1);
-    help->insertSeparator();
-    help->insertItem("&About", this, SLOT(sl_about()), CTRL+Key_A );
-    help->insertItem("About &Qt", this, SLOT(sl_aboutQt()) );
-
-    //the standard toolbar
-    stoolbar = new CGAL::Qt_widget_standard_toolbar (widget, this, "ST");
-    //the new tools toolbar
-    newtoolbar = new Tools_toolbar(widget, this);
-    nef_layer1 = new Qt_layer_nef_blue<Nef_polyhedron>(Nef_visible);
-    nef_layer2 = new Qt_layer_nef_gray<Nef_polyhedron>(Nef_visible2);
-    widget->attach(nef_layer1);
-    widget->attach(nef_layer2);
-    //boolean operations toolbar
-    QToolBar *optoolbar = new QToolBar("operations", this,
-                                        QMainWindow::Right, true,"Operations");
-    QToolButton *but_intersection = new QToolButton(
-       QPixmap( (const char**)intersection_xpm ),
-       "INTERSECTION", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_intersect()), optoolbar, "intersection");
-    QToolButton *but_union = new QToolButton(
-       QPixmap( (const char**)union_xpm ),
-       "UNION", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_join()), optoolbar, "union");
-    QToolButton *but_difference = new QToolButton(
-       QPixmap( (const char**)difference_xpm ),
-       "DIFFERENCE", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_difference()), optoolbar, "difference");
-    QToolButton *but_symm_difference = new QToolButton(
-       QPixmap( (const char**)symmetric_difference_xpm ),
-       "SYMMETRIC DIFFERENCE", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_symm_difference()), optoolbar, "symm_difference");
-
-    QToolButton *but_complement = new QToolButton(
-       QPixmap( (const char**)complement_xpm ),
-       "COMPLEMENT", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_complement()), optoolbar, "complement");
-    QToolButton *but_interior = new QToolButton(
-       QPixmap( (const char**)interior_xpm ),
-       "INTERIOR", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_interior()), optoolbar, "interior");
-    QToolButton *but_closure = new QToolButton(
-       QPixmap( (const char**)closure_xpm ),
-       "CLOSURE", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_closure()), optoolbar, "closure");
-    QToolButton *but_boundary = new QToolButton(
-       QPixmap( (const char**)boundary_xpm ),
-       "BOUNDARY", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_boundary()), optoolbar, "boundary");
-    QToolButton *but_regularization = new QToolButton(
-       QPixmap( (const char**)regularization_xpm ),
-       "REGULARIZATION", "BOOLEAN OPERATIONS", this,
-       SLOT(sl_regularization()), optoolbar, "regularization");
-
-    but_intersection->setOn(true);
-    but_union->setOn(true);
-    but_difference->setOn(true);
-    but_symm_difference->setOn(true);
-    but_complement->setOn(true);
-    but_interior->setOn(true);
-    but_closure->setOn(true);
-    but_boundary->setOn(true);
-    but_regularization->setOn(true);
-
-    connect(list1, SIGNAL(delete_key(QListBoxItem*)),
-            this, SLOT(sl_list1_delete_key_pressed(QListBoxItem*)));
-    connect(list2, SIGNAL(delete_key(QListBoxItem*)),
-            this, SLOT(sl_list2_delete_key_pressed(QListBoxItem*)));
-
-
-
-    *widget << CGAL::BackgroundColor (CGAL::BLACK);
-
-    widget->resize(w,h-100);
-    list1->resize(w, 200);
-    list2->resize(w, 200);
-
-    resize(w, h + 100);
-    widget->set_window(-1, 1, -1, 1);
-    widget->setMouseTracking(TRUE);
-
-    //connect the widget to the main function that receives the objects
-    connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-    this, SLOT(sl_get_new_object(CGAL::Object)));
-
-    //connect the signals doubleClicked from the lists to the specific slots
-    connect(list1, SIGNAL(clicked(QListBoxItem*)),
-      this, SLOT(sl_list1_selected_item(QListBoxItem*)));
-    connect(list2, SIGNAL(clicked(QListBoxItem*)),
-      this, SLOT(sl_list2_selected_item(QListBoxItem*)));
-
-    if(is_the_first_widget){
-      list1->setSelected(0, true);
-      list2->setSelected(1, true);
-    }
-    //application flag stuff
-    old_state = 0;
-    is_the_first_widget =  false;
-    has_no_selection_list1 = false;
-    has_no_selection_list2 = false;
-    widget->show();
-  };
-
-
-public slots:
-  void sl_new_instance()
-  {
-    widget->lock();
-    widget->set_window(-1.1, 1.1, -1.1, 1.1);
-			// set the Visible Area to the Interval
-    Nef_polyhedron N_temp(Nef_polyhedron::EMPTY);
-    Nef_visible = N_temp;
-    Nef_visible2 = N_temp;
-    list1->clear();
-    list2->clear();
-    nef_2_list.clear();
-    has_no_selection_list1 = true;
-    has_no_selection_list2 = true;
-    nef_index = 0;
-    widget->unlock();
-    something_changed();
-  }
-
-
-  void  sl_load_nef()
-  {
-    QString s( QFileDialog::getOpenFileName( QString::null,
-		    "CGAL files (*.cgal)", this ) );
-    if ( s.isEmpty() )
-      return;
-    std::ifstream in(s.ascii());
-    CGAL::set_ascii_mode(in);
-    Nef_polyhedron N_temp(Nef_polyhedron::EMPTY);
-    Nef_visible2 = N_temp;
-    in >> Nef_visible;
-    insert_in_list(Nef_visible, "loaded");
-    list1->setSelected(list1->count()-1, true);
-    list2->clearSelection();
-    has_no_selection_list1 = false;
-    has_no_selection_list2 = true;
-    something_changed();
-  }
-
-  void  sl_save_nef()
-  {
-    QString fileName =
-          QFileDialog::getSaveFileName( "nef_2.cgal",
-                       "Cgal files (*.cgal)", this );
-    if ( !fileName.isNull() ) {
-      // got a file name
-      std::ofstream out(fileName.ascii());
-      CGAL::set_ascii_mode(out);
-      out << Nef_visible << std::endl;
-    }
-  }//end save_nef()
-
-  void  sl_load_polygon(){
-    QString s( QFileDialog::getOpenFileName( QString::null,
-		    "CGAL files (*.cgal)", this ) );
-    if ( s.isEmpty() )
-      return;
-    std::ifstream in(s.ascii());
-    CGAL::set_ascii_mode(in);
-
-    Polygon_2_double poly;
-    in >> poly;
-      Vertex_iterator_double it = poly.vertices_begin();
-      std::list<Point_2> l_of_p;
-      while(it != poly.vertices_end()){
-        CGAL::Gmpq p_q_x((*it).x());
-        CGAL::Gmpq p_q_y((*it).y());
-        RT wsx = p_q_x.numerator() * p_q_y.denominator();
-        RT wsy = p_q_y.numerator() * p_q_x.denominator();
-        RT wsh  = p_q_x.denominator() * p_q_y.denominator();
-        Point_2 p1(wsx, wsy, wsh);
-        l_of_p.push_back(p1);
-        it++;
-      }
-      Nef_polyhedron Nt(l_of_p.begin(), l_of_p.end(),
-                        Nef_polyhedron::INCLUDED);
-      Nef_visible = Nt;
-      QString tnr;
-      tnr.setNum(poly.size());
-      tnr.append("gon");
-      insert_in_list(Nt, tnr);
-      list1->setSelected(list1->count()-1, true);
-      widget->set_window(poly.bbox().xmin(), poly.bbox().xmax(),
-                         poly.bbox().ymin(), poly.bbox().ymax());
-      Nef_polyhedron N_temp(Nef_polyhedron::EMPTY);
-      Nef_visible2 = N_temp;
-      list2->clearSelection();
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-  }
-private slots:
-  void  sl_get_new_object(CGAL::Object obj)
-  {
-    Cartesian_point_2   p;
-    Cartesian_polygon_2 poly;
-    Cartesian_line_2    line;
-    if(CGAL::assign(p, obj)) {
-      /*
-      CGAL::Quotient<RT> wsxq = double_to_quotient<RT>(p.x());
-      CGAL::Quotient<RT> wsyq = double_to_quotient<RT>(p.y());
-      RT wsx = wsxq.numerator() * wsyq.denominator();
-      RT wsy = wsyq.numerator() * wsxq.denominator();
-      RT wsh  = wsxq.denominator() * wsyq.denominator();
-      */
-      RT wsx = p.x().numerator() * p.y().denominator();
-      RT wsy = p.y().numerator() * p.x().denominator();
-      RT wsh  = p.x().denominator() * p.y().denominator();
-      Point_2 p1(wsx, wsy, wsh);
-      Point_2 pt[1] = {p1};
-      Nef_polyhedron Nt(pt, pt+1);
-      insert_in_list(Nt, "Point");
-      Nef_visible = Nt;
-      list1->setSelected(list1->count()-1, true);
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list2->clearSelection();
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    } else if(CGAL::assign(poly, obj)){
-      Vertex_iterator it = poly.vertices_begin();
-      std::list<Point_2> l_of_p;
-      while(it != poly.vertices_end()){
-        //double xp = (*it).x();
-        //double yp = (*it).y();
-        //CGAL::Quotient<RT> wsxq = double_to_quotient<RT>(xp);
-        //CGAL::Quotient<RT> wsyq = double_to_quotient<RT>(yp);
-        RT wsx = (*it).x().numerator() * (*it).y().denominator();
-        RT wsy = (*it).y().numerator() * (*it).x().denominator();
-        RT wsh  = (*it).x().denominator() * (*it).y().denominator();
-        Point_2 p1(wsx, wsy, wsh);
-        l_of_p.push_back(p1);
-        it++;
-      }
-      Nef_polyhedron Nt(l_of_p.begin(), l_of_p.end(),
-                        Nef_polyhedron::INCLUDED);
-      Nef_visible = Nt;
-      QString tnr;
-      tnr.setNum(poly.size());
-      tnr.append("gon");
-      insert_in_list(Nt, tnr);
-      list1->setSelected(list1->count()-1, true);
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list2->clearSelection();
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    } else if(CGAL::assign(line, obj)){
-      /*
-      CGAL::Quotient<RT> wsxq = double_to_quotient<RT>(line.point(0).x());
-      CGAL::Quotient<RT> wsyq = double_to_quotient<RT>(line.point(0).y());
-      RT wsx = wsxq.numerator() * wsyq.denominator();
-      RT wsy = wsyq.numerator() * wsxq.denominator();
-      RT wsh  = wsxq.denominator() * wsyq.denominator();
-      */
-      RT wsx = line.point(0).x().numerator()
-               * line.point(0).y().denominator();
-      RT wsy = line.point(0).y().numerator()
-               * line.point(0).x().denominator();
-      RT wsh  = line.point(0).x().denominator()
-               * line.point(0).y().denominator();
-      Point_2 p1(wsx, wsy, wsh);
-      /*
-      wsxq = double_to_quotient<RT>(line.point(1).x());
-      wsyq = double_to_quotient<RT>(line.point(1).y());
-      wsx = wsxq.numerator() * wsyq.denominator();
-      wsy = wsyq.numerator() * wsxq.denominator();
-      wsh  = wsxq.denominator() * wsyq.denominator();
-      */
-      wsx = line.point(1).x().numerator() * line.point(1).y().denominator();
-      wsy = line.point(1).y().numerator() * line.point(1).x().denominator();
-      wsh  = line.point(1).x().denominator()
-             * line.point(1).y().denominator();
-      Point_2 p2(wsx, wsy, wsh);
-
-      Nef_polyhedron Nt(Line(p1, p2), Nef_polyhedron::INCLUDED);
-      Nef_visible = Nt;
-      insert_in_list(Nt, "HalfSpace");
-      list1->setSelected(list1->count()-1, true);
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list2->clearSelection();
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  };
-
-  void howto(){
-    QString home;
-    home = "help/index.html";
-    CGAL::Qt_help_window *help = new
-      CGAL::Qt_help_window(home, ".", 0, "help viewer");
-    help->resize(400, 400);
-    help->setCaption("Demo HowTo");
-    help->show();
-  }
-
-
-  void  sl_about()
-  {
-    QMessageBox::about( this, my_title_string,
-		"This is a demo for Nef_2,\n"
-  		"Copyright CGAL @2002");
-  };
-
-  void  sl_aboutQt()
-  {
-    QMessageBox::aboutQt( this, my_title_string );
-  }
-
-  void  sl_new_window(){
-    MyWindow *ed = new MyWindow(500, 500);
-    ed->setCaption("Layer");
-    ed->stoolbar->clear_history();
-    ed->widget->set_window(-1.1, 1.1, -1.1, 1.1);
-    ed->show();
-    something_changed();
-  }
-
-  void  sl_timer_done()
-  {
-    if(old_state!=current_state){
-      int temp_index_1 = list1->currentItem();
-      int temp_index_2 = list2->currentItem();
-      list1->clear();
-      list2->clear();
-      std::list<Nef_description>::iterator it = nef_2_list.begin();
-      while(it!=nef_2_list.end()){
-        list1->insertItem((*it).name);
-        list2->insertItem((*it).name);
-	it++;
-      }
-      if(!has_no_selection_list1)
-        list1->setSelected(temp_index_1, true);
-      if(!has_no_selection_list2)
-        list2->setSelected(temp_index_2, true);
-      widget->redraw();
-      old_state = current_state;
-    }
-  }
-
-  void  sl_list1_selected_item(QListBoxItem* item){
-    if(item){
-      if(Nef_visible != return_selected_nef(item->text())){
-        Nef_visible = return_selected_nef(item->text());
-	has_no_selection_list1 = false;
-      } else {
-        Nef_visible = Nef_polyhedron(Nef_polyhedron::EMPTY);
-        list1->setSelected(item, false);
-	has_no_selection_list1 = true;
-      }
-      widget->redraw();
-    }
-  }
-  void  sl_list2_selected_item(QListBoxItem* item){
-    if(item){
-      if(Nef_visible2 != return_selected_nef(item->text())){
-        Nef_visible2 = return_selected_nef(item->text());
-	has_no_selection_list2 = false;
-      } else {
-        Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-        list2->setSelected(item, false);
-	has_no_selection_list2 = true;
-      }
-      widget->redraw();
-    }
-  }
-  void  sl_list1_delete_key_pressed(QListBoxItem* item){
-    if(item){
-      int ci = list1->currentItem();
-      std::list<Nef_description>::iterator it = nef_2_list.begin();
-      for(int i=0; i<ci; i++)
-	it++;
-      nef_2_list.erase(it);
-      Nef_visible = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      has_no_selection_list1 = true;
-      if(list2->currentItem() == ci){
-        Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-	has_no_selection_list2 = true;
-      }
-      something_changed();
-    }
-  }
-  void  sl_list2_delete_key_pressed(QListBoxItem* item){
-    if(item){
-      int ci = list2->currentItem();
-      std::list<Nef_description>::iterator it = nef_2_list.begin();
-      for(int i=0; i<ci; i++)
-	it++;
-      nef_2_list.erase(it);
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      has_no_selection_list2 = true;
-      if(list1->currentItem() == ci){
-        Nef_visible = Nef_polyhedron(Nef_polyhedron::EMPTY);
-	has_no_selection_list1 = true;
-      }
-      something_changed();
-    }
-  }
-  void  sl_intersect(){
-    if( list1->isSelected(list1->currentItem())
-        && list2->isSelected(list2->currentItem()) ){
-      //if there is something selected
-      Nef_polyhedron NT = Nef_visible.intersection(Nef_visible2);
-      QString s = "AND(" + list1->currentText() + ", "
-                  + list2->currentText() + ")";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      list2->setSelected(list2->currentItem(), false);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_join(){
-    if( list1->isSelected(list1->currentItem())
-        && list2->isSelected(list2->currentItem()) ){
-      //if there is something selected
-      Nef_polyhedron NT = Nef_visible.join(Nef_visible2);
-      QString s = "OR(" + list1->currentText() + ", "
-                  + list2->currentText() + ")";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      list2->setSelected(list2->currentItem(), false);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_difference(){
-    if( list1->isSelected(list1->currentItem())
-        && list2->isSelected(list2->currentItem()) ){
-      //if there is something selected
-      Nef_polyhedron NT = Nef_visible.difference(Nef_visible2);
-      QString s = "Dif(" + list1->currentText() + ", "
-                  + list2->currentText() + ")";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      list2->setSelected(list2->currentItem(), false);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_symm_difference(){
-    if( list1->isSelected(list1->currentItem())
-        && list2->isSelected(list2->currentItem()) ){
-      //if there is something selected
-      Nef_polyhedron NT = Nef_visible.symmetric_difference(Nef_visible2);
-      QString s = "SYM_DIF(" + list1->currentText() + ", "
-                  + list2->currentText() + ")";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      list2->setSelected(list2->currentItem(), false);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_complement(){
-    if( list1->isSelected(list1->currentItem()) ){
-      //if there is something from the 1st list selected
-      Nef_polyhedron NT = Nef_visible.complement();
-      QString s = "COMPLEMENT( " + list1->currentText() + " )";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_interior(){
-    if( list1->isSelected(list1->currentItem()) ){
-      //if there is something from the 1st list selected
-      Nef_polyhedron NT = Nef_visible.interior();
-      QString s = "INTERIOR( " + list1->currentText() + " )";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_closure(){
-    if( list1->isSelected(list1->currentItem()) ){
-      //if there is something from the 1st list selected
-      Nef_polyhedron NT = Nef_visible.closure();
-      QString s = "CLOSURE( " + list1->currentText() + " )";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      list1->setSelected(list1->count()-1, true);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_boundary(){
-    if( list1->isSelected(list1->currentItem()) ){
-      //if there is something from the 1st list selected
-      Nef_polyhedron NT = Nef_visible.boundary();
-      QString s = "BOUNDARY( " + list1->currentText() + " )";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-  void  sl_regularization(){
-    if( list1->isSelected(list1->currentItem()) ){
-      //if there is something from the 1st list selected
-      Nef_polyhedron NT = Nef_visible.regularization();
-      QString s = "REGULARIZATION( " + list1->currentText() + " )";
-      insert_in_list(NT, s);
-      Nef_visible = NT;
-      Nef_visible2 = Nef_polyhedron(Nef_polyhedron::EMPTY);
-      list1->setSelected(list1->count()-1, true);
-      has_no_selection_list1 = false;
-      has_no_selection_list2 = true;
-      something_changed();
-    }
-  }
-private:
-  void insert_in_list(Nef_polyhedron n, QString name)
-  {
-    QString tnr;
-    tnr.setNum(nef_index++);
-    tnr.append("gon");
-    QString tname("N");
-    tname.append(tnr);
-    tname.append("= ");
-    tname += name;
-    Nef_description tempND(n, tname);
-    nef_2_list.push_back(tempND);
-    list1->insertItem(tname);
-    list2->insertItem(tname);
-  }
-
-  Nef_polyhedron
-  return_selected_nef(QString text){
-    std::list<Nef_description>::const_iterator
-      it = nef_2_list.begin();
-    while(it != nef_2_list.end()) {
-      if((*it).name == text)
-        return (*it).N;
-      ++it;
-    }
-    CGAL_error();
-    return Nef_polyhedron(); // kill warning.
-  }
-
-  void  something_changed(){current_state+=2;};
-
-  CGAL::Qt_widget             *widget;
-  Tools_toolbar               *newtoolbar;
-  CGAL::Qt_widget_standard_toolbar
-                              *stoolbar;
-  int                         old_state;
-                              //used to refresh the current window
-  Nef_2_list_box                     *list1, *list2;
-  Qt_layer_nef_blue<Nef_polyhedron>  *nef_layer1;
-  Qt_layer_nef_gray<Nef_polyhedron>  *nef_layer2;
-  Nef_polyhedron Nef_visible;
-  Nef_polyhedron Nef_visible2;
-
-  bool has_no_selection_list2;
-  bool has_no_selection_list1;
-
-};
-
-#include "nef_2.moc"
-
-
-int
-main(int argc, char **argv)
-{
-  QApplication app( argc, argv );
-  has_built_layout = false;
-  current_state = -1;
-  nef_index = 0;
-  MyWindow widget(500,500); // physical window size
-  app.setMainWidget(&widget);
-  widget.setCaption(my_title_string);
-  widget.setMouseTracking(TRUE);
-#if !defined (__POWERPC__)
-  QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm);
-  widget.setIcon(cgal_icon);
-#endif
-  widget.show();
-  return app.exec();
-}
-
-#endif // CGAL_USE_GMP
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.h b/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.h
deleted file mode 100644
index 348b8de..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2.h
+++ /dev/null
@@ -1,451 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-
-
-#include <CGAL/Quotient.h>
-
-template <class NT>
-CGAL::Quotient<NT>
-double_to_quotient(double x)
-{
-    NT num = 0;
-    NT den = 1;
-
-    if (x != 0.0)
-    { int neg = (x < 0);
-      if (neg) x = -x;
-
-      const unsigned shift = 15;   // a safe shift per step
-      const unsigned int shift_pow = 32768; // = 2^shift
-      const double width = 32768;  // = 2^shift
-      const int maxiter = 20;      // ought not be necessary, but just in case,
-                                   // max 300 bits of precision
-      int expt;
-      double mantissa = std::frexp(x, &expt);
-      long exponent = expt;
-      double intpart;
-      int k = 0;
-
-      while (mantissa != 0.0 && k++ < maxiter)
-
-      { mantissa *= width; // shift double mantissa
-        mantissa = std::modf(mantissa, &intpart);
-        num *= shift_pow;
-        num += (long)intpart;
-        exponent -= shift;
-      }
-      int expsign = (exponent>0 ? +1 : (exponent<0 ? -1 : 0));
-      exponent *= expsign;
-      NT twopot(2);
-      NT exppot(1);
-      while (exponent!=0) {
-        if (exponent & 1)
-          exppot *= twopot;
-        exponent >>= 1;
-        twopot *= twopot;
-      }
-
-      if (expsign > 0)
-        num *= exppot;
-      else if (expsign < 0)
-        den *= exppot;
-      if (neg)
-        num = -num;
-    }
-    CGAL::Quotient<NT> q(num,den);
-    q.normalize();
-    return q;
-}
-/* XPM */
-static const char *intersection_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c #808080",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXX  XXXXX    XXXX   XXXXXXX",
-"XXXXXX XXXXXXX . XXXXXXXX XXXXXX",
-"XXXXX XXXXXXX ... XXXXXXXX XXXXX",
-"XXXX XXXXXXX ..... XXXXXXXX XXXX",
-"XXXX XXXXXXX ..... XXXXXXXX XXXX",
-"XXX XXXXXXX ....... XXXXXXXX XXX",
-"XXX XXXXXXX ....... XXXXXXXX XXX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XX XXXXXXX ......... XXXXXXXX XX",
-"XXX XXXXXXX ....... XXXXXXXX XXX",
-"XXX XXXXXXX ....... XXXXXXXX XXX",
-"XXXX XXXXXXX ..... XXXXXXXX XXXX",
-"XXXX XXXXXXX ..... XXXXXXXX XXXX",
-"XXXXX XXXXXXX ... XXXXXXXX XXXXX",
-"XXXXXX XXXXXXX . XXXXXXXX XXXXXX",
-"XXXXXXX  XXXXX    XXXX   XXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-static const char *union_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c #808080",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXX  .....    ....   XXXXXXX",
-"XXXXXX ....... . ........ XXXXXX",
-"XXXXX ....... ... ........ XXXXX",
-"XXXX ....... ..... ........ XXXX",
-"XXXX ....... ..... ........ XXXX",
-"XXX ....... ....... ........ XXX",
-"XXX ....... ....... ........ XXX",
-"XX ....... ......... ........ XX",
-"XX ....... ......... ........ XX",
-"XX ....... ......... ........ XX",
-"XX ....... ......... ........ XX",
-"XX ....... ......... ........ XX",
-"XX ....... ......... ........ XX",
-"XXX ....... ....... ........ XXX",
-"XXX ....... ....... ........ XXX",
-"XXXX ....... ..... ........ XXXX",
-"XXXX ....... ..... ........ XXXX",
-"XXXXX ....... ... ........ XXXXX",
-"XXXXXX ....... . ........ XXXXXX",
-"XXXXXXX  .....    ....   XXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-static const char *difference_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c #808080",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXX  .....    XXXX   XXXXXXX",
-"XXXXXX ....... X XXXXXXXX XXXXXX",
-"XXXXX ....... XXX XXXXXXXX XXXXX",
-"XXXX ....... XXXXX XXXXXXXX XXXX",
-"XXXX ....... XXXXX XXXXXXXX XXXX",
-"XXX ....... XXXXXXX XXXXXXXX XXX",
-"XXX ....... XXXXXXX XXXXXXXX XXX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XX ....... XXXXXXXXX XXXXXXXX XX",
-"XXX ....... XXXXXXX XXXXXXXX XXX",
-"XXX ....... XXXXXXX XXXXXXXX XXX",
-"XXXX ....... XXXXX XXXXXXXX XXXX",
-"XXXX ....... XXXXX XXXXXXXX XXXX",
-"XXXXX ....... XXX XXXXXXXX XXXXX",
-"XXXXXX ....... X XXXXXXXX XXXXXX",
-"XXXXXXX  .....    XXXX   XXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-static const char *symmetric_difference_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c #808080",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXX  .....    ....   XXXXXXX",
-"XXXXXX ....... X ........ XXXXXX",
-"XXXXX ....... XXX ........ XXXXX",
-"XXXX ....... XXXXX ........ XXXX",
-"XXXX ....... XXXXX ........ XXXX",
-"XXX ....... XXXXXXX ........ XXX",
-"XXX ....... XXXXXXX ........ XXX",
-"XX ....... XXXXXXXXX ........ XX",
-"XX ....... XXXXXXXXX ........ XX",
-"XX ....... XXXXXXXXX ........ XX",
-"XX ....... XXXXXXXXX ........ XX",
-"XX ....... XXXXXXXXX ........ XX",
-"XX ....... XXXXXXXXX ........ XX",
-"XXX ....... XXXXXXX ........ XXX",
-"XXX ....... XXXXXXX ........ XXX",
-"XXXX ....... XXXXX ........ XXXX",
-"XXXX ....... XXXXX ........ XXXX",
-"XXXXX ....... XXX ........ XXXXX",
-"XXXXXX ....... X ........ XXXXXX",
-"XXXXXXX  .....    ....   XXXXXXX",
-"XXXXXXXXX     XXXX    XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-static const char *complement_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c opaque",
-". c #808080",
-/* pixels */
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-".....  ..................  .....",
-".....                      .....",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-".....                      .....",
-".....  ..................  .....",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"
-};
-
-/* XPM */
-static const char *interior_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c opaque",
-". c #808080",
-/* pixels */
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"       ..................       ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "
-};
-
-/* XPM */
-static const char *closure_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c #808080",
-"X c white",
-/* pixels */
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"     XXXXXXXXXXXXXXXXXXXXXX     ",
-"     XXXXXXXXXXXXXXXXXXXXXX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XX..................XX     ",
-"     XXXXXXXXXXXXXXXXXXXXXX     ",
-"     XXXXXXXXXXXXXXXXXXXXXX     ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "
-};
-
-/* XPM */
-static const char *boundary_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c opaque",
-". c white",
-/* pixels */
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"     ......................     ",
-"     ......................     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ..                  ..     ",
-"     ......................     ",
-"     ......................     ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "
-};
-
-/* XPM */
-static const char *regularization_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 4 1",
-"  c opaque",
-". c yellow",
-"X c #808080",
-"o c white",
-/* pixels */
-"                                ",
-"                   ..           ",
-"                    ..      ..  ",
-"                     ..    ..   ",
-"                     ..   ...   ",
-"                      ......    ",
-"       ooooooooooooooo.....     ",
-"       ooooooooooooooo.....     ",
-"       ooXXXXXXXXXXXXX.....     ",
-"       ooXXXXXXXXXXXX.......    ",
-"       ooXXXXXXXXXXX..Xoo ...   ",
-"       ooXXXXXXXXXX..XXoo  ...  ",
-"       ooXXXXXXXXXXXXXXoo   .   ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       ooXXXXXXXXXXXXXXoo       ",
-"       oooooooooooooooooo       ",
-"       oooooooooooooooooo       ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "
-};
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2_layers.h b/3rdparty/CGAL-4.6/demo/Nef_2/nef_2_layers.h
deleted file mode 100644
index 233f8a1..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/nef_2_layers.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/IO/Qt_widget_Nef_2.h>
-
-template <class Nef_polyhedron>
-class Qt_layer_nef_blue : public CGAL::Qt_widget_layer
-{
-public:
-  Qt_layer_nef_blue(Nef_polyhedron &n): Nef(n){}
-  void draw()
-  {
-    *widget << CGAL::FillColor(CGAL::BLUE) << CGAL::GREEN;
-    widget->setRasterOp(XorROP);
-    *widget << Nef;
-  };
-private:
-  Nef_polyhedron &Nef;
-};//end class
-
-template <class Nef_polyhedron>
-class Qt_layer_nef_gray : public CGAL::Qt_widget_layer
-{
-public:
-
-  Qt_layer_nef_gray(Nef_polyhedron &n): Nef(n){}
-  void draw()
-  {
-    *widget << CGAL::FillColor(CGAL::GRAY) << CGAL::WHITE;
-    widget->setRasterOp(XorROP);
-    *widget << Nef;
-  }
-private:
-  Nef_polyhedron &Nef;
-};//end class
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.gif b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.gif
deleted file mode 100644
index 1c8dc2e..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.gif and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.pcx
deleted file mode 100644
index 88c235a..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic2.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic2.pcx
deleted file mode 100644
index 9b53e64..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/basic2.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.pcx
deleted file mode 100644
index d37c1d1..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.xpm
deleted file mode 100644
index 8432fa0..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/boundary.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.pcx
deleted file mode 100644
index 07a58f8..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.xpm
deleted file mode 100644
index 0f7b7e7..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/closure.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.pcx
deleted file mode 100644
index 035e45c..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.xpm
deleted file mode 100644
index 7c0bfc7..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/complement.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.pcx
deleted file mode 100644
index a30362f..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.xpm
deleted file mode 100644
index ba91a79..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/diff.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.pcx
deleted file mode 100644
index fc48f62..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.xpm
deleted file mode 100644
index 561f888..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/exor.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.pcx
deleted file mode 100644
index aad28f7..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.xpm
deleted file mode 100644
index a086057..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/interior.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.pcx
deleted file mode 100644
index b0fdfd3..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.xpm
deleted file mode 100644
index 73a1a1f..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/intersection.xpm
+++ /dev/null
@@ -1,55 +0,0 @@
-/* XPM */
-static const char *inter_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34       14            1",
-/* colors */
-". c #000000",
-"# c #00004c",
-"a c #0000a5",
-"b c #0000ff",
-"c c #7f0025",
-"d c #7f4092",
-"e c #8080ff",
-"f c #bbb7be",
-"g c #c7c3ca",
-"h c #e0dce3",
-"i c #ede9f0",
-"j c #f0f0f0",
-"k c #ff0000",
-"l c #ff8080",
-/* pixels */
-"hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
-"hhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhjjjjjjjjjllllllljjjjjjjjjjjjjjgg",
-"hhjjjjjjjllkkkkkkklljjjjjjjjjjjjgg",
-"hhjjjjjllkklllllllkklljjjjjjjjjjgg",
-"hhjjjjlkklljjjjjjjllkkljjjjjjjjjgg",
-"hhjjjlklljjjjjjjjjjjllkljjjjjjjjgg",
-"hhjjlkljjjjjjjjjjjeeeedcljjjjjjjgg",
-"hhjjlkljjjjjjjjjeebbbba#dejjjjjjgg",
-"hhjlkljjjjjjjjjebbeeeeed#aejjjjjgg",
-"hhjlkljjjjjjjjebee.....lcdbejjjjgg",
-"hhlkljjjjjjjjebe........lkdbejjjgg",
-"hhlkljjjjjjjebe.........lklebejjgg",
-"hhlkljjjjjjebe..........lkljebejgg",
-"hhlkljjjjjjebe..........lkljebejgg",
-"hhlkljjjjjebe...........lkljjebegg",
-"hhlkljjjjjebe...........lkljjebegg",
-"hhjlkljjjjebe..........lkljjjebegg",
-"hhjlkljjjjebe..........lkljjjebegg",
-"hhjjlkljjjebe.........lkljjjjebegg",
-"hhjjlkljjjebe.........lkljjjjebegg",
-"hhjjjlklljebe.......llkljjjjjebegg",
-"hhjjjjlkkllebe....llkkljjjjjebejgg",
-"hhjjjjjllkkdadllllkklljjjjjjebejgg",
-"hhjjjjjjjllkc#ckkklljjjjjjjebejjgg",
-"hhjjjjjjjjjlldadlljjjjjjjjebejjjgg",
-"hhjjjjjjjjjjjjebeejjjjjjeebejjjjgg",
-"hhjjjjjjjjjjjjjebbeeeeeebbejjjjjgg",
-"hhjjjjjjjjjjjjjjeebbbbbbeejjjjjjgg",
-"hhjjjjjjjjjjjjjjjjeeeeeejjjjjjjjgg",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhfffffffffffffffffffffffffffffffg",
-"hfffffffffffffffffffffffffffffffff"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/nef.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/nef.xpm
deleted file mode 100644
index 0eb47d4..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/nef.xpm
+++ /dev/null
@@ -1,425 +0,0 @@
-/* XPM */
-static const char *intersection_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34       14            1",
-/* colors */
-". c #000000",
-"# c #00004c",
-"a c #0000a5",
-"b c #0000ff",
-"c c #7f0025",
-"d c #7f4092",
-"e c #8080ff",
-"f c #bbb7be",
-"g c #c7c3ca",
-"h c #e0dce3",
-"i c #ede9f0",
-"j c #f0f0f0",
-"k c #ff0000",
-"l c #ff8080",
-/* pixels */
-"hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
-"hhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhjjjjjjjjjllllllljjjjjjjjjjjjjjgg",
-"hhjjjjjjjllkkkkkkklljjjjjjjjjjjjgg",
-"hhjjjjjllkklllllllkklljjjjjjjjjjgg",
-"hhjjjjlkklljjjjjjjllkkljjjjjjjjjgg",
-"hhjjjlklljjjjjjjjjjjllkljjjjjjjjgg",
-"hhjjlkljjjjjjjjjjjeeeedcljjjjjjjgg",
-"hhjjlkljjjjjjjjjeebbbba#dejjjjjjgg",
-"hhjlkljjjjjjjjjebbeeeeed#aejjjjjgg",
-"hhjlkljjjjjjjjebee.....lcdbejjjjgg",
-"hhlkljjjjjjjjebe........lkdbejjjgg",
-"hhlkljjjjjjjebe.........lklebejjgg",
-"hhlkljjjjjjebe..........lkljebejgg",
-"hhlkljjjjjjebe..........lkljebejgg",
-"hhlkljjjjjebe...........lkljjebegg",
-"hhlkljjjjjebe...........lkljjebegg",
-"hhjlkljjjjebe..........lkljjjebegg",
-"hhjlkljjjjebe..........lkljjjebegg",
-"hhjjlkljjjebe.........lkljjjjebegg",
-"hhjjlkljjjebe.........lkljjjjebegg",
-"hhjjjlklljebe.......llkljjjjjebegg",
-"hhjjjjlkkllebe....llkkljjjjjebejgg",
-"hhjjjjjllkkdadllllkklljjjjjjebejgg",
-"hhjjjjjjjllkc#ckkklljjjjjjjebejjgg",
-"hhjjjjjjjjjlldadlljjjjjjjjebejjjgg",
-"hhjjjjjjjjjjjjebeejjjjjjeebejjjjgg",
-"hhjjjjjjjjjjjjjebbeeeeeebbejjjjjgg",
-"hhjjjjjjjjjjjjjjeebbbbbbeejjjjjjgg",
-"hhjjjjjjjjjjjjjjjjeeeeeejjjjjjjjgg",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhfffffffffffffffffffffffffffffffg",
-"hfffffffffffffffffffffffffffffffff"
-};
-
-
-/* XPM */
-static const char *union_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34       14            1",
-/* colors */
-". c #000000",
-"# c #00004c",
-"a c #0000a5",
-"b c #0000ff",
-"c c #7f0025",
-"d c #7f4092",
-"e c #8080ff",
-"f c #bbb7be",
-"g c #c7c3ca",
-"h c #e0dce3",
-"i c #ede9f0",
-"j c #f0f0f0",
-"k c #ff0000",
-"l c #ff8080",
-/* pixels */
-"hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
-"hhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhjjjjjjjjjllllllljjjjjjjjjjjjjjgg",
-"hhjjjjjjjllkkkkkkklljjjjjjjjjjjjgg",
-"hhjjjjjllkklllllllkklljjjjjjjjjjgg",
-"hhjjjjlkkll.......llkkljjjjjjjjjgg",
-"hhjjjlkll...........llkljjjjjjjjgg",
-"hhjjlkl...........eeeedcljjjjjjjgg",
-"hhjjlkl.........eebbbba#dejjjjjjgg",
-"hhjlkl.........ebbeeeeed#aejjjjjgg",
-"hhjlkl........ebee.....lcdbejjjjgg",
-"hhlkl........ebe........lkdbejjjgg",
-"hhlkl.......ebe.........lklebejjgg",
-"hhlkl......ebe..........lkl.ebejgg",
-"hhlkl......ebe..........lkl.ebejgg",
-"hhlkl.....ebe...........lkl..ebegg",
-"hhlkl.....ebe...........lkl..ebegg",
-"hhjlkl....ebe..........lkl...ebegg",
-"hhjlkl....ebe..........lkl...ebegg",
-"hhjjlkl...ebe.........lkl....ebegg",
-"hhjjlkl...ebe.........lkl....ebegg",
-"hhjjjlkll.ebe.......llkl.....ebegg",
-"hhjjjjlkkllebe....llkkl.....ebejgg",
-"hhjjjjjllkkdadllllkkll......ebejgg",
-"hhjjjjjjjllkc#ckkkll.......ebejjgg",
-"hhjjjjjjjjjlldadll........ebejjjgg",
-"hhjjjjjjjjjjjjebee......eebejjjjgg",
-"hhjjjjjjjjjjjjjebbeeeeeebbejjjjjgg",
-"hhjjjjjjjjjjjjjjeebbbbbbeejjjjjjgg",
-"hhjjjjjjjjjjjjjjjjeeeeeejjjjjjjjgg",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhfffffffffffffffffffffffffffffffg",
-"hfffffffffffffffffffffffffffffffff"
-};
-
-/* XPM */
-static const char *difference_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34       14            1",
-/* colors */
-". c #000000",
-"# c #00004c",
-"a c #0000a5",
-"b c #0000ff",
-"c c #7f0025",
-"d c #7f4092",
-"e c #8080ff",
-"f c #bbb7be",
-"g c #c7c3ca",
-"h c #e0dce3",
-"i c #ede9f0",
-"j c #f0f0f0",
-"k c #ff0000",
-"l c #ff8080",
-/* pixels */
-"hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
-"hhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhjjjjjjjjjllllllljjjjjjjjjjjjjjgg",
-"hhjjjjjjjllkkkkkkklljjjjjjjjjjjjgg",
-"hhjjjjjllkklllllllkklljjjjjjjjjjgg",
-"hhjjjjlkkll.......llkkljjjjjjjjjgg",
-"hhjjjlkll...........llkljjjjjjjjgg",
-"hhjjlkl...........eeeedcljjjjjjjgg",
-"hhjjlkl.........eebbbba#dejjjjjjgg",
-"hhjlkl.........ebbeeeeed#aejjjjjgg",
-"hhjlkl........ebeejjjjjlcdbejjjjgg",
-"hhlkl........ebejjjjjjjjlkdbejjjgg",
-"hhlkl.......ebejjjjjjjjjlklebejjgg",
-"hhlkl......ebejjjjjjjjjjlkljebejgg",
-"hhlkl......ebejjjjjjjjjjlkljebejgg",
-"hhlkl.....ebejjjjjjjjjjjlkljjebegg",
-"hhlkl.....ebejjjjjjjjjjjlkljjebegg",
-"hhjlkl....ebejjjjjjjjjjlkljjjebegg",
-"hhjlkl....ebejjjjjjjjjjlkljjjebegg",
-"hhjjlkl...ebejjjjjjjjjlkljjjjebegg",
-"hhjjlkl...ebejjjjjjjjjlkljjjjebegg",
-"hhjjjlkll.ebejjjjjjjllkljjjjjebegg",
-"hhjjjjlkkllebejjjjllkkljjjjjebejgg",
-"hhjjjjjllkkdadllllkklljjjjjjebejgg",
-"hhjjjjjjjllkc#ckkklljjjjjjjebejjgg",
-"hhjjjjjjjjjlldadlljjjjjjjjebejjjgg",
-"hhjjjjjjjjjjjjebeejjjjjjeebejjjjgg",
-"hhjjjjjjjjjjjjjebbeeeeeebbejjjjjgg",
-"hhjjjjjjjjjjjjjjeebbbbbbeejjjjjjgg",
-"hhjjjjjjjjjjjjjjjjeeeeeejjjjjjjjgg",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhfffffffffffffffffffffffffffffffg",
-"hfffffffffffffffffffffffffffffffff"
-};
-
-/* XPM */
-static const char *exor_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34       14            1",
-/* colors */
-". c #000000",
-"# c #00004c",
-"a c #0000a5",
-"b c #0000ff",
-"c c #7f0025",
-"d c #7f4092",
-"e c #8080ff",
-"f c #bbb7be",
-"g c #c7c3ca",
-"h c #e0dce3",
-"i c #ede9f0",
-"j c #f0f0f0",
-"k c #ff0000",
-"l c #ff8080",
-/* pixels */
-"hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
-"hhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhjjjjjjjjjllllllljjjjjjjjjjjjjjgg",
-"hhjjjjjjjllkkkkkkklljjjjjjjjjjjjgg",
-"hhjjjjjllkklllllllkklljjjjjjjjjjgg",
-"hhjjjjlkkll.......llkkljjjjjjjjjgg",
-"hhjjjlkll...........llkljjjjjjjjgg",
-"hhjjlkl...........eeeedcljjjjjjjgg",
-"hhjjlkl.........eebbbba#dejjjjjjgg",
-"hhjlkl.........ebbeeeeed#aejjjjjgg",
-"hhjlkl........ebeejjjjjlcdbejjjjgg",
-"hhlkl........ebejjjjjjjjlkdbejjjgg",
-"hhlkl.......ebejjjjjjjjjlklebejjgg",
-"hhlkl......ebejjjjjjjjjjlkl.ebejgg",
-"hhlkl......ebejjjjjjjjjjlkl.ebejgg",
-"hhlkl.....ebejjjjjjjjjjjlkl..ebegg",
-"hhlkl.....ebejjjjjjjjjjjlkl..ebegg",
-"hhjlkl....ebejjjjjjjjjjlkl...ebegg",
-"hhjlkl....ebejjjjjjjjjjlkl...ebegg",
-"hhjjlkl...ebejjjjjjjjjlkl....ebegg",
-"hhjjlkl...ebejjjjjjjjjlkl....ebegg",
-"hhjjjlkll.ebejjjjjjjllkl.....ebegg",
-"hhjjjjlkkllebejjjjllkkl.....ebejgg",
-"hhjjjjjllkkdadllllkkll......ebejgg",
-"hhjjjjjjjllkc#ckkkll.......ebejjgg",
-"hhjjjjjjjjjlldadll........ebejjjgg",
-"hhjjjjjjjjjjjjebee......eebejjjjgg",
-"hhjjjjjjjjjjjjjebbeeeeeebbejjjjjgg",
-"hhjjjjjjjjjjjjjjeebbbbbbeejjjjjjgg",
-"hhjjjjjjjjjjjjjjjjeeeeeejjjjjjjjgg",
-"hhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjgg",
-"hhfffffffffffffffffffffffffffffffg",
-"hfffffffffffffffffffffffffffffffff"
-};
-
-
-/* XPM */
-static const char *interior_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34        9            1",
-/* colors */
-". c #000000",
-"# c #b4b4b4",
-"a c #c0c0c0",
-"b c #d9d9d9",
-"c c #e6e6e6",
-"d c #fe0000",
-"e c #fe5555",
-"f c #feaaaa",
-"g c #ffffff",
-/* pixels */
-"bccccccccccccccccccccccccccccccccc",
-"bbccccccccccccccccccccccccccccccca",
-"bbggggggggggggggggggggggggggggggaa",
-"bbggggggggggggggggggggggggggggggaa",
-"bbggggggggggggggggggggggggggggggaa",
-"bbggggggggggggggggggggggggggggggaa",
-"bbggggggggggggggggggggggggggggggaa",
-"bbgggggggfffffffffffffffffffffffaa",
-"bbggggggfeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbgggggfedddddddddddddddddddddddaa",
-"bbgggggfedeeeeeeeeeeeeeeeeeeeeedaa",
-"bbgggggfedefffffffffffffffffffedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedef.................fedaa",
-"bbgggggfedefffffffffffffffffffedaa",
-"bbgggggfedeeeeeeeeeeeeeeeeeeeeedaa",
-"bbgggggfeddddddddddddddddddddddgaa",
-"bb###############################a",
-"b#################################"
-};
-
-/* XPM */
-static const char *closure_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34        7            1",
-/* colors */
-". c #000000",
-"# c #b4b4b4",
-"a c #c0c0c0",
-"b c #d9d9d9",
-"c c #e6e6e6",
-"d c #feaaaa",
-"e c #ffffff",
-/* pixels */
-"bccccccccccccccccccccccccccccccccc",
-"bbccccccccccccccccccccccccccccccca",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeedddddddddddddddddddddddaa",
-"bbeeeeeed.......................aa",
-"bbeeeeed........................aa",
-"bbeeeeed........................aa",
-"bbeeeeed...ddddddddddddddddddd..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...d.................d..aa",
-"bbeeeeed...ddddddddddddddddddd..aa",
-"bbeeeeed........................aa",
-"bbeeeeed.......................eaa",
-"bb###############################a",
-"b#################################"
-};
-
-/* XPM */
-static const char *complement_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34        9            1",
-/* colors */
-". c #000000",
-"# c #b4b4b4",
-"a c #c0c0c0",
-"b c #d9d9d9",
-"c c #e6e6e6",
-"d c #fe0000",
-"e c #fe5555",
-"f c #feaaaa",
-"g c #ffffff",
-/* pixels */
-"bccccccccccccccccccccccccccccccccc",
-"bbccccccccccccccccccccccccccccccca",
-"bb..............................aa",
-"bb..............................aa",
-"bb..............................aa",
-"bb..............................aa",
-"bb..............................aa",
-"bb.......fffffffffffffffffffffffaa",
-"bb......feeeeeeeeeeeeeeeeeeeeeeeaa",
-"bb.....fedddddddddddddddddddddddaa",
-"bb.....fedeeeeeeeeeeeeeeeeeeeeedaa",
-"bb.....fedefffffffffffffffffffedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefgggggggggggggggggfedaa",
-"bb.....fedefffffffffffffffffffedaa",
-"bb.....fedeeeeeeeeeeeeeeeeeeeeedaa",
-"bb.....feddddddddddddddddddddddgaa",
-"bb###############################a",
-"b#################################"
-};
-
-/* XPM */
-static const char *boundary_xpm[] = {
-/* width height num_colors chars_per_pixel */
-"    34    34        7            1",
-/* colors */
-". c #000000",
-"# c #b4b4b4",
-"a c #c0c0c0",
-"b c #d9d9d9",
-"c c #e6e6e6",
-"d c #feaaaa",
-"e c #ffffff",
-/* pixels */
-"bccccccccccccccccccccccccccccccccc",
-"bbccccccccccccccccccccccccccccccca",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa",
-"bbeeeeeeedddddddddddddddddddddddaa",
-"bbeeeeeed.......................aa",
-"bbeeeeed........................aa",
-"bbeeeeed........................aa",
-"bbeeeeed...ddddddddddddddddddd..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...deeeeeeeeeeeeeeeeed..aa",
-"bbeeeeed...ddddddddddddddddddd..aa",
-"bbeeeeed........................aa",
-"bbeeeeed.......................eaa",
-"bb###############################a",
-"b#################################"
-};
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newclosed.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newclosed.pcx
deleted file mode 100644
index bfa2808..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newclosed.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newopen.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newopen.pcx
deleted file mode 100644
index ee0d8fd..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newopen.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newpoly.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newpoly.pcx
deleted file mode 100644
index bfa2808..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/newpoly.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.pcx b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.pcx
deleted file mode 100644
index c8ef92d..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.pcx and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.xpm b/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.xpm
deleted file mode 100644
index 386507e..0000000
Binary files a/3rdparty/CGAL-4.6/demo/Nef_2/xpms/union.xpm and /dev/null differ
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Nef_3/CMakeLists.txt
deleted file mode 100644
index 8dbb857..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/CMakeLists.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project (Nef_3_Demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3)
-include(${CGAL_USE_FILE})
-
-find_package(Qt3-patched )
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-macro(create_single_source_cgal_qt3_program first )
-
-  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${first})
-    set( all ${CMAKE_CURRENT_SOURCE_DIR}/${first} )
-    
-    foreach( i ${ARGN} )
-      set( all ${all} ${CMAKE_CURRENT_SOURCE_DIR}/${i} ) 
-    endforeach()
-    
-    get_filename_component(exe_name ${first} NAME_WE)
-    
-    QT3_AUTOMOC( ${all} )
-    
-    # Make sure the compiler can find generated .moc files
-    include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-    include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
-    
-    include_directories( ${QT3_INCLUDE_DIR} )
-    
-    add_executable  (${exe_name} ${all})
-  
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
-    
-    # Link the executable to CGAL and third-party libraries
-    if ( CGAL_AUTO_LINK_ENABLED )    
-      target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} ${QT3_LIBRARIES} )
-    else()
-      target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT3_LIBRARIES})
-    endif()
-    
-  endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${first})
-  
-endmacro()
-
-if ( CGAL_FOUND AND QT3_FOUND AND CGAL_Qt3_FOUND )
-
-  include(Qt3Macros-patched)
-  include(CGAL_CreateSingleSourceCGALProgram)
-
-  include_directories (BEFORE include)
-
-  create_single_source_cgal_qt3_program( nef_3_extended.cpp    )
-  create_single_source_cgal_qt3_program( nef_3_filtered.cpp    )
-  create_single_source_cgal_qt3_program( nef_3_homogeneous.cpp )
-  create_single_source_cgal_qt3_program( visual_hull.cpp       )
-  create_single_source_cgal_qt3_program( visualization_SM.cpp  )
-  create_single_source_cgal_qt3_program( visualization_SNC.cpp )
-
-else( CGAL_FOUND AND QT3_FOUND AND CGAL_Qt3_FOUND )
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif( CGAL_FOUND AND QT3_FOUND AND CGAL_Qt3_FOUND )
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/README b/3rdparty/CGAL-4.6/demo/Nef_3/README
deleted file mode 100644
index 638b69c..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/README
+++ /dev/null
@@ -1,62 +0,0 @@
-demo/Nef_3/README
-=================
-
-The visualization of these demo programs only work with QT and OpenGL. 
-If you have Qt and OpenGL install, but GL.h and GLU.h are not found,
-see http://doc.trolltech.com/3.3/opengl.html.
-
-nef_3:  This program maintains a stack of Nef_3 polyhedra and accepts
-------  a little language to manipulate this stack, load files, apply
-        boolean operations, save files, etc.
-
-visualization_SM: This program shows how to display the sphere map of 
-----------------  a vertex in an Nef_polyhedron_3. The program expects
-                  a 3D Nef polyherdon from standard in. For example
-		  call ./visualization_SM < visualization_SM.cin
-
-
-visualization_SNC: This program shows how to display Nef_polyhedron_3. 
------------------  The program expects a 3D Nef polyhedron from
-		   standard in. For example call
-		   ./visualization_SNC < visualization_SNC.cin
-
-visual_hull: This program computes the visual hull of a 3D Object
------------  photographed by several cameras. Each camera returns
-             one polygon that resembles the shape of the 3D Object
-             from the camperas point of view. The visual hull is
-             an approximation of the original 3D Object. From a
-             camara photos, we compute a cone that tightly covers
-             all 3D Objects that could have caused the photographed
-             shape. The intersection of all cones is the visual hull.
-
-             File format .vsh (no comments allowed):
-             ---------------------------------------
-	     <point>         \\ minimum and maximum coordinates of 
-             <point>         \\ some box enclosing the 3D object.
-             int             \\ number of cameras.
-	     <camera>*       \\ position and photo of cameras
-
-	     camera
-             ------
-             <point>         \\ position of camera.
-	     int             \\ number of facet cycles of photo shape
-	     <facet cycle>*  \\ cycle data of facet cycles
-
-             facet cycle (first one is outer cycle, others bound holes)
-             -----------
-             int             \\ number of points in the cycle.
-             <point>         \\ points of facet cycle 
-                             \\ (must lie in common plane)
-
-             point
-             -----
-             double double double  \\ coordinates of point
-
-
-cube.off, 
-visualization_SNC.cin,
-visualization_SM.cin:   example input file
---------
-
-mpi.vsh: example input file for visual_hull. 
-------   Call:  visual_hull mpi.vsh
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/cube.off b/3rdparty/CGAL-4.6/demo/Nef_3/cube.off
deleted file mode 100644
index 1d33393..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/cube.off
+++ /dev/null
@@ -1,18 +0,0 @@
-OFF
-8 6 0
-# vertices
- -1 -1  1
- -1  1  1
-  1  1  1
-  1 -1  1
- -1 -1 -1
- -1  1 -1
-  1  1 -1
-  1 -1 -1
-# facets
-  4  3 2 1 0
-  4  0 1 5 4
-  4  6 5 1 2
-  4  3 7 6 2
-  4  4 7 3 0
-  4  4 5 6 7
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h b/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h
deleted file mode 100644
index d34c5a9..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h
+++ /dev/null
@@ -1,601 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner
-//                 Peter Hachenberger
-//
-// Demo program maintaining a stack of Nef polyhedra in the space and
-// a manipulation language for stack ops, file loading and saving, etc.
-// ============================================================================
-
-#ifndef CGAL_NEF_DEMO_STACK_H
-#define CGAL_NEF_DEMO_STACK_H
-
-#include <CGAL/rational_rotation.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Nef_polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
-#include <CGAL/Nef_3/SNC_items.h>
-
-#ifdef CGAL_NEF3_OLD_VISUALIZATION
-
-#else
-#include <CGAL/IO/Qt_widget_Nef_3.h>
-#include <qapplication.h>
-#endif
-
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <cstring>
-#include <cmath>
-#include <cstddef>
-
-using std::cout;
-using std::cerr;
-using std::endl;
-using std::strcmp;
-using std::exit;
-
-namespace CGAL {
-
-template<typename Kernel>
-class demo_stack {
-
-  typedef typename Kernel::RT                    NT;
-  typedef CGAL::Polyhedron_3<Kernel>             Polyhedron;
-  typedef CGAL::Nef_polyhedron_3<Kernel>         Nef_polyhedron;
-  typedef std::vector< Nef_polyhedron>           Nef_vector;
-  typedef typename Nef_vector::iterator          Iterator;
-  typedef typename Nef_polyhedron::Items         Items;
-
-  Nef_vector nef;  // contains stack of Nef_polyhedron
-
-public:
-  void help_message( std::ostream& out) {
-      out << "Usage: nef_3 [<Options>] <Command> [<Command> ...]\n"
-          "Options:\n"
-          "    -h/-help    this message\n"
-          "Command: all commands work on the top of a stack of Nef polyhedra:\n"
-          "    h/help/?               this message\n"
-          "    pop                    removes top from stack.\n"
-          "    dup                    duplicates top of stack.\n"
-          "    dupn <n>               duplicates <n>-th element (top = 1st element).\n"
-          "    swap                   swaps top two elements on stack.\n"
-          "    swapn <n>              swaps <n>-th element with top (top = 1st element).\n"
-          "    clear                  clears stack\n"
-          "    size                   prints stack and top polyhedron size to stdout.\n"
-          "    bytes                  prints the number of bytes used by top.\n"
-          "    simple                 tests if top is convertible to Polyhedron_2.\n"
-          "    valid                  tests if the data structure of top is valid.\n"
-          "    plane <a> <b> <c> <d>  creates a halfspace bounded by the plane ax+by+cz+d=0.\n"
-          "    loadnef3 <filename>    loads nef3 file and pushes it on stack.\n"
-          "    loadoff <filename>     loads file in OFF format and pushes it on stack.\n"
-          "    saveoff <filename>     saves top in OFF format if top is simple.\n"
-          "    dump                   dump Ascii description of top to stderr.\n"
-          // "    sorted                 dump standard Ascii description of top to stderr. \n"
-          "    vis                    visualize it in OpenGL if available\n"
-          "The following commands take their arguments from the stack, where the\n"
-          "top of the stack is the first argument. They remove those arguments from\n"
-          "the stack and push the result onto the stack.\n"
-          "    trans <x> <y> <z> <w>  translate top with homogeneous vector (x,y,z,w).\n"
-          "    scale <s> <w>          scale top with rational scale factor (s/w).\n"
-          "    rotx <double>          rotate (approx) <double> degrees around x-axis.\n"
-          "    roty <double>          rotate (approx) <double> degrees around y-axis.\n"
-          "    rotz <double>          rotate (approx) <double> degrees around z-axis.\n"
-          "    inters                 intersection of two polyhedra.\n"
-          "    union                  union of two polyhedra.\n"
-          "    diff                   top polyhedron minus the second polyhedron.\n"
-          "    symdiff                symmetric difference of two polyhedra.\n"
-          "    compl                  complement of top polyhedron.\n"
-          "    int                    interior of top polyhedron.\n"
-          "    clos                   closure of top polyhedron.\n"
-          "    bnd                    boundary of top polyhedron.\n"
-          "    reg                    regularization of top polyhedron.\n" << endl;
-  }
-
-  // assert that there are at least n arguments left for the command
-  bool assert_argc( const char* command, int n, int arg_left) {
-    if ( n > arg_left) {
-        cerr << "Error: command '" << command << "' needs " << n
-             << " arguments." << endl;
-        return false;
-    }
-    return true;
-  }
-
-public:
-  // evaluate the commands (and arguments) in argv[0..argc-1].
-  // returns 0 if all is o.k., and != 0 otherwise.
-  int eval( int argc, char* argv[]) {
-    CGAL::Timer t;
-    int error = 0;
-    for ( int i = 0; error == 0 && i < argc; ++i) {
-        if ( strcmp( argv[i], "h") == 0 || strcmp( argv[i], "help") == 0
-            || strcmp( argv[i], "?") == 0) {
-            help_message( cerr);
-        } else if ( strcmp( argv[i], "pop") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            nef.pop_back();
-        } else if ( strcmp( argv[i], "dup") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            nef.push_back( nef.back());
-        } else if ( strcmp( argv[i], "dupn") == 0) {
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                int k = std::atoi( argv[i+1]);
-                if ( k > 0 && (size_t)k <= nef.size())
-                    nef.push_back( nef[ nef.size() - k]);
-                else {
-                    cerr << "Error: 'dupn' argument out of range." << endl;
-                    error = 2;
-                }
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "swap") == 0) {
-            if ( nef.size() < 2) {
-                cerr << "Error: '" << argv[i] << "': less than 2 elements on "
-                        "stack." << endl;
-                error = 2;
-                continue;
-            }
-            Iterator ni = nef.end();
-            std::swap( ni[-1], ni[-2]);
-        } else if ( strcmp( argv[i], "swapn") == 0) {
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                int k = std::atoi( argv[i+1]);
-                if ( k > 0 && (size_t)k <= nef.size()) {
-                    Iterator ni = nef.end();
-                    std::swap( ni[-1], ni[-k]);
-                } else {
-                    cerr << "Error: 'swapn' argument out of range." << endl;
-                    error = 2;
-                }
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "clear") == 0) {
-            nef.clear();
-	} else if ( strcmp( argv[i], "size") == 0) {
-	  cout << "Size of stack = " << nef.size() << endl;
-	  Nef_polyhedron exp = nef.back();
-	  cout << "Top: Number of vertices = " << exp.number_of_vertices()
-	       << endl;
-	  cout << "Top: Number of edges    = " << exp.number_of_edges()
-	       << endl;
-	  cout << "Top: Number of facets   = " << exp.number_of_facets()
-	       << endl;
-	  cout << "Top: Number of volumes  = " << exp.number_of_volumes()
-	       << endl;
-	} else if ( strcmp( argv[i], "bytes") == 0) {
-	  if ( nef.size() == 0) {
-	    cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-	    error = 2;
-	    continue;
-	  }
-	  cout << "Top uses " << nef.back().bytes() << " bytes" << std::endl; 
-	} else if ( strcmp( argv[i], "bytes_reduced") == 0) {
-	  if ( nef.size() == 0) {
-	    cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-	    error = 2;
-	    continue;
-	  }
-	  cout << "Reduced Version of top uses " << nef.back().bytes_reduced() << " bytes" << std::endl; 
-        } else if ( strcmp( argv[i], "simple") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( nef.back().is_simple())
-                cout << "Top of stack is simple." << endl;
-            else
-                cout << "Top of stack is _not_ simple." << endl;
-        } else if ( strcmp( argv[i], "valid") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-	    if ( assert_argc( argv[i], 2, argc - i - 1)) {
-	      bool verb( std::atoi( argv[i+1]));
-	      int level( std::atoi( argv[i+2]));
-	      if ( nef.back().is_valid(verb, level))
-                cout << "Top of stack is valid." << endl;
-	      else
-                cout << "Top of stack is _NOT_ valid." << endl;
-	      i += 2;
-	    } else {
-	      error = 4;
-	    }
-        } else if ( strcmp( argv[i], "loadnef3") == 0) {
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-	      std::ifstream in(argv[i+1]);
-	      if ( ! in) {
-		cerr << "Error: loadnef3 cannot open file '" << argv[i+1]
-		     << "'." << endl;
-		error = 5;
-	      } else {	     
-		Nef_polyhedron nf;
-		in >> nf;
-		if ( ! in) {
-		  cerr << "Error: loadnef3 cannot read nef3 file '" 
-		       << argv[i+1] << "' correctly." << endl;
-		  error = 5;
-		} else {
-		  nef.push_back( nf);
-		  ++i;
-		}
-	      }
-            } else {
-	      error = 4;
-            }
-        } else if ( strcmp( argv[i], "loadoff") == 0) {
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                std::ifstream in( argv[i+1]);
-                if ( ! in) {
-                    cerr << "Error: loadoff cannot open file '" << argv[i+1]
-                         << "'." << endl;
-                    error = 5;
-                } else {
-                    Polyhedron poly;
-                    in >> poly;
-                    if ( ! in) {
-                        cerr << "Error: loadoff cannot read OFF file '" 
-                             << argv[i+1] << "' correctly." << endl;
-                        error = 5;
-                    } else {
-		        Nef_polyhedron nf(poly);
-		        nef.push_back( nf);
-                    }
-                }
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "saveoff") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                if ( ! nef.back().is_simple()) {
-                    cerr << "Error: saveoff file '" << argv[i+1]
-                         << "': top is not simple." << endl;
-                    error = 6;
-                    continue;
-                }
-                std::ofstream out( argv[i+1]);
-                if ( ! out) {
-                    cerr << "Error: saveoff cannot create file '"
-                         << argv[i+1] << "'." << endl;
-                    error = 5;
-                } else {
-                    Polyhedron poly;
-                    nef.back().convert_to_Polyhedron(poly);
-                    out << poly;
-                    if ( ! out) {
-                        cerr << "Error: saveoff cannot write OFF file '" 
-                             << argv[i+1] << "' correctly." << endl;
-                        error = 5;
-                    }
-                }
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "dump") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-	    std::cout << nef.back();
-	    /*
-        } else if ( strcmp( argv[i], "sorted") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            nef.back().dump(true, std::cout);
-	    */
-	} else if ( strcmp( argv[i], "stats") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }	  
-	    std::cout << "Number of Vertices " << nef.back().number_of_vertices() << std::endl;
-	    std::cout << "Number of Facets " << nef.back().number_of_facets() << std::endl;
-        } else if ( strcmp( argv[i], "vis") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-#ifdef CGAL_NEF3_OLD_VISUALIZATION
-	    nef.back().visualize();
-#else
-	    QApplication a(argc, argv);
-	    CGAL::Qt_widget_Nef_3<Nef_polyhedron>* w = 
-	      new CGAL::Qt_widget_Nef_3<Nef_polyhedron>(nef.back());
-	    a.setMainWidget(w);
-	    w->show();
-	    a.exec();
-#endif
-        } else if ( strcmp( argv[i], "trans") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 4, argc - i - 1)) {
-                NT x( std::atoi( argv[i+1]));
-                NT y( std::atoi( argv[i+2]));
-                NT z( std::atoi( argv[i+3]));
-                NT w( std::atoi( argv[i+4]));
-		if(w == 0)
-		  error = 4;
-		else {
-                  typename Kernel::Vector_3 vec( x, y, z, w);
-		  typename Kernel::Aff_transformation_3 aff( CGAL::TRANSLATION, vec);
-		  nef.back().transform( aff);
-		  i += 4;
-		}
-            } else {
-                error = 4;
-            }
-	   
-        } else if ( strcmp( argv[i], "scale") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 2, argc - i - 1)) {
-                NT s( std::atoi( argv[i+1]));
-                NT w( std::atoi( argv[i+2]));
-                typename Kernel::Aff_transformation_3 aff( CGAL::SCALING, s, w);
-                nef.back().transform( aff);
-                i += 2;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "rotx") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                double alpha = CGAL_PI * std::atof( argv[i+1]) / 180.0;
-                NT diry = std::sin( alpha) * 256*256*256;
-                NT dirx = std::cos( alpha) * 256*256*256;
-                NT sin_alpha;
-                NT cos_alpha;
-                NT w;
-                CGAL::rational_rotation_approximation( dirx, diry, 
-						       sin_alpha, cos_alpha, w,
-						       NT(1), NT( 1000000));
-                typename Kernel::Aff_transformation_3 aff( w, NT(0), NT(0),
-                                                  NT(0), cos_alpha,-sin_alpha,
-                                                  NT(0), sin_alpha, cos_alpha,
-                                                  w);
-                nef.back().transform( aff);
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "roty") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                double alpha = CGAL_PI * std::atof( argv[i+1]) / 180.0;
-                NT diry = std::sin( alpha) * 256*256*256;
-                NT dirx = std::cos( alpha) * 256*256*256;
-                NT sin_alpha;
-                NT cos_alpha;
-                NT w;
-                CGAL::rational_rotation_approximation( dirx, diry, 
-						       sin_alpha, cos_alpha, w,
-						       NT(1), NT( 1000000));
-                typename Kernel::Aff_transformation_3 aff( cos_alpha, NT(0), sin_alpha,
-                                                  NT(0), w, NT(0),
-                                                  -sin_alpha, NT(0), cos_alpha,
-                                                  w);
-                nef.back().transform( aff);
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "rotz") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            if ( assert_argc( argv[i], 1, argc - i - 1)) {
-                double alpha = CGAL_PI * std::atof( argv[i+1]) / 180.0;
-                NT diry = std::sin( alpha) * 256*256*256;
-                NT dirx = std::cos( alpha) * 256*256*256;
-                NT sin_alpha;
-                NT cos_alpha;
-                NT w;
-                CGAL::rational_rotation_approximation( dirx, diry, 
-						       sin_alpha, cos_alpha, w,
-						       NT(1), NT( 1000000));
-                typename Kernel::Aff_transformation_3 aff( cos_alpha,-sin_alpha, NT(0),
-                                                  sin_alpha, cos_alpha, NT(0),
-                                                  NT(0), NT(0), w,
-                                                  w);
-                nef.back().transform( aff);
-                ++i;
-            } else {
-                error = 4;
-            }
-        } else if ( strcmp( argv[i], "inters") == 0) {
-            if ( nef.size() < 2) {
-                cerr << "Error: '" << argv[i] << "': less than 2 elements on "
-                        "stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf2 = nef.back();
-            nef.pop_back();
-	    Nef_polyhedron nf = nf1.intersection( nf2);
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "union") == 0) {
-            if ( nef.size() < 2) {
-                cerr << "Error: '" << argv[i] << "': less than 2 elements on "
-                        "stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf2 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.join( nf2);
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "diff") == 0) {
-            if ( nef.size() < 2) {
-                cerr << "Error: '" << argv[i] << "': less than 2 elements on "
-                        "stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf2 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.difference( nf2);
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "symdiff") == 0) {
-            if ( nef.size() < 2) {
-                cerr << "Error: '" << argv[i] << "': less than 2 elements on "
-                        "stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf2 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.symmetric_difference( nf2);
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "compl") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.complement();
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "int") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.interior();
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "clos") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.closure();
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "bnd") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.boundary();
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "reg") == 0) {
-            if ( nef.size() == 0) {
-                cerr << "Error: '" << argv[i] << "' on empty stack." << endl;
-                error = 2;
-                continue;
-            }
-            Nef_polyhedron nf1 = nef.back();
-            nef.pop_back();
-            Nef_polyhedron nf = nf1.regularization();
-            nef.push_back( nf);
-        } else if ( strcmp( argv[i], "plane") == 0) {
-	  if ( assert_argc( argv[i], 4, argc - i - 1)) {
-	    NT a( std::atoi( argv[i+1]));
-	    NT b( std::atoi( argv[i+2]));
-	    NT c( std::atoi( argv[i+3]));
-	    NT d( std::atoi( argv[i+4]));
-	    typename Kernel::Plane_3 pl( a, b, c, d);
-	    Nef_polyhedron nf(pl);
-	    nef.push_back( nf);
-	    i += 4; 
-	  } else 
-	    error = 4;
-	} else if ( strcmp( argv[i], "start") == 0) {
-	  t.start();
-	} else if ( strcmp( argv[i], "stop") == 0) {
-	  t.stop();
-	} else if ( strcmp( argv[i], "time") == 0) {
-	  std::cerr << "Time " << t.time() << std::endl;
-	} else if ( strcmp( argv[i], "time") == 0) {
-	  t.reset();
-	} else {
-	    cerr << "Error: unkown command '" << argv[i]
-	         << "'. Try 'help' for help." << endl;
-	    error = 3;
-        }
-    }
-    return error;
-  }
-};
-
-} //namespace CGAL
-
-#endif // CGAL_NEF_DEMO_STACK_H
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h b/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h
deleted file mode 100644
index 8e870b6..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h
+++ /dev/null
@@ -1,295 +0,0 @@
-#ifndef CGAL_NEF_VISUAL_HULL_CREATOR_H
-#define CGAL_NEF_VISUAL_HULL_CREATOR_H
-
-#include <CGAL/Object.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
-#include <CGAL/Modifier_base.h>
-
-namespace CGAL {
-
-template <typename SNC_>
-class visual_hull_creator : public CGAL::Modifier_base<SNC_> {
-
-  typedef SNC_  SNC_structure;
-  typedef typename SNC_structure::Kernel Kernel;
-  typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
-  typedef CGAL::SNC_decorator<SNC_structure> SNC_decorator;
-  typedef SNC_decorator Base;
-  typedef typename SNC_decorator::SNC_constructor SNC_constructor;
-  typedef typename SNC_structure::SM_decorator SM_decorator;
-
-  typedef typename SNC_structure::Vertex_handle Vertex_handle;
-  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
-  typedef typename SNC_structure::SVertex_iterator SVertex_iterator;
-  typedef typename SNC_structure::SHalfedge_around_sface_circulator
-    SHalfedge_around_sface_circulator;
-  typedef typename SNC_structure::Point_3 Point_3;
-  typedef typename SNC_structure::Plane_3 Plane_3;
-  typedef typename SNC_structure::Vector_3 Vector_3;
-  typedef typename SNC_structure::Ray_3 Ray_3;
-  typedef typename SNC_structure::Sphere_point Sphere_point;
-
-  Point_3 room_min, room_max;
-  Point_3 c_pos;
-  Vertex_handle camera;
-  Plane_3 cut;
-  SNC_structure* sncp;
-  std::list<std::list<Point_3> > polygon_list;
-  int vbase;
-  int voffset;
-  int ebase;
-  int eoffset;
-
- private:
-  Plane_3 find_cutoff_plane() {
-
-    bool compute_halfsphere[3][2];
-    for(int i=0; i<6; i++)
-      compute_halfsphere[i/2][i%2] = false;
-
-    SVertex_iterator sv;
-    SM_decorator SD(&*camera);
-    CGAL_forall_svertices(sv,SD) {
-      if(!compute_halfsphere[0][0])
-	if(sv->point().hx()>0)
-	  compute_halfsphere[0][0] = true;
-      if(!compute_halfsphere[0][1])
-	if(sv->point().hx()<0)
-	  compute_halfsphere[0][1] = true;
-      if(!compute_halfsphere[1][0])
-	if(sv->point().hy()>0)
-	  compute_halfsphere[1][0] = true;
-      if(!compute_halfsphere[1][1])
-	if(sv->point().hy()<0)
-	  compute_halfsphere[1][1] = true;
-      if(!compute_halfsphere[2][0])
-	if(sv->point().hz()>0)
-	  compute_halfsphere[2][0] = true;
-      if(!compute_halfsphere[2][1])
-	if(sv->point().hz()<0)
-	  compute_halfsphere[2][1] = true;
-    }
-
-    if(!compute_halfsphere[0][1])
-      return Plane_3(Point_3(room_max.hx(),0,0,room_max.hw()),Vector_3(1,0,0));
-    if(!compute_halfsphere[0][0])
-      return Plane_3(Point_3(room_min.hx(),0,0,room_min.hw()),Vector_3(-1,0,0));
-    if(!compute_halfsphere[1][1])
-      return Plane_3(Point_3(0,room_max.hy(),0,room_max.hw()),Vector_3(0,1,0));
-    if(!compute_halfsphere[1][0])
-      return Plane_3(Point_3(0,room_min.hy(),0,room_min.hw()),Vector_3(0,-1,0));
-    if(!compute_halfsphere[2][1])
-      return Plane_3(Point_3(0,0,room_max.hz(),room_max.hw()),Vector_3(0,0,1));
-    if(!compute_halfsphere[2][0])
-      return Plane_3(Point_3(0,0,room_min.hz(),room_min.hw()),Vector_3(0,0,-1));
-
-    CGAL_error_msg("wrong sphere map");
-    return Plane_3();
-  }
-
-  void add_camera_indexes(SHalfedge_handle se) {
-    SHalfedge_around_sface_circulator sfc(se), send(sfc);
-    CGAL_For_all(sfc, send) {
-      sfc->source()->set_index(vbase+voffset);
-      ++voffset;
-      sfc->set_index(ebase+eoffset);  
-      sfc->twin()->set_index(ebase+eoffset+1);
-      eoffset+=2;
-    }
-  }
-
-  template<typename Distance>
-  void add_opposite_indexes(SHalfedge_handle se,
-			    Distance spoints, bool outer) {
-    SHalfedge_around_sface_circulator sfc(se);
-    if(spoints > 0) {      
-      sfc->source()->set_index(vbase+voffset+spoints-1);
-      --voffset;
-    } else
-      sfc->source()->set_index(vbase+voffset);
-    if(outer) {
-      sfc->set_index(ebase+eoffset);
-      sfc->twin()->set_index(ebase+eoffset+1);
-    } else {
-      sfc->set_index(ebase+eoffset+1);
-      sfc->twin()->set_index(ebase+eoffset);      
-    }
-    --sfc;
-    sfc->source()->set_index(vbase);
-    if(spoints > 0) {
-      sfc->set_index(ebase+2*spoints-2);
-      sfc->twin()->set_index(ebase+2*spoints-1);      
-    } else {
-      sfc->set_index(ebase);
-      sfc->twin()->set_index(ebase+1);
-      ebase+=2;
-      eoffset-=2;
-    }
-    --sfc;
-    ++vbase;
-    sfc->source()->set_index(vbase+voffset);
-    sfc->set_index(ebase);
-    sfc->twin()->set_index(ebase+1);
-  }
-
- public:
-  visual_hull_creator(Point_3 min, Point_3 max, Point_3 position,
-		      std::list<std::list<Point_3> > p) :
-    room_min(min), room_max(max), 
-    c_pos(position), polygon_list(p),
-    vbase(Index_generator::get_unique_index()), 
-    voffset(0), ebase(vbase), eoffset(0) {}
-
-  void operator()(SNC_structure& snc) {
-
-    sncp = &snc;
-    snc.clear();
-
-    camera = sncp->new_vertex(c_pos);
-    camera->mark() = true;
-
-    typename std::list< std::list<Point_3> >::iterator li;
-    for(li=polygon_list.begin(); li!=polygon_list.end(); ++li)
-      if(li==polygon_list.begin()) {
-	add_outer_cycle_to_camera(li->begin(), li->end());
-      } else {
-	add_inner_cycle_to_camera(li->begin(), li->end());
-      }
-
-    for(li=polygon_list.begin(); li!=polygon_list.end(); ++li) {
-      if(li==polygon_list.begin()) {
-	create_outer_cycles_opposites(li->begin(), li->end());
-      } else {
-	create_inner_cycles_opposites(li->begin(), li->end());
-      }
-      ++voffset;
-      ebase+=2;
-      eoffset-=2;
-    }
-
-    while(Index_generator::get_unique_index() < ebase + 2);
-  }
-
-  template<typename Forward_iterator>
-  void add_outer_cycle_to_camera(Forward_iterator begin, Forward_iterator end) {
-
-    SNC_constructor C(*sncp);
-    std::list<Sphere_point> spoints;
-
-    Forward_iterator si, si_prev, si_next;
-    for(si=begin;si!=end;++si) {
-      spoints.push_back(Sphere_point(*si-camera->point()));
-    }
-
-    SHalfedge_handle se = 
-      C.add_outer_sedge_cycle(camera, spoints.begin(), spoints.end(), false);
-    add_camera_indexes(se);
-  }
-
-  template<typename Forward_iterator>
-  void create_outer_cycles_opposites(Forward_iterator begin, Forward_iterator end) {
-
-    SNC_constructor C(*sncp);
-    std::list<Sphere_point> spoints;
-
-    cut = find_cutoff_plane();
-    std::list<Point_3> points_on_plane;
-    Forward_iterator pi;
-    for(pi=begin;pi!=end;++pi) {
-      Ray_3 r(camera->point(), *pi-camera->point());
-      CGAL::Object io=CGAL::intersection(r,cut);
-      Point_3 ip;
-      assign(ip,io);
-      points_on_plane.push_back(ip);
-    }
-
-    typename std::list<Point_3>::iterator si,si_next,si_prev;
-    si_next = points_on_plane.begin();
-    si_prev = points_on_plane.end();
-    --si_prev;
-    for(si=points_on_plane.begin();si!=points_on_plane.end();++si) {
-      ++si_next;
-      if(si_next==points_on_plane.end()) si_next=points_on_plane.begin();
-      spoints.clear();
-      spoints.push_back(*si_prev-*si);
-      spoints.push_back(*si_next-*si);
-      spoints.push_back(camera->point()-*si);
-      bool orient(CGAL::orientation(*si_prev,
-				    *si,
-				    *si_next,camera->point()) == CGAL::POSITIVE);
-      SHalfedge_handle se = 
-	C.add_outer_sedge_cycle(sncp->new_vertex(*si),spoints.begin(), spoints.end(), orient);
-      if(si == points_on_plane.begin())
-	add_opposite_indexes(se, points_on_plane.size(), true);
-      else
-	add_opposite_indexes(se, 0, true);
-      ++si_prev;
-      if(si_prev==points_on_plane.end()) si_prev=points_on_plane.begin();
-    }
-  }
-
-  template<typename Forward_iterator>
-    void add_inner_cycle_to_camera(Forward_iterator begin, Forward_iterator end) {
-
-    SNC_constructor C(*sncp);
-    std::list<Sphere_point> spoints;
-
-    Forward_iterator si, si_prev, si_next;
-    for(si=begin;si!=end;++si) {
-      spoints.push_back(Sphere_point(*si-camera->point()));
-    }
-
-    SHalfedge_handle se =
-      C.add_inner_sedge_cycle(camera, spoints.begin(), spoints.end(),false,true);
-    add_camera_indexes(se);
-  }
-
-  template<typename Forward_iterator>
-    void create_inner_cycles_opposites(Forward_iterator begin, Forward_iterator end) {
-
-    SNC_constructor C(*sncp);
-    std::list<Sphere_point> spoints;
-
-    std::list<Point_3> points_on_plane;
-
-    Forward_iterator pi;
-    for(pi=begin;pi!=end;++pi) {
-      Ray_3 r(camera->point(), *pi-camera->point());
-      CGAL::Object io=CGAL::intersection(r,cut);
-      Point_3 ip;
-      assign(ip,io);
-      points_on_plane.push_back(ip);
-    }
-
-    typename std::list<Point_3>::iterator si,si_next,si_prev;
-    si_next = points_on_plane.begin();
-    si_prev = points_on_plane.end();
-    --si_prev;
-    for(si=points_on_plane.begin();si!=points_on_plane.end();++si) {
-      ++si_next;
-      if(si_next==points_on_plane.end()) si_next=points_on_plane.begin();
-      spoints.clear();
-      spoints.push_back(*si_prev-*si);
-      spoints.push_back(*si_next-*si);
-      spoints.push_back(camera->point()-*si);
-      bool orient(CGAL::orientation(*si_prev,
-				    *si,
-				    *si_next,camera->point()) == CGAL::NEGATIVE);
-
-      SHalfedge_handle se =
-	C.add_inner_sedge_cycle(sncp->new_vertex(*si),spoints.begin(), spoints.end(),orient,false);
-      if(si == points_on_plane.begin())
-	add_opposite_indexes(se, points_on_plane.size(), false);
-      else
-	add_opposite_indexes(se, 0, false);
-      ++si_prev;
-      if(si_prev==points_on_plane.end()) si_prev=points_on_plane.begin();
-    }
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_NEF_VISUAL_HULL_CREATOR_H
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/mpi.vsh b/3rdparty/CGAL-4.6/demo/Nef_3/mpi.vsh
deleted file mode 100644
index 4ec8940..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/mpi.vsh
+++ /dev/null
@@ -1,48 +0,0 @@
--100 -100 -100 
-100 100 100
-3
-5000 0 0
-1
-12
-10 -10 -10
-10 -6 -10
-10 -6 5
-10 0 -2
-10 6 5
-10 6 -10
-10 10 -10
-10 10 10
-10 6 10
-10 0 3
-10 -6 10
-10 -10 10
-0 0 5000
-2
-6
--10 -10 10
--10 10 10
-10 10 10
-10 -2 10
--6 -2 10
--6 -10 10
-4
--6 2 10
--6 6 10
-6 6 10
-6 2 10
-0 5000 0
-1
-12
--10 10 -10 
--6 10 -10
--6 10 -4
-6 10 -4
-6 10 -10
-10 10 -10
-10 10 10
-6 10 10
-6 10 4
--6 10 4
--6 10 10
--10 10 10
-
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_extended.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_extended.cpp
deleted file mode 100644
index df11549..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_extended.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner
-//                 Peter Hachenberger
-//
-// Demo program maintaining a stack of Nef polyhedra in the space and
-// a manipulation language for stack ops, file loading and saving, etc.
-// ============================================================================
-#include <CGAL/basic.h>
-
-#ifdef CGAL_USE_LEDA
-  #include <CGAL/leda_integer.h>
-  typedef leda_integer NT;
-#else
-  #include <CGAL/Gmpz.h>
-  typedef CGAL::Gmpz NT;
-#endif
-
-#include <CGAL/Extended_homogeneous.h>
-typedef CGAL::Extended_homogeneous<NT> Kernel;
-
-#include <CGAL/Nef_3/demo_stack.h>
-
-int main(  int argc, char* argv[]) {    
-
-  CGAL::demo_stack<Kernel> ds;
-  if ( argc < 2
-       || strcmp( argv[1], "-h") == 0
-       || strcmp( argv[1], "-help") == 0 )
-    {
-      ds.help_message( cerr);
-      exit(1);
-    }
-  CGAL::set_pretty_mode(std::cerr);
-  
-  return ds.eval( argc-1, argv+1);
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_filtered.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_filtered.cpp
deleted file mode 100644
index f8b7115..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_filtered.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner
-//                 Peter Hachenberger
-//
-// Demo program maintaining a stack of Nef polyhedra in the space and
-// a manipulation language for stack ops, file loading and saving, etc.
-// ============================================================================
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Nef_3/demo_stack.h>
-
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-
-int main(  int argc, char* argv[]) {    
- 
-  CGAL::demo_stack<Kernel> ds;
-  if ( argc < 2
-       || strcmp( argv[1], "-h") == 0
-       || strcmp( argv[1], "-help") == 0 )
-    {
-      ds.help_message( cerr);
-      exit(1);
-    }
-  CGAL::set_pretty_mode(std::cerr);
-  
-  return ds.eval( argc-1, argv+1);
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_homogeneous.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_homogeneous.cpp
deleted file mode 100644
index 87c0720..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/nef_3_homogeneous.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner
-//                 Peter Hachenberger
-//
-// Demo program maintaining a stack of Nef polyhedra in the space and
-// a manipulation language for stack ops, file loading and saving, etc.
-// ============================================================================
-#include <CGAL/basic.h>
-
-#ifdef CGAL_USE_LEDA
-  #include <CGAL/leda_integer.h>
-  typedef leda_integer NT;
-#else
-  #include <CGAL/Gmpz.h>
-  typedef CGAL::Gmpz NT;
-#endif
-
-#include <CGAL/Homogeneous.h>
-
-typedef CGAL::Homogeneous<NT> Kernel;
-
-#include <CGAL/Nef_3/demo_stack.h>
-
-int main(  int argc, char* argv[]) {    
-
-    CGAL::demo_stack<Kernel> ds;
-    if ( argc < 2
-         || strcmp( argv[1], "-h") == 0
-         || strcmp( argv[1], "-help") == 0 )
-    {
-        ds.help_message( cerr);
-        exit(1);
-    }
-    CGAL::set_pretty_mode(std::cerr);
-
-    return ds.eval( argc-1, argv+1);
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/visual_hull.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/visual_hull.cpp
deleted file mode 100644
index c3d5178..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/visual_hull.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Peter Hachenberger
-
-#include <CGAL/basic.h>
-#ifdef CGAL_VSH_FILTERED
-  #include <CGAL/Simple_cartesian.h>
-  #include <CGAL/Lazy_kernel.h>
-  #include <CGAL/Gmpq.h>
-#else
-  #ifdef CGAL_USE_LEDA
-    #include <CGAL/leda_integer.h>
-  #else
-    #include <CGAL/Gmpz.h>
-  #endif
-  #include <CGAL/Cartesian.h>
-  #include <CGAL/Homogeneous.h>
-  #include <CGAL/Quotient.h>
-  #include <CGAL/cartesian_homogeneous_conversion.h>
-#endif
-
-#include <CGAL/Nef_polyhedron_3.h>
-#include <CGAL/Nef_3/visual_hull_creator.h>
-#include <CGAL/Nef_nary_intersection_3.h>
-#include <CGAL/IO/Qt_widget_Nef_3.h>
-#include <qapplication.h>
-#include <fstream>
-#include <list>
-
-#ifdef CGAL_VSH_FILTERED
-  typedef CGAL::Simple_cartesian<CGAL::Gmpq> EKernel;
-  typedef CGAL::Lazy_kernel<EKernel> Kernel;
-#else
-  #ifdef CGAL_USE_LEDA
-    typedef leda_integer NT;
-  #else
-    typedef CGAL::Gmpz NT;
-  #endif
-  typedef CGAL::Quotient<NT> CNT;
-  typedef CGAL::Cartesian<CNT> CKernel;
-  typedef CGAL::Homogeneous<NT> Kernel;
-  typedef CKernel::FT FT;
-  typedef CKernel::Point_3 CPoint;
-#endif
-
-typedef Kernel::Point_3 Point_3;
-typedef Kernel::Plane_3 Plane_3;
-typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
-typedef CGAL::Nef_nary_intersection_3<Nef_polyhedron> NaryInt;
-
-#ifdef CGAL_VSH_FILTERED
-Point_3 read_point(std::ifstream& in) {
-  Point_3 p;
-  in >> p;
-  return p;
-}
-#else
-Point_3 read_point(std::ifstream& in) {
-  double x,y,z;
-  in >> x;
-  in >> y;
-  in >> z;
-  CPoint p(x,y,z);
-  return quotient_cartesian_to_homogeneous(p);
-}
-#endif
-
-int main(int argc, char* argv[]) {
-  // We've put the typedefs here as VC7 gives us an ICE if they are global typedefs
-  typedef Nef_polyhedron::SNC_structure SNC_structure;
-  typedef CGAL::visual_hull_creator<SNC_structure> VHC;
-
-  if(argc!=2) {
-    std::cerr << "Usage: visual_hull file" << std::endl;
-    std::cerr << "For more information read the README file" << std::endl;
-    return 1;
-  }
-
-  std::ifstream in(argv[1]);
-  
-  NaryInt ni;
-
-  CGAL::Timer t;
-
-  Point_3 room_min = read_point(in);
-  Point_3 room_max = read_point(in);
-
-  int ncameras;
-  in >> ncameras;
-  for(int cam=0; cam<ncameras; ++cam) {
-
-    Point_3 camera(read_point(in));
-
-    int npolygons;
-    in >> npolygons;
-
-    std::list<std::list<Point_3> > polygon_list;
-    for(int poly=0; poly<npolygons; ++poly) {
-
-      int npoints;
-      in >> npoints;
-
-      std::list<Point_3> input_points;
-      for(int pnt=0; pnt<npoints; ++pnt)
-	input_points.push_back(read_point(in));
-      polygon_list.push_back(input_points);
-    }
-
-    std::list<std::list<Point_3> >::iterator li;
-    for(li=polygon_list.begin(); li!=polygon_list.end(); ++li) {
-      std::list<Point_3>::iterator pi(li->begin()), pimin(pi), pi_next,pi_prev;
-      for(; pi!=li->end(); ++pi) {
-	if(CGAL::lexicographically_xyz_smaller(*pi,*pimin))
-	  pimin=pi;
-      }
-      pi_next=pi_prev=pimin;
-      ++pi_next;
-      if(pi_next==li->end()) pi_next=li->begin();
-      if(pi_prev==li->begin()) pi_prev=li->end();
-      --pi_prev;
-      if(CGAL::orientation(*pi_prev,*pimin,*pi_next,camera)
-	 == CGAL::POSITIVE)
-	li->reverse();
-    }
-
-    t.start();
-    Nef_polyhedron N;
-    VHC vhc(room_min, room_max, camera, polygon_list);
-    N.delegate(vhc,true);
-    CGAL_assertion(N.is_valid());
-    t.stop();
-    std::cerr << "create view " << t.time() << std::endl;
-    t.reset();
-    ni.add_polyhedron(N);
-  }
-
-  Nef_polyhedron result = ni.get_intersection();
-
-  QApplication a(argc,argv);
-  CGAL::Qt_widget_Nef_3<Nef_polyhedron>* w =
-    new CGAL::Qt_widget_Nef_3<Nef_polyhedron>(result);
-  a.setMainWidget(w);
-  w->show();
-  a.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cin b/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cin
deleted file mode 100644
index 78ddda1..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cin
+++ /dev/null
@@ -1,207 +0,0 @@
-Selective Nef Complex
-standard
-vertices   25
-halfedges  48
-facets     16
-volumes    2
-shalfedges 68
-shalfloops 2
-sfaces     36
-0 { 0 2, 0 5, 0 1, -2 | -3 -1 -1 1 } 1
-1 { 3 5, 6 11, 2 3, -2 | -3 -1 1 1 } 1
-2 { 6 8, 12 17, 4 5, -2 | -3 1 -1 1 } 1
-3 { 9 11, 18 23, 6 7, -2 | -3 1 1 1 } 1
-4 { -2 -2, -2 -2, 8 8, -2 | -2 0 0 1 } 0
-5 { 12 12, -2 -2, 9 9, -2 | -4 1 -1 2 } 0
-6 { 13 13, -2 -2, 10 10, -2 | -4 1 1 2 } 0
-7 { 14 15, 24 25, 11 11, -2 | -3 -1 -1 2 } 0
-8 { 16 17, 26 27, 12 12, -2 | -3 -1 1 2 } 0
-9 { 18 19, 28 29, 13 13, -2 | -3 1 -1 2 } 0
-10 { 20 21, 30 31, 14 14, -2 | -3 1 1 2 } 0
-11 { 22 24, 32 37, 15 16, -2 | -1 -1 -1 1 } 1
-12 { 25 27, 38 43, 17 18, -2 | -1 -1 1 1 } 1
-13 { 28 30, 44 49, 19 20, -2 | -1 1 -1 1 } 1
-14 { 31 33, 50 55, 21 22, -2 | -1 1 1 1 } 1
-15 { 34 35, 56 57, 23 23, -2 | 0 -1 -1 1 } 1
-16 { 36 37, 58 59, 24 24, -2 | 0 -1 1 1 } 1
-17 { 38 38, 60 61, 25 26, -2 | 0 0 -1 2 } 0
-18 { 39 39, 62 63, 27 28, -2 | 0 0 1 2 } 0
-19 { -2 -2, -2 -2, 29 30, 0 | 0 1 1 2 } 0
-20 { 40 41, 64 65, 31 31, -2 | 0 1 -1 1 } 1
-21 { 42 43, 66 67, 32 32, -2 | 0 1 1 1 } 1
-22 { 44 44, -2 -2, 33 33, -2 | 1 1 -1 1 } 1
-23 { 45 46, -2 -2, 34 34, -2 | 1 1 0 1 } 0
-24 { 47 47, -2 -2, 35 35, -2 | 1 1 1 1 } 1
-0 { 3, 0, 0 0 | 0 0 1 1 } 1
-1 { 6, 0, 0 1 | 0 1 0 1 } 1
-2 { 22, 0, 0 3 | 1 0 0 1 } 1
-3 { 0, 1, 0 6 | 0 0 -1 1 } 1
-4 { 9, 1, 0 7 | 0 1 0 1 } 1
-5 { 25, 1, 0 9 | 1 0 0 1 } 1
-6 { 1, 2, 0 12 | 0 -1 0 1 } 1
-7 { 10, 2, 0 13 | 0 0 1 1 } 1
-8 { 28, 2, 0 15 | 1 0 0 1 } 1
-9 { 4, 3, 0 18 | 0 -1 0 1 } 1
-10 { 7, 3, 0 19 | 0 0 -1 1 } 1
-11 { 31, 3, 0 21 | 1 0 0 1 } 1
-12 { 13, 5, 1 9 | 0 0 1 1 } 0
-13 { 12, 6, 1 10 | 0 0 -1 1 } 0
-14 { 16, 7, 0 24 | 0 0 1 1 } 0
-15 { 18, 7, 0 25 | 0 1 0 1 } 0
-16 { 14, 8, 0 26 | 0 0 -1 1 } 0
-17 { 20, 8, 0 27 | 0 1 0 1 } 0
-18 { 15, 9, 0 28 | 0 -1 0 1 } 0
-19 { 21, 9, 0 29 | 0 0 1 1 } 0
-20 { 17, 10, 0 30 | 0 -1 0 1 } 0
-21 { 19, 10, 0 31 | 0 0 -1 1 } 0
-22 { 2, 11, 0 32 | -1 0 0 1 } 1
-23 { 26, 11, 0 33 | 0 0 1 1 } 1
-24 { 29, 11, 0 35 | 0 1 0 1 } 1
-25 { 5, 12, 0 38 | -1 0 0 1 } 1
-26 { 23, 12, 0 39 | 0 0 -1 1 } 1
-27 { 32, 12, 0 41 | 0 1 0 1 } 1
-28 { 8, 13, 0 44 | -1 0 0 1 } 1
-29 { 24, 13, 0 45 | 0 -1 0 1 } 1
-30 { 33, 13, 0 47 | 0 0 1 1 } 1
-31 { 11, 14, 0 50 | -1 0 0 1 } 1
-32 { 27, 14, 0 51 | 0 -1 0 1 } 1
-33 { 30, 14, 0 53 | 0 0 -1 1 } 1
-34 { 36, 15, 0 56 | 0 0 1 1 } 1
-35 { 40, 15, 0 57 | 0 1 0 1 } 1
-36 { 34, 16, 0 58 | 0 0 -1 1 } 1
-37 { 42, 16, 0 59 | 0 1 0 1 } 1
-38 { 39, 17, 0 60 | 0 0 1 1 } 0
-39 { 38, 18, 0 63 | 0 0 -1 1 } 0
-40 { 35, 20, 0 64 | 0 -1 0 1 } 1
-41 { 43, 20, 0 65 | 0 0 1 1 } 1
-42 { 37, 21, 0 66 | 0 -1 0 1 } 1
-43 { 41, 21, 0 67 | 0 0 -1 1 } 1
-44 { 45, 22, 1 33 | 0 0 1 1 } 1
-45 { 44, 23, 1 34 | 0 0 -1 1 } 1
-46 { 47, 23, 1 34 | 0 0 1 1 } 1
-47 { 46, 24, 1 35 | 0 0 -1 1 } 1
-0 { 15, 25 , , 1 | -2 0 0 -3 } 0
-1 { 14, 1 , , 0 | -1 0 0 -3 } 1
-2 { 13, 37 , , 1 | -1 0 0 -1 } 1
-3 { 12, 2 , , 0 | 0 -1 0 -1 } 1
-4 { 11, 5 , , 0 | 0 0 -1 -1 } 1
-5 { 10, 10 , , 0 | 0 0 1 -1 } 1
-6 { 9, 17 , , 0 | 0 1 0 -1 } 1
-7 { 8, 57 61 , 0 , 0 | -1 0 0 0 } 1
-8 { 7, 56 60 , 1 , 0 | 1 0 0 0 } 1
-9 { 6, 16 , , 1 | 0 -1 0 1 } 1
-10 { 5, 11 , , 1 | 0 0 -1 1 } 1
-11 { 4, 4 , , 1 | 0 0 1 1 } 1
-12 { 3, 3 , , 1 | 0 1 0 1 } 1
-13 { 2, 36 , , 0 | 1 0 0 1 } 1
-14 { 1, 0 , , 1 | 1 0 0 3 } 1
-15 { 0, 24 , , 1 | 2 0 0 3 } 0
-0 { 0 23 33 } 0
-1 { 1 8 9 11 } 1
-0 { 1, 3, 4, 0, 0, 7, 12, 14 | -1 0 0 0 } 1
-1 { 0, 5, 2, 1, 1, 13, 6, 1 | 1 0 0 0 } 1
-2 { 3, 1, 5, 0, 1, 9, 32, 3 | 0 1 0 0 } 1
-3 { 2, 4, 0, 2, 0, 33, 8, 12 | 0 -1 0 0 } 1
-4 { 5, 0, 3, 1, 0, 15, 34, 11 | 0 0 -1 0 } 1
-5 { 4, 2, 1, 2, 1, 35, 14, 4 | 0 0 1 0 } 1
-6 { 7, 9, 10, 3, 3, 1, 18, 1 | 1 0 0 0 } 1
-7 { 6, 11, 8, 4, 2, 19, 0, 14 | -1 0 0 0 } 1
-8 { 9, 7, 11, 3, 2, 3, 38, 12 | 0 -1 0 0 } 1
-9 { 8, 10, 6, 5, 3, 39, 2, 3 | 0 1 0 0 } 1
-10 { 11, 6, 9, 4, 3, 21, 40, 5 | 0 0 -1 0 } 1
-11 { 10, 8, 7, 5, 2, 41, 20, 10 | 0 0 1 0 } 1
-12 { 13, 15, 16, 6, 4, 0, 19, 14 | -1 0 0 0 } 1
-13 { 12, 17, 14, 7, 5, 18, 1, 1 | 1 0 0 0 } 1
-14 { 15, 13, 17, 6, 5, 5, 44, 4 | 0 0 1 0 } 1
-15 { 14, 16, 12, 8, 4, 45, 4, 11 | 0 0 -1 0 } 1
-16 { 17, 12, 15, 7, 4, 23, 46, 9 | 0 1 0 0 } 1
-17 { 16, 14, 13, 8, 5, 47, 22, 6 | 0 -1 0 0 } 1
-18 { 19, 21, 22, 9, 7, 6, 13, 1 | 1 0 0 0 } 1
-19 { 18, 23, 20, 10, 6, 12, 7, 14 | -1 0 0 0 } 1
-20 { 21, 19, 23, 9, 6, 11, 50, 10 | 0 0 1 0 } 1
-21 { 20, 22, 18, 11, 7, 51, 10, 5 | 0 0 -1 0 } 1
-22 { 23, 18, 21, 10, 7, 17, 52, 6 | 0 -1 0 0 } 1
-23 { 22, 20, 19, 11, 6, 53, 16, 9 | 0 1 0 0 } 1
-24 { 25, 25, 25, 14, 11, 27, 28, 15 | -1 0 0 0 } 0
-25 { 24, 24, 24, 15, 11, 29, 26, 0 | 1 0 0 0 } 0
-26 { 27, 27, 27, 16, 12, 25, 30, 0 | 1 0 0 0 } 0
-27 { 26, 26, 26, 17, 12, 31, 24, 15 | -1 0 0 0 } 0
-28 { 29, 29, 29, 18, 13, 24, 31, 15 | -1 0 0 0 } 0
-29 { 28, 28, 28, 19, 13, 30, 25, 0 | 1 0 0 0 } 0
-30 { 31, 31, 31, 20, 14, 26, 29, 0 | 1 0 0 0 } 0
-31 { 30, 30, 30, 21, 14, 28, 27, 15 | -1 0 0 0 } 0
-32 { 33, 35, 36, 22, 15, 2, 39, 3 | 0 1 0 0 } 1
-33 { 32, 37, 34, 23, 16, 38, 3, 12 | 0 -1 0 0 } 1
-34 { 35, 33, 37, 22, 16, 4, 45, 11 | 0 0 -1 0 } 1
-35 { 34, 36, 32, 24, 15, 44, 5, 4 | 0 0 1 0 } 1
-36 { 37, 32, 35, 23, 15, 43, 48, 13 | -1 0 0 0 } 1
-37 { 36, 34, 33, 24, 16, 49, 42, 2 | 1 0 0 0 } 1
-38 { 39, 41, 42, 25, 18, 8, 33, 12 | 0 -1 0 0 } 1
-39 { 38, 43, 40, 26, 17, 32, 9, 3 | 0 1 0 0 } 1
-40 { 41, 39, 43, 25, 17, 10, 51, 5 | 0 0 -1 0 } 1
-41 { 40, 42, 38, 27, 18, 50, 11, 10 | 0 0 1 0 } 1
-42 { 43, 38, 41, 26, 18, 37, 54, 2 | 1 0 0 0 } 1
-43 { 42, 40, 39, 27, 17, 55, 36, 13 | -1 0 0 0 } 1
-44 { 45, 47, 48, 28, 19, 14, 35, 4 | 0 0 1 0 } 1
-45 { 44, 49, 46, 29, 20, 34, 15, 11 | 0 0 -1 0 } 1
-46 { 47, 45, 49, 28, 20, 16, 53, 9 | 0 1 0 0 } 1
-47 { 46, 48, 44, 30, 19, 52, 17, 6 | 0 -1 0 0 } 1
-48 { 49, 44, 47, 29, 19, 36, 55, 13 | -1 0 0 0 } 1
-49 { 48, 46, 45, 30, 20, 54, 37, 2 | 1 0 0 0 } 1
-50 { 51, 53, 54, 31, 22, 20, 41, 10 | 0 0 1 0 } 1
-51 { 50, 55, 52, 32, 21, 40, 21, 5 | 0 0 -1 0 } 1
-52 { 53, 51, 55, 31, 21, 22, 47, 6 | 0 -1 0 0 } 1
-53 { 52, 54, 50, 33, 22, 46, 23, 9 | 0 1 0 0 } 1
-54 { 55, 50, 53, 32, 22, 42, 49, 2 | 1 0 0 0 } 1
-55 { 54, 52, 51, 33, 21, 48, 43, 13 | -1 0 0 0 } 1
-56 { 57, 57, 57, 34, 23, 59, 64, 8 | -1 0 0 0 } 1
-57 { 56, 56, 56, 35, 23, 65, 58, 7 | 1 0 0 0 } 1
-58 { 59, 59, 59, 36, 24, 57, 66, 7 | 1 0 0 0 } 1
-59 { 58, 58, 58, 37, 24, 67, 56, 8 | -1 0 0 0 } 1
-60 { 61, 60, 60, 38, 25, 62, 62, 8 | -1 0 0 0 } 1
-61 { 60, 61, 61, 38, 26, 63, 63, 7 | 1 0 0 0 } 1
-62 { 63, 62, 62, 39, 27, 60, 60, 8 | -1 0 0 0 } 1
-63 { 62, 63, 63, 39, 28, 61, 61, 7 | 1 0 0 0 } 1
-64 { 65, 65, 65, 40, 31, 56, 67, 8 | -1 0 0 0 } 1
-65 { 64, 64, 64, 41, 31, 66, 57, 7 | 1 0 0 0 } 1
-66 { 67, 67, 67, 42, 32, 58, 65, 7 | 1 0 0 0 } 1
-67 { 66, 66, 66, 43, 32, 64, 59, 8 | -1 0 0 0 } 1
-0 { 1, 30, 7 | 1 0 0 0 } 1
-1 { 0, 29, 8 | -1 0 0 0 } 1
-0 { 0, 0 , , , 0 } 0
-1 { 0, 2 , , , 1 } 1
-2 { 1, 8 , , , 0 } 0
-3 { 1, 6 , , , 1 } 1
-4 { 2, 12 , , , 0 } 0
-5 { 2, 14 , , , 1 } 1
-6 { 3, 20 , , , 0 } 0
-7 { 3, 18 , , , 1 } 1
-8 { 4, , , , 1 } 1
-9 { 5, , 12 , , 1 } 1
-10 { 6, , 13 , , 1 } 1
-11 { 7, 24 , , , 1 } 1
-12 { 8, 26 , , , 1 } 1
-13 { 9, 28 , , , 1 } 1
-14 { 10, 30 , , , 1 } 1
-15 { 11, 32 , , , 1 } 1
-16 { 11, 34 , , , 0 } 0
-17 { 12, 40 , , , 1 } 1
-18 { 12, 38 , , , 0 } 0
-19 { 13, 44 , , , 1 } 1
-20 { 13, 46 , , , 0 } 0
-21 { 14, 52 , , , 1 } 1
-22 { 14, 50 , , , 0 } 0
-23 { 15, 56 , , , 0 } 0
-24 { 16, 58 , , , 0 } 0
-25 { 17, 60 , , , 0 } 0
-26 { 17, 61 , , , 0 } 0
-27 { 18, 62 , , , 0 } 0
-28 { 18, 63 , , , 0 } 0
-29 { 19, , , 1, 0 } 0
-30 { 19, , , 0, 0 } 0
-31 { 20, 64 , , , 0 } 0
-32 { 21, 66 , , , 0 } 0
-33 { 22, , 44 , , 0 } 0
-34 { 23, , 45 46 , , 0 } 0
-35 { 24, , 47 , , 0 } 0
-/* end Selective Nef complex */
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cpp
deleted file mode 100644
index c047ee7..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SM.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Peter Hachenberger
-
-#include <CGAL/basic.h>
-#include <CGAL/Exact_integer.h>
-#include <CGAL/Homogeneous.h>
-#include <CGAL/Nef_polyhedron_3.h>
-#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
-#include <CGAL/IO/Qt_widget_Nef_S2.h>
-#include <qapplication.h>
-
-typedef CGAL::Homogeneous<CGAL::Exact_integer> Kernel;
-typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron_3;
-
-
-
-int main(int argc, char* argv[]) {
-
-  // We've put the typedefs here as VC7 gives us an ICE if they are global typedefs
-  typedef Nef_polyhedron_3::Vertex_const_iterator Vertex_const_iterator;
-  typedef Nef_polyhedron_3::Nef_polyhedron_S2 Nef_polyhedron_S2;
-
-  Nef_polyhedron_3 N;
-  std::cin >> N;
-  Vertex_const_iterator v = N.vertices_begin();
-  Nef_polyhedron_S2 S(N.get_sphere_map(v));
-
-  QApplication a(argc, argv);
-  CGAL::Qt_widget_Nef_S2<Nef_polyhedron_S2>* w =
-    new CGAL::Qt_widget_Nef_S2<Nef_polyhedron_S2>(S);
-  a.setMainWidget(w);
-  w->show();
-  return a.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cin b/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cin
deleted file mode 100644
index 78ddda1..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cin
+++ /dev/null
@@ -1,207 +0,0 @@
-Selective Nef Complex
-standard
-vertices   25
-halfedges  48
-facets     16
-volumes    2
-shalfedges 68
-shalfloops 2
-sfaces     36
-0 { 0 2, 0 5, 0 1, -2 | -3 -1 -1 1 } 1
-1 { 3 5, 6 11, 2 3, -2 | -3 -1 1 1 } 1
-2 { 6 8, 12 17, 4 5, -2 | -3 1 -1 1 } 1
-3 { 9 11, 18 23, 6 7, -2 | -3 1 1 1 } 1
-4 { -2 -2, -2 -2, 8 8, -2 | -2 0 0 1 } 0
-5 { 12 12, -2 -2, 9 9, -2 | -4 1 -1 2 } 0
-6 { 13 13, -2 -2, 10 10, -2 | -4 1 1 2 } 0
-7 { 14 15, 24 25, 11 11, -2 | -3 -1 -1 2 } 0
-8 { 16 17, 26 27, 12 12, -2 | -3 -1 1 2 } 0
-9 { 18 19, 28 29, 13 13, -2 | -3 1 -1 2 } 0
-10 { 20 21, 30 31, 14 14, -2 | -3 1 1 2 } 0
-11 { 22 24, 32 37, 15 16, -2 | -1 -1 -1 1 } 1
-12 { 25 27, 38 43, 17 18, -2 | -1 -1 1 1 } 1
-13 { 28 30, 44 49, 19 20, -2 | -1 1 -1 1 } 1
-14 { 31 33, 50 55, 21 22, -2 | -1 1 1 1 } 1
-15 { 34 35, 56 57, 23 23, -2 | 0 -1 -1 1 } 1
-16 { 36 37, 58 59, 24 24, -2 | 0 -1 1 1 } 1
-17 { 38 38, 60 61, 25 26, -2 | 0 0 -1 2 } 0
-18 { 39 39, 62 63, 27 28, -2 | 0 0 1 2 } 0
-19 { -2 -2, -2 -2, 29 30, 0 | 0 1 1 2 } 0
-20 { 40 41, 64 65, 31 31, -2 | 0 1 -1 1 } 1
-21 { 42 43, 66 67, 32 32, -2 | 0 1 1 1 } 1
-22 { 44 44, -2 -2, 33 33, -2 | 1 1 -1 1 } 1
-23 { 45 46, -2 -2, 34 34, -2 | 1 1 0 1 } 0
-24 { 47 47, -2 -2, 35 35, -2 | 1 1 1 1 } 1
-0 { 3, 0, 0 0 | 0 0 1 1 } 1
-1 { 6, 0, 0 1 | 0 1 0 1 } 1
-2 { 22, 0, 0 3 | 1 0 0 1 } 1
-3 { 0, 1, 0 6 | 0 0 -1 1 } 1
-4 { 9, 1, 0 7 | 0 1 0 1 } 1
-5 { 25, 1, 0 9 | 1 0 0 1 } 1
-6 { 1, 2, 0 12 | 0 -1 0 1 } 1
-7 { 10, 2, 0 13 | 0 0 1 1 } 1
-8 { 28, 2, 0 15 | 1 0 0 1 } 1
-9 { 4, 3, 0 18 | 0 -1 0 1 } 1
-10 { 7, 3, 0 19 | 0 0 -1 1 } 1
-11 { 31, 3, 0 21 | 1 0 0 1 } 1
-12 { 13, 5, 1 9 | 0 0 1 1 } 0
-13 { 12, 6, 1 10 | 0 0 -1 1 } 0
-14 { 16, 7, 0 24 | 0 0 1 1 } 0
-15 { 18, 7, 0 25 | 0 1 0 1 } 0
-16 { 14, 8, 0 26 | 0 0 -1 1 } 0
-17 { 20, 8, 0 27 | 0 1 0 1 } 0
-18 { 15, 9, 0 28 | 0 -1 0 1 } 0
-19 { 21, 9, 0 29 | 0 0 1 1 } 0
-20 { 17, 10, 0 30 | 0 -1 0 1 } 0
-21 { 19, 10, 0 31 | 0 0 -1 1 } 0
-22 { 2, 11, 0 32 | -1 0 0 1 } 1
-23 { 26, 11, 0 33 | 0 0 1 1 } 1
-24 { 29, 11, 0 35 | 0 1 0 1 } 1
-25 { 5, 12, 0 38 | -1 0 0 1 } 1
-26 { 23, 12, 0 39 | 0 0 -1 1 } 1
-27 { 32, 12, 0 41 | 0 1 0 1 } 1
-28 { 8, 13, 0 44 | -1 0 0 1 } 1
-29 { 24, 13, 0 45 | 0 -1 0 1 } 1
-30 { 33, 13, 0 47 | 0 0 1 1 } 1
-31 { 11, 14, 0 50 | -1 0 0 1 } 1
-32 { 27, 14, 0 51 | 0 -1 0 1 } 1
-33 { 30, 14, 0 53 | 0 0 -1 1 } 1
-34 { 36, 15, 0 56 | 0 0 1 1 } 1
-35 { 40, 15, 0 57 | 0 1 0 1 } 1
-36 { 34, 16, 0 58 | 0 0 -1 1 } 1
-37 { 42, 16, 0 59 | 0 1 0 1 } 1
-38 { 39, 17, 0 60 | 0 0 1 1 } 0
-39 { 38, 18, 0 63 | 0 0 -1 1 } 0
-40 { 35, 20, 0 64 | 0 -1 0 1 } 1
-41 { 43, 20, 0 65 | 0 0 1 1 } 1
-42 { 37, 21, 0 66 | 0 -1 0 1 } 1
-43 { 41, 21, 0 67 | 0 0 -1 1 } 1
-44 { 45, 22, 1 33 | 0 0 1 1 } 1
-45 { 44, 23, 1 34 | 0 0 -1 1 } 1
-46 { 47, 23, 1 34 | 0 0 1 1 } 1
-47 { 46, 24, 1 35 | 0 0 -1 1 } 1
-0 { 15, 25 , , 1 | -2 0 0 -3 } 0
-1 { 14, 1 , , 0 | -1 0 0 -3 } 1
-2 { 13, 37 , , 1 | -1 0 0 -1 } 1
-3 { 12, 2 , , 0 | 0 -1 0 -1 } 1
-4 { 11, 5 , , 0 | 0 0 -1 -1 } 1
-5 { 10, 10 , , 0 | 0 0 1 -1 } 1
-6 { 9, 17 , , 0 | 0 1 0 -1 } 1
-7 { 8, 57 61 , 0 , 0 | -1 0 0 0 } 1
-8 { 7, 56 60 , 1 , 0 | 1 0 0 0 } 1
-9 { 6, 16 , , 1 | 0 -1 0 1 } 1
-10 { 5, 11 , , 1 | 0 0 -1 1 } 1
-11 { 4, 4 , , 1 | 0 0 1 1 } 1
-12 { 3, 3 , , 1 | 0 1 0 1 } 1
-13 { 2, 36 , , 0 | 1 0 0 1 } 1
-14 { 1, 0 , , 1 | 1 0 0 3 } 1
-15 { 0, 24 , , 1 | 2 0 0 3 } 0
-0 { 0 23 33 } 0
-1 { 1 8 9 11 } 1
-0 { 1, 3, 4, 0, 0, 7, 12, 14 | -1 0 0 0 } 1
-1 { 0, 5, 2, 1, 1, 13, 6, 1 | 1 0 0 0 } 1
-2 { 3, 1, 5, 0, 1, 9, 32, 3 | 0 1 0 0 } 1
-3 { 2, 4, 0, 2, 0, 33, 8, 12 | 0 -1 0 0 } 1
-4 { 5, 0, 3, 1, 0, 15, 34, 11 | 0 0 -1 0 } 1
-5 { 4, 2, 1, 2, 1, 35, 14, 4 | 0 0 1 0 } 1
-6 { 7, 9, 10, 3, 3, 1, 18, 1 | 1 0 0 0 } 1
-7 { 6, 11, 8, 4, 2, 19, 0, 14 | -1 0 0 0 } 1
-8 { 9, 7, 11, 3, 2, 3, 38, 12 | 0 -1 0 0 } 1
-9 { 8, 10, 6, 5, 3, 39, 2, 3 | 0 1 0 0 } 1
-10 { 11, 6, 9, 4, 3, 21, 40, 5 | 0 0 -1 0 } 1
-11 { 10, 8, 7, 5, 2, 41, 20, 10 | 0 0 1 0 } 1
-12 { 13, 15, 16, 6, 4, 0, 19, 14 | -1 0 0 0 } 1
-13 { 12, 17, 14, 7, 5, 18, 1, 1 | 1 0 0 0 } 1
-14 { 15, 13, 17, 6, 5, 5, 44, 4 | 0 0 1 0 } 1
-15 { 14, 16, 12, 8, 4, 45, 4, 11 | 0 0 -1 0 } 1
-16 { 17, 12, 15, 7, 4, 23, 46, 9 | 0 1 0 0 } 1
-17 { 16, 14, 13, 8, 5, 47, 22, 6 | 0 -1 0 0 } 1
-18 { 19, 21, 22, 9, 7, 6, 13, 1 | 1 0 0 0 } 1
-19 { 18, 23, 20, 10, 6, 12, 7, 14 | -1 0 0 0 } 1
-20 { 21, 19, 23, 9, 6, 11, 50, 10 | 0 0 1 0 } 1
-21 { 20, 22, 18, 11, 7, 51, 10, 5 | 0 0 -1 0 } 1
-22 { 23, 18, 21, 10, 7, 17, 52, 6 | 0 -1 0 0 } 1
-23 { 22, 20, 19, 11, 6, 53, 16, 9 | 0 1 0 0 } 1
-24 { 25, 25, 25, 14, 11, 27, 28, 15 | -1 0 0 0 } 0
-25 { 24, 24, 24, 15, 11, 29, 26, 0 | 1 0 0 0 } 0
-26 { 27, 27, 27, 16, 12, 25, 30, 0 | 1 0 0 0 } 0
-27 { 26, 26, 26, 17, 12, 31, 24, 15 | -1 0 0 0 } 0
-28 { 29, 29, 29, 18, 13, 24, 31, 15 | -1 0 0 0 } 0
-29 { 28, 28, 28, 19, 13, 30, 25, 0 | 1 0 0 0 } 0
-30 { 31, 31, 31, 20, 14, 26, 29, 0 | 1 0 0 0 } 0
-31 { 30, 30, 30, 21, 14, 28, 27, 15 | -1 0 0 0 } 0
-32 { 33, 35, 36, 22, 15, 2, 39, 3 | 0 1 0 0 } 1
-33 { 32, 37, 34, 23, 16, 38, 3, 12 | 0 -1 0 0 } 1
-34 { 35, 33, 37, 22, 16, 4, 45, 11 | 0 0 -1 0 } 1
-35 { 34, 36, 32, 24, 15, 44, 5, 4 | 0 0 1 0 } 1
-36 { 37, 32, 35, 23, 15, 43, 48, 13 | -1 0 0 0 } 1
-37 { 36, 34, 33, 24, 16, 49, 42, 2 | 1 0 0 0 } 1
-38 { 39, 41, 42, 25, 18, 8, 33, 12 | 0 -1 0 0 } 1
-39 { 38, 43, 40, 26, 17, 32, 9, 3 | 0 1 0 0 } 1
-40 { 41, 39, 43, 25, 17, 10, 51, 5 | 0 0 -1 0 } 1
-41 { 40, 42, 38, 27, 18, 50, 11, 10 | 0 0 1 0 } 1
-42 { 43, 38, 41, 26, 18, 37, 54, 2 | 1 0 0 0 } 1
-43 { 42, 40, 39, 27, 17, 55, 36, 13 | -1 0 0 0 } 1
-44 { 45, 47, 48, 28, 19, 14, 35, 4 | 0 0 1 0 } 1
-45 { 44, 49, 46, 29, 20, 34, 15, 11 | 0 0 -1 0 } 1
-46 { 47, 45, 49, 28, 20, 16, 53, 9 | 0 1 0 0 } 1
-47 { 46, 48, 44, 30, 19, 52, 17, 6 | 0 -1 0 0 } 1
-48 { 49, 44, 47, 29, 19, 36, 55, 13 | -1 0 0 0 } 1
-49 { 48, 46, 45, 30, 20, 54, 37, 2 | 1 0 0 0 } 1
-50 { 51, 53, 54, 31, 22, 20, 41, 10 | 0 0 1 0 } 1
-51 { 50, 55, 52, 32, 21, 40, 21, 5 | 0 0 -1 0 } 1
-52 { 53, 51, 55, 31, 21, 22, 47, 6 | 0 -1 0 0 } 1
-53 { 52, 54, 50, 33, 22, 46, 23, 9 | 0 1 0 0 } 1
-54 { 55, 50, 53, 32, 22, 42, 49, 2 | 1 0 0 0 } 1
-55 { 54, 52, 51, 33, 21, 48, 43, 13 | -1 0 0 0 } 1
-56 { 57, 57, 57, 34, 23, 59, 64, 8 | -1 0 0 0 } 1
-57 { 56, 56, 56, 35, 23, 65, 58, 7 | 1 0 0 0 } 1
-58 { 59, 59, 59, 36, 24, 57, 66, 7 | 1 0 0 0 } 1
-59 { 58, 58, 58, 37, 24, 67, 56, 8 | -1 0 0 0 } 1
-60 { 61, 60, 60, 38, 25, 62, 62, 8 | -1 0 0 0 } 1
-61 { 60, 61, 61, 38, 26, 63, 63, 7 | 1 0 0 0 } 1
-62 { 63, 62, 62, 39, 27, 60, 60, 8 | -1 0 0 0 } 1
-63 { 62, 63, 63, 39, 28, 61, 61, 7 | 1 0 0 0 } 1
-64 { 65, 65, 65, 40, 31, 56, 67, 8 | -1 0 0 0 } 1
-65 { 64, 64, 64, 41, 31, 66, 57, 7 | 1 0 0 0 } 1
-66 { 67, 67, 67, 42, 32, 58, 65, 7 | 1 0 0 0 } 1
-67 { 66, 66, 66, 43, 32, 64, 59, 8 | -1 0 0 0 } 1
-0 { 1, 30, 7 | 1 0 0 0 } 1
-1 { 0, 29, 8 | -1 0 0 0 } 1
-0 { 0, 0 , , , 0 } 0
-1 { 0, 2 , , , 1 } 1
-2 { 1, 8 , , , 0 } 0
-3 { 1, 6 , , , 1 } 1
-4 { 2, 12 , , , 0 } 0
-5 { 2, 14 , , , 1 } 1
-6 { 3, 20 , , , 0 } 0
-7 { 3, 18 , , , 1 } 1
-8 { 4, , , , 1 } 1
-9 { 5, , 12 , , 1 } 1
-10 { 6, , 13 , , 1 } 1
-11 { 7, 24 , , , 1 } 1
-12 { 8, 26 , , , 1 } 1
-13 { 9, 28 , , , 1 } 1
-14 { 10, 30 , , , 1 } 1
-15 { 11, 32 , , , 1 } 1
-16 { 11, 34 , , , 0 } 0
-17 { 12, 40 , , , 1 } 1
-18 { 12, 38 , , , 0 } 0
-19 { 13, 44 , , , 1 } 1
-20 { 13, 46 , , , 0 } 0
-21 { 14, 52 , , , 1 } 1
-22 { 14, 50 , , , 0 } 0
-23 { 15, 56 , , , 0 } 0
-24 { 16, 58 , , , 0 } 0
-25 { 17, 60 , , , 0 } 0
-26 { 17, 61 , , , 0 } 0
-27 { 18, 62 , , , 0 } 0
-28 { 18, 63 , , , 0 } 0
-29 { 19, , , 1, 0 } 0
-30 { 19, , , 0, 0 } 0
-31 { 20, 64 , , , 0 } 0
-32 { 21, 66 , , , 0 } 0
-33 { 22, , 44 , , 0 } 0
-34 { 23, , 45 46 , , 0 } 0
-35 { 24, , 47 , , 0 } 0
-/* end Selective Nef complex */
diff --git a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cpp b/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cpp
deleted file mode 100644
index 7450b15..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_3/visualization_SNC.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2002  Max-Planck-Institute Saarbruecken (Germany)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Peter Hachenberger
-
-#include <CGAL/basic.h>
-#include <CGAL/Exact_integer.h>
-#include <CGAL/Homogeneous.h>
-#include <CGAL/Nef_polyhedron_3.h>
-#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
-#include <CGAL/IO/Qt_widget_Nef_3.h>
-#include <qapplication.h>
-
-typedef CGAL::Homogeneous<CGAL::Exact_integer> Kernel;
-typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron_3;
-
-int main(int argc, char* argv[]) {
-  Nef_polyhedron_3 N;
-  std::cin >> N;
-
-  QApplication a(argc, argv);
-  CGAL::Qt_widget_Nef_3<Nef_polyhedron_3>* w =
-    new CGAL::Qt_widget_Nef_3<Nef_polyhedron_3>(N);
-  a.setMainWidget(w);
-  w->show();
-  return a.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Nef_S2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Nef_S2/CMakeLists.txt
deleted file mode 100644
index 32b3a4a..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_S2/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( Nef_S2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3 )
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched)
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND CGAL_Qt3_FOUND AND QT3_FOUND )
-
-
-INCLUDE_DIRECTORIES ( BEFORE ./include )
-
-  # The executable itself.
-  add_executable  ( nef_S2
-                    nef_S2.cpp )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS nef_S2 )
-
-  target_link_libraries( nef_S2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h b/3rdparty/CGAL-4.6/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h
deleted file mode 100644
index 92cd4fb..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2004  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef NEF_POLYHEDRON_S2_CREATE_RANDOM_H
-#define NEF_POLYHEDRON_S2_CREATE_RANDOM_H
-
-#include <CGAL/random_selection.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Nef_polyhedron_S2.h>
-
-namespace CGAL {
-
-template <typename K,typename I,typename M>
-void
-create_random_Nef_S2(Nef_polyhedron_S2<K,I,M>& P, int n=5, int seed=0) {
-
-  typedef Nef_polyhedron_S2<K,I,M> Polyhedron;
-  typedef typename Polyhedron::Sphere_circle Sphere_circle;
-  typedef typename K::Point_3 Point_3;
-  typedef typename K::Plane_3 Plane_3;
-  typedef typename K::RT RT;
-
-  typedef CGAL::Creator_uniform_3<RT,Point_3>  Creator;
-  typedef CGAL::Random_points_in_cube_3<Point_3,Creator> Point_source;
-
-  if(seed == 0)
-    std::srand(time(0));
-  else
-    std::srand(seed);
-
-  std::list<Sphere_circle> L;
-  Point_source S(5);
-  Point_3 ph;
-  Point_3 o(0,0,0);
-  while ( n-- > 0 ) {
-    do { ph = *S++; }
-    while ( ph == o );
-    Plane_3 h(o,(ph-CGAL::ORIGIN).direction());
-    L.push_back( Sphere_circle(h) );
-  }
-
-  P = Polyhedron(L.begin(), L.end(), 0.5);
-
-}
-
-} //namespace CGAL
-#endif // NEF_POLYHEDRON_S2_CREATE_RANDOM_H
diff --git a/3rdparty/CGAL-4.6/demo/Nef_S2/nef_S2.cpp b/3rdparty/CGAL-4.6/demo/Nef_S2/nef_S2.cpp
deleted file mode 100644
index 62e42e0..0000000
--- a/3rdparty/CGAL-4.6/demo/Nef_S2/nef_S2.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2004  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Exact_integer.h>
-#include <CGAL/Homogeneous.h>
-#include <CGAL/Nef_polyhedron_S2.h>
-#include <CGAL/Nef_S2/create_random_Nef_S2.h>
-#include <CGAL/IO/Qt_widget_Nef_S2.h>
-#include <qapplication.h>
-
-typedef CGAL::Exact_integer RT;
-typedef CGAL::Homogeneous<RT> Kernel;
-typedef CGAL::Nef_polyhedron_S2<Kernel> Nef_polyhedron_S2;
-
-int main(int argc, char* argv[]) {
-
-  Nef_polyhedron_S2 S;
-  create_random_Nef_S2(S,5);
-
-  QApplication a(argc, argv);
-  CGAL::Qt_widget_Nef_S2<Nef_polyhedron_S2>* w =
-    new CGAL::Qt_widget_Nef_S2<Nef_polyhedron_S2>(S);
-  a.setMainWidget(w);
-  w->show();
-  return a.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/CMakeLists.txt
deleted file mode 100644
index 1552a30..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/CMakeLists.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-cmake_minimum_required(VERSION 2.4.5)
-
-project (Periodic_2_Triangulation_2_demo)
-
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-if ( COMMAND cmake_policy )
-  cmake_policy( SET CMP0003 NEW )
-endif()
-
-find_package(CGAL COMPONENTS Qt4 REQUIRED)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../../include)
-include_directories (BEFORE ./include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# The "2D Periodic triangulation" demo: Periodic_2_triangulation_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Periodic_2_triangulation_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc )
-
-# find header files for projects that can show them
-file(GLOB headers "*.h")
-file(GLOB QT_headers "include/CGAL/Qt/*.h")
-file(GLOB P2T2_headers "../../../include/CGAL/*.h")
-SOURCE_GROUP("P2T2" FILES ${P2T2_headers})
-SOURCE_GROUP("QT" FILES ${QT_headers})
-
-# The executable itself.
-add_executable  ( Periodic_2_Delaunay_triangulation_2 
-  Periodic_2_Delaunay_triangulation_2.cpp
-  Periodic_2_triangulation_2.moc 
-  ${DT_UI_FILES} ${DT_RESOURCE_FILES} 
-  ${headers} ${QT_headers} ${P2T2_headers})
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 )
-
-# Link with Qt libraries
-target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp
deleted file mode 100644
index 81eeac6..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp
+++ /dev/null
@@ -1,457 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_2_triangulation_2.h>
-#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
-#include <CGAL/Periodic_2_triangulation_traits_2.h>
-#include <CGAL/point_generators_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include "TriangulationCircumcircle.h"
-#include "TriangulationMovingPoint.h"
-#include "TriangulationConflictZone.h"
-#include "TriangulationRemoveVertex.h"
-#include "TriangulationPointInputAndConflictZone.h"
-#include <CGAL/Qt/PeriodicTriangulationGraphicsItem.h>
-#include <CGAL/Qt/PeriodicVoronoiGraphicsItem.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Periodic_2_triangulation_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-//typedef CGAL::Exact_predicates_inexact_constructions_kernel     EPIC;
-struct EPIC : public CGAL::Exact_predicates_inexact_constructions_kernel {};
-typedef CGAL::Periodic_2_triangulation_traits_2<EPIC>           K;
-typedef K::Point_2                                              Point_2;
-typedef K::Iso_rectangle_2                                      Iso_rectangle_2;
-
-typedef CGAL::Periodic_2_Delaunay_triangulation_2<K>            Periodic_DT;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Periodic_2_triangulation_2
-{
-  Q_OBJECT
-  
-private:  
-  Periodic_DT triang; 
-  QGraphicsScene scene;  
-
-  typedef CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT> PTGI;
-
-  CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT> * pt_gi;
-  CGAL::Qt::PeriodicTriangulationVoronoiGraphicsItem<Periodic_DT> * vgi;
-
-  CGAL::Qt::TriangulationMovingPoint<Periodic_DT> * pt_mp;
-  CGAL::Qt::TriangulationConflictZone<Periodic_DT> * pt_cz;
-  CGAL::Qt::TriangulationRemoveVertex<Periodic_DT> * pt_rv;
-  CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT> * pt_pi;
-  CGAL::Qt::TriangulationCircumcircle<Periodic_DT> *pt_cc;
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionClear_triggered();
-  void on_actionInsertPoint_toggled(bool checked);
-  void on_actionInsertRandomPoints_triggered();
-  void on_actionConvertTo9Cover_triggered();
-  void on_actionConvertTo1Cover_triggered();
-  
-  void on_actionMovingPoint_toggled(bool checked);
-  void on_actionShowConflictZone_toggled(bool checked);
-  void on_actionCircumcenter_toggled(bool checked);
-
-  void on_actionShowDelaunay_toggled(bool checked);
-  void on_actionShowVoronoi_toggled(bool checked);
-  void on_actionNoneSimplicesEmphasized_triggered(bool checked);
-  void on_actionUniqueSimplicesEmphasized_triggered(bool checked);
-  void on_actionStoredSimplicesEmphasized_triggered(bool checked);
-  void on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool checked);
-  void on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool checked);
-
-  
-  void on_actionLoadPoints_triggered();
-  void on_actionSavePoints_triggered();
-  
-  void on_actionRecenter_triggered();
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  // Add a GraphicItem for the Periodic triangulation
-  pt_gi = new CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT>(&triang);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pt_gi, SLOT(modelChanged()));
-
-  pt_gi->setVerticesPen(QPen(Qt::red, 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(pt_gi);
-
-  // Add a GraphicItem for the Voronoi diagram
-  vgi = new CGAL::Qt::PeriodicTriangulationVoronoiGraphicsItem<Periodic_DT>(&triang);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   vgi, SLOT(modelChanged()));
-
-  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(vgi);
-  vgi->hide();
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT>(&scene, &triang, this );
-  
-  QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-  
-  pt_mp = new CGAL::Qt::TriangulationMovingPoint<Periodic_DT>(&triang, this);
-  // TriangulationMovingPoint<Periodic_DT> emits a modelChanged() signal each
-  // time the moving point moves.
-  // The following connection is for the purpose of emitting changed().
-  QObject::connect(pt_mp, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  pt_cz = new CGAL::Qt::TriangulationConflictZone<Periodic_DT>(&scene, &triang, this);
-  QObject::connect(pt_cz, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  pt_rv = new CGAL::Qt::TriangulationRemoveVertex<Periodic_DT>(&triang, this);
-  QObject::connect(pt_rv, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  pt_cc = new CGAL::Qt::TriangulationCircumcircle<Periodic_DT>(&scene, &triang, this);
-  QObject::connect(pt_cc, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-  
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPoint);
-  ag->addAction(this->actionMovingPoint);
-  ag->addAction(this->actionCircumcenter);
-  ag->addAction(this->actionShowConflictZone);
-
-  // Check two actions 
-  this->actionInsertPoint->setChecked(true);
-  this->actionShowDelaunay->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(0, 0, 1, 1);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Periodic_2_triangulation_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-  
-  on_actionRecenter_triggered();
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  bool was_empty = triang.empty();
-  Point_2 p;
-  if(CGAL::assign(p, o)) {
-    double dx = triang.domain().xmax() - triang.domain().xmin();
-    double dy = triang.domain().ymax() - triang.domain().ymin();
-    p = Point_2(p.x()- std::floor(p.x()/dx),
-                p.y()- std::floor(p.y()/dy));
-    triang.insert(p);
-  }
-  emit(changed());
-
-  if (was_empty)
-    on_actionRecenter_triggered();
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPoint_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pt_pi);
-    scene.installEventFilter(pt_rv);
-  } else {
-    scene.removeEventFilter(pt_pi);
-    scene.removeEventFilter(pt_rv);
-  }
-}
-
-void
-MainWindow::on_actionShowConflictZone_toggled(bool checked)
-{
-  if(checked) {
-    scene.installEventFilter(pt_cz);
-  } else {
-    scene.removeEventFilter(pt_cz);
-  }
-}
-
-
-void
-MainWindow::on_actionMovingPoint_toggled(bool checked)
-{
-
-  if(checked){
-    scene.installEventFilter(pt_mp);
-  } else {
-    scene.removeEventFilter(pt_mp);
-  }
-}
-
-void
-MainWindow::on_actionCircumcenter_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pt_cc);
-    pt_cc->show();
-  } else {  
-    scene.removeEventFilter(pt_cc);
-    pt_cc->hide();
-  }
-}
-
-
-void
-MainWindow::on_actionShowDelaunay_toggled(bool checked)
-{
-  pt_gi->setVisibleEdges(checked);
-}
-
-void
-MainWindow::on_actionShowVoronoi_toggled(bool checked)
-{
-  vgi->setVisible(checked);
-}
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  triang.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((triang.domain().min)(),
-                                                     (triang.domain().max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     250,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  std::vector<Point_2> points;
-  points.reserve(number_of_points);
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(*pg++);
-  }
-  triang.insert(points.begin(), points.end(), true);
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-
-  on_actionRecenter_triggered();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionConvertTo9Cover_triggered() {
-  if (triang.is_1_cover()) {
-    triang.convert_to_9_sheeted_covering();
-    emit(changed());
-  }
-}
-
-void
-MainWindow::on_actionConvertTo1Cover_triggered() {
-  if (!triang.is_1_cover()) {
-    triang.convert_to_1_sheeted_covering();
-    emit(changed());
-  }
-}
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  std::vector<K::Point_2> points;
-  while(ifs >> p) {
-    points.push_back(p);
-  }
-  triang.clear();
-  triang.insert(points.begin(), points.end());
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    for(Periodic_DT::Unique_vertex_iterator 
-          vit = triang.unique_vertices_begin(),
-          end = triang.unique_vertices_end();
-        vit!= end; ++vit)
-    {
-      ofs << vit->point() << std::endl;
-    }
-  }
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  pt_gi->modelChanged();
-  this->graphicsView->setSceneRect(pt_gi->boundingRect());
-  this->graphicsView->fitInView(pt_gi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-void MainWindow::on_actionNoneSimplicesEmphasized_triggered(bool)
-{
-  pt_gi->setEmphasizedSimplices(PTGI::NONE);
-  emit changed();
-}
-void MainWindow::on_actionUniqueSimplicesEmphasized_triggered(bool)
-{
-  pt_gi->setEmphasizedSimplices(PTGI::UNIQUE);
-  emit changed();
-}
-void MainWindow::on_actionStoredSimplicesEmphasized_triggered(bool)
-{
-  pt_gi->setEmphasizedSimplices(PTGI::STORED);
-  emit changed();
-}
-void MainWindow::on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool)
-{
-  pt_gi->setEmphasizedSimplices(PTGI::UNIQUE_COVER_DOMAIN);
-  emit changed();
-}
-void MainWindow::on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool)
-{
-  pt_gi->setEmphasizedSimplices(PTGI::STORED_COVER_DOMAIN);
-  emit changed();
-}
-
-
-#include "Periodic_2_triangulation_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("www.nghk.nl");
-  app.setOrganizationName("Nico Kruithof");
-  app.setApplicationName("Periodic_2_Delaunay_triangulation_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  QStringList args = app.arguments();
-  args.removeAt(0);
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h
deleted file mode 100644
index ed61883..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h
+++ /dev/null
@@ -1,162 +0,0 @@
-#ifndef CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
-#define CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename PT>
-class TriangulationConflictZone : public GraphicsViewInput
-{
-public:
-  typedef PT                                       Periodic_triangulation;
-  typedef typename PT::Geom_traits                 K;
-  typedef typename PT::Face_handle                 Face_handle;
-  typedef typename PT::Periodic_triangle_iterator  Periodic_triangle_iterator;
-  typedef typename PT::Point                       Point;
-  typedef typename PT::Iso_rectangle               Iso_rectangle;
-  typedef typename PT::Geom_traits::Vector_2       Vector;
-  typedef typename PT::Triangle                    Triangle;
-
-  TriangulationConflictZone(QGraphicsScene* s, PT  * tr_, QObject* parent);
-
-protected:
-  void localize_and_insert_point(QPointF qt_point);
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  Face_handle m_hint;
-  std::list<Face_handle> faces;
-  std::list<QGraphicsPolygonItem*> qfaces;
-  Periodic_triangulation *m_tr;
-  Face_handle m_containing_face;
-  Converter<K> m_convert;
-  QGraphicsScene *m_scene;
-  QGraphicsPolygonItem *m_triangle;
-  bool m_animate;
-};
-
-
-template <typename T>
-TriangulationConflictZone<T>::TriangulationConflictZone(QGraphicsScene* s,
-                                                            T * tr_,
-                                                            QObject* parent)
-    :  GraphicsViewInput(parent), m_hint(NULL), m_tr(tr_), m_containing_face(Face_handle()), m_scene(s), m_triangle(NULL), m_animate(false)
-{
-}
-
-template <typename T>
-void 
-TriangulationConflictZone<T>::localize_and_insert_point(QPointF qt_point)
-{
-  Point p(m_convert(qt_point));
-  double dx = m_tr->domain().xmax() - m_tr->domain().xmin();
-  double dy = m_tr->domain().ymax() - m_tr->domain().ymin();
-  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
-
-  if (m_hint == NULL) {
-      m_hint = m_tr->faces_begin();
-  }
-
-  faces.clear();
-  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
-      it != qfaces.end();
-      ++it){
-    delete *it;
-  }
-  qfaces.clear();
-  m_tr->get_conflicts(p, std::back_inserter(faces), m_hint);
-  for(typename std::list<Face_handle>::iterator it = faces.begin();
-      it != faces.end();
-      ++it){
-    if(! m_tr->is_infinite(*it)){
-      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it)));
-      QColor color(::Qt::blue);
-      color.setAlpha(150);
-      item->setBrush(color);
-      m_scene->addItem(item);
-      qfaces.push_back(item);
-    }
-  }
-}  
-  
-
-
-template <typename T>
-void 
-TriangulationConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(m_tr->number_of_vertices() == 0 ||
-     event->modifiers() != 0 ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-  localize_and_insert_point(event->scenePos());
-  m_animate = true;
-}
-
-
-template <typename T>
-void
-TriangulationConflictZone<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(m_animate){
-    localize_and_insert_point(event->scenePos());
-  }
-}
-
-
-template <typename T>
-void 
-TriangulationConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
-{
-  faces.clear();
-  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
-      it != qfaces.end();
-      ++it){
-    delete *it;
-  }
-  qfaces.clear();
-  m_animate = false;
-  m_hint = NULL;
-}
-
-
-
-template <typename T>
-bool 
-TriangulationConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return false; // do not eat move event!
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h
deleted file mode 100644
index 786b155..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h
+++ /dev/null
@@ -1,149 +0,0 @@
-
-#ifndef CGAL_QT_TRIANGULATION_MOVING_POINT
-#define CGAL_QT_TRIANGULATION_MOVING_POINT
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class TriangulationMovingPoint : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Face_handle Face_handle;
-  typedef typename DT::Vertex_handle Vertex_handle;
-  typedef typename DT::Point Point;
-
-  TriangulationMovingPoint(DT  * dt_, QObject* parent);
-
-protected:
-  void localize_and_insert_point(QPointF qt_point);
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  DT * dt;
-  Vertex_handle vh;
-  bool movePointToInsert;
-  bool insertedPoint;
-};
-
-
-template <typename T>
-TriangulationMovingPoint<T>::TriangulationMovingPoint(T * dt_,
-							  QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_), vh(), movePointToInsert(false), insertedPoint(false)
-{}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
-{
-  Converter<typename T::Geom_traits> convert;
-  Point p = convert(qt_point);
-  double dx = dt->domain().xmax() - dt->domain().xmin();
-  double dy = dt->domain().ymax() - dt->domain().ymin();
-  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
-
-  typename T::Locate_type lt;
-  int li;
-  Face_handle fh = (vh == Vertex_handle()) ? Face_handle() : vh->face();
-  fh = dt->locate(p, lt, li, fh); // fh serves as a hint
-  if(lt != T::VERTEX){
-    vh = dt->insert(p, lt, fh, li);
-    insertedPoint = true;
-    emit(modelChanged());
-  } else {
-    vh = fh->vertex(0);
-    insertedPoint = false;
-  }
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(dt->number_of_vertices() == 0 ||
-     event->modifiers() != 0 ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-  movePointToInsert = true;
-  localize_and_insert_point(event->scenePos());
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-
-  if (!movePointToInsert) return;
-
-  if (insertedPoint && (vh != Vertex_handle())) {
-    dt->remove(vh);
-    vh = Vertex_handle();
-  }
-
-  localize_and_insert_point(event->scenePos());
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-  if (! movePointToInsert || event->button() != ::Qt::LeftButton) {
-    return;
-  }
-
-  if (insertedPoint && (vh != Vertex_handle())) {
-    dt->remove(vh);
-    vh = Vertex_handle();
-  }
-  
-  emit(modelChanged());
- 
-  movePointToInsert = false;
-}
-
-
-
-template <typename T>
-bool 
-TriangulationMovingPoint<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return false; // do not eat move event!
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_MOVING_POINT
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h
deleted file mode 100644
index d242572..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h
+++ /dev/null
@@ -1,122 +0,0 @@
-
-#ifndef CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
-#define CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename PT>
-class TriangulationPointInputAndConflictZone : public GraphicsViewInput
-{
-public:
-  typedef typename PT::Geom_traits K;
-  typedef typename PT::Face_handle Face_handle;
-  typedef typename PT::Point Point;
-
-  TriangulationPointInputAndConflictZone(QGraphicsScene* s, PT  * dt_, QObject* parent);
-
-protected:
-  void localize_and_insert_point(QPointF qt_point);
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  std::list<Face_handle> faces;
-  std::list<QGraphicsPolygonItem*> qfaces;
-  PT * dt;
-  Converter<K> convert;
-  QGraphicsScene *scene_;
-  Point p;
-};
-
-
-template <typename T>
-TriangulationPointInputAndConflictZone<T>::TriangulationPointInputAndConflictZone(QGraphicsScene* s,
-							T * dt_,
-							QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_), scene_(s)
-{}
-
-
-
-
-template <typename T>
-void 
-TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  p = convert(event->scenePos());
-  double dx = dt->domain().xmax() - dt->domain().xmin();
-  double dy = dt->domain().ymax() - dt->domain().ymin();
-  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
-
-  if(dt->dimension() < 2 ||
-     event->modifiers() != 0 ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-  
-
-  dt->get_conflicts(p, std::back_inserter(faces));
-  for(typename std::list<Face_handle>::iterator it = faces.begin();
-      it != faces.end();
-      ++it) {
-      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
-      QColor color(::Qt::blue);
-      color.setAlpha(150);
-      item->setBrush(color);
-      scene_->addItem(item);
-      qfaces.push_back(item);
-  }
-}
-
-
-template <typename T>
-void 
-TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
-{
-  faces.clear();
-  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
-      it != qfaces.end();
-      ++it){
-    scene_->removeItem(*it);
-    delete *it;
-  }
-  qfaces.clear();
-  emit (generate(CGAL::make_object(p)));
-}
-
-
-
-template <typename T>
-bool 
-TriangulationPointInputAndConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h
deleted file mode 100644
index cbc11cc..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
-#define CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-#include <CGAL/Qt/Converter.h>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class TriangulationRemoveVertex : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Face_handle Face_handle;
-  typedef typename DT::Vertex_handle Vertex_handle;
-  typedef typename DT::Point Point;
-
-  TriangulationRemoveVertex(DT  * dt_, QObject* parent);
-
-protected:
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
- 
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  DT * dt;
-};
-
-
-template <typename T>
-TriangulationRemoveVertex<T>::TriangulationRemoveVertex(T * dt_,
-							  QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_)
-{}
-
-
-
-template <typename T>
-void 
-TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if ((event->modifiers()  & ::Qt::ShiftModifier) && (! (event->modifiers() & ::Qt::ControlModifier))) {
-    if(dt->number_of_vertices() == 0) {
-      dt->clear();
-    } else {
-      Converter<typename T::Geom_traits> convert;
-      typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
-      dt->remove(selected_vertex);
-    }
-    emit (modelChanged());
-  }
-}
-
-
-
-template <typename T>
-bool 
-TriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return false;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h b/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h
deleted file mode 100644
index 1c13599..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h
+++ /dev/null
@@ -1,402 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you may redistribute it under
-// the terms of the Q Public License version 1.0.
-// See the file LICENSE.QPL distributed with CGAL.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-//                 Nico Kruithof <Nico at nghk.nl>
-
-#ifndef CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
-#define CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-namespace CGAL {
-  namespace Qt {
-    
-    template <typename T>
-    class PeriodicTriangulationGraphicsItem : public GraphicsItem
-    {
-      typedef typename T::Geom_traits Geom_traits;
-    public:
-      PeriodicTriangulationGraphicsItem(T* t_);
-      
-      void modelChanged();
-
-      enum Iterator_type {
-        STORED = 0,
-        UNIQUE, // 1
-        STORED_COVER_DOMAIN, // 2
-        UNIQUE_COVER_DOMAIN, // 3
-        NONE
-      };
-      void setEmphasizedSimplices(Iterator_type type) { this->type = type; }
-      Iterator_type getEmphasizedSimplices() { return this->type; }
-    public:
-      
-      QRectF boundingRect() const;
-      
-      void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-      
-      virtual void operator()(typename T::Face_handle fh);
-      
-      const QPen& verticesPen() const
-      {
-        return vertices_pen;
-      }
-      
-      const QPen& edgesPen() const
-      {
-        return edges_pen;
-      }
-
-      const QPen& facesPen() const
-      {
-        return faces_pen;
-      }
-      
-      const QPen& domainPen() const
-      {
-        return domain_pen;
-      }
-      
-      void setVerticesPen(const QPen& pen)
-      {
-        vertices_pen = pen;
-      }
-      
-      void setEdgesPen(const QPen& pen)
-      {
-        edges_pen = pen;
-      }
-
-      void setFacesPen(const QPen& pen)
-      {
-        edges_pen = pen;
-      }
-      
-      void setDomainPen(const QPen& pen)
-      {
-        domain_pen = pen;
-      }
-      
-      bool visibleVertices() const
-      {
-        return visible_vertices;
-      }
-      
-      void setVisibleVertices(const bool b)
-      {
-        visible_vertices = b;
-        update();
-      }
-      
-      bool visibleEdges() const
-      {
-        return visible_edges;
-      }
-      
-      void setVisibleEdges(const bool b)
-      {
-        visible_edges = b;
-        update();
-      }
-      
-    protected:
-      virtual void drawAll(QPainter *painter);
-      void paintVertices(QPainter *painter);
-      void paintOneVertex(const typename T::Point& point);
-      virtual void paintVertex(typename T::Vertex_handle vh);
-      void updateBoundingBox();
-      
-      T * t;
-      QPainter* m_painter;
-      PainterOstream<Geom_traits> painterostream;
-      
-      typename T::Vertex_handle vh;
-      typename T::Point p;
-      QRectF bounding_rect;
-      
-      QPen vertices_pen;
-      QPen edges_pen;
-      QPen faces_pen;
-      QPen domain_pen;
-      bool visible_edges;
-      bool visible_vertices;
-
-      Iterator_type type;
-    };
-    
-    
-    template <typename T>
-    PeriodicTriangulationGraphicsItem<T>::PeriodicTriangulationGraphicsItem(T * t_)
-    :  t(t_), painterostream(0),
-       visible_edges(true), visible_vertices(true),
-       type(NONE)
-    {
-      setVerticesPen(QPen(::Qt::red, 1.));
-      setFacesPen(QPen(QColor(100,100,100)));
-      setDomainPen(QPen(::Qt::blue, .01));
-      if(t->number_of_vertices() == 0){
-        this->hide();
-      }
-      updateBoundingBox();
-      setZValue(3);
-    }
-    
-    template <typename T>
-    QRectF 
-    PeriodicTriangulationGraphicsItem<T>::boundingRect() const
-    {
-      return bounding_rect;
-    }
-    
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
-    {
-      if(visible_edges) {
-        for (int i=0; i<3; i++) {
-          if (fh < fh->neighbor(i)){
-            m_painter->setPen(this->edgesPen());
-            painterostream << t->segment(fh,i);
-          }
-        }
-      }
-      if(visible_vertices) {
-        for (int i=0; i<3; i++) {
-          paintVertex(fh->vertex(i));
-        }
-      }
-    }
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::drawAll(QPainter *painter)
-    {
-      painterostream = PainterOstream<Geom_traits>(painter);
-
-      if (type != NONE)
-      {
-        typename T::Iterator_type itype;
-        switch (type) {
-        case STORED:
-          itype = T::STORED;
-          break;
-        case UNIQUE:
-          itype = T::UNIQUE;
-          break;
-        case STORED_COVER_DOMAIN:
-          itype = T::STORED_COVER_DOMAIN;
-          break;
-        case UNIQUE_COVER_DOMAIN:
-          itype = T::UNIQUE_COVER_DOMAIN;
-          break;
-        case NONE:
-        default:
-          assert(false);
-          itype = T::STORED;
-          break;
-        }
-        
-        Converter<Geom_traits> convert;
-
-        QMatrix matrix = painter->matrix();
-        painter->resetMatrix();
-
-        { // Faces
-          painter->setPen(QPen());
-          painter->setBrush(QBrush(::Qt::green));
-          for (typename T::Periodic_triangle_iterator tit = t->periodic_triangles_begin(itype);
-               tit != t->periodic_triangles_end(itype); ++tit) {
-            painter->drawConvexPolygon(matrix.map(convert(t->triangle(*tit))));
-          }
-          painter->setBrush(QBrush());
-        }
-        { // Edges
-          QPen pen = edgesPen();
-          pen.setWidth(pen.width() + 2);
-          painter->setPen(pen);
-          for (typename T::Periodic_segment_iterator sit = t->periodic_segments_begin(itype);
-               sit != t->periodic_segments_end(itype); ++sit) {
-            painter->drawLine(matrix.map(convert(t->segment(*sit))));
-          }
-        }
-        { // Vertices
-          QPen pen = verticesPen();
-          pen.setWidth(pen.width() + 2);
-          painter->setPen(pen);
-          for (typename T::Periodic_point_iterator pit = t->periodic_points_begin(itype);
-               pit != t->periodic_points_end(itype); ++pit) {
-            painter->drawPoint(matrix.map(convert(t->point(*pit))));
-          }
-        }
-
-        painter->setMatrix(matrix);
-      }      
-
-      if(visibleEdges()) {
-        painter->setPen(this->edgesPen());
-        t->draw_triangulation(painterostream);
-      }
-      
-      paintVertices(painter);
-    }
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::paintVertices(QPainter *painter)
-    {
-      if(visibleVertices()) {
-        Converter<Geom_traits> convert;
-        
-        QMatrix matrix = painter->matrix();
-        painter->resetMatrix();
-
-        QPen pen = verticesPen();
-        if (t->number_of_vertices() < 8) {
-          int v_index=1;
-          for (typename T::Unique_vertex_iterator vit = t->unique_vertices_begin();
-               vit != t->unique_vertices_end(); ++vit) {
-            pen.setColor(QColor(255*(v_index&1), 255*((v_index>>1)&1), 255*((v_index>>2)&1)));
-            painter->setPen(pen);
-
-            painter->drawPoint(matrix.map(convert(t->point(vit))));
-            std::vector<typename T::Vertex_handle> copies = t->periodic_copies(vit);
-            for (size_t i=0; i<copies.size(); ++i)
-              painter->drawPoint(matrix.map(convert(t->point(copies[i]))));
-
-            ++v_index;
-          }
-          
-        } else {
-          painter->setPen(verticesPen());
-          for (typename T::Periodic_point_iterator ppit = t->periodic_points_begin();
-               ppit != t->periodic_points_end(); ++ppit)
-            {
-              QPointF point = matrix.map(convert(t->point(*ppit)));
-              painter->drawPoint(point);
-            }
-        }
-
-        painter->setMatrix(matrix);
-      }
-    }
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::paintOneVertex(const typename T::Point& point)
-    {
-      Converter<Geom_traits> convert;
-      
-      m_painter->setPen(this->verticesPen());
-      QMatrix matrix = m_painter->matrix();
-      m_painter->resetMatrix();
-      m_painter->drawPoint(matrix.map(convert(point)));
-      m_painter->setMatrix(matrix);
-    }
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::paintVertex(typename T::Vertex_handle vh)
-    {
-      Converter<Geom_traits> convert;
-      
-      m_painter->setPen(this->verticesPen());
-      QMatrix matrix = m_painter->matrix();
-      m_painter->resetMatrix();
-      m_painter->drawPoint(matrix.map(convert(vh->point())));
-      m_painter->setMatrix(matrix);
-    }
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::paint(QPainter *painter, 
-                                                const QStyleOptionGraphicsItem *,
-                                                QWidget *)
-    {
-      drawAll(painter);
-
-      painter->setPen(this->domainPen());
-      const typename Geom_traits::Iso_rectangle_2 &domain = t->domain();
-      double dx = domain.xmax()-domain.xmin();
-      double dy = domain.ymax()-domain.ymin();
-      typename T::Covering_sheets sheets = t->number_of_sheets();
-      for (int x=0; x<sheets[0]; ++x) {
-        for (int y=0; y<sheets[1]; ++y) {
-          painter->drawRect((int)(domain.xmin() + x*dx),
-                            (int)(domain.ymin() + y*dy),
-                            (int)dx, (int)dy);
-        }
-      }
-      m_painter = painter;
-    }
-    
-    // We let the bounding box only grow, so that when vertices get removed
-    // the maximal bbox gets refreshed in the GraphicsView
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::updateBoundingBox()
-    {
-      prepareGeometryChange();
-      
-      CGAL::Bbox_2 bb = t->domain().bbox();
-      for (typename T::Periodic_triangle_iterator tit = t->periodic_triangles_begin(T::STORED_COVER_DOMAIN);
-           tit != t->periodic_triangles_end(T::STORED_COVER_DOMAIN); ++tit) {
-        bb = bb + t->triangle(*tit).bbox();
-      }
-      
-      double xmin = bb.xmin();
-      double ymin = bb.ymin();
-      double dx = bb.xmax() - xmin;
-      double dy = bb.ymax() - ymin;
-
-      double delta = 0.05;
-      xmin -= delta * dx;
-      ymin -= delta * dy;
-      dx += 2 * delta * dx;
-      dy += 2 * delta * dy;
-
-      bounding_rect = QRectF(xmin, ymin, dx, dy);
-    }
-    
-    
-    template <typename T>
-    void 
-    PeriodicTriangulationGraphicsItem<T>::modelChanged()
-    {
-      if((t->number_of_vertices() == 0) ){
-        this->hide();
-      } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
-        this->show();
-      }
-      updateBoundingBox();
-      update();
-    }
-    
-    
-  } // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/CMakeLists.txt
deleted file mode 100644
index 673977d..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/CMakeLists.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project( Periodic_3_triangulation_3_demo ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Find CGAL
-find_package(CGAL)
-include( ${CGAL_USE_FILE} )
-
-# Find Qt4 itself
-set ( QT_USE_QTXML    TRUE )
-set ( QT_USE_QTMAIN   TRUE )
-set ( QT_USE_QTOPENGL TRUE )
-find_package(Qt4)
-
-# Find OpenGL
-find_package(OpenGL)
-
-# Find QGLViewer
-if(QT4_FOUND)
-  include( ${QT_USE_FILE} )
-  find_package(QGLViewer)
-endif(QT4_FOUND)
-
-if (CGAL_FOUND AND OPENGL_FOUND AND QT4_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-
-   include_directories( ${QGLVIEWER_INCLUDE_DIR} )
-
-  # UI files (Qt Designer files)
-  qt4_wrap_ui ( UI_FILES MainWindow.ui )
-
-  # qrc files (resource files)
-  qt4_add_resources( RESOURCE_FILES ./Periodic_3_triangulation_3.qrc )
-
-  # use the Qt MOC preprocessor on classes that derive from QObject
-  qt4_generate_moc( "Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_Scene.cpp" )
-  qt4_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_MainWindow.cpp" )
-
-  if(DEFINED QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-  else()
-    set(QT_QCOLLECTIONGENERATOR_EXECUTABLE qcollectiongenerator)
-  endif()
-
-  # generate QtAssistant collection file
-  add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc
-      DEPENDS Periodic_3_triangulation_3.qhp Periodic_3_triangulation_3.qhcp
-      COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE}
-                 ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_3_triangulation_3.qhcp
-                 -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc
-  )
-
-  # Make sure the compiler can find generated .moc files
-  include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-  include_directories( ${QT_INCLUDE_DIR} )
-  include_directories( ../../include )
-
-  # The executable itself
-  add_executable  ( periodic_3_triangulation_3_demo
-  		    Scene.cpp moc_Scene.cpp
-  		    periodic_3_triangulation_3_demo.cpp
-  		    MainWindow.ui moc_MainWindow.cpp 
-		    ${UI_FILES} ${RESOURCE_FILES} Periodic_3_triangulation_3.qhc)
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS periodic_3_triangulation_3_demo)
-
-  # Link the executable to CGAL and third-party libraries
-  target_link_libraries(periodic_3_triangulation_3_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-else (CGAL_FOUND AND OPENGL_FOUND AND QT4_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-
-  set(PERIODIC_TRIANGULATION_MISSING_DEPS "")
-
-  if(NOT CGAL_FOUND)
-    set(PERIODIC_TRIANGULATION_MISSING_DEPS "the CGAL Qt4 library, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(PERIODIC_TRIANGULATION_MISSING_DEPS "Qt4, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
-  endif()
-
-  if(NOT OPENGL_FOUND)
-    set(PERIODIC_TRIANGULATION_MISSING_DEPS "OpenGL, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(PERIODIC_TRIANGULATION_MISSING_DEPS "QGLViewer, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
-  endif()
-
-  if (NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-    set(PERIODIC_TRIANGULATION_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_FOUND AND OPENGL_FOUND AND QT4_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.h b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.h
deleted file mode 100644
index 6a72928..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.h
+++ /dev/null
@@ -1,160 +0,0 @@
-#include <QtGui>
-#include <QFile>
-#include <QTextStream>
-#include <QTimer>
-#include "Scene.h"
-
-#include <QProcess>
-#include <QTextStream>
-
-class MainWindow : public QMainWindow
-{
-
-  Q_OBJECT
-
-public:
-  MainWindow(QWidget* = 0) {
-    ui = new Ui::MainWindow;
-    ui->setupUi(this);
-    s = new Scene(ui);
-
-    process = new QProcess(this);
-
-    // QGLViewer drawing signals
-    connect(ui->viewer, SIGNAL(viewerInitialized()), s, SLOT(init()));
-    connect(ui->viewer, SIGNAL(drawNeeded()), s, SLOT(draw()));
-
-    // divers
-    connect(s, SIGNAL(message(const QString&, int)),
-	    ui->statusBar, SLOT(showMessage(const QString&, int)));
-
-    // File menu:
-    connect(ui->actionLoad_Points, SIGNAL(triggered()),
-	    s, SLOT(load_points()));
-
-    // Init menu:
-    connect(ui->actionEmpty_scene, SIGNAL(triggered()),
-	    s, SLOT(init_scene_empty()));
-    connect(ui->actionSingle_Point, SIGNAL(triggered()),
-	    s, SLOT(init_scene_single()));
-    connect(ui->actionRandom_Point_Set, SIGNAL(triggered()),
-	    s, SLOT(init_scene_random()));
-    connect(ui->actionRandom_Points_in_Plane, SIGNAL(triggered()),
-	    s, SLOT(init_scene_plane()));
-    connect(ui->actionPoint_grid, SIGNAL(triggered()),
-	    s, SLOT(init_scene_grid()));
-
-    // Actions menu:
-    connect(ui->actionFlying_ball, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_flying_ball(bool)));
-    connect(ui->actionPause, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_pause(bool)));
-
-    connect(ui->actionInsert_point, SIGNAL(triggered()),
-	    s, SLOT(insert_mp()));
-    connect(ui->actionInsert_random_point, SIGNAL(triggered()),
-	    s, SLOT(insert_random()));
-
-    connect(ui->actionGrab_image, SIGNAL(triggered()),
-	    s, SLOT(grab_image()));
-
-    // Features menu:
-    connect(ui->actionPoint_location, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_dlocate(bool)));
-    connect(ui->actionConflict_region, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_dconflict(bool)));
-
-    // Options menu:
-    connect(ui->actionWireframe, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_wireframe(bool)));
-    connect(ui->actionPlanar_triangulation, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_in_plane(bool)));
-
-    connect(ui->actionDraw_1_sheeted_covering, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_force_1cover(bool)));
-    connect(ui->actionDraw_bordering_cells_multiply, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_multiple_cells(bool)));
-
-    connect(ui->actionDraw_segments, SIGNAL(triggered()),
-	    s, SLOT(trigger_draw_type_segment()));
-    connect(ui->actionDraw_triangles, SIGNAL(triggered()),
-	    s, SLOT(trigger_draw_type_triangle()));
-    connect(ui->actionDraw_tetrahedra, SIGNAL(triggered()),
-	    s, SLOT(trigger_draw_type_tetrahedron()));
-
-    connect(ui->actionDraw_cube_square, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_ddomain(bool)));
-
-    connect(ui->actionClip_along_the_cube_square, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_cube_clipping(bool)));
-    connect(ui->action2_color_clipping, SIGNAL(toggled(bool)),
-	    s, SLOT(toggle_two_color_clipping(bool)));
-
-    // Help menu:
-    connect(ui->actionDemo_Help, SIGNAL(triggered()),
-            this, SLOT(help()));
-    connect(ui->actionAbout_CGAL, SIGNAL(triggered()),
-            this, SLOT(about_CGAL()));
-    connect(ui->actionAbout, SIGNAL(triggered()),
-            this, SLOT(about()));
-  }
-
-  ~MainWindow() {
-    delete(ui);
-    delete(s);
-    process->close();
-    delete(process);
-  }
-
-public slots:
-  void help() {
-    QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
-      + QDir::separator();
-#if !defined(Q_OS_MAC)
-    app += QString("assistant");
-#else
-    app += QString("Assistant.app/Contents/MacOS/Assistant");
-#endif
-
-    QStringList args;
-    QString help_path = QCoreApplication::applicationDirPath()
-      + QDir::separator()
-      + QString("./Periodic_3_triangulation_3.qhc");
-    args << QString("-collectionFile") << help_path;
-    process->start(app, args);
-    if (!process->waitForStarted()) {
-      QMessageBox::critical(this, tr("Remote Control"),
-	  tr("Could not start Qt Assistant from %1.").arg(app));
-      return;
-    }
-  }
-
-  void about() {
-    showFileBox("About the demo...",":/cgal/help/resources/about.html");
-  }
-
-  void about_CGAL() {
-    showFileBox("About CGAL...",":/cgal/help/resources/about_CGAL.html");
-  }
-
-private:
-  void showFileBox(QString title, QString fileName) {
-    QFile textFile(fileName);
-    textFile.open(QIODevice::ReadOnly);
-    QMessageBox mb(QMessageBox::NoIcon,
-	title,
-	QTextStream(&textFile).readAll(),
-	QMessageBox::Ok,
-	this);
-    mb.exec();
-  }
-
-public:
-  Ui::MainWindow* ui;
-  Scene* s;
-  QTimer* timer;
-
-private:
-  QProcess* process;
-};
-
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.ui b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.ui
deleted file mode 100644
index 598f9d5..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/MainWindow.ui
+++ /dev/null
@@ -1,610 +0,0 @@
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>962</width>
-    <height>750</height>
-   </rect>
-  </property>
-  <property name="sizePolicy" >
-   <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle" >
-   <string>CGAL Periodic Delaunay Triangulation</string>
-  </property>
-  <widget class="QWidget" name="centralWidget" >
-   <layout class="QVBoxLayout" name="verticalLayout" >
-    <item>
-     <widget class="QGLViewer" name="viewer" >
-      <property name="sizePolicy" >
-       <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menuBar" >
-   <property name="geometry" >
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>962</width>
-     <height>22</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuFile" >
-    <property name="title" >
-     <string>&File</string>
-    </property>
-    <addaction name="actionLoad_Points" />
-    <addaction name="separator" />
-    <addaction name="actionExit" />
-   </widget>
-   <widget class="QMenu" name="menuOptions" >
-    <property name="title" >
-     <string>&Options</string>
-    </property>
-    <addaction name="actionWireframe" />
-    <addaction name="actionPlanar_triangulation" />
-    <addaction name="separator" />
-    <addaction name="actionDraw_1_sheeted_covering" />
-    <addaction name="actionDraw_bordering_cells_multiply" />
-    <addaction name="separator" />
-    <addaction name="actionDraw_segments" />
-    <addaction name="actionDraw_triangles" />
-    <addaction name="actionDraw_tetrahedra" />
-    <addaction name="separator" />
-    <addaction name="actionDraw_cube_square" />
-    <addaction name="separator" />
-    <addaction name="actionClip_along_the_cube_square" />
-    <addaction name="action2_color_clipping" />
-    <addaction name="separator" />
-   </widget>
-   <widget class="QMenu" name="menuInitialization" >
-    <property name="title" >
-     <string>&Initialization</string>
-    </property>
-    <addaction name="actionEmpty_scene" />
-    <addaction name="actionSingle_Point" />
-    <addaction name="actionRandom_Point_Set" />
-    <addaction name="actionRandom_Points_in_Plane" />
-    <addaction name="actionPoint_grid" />
-   </widget>
-   <widget class="QMenu" name="menuFeatures" >
-    <property name="title" >
-     <string>&Features</string>
-    </property>
-    <addaction name="actionPoint_location" />
-    <addaction name="actionConflict_region" />
-   </widget>
-   <widget class="QMenu" name="menuActions" >
-    <property name="title" >
-     <string>&Actions</string>
-    </property>
-    <addaction name="actionFlying_ball" />
-    <addaction name="actionPause" />
-    <addaction name="separator" />
-    <addaction name="actionInsert_point" />
-    <addaction name="actionInsert_random_point" />
-    <addaction name="separator" />
-    <addaction name="actionGrab_image" />
-   </widget>
-   <widget class="QMenu" name="menuHelp" >
-    <property name="title" >
-     <string>Help</string>
-    </property>
-    <addaction name="actionDemo_Help" />
-    <addaction name="separator" />
-    <addaction name="actionAbout" />
-    <addaction name="actionAbout_CGAL" />
-   </widget>
-   <addaction name="menuFile" />
-   <addaction name="menuInitialization" />
-   <addaction name="menuActions" />
-   <addaction name="menuFeatures" />
-   <addaction name="menuOptions" />
-   <addaction name="menuHelp" />
-  </widget>
-  <widget class="QStatusBar" name="statusBar" />
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
-    <string>toolBar</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionLoad_Points" />
-   <addaction name="actionGrab_image" />
-   <addaction name="separator" />
-   <addaction name="actionEmpty_scene" />
-   <addaction name="actionSingle_Point" />
-   <addaction name="actionRandom_Point_Set" />
-   <addaction name="actionRandom_Points_in_Plane" />
-   <addaction name="actionPoint_grid" />
-   <addaction name="separator" />
-   <addaction name="actionPause" />
-   <addaction name="actionFlying_ball" />
-   <addaction name="separator" />
-   <addaction name="actionInsert_point" />
-   <addaction name="actionInsert_random_point" />
-   <addaction name="separator" />
-   <addaction name="actionPoint_location" />
-   <addaction name="actionConflict_region" />
-   <addaction name="separator" />
-   <addaction name="actionWireframe" />
-   <addaction name="actionPlanar_triangulation" />
-   <addaction name="separator" />
-   <addaction name="actionDraw_1_sheeted_covering" />
-   <addaction name="actionDraw_bordering_cells_multiply" />
-   <addaction name="actionClip_along_the_cube_square" />
-   <addaction name="action2_color_clipping" />
-  </widget>
-  <action name="actionLoad_Points" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/fileOpen.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/fileOpen.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Load Points</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+O</string>
-   </property>
-  </action>
-  <action name="actionExit" >
-   <property name="text" >
-    <string>Exit</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+Q</string>
-   </property>
-  </action>
-  <action name="actionWireframe" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/wireframe.png</normaloff>
-     <normalon>:/cgal/Periodic_3_triangulation_3/icons/wireframeOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/wireframe.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Wireframe</string>
-   </property>
-   <property name="toolTip" >
-    <string>Switches wireframe rendering on and off</string>
-   </property>
-   <property name="shortcut" >
-    <string>X</string>
-   </property>
-  </action>
-  <action name="actionPlanar_triangulation" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/planar.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/planar.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Planar triangulation</string>
-   </property>
-   <property name="toolTip" >
-    <string>Shows only simplices for which z=0 everywhere</string>
-   </property>
-   <property name="shortcut" >
-    <string>Z</string>
-   </property>
-  </action>
-  <action name="actionDraw_1_sheeted_covering" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/cover1.png</normaloff>
-     <normalon>:/cgal/Periodic_3_triangulation_3/icons/cover27.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/cover1.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Draw 1-sheeted covering</string>
-   </property>
-   <property name="toolTip" >
-    <string>toggles between displaying only one periodic copy of each simplex and the internal representation </string>
-   </property>
-   <property name="shortcut" >
-    <string>1</string>
-   </property>
-  </action>
-  <action name="actionDraw_bordering_cells_multiply" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/multiple.png</normaloff>
-     <normalon>:/cgal/Periodic_3_triangulation_3/icons/multipleOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/multiple.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Draw bordering cells multiply</string>
-   </property>
-   <property name="toolTip" >
-    <string>Draws each simplex for which the intersection with the fundamental cube is non-empty</string>
-   </property>
-   <property name="shortcut" >
-    <string>M</string>
-   </property>
-  </action>
-  <action name="actionClip_along_the_cube_square" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/clipping.png</normaloff>
-     <normalon>:/cgal/Periodic_3_triangulation_3/icons/clippingOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/clipping.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Clip along the cube/square</string>
-   </property>
-  </action>
-  <action name="action2_color_clipping" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="enabled" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/twoColorClipping.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/twoColorClipping.png</iconset>
-   </property>
-   <property name="text" >
-    <string>2-color clipping</string>
-   </property>
-   <property name="toolTip" >
-    <string>show the clipped part of all clipped edges in a different color</string>
-   </property>
-  </action>
-  <action name="actionPoint_grid" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initGrid.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initGrid.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Point grid</string>
-   </property>
-   <property name="iconText" >
-    <string>pg</string>
-   </property>
-   <property name="toolTip" >
-    <string>A grid of 36 points that can be triangulated in 1-sheeted covering space</string>
-   </property>
-   <property name="shortcut" >
-    <string>F5</string>
-   </property>
-  </action>
-  <action name="actionSingle_Point" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/init1.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/init1.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Single point</string>
-   </property>
-   <property name="shortcut" >
-    <string>F2</string>
-   </property>
-  </action>
-  <action name="actionRandom_Points_in_Plane" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRandPlanar.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRandPlanar.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Random planar point set</string>
-   </property>
-   <property name="toolTip" >
-    <string>Initial triangulation of 10 points chosen at random with z=0</string>
-   </property>
-   <property name="shortcut" >
-    <string>F4</string>
-   </property>
-  </action>
-  <action name="actionRandom_Point_Set" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRand.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRand.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Random point set</string>
-   </property>
-   <property name="toolTip" >
-    <string>Initial triangulation of 30 points chosen at random</string>
-   </property>
-   <property name="shortcut" >
-    <string>F3</string>
-   </property>
-  </action>
-  <action name="actionEmpty_scene" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/init0.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/init0.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Empty scene</string>
-   </property>
-   <property name="shortcut" >
-    <string>F1</string>
-   </property>
-  </action>
-  <action name="actionDraw_cube_square" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Draw domain (cube/square)</string>
-   </property>
-   <property name="shortcut" >
-    <string>D</string>
-   </property>
-  </action>
-  <action name="actionPoint_location" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/locate.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/locate.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Point location</string>
-   </property>
-   <property name="toolTip" >
-    <string>Marks the tetrahedron that currently contains the flying ball</string>
-   </property>
-   <property name="shortcut" >
-    <string>L</string>
-   </property>
-  </action>
-  <action name="actionConflict_region" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/conflict.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/conflict.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Conflict region</string>
-   </property>
-   <property name="toolTip" >
-    <string>Shows all tetrahedra in whose circumcircle the flying ball is contained</string>
-   </property>
-   <property name="shortcut" >
-    <string>C</string>
-   </property>
-  </action>
-  <action name="actionHole" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Hole*</string>
-   </property>
-   <property name="shortcut" >
-    <string>H</string>
-   </property>
-  </action>
-  <action name="actionStar" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Star*</string>
-   </property>
-   <property name="shortcut" >
-    <string>S</string>
-   </property>
-  </action>
-  <action name="actionFlying_ball" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/ball.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/ball.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Flying ball</string>
-   </property>
-   <property name="toolTip" >
-    <string>Shows a ball flying through the cube, showing the periodicity</string>
-   </property>
-   <property name="shortcut" >
-    <string>B</string>
-   </property>
-  </action>
-  <action name="actionPause" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/pause.png</normaloff>
-     <normalon>:/cgal/Periodic_3_triangulation_3/icons/play.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/pause.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Pause</string>
-   </property>
-   <property name="toolTip" >
-    <string>Pauses the flying ball</string>
-   </property>
-   <property name="shortcut" >
-    <string>P</string>
-   </property>
-  </action>
-  <action name="actionInsert_point" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointBall.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointBall.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Insert point</string>
-   </property>
-   <property name="toolTip" >
-    <string>Insert point at the position of the flying ball (whether it is shown or not)</string>
-   </property>
-   <property name="shortcut" >
-    <string>I</string>
-   </property>
-  </action>
-  <action name="actionInsert_random_point" >
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointRandom.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointRandom.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Insert random point</string>
-   </property>
-   <property name="toolTip" >
-    <string>Insert one point at random position (within the cube)</string>
-   </property>
-   <property name="shortcut" >
-    <string>R</string>
-   </property>
-  </action>
-  <action name="actionDraw_segments" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="text" >
-    <string>Draw segments</string>
-   </property>
-   <property name="shortcut" >
-    <string>2</string>
-   </property>
-  </action>
-  <action name="actionDraw_triangles" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Draw triangles</string>
-   </property>
-   <property name="shortcut" >
-    <string>3</string>
-   </property>
-  </action>
-  <action name="actionDraw_tetrahedra" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Draw tetrahedra</string>
-   </property>
-   <property name="shortcut" >
-    <string>4</string>
-   </property>
-  </action>
-  <action name="actionGrab_image" >
-   <property name="checkable" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Periodic_3_triangulation_3.qrc" >
-     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/camera.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/camera.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Grab image</string>
-   </property>
-   <property name="shortcut" >
-    <string>G</string>
-   </property>
-  </action>
-  <action name="actionExport_pov" >
-   <property name="text" >
-    <string>Export pov</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+E</string>
-   </property>
-  </action>
-  <action name="actionDemo_Help" >
-   <property name="text" >
-    <string>Demo Manual</string>
-   </property>
-   <property name="shortcut" >
-    <string>H</string>
-   </property>
-  </action>
-  <action name="actionAbout" >
-   <property name="text" >
-    <string>About</string>
-   </property>
-   <property name="shortcut" >
-    <string>A</string>
-   </property>
-  </action>
-  <action name="actionAbout_CGAL" >
-   <property name="text" >
-    <string>About CGAL</string>
-   </property>
-  </action>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <customwidgets>
-  <customwidget>
-   <class>QGLViewer</class>
-   <extends>QWidget</extends>
-   <header>QGLViewer/qglviewer.h</header>
-  </customwidget>
- </customwidgets>
- <resources>
-  <include location="Periodic_3_triangulation_3.qrc" />
- </resources>
- <connections>
-  <connection>
-   <sender>actionClip_along_the_cube_square</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>action2_color_clipping</receiver>
-   <slot>setEnabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>-1</x>
-     <y>-1</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>-1</x>
-     <y>-1</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.cpp b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.cpp
deleted file mode 100644
index 2a3c126..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.cpp
+++ /dev/null
@@ -1,1400 +0,0 @@
-#include "Scene.h"
-
-void Scene::init() {
-  // undo from QGLViewer internal initializeGL function
-  glDisable(GL_COLOR_MATERIAL);
-
-  // camera
-  // only 2.7 gets an 'f' as VC++ warns if we don't
-  ui->viewer->camera()->setPosition(Vec(0.5,0.5,2.7f));
-  ui->viewer->camera()->lookAt(Vec(0.5,0.5,0.5));
-
-  // scene inits
-  ui->viewer->setSceneCenter(qglviewer::Vec(0.5,0.5,0.5));
-  ui->viewer->setSceneRadius(2.0);
-  ui->viewer->setBackgroundColor(Qt::white);
-  ui->viewer->setForegroundColor(Qt::red);
-  pQuadric = gluNewQuadric();
-
-  // OpenGL inits
-  glPointSize(10.0);
-  glLineWidth(1.0);
-  glEnable(GL_POINT_SMOOTH);
-  glEnable(GL_LINE_SMOOTH);
-
-  l_triangulation = glGenLists(1);
-  l_domain = glGenLists(2);
-
-  // Scene OpenGL state
-  gl_draw_domain();
-  init_scene(EMPTY);
-}
-
-// Draws the triangulation
-void Scene::draw() {
-
-  // Draw the triangulation itself that is stored in the list.
-  glCallList(l_triangulation);
-
-  if (flying_ball) {
-    change_material(materials[FLYING_BALL_COLOR]);
-    if (wireframe) {
-      glBegin(GL_POINTS);
-      glVertex3f(moving_point.x(),moving_point.y(),moving_point.z());
-      glEnd();
-    } else {
-    // draw the moving point
-      glPushMatrix();
-        glTranslated(moving_point.x(),moving_point.y(),moving_point.z());
-        gluSphere(pQuadric, 0.02,15,15);
-        glFlush();
-      glPopMatrix();
-    }
-  }
-
-  // draw the domain (unit square / cube)
-  if (ddomain) glCallList(l_domain);
-
-  glDisable(GL_LIGHTING);
-  if (dlocate) gl_draw_location();
-  if (dconflict) gl_draw_conflict();
-  if (!wireframe) glEnable(GL_LIGHTING);
-  glFlush();
-}
-
-void Scene::load_points(const QString& fileName) {
-  p3dt.clear();
-  std::vector<Point> points;
-  std::ifstream ifs(fileName.toAscii().data() );
-  std::copy(std::istream_iterator<Point>(ifs), 
-  std::istream_iterator<Point>(),
-  std::back_inserter(points));
-  std::random_shuffle(points.begin(), points.end());
-  p3dt.insert(points.begin(), points.end());
-
-  make_draw_list();
-
-  QString snv;
-  int nv = static_cast<int>(p3dt.number_of_vertices());
-  snv.setNum(nv);
-  emit message(QString("|V| = ") + snv, 0);
-
-  draw();
-}
-
-// update the position of the moving point
-void Scene::update_position()
-{
-  double x = moving_point.x() +0.01023;
-  double y = moving_point.y() +0.003123;
-  double z = (in_plane ? 0.0 : moving_point.z() +0.02567);
-  if(x>1.)x-=1.;
-  if(y>1.)y-=1.;
-  if(z>1.)z-=1.;
-  moving_point = Point(x,y,z);
-  // TODO try to find a better possibility
-  ui->viewer->update();
-}
-
-void Scene::make_draw_list()
-{
-  // Prepare set of segments
-  Segment_set segments_to_draw;
-  primitives_from_geom_it(segments_to_draw);
-  if (cube_clipping && !two_color_clipping) segment_clipping(segments_to_draw);
-
-  // Create new list
-  glNewList(l_triangulation, GL_COMPILE); 
-
-  // Draw vertices
-  change_material(materials[VERTEX_COLOR]);
-  if (wireframe) glBegin(GL_POINTS);
-  for (Point_iterator pit = p3dt.periodic_points_begin(it_type) ;
-       pit != p3dt.periodic_points_end(it_type) ; pit++)
-    gl_draw_vertex(pit->first, 0.02);
-  if (wireframe) glEnd();
-
-  // Draw segments
-  if (wireframe) glBegin(GL_LINES);
-  if (cube_clipping && two_color_clipping) {
-      change_material(materials[CLIPPING_COLOR]);
-      segment_2color_clipping(segments_to_draw);
-  }
-  change_material(materials[EDGE_COLOR]);
-  for (Segment_set::iterator it = segments_to_draw.begin() ;
-       it != segments_to_draw.end(); it++)
-    gl_draw_edge(it->source(),it->target(),0.005);
-  if (wireframe) glEnd();
-
-  glFlush();
-  glEndList();
-
-  // TODO: viewer should be specialized and then the respective
-  // viewer->paintGL should be called.
-  ui->viewer->update();
-}
-
-// some initialization templates
-void Scene::init_scene(Init ID) {
-  bool temp_flags[] = {dlocate, dconflict};
-  dlocate = false;
-  dconflict = false;
-  p3dt.clear();
-  make_draw_list();
-  RandPts rp(0.5);
-  Point pt2;
-  switch (ID) {
-  case GRID:
-    p3dt.insert_dummy_points();
-    break;
-  case SINGLE:
-    p3dt.insert(Point(0.3,0.4,0.5));
-    break;
-  case PLANE:
-    for (int i=0 ; i<10 ; i++) {
-      pt2 = *rp+Vector(0.5,0.5,0.5);
-      rp++;
-      p3dt.insert(Point(pt2.x(),pt2.y(),0.0));
-    }
-    break;
-  case RANDOM:
-    do {
-      p3dt.insert(*rp+Vector(0.5,0.5,0.5));
-      rp++;
-    } 
-    while (p3dt.number_of_vertices()<30);
-  default:
-    break;
-  }
-  dlocate = temp_flags[0];
-  dconflict = temp_flags[1];
-  make_draw_list();
-}
-
-// Draw a unit square in the x/y-plane
-void Scene::gl_draw_square() {
-  glNewList(l_domain, GL_COMPILE);
-  change_material(materials[DOMAIN_COLOR]);
-  if (!wireframe) {
-    glPushMatrix();
-    glTranslated(0.5,0.5,0.5);
-    glRotated(90,1.0,0.0,0.0);
-    glTranslated(-0.5,-0.5,-0.5);
-    for (float x=0.0; x<2.0; x+=1.0) {
-      for (float y=0.0; y<1.0; y+=1.0) {
-	glPushMatrix();        
-	glTranslated(x,y,0.0);
-	gluCylinder(pQuadric,0.01,0.01,1.0,25,2);
-	glPopMatrix();
-      }
-    }
-    glPopMatrix();
-    glPushMatrix();
-    glTranslated(0.5,0.5,0.5);
-    glRotated(90,0.0,1.0,0.0);
-    glTranslated(-0.5,-0.5,-0.5);
-    for (float x=1.0; x<2.0; x+=1.0) {
-      for (float y=0.0; y<2.0; y+=1.0) {
-	glPushMatrix();        
-	glTranslated(x,y,0.0);
-	gluCylinder(pQuadric,0.01,0.01,1.0,25,2);
-	glPopMatrix();
-      }
-    }
-    glPopMatrix();
-  } else {
-    glBegin(GL_LINES);
-    glVertex3d(0.0,0.0,0.0);
-    glVertex3d(1.0,0.0,0.0);
-    glVertex3d(0.0,1.0,0.0);
-    glVertex3d(1.0,1.0,0.0);
-    glVertex3d(0.0,0.0,0.0);
-    glVertex3d(0.0,1.0,0.0);
-    glVertex3d(1.0,0.0,0.0);
-    glVertex3d(1.0,1.0,0.0);
-    glEnd();
-  }
-  glEndList();
-}
-
-// Draw a unit cube
-void Scene::gl_draw_cube() {
-  glNewList(l_domain, GL_COMPILE);
-  change_material(materials[DOMAIN_COLOR]);
-  if (!wireframe) {
-    glPushMatrix();        
-    for (float x=0.0; x<2.0; x+=1.0) {
-      for (float y=0.0; y<2.0; y+=1.0) {
-	glPushMatrix();        
-	glTranslated(x,y,0.0);
-	gluCylinder(pQuadric,0.01,0.01,1.0,25,2);
-	glPopMatrix();
-      }
-    }
-    glPopMatrix();
-    glPushMatrix();
-    glTranslated(0.5,0.5,0.5);
-    glRotated(90,1.0,0.0,0.0);
-    glTranslated(-0.5,-0.5,-0.5);
-    for (float x=0.0; x<2.0; x+=1.0) {
-      for (float y=0.0; y<2.0; y+=1.0) {
-	glPushMatrix();        
-	glTranslated(x,y,0.0);
-	gluCylinder(pQuadric,0.01,0.01,1.0,25,2);
-	glPopMatrix();
-      }
-    }
-    glPopMatrix();
-    glPushMatrix();
-    glTranslated(0.5,0.5,0.5);
-    glRotated(90,0.0,1.0,0.0);
-    glTranslated(-0.5,-0.5,-0.5);
-    for (float x=0.0; x<2.0; x+=1.0) {
-      for (float y=0.0; y<2.0; y+=1.0) {
-	glPushMatrix();        
-	glTranslated(x,y,0.0);
-	gluCylinder(pQuadric,0.01,0.01,1.0,25,2);
-	glPopMatrix();
-      }
-    }
-    glPopMatrix();
-  } else {
-    glBegin(GL_LINES);
-    glVertex3d(0.0,0.0,0.0);
-    glVertex3d(1.0,0.0,0.0);
-    glVertex3d(0.0,1.0,0.0);
-    glVertex3d(1.0,1.0,0.0);
-    glVertex3d(0.0,0.0,1.0);
-    glVertex3d(1.0,0.0,1.0);
-    glVertex3d(0.0,1.0,1.0);
-    glVertex3d(1.0,1.0,1.0);
-  
-    glVertex3d(0.0,0.0,0.0);
-    glVertex3d(0.0,1.0,0.0);
-    glVertex3d(1.0,0.0,0.0);
-    glVertex3d(1.0,1.0,0.0);
-    glVertex3d(0.0,0.0,1.0);
-    glVertex3d(0.0,1.0,1.0);
-    glVertex3d(1.0,0.0,1.0);
-    glVertex3d(1.0,1.0,1.0);
-
-    glVertex3d(0.0,0.0,0.0);
-    glVertex3d(0.0,0.0,1.0);
-    glVertex3d(1.0,0.0,0.0);
-    glVertex3d(1.0,0.0,1.0);
-    glVertex3d(0.0,1.0,0.0);
-    glVertex3d(0.0,1.0,1.0);
-    glVertex3d(1.0,1.0,0.0);
-    glVertex3d(1.0,1.0,1.0);
-    glEnd();
-  }
-  glEndList();
-}
-
-// get the offset that is common to all points of a triangle in the
-// triangulation
-inline void Scene::get_tri_offsets(const Cell_handle ch, int i,
-    Offset &off0, Offset &off1, Offset &off2) const {
-  off0 = p3dt.get_offset(ch,(i+1)&3);
-  off1 = p3dt.get_offset(ch,(i+2)&3);
-  off2 = p3dt.get_offset(ch,(i+3)&3);
-  if (it_type == P3DT::UNIQUE || it_type == P3DT::UNIQUE_COVER_DOMAIN) {
-    int diff_offx = (std::min)((std::min)(off0.x(),off1.x()),off2.x());
-    int diff_offy = (std::min)((std::min)(off0.y(),off1.y()),off2.y());
-    int diff_offz = (std::min)((std::min)(off0.z(),off1.z()),off2.z());
-    Offset diff_off(diff_offx, diff_offy, diff_offz);
-    off0 -= diff_off;
-    off1 -= diff_off;
-    off2 -= diff_off;
-  }
-}
-
-// get the offset that is common to all points of a tetrahedron in the
-// triangulation
-inline void Scene::get_tet_offsets(const Cell_handle ch,
-    Offset &off0, Offset &off1, Offset &off2, Offset &off3) const {
-  off0 = p3dt.get_offset(ch,0);
-  off1 = p3dt.get_offset(ch,1);
-  off2 = p3dt.get_offset(ch,2);
-  off3 = p3dt.get_offset(ch,3);
-  if (it_type == P3DT::UNIQUE || it_type == P3DT::UNIQUE_COVER_DOMAIN) {
-    int diff_offx = (std::min)((std::min)(off0.x(),off1.x()),
-			     (std::min)(off2.x(),off3.x()));
-    int diff_offy = (std::min)((std::min)(off0.y(),off1.y()),
-			     (std::min)(off2.y(),off3.y()));
-    int diff_offz = (std::min)((std::min)(off0.z(),off1.z()),
-			     (std::min)(off2.z(),off3.z()));
-    Offset diff_off(diff_offx, diff_offy, diff_offz);
-    off0 -= diff_off;
-    off1 -= diff_off;
-    off2 -= diff_off;
-    off3 -= diff_off;
-  }
-}
-
-// return an integer that encodes the translations which have to be
-// applied to the triangle to draw
-inline int Scene::get_tri_drawing_offsets(const Cell_handle ch, int i) const {
-  Offset off0, off1, off2;
-  // if drawing boundary cells multiply is not activated then there is
-  // nothing to do.
-  switch( it_type ) {
-  case P3DT::UNIQUE_COVER_DOMAIN:
-    get_tri_offsets(ch,i,off0,off1,off2);
-    break;
-  case P3DT::STORED_COVER_DOMAIN:
-    off0 = p3dt.int_to_off(ch->offset((i+1)&3));
-    off1 = p3dt.int_to_off(ch->offset((i+2)&3));
-    off2 = p3dt.int_to_off(ch->offset((i+3)&3));
-    break;
-  default:
-    return 0;
-  }
-
-  CGAL_assertion(off0.x() == 0 || off0.x() == 1);
-  CGAL_assertion(off0.y() == 0 || off0.y() == 1);
-  CGAL_assertion(off0.z() == 0 || off0.z() == 1);
-  CGAL_assertion(off1.x() == 0 || off1.x() == 1);
-  CGAL_assertion(off1.y() == 0 || off1.y() == 1);
-  CGAL_assertion(off1.z() == 0 || off1.z() == 1);
-  CGAL_assertion(off2.x() == 0 || off2.x() == 1);
-  CGAL_assertion(off2.y() == 0 || off2.y() == 1);
-  CGAL_assertion(off2.z() == 0 || off2.z() == 1);
-    
-  int offx = ( ((off0.x() == 0 && off1.x() == 0 && off2.x() == 0)
-		|| (off0.x() == 1 && off1.x() == 1 && off2.x() == 1)) ? 0 : 1);
-  int offy = ( ((off0.y() == 0 && off1.y() == 0 && off2.y() == 0)
-		|| (off0.y() == 1 && off1.y() == 1 && off2.y() == 1)) ? 0 : 1);
-  int offz = ( ((off0.z() == 0 && off1.z() == 0 && off2.z() == 0)
-		|| (off0.z() == 1 && off1.z() == 1 && off2.z() == 1)) ? 0 : 1);
-    
-  return( 4*offx + 2*offy + offz );
-}
-
-// return an integer that encodes the translations which have to be
-// applied to the tetrahedron to draw
-inline int Scene::get_tet_drawing_offsets(const Cell_handle ch) const {
-  Offset off0, off1, off2, off3;
-  // if drawing boundary cells multiply is not activated then there is
-  // nothing to do.
-  switch( it_type ) {
-  case P3DT::UNIQUE_COVER_DOMAIN:
-    get_tet_offsets(ch,off0,off1,off2,off3);
-    break;
-  case P3DT::STORED_COVER_DOMAIN:
-    off0 = p3dt.int_to_off(ch->offset(0));
-    off1 = p3dt.int_to_off(ch->offset(1));
-    off2 = p3dt.int_to_off(ch->offset(2));
-    off3 = p3dt.int_to_off(ch->offset(3));
-    break;
-  default:
-    return 0;
-  }
-
-  CGAL_assertion(off0.x() == 0 || off0.x() == 1);
-  CGAL_assertion(off0.y() == 0 || off0.y() == 1);
-  CGAL_assertion(off0.z() == 0 || off0.z() == 1);
-  CGAL_assertion(off1.x() == 0 || off1.x() == 1);
-  CGAL_assertion(off1.y() == 0 || off1.y() == 1);
-  CGAL_assertion(off1.z() == 0 || off1.z() == 1);
-  CGAL_assertion(off2.x() == 0 || off2.x() == 1);
-  CGAL_assertion(off2.y() == 0 || off2.y() == 1);
-  CGAL_assertion(off2.z() == 0 || off2.z() == 1);
-  CGAL_assertion(off3.x() == 0 || off3.x() == 1);
-  CGAL_assertion(off3.y() == 0 || off3.y() == 1);
-  CGAL_assertion(off3.z() == 0 || off3.z() == 1);
-    
-  int offx = ( ((off0.x() == 0 && off1.x() == 0 
-		 && off2.x() == 0 && off3.x() == 0)
-		|| (off0.x() == 1 && off1.x() == 1 
-		    && off2.x() == 1 && off3.x() == 1)) ? 0 : 1);
-  int offy = ( ((off0.y() == 0 && off1.y() == 0 
-		 && off2.y() == 0 && off3.y() == 0)
-		|| (off0.y() == 1 && off1.y() == 1 
-		    && off2.y() == 1 && off3.y() == 1)) ? 0 : 1);
-  int offz = ( ((off0.z() == 0 && off1.z() == 0 
-		 && off2.z() == 0 && off3.z() == 0)
-		|| (off0.z() == 1 && off1.z() == 1 
-		    && off2.z() == 1 && off3.z() == 1)) ? 0 : 1);
-    
-  return( 4*offx + 2*offy + offz );
-}
-
-// construct a triangle from a given facet, given vertex offsets and a
-// common offset
-inline Triangle Scene::construct_triangle(const Cell_handle ch, int i,
-    const Offset& off0, const Offset& off1, const Offset& off2, int off) const {
-  if (it_type == P3DT::STORED || it_type == P3DT::UNIQUE) {
-    CGAL_assertion( off == 0 );
-    return p3dt.construct_triangle(
-        ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
-	ch->vertex((i+3)&3)->point(), off0, off1, off2);
-  }
-  Offset diff_off((off>>2)&1,(off>>1)&1,off&1);
-  switch (it_type) {
-  case P3DT::STORED_COVER_DOMAIN:
-    return p3dt.construct_triangle(
-        ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
-	ch->vertex((i+3)&3)->point(),
-        p3dt.combine_offsets(off0,-diff_off),
-        p3dt.combine_offsets(off1,-diff_off),
-        p3dt.combine_offsets(off2,-diff_off));
-    break;
-  case P3DT::UNIQUE_COVER_DOMAIN:
-    return p3dt.construct_triangle(
-        ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
-	ch->vertex((i+3)&3)->point(),
-        off0-diff_off, off1-diff_off, off2-diff_off);
-    break;
-  default:
-    CGAL_assertion(false);
-    return Triangle();
-  }
-}
-
-// construct a triangle from a given cell, given vertex offsets and a
-// common offset
-inline Tetrahedron Scene::construct_tetrahedron(const Cell_handle ch,
-    const Offset& off0, const Offset& off1, const Offset& off2,
-    const Offset& off3, int off) const {
-  if (it_type == P3DT::STORED || it_type == P3DT::UNIQUE) {
-    CGAL_assertion( off == 0 );
-    return p3dt.construct_tetrahedron(
-        ch->vertex(0)->point(), ch->vertex(1)->point(),
-	ch->vertex(2)->point(), ch->vertex(3)->point(), 
-	off0, off1, off2, off3);
-  }
-  Offset diff_off((off>>2)&1,(off>>1)&1,off&1);
-  switch (it_type) {
-  case P3DT::STORED_COVER_DOMAIN:
-    return p3dt.construct_tetrahedron(
-	ch->vertex(0)->point(), ch->vertex(1)->point(),
-	ch->vertex(2)->point(), ch->vertex(3)->point(), 
-        p3dt.combine_offsets(off0,-diff_off),
-        p3dt.combine_offsets(off1,-diff_off),
-        p3dt.combine_offsets(off2,-diff_off),
-	p3dt.combine_offsets(off3,-diff_off));
-    break;
-  case P3DT::UNIQUE_COVER_DOMAIN:
-    return p3dt.construct_tetrahedron(
-        ch->vertex(0)->point(), ch->vertex(1)->point(), 
-	ch->vertex(2)->point(), ch->vertex(3)->point(),
-        off0-diff_off, off1-diff_off, off2-diff_off, off3-diff_off);
-    break;
-  default:
-    CGAL_assertion(false);
-    return Tetrahedron();
-  }
-}
-
-// Draw a point, either es vertex or as sphere
-inline void Scene::gl_draw_vertex(const Point& p, const FT& radius) const {
-  if (p.z()!=0 && in_plane) return;
-  if (wireframe) {
-    glVertex3f(p.x(),p.y(),p.z());
-  } else {
-    glPushMatrix();
-    glTranslated(p.x(),p.y(),p.z());
-    gluSphere(pQuadric,radius,15,15);
-    glFlush();
-    glPopMatrix();
-  }
-}
-
-// Draw an edge, either as line or as cylinder
-inline void Scene::gl_draw_edge(Point p1, Point p2, FT radius ) {
-  if (in_plane && (p1.z()!=0. || p2.z()!=0.)) return;
-  if (wireframe) {
-    glVertex3d(p1.x(),p1.y(),p1.z());
-    glVertex3d(p2.x(),p2.y(),p2.z());
-    return;
-  }
-
-  Point p = p1;
-  Vector v = p2-p1;
-
-  FT len = (FT)std::sqrt(CGAL_NTS to_double(v*v));
-
-  // normalize
-  v = v / len;
-  double angle = 0.0;
-  if(std::sqrt(CGAL_NTS to_double(v.x()*v.x()+v.y()*v.y())) > 1)
-    angle = 90.0f;
-  else
-    angle = asin(std::sqrt(CGAL_NTS to_double(v.x()*v.x()+v.y()*v.y())))/3.14159*180.0;
-  if(v.z() < 0)
-    angle = 180.0-angle;
-  Vector axis;
-  if (v.x() == 0.0 && v.y() == 0.0)
-    axis = Vector(1.0,0.0,0.0);
-  else
-    axis = Vector(v.y(),-v.x(),0.0);
-
-  glPushMatrix();        
-  glTranslated(CGAL_NTS to_double(p.x()),
-	       CGAL_NTS to_double(p.y()),
-	       CGAL_NTS to_double(p.z()));
-  glPushMatrix();        
-  glRotated(-angle,CGAL_NTS to_double(axis.x()),
-	    CGAL_NTS to_double(axis.y()),
-	    CGAL_NTS to_double(axis.z()));
-
-  // draw a cylinder
-  gluCylinder(pQuadric,CGAL_NTS to_double(radius),
-	      CGAL_NTS to_double(radius),
-	      CGAL_NTS to_double(len),25,2);
-  glPopMatrix();
-  glPopMatrix();
-  glPopMatrix();
-}
-
-// collect primitives (segments, triangles, tetrahedra) from the
-// triangulation using the geometric iterators and store them in the
-// given segment set
-inline void Scene::primitives_from_geom_it(Segment_set& sset) {
-  Point p0,p1,p2,p3;
-  switch(draw_type) {
-  case SEGMENT:
-    for ( Segment_iterator sit = p3dt.periodic_segments_begin(it_type) ;
-	  sit != p3dt.periodic_segments_end(it_type) ; ++sit ) {
-      sset.insert(p3dt.segment(*sit));
-    }
-    break;
-  case TRIANGLE:
-    for ( Triangle_iterator tit = p3dt.periodic_triangles_begin(it_type) ;
-	  tit != p3dt.periodic_triangles_end(it_type) ; ++tit ) {
-      p0 = p3dt.point(tit->at(0));
-      p1 = p3dt.point(tit->at(1));
-      p2 = p3dt.point(tit->at(2));
-      sset.insert(p0 < p1 ? Segment(p0,p1) : Segment(p1,p0));
-      sset.insert(p0 < p2 ? Segment(p0,p2) : Segment(p2,p0));
-      sset.insert(p1 < p2 ? Segment(p1,p2) : Segment(p2,p1));
-    }
-    break;
-  case TETRAHEDRON:
-    for ( Tetrahedron_iterator tit = p3dt.periodic_tetrahedra_begin(it_type) ;
-	  tit != p3dt.periodic_tetrahedra_end(it_type) ; ++tit ) {
-      p0 = p3dt.point(tit->at(0));
-      p1 = p3dt.point(tit->at(1));
-      p2 = p3dt.point(tit->at(2));
-      p3 = p3dt.point(tit->at(3));
-      sset.insert((p0 < p1) ? Segment(p0,p1) : Segment(p1,p0));
-      sset.insert((p0 < p2) ? Segment(p0,p2) : Segment(p2,p0));
-      sset.insert((p0 < p3) ? Segment(p0,p3) : Segment(p3,p0));
-      sset.insert((p1 < p2) ? Segment(p1,p2) : Segment(p2,p1));
-      sset.insert((p1 < p3) ? Segment(p1,p3) : Segment(p3,p1));
-      sset.insert((p2 < p3) ? Segment(p2,p3) : Segment(p3,p2));
-    }
-    break;
-  }
-}
-
-// clip segments from the given segment set that are partially outside
-// of the unit cube/square. Eliminate those who are completely outside
-inline void Scene::segment_clipping(Segment_set& sset) {
-  Segment_clipper clipper;
-  Segment_set sset_tmp;
-  for (Segment_set::iterator it = sset.begin() ; it != sset.end() ; ++it) {
-    Point s = it->source();
-    Point t = it->target();
-    if (clipper(s,t)) sset_tmp.insert((s<t?Segment(s,t):Segment(t,s)));
-  }
-  std::swap(sset, sset_tmp);
-}
-
-// clip segments from the given segment set that are partially outside
-// of the unit cube/square. Draw their outside part in a different
-// color.
-// TODO: don't eliminate segments that are completely outside but draw
-// them in the different color as well
-inline void Scene::segment_2color_clipping (Segment_set& sset) {
-  Segment_clipper clipper;
-  Segment_set sset_tmp, sset_out;
-  for (Segment_set::iterator it = sset.begin() ; it != sset.end() ; ++it) {
-    Point s = it->source();
-    Point t = it->target();
-    if (clipper(s,t)) {
-      sset_tmp.insert((s<t?Segment(s,t):Segment(t,s)));
-      Point p = it->source();
-      Point q = it->target();
-      if (Segment(p,s).squared_length() > Segment(p,t).squared_length())
-	std::swap(s,t);
-      if (p!=s) sset_out.insert((p<s?Segment(p,s):Segment(s,p)));
-      if (q!=t) sset_out.insert((q<t?Segment(q,t):Segment(t,q)));
-    }
-  }
-
-  for (Segment_set::iterator sit = sset_out.begin() ;
-       sit != sset_out.end() ; ++sit)
-    gl_draw_edge(sit->source(), sit->target(), 0.005);
-
-  std::swap(sset, sset_tmp);
-}
-
-// Draw the faces of the tetrahedron in which the moving point is currently
-// located transparently. It depends on it_type which periodic copies
-// of the respective cell will be drawn. In general it will be all
-// cells that occur in the draw list
-void Scene::gl_draw_location() {
-  if (p3dt.number_of_vertices() == 0) return;
-  // Do the point location
-  Cell_handle ch = p3dt.locate(moving_point);
-  std::vector<Projected_triangle> cf;
-
-  // Transparency
-  glEnable(GL_BLEND);
-  glColor4f(0.f, 0.f , 0.5f, 0.5f);
-  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
-  if (in_plane) {
-    int i=0;
-    int count = 0;
-    // Figure out whether there is a facet that is completly contained
-    // in the z=0 plane
-    for (int j=0 ; j<4 ; j++) {
-      if (ch->vertex(j)->point().z() != 0.0 ||
-	  p3dt.get_offset(ch,j).z() != 0) {
-	i=j;
-	count++;
-      }
-    }
-    // If so, compute its triangle(s) and insert it in cf
-    if (count==1) {
-      Offset off0, off1, off2;
-      get_tri_offsets(ch, i, off0, off1, off2);
-      int diff_off = get_tri_drawing_offsets(ch, i);
-      for (int offs=0 ; offs<=diff_off ; offs++) {
-	if ((((~offs)|diff_off)&7)!=7) continue;
-	Triangle tri_to_draw = construct_triangle(ch,i,off0,off1,off2,offs);
-	Point p = tri_to_draw.vertex(0);
-	Point q = tri_to_draw.vertex(1);
-	Point r = tri_to_draw.vertex(2);
-	cf.push_back(Projected_triangle(.0,Triangle(p,q,r)));
-      }
-    }
-  } else {
-    double modelMatrix[16];
-    double projMatrix[16];
-    int viewport[4];
-    glGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix);
-    glGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
-    glGetIntegerv(GL_VIEWPORT, viewport);
-
-    // Compute the triangles that are the facets of the cell and
-    // insert them in cf
-    Offset off0,off1,off2,off3;
-    get_tet_offsets(ch, off0, off1, off2, off3);
-    int diff_off = get_tet_drawing_offsets(ch);
-
-    for (int offs=0 ; offs<=diff_off ; offs++) {
-      if ((((~offs)|diff_off)&7)!=7) continue;
-      Tetrahedron tet_to_draw = construct_tetrahedron(
-	  ch, off0, off1, off2, off3, offs);
-
-      for(int i=0; i < 4; i++){ 
-	Point p = tet_to_draw.vertex((i+1)&3);
-	Point q = tet_to_draw.vertex((i+2)&3);
-	Point r = tet_to_draw.vertex((i+3)&3);
-	Vector c= (Vector(Point(),p)+Vector(Point(),q)+Vector(Point(),r))/3.;
-	Point cp = Point(c.x(),c.y(),c.z());
-	// project facet center 
-	double px,py,pz;
-	gluProject(cp.x(),cp.y(),cp.z(),
-		   modelMatrix, projMatrix, viewport,
-		   &px,&py,&pz);
-	cf.push_back(Projected_triangle(pz,Triangle(p,q,r)));
-      }
-    }
-
-    // Sort cf according to their z coordinates to enable transparency
-    std::sort(cf.begin(), cf.end(), Projected_triangle::closer);
-  }
-
-  // Draw all triangles from cf
-  glBegin(GL_TRIANGLES);
-  for (std::vector<Projected_triangle >::iterator cfit = cf.begin() ; cfit != cf.end() ; cfit++) {
-    Point p = cfit->t().vertex(0);
-    Point q = cfit->t().vertex(1);
-    Point r = cfit->t().vertex(2);
-    glVertex3d(p.x(), p.y(), p.z());
-    glVertex3d(q.x(), q.y(), q.z());
-    glVertex3d(r.x(), r.y(), r.z());
-  }
-  glEnd();
-
-  glDisable(GL_BLEND);
-}
-
-// Draw the boundary faces of the current conflict region of the
-// moving point transparently. It depends on it_type which periodic
-// copies of the respective cell will be drawn. In general it will be
-// all cells that occur in the draw list.
-void Scene::gl_draw_conflict() {
-  if (p3dt.number_of_vertices() == 0) return;
-  Cell_handle ch;
-  std::vector<Cell_handle> cic;
-  std::vector<Facet> boundary_facets;
-  // Find the conflict region
-  Cell_handle c = p3dt.locate(moving_point);
-  p3dt.find_conflicts(moving_point,c,std::back_inserter(boundary_facets),std::back_inserter(cic),CGAL::Emptyset_iterator());
-
-  std::vector<Projected_triangle> bfm;
-
-  // Transparency
-  glEnable(GL_BLEND);
-  glColor4f(.69f, 0.18f , 0.26f, 0.6f);
-  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
-  if (in_plane) {
-    for (unsigned int k=0 ; k<cic.size(); k++) {
-      ch = cic[k];
-
-      int i = 0;
-      int count = 0;
-      // Figure out whether there is a facet that is completely
-      // contained in the z=0 plane
-      for (int j=0 ; j<4 ; j++) {
-	if (ch->vertex(j)->point().z() != 0.0 ||
-	    p3dt.get_offset(ch,j).z() != 0) {
-	  i=j;
-	  count++;
-	}
-      }
-      // If so, compute its triangle(s) and insert it in bfm
-      if (count==1) {
-	Offset off0, off1, off2;
-	get_tri_offsets(ch, i, off0, off1, off2);
-	int diff_off = get_tri_drawing_offsets(ch,i);
-	for (int offs = 0 ; offs<=diff_off ; offs++) {
-	  if ((((~offs)|diff_off)&7)!=7) continue;
-	  Triangle tri_to_draw = construct_triangle(ch,i,off0,off1,off2,offs);
-	  Point p = tri_to_draw.vertex(0);
-	  Point q = tri_to_draw.vertex(1);
-	  Point r = tri_to_draw.vertex(2);
-	  bfm.push_back(Projected_triangle(.0,Triangle(p,q,r)));
-	}
-      }
-    }
-  } else {
-    double modelMatrix[16];
-    double projMatrix[16];
-    int viewport[4];
-    glGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix);
-    glGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
-    glGetIntegerv(GL_VIEWPORT, viewport);
-
-    for (unsigned int i=0 ; i<boundary_facets.size(); i++) {
-      ch = boundary_facets[i].first;
-      int j=boundary_facets[i].second;
-
-      // Compute the triangle(s) of the facet and insert them in bfm
-      Offset off0, off1, off2;
-      get_tri_offsets(ch, j, off0, off1, off2);
-      int diff_off = get_tri_drawing_offsets(ch, j);
-      for (int offs=0 ; offs<=diff_off ; offs++) {
-	if ((((~offs)|diff_off)&7)!=7) continue;
-	Triangle tri_to_draw = construct_triangle(ch,j,off0,off1,off2,offs);
-	Point p = tri_to_draw.vertex(0);
-	Point q = tri_to_draw.vertex(1);
-	Point r = tri_to_draw.vertex(2);
-	Vector c= (Vector(Point(),p)+Vector(Point(),q)+Vector(Point(),r))/3.;
-	Point cp = Point(c.x(),c.y(),c.z());
-	// project facet center 
-	double px,py,pz;
-	gluProject(cp.x(),cp.y(),cp.z(),
-		   modelMatrix, projMatrix, viewport,
-		   &px,&py,&pz);
-	bfm.push_back(Projected_triangle(pz,Triangle(p,q,r)));
-      }
-    }
-    
-    // Sort bfm according to their z coordinates to enable transparency
-    std::sort(bfm.begin(), bfm.end(), Projected_triangle::closer);
-  }
-
-  // Draw all triangles from bfm
-  glBegin(GL_TRIANGLES);
-  for (std::vector<Projected_triangle >::iterator bfmit = bfm.begin() ; 
-       bfmit != bfm.end() ; bfmit++) {
-    Point p = bfmit->t().vertex(0);
-    Point q = bfmit->t().vertex(1);
-    Point r = bfmit->t().vertex(2);
-    glVertex3d(p.x(), p.y(), p.z());
-    glVertex3d(q.x(), q.y(), q.z());
-    glVertex3d(r.x(), r.y(), r.z());
-  }
-  glEnd();
-  
-  glDisable(GL_BLEND);
-}
-
-// provide some color constants for the GLU primitive appearance.
-void Scene::change_material(const QString &string) {
-    float    ambient[]  = {0.0f,0.0f,0.0f,1.0f};
-    float    diffuse[]  = {0.0f,0.0f,0.0f,1.0f};
-    float    specular[]  = {0.0f,0.0f,0.0f,1.0f};
-    float    emission[]  = {0.3f,0.3f,0.3f,1.0f};
-    float shininess[] = {0.0f};
-
-    // Change
-    if(string == "Silver")
-    {
-        // Ambient
-        ambient[0] = 0.19225f;
-        ambient[1] = 0.19225f;
-        ambient[2] = 0.19225f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.50754f;
-        diffuse[1] = 0.50754f;
-        diffuse[2] = 0.50754f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.508273f;
-        specular[1] = 0.508273f;
-        specular[2] = 0.508273f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 51.2f;
-    }
-
-    else
-
-    // Change
-    if(string == "Light silver")
-    {
-        // Ambient
-        ambient[0] = 0.49225f;
-        ambient[1] = 0.49225f;
-        ambient[2] = 0.49225f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.80754f;
-        diffuse[1] = 0.80754f;
-        diffuse[2] = 0.80754f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.808273f;
-        specular[1] = 0.808273f;
-        specular[2] = 0.808273f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 51.2f;
-    }
-
-    else
-
-    // Change
-    if(string == "Gold")
-    {
-        // Ambient
-        ambient[0] = 0.24725f;
-        ambient[1] = 0.1995f;
-        ambient[2] = 0.0745f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.75164f;
-        diffuse[1] = 0.60648f;
-        diffuse[2] = 0.22648f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.928281f;
-        specular[1] = 0.855802f;
-        specular[2] = 0.666065f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 51.2f;
-    }
-
-    else
-
-    // Change
-    if(string == "Jade")
-    {
-        // Ambient
-        ambient[0] = 0.135f;
-        ambient[1] = 0.2225f;
-        ambient[2] = 0.1575f;
-        ambient[3] = 0.95f;
-        // Diffuse
-        diffuse[0] = 0.54f;
-        diffuse[1] = 0.89f;
-        diffuse[2] = 0.63f;
-        diffuse[3] = 0.95f;
-        // Specular
-        specular[0] = 0.316228f;
-        specular[1] = 0.316228f;
-        specular[2] = 0.316228f;
-        specular[3] = 0.95f;
-        // Shininess
-        shininess[0] = 12.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Light blue")
-    {
-        // Ambient
-        ambient[0] = 0.0f;
-        ambient[1] = 0.5f;
-        ambient[2] = 0.75f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.0f;
-        diffuse[1] = 0.5f;
-        diffuse[2] = 1.0f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.75f;
-        specular[1] = 0.75f;
-        specular[2] = 0.75f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 64.0f;
-    }
-
-    else
-
-    // Change
-    if(string == "Pink")
-    {
-        // Ambient
-        ambient[0] = 0.75f;
-        ambient[1] = 0.0f;
-        ambient[2] = 0.5f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 1.0f;
-        diffuse[1] = 0.0f;
-        diffuse[2] = 0.5f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.75f;
-        specular[1] = 0.75f;
-        specular[2] = 0.75f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 64.0f;
-    }
-
-    else
-
-    // Change
-    if(string == "Red")
-    {
-        // Ambient
-        ambient[0] = 0.75f;
-        ambient[1] = 0.0f;
-        ambient[2] = 0.0f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 1.0f;
-        diffuse[1] = 0.0f;
-        diffuse[2] = 0.0f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.75f;
-        specular[1] = 0.75f;
-        specular[2] = 0.75f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 64.0f;
-    }
-
-    else
-
-    // Change
-    if(string == "Emerald")
-    {
-        // Ambient
-        ambient[0] = 0.0215f;
-        ambient[1] = 0.1745f;
-        ambient[2] = 0.0215f;
-        ambient[3] = 0.55f;
-        // Diffuse
-        diffuse[0] = 0.07568f;
-        diffuse[1] = 0.61424f;
-        diffuse[2] = 0.07568f;
-        diffuse[3] = 0.55f;
-        // Specular
-        specular[0] = 0.633f;
-        specular[1] = 0.727811f;
-        specular[2] = 0.633f;
-        specular[3] = 0.55f;
-        // Shininess
-        shininess[0] = 76.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Polished silver")
-    {
-        // Ambient
-        ambient[0] = 0.23125f;
-        ambient[1] = 0.23125f;
-        ambient[2] = 0.23125f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.2775f;
-        diffuse[1] = 0.2775f;
-        diffuse[2] = 0.2775f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.773911f;
-        specular[1] = 0.773911f;
-        specular[2] = 0.773911f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 89.6f;
-    }
-
-    else
-
-    // Change
-    if(string == "Chrome")
-    {
-        // Ambient
-        ambient[0] = 0.25f;
-        ambient[1] = 0.25f;
-        ambient[2] = 0.25f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.4f;
-        diffuse[1] = 0.4f;
-        diffuse[2] = 0.4f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.774597f;
-        specular[1] = 0.774597f;
-        specular[2] = 0.774597f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 76.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Copper")
-    {
-        // Ambient
-        ambient[0] = 0.19125f;
-        ambient[1] = 0.0735f;
-        ambient[2] = 0.0225f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.7038f;
-        diffuse[1] = 0.27048f;
-        diffuse[2] = 0.0828f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.256777f;
-        specular[1] = 0.137622f;
-        specular[2] = 0.086014f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 12.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Green")
-    {
-        // Ambient
-        ambient[0] = 0.0225f;
-        ambient[1] = 0.19125f;
-        ambient[2] = 0.0735f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.0828f;
-        diffuse[1] = 0.3038f;
-        diffuse[2] = 0.14048f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.086014f;
-        specular[1] = 0.306777f;
-        specular[2] = 0.117622f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 12.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Blue")
-    {
-        // Ambient
-        ambient[0] = 0.0225f;
-        ambient[1] = 0.0735f;
-        ambient[2] = 0.19125f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.0828f;
-        diffuse[1] = 0.14048f;
-        diffuse[2] = 0.6038f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.086014f;
-        specular[1] = 0.117622f;
-        specular[2] = 0.306777f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 12.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Polished gold")
-    {
-        // Ambient
-        ambient[0] = 0.24725f;
-        ambient[1] = 0.2245f;
-        ambient[2] = 0.0645f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.34615f;
-        diffuse[1] = 0.3143f;
-        diffuse[2] = 0.0903f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.797357f;
-        specular[1] = 0.723991f;
-        specular[2] = 0.208006f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 83.2f;
-    }
-
-    else
-
-    // Change
-    if(string == "Pewter")
-    {
-        // Ambient
-        ambient[0] = 0.105882f;
-        ambient[1] = 0.058824f;
-        ambient[2] = 0.113725f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.427451f;
-        diffuse[1] = 0.470588f;
-        diffuse[2] = 0.541176f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.333333f;
-        specular[1] = 0.333333f;
-        specular[2] = 0.521569f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 9.84615f;
-    }
-
-    else
-
-    // Change
-    if(string == "Obsidian")
-    {
-        // Ambient
-        ambient[0] = 0.05375f;
-        ambient[1] = 0.05f;
-        ambient[2] = 0.06625f;
-        ambient[3] = 0.82f;
-        // Diffuse
-        diffuse[0] = 0.18275f;
-        diffuse[1] = 0.17f;
-        diffuse[2] = 0.22525f;
-        diffuse[3] = 0.82f;
-        // Specular
-        specular[0] = 0.332741f;
-        specular[1] = 0.328634f;
-        specular[2] = 0.346435f;
-        specular[3] = 0.82f;
-        // Shininess
-        shininess[0] = 38.4f;
-    }
-
-    else
-
-    // Change
-    if(string == "Black plastic")
-    {
-        // Ambient
-        ambient[0] = 0.0f;
-        ambient[1] = 0.0f;
-        ambient[2] = 0.0f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.01f;
-        diffuse[1] = 0.01f;
-        diffuse[2] = 0.01f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.5f;
-        specular[1] = 0.5f;
-        specular[2] = 0.5f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 32.0f;
-    }
-
-    else
-
-    // Change
-    if(string == "Polished bronze")
-    {
-        // Ambient
-        ambient[0] = 0.25f;
-        ambient[1] = 0.148f;
-        ambient[2] = 0.006475f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.4f;
-        diffuse[1] = 0.2368f;
-        diffuse[2] = 0.1036f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.774597f;
-        specular[1] = 0.458561f;
-        specular[2] = 0.200621f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 76.8f;
-    }
-
-    
-    else
-
-    // Change
-    if(string == "Polished copper")
-    {
-        // Ambient
-        ambient[0] = 0.2295f;
-        ambient[1] = 0.08825f;
-        ambient[2] = 0.0275f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.5508f;
-        diffuse[1] = 0.2118f;
-        diffuse[2] = 0.066f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.580594f;
-        specular[1] = 0.223257f;
-        specular[2] = 0.0695701f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 51.2f;
-    }
-
-    else
-
-    // Change
-    if(string == "Pearl")
-    {
-        // Ambient
-        ambient[0] = 0.25f;
-        ambient[1] = 0.20725f;
-        ambient[2] = 0.20725f;
-        ambient[3] = 0.922f;
-        // Diffuse
-        diffuse[0] = 1.0f;
-        diffuse[1] = 0.829f;
-        diffuse[2] = 0.829f;
-        diffuse[3] = 0.922f;
-        // Specular
-        specular[0] = 0.296648f;
-        specular[1] = 0.296648f;
-        specular[2] = 0.296648f;
-        specular[3] = 0.922f;
-        // Shininess
-        shininess[0] = 11.264f;
-    }
-
-    else
-
-    // Change
-    if(string == "Ruby")
-    {
-        // Ambient
-        ambient[0] = 0.1745f;
-        ambient[1] = 0.01175f;
-        ambient[2] = 0.01175f;
-        ambient[3] = 0.55f;
-        // Diffuse
-        diffuse[0] = 0.61424f;
-        diffuse[1] = 0.04136f;
-        diffuse[2] = 0.04136f;
-        diffuse[3] = 0.55f;
-        // Specular
-        specular[0] = 0.727811f;
-        specular[1] = 0.626959f;
-        specular[2] = 0.626959f;
-        specular[3] = 0.55f;
-        // Shininess
-        shininess[0] = 76.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Turquoise")
-    {
-        // Ambient
-        ambient[0] = 0.1f;
-        ambient[1] = 0.18725f;
-        ambient[2] = 0.1745f;
-        ambient[3] = 0.8f;
-        // Diffuse
-        diffuse[0] = 0.396f;
-        diffuse[1] = 0.74151f;
-        diffuse[2] = 0.69102f;
-        diffuse[3] = 0.8f;
-        // Specular
-        specular[0] = 0.297254f;
-        specular[1] = 0.30829f;
-        specular[2] = 0.306678f;
-        specular[3] = 0.8f;
-        // Shininess
-        shininess[0] = 12.8f;
-    }
-
-    else
-
-    // Change
-    if(string == "Brass")
-    {
-        // Ambient
-        ambient[0] = 0.329412f;
-        ambient[1] = 0.223529f;
-        ambient[2] = 0.027451f;
-        ambient[3] = 1.0f;
-        // Diffuse
-        diffuse[0] = 0.780392f;
-        diffuse[1] = 0.268627f;
-        diffuse[2] = 0.113725f;
-        diffuse[3] = 1.0f;
-        // Specular
-        specular[0] = 0.992157f;
-        specular[1] = 0.741176f;
-        specular[2] = 0.807843f;
-        specular[3] = 1.0f;
-        // Shininess
-        shininess[0] = 27.8974f;
-    }
-
-    // apply
-    if (wireframe) {
-      glColor4f(diffuse[0],diffuse[1],diffuse[2],diffuse[3]);
-    } else {
-      glMaterialfv( GL_FRONT, GL_AMBIENT,   ambient);
-      glMaterialfv( GL_FRONT, GL_DIFFUSE,   diffuse);
-      glMaterialfv( GL_FRONT, GL_SPECULAR,  specular);
-      glMaterialfv( GL_FRONT, GL_SHININESS, shininess);
-      glMaterialfv( GL_FRONT, GL_EMISSION,  emission); 
-    }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.h b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.h
deleted file mode 100644
index 5b5fa93..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene.h
+++ /dev/null
@@ -1,262 +0,0 @@
-#ifndef SCENE_H
-#define SCENE_H
-
-#include "ui_MainWindow.h"
-#include "Scene_utils.h"
-#include <fstream>
-#include <QObject>
-#include <QFileDialog>
-#include <CGAL/glu.h>
-
-class Scene : public QObject
-{
-  Q_OBJECT
-
-private:
-  typedef qglviewer::Vec Vec;
-  typedef std::set<Segment, Compare_segment<Segment> > Segment_set;
-
-  enum Init {EMPTY, GRID, SINGLE, PLANE, RANDOM};
-
-  enum Draw_type { SEGMENT, TRIANGLE, TETRAHEDRON };
-
-  enum Primitive_colors {
-    VERTEX_COLOR,
-    EDGE_COLOR,
-    DOMAIN_COLOR,
-    FLYING_BALL_COLOR,
-    CLIPPING_COLOR
-  };
-
-public:
-  Scene(Ui::MainWindow* ui_) : ui(ui_), p3dt(),
-				  moving_point(Point(0.2,0.2,0.2)) {
-
-    flying_ball = ui->actionFlying_ball->isChecked();
-
-    dlocate = ui->actionPoint_location->isChecked();
-    dconflict = ui->actionConflict_region->isChecked();
-
-    wireframe = ui->actionWireframe->isChecked();
-    in_plane = ui->actionPlanar_triangulation->isChecked();
-    bool c1 = ui->actionDraw_1_sheeted_covering->isChecked();
-    bool cd = ui->actionDraw_bordering_cells_multiply->isChecked();
-
-    if ( c1 &&  cd) it_type = P3DT::UNIQUE_COVER_DOMAIN;
-    if ( c1 && !cd) it_type = P3DT::UNIQUE;
-    if (!c1 &&  cd) it_type = P3DT::STORED_COVER_DOMAIN;
-    if (!c1 && !cd) it_type = P3DT::STORED;
-
-    if ( ui->actionDraw_segments->isChecked() )   draw_type = SEGMENT;
-    if ( ui->actionDraw_triangles->isChecked() )  draw_type = TRIANGLE;
-    if ( ui->actionDraw_tetrahedra->isChecked() ) draw_type = TETRAHEDRON;
-
-    ddomain = ui->actionDraw_cube_square->isChecked();
-    cube_clipping = ui->actionClip_along_the_cube_square->isChecked();
-    two_color_clipping = ui->action2_color_clipping->isChecked();
-
-    materials[VERTEX_COLOR]      = "Gold";
-    materials[EDGE_COLOR]        = "Green";
-    materials[DOMAIN_COLOR]      = "Black plastic";
-    materials[FLYING_BALL_COLOR] = "Red";
-    materials[CLIPPING_COLOR]    = "Silver";
-
-    // Timer for flying ball
-    timer = new QTimer(this);
-    connect(timer, SIGNAL(timeout()), this, SLOT(update_position()));
-    timer->start(100);
-  }
-
-  ~Scene() {
-    gluDeleteQuadric(pQuadric);
-  }
-
-public slots:
-  void init();
-  void draw();
-
-  void load_points(const QString& fileName);
-  void update_position();
-
-  void init_scene_empty() { init_scene(EMPTY); }
-  void init_scene_single() { init_scene(SINGLE); }
-  void init_scene_random() { init_scene(RANDOM); }
-  void init_scene_plane() { init_scene(PLANE); }
-  void init_scene_grid() { init_scene(GRID); }
-  void toggle_flying_ball(bool on) {
-    flying_ball = on;
-    ui->viewer->update();
-  }
-  void toggle_pause(bool on) {
-    if (on) timer->stop();
-    else timer->start();
-  }
-
-  void insert_mp() {
-    insert_point(moving_point);
-    QString str;
-    ui->viewer->displayMessage(str.sprintf("Added point (%f, %f, %f)",
-		   moving_point.x(),moving_point.y(),moving_point.z()));
-  }
-
-  void insert_random() {
-    RandPts rp(0.5);
-    Point pt = *rp+Vector(0.5,0.5,0.5);
-    rp++;
-    insert_point(Point(pt.x(),pt.y(),(in_plane? 0.0:pt.z())));
-    QString str;
-    ui->viewer->displayMessage(str.sprintf("Added point (%f, %f, %f)",
-		   pt.x(),pt.y(),(in_plane? 0.0:pt.z())));
-  }
-  void insert_point(Point p) {
-    bool temp_flags[] = {dlocate, dconflict};
-    dlocate = dconflict = false;
-    make_draw_list();
-    p3dt.insert(p);
-    dlocate = temp_flags[0];
-    dconflict = temp_flags[1];
-    make_draw_list();
-  }
-  void grab_image() {
-    ui->viewer->openSnapshotFormatDialog();
-    ui->viewer->saveSnapshot(false);
-  }
-  void toggle_dlocate(bool on) { 
-    dlocate = on;
-    ui->viewer->update();
-  }
-  void toggle_dconflict(bool on) {
-    dconflict = on; 
-    ui->viewer->update();
-  }
-  void toggle_wireframe(bool on) {
-    wireframe = on;
-    ( on ? glDisable(GL_LIGHTING) : glEnable(GL_LIGHTING) );
-    gl_draw_domain();
-    make_draw_list();
-  }
-  void toggle_in_plane(bool on) {
-    in_plane = on;
-    gl_draw_domain();
-    make_draw_list();
-  }
-  // TODO: find radio button functionality within menus in QtDesigner
-  void toggle_force_1cover(bool on) {
-    if (ui->actionDraw_bordering_cells_multiply->isChecked())
-      it_type = ( on ? P3DT::UNIQUE_COVER_DOMAIN : P3DT::STORED_COVER_DOMAIN );
-    else
-      it_type = ( on ? P3DT::UNIQUE : P3DT::STORED);
-    make_draw_list();
-  }
-  void toggle_multiple_cells(bool on) {
-    if (ui->actionDraw_1_sheeted_covering->isChecked())
-      it_type = ( on ? P3DT::UNIQUE_COVER_DOMAIN : P3DT::UNIQUE );
-    else
-      it_type = ( on ? P3DT::STORED_COVER_DOMAIN : P3DT::STORED );
-    make_draw_list();
-  }
-  void trigger_draw_type_segment() {
-    ui->actionDraw_segments->setChecked(true);
-    ui->actionDraw_triangles->setChecked(false);
-    ui->actionDraw_tetrahedra->setChecked(false);
-    draw_type = SEGMENT;
-    make_draw_list();
-  }
-  void trigger_draw_type_triangle() {
-    ui->actionDraw_segments->setChecked(false);
-    ui->actionDraw_triangles->setChecked(true);
-    ui->actionDraw_tetrahedra->setChecked(false);
-    draw_type = TRIANGLE;
-    make_draw_list();
-  }
-  void trigger_draw_type_tetrahedron() {
-    ui->actionDraw_segments->setChecked(false);
-    ui->actionDraw_triangles->setChecked(false);
-    ui->actionDraw_tetrahedra->setChecked(true);
-    draw_type = TETRAHEDRON;
-    make_draw_list();
-  }
-  void toggle_ddomain(bool on) { ddomain = on; }
-  void toggle_cube_clipping(bool on) {
-    ui->action2_color_clipping->setEnabled(on);
-    if (!on) ui->action2_color_clipping->setChecked(false);
-    cube_clipping = on;
-    two_color_clipping = false;
-    if (on && ui->action2_color_clipping->isChecked())
-      toggle_two_color_clipping(true);
-    else
-      make_draw_list();
-  }
-  void toggle_two_color_clipping(bool on) {
-    two_color_clipping = on;
-    make_draw_list();
-  }
-  bool load_points() { 
-    QString fileName = QFileDialog
-      ::getOpenFileName(ui->centralWidget, tr("Open point set"),
-			".", tr("All files (*)"));
-    if(! fileName.isEmpty()){
-      load_points(fileName);
-    }
-   return true;
-  }
-
-signals:
-  void message(const QString & message, int timeout = 0 ); 
-  void loaded_points(const QString &n);
-
-private:
-  // Scene management helpers
-  void make_draw_list();
-  void init_scene(Init sceneID);
-  void gl_draw_square();
-  void gl_draw_cube();
-  void gl_draw_domain() {
-    if (in_plane) gl_draw_square();
-    else gl_draw_cube();
-  }
-
-  // Helper functions
-  void get_tri_offsets(const Cell_handle ch, int i,
-		       Offset& off0, Offset& off1, Offset& off2) const;
-  void get_tet_offsets(const Cell_handle ch, Offset& off0, Offset& off1,
-		       Offset& off2, Offset& off3) const;
-  int get_tri_drawing_offsets(const Cell_handle ch, int i) const;
-  int get_tet_drawing_offsets(const Cell_handle ch) const;
-  Tetrahedron construct_tetrahedron(const Cell_handle ch, const Offset& off0,
-      const Offset& off1,const Offset& off2,const Offset& off3, int off) const;
-  Triangle construct_triangle(const Cell_handle ch, int i, 
-      const Offset& off0,const Offset& off1,const Offset& off2, int off) const;
-
-  // Drawing functions
-  void gl_draw_vertex(const Point& p, const FT& radius) const;
-  void gl_draw_edge(Point p1, Point p2, FT radius );
-
-  void primitives_from_geom_it(Segment_set& sset);
-  void segment_clipping(Segment_set& sset);
-  void segment_2color_clipping (Segment_set& sset);
-
-  void gl_draw_location();
-  void gl_draw_conflict();
-
-  void change_material(const QString& string);
-
-private:
-  Ui::MainWindow * ui;
-  P3DT p3dt;
-  Point moving_point;
-
-  QString materials[6];
-  QTimer* timer;
-  GLuint l_triangulation, l_domain;
-  GLUquadricObj* pQuadric;
-
-  bool flying_ball;
-  bool dlocate, dconflict;
-  bool wireframe, in_plane;
-  Iterator_type it_type;
-  Draw_type draw_type;
-  bool ddomain, cube_clipping, two_color_clipping;
-};
-
-#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene_utils.h b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene_utils.h
deleted file mode 100644
index a18f803..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Scene_utils.h
+++ /dev/null
@@ -1,151 +0,0 @@
-#ifndef SCENE_UTILS_H
-#define SCENE_UTILS_H
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-
-#include <CGAL/point_generators_3.h>
-
-// Making available the Periodic_3_Delaunay_triangulation_3 to be
-// drawn in the Scene.
-typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
-typedef CGAL::Periodic_3_triangulation_traits_3<EPIC> K;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<K> P3DT;
-
-typedef K::RT NT;
-typedef K::FT FT;
-typedef K::Vector_3 Vector;
-
-typedef P3DT::Cell_handle Cell_handle;
-typedef P3DT::Vertex_handle Vertex_handle;
-typedef P3DT::Vertex_iterator Vertex_iterator;
-typedef P3DT::Facet Facet;
-typedef P3DT::Offset Offset;
-
-typedef P3DT::Point Point;
-typedef P3DT::Segment Segment;
-typedef P3DT::Triangle Triangle;
-typedef P3DT::Tetrahedron Tetrahedron;
-
-typedef P3DT::Periodic_point_iterator Point_iterator;
-typedef P3DT::Periodic_segment_iterator Segment_iterator;
-typedef P3DT::Periodic_triangle_iterator Triangle_iterator;
-typedef P3DT::Periodic_tetrahedron_iterator Tetrahedron_iterator;
-
-typedef P3DT::Iterator_type Iterator_type;
-
-typedef CGAL::Random_points_in_cube_3<Point> RandPts;
-
-// Segment comparison needed by the segment set
-template <class Segment>
-struct Compare_segment {
-  bool operator()(Segment s1, Segment s2) const {
-    if (s1.source() == s2.source()) return (s1.target() < s2.target());
-    return (s1.source() < s2.source());
-  }
-};
-
-// Projected triangle needed by the sorting of the triangles in z
-// direction to draw them transparently. This is used by
-// gl_draw_location and gl_draw_conflict
-class Projected_triangle {
-  double m_z;
-  Triangle m_t;
-public:
-  Projected_triangle() {}
-  Projected_triangle(double z, Triangle tr) : m_z(z), m_t(tr) {}
-  Projected_triangle(const Projected_triangle &pt) : m_z(pt.z()), m_t(pt.t()) {}
-
-  Triangle t() { return m_t; }
-  const Triangle t() const { return m_t; }
-
-  double& z() { return m_z; }
-  double z() const { return m_z; }
-
-  static bool closer(const Projected_triangle& t1, const Projected_triangle& t2) {
-    return t1.z() < t2.z();
-  }
-};
-
-// Segment clipper used to clip segments with the unit cube/square.
-// Implements the Cohen-Sutherland line clipping algorithm
-struct Segment_clipper {
-
-  int cs_outcode(const Point& p) {
-    int outcode = 0;
-    outcode |= (p.x()<0.0 ?  1:0);
-    outcode |= (p.x()>1.0 ?  2:0);
-    outcode |= (p.y()<0.0 ?  4:0);
-    outcode |= (p.y()>1.0 ?  8:0);
-    outcode |= (p.z()<0.0 ? 16:0);
-    outcode |= (p.z()>1.0 ? 32:0);
-    return outcode;
-  }
-
-  bool operator()(Point& p1, Point& p2) {
-      int p1_outcode = cs_outcode(p1);
-      int p2_outcode = cs_outcode(p2);
-      FT x(0),y(0),z(0), t(0);
-      bool accept = false;
-      bool done = false;
-      do {
-        if (p1_outcode == 0 && p2_outcode == 0) { accept = true; done = true; }
-        else if ((p1_outcode & p2_outcode) != 0) { done = true; }
-        else {
-          if (p1_outcode == 0) {
-            std::swap(p1_outcode, p2_outcode);
-            std::swap(p1,p2);
-          }
-          if ((p1_outcode & 1) != 0) {
-            t = (0-p1.x())/(p2.x()-p1.x());
-            x = 0;
-            y =p1.y()+t*(p2.y()-p1.y());
-            z =p1.z()+t*(p2.z()-p1.z());
-          } else {
-            if ((p1_outcode & 2) != 0) {
-              t = (1-p1.x())/(p2.x()-p1.x());
-              x = 1;
-              y =p1.y()+t*(p2.y()-p1.y());
-              z =p1.z()+t*(p2.z()-p1.z());
-            } else {
-              if ((p1_outcode & 4) != 0) {
-                t = (0-p1.y())/(p2.y()-p1.y());
-                x =p1.x()+t*(p2.x()-p1.x());
-                y = 0;
-                z =p1.z()+t*(p2.z()-p1.z());
-              } else {
-                if ((p1_outcode & 8) != 0) {
-                  t = (1-p1.y())/(p2.y()-p1.y());
-                  x =p1.x()+t*(p2.x()-p1.x());
-                  y = 1;
-                  z =p1.z()+t*(p2.z()-p1.z());
-                } else {
-                  if ((p1_outcode & 16) != 0) {
-                    t = (0-p1.z())/(p2.z()-p1.z());
-                    x =p1.x()+t*(p2.x()-p1.x());
-                    y =p1.y()+t*(p2.y()-p1.y());
-                    z = 0;
-                  } else {
-                    if ((p1_outcode & 32) != 0) {
-                      t = (1-p1.z())/(p2.z()-p1.z());
-                      x =p1.x()+t*(p2.x()-p1.x());
-                      y =p1.y()+t*(p2.y()-p1.y());
-                      z = 1;
-                    }
-                  }
-                }
-              }
-            }
-          }
-          p1 = Point(x,y,z);
-          p1_outcode = cs_outcode(p1);
-        }
-      }
-      while (!done);
-    return accept;
-  }
-};
-
-#endif // SCENE_UTILS_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp b/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp
deleted file mode 100644
index 673141e..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "MainWindow.h"
-#include <QtGui/QApplication>
-
-int main(int argc, char *argv[])
-{
-  QApplication a(argc, argv);
-  MainWindow w;
-  
-  w.ui->viewer->restoreStateFromFile();
-  
-  w.show();
-
-  a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
-  a.connect(w.ui->actionExit, SIGNAL(triggered()), &a, SLOT(quit()));
-  
-  return a.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/CMakeLists.txt
deleted file mode 100644
index 25d8715..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/CMakeLists.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Periodic_Lloyd_3)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL  COMPONENTS Qt4)
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-find_package(OpenGL)
-
-if(QT4_FOUND)
-  include( ${QT_USE_FILE} )
-  find_package(QGLViewer)
-endif(QT4_FOUND)
-
-if ( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE )
-
-  include(${QT_USE_FILE})
-
-  include_directories (${QGLVIEWER_INCLUDE_DIR})
-  include_directories (BEFORE ../../include ./ )
-
-  # ui file, created wih Qt Designer
-  qt4_wrap_ui( uis MainWindow.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( RESOURCE_FILES ./Periodic_Lloyd_3.qrc )
-
-  qt4_automoc( MainWindow.cpp Viewer.cpp)
-
-  if(DEFINED QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-  else()
-    set(QT_QCOLLECTIONGENERATOR_EXECUTABLE qcollectiongenerator)
-  endif()
-
-  # generate QtAssistant collection file
-  add_custom_command ( OUTPUT Periodic_Lloyd_3.qhc
-      DEPENDS Periodic_Lloyd_3.qhp Periodic_Lloyd_3.qhcp
-      COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE}
-                ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_Lloyd_3.qhcp
-                -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_Lloyd_3.qhc
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-  )
-
-  add_executable  ( Periodic_Lloyd_3 Periodic_Lloyd_3.qhc Periodic_Lloyd_3.cpp MainWindow.cpp Viewer.cpp ${uis}  ${RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_Lloyd_3 )
-
-  target_link_libraries( Periodic_Lloyd_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-  target_link_libraries( Periodic_Lloyd_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
-  target_link_libraries( Periodic_Lloyd_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-else( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE )
-
-  set(PERIODIC_LLOYD_MISSING_DEPS "")
-
-  if(NOT CGAL_FOUND)
-    set(PERIODIC_LLOYD_MISSING_DEPS "the CGAL Qt4 library, ${PERIODIC_LLOYD_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT QT4_FOUND)
-    set(PERIODIC_LLOYD_MISSING_DEPS "Qt4, ${PERIODIC_LLOYD_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT OPENGL_FOUND)
-    set(PERIODIC_LLOYD_MISSING_DEPS "OpenGL, ${PERIODIC_LLOYD_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT QGLVIEWER_FOUND)
-    set(PERIODIC_LLOYD_MISSING_DEPS "QGLViewer, ${PERIODIC_LLOYD_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE)
-    set(PERIODIC_LLOYD_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_LLOYD_MISSING_DEPS}")
-  endif()
-
-
-  message(STATUS "NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS}and will not be compiled.")
-
-endif( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE )
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.cpp
deleted file mode 100644
index 3cd1ad7..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-
-#include "MainWindow.h"
-#include <ctime>
-
-MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent)
-{
-  setupUi(this);
-  this->viewer->setScene(&scene);
-
-  process = new QProcess(this);
-
-  connectActions();
-  this->addAboutDemo(":/cgal/help/about_Periodic_Lloyd_3.html");
-  this->addAboutCGAL();
-
-  scene.eight_copies=false;
-  scene.two_dimensional=false;
-
-  qtimer = new QTimer(this);
-  connect(qtimer, SIGNAL(timeout()), this, SLOT(lloydStep()));
-}
-
-void
-MainWindow::connectActions()
-{
-  QObject::connect(this->actionNew_Point_Set, SIGNAL(triggered()), 
-		   this, SLOT(newPointSet()));
-
-  QObject::connect(this->actionLoad_points, SIGNAL(triggered()), 
-		   this, SLOT(loadPoints()));
-
-  QObject::connect(this->actionSave_points, SIGNAL(triggered()), 
-		   this, SLOT(savePoints()));
-
-  QObject::connect(this->speedSlider, SIGNAL(valueChanged(int)), 
-		   this, SLOT(speedChanged(int)));
-
-  QObject::connect(this->viewer, SIGNAL(valueChanged(int)),
-                   this, SLOT(speedChanged(int)));
-
-  QObject::connect(this, SIGNAL(sceneChanged()), 
-		   this->viewer, SLOT(sceneChanged()));
-  
-  QObject::connect(this->actionStep, SIGNAL(triggered()),
-                   this, SLOT(lloydStep()));
-
-  QObject::connect(this->actionPlay, SIGNAL(toggled(bool)),
-                   this, SLOT(togglePause(bool)));
-
-  QObject::connect(this->actionShow_8_Copies, SIGNAL(toggled(bool)),
-                   this, SLOT(toggle8Copies(bool)));
-
-  QObject::connect(this->action2D_version, SIGNAL(toggled(bool)),
-                   this, SLOT(toggle2D(bool)));
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   qApp, SLOT(quit()));
-
-  QObject::connect(this->actionDemo_Help, SIGNAL(triggered()),
-                   this, SLOT(help()));
-}
-
-void
-MainWindow::togglePause(bool p)
-{
-  if (p) {
-    int speed = (100-(speedSlider->value()))*100;
-    qtimer->start(speed);
-  }
-  else qtimer->stop();
-}
-
-void
-MainWindow::toggle8Copies(bool on)
-{
-  scene.eight_copies = on;
-  emit(sceneChanged());
-}
-
-void
-MainWindow::toggle2D(bool on)
-{
-  scene.two_dimensional = on;
-  if (on) newPointSet();
-  else emit(sceneChanged());
-}
-
-void
-MainWindow::newPointSet()
-{
-  bool ok;
-  int numberOfPoints = QInputDialog::getInteger(this,
-      "Periodic Lloyd", "Number of points: ", 100, 0, 2147483647, 1, &ok );
-  
-  if (ok) newPoints(numberOfPoints);
-}
-
-void
-MainWindow::loadPoints()
-{
-  QString fileName = QFileDialog
-    ::getOpenFileName(this, tr("Open point set"),
-	".", tr("All files (*)"));
-  if(fileName.isEmpty()) return;
-  
-  std::ifstream ifs(fileName.toAscii().data() );
-  scene.points.clear();
-  Iso_cuboid_3 dom;
-  ifs >> dom;
-  std::copy(std::istream_iterator<Point_3>(ifs), 
-      std::istream_iterator<Point_3>(),
-      std::back_inserter(scene.points));
-
-  scene.periodic_triangulation.set_domain(dom);
-  scene.periodic_triangulation.insert(scene.points.begin(), scene.points.end());
-
-  FT cx(0),cy(0),cz(0);
-  for (int i=0 ; i<8 ; i++) {
-    cx += dom[i].x();
-    cy += dom[i].y();
-    cy += dom[i].y();
-  }
-  qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
-  viewer->setSceneCenter(center);
-  viewer->setSceneRadius(std::sqrt(
-	  ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
-	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
-	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))));
-
-  speedSlider->setRange(0,100);
-  speedSlider->setSliderPosition(100);
-
-  emit (sceneChanged()); 
-}
-
-void
-MainWindow::savePoints()
-{
-  QString fileName = QFileDialog
-    ::getSaveFileName(this, tr("Save point set"),
-	".", tr("*.pts"));
-  if(fileName.isEmpty()) return;
-  
-  std::ofstream ofs(fileName.toAscii().data() );
-  ofs << scene.periodic_triangulation.domain() << '\n';
-  for (std::list<Point_3>::iterator pit = scene.points.begin() ;
-       pit != scene.points.end() ; ++pit) ofs << *pit << '\n';
-}
-
-void MainWindow::lloydStep() {
-  scene.lloyd_step();
-  viewer->updateGL();
-  }
-
-void 
-MainWindow::speedChanged(int i)
-{
-  int speed = (100-i)*100;
-  if (qtimer->isActive()) {
-     qtimer->stop();
-     qtimer->start(speed);
-  }
-}
-
-void
-MainWindow::newPoints(int n)
-{
-  scene.periodic_triangulation.clear();
-  scene.points.clear();
-
-  CGAL::Random rnd(std::time(NULL));
-  CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(1,rnd);
-
-  for (int i=0 ; i<n ; i++) 
-    if (scene.two_dimensional) {
-      Point_3 rdpt = *in_cube++;
-      scene.points.push_back(Point_3(rdpt.x(),rdpt.y(),0.));
-    } else 
-      scene.points.push_back(*in_cube++);
-
-  Iso_cuboid_3 dom(-1,-1,-1,1,1,1);
-  scene.periodic_triangulation.set_domain(dom);
-  scene.periodic_triangulation.insert(scene.points.begin(), scene.points.end());
-
-  FT cx(0),cy(0),cz(0);
-  for (int i=0 ; i<8 ; i++) {
-    cx += dom[i].x();
-    cy += dom[i].y();
-    cy += dom[i].y();
-  }
-  qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
-  viewer->setSceneCenter(center);
-  viewer->setSceneRadius(std::sqrt(
-	  ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
-	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
-	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))));
-
-  speedSlider->setRange(0,100);
-  speedSlider->setSliderPosition(100);
-
-  emit (sceneChanged()); 
-}
-
-void MainWindow::help() {
-  QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
-    + QDir::separator();
-#if !defined(Q_OS_MAC)
-  app += QString("assistant");
-#else
-  app += QString("Assistant.app/Contents/MacOS/Assistant");
-#endif
-
-  QStringList args;
-  QString help_path = QCoreApplication::applicationDirPath() 
-    + QDir::separator()
-    + QString("./Periodic_Lloyd_3.qhc");
-  args << QString("-collectionFile") << help_path;
-  process->start(app, args);
-  if (!process->waitForStarted()) {
-    QMessageBox::critical(this, tr("Remote Control"),
-      tr("Could not start Qt Assistant from %1.").arg(app));
-  }
-}
-
-#include "MainWindow.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.h b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.h
deleted file mode 100644
index d39cea8..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef MAIN_WINDOW_H
-#define MAIN_WINDOW_H
-
-#include "ui_MainWindow.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QSlider>
-#include <QTimer>
-
-#include <QtGui>
-#include <QProcess>
-
-class QWidget;
-
-class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
-{
-  Q_OBJECT
-
-public:
-  MainWindow(QWidget* = 0);
-  ~MainWindow() { process->close(); delete(process); }
-
-  void connectActions();
-
-  Scene scene;
-  QTimer * qtimer;
-
-private:
-  QProcess* process;
-
-public slots:
-  void newPoints(int i);
-  void newPointSet();
-  void loadPoints();
-  void savePoints();
-  void speedChanged(int i);
-  void togglePause(bool p);
-  void toggle8Copies(bool on);
-  void toggle2D(bool on);
-  void lloydStep();
-  void help();
-
-  signals:
-  void sceneChanged();
-  void speedChanged();
-};
-
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp
deleted file mode 100644
index 3bd16d3..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "MainWindow.h"
-#include <QApplication>
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char** argv)
-{
-  QApplication application(argc,argv);
- 
-  application.setOrganizationDomain("inria.fr");
-  application.setOrganizationName("INRIA");
-  application.setApplicationName("3D Periodic Lloyd");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Periodic_Lloyd_3);
-
-  MainWindow mw;
-  mw.show();
-
-  return application.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.cpp
deleted file mode 100644
index 84fc2bd..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-#include "Viewer.h"
-#include <vector>
-#include <CGAL/bounding_box.h>
-#include <QGLViewer/vec.h>
-
-
-void
-Viewer::init()
-{
-  setBackgroundColor(::Qt::white);
-  this->camera()->setSceneBoundingBox(
-      qglviewer::Vec(-1.,-1.,-1.),
-      qglviewer::Vec( 1., 1., 1.));
-}
-
-
-void
-Viewer::sceneChanged()
-{
-  this->showEntireScene();
-}
-
-void
-Viewer::draw()
-{
-
- // define material
-  float	ambient[]  =   { 0.25f,
-                         0.20725f,
-                         0.20725f,
-                         0.922f };
-  float	diffuse[]  =   { 1.0f,
-                         0.829f,
-                         0.829f,
-                         0.922f };
-
-  float	specular[]  = {  0.296648f,
-                         0.296648f,
-                         0.296648f,
-                         0.522f };
-
-  float	emission[]  = {  0.3f,
-                         0.3f,
-                         0.3f,
-                         1.0f };
-  float shininess[] = {  11.264f };
-
-  // apply material
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT,   ambient);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE,   diffuse);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR,  specular);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,  emission);
-
-  // anti-aliasing (if the OpenGL driver permits that)
-  ::glEnable(GL_LINE_SMOOTH);
-
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); 
-  // draw surface mesh
-  bool m_view_surface = true;
-  bool draw_triangles_edges = true;
-
-  if(m_view_surface)
-  {
-    ::glEnable(GL_LIGHTING);
-    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-    ::glColor3f(0.2f, 0.2f, 1.f);
-    ::glEnable(GL_POLYGON_OFFSET_FILL);
-    ::glPolygonOffset(3.0f,-3.0f);
-    gl_draw_surface();
-
-    if(draw_triangles_edges)
-    {
-      ::glDisable(GL_LIGHTING);
-      ::glLineWidth(1.);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-      ::glColor3ub(0,0,0);
-      ::glDisable(GL_POLYGON_OFFSET_FILL);
-      gl_draw_surface();
-    }
-  }
-}
-
-void 
-Viewer::gl_draw_surface()
-{
-  ::glColor3f(1.0f, 0.72f, 0.06f);
-  ::glDisable(GL_LIGHTING);
-
-  ::glEnable(GL_BLEND);
-  ::glEnable(GL_POINT_SMOOTH);
-  ::glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
-  ::glEnable(GL_LINE_SMOOTH);
-  ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-  ::glPointSize(5);
-  ::glBegin(GL_POINTS);
-  for(Periodic_point_iterator ppit
-	= scene->periodic_triangulation.periodic_points_begin(
-	    P3DT3::UNIQUE) ;
-      ppit != scene->periodic_triangulation.periodic_points_end(P3DT3::UNIQUE);
-      ++ppit){
-    Point_3 p(scene->periodic_triangulation.point(*ppit));
-    ::glVertex3d(p.x(), p.y(), p.z());
-  }
-  ::glEnd();
-
-  ::glBegin(GL_LINES);
-
-  ::glColor3f(0.27f, 0.51f, 0.7f);
-
-  for (Periodic_triangle_iterator ptit
-	 = scene->periodic_triangulation.periodic_triangles_begin(
-	     P3DT3::UNIQUE);
-       ptit != scene->periodic_triangulation.periodic_triangles_end(
-	   P3DT3::UNIQUE);
-      ++ptit) {
-    for (int i=0 ; i<4 ; i++) {
-      Segment_3 dual = scene->periodic_triangulation.segment(
-	  scene->periodic_triangulation.dual(*(ptit.get_facet())));
-
-      FT sz = dual.source().z();
-      FT tz = dual.target().z();
-
-      if (scene->two_dimensional && ((sz-tz > 0.5) || (sz-tz < -0.5))) continue;
-      
-      if (scene->two_dimensional) { sz = 0.; tz = 0.; }
-      FT sx = dual.source().x();
-      FT tx = dual.target().x();
-      FT sy = dual.source().y();
-      FT ty = dual.target().y();
-
-      ::glVertex3d(sx,sy,sz); ::glVertex3d(tx,ty,tz);
-      Iso_cuboid_3 d = scene->periodic_triangulation.domain();
-      if (scene->eight_copies) {
-	::glColor3f(0.69f, 0.77f, 0.87f);
-	::glVertex3d(sx+0.,sy+d.ymax()-d.ymin(),sz+0.);
-	::glVertex3d(tx+0.,ty+d.ymax()-d.ymin(),tz+0.);
-	::glVertex3d(sx+d.xmax()-d.xmin(),sy+0.,sz+0.);
-	::glVertex3d(tx+d.xmax()-d.xmin(),ty+0.,tz+0.);
-	::glVertex3d(sx+d.xmax()-d.xmin(),sy+d.ymax()-d.ymin(),sz+0.);
-	::glVertex3d(tx+d.xmax()-d.xmin(),ty+d.ymax()-d.ymin(),tz+0.);
-	if (!scene->two_dimensional) {
-	  ::glVertex3d(sx+0.,sy+0.,sz+d.zmax()-d.zmin());
-	  ::glVertex3d(tx+0.,ty+0.,tz+d.zmax()-d.zmin());
-	  ::glVertex3d(sx+0.,sy+d.ymax()-d.ymin(),sz+d.zmax()-d.zmin());
-	  ::glVertex3d(tx+0.,ty+d.ymax()-d.ymin(),tz+d.zmax()-d.zmin());
-	  ::glVertex3d(sx+d.xmax()-d.xmin(),sy+0.,sz+d.zmax()-d.zmin());
-	  ::glVertex3d(tx+d.xmax()-d.xmin(),ty+0.,tz+d.zmax()-d.zmin());
-	  ::glVertex3d(sx+d.xmax()-d.xmin(),sy+d.ymax()-d.ymin(),sz+d.zmax()-d.zmin());
-	  ::glVertex3d(tx+d.xmax()-d.xmin(),ty+d.ymax()-d.ymin(),tz+d.zmax()-d.zmin());
-	}
-	::glColor3f(0.27f, 0.51f, 0.7f);
-
-      }
-    }
-  }
-
-  ::glEnd();
-  ::glEnable(GL_LIGHTING);
-}
-
-Viewer::Vec
-Viewer::next_around_circle(const float& phi, const Vec& pos, const Vec& ori) {
-  Vec cam = pos-ori;
-  Vec cam_norm = cam/cam.norm();
-
-  Vec y(cam_norm.z, 0, -cam_norm.x);
-  Vec y_norm = y/y.norm();
-  
-  Vec new_cam = ori + (cam_norm*cos(phi) + y_norm*sin(phi)) * cam.norm();
-  return new_cam;  
-}
-
-void
-Viewer::render_video()
-{
-  setSnapshotFormat("PNG");
-  for (int alpha=0 ; alpha <= 100 ; alpha++ ) {
-    emit (valueChanged(alpha));
-    std::cout<<alpha<<std::endl;
-    QString alpha_str;
-    alpha_str.setNum(alpha);
-    displayMessage(QString("alpha: ") + alpha_str + QString("%"),10000);
-    
-    for (int fr=0 ; fr < 50 ; fr++) {
-      Vec cam = camera()->position();
-      Vec ori = sceneCenter();
-      Vec new_cam = next_around_circle(0.01f,cam,ori);
-      camera()->setPosition(new_cam);
-      camera()->lookAt(ori);
-      this->showEntireScene();
-      saveSnapshot(true);
-    }
-  }
-}
-
-
-#include "Viewer.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.h b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.h
deleted file mode 100644
index 523dc97..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Viewer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include "Scene.h"
-#include <QGLViewer/qglviewer.h>
-
-
-class Viewer : public QGLViewer {
-
-  typedef qglviewer::Vec Vec;
-
-  Q_OBJECT
-
-  CGAL::Timer timer;
-  Scene* scene;
-
-  int nr_of_facets;
-public:
-  Viewer(QWidget* parent)
-    : QGLViewer(parent)
-  {}
-
-  void setScene(Scene* scene_)
-  {
-    scene = scene_;
-  }
-
-  void init();
-  void clear();
-
-public:
-  void draw();
-
-  void gl_draw_surface();
-
-
-public slots :
-
-  void sceneChanged();
-  void render_video();
-  
-signals:
-  void valueChanged(int i);
-
-private:
-  Vec next_around_circle(const float& phi, const Vec& pos, const Vec& ori);
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/typedefs.h b/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/typedefs.h
deleted file mode 100644
index d6ab921..0000000
--- a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/typedefs.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef TYPEDEFS_H
-#define TYPEDEFS_H
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Timer.h>
-
-#include <cstdio>
-#include <cstring>
-#include <iostream>
-#include <fstream>
-#include <vector>
-
-#include <fstream>
-#include <list>
-#include <cassert>
-
-
-typedef double coord_type;
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
-typedef CGAL::Periodic_3_triangulation_traits_3<EPIC> K;
-
-typedef K::FT         FT;
-typedef K::Point_3    Point_3;
-typedef K::Vector_3   Vector_3;
-typedef K::Segment_3  Segment_3;
-typedef K::Ray_3      Ray_3;
-typedef K::Line_3     Line;
-typedef K::Triangle_3 Triangle_3;
-typedef K::Iso_cuboid_3 Iso_cuboid_3;
-typedef K::Tetrahedron_3 Tetrahedron_3;
-
-typedef CGAL::Creator_uniform_3<double,Point_3> Creator;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<K> P3DT3;
-
-typedef P3DT3::Cell  Cell;
-typedef P3DT3::Vertex Vertex;
-typedef P3DT3::Edge Edge;
-typedef P3DT3::Facet Facet;
-typedef P3DT3::Cell_handle  Cell_handle;
-typedef P3DT3::Vertex_handle Vertex_handle;
-
-typedef P3DT3::Cell_circulator  Cell_circulator;
-
-typedef P3DT3::Locate_type Locate_type;
-
-typedef P3DT3::Cell_iterator  Cell_iterator;
-typedef P3DT3::Vertex_iterator  Vertex_iterator;
-typedef P3DT3::Edge_iterator  Edge_iterator;
-typedef P3DT3::Facet_iterator Facet_iterator;
-
-typedef P3DT3::Periodic_point_iterator Periodic_point_iterator;
-typedef P3DT3::Periodic_triangle_iterator Periodic_triangle_iterator;
-
-typedef P3DT3::Periodic_tetrahedron_iterator Periodic_tetrahedron_iterator;
-
-typedef CGAL::Triangulation_2<EPIC> T2;
-typedef EPIC::Point_2 Point_2;
-typedef EPIC::Triangle_2 Triangle_2;
-
-typedef CGAL::Timer Timer;
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polygon/CMakeLists.txt
deleted file mode 100644
index 850ae13..0000000
--- a/3rdparty/CGAL-4.6/demo/Polygon/CMakeLists.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (GraphicsView)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4 Core)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-#find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  if( CGAL_Core_FOUND)
-    add_definitions(-DCGAL_USE_CORE)
-  endif()
-
-  include(${QT_USE_FILE})
-  #--------------------------------
-  # Demo: Polygon_2
-  #--------------------------------
-  # UI files (Qt Designer files)
-  qt4_wrap_ui( DT_UI_FILES Polygon_2.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( DT_RESOURCE_FILES ./Polygon_2.qrc )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  qt4_generate_moc( Polygon_2.cpp "${CMAKE_CURRENT_BINARY_DIR}/Polygon_2.moc" )
-
-#  add_library( CGAL SHARED IMPORTED ) 
-#  SET_PROPERTY(TARGET CGAL PROPERTY IMPORTED_LOCATION ${CGAL_LIBRARY} )
-
-  # The executable itself.
-  add_executable  ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polygon_2 )
-
-
-  # Link with Qt libraries
-  target_link_libraries( Polygon_2 ${QT_LIBRARIES} )
-  # And with CGAL libraries
-  target_link_libraries( Polygon_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.cpp b/3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.cpp
deleted file mode 100644
index 585e85b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.cpp
+++ /dev/null
@@ -1,582 +0,0 @@
-#include <fstream>
-#include<boost/shared_ptr.hpp>
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/partition_2.h>
-#include <CGAL/Partition_traits_2.h>
-#include<CGAL/create_straight_skeleton_2.h>
-#include<CGAL/create_offset_polygons_2.h>
-#include <CGAL/linear_least_squares_fitting_2.h>
-#include <CGAL/extremal_polygon_2.h>
-#include <CGAL/minkowski_sum_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QFileDialog>
-#include <QGraphicsLineItem>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/Qt/PolygonGraphicsItem.h>
-#include <CGAL/Qt/PolygonWithHolesGraphicsItem.h>
-#include <CGAL/Qt/LineGraphicsItem.h>
-  
-// the two base classes
-#include "ui_Polygon_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Line_2 Line_2;
-
-typedef CGAL::Polygon_2<K,std::list< Point_2 > > Polygon2; // it must be a list for the partition
-typedef CGAL::Polygon_with_holes_2<K,std::list< Point_2 > > Polygon_with_holes_2;
-
-typedef CGAL::Straight_skeleton_2<K> Ss ;
-
-typedef boost::shared_ptr<Ss> SsPtr ;
-
-typedef boost::shared_ptr<Polygon2> PolygonPtr ;
-
-typedef std::vector<PolygonPtr> PolygonPtr_vector ;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Polygon_2
-{
-  Q_OBJECT
-  
-private:
-
-  enum PartitionAlgorithm {YMonotone, ApproximateConvex, OptimalConvex} ;
-
-
-  CGAL::Qt::Converter<K> convert;
-  Polygon2 poly, kgon; 
-  Polygon_with_holes_2 selfmink;
-  QGraphicsScene scene;  
-
-  CGAL::Qt::PolygonGraphicsItem<Polygon2> * pgi;
-
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-  CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes_2> * minkgi;
-
-  std::list<Polygon2> partitionPolygons;
-  std::list<CGAL::Qt::PolygonGraphicsItem<Polygon2>* >  partitionGraphicsItems;
-  std::list<QGraphicsLineItem* >  skeletonGraphicsItems;
-  std::list<QGraphicsLineItem* >  offsetGraphicsItems;
-  CGAL::Qt::LineGraphicsItem<K>* lgi;
-
-  CGAL::Qt::PolygonGraphicsItem<Polygon2> * kgongi;
-
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionClear_triggered();
-
-  void on_actionLoadPolygon_triggered();
-  void on_actionSavePolygon_triggered();
-
-  void on_actionSelfMinkowskiSum_triggered();
-  void on_actionRecenter_triggered();
-  void on_actionMaximumAreaKGon_triggered();
-  void on_actionInnerSkeleton_triggered();
-  void on_actionOuterOffset_triggered();
-  void on_actionLinearLeastSquaresFitting_triggered();
-  void on_actionLinearLeastSquaresFittingOfSegments_triggered();
-  void on_actionCreateInputPolygon_toggled(bool);
-
-  void on_actionYMonotonePartition_triggered();
-  void on_actionApproximateConvexPartition_triggered();
-  void on_actionOptimalConvexPartition_triggered();
-  void partition(PartitionAlgorithm);
-
-  void clearPartition();
-  void clearMinkowski();
-  void clearSkeleton();
-  void clearOffset();
-  void clear();
-
-  virtual void open(QString);
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  minkgi = 0;
-  // Add a GraphicItem for the Polygon2
-  pgi = new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&poly);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pgi, SLOT(modelChanged()));
-
-  pgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(pgi);
-
-  kgongi =  new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&kgon);
-  kgongi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  kgongi->hide();
-  scene.addItem(kgongi);
-  
-  
-  lgi = new CGAL::Qt::LineGraphicsItem<K>();
-  lgi->setPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  lgi->hide();
-  scene.addItem(lgi);
-  assert(lgi->scene() == &scene);
-  // Setup input handlers. They get events before the scene gets them
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true);
-
-  this->actionCreateInputPolygon->setChecked(true);
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
- 
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Uncomment the following line to get antialiasing by default.
-//   actionUse_Antialiasing->setChecked(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Polygon_2.html");
-  this->addAboutCGAL();
-  this->setupExportSVG(action_Export_SVG, graphicsView);
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  this->actionCreateInputPolygon->setChecked(false);
-  std::list<Point_2> points;
-  if(CGAL::assign(points, o)){
-    if((points.size() == 1)&& poly.size()>0){
-    
-    } else {
-      poly.clear();
-      if(points.front() == points.back()){
-	points.pop_back();
-      }
-      poly.insert(poly.vertices_begin(), points.begin(), points.end());
-    }
-    emit(changed());
-  }
-}
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  poly.clear();
-  clear();
-  this->actionCreateInputPolygon->setChecked(true);
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPolygon_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Polygon File"),
-						  ".",
-						  tr( "Any file (*.*)"));
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-void
-MainWindow::open(QString fileName)
-{
-  this->actionCreateInputPolygon->setChecked(false);
-  std::ifstream ifs(qPrintable(fileName));
-  poly.clear();
-  ifs >> poly;
-  clear();
-
-  this->addToRecentFiles(fileName);
-  emit (changed());
-}
-
-
-void
-MainWindow::on_actionSavePolygon_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save Polygon"),
-						  ".",
-						  tr("Any files (*.*)"));
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    ofs << poly;
-  }
-}
-
-
-void
-MainWindow::on_actionCreateInputPolygon_toggled(bool checked)
-{
-  poly.clear();
-  clear();
-  if(checked){
-    scene.installEventFilter(pi);
-  } else {
-    scene.removeEventFilter(pi);
-  }
-  emit(changed());
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(pgi->boundingRect());
-  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-void
-MainWindow::on_actionSelfMinkowskiSum_triggered()
-{
-  if(poly.size()>0){
-    if(! poly.is_simple()){
-      return;
-    }
-
-    selfmink = minkowski_sum_2 (poly, poly);
-    
-    minkgi = new CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes_2>(&selfmink);
-    
-    minkgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-    scene.addItem(minkgi);
-    minkgi->setEdgesPen(QPen(Qt::darkRed, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  }
-}
-
-
-
-
-void
-MainWindow::on_actionInnerSkeleton_triggered()
-{
-  if(poly.size()>0){
-    if(! poly.is_simple()){
-      return;
-    }
-    clear();
-    if(! poly.is_counterclockwise_oriented()){
-      poly.reverse_orientation();
-    }
-    SsPtr iss = CGAL::create_interior_straight_skeleton_2(poly.vertices_begin(), poly.vertices_end());
-
-    CGAL::Straight_skeleton_2<K> const& ss = *iss;
-
-    typedef Ss::Vertex_const_handle     Vertex_const_handle ;
-    typedef Ss::Halfedge_const_handle   Halfedge_const_handle ;
-    typedef Ss::Halfedge_const_iterator Halfedge_const_iterator ;
-  
-    Halfedge_const_handle null_halfedge ;
-    Vertex_const_handle   null_vertex ;
-
-    for ( Halfedge_const_iterator i = ss.halfedges_begin(); i != ss.halfedges_end(); ++i )
-      {
-	if ( i->is_bisector() ){
-	  Segment_2 s(i->opposite()->vertex()->point(), i->vertex()->point());
-	  skeletonGraphicsItems.push_back(new QGraphicsLineItem(convert(s)));
-	  scene.addItem(skeletonGraphicsItems.back());
-	  skeletonGraphicsItems.back()->setPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-	}
-      }
-      
-  }
-
-}
-
-void
-MainWindow::on_actionOuterOffset_triggered()
-{
-  if(poly.size()>0 && poly.is_simple())
-  {
-    clear();
-    
-    if(! poly.is_counterclockwise_oriented())
-      poly.reverse_orientation();
-    
-    double w = poly.bbox().xmax() - poly.bbox().xmin() ;
-    double h = poly.bbox().ymax() - poly.bbox().ymin() ;
-    double s = (std::max)(w,h);
-    double def_offset = s * 0.05 ;
-    
-    bool ok;
-    const double off = QInputDialog::getDouble( this
-                                              , tr("Offset distance")
-                                              , tr("Offset distance:")
-                                              , def_offset
-                                              , 0.0
-                                              , s
-                                              , 2
-                                              , &ok
-                                              );  
-    if ( ok )
-    {
-      PolygonPtr_vector lContours = create_exterior_skeleton_and_offset_polygons_2(off,poly) ;
-      
-      PolygonPtr_vector::const_iterator frame ;
-      
-      double max_area = 0.0 ;
-      
-      for( PolygonPtr_vector::const_iterator cit = lContours.begin(); cit != lContours.end(); ++ cit )
-      {
-        double area = (*cit)->area();
-        if ( area > max_area )
-        {
-          max_area = area ;
-          frame = cit ;
-        }
-      }
-      
-      for( PolygonPtr_vector::const_iterator cit = lContours.begin(); cit != lContours.end(); ++ cit )
-      {
-        if ( cit != frame )
-        {
-          Polygon2 const& lContour = **cit ;
-          lContour.area();
-          for ( Polygon2::Edge_const_iterator eit = lContour.edges_begin(); eit != lContour.edges_end(); ++ eit )
-          {
-            Segment_2 s(eit->source(), eit->target());
-            offsetGraphicsItems.push_back(new QGraphicsLineItem(convert(s)));
-            scene.addItem(offsetGraphicsItems.back());
-            offsetGraphicsItems.back()->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-          } 
-        }
-      }
-    }
-  }  
-}
-
-void
-MainWindow::on_actionMaximumAreaKGon_triggered()
-{
-  if( (poly.size()>2) && poly.is_convex()){
-    clear();
-    
-    kgon.clear();
-    std::vector<Point_2> points(poly.vertices_begin(),
-                                poly.vertices_end());
-    CGAL::maximum_area_inscribed_k_gon_2(points.begin(),
-                                         points.end(),
-					 3,
-                                         std::back_inserter(kgon));
-  
-    kgongi->modelChanged();
-    kgongi->show();
-  } else {
-    std::cout << "The polygon must be convex" << std::endl;
-  }
-}
-
-void
-MainWindow::on_actionLinearLeastSquaresFitting_triggered()
-{
-  if(poly.size()>2){
-    clear();
-    
-    Line_2 line;
-    CGAL::linear_least_squares_fitting_2(poly.vertices_begin(),
-					 poly.vertices_end(),
-					 line,
-					 CGAL::Dimension_tag<0>());
-  
-    lgi->setLine(line);
-    lgi->show();
-  }
-}
-
-void
-MainWindow::on_actionLinearLeastSquaresFittingOfSegments_triggered()
-{
-  if(poly.size()>2){
-    clear();
-    
-    Line_2 line;
-    CGAL::linear_least_squares_fitting_2(poly.edges_begin(),
-					 poly.edges_end(),
-					 line,
-					 CGAL::Dimension_tag<1>());
-
-
-    lgi->setLine(line);
-    lgi->show();
-  }
-}
-
-void
-MainWindow::on_actionYMonotonePartition_triggered()
-{
-  partition(YMonotone);
-}
-
-
-void
-MainWindow::on_actionOptimalConvexPartition_triggered()
-{
-  partition(OptimalConvex);
-}
-
-
-void
-MainWindow::on_actionApproximateConvexPartition_triggered()
-{
-  partition(ApproximateConvex);
-}
-
-
-void 
-MainWindow::partition(PartitionAlgorithm pa)
-{
-  if(poly.size()>0){
-    clear();
-    if(! poly.is_counterclockwise_oriented()){
-      poly.reverse_orientation();
-    }
-    switch (pa) {
-    case YMonotone :
-      CGAL::y_monotone_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
-      break;
-    case ApproximateConvex:
-      CGAL::approx_convex_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
-      break;
-    default:
-      CGAL::optimal_convex_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
-      break;
-    }
-    for(std::list<Polygon2>::iterator it = partitionPolygons.begin();
-	it != partitionPolygons.end();
-	++it){
-      partitionGraphicsItems.push_back(new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&(*it)));
-      scene.addItem(partitionGraphicsItems.back());
-      partitionGraphicsItems.back()->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-    }
-  }
-}
-
-void
-MainWindow::clearPartition()
-{
-  partitionPolygons.clear();
-  for(std::list<CGAL::Qt::PolygonGraphicsItem<Polygon2>* >::iterator it = partitionGraphicsItems.begin();
-      it != partitionGraphicsItems.end();
-      ++it){
-    scene.removeItem(*it);
-  }
-  partitionGraphicsItems.clear();
-}
-
-void
-MainWindow::clearMinkowski()
-{
-  if(minkgi != 0){
-    scene.removeItem(minkgi);
-    delete minkgi;
-    minkgi = 0;
-  }
-}
-
-void
-MainWindow::clearSkeleton()
-{ for(std::list<QGraphicsLineItem* >::iterator it = skeletonGraphicsItems.begin();
-      it != skeletonGraphicsItems.end();
-      ++it){
-    scene.removeItem(*it);
-  }
-  skeletonGraphicsItems.clear();
-}
-
-void
-MainWindow::clearOffset()
-{ for(std::list<QGraphicsLineItem* >::iterator it = offsetGraphicsItems.begin();
-      it != offsetGraphicsItems.end();
-      ++it){
-    scene.removeItem(*it);
-  }
-  offsetGraphicsItems.clear();
-}
-
-void
-MainWindow::clear()
-{
-  clearPartition();
-  clearMinkowski();
-  clearSkeleton();
-  clearOffset();
-  lgi->hide();
-  kgongi->hide();
-}
-
-
-#include "Polygon_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Polygon_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Polygon_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_interface.h
deleted file mode 100644
index 9ac8df9..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_interface.h
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef SCENE_INTERFACE_H
-#define SCENE_INTERFACE_H
-
-#include <QString>
-#include <QColor>
-#include <QList>
-#include <algorithm>
-#include <cmath>
-
-class Scene_item;
-
-// OpenGL rendering mode
-enum RenderingMode { Points = 0,
-                     PointsPlusNormals,
-                     Splatting,
-                     Wireframe, 
-                     Flat,
-                     FlatPlusEdges,
-                     Gouraud,
-                     LastRenderingMode = Gouraud,
-                     NumberOfRenderingMode = LastRenderingMode+1 };
-
-// Interface of Scene class exported to plugins
-class Scene_interface {
-public:
-  struct Bbox {
-    double xmin, ymin, zmin;
-    double xmax, ymax, zmax;
-    Bbox(const double _xmin,const double _ymin,const double _zmin,
-         const double _xmax,const double _ymax,const double _zmax)
-      : xmin(_xmin), ymin(_ymin), zmin(_zmin),
-        xmax(_xmax), ymax(_ymax), zmax(_zmax)
-    {
-    }
-    Bbox()
-      : xmin(0.0), ymin(0.0), zmin(0.0),
-        xmax(1.0), ymax(1.0), zmax(1.0)
-    {
-    }
-
-    Bbox operator+(const Bbox& b) const {
-      return Bbox((std::min)(xmin, b.xmin),
-                  (std::min)(ymin, b.ymin),
-                  (std::min)(zmin, b.zmin),
-                  (std::max)(xmax, b.xmax),
-                  (std::max)(ymax, b.ymax),
-                  (std::max)(zmax, b.zmax));
-    }
-
-    bool operator==(const Bbox&b) const{
-      return
-        xmin==b.xmin && xmax==b.xmax &&
-        ymin==b.ymin && ymax==b.ymax &&
-        zmin==b.zmin && zmax==b.zmax;
-    }
-
-    bool operator!=(const Bbox& b) const{
-      return !(*this == b);
-    }
-    
-    double width() const { return xmax-xmin; }
-    double height() const { return ymax-ymin; }
-    double depth() const { return zmax-zmin; }
-    
-    double diagonal_length() const
-    {
-      return std::sqrt(width()*width() + height()*height() + depth()*depth());
-    }
-
-  }; // struct BBox (ad hoc class, does not depend on CGAL kernels
-
-  typedef int Item_id;
-
-  virtual ~Scene_interface() {};
-
-  virtual Item_id addItem(Scene_item* item) = 0;
-  virtual Scene_item* replaceItem(Item_id, Scene_item*, bool emit_item_about_to_be_destroyed = false) = 0;
-
-  virtual Item_id erase(Item_id) = 0;
-  // Returns the index of the item just before the one that is erased,
-  // or just after. Returns -1 if the list is empty.
-
-  virtual Item_id duplicate(Item_id) = 0;
-  // Returns the index of the new item
-  // If no new item has been created (because the item type is note
-  // clonable), returns -1.
-
-  // Accessors (getters)
-  virtual int numberOfEntries() const = 0;
-  virtual Scene_item* item(Item_id) const = 0;
-  virtual Item_id item_id(Scene_item*) const = 0;
-  virtual Item_id mainSelectionIndex() const = 0;
-  virtual QList<Item_id> selectionIndices() const = 0;
-  virtual Item_id selectionAindex() const = 0;
-  virtual Item_id selectionBindex() const = 0;
-
-  // Get scene bounding box
-  virtual Bbox bbox() const = 0;
-  virtual double len_diagonal() const = 0;
-
-public:
-  // Notify the scene that an item was modified
-  virtual void itemChanged(Item_id i) = 0; 
-  virtual void itemChanged(Scene_item*) = 0;
-
-  // Select an item
-  virtual void setSelectedItem(Item_id) = 0;
-  
-}; // end interface Scene_interface
-
-
-#endif // SCENE_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_item_with_display_list.h b/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_item_with_display_list.h
deleted file mode 100644
index 20f0d1e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Scene_item_with_display_list.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef SCENE_ITEM_WITH_DISPLAY_LIST_H
-#define SCENE_ITEM_WITH_DISPLAY_LIST_H
-
-#include "Scene_item.h"
-#include <Scene_interface.h>
-#ifdef CGAL_GLEW_ENABLED
-# include <GL/glew.h>
-#else
-# include <CGAL/gl.h>
-#endif
-
-class Viewer_interface;
-
-// This class represents an object in the scene with an OpenGL rendering using display lists
-class SCENE_ITEM_EXPORT Scene_item_with_display_list 
-  : public Scene_item
-{
-public:
-  Scene_item_with_display_list();
-  Scene_item_with_display_list(GLuint list_id, GLuint edges_list_id = 0);
-//   Scene_item_with_display_list(const Scene_item_with_display_list&);
-  ~Scene_item_with_display_list();
-
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  virtual void direct_draw() const = 0;
-  virtual void direct_draw(Viewer_interface*) const { direct_draw(); }
-  virtual void direct_draw_edges() const { draw(); };
-  virtual void direct_draw_edges(Viewer_interface*) const { direct_draw_edges(); }
-  // OpenGL drawing using a display list
-  virtual void draw() const;
-  virtual void draw(Viewer_interface*) const { draw(); }
-  virtual void draw_edges() const;
-  virtual void draw_edges(Viewer_interface*) const { draw_edges(); }
-
-public slots:
-  // Call that once you have finished changing something in the item
-  // (either the properties or internal data).
-  virtual void changed();
-
-protected:
-  enum { DRAW = 0, DRAW_EDGES = 1, NB_OF_DISPLAY_LISTS = 2};
-  void draw(int) const;
-  // display lists
-  mutable GLuint display_list[NB_OF_DISPLAY_LISTS];
-  mutable bool display_list_built[NB_OF_DISPLAY_LISTS];
-
-}; // end class Scene_item_with_display_list 
-
-#endif // SCENE_ITEM_WITH_DISPLAY_LIST_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Viewer_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Viewer_interface.h
deleted file mode 100644
index d1b9720..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_demo/Viewer_interface.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef VIEWER_INTERFACE_H
-#define VIEWER_INTERFACE_H
-
-#include <QGLViewer/qglviewer.h>
-#include <QWidget>
-#include <QPoint>
-
-// forward declarations
-class QWidget;
-class Scene_draw_interface;
-class QMouseEvent;
-class QKeyEvent;
-
-#include "../Viewer_config.h" // for VIEWER_EXPORT
-
-class VIEWER_EXPORT Viewer_interface : public QGLViewer {
-
-  Q_OBJECT
-
-public:
-  Viewer_interface(QWidget* parent) : QGLViewer(parent) {};
-  virtual ~Viewer_interface() {};
-
-  virtual void setScene(Scene_draw_interface* scene) = 0;
-  virtual bool antiAliasing() const = 0;
-
-  // Those two functions are defined in Viewer.cpp
-  static bool readFrame(QString, qglviewer::Frame&);
-  static QString dumpFrame(const qglviewer::Frame&);
-
-  virtual bool inFastDrawing() const = 0;
-
-signals:
-  void selected(int);
-  void requestContextMenu(QPoint global_pos);
-  void selectedPoint(double, double, double);
-  void selectionRay(double, double, double, double, double, double);
-
-public slots:
-  virtual void setAntiAliasing(bool b) = 0;
-  virtual void setTwoSides(bool b) = 0;
-
-  virtual void turnCameraBy180Degres() = 0;
-
-  virtual QString dumpCameraCoordinates() = 0;
-  virtual bool moveCameraToCoordinates(QString, 
-                                       float animation_duration = 0.5f) = 0;
-}; // end class Viewer_interface
-
-#endif // VIEWER_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polyhedron/CMakeLists.txt
deleted file mode 100644
index 87007ae..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/CMakeLists.txt
+++ /dev/null
@@ -1,507 +0,0 @@
-# This is the CMake script for compiling the CGAL Polyhedron demo.
-
-project( Polyhedron )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Compatibility with CMake 3.0
-if(POLICY CMP0042)
-  # Do not enable the use of MACOSX_RPATH
-  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
-  cmake_policy(SET CMP0042 OLD)
-endif()
-
-#option(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL "In the Polyhedron demo, enable " OFF)
-#mark_as_advanced(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
-
-# Let plugins be compiled in the same directory as the executable.
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-
-# Use packages improved since CGAL 3.4
-foreach(DEP_PKG AABB_tree STL_Extension GraphicsView Surface_mesher Filtered_kernel Profiling_tools Mesh_3 Triangulation_3 )
-  foreach(CGAL_SVN_TRUNK ../../../ ../../trunk ..)
-    if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${CGAL_SVN_TRUNK}/${DEP_PKG}/include")
-      include_directories (BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/${CGAL_SVN_TRUNK}/${DEP_PKG}/include")
-      if(COMMAND break)
-        break()
-      endif()
-    endif()
-  endforeach()
-endforeach()
-
-# Include this package's headers first
-include_directories( BEFORE ./ ./include ../../include ./CGAL_demo)
-
-add_subdirectory( implicit_functions )
-
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4)
-include( ${CGAL_USE_FILE} )
-
-option( POLYHEDRON_QTSCRIPT_DEBUGGER 
-  "Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF)
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-if( POLYHEDRON_QTSCRIPT_DEBUGGER)
-  set( QT_USE_QTSCRIPTTOOLS  TRUE )
-endif()
-find_package(Qt4)
-
-# Find Glew (optional), for splatting
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/GlSplat/cmake)
-find_package(GLEW)
-
-# Find OpenGL
-find_package(OpenGL)
-
-# Find QGLViewer
-if(QT4_FOUND)
-  include(${QT_USE_FILE})
-  include_directories( ${QT_INCLUDE_DIR}/QtScriptTools )
-  find_package(QGLViewer )
-endif(QT4_FOUND)
-
-if(GLEW_FOUND)
-  include_directories ( ${GLEW_INCLUDE_DIR} )
-  add_definitions(-DCGAL_GLEW_ENABLED)
-else(GLEW_FOUND)
-  message(STATUS "NOTICE: GLEW library is not found. Splat rendering will not be available.")
-endif(GLEW_FOUND)
-
-find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
-if (EIGEN3_FOUND)
-  include( ${EIGEN3_USE_FILE} )
-endif(EIGEN3_FOUND)
-
-if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  set(Boost_USE_MULTITHREADED      ON)
-  find_package(Boost COMPONENTS thread system)
-
-  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
-
-  qt4_wrap_ui( MainWindowUI_files MainWindow.ui )
-  qt4_wrap_ui( FileLoaderDialogUI_files FileLoaderDialog.ui )
-  qt4_wrap_ui( Show_point_dialogUI_FILES Show_point_dialog.ui )
-  qt4_wrap_ui( remeshingUI_FILES  Remeshing_dialog.ui)
-  qt4_wrap_ui( meshingUI_FILES  Meshing_dialog.ui )
-  qt4_wrap_ui( cameraUI_FILES   Camera_positions_list.ui )
-  qt4_wrap_ui( PreferencesUI_FILES   Preferences.ui )
-  qt4_wrap_ui( point_inside_polyhedronUI_FILES Point_inside_polyhedron_widget.ui)
-  qt4_wrap_ui( polyhedron_slicerUI_FILES Polyhedron_slicer_widget.ui)
-  qt4_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui)
-  qt4_wrap_ui( selectionUI_FILES Selection_widget.ui)
-  qt4_wrap_ui( funcUI_FILES Function_dialog.ui )
-
-  qt4_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
-  qt4_generate_moc( "File_loader_dialog.h" "${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp" )
-  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
-  add_file_dependencies( File_loader_dialog_moc_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/File_loader_dialog.h" )
-
-  qt4_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
-  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
-
-  include( ${CMAKE_CURRENT_SOURCE_DIR}/polyhedron_demo_macros.cmake )
-
-  qt4_add_resources ( RESOURCE_FILES Polyhedron_3.qrc )
-
-  qt4_generate_moc( "CGAL_demo/Viewer_interface.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_interface_moc.cpp" )
-
-  qt4_automoc(Scene.cpp
-              Scene_item.cpp
-              Scene_plane_item.cpp
-              Scene_combinatorial_map_item.cpp
-              Scene_polygon_soup_item.cpp
-              Scene_polyhedron_item.cpp
-              Scene_polyhedron_transform_item.cpp
-              Scene_polylines_item.cpp
-              Scene_textured_polyhedron_item.cpp
-              Scene_c2t3_item.cpp
-              Scene_nef_polyhedron_item.cpp
-              Show_point_dialog.cpp
-              Mesher_base.cpp
-              Camera_positions_list.cpp
-              Scene_points_with_normal_item.cpp
-			  Scene_polyhedron_item_decorator.cpp
-			  Scene_polyhedron_selection_item.cpp
-			  Scene_polyhedron_item_k_ring_selection.cpp
-              )
-  qt4_automoc( Scene_implicit_function_item.cpp )
-
-
-  # AUXILIARY LIBRARIES
-
-  # put plugins (which are shared libraries) at the same location as
-  # executable files
-  set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
-  set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
-
-  add_library(demo_framework SHARED
-    Scene.cpp
-    Viewer.cpp Viewer_moc.cpp Viewer_interface_moc.cpp
-    Scene_item.cpp Scene_item.moc
-    Scene_item_with_display_list.cpp
-    Polyhedron_demo_plugin_helper.cpp)
-
-  target_link_libraries(demo_framework
-    ${QGLVIEWER_LIBRARIES}
-    ${QT_LIBRARIES}
-    ${OPENGL_gl_LIBRARY}
-    ${OPENGL_glu_LIBRARY}
-    )
-
-  add_library(scene_basic_objects SHARED
-    Scene_plane_item.cpp Scene_plane_item.moc)
-  target_link_libraries(scene_basic_objects 
-    demo_framework
-    ${CGAL_LIBRARIES}
-    ${QGLVIEWER_LIBRARIES}
-    ${QT_LIBRARIES}
-    ${OPENGL_gl_LIBRARY}
-    ${OPENGL_glu_LIBRARY}
-    )
-
-  add_library(point_dialog SHARED Show_point_dialog.cpp Show_point_dialog.ui ${Show_point_dialogUI_FILES})
-  target_link_libraries(point_dialog ${QT_LIBRARIES})
-
-  macro(add_item item_name)
-    add_library(${item_name} SHARED ${ARGN})
-    target_link_libraries(${item_name} demo_framework ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES})
-  endmacro(add_item)
-
-  add_item(scene_c2t3_item Scene_c2t3_item.cpp Scene_c2t3_item.moc)
-  add_item(scene_polyhedron_item Scene_polyhedron_item.cpp Scene_polyhedron_item.moc)
-  add_item(scene_polyhedron_transform_item Scene_polyhedron_transform_item.cpp Scene_polyhedron_transform_item.moc)
-  # special
-  target_link_libraries(scene_polyhedron_transform_item scene_polyhedron_item)
-
-  if(GLEW_FOUND)
-    qt4_add_resources(gl_splat_rc GlSplat/glsplat.qrc)
-    add_library(gl_splat SHARED
-      GlSplat/GlSplat.cpp GlSplat/Shader.cpp ${gl_splat_rc})
-    target_link_libraries(gl_splat ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${GLEW_LIBRARIES})
-  endif(GLEW_FOUND)
-  
-  add_item(scene_combinatorial_map_item Scene_combinatorial_map_item.cpp Scene_combinatorial_map_item.moc)
-  # special
-  target_link_libraries(scene_combinatorial_map_item scene_polyhedron_item)
-
-  add_item(scene_polylines_item Scene_polylines_item.cpp Scene_polylines_item.moc)
-
-  add_item(scene_polyhedron_item_decorator Scene_polyhedron_item_decorator.cpp Scene_polyhedron_item_decorator.moc)
-  target_link_libraries(scene_polyhedron_item_decorator scene_polyhedron_item)
-  
-  add_item(scene_polyhedron_item_k_ring_selection Scene_polyhedron_item_k_ring_selection.cpp Scene_polyhedron_item_k_ring_selection.moc)
-  target_link_libraries(scene_polyhedron_item_k_ring_selection scene_polyhedron_item)
- 
-  add_item(scene_polyhedron_selection_item Scene_polyhedron_selection_item.cpp Scene_polyhedron_selection_item.moc)
-  target_link_libraries(scene_polyhedron_selection_item scene_polyhedron_item_decorator scene_polyhedron_item_k_ring_selection)
- 
-  if(EIGEN3_FOUND )
-    add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp Scene_textured_polyhedron_item.moc)
-  endif()
-
-  add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
-
-  add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp Scene_polygon_soup_item.moc)
-  target_link_libraries(scene_polygon_soup_item scene_polyhedron_item)
-  add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp Scene_nef_polyhedron_item.moc
-    Scene_nef_rendering.cpp)
-  target_link_libraries(scene_nef_polyhedron_item scene_polyhedron_item)
-  add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp Scene_points_with_normal_item.moc)
-  if(GLEW_FOUND)
-    target_link_libraries( scene_points_with_normal_item gl_splat ${GLEW_LIBRARIES} )
-    target_link_libraries( demo_framework gl_splat ${GLEW_LIBRARIES} )
-  endif(GLEW_FOUND)
-
-  foreach( lib 
-      demo_framework
-      scene_basic_objects
-      scene_polyhedron_item
-      scene_polygon_soup_item
-      scene_nef_polyhedron_item )
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${lib} )
-  endforeach()
-
-  add_definitions(-DQT_STATICPLUGIN)
-#  if(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
-    set(CGAL_POLYHEDRON_DEMO_DEFINITIONS "-DUSE_FORWARD_DECL")
-    add_definitions(${CGAL_POLYHEDRON_DEMO_DEFINITIONS})
-    add_executable  ( Polyhedron_3 MainWindow.cpp
-      Polyhedron_3.cpp
-#      Viewer.cpp
-#      Scene.cpp
-      MainWindow_moc.cpp
-      File_loader_dialog_moc.cpp
-#      Viewer_moc.cpp
-       ${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} )
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
-    if(EIGEN3_FOUND)
-#      add_executable( Polyhedron_3 Scene_tex_rendering.cpp Scene_tex_polyhedron_operations.cpp )
-    endif()
-#  else(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
-#    add_file_dependencies( Polyhedron_3.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
-#                                            "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp"
-#                                            "${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp"
-#					    "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
-#    add_executable  ( Polyhedron_3 Polyhedron_3.cpp ${UI_FILES} ${RESOURCE_FILES} )
-#  endif(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
-
-
-  # Link with Qt libraries
-  if( POLYHEDRON_QTSCRIPT_DEBUGGER )
-    add_definitions( -DQT_SCRIPTTOOLS_LIB )
-    target_link_libraries( Polyhedron_3 QtScriptTools )
-  endif()
-  target_link_libraries( Polyhedron_3 ${QT_LIBRARIES} )
-  target_link_libraries( Polyhedron_3 demo_framework )
-  target_link_libraries( Polyhedron_3 point_dialog )
-
-  if(GLEW_FOUND)
-    target_link_libraries( Polyhedron_3 gl_splat ${GLEW_LIBRARIES} )
-  endif(GLEW_FOUND)
-
-  # Link with CGAL
-  target_link_libraries( Polyhedron_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-  # Link with libQGLViewer, OpenGL
-  target_link_libraries( Polyhedron_3 ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
-
-
-  ###########
-  # PLUGINS #
-  ###########
-  remove_definitions(-DQT_STATICPLUGIN)
-
-  polyhedron_demo_plugin(remeshing_plugin Polyhedron_demo_remeshing_plugin Polyhedron_demo_remeshing_plugin_cgal_code.cpp Mesher_base.cpp ${remeshingUI_FILES})
-  target_link_libraries(remeshing_plugin scene_polyhedron_item scene_polygon_soup_item scene_c2t3_item)
-
-  polyhedron_demo_plugin(camera_positions_plugin 
-    Polyhedron_demo_camera_positions_plugin
-    Camera_positions_list 
-    Camera_positions_list.moc
-    ${cameraUI_FILES})
-
-  target_link_libraries( camera_positions_plugin ${QGLVIEWER_LIBRARIES} demo_framework)
-
-  if ( Boost_VERSION GREATER 103400 )
-    qt4_generate_moc( "Polyhedron_demo_mesh_3_plugin_cgal_code.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Scene_c3t3_item.moc" )
-
-    polyhedron_demo_plugin(mesh_3_plugin Polyhedron_demo_mesh_3_plugin 
-      Polyhedron_demo_mesh_3_plugin_cgal_code.cpp Scene_c3t3_item.moc
-      ${meshingUI_FILES})
-    target_link_libraries(mesh_3_plugin scene_polyhedron_item scene_polygon_soup_item ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
-  else( Boost_VERSION GREATER 103400 )
-    message(STATUS "warning: the plugin mesh_3_plugin requires Boost>=1.34.1 and will not be compiled.")
-  endif( Boost_VERSION GREATER 103400 )
-
-  polyhedron_demo_plugin(inside_out_plugin Polyhedron_demo_inside_out_plugin)
-  target_link_libraries(inside_out_plugin scene_polyhedron_item scene_polygon_soup_item)
-
-  polyhedron_demo_plugin(off_plugin Polyhedron_demo_off_plugin)
-  target_link_libraries(off_plugin scene_polyhedron_item scene_polygon_soup_item)
-
-  polyhedron_demo_plugin(nef_io_plugin Polyhedron_demo_io_nef_plugin)
-  target_link_libraries(nef_io_plugin  scene_nef_polyhedron_item)
-
-  polyhedron_demo_plugin(polylines_io_plugin Polyhedron_demo_polylines_io_plugin)
-  target_link_libraries(polylines_io_plugin scene_polylines_item)
-
-  polyhedron_demo_plugin(io_implicit_function_plugin Io_implicit_function_plugin ${funcUI_FILES})
-  target_link_libraries(io_implicit_function_plugin scene_implicit_function_item)
-
-  polyhedron_demo_plugin(gocad_plugin Polyhedron_demo_gocad_plugin)
-  target_link_libraries(gocad_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(stl_plugin Polyhedron_demo_stl_plugin)
-  target_link_libraries(stl_plugin scene_polyhedron_item scene_polygon_soup_item)
-
-  polyhedron_demo_plugin(xyz_plugin Polyhedron_demo_xyz_plugin)
-  target_link_libraries(xyz_plugin scene_points_with_normal_item)
-  
-  polyhedron_demo_plugin(selection_io_plugin Polyhedron_demo_selection_io_plugin)
-  target_link_libraries(selection_io_plugin scene_polyhedron_selection_item)
-
-  polyhedron_demo_plugin(orient_soup_plugin Polyhedron_demo_orient_soup_plugin)
-  target_link_libraries(orient_soup_plugin scene_polygon_soup_item scene_polyhedron_item)
-
-  polyhedron_demo_plugin(triangulate_facets_plugin Polyhedron_demo_triangulate_facets_plugin)
-  target_link_libraries(triangulate_facets_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(off_to_nef_plugin Polyhedron_demo_off_to_nef_plugin)
-  target_link_libraries(off_to_nef_plugin scene_nef_polyhedron_item)
-
-  polyhedron_demo_plugin(off_to_xyz_plugin Polyhedron_demo_off_to_xyz_plugin)
-  target_link_libraries(off_to_xyz_plugin scene_points_with_normal_item)
-
-  polyhedron_demo_plugin(convex_hull_plugin Polyhedron_demo_convex_hull_plugin)
-  target_link_libraries(convex_hull_plugin scene_polyhedron_item scene_points_with_normal_item scene_polylines_item scene_polyhedron_selection_item)
-
-  polyhedron_demo_plugin(kernel_plugin Polyhedron_demo_kernel_plugin)
-  target_link_libraries(kernel_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(pca_plugin Polyhedron_demo_pca_plugin)
-  target_link_libraries(pca_plugin scene_polyhedron_item scene_basic_objects)
-
-  if(EIGEN3_FOUND)
-    qt4_wrap_ui( scale_spaceUI_FILES Polyhedron_demo_scale_space_reconstruction_plugin.ui)
-    polyhedron_demo_plugin(scale_space_reconstruction_plugin Polyhedron_demo_scale_space_reconstruction_plugin ${scale_spaceUI_FILES})
-    target_link_libraries(scale_space_reconstruction_plugin scene_polygon_soup_item scene_polyhedron_item scene_points_with_normal_item)
-
-    polyhedron_demo_plugin(parameterization_plugin Polyhedron_demo_parameterization_plugin)
-    target_link_libraries(parameterization_plugin scene_polyhedron_item scene_textured_polyhedron_item )
-
-    qt4_wrap_ui( poissonUI_FILES Polyhedron_demo_poisson_plugin.ui)
-    polyhedron_demo_plugin(poisson_plugin Polyhedron_demo_poisson_plugin Polyhedron_demo_poisson_plugin_impl.cpp ${poissonUI_FILES})
-    target_link_libraries(poisson_plugin scene_polyhedron_item scene_points_with_normal_item)
-
-    qt4_wrap_ui( normal_estimationUI_FILES Polyhedron_demo_normal_estimation_plugin.ui)
-    polyhedron_demo_plugin(normal_estimation_plugin Polyhedron_demo_normal_estimation_plugin ${normal_estimationUI_FILES})
-    target_link_libraries(normal_estimation_plugin scene_points_with_normal_item)
-    
-    polyhedron_demo_plugin(point_set_smoothing_plugin Polyhedron_demo_point_set_smoothing_plugin)
-    target_link_libraries(point_set_smoothing_plugin scene_points_with_normal_item)
-
-    polyhedron_demo_plugin(point_set_average_spacing_plugin Polyhedron_demo_point_set_average_spacing_plugin)
-    target_link_libraries(point_set_average_spacing_plugin scene_points_with_normal_item)
-
-    polyhedron_demo_plugin(jet_fitting_plugin Polyhedron_demo_jet_fitting_plugin)
-    target_link_libraries(jet_fitting_plugin scene_polyhedron_item scene_polylines_item)
-  else(EIGEN3_FOUND)
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Parameterization plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Poisson reconstruction plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.")
-    message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Scale space reconstruction plugin will not be available.")
-  endif(EIGEN3_FOUND)
-
-  polyhedron_demo_plugin(self_intersection_plugin Polyhedron_demo_self_intersection_plugin)
-  target_link_libraries(self_intersection_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(polyhedron_stitching_plugin Polyhedron_demo_polyhedron_stitching_plugin)
-  target_link_libraries(polyhedron_stitching_plugin scene_polyhedron_item scene_polylines_item)
-
-  polyhedron_demo_plugin(join_and_split_polyhedra_plugin Polyhedron_demo_join_and_split_polyhedra_plugin)
-  target_link_libraries(join_and_split_polyhedra_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(subdivision_methods_plugin Polyhedron_demo_subdivision_methods_plugin)
-  target_link_libraries(subdivision_methods_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(mesh_simplification_plugin Polyhedron_demo_mesh_simplification_plugin)
-  target_link_libraries(mesh_simplification_plugin scene_polyhedron_item)
-
-  polyhedron_demo_plugin(polyhedron_slicer_plugin Polyhedron_demo_polyhedron_slicer_plugin ${polyhedron_slicerUI_FILES})
-  target_link_libraries(polyhedron_slicer_plugin scene_polyhedron_item scene_basic_objects scene_polylines_item)
-
-  polyhedron_demo_plugin(mesh_segmentation_plugin Polyhedron_demo_mesh_segmentation_plugin ${segmentationUI_FILES})
-  target_link_libraries(mesh_segmentation_plugin scene_polyhedron_item)
-  
-  polyhedron_demo_plugin(nef_plugin Polyhedron_demo_nef_plugin)
-  target_link_libraries(nef_plugin scene_nef_polyhedron_item)
-
-  polyhedron_demo_plugin(intersection_plugin Polyhedron_demo_intersection_plugin)
-  target_link_libraries(intersection_plugin  scene_polyhedron_item scene_polylines_item)
-
-  polyhedron_demo_plugin(transform_polyhedron_plugin Polyhedron_demo_transform_polyhedron_plugin)
-  target_link_libraries(transform_polyhedron_plugin  scene_polyhedron_item scene_polyhedron_transform_item)
-
-  polyhedron_demo_plugin(corefinement_plugin Polyhedron_demo_corefinement_plugin)
-  target_link_libraries(corefinement_plugin  scene_polyhedron_item scene_combinatorial_map_item scene_polylines_item)
-
-  polyhedron_demo_plugin(trivial_plugin Polyhedron_demo_trivial_plugin)
-
-  # Edit polyhedron scene item and plugin
-  if ( EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90" )
-    qt4_wrap_ui( editionUI_FILES Deform_mesh.ui )
-    qt4_automoc( Scene_edit_polyhedron_item.cpp )
-    add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp Scene_edit_polyhedron_item.moc ${editionUI_FILES})
-
-    target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection)
-
-    polyhedron_demo_plugin(edit_polyhedron_plugin Polyhedron_demo_edit_polyhedron_plugin ${editionUI_FILES})
-    target_link_libraries(edit_polyhedron_plugin scene_polyhedron_item scene_edit_polyhedron_item)
-  else()
-    message(STATUS "NOTICE: The polyhedron edit plugin require Eigen 3.2 (or higher) and will not be available.")
-  endif()
-  
-  polyhedron_demo_plugin(cut_plugin Polyhedron_demo_cut_plugin)
-  target_link_libraries(cut_plugin scene_polyhedron_item scene_basic_objects)
-  
-  polyhedron_demo_plugin(point_inside_polyhedron_plugin Polyhedron_demo_point_inside_polyhedron_plugin ${point_inside_polyhedronUI_FILES})
-  target_link_libraries(point_inside_polyhedron_plugin scene_polyhedron_item scene_points_with_normal_item)
-  
-  qt4_wrap_ui(point_set_simplificationUI_FILES Polyhedron_demo_point_set_simplification_plugin.ui)
-  polyhedron_demo_plugin(point_set_simplification_plugin Polyhedron_demo_point_set_simplification_plugin ${point_set_simplificationUI_FILES})
-  target_link_libraries(point_set_simplification_plugin scene_points_with_normal_item)
-
-  qt4_wrap_ui( ps_outliers_removal_UI_FILES Polyhedron_demo_point_set_outliers_removal_plugin.ui)
-  polyhedron_demo_plugin(point_set_outliers_removal_plugin Polyhedron_demo_point_set_outliers_removal_plugin ${ps_outliers_removal_UI_FILES}) 
-  target_link_libraries(point_set_outliers_removal_plugin scene_points_with_normal_item)
-
-  polyhedron_demo_plugin(selection_plugin Polyhedron_demo_selection_plugin ${selectionUI_FILES})
-  target_link_libraries(selection_plugin scene_polyhedron_selection_item scene_points_with_normal_item)
-#
-# Exporting
-#
-  if(TARGET CGAL_Qt4)
-    export(TARGETS CGAL_Qt4 FILE polyhedron_demo_targets.cmake NAMESPACE Polyhedron_)
-    export(TARGETS CGAL CGAL_Qt4 FILE polyhedron_demo_targets.cmake NAMESPACE Polyhedron_)
-  else()
-    export(TARGETS FILE polyhedron_demo_targets.cmake)
-  endif()
-  export(
-    TARGETS
-    demo_framework
-    scene_polyhedron_item
-    scene_points_with_normal_item
-    scene_implicit_function_item
-    scene_polylines_item
-    NAMESPACE Polyhedron_
-    APPEND FILE polyhedron_demo_targets.cmake)
-
-  if(GLEW_FOUND)
-    export(
-      TARGETS
-      gl_splat
-      NAMESPACE Polyhedron_
-      APPEND FILE polyhedron_demo_targets.cmake)
-  endif(GLEW_FOUND)
-
-  configure_file(CGAL_polyhedron_demoConfig.cmake.in  CGAL_polyhedron_demoConfig.cmake)
-
-else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  set(POLYHEDRON_MISSING_DEPS "")
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(POLYHEDRON_MISSING_DEPS "the CGAL Qt4 library, ${POLYHEDRON_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(POLYHEDRON_MISSING_DEPS "Qt4, ${POLYHEDRON_MISSING_DEPS}")
-  endif()
-
-  if(NOT OPENGL_FOUND)
-    set(POLYHEDRON_MISSING_DEPS "OpenGL, ${POLYHEDRON_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(POLYHEDRON_MISSING_DEPS "QGLViewer, ${POLYHEDRON_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.cpp
deleted file mode 100644
index 6eae47a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "Camera_positions_list.h"
-
-#include "ui_Camera_positions_list.h"
-#include <QListView>
-#include <QStandardItemModel>
-#include <QFileDialog>
-#include <QFile>
-#include <QTextStream>
-
-#include "Viewer_interface.h"
-
-#include <cassert>
-
-Camera_positions_list::Camera_positions_list(QWidget* parent)
-  : QDockWidget(parent), m_viewer(0), counter(0), m_model(new QStandardItemModel(this))
-{
-  Ui::Camera_positions_list ui;
-  ui.setupUi(this);
-  m_listView = ui.listView;
-  m_listView->setModel(m_model);
-  
-  m_listView->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed);
-  connect(m_listView, SIGNAL(activated(QModelIndex)),
-          this, SLOT(activatedRow(QModelIndex)));
-}
-
-void Camera_positions_list::setViewer(Viewer_interface* viewer)
-{
-  m_viewer = viewer;
-}
-
-void Camera_positions_list::on_plusButton_pressed()
-{
-  if(!m_viewer) return;
-  addItem(tr("Camera position #%1").arg(++counter),
-          m_viewer->dumpCameraCoordinates());
-}
-
-void Camera_positions_list::addItem(QString text, QString data)
-{
-  QStandardItem* item = new QStandardItem(text);
-  item->setData(data, Qt::UserRole);
-  m_model->insertRow(m_model->rowCount(), item);
-}
-
-void Camera_positions_list::on_upButton_pressed()
-{
-  int row = m_listView->selectionModel()->currentIndex().row();
-  m_model->insertRow(row-1, m_model->takeRow(row));
-  m_listView->selectionModel()->setCurrentIndex(m_model->index(row-1, 0),
-                                                QItemSelectionModel::Clear);
-}
-
-void Camera_positions_list::on_downButton_pressed()
-{
-  int row = m_listView->selectionModel()->currentIndex().row();
-  m_model->insertRow(row+1, m_model->takeRow(row));
-  m_listView->selectionModel()->setCurrentIndex(m_model->index(row+1, 0),
-                                                QItemSelectionModel::Clear);
-}
-
-void Camera_positions_list::on_minusButton_pressed()
-{
-  Q_FOREACH(QModelIndex index, 
-            m_listView->selectionModel()->selectedIndexes()) {
-    m_model->removeRows(index.row(), 1);
-  }
-}
-
-void Camera_positions_list::on_clearButton_pressed()
-{
-  m_model->clear();
-}
-
-// void Camera_positions_list::editItem(QListWidgetItem* item)
-// {
-//   std::cerr << "is_editable: " << m_listView->flags(item)QListWidget
-
-//   m_listView->editItem(item);
-// }
-
-void Camera_positions_list::activatedRow(QModelIndex index)
-{
-  QString s = m_model->data(index, Qt::UserRole).toString();
-  if(s.isNull()) return;
-  m_viewer->moveCameraToCoordinates(s);
-}
-
-void Camera_positions_list::on_saveButton_pressed()
-{
-  QString filename =
-    QFileDialog::getSaveFileName(this, 
-                                 tr("Save camera coordinates to file"),
-                                 QString(),
-                                 tr("(*.camera.txt)"));
-  QFile file(filename);
-  file.open(QIODevice::WriteOnly);
-  QTextStream out(&file);
-  for(int i = 0; i < m_model->rowCount(); ++i)
-  {
-    QStandardItem* item = m_model->item(i);
-    out << item->data(Qt::DisplayRole).toString()
-        << "\n"
-        << item->data(Qt::UserRole).toString()
-        << "\n";
-  }
-  file.close();
-}
-
-void Camera_positions_list::on_openButton_pressed()
-{
-  QString filename =
-    QFileDialog::getOpenFileName(this, 
-                                 tr("Read camera coordinates from file"),
-                                 QString(),
-                                 tr("(*.camera.txt)"));
-  load(filename);
-}
-
-void Camera_positions_list::load(QString filename) {
-  QFile file(filename);
-  std::clog << "Loading camera positions " << qPrintable(filename) << std::endl;
-  file.open(QIODevice::ReadOnly);
-  QTextStream input(&file);
-  while(!input.atEnd()) {
-    QString text = input.readLine(1000);
-    QString coord = input.readLine(1000);
-    if(text.isNull() || coord.isNull()) return;
-    qglviewer::Frame frame;
-    if(m_viewer->readFrame(coord, frame))
-    {
-      addItem(text,
-              m_viewer->dumpFrame(frame));
-    }
-  }
-}
-
-#include "Camera_positions_list.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.h
deleted file mode 100644
index 81b1105..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef CAMERA_POSITIONS_LIST_H
-#define CAMERA_POSITIONS_LIST_H
-
-#include <QDockWidget>
-#include <QModelIndex>
-
-class Viewer_interface;
-class QListView;
-class QStandardItemModel;
-
-class Camera_positions_list : public QDockWidget {
-  Q_OBJECT
-public:  
-  Camera_positions_list(QWidget* parent);
-
-  void setViewer(Viewer_interface*);
-
-public slots:
-  void load(QString filename);
-protected slots:
-  void on_plusButton_pressed();
-  void on_minusButton_pressed();
-  void on_upButton_pressed();
-  void on_downButton_pressed();
-  void on_openButton_pressed();
-  void on_saveButton_pressed();
-  void on_clearButton_pressed();
-
-  void activatedRow(QModelIndex index);
-
-protected:
-  void addItem(QString, QString);
-
-private:
-  Viewer_interface* m_viewer;
-  int counter;
-  QListView* m_listView;
-  QStandardItemModel* m_model;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.ui
deleted file mode 100644
index 9fd0fa4..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Camera_positions_list.ui
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Camera_positions_list</class>
- <widget class="QDockWidget" name="Camera_positions_list">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Camera positions</string>
-  </property>
-  <widget class="QWidget" name="dockWidgetContents">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QToolButton" name="openButton">
-        <property name="text">
-         <string>&Open list</string>
-        </property>
-        <property name="shortcut">
-         <string>Ctrl+O</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="saveButton">
-        <property name="text">
-         <string>&Save list</string>
-        </property>
-        <property name="shortcut">
-         <string>Ctrl+S</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="plusButton">
-        <property name="text">
-         <string>...</string>
-        </property>
-        <property name="icon">
-         <iconset resource="Polyhedron_3.qrc">
-          <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="minusButton">
-        <property name="text">
-         <string>...</string>
-        </property>
-        <property name="icon">
-         <iconset resource="Polyhedron_3.qrc">
-          <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="clearButton">
-        <property name="text">
-         <string>&Clear</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="upButton">
-        <property name="text">
-         <string>&Up</string>
-        </property>
-        <property name="shortcut">
-         <string>Ctrl+U</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="downButton">
-        <property name="text">
-         <string>&Down</string>
-        </property>
-        <property name="shortcut">
-         <string>Ctrl+D</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <widget class="QListView" name="listView"/>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources>
-  <include location="Polyhedron_3.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Color_map.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Color_map.h
deleted file mode 100644
index fb89f4d..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Color_map.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _COLOR_MAP_H
-#define _COLOR_MAP_H
-
-#include <QColor>
-
-template <typename Output_color_iterator>
-Output_color_iterator
-compute_color_map(QColor base_color,
-                  unsigned nb_of_colors,
-                  Output_color_iterator out)
-{
-  qreal hue = base_color.hueF();
-  const qreal step = ((qreal)1) / nb_of_colors;
-
-  qreal h = hue;
-  for(unsigned i = 0; i < nb_of_colors; ++i) {
-    h += step;
-    if ( h > 1 ) { h -= 1; }
-    *out++ = QColor::fromHsvF(h, 
-                              base_color.saturationF(), 
-                              base_color.valueF());
-  }
-  return out;
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.cpp
deleted file mode 100644
index c8d74b8..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "Color_ramp.h"
-#include <iostream>
-
-// -----------------------------------
-// Color_component
-// -----------------------------------
-Color_component::
-Color_component()
-{
-  add(0,0);
-  add(1,1);
-}
-
-Color_component::
-Color_component(const double c0, const double c1)
-{
-  add(0,c0);
-  add(1,c1);
-}
-
-double 
-Color_component::
-interpolate(const double v) const
-{
-  Values::const_iterator next = next_it(v);
-
-  // next is just after v
-  Values::const_iterator prev = --next;
-  ++next;
-
-  if ( v>=1 && next != values_.end())
-    std::cerr << ".";
-  
-  if ( next == values_.end() )
-  {
-    return prev->second;
-  }
-  
-  const double& a = prev->first;
-  const double& b = next->first;
-  return (b-v)/(b-a) * prev->second + (v-a)/(b-a) * next->second;
-}
-
-void
-Color_component::
-add(const double v, double color)
-{
-  if ( color > 1 ) { color = 1; }
-  if ( color < 0 ) { color = 0; }
-  
-  Values::iterator next = next_it(v);
-  values_.insert(next, std::make_pair(v,color));
-}
-
-
-void
-Color_component::
-rebuild(const double c0, const double c1)
-{
-  values_.clear();
-  add(1,c1);
-  add(0,c0);
-}
-
-void
-Color_component::
-print() const
-{
-  for ( Values::const_iterator it = values_.begin(),
-       end = values_.end() ; it != end ; ++it )
-  { 
-    std::cout << "<" << it->first << "," << it->second << "> ";
-  }
-  
-  std::cout << std::endl;
-}
-
-
-// -----------------------------------
-// Color_ramp
-// -----------------------------------
-Color_ramp::Color_ramp()
-  : r_()
-  , g_()
-  , b_()
-{ 
-}
-
-void 
-Color_ramp::build_red()
-{
-  r_.rebuild(1,0.5);
-  g_.rebuild(1,0);
-  b_.rebuild(1,0);
-
-  r_.add(0.3,1);
-  r_.add(0.05,1);
-  g_.add(0.05,0.95);
-  g_.add(0.3,0.5);
-  b_.add(0.05,0);
-}
-
-void 
-Color_ramp::build_blue()
-{
-  r_.rebuild(1,0);
-  g_.rebuild(1,0);
-  b_.rebuild(1,0.5);
-  
-  b_.add(0.1,0.8);
-  g_.add(0.1,0.4);
-  r_.add(0.1,0.4);
-}
-
-void
-Color_ramp::
-print() const
-{
-  std::cout << "r: ";
-  r_.print();
-  std::cout << "g: ";
-  g_.print();
-  std::cout << "b: ";
-  b_.print();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Deform_mesh.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Deform_mesh.ui
deleted file mode 100644
index 72f2464..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Deform_mesh.ui
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>DeformMesh</class>
- <widget class="QDockWidget" name="DeformMesh">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>357</width>
-    <height>491</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Surface Mesh Deformation</string>
-  </property>
-  <widget class="QWidget" name="dockWidgetContents">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QGroupBox" name="SelectionGroupBox">
-      <property name="title">
-       <string>Selection</string>
-      </property>
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="2" column="1" rowspan="2" colspan="3">
-        <layout class="QVBoxLayout" name="RingLayout">
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_4">
-           <item>
-            <layout class="QVBoxLayout" name="verticalLayout_5">
-             <item>
-              <widget class="QLabel" name="label">
-               <property name="text">
-                <string>Brush Size ROI:</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QLabel" name="label_2">
-               <property name="text">
-                <string>Control Vertices Brush Size:</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <layout class="QVBoxLayout" name="verticalLayout_2">
-             <item>
-              <widget class="QSpinBox" name="BrushSpinBoxRoi"/>
-             </item>
-             <item>
-              <widget class="QSpinBox" name="BrushSpinBoxCtrlVert"/>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </item>
-       <item row="4" column="0" colspan="5">
-        <layout class="QHBoxLayout" name="horizontalLayout_3">
-         <item>
-          <widget class="QPushButton" name="SelectAllVerticesPushButton">
-           <property name="text">
-            <string>Set All Vertices as ROI</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="ClearROIPushButton">
-           <property name="text">
-            <string>Clear ROI</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="2" column="0" rowspan="2">
-        <widget class="QGroupBox" name="ROICtrlVertGroupBox">
-         <layout class="QVBoxLayout" name="CtrlVertRoiLayout">
-          <item>
-           <widget class="QRadioButton" name="ROIRadioButton">
-            <property name="toolTip">
-             <string>Use Shift + Left Click to paint ROI vertices</string>
-            </property>
-            <property name="text">
-             <string>ROI</string>
-            </property>
-            <property name="checked">
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QRadioButton" name="CtrlVertRadioButton">
-            <property name="toolTip">
-             <string>Use Shift + Left Click to paint control vertices</string>
-            </property>
-            <property name="text">
-             <string>Control vertices</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item row="2" column="4" rowspan="2">
-        <widget class="QGroupBox" name="InsertEraseGroupBox">
-         <layout class="QVBoxLayout" name="InsertRemoveLayout">
-          <item>
-           <widget class="QRadioButton" name="InsertRadioButton">
-            <property name="text">
-             <string>Insertion</string>
-            </property>
-            <property name="checked">
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QRadioButton" name="EraseRadioButton">
-            <property name="text">
-             <string>Removal</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="groupBox">
-      <property name="title">
-       <string/>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_8">
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_4">
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_8">
-           <item>
-            <widget class="QLabel" name="label_3">
-             <property name="text">
-              <string>Isolated Component Size:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QSpinBox" name="Threshold_size_spin_box">
-             <property name="maximum">
-              <number>999999999</number>
-             </property>
-             <property name="value">
-              <number>8</number>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="Get_minimum_button">
-             <property name="text">
-              <string>Get Minimum</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <widget class="QPushButton" name="Select_isolated_components_button">
-           <property name="text">
-            <string>Select Isolated Components Below Threshold</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="CtrlVertGroupNavigationGroupBox">
-      <property name="title">
-       <string>Group of Control Vertices Navigation</string>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_3">
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout">
-         <item>
-          <widget class="QPushButton" name="PrevCtrlVertPushButton">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text">
-            <string><<</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="NextCtrlVertPushButton">
-           <property name="text">
-            <string>>></string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <item>
-          <widget class="QPushButton" name="AddCtrlVertPushButton">
-           <property name="text">
-            <string>Create new</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="DeleteCtrlVertPushButton">
-           <property name="text">
-            <string>Delete </string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="ActivatePivotingCheckBox">
-         <property name="text">
-          <string>Activate Pivoting </string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_7">
-      <item>
-       <spacer name="horizontalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="OverwritePushButton">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>Update Original Positions</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <widget class="Line" name="line">
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_5">
-      <item>
-       <widget class="QCheckBox" name="ShowROICheckBox">
-        <property name="text">
-         <string>Show ROI</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="ShowAsSphereCheckBox">
-        <property name="text">
-         <string>Show As Sphere</string>
-        </property>
-        <property name="checked">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_6">
-      <item>
-       <widget class="QPushButton" name="SaveROIPushButton">
-        <property name="text">
-         <string>Save ROI / Control Vertices</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="ReadROIPushButton">
-        <property name="text">
-         <string>Load ROI / Control Vertices</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="ApplyAndCloseLayout">
-      <item>
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="ApplyAndClosePushButton">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>Apply and Close</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/FileLoaderDialog.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/FileLoaderDialog.ui
deleted file mode 100644
index ab4b8c0..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/FileLoaderDialog.ui
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FileLoaderDialog</class>
- <widget class="QDialog" name="FileLoaderDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>339</width>
-    <height>105</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Select a loader</string>
-  </property>
-  <property name="layoutDirection">
-   <enum>Qt::LeftToRight</enum>
-  </property>
-  <property name="sizeGripEnabled">
-   <bool>false</bool>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string>TextLabel</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QComboBox" name="pluginBox">
-     <property name="statusTip">
-      <string/>
-     </property>
-     <property name="whatsThis">
-      <string/>
-     </property>
-     <property name="accessibleName">
-      <string/>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="layoutDirection">
-      <enum>Qt::LeftToRight</enum>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QCheckBox" name="alwaysUse">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-     <property name="checked">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>FileLoaderDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>FileLoaderDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/CMakeLists.txt
deleted file mode 100644
index c6e51f9..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-
-project(GlSplat)
-
-cmake_minimum_required(VERSION 2.6.0)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
-
-find_package(Qt4 REQUIRED)
-find_package(GLEW REQUIRED)
-
-set(QT_USE_QTOPENGL TRUE)
-set(QT_USE_QTXML TRUE)
-include(${QT_USE_FILE})
-include_directories( ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${GLEW_INCLUDE_DIR})
-
-set(srcs Shader.cpp GlSplat.cpp)
-
-qt4_automoc( ${srcs})
-qt4_add_resources(srcs glsplat.qrc)
-
-add_library(GlSplat SHARED ${srcs})
-target_link_libraries(GlSplat ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${GLEW_LIBRARIES})
-
-find_package(QGLViewer)
-if(QGLVIEWER_FOUND)
-  include_directories( ${QGLViewer_INCLUDES})
-  add_executable(demo demo.cpp)
-  target_link_libraries(demo ${QT_QTXML_LIBRARY} ${QGLViewer_LIBRARIES} GlSplat)
-else()
-  message("QGLViewer not found, demo won't be built")
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.cpp
deleted file mode 100644
index fd69857..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.cpp
+++ /dev/null
@@ -1,514 +0,0 @@
-// This file is part of GlSplat, a simple splatting C++ library
-//
-// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
-//
-// GlSplat is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtGui>
-
-#include <math.h>
-#include <stdlib.h>
-#include <iostream>
-#include <GL/glew.h>
-
-#include "GlSplat.h"
-#include "Shader.h"
-
-#include <QGLWidget>
-#include <QTextStream>
-#include <QGLFramebufferObject>
-
-
-namespace GlSplat {
-
-SplatRenderer::SplatRenderer()
-{
-  mNormalTextureID = 0;
-  mDepthTextureID = 0;
-  mIsSupported = false;
-  mRenderBuffer = 0;
-  mWorkaroundATI = false;
-  mBuggedAtiBlending = false;
-  mDummyTexId = 0;
-  mIsInitialized = false;
-
-  mFlags = DEFERRED_SHADING_BIT | DEPTH_CORRECTION_BIT | FLOAT_BUFFER_BIT | OUTPUT_DEPTH_BIT;
-  mCachedFlags = ~mFlags;
-  // union of bits which controls the render buffer
-  mRenderBufferMask = DEFERRED_SHADING_BIT | FLOAT_BUFFER_BIT;
-}
-
-QString SplatRenderer::loadSource(const QString& func,const QString& filename)
-{
-  QString res;
-  QFile f(":/SplatRenderer/shaders/" + filename);
-  if (!f.open(QFile::ReadOnly))
-  {
-    std::cerr << "failed to load shader file " << filename.toAscii().data() << "\n";
-    return res;
-  }
-  else qDebug("Succesfully loaded shader func '%s' in file '%s'",qPrintable(func),qPrintable(filename));
-  QTextStream stream(&f);
-  res = stream.readAll();
-  f.close();
-  res = QString("#define GLSPLAT__%1__ 1\n").arg(func)
-      + QString("#define %1 main\n").arg(func)
-      + res;
-  return res;
-}
-
-void SplatRenderer::configureShaders()
-{
-  //  const char* passNames[3] = {"Visibility","Attribute","Finalization"};
-  QString defines = "";
-  if (mFlags & DEFERRED_SHADING_BIT)
-    defines += "#define ES_DEFERRED_SHADING\n";
-  if (mFlags & DEPTH_CORRECTION_BIT)
-    defines += "#define ES_DEPTH_CORRECTION\n";
-  if (mFlags & OUTPUT_DEPTH_BIT)
-    defines += "#define ES_OUTPUT_DEPTH 1\n";
-  if (mFlags & BACKFACE_SHADING_BIT)
-    defines += "#define ES_BACKFACE_SHADING\n";
-  if (mWorkaroundATI)
-    defines += "#define ES_ATI_WORKAROUND\n";
-
-  QString shading =
-"vec4 meshlabLighting(vec4 color, vec3 eyePos, vec3 normal)"
-"{"
-"	normal = normalize(normal);"
-"	vec3 lightVec = normalize(gl_LightSource[0].position.xyz);"
-"	vec3 halfVec = normalize( lightVec - normalize(eyePos) );"
-"	float aux_dot = dot(normal,lightVec);"
-"	float diffuseCoeff = clamp(aux_dot, 0.0, 1.0);"
-" float specularCoeff = aux_dot>0.0 ? clamp(pow(clamp(dot(halfVec, normal),0.0,1.0),gl_FrontMaterial.shininess), 0.0, 1.0) : 0.0;"
-"	return vec4(color.rgb * ( gl_FrontLightProduct[0].ambient.rgb + diffuseCoeff * gl_FrontLightProduct[0].diffuse.rgb) + specularCoeff * gl_FrontLightProduct[0].specular.rgb, 1.0);"
-"}\n";
-
-  for (int k=0;k<3;++k)
-  {
-    QString vsrc = shading + defines + mShaderSrcs[k*2+0];
-    QString fsrc = shading + defines + mShaderSrcs[k*2+1];
-    if(!mShaders[k].loadSources(mShaderSrcs[k*2+0]!="" ? vsrc.toAscii().data() : 0,
-                                mShaderSrcs[k*2+1]!="" ? fsrc.toAscii().data() : 0/*,
-                                Shader::Warnings*/))
-      mIsSupported = false;
-  }
-}
-
-void SplatRenderer::init(QGLWidget *qglw)
-{
-  mIsSupported = true;
-  if(qglw)
-    qglw->makeCurrent();
-  glewInit();
-
-  const char* rs = (const char*)glGetString(GL_RENDERER);
-  QString rendererString("");
-  if(rs)
-    rendererString = QString(rs);
-  mWorkaroundATI = rendererString.startsWith("ATI") || rendererString.startsWith("AMD");
-  // FIXME: maybe some recent HW correctly supports floating point blending...
-  mBuggedAtiBlending = rendererString.startsWith("ATI") || rendererString.startsWith("AMD");
-
-  if (mWorkaroundATI && mDummyTexId==0)
-  {
-    glActiveTexture(GL_TEXTURE0);
-    glGenTextures(1,&mDummyTexId);
-    glBindTexture(GL_TEXTURE_2D, mDummyTexId);
-    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0);
-  }
-
-  // let's check the GPU capabilities
-  mSupportedMask = DEPTH_CORRECTION_BIT | BACKFACE_SHADING_BIT;
-  if (!QGLFramebufferObject::hasOpenGLFramebufferObjects ())
-  {
-    std::cout << "SplatRenderer: error OpenGL frame buffer objects are not supported. (please, try to update your drivers)\n";
-    mIsSupported = false;
-    return;
-  }
-  if (GLEW_ARB_texture_float)
-    mSupportedMask |= FLOAT_BUFFER_BIT;
-  else
-    std::cout << "SplatRenderer: warning floating point textures are not supported.\n";
-
-  if (GLEW_ARB_draw_buffers && (!mBuggedAtiBlending))
-    mSupportedMask |= DEFERRED_SHADING_BIT;
-  else
-    std::cout << "SplatRenderer: warning deferred shading is not supported.\n";
-
-  if (GLEW_ARB_shadow)
-    mSupportedMask |= OUTPUT_DEPTH_BIT;
-  else
-    std::cerr << "SplatRenderer: warning copy of the depth buffer is not supported.\n";
-
-  mFlags = mFlags & mSupportedMask;
-
-  // load shader source
-  mShaderSrcs[0] = loadSource("VisibilityVP","Raycasting.glsl");
-  mShaderSrcs[1] = loadSource("VisibilityFP","Raycasting.glsl");
-  mShaderSrcs[2] = loadSource("AttributeVP","Raycasting.glsl");
-  mShaderSrcs[3] = loadSource("AttributeFP","Raycasting.glsl");
-  mShaderSrcs[4] = "";
-  mShaderSrcs[5] = loadSource("Finalization","Finalization.glsl");
-
-  mCurrentPass = 2;
-  mBindedPass = -1;
-  mIsInitialized = true;
-  GL_TEST_ERR
-}
-
-void SplatRenderer::updateRenderBuffer()
-{
-  if ( (!mRenderBuffer)
-    || (mRenderBuffer->width()!=mCachedVP[2])
-    || (mRenderBuffer->height()!=mCachedVP[3])
-    || ( (mCachedFlags & mRenderBufferMask) != (mFlags & mRenderBufferMask) ))
-  {
-    delete mRenderBuffer;
-    GLenum fmt = (mFlags&FLOAT_BUFFER_BIT) ? GL_RGBA16F_ARB : GL_RGBA;
-    mRenderBuffer = new QGLFramebufferObject(mCachedVP[2], mCachedVP[3],
-        (mFlags&OUTPUT_DEPTH_BIT) ? QGLFramebufferObject::NoAttachment : QGLFramebufferObject::Depth,
-        GL_TEXTURE_RECTANGLE_ARB, fmt);
-
-    if (!mRenderBuffer->isValid())
-    {
-      std::cout << "SplatRenderer: invalid FBO\n";
-    }
-
-    GL_TEST_ERR
-    if (mFlags&DEFERRED_SHADING_BIT)
-    {
-      // in deferred shading mode we need an additional buffer to accumulate the normals
-      if (mNormalTextureID==0)
-        glGenTextures(1,&mNormalTextureID);
-      glBindTexture(GL_TEXTURE_RECTANGLE_ARB, mNormalTextureID);
-      glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, fmt, mCachedVP[2], mCachedVP[3], 0, GL_RGBA, GL_FLOAT, 0);
-      glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-      glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-      mRenderBuffer->bind();
-      glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_RECTANGLE_ARB, mNormalTextureID, 0);
-      mRenderBuffer->release();
-      GL_TEST_ERR
-    }
-
-    if (mFlags&OUTPUT_DEPTH_BIT)
-    {
-      // to output the depth values to the final depth buffer we need to
-      // attach a depth buffer as a texture
-      if (mDepthTextureID==0)
-        glGenTextures(1,&mDepthTextureID);
-      glBindTexture(GL_TEXTURE_RECTANGLE_ARB, mDepthTextureID);
-      glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH_COMPONENT24_ARB, mCachedVP[2], mCachedVP[3], 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0);
-      glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-      glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-      mRenderBuffer->bind();
-      glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE_ARB, mDepthTextureID, 0);
-      mRenderBuffer->release();
-      GL_TEST_ERR
-    }
-  }
-}
-
-bool SplatRenderer::beginVisibilityPass()
-{
-  if (!mIsInitialized)
-  {
-    init();
-  }
-  if (!isSupported())
-  {
-    std::cerr << "SplatRenderer error: not supported hardware\n";
-    return false;
-  }
-  if (mCurrentPass!=2)
-  {
-    std::cerr << "SplatRenderer error: programming error when calling beginVisibilityPass\n";
-    return false;
-  }
-
-  glPushAttrib(GL_ALL_ATTRIB_BITS);
-
-  mCurrentPass = 0;
-
-  // grab projection info
-  glGetIntegerv(GL_VIEWPORT, mCachedVP);
-  glGetFloatv(GL_MODELVIEW_MATRIX, mCachedMV);
-  glGetFloatv(GL_PROJECTION_MATRIX, mCachedProj);
-
-  updateRenderBuffer();
-  if (mCachedFlags != mFlags)
-    configureShaders();
-
-  // configureShaders may detect that shaders are actually not supported.
-  if (!isSupported())
-  {
-    std::cerr << "SplatRenderer error: not supported hardware\n";
-    return false;
-  }
-
-  mCachedFlags = mFlags;
-
-  mParams.update(mCachedMV, mCachedProj, mCachedVP);
-  mParams.loadTo(mShaders[mCurrentPass]);
-
-  mRenderBuffer->bind();
-  if (mFlags & DEFERRED_SHADING_BIT)
-  {
-    GLenum buf[2] = {GL_COLOR_ATTACHMENT0_EXT,GL_COLOR_ATTACHMENT1_EXT};
-    glDrawBuffersARB(2, buf);
-  }
-  glViewport(mCachedVP[0],mCachedVP[1],mCachedVP[2],mCachedVP[3]);
-  glClearColor(0,0,0,0);
-  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-  enablePass(mCurrentPass);
-  GL_TEST_ERR;
-  return true;
-}
-bool SplatRenderer::beginAttributePass()
-{
-  if (!isSupported())
-  {
-    std::cerr << "SplatRenderer error: not supported hardware\n";
-    return false;
-  }
-  if (mCurrentPass!=0)
-  {
-    std::cerr << "SplatRenderer error: programming error when calling beginAttributePass (must be called after the visiblity pass)\n";
-    return false;
-  }
-
-  mCurrentPass = 1;
-  mParams.loadTo(mShaders[mCurrentPass]);
-  enablePass(mCurrentPass);
-  GL_TEST_ERR;
-  return true;
-}
-bool SplatRenderer::finalize()
-{
-  if (!isSupported())
-  {
-    std::cerr << "SplatRenderer error: not supported hardware\n";
-    return false;
-  }
-
-  // this is the last pass: normalization by the sum of weights + deferred shading
-  mShaders[mCurrentPass].release();
-  mRenderBuffer->release();
-
-  if ( (mCurrentPass!=0) && (mCurrentPass!=1))
-  {
-    std::cerr << "SplatRenderer error: programming error when calling finalize (must be called after the visiblity or attribute pass)\n";
-    return false;
-  }
-
-  mCurrentPass = 2;
-
-  if (mFlags&DEFERRED_SHADING_BIT)
-    glDrawBuffer(GL_BACK);
-
-  enablePass(mCurrentPass);GL_TEST_ERR
-
-  // switch to normalized 2D rendering mode
-  glMatrixMode(GL_PROJECTION);
-  glPushMatrix();
-  glLoadIdentity();
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  glLoadIdentity();
-
-
-  GL_TEST_ERR
-  mShaders[2].setUniform("viewport",float(mCachedVP[0]),float(mCachedVP[1]),float(mCachedVP[2]),float(mCachedVP[3]));GL_TEST_ERR
-  mShaders[2].setUniform("ColorWeight",0); GL_TEST_ERR // this is a texture unit
-  glActiveTexture(GL_TEXTURE0);GL_TEST_ERR
-  glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mRenderBuffer->texture());GL_TEST_ERR
-
-  if (mFlags&DEFERRED_SHADING_BIT)
-  {
-    mShaders[2].setUniform("unproj", mCachedProj[10], mCachedProj[14]);GL_TEST_ERR
-    mShaders[2].setUniform("NormalWeight",1);GL_TEST_ERR // this is a texture unit
-    glActiveTexture(GL_TEXTURE1);GL_TEST_ERR
-    glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mNormalTextureID);GL_TEST_ERR
-    GL_TEST_ERR
-  }
-
-  if (mFlags&OUTPUT_DEPTH_BIT)
-  {
-    mShaders[2].setUniform("Depth",2);GL_TEST_ERR // this is a texture unit
-    glActiveTexture(GL_TEXTURE2);GL_TEST_ERR
-    glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mDepthTextureID);GL_TEST_ERR
-    GL_TEST_ERR
-  }
-  else
-  {
-    glDisable(GL_DEPTH_TEST);
-    glDepthMask(GL_FALSE);
-  }
-
-  // draw a quad covering the whole screen
-  float viewVec[] = {1.f/mCachedProj[0], 1.f/mCachedProj[5], -1};
-
-  glBegin(GL_QUADS);
-    glColor3f(1, 0, 0);
-    glTexCoord3f(viewVec[0],viewVec[1],viewVec[2]);
-    glMultiTexCoord2f(GL_TEXTURE1,1.,1.);
-    glVertex3f(1,1,0);
-
-    glColor3f(1, 1, 0);
-    glTexCoord3f(-viewVec[0],viewVec[1],viewVec[2]);
-    glMultiTexCoord2f(GL_TEXTURE1,0.,1.);
-    glVertex3f(-1,1,0);
-
-    glColor3f(0, 1, 1);
-    glTexCoord3f(-viewVec[0],-viewVec[1],viewVec[2]);
-    glMultiTexCoord2f(GL_TEXTURE1,0.,0.);
-    glVertex3f(-1,-1,0);
-
-    glColor3f(1, 0, 1);
-    glTexCoord3f(viewVec[0],-viewVec[1],viewVec[2]);
-    glMultiTexCoord2f(GL_TEXTURE1,1.,0.);
-    glVertex3f(1,-1,0);
-  glEnd();
-  if (!(mFlags&OUTPUT_DEPTH_BIT))
-  {
-      glEnable(GL_DEPTH_TEST);
-      glDepthMask(GL_TRUE);
-  }
-
-  mShaders[mCurrentPass].release();
-
-  // restore matrices
-  glMatrixMode(GL_PROJECTION);
-  glPopMatrix();
-  glMatrixMode(GL_MODELVIEW);
-  glPopMatrix();
-
-  glPopAttrib();
-  return true;
-}
-
-void SplatRenderer::enablePass(int n)
-{
-  if (!isSupported())
-  {
-    return;
-  }
-  if (mBindedPass!=n)
-  {
-    if (mBindedPass>=0)
-      mShaders[mBindedPass].release();
-    mShaders[n].activate();
-    mBindedPass = n;
-
-    // set GL states
-    if (n==0)
-    {
-      glDisable(GL_LIGHTING);
-// 			glDisable(GL_POINT_SMOOTH);
-      glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
-
-      glAlphaFunc(GL_LESS,1);
-      glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
-      glDepthMask(GL_TRUE);
-      glDisable(GL_BLEND);
-      glEnable(GL_ALPHA_TEST);
-      glEnable(GL_DEPTH_TEST);
-
-// 			glActiveTexture(GL_TEXTURE0);
-// 			glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
-// 			glEnable(GL_POINT_SPRITE_ARB);
-    }
-    if (n==1)
-    {
-      glDisable(GL_LIGHTING);
-      glEnable(GL_POINT_SMOOTH);
-      glActiveTexture(GL_TEXTURE0);
-      glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
-
-      glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
-      glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE,GL_ONE);
-// 			//glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE,GL_ZERO);
-// 			glBlendFunc(GL_ONE,GL_ZERO);
-      glDepthMask(GL_FALSE);
-      glEnable(GL_BLEND);
-      glEnable(GL_DEPTH_TEST);
-      glDisable(GL_ALPHA_TEST);
-
-// 			glActiveTexture(GL_TEXTURE0);
-
-    }
-    if ( (n==0) || (n==1) )
-    {
-      // enable point sprite rendering mode
-      glActiveTexture(GL_TEXTURE0);
-      if (mWorkaroundATI)
-      {
-        glBindTexture(GL_TEXTURE_2D, mDummyTexId);
-        glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 2, 2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0);
-        glPointParameterf(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
-        // hm... ^^^^
-      }
-      glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
-      glEnable(GL_POINT_SPRITE_ARB);
-    }
-    if (n==2)
-    {
-      glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
-      glDepthMask(GL_TRUE);
-      glDisable(GL_LIGHTING);
-      glDisable(GL_BLEND);
-    }
-  }
-}
-
-void SplatRenderer::UniformParameters::update(float* mv, float* proj, GLint* vp)
-{
-  // extract the uniform scale
-  float scale = sqrtf(mv[0]*mv[0]+mv[1]*mv[1]+mv[2]*mv[2]);
-
-  radiusScale = scale;
-  preComputeRadius = - (std::max)(proj[0]*vp[2], proj[5]*vp[3]);
-  depthOffset = 2.0;
-  oneOverEwaRadius = 0.70710678118654;
-  halfVp[0] = 0.5*vp[2];
-  halfVp[1] = 0.5*vp[3];
-  rayCastParameter1[0] = 2./(proj[0]*vp[2]);
-  rayCastParameter1[1] = 2./(proj[5]*vp[3]);
-  rayCastParameter1[2] = 0.0;
-  rayCastParameter2[0] = -1./proj[0];
-  rayCastParameter2[1] = -1./proj[5];
-  rayCastParameter2[2] = -1.0;
-  depthParameterCast[0] = 0.5*proj[14];
-  depthParameterCast[1] = 0.5-0.5*proj[10];
-}
-
-void SplatRenderer::UniformParameters::loadTo(Shader& prg)
-{
-  prg.activate();
-  prg.setUniform("expeRadiusScale",       radiusScale);
-  prg.setUniform("expePreComputeRadius",  preComputeRadius);
-  prg.setUniform("expeDepthOffset",       depthOffset);
-  prg.setUniform("oneOverEwaRadius",      oneOverEwaRadius);
-  prg.setUniform2("halfVp",               halfVp);
-  prg.setUniform3("rayCastParameter1",    rayCastParameter1);
-  prg.setUniform3("rayCastParameter2",    rayCastParameter2);
-  prg.setUniform2("depthParameterCast",   depthParameterCast);
-}
-
-void SplatRenderer::setRadiusScale(float v)
-{
-  mParams.radiusScale = v;
-}
-
-} // namepsace GlSplat
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.h b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.h
deleted file mode 100644
index 47c40eb..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// This file is part of GlSplat, a simple splatting C++ library
-//
-// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
-//
-// GlSplat is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef _GLSPLAT_SPLATRENDERER_H_
-#define _GLSPLAT_SPLATRENDERER_H_
-
-#include "GlSplat_config.h"
-#include "Shader.h"
-#include <QObject>
-#include <QAction>
-#include <QString>
-#include <map>
-
-class QGLFramebufferObject;
-class QGLWidget;
-
-namespace GlSplat {
-
-/** \class SplatRenderer
-  * \brief Helper class to render a set of points using a splatting alogirthm
-  *
-  * This class aims to render a set of oriented point with radius (called splats) using an
-  * OpenGL based splating algorithm. This class is only responsible for the managing of the
-  * OpenGL stats and shaders related to the splatting. The drawing of the geometry, i.e.,
-  * sending the point data to the GPU has to be done by the user.
-  *
-  * Here is an example:
-  * \code
-  *  SplatRenderer renderer;
-  *  renderer.init();
-  *
-  *  renderer.beginVisibilityPass();
-  *  drawpoints();
-  *  renderer.beginAttributePass();
-  *  drawpoints();
-  *  renderer.finalize();
-  * \endcode
-  *
-  * Have a look at the demo to see a complete example based on QGLviewer.
-  */
-class GLSPLAT_EXPORT SplatRenderer
-{
-  bool mIsSupported;
-  enum {
-    DEFERRED_SHADING_BIT	= 0x000001,
-    DEPTH_CORRECTION_BIT	= 0x000002,
-    OUTPUT_DEPTH_BIT			= 0x000004,
-    BACKFACE_SHADING_BIT	= 0x000008,
-    FLOAT_BUFFER_BIT			= 0x000010
-  };
-  int mFlags;
-  int mCachedFlags;
-  int mRenderBufferMask;
-  int mSupportedMask;
-
-  int mCurrentPass;
-  int mBindedPass;
-  GLuint mDummyTexId; // on ATI graphics card we need to bind a texture to get point sprite working !
-  bool mWorkaroundATI;
-  bool mBuggedAtiBlending;
-  bool mIsInitialized;
-  GLuint mNormalTextureID;
-  GLuint mDepthTextureID;
-  Shader mShaders[3];
-  QString mShaderSrcs[6];
-  QGLFramebufferObject* mRenderBuffer;
-  float mCachedMV[16];    // modelview matrix
-  float mCachedProj[16];  // projection matrix
-  GLint mCachedVP[4];     // viewport
-
-  struct UniformParameters
-  {
-    float radiusScale;
-    float preComputeRadius;
-    float depthOffset;
-    float oneOverEwaRadius;
-    float halfVp[2];
-    float rayCastParameter1[3];
-    float rayCastParameter2[3];
-    float depthParameterCast[2];
-
-    void loadTo(Shader& prg);
-    void update(float* mv, float* proj, GLint* vp);
-  };
-
-  UniformParameters mParams;
-
-  QString loadSource(const QString& func,const QString& file);
-  void configureShaders();
-  void updateRenderBuffer();
-  void enablePass(int n);
-
-public:
-
-  SplatRenderer();
-
-  /** Must be called once an OpenGL context has been activated.
-    * The main OpenGL context must be enabled, or, if you are using a QGLwiget,
-    * you can pass it to this function without caring about the OpenGL context.
-    */
-  void init(QGLWidget *qglw = 0);
-
-  /** \returns true is the hardware is supported
-    * Must be called after init.
-    */
-  bool isSupported() { return mIsSupported; }
-
-  /** Starts the first rendering pass
-    * \returns false if an error occured
-    */
-  bool beginVisibilityPass();
-  /** Starts the (optional) second rendering pass
-    * \returns false if an error occured
-    */
-  bool beginAttributePass();
-  /** Draw the rendered splats inside the main render target.
-    * \returns false if an error occured
-    */
-  bool finalize();
-
-  /** Sets a global scale factor for the splat radii
-    * Default value is 1
-    */
-  void setRadiusScale(float v);
-
-};
-
-} // namepsace GlSplat
-
-#endif // _GLSPLAT_SPLATRENDERER_H_
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.cpp
deleted file mode 100644
index c91f736..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// This file is part of GlSplat, a simple splatting C++ library
-//
-// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
-//
-// GlSplat is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
-
-#include "Shader.h"
-#include <iostream>
-
-#include <qfile.h>
-#include <qtextstream.h>
-#include <assert.h>
-
-namespace GlSplat {
-
-void Shader::define(const char* name, const char* value)
-{
-    mDefines[std::string(name)] = value;
-}
-//--------------------------------------------------------------------------------
-bool Shader::loadSources(const char* vsrc, const char* fsrc)
-{
-    bool allIsOk = true;
-
-    mProgramID = glCreateProgram();
-
-    std::string defineStr = "";
-    for(DefineMap::iterator it = mDefines.begin() ; it!=mDefines.end() ; ++it)
-    {
-      defineStr += "#define " + it->first + " " + it->second + "\n";
-    }
-
-    if(vsrc)
-    {
-        GLuint shaderID = glCreateShader(GL_VERTEX_SHADER);
-
-        std::string source = defineStr + std::string(vsrc);
-        const GLchar * arbSource = source.c_str();
-
-        glShaderSource(shaderID, 1, (const GLchar **)&arbSource, 0);
-        glCompileShader(shaderID);
-
-        int compiled;
-        glGetShaderiv(shaderID,GL_COMPILE_STATUS,&compiled);
-        allIsOk = allIsOk && compiled;
-        //printInfoLog(shaderID);
-
-        glAttachShader(mProgramID, shaderID);
-    }
-
-    if(fsrc)
-    {
-        GLuint shaderID = glCreateShader(GL_FRAGMENT_SHADER);
-
-        std::string source = defineStr + std::string(fsrc);
-        const GLchar * arbSource = source.c_str();
-
-        glShaderSource(shaderID, 1, (const GLchar **)&arbSource, 0);
-        glCompileShader(shaderID);
-
-        int compiled;
-        glGetShaderiv(shaderID,GL_COMPILE_STATUS,&compiled);
-        allIsOk = allIsOk && compiled;
-        //printInfoLog(shaderID);
-
-        glAttachShader(mProgramID, shaderID);
-    }
-
-    glLinkProgram(mProgramID);
-
-    int isLinked;
-    glGetProgramiv(mProgramID, GL_LINK_STATUS, &isLinked);
-    allIsOk = allIsOk && isLinked;
-    mIsValid = isLinked == GL_TRUE;
-    printInfoLog(mProgramID);
-
-    return allIsOk;
-}
-//--------------------------------------------------------------------------------
-void Shader::activate(void) const
-{
-    assert(mIsValid);
-    glUseProgram(mProgramID);
-}
-void Shader::release(void) const
-{
-    glUseProgram(0);
-}
-//--------------------------------------------------------------------------------
-int Shader::getUniformLocation(const char* name) const
-{
-    assert(mIsValid);
-    int loc = glGetUniformLocation(mProgramID, name);
-    return loc;
-}
-//--------------------------------------------------------------------------------
-void Shader::setSamplerUnit(const char* sampler, int unit) const
-{
-    activate();
-    glUniform1i(getUniformLocation(sampler), unit);
-    release();
-}
-//--------------------------------------------------------------------------------
-int Shader::getAttribLocation(const char* name) const
-{
-    assert(mIsValid);
-    int loc = glGetAttribLocation(mProgramID, name);
-    return loc;
-}
-//--------------------------------------------------------------------------------
-void Shader::printInfoLog(GLuint objectID)
-{
-    int infologLength, charsWritten;
-    GLchar *infoLog;
-    glGetProgramiv(objectID,GL_INFO_LOG_LENGTH, &infologLength);
-    if(infologLength > 0)
-    {
-        infoLog = new GLchar[infologLength];
-        glGetProgramInfoLog(objectID, infologLength, &charsWritten, infoLog);
-        if (charsWritten>0)
-          std::cerr << "Shader info : \n" << infoLog << std::endl;
-        delete[] infoLog;
-    }
-}
-
-} // namepsace GlSplat
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.h b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.h
deleted file mode 100644
index 669d237..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/Shader.h
+++ /dev/null
@@ -1,148 +0,0 @@
-// This file is part of GlSplat, a simple splatting C++ library
-//
-// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
-//
-// GlSplat is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef _GLSPLAT_Shader_h_
-#define _GLSPLAT_Shader_h_
-
-#include <GL/glew.h>
-#include <CGAL/glu.h>
-
-#ifndef NDEBUG
-    #define GL_TEST_ERR\
-        {\
-            GLenum eCode;\
-            if((eCode=glGetError())!=GL_NO_ERROR)\
-                std::cerr << "OpenGL error : " <<  gluErrorString(eCode) << " in " <<  __FILE__ << " : " << __LINE__ << std::endl;\
-        }
-#else
-    #define GL_TEST_ERR
-#endif
-
-#include <string>
-#include <map>
-
-namespace GlSplat {
-
-/** Permet de manipuler des shaders en GLSL (OpenGL2.0)
-    Exemple d'utilisation:
-    \code
-    // shader creation:
-    Shader* myShader = new Shader();
-    // loading from files (compilation + linking):
-    myShader->loadFromFiles("myShaderFile.vtx", "myShaderFile.frg");
-
-    // ...
-
-    // at rending time:
-    myShader->enable();
-    // draw objects
-    myShader->disable();
-    \endcode
-*/
-
-class Shader
-{
-public:
-    Shader(void)
-      : mIsValid(false)
-    { }
-
-    /** add a \#define
-    */
-    void define(const char* name, const char* value);
-
-    /** Compiles and links the shader from 2 source files
-        \param fileV vertex shader ("" if no vertex shader)
-        \param fileF fragment shader ("" if no fragment shader)
-        \return true if no error occurs
-    */
-//     bool loadFromFiles(const std::string& fileV, const std::string& fileF);
-
-    bool loadSources(const char* vsrc, const char* fsrc);
-
-    /** Enable the shader
-    */
-    void activate() const;
-
-    /** Releases the shader
-    */
-    void release() const;
-
-    /** \return the index of the uniform variable \a name
-    */
-    int getUniformLocation(const char* name) const;
-
-    /** Forces a sampler to a given unit
-        Example:
-        \code
-    glActiveTexture(GL_TEXTURE2);
-    glBindTexture(GL_TEXTURE2D, myTextureID);
-    myShader->setSamplerUnit("mySampler", 2);
-        \endcode
-    */
-    void setSamplerUnit(const char* samplerName, int textureUnit) const;
-
-    /** \returns the index of the generic attribute \a name
-        Tp be used with glVertexAttrib*(...) ou glVertexAttribPointer(...)
-        Example:
-        \code
-    int tangentAttribID = myShader->getAttribLocation("tangent");
-    Vector3 tangent(...);
-    glVertexAttrib3fv(tangentAttribID, tangent);
-    // ou
-    Vector3* tangents = new Vector3[...];
-    glVertexAttribPointer(tangentAttribID, 3, GL_FLOAT, GL_FALSE, 0, tangents);
-    glEnableVertexAttribArray(tangentAttribID);
-        \endcode
-    */
-    int getAttribLocation(const char* name) const;
-
-    inline void setUniform(const char* name, float a) const
-    { glUniform1f(glGetUniformLocation(mProgramID, name), a); }
-
-    inline void setUniform(const char* name, int a) const
-    { glUniform1i(glGetUniformLocation(mProgramID, name), a); }
-
-    inline void setUniform2(const char* name, float* a) const
-    { glUniform2fv(glGetUniformLocation(mProgramID, name), 1, a); }
-
-    inline void setUniform3(const char* name, float* a) const
-    { glUniform3fv(glGetUniformLocation(mProgramID, name), 1, a); }
-
-    inline void setUniform4(const char* name, float* a) const
-    { glUniform4fv(glGetUniformLocation(mProgramID, name), 1, a); }
-
-    inline void setUniform(const char* name, float a, float b) const
-    { glUniform2f(glGetUniformLocation(mProgramID, name), a, b); }
-
-    inline void setUniform(const char* name, float a, float b, float c) const
-    { glUniform3f(glGetUniformLocation(mProgramID, name), a, b, c); }
-
-    inline void setUniform(const char* name, float a, float b, float c, float d) const
-    { glUniform4f(glGetUniformLocation(mProgramID, name), a, b, c, d); }
-
-protected:
-
-    bool mIsValid;
-    typedef std::map<std::string,std::string> DefineMap;
-    DefineMap mDefines;
-    static void printInfoLog(GLuint objectID);
-    GLuint mProgramID;
-};
-
-} // namepsace GlSplat
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake
deleted file mode 100644
index 54da20f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright (c) 2009 Boudewijn Rempt <boud at valdyas.org>                                                                                          
-#                                                                                                                                                
-# Redistribution and use is allowed according to the terms of the BSD license.                                                                   
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. 
-# 
-# - try to find glew library and include files
-#  GLEW_INCLUDE_DIR, where to find GL/glew.h, etc.
-#  GLEW_LIBRARIES, the libraries to link against
-#  GLEW_FOUND, If false, do not try to use GLEW.
-# Also defined, but not for general use are:
-#  GLEW_GLEW_LIBRARY = the full path to the glew library.
-
-IF (WIN32)
-
-  IF(CYGWIN)
-
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h)
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY glew32
-      ${OPENGL_LIBRARY_DIR}
-      /usr/lib/w32api
-      /usr/X11R6/lib
-    )
-
-
-  ELSE(CYGWIN)
-  
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
-      $ENV{GLEW_ROOT_PATH}/include
-    )
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY
-      NAMES glew glew32
-      PATHS
-      $ENV{GLEW_ROOT_PATH}/lib
-      ${OPENGL_LIBRARY_DIR}
-    )
-
-  ENDIF(CYGWIN)
-
-ELSE (WIN32)
-
-  IF (APPLE)
-# These values for Apple could probably do with improvement.
-    FIND_PATH( GLEW_INCLUDE_DIR glew.h
-      /System/Library/Frameworks/GLEW.framework/Versions/A/Headers
-      ${OPENGL_LIBRARY_DIR}
-    )
-    SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
-    SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
-  ELSE (APPLE)
-
-    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
-      /usr/include/GL
-      /usr/openwin/share/include
-      /usr/openwin/include
-      /usr/X11R6/include
-      /usr/include/X11
-      /opt/graphics/OpenGL/include
-      /opt/graphics/OpenGL/contrib/libglew
-    )
-
-    FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
-      /usr/openwin/lib
-      /usr/X11R6/lib
-    )
-
-  ENDIF (APPLE)
-
-ENDIF (WIN32)
-
-SET( GLEW_FOUND "NO" )
-IF(GLEW_INCLUDE_DIR)
-  IF(GLEW_GLEW_LIBRARY)
-    # Is -lXi and -lXmu required on all platforms that have it?
-    # If not, we need some way to figure out what platform we are on.
-    SET( GLEW_LIBRARIES
-      ${GLEW_GLEW_LIBRARY}
-      ${GLEW_cocoa_LIBRARY}
-    )
-    SET( GLEW_FOUND "YES" )
-
-#The following deprecated settings are for backwards compatibility with CMake1.4
-    SET (GLEW_LIBRARY ${GLEW_LIBRARIES})
-    SET (GLEW_INCLUDE_PATH ${GLEW_INCLUDE_DIR})
-
-  ENDIF(GLEW_GLEW_LIBRARY)
-ENDIF(GLEW_INCLUDE_DIR)
-
-IF(GLEW_FOUND)
-  IF(NOT GLEW_FIND_QUIETLY)
-    MESSAGE(STATUS "Found Glew: ${GLEW_LIBRARIES}")
-  ENDIF(NOT GLEW_FIND_QUIETLY)
-ELSE(GLEW_FOUND)
-  IF(GLEW_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find Glew")
-  ENDIF(GLEW_FIND_REQUIRED)
-ENDIF(GLEW_FOUND)
-
-MARK_AS_ADVANCED(
-  GLEW_INCLUDE_DIR
-  GLEW_GLEW_LIBRARY
-  GLEW_Xmu_LIBRARY
-  GLEW_Xi_LIBRARY
-)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/shaders/Finalization.glsl b/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/shaders/Finalization.glsl
deleted file mode 100644
index d587a28..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/shaders/Finalization.glsl
+++ /dev/null
@@ -1,106 +0,0 @@
-// This file is part of GlSplat, a simple splatting C++ library
-//
-// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
-//
-// GlSplat is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifndef ES_DEPTH_INTERPOLATION
-  #define ES_DEPTH_INTERPOLATION 0
-#endif
-
-#ifndef ES_OUTPUT_DEPTH
-  #define ES_OUTPUT_DEPTH 0
-#endif
-
-// avoid an annoying bug with the nvidia driver 87XX serie.
-#define epsilon 0.000001
-
-uniform vec4 viewport;
-
-#ifndef ES_DEFERRED_SHADING
-
-uniform sampler2DRect ColorWeight;
-#if (ES_OUTPUT_DEPTH==1)
-uniform sampler2DRect Depth;
-#endif
-
-void Finalization(void)
-{
-  vec4 color = texture2DRect(ColorWeight, gl_FragCoord.st - viewport.xy + epsilon);
-  #if (ES_OUTPUT_DEPTH==1)
-  gl_FragDepth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
-  #endif
-  if (color.w<0.001)
-    discard;
-  gl_FragColor = color/color.w;
-  gl_FragColor.a = 1.;
-}
-
-#else
-
-uniform vec2 unproj;
-
-uniform sampler2DRect ColorWeight;
-uniform sampler2DRect NormalWeight;
-
-#if ( (ES_DEPTH_INTERPOLATION==0) || (ES_OUTPUT_DEPTH==1))
-uniform sampler2DRect Depth;
-#endif
-
-void Finalization(void)
-{
-  vec4 color = texture2DRect(ColorWeight, gl_FragCoord.st - viewport.xy + epsilon);
-
-  if (color.w<0.001)
-    discard;
-
-
-  if(color.w>0.001)
-    color.xyz /= color.w;
-
-  vec3 viewVec = normalize(gl_TexCoord[0].xyz);
-  vec4 normaldepth = texture2DRect(NormalWeight, gl_FragCoord.st + epsilon);
-
-  normaldepth.xyz = normaldepth.xyz/normaldepth.w;
-
-  #if (ES_OUTPUT_DEPTH==1)
-  gl_FragDepth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
-  #endif
-
-  #if ES_DEPTH_INTERPOLATION==2
-    float depth = -normaldepth.z;
-  #elif ES_DEPTH_INTERPOLATION==1
-    float depth = unproj.y/(2.0*normaldepth.z+unproj.x-1.0);
-  #else
-    float depth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
-    depth = unproj.y/(2.0*depth+unproj.x-1.0);
-  #endif
-
-  vec3 normal = normaldepth.xyz;
-  #if ES_DEPTH_INTERPOLATION!=0
-    normal.z = sqrt(1. - dot(vec3(normal.xy,0),vec3(normal.xy,0)));
-  #endif
-  normal = normalize(normal);
-  vec3 eyePos = gl_TexCoord[0].xyz * depth;
-
-  gl_FragColor = meshlabLighting(color, eyePos, normal);
-  gl_FragColor.a = 1.0;
-}
-
-#endif
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Io_implicit_function_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Io_implicit_function_plugin.cpp
deleted file mode 100644
index eed5113..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Io_implicit_function_plugin.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-//#include <CGAL_demo/Plugin_interface.h>
-//#include <CGAL_demo/Plugin_helper.h>
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-
-#include "implicit_functions/Implicit_function_interface.h"
-#include "Scene_implicit_function_item.h"
-#include "ui_Function_dialog.h"
-
-#include <iostream>
-
-#include <QAction>
-#include <QMainWindow>
-#include <QPluginLoader>
-#include <QDir>
-#include <QApplication>
-#include <QMenu>
-#include <QList>
-#include <QLibrary>
-
-class Io_implicit_function_plugin :
-  public QObject, 
-  // public Polyhedron_demo_plugin_interface,
-  protected Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  Io_implicit_function_plugin();
-  virtual ~Io_implicit_function_plugin() {}
-
-  bool applicable(QAction*) const { return true; }
-
-  QString name() const { return "implicit functions"; }
-  // QString nameFilters() const { return ""; }
-  // bool canLoad() const { return false; }
-  
-
-  typedef Polyhedron_demo_plugin_helper Plugin_helper;
-  
-  using Plugin_helper::init;
-  virtual void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  
-  QList<QAction*> actions() const
-  {
-    return QList<QAction*>();
-  }
-  
-public slots:
-  void load_function() const;
-  
-private:
-  void load_function_plugins();
-  
-private:
-  QList<Implicit_function_interface*> functions_;
-};
-
-
-
-Io_implicit_function_plugin::
-Io_implicit_function_plugin()
-{
-  load_function_plugins();
-}
-
-
-void
-Io_implicit_function_plugin::
-init(QMainWindow* mainWindow, Scene_interface* scene_interface)
-{
-  this->scene = scene_interface;
-  this->mw = mainWindow;
-  
-  QAction* actionLoadFunction = new QAction("Load &implicit function", mw);
-  if( NULL != actionLoadFunction )
-  {
-    connect(actionLoadFunction, SIGNAL(triggered()), this, SLOT(load_function()));
-  }
-  
-  QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
-  if ( NULL != menuFile )
-  {
-    QList<QAction*> menuFileActions = menuFile->actions();
-    
-    // Look for action just after "Load..." action
-    QAction* actionAfterLoad = NULL;
-    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(), 
-         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
-    {
-      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
-      {
-        ++it_action;
-        if ( it_action != end && NULL != *it_action )
-        {
-          actionAfterLoad = *it_action;
-        }
-      }
-    }
-    
-    // Insert "Load implicit function" action
-    if ( NULL != actionAfterLoad )
-    {
-      menuFile->insertAction(actionAfterLoad,actionLoadFunction);      
-    }
-    
-  }
-}
-
-
-void
-Io_implicit_function_plugin::
-load_function() const
-{
-  QDialog dialog(mw);
-  Ui::FunctionDialog ui;
-  ui.setupUi(&dialog);
-  
-  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
-  
-  // Add loaded functions to the dialog
-  int i=0;
-  Q_FOREACH( Implicit_function_interface* f, functions_ )
-  {
-    ui.functionList->insertItem(i++,f->name());
-  }
-
-  // Open window
-  int return_code = dialog.exec();
-  if(return_code == QDialog::Rejected) { return; }
-  
-  // Get selected function
-  i = ui.functionList->currentIndex();
-  Implicit_function_interface* function = functions_[i];
-  
-  // Create Scene_implicit_function object and add it to the framework
-  Scene_implicit_function_item* item =
-    new Scene_implicit_function_item(function);
-  
-  item->setName(tr("%1").arg(function->name()));
-  item->setRenderingMode(FlatPlusEdges);
-
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  scene->itemChanged(index);
-    
-  Scene_interface::Item_id new_item_id = scene->addItem(item);
-  scene->setSelectedItem(new_item_id);
-}
-
-void
-Io_implicit_function_plugin::
-load_function_plugins()
-{
-  QDir pluginsDir(qApp->applicationDirPath());
-  QString dirname = pluginsDir.dirName();
-  if ( !pluginsDir.cd("implicit_functions") ) { 
-    // In that case, dirname may be "Debug" or "Release" and one has to
-    // search in ../implicit_functions/Debug or
-    // ../implicit_functions/Release
-    QString newDir = QString("../implicit_functions/") + dirname;
-    if( !pluginsDir.cd(newDir) ) return; 
-  }
-  
-  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
-  {
-    if ( fileName.contains("plugin") && QLibrary::isLibrary(fileName) )
-    {
-      qDebug("    + Loading Function \"%s\"...", fileName.toUtf8().data());
-      QPluginLoader loader;
-      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
-      QObject *function_plugin = loader.instance();
-      if ( NULL != function_plugin )
-      {
-        Implicit_function_interface* function =
-          qobject_cast<Implicit_function_interface*>(function_plugin);
-        
-        if ( NULL != function )
-        {
-          functions_ << function;
-        }
-      }
-    }
-  }
-}
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Io_implicit_function_plugin, Io_implicit_function_plugin)
-#include "Io_implicit_function_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.cpp
deleted file mode 100644
index 9da72a7..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.cpp
+++ /dev/null
@@ -1,1433 +0,0 @@
-#include "config.h"
-#include "MainWindow.h"
-#include "Scene.h"
-#include "Scene_item.h"
-#include <CGAL/Qt/debug.h>
-
-#include <QtDebug>
-#include <QFileDialog>
-#include <QFileInfo>
-#include <QSettings>
-#include <QHeaderView>
-#include <QMenu>
-#include <QMenuBar>
-#include <QChar>
-#include <QAction>
-#include <QShortcut>
-#include <QKeySequence>
-#include <QLibrary>
-#include <QPluginLoader>
-#include <QMessageBox>
-#include <QScrollBar>
-#include <QColor>
-#include <QColorDialog>
-#include <QClipboard>
-#include <QCloseEvent>
-#include <QInputDialog>
-#include <QTreeView>
-#include <QSortFilterProxyModel>
-#include <QMap>
-#include <QStandardItemModel>
-#include <QStandardItem>
-
-#include <stdexcept>
-
-#ifdef QT_SCRIPT_LIB
-#  include <QScriptValue>
-#  ifdef QT_SCRIPTTOOLS_LIB
-#    include <QScriptEngineDebugger>
-#  endif
-#endif
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-
-#include "ui_MainWindow.h"
-#include "ui_Preferences.h"
-
-#include "Show_point_dialog.h"
-#include "File_loader_dialog.h"
-
-#include <QGLViewer/manipulatedCameraFrame.h>
-#include <QGLViewer/manipulatedFrame.h>
-
-#ifdef QT_SCRIPT_LIB
-#  include <QScriptEngine>
-#  include <QScriptValue>
-
-QScriptValue 
-myScene_itemToScriptValue(QScriptEngine *engine, 
-                          Scene_item* const &in)
-{ 
-  return engine->newQObject(in); 
-}
-
-void myScene_itemFromScriptValue(const QScriptValue &object, 
-                                 Scene_item* &out)
-{
-  out = qobject_cast<Scene_item*>(object.toQObject()); 
-}
-#endif // QT_SCRIPT_LIB
-
-#ifdef QT_SCRIPT_LIB
-#  ifdef QT_SCRIPTTOOLS_LIB
-
-const QScriptEngineDebugger::DebuggerWidget debug_widgets[9] = {
-  QScriptEngineDebugger::ConsoleWidget,
-  QScriptEngineDebugger::StackWidget,
-  QScriptEngineDebugger::ScriptsWidget,
-  QScriptEngineDebugger::LocalsWidget,
-  QScriptEngineDebugger::CodeWidget,
-  QScriptEngineDebugger::CodeFinderWidget,
-  QScriptEngineDebugger::BreakpointsWidget,
-  QScriptEngineDebugger::DebugOutputWidget,
-  QScriptEngineDebugger::ErrorLogWidget
-};
-const QString debug_widgets_names[9] = {
-  "Script console",
-  "Stack",
-  "Scripts",
-  "Locals",
-  "Code",
-  "CodeFinder",
-  "Breakpoints",
-  "DebugOutput",
-  "ErrorLog"
-};
-
-#  endif
-#endif
-
-QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
-{
-  MainWindow* mw = qobject_cast<MainWindow*>(engine->parent());
-  QString result;
-  for (int i = 0; i < context->argumentCount(); ++i) {
-    if (i > 0)
-      result.append(" ");
-    result.append(context->argument(i).toString());
-  }
-
-  if(mw) mw->message(QString("QtScript: ") + result, "");
-
-  return engine->undefinedValue();
-}
-
-MainWindow::~MainWindow()
-{
-  delete ui;
-}
-
-MainWindow::MainWindow(QWidget* parent)
-  : CGAL::Qt::DemosMainWindow(parent)
-{
-  ui = new Ui::MainWindow;
-  ui->setupUi(this);
-
-  // remove the Load Script menu entry, when the demo has not been compiled with QT_SCRIPT_LIB
-#if !defined(QT_SCRIPT_LIB)
-  ui->menuBar->removeAction(ui->actionLoad_Script);
-#endif
-  
-  // Save some pointers from ui, for latter use.
-  sceneView = ui->sceneView;
-  viewer = ui->viewer;
-
-  // do not save the state of the viewer (anoying)
-  viewer->setStateFileName(QString::null);
-
-  // setup scene
-  scene = new Scene(this);
-  viewer->setScene(scene);
-
-  {
-    QShortcut* shortcut = new QShortcut(QKeySequence(Qt::ALT+Qt::Key_Q), this);
-    connect(shortcut, SIGNAL(activated()),
-            this, SLOT(setFocusToQuickSearch()));
-  }
-
-  proxyModel = new QSortFilterProxyModel(this);
-  proxyModel->setSourceModel(scene);
-
-  connect(ui->searchEdit, SIGNAL(textChanged(QString)),
-          proxyModel, SLOT(setFilterFixedString(QString)));
-  sceneView->setModel(proxyModel);
-
-  // setup the sceneview: delegation and columns sizing...
-  sceneView->setItemDelegate(new SceneDelegate(this));
-
-  sceneView->header()->setStretchLastSection(false);
-  sceneView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
-  sceneView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
-  sceneView->header()->setResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
-  sceneView->header()->setResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
-  sceneView->header()->setResizeMode(Scene::ABColumn, QHeaderView::Fixed);
-  sceneView->header()->setResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
-
-  sceneView->resizeColumnToContents(Scene::ColorColumn);
-  sceneView->resizeColumnToContents(Scene::RenderingModeColumn);
-  sceneView->resizeColumnToContents(Scene::ABColumn);
-  sceneView->resizeColumnToContents(Scene::VisibleColumn);
-
-  // setup connections
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          this, SLOT(updateInfo()));
-  
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          this, SLOT(updateDisplayInfo()));
-
-  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
-          viewer, SLOT(updateGL()));
-
-  connect(scene, SIGNAL(updated()),
-          viewer, SLOT(update()));
-
-  connect(scene, SIGNAL(updated()),
-          this, SLOT(selectionChanged()));
-
-  connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)),
-          this, SLOT(removeManipulatedFrame(Scene_item*)));
-
-  connect(scene, SIGNAL(updated_bbox()),
-          this, SLOT(updateViewerBBox()));
-
-  connect(sceneView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(updateInfo()));
-
-  connect(sceneView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(updateDisplayInfo()));
-
-  connect(sceneView->selectionModel(), 
-          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
-          this, SLOT(selectionChanged()));
-
-  sceneView->setContextMenuPolicy(Qt::CustomContextMenu);
-  connect(sceneView, SIGNAL(customContextMenuRequested(const QPoint & )),
-          this, SLOT(showSceneContextMenu(const QPoint &)));
-
-  connect(viewer, SIGNAL(selected(int)),
-          this, SLOT(selectSceneItem(int)));
-  connect(viewer, SIGNAL(selectedPoint(double, double, double)),
-          this, SLOT(showSelectedPoint(double, double, double)));
-
-  connect(viewer, SIGNAL(selectionRay(double, double, double, 
-                                      double, double, double)),
-          scene, SIGNAL(selectionRay(double, double, double,
-                                     double, double, double)));
-
-  connect(viewer, SIGNAL(requestContextMenu(QPoint)),
-          this, SLOT(contextMenuRequested(QPoint)));
-
-  // The contextMenuPolicy of infoLabel is now the default one, so that one
-  // can easily copy-paste its text.
-  // connect(ui->infoLabel, SIGNAL(customContextMenuRequested(const QPoint & )),
-  //         this, SLOT(showSceneContextMenu(const QPoint &)));
-
-  connect(ui->actionRecenterScene, SIGNAL(triggered()),
-          viewer, SLOT(update()));
-
-  connect(ui->actionAntiAliasing, SIGNAL(toggled(bool)),
-          viewer, SLOT(setAntiAliasing(bool)));
-
-  connect(ui->actionDraw_two_sides, SIGNAL(toggled(bool)),
-          viewer, SLOT(setTwoSides(bool)));
-
-  // add the "About CGAL..." and "About demo..." entries
-  this->addAboutCGAL();
-  this->addAboutDemo(":/cgal/Polyhedron_3/about.html");
-
-  // Connect the button "addButton" with actionLoad
-  ui->addButton->setDefaultAction(ui->actionLoad);
-  // Same with "removeButton" and "duplicateButton"
-  ui->removeButton->setDefaultAction(ui->actionErase);
-  ui->duplicateButton->setDefaultAction(ui->actionDuplicate);
-
-  // Connect actionQuit (Ctrl+Q) and qApp->quit()
-  connect(ui->actionQuit, SIGNAL(triggered()),
-          this, SLOT(quit()));
-
-  // Connect "Select all items"
-  connect(ui->actionSelect_all_items, SIGNAL(triggered()),
-          this, SLOT(selectAll()));
-
-  // Recent files menu
-  this->addRecentFiles(ui->menuFile, ui->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-
-  // Reset the "Operation menu"
-  clearMenu(ui->menuOperations);
-
-#ifdef QT_SCRIPT_LIB
-  std::cerr << "Enable scripts.\n";
-  script_engine = new QScriptEngine(this);
-  qScriptRegisterMetaType<Scene_item*>(script_engine,
-                                       myScene_itemToScriptValue,
-                                       myScene_itemFromScriptValue);
-#  ifdef QT_SCRIPTTOOLS_LIB
-  QScriptEngineDebugger* debugger = new QScriptEngineDebugger(this);
-  debugger->setObjectName("qt script debugger");
-  QAction* debuggerMenuAction = 
-    menuBar()->addMenu(debugger->createStandardMenu());
-  debuggerMenuAction->setText(tr("Qt Script &debug"));
-  for(unsigned int i = 0; i < 9; ++i)
-  {
-    QDockWidget* dock = new QDockWidget(debug_widgets_names[i], this);
-    dock->setObjectName(debug_widgets_names[i]);
-    dock->setWidget(debugger->widget(debug_widgets[i]));
-    this->addDockWidget(Qt::BottomDockWidgetArea, dock);
-    dock->hide();
-  }
-  debugger->setAutoShowStandardWindow(false);
-  debugger->attachTo(script_engine);
-#  endif // QT_SCRIPTTOOLS_LIB
-  QScriptValue fun = script_engine->newFunction(myPrintFunction);
-  script_engine->globalObject().setProperty("print", fun);
-  
-  //  evaluate_script("print('hello', 'world', 'from QtScript!')");
-  QScriptValue mainWindowObjectValue = script_engine->newQObject(this);
-  script_engine->globalObject().setProperty("main_window", mainWindowObjectValue);
-
-  QScriptValue sceneObjectValue = script_engine->newQObject(scene);
-  mainWindowObjectValue.setProperty("scene", sceneObjectValue);
-  script_engine->globalObject().setProperty("scene", sceneObjectValue);
-
-  QScriptValue viewerObjectValue = script_engine->newQObject(viewer);
-  mainWindowObjectValue.setProperty("viewer", viewerObjectValue);
-  script_engine->globalObject().setProperty("viewer", viewerObjectValue);
-
-  QScriptValue cameraObjectValue = script_engine->newQObject(viewer->camera());
-  viewerObjectValue.setProperty("camera", cameraObjectValue);
-  script_engine->globalObject().setProperty("camera", cameraObjectValue);
-
-  evaluate_script("var plugins = new Array();");
-#  ifdef QT_SCRIPTTOOLS_LIB
-  QScriptValue debuggerObjectValue = script_engine->newQObject(debugger);
-  script_engine->globalObject().setProperty("debugger", debuggerObjectValue);
-#  endif
-#endif
-
-  readSettings(); // Among other things, the column widths are stored.
-
-  // Load plugins, and re-enable actions that need it.
-  loadPlugins();
-
-  // Setup the submenu of the View menu that can toggle the dockwidgets
-  Q_FOREACH(QDockWidget* widget, findChildren<QDockWidget*>()) {
-    ui->menuDockWindows->addAction(widget->toggleViewAction());
-  }
-  ui->menuDockWindows->removeAction(ui->dummyAction);
-
-
-#ifdef QT_SCRIPT_LIB
-  // evaluate_script("print(plugins);");
-  Q_FOREACH(QAction* action, findChildren<QAction*>()) {
-    if(action->objectName() != "") {
-      QScriptValue objectValue = script_engine->newQObject(action);
-      script_engine->globalObject().setProperty(action->objectName(),
-                                                objectValue);
-    }
-  }
-  // debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
-#endif
-
-  // setup menu filtering
-  connect(ui->menuOperations, SIGNAL(aboutToShow()), this, SLOT(filterOperations()));
-}
-
-void MainWindow::filterOperations()
-{
-  Q_FOREACH(const PluginNamePair& p, plugins) {
-    Q_FOREACH(QAction* action, p.first->actions()) {
-        action->setVisible( p.first->applicable(action) );
-    }
-  }
-
-  // do a pass over all menus in Operations and hide them when they are empty
-  Q_FOREACH(QAction* action, ui->menuOperations->actions()) {
-    if(QMenu* menu = action->menu()) {
-      action->setVisible(!(menu->isEmpty()));
-    }
-  }
-}
-
-
-#ifdef QT_SCRIPT_LIB
-void MainWindow::evaluate_script(QString script,
-                                 const QString& filename,
-                                 const bool quiet) {
-  QScriptValue value = script_engine->evaluate(script, filename);
-  if(script_engine->hasUncaughtException()) {
-    QTextStream err(stderr);
-    err << "Qt Script exception:\n"
-        << script_engine->uncaughtException().toString()
-        << "\nBacktrace:\n";
-    Q_FOREACH(QString line, script_engine->uncaughtExceptionBacktrace()) {
-      err << "  " << line << "\n";
-    }
-  }
-  else if(!quiet && !value.isNull() && !value.isUndefined()) {
-    QTextStream(stderr) << "Qt Script evaluated to \""
-                        << value.toString() << "\"\n";
-  }
-}
-
-void MainWindow::evaluate_script_quiet(QString script,
-                                       const QString& filename)
-{
-  evaluate_script(script, filename, true);
-}
-#endif
-
-void MainWindow::enableScriptDebugger(bool b /* = true */)
-{
-  Q_UNUSED(b);
-#ifdef QT_SCRIPT_LIB
-#  ifdef QT_SCRIPTTOOLS_LIB
-  QScriptEngineDebugger* debugger =
-    findChild<QScriptEngineDebugger*>("qt script debugger");
-  if(debugger) {
-    if(b) {
-      debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
-    }
-  }
-  return;
-#  endif
-#endif
-  // If we are here, then the debugger is not available
-  this->error(tr("Your version of Qt is too old, and for that reason "
-                 "the Qt Script Debugger is not available."));
-}
-
-namespace {
-bool actionsByName(QAction* x, QAction* y) {
-  return x->text() < y->text();
-}
-}
-
-void MainWindow::loadPlugins()
-{
-  Q_FOREACH(QObject *obj, QPluginLoader::staticInstances())
-  {
-    initPlugin(obj);
-    initIOPlugin(obj);
-  }
-
-  QList<QDir> plugins_directories;
-  plugins_directories << qApp->applicationDirPath();
-  QString env_path = qgetenv("POLYHEDRON_DEMO_PLUGINS_PATH");
-  if(!env_path.isEmpty()) {
-    Q_FOREACH (QString pluginsDir, 
-               env_path.split(":", QString::SkipEmptyParts)) {
-      QDir dir(pluginsDir);
-      if(dir.isReadable())
-        plugins_directories << dir;
-    }
-  }
-  Q_FOREACH (QDir pluginsDir, plugins_directories) {
-    qDebug("# Looking for plugins in directory \"%s\"...",
-           qPrintable(pluginsDir.absolutePath()));
-    Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files)) {
-      if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) {
-        //set plugin name
-        QString name = fileName;
-        name.remove(QRegExp("^lib"));
-        name.remove(QRegExp("\\..*"));
-        //do not load it if it is in the blacklist
-        if ( plugin_blacklist.contains(name) ){
-          qDebug("### Ignoring plugin \"%s\".", qPrintable(fileName));
-          continue;
-        }
-        QDebug qdebug = qDebug();
-        qdebug << "### Loading \"" << fileName.toUtf8().data() << "\"... ";
-        QPluginLoader loader;
-        loader.setFileName(pluginsDir.absoluteFilePath(fileName));
-        QObject *obj = loader.instance();
-        if(obj) {
-          obj->setObjectName(name);
-          bool init1 = initPlugin(obj);
-          bool init2 = initIOPlugin(obj);
-          if (!init1 && !init2)
-            qdebug << "not for this program";
-          else
-            qdebug << "success";
-        }
-        else {
-          qdebug << "error: " << qPrintable(loader.errorString());
-        }
-      }
-    }
-  }
-
-  // sort the operations menu by name
-  QList<QAction*> actions = ui->menuOperations->actions();
-  qSort(actions.begin(), actions.end(), actionsByName);
-  ui->menuOperations->clear();
-  ui->menuOperations->addActions(actions);
-}
-
-
-bool MainWindow::hasPlugin(const QString& pluginName) const
-{
-  Q_FOREACH(const PluginNamePair& p, plugins) {
-    if(p.second == pluginName) return true;
-  }
-  return false;
-}
-
-bool MainWindow::initPlugin(QObject* obj)
-{
-  QObjectList childs = this->children();
-  Polyhedron_demo_plugin_interface* plugin =
-    qobject_cast<Polyhedron_demo_plugin_interface*>(obj);
-  if(plugin) {
-    // Call plugin's init() method
-    obj->setParent(this);
-    plugin->init(this, this->scene, this);
-    plugins << qMakePair(plugin, obj->objectName());
-#ifdef QT_SCRIPT_LIB
-    QScriptValue objectValue = 
-      script_engine->newQObject(obj);
-    script_engine->globalObject().setProperty(obj->objectName(), objectValue);
-    evaluate_script_quiet(QString("plugins.push(%1);").arg(obj->objectName()));
-#endif
-
-    Q_FOREACH(QAction* action, plugin->actions()) {
-      // If action does not belong to the menus, add it to "Operations" menu
-      if(!childs.contains(action)) {
-        ui->menuOperations->addAction(action);
-      }
-      // Show and enable menu item
-      addAction(action);
-    }
-    return true;
-  }
-  else 
-    return false;
-}
-
-bool MainWindow::initIOPlugin(QObject* obj)
-{
-  Polyhedron_demo_io_plugin_interface* plugin =
-    qobject_cast<Polyhedron_demo_io_plugin_interface*>(obj);
-  if(plugin) {
-    io_plugins << plugin;
-    return true;
-  }
-  else 
-    return false;
-}
-
-void MainWindow::clearMenu(QMenu* menu)
-{
-  Q_FOREACH(QAction* action, menu->actions())
-  {
-    QMenu* menu = action->menu();
-    if(menu) {
-      clearMenu(menu);
-    }
-    action->setVisible(false);
-  }
-  menu->menuAction()->setEnabled(false);
-}
-
-void MainWindow::addAction(QAction* action)
-{
-  if(!action) return;
-
-  action->setVisible(true);
-  action->setEnabled(true);
-  Q_FOREACH(QWidget* widget, action->associatedWidgets())
-  {
-//     qDebug() << QString("%1 (%2)\n")
-//       .arg(widget->objectName())
-//       .arg(widget->metaObject()->className());
-    QMenu* menu = qobject_cast<QMenu*>(widget);
-    if(menu)
-    {
-      addAction(menu->menuAction());
-    }
-  }
-}
-
-void MainWindow::addAction(QString actionName,
-                           QString actionText,
-                           QString menuName) {
-  QMenu* menu = 0;
-  Q_FOREACH(QAction* action, findChildren<QAction*>()) {
-    if(!action->menu()) continue;
-    QString menuText = action->menu()->title();
-    if(menuText != menuName) continue;
-    menu = action->menu();
-  }
-  if(menu == 0) {
-    menu = new QMenu(menuName, this);
-    menuBar()->insertMenu(ui->menuView->menuAction(), menu);
-  }
-  QAction* action = new QAction(actionText, this);
-  action->setObjectName(actionName);
-  menu->addAction(action);
-#ifdef QT_SCRIPT_LIB
-  QScriptValue objectValue = script_engine->newQObject(action);
-  script_engine->globalObject().setProperty(action->objectName(),
-                                            objectValue);
-#endif
-}
-
-void MainWindow::viewerShow(float xmin,
-                            float ymin,
-                            float zmin,
-                            float xmax,
-                            float ymax,
-                            float zmax)
-{
-  qglviewer::Vec
-    min_(xmin, ymin, zmin),
-    max_(xmax, ymax, zmax);
-#if QGLVIEWER_VERSION >= 0x020502
-  viewer->camera()->setPivotPoint((min_+max_)*0.5);
-#else
-  viewer->camera()->setRevolveAroundPoint((min_+max_)*0.5);
-#endif
-
-  qglviewer::ManipulatedCameraFrame backup_frame(*viewer->camera()->frame());
-  viewer->camera()->fitBoundingBox(min_, max_);
-  qglviewer::ManipulatedCameraFrame new_frame(*viewer->camera()->frame());
-  *viewer->camera()->frame() = backup_frame;
-  viewer->camera()->interpolateTo(new_frame, 1.f);
-  viewer->setVisualHintsMask(1);
-}
-
-void MainWindow::viewerShow(float x, float y, float z) {
-#if QGLVIEWER_VERSION >= 0x020502
-  viewer->camera()->setPivotPoint(qglviewer::Vec(x, y, z));
-#else
-  viewer->camera()->setRevolveAroundPoint(qglviewer::Vec(x, y, z));
-#endif
-  // viewer->camera()->lookAt(qglviewer::Vec(x, y, z));
-
-  qglviewer::ManipulatedCameraFrame backup_frame(*viewer->camera()->frame());
-  viewer->camera()->fitSphere(qglviewer::Vec(x, y, z),
-                              viewer->camera()->sceneRadius()/100);
-  qglviewer::ManipulatedCameraFrame new_frame(*viewer->camera()->frame());
-  *viewer->camera()->frame() = backup_frame;
-  viewer->camera()->interpolateTo(new_frame, 1.f);
-  viewer->setVisualHintsMask(1);
-}
-
-void MainWindow::message(QString message, QString colorName, QString font) {
-  if (message.endsWith('\n')) {
-    message.remove(message.length()-1, 1);
-  }
-  std::cerr << qPrintable(message) << std::endl;
-  statusBar()->showMessage(message, 5000);
-  message = "<font color=\"" + colorName + "\" style=\"font-style: " + font + ";\" >" +
-    message + "</font><br>";
-  message = "[" + QTime::currentTime().toString() + "] " + message;
-  ui->consoleTextEdit->insertHtml(message);
-  ui->consoleTextEdit->verticalScrollBar()->setValue(ui->consoleTextEdit->verticalScrollBar()->maximum());
-}
-
-void MainWindow::information(QString text) {
-  this->message("INFO: " + text, "");
-}
-
-void MainWindow::warning(QString text) {
-  this->message("WARNING: " + text, "blue");
-}
-
-void MainWindow::error(QString text) {
-  this->message("ERROR: " + text, "red");
-}
-
-void MainWindow::updateViewerBBox()
-{
-  const Scene::Bbox bbox = scene->bbox();
-  const double xmin = bbox.xmin;
-  const double ymin = bbox.ymin;
-  const double zmin = bbox.zmin;
-  const double xmax = bbox.xmax;
-  const double ymax = bbox.ymax;
-  const double zmax = bbox.zmax;
-  // qDebug() << QString("Bounding box: (%1, %2, %3) - (%4, %5, %6)\n")
-  // .arg(xmin).arg(ymin).arg(zmin).arg(xmax).arg(ymax).arg(zmax);
-  qglviewer::Vec 
-    vec_min(xmin, ymin, zmin),
-    vec_max(xmax, ymax, zmax);
-  viewer->setSceneBoundingBox(vec_min,
-                              vec_max);
-  viewer->camera()->showEntireScene();
-}
-
-void MainWindow::reload_item() {
-  QAction* sender_action = qobject_cast<QAction*>(sender());
-  if(!sender_action) return;
-  
-  bool ok;
-  int item_index = sender_action->data().toInt(&ok);
-  QObject* item_object = scene->item(item_index);
-  if(!ok || !item_object || sender_action->data().type() != QVariant::Int) {
-    std::cerr << "Cannot reload item: "
-              << "the reload action has not item attached\n";
-    return;
-  }
-  Scene_item* item = qobject_cast<Scene_item*>(item_object);
-  if(!item) {
-    std::cerr << "Cannot reload item: "
-              << "the reload action has a QObject* pointer attached\n"
-              << "that is not a Scene_item*\n";
-    return;
-  }
-  QString filename = item->property("source filename").toString();
-  QString loader_name = item->property("loader_name").toString();
-  if(filename.isEmpty() || loader_name.isEmpty()) {
-    std::cerr << "Cannot reload item: "
-              << "the item has no \"source filename\" or no \"loader_name\" attached attached\n";
-    return;
-  }
-
-  Polyhedron_demo_io_plugin_interface* fileloader = find_loader(loader_name);
-  QFileInfo fileinfo(filename);
-
-  Scene_item* new_item = load_item(fileinfo, fileloader);
-
-  new_item->setName(item->name());
-  new_item->setColor(item->color());
-  new_item->setRenderingMode(item->renderingMode());
-  new_item->setVisible(item->visible());
-  new_item->changed();
-  scene->replaceItem(item_index, new_item, true);
-  item->deleteLater();
-}
-
-Polyhedron_demo_io_plugin_interface* MainWindow::find_loader(const QString& loader_name) const {
-  Q_FOREACH(Polyhedron_demo_io_plugin_interface* io_plugin, 
-            io_plugins) {
-    if(io_plugin->name() == loader_name) {
-      return io_plugin;
-    }
-  }
-  throw std::invalid_argument(QString("No loader found with the name %1 available")
-                              .arg(loader_name).toStdString()) ;
-}
-
-bool MainWindow::file_matches_filter(const QString& filters,
-                                     const QString& filename )
-{
-  QFileInfo fileinfo(filename);
-  QString filename_striped=fileinfo.fileName();
-
-  //match all filters between ()
-  QRegExp all_filters_rx("\\((.*)\\)");
-
-  QStringList split_filters = filters.split(";;");
-  Q_FOREACH(const QString& filter, split_filters) {
-    //extract filters
-    if ( all_filters_rx.indexIn(filter)!=-1 ){
-      Q_FOREACH(const QString& pattern,all_filters_rx.cap(1).split(' ')){
-        QRegExp rx(pattern);
-        rx.setPatternSyntax(QRegExp::Wildcard);
-        if ( rx.exactMatch(filename_striped) ){
-          return true;
-        }
-      }
-    }
-  }
-  return false;
-}
-
-void MainWindow::open(QString filename)
-{
-  QFileInfo fileinfo(filename);
-
-#ifdef QT_SCRIPT_LIB
-  // Handles the loading of script file from the command line arguments,
-  // and the special command line arguments that start with "javascript:"
-  // or "qtscript:"
-  QString program;
-  if(filename.startsWith("javascript:")) {
-    program=filename.right(filename.size() - 11);
-  }
-  if(filename.startsWith("qtscript:")) {
-    program=filename.right(filename.size() - 9);
-  }
-  if(filename.endsWith(".js")) {
-    load_script(fileinfo);
-    return;
-  }
-  if(!program.isEmpty())
-  {
-    {
-      QTextStream(stderr) << "Execution of script \"" 
-                          << filename << "\"\n";
-                          // << filename << "\", with following content:\n"
-                          // << program;
-    }
-    evaluate_script(program, filename);
-    return;
-  }
-#endif
-
-  if ( !fileinfo.exists() ){
-    QMessageBox::warning(this,
-                         tr("Cannot open file"),
-                         tr("File %1 does not exist.")
-                         .arg(filename));
-    return;
-  }
-
-
-  QStringList selected_items;
-  QStringList all_items;
-
-  QMap<QString,QString>::iterator dfs_it = 
-    default_plugin_selection.find( fileinfo.completeSuffix() );
-  
-  if ( dfs_it==default_plugin_selection.end() )
-  {
-    // collect all io_plugins and offer them to load if the file extension match one name filter
-    // also collect all available plugin in case of a no extension match
-    Q_FOREACH(Polyhedron_demo_io_plugin_interface* io_plugin, io_plugins) {
-      if ( !io_plugin->canLoad() ) continue;
-      all_items << io_plugin->name();
-      if ( file_matches_filter(io_plugin->nameFilters(), filename) )
-        selected_items << io_plugin->name();
-    }
-  }
-  else
-    selected_items << *dfs_it;
-  
-  bool ok;
-  std::pair<QString, bool> load_pair;
-  
-  switch( selected_items.size() )
-  {
-    case 1:
-      load_pair = std::make_pair(selected_items.first(), false);
-      ok=true;
-      break;
-    case 0:
-      load_pair = File_loader_dialog::getItem(fileinfo.fileName(), all_items, &ok);
-      break;
-    default:
-      load_pair = File_loader_dialog::getItem(fileinfo.fileName(), selected_items, &ok);
-  }
-  
-  if(!ok || load_pair.first.isEmpty()) { return; }
-  
-  if (load_pair.second)
-     default_plugin_selection[fileinfo.completeSuffix()]=load_pair.first;
-  
-  
-  QSettings settings;
-  settings.setValue("OFF open directory",
-                    fileinfo.absoluteDir().absolutePath());
-
-  Scene_item* scene_item = load_item(fileinfo, find_loader(load_pair.first));
-  if(scene_item != 0) {
-    this->addToRecentFiles(fileinfo.absoluteFilePath());
-  }
-  selectSceneItem(scene->addItem(scene_item));
-}
-
-bool MainWindow::open(QString filename, QString loader_name) {
-  QFileInfo fileinfo(filename); 
-  Scene_item* item;
-  try {
-    item = load_item(fileinfo, find_loader(loader_name));
-  }
-  catch(std::logic_error e) {
-    std::cerr << e.what() << std::endl;
-    return false;
-  }
-  selectSceneItem(scene->addItem(item));
-  return true;
-}
-
-
-Scene_item* MainWindow::load_item(QFileInfo fileinfo, Polyhedron_demo_io_plugin_interface* loader) {
-  Scene_item* item = NULL;
-  if(!fileinfo.isFile() || !fileinfo.isReadable()) {
-    throw std::invalid_argument(QString("File %1 is not a readable file.")
-                                .arg(fileinfo.absoluteFilePath()).toStdString());
-  }
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  item = loader->load(fileinfo);
-  QApplication::restoreOverrideCursor();
-  if(!item) {
-    throw std::logic_error(QString("Could not load item from file %1 using plugin %2")
-                           .arg(fileinfo.absoluteFilePath()).arg(loader->name()).toStdString());
-  }
-
-  item->setProperty("source filename", fileinfo.absoluteFilePath());
-  item->setProperty("loader_name", loader->name());
-  return item;
-}
-
-void MainWindow::setFocusToQuickSearch()
-{
-  ui->searchEdit->setFocus(Qt::ShortcutFocusReason);
-}
-
-void MainWindow::selectSceneItem(int i)
-{
-  if(i < 0 || i >= scene->numberOfEntries()) {
-    sceneView->selectionModel()->clearSelection();
-    updateInfo();
-    updateDisplayInfo();
-  }
-  else {
-    QItemSelection s =
-      proxyModel->mapSelectionFromSource(scene->createSelection(i));
-    sceneView->selectionModel()->select(s,
-                                        QItemSelectionModel::ClearAndSelect);
-  }
-}
-
-
-void MainWindow::showSelectedPoint(double x, double y, double z)
-{
-  static double x_prev = 0;
-  static double y_prev = 0;
-  static double z_prev = 0;
-  double dist = std::sqrt((x-x_prev)*(x-x_prev) + (y-y_prev)*(y-y_prev) + (z-z_prev)*(z-z_prev)); 
-  information(QString("Selected point: (%1, %2, %3) distance to previous: %4").
-              arg(x, 0, 'g', 10).
-              arg(y, 0, 'g', 10).
-              arg(z, 0, 'g', 10).
-              arg(dist,0,'g',10));
-  x_prev = x;
-  y_prev = y;
-  z_prev = z;
-}
-
-void MainWindow::unSelectSceneItem(int i)
-{
-  removeSceneItemFromSelection(i);
-}
-
-void MainWindow::addSceneItemInSelection(int i)
-{
-  QItemSelection s =
-    proxyModel->mapSelectionFromSource(scene->createSelection(i));
-  sceneView->selectionModel()->select(s, QItemSelectionModel::Select);
-  scene->itemChanged(i);
-}
-
-void MainWindow::removeSceneItemFromSelection(int i)
-{
-  QItemSelection s =
-    proxyModel->mapSelectionFromSource(scene->createSelection(i));
-  sceneView->selectionModel()->select(s,
-                                      QItemSelectionModel::Deselect);
-  scene->itemChanged(i);
-}
-
-void MainWindow::selectAll()
-{
-  QItemSelection s =
-    proxyModel->mapSelectionFromSource(scene->createSelectionAll());
-  sceneView->selectionModel()->select(s, 
-                                      QItemSelectionModel::ClearAndSelect);
-}
-
-int MainWindow::getSelectedSceneItemIndex() const
-{
-  QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows();
-  if(selectedRows.size() != 1)
-    return -1;
-  else {
-    QModelIndex i = proxyModel->mapToSource(selectedRows.first());
-    return i.row();
-  }
-}
-
-QList<int> MainWindow::getSelectedSceneItemIndices() const
-{
-  QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows();
-  QList<int> result;
-  Q_FOREACH(QModelIndex index, selectedRows) {
-    result << proxyModel->mapToSource(index).row();
-  }
-  return result;
-}
-
-void MainWindow::selectionChanged()
-{
-  scene->setSelectedItem(getSelectedSceneItemIndex());
-  scene->setSelectedItemsList(getSelectedSceneItemIndices());
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item != NULL && item->manipulatable()) {
-    viewer->setManipulatedFrame(item->manipulatedFrame());
-  } else {
-    viewer->setManipulatedFrame(0);
-  }
-  if(viewer->manipulatedFrame() == 0) {
-    Q_FOREACH(Scene_item* item, scene->entries()) {
-      if(item->manipulatable() && item->manipulatedFrame() != 0) {
-        if(viewer->manipulatedFrame() != 0) {
-          // there are at least two possible frames
-          viewer->setManipulatedFrame(0);
-          break;
-        } else {
-          viewer->setManipulatedFrame(item->manipulatedFrame());
-        }
-      }
-    }
-  }
-  if(viewer->manipulatedFrame() != 0) {
-    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
-            this, SLOT(updateInfo()));
-  }
-  viewer->updateGL();
-}
-
-void MainWindow::contextMenuRequested(const QPoint& global_pos) {
-  int index = scene->mainSelectionIndex();
-  showSceneContextMenu(index, global_pos);
-}
-
-void MainWindow::showSceneContextMenu(int selectedItemIndex,
-                                      const QPoint& global_pos)
-{
-  Scene_item* item = scene->item(selectedItemIndex);
-  if(!item) return;
-
-  const char* prop_name = "Menu modified by MainWindow.";
-
-  QMenu* menu = item->contextMenu();
-  if(menu) {
-    bool menuChanged = menu->property(prop_name).toBool();
-    if(!menuChanged) {
-      menu->addSeparator();
-      if(!item->property("source filename").toString().isEmpty()) {
-        QAction* reload = menu->addAction(tr("&Reload item from file"));
-        reload->setData(qVariantFromValue(selectedItemIndex));
-        connect(reload, SIGNAL(triggered()),
-                this, SLOT(reload_item()));
-      }
-      QAction* saveas = menu->addAction(tr("&Save as..."));
-      saveas->setData(qVariantFromValue(selectedItemIndex));
-      connect(saveas,  SIGNAL(triggered()),
-              this, SLOT(on_actionSaveAs_triggered()));
-      QAction* showobject = menu->addAction(tr("&Zoom to this object"));
-      showobject->setData(qVariantFromValue(selectedItemIndex));
-      connect(showobject, SIGNAL(triggered()),
-              this, SLOT(viewerShowObject()));
-
-      menu->setProperty(prop_name, true);
-    }
-  }
-  if(menu)
-    menu->exec(global_pos);
-}
-
-void MainWindow::showSceneContextMenu(const QPoint& p) {
-  QWidget* sender = qobject_cast<QWidget*>(this->sender());
-  if(!sender) return;
-
-  int index = -1;
-  if(sender == sceneView) {
-    QModelIndex modelIndex = sceneView->indexAt(p);
-    if(!modelIndex.isValid()) return;
-
-    index = proxyModel->mapToSource(modelIndex).row();
-  }
-  else {
-    index = scene->mainSelectionIndex();
-  }
-
-  showSceneContextMenu(index, sender->mapToGlobal(p));
-}
-
-void MainWindow::removeManipulatedFrame(Scene_item* item)
-{
-  if(item->manipulatable() &&
-     item->manipulatedFrame() == viewer->manipulatedFrame()) {
-    viewer->setManipulatedFrame(0);
-  }
-}
-
-void MainWindow::updateInfo() {
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item) {
-    QString item_text = item->toolTip();
-    QString item_filename = item->property("source filename").toString();
-    if(!item_filename.isEmpty()) {
-      item_text += QString("<br /><i>File: %1").arg(item_filename);
-    }
-    ui->infoLabel->setText(item_text);
-  }
-  else 
-    ui->infoLabel->clear();
-}
-
-void MainWindow::updateDisplayInfo() {
-  Scene_item* item = scene->item(getSelectedSceneItemIndex());
-  if(item)
-    ui->displayLabel->setPixmap(item->graphicalToolTip());
-  else 
-    ui->displayLabel->clear();
-}
-
-void MainWindow::readSettings()
-{
-  {
-    QSettings settings;
-    // enable anti-aliasing 
-    ui->actionAntiAliasing->setChecked(settings.value("antialiasing", false).toBool());
-    // read plugin blacklist
-    QStringList blacklist=settings.value("plugin_blacklist",QStringList()).toStringList();
-    Q_FOREACH(QString name,blacklist){ plugin_blacklist.insert(name); }
-  }
-  this->readState("MainWindow", Size|State);
-}
-
-void MainWindow::writeSettings()
-{
-  this->writeState("MainWindow");
-  {
-    QSettings settings;
-    settings.setValue("antialiasing", 
-                      ui->actionAntiAliasing->isChecked());
-    //setting plugin blacklist
-    QStringList blacklist;
-    Q_FOREACH(QString name,plugin_blacklist){ blacklist << name; }
-    if ( !blacklist.isEmpty() ) settings.setValue("plugin_blacklist",blacklist);
-    else settings.remove("plugin_blacklist");
-  }
-  std::cerr << "Write setting... done.\n";
-}
-
-void MainWindow::quit()
-{
-  close();
-}
-
-void MainWindow::closeEvent(QCloseEvent *event)
-{
-  writeSettings();
-  event->accept();
-}
-
-bool MainWindow::load_script(QString filename)
-{
-  QFileInfo fileinfo(filename);
-  return load_script(fileinfo);
-}
-
-bool MainWindow::load_script(QFileInfo info)
-{
-#if defined(QT_SCRIPT_LIB)
-  QString program;
-  QString filename = info.absoluteFilePath();
-  QFile script_file(filename);
-  script_file.open(QIODevice::ReadOnly);
-  program = script_file.readAll();
-  if(!program.isEmpty())
-  {
-    QTextStream(stderr) 
-      << "Execution of script \"" 
-      << filename << "\"\n";
-    evaluate_script(program, filename);
-    return true;
-  }
-#endif
-  return false;
-}
-
-void MainWindow::on_actionLoad_Script_triggered() 
-{
-#if defined(QT_SCRIPT_LIB)
-  QString filename = QFileDialog::getOpenFileName(
-    this,
-    tr("Select a script to run..."),
-    ".",
-    "QTScripts (*.js);;All Files (*)");
-
-  load_script(QFileInfo(filename));
-#endif
-}
-
-void MainWindow::on_actionLoad_triggered()
-{
-  QStringList filters;
-  // we need to special case our way out of this
-  filters << "All Files (*)";
-
-  QStringList extensions;
-
-  typedef QMap<QString, Polyhedron_demo_io_plugin_interface*> FilterPluginMap;
-  FilterPluginMap filterPluginMap;
-  
-  Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
-    QStringList split_filters = plugin->nameFilters().split(";;");
-    Q_FOREACH(const QString& filter, split_filters) {
-      FilterPluginMap::iterator it = filterPluginMap.find(filter);
-      if(it != filterPluginMap.end()) {
-        qDebug() << "Duplicate Filter: " << it.value();
-        qDebug() << "This filter will not be available.";
-      } else {
-        filterPluginMap[filter] = plugin;
-      }
-      filters << filter;
-    }
-  }
-
-  QSettings settings;
-  QString directory = settings.value("OFF open directory",
-                                     QDir::current().dirName()).toString();
-
-  QFileDialog dialog(this);
-  dialog.setDirectory(directory);
-  dialog.setNameFilters(filters);
-  dialog.setFileMode(QFileDialog::ExistingFiles);
-
-  if(dialog.exec() != QDialog::Accepted) { return; }
-  
-  FilterPluginMap::iterator it = 
-    filterPluginMap.find(dialog.selectedNameFilter());
-  
-  Polyhedron_demo_io_plugin_interface* selectedPlugin = NULL;
-
-  if(it != filterPluginMap.end()) {
-    selectedPlugin = it.value();
-  }
-
-  Q_FOREACH(const QString& filename, dialog.selectedFiles()) {
-    Scene_item* item = NULL;
-    if(selectedPlugin) {
-      QFileInfo info(filename);
-      item = load_item(info, selectedPlugin);
-      Scene::Item_id index = scene->addItem(item);
-      selectSceneItem(index);
-      this->addToRecentFiles(filename);
-    } else {
-      open(filename);
-    }
-  }
-}
-
-void MainWindow::on_actionSaveAs_triggered()
-{
-  int index = -1;
-  QAction* sender_action = qobject_cast<QAction*>(sender());
-  if(sender_action && !sender_action->data().isNull()) {
-    index = sender_action->data().toInt();
-  }
-
-  if(index < 0) {
-    QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows();
-    if(selectedRows.size() != 1)
-      return;
-    index = getSelectedSceneItemIndex();
-  }
-  Scene_item* item = scene->item(index);
-
-  if(!item)
-    return;
-
-  QVector<Polyhedron_demo_io_plugin_interface*> canSavePlugins;
-  QStringList filters;
-  Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
-    if(plugin->canSave(item)) {
-      canSavePlugins << plugin;
-      filters += plugin->nameFilters();
-    }
-  }
-  filters << tr("All files (*)");
-
-  if(canSavePlugins.isEmpty()) {
-    QMessageBox::warning(this,
-                         tr("Cannot save"),
-                         tr("The selected object %1 cannot be saved.")
-                         .arg(item->name()));
-    return;
-  }
-
-  QString caption = tr("Save %1 to File...").arg(item->name());
-  QString filename = 
-    QFileDialog::getSaveFileName(this,
-                                 caption,
-                                 QString(),
-                                 filters.join(";;"));
-  save(filename, item);
-}
-
-void MainWindow::save(QString filename, Scene_item* item) {
-  QFileInfo fileinfo(filename);
-
-  Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
-    if(  plugin->canSave(item) &&
-        file_matches_filter(plugin->nameFilters(),filename) )
-    {
-      if(plugin->save(item, fileinfo))
-        break;
-    }
-  }
-}
-
-bool MainWindow::on_actionErase_triggered()
-{
-  int next_index = scene->erase(scene->selectionIndices());
-  selectSceneItem(next_index);
-  return next_index >= 0;
-}
-
-void MainWindow::on_actionEraseAll_triggered()
-{
-  while(on_actionErase_triggered()) {
-  }
-}
-
-void MainWindow::on_actionDuplicate_triggered()
-{
-  int index = scene->duplicate(getSelectedSceneItemIndex());
-  selectSceneItem(index);
-}
-
-void MainWindow::on_actionShowHide_triggered()
-{
-  Q_FOREACH(QModelIndex index, sceneView->selectionModel()->selectedRows())
-  {
-    int i = proxyModel->mapToSource(index).row();
-    Scene_item* item = scene->item(i);
-    item->setVisible(!item->visible());
-    scene->itemChanged(i);
-  }
-}
-
-void MainWindow::on_actionSetPolyhedronA_triggered()
-{
-  int i = getSelectedSceneItemIndex();
-  scene->setItemA(i);
-}
-
-void MainWindow::on_actionSetPolyhedronB_triggered()
-{
-  int i = getSelectedSceneItemIndex();
-  scene->setItemB(i);
-}
-void MainWindow::on_actionPreferences_triggered()
-{
-  QDialog dialog(this);
-  Ui::PreferencesDialog prefdiag;
-  prefdiag.setupUi(&dialog);
-  
-  
-  QStandardItemModel* iStandardModel = new QStandardItemModel(this);
-  //add blacklisted plugins
-  Q_FOREACH(QString name, plugin_blacklist)
-  {
-    QStandardItem* item =  new QStandardItem(name);
-    item->setCheckable(true);
-    item->setCheckState(Qt::Checked);
-    iStandardModel->appendRow(item);
-  }
-  
-  //add operations plugins
-  Q_FOREACH(PluginNamePair pair,plugins){
-    QStandardItem* item =  new QStandardItem(pair.second);
-    item->setCheckable(true);
-    iStandardModel->appendRow(item);
-  }
-  
-  //add io-plugins
-  Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins)
-  {
-    QStandardItem* item =  new QStandardItem(plugin->name());
-    item->setCheckable(true);
-    if ( plugin_blacklist.contains(plugin->name()) ) item->setCheckState(Qt::Checked);
-    iStandardModel->appendRow(item);
-  }
-
-  //Setting the model
-  prefdiag.listView->setModel(iStandardModel);
-  
-  dialog.exec();  
-  
-  if ( dialog.result() )
-  {
-    plugin_blacklist.clear();
-    for (int k=0,k_end=iStandardModel->rowCount();k<k_end;++k)
-    {
-      QStandardItem* item=iStandardModel->item(k);
-      if (item->checkState()==Qt::Checked)
-        plugin_blacklist.insert(item->text());
-    }
-  }
-  
-  for (int k=0,k_end=iStandardModel->rowCount();k<k_end;++k) delete iStandardModel->item(k);
-  delete iStandardModel;
-}
-
-void MainWindow::on_actionSetBackgroundColor_triggered()
-{
-  QColor c =  QColorDialog::getColor();
-  if(c.isValid()) {
-    viewer->setBackgroundColor(c);
-  }
-}
-
-void MainWindow::on_action_Look_at_triggered()
-{
-  Show_point_dialog dialog(this);
-  int i = dialog.exec();
-  if( i == QDialog::Accepted &&
-      dialog.has_correct_coordinates() )
-  {
-    viewerShow((float)dialog.get_x(),
-               (float)dialog.get_y(),
-               (float)dialog.get_z());
-  }
-}
-
-void MainWindow::viewerShowObject()
-{
-  int index = -1;
-  QAction* sender_action = qobject_cast<QAction*>(sender());
-  if(sender_action && !sender_action->data().isNull()) {
-    index = sender_action->data().toInt();
-  }
-  if(index >= 0) {
-    const Scene::Bbox bbox = scene->item(index)->bbox();
-    viewerShow((float)bbox.xmin, (float)bbox.ymin, (float)bbox.zmin,
-               (float)bbox.xmax, (float)bbox.ymax, (float)bbox.zmax);
-  }
-}
-
-QString MainWindow::camera_string() const
-{
-  return viewer->dumpCameraCoordinates();
-}
-
-void MainWindow::on_actionDumpCamera_triggered()
-{
-  information(QString("Camera: %1")
-              .arg(camera_string()));
-}
-
-void MainWindow::on_action_Copy_camera_triggered()
-{
-  qApp->clipboard()->setText(this->camera_string());
-}
-
-void MainWindow::on_action_Paste_camera_triggered()
-{
-  QString s = qApp->clipboard()->text();
-  viewer->moveCameraToCoordinates(s, 0.5f);
-}
-
-void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
-{
-  viewer->setAddKeyFrameKeyboardModifiers(m);
-}
-
-void MainWindow::on_actionRecenterScene_triggered()
-{
-  updateViewerBBox();
-  viewer->camera()->interpolateToFitScene();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.h b/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.h
deleted file mode 100644
index 75661ad..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.h
+++ /dev/null
@@ -1,190 +0,0 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-#include "config.h"
-
-#include <QtOpenGL/qgl.h>
-#include <CGAL/Qt/DemosMainWindow.h>
-#ifdef QT_SCRIPT_LIB
-#  include  <QScriptEngine>
-#endif
-
-#include <QVector>
-#include <QList>
-#include <QFileInfo>
-#include <QStringList>
-#include <QSet>
-
-class Scene;
-class Viewer;
-class QTreeView;
-class QMenu;
-class Polyhedron_demo_io_plugin_interface;
-class Polyhedron_demo_plugin_interface;
-class Scene_item;
-class QSortFilterProxyModel;
-
-namespace Ui {
-  class MainWindow;
-}
-
-#include "Polyhedron_type_fwd.h"
-
-#include "Messages_interface.h"
-
-class MainWindow : 
-  public CGAL::Qt::DemosMainWindow,
-  public Messages_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Messages_interface)
-public:
-  MainWindow(QWidget* parent = 0);
-  ~MainWindow();
-
-  /// Find an IO plugin.
-  /// @throws `std::invalid_argument` if no loader with that argument can be found
-  /// @returns the IO plugin associated with `loader_name`
-  Polyhedron_demo_io_plugin_interface* find_loader(const QString& loader_name) const;
-  
-  /// Load an item with a given loader.
-  ///
-  /// @throws `std::logic_error` if loading does not succeed or
-  /// `std::invalid_argument` if `fileinfo` specifies an invalid file
-  Scene_item* load_item(QFileInfo fileinfo, Polyhedron_demo_io_plugin_interface*);
-
-public slots:
-  void updateViewerBBox();
-  void open(QString);
-
-  /// given a file extension file, returns true if `filename` matches the filter
-  bool file_matches_filter(const QString& filters, const QString& filename);
-
-  /// Open a file with a given loader, and return true iff it was successful.
-  ///
-  /// This slot is for use by scripts.
-  bool open(QString filename, QString loader_name);
-
-  /// Reloads an item. Expects to be called by a QAction with the
-  /// index of the item to be reloaded as data attached to the action.
-  /// The index must identify a valid `Scene_item`.
-  void reload_item();
-  
-  bool load_script(QString filename);
-  bool load_script(QFileInfo);
-
-  void setFocusToQuickSearch();
-
-  void selectSceneItem(int i);
-  void showSelectedPoint(double, double, double);
-  void unSelectSceneItem(int i);
-  void selectAll();
-  void addSceneItemInSelection(int i);
-  void removeSceneItemFromSelection(int i); // same as unSelectSceneItem
-
-  void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
-
-  void clearMenu(QMenu*);
-  void addAction(QAction*);
-  void addAction(QString actionName,
-                 QString actionText,
-                 QString menuName);
-  void viewerShow(float, float, float);
-  void viewerShow(float, float, float, float, float, float);
-  void viewerShowObject();
-
-  void information(QString);
-  void warning(QString);
-  void error(QString);
-  void message(QString, QString, QString = QString("normal"));
-
-  bool hasPlugin(const QString&) const;
-  void enableScriptDebugger(bool = true);
-
-protected slots:
-  void selectionChanged();
-
-  void contextMenuRequested(const QPoint& global_pos);
-  void showSceneContextMenu(int selectedItemIndex,
-                            const QPoint& global_pos);
-  void showSceneContextMenu(const QPoint& local_pos_of_treeview);
-
-  void updateInfo();
-  void updateDisplayInfo();
-  void removeManipulatedFrame(Scene_item*);
-
-  // settings
-  void quit();
-  void readSettings();
-  void writeSettings();
-
-  // load, erase, duplicate
-  void on_actionEraseAll_triggered();
-  void on_actionLoad_triggered();
-  bool on_actionErase_triggered();
-  void on_actionDuplicate_triggered();
-  void on_actionLoad_Script_triggered();
-
-  // Show/Hide
-  void on_actionShowHide_triggered();
-
-  // Select A/B
-  void on_actionSetPolyhedronA_triggered();
-  void on_actionSetPolyhedronB_triggered();
-
-  //Preferences edition
-  void on_actionPreferences_triggered();
-  // save as...
-  void on_actionSaveAs_triggered(); 
-  void save(QString filename, Scene_item* item);
-
-  void on_actionSetBackgroundColor_triggered();
-
-  void on_action_Look_at_triggered();
-
-  QString camera_string() const;
-  void on_actionDumpCamera_triggered();
-  void on_action_Copy_camera_triggered();
-  void on_action_Paste_camera_triggered();
-
-  void filterOperations();
-
-  void on_actionRecenterScene_triggered();
-protected:
-  void loadPlugins();
-  bool initPlugin(QObject*);
-  bool initIOPlugin(QObject*);
-
-  void closeEvent(QCloseEvent *event);
-
-  bool onePolygonIsSelected() const;
-  int getSelectedSceneItemIndex() const;
-  QList<int> getSelectedSceneItemIndices() const;
-
-private:
-  QString strippedName(const QString &fullFileName);
-
-  /// plugin black-list
-  QSet<QString> plugin_blacklist;
-
-  Scene* scene;
-  Viewer* viewer;
-  QSortFilterProxyModel* proxyModel;
-  QTreeView* sceneView;
-  Ui::MainWindow* ui;
-  QVector<Polyhedron_demo_io_plugin_interface*> io_plugins;
-  QMap<QString,QString> default_plugin_selection;
-  // typedef to make Q_FOREACH work
-  typedef QPair<Polyhedron_demo_plugin_interface*, QString> PluginNamePair;
-  QVector<PluginNamePair > plugins;
-#ifdef QT_SCRIPT_LIB
-  QScriptEngine* script_engine;
-public:
-  void evaluate_script(QString script, 
-                       const QString & fileName = QString(),
-                       const bool quiet = false);
-  void evaluate_script_quiet(QString script, 
-                             const QString & fileName = QString());
-#endif
-};
-
-#endif // ifndef MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.ui
deleted file mode 100644
index 1e183f3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/MainWindow.ui
+++ /dev/null
@@ -1,661 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>978</width>
-    <height>594</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>CGAL Polyhedron demo</string>
-  </property>
-  <property name="windowIcon">
-   <iconset resource="Polyhedron_3.qrc">
-    <normaloff>:/cgal/icons/resources/cgal_logo.xpm</normaloff>:/cgal/icons/resources/cgal_logo.xpm</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout_2">
-    <item>
-     <widget class="Viewer" name="viewer" native="true">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-        <horstretch>0</horstretch>
-        <verstretch>1</verstretch>
-       </sizepolicy>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>978</width>
-     <height>21</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuFile">
-    <property name="title">
-     <string>&File</string>
-    </property>
-    <addaction name="actionLoad"/>
-    <addaction name="actionErase"/>
-    <addaction name="actionEraseAll"/>
-    <addaction name="actionDuplicate"/>
-    <addaction name="actionSaveAs"/>
-    <addaction name="separator"/>
-    <addaction name="actionLoad_Script"/>
-    <addaction name="separator"/>
-    <addaction name="actionQuit"/>
-   </widget>
-   <widget class="QMenu" name="menuEdit">
-    <property name="title">
-     <string>&Edit</string>
-    </property>
-    <addaction name="actionShowHide"/>
-    <addaction name="actionSetPolyhedronA"/>
-    <addaction name="actionSetPolyhedronB"/>
-    <addaction name="actionSelect_all_items"/>
-    <addaction name="actionPreferences"/>
-   </widget>
-   <widget class="QMenu" name="menuOperations">
-    <property name="title">
-     <string>&Operations</string>
-    </property>
-    <widget class="QMenu" name="menuSubdivision">
-     <property name="title">
-      <string>&Subdivision</string>
-     </property>
-     <addaction name="actionLoop"/>
-     <addaction name="actionCatmullClark"/>
-     <addaction name="actionSqrt3"/>
-    </widget>
-    <widget class="QMenu" name="menu_Boolean_operations">
-     <property name="title">
-      <string>&Boolean operations</string>
-     </property>
-     <addaction name="actionToNef"/>
-     <addaction name="actionToPoly"/>
-     <addaction name="actionUnion"/>
-     <addaction name="actionIntersection"/>
-     <addaction name="actionDifference"/>
-     <addaction name="separator"/>
-     <addaction name="actionMinkowskiSum"/>
-    </widget>
-    <widget class="QMenu" name="menuParameterization">
-     <property name="title">
-      <string>Parameterization</string>
-     </property>
-     <addaction name="actionMVC"/>
-     <addaction name="actionDCP"/>
-    </widget>
-    <widget class="QMenu" name="menuPCA">
-     <property name="title">
-      <string>PCA</string>
-     </property>
-     <addaction name="actionFitLine"/>
-     <addaction name="actionFitPlane"/>
-    </widget>
-    <addaction name="menuPCA"/>
-    <addaction name="actionEstimateCurvature"/>
-    <addaction name="actionSelfIntersection"/>
-    <addaction name="actionConvexHull"/>
-    <addaction name="actionKernel"/>
-    <addaction name="menuSubdivision"/>
-    <addaction name="actionSimplify"/>
-    <addaction name="actionRemeshing"/>
-    <addaction name="actionConvexDecomposition"/>
-    <addaction name="menu_Boolean_operations"/>
-    <addaction name="menuParameterization"/>
-    <addaction name="actionInsideOut"/>
-   </widget>
-   <widget class="QMenu" name="menuView">
-    <property name="title">
-     <string>&View</string>
-    </property>
-    <widget class="QMenu" name="menuDockWindows">
-     <property name="title">
-      <string>&Dock windows</string>
-     </property>
-     <addaction name="dummyAction"/>
-    </widget>
-    <widget class="QMenu" name="menuCamera">
-     <property name="title">
-      <string>Ca&mera</string>
-     </property>
-     <addaction name="actionDumpCamera"/>
-     <addaction name="action_Copy_camera"/>
-     <addaction name="action_Paste_camera"/>
-    </widget>
-    <addaction name="actionRecenterScene"/>
-    <addaction name="action_Look_at"/>
-    <addaction name="actionAntiAliasing"/>
-    <addaction name="actionDraw_two_sides"/>
-    <addaction name="actionSetBackgroundColor"/>
-    <addaction name="menuDockWindows"/>
-    <addaction name="menuCamera"/>
-   </widget>
-   <addaction name="menuFile"/>
-   <addaction name="menuEdit"/>
-   <addaction name="menuOperations"/>
-   <addaction name="menuView"/>
-  </widget>
-  <widget class="QStatusBar" name="statusbar"/>
-  <widget class="QDockWidget" name="sceneDockWidget">
-   <property name="locale">
-    <locale language="English" country="UnitedStates"/>
-   </property>
-   <property name="windowTitle">
-    <string>Geometric Objects</string>
-   </property>
-   <attribute name="dockWidgetArea">
-    <number>1</number>
-   </attribute>
-   <widget class="QWidget" name="dockWidgetContent">
-    <layout class="QGridLayout" name="gridLayout_2">
-     <item row="0" column="0">
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout">
-         <item>
-          <widget class="QToolButton" name="addButton">
-           <property name="text">
-            <string>+</string>
-           </property>
-           <property name="icon">
-            <iconset resource="Polyhedron_3.qrc">
-             <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="removeButton">
-           <property name="text">
-            <string>-</string>
-           </property>
-           <property name="icon">
-            <iconset resource="Polyhedron_3.qrc">
-             <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="duplicateButton">
-           <property name="text">
-            <string>...</string>
-           </property>
-           <property name="icon">
-            <iconset resource="Polyhedron_3.qrc">
-             <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QLineEdit" name="searchEdit">
-           <property name="placeholderText">
-            <string>Quick filter... <Alt+Q></string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QTreeView" name="sceneView">
-         <property name="editTriggers">
-          <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
-         </property>
-         <property name="alternatingRowColors">
-          <bool>true</bool>
-         </property>
-         <property name="selectionMode">
-          <enum>QAbstractItemView::ExtendedSelection</enum>
-         </property>
-         <property name="indentation">
-          <number>0</number>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <widget class="QDockWidget" name="consoleDockWidget">
-   <property name="allowedAreas">
-    <set>Qt::BottomDockWidgetArea|Qt::LeftDockWidgetArea|Qt::TopDockWidgetArea</set>
-   </property>
-   <property name="windowTitle">
-    <string>Console</string>
-   </property>
-   <attribute name="dockWidgetArea">
-    <number>8</number>
-   </attribute>
-   <widget class="QWidget" name="dockWidgetContents">
-    <layout class="QVBoxLayout" name="verticalLayout_3">
-     <item>
-      <widget class="QTextEdit" name="consoleTextEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <widget class="QDockWidget" name="infoDockWidget">
-   <property name="windowTitle">
-    <string>Infos</string>
-   </property>
-   <attribute name="dockWidgetArea">
-    <number>8</number>
-   </attribute>
-   <widget class="QWidget" name="dockWidgetContents_2">
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0">
-       <property name="spacing">
-        <number>0</number>
-       </property>
-       <item>
-        <widget class="QScrollArea" name="scrollArea">
-         <property name="minimumSize">
-          <size>
-           <width>350</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="frameShape">
-          <enum>QFrame::NoFrame</enum>
-         </property>
-         <property name="widgetResizable">
-          <bool>true</bool>
-         </property>
-         <widget class="QWidget" name="scrollAreaWidgetContents">
-          <property name="geometry">
-           <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>545</width>
-            <height>178</height>
-           </rect>
-          </property>
-          <layout class="QGridLayout" name="gridLayout">
-           <item row="0" column="0">
-            <widget class="QLabel" name="infoLabel">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>1</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="contextMenuPolicy">
-              <enum>Qt::DefaultContextMenu</enum>
-             </property>
-             <property name="lineWidth">
-              <number>0</number>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-             </property>
-             <property name="textInteractionFlags">
-              <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </widget>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="displayLabel">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <action name="actionQuit">
-   <property name="text">
-    <string>&Quit</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+Q</string>
-   </property>
-  </action>
-  <action name="actionSimplify">
-   <property name="text">
-    <string>&Simplification</string>
-   </property>
-  </action>
-  <action name="actionCatmullClark">
-   <property name="text">
-    <string>&Catmull-Clark</string>
-   </property>
-  </action>
-  <action name="actionKernel">
-   <property name="text">
-    <string>&Kernel</string>
-   </property>
-  </action>
-  <action name="actionUnion">
-   <property name="text">
-    <string>&Union</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+O, U</string>
-   </property>
-  </action>
-  <action name="actionIntersection">
-   <property name="text">
-    <string>&Intersection</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+O, I</string>
-   </property>
-  </action>
-  <action name="actionDifference">
-   <property name="text">
-    <string>&Difference</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+O, D</string>
-   </property>
-  </action>
-  <action name="actionFitPlane">
-   <property name="text">
-    <string>Fit &plane</string>
-   </property>
-  </action>
-  <action name="actionFitLine">
-   <property name="text">
-    <string>Fit &line</string>
-   </property>
-  </action>
-  <action name="actionEstimateCurvature">
-   <property name="text">
-    <string>&Curvature estimation</string>
-   </property>
-  </action>
-  <action name="actionLoad">
-   <property name="icon">
-    <iconset resource="Polyhedron_3.qrc">
-     <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
-   </property>
-   <property name="text">
-    <string>&Load...</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+L</string>
-   </property>
-  </action>
-  <action name="actionErase">
-   <property name="icon">
-    <iconset resource="Polyhedron_3.qrc">
-     <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
-   </property>
-   <property name="text">
-    <string>&Erase</string>
-   </property>
-   <property name="shortcut">
-    <string>Del</string>
-   </property>
-  </action>
-  <action name="actionDuplicate">
-   <property name="icon">
-    <iconset resource="Polyhedron_3.qrc">
-     <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
-   </property>
-   <property name="text">
-    <string>&Duplicate</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+D</string>
-   </property>
-  </action>
-  <action name="actionSqrt3">
-   <property name="text">
-    <string>&Sqrt3</string>
-   </property>
-  </action>
-  <action name="actionAntiAliasing">
-   <property name="checkable">
-    <bool>true</bool>
-   </property>
-   <property name="text">
-    <string>&Antialiasing</string>
-   </property>
-  </action>
-  <action name="dummyAction">
-   <property name="text">
-    <string>n/a</string>
-   </property>
-  </action>
-  <action name="actionConvexHull">
-   <property name="text">
-    <string>&Convex hull</string>
-   </property>
-  </action>
-  <action name="actionEraseAll">
-   <property name="text">
-    <string>&Erase all</string>
-   </property>
-  </action>
-  <action name="actionOptions">
-   <property name="text">
-    <string>&Options...</string>
-   </property>
-  </action>
-  <action name="actionLoop">
-   <property name="text">
-    <string>&Loop</string>
-   </property>
-  </action>
-  <action name="actionSaveAs">
-   <property name="text">
-    <string>Save &as...</string>
-   </property>
-  </action>
-  <action name="actionSave">
-   <property name="text">
-    <string>&Save</string>
-   </property>
-  </action>
-  <action name="actionSaveAll">
-   <property name="text">
-    <string>Save a&ll</string>
-   </property>
-  </action>
-  <action name="actionMergeAll">
-   <property name="text">
-    <string>Mer&ge all</string>
-   </property>
-  </action>
-  <action name="actionMerge">
-   <property name="text">
-    <string>&Merge</string>
-   </property>
-  </action>
-  <action name="actionSelfIntersection">
-   <property name="text">
-    <string>Self-&intersection</string>
-   </property>
-  </action>
-  <action name="actionSelectAll">
-   <property name="text">
-    <string>Select &all</string>
-   </property>
-  </action>
-  <action name="actionSelectNone">
-   <property name="text">
-    <string>Select &none</string>
-   </property>
-  </action>
-  <action name="actionSelectInvert">
-   <property name="text">
-    <string>&Invert selection</string>
-   </property>
-  </action>
-  <action name="actionShowHide">
-   <property name="text">
-    <string>Show/Hide</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+Space</string>
-   </property>
-  </action>
-  <action name="actionSetPolyhedronA">
-   <property name="text">
-    <string>Set polyhedron A</string>
-   </property>
-  </action>
-  <action name="actionSetPolyhedronB">
-   <property name="text">
-    <string>Set polyhedron B</string>
-   </property>
-  </action>
-  <action name="actionInsideOut">
-   <property name="text">
-    <string>&Inside-out</string>
-   </property>
-  </action>
-  <action name="actionRemeshing">
-   <property name="text">
-    <string>&Remeshing</string>
-   </property>
-  </action>
-  <action name="actionConvexDecomposition">
-   <property name="text">
-    <string>Convex Decomposition</string>
-   </property>
-  </action>
-  <action name="actionMVC">
-   <property name="text">
-    <string>Mean &value coordinates</string>
-   </property>
-  </action>
-  <action name="actionDCP">
-   <property name="text">
-    <string>Discrete &conformal maps</string>
-   </property>
-  </action>
-  <action name="actionExplode">
-   <property name="text">
-    <string>Explode</string>
-   </property>
-  </action>
-  <action name="actionToNef">
-   <property name="text">
-    <string>Convert to nef polyhedron</string>
-   </property>
-  </action>
-  <action name="actionToPoly">
-   <property name="text">
-    <string>Convert to normal polyhedron</string>
-   </property>
-  </action>
-  <action name="actionDraw_two_sides">
-   <property name="checkable">
-    <bool>true</bool>
-   </property>
-   <property name="text">
-    <string>Draw &two sides</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+T</string>
-   </property>
-  </action>
-  <action name="actionRecenterScene">
-   <property name="text">
-    <string>Re&center scene</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+C</string>
-   </property>
-  </action>
-  <action name="actionSetBackgroundColor">
-   <property name="text">
-    <string>Change &background color...</string>
-   </property>
-  </action>
-  <action name="actionMinkowskiSum">
-   <property name="text">
-    <string>&Minkowski sum</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+O, M</string>
-   </property>
-  </action>
-  <action name="action_Look_at">
-   <property name="text">
-    <string>&Look at...</string>
-   </property>
-  </action>
-  <action name="actionDumpCamera">
-   <property name="text">
-    <string>&Dump camera coordinates</string>
-   </property>
-  </action>
-  <action name="action_Copy_camera">
-   <property name="text">
-    <string>&Copy camera</string>
-   </property>
-  </action>
-  <action name="action_Paste_camera">
-   <property name="text">
-    <string>&Paste camera</string>
-   </property>
-  </action>
-  <action name="actionSelect_all_items">
-   <property name="text">
-    <string>Select all items</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+A</string>
-   </property>
-  </action>
-  <action name="actionLoad_Script">
-   <property name="text">
-    <string>Load &script</string>
-   </property>
-  </action>
-  <action name="actionPreferences">
-   <property name="text">
-    <string>&Preferences</string>
-   </property>
-  </action>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>Viewer</class>
-   <extends>QWidget</extends>
-   <header>Viewer.h</header>
-  </customwidget>
- </customwidgets>
- <resources>
-  <include location="Polyhedron_3.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.cpp
deleted file mode 100644
index 55355c8..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "Mesher_base.h"
-
-#include "Mesher_base.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.h
deleted file mode 100644
index 7912f59..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Mesher_base.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _MESHER_BASE_H
-#define _MESHER_BASE_H
-
-#include <QObject>
-#include <iostream>
-
-// A base non-templated class, to allow 
-class Mesher_base : public QObject {
-  Q_OBJECT
-protected:
-  bool is_stopped;
-public:
-  Mesher_base(QObject* parent) : QObject(parent) {
-    is_stopped = true;
-  };
-  virtual ~Mesher_base() {}
-public slots:
-  virtual void mesh() = 0;
-  virtual void one_step() = 0;
-
-  void stop() {
-    std::cerr << "STOP!\n";
-    is_stopped = true;
-  }
-};
-
-#endif // _MESHER_BASE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Meshing_dialog.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Meshing_dialog.ui
deleted file mode 100644
index fbcff9e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Meshing_dialog.ui
+++ /dev/null
@@ -1,362 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Meshing_dialog</class>
- <widget class="QDialog" name="Meshing_dialog">
-  <property name="enabled">
-   <bool>true</bool>
-  </property>
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>414</width>
-    <height>355</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Meshing criteria</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="objectName">
-     <property name="font">
-      <font>
-       <pointsize>15</pointsize>
-       <weight>75</weight>
-       <bold>true</bold>
-      </font>
-     </property>
-     <property name="text">
-      <string>NO OBJECT</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QLabel" name="objectNameSize">
-     <property name="text">
-      <string>No size</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="sharpFeaturesGroup">
-     <property name="layoutDirection">
-      <enum>Qt::RightToLeft</enum>
-     </property>
-     <property name="title">
-      <string>Sharp features</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout" columnstretch="2,0">
-      <item row="0" column="0">
-       <widget class="QCheckBox" name="protect">
-        <property name="text">
-         <string>&Protect sharp edges</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::MinimumExpanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>0</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>Surface</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0" columnstretch="2,1,0">
-      <item row="0" column="0">
-       <widget class="QLabel" name="approxLabel">
-        <property name="text">
-         <string>Approximation &error</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>approx</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QDoubleSpinBox" name="approx">
-        <property name="minimumSize">
-         <size>
-          <width>110</width>
-          <height>0</height>
-         </size>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="2">
-       <widget class="QCheckBox" name="noApprox">
-        <property name="toolTip">
-         <string>Enable/Disable parameter</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="sizingLabel">
-        <property name="text">
-         <string>&Facet max. size</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>facetSizing</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QDoubleSpinBox" name="facetSizing">
-        <property name="minimumSize">
-         <size>
-          <width>110</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="decimals">
-         <number>4</number>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QCheckBox" name="noFacetSizing">
-        <property name="toolTip">
-         <string>Enable/Disable parameter</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="angleLabel">
-        <property name="text">
-         <string>Facet min. &angle (deg)</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>facetAngle</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1">
-       <widget class="QDoubleSpinBox" name="facetAngle">
-        <property name="minimumSize">
-         <size>
-          <width>110</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="minimum">
-         <double>1.000000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>30.000000000000000</double>
-        </property>
-        <property name="value">
-         <double>25.000000000000000</double>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="2">
-       <widget class="QCheckBox" name="noAngle">
-        <property name="toolTip">
-         <string>Enable/Disable parameter</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="groupBox_2">
-     <property name="title">
-      <string>Volume</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_3" columnstretch="2,1,0">
-      <item row="0" column="0">
-       <widget class="QLabel" name="label">
-        <property name="text">
-         <string>&Tetrahedron max. size</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>tetSizing</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QDoubleSpinBox" name="tetSizing">
-        <property name="minimumSize">
-         <size>
-          <width>110</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="decimals">
-         <number>4</number>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="label_2">
-        <property name="text">
-         <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande';">Tetrahedron &amp;shape</span><span style=" font-family:'Lucida Grande'; font-size:13pt;"> </span><span style=" font-family:'Lucida Grande'; font-style:italic;">(radius-edge ratio)</span></p></body></html></string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>tetShape</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QDoubleSpinBox" name="tetShape">
-        <property name="minimumSize">
-         <size>
-          <width>110</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="minimum">
-         <double>1.000000000000000</double>
-        </property>
-        <property name="value">
-         <double>3.000000000000000</double>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QCheckBox" name="noTetShape">
-        <property name="toolTip">
-         <string>Enable/Disable parameter</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="2">
-       <widget class="QCheckBox" name="noTetSizing">
-        <property name="toolTip">
-         <string>Enable/Disable parameter</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <tabstops>
-  <tabstop>approx</tabstop>
-  <tabstop>noApprox</tabstop>
-  <tabstop>facetSizing</tabstop>
-  <tabstop>noFacetSizing</tabstop>
-  <tabstop>facetAngle</tabstop>
-  <tabstop>noAngle</tabstop>
-  <tabstop>tetSizing</tabstop>
-  <tabstop>noTetSizing</tabstop>
-  <tabstop>tetShape</tabstop>
-  <tabstop>noTetShape</tabstop>
-  <tabstop>buttonBox</tabstop>
- </tabstops>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>Meshing_dialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>388</x>
-     <y>288</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>195</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>Meshing_dialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>388</x>
-     <y>288</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>195</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Point_inside_polyhedron_widget.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Point_inside_polyhedron_widget.ui
deleted file mode 100644
index 4290ac8..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Point_inside_polyhedron_widget.ui
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Point_inside_polyhedron</class>
- <widget class="QDockWidget" name="Point_inside_polyhedron">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>317</width>
-    <height>194</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Point Inside Polyhedron</string>
-  </property>
-  <widget class="QWidget" name="dockWidgetContents">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QGroupBox" name="groupBox">
-      <property name="title">
-       <string>Point Location Parameters</string>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QCheckBox" name="Inside_check_box">
-         <property name="text">
-          <string>Inside</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="On_boundary_check_box">
-         <property name="text">
-          <string>On Boundary</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="Outside_check_box">
-         <property name="text">
-          <string>Outside</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Sample_random_points_from_bbox">
-      <property name="text">
-       <string>Sample Random Points from Bbox</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Select_button">
-      <property name="text">
-       <string>Select</string>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.cpp
deleted file mode 100644
index b1a835e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "MainWindow.h"
-#include <QApplication>
-#include <QMessageBox>
-#include <CGAL/Qt/resources.h>
-#include <stdexcept>
-
-class Polyhedron_demo : public QApplication
-{
-public:
-  Polyhedron_demo(int& argc, char **argv) : QApplication(argc, argv) {}
-
-  bool notify(QObject* receiver, QEvent* event)
-  {
-    try {
-      return QApplication::notify(receiver, event);
-    } catch (std::exception &e) {
-      // find the mainwindow to spawn an error message
-      Q_FOREACH (QWidget *widget, QApplication::topLevelWidgets()) {
-        if(MainWindow* mw = qobject_cast<MainWindow*>(widget)) {
-          QMessageBox::critical(
-            mw,
-            tr("Unhandled exception"),
-            e.what());
-          break;
-        }
-      }
-      QApplication::restoreOverrideCursor();
-    } catch (...) {
-      qFatal("Unknown exception encountered. Aborting.");
-    }
-    return false;
-  }
-};
-
-int main(int argc, char **argv)
-{
-  Polyhedron_demo app(argc, argv);
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Polyhedron_3 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  QStringList args = app.arguments();
-  args.removeAt(0);
-
-  if(!args.empty() && args[0] == "--use-meta")
-  {
-    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
-    args.removeAt(0);
-  }
-#ifdef QT_SCRIPT_LIB
-  if(!args.empty() && args[0] == "--debug-scripts")
-  {
-    mainWindow.enableScriptDebugger();
-    args.removeAt(0);
-  }
-  mainWindow.load_script(QFileInfo("autostart.js"));
-#endif
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-
-  // A Qt Script may have closed the main window
-  // The following loop launch app.exec() only if there is a visible
-  // window.
-  Q_FOREACH (QWidget *widget, QApplication::topLevelWidgets()) {
-    if(widget->isVisible())
-      return app.exec();
-  }
-  return 0;
-}
-
-#ifndef USE_FORWARD_DECL
-#  include "Scene.cpp"
-#  include "Scene_item.cpp"
-#  include "Scene_moc.cpp"
-#  include "Viewer.cpp"
-#  include "Viewer_moc.cpp"
-#  include "MainWindow.cpp"
-#  include "MainWindow_moc.cpp"
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.qrc b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.qrc
deleted file mode 100644
index e195320..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_3.qrc
+++ /dev/null
@@ -1,19 +0,0 @@
-<RCC>
-  <qresource prefix="/cgal/icons" >
-    <file>resources/cgal_logo.xpm</file>
-    <file>resources/boolean-union.png</file>
-    <file>resources/kernel.png</file>
-    <file>resources/boolean-diff.png</file>
-    <file>resources/boolean-intersection.png</file>
-    <file alias="convex-hull.png" >resources/convex-hull.png</file>
-    <file alias="simplification.png" >resources/simplification.png</file>
-    <file alias="duplicate" >resources/editcopy.png</file>
-    <file alias="check-on.png" >resources/check-on.png</file>
-    <file alias="plus" >resources/plus.png</file>
-    <file alias="check-off.png" >resources/check-off.png</file>
-    <file alias="minus" >resources/minus.png</file>
-  </qresource>
-  <qresource prefix="/cgal/Polyhedron_3" >
-    <file alias="about.html" >resources/about.html</file>
-  </qresource>
-</RCC>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp
deleted file mode 100644
index d78b507..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <QtCore/qglobal.h>
-#include "Messages_interface.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-
-#include "Camera_positions_list.h"
-#include "Viewer_interface.h"
-
-#include <QMainWindow>
-
-class Polyhedron_demo_camera_positions_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_interface,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface Polyhedron_demo_io_plugin_interface)
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  QList<QAction*> actions() const;
-
-  QString name() const { return "camera_positions_plugin"; }
-  QString nameFilters() const { return "Camera positions (*.camera.txt)"; }
-  bool canLoad() const { return true; }
-  Scene_item* load(QFileInfo fileinfo) { cpl->load(fileinfo.filePath()); return 0; }
-
-  bool canSave(const Scene_item*) { return false; }
-  bool save(const Scene_item*, QFileInfo ) {return false; }
-  bool applicable(QAction*) const {return false;}
-private:
-  Camera_positions_list* cpl;
-};
-
-void Polyhedron_demo_camera_positions_plugin::init(QMainWindow* mainWindow, Scene_interface*)
-{
-  cpl = new Camera_positions_list(mainWindow);
-  cpl->setViewer(mainWindow->findChild<Viewer_interface*>("viewer"));
-  mainWindow->addDockWidget(Qt::LeftDockWidgetArea, cpl);
-}
-
-QList<QAction*> 
-Polyhedron_demo_camera_positions_plugin::actions() const
-{
-  return QList<QAction*>();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_camera_positions_plugin, Polyhedron_demo_camera_positions_plugin)
-
-#include "Polyhedron_demo_camera_positions_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp
deleted file mode 100644
index c0f91fc..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-#include <QTime>
-#include <QApplication>
-#include <QAction>
-#include <QStringList>
-
-#include "opengl_tools.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_points_with_normal_item.h"
-#include "Scene_polylines_item.h"
-#include "Scene_polyhedron_selection_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/convex_hull_3.h>
-#include <boost/iterator/transform_iterator.hpp>
-
-class Polyhedron_demo_convex_hull_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionConvexHull";
-  }
-
-  bool applicable(QAction*) const {
-    return 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())) ||
-      qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex())) ||
-      qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex())) ||
-      qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionConvexHull_triggered();
-
-}; // end Polyhedron_demo_convex_hull_plugin
-
-// for transform iterator
-struct Get_point {
-  typedef const Polyhedron::Point_3& result_type;
-  result_type operator()(const Polyhedron::Vertex_handle v) const
-  { return v->point(); }
-};
-
-void Polyhedron_demo_convex_hull_plugin::on_actionConvexHull_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* poly_item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  Scene_points_with_normal_item* pts_item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-  
-  Scene_polylines_item* lines_item = 
-    qobject_cast<Scene_polylines_item*>(scene->item(index));
-  
-  Scene_polyhedron_selection_item* selection_item = 
-    qobject_cast<Scene_polyhedron_selection_item*>(scene->item(index));
-
-  if(poly_item || pts_item || lines_item || selection_item)
-  {
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    QTime time;
-    time.start();
-    std::cout << "Convex hull...";
-
-    // add convex hull as new polyhedron
-    Polyhedron *pConvex_hull = new Polyhedron;
-    if(selection_item) {
-      CGAL::convex_hull_3(
-        boost::make_transform_iterator(selection_item->selected_vertices.begin(), Get_point()),
-        boost::make_transform_iterator(selection_item->selected_vertices.end(), Get_point()),
-        *pConvex_hull);
-    }
-    else if ( poly_item ){
-      Polyhedron* pMesh = poly_item->polyhedron();  
-      CGAL::convex_hull_3(pMesh->points_begin(),pMesh->points_end(),*pConvex_hull);
-    }
-    else{
-      if (pts_item)
-        CGAL::convex_hull_3(pts_item->point_set()->begin(),pts_item->point_set()->end(),*pConvex_hull);
-      else{
-        std::size_t nb_points=0;
-        for(std::list<std::vector<Kernel::Point_3> >::const_iterator it = lines_item->polylines.begin();
-            it != lines_item->polylines.end();
-            ++it)  nb_points+=it->size();
-
-        std::vector<Kernel::Point_3> all_points;
-        all_points.reserve( nb_points );
-
-        for(std::list<std::vector<Kernel::Point_3> >::const_iterator it = lines_item->polylines.begin();
-            it != lines_item->polylines.end();
-            ++it)  std::copy(it->begin(), it->end(),std::back_inserter( all_points ) );
-        
-        CGAL::convex_hull_3(all_points.begin(),all_points.end(),*pConvex_hull);
-      }
-    }
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-
-    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pConvex_hull);
-    new_item->setName(tr("%1 (convex hull)").arg(scene->item(index)->name()));
-    new_item->setColor(Qt::magenta);
-    new_item->setRenderingMode(FlatPlusEdges);
-    scene->addItem(new_item);
-
-    // default cursor
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_convex_hull_plugin, Polyhedron_demo_convex_hull_plugin)
-
-#include "Polyhedron_demo_convex_hull_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp
deleted file mode 100644
index 242d113..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/corefinement_operations.h>
-#include <CGAL/bounding_box.h>
-#include "Scene_polyhedron_item.h"
-#include "Scene_combinatorial_map_item.h"
-#include "Polyhedron_type.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-
-#include "Scene_polylines_item.h"
-
-#include <QString>
-#include <QAction>
-#include <QMenu>
-#include <QMainWindow>
-#include <QApplication>
-#include <QTime>
-#include <QMessageBox>
-
-//#define PRINT_EACH_VOLUME
-
-class Polyhedron_demo_corefinement_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionPolyhedronCorefinement_3;
-  }
-
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionPolyhedronCorefinement_3 = new QAction("Polyhedra corefinement", mw);
-    if(actionPolyhedronCorefinement_3) {
-      connect(actionPolyhedronCorefinement_3, SIGNAL(triggered()),
-              this, SLOT(corefinement()));
-    }
-  }
-
-private:
-
-  QAction*  actionPolyhedronCorefinement_3;
-
-public slots:
-  void corefinement();
-
-}; // end class Polyhedron_demo_corefinement_plugin
-
-
-struct Is_on_polyline{
-  bool operator()(Polyhedron::Halfedge_handle he) const { 
-    return he->is_feature_edge();
-  }
-};
-
-struct Set_vertex_corner{
-  template <typename Info>
-  void add_info_to_node(int, Polyhedron*,const Info&) {
-  }
-
-  void operator()(Polyhedron::Vertex_handle v, int, Polyhedron*) {
-    ++v->nb_of_feature_edges;
-  }
-};
-
-void Polyhedron_demo_corefinement_plugin::corefinement()
-{
-  int indexA = scene->selectionAindex();
-  int indexB = scene->selectionBindex();
-
-  Scene_polyhedron_item* itemA = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
-  Scene_polyhedron_item* itemB = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
-  if(!itemA || !itemB || itemA == itemB)
-  {
-    Q_FOREACH(int index, scene->selectionIndices()) {
-      Scene_polyhedron_item* item = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-      if(!item)
-        return;
-    }
-    if(scene->selectionIndices().size() == 2) {
-      indexA = scene->selectionIndices()[0];
-      indexB = scene->selectionIndices()[1];
-      itemA = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
-      itemB = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
-    }
-  }
-  std::vector<Polyhedron*> poly_ptrs;
-  Q_FOREACH(int index, scene->selectionIndices()) {
-    Scene_polyhedron_item* item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(!item)
-      return;
-    else if(item != itemA) {
-      poly_ptrs.push_back(item->polyhedron());
-      if(poly_ptrs.back() == 0) return;
-    }
-  }
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  if(itemA && itemB && itemA != itemB) {
-  
-   // perform Boolean operation
-    QTime time;
-    time.start();
-
-    //since the visitor modify input polyhedra, we make copies.
-    Polyhedron A( *itemA->polyhedron() );
-    Polyhedron B( *itemB->polyhedron() );
-    
-    itemA->setVisible(false);
-    itemB->setVisible(false);
-    
-    Scene_polylines_item* new_item = new Scene_polylines_item();
-    
-  #ifdef _COREFINEMENT_OUTPUT_IS_POLYHEDRON
-    typedef CGAL::Polyhedron_corefinement<Polyhedron> Corefinement;
-    Corefinement corefinement;
-
-    typedef std::list<std::pair<Polyhedron*,int> > Decomposition;
-    Decomposition decomposition;
-    
-    #ifndef PRINT_EACH_VOLUME
-    int features=Corefinement::Join_tag+Corefinement::Intersection_tag+Corefinement::P_minus_Q_tag+Corefinement::Q_minus_P_tag;
-    #else
-    int features=Corefinement::Decomposition_tag;
-    #endif
-    corefinement(A, B, std::back_inserter(new_item->polylines),std::back_inserter(decomposition),features);
-    
-    
-    for (Decomposition::iterator it=decomposition.begin();it!=decomposition.end();++it)
-    {
-      Polyhedron* new_poly=it->first;
-      Scene_polyhedron_item* new_item_bool= new Scene_polyhedron_item(new_poly);
-      new_item_bool->setName(
-        QString::fromStdString(
-          corefinement.get_type_str(itemA->name().toStdString(),itemB->name().toStdString(),it->second)
-        )
-      );
-      scene->addItem(new_item_bool);
-    }
-  #else  
-    Scene_combinatorial_map_item* cmap_item = new Scene_combinatorial_map_item(scene,static_cast<void*>(&A)); 
-    typedef CGAL::Node_visitor_refine_polyhedra<Polyhedron> Split_visitor; 
-    cmap_item->m_combinatorial_map=new Combinatorial_map_3();
-    Split_visitor visitor(cmap_item->m_combinatorial_map);
-    CGAL::Intersection_of_Polyhedra_3<Polyhedron,Kernel,Split_visitor> polyline_intersections(visitor);
-    polyline_intersections(A, B, std::back_inserter(new_item->polylines));
-    cmap_item->setName(QString("%1_and_%2_corefined").arg(itemA->name()).arg(itemB->name()));
-    scene->addItem(cmap_item);
-  #endif
-    new_item->setName(tr("boundary intersection"));
-    new_item->setColor(Qt::green);
-    new_item->setRenderingMode(Wireframe);
-    scene->addItem(new_item);
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-      
-  }
-
-  QApplication::restoreOverrideCursor();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_corefinement_plugin, Polyhedron_demo_corefinement_plugin)
-
-#include "Polyhedron_demo_corefinement_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp
deleted file mode 100644
index ec98cb5..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-
-#include <fstream>
-#include <QtCore/qglobal.h>
-#include <CGAL/AABB_intersections.h>
-
-#include "Messages_interface.h"
-#include "Scene_item_with_display_list.h"
-#include "Scene_plane_item.h"
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <CGAL/gl.h>
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-#include <CGAL/internal/AABB_tree/AABB_drawing_traits.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/bounding_box.h>
-
-#include "Polyhedron_type.h"
-
-#include <QTime>
-
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-
-//typedef CGAL::Simple_cartesian<double> Epic_kernel;
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
-
-typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron>     AABB_primitive;
-typedef CGAL::AABB_traits<Epic_kernel,AABB_primitive>           AABB_traits;
-typedef CGAL::AABB_tree<AABB_traits>                            AABB_tree;
-
-class Q_DECL_EXPORT Scene_aabb_item : public Scene_item_with_display_list
-{
-  Q_OBJECT
-public:
-  Scene_aabb_item(const AABB_tree& tree_) : tree(tree_) {}
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return tree.empty(); }
-  Bbox bbox() const {
-    const CGAL::Bbox_3 bbox = tree.bbox();
-    return Bbox(bbox.xmin(),
-                bbox.ymin(),
-                bbox.zmin(),
-                bbox.xmax(),
-                bbox.ymax(),
-                bbox.zmax());
-  }
-
-  Scene_aabb_item* clone() const {
-    return 0;
-  }
-
-  QString toolTip() const {
-    return
-      tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
-         "<i>AABB_tree</i></p>"
-         "<p>Number of nodes: %4</p>")
-      .arg(this->name())
-      .arg(this->renderingModeName())
-      .arg(this->color().name())
-      .arg(tree.size());
-  }
-  
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m == Wireframe);
-  }
-
-  // Wireframe OpenGL drawing in a display list
-  void direct_draw() const {
-    CGAL::AABB_drawing_traits<AABB_primitive, CGAL::AABB_node<AABB_traits> > traits;
-    tree.traversal(0, traits);
-  }
-
-public:
-  const AABB_tree& tree;
-}; // end class Scene_aabb_item
-
-class Q_DECL_EXPORT Scene_edges_item : public Scene_item
-{
-  Q_OBJECT
-public:
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return edges.empty(); }
-  Bbox bbox() const {
-    if(isEmpty())
-      return Bbox();
-    CGAL::Bbox_3 bbox = edges.begin()->bbox();
-    for(size_t i = 1, end = edges.size(); i < end; ++i) {
-      bbox = bbox + edges[i].bbox();
-    }
-    return Bbox(bbox.xmin(),
-                bbox.ymin(),
-                bbox.zmin(),
-                bbox.xmax(),
-                bbox.ymax(),
-                bbox.zmax());
-  }
-
-  Scene_edges_item* clone() const {
-    Scene_edges_item* item = new Scene_edges_item;
-    item->edges = edges;
-    return item;
-  }
-
-  QString toolTip() const {
-    return
-      tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
-         "<i>Edges</i></p>"
-         "<p>Number of edges: %4</p>")
-      .arg(this->name())
-      .arg(this->renderingModeName())
-      .arg(this->color().name())
-      .arg(edges.size());
-  }
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m == Wireframe);
-  }
-
-  // Flat/Gouraud OpenGL drawing
-  void draw() const {}
-
-  // Wireframe OpenGL drawing
-  void draw_edges() const {
-    ::glBegin(GL_LINES);
-    for(size_t i = 0, end = edges.size();
-        i < end; ++i)
-    {
-      const Epic_kernel::Point_3& a = edges[i].source();
-      const Epic_kernel::Point_3& b = edges[i].target();
-      ::glVertex3d(a.x(), a.y(), a.z());
-      ::glVertex3d(b.x(), b.y(), b.z());
-    }
-    ::glEnd();
-  }
-
-  bool save(std::ostream& os) const
-  {
-    os.precision(17);
-    for(size_t i = 0, end = edges.size(); i < end; ++i){
-      os << "2 " << edges[i].source() << " " <<  edges[i].target() << "\n";
-    }
-    return true;
-  }
-
-public:
-  std::vector<Epic_kernel::Segment_3> edges;
-}; // end class Scene_edges_item
-
-
-class Polyhedron_demo_cut_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_interface,
-  public Polyhedron_demo_io_plugin_interface 
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  Polyhedron_demo_cut_plugin() : QObject(), edges_item(0) {
-  }
-  
-  virtual ~Polyhedron_demo_cut_plugin();
-
-  bool applicable(QAction*) const {
-    // returns true if one polyhedron is in the entries
-    for (int i=0; i< scene->numberOfEntries(); ++i)
-    {
-      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(i)) )
-        return true;
-    }
-    return false;
-  }
-
-  virtual QString name() const
-  {
-    return "cut-plugin";
-  }
-
-
-  virtual QString nameFilters() const
-  {
-    return "Segment soup file (*.polylines.txt *.cgal)";
-  }
-
-
-  bool canLoad() const
-  {
-    return false;
-  }
-
-  virtual Scene_item* load(QFileInfo /* fileinfo */)
-  {
-    return 0;
-  }
-
-  virtual bool canSave(const Scene_item* item)
-  {
-    // This plugin supports edges items
-    bool b = qobject_cast<const Scene_edges_item*>(item) != 0;
-    return b;
-  }
-
-
-  virtual bool save(const Scene_item* item, QFileInfo fileinfo)
-  {  // This plugin supports edges items
-    const Scene_edges_item* edges_item = 
-      qobject_cast<const Scene_edges_item*>(item);
-    
-    if(!edges_item){
-      return false;
-    }
-    
-    std::ofstream out(fileinfo.filePath().toUtf8());
-    
-    return (out && edges_item->save(out));
-  }
-
-
-
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface,
-            Messages_interface* m);
-  QList<QAction*> actions() const;
-
-public slots:
-  void createCutPlane();
-  void enableAction();
-  void cut();
-  void reset_edges() {
-    edges_item = 0;
-  }
-
-private:
-  Scene_interface* scene;
-  Messages_interface* messages;
-  Scene_plane_item* plane_item;
-  Scene_edges_item* edges_item;
-  QAction* actionCreateCutPlane;
-
-  typedef std::map<QObject*,  AABB_tree*> Trees;
-  Trees trees;
-}; // end Polyhedron_demo_cut_plugin
-
-
-Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
-{
-  for ( Trees::iterator it = trees.begin(), end = trees.end() ;
-       it != end ; ++it)
-  {
-    delete it->second;
-  }
-}
-
-
-void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
-                                      Scene_interface* scene_interface,
-                                      Messages_interface* m)
-{
-  scene = scene_interface;
-  messages = m;
-  actionCreateCutPlane = new QAction(tr("Create cutting plane"), mainWindow);
-  connect(actionCreateCutPlane, SIGNAL(triggered()),
-          this, SLOT(createCutPlane()));
-}
-
-QList<QAction*> Polyhedron_demo_cut_plugin::actions() const {
-  return QList<QAction*>() << actionCreateCutPlane;
-}
-
-void Polyhedron_demo_cut_plugin::createCutPlane() {
-  plane_item = new Scene_plane_item(scene);
-  const Scene_interface::Bbox& bbox = scene->bbox();
-  plane_item->setPosition((bbox.xmin+bbox.xmax)/2.f,
-                          (bbox.ymin+bbox.ymax)/2.f,
-                          (bbox.zmin+bbox.zmax)/2.f);
-  plane_item->setNormal(0., 0., 1.);
-  connect(plane_item, SIGNAL(destroyed()),
-          this, SLOT(enableAction()));
-  plane_item->setManipulatable(true);
-  plane_item->setClonable(false);
-  plane_item->setColor(Qt::green);
-  plane_item->setName(tr("Cutting plane"));
-  connect(plane_item->manipulatedFrame(), SIGNAL(modified()),
-          this, SLOT(cut()));
-  scene->addItem(plane_item);
-  actionCreateCutPlane->setEnabled(false);
-
-  // Hide polyhedrons and call cut() (avoid that nothing shows up until user
-  // decides to move the plane item)
-  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
-    Scene_item* item = scene->item(i);
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
-    if ( NULL != poly_item )
-      poly_item->setVisible(false);
-  }
-  cut();
-}
-
-
-void Polyhedron_demo_cut_plugin::cut() {
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  if(!edges_item) {
-    edges_item = new Scene_edges_item;
-    edges_item->setName("Edges of the cut");
-    edges_item->setColor(Qt::red);
-    connect(edges_item, SIGNAL(destroyed()),
-            this, SLOT(reset_edges()));
-    scene->addItem(edges_item);
-  }
-  const qglviewer::Vec& pos = plane_item->manipulatedFrame()->position();
-  const qglviewer::Vec& n =
-    plane_item->manipulatedFrame()->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-  Epic_kernel::Plane_3 plane(n[0], n[1],  n[2], - n * pos);
-  //std::cerr << plane << std::endl;
-  edges_item->edges.clear();
-  QTime time;
-  time.start();
-  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
-    Scene_item* item = scene->item(i);
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
-    if(!poly_item) continue;
-    Trees::iterator it = trees.find(poly_item);
-    if(it == trees.end()) {
-      it = trees.insert(trees.begin(),
-                        std::make_pair(poly_item,
-                                       new AABB_tree(faces(*(poly_item->polyhedron())).first,
-                                                     faces(*(poly_item->polyhedron())).second,
-                                                     *poly_item->polyhedron() )));
-      Scene_aabb_item* aabb_item = new Scene_aabb_item(*it->second);
-      aabb_item->setName(tr("AABB tree of %1").arg(poly_item->name()));
-      aabb_item->setRenderingMode(Wireframe);
-      aabb_item->setVisible(false);
-      scene->addItem(aabb_item);
-      //std::cerr << "size: " << it->second->size() << std::endl;
-    }
-    
-    if(!CGAL::do_intersect(plane, it->second->bbox()))
-      continue;
-    
-    std::vector<AABB_tree::Object_and_primitive_id> intersections;
-    it->second->all_intersections(plane, std::back_inserter(intersections));
-    
-    for ( std::vector<AABB_tree::Object_and_primitive_id>::iterator it = intersections.begin(),
-         end = intersections.end() ; it != end ; ++it )
-    {
-      const Epic_kernel::Segment_3* inter_seg =
-        CGAL::object_cast<Epic_kernel::Segment_3>(&(it->first));
-      
-      if ( NULL != inter_seg )
-        edges_item->edges.push_back(*inter_seg);
-    }
-  }
-  
-  messages->information(QString("cut (%1 ms). %2 edges.").arg(time.elapsed()).arg(edges_item->edges.size()));
-  scene->itemChanged(edges_item);
-  QApplication::restoreOverrideCursor();
-}
-
-void Polyhedron_demo_cut_plugin::enableAction() {
-  actionCreateCutPlane->setEnabled(true);
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_cut_plugin, Polyhedron_demo_cut_plugin)
-
-#include "Polyhedron_demo_cut_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp
deleted file mode 100644
index 9a256f5..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_edit_polyhedron_item.h"
-
-#include <QAction>
-#include <QMainWindow>
-#include <QFileDialog>
-
-#include <QGLViewer/qglviewer.h>
-
-#include "ui_Deform_mesh.h"
-
-class Polyhedron_demo_edit_polyhedron_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  Polyhedron_demo_edit_polyhedron_plugin() 
-    : Polyhedron_demo_plugin_helper(), dock_widget(NULL)
-  { }
-  ~Polyhedron_demo_edit_polyhedron_plugin()
-  { }
-
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  QList<QAction*> actions() const;
-  bool applicable(QAction*) const;
-
-public slots:
-  void on_actionDeformation_triggered();
-  /////// Dock window signal handlers //////
-  // what they do is simply transmiting required 'action' to selected scene_edit_polyhedron_item object
-  void on_AddCtrlVertPushButton_clicked();
-  void on_PrevCtrlVertPushButton_clicked();
-  void on_NextCtrlVertPushButton_clicked();
-  void on_SelectAllVerticesPushButton_clicked();
-  void on_DeleteCtrlVertPushButton_clicked();  
-  void on_ApplyAndClosePushButton_clicked();
-  void on_ClearROIPushButton_clicked();
-  void on_ShowROICheckBox_stateChanged(int state);
-  void on_ShowAsSphereCheckBox_stateChanged(int state);  
-  void on_ActivatePivotingCheckBox_stateChanged(int state);
-  void on_OverwritePushButton_clicked();
-  void on_SaveROIPushButton_clicked();
-  void on_ReadROIPushButton_clicked();
-  void dock_widget_visibility_changed(bool visible);
-  void on_Select_isolated_components_button_clicked();
-  void on_Get_minimum_button_clicked();
-
-  void on_BrushSpinBoxCtrlVert_changed(int);
-  void on_BrushSpinBoxRoi_changed(int);
-  void on_ROIRadioButton_toggled(bool);
-  void new_item_created(int item_id);
-
-private:
-  typedef Scene_interface::Item_id Item_id;
-
-  Scene_edit_polyhedron_item* convert_to_edit_polyhedron(Item_id, Scene_polyhedron_item*);
-  Scene_polyhedron_item* convert_to_plain_polyhedron(Item_id, Scene_edit_polyhedron_item*);
-
-  Ui::DeformMesh ui_widget;
-  QDockWidget* dock_widget;
-
-  QAction* actionDeformation;
-}; // end Polyhedron_demo_edit_polyhedron_plugin
-
-QList<QAction*> Polyhedron_demo_edit_polyhedron_plugin::actions() const {
-  return QList<QAction*>() << actionDeformation;
-}
-bool Polyhedron_demo_edit_polyhedron_plugin::applicable(QAction*) const { 
-  Q_FOREACH(Scene_interface::Item_id i, scene->selectionIndices())
-  {
-    if(qobject_cast<Scene_polyhedron_item*>(scene->item(i)) 
-        || qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i)))
-      return true;
-  }
-  return false;
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::init(QMainWindow* mainWindow, Scene_interface* scene_interface)
-{
-  mw = mainWindow;
-  scene = scene_interface;
-
-  actionDeformation = new QAction("Surface Mesh Deformation", mw);
-
-  actionDeformation->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E));
-  connect(actionDeformation, SIGNAL(triggered()), this, SLOT(on_actionDeformation_triggered()));
-
-  // Connect Scene::newItem so that, if dock_widget is visible, convert
-  // automatically polyhedron items to "edit polyhedron" items.
-  QObject* scene = dynamic_cast<QObject*>(scene_interface);
-  if(scene) {
-    connect(scene, SIGNAL(newItem(int)), this, SLOT(new_item_created(int)));
-  } else {
-    std::cerr << "ERROR " << __FILE__ << ":" << __LINE__ << " :"
-              << " cannot convert scene_interface to scene!\n"; 
-  }
-
-  ////////////////// Construct widget /////////////////////////////
-  // First time, construct docking window
-  dock_widget = new QDockWidget("Mesh Deformation", mw);
-  dock_widget->setVisible(false); // do not show at the beginning
-
-  ui_widget.setupUi(dock_widget); 
-  mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
-
-  connect(ui_widget.AddCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_AddCtrlVertPushButton_clicked()));
-  connect(ui_widget.PrevCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_PrevCtrlVertPushButton_clicked()));
-  connect(ui_widget.NextCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_NextCtrlVertPushButton_clicked()));
-  connect(ui_widget.SelectAllVerticesPushButton, SIGNAL(clicked()), this, SLOT(on_SelectAllVerticesPushButton_clicked()));
-  connect(ui_widget.DeleteCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_DeleteCtrlVertPushButton_clicked()));
-  connect(ui_widget.ApplyAndClosePushButton, SIGNAL(clicked()), this, SLOT(on_ApplyAndClosePushButton_clicked()));
-  connect(ui_widget.ClearROIPushButton, SIGNAL(clicked()), this, SLOT(on_ClearROIPushButton_clicked()));
-  connect(ui_widget.ShowROICheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ShowROICheckBox_stateChanged(int)));
-  connect(ui_widget.ShowAsSphereCheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ShowAsSphereCheckBox_stateChanged(int)));  
-  connect(ui_widget.ActivatePivotingCheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ActivatePivotingCheckBox_stateChanged(int)));
-  connect(ui_widget.OverwritePushButton, SIGNAL(clicked()), this, SLOT(on_OverwritePushButton_clicked()));
-  connect(ui_widget.Select_isolated_components_button,  SIGNAL(clicked()), this, SLOT(on_Select_isolated_components_button_clicked()));
-  connect(ui_widget.Get_minimum_button,  SIGNAL(clicked()), this, SLOT(on_Get_minimum_button_clicked()));
-
-  connect(ui_widget.SaveROIPushButton, SIGNAL(clicked()), this, SLOT(on_SaveROIPushButton_clicked()));
-  connect(ui_widget.ReadROIPushButton, SIGNAL(clicked()), this, SLOT(on_ReadROIPushButton_clicked()));
-  connect(dock_widget, SIGNAL(visibilityChanged(bool)), this, SLOT(dock_widget_visibility_changed(bool)) );
-
-  connect(ui_widget.BrushSpinBoxRoi, SIGNAL(valueChanged(int)), this, SLOT(on_BrushSpinBoxRoi_changed(int)));
-  connect(ui_widget.BrushSpinBoxCtrlVert, SIGNAL(valueChanged(int)), this, SLOT(on_BrushSpinBoxCtrlVert_changed(int)));
-  connect(ui_widget.ROIRadioButton, SIGNAL(toggled(bool)), this, SLOT(on_ROIRadioButton_toggled(bool)));
-  ///////////////////////////////////////////////////////////////////
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_actionDeformation_triggered()
-{  
-  // dock widget should be constructed in init()
-  if(dock_widget->isVisible()) { dock_widget->hide(); }
-  else                         { dock_widget->show(); }
-}
-
-/////// Dock window signal handlers //////
-// what they do is simply transmitting required 'action' to selected scene_edit_polyhedron_item object
-void Polyhedron_demo_edit_polyhedron_plugin::on_AddCtrlVertPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->create_ctrl_vertices_group();
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_PrevCtrlVertPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->prev_ctrl_vertices_group();
-  scene->itemChanged(edit_item); // for repaint
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_NextCtrlVertPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->next_ctrl_vertices_group();
-  scene->itemChanged(edit_item); // for repaint
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_SelectAllVerticesPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->set_all_vertices_as_roi();
-  scene->itemChanged(edit_item); // for repaint
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_DeleteCtrlVertPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->delete_ctrl_vertices_group();
-  scene->itemChanged(edit_item); // for repaint
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ClearROIPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->clear_roi();
-  scene->itemChanged(edit_item); // for repaint
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ApplyAndClosePushButton_clicked()
-{
-  dock_widget->setVisible(false);
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ShowROICheckBox_stateChanged(int /*state*/)
-{
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-    
-    scene->itemChanged(edit_item);  // just for redraw   
-  }  
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ShowAsSphereCheckBox_stateChanged(int /*state*/)
-{
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-    
-    scene->itemChanged(edit_item);  // just for redraw   
-  }  
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ActivatePivotingCheckBox_stateChanged(int state)
-{
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-    
-    if(state == Qt::Checked) {
-      edit_item->pivoting_begin();
-    }
-    else {
-      edit_item->pivoting_end();
-    }
-    scene->itemChanged(edit_item);     
-  }
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_OverwritePushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  edit_item->overwrite_deform_object();
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_Select_isolated_components_button_clicked() {
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  boost::optional<std::size_t> minimum = 
-    edit_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value());
-  if(minimum) {
-    ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
-  }
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_Get_minimum_button_clicked() {
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;                             // the selected item is not of the right type
-
-  boost::optional<std::size_t> minimum = edit_item->get_minimum_isolated_component();
-  if(minimum) {
-    ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
-  }
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_SaveROIPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;  
-
-  QString fileName = QFileDialog::getSaveFileName(mw, "Save", 
-      "roi.txt", "Text (*.txt)");
-  if(fileName.isNull()) { return; }
-
-  edit_item->save_roi(fileName.toLocal8Bit().data());  
-}
-void Polyhedron_demo_edit_polyhedron_plugin::on_ReadROIPushButton_clicked()
-{
-  int item_id = scene->mainSelectionIndex();
-  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
-  if(!edit_item) return;  
-
-  QString fileName = QFileDialog::getOpenFileName(mw, "Read", 
-    "roi.txt", "Text (*.txt)");
-  if(fileName.isNull()) { return; }
-
-  edit_item->read_roi(fileName.toLocal8Bit().data());
-  scene->itemChanged(edit_item); 
-}
-void Polyhedron_demo_edit_polyhedron_plugin::dock_widget_visibility_changed(bool visible)
-{
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries();
-      i < end; ++i)
-  {
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(i));
-    if (poly_item) 
-    { poly_item->update_halfedge_indices(); }
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-
-    if(visible && poly_item) {
-      convert_to_edit_polyhedron(i, poly_item);
-    } else if(!visible && edit_item) {
-      convert_to_plain_polyhedron(i, edit_item);
-    }
-  }
-
-  //QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-  //if(visible)
-  //{
-  //  viewer->camera()->setType(qglviewer::Camera::ORTHOGRAPHIC);
-  //}else
-  //{
-  //  viewer->camera()->setType(qglviewer::Camera::PERSPECTIVE);
-  //}
-}
-
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_ROIRadioButton_toggled(bool value) {
-  int k_ring = value ? ui_widget.BrushSpinBoxRoi->value() : 
-                       ui_widget.BrushSpinBoxCtrlVert->value();
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-
-    edit_item->set_k_ring(k_ring);
-  }
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_BrushSpinBoxCtrlVert_changed(int value) {
-  if(ui_widget.ROIRadioButton->isChecked()) { return; }
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-
-    edit_item->set_k_ring(value);
-  }
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::on_BrushSpinBoxRoi_changed(int value) {
-  if(!ui_widget.ROIRadioButton->isChecked()) { return; }
-  for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
-  {
-    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
-    if(!edit_item) { continue; }
-
-    edit_item->set_k_ring(value);
-  }
-}
-
-void Polyhedron_demo_edit_polyhedron_plugin::new_item_created(int item_id)
-{
-  if(dock_widget->isVisible()) {
-    Scene_polyhedron_item* poly_item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(item_id));
-    if(poly_item) {
-      convert_to_edit_polyhedron(item_id, poly_item);
-    }
-  }
-}
-
-Scene_edit_polyhedron_item* 
-Polyhedron_demo_edit_polyhedron_plugin::convert_to_edit_polyhedron(Item_id i,
-                           Scene_polyhedron_item* poly_item)
-{
-  QString poly_item_name = poly_item->name();
-  Scene_edit_polyhedron_item* edit_poly = new Scene_edit_polyhedron_item(poly_item, &ui_widget, mw);
-  edit_poly->setColor(poly_item->color());
-  edit_poly->setName(QString("%1 (edit)").arg(poly_item->name()));
-  edit_poly->setRenderingMode(Gouraud);
-  poly_item->setName(poly_item_name); // Because it is changed when the
-                                      // name of edit_poly is changed.
-  int k_ring = ui_widget.ROIRadioButton->isChecked() ? ui_widget.BrushSpinBoxRoi->value() : 
-                                                       ui_widget.BrushSpinBoxCtrlVert->value();
-  edit_poly->set_k_ring(k_ring);
-  scene->replaceItem(i, edit_poly);
-  return edit_poly;
-}
-
-Scene_polyhedron_item* 
-Polyhedron_demo_edit_polyhedron_plugin::convert_to_plain_polyhedron(Item_id i,
-                            Scene_edit_polyhedron_item* edit_item) 
-{
-  Scene_polyhedron_item* poly_item = edit_item->to_polyhedron_item();
-  scene->replaceItem(i, poly_item);
-  delete edit_item;
-  return poly_item;
-}
-
-
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_edit_polyhedron_plugin, Polyhedron_demo_edit_polyhedron_plugin)
-
-#include "Polyhedron_demo_edit_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp
deleted file mode 100644
index b18955a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include <CGAL/gocad_io.h>
-#include <CGAL/Timer.h>
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-#include <QColor>
-
- 
-
-class Polyhedron_demo_gocad_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString nameFilters() const;
-  QString name() const { return "gocad_plugin"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-QString Polyhedron_demo_gocad_plugin::nameFilters() const {
-  return "GOCAD files (*.ts *.xyz)";
-}
-
-bool Polyhedron_demo_gocad_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo) {
-
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-    
-  // Try to read GOCAD file in a polyhedron
-
-  CGAL::Timer t;
-  t.start();
-  Scene_polyhedron_item* item = new Scene_polyhedron_item(Polyhedron());
-  Polyhedron& P = * const_cast<Polyhedron*>(item->polyhedron());
-  
-  std::string name, color;
-  if(! read_gocad(P, in, name, color)){
-    // std::cerr << "Error: Invalid polyhedron" << std::endl;
-    delete item;
-    return 0;
-  }   
-
-  t.stop();
-  std::cerr << "Reading took " << t.time() << " sec." << std::endl;
-  if(name.size() == 0){
-    item->setName(fileinfo.baseName());
-  } else {
-    item->setName(name.c_str());
-  }
-  QColor qcolor(color.c_str());
-  if(qcolor.isValid()) 
-  {  
-    item->setColor(qcolor);
-    item->changed();
-  }
-  
-
-  return item;
-}
-
-bool Polyhedron_demo_gocad_plugin::canSave(const Scene_item* item)
-{
-  // This plugin supports polyhedrons
-  return qobject_cast<const Scene_polyhedron_item*>(item);
-}
-
-bool Polyhedron_demo_gocad_plugin::save(const Scene_item* item, QFileInfo fileinfo)
-{
-  // This plugin supports polyhedrons
-  const Scene_polyhedron_item* poly_item = 
-    qobject_cast<const Scene_polyhedron_item*>(item);
- 
-  if(!poly_item)
-    return false;
-
-  std::ofstream out(fileinfo.filePath().toUtf8());
-
-  Polyhedron* poly = const_cast<Polyhedron*>(poly_item->polyhedron());
-
-  write_gocad(*poly, out, qPrintable(fileinfo.baseName()));
-
-  
-  return true;
-
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_gocad_plugin, Polyhedron_demo_gocad_plugin)
-#include "Polyhedron_demo_gocad_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp
deleted file mode 100644
index ef86455..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <QApplication>
-#include <QAction>
-#include <QStringList>
-
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-class Polyhedron_demo_inside_out_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionInsideOut";
-  }
-
-  bool applicable(QAction*) const { 
-    const Scene_interface::Item_id index = scene->mainSelectionIndex();
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(index)) 
-      || qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
-  }
-
-public slots:
-  void on_actionInsideOut_triggered();
-
-}; // end Polyhedron_demo_inside_out_plugin
-
-void Polyhedron_demo_inside_out_plugin::on_actionInsideOut_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* poly_item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  Scene_polygon_soup_item* soup_item = 
-    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
-
-  if(poly_item || soup_item)
-  {
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    if(poly_item) {
-      Polyhedron* pMesh = poly_item->polyhedron();
-      if(!pMesh) return;
-  
-      // inside out
-      pMesh->inside_out();
-    }
-    else {
-      soup_item->inside_out();
-    }
-
-    // update scene
-    scene->itemChanged(index);
-
-    // default cursor
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_inside_out_plugin, Polyhedron_demo_inside_out_plugin)
-
-#include "Polyhedron_demo_inside_out_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp
deleted file mode 100644
index 79c04e5..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-#define CGAL_USE_SEGMENT_APPROACH
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#ifdef CGAL_USE_SEGMENT_APPROACH
-#include <CGAL/intersection_of_Polyhedra_3.h>
-#else
-#include <CGAL/intersection_Polyhedron_3_Polyhedron_3.h>
-#endif
-#include <CGAL/iterator.h>
-#include <CGAL/bounding_box.h>
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-
-#include "Scene_polylines_item.h"
-
-#include <boost/foreach.hpp>
-
-#include <QString>
-#include <QAction>
-#include <QMenu>
-#include <QMainWindow>
-#include <QApplication>
-#include <QTime>
-#include <QMessageBox>
-
-class Polyhedron_demo_intersection_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionPolyhedronIntersection_3;
-  }
-
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionPolyhedronIntersection_3 = new QAction("Intersect polyhedra", mw);
-    if(actionPolyhedronIntersection_3) {
-      connect(actionPolyhedronIntersection_3, SIGNAL(triggered()),
-              this, SLOT(intersection()));
-    }
-  }
-
-private:
-
-  QAction*  actionPolyhedronIntersection_3;
-
-public slots:
-  void intersection();
-
-}; // end class Polyhedron_demo_intersection_plugin
-
-
-#ifdef CGAL_USE_SEGMENT_APPROACH
-struct Is_on_polyline{
-  bool operator()(Polyhedron::Halfedge_handle he) const { 
-    return he->is_feature_edge();
-  }
-};
-
-struct Set_vertex_corner{
-  template <typename Info>
-  void add_info_to_node(int, Polyhedron*,const Info&) {
-  }
-
-  void operator()(Polyhedron::Vertex_handle v, int, Polyhedron*) {
-    ++v->nb_of_feature_edges;
-  }
-};
-#endif
-
-void Polyhedron_demo_intersection_plugin::intersection()
-{
-  int indexA = scene->selectionAindex();
-  int indexB = scene->selectionBindex();
-
-  Scene_polyhedron_item* itemA = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
-  Scene_polyhedron_item* itemB = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
-  if(!itemA || !itemB || itemA == itemB)
-  {
-    Q_FOREACH(int index, scene->selectionIndices()) {
-      Scene_polyhedron_item* item = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-      if(!item)
-        return;
-    }
-    if(scene->selectionIndices().size() == 2) {
-      indexA = scene->selectionIndices()[0];
-      indexB = scene->selectionIndices()[1];
-      itemA = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
-      itemB = 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
-    }
-  }
-#ifndef CGAL_USE_SEGMENT_APPROACH
-  if(!itemA || !itemB || itemA == itemB)
-    return;
-#else
-  std::vector<Polyhedron*> poly_ptrs;
-  Q_FOREACH(int index, scene->selectionIndices()) {
-    Scene_polyhedron_item* item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(!item)
-      return;
-    else if(item != itemA) {
-      poly_ptrs.push_back(item->polyhedron());
-      if(poly_ptrs.back() == 0) return;
-    }
-  }
-#endif
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  Scene_polylines_item* new_item = new Scene_polylines_item();
- // perform Boolean operation
-  QTime time;
-  time.start();
-
-#ifdef CGAL_USE_SEGMENT_APPROACH
-  typedef CGAL::Node_visitor_for_polyline_split<Polyhedron,
-    Is_on_polyline, Set_vertex_corner> Split_visitor;
-
-  CGAL::Intersection_of_Polyhedra_3<Polyhedron,
-    Kernel,
-    Split_visitor> polyline_intersections;
-
-  typedef std::pair<Polyhedron::Facet_handle,
-                    Polyhedron::Facet_handle> Pair_of_facet_handles;
-  typedef std::vector<Pair_of_facet_handles> Polyline_info;
-  typedef std::vector<Polyline_info> Polylines_infos;
-  Polylines_infos polylines_infos;
-
-  typedef Scene_polylines_item::Polylines_container Polylines_container;
-  typedef std::back_insert_iterator<Polylines_container> To_container;
-  typedef std::back_insert_iterator<Polylines_infos> To_infos;
-  To_container to_container(new_item->polylines);
-  To_infos to_infos(polylines_infos);
-  CGAL::Dispatch_output_iterator<
-    CGAL::cpp11::tuple<Polylines_container::value_type,
-                       Polyline_info>,
-    CGAL::cpp11::tuple<To_container, 
-                       To_infos> > out_iterator(to_container,
-                                                to_infos);
-
-  if(itemA && itemB && itemA != itemB) {
-    Polyhedron* A = itemA->polyhedron();
-    Polyhedron* B = itemB->polyhedron();
-    polyline_intersections(*A, *B, out_iterator);
-  } else {
-    if(itemA) {
-      Polyhedron* A = itemA->polyhedron();
-      polyline_intersections(*A, 
-                             poly_ptrs.begin(),
-                             poly_ptrs.end(),
-                             out_iterator,
-                             0);
-    } else {
-      polyline_intersections(poly_ptrs.begin(),
-                             poly_ptrs.end(),
-                             out_iterator,
-                             0);
-    }
-  }
-  QStringList polylines_metadata;
-  BOOST_FOREACH(Polyline_info& info, polylines_infos) {
-    std::set<int> indices;
-    BOOST_FOREACH(Pair_of_facet_handles p, info)
-    {
-      indices.insert(p.first->patch_id());
-      indices.insert(p.second->patch_id());
-    }
-    QString metadata;
-    BOOST_FOREACH(int index, indices) {
-      metadata = metadata + QString(" %1").arg(index);
-    }
-    std::cerr << "new polyline metadata: " << qPrintable(metadata) << "\n";
-    polylines_metadata << metadata;
-  }
-  new_item->setProperty("polylines metadata", polylines_metadata);
-  new_item->setName(tr("intersection"));
-#else
-  Polyhedron* A = itemA->polyhedron();
-  Polyhedron* B = itemB->polyhedron();
-  CGAL::intersection_Polyhedron_3_Polyhedron_3(*A, *B, std::back_inserter(new_item->polylines));
-
-  QString name = tr("%1 intersection %2");
-   
-  new_item->setName(name.arg(itemA->name(), itemB->name()));
-  itemA->setRenderingMode(Wireframe);
-  itemB->setRenderingMode(Wireframe);
-  scene->itemChanged(indexA);
-  scene->itemChanged(indexB);
-#endif
-  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-
-  new_item->setColor(Qt::green);
-  new_item->setRenderingMode(Wireframe);
-  scene->addItem(new_item);
-
-  QApplication::restoreOverrideCursor();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_intersection_plugin, Polyhedron_demo_intersection_plugin)
-
-#include "Polyhedron_demo_intersection_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp
deleted file mode 100644
index d5db71f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "Scene_nef_polyhedron_item.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-class Polyhedron_demo_io_nef_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString nameFilters() const;
-  QString name() const { return "io_nef_plugin"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-QString Polyhedron_demo_io_nef_plugin::nameFilters() const {
-  return "nef files (*.nef3)";
-}
-
-bool Polyhedron_demo_io_nef_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Polyhedron_demo_io_nef_plugin::load(QFileInfo fileinfo) {
-  //do not try file with extension different from nef3
-  if (fileinfo.suffix() != "nef3") return 0;
-  
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-    
-  // Try to read .nef3 in a polyhedron
-  Scene_nef_polyhedron_item* item = new Scene_nef_polyhedron_item();
-  item->setName(fileinfo.baseName());
-  if(!item->load(in))
-  {
-    delete item;
-    return 0;
-  }
-
-  return item;
-}
-
-bool Polyhedron_demo_io_nef_plugin::canSave(const Scene_item* item)
-{
-  // This plugin supports polyhedrons and polygon soups
-  return qobject_cast<const Scene_nef_polyhedron_item*>(item);
-}
-
-bool Polyhedron_demo_io_nef_plugin::save(const Scene_item* item, QFileInfo fileinfo)
-{
-  // This plugin supports polyhedrons and polygon soups
-  const Scene_nef_polyhedron_item* nef_item = 
-    qobject_cast<const Scene_nef_polyhedron_item*>(item);
-
-  if(!nef_item)
-    return false;
-
-  std::ofstream out(fileinfo.filePath().toUtf8());
-
-  return (nef_item && nef_item->save(out));
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_io_nef_plugin, Polyhedron_demo_io_nef_plugin)
-#include "Polyhedron_demo_io_nef_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h
deleted file mode 100644
index 9fe656e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
-#define POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
-
-#include <QFileInfo>
-#include <QStringList>
-
-class Scene_item;
-
-class Polyhedron_demo_io_plugin_interface 
-{
-public:
-  virtual QString name() const = 0;
-  virtual ~Polyhedron_demo_io_plugin_interface() {}
-  
-  virtual QString nameFilters() const = 0;
-
-  virtual bool canLoad() const = 0;
-  virtual Scene_item* load(QFileInfo fileinfo) = 0;
-
-  virtual bool canSave(const Scene_item*) = 0;
-  virtual bool save(const Scene_item*, QFileInfo fileinfo) = 0;
-};
-
-Q_DECLARE_INTERFACE(Polyhedron_demo_io_plugin_interface,
-                    "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
-
-#endif // POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp
deleted file mode 100644
index 24dbe6b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_type.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polylines_item.h"
-
-#include <limits>
-
-#include "Scene.h"
-#include <QApplication>
-
-#include <CGAL/Monge_via_jet_fitting.h>
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-class Polyhedron_demo_jet_fitting_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionEstimateCurvature";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionEstimateCurvature_triggered();
-}; // end Polyhedron_demo_jet_fitting_plugin
-
-void Polyhedron_demo_jet_fitting_plugin::on_actionEstimateCurvature_triggered()
-{
-  // get active polyhedron
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  Scene_polyhedron_item* poly_item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-  if(!poly_item)
-    return;
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  Polyhedron* pMesh = poly_item->polyhedron();
-
-  // types
-  typedef CGAL::Monge_via_jet_fitting<Kernel> Fitting;
-  typedef Fitting::Monge_form Monge_form;
-
-  typedef Kernel::Point_3 Point;
-
-  Scene_polylines_item* max_curv = new Scene_polylines_item;
-  max_curv->setColor(Qt::red);
-  max_curv->setName(tr("%1 (max curvatures)").arg(poly_item->name()));
-    
-  Scene_polylines_item* min_curv = new Scene_polylines_item;
-  min_curv->setColor(Qt::green);
-  min_curv->setName(tr("%1 (min curvatures)").arg(poly_item->name()));
-
-  Polyhedron::Vertex_iterator v;
-  for(v = pMesh->vertices_begin();
-      v != pMesh->vertices_end();
-      v++)
-  {
-    std::vector<Point> points;
-
-    // pick central point
-    const Point& central_point = v->point();
-    points.push_back(central_point);
-
-    // compute min edge len around central vertex
-    // to scale the ribbons used to display the directions
-
-    typedef Kernel::FT FT;
-
-    FT min_edge_len = std::numeric_limits<FT>::infinity();
-    Polyhedron::Halfedge_around_vertex_circulator he = v->vertex_begin();
-    Polyhedron::Halfedge_around_vertex_circulator end = he;
-    CGAL_For_all(he,end)
-    {
-      const Point& p = he->opposite()->vertex()->point();
-      points.push_back(p);
-      FT edge_len = std::sqrt(CGAL::squared_distance(central_point,p));
-      min_edge_len = edge_len < min_edge_len ? edge_len : min_edge_len; // avoids #undef min
-    }
-
-    if(points.size() > 5)
-    {
-      // estimate curvature by fitting
-      Fitting monge_fit;
-      const int dim_monge = 2;
-      const int dim_fitting = 2;
-      Monge_form monge_form = monge_fit(points.begin(),points.end(),dim_fitting,dim_monge);
-
-      // make monge form comply with vertex normal (to get correct
-      // orientation)
-      typedef Kernel::Vector_3 Vector;
-      Vector n = compute_vertex_normal<Polyhedron::Vertex,Kernel>(*v);
-      monge_form.comply_wrt_given_normal(n);
-
-      Vector umin = min_edge_len * monge_form.minimal_principal_direction();
-      Vector umax = min_edge_len * monge_form.maximal_principal_direction();
-
-      Scene_polylines_item::Polyline max_segment(2), min_segment(2);
-
-      const double du = 0.2;
-
-      max_segment[0] = central_point + du * umax;
-      max_segment[1] = central_point - du * umax;
-      min_segment[0] = central_point + du * umin;
-      min_segment[1] = central_point - du * umin;
-
-      max_curv->polylines.push_back(max_segment);
-      min_curv->polylines.push_back(min_segment);
-    }
-  }
-
-  scene->addItem(max_curv);
-  scene->addItem(min_curv);
-  
-  // default cursor
-  QApplication::restoreOverrideCursor();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_jet_fitting_plugin, Polyhedron_demo_jet_fitting_plugin)
-
-#include "Polyhedron_demo_jet_fitting_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp
deleted file mode 100644
index ec4d38c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-#include <QApplication>
-#include <QMessageBox>
-#include <QMainWindow>
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polylines_item.h"
-#include "Messages_interface.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/Polyhedron_copy_3.h>
-#include <CGAL/internal/corefinement/Polyhedron_subset_extraction.h>
-
-#include <boost/foreach.hpp>
-#include <boost/function_output_iterator.hpp>
-
-class Polyhedron_demo_join_and_split_polyhedra_plugin:
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionJoinPolyhedra, *actionSplitPolyhedra;
-  Messages_interface* msg_interface;
-public:
-  QList<QAction*> actions() const { return QList<QAction*>() << actionJoinPolyhedra << actionSplitPolyhedra; }
-  using Polyhedron_demo_plugin_helper::init;
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m)
-  {
-    msg_interface = m;
-    actionJoinPolyhedra= new QAction(tr("Join selected polyhedra"), mainWindow);
-    actionJoinPolyhedra->setObjectName("actionJoinPolyhedra");
-    actionSplitPolyhedra= new QAction(tr("Split selected polyhedra"), mainWindow);
-    actionSplitPolyhedra->setObjectName("actionSplitPolyhedra");
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  bool applicable(QAction*) const {
-    Q_FOREACH(int index, scene->selectionIndices())
-    {
-      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(index)) )
-        return true;
-    }
-    return false;
-  }
-
-public slots:
-  void on_actionJoinPolyhedra_triggered();
-  void on_actionSplitPolyhedra_triggered();
-
-}; // end Polyhedron_demo_polyhedron_stitching_plugin
-
-void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionJoinPolyhedra_triggered()
-{
-  Scene_interface::Item_id mainSelectionIndex = -1;
-  Scene_polyhedron_item* mainSelectionItem = NULL;
-
-
-  QList<int> indices_to_remove;
-  Q_FOREACH(int index, scene->selectionIndices()) {
-    if (mainSelectionIndex==-1){
-      mainSelectionItem =
-        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-      if(mainSelectionItem!=NULL) mainSelectionIndex=index;
-      continue;
-    }
-
-    Scene_polyhedron_item* item =
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(item)
-    {
-      indices_to_remove.push_front(index);
-      CGAL::Polyhedron_copy_3<Polyhedron, Polyhedron::HalfedgeDS, false>
-        modifier( *(item->polyhedron()) );
-      mainSelectionItem->polyhedron()->delegate(modifier);
-    }
-  }
-
-  scene->itemChanged(mainSelectionIndex);
-
-  //remove the other items
-  Q_FOREACH(int index, indices_to_remove)
-  {
-    scene->erase(index);
-  }
-}
-
-struct Polyhedron_appender{
-  Polyhedron_appender(std::list<Polyhedron*>& new_polyhedra):
-    m_new_polyhedra(new_polyhedra) {}
-  void operator()(const Polyhedron& p){
-    m_new_polyhedra.push_back( new Polyhedron(p) );
-  }
-  std::list<Polyhedron*>& m_new_polyhedra;
-};
-
-void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionSplitPolyhedra_triggered()
-{
-  Q_FOREACH(int index, scene->selectionIndices()) {
-    Scene_polyhedron_item* item =
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(item)
-    {
-      std::list<Polyhedron*> new_polyhedra;
-      CGAL::internal::extract_connected_components(
-        *item->polyhedron(),
-        boost::make_function_output_iterator(Polyhedron_appender(new_polyhedra))
-      );
-
-      if (new_polyhedra.size()==1)
-      {
-        delete new_polyhedra.front();
-        msg_interface->information( tr("%1 has only one connected component").arg(item->name()) );
-        continue;
-      }
-
-      int cc=0;
-      BOOST_FOREACH(Polyhedron* polyhedron_ptr, new_polyhedra)
-      {
-        Scene_polyhedron_item* new_item=new Scene_polyhedron_item(polyhedron_ptr);
-        new_item->setName(tr("%1 - CC %2").arg(item->name()).arg(cc));
-        ++cc;
-        scene->addItem(new_item);
-      }
-      item->setVisible(false);
-    }
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_join_and_split_polyhedra_plugin, Polyhedron_demo_join_and_split_polyhedra_plugin)
-
-#include "Polyhedron_demo_join_and_split_polyhedra_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp
deleted file mode 100644
index e5bf835..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#include <QApplication>
-#include <QMainWindow>
-#include <QMessageBox>
-#include <QAction>
-#include <QStringList>
-
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/Polyhedron_kernel.h>
-#include <CGAL/Exact_integer.h>
-#include <CGAL/convex_hull_3.h>
-
-#include <CGAL/Dualizer.h>
-#include <CGAL/translate.h>
-
-#include "Kernel_type.h"
-typedef Kernel::Triangle_3 Triangle;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-typedef Kernel::Plane_3 Plane;
-typedef Kernel::FT FT;
-
-class Polyhedron_demo_kernel_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionKernel";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionKernel_triggered();
-
-}; // end Polyhedron_demo_kernel_plugin
-
-
-void Polyhedron_demo_kernel_plugin::on_actionKernel_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    typedef CGAL::Exact_integer ET; // choose exact integral type
-    typedef Polyhedron_kernel<Kernel,ET> Polyhedron_kernel;
-
-    // get triangles from polyhedron
-    std::list<Triangle> triangles;
-    get_triangles(*pMesh,std::back_inserter(triangles));
-
-    // solve LP 
-    std::cout << "Solve linear program...";
-    Polyhedron_kernel kernel;
-    if(!kernel.solve(triangles.begin(),triangles.end()))
-    {
-      std::cout << "done (empty kernel)" << std::endl;
-      QMessageBox::information(mw, tr("Empty kernel"),
-                               tr("The kernel of the polyhedron \"%1\" is empty.").
-                               arg(item->name()));
-      QApplication::restoreOverrideCursor();
-      return;
-    }
-    std::cout << "done" << std::endl;
-
-    // add kernel as new polyhedron
-    Polyhedron *pKernel = new Polyhedron;
-
-    // get inside point
-    Point inside_point = kernel.inside_point();
-    Vector translate = inside_point - CGAL::ORIGIN;
-
-    // compute dual of translated polyhedron w.r.t. inside point.
-    std::cout << "Compute dual of translated polyhedron...";
-    std::list<Point> dual_points;
-    std::list<Triangle>::iterator it;
-    for(it = triangles.begin();
-      it != triangles.end();
-      it++)
-    {
-      const Triangle& triangle = *it;
-      const Point p0 = triangle[0] - translate;
-      const Point p1 = triangle[1] - translate;
-      const Point p2 = triangle[2] - translate;
-      Plane plane(p0,p1,p2); 
-      Vector normal = plane.orthogonal_vector();
-      normal = normal / std::sqrt(normal*normal);
-      // compute distance to origin (do not use plane.d())
-      FT distance_to_origin = std::sqrt(CGAL::squared_distance(Point(CGAL::ORIGIN),plane));
-      Point dual_point = CGAL::ORIGIN + normal / distance_to_origin;
-      dual_points.push_back(dual_point);
-    }
-    std::cout << "ok" << std::endl;
-
-    // compute convex hull in dual space
-    std::cout << "convex hull in dual space...";
-    Polyhedron convex_hull;
-    CGAL::convex_hull_3(dual_points.begin(),dual_points.end(),convex_hull);
-    std::cout << "ok" << std::endl;
-
-    // dualize and translate back to get final kernel
-    Dualizer<Polyhedron,Kernel> dualizer;
-    dualizer.run(convex_hull,*pKernel);
-    ::translate<Polyhedron,Kernel>(*pKernel,translate);
-    pKernel->inside_out();
-
-    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pKernel);
-    new_item->setName(tr("%1 (kernel)").arg(item->name()));
-    new_item->setColor(Qt::magenta);
-    new_item->setRenderingMode(item->renderingMode());
-    scene->addItem(new_item);
-
-    item->setRenderingMode(Wireframe);
-    scene->itemChanged(item);
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_kernel_plugin, Polyhedron_demo_kernel_plugin)
-
-#include "Polyhedron_demo_kernel_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp
deleted file mode 100644
index fb36761..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-#include "config.h"
-#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include "Scene_polyhedron_item.h"
-#include <QInputDialog>
-#include <QFileDialog>
-#include <fstream>
-#include "ui_Meshing_dialog.h"
-
-// declare the CGAL function
-Scene_item* cgal_code_mesh_3(const Polyhedron*,
-                             QString filename,
-                             const double angle,
-                             const double sizing,
-                             const double approx,
-                             const double tets_sizing,
-                             const double tet_shape,
-                             const bool protect_features,
-                             Scene_interface* scene);
-
-class Polyhedron_demo_mesh_3_plugin : 
-  public QObject,
-  protected Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionMesh_3 = new QAction("Create a tetrahedral mesh", mw);
-    if(actionMesh_3) {
-      connect(actionMesh_3, SIGNAL(triggered()),
-              this, SLOT(mesh_3()));
-    }
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionMesh_3;
-  }
-
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-public slots:
-  void mesh_3();
-
-private:
-  QAction* actionMesh_3;
-}; // end class Polyhedron_demo_mesh_3_plugin
-
-double
-get_approximate(double d, int precision, int& decimals)
-{
-  if ( d<0 ) { return 0; }
-
-  double i = std::pow(10.,precision-1);
-
-  decimals = 0;
-  while ( d > i*10 ) { d = d/10.; ++decimals; }
-  while ( d < i ) { d = d*10.; --decimals; }
-
-  return std::floor(d)*std::pow(10.,decimals);
-}
-
-void Polyhedron_demo_mesh_3_plugin::mesh_3()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(!item) return;
-
-  Polyhedron* pMesh = item->polyhedron();
-
-  if(!pMesh) return;
-
-  // -----------------------------------
-  // Create Mesh dialog
-  // -----------------------------------
-  QDialog dialog(mw);
-  Ui::Meshing_dialog ui;
-  ui.setupUi(&dialog);
-  connect(ui.buttonBox, SIGNAL(accepted()),
-          &dialog, SLOT(accept()));
-  connect(ui.buttonBox, SIGNAL(rejected()),
-          &dialog, SLOT(reject()));
-
-  // Connect checkboxes to spinboxes
-  connect(ui.noApprox, SIGNAL(toggled(bool)),
-          ui.approx,   SLOT(setEnabled(bool)));
-
-  connect(ui.noFacetSizing, SIGNAL(toggled(bool)),
-          ui.facetSizing,   SLOT(setEnabled(bool)));
-
-  connect(ui.noAngle,    SIGNAL(toggled(bool)),
-          ui.facetAngle, SLOT(setEnabled(bool)));
-
-  connect(ui.noTetSizing, SIGNAL(toggled(bool)),
-          ui.tetSizing,   SLOT(setEnabled(bool)));
-
-  connect(ui.noTetShape, SIGNAL(toggled(bool)),
-          ui.tetShape,   SLOT(setEnabled(bool)));
-
-  // Set default parameters
-  Scene_interface::Bbox bbox = item->bbox();
-  ui.objectName->setText(item->name());
-  ui.objectNameSize->setText(tr("Object bbox size (w,h,d):  <b>%1</b>,  <b>%2</b>,  <b>%3</b>")
-                             .arg(bbox.width(),0,'g',3)
-                             .arg(bbox.height(),0,'g',3)
-                             .arg(bbox.depth(),0,'g',3) );
-
-  double diag = bbox.diagonal_length();
-  int decimals = 0;
-  double sizing_default = get_approximate(diag * 0.05, 2, decimals);
-  ui.facetSizing->setDecimals(-decimals+2);
-  ui.facetSizing->setSingleStep(std::pow(10.,decimals));
-  ui.facetSizing->setRange(diag * 10e-6, // min
-                           diag); // max
-  ui.facetSizing->setValue(sizing_default); // default value
-
-  ui.tetSizing->setDecimals(-decimals+2);
-  ui.tetSizing->setSingleStep(std::pow(10.,decimals));
-  ui.tetSizing->setRange(diag * 10e-6, // min
-                         diag); // max
-  ui.tetSizing->setValue(sizing_default); // default value
-
-  double approx_default = get_approximate(diag * 0.005, 2, decimals);
-  ui.approx->setDecimals(-decimals+2);
-  ui.approx->setSingleStep(std::pow(10.,decimals));
-  ui.approx->setRange(diag * 10e-7, // min
-                      diag); // max
-  ui.approx->setValue(approx_default);
-
-  // -----------------------------------
-  // Get values
-  // -----------------------------------
-  int i = dialog.exec();
-  if( i == QDialog::Rejected ) { return; }
-
-  // 0 means parameter is not considered
-  const double angle = !ui.noAngle->isChecked() ? 0 : ui.facetAngle->value();
-  const double approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
-  const double facet_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
-  const double radius_edge = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
-  const double tet_sizing = !ui.noTetSizing->isChecked() ? 0  : ui.tetSizing->value();
-  const bool protect_features = ui.protect->isChecked();
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  Scene_item* result_item = cgal_code_mesh_3(pMesh,
-                                             item->name(),
-                                             angle,
-                                             facet_sizing,
-                                             approx,
-                                             tet_sizing,
-                                             radius_edge,
-                                             protect_features,
-                                             scene);
-  if(result_item) {
-    result_item->setName(tr("%1 3d mesh (%2 %3 %4 %5)")
-                         .arg(item->name())
-                         .arg(angle)
-                         .arg(facet_sizing)
-                         .arg(tet_sizing)
-                         .arg(approx));
-    result_item->setColor(Qt::magenta);
-    result_item->setRenderingMode(item->renderingMode());
-    item->setVisible(false);
-    scene->itemChanged(index);
-    scene->addItem(result_item);
-  }
-  QApplication::restoreOverrideCursor();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_3_plugin, Polyhedron_demo_mesh_3_plugin)
-
-#include "Polyhedron_demo_mesh_3_plugin.moc"
-
-#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp
deleted file mode 100644
index 30d2edb..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-#include <CGAL/AABB_intersections.h>
-#include <CGAL/AABB_tree.h>
-
-#include "Polyhedron_type.h"
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
-#include <CGAL/make_mesh_3.h>
-
-#include <Scene_polyhedron_item.h>
-#include <Scene_polygon_soup_item.h>
-#include <fstream>
-#include <sstream>
-
-#include <CGAL/Timer.h>
-
-#include <QMenu>
-
-typedef CGAL::Polyhedral_mesh_domain_with_features_3<Kernel,
-                                                     Polyhedron> Mesh_domain;
-
-// Triangulation
-typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-
-// 3D complex
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Mesh Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-typedef Mesh_criteria::Edge_criteria Edge_criteria;
-typedef Mesh_criteria::Facet_criteria Facet_criteria;
-typedef Mesh_criteria::Cell_criteria Cell_criteria;
-
-typedef Tr::Point Point_3;
-
-#include "Scene_item.h"
-#include <QtCore/qglobal.h>
-#include <CGAL/gl.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-namespace {
-  void CGALglcolor(QColor c)
-  {
-    ::glColor4d(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-  }
-}
-
-class Q_DECL_EXPORT Scene_c3t3_item : public Scene_item
-{
-  Q_OBJECT
-public:
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
-  Scene_c3t3_item(const C3t3& c3t3)
-    : c3t3_(c3t3), frame(new ManipulatedFrame()), last_known_scene(NULL)
-  {}
-
-  ~Scene_c3t3_item()
-  {
-    delete frame;
-  }
-
-  const C3t3& c3t3() const {
-    return c3t3_;
-  }
-
-  bool manipulatable() const {
-    return true;
-  }
-  ManipulatedFrame* manipulatedFrame() {
-    return frame;
-  }
-
-  void setPosition(float x, float y, float z) {
-    frame->setPosition(x, y, z);
-  }
-
-  void setNormal(float x, float y, float z) {
-    frame->setOrientation(x, y, z, 0.f);
-  }
-
-  Kernel::Plane_3 plane() const {
-    const qglviewer::Vec& pos = frame->position();
-    const qglviewer::Vec& n =
-      frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-    return Kernel::Plane_3(n[0], n[1],  n[2], - n * pos);
-  }
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const {
-    return c3t3().triangulation().number_of_vertices() == 0;
-  }
-
-  Bbox bbox() const {
-    if(isEmpty())
-      return Bbox();
-    else {
-      CGAL::Bbox_3 result = c3t3().triangulation().finite_vertices_begin()->point().bbox();
-      for(Tr::Finite_vertices_iterator
-            vit = ++c3t3().triangulation().finite_vertices_begin(),
-            end = c3t3().triangulation().finite_vertices_end();
-          vit != end; ++vit)
-      {
-        result = result + vit->point().bbox();
-      }
-      return Bbox(result.xmin(), result.ymin(), result.zmin(),
-                  result.xmax(), result.ymax(), result.zmax());
-    }
-  }
-
-  Scene_c3t3_item* clone() const {
-    return 0;
-  }
-
-  QString toolTip() const {
-    int number_of_tets = 0;
-    for(Tr::Finite_cells_iterator
-          cit = c3t3().triangulation().finite_cells_begin(),
-          end = c3t3().triangulation().finite_cells_end();
-        cit != end; ++cit)
-    {
-      if( c3t3().is_in_complex(cit) )
-        ++number_of_tets;
-    }
-    return tr("<p><b>3D complex in a 3D triangulation</b></p>"
-              "<p>Number of vertices: %1<br />"
-              "Number of surface facets: %2<br />"
-              "Number of volume tetrahedra: %3</p>")
-      .arg(c3t3().triangulation().number_of_vertices())
-      .arg(c3t3().number_of_facets())
-      .arg(number_of_tets);
-  }
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); // CHECK THIS!
-  }
-
-  void draw() const {
-    ::glPushMatrix();
-    ::glMultMatrixd(frame->matrix());
-    QGLViewer::drawGrid((float)complex_diag());
-    ::glPopMatrix();
-
-    if(isEmpty())
-      return;
-
-    GLboolean two_side;
-    ::glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &two_side);
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-
-    const Kernel::Plane_3& plane = this->plane();
-    GLdouble clip_plane[4];
-    clip_plane[0] = -plane.a();
-    clip_plane[1] = -plane.b();
-    clip_plane[2] = -plane.c();
-    clip_plane[3] = -plane.d();
-
-    ::glClipPlane(GL_CLIP_PLANE0, clip_plane);
-    ::glEnable(GL_CLIP_PLANE0);
-    ::glBegin(GL_TRIANGLES);
-    for(C3t3::Facet_iterator
-          fit = c3t3().facets_begin(),
-          end = c3t3().facets_end();
-        fit != end; ++fit)
-    {
-      const Tr::Cell_handle& cell = fit->first;
-      const int& index = fit->second;
-      const Kernel::Point_3& pa = cell->vertex((index+1)&3)->point();
-      const Kernel::Point_3& pb = cell->vertex((index+2)&3)->point();
-      const Kernel::Point_3& pc = cell->vertex((index+3)&3)->point();
-      typedef Kernel::Oriented_side Side;
-      using CGAL::ON_ORIENTED_BOUNDARY;
-      const Side sa = plane.oriented_side(pa);
-      const Side sb = plane.oriented_side(pb);
-      const Side sc = plane.oriented_side(pc);
-      if( sa != ON_ORIENTED_BOUNDARY &&
-          sb != ON_ORIENTED_BOUNDARY &&
-          sc != ON_ORIENTED_BOUNDARY &&
-          sb == sa && sc == sa )
-      {
-        draw_triangle(pa, pb, pc);
-      }
-    }
-    ::glEnd();
-    ::glDisable(GL_CLIP_PLANE0);
-
-    ::glBegin(GL_TRIANGLES);
-// workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define darker dark
-#endif
-    CGALglcolor(this->color().darker(150));
-#undef darker
-    for(Tr::Finite_cells_iterator
-          cit = c3t3().triangulation().finite_cells_begin(),
-          end = c3t3().triangulation().finite_cells_end();
-        cit != end; ++cit)
-    {
-      if(! c3t3().is_in_complex(cit) )
-        continue;
-
-        const Kernel::Point_3& pa = cit->vertex(0)->point();
-        const Kernel::Point_3& pb = cit->vertex(1)->point();
-        const Kernel::Point_3& pc = cit->vertex(2)->point();
-        const Kernel::Point_3& pd = cit->vertex(3)->point();
-        typedef Kernel::Oriented_side Side;
-        using CGAL::ON_ORIENTED_BOUNDARY;
-        const Side sa = plane.oriented_side(pa);
-        const Side sb = plane.oriented_side(pb);
-        const Side sc = plane.oriented_side(pc);
-        const Side sd = plane.oriented_side(pd);
-
-        if( sa == ON_ORIENTED_BOUNDARY ||
-            sb == ON_ORIENTED_BOUNDARY ||
-            sc == ON_ORIENTED_BOUNDARY ||
-            sd == ON_ORIENTED_BOUNDARY ||
-            sb != sa || sc != sa || sd != sa)
-        {
-          draw_triangle(pa, pb, pc);
-          draw_triangle(pa, pb, pd);
-          draw_triangle(pa, pc, pd);
-          draw_triangle(pb, pc, pd);
-        }
-
-//       for(int i = 0; i < 4; ++i) {
-//         if(c3t3().is_in_complex(cit, i)) continue;
-//         const Point_3& pa = cit->vertex((i+1)&3)->point();
-//         const Point_3& pb = cit->vertex((i+2)&3)->point();
-//         const Point_3& pc= cit->vertex((i+3)&3)->point();
-//         typedef Kernel::Oriented_side Side;
-//         using CGAL::ON_ORIENTED_BOUNDARY;
-//         const Side sa = plane.oriented_side(pa);
-//         const Side sb = plane.oriented_side(pb);
-//         const Side sc = plane.oriented_side(pc);
-
-//         if( sa == ON_ORIENTED_BOUNDARY ||
-//             sb == ON_ORIENTED_BOUNDARY ||
-//             sc == ON_ORIENTED_BOUNDARY ||
-//             sb != sa || sc != sa )
-//         {
-//           draw_triangle(pa, pb, pc);
-//         }
-//       }
-    }
-    ::glEnd();
-    if(!two_side)
-      ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-  };
-
-private:
-  static void draw_triangle(const Kernel::Point_3& pa,
-                            const Kernel::Point_3& pb,
-                            const Kernel::Point_3& pc) {
-    Kernel::Vector_3 n = cross_product(pb - pa, pc -pa);
-    n = n / CGAL::sqrt(n*n);
-
-    ::glNormal3d(n.x(),n.y(),n.z());
-
-    ::glVertex3d(pa.x(),pa.y(),pa.z());
-    ::glVertex3d(pb.x(),pb.y(),pb.z());
-    ::glVertex3d(pc.x(),pc.y(),pc.z());
-  }
-
-  double complex_diag() const {
-    const Bbox& bbox = this->bbox();
-    const double& xdelta = bbox.xmax-bbox.xmin;
-    const double& ydelta = bbox.ymax-bbox.ymin;
-    const double& zdelta = bbox.zmax-bbox.zmin;
-    const double diag = std::sqrt(xdelta*xdelta +
-                                  ydelta*ydelta +
-                                  zdelta*zdelta);
-    return diag * 0.7;
-  }
-
-public slots:
-  void export_facets_in_complex()
-  {
-    std::stringstream off_sstream;
-    c3t3().output_facets_in_complex_to_off(off_sstream);
-    std::string backup = off_sstream.str();
-    // Try to read .off in a polyhedron
-    Scene_polyhedron_item* item = new Scene_polyhedron_item();
-    if(!item->load(off_sstream))
-    {
-      delete item;
-      off_sstream.clear();
-      off_sstream.str(backup);
-
-      // Try to read .off in a polygon soup
-      Scene_polygon_soup_item* soup_item = new Scene_polygon_soup_item;
-
-      if(!soup_item->load(off_sstream)) {
-        delete soup_item;
-        return;
-      }
-
-      soup_item->setName(QString("%1_%2").arg(this->name()).arg("facets"));
-      last_known_scene->addItem(soup_item);
-    }
-    else{
-      item->setName(QString("%1_%2").arg(this->name()).arg("facets"));
-      last_known_scene->addItem(item);
-    }
-  }
-
-public:
-
-  QMenu* contextMenu()
-  {
-    const char* prop_name = "Menu modified by Scene_c3t3_item.";
-
-    QMenu* menu = Scene_item::contextMenu();
-
-    // Use dynamic properties:
-    // http://doc.trolltech.com/lastest/qobject.html#property
-    bool menuChanged = menu->property(prop_name).toBool();
-
-    if(!menuChanged) {
-      QAction* actionExportFacetsInComplex =
-        menu->addAction(tr("Export facets in complex"));
-      actionExportFacetsInComplex->setObjectName("actionExportFacetsInComplex");
-      connect(actionExportFacetsInComplex,
-              SIGNAL(triggered()),this,
-              SLOT(export_facets_in_complex()));
-      menu->setProperty(prop_name, true);
-    }
-    return menu;
-  }
-
-  void set_scene(Scene_interface* scene){ last_known_scene=scene; }
-
-private:
-  C3t3 c3t3_;
-  qglviewer::ManipulatedFrame* frame;
-  Scene_interface* last_known_scene;
-};
-
-Scene_item* cgal_code_mesh_3(const Polyhedron* pMesh,
-                             QString filename,
-                             const double angle,
-                             const double facet_sizing,
-                             const double approx,
-                             const double tet_sizing,
-                             const double tet_shape,
-                             const bool protect_features,
-                             Scene_interface* scene)
-{
-  if(!pMesh) return 0;
-
-  // remesh
-
-  // Set mesh criteria
-  Edge_criteria edge_criteria(facet_sizing);
-  Facet_criteria facet_criteria(angle, facet_sizing, approx); // angle, size, approximation
-  Cell_criteria cell_criteria(tet_shape, tet_sizing); // radius-edge ratio, size
-  Mesh_criteria criteria(edge_criteria, facet_criteria, cell_criteria);
-
-  CGAL::Timer timer;
-  timer.start();
-  std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
-  std::cerr << "  angle: " << angle << std::endl
-            << "  facets size bound: " << facet_sizing << std::endl
-            << "  approximation bound: " << approx << std::endl
-            << "  tetrahedra size bound: " << tet_sizing << std::endl;
-  std::cerr << "Build AABB tree...";
-  // Create domain
-  Mesh_domain domain(*pMesh);
-  if(protect_features) {
-    domain.detect_features();
-  }
-  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
-
-  // Meshing
-  std::cerr << "Mesh...";
-  CGAL::parameters::internal::Features_options features =
-    protect_features ?
-    CGAL::parameters::features(domain) :
-    CGAL::parameters::no_features();
-
-  Scene_c3t3_item* new_item = 
-    new Scene_c3t3_item(CGAL::make_mesh_3<C3t3>(domain, criteria, features));
-  new_item->set_scene(scene);
-  std::cerr << "done (" << timer.time() << " ms, " << new_item->c3t3().triangulation().number_of_vertices() << " vertices)" << std::endl;
-
-  if(new_item->c3t3().triangulation().number_of_vertices() > 0)
-  {
-    std::ofstream medit_out("out.mesh");
-    new_item->c3t3().output_to_medit(medit_out);
-
-    const Scene_item::Bbox& bbox = new_item->bbox();
-    new_item->setPosition((float)(bbox.xmin + bbox.xmax)/2.f,
-                          (float)(bbox.ymin + bbox.ymax)/2.f,
-                          (float)(bbox.zmin + bbox.zmax)/2.f);
-    return new_item;
-  }
-  else {
-    delete new_item;
-    return 0;
-  }
-}
-
-#include "Scene_c3t3_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp
deleted file mode 100644
index 2a03de8..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp
+++ /dev/null
@@ -1,353 +0,0 @@
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include "ui_Mesh_segmentation_widget.h"
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-#include "Scene.h"
-#include "Color_map.h"
-
-#include <CGAL/mesh_segmentation.h>
-#include <QApplication>
-#include <QMainWindow>
-#include <QInputDialog>
-#include <QTime>
-#include <QAction>
-#include <QDebug>
-#include <QObject>
-#include <QDockWidget>
-//#include <QtConcurrentRun>
-#include <map>
-#include <algorithm>
-#include <vector>
-#include <CGAL/property_map.h>
-
-
-template<class PolyhedronWithId, class ValueType>
-struct Polyhedron_with_id_to_vector_property_map
-    : public boost::put_get_helper<ValueType&,
-             Polyhedron_with_id_to_vector_property_map<PolyhedronWithId, ValueType> >
-{
-public:
-    typedef typename PolyhedronWithId::Facet_const_handle key_type;
-    typedef ValueType value_type;
-    typedef value_type& reference;
-    typedef boost::lvalue_property_map_tag category;
-
-    Polyhedron_with_id_to_vector_property_map() : internal_vector(NULL) { }
-    Polyhedron_with_id_to_vector_property_map(std::vector<ValueType>* internal_vector)
-         : internal_vector(internal_vector) { }
-        
-    reference operator[](key_type key) const { return (*internal_vector)[key->id()]; }
-private:
-    std::vector<ValueType>* internal_vector;
-};
-    
-class Polyhedron_demo_mesh_segmentation_plugin : 
-    public QObject,
-    public Polyhedron_demo_plugin_helper
-{
-    Q_OBJECT
-        Q_INTERFACES(Polyhedron_demo_plugin_interface)
-private:
-    typedef std::map<Scene_polyhedron_item*, std::vector<double> > Item_sdf_map;
-public:
-
-    QList<QAction*> actions() const {
-        return QList<QAction*>() << actionSegmentation;
-    }
-
-    bool applicable(QAction*) const {
-      return 
-        qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-    }    
-    
-    void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-        this->scene = scene_interface;
-        this->mw = mainWindow;
-        actionSegmentation = new QAction("Mesh Segmentation", mw);
-        connect(actionSegmentation, SIGNAL(triggered()),this, SLOT(on_actionSegmentation_triggered()));
-
-        // adding slot for itemAboutToBeDestroyed signal, aim is removing item from item-functor map.
-        
-        if( Scene* scene = dynamic_cast<Scene*>(scene_interface) ) {
-            connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), this, SLOT(itemAboutToBeDestroyed(Scene_item*)));
-        }
-        
-        init_color_map_sdf();
-        init_color_map_segmentation();
-
-        dock_widget = new QDockWidget("Mesh segmentation parameters", mw);
-        dock_widget->setVisible(false); // do not show at the beginning
-        ui_widget.setupUi(dock_widget);
-        mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
-    
-        connect(ui_widget.Partition_button,  SIGNAL(clicked()), this, SLOT(on_Partition_button_clicked()));   
-        connect(ui_widget.SDF_button,  SIGNAL(clicked()), this, SLOT(on_SDF_button_clicked()));   
-    }
-    
-    template<class SDFPropertyMap>
-    void colorize_sdf(Scene_polyhedron_item* item, SDFPropertyMap sdf_values, std::vector<QColor>& color_vector);
-    template<class SegmentPropertyMap> 
-    void colorize_segmentation(Scene_polyhedron_item* item, SegmentPropertyMap segment_ids, std::vector<QColor>& color_vector);
-    void check_and_set_ids(Polyhedron* polyhedron);
-    void init_color_map_sdf();
-    void init_color_map_segmentation();
-    
-    public slots:
-        void on_actionSegmentation_triggered();
-        void on_Partition_button_clicked();
-        void on_SDF_button_clicked();
-        void itemAboutToBeDestroyed(Scene_item*);
-private:
-    QAction*                      actionSegmentation;
-    QDockWidget*                  dock_widget;
-    Ui::Mesh_segmentation         ui_widget;
-    
-    std::vector<QColor>  color_map_sdf;
-    std::vector<QColor>  color_map_segmentation;
-    Item_sdf_map         item_sdf_map;
-};
-
-void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_sdf()
-{
-    color_map_sdf = std::vector<QColor>(256);
-    int r = 0, g = 0, b = 255;
-    for(int i = 0; i <= 255; ++i)
-    {
-        if(i > 128 && i <= 192) { r = static_cast<int>( ((i - 128) / (192.0 - 128)) * 255 ); }        
-        if(i > 0 && i <= 98)    { g = static_cast<int>( ((i) / (98.0)) * 255 ); }
-        if(i > 191 && i <=255)  { g = 255 - static_cast<int>( ((i - 191) / (255.0 - 191)) * 255 ); }
-        if(i > 64 && i <= 127)  { b = 255 - static_cast<int>( ((i - 64) / (127.0 - 64)) * 255 ); }
-        color_map_sdf[i] = QColor(r, g, b);        
-    }
-}
-
-void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_segmentation()
-{
-    /*
-    color_map_segmentation.push_back(QColor("#fce94f"));
-    color_map_segmentation.push_back(QColor("#edd400"));
-    color_map_segmentation.push_back(QColor("#c4a000"));
-    color_map_segmentation.push_back(QColor("#fcaf3e"));
-    color_map_segmentation.push_back(QColor("#f57900"));
-    color_map_segmentation.push_back(QColor("#ce5c00")); 
-    color_map_segmentation.push_back(QColor("#e9b96e"));
-    color_map_segmentation.push_back(QColor("#c17d11"));
-    color_map_segmentation.push_back(QColor("#8f5902")); 
-    color_map_segmentation.push_back(QColor("#729fcf"));
-    color_map_segmentation.push_back(QColor("#3465a4"));
-    color_map_segmentation.push_back(QColor("#204a87"));
-    color_map_segmentation.push_back(QColor("#ad7fa8"));
-    color_map_segmentation.push_back(QColor("#75507b"));
-    color_map_segmentation.push_back(QColor("#5c3566"));
-    */
-    
-    color_map_segmentation.push_back(QColor( 173, 35, 35)); 
-    color_map_segmentation.push_back(QColor( 87, 87, 87));    
-    color_map_segmentation.push_back(QColor( 42, 75, 215)); 
-    color_map_segmentation.push_back(QColor( 29, 105, 20)); 
-    color_map_segmentation.push_back(QColor( 129, 74, 25)); 
-    color_map_segmentation.push_back(QColor( 129, 38, 192)); 
-    color_map_segmentation.push_back(QColor( 160, 160, 160)); 
-    color_map_segmentation.push_back(QColor( 129, 197, 122)); 
-    color_map_segmentation.push_back(QColor( 157, 175, 255)); 
-    color_map_segmentation.push_back(QColor( 41, 208, 208)); 
-    color_map_segmentation.push_back(QColor( 255, 146, 51)); 
-    color_map_segmentation.push_back(QColor( 255, 238, 51)); 
-    color_map_segmentation.push_back(QColor( 233, 222, 187)); 
-    color_map_segmentation.push_back(QColor( 255, 205, 243)); 
-    
-}
-
-void Polyhedron_demo_mesh_segmentation_plugin::itemAboutToBeDestroyed(Scene_item* scene_item)
-{
-    if(Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene_item)) {
-      item_sdf_map.erase(item);
-    }
-}
-
-void Polyhedron_demo_mesh_segmentation_plugin::on_actionSegmentation_triggered()
-{ dock_widget->show(); }
-
-void Polyhedron_demo_mesh_segmentation_plugin::on_SDF_button_clicked()
-{
-    Scene_interface::Item_id index = scene->mainSelectionIndex();
-    Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(!item) { return; }
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    std::size_t number_of_rays = ui_widget.Number_of_rays_spin_box->value();
-    double cone_angle = (ui_widget.Cone_angle_spin_box->value()  / 180.0) * CGAL_PI;
-    bool create_new_item = ui_widget.New_item_check_box->isChecked();
-    
-    Item_sdf_map::iterator pair;
-    Scene_polyhedron_item* active_item = item;
-
-    if(create_new_item) {
-        active_item = new Scene_polyhedron_item(*item->polyhedron()); 
-        active_item->setGouraudMode();
-    }
-    
-    pair = item_sdf_map.insert(
-            std::make_pair(active_item, std::vector<double>()) ).first; 
-    
-    check_and_set_ids(pair->first->polyhedron());
-    pair->second.resize(item->polyhedron()->size_of_facets(), 0.0);
-    Polyhedron_with_id_to_vector_property_map<Polyhedron, double>  sdf_pmap(&pair->second);
-    QTime time;
-    time.start();
-    std::pair<double, double> min_max_sdf = sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays);
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-
-    std::cout << "SDF computation is completed. Min-SDF : " << min_max_sdf.first << " " "Max-SDF : " << min_max_sdf.second << std::endl;
-
-    pair->first->set_color_vector_read_only(true);
-    colorize_sdf(pair->first, sdf_pmap, pair->first->color_vector());
-       
-    pair->first->setName(tr("(SDF-%1-%2)").arg(number_of_rays).arg(ui_widget.Cone_angle_spin_box->value()));
-    
-    if(create_new_item) {
-        index = scene->addItem(pair->first);
-        item->setVisible(false);
-        scene->setSelectedItem(index);
-    }
-    else {
-      scene->itemChanged(index);
-    }
-
-    QApplication::restoreOverrideCursor();
-}
-
-void Polyhedron_demo_mesh_segmentation_plugin::on_Partition_button_clicked()
-{    
-    Scene_interface::Item_id index = scene->mainSelectionIndex();
-    Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(!item) { return; }
-    
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    std::size_t number_of_clusters = ui_widget.Number_of_clusters_spin_box->value();
-    double smoothness = ui_widget.Smoothness_spin_box->value();
-    std::size_t number_of_rays = ui_widget.Number_of_rays_spin_box->value();
-    double cone_angle = (ui_widget.Cone_angle_spin_box->value()  / 180.0) * CGAL_PI;
-    bool create_new_item = ui_widget.New_item_check_box->isChecked();
-    bool extract_segments = ui_widget.Extract_segments_check_box->isChecked();
-
-    Item_sdf_map::iterator pair;
-    if(create_new_item)
-    {
-        // create new item
-        Scene_polyhedron_item* new_item = new Scene_polyhedron_item(*item->polyhedron()); 
-        new_item->setGouraudMode(); 
-        
-        // copy SDF values of existing poly to new poly
-        Item_sdf_map::iterator it = item_sdf_map.find(item);
-        const std::vector<double>& sdf_data = it == item_sdf_map.end() ?
-                                              std::vector<double>() : it->second;
-        pair = item_sdf_map.insert(std::make_pair(new_item, sdf_data) ).first;
-    }
-    else
-    {
-        std::pair<Item_sdf_map::iterator, bool> res = 
-          item_sdf_map.insert(std::make_pair(item, std::vector<double>()) );
-        pair = res.first;
-    }
-
-    check_and_set_ids(pair->first->polyhedron());
-    QTime time;
-    time.start();
-    if(pair->second.empty()) { // SDF values are empty, calculate
-      pair->second.resize(pair->first->polyhedron()->size_of_facets(), 0.0);
-      Polyhedron_with_id_to_vector_property_map<Polyhedron, double> sdf_pmap(&pair->second);
-      sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays); 
-    }
-
-    std::vector<std::size_t> internal_segment_map(pair->first->polyhedron()->size_of_facets());
-    Polyhedron_with_id_to_vector_property_map<Polyhedron, std::size_t> segment_pmap(&internal_segment_map);
-    Polyhedron_with_id_to_vector_property_map<Polyhedron, double> sdf_pmap(&pair->second);
-
-    std::size_t nb_segments = segmentation_from_sdf_values(*(pair->first->polyhedron())
-        ,sdf_pmap, segment_pmap, number_of_clusters, smoothness, extract_segments); 
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-    std::cout << "Segmentation is completed. Number of segments : " << nb_segments << std::endl;  
-    pair->first->set_color_vector_read_only(true);  
-     
-    colorize_segmentation(pair->first, segment_pmap, pair->first->color_vector());
-    pair->first->setName(tr("(Segmentation-%1-%2)").arg(number_of_clusters).arg(smoothness));   
-
-    if(create_new_item) {
-        index = scene->addItem(pair->first);
-        item->setVisible(false);
-        scene->setSelectedItem(index);
-    }
-    else {
-      scene->itemChanged(index);
-    }
-
-    QApplication::restoreOverrideCursor();
-}
-
-void Polyhedron_demo_mesh_segmentation_plugin::check_and_set_ids(Polyhedron* polyhedron)
-{
-    Polyhedron::Facet_iterator a_facet = polyhedron->facets_begin();
-    Polyhedron::Facet_iterator another_facet = ++polyhedron->facets_begin();
-    if(a_facet->id() != another_facet->id()) { return; } // ids are OK
-    std::size_t facet_id = 0;
-    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin();
-        facet_it != polyhedron->facets_end(); ++facet_it, ++facet_id)
-    {
-        facet_it->id() = facet_id;
-    }
-}
-
-template<class SDFPropertyMap>
-void Polyhedron_demo_mesh_segmentation_plugin::colorize_sdf(
-     Scene_polyhedron_item* item,
-     SDFPropertyMap sdf_values,  
-     std::vector<QColor>& color_vector)
-{
-    Polyhedron* polyhedron = item->polyhedron();
-    color_vector.clear();
-    std::size_t patch_id = 0;
-    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin(); 
-        facet_it != polyhedron->facets_end(); ++facet_it, ++patch_id)   
-    {
-        double sdf_value = sdf_values[facet_it]; 
-        int gray_color = static_cast<int>(255 * sdf_value);
-        if(gray_color < 0 || gray_color >= 256) {
-          color_vector.push_back(QColor::fromRgb(0,0,0));
-        }
-        else {
-          color_vector.push_back(color_map_sdf[gray_color]);
-        }
-        facet_it->set_patch_id(static_cast<int>(patch_id));
-    }
-}
-
-template<class SegmentPropertyMap>
-void Polyhedron_demo_mesh_segmentation_plugin::colorize_segmentation(
-     Scene_polyhedron_item* item,
-     SegmentPropertyMap segment_ids,
-     std::vector<QColor>& color_vector)
-{
-    Polyhedron* polyhedron = item->polyhedron();
-    color_vector.clear();
-    std::size_t max_segment = 0;
-    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin(); 
-        facet_it != polyhedron->facets_end(); ++facet_it)   
-    {
-        std::size_t segment_id = segment_ids[facet_it];
-        facet_it->set_patch_id(static_cast<int>(segment_id));
-        max_segment = (std::max)(max_segment, segment_id);      
-    }
-    for(std::size_t i = 0; i <= max_segment; ++i)   
-    {
-        QColor aColor = color_map_segmentation[(max_segment - i) % color_map_segmentation.size()]; 
-        color_vector.push_back(aColor);     
-    }    
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_segmentation_plugin, Polyhedron_demo_mesh_segmentation_plugin)
-
-#include "Polyhedron_demo_mesh_segmentation_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp
deleted file mode 100644
index a5c6e67..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-
-#include <QApplication>
-#include <QMainWindow>
-#include <QInputDialog>
-#include <QTime>
-
-#include <CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h>
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-
-class Polyhedron_demo_mesh_simplification_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionSimplify";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-public slots:
-  void on_actionSimplify_triggered();
-
-}; // end Polyhedron_demo_mesh_simplification_plugin
-
-void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    // get option (#edges)
-    bool ok;
-    const int nb_edges = 
-      QInputDialog::getInteger(mw, tr("Stop condition"),
-      tr("Number of edges:"),
-      (int)(pMesh->size_of_halfedges () / 4), // default value: current #edges / 2 
-      3, // min = one triangle
-      (int)pMesh->size_of_halfedges(), // max #edges
-      1, // step for the spinbox
-      &ok);
-
-    // check user cancellation
-    if(!ok)
-      return;
-
-    // simplify
-    QTime time;
-    time.start();
-    std::cout << "Simplify...";
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    namespace SMS = CGAL::Surface_mesh_simplification;
-    SMS::Count_stop_predicate< Polyhedron > stop(nb_edges); // target #edges
-    SMS::edge_collapse( *pMesh, stop,
-      CGAL::vertex_index_map(get(CGAL::vertex_external_index,*pMesh))
-      .halfedge_index_map(get(CGAL::halfedge_external_index,*pMesh)));
-    std::cout << "ok (" << time.elapsed() << " ms, " 
-      << pMesh->size_of_halfedges() / 2 << " edges)" << std::endl;
-
-    // update scene
-    scene->itemChanged(index);
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_simplification_plugin, Polyhedron_demo_mesh_simplification_plugin)
-
-#include "Polyhedron_demo_mesh_simplification_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp
deleted file mode 100644
index d67bd49..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-#include "Scene_polyhedron_item.h"
-#include "Scene_nef_polyhedron_item.h"
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-
-#include <QString>
-#include <QAction>
-#include <QMenu>
-#include <QMainWindow>
-#include <QApplication>
-#include <QTime>
-#include <QMessageBox>
-
-class Polyhedron_demo_nef_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  QStringList actionsNames() const {
-    return QStringList() << "actionToNef" 
-                         << "actionToPoly"
-                         << "actionUnion"
-                         << "actionIntersection"
-                         << "actionDifference"
-                         << "actionConvexDecomposition"
-                         << "actionMinkowskiSum";
-  }
-
-  bool applicable(QAction*) const {
-    const int indexA = scene->selectionAindex();
-    const int indexB = scene->selectionBindex();
-
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
-      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
-      || qobject_cast<Scene_polyhedron_item*>(scene->item(indexA))
-      || qobject_cast<Scene_polyhedron_item*>(scene->item(indexB))
-      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexA))
-      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexB))
-      ;
-  }
-
-//   QList<QAction*> actions() const {
-//     QMenu* menu = new QMenu(tr("Boolean operations"), mw);
-//     QAction* action_to_nef = new QAction(tr("Convert to nef polyhedron"), mw);
-//     connect(action_to_nef, SIGNAL(triggered()),
-//             this, SLOT(convert_to_nef_polyhedron()));
-//     QAction* action_to_poly = new QAction(tr("Convert nef polyhedron to polyhedron"), mw);
-//     connect(action_to_poly, SIGNAL(triggered()),
-//             this, SLOT(convert_to_polyhedron()));
-//     menu->addAction(action_to_nef);
-//     menu->addAction(action_to_poly);
-
-//     return QList<QAction*>() << menu->menuAction();
-//   }
-
-private:
-  enum  Boolean_operation { BOOLEAN_UNION,
-                            BOOLEAN_INTERSECTION,
-                            BOOLEAN_DIFFERENCE,
-                            MINKOWSKI_SUM
-  };
-  void boolean_operation(const Boolean_operation operation);
-
-public slots:
-  void on_actionToNef_triggered();
-  void on_actionToPoly_triggered();
-  void on_actionUnion_triggered();
-  void on_actionIntersection_triggered();
-  void on_actionDifference_triggered();
-  void on_actionMinkowskiSum_triggered();
-  void on_actionConvexDecomposition_triggered();
-}; // end class Polyhedron_demo_nef_plugin
-
-void
-Polyhedron_demo_nef_plugin::on_actionToNef_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    QTime time;
-    time.start();
-    std::cerr << "Convert polyhedron to nef polyhedron...";
-
-    Scene_nef_polyhedron_item* new_nef_item = 
-      Scene_nef_polyhedron_item::from_polyhedron(item);
-
-    new_nef_item->setName(tr("%1 (to nef)").arg(item->name()));
-    new_nef_item->setRenderingMode(item->renderingMode());
-    item->setVisible(false);
-    scene->itemChanged(index);
-    scene->addItem(new_nef_item);
-    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-
-void
-Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* pitem = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  Scene_nef_polyhedron_item* item =   
-    (pitem)? Scene_nef_polyhedron_item::from_polyhedron(pitem)
-           : qobject_cast<Scene_nef_polyhedron_item*>(scene->item(index));
-  
-  if(item) {
-    QTime time;
-    time.start();
-    std::cerr << "Convex decomposition...";
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    std::list<Scene_polyhedron_item*> convex_parts;
-    item->convex_decomposition(convex_parts);
-    int i = 0;
-    for(std::list<Scene_polyhedron_item*>::iterator it = convex_parts.begin();
-        it != convex_parts.end();
-        ++it){
-      (*it)->setName(tr("part %1 of %2").arg(i++).arg(item->name()));
-      (*it)->setRenderingMode(item->renderingMode());
-      scene->addItem(*it);
-    }
-
-    if(pitem){
-      delete item;
-      pitem->setVisible(false);
-    } else {
-      item->setVisible(false);
-    }
-
-    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
-    QApplication::restoreOverrideCursor();
-  } else {
-    std::cerr << "Only a Polyhedron or a Nef Polyhedron can be decomposed in convex parts" << std::endl; 
-  }
-}
-
-void
-Polyhedron_demo_nef_plugin::on_actionToPoly_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_nef_polyhedron_item* item = 
-    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    QTime time;
-    time.start();
-    std::cerr << "Convert nef polyhedron to polyhedron...";
-
-    if(!item->is_simple())
-    {
-      QMessageBox::warning(mw,
-                           tr("Cannot convert"),
-                           tr("The nef polyhedron \"%1\" is not simple, "
-                              "and thus cannot be converted!")
-                              .arg(item->name()));
-      return;
-    }
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-    
-    Scene_polyhedron_item* new_item = item->convert_to_polyhedron();
-    new_item->setName(tr("%1 (from nef)").arg(item->name()));
-    new_item->setRenderingMode(item->renderingMode());
-    item->setVisible(false);
-    scene->itemChanged(index);
-    scene->addItem(new_item);
-    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-void Polyhedron_demo_nef_plugin::on_actionUnion_triggered()
-{
-  boolean_operation(BOOLEAN_UNION);
-}
-
-void Polyhedron_demo_nef_plugin::on_actionIntersection_triggered()
-{
-  boolean_operation(BOOLEAN_INTERSECTION);
-}
-
-void Polyhedron_demo_nef_plugin::on_actionDifference_triggered()
-{
-  boolean_operation(BOOLEAN_DIFFERENCE);
-}
-
-void
-Polyhedron_demo_nef_plugin::on_actionMinkowskiSum_triggered()
-{
-  boolean_operation(MINKOWSKI_SUM);
-}
-
-void Polyhedron_demo_nef_plugin::boolean_operation(const Boolean_operation operation)
-{
-  const int indexA = scene->selectionAindex();
-  const int indexB = scene->selectionBindex();
-
-  if(indexA < 0 || indexB < 0) return;
-  if(indexA == indexB) return;
-
-  if(qobject_cast<Scene_polyhedron_item*>(scene->item(indexA)) ||
-     qobject_cast<Scene_polyhedron_item*>(scene->item(indexB))) {
-    QMenu* menu = mw->findChild<QMenu*>("menu_Boolean_operations");
-    if(!menu) qWarning("Do not find object named \"menu_Boolean_operations\"!");
-    QMessageBox::warning(mw,
-                         tr("Boolean operation cannot be applied on normal polyhedron"),
-                         tr("You need to call the operation \"%1\" in the menu \"%2\".")
-                         .arg(actions_map["actionToNef"]->text())
-                         .arg(menu ? menu->title() : "Boolean operations"));
-  }
-  Scene_nef_polyhedron_item* itemA = 
-    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexA));
-  Scene_nef_polyhedron_item* itemB = 
-    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexB));
-  if(!itemA || !itemB)
-    return;
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  // copy itemA
-  Scene_nef_polyhedron_item* new_item = 0;
-  if(operation != MINKOWSKI_SUM) {
-    new_item = new Scene_nef_polyhedron_item(*itemA->nef_polyhedron());
-  };
-
- // perform Boolean operation
-  std::cout << "Boolean operation...";
-  QTime time;
-  time.start();
-  switch(operation)
-  {
-  case BOOLEAN_UNION:
-    (*new_item) += (*itemB);
-    break;
-  case BOOLEAN_INTERSECTION:
-    (*new_item) *= (*itemB);
-    break;
-  case BOOLEAN_DIFFERENCE:
-    (*new_item) -= (*itemB);
-    break;
-  case MINKOWSKI_SUM:
-    new_item = Scene_nef_polyhedron_item::sum(*itemA, 
-                                              *itemB);
-  }
-  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-
-  QString name;
-  switch(operation)
-  {
-  case BOOLEAN_UNION:
-    name = tr("%1 union %2");
-    break;
-  case BOOLEAN_INTERSECTION:
-    name = tr("%1 intersection %2");
-    break;
-  case BOOLEAN_DIFFERENCE:
-    name = tr("%1 minus %2");
-    break;
-  case MINKOWSKI_SUM:
-    name = tr("Minkowski sum of %1 and %2");
-  }
-  
-  new_item->setName(name.arg(itemA->name(), itemB->name()));
-  new_item->setColor(Qt::green);
-  new_item->setRenderingMode(FlatPlusEdges);
-  itemA->setRenderingMode(Wireframe);
-  itemB->setRenderingMode(Wireframe);
-  scene->addItem(new_item);
-  scene->itemChanged(indexA);
-  scene->itemChanged(indexB);
-
-  QApplication::restoreOverrideCursor();
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_nef_plugin, Polyhedron_demo_nef_plugin)
-
-#include "Polyhedron_demo_nef_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp
deleted file mode 100644
index dc5b250..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/pca_estimate_normals.h>
-#include <CGAL/jet_estimate_normals.h>
-#include <CGAL/mst_orient_normals.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-#include <QMessageBox>
-
-#include "ui_Polyhedron_demo_normal_estimation_plugin.h"
-
-#if BOOST_VERSION == 105700
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
-#  define CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN 1
-#endif
-#endif
-
-class Polyhedron_demo_normal_estimation_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionNormalEstimation;
-  QAction* actionNormalInversion;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-
-    actionNormalEstimation = new QAction(tr("Normal estimation of point set"), mainWindow);
-    actionNormalEstimation->setObjectName("actionNormalEstimation");
-
-    actionNormalInversion = new QAction(tr("Inverse normal orientation"), mainWindow);
-    actionNormalInversion->setObjectName("actionNormalInversion");
-    
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionNormalEstimation << actionNormalInversion;
-  }
-
-  bool applicable(QAction*) const {
-#if CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
-    return false;
-#else
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-#endif
-  }
-
-public slots:
-  void on_actionNormalEstimation_triggered();
-  void on_actionNormalInversion_triggered();
-
-}; // end PS_demo_smoothing_plugin
-
-class Point_set_demo_normal_estimation_dialog : public QDialog, private Ui::NormalEstimationDialog
-{
-  Q_OBJECT
-  public:
-    Point_set_demo_normal_estimation_dialog(QWidget* /*parent*/ = 0)
-    {
-      setupUi(this);
-    }
-
-    QString directionMethod() const { return m_inputDirection->currentText(); }
-    int directionNbNeighbors() const { return m_inputNbNeighborsDirection->value(); }
-
-    QString orientationMethod() const { return m_inputOrientation->currentText(); }
-    int orientationNbNeighbors() const { return m_inputNbNeighborsOrientation->value(); }
-};
-
-
-void Polyhedron_demo_normal_estimation_plugin::on_actionNormalInversion_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    // Gets point set
-    Point_set* points = item->point_set();
-    if(points == NULL)
-        return;
-  
-    for(Point_set::iterator it = points->begin(); it != points->end(); ++it){
-      it->normal() = -1 * it->normal();
-    }
-  }
-}
-
-void Polyhedron_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered()
-{
-#if !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    // Gets point set
-    Point_set* points = item->point_set();
-    if(points == NULL)
-        return;
-
-    // Gets options
-    Point_set_demo_normal_estimation_dialog dialog;
-    if(!dialog.exec())
-      return;
-      
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    // First point to delete
-    Point_set::iterator first_unoriented_point = points->end();
-
-    //***************************************
-    // normal estimation
-    //***************************************
-
-    if (dialog.directionMethod() == "plane")
-    {
-      CGAL::Timer task_timer; task_timer.start();
-      std::cerr << "Estimates normal direction by PCA (k=" << dialog.directionNbNeighbors() <<")...\n";
-
-      // Estimates normals direction.
-      CGAL::pca_estimate_normals(points->begin(), points->end(),
-                                CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
-                                dialog.directionNbNeighbors());
-
-      // Mark all normals as unoriented
-      first_unoriented_point = points->begin();
-
-      std::size_t memory = CGAL::Memory_sizer().virtual_size();
-      std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, "
-                                                  << (memory>>20) << " Mb allocated"
-                                                  << std::endl;
-    }
-    else if (dialog.directionMethod() == "quadric")
-    {
-      CGAL::Timer task_timer; task_timer.start();
-      std::cerr << "Estimates normal direction by Jet Fitting (k=" << dialog.directionNbNeighbors() <<")...\n";
-
-      // Estimates normals direction.
-      CGAL::jet_estimate_normals(points->begin(), points->end(),
-                                CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
-                                dialog.directionNbNeighbors());
-
-      // Mark all normals as unoriented
-      first_unoriented_point = points->begin();
-
-      std::size_t memory = CGAL::Memory_sizer().virtual_size();
-      std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, "
-                                                  << (memory>>20) << " Mb allocated"
-                                                  << std::endl;
-    }
-
-    //***************************************
-    // normal orientation
-    //***************************************
-
-    CGAL::Timer task_timer; task_timer.start();
-    std::cerr << "Orient normals with a Minimum Spanning Tree (k=" << dialog.orientationNbNeighbors() << ")...\n";
-
-    // Tries to orient normals
-    first_unoriented_point =
-      CGAL::mst_orient_normals(points->begin(), points->end(),
-                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
-                              dialog.orientationNbNeighbors());
-
-    //indicates that the point set has normals
-    if (first_unoriented_point!=points->begin()){
-      item->set_has_normals(true);
-      item->setRenderingMode(PointsPlusNormals);
-    }
-
-    std::size_t nb_unoriented_normals = std::distance(first_unoriented_point, points->end());
-    std::size_t memory = CGAL::Memory_sizer().virtual_size();
-    std::cerr << "Orient normals: " << nb_unoriented_normals << " point(s) with an unoriented normal are selected ("
-                                    << task_timer.time() << " seconds, "
-                                    << (memory>>20) << " Mb allocated)"
-                                    << std::endl;
-
-    // Selects points with an unoriented normal
-    points->select(points->begin(), points->end(), false);
-    points->select(first_unoriented_point, points->end(), true);
-
-    // Updates scene
-    scene->itemChanged(index);
-
-    QApplication::restoreOverrideCursor();
-
-    // Warns user
-    if (nb_unoriented_normals > 0)
-    {
-      QMessageBox::information(NULL,
-                               tr("Points with an unoriented normal"),
-                               tr("%1 point(s) with an unoriented normal are selected.\nPlease orient them or remove them before running Poisson reconstruction.")
-                               .arg(nb_unoriented_normals));
-    }
-  }
-#endif // !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_normal_estimation_plugin, Polyhedron_demo_normal_estimation_plugin)
-
-#include "Polyhedron_demo_normal_estimation_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui
deleted file mode 100644
index 109d4e7..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui
+++ /dev/null
@@ -1,132 +0,0 @@
-<ui version="4.0" >
- <class>NormalEstimationDialog</class>
- <widget class="QDialog" name="NormalEstimationDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>311</width>
-    <height>120</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Normal estimation</string>
-  </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>Direction:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" >
-    <widget class="QComboBox" name="m_inputDirection" >
-     <item>
-      <property name="text" >
-       <string>quadric</string>
-      </property>
-     </item>
-     <item>
-      <property name="text" >
-       <string>plane</string>
-      </property>
-     </item>
-    </widget>
-   </item>
-   <item row="0" column="2" >
-    <widget class="QSpinBox" name="m_inputNbNeighborsDirection" >
-     <property name="suffix" >
-      <string> neighbors</string>
-     </property>
-     <property name="minimum" >
-      <number>6</number>
-     </property>
-     <property name="maximum" >
-      <number>9999</number>
-     </property>
-     <property name="value" >
-      <number>18</number>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" >
-    <widget class="QLabel" name="label_2" >
-     <property name="text" >
-      <string>Orientation:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" >
-    <widget class="QComboBox" name="m_inputOrientation" >
-     <item>
-      <property name="text" >
-       <string>MST</string>
-      </property>
-     </item>
-    </widget>
-   </item>
-   <item row="1" column="2" >
-    <widget class="QSpinBox" name="m_inputNbNeighborsOrientation" >
-     <property name="suffix" >
-      <string> neighbors</string>
-     </property>
-     <property name="minimum" >
-      <number>6</number>
-     </property>
-     <property name="maximum" >
-      <number>9999</number>
-     </property>
-     <property name="value" >
-      <number>18</number>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" colspan="2" >
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>NormalEstimationDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>NormalEstimationDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp
deleted file mode 100644
index 44758bf..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-class Polyhedron_demo_off_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "off_plugin"; }
-  QString nameFilters() const { return "OFF files (*.off)"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-  
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-bool Polyhedron_demo_off_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Polyhedron_demo_off_plugin::load(QFileInfo fileinfo) {
-  if(fileinfo.suffix().toLower() != "off") return 0;
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-    
-  // Try to read .off in a polyhedron
-  Scene_polyhedron_item* item = new Scene_polyhedron_item();
-  item->setName(fileinfo.baseName());
-  if(!item->load(in))
-  {
-    delete item;
-
-    // Try to read .off in a polygon soup
-    Scene_polygon_soup_item* soup_item = new Scene_polygon_soup_item;
-    soup_item->setName(fileinfo.baseName());
-    in.close();
-    std::ifstream in2(fileinfo.filePath().toUtf8());
-    if(!soup_item->load(in2)) {
-      delete soup_item;
-      return 0;
-    }
-    return soup_item;
-  }
-
-  return item;
-}
-
-bool Polyhedron_demo_off_plugin::canSave(const Scene_item* item)
-{
-  // This plugin supports polyhedrons and polygon soups
-  return qobject_cast<const Scene_polyhedron_item*>(item) ||
-    qobject_cast<const Scene_polygon_soup_item*>(item);
-}
-
-bool Polyhedron_demo_off_plugin::save(const Scene_item* item, QFileInfo fileinfo)
-{
-  // This plugin supports polyhedrons and polygon soups
-  const Scene_polyhedron_item* poly_item = 
-    qobject_cast<const Scene_polyhedron_item*>(item);
-  const Scene_polygon_soup_item* soup_item = 
-    qobject_cast<const Scene_polygon_soup_item*>(item);
-
-  if(!poly_item && !soup_item)
-    return false;
-
-  std::ofstream out(fileinfo.filePath().toUtf8());
-
-  return (poly_item && poly_item->save(out)) || 
-    (soup_item && soup_item->save(out));
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_off_plugin, Polyhedron_demo_off_plugin)
-#include "Polyhedron_demo_off_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp
deleted file mode 100644
index c16261c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "Scene_nef_polyhedron_item.h"
-#include "Nef_type.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-class Polyhedron_demo_off_to_nef_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "off_to_nef_plugin"; }
-  QString nameFilters() const { return "OFF files, into nef (*.off)"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-bool Polyhedron_demo_off_to_nef_plugin::canLoad() const {
-  return true;
-}
-
-Scene_item* 
-Polyhedron_demo_off_to_nef_plugin::load(QFileInfo fileinfo) {
-  std::ifstream in(fileinfo.filePath().toUtf8());
-
-  if(!in)
-    std::cerr << "Error!\n";
-  Scene_nef_polyhedron_item* item = new Scene_nef_polyhedron_item();
-
-  if(!item->load_from_off(in))
-  {
-    delete item;
-    return 0;
-  }
-
-  item->setName(fileinfo.baseName());
-  return item;
-}
-
-bool Polyhedron_demo_off_to_nef_plugin::canSave(const Scene_item*)
-{
-  return false;
-}
-
-bool Polyhedron_demo_off_to_nef_plugin::save(const Scene_item*, QFileInfo)
-{
-  return false;
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_off_to_nef_plugin, Polyhedron_demo_off_to_nef_plugin)
-#include "Polyhedron_demo_off_to_nef_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp
deleted file mode 100644
index b07e6bf..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_type.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <fstream>
-
-class Polyhedron_demo_off_to_xyz_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "off_to_xyz_plugin"; }
-  QString nameFilters() const { return "OFF files as Point set (*.off)"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-bool Polyhedron_demo_off_to_xyz_plugin::canLoad() const {
-  return true;
-}
-
-Scene_item* 
-Polyhedron_demo_off_to_xyz_plugin::load(QFileInfo fileinfo) {
-  std::ifstream in(fileinfo.filePath().toUtf8());
-
-  if(!in)
-    std::cerr << "Error!\n";
-
-  Scene_points_with_normal_item* item;
-
-  Polyhedron p;
-  in >> p;
-  if (in && !p.empty())
-    item = new Scene_points_with_normal_item(p);
-  else{
-    in.close();
-    in.open(fileinfo.filePath().toUtf8());
-    item = new Scene_points_with_normal_item();
-    if(!item->read_off_point_set(in))
-    {
-      delete item;
-      return 0;
-    }
-  }
-
-  item->setName(fileinfo.baseName());
-  return item;
-}
-
-bool Polyhedron_demo_off_to_xyz_plugin::canSave(const Scene_item*)
-{
-  return false;
-}
-
-bool Polyhedron_demo_off_to_xyz_plugin::save(const Scene_item*, QFileInfo)
-{
-  return false;
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_off_to_xyz_plugin, Polyhedron_demo_off_to_xyz_plugin)
-#include "Polyhedron_demo_off_to_xyz_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp
deleted file mode 100644
index f84cc31..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-#include <QApplication>
-#include <QAction>
-#include <QList>
-#include <QMainWindow>
-#include <QMessageBox>
-#include <QtDebug>
-
-#include "Scene_polygon_soup_item.h"
-#include "Scene_polyhedron_item.h"
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Messages_interface.h"
-
-class Polyhedron_demo_orient_soup_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  void init(QMainWindow* mainWindow,
-            Scene_interface* scene_interface,
-            Messages_interface* m);
-
-  bool applicable(QAction* action) const {
-    Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) {
-      if(qobject_cast<Scene_polygon_soup_item*>(scene->item(index)))
-        return true;
-      else
-        if (action==actionShuffle && 
-            qobject_cast<Scene_polyhedron_item*>(scene->item(index)))
-            return true;
-    }
-    return false;
-  }
-
-  QList<QAction*> actions() const;
-
-public slots:
-  void orient();
-  void shuffle();
-  void displayNonManifoldEdges();
-
-private:
-  Scene_interface* scene;
-  Messages_interface* messages;
-  QMainWindow* mw;
-  QAction* actionOrient;
-  QAction* actionShuffle;
-  QAction* actionDisplayNonManifoldEdges;
-
-}; // end Polyhedron_demo_orient_soup_plugin
-
-void Polyhedron_demo_orient_soup_plugin::init(QMainWindow* mainWindow,
-                                              Scene_interface* scene_interface,
-                                              Messages_interface* m)
-{
-  scene = scene_interface;
-  mw = mainWindow;
-  messages = m;
-  actionOrient = new QAction(tr("&Orient polygon soup"), mainWindow);
-  actionOrient->setObjectName("actionOrient");
-  connect(actionOrient, SIGNAL(triggered()),
-          this, SLOT(orient()));
-
-  actionShuffle = new QAction(tr("&Shuffle polygon soup"), mainWindow);
-  connect(actionShuffle, SIGNAL(triggered()),
-          this, SLOT(shuffle()));
-
-  actionDisplayNonManifoldEdges = new QAction(tr("Display non manifold edges"),
-                                              mainWindow);
-  connect(actionDisplayNonManifoldEdges, SIGNAL(triggered()),
-          this, SLOT(displayNonManifoldEdges()));
-}
-
-QList<QAction*> Polyhedron_demo_orient_soup_plugin::actions() const {
-  return QList<QAction*>() << actionOrient
-                           << actionShuffle
-                           << actionDisplayNonManifoldEdges;
-}
-
-void Polyhedron_demo_orient_soup_plugin::orient()
-{
-  Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices())
-  {
-    Scene_polygon_soup_item* item = 
-      qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
-
-    if(item)
-    {
-      //     qDebug()  << tr("I have the item %1\n").arg(item->name());
-      QApplication::setOverrideCursor(Qt::WaitCursor);
-      if(!item->orient()) {
-         QMessageBox::information(mw, tr("Not orientable without self-intersections"),
-                                      tr("The polygon soup \"%1\" is not directly orientable."
-                                         " Some vertices have been duplicated and some self-intersections"
-                                         " have been created.")
-                                      .arg(item->name()));
-      }
-
-      Scene_polyhedron_item* poly_item = new Scene_polyhedron_item();
-      if(item->exportAsPolyhedron(poly_item->polyhedron())) {
-        poly_item->setName(item->name());
-        poly_item->setColor(item->color());
-        poly_item->setRenderingMode(item->renderingMode());
-        poly_item->setVisible(item->visible());
-        poly_item->changed();
-        poly_item->setProperty("source filename", item->property("source filename"));
-        scene->replaceItem(index, poly_item);
-        delete item;
-      } else {
-        scene->itemChanged(item);
-      }
-
-      QApplication::restoreOverrideCursor();
-    }
-    else{
-      messages->warning(tr("This function is only applicable on polygon soups."));
-    }
-  }
-}
-
-void Polyhedron_demo_orient_soup_plugin::shuffle()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polygon_soup_item* item = 
-    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
-
-  if(item) {
-    item->shuffle_orientations();
-    scene->itemChanged(item);
-  }
-  else {
-    Scene_polyhedron_item* poly_item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-    if(poly_item) {
-      item = new Scene_polygon_soup_item();
-      item->setName(poly_item->name());
-      item->setColor(poly_item->color());
-      item->setRenderingMode(poly_item->renderingMode());
-      item->setVisible(poly_item->visible());
-      item->setProperty("source filename", poly_item->property("source filename"));
-      item->load(poly_item);
-      item->shuffle_orientations();
-      scene->replaceItem(index, item);
-      delete poly_item;
-    }
-  }
-}
-
-void Polyhedron_demo_orient_soup_plugin::displayNonManifoldEdges()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polygon_soup_item* item = 
-    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
-
-  if(item)
-  {
-    item->setDisplayNonManifoldEdges(!item->displayNonManifoldEdges());
-    item->changed();
-    scene->itemChanged(item);
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_orient_soup_plugin, Polyhedron_demo_orient_soup_plugin)
-
-#include "Polyhedron_demo_orient_soup_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp
deleted file mode 100644
index 8b3d53e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#include <QApplication>
-#include <QAction>
-#include <QStringList>
-
-#include "Scene_polyhedron_item.h"
-#include "Scene_textured_polyhedron_item.h"
-#include "Textured_polyhedron_type.h"
-#include "Polyhedron_type.h"
-
-#include <QTime>
-
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Discrete_conformal_map_parameterizer_3.h>
-#include <CGAL/Two_vertices_parameterizer_3.h>
-
-#include <CGAL/Textured_polyhedron_builder.h>
-
-#include <iostream>
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-typedef Kernel::FT FT;
-
-class Polyhedron_demo_parameterization_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionMVC"
-                         << "actionDCP";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionMVC_triggered();
-  void on_actionDCP_triggered();
-
-protected:
-  enum Parameterization_method { PARAM_MVC, PARAM_DCP };
-  void parameterize(Parameterization_method method);
-}; // end Polyhedron_demo_parameterization_plugin
-
-
-
-void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterization_method method)
-{
-  // get active polyhedron
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  Scene_polyhedron_item* poly_item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-  if(!poly_item)
-    return;
-
-  Polyhedron* pMesh = poly_item->polyhedron();
-  if(!pMesh)
-    return;
-
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  // parameterize
-  QTime time;
-  time.start();
-  typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron> Adaptor;
-  Adaptor adaptor(*pMesh);  
-
-  bool success = false;
-  switch(method)
-  {
-  case PARAM_MVC:
-    {
-      std::cout << "Parameterize (MVC)...";
-      typedef CGAL::Mean_value_coordinates_parameterizer_3<Adaptor> Parameterizer;
-      Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
-      success = err == Parameterizer::OK;
-      break;
-    }
-  case PARAM_DCP:
-    {
-      std::cout << "Parameterize (DCP)...";
-      typedef CGAL::Discrete_conformal_map_parameterizer_3<Adaptor> Parameterizer;
-      Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
-      success = err == Parameterizer::OK;
-    }
-  }
-
-  if(success)
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-  else
-  {
-    std::cout << "failure" << std::endl;
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-
-  // add textured polyhedon to the scene
-  Textured_polyhedron *pTex_polyhedron = new Textured_polyhedron();
-  Textured_polyhedron_builder<Polyhedron,Textured_polyhedron,Kernel> builder;
-  builder.run(*pMesh,*pTex_polyhedron);
-  pTex_polyhedron->compute_normals();
-
-  Polyhedron::Vertex_iterator it1;
-  Textured_polyhedron::Vertex_iterator it2;
-  for(it1 = pMesh->vertices_begin(), 
-    it2 = pTex_polyhedron->vertices_begin();
-    it1 != pMesh->vertices_end() &&
-    it2 != pTex_polyhedron->vertices_end();
-  it1++, it2++)
-  {
-    // (u,v) pair is stored per halfedge
-    FT u = adaptor.info(it1->halfedge())->uv().x();
-    FT v = adaptor.info(it1->halfedge())->uv().y();
-    it2->u() = u;
-    it2->v() = v;
-  }
-
-  Scene_item* new_item = new Scene_textured_polyhedron_item(pTex_polyhedron);
-
-  new_item->setName(tr("%1 (parameterized)").arg(poly_item->name()));
-  new_item->setColor(Qt::white);
-  new_item->setRenderingMode(poly_item->renderingMode());
-
-  scene->addItem(new_item);
-
-  QApplication::restoreOverrideCursor();
-}
-
-void Polyhedron_demo_parameterization_plugin::on_actionMVC_triggered()
-{
-  parameterize(PARAM_MVC);
-}
-
-void Polyhedron_demo_parameterization_plugin::on_actionDCP_triggered()
-{
-  std::cerr << "DCP...";
-  parameterize(PARAM_DCP);
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_parameterization_plugin, Polyhedron_demo_parameterization_plugin)
-
-#include "Polyhedron_demo_parameterization_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp
deleted file mode 100644
index 751bf7d..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp
+++ /dev/null
@@ -1,212 +0,0 @@
-#include <QApplication>
-#include "Scene_polyhedron_item.h"
-#include "Scene_plane_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/centroid.h>
-#include <CGAL/bounding_box.h>
-#include <CGAL/linear_least_squares_fitting_3.h>
-
-
-#include <CGAL/Make_quad_soup.h> // output for plane fitting
-#include <CGAL/Make_bar.h> // output for line fitting
-
-#include "Kernel_type.h"
-typedef Kernel::Plane_3 Plane;
-typedef Kernel::Iso_cuboid_3 Iso_cuboid;
-typedef Kernel::Triangle_3 Triangle;
-typedef Kernel::Line_3 Line;
-typedef Kernel::Vector_3 Vector;
-typedef Kernel::Point_3 Point;
-typedef Kernel::FT FT;
-
-
-class Polyhedron_demo_pca_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionFitPlane"
-                         << "actionFitLine";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-
-public slots:
-  void on_actionFitPlane_triggered();
-  void on_actionFitLine_triggered();
-
-}; // end Polyhedron_demo_pca_plugin
-
-void Polyhedron_demo_pca_plugin::on_actionFitPlane_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    // get triangles from the mesh
-    std::list<Triangle> triangles;
-    Polyhedron::Facet_iterator f;
-    for(f = pMesh->facets_begin();
-      f != pMesh->facets_end();
-      ++f)
-    {
-      const Point& a = f->halfedge()->vertex()->point();
-      const Point& b = f->halfedge()->next()->vertex()->point();
-      const Point& c = f->halfedge()->prev()->vertex()->point();
-      triangles.push_back(Triangle(a,b,c));
-    }
-
-    // fit plane to triangles
-    Plane plane;
-    std::cout << "Fit plane...";
-    CGAL::linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,CGAL::Dimension_tag<2>());
-    std::cout << "ok" << std::endl;
-
-    // compute centroid
-    Point center_of_mass = CGAL::centroid(triangles.begin(),triangles.end());
-
-//     // compute bounding box diagonal
-//     Iso_cuboid bbox = CGAL::bounding_box(pMesh->points_begin(),pMesh->points_end());
-
-//     // compute scale (for rendering) using diagonal of bbox
-//     Point cmin = (bbox.min)();
-//     Point cmax = (bbox.max)();
-//     FT diag = std::sqrt(CGAL::squared_distance(cmin,cmax));
-//     Vector u1 = plane.base1();
-//     u1 = u1 / std::sqrt(u1*u1);
-//     u1 = u1 * 0.7 * diag;
-//     Vector u2 = plane.base2();
-//     u2 = u2 / std::sqrt(u2*u2);
-//     u2 = u2 * 0.7 * diag;
-//     std::list<Point> points;
-//     points.push_back(center_of_mass + u1);
-//     points.push_back(center_of_mass + u2);
-//     points.push_back(center_of_mass - u1);
-//     points.push_back(center_of_mass - u2);
-
-    // add best fit plane as new polyhedron
-//     Polyhedron *pFit = new Polyhedron;
-//     typedef std::list<Point>::iterator Iterator;
-//     Make_quad_soup<Polyhedron,Kernel,Iterator> quad;
-//     quad.run(points.begin(),points.end(),*pFit);
-
-//     Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pFit);
-    Scene_plane_item* new_item = new Scene_plane_item(this->scene);
-    new_item->setPosition(center_of_mass.x(),
-                          center_of_mass.y(),
-                          center_of_mass.z());
-    const Vector& normal = plane.orthogonal_vector();
-    new_item->setNormal(normal.x(), normal.y(), normal.z());
-    new_item->setName(tr("%1 (plane fit)").arg(item->name()));
-    new_item->setColor(Qt::magenta);
-    new_item->setRenderingMode(item->renderingMode());
-    scene->addItem(new_item);
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-void Polyhedron_demo_pca_plugin::on_actionFitLine_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    // get triangles from the mesh
-    std::list<Triangle> triangles;
-    Polyhedron::Facet_iterator f;
-    for(f = pMesh->facets_begin();
-      f != pMesh->facets_end();
-      ++f)
-    {
-      const Point& a = f->halfedge()->vertex()->point();
-      const Point& b = f->halfedge()->next()->vertex()->point();
-      const Point& c = f->halfedge()->prev()->vertex()->point();
-      triangles.push_back(Triangle(a,b,c));
-    }
-
-    // fit line to triangles
-    Line line;
-    std::cout << "Fit line...";
-    CGAL::linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,CGAL::Dimension_tag<2>());
-    std::cout << "ok" << std::endl;
-
-    // compute centroid
-    Point center_of_mass = CGAL::centroid(triangles.begin(),triangles.end());
-
-    // compute bounding box diagonal
-    Iso_cuboid bbox = CGAL::bounding_box(pMesh->points_begin(),pMesh->points_end());
-
-    // compute scale for rendering using diagonal of bbox
-    Point cmin = (bbox.min)();
-    Point cmax = (bbox.max)();
-    FT diag = std::sqrt(CGAL::squared_distance(cmin,cmax));
-
-    // construct a 3D bar
-    Vector u = line.to_vector();
-    u = u / std::sqrt(u*u);
-
-    Point a = center_of_mass + u * diag;
-    Point b = center_of_mass - u * diag;
-
-    Plane plane_a = line.perpendicular_plane(a);
-
-    Vector u1 = plane_a.base1();
-    u1 = u1 / std::sqrt(u1*u1);
-    u1 = u1 * 0.01 * diag;
-    Vector u2 = plane_a.base2();
-    u2 = u2 / std::sqrt(u2*u2);
-    u2 = u2 * 0.01 * diag;
-
-    Point points[8];
-
-    points[0] = a + u1;
-    points[1] = a + u2;
-    points[2] = a - u1;
-    points[3] = a - u2;
-
-    points[4] = b + u1;
-    points[5] = b + u2;
-    points[6] = b - u1;
-    points[7] = b - u2;
-
-    // add best fit line as new polyhedron bar
-    Polyhedron *pFit = new Polyhedron;
-    Make_bar<Polyhedron,Kernel> bar;
-    bar.run(points,*pFit);
-
-    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pFit);
-    new_item->setName(tr("%1 (line fit)").arg(item->name()));
-    new_item->setColor(Qt::magenta);
-    new_item->setRenderingMode(item->renderingMode());
-    scene->addItem(new_item);
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_pca_plugin, Polyhedron_demo_pca_plugin)
-
-#include "Polyhedron_demo_pca_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp
deleted file mode 100644
index 4655d6a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-#include "Polyhedron_demo_plugin_helper.h"
-#include <QMainWindow>
-#include <QAction>
-#include <QMetaObject>
-#include <QMetaMethod>
-#include <QtDebug>
-#include <QVector>
-#include <QSet>
-#include <QDockWidget>
-
-QAction*
-Polyhedron_demo_plugin_helper::
-getActionFromMainWindow(QMainWindow* mw,
-                        QString action_name)
-{
-  return mw->findChild<QAction*>(action_name);
-}
-
-QStringList 
-Polyhedron_demo_plugin_helper::actionsNames() const
-{
-  return QStringList();
-}
-
-void
-Polyhedron_demo_plugin_helper::
-init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-  mw = mainWindow;
-  scene = scene_interface;
-  Q_FOREACH(QString actionName, actionsNames())
-  {
-    actions_map[actionName] = getActionFromMainWindow(mw, actionName);
-  }
-  autoConnectActions();
-}
-
-QList<QAction*> 
-Polyhedron_demo_plugin_helper::actions() const
-{
-  return actions_map.values();
-}
-
-// Auto-connect actions to slots
-void Polyhedron_demo_plugin_helper::autoConnectActions()
-{
-  QObject* thisObject = dynamic_cast<QObject*>(this);
-  if(!thisObject)
-    return;
-
-  const QMetaObject* metaObject = thisObject->metaObject();
-  QVector<QMetaMethod> methods;
-  QVector<QString> methodsNames;
-  QSet<QString> connected;
-  for(int i = metaObject->methodOffset();
-      i < metaObject->methodCount();
-      ++i)
-  {
-    const int pos = QString(metaObject->method(i).signature()).indexOf('(');
-    methodsNames << QString(metaObject->method(i).signature()).left(pos);
-    methods << metaObject->method(i);
-  }
-
-  Q_FOREACH(QAction* action, actions())
-  {
-    bool success = false;
-//     qDebug("Autoconnecting action \"%s\"...", 
-//            action->objectName().toUtf8().data());
-    const QMetaObject* action_metaObject = action->metaObject();
-    for(int i = action_metaObject->methodOffset();
-        i < action_metaObject->methodCount(); ++i)
-    {
-      QMetaMethod action_method = action_metaObject->method(i);
-        
-      if(action_method.methodType() == QMetaMethod::Signal)
-      {
-        const int pos = QString(action_method.signature()).indexOf('(');
-        QString methodName = QString(action_method.signature()).left(pos);
-        QString slotName = 
-          QString("on_%1_%2").arg(action->objectName()).arg(methodName);
-//         qDebug() << thisObject->tr("Slot %1 (%2)...").arg(slotName).arg(i);
-        int index = methodsNames.indexOf(slotName);
-        if(index>=0 && !connected.contains(slotName)) {
-          const bool ok = 
-            QObject::connect(action, 
-                             qPrintable(QString("2%1").arg(action_method.signature())),
-                             thisObject,
-                             qPrintable(QString("1%1").arg(methods[index].signature())));
-          if(!ok)
-          {
-            qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
-              .arg(action->objectName())
-              .arg(action_method.signature())
-              .arg(methods[index].signature());
-          }
-          else {
-//             qDebug("  ->Connected!");
-            success = true;
-            connected << slotName;
-          }
-        }
-//         else {
-//           qDebug(" nothing found!\n");
-//         }
-      }
-    } // end for each method of action
-    if(!success)
-      qDebug("ERROR: Failed to autoconnect the action \"%s\"!",
-             action->objectName().toUtf8().data());
-  } // end foreach action of actions()
-}
-
-void Polyhedron_demo_plugin_helper::add_dock_widget(QDockWidget* dock_widget) 
-{
-  mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
-
-  QList<QDockWidget*> dockWidgets = mw->findChildren<QDockWidget*>();
-  int counter = 0;
-  foreach(QDockWidget* dock, dockWidgets) {
-    if( mw->dockWidgetArea(dock) != Qt::LeftDockWidgetArea ||
-        dock == dock_widget ) 
-    { continue; }
-
-    if(++counter > 1) {
-      mw->tabifyDockWidget(dock, dock_widget);
-      return;
-    }
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.h
deleted file mode 100644
index db563a4..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_helper.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef POLYHEDRON_DEMO_OPERATION_HELPER_H
-#define POLYHEDRON_DEMO_OPERATION_HELPER_H
-
-#include "Scene_item_config.h" //defines SCENE_ITEM_EXPORT
-
-#include <QString>
-#include <QStringList>
-#include <QMap>
-
-class QAction;
-struct QMetaObject;
-class QMainWindow;
-class QDockWidget;
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Scene_interface.h"
-
-class SCENE_ITEM_EXPORT Polyhedron_demo_plugin_helper
-  : public Polyhedron_demo_plugin_interface
-{
-public:
-  // get action object from its name
-  static QAction* getActionFromMainWindow(QMainWindow*, QString action_name);
-  
-  // Init plugin
-  virtual void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  
-  // Get list of actions supported by this plugin
-  virtual QStringList actionsNames() const;
-  virtual QList<QAction*> actions() const;
-
-  // To get a selected item with the type of SceneType
-  template<class SceneType>
-  SceneType* get_selected_item() const {
-    int item_id = scene->mainSelectionIndex();
-    SceneType* scene_item = qobject_cast<SceneType*>(scene->item(item_id));
-    if(!scene_item) {
-      // no selected SceneType - if there is only one in list return it, otherwise NULL
-      int counter = 0;
-      for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end && counter < 2; ++i) {
-        if(SceneType* tmp = qobject_cast<SceneType*>(scene->item(i))) { 
-          scene_item = tmp;
-          counter++; 
-        }
-      }
-      if(counter != 1) { return NULL; }
-    }
-    return scene_item;
-  }
-
-  void add_dock_widget(QDockWidget* dock);
-
-  // Auto-connect actions to slots. Called by init().
-  void autoConnectActions();
-  
-protected:
-  QMap<QString, QAction*> actions_map;
-  Scene_interface* scene;
-  QMainWindow* mw;
-};
-
-#endif // POLYHEDRON_DEMO_OPERATION_HELPER_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_interface.h
deleted file mode 100644
index 1e2628b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_plugin_interface.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
-#define POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
-
-#include <QString>
-#include <QList>
-#include <QtPlugin>
-
-class QAction;
-class QMainWindow;
-class Scene_interface;
-class Messages_interface;
-
-class Polyhedron_demo_plugin_interface 
-{
-public:
-  virtual ~Polyhedron_demo_plugin_interface() {}
-  virtual void init(QMainWindow*, Scene_interface*) {}
-  virtual void init(QMainWindow* mw, Scene_interface* sc, Messages_interface*) {
-    init(mw, sc);
-  }
-
-  //! Checks the current state of the `Scene` or `MainWindow` and decides
-  //! if the plugin can function, given that state.  It's actions are
-  //! visible in contextmenus, if this returns true, not visible
-  //! otherwise.  
-  //!
-  //! @returns \c true, if the plugin is applicable, \c false
-  //! otherwise
-  virtual bool applicable(QAction*) const = 0;
-  virtual QList<QAction*> actions() const = 0;
-};
-
-Q_DECLARE_INTERFACE(Polyhedron_demo_plugin_interface,
-                    "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
-
-#endif // POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp
deleted file mode 100644
index 3da1a23..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-#include <QtCore/qglobal.h>
-#include "opengl_tools.h"
-
-#include "Messages_interface.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_points_with_normal_item.h"
-#include "Scene_interface.h"
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_type.h"
-
-#include <CGAL/Timer.h>
-#include <CGAL/Random.h>
-#include <CGAL/Point_inside_polyhedron_3.h>
-#include "ui_Point_inside_polyhedron_widget.h"
-
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QDockWidget>
-#include <QInputDialog>
-
-#include <vector>
-#include <algorithm>
-
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/optional/optional.hpp>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
-
-class Polyhedron_demo_point_inside_polyhedron_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  bool applicable(QAction*) const 
-  {
-    bool poly_item_exists = false;
-    bool point_item_exists = false;
-
-    for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); 
-      i < end && (!poly_item_exists || !point_item_exists); ++i)
-    {
-      poly_item_exists |= qobject_cast<Scene_polyhedron_item*>(scene->item(i)) != NULL;
-      point_item_exists |= qobject_cast<Scene_points_with_normal_item*>(scene->item(i)) != NULL;
-    }
-
-    //return poly_item_exists && point_item_exists;
-    return poly_item_exists || point_item_exists;
-  }
-  void print_message(QString message) { messages->information(message); }
-  QList<QAction*> actions() const { return QList<QAction*>() << actionPointInsidePolyhedron; }
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m)
-  {
-    mw = mainWindow;
-    scene = scene_interface;
-    messages = m;
-
-    actionPointInsidePolyhedron = new QAction(tr("Point Inside Polyhedron"), mw);
-    connect(actionPointInsidePolyhedron, SIGNAL(triggered()), this, SLOT(point_inside_polyhedron_action()));
-
-    dock_widget = new QDockWidget("Point Inside Polyhedron", mw);
-    dock_widget->setVisible(false);
-    ui_widget = new Ui::Point_inside_polyhedron();
-    ui_widget->setupUi(dock_widget);
-    mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
-
-    connect(ui_widget->Select_button,  SIGNAL(clicked()), this, SLOT(on_Select_button())); 
-    connect(ui_widget->Sample_random_points_from_bbox,  SIGNAL(clicked()), this, SLOT(on_Sample_random_points_from_bbox())); 
-    
-  }
-private:
-  // for transform iterator
-  struct Get_ref {
-    typedef const Polyhedron& result_type;
-    result_type operator()(const Polyhedron* poly_ptr) const
-    { return *poly_ptr; }
-  };
-
-public slots:
-  void point_inside_polyhedron_action() { dock_widget->show(); }
-  void on_Select_button() 
-  {
-    bool inside = ui_widget->Inside_check_box->isChecked();
-    bool on_boundary = ui_widget->On_boundary_check_box->isChecked();
-    bool outside = ui_widget->Outside_check_box->isChecked();
-
-    if(!(inside || on_boundary || outside)) {
-      print_message("Error: please check at least one parameter check box.");
-      return;
-    }
-
-    // place all selected polyhedron and point items to vectors below
-    std::vector<const Polyhedron*> polys;
-    std::vector<Point_set*> point_sets;
-    foreach(Scene_interface::Item_id id, scene->selectionIndices()) {
-      Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
-      if(poly_item) { polys.push_back(poly_item->polyhedron()); }
-
-      Scene_points_with_normal_item* point_item = qobject_cast<Scene_points_with_normal_item*>(scene->item(id));
-      if(point_item) { point_sets.push_back(point_item->point_set()); }
-    }
-    
-    // there should be at least one selected polyhedron and point item
-    if(polys.empty())      { print_message("Error: there is no selected polyhedron item(s)."); }
-    if(point_sets.empty()) { print_message("Error: there is no selected point set item(s)."); }
-    if(polys.empty() || point_sets.empty()) { return; }
-
-    // deselect all points
-    for(std::vector<Point_set*>::iterator point_set_it = point_sets.begin(); 
-      point_set_it != point_sets.end(); ++point_set_it) {
-      (*point_set_it)->select((*point_set_it)->begin(), (*point_set_it)->end(), false);
-    }
-
-    CGAL::Timer timer; timer.start();
-
-    // put all polyhedra to query object
-    CGAL::Point_inside_polyhedron_3<Polyhedron, Epic_kernel> query_functor(
-      boost::make_transform_iterator(polys.begin(), Get_ref()),
-      boost::make_transform_iterator(polys.end(), Get_ref()));
-    query_functor.build();
-
-    print_message(QString("Constructing with %1 items is done in %2 sec.").arg(polys.size()).arg(timer.time()));
-    timer.reset();
-
-    std::size_t nb_query = 0, nb_selected = 0;// for print message
-    for(std::vector<Point_set*>::iterator point_set_it = point_sets.begin(); 
-      point_set_it != point_sets.end(); ++point_set_it) 
-    {
-      Point_set* point_set = *point_set_it;
-      for(Point_set::iterator point_it = point_set->begin(); point_it != point_set->end(); ++point_it, ++nb_query)
-      {
-        CGAL::Bounded_side res = query_functor(point_it->position());
-
-        if( (inside      && res == CGAL::ON_BOUNDED_SIDE) ||
-            (on_boundary && res == CGAL::ON_BOUNDARY)     ||
-            (outside     && res == CGAL::ON_UNBOUNDED_SIDE) )
-        {
-          point_set->select(&*point_it); ++nb_selected;
-        } 
-      } // loop on points in point_set
-    }// loop on selected point sets
-
-    print_message(QString("Querying with %1 points is done in %2 sec.").arg(nb_query).arg(timer.time()));
-    print_message(QString("%1 points are selected. All Done!").arg(nb_selected));
-
-    // for repaint
-    foreach(Scene_interface::Item_id id, scene->selectionIndices()) {
-      Scene_points_with_normal_item* point_item = qobject_cast<Scene_points_with_normal_item*>(scene->item(id));
-      if(point_item) { 
-        scene->itemChanged(point_item);
-      }
-    }
-  }
-
-  void on_Sample_random_points_from_bbox() {
-    
-    // calculate bbox of selected polyhedron items
-    boost::optional<Scene_interface::Bbox> bbox
-      = boost::make_optional(false, Scene_interface::Bbox());
-    // Workaround a bug in g++-4.8.3:
-    //   http://stackoverflow.com/a/21755207/1728537
-    // Using boost::make_optional to copy-initialize 'bbox' hides the
-    //   warning about '*bbox' not being initialized.
-    // -- Laurent Rineau, 2014/10/30
-
-    foreach(Scene_interface::Item_id id, scene->selectionIndices()) {
-      Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
-      if(poly_item) {
-        if(!bbox) {
-          bbox = poly_item->bbox();
-        }
-        else {
-          *bbox = *bbox + poly_item->bbox();
-        }
-      }
-    }
-
-    if(!bbox) {
-      print_message("Error: there is no selected polyhedron item(s)."); 
-      return;
-    }
-
-    // take number of points param
-    bool ok;
-    const int nb_points = 
-      QInputDialog::getInteger(mw, tr("Number of Points"),
-      tr("Number of Points:"),
-      100000, // default value
-      1, // min
-      (int)1.e9, // max
-      10, // step for the spinbox
-      &ok);
-
-    if(!ok) { return; }
-
-    // sample random points and constuct item
-    Scene_points_with_normal_item* point_item = new Scene_points_with_normal_item();
-    point_item->setName(QString("sample-%1").arg(nb_points));
-    CGAL::Random rg(1340818006);
-
-    double grid_dx = bbox->xmax - bbox->xmin;
-    double grid_dy = bbox->ymax - bbox->ymin;
-    double grid_dz = bbox->zmax - bbox->zmin;
-
-    for(int i=0; i < nb_points; i++){
-      point_item->point_set()->push_back(
-      Epic_kernel::Point_3(bbox->xmin + rg.get_double()* grid_dx, 
-        bbox->ymin + rg.get_double()* grid_dy,
-        bbox->zmin + rg.get_double()* grid_dz)
-      );
-    }
-
-    scene->addItem(point_item);
-  }
-private:
-  QMainWindow* mw;
-  Scene_interface* scene;
-  Messages_interface* messages;
-  QAction* actionPointInsidePolyhedron;
-
-  QDockWidget* dock_widget;
-  Ui::Point_inside_polyhedron* ui_widget;
-
-}; // end Polyhedron_demo_point_inside_polyhedron_plugin
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_point_inside_polyhedron_plugin, Polyhedron_demo_point_inside_polyhedron_plugin)
-
-#include "Polyhedron_demo_point_inside_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp
deleted file mode 100644
index 1faac87..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/compute_average_spacing.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-#include <QMessageBox>
-
-class Polyhedron_demo_point_set_average_spacing_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-private:
-  QAction* actionAverageSpacing;
-  
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    actionAverageSpacing = new QAction(tr("Point set average spacing"), mainWindow);
-    actionAverageSpacing->setObjectName("actionAverageSpacing");
-
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionAverageSpacing;
-  }
-  
-  //! Applicable if the currently selected item is a
-  //! points_with_normal_item.
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionAverageSpacing_triggered();
-}; // end Polyhedron_demo_point_set_average_spacing_plugin
-
-void Polyhedron_demo_point_set_average_spacing_plugin::on_actionAverageSpacing_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    // Gets point set
-    Point_set* points = item->point_set();
-    if(points == NULL)
-        return;
-
-    // Gets options
-    bool ok;
-    const int nb_neighbors =
-      QInputDialog::getInteger((QWidget*)mw,
-                               tr("Average Spacing"), // dialog title
-                               tr("Number of neighbors:"), // field label
-                               6, // default value = 1 ring
-                               6, // min
-                               1000, // max
-                               1, // step
-                               &ok);
-    if(!ok) 
-      return;
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    CGAL::Timer task_timer; task_timer.start();
-    std::cerr << "Average spacing (k=" << nb_neighbors <<")...\n";
-
-    // Computes average spacing
-    double average_spacing = CGAL::compute_average_spacing(
-                                      points->begin(), points->end(),
-                                      nb_neighbors);
-
-    // Print result
-    Kernel::Sphere_3 bsphere = points->bounding_sphere();
-    double radius = std::sqrt(bsphere.squared_radius());
-    std::size_t memory = CGAL::Memory_sizer().virtual_size();
-    std::cerr << "Average spacing = " << average_spacing 
-                                      << " = " << average_spacing/radius << " * point set radius (" 
-                                      << task_timer.time() << " seconds, "
-                                      << (memory>>20) << " Mb allocated)"
-                                      << std::endl;
-    QApplication::restoreOverrideCursor();
-
-    QMessageBox::information(NULL,
-                             tr("Average Spacing"),
-                             tr("Average Spacing = %1 = %2 * point set radius")
-                             .arg(average_spacing)
-                             .arg(average_spacing/radius));
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_average_spacing_plugin, Polyhedron_demo_point_set_average_spacing_plugin)
-
-#include "Polyhedron_demo_point_set_average_spacing_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp
deleted file mode 100644
index 1a8130f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/remove_outliers.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-#include <QMessageBox>
-
-#include "ui_Polyhedron_demo_point_set_outliers_removal_plugin.h"
-
-class Polyhedron_demo_point_set_outliers_removal_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-private:
-  QAction* actionOutlierRemoval;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    actionOutlierRemoval = new QAction(tr("Point set outliers selection"), mainWindow);
-    actionOutlierRemoval->setObjectName("actionOutlierRemoval");
-
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-  
-  //! Applicate for Point_sets with normals.
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionOutlierRemoval;
-  }
-
-public slots:
-  void on_actionOutlierRemoval_triggered();
-
-}; // end Polyhedron_demo_point_set_outliers_removal_plugin
-
-class Point_set_demo_outlier_removal_dialog : public QDialog, private Ui::OutlierRemovalDialog
-{
-  Q_OBJECT
-  public:
-    Point_set_demo_outlier_removal_dialog(QWidget * /*parent*/ = 0)
-    {
-      setupUi(this);
-    }
-
-    double percentage() const { return m_inputPercentage->value(); }
-    int nbNeighbors() const { return m_inputNbNeighbors->value(); }
-};
-
-void Polyhedron_demo_point_set_outliers_removal_plugin::on_actionOutlierRemoval_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    // Gets point set
-    Point_set* points = item->point_set();
-    if(points == NULL)
-        return;
-
-    // Gets options
-    Point_set_demo_outlier_removal_dialog dialog;
-    if(!dialog.exec())
-      return;
-    const double removed_percentage = dialog.percentage(); // percentage of points to remove
-    const int nb_neighbors = dialog.nbNeighbors();
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    CGAL::Timer task_timer; task_timer.start();
-    std::cerr << "Select outliers (" << removed_percentage <<"%)...\n";
-
-    // Computes outliers
-    Point_set::iterator first_point_to_remove =
-      CGAL::remove_outliers(points->begin(), points->end(),
-                            nb_neighbors,
-                            removed_percentage);
-
-    std::size_t nb_points_to_remove = std::distance(first_point_to_remove, points->end());
-    std::size_t memory = CGAL::Memory_sizer().virtual_size();
-    std::cerr << "Simplification: " << nb_points_to_remove << " point(s) are selected ("
-                                    << task_timer.time() << " seconds, "
-                                    << (memory>>20) << " Mb allocated)"
-                                    << std::endl;
-
-    // Selects points to delete
-    points->select(points->begin(), points->end(), false);
-    points->select(first_point_to_remove, points->end(), true);
-
-    // Updates scene
-    scene->itemChanged(index);
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_outliers_removal_plugin, Polyhedron_demo_point_set_outliers_removal_plugin)
-
-#include "Polyhedron_demo_point_set_outliers_removal_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui
deleted file mode 100644
index 2072156..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui
+++ /dev/null
@@ -1,109 +0,0 @@
-<ui version="4.0" >
- <class>OutlierRemovalDialog</class>
- <widget class="QDialog" name="OutlierRemovalDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>331</width>
-    <height>120</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Outlier Removal</string>
-  </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>Removed percentage:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" >
-    <widget class="QDoubleSpinBox" name="m_inputPercentage" >
-     <property name="suffix" >
-      <string> %</string>
-     </property>
-     <property name="minimum" >
-      <double>0.010000000000000</double>
-     </property>
-     <property name="maximum" >
-      <double>100.000000000000000</double>
-     </property>
-     <property name="singleStep" >
-      <double>0.100000000000000</double>
-     </property>
-     <property name="value" >
-      <double>5.000000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" >
-    <widget class="QLabel" name="label_2" >
-     <property name="text" >
-      <string>Neighbors</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" >
-    <widget class="QSpinBox" name="m_inputNbNeighbors" >
-     <property name="minimum" >
-      <number>6</number>
-     </property>
-     <property name="maximum" >
-      <number>9999</number>
-     </property>
-     <property name="value" >
-      <number>24</number>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" >
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>OutlierRemovalDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>OutlierRemovalDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp
deleted file mode 100644
index 81619ad..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/grid_simplify_point_set.h>
-#include <CGAL/random_simplify_point_set.h>
-#include <CGAL/compute_average_spacing.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QMessageBox>
-
-#include "ui_Polyhedron_demo_point_set_simplification_plugin.h"
-
-class Polyhedron_demo_point_set_simplification_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionSimplify;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    actionSimplify = new QAction(tr("Point set simplification selection"), mainWindow);
-    actionSimplify->setObjectName("actionSimplify");
-
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionSimplify;
-  }
-
-public slots:
-  void on_actionSimplify_triggered();
-
-}; // end Polyhedron_demo_point_set_simplification_plugin
-
-class Point_set_demo_point_set_simplification_dialog : public QDialog, private Ui::PointSetSimplificationDialog
-{
-  Q_OBJECT
-  public:
-    Point_set_demo_point_set_simplification_dialog(QWidget * /*parent*/ = 0)
-    {
-      setupUi(this);
-    }
-
-    QString simplificationMethod() const { return m_simplificationMethod->currentText(); }
-    double randomSimplificationPercentage() const { return m_randomSimplificationPercentage->value(); }
-    double gridCellSize() const { return m_gridCellSize->value(); }
-};
-
-void Polyhedron_demo_point_set_simplification_plugin::on_actionSimplify_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    // Gets point set
-    Point_set* points = item->point_set();
-    if(points == NULL)
-        return;
-
-    // Gets options
-    Point_set_demo_point_set_simplification_dialog dialog;
-    if(!dialog.exec())
-      return;
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    CGAL::Timer task_timer; task_timer.start();
-
-    // First point to delete
-    Point_set::iterator first_point_to_remove = points->end();
-
-    if (dialog.simplificationMethod() == "Random")
-    {
-      std::cerr << "Random point cloud simplification (" << dialog.randomSimplificationPercentage() <<"%)...\n";
-
-      // Computes points to remove by random simplification
-      first_point_to_remove =
-        CGAL::random_simplify_point_set(points->begin(), points->end(),
-                                        dialog.randomSimplificationPercentage());
-    }
-    else if (dialog.simplificationMethod() == "Grid Clustering")
-    {
-      std::cerr << "Point cloud simplification by clustering (cell size = " << dialog.gridCellSize() <<" * average spacing)...\n";
-
-      // Computes average spacing
-      double average_spacing = CGAL::compute_average_spacing(
-                                      points->begin(), points->end(),
-                                      6 /* knn = 1 ring */);
-
-      // Computes points to remove by Grid Clustering
-      first_point_to_remove =
-        CGAL::grid_simplify_point_set(points->begin(), points->end(),
-                                      dialog.gridCellSize()*average_spacing);
-    }
-
-    std::size_t nb_points_to_remove = std::distance(first_point_to_remove, points->end());
-    std::size_t memory = CGAL::Memory_sizer().virtual_size();
-    std::cerr << "Simplification: " << nb_points_to_remove << " point(s) are selected for removal ("
-                                    << task_timer.time() << " seconds, "
-                                    << (memory>>20) << " Mb allocated)"
-                                    << std::endl;
-
-    // Selects points to delete
-    points->select(points->begin(), points->end(), false);
-    points->select(first_point_to_remove, points->end(), true);
-
-    // Updates scene
-    scene->itemChanged(index);
-
-    QApplication::restoreOverrideCursor();
-
-    // Warns user
-    if (nb_points_to_remove > 0)
-    {
-      QMessageBox::information(NULL,
-                               tr("Points selected for removal"),
-                               tr("%1 point(s) are selected for removal.\nYou may delete or reset the selection using the item context menu.")
-                               .arg(nb_points_to_remove));
-    }
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_simplification_plugin, Polyhedron_demo_point_set_simplification_plugin)
-
-#include "Polyhedron_demo_point_set_simplification_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui
deleted file mode 100644
index 7c45142..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui
+++ /dev/null
@@ -1,142 +0,0 @@
-<ui version="4.0" >
- <class>PointSetSimplificationDialog</class>
- <widget class="QDialog" name="PointSetSimplificationDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>403</width>
-    <height>153</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Simplification</string>
-  </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>Method:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" >
-    <widget class="QComboBox" name="m_simplificationMethod" >
-     <item>
-      <property name="text" >
-       <string>Random</string>
-      </property>
-     </item>
-     <item>
-      <property name="text" >
-       <string>Grid Clustering</string>
-      </property>
-     </item>
-    </widget>
-   </item>
-   <item row="1" column="0" >
-    <widget class="QLabel" name="label_2" >
-     <property name="text" >
-      <string>Points to Remove Randomly</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" >
-    <widget class="QDoubleSpinBox" name="m_randomSimplificationPercentage" >
-     <property name="suffix" >
-      <string> %</string>
-     </property>
-     <property name="decimals" >
-      <number>2</number>
-     </property>
-     <property name="minimum" >
-      <double>0.100000000000000</double>
-     </property>
-     <property name="maximum" >
-      <double>100.000000000000000</double>
-     </property>
-     <property name="singleStep" >
-      <double>0.100000000000000</double>
-     </property>
-     <property name="value" >
-      <double>50.000000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0" >
-    <widget class="QLabel" name="label_3" >
-     <property name="text" >
-      <string>Grid Cell Size</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" >
-    <widget class="QDoubleSpinBox" name="m_gridCellSize" >
-     <property name="suffix" >
-      <string> * average spacing</string>
-     </property>
-     <property name="decimals" >
-      <number>2</number>
-     </property>
-     <property name="minimum" >
-      <double>0.100000000000000</double>
-     </property>
-     <property name="maximum" >
-      <double>10.000000000000000</double>
-     </property>
-     <property name="singleStep" >
-      <double>0.100000000000000</double>
-     </property>
-     <property name="value" >
-      <double>1.000000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="0" colspan="2" >
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>PointSetSimplificationDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>PointSetSimplificationDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp
deleted file mode 100644
index bb6001e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-
-#include <CGAL/jet_smooth_point_set.h>
-
-class Polyhedron_demo_point_set_smoothing_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionJetSmoothing;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    actionJetSmoothing = new QAction(tr("Point set jet smoothing"), mainWindow);
-    actionJetSmoothing->setObjectName("actionJetSmoothing");
-
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionJetSmoothing;
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionJetSmoothing_triggered();
-
-}; // end Polyhedron_demo_point_set_smoothing_plugin
-
-void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(item)
-  {
-    Point_set* points = item->point_set();
-    if(!points) return;
-
-    // Gets options
-    bool ok;
-    const unsigned int nb_neighbors =
-      QInputDialog::getInteger((QWidget*)mw,
-                               tr("Jet Smoothing"), // dialog title
-                               tr("Number of neighbors:"), // field label
-                               24, // default value = fast
-                               6, // min
-                               1000, // max
-                               1, // step
-                               &ok);
-    if(!ok) return;
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    CGAL::jet_smooth_point_set(points->begin(), points->end(), nb_neighbors);
-
-    points->invalidate_bounds();
-
-    // update scene
-    scene->itemChanged(index);
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_smoothing_plugin, Polyhedron_demo_point_set_smoothing_plugin)
-
-#include "Polyhedron_demo_point_set_smoothing_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp
deleted file mode 100644
index 9f0926a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-#include "config.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Scene_polyhedron_item.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QtPlugin>
-#include <QInputDialog>
-
-#include "ui_Polyhedron_demo_poisson_plugin.h"
-
-// Poisson reconstruction method:
-// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
-Polyhedron* poisson_reconstruct(const Point_set& points,
-                                Kernel::FT sm_angle, // Min triangle angle (degrees). 
-                                Kernel::FT sm_radius, // Max triangle size w.r.t. point set average spacing. 
-                                Kernel::FT sm_distance, // Approximation error w.r.t. point set average spacing.
-                                const QString& solver, // solver name
-                                bool use_two_passes);
-
-class Polyhedron_demo_poisson_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionPoissonReconstruction;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-
-    actionPoissonReconstruction = new QAction(tr("Poisson reconstruction"), mainWindow);
-    actionPoissonReconstruction->setObjectName("actionPoissonReconstruction");
-    
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  //! Applicate for Point_sets with normals.
-  bool applicable(QAction*) const {
-    Scene_points_with_normal_item* item =
-      qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-    return item && item->has_normals();
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionPoissonReconstruction;
-  }
-
-public slots:
-  void on_actionPoissonReconstruction_triggered();
-}; // end class Polyhedron_demo_poisson_plugin
-
-
-class Polyhedron_demo_poisson_plugin_dialog : public QDialog, private Ui::PoissonDialog
-{
-  Q_OBJECT
-  public:
-    Polyhedron_demo_poisson_plugin_dialog(QWidget* /*parent*/ = 0)
-    {
-      setupUi(this);
-
-      #ifdef CGAL_EIGEN3_ENABLED
-      m_inputSolver->addItem("Eigen - built-in simplicial LDLt");
-      m_inputSolver->addItem("Eigen - built-in CG");
-      #endif
-    }
-
-    double triangleAngle() const { return m_inputAngle->value(); }
-    double triangleRadius() const { return m_inputRadius->value(); }
-    double triangleError() const { return m_inputDistance->value(); }
-    bool use_two_passes() const { return m_inputTwoPasses->isChecked(); }
-    QString solver() const { return m_inputSolver->currentText(); }
-};
-
-void Polyhedron_demo_poisson_plugin::on_actionPoissonReconstruction_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* point_set_item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(point_set_item)
-  {
-    // Gets point set
-    Point_set* points = point_set_item->point_set();
-    if(!points) return;
-
-    // Gets options
-    Polyhedron_demo_poisson_plugin_dialog dialog;
-    if(!dialog.exec())
-      return;
-    const double sm_angle     = dialog.triangleAngle();
-    const double sm_radius    = dialog.triangleRadius();
-    const double sm_distance  = dialog.triangleError();
-    const QString sm_solver   = dialog.solver();
-    bool use_two_passes = dialog.use_two_passes();
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    // Reconstruct point set as a polyhedron
-    Polyhedron* pRemesh = poisson_reconstruct(*points, sm_angle, sm_radius, sm_distance, sm_solver, use_two_passes);
-    if(pRemesh)
-    {
-      // Add polyhedron to scene
-      Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pRemesh);
-      new_item->setName(tr("%1 Poisson (%2 %3 %4)")
-                         .arg(point_set_item->name())
-                         .arg(sm_angle)
-                         .arg(sm_radius)
-                         .arg(sm_distance));
-      new_item->setColor(Qt::lightGray);
-      scene->addItem(new_item);
-
-      // Hide point set
-      point_set_item->setVisible(false);
-      scene->itemChanged(index);
-    }
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_poisson_plugin, Polyhedron_demo_poisson_plugin)
-
-#include "Polyhedron_demo_poisson_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.ui
deleted file mode 100644
index 1e736e3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin.ui
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PoissonDialog</class>
- <widget class="QDialog" name="PoissonDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>390</width>
-    <height>312</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Poisson reconstruction</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Min triangle angle:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" colspan="2">
-    <widget class="QDoubleSpinBox" name="m_inputAngle">
-     <property name="suffix">
-      <string> °</string>
-     </property>
-     <property name="minimum">
-      <double>1.000000000000000</double>
-     </property>
-     <property name="maximum">
-      <double>30.000000000000000</double>
-     </property>
-     <property name="value">
-      <double>20.000000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Max triangle size:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" colspan="2">
-    <widget class="QDoubleSpinBox" name="m_inputRadius">
-     <property name="suffix">
-      <string> * average spacing</string>
-     </property>
-     <property name="decimals">
-      <number>0</number>
-     </property>
-     <property name="minimum">
-      <double>1.000000000000000</double>
-     </property>
-     <property name="maximum">
-      <double>1000.000000000000000</double>
-     </property>
-     <property name="singleStep">
-      <double>1.000000000000000</double>
-     </property>
-     <property name="value">
-      <double>100.000000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="label_3">
-     <property name="text">
-      <string>Approximation error:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" colspan="2">
-    <widget class="QDoubleSpinBox" name="m_inputDistance">
-     <property name="suffix">
-      <string> * average spacing</string>
-     </property>
-     <property name="decimals">
-      <number>6</number>
-     </property>
-     <property name="minimum">
-      <double>0.010000000000000</double>
-     </property>
-     <property name="maximum">
-      <double>100.000000000000000</double>
-     </property>
-     <property name="singleStep">
-      <double>0.010000000000000</double>
-     </property>
-     <property name="value">
-      <double>0.250000000000000</double>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="0" colspan="2">
-    <widget class="QLabel" name="label_4">
-     <property name="text">
-      <string>Solver:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="2">
-    <widget class="QComboBox" name="m_inputSolver">
-     <property name="toolTip">
-      <string extracomment="Name of the sparse solver"/>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="2">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0" colspan="2">
-    <widget class="QCheckBox" name="m_inputTwoPasses">
-     <property name="text">
-      <string>Uses two passes</string>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>PoissonDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>177</x>
-     <y>123</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>53</x>
-     <y>125</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>PoissonDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>257</x>
-     <y>119</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>257</x>
-     <y>143</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp
deleted file mode 100644
index c1232ec..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-//----------------------------------------------------------
-// Poisson reconstruction method:
-// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
-//----------------------------------------------------------
-
-
-// CGAL
-#include <CGAL/AABB_tree.h> // must be included before kernel
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Surface_mesh_default_triangulation_3.h>
-#include <CGAL/make_surface_mesh.h>
-#include <CGAL/Implicit_surface_3.h>
-#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
-#include <CGAL/Poisson_reconstruction_function.h>
-#include <CGAL/compute_average_spacing.h>
-
-#ifdef CGAL_EIGEN3_ENABLED
-#include <CGAL/Eigen_solver_traits.h>
-#endif
-
-#include <math.h>
-
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include "Scene_points_with_normal_item.h"
-
-
-// Poisson implicit function
-typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
-
-// Surface mesher
-typedef CGAL::Surface_mesh_default_triangulation_3 STr;
-typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
-typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
-
-// AABB tree
-typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
-typedef CGAL::AABB_tree<AABB_traits> AABB_tree;
-
-
-// Poisson reconstruction method:
-// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
-Polyhedron* poisson_reconstruct(const Point_set& points,
-                                Kernel::FT sm_angle, // Min triangle angle (degrees).
-                                Kernel::FT sm_radius, // Max triangle size w.r.t. point set average spacing.
-                                Kernel::FT sm_distance, // Approximation error w.r.t. point set average spacing.
-                                const QString& solver_name,
-                                bool use_two_passes) // solver name
-{
-    CGAL::Timer task_timer; task_timer.start();
-
-    //***************************************
-    // Checks requirements
-    //***************************************
-
-    if (points.size() == 0)
-    {
-      std::cerr << "Error: empty point set" << std::endl;
-      return NULL;
-    }
-
-    bool points_have_normals = (points.begin()->normal() != CGAL::NULL_VECTOR);
-    if ( ! points_have_normals )
-    {
-      std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
-      return NULL;
-    }
-
-    CGAL::Timer reconstruction_timer; reconstruction_timer.start();
-
-    //***************************************
-    // Computes implicit function
-    //***************************************
-
-    std::cerr << "Computes Poisson implicit function "
-              << "using " << solver_name.toAscii().data() << " solver...\n";
-              
-    
-    // Creates implicit function from the point set.
-    // Note: this method requires an iterator over points
-    // + property maps to access each point's position and normal.
-    // The position property map can be omitted here as we use iterators over Point_3 elements.
-    Poisson_reconstruction_function function(
-                              points.begin(), points.end(),
-                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
-
-    bool ok = false;    
-    #ifdef CGAL_EIGEN3_ENABLED
-    if(solver_name=="Eigen - built-in simplicial LDLt")
-    {
-      CGAL::Eigen_solver_traits<Eigen::SimplicialCholesky<CGAL::Eigen_sparse_matrix<double>::EigenType> > solver;
-      ok = function.compute_implicit_function(solver, use_two_passes);
-    }
-    if(solver_name=="Eigen - built-in CG")
-    {
-      CGAL::Eigen_solver_traits<Eigen::ConjugateGradient<CGAL::Eigen_sparse_matrix<double>::EigenType> > solver;
-      solver.solver().setTolerance(1e-6);
-      solver.solver().setMaxIterations(1000);
-      ok = function.compute_implicit_function(solver, use_two_passes);
-    }
-    #endif
-
-    // Computes the Poisson indicator function f()
-    // at each vertex of the triangulation.
-    if ( ! ok )
-    {
-      std::cerr << "Error: cannot compute implicit function" << std::endl;
-      return NULL;
-    }
-
-    // Prints status
-    std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
-    task_timer.reset();
-
-    //***************************************
-    // Surface mesh generation
-    //***************************************
-
-    std::cerr << "Surface meshing...\n";
-
-    // Computes average spacing
-    Kernel::FT average_spacing = CGAL::compute_average_spacing(points.begin(), points.end(),
-                                                       6 /* knn = 1 ring */);
-
-    // Gets one point inside the implicit surface
-    Kernel::Point_3 inner_point = function.get_inner_point();
-    Kernel::FT inner_point_value = function(inner_point);
-    if(inner_point_value >= 0.0)
-    {
-      std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
-      return NULL;
-    }
-
-    // Gets implicit function's radius
-    Kernel::Sphere_3 bsphere = function.bounding_sphere();
-    Kernel::FT radius = std::sqrt(bsphere.squared_radius());
-
-    // Defines the implicit surface: requires defining a
-  	// conservative bounding sphere centered at inner point.
-    Kernel::FT sm_sphere_radius = 5.0 * radius;
-    Kernel::FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
-    Surface_3 surface(function,
-                      Kernel::Sphere_3(inner_point,sm_sphere_radius*sm_sphere_radius),
-                      sm_dichotomy_error/sm_sphere_radius);
-
-    // Defines surface mesh generation criteria
-    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
-                                                        sm_radius*average_spacing,  // Max triangle size
-                                                        sm_distance*average_spacing); // Approximation error
-
-    CGAL_TRACE_STREAM << "  make_surface_mesh(sphere center=("<<inner_point << "),\n"
-                      << "                    sphere radius="<<sm_sphere_radius<<",\n"
-                      << "                    angle="<<sm_angle << " degrees,\n"
-                      << "                    triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
-                      << "                    distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
-                      << "                    dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
-                      << "                    Manifold_with_boundary_tag)\n";
-
-    // Generates surface mesh with manifold option
-    STr tr; // 3D Delaunay triangulation for surface mesh generation
-    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
-    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
-                            surface,                              // implicit surface
-                            criteria,                             // meshing criteria
-                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
-
-    // Prints status
-    std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
-                                     << tr.number_of_vertices() << " output vertices"
-                                     << std::endl;
-    task_timer.reset();
-
-    if(tr.number_of_vertices() == 0)
-      return NULL;
-
-    // Converts to polyhedron
-    Polyhedron* output_mesh = new Polyhedron;
-    CGAL::output_surface_facets_to_polyhedron(c2t3, *output_mesh);
-
-    // Prints total reconstruction duration
-    std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";
-
-    //***************************************
-    // Computes reconstruction error
-    //***************************************
-
-    // Constructs AABB tree and computes internal KD-tree
-    // data structure to accelerate distance queries
-    AABB_tree tree(faces(*output_mesh).first, faces(*output_mesh).second, *output_mesh);
-    tree.accelerate_distance_queries();
-
-    // Computes distance from each input point to reconstructed mesh
-    double max_distance = DBL_MIN;
-    double avg_distance = 0;
-    for (Point_set::const_iterator p=points.begin(); p!=points.end(); p++)
-    {
-      double distance = std::sqrt(tree.squared_distance(*p));
-
-      max_distance = (std::max)(max_distance, distance);
-      avg_distance += distance;
-    }
-    avg_distance /= double(points.size());
-
-    std::cerr << "Reconstruction error:\n"
-              << "  max = " << max_distance << " = " << max_distance/average_spacing << " * average spacing\n"
-              << "  avg = " << avg_distance << " = " << avg_distance/average_spacing << " * average spacing\n";
-
-    return output_mesh;
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp
deleted file mode 100644
index 4a139ee..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp
+++ /dev/null
@@ -1,363 +0,0 @@
-#include <QtCore/qglobal.h>
-#include <CGAL/AABB_intersections.h>
-
-#include "Messages_interface.h"
-#include "Scene_item_with_display_list.h"
-#include "Scene_plane_item.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polylines_item.h"
-
-#include "Polyhedron_demo_plugin_interface.h"
-#include "ui_Polyhedron_slicer_widget.h"
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/bounding_box.h> 
-#include <CGAL/Polyhedron_slicer_3.h>
-
-#include "Polyhedron_type.h"
-
-#include <QTime>
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-#include <QDockWidget>
-
-#include <vector>
-#include <algorithm>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
-
-class Polyhedron_demo_polyhedron_slicer_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  bool applicable(QAction*) const { return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())); }
-  void print_message(QString message) { messages->information(message);}
-
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m);
-  QList<QAction*> actions() const;
-  Scene_polyhedron_item* get_selected_item() {
-    int item_id = scene->mainSelectionIndex();
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(item_id));
-    if(!poly_item) {
-      int counter = 0;
-      for(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end && counter < 2; ++i) {
-        if(Scene_polyhedron_item* tmp = qobject_cast<Scene_polyhedron_item*>(scene->item(i))) { 
-          poly_item = tmp;
-          counter++; 
-        }
-      }
-      if(counter != 1) { return NULL; }
-    } 
-    return poly_item;
-  }
-  bool get_base_1_2(double bases[6]) {
-    bool oks[6];
-    bases[0] = ui_widget->Base_1_x->text().toDouble(&oks[0]);
-    bases[1] = ui_widget->Base_1_y->text().toDouble(&oks[1]);
-    bases[2] = ui_widget->Base_1_z->text().toDouble(&oks[2]);
-
-    bases[3] = ui_widget->Base_2_x->text().toDouble(&oks[3]);
-    bases[4] = ui_widget->Base_2_y->text().toDouble(&oks[4]);
-    bases[5] = ui_widget->Base_2_z->text().toDouble(&oks[5]);
-
-    bool total_ok = true;
-    for(int i = 0; i < 6; ++i && total_ok) { total_ok &= oks[i];}
-    return total_ok;
-  }
-public slots:
-  void slicer_widget_action();
-  void on_Generate_button_clicked();
-  bool on_Update_plane_button_clicked();
-  void plane_manipulated_frame_modified();
-  void plane_destroyed();
-
-private:
-  Scene_interface* scene;
-  Messages_interface* messages;
-  Scene_plane_item* plane_item;
-  QAction* actionSlicerWidget;
-
-  QDockWidget* dock_widget;
-  Ui::Polyhedron_slicer_widget* ui_widget;
-
-  void intersection_of_plane_Polyhedra_3_using_AABB_wrapper(Polyhedron& mesh, 
-    const std::vector<Epic_kernel::Plane_3>& planes,
-    const std::vector<qglviewer::Vec>& plane_positions,
-    std::list<std::vector<Epic_kernel::Point_3> >& polylines);
-
-}; // end Polyhedron_demo_polyhedron_slicer_plugin
-
-void Polyhedron_demo_polyhedron_slicer_plugin::init(QMainWindow* mw,
-                                      Scene_interface* scene_interface,
-                                      Messages_interface* m)
-{
-  scene = scene_interface;
-  messages = m;
-  actionSlicerWidget = new QAction(tr("Polyhedron slicer"), mw);
-  connect(actionSlicerWidget, SIGNAL(triggered()),
-          this, SLOT(slicer_widget_action()));
-
-  dock_widget = new QDockWidget("Polyhedron slicer parameters", mw);
-  dock_widget->setVisible(false); // do not show at the beginning
-  dock_widget->setObjectName("PolyhedronSlicerParametersDialog");
-  ui_widget = new Ui::Polyhedron_slicer_widget();
-
-  QWidget* qw =new QWidget();
-  ui_widget->setupUi(qw);
-  dock_widget->setWidget(qw);
-  mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
-
-  connect(ui_widget->Generate_button,  SIGNAL(clicked()), this, SLOT(on_Generate_button_clicked()));   
-  connect(ui_widget->Update_plane_button,  SIGNAL(clicked()), this, SLOT(on_Update_plane_button_clicked())); 
-}
-
-QList<QAction*> Polyhedron_demo_polyhedron_slicer_plugin::actions() const {
-  return QList<QAction*>() << actionSlicerWidget;
-}
-
-void Polyhedron_demo_polyhedron_slicer_plugin::slicer_widget_action(){
-  if(dock_widget != NULL && !dock_widget->isVisible()) { 
-    dock_widget->show(); 
-
-    ///// from cut plugin /////
-    plane_item = new Scene_plane_item(scene);
-    const Scene_interface::Bbox& bbox = scene->bbox();
-    plane_item->setPosition((bbox.xmin + bbox.xmax)/2.f,
-      (bbox.ymin+bbox.ymax)/2.f,
-      (bbox.zmin+bbox.zmax)/2.f);
-    plane_item->setNormal(0., 0., 1.);
-    plane_item->setManipulatable(true);
-    plane_item->setClonable(false);
-    plane_item->setColor(Qt::green);
-    plane_item->setName(tr("Cutting plane"));
-    connect(plane_item->manipulatedFrame(), SIGNAL(modified()),
-      this, SLOT(plane_manipulated_frame_modified()));
-    connect(plane_item, SIGNAL(destroyed()),
-      this, SLOT(plane_destroyed()));
-    scene->addItem(plane_item);
-
-    // set distance_with_planes = bbox_diagona / 30
-    double diagonal = std::sqrt(
-      CGAL::squared_distanceC3( bbox.xmin, bbox.ymin, bbox.zmin, bbox.xmax, bbox.ymax, bbox.zmax) );
-    ui_widget->Distance_with_planes->setText(QString::number(diagonal / 30.0));
-
-    plane_manipulated_frame_modified(); // update text boxes
-  }
-}
-
-// when manipulated frame of plane is modified, update line-edits
-void Polyhedron_demo_polyhedron_slicer_plugin::plane_manipulated_frame_modified() {
-  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
-  const qglviewer::Vec& pos = mf->position();
-  ui_widget->Center_x->setText(QString::number(pos.x));
-  ui_widget->Center_y->setText(QString::number(pos.y));
-  ui_widget->Center_z->setText(QString::number(pos.z));
-
-  const qglviewer::Vec& base_1 = mf->inverseTransformOf(qglviewer::Vec(1., 0., 0.));
-  const qglviewer::Vec& base_2 = mf->inverseTransformOf(qglviewer::Vec(0., 1., 0.));
-
-  ui_widget->Base_1_x->setText(QString::number(base_1.x));
-  ui_widget->Base_1_y->setText(QString::number(base_1.y));
-  ui_widget->Base_1_z->setText(QString::number(base_1.z));
-
-  ui_widget->Base_2_x->setText(QString::number(base_2.x));
-  ui_widget->Base_2_y->setText(QString::number(base_2.y));
-  ui_widget->Base_2_z->setText(QString::number(base_2.z));
-}
-
-// when Update Plane button is clicked, update manipulated frame of plane with line-edits
-bool Polyhedron_demo_polyhedron_slicer_plugin::on_Update_plane_button_clicked() {
-  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
-  // get center
-  bool ok_1 = true, ok_2 = true, ok_3 = true;
-  double center_x = ui_widget->Center_x->text().toDouble(&ok_1);
-  double center_y = ui_widget->Center_y->text().toDouble(&ok_2);
-  double center_z = ui_widget->Center_z->text().toDouble(&ok_3);
-  if(!ok_1 || !ok_2 || !ok_3) 
-  { print_message("Error: center coordinates not convertible to double."); return false; }
-
-  // set center
-  bool oldState = mf->blockSignals(true); // dont let it signal, it will invoke plane_manipulated_frame_modified otherwise
-  mf->setPosition(center_x, center_y, center_z);
-  mf->blockSignals(oldState);
-
-  // get base 1 and base 2
-  double bases[6];
-  if(!get_base_1_2(bases)) 
-  { print_message("Error: Base-1, Base-2 coordinates not convertible to double."); return false; }
-
-  // compute other axis
-  qglviewer::Vec base_1(bases[0], bases[1], bases[2]);
-  qglviewer::Vec base_2(bases[3], bases[4], bases[5]);
-  qglviewer::Vec other = cross(base_1, base_2);
-  if(other.norm() == 0.0) { print_message("Error: collinear base vectors are not accepted!"); return false; }
-  
-  // set orientation
-  qglviewer::Quaternion orientation_from_bases;
-  orientation_from_bases.setFromRotatedBasis(base_1, base_2, other);
-
-  oldState = mf->blockSignals(true); // dont let it signal, it will invoke plane_manipulated_frame_modified otherwise
-  mf->setOrientation(orientation_from_bases);
-  mf->blockSignals(oldState);
-
-  scene->itemChanged(plane_item); // redraw
-  return true;
-}
-
-// generate multiple cuts, until any cut does not intersect with bbox
-void Polyhedron_demo_polyhedron_slicer_plugin::on_Generate_button_clicked()
-{
-  Scene_polyhedron_item* item = get_selected_item();
-  if(!item) { 
-    print_message("Error: There is no selected Scene_polyhedron_item!");
-    return; 
-  }
-
-  if(!on_Update_plane_button_clicked()) { return; }
-
-  // get plane position and normal
-  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
-  const qglviewer::Vec& pos = mf->position();
-  // WARNING: due to fp arithmetic (setting quaternion based orientation from base vectors then getting plane normal back from this orientation)
-  // for base vectors like: 1,0,0 - 0,1,0 we might not have exact corresponding normal vector.
-  // So not using below normal but construct plane directly from bases from text boxes
-  const qglviewer::Vec& n = mf->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-
-  // get bases
-  double bases[6];
-  get_base_1_2(bases); // no need to check since we call on_Update_plane_button_clicked
-  Epic_kernel::Vector_3 base_1(bases[0], bases[1], bases[2]);
-  Epic_kernel::Vector_3 base_2(bases[3], bases[4], bases[5]);
-
-  // get distance between planes
-  bool to_double_ok = true;
-  double distance_with_planes = ui_widget->Distance_with_planes->text().toDouble(&to_double_ok);
-  if(!to_double_ok) { 
-    print_message("Error: Set Distance_with_planes text box!");
-    return; 
-  }
-
-  // construct a bbox for selected polyhedron
-  const Scene_interface::Bbox& bbox = item->bbox();
-  CGAL::Bbox_3 cgal_bbox(bbox.xmin, bbox.ymin, bbox.zmin,
-    bbox.xmax, bbox.ymax, bbox.zmax);
-  Polyhedron* poly = item->polyhedron();
-
-  // continue generating planes while inside bbox
-  std::vector<Epic_kernel::Plane_3> planes;
-  std::vector<qglviewer::Vec> plane_positions;
-
-  for(int dir = 1, step = 0; /* */ ; ++step) 
-  {
-    double distance_norm = (dir * step) * distance_with_planes;
-    qglviewer::Vec new_pos = pos + (n*distance_norm);
-
-    //Epic_kernel::Plane_3 plane(n[0], n[1],  n[2], - n * new_pos);
-    Epic_kernel::Point_3 new_pos_cgal(new_pos[0], new_pos[1], new_pos[2]);
-    Epic_kernel::Plane_3 plane(new_pos_cgal, new_pos_cgal + base_1, new_pos_cgal + base_2);
-
-    if(!CGAL::do_intersect(cgal_bbox, plane)) { 
-      if(dir == -1) { break; }
-      std::reverse(planes.begin(), planes.end());
-      std::reverse(plane_positions.begin(), plane_positions.end());
-      dir = -1; // reverse direction
-      step = 0; // we should skip the plane itself, and we will when continue cause ++step
-      continue;
-    }
-    planes.push_back(plane);
-    plane_positions.push_back(new_pos); 
-  }
-  print_message(QString("Created %1 cuts inside bbox...").arg(planes.size()));
-
-  bool new_polyline_item_for_polylines = ui_widget->newPolylineItemCheckBox->checkState() == Qt::Checked;
-  if(!new_polyline_item_for_polylines) 
-  {
-    Scene_polylines_item* new_polylines_item = new Scene_polylines_item();
-    QTime time; time.start();
-    // call algorithm and fill polylines in polylines_item
-    intersection_of_plane_Polyhedra_3_using_AABB_wrapper(*poly, planes, plane_positions, new_polylines_item->polylines);
-    // set names etc and print timing
-    print_message( QString("Done: processed %1 cuts - generated %2 polylines in %3 ms!").
-      arg(planes.size()).arg(new_polylines_item->polylines.size()).arg(time.elapsed()) );
-
-    new_polylines_item->setName(QString("%1 with %2 cuts").
-      arg(item->name()).arg(planes.size()) );
-    new_polylines_item->setColor(Qt::green);
-    new_polylines_item->setRenderingMode(Wireframe);
-    scene->addItem(new_polylines_item);
-  }
-  else {
-    QTime time; time.start();
-    std::list<std::vector<Epic_kernel::Point_3> > polylines;
-    // call algorithm and fill polylines in polylines_item
-    intersection_of_plane_Polyhedra_3_using_AABB_wrapper(*poly, planes, plane_positions, polylines);
-    // set names etc and print timing
-    print_message( QString("Done: processed %1 cuts - generated %2 polylines in %3 ms!").
-      arg(planes.size()).arg(polylines.size()).arg(time.elapsed()) );
-
-    int counter = 0;
-    for(std::list<std::vector<Epic_kernel::Point_3> >::iterator it = polylines.begin(); it != polylines.end(); ++it, ++counter) {
-      Scene_polylines_item* new_polylines_item = new Scene_polylines_item();
-      new_polylines_item->polylines.push_back(*it);
-      new_polylines_item->setName(QString("%1 with %2 cuts %3").
-        arg(item->name()).arg(planes.size()).arg(counter) );
-      new_polylines_item->setColor(Qt::green);
-      new_polylines_item->setRenderingMode(Wireframe);
-      scene->addItem(new_polylines_item);
-    }
-  }
-}
-
-void Polyhedron_demo_polyhedron_slicer_plugin::plane_destroyed() {
-  dock_widget->hide(); 
-}
-
-// this function assumes 'planes' are parallel
-void Polyhedron_demo_polyhedron_slicer_plugin::intersection_of_plane_Polyhedra_3_using_AABB_wrapper(
-  Polyhedron& poly, 
-  const std::vector<Epic_kernel::Plane_3>& planes,
-  const std::vector<qglviewer::Vec>& plane_positions,
-  std::list<std::vector<Epic_kernel::Point_3> >& polylines) 
-{
-  typedef std::list<std::vector<Epic_kernel::Point_3> >::iterator Polyline_it;
-
-  std::size_t nb_projection = 0;
-  CGAL::Polyhedron_slicer_3<Polyhedron, Epic_kernel> slicer(poly);
-  std::vector<qglviewer::Vec>::const_iterator plane_position_it = plane_positions.begin();
-  for(std::vector<Epic_kernel::Plane_3>::const_iterator plane_it = planes.begin(); plane_it != planes.end(); ++plane_it, ++plane_position_it) 
-  {
-    Polyline_it last_processed_polyline = polylines.begin();
-    slicer(*plane_it, std::front_inserter(polylines));
-    
-    double a = planes.front().a(); double b = planes.front().b(); double c = planes.front().c();
-    // std::cout << "plane a, b, c: " << a << " " << b << " " << c << std::endl;
-    int on_axis = (a == 0.0 && b == 0.0) ? 2 :
-      (a == 0.0 && c == 0.0) ? 1 :
-      (b == 0.0 && c == 0.0) ? 0 : -1;
-    
-    // continue if planes are not axis oriented
-    if( on_axis == -1) { continue; }
-    ++nb_projection;
-
-    for(Polyline_it polyline_it = polylines.begin(); polyline_it != last_processed_polyline; ++polyline_it) 
-    {
-      for(std::vector<Epic_kernel::Point_3>::iterator point_it = polyline_it->begin();
-        point_it != polyline_it->end(); ++ point_it) 
-      {
-        *point_it = Epic_kernel::Point_3(
-          on_axis != 0 ? point_it->x() : plane_position_it->x,
-          on_axis != 1 ? point_it->y() : plane_position_it->y,
-          on_axis != 2 ? point_it->z() : plane_position_it->z);
-      }
-    }
-  }
-  print_message(QString("%1 axis aligned planes are found, and points are projected...").arg(nb_projection));
-}
-Q_EXPORT_PLUGIN2(Polyhedron_demo_polyhedron_slicer_plugin, Polyhedron_demo_polyhedron_slicer_plugin)
-
-#include "Polyhedron_demo_polyhedron_slicer_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp
deleted file mode 100644
index c6b90c2..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-#include <QApplication>
-#include <QMessageBox>
-#include <QMainWindow>
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polylines_item.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/Polyhedron_stitching.h>
-
-#include <CGAL/boost/graph/split_graph_into_polylines.h>
-#include <CGAL/boost/graph/helpers.h>
-#include <boost/graph/filtered_graph.hpp>
-
-template <typename G>
-struct Is_border {
-  const G& g;
-  Is_border(const G& g)
-    : g(g)
-  {}
-
- template <typename Edge>
-  bool operator()(const Edge& e) const {
-   return is_border(e,g);
-  }
-};
-
-
-
-class Polyhedron_demo_polyhedron_stitching_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionDetectBorders;
-  QAction* actionStitchBorders;
-public:
-  QList<QAction*> actions() const { return QList<QAction*>() << actionDetectBorders << actionStitchBorders; }
-  using Polyhedron_demo_plugin_helper::init;
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* /* m */)
-  {
-    actionDetectBorders= new QAction(tr("Detect polyhedron boundaries"), mainWindow);
-    actionStitchBorders= new QAction(tr("Stitch polyhedron duplicated boundaries"), mainWindow);
-    actionDetectBorders->setObjectName("actionDetectBorders");
-    actionStitchBorders->setObjectName("actionStitchBorders");
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  bool applicable(QAction*) const {
-    Q_FOREACH(int index, scene->selectionIndices())
-    {
-      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(index)) )
-        return true;
-    }
-    return false;
-  }
-
-public slots:
-  void on_actionDetectBorders_triggered();
-  void on_actionStitchBorders_triggered();
-
-}; // end Polyhedron_demo_polyhedron_stitching_plugin
-
-
-
-struct Polyline_visitor
-{
-  Scene_polylines_item* new_item;
-
-  Polyline_visitor(Scene_polylines_item* new_item)
-    : new_item(new_item)
-  {}
-
-  void start_new_polyline()
-  {
-    new_item->polylines.push_back( Scene_polylines_item::Polyline() );
-  }
-
-  void add_node(boost::graph_traits<Polyhedron>::vertex_descriptor vd)
-  {
-    new_item->polylines.back().push_back(vd->point());
-  }
-};
-
-void Polyhedron_demo_polyhedron_stitching_plugin::on_actionDetectBorders_triggered()
-{
-  Q_FOREACH(int index, scene->selectionIndices())
-  {
-    Scene_polyhedron_item* item =
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-    if(item)
-    {
-      Scene_polylines_item* new_item = new Scene_polylines_item();
-
-      Polyhedron* pMesh = item->polyhedron();
-      pMesh->normalize_border();
-
-#if 0
-      for (Polyhedron::Halfedge_iterator
-              it=pMesh->border_halfedges_begin(), it_end=pMesh->halfedges_end();
-              it!=it_end; ++it)
-      {
-        if (!it->is_border()) continue;
-        /// \todo build cycles and graph with nodes of valence 2.
-        new_item->polylines.push_back( Scene_polylines_item::Polyline() );
-        new_item->polylines.back().push_back( it->opposite()->vertex()->point() );
-        new_item->polylines.back().push_back( it->vertex()->point() );
-      }
-#else
-      typedef boost::filtered_graph<Polyhedron,Is_border<Polyhedron> > BorderGraph;
-      
-      Is_border<Polyhedron> ib(*pMesh);
-      BorderGraph bg(*pMesh,ib);
-      Polyline_visitor polyline_visitor(new_item); 
-      CGAL::split_graph_into_polylines( bg,
-                                        polyline_visitor,
-                                        CGAL::IsTerminalDefault() );
-#endif
-      
-      if (new_item->polylines.empty())
-      {
-        delete new_item;
-      }
-      else
-      {
-        new_item->setName(tr("Boundary of %1").arg(item->name()));
-        new_item->setColor(Qt::red);
-        scene->addItem(new_item);
-      }
-    }
-  }
-}
-
-void Polyhedron_demo_polyhedron_stitching_plugin::on_actionStitchBorders_triggered()
-{
-  Q_FOREACH(int index, scene->selectionIndices())
-  {
-    Scene_polyhedron_item* item =
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-    if(item)
-    {
-      Polyhedron* pMesh = item->polyhedron();
-      CGAL::polyhedron_stitching(*pMesh);
-      scene->itemChanged(item);
-    }
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_polyhedron_stitching_plugin, Polyhedron_demo_polyhedron_stitching_plugin)
-
-#include "Polyhedron_demo_polyhedron_stitching_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp
deleted file mode 100644
index f6e3e36..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-#include "Scene_polylines_item.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-#include <QVariant>
-#include <boost/foreach.hpp>
-
-class Polyhedron_demo_polylines_io_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "polylines_io_plugin"; }
-  QString nameFilters() const { return "Polylines files (*.polylines.txt *.cgal)"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-bool Polyhedron_demo_polylines_io_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Polyhedron_demo_polylines_io_plugin::load(QFileInfo fileinfo) {
-
-  // Open file
-  std::ifstream ifs(fileinfo.filePath().toUtf8());
-  if(!ifs) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-
-  std::list<std::vector<Scene_polylines_item::Point_3> > polylines;
-  QStringList polylines_metadata;
-  
-  int counter = 0;
-  std::size_t n;
-  while(ifs >> n) {
-    ++counter;
-    std::cerr << "Polyline #" << polylines.size() << ": " << n << " vertices";
-    polylines.resize(polylines.size()+1);
-    std::vector<Scene_polylines_item::Point_3>& polyline = *(polylines.rbegin());
-    while(n--){
-      Scene_polylines_item::Point_3 p;
-      ifs >> p;
-      polyline.push_back(p);
-      if(!ifs.good()) return 0;
-    }
-    std::string line_remainder;
-    std::getline(ifs, line_remainder);
-    QString metadata(line_remainder.c_str());
-    if(metadata[0].isSpace()) {
-      metadata.remove(0, 1);
-    }
-    polylines_metadata << metadata;
-    if(!metadata.isEmpty()) {
-      std::cerr << " (metadata: \"" << qPrintable(metadata) << "\")\n";
-    } else {
-      std::cerr << "\n";
-    }
-    if(ifs.bad() || ifs.fail()) return 0;
-  }
-  if(counter == 0) return 0;
-  Scene_polylines_item* item = new Scene_polylines_item;
-  item->polylines = polylines;
-  item->setName(fileinfo.baseName());
-  item->setColor(Qt::black);
-  item->setProperty("polylines metadata", polylines_metadata);
-  std::cerr << "Number of polylines in item: " << item->polylines.size() << std::endl;
-  return item;
-}
-
-bool Polyhedron_demo_polylines_io_plugin::canSave(const Scene_item* item)
-{
-  return qobject_cast<const Scene_polylines_item*>(item) != 0;
-}
-
-bool Polyhedron_demo_polylines_io_plugin::save(const Scene_item* item, QFileInfo fileinfo)
-{
-  const Scene_polylines_item* poly_item = 
-    qobject_cast<const Scene_polylines_item*>(item);
-
-  if(!poly_item)
-    return false;
-
-  std::ofstream out(fileinfo.filePath().toUtf8());
-
-  out.precision(17);
-
-  if(!out) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return false;
-  }
-
-  typedef Scene_polylines_item::Polylines_container Polylines_container;
-  typedef Polylines_container::value_type Polyline;
-  typedef Polyline::value_type Point_3;
-
-  QStringList metadata = item->property("polylines metadata").toStringList();
-
-  BOOST_FOREACH(const Polyline& polyline, poly_item->polylines) {
-    out << polyline.size();
-    BOOST_FOREACH(const Point_3& p, polyline) {
-      out << " " << p.x() << " " << p.y() << " " << p.z();
-    }
-    if(!metadata.isEmpty()) {
-      out << " " << qPrintable(metadata.front());
-      metadata.pop_front();
-    }
-    out << std::endl;
-  }
-  return (bool) out;
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_polylines_io_plugin, Polyhedron_demo_polylines_io_plugin)
-#include "Polyhedron_demo_polylines_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp
deleted file mode 100644
index 03e903f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-#include "config.h"
-#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "ui_Remeshing_dialog.h"
-
-#include <QObject>
-#include <QAction>
-#include <QMainWindow>
-#include <QMenu>
-#include <QApplication>
-#include <QtPlugin>
-#include "Scene_polyhedron_item.h"
-#include <QInputDialog>
-#include <QStringList>
-
-// declare the CGAL function
-Scene_item* cgal_code_remesh(QWidget* parent,
-                             Polyhedron*,
-                             const double angle,
-                             const double sizing,
-                             const double approx,
-                             int tag);
-
-class Polyhedron_demo_remeshing_plugin : 
-  public QObject,
-  protected Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionRemeshing = this->getActionFromMainWindow(mw, "actionRemeshing");
-    if(actionRemeshing) {
-      connect(actionRemeshing, SIGNAL(triggered()),
-              this, SLOT(remesh()));
-    }
-  }
-
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionRemeshing;
-  }
-public slots:
-  void remesh();
-
-private:
-  QAction* actionRemeshing;
-}; // end class Polyhedron_demo_remeshing_plugin
-
-void Polyhedron_demo_remeshing_plugin::remesh()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    if(!pMesh) return;
-
-    // TODO: 
-    // sizing and approximation parameters should be expressed as ratio of 
-    // scene bbox diagonal.
-
-    QDialog dialog(mw);
-    Ui::Remeshing_dialog ui;
-    ui.setupUi(&dialog);
-    connect(ui.buttonBox, SIGNAL(accepted()),
-            &dialog, SLOT(accept()));
-    connect(ui.buttonBox, SIGNAL(rejected()),
-            &dialog, SLOT(reject()));
-    double diag = scene->len_diagonal();
-
-    ui.sizing->setDecimals(4);
-    ui.sizing->setRange(diag * 10e-6, // min
-                       diag); // max
-    ui.sizing->setValue(diag * 0.05); // default value
-
-    ui.approx->setDecimals(6);
-    ui.approx->setRange(diag * 10e-7, // min
-                       diag); // max
-    ui.approx->setValue(diag * 0.005);
-
-
-    int i = dialog.exec();
-    if(i == QDialog::Rejected)
-      return;
-
-    const double angle = ui.angle->value();
-    const double approx = ui.approx->value();
-    const double sizing = ui.sizing->value();
-    const int tag_index = ui.tags->currentIndex();
-    if(tag_index < 0) return;
-
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    std::cerr << "remesh with:"
-              << "\n  angle=" << angle
-              << "\n  sizing=" << sizing
-              << "\n  approx=" << approx
-              << "\n  tag=" << tag_index
-              << std::boolalpha
-              << std::endl;
-    Scene_item* new_item = cgal_code_remesh(mw, 
-                                            pMesh,
-                                            angle,
-                                            sizing,
-                                            approx,
-                                            tag_index);
-
-    if(new_item)
-    {
-      new_item->setName(tr("%1 remeshed (%2 %3 %4)")
-                         .arg(item->name())
-                         .arg(angle)
-                         .arg(sizing)
-                         .arg(approx));
-      new_item->setColor(Qt::magenta);
-      new_item->setRenderingMode(item->renderingMode());
-      item->setVisible(false);
-      scene->itemChanged(index);
-      scene->addItem(new_item);
-    }
-
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_remeshing_plugin, Polyhedron_demo_remeshing_plugin)
-
-#include "Polyhedron_demo_remeshing_plugin.moc"
-
-#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp
deleted file mode 100644
index 4b11f85..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-#include <CGAL/AABB_polyhedral_oracle.h>
-#include <CGAL/AABB_tree.h>
-
-#include "Polyhedron_type.h"
-#include "Scene_item.h"
-#ifdef CGAL_GLEW_ENABLED
-# include <GL/glew.h>
-#endif
-#include <qgl.h>
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-
-#include <CGAL/Simple_cartesian.h>
-
-#include "C2t3_type.h"
-#include "Scene_c2t3_item.h"
-
-#include <CGAL/make_surface_mesh.h>
-#include <CGAL/Surface_mesh_default_criteria_3.h>
-#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
-
-#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
-#include <CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h>
-
-#include <CGAL/Timer.h>
-
-#include <CGAL/assertions_behaviour.h>
-#include <CGAL/exceptions.h>
-
-#include <algorithm>
-#include <sstream>
-
-#include <CGAL/array.h>
-
-#include "Scene_item.h"
-
-#include <QtCore/qglobal.h>
-#include <CGAL/gl.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-#include <QApplication>
-#include <QThread>
-#include <QMessageBox>
-
-template <class Tr>
-class Surface_mesh_modified_criteria_3
-{
-public:
-  typedef Tr Triangulation;
-  typedef typename Tr::Geom_traits::FT FT;
-
-  typedef typename CGAL::array<FT, 3> Quality;
-  typedef typename Tr::Facet Facet;
-  const FT sq_distance_bound;
-
-  Surface_mesh_modified_criteria_3(const FT angle_bound,
-                                   const FT radius_bound,
-                                   const FT distance_bound)
-    : sq_distance_bound(distance_bound*distance_bound/100),
-      curvature_size_criterion(distance_bound),
-      uniform_size_criterion(radius_bound),
-      aspect_ratio_criterion(angle_bound)
-      
-  {
-  }
-
-  bool is_bad (const Facet& f, Quality& q) const
-  {
-    const typename Tr::Point& pa = f.first->vertex((f.second+1)%4)->point();
-    const typename Tr::Point& pb = f.first->vertex((f.second+2)%4)->point();
-    const typename Tr::Point& pc = f.first->vertex((f.second+3)%4)->point();
-    if( squared_distance(pa, pb) < sq_distance_bound )
-      return false;
-    if( squared_distance(pc, pb) < sq_distance_bound )
-      return false;
-    if( squared_distance(pa, pc) < sq_distance_bound )
-      return false;
-    if(aspect_ratio_criterion.is_bad(f, q[0]))
-      return true;
-    else {
-      q[0] = 1;
-      if(uniform_size_criterion.is_bad(f, q[1]))
-        return true;
-      else {
-        q[1] = 1;
-        if(curvature_size_criterion.is_bad(f, q[2]))
-          return true;
-      }
-    }
-    return false;
-  }
-private:
-  CGAL::Surface_mesher::Curvature_size_criterion<Tr> curvature_size_criterion;
-  // bound on Hausdorff distance does not play any role if bigger than
-  // the square of the Uniform_size_criterion
-
-  CGAL::Surface_mesher::Uniform_size_criterion<Tr> uniform_size_criterion;
-  // bound on radii of surface Delaunay balls
-  
-  CGAL::Surface_mesher::Aspect_ratio_criterion<Tr> aspect_ratio_criterion;
-  // lower bound on minimum angle in degrees
-
-}; // end class Surface_mesh_default_criteria_3
-
-
-//
-// Types for meshing
-//
-typedef CGAL::Simple_cartesian<double> Simple_cartesian_kernel;
-// input surface
-// typedef CGAL::Mesh_3::Robust_intersection_traits_3<Kernel> IGT;
-typedef CGAL::AABB_polyhedral_oracle<Polyhedron,Kernel,Simple_cartesian_kernel> Input_surface;
-
-#include "Mesher_base.h"
-
-// Class template, refines Mesher_base
-// That allows to create meshers with different criteria or manifold tag,
-// and thread them with the API of Mesher_base (mesh/one_step/stop).
-template <typename Criteria, typename Manifold_tag>
-class Mesher : public Mesher_base
-{
-  typedef typename CGAL::Surface_mesher_generator<
-    C2t3,
-    Input_surface,
-    Criteria,
-    Manifold_tag,
-    CGAL_SURFACE_MESHER_VERBOSITY >::type MyMesher;
-
-  MyMesher mesher;
-  const C2t3& c2t3;
-  const Input_surface& surface;
-  CGAL::Null_mesh_visitor visitor;
-public:
-  Mesher(QObject* parent, 
-         C2t3& c2t3, 
-         const Input_surface& surface,
-         const Criteria& criteria)
-    : Mesher_base(parent), 
-      mesher(c2t3, surface, surface, criteria),
-      c2t3(c2t3),
-      surface(surface)
-  {
-    typename Input_surface::Construct_initial_points get_initial_points =
-      surface.construct_initial_points_object();
-
-    get_initial_points(surface,
-                       CGAL::inserter(c2t3.triangulation()),
-                       20);
-    mesher.init();
-  }
-        
-  void mesh()
-  {
-    int global_nbsteps = 0;
-    int nbsteps = 0;
-    CGAL::Timer timer;
-    timer.start();
-    is_stopped = false;
-
-    std::cerr << "Legende of the following line: "
-              << "(#vertices,#steps," << mesher.debug_info_header()
-              << ")\n";
-
-    while(!is_stopped && !mesher.is_algorithm_done())
-    {
-      one_step();
-      ++nbsteps;
-      ++global_nbsteps;
-      if(timer.time() > 1)
-      {
-        std::cerr 
-	  << boost::format("\r             \r"
-			   "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
-	  % c2t3.triangulation().number_of_vertices()
-	  % global_nbsteps % mesher.debug_info()
-	  % (nbsteps / timer.time());
-        qApp->processEvents();
-        nbsteps = 0;
-        timer.reset();
-      }
-    }
-  }
-
-  void one_step()
-  {
-    mesher.one_step(visitor);
-  }
-};
-
-// That thread takes a Mesher_base* as parent. It just launches the meshing
-// process.
-struct Meshing_thread : QThread 
-{
-  Mesher_base* mesher;
-
-  Meshing_thread(Mesher_base* parent) 
-    : QThread(parent), mesher(parent)
-  {
-  }
-
-  void run() {
-    mesher->mesh();
-    mesher->moveToThread(QApplication::instance()->thread());
-  }
-};
-
-typedef Tr::Geom_traits GT;
-typedef Tr::Geom_traits::FT FT;
-
-Scene_item* cgal_code_remesh(QWidget* parent, 
-                             Polyhedron* pMesh,
-                             const double angle,
-                             const double sizing,
-                             const double approx,
-                             int tag) {
-// };
-
-// class Mesh_process : public QObject {
-//   Q_OBJECT
-
-//   QWidget* parent;
-//   Polyhedron* pMesh;
-//   const double angle;
-//   const double sizing;
-//   const double approx;
-//   int tag;
-
-// public:
-//   Mesh_process(QWidget* parent, 
-//                Polyhedron* pMesh,
-//                const double angle,
-//                const double sizing,
-//                const double approx,
-//                int tag)
-//     : parent(parent),
-//       pMesh(pMesh),
-//       angle(angle),
-//       sizing(sizing),
-//       approx(approx)
-//       tag(tag)
-//   {
-//   }
-
-//   Scene_item* launch() 
-
-  if(!pMesh) return 0;
-
-  CGAL::set_error_behaviour(CGAL::ABORT);
-  // remesh
-
-
-  Tr& triangulation = * new Tr;; // 3D-Delaunay triangulation
-  C2t3& c2t3 = *(new C2t3(triangulation));
-  // C2t3 c2t3(triangulation); // 2D-complex in 3D-Delaunay triangulation
-
-  // meshing parameters
-  typedef Surface_mesh_modified_criteria_3<Tr> Criteria;
-  const Criteria facets_criteria(angle,sizing,approx);
-
-  // const Criteria new_facets_criteria(facets_criteria);
-
-  // AABB tree
-  CGAL::Timer timer;
-  timer.start();
-  std::cerr << "Build AABB tree...";
-  Input_surface input(*pMesh);
-  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
-
-  // initial point set
-  timer.reset();
-  std::cerr << "Insert initial point set... ";
-
-  { // new scope for the initialization, so that the vector
-    // polyhedron_points is destroyed as soon as the initialization is
-    // finished
-    typedef Kernel::Point_3 Point;
-
-    std::vector<Point> polyhedron_points;
-    polyhedron_points.reserve(pMesh->size_of_vertices());
-    std::copy(pMesh->points_begin(), pMesh->points_end(), 
-              std::back_inserter(polyhedron_points));
-
-    typedef std::vector<Point>::size_type size_type;
-    size_type nb_initial_points = 10;
-    nb_initial_points = (std::min)(nb_initial_points, polyhedron_points.size());
-    for(size_type n = 0;
-        n < nb_initial_points || (n < 10 * nb_initial_points && 
-                                  triangulation.dimension() < 3 );
-        n = triangulation.number_of_vertices())
-    {
-      const int pos = CGAL::default_random.get_int(0, (int)polyhedron_points.size());
-      triangulation.insert(polyhedron_points[pos]);
-    }
-  }
-  if(triangulation.dimension() < 3)
-    return 0;
-
-  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
-
-  // return new Scene_c2t3_item(c2t3);
-  // remesh
-  timer.reset();
-  Mesher_base* mesher;
-  std::cerr << "Remesh...";
-  QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon,
-                                            "Remeshing...",
-                                            "Meshing process is running...",
-                                            QMessageBox::Cancel,
-                                            parent);
-  switch(tag) {
-  case 0: 
-    mesher = new Mesher<Criteria, 
-      CGAL::Non_manifold_tag>(0, c2t3, input, facets_criteria);
-        ;
-    break;
-  case 1:
-    mesher = new Mesher<Criteria, 
-      CGAL::Manifold_tag>(0, c2t3, input, facets_criteria);
-    break;
-  default:
-    mesher = new Mesher<Criteria, 
-      CGAL::Manifold_with_boundary_tag>(0, c2t3, input, facets_criteria);
-  }
-  QObject::connect(message_box, SIGNAL(buttonClicked( QAbstractButton *)),
-                   mesher, SLOT(stop()));
-  message_box->show();
-  qApp->processEvents();
-
-  
-  Meshing_thread* thread = new Meshing_thread(mesher);
-  mesher->moveToThread(thread);
-  thread->start();
-  while(!thread->isFinished())
-  {
-    qApp->processEvents();
-    thread->wait(200);
-  }
-  delete message_box;
-  delete mesher;
-  std::cerr << "done (" << timer.time() << " ms, " << triangulation.number_of_vertices() << " vertices)" << std::endl;
-
-  if(triangulation.number_of_vertices() > 0)
-  {
-    // add remesh as new polyhedron
-    Polyhedron *pRemesh = new Polyhedron;
-    CGAL::Complex_2_in_triangulation_3_polyhedron_builder<C2t3, Polyhedron> builder(c2t3);
-    pRemesh->delegate(builder);
-    if(c2t3.number_of_facets() != pRemesh->size_of_facets())
-    {
-      delete pRemesh;
-      std::stringstream temp_file;
-      if(!CGAL::output_surface_facets_to_off(temp_file, c2t3))
-      {
-        std::cerr << "Cannot write the mesh to an off file!\n";
-        return 0;
-      }
-      Scene_polygon_soup_item* soup = new Scene_polygon_soup_item();
-      if(!soup->load(temp_file))
-      {
-        std::cerr << "Cannot reload the mesh from an off file!\n";
-        return 0;
-      }
-      else
-        return soup;
-    } else {
-      return new Scene_polyhedron_item(pRemesh);
-    }
-  }
-  else
-    return 0;
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp
deleted file mode 100644
index 34c2ed3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-#include <QTime>
-#include <QApplication>
-#include <QAction>
-#include <QList>
-#include <QMainWindow>
-#include <QObject>
-
-#include "Scene_polygon_soup_item.h"
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include "ui_Polyhedron_demo_scale_space_reconstruction_plugin.h"
-
-
-class Polyhedron_demo_scale_space_reconstruction_plugin_dialog : public QDialog, private Ui::ScaleSpaceOptionsDialog
-{
-  Q_OBJECT
-  public:
-    Polyhedron_demo_scale_space_reconstruction_plugin_dialog(QWidget* /*parent*/ = 0)
-    {
-      setupUi(this);
-    }
-
-    double neighbors() const { return m_neighbors->value(); }
-    double iterations() const { return m_iterations->value(); }
-    double samples() const { return m_samples->value(); }
-    bool generate_smoothed() const { return m_genSmooth->isChecked(); }
-};
-
-#include <CGAL/Scale_space_surface_reconstruction_3.h>
-
-class Polyhedron_demo_scale_space_reconstruction_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-  QAction* actionScaleSpaceReconstruction;
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-
-    actionScaleSpaceReconstruction = new QAction(tr("Scale-space surface reconstruction"), mainWindow);
-    actionScaleSpaceReconstruction->setObjectName("actionScaleSpaceReconstruction");
-
-    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
-  }
-
-  //! Applicate for Point_sets with normals.
-  bool applicable(QAction*) const {
-    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionScaleSpaceReconstruction;
-  }
-
-public slots:
-  void on_actionScaleSpaceReconstruction_triggered();
-}; // end class Polyhedron_scale_space_reconstruction_plugin
-
-
-void Polyhedron_demo_scale_space_reconstruction_plugin::on_actionScaleSpaceReconstruction_triggered()
-{
-  const Scene_interface::Item_id index = scene->mainSelectionIndex();
-
-  Scene_points_with_normal_item* pts_item =
-    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
-
-  if(pts_item)
-  {
-    //generate the dialog box to set the options
-    Polyhedron_demo_scale_space_reconstruction_plugin_dialog dialog;
-    if(!dialog.exec())
-      return;
-
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    QTime time;
-    time.start();
-    std::cout << "Scale scape surface reconstruction...";
-
-    typedef CGAL::Scale_space_surface_reconstruction_3<Kernel> Recontructor;
-    Recontructor reconstruct( dialog.neighbors(), dialog.samples() );
-    reconstruct.reconstruct_surface(
-      pts_item->point_set()->begin(),
-      pts_item->point_set()->end(),
-      dialog.iterations()
-    );
-    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-
-    for( unsigned int sh = 0; sh < reconstruct.number_of_shells(); ++sh ) {
-        // collect the number of triples.
-        std::ptrdiff_t num = std::distance( reconstruct.shell_begin( sh ),
-                                            reconstruct.shell_end( sh ) );
-
-        //create item for the reconstruction output with input point set
-        Scene_polygon_soup_item* new_item = new Scene_polygon_soup_item();
-        new_item->init_polygon_soup(pts_item->point_set()->size(),
-                                    num );
-
-        typedef Point_set::iterator Point_iterator;
-
-        for(Point_iterator it = pts_item->point_set()->begin(),
-                           end = pts_item->point_set()->end(); it!=end; ++it)
-        {
-          new_item->new_vertex(it->x(), it->y(), it->z());
-        }
-
-        for (Recontructor::Triple_iterator it=reconstruct.shell_begin( sh ),
-                                           end=reconstruct.shell_end( sh );it!=end;++it)
-        {
-          new_item->new_triangle( (*it)[0], (*it)[1], (*it)[2] );
-        }
-
-        new_item->finalize_polygon_soup();
-
-        new_item->setName(tr("%1-shell %2 (ss reconstruction)").arg(scene->item(index)->name()).arg(sh+1));
-        new_item->setColor(Qt::magenta);
-        new_item->setRenderingMode(FlatPlusEdges);
-        scene->addItem(new_item);
-
-        if ( dialog.generate_smoothed() ){
-          //create item for the reconstruction output with input point set smoothed
-          Scene_polygon_soup_item *new_item_smoothed = new Scene_polygon_soup_item();
-
-          new_item_smoothed->init_polygon_soup(pts_item->point_set()->size(),
-                                               num );
-
-          typedef Recontructor::Point_iterator SS_point_iterator;
-          for(SS_point_iterator it = reconstruct.points_begin(),
-                                end = reconstruct.points_end(); it!=end; ++it)
-          {
-            new_item_smoothed->new_vertex(it->x(), it->y(), it->z());
-          }
-
-          for (Recontructor::Triple_iterator it=reconstruct.shell_begin( sh ),
-                                             end=reconstruct.shell_end( sh );it!=end;++it)
-          {
-            new_item_smoothed->new_triangle( (*it)[0], (*it)[1], (*it)[2] );
-          }
-
-          new_item_smoothed->finalize_polygon_soup();
-
-          new_item_smoothed->setName(tr("%1-shell %2 (ss smoothed reconstruction)").arg(scene->item(index)->name()).arg(sh+1));
-          new_item_smoothed->setColor(Qt::magenta);
-          new_item_smoothed->setRenderingMode(FlatPlusEdges);
-          scene->addItem(new_item_smoothed);
-        }
-    }
-
-    // default cursor
-    QApplication::restoreOverrideCursor();
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_scale_space_reconstruction_plugin, Polyhedron_demo_scale_space_reconstruction_plugin)
-
-#include "Polyhedron_demo_scale_space_reconstruction_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui
deleted file mode 100644
index 61a9c33..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ScaleSpaceOptionsDialog</class>
- <widget class="QDialog" name="ScaleSpaceOptionsDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>476</width>
-    <height>272</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Scale-Space Surface Reconstruction</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="3" column="0">
-    <widget class="QCheckBox" name="m_genSmooth">
-     <property name="text">
-      <string>Also generate the smoothed version</string>
-     </property>
-     <property name="checked">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="label_3">
-     <property name="text">
-      <string>Iterations</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Size of sample to estimate neighborhood</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="0">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Average neighborhood size</string>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="2">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" colspan="2">
-    <widget class="QSpinBox" name="m_samples">
-     <property name="maximum">
-      <number>1000000</number>
-     </property>
-     <property name="value">
-      <number>200</number>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" colspan="2">
-    <widget class="QSpinBox" name="m_iterations">
-     <property name="minimum">
-      <number>1</number>
-     </property>
-     <property name="maximum">
-      <number>1000000</number>
-     </property>
-     <property name="value">
-      <number>4</number>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" colspan="2">
-    <widget class="QSpinBox" name="m_neighbors">
-     <property name="minimum">
-      <number>0</number>
-     </property>
-     <property name="maximum">
-      <number>100000</number>
-     </property>
-     <property name="value">
-      <number>30</number>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>ScaleSpaceOptionsDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>177</x>
-     <y>123</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>53</x>
-     <y>125</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>ScaleSpaceOptionsDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>257</x>
-     <y>119</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>257</x>
-     <y>143</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp
deleted file mode 100644
index 2825b22..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "Scene_polyhedron_selection_item.h"
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-class Polyhedron_demo_selection_io_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "selection_io_plugin"; }
-  QString nameFilters() const { return "Selection files (*.selection.txt)"; }
-
-  bool canLoad() const { return true; }
-  Scene_item* load(QFileInfo fileinfo) {
-    if(fileinfo.suffix().toLower() != "txt") return 0;
-    // There will be no actual loading at this step. 
-    // Polyhedron_demo_selection_plugin will trigger load when item in new_item_created
-    Scene_polyhedron_selection_item* item = new Scene_polyhedron_selection_item(); 
-    if(!item->load(fileinfo.filePath().toStdString())) {
-      delete item;
-      return NULL;
-    }
-    return item;
-  }
-  
-  bool canSave(const Scene_item* scene_item) {
-    return qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
-  }
-  bool save(const Scene_item* scene_item, QFileInfo fileinfo) {
-    const Scene_polyhedron_selection_item* item = qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
-    if(item == NULL) { return false; }
-
-    return item->save(fileinfo.filePath().toStdString());
-  }
-};
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_io_plugin, Polyhedron_demo_selection_io_plugin)
-#include "Polyhedron_demo_selection_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp
deleted file mode 100644
index 320871d..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-#include <QtCore/qglobal.h>
-#include "opengl_tools.h"
-
-#include "Messages_interface.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polyhedron_selection_item.h"
-#include "Scene_points_with_normal_item.h"
-
-#include "Scene_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "ui_Selection_widget.h"
-
-#include <QAction>
-#include <QMainWindow>
-#include <QApplication>
-
-#include <map>
-
-class Polyhedron_demo_selection_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-    Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
-        || qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex())); 
-  }
-  void print_message(QString message) { messages->information(message); }
-  QList<QAction*> actions() const { return QList<QAction*>() << actionSelection; }
-  using Polyhedron_demo_plugin_helper::init;
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m) {
-    mw = mainWindow;
-    scene = scene_interface;
-    messages = m;
-
-    actionSelection = new QAction(tr("Selection"), mw);
-    connect(actionSelection, SIGNAL(triggered()), this, SLOT(selection_action()));
-
-    dock_widget = new QDockWidget("Selection", mw);
-    dock_widget->setVisible(false);
-
-    ui_widget.setupUi(dock_widget);
-    add_dock_widget(dock_widget);
-
-    connect(ui_widget.Select_all_button,  SIGNAL(clicked()), this, SLOT(on_Select_all_button_clicked()));
-    connect(ui_widget.Clear_button,  SIGNAL(clicked()), this, SLOT(on_Clear_button_clicked()));
-    connect(ui_widget.Select_isolated_components_button,  SIGNAL(clicked()), this, SLOT(on_Select_isolated_components_button_clicked()));
-    connect(ui_widget.Get_minimum_button,  SIGNAL(clicked()), this, SLOT(on_Get_minimum_button_clicked()));
-    connect(ui_widget.Create_selection_item_button,  SIGNAL(clicked()), this, SLOT(on_Create_selection_item_button_clicked()));    
-    connect(ui_widget.Selection_type_combo_box, SIGNAL(currentIndexChanged(int)), 
-            this, SLOT(on_Selection_type_combo_box_changed(int)));
-    connect(ui_widget.Insertion_radio_button, SIGNAL(toggled(bool)), this, SLOT(on_Insertion_radio_button_toggled(bool)));
-    connect(ui_widget.Brush_size_spin_box, SIGNAL(valueChanged(int)), this, SLOT(on_Brush_size_spin_box_changed(int)));
-    connect(ui_widget.Create_point_set_item_button, SIGNAL(clicked()), this, SLOT(on_Create_point_set_item_button_clicked()));
-    connect(ui_widget.Erase_selected_facets_button, SIGNAL(clicked()), this, SLOT(on_Erase_selected_facets_button_clicked()));
-    connect(ui_widget.Dilate_erode_button, SIGNAL(clicked()), this, SLOT(on_Dilate_erode_button_clicked()));
-    connect(ui_widget.Create_polyhedron_item_button, SIGNAL(clicked()), this, SLOT(on_Create_polyhedron_item_button_clicked()));
-    QObject* scene = dynamic_cast<QObject*>(scene_interface);
-    if(scene) { 
-      connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), this, SLOT(item_about_to_be_destroyed(Scene_item*)));
-      connect(scene, SIGNAL(newItem(int)), this, SLOT(new_item_created(int)));
-    } 
-  }
-
-public slots:
-  void selection_action() { 
-    dock_widget->show();
-    dock_widget->raise();
-    if(scene->numberOfEntries() < 2) {
-      Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
-      if(!poly_item || selection_item_map.find(poly_item) != selection_item_map.end()) { return; }
-      scene->addItem(new Scene_polyhedron_selection_item(poly_item, mw));
-    }
-  }
-  // Select all
-  void on_Select_all_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    selection_item->select_all();
-  }
-  // Clear selection
-  void on_Clear_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    selection_item->clear();
-  }
-  // Isolated component related functions
-  void on_Select_isolated_components_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    boost::optional<std::size_t> minimum =
-      selection_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value());
-    if(minimum) {
-      ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
-    }
-  }
-  void on_Get_minimum_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-    boost::optional<std::size_t> minimum = selection_item->get_minimum_isolated_component();
-    if(minimum) {
-      ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
-    }
-  }
-  // Create selection item for selected polyhedron item
-  void on_Create_selection_item_button_clicked() {
-    Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
-    if(!poly_item) {
-      print_message("Error: there is no selected polyhedron item!");
-      return; 
-    }
-    // all other arrangements (putting inside selection_item_map), setting names etc,
-    // other params (e.g. k_ring) will be set inside new_item_created
-    scene->addItem(new Scene_polyhedron_selection_item(poly_item, mw));
-  }
-  void on_Selection_type_combo_box_changed(int index) {
-    typedef Scene_polyhedron_selection_item::Active_handle Active_handle;
-    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
-      it->second->set_active_handle_type(static_cast<Active_handle::Type>(index));
-    }
-  }
-  void on_Insertion_radio_button_toggled(bool toggle){
-    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
-      it->second->set_is_insert(toggle);
-    }
-  }
-  void on_Brush_size_spin_box_changed(int value) {
-    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
-      it->second->set_k_ring(value);
-    }
-  }
-
-  void on_Create_point_set_item_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-    if(selection_item->selected_vertices.empty()) {
-      print_message("Error: there is no selected vertex in polyhedron selection item!");
-      return;
-    }
-    Scene_points_with_normal_item* point_item = new Scene_points_with_normal_item();
-    point_item->setName(QString("%1-points").arg(selection_item->name()));
-    for(Scene_polyhedron_selection_item::Selection_set_vertex::iterator begin = selection_item->selected_vertices.begin(); 
-       begin != selection_item->selected_vertices.end(); ++begin) {
-       point_item->point_set()->push_back((*begin)->point());
-    }
-    
-    scene->addItem(point_item);
-  }
-  void on_Erase_selected_facets_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    selection_item->erase_selected_facets();
-  }
-  void on_Create_polyhedron_item_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    Scene_polyhedron_item* poly_item = new Scene_polyhedron_item();
-    if(selection_item->export_selected_facets_as_polyhedron(poly_item->polyhedron())) {
-      poly_item->setName(QString("%1-facets").arg(selection_item->name()));
-      poly_item->changed(); // for init()
-      scene->addItem(poly_item);
-    }
-    else {
-      delete poly_item;
-      print_message("Error: polyhedron item is not created!");
-    }
-  }
-  void on_Dilate_erode_button_clicked() {
-    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
-    if(!selection_item) {
-      print_message("Error: there is no selected polyhedron selection item!");
-      return; 
-    }
-
-    int steps = ui_widget.Dilate_erode_spin_box->value();
-    selection_item->dilate_or_erode(steps);
-  }
-  // To handle empty selection items coming from loader
-  void new_item_created(int item_id) {
-    typedef Scene_polyhedron_selection_item::Active_handle Active_handle;
-    Scene_polyhedron_selection_item* selection_item = 
-      qobject_cast<Scene_polyhedron_selection_item*>(scene->item(item_id));
-    if(!selection_item) { return; }
-
-    Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
-    if(!poly_item) {
-      CGAL_assertion(selection_item->polyhedron_item() == NULL); // which means it is coming from selection_io loader
-      print_message("Error: please select corresponding polyhedron item from Geometric Objects list.");
-      scene->erase(item_id);
-      return;
-    }
-
-    if(selection_item->polyhedron_item() == NULL) { //coming from selection_io loader
-      if(!selection_item->actual_load(poly_item, mw)) {
-        print_message("Error: loading selection item is not successful!");
-        scene->erase(item_id);
-        return;
-      }
-    }
-    // now set default params both for selection items coming from selection_io, or on_Create_selection_item_button_clicked
-    Active_handle::Type aht = static_cast<Active_handle::Type>(ui_widget.Selection_type_combo_box->currentIndex());
-    bool is_insert = ui_widget.Insertion_radio_button->isChecked();
-    int k_ring = ui_widget.Brush_size_spin_box->value();
-
-    selection_item->set_active_handle_type(aht);
-    selection_item->set_is_insert(is_insert);
-    selection_item->set_k_ring(k_ring);
-    selection_item->setRenderingMode(Flat);
-    if(selection_item->name() == "unamed") {
-      selection_item->setName(tr("%1 (selection)").arg(poly_item->name()));
-    }
-
-    selection_item_map.insert(std::make_pair(poly_item, selection_item));
-  }
-  void item_about_to_be_destroyed(Scene_item* scene_item) {
-    // if polyhedron item
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene_item);
-    if(poly_item) {
-      std::pair<Selection_item_map::iterator, Selection_item_map::iterator> res =
-        selection_item_map.equal_range(poly_item);
-
-      for(Selection_item_map::iterator begin = res.first; begin != res.second; ) {
-        Scene_polyhedron_selection_item* selection_item = begin->second;
-        selection_item_map.erase(begin++); // first erase from map, because scene->erase will cause a call to this function
-        scene->erase( scene->item_id(selection_item) );
-      }
-    }
-    // if polyhedron selection item
-    Scene_polyhedron_selection_item* selection_item = qobject_cast<Scene_polyhedron_selection_item*>(scene_item);
-    if(selection_item) {
-      Scene_polyhedron_item* poly_item = selection_item->polyhedron_item();
-      std::pair<Selection_item_map::iterator, Selection_item_map::iterator> res =
-        selection_item_map.equal_range(poly_item);
-      for(Selection_item_map::iterator begin = res.first; begin != res.second; ++begin) {
-        if(begin->second == selection_item) {
-          selection_item_map.erase(begin); break;
-        }
-      }
-    }
-  }
-
-private:
-  Messages_interface* messages;
-  QAction* actionSelection;
-
-  QDockWidget* dock_widget;
-  Ui::Selection ui_widget;
-typedef std::multimap<Scene_polyhedron_item*, Scene_polyhedron_selection_item*> Selection_item_map;
-  Selection_item_map selection_item_map;
-}; // end Polyhedron_demo_selection_plugin
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_plugin, Polyhedron_demo_selection_plugin)
-
-#include "Polyhedron_demo_selection_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp
deleted file mode 100644
index a9edbb6..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-#include <QApplication>
-#include <QMessageBox>
-#include <QMainWindow>
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include "Scene_polyhedron_item.h"
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include <CGAL/intersections.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/box_intersection_d.h>
-
-#include <CGAL/Self_intersection_polyhedron_3.h>
-#include <CGAL/Make_triangle_soup.h>
-
-typedef Kernel::Triangle_3 Triangle;
-
-class Polyhedron_demo_self_intersection_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionSelfIntersection";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-
-public slots:
-  void on_actionSelfIntersection_triggered();
-
-}; // end Polyhedron_demo_self_intersection_plugin
-
-void Polyhedron_demo_self_intersection_plugin::on_actionSelfIntersection_triggered()
-{
-  Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(item)
-  {
-    Polyhedron* pMesh = item->polyhedron();
-
-    // compute self-intersections
-
-    typedef Polyhedron::Facet_const_handle Facet_const_handle;
-    std::vector<std::pair<Facet_const_handle, Facet_const_handle> > facets;
-    CGAL::self_intersect<Kernel>(*pMesh, back_inserter(facets));
-
-    std::cout << "ok (" << facets.size() << " triangle pair(s))" << std::endl;
-
-    // add intersecting triangles as a new polyhedron, i.e., a triangle soup.
-    if(!facets.empty())
-    {
-      Polyhedron *pSoup = new Polyhedron;
-
-      std::vector<Facet_const_handle> facets_flat;
-      facets_flat.reserve(2 * facets.size());
-      for(std::size_t i = 0; i < facets.size(); ++i) 
-      { facets_flat.push_back(facets[i].first); 
-        facets_flat.push_back(facets[i].second); 
-      }
-
-      Make_triangle_soup<Polyhedron,Kernel,std::vector<Facet_const_handle>::iterator> soup_builder;
-      soup_builder.run(facets_flat.begin(), facets_flat.end(),*pSoup);
-
-      Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pSoup);
-      new_item->setName(tr("%1 (intersecting triangles)").arg(item->name()));
-      new_item->setColor(Qt::magenta);
-      new_item->setRenderingMode(item->renderingMode());
-      scene->addItem(new_item);
-      item->setRenderingMode(Wireframe);
-      scene->itemChanged(item);
-    }
-    else 
-      QMessageBox::information(mw, tr("No self intersection"),
-                               tr("The polyhedron \"%1\" does not self-intersect.").
-                               arg(item->name()));
-  }
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_self_intersection_plugin, Polyhedron_demo_self_intersection_plugin)
-
-#include "Polyhedron_demo_self_intersection_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp
deleted file mode 100644
index 7a2498f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-#include <CGAL/IO/Polyhedron_builder_from_STL.h>
-#include <CGAL/polygon_soup_to_polyhedron_3.h>
-
-#include <QColor>
-
-class Polyhedron_demo_stl_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString nameFilters() const;
-  QString name() const { return "stl_plugin"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-QString Polyhedron_demo_stl_plugin::nameFilters() const {
-  return "STL files (*.stl)";
-}
-
-bool Polyhedron_demo_stl_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item* 
-Polyhedron_demo_stl_plugin::load(QFileInfo fileinfo) {
-
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
-    return NULL;
-  }
-
-  std::vector<CGAL::cpp11::array<double, 3> > points;
-  std::vector<CGAL::cpp11::array<int, 3> > triangles;
-  if (!CGAL::read_STL(in, points, triangles))
-  {
-    std::cerr << "Error: invalid STL file" << std::endl;
-    return NULL;
-  }
-
-  try{
-    // Try building a polyhedron
-    Polyhedron P;
-    CGAL::polygon_soup_to_polyhedron_3(P, points, triangles);
-    
-    if(! P.is_valid() || P.empty()){
-      std::cerr << "Error: Invalid polyhedron" << std::endl;
-    }
-    else{
-      Scene_polyhedron_item* item = new Scene_polyhedron_item(P);
-      item->setName(fileinfo.baseName());
-      return item;
-    }
-  }
-  catch(...){}
-
-  Scene_polygon_soup_item* item = new Scene_polygon_soup_item();
-  item->setName(fileinfo.baseName());
-  item->load(points, triangles);
-  return item;
-}
-
-bool Polyhedron_demo_stl_plugin::canSave(const Scene_item*)
-{
-  return false;
-}
-
-bool Polyhedron_demo_stl_plugin::save(const Scene_item*, QFileInfo)
-{
-  return false;
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_stl_plugin, Polyhedron_demo_stl_plugin)
-#include "Polyhedron_demo_stl_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp
deleted file mode 100644
index 4bf3572..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <QTime>
-#include <QApplication>
-
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Polyhedron_demo_plugin_interface.h"
-
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-#include <CGAL/Subdivision_method_3.h>
-
-class Polyhedron_demo_subdivision_methods_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // used by Polyhedron_demo_plugin_helper
-  QStringList actionsNames() const {
-    return QStringList() << "actionLoop"
-                         << "actionCatmullClark"
-                         << "actionSqrt3";
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-public slots:
-  void on_actionLoop_triggered();
-  void on_actionCatmullClark_triggered();
-  void on_actionSqrt3_triggered();
-}; // end Polyhedron_demo_subdivision_methods_plugin
-
-void Polyhedron_demo_subdivision_methods_plugin::on_actionLoop_triggered()
-{
-  Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(!item) return;
-  Polyhedron* poly = item->polyhedron();
-  QTime time;
-  time.start();
-  std::cout << "Loop subdivision...";
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  CGAL::Subdivision_method_3::Loop_subdivision(*poly, 1);
-  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-  QApplication::restoreOverrideCursor();
-  scene->itemChanged(item);
-}
-
-void Polyhedron_demo_subdivision_methods_plugin::on_actionCatmullClark_triggered()
-{
-  Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(!item) return;
-  Polyhedron* poly = item->polyhedron();
-  if(!poly) return;
-  QTime time;
-  time.start();
-  std::cout << "Catmull-Clark subdivision...";
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  CGAL::Subdivision_method_3::CatmullClark_subdivision(*poly, 1);
-  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-  QApplication::restoreOverrideCursor();
-  scene->itemChanged(item);
-}
-
-void Polyhedron_demo_subdivision_methods_plugin::on_actionSqrt3_triggered()
-{
-  Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-  Scene_polyhedron_item* item = 
-    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-  if(!item) return;
-  Polyhedron* poly = item->polyhedron();
-  if(!poly) return;
-  QTime time;
-  time.start();
-  std::cout << "Sqrt3 subdivision...";
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  CGAL::Subdivision_method_3::Sqrt3_subdivision(*poly, 1);
-  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
-  QApplication::restoreOverrideCursor();
-  scene->itemChanged(item);
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_subdivision_methods_plugin, Polyhedron_demo_subdivision_methods_plugin)
-
-#include "Polyhedron_demo_subdivision_methods_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp
deleted file mode 100644
index 408ef6c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/bounding_box.h>
-#include "Scene_polyhedron_transform_item.h"
-#include "Polyhedron_type.h"
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-
-#include "Scene_polylines_item.h"
-
-#include <QString>
-#include <QAction>
-#include <QMenu>
-#include <QMainWindow>
-#include <QApplication>
-#include <QTime>
-#include <QMessageBox>
-
-class Polyhedron_demo_transform_polyhedron_plugin :
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-
-  Polyhedron_demo_transform_polyhedron_plugin():started(false){}
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionTransformPolyhedron;
-  }
-
-  bool applicable(QAction*) const { 
-    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())) ||
-           qobject_cast<Scene_polyhedron_transform_item*>(scene->item(scene->mainSelectionIndex()));
-  }
-  
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    actionTransformPolyhedron = new QAction("Affine transformation of polyhedron", mw);
-    if(actionTransformPolyhedron) {
-      connect(actionTransformPolyhedron, SIGNAL(triggered()),this, SLOT(go()));
-    }
-  }
-
-  void start(Scene_polyhedron_item*);
-  void end();  
-  
-private:
-
-  QAction*  actionTransformPolyhedron;
-  Scene_polyhedron_transform_item* transform_item;
-  Scene_interface::Item_id tr_item_index;
-  bool started;
-
-public slots:
-  void go();
-  void transformed_killed();
-}; // end class Polyhedron_demo_transform_polyhedron_plugin
-
-void Polyhedron_demo_transform_polyhedron_plugin::go(){
-  if (!started){
-    Scene_item* item = scene->item(scene->mainSelectionIndex());
-    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
-    if(!poly_item) return;    
-    
-    started=true;
-    actionTransformPolyhedron->setText("Apply affine transformation");
-    start(poly_item);
-  }
-  else
-    end();    
-}
-
-void Polyhedron_demo_transform_polyhedron_plugin::transformed_killed(){
-    started=false;
-    actionTransformPolyhedron->setText("Affine transformation of polyhedron");
-}
-
-void Polyhedron_demo_transform_polyhedron_plugin::start(Scene_polyhedron_item* poly_item){
-  QApplication::setOverrideCursor(Qt::PointingHandCursor);
-  
-  Scene_polyhedron_item::Bbox bbox = poly_item->bbox();
-  double x=(bbox.xmin+bbox.xmax)/2;
-  double y=(bbox.ymin+bbox.ymax)/2;
-  double z=(bbox.zmin+bbox.zmax)/2;
-  
-  transform_item = new Scene_polyhedron_transform_item(qglviewer::Vec(x,y,z),poly_item,scene);
-  transform_item->setManipulatable(true);
-  transform_item->setColor(Qt::green);
-  transform_item->setName(tr("Affine transformation of polyhedron"));
-  connect(transform_item, SIGNAL(stop()),this, SLOT(go()));
-  connect(transform_item, SIGNAL(killed()),this, SLOT(transformed_killed()));
-  tr_item_index=scene->addItem(transform_item);
-}
-
-
-struct Modifier_transform_vertices : public CGAL::Modifier_base<Polyhedron::HalfedgeDS> {
-  typedef Polyhedron::HalfedgeDS HDS;
-  
-  CGAL::Aff_transformation_3<Kernel> transform;
-  Kernel::Vector_3 frame_center_translation;
-  Modifier_transform_vertices(const GLdouble* m,const qglviewer::Vec& tr):
-    transform(m[0],m[4], m[8],m[12],
-              m[1],m[5], m[9],m[13],
-              m[2],m[6],m[10],m[14],
-              /*m[3],m[7],m[11],*/m[15]),
-    frame_center_translation(-tr.x,-tr.y,-tr.z)
-  {
-    CGAL_assertion(m[3]==0);
-    CGAL_assertion(m[7]==0);
-    CGAL_assertion(m[11]==0);
-  }
-  
-  void operator()(HDS& hds)
-  {
-    for (HDS::Vertex_iterator it=hds.vertices_begin(),
-                                   endit=hds.vertices_end();endit!=it;++it)
-    {
-      it->point() = transform( it->point() + frame_center_translation );
-    }
-  }
-};
-
-
-void Polyhedron_demo_transform_polyhedron_plugin::end(){
-  QApplication::restoreOverrideCursor();
-  const GLdouble* matrix = transform_item->manipulatedFrame()->matrix();
-  Modifier_transform_vertices modifier(matrix,transform_item->center());
-  Polyhedron* new_poly=new Polyhedron(*transform_item->getBase()->polyhedron());
-  new_poly->delegate(modifier);
-  
-  Scene_polyhedron_item* new_item=new Scene_polyhedron_item(new_poly);
-  new_item->setName(tr("%1_transformed").arg(transform_item->getBase()->name()));
-  
-  scene->replaceItem(tr_item_index,new_item);
-  delete transform_item;
-}
-  
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_transform_polyhedron_plugin, Polyhedron_demo_transform_polyhedron_plugin)
-
-#include "Polyhedron_demo_transform_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp
deleted file mode 100644
index e84e767..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-#include <QApplication>
-#include <QMainWindow>
-#include <QAction>
-#include "Polyhedron_demo_plugin_interface.h"
-#include "Messages_interface.h"
-#include "Polyhedron_demo_plugin_helper.h"
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-
-#include <CGAL/triangulate_polyhedron.h>
-
-class Polyhedron_demo_triangulate_facets_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_helper
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  // To silent a warning -Woverloaded-virtual
-  // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
-  using Polyhedron_demo_plugin_helper::init;
-
-  void init(QMainWindow* mainWindow,
-            Scene_interface* scene_interface,
-            Messages_interface* m) {
-    this->scene = scene_interface;
-    this->mw = mainWindow;
-    this->messages = m;
-    actionTriangulateFacets = new QAction("Triangulate facets", mw);
-    if(actionTriangulateFacets) {
-      connect(actionTriangulateFacets, SIGNAL(triggered()),
-              this, SLOT(triangulate())); 
-    }
-    actionUnTriangulateFacets = new QAction("Untriangulate facets", mw);
-    if(actionUnTriangulateFacets) {
-      connect(actionUnTriangulateFacets, SIGNAL(triggered()),
-              this, SLOT(untriangulate())); 
-    }
-  };
-
-  QList<QAction*> actions() const {
-    return QList<QAction*>() << actionTriangulateFacets
-                             << actionUnTriangulateFacets;
-  }
-
-  bool applicable(QAction*) const { 
-    Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices())  {
-      Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-      if(!item) return false;
-    }
-    return true;
-  }
-
-
-public slots:
-  void untriangulate() {
-    const Scene_interface::Item_id index = scene->mainSelectionIndex();
-  
-    Scene_polyhedron_item* item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-    if(item)
-    {
-      Polyhedron* pMesh = item->polyhedron();
-      if(!pMesh) return;
-
-      QApplication::setOverrideCursor(Qt::WaitCursor);
-
-      for(Polyhedron::Edge_iterator 
-            eit = pMesh->edges_begin(),
-            end = pMesh->edges_end();
-          eit != end; /*increment is done manually*/)
-      {
-        std::cerr << (void*)&*eit << std::endl;
-        Polyhedron::Edge_iterator eit_copy = eit++;
-        if(!eit_copy->is_border()) {
-          Polyhedron::Facet_handle fh1 = eit_copy->facet();
-          Polyhedron::Facet_handle fh2 = eit_copy->opposite()->facet();
-          typedef Polyhedron::Facet Facet;
-          if( fh1 != fh2 &&  
-              !eit_copy->vertex()->is_bivalent() && 
-              !eit_copy->opposite()->vertex()->is_bivalent())
-          {
-            Kernel::Vector_3 v1 = compute_facet_normal<Facet, Kernel>(*fh1);
-            Kernel::Vector_3 v2 = compute_facet_normal<Facet, Kernel>(*fh2);
-            if(v1 * v2 > 0.99) {
-              std::cerr << "join\n";
-              // pMesh->is_valid(true);
-              pMesh->join_facet(eit_copy);
-            }
-          }
-        }
-      }
-      CGAL_assertion_code(pMesh->normalize_border());
-      // CGAL_assertion(pMesh->is_valid(true, 3));
-      scene->itemChanged(item);
-      // default cursor
-      QApplication::restoreOverrideCursor();
-    }
-  }
-
-  void triangulate() {
-    Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices())  {
-
-    Scene_polyhedron_item* item = 
-      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
-
-    if(item)
-    {
-      Polyhedron* pMesh = item->polyhedron();
-      if(!pMesh) continue;
-      if(pMesh->is_pure_triangle()) {
-        messages->warning(tr("The polyhedron \"%1\" is already triangulated.")
-                          .arg(item->name()));
-        continue;
-      }
-
-      QApplication::setOverrideCursor(Qt::WaitCursor);
-
-      CGAL::triangulate_polyhedron(*pMesh);
-
-      CGAL_assertion_code(pMesh->normalize_border());
-      CGAL_assertion(pMesh->is_valid(false, 3));
-
-      scene->itemChanged(item);
-      // default cursor
-      QApplication::restoreOverrideCursor();
-    } // end of if(item)
-
-    } // end of the loop on the selected items
-  }
-  
-private:
-  QAction* actionTriangulateFacets;
-  QAction* actionUnTriangulateFacets;  
-  Messages_interface* messages;
-};
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_triangulate_facets_plugin, Polyhedron_demo_triangulate_facets_plugin)
-
-#include "Polyhedron_demo_triangulate_facets_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp
deleted file mode 100644
index 8bed5d1..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-#include <QtCore/qglobal.h>
-
-#include "Scene_item.h"
-#include "Scene_interface.h"
-#include <CGAL/gl.h>
-
-#include <QAction>
-#include <QMainWindow>
-
-class Q_DECL_EXPORT Scene_bbox_item : public Scene_item
-{
-  Q_OBJECT
-public:
-  Scene_bbox_item(const Scene_interface* scene_interface)
-    : scene(scene_interface)
-  {}
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return true; }
-  Bbox bbox() const { return Bbox(); }
-
-  Scene_bbox_item* clone() const {
-    return 0;
-  }
-
-  QString toolTip() const {
-    const Bbox& bb = scene->bbox();
-    return QString("<p><b>Scene bounding box</b></p>"
-                   "<p>x range: (%1, %2)<br />"
-                   "y range: (%3, %4)<br />"
-                   "z range: (%5, %6)</p>")
-      .arg(bb.xmin).arg(bb.xmax)
-      .arg(bb.ymin).arg(bb.ymax)
-      .arg(bb.zmin).arg(bb.zmax);
-  }
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const { 
-    return (m == Wireframe); 
-  }
-
-  // Flat/Gouraud OpenGL drawing
-  void draw() const {}
-
-  // Wireframe OpenGL drawing
-  void draw_edges() const {
-    const Bbox& bb = scene->bbox();
-    ::glBegin(GL_LINES);
-    gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                 bb.xmax, bb.ymin, bb.zmin);
-    gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                 bb.xmin, bb.ymax, bb.zmin);
-    gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                 bb.xmin, bb.ymin, bb.zmax);
-    
-    gl_draw_edge(bb.xmax, bb.ymin, bb.zmin,
-                 bb.xmax, bb.ymax, bb.zmin);
-    gl_draw_edge(bb.xmax, bb.ymin, bb.zmin,
-                 bb.xmax, bb.ymin, bb.zmax);
-    
-    gl_draw_edge(bb.xmin, bb.ymax, bb.zmin,
-                 bb.xmax, bb.ymax, bb.zmin);
-    gl_draw_edge(bb.xmin, bb.ymax, bb.zmin,
-                 bb.xmin, bb.ymax, bb.zmax);
-    
-    gl_draw_edge(bb.xmin, bb.ymin, bb.zmax,
-                 bb.xmax, bb.ymin, bb.zmax);
-    gl_draw_edge(bb.xmin, bb.ymin, bb.zmax,
-                 bb.xmin, bb.ymax, bb.zmax);
-    
-    gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                 bb.xmin, bb.ymax, bb.zmax);
-    gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                 bb.xmax, bb.ymin, bb.zmax);
-    gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                 bb.xmax, bb.ymax, bb.zmin);
-    ::glEnd();
-  }
-
-private:
-  static void gl_draw_edge(double px, double py, double pz,
-                           double qx, double qy, double qz)
-  {
-    ::glVertex3d(px,py,pz);
-    ::glVertex3d(qx,qy,qz);
-  }
-
-  const Scene_interface* scene;
-};
-
-#include "Polyhedron_demo_plugin_interface.h"
-
-class Polyhedron_demo_trivial_plugin : 
-  public QObject,
-  public Polyhedron_demo_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_plugin_interface)
-
-public:
-  void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
-  QList<QAction*> actions() const { 
-    return QList<QAction*>() << actionBbox; 
-  }
-
-  bool applicable(QAction*) const { 
-    return true;
-  }
-public slots:
-  void bbox();
-  void enableAction();
-
-private:
-  Scene_interface* scene;
-  QAction* actionBbox;
-
-}; // end Polyhedron_demo_trivial_plugin
-
-void Polyhedron_demo_trivial_plugin::init(QMainWindow* mainWindow, Scene_interface* scene_interface)
-{
-  scene = scene_interface;
-  actionBbox = new QAction(tr("Create bbox"), mainWindow);
-  connect(actionBbox, SIGNAL(triggered()),
-          this, SLOT(bbox()));
-}
-
-void Polyhedron_demo_trivial_plugin::bbox()
-{
-  for(int i = 0, end = scene->numberOfEntries();
-      i < end; ++i)
-  {
-    if(qobject_cast<Scene_bbox_item*>(scene->item(i)))
-       return;
-  }
-  Scene_item* item = new Scene_bbox_item(scene);
-  connect(item, SIGNAL(destroyed()),
-          this, SLOT(enableAction()));
-  item->setName("Scene bbox");
-  item->setColor(Qt::black);
-  item->setRenderingMode(Wireframe);
-  scene->addItem(item);
-  actionBbox->setEnabled(false);
-}
-
-void Polyhedron_demo_trivial_plugin::enableAction() {
-  actionBbox->setEnabled(true);
-}
-
-Q_EXPORT_PLUGIN2(Polyhedron_demo_trivial_plugin, Polyhedron_demo_trivial_plugin)
-
-#include "Polyhedron_demo_trivial_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp
deleted file mode 100644
index f77ee9a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "Scene_points_with_normal_item.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polygon_soup_item.h"
-#include "Polyhedron_type.h"
-#include "Kernel_type.h"
-
-#include "Polyhedron_demo_io_plugin_interface.h"
-#include <fstream>
-
-class Polyhedron_demo_xyz_plugin :
-  public QObject,
-  public Polyhedron_demo_io_plugin_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
-
-public:
-  QString name() const { return "xyz_plugin"; }
-
-  QString nameFilters() const { return "XYZ as Point Set (*.xyz);;Point Set with Normal (*.pwn)"; }
-  bool canLoad() const;
-  Scene_item* load(QFileInfo fileinfo);
-
-  bool canSave(const Scene_item*);
-  bool save(const Scene_item*, QFileInfo fileinfo);
-};
-
-bool Polyhedron_demo_xyz_plugin::canLoad() const {
-  return true;
-}
-
-
-Scene_item*
-Polyhedron_demo_xyz_plugin::load(QFileInfo fileinfo)
-{
-  // Open file
-  std::ifstream in(fileinfo.filePath().toUtf8().data());
-  if(!in) {
-    std::cerr << "Error! Cannot open file " << fileinfo.filePath().toStdString() << std::endl;
-    return NULL;
-  }
-
-  // Read .xyz in a point set
-  Scene_points_with_normal_item* point_set_item = new Scene_points_with_normal_item;
-  point_set_item->setName(fileinfo.completeBaseName());
-  if(!point_set_item->read_xyz_point_set(in)) {
-    delete point_set_item;
-    return NULL;
-  }
-  return point_set_item;
-}
-
-bool Polyhedron_demo_xyz_plugin::canSave(const Scene_item* item)
-{
-  // This plugin supports point sets
-  return qobject_cast<const Scene_points_with_normal_item*>(item);
-}
-
-bool Polyhedron_demo_xyz_plugin::save(const Scene_item* item, QFileInfo fileinfo)
-{
-  // Check extension (quietly)
-  std::string extension = fileinfo.suffix().toUtf8().data();
-  if (extension != "xyz" && extension != "XYZ" &&
-      extension != "pwn" && extension != "PWN")
-    return false;
-
-  // This plugin supports point sets
-  const Scene_points_with_normal_item* point_set_item =
-    qobject_cast<const Scene_points_with_normal_item*>(item);
-  if(!point_set_item)
-    return false;
-
-  // Save point set as .xyz
-  std::ofstream out(fileinfo.filePath().toUtf8().data());
-  return point_set_item->write_xyz_point_set(out);
-}
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Polyhedron_demo_xyz_plugin, Polyhedron_demo_xyz_plugin)
-#include "Polyhedron_demo_xyz_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_slicer_widget.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_slicer_widget.ui
deleted file mode 100644
index 801a81e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_slicer_widget.ui
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Polyhedron_slicer_widget</class>
- <widget class="QWidget" name="Polyhedron_slicer_widget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>295</width>
-    <height>180</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <layout class="QGridLayout">
-     <item row="1" column="1">
-      <widget class="QLineEdit" name="Base_2_x"/>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="Base_2_label">
-       <property name="text">
-        <string>Base 2</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="0">
-      <widget class="QLabel" name="Base_1_label">
-       <property name="text">
-        <string>Base 1</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="Center_label">
-       <property name="text">
-        <string>Center</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLineEdit" name="Base_1_x"/>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="Center_x"/>
-     </item>
-     <item row="0" column="3">
-      <widget class="QLineEdit" name="Base_1_z"/>
-     </item>
-     <item row="0" column="2">
-      <widget class="QLineEdit" name="Base_1_y"/>
-     </item>
-     <item row="2" column="2">
-      <widget class="QLineEdit" name="Center_y"/>
-     </item>
-     <item row="2" column="3">
-      <widget class="QLineEdit" name="Center_z"/>
-     </item>
-     <item row="1" column="2">
-      <widget class="QLineEdit" name="Base_2_y"/>
-     </item>
-     <item row="1" column="3">
-      <widget class="QLineEdit" name="Base_2_z"/>
-     </item>
-     <item row="3" column="3">
-      <widget class="QPushButton" name="Update_plane_button">
-       <property name="text">
-        <string>Update Plane</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="1" column="0">
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QLabel" name="Distance_with_planes_label">
-       <property name="text">
-        <string>Distance with planes</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLineEdit" name="Distance_with_planes"/>
-     </item>
-    </layout>
-   </item>
-   <item row="3" column="0">
-    <layout class="QHBoxLayout">
-     <item>
-      <widget class="QCheckBox" name="newPolylineItemCheckBox">
-       <property name="text">
-        <string>New polyline item for each polyline</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="Generate_button">
-       <property name="text">
-        <string>Generate</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type.h
deleted file mode 100644
index 4f18e78..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type.h
+++ /dev/null
@@ -1,186 +0,0 @@
-#ifndef POLYHEDRON_TYPE_H
-#define POLYHEDRON_TYPE_H
-
-// CGAL
-// kernel
-#include "Kernel_type.h"
-
-// surface mesh
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Polyhedron_items_3.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-#include <CGAL/Has_timestamp.h>
-#include <CGAL/tags.h>
-
-#include <set>
-
-template <typename Refs, typename Tag, typename Point, typename Patch_id>
-class Polyhedron_demo_vertex : 
-  public CGAL::HalfedgeDS_vertex_base<Refs, Tag, Point>
-{
-public:
-  typedef std::set<Patch_id> Set_of_indices;
-
-private:
-  typedef CGAL::HalfedgeDS_vertex_base<Refs, Tag, Point> Pdv_base;
-
-  Set_of_indices indices;
-  std::size_t mID;
-  std::size_t time_stamp_;
-
-public:
-  int nb_of_feature_edges;
-
-  bool is_corner() const {
-    return nb_of_feature_edges > 2;
-  }
-
-  bool is_feature_vertex() const {
-    return nb_of_feature_edges != 0;
-  }
-
-  void add_incident_patch(const Patch_id i) {
-    indices.insert(i);
-  }
-
-  /// For the determinism of Compact_container iterators
-  ///@{
-  typedef CGAL::Tag_true Has_timestamp;
-
-  std::size_t time_stamp() const {
-    return time_stamp_;
-  }
-  void set_time_stamp(const std::size_t& ts) {
-    time_stamp_ = ts;
-  }
-  ///}@
-
-  const Set_of_indices&
-  incident_patches_ids_set() const {
-    return indices;
-  }
-
-  std::size_t& id()       { return mID; }
-  std::size_t  id() const { return mID; }
-  
-  Polyhedron_demo_vertex() : Pdv_base(), mID(-1), nb_of_feature_edges(0) {}
-  Polyhedron_demo_vertex(const Point& p) : Pdv_base(p), mID(-1), nb_of_feature_edges(0) {}
-};
-
-template <class Refs, class Tprev, class Tvertex, class Tface>
-class Polyhedron_demo_halfedge : 
-  public CGAL::HalfedgeDS_halfedge_base<Refs,Tprev,Tvertex,Tface>
-{
-private:
-  bool feature_edge;
-  std::size_t mID;
-  std::size_t time_stamp_;
-
-public:
-
-  Polyhedron_demo_halfedge() 
-    : feature_edge(false), mID(-1) {};
-
-  bool is_feature_edge() const {
-    return feature_edge;
-  }
-
-  void set_feature_edge(const bool b) {
-    feature_edge = b;
-    this->opposite()->feature_edge = b;
-  }
-  
-  std::size_t& id()       { return mID; }
-  std::size_t  id() const { return mID; }
-
-  /// For the determinism of Compact_container iterators
-  ///@{
-  typedef CGAL::Tag_true Has_timestamp;
-
-  std::size_t time_stamp() const {
-    return time_stamp_;
-  }
-  void set_time_stamp(const std::size_t& ts) {
-    time_stamp_ = ts;
-  }
-  ///@}
-};
-
-template <class Refs, class T_, class Pln_, class Patch_id_>
-class Polyhedron_demo_face : 
-  public CGAL::HalfedgeDS_face_base<Refs,T_,Pln_>
-{
-private:
-  Patch_id_ patch_id_;
-  std::size_t mID;
-  std::size_t time_stamp_;
-
-public:
-  typedef Patch_id_ Patch_id;
-  
-  Polyhedron_demo_face() 
-    : patch_id_(1), mID(-1) {}
-  
-  int patch_id() const {
-    return patch_id_;
-  }
-  
-  void set_patch_id(const int i) {
-    patch_id_ = i;
-  }
-  
-  std::size_t& id()       { return mID; }
-  std::size_t  id() const { return mID; }
-
-  /// For the determinism of Compact_container iterators
-  ///@{
-  typedef CGAL::Tag_true Has_timestamp;
-
-  std::size_t time_stamp() const {
-    return time_stamp_;
-  }
-  void set_time_stamp(const std::size_t& ts) {
-    time_stamp_ = ts;
-  }
-  ///@}
-};
-
-template <typename Patch_id>
-class Polyhedron_demo_items : public CGAL::Polyhedron_items_3 {
-public:
-  // wrap vertex
-  template<class Refs, class Traits> struct Vertex_wrapper
-  {
-    typedef typename Traits::Point_3 Point;
-    typedef Polyhedron_demo_vertex<Refs,
-      CGAL::Tag_true,
-      Point,
-      Patch_id> Vertex;
-  };
-
-  // wrap face
-  template<class Refs, class Traits> struct Face_wrapper
-  {
-    typedef Polyhedron_demo_face<Refs,
-      CGAL::Tag_true,
-      typename Traits::Plane_3,
-      Patch_id> Face;
-  };
-
-  // wrap halfedge
-  template<class Refs, class Traits> struct Halfedge_wrapper
-  {
-    typedef Polyhedron_demo_halfedge<Refs,
-      CGAL::Tag_true,
-      CGAL::Tag_true,
-      CGAL::Tag_true> Halfedge;
-  };
-};
-
-#include "Polyhedron_type_fwd.h"
-
-// surface mesh
-typedef CGAL::Polyhedron_3<Kernel, Polyhedron_demo_items<int> > Polyhedron;
-
-#endif // POLYHEDRON_TYPE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type_fwd.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type_fwd.h
deleted file mode 100644
index c430b2b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Polyhedron_type_fwd.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef POLYHEDRON_TYPE_FWD_H
-#define POLYHEDRON_TYPE_FWD_H
-
-#include <CGAL/Filtered_kernel_fwd.h>
-#include <memory>
-
-#ifdef USE_FORWARD_DECL
-
-#include <CGAL/Filtered_kernel_fwd.h>
-
-template <typename Patch_id>
-class Polyhedron_demo_items;
-
-namespace CGAL {
-
-  namespace Mesh_3 {
-    template <typename Kernel>
-    struct Robust_intersection_traits_3;
-  }
-
-  template < typename FT_ >
-  struct Simple_cartesian;
-
-  class Epick;
-
-  class Polyhedron_items_3;
-
-  template < class T, class I, class A>
-  class HalfedgeDS_default;
-
-  template < class PolyhedronTraits_3,
-             class PolyhedronItems_3,
-             template < class T, class I, class A>
-             class T_HDS, 
-             class Alloc
-             >
-  class Polyhedron_3;
-  
-  class Epick;
-} // end namespace CGAL
-
-// kernel
-namespace polyhedron_type_fwd_h {
-// changed since CGAL-3.8-Ic-8
-  typedef CGAL::Epick K1;
-  typedef CGAL::Mesh_3::Robust_intersection_traits_3<K1> Kernel;
-}
-
-#else // USE_FORWARD_DECL
-
-#include "Polyhedron_type.h"
-
-#endif // USE_FORWARD_DECL
-
-// surface mesh
-typedef CGAL::Polyhedron_3<polyhedron_type_fwd_h::Kernel,
-                           Polyhedron_demo_items<int>,
-                           // CGAL::Polyhedron_items_3,
-                           CGAL::HalfedgeDS_default,
-                           std::allocator<int> > Polyhedron;
-
-#endif // POLYHEDRON_TYPE_FWD_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.cpp
deleted file mode 100644
index 1a68ee6..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.cpp
+++ /dev/null
@@ -1,873 +0,0 @@
-
-#ifdef CGAL_GLEW_ENABLED
-# include "GlSplat/GlSplat.h"
-#endif
-
-
-#include <CGAL/check_gl_error.h>
-#include "config.h"
-#include "Scene.h"
-#include "Scene_item.h"
-
-#include <QObject>
-#include <QMetaObject>
-#include <QString>
-#include <QGLWidget>
-#include <QEvent>
-#include <QMouseEvent>
-#include <QPainter>
-#include <QColorDialog>
-#include <QApplication>
-#include <QPointer>
-#include <QList>
-#include <QAbstractProxyModel>
-
-namespace {
-  void CGALglcolor(QColor c)
-  {
-    ::glColor4d(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-  }
-}
-
-#ifdef CGAL_GLEW_ENABLED
-GlSplat::SplatRenderer* Scene::ms_splatting = 0;
-int Scene::ms_splattingCounter = 0;
-GlSplat::SplatRenderer* Scene::splatting()
-{
-  assert(ms_splatting!=0 && "A Scene object must be created before requesting the splatting object");
-  return ms_splatting;
-}
-#endif
-
-Scene::Scene(QObject* parent)
-  : QAbstractListModel(parent),
-    selected_item(-1),
-    item_A(-1),
-    item_B(-1)
-{
-  connect(this, SIGNAL(selectionRay(double, double, double, 
-                                    double, double, double)),
-          this, SLOT(setSelectionRay(double, double, double, 
-                                     double, double, double)));
-#ifdef CGAL_GLEW_ENABLED
-  if(ms_splatting==0)
-    ms_splatting  = new GlSplat::SplatRenderer();
-  ms_splattingCounter++;
-#endif
-}
-
-Scene::Item_id
-Scene::addItem(Scene_item* item)
-{
-  Bbox bbox_before = bbox();
-  m_entries.push_back(item);
-  connect(item, SIGNAL(itemChanged()),
-          this, SLOT(itemChanged()));
-  if(bbox_before + item->bbox() != bbox_before)
-  { emit updated_bbox(); }
-  emit updated();
-  QAbstractListModel::reset();
-  Item_id id = m_entries.size() - 1;
-  emit newItem(id);
-  return id;
-}
-
-Scene_item*
-Scene::replaceItem(Scene::Item_id index, Scene_item* item, bool emit_item_about_to_be_destroyed)
-{
-  if(index < 0 || index >= m_entries.size())
-    return 0;
-
-  if(emit_item_about_to_be_destroyed) {
-    emit itemAboutToBeDestroyed(m_entries[index]);
-  }
-
-  connect(item, SIGNAL(itemChanged()),
-          this, SLOT(itemChanged()));
-  std::swap(m_entries[index], item);
-
-  if ( item->isFinite() && !item->isEmpty() &&
-       m_entries[index]->isFinite() && !m_entries[index]->isEmpty() &&
-        item->bbox()!=m_entries[index]->bbox() )
-  {
-    emit updated_bbox();
-  }
-  emit updated();
-  itemChanged(index);
-  // QAbstractListModel::reset();
-  return item;
-}
-
-int
-Scene::erase(int index)
-{
-  if(index < 0 || index >= m_entries.size())
-    return -1;
-
-  Scene_item* item = m_entries[index];
-  emit itemAboutToBeDestroyed(item);
-  delete item;
-  m_entries.removeAt(index);
-
-  selected_item = -1;
-  emit updated();
-  QAbstractListModel::reset();
-
-  if(--index >= 0)
-    return index;
-  if(!m_entries.isEmpty())
-    return 0;
-  return -1;
-}
-
-int
-Scene::erase(QList<int> indices)
-{
-  QList<Scene_item*> to_be_removed;
-
-  int max_index = -1;
-  Q_FOREACH(int index, indices) {
-    if(index < 0 || index >= m_entries.size())
-      continue;
-    max_index = (std::max)(max_index, index);
-    Scene_item* item = m_entries[index];
-    to_be_removed.push_back(item);
-    emit itemAboutToBeDestroyed(item);
-    delete item;
-  }
-
-  Q_FOREACH(Scene_item* item, to_be_removed) {
-    m_entries.removeAll(item);
-  }
-
-  selected_item = -1;
-  emit updated();
-  QAbstractListModel::reset();
-
-  int index = max_index + 1 - indices.size();
-  if(index >= m_entries.size()) {
-    index = m_entries.size() - 1;
-  }
-  if(index >= 0)
-    return index;
-  if(!m_entries.isEmpty())
-    return 0;
-  return -1;
-}
-
-Scene::~Scene()
-{
-  Q_FOREACH(Scene_item* item_ptr, m_entries)
-  {
-    delete item_ptr;
-  }
-  m_entries.clear();
-
-#ifdef CGAL_GLEW_ENABLED
-  if((--ms_splattingCounter)==0)
-    delete ms_splatting;
-#endif
-}
-
-Scene_item*
-Scene::item(Item_id index) const
-{
-  return m_entries.value(index); // QList::value checks bounds
-}
-
-Scene::Item_id 
-Scene::item_id(Scene_item* scene_item) const
-{
-  return m_entries.indexOf(scene_item);
-}
-
-int
-Scene::numberOfEntries() const
-{
-  return m_entries.size();
-}
-
-// Duplicate a scene item.
-// Return the ID of the new item (-1 on error).
-Scene::Item_id
-Scene::duplicate(Item_id index)
-{
-  if(index < 0 || index >= m_entries.size())
-    return -1;
-
-  const Scene_item* item = m_entries[index];
-  Scene_item* new_item = item->clone();
-  if(new_item) {
-    new_item->setName(tr("%1 (copy)").arg(item->name()));
-    new_item->setColor(item->color());
-    new_item->setVisible(item->visible());
-    addItem(new_item);
-    return m_entries.size() - 1;
-  }
-  else
-    return -1;
-}
-
-void Scene::initializeGL()
-{
-#ifdef CGAL_GLEW_ENABLED
-  ms_splatting->init();
-#endif
-}
-
-// workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define lighter light
-#endif
-
-bool 
-Scene::keyPressEvent(QKeyEvent* e){
-  bool res=false;
-  for (QList<int>::iterator it=selected_items_list.begin(),endit=selected_items_list.end();
-       it!=endit;++it)
-  {
-    Scene_item* item=m_entries[*it];
-    res |= item->keyPressEvent(e);
-  }
-  return res;
-}
-
-void 
-Scene::draw()
-{
-  draw_aux(false, 0);
-}
-void
-Scene::draw(Viewer_interface* viewer)
-{
-  draw_aux(false, viewer);
-}
-void 
-Scene::drawWithNames()
-{
-  draw_aux(true, 0);
-}
-void
-Scene::drawWithNames(Viewer_interface* viewer)
-{
-  draw_aux(true, viewer);
-}
-
-void 
-Scene::draw_aux(bool with_names, Viewer_interface* viewer)
-{
-  // Flat/Gouraud OpenGL drawing
-  for(int index = 0; index < m_entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *m_entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == Flat || item.renderingMode() == FlatPlusEdges || item.renderingMode() == Gouraud)
-      {
-	::glEnable(GL_LIGHTING);
-	::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-	if(index == selected_item)
-	  CGALglcolor(item.color().lighter(120));
-	else
-	  CGALglcolor(item.color());
-	if(item.renderingMode() == Gouraud)
-	  ::glShadeModel(GL_SMOOTH);
-	else
-	  ::glShadeModel(GL_FLAT);
-
-        if(CGAL::check_gl_error(__FILE__, __LINE__)) {
-          std::cerr << "GL error was before the drawing of the item \""
-                    << qPrintable(item.name()) << "\"\n"
-                    << "  with_name = " << std::boolalpha << with_names
-                    << std::endl;
-        }
-        if(viewer)
-          item.draw(viewer);
-        else
-          item.draw();
-        if(CGAL::check_gl_error(__FILE__, __LINE__)) {
-          std::cerr << "GL error was after the drawing of the item \""
-                    << qPrintable(item.name()) << "\"\n"
-                    << "  with_name = " << std::boolalpha << with_names
-                    << std::endl;
-        }
-      }
-    }
-    if(with_names) {
-      ::glPopName();
-    }
-  }
-
-  // Wireframe OpenGL drawing
-  for(int index = 0; index < m_entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *m_entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == FlatPlusEdges || item.renderingMode() == Wireframe)
-      {
-        ::glDisable(GL_LIGHTING);
-        ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-        if(index == selected_item)
-          CGALglcolor(Qt::black);
-        else
-          CGALglcolor(item.color().lighter(50));
-
-        if(viewer)
-          item.draw_edges(viewer);
-        else
-          item.draw_edges();
-      }
-      else{
-        if( item.renderingMode() == PointsPlusNormals ){
-        ::glDisable(GL_LIGHTING);
-        ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-        if(index == selected_item)
-          CGALglcolor(item.color().lighter(120));
-        else
-          CGALglcolor(item.color());
-        if(viewer)
-          item.draw_edges(viewer);
-        else
-          item.draw_edges();
-        }
-      }
-    }
-    if(with_names) {
-      ::glPopName();
-    }
-  }
-
-  // Points OpenGL drawing
-  for(int index = 0; index < m_entries.size(); ++index)
-  {
-    if(with_names) {
-      ::glPushName(index);
-    }
-    Scene_item& item = *m_entries[index];
-    if(item.visible())
-    {
-      if(item.renderingMode() == Points  || item.renderingMode() == PointsPlusNormals)
-      {
-        ::glDisable(GL_LIGHTING);
-        ::glPolygonMode(GL_FRONT_AND_BACK,GL_POINT);
-        ::glPointSize(2.f);
-        ::glLineWidth(1.0f);
-        CGALglcolor(item.color());
-
-        if(viewer)
-          item.draw_points(viewer);
-        else
-          item.draw_points();
-      }
-    }
-    if(with_names) {
-      ::glPopName();
-    }
-  }
-
-#ifdef CGAL_GLEW_ENABLED
-  // Splatting
-  if(!with_names && ms_splatting->isSupported())
-  {
-    ms_splatting->beginVisibilityPass();
-    for(int index = 0; index < m_entries.size(); ++index)
-    {
-      Scene_item& item = *m_entries[index];
-      if(item.visible() && item.renderingMode() == Splatting)
-      {
-        item.draw_splats();
-      }
-    }
-    ms_splatting->beginAttributePass();
-    for(int index = 0; index < m_entries.size(); ++index)
-    {
-      Scene_item& item = *m_entries[index];
-      if(item.visible() && item.renderingMode() == Splatting)
-      {
-        CGALglcolor(item.color());
-        item.draw_splats();
-      }
-    }
-    ms_splatting->finalize();
-  }
-#endif
-
-}
-
-// workaround for Qt-4.2 (see above)
-#undef lighter
-
-int 
-Scene::rowCount(const QModelIndex & parent) const
-{
-  if (parent.isValid())
-    return 0;
-  else
-    return m_entries.size();
-}
-
-int 
-Scene::columnCount(const QModelIndex & parent) const
-{
-  if (parent.isValid())
-    return 0;
-  else
-    return NumberOfColumns;
-}
-
-QVariant 
-Scene::data(const QModelIndex &index, int role) const
-{
-  if (!index.isValid())
-    return QVariant();
-
-  if(index.row() < 0 || index.row() >= m_entries.size())
-    return QVariant();
-
-  if(role == ::Qt::ToolTipRole)
-  {
-    return m_entries[index.row()]->toolTip();
-  }
-  switch(index.column())
-  {
-  case ColorColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return m_entries.value(index.row())->color();
-    else if(role == ::Qt::DecorationRole)
-      return m_entries.value(index.row())->color();
-    break;
-  case NameColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return m_entries.value(index.row())->name();
-    if(role == ::Qt::FontRole)
-      return m_entries.value(index.row())->font();
-    break;
-  case RenderingModeColumn:
-    if(role == ::Qt::DisplayRole) {
-      return m_entries.value(index.row())->renderingModeName();
-    }
-    else if(role == ::Qt::EditRole) {
-      return static_cast<int>(m_entries.value(index.row())->renderingMode());
-    }
-    else if(role == ::Qt::TextAlignmentRole) {
-      return ::Qt::AlignCenter;
-    }
-    break;
-  case ABColumn:
-    if(role == ::Qt::DisplayRole) {
-      if(index.row() == item_A)
-	return "A";
-      if(index.row() == item_B)
-	return "B";
-    }
-    else if(role == ::Qt::TextAlignmentRole) {
-      return ::Qt::AlignCenter;
-    }
-    break;
-  case VisibleColumn:
-    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
-      return m_entries.value(index.row())->visible();
-    break;
-  default:
-    return QVariant();
-  }
-  return QVariant();
-}
-
-QVariant 
-Scene::headerData ( int section, ::Qt::Orientation orientation, int role ) const
-{
-  if(orientation == ::Qt::Horizontal)  {
-    if (role == ::Qt::DisplayRole)
-    {
-      switch(section)
-      {
-      case NameColumn:
-	return tr("Name");
-	break;
-      case ColorColumn:
-	return tr("Color");
-	break;
-      case RenderingModeColumn:
-	return tr("Mode");
-      case ABColumn:
-	return tr("A/B");
-	break;
-      case VisibleColumn:
-	return tr("View");
-	break;
-      default:
-	return QVariant();
-      }
-    }
-    else if(role == ::Qt::ToolTipRole) {
-      if(section == RenderingModeColumn) {
-	return tr("Rendering mode (points/wireframe/flat/flat+edges/Gouraud)");
-      }
-      else if(section == ABColumn) {
-	return tr("Selection A/Selection B");
-      }
-    }
-  }
-  return QAbstractListModel::headerData(section, orientation, role);
-}
-
-Qt::ItemFlags 
-Scene::flags ( const QModelIndex & index ) const
-{
-  if (index.isValid() && index.column() == NameColumn) {
-    return QAbstractListModel::flags(index) | ::Qt::ItemIsEditable;
-  }
-  else {
-    return QAbstractListModel::flags(index); 
-  }
-}
-
-bool 
-Scene::setData(const QModelIndex &index, 
-	       const QVariant &value,
-	       int role)
-{
-  if( role != ::Qt::EditRole || !index.isValid() )
-    return false;
-
-  if(index.row() < 0 || index.row() >= m_entries.size())
-    return false;
-
-  Scene_item* item = m_entries[index.row()];
-  if(!item) return false;
-  switch(index.column())
-  {
-  case NameColumn:
-    item->setName(value.toString());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  case ColorColumn:
-    item->setColor(value.value<QColor>());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  case RenderingModeColumn:
-  {
-    RenderingMode rendering_mode = static_cast<RenderingMode>(value.toInt());
-    // Find next supported rendering mode
-    while ( ! item->supportsRenderingMode(rendering_mode) 
-#ifdef CGAL_GLEW_ENABLED
-         || (rendering_mode==Splatting && !Scene::splatting()->isSupported())
-#endif
-    )
-    {
-      rendering_mode = static_cast<RenderingMode>( (rendering_mode+1) % NumberOfRenderingMode );
-    }
-    item->setRenderingMode(rendering_mode);
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-    break;
-  }
-  case VisibleColumn:
-    item->setVisible(value.toBool());
-    item->changed();
-    emit dataChanged(index, index);
-    return true;
-  default:
-    return false;
-  }
-  return false;
-}
-
-Scene::Item_id Scene::mainSelectionIndex() const {
-  return selected_item;
-}
-
-QList<int> Scene::selectionIndices() const {
-  return selected_items_list;
-}
-
-int Scene::selectionAindex() const {
-  return item_A;
-}
-
-int Scene::selectionBindex() const {
-  return item_B;
-}
-
-QItemSelection Scene::createSelection(int i)
-{
-  return QItemSelection(this->createIndex(i, 0),
-                        this->createIndex(i, LastColumn));
-}
-
-QItemSelection Scene::createSelectionAll()
-{
-  return QItemSelection(this->createIndex(0, 0),
-                        this->createIndex(m_entries.size() - 1 , LastColumn));
-}
-
-void Scene::itemChanged()
-{
-  Scene_item* item = qobject_cast<Scene_item*>(sender());
-  if(item)
-    itemChanged(item);
-}
-
-void Scene::itemChanged(Item_id i)
-{
-  if(i < 0 || i >= m_entries.size())
-    return;
-
-  m_entries[i]->changed();
-  emit dataChanged(this->createIndex(i, 0),
-                   this->createIndex(i, LastColumn));
-}
-
-void Scene::itemChanged(Scene_item* item)
-{
-  item->changed();
-  emit dataChanged(this->createIndex(0, 0),
-                   this->createIndex(m_entries.size() - 1, LastColumn));
-}
-
-bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
-				const QStyleOptionViewItem &option,
-				const QModelIndex &index)
-{
-  QAbstractProxyModel* proxyModel = dynamic_cast<QAbstractProxyModel*>(model);
-  Q_ASSERT(proxyModel);
-  Scene *scene = dynamic_cast<Scene*>(proxyModel->sourceModel());
-  Q_ASSERT(scene);
-  switch(index.column()) {
-  case Scene::VisibleColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
-      if(mouseEvent->button() == ::Qt::LeftButton) {
-	int x = mouseEvent->pos().x() - option.rect.x();
-	if(x >= (option.rect.width() - size)/2 && 
-	  x <= (option.rect.width() + size)/2) {
-	    model->setData(index, ! model->data(index).toBool() );
-	}
-      }
-      return false; //so that the selection can change
-    }
-    return true;
-    break;
-  case Scene::ColorColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
-      if(mouseEvent->button() == ::Qt::LeftButton) {
-        QColor color = 
-          QColorDialog::getColor(model->data(index).value<QColor>(),
-                                 0/*,
-                                    tr("Select color"),
-                                    QColorDialog::ShowAlphaChannel*/);
-        if (color.isValid()) {
-          model->setData(index, color );
-        }
-      }
-    }
-    else if(event->type() == QEvent::MouseButtonDblClick) {
-      return true; // block double-click
-    }
-    return false;
-    break;
-  case Scene::RenderingModeColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
-      if(mouseEvent->button() == ::Qt::LeftButton) {
-        // Switch rendering mode
-        /*RenderingMode*/int rendering_mode = model->data(index, ::Qt::EditRole).toInt();
-        rendering_mode = (rendering_mode+1) % NumberOfRenderingMode;
-        model->setData(index, rendering_mode);
-      }
-    }
-    else if(event->type() == QEvent::MouseButtonDblClick) {
-      return true; // block double-click
-    }
-    return false;
-    break;
-  case Scene::ABColumn:
-    if (event->type() == QEvent::MouseButtonPress) {
-      if(index.row() == scene->item_B) {
-	scene->item_A = index.row();
-	scene->item_B = -1;
-      }
-      else if(index.row() == scene->item_A) {
-	scene->item_B = index.row();
-	scene->item_A = -1;
-      }
-      else if(scene->item_A == -1) {
-	scene->item_A = index.row();
-      }
-      else {
-	scene->item_B = index.row();
-      }
-      scene->dataChanged(scene->createIndex(0, Scene::ABColumn),
-                         scene->createIndex(scene->rowCount() - 1, Scene::ABColumn));
-    }
-    return false;
-    break;
-  default:
-    return QItemDelegate::editorEvent(event, model, option, index);
-  }
-}
-
-void SceneDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
-			  const QModelIndex &index) const
-{
-  if (index.column() != Scene::VisibleColumn) {
-    QItemDelegate::paint(painter, option, index);
-  } else {
-    const QAbstractItemModel *model = index.model();
-    QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ?
-      (option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive : QPalette::Disabled;
-
-    if (option.state & QStyle::State_Selected)
-      painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight));
-
-    bool checked = model->data(index, ::Qt::DisplayRole).toBool();
-    int width = option.rect.width();
-    int height = option.rect.height();
-    size = (std::min)(width, height);
-    int x = option.rect.x() + (option.rect.width() / 2) - (size / 2);;
-    int y = option.rect.y() + (option.rect.height() / 2) - (size / 2);
-    if(checked) {
-      painter->drawPixmap(x, y, checkOnPixmap.scaled(QSize(size, size),
-	::Qt::KeepAspectRatio,
-	::Qt::SmoothTransformation));
-    }
-    else {
-      painter->drawPixmap(x, y, checkOffPixmap.scaled(QSize(size, size),
-	::Qt::KeepAspectRatio,
-	::Qt::SmoothTransformation));
-    }
-    drawFocus(painter, option, option.rect); // since we draw the grid ourselves
-  }
-}
-
-void Scene::setItemVisible(int index, bool b)
-{
-  if( index < 0 || index >= m_entries.size() )
-    return;
-  m_entries[index]->setVisible(b);
-  emit dataChanged(this->createIndex(index, VisibleColumn),
-                   this->createIndex(index, VisibleColumn));
-}
-
-void Scene::setSelectionRay(double orig_x,
-                            double orig_y,
-                            double orig_z,
-                            double dir_x,
-                            double dir_y,
-                            double dir_z)
-{
-  Scene_item* item = this->item(selected_item);
-  if(item) item->select(orig_x,
-                        orig_y,
-                        orig_z,
-                        dir_x,
-                        dir_y,
-                        dir_z);
-}
-
-void Scene::setItemA(int i)
-{
-  item_A = i;
-  if(item_A == item_B)
-  {
-    item_B = -1;
-  }
-  emit dataChanged(this->createIndex(0, ABColumn),
-                   this->createIndex(m_entries.size()-1, ABColumn));
-}
-
-void Scene::setItemB(int i)
-{
-  item_B = i;
-  if(item_A == item_B)
-  {
-    item_A = -1;
-  }
-  emit updated();
-  emit dataChanged(this->createIndex(0, ABColumn),
-                   this->createIndex(m_entries.size()-1, ABColumn));
-}
-
-Scene::Bbox Scene::bbox() const
-{
-  if(m_entries.empty())
-    return Bbox();
-
-  bool bbox_initialized = false;
-  Bbox bbox;
-  Q_FOREACH(Scene_item* item, m_entries) 
-  {
-    if(item->isFinite() && !item->isEmpty()) {
-      if(bbox_initialized) {
-        bbox = bbox + item->bbox();
-      }
-      else { 
-        bbox = item->bbox();
-        bbox_initialized = true;
-      }
-    }
-  }
-  return bbox;
-}
-
-#include "Scene_find_items.h"
-
-namespace scene { namespace details {
-
-Q_DECL_EXPORT
-Scene_item* 
-findItem(const Scene_interface* scene_interface,
-         const QMetaObject& metaobj,
-         QString name, Scene_item_name_fn_ptr fn) {
-  const Scene* scene = dynamic_cast<const Scene*>(scene_interface);
-  if(!scene) return 0;
-  Q_FOREACH(Scene_item* item, scene->entries()) {
-    Scene_item* ptr = qobject_cast<Scene_item*>(metaobj.cast(item));
-    if(ptr && ((ptr->*fn)() == name)) return ptr;
-  }
-  return 0;
-}
-
-Q_DECL_EXPORT
-QList<Scene_item*> 
-findItems(const Scene_interface* scene_interface, 
-          const QMetaObject&,
-          QString name, Scene_item_name_fn_ptr fn)
-{
-  const Scene* scene = dynamic_cast<const Scene*>(scene_interface);
-  QList<Scene_item*> list;
-  if(!scene) return list;
-
-  Q_FOREACH(Scene_item* item, scene->entries()) {
-    Scene_item* ptr = qobject_cast<Scene_item*>(item);
-    if(ptr && ((ptr->*fn)() == name)) {
-      list << ptr;
-    }
-  }
-  return list;
-}
-
-} // end namespace details
-} // end namespace scene
-
-#include "Scene.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.h
deleted file mode 100644
index 6326f1c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef SCENE_H
-#define SCENE_H
-#include "config.h"
-#include "Scene_config.h"
-
-#include "Scene_interface.h"
-#include "Scene_draw_interface.h"
-
-#include <QtOpenGL/qgl.h>
-#include <QAbstractListModel>
-#include <QString>
-#include <QColor>
-#include <QList>
-#include <QItemDelegate>
-#include <QPixmap>
-#include <QItemSelection>
-
-#include <iostream>
-#include <cmath>
-#include <boost/variant.hpp>
-
-class QEvent;
-class QMouseEvent;
-namespace GlSplat { class SplatRenderer; }
-
-class Viewer_interface;
-
-class SCENE_EXPORT Scene  :
-  public QAbstractListModel, public Scene_interface, public Scene_draw_interface
-{
-  Q_OBJECT
-  Q_PROPERTY(int numberOfEntries READ numberOfEntries)
-
-  friend class SceneDelegate;
-
-public:
-  enum Columns { NameColumn = 0, 
-                 ColorColumn, 
-                 RenderingModeColumn, 
-                 VisibleColumn,
-                 ABColumn,
-                 LastColumn = ABColumn,
-                 NumberOfColumns = LastColumn + 1};
-
-  Scene(QObject*  parent);
-  ~Scene();
-
-  int addItem(Scene_item* item);
-  Scene_item* replaceItem(int index, Scene_item* item, bool emit_item_about_to_be_destroyed = false);
-
-  Q_INVOKABLE int erase(int);  
-  int erase(QList<int>);  
-  // Returns the index of the polyhedra just before the
-  // one that is erased, or just after. Returns -1 if
-  // the list is empty.
-
-  // Duplicate a scene item. Return the ID of the new item (-1 on error).
-  int duplicate(int index); 
-
-  // Accessors (getters)
-  int numberOfEntries() const;
-  const QList<Scene_item*>& entries() const { return m_entries; }
-  Q_INVOKABLE Scene_item* item(int) const ;
-  Item_id item_id(Scene_item*) const;
-  
-  //! \todo Replace Index based selection functionality with those
-  //! functions.
-  ///@{
-  Scene_item* selectedItem() const;
-  QList<Scene_item*> selectedItems() const;
-  QList<Scene_item*> selectionA() const;
-  QList<Scene_item*> selectionB() const;
-  ///@}
-
-  int mainSelectionIndex() const;
-  QList<int> selectionIndices() const;
-  int selectionAindex() const;
-  int selectionBindex() const;
-
-  // initializeGL() is called by Viewer::initializeGL()
-  void initializeGL();
-  // draw() is called by Viewer::draw()
-  void draw();
-  void drawWithNames();
-  void draw(Viewer_interface*);
-  void drawWithNames(Viewer_interface*);
-
-  bool keyPressEvent(QKeyEvent* e);
-
-  // Get scene bounding box
-  Bbox bbox() const;
-  double len_diagonal() const
-  {
-    Bbox box = bbox();
-    double dx = box.xmax - box.xmin;
-    double dy = box.ymax - box.ymin;
-    double dz = box.zmax - box.zmin;
-    return std::sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-  // QAbstractItemModel functions
-  int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
-  int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
-  QVariant data ( const QModelIndex & index, int role = ::Qt::DisplayRole ) const;
-  QVariant headerData ( int section, ::Qt::Orientation orientation, int role = ::Qt::DisplayRole ) const;
-  ::Qt::ItemFlags flags ( const QModelIndex & index ) const;
-  bool setData(const QModelIndex &index, const QVariant &value, int role);
-
-  // auxiliary public function for QMainWindow
-  QItemSelection createSelection(int i);
-  QItemSelection createSelectionAll();
-
-public slots:
-  // Notify the scene that an item was modified
-  void itemChanged(); // slots called by items themself
-  void itemChanged(int i); 
-  void itemChanged(Scene_item*);
-
-  void setSelectedItem(int i )
-  {
-    selected_item = i;
-  };
-
-  void setSelectedItemsList(QList<int> l )
-  {
-    selected_items_list = l;
-  };
-
-  // Accessors (setters)
-  void setItemVisible(int, bool b);
-  void setItemA(int i);
-  void setItemB(int i);
-
-signals:
-  void newItem(int);
-  void updated_bbox();
-  void updated();
-  void itemAboutToBeDestroyed(Scene_item*);
-  void selectionRay(double, double, double, double, double, double);
-
-private slots:
-  void setSelectionRay(double, double, double, double, double, double);
-
-private:
-  void draw_aux(bool with_names, Viewer_interface*);
-  typedef QList<Scene_item*> Entries;
-  Entries m_entries;
-  int selected_item;
-  QList<int> selected_items_list;
-  int item_A;
-  int item_B;
-#ifdef CGAL_GLEW_ENABLED
-  static GlSplat::SplatRenderer* ms_splatting;
-  static int ms_splattingCounter;
-public:
-  static GlSplat::SplatRenderer* splatting();
-#endif
-}; // end class Scene
-
-class SCENE_EXPORT SceneDelegate : public QItemDelegate
-{
-public:
-  SceneDelegate(QObject * parent = 0)
-    : QItemDelegate(parent),
-      checkOnPixmap(":/cgal/icons/check-on.png"),
-      checkOffPixmap(":/cgal/icons/check-off.png")
-  {
-  }
-
-  bool editorEvent(QEvent *event, QAbstractItemModel *model,
-                   const QStyleOptionViewItem &option,
-                   const QModelIndex &index);
-  void paint(QPainter *painter, const QStyleOptionViewItem &option,
-             const QModelIndex &index) const;
-
-private:
-  QPixmap checkOnPixmap;
-  QPixmap checkOffPixmap;
-  mutable int size;
-}; // end class SceneDelegate
-
-#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.cpp
deleted file mode 100644
index c917db3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "Scene_c2t3_item.h"
-
-#include "Scene_c2t3_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.h
deleted file mode 100644
index ff6b79a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#ifndef SCENE_C2T3_ITEM_H
-#define SCENE_C2T3_ITEM_H
-
-#include "Scene_c2t3_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "C2t3_type.h"
-#include <iostream>
-
-#include <qgl.h>
-#include <QtCore/qglobal.h>
-#include <CGAL/gl.h>
-#include <CGAL/glu.h>
-
-class SCENE_C2T3_ITEM_EXPORT Scene_c2t3_item : public Scene_item
-{
-  Q_OBJECT
-public:
-  Scene_c2t3_item(const C2t3& c2t3)
-    : c2t3_(c2t3)
-  {
-  }
-
-  ~Scene_c2t3_item()
-  {
-  }
-
-  C2t3& c2t3() {
-    return c2t3_;
-  }
-
-  const C2t3& c2t3() const {
-    return c2t3_;
-  }
-  bool isFinite() const { return true; }
-  bool isEmpty() const {
-    return c2t3().triangulation().number_of_vertices() == 0;
-  }
-
-  Bbox bbox() const {
-    if(isEmpty())
-      return Bbox();
-    else {
-      bool first = true;
-      CGAL::Bbox_3 result;
-      for(Tr::Finite_vertices_iterator
-            vit = ++c2t3().triangulation().finite_vertices_begin(),
-            end = c2t3().triangulation().finite_vertices_end();
-          vit != end; ++vit)
-      {
-        if(first) {
-          result = vit->point().bbox();
-          first = false;
-        } else { 
-          result = result + vit->point().bbox();
-        }
-      }
-      return Bbox(result.xmin(), result.ymin(), result.zmin(),
-                  result.xmax(), result.ymax(), result.zmax());
-    }
-  }
-
-
-  Scene_c2t3_item* clone() const {
-    return 0;
-  }
-
-  QString toolTip() const {
-    return tr("<p><b>2D complex in a 3D triangulation</b></p>"
-              "<p>Number of vertices: %1<br />"
-              "Number of surface facets: %2<br />")
-      .arg(c2t3().triangulation().number_of_vertices())
-      .arg(c2t3().number_of_facets());
-  }
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); // CHECK THIS!
-  }
-
-  void draw() const {
-    ::glBegin(GL_TRIANGLES);
-    for(C2t3::Facet_iterator
-          fit = c2t3().facets_begin(),
-          end = c2t3().facets_end();
-        fit != end; ++fit)
-    {
-      const Tr::Cell_handle& cell = fit->first;
-      const int& index = fit->second;
-      const Tr::Geom_traits::Point_3& pa = cell->vertex((index+1)&3)->point();
-      const Tr::Geom_traits::Point_3& pb = cell->vertex((index+2)&3)->point();
-      const Tr::Geom_traits::Point_3& pc = cell->vertex((index+3)&3)->point();
-      draw_triangle(pa, pb, pc);
-    }
-    ::glEnd();
-    
-    GLenum gl_error = ::glGetError();
-    if(gl_error != GL_NO_ERROR)
-      std::cerr << "GL error: " << gluErrorString(gl_error) << std::endl;
-  }
-
-private:
-  static void draw_triangle(const Tr::Point& pa,
-                            const Tr::Point& pb,
-                            const Tr::Point& pc) {
-    Tr::Geom_traits::Vector_3 n = cross_product(pb - pa, pc -pa);
-    n = n / CGAL::sqrt(n*n);
-
-    ::glNormal3d(n.x(),n.y(),n.z());
-
-    ::glVertex3d(pa.x(),pa.y(),pa.z());
-    ::glVertex3d(pb.x(),pb.y(),pb.z());
-    ::glVertex3d(pc.x(),pc.y(),pc.z());
-  }
-
-private:
-  C2t3 c2t3_;
-};
-
-#endif // SCENE_C2T3_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.cpp
deleted file mode 100644
index b28fc6a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.cpp
+++ /dev/null
@@ -1,400 +0,0 @@
-#include "Scene_combinatorial_map_item.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_interface.h"
-
-#include <QObject>
-#include <QMenu>
-#include <QAction>
-#include <QtDebug>
- #include <QKeyEvent>
-#include <CGAL/corefinement_operations.h>
-
-Scene_combinatorial_map_item::Scene_combinatorial_map_item(Scene_interface* scene,void* address):last_known_scene(scene),volume_to_display(0),exportSelectedVolume(NULL),address_of_A(address){m_combinatorial_map=NULL;}
-Scene_combinatorial_map_item::~Scene_combinatorial_map_item(){if (m_combinatorial_map!=NULL) delete m_combinatorial_map;}
-
-Scene_combinatorial_map_item* Scene_combinatorial_map_item::clone() const{return NULL;}
-
-Kernel::Vector_3 Scene_combinatorial_map_item::compute_face_normal(Combinatorial_map_3::Dart_const_handle adart) const
-{
-  typedef Combinatorial_map_3::Dart_of_orbit_const_range<1> Dart_in_facet_range;
-  typedef Kernel::Vector_3 Vector_3;
-  Vector_3 normal = CGAL::NULL_VECTOR;
-  
-  Dart_in_facet_range vertices=combinatorial_map().darts_of_orbit<1>(adart);
-  Kernel::Point_3 points[3];
-  int index=0;
-  Dart_in_facet_range::const_iterator pit=vertices.begin();
-  for (;pit!=vertices.end() && index!=3;++pit,++index ){
-    points[index]=pit->attribute<0>()->point();
-  }
-  
-  if (index!=3) return normal;
-  
-  do{
-    Vector_3 n = CGAL::cross_product(points[2]-points[1],points[0]-points[1]);
-    if (n != Vector_3(0,0,0) )
-      normal = normal + (n / std::sqrt(n*n));
-    points[0]=points[1];
-    points[1]=points[2];
-    if ( pit==vertices.end() ) break;
-    
-    points[2]=pit->attribute<0>()->point();
-    ++pit;
-  }while(true);
-  
-  return normal == Vector_3(0,0,0)? normal : normal / std::sqrt(normal * normal);
-}  
-
-void Scene_combinatorial_map_item::set_next_volume(){
-  ++volume_to_display;
-  volume_to_display=volume_to_display%(combinatorial_map().attributes<3>().size()+1);
-  emit itemChanged();
-
-  if (exportSelectedVolume!=NULL && ( volume_to_display==1 || volume_to_display==0 ) )
-    exportSelectedVolume->setEnabled(!exportSelectedVolume->isEnabled());
-}
-
-
-template <class Predicate> 
-void Scene_combinatorial_map_item::export_as_polyhedron(Predicate pred,const QString& name) const {
-  typedef Combinatorial_map_3::Dart_const_handle Dart_handle;
-  typedef Combinatorial_map_3::One_dart_per_cell_const_range<3> One_dart_per_vol_range;
-  typedef CGAL::internal::Import_volume_as_polyhedron<Polyhedron::HalfedgeDS> Volume_import_modifier;
-  
-  std::vector<Dart_handle> darts;
-  One_dart_per_vol_range cell_range=combinatorial_map().template one_dart_per_cell<3>();
-
-  
-  for (One_dart_per_vol_range::const_iterator it = cell_range.begin();it!= cell_range.end() ; ++it )
-    if ( pred(it) ){
-      darts.push_back(it);
-      if (Predicate::only_one_run) break;
-    }
-
-  if (!darts.empty())
-  {
-    Volume_import_modifier modifier=Predicate::swap_orientation?
-      Volume_import_modifier(combinatorial_map(),darts.begin(),darts.end(),Predicate::swap_orientation):
-      Volume_import_modifier(combinatorial_map(),darts.begin(),darts.end());
-
-    Polyhedron* new_poly=new Polyhedron();
-    new_poly->delegate(modifier);
-    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(new_poly);
-    new_item->setName(name);
-    last_known_scene->addItem(new_item);  
-  }  
-}
-
-struct Select_volume{
-  static const bool only_one_run=true;
-  static const bool swap_orientation=false;
-  Select_volume(std::size_t i):volume_to_select(i),index(0){}
-  template <class Dart_handle>
-  bool operator() (Dart_handle){
-    return ++index==volume_to_select;
-  }
-private:
-  std::size_t volume_to_select;
-  std::size_t index;
-};
-
-void Scene_combinatorial_map_item::export_current_volume_as_polyhedron() const {
-  if (volume_to_display==0) return; //no volume selected
-  
-  Select_volume predicate(volume_to_display);
-  export_as_polyhedron(predicate,QString("%1_%2").arg(this->name()).arg(volume_to_display-1));
-}
-
-struct Select_union{
-  static const bool only_one_run=false;
-  static const bool swap_orientation=true;
-  template <class Dart_handle>
-  bool operator() (Dart_handle d){ return d->template attribute<3>()->info().outside.size()==2; }
-};
-
-struct Select_inter{
-  static const bool only_one_run=false;
-  static const bool swap_orientation=false;
-  template <class Dart_handle>
-  bool operator() (Dart_handle d){ return d->template attribute<3>()->info().inside.size()==2; }
-};
-
-struct Select_A_minus_B{
-  static const bool only_one_run=false;
-  static const bool swap_orientation=false;
-  Select_A_minus_B(void* address):address_of_A(address){}
-  template <class Dart_handle>
-  bool operator() (Dart_handle d){ 
-    return d->template attribute<3>()->info().inside.size()==1 &&
-           static_cast<void*>(*d->template attribute<3>()->info().inside.begin())==address_of_A;  
-  }
-private:
-  void* address_of_A;
-};
-
-struct Select_B_minus_A{
-  static const bool only_one_run=false;
-  static const bool swap_orientation=false;
-  Select_B_minus_A(void* address):address_of_A(address){}
-  template <class Dart_handle>
-  bool operator() (Dart_handle d){ 
-    return d->template attribute<3>()->info().inside.size()==1 &&
-           static_cast<void*>(*d->template attribute<3>()->info().inside.begin())!=address_of_A;  
-  }
-private:
-  void* address_of_A;
-};
-
-void Scene_combinatorial_map_item::export_union_as_polyhedron() const {
-  export_as_polyhedron(Select_union(),QString("%1_union_%2").arg("A").arg("B"));
-}
-void Scene_combinatorial_map_item::export_intersection_as_polyhedron() const{
-  export_as_polyhedron(Select_inter(),QString("%1_inter_%2").arg("A").arg("B"));  
-}
-void Scene_combinatorial_map_item::export_A_minus_B_as_polyhedron() const{
-  Select_A_minus_B predicate(address_of_A);
-  export_as_polyhedron(predicate,QString("%1_minus_%2").arg("A").arg("B"));
-}
-void Scene_combinatorial_map_item::export_B_minus_A_as_polyhedron() const{
-  Select_B_minus_A predicate(address_of_A);
-  export_as_polyhedron(predicate,QString("%1_minus_%2").arg("B").arg("A"));
-}
-
-QMenu* Scene_combinatorial_map_item::contextMenu()
-{
-  const char* prop_name = "Menu modified by Scene_combinatorial_map_item.";
-
-  QMenu* menu = Scene_item::contextMenu();
-
-  // Use dynamic properties:
-  // http://doc.trolltech.com/lastest/qobject.html#property
-  bool menuChanged = menu->property(prop_name).toBool();
-
-  if(!menuChanged) {
-    QAction* actionSelectNextVolume = 
-      menu->addAction(tr("Iterate over volumes"));
-    actionSelectNextVolume->setObjectName("actionSelectNextVolume");
-    connect(actionSelectNextVolume, SIGNAL(triggered()),this, SLOT(set_next_volume()));
-
-    exportSelectedVolume = 
-      menu->addAction(tr("Export current volume as polyhedron"));
-    exportSelectedVolume->setObjectName("exportSelectedVolume");
-    connect(exportSelectedVolume, SIGNAL(triggered()),this, SLOT(export_current_volume_as_polyhedron()));
-    exportSelectedVolume->setEnabled(volume_to_display!=0);
-    menu->setProperty(prop_name, true);
-    
-    if(is_from_corefinement()){
-      //Export union as polyhedron
-      QAction* exportUnion = 
-        menu->addAction(tr("Export union as polyhedron"));
-      exportUnion->setObjectName("exportUnion");
-      connect(exportUnion, SIGNAL(triggered()),this, SLOT(export_union_as_polyhedron()));
-
-      //Export intersection as polyhedron
-      QAction* exportIntersection = 
-        menu->addAction(tr("Export intersection as polyhedron"));
-      exportIntersection->setObjectName("exportIntersection");
-      connect(exportIntersection, SIGNAL(triggered()),this, SLOT(export_intersection_as_polyhedron()));
-
-      //Export A minus B as polyhedron
-      QAction* exportAMinusB = 
-        menu->addAction(tr("Export A minus B as polyhedron"));
-      exportAMinusB->setObjectName("exportAMinusB");
-      connect(exportAMinusB, SIGNAL(triggered()),this, SLOT(export_A_minus_B_as_polyhedron()));
-
-      //Export B minus A as polyhedron
-      QAction* exportBMinusA = 
-        menu->addAction(tr("Export B minus A as polyhedron"));
-      exportBMinusA->setObjectName("exportBMinusA");
-      connect(exportBMinusA, SIGNAL(triggered()),this, SLOT(export_B_minus_A_as_polyhedron()));
-      
-    }
-  }
-  return menu;
-}
-
-bool Scene_combinatorial_map_item::keyPressEvent(QKeyEvent* e){
-  if (e->key()==Qt::Key_N){
-    set_next_volume();
-    return true;
-  }
-  return false;
-}
-
-void Scene_combinatorial_map_item::direct_draw() const {
-  #if 0
-  typedef Combinatorial_map_3::One_dart_per_cell_const_range<3> Volume_dart_range;
-  typedef Combinatorial_map_3::One_dart_per_incident_cell_const_range<2,3> Facet_in_volume_drange;
-  typedef Combinatorial_map_3::Dart_of_orbit_const_range<1> Dart_in_facet_range;
-  Volume_dart_range dart_per_volume_range = combinatorial_map().one_dart_per_cell<3>();
-  
-  std::size_t index = 0;
-  for (Volume_dart_range::const_iterator vit=dart_per_volume_range.begin();vit!=dart_per_volume_range.end();++vit)
-  {
-    if (++index!=volume_to_display && volume_to_display!=0) continue;
-    Facet_in_volume_drange facet_range=combinatorial_map().one_dart_per_incident_cell<2,3>(vit);
-    
-    for(Facet_in_volume_drange::const_iterator fit=facet_range.begin();fit!=facet_range.end();++fit){
-      Dart_in_facet_range vertices=combinatorial_map().darts_of_orbit<1>(fit);
-      Kernel::Vector_3 normal = compute_face_normal(fit);
-      
-      ::glBegin(GL_POLYGON);  
-      ::glNormal3d(normal.x(),normal.y(),normal.z());
-    
-      for (Dart_in_facet_range::const_iterator pit=vertices.begin();pit!=vertices.end();++pit ){
-        const Kernel::Point_3& p= pit->attribute<0>()->point();
-        ::glVertex3d(p.x(),p.y(),p.z());
-      }      
-      ::glEnd(); 
-    }
-  }
-  #else
-  std::size_t index = 0;
-  int voltreated = combinatorial_map().get_new_mark();
-  int facetreated = combinatorial_map().get_new_mark();
-  Combinatorial_map_3::Dart_const_range::const_iterator
-    darts_it=combinatorial_map().darts().begin(), darts_end=combinatorial_map().darts().end();
-  for( ; darts_it!=darts_end; ++darts_it)
-  {
-    if ( !combinatorial_map().is_marked(darts_it,voltreated) )
-    {
-      ++index;
-      //iterate over all the darts of the volume
-      Combinatorial_map_3::Dart_of_cell_const_range<3>::const_iterator
-        vol_it=combinatorial_map().darts_of_cell<3>(darts_it).begin(),
-        vol_end=combinatorial_map().darts_of_cell<3>(darts_it).end();
-      if ( volume_to_display!=0 && index!=volume_to_display )
-      {
-        //only mark darts if the volume is not the one to display
-        for ( ;vol_it!=vol_end; ++vol_it )
-        {
-          combinatorial_map().mark(vol_it,facetreated);
-          combinatorial_map().mark(vol_it, voltreated);
-        }
-      }
-      else
-      {
-        for ( ;vol_it!=vol_end; ++vol_it )
-        {
-          if ( !combinatorial_map().is_marked(vol_it,facetreated) )
-          {
-            Kernel::Vector_3 normal = compute_face_normal(vol_it);
-            ::glBegin(GL_POLYGON);
-            ::glNormal3d(normal.x(),normal.y(),normal.z());
-
-            //iterate over all darts of facets
-            for ( Combinatorial_map_3::Dart_of_orbit_const_range<1>::const_iterator
-                  face_it=combinatorial_map().darts_of_orbit<1>(vol_it).begin(),
-                  face_end=combinatorial_map().darts_of_orbit<1>(vol_it).end();
-                  face_it!=face_end; ++face_it)
-            {
-              const Kernel::Point_3& p= face_it->attribute<0>()->point();
-              ::glVertex3d(p.x(),p.y(),p.z());
-              combinatorial_map().mark(face_it,facetreated);
-              combinatorial_map().mark(face_it, voltreated);
-            }
-            ::glEnd();
-          }
-        }
-      }
-      if ( index==volume_to_display ) break;
-    }
-  }
-  //mark remaining darts to have an O(1) free_mark
-  for( ;  darts_it!=darts_end; ++darts_it)
-  {
-    combinatorial_map().mark(darts_it, facetreated);
-    combinatorial_map().mark(darts_it, voltreated);
-  }
-
-  combinatorial_map().free_mark(facetreated);
-  combinatorial_map().free_mark(voltreated);
-  #endif
-}
-
-void Scene_combinatorial_map_item::direct_draw_edges() const {
-  typedef Combinatorial_map_3::One_dart_per_cell_const_range<1> Edge_darts;
-  Edge_darts darts=combinatorial_map().one_dart_per_cell<1>();
-  ::glBegin(GL_LINES);
-  for (Edge_darts::const_iterator dit=darts.begin();dit!=darts.end();++dit){
-    CGAL_assertion(!dit->is_free(1));
-    const Kernel::Point_3& a = dit->attribute<0>()->point();
-    const Kernel::Point_3& b = dit->beta(1)->attribute<0>()->point();
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());  
-  }
-  ::glEnd();
-}
-
-void Scene_combinatorial_map_item::draw_points() const{
-  typedef Combinatorial_map_3::Attribute_const_range<0>::type Point_range;
-  const Point_range& points=combinatorial_map().attributes<0>();
-  ::glBegin(GL_POINTS);
-  for(Point_range::const_iterator pit=boost::next(points.begin());pit!=points.end();++pit){
-    const Kernel::Point_3& p=pit->point();
-    ::glVertex3d(p.x(),p.y(),p.z());
-  }
-  ::glEnd();
-}
-
-bool Scene_combinatorial_map_item::isEmpty() const {return combinatorial_map().number_of_darts()==0;}
-
-Scene_combinatorial_map_item::Bbox 
-Scene_combinatorial_map_item::bbox() const {
-  typedef Combinatorial_map_3::Attribute_const_range<0>::type Point_range;
-  const Point_range& points=combinatorial_map().attributes<0>();
-  CGAL::Bbox_3 bbox=points.begin()->point().bbox();
-  for(Point_range::const_iterator pit=boost::next(points.begin());pit!=points.end();++pit)
-    bbox=bbox+pit->point().bbox();
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-
-QString Scene_combinatorial_map_item::toolTip() const{ 
-  if(!m_combinatorial_map)
-    return QString();
-
-  std::vector<unsigned int> cells(5);
-  for (unsigned int i=0; i<=4; ++i)
-    cells[i]=i;
-  std::vector<unsigned int> res = combinatorial_map().count_cells(cells);
-  if (volume_to_display==0)
-    return QObject::tr("<p>Combinatorial_map_3 <b>%1</b> (mode: %8, color: %9)</p>"
-                       "<p>Number of darts: %2<br />"
-                       "Number of vertices: %3<br />"
-                       "Number of edges: %4<br />"
-                       "Number of facets: %5<br />"
-                       "Number of volumes: %6<br />"
-                       "Number of connected components: %7</p>")
-      .arg(this->name())
-      .arg(combinatorial_map().number_of_darts())
-      .arg(res[0])
-      .arg(res[1])
-      .arg(res[2])
-      .arg(res[3])
-      .arg(res[4])
-      .arg(this->renderingModeName())
-      .arg(this->color().name());
-  return QObject::tr("<p>Combinatorial_map_3 <b>%1</b> (mode: %8, color: %9)</p>"
-                     "<p>Number of darts: %2<br />"
-                     "Number of vertices: %3<br />"
-                     "Number of edges: %4<br />"
-                     "Number of facets: %5<br />"
-                     "Number of volumes: %6<br />"
-                     "Number of connected components: %7 <br />"
-                     "Currently Displaying facets of volume: %10 </p>")
-    .arg(this->name())
-    .arg(combinatorial_map().number_of_darts())
-    .arg(res[0])
-    .arg(res[1])
-    .arg(res[2])
-    .arg(res[3])
-    .arg(res[4])
-    .arg(this->renderingModeName())
-    .arg(this->color().name())
-    .arg(volume_to_display-1);  
-}
-
-
-#include "Scene_combinatorial_map_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.h
deleted file mode 100644
index ff32997..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H
-#define SCENE_COMBINATORIAL_MAP_ITEM_H
-
-//=========
-#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h>
-#include "Scene_combinatorial_map_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include <iostream>
-
-#include "Polyhedron_type.h"
-
-typedef CGAL::internal_IOP::Item_with_points_and_volume_info<Kernel,Polyhedron> Items;
-typedef CGAL::Combinatorial_map<3,Items> Combinatorial_map_3;
-//=========
-
-class QMenu;
-class QAction;
-class Scene_interface;
-class Scene_polyhedron_item;
-
-class SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Scene_combinatorial_map_item
-  : public Scene_item_with_display_list 
-{
-  Q_OBJECT
-public:  
-  Scene_combinatorial_map_item(Scene_interface*,void* ad_A=NULL);
-  ~Scene_combinatorial_map_item();
-
-  Scene_combinatorial_map_item* clone() const;
-  // Function to override the context menu
-  QMenu* contextMenu();
-
-//  bool load(std::istream& in);
-//  void load(Scene_polyhedron_item*);
-//  bool save(std::ostream& out) const;
-
-  QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS!
-  //Event handling
-  virtual bool keyPressEvent(QKeyEvent*);
-  // OpenGL drawing in a display list
-  void direct_draw() const;
-  void direct_draw_edges() const;
-  void draw_points() const;
-
-  bool isFinite() const { return true; }
-  bool is_from_corefinement() const {return address_of_A!=NULL;}
-  bool isEmpty() const;
-  Bbox bbox() const;
-  
-  const Combinatorial_map_3& combinatorial_map() const
-  {
-    return *m_combinatorial_map;
-  }
-
-  Combinatorial_map_3& combinatorial_map()
-  {
-    return *m_combinatorial_map;
-  }
-  
-  Combinatorial_map_3* m_combinatorial_map;
-  
-private:
-  Kernel::Vector_3 compute_face_normal(Combinatorial_map_3::Dart_const_handle adart) const;
-  Scene_interface* last_known_scene;
-  std::size_t volume_to_display;
-  QAction* exportSelectedVolume;
-  void* address_of_A;
-  template <class Predicate> void export_as_polyhedron(Predicate,const QString&) const;
-
-public slots:
-  void set_next_volume();
-  void export_current_volume_as_polyhedron() const;
-  void export_union_as_polyhedron() const;
-  void export_intersection_as_polyhedron() const;
-  void export_A_minus_B_as_polyhedron() const;
-  void export_B_minus_A_as_polyhedron() const;
-}; // end class Scene_combinatorial_map_item
-
-#endif // SCENE_COMBINATORIAL_MAP_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_display_list_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_display_list_item.h
deleted file mode 100644
index 3aabf7a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_display_list_item.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <CGAL_demo/Scene_item_with_display_list.h>
-
-struct Scene_display_list_item
-  : public Scene_item_with_display_list
-{
-  Scene_display_list_item(GLuint id, GLuint edges_id = 0)
-    : Scene_item_with_display_list(id, edges_id) {}
-
-  Scene_item* clone() const { return 0; }
-  bool supportsRenderingMode(RenderingMode) const { return false; }
-  QString toolTip() const { return tr("Display list item"); }
-  void direct_draw() const {}
-};
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_draw_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_draw_interface.h
deleted file mode 100644
index bc4081c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_draw_interface.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef SCENE_DRAW_INTERFACE_H
-#define SCENE_DRAW_INTERFACE_H
-
-class QKeyEvent;
-class Viewer_interface;
-
-class Scene_draw_interface {
-public:
-  virtual ~Scene_draw_interface(){}
-  virtual void initializeGL() = 0;
-  virtual void draw() = 0;
-  virtual void draw(Viewer_interface*) { draw(); };
-  virtual void drawWithNames() = 0;
-  virtual void drawWithNames(Viewer_interface*) { drawWithNames(); }
-  virtual bool keyPressEvent(QKeyEvent* e) = 0;
-};
-
-#endif // SCENE_DRAW_INTERFACE_H;
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.cpp
deleted file mode 100644
index 0fed054..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-#include "opengl_tools.h"
-#include "Scene_edit_polyhedron_item.h"
-#include <boost/foreach.hpp>
-#include <algorithm>
-
-
-#include <CGAL/gl_render.h>
-
-Scene_edit_polyhedron_item::Scene_edit_polyhedron_item
-  (Scene_polyhedron_item* poly_item, 
-  Ui::DeformMesh* ui_widget,
-  QMainWindow* mw)
-  : ui_widget(ui_widget), 
-    poly_item(poly_item),
-    deform_mesh(*(poly_item->polyhedron()), Deform_mesh::Vertex_index_map(), Deform_mesh::Hedge_index_map(), Array_based_vertex_point_map(&positions)),
-    is_rot_free(true),
-    own_poly_item(true),
-    k_ring_selector(poly_item, mw, Scene_polyhedron_item_k_ring_selection::Active_handle::VERTEX, true),
-    quadric(gluNewQuadric())
-{
-  mw->installEventFilter(this);
-  gluQuadricNormals(quadric, GLU_SMOOTH);
-  // bind vertex picking 
-  connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Vertex_handle>&)), this,
-    SLOT(selected(const std::set<Polyhedron::Vertex_handle>&)));
-
-  poly_item->set_color_vector_read_only(true); // to prevent recomputation of color vector in changed()
-  poly_item->update_vertex_indices();
-
-  length_of_axis = bbox().diagonal_length() / 15.0;
-
-  // interleave events of viewer (there is only one viewer) 
-  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-  viewer->installEventFilter(this);
-    
-  // create an empty group of control vertices for starting
-  create_ctrl_vertices_group();
-   
-  // start QObject's timer for continuous effects 
-  // (deforming mesh while mouse not moving)
-  startTimer(0);
-
-  // Required for drawing functionality
-  positions.resize(num_vertices(*polyhedron())*3);
-  normals.resize(positions.size());
-  Polyhedron::Vertex_iterator vb, ve;
-  std::size_t counter = 0;
-  for(vb=polyhedron()->vertices_begin(), ve = polyhedron()->vertices_end();vb != ve; ++vb, ++counter) {
-    positions[counter*3] = vb->point().x();
-    positions[counter*3+1] = vb->point().y();
-    positions[counter*3+2] = vb->point().z();
-
-    const Polyhedron::Traits::Vector_3& n = 
-      compute_vertex_normal<Polyhedron::Vertex, Polyhedron::Traits>(*vb);
-
-    normals[counter*3] = n.x();
-    normals[counter*3+1] = n.y();
-    normals[counter*3+2] = n.z();
-  }
-
-  tris.resize(polyhedron()->size_of_facets()*3);
-  counter = 0;
-  for(Polyhedron::Facet_handle fb = polyhedron()->facets_begin(); fb != polyhedron()->facets_end(); ++fb, ++counter) {
-    tris[counter*3] =  static_cast<unsigned int>(fb->halfedge()->vertex()->id());
-    tris[counter*3+1] = static_cast<unsigned int>(fb->halfedge()->next()->vertex()->id());
-    tris[counter*3+2] = static_cast<unsigned int>(fb->halfedge()->prev()->vertex()->id());
-  }
-
-  edges.resize(polyhedron()->size_of_halfedges());
-  counter = 0;
-  for(Polyhedron::Edge_iterator eb = polyhedron()->edges_begin(); eb != polyhedron()->edges_end(); ++eb, ++counter) {
-    edges[counter*2] = static_cast<unsigned int>(eb->vertex()->id());
-    edges[counter*2+1] = static_cast<unsigned int>(eb->opposite()->vertex()->id());
-  }
-}
-
-Scene_edit_polyhedron_item::~Scene_edit_polyhedron_item()
-{
-  while(is_there_any_ctrl_vertices_group())
-  {
-    delete_ctrl_vertices_group(false);
-  }
-  gluDeleteQuadric(quadric);
-  if (own_poly_item) delete poly_item;
-}
-
-/////////////////////////////////////////////////////////
-/////////// Most relevant functions lie here ///////////
-void Scene_edit_polyhedron_item::deform()
-{
-  if(!is_there_any_ctrl_vertices()) { return; }
-
-  for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-  { it->set_target_positions(); }
-  deform_mesh.deform();
-
-  poly_item->changed(); // now we need to call poly_item changed to delete AABB tree 
-  emit itemChanged();
-}
-
-void Scene_edit_polyhedron_item::timerEvent(QTimerEvent* /*event*/)
-{ // just handle deformation - paint like selection is handled in eventFilter()
-  if(state.ctrl_pressing && (state.left_button_pressing || state.right_button_pressing)) {
-    if(!ui_widget->ActivatePivotingCheckBox->isChecked()) {
-      deform();
-    }
-    else {
-      emit itemChanged(); // for redraw while Pivoting (since we close signals of manipulatedFrames while pivoting, 
-                          // for now redraw with timer)
-    }
-  }
-}
-bool Scene_edit_polyhedron_item::eventFilter(QObject* /*target*/, QEvent *event)
-{
-  // This filter is both filtering events from 'viewer' and 'main window'
-  Mouse_keyboard_state_deformation old_state = state;
-  ////////////////// TAKE EVENTS /////////////////////
-  // key events
-  if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) 
-  {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
-    Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
-
-    state.ctrl_pressing = modifiers.testFlag(Qt::ControlModifier);
-    state.shift_pressing = modifiers.testFlag(Qt::ShiftModifier);
-  }
-  // mouse events
-  if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease)
-	{
-    QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
-    if(mouse_event->button() == Qt::LeftButton) {
-      state.left_button_pressing = event->type() == QEvent::MouseButtonPress;
-    }
-    if(mouse_event->button() == Qt::RightButton) {
-      state.right_button_pressing = event->type() == QEvent::MouseButtonPress;
-    }    
-  }
-  ////////////////// //////////////// /////////////////////
-
-  if(!poly_item->visible()) { return false; } // if not visible just update event state but don't do any action
-
-  // check state changes between old and current state
-  bool ctrl_pressed_now = state.ctrl_pressing && !old_state.ctrl_pressing;
-  bool ctrl_released_now = !state.ctrl_pressing && old_state.ctrl_pressing;
-  if(ctrl_pressed_now || ctrl_released_now || event->type() == QEvent::HoverMove) 
-  {// activate a handle manipulated frame
-    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-    const QPoint& p = viewer->mapFromGlobal(QCursor::pos());
-    bool need_repaint = activate_closest_manipulated_frame(p.x(), p.y());
-
-    if(need_repaint) { emit itemChanged(); }
-  }
-
-  return false;
-}
-
-#include "opengl_tools.h"
-void Scene_edit_polyhedron_item::draw_edges() const {
-
-  glEnableClientState(GL_VERTEX_ARRAY);
-  glVertexPointer(3, GL_DOUBLE, 0, positions.data());
-  glDrawElements(GL_LINES, (GLsizei) edges.size(), GL_UNSIGNED_INT, edges.data());
-  glDisableClientState(GL_VERTEX_ARRAY); 
-
-  if(rendering_mode == Wireframe) {
-    draw_ROI_and_control_vertices();
-  }
-}
-void Scene_edit_polyhedron_item::draw() const {
-  glEnableClientState(GL_VERTEX_ARRAY);
-  glEnableClientState(GL_NORMAL_ARRAY);
-
-  glVertexPointer(3, GL_DOUBLE, 0, positions.data());
-  glNormalPointer(GL_DOUBLE, 0, normals.data());
-  glDrawElements(GL_TRIANGLES, (GLsizei) tris.size(), GL_UNSIGNED_INT, tris.data());
-
-  glDisableClientState(GL_VERTEX_ARRAY);
-  glDisableClientState(GL_NORMAL_ARRAY);
-
-  CGAL::GL::Color color;
-  color.set_rgb_color(0, 0, 0);
-  draw_edges();
-
-  draw_ROI_and_control_vertices();
-}
-
-void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices() const {
-  GLboolean enable_back_lighting = glIsEnabled(GL_LIGHTING);
-  glDisable(GL_LIGHTING);
-
-  CGAL::GL::Color color;
-  CGAL::GL::Point_size point_size; point_size.set_point_size(5);
-  color.set_rgb_color(0, 1.f, 0);
-  // draw ROI
-  if(ui_widget->ShowROICheckBox->isChecked()) {
-    BOOST_FOREACH(vertex_descriptor vd, deform_mesh.roi_vertices())
-    {
-      if(!deform_mesh.is_control_vertex(vd))
-        gl_draw_point( vd->point() );
-    }
-  }
-  // draw control vertices related things
-  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-
-  for(Ctrl_vertices_group_data_list::const_iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data)
-  {
-    if(hgb_data->frame == viewer->manipulatedFrame())
-    {      
-      // draw axis
-      ::glPushMatrix();
-      ::glMultMatrixd(hgb_data->frame->matrix());
-      QGLViewer::drawAxis(length_of_axis);
-      ::glPopMatrix();
-      // draw bbox
-      if(!ui_widget->ActivatePivotingCheckBox->isChecked())
-      {
-        color.set_rgb_color(1.0f, 0, 0);
-        ::glPushMatrix();
-        ::glTranslated(hgb_data->frame->position().x, hgb_data->frame->position().y, hgb_data->frame->position().z);
-        ::glMultMatrixd(hgb_data->frame->orientation().matrix());
-        ::glTranslated(-hgb_data->frame_initial_center.x, -hgb_data->frame_initial_center.y, -hgb_data->frame_initial_center.z);        
-        draw_bbox(hgb_data->bbox);
-        ::glPopMatrix();
-      }
-    }
-    // draw control vertices
-    if(hgb_data == active_group) { color.set_rgb_color(1.0f, 0, 0); }
-    else                    { color.set_rgb_color(0, 0, 1.0f); }
-    for(std::vector<vertex_descriptor>::const_iterator hb = hgb_data->ctrl_vertices_group.begin(); hb != hgb_data->ctrl_vertices_group.end(); ++hb)
-    {  gl_draw_point( (*hb)->point() );
-    }
-  }
-
-  if(enable_back_lighting) { glEnable(GL_LIGHTING); }
-}
-void Scene_edit_polyhedron_item::gl_draw_point(const Point& p) const
-{
-  if(!ui_widget->ShowAsSphereCheckBox->isChecked()) {
-    ::glBegin(GL_POINTS);
-      ::glVertex3d(p.x(), p.y(), p.z());
-    ::glEnd();
-  } 
-  else {
-    GLint shading;
-    ::glGetIntegerv(GL_SHADE_MODEL, &shading);
-    ::glShadeModel(GL_SMOOTH);
-
-    ::glPushMatrix();
-      ::glTranslated(p.x(), p.y(), p.z());
-      ::gluSphere(quadric, length_of_axis/15, 8, 8);
-    ::glPopMatrix();
-
-    ::glShadeModel(shading);
-  }
-}
-//////////////////////////////////////////////////////////
-
-/////////////// from trivial_plugin //////////////////////
-void Scene_edit_polyhedron_item::draw_bbox(const Scene_interface::Bbox& bb ) const {
-  ::glBegin(GL_LINES);
-  gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                bb.xmax, bb.ymin, bb.zmin);
-  gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                bb.xmin, bb.ymax, bb.zmin);
-  gl_draw_edge(bb.xmin, bb.ymin, bb.zmin,
-                bb.xmin, bb.ymin, bb.zmax);
-    
-  gl_draw_edge(bb.xmax, bb.ymin, bb.zmin,
-                bb.xmax, bb.ymax, bb.zmin);
-  gl_draw_edge(bb.xmax, bb.ymin, bb.zmin,
-                bb.xmax, bb.ymin, bb.zmax);
-    
-  gl_draw_edge(bb.xmin, bb.ymax, bb.zmin,
-                bb.xmax, bb.ymax, bb.zmin);
-  gl_draw_edge(bb.xmin, bb.ymax, bb.zmin,
-                bb.xmin, bb.ymax, bb.zmax);
-    
-  gl_draw_edge(bb.xmin, bb.ymin, bb.zmax,
-                bb.xmax, bb.ymin, bb.zmax);
-  gl_draw_edge(bb.xmin, bb.ymin, bb.zmax,
-                bb.xmin, bb.ymax, bb.zmax);
-    
-  gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                bb.xmin, bb.ymax, bb.zmax);
-  gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                bb.xmax, bb.ymin, bb.zmax);
-  gl_draw_edge(bb.xmax, bb.ymax, bb.zmax,
-                bb.xmax, bb.ymax, bb.zmin);
-  ::glEnd();
-}
-void Scene_edit_polyhedron_item::gl_draw_edge(double px, double py, double pz,
-                          double qx, double qy, double qz) const
-{
-  ::glVertex3d(px,py,pz);
-  ::glVertex3d(qx,qy,qz);
-}
-/////////////////////////////////////////////////////////////
-
-void Scene_edit_polyhedron_item::changed()
-{ update_normals(); }
-
-Scene_polyhedron_item* Scene_edit_polyhedron_item::to_polyhedron_item() {
-  Scene_polyhedron_item* poly_item_tmp = poly_item;
-  poly_item->set_color_vector_read_only(false);
-  own_poly_item=false;
-  return poly_item_tmp;
-}
-
-Polyhedron* Scene_edit_polyhedron_item::polyhedron()       
-{ return poly_item->polyhedron(); }
-const Polyhedron* Scene_edit_polyhedron_item::polyhedron() const 
-{ return poly_item->polyhedron(); }
-QString Scene_edit_polyhedron_item::toolTip() const
-{
-  if(!poly_item->polyhedron())
-    return QString();
-
-  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4</p>")
-    .arg(this->name())
-    .arg(poly_item->polyhedron()->size_of_vertices())
-    .arg(poly_item->polyhedron()->size_of_halfedges()/2)
-    .arg(poly_item->polyhedron()->size_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-bool Scene_edit_polyhedron_item::isEmpty() const {
-  return poly_item->isEmpty();
-}
-Scene_edit_polyhedron_item::Bbox Scene_edit_polyhedron_item::bbox() const {
-  return poly_item->bbox();
-}
-
-void Scene_edit_polyhedron_item::setVisible(bool b) {
-  poly_item->setVisible(b);
-  Scene_item::setVisible(b);
-  if(!b) {
-    (*QGLViewer::QGLViewerPool().begin())->setManipulatedFrame(NULL);
-  }
-}
-void Scene_edit_polyhedron_item::setColor(QColor c) {
-  poly_item->setColor(c);
-  Scene_item::setColor(c);
-}
-void Scene_edit_polyhedron_item::setName(QString n) {
-  Scene_item::setName(n);
-  n.replace(" (edit)", "");
-  poly_item->setName(n);
-}
-void Scene_edit_polyhedron_item::setRenderingMode(RenderingMode m) {
-  poly_item->setRenderingMode(m);
-  Scene_item::setRenderingMode(m);
-}
-Scene_edit_polyhedron_item* Scene_edit_polyhedron_item::clone() const {
-  return 0;
-}
-void Scene_edit_polyhedron_item::select(
-          double orig_x,
-          double orig_y,
-          double orig_z,
-          double dir_x,
-          double dir_y,
-          double dir_z)
-{
-  Scene_item::select(orig_x,
-                     orig_y,
-                     orig_z,
-                     dir_x,
-                     dir_y,
-                     dir_z);
-  poly_item->select(orig_x,
-                       orig_y,
-                       orig_z,
-                       dir_x,
-                       dir_y,
-                       dir_z);
-}
-
-bool Scene_edit_polyhedron_item::keyPressEvent(QKeyEvent* e)
-{
-  //setting/unsetting rotation constraints
-  if (e->key()==Qt::Key_R && !state.ctrl_pressing)
-  {
-    is_rot_free = !is_rot_free;
-    rot_constraint.setRotationConstraintType( is_rot_free?
-        qglviewer::AxisPlaneConstraint::FREE:
-        qglviewer::AxisPlaneConstraint::AXIS);
-    return true;
-  }
-  return false;
-}
-
-#include "Scene_edit_polyhedron_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.h
deleted file mode 100644
index 4fdfc49..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item.h
+++ /dev/null
@@ -1,671 +0,0 @@
-#ifndef SCENE_EDIT_POLYHEDRON_ITEM_H
-#define SCENE_EDIT_POLYHEDRON_ITEM_H
-//#define CGAL_PROFILE 
-#include "Scene_edit_polyhedron_item_config.h"
-#include "Scene_polyhedron_item.h"
-#include "Scene_polyhedron_item_k_ring_selection.h"
-#include "Travel_isolated_components.h"
-
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/boost/graph/properties_Polyhedron_3.h>
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/glu.h>
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-#include <QGLViewer/camera.h>
-
-#include "ui_Deform_mesh.h"
-#include <CGAL/Surface_mesh_deformation.h>
-#include <boost/function_output_iterator.hpp>
-
-
-typedef Polyhedron::Vertex_handle Vertex_handle;
-typedef boost::graph_traits<Polyhedron>::vertex_descriptor		vertex_descriptor;
-typedef boost::graph_traits<Polyhedron>::vertex_iterator		  vertex_iterator;
-typedef boost::graph_traits<Polyhedron>::in_edge_iterator		 in_edge_iterator;
-typedef boost::graph_traits<Polyhedron>::out_edge_iterator		out_edge_iterator;
-
-struct Array_based_vertex_point_map
-{
-public:
-  typedef vertex_descriptor            key_type;
-  typedef Polyhedron::Traits::Point_3  value_type;
-  typedef value_type&  reference;
-  typedef boost::read_write_property_map_tag category;
-  Array_based_vertex_point_map(std::vector<double>* positions) : positions(positions) {}
-  std::vector<double>* positions;
-};
-
-
-Array_based_vertex_point_map::value_type
-get(Array_based_vertex_point_map,
-  Array_based_vertex_point_map::key_type key) {
-    return key->point();
-}
-
-void
-put(Array_based_vertex_point_map pmap,
-  Array_based_vertex_point_map::key_type key,
-  Array_based_vertex_point_map::value_type val) {
-  key->point() = val; // to make things easy (ray selection after deformation, save to polyhedron after close etc),
-  // I also change point() of vertex together with positions list
-  // So that we do not need to pmap everywhere other than draw
-  std::size_t pos = key->id() * 3;
-  (*pmap.positions)[pos] = val.x();
-  (*pmap.positions)[pos+1] = val.y();
-  (*pmap.positions)[pos+2] = val.z();
-}
-
-typedef CGAL::Surface_mesh_deformation<Polyhedron, CGAL::Default, CGAL::Default, CGAL::ORIGINAL_ARAP
-  ,CGAL::Default, CGAL::Default, CGAL::Default, 
-  Array_based_vertex_point_map> Deform_mesh;
-
-
-typedef Deform_mesh::Point  Point;
-
-/// For storing associated data with a group of control vertices
-class Control_vertices_data
-{
-public:
-  std::vector<vertex_descriptor> ctrl_vertices_group;
-  qglviewer::ManipulatedFrame* frame;  // manframe assoc with a group of control vertices
-  qglviewer::Vec frame_initial_center; // initial center of frame
-  Scene_interface::Bbox bbox;          // bbox of control vertices inside group  
-  qglviewer::Vec rot_direction;        // vector for constraint rotation
-private:
-  std::vector<qglviewer::Vec> initial_positions;
-  Deform_mesh* deform_mesh;
-
-public:
-  Control_vertices_data(Deform_mesh* deform_mesh, qglviewer::ManipulatedFrame* frame = 0)
-    : frame(frame), bbox(0,0,0,0,0,0), rot_direction(0.,0.,1.), deform_mesh(deform_mesh)
-  { }
-  void refresh()
-  {
-    for(std::vector<vertex_descriptor>::iterator it = ctrl_vertices_group.begin(); it != ctrl_vertices_group.end(); ) {
-      if(!deform_mesh->is_control_vertex(*it)) {
-        it = ctrl_vertices_group.erase(it);
-      }
-      else { ++it; }
-    }
-
-    reset_initial_positions();
-    frame_initial_center = calculate_initial_center();
-    bbox = calculate_initial_bbox();
-
-    bool oldState = frame->blockSignals(true); // do not let it emit modified, which will cause a deformation
-                                  // but we are just adjusting the center so it does not require a deformation
-    frame->setOrientation(qglviewer::Quaternion());
-    frame->setPosition(frame_initial_center);
-    frame->blockSignals(oldState);
-  }
-  void set_target_positions()
-  {
-    std::vector<vertex_descriptor>::iterator hb = ctrl_vertices_group.begin();
-    for(std::vector<qglviewer::Vec>::iterator it = initial_positions.begin(); it != initial_positions.end(); ++it, ++hb)
-    {
-      qglviewer::Vec dif_from_initial_center = (*it) - frame_initial_center;
-      qglviewer::Vec rotated = frame->orientation() * dif_from_initial_center;
-      qglviewer::Vec rotated_and_translated = rotated + frame->position();
-
-      deform_mesh->set_target_position(*hb, Point(rotated_and_translated.x, rotated_and_translated.y, rotated_and_translated.z) );
-    }
-  }
-
-private:
-  void reset_initial_positions()
-  {
-    initial_positions.clear();
-    
-    for(std::vector<vertex_descriptor>::iterator hb = ctrl_vertices_group.begin(); hb != ctrl_vertices_group.end(); ++hb)
-    {
-      qglviewer::Vec point((*hb)->point().x(), (*hb)->point().y(), (*hb)->point().z() );
-      initial_positions.push_back(point);
-    }
-  }
-  qglviewer::Vec calculate_initial_center()
-  {
-    qglviewer::Vec center_acc(0, 0, 0);
-    if(initial_positions.empty()) {return center_acc; }
-
-    for(std::vector<qglviewer::Vec>::iterator it = initial_positions.begin(); it != initial_positions.end(); ++it)
-    {
-      center_acc += (*it);
-    }
-    return center_acc / initial_positions.size();
-  }
-  Scene_interface::Bbox calculate_initial_bbox()
-  {    
-    if(initial_positions.empty()) {return Scene_interface::Bbox(0,0,0,0,0,0); }
-
-    const qglviewer::Vec& p_i = *(initial_positions.begin());
-    Scene_interface::Bbox bbox(p_i.x, p_i.y, p_i.z, p_i.x, p_i.y, p_i.z);
-
-    for(std::vector<qglviewer::Vec>::iterator it = initial_positions.begin(); it != initial_positions.end(); ++it)
-    {
-      const qglviewer::Vec& p_i = (*it);
-      Scene_interface::Bbox bbox_it(p_i.x, p_i.y, p_i.z, p_i.x, p_i.y, p_i.z);
-      bbox = bbox + bbox_it;
-    }
-    return bbox;
-  }
-};
-
-// To hold pressing states together
-struct Mouse_keyboard_state_deformation
-{
-  bool ctrl_pressing;
-  bool shift_pressing;
-  bool left_button_pressing;
-  bool right_button_pressing;
-
-  Mouse_keyboard_state_deformation() 
-    : ctrl_pressing(false), shift_pressing(false), left_button_pressing(false), right_button_pressing(false)
-  { }
-};
-
-// This class represents a polyhedron in the OpenGL scene
-class SCENE_EDIT_POLYHEDRON_ITEM_EXPORT Scene_edit_polyhedron_item 
-  : public Scene_item {
-  Q_OBJECT
-public:  
-  /// Create an Scene_edit_polyhedron_item from a Scene_polyhedron_item.
-  /// The ownership of the polyhedron is moved to the new edit_polyhedron
-  /// item.
-  Scene_edit_polyhedron_item(Scene_polyhedron_item* poly_item, Ui::DeformMesh* ui_widget, QMainWindow* mw);
-  ~Scene_edit_polyhedron_item();
-
-  /// Returns 0, so that one cannot clone an "edit polyhedron" item.
-  Scene_edit_polyhedron_item* clone() const;
-
-  // Function for displaying meta-data of the item
-  QString toolTip() const;
-
-  void setColor(QColor c);
-  void setName(QString n);
-  void setVisible(bool b);
-  void setRenderingMode(RenderingMode m);
-  
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const { 
-    return m == Gouraud; 
-  }
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  void draw() const;
-  void draw_edges() const;
-  void draw_bbox(const Scene_interface::Bbox& bb ) const;
-  void gl_draw_edge(double px, double py, double pz,
-                          double qx, double qy, double qz) const;
-  void gl_draw_point(const Point& p) const;
-
-  // Get wrapped polyhedron
-  Polyhedron*       polyhedron();
-  const Polyhedron* polyhedron() const;
-
-  /// Returns a Scene_polyhedron_item from the edit polyhedron item, and
-  /// transfer the ownership of the polyhedron to it.
-  /// The item 'this' must be destroy just after a call to this function.
-  Scene_polyhedron_item* to_polyhedron_item();
-
-  // Get dimensions
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  int get_k_ring()       { return k_ring_selector.k_ring; }
-  void set_k_ring(int v) { k_ring_selector.k_ring = v; }
-
-  // take mouse events from viewer, main-window does not work
-  // take keyboard events from main-window, which is more stable
-  bool eventFilter(QObject *target, QEvent *event);
-  
-protected:
-  void timerEvent(QTimerEvent *event);
-  void draw_ROI_and_control_vertices() const;
-
-public slots:
-  void changed();
-  void selected(const std::set<Polyhedron::Vertex_handle>& m)
-  {
-    bool any_changes = false;
-    for(std::set<vertex_descriptor>::const_iterator it = m.begin(); it != m.end(); ++it)
-    {
-      vertex_descriptor vh = *it;
-      bool changed = false;
-      if(ui_widget->ROIRadioButton->isChecked()) {
-        if(ui_widget->InsertRadioButton->isChecked()) { changed = insert_roi_vertex(vh); }
-        else          { changed = erase_roi_vertex(vh);  }
-      }
-      else {
-        if(ui_widget->InsertRadioButton->isChecked()) { changed = insert_control_vertex(vh); }
-        else          { changed = erase_control_vertex(vh);  }
-      }
-      any_changes |= changed;
-    }
-    if(any_changes) { emit itemChanged(); }
-  }
-
-  void select(double orig_x,
-              double orig_y,
-              double orig_z,
-              double dir_x,
-              double dir_y,
-              double dir_z);
-
-  void deform(); // deform the mesh
-// members
-private:
-  Ui::DeformMesh* ui_widget;
-  Scene_polyhedron_item* poly_item;
-  // For drawing
-  std::vector<double> positions;
-  std::vector<unsigned int> tris;
-  std::vector<unsigned int> edges;
-  std::vector<double> normals;
-
-  Deform_mesh deform_mesh;
-  typedef std::list<Control_vertices_data> Ctrl_vertices_group_data_list;
-  Ctrl_vertices_group_data_list::iterator active_group;
-  Ctrl_vertices_group_data_list ctrl_vertex_frame_map; // keep list of group of control vertices with assoc data
-
-  double length_of_axis; // for drawing axis at a group of control vertices
-
-  // by interleaving 'viewer's events (check constructor), keep followings:
-  Mouse_keyboard_state_deformation state;
-
-  //For constraint rotation
-  qglviewer::LocalConstraint rot_constraint;
-  bool is_rot_free;
-
-  bool own_poly_item; //indicates if the poly_item should be deleted by the destructor
-  Scene_polyhedron_item_k_ring_selection k_ring_selector;
-
-public:
-  // Deformation related functions //
-  bool insert_control_vertex(vertex_descriptor v)
-  {
-    if(!is_there_any_ctrl_vertices_group()) {
-      print_message("There is no group of control vertices, create one!");
-      return false; 
-    } // no group of control vertices to insert
-
-    bool inserted = deform_mesh.insert_control_vertex(v);
-    if(inserted) {
-      active_group->ctrl_vertices_group.push_back(v);
-      active_group->refresh();
-    }
-    return inserted;
-  }
-
-  bool insert_roi_vertex(vertex_descriptor v)
-  {
-    return deform_mesh.insert_roi_vertex(v);
-  }
-  
-  bool erase_control_vertex(vertex_descriptor v)
-  {
-    if(deform_mesh.erase_control_vertex(v)) // API should be safe enough to do that (without checking empty group of control vertices etc.)
-    {
-      refresh_all_group_centers(); // since we don't know which group of control vertices v is erased from, refresh all
-      return true;
-    }
-
-    print_message("Selected vertex is not a control vertex!");
-    return false;     
-  }
-
-  bool erase_roi_vertex(vertex_descriptor v)
-  {
-    erase_control_vertex(v); // erase control vertex
-    return deform_mesh.erase_roi_vertex(v);
-  }
-
-  void set_all_vertices_as_roi()
-  {
-    vertex_iterator vb, ve;
-    for(boost::tie(vb, ve) = vertices(*polyhedron()); vb != ve; ++vb)
-    {
-      insert_roi_vertex(*vb);
-    }   
-  }
-
-  void clear_roi()
-  {
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      delete it->frame;
-    }
-    ctrl_vertex_frame_map.clear();
-    deform_mesh.clear_roi_vertices();
-
-    create_ctrl_vertices_group(); // create one new group of control vertices
-  } 
-
-  void create_ctrl_vertices_group()
-  {
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it) {
-      if(it->ctrl_vertices_group.empty()) { 
-        active_group = it;
-        return;
-      }
-    }
-
-    // No empty group of control vertices
-    qglviewer::ManipulatedFrame* new_frame = new qglviewer::ManipulatedFrame();
-    new_frame->setRotationSensitivity(2.0f);
-
-    Control_vertices_data hgd(&deform_mesh, new_frame);
-    ctrl_vertex_frame_map.push_back(hgd);
-    hgd.refresh();
-
-    active_group = --ctrl_vertex_frame_map.end();
-
-    connect(new_frame, SIGNAL(modified()), this, SLOT(deform()));  // OK we are deforming via timer,
-    // but it makes demo more responsive if we also add this signal
-    emit itemChanged();
-
-    print_message("A new empty group of control vertices is created.");
-  }
-
-  void delete_ctrl_vertices_group(bool create_new = true)
-  {
-    if(!is_there_any_ctrl_vertices_group()) { 
-      print_message("There is no group of control vertices to be deleted!");
-      return; 
-    } // no group of control vertices
-
-    // delete group representative    
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      if(it == active_group)
-      {
-        delete it->frame;        
-        for(std::vector<vertex_descriptor>::iterator v_it = it->ctrl_vertices_group.begin(); v_it != it->ctrl_vertices_group.end(); ++v_it) {
-          deform_mesh.erase_control_vertex(*v_it);
-        }
-        ctrl_vertex_frame_map.erase(it);
-        break;
-      }
-    }
-
-    // assign another ctrl_vertices_group to active_group
-    Ctrl_vertices_group_data_list::iterator hgb, hge;
-    if( is_there_any_ctrl_vertices_group(hgb, hge) )
-    { 
-      active_group = hgb; 
-    } // no group of control vertices
-    else if(create_new)
-    { 
-      create_ctrl_vertices_group(); 
-    }
-  }
-
-  void prev_ctrl_vertices_group()
-  {
-    Ctrl_vertices_group_data_list::iterator hgb, hge;
-    if( !is_there_any_ctrl_vertices_group(hgb, hge) ) {
-      print_message("There is no group of control vertices to iterate on!");
-      return; 
-    }
-    // shift
-    if(hgb == active_group) { active_group = --hge; }
-    else                    {--active_group; }    
-  }
-
-  void next_ctrl_vertices_group()
-  {
-    Ctrl_vertices_group_data_list::iterator hgb, hge;
-    if( !is_there_any_ctrl_vertices_group(hgb, hge) ) {
-      print_message("There is no group of control vertices to iterate on!");
-      return; 
-    }
-    // shift
-    if(--hge == active_group) { active_group = hgb; }
-    else                      {++active_group; }    
-  }
-
-  void pivoting_end()
-  {       
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      //update constraint rotation vector, set only for the last group
-      it->rot_direction = it->frame->rotation().rotate( qglviewer::Vec(0.,0.,1.) );
-      //translate center of the frame
-      qglviewer::Vec vec= it->frame->position();
-      it->refresh();
-      it->frame_initial_center = vec;
-      it->frame->setPosition(vec);
-    }
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      it->frame->blockSignals(false);
-    }
-  }
-
-  void pivoting_begin()
-  {
-    is_rot_free=true;
-    rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
-
-    // just block signals to prevent deformation
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      it->frame->blockSignals(true);
-    }
-  }
-
-  void save_roi(const char* file_name) const
-  { 
-    std::ofstream out(file_name);
-    // save roi
-    out << deform_mesh.roi_vertices().size() << std::endl;
-    BOOST_FOREACH(vertex_descriptor vd, deform_mesh.roi_vertices())
-    {
-      out << vd->id() << " ";
-    }
-    out << std::endl;
-    // save control vertices
-    
-    out << ctrl_vertex_frame_map.size() << std::endl; // control vertices count
-    for(Ctrl_vertices_group_data_list::const_iterator hgb = ctrl_vertex_frame_map.begin(); hgb != ctrl_vertex_frame_map.end(); ++hgb) {
-
-      out << hgb->ctrl_vertices_group.size() << std::endl;
-      for(std::vector<vertex_descriptor>::const_iterator hb = hgb->ctrl_vertices_group.begin(); hb != hgb->ctrl_vertices_group.end(); ++hb) 
-      {
-        out << (*hb)->id() << " ";
-      }
-      out << std::endl;
-    }
-  }
-
-  void read_roi(const char* file_name)
-  { 
-    clear_roi();
-    delete_ctrl_vertices_group(false);
-
-    // put vertices to vector
-    std::vector<vertex_descriptor> all_vertices;
-    all_vertices.reserve(num_vertices(deform_mesh.halfedge_graph()));
-    vertex_iterator vb, ve;
-    for(boost::tie(vb, ve) = vertices(deform_mesh.halfedge_graph()); vb != ve; ++vb) {
-      all_vertices.push_back(*vb);
-    }
-    // read roi
-    std::ifstream in(file_name);
-    int roi_size;
-    in >> roi_size;
-    while(roi_size-- > 0)
-    {
-      std::size_t v_id;
-      in >> v_id;
-      insert_roi_vertex(all_vertices[v_id]);
-    }
-    // read control vertices
-    int ctrl_vertices_group_size;
-    in >> ctrl_vertices_group_size;
-    while(ctrl_vertices_group_size-- > 0)
-    {
-      create_ctrl_vertices_group();
-      int ctrl_size;
-      in >> ctrl_size;      
-      while(ctrl_size-- > 0) 
-      {                    
-        std::size_t v_id;
-        in >> v_id;
-        insert_control_vertex(all_vertices[v_id]);
-      }
-    }
-  }
-
-  void overwrite_deform_object()
-  {
-    deform_mesh.overwrite_initial_geometry();
-
-    refresh_all_group_centers();
-  }
-
-  struct Is_selected {
-    Deform_mesh& dm;
-    Is_selected(Deform_mesh& dm) : dm(dm) {}
-    bool count(Vertex_handle vh) const {
-      return dm.is_roi_vertex(vh);
-    }
-  };
-
-  boost::optional<std::size_t> get_minimum_isolated_component() {
-    Travel_isolated_components::Minimum_visitor visitor;
-    Travel_isolated_components().travel<Vertex_handle>
-      (vertices(*polyhedron()).first, vertices(*polyhedron()).second, 
-       polyhedron()->size_of_vertices(), Is_selected(deform_mesh), visitor);
-    return visitor.minimum;
-  }
-
-  struct Select_roi_output {
-    Select_roi_output(Deform_mesh* dm) : dm(dm) { }
-    void operator()(Vertex_handle vh) {
-      dm->insert_roi_vertex(vh);
-    }
-    Deform_mesh* dm;
-  };
-
-  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
-    typedef boost::function_output_iterator<Select_roi_output> Output_iterator;
-    Output_iterator out(&deform_mesh);
-
-    Travel_isolated_components::Selection_visitor<Output_iterator> visitor(threshold, out);
-    Travel_isolated_components().travel<Vertex_handle>
-      (vertices(*polyhedron()).first, vertices(*polyhedron()).second,
-      polyhedron()->size_of_vertices(), Is_selected(deform_mesh), visitor);
-
-    if(visitor.any_inserted) { emit itemChanged(); }
-    return visitor.minimum_visitor.minimum;
-  }
-protected:
-  // Deformation related functions //
-  void print_message(const QString& /*message*/)
-  {
-    // std::cout << message.toStdString() << std::endl;
-  }
-
-  bool is_there_any_ctrl_vertices_group(Ctrl_vertices_group_data_list::iterator& hgb, Ctrl_vertices_group_data_list::iterator& hge)
-  {
-    hgb = ctrl_vertex_frame_map.begin(); hge = ctrl_vertex_frame_map.end();
-    return hgb != hge;
-  }
-
-  bool is_there_any_ctrl_vertices_group()
-  {
-    Ctrl_vertices_group_data_list::iterator hgb, hge;
-    return is_there_any_ctrl_vertices_group(hgb, hge);
-  }
-
-  bool is_there_any_ctrl_vertices()
-  {
-    Ctrl_vertices_group_data_list::iterator hgb, hge;
-    if(!is_there_any_ctrl_vertices_group(hgb, hge)) { return false; } // there isn't any group of control vertices
-
-    for(; hgb != hge; ++hgb) // check inside groups of control vertices
-    {
-      if(!hgb->ctrl_vertices_group.empty()) { return true; }
-    }
-    return false;
-  }
-
-  void refresh_all_group_centers()
-  {
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    { it->refresh(); }
-  }
-
-  bool activate_closest_manipulated_frame(int x, int y)
-  {
-    if(state.ctrl_pressing && (state.left_button_pressing || state.right_button_pressing) ) 
-    { // user is deforming currently don't change the state 
-      return false;  
-    }
-    if(ctrl_vertex_frame_map.empty()) { return false; }
-
-    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-    qglviewer::Camera* camera = viewer->camera();
-
-    if(!state.ctrl_pressing) 
-    {   
-      if(viewer->manipulatedFrame() == NULL) 
-      { return false;}
-      viewer->setManipulatedFrame(NULL);    
-      return true;
-    }
-    
-    // now find closest frame and make it active manipulated frame
-    Ctrl_vertices_group_data_list::iterator min_it = ctrl_vertex_frame_map.begin();    
-    const qglviewer::Vec& pos_it = camera->projectedCoordinatesOf(min_it->frame->position());
-    float min_dist = std::pow(pos_it.x - x, 2) + std::pow(pos_it.y - y, 2);
-
-    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
-    {
-      const qglviewer::Vec& pos_it = camera->projectedCoordinatesOf(it->frame->position());
-      float dist = std::pow(pos_it.x - x, 2) + std::pow(pos_it.y - y, 2);
-      if(dist < min_dist) {
-        min_dist = dist;
-        min_it = it;
-      }
-    }
-
-    //set rotation constraint for the manipulated frame
-    if (!is_rot_free){
-      rot_constraint.setRotationConstraintDirection(min_it->rot_direction);
-      rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::AXIS);
-      min_it->frame->setConstraint(&rot_constraint);
-    }
-    else
-      rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
-
-    if(viewer->manipulatedFrame() == min_it->frame)
-    { return false; }
-    viewer->setManipulatedFrame(min_it->frame);
-
-    return true;
-  }
-
-  bool keyPressEvent(QKeyEvent* e);
-
-  void update_normals() {
-    BOOST_FOREACH(vertex_descriptor vd, deform_mesh.roi_vertices())
-    {
-      std::size_t id = vd->id();
-      const Polyhedron::Traits::Vector_3& n = 
-        compute_vertex_normal<Polyhedron::Vertex, Polyhedron::Traits>(*vd);
-      normals[id*3] = n.x();
-      normals[id*3+1] = n.y(); 
-      normals[id*3+2] = n.z(); 
-    }
-  }
-protected:
-  GLUquadric* quadric; // for drawing spheres
-}; // end class Scene_edit_polyhedron_item
-
-#endif // SCENE_EDIT_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_find_items.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_find_items.h
deleted file mode 100644
index 00372ac..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_find_items.h
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef SCENE_FIND_ITEMS
-#define SCENE_FIND_ITEMS
-
-#include <QObject>
-#include <QMetaObject>
-#include "Scene_item.h" // required, to have &Scene_item::name
-#include "Scene_config.h"
-
-class Scene_interface;
-
-namespace scene {
-namespace details {
-
-typedef QString (Scene_item ::*Scene_item_name_fn_ptr)() const;
-
-// Declaration only (defined in Scene.cpp)
-SCENE_EXPORT 
-Scene_item* 
-findItem(const Scene_interface* scene_interface,
-         const QMetaObject& metaobj,
-         QString name, Scene_item_name_fn_ptr fn); 
-
-// Declaration only (defined in Scene.cpp)
-SCENE_EXPORT
-QList<Scene_item*> 
-findItems(const Scene_interface* scene_interface, 
-          const QMetaObject& metaobj,
-          QString name, Scene_item_name_fn_ptr fn); // fwd declaration
-
-template <typename T>
-T findItem(const Scene_interface* scene, QString name,
-           Scene_item_name_fn_ptr fn) 
-{
-  return 
-    static_cast<T>(findItem(scene,
-                            reinterpret_cast<T>(0)->staticMetaObject,
-                            name, fn));
-}
-
-template <typename T>
-QList<T> findItems(const Scene_interface* scene, QString name, 
-                   Scene_item_name_fn_ptr fn)
-{
-  QList<Scene_item*> void_list = 
-    findItems(scene, reinterpret_cast<T>(0)->staticMetaObject,
-              name, fn);
-  QList<T> list;
-  Q_FOREACH(Scene_item* ptr, void_list) {
-    list << qobject_cast<T>(ptr);
-  }
-  return list;
-}
-
-} // end namespace details
-
-// Searches
-
-/** Search the first item that can be cast to T (T must be a pointer
-    type), and called "name". If "name" is omitted, all names are
-    accepted.
-*/      
-template <typename T>
-T findItem(const Scene_interface* scene, 
-           QString item_name = QString())
-{ return details::findItem<T>(scene, item_name, &Scene_item::name); }
-
-/** Returns all items that can be cast to T (T must be a pointer
-    type), and called "name". If "name" is omitted, all names are
-    accepted.
-*/      
-template <typename T>
-QList<T> findItems(const Scene_interface* scene, 
-                   QString item_name = QString()) 
-{ return details::findItems<T>(scene, item_name, &Scene_item::name); }
-
-/** Search the first item that can be cast to T (T must be a pointer
-    type), and that has objectName() equal to "name". If "name" is
-    omitted, all names are accepted.
-*/      
-template <typename T>
-T findItemByObjectName(const Scene_interface* scene, 
-                       QString obj_name = QString()) 
-{ return details::findItem<T>(scene, obj_name, &QObject::objectName); }
-
-/** Returns all items that can be cast to T (T must be a pointer type),
-    and have objectName() equal to "name". If "name" is omitted, all
-    names are accepted.
-*/      
-template <typename T>
-QList<T> findItemsByObjectName(const Scene_interface* scene, 
-                               QString obj_name = QString()) 
-{ return details::findItems<T>(scene, obj_name, &QObject::objectName); }
-
-
-// template <typename T>
-// T scene_findItem(const Scene* scene, QString name, Scene_item_name_fn_ptr fn) {
-//   return 
-//     static_cast<T>(scene_findItem(scene, name, fn, 
-//                                   reinterpret_cast<T>(0)->staticMetaObject()));
-// }
-
-// template <typename T>
-// QList<T> 
-// scene_findItems(const Scene* scene, QString name, Scene_item_name_fn_ptr fn) {
-//   QList<void*> void_list = 
-//     scene_findItems(scene, name, fn, 
-//                     reinterpret_cast<T>(0)->staticMetaObject());
-//   QList<T> list;
-//   Q_FOREACH(void* ptr, void_list) {
-//     list << static_cast<T>(ptr);
-//   }
-//   return list;
-// }
-
-// } // end scene namespace 
-
-} // end namespace scene
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.cpp
deleted file mode 100644
index 83557e2..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-#include "Scene_implicit_function_item.h"
-#include <QColor>
-#include <map>
-#include <CGAL/gl.h>
-#include <CGAL/Simple_cartesian.h>
-
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-#include "Color_ramp.h"
-#include <Viewer_interface.h>
-
-#include <CGAL/double.h>
-inline
-bool is_nan(double d)
-{
-  return !CGAL::Is_valid<double>()( d );
-}
-
-Scene_implicit_function_item::
-Scene_implicit_function_item(Implicit_function_interface* f)
-  : function_(f)
-  , frame_(new ManipulatedFrame())
-  , need_update_(true)
-  , grid_size_(SCENE_IMPLICIT_GRID_SIZE)
-  , max_value_(0.)
-  , min_value_(0.)
-  , blue_color_ramp_()
-  , red_color_ramp_()
-{
-  blue_color_ramp_.build_blue();
-  red_color_ramp_.build_red();
-  compute_min_max();
-  compute_function_grid();
-  double offset_x = (bbox().xmin + bbox().xmax) / 2;
-  double offset_y = (bbox().ymin + bbox().ymax) / 2;
-  double offset_z = (bbox().zmin + bbox().zmax) / 2;
-  frame_->setPosition(offset_x, offset_y, offset_z);
-  frame_->setOrientation(1., 0, 0, 0);
-  connect(frame_, SIGNAL(modified()), this, SLOT(plane_was_moved()));
-}
-
-
-Scene_implicit_function_item::~Scene_implicit_function_item()
-{
-  delete frame_;
-}
-
-
-Scene_implicit_function_item::Bbox
-Scene_implicit_function_item::bbox() const
-{
-  return function_->bbox();
-}
-
-void
-Scene_implicit_function_item::draw(Viewer_interface* viewer) const
-{
-  draw_aux(viewer, false);
-}
-
-void
-Scene_implicit_function_item::draw_edges(Viewer_interface* viewer) const
-{
-  draw_aux(viewer, true);
-}
-
-void
-Scene_implicit_function_item::draw_aux(Viewer_interface* viewer, bool edges) const
-{
-  if(edges) {
-    draw_bbox();
-    ::glPushMatrix();
-    ::glMultMatrixd(frame_->matrix());
-    QGLViewer::drawGrid((float)bbox().diagonal_length() * 0.3);
-    ::glPopMatrix();
-  }
-
-  if(!frame_->isManipulated()) {
-    if(need_update_) {
-      compute_function_grid();
-      need_update_ = false;
-    }
-    if(!viewer->inFastDrawing()) {
-      if(edges)
-        Scene_item_with_display_list::draw_edges(viewer);
-      else
-        Scene_item_with_display_list::draw(viewer);
-    }
-  }
-}
-
-void
-Scene_implicit_function_item::direct_draw() const
-{
-  draw_function_grid(red_color_ramp_, blue_color_ramp_);
-}
-
-
-
-QString
-Scene_implicit_function_item::toolTip() const
-{
-  return tr("<p>Function <b>%1</b>")
-    .arg(this->name());
-}
-
-bool
-Scene_implicit_function_item::supportsRenderingMode(RenderingMode m) const
-{ 
-  switch ( m )
-  {
-    case Splatting:
-    case Gouraud:
-      return false;
-      
-    case Points:
-    case Wireframe:
-    case Flat:
-    case FlatPlusEdges:
-      return true;
-      
-    default:
-      return false;
-  }
-  
-  return false;
-}
-
-void
-Scene_implicit_function_item::
-draw_bbox() const
-{
-  const Bbox& b = bbox();
-
-  ::glDisable(GL_LIGHTING);
-  ::glColor3f(0.f,0.f,0.f);
-  ::glBegin(GL_LINES);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymin,b.zmin);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymax,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmin);
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmin,b.ymin,b.zmax);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  ::glVertex3d(b.xmin,b.ymax,b.zmax);
-  
-  ::glVertex3d(b.xmax,b.ymax,b.zmax);
-  ::glVertex3d(b.xmax,b.ymin,b.zmax);
-  
-  ::glEnd();
-}
-
-void 
-Scene_implicit_function_item::
-draw_function_grid(const Color_ramp& ramp_pos,
-                   const Color_ramp& ramp_neg) const
-{
-  ::glDisable(GL_LIGHTING);
-  ::glShadeModel(GL_SMOOTH);
-  
-  ::glBegin(GL_QUADS);
-  const int nb_quads = grid_size_ - 1;
-  for( int i=0 ; i < nb_quads ; i++ )
-  {
-    for( int j=0 ; j < nb_quads ; j++)
-    {
-      draw_grid_vertex(implicit_grid_[i][j], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i][j+1], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i+1][j+1], ramp_pos, ramp_neg);
-      draw_grid_vertex(implicit_grid_[i+1][j], ramp_pos, ramp_neg);
-    }
-  }
-  ::glEnd();
-}
-
-
-void
-Scene_implicit_function_item::
-draw_grid_vertex(const Point_value& pv,
-                 const Color_ramp& ramp_positive,
-                 const Color_ramp& ramp_negative) const
-{
-  const Point& p = pv.first;
-  double v = pv.second;
-
-  if(is_nan(v)) {
-    ::glColor3f(0.2f, 0.2f, 0.2f);
-  } else 
-  // determines grey level
-  if ( v > 0 )
-  {
-    v = v/max_value_;
-    ::glColor3d(ramp_positive.r(v),ramp_positive.g(v),ramp_positive.b(v));
-  }
-  else
-  {
-    v = v/min_value_;
-    ::glColor3d(ramp_negative.r(v),ramp_negative.g(v),ramp_negative.b(v));
-  }
-  
-  ::glVertex3d(p.x,p.y,p.z);
-}
-
-
-void
-Scene_implicit_function_item::
-compute_function_grid() const
-{
-  typedef CGAL::Simple_cartesian<double>  K;
-  typedef K::Aff_transformation_3         Aff_transformation;
-  typedef K::Point_3                      Point_3;
-  
-  // Get transformation
-  const ::GLdouble* m = frame_->matrix();
-  
-  // OpenGL matrices are row-major matrices
-  Aff_transformation t (m[0], m[4], m[8], m[12],
-                        m[1], m[5], m[9], m[13],
-                        m[2], m[6], m[10], m[14]);
-  
-  double diag = bbox().diagonal_length() * .6;
-  
-  const double dx = diag;
-  const double dy = diag;
-  const double z (0);
-
-  int nb_quad = grid_size_ - 1;
-  
-  for(int i=0 ; i<grid_size_ ; ++i)
-  {
-    double x = -diag/2. + double(i)/double(nb_quad) * dx;
-    
-    for(int j=0 ; j<grid_size_ ; ++j)
-    {
-      double y = -diag/2. + double(j)/double(nb_quad) * dy;
-      
-      Point_3 query = t( Point_3(x, y, z) );
-      double v = function_->operator()(query.x(), query.y(), query.z());
-      
-      implicit_grid_[i][j] = Point_value(Point(query.x(),query.y(),query.z()),v);
-    }
-  }
-  
-  // Update display list
-  const_cast<Scene_implicit_function_item*>(this)->changed();
-}
-
-void
-Scene_implicit_function_item::
-compute_min_max()
-{
-  if(function_->get_min_max(min_value_, max_value_))
-    return;
-
-  double probes_nb = double(grid_size_) / 2;
-  
-  // Probe bounding box
-  const Bbox& b = bbox();
-  
-  for ( int i = 0 ; i <= probes_nb ; ++i )
-  {
-    double x = b.xmin + double(i) * (b.xmax - b.xmin) / probes_nb;
-    
-    for ( int j = 0 ; j <= probes_nb ; ++j )
-    {
-      double y = b.ymin + double(j) * (b.ymax - b.ymin) / probes_nb;
-      
-      for ( int k = 0 ; k <= probes_nb ; ++k )
-      {
-        double z = b.zmin + double(k) * (b.zmax - b.zmin) / probes_nb;
-        
-        double v = (*function_)(x,y,z);
-        if(is_nan(v)) continue;
-        max_value_ = (std::max)(v,max_value_);
-        min_value_ = (std::min)(v,min_value_);
-      }
-    }
-  }
-}
-
-
-#include "Scene_implicit_function_item.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.h
deleted file mode 100644
index 2999d6f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef SCENE_IMPLICIT_FUNCTION_ITEM_H
-#define SCENE_IMPLICIT_FUNCTION_ITEM_H
-
-#include <CGAL_demo/Scene_item_with_display_list.h>
-#include <CGAL_demo/Scene_interface.h>
-#include "Scene_implicit_function_item_config.h"
-#include "implicit_functions/Implicit_function_interface.h"
-#include "Color_ramp.h"
-
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-#define SCENE_IMPLICIT_GRID_SIZE 120
-
-class Viewer_interface;
-
-
-class SCENE_IMPLICIT_FUNCTION_ITEM_EXPORT Scene_implicit_function_item 
-  : public Scene_item_with_display_list
-{
-  Q_OBJECT
-  
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-  
-public:
-  Scene_implicit_function_item(Implicit_function_interface*);
-  virtual ~Scene_implicit_function_item();
-  
-  Implicit_function_interface* function() const { return function_; }
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const { return false; }
-  Bbox bbox() const;
-
-  Scene_implicit_function_item* clone() const { return NULL; }
-
-  // rendering mode
-  virtual bool supportsRenderingMode(RenderingMode m) const;
-  virtual bool manipulatable() const { return true; }
-  virtual ManipulatedFrame* manipulatedFrame() { return frame_; }
-  
-  // draw (overload only direct_draw() to use display list of base class)
-  virtual void direct_draw() const;
-  // actually draw() is also overloaded to detect when the cut plane is moved
-  virtual void draw(Viewer_interface*) const;
-  virtual void draw_edges(Viewer_interface*) const;
-
-  virtual QString toolTip() const;
-
-public slots:
-  void plane_was_moved() { need_update_ = true; }
-  void compute_function_grid() const;
-
-private:
-  typedef qglviewer::Vec                  Point;
-  typedef std::pair <Point,double>        Point_value;
-
-  // common implementation of draw() and draw_edges()
-  void draw_aux(Viewer_interface*,bool) const;
-
-  void draw_bbox() const;
-  void draw_function_grid(const Color_ramp&, const Color_ramp&) const;
-  void draw_grid_vertex(const Point_value&,
-                        const Color_ramp&, const Color_ramp&) const;
-  
-  void compute_min_max();
-  
-private:
-  Implicit_function_interface* function_;
-  ManipulatedFrame* frame_;
-  
-  mutable bool need_update_;
-  int grid_size_;
-  double max_value_;
-  double min_value_;
-  mutable Point_value implicit_grid_[SCENE_IMPLICIT_GRID_SIZE][SCENE_IMPLICIT_GRID_SIZE];
-  
-  Color_ramp blue_color_ramp_;
-  Color_ramp red_color_ramp_;
-};
-
-#endif // SCENE_IMPLICIT_FUNCTION_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.cpp
deleted file mode 100644
index c20f318..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "Scene_item.h"
-#include "Scene_interface.h"
-#include <QMenu>
-
-const QColor Scene_item::defaultColor = QColor(100, 100, 255);
-
-Scene_item::~Scene_item() {
-  delete defaultContextMenu;
-}
-
-void Scene_item::itemAboutToBeDestroyed(Scene_item* item) {
-  if(this == item)
-    emit aboutToBeDestroyed();
-}
-
-
-QString modeName(RenderingMode mode) {
-  switch(mode) 
-  {
-    case Points:
-      return QObject::tr("points");
-    case Wireframe:
-      return QObject::tr("wire");
-    case Flat:
-      return QObject::tr("flat");
-    case FlatPlusEdges:
-      return QObject::tr("flat+edges");
-    case Gouraud:
-      return QObject::tr("Gouraud");
-    case PointsPlusNormals:
-      return QObject::tr("pts+normals");
-    case Splatting:
-      return QObject::tr("splats");
-    default:
-      Q_ASSERT(false);
-      return QObject::tr("unknown");
-  }
-}
-
-const char* slotName(RenderingMode mode) {
-  switch(mode) 
-  {
-    case Points:
-      return SLOT(setPointsMode());
-    case Wireframe:
-      return SLOT(setWireframeMode());
-    case Flat:
-      return SLOT(setFlatMode());
-    case FlatPlusEdges:
-      return SLOT(setFlatPlusEdgesMode());
-    case Gouraud:
-      return SLOT(setGouraudMode());
-    case PointsPlusNormals:
-      return SLOT(setPointsPlusNormalsMode());
-    case Splatting:
-      return SLOT(setSplattingMode());
-    default:
-      Q_ASSERT(false);
-      return "";
-  }
-}
-
-// Rendering mode as a human readable string
-QString Scene_item::renderingModeName() const
-{
-  return modeName(renderingMode());
-} 
-QMenu* Scene_item::contextMenu()
-{
-  if(defaultContextMenu) {
-    defaultContextMenu->setTitle(name());
-    return defaultContextMenu;
-  }
-
-  defaultContextMenu = new QMenu(name());
-  // defaultContextMenu->addAction(name());
-  // defaultContextMenu->addSeparator();
-  // QMenu* modeMenu = new QMenu(QObject::tr("Rendering mode"),
-  //                             defaultContextMenu);
-  for(unsigned int mode = 0; mode < NumberOfRenderingMode;
-      ++mode) 
-  {
-    if(!supportsRenderingMode(RenderingMode(mode))) continue;
-    QString mName = modeName(RenderingMode(mode));
-    QAction* action = 
-      defaultContextMenu->addAction(tr("Set %1 mode")
-                                    .arg(mName),
-                                    this,
-                                    slotName(RenderingMode(mode)));
-    QObject::connect(action, SIGNAL(triggered()),
-                     this, SIGNAL(itemChanged()));
-  }
-  // defaultContextMenu->addAction(modeMenu->menuAction());
-  return defaultContextMenu;
-}
-
-void Scene_item::changed() {
-  // emit itemChanged();
-}
-
-void Scene_item::select(double /*orig_x*/,
-                        double /*orig_y*/,
-                        double /*orig_z*/,
-                        double /*dir_x*/,
-                        double /*dir_y*/,
-                        double /*dir_z*/)
-{
-}
-
-#include "Scene_item.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.h
deleted file mode 100644
index 94b636a..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item.h
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef SCENE_ITEM_H
-#define SCENE_ITEM_H
-
-#include "Scene_item_config.h"
-#include "Scene_interface.h"
-#include <QString>
-#include <QPixmap>
-#include <QFont>
-
-namespace qglviewer {
-  class ManipulatedFrame;
-}
-
-class QMenu;
-class QKeyEvent;
-class Viewer_interface;
-
-// This class represents an object in the OpenGL scene
-class SCENE_ITEM_EXPORT Scene_item : public QObject {
-  Q_OBJECT
-  Q_PROPERTY(QColor color READ color WRITE setColor)
-  Q_PROPERTY(QString name READ name WRITE setName)
-  Q_PROPERTY(bool visible READ visible WRITE setVisible)
-  Q_ENUMS(RenderingMode)
-  Q_PROPERTY(RenderingMode renderingMode READ renderingMode WRITE setRenderingMode)
-public:
-  typedef Scene_interface::Bbox Bbox;
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
-  static const QColor defaultColor; // defined in Scene_item.cpp
-
-  Scene_item()
-    : name_("unamed"),
-      color_(defaultColor),
-      visible_(true),
-      rendering_mode(FlatPlusEdges),
-      defaultContextMenu(0)
-  {}
-  virtual ~Scene_item();
-  virtual Scene_item* clone() const = 0;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const = 0;
-  // Flat/Gouraud OpenGL drawing
-  virtual void draw() const = 0;
-  virtual void draw(Viewer_interface*) const { draw(); }
-  // Wireframe OpenGL drawing
-  virtual void draw_edges() const { draw(); }
-  virtual void draw_edges(Viewer_interface*) const { draw_edges(); }
-  // Points OpenGL drawing
-  virtual void draw_points() const { draw(); }
-  virtual void draw_points(Viewer_interface*) const { draw_points(); }
-  // Splats OpenGL drawing
-  virtual void draw_splats() const {}
-  virtual void draw_splats(Viewer_interface*) const {draw_splats();}
-
-  // Functions for displaying meta-data of the item
-  virtual QString toolTip() const = 0;
-  virtual QPixmap graphicalToolTip() const { return QPixmap(); }
-  virtual QFont font() const { return QFont(); }
-
-  // Functions that help the Scene to compute its bbox
-  virtual bool isFinite() const { return true; }
-  virtual bool isEmpty() const { return true; }
-  virtual Bbox bbox() const { return Bbox(); }
-
-  // Function about manipulation
-  virtual bool manipulatable() const { return false; }
-  virtual ManipulatedFrame* manipulatedFrame() { return 0; }
-
-  // Getters for the four basic properties
-  virtual QColor color() const { return color_; }
-  virtual QString name() const { return name_; }
-  virtual bool visible() const { return visible_; }
-  virtual RenderingMode renderingMode() const { return rendering_mode; }
-  virtual QString renderingModeName() const; // Rendering mode as a human
-                                             // readable string
-
-  // Context menu
-  virtual QMenu* contextMenu();
-
-  // Event handling
-  virtual bool keyPressEvent(QKeyEvent*){return false;}
-public slots:
-  // Call that once you have finished changing something in the item
-  // (either the properties or internal data)
-  virtual void changed();
-
-  // Setters for the four basic properties
-  virtual void setColor(QColor c) { color_ = c; }
-  void setRbgColor(int r, int g, int b) { setColor(QColor(r, g, b)); }
-  virtual void setName(QString n) { name_ = n; }
-  virtual void setVisible(bool b) { visible_ = b; }
-  virtual void setRenderingMode(RenderingMode m) { 
-    if (supportsRenderingMode(m))
-      rendering_mode = m; 
-  }
-  void setPointsMode() {
-    setRenderingMode(Points);
-  }
-
-  void setWireframeMode() {
-    setRenderingMode(Wireframe);
-  }
-  void setWireframe() {
-    setRenderingMode(Wireframe);
-  }
-
-  void setFlat() {
-    setRenderingMode(Flat);
-  }
-  void setFlatMode() {
-    setRenderingMode(Flat);
-  }
-
-  void setFlatPlusEdgesMode() {
-    setRenderingMode(FlatPlusEdges);
-  }
-
-  void setGouraudMode() {
-    setRenderingMode(Gouraud);
-  }
-
-  void setPointsPlusNormalsMode(){
-    setRenderingMode(PointsPlusNormals);
-  }
-  
-  void setSplattingMode(){
-    setRenderingMode(Splatting);
-  }
-  
-  virtual void itemAboutToBeDestroyed(Scene_item*);
-
-  virtual void select(double orig_x,
-                      double orig_y,
-                      double orig_z,
-                      double dir_x,
-                      double dir_y,
-                      double dir_z);
-
-signals:
-  void itemChanged();
-  void aboutToBeDestroyed();
-
-protected:
-  // The four basic properties
-  QString name_;
-  QColor color_;
-  bool visible_;
-  RenderingMode rendering_mode;
-  QMenu* defaultContextMenu;
-
-}; // end class Scene_item
-
-
-#include <QMetaType>
-Q_DECLARE_METATYPE(Scene_item*)
-
-#endif // SCENE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_config.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_config.h
deleted file mode 100644
index 08c864b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef SCENE_ITEM_CONFIG_H
-#define SCENE_ITEM_CONFIG_H
-
-#include <QtCore/qglobal.h>
-
-#ifdef demo_framework_EXPORTS
-#  define scene_item_EXPORTS
-#endif
-
-#ifdef scene_item_EXPORTS
-#  define SCENE_ITEM_EXPORT Q_DECL_EXPORT
-#else
-#  define SCENE_ITEM_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SCENE_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_with_display_list.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_with_display_list.cpp
deleted file mode 100644
index ffee690..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_item_with_display_list.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "Scene_item_with_display_list.h"
-#include <iostream>
-
-Scene_item_with_display_list::Scene_item_with_display_list()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    display_list[i] = 0;
-    display_list_built[i] = false;
-  }
-}
-
-Scene_item_with_display_list::Scene_item_with_display_list(GLuint id, GLuint edges_id)
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    display_list[i] = 0;
-    display_list_built[i] = false;
-  }
-  display_list[DRAW] = id;
-  display_list_built[DRAW] = true;
-  display_list[DRAW_EDGES] = edges_id;
-  display_list_built[DRAW_EDGES] = (edges_id != 0);
-}
-
-// Scene_item_with_display_list::
-// Scene_item_with_display_list(const Scene_item_with_display_list& item)
-//   : Scene_item(item),
-//     display_list(0),
-//     display_list_built(false)
-// {}
-
-Scene_item_with_display_list::~Scene_item_with_display_list()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    if(display_list_built[i] && display_list[i] != 0) {
-      ::glDeleteLists(display_list[i],1);
-    }
-  }
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-
-void Scene_item_with_display_list::draw() const {
-  draw(DRAW);
-}
-
-void Scene_item_with_display_list::draw_edges() const {
-  draw(DRAW_EDGES);
-}
-
-void Scene_item_with_display_list::draw(int i) const
-{
-  if(!display_list_built[i])
-  {
-    if(display_list[i] == 0) {
-      display_list[i] = ::glGenLists(1);
-      if(display_list[i] == 0)
-      {
-        std::cerr << "Unable to create display list" << std::endl;
-        return;
-      }
-    }
-    // draw the item in a display list
-    ::glNewList(display_list[i],GL_COMPILE);
-    if(i == 0) {
-      direct_draw();
-    }
-    else {
-      direct_draw_edges();
-    }
-    ::glEndList();
-    ::glCallList(display_list[i]);
-    display_list_built[i] = true;
-  }
-  else {
-    // draw using the display list
-    ::glCallList(display_list[i]);
-  }
-}
-
-void Scene_item_with_display_list::changed()
-{
-  for(int i = 0; i < NB_OF_DISPLAY_LISTS; ++i) {
-    display_list_built[i] = false;
-  }
-  Scene_item::changed();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.cpp
deleted file mode 100644
index 70a900c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-#include "Scene_nef_polyhedron_item.h"
-#include "Scene_polyhedron_item.h"
-#include "Nef_type.h"
-#include "Polyhedron_type.h"
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-// #include <CGAL/OFF_to_nef_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
-#include <CGAL/Inverse_index.h>
-
-#include <QObject>
-#include "Scene_nef_rendering.h"
-
-#include <CGAL/minkowski_sum_3.h>
-#include <CGAL/convex_decomposition_3.h> 
-
-
-Scene_nef_polyhedron_item::Scene_nef_polyhedron_item()
-  : Scene_item_with_display_list(),
-    nef_poly(new Nef_polyhedron)
-{
-}
-
-Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(Nef_polyhedron* const p)
-  : Scene_item_with_display_list(),
-    nef_poly(p)
-{
-}
-
-Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(const Nef_polyhedron& p)
-  : Scene_item_with_display_list(),
-    nef_poly(new Nef_polyhedron(p))
-{
-}
-
-// Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(const Scene_nef_polyhedron_item& item)
-//   : Scene_item_with_display_list(item),
-//     nef_poly(new Nef_polyhedron(*item.nef_poly))
-// {
-// }
-
-Scene_nef_polyhedron_item::~Scene_nef_polyhedron_item()
-{
-  delete nef_poly;
-}
-
-Scene_nef_polyhedron_item* 
-Scene_nef_polyhedron_item::clone() const {
-  return new Scene_nef_polyhedron_item(*nef_poly);
-}
-
-bool
-Scene_nef_polyhedron_item::load_from_off(std::istream& in)
-{
-//   const std::size_t discarded = CGAL::OFF_to_nef_3(in, *nef_poly);
-//   return discarded != 0;
-
-  Exact_polyhedron exact_poly;
-  in >> exact_poly;
-  *nef_poly = Nef_polyhedron(exact_poly);
-
-//   Polyhedron poly;
-//   in >> poly;
-//   *nef_poly = Nef_polyhedron(poly);
-  return (bool) in;
-}
-
-QFont 
-Scene_nef_polyhedron_item::font() const {
-  QFont font;
-  font.setItalic(!font.italic());
-  return font;
-}
-
-bool
-Scene_nef_polyhedron_item::load(std::istream& in)
-{
-  in >> *nef_poly;
-  return (bool) in;
-}
-
-bool
-Scene_nef_polyhedron_item::save(std::ostream& in) const
-{
-  in << *nef_poly;
-  return (bool) in;
-}
-
-QString 
-Scene_nef_polyhedron_item::toolTip() const
-{
-  if(!nef_poly)
-    return QString();
-
-  return QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
-                     "<i>Nef_3 polyhedron</i></p>"
-                    "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4<br />"
-                     "number of volumes: %7</p>")
-    .arg(this->name())
-    .arg(nef_poly->number_of_vertices())
-    .arg(nef_poly->number_of_edges())
-    .arg(nef_poly->number_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name())
-    .arg(nef_poly->number_of_volumes());
-}
-
-void
-Scene_nef_polyhedron_item::direct_draw() const {
-  gl_render_nef_facets(nef_poly);
-
-  GLboolean lighting;
-  glGetBooleanv(GL_LIGHTING, &lighting);
-  glDisable(GL_LIGHTING);
-
-  GLfloat point_size;
-  glGetFloatv(GL_POINT_SIZE, &point_size);
-  glPointSize(10.f);
-
-  gl_render_nef_vertices(nef_poly);
-
-  if(lighting) {
-    glEnable(GL_LIGHTING);
-  }
-  glPointSize(point_size);
-}
-
-void
-Scene_nef_polyhedron_item::draw_edges() const {
-  gl_render_nef_edges(nef_poly);
-}
-
-Nef_polyhedron* 
-Scene_nef_polyhedron_item::nef_polyhedron() {
-  return nef_poly;
-}
-
-bool
-Scene_nef_polyhedron_item::isEmpty() const {
-  return (nef_poly == 0) || nef_poly->is_empty();
-}
-
-Scene_nef_polyhedron_item::Bbox
-Scene_nef_polyhedron_item::bbox() const {
-  if(isEmpty())
-    return Bbox();
-  CGAL::Bbox_3 bbox(nef_poly->vertices_begin()->point().bbox());
-  for(Nef_polyhedron::Vertex_const_iterator it = nef_poly->vertices_begin();
-      it != nef_poly->vertices_end();
-      ++it) {
-    bbox = bbox + it->point().bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-// quick hacks to convert polyhedra from exact to inexact and vice-versa
-template <class Polyhedron_input,
-class Polyhedron_output>
-struct Copy_polyhedron_to 
-  : public CGAL::Modifier_base<typename Polyhedron_output::HalfedgeDS>
-{
-  Copy_polyhedron_to(const Polyhedron_input& in_poly) 
-    : in_poly(in_poly) {}
-
-  void operator()(typename Polyhedron_output::HalfedgeDS& out_hds)
-  {
-    typedef typename Polyhedron_output::HalfedgeDS Output_HDS;
-
-    CGAL::Polyhedron_incremental_builder_3<Output_HDS> builder(out_hds);
-
-    typedef typename Polyhedron_input::Vertex_const_iterator Vertex_const_iterator;
-    typedef typename Polyhedron_input::Facet_const_iterator  Facet_const_iterator;
-    typedef typename Polyhedron_input::Halfedge_around_facet_const_circulator HFCC;
-
-    builder.begin_surface(in_poly.size_of_vertices(),
-      in_poly.size_of_facets(),
-      in_poly.size_of_halfedges());
-
-    for(Vertex_const_iterator
-      vi = in_poly.vertices_begin(), end = in_poly.vertices_end();
-      vi != end ; ++vi) 
-    {
-      typename Polyhedron_output::Point_3 p(::CGAL::to_double( vi->point().x()),
-	::CGAL::to_double( vi->point().y()),
-	::CGAL::to_double( vi->point().z()));
-      builder.add_vertex(p);
-    }
-
-    typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
-    Index index( in_poly.vertices_begin(), in_poly.vertices_end());
-
-    for(Facet_const_iterator 
-      fi = in_poly.facets_begin(), end = in_poly.facets_end();
-      fi != end; ++fi) 
-    {
-      HFCC hc = fi->facet_begin();
-      HFCC hc_end = hc;
-      //     std::size_t n = circulator_size( hc);
-      //     CGAL_assertion( n >= 3);
-      builder.begin_facet ();
-      do {
-	builder.add_vertex_to_facet(index[hc->vertex()]);
-	++hc;
-      } while( hc != hc_end);
-      builder.end_facet();
-    }
-    builder.end_surface();
-  } // end operator()(..)
-private:
-  const Polyhedron_input& in_poly;
-}; // end Copy_polyhedron_to<>
-
-template <class Poly_A, class Poly_B>
-void copy_to(const Poly_A& poly_a, Poly_B& poly_b)
-{
-  Copy_polyhedron_to<Poly_A, Poly_B> modifier(poly_a);
-  poly_b.delegate(modifier);
-}
-
-void from_exact(Exact_polyhedron& in,
-		Polyhedron& out)
-{
-  copy_to(in, out);
-  CGAL_assertion(out.is_valid());
-}
-
-void to_exact(Polyhedron& in,
-	      Exact_polyhedron& out)
-{
-  copy_to(in, out);
-  CGAL_assertion(out.is_valid());
-}
-
-bool Scene_nef_polyhedron_item::is_simple() const
-{
-  return nef_poly->is_simple();
-}
-
-// [static]
-Scene_nef_polyhedron_item* 
-Scene_nef_polyhedron_item::from_polyhedron(Scene_polyhedron_item* item)
-{
-  Polyhedron* poly = item->polyhedron();
-  if(!poly) return 0;
-
-  Exact_polyhedron exact_poly;
-  to_exact(*poly, exact_poly);
-  Nef_polyhedron* nef_poly = new Nef_polyhedron(exact_poly);
-  exact_poly.clear();
-
-  return new Scene_nef_polyhedron_item(nef_poly);
-}
-
-Scene_polyhedron_item*
-Scene_nef_polyhedron_item::convert_to_polyhedron() const {
-  Exact_polyhedron exact_poly;
-  nef_poly->convert_to_Polyhedron(exact_poly);
-  Polyhedron* poly = new Polyhedron;
-  from_exact(exact_poly, *poly);
-  exact_poly.clear();
-  return new Scene_polyhedron_item(poly);
-}
-
-Scene_nef_polyhedron_item&
-Scene_nef_polyhedron_item::
-operator+=(const Scene_nef_polyhedron_item& other)
-{
-  (*nef_poly) += (*other.nef_poly);
-  return *this;
-}
-
-Scene_nef_polyhedron_item&
-Scene_nef_polyhedron_item::
-operator*=(const Scene_nef_polyhedron_item& other)
-{
-  (*nef_poly) *= (*other.nef_poly);
-  return *this;
-}
-
-Scene_nef_polyhedron_item&
-Scene_nef_polyhedron_item::
-operator-=(const Scene_nef_polyhedron_item& other)
-{
-  (*nef_poly) -= (*other.nef_poly);
-  return *this;
-}
-
-Scene_nef_polyhedron_item*
-Scene_nef_polyhedron_item::
-sum(const Scene_nef_polyhedron_item& a, 
-    const Scene_nef_polyhedron_item& b)
-{
-  return new Scene_nef_polyhedron_item(CGAL::minkowski_sum_3(*a.nef_poly,
-                                                             *b.nef_poly));
-}
-
-void
-Scene_nef_polyhedron_item::
-convex_decomposition(std::list< Scene_polyhedron_item*>& convex_parts)
-{
-  // copy the Nef polyhedron, as markers are added
-  Nef_polyhedron N(*nef_poly);
-  CGAL::convex_decomposition_3(N);
-  
-  typedef Nef_polyhedron::Volume_const_iterator Volume_const_iterator;
-  
-  Volume_const_iterator ci = ++N.volumes_begin();
-  for( ; ci != N.volumes_end(); ++ci) {
-    if(ci->mark()) {
-      Exact_polyhedron P;
-      N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P);
-      Polyhedron* poly = new Polyhedron;
-      from_exact(P, *poly);
-      convex_parts.push_back(new Scene_polyhedron_item(poly));
-    }
-  }
-}
-
-
-#include "Scene_nef_polyhedron_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.h
deleted file mode 100644
index 8f37c43..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef SCENE_NEF_POLYHEDRON_ITEM_H
-#define SCENE_NEF_POLYHEDRON_ITEM_H
-
-#include "Scene_nef_polyhedron_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "Nef_type_fwd.h"
-#include <iostream>
-
-class Scene_polyhedron_item;
-
-class SCENE_NEF_POLYHEDRON_ITEM_EXPORT Scene_nef_polyhedron_item
- : public Scene_item_with_display_list 
-{
-  Q_OBJECT
-public:  
-  Scene_nef_polyhedron_item();
-//   Scene_nef_polyhedron_item(const Scene_nef_polyhedron_item&);
-  Scene_nef_polyhedron_item(const Nef_polyhedron& p);
-  Scene_nef_polyhedron_item(Nef_polyhedron* const p);
-  ~Scene_nef_polyhedron_item();
-
-  Scene_nef_polyhedron_item* clone() const;
-  bool load_from_off(std::istream& in);
-  bool load(std::istream& in);
-  bool save(std::ostream& in) const;
-
-  QFont font() const;
-  QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud && m!=Splatting; } // CHECK THIS!
-  // OpenGL drawing in a display list
-  void direct_draw() const;
-  // Wireframe OpenGL drawing
-  void draw_edges() const;
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  Nef_polyhedron* nef_polyhedron();
-  const Nef_polyhedron* nef_polyhedron() const;
-
-  bool is_simple() const;
-
-  // conversion operations
-  static Scene_nef_polyhedron_item* from_polyhedron(Scene_polyhedron_item*);
-  Scene_polyhedron_item* convert_to_polyhedron() const;
-
-  // Nef boolean operations
-  Scene_nef_polyhedron_item&
-  operator+=(const Scene_nef_polyhedron_item&); // union
-
-  Scene_nef_polyhedron_item&
-  operator*=(const Scene_nef_polyhedron_item&); // intersection
-
-  Scene_nef_polyhedron_item&
-  operator-=(const Scene_nef_polyhedron_item&); // difference
-
-  static Scene_nef_polyhedron_item*
-  sum(const Scene_nef_polyhedron_item&, 
-      const Scene_nef_polyhedron_item&);
-
-  void convex_decomposition(std::list< Scene_polyhedron_item*>&);
-  
-private:
-  Nef_polyhedron* nef_poly;
-}; // end class Scene_nef_polyhedron_item
-
-#endif // SCENE_NEF_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.cpp
deleted file mode 100644
index fb0eef9..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-#include "config.h"
-#ifdef CGAL_POLYHEDRON_DEMO_USE_NEF
-#include "Nef_type.h"
-#include <CGAL/Nef_S2/OGL_base_object.h>
-#include <CGAL/Nef_3/OGL_helper.h>
-#include <CGAL/glu.h>
-
-#include <QList>
-
-#define GL_MACRO(type) case type: std::cerr << #type; break;
-
-inline void CGAL_GLU_TESS_CALLBACK beginCallback(GLenum which)
-{ 
-//   std::cerr << "glBegin(";
-//   switch(which)
-//   {
-//     GL_MACRO(GL_POINTS);
-//     GL_MACRO(GL_LINES);
-//     GL_MACRO(GL_LINE_STRIP);
-//     GL_MACRO(GL_LINE_LOOP);
-//     GL_MACRO(GL_TRIANGLES);
-//     GL_MACRO(GL_TRIANGLE_STRIP);
-//     GL_MACRO(GL_TRIANGLE_FAN);
-//     GL_MACRO(GL_QUADS);
-//     GL_MACRO(GL_QUAD_STRIP);
-//     GL_MACRO(GL_POLYGON);
-//   }
-//   std::cerr << ")\n";
-  glBegin(which);
-}
-
-inline void CGAL_GLU_TESS_CALLBACK endCallback(void)
-{ 
-//   std::cerr << "glEnd()\n";
-  glEnd();
-}
-
-inline void CGAL_GLU_TESS_CALLBACK errorCallback(GLenum errorCode)
-{ const GLubyte *estring;
-  estring = gluErrorString(errorCode);
-  fprintf(stderr, "Tessellation Error: %s\n", estring);
-  std::exit (0);
-}
-
-inline void CGAL_GLU_TESS_CALLBACK vertexCallback(GLvoid* vertex,
-						  GLvoid* user)
-{ GLdouble* pc(static_cast<GLdouble*>(vertex));
-  GLdouble* pu(static_cast<GLdouble*>(user));
-  //    CGAL_NEF_TRACEN("vertexCallback coord  "<<pc[0]<<","<<pc[1]<<","<<pc[2]);
-  //    CGAL_NEF_TRACEN("vertexCallback normal "<<pu[0]<<","<<pu[1]<<","<<pu[2]);
-  glNormal3dv(pu);
-  glVertex3dv(pc); 
-//   std::cerr << "  glNormal("
-// 	    << pu[0] << ", "
-// 	    << pu[1] << ", "
-// 	    << pu[2] << ")\n";
-//   std::cerr << "  glVertex("
-// 	    << pc[0] << ", "
-// 	    << pc[1] << ", "
-// 	    << pc[2] << ")\n";
-}
-
-struct DPoint {
-  DPoint(GLdouble x, GLdouble y, GLdouble z)
-  {
-    coords[0] = x;
-    coords[1] = y;
-    coords[2] = z;
-  }
-  GLdouble coords[3];
-};
-
-void gl_render_nef_facets(Nef_polyhedron *p)
-{
-//   glPointSize(10);
-//   CGAL_forall_vertices(v, p->sncp())
-
-  
-  GLboolean old_light_model;
-  ::glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &old_light_model);
-
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  GLUtesselator* tess_ = ::gluNewTess();
-  ::gluTessCallback(tess_, GLenum(GLU_TESS_VERTEX_DATA),
-		    (GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &vertexCallback);
-  ::gluTessCallback(tess_, GLenum(GLU_TESS_BEGIN),
-		    (GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &beginCallback);
-  ::gluTessCallback(tess_, GLenum(GLU_TESS_END),
-		    (GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &endCallback);
-  ::gluTessCallback(tess_, GLenum(GLU_TESS_ERROR),
-		    (GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &errorCallback);
-  ::gluTessProperty(tess_, GLenum(GLU_TESS_WINDING_RULE),
-		    GLU_TESS_WINDING_POSITIVE);
-
-  for(Nef_polyhedron::Halffacet_const_iterator
-	f = p->halffacets_begin (),
-	end = p->halffacets_end();
-      f != end; ++f)
-  {
-    if(f->is_twin()) continue;
-
-    Nef_polyhedron::Vector_3 v = f->plane().orthogonal_vector();
-    GLdouble normal[3];
-    normal[0] = CGAL::to_double(v.x());
-    normal[1] = CGAL::to_double(v.y());
-    normal[2] = CGAL::to_double(v.z());
-    GLdouble norm = normal[0]*normal[0]
-      + normal[1]*normal[1]
-      + normal[2]*normal[2];
-    norm = CGAL::sqrt(norm);
-
-    normal[0] /= norm;
-    normal[1] /= norm;
-    normal[2] /= norm;
-
-    ::gluTessBeginPolygon(tess_, normal);
-    ::gluTessNormal(tess_,normal[0],normal[1],normal[2]);
-
-    QList<DPoint> points;
-    for(Nef_polyhedron::Halffacet_cycle_const_iterator 
-	  fc = f->facet_cycles_begin(),
-	  end = f->facet_cycles_end();
-	fc != end; ++fc)
-    {
-      if ( fc.is_shalfedge() )
-      {
-	::gluTessBeginContour(tess_);
-
-	Nef_polyhedron::SHalfedge_const_handle h = fc;
-	Nef_polyhedron::SHalfedge_around_facet_const_circulator hc(h), he(hc);
-	CGAL_For_all(hc,he){ // all vertex coordinates in facet cycle
-	  Nef_polyhedron::SVertex_const_handle v = hc->source();
-	  const Nef_polyhedron::Point_3& point = v->source()->point();
-	  int i = points.size();
-	  DPoint dp(CGAL::to_double(point.x()),
-                    CGAL::to_double(point.y()),
-                    CGAL::to_double(point.z()));
-	  points.push_back(dp);
-
-	  ::gluTessVertex(tess_, 
-			  static_cast<GLdouble*>(static_cast<void*>(&(points[i].coords))),
-			  &(points[i].coords));
-	} // end facet cycles verticeses
-
-	::gluTessEndContour(tess_);
-      }
-    } // end facet cycles
-    ::gluTessEndPolygon(tess_);
-  } // end facets
-  ::gluDeleteTess(tess_);
-
-  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, old_light_model);
-
-  GLenum gl_error = ::glGetError();
-  if(gl_error != GL_NO_ERROR)
-  {
-    std::cerr << "OPENGL ERROR in gl_render_nef_facets!\n  "
-	      << ::gluErrorString(gl_error) << "\n";
-  }
-} // end gl_render_nef_facets
-
-void gl_render_nef_edges(Nef_polyhedron *p)
-{
-  ::glBegin(GL_LINES);
-  
-  for(Nef_polyhedron::Halfedge_const_iterator 
-	e = p->halfedges_begin(),
-	end = p->halfedges_end();
-      e != end; ++e)
-  {
-    if (e->is_twin()) continue;
-    const Nef_polyhedron::Vertex_const_handle& s = e->source();
-    const Nef_polyhedron::Vertex_const_handle& t = e->twin()->source();
-    const Nef_polyhedron::Point_3& a = s->point();
-    const Nef_polyhedron::Point_3& b = t->point();
-    ::glVertex3d(CGAL::to_double(a.x()),
-		 CGAL::to_double(a.y()),
-		 CGAL::to_double(a.z()));
-    ::glVertex3d(CGAL::to_double(b.x()),
-		 CGAL::to_double(b.y()),
-		 CGAL::to_double(b.z()));
-  }
-
-  ::glEnd();
-  GLenum gl_error = ::glGetError();
-  if(gl_error != GL_NO_ERROR)
-  {
-    std::cerr << "OPENGL ERROR in gl_render_nef_edges!\n  "
-	      << ::gluErrorString(gl_error) << "\n";
-  }
-}
-
-void gl_render_nef_vertices(Nef_polyhedron* p)
-{ 
-  ::glBegin(GL_POINTS);
-  
-  for(Nef_polyhedron::Vertex_const_iterator
-	v = p->vertices_begin(),
-	end = p->vertices_end();
-      v != end; ++v)
-  {
-    const Nef_polyhedron::Point_3& p = v->point();
-    ::glVertex3d(CGAL::to_double(p.x()),
-		 CGAL::to_double(p.y()),
-		 CGAL::to_double(p.z()));
-  }
-
-  ::glEnd();
-  GLenum gl_error = ::glGetError();
-  if(gl_error != GL_NO_ERROR)
-  {
-    std::cerr << "OPENGL ERROR in gl_render_nef_vertices!\n  "
-	      << ::gluErrorString(gl_error) << "\n";
-  }
-}
-#endif // CGAL_POLYHEDRON_DEMO_USE_NEF
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.h
deleted file mode 100644
index 2b03041..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_rendering.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "Nef_type_fwd.h"
-
-void gl_render_nef_facets(Nef_polyhedron* poly);
-void gl_render_nef_edges(Nef_polyhedron* poly);
-void gl_render_nef_vertices(Nef_polyhedron* poly);
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.cpp
deleted file mode 100644
index 92c1d9c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "Scene_plane_item.h"
-
-#include "Scene_plane_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.h
deleted file mode 100644
index 7e8ebc3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_plane_item.h
+++ /dev/null
@@ -1,170 +0,0 @@
-#ifndef SCENE_PLANE_ITEM_H
-#define SCENE_PLANE_ITEM_H
-
-#include "Scene_item.h"
-#include "Scene_interface.h"
-
-#include "Scene_basic_objects_config.h"
-
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-
-#include <cmath>
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel_epic;
-typedef Kernel_epic::Plane_3 Plane_3;
-
-class SCENE_BASIC_OBJECTS_EXPORT Scene_plane_item 
-  : public Scene_item
-{
-  Q_OBJECT
-public:
-  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
-  Scene_plane_item(const Scene_interface* scene_interface) 
-    : scene(scene_interface),
-      manipulable(false),
-      can_clone(true),
-      frame(new ManipulatedFrame())
-  {
-    setNormal(0., 0., 1.);
-  }
-
-  ~Scene_plane_item() {
-    delete frame;
-  }
-
-  bool isFinite() const { return false; }
-  bool isEmpty() const { return false; }
-  Bbox bbox() const { return Bbox(); }
-
-  bool manipulatable() const {
-    return manipulable;
-  }
-  ManipulatedFrame* manipulatedFrame() {
-    return frame;
-  }
-
-  Scene_plane_item* clone() const {
-    if(can_clone)
-    {
-      Scene_plane_item* item = new Scene_plane_item(scene);
-      item->manipulable = manipulable;
-      item->can_clone = true;
-      item->frame = new ManipulatedFrame;
-      item->frame->setPosition(frame->position());
-      item->frame->setOrientation(frame->orientation());
-      return item;
-    }
-    else
-      return 0;
-  }
-
-  QString toolTip() const {
-    const qglviewer::Vec& pos = frame->position();
-    const qglviewer::Vec& n = frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-    return
-      tr("<p><b>%1</b> (mode: %2, color: %3)<br />")
-      .arg(this->name())
-      .arg(this->renderingModeName())
-      .arg(this->color().name())
-
-      +
-      tr("<i>Plane</i></p>"
-         "<p>Equation: %1*x + %2*y + %3*z + %4 = 0<br />"
-         "Normal vector: (%1, %2, %3)<br />"
-         "Point: (%5, %6, %7)</p>")
-      .arg(n[0]).arg(n[1]).arg(n[2])
-      .arg( - pos * n)
-      .arg(pos[0]).arg(pos[1]).arg(pos[2])
-      +
-      tr("<p>Can clone: %1<br />"
-         "Manipulatable: %2</p>")
-      .arg(can_clone?tr("true"):tr("false"))
-      .arg(manipulable?tr("true"):tr("false"));
-  }
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const {
-    return (m == Wireframe || m == Flat); 
-  }
-
-  // Flat OpenGL drawing
-  void draw() const {
-    const double diag = scene_diag();
-    ::glPushMatrix();
-    ::glMultMatrixd(frame->matrix());
-    GLboolean lighting;
-    ::glGetBooleanv(GL_LIGHTING, &lighting);
-    ::glDisable(GL_LIGHTING);
-    ::glBegin(GL_POLYGON);
-    ::glVertex3d(-diag, -diag, 0.);
-    ::glVertex3d(-diag,  diag, 0.);
-    ::glVertex3d( diag,  diag, 0.);
-    ::glVertex3d( diag, -diag, 0.);
-    ::glEnd();
-    if(lighting)
-      ::glEnable(GL_LIGHTING);
-    ::glPopMatrix();
-  };
-
-  // Wireframe OpenGL drawing
-  void draw_edges() const {
-    ::glPushMatrix();
-    ::glMultMatrixd(frame->matrix());
-    QGLViewer::drawGrid((float)scene_diag());
-    ::glPopMatrix();
-  }
-
-  Plane_3 plane() const {
-    const qglviewer::Vec& pos = frame->position();
-    const qglviewer::Vec& n = 
-      frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
-    return Plane_3(n[0], n[1],  n[2], - n * pos);
-  }
-
-private:
-  double scene_diag() const {
-    const Bbox& bbox = scene->bbox();
-    const double& xdelta = bbox.xmax-bbox.xmin;
-    const double& ydelta = bbox.ymax-bbox.ymin;
-    const double& zdelta = bbox.zmax-bbox.zmin;
-    const double diag = std::sqrt(xdelta*xdelta + 
-                            ydelta*ydelta +
-                            zdelta*zdelta);
-    return diag * 0.7;
-  }
-
-public slots:
-  void setPosition(float x, float y, float z) {
-    frame->setPosition(x, y, z);
-  }
-  
-  void setPosition(double x, double y, double z) {
-    frame->setPosition((float)x, (float)y, (float)z);
-  }
-  
-  void setNormal(float x, float y, float z) {
-    frame->setOrientation(x, y, z, 0.f);
-  }
-
-  void setNormal(double x, double y, double z) {
-    frame->setOrientation((float)x, (float)y, (float)z, 0.f);
-  }
-
-  void setClonable(bool b = true) {
-    can_clone = b;
-  }
-
-  void setManipulatable(bool b = true) {
-    manipulable = b;
-  }
-private:
-  const Scene_interface* scene;
-  bool manipulable;
-  bool can_clone;
-  qglviewer::ManipulatedFrame* frame;
-};
-
-#endif // SCENE_PLANE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.cpp
deleted file mode 100644
index 4f23b13..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-#include "Scene_points_with_normal_item.h"
-#include "Polyhedron_type.h"
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-#include <CGAL/IO/read_off_points.h>
-#include <CGAL/IO/write_off_points.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Search_traits_3.h>
-
-#include <QObject>
-#include <QMenu>
-
-#include <set>
-#include <stack>
-#include <algorithm>
-#include <boost/array.hpp>
-
-
-Scene_points_with_normal_item::Scene_points_with_normal_item()
-  : Scene_item_with_display_list(),
-    m_points(new Point_set),
-    m_has_normals(false)
-{
-  setRenderingMode(Points);
-}
-
-// Copy constructor
-Scene_points_with_normal_item::Scene_points_with_normal_item(const Scene_points_with_normal_item& toCopy)
-  : Scene_item_with_display_list(), // do not call superclass' copy constructor
-    m_points(new Point_set(*toCopy.m_points)),
-    m_has_normals(toCopy.m_has_normals)
-{
-  if (m_has_normals)
-    setRenderingMode(PointsPlusNormals);
-  else
-    setRenderingMode(Points);
-}
-
-// Converts polyhedron to point set
-Scene_points_with_normal_item::Scene_points_with_normal_item(const Polyhedron& input_mesh)
-  : Scene_item_with_display_list(),
-    m_points(new Point_set),
-    m_has_normals(true)
-{
-  // Converts Polyhedron vertices to point set.
-  // Computes vertices normal from connectivity.
-  Polyhedron::Vertex_const_iterator v;
-  for (v = input_mesh.vertices_begin(); v != input_mesh.vertices_end(); v++)
-  {
-    const Kernel::Point_3& p = v->point();
-    Kernel::Vector_3 n = compute_vertex_normal<Polyhedron::Vertex,Kernel>(*v);
-    m_points->push_back(UI_point(p,n));
-  }
-
-  setRenderingMode(PointsPlusNormals);
-}
-
-Scene_points_with_normal_item::~Scene_points_with_normal_item()
-{
-  Q_ASSERT(m_points != NULL);
-  delete m_points; m_points = NULL;
-}
-
-// Duplicates scene item
-Scene_points_with_normal_item*
-Scene_points_with_normal_item::clone() const
-{
-  return new Scene_points_with_normal_item(*this);
-}
-
-// Is selection empty?
-bool Scene_points_with_normal_item::isSelectionEmpty() const
-{
-  return (m_points->nb_selected_points() == 0);
-}
-
-// Delete selection
-void Scene_points_with_normal_item::deleteSelection()
-{
-  CGAL::Timer task_timer; task_timer.start();
-  std::cerr << "Delete " << m_points->nb_selected_points() << " points...";
-
-  // Delete selected points
-  m_points->delete_selection();
-
-  std::size_t memory = CGAL::Memory_sizer().virtual_size();
-  std::cerr << "done: " << task_timer.time() << " seconds, "
-                        << (memory>>20) << " Mb allocated"
-                        << std::endl;
-  emit itemChanged();
-}
-
-// Reset selection mark
-void Scene_points_with_normal_item::resetSelection()
-{
-  // Un-select all points
-  m_points->select(m_points->begin(), m_points->end(), false);
-  emit itemChanged();
-}
-  //Select duplicated points
-void Scene_points_with_normal_item::selectDuplicates()
-{
-  std::set<Kernel::Point_3> unique_points;
-  for (Point_set::Point_iterator ptit=m_points->begin(); ptit!=m_points->end();++ptit )
-    if ( !unique_points.insert(*ptit).second )
-      m_points->select(&(*ptit));
-  emit itemChanged();
-}
-
-// Loads point set from .OFF file
-bool Scene_points_with_normal_item::read_off_point_set(std::istream& stream)
-{
-  Q_ASSERT(m_points != NULL);
-
-  m_points->clear();
-  bool ok = stream &&
-            CGAL::read_off_points_and_normals(stream,
-                                              std::back_inserter(*m_points),
-                                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) &&
-            !isEmpty();
-
-  return ok;
-}
-
-// Write point set to .OFF file
-bool Scene_points_with_normal_item::write_off_point_set(std::ostream& stream) const
-{
-  Q_ASSERT(m_points != NULL);
-
-  return stream &&
-         CGAL::write_off_points_and_normals(stream,
-                                            m_points->begin(), m_points->end(),
-                                            CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
-}
-
-// Loads point set from .XYZ file
-bool Scene_points_with_normal_item::read_xyz_point_set(std::istream& stream)
-{
-  Q_ASSERT(m_points != NULL);
-
-  m_points->clear();
-  bool ok = stream &&
-            CGAL::read_xyz_points_and_normals(stream,
-                                              std::back_inserter(*m_points),
-                                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) &&
-            !isEmpty();
-
-  if (ok)
-  {
-    for (Point_set::iterator it=m_points->begin(),
-                             end=m_points->end();it!=end; ++it)
-    {
-      if (it->normal() != CGAL::NULL_VECTOR)
-      {
-        m_has_normals=true;
-        setRenderingMode(PointsPlusNormals);
-        break;
-      }
-    }
-  }
-  return ok;
-}
-
-// Write point set to .XYZ file
-bool Scene_points_with_normal_item::write_xyz_point_set(std::ostream& stream) const
-{
-  Q_ASSERT(m_points != NULL);
-
-  return stream &&
-         CGAL::write_xyz_points_and_normals(stream,
-                                            m_points->begin(), m_points->end(),
-                                            CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
-}
-
-QString
-Scene_points_with_normal_item::toolTip() const
-{
-  Q_ASSERT(m_points != NULL);
-
-  return QObject::tr("<p><b>%1</b> (color: %4)<br />"
-                     "<i>Point set</i></p>"
-                     "<p>Number of points: %2</p>")
-    .arg(name())
-    .arg(m_points->size())
-    .arg(color().name());
-}
-
-bool Scene_points_with_normal_item::supportsRenderingMode(RenderingMode m) const 
-{
-  return m==Points ||
-         ( has_normals() &&
-         ( m==PointsPlusNormals || m==Splatting ) );
-}
-
-// Points OpenGL drawing in a display list
-void Scene_points_with_normal_item::direct_draw() const
-{
-  Q_ASSERT(m_points != NULL);
-
-  // Draw points
-  m_points->gl_draw_vertices();
-}
-
-// Normals OpenGL drawing
-void Scene_points_with_normal_item::draw_normals() const
-{
-  Q_ASSERT(m_points != NULL);
-
-  // Draw normals
-  Kernel::Sphere_3 region_of_interest = m_points->region_of_interest();
-  float normal_length = (float)std::sqrt(region_of_interest.squared_radius() / 1000.);
-
-  m_points->gl_draw_normals(normal_length);
-}
-
-void Scene_points_with_normal_item::draw_splats() const
-{
-  Q_ASSERT(m_points != NULL);
-
-  // Draw splats
-  bool points_have_normals = (m_points->begin() != m_points->end() &&
-                              m_points->begin()->normal() != CGAL::NULL_VECTOR);
-  bool points_have_radii =   (m_points->begin() != m_points->end() &&
-                              m_points->begin()->radius() != 0);
-  if(points_have_normals && points_have_radii)
-  {
-    m_points->gl_draw_splats();
-  }
-}
-
-// Gets wrapped point set
-Point_set* Scene_points_with_normal_item::point_set()
-{
-  Q_ASSERT(m_points != NULL);
-  return m_points;
-}
-const Point_set* Scene_points_with_normal_item::point_set() const
-{
-  Q_ASSERT(m_points != NULL);
-  return m_points;
-}
-
-bool
-Scene_points_with_normal_item::isEmpty() const
-{
-  Q_ASSERT(m_points != NULL);
-  return m_points->empty();
-}
-
-Scene_points_with_normal_item::Bbox
-Scene_points_with_normal_item::bbox() const
-{
-  Q_ASSERT(m_points != NULL);
-
-  Kernel::Iso_cuboid_3 bbox = m_points->bounding_box();
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-void Scene_points_with_normal_item::computes_local_spacing(int k)
-{
-  typedef Kernel Geom_traits;
-  typedef CGAL::Search_traits_3<Geom_traits> TreeTraits;
-  typedef CGAL::Orthogonal_k_neighbor_search<TreeTraits> Neighbor_search;
-  typedef Neighbor_search::Tree Tree;
-
-  Point_set::iterator end(m_points->end());
-
-  // build kdtree
-  Tree tree(m_points->begin(), end);
-
-  // Compute the radius of each point = (distance max to k nearest neighbors)/2.
-  {
-    int i=0;
-    for (Point_set::iterator it=m_points->begin(); it!=end; ++it, ++i)
-    {
-      Neighbor_search search(tree, *it, k+1);
-      double maxdist2 = (--search.end())->second; // squared distance to furthest neighbor
-      it->radius() = sqrt(maxdist2)/2.;
-    }
-  }
-
-  m_points->set_radii_uptodate(true);
-}
-
-QMenu* Scene_points_with_normal_item::contextMenu()
-{
-  const char* prop_name = "Menu modified by Scene_points_with_normal_item.";
-
-  QMenu* menu = Scene_item::contextMenu();
-
-  // Use dynamic properties:
-  // http://doc.trolltech.com/lastest/qobject.html#property
-  bool menuChanged = menu->property(prop_name).toBool();
-
-  if(!menuChanged) {
-    actionDeleteSelection = menu->addAction(tr("Delete Selection"));
-    actionDeleteSelection->setObjectName("actionDeleteSelection");
-    connect(actionDeleteSelection, SIGNAL(triggered()),this, SLOT(deleteSelection()));
-
-    actionResetSelection = menu->addAction(tr("Reset Selection"));
-    actionResetSelection->setObjectName("actionResetSelection");
-    connect(actionResetSelection, SIGNAL(triggered()),this, SLOT(resetSelection()));
-
-    actionSelectDuplicatedPoints = menu->addAction(tr("Select duplicated points"));
-    actionSelectDuplicatedPoints->setObjectName("actionSelectDuplicatedPoints");
-    connect(actionSelectDuplicatedPoints, SIGNAL(triggered()),this, SLOT(selectDuplicates()));
-
-    menu->setProperty(prop_name, true);
-  }
-
-  if (isSelectionEmpty())
-  {
-    actionDeleteSelection->setDisabled(true);
-    actionResetSelection->setDisabled(true);
-  }
-  else
-  {
-    actionDeleteSelection->setDisabled(false);
-    actionResetSelection->setDisabled(false);
-  }
-
-  return menu;
-}
-
-void Scene_points_with_normal_item::setRenderingMode(RenderingMode m)
-{
-  Scene_item_with_display_list::setRenderingMode(m);
-  if (rendering_mode==Splatting && (!m_points->are_radii_uptodate()))
-  {
-    computes_local_spacing(6); // default value = small
-  }
-}
-
-bool Scene_points_with_normal_item::has_normals() const { return m_has_normals; }
-
-void Scene_points_with_normal_item::set_has_normals(bool b) {
-  if (b!=m_has_normals){
-    m_has_normals=b;
-    //reset the context menu
-    delete this->defaultContextMenu;
-    this->defaultContextMenu = 0;
-  }
-}
-
-
-#include "Scene_points_with_normal_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.h
deleted file mode 100644
index 36d330f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef POINT_SET_ITEM_H
-#define POINT_SET_ITEM_H
-
-#include "Scene_points_with_normal_item_config.h"
-#include "Polyhedron_type_fwd.h"
-#include "Kernel_type.h"
-#include "Point_set_3.h"
-#include "Scene_item_with_display_list.h"
-
-#include <iostream>
-
-
-// point set
-typedef Point_set_3<Kernel> Point_set;
-typedef Point_set::UI_point UI_point; // type of points in Point_set_3
-
-class QMenu;
-class QAction;
-
-// This class represents a point set in the OpenGL scene
-class SCENE_POINTS_WITH_NORMAL_ITEM_EXPORT Scene_points_with_normal_item
-  : public Scene_item_with_display_list
-{
-  Q_OBJECT
-
-public:
-  Scene_points_with_normal_item();
-  Scene_points_with_normal_item(const Scene_points_with_normal_item& toCopy);
-  Scene_points_with_normal_item(const Polyhedron& p);
-  ~Scene_points_with_normal_item();
-  Scene_points_with_normal_item* clone() const;
-
-  // Is selection empty?
-  virtual bool isSelectionEmpty() const;
-
-  // Function to override the context menu
-  QMenu* contextMenu();
-
-  // IO
-  bool read_off_point_set(std::istream& in);
-  bool write_off_point_set(std::ostream& out) const;
-  bool read_xyz_point_set(std::istream& in);
-  bool write_xyz_point_set(std::ostream& out) const;
-
-  // Function for displaying meta-data of the item
-  virtual QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const;
-  // Points OpenGL drawing in a display list
-  virtual void direct_draw() const;
-  // Normals OpenGL drawing
-  void draw_normals() const;
-  virtual void draw_edges() const { draw_normals(); }//to tweak scene
-
-  // Splat OpenGL drawing
-  virtual void draw_splats() const;
-  
-  // Gets wrapped point set
-  Point_set*       point_set();
-  const Point_set* point_set() const;
-
-  // Gets dimensions
-  virtual bool isFinite() const { return true; }
-  virtual bool isEmpty() const;
-  virtual Bbox bbox() const;
-
-  virtual void setRenderingMode(RenderingMode m);
-
-  // computes the local point spacing (aka radius) of each point
-  void computes_local_spacing(int k);
-
-  bool has_normals() const;
-  void set_has_normals(bool b);
-
-public slots:
-  // Delete selection
-  virtual void deleteSelection();
-  // Reset selection mark
-  void resetSelection();
-  //Select duplicated points
-  void selectDuplicates();
-
-// Data
-private:
-  Point_set* m_points;
-  bool m_has_normals;
-  QAction* actionDeleteSelection;
-  QAction* actionResetSelection;
-  QAction* actionSelectDuplicatedPoints;
-}; // end class Scene_points_with_normal_item
-
-
-#endif // POINT_SET_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.cpp
deleted file mode 100644
index 7ff4480..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-#include "Scene_polygon_soup_item.h"
-#include "Scene_polyhedron_item.h"
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-
-#include <QObject>
-#include <QtDebug>
-
-#include <set>
-#include <stack>
-#include <algorithm>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/IO/OFF_reader.h>
-#include <CGAL/IO/File_writer_OFF.h>
-#include <CGAL/version.h> 
-
-#include <CGAL/orient_polygon_soup.h>
-#include <CGAL/polygon_soup_to_polyhedron_3.h>
-#include <CGAL/orient_polyhedron_3.h>
-
-struct Polyhedron_to_polygon_soup_writer {
-  typedef Kernel::Point_3 Point_3;
-
-  Polygon_soup* soup;
-  Polygon_soup::Polygon_3 polygon;
-
-  Polyhedron_to_polygon_soup_writer(Polygon_soup* soup) : soup(soup), polygon() {
-  }
-
-  void write_header( std::ostream&,
-                     std::size_t /* vertices */,
-                     std::size_t /* halfedges */,
-                     std::size_t /* facets */,
-                     bool /* normals */ = false ) {
-    soup->clear();
-  }
-
-  void write_footer() {
-  }
-
-  void write_vertex( const double& x, const double& y, const double& z) {
-    soup->points.push_back(Point_3(x, y, z));
-  }
-
-  void write_normal( const double& /* x */, const double& /* y */, const double& /* z */) {
-  }
-
-  void write_facet_header() {
-  }
-
-  void write_facet_begin( std::size_t no) {
-    polygon.clear();
-    polygon.reserve(no);
-  }
-  void write_facet_vertex_index( std::size_t index) {
-    polygon.push_back(index);
-  }
-  void write_facet_end() {
-    soup->polygons.push_back(polygon);
-    polygon.clear();
-  }
-}; // end struct Polyhedron_to_soup_writer
-
-Scene_polygon_soup_item::Scene_polygon_soup_item()
-  : Scene_item_with_display_list(),
-    soup(0),
-    oriented(false)
-{
-}
-
-Scene_polygon_soup_item::~Scene_polygon_soup_item()
-{
-  delete soup;
-}
-
-Scene_polygon_soup_item* 
-Scene_polygon_soup_item::clone() const {
-  Scene_polygon_soup_item* new_soup = new Scene_polygon_soup_item();
-  new_soup->soup = soup->clone();
-  new_soup->oriented = oriented;
-  return new_soup;
-}
-
-bool
-Scene_polygon_soup_item::load(std::istream& in)
-{
-  if (!soup) soup=new Polygon_soup();
-  else soup->clear();
-  return CGAL::read_OFF(in, soup->points, soup->polygons);
-}
-
-void Scene_polygon_soup_item::init_polygon_soup(std::size_t nb_pts, std::size_t nb_polygons){
-  if(!soup)
-    soup = new Polygon_soup;
-    soup->clear();
-  soup->points.reserve(nb_pts);
-  soup->polygons.reserve(nb_polygons);
-  oriented = false;
-}
-
-void Scene_polygon_soup_item::finalize_polygon_soup(){ soup->fill_edges(); }
-
-#include <CGAL/IO/generic_print_polyhedron.h>
-#include <iostream>
-
-void Scene_polygon_soup_item::load(Scene_polyhedron_item* poly_item) {
-  if(!poly_item) return;
-  if(!poly_item->polyhedron()) return;
-
-  if(!soup)
-    soup = new Polygon_soup;
-
-  Polyhedron_to_polygon_soup_writer writer(soup);
-  CGAL::generic_print_polyhedron(std::cerr,
-                                 *poly_item->polyhedron(),
-                                 writer);
-  emit changed();
-}
-
-void
-Scene_polygon_soup_item::setDisplayNonManifoldEdges(const bool b)
-{
-  soup->display_non_manifold_edges = b;
-  changed();
-}
-
-bool
-Scene_polygon_soup_item::displayNonManifoldEdges() const {
-  return soup->display_non_manifold_edges;
-}
-
-void Scene_polygon_soup_item::shuffle_orientations()
-{
-  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    if(std::rand() % 2 == 0) soup->inverse_orientation(i);
-  }
-  soup->fill_edges();
-  changed();
-}
-
-void Scene_polygon_soup_item::inside_out()
-{
-  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    soup->inverse_orientation(i);
-  }
-  soup->fill_edges();
-  changed();
-}
-
-bool 
-Scene_polygon_soup_item::orient()
-{
-  if(isEmpty() || oriented)
-    return true; // nothing to do
-  oriented=true;
-  return CGAL::orient_polygon_soup(soup->points, soup->polygons);
-}
-
-
-bool 
-Scene_polygon_soup_item::save(std::ostream& out) const
-{
-  typedef Polygon_soup::size_type size_type;
-  CGAL::File_writer_OFF writer;
-  writer.write_header(out,
-                      soup->points.size(),
-                      0,
-                      soup->polygons.size());
-  for(size_type i = 0, end = soup->points.size();
-      i < end; ++i)
-  {
-    const Point_3& p = soup->points[i];
-    writer.write_vertex( p.x(), p.y(), p.z() );
-  }
-  writer.write_facet_header();
-  for(size_type i = 0, end = soup->polygons.size();
-      i < end; ++i)
-  {
-    const Polygon_soup::Polygon_3& polygon = soup->polygons[i]; 
-    const size_type size = polygon.size();
-    writer.write_facet_begin(size);
-    for(size_type j = 0; j < size; ++j) {
-      writer.write_facet_vertex_index(polygon[j]);
-    }
-    writer.write_facet_end();
-  }
-  writer.write_footer();
-
-  return (bool) out;
-}
-
-bool 
-Scene_polygon_soup_item::exportAsPolyhedron(Polyhedron* out_polyhedron)
-{
-  orient();
-  CGAL::polygon_soup_to_polyhedron_3(*out_polyhedron, soup->points, soup->polygons);
-
-  if(out_polyhedron->size_of_vertices() > 0) {
-    // Also check whether the consistent orientation is fine
-    if(!CGAL::is_oriented(*out_polyhedron)) {
-      out_polyhedron->inside_out();
-    }
-    return true;
-  }
-  return false;
-}
-
-QString 
-Scene_polygon_soup_item::toolTip() const
-{
-  if(!soup)
-    return QString();
-
-  return QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
-                     "<i>Polygons soup</i></p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of polygons: %3</p>")
-    .arg(this->name())
-    .arg(soup->points.size())
-    .arg(soup->polygons.size())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-void
-Scene_polygon_soup_item::direct_draw() const {
-  typedef Polygon_soup::Polygons::const_iterator Polygons_iterator;
-  typedef Polygon_soup::Polygons::size_type size_type;
-  for(Polygons_iterator it = soup->polygons.begin();
-      it != soup->polygons.end(); ++it)
-  {
-    const Point_3& pa = soup->points[it->at(0)];
-    const Point_3& pb = soup->points[it->at(1)];
-    const Point_3& pc = soup->points[it->at(2)];
-
-    Kernel::Vector_3 n = CGAL::cross_product(pb-pa, pc -pa);
-    n = n / std::sqrt(n * n);
-    
-    ::glBegin(GL_POLYGON);  
-    ::glNormal3d(n.x(),n.y(),n.z());
-
-    for(size_type i = 0; i < it->size(); ++i) {
-      const Point_3& p = soup->points[it->at(i)];
-      ::glVertex3d(p.x(),p.y(),p.z());
-    }
-    ::glEnd();
-  }
-  if(soup->display_non_manifold_edges) {
-    double current_color[4];
-    GLboolean lightning;
-    ::glGetDoublev(GL_CURRENT_COLOR, current_color);
-    ::glColor3d(1., 0., 0.); // red
-    ::glGetBooleanv(GL_LIGHTING, &lightning);
-    ::glDisable(GL_LIGHTING);
-
-    BOOST_FOREACH(const Polygon_soup::Edge& edge,
-                  soup->non_manifold_edges)
-    {
-      const Point_3& a = soup->points[edge[0]];
-      const Point_3& b = soup->points[edge[1]];
-      ::glBegin(GL_LINES);
-      ::glVertex3d(a.x(), a.y(), a.z());
-      ::glVertex3d(b.x(), b.y(), b.z());
-      ::glEnd();
-    }
-    if(lightning) glEnable(GL_LIGHTING);
-    ::glColor4dv(current_color);
-  }
-}
-
-void
-Scene_polygon_soup_item::draw_points() const {
-  if(soup == 0) return;
-  ::glBegin(GL_POINTS);
-  for(Polygon_soup::Points::const_iterator pit = soup->points.begin(),
-        end = soup->points.end();
-      pit != end; ++pit)
-  {
-    ::glVertex3d(pit->x(), pit->y(), pit->z());
-  }
-  ::glEnd();
-}
-
-bool
-Scene_polygon_soup_item::isEmpty() const {
-  return (soup == 0 || soup->points.empty());
-}
-
-Scene_polygon_soup_item::Bbox
-Scene_polygon_soup_item::bbox() const {
-  const Point_3& p = *(soup->points.begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Polygon_soup::Points::const_iterator it = soup->points.begin();
-      it != soup->points.end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-void 
-Scene_polygon_soup_item::new_vertex(const double& x,
-                               const double& y,
-                               const double& z)
-{
-  soup->points.push_back(Point_3(x, y, z));
-}
-                               
-void 
-Scene_polygon_soup_item::new_triangle(const std::size_t i,
-                                 const std::size_t j,
-                                 const std::size_t k)
-{
-  Polygon_soup::Polygon_3 new_polygon(3);
-  new_polygon[0] = i;
-  new_polygon[1] = j;
-  new_polygon[2] = k;
-  soup->polygons.push_back(new_polygon);
-}
-                               
-#include "Scene_polygon_soup_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.h
deleted file mode 100644
index f426b54..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item.h
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifndef SCENE_POLYGON_SOUP_ITEM_H
-#define SCENE_POLYGON_SOUP_ITEM_H
-
-#include "Scene_polygon_soup_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "Polyhedron_type.h"
-
-#include <boost/foreach.hpp>
-#include <boost/array.hpp>
-
-#include <iostream>
-
-
-struct Polygon_soup
-{
-  typedef Kernel::Point_3 Point_3;
-  typedef std::vector<Point_3> Points;
-  typedef std::vector<std::size_t> Polygon_3;
-  typedef std::map<std::pair<std::size_t, std::size_t>, std::set<std::size_t> > Edges_map;
-  typedef boost::array<std::size_t, 2> Edge;
-  typedef std::vector<Polygon_3> Polygons;
-  typedef std::set<Edge> Edges;
-  typedef Polygons::size_type size_type;
-  Points points;
-  Polygons polygons;
-  Edges_map edges;
-  Edges non_manifold_edges;
-  bool display_non_manifold_edges;
-
-  Polygon_soup():
-    display_non_manifold_edges(false){}
-
-  Polygon_soup* clone() const {
-    Polygon_soup* result = new Polygon_soup();
-    result->points = points;
-    result->polygons = polygons;
-    result->edges = edges;
-    result->non_manifold_edges = non_manifold_edges;
-    result->display_non_manifold_edges = display_non_manifold_edges;
-    return result;
-  }
-
-  void clear() {
-    points.clear();
-    polygons.clear();
-    edges.clear();
-    non_manifold_edges.clear();
-  }
-
-  void fill_edges() {
-    // Fill edges
-    edges.clear();
-    for(size_type i = 0; i < polygons.size(); ++i)
-    {
-      const size_type size = polygons[i].size();
-      for(size_type j = 0; j < size; ++j) {
-        const std::size_t& i0 = polygons[i][j];
-        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
-        edges[std::make_pair(i0, i1)].insert(i);
-//         qDebug() << tr("edges[std::make_pair(%1, %2)].insert(%3). Size=%4")
-//           .arg(i0).arg(i1).arg(i).arg(edges[std::make_pair(i0, i1)].size());
-      }
-    }
-
-    // Fill non-manifold edges
-    non_manifold_edges.clear();
-    for(size_type i = 0; i < polygons.size(); ++i)
-    {
-      const size_type size = polygons[i].size();
-      for(size_type j = 0; j < size; ++j) {
-        const std::size_t& i0 = polygons[i][j];
-        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
-        if( (i0 < i1) &&
-            (edges[std::make_pair(i0, i1)].size() +
-             edges[std::make_pair(i1, i0)].size() > 2) )
-        {
-          Edge edge;
-          edge[0] = i0;
-          edge[1] = i1;
-          if(i0 > i1) std::swap(edge[0], edge[1]);
-          non_manifold_edges.insert(edge);
-        }
-      }
-    }
-  }
-
-  void inverse_orientation(const std::size_t index) {
-    std::reverse(polygons[index].begin(), polygons[index].end());
-  }
-};
-
-
-class Scene_polyhedron_item;
-
-class SCENE_POLYGON_SOUP_ITEM_EXPORT Scene_polygon_soup_item 
-  : public Scene_item_with_display_list 
-{
-  typedef Kernel::Point_3 Point_3;
-
-  Q_OBJECT
-public:  
-  Scene_polygon_soup_item();
-  ~Scene_polygon_soup_item();
-
-  Scene_polygon_soup_item* clone() const;
-  bool load(std::istream& in);
-  void load(Scene_polyhedron_item*);
-
-  template <class Point, class Polygon>
-  inline void load(const std::vector<Point>& points, const std::vector<Polygon>& polygons)
-  {
-    if(!soup)
-      soup = new Polygon_soup;
-    soup->clear();
-
-    /// add points
-    soup->points.reserve(points.size());
-    BOOST_FOREACH(const Point& p, points)
-      soup->points.push_back( Point_3(p[0], p[1], p[2]) );
-
-    /// add polygons
-    std::size_t nb_polygons=polygons.size();
-    soup->polygons.resize(nb_polygons);
-    for(std::size_t i=0; i<nb_polygons; ++i)
-      soup->polygons[i].assign(polygons[i].begin(), polygons[i].end());
-
-    /// fill non-manifold edges container
-    soup->fill_edges();
-    oriented = false;
-  }
-
-  bool save(std::ostream& out) const;
-
-  QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS!
-  // OpenGL drawing in a display list
-  void direct_draw() const;
-  void draw_points() const;
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  void new_vertex(const double&, const double&, const double&);
-  void new_triangle(const std::size_t, const std::size_t, const std::size_t);
-
-  void init_polygon_soup(std::size_t nb_pts, std::size_t nb_polygons);
-  void finalize_polygon_soup();
-
-public slots:
-  void shuffle_orientations();
-  bool orient();
-  bool exportAsPolyhedron(Polyhedron*);
-  void inside_out();
-
-  void setDisplayNonManifoldEdges(const bool);
-  bool displayNonManifoldEdges() const;
-
-private:
-  Polygon_soup* soup;
-  bool oriented;
-}; // end class Scene_polygon_soup_item
-
-#endif // SCENE_POLYGON_SOUP_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.cpp
deleted file mode 100644
index 1ef110f..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.cpp
+++ /dev/null
@@ -1,453 +0,0 @@
-#include <CGAL/AABB_intersections.h>
-#include "Scene_polyhedron_item.h"
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-
-#include <QVariant>
-#include <list>
-
-typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
-typedef CGAL::AABB_tree<AABB_traits> Input_facets_AABB_tree;
-
-const char* aabb_property_name = "Scene_polyhedron_item aabb tree";
-
-Input_facets_AABB_tree* get_aabb_tree(Scene_polyhedron_item* item)
-{
-  QVariant aabb_tree_property = item->property(aabb_property_name);
-  if(aabb_tree_property.isValid()) {
-    void* ptr = aabb_tree_property.value<void*>();
-    return static_cast<Input_facets_AABB_tree*>(ptr);
-  }
-  else {
-    Polyhedron* poly = item->polyhedron();
-    if(poly) {
-      Input_facets_AABB_tree* tree = 
-        new Input_facets_AABB_tree(faces(*poly).first,
-                                   faces(*poly).second,
-                                   *poly);
-      item->setProperty(aabb_property_name, 
-                        QVariant::fromValue<void*>(tree));
-      return tree;
-    }
-    else return 0;
-  }
-}
-
-void delete_aabb_tree(Scene_polyhedron_item* item)
-{
-  QVariant aabb_tree_property = item->property(aabb_property_name);
-  if(aabb_tree_property.isValid()) {
-    void* ptr = aabb_tree_property.value<void*>();
-    Input_facets_AABB_tree* tree = static_cast<Input_facets_AABB_tree*>(ptr);
-    if(tree) {
-      delete tree;
-      tree = 0;
-    }
-    item->setProperty(aabb_property_name, QVariant());
-  }
-}
-
-#include <QObject>
-#include <QMenu>
-#include <QAction>
-#include <CGAL/gl_render.h>
-
-Scene_polyhedron_item::Scene_polyhedron_item()
-  : Scene_item_with_display_list(),
-    poly(new Polyhedron),
-    show_only_feature_edges_m(false),
-    facet_picking_m(false),
-    erase_next_picked_facet_m(false),
-    plugin_has_set_color_vector_m(false)
-{
-  //init();
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(Polyhedron* const p)
-  : Scene_item_with_display_list(),
-    poly(p),
-    show_only_feature_edges_m(false),
-    facet_picking_m(false),
-    erase_next_picked_facet_m(false),
-    plugin_has_set_color_vector_m(false)
-{
-  init();
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p)
-  : Scene_item_with_display_list(),
-    poly(new Polyhedron(p)),
-    show_only_feature_edges_m(false),
-    facet_picking_m(false),
-    erase_next_picked_facet_m(false),
-    plugin_has_set_color_vector_m(false)
-{
-  init();
-}
-
-// Scene_polyhedron_item::Scene_polyhedron_item(const Scene_polyhedron_item& item)
-//   : Scene_item_with_display_list(item),
-//     poly(new Polyhedron(*item.poly)),
-//     show_only_feature_edges_m(false)
-// {
-// }
-
-Scene_polyhedron_item::~Scene_polyhedron_item()
-{
-  delete_aabb_tree(this);
-  delete poly;
-}
-
-#include "Color_map.h"
-
-void
-Scene_polyhedron_item::
-init()
-{
-  typedef Polyhedron::Facet_iterator Facet_iterator;
-  
-  if ( !plugin_has_set_color_vector_m )
-  {
-    // Fill indices map and get max subdomain value
-    int max = 0;
-    for(Facet_iterator fit = poly->facets_begin(), end = poly->facets_end() ;
-        fit != end; ++fit)
-    {
-      max = (std::max)(max, fit->patch_id());
-    }
-    
-    colors_.clear();
-    compute_color_map(this->color(), max + 1, 
-                      std::back_inserter(colors_));
-  }
-}
-
-
-Scene_polyhedron_item* 
-Scene_polyhedron_item::clone() const {
-  return new Scene_polyhedron_item(*poly);
-}
-
-// Load polyhedron from .OFF file
-bool
-Scene_polyhedron_item::load(std::istream& in)
-{
-  in >> *poly;
-  
-  if ( in && !isEmpty() )
-  {
-    changed();
-    return true;
-  }
-  return false;
-}
-
-// Write polyhedron to .OFF file
-bool 
-Scene_polyhedron_item::save(std::ostream& out) const
-{
-  out.precision(13);
-  out << *poly;
-  return (bool) out;
-}
-
-QString 
-Scene_polyhedron_item::toolTip() const
-{
-  if(!poly)
-    return QString();
-
-  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4</p>")
-    .arg(this->name())
-    .arg(poly->size_of_vertices())
-    .arg(poly->size_of_halfedges()/2)
-    .arg(poly->size_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-QMenu* Scene_polyhedron_item::contextMenu()
-{
-  const char* prop_name = "Menu modified by Scene_polyhedron_item.";
-
-  QMenu* menu = Scene_item::contextMenu();
-
-  // Use dynamic properties:
-  // http://doc.trolltech.com/lastest/qobject.html#property
-  bool menuChanged = menu->property(prop_name).toBool();
-
-  if(!menuChanged) {
-
-    QAction* actionShowOnlyFeatureEdges = 
-      menu->addAction(tr("Show only &feature edges"));
-    actionShowOnlyFeatureEdges->setCheckable(true);
-    actionShowOnlyFeatureEdges->setObjectName("actionShowOnlyFeatureEdges");
-    connect(actionShowOnlyFeatureEdges, SIGNAL(toggled(bool)),
-            this, SLOT(show_only_feature_edges(bool)));
-
-    QAction* actionPickFacets = 
-      menu->addAction(tr("Facets picking"));
-    actionPickFacets->setCheckable(true);
-    actionPickFacets->setObjectName("actionPickFacets");
-    connect(actionPickFacets, SIGNAL(toggled(bool)),
-            this, SLOT(enable_facets_picking(bool)));
-
-    QAction* actionEraseNextFacet = 
-      menu->addAction(tr("Erase next picked facet"));
-    actionEraseNextFacet->setCheckable(true);
-    actionEraseNextFacet->setObjectName("actionEraseNextFacet");
-    connect(actionEraseNextFacet, SIGNAL(toggled(bool)),
-            this, SLOT(set_erase_next_picked_facet(bool)));
-
-    menu->setProperty(prop_name, true);
-  }
-  QAction* action = menu->findChild<QAction*>("actionPickFacets");
-  if(action) action->setChecked(facet_picking_m);
-  action = menu->findChild<QAction*>("actionEraseNextFacet");
-  if(action) action->setChecked(erase_next_picked_facet_m);
-  return menu;
-}
-
-void Scene_polyhedron_item::show_only_feature_edges(bool b)
-{
-  show_only_feature_edges_m = b;
-  emit itemChanged();
-}
-
-void Scene_polyhedron_item::enable_facets_picking(bool b)
-{
-  facet_picking_m = b;
-}
-
-void Scene_polyhedron_item::set_erase_next_picked_facet(bool b)
-{
-  if(b) { facet_picking_m = true; } // automatically activate facet_picking
-  erase_next_picked_facet_m = b;
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-void Scene_polyhedron_item::direct_draw() const {
-  gl_render_facets(*poly,colors_);
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-void Scene_polyhedron_item::direct_draw_edges() const {
-  typedef Kernel::Point_3		Point;
-  typedef Polyhedron::Edge_iterator	Edge_iterator;
-
-  ::glBegin(GL_LINES);
-  Edge_iterator he;
-  if(!show_only_feature_edges_m) {
-    for(he = poly->edges_begin();
-        he != poly->edges_end();
-        he++)
-    {
-      if(he->is_feature_edge()) continue;
-      const Point& a = he->vertex()->point();
-      const Point& b = he->opposite()->vertex()->point();
-      ::glVertex3d(a.x(),a.y(),a.z());
-      ::glVertex3d(b.x(),b.y(),b.z());
-    }
-  }
-  ::glColor3d(1.0, 0.0, 0.0);
-  for(he = poly->edges_begin();
-    he != poly->edges_end();
-    he++)
-  {
-    if(!he->is_feature_edge()) continue;
-    const Point& a = he->vertex()->point();
-    const Point& b = he->opposite()->vertex()->point();
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-  }
-  ::glEnd();
-}
-
-Polyhedron* 
-Scene_polyhedron_item::polyhedron()       { return poly; }
-const Polyhedron* 
-Scene_polyhedron_item::polyhedron() const { return poly; }
-
-bool
-Scene_polyhedron_item::isEmpty() const {
-  return (poly == 0) || poly->empty();
-}
-
-Scene_polyhedron_item::Bbox
-Scene_polyhedron_item::bbox() const {
-  const Kernel::Point_3& p = *(poly->points_begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Polyhedron::Point_iterator it = poly->points_begin();
-      it != poly->points_end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-
-void
-Scene_polyhedron_item::
-changed()
-{
-  emit item_is_about_to_be_changed();
-  delete_aabb_tree(this);
-  init();
-  Base::changed();
-}
-
-void 
-Scene_polyhedron_item::select(double orig_x,
-                              double orig_y,
-                              double orig_z,
-                              double dir_x,
-                              double dir_y,
-                              double dir_z)
-{
-  if(facet_picking_m) {
-    typedef Input_facets_AABB_tree Tree;
-    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
-
-    Tree* aabb_tree = get_aabb_tree(this);
-    if(aabb_tree) {
-      const Kernel::Point_3 ray_origin(orig_x, orig_y, orig_z);
-      const Kernel::Vector_3 ray_dir(dir_x, dir_y, dir_z);
-      const Kernel::Ray_3 ray(ray_origin, ray_dir);
-
-      typedef std::list<Object_and_primitive_id> Intersections;
-      Intersections intersections;
-
-      aabb_tree->all_intersections(ray, std::back_inserter(intersections));
-
-      Intersections::iterator closest = intersections.begin();
-      if(closest != intersections.end()) {
-        const Kernel::Point_3* closest_point = 
-          CGAL::object_cast<Kernel::Point_3>(&closest->first);
-
-        for(Intersections::iterator 
-              it = boost::next(intersections.begin()),
-              end = intersections.end();
-            it != end; ++it)
-        {
-          if(! closest_point) {
-            closest = it;
-          }
-          else {
-            const Kernel::Point_3* it_point = 
-              CGAL::object_cast<Kernel::Point_3>(&it->first);
-            if(it_point && 
-               (ray_dir * (*it_point - *closest_point)) < 0)
-            {
-              closest = it;
-              closest_point = it_point;
-            }
-          }
-        }
-        if(closest_point) {
-          Polyhedron::Facet_handle selected_fh = closest->second;
-
-          // The computation of the nearest vertex may be costly.  Only
-          // do it if some objects are connected to the signal
-          // 'selected_vertex'.
-          if(QObject::receivers(SIGNAL(selected_vertex(void*))) > 0)
-          {
-            Polyhedron::Halfedge_around_facet_circulator 
-              he_it = selected_fh->facet_begin(),
-              around_end = he_it;
-
-            Polyhedron::Vertex_handle v = he_it->vertex(), nearest_v = v;
-
-            Kernel::FT sq_dist = CGAL::squared_distance(*closest_point,
-                                                        v->point());
-
-            while(++he_it != around_end) {
-              v = he_it->vertex();
-              Kernel::FT new_sq_dist = CGAL::squared_distance(*closest_point,
-                                                              v->point());
-              if(new_sq_dist < sq_dist) {
-                sq_dist = new_sq_dist;
-                nearest_v = v;
-              }
-            }
-
-            emit selected_vertex((void*)(&*nearest_v));
-          }
-
-          if(QObject::receivers(SIGNAL(selected_edge(void*))) > 0
-            || QObject::receivers(SIGNAL(selected_halfedge(void*))) > 0)
-          {
-            Polyhedron::Halfedge_around_facet_circulator 
-              he_it = selected_fh->facet_begin(),
-              around_end = he_it;
-
-            Polyhedron::Halfedge_handle nearest_h = he_it;
-            Kernel::FT sq_dist = CGAL::squared_distance(*closest_point,
-              Kernel::Segment_3(he_it->vertex()->point(), he_it->opposite()->vertex()->point()));
-
-            while(++he_it != around_end) {
-              Kernel::FT new_sq_dist = CGAL::squared_distance(*closest_point,
-                Kernel::Segment_3(he_it->vertex()->point(), he_it->opposite()->vertex()->point()));
-              if(new_sq_dist < sq_dist) {
-                sq_dist = new_sq_dist;
-                nearest_h = he_it;
-              }
-            }
-
-            emit selected_halfedge((void*)(&*nearest_h));
-            emit selected_edge((void*)(std::min)(&*nearest_h, &*nearest_h->opposite()));
-          }
-          
-          emit selected_facet((void*)(&*selected_fh));
-          if(erase_next_picked_facet_m) {
-            polyhedron()->erase_facet(selected_fh->halfedge());
-            polyhedron()->normalize_border();
-            //set_erase_next_picked_facet(false);
-            changed();
-            emit itemChanged();
-          }
-        }
-      }
-    }
-  }
-  Base::select(orig_x, orig_y, orig_z, dir_x, dir_y, dir_z);
-}
-
-void Scene_polyhedron_item::update_vertex_indices()
-{
-  std::size_t id=0;
-  for (Polyhedron::Vertex_iterator vit = polyhedron()->vertices_begin(), 
-                                   vit_end = polyhedron()->vertices_end(); vit != vit_end; ++vit)
-  {
-    vit->id()=id++;
-  }
-}
-void Scene_polyhedron_item::update_facet_indices()
-{
-  std::size_t id=0;
-  for (Polyhedron::Facet_iterator  fit = polyhedron()->facets_begin(), 
-                                   fit_end = polyhedron()->facets_end(); fit != fit_end; ++fit)
-  {
-    fit->id()=id++;
-  }  
-}
-void Scene_polyhedron_item::update_halfedge_indices()
-{
-  std::size_t id=0;
-  for (Polyhedron::Halfedge_iterator hit = polyhedron()->halfedges_begin(), 
-                                     hit_end = polyhedron()->halfedges_end(); hit != hit_end; ++hit)
-  {
-    hit->id()=id++;
-  }
-}
-
-#include "Scene_polyhedron_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.h
deleted file mode 100644
index ca522de..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_H
-#define SCENE_POLYHEDRON_ITEM_H
-
-#include "Scene_polyhedron_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "Polyhedron_type_fwd.h"
-#include <iostream>
-
-#include <set>
-#include <vector>
-
-#include <QColor>
-
-class QMenu;
-
-// This class represents a polyhedron in the OpenGL scene
-class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item 
-  : public Scene_item_with_display_list {
-  Q_OBJECT
-public:  
-  Scene_polyhedron_item();
-//   Scene_polyhedron_item(const Scene_polyhedron_item&);
-  Scene_polyhedron_item(const Polyhedron& p);
-  Scene_polyhedron_item(Polyhedron* const p);
-  ~Scene_polyhedron_item();
-
-  Scene_polyhedron_item* clone() const;
-  
-  // IO
-  bool load(std::istream& in);
-  bool save(std::ostream& out) const;
-
-  // Function for displaying meta-data of the item
-  virtual QString toolTip() const;
-
-  // Function to override the context menu
-  QMenu* contextMenu();
-  
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); }
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  virtual void direct_draw() const;
-  virtual void direct_draw_edges() const;
-
-  // Get wrapped polyhedron
-  Polyhedron*       polyhedron();
-  const Polyhedron* polyhedron() const;
-
-  // Get dimensions
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-  std::vector<QColor>& color_vector() {return colors_;}
-  void set_color_vector_read_only(bool on_off) {plugin_has_set_color_vector_m=on_off;}
-  
-public slots:
-  virtual void changed();
-  void show_only_feature_edges(bool);
-  void enable_facets_picking(bool);
-  void set_erase_next_picked_facet(bool);
-
-  void select(double orig_x,
-              double orig_y,
-              double orig_z,
-              double dir_x,
-              double dir_y,
-              double dir_z);
-
-  void update_vertex_indices();
-  void update_facet_indices();
-  void update_halfedge_indices();
-
-signals:
-  void selected_vertex(void*);
-  void selected_facet(void*);
-  void selected_edge(void*);
-  void selected_halfedge(void*);
-  void item_is_about_to_be_changed(); // emitted in changed()
-
-private:
-  // Initialization
-  void init();
-  
-private:
-  Polyhedron* poly;
-
-private:
-  typedef Scene_item_with_display_list Base;
-  typedef std::vector<QColor> Color_vector;
-    
-  Color_vector colors_;
-
-  bool show_only_feature_edges_m;
-  bool facet_picking_m;
-  bool erase_next_picked_facet_m;
-  //the following variable is used to indicate if the color vector must not be automatically updated.
-  bool plugin_has_set_color_vector_m;
-}; // end class Scene_polyhedron_item
-
-#endif // SCENE_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp
deleted file mode 100644
index f330258..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-#include "Scene_polyhedron_item_decorator.h"
-#include "Polyhedron_type.h"
-
-Scene_polyhedron_item_decorator::Scene_polyhedron_item_decorator
-  (Scene_polyhedron_item* poly_item, bool delete_item)
-  : poly_item(poly_item), delete_poly_item(delete_item)
-{ }
-
-Scene_polyhedron_item_decorator::~Scene_polyhedron_item_decorator()
-{ 
-  if(delete_poly_item) { delete poly_item; }
-}
-
-Scene_polyhedron_item_decorator* 
-Scene_polyhedron_item_decorator::clone() const {
-  return 0;
-}
-
-QString 
-Scene_polyhedron_item_decorator::toolTip() const
-{
-  if(!poly_item->polyhedron())
-    return QString();
-
-  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4</p>")
-    .arg(this->name())
-    .arg(poly_item->polyhedron()->size_of_vertices())
-    .arg(poly_item->polyhedron()->size_of_halfedges()/2)
-    .arg(poly_item->polyhedron()->size_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-void Scene_polyhedron_item_decorator::draw() const {
-  poly_item->draw();
-}
-
-void Scene_polyhedron_item_decorator::draw_edges() const {
-  poly_item->draw_edges();
-}
-
-Polyhedron* 
-Scene_polyhedron_item_decorator::polyhedron()       
-{ return poly_item->polyhedron(); }
-
-const Polyhedron* 
-Scene_polyhedron_item_decorator::polyhedron() const 
-{ return poly_item->polyhedron(); }
-
-bool
-Scene_polyhedron_item_decorator::isEmpty() const {
-  return poly_item->isEmpty();
-}
-
-Scene_polyhedron_item_decorator::Bbox
-Scene_polyhedron_item_decorator::bbox() const {
-  return poly_item->bbox();
-}
-
-
-void
-Scene_polyhedron_item_decorator::
-changed()
-{
-  poly_item->changed();
-  Scene_item::changed();
-}
-
-void 
-Scene_polyhedron_item_decorator::select(double orig_x,
-                                   double orig_y,
-                                   double orig_z,
-                                   double dir_x,
-                                   double dir_y,
-                                   double dir_z)
-{
-  Scene_item::select(orig_x,
-                     orig_y,
-                     orig_z,
-                     dir_x,
-                     dir_y,
-                     dir_z);
-  poly_item->select(orig_x,
-                       orig_y,
-                       orig_z,
-                       dir_x,
-                       dir_y,
-                       dir_z);
-}
-
-Scene_polyhedron_item* Scene_polyhedron_item_decorator::polyhedron_item() const {
-  return poly_item;
-}
-
-void Scene_polyhedron_item_decorator::set_polyhedron_item(Scene_polyhedron_item* poly_item) {
-  this->poly_item = poly_item;
-}
-
-#include "Scene_polyhedron_item_decorator.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.h
deleted file mode 100644
index 07980b3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_DECORATOR_H
-#define SCENE_POLYHEDRON_ITEM_DECORATOR_H
-#include "Scene_polyhedron_item_decorator_config.h"
-#include "Scene_polyhedron_item.h"
-
-// This class is a decorator for Scene_polyhedron_item yet it does not inherit it but Scene_item
-class SCENE_POLYHEDRON_ITEM_DECORATOR_EXPORT Scene_polyhedron_item_decorator 
-  : public Scene_item {
-  Q_OBJECT
-public:  
-  /// Create an Scene_polyhedron_item_decorator from a Scene_polyhedron_item.
-
-  Scene_polyhedron_item_decorator(Scene_polyhedron_item* poly_item, bool delete_item = true);
-  ~Scene_polyhedron_item_decorator();
-
-  /// Returns 0, so that one cannot clone decorator
-  Scene_polyhedron_item_decorator* clone() const;
-  
-  // // IO
-  // bool load(std::istream& in);
-  // bool save(std::ostream& out) const;
-
-  // Function for displaying meta-data of the item
-  QString toolTip() const;
-
-  // // Function to override the context menu
-  // QMenu* contextMenu();
-  
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); }
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  // dispatch to poly_item direct_draw and direct_draw_edges
-  void draw() const;
-  void draw_edges() const;
-
-  // Get wrapped polyhedron
-  Polyhedron*       polyhedron();
-  const Polyhedron* polyhedron() const;
-
-  Scene_polyhedron_item* polyhedron_item() const;
-  void                   set_polyhedron_item(Scene_polyhedron_item* poly_item);
-
-  // Get dimensions
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  bool delete_item() { return delete_poly_item; }
-  void set_delete_item(bool delete_item) { delete_poly_item = delete_item; }
-
-public slots:
-  void changed();
-  void select(double orig_x,
-              double orig_y,
-              double orig_z,
-              double dir_x,
-              double dir_y,
-              double dir_z);
-
-protected:
-  Scene_polyhedron_item* poly_item;
-  bool delete_poly_item;
-}; // end class Scene_polyhedron_item_decorator
-
-#endif // SCENE_POLYHEDRON_ITEM_DECORATOR_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp
deleted file mode 100644
index 3b895e0..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Scene_polyhedron_item_k_ring_selection.h"
-#include "Scene_polyhedron_item_k_ring_selection.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h
deleted file mode 100644
index 6ba2693..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h
+++ /dev/null
@@ -1,199 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_H
-#define SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_H
-#include "Scene_polyhedron_item_k_ring_selection_config.h"
-#include "Polyhedron_type.h"
-#include "Scene_polyhedron_item.h"
-
-#include <QGLViewer/qglviewer.h>
-#include <QKeyEvent>
-#include <QMouseEvent>
-#include <QMainWindow>
-#include <QObject>
-
-#include <map>
-#include <queue>
-
-#include <CGAL/boost/graph/selection.h>
-
-class SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_EXPORT Scene_polyhedron_item_k_ring_selection 
-  : public QObject
-{
-  Q_OBJECT
-public:
-  struct Active_handle { enum Type{ VERTEX = 0, FACET = 1, EDGE = 2 }; };
-
-  typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
-
-  // Hold mouse keyboard state together
-  struct Mouse_keyboard_state
-  {
-    Mouse_keyboard_state() : shift_pressing(false), left_button_pressing(false) { }
-    bool shift_pressing, left_button_pressing;
-  };
-
-  Mouse_keyboard_state  state;
-
-  Active_handle::Type    active_handle_type;
-  int                    k_ring;
-  Scene_polyhedron_item* poly_item;
-
-  Scene_polyhedron_item_k_ring_selection() {}
-
-  Scene_polyhedron_item_k_ring_selection
-    (Scene_polyhedron_item* poly_item, QMainWindow* mw, Active_handle::Type aht, int k_ring)
-  {
-    init(poly_item, mw, aht, k_ring);
-  }
-
-  void init(Scene_polyhedron_item* poly_item, QMainWindow* mw, Active_handle::Type aht, int k_ring) {
-    this->poly_item = poly_item;
-    this->active_handle_type = aht;
-    this->k_ring = k_ring;
-
-    poly_item->enable_facets_picking(true);
-    poly_item->set_color_vector_read_only(true);
-
-    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-    viewer->installEventFilter(this);
-    mw->installEventFilter(this);
-
-    connect(poly_item, SIGNAL(selected_vertex(void*)), this, SLOT(vertex_has_been_selected(void*)));
-    connect(poly_item, SIGNAL(selected_facet(void*)), this, SLOT(facet_has_been_selected(void*)));
-    connect(poly_item, SIGNAL(selected_edge(void*)), this, SLOT(edge_has_been_selected(void*)));
-  }
-
-public slots:
-  // slots are called by signals of polyhedron_item
-  void vertex_has_been_selected(void* void_ptr) 
-  {
-    if(active_handle_type != Active_handle::VERTEX) { return; }
-    process_selection( static_cast<Polyhedron::Vertex*>(void_ptr)->halfedge()->vertex() );
-  }
-  void facet_has_been_selected(void* void_ptr)
-  {
-    if(active_handle_type != Active_handle::FACET) { return; }
-    process_selection( static_cast<Polyhedron::Facet*>(void_ptr)->halfedge()->facet() );
-  }
-  void edge_has_been_selected(void* void_ptr) 
-  {
-    if(active_handle_type != Active_handle::EDGE) { return; }
-    process_selection( edge(static_cast<Polyhedron::Halfedge*>(void_ptr)->opposite()->opposite(), *poly_item->polyhedron()) );
-  }
-
-signals:
-  void selected(const std::set<Polyhedron::Vertex_handle>&);
-  void selected(const std::set<Polyhedron::Facet_handle>&);
-  void selected(const std::set<edge_descriptor>&);
-
-protected:
-
-  template<class HandleType>
-  void process_selection(HandleType clicked) {
-    const std::set<HandleType>& selection = extract_k_ring(clicked, k_ring);
-    emit selected(selection);
-  }
-
-  template <class Handle>
-  struct Is_selected_from_set{
-    std::set<Handle>& selection;
-    Is_selected_from_set(std::set<Handle>& selection)
-      :selection(selection) {}
-    friend bool get(Is_selected_from_set<Handle> map, Handle k)
-    {
-      return map.selection.count(k);
-    }
-    friend void put(Is_selected_from_set<Handle> map, Handle k, bool b)
-    {
-      if (b)
-        map.selection.insert(k);
-      else
-        map.selection.erase(k);
-    }
-  };
-
-  std::set<Polyhedron::Vertex_handle>
-  extract_k_ring(Polyhedron::Vertex_handle clicked, unsigned int k)
-  {
-    std::set<Polyhedron::Vertex_handle> selection;
-    selection.insert(clicked);
-    if (k>0)
-      CGAL::dilate_vertex_selection(CGAL::make_array(clicked),
-                                    *poly_item->polyhedron(),
-                                    k,
-                                    Is_selected_from_set<Polyhedron::Vertex_handle>(selection),
-                                    CGAL::Emptyset_iterator());
-
-    return selection;
-  }
-
-  std::set<Polyhedron::Facet_handle>
-  extract_k_ring(Polyhedron::Facet_handle clicked, unsigned int k)
-  {
-    std::set<Polyhedron::Facet_handle> selection;
-    selection.insert(clicked);
-    if (k>0)
-      CGAL::dilate_face_selection(CGAL::make_array(clicked),
-                                  *poly_item->polyhedron(),
-                                  k,
-                                  Is_selected_from_set<Polyhedron::Facet_handle>(selection),
-                                  CGAL::Emptyset_iterator());
-
-    return selection;
-  }
-
-  std::set<edge_descriptor>
-  extract_k_ring(edge_descriptor clicked, unsigned int k)
-  {
-    std::set<edge_descriptor> selection;
-    selection.insert(clicked);
-    if (k>0)
-      CGAL::dilate_edge_selection(CGAL::make_array(clicked),
-                                  *poly_item->polyhedron(),
-                                  k,
-                                  Is_selected_from_set<edge_descriptor>(selection),
-                                  CGAL::Emptyset_iterator());
-
-    return selection;
-  }
-
-
-  bool eventFilter(QObject* /*target*/, QEvent *event)
-  {
-    // This filter is both filtering events from 'viewer' and 'main window'
-    // key events
-    if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)  {
-      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
-      Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
-
-      state.shift_pressing = modifiers.testFlag(Qt::ShiftModifier);
-    }
-    // mouse events
-    if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease) {
-      QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
-      if(mouse_event->button() == Qt::LeftButton) {
-        state.left_button_pressing = event->type() == QEvent::MouseButtonPress;
-      }   
-    }
-
-    // use mouse move event for paint-like selection
-    if(event->type() == QEvent::MouseMove &&
-      (state.shift_pressing && state.left_button_pressing) )    
-    { // paint with mouse move event 
-      QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
-      QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-      qglviewer::Camera* camera = viewer->camera();
-
-      bool found = false;
-      const qglviewer::Vec& point = camera->pointUnderPixel(mouse_event->pos(), found);
-      if(found)
-      {
-        const qglviewer::Vec& orig = camera->position();
-        const qglviewer::Vec& dir = point - orig;
-        poly_item->select(orig.x, orig.y, orig.z, dir.x, dir.y, dir.z);
-      }
-    }//end MouseMove
-    return false;
-  }
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.cpp
deleted file mode 100644
index 8a104dd..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Scene_polyhedron_selection_item.h"
-#include "Scene_polyhedron_selection_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.h
deleted file mode 100644
index c835f7e..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item.h
+++ /dev/null
@@ -1,740 +0,0 @@
-#ifndef SCENE_POLYHEDRON_SELECTION_ITEM_H
-#define SCENE_POLYHEDRON_SELECTION_ITEM_H
-#include "opengl_tools.h"
-#include "Scene_polyhedron_selection_item_config.h"
-#include "Scene_polyhedron_item_k_ring_selection.h"
-#include "Travel_isolated_components.h"
-
-#include "Scene_polyhedron_item_decorator.h"
-#include "Polyhedron_type.h"
-#include <CGAL/gl_render.h>
-#include <CGAL/polygon_soup_to_polyhedron_3.h>
-
-#include <fstream>
-#include <boost/foreach.hpp>
-#include <boost/unordered_set.hpp>
-
-#include <CGAL/boost/graph/selection.h>
-
-template<class HandleType, class SelectionItem>
-struct Selection_traits {};
-
-template<class SelectionItem>
-struct Selection_traits<typename SelectionItem::Vertex_handle, SelectionItem> 
-{
-  typedef typename SelectionItem::Selection_set_vertex Container;
-  typedef boost::graph_traits<Polyhedron>::vertex_iterator Iterator;
-  Selection_traits(SelectionItem* item) : item(item) { }
-
-  Container& container() { return item->selected_vertices; }
-  Iterator iterator_begin() { return vertices(*item->polyhedron()).first; }
-  Iterator iterator_end() { return vertices(*item->polyhedron()).second; }
-  std::size_t size() { return item->polyhedron()->size_of_vertices(); }
-  void update_indices() { item->polyhedron_item()->update_vertex_indices(); }
-  std::size_t id(typename SelectionItem::Vertex_handle  vh) {return vh->id();}
-
-  template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  erode_selection(
-    const VertexRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsVertexSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return erode_vertex_selection(selection, graph, k, is_selected, out);
-  }
-  template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  dilate_selection(
-    const VertexRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsVertexSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return dilate_vertex_selection(selection, graph, k, is_selected, out);
-  }
-
-  SelectionItem* item;
-};
-
-template<class SelectionItem>
-struct Selection_traits<typename SelectionItem::Facet_handle, SelectionItem>
-{
-  typedef typename SelectionItem::Selection_set_facet Container;
-  typedef boost::graph_traits<Polyhedron>::face_iterator Iterator;
-  Selection_traits(SelectionItem* item) : item(item) { }
-
-  Container& container() { return item->selected_facets; }
-  Iterator iterator_begin() { return faces(*item->polyhedron()).first; }
-  Iterator iterator_end() { return faces(*item->polyhedron()).second; }
-  std::size_t size() { return item->polyhedron()->size_of_facets(); }
-  void update_indices() { item->polyhedron_item()->update_facet_indices(); }
-  std::size_t id(typename SelectionItem::Facet_handle fh) {return fh->id();}
-
-  template <class FaceRange, class HalfedgeGraph, class IsFaceSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  erode_selection(
-    const FaceRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsFaceSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return erode_face_selection(selection, graph, k, is_selected, out);
-  }
-  template <class FaceRange, class HalfedgeGraph, class IsFaceSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  dilate_selection(
-    const FaceRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsFaceSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return dilate_face_selection(selection, graph, k, is_selected, out);
-  }
-
-  SelectionItem* item;
-};
-
-template<class SelectionItem>
-struct Selection_traits<typename SelectionItem::edge_descriptor, SelectionItem> 
-{
-  typedef typename SelectionItem::Selection_set_edge Container;
-  typedef boost::graph_traits<Polyhedron>::edge_iterator Iterator;
-  Selection_traits(SelectionItem* item) : item(item) { }
-
-  Container& container() { return item->selected_edges; }
-  Iterator iterator_begin() { return edges(*item->polyhedron()).first; }
-  Iterator iterator_end() { return edges(*item->polyhedron()).second; }
-  std::size_t size() { return item->polyhedron()->size_of_halfedges()/2; }
-  void update_indices() { item->polyhedron_item()->update_halfedge_indices(); }
-  std::size_t id(boost::graph_traits<Polyhedron>::edge_descriptor ed) {return ed.halfedge()->id()/2;}
-
-  template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  erode_selection(
-    const EdgeRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsEdgeSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return erode_edge_selection(selection, graph, k, is_selected, out);
-  }
-  template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
-  static
-  OutputIterator
-  dilate_selection(
-    const EdgeRange& selection,
-    HalfedgeGraph& graph,
-    unsigned int k,
-    IsEdgeSelectedPMap is_selected,
-    OutputIterator out)
-  {
-    return dilate_edge_selection(selection, graph, k, is_selected, out);
-  }
-
-  SelectionItem* item;
-};
-
-//////////////////////////////////////////////////////////////////////////
-
-class SCENE_POLYHEDRON_SELECTION_ITEM_EXPORT Scene_polyhedron_selection_item 
-  : public Scene_polyhedron_item_decorator
-{
-  Q_OBJECT
-
-friend class Polyhedron_demo_selection_plugin;
-
-public:
-  typedef Polyhedron::Vertex_handle   Vertex_handle;
-  typedef Polyhedron::Facet_handle    Facet_handle;
-  typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
-  typedef Polyhedron::Vertex_iterator Vertex_iterator;
-  typedef Polyhedron::Facet_iterator  Facet_iterator;
-  typedef Scene_polyhedron_item_k_ring_selection::Active_handle Active_handle;
-  // To be used inside loader
-  Scene_polyhedron_selection_item() 
-    : Scene_polyhedron_item_decorator(NULL, false)
-  { }
-
-  Scene_polyhedron_selection_item(Scene_polyhedron_item* poly_item, QMainWindow* mw) 
-    : Scene_polyhedron_item_decorator(NULL, false)
-  { init(poly_item, mw); }
-
-protected: 
-  void init(Scene_polyhedron_item* poly_item, QMainWindow* mw)
-  {
-    this->poly_item = poly_item;
-    connect(poly_item, SIGNAL(item_is_about_to_be_changed()), this, SLOT(poly_item_changed())); 
-    connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Vertex_handle>&)), this,
-      SLOT(selected(const std::set<Polyhedron::Vertex_handle>&)));
-    connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Facet_handle>&)), this,
-      SLOT(selected(const std::set<Polyhedron::Facet_handle>&)));
-    connect(&k_ring_selector, SIGNAL(selected(const std::set<edge_descriptor>&)), this,
-      SLOT(selected(const std::set<edge_descriptor>&)));
-
-    k_ring_selector.init(poly_item, mw, Active_handle::VERTEX, -1);
-
-    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
-    viewer->installEventFilter(this);
-    mw->installEventFilter(this);
-
-    facet_color = QColor(87,87,87);
-    edge_color = QColor(173,35,35);
-    vertex_color = QColor(255,205,243);
-  }
-
-  Active_handle::Type get_active_handle_type() 
-  { return k_ring_selector.active_handle_type; }
-  void set_active_handle_type(Active_handle::Type aht) 
-  { k_ring_selector.active_handle_type = aht; }
-
-  int get_k_ring() { return k_ring_selector.k_ring; }
-  void set_k_ring(int k) { k_ring_selector.k_ring = k; }
-
-  bool get_is_insert() { return is_insert; }
-  void set_is_insert(bool i) { is_insert = i; }
-  
-public:
-  typedef boost::unordered_set<Vertex_handle, CGAL::Handle_hash_function>    Selection_set_vertex;
-  typedef boost::unordered_set<Facet_handle, CGAL::Handle_hash_function>      Selection_set_facet;
-  typedef boost::unordered_set<edge_descriptor, CGAL::Handle_hash_function>    Selection_set_edge;
-
-// drawing
-  void draw() const {
-    draw_selected_vertices();
-    draw_selected_facets();
-    draw_selected_edges();
-  }
-  void draw_edges() const { }
-
-  void draw_selected_vertices() const {
-    GLboolean enable_back_lighting = glIsEnabled(GL_LIGHTING);
-    glDisable(GL_LIGHTING);
-
-    
-    CGAL::GL::Point_size point_size; point_size.set_point_size(5);
-    CGALglcolor(vertex_color);
-
-    ::glBegin(GL_POINTS);
-    for(Selection_set_vertex::iterator 
-      it = selected_vertices.begin(),
-      end = selected_vertices.end();
-    it != end; ++it)
-    {
-      const Kernel::Point_3& p = (*it)->point();
-      ::glVertex3d(p.x(), p.y(), p.z());
-    }
-    ::glEnd();
-
-    if(enable_back_lighting) { glEnable(GL_LIGHTING); }
-  }
-  void draw_selected_facets() const {
-    CGALglcolor(facet_color);
-
-    GLfloat offset_factor;
-    GLfloat offset_units;
-    ::glGetFloatv(GL_POLYGON_OFFSET_FACTOR, &offset_factor);
-    ::glGetFloatv(GL_POLYGON_OFFSET_UNITS, &offset_units);
-
-    ::glPolygonOffset(-1.f, 1.f);
-    ::glBegin(GL_TRIANGLES);
-    for(Selection_set_facet::iterator
-          it = selected_facets.begin(),
-          end = selected_facets.end();
-        it != end; ++it)
-    {
-      const Kernel::Vector_3 n =
-        compute_facet_normal<Polyhedron::Facet,Kernel>(**it);
-      ::glNormal3d(n.x(),n.y(),n.z());
-
-      Polyhedron::Halfedge_around_facet_circulator
-        he = (*it)->facet_begin(),
-        cend = he;
-
-      CGAL_For_all(he,cend)
-      {
-        const Kernel::Point_3& p = he->vertex()->point();
-        ::glVertex3d(p.x(),p.y(),p.z());
-      }
-    }
-    ::glEnd();
-    ::glPolygonOffset(offset_factor, offset_units);
-  }
-  void draw_selected_edges() const {
-    GLboolean enable_back_lighting = glIsEnabled(GL_LIGHTING);
-    glDisable(GL_LIGHTING);
-
-    CGALglcolor(edge_color);
-    ::glLineWidth(3.f);
-    ::glBegin(GL_LINES);
-    for(Selection_set_edge::iterator it = selected_edges.begin(); it != selected_edges.end(); ++it) {
-      const Kernel::Point_3& a = (it->halfedge())->vertex()->point();
-      const Kernel::Point_3& b = (it->halfedge())->opposite()->vertex()->point();
-      ::glVertex3d(a.x(),a.y(),a.z());
-      ::glVertex3d(b.x(),b.y(),b.z());
-    }
-    ::glEnd();
-
-    if(enable_back_lighting) { glEnable(GL_LIGHTING); }
-  }
-
-  bool supportsRenderingMode(RenderingMode m) const { return (m==Flat); }
-
-  bool isEmpty() const {
-    return selected_vertices.empty() && selected_edges.empty() && selected_facets.empty();
-  }
-  Bbox bbox() const 
-  {
-    // Workaround a bug in g++-4.8.3:
-    //   http://stackoverflow.com/a/21755207/1728537
-    // Using boost::make_optional to copy-initialize 'item_bbox' hides the
-    //   warning about '*item_bbox' not being initialized.
-    // -- Laurent Rineau, 2014/10/30
-    boost::optional<CGAL::Bbox_3> item_bbox
-      = boost::make_optional(false, CGAL::Bbox_3());
-
-    for(Selection_set_vertex::const_iterator v_it = selected_vertices.begin(); 
-        v_it != selected_vertices.end(); ++v_it) {
-
-      if(item_bbox) { *item_bbox = *item_bbox + (*v_it)->point().bbox(); }
-      else          {  item_bbox = (*v_it)->point().bbox(); }
-    }
-
-    for(Selection_set_edge::const_iterator e_it = selected_edges.begin(); 
-        e_it != selected_edges.end(); ++e_it) {
-        CGAL::Bbox_3 e_bbox = e_it->halfedge()->vertex()->point().bbox();
-        e_bbox = e_bbox + e_it->halfedge()->opposite()->vertex()->point().bbox();
-        if(item_bbox) { *item_bbox = *item_bbox + e_bbox; }
-        else          {  item_bbox = e_bbox; }
-    }
-
-    for(Selection_set_facet::const_iterator f_it = selected_facets.begin(); 
-        f_it != selected_facets.end(); ++f_it) {
-
-        Polyhedron::Halfedge_around_facet_circulator he = (*f_it)->facet_begin(), cend = he;
-        CGAL_For_all(he,cend) {
-          if(item_bbox) { *item_bbox = *item_bbox + he->vertex()->point().bbox(); }
-          else          {  item_bbox = he->vertex()->point().bbox(); }
-        }
-    }
-
-    if(!item_bbox) { return Bbox(); }
-    return Bbox(item_bbox->xmin(),item_bbox->ymin(),item_bbox->zmin(),
-                item_bbox->xmax(),item_bbox->ymax(),item_bbox->zmax());
-  }
-
-  bool save(const std::string& file_name) const {
-    // update id fields before using
-    if(selected_vertices.size() > 0) { poly_item->update_vertex_indices();   }
-    if(selected_facets.size() > 0)   { poly_item->update_facet_indices();    }
-    if(selected_edges.size() > 0)    { poly_item->update_halfedge_indices(); }
-
-    std::ofstream out(file_name.c_str());
-    if(!out) { return false; }
-
-    for(Selection_set_vertex::const_iterator it = selected_vertices.begin(); it != selected_vertices.end(); ++it) 
-    { out << (*it)->id() << " "; }
-    out << std::endl;
-
-    for(Selection_set_facet::const_iterator it = selected_facets.begin(); it != selected_facets.end(); ++it) 
-    { out << (*it)->id() << " "; }
-    out << std::endl;
-
-    for(Selection_set_edge::const_iterator it = selected_edges.begin(); it != selected_edges.end(); ++it) 
-    { out << it->id() << " "; }
-    out << std::endl;
-    return true;
-  }
-  bool load(const std::string& file_name) {
-    file_name_holder = file_name;
-    return true;
-  }
-  // this function is called by selection_plugin, since at the time of the call of load(...) 
-  // we do not have access to selected polyhedron item
-  bool actual_load(Scene_polyhedron_item* poly_item, QMainWindow* mw) 
-  {
-    init(poly_item, mw);
-
-    std::vector<Vertex_handle> all_vertices;
-    all_vertices.reserve(polyhedron()->size_of_vertices());
-    Polyhedron::Vertex_iterator vb(polyhedron()->vertices_begin()), ve(polyhedron()->vertices_end());
-    for(;vb != ve; ++vb) { all_vertices.push_back(vb); }
-    
-    std::vector<Facet_handle> all_facets;
-    all_facets.reserve(polyhedron()->size_of_facets());
-    Polyhedron::Facet_iterator fb(polyhedron()->facets_begin()), fe(polyhedron()->facets_end());
-    for(;fb != fe; ++fb) { all_facets.push_back(fb); }
-
-    std::vector<edge_descriptor> all_edges(edges(*polyhedron()).first, edges(*polyhedron()).second);
-
-    std::ifstream in(file_name_holder.c_str());
-    if(!in) { return false; }
-
-    std::string line;
-    std::size_t id;
-
-    if(!std::getline(in, line)) { return true; }
-    std::istringstream vertex_line(line);
-    while(vertex_line >> id) {
-      if(id >= all_vertices.size()) { return false; }
-      selected_vertices.insert(all_vertices[id]);
-    }
-
-    if(!std::getline(in, line)) { return true; }
-    std::istringstream facet_line(line);
-    while(facet_line >> id) {
-      if(id >= all_facets.size()) { return false; }
-      selected_facets.insert(all_facets[id]);
-    }
-
-    if(!std::getline(in, line)) { return true; }
-    std::istringstream edge_line(line);
-    while(edge_line >> id) {
-      if(id >= all_edges.size()) { return false; }
-      selected_edges.insert(all_edges[id]);
-    }
-    return true;
-  }
-
-  // select all of `active_handle_type`(vertex, facet or edge)
-  void select_all() {
-    switch(get_active_handle_type()) {
-    case Active_handle::VERTEX:
-      select_all<Vertex_handle>(); break;
-    case Active_handle::FACET:
-      select_all<Facet_handle>(); break;
-    case Active_handle::EDGE:
-      selected_edges.insert(edges(*polyhedron()).first, edges(*polyhedron()).second);
-    }
-  }
-  // select all of vertex, facet or edge (use Vertex_handle, Facet_handle, edge_descriptor as template argument)
-  template<class HandleType>
-  void select_all() {
-    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
-    Tr tr(this);
-    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
-      tr.container().insert(*it);
-    }
-    emit itemChanged();
-  }
-
-  // clear all of `active_handle_type`(vertex, facet or edge)
-  void clear() {
-    switch(get_active_handle_type()) {
-    case Active_handle::VERTEX:
-      clear<Vertex_handle>(); break;
-    case Active_handle::FACET:
-      clear<Facet_handle>(); break;
-    case Active_handle::EDGE:
-      clear<edge_descriptor>(); break;
-    }
-  }
-  // select all of vertex, facet or edge (use Vertex_handle, Facet_handle, edge_descriptor as template argument)
-  template<class HandleType>
-  void clear() {
-
-    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
-    tr.container().clear();
-    emit itemChanged();
-  }
-
-  boost::optional<std::size_t> get_minimum_isolated_component() {
-    switch(get_active_handle_type()) {
-    case Active_handle::VERTEX:
-      return get_minimum_isolated_component<Vertex_handle>();
-    case Active_handle::FACET:
-      return get_minimum_isolated_component<Facet_handle>();
-    default:
-      return get_minimum_isolated_component<edge_descriptor>();
-    }
-  }
-  template<class HandleType> // use Vertex_handle, Facet_handle, edge_descriptor
-  boost::optional<std::size_t> get_minimum_isolated_component() {
-    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
-    tr.update_indices();
-    Travel_isolated_components::Minimum_visitor visitor;
-    Travel_isolated_components().travel<HandleType>
-      (tr.iterator_begin(), tr.iterator_end(), tr.size(), tr.container(), visitor);
-    return visitor.minimum;
-  }
-
-  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
-    switch(get_active_handle_type()) {
-    case Active_handle::VERTEX:
-      return select_isolated_components<Vertex_handle>(threshold);
-    case Active_handle::FACET:
-      return select_isolated_components<Facet_handle>(threshold);
-    default:
-      return select_isolated_components<edge_descriptor>(threshold);
-    }
-  }
-  template<class HandleType> // use Vertex_handle, Facet_handle, edge_descriptor
-  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
-    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
-    Tr tr(this);
-    tr.update_indices();
-    typedef std::insert_iterator<typename Tr::Container> Output_iterator;
-    Output_iterator out(tr.container(), tr.container().begin());
-
-    Travel_isolated_components::Selection_visitor<Output_iterator> visitor(threshold , out);
-    Travel_isolated_components().travel<HandleType>
-      (tr.iterator_begin(), tr.iterator_end(), tr.size(), tr.container(), visitor);
-
-    if(visitor.any_inserted) { emit itemChanged(); }
-    return visitor.minimum_visitor.minimum;
-  }
-
-  void dilate_or_erode(int steps) {
-    if (steps>0)
-    {
-      switch(get_active_handle_type()) {
-        case Active_handle::VERTEX:
-          dilate_selection<Vertex_handle>(steps);
-        break;
-        case Active_handle::FACET:
-          dilate_selection<Facet_handle>(steps);
-        break;
-        default:
-          dilate_selection<edge_descriptor>(steps);
-      }
-    }
-    else
-    {
-      switch(get_active_handle_type()) {
-        case Active_handle::VERTEX:
-          erode_selection<Vertex_handle>(-steps);
-        break;
-        case Active_handle::FACET:
-          erode_selection<Facet_handle>(-steps);
-        break;
-        default:
-          erode_selection<edge_descriptor>(-steps);
-      }
-    }
-  }
-
-  template <class Handle>
-  struct Is_selected_property_map{
-    std::vector<bool>& is_selected;
-    Is_selected_property_map(std::vector<bool>& is_selected)
-      : is_selected( is_selected) {}
-
-    template<class H>
-    std::size_t id(H h){ return h->id(); }
-    std::size_t id(edge_descriptor ed) { return ed.halfedge()->id()/2; }
-
-    friend bool get(Is_selected_property_map map, Handle h)
-    {
-      return map.is_selected[map.id(h)];
-    }
-
-    friend void put(Is_selected_property_map map, Handle h, bool b)
-    {
-      map.is_selected[map.id(h)]=b;
-    }
-  };
-
-  template <class Handle>
-  void dilate_selection(unsigned int steps) {
-
-    typedef Selection_traits<Handle, Scene_polyhedron_selection_item> Tr;
-    Tr tr(this);
-
-    tr.update_indices();
-    std::vector<bool> mark(tr.size(),false);
-
-    BOOST_FOREACH(Handle h,tr.container())
-      mark[tr.id(h)]=true;
-
-    Tr::dilate_selection(
-      tr.container(),
-      *this->poly_item->polyhedron(),
-      steps,
-      Is_selected_property_map<Handle>(mark),
-      CGAL::Emptyset_iterator()
-    );
-
-    bool any_change = false;
-    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
-      if(mark[tr.id(*it)]) {
-        any_change |= tr.container().insert(*it).second;
-      }
-    }
-    if(any_change) { emit itemChanged(); }
-  }
-
-  template <class Handle>
-  void erode_selection(unsigned int steps) {
-
-    typedef Selection_traits<Handle, Scene_polyhedron_selection_item> Tr;
-    Tr tr(this);
-
-    tr.update_indices();
-    std::vector<bool> mark(tr.size(),false);
-
-    BOOST_FOREACH(Handle h,tr.container())
-      mark[tr.id(h)]=true;
-
-    Tr::erode_selection(
-      tr.container(),
-      *this->poly_item->polyhedron(),
-      steps,
-      Is_selected_property_map<Handle>(mark),
-      CGAL::Emptyset_iterator()
-    );
-
-    bool any_change = false;
-    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
-      if(!mark[tr.id(*it)]) {
-        any_change |= (tr.container().erase(*it)!=0);
-      }
-    }
-    if(any_change) { emit itemChanged(); }
-  }
-
-  void erase_selected_facets() {
-    if(selected_facets.empty()) {return;}
-    // no-longer-valid vertices and edges will be handled when item_about_to_be_changed() 
-
-    // erase facets from poly
-    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
-      polyhedron()->erase_facet((*fb)->halfedge());
-    }
-    selected_facets.clear();
-    changed_with_poly_item();
-  }
-
-  bool export_selected_facets_as_polyhedron(Polyhedron* out) {
-    // Note: might be a more performance wise solution
-    // assign sequential id to vertices neighbor to selected facets
-    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
-      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
-      do {
-        hb->vertex()->id() = 0;
-      } while(++hb != hend);
-    }
-    // construct point vector
-    std::vector<Polyhedron::Point_3> points;
-    points.reserve(selected_facets.size());
-    std::size_t counter = 1;
-    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
-      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
-      do {
-        if(hb->vertex()->id() == 0) {
-          hb->vertex()->id() = counter++; 
-          points.push_back(hb->vertex()->point());
-        }
-      } while(++hb != hend);
-    }
-    // construct polygon vector
-    std::vector<std::vector<std::size_t> > polygons(selected_facets.size());
-    counter = 0;
-    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb, ++counter) {
-      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
-      do {
-        polygons[counter].push_back(hb->vertex()->id() -1);
-      } while(++hb != hend);
-    }
-    CGAL::polygon_soup_to_polyhedron_3(*out, points, polygons);
-    return out->size_of_vertices() > 0;
-  }
-
-  void changed_with_poly_item() {
-    // no need to update indices
-    poly_item->changed();
-    emit itemChanged();
-  }
-
-public slots:
-  void changed() {
-    // do not use decorator function, which calls changed on poly_item which cause deletion of AABB
-  }
-  // slots are called by signals of polyhedron_k_ring_selector
-  void selected(const std::set<Polyhedron::Vertex_handle>& m)
-  { has_been_selected(m); }
-  void selected(const std::set<Polyhedron::Facet_handle>& m)
-  { has_been_selected(m); }
-  void selected(const std::set<edge_descriptor>& m)
-  { has_been_selected(m); }
-  void poly_item_changed() {
-    remove_erased_handles<Vertex_handle>();
-    remove_erased_handles<edge_descriptor>();
-    remove_erased_handles<Facet_handle>();
-  }
-
-protected:
-  bool eventFilter(QObject* /*target*/, QEvent * gen_event)
-  {
-    if(!visible() || !k_ring_selector.state.shift_pressing) { return false; }
-    if(gen_event->type() == QEvent::Wheel)
-    {
-      QWheelEvent *event = static_cast<QWheelEvent*>(gen_event);
-      int steps = event->delta() / 120;
-      dilate_or_erode(steps);
-      return true;
-    }
-    return false;
-  }
-
-  template<class HandleType>
-  void remove_erased_handles() {
-    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
-    Tr tr(this);
-    if(tr.container().empty()) { return;}
-
-    std::vector<HandleType> exists;
-    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
-      if(tr.container().count(*it)) {
-        exists.push_back(*it);
-      }
-    }
-    tr.container().clear();
-    for(typename std::vector<HandleType>::iterator it = exists.begin(); it != exists.end(); ++it) {
-      tr.container().insert(*it);
-    }
-  }
-
-  template<class HandleType>
-  void has_been_selected(const std::set<HandleType>& selection)
-  {
-    if(!visible()) { return; }
-    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
-
-    bool any_change = false;
-    if(is_insert) {
-      BOOST_FOREACH(HandleType h, selection)
-        any_change |= tr.container().insert(h).second;
-    }
-    else{
-      BOOST_FOREACH(HandleType h, selection)
-        any_change |= (tr.container().erase(h)!=0);
-    }
-    if(any_change) { emit itemChanged(); }
-  }
-
-// members
-  std::string file_name_holder;
-  Scene_polyhedron_item_k_ring_selection k_ring_selector;
-  // action state
-  bool is_insert;
-
-public:
-// selection
-  Selection_set_vertex selected_vertices;
-  Selection_set_facet  selected_facets;
-  Selection_set_edge   selected_edges; // stores one halfedge for each pair (halfedge with minimum address)
-// 
-  QColor vertex_color, facet_color, edge_color;
-};
-
-#endif 
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.cpp
deleted file mode 100644
index 0f5ed79..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "Scene_polyhedron_transform_item.h"
-#include "Kernel_type.h"
-#include "Polyhedron_type.h"
-
-Scene_polyhedron_transform_item::Scene_polyhedron_transform_item(const qglviewer::Vec& pos,const Scene_polyhedron_item* poly_item_,const Scene_interface*):
-  poly_item(poly_item_),
-  manipulable(false),
-  frame(new ManipulatedFrame()),
-  poly(poly_item->polyhedron()),
-  center_(pos) { frame->setPosition(pos); }
-
-void Scene_polyhedron_transform_item::draw() const{
-  glPushMatrix();
-  glMultMatrixd(frame->matrix());
-  direct_draw_edges();
-  //Scene_item_with_display_list::draw();
-  glPopMatrix();  
-}
-    
-void Scene_polyhedron_transform_item::direct_draw_edges() const {
-  typedef Kernel::Point_3		Point;
-  typedef Polyhedron::Edge_const_iterator	Edge_iterator;
-
-  ::glDisable(GL_LIGHTING);
-  ::glBegin(GL_LINES);
-  Edge_iterator he;
-  for(he = poly->edges_begin();
-      he != poly->edges_end();
-      he++)
-  {
-    const Point& a = he->vertex()->point();
-    const Point& b = he->opposite()->vertex()->point();
-    ::glVertex3d(a.x()-center_.x,a.y()-center_.y,a.z()-center_.z);
-    ::glVertex3d(b.x()-center_.x,b.y()-center_.y,b.z()-center_.z);
-  }
-  ::glEnd();
-  ::glEnable(GL_LIGHTING);
-}
-QString Scene_polyhedron_transform_item::toolTip() const {
-  return QObject::tr("<p>Affine transformation of <b>%1</b></p>"
-                     "<p>Keep <b>Ctrl</b> pressed and use the arcball to define an affine transformation.<br />"
-                     "Press <b>S</b> to apply the affine transformation to a copy of <b>%1</b>.</p>")
-    .arg(getBase()->name());
-}
-bool Scene_polyhedron_transform_item::keyPressEvent(QKeyEvent* e){
-  if (e->key()==Qt::Key_S){
-    emit stop();
-    return true;
-  }
-  return false;
-}
-
-Scene_polyhedron_transform_item::Bbox
-Scene_polyhedron_transform_item::bbox() const {
-  const Kernel::Point_3& p = *(poly->points_begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Polyhedron::Point_const_iterator it = poly->points_begin();
-      it != poly->points_end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-#include "Scene_polyhedron_transform_item.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.h
deleted file mode 100644
index 7e7f180..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef SCENE_POLYHEDRON_TRANSFORM_ITEM_H
-#define SCENE_POLYHEDRON_TRANSFORM_ITEM_H
-
-#include "Scene_polyhedron_item.h"
-#include "Scene_polyhedron_transform_item_config.h"
-#include <QGLViewer/manipulatedFrame.h>
-#include <QGLViewer/qglviewer.h>
-#include <QKeyEvent>
-
-// This class represents a polyhedron in the OpenGL scene
-class SCENE_POLYHEDRON_TRANSFORM_ITEM_EXPORT Scene_polyhedron_transform_item 
-  : public Scene_item {
-//  : public Scene_item_with_display_list {
-  Q_OBJECT
-    
-  typedef Scene_polyhedron_item Base;
-    
-public: 
-  Scene_polyhedron_transform_item(const qglviewer::Vec& pos,const Scene_polyhedron_item* poly_item,const Scene_interface* scene_interface);
-  void direct_draw_edges() const;
-  Scene_item* clone() const{return NULL;}
-  QString toolTip() const;
-  void direct_draw() const {}
-  void draw() const;
-  Bbox bbox() const;
-  ~Scene_polyhedron_transform_item() {delete frame; emit killed();}
-
-  bool manipulatable() const { return manipulable; }
-  ManipulatedFrame* manipulatedFrame() { return frame; }
-  void setManipulatable(bool b = true) { manipulable = b;}
-  const Scene_polyhedron_item* getBase() const{ return poly_item;  };
-  const qglviewer::Vec& center() const { return center_; }
-  virtual bool supportsRenderingMode(RenderingMode m) const { return m==Wireframe ; }
-  
-  virtual bool keyPressEvent(QKeyEvent*);
-  
-private:
-  const Scene_polyhedron_item* poly_item;
-  bool manipulable;
-  qglviewer::ManipulatedFrame* frame;
-  const Polyhedron* poly;
-  qglviewer::Vec center_;
-  
-signals:
-  void stop();
-  void killed();
-}; // end class Scene_polyhedron_transform_item
-
-#endif // SCENE_POLYHEDRON_TRANSFORM_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.cpp
deleted file mode 100644
index c7df027..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-#include "Scene_polylines_item.h"
-
-#include <CGAL/bounding_box.h>
-#include <CGAL/gl.h>
-#include <CGAL/glu.h>
-#include <QMenu>
-#include <QAction>
-
-#include <QInputDialog>
-
-namespace {
-  void CGALglcolor(QColor c, int dv = 0)
-  {
-    if ( 0 != dv )
-    {
-// workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define darker dark
-#endif
-      c = c.darker(dv);
-#undef darker
-    }
-    ::glColor4d(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-  }
-}
-
-class Scene_polylines_item_private {
-public:
-  typedef Scene_polylines_item::K K;
-  typedef K::Point_3 Point_3;
-
-  Scene_polylines_item_private() :
-    draw_extremities(false),
-    spheres_drawn_radius(0),
-    sphere_display_list(0),
-    quadric(0)
-  {}
-
-  ~Scene_polylines_item_private()
-  {
-    if(quadric != 0)
-      gluDeleteQuadric(quadric);
-    if(sphere_display_list  != 0)
-      glDeleteLists(sphere_display_list, 1);
-  }
-
-  void draw_sphere(const K::Point_3&, double) const;
-  void draw_spheres(const Scene_polylines_item*) const;
-
-  bool draw_extremities;
-  double spheres_drawn_radius;
-private:
-  mutable GLuint sphere_display_list;
-  mutable GLUquadric* quadric;
-};
-
-Scene_polylines_item::Scene_polylines_item() 
-  : d(new Scene_polylines_item_private())
-{
-
-}
-
-Scene_polylines_item::~Scene_polylines_item()
-{
-  delete d;
-}
-
-bool
-Scene_polylines_item::isEmpty() const {
-  return polylines.empty();
-}
-
-Scene_interface::Bbox 
-Scene_polylines_item::bbox() const {
-  if(isEmpty())
-    return Bbox();
-  std::list<Point_3> boxes;
-  for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
-      it != polylines.end();
-      ++it){
-    if(it->begin() != it->end()) {
-      Iso_cuboid_3 cub = CGAL::bounding_box(it->begin(), it->end());
-      boxes.push_back((cub.min)());
-      boxes.push_back((cub.max)());
-    }
-  }
-  Iso_cuboid_3 bbox = 
-    boxes.begin() != boxes.end() ?
-    CGAL::bounding_box(boxes.begin(), boxes.end()) :
-    Iso_cuboid_3();
-
-  return Bbox(bbox.xmin(),
-              bbox.ymin(),
-              bbox.zmin(),
-              bbox.xmax(),
-              bbox.ymax(),
-              bbox.zmax());
-}
-
-Scene_polylines_item* 
-Scene_polylines_item::clone() const {
-  Scene_polylines_item* item = new Scene_polylines_item;
-  item->polylines = polylines;
-  QVariant metadata_variant = property("polylines metadata");
-  if(metadata_variant.type() == QVariant::StringList)
-  {
-    item->setProperty("polylines metadata", metadata_variant);
-  }
-  return item;
-}
-
-QString
-Scene_polylines_item::toolTip() const {
-  QString s = 
-    tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
-       "<i>Polylines</i></p>"
-       "<p>Number of polylines: %4</p>")
-    .arg(this->name())
-    .arg(this->renderingModeName())
-    .arg(this->color().name())
-    .arg(polylines.size());
-  if(d->draw_extremities) {
-    s += tr("<p>Legende of endpoints colors: <ul>"
-            "<li>black: one incident polyline</li>"
-            "<li>green: two incident polylines</li>"
-            "<li>blue: three incident polylines</li>"
-            "<li>red: four incident polylines</li>"
-            "<li>fuchsia: five or more incident polylines</li>"
-            "</ul></p>");
-  }
-  return s;
-}
-
-bool
-Scene_polylines_item::supportsRenderingMode(RenderingMode m) const {
-    return (m == Wireframe || 
-            m == FlatPlusEdges ||
-            m == Points);
-}
-
-// Shaded OpenGL drawing: only draw spheres
-void
-Scene_polylines_item::draw() const {
-  if(d->draw_extremities)
-    d->draw_spheres(this);
-}
-
-// Wireframe OpenGL drawing
-void 
-Scene_polylines_item::draw_edges() const {
-  CGALglcolor(this->color());
-  ::glBegin(GL_LINES);
-  for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
-      it != polylines.end();
-      ++it){
-    if(it->empty()) continue;
-    for(size_t i = 0, end = it->size()-1;
-        i < end; ++i)
-    {
-      const Point_3& a = (*it)[i];
-      const Point_3& b = (*it)[i+1];
-      ::glVertex3d(a.x(), a.y(), a.z());
-      ::glVertex3d(b.x(), b.y(), b.z());
-    }
-  }
-  ::glEnd();
-  if(d->draw_extremities)
-  {
-    d->draw_spheres(this);
-  }
-}
-
-void 
-Scene_polylines_item::draw_points() const {
-  ::glBegin(GL_POINTS);
-  // draw all points but endpoints
-  for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
-      it != polylines.end();
-      ++it)
-  {
-    if(it->empty()) continue;
-    for(size_t i = 1, end = it->size()-1;
-        i < end; ++i)
-    {
-      const Point_3& a = (*it)[i];
-      ::glVertex3d(a.x(), a.y(), a.z());
-    }
-  }
-  ::glEnd();
-
-  ::glColor3d(1., 0., 0.); //red
-  // draw endpoints
-  ::glBegin(GL_POINTS);
-  for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
-      it != polylines.end();
-      ++it){
-    if(it->empty()) continue;
-    const Point_3& a = (*it)[0];
-    const Point_3& b = (*it)[it->size()-1];
-    ::glVertex3d(a.x(), a.y(), a.z());
-    ::glVertex3d(b.x(), b.y(), b.z());
-  }
-  ::glEnd();
-}
-
-void
-Scene_polylines_item_private::
-draw_spheres(const Scene_polylines_item* item) const {
-  // FIRST, count the number of incident cycles and polylines
-  // for all extremities.
-  typedef std::map<Point_3, int> Point_to_int_map;
-  typedef Point_to_int_map::iterator iterator;
-  Point_to_int_map corner_polyline_nb;
-
-  { // scope to fill corner_polyline_nb'
-    Point_to_int_map corner_cycles_nb;
-
-    for(std::list<std::vector<Point_3> >::const_iterator 
-          it = item->polylines.begin(),
-          end = item->polylines.end();
-        it != end; ++it)
-    {
-      const K::Point_3& a = *it->begin();
-      const K::Point_3& b = *it->rbegin();
-      if(a == b) {
-        if ( it->size()>1 )
-          ++corner_cycles_nb[a];
-        else
-          ++corner_polyline_nb[a];  
-      }
-      else {
-        ++corner_polyline_nb[a];
-        ++corner_polyline_nb[b];
-      }
-    }
-    // THEN, ignore points that are incident to one cycle only.
-    for(iterator 
-          c_it = corner_cycles_nb.begin(),
-          end = corner_cycles_nb.end();
-        c_it != end; ++c_it)
-    {
-      const Point_3& a = c_it->first;
-
-      iterator p_it = corner_polyline_nb.find(a);
-
-      // If the point 'a'=c_it->first has only incident cycles...
-      if(p_it == corner_polyline_nb.end()) {
-        // ...then count it as a corner only if it has two incident cycles
-        // or more.
-        if(c_it->second > 1) {
-          corner_polyline_nb[a] = c_it->second;
-        }
-      } else {
-        // else add the number of cycles.
-        p_it->second += c_it->second;
-      }
-    }
-  }
-  // At this point, 'corner_polyline_nb' gives the multiplicity of all
-  // corners.
-  for(iterator 
-        p_it = corner_polyline_nb.begin(),
-        end = corner_polyline_nb.end();
-      p_it != end; ++p_it)
-  {
-    switch(p_it->second) {
-    case 1: 
-      ::glColor3d(0.0, 0.0, 0.0); // black
-      break;
-    case 2:
-      ::glColor3d(0.0, 0.8, 0.0); // green
-      break;
-    case 3:
-      ::glColor3d(0.0, 0.0, 0.8); // blue
-      break;
-    case 4:
-      ::glColor3d(0.8, 0.0, 0.0); //red
-      break;
-    default:
-      ::glColor3d(0.8, 0.0, 0.8); //fuschia
-    }
-    this->draw_sphere(p_it->first, this->spheres_drawn_radius);
-  }
-}
-
-void 
-Scene_polylines_item_private::draw_sphere(const K::Point_3& p,
-                                          double r) const 
-{
-  if(sphere_display_list == 0) {
-    sphere_display_list = glGenLists(1);
-    if(sphere_display_list == 0)
-      std::cerr << "ERROR: Cannot create display list!\n";
-    if(quadric == 0)
-      quadric = gluNewQuadric();
-    if(quadric == 0)
-      std::cerr << "ERROR: Cannot create GLU quadric!\n";
-    glNewList(sphere_display_list, GL_COMPILE);
-    gluSphere(quadric, 1., 10, 10);
-    glEndList();
-    if(glGetError() != GL_NO_ERROR)
-      std::cerr << gluErrorString(glGetError());
-  }
-  glPushMatrix();
-  glTranslated(CGAL::to_double(p.x()),
-               CGAL::to_double(p.y()),
-               CGAL::to_double(p.z()));
-
-  glScaled(r, r, r);
-  glCallList(sphere_display_list);
-  glPopMatrix();
-}
-
-QMenu* Scene_polylines_item::contextMenu() 
-{
-  const char* prop_name = "Menu modified by Scene_polylines_item.";
-
-  QMenu* menu = Scene_item::contextMenu();
-
-  // Use dynamic properties:
-  // http://doc.trolltech.com/lastest/qobject.html#property
-  bool menuChanged = menu->property(prop_name).toBool();
-
-  if(!menuChanged) {
-    menu->addSeparator();
-    // TODO: add actions to display corners
-    QAction* action = menu->addAction(tr("Display corners with radius..."));
-    connect(action, SIGNAL(triggered()),
-            this, SLOT(change_corner_radii()));
-
-    QAction* actionSmoothPolylines = 
-      menu->addAction(tr("Smooth polylines"));
-    actionSmoothPolylines->setObjectName("actionSmoothPolylines");
-    connect(actionSmoothPolylines, SIGNAL(triggered()),this, SLOT(smooth()));
-    menu->setProperty(prop_name, true);
-  }
-  return menu;
-}
-
-void Scene_polylines_item::change_corner_radii() {
-  bool ok = true;
-  double proposed_radius = d->spheres_drawn_radius;
-  if(proposed_radius == 0) {
-    Scene_interface::Bbox b = bbox();
-    proposed_radius = (std::max)(b.xmax - b.xmin,
-                                 proposed_radius);
-    proposed_radius = (std::max)(b.ymax - b.ymin,
-                                 proposed_radius);
-    proposed_radius = (std::max)(b.zmax - b.zmin,
-                                 proposed_radius);
-    proposed_radius /= 100;
-  }
-  double r = QInputDialog::getDouble(NULL, 
-                                     tr("Display corners with new radius..."),
-                                     tr("Radius:"),
-                                     proposed_radius, // value
-                                     0.,          // min 
-                                     2147483647., // max
-                                     10,          // decimals
-                                     &ok);
-  if(ok) {
-    change_corner_radii(r);
-  }
-}
-
-void Scene_polylines_item::change_corner_radii(double r) {
-  if(r >= 0) {
-    d->spheres_drawn_radius = r;
-    d->draw_extremities = (r > 0);
-    this->changed();
-    emit itemChanged();
-  }
-}
-
-void Scene_polylines_item::split_at_sharp_angles()
-{
-  typedef Polylines_container Bare_polyline_container;
-  typedef Polyline Bare_polyline;
-  Polylines_container& bare_polylines = polylines;
-
-  int counter = 0;
-  for(Bare_polyline_container::iterator
-        bare_polyline_it = bare_polylines.begin();
-      bare_polyline_it != bare_polylines.end(); // the end changes
-      // during the loop
-      ++counter /* bare_polyline_it is incremented in the loop */)
-  {
-    Bare_polyline_container::iterator current_polyline_it = 
-        bare_polyline_it;
-    Bare_polyline& bare_polyline = *bare_polyline_it;
-    Bare_polyline::iterator it = boost::next(bare_polyline.begin());
-
-    if(boost::next(bare_polyline.begin()) == bare_polyline.end())
-    {
-      std::cerr << "WARNING: Isolated point in polylines\n";
-      bare_polyline_it = bare_polylines.erase(bare_polyline_it);
-      continue;
-    }
-    else 
-      ++bare_polyline_it;
-    if(it != bare_polyline.end()) {
-      for(; it != boost::prior(bare_polyline.end()); ++it) {
-        const Point_3 pv = *it;
-        const Point_3 pa = *boost::prior(it);
-        const Point_3 pb = *boost::next(it);
-        const K::Vector_3 av = pv - pa;
-        const K::Vector_3 bv = pv - pb;
-        const K::FT sc_prod = av * bv;
-        if( sc_prod >= 0 ||
-            (sc_prod < 0 && 
-             CGAL::square(sc_prod) < (av * av) * (bv * bv) / 4 ) ) 
-        {
-#ifdef PROTECTION_DEBUG
-          std::cerr << "Split polyline (small angle) "
-                    <<  std::acos(sqrt(CGAL::square(sc_prod) /
-                                       ((av*av) * (bv*bv)))) * 180 /CGAL_PI
-                    << " degres\n";
-#endif
-          Bare_polyline new_polyline;
-          std::copy(it, bare_polyline.end(), 
-                    std::back_inserter(new_polyline));
-          
-          if(*bare_polyline.begin() == *bare_polyline.rbegin()) {
-            // if the polyline is a cycle, test if its beginning is a sharp
-            // angle...
-            const Point_3 pv = *bare_polyline.begin();
-            const Point_3 pa = *boost::prior(boost::prior(bare_polyline.end()));
-            const Point_3 pb = *boost::next(bare_polyline.begin());
-            const K::Vector_3 av = pv - pa;
-            const K::Vector_3 bv = pv - pb;
-            const K::FT sc_prod = av * bv;
-            if( sc_prod >= 0 ||
-                (sc_prod < 0 && 
-                 CGAL::square(sc_prod) < (av * av) * (bv * bv) / 4 ) ) 
-            {
-              // if its beginning is a sharp angle, then split
-              bare_polyline.erase(boost::next(it), bare_polyline.end());
-            }
-            else {
-              // ...if not, modifies its beginning
-              std::copy(boost::next(bare_polyline.begin()),
-                        boost::next(it),
-                        std::back_inserter(new_polyline));
-              bare_polylines.erase(current_polyline_it);
-            }
-          }
-          else {
-            bare_polyline.erase(boost::next(it), bare_polyline.end());
-          }
-          bare_polylines.push_back(new_polyline);
-          break;
-        }
-      }
-    }
-  }
-  emit itemChanged();
-}
-
-void
-Scene_polylines_item::merge(Scene_polylines_item* other_item) {
-  if(other_item == 0) return;
-  std::copy(other_item->polylines.begin(),
-            other_item->polylines.end(),
-            std::back_inserter(polylines));
-  QVariant other_metadata_variant = other_item->property("polylines metadata");
-  if(other_metadata_variant.type() == QVariant::StringList)
-  {
-    QStringList metadata = property("polylines metadata").toStringList();
-    metadata.append(other_metadata_variant.toStringList());
-    setProperty("polylines metadata", metadata);
-  }
-  changed();
-}
-
-#include "Scene_polylines_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.h
deleted file mode 100644
index a7ad624..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef SCENE_POLYLINES_ITEM_H
-#define SCENE_POLYLINES_ITEM_H
-
-#include "Scene_polylines_item_config.h"
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include "Scene_item.h"
-
-#include <QString>
-#include <QMenu>
-
-#include <list>
-#include <vector>
-
-class Scene_polylines_item_private;
-
-class SCENE_POLYLINES_ITEM_EXPORT Scene_polylines_item : public Scene_item
-{
-  Q_OBJECT
-public:
-  typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-  typedef K::Point_3 Point_3;
-  typedef std::vector<Point_3> Polyline;
-  typedef std::list<Polyline> Polylines_container;
-
-  typedef K::Iso_cuboid_3 Iso_cuboid_3;
-
-  Scene_polylines_item();
-  virtual ~Scene_polylines_item();
-
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-  Scene_polylines_item* clone() const;
-
-  QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  bool supportsRenderingMode(RenderingMode m) const;
-
-  QMenu* contextMenu();
-  
-  // Flat/Gouraud OpenGL drawing
-  void draw() const;
-
-  // Wireframe OpenGL drawing
-  void draw_edges() const;
-
-  void draw_points() const;
-  
-  void smooth(std::vector<Point_3>& polyline){
-    bool is_closed = polyline.front()==polyline.back();
-    typedef K::Vector_3 Vector_3;
-    
-    std::size_t start = is_closed ? 0:1;
-    std::size_t end   = polyline.size()-1;
-    
-    Vector_3 prev = (is_closed ? polyline[end-1] : polyline[0]) - CGAL::ORIGIN;
-    
-    for (std::size_t i=start; i!=end; ++i)
-    {
-      Vector_3 curr = polyline[i] - CGAL::ORIGIN;
-      Vector_3 next = polyline[i+1] - CGAL::ORIGIN;
-      
-      polyline[i] = CGAL::ORIGIN+(prev+2*curr+next)/4;
-      prev=curr;
-    }
-    
-    if (is_closed) polyline[end]=polyline[0];
-  }
-  
-public slots:
-  void change_corner_radii(double);
-  void change_corner_radii();
-  void split_at_sharp_angles();
-
-  void merge(Scene_polylines_item*);
-
-  void smooth(){
-    for (Polylines_container::iterator pit=polylines.begin(),pit_end=polylines.end();pit!=pit_end;++pit)
-      smooth(*pit);
-    emit itemChanged();
-  }
-public:
-  Polylines_container polylines;
-
-  // http://en.wikipedia.org/wiki/D-pointer
-  Scene_polylines_item_private* d;
-
-}; // end class Scene_polylines_item
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.cpp
deleted file mode 100644
index 11074c7..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "Scene_textured_polyhedron_item.h"
-#include "Textured_polyhedron_type.h"
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <QObject>
-#include <CGAL/gl_render.h>
-
-typedef EPIC_kernel::Point_3 Point;
-
-Scene_textured_polyhedron_item::Scene_textured_polyhedron_item()
-  : Scene_item_with_display_list(),
-    poly(new Textured_polyhedron)
-{
-  texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
-}
-
-Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(Textured_polyhedron* const p)
-  : Scene_item_with_display_list(),
-    poly(p)
-{
-  texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
-}
-
-Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(const Textured_polyhedron& p)
-  : Scene_item_with_display_list(),
-    poly(new Textured_polyhedron(p))
-{
-  texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
-}
-
-// Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(const Scene_textured_polyhedron_item& item)
-//   : Scene_item_with_display_list(item),
-//     poly(new Textured_polyhedron(*item.poly))
-// {
-// }
-
-Scene_textured_polyhedron_item::~Scene_textured_polyhedron_item()
-{
-  delete poly;
-}
-
-Scene_textured_polyhedron_item* 
-Scene_textured_polyhedron_item::clone() const {
-  return new Scene_textured_polyhedron_item(*poly);
-}
-
-// Load textured_polyhedron from .OFF file
-bool
-Scene_textured_polyhedron_item::load(std::istream& in)
-{
-  in >> *poly;
-  return in && !isEmpty();
-}
-
-// Write textured_polyhedron to .OFF file
-bool 
-Scene_textured_polyhedron_item::save(std::ostream& out) const
-{
-  out << *poly;
-  return (bool) out;
-}
-
-QString 
-Scene_textured_polyhedron_item::toolTip() const
-{
-  if(!poly)
-    return QString();
-
-  return QObject::tr("<p>Textured polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
-                     "<p>Number of vertices: %2<br />"
-                     "Number of edges: %3<br />"
-                     "Number of facets: %4</p>")
-    .arg(this->name())
-    .arg(poly->size_of_vertices())
-    .arg(poly->size_of_halfedges()/2)
-    .arg(poly->size_of_facets())
-    .arg(this->renderingModeName())
-    .arg(this->color().name());
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-void Scene_textured_polyhedron_item::direct_draw() const {
-  glTexImage2D(GL_TEXTURE_2D,
-	       0,
-	       GL_RGB,
-	       texture.GetWidth(),
-	       texture.GetHeight(),
-	       0,
-	       GL_RGB,
-	       GL_UNSIGNED_BYTE, 
-	       texture.GetData());
-  glEnable(GL_TEXTURE_2D);
-  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-  poly->gl_draw_textured_triangles(true, true, 1.0);
-  glDisable(GL_TEXTURE_2D);
-}
-
-Textured_polyhedron* 
-Scene_textured_polyhedron_item::textured_polyhedron()       { return poly; }
-const Textured_polyhedron* 
-Scene_textured_polyhedron_item::textured_polyhedron() const { return poly; }
-
-bool
-Scene_textured_polyhedron_item::isEmpty() const {
-  return (poly == 0) || poly->empty();
-}
-
-Scene_textured_polyhedron_item::Bbox
-Scene_textured_polyhedron_item::bbox() const {
-  const Point& p = *(poly->points_begin());
-  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
-  for(Textured_polyhedron::Point_iterator it = poly->points_begin();
-      it != poly->points_end();
-      ++it) {
-    bbox = bbox + it->bbox();
-  }
-  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
-              bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-#include "Scene_textured_polyhedron_item.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.h
deleted file mode 100644
index f2c9355..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef SCENE_TEXTURED_POLYHEDRON_ITEM_H
-#define SCENE_TEXTURED_POLYHEDRON_ITEM_H
-
-#include "Scene_textured_polyhedron_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "Textured_polyhedron_type_fwd.h"
-#include <iostream>
-#include "texture.h"
-
-// This class represents a textured polyhedron in the OpenGL scene
-class SCENE_TEXTURED_POLYHEDRON_ITEM_EXPORT Scene_textured_polyhedron_item 
-  : public Scene_item_with_display_list {
-  Q_OBJECT
-public:  
-  Scene_textured_polyhedron_item();
-//   Scene_textured_polyhedron_item(const Scene_textured_polyhedron_item&);
-  Scene_textured_polyhedron_item(const Textured_polyhedron& p);
-  Scene_textured_polyhedron_item(Textured_polyhedron* const p);
-  ~Scene_textured_polyhedron_item();
-
-  Scene_textured_polyhedron_item* clone() const;
-  
-  // IO
-  bool load(std::istream& in);
-  bool save(std::ostream& out) const;
-
-  // Function for displaying meta-data of the item
-  virtual QString toolTip() const;
-
-  // Indicate if rendering mode is supported
-  virtual bool supportsRenderingMode(RenderingMode m) const { return m != Splatting; }
-  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-  virtual void direct_draw() const;
-
-  // Get wrapped textured_polyhedron
-  Textured_polyhedron*       textured_polyhedron();
-  const Textured_polyhedron* textured_polyhedron() const;
-
-  // Get dimensions
-  bool isFinite() const { return true; }
-  bool isEmpty() const;
-  Bbox bbox() const;
-
-private:
-  Textured_polyhedron* poly;
-  Texture texture;
-
-}; // end class Scene_textured_polyhedron_item
-
-#endif // SCENE_TEXTURED_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Selection_widget.ui b/3rdparty/CGAL-4.6/demo/Polyhedron/Selection_widget.ui
deleted file mode 100644
index 4df56ca..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Selection_widget.ui
+++ /dev/null
@@ -1,268 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Selection</class>
- <widget class="QDockWidget" name="Selection">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>334</width>
-    <height>402</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Selection</string>
-  </property>
-  <widget class="QWidget" name="dockWidgetContents">
-   <layout class="QVBoxLayout" name="verticalLayout_5">
-    <item>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout_4">
-        <item>
-         <widget class="QLabel" name="label_2">
-          <property name="text">
-           <string>Selection &Type:</string>
-          </property>
-          <property name="buddy">
-           <cstring>Selection_type_combo_box</cstring>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="Selection_type_combo_box">
-          <item>
-           <property name="text">
-            <string>Vertex</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Facet</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Edge</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="groupBox_2">
-      <property name="title">
-       <string/>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_6">
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_2">
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_2">
-           <item>
-            <layout class="QHBoxLayout" name="horizontalLayout">
-             <item>
-              <widget class="QRadioButton" name="Insertion_radio_button">
-               <property name="text">
-                <string>Insertion</string>
-               </property>
-               <property name="checked">
-                <bool>true</bool>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QRadioButton" name="Removal_radio_button">
-               <property name="text">
-                <string>Removal</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <layout class="QVBoxLayout" name="verticalLayout_7">
-             <item>
-              <layout class="QHBoxLayout" name="horizontalLayout_6">
-               <item>
-                <widget class="QLabel" name="label">
-                 <property name="text">
-                  <string>Brush &size:</string>
-                 </property>
-                 <property name="buddy">
-                  <cstring>Brush_size_spin_box</cstring>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <widget class="QSpinBox" name="Brush_size_spin_box"/>
-               </item>
-              </layout>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_3">
-           <item>
-            <widget class="QPushButton" name="Select_all_button">
-             <property name="text">
-              <string>Select &All</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="Clear_button">
-             <property name="text">
-              <string>&Clear</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="groupBox">
-      <property name="title">
-       <string/>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_8">
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_4">
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_5">
-           <item>
-            <widget class="QLabel" name="label_3">
-             <property name="text">
-              <string>Isolated &Component Size:</string>
-             </property>
-             <property name="buddy">
-              <cstring>Threshold_size_spin_box</cstring>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QSpinBox" name="Threshold_size_spin_box">
-             <property name="maximum">
-              <number>999999999</number>
-             </property>
-             <property name="value">
-              <number>8</number>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="Get_minimum_button">
-             <property name="text">
-              <string>&Get Minimum</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <widget class="QPushButton" name="Select_isolated_components_button">
-           <property name="text">
-            <string>Select &Isolated Components Below Threshold</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="groupBox_4">
-      <property name="title">
-       <string/>
-      </property>
-      <layout class="QHBoxLayout" name="horizontalLayout_8">
-       <item>
-        <widget class="QLabel" name="label_5">
-         <property name="text">
-          <string>Dilate or erode selection:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QSpinBox" name="Dilate_erode_spin_box">
-         <property name="minimum">
-          <number>-50</number>
-         </property>
-         <property name="maximum">
-          <number>50</number>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="Dilate_erode_button">
-         <property name="text">
-          <string>Apply</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Create_point_set_item_button">
-      <property name="text">
-       <string>Create Point Set Item from Selected Vertices</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Create_polyhedron_item_button">
-      <property name="text">
-       <string>Create Polyhedron Item from Selected Facets</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Erase_selected_facets_button">
-      <property name="text">
-       <string>Erase Selected Facets from Polyhedron Item</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="Create_selection_item_button">
-      <property name="font">
-       <font>
-        <weight>75</weight>
-        <bold>true</bold>
-       </font>
-      </property>
-      <property name="text">
-       <string>Create Selection Item</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <spacer name="verticalSpacer">
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-      <property name="sizeHint" stdset="0">
-       <size>
-        <width>20</width>
-        <height>40</height>
-       </size>
-      </property>
-     </spacer>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.cpp
deleted file mode 100644
index 8d4812c..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "Show_point_dialog.h"
-#include "ui_Show_point_dialog.h"
-
-#include <QClipboard>
-
-Show_point_dialog::Show_point_dialog(QWidget* parent)
-  : QDialog(parent)
-  , ui(new Ui::Show_point_dialog)
-  , m_has_correct_coordinates(false)
-{
-  ui->setupUi(this);
-
-  QClipboard::Mode mode = QClipboard::Selection; 
-  while(true) {
-    QString clipboard_text = QApplication::clipboard()->text(mode);
-    
-    interprete_string(clipboard_text);
-    if(m_has_correct_coordinates) {
-      ui->lineEdit->setText(clipboard_text);
-      ui->lineEdit->selectAll();
-      break;
-    } else {
-      interprete_string(ui->lineEdit->text());
-    }
-    if(mode == QClipboard::Selection) mode = QClipboard::Clipboard;
-    else break;
-  }
-
-  connect(ui->lineEdit, SIGNAL(textChanged(const QString&)),
-          this, SLOT(interprete_string(const QString&)));
-}
-
-Show_point_dialog::~Show_point_dialog()
-{
-  delete ui;
-}
-
-void Show_point_dialog::interprete_string(const QString& string)
-{
-  QString double_re("([-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)");
-  QString not_double_char_re("[^0-9-+.eE]");
-  QString full_re = QString("^") 
-    + not_double_char_re + "*"
-    + double_re
-    + not_double_char_re + "+"
-    + double_re
-    + not_double_char_re + "+"
-    + double_re 
-    + "(" + not_double_char_re + "*"
-    + "|" + not_double_char_re + "+" + double_re
-    + ")"
-    + "$";
-  QRegExp re(full_re);
-  if(re.exactMatch(string)) {
-    // const double x = re.cap(1).toDouble();
-    // const double y = re.cap(2).toDouble();
-    // const double z = re.cap(3).toDouble();
-    ui->coord_x->setText(QString(re.cap(1)));
-    ui->coord_y->setText(QString(re.cap(2)));
-    ui->coord_z->setText(QString(re.cap(3)));
-    m_has_correct_coordinates = true;
-  }
-  else {
-    ui->coord_x->setText(QString());
-    ui->coord_y->setText(QString());
-    ui->coord_z->setText(QString());
-    m_has_correct_coordinates = false;
-  }
-}
-
-double Show_point_dialog::get_x() const
-{
-  return ui->coord_x->text().toDouble();
-}
-
-double Show_point_dialog::get_y() const
-{
-  return ui->coord_y->text().toDouble();
-}
-
-double Show_point_dialog::get_z() const
-{
-  return ui->coord_z->text().toDouble();
-}
-
-bool Show_point_dialog::has_correct_coordinates() const
-{
-  return m_has_correct_coordinates;
-}
-
-#include "Show_point_dialog.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.h
deleted file mode 100644
index 5a00b04..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef SHOW_POINT_DIALOG_H
-#define SHOW_POINT_DIALOG_H
-#include "config.h"
-
-#include "Point_dialog_config.h"
-
-#include <QDialog>
-
-namespace Ui {
-  class Show_point_dialog;
-}
-
-class POINT_DIALOG_EXPORT Show_point_dialog :
-  public QDialog
-{
-  Q_OBJECT
-public:
-  Show_point_dialog(QWidget* parent = 0);
-  ~Show_point_dialog();
-
-  bool has_correct_coordinates() const;
-
-  double get_x() const;
-  double get_y() const;
-  double get_z() const;
-
-protected slots:
-  void interprete_string(const QString&);
-
-protected:
-  Ui::Show_point_dialog* ui;
-  bool m_has_correct_coordinates;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.cpp
deleted file mode 100644
index 80aac8b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-#include "Viewer.h"
-#include <CGAL/gl.h>
-#include <CGAL/check_gl_error.h>
-#include "Scene_draw_interface.h"
-#include <QMouseEvent>
-#include <QKeyEvent>
-#include <QGLViewer/manipulatedCameraFrame.h>
-
-class Viewer_impl {
-public:
-  Scene_draw_interface* scene;
-  bool antialiasing;
-  bool twosides;
-  bool macro_mode;
-  bool inFastDrawing;
-
-  void draw_aux(bool with_names, Viewer*);
-};
-
-Viewer::Viewer(QWidget* parent, bool antialiasing)
-  : Viewer_interface(parent)
-{
-  d = new Viewer_impl;
-  d->scene = 0;
-  d->antialiasing = antialiasing;
-  d->twosides = false;
-  d->macro_mode = false;
-  setShortcut(EXIT_VIEWER, 0);
-  setKeyDescription(Qt::Key_T,
-                    tr("Turn the camera by 180 degrees"));
-  setKeyDescription(Qt::Key_M,
-                    tr("Toggle macro mode: useful to view details very near from the camera, "
-                       "but decrease the z-buffer precision"));
-#if QGLVIEWER_VERSION >= 0x020501
-  //modify mouse bindings that have been updated
-  setMouseBinding(Qt::Key(0), Qt::NoModifier, Qt::LeftButton, RAP_FROM_PIXEL, true, Qt::RightButton);
-  setMouseBindingDescription(Qt::ShiftModifier, Qt::RightButton,
-                             tr("Select and pop context menu"));
-  setMouseBinding(Qt::Key_R, Qt::NoModifier, Qt::LeftButton, RAP_FROM_PIXEL);
-  //use the new API for these
-  setMouseBinding(Qt::ShiftModifier, Qt::LeftButton, SELECT);
-  setMouseBindingDescription(Qt::Key(0), Qt::ShiftModifier, Qt::LeftButton,
-                             tr("Selects and display context "
-                                "menu of the selected item"));
-#else
-  setMouseBinding(Qt::SHIFT + Qt::LeftButton, SELECT);
-  setMouseBindingDescription(Qt::SHIFT + Qt::RightButton,
-                             tr("Selects and display context "
-                                "menu of the selected item"));
-#endif // QGLVIEWER_VERSION >= 2.5.0
-}
-
-Viewer::~Viewer()
-{
-  delete d;
-}
-
-void Viewer::setScene(Scene_draw_interface* scene)
-{
-  d->scene = scene;
-}
-
-bool Viewer::antiAliasing() const
-{
-  return d->antialiasing; 
-}
-
-void Viewer::setAntiAliasing(bool b)
-{
-  d->antialiasing = b;
-  updateGL();
-}
-
-void Viewer::setTwoSides(bool b)
-{
-  d->twosides = b;
-  updateGL();
-}
-
-bool Viewer::inFastDrawing() const {
-  return d->inFastDrawing;
-}
-
-void Viewer::draw()
-{
-  d->inFastDrawing = false;
-  // ::glFogf(GL_FOG_END, 2*sceneRadius());
-  // ::glEnable(GL_FOG);
-  QGLViewer::draw();
-  d->draw_aux(false, this);
-  // drawLight(GL_LIGHT0);
-}
-
-void Viewer::fastDraw()
-{
-  d->inFastDrawing = true;
-  // ::glFogf(GL_FOG_END, 2*sceneRadius());
-  // ::glEnable(GL_FOG);
-  QGLViewer::fastDraw();
-  d->draw_aux(false, this);
-  // drawLight(GL_LIGHT0);
-}
-
-void Viewer::initializeGL()
-{
-  QGLViewer::initializeGL();
-  setBackgroundColor(::Qt::white);
-  d->scene->initializeGL();
-
-  // ::glFogf(GL_FOG_DENSITY, 0.05f);
-  // ::glHint(GL_FOG_HINT, GL_NICEST);
-  // ::glFogi(GL_FOG_MODE, GL_LINEAR);
-  // static const GLfloat fogColor[] = {0.5f, 0.5f, 0.5f, 1};
-  // ::glFogfv(GL_FOG_COLOR, fogColor);
-}
-
-#include <QMouseEvent>
-
-void Viewer::mousePressEvent(QMouseEvent* event)
-{
-  if(event->button() == Qt::RightButton &&
-     event->modifiers().testFlag(Qt::ShiftModifier)) 
-  {
-    select(event->pos());
-    requestContextMenu(event->globalPos());
-    event->accept();
-  }
-  else {
-    QGLViewer::mousePressEvent(event);
-  }
-}
-
-void Viewer::keyPressEvent(QKeyEvent* e)
-{
-  if(!e->modifiers()) {
-    if(e->key() == Qt::Key_T) {
-      turnCameraBy180Degres();
-      return;
-    }
-    else if(e->key() == Qt::Key_M) {
-      d->macro_mode = ! d->macro_mode;
-      if(d->macro_mode) {
-        camera()->setZNearCoefficient(0.0005f);
-      } else {
-        camera()->setZNearCoefficient(0.005f);
-      }
-      this->displayMessage(tr("Macro mode: %1").
-                           arg(d->macro_mode ? tr("on") : tr("off")));
-      return;
-    }
-  }
-  //forward the event to the scene (item handling of the event)
-  if (! d->scene->keyPressEvent(e) )
-    QGLViewer::keyPressEvent(e);
-}
-
-void Viewer::turnCameraBy180Degres() {
-  qglviewer::Camera* camera = this->camera();
-  using qglviewer::ManipulatedCameraFrame;
-
-  ManipulatedCameraFrame frame_from(*camera->frame());
-  camera->setViewDirection(-camera->viewDirection());
-  ManipulatedCameraFrame frame_to(*camera->frame());
-
-  camera->setOrientation(frame_from.orientation());
-  camera->interpolateTo(frame_to, 0.5f);
-}
-
-void Viewer_impl::draw_aux(bool with_names, Viewer* viewer)
-{
-  if(scene == 0)
-    return;
-
-  ::glLineWidth(1.0f);
-  ::glPointSize(2.f);
-  ::glEnable(GL_POLYGON_OFFSET_FILL);
-  ::glPolygonOffset(1.0f,1.0f);
-  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
-  ::glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
-
-  if(twosides)
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  else
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
-  if(antialiasing)
-  {
-    ::glEnable(GL_BLEND);
-    ::glEnable(GL_LINE_SMOOTH);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  }
-  else
-  {
-    ::glDisable(GL_BLEND);
-    ::glDisable(GL_LINE_SMOOTH);
-    ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-    ::glBlendFunc(GL_ONE, GL_ZERO);
-  }
-  if(with_names)
-    scene->drawWithNames(viewer);
-  else
-    scene->draw(viewer);
-  CGAL::check_gl_error(__FILE__, __LINE__);
-}
-
-void Viewer::drawWithNames()
-{
-  QGLViewer::draw();
-  d->draw_aux(true, this);
-}
-
-void Viewer::postSelection(const QPoint& pixel)
-{
-  bool found = false;
-  qglviewer::Vec point = camera()->pointUnderPixel(pixel, found);
-  if(found) {
-    emit selectedPoint(point.x,
-                       point.y,
-                       point.z);
-    emit selected(this->selectedName());
-    const qglviewer::Vec orig = camera()->position();
-    const qglviewer::Vec dir = point - orig;
-    emit selectionRay(orig.x, orig.y, orig.z,
-                      dir.x, dir.y, dir.z);
-  }
-}
-
-bool Viewer_interface::readFrame(QString s, qglviewer::Frame& frame)
-{
-  QStringList list = s.split(" ", QString::SkipEmptyParts);
-  if(list.size() != 7)
-    return false;
-  float vec[3];
-  for(int i = 0; i < 3; ++i)
-  {
-    bool ok;
-    vec[i] = list[i].toFloat(&ok);
-    if(!ok) return false;
-  }
-  double orient[4];
-  for(int i = 0; i < 4; ++i)
-  {
-    bool ok;
-    orient[i] = list[i + 3].toDouble(&ok);
-    if(!ok) return false;
-  }
-  frame.setPosition(qglviewer::Vec(vec[0],
-                                   vec[1],
-                                   vec[2]));
-  frame.setOrientation(orient[0],
-                       orient[1],
-                       orient[2],
-                       orient[3]);
-  return true;
-}
-
-QString Viewer_interface::dumpFrame(const qglviewer::Frame& frame) {
-  const qglviewer::Vec pos = frame.position();
-  const qglviewer::Quaternion q = frame.orientation();
-
-  return QString("%1 %2 %3 %4 %5 %6 %7")
-    .arg(pos[0])
-    .arg(pos[1])
-    .arg(pos[2])
-    .arg(q[0])
-    .arg(q[1])
-    .arg(q[2])
-    .arg(q[3]);
-}
-
-bool Viewer::moveCameraToCoordinates(QString s, float animation_duration) {
-  qglviewer::Frame new_frame;
-  if(readFrame(s, new_frame)) {
-    camera()->interpolateTo(new_frame, animation_duration); 
-    return true;
-  }
-  else
-    return false;
-}
-
-QString Viewer::dumpCameraCoordinates()
-{
-  if(camera()->frame()) {
-    return dumpFrame(*camera()->frame());
-  } else {
-    return QString();
-  }
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.h
deleted file mode 100644
index fac50f3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include "Viewer_config.h"
-#include <CGAL_demo/Viewer_interface.h>
-
-#include <QGLViewer/qglviewer.h>
-#include <QPoint>
-
-// forward declarations
-class QWidget;
-class Scene_draw_interface;
-class QMouseEvent;
-class QKeyEvent;
-
-class Viewer_impl;
-
-class VIEWER_EXPORT Viewer : public Viewer_interface {
-
-  Q_OBJECT
-
-public:
-  Viewer(QWidget * parent, bool antialiasing = false);
-  ~Viewer();
-
-  // overload several QGLViewer virtual functions
-  void draw();
-  void fastDraw();
-  void initializeGL();
-  void drawWithNames();
-  void postSelection(const QPoint&);
-
-  void setScene(Scene_draw_interface* scene);
-  bool antiAliasing() const;
-
-  bool inFastDrawing() const;
-public slots:
-  void setAntiAliasing(bool b);
-  void setTwoSides(bool b);
-
-  void turnCameraBy180Degres();
-
-  QString dumpCameraCoordinates();
-  bool moveCameraToCoordinates(QString, 
-                               float animation_duration = 0.5f);
-
-protected:
-  void mousePressEvent(QMouseEvent*);
-  void keyPressEvent(QKeyEvent*);
-
-protected:
-  Viewer_impl* d;
-}; // end class Viewer
-
-#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer_config.h b/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer_config.h
deleted file mode 100644
index 2a79ddf..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/Viewer_config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef VIEWER_CONFIG_H
-#define VIEWER_CONFIG_H
-
-#include <QtCore/qglobal.h>
-
-#ifdef demo_framework_EXPORTS
-#  define viewer_EXPORTS
-#endif
-
-#ifdef viewer_EXPORTS
-#  define VIEWER_EXPORT Q_DECL_EXPORT
-#else
-#  define VIEWER_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // VIEWER_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/CMakeLists.txt
deleted file mode 100644
index 79b3492..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/CMakeLists.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-# This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions.
-
-project( Mesh_3_implicit_functions )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Let plugins be compiled in the same directory as the executable.
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-
-# Include directory of demo includes
-include_directories( BEFORE ${Mesh_3_implicit_functions_BINARY_DIR} ../include )
-
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4)
-include( ${CGAL_USE_FILE} )
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-
-if(CGAL_Qt4_FOUND AND QT4_FOUND)
-  include(${QT_USE_FILE})
-
-  # put plugins (which are shared libraries) at the same location as
-  # executable files
-  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
-
-  ###########
-  # PLUGINS #
-  ###########
-  include(AddFileDependencies)
-  remove_definitions(-DQT_STATICPLUGIN)
-
-  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
-  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
-    list_split(option ARGN_TAIL ${ARGN} )
-    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
-      set(other_sources ${ARGN})
-      set(option "")
-    else()
-      set(other_sources ${ARGN_TAIL})
-    endif()
-    qt4_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
-    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
-
-    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
-    # Link with Qt
-    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
-    # Link with CGAL
-    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-  endmacro(polyhedron_demo_plugin)
-
-  polyhedron_demo_plugin(p_sphere_function_plugin Sphere_implicit_function)
-  polyhedron_demo_plugin(p_tanglecube_function_plugin Tanglecube_implicit_function)
-  polyhedron_demo_plugin(p_klein_function_plugin Klein_implicit_function)
-
-else (CGAL_Qt4_FOUND AND QT4_FOUND)
-
-  set(MESH_3_MISSING_DEPS "")
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(MESH_3_MISSING_DEPS "the CGAL Qt4 library, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(MESH_3_MISSING_DEPS "Qt4, ${MESH_3_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
-
-endif (CGAL_Qt4_FOUND AND QT4_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Implicit_function_interface.h b/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Implicit_function_interface.h
deleted file mode 100644
index 4386010..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Implicit_function_interface.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
-#define CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
-
-#include <QObject>
-#include <QString>
-#include <CGAL_demo/Scene_interface.h>
-
-class Implicit_function_interface 
-{
-public:
-  typedef Scene_interface::Bbox Bbox;
-  
-  virtual ~Implicit_function_interface() {}
-  
-  virtual QString name() const = 0;
-  virtual double operator()(double x, double y, double z) const = 0;
-  virtual Bbox bbox() const = 0;
-
-  /// Returns the minimum and maximum of the function.
-  ///
-  /// The method returns false if it cannot know efficiently its extrema.
-  /// In that case, the function will be scanned over the bounding box to
-  /// compute approximation of the extrema. If the method is not
-  /// overloaded by derived classes, the default is to return false.
-  virtual bool get_min_max(double&, double&) {
-    return false;
-  }
-};
-
-Q_DECLARE_INTERFACE(Implicit_function_interface,
-                    "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
-
-
-#endif // CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp
deleted file mode 100644
index aa480e9..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-class Klein_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Klein function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    return   (x*x+y*y+z*z+2*y-1)
-           * ( (x*x+y*y+z*z-2*y-1) *(x*x+y*y+z*z-2*y-1)-8*z*z)
-           + 16*x*z* (x*x+y*y+z*z-2*y-1);
-  }
-  
-  virtual Bbox bbox() const
-  {
-    const double radius = 6.;
-    double r = radius * 1.1;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Klein_implicit_function, Klein_implicit_function)
-#include "Klein_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp
deleted file mode 100644
index bb02a08..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-
-const double radius = 1.;
-
-class Sphere_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Sphere function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    return (x*x + y*y + z*z - radius);
-  }
-  
-  virtual Bbox bbox() const
-  {
-    double r = radius * 1.2;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Sphere_implicit_function, Sphere_implicit_function)
-#include "Sphere_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp
deleted file mode 100644
index b092fa2..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#include <QObject>
-#include "Implicit_function_interface.h"
-
-
-const double radius = 4.;
-
-class Tanglecube_implicit_function :
-  public QObject,
-  public Implicit_function_interface
-{
-  Q_OBJECT
-  Q_INTERFACES(Implicit_function_interface)
-  
-public:
-  virtual QString name() const { return "Tanglecube function"; }
-  
-  virtual double operator()(double x, double y, double z) const
-  {
-    double x2=x*x, y2=y*y, z2=z*z;
-    double x4=x2*x2, y4=y2*y2, z4=z2*z2;
-    return x4 - 5*x2 + y4 - 5*y2 + z4 - 5*z2 + 11.8;
-  }
-  
-  virtual Bbox bbox() const
-  {
-    double r = radius * 1.2;
-    return Bbox(-r,-r,-r,r,r,r);
-  }
-};
-
-
-
-#include <QtPlugin>
-Q_EXPORT_PLUGIN2(Tanglecube_implicit_function, Tanglecube_implicit_function)
-#include "Tanglecube_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/check_gl_error.h b/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/check_gl_error.h
deleted file mode 100644
index c2325f2..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/check_gl_error.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2011 GeometryFactory, Sophia Antipolis (France)
-//  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; version 2.1 of the License.
-// See the file LICENSE.LGPL distributed with CGAL.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author: Laurent Rineau
-
-#ifndef CGAL_GL_CHECK_ERROR_H
-#define CGAL_GL_CHECK_ERROR_H
-
-#include <iostream>
-#include <CGAL/glu.h>
-
-namespace CGAL {
-
-inline bool check_gl_error(const char* filename, long line)
-{
-  GLenum error = glGetError();
-  if(error != GL_NO_ERROR) {
-    std::cerr << "GL errors! file " << filename << ", line:" << line << "\n";
-    do {
-      std::cerr << gluErrorString(error) << std::endl;
-      error = glGetError();
-    }
-    while(error != GL_NO_ERROR);
-    std::cerr << "end of errors\n";
-    return true;
-  }
-  return false;
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_GL_CHECK_ERROR_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/gl_render.h b/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/gl_render.h
deleted file mode 100644
index 9116340..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/gl_render.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef _GL_RENDER_
-#define _GL_RENDER_
-
-#include <CGAL/gl.h>
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-
-
-inline void CGALglcolor(QColor c, int dv = 0)
-{
-  if ( 0 != dv )
-  {
-    // workaround for Qt-4.2.
-#if QT_VERSION < 0x040300
-#  define darker dark
-#endif
-    c = c.darker(dv);
-#undef darker
-  }
-  ::glColor4d(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
-}
-
-template <class Polyhedron>
-void gl_render_facets(Polyhedron& polyhedron, const std::vector<QColor>& colors)
-{
-  typedef typename Polyhedron::Traits	    Kernel;
-  typedef typename Kernel::Point_3	    Point;
-  typedef typename Kernel::Vector_3	    Vector;
-  typedef typename Polyhedron::Facet	    Facet;
-  typedef typename Polyhedron::Facet_iterator Facet_iterator;
-  typedef typename Polyhedron::Halfedge_around_facet_circulator HF_circulator;
-
-  // Get current shading model
-  GLint shading;
-  ::glGetIntegerv(GL_SHADE_MODEL, &shading);
-
-  int patch_id = -1;
-
-  Facet_iterator f;
-  for(f = polyhedron.facets_begin();
-    f != polyhedron.facets_end();
-    f++)
-  {
-    const int this_patch_id = f->patch_id();
-    if(patch_id != this_patch_id) {
-      CGALglcolor(colors[this_patch_id]);
-      patch_id = this_patch_id;
-    }
-    ::glBegin(GL_POLYGON);
-
-    // If Flat shading: 1 normal per polygon
-    if (shading == GL_FLAT)
-    {
-      Vector n = compute_facet_normal<Facet,Kernel>(*f);
-      ::glNormal3d(n.x(),n.y(),n.z());
-    }
-
-    // revolve around current face to get vertices
-    HF_circulator he = f->facet_begin();
-    HF_circulator end = he;
-    CGAL_For_all(he,end)
-    {
-      // If Gouraud shading: 1 normal per vertex
-      if (shading == GL_SMOOTH)
-      {
-        Vector n = compute_vertex_normal<typename Polyhedron::Vertex,Kernel>(*he->vertex());
-        ::glNormal3d(n.x(),n.y(),n.z());
-      }
-
-      const Point& p = he->vertex()->point();
-      ::glVertex3d(p.x(),p.y(),p.z());
-    }
-    ::glEnd();
-  }
-} // end gl_render_facets
-
-template <class Polyhedron>
-void gl_render_edges(Polyhedron& polyhedron)
-{
-  typedef typename Polyhedron::Traits		Kernel;
-  typedef typename Kernel::Point_3		Point;
-  typedef typename Polyhedron::Edge_iterator	Edge_iterator;
-
-  ::glBegin(GL_LINES);
-  Edge_iterator he;
-  for(he = polyhedron.edges_begin();
-    he != polyhedron.edges_end();
-    he++)
-  {
-    const Point& a = he->vertex()->point();
-    const Point& b = he->opposite()->vertex()->point();
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-  }
-  ::glEnd();
-} // end gl_render_edges
-
-
-#endif // _GL_RENDER_
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/textured_polyhedron.h b/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/textured_polyhedron.h
deleted file mode 100644
index e78b5d3..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/textured_polyhedron.h
+++ /dev/null
@@ -1,252 +0,0 @@
-#ifndef _TEXTURED_MESH_
-#define _TEXTURED_MESH_
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/HalfedgeDS_default.h>
-
-#include <CGAL/gl.h>
-
-namespace CGAL
-
-{
-
-template <class Refs, class T, class P, class Norm>
-class Textured_facet : public CGAL::HalfedgeDS_face_base<Refs, T>
-{
-  // normal
-  Norm m_normal;
-
-public:
-
-  // life cycle
-  // no constructors to repeat, since only
-  // default constructor mandatory
-
-  Textured_facet()
-  {
-  }
-
-  // normal
-  typedef Norm Normal_3;
-  Normal_3& normal() { return m_normal; }
-  const Normal_3& normal() const { return m_normal; }
-};
-
-template <class Refs, class Tprev, class Tvertex, class Tface, class Norm>
-class Textured_halfedge : public CGAL::HalfedgeDS_halfedge_base<Refs,Tprev,Tvertex,Tface>
-{
-public:
-  // life cycle
-  Textured_halfedge()
-  {
-  }
-};
-
-template <class Refs, class T, class P, class Norm>
-class Textured_vertex : public CGAL::HalfedgeDS_vertex_base<Refs, T, P>
-{
-  // normal
-  Norm m_normal;
-  double m_u;
-  double m_v;
-
-public:
-  // life cycle
-  Textured_vertex()  {}
-
-  // repeat mandatory constructors
-  Textured_vertex(const P& pt)
-    : CGAL::HalfedgeDS_vertex_base<Refs, T, P>(pt)
-  {
-  }
-
-  // normal
-  typedef Norm Normal_3;
-  Normal_3& normal() { return m_normal; }
-  const Normal_3& normal() const { return m_normal; }
-
-  // u,v coordinates
-  double& u() {	return m_u; }
-  const double& u() const { return m_u;	}
-  double& v() {	return m_v; }
-  const double& v() const { return m_v;	}
-};
-
-struct Textured_items : public CGAL::Polyhedron_items_3
-{
-  // wrap vertex
-  template<class Refs, class Traits> struct Vertex_wrapper
-  {
-    typedef typename Traits::Point_3 Point;
-    typedef typename Traits::Vector_3 Normal;
-    typedef Textured_vertex<Refs,
-      CGAL::Tag_true,
-      Point,
-      Normal> Vertex;
-  };
-
-  // wrap face
-  template<class Refs, class Traits> struct Face_wrapper
-  {
-    typedef typename Traits::Point_3 Point;
-    typedef typename Traits::Vector_3 Normal;
-    typedef Textured_facet<Refs,
-      CGAL::Tag_true,
-      Point,
-      Normal> Face;
-  };
-
-  // wrap halfedge
-  template<class Refs, class Traits> struct Halfedge_wrapper
-  {
-    typedef typename Traits::Vector_3 Normal;
-    typedef Textured_halfedge<Refs,
-      CGAL::Tag_true,
-      CGAL::Tag_true,
-      CGAL::Tag_true,
-      Normal> Halfedge;
-  };
-};
-
-// compute facet normal 
-struct Facet_normal // (functor)
-{
-  template<class Facet> void operator()(Facet& f)
-  {
-    typename Facet::Normal_3 sum = CGAL::NULL_VECTOR;
-    typename Facet::Halfedge_around_facet_circulator h = f.facet_begin();
-    do
-    {
-      typename Facet::Normal_3 normal = CGAL::cross_product(h->next()->vertex()->point() - h->vertex()->point(), h->next()->next()->vertex()->point() - h->next()->vertex()->point());
-      double sqnorm = normal * normal;
-      if (sqnorm != 0)
-	normal = normal / (float)std::sqrt(sqnorm);
-      sum = sum + normal;
-    } while (++h != f.facet_begin());
-    float sqnorm = sum * sum;
-    if (sqnorm != 0.0)
-      f.normal() = sum / std::sqrt(sqnorm);
-    else
-      f.normal() = CGAL::NULL_VECTOR;
-  }
-};
-
-// compute vertex normal 
-struct Vertex_normal // (functor)
-{
-  template<class Vertex> void operator()(Vertex& v)
-  {
-    typename Vertex::Normal_3 normal = CGAL::NULL_VECTOR;
-    typename Vertex::Halfedge_around_vertex_const_circulator pHalfedge =
-      v.vertex_begin();
-    typename Vertex::Halfedge_around_vertex_const_circulator begin =
-      pHalfedge;
-    CGAL_For_all(pHalfedge,begin)
-      if(!pHalfedge->is_border())
-	normal = normal + pHalfedge->facet()->normal();
-    float sqnorm = normal * normal;
-    if (sqnorm != 0.0f)
-      v.normal() = normal / (float)std::sqrt(sqnorm);
-    else
-      v.normal() = CGAL::NULL_VECTOR;
-  }
-};
-
-//*********************************************************
-template <class Kernel, class Items>
-class Textured_polyhedron : public CGAL::Polyhedron_3<Kernel,Items>
-{
-public :
-  typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename CGAL::Polyhedron_3<Kernel,Items> Base;
-  typedef typename CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_3> Basic_polyhedron;
-
-  typedef typename Base::Vertex_handle Vertex_handle;
-  typedef typename Base::Vertex_iterator Vertex_iterator;
-  typedef typename Base::Halfedge_handle Halfedge_handle;
-  typedef typename Base::Halfedge_iterator Halfedge_iterator;
-  typedef typename Base::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
-  typedef typename Base::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
-  typedef typename Base::Edge_iterator Edge_iterator;
-  typedef typename Base::Facet Facet;
-  typedef typename Base::Facet_iterator Facet_iterator;
-  typedef typename Base::Facet_handle Facet_handle;
-
-public :
-
-  // life cycle
-  Textured_polyhedron() 
-  {
-  }
-
-  virtual ~Textured_polyhedron() 
-  {
-  }
-
-  // normals (per facet, then per vertex)
-  void compute_normals_per_facet()
-  {
-    std::for_each(this->facets_begin(),this->facets_end(),Facet_normal());
-  }
-  void compute_normals_per_vertex()
-  {
-    std::for_each(this->vertices_begin(),this->vertices_end(),Vertex_normal());
-  }
-  void compute_normals()
-  {
-    compute_normals_per_facet();
-    compute_normals_per_vertex();
-  }
-
-  void gl_draw_textured_triangles(bool smooth_shading,
-    bool use_normals,
-    const double scaling_tex_coordinates)
-  {
-    ::glBegin(GL_TRIANGLES);
-    Facet_iterator f = this->facets_begin();
-    for(;f!= this->facets_end();f++)
-      gl_draw_textured_facet(f,smooth_shading,use_normals,scaling_tex_coordinates);
-    ::glEnd();
-  }
-
-  void gl_draw_textured_facet(Facet_handle f,
-    bool smooth_shading,
-    bool use_normals,
-    const double scaling_tex_coordinates)
-  {
-    // one normal per face
-    if(use_normals && !smooth_shading)
-    {
-      const typename Facet::Normal_3& n = f->normal();
-      ::glNormal3f(n[0],n[1],n[2]);
-    }
-
-    // revolve around current face to get vertices
-    Halfedge_around_facet_circulator he = f->facet_begin();
-    do
-    {
-      // one normal per vertex
-      if(use_normals && smooth_shading)
-      {
-	const typename Facet::Normal_3& n = he->vertex()->normal();
-	::glNormal3d(n[0],n[1],n[2]);
-      }
-
-      // polygon assembly is performed per vertex
-      const Point& p  = he->vertex()->point();
-      const double u = he->vertex()->u();
-      const double v = he->vertex()->v();
-      // std::cout << u << " " << v << std::endl;
-      ::glTexCoord2d(u * scaling_tex_coordinates, v * scaling_tex_coordinates);
-      ::glVertex3d(p[0],p[1],p[2]);
-    }
-    while(++he != f->facet_begin());
-  }
-}; // end class Textured_polyhedron
-
-} // end namespace CGAL
-
-#endif // _TEXTURED_MESH_
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/Point_set_3.h b/3rdparty/CGAL-4.6/demo/Polyhedron/include/Point_set_3.h
deleted file mode 100644
index 357c75b..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/include/Point_set_3.h
+++ /dev/null
@@ -1,376 +0,0 @@
-// Author: Laurent Saboret, Nader Salman, Gael Guennebaud
-
-#ifndef POINT_SET_3_H
-#define POINT_SET_3_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/Min_sphere_of_spheres_d.h>
-#include <CGAL/Min_sphere_of_spheres_d_traits_3.h>
-
-#include <UI_point_3.h>
-
-#include <algorithm>
-#include <deque>
-
-#ifdef CGAL_GLEW_ENABLED
-# include <GL/glew.h>
-#else
-# include <CGAL/gl.h>
-#endif
-
-
-/// The Point_set_3 class is array of points + normals of type
-/// Point_with_normal_3<Gt> (in fact
-/// UI_point_3 to support a selection flag and an optional radius).
-/// It provides:
-/// - accessors: points and normals iterators, property maps
-/// - OpenGL rendering
-/// - bounding box
-///
-/// CAUTION:
-/// - User is responsible to call invalidate_bounds() after adding, moving or removing points.
-///
-/// @heading Parameters:
-/// @param Gt       Geometric traits class.
-
-template <class Gt>
-class Point_set_3 : public std::deque<UI_point_3<Gt> >
-{
-// Private types
-private:
-
-  // Base class
-  typedef std::deque<UI_point_3<Gt> > Base;
-
-// Public types
-public:
-
-  // Repeat base class' types
-  /// @cond SKIP_IN_MANUAL
-  typedef typename Base::iterator iterator;
-  typedef typename Base::const_iterator const_iterator;
-
-  using Base::erase;
-
-  /// @endcond
-
-  // Classic CGAL geometric types
-  typedef Gt  Geom_traits; ///< Geometric traits class.
-  typedef typename Geom_traits::FT FT;
-  typedef typename Geom_traits::Point_3 Point;  ///< typedef to Geom_traits::Point_3
-  typedef typename Geom_traits::Vector_3 Vector; ///< typedef to Geom_traits::Vector_3
-  typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid;
-  typedef typename Geom_traits::Sphere_3 Sphere;
-
-  /// Type of points in Point_set_3
-  typedef UI_point_3<Gt> UI_point; ///< Position + normal + selection flag
-  // Its superclass:
-  typedef typename UI_point::Point_with_normal Point_with_normal; ///< Position + normal
-
-  // Iterator over Point_3 points
-  typedef typename std::deque<UI_point>::iterator        Point_iterator;
-  typedef typename std::deque<UI_point>::const_iterator  Point_const_iterator;
-
-// Data members
-private:
-
-  // Indicate if m_barycenter, m_bounding_box, m_bounding_sphere and
-  // m_diameter_standard_deviation below are valid.
-  mutable bool m_bounding_box_is_valid;
-
-  mutable Iso_cuboid m_bounding_box; // point set's bounding box
-  mutable Sphere m_bounding_sphere; // point set's bounding sphere
-  mutable Point m_barycenter; // point set's barycenter
-  mutable FT m_diameter_standard_deviation; // point set's standard deviation
-
-  std::size_t m_nb_selected_points; // number of selected points
-
-  bool m_radii_are_uptodate;
-
-// Public methods
-public:
-
-  /// Default constructor.
-  Point_set_3()
-  {
-    m_nb_selected_points = 0;
-    m_bounding_box_is_valid = false;
-    m_radii_are_uptodate = false;
-  }
-
-  // Default copy constructor and operator =() are fine.
-
-  // Repeat base class' public methods used below
-  /// @cond SKIP_IN_MANUAL
-  using Base::begin;
-  using Base::end;
-  using Base::size;
-  /// @endcond
-
-  /// Gets the number of selected points.
-  std::size_t nb_selected_points() const { return m_nb_selected_points; }
-
-  /// Mark a point as selected/not selected.
-  void select(UI_point* point, bool is_selected = true)
-  {
-    if (point->is_selected() != is_selected)
-    {
-      point->select(is_selected);
-      m_nb_selected_points += (is_selected ? 1 : -1);
-    }
-  }
-
-  /// Mark a range of points as selected/not selected.
-  ///
-  /// @param first Iterator over first point to select/unselect.
-  /// @param beyond Past-the-end iterator.
-  void select(iterator first, iterator beyond,
-              bool is_selected = true)
-  {
-    for (iterator it = first; it != beyond; it++)
-      it->select(is_selected);
-
-    m_nb_selected_points = std::count_if(begin(), end(),
-                                         std::mem_fun_ref(&UI_point::is_selected));
-  }
-
-  /// Deletes selected points.
-  void delete_selection()
-  {
-    // Deletes selected points using erase-remove idiom
-    erase(std::remove_if(begin(), end(), std::mem_fun_ref(&UI_point::is_selected)),
-          end());
-
-    // after erase(), use Scott Meyer's "swap trick" to trim excess capacity
-    Point_set_3(*this).swap(*this);
-
-    m_nb_selected_points = 0;
-    invalidate_bounds();
-  }
-
-  /// Gets the bounding box.
-  Iso_cuboid bounding_box() const
-  {
-    if (!m_bounding_box_is_valid)
-      update_bounds();
-
-    return m_bounding_box;
-  }
-
-  /// Gets bounding sphere.
-  Sphere bounding_sphere() const
-  {
-    if (!m_bounding_box_is_valid)
-      update_bounds();
-
-    return m_bounding_sphere;
-  }
-
-  /// Gets points barycenter.
-  Point barycenter() const
-  {
-    if (!m_bounding_box_is_valid)
-      update_bounds();
-
-    return m_barycenter;
-  }
-
-  /// Gets the standard deviation of the distance to barycenter.
-  FT diameter_standard_deviation() const
-  {
-    if (!m_bounding_box_is_valid)
-      update_bounds();
-
-    return m_diameter_standard_deviation;
-  }
-
-  // Gets the region of interest, ignoring the outliers.
-  // This method is used to define the OpenGL arcball sphere.
-  Sphere region_of_interest() const
-  {
-    if (!m_bounding_box_is_valid)
-      update_bounds();
-
-    // A good candidate is a sphere containing the dense region of the point cloud:
-    // - center point is barycenter
-    // - Radius is 2 * standard deviation
-    float radius = 2.f * (float)m_diameter_standard_deviation;
-    return Sphere(m_barycenter, radius*radius);
-  }
-
-  /// Update barycenter, bounding box, bounding sphere and standard deviation.
-  /// User is responsible to call invalidate_bounds() after adding, moving or removing points.
-  void invalidate_bounds()
-  {
-    m_bounding_box_is_valid = false;
-  }
-
-  // Draw points using OpenGL calls.
-  // Preconditions: OpenGL point size and color must be set.
-  void gl_draw_vertices() const
-  {
-    // Draw *non-selected* points
-    if (m_nb_selected_points < size())
-    {
-      ::glBegin(GL_POINTS);
-      for (const_iterator it = begin(); it != end(); it++)
-      {
-        const UI_point& p = *it;
-        if ( ! p.is_selected() )
-          ::glVertex3dv(&p.x());
-      }
-      ::glEnd();
-    }
-
-    // Draw *selected* points
-    if (m_nb_selected_points > 0)
-    {
-      ::glPointSize(4.f);    // selected => bigger
-      ::glColor3ub(255,0,0); // selected => red
-      ::glBegin(GL_POINTS);
-      for (const_iterator it = begin(); it != end(); it++)
-      {
-        const UI_point& p = *it;
-        if (p.is_selected())
-          ::glVertex3dv(&p.x());
-      }
-      ::glEnd();
-    }
-  }
-
-  // Draw normals using OpenGL calls.
-  // Preconditions: OpenGL line width and color must be set.
-  void gl_draw_normals(float scale = 1.0) const // scale applied to normal length
-  {
-    // Draw normals of *non-selected* points
-    if (m_nb_selected_points < size())
-    {
-      // Draw normals
-      ::glBegin(GL_LINES);
-      for (const_iterator it = begin(); it != end(); it++)
-      {
-        const UI_point& p = *it;
-        const Vector& n = p.normal();
-        if (!p.is_selected())
-        {
-          Point q = p + scale * n;
-          ::glVertex3d(p.x(),p.y(),p.z());
-          ::glVertex3d(q.x(),q.y(),q.z());
-        }
-      }
-      ::glEnd();
-    }
-
-    // Draw normals of *selected* points
-    if (m_nb_selected_points > 0)
-    {
-      ::glColor3ub(255,0,0); // selected => red
-      ::glBegin(GL_LINES);
-      for (const_iterator it = begin(); it != end(); it++)
-      {
-        const UI_point& p = *it;
-        const Vector& n = p.normal();
-        if (p.is_selected())
-        {
-          Point q = p + scale * n;
-          ::glVertex3d(p.x(),p.y(),p.z());
-          ::glVertex3d(q.x(),q.y(),q.z());
-        }
-      }
-      ::glEnd();
-    }
-  }
-
-  // Draw oriented points with radius using OpenGL calls.
-  // Preconditions: must be used inbetween calls to GlSplat library
-  void gl_draw_splats() const
-  {
-    // TODO add support for selection
-    ::glBegin(GL_POINTS);
-    for (const_iterator it = begin(); it != end(); it++)
-    {
-      const UI_point& p = *it;
-      ::glNormal3dv(&p.normal().x());
-#ifdef CGAL_GLEW_ENABLED
-      ::glMultiTexCoord1d(GL_TEXTURE2, p.radius());
-#endif
-      ::glVertex3dv(&p.x());
-    }
-    ::glEnd();
-  }
-  
-  bool are_radii_uptodate() const { return m_radii_are_uptodate; }
-  void set_radii_uptodate(bool /*on*/) { m_radii_are_uptodate = false; }
-
-// Private methods:
-private:
-
-  /// Recompute barycenter, bounding box, bounding sphere and standard deviation.
-  void update_bounds() const
-  {
-    if (begin() == end())
-      return;
-
-    // Update bounding box and barycenter.
-    // TODO: we should use the functions in PCA component instead.
-    FT xmin,xmax,ymin,ymax,zmin,zmax;
-    xmin = ymin = zmin =  1e38;
-    xmax = ymax = zmax = -1e38;
-    Vector v = CGAL::NULL_VECTOR;
-    FT norm = 0;
-    for (Point_const_iterator it = begin(); it != end(); it++)
-    {
-      const Point& p = *it;
-
-      // update bbox
-      xmin = (std::min)(p.x(),xmin);
-      ymin = (std::min)(p.y(),ymin);
-      zmin = (std::min)(p.z(),zmin);
-      xmax = (std::max)(p.x(),xmax);
-      ymax = (std::max)(p.y(),ymax);
-      zmax = (std::max)(p.z(),zmax);
-
-      // update barycenter
-      v = v + (p - CGAL::ORIGIN);
-      norm += 1;
-    }
-    //
-    Point p(xmin,ymin,zmin);
-    Point q(xmax,ymax,zmax);
-    m_bounding_box = Iso_cuboid(p,q);
-    //
-    m_barycenter = CGAL::ORIGIN + v / norm;
-
-    // Computes bounding sphere
-    typedef CGAL::Min_sphere_of_spheres_d_traits_3<Gt,FT> Traits;
-    typedef CGAL::Min_sphere_of_spheres_d<Traits> Min_sphere;
-    typedef typename Traits::Sphere Traits_sphere;
-    //
-    // Represents points by a set of spheres with 0 radius
-    std::vector<Traits_sphere> spheres;
-    for (Point_const_iterator it = begin(); it != end(); it++)
-      spheres.push_back(Traits_sphere(*it,0));
-    //
-    // Computes min sphere
-    Min_sphere ms(spheres.begin(),spheres.end());
-    typename Min_sphere::Cartesian_const_iterator coord = ms.center_cartesian_begin();
-    FT cx = *coord++;
-    FT cy = *coord++;
-    FT cz = *coord++;
-    m_bounding_sphere = Sphere(Point(cx,cy,cz), ms.radius()*ms.radius());
-
-    // Computes standard deviation of the distance to barycenter
-    typename Geom_traits::Compute_squared_distance_3 sqd;
-    FT sq_radius = 0;
-    for (Point_const_iterator it = begin(); it != end(); it++)
-        sq_radius += sqd(*it, m_barycenter);
-    sq_radius /= FT(size());
-    m_diameter_standard_deviation = CGAL::sqrt(sq_radius);
-
-    m_bounding_box_is_valid = true;
-  }
-
-}; // end of class Point_set_3
-
-
-#endif // POINT_SET_3_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/UI_point_3.h b/3rdparty/CGAL-4.6/demo/Polyhedron/include/UI_point_3.h
deleted file mode 100644
index 78f27da..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/include/UI_point_3.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// Author: Laurent Saboret
-
-#ifndef UI_POINT_3_H
-#define UI_POINT_3_H
-
-#include <CGAL/Point_with_normal_3.h>
-#include <CGAL/Iterator_project.h>
-
-#include <set>
-#include <algorithm>
-
-
-/// The UI_point_3 class represents a 3D point in Surface_reconstruction_points_3 demo.
-/// It contains:
-/// - a position,
-/// - a normal,
-/// - a radius,
-/// - a selection flag.
-///
-/// @heading Parameters:
-/// @param Gt   Geometric traits class.
-
-template<class Gt>
-class UI_point_3
-  : public CGAL::Point_with_normal_3<Gt>
-{
-// Private types
-private:
-
-    // Base class
-    typedef CGAL::Point_with_normal_3<Gt> Base;
-
-// Public types
-public:
-
-    /// Base class
-    typedef Base Point_with_normal; 
-
-    // Repeat base class public types
-    typedef Gt Geom_traits; ///< Geometric traits class.
-    typedef typename Geom_traits::FT FT;
-    typedef typename Geom_traits::RT RT;
-    typedef typename Geom_traits::Point_2  Point_2;  ///< typedef to Geom_traits::Point_2
-    typedef typename Geom_traits::Point_3  Point_3;  ///< typedef to Geom_traits::Point_3
-    typedef typename Geom_traits::Vector_3 Vector_3; ///< typedef to Geom_traits::Vector_3
-
-// Public methods
-public:
-
-    /// Point is (0,0,0) by default.
-    /// Normal is (0,0,0) by default.
-    UI_point_3(const CGAL::Origin& o = CGAL::ORIGIN)
-    : Base(o)
-    {
-      m_is_selected = false;
-      m_radius = FT(0);
-    }
-    UI_point_3(FT x, FT y, FT z,
-               const Vector_3& normal = CGAL::NULL_VECTOR)
-    : Base(x,y,z,normal)
-    {
-      m_is_selected = false;
-      m_radius = FT(0);
-    }
-    UI_point_3(RT hx, RT hy, RT hz, RT hw,
-               const Vector_3& normal = CGAL::NULL_VECTOR)
-    : Base(hx,hy,hz,hw,normal)
-    {
-      m_is_selected = false;
-      m_radius = FT(0);
-    }
-    UI_point_3(const Point_3& point,
-               const Vector_3& normal = CGAL::NULL_VECTOR)
-    : Base(point, normal)
-    {
-      m_is_selected = false;
-      m_radius = FT(0);
-    }
-    template <class K>
-    UI_point_3(const CGAL::Point_with_normal_3<K>& pwn)
-    : Base(pwn)
-    {
-      m_is_selected = false;
-      m_radius = FT(0);
-    }
-
-    /// Copy constructor
-    UI_point_3(const UI_point_3& upt)
-    : Base(upt)
-    {
-      m_is_selected = upt.m_is_selected;
-      m_radius = upt.m_radius;
-    }
-    template<class K>
-    UI_point_3(const UI_point_3<K>& upt)
-    : Base(upt)
-    {
-      m_is_selected = upt.is_selected();
-      m_radius = upt.radius();
-    }
-    /// Operator =()
-    UI_point_3& operator=(const UI_point_3& upt)
-    {
-      Base::operator=(upt);
-      m_is_selected = upt.m_is_selected;
-      m_radius = upt.m_radius;
-      return *this;
-    }
-
-    // Inherited operators ==() and !=() are fine.
-
-    /// Selection flag.
-    bool is_selected() const { return m_is_selected; }
-    void select(bool is_selected=true) { m_is_selected = is_selected; }
-
-    /// Gets/sets radius.
-    FT radius() const { return m_radius; }
-    FT& radius() { return m_radius; }
-
-// Data
-private:
-
-    // Selection flag.
-    bool m_is_selected;
-
-    /// radius.
-    FT m_radius;
-};
-
-#include <CGAL/Kernel_traits.h>
-
-namespace CGAL{
-template<class Gt>
-struct Kernel_traits< ::UI_point_3<Gt> >{
-  typedef Gt Kernel;
-};
-} //end of CGAL namespace
-
-#endif //UI_POINT_3_H
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/opengl_tools.h b/3rdparty/CGAL-4.6/demo/Polyhedron/opengl_tools.h
deleted file mode 100644
index a1383fd..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/opengl_tools.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau <laurent.rineau__CGAL at normalesup.org>
-
-#ifndef CGAL_OPENGL_TOOLS_H
-#define CGAL_OPENGL_TOOLS_H
-
-#ifdef CGAL_GLEW_ENABLED
-# include <GL/glew.h>
-#else
-# include <CGAL/gl.h>
-#endif
-
-namespace CGAL {
-namespace GL {
-
-class Color {
-  GLfloat c[4];
-public:
-  Color() {
-    ::glGetFloatv(GL_CURRENT_COLOR, &c[0]);
-  }
-  ~Color() {
-    set_rgb_color(c[0], c[1], c[2], c[3]);
-  }
-  void set_rgb_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.f) {
-    ::glColor4f(r, g, b, a);
-  }
-}; // end class Color;
-
-class Point_size {
-  GLfloat ps;
-public:
-  Point_size() {
-    ::glGetFloatv(GL_POINT_SIZE, &ps);
-  }
-  ~Point_size() {
-    set_point_size(ps);
-  }
-  void set_point_size(GLfloat v) {
-    ::glPointSize(v);
-  }
-}; // end class Point_size
-
-} // end namespace GL
-} // end namespace CGAL
-
-#endif // not CGAL_OPENGL_TOOLS_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/polyhedron_demo_macros.cmake b/3rdparty/CGAL-4.6/demo/Polyhedron/polyhedron_demo_macros.cmake
deleted file mode 100644
index f7d5ed8..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/polyhedron_demo_macros.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-include(AddFileDependencies)
-
-  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
-    list_split(option ARGN_TAIL ${ARGN} )
-    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
-      if(NOT ${option} STREQUAL "NO_MOC")
-        set(other_sources ${ARGN})
-        set(option "")
-      else()
-        set(other_sources ${ARGN_TAIL})
-      endif()
-    else()
-      set(other_sources ${ARGN_TAIL})
-    endif()
-    if("${option}" STREQUAL "NO_MOC") 
-      set(option "")
-      set(moc_file_name "")
-    else()
-      set(moc_file_name ${plugin_implementation_base_name}.moc )
-      qt4_generate_moc( ${plugin_implementation_base_name}.cpp "${CMAKE_CURRENT_BINARY_DIR}/${moc_file_name}" )
-      add_file_dependencies( ${moc_file_name} "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
-    endif()
-
-    add_library(${plugin_name} MODULE ${option} ${moc_file_name} ${plugin_implementation_base_name}.cpp ${other_sources})
-    set_property(TARGET ${plugin_name}
-      PROPERTY LIBRARY_OUTPUT_DIRECTORY
-      "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
-
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
-    # Link with Qt
-    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
-    # Link with the demo_framework
-    if(TARGET demo_framework)
-      target_link_libraries( ${plugin_name} demo_framework)
-    else()
-      target_link_libraries( ${plugin_name} Polyhedron_demo_framework)
-    endif()
-    # Link with CGAL
-    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-    add_dependencies( ${plugin_name} Polyhedron_3 )
-  endmacro(polyhedron_demo_plugin)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/texture.cpp b/3rdparty/CGAL-4.6/demo/Polyhedron/texture.cpp
deleted file mode 100644
index ae99232..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron/texture.cpp
+++ /dev/null
@@ -1,1100 +0,0 @@
-/***************************************************************************
-texture.cpp
-----------------------------------------------------------------------------
-begin                : june 2003
-copyright            : (C) 2003 by Pierre Alliez - INRIA
-email                : pierre.alliez at sophia.inria.fr
-***************************************************************************/
-
-#include <math.h>
-#include <string.h>
-#include "texture.h"
-
-
-//////////////////////////////////////////////
-// CONSTRUCTORS
-//////////////////////////////////////////////
-
-//********************************************
-// Constructor
-//********************************************
-Texture::Texture()
-{
-  m_pData = NULL;
-  m_Width = 0;
-  m_WidthByte32 = 0;
-  m_Height = 0;
-  m_Depth = 0;
-}
-
-//********************************************
-// Destructor
-//********************************************
-Texture::~Texture()
-{
-  Free();
-}
-
-
-//////////////////////////////////////////////
-// DATA
-//////////////////////////////////////////////
-
-//********************************************
-// Alloc
-//********************************************
-int Texture::Alloc(unsigned int width, unsigned int height, unsigned int depth)
-{
-  Free();
-
-  unsigned int Width32 = WidthByte32(width,depth);
-
-  m_pData = new unsigned char [Width32 * height];
-  if(m_pData == NULL)
-  {
-    return 0;
-  }
-
-  // Set members variables
-  m_Width       = width;
-  m_WidthByte32 = Width32;
-  m_Height      = height;
-  m_Depth       = depth;
-  UpdateHeader();
-
-  return 1;
-}
-
-//********************************************
-// Free
-//********************************************
-void Texture::Free()
-{
-  if(m_pData != NULL)
-  {
-    delete [] m_pData;
-    m_pData = NULL;
-  }
-  m_Width = 0;
-  m_Height = 0;
-  m_Depth = 0;
-}
-
-
-
-//********************************************
-// UpdateWidthByte32
-//********************************************
-void Texture::UpdateWidthByte32()
-{
-  m_WidthByte32 = WidthByte32(m_Width,m_Depth);
-}
-
-//********************************************
-// WidthByte32
-//********************************************
-unsigned int Texture::WidthByte32(unsigned int width, unsigned int depth)
-{
-  // 32 bits alignment (4 bytes)
-  int rest=(width*depth/8)%4;
-  if(rest != 0)
-    return (width*depth/8 + 4-rest);
-  else
-    return (width*depth/8);
-}
-
-//********************************************
-// UpdateHeader
-//********************************************
-void Texture::UpdateHeader()
-{
-  UpdateWidthByte32();
-}
-
-
-
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-// CHECKING
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-
-//********************************************
-// IsValid
-//********************************************
-int Texture::IsValid()
-{
-  int success = 0;
-  success = (m_Depth == 24) || (m_Depth == 32);
-  success &= (m_Width != 0);
-  success &= (m_Height != 0);
-  success &= (m_pData != NULL);
-  return success;
-}
-
-//********************************************
-// HigherPowerOfTwo
-//********************************************
-int Texture::HigherPowerOfTwo(int value)
-{
-  if(value <= 0)
-    return value;
-
-  int power = 1;
-  int x = 0;
-
-  while(1)
-  {
-    x = (int)pow(2.0,(double)power);
-    if(x >= value)
-      return x;
-    power++;
-  }
-}
-
-//********************************************
-// LowerPowerOfTwo
-//********************************************
-int Texture::LowerPowerOfTwo(int value)
-{
-  if(value <= 0)
-    return value;
-
-  int power = 1;
-  int x = 0;
-
-  while(1)
-  {
-    x = (int)pow(2.0,(double)power);
-    if(x >= value)
-      return (int)pow(2.0,(double)power-1);
-    power++;
-  }
-}
-
-//********************************************
-// SameSize
-//********************************************
-int Texture::SameSize(Texture *pTexture)
-{
-  int success = (m_Width == pTexture->GetWidth());
-  success &= (m_Height == pTexture->GetHeight());
-  return success;
-}
-
-
-//********************************************
-// Flip BGR to RGB
-//********************************************
-int Texture::BGRtoRGB()
-{
-  if(!IsValid())
-    return 0;
-
-  unsigned char pixel;
-  int BytePerPixel = m_Depth/8;
-  for(unsigned int j=0;j<m_Height;j++)
-    for(unsigned int i=0;i<m_Width;i++)
-    {
-      pixel = m_pData[m_WidthByte32*j+i*BytePerPixel+2];
-      m_pData[m_WidthByte32*j+i*BytePerPixel+2] = m_pData[m_WidthByte32*j+i*BytePerPixel];
-      m_pData[m_WidthByte32*j+i*BytePerPixel] = pixel;
-    }
-    return 1;
-}
-
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-// DUPLICATE
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-
-//********************************************
-// Extract
-//********************************************
-int Texture::Extract(int left, int top, int right, int bottom)
-{
-  // Saturate
-  if(right == -1)
-    right = m_Width-1;
-  if(bottom == -1)
-    bottom = m_Height-1;
-
-  // Check
-  if(left >= right || top >= bottom)
-    return 0;
-  if(left < 0  || left >= (int)m_Width || 
-    right < 0 || right >= (int)m_Width)
-    return 0;
-  if(top < 0  || top >= (int)m_Height || 
-    bottom < 0 || bottom >= (int)m_Height)
-    return 0;
-
-  int NewWidth = right-left+1;
-  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
-  int NewHeight = bottom-top+1;
-  int BytePerPixel = m_Depth / 8;
-  int i,j,k;
-
-  //TRACE("Start extracting...\n");
-  //TRACE("New width : %d\n",NewWidth);
-  //TRACE("New height : %d\n",NewHeight);
-
-  // Alloc
-  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
-  if(pData == NULL)
-  {
-    //TRACE("Insufficiant memory");
-    return 0;
-  }
-
-  for(j=0;j<NewHeight;j++)
-    for(i=0;i<NewWidth;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(m_Height-1-(j+top))+(i+left)*BytePerPixel+k];
-
-  // Replace datas
-  delete [] m_pData;
-  m_pData = pData;
-  m_Width = NewWidth;
-  m_WidthByte32 = NewWidthByte32;
-  m_Height = NewHeight;
-
-  UpdateHeader();
-
-  return 1;
-}
-
-
-//********************************************
-// DuplicateMirror
-//********************************************
-int Texture::DuplicateMirror(int left, int top, int right, int bottom)
-{
-
-  if(!Extract(left,top,right,bottom))
-    return 0;
-
-  left = 0;
-  right = m_Width-1;
-  top = 0;
-  bottom = m_Height-1;
-
-  int NewWidth = 2*m_Width;
-  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
-  int NewHeight = 2*m_Height;
-  int BytePerPixel = m_Depth / 8;
-  int i,j,k;
-
-  //TRACE("Start duplicate mirror...\n");
-  //TRACE("New width : %d\n",NewWidth);
-  //TRACE("New widthbyte32 : %d\n",NewWidthByte32);
-  //TRACE("New height : %d\n",NewHeight);
-
-  // Alloc
-  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
-  if(pData == NULL)
-  {
-    //TRACE("Insufficiant memory");
-    return 0;
-  }
-
-  // o o
-  // x o
-  for(j=0;j<NewHeight/2;j++)
-    for(i=0;i<NewWidth/2;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i+left)*BytePerPixel+k];
-  // o o
-  // o x
-  for(j=0;j<NewHeight/2;j++)
-    for(i=NewWidth/2;i<NewWidth;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(right-(i-NewWidth/2+left))*BytePerPixel+k];
-  // x o
-  // o o
-  for(j=NewHeight/2;j<NewHeight;j++)
-    for(i=0;i<NewWidth/2;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(j-NewHeight/2+top)+(i+left)*BytePerPixel+k];
-  // o x
-  // o o
-  for(j=NewHeight/2;j<NewHeight;j++)
-    for(i=NewWidth/2;i<NewWidth;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(j-NewHeight/2+top)+(right-(i-NewWidth/2+left))*BytePerPixel+k];
-
-  // Replace datas
-  delete [] m_pData;
-  m_pData = pData;
-  m_Width = NewWidth;
-  m_WidthByte32 = NewWidthByte32;
-  m_Height = NewHeight;
-
-  UpdateHeader();
-
-  return 1;
-}
-
-
-
-
-//********************************************
-// DuplicateRepeatWidth
-//********************************************
-int Texture::DuplicateRepeatWidth(int left, int top, int right, int bottom)
-{
-  if(!Extract(left,top,right,bottom))
-    return 0;
-
-  left = 0;
-  right = m_Width-1;
-  top = 0;
-  bottom = m_Height-1;
-
-  int NewWidth = 2*m_Width;
-  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
-  int NewHeight = m_Height;
-  int BytePerPixel = m_Depth / 8;
-  int i,j,k;
-
-  ////TRACE("Start duplicate repeat width...\n");
-  ////TRACE("New width : %d\n",NewWidth);
-  ////TRACE("New widthbyte32 : %d\n",NewWidthByte32);
-  ////TRACE("New height : %d\n",NewHeight);
-
-  // Alloc
-  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
-  if(pData == NULL)
-  {
-    ////TRACE("Insufficiant memory");
-    return 0;
-  }
-
-  // x o
-  for(j=0;j<NewHeight;j++)
-    for(i=0;i<NewWidth/2;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i+left)*BytePerPixel+k];
-  // o x
-  for(j=0;j<NewHeight;j++)
-    for(i=NewWidth/2;i<NewWidth;i++)
-      for(k=0;k<BytePerPixel;k++)
-	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i-NewWidth/2+left)*BytePerPixel+k];
-
-  // Replace datas
-  delete [] m_pData;
-  m_pData = pData;
-  m_Width = NewWidth;
-  m_WidthByte32 = NewWidthByte32;
-  m_Height = NewHeight;
-
-  UpdateHeader();
-
-  return 1;
-}
-
-
-//********************************************
-// Fill
-//********************************************
-void Texture::Fill(unsigned char r,
-		   unsigned char g,
-		   unsigned char b)
-{
-  if(!IsValid()) return;
-  if(m_Depth != 24) return;
-  for(unsigned int j=0;j<m_Height;j++)
-    for(unsigned int i=0;i<m_Width;i++)
-    {
-      m_pData[m_WidthByte32*j+i*3] = b;
-      m_pData[m_WidthByte32*j+i*3+1] = g;
-      m_pData[m_WidthByte32*j+i*3+2] = r;
-    }
-}
-
-
-//***************************************
-// GreyToColor
-//***************************************
-void Texture::GreyToColor(unsigned char grey,
-			  unsigned char r, 
-			  unsigned char g,
-			  unsigned char b)
-{
-  if(!IsValid()) return;
-  if(m_Depth != 24) return;
-  for(unsigned int j=0;j<m_Height;j++)
-    for(unsigned int i=0;i<m_Width;i++)
-    {
-      if(m_pData[m_WidthByte32*j+i*3] == grey)
-      {
-	m_pData[m_WidthByte32*j+i*3] = b;
-	m_pData[m_WidthByte32*j+i*3+1] = g;
-	m_pData[m_WidthByte32*j+i*3+2] = r;
-      }
-    }
-}
-
-//***************************************
-// ColorToColor
-//***************************************
-void Texture::ColorToColor(unsigned char r1,
-			   unsigned char g1,
-			   unsigned char b1,
-			   unsigned char r2, 
-			   unsigned char g2,
-			   unsigned char b2)
-{
-  if(!IsValid()) return;
-  if(m_Depth != 24) return;
-  for(unsigned int j=0;j<m_Height;j++)
-    for(unsigned int i=0;i<m_Width;i++)
-    {
-      if(m_pData[m_WidthByte32*j+i*3] == b1 &&
-	m_pData[m_WidthByte32*j+i*3+1] == g1 &&
-	m_pData[m_WidthByte32*j+i*3+2] == r1)
-      {
-	m_pData[m_WidthByte32*j+i*3]   = b2;
-	m_pData[m_WidthByte32*j+i*3+1] = g2;
-	m_pData[m_WidthByte32*j+i*3+2] = r2;
-      }
-    }
-}
-
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-// ALPHA
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-
-//********************************************
-// SetAlphaLayer
-//********************************************
-int Texture::SetAlphaLayer(unsigned char alpha) // 0 - 255
-{
-  // Check
-  if(!IsValid())
-    return 0;
-
-  if(m_Depth != 32)
-    return 0;
-
-  // Fill alpha layer 
-  int size = m_Width * m_Height;
-  for(int i=0;i<4*size;i+=4)
-    m_pData[i+3] = alpha;
-
-  return 1;
-}
-
-//********************************************
-// AddAlphaLayer
-//********************************************
-int Texture::AddAlphaLayer(unsigned char alpha) // 0 - 255
-{
-  // Check
-  if(!IsValid())
-    return 0;
-
-  // Has soon alpha
-  if(HasAlpha())
-    return SetAlphaLayer(alpha);
-
-  // Alloc memory
-  unsigned char *pData = new unsigned char[4*m_Width*m_Height];
-  if(pData == NULL)
-  {
-    //TRACE("Texture::AddAlphaLayer : insufficiant memory");
-    return 0;
-  }
-
-  // Fill new data
-  int size = m_Width * m_Height;
-  int BytePerPixel = m_Depth / 8;
-  for(int i=0;i<size;i++)
-  {
-    pData[4*i+0] = m_pData[BytePerPixel*i+0];
-    pData[4*i+1] = m_pData[BytePerPixel*i+1];
-    pData[4*i+2] = m_pData[BytePerPixel*i+2];
-    pData[4*i+3] = alpha;
-  }
-
-  // Set new depth
-  m_Depth = 32;
-
-  // Replace datas
-  delete [] m_pData;
-  m_pData = pData;
-
-  return 1;
-}
-
-
-//********************************************
-// SetAlpha
-// From RGB to grey scales, then alpha layer
-//********************************************
-int Texture::SetAlphaLayer(Texture *pTexture) 
-{
-  // Check
-  if(!IsValid())
-    return 0;
-  if(!pTexture->IsValid())
-    return 0;
-
-  if(!SameSize(pTexture))
-    return 0;
-
-  if(!AddAlphaLayer(0))
-    return 0;
-
-  // Fill new data
-  unsigned char *pData = pTexture->GetData();
-  int size = m_Width * m_Height;
-  int BytePerPixel = pTexture->GetDepth() / 8;
-  for(int i=0;i<size;i++)
-    m_pData[4*i+3] = (unsigned char)((int)pData[BytePerPixel*i+0]+
-    (int)pData[BytePerPixel*i+1]+
-    (int)pData[BytePerPixel*i+2])/3;
-
-  return 1;
-}
-
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-// DISPLAY
-//////////////////////////////////////////////
-//////////////////////////////////////////////
-
-
-//********************************************
-// ReadBuffer
-//********************************************
-int Texture::ReadBuffer(unsigned char *buffer, 
-			int width, 
-			int height, 
-			int depth)
-{
-  if(buffer == NULL)
-    return 0;
-
-  if(!Alloc(width,height,depth))
-    return 0;
-
-  int BytePerPixel = depth / 8;
-
-  for(int j=0;j<height;j++)
-    for(int i=0;i<width;i++)
-      for(int k=0;k<BytePerPixel;k++)
-	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
-	buffer[(width*j+i)*BytePerPixel+k];
-
-  return 1;
-}
-
-
-//********************************************
-// ReadBufferByte32
-//********************************************
-int Texture::ReadBufferByte32(unsigned char *pData, 
-			      int width, 
-			      int height)
-{
-  // alloc 32 bits buffer
-  if(!Alloc(width,height,32))
-    return 0;
-
-  if(pData == NULL)
-    return 0;
-
-  memcpy(m_pData,pData,height*m_WidthByte32);
-  return 1;
-}
-
-
-//***************************************
-// Copy
-//***************************************
-void Texture::Copy(Texture *pTexture)
-{
-  unsigned char *pBuffer = pTexture->GetData();
-  if(pBuffer == NULL)
-    return;
-
-  unsigned int width = pTexture->GetWidth();
-  unsigned int height = pTexture->GetHeight();
-  unsigned int depth = pTexture->GetDepth();
-  if(!Alloc(width,height,depth))
-    return;
-
-  unsigned int BytePerPixel = depth / 8;
-
-  for(unsigned int j=0;j<height;j++)
-    for(unsigned int i=0;i<width;i++)
-      for(unsigned int k=0;k<BytePerPixel;k++)
-	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
-	pBuffer[(width*j+i)*BytePerPixel+k];
-}
-
-
-//********************************************
-// ReadBuffer
-//********************************************
-int Texture::ReadBuffer(float *buffer, 
-			int width, 
-			int height, 
-			int depth)
-{
-  if(buffer == NULL)
-    return 0;
-
-  if(!Alloc(width,height,depth))
-    return 0;
-
-  int BytePerPixel = depth / 8;
-
-  for(int j=0;j<height;j++)
-    for(int i=0;i<width;i++)
-      for(int k=0;k<BytePerPixel;k++)
-	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
-	(unsigned char)(255.0f * buffer[(width*j+i)*BytePerPixel+k]);
-
-  return 1;
-}
-
-//********************************************
-// ReadBuffer
-//********************************************
-int Texture::ReadBuffer(float **ppBuffer, 
-			int width, 
-			int height,
-			float ratio)
-{
-  if(ppBuffer == NULL)
-    return 0;
-
-  if(!Alloc(width,height,24))
-    return 0;
-
-  for(int j=0;j<height;j++)
-    for(int i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = (unsigned char)(ratio*ppBuffer[j][i]);
-      m_pData[m_WidthByte32*j + i*3+1] = (unsigned char)(ratio*ppBuffer[j][i]);
-      m_pData[m_WidthByte32*j + i*3+2] = (unsigned char)(ratio*ppBuffer[j][i]);
-    }
-    return 1;
-}
-
-//********************************************
-// WriteBuffer
-//********************************************
-int Texture::WriteBuffer(float **ppBuffer, 
-			 int width, 
-			 int height)
-{
-  if(ppBuffer == NULL)
-    return 0;
-
-  for(int j=0;j<height;j++)
-    for(int i=0;i<width;i++) // only first channel
-      ppBuffer[j][i] = m_pData[m_WidthByte32*j + i*3];
-  return 1;
-}
-
-//********************************************
-// WriteBuffer32
-//********************************************
-int Texture::WriteBuffer32(float **ppBuffer, 
-			   int width, 
-			   int height)
-{
-  if(ppBuffer == NULL)
-    return 0;
-  //ASSERT(m_Depth == 32);
-  unsigned int r,g,b;
-  int tmp;
-  for(int j=0;j<height;j++)
-  {
-    tmp = m_WidthByte32*j;
-    for(int i=0;i<width;i++) // from 3 channels
-    {
-      b = m_pData[tmp + i*4];
-      g = m_pData[tmp + i*4+1];
-      r = m_pData[tmp + i*4+2];
-      unsigned int value = (r << 16) + (g << 8) + b;
-      ppBuffer[j][i] = (float)value;
-    }
-  }
-  return 1;
-}
-
-//********************************************
-// ReadBuffer
-//********************************************
-int Texture::ReadBuffer(double *buffer, 
-			int width, 
-			int height, 
-			int depth)
-{
-  if(buffer == NULL)
-    return 0;
-
-  if(!Alloc(width,height,depth))
-    return 0;
-
-  int BytePerPixel = depth / 8;
-
-  for(int j=0;j<height;j++)
-    for(int i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*BytePerPixel]   = (unsigned char)buffer[width*j+i];
-      m_pData[m_WidthByte32*j + i*BytePerPixel+1] = (unsigned char)buffer[width*j+i];
-      m_pData[m_WidthByte32*j + i*BytePerPixel+2] = (unsigned char)buffer[width*j+i];
-    }
-
-    return 1;
-}
-
-
-//********************************************
-// Grey
-//********************************************
-int Texture::Grey(unsigned int x, unsigned int y)
-{
-  int BytePerPixel = m_Depth / 8;
-  // Grey scale
-  if(BytePerPixel == 1)
-    return (int)m_pData[m_WidthByte32*y + x]; 
-  else // 24 or 32 bits (alpha layer)
-    return (int)((int)m_pData[m_WidthByte32*y + x*BytePerPixel+0]+ 
-    (int)m_pData[m_WidthByte32*y + x*BytePerPixel+1]+
-    (int)m_pData[m_WidthByte32*y + x*BytePerPixel+2])/3;
-}
-
-//********************************************
-// Color
-//********************************************
-void Texture::Color(unsigned int x, unsigned int y, 
-		    unsigned char *pRed, unsigned char *pGreen, unsigned char *pBlue)
-{
-  int BytePerPixel = m_Depth / 8;
-  // Grey scale
-  if(BytePerPixel == 1)
-  {
-    *pRed = m_pData[m_WidthByte32*y + x]; 
-    *pGreen = m_pData[m_WidthByte32*y + x]; 
-    *pBlue = m_pData[m_WidthByte32*y + x]; 
-  }
-  else // 24 or 32 bits (alpha layer)
-  {
-    *pRed = m_pData[m_WidthByte32*y + x*BytePerPixel]; 
-    *pGreen = m_pData[m_WidthByte32*y + x*BytePerPixel+1]; 
-    *pBlue = m_pData[m_WidthByte32*y + x*BytePerPixel+2]; 
-  }
-}
-
-
-
-
-
-void Texture::GenerateMirrorV(unsigned int width,
-			      unsigned int height, 
-			      unsigned char r,
-			      unsigned char g,
-			      unsigned char b,
-			      unsigned char rb,
-			      unsigned char gb,
-			      unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  for(unsigned j=0;j<height;j++)
-    for(unsigned int i=0;i<width/4;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = r;
-      m_pData[m_WidthByte32*j + i*3+1] = g;
-      m_pData[m_WidthByte32*j + i*3+2] = b;
-    }
-    for(unsigned j=0;j<height;j++)
-      for(unsigned int i=width/4;i<3*width/4;i++)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = rb;
-	m_pData[m_WidthByte32*j + i*3+1] = gb;
-	m_pData[m_WidthByte32*j + i*3+2] = bb;
-      }
-      for(unsigned j=0;j<height;j++)
-	for(unsigned int i=3*width/4;i<width;i++)
-	{
-	  m_pData[m_WidthByte32*j + i*3]   = r;
-	  m_pData[m_WidthByte32*j + i*3+1] = g;
-	  m_pData[m_WidthByte32*j + i*3+2] = b;
-	}
-}
-
-void Texture::GenerateMirrorH(unsigned int width,
-			      unsigned int height, 
-			      unsigned char r,
-			      unsigned char g,
-			      unsigned char b,
-			      unsigned char rb,
-			      unsigned char gb,
-			      unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  for(unsigned j=0;j<height/4;j++)
-    for(unsigned int i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = r;
-      m_pData[m_WidthByte32*j + i*3+1] = g;
-      m_pData[m_WidthByte32*j + i*3+2] = b;
-    }
-    for(unsigned j=height/4;j<3*height/4;j++)
-      for(unsigned int i=0;i<width;i++)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = rb;
-	m_pData[m_WidthByte32*j + i*3+1] = gb;
-	m_pData[m_WidthByte32*j + i*3+2] = bb;
-      }
-      for(unsigned j=3*height/4;j<height;j++)
-	for(unsigned int i=0;i<width;i++)
-	{
-	  m_pData[m_WidthByte32*j + i*3]   = r;
-	  m_pData[m_WidthByte32*j + i*3+1] = g;
-	  m_pData[m_WidthByte32*j + i*3+2] = b;
-	}
-}
-
-
-void Texture::GenerateCheckerBoard(unsigned int width,
-				   unsigned int height, 
-				   int size,
-				   unsigned char r,
-				   unsigned char g,
-				   unsigned char b,
-				   unsigned char rb,
-				   unsigned char gb,
-				   unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  for(unsigned j=0;j<height;j++)
-    for(unsigned int i=0;i<width;i++)
-    {
-      int h = (int)((double)i/(double)size);
-      int v = (int)((double)j/(double)size);
-      bool h_odd = (h%2) == 0;
-      bool v_odd = (v%2) == 0;
-      if((h_odd	+ v_odd)%2 == 0)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = rb;
-	m_pData[m_WidthByte32*j + i*3+1] = gb;
-	m_pData[m_WidthByte32*j + i*3+2] = bb;
-      }
-      else
-      {
-	m_pData[m_WidthByte32*j + i*3]   = r;
-	m_pData[m_WidthByte32*j + i*3+1] = g;
-	m_pData[m_WidthByte32*j + i*3+2] = b;
-      }
-    }
-}
-
-void Texture::GenerateVStripes(unsigned int width,
-			       unsigned int height, 
-			       int size,
-			       unsigned char r,
-			       unsigned char g,
-			       unsigned char b,
-			       unsigned char rb,
-			       unsigned char gb,
-			       unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  for(unsigned j=0;j<height;j++)
-    for(unsigned int i=0;i<width;i++)
-    {
-      int h = (int)((double)i/(double)size);
-      bool h_odd = (h%2) == 0;
-      if(h_odd)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = rb;
-	m_pData[m_WidthByte32*j + i*3+1] = gb;
-	m_pData[m_WidthByte32*j + i*3+2] = bb;
-      }
-      else
-      {
-	m_pData[m_WidthByte32*j + i*3]   = r;
-	m_pData[m_WidthByte32*j + i*3+1] = g;
-	m_pData[m_WidthByte32*j + i*3+2] = b;
-      }
-    }
-}
-
-void Texture::GenerateHStripes(unsigned int width,
-			       unsigned int height, 
-			       int size,
-			       unsigned char r,
-			       unsigned char g,
-			       unsigned char b,
-			       unsigned char rb,
-			       unsigned char gb,
-			       unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  for(unsigned j=0;j<height;j++)
-    for(unsigned int i=0;i<width;i++)
-    {
-      int v = (int)((double)j/(double)size);
-      bool v_odd = (v%2) == 0;
-      if(v_odd)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = rb;
-	m_pData[m_WidthByte32*j + i*3+1] = gb;
-	m_pData[m_WidthByte32*j + i*3+2] = bb;
-      }
-      else
-      {
-	m_pData[m_WidthByte32*j + i*3]   = r;
-	m_pData[m_WidthByte32*j + i*3+1] = g;
-	m_pData[m_WidthByte32*j + i*3+2] = b;
-      }
-    }
-}
-
-
-//***************************************
-// GenerateGrid
-//***************************************
-void Texture::GenerateGrid(unsigned int width,
-			   unsigned int height, 
-			   int /*size*/,
-			   unsigned int thickness,
-			   unsigned char r,
-			   unsigned char g,
-			   unsigned char b,
-			   unsigned char rb,
-			   unsigned char gb,
-			   unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  // fill background
-  unsigned int i,j;
-  for(j=0;j<height;j++)
-    for(i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = rb;
-      m_pData[m_WidthByte32*j + i*3+1] = gb;
-      m_pData[m_WidthByte32*j + i*3+2] = bb;
-    }
-
-    // horizontal
-    for(j=height/2-thickness/2;j<height/2+thickness/2;j++)
-    {
-      for(i=0;i<width;i++)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = r;
-	m_pData[m_WidthByte32*j + i*3+1] = g;
-	m_pData[m_WidthByte32*j + i*3+2] = b;
-      }
-    }
-
-    // vertical
-    for(unsigned int i=width/2-thickness/2;i<width/2+thickness/2;i++)
-      for(unsigned int j=0;j<height;j++)
-      {
-	m_pData[m_WidthByte32*j + i*3]   = r;
-	m_pData[m_WidthByte32*j + i*3+1] = g;
-	m_pData[m_WidthByte32*j + i*3+2] = b;
-      }
-}
-
-void Texture::GenerateGradientH(unsigned int width,
-				unsigned int height,
-				int /*size*/)
-{
-  Alloc(width,height,24);
-
-  // fill background
-  for(unsigned int i=0;i<width;i++)
-  {
-    unsigned char g = (unsigned char)(255.0 * (double)i / (double)(width-1));
-    for(unsigned int j=0;j<height;j++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = g;
-      m_pData[m_WidthByte32*j + i*3+1] = g;
-      m_pData[m_WidthByte32*j + i*3+2] = g;
-    }
-  }
-}
-void Texture::GenerateGradientV(unsigned int width,
-				unsigned int height,
-				int /*size*/)
-{
-  Alloc(width,height,24);
-
-  // fill background
-  for(unsigned int j=0;j<height;j++)
-  {
-    unsigned char g = (unsigned char)(255.0 * (double)j / (double)(height-1));
-    for(unsigned int i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = g;
-      m_pData[m_WidthByte32*j + i*3+1] = g;
-      m_pData[m_WidthByte32*j + i*3+2] = g;
-    }
-  }
-}
-
-//***************************************
-// GenerateLines
-//***************************************
-void Texture::GenerateLines(unsigned int width,
-			    unsigned int height, 
-			    int size,
-			    unsigned char r,
-			    unsigned char g,
-			    unsigned char b,
-			    unsigned char rb,
-			    unsigned char gb,
-			    unsigned char bb)
-{
-  Alloc(width,height,24);
-
-  // fill background
-  unsigned int i,j;
-  for(j=0;j<height;j++)
-    for(i=0;i<width;i++)
-    {
-      m_pData[m_WidthByte32*j + i*3]   = rb;
-      m_pData[m_WidthByte32*j + i*3+1] = gb;
-      m_pData[m_WidthByte32*j + i*3+2] = bb;
-    }
-
-    // horizontal zebra
-    for(j=0;j<height;j++)
-    {
-      if((j/size)%2 == 0)
-	for(i=0;i<width;i++)
-	{
-	  m_pData[m_WidthByte32*j + i*3]   = r;
-	  m_pData[m_WidthByte32*j + i*3+1] = g;
-	  m_pData[m_WidthByte32*j + i*3+2] = b;
-	}
-    }
-}
-
-
-
-
-
-
-// ** EOF **
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron_IO/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polyhedron_IO/CMakeLists.txt
deleted file mode 100644
index d7f1118..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyhedron_IO/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polyhedron_IO_Demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  create_single_source_cgal_program( "geomview_demo.cpp" )
-  create_single_source_cgal_program( "viewpoint2off.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/CMakeLists.txt
deleted file mode 100644
index 70fede4..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Polyline_simplification_2)
-
-cmake_minimum_required(VERSION 2.4.5)
-
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-if ( COMMAND cmake_policy )
-  cmake_policy( SET CMP0003 NEW )  
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-find_package(Qt4)
-
-include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
-include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../include )
-include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-# UI files (Qt Designer files)
-qt4_wrap_ui( CDT_UI_FILES Polyline_simplification_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( CDT_RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.cpp Polyline_simplification_2.moc )
-
-# The executable itself.
-add_executable  ( Polyline_simplification_2 ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.cpp Polyline_simplification_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
-
-# Link with Qt libraries
-target_link_libraries( Polyline_simplification_2 ${QT_LIBRARIES} )
-
-# Link with CGAL
-target_link_libraries( Polyline_simplification_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.cpp
deleted file mode 100644
index 69aaf46..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.cpp
+++ /dev/null
@@ -1,554 +0,0 @@
-//#define CGAL_USE_BOOST_BIMAP
-
-#include <fstream>
-#include <vector>
-
-// CGAL headers
-#include <CGAL/Bbox_2.h>
-#include <CGAL/assertions_behaviour.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Timer.h> 
-
-//#define CGAL_TESTING_POLYLINE_SIMPLIFICATION
-//#define CGAL_POLYLINE_SIMPLIFICATION_TRACE_LEVEL 15
-
-bool lAppToLog = false ;
-void Polyline_simplification_2_external_trace( std::string m )
-{
-  std::ofstream out("polysim_log.txt", ( lAppToLog ? std::ios::app | std::ios::ate : std::ios::trunc | std::ios::ate ) );
-  out << std::setprecision(19) << m << std::endl << std::flush ; 
-  lAppToLog = true ;
-}
-
-void error_handler ( char const* what, char const* expr, char const* file, int line, char const* msg )
-{
-  std::cerr << "CGAL error: " << what << " violation!" << std::endl
-       << "Expr: " << expr << std::endl
-       << "File: " << file << std::endl
-       << "Line: " << line << std::endl;
-  if ( msg != 0)
-      std::cerr << "Explanation:" << msg << std::endl;
-    
-  throw std::runtime_error("CGAL Error");  
-}
-
-
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Constrained_triangulation_plus_2.h>
-#include <CGAL/Polyline_simplification_2/simplify.h>
-#include <CGAL/Polyline_simplification_2/Squared_distance_cost.h>
-#include <CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <QSlider>
-#include <QProgressBar>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/Qt/Polyline_simplification_2_graphics_item.h>
-#include <CGAL/Qt/Converter.h>
-
-// the two base classes
-#include "ui_Polyline_simplification_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-// for viewportsBbox(QGraphicsScene*)
-#include <CGAL/Qt/utility.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-
-typedef K::Point_2         Point_2;
-typedef K::Segment_2       Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef CGAL::Polyline_simplification_2::Vertex_base_2<K> Vb;
-typedef CGAL::Constrained_triangulation_face_base_2<K>    Fb;
-typedef CGAL::Triangulation_data_structure_2<Vb,Fb>       TDS;
-typedef CGAL::Exact_predicates_tag                        Itag;
-typedef CGAL::Constrained_Delaunay_triangulation_2<K,TDS, Itag> CDT;
-
-typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
-
-namespace PS2 = CGAL::Polyline_simplification_2 ;
-
-enum Mode { ABS_P, ABS_E, REL_P, REL_E, MIXED_P, MIXED_E } ;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Polyline_simplification_2
-{
-  Q_OBJECT
-  
-private:  
-
-  PCT                                                m_pct; 
-  QGraphicsScene                                    mScene;
-  CGAL::Qt::PolylineSimplificationGraphicsItem<PCT> * mGI;
-  CGAL::Qt::GraphicsViewPolylineInput<K> *          mPI;
-  
-private:  
-
-public:
-
-  MainWindow();
-
-protected:
-  void dragEnterEvent(QDragEnterEvent *event);
-  void dropEvent(QDropEvent *event);
-private:
-
-  void loadPoly(QString);
-  void loadOSM (QString);
-
-protected slots:
-void open(QString);
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionShowTriangulation_toggled(bool checked);
-  
-  void on_actionInsertPolyline_toggled(bool checked);
-  
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void on_actionLoadConstraints_triggered();
-
-  void on_actionSimplify_triggered();
-
-  Mode getSimplificationMode() ;
-
-  double getThreshold() ;
-  
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  CGAL::set_error_handler  (error_handler);
-  CGAL::set_warning_handler(error_handler);
-  
-  setupUi(this);
-
-  setAcceptDrops(true);
-
-  // Add a GraphicItem for the PS triangulation
-  mGI = new CGAL::Qt::PolylineSimplificationGraphicsItem<PCT>(&m_pct);
-    
-  QObject::connect(this, SIGNAL(changed()), mGI, SLOT(modelChanged()));
-
-  mGI->setVerticesPen(QPen(Qt::black, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  mGI->setUnremovableVerticesPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  mGI->setZValue(-1);
-  mGI->setVisibleEdges(false);
-  mGI->setVisibleConstraints(true);
-  
-  mScene.addItem(mGI);
-
-  // Setup input handlers. They get events before the mScene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  mPI = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &mScene, 0, true); // inputs polylines which are not closed
-  
-  QObject::connect(mPI, SIGNAL(generate(CGAL::Object)), this, SLOT(processInput(CGAL::Object)));
-    
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPolyline);
-
-  this->actionShowTriangulation->setChecked(false);
-  
-  //
-  // Setup the mScene and the view
-  //
-  mScene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  mScene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&mScene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Polyline_simplification_2.html");
-  this->addAboutCGAL();
-  this->setupExportSVG(action_Export_SVG, graphicsView);
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
-	  
-//  QObject::connect(thresholdSlider, SIGNAL(valueChanged(int)), this, SLOT(set_Threshold(int)));
-	  
-}
-
-
-void 
-MainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-  if (event->mimeData()->hasFormat("text/uri-list"))
-    event->acceptProposedAction();
-}
-
-void 
-MainWindow::dropEvent(QDropEvent *event)
-{
-  QString filename = event->mimeData()->urls().at(0).path();
-  open(filename);
-  event->acceptProposedAction();
-}
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::list<Point_2> points;
-  if(CGAL::assign(points, o))
-  {
-    if(points.size() >= 2) 
-    {
-      m_pct.insert_constraint(points.begin(), points.end());
-#if 0
-      std::ofstream out("polygon.txt");
-      out.precision(12);
-      out << points.size() << std::endl;
-      for(std::list<Point_2>::iterator it = points.begin(); it!= points.end(); ++it){
-        out << *it << std::endl;
-      }
-#endif
-      emit(changed());
-    }  
-  }
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPolyline_toggled(bool checked)
-{
-  if(checked){
-    mScene.installEventFilter(mPI);
-  } else {
-    mScene.removeEventFilter(mPI);
-  }
-}
-
-void
-MainWindow::on_actionShowTriangulation_toggled(bool checked)
-{
-  mGI->setVisibleEdges(checked);
-  update();
-}
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  m_pct.clear();
-  mGI->modelChanged();
-  emit(changed());
-}
-
-Mode MainWindow::getSimplificationMode()
-{
-  bool lP     = rbuttonPercentage->isChecked();
-  int  lError = rbuttonAbsError  ->isChecked() ? 0 : ( rbuttonRelError  ->isChecked() ? 1 : 2 ) ;
-
-  return lP ? lError == 0 ? ABS_P : ( lError == 1 ? REL_P : MIXED_P )
-            : lError == 0 ? ABS_E : ( lError == 1 ? REL_E : MIXED_E ) ;
-}
-
-double MainWindow::getThreshold()
-{
-  double lValue = this->textValue->text().toDouble() ;
-  return rbuttonPercentage->isChecked() ? lValue / 100.0
-           : rbuttonAbsError->isChecked() ? lValue * lValue
-              : lValue  ;
-}
-
-void MainWindow::on_actionSimplify_triggered()
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  
-  try
-  {
-    switch( getSimplificationMode() )
-    {
-    case ABS_P   : simplify(m_pct, PS2::Squared_distance_cost(),  PS2::Stop_below_count_ratio_threshold(getThreshold())   ) ; 
- break ;
-    case ABS_E   : simplify(m_pct, PS2::Squared_distance_cost(), PS2::Stop_above_cost_threshold(getThreshold()) ) ; break ;
-    case REL_P   : simplify(m_pct, PS2::Scaled_squared_distance_cost(),  PS2::Stop_below_count_ratio_threshold(getThreshold()) ) ; break ;
-    case REL_E   : simplify(m_pct, PS2::Scaled_squared_distance_cost(), PS2::Stop_above_cost_threshold(getThreshold()) ) ; break ;
-    case MIXED_P : simplify(m_pct, PS2::Hybrid_squared_distance_cost<double>(1.0), PS2::Stop_below_count_ratio_threshold(getThreshold())) ; break ;
- case MIXED_E : simplify(m_pct, PS2::Hybrid_squared_distance_cost<double>(1.0), PS2::Stop_above_cost_threshold(getThreshold())) ; break ;
-
-      break ;
-    }
-    
-    statusBar()->showMessage(QString("Simplification done"));
-  }  
-  catch(...) 
-  {
-    statusBar()->showMessage(QString("Exception ocurred"));
-  }
-  
-   // default cursor
-  QApplication::restoreOverrideCursor();
-  mGI->modelChanged();
-  emit(changed());
-}
-
-
-void 
-MainWindow::open(QString fileName)
-{
-  if(! fileName.isEmpty()){
-    if(fileName.endsWith(".poly")){
-      loadPoly(fileName);
-      this->addToRecentFiles(fileName);
-    }  
-    else if(fileName.endsWith(".osm")){
-      loadOSM(fileName);
-      this->addToRecentFiles(fileName);
-    }  
-  }
-}
-
-void
-MainWindow::on_actionLoadConstraints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						                                      tr("Open Constraint File"),
-						                                      "../data",
-						                                      tr("Polylines (*.osm *.poly)")
-						                                      );
-  open(fileName);
-}
-
-std::string trim_right ( std::string str )
-{
-  if ( str.length() > 0 )
-  {
-    std::size_t pos = str.find_last_not_of( " " ) ;
-    if ( pos != std::string::npos )
-      return str.substr(0,pos+1);
-  }
-  
-  return std::string("") ;  
-}
-
-enum { POLYGON, POLYLINE, POINT_2 } ;
-
-void MainWindow::loadPoly(QString fileName)
-{
-  m_pct.clear();
-  mGI->modelChanged();
-  
-  std::ifstream ifs(qPrintable(fileName));
-  
-  std::string line ;
-  
-  std::vector<Point_2> poly ;
-  
-  bool lIsClosed = true ;
-  
-  while ( std::getline(ifs,line) )
-  {
-    line = trim_right(line);
-    
-    if ( line.size() > 0 )
-    {
-      int lCode = POINT_2 ;
-      
-      if ( line == "POLYGON" )    
-      {
-        lCode = POLYGON ; 
-        lIsClosed = true ; 
-      }
-      else if ( line == "POLYLINE" )
-      {
-        lCode = POLYLINE ;
-        lIsClosed = false ; 
-      }
-      
-      if ( lCode == POINT_2 )
-      {
-        double x,y ;
-        
-        std::istringstream ss(line);
-        
-        ss >> x >> y ;
-        
-        poly.push_back( Point_2(x,y) );
-      }
-      else
-      {
-        if ( poly.size() > 0 )  
-        {
-          if ( lIsClosed )
-          {
-            if(poly.back() != poly.front()){
-              poly.push_back(poly.front());
-            }
-            m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-          }
-          else
-          {
-            m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-          }
-        }
-        poly.clear();
-      }
-    }
-  }
-  
-  if ( poly.size() > 0 )  
-  {
-    if ( lIsClosed )
-    {
-      if(poly.back() != poly.front()){
-        poly.push_back(poly.front());
-      }
-      m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-    }
-    else
-    {
-      m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-    }
-  }
-      
-  emit(changed());
-  
-  actionRecenter->trigger();
-}
-
-void MainWindow::loadOSM(QString fileName)
-{
-  m_pct.clear();
-  mGI->modelChanged();
-
-  try
-  {
-    std::ifstream ifs(qPrintable(fileName));
-    
-    std::string line ;
-    
-    std::vector<Point_2> poly ;
-    
-    while ( std::getline(ifs,line) )
-    {
-      line = trim_right(line);
-      
-      if ( line.size() > 0 )
-      {
-        if ( line.find(':') != std::string::npos )
-        {
-          if ( poly.size() > 0 )  
-          {
-            if ( poly.front() == poly.back() && poly.size() >= 4 )
-            {
-              if ( is_simple_2(poly.begin(), poly.end() - 1) )
-                m_pct.insert_constraint(poly.begin(), poly.end() - 1 ) ;
-            }
-            else if ( poly.size() >= 2 )
-            {
-              if ( is_simple_2(poly.begin(), poly.end()) )
-                m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-            }
-          }
-          poly.clear();
-        }
-        else
-        {
-          double x,y ;
-          
-          std::string::size_type pos = line.find(',');
-          if ( pos != std::string::npos )
-            line[pos]= ' ' ;
-          
-          std::istringstream ss(line);
-          
-          ss >> x >> y ;
-          
-          poly.push_back( Point_2(x,y) );
-        }
-      }
-    }
-    
-    if ( poly.size() > 0 )  
-    {
-      if ( poly.front() == poly.back() )
-      {
-        m_pct.insert_constraint(poly.begin(), poly.end() - 1 ) ;
-      }
-      else
-      {
-        m_pct.insert_constraint(poly.begin(), poly.end() ) ;
-      }
-    }
-  }  
-  catch(...) 
-  {
-    statusBar()->showMessage(QString("Exception ocurred"));
-  }
-  
-  emit(changed());
-  
-  actionRecenter->trigger();
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(mGI->boundingRect());
-  this->graphicsView->fitInView(mGI->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-#include "Polyline_simplification_2.moc"
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Polyline_simplification_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-	
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/about_Polyline_simplification_2.html b/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/about_Polyline_simplification_2.html
deleted file mode 100644
index 51dbfb1..0000000
--- a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/about_Polyline_simplification_2.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-  <body>
-    <h2>Constrained Delaunay Triangulation</h2>
-    <p>Copyright © 2008 GeometryFactory</p>
-    <p>This application illustrates the 2D Constrained Delaunay
-      of <a href="http://www.cgal.org/">CGAL</a>.</p>
-    <p>See also <a href="http://www.cgal.org/Pkg/Triangulation2">the online
-        manual</a>.</p>
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/CMakeLists.txt
deleted file mode 100644
index 5f39801..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/CMakeLists.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-# This is the CMake script for compiling the PCA demo.
-
-project( PCA_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-foreach(INCDIR ../../include ../../../STL_Extension/include ../../../GraphicsView/include ../../../filtered_kernel/include )
-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}")
-    include_directories (BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}")
-  endif()
-endforeach()
-
-include_directories( ./ )
-
-# Find CGAL and CGAL Qt4
-find_package(CGAL COMPONENTS Qt4)
-include( ${CGAL_USE_FILE} )
-
-# Find Qt4 itself
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-# Find OpenGL
-find_package(OpenGL)
-
-# Find QGLViewer
-if(QT4_FOUND)
-  include(${QT_USE_FILE})
-  find_package(QGLViewer )
-endif(QT4_FOUND)
-
-if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
-
-  qt4_wrap_ui( UI_FILES MainWindow.ui )
-
-  include(AddFileDependencies)
-
-  qt4_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
-  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
-
-  qt4_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
-  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
-
-  qt4_add_resources ( RESOURCE_FILES PCA_demo.qrc )
-
-    add_file_dependencies( PCA_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
-                                         "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
-    add_executable  ( PCA_demo PCA_demo.cpp ${UI_FILES} ${RESOURCE_FILES} )
-
-  # Link with Qt libraries
-  target_link_libraries( PCA_demo ${QT_LIBRARIES} )
-
-  # Link with CGAL
-  target_link_libraries( PCA_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-  # Link with libQGLViewer, OpenGL
-  target_link_libraries( PCA_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS PCA_demo )
-
-
-else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
-
-  set(PCA_MISSING_DEPS "")
-
-  if(NOT CGAL_Qt4_FOUND)
-    set(PCA_MISSING_DEPS "the CGAL Qt4 library, ${PCA_MISSING_DEPS}")
-  endif()
-
-  if(NOT QT4_FOUND)
-    set(PCA_MISSING_DEPS "Qt4, ${PCA_MISSING_DEPS}")
-  endif()
-
-  if(NOT OPENGL_FOUND)
-    set(PCA_MISSING_DEPS "OpenGL, ${PCA_MISSING_DEPS}")
-  endif()
-
-  if(NOT QGLVIEWER_FOUND)
-    set(PCA_MISSING_DEPS "QGLViewer, ${PCA_MISSING_DEPS}")
-  endif()
-
-  message(STATUS "NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled.")
-
-endif (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.cpp
deleted file mode 100644
index a4b984c..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-#include "MainWindow.h"
-#include "Scene.h"
-#include <CGAL/Qt/debug.h>
-
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <QTextStream>
-#include <QUrl>
-#include <QFileDialog>
-#include <QSettings>
-#include <QHeaderView>
-#include <QClipboard>
-
-#include "ui_MainWindow.h"
-
-MainWindow::MainWindow(QWidget* parent)
-: CGAL::Qt::DemosMainWindow(parent)
-{
-	ui = new Ui::MainWindow;
-	ui->setupUi(this);
-
-	// saves some pointers from ui, for latter use.
-	m_pViewer = ui->viewer;
-
-	// does not save the state of the viewer 
-	m_pViewer->setStateFileName(QString::null);
-
-	// accepts drop events
-	setAcceptDrops(true);
-
-	// setups scene
-	m_pScene = new Scene;
-	m_pViewer->setScene(m_pScene);
-
-	// connects actionQuit (Ctrl+Q) and qApp->quit()
-	connect(ui->actionQuit, SIGNAL(triggered()),
-		this, SLOT(quit()));
-
-	this->addRecentFiles(ui->menuFile, ui->actionQuit);
-	connect(this, SIGNAL(openRecentFile(QString)),
-		this, SLOT(open(QString)));
-
-	readSettings();
-}
-
-MainWindow::~MainWindow()
-{
-	delete ui;
-}
-
-void MainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-	if (event->mimeData()->hasFormat("text/uri-list"))
-		event->acceptProposedAction();
-}
-
-void MainWindow::dropEvent(QDropEvent *event)
-{
-	Q_FOREACH(QUrl url, event->mimeData()->urls()) {
-		QString filename = url.toLocalFile();
-		if(!filename.isEmpty()) {
-			QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
-			open(filename);
-		}
-	}
-	event->acceptProposedAction();
-}
-
-void MainWindow::updateViewerBBox()
-{
-	m_pScene->update_bbox();
-	const Scene::Bbox bbox = m_pScene->bbox();
-	const double xmin = bbox.xmin();
-	const double ymin = bbox.ymin();
-	const double zmin = bbox.zmin();
-	const double xmax = bbox.xmax();
-	const double ymax = bbox.ymax();
-	const double zmax = bbox.zmax();
-	qglviewer::Vec 
-		vec_min(xmin, ymin, zmin),
-		vec_max(xmax, ymax, zmax);
-	m_pViewer->setSceneBoundingBox(vec_min,vec_max);
-	m_pViewer->camera()->showEntireScene();
-}
-
-void MainWindow::on_actionView_polyhedron_triggered()
-{
-	m_pScene->toggle_view_poyhedron();
-  m_pViewer->update();
-}
-
-void MainWindow::on_actionRefine_loop_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	m_pScene->refine_loop();
-	QApplication::restoreOverrideCursor();
-  m_pViewer->update();
-}
-
-
-void MainWindow::open(QString filename)
-{
-	QFileInfo fileinfo(filename);
-	if(fileinfo.isFile() && fileinfo.isReadable())
-	{
-		int index = m_pScene->open(filename);
-		if(index >= 0)
-		{
-			QSettings settings;
-			settings.setValue("OFF open directory",
-				fileinfo.absoluteDir().absolutePath());
-			this->addToRecentFiles(filename);
-
-			// update bbox
-			updateViewerBBox();
-      m_pViewer->update();
-		}
-	}
-}
-
-void MainWindow::readSettings()
-{
-	this->readState("MainWindow", Size|State);
-}
-
-void MainWindow::writeSettings()
-{
-	this->writeState("MainWindow");
-	std::cerr << "Write setting... done.\n";
-}
-
-void MainWindow::quit()
-{
-	writeSettings();
-	close();
-}
-
-void MainWindow::closeEvent(QCloseEvent *event)
-{
-	writeSettings();
-	event->accept();
-}
-
-void MainWindow::on_actionLoadPolyhedron_triggered()
-{
-	QSettings settings;
-	QString directory = settings.value("OFF open directory",
-		QDir::current().dirName()).toString();
-	QStringList filenames = 
-		QFileDialog::getOpenFileNames(this,
-		tr("Load polyhedron..."),
-		directory,
-		tr("OFF files (*.off)\n"
-		"All files (*)"));
-	if(!filenames.isEmpty()) {
-		Q_FOREACH(QString filename, filenames) {
-			open(filename);
-		}
-	}
-}
-
-
-void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
-{
-	m_pViewer->setAddKeyFrameKeyboardModifiers(m);
-}
-
-void MainWindow::on_actionSave_snapshot_triggered()
-{
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_pViewer->saveSnapshot(QString("snapshot.png"));
-	QApplication::restoreOverrideCursor();
-}
-void MainWindow::on_actionCopy_snapshot_triggered()
-{
-  // copy snapshot to clipboard
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-  QClipboard *qb = QApplication::clipboard();
-  m_pViewer->makeCurrent();
-  m_pViewer->raise();
-  QImage snapshot = m_pViewer->grabFrameBuffer(true);
-  qb->setImage(snapshot);
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionFit_triangles_triggered()
-{
- 	QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_pScene->fit_triangles();
-  m_pViewer->update();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionFit_edges_triggered()
-{
- 	QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_pScene->fit_edges();
-  m_pViewer->update();
-	QApplication::restoreOverrideCursor();
-}
-
-void MainWindow::on_actionFit_vertices_triggered()
-{
- 	QApplication::setOverrideCursor(Qt::WaitCursor);
-  m_pScene->fit_vertices();
-  m_pViewer->update();
-	QApplication::restoreOverrideCursor();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/PCA_demo.cpp b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/PCA_demo.cpp
deleted file mode 100644
index 4a5c6c0..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/PCA_demo.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Pierre Alliez
-//
-//******************************************************************************
-// File Description : demo of PCA component on polyhedron surface primitives
-//
-//******************************************************************************
-
-#include "MainWindow.h"
-#include <QApplication>
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-  app.setOrganizationDomain("inria.fr");
-  app.setOrganizationName("INRIA");
-  app.setApplicationName("PCA demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  QStringList args = app.arguments();
-  args.removeAt(0);
-
-  if(!args.empty() && args[0] == "--use-meta")
-  {
-    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
-    args.removeAt(0);
-  }
-
-  Q_FOREACH(QString filename, args)
-    mainWindow.open(filename);
-
-  return app.exec();
-}
-
-#  include "Scene.cpp"
-#  include "Viewer.cpp"
-#  include "Viewer_moc.cpp"
-#  include "MainWindow.cpp"
-#  include "MainWindow_moc.cpp"
-
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Viewer.cpp
deleted file mode 100644
index ede6ff4..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Viewer.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "Viewer.h"
-#include "Scene.h"
-
-Viewer::Viewer(QWidget* parent)
-  : QGLViewer(parent),
-    m_pScene(NULL)
-{
-  setBackgroundColor(::Qt::white);
-}
-
-void Viewer::setScene(Scene* pScene)
-{
-  this->m_pScene = pScene;
-}
-
-void Viewer::draw()
-{
-  QGLViewer::draw();
-  if(m_pScene != NULL)
-  {
-	::glClearColor(1.0f,1.0f,1.0f,0.0f);
-	m_pScene->draw();
-  }
-}
-
-void Viewer::initializeGL()
-{
-  QGLViewer::initializeGL();
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/cleanup.bat b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/cleanup.bat
deleted file mode 100644
index 61efa75..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/cleanup.bat
+++ /dev/null
@@ -1 +0,0 @@
-del *.vcproj* *.user *.cmake ZERO* *.ncb *.sln AABB_demo.suo CMakeCache.txt *_moc.* qrc* ui_*.h /Q
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/render_edges.h b/3rdparty/CGAL-4.6/demo/Principal_component_analysis/render_edges.h
deleted file mode 100644
index 899232d..0000000
--- a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/render_edges.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _GL_RENDER_EDGES_
-#define _GL_RENDER_EDGES_
-
-#include <CGAL/gl.h>
-
-template <class Polyhedron>
-void gl_render_edges(Polyhedron& polyhedron)
-{
-  typedef typename Polyhedron::Traits Kernel;
-  typedef typename Kernel::Point_3 Point;
-
-  ::glBegin(GL_LINES);
-  typename Polyhedron::Edge_iterator he;
-  for(he = polyhedron.edges_begin();
-      he != polyhedron.edges_end();
-      he++)
-  {
-    const Point& a = he->vertex()->point();
-    const Point& b = he->opposite()->vertex()->point();
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-  }
-  ::glEnd();
-} 
-
-#endif // _GL_RENDER_EDGES_
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/CMakeLists.txt
deleted file mode 100644
index cccbe9a..0000000
--- a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Segment_voronoi_2)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4 Core)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ./include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# The "Segment Voronoi" demo: Segment_voronoi_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_2.moc" )
-
-# The executable itself.
-add_executable  ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_2 )
-
-# Link with Qt libraries
-target_link_libraries( Segment_voronoi_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp b/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp
deleted file mode 100644
index becb7f1..0000000
--- a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp
+++ /dev/null
@@ -1,385 +0,0 @@
-//#define CGAL_USE_BOOST_BIMAP
-
-#include <fstream>
-#include <vector>
-
-// CGAL headers
-
-#include "svd-typedefs.h"
-
-#include <CGAL/Timer.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QDragEnterEvent>
-#include <QDropEvent>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h>
-#include <CGAL/Constraints_loader.h>
-//#include <CGAL/Qt/Converter.h>
-
-// the two base classes
-#include "ui_Segment_voronoi_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-// for viewportsBbox(QGraphicsScene*)
-#include <CGAL/Qt/utility.h>
-
-typedef Rep K;
-typedef SDG_2 SVD;
-
-typedef SVD::Vertex_handle Vertex_handle;
-
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Segment_voronoi_2
-{
-  Q_OBJECT
-  
-private:  
-  SVD svd; 
-  QGraphicsScene scene;
-  std::list<Point_2> seeds;
-
-  CGAL::Qt::SegmentDelaunayGraphGraphicsItem<SVD> * sdggi;
-
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-public:
-  MainWindow();
-
-private:
-  template <typename Iterator> 
-  void insert_polyline(Iterator b, Iterator e)
-  {
-    Point_2 p, q;
-    SVD::Vertex_handle vh, wh;
-    Iterator it = b;
-    vh = svd.insert(*it);
-    p = *it;
-    ++it;
-    for(; it != e; ++it){
-      q = *it;
-      if(p != q){
-        wh = svd.insert(*it);
-        svd.insert(vh,wh);
-        vh = wh;
-        p = q;
-      } else {
-        std::cout << "duplicate point: " << p << std::endl; 
-      }
-    }
-    emit(changed());
-  }
-
-protected slots:
- virtual void open(QString);
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionInsertPolyline_toggled(bool checked);
-  
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void on_actionLoadSegments_triggered();
-
-  void loadPolygonConstraints(QString);
-
-  void loadEdgConstraints(QString);
-
-  void on_actionSaveConstraints_triggered();
-
-  void saveConstraints(QString);
-
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  // Add a GraphicItem for the SVD triangulation
-  sdggi = new CGAL::Qt::SegmentDelaunayGraphGraphicsItem<SVD>(&svd);
-  QColor segmentColor(::Qt::blue);
-  QColor voronoiColor(::Qt::black);
-  segmentColor.setAlpha(150);
-  sdggi->setSegmentPen(segmentColor);
-  sdggi->setVoronoiPen(voronoiColor);
-    
-  QObject::connect(this, SIGNAL(changed()),
-		   sdggi, SLOT(modelChanged()));
-
-  sdggi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-
-  sdggi->setZValue(-1);
-  scene.addItem(sdggi);
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true); // inputs polylines which are not closed
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-    
-
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPolyline);
-
-  // Check two actions 
-  this->actionInsertPolyline->setChecked(true);
-  this->actionShowVoronoi->setChecked(true);
-  this->actionShowConstraints->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Segment_voronoi_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-
-  std::list<Point_2> points;
-  if(CGAL::assign(points, o)){
-    if(points.size() == 1) {
-      svd.insert(points.front());
-    }
-    else {
-      /*
-      std::cout.precision(12);
-      std::cout << points.size() << std::endl;
-      for( std::list<Point_2>::iterator it =  points.begin(); it != points.end(); ++it){
-	std::cout << *it << std::endl;
-      }
-      */
-      insert_polyline(points.begin(), points.end());
-    }
-  }
-
-
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPolyline_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pi);
-  } else {
-    scene.removeEventFilter(pi);
-  }
-}
-
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  svd.clear();
-  emit(changed());
-}
-
-
-void 
-MainWindow::open(QString fileName)
-{
-  if(! fileName.isEmpty()){
-    if(fileName.endsWith(".plg")){
-      loadPolygonConstraints(fileName);
-      this->addToRecentFiles(fileName);
-    } else if(fileName.endsWith(".edg")){
-      loadEdgConstraints(fileName);
-      this->addToRecentFiles(fileName);
-    }
-  }
-}
-
-void
-MainWindow::on_actionLoadSegments_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Constraint File"),
-						  ".",
-						  tr("Edge files (*.edg)\n"
-						     "Poly files (*.plg)"));
-  open(fileName);
-}
-
-void
-MainWindow::loadPolygonConstraints(QString fileName)
-{
-  K::Point_2 p,q, first;
-  SVD::Vertex_handle vp, vq, vfirst;
-  std::ifstream ifs(qPrintable(fileName));
-  int n;
-  while(ifs >> n){
-    ifs >> first;
-    p = first;
-    vfirst = vp = svd.insert(p);
-    n--;
-    while(n--){
-      ifs >> q;
-      vq = svd.insert(q, vp);
-      svd.insert(vp,vq);
-      p = q;
-      vp = vq;
-    }
-    svd.insert(vp, vfirst);
-  }
-  
-  
-  emit(changed());
-  actionRecenter->trigger();
-}
-
-
-void
-MainWindow::loadEdgConstraints(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  CGAL::Timer tim;
-  tim.start();
-  std::ifstream ifs(qPrintable(fileName));
-  bool first=true;
-  int n;
-  ifs >> n;
-  
-  K::Point_2 p,q, qold(0,0); // Initialize qold, as otherwise some g++ issue a unjustified warning
-
-  SVD::Vertex_handle vp, vq, vqold;
-  while(ifs >> p) {
-    ifs >> q;
-    if(p == q){
-      continue;
-    }
-    if((!first) && (p == qold)){
-      vp = vqold;
-    } else {
-      vp = svd.insert(p);
-    }
-    vq = svd.insert(q, vp);
-    svd.insert(vp,vq);
-    qold = q;
-    vqold = vq;
-    first = false;
-  }
-
-
-  tim.stop();
-  statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-  actionRecenter->trigger();
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(sdggi->boundingRect());
-  this->graphicsView->fitInView(sdggi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-void
-MainWindow::on_actionSaveConstraints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save Constraints"),
-						  ".",
-						  tr("Poly files (*.poly)\n"
-						     "Edge files (*.edg)"));
-  if(! fileName.isEmpty()){
-    saveConstraints(fileName);
-  }
-}
-
-
-void
-MainWindow::saveConstraints(QString /*fileName*/)
-{
-  QMessageBox::warning(this,
-                       tr("saveConstraints"),
-                       tr("Not implemented!"));
-}
-
-
-
-
-
-#include "Segment_voronoi_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Segment Voronoi 2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui b/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui
deleted file mode 100644
index 1c45970..0000000
--- a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui
+++ /dev/null
@@ -1,249 +0,0 @@
-<ui version="4.0" >
- <author>GeometryFactory</author>
- <class>Segment_voronoi_2</class>
- <widget class="QMainWindow" name="Segment_voronoi_2" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>600</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>CGAL Segment Voronoi Diagram</string>
-  </property>
-  <property name="windowIcon" >
-   <iconset resource="../resources/CGAL.qrc" >
-    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" >
-    <item row="0" column="0" >
-     <widget class="QGraphicsView" name="graphicsView" >
-      <property name="focusPolicy" >
-       <enum>Qt::StrongFocus</enum>
-      </property>
-      <property name="verticalScrollBarPolicy" >
-       <enum>Qt::ScrollBarAlwaysOn</enum>
-      </property>
-      <property name="horizontalScrollBarPolicy" >
-       <enum>Qt::ScrollBarAlwaysOn</enum>
-      </property>
-      <property name="transformationAnchor" >
-       <enum>QGraphicsView::NoAnchor</enum>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QToolBar" name="fileToolBar" >
-   <property name="windowTitle" >
-    <string>File Tools</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionClear" />
-   <addaction name="actionLoadSegments" />
-   <addaction name="actionSaveSegments" />
-  </widget>
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
-    <string>Visualization Tools</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionInsertPolyline" />
-   <addaction name="separator" />
-   <addaction name="actionShowConstraints" />
-   <addaction name="actionShowVoronoi" />
-   <addaction name="separator" />
-   <addaction name="actionRecenter" />
-  </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>19</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuFile" >
-    <property name="title" >
-     <string>&File</string>
-    </property>
-    <addaction name="separator" />
-    <addaction name="actionClear" />
-    <addaction name="actionLoadSegments" />
-    <addaction name="actionSaveSegments" />
-    <addaction name="separator" />
-    <addaction name="actionQuit" />
-   </widget>
-   <widget class="QMenu" name="menuEdit" >
-    <property name="title" >
-     <string>&Edit</string>
-    </property>
-   </widget>
-   <widget class="QMenu" name="menuTools" >
-    <property name="title" >
-     <string>&Tools</string>
-    </property>
-    <addaction name="actionInsertPolyline" />
-    <addaction name="separator" />
-    <addaction name="actionShowVoronoi" />
-    <addaction name="actionShowConstraints" />
-    <addaction name="separator" />
-    <addaction name="actionRecenter" />
-   </widget>
-   <addaction name="menuFile" />
-   <addaction name="menuEdit" />
-   <addaction name="menuTools" />
-  </widget>
-  <action name="actionAbout" >
-   <property name="text" >
-    <string>&About</string>
-   </property>
-  </action>
-  <action name="actionAboutCGAL" >
-   <property name="text" >
-    <string>About &CGAL</string>
-   </property>
-  </action>
-  <action name="actionQuit" >
-   <property name="text" >
-    <string>&Quit</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+Q</string>
-   </property>
-  </action>
-  
-  <action name="actionInsertPolyline" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../icons/Input.qrc" >
-     <normaloff>:/cgal/Input/inputPolyline.png</normaloff>:/cgal/Input/inputPolyline.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Insert Polyline</string>
-   </property>
-   <property name="toolTip" >
-    <string>Insert Point or Polyline</string>
-   </property>
-   <property name="statusTip" >
-    <string>Left: Insert vtx | Right: Final vtx | Del: Delete vtx</string>
-   </property>
-  </action>
-  <action name="actionClear" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileNew.png</normaloff>:/cgal/fileToolbar/fileNew.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Clear</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+C</string>
-   </property>
-  </action>
-  <action name="actionShowVoronoi" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../icons/Triangulation_2.qrc" >
-     <normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &Voronoi Diagram</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+V</string>
-   </property>
-   <property name="visible" >
-    <bool>false</bool>
-   </property>
-  </action>
-
-  <action name="actionLoadSegments" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileOpen.png</normaloff>:/cgal/fileToolbar/fileOpen.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Load...</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+L</string>
-   </property>
-  </action>
-  <action name="actionSaveSegments" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileSave.png</normaloff>:/cgal/fileToolbar/fileSave.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Save...</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+S</string>
-   </property>
-  </action>
-
-  <action name="actionRecenter" >
-   <property name="icon" >
-    <iconset resource="../icons/Input.qrc" >
-     <normaloff>:/cgal/Input/zoom-best-fit</normaloff>:/cgal/Input/zoom-best-fit</iconset>
-   </property>
-   <property name="text" >
-    <string>Re&center the viewport</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+R</string>
-   </property>
-  </action>
- 
-  <action name="actionShowConstraints" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Segment_voronoi_2.qrc" >
-     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &constraints</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+C</string>
-   </property>
-  </action>
-
- </widget>
- <resources>
-  <include location="Segment_voronoi_2.qrc" />
-  <include location="../icons/File.qrc" />
-  <include location="../resources/CGAL.qrc" />
-  <include location="../icons/Triangulation_2.qrc" />
-  <include location="../icons/Input.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html b/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html
deleted file mode 100644
index 51dbfb1..0000000
--- a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-  <body>
-    <h2>Constrained Delaunay Triangulation</h2>
-    <p>Copyright © 2008 GeometryFactory</p>
-    <p>This application illustrates the 2D Constrained Delaunay
-      of <a href="http://www.cgal.org/">CGAL</a>.</p>
-    <p>See also <a href="http://www.cgal.org/Pkg/Triangulation2">the online
-        manual</a>.</p>
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Snap_rounding_2/CMakeLists.txt
deleted file mode 100644
index 9ed5590..0000000
--- a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Snap_rounding_2_demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ../../../Snap_rounding_2/include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Snap_rounding_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Snap_rounding_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc )
-
-# The executable itself.
-add_executable  ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Snap_rounding_2 )
-
-# Link with Qt libraries
-target_link_libraries( Snap_rounding_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.cpp b/3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.cpp
deleted file mode 100644
index 587b876..0000000
--- a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.cpp
+++ /dev/null
@@ -1,318 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Snap_rounding_traits_2.h>
-#include <CGAL/Snap_rounding_2.h>
-#include <CGAL/Snap_rounding_traits_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/RegularGridGraphicsItem.h>
-#include <CGAL/Qt/SegmentsGraphicsItem.h>
-#include <CGAL/Qt/PolylinesGraphicsItem.h>
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
- 
-// the two base classes
-#include "ui_Snap_rounding_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_exact_constructions_kernel K;
-typedef CGAL::Snap_rounding_traits_2<K>     Traits;
-
-typedef K::Point_2 Point_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Snap_rounding_2
-{
-  Q_OBJECT
-  
-private:  
-  
-  QGraphicsScene scene;  
-
-  CGAL::Qt::RegularGridGraphicsItem<K> * rgi;
-
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-  std::list<Segment_2> input;
-  std::list<std::list<Point_2> > output;
-
-  typedef CGAL::Qt::SegmentsGraphicsItem<std::list<Segment_2> > InputSegmentsGraphicsItem;
-  typedef CGAL::Qt::PolylinesGraphicsItem<std::list<std::list<Point_2> > > OutputPolylinesGraphicsItem;
-  InputSegmentsGraphicsItem * isgi;
-  OutputPolylinesGraphicsItem *plgi;
-  double delta;
-  
-public:
-  MainWindow();
-              
-  void resize(){
-  this->graphicsView->setSceneRect(QRectF(0,0,20, 20));
-  this->graphicsView->fitInView(0,0, 20, 20, Qt::KeepAspectRatio);
-  }
-              
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionLoadSegments_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionSaveSegments_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void on_actionShowGrid_toggled(bool checked);
-  void on_actionShowInput_toggled(bool checked);
-  void on_actionShowSnappedSegments_toggled(bool checked);
-
-  void deltaChanged(double);
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow(), delta(1.0)
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  isgi = new InputSegmentsGraphicsItem(&input);
-  scene.addItem(isgi);
-
-  plgi = new OutputPolylinesGraphicsItem(&output);
-  scene.addItem(plgi);
-
- // inputs polylines with 2 points
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 2, false);
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-  
-  scene.installEventFilter(pi);
-
-  // Manual handling of actions
-  //
-
-
-  QObject::connect(this->doubleSpinBox, SIGNAL(valueChanged(double)),
-		   this, SLOT(deltaChanged(double)));
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  this->graphicsView->setScene(&scene);
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-  this->graphicsView->setMouseTracking(true);
-
-  rgi = new CGAL::Qt::RegularGridGraphicsItem<K>(delta, delta);
-
-    QObject::connect(this, SIGNAL(changed()),
-                     rgi, SLOT(modelChanged()));
-
-    QObject::connect(this, SIGNAL(changed()),
-                     isgi, SLOT(modelChanged()));
-
-    QObject::connect(this, SIGNAL(changed()),
-                     plgi, SLOT(modelChanged()));
-
-
-  rgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  rgi->setEdgesPen(QPen(Qt::gray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(rgi);
-
-  plgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Snap_rounding_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-
-void
-MainWindow::deltaChanged(double d)
-{
-  if(delta == d){
-    return;
-  }
-  delta = d;
-  output.clear();
-  CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
-  rgi->setDelta(delta, delta);
-  emit(changed());
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-
-  std::list<Point_2> points;
-  if(CGAL::assign(points, o)){
-    if(points.size() == 2) {
-      input.push_back(Segment_2(points.front(), points.back()));
-      output.clear();
-      CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
-    }
-    else {
-      std::cerr << points.size() << std::endl;
-    }
-  }
-  emit(changed());
-}
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  input.clear();
-  output.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionShowGrid_toggled(bool checked)
-{
-  rgi->setVisible(checked);
-  emit(changed());
-}
-
-void
-MainWindow::on_actionShowInput_toggled(bool checked)
-{
-  isgi->setVisible(checked);
-  emit(changed());
-}
-
-
-
-void
-MainWindow::on_actionShowSnappedSegments_toggled(bool checked)
-{
-  plgi->setVisible(checked);
-  emit(changed());
-}
-
-
-
-
-void
-MainWindow::on_actionLoadSegments_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open segment file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-
-  std::copy(std::istream_iterator<Segment_2>(ifs),
-            std::istream_iterator<Segment_2>(),
-            std::back_inserter(input));
-  output.clear();
-  CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
-  ifs.close();
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  on_actionRecenter_triggered();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionSaveSegments_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    ofs.precision(12);
-    std::copy(input.begin(), input.end(),  std::ostream_iterator<Segment_2>(ofs, "\n"));
-  }
-
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(isgi->boundingRect());
-  this->graphicsView->fitInView(isgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Snap_rounding_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Snap_rounding_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Snap_rounding_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  mainWindow.resize();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Spatial_searching_2/CMakeLists.txt
deleted file mode 100644
index b7f6b51..0000000
--- a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Spatial_searchingDemo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ../../../Spatial_searching/include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-  include(${QT_USE_FILE})
-  #--------------------------------
-  # Demo: Spatial_searching_2
-  #--------------------------------
-  # UI files (Qt Designer files)
-  qt4_wrap_ui( DT_UI_FILES Spatial_searching_2.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( DT_RESOURCE_FILES ./Spatial_searching_2.qrc )
-
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  qt4_generate_moc( Spatial_searching_2.cpp Spatial_searching_2.moc )
-
-  # The executable itself.
-  add_executable  ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Spatial_searching_2 )
-
-  # Link with Qt libraries
-  target_link_libraries( Spatial_searching_2 ${QT_LIBRARIES} )
-  # And with CGAL libraries
-  target_link_libraries( Spatial_searching_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.cpp b/3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.cpp
deleted file mode 100644
index ce24e3f..0000000
--- a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.cpp
+++ /dev/null
@@ -1,300 +0,0 @@
-#include <fstream>
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Search_traits_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QFileDialog>
-#include <QGraphicsLineItem>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/PointsInKdTreeGraphicsItem.h>
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Spatial_searching_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-#include "NearestNeighbor.h"
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Vector_2 Vector_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-typedef CGAL::Search_traits_2<K> TreeTraits;
-typedef CGAL::Orthogonal_k_neighbor_search<TreeTraits> Neighbor_search;
-typedef Neighbor_search::Tree Tree;
-
-typedef CGAL::Qt::NearestNeighbor<Neighbor_search> NearestNeighbor;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Spatial_searching_2
-{
-  Q_OBJECT
-  
-private:
-  Tree tree;
-
-  CGAL::Qt::Converter<K> convert;
-  QGraphicsScene scene;  
-
-  CGAL::Qt::PointsInKdTreeGraphicsItem<Tree> * pgi;
-  NearestNeighbor * nearest_neighbor;
-
-public:
-  MainWindow();
-
-  template <typename G>
-  void
-  on_actionGenerate_triggered()
-  {
-
-    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-    CGAL::Qt::Converter<K> convert;  
-    Iso_rectangle_2 isor = convert(rect);
-    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
-    Vector_2 offset = center - CGAL::ORIGIN;
-    double w = isor.xmax() - isor.xmin();
-    double h = isor.ymax() - isor.ymin();
-    double radius = (w<h) ? w/2 : h/2;
-
-    G pg(radius);
-    bool ok = false;
-    const int number_of_points = 
-      QInputDialog::getInteger(this, 
-                               tr("Number of random points"),
-                               tr("Enter number of random points"),
-                               100,
-                               0,
-                               (std::numeric_limits<int>::max)(),
-                               1,
-                               &ok);
-
-    if(!ok) {
-      return;
-    }
-
-    // wait cursor
-    QApplication::setOverrideCursor(Qt::WaitCursor);
-
-    std::vector<Point_2> points; 
-
-    points.reserve(number_of_points);
-    for(int i = 0; i < number_of_points; ++i){
-      points.push_back(*pg + offset);
-      ++pg;
-    }
-    tree.insert(points.begin(), points.end());
-    
-    // default cursor
-    QApplication::restoreOverrideCursor();
-    emit(changed());
-  }
-
-public slots:
-
-  virtual void open(QString fileName);
-  void N_changed(int i);
-  void on_actionClear_triggered();
-  void on_actionLoadPoints_triggered();
-  void on_actionRecenter_triggered();
-  void on_actionGeneratePointsOnCircle_triggered();
-  void on_actionGeneratePointsInSquare_triggered();
-  void on_actionGeneratePointsInDisc_triggered();
-
-  void clear();
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-  this->graphicsView->setCursor(Qt::CrossCursor);
-
-  // Add a GraphicItem for the point set
-  pgi = new CGAL::Qt::PointsInKdTreeGraphicsItem<Tree>(&tree);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   pgi, SLOT(modelChanged()));
-
-  pgi->setVerticesPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(pgi);
-
-  nearest_neighbor = new NearestNeighbor(&scene, &tree, this, this->nn->value());
-  nearest_neighbor->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.installEventFilter(nearest_neighbor);
-
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->nn, SIGNAL(valueChanged(int)),
-		   this, SLOT(N_changed(int)));
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
- 
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(0, 0, 10, 10);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Uncomment the following line to get antialiasing by default.
-//   actionUse_Antialiasing->setChecked(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Spatial_searching_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-
-void MainWindow::N_changed(int i)
-{
-  nearest_neighbor->setN(i);
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  clear();
-  emit(changed());
-}
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  if(tree.empty()){
-    return;
-  }
-  this->graphicsView->setSceneRect(pgi->boundingRect());
-  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-void
-MainWindow::on_actionGeneratePointsOnCircle_triggered()
-{
-  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInSquare_triggered()
-{
-  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionGeneratePointsInDisc_triggered()
-{
-  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
-  on_actionGenerate_triggered<Generator>();
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  std::vector<K::Point_2> points;
-  while(ifs >> p) {
-    points.push_back(p);
-  }
-  tree.insert(points.begin(), points.end());
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-void
-MainWindow::clear()
-{
-  tree.clear();  
-}
-
-
-#include "Spatial_searching_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Spatial_searching_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Spatial_searching_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  mainWindow.on_actionRecenter_triggered();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/CMakeLists.txt
deleted file mode 100644
index 14b91c4..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-project( straight_skeleton_2 ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt3 Core )
-include( ${CGAL_USE_FILE} )
-
-find_package(Qt3-patched)
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if ( CGAL_FOUND AND CGAL_Qt3_FOUND AND QT3_FOUND )
-
-  include_directories (BEFORE ../../include)
-  
-  # use the Qt MOC preprocessor on classes that derives from QObject
-  include( Qt3Macros-patched )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/straight_skeleton_2_toolbar.h" straight_skeleton_2_toolbar.moc )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/straight_skeleton_2_toolbar_layers.h" straight_skeleton_2_toolbar_layers.moc )
-  qt3_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/straight_skeleton_2.cpp" straight_skeleton_2.moc )
-
-
-  # The executable itself.
-  add_executable  ( straight_skeleton_2 
-    straight_skeleton_2.cpp straight_skeleton_2.moc
-    straight_skeleton_2_toolbar.cpp straight_skeleton_2_toolbar.moc 
-    straight_skeleton_2_toolbar_layers.cpp straight_skeleton_2_toolbar_layers.moc
-    )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS straight_skeleton_2 )
-
-  target_link_libraries( straight_skeleton_2  ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT3_LIBRARIES} )
-  
-message( STATUS "QT3_LIBRARIES=${QT3_LIBRARIES}" )   
-message( STATUS "CGAL_LIBRARIES=${CGAL_LIBRARIES}" )   
-message( STATUS "CGAL_3RD_PARTY_LIBRARIES=${CGAL_3RD_PARTY_LIBRARIES}" )   
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/cgal_types.h b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/cgal_types.h
deleted file mode 100644
index a6d400e..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/cgal_types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef CGAL_TYPES
-#define CGAL_TYPES
-
-#include <CGAL/basic.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polygon_2.h>
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
-
-#include <boost/shared_ptr.hpp>
-#include <vector>
-
-#if USE_BIG_FLOAT
-
-#include <CGAL/CORE_BigFloat.h>
-
-#endif
-
-namespace demo
-{
-
-//typedef CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt K;
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-
-typedef CGAL::Polygon_2<K>            CGAL_Polygon ;
-
-typedef K::FT                         FT ;
-typedef K::Point_2                    Point;
-typedef std::vector<Point>            Polygon;
-typedef boost::shared_ptr<Polygon>    PolygonPtr;
-typedef CGAL::Segment_2<K>            Segment;
-typedef std::vector<PolygonPtr>       Region ;
-typedef boost::shared_ptr<Region>     RegionPtr ;
-typedef std::vector<RegionPtr>        Regions ;
-typedef std::set<double>              Doubles ;
-
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_0.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_0.poly
deleted file mode 100644
index 99cc3de..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_0.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-114 5.03746 60.5287 5.02652 60.5374 5 60.5485 4.98355 60.5554 4.9706 60.5599 4.96703 60.559 4.96515 60.5566 4.97674 60.552 4.97763 60.5473 4.98423 60.5444 4.97984 60.5405 4.98558 60.5348 4.98446 60.5309 4.98845 60.5294 4.99722 60.5298 5 60.5276 5.00547 60.5231 5.00856 60.5166 5.01468 60.5162 5.02814 60.5039 5.03364 60.5019 5.03686 60.5045 5.04715 60.4967 5.06195 60.4921 5.06492 60.4962 5.0756 60.4987 5.08093 60.4976 5.08537 60.4987 5.09648 60.4939 5.09288 60.4908 5.07981 60.4886 5.0785 6 [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_1.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_1.poly
deleted file mode 100644
index 00141e3..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_1.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-116 4.82149 61.8609 4.81817 61.8557 4.82908 61.8497 4.83854 61.8485 4.8843 61.8501 4.89066 61.8474 4.89583 61.841 4.90381 61.8375 4.91337 61.8381 4.92383 61.8367 4.93549 61.8391 4.94489 61.8381 4.95426 61.8422 4.96392 61.8424 4.97124 61.8397 4.98595 61.838 4.9886 61.8377 4.98817 61.835 4.9766 61.8347 4.96425 61.8309 4.95058 61.829 4.94666 61.8267 4.94725 61.8238 4.95798 61.8185 4.95346 61.8144 4.93324 61.8211 4.92245 61.8217 4.90451 61.8193 4.90213 61.8167 4.92544 61.792 4.92146 61.7877  [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_2.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_2.poly
deleted file mode 100644
index bfe8675..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_2.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-116 12.4059 65.9241 12.4015 65.9182 12.3825 65.9077 12.3837 65.9036 12.3801 65.8985 12.3827 65.8961 12.3932 65.8982 12.3953 65.8972 12.3884 65.8879 12.3907 65.8851 12.3999 65.8846 12.4054 65.8877 12.4365 65.8947 12.4808 65.8994 12.5143 65.9008 12.5248 65.9004 12.5276 65.899 12.5258 65.8965 12.5076 65.8939 12.4984 65.8901 12.4958 65.8839 12.488 65.8864 12.4813 65.8847 12.482 65.8816 12.4718 65.8804 12.4624 65.8762 12.4603 65.8752 12.447 65.8759 12.4369 65.8716 12.4366 65.8681 12.4197 65.8 [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_3.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_3.poly
deleted file mode 100644
index 61ae794..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_3.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-119 4.96955 61.207 4.95691 61.2059 4.95226 61.203 4.95507 61.1983 4.96742 61.1885 4.97659 61.1852 4.98435 61.1844 4.98282 61.1825 4.97708 61.1827 4.97569 61.1776 4.973 61.1768 4.96536 61.1794 4.95345 61.1895 4.94912 61.1897 4.95487 61.1503 4.95781 61.1474 4.96011 61.1452 4.95069 61.1326 4.94718 61.1336 4.94579 61.1384 4.94848 61.1465 4.93436 61.168 4.93722 61.1752 4.929 61.1833 4.93744 61.1961 4.93462 61.2008 4.92044 61.2077 4.91406 61.2137 4.903 61.2143 4.88758 61.2129 4.8856 61.2048 4. [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_4.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_4.poly
deleted file mode 100644
index 3366d61..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_4.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-123 5.34896 60.5428 5.34594 60.5363 5.35022 60.5305 5.36349 60.5265 5.36619 60.5238 5.36857 60.5214 5.39891 60.5128 5.41014 60.5071 5.40663 60.5033 5.41519 60.4995 5.42614 60.5007 5.42915 60.4994 5.43323 60.492 5.43114 60.488 5.44712 60.4763 5.45401 60.4741 5.45945 60.4695 5.46986 60.4683 5.48071 60.4566 5.49581 60.4552 5.50223 60.4529 5.49291 60.4505 5.50384 60.4436 5.50707 60.4432 5.51993 60.4417 5.53164 60.4383 5.53972 60.429 5.54705 60.4295 5.56169 60.4361 5.57984 60.4385 5.58897 60. [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_5.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_5.poly
deleted file mode 100644
index 249b22e..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/complex_5.poly
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-125 23.7556 70.7499 23.7396 70.7482 23.7148 70.7504 23.7002 70.7473 23.6923 70.7477 23.6774 70.7483 23.6725 70.7472 23.6563 70.7282 23.6431 70.7255 23.6234 70.7049 23.6304 70.6932 23.6261 70.688 23.6365 70.6765 23.6508 70.6739 23.6486 70.67 23.6533 70.6684 23.6657 70.6688 23.6824 70.6712 23.6865 70.6707 23.6856 70.6664 23.6647 70.6619 23.6582 70.6567 23.6388 70.6539 23.6295 70.6464 23.6205 70.6439 23.63 70.6425 23.6468 70.6484 23.6612 70.6478 23.6702 70.6491 23.6721 70.6459 23.6664 70.64 [...]
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_1.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_1.poly
deleted file mode 100644
index d8aab2d..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_1.poly
+++ /dev/null
@@ -1,1788 +0,0 @@
-21
-342
-192.286507728962 482.546908958065
-186.683283854519 481.534298014163
-183.963928293714 480.550588050374
-178.726775992399 477.800985981582
-171.486082793547 472.239008052753
-167.155418320471 467.975435515521
-163.291077967584 463.589629949811
-158.698979604259 457.585488255146
-155.52416330387 451.936533829478
-152.257649971666 443.863028119249
-146.47352360814 427.358262784329
-148.475130277684 425.996659381528
-150.389227989536 424.190232018996
-160.963298064592 410.798520548383
-180.415581567975 392.627361901542
-189.91535394575 383.31838365671
-199.861190274122 371.836621597329
-206.867113824107 365.567265755709
-208.572556992937 362.499272360207
-204.776470255856 363.792996913806
-201.014070300202 365.84029499401
-193.72053252608 371.47699033856
-155.290487814136 409.12515253565
-148.698362185777 415.334071021901
-138.497689250679 424.119058901516
-131.423123574863 429.460772970604
-124.591785835135 433.983612663714
-118.441648119162 437.585693906884
-112.244757063449 440.571469627084
-105.561544800433 442.992600651251
-95.7784850748276 445.642095896331
-93.5134613580809 445.65074302532
-92.6543613413151 445.297983539937
-88.4480981243083 446.16102071833
-84.0373203970695 446.335141248559
-71.5537289363441 444.960705791235
-64.335591221056 443.320957842443
-60.6619419530686 442.162087870018
-53.8220478761167 439.090303924639
-50.9104291790359 437.146969149896
-48.507446784141 434.911725305926
-46.2522041228597 431.883100555807
-44.544469191727 428.585914521995
-43.3387240997235 425.055880858051
-42.58945095583 421.328713217534
-42.2782489482955 413.425830621023
-43.2467200409685 405.162975960941
-46.3022506500288 392.718735288925
-54.8463705982789 367.947862485096
-59.7302078169844 355.972119514757
-62.1494415782829 351.323788181541
-64.8587698846489 347.101777308931
-67.8741800046737 343.536218306887
-69.501661766243 342.071524322939
-73.0798269366687 339.813918632888
-78.9641559543414 337.687610800289
-83.0743231625067 336.987991522554
-91.5788672716013 336.885276556567
-147.853502127802 344.559551604599
-147.13872297958 342.669277798979
-146.094059451142 341.098697920944
-144.779568373805 339.79289261532
-141.581330897703 337.755928300597
-131.614127254227 333.412747273145
-111.91898996272 328.169695171539
-104.692557158773 325.486997226454
-97.9142498529574 321.420890132278
-92.6680909605661 316.697510361037
-88.4012989332537 311.478983762874
-86.0131650715761 307.76714989864
-82.0954572489096 299.898840136711
-78.9717017753312 291.606736083714
-71.8733504104851 270.353737236961
-68.2134231089223 262.17598673622
-65.9971429279805 258.257859046111
-62.0340112361716 252.644175249063
-57.4044712380617 247.177037795187
-47.8045480318239 236.924295593774
-41.2955832535638 231.492950343888
-39.5001015466296 228.993516621842
-38.6208286612879 225.23757061403
-38.1346477436226 221.118517078561
-38.2538395198772 213.803092624185
-38.8473459006232 210.616663139345
-39.7888817343326 207.751049772113
-41.0725138644185 205.211223239523
-43.6264138352194 202.023207199101
-45.7393291461789 200.319594640134
-48.1735747054608 198.959166425425
-50.9232173564783 197.946893272005
-53.9823239426444 197.287745896909
-61.0051962940752 197.048711349816
-69.1947265070582 198.281828520409
-67.9967832141227 196.030802949301
-66.4846395965534 194.129070961858
-62.6851799829306 191.185099301922
-58.1312048570237 189.073136668516
-45.6427619908627 184.960671353002
-41.0849829497801 182.79362244477
-37.2795457551667 179.763086638679
-35.7635982224216 177.806268376409
-34.9706777466477 176.180016334105
-34.0287935370457 171.821451714539
-34.2796137105463 167.04004298208
-35.4916162045119 163.93583765455
-36.8811476080261 162.391668192823
-38.9003010438256 161.402800825116
-42.2664396489647 160.680693593775
-46.7583937843855 160.172029126408
-54.6989613769414 159.862103214721
-62.8370683215793 160.168363654032
-67.6802035273681 160.755141588441
-71.5731137380591 161.676197959763
-74.8828282043689 163.397241986909
-76.5161621061536 164.77612849982
-79.2684555284272 168.131714335449
-85.8162696011423 180.172629896607
-88.3202703222566 183.804193537243
-89.7829029919942 185.372814791097
-93.2965113426265 187.820712247532
-95.4143183806394 188.621978882774
-96.7942969003015 184.482043323788
-98.8951824566422 185.105111034086
-103.155265945999 187.206173116973
-107.206855208782 190.260002340383
-110.706457370424 194.042036613277
-113.310579556356 198.327713844616
-114.169494135128 200.589242916253
-114.78634721768 205.209330664564
-114.458412502817 207.511748818478
-113.050299646635 210.876896288916
-111.438134664661 213.020405631075
-109.783003035414 214.55891664925
-107.432979515454 215.687986275518
-105.542339868389 216.17703958126
-91.4736540810755 217.709108175507
-86.8422436584413 218.906675546527
-84.7429772552593 219.86319922476
-81.9930857860751 221.888253731637
-79.8590276800453 224.774264624478
-78.8545761446934 227.261377433315
-85.1848382964768 226.389990454049
-91.3090946539681 224.88131907084
-109.427129138115 218.856608179263
-115.708662495863 217.12380886199
-125.695336215067 215.582054757844
-132.271925009434 215.731614661907
-135.361134151748 216.436789904307
-147.70648014619 221.104602959615
-153.576681679455 222.76022359077
-156.759768874997 222.542320302364
-162.856892157666 219.978990179059
-165.677181689842 219.159107288089
-169.869103476397 219.27744931212
-178.337662652445 220.868966908792
-182.352965119356 221.051474094835
-176.317391649269 212.833634774917
-174.17426020824 208.241905593604
-173.182605908995 202.710034715548
-174.102822816928 194.550902295582
-173.884933134184 190.792600073037
-173.334287332992 188.76139097597
-171.77129222304 186.414781580185
-166.264016702099 182.639713238044
-164.931047030109 180.589211330965
-163.693383004918 176.035404095731
-162.823177004563 170.397612213358
-162.638930695055 166.523229273815
-163.033265844086 163.782365528855
-166.702510310303 165.473504989413
-172.856640344672 170.530602997565
-176.333463271793 172.463443850037
-180.66836098501 173.32518129538
-189.493538983406 173.327327935088
-193.834782565454 173.967367868056
-196.725811259765 175.662958524173
-201.810619223491 181.277966997371
-204.220901855034 183.410640094046
-212.131898033955 186.971514662839
-229.588986136204 193.072623799954
-235.653991247536 194.273368696243
-238.986532411589 194.474504916209
-242.270811207467 194.260025505631
-246.699389785245 192.9138223132
-249.048317309264 191.169894287677
-249.971912582802 190.001957402436
-250.927548137186 192.553313527462
-250.99347893028 195.397880898633
-250.275732234346 198.336185702307
-248.880335321645 201.168754124844
-246.913315464439 203.6961123526
-244.48069993499 205.718786571934
-241.68851600556 207.037302969205
-238.642790948412 207.45218773077
-232.611871104076 206.547848252193
-227.088729460976 204.509472455992
-221.897643697111 201.721658599199
-211.808750519086 195.436109731959
-206.559498460927 192.707571235575
-200.939412994004 190.767987706724
-194.772771796315 190.001957402436
-195.431694945476 192.789896984774
-196.554370979862 195.478776989641
-199.915031460883 200.607432415283
-204.302852752525 205.484071976006
-216.144387583123 217.204074665513
-219.78105537797 221.955826535083
-221.08773628824 224.393437502569
-221.961331792599 226.888229874628
-222.33285433019 229.452222188342
-222.032929124398 235.620092825015
-220.507177470962 241.572582210555
-219.201358736593 244.19537272475
-217.489173802573 246.437094474881
-215.337319472988 248.188672977188
-212.712492551924 249.34103374791
-217.061488412971 274.97520432392
-218.010770504543 282.739785242063
-218.343740480428 289.902731895723
-218.020237147368 294.536010738931
-217.465844325059 297.13892301682
-216.038493352722 300.135623261321
-214.726202828132 301.399433586728
-213.210835299629 302.137584996817
-209.787567178433 302.497057419875
-204.483949639492 301.969738869798
-197.725582016772 302.083647938323
-190.782699146704 301.210916562078
-184.428053393299 299.367745855971
-167.173201403072 292.120367857437
-165.267272007018 293.711880346741
-163.030205365915 294.855369212545
-182.03906259817 302.796520415569
-194.663379068865 308.502509120636
-209.926229727498 309.206189110655
-214.397212860354 310.40985774343
-218.232406630572 312.820045652369
-225.132299228883 310.060088613045
-222.335769256771 298.955071148216
-220.562407508879 286.734316347249
-220.023445542178 280.483397559676
-219.569021069598 268.256197438274
-219.62478322225 262.502204195613
-220.142460961589 256.234873709069
-221.594228743633 249.899666197753
-223.480907719461 245.568903126701
-225.190645801666 243.063275361855
-227.306759271318 240.975658261801
-230.724153907935 238.906238104915
-232.889976148981 237.974250023187
-237.154222585046 236.836859316308
-241.361880975293 236.476302662237
-245.552882538388 236.662244193819
-258.425258451393 238.195699230944
-262.948944892515 238.264274833597
-267.374401388274 237.370867872914
-277.829501898533 232.969373723758
-281.827253708128 232.838617082226
-284.679515209979 233.852694741705
-288.675535291994 236.547664174526
-290.375086645371 238.139589260492
-293.275926067399 241.720565663897
-296.677489260235 247.809582324758
-303.938784244363 264.757693589432
-305.911875780445 267.301750374019
-310.655846685107 270.85132662142
-312.709316981693 272.968940005722
-316.107601344199 280.88928761334
-317.985932503849 283.612213490693
-319.223567628455 284.430050344997
-321.229277883481 285.1098862989
-323.262521340853 285.471355272687
-327.382088654608 285.358990510918
-333.58344359269 283.551429961198
-339.634088043582 280.495842709052
-348.84239778758 274.826105518587
-351.941931104499 273.34405606244
-353.491097000986 273.298399185425
-354.969841259153 273.803086227759
-356.214280581479 274.923033713514
-356.752519134182 275.923075343146
-357.533810931624 279.003937092064
-357.535361393773 282.65403305201
-356.746059071597 285.135831622751
-355.061999656044 286.908006227767
-349.068897149279 287.968856883057
-337.582771493064 289.068123721339
-325.813469645807 289.700432960421
-318.970838565911 289.360410818112
-316.018215517781 295.094900900928
-313.450924487262 297.640281936085
-315.233396558509 304.371940092421
-316.764693857077 306.444461362464
-317.879605999183 306.959354611398
-319.610034258039 307.162553409962
-323.369786810819 306.667426667705
-334.913936184809 303.075828316384
-338.062773375845 303.067658598702
-339.949490552074 304.041173780513
-340.92578225685 305.28964845642
-341.642404609341 307.100430507877
-342.17767281271 312.259350620157
-341.607952075762 315.939665660339
-340.626822495372 317.548607723426
-339.759355708462 318.160963674658
-338.752515027556 318.459834642508
-336.428130587149 318.304776562733
-327.850141059552 314.783615156122
-325.765592553586 314.40256098642
-319.393762827032 315.032492710608
-315.119539985542 316.354961010984
-313.106502427626 317.764148602153
-311.107712427853 319.877996545069
-303.212019239462 331.298983680115
-299.293746592159 335.932128757807
-296.711460374689 338.005363661578
-291.052339564282 341.42294145455
-288.010184676919 342.78502028594
-281.587385201814 344.860097674003
-274.828865144786 346.128854503075
-264.365056391925 346.67532819273
-257.37412972766 346.238662612637
-247.211955543478 344.559551604599
-238.314421742198 357.811771604187
-237.022687633952 360.883188002652
-236.22443491357 364.547267354706
-235.979874406566 369.148668857432
-236.349216938457 375.032051707911
-239.729121462505 395.537732456351
-240.28248247597 403.811814395596
-239.999662070169 407.750840397066
-238.588431079961 415.235024112974
-236.443254061422 422.789547201961
-233.697351054022 430.345898462168
-230.483942097228 437.835566691732
-223.187486493341 452.340809251486
-215.619647565514 465.757185266337
-212.285504828735 470.817335918782
-208.087435752737 475.735769521281
-203.265482487723 479.739682713169
-199.383993895905 481.677574065971
-195.155557615615 482.506759201192
-73
-193.093354480403 439.190887495181
-194.143912921993 438.455776983732
-195.163050147871 437.5879938452
-196.149326224147 436.602793997842
-198.01753519233 434.341167849683
-199.737020355422 431.792945885317
-201.296262242301 429.080175450808
-202.683741381844 426.324903892218
-203.887938302932 423.64917855561
-204.897333534442 421.175046787048
-212.96336514272 400.318621948801
-215.09625309059 395.048553152922
-217.264208542482 389.922968892228
-219.461489241244 385.025303951574
-221.682352929728 380.438993115815
-222.747975198403 381.699953234216
-223.67233625807 383.213409078695
-224.466349130374 384.945904679482
-225.140926836957 386.863984066805
-225.706982399464 388.934191270895
-226.175428839539 391.12307032198
-226.863146438969 395.723020086054
-227.291383808399 400.396185600863
-227.892256268207 412.178499068045
-229.27223478787 412.178499068045
-229.924313918827 409.030419906501
-230.472892201738 405.835101644133
-231.293451885634 399.338310341614
-231.801725163978 392.759250209859
-232.065523361194 386.169046298239
-232.152657801701 379.638823656126
-232.032191827194 361.119293840545
-228.798975094759 361.456627776854
-225.864732200141 361.971161134157
-223.202780024069 362.658505356232
-220.786435447274 363.514271886852
-218.589015350485 364.534072169795
-216.583836614432 365.713517648834
-214.744216119844 367.048219767747
-213.043470747451 368.533789970307
-211.454917377982 370.165839700291
-209.951872892167 371.939980401474
-208.507654170736 373.851823517631
-205.688961543944 378.071062769972
-201.235037854873 385.322975855177
-196.036692889143 392.9018126415
-194.779929206236 394.876946549036
-193.652844854115 396.902163257555
-192.711714986471 398.986419225359
-192.012814756991 401.138670910748
-193.799866400048 399.89282091249
-195.412798547159 398.419036248983
-196.877291858214 396.752470829887
-198.219026993105 394.928278564859
-199.463684611724 392.981613363558
-200.636945373963 390.947629135642
-205.129633056947 382.641580150997
-206.331119435658 380.698309434882
-207.615292917339 378.878643150103
-209.00783416188 377.217735206317
-210.534423829174 375.750739513183
-212.220742579112 374.51280998036
-214.092471071586 373.539100517505
-212.644316264946 379.248905829625
-211.010797932356 384.983074470549
-207.350930883846 396.465835699191
-199.602696615133 419.078391666356
-196.488011515038 429.344134709337
-195.563806472572 431.938256099236
-194.527750979838 434.369829886136
-193.353026565193 436.55204514271
-192.012814756991 438.398090941626
-192.012814756991 439.778069461289
-131
-132.118947119091 402.119210079509
-134.268647737667 401.584609503115
-136.366166388425 400.922872429053
-138.414786231866 400.142023585146
-142.378462138811 398.255089499086
-146.18594074252 395.988005067521
-149.863487327013 393.404968113035
-153.437367176309 390.570176458214
-156.933845574428 387.547827925642
-160.379187805388 384.402120337904
-167.221524901908 377.99741928727
-170.671050335508 374.866821469543
-174.174500738026 371.86965588699
-177.758141393482 369.070120362195
-181.448237585894 366.532412717743
-185.271054599283 364.320730776219
-187.240441315099 363.357211263612
-189.252857717667 362.499272360207
-188.801616323467 362.155834048197
-188.004952206512 361.63421614989
-186.911382825736 360.96123710941
-185.569425640073 360.163715370881
-184.027598108456 359.268469378424
-182.334417689819 358.302317576163
-178.688068027218 356.264570318719
-175.018516323738 354.265021151534
-173.296333354003 353.346616962095
-171.713902250849 352.51821762759
-170.319740473209 351.806641592141
-169.162365480018 351.23870729987
-168.290294730209 350.841233194902
-167.752045682716 350.641037721358
-166.852631646478 350.479793417808
-165.897368034189 350.440185241996
-163.852014491871 350.672056336841
-161.681429876593 351.229009132396
-159.451059009185 352.003401755164
-155.0727378013 353.773938988349
-153.055677102484 354.554799851772
-151.240609434859 355.12253304842
-146.733550837576 356.262366145851
-141.982163270482 357.428467545194
-137.063609597408 358.527312336441
-132.055052682186 359.46537560958
-127.033655388645 360.149132454604
-122.076580580616 360.485057961502
-119.646277503616 360.493357428776
-117.26099112193 360.379627220265
-114.930366793537 360.132176722218
-112.664049876416 359.739315320883
-111.974060616585 360.429304580714
-113.058332970177 360.888926288393
-114.239566306405 361.246237832259
-115.502967772094 361.511262893733
-116.833744514066 361.694025154232
-119.638252414153 361.85285599798
-122.534747181253 361.802919814853
-125.404885989953 361.624406056197
-128.13032601484 361.397504173362
-130.592724430499 361.202403617695
-131.688300901927 361.141838041096
-132.673738411518 361.119293840545
-132.343654627252 362.02110424975
-131.92773034433 362.827982734046
-131.432828352741 363.547640256988
-130.865811442479 364.187787782132
-129.542884025895 365.260396693254
-128.013850414508 366.107497175862
-126.333612928246 366.790776938406
-124.557073887041 367.371923689336
-116.604677587956 369.794497443754
-112.076195282918 370.97559455066
-102.782196269073 373.052889574756
-98.1958515686015 374.01488491713
-93.769391411321 374.969643763178
-89.5924018013993 375.950064825491
-85.7544687430042 376.98904681666
-86.7359040841515 377.64044188988
-87.7715975832188 378.192475340598
-89.9898892335857 379.02306115695
-92.3776040510493 379.530011830548
-94.9030023925539 379.762534926227
-97.5343446150438 379.769838008821
-100.239891075463 379.601128643163
-105.746638137869 378.932502826426
-111.169326435325 378.150317994687
-113.769799439558 377.839659860275
-116.254038823387 377.648234666615
-118.590304943756 377.625249978539
-120.746858157609 377.81991336088
-122.69195882189 378.281432378474
-123.575295809487 378.627640114501
-124.393867293545 379.059014596153
-122.94998156845 379.954169204102
-121.336696427286 381.041553060235
-119.647841178863 382.294312099275
-117.977245131992 383.685592255947
-116.418737595485 385.188539464976
-115.066147878151 386.776299661087
-114.013305288802 388.422018779003
-113.354039136248 390.098842753451
-116.286631365814 388.955752733706
-119.280644728917 387.915433384973
-125.349536335767 385.989456015264
-131.353916916867 384.01360927377
-134.267291497783 382.910953210304
-137.086989432288 381.680591789932
-140.885329005251 379.756609185941
-144.629381387392 377.655816668497
-152.041734345642 373.203885894552
-155.75358980497 370.9927896387
-159.498267839912 368.884967470697
-163.297545892076 366.950440390865
-167.173201403072 365.259229399532
-166.292238283021 367.689452778085
-165.024877261648 370.208373799894
-163.412553585468 372.791621304713
-161.496702500997 375.414824132301
-159.31875925475 378.053611122414
-156.920159093242 380.683611114809
-154.342337262989 383.280452949242
-151.626729010506 385.81976546547
-148.814769582307 388.277177503251
-145.94789422491 390.628317902341
-143.067538184828 392.848815502496
-140.215136708578 394.914299143474
-137.432125042674 396.800397665031
-134.759938433631 398.482739906925
-132.240012127966 399.936954708912
-129.913781372194 401.138670910748
-129.913781372194 402.51864943041
-117
-213.71263972355 358.91561186538
-216.176442106327 358.226352212555
-221.195830052242 357.005749386743
-223.671792168329 356.351698749661
-226.072184081802 355.586676987065
-228.357194069134 354.649330366906
-230.4870104068 353.478305157136
-232.65765902013 351.872102205178
-234.795255529167 349.969408083953
-239.090234639354 345.852595422534
-241.307088443001 343.927501426754
-243.609832547349 342.283965350535
-244.802705837676 341.612941617326
-246.028202553646 341.066499466086
-247.290039645415 340.662702930839
-248.59193406314 340.419616045613
-248.246663505581 339.539314721264
-247.794046382996 338.768597516988
-247.244772177611 338.099276598322
-246.609530371654 337.523164130808
-245.123901886931 336.617813211393
-243.422676786643 335.987042083062
-241.591370928608 335.565348070134
-239.715500170641 335.287228496929
-237.88058037056 335.087180687766
-236.172127386181 334.899701966964
-235.774374095797 333.200621435763
-235.162711437527 331.798288299031
-234.353061152547 330.639199808312
-233.361344982034 329.669853215152
-232.203484667167 328.836745771096
-230.895401949122 328.086374727687
-229.453018569076 327.36523733647
-227.892256268207 326.619830848991
-228.173419490168 326.12498475706
-228.405037760921 325.715233154471
-228.855204441476 325.066453845501
-229.513886295229 324.504373778444
-230.006148532477 324.202996228248
-230.652213307532 323.859873809667
-230.371050085571 323.365027717736
-230.139431814819 322.955276115147
-229.689265134263 322.306496806177
-229.03058328051 321.74441673912
-228.538321043262 321.443039188923
-227.892256268207 321.099916770342
-228.56101677528 319.909096421435
-228.901529180568 319.201545801811
-229.27223478787 318.339959731018
-227.347247484016 317.484896598422
-225.228637021377 316.669917338114
-223.06185766249 315.999970014427
-220.992363669897 315.580002691694
-222.215589918411 318.861715664539
-223.150122751195 322.14445251753
-223.787860576426 325.397426961205
-224.120701802283 328.589852706101
-224.140544836942 331.690943462755
-223.839288088582 334.669912941705
-223.208829965381 337.495974853487
-222.241068875515 340.138342908639
-220.927903227162 342.566230817698
-220.139261946109 343.690124001985
-219.261231428501 344.748852291201
-218.292798975361 345.738567399162
-217.232951887709 346.655421039686
-216.08067746657 347.495564926589
-214.834963012964 348.255150773689
-213.494795827915 348.930330294803
-212.059163212443 349.517255203749
-210.527052467573 350.012077214342
-208.897450894324 350.410948040402
-207.169345793721 350.710019395743
-205.341724466785 350.905442994185
-203.413574214539 350.993370549543
-201.383882338004 350.969953775636
-199.676992155357 350.83544945622
-198.057221637816 350.578264062788
-196.51329405383 350.214617983379
-195.033932671849 349.760731606032
-192.223801587703 348.647119509683
-189.536614532982 347.36719087805
-186.882157655286 346.050708815447
-184.170217102217 344.827436426186
-181.310579021378 343.827136814579
-179.79718157917 343.451152770493
-178.213029560369 343.179573084937
-178.773506000878 344.936784198796
-179.423658048376 346.421775337519
-180.063222310005 347.716766118074
-180.591935392905 348.903976157431
-180.909533904216 350.065625072556
-180.915754451081 351.28393248042
-180.770765677577 351.940026749431
-180.510333640639 352.64111799799
-180.12192541616 353.397483678217
-179.593008080032 354.219401242234
-185.931375290618 355.859259683296
-189.117504103487 356.531696641524
-192.242764477097 356.919820888648
-193.765655270044 356.963675619866
-195.253032478214 356.884144022492
-196.698130609953 356.663790046253
-198.094184173607 356.285177640878
-199.434427677522 355.730870756095
-200.712095630043 354.98343334163
-201.920422539516 354.025429347214
-203.052642914288 352.839422722572
-204.255248609299 353.226317218346
-205.548225556834 353.533171124972
-208.227336709966 353.944325674325
-210.734063374668 354.148023377717
-211.811559711665 354.195556226892
-212.712492551924 354.219401242234
-212.033854426496 356.931148840887
-211.690532013615 358.2720567869
-211.332514032261 359.739315320883
-291
-202.217405038747 346.400356291123
-204.843560632505 345.849455313327
-206.411018364941 345.351244229581
-207.916253746249 344.717747786521
-209.355422901992 343.958774011206
-210.724681957734 343.084130930695
-212.020187039038 342.103626572046
-213.238094271468 341.027068962318
-214.374559780587 339.86426612857
-215.425739691958 338.62502609786
-216.387790131146 337.319156897247
-217.256867223714 335.956466553791
-218.700725871241 333.099854546582
-219.726564639048 330.133654292702
-220.303632531644 327.136330008622
-220.401178553534 324.186345910813
-220.260521176874 322.753626499406
-219.988451709228 321.362166215743
-219.58112627616 320.021773086882
-219.034701003233 318.742255139883
-218.34533201601 317.533420401804
-217.509175440056 316.405076899704
-216.522387400934 315.367032660641
-215.381124024206 314.429095711675
-214.081541435437 313.601074079864
-212.61979576019 312.892775792267
-210.992043124029 312.314008875942
-209.194439652516 311.874581357949
-207.223141471216 311.584301265347
-205.074304705692 311.452976625193
-202.912581563941 311.470363391992
-200.809930813237 311.596413170537
-196.67029881904 312.044888231715
-192.432313391247 312.539174746426
-190.206720848548 312.722488841888
-187.872879198005 312.820045652369
-187.437391287787 311.17081374907
-186.670090435411 309.625374079936
-185.605844336757 308.187008135366
-184.279520687706 306.858997405758
-182.725987184137 305.644623381509
-180.980111521933 304.547167553019
-179.076761396973 303.569911410685
-177.050804505137 302.716136444906
-174.937108542307 301.989124146079
-172.770541204362 301.392156004604
-170.585970187184 300.928513510878
-168.418263186653 300.601478155299
-166.302287898649 300.414331428266
-164.272912019054 300.370354820177
-162.365003243747 300.47282982143
-160.613429268609 300.725037922423
-159.280009380893 301.055309493671
-158.033677775712 301.485794044311
-155.739595874098 302.560867887083
-151.506972533872 304.961695161836
-149.317696939837 305.941311807094
-148.149970065339 306.300203459598
-146.912622626236 306.542972599791
-145.589983737814 306.647985678504
-144.166382515358 306.593609146567
-142.626148074155 306.358209454808
-140.953609529491 305.920153054058
-141.865745476057 305.159541942998
-142.941720033934 304.396712833422
-145.482545148717 302.852441960171
-148.370805204042 301.263423117195
-151.401220530106 299.605738987385
-154.368511457111 297.855472253631
-157.067398315256 295.988705598824
-158.252040321693 295.004160639429
-159.292601434741 293.981521705854
-160.163421695673 292.917799133461
-160.838841145764 291.810003257612
-161.283396177145 290.72482380689
-161.554612628249 289.611157700725
-161.674027599418 288.47268381362
-161.663178190994 287.313081020078
-161.336834636727 284.945204211696
-160.747878768178 282.536958271602
-160.068607388076 280.117774195824
-159.471317299151 277.717082980386
-159.12830530413 275.364315621313
-159.105996342687 274.215100574171
-159.211868205744 273.08890311463
-159.542924380369 271.634158978679
-160.026418527259 270.389386619308
-160.646120841251 269.330279272182
-161.385801517182 268.432530172967
-162.229230749887 267.671832557325
-163.160178734205 267.023879660923
-165.219711737022 265.968980968492
-169.674891334807 264.142622583731
-171.810861047161 262.982254662033
-172.799136563631 262.255199843681
-173.712632780078 261.397822101211
-174.593320549027 260.356992693324
-175.350809652733 259.271972123855
-176.587613951415 257.010518603932
-178.588481522842 252.410089766476
-179.718233143579 250.235758863987
-180.395432738825 249.216080257594
-181.177988886324 248.255113249021
-182.088757107823 247.36314811421
-183.150592925073 246.5504751291
-184.386351859822 245.827384569632
-185.818889433821 245.204166711747
-187.653155835035 244.621843211035
-189.368026460371 244.263205462986
-190.977305295846 244.1011620009
-192.494796327474 244.10862135808
-193.934303541269 244.258492067826
-195.309630923246 244.52368266344
-197.922962135805 245.291657645478
-200.44522185327 246.195814570603
-202.986841963756 247.019421705227
-204.29942213142 247.333290434354
-205.658254355383 247.54574731576
-207.077142621661 247.629700882746
-208.569890916268 247.558059668613
-209.976544647832 247.313848602452
-211.272466570139 246.893061467095
-212.46069222987 246.310136814984
-213.544257173707 245.579513198556
-214.52619694833 244.715629170252
-215.40954710042 243.73292328251
-216.19734317666 242.64583408777
-216.892620723729 241.468800138471
-217.498415288308 240.216259987053
-218.01776241708 238.902652185955
-218.809256553923 236.149987844474
-219.291387507706 233.326315533545
-219.488439651877 230.54714367268
-219.45753213922 229.394048234814
-219.314774829697 228.377451734494
-219.069881289101 227.480861390845
-218.732565083228 226.687784422992
-218.312539777872 225.981728050059
-217.819518938828 225.346199491173
-216.653344922852 224.220754692039
-215.311751561658 223.17950777859
-213.872447381601 222.090516503825
-212.413140909038 220.821838620744
-211.011540670325 219.241531882348
-209.869222254943 217.780422133784
-208.592920924069 216.222295790636
-207.210058675189 214.577474590131
-205.748057505787 212.856280269496
-202.696326395362 209.226059216744
-199.657103572676 205.414206530199
-196.849765017613 201.503296107678
-195.601607334153 199.536498588494
-194.493686710056 197.575901846999
-193.553425142805 195.631827620418
-192.808244629887 193.714597645979
-192.285567168788 191.834533660909
-192.012814756991 190.001957402436
-189.775942826754 189.999167279922
-187.804661653835 189.983220222052
-186.039304256814 189.936450811869
-184.420203654266 189.841193632417
-181.382104906904 189.434554297877
-179.843772799245 189.087841308874
-178.213029560369 188.621978882774
-177.645321437629 190.398855429795
-177.241160143287 192.221284603909
-176.823104706877 195.927615304151
-176.758116585302 199.590599924972
-176.845449112723 203.059867407843
-176.941610945524 204.484260335568
-177.140813151542 205.831570715015
-177.436858560012 207.106865834774
-177.823550000167 208.315212983434
-178.844082292461 210.551332521812
-180.15283266229 212.580467638863
-181.700223743519 214.443156643298
-183.436678170014 216.179937843831
-185.312618575641 217.831349549173
-187.278467594264 219.437930068039
-191.28158200596 222.678750781187
-193.219692666765 224.394067592896
-195.049402476027 226.226706452978
-196.721134067613 228.217205670145
-198.185310075388 230.406103553111
-199.392353133216 232.833938410588
-199.883956878984 234.15012542624
-200.292685874964 235.541248551288
-193.545277426691 231.623755478203
-190.084695694706 229.784829734956
-186.522003218484 228.116733788477
-182.824055693772 226.687679589696
-178.957708816314 225.565879089541
-176.951028025228 225.141515211114
-174.88981828186 224.819544238943
-172.769936548179 224.608492666893
-170.587239786153 224.51688698883
-168.449895106478 224.548060396129
-166.251283557376 224.740828002758
-164.102652142202 225.162674839792
-162.115247864313 225.881085938303
-161.216770590399 226.372592157823
-160.400317727064 226.963546329365
-159.679795149728 227.662384081813
-159.06910873381 228.47754104405
-158.58216435473 229.417452844963
-158.232867887907 230.490555113433
-158.035125208761 231.705283478346
-158.002842192711 233.070073568586
-158.208149185551 234.534433334367
-158.685568281321 236.073106670231
-159.3903092662 237.672571369545
-160.277581926367 239.319305225678
-162.420561417278 242.700491581866
-164.756185043483 246.108488085736
-166.926131094412 249.435117084226
-167.836999494594 251.034113252372
-168.572077859493 252.572200924276
-169.086575975288 254.035857893305
-169.335703628156 255.411561952826
-169.274670604278 256.685790896207
-168.858686689831 257.845022516815
-167.976038722059 259.202182469484
-166.924641028062 260.424113763656
-165.723734789997 261.520830042803
-164.39256119002 262.502344950397
-162.950361410286 263.378672129912
-161.416376632952 264.15982522482
-158.150016814105 265.476663734703
-154.747411190727 266.532969627828
-151.362489220065 267.408852051975
-148.149180359367 268.184420154925
-145.261414065879 268.939783084457
-142.420075307561 269.951741101841
-139.664599489728 271.302226322152
-137.017783148452 272.954868067072
-134.502422819805 274.873295658284
-132.14131503986 277.021138417469
-129.957256344689 279.362025666311
-127.973043270365 281.859586726491
-126.21147235296 284.477450919692
-125.392155868592 285.943648472272
-124.74588543362 287.392396759569
-124.263394100175 288.824285651704
-123.935414920391 290.239905018796
-123.752680946398 291.639844730967
-123.705925230328 293.024694658338
-123.983280780488 295.751484639163
-124.693345987924 298.424993922235
-125.761985269692 301.049941468523
-127.115063042847 303.631046238991
-128.678443724444 306.173027194607
-129.165579722795 306.852472628271
-129.789316919648 307.609243593173
-130.541314356317 308.437478436559
-131.413231074115 309.331315505675
-132.396726114355 310.284893147767
-133.483458518351 311.292349710081
-135.933271582865 313.445452984358
-138.695942598164 315.743732106475
-141.704743894756 318.140293854397
-144.892947803147 320.588245006093
-148.193826653847 323.04069233953
-154.866698504199 327.771502663497
-158.105236164867 329.956079209962
-161.189538089872 331.957579050038
-164.052876609724 333.729108961692
-165.380832196 334.513981062475
-166.628524054928 335.223775722891
-167.787611227821 335.852631290185
-168.849752755993 336.394686111604
-169.806607680757 336.844078534392
-170.649835043427 337.194946905797
-172.777202695883 337.869967836935
-175.044877934395 338.358508166765
-177.386351661201 338.69031753828
-179.735114778539 338.895145594475
-182.02465818865 339.002741978345
-184.188472793772 339.042856332885
-186.160049496144 339.045238301088
-187.872879198005 339.03963752595
-188.171805854224 340.437325233041
-188.642843813976 341.673679206121
-189.270876110317 342.755497414037
-190.040785776301 343.68957782564
-190.937455844985 344.482718409777
-191.945769349423 345.141717135299
-193.050609322671 345.673371971052
-194.236858797785 346.084480885886
-195.48940080782 346.38184184865
-196.793118385831 346.572252828193
-199.493612378004 346.659416713009
-29
-152.988868110899 338.396877680464
-152.439623873772 336.403511260431
-151.732534656147 334.449123116933
-150.8744516191 332.543319581387
-149.872225923709 330.695706985212
-148.732708731051 328.915891659826
-147.462751202205 327.213479936646
-146.069204498247 325.598078147093
-144.558919780255 324.079292622582
-142.938748209306 322.666729694534
-141.215540946478 321.369995694365
-139.396149152848 320.198696953494
-137.487423989493 319.16243980334
-135.496216617491 318.27083057532
-133.42937819792 317.533475600852
-131.293759891856 316.959981211356
-133.055529455923 321.088541125494
-134.866090812572 324.94160993657
-136.843646276263 328.486060973279
-137.931985021518 330.132202741463
-139.106398161456 331.688767564315
-140.381660985385 333.151614607923
-141.772548782611 334.516603038372
-143.293836842443 335.779592021751
-144.960300454189 336.936440724145
-146.786714907154 337.983008311641
-148.787855490648 338.915153950327
-150.978497493978 339.728736806288
-153.37341620645 340.419616045613
-25
-317.332597920164 313.734520939344
-321.159526328874 313.124776494591
-322.927561956267 312.734671881724
-324.554284660495 312.31181663648
-326.006424037665 311.87426397982
-327.250709683884 311.440067132707
-326.058601763584 310.942986344301
-324.696332862888 310.51471614545
-323.187605575543 310.149785223346
-321.556122495298 309.842722265185
-318.019699331096 309.380314989466
-314.276684120264 309.083723815844
-310.516697612787 308.909178241872
-306.929360558645 308.812907765103
-303.704293707823 308.751141883089
-302.286868093026 308.7195198831
-301.031117810302 308.680110093383
-301.899817012028 310.091164304081
-303.026448137304 311.252829230858
-304.377740782237 312.183158094676
-305.920424542934 312.900204116496
-307.621229015503 313.422020517281
-309.44688379605 313.766660517993
-311.364118480683 313.952177339593
-313.339662665508 313.996624203043
-17
-332.25952210207 287.592557504722
-333.758711530042 287.467706253873
-336.674070470958 287.050654543714
-339.670516360843 286.600453778788
-339.670516360843 286.384832135091
-339.670516360843 285.910464518957
-339.670516360843 285.436096902823
-339.670516360843 285.220475259126
-337.791727398372 285.319397454713
-336.109748002438 285.464343302601
-334.572789550893 285.65513294476
-333.129063421592 285.891586523161
-330.314153641132 286.500766056578
-328.83939274568 286.873132295535
-327.250709683884 287.290443038619
-329.034288204342 287.532423380572
-330.694303335287 287.623629041447
-62
-278.035598720784 322.278705894186
-279.23976848966 322.122642579257
-280.415283669944 321.831558130553
-281.534636636657 321.408173313629
-282.570319764822 320.85520889404
-283.494825429462 320.175385637343
-284.280646005598 319.371424309093
-284.900273868255 318.446045674845
-285.326201392453 317.401970500156
-285.922573762097 315.015229569675
-286.342445939909 312.629857303685
-286.749426836658 307.865520235385
-286.740618315937 303.113562235671
-286.509494610988 298.378586244961
-286.249529955048 293.66519520367
-286.154198581357 288.977992052215
-286.416974723155 284.321579731012
-286.74311381025 282.006358550635
-287.231332613681 279.700561180477
-284.82820296445 278.923268138781
-282.306889814964 278.520537345674
-279.716301588006 278.472192718821
-277.105346706361 278.758058175889
-274.522933592812 279.357957634543
-272.017970670142 280.251715012448
-269.639366361135 281.419154227272
-267.436029088575 282.840099196678
-265.456867275245 284.494373838333
-263.750789343929 286.361802069903
-262.36670371741 288.422207809054
-261.353518818472 290.65541497345
-260.760143069898 293.041247480758
-260.636167509118 294.285093212275
-260.635484894472 295.559529248644
-260.76420877881 296.862033579574
-261.028452714979 298.190084194772
-261.434330255826 299.541159083949
-261.9879549542 300.91273623681
-262.836170800924 302.538748927872
-263.794358104989 303.980323042771
-264.842544544239 305.259179422681
-265.960757796522 306.397038908776
-268.327375451562 308.336650564211
-270.734432492871 309.972924738462
-273.022150343212 311.479628160916
-275.030750425347 313.030527560959
-275.88045049795 313.87685285551
-276.600454162037 314.799389667977
-277.170789095454 315.819858839535
-277.571482976045 316.959981211356
-275.913189873879 317.456304768073
-273.963532430766 317.872871324378
-272.092877110715 318.177987454087
-271.30291476684 318.278847413286
-270.671590377735 318.339959731018
-271.114722356163 319.362013046297
-271.749260745818 320.227279103356
-272.547697921723 320.938478667749
-273.482526258901 321.498332505033
-274.526238132373 321.909561380763
-275.651325917163 322.174886060495
-276.830281988292 322.297027309784
-27
-298.957011029202 284.843757331696
-299.464909026496 284.546991651835
-300.107978115408 284.05154013826
-300.522627791936 283.450566925287
-300.74500152375 283.021899121178
-301.031117810302 282.460518219802
-306.551031888951 283.840496739464
-306.053105777686 282.524818165707
-305.390557532298 281.340277266336
-303.791088536789 279.164160210009
-302.963914735487 278.072359912682
-302.191612697699 276.911249009
-301.529055897834 275.630715428777
-301.031117810302 274.180647101829
-299.434611890494 274.336857289872
-298.09417622203 274.546005669902
-296.937350638538 274.808592351907
-295.891674973647 275.125117445875
-293.843932734183 275.921983309656
-292.696945826867 276.403324299446
-291.371268172667 276.940604141153
-292.072310667319 277.976332344283
-292.893371412384 278.980560718985
-294.747764913004 280.957092318025
-296.638883193034 282.995347608123
-297.50584991236 284.076730596646
-298.271160770978 285.220475259126
-15
-289.635924719546 274.458952724616
-289.267365293476 273.551006139856
-288.844405145903 272.798734659303
-288.325838047938 272.164087075047
-287.670457770691 271.609012179182
-286.837058085271 271.095458763798
-285.78443276279 270.585375620988
-284.471375574356 270.040711542842
-283.715490358126 272.012040320999
-283.091397054694 274.180647101829
-284.003949703758 274.513377782531
-284.830851540128 274.779712007593
-286.370395214872 275.15442207879
-287.995412959105 275.387239291422
-289.991289653005 275.560625621491
-21
-243.515577260075 274.098976705831
-243.744123608269 272.668169938999
-243.801799167684 271.264451446009
-243.732744076932 269.884067351876
-243.391002499375 267.178286860236
-243.072019984491 264.520797464193
-241.679977498333 264.788831131022
-240.603252411091 265.117581823963
-239.759836867788 265.512327926824
-239.067723013448 265.978347823411
-237.809368951749 267.145322532997
-237.079113034436 267.85683411361
-236.172127386181 268.66073302318
-236.786019244911 269.866361579901
-237.430189764517 270.939002792648
-238.125013145426 271.896130050276
-238.890863588066 272.755216741637
-239.748115292865 273.533736255585
-240.717142460251 274.249161980974
-241.81831929065 274.918967306658
-243.072019984491 275.560625621491
-17
-250.643158453983 273.381512379347
-252.731869622127 272.800668582166
-251.954040263391 267.750391702645
-251.588709509577 265.318788773319
-251.351891102464 263.140818944531
-250.15452490713 263.478208259559
-249.150311466233 263.879140400373
-248.327142871833 264.340073331299
-247.672911215991 264.857465016664
-247.175508590767 265.427773420793
-246.822827088219 266.047456508011
-246.602758800408 266.712972242645
-246.503195819394 267.420778589022
-246.617154145995 268.949094974302
-247.0678388045 270.604069378459
-247.758386531389 272.357365516099
-248.59193406314 274.180647101829
-19
-256.735758291103 267.756950231635
-257.693409878823 266.726867487512
-258.404144347752 265.590249279506
-258.90732462103 264.366860096312
-259.242313621797 263.076464426624
-259.448474273193 261.738826759137
-259.631762220437 259.000883385545
-258.441134185822 259.226141434236
-257.418794765304 259.508876974425
-256.555307314781 259.847587188039
-255.841235190152 260.240769257005
-255.267141747317 260.686920363249
-254.823590342172 261.184537688696
-254.501144330618 261.732118415274
-254.290367068552 262.328159724909
-254.166072216481 263.659612821053
-254.375212633148 265.166874432539
-254.842295165742 266.837922014778
-255.491826661451 268.66073302318
-21
-237.262647570023 262.980038321707
-238.217043279891 262.81698685205
-239.859405306197 262.481917813254
-241.383101522072 262.131304710181
-243.072019984491 261.760840424869
-242.294190625756 256.710563545347
-241.928859871942 254.278960616021
-241.692041464829 252.100990787234
-240.472010492882 252.333157698523
-239.389047990849 252.636693878847
-238.438783182092 253.009386551944
-237.616845289974 253.449022941548
-236.918863537855 253.953390271398
-236.3404671491 254.520275765228
-235.877285347069 255.147466646777
-235.524947355125 255.832750139779
-235.279082396631 256.573913467973
-235.135319694948 257.368743855094
-235.136617955467 259.110554701062
-235.493875923578 261.040480467578
-236.172127386181 263.140818944531
-29
-253.831786669986 257.037312557602
-254.803735756725 256.405111678748
-256.483991413041 255.031303092437
-258.013159323478 253.572316873187
-259.631762220437 252.100990787234
-260.2850655045 252.87769274165
-261.035426678001 253.483964766875
-261.864200123467 253.943349352576
-262.752740223426 254.27938898842
-264.634537916935 254.675603369203
-266.531654818748 254.860947826558
-266.016971327659 253.966715638707
-265.380944395045 253.181103309561
-264.637174708628 252.496527656769
-263.799262956129 251.905405497976
-262.880809825271 251.400153650831
-261.895416003774 250.973188932978
-259.778209039752 250.323788155742
-257.556447565837 249.896537707442
-255.338937083802 249.630772129254
-253.23448309542 249.465825962351
-251.351891102464 249.34103374791
-251.412660361764 250.767453004248
-251.482482045884 251.977488783186
-251.572791093221 253.023413485341
-251.695022442175 253.957499511327
-252.080991798526 255.699245137252
-252.367599682721 256.611449538422
-252.731869622127 257.620904865882
-20
-246.7026230671 260.026540712013
-247.75118875355 259.64800107767
-249.971912582802 259.000883385545
-249.784998255371 256.873331671894
-249.519931677086 255.040691767356
-249.119278652322 253.486946411511
-248.525604985456 252.196078343936
-247.681476480864 251.15207030421
-246.529458942922 250.338905031911
-245.820043600312 250.013883039665
-245.012118176006 249.740565266618
-244.09850339555 249.516949555217
-243.072019984491 249.34103374791
-243.24721426305 251.014729413714
-243.495996383754 252.467847731891
-243.805829618583 253.768717783948
-244.164177239513 254.985668651392
-244.976268727591 257.441129158476
-245.404939138696 258.816296961132
-245.831977023816 260.380861905207
-185
-247.386548785038 287.219749379499
-249.549273749485 286.951896682471
-251.748804462518 286.505715794697
-253.979084514711 285.874556602883
-257.317857961692 284.639462204026
-260.478198906359 283.179157372496
-263.455479585603 281.535519024304
-266.245072236319 279.750424075462
-268.842349095397 277.865749441983
-271.242682399733 275.923372039877
-273.441444386218 273.965168785157
-275.434007291744 272.033016593835
-277.215743353206 270.168792381922
-278.782024807496 268.41437306543
-280.128223891507 266.811635560371
-281.249712842131 265.402456782756
-282.141863896262 264.228713648599
-282.800049290792 263.332283073909
-283.219641262615 262.7550419747
-283.338518539039 262.599204014654
-283.396012048622 262.538867266983
-285.204720624796 261.988503996254
-287.075844399608 261.738715009792
-288.985416490042 261.728585626951
-290.909470013082 261.897201167089
-294.705153824915 262.52700829372
-296.528850347676 262.866370518926
-298.271160770978 263.140818944531
-298.825843350656 265.146140905064
-299.516069657679 267.209429179842
-301.031117810302 271.420690062504
-302.22193815921 270.751929555431
-302.929488778834 270.411417150144
-303.791074849627 270.040711542842
-302.880241931229 267.772034579982
-302.117867835405 265.280720149941
-300.814802877969 260.00388152633
-300.162265399605 257.40520865177
-299.434493510308 254.957600948046
-298.575563901701 252.754484074664
-298.079438918789 251.773805217946
-297.529553265409 250.889283691127
-296.895248373814 250.099170345571
-296.177425306965 249.419401093982
-295.385588485054 248.843837308862
-294.529242328272 248.366340362711
-292.66103969086 247.680992477328
-290.648852756261 247.314248417845
-288.568716886005 247.216999164276
-286.496667441624 247.340135696633
-284.508739784649 247.634548994931
-282.68096927661 248.051130039182
-280.256539631278 248.859024861898
-278.055985847376 249.901838039176
-276.052516235449 251.153380233007
-274.219339106043 252.587462105377
-272.529662769704 254.177894318276
-270.956695536979 255.898487533692
-269.473645718411 257.723052413614
-268.053721624547 259.62539962003
-265.296083853114 263.558683660298
-262.469448707044 267.488824950404
-260.963277894885 269.387243719118
-259.359482670704 271.206308786257
-257.631271345046 272.91983081381
-255.751852228457 274.501620463765
-253.370211764439 276.1470938189
-250.976201516647 277.452028679854
-248.590769744934 278.422096911092
-246.23486470915 279.062970377078
-243.929434669148 279.380320942278
-241.695427884778 279.379820471156
-239.553792615892 279.067140828177
-237.525477122343 278.447953877807
-235.63142966398 277.527931484509
-233.892598500656 276.31274551275
-232.329931892222 274.808067826994
-230.96437809853 273.019570291706
-229.816885379431 270.95292477135
-228.908401994777 268.613803130393
-228.259876204418 266.007877233298
-227.892256268207 263.140818944531
-229.27223478787 263.140818944531
-229.613465323926 263.761935281331
-229.892763897093 264.239028352211
-230.391579991315 264.891407395542
-231.020712743645 265.3584814732
-231.462907139448 265.603943336986
-232.032191827194 265.900775983856
-232.076215002084 261.710610759525
-232.163409824206 259.77936168664
-232.345820777328 257.947263499957
-232.662268342363 256.206762594489
-233.151573000223 254.550305365247
-233.852555231819 252.970338207244
-234.804035518063 251.459307515492
-236.127821130095 249.9714634055
-237.747693278591 248.661443190954
-239.619038865574 247.532333198745
-241.697244793064 246.587219755761
-243.937697963086 245.829189188894
-246.295785277661 245.261327825033
-248.726893638811 244.886721991069
-251.186409948559 244.708458013891
-253.629721108927 244.729622220389
-256.012214021938 244.953300937453
-258.289275589614 245.382580491974
-260.416292713977 246.020547210841
-262.34865229705 246.870287420944
-264.041741240854 247.934887449174
-265.450946447413 249.217433622419
-266.531654818748 250.721012267572
-269.146226405066 249.920308395156
-271.710177621063 248.898117043774
-276.771967190191 246.498372566426
-279.312679667371 245.275369771618
-281.88852002233 244.139980160158
-284.520925317092 243.169478897625
-287.231332613681 242.441141149599
-286.993655409176 241.225545876895
-286.675676725724 240.158812261272
-286.281690932249 239.234025955685
-285.815992397676 238.444272613092
-285.282875490931 237.78263788645
-284.686634580938 237.242207428715
-284.031564036622 236.816066892844
-283.321958226908 236.497301931795
-281.756318286985 236.154241345988
-280.024069712569 236.157710894948
-278.159567455058 236.45239580233
-276.197166465852 236.98298129179
-274.171221696351 237.694152586983
-272.116088097953 238.530594911563
-268.055674220063 240.358033543507
-266.11910384337 241.238400298181
-264.290764443377 242.022778976863
-262.605010971483 242.655854803207
-261.096198379088 243.08231300087
-260.433105605721 243.170058591324
-259.693109749648 243.171606534839
-258.023849650106 242.958162906098
-256.171299801903 242.526088964736
-254.21834192648 241.959491560845
-252.247857745276 241.342477544516
-250.342728979732 240.759153765841
-248.585837351289 240.293627074911
-247.060064581386 240.030004321817
-245.914362200981 239.966900757673
-244.697892252459 239.990433804262
-242.107398704609 240.282339967501
-239.39808204493 240.875583287264
-236.679440380517 241.740024239282
-234.060971818463 242.845523299283
-231.652174465863 244.161940942998
-229.56254642981 245.659137646158
-228.671639063956 246.466109543694
-227.901585817399 247.30697388449
-226.362405972869 249.317839435332
-225.035667750257 251.343230081011
-223.915314740139 253.376495708231
-222.99529053309 255.410986203697
-222.269538719683 257.440051454113
-221.732002890493 259.457041346182
-221.376626636096 261.455305766609
-221.197353547066 263.428194602098
-221.188127213978 265.369057739353
-221.342891227406 267.271245065077
-221.655589177925 269.128106465976
-222.120164656111 270.932991828752
-222.730561252537 272.67925104011
-223.480722557778 274.360233986755
-224.364592162409 275.969290555389
-225.376113657005 277.499770632718
-226.50923063214 278.945024105445
-227.75788667839 280.298400860274
-229.116025386328 281.553250783909
-230.57759034653 282.702923763055
-232.136525149571 283.740769684415
-233.786773386024 284.660138434694
-235.522278646465 285.454379900595
-237.336984521468 286.116843968822
-239.224834601609 286.64088052608
-241.179772477462 287.019839459073
-243.195741739601 287.247070654504
-245.266685978601 287.315923999078
-170
-111.716622053231 320.791646203484
-111.404859561733 319.202925666531
-110.645062764256 316.273990977915
-109.748070164047 313.59293269732
-108.767281700999 311.059592297911
-106.767916945957 306.035431035304
-105.856140533749 303.344293118436
-105.074168018275 300.40023897541
-106.385588174677 299.957523522833
-107.863088185045 299.558040807473
-109.32610663169 299.234662546166
-110.594082096923 299.020260455748
-110.891396196273 297.398395535356
-111.080884227899 295.701616687012
-111.214539656382 292.13574534709
-111.15136351918 288.427502717231
-111.047670953104 284.68174507868
-111.059777094964 281.003328712685
-111.158103161622 279.222141094785
-111.343997081568 277.497109900493
-111.636998246902 275.841342164962
-112.056646049726 274.26794492335
-112.622479882141 272.790025210812
-113.354039136248 271.420690062504
-113.635202358208 271.915536154435
-113.866820628961 272.325287757024
-114.316987309517 272.974067065994
-114.975669163269 273.536147133051
-115.467931400517 273.837524683247
-116.113996175572 274.180647101829
-117.146035459264 272.354601798094
-118.444211489389 270.601731888567
-119.963900331523 268.911708954821
-121.660478051244 267.274204578429
-125.405804385756 264.115437824005
-129.323199017543 261.042804277885
-133.055670471225 257.97367659266
-134.74100017022 256.414606401817
-136.246227271421 254.825427420918
-137.526727840405 253.195811231538
-138.537877942749 251.515429415251
-139.235053644031 249.773953553629
-139.573631009829 247.961055228247
-141.370484432915 248.350480319657
-143.393878969256 248.775817193924
-147.823274501711 249.637013890175
-150.080767057829 250.024267511733
-152.267783847211 250.350220515294
-154.310070649859 250.590569800644
-156.133373245775 250.721012267572
-155.546122119161 249.69433612793
-154.828100112097 248.792219423022
-153.99946568616 247.995126223185
-153.080377302928 247.283520598758
-151.051472510886 246.038628357486
-148.902653428587 244.901255261907
-146.795187748647 243.715113874727
-145.807358588505 243.054915247631
-144.890343163684 242.323916758649
-144.064299935761 241.502582478118
-143.349387366314 240.571376476376
-142.765763916919 239.510762823761
-142.333588049153 238.301205590612
-144.046527044604 238.838162368914
-145.506368331171 239.502706199111
-146.779773744257 240.277547811898
-147.933405119267 241.145397937967
-150.147993096672 243.090966652722
-151.342273369876 244.134106702796
-152.683426946619 245.201098188923
-152.721133067315 244.108665354708
-152.631364912288 243.247769329078
-152.39513045947 242.328553843624
-152.216153364491 241.756496219585
-151.993437686788 241.061162629936
-153.184258035695 240.392402122864
-153.89180865532 240.051889717576
-154.753394726113 239.681184110274
-154.33976530134 238.353021058412
-154.018564602391 236.877186528594
-153.606381707352 233.748237152261
-153.491865673958 232.227989364329
-153.422710691778 230.82580421561
-153.38714984216 229.608115235395
-153.37341620645 228.641355952977
-151.057985614338 228.759827166239
-148.759835915395 228.977403404923
-146.530035252692 229.350820065106
-144.419651769296 229.936812542869
-142.479753608277 230.792116234289
-141.589695318367 231.338489596396
-140.761408912703 231.973466535447
-140.001277909167 232.704138975952
-139.315685825643 233.53759884242
-138.711016180015 234.480938059362
-138.193652490167 235.541248551288
-137.069515886352 235.202992609308
-136.136997438186 234.892807709758
-135.197822626264 234.561848601057
-134.05371693118 234.161270031626
-133.501739989104 234.84258970832
-132.884999904153 235.386593332237
-132.21096703622 235.80570374271
-131.487111745202 236.112343779068
-129.919815333491 236.437904086773
-128.242873548181 236.462656970005
-124.79910537342 236.007271321667
-123.151804742294 235.725898219405
-121.633910254221 235.541248551288
-121.527931449165 236.774009918647
-121.421695826277 237.768304248794
-121.170957185583 239.306840276119
-120.806700449292 240.687553590606
-120.558567206909 241.484569529705
-120.253931734558 242.441141149599
-118.262588348117 241.75566073212
-116.206824854609 240.936490314671
-114.104647021583 240.179656054855
-111.974060616585 239.681184110274
-110.837688586486 242.936590495057
-110.014322635743 246.288745339126
-108.846731352521 253.081771967889
-108.272567210142 256.421879533962
-107.551531527317 259.657207122083
-106.568654899095 262.737372622944
-105.943098291413 264.203525181492
-105.208967920525 265.611993927233
-104.247302702356 266.940009545447
-103.08202579786 268.041604247812
-101.76573212905 268.981596428663
-100.351016617939 269.824804482334
-97.4366997568622 271.480141785477
-96.0422882509211 272.421907823618
-94.7598345907282 273.526163311917
-93.2413454229418 275.21288727012
-91.9950224331478 276.954295167224
-91.0070984233378 278.742162695093
-90.2638061955037 280.568265545591
-89.7513785516373 282.424379410581
-89.4560482937305 284.302279981927
-89.364048223775 286.193742951492
-89.4616111437628 288.090544011139
-89.7349698556856 289.984458852733
-90.1703571615352 291.867263168135
-90.7540058633035 293.730732649211
-91.4721487629824 295.566642987823
-92.3110186625636 297.366769875835
-93.2568483640389 299.12288900511
-95.4143183806394 302.470206754903
-94.3236237047541 302.452766366363
-93.4108928642509 302.241072232765
-92.6197450987382 301.873136526801
-91.8937996478244 301.386971421165
-90.4119926482277 300.212001701645
-89.5433695787617 299.599221433147
-88.5144257823285 299.020260455748
-88.9641466646902 301.259737429554
-89.6055278223047 303.370198215384
-90.4265422331827 305.357196287899
-91.4151628753355 307.226285121761
-92.5593627267738 308.98301819163
-93.8471147655088 310.632948972171
-95.2663919695514 312.181630938043
-96.8051673169125 313.634617563908
-98.4514137856031 314.997462324429
-100.193104353634 316.275718694266
-102.018211999017 317.474940148083
-103.914709699762 318.60068016054
-107.873767179383 320.653929760021
-111.974060616585 322.479895290004
-137
-90.3501905025782 270.766488664139
-92.4220841054448 270.006852820221
-94.3723174814129 268.900196528224
-96.180661854419 267.490494208045
-97.8268884483992 265.821720279584
-99.2907684872897 263.937849162739
-100.552073195027 261.882855277409
-101.590573795546 259.700713043493
-102.386041512785 257.43539688089
-102.918247570679 255.130881209499
-103.166963193164 252.831140449219
-103.111959604177 250.580149019948
-102.733008027654 248.421881341586
-102.00987968753 246.400311834031
-100.922345807743 244.559414917181
-99.9020712580766 243.290028188491
-98.7969015867353 242.127676803919
-97.6152825190558 241.063277506432
-96.3656597803744 240.087747038994
-93.6961861913516 238.366959566132
-90.8560466223576 236.892648329058
-87.9128068760834 235.592147271497
-84.9340327552198 234.392790337174
-81.9872900624577 233.221911469815
-79.1401446004879 232.006844613144
-78.7878873789309 231.81621683352
-78.3501619713053 231.528003210525
-77.833000484081 231.148340337064
-77.2424350237276 230.68336480604
-75.8652206095125 229.52202214292
-74.2667755804176 228.093067964401
-72.4953567882005 226.445595013716
-70.5992210846189 224.628696034099
-66.6258263503928 220.682990961001
-62.7326461918003 216.648694690977
-60.9367787077609 214.721056715202
-59.3057354229027 212.918549169897
-57.8877731889836 211.290264798295
-56.7311488577611 209.885296343629
-56.2659186718353 209.281897067409
-55.8841192809928 208.752736549135
-55.5917827917033 208.303951381712
-55.3949413104365 207.941678158044
-58.2930716931979 208.5859423362
-61.0790691422425 209.681084359426
-63.71533365467 211.180694774672
-66.1642652275804 213.038364128884
-68.3882638580732 215.207682969008
-70.3497295432484 217.642241841992
-72.0110622802056 220.295631294783
-73.3346620660447 223.121441874328
-75.1984270549694 222.521990862396
-76.9109911359058 221.731840756323
-78.5148499329432 220.791936880274
-80.0524990701705 219.743224558413
-83.0991508615516 217.483155873905
-84.6931447638835 216.353690159586
-86.3909115027618 215.279197296109
-87.5657081332462 214.678186705122
-88.7604073296916 214.223975760754
-91.1870718476753 213.672731552784
-93.6260219111328 213.459022154018
-96.0323743744839 213.416405046278
-98.3612460921485 213.378437711383
-100.567753918547 213.178677631152
-101.611095389527 212.966112024605
-102.607014708098 212.650682287407
-103.549901481062 212.211583104786
-104.434145315223 211.628009161968
-105.318948102318 210.80992789276
-105.970299824454 209.929900244148
-106.404676447605 209.002152285219
-106.638553937743 208.040910085057
-106.688408260843 207.060399712748
-106.570715382879 206.074847237378
-106.301951269823 205.098478728031
-105.89859188765 204.145520253794
-105.377113202333 203.230197883751
-104.753991179846 202.366737686988
-103.268720987256 200.852308089643
-101.574589037669 199.716040014442
-99.8034030588756 199.071742014068
-97.554624064031 198.891249173312
-95.3075936868984 199.18244648838
-93.0601840712912 199.816520760572
-90.8102673610226 200.664658791191
-86.2944012317547 202.487873332914
-84.024196100382 203.20532344662
-81.7429724496013 203.621584523958
-79.8819996020269 203.699057525821
-77.7665142794679 203.618172494624
-75.4388499081468 203.411288635697
-72.9413399142858 203.110765154371
-67.6061167638337 202.358236145846
-62.0995122378905 201.619459111697
-59.3877755246657 201.33612559834
-56.760193746235 201.15330769457
-54.259100328821 201.103364605718
-51.926828698646 201.218655537115
-49.8057122819323 201.531539694091
-47.9380845049023 202.074376281977
-47.1125580519631 202.442138989178
-46.3662787937783 202.879524506105
-45.7045384086255 203.390577733425
-45.1326285747826 203.979343571805
-44.4310495200556 204.905796541255
-43.8040297927695 205.908197977356
-42.7668379237167 208.104794165059
-42.0073921740182 210.497027966013
-41.5120317500677 213.012795211314
-41.2670958582589 215.57999173206
-41.2589237049857 218.126513359348
-41.4738544966419 220.580255924275
-41.8982274396211 222.869115257939
-42.5157519441498 224.739974327662
-43.3735734672872 226.388518883799
-44.4223840190915 227.871642139485
-45.6128756096209 229.246237307855
-48.2216699470874 231.897416235197
-49.5413567141408 233.28778642044
-50.805492560152 234.797201370913
-52.2681499349095 236.769282727047
-53.8794157631222 239.043230819496
-55.628363817557 241.562785451657
-57.5040678709809 244.271686426923
-59.4956016961609 247.11367354869
-61.592039065864 250.032486620352
-66.0559195299076 255.875549826944
-68.401510169782 258.687279568664
-70.8082994452475 261.350794473859
-73.2653611290711 263.809834345925
-75.7617689940198 266.008138988256
-78.2865968128606 267.889448204248
-80.8289183583604 269.397501797296
-83.3778074032863 270.476039570794
-85.9223377204053 271.068801328138
-88.1768654488772 271.135129640077
-18
-57.1273203963465 184.066986130674
-58.9991675530563 183.333405251875
-60.9150482806961 182.327359100005
-62.7795280793959 181.094906087681
-64.4971724492857 179.682104627519
-65.9725468904956 178.135013132133
-67.1102169031557 176.499690014139
-67.814747987396 174.822193686153
-65.5339204857356 175.000726558071
-63.3928304046067 175.323150097719
-59.3708789326901 176.207008849316
-55.4309264291399 177.088449279162
-53.3923350584691 177.407849916622
-51.25500575145 177.582150725477
-52.2171822732553 179.420929757651
-53.2860892595079 181.06229451732
-54.3744383814782 182.688560530645
-55.3949413104365 184.482043323788
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_2.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_2.poly
deleted file mode 100644
index cfa8a43..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_2.poly
+++ /dev/null
@@ -1,1037 +0,0 @@
-12
-797
-167.899462616204 359.540491074031
-167.709478831051 359.148983455902
-167.416839039086 358.854366570418
-166.616965210198 358.457742184108
-165.686588680504 358.154492288535
-164.812457000969 357.748491257136
-165.164491092919 356.90119436354
-165.764212524651 356.235866039699
-166.152561640499 356.010844535833
-166.59755936837 355.878600507682
-167.097447967289 355.854895733004
-167.650469696282 355.955491989558
-169.892741089819 355.862214602237
-172.107028639076 355.629460602706
-176.488964950798 355.027991741603
-178.675270086287 354.800511367326
-180.870904123543 354.71602335543
-183.085195249079 354.845144949561
-185.327471649407 355.258493393367
-186.593216097115 355.093273848002
-187.835713302849 354.760242432063
-188.91958681321 354.165836542552
-189.359734540938 353.74137985677
-189.709460174797 353.216493576472
-189.525039112328 352.498398333495
-189.167838012932 351.803740948146
-188.931950008629 351.08095899195
-188.951402520893 350.692908040886
-189.111468231438 350.278490036433
-190.151219284294 349.195616692012
-190.49128023362 348.584101050799
-190.51627946472 348.248559668367
-190.406466400383 347.888490646785
-190.083699410914 347.555934801405
-189.720138704537 347.355788796847
-188.912590896843 347.210367172664
-188.067732488869 347.167507499164
-187.26947299218 346.942491501277
-189.336529648064 346.017553537791
-191.557715332268 345.479990929072
-192.680871999024 345.425029962962
-193.7882794497 345.549178331798
-194.861843859909 345.879857867663
-195.883471405266 346.444490402644
-196.161434566735 347.392818718856
-196.350714599846 348.39261576504
-196.495242452381 348.851961679464
-196.717372333763 349.25235071749
-197.050361847637 349.569841526156
-197.527468597649 349.780492752498
-200.63473597741 349.862570970958
-203.826094543694 350.173117607539
-206.980139648674 350.698351114695
-209.975466644524 351.42448994488
-211.848768955229 351.423492617612
-213.776375448464 351.286569386428
-215.70984095907 350.980450711852
-217.600720321892 350.471867054408
-219.400568371771 349.727548874622
-221.06093994355 348.714226633017
-222.533389872072 347.39863079012
-223.184005106 346.617083537099
-223.76947299218 345.747491806453
-223.108609797565 345.31659397733
-222.551793223379 344.784028641587
-221.676172888039 343.492663055365
-220.994357889651 342.030930258041
-220.358094131706 340.556365459865
-219.619127517699 339.226503871088
-219.164801234512 338.665066533429
-218.629203951119 338.198880701964
-217.993803905456 337.847638277975
-217.240069335459 337.631031162744
-216.349468479065 337.568751257551
-215.303469574211 337.680490463679
-215.163545852659 338.349688410466
-215.293716108559 338.980882137721
-215.623386567591 339.582849085038
-216.081963455437 340.164366692012
-217.103461420296 341.301163643306
-217.525194948672 341.873997866815
-217.793459808586 342.461492508357
-217.985382681845 343.247255332475
-217.862774526833 343.902975588744
-217.498572653292 344.45254769147
-216.965714370964 344.919866054957
-215.685777818917 345.703319221442
-215.08457416868 346.067242853051
-214.606463348625 346.444490402644
-214.117611682175 346.618758670693
-213.654388344048 346.643694549506
-212.776842987297 346.394866436427
-211.917859947441 345.996600657409
-211.021471893547 345.747491806453
-210.254476374148 345.793652362829
-209.460704004524 345.958898573821
-207.872094070671 346.357242077296
-207.116889184473 346.4456364286
-206.414172804116 346.363710552161
-205.783761268614 346.039112977391
-205.245470916985 345.399492233699
-205.18782607293 344.819586187308
-205.232840454338 344.085742443507
-205.147169029473 343.361273556655
-204.982405817269 343.053589857822
-204.697466766594 342.809492081111
-203.916855460165 342.837400272196
-203.325888311623 342.574694961017
-202.862116163729 342.118231698578
-202.066360240935 341.011453523939
-201.609478151558 340.554849713748
-201.029994433878 340.291910156315
-200.265459930657 340.319490402644
-200.951460695027 339.247922219043
-201.523074543236 338.084631472533
-202.593844330071 335.695366352504
-203.228351688145 334.575634009843
-204.019174968956 333.576663165992
-205.033989882229 332.751574836379
-206.340472137688 332.153490036433
-207.890591537712 328.773614376491
-208.882543241738 327.174942642157
-209.500129109381 326.429061881905
-210.224459564446 325.73048970074
-209.222838318108 322.755113571589
-209.013543045281 321.234847753947
-209.106420790909 320.470712899869
-209.378466522454 319.705488174861
-210.118171041964 319.017396676993
-210.639640486 318.300301313107
-210.973217612265 317.55784660176
-211.149245178459 316.793677061503
-211.150022661446 315.214771568482
-210.884714996575 313.592740982478
-210.596064245461 311.956741451924
-210.526812469719 310.335929125255
-210.650318091868 309.540329459762
-210.919701730965 308.759460150903
-211.365306144713 307.996965717231
-212.017474090813 307.256490677302
-212.806099539755 306.249510794585
-213.453549062966 305.184722870295
-214.544342911003 302.968112915461
-215.728700792549 300.779440849727
-216.493105357645 299.749575286811
-217.445467865227 298.791486710017
-217.671307390688 297.096273556059
-218.170311128853 295.379520743792
-219.362217819451 291.925740211909
-219.742324059962 290.210884526079
-219.770001089333 288.518833249515
-219.602804163603 287.684823644986
-219.288850551604 286.860672399109
-218.808590458838 286.047765263995
-218.142474090813 285.247487991755
-217.48933429098 284.624856352513
-216.699050104378 284.254377573436
-214.998845016716 283.840362518733
-214.234822338579 283.582068204587
-213.625451719521 283.146410673564
-213.401557529478 282.828514758205
-213.243682271002 282.426010906403
-213.160944583027 281.925476740753
-213.162463104485 281.313489883845
-212.036636507271 279.301474064296
-211.064843094109 277.2053641972
-210.749061649798 276.117072909778
-210.6066118834 274.997316807216
-210.682434922217 273.842615455096
-211.021471893547 272.649488419002
-210.358602179347 272.391686971938
-209.833817457913 272.071513950532
-209.429976133762 271.696629006123
-209.129936611412 271.274691790049
-208.772696590183 270.320299148267
-208.624964630364 269.269613235896
-208.54960796809 268.18391126365
-208.409493839501 267.124470442241
-208.067489480732 266.152567982381
-207.777924476324 265.71859276638
-207.386462127922 265.329481094783
-206.589009201287 264.718690842097
-205.712340271233 264.3273639378
-203.851473724602 263.885480850642
-203.416971301792 262.686766683762
-202.80395642495 261.568513601726
-201.373843109368 259.428733795588
-200.722471570729 258.334878623193
-200.224041378258 257.176827639049
-199.961415982006 255.918416619008
-200.017458832024 254.523481338923
-198.143722867726 253.886874198621
-196.326669132469 253.081060617869
-194.557543968914 252.137552082246
-192.827593719719 251.087860077327
-189.450203335045 248.795971601909
-186.124468719719 246.457487076228
-185.31153140044 246.116633385127
-184.485106861351 246.037846535151
-182.831591522454 246.276613205378
-182.024398422001 246.399236648982
-181.24351350045 246.394066780513
-180.498885607479 246.163638561671
-179.800463592766 245.610486954158
-179.107963716744 245.9756269154
-178.480713760613 246.513360947078
-177.965590154885 247.172408073848
-177.609469330071 247.901487320369
-177.772536417602 248.823096871083
-178.062004840134 249.637929647868
-178.458400955556 250.361740052407
-178.942251121758 251.010282486384
-180.094419038056 252.144581049388
-181.362719452141 253.166860550349
-182.591363227127 254.203156202739
-183.624561226128 255.379503220027
-184.019183954356 256.059581994718
-184.306524312256 256.821936815684
-184.467108657716 257.682322084611
-184.481463348625 258.656492203181
-185.9641261456 259.145004883116
-187.399574196099 259.819050162738
-188.749873912094 260.668127640789
-189.977091705559 261.681736916011
-191.043293988465 262.849377587145
-191.910547172783 264.160549252932
-192.540917670487 265.604751512115
-192.896471893547 267.171483963435
-193.261839902161 267.76070256502
-193.736860191582 268.150971263354
-194.875842010735 268.584362953608
-196.033386146782 268.971067040866
-196.531609332321 269.302976235454
-196.9294613955 269.810491531794
-196.624590790032 271.348113983577
-196.544575130699 272.142472713893
-196.581469452141 272.997487991755
-198.265017425774 273.796705335086
-199.930094635246 274.759236305659
-200.638959085701 275.364498480862
-201.20310870385 276.085893958514
-201.575844442604 276.948524370497
-201.710467254875 277.977491348689
-202.220664749054 278.232677796563
-202.571870749949 278.527378603523
-202.787133144347 278.855615717997
-202.889499819039 279.211411088412
-202.847737556456 279.981764390772
-202.630967056511 280.790614098018
-202.423571413515 281.590135797565
-202.409933721779 282.332505076831
-202.533393824605 282.667312429925
-202.774437075613 282.96989752323
-203.156111361591 283.234282305171
-203.701464569329 283.454488724177
-203.476838505028 284.061455934947
-203.172713196038 284.686986893123
-203.008463299034 285.331268995707
-203.203463470696 285.994489639705
-204.056509172676 286.576395362323
-204.759838974236 287.288989036982
-204.991229241846 287.70009435684
-205.108233129738 288.150832265323
-205.085198169707 288.643522962635
-204.896471893547 289.180486648982
-204.691696023701 290.208405643409
-204.667155658959 291.269582241481
-204.890467560051 293.456739395564
-205.029779827355 295.672020405238
-204.900239920376 296.768351822799
-204.548464691399 297.845487564509
-204.048869526146 299.040396421855
-203.614714538811 300.384740799373
-203.535907244442 301.042931794827
-203.609936153649 301.654458254283
-203.882293319462 302.191312372392
-204.398470794914 302.625486343806
-205.329139625786 302.589895456736
-206.203841125725 302.750240295833
-206.94785681939 303.1719596085
-207.247507965325 303.501284300988
-207.486468231438 303.920492142146
-207.296319997071 305.572218909567
-206.871668731926 307.116554587787
-205.743590271233 310.03249070019
-205.252529656647 311.478810146158
-204.95169917321 312.967176526492
-204.947282111405 314.534949347084
-205.089410891889 315.360288018068
-205.345461761711 316.219488113826
-204.844992404936 317.304581135219
-204.750060713051 318.36453720898
-204.929393476008 319.411625832026
-205.251717483757 320.458116501277
-205.585759526251 321.516278713649
-205.80024639344 322.59838196606
-205.763904875277 323.716695755427
-205.345461761711 324.883489578669
-204.773922210692 326.197366259699
-204.050635969399 327.468129783576
-202.494339859246 329.98761412472
-201.834088212012 331.289983324414
-201.367606317757 332.656536131804
-201.181273287295 334.114096738105
-201.361468231438 335.689489334529
-200.067410325764 336.101171068554
-198.822887813805 336.6307553348
-196.400839721916 337.842865436976
-193.932105457543 338.924287587111
-192.629225229977 339.290511913305
-191.253466522454 339.473489731257
-190.971649950503 339.136657714551
-190.821259653328 338.76839610905
-190.823586380242 337.979490250056
-191.07810369706 337.190584391063
-191.402468597649 336.485490768855
-191.716447359083 336.354063093369
-192.084122335671 336.366694181865
-192.896466171501 336.579116791194
-193.299087649344 336.656400382226
-193.671310579537 336.632726877635
-193.99211127138 336.44684231252
-194.240466034172 336.03749272198
-193.848463928459 335.116617172664
-193.519338047264 334.77735123009
-193.045458709954 334.6434917149
-193.612789398192 333.665616161828
-194.016700422524 332.618928223555
-194.614342605828 330.435739963954
-194.948113327978 329.3575520289
-195.398543512581 328.327176481193
-196.035652941225 327.37376951397
-196.9294613955 326.526487320369
-196.855091964958 323.545115440791
-196.915829336403 322.094131558841
-197.228472625969 320.750493973201
-196.263591205834 320.563805788463
-195.336214935539 320.675992935603
-194.483465587853 320.974930494731
-193.742464935539 321.348493545955
-193.20628978139 321.794191540857
-192.781653618572 322.285611733501
-192.199592029808 323.373819917148
-191.861467694996 324.549520507162
-191.632468139885 325.749115913814
-191.377780890225 326.909008547371
-190.962593471764 327.965600818103
-190.252093410252 328.855295136278
-189.743972240148 329.217681316366
-189.111468231438 329.514493912166
-188.710202520846 330.323992870455
-188.588967478035 331.228554635947
-188.738465225456 333.143241375392
-188.785135930536 334.063553742772
-188.663713133095 334.899303704207
-188.262165790556 335.605584956413
-187.92133571407 335.896141596777
-187.468462860344 336.137491196101
-186.262822067497 336.2198817429
-185.103587066887 336.535615890925
-184.608491337059 336.813125490849
-184.205540573357 337.187537401622
-183.921582615135 337.671707093423
-183.78346530175 338.278490036433
-182.487397795675 338.556773766582
-181.2379948256 339.00194391579
-178.804463302849 340.070865601008
-177.582975154875 340.533578201836
-176.333432352303 340.841099351352
-175.037155097483 340.912909581964
-173.675463592766 340.668489426082
-171.22333804345 339.131364792293
-168.845461761711 337.332490890925
-169.431384956597 336.232944696849
-170.133837616204 335.184866875117
-170.602853691338 334.090101450389
-170.640458619354 333.494537144607
-170.488467132805 332.850492447322
-170.023676609753 332.384640462404
-169.495839512108 332.026741534179
-168.297713196038 331.599740475123
-166.987463390587 331.499364524787
-165.65846530175 331.6554889378
-164.595922446011 330.880937449341
-163.683884060143 329.948756605094
-162.073336517571 327.896366566127
-161.255835270642 326.918587229853
-160.350854313133 326.068038254683
-159.298897599934 325.415934569841
-158.04046908593 325.033491104548
-157.315776264427 324.33997544617
-156.80146304345 323.557866066401
-156.048464691399 321.895490616267
-156.57496587014 321.714553802913
-157.162215149163 321.864740341609
-158.388461029289 322.3934917149
-160.878466522454 322.3934917149
-160.052732622383 321.531007855838
-159.53984156823 320.532866447871
-159.372513448952 319.431786864703
-159.583468353508 318.260488480037
-160.081713592766 317.283491104548
-160.424119865654 316.867177456325
-160.878466522454 316.56748768658
-161.442168427764 316.799203078901
-161.908367609738 316.90574020118
-162.288076726852 316.900811467027
-162.592308437584 316.798129290049
-163.018390273808 316.354354262059
-163.274714386223 315.684114426082
-163.630494510887 314.103037565654
-163.906153058766 313.411599158948
-164.364458954094 312.932493179744
-164.747792398689 312.269038408702
-165.266590988396 311.656866043513
-165.869575178383 311.147255629008
-166.505465423821 310.791486710017
-168.466075098274 308.242034882014
-170.27734080529 305.743864029353
-171.249518459795 304.582534044688
-172.331418668984 303.516254394954
-173.57206094837 302.572435110515
-175.020464813469 301.778486221736
-175.175073778389 300.748362406795
-175.101014053581 299.679050534671
-174.621592437981 297.453238457148
-174.393582498787 296.311926170891
-174.291607773064 295.161801665728
-174.404344236611 294.010458901232
-174.820467865227 292.86549183697
-174.940480416773 290.979616760915
-174.91168705201 289.093741148417
-174.540715133904 285.321989029353
-173.973617231606 281.550236910289
-173.476458465813 277.778486221736
-172.756619608162 276.437035053676
-172.162964737175 275.03961369366
-171.335467254875 272.151487320369
-165.160464203118 273.595487564509
-166.143948709725 275.724892586177
-167.31408778405 277.896486252253
-167.834944432734 279.017029493754
-168.241414701699 280.170830696528
-168.479815250395 281.365460127299
-168.496462738274 282.608488052791
-168.092612093447 284.948762610262
-168.065039789437 287.317677348559
-168.403588211296 292.012989967769
-168.402137940882 294.275169148748
-168.278325529901 295.370841616472
-168.041824018715 296.43755111069
-167.669660220055 297.471283962657
-167.138860946654 298.468026503628
-166.426453011243 299.423765064856
-165.509463226555 300.334485977595
-164.253637706993 301.732722490733
-163.007090484856 303.004863708918
-161.741980945824 304.249067038005
-160.430468475579 305.563489883845
-160.14764059162 305.296787708705
-160.054481184242 304.988566368525
-160.262089645622 304.287363022273
-160.703137552498 303.539473503535
-161.027468597649 302.824491470759
-160.903785651682 301.618913665121
-160.849525606392 300.499116748279
-160.89211011505 299.45750711829
-161.058960830925 298.486491173213
-161.37749940729 297.578475311106
-161.875147497414 296.725865930026
-162.579326754568 295.921069428032
-163.517458832024 295.156492203181
-163.455214416741 292.840990036433
-163.293307697533 291.655207365458
-163.019457733391 290.525487869685
-162.437810922174 290.04602933087
-161.834270065783 289.712833985393
-160.576682245491 289.393316834872
-159.277046328543 289.383104338949
-157.965714370964 289.498364418452
-156.673038428782 289.555264994209
-155.429370558022 289.369973987048
-154.835399666934 289.129059115132
-154.265062814711 288.758659317797
-153.722154008357 288.235795585146
-153.210467254875 287.537488907283
-153.157509988306 286.968030795162
-153.375948107002 286.539268582766
-153.758988386152 286.209741130178
-154.199837600945 285.937987297481
-154.591702526568 285.682545944755
-154.82778993821 285.401955932086
-154.801306611059 285.054756119554
-154.405459320305 284.599485367244
-153.435616588352 284.263566329782
-152.474023258446 284.367065280383
-151.528835749386 284.728493854111
-150.608210479973 285.16636368603
-149.720303869007 285.499186411207
-148.873272335289 285.545473664706
-148.467633603273 285.404451375534
-148.075272297619 285.123737081592
-147.697207970677 284.680644737264
-147.334460174797 284.052488296931
-147.184466278313 281.76148793072
-146.684378838299 281.8003268835
-146.226888096092 281.941892832225
-145.423338806389 282.458486526912
-144.741102611778 283.161830633586
-144.147463714836 283.902486771052
-143.300463592766 287.338491409724
-142.13748524165 287.700463056271
-140.989085590599 288.189020842021
-139.893186425923 288.804750740235
-138.887709533928 289.548238724177
-138.010576700924 290.42007076711
-137.299709713219 291.420832842296
-136.793030357121 292.551110922997
-136.528460418938 293.811490982478
-136.815089142082 295.554988830989
-136.906883632897 296.389145344203
-136.877459442375 297.148488968318
-135.995069181679 296.587381571238
-135.271584427117 295.797616928523
-134.678788339852 294.886539190715
-134.188464081047 293.961492508357
-133.999831413983 292.639435589021
-134.052839672325 291.36748859257
-134.322973108052 290.153854608243
-134.785715973137 289.006736725276
-135.416552519558 287.934338032906
-136.190966999291 286.944861620372
-137.084443664311 286.046510576909
-138.072466766594 285.247487991755
-138.925335800408 284.817990272944
-139.283947622536 284.484177440112
-139.516467010735 284.052488296931
-139.327277934311 283.337624802893
-138.945526993035 282.862644046252
-138.426057851074 282.554585203236
-136.589777862786 281.902331918185
-136.067872559784 281.53235249192
-135.682467376946 280.964490860408
-135.676793253182 279.688097446864
-135.825341140984 278.481361359065
-136.151452696083 277.358438938563
-136.678469574211 276.333486526912
-137.721888696907 275.352019995158
-138.900589859246 274.528989761775
-140.088477766274 273.687208383983
-141.159457123039 272.649488419002
-139.401305353401 272.251957624858
-137.624215042351 271.933738678401
-135.921748792885 271.438144892161
-135.127738004683 271.043617844289
-134.387469208 270.508489578669
-133.408183729408 270.039112180179
-132.451962387322 269.44373604626
-131.579743540047 268.708485930865
-130.852465545891 267.819486587947
-130.376115715264 266.270307331984
-130.309418594597 264.753799885219
-130.511151230095 263.260636239951
-130.840090667961 261.781488388484
-131.155013954399 260.307028323119
-131.314698135613 258.827928036158
-131.177920257805 257.334859519904
-130.60345736718 255.818494766658
-129.885338461159 256.655341028874
-129.005055343865 257.499147623485
-128.080475008248 258.370938241189
-127.229464447258 259.291736572688
-126.569890653847 260.282566308682
-126.219620620964 261.364451139872
-126.197307950018 261.94610911951
-126.296521341561 262.558414756959
-126.53199416971 263.203996013557
-126.918459808586 263.885480850642
-127.319306051491 264.129717796748
-127.659211075066 264.495359390681
-127.989740526436 264.879563301509
-128.362460052727 265.179487198298
-127.378513341902 266.34618207783
-126.791245138405 267.461173981135
-126.567772811411 268.527697294658
-126.675213730095 269.548986404841
-127.080685263632 270.528275698131
-127.751304781197 271.468799560969
-128.654189651964 272.373792379802
-129.75645724511 273.246488541072
-129.290523922203 274.866891294425
-128.96055213189 276.545582741206
-128.617461120842 280.031238525813
-128.545120155571 283.610269516414
-128.56146517968 287.189489334529
-128.213457977532 287.537488907283
-127.446725523232 286.808645218318
-126.862336075066 285.925489395564
-126.455510294197 284.939582794612
-126.221468841789 283.902486771052
-126.5574616549 282.066612213557
-126.543494856117 281.136813848918
-126.221468841789 280.267484634822
-123.58246127343 278.226491898005
-117.606463348625 282.408491104548
-117.375247901438 283.029394343203
-117.286943590401 283.658348411029
-117.364083206413 284.935862511104
-117.487911855934 286.231940358584
-117.308459198235 287.537488907283
-116.478119051216 286.907269686168
-115.820465957878 286.155738800471
-115.284311926125 285.310832708781
-114.81846896386 284.400487869685
-114.38048980212 284.913826942151
-114.276764309166 285.45133039326
-114.593340790032 286.541736572688
-114.774275994061 287.066092371648
-114.810731327294 287.557518690532
-114.583023404835 288.00174206466
-113.971468841789 288.384489029353
-112.829767352102 289.259598388975
-111.922570860146 290.307488769
-110.461583053826 292.641488045161
-109.732736831663 293.787534668749
-108.888285791634 294.826237767642
-107.840702479838 295.687566205566
-107.213383892683 296.02983019658
-106.502459442375 296.301488846248
-106.060836708306 297.509363144343
-105.954462921379 298.791486710017
-107.328125020622 298.771433114713
-108.652147567032 298.351676195567
-111.176959907768 297.066989868586
-112.390592655299 296.579029202168
-113.580271756409 296.445302694743
-114.168135400994 296.570178616499
-114.7524186877 296.854294717019
-115.333924301101 297.321211542641
-115.913454925774 297.994489639705
-116.193827403842 298.831891165753
-116.608332371472 299.460621222561
-117.133555797992 299.912406867077
-117.746083652733 300.218975156253
-119.139396524189 300.523367896383
-120.600958740471 300.627615898555
-121.94345805621 300.78553561837
-122.511524049698 300.96394001477
-122.979582226036 301.250943511432
-123.324218554555 301.678273165306
-123.522019004582 302.277656033342
-123.549569545446 303.080819172492
-123.383456146477 304.119489639705
-122.862991923599 304.615658295979
-122.312549656389 304.977929904764
-121.137193834542 305.376631587451
-119.888314372061 305.467293902939
-118.596836960076 305.401616066401
-117.293687289713 305.331297293013
-116.009791052101 305.408036797946
-114.776073938368 305.783533796375
-114.187696831433 306.130722360393
-113.623461639641 306.609487503474
-112.166840469597 307.860115974849
-111.494545137642 308.590756982272
-110.934466278313 309.447492569392
-111.007776891945 310.500866859858
-111.40771189904 311.451490372127
-112.069021379708 312.234114616816
-112.926455414055 312.783491104548
-114.23871973729 312.773409232204
-115.405740654228 312.431897252505
-116.473619973419 311.852306857412
-117.488459503411 311.127989738887
-119.543426429985 309.618582099383
-120.675757443665 309.020194962328
-121.939455902336 308.650487869685
-123.599037235735 308.65864986152
-125.208474313973 308.865222185557
-126.75493491268 309.263208746617
-128.225586807488 309.845613449519
-129.607597774027 310.605440199082
-130.888135587929 311.535692900126
-132.054368024824 312.629375457471
-133.093462860344 313.879491775935
-133.46058679199 314.087685689037
-133.874398863075 314.369427293246
-134.748711502312 314.887490242427
-135.162524109839 314.99077992112
-135.529648935555 314.901553958362
-135.826741999148 314.553296521013
-136.030459320305 313.879491775935
-135.888260996102 313.069210499232
-135.900090133904 312.104991882747
-136.02936155176 311.65708968014
-136.275855695961 311.281023472255
-136.665811186789 311.013566702311
-137.225466644524 310.891492813533
-138.051536811648 310.740052893465
-138.782638048886 310.739820092624
-139.431168822704 310.871610805099
-140.009527599571 311.116241424983
-141.005323028324 311.867287963336
-141.869212066887 312.839490860408
-142.700382447003 313.879381268924
-143.598021900414 314.833490341609
-144.661318158863 315.548349231189
-145.286083756147 315.768100842541
-145.989458954094 315.870489090388
-146.238604521511 315.742424532478
-146.404254352806 315.555473416751
-146.580832397698 315.067864387935
-146.710724270104 314.533567756122
-146.98546115136 314.078489273494
-147.685943042992 315.094427913135
-148.516833221672 316.15724083752
-148.841230010746 316.720756247347
-149.030287182091 317.313427537387
-149.028024172543 317.941067143982
-148.778460418938 318.609487503474
-148.103711938618 318.99423664779
-147.629775440453 319.465973585551
-147.32861969447 320.008936762517
-147.172213470696 320.607364624446
-147.181524669884 321.907568186229
-147.433459198235 323.24049183697
-146.29677144265 324.878242283767
-145.211459076164 326.557991474574
-144.762482976673 327.438459671741
-144.415647899864 328.359240442222
-144.200719570873 329.33027141512
-144.147463714836 330.361490219539
-143.408480083702 331.276942699855
-142.529337799309 332.010614365046
-141.500758564232 332.454973667567
-140.927530622242 332.535057574218
-140.313464081047 332.502489059871
-138.869463836907 330.361490219539
-137.971028721092 330.378410875504
-137.135055458306 330.526100843852
-135.60146228051 331.120367020076
-134.170619880913 331.957445352977
-132.744463836907 332.850492447322
-133.281037544964 333.485489748125
-133.908619320152 333.953038125937
-134.61087307906 334.281719512945
-135.371462738274 334.500115841334
-137.002305423973 334.720381051009
-138.670458709954 334.842489212459
-138.988222694157 335.448747604793
-139.140880977867 336.068927734797
-139.074583923577 337.332490890925
-138.321459686516 339.822492569392
-139.034318970649 340.131214748775
-139.650325542448 340.250912069982
-140.182314375548 340.203754935121
-140.643120443581 340.011913746303
-141.04557872018 339.697558905636
-141.40252417898 339.282860815232
-142.031216537712 338.241116493648
-142.631877308844 337.064043998425
-143.307186281441 335.929006546443
-144.15982324457 335.013367354577
-144.684727156667 334.693248111462
-145.292467987297 334.494489639705
-145.822870319842 334.566493592863
-146.295523798226 334.736021190589
-147.079209244011 335.309240787929
-147.666774427651 336.097335368102
-148.081469452141 336.983491867488
-148.063559388874 338.829550265973
-147.649463093041 340.640522688334
-146.381960785149 344.203990906184
-145.903179263828 345.979877352422
-145.777460491417 347.767459124034
-145.90553471273 348.669290546035
-146.192116713284 349.578431546395
-146.660620523749 350.496344040786
-147.334460174797 351.42448994488
-147.334460174797 354.561490982478
-148.159308062999 355.222875436475
-149.041498428343 355.745329633062
-150.945809042214 356.452507823413
-152.983196919916 356.841146692341
-157.200424080847 357.295291021173
-159.251873171089 357.6770387587
-161.179619139193 358.372731730049
-162.077042484788 358.887720534285
-162.919466888664 359.540491074031
-163.450171863793 360.010284844493
-164.166994964836 360.450898527806
-164.989990627526 360.809808771764
-165.83921328759 361.034492224162
-166.63471738076 361.072425532793
-167.296557342766 360.871085345452
-167.744787609337 360.377948309933
-167.863816118 360.005542426543
-23
-156.546465790032 350.129491775935
-156.631071513651 349.501853078311
-156.541747247933 348.918007343715
-156.023465072869 347.832616775935
-155.355931913613 346.775164097255
-154.903460418938 345.647493332332
-153.757464325188 342.809492081111
-153.4743255136 343.739261597102
-152.957117473839 344.607085674708
-151.647711670159 346.282991379207
-151.069122886418 347.154119938319
-150.683682834862 348.089396923488
-150.598196005581 349.120345800822
-150.701311452447 349.681548282211
-150.919466888664 350.278490036433
-151.081076672433 350.864354810385
-151.316373622177 351.354531548624
-151.966591751335 352.061818986838
-152.787246739624 352.428348488813
-153.69546405053 352.482116192286
-154.608369147537 352.251118234997
-155.443087494133 351.763350754683
-156.116744553803 351.046809889083
-9
-169.692461883782 340.668489426082
-165.857470428704 337.680490463679
-165.620094811676 338.581820860212
-165.710106765984 339.322006553119
-166.06620529866 339.906215533321
-166.627089416741 340.339615791743
-167.331458127259 340.627375319307
-168.118010437248 340.774662106936
-168.925445353745 340.786644145554
-27
-160.430468475579 339.97149082989
-160.459746753929 339.372193902438
-160.218466675041 338.80111595959
-159.995937740563 338.192725985949
-159.982114171742 337.854060545271
-160.081469452141 337.481492966121
-161.226458465813 336.635492294734
-159.96789971566 334.39060065121
-158.699965393303 332.159865349238
-157.942833518742 331.200011372273
-157.039779102562 330.423942535823
-155.942942595242 329.891740858262
-155.306899948178 329.735865834808
-154.604464447258 329.663488357966
-153.776591694115 329.759488910144
-153.135466491936 330.130739181941
-152.643589412926 330.679364293521
-152.263461029289 331.307489365046
-152.328871188818 332.16406670556
-152.499395465611 332.945964753335
-152.764601273595 333.660184006845
-153.114056026695 334.313724964564
-154.023982023953 335.466773986524
-155.145712768791 336.461115807002
-157.690745746849 338.197693794673
-158.947126602886 339.051937937444
-160.081469452141 339.97149082989
-19
-150.570467865227 326.178487747615
-151.06846896386 321.099492996638
-150.442671736835 321.183633921375
-149.95478824353 321.355013683145
-149.588700821756 321.604003855666
-149.328291809319 321.920976012652
-149.060038363693 322.72035257489
-149.021086609123 323.67611595959
-149.115322983025 325.748693555301
-148.990628516434 326.711452945774
-148.579470550774 327.522489517634
-148.641718780754 328.157614677852
-148.789558326958 328.418972819751
-149.077456390618 328.568487137263
-149.523468351124 328.527194186752
-149.835838711022 328.349318593448
-150.044333195446 328.066372111147
-150.178717529534 327.709866493648
-150.34421864724 326.902224868243
-10
-156.894457733391 314.92448994488
-156.894457733391 314.078489273494
-156.090334570168 313.918974369471
-155.31396189904 314.072114914363
-154.668089067696 314.477443188136
-154.255465423821 315.074491470759
-154.864259397743 315.492193430369
-155.612835800408 315.653114288752
-156.342475092171 315.487223356669
-156.650593465327 315.259838878816
-22
-137.026461517571 302.974492996638
-136.355154043196 302.623782276814
-135.576444303749 302.326193064158
-133.939583694695 301.710613220637
-133.202815657614 301.302739619916
-132.601411020516 300.76822158665
-132.196061199663 300.062117635911
-132.047457611321 299.139486282771
-131.586759245156 299.306002229159
-131.08883753991 299.724612205928
-130.646977579354 300.273909419482
-130.354464447258 300.832487076228
-130.423067128418 301.318249359434
-130.632916366814 301.776519626086
-131.275587951897 302.668990105098
-131.880946075676 303.626710504001
-132.044153487442 304.166543170517
-132.047457611321 304.766492813533
-132.70260567045 304.915078133052
-133.375131761788 304.906679123347
-134.718834793328 304.519990890925
-135.971600210427 303.808553665584
-13
-154.604464447258 301.629491775935
-154.027398979424 301.011865019505
-153.358059799431 300.712226122325
-152.620985901116 300.651813447183
-151.840716278313 300.751865356868
-150.248745834587 301.118316381877
-149.486123001335 301.227192222779
-148.778460418938 301.181486099666
-149.255284315108 301.829753786033
-149.877491628884 302.203802078669
-150.60830873823 302.356131106322
-151.410962021111 302.339240997737
-153.084682619332 302.007803886836
-43
-149.624468719719 298.691488235896
-150.384091293572 298.398987739985
-150.703199541329 298.194518893664
-150.919466888664 297.845487564509
-150.824369346855 296.924990385478
-150.645460998772 296.04649159283
-150.317304527519 295.233241289561
-149.774462616204 294.508489578669
-148.460961258171 294.446864098018
-147.932834303139 294.229068845218
-147.747848516463 294.016290291851
-147.633456146477 293.712491959041
-147.563874216883 293.22321376734
-147.418231612204 292.863335743254
-147.206811541824 292.614039005419
-146.939897215126 292.456504672473
-146.280718630312 292.341447695797
-145.522961532829 292.367613762324
-144.748891597746 292.384451821154
-144.04077450013 292.241410821383
-143.737156288831 292.062888471117
-143.480875915049 291.787939712112
-143.282216588168 291.397745663007
-143.151461517571 290.873487442439
-141.813086426018 291.757739036982
-141.211820995568 292.316581338351
-140.81146517968 293.015485733455
-141.067256814001 293.877687051599
-141.149106657265 294.825083106463
-141.159840500115 296.774741142695
-141.273154264448 297.676643982237
-141.58138576722 298.463023274844
-142.176749890803 299.083699449604
-142.61092383614 299.316217751881
-143.151461517571 299.488492935603
-144.030189937113 299.294941842263
-144.933351671456 298.817773073619
-146.724335586785 297.633489578669
-147.567838018893 297.236828386491
-148.347134268044 297.17745658726
-148.705780113248 297.322762574708
-149.040064459799 297.610600948041
-149.347217323391 298.060375053143
-23
-161.027468597649 297.148488968318
-161.04659358239 295.075240105098
-160.922984754799 294.073865264361
-160.430468475579 293.114492386287
-159.727841293572 292.73736593098
-159.067213928459 292.29948994488
-158.378462707756 291.94561359257
-157.591463958977 291.82048603863
-157.295841371773 292.383471578067
-156.832215225456 292.815863579219
-155.699465667961 293.363485306209
-153.907458221672 293.015485733455
-153.869743740319 294.37451919884
-154.018965637444 295.672989815181
-154.411185657738 296.887459367221
-155.102465545891 297.994489639705
-155.70501486039 298.728044524496
-156.31985655999 299.081677287524
-156.9499088881 299.142341121738
-157.598090088127 298.996989220088
-158.960512077568 298.43605098099
-159.680589353798 298.194371029442
-160.430468475579 298.094488113826
-16
-129.40846530175 296.79948994488
-129.38359156823 295.249614685481
-129.282326376198 294.509692400401
-129.059466278313 293.811490982478
-128.633163234351 293.896358737429
-128.300059354065 294.035046502655
-127.87552729821 294.451130002444
-127.710026538132 295.014237358873
-127.727713501213 295.67886444897
-128.009276306389 297.130661338275
-128.12146500325 297.826822891539
-128.113467132805 298.44248768658
-128.461304729937 298.463806345766
-128.701119577645 298.360847800677
-128.966462051628 297.901114433711
-129.129056608437 297.301318257754
-22
-121.739458954094 285.545492142146
-120.401715194939 284.749240845149
-118.951464569329 284.25148579449
-118.730194246529 284.614690512126
-118.415833389519 284.84261319012
-118.195036566017 285.098473757213
-118.178054219244 285.287886976903
-118.254458343743 285.545492142146
-118.645757889508 285.667486041491
-118.846274769066 285.839707344478
-118.88271228051 286.29273793072
-118.779274379967 286.82039543957
-118.804946994541 287.085900395816
-118.951464569329 287.338491409724
-119.688165580986 287.349238246386
-120.4763363955 287.313487022822
-121.19906989312 287.464487641757
-121.499364173172 287.682910486763
-121.739458954094 288.035490005916
-121.844507133721 287.457427590793
-122.019587433098 286.809239357417
-122.054603492974 286.151676982348
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_3.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_3.poly
deleted file mode 100644
index 380643f..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_3.poly
+++ /dev/null
@@ -1,995 +0,0 @@
-1
-993
-142.528622059284 267.551290109461
-142.102196751295 267.420185967987
-141.749529509006 267.113055064981
-141.577471850572 266.658760651653
-141.692875294147 266.086165979212
-142.131916029511 265.612058832949
-142.278340367733 265.137320115869
-142.218843473254 264.659066632097
-142.040120510517 264.174415185755
-141.671777038036 263.174385621851
-141.655546857176 262.653241112535
-141.866871265827 262.114165857141
-142.434497265278 260.878669336145
-142.644948987423 260.228667333429
-142.759869007526 259.53216512472
-142.249853758274 259.066325500315
-141.621244816242 258.82417066366
-140.27787437862 258.563170984095
-139.469840882478 259.21368731529
-138.855295328556 259.973622396295
-138.383319912611 260.81505013973
-138.002996830402 261.710044458216
-137.313636450229 263.549028470819
-136.902763543783 264.437165990179
-136.379871754108 265.267165735071
-136.418364795057 265.931673623329
-136.370615182577 266.459297433203
-136.25165368071 266.860692463522
-136.076511053501 267.146514013117
-135.617805479227 267.414057865446
-135.114744572101 267.347171380823
-134.687574444471 267.031096949881
-134.456541208683 266.551076963251
-134.541890977083 265.992353811567
-135.063869862018 265.440169885462
-134.789603738247 263.620169236963
-134.846972895919 262.729410364931
-135.029744533954 261.865417077845
-135.334719402848 261.038642838304
-135.758698253093 260.259541108911
-136.298481835185 259.538565352266
-136.950870899616 258.88616903097
-136.456704614816 259.032862379854
-136.023042349277 258.975027635401
-135.262745289264 258.498290613001
-134.521010546146 257.960991456812
-134.110551176725 257.827454045122
-133.648868946491 257.868163659876
-131.771746067463 259.540917947596
-131.013418344913 260.511077239817
-130.784190772234 261.07742540509
-130.694874195514 261.716170862024
-130.095355777202 262.825296953028
-129.623996166645 263.978671624964
-128.757870106159 266.334167077845
-128.466633049904 266.544768348043
-128.103653339802 266.666153981989
-127.319872288166 266.656795099085
-126.977774111686 266.533808961218
-126.721339611469 266.337123945063
-126.589920370041 266.07061924011
-126.622867969928 265.738174035852
-127.182927785574 265.450063451832
-127.536338953434 265.065872028177
-127.732578037439 264.608298584526
-127.82112160152 264.100041940515
-127.873028425632 263.022274329966
-127.935344813524 262.498161002701
-128.087871937214 262.014159753626
-128.509574560581 261.012352302378
-129.059246448932 260.049916818445
-130.272869495807 258.216170862024
-129.391635088382 257.907841041391
-128.419744877277 257.669541909998
-127.461916593967 257.692056491678
-127.020999966322 257.860738619869
-126.622867969928 258.166167810266
-124.611995129047 261.362794473474
-123.676355151592 262.984404399698
-122.898868946491 264.671172693079
-122.211719242988 265.073309406345
-121.712104229389 265.135779216593
-121.393777934967 264.938163801735
-121.250494388996 264.560044839685
-121.27600762075 264.081004008358
-121.464071659504 263.580622985666
-121.80844053453 263.138483449524
-122.302868275104 262.834167077845
-122.189766077457 261.832194074696
-122.181979565082 261.021435573404
-122.282919077335 260.356762692039
-122.495994953571 259.79304654867
-123.272197155414 258.787968948191
-123.842144159733 258.256349727219
-124.537868885456 257.645171716516
-123.748511819301 257.374903753107
-122.896247295795 257.195293023889
-122.020543841778 257.159872129267
-121.160869984089 257.322173669641
-120.386869324504 258.088989481037
-119.718418864666 259.185653522318
-118.521497158466 261.83279187948
-117.904690219222 263.115398987835
-117.21676209396 264.19211991102
-116.413544936238 264.929021045273
-115.954900518192 265.128184940373
-115.450870899616 265.192168786829
-115.166447786747 264.860210492914
-115.035494236408 264.45353658468
-115.103870777546 263.603164270227
-115.627354351936 263.351257219618
-115.963794617115 263.002400472467
-116.161179868637 262.580770030325
-116.267498402057 262.110541894739
-116.398888496814 261.120996549433
-116.519936649261 260.65003134281
-116.741871265827 260.227172448938
-117.68249836391 258.746419503992
-118.752872852741 257.396163537805
-118.087013749538 256.878038719004
-117.316247372089 256.564664438074
-116.494293002544 256.474790408914
-115.674869923053 256.627166345423
-114.843030652164 257.505357637709
-114.159901945053 258.523809507196
-112.940620331226 260.66729314596
-112.254889479039 261.635223999327
-111.41871329969 262.429213598078
-110.357302820442 262.970711484259
-109.718763164377 263.122229017024
-108.995869068561 263.181167199915
-109.045528045057 262.41154618532
-109.332010833679 261.738698556726
-109.782579278706 261.131522848909
-110.324495224415 260.558917596643
-111.391416994987 259.393012597864
-111.770946508406 258.7375099209
-111.950870899616 257.992171838587
-112.334840206562 257.454123571222
-112.82587185329 256.962295129602
-113.96187248653 256.155166223352
-112.279371170459 255.593667581385
-111.447777358947 255.509416892832
-110.485870747028 255.683166101282
-109.948712555824 256.31251813442
-109.536417631565 257.010728910273
-108.905995754657 258.517165735071
-108.233761457859 260.009354665583
-107.769201008735 260.689755573576
-107.158871082721 261.294173791712
-106.588244347034 261.194913461512
-106.091869739948 260.87216146261
-106.650041489063 259.970709398096
-106.873244671283 258.985538080042
-106.984871296344 256.801162317102
-107.596792666374 256.120214298075
-108.285495666919 255.562543466394
-109.715870289264 254.566161706751
-109.036246208606 253.821662500208
-108.226871876178 253.077163293665
-107.088714210449 253.755198552912
-106.104120163379 254.572917535608
-105.708725651859 255.057421222036
-105.398901431022 255.60476119787
-105.190373962877 256.224242582624
-105.09886970943 256.925170495813
-104.89808408743 257.382904275959
-104.625275163112 257.724856212442
-103.914868740497 258.128915384119
-103.070213107525 258.272349670237
-102.193870930134 258.290160730188
-102.207573322712 257.926836088007
-102.435494808613 257.598292901819
-102.71010389751 257.274436071222
-102.863869099079 256.925170495813
-102.9505883736 255.782791211908
-103.298119930683 254.731166436975
-103.925026087223 253.814541890924
-104.849869160114 253.077163293665
-106.069870380817 252.794416024988
-106.585464386402 252.48682196409
-106.935871509968 252.009170129602
-106.525791151582 251.672740116423
-106.100042848049 251.515244558161
-105.22249546474 251.596290185755
-103.509869007526 252.357162072962
-102.911275712906 252.846228435343
-102.408120064197 253.458669259851
-101.622871784626 254.839171960657
-101.872937647758 255.136575206821
-101.959527162967 255.47541697294
-101.737620739399 256.161164834803
-101.147839693485 256.663913085764
-100.774585930763 256.774005338257
-100.380871204792 256.751159265345
-100.088104514538 256.564915731256
-99.9744943661077 256.266917779749
-99.958870319782 255.55917318136
-100.489122500776 255.143538489645
-100.732511131225 254.659244611566
-100.765994934498 253.591788842981
-100.759738704322 253.062181725805
-100.873916117607 252.571024968927
-101.210351472853 252.145095959013
-101.870869068561 251.811172082727
-104.278870014606 250.296172693079
-104.104886202274 250.019433334177
-103.779495624958 249.793790414637
-103.374791769443 249.689085796183
-102.962868122516 249.77516134054
-102.208858577667 250.200904115742
-101.589228062092 250.737787082498
-101.082449166237 251.36429481179
-100.666994480549 252.058911874597
-100.023948101459 253.566412284677
-99.4878696483953 255.088164880579
-98.9816197437627 255.389165475672
-98.4198688549382 255.336165979212
-98.1039165539129 255.06768377096
-98.0694946331365 254.715293481653
-98.2958683056218 254.020171716516
-98.9904201162441 253.354261353319
-99.3969011587484 252.537027910059
-99.7856201214177 250.718543603723
-99.98784263259 249.852268650835
-100.341963557659 249.104622438257
-100.957975192128 248.543092921083
-101.398562617732 248.35321190924
-101.945869831501 248.235168054407
-101.701554922519 247.874419644182
-101.673228649555 247.307608201807
-101.827691702305 246.610389902895
-102.131744770466 245.858420923059
-102.552188543735 245.127357437914
-103.055823711811 244.492855623072
-103.60945096439 244.030571654146
-104.179870991169 243.816161706751
-104.821291951595 243.291337564295
-105.528245357929 242.966292932337
-106.250011710582 242.942182138269
-106.935871509968 243.320159509485
-106.428417114673 243.690194919413
-105.818495182453 243.860166147058
-105.190010933338 243.983637168711
-104.62686958736 244.214171960657
-103.983510164676 244.865406349008
-103.260744480549 245.657544687097
-103.010824499784 246.077361151283
-102.910541204868 246.497493579691
-103.016390679537 246.906305297916
-103.384869007526 247.292159631555
-103.708803465722 246.658101185863
-104.11390170282 246.091728999918
-105.119871048389 245.135419442957
-106.307340113579 244.369983032053
-107.580871967731 243.742171838587
-108.428620247303 243.863162591761
-108.806838361679 244.004006936853
-109.070869831501 244.338164880579
-108.634932903705 244.65714986593
-108.136371044574 244.899539544886
-107.108871845661 245.331161096399
-105.874355880676 246.016150548761
-105.115245727955 246.813541009729
-104.732448069511 247.81924255163
-104.62686958736 249.12916524679
-105.026422647892 249.286486819094
-105.310229448734 249.278479173487
-105.502137689052 249.140064671343
-105.625995068012 248.906165674036
-105.764948038517 248.291603639429
-105.917869953571 247.714171960657
-106.734900741039 246.87446530134
-107.630869297443 246.134790017908
-108.619838265835 245.651053264444
-109.153592480479 245.553882822102
-109.715870289264 245.579162195032
-109.955151168762 245.776885583704
-110.250120071827 245.895667627161
-110.470464198051 246.060947015589
-110.485870747028 246.398162439173
-109.150214342533 246.998321130579
-108.524187026678 247.478201105898
-107.965120701252 248.050166681116
-107.50233566588 248.69338174135
-107.165152220188 249.387010171717
-106.982890663801 250.110215857332
-106.984871296344 250.842162683313
-107.28324547237 251.283044412439
-107.439228920398 251.463591888254
-107.655868915973 251.537170007532
-108.361431269108 250.257667615717
-109.318619160114 249.119914605921
-110.462182669101 248.154286458795
-111.726871876178 247.391158654993
-112.044730572162 247.358228042429
-112.313745884357 247.478669717615
-112.620869068561 247.938170984095
-112.518357662616 248.46957902581
-112.271588472782 248.843323066538
-111.915459899364 249.09955166251
-111.48487034267 249.278413369959
-110.53990188068 249.564630344217
-110.095319775997 249.752282723492
-109.715870289264 250.023162439173
-109.457870749889 250.557148530786
-109.309370426594 251.149539544886
-109.070869831501 252.257171228235
-109.683401553093 252.911874130075
-110.414620308338 253.452294900721
-111.224964229522 253.866902187174
-112.074871448932 254.144164636438
-112.236324196814 253.38570000202
-112.29718324369 252.600445821588
-112.366120247303 251.065913751429
-112.498698210476 250.374808326071
-112.779682485519 249.773258283441
-113.27132307565 249.290349855726
-114.035869984089 248.95516927511
-114.926620869098 249.141662195032
-115.275340227543 249.388567045038
-115.500873951374 249.77516134054
-115.345216302334 250.314134671991
-115.001120953022 250.774169519251
-114.596650866924 251.206452443903
-114.259869007526 251.662170007532
-113.930493740497 253.126666620081
-113.787868885456 254.666167810266
-114.407808808742 255.137154414957
-115.100121883808 255.401044442957
-116.617870716511 255.55917318136
-116.552996067463 254.137775972193
-116.844370274006 252.788287713831
-117.4942449612 251.582989290064
-117.954323617874 251.056999042337
-118.504871754108 250.59416158468
-118.987525658814 250.749370734846
-119.334183631597 250.935227676933
-119.678433565555 251.387505843943
-119.655465124307 251.928237899845
-119.383121876178 252.534665658777
-118.561685232578 253.853575542276
-118.248278973757 254.520541295116
-118.156872181354 255.162170007532
-118.198937488852 255.707615956371
-118.527714042125 256.111358478372
-119.063443942128 256.379631921356
-119.726369289814 256.518670633142
-120.436732186137 256.534708961552
-121.114774732052 256.433981254404
-121.680739028512 256.22272185952
-122.054867176471 255.90716512472
-122.273181347309 254.544834688013
-122.405619053303 253.126536920374
-122.561040846763 252.460472896402
-122.84068146175 251.857304170435
-123.293103544174 251.342659786051
-123.966869739948 250.942168786829
-124.242917684971 250.84708960325
-124.500496296344 250.929292276209
-124.884869007526 251.364165857141
-124.676432995258 252.56772907049
-124.27712097591 253.824916436975
-124.146980492531 254.452525391882
-124.138433842121 255.068227842157
-124.307918636261 255.663586273497
-124.71187248653 256.230163171595
-125.925123600422 256.800792291468
-126.593435673176 256.935120656794
-127.268871693073 256.925170495813
-127.53687633401 256.271852150267
-127.505291728435 255.618511274164
-127.001744656025 254.330417230432
-126.758977128325 253.704991712873
-126.675010232387 253.098198964899
-126.864441437779 252.514702811544
-127.441868214069 251.959167077845
-128.177995113788 251.922290399378
-128.528479365764 251.966617181604
-128.85786858028 252.183166101282
-128.98015409535 252.590843215292
-128.939337877689 252.963586881464
-128.599869160114 253.64154012472
-128.302400259433 254.291558339899
-128.314083812891 254.629383220976
-128.509869007526 254.988174035852
-128.869701264559 255.294798507994
-129.167213110386 255.667810514276
-129.68936958736 256.459292962854
-129.971061227976 256.800911321943
-130.304526476322 257.055213048761
-130.718288837133 257.183772101705
-131.240871815143 257.148162439173
-133.226871876178 256.925170495813
-132.851370243488 255.115415170496
-132.727650551258 254.204914882486
-132.82986870235 253.250167444055
-133.091044349728 252.910889371937
-133.300199536739 252.484823062723
-133.689246563373 251.574918344324
-133.932537419854 251.192376240795
-134.250605849682 250.925638511484
-134.675151361285 250.825353309219
-135.237873463093 250.942168786829
-135.508543638645 251.095620229547
-135.579246906696 251.351539209192
-135.510263590275 251.626020505732
-135.361874012409 251.835158899134
-134.872424913703 252.263231768911
-134.588980464397 252.754713132685
-134.473138136922 253.293888464277
-134.486495403705 253.865043237513
-134.747198609768 255.040433004206
-135.063869862018 256.155166223352
-135.361319033561 256.775079354351
-135.785776524006 257.248227908914
-136.30928119844 257.581595822876
-136.903871921955 257.782167032068
-138.194466976581 257.812855079477
-138.834549037872 257.65693978936
-139.4338726086 257.396163537805
-138.868745235859 255.168416574305
-138.812167672573 254.07291729719
-139.085873035846 252.903167321985
-139.044638542591 252.392777755564
-139.046247868 251.752542093103
-139.12185934013 251.503234669273
-139.278670219837 251.364868953531
-139.540176658092 251.385246023243
-139.929874805866 251.612166955774
-140.28958196765 251.907282724684
-140.507293967663 252.227102353876
-140.712247280536 252.900165155237
-140.935764340816 253.549979284113
-141.176681025086 253.840738072699
-141.568874744831 254.095168664759
-141.720872311054 256.062415674036
-141.907216100155 257.055323198145
-142.337871937214 257.992171838587
-143.279169110714 258.384171321695
-144.392497448383 258.575917795008
-145.515013961254 258.488288238352
-146.028829349337 258.314981504982
-146.483875660358 258.042159631555
-145.711528806148 257.068646028345
-145.069121746479 256.006537988489
-144.780341414867 254.851240709131
-144.838463438807 254.237210228746
-145.068874744831 253.598159387415
-144.62053732401 253.264739796226
-144.459684876857 252.851175620859
-144.528801633177 252.423009857243
-144.770371822773 252.045785501306
-145.126879675446 251.785045548981
-145.540809421001 251.706332996195
-145.954645289241 251.875190838879
-146.310871509968 252.357162072962
-146.270370869098 253.089292123621
-146.061870960651 253.74716146261
-147.05221465057 254.618043020075
-147.837621120868 255.668170526331
-148.548402099071 256.788044050043
-149.314869312702 257.868163659876
-150.162512330471 258.175461604898
-151.105496792255 258.240792825525
-152.034417895733 258.064061477487
-152.839870838581 257.645171716516
-151.852308062969 256.818670585459
-151.195121197162 255.78291852743
-150.863809136806 254.579541995829
-150.853870777546 253.250167444055
-150.512499241291 253.061166360681
-150.207874683796 252.779159143274
-150.171656040607 252.433212831324
-150.326124576984 252.15504415304
-150.778873829303 251.662170007532
-151.200938372074 251.829241409605
-151.515952019153 252.092746808832
-151.927248386799 252.819293573206
-152.217606453357 253.662278249567
-152.591869739948 254.442168786829
-153.099512962757 255.30118449003
-153.767748264728 256.099542215174
-155.371876148639 257.570159509485
-156.390905289112 257.400103166407
-157.395872501789 257.157668664759
-158.38209143108 257.077980592554
-159.344875721393 257.396163537805
-158.960578231273 256.033835246866
-158.338998226581 254.746038034265
-157.494105367122 253.542054488962
-156.439869312702 252.431167199915
-156.46501584178 252.139253213709
-156.646278647838 251.903555467432
-156.941025180875 251.730132177179
-157.306622890888 251.625041559046
-158.079841641842 251.644091203516
-158.40219758278 251.78034789831
-158.62487450069 252.009170129602
-158.54236125773 252.482238456314
-158.593090681492 252.870967223947
-158.984871296344 253.467546060388
-159.581403879581 253.943186595743
-160.163875965534 254.442168786829
-162.000873951374 257.322173669641
-162.817122845112 257.433791711634
-163.763874439655 257.471160486048
-164.849997906147 257.747163369959
-165.404544143139 257.830604389017
-165.972874073444 257.744170739954
-166.212240455805 257.1427897659
-166.032310156284 256.555810287302
-165.559786258398 255.978603705471
-164.921371845661 255.406541421717
-163.653683809696 254.259335353678
-163.277816353498 253.674934372013
-163.24287071651 253.077163293665
-162.494248775898 252.474795892542
-162.240077523647 252.113185956781
-162.248875050007 251.612166955774
-162.658563761173 251.318376555746
-163.012576965748 251.219527318781
-163.315707592426 251.282279386824
-163.572748569904 251.473292901819
-163.967733292041 252.106744840448
-164.235874561725 252.853164270227
-165.4554057402 253.414371087854
-166.491374401508 254.287292077845
-167.318092135845 255.374148919886
-167.909870533405 256.577163293665
-168.634591607509 256.87496359617
-169.424373058735 256.853543832605
-170.938869862018 256.403167321985
-170.951590566097 255.731665447061
-170.687373547016 255.069165780847
-170.306906012951 254.434415176218
-169.970875172077 253.846160486048
-169.002249149738 253.061290338343
-168.678670553623 252.551151349848
-168.629871754108 251.959167077845
-168.239928586541 251.888723507231
-167.903574971615 251.701244428461
-167.446996120868 251.118289544886
-167.35445074564 250.794368639295
-167.370854644237 250.496522023981
-167.510047746955 250.26052714855
-167.785869984089 250.12216146261
-168.688621906696 250.289916589563
-169.045873073993 250.541513040369
-169.274876026569 250.942168786829
-169.192808149515 251.253115430181
-169.241967348514 251.443745687311
-169.607122806965 251.587291314905
-170.116654066501 251.619274213617
-170.516872791706 251.786162927454
-171.42362215942 252.665900304621
-172.148871807514 253.703792169397
-172.827622680126 254.788370206659
-173.594875721393 255.808166101282
-174.510047583042 256.121151759928
-175.478750614582 256.096543863123
-177.418873218952 255.73316915304
-177.42771589583 255.235086336439
-177.275671629368 254.792586400812
-176.646000294147 254.017287805384
-175.844015268741 253.293178632563
-175.1838726086 252.506164148157
-174.476498035846 252.415916040247
-174.171512512623 252.306762292688
-173.991871265827 252.009170129602
-174.302623180805 251.450791909998
-174.83687248653 251.11517293722
-175.578072143851 251.025549366777
-176.26965406364 251.223749711817
-176.906344933568 251.646504595583
-177.482871441303 252.230544641321
-178.434338120876 253.629402711695
-178.798731668053 254.31768198282
-179.081867603718 254.914168908899
-180.51237526363 254.615792825525
-181.235690025745 254.431961372202
-182.035877613483 254.318160608118
-181.624607948719 253.218849017923
-181.073746113239 252.226415231531
-180.401948837696 251.336357429331
-179.627872852741 250.544173791712
-179.605296997486 250.234263017481
-179.745750812946 249.982665613001
-180.198871998249 249.700164392298
-180.750604508577 249.826381101911
-181.199843553959 250.098823621576
-181.930624393879 250.895167901819
-182.670780806003 251.714760854547
-183.131739316641 252.016264214819
-183.699879078327 252.183166101282
-184.084246067463 252.726041391199
-184.202042250095 253.017494037455
-184.170872120319 253.325164392298
-185.685871509968 253.250167444055
-185.750922905414 252.813052732205
-185.730164824186 252.436332091396
-185.476765303074 251.831055476969
-185.016763089357 251.368302508896
-184.441248325763 250.982038095301
-183.841311155019 250.606227144306
-183.308041719852 250.174834564035
-182.932530162988 249.621825262611
-182.805866627155 248.881164148157
-183.324567375837 248.508855357473
-183.941387800632 248.516258313959
-184.614293215929 248.812364950483
-185.301248936115 249.306167199915
-186.54917254871 250.522826268976
-187.026071069895 251.063666954344
-187.348881153522 251.438170984095
-188.103248981891 251.646287515467
-188.838871387897 251.612166955774
-188.731433330236 250.958199605053
-188.468933729587 250.412244632547
-188.084841011224 249.947219773834
-187.612623600422 249.53604276449
-186.537688402591 248.766903236216
-185.511875538288 247.888167932337
-185.52449837154 247.329417779749
-185.602856068073 247.106014325922
-185.834873585163 246.994170739954
-186.376623748003 247.007386699026
-186.873923448978 247.122978284662
-187.780500797687 247.558913781946
-188.645264295994 248.097228124445
-189.5588726086 248.533172204798
-190.169998554645 249.315415933435
-190.448889641224 249.6857302931
-190.799869923053 249.949172571009
-191.085573760925 249.308977588718
-190.991483597217 248.759510829752
-190.619681803642 248.272810980385
-190.072250751911 247.820916726892
-188.858830360828 246.909699752634
-188.3970057649 246.394454404419
-188.167881397663 245.80216939718
-187.007627872883 245.389916971033
-186.52734580463 245.030978515451
-186.181873707233 244.51116903097
-186.160422710834 244.279924198692
-186.302965549885 244.143964126413
-186.559837727009 244.098449215
-186.881374744831 244.13853986532
-187.519785313068 244.45617945463
-187.737329868732 244.724049195354
-187.820881275593 245.058166101282
-188.068867115436 245.058166101282
-188.093994526325 244.545545175379
-188.180949119983 244.278967216318
-188.416874317585 244.089171960657
-188.734436420856 244.118274762934
-189.021625904499 244.263537957971
-189.229690937458 244.501618459528
-189.309879688678 244.80917318136
-189.269563732801 245.043443992441
-189.336311010776 245.216930940454
-189.688619999347 245.445537164514
-190.16205611652 245.622959688013
-190.551868824421 245.877166345423
-191.659370808063 247.180543496912
-192.562870411335 248.633163049524
-192.938801637052 248.406994819348
-193.171949712692 248.143950417345
-193.266796974598 247.534010484522
-192.961213318763 246.856898024385
-192.368999866901 246.166167810266
-191.603957740722 245.515374615496
-190.779888061939 244.958073213404
-190.010591952263 244.547818377321
-189.409870533405 244.338164880579
-189.667120365558 243.689410760706
-190.129871754108 243.096160486048
-190.799869923053 243.146163537805
-191.781840233265 244.15039785177
-192.807873157917 245.147788598841
-193.680154709278 246.242866113489
-193.996821848808 246.859703138178
-194.200870899616 247.540160730188
-194.564129261432 247.37578923971
-194.796879200397 247.044173791712
-194.737574575601 246.223557337826
-194.41095366901 245.600825145548
-193.901075301824 245.113140746658
-193.291998295246 244.697667672937
-192.667781470476 244.291569456165
-192.112483648716 243.832009628122
-191.710163651167 243.256151720589
-191.54488029903 242.501159265345
-191.800878672062 242.576400115793
-192.010378269611 242.547292306726
-192.285129217563 242.699868038004
-192.48189586228 242.933672293728
-192.736881641803 243.320159509485
-193.698282627521 243.978118970697
-194.604374317585 244.928294732874
-195.277967838703 246.030156209772
-195.472206263004 246.594053283041
-195.541874317585 247.143172815149
-195.572453169285 247.09313972265
-195.731001285969 247.059417321985
-195.774400346172 247.071406071589
-195.977004675327 247.29952509672
-197.174879459797 248.038537576502
-197.244438985716 248.080712723111
-197.463313726841 248.254011943643
-197.704878239094 248.449918344324
-197.764942316471 248.594449355905
-197.850880054889 248.95516927511
-197.922702429949 249.171430572575
-198.066795496402 249.591587856119
-198.426996616779 250.742791726892
-198.570706127344 251.323438986843
-198.641889242588 251.807183578318
-198.604346690832 252.118825837677
-198.421879200397 252.183166101282
-198.001622466503 251.940796985929
-197.824517635761 251.594950750177
-197.776249317585 250.643920495813
-197.693328647075 250.064283266371
-197.430045513569 249.432262494867
-196.880521325527 248.760631575888
-195.938877491413 248.062163904016
-195.21887627071 248.062163904016
-195.906389204918 248.655477598017
-196.492733864246 249.328290536707
-196.969742385803 250.066915586298
-197.329246906696 250.857665613001
-197.563079564033 251.686853483026
-197.663072494922 252.540792062586
-197.621057836471 253.40579421789
-197.428867725788 254.268172815149
-196.764150856195 253.59375093848
-196.32404628223 252.69385988981
-195.722002415119 250.702920511072
-195.362227318941 249.854497298305
-194.831392912327 249.265855148142
-194.470916623382 249.106862146115
-194.03058129376 249.058306619232
-193.498022185771 249.135352637326
-192.860874561725 249.353164270227
-193.557114301382 249.653296723669
-194.042532591282 250.101788595026
-194.369184492288 250.663155689543
-194.589125065265 251.301913812464
-194.917092470585 252.669666364496
-195.129229424654 253.327692404097
-195.442875294147 253.921172693079
-195.420877842365 254.920167520349
-195.306192068516 255.401385143106
-195.04488029903 255.808166101282
-194.630868313966 255.366066708868
-194.39022269672 254.84161956579
-194.182375339924 253.663291528528
-193.928027777134 252.508400991266
-193.629256902395 252.013250723188
-193.133869556843 251.612166955774
-192.307993320881 250.854920938318
-191.79975810474 250.662671401804
-191.221866993366 250.768172815149
-190.921475229917 251.187075093096
-190.903540281711 251.560403421228
-191.096800683199 251.902958586519
-191.42999496883 252.22954137594
-192.231139330326 252.893992975061
-192.556566475092 253.261463358705
-192.736881641803 253.672164514368
-193.030611125885 254.221695854967
-193.096060661731 254.798789575403
-192.894619373737 255.978663995569
-192.803978292404 256.55294461519
-192.837556747852 257.097787454431
-193.083479611335 257.598942473238
-193.629871754108 258.042159631555
-193.825622944294 258.824292733972
-193.863871960102 259.194588973825
-193.629871754108 259.53216512472
-193.128486303745 259.272023275202
-192.764254002033 258.849040582483
-192.140873341022 257.868163659876
-191.858859716116 257.236263170546
-191.742701200901 256.582460477655
-191.693746952472 255.289538934534
-191.603849945722 254.690615310972
-191.36560550159 254.150179937189
-190.900462983309 253.688330426519
-190.129871754108 253.325164392298
-189.534089950977 252.986663177317
-188.770122913776 252.70666272909
-188.009531883655 252.661412074869
-187.684115259109 252.781895741527
-187.423878101764 253.027160241907
-187.985561518131 254.643897130793
-188.754621891437 256.186290338343
-189.416808752475 257.775369718378
-189.609621344267 258.625238552397
-189.657871632038 259.53216512472
-189.931126026569 260.133918359583
-189.905872730671 260.773162439173
-189.606054308025 261.033577825581
-189.354146419225 261.173382207458
-188.977861074863 261.144027068918
-188.744614360986 260.790835246151
-188.622003940998 260.219544961756
-188.579082636295 258.845621898477
-188.593967078386 258.254465564793
-188.589878467975 257.868163659876
-187.544744877277 255.97228772909
-186.405872730671 254.095168664759
-186.042839257179 254.30370391876
-185.610218910633 254.358325078791
-184.677124409137 254.265418603723
-184.247103659569 254.247687712019
-183.888402847706 254.335636213129
-183.636248676239 254.59416247875
-183.525867847858 255.088164880579
-184.153951494156 255.721615537708
-184.585101990162 256.422261073893
-184.845792023597 257.178171917503
-184.962494282184 257.977418496912
-184.869826225696 259.658200576609
-184.518879322468 261.369170739954
-184.764768986164 261.777758434122
-185.126999287067 262.107411935633
-185.377666859089 262.465192153757
-185.389944819866 262.688086315697
-185.288868336139 262.958159997766
-184.52162399715 263.252666070764
-184.118590502201 263.219450071161
-183.773868946491 263.007171228235
-183.363065598665 262.359424903696
-183.242933420597 261.716964319055
-183.510370640217 260.431541040247
-183.847556738315 259.118182733362
-183.814610658346 258.440803363626
-183.525867847858 257.744170739954
-182.96124496883 256.884542062586
-182.284870533405 256.081161096399
-181.335290102421 256.105054214304
-180.388243107258 255.994042947596
-179.501761106907 256.032093837564
-179.09936684197 256.195757135456
-178.733875660358 256.503173425501
-179.21279707378 257.15484563977
-179.524374393879 257.853686645334
-179.68520155376 258.586301669186
-179.71187248653 259.339295938318
-179.429121403156 260.852843120401
-178.8088726086 262.287170007532
-178.525298057256 262.62677670986
-178.560590414463 262.969278409784
-179.094370274006 263.628043725794
-179.346154986082 263.926845803564
-179.423401026188 264.193619802301
-179.202756999193 264.419634952848
-178.560871509968 264.596160486048
-178.035511760174 264.563493802851
-177.561246303974 264.37004049093
-177.17079308456 264.041398122614
-176.896870045124 263.603164270227
-176.941793112217 261.976012304132
-176.791246799885 260.416171624964
-176.631513742862 258.87957961828
-176.648876575885 257.322173669641
-175.749484686313 257.454337671106
-174.74049988216 257.523788049524
-173.698702005802 257.597930505579
-172.700870899616 257.744170739954
-173.172788111625 258.562743052547
-173.304826168476 259.424123599832
-173.211043683944 260.310558482712
-173.005499271808 261.204293802088
-172.802251545845 262.087575658863
-172.715359119831 262.94265015394
-172.858880607544 263.751763388222
-173.34687462276 264.49716146261
-173.357450990139 264.881884172266
-173.265746502338 265.192168786829
-173.053105143963 265.390701844995
-172.700870899616 265.440169885462
-172.176987407861 265.247643366163
-171.842232374607 264.914902761286
-171.65295356339 264.473951831167
-171.565498737751 263.956794336145
-171.521452097355 262.821874692743
-171.360874561725 261.766173913782
-171.15526419705 261.243981525009
-171.061685232578 260.694203689402
-170.997621921955 259.578172281092
-170.920637784658 259.045059010094
-170.742685465275 258.55064089567
-170.410515068231 258.111488088673
-169.870876697956 257.744170739954
-169.146780995784 257.629702403849
-168.452872662006 257.741170480555
-167.828714637218 258.034138992136
-167.313869862018 258.464171960657
-167.652372745929 259.900922372644
-167.708465723453 260.695046737497
-167.561870960651 261.468169763391
-165.898876575885 264.596160486048
-166.333123592792 265.586164071863
-166.526905087887 266.066257789438
-166.543873218952 266.558166101282
-166.284463701902 266.821791156834
-165.98921790546 266.907291248148
-165.358623890339 266.68566663534
-164.786904005466 266.176792457407
-164.408871082721 265.664168908899
-164.336720092354 265.278974070852
-164.39434197372 264.965919568842
-164.756873516498 264.472419336145
-165.212404040752 264.016043737238
-165.386274648963 263.749395027464
-165.476871876178 263.429168298548
-164.871872333942 261.384542062586
-164.691340832172 260.270026042765
-164.731869129596 259.060165002649
-163.022122768818 258.476790979212
-162.110060243068 258.382776334589
-161.181873707233 258.563170984095
-160.829952417074 258.927526190584
-160.610124735294 259.312201097315
-160.443375019489 260.140166833704
-160.434874205051 261.042381837671
-160.337871937214 262.014159753626
-158.872875599323 265.093169763391
-159.290068848191 265.03528051049
-159.603247193752 265.196884467905
-159.808801187335 265.519505008762
-159.903121380268 265.944665506189
-159.88259832388 266.413889333313
-159.7436225695 266.86869986326
-159.482584668456 267.250620469158
-159.095875172077 267.501174524134
-158.660744659735 267.307568020826
-158.317081911622 267.05679465801
-157.865030793606 266.408766820734
-157.661463989077 265.607129946058
-157.628123669086 264.701922967737
-157.759091166912 262.780954435175
-157.766883326827 261.865270748442
-157.631870655475 261.046172693079
-158.025495914875 259.593917444055
-158.312074570118 258.909507825678
-158.698871998249 258.290160730188
-158.000340132175 258.064226463144
-157.206371693073 258.101167276209
-155.545872120319 258.563170984095
-155.345503358303 258.863169058865
-155.0881694836 259.053105190103
-154.453747181354 259.202916696375
-153.744886784015 259.212855651682
-153.063869862018 259.283172204798
-152.859058080373 260.261898621624
-152.524496225773 261.182746723001
-151.691872028766 262.935792520349
-151.017496733127 264.71227867872
-150.880746005235 265.662427231377
-150.952869800983 266.682174279993
-150.930521501361 267.001462861603
-150.794137744365 267.248435333078
-150.294248012958 267.503541543787
-149.683168916164 267.403712108438
-149.407798452435 267.207015022343
-149.190868763385 266.905166223352
-149.185464171825 266.52893002302
-149.280372051655 266.203790262049
-149.537868885456 265.614165857141
-149.565997509418 262.386787011927
-149.799857406078 260.880302980249
-150.054301036654 260.182368471926
-150.431873707233 259.53216512472
-150.003790183125 259.241331919735
-149.497764615474 259.049732044046
-148.340247539936 258.914170816248
-147.1360428614 259.025358512705
-146.061870960651 259.283172204798
-145.276723532139 259.940378203695
-144.751309780536 260.700277402704
-144.410301832615 261.532904520338
-144.178371815143 262.40829427511
-143.740434078632 264.167500570124
-143.383770613132 264.991386547392
-142.834873585163 265.738174035852
-143.059286611287 266.207230668222
-143.181931195913 266.599809452598
-143.175340799747 267.169965102976
-142.921953914819 267.477504238193
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_4.poly b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_4.poly
deleted file mode 100644
index b9dcc42..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/data/large_4.poly
+++ /dev/null
@@ -1,643 +0,0 @@
-3
-597
-134.736468231438 354.909490555232
-134.616513168572 354.396959811156
-134.337839996575 353.944991558497
-133.909729873894 353.726273208564
-133.642536318062 353.758347563153
-133.341463958977 353.913492172664
-132.697050368546 354.325671970551
-132.004227554558 354.521992414897
-130.522337829827 354.523742645686
-128.99376193261 354.432117670482
-128.242581403015 354.511719107335
-127.516467010735 354.760492294734
-125.549338257073 354.940866917079
-124.603133117913 354.809288650458
-124.155654942749 354.600325546866
-123.731463348625 354.262491196101
-124.425782943277 353.153720496861
-125.248209064959 352.227169058924
-126.184441896288 351.46897799213
-127.220181619881 350.865288406318
-128.341128418354 350.402241411326
-129.532982474325 350.065978116994
-130.78144397041 349.842639633162
-132.072213089226 349.718367069667
-134.723474925516 349.711584143048
-137.37236944413 349.93475821585
-139.904498106001 350.277018166786
-142.205462372063 350.627492874568
-142.787519401072 350.658617444044
-143.174740946053 350.484992056792
-143.400947338103 350.153866730338
-143.499958908318 349.712491482203
-143.451678907631 348.687991290992
-143.300463592766 347.789491623347
-142.949247067927 346.910989165013
-142.441680109261 346.130537718242
-141.812754636763 345.429469287103
-141.097462570427 344.789115875667
-139.54774633622 343.615882128184
-138.072466766594 342.461492508357
-135.705545818566 343.662773161834
-133.329340851067 344.975991695826
-132.111536478756 345.476237810855
-130.859946644066 345.76646056742
-129.564083194493 345.767324022656
-128.213457977532 345.399492233699
-127.570575242995 345.502064436381
-126.917133009194 345.753382652705
-125.611336624382 346.363866775935
-124.975365763663 346.55383750767
-124.361601984261 346.554163902705
-123.778236931322 346.280248373454
-123.233462249993 345.647493332332
-122.561512565373 345.583762243097
-121.890067493675 345.678773492282
-120.551081573723 346.046241730159
-119.884735917805 346.169308080976
-119.221285259484 346.152335494464
-118.561327194927 345.920628651684
-117.905459320305 345.399492233699
-115.913454925774 345.996492355769
-115.79042542739 345.440820270856
-115.517208149789 344.893915399616
-114.647710358856 343.824069350665
-112.508962547539 341.763866394465
-111.74971293485 340.764157697266
-111.559181790931 340.269855839839
-111.537213122605 339.778476327365
-111.715681955351 339.289434672972
-112.126463314651 338.802146389788
-112.801432225986 338.31602699094
-113.772463714836 337.830491989558
-115.940058147667 337.991304367488
-118.079714691399 337.886241882747
-120.144744312523 337.417054146235
-121.134683704136 337.015210061973
-122.088457977532 336.485490768855
-123.356441503523 336.61404316098
-124.521194135903 336.505724757617
-125.600798076151 336.203695609873
-126.613335525749 335.751115768855
-128.509539758919 334.566944211429
-130.354464447258 333.298490494197
-130.62741676545 332.495709865992
-130.746338760613 331.5809917149
-130.669323599098 330.666273563807
-130.354464447258 329.863492935603
-129.567917978523 329.425930112307
-128.69258967614 329.203242271846
-127.826448118447 328.924680083697
-127.427437549589 328.679836943453
-127.067461883782 328.319494217341
-127.516467010735 326.32748982281
-126.60335675454 326.248816579287
-125.704588806389 326.03486344189
-124.890009319542 325.606223433917
-124.229464447258 324.883489578669
-124.280025160073 324.522789209788
-124.419261848686 324.220506637996
-124.889090454338 323.763116806453
-126.071459686516 323.24049183697
-128.045588171242 322.72757002682
-130.061715042351 322.200866669124
-131.005254274367 321.811204045718
-131.862964784859 321.272724598353
-132.602737134455 320.536971181338
-133.192461883782 319.555486648982
-133.097791349648 318.915316790049
-132.918839370964 318.354364365046
-132.590447580574 317.895973890727
-132.047457611321 317.563489883845
-131.321379011629 317.762583940928
-130.693444406746 318.138490646785
-129.61983576989 319.212991684382
-128.602288877724 320.371492355769
-128.044431453703 320.852398603862
-127.416460907219 321.198492020076
-126.08184299445 321.365844979589
-124.740147983788 321.398444026416
-122.100962555168 321.37911507458
-120.836190080403 321.487054422205
-119.629776394127 321.779974549716
-118.498080467938 322.337809130257
-117.45746127343 323.24049183697
-116.706987016035 323.172709356701
-116.051539948343 322.94990545482
-115.476459931715 322.599144581412
-114.967086827515 322.147491186564
-114.086820801852 321.049764632886
-113.293460762261 319.873241394465
-112.469725599645 318.834437071984
-112.009817000611 318.434340629434
-111.49833420491 318.149867266124
-110.920617073907 318.008081432139
-110.262005468963 318.036047577565
-109.507839251442 318.260830152487
-108.643458282707 318.70949360699
-107.756882107018 319.34239837498
-107.075335418938 320.078241318171
-106.864036416767 320.499354481404
-106.767100727318 320.963710039561
-106.805563664196 321.477143943017
-107.000460541008 322.045492142146
-107.344176164029 322.500684171622
-107.834867989777 322.941849678462
-108.930461799858 323.838115662043
-109.372004559396 324.321223407691
-109.633805072067 324.846319168513
-109.634183725475 325.427406578963
-109.291460907219 326.078489273494
-108.689460998533 326.651365786498
-108.00458637452 327.160692184871
-106.614962494133 328.126365631526
-106.024587994574 328.651548176711
-105.580088293312 329.250851601069
-105.338650768755 329.958693653052
-105.357462799309 330.809492081111
-106.100542104004 331.533521681731
-106.670839226006 332.383739918178
-106.820947921036 333.28083386988
-106.6611171571 333.722173951273
-106.303461944817 334.145490616267
-105.779321586846 334.778944283431
-105.133587753533 335.178865879481
-103.664462005852 335.689489334529
-103.405463135002 335.158490150874
-103.272463714836 334.580990761226
-103.216463958977 333.547491043513
-102.405018603562 332.811808637982
-101.738275921105 332.031161457007
-100.689461624382 330.37936350674
-99.7711471674425 328.680878668731
-98.6844586489184 327.024488419002
-98.9340847936852 326.306736111348
-99.3925855514986 325.754709452098
-100.539461052178 324.895740478938
-101.029460867999 324.462751865094
-101.33158544278 323.943396299785
-101.346647312997 323.274650633042
-101.215533651544 322.864561777269
-100.975459015129 322.3934917149
-100.025632446764 322.368326157039
-99.0804115889055 322.620239227717
-97.2038334963305 323.458238571589
-96.2724995074255 323.79579350323
-95.3458177206499 323.913364380305
-94.4237997589094 323.686685532039
-93.5064572451098 322.991491287654
-93.6115043518526 322.355770080989
-93.7865828630907 321.678237884944
-93.8215985653383 321.010081261104
-93.5064572451098 320.402486771052
-92.7935083267672 319.936223119204
-92.0620879290087 319.362614601558
-91.5176024792177 318.686442702716
-91.3796498683674 318.311389699285
-91.3654584047777 317.912488907283
-92.1932086107714 317.370864838069
-92.9084576723559 316.717489212459
-92.5112406370623 315.185365289157
-92.0437096712572 313.611239403193
-91.913478976248 312.824480756824
-91.921552812813 312.046487658923
-92.1198921856863 311.283682122534
-92.560458099602 310.542486160701
-93.0658665058596 310.878865211909
-93.6929606554491 310.990991562312
-94.3388045189364 310.878865211909
-94.9004620668871 310.542486160701
-95.3024705705626 310.114232271617
-95.5860253927691 309.655004948085
-95.865462219475 308.669364899104
-95.8741490004046 307.637035816615
-95.7474621889574 306.609487503474
-95.5843506754769 305.749551547398
-95.311168065427 304.973391607111
-94.4984917995913 303.624534457629
-93.4372378793938 302.467185422485
-92.2552107927782 301.405613869136
-91.0802150276882 300.344089165037
-90.0400550720675 299.186880677646
-89.6104774252904 298.542479192545
-89.2625354138596 297.838257774418
-89.0122045987679 297.062250094195
-88.8754605410082 296.20248982281
-91.2154645082934 294.309492081111
-91.7065436152203 294.535263240045
-92.1456036922915 294.901038378184
-92.9400881884081 295.753866165584
-93.3317233232243 296.091551601594
-93.7437608597262 296.270506590312
-94.1943061557991 296.216047525113
-94.7014645693285 295.853490799373
-95.7035845873339 292.78486344189
-95.8563523200733 291.998809769457
-95.8848197815401 291.19697102875
-95.7463892904503 290.375234052246
-95.3984631655199 289.529485672419
-96.1518851873858 289.32328328461
-96.7930878756029 288.813612907832
-97.8884610292895 287.537488907283
-98.3364590761645 284.25148579449
-99.1744443533404 283.872392505114
-100.073084747551 283.535487144893
-100.850412046669 283.095832436984
-101.136718219279 282.792181178635
-101.324458038567 282.408491104548
-100.610771333931 282.004879802173
-99.7992104647143 281.792612999385
-98.9782740232928 281.813784211581
-98.2364606020434 282.110486954158
-96.9580056277497 283.1566387412
-95.9631326553805 284.337004869883
-95.199330022691 285.627081572717
-94.6140860674364 287.00236508221
-93.7692275402529 289.910537451213
-93.0084637758715 292.86549183697
-92.6221810785515 292.528913810556
-92.0941489098055 292.366804450457
-90.8112105486376 292.274241417354
-90.1554915515167 292.197912588423
-89.556397473572 292.004302113955
-89.0635219124539 291.620472415989
-88.7264584658129 290.97348591656
-88.7943413165791 290.256545856302
-88.9520836231692 289.503956645434
-89.2617091295702 287.992238014644
-89.2758735922558 287.283312216108
-89.1044600365145 286.639144509738
-88.6786090937836 286.084836706226
-87.9294613955004 285.645490616267
-87.2951375303252 285.480674653953
-86.7314306852801 285.215909927791
-86.2447393593771 284.861590891784
-85.8414620516283 284.428111999934
-85.5279972610457 283.925867706244
-85.3107434866411 283.365252464717
-85.1904629824145 282.110486954158
-86.9207123873217 281.512738197749
-87.6691180822832 281.073801368182
-88.2774609682543 280.466489761775
-88.7490849850161 280.311129420703
-89.2859610674364 280.305113762324
-89.8040874359591 280.243034928744
-90.2194623110277 279.919485062068
-90.1425675955994 279.33384042949
-89.9309304115755 278.773941248362
-89.2177104113085 277.740613907283
-88.3083658573611 276.837972372477
-87.4314602968676 276.084485977595
-87.7721794006808 275.891661256259
-87.9921483156664 275.624128788417
-88.1842106935961 274.93961331219
-88.2363976595385 274.180284946864
-88.3774594423754 273.495489090388
-90.1637114641649 271.460238426631
-92.0624646303637 269.462484329646
-92.2078211662752 269.898314684337
-92.1805857775194 270.371362656062
-92.1812897083742 270.862972944682
-92.4104642031176 271.354490250056
-93.3327575383169 271.290117308205
-94.1120707151873 270.960818379825
-94.7921732721312 270.442448928659
-95.4168347475512 269.810864418452
-96.6749126074297 268.511472075885
-97.3958680686934 267.995375171011
-98.2364606020434 267.669485062068
-100.363017460464 267.228535413449
-102.428226744889 266.624753683513
-106.484336769341 265.211114853328
-108.530104598163 264.5424681899
-110.624259030579 263.993410318797
-112.794233610986 263.634546458428
-115.067461883782 263.536481827205
-115.390959655998 261.737865417903
-115.753429329155 260.938723772471
-116.054323589562 260.611157655423
-116.461459076164 260.349485367244
-117.009563719986 261.097417711919
-117.166588699578 261.8792526421
-117.055112397431 262.686798512643
-116.797713196038 263.511863678401
-116.335459625481 265.181785314982
-116.375762021301 266.010258495515
-116.760455047844 266.823484390681
-117.880459701775 267.513988464778
-118.314649259804 267.978299826091
-118.414485102652 268.270900070374
-118.403460418938 268.615484207576
-118.456658816097 269.211302578156
-118.27760258889 269.824018686717
-117.656836426018 270.999738663142
-117.432181572674 271.512539803689
-117.409382259606 271.94183322758
-117.696966027973 272.262517571156
-117.991066424309 272.374287161683
-118.403460418938 272.449491470759
-119.355099087713 272.088581278627
-120.330057775734 272.072472899859
-122.275216018913 272.530863731807
-123.208055978773 272.733464017218
-124.089496767281 272.737068265384
-124.900858586786 272.405727013653
-125.274422446398 272.071967618247
-125.623461639641 271.603490799373
-125.765258228539 270.812893837398
-125.71083728051 270.022485702937
-125.275469696282 268.516485184138
-124.662077581642 268.27523538441
-124.104840194939 267.931236236995
-123.622415697335 267.493861883586
-123.233462249993 266.972486465877
-123.200286125897 265.863791316455
-123.321692859886 264.713049858516
-123.78783313012 262.341489761775
-124.151039516686 259.969929665034
-124.143778896092 258.819188207095
-123.930468475579 257.710493057673
-124.506095415114 256.65383416385
-125.182608282326 255.633912771647
-126.588589584587 253.608612030452
-127.193206912039 252.555397450631
-127.649007951973 251.443249910777
-127.893567150591 250.248251795476
-127.864458954094 248.946485489314
-128.696370845793 247.681423216765
-129.319993650673 246.285661190455
-130.360215103386 243.382116287654
-130.985735302923 242.014372616713
-131.820809519051 240.796007603114
-132.34957337579 240.264723218685
-132.969898527621 239.797040849631
-133.694842571525 239.401712946301
-134.537463104485 239.087491959041
-135.359450733422 238.379456728404
-135.924841797112 237.456737488215
-136.294292843102 236.440643042033
-136.528460418938 235.452482193416
-136.243180668114 235.042577713435
-136.18646517968 234.525236099666
-136.180468475579 233.410490005916
-135.26453339508 233.214220575695
-134.434079712389 233.174596219962
-133.680064918606 233.275573886638
-132.99344650483 233.501110523646
-132.365181962161 233.835163078909
-131.786228781698 234.26168850035
-130.740086471794 235.327985733455
-128.841667806862 237.864360302394
-127.844711309431 239.077748804992
-126.719469940422 240.083478897517
-126.531453346966 240.714140623515
-126.475918209313 241.449826210444
-126.451838409661 243.021486252253
-126.328066801785 243.750069349711
-126.026322757958 244.368893593257
-125.468992805241 244.824263304179
-125.070228902755 244.973872810309
-124.578463470696 245.062482803767
-124.180497562645 245.926267832225
-123.824717437981 246.81798931927
-123.31031075692 247.541708677714
-122.930868601559 247.779336750214
-122.43646517968 247.901487320369
-121.98335186219 248.052297085231
-121.459835922478 248.063234299128
-121.001382505654 248.167549580043
-120.838887101172 248.32761481375
-120.743456756829 248.598493545955
-120.535072242974 249.749992102092
-120.15859118676 250.901489227717
-119.883964931725 251.413019358819
-119.539295112847 251.847487657969
-119.115241920708 252.179206967061
-118.602465545891 252.382490127986
-117.658194696663 252.250335186427
-116.797833359001 251.884740799373
-115.956037199257 251.444519489711
-115.067461883782 251.08848378033
-114.553394859789 251.777962922757
-114.317179834603 252.609250276988
-114.220711624382 254.442859619563
-114.131661361216 255.317986607259
-113.86286894059 256.080531805461
-113.299935823439 256.666897713845
-112.872416960208 256.874139215504
-112.328463470696 257.013486832087
-112.047541508584 256.553165059244
-111.747588222979 256.224925338929
-111.098462736366 255.895551413005
-110.396837121008 255.887083768552
-109.658461487053 256.061241119807
-108.134460603951 256.404305666392
-107.380335575102 256.296650290196
-106.652460968254 255.818494766658
-105.467931425331 256.950054377025
-104.124962723015 258.034740417903
-102.800742304085 259.194050520366
-101.672457611321 260.549482315486
-101.287194049118 260.341211408084
-100.942148601769 260.013936966365
-100.309712326287 259.217111557429
-99.6491493341906 258.588474243586
-99.2689454910738 258.471434920733
-98.8344601747973 258.557493179744
-98.6903377139402 259.153280336117
-98.4706643429978 259.643540024465
-97.8478367683871 260.36611768574
-97.0523212460263 260.842507540887
-96.1704615709765 261.189990967219
-95.2886015382988 261.525849342053
-94.4930849430544 261.967364042705
-93.8702555803044 262.631816446488
-93.6505810470713 263.084294717466
-93.5064572451098 263.63648793072
-92.4776162115319 264.388501181906
-91.3075993416292 264.919346183246
-88.8380850908739 265.721360176509
-87.6856112090332 266.194443538492
-86.6860084888918 266.85018739075
-86.266506236179 267.278106121054
-85.9127886799557 267.789548918312
-85.6340447889102 268.397135430654
-85.4394635317309 269.113485306209
-85.2064154056294 270.158124923413
-85.2738366482241 271.252346247142
-85.7569617388232 273.45186230511
-85.896102836488 274.488321184819
-85.78258780217 275.436690061992
-85.5878713057769 275.867085147356
-85.2781352606995 276.262551009362
-84.8360944950415 276.618785407101
-84.2444638369066 276.931486099666
-84.3983449099047 278.105893507307
-84.3456486818774 279.249362796252
-83.8959607241137 281.506487816279
-83.44627276635 283.828862756198
-83.3935765383227 285.053894445007
-83.5474576113207 286.342489212459
-83.6790998784287 286.819214164918
-83.9006479141695 287.251536577647
-84.4687117693407 288.048364609187
-84.962150132416 288.863754957622
-85.0904163030369 289.319280266469
-85.091463958977 289.828489273494
-84.2736814377291 290.3713310656
-83.3672122118456 290.699486702388
-82.451368844269 290.878392785495
-81.6054638979418 290.97348591656
-81.4909137116207 291.484100274449
-81.4730037955029 291.921193986838
-81.6655402538759 292.616831272548
-82.0599442330582 293.144421368545
-82.5330866930468 293.587987869685
-82.9618385938389 294.031554370826
-83.2230708954317 294.559144466823
-83.1936545578224 295.254781752532
-83.0314753243161 295.691875464921
-82.7504605410082 296.20248982281
-82.2821846512539 297.108771934812
-82.2253189442141 298.057066291278
-82.6945838091357 299.986363380855
-82.895097246526 300.920701935594
-82.8557865974886 301.803724378055
-82.6953195632828 302.218700779309
-82.413843294738 302.612098619049
-81.9910067209435 302.981001386126
-81.4064587709887 303.322492569392
-81.3823336718065 303.772132485812
-81.5869588015063 304.119116753047
-81.875583564995 304.428788989489
-82.1034573671801 304.766492813533
-81.6217738000138 305.776545405095
-81.2655513641817 306.879926889842
-81.0435321835263 308.043965279763
-80.9644583818896 309.235988586848
-81.0370720831139 310.423324823087
-81.2701154110415 311.573302000468
-81.6723304895146 312.653248130982
-82.2524594423754 313.630491226619
-82.8035173696859 313.91096124955
-83.1994366404993 314.210094853943
-83.6008357164843 314.85969457001
-83.6066096780283 315.569973900621
-83.3667115328295 316.331616371577
-82.7497109529955 317.971724837726
-82.6725145337565 318.83155788452
-82.9494580385668 319.705488174861
-83.6357809809429 320.650364011233
-84.4708500263674 321.271427124446
-85.4120674935562 321.664958804553
-86.4168357012255 321.927240341609
-88.4466336128695 322.443178146785
-89.3864679542763 322.889396995013
-90.2194623110277 323.589490860408
-91.3953618464453 324.716746836608
-92.3717266676409 325.922787874644
-93.187052732466 327.193024187987
-93.8798359987719 328.512865990107
-95.051757967232 331.243006914561
-96.1954602358324 333.996492355769
-95.9317112324221 334.526803761428
-95.5044612047655 334.954740971034
-94.5524624941332 335.689489334529
-93.0758246538622 334.968386918013
-91.5076169130785 334.46847555012
-88.2342099306566 333.803116768306
-86.5978697893603 333.473114758437
-85.0076779482348 333.035194605296
-83.4980639574511 332.407079010909
-82.1034573671801 331.506490677302
-81.2246101704819 332.075711697047
-80.2261145470125 332.391069143718
-78.0639590380175 332.645365684932
-76.9971896616204 332.776890963023
-76.0045528767092 333.039725035136
-75.1344939378483 333.530160993045
-74.435458099602 334.344491928523
-75.2668571790142 335.315232764637
-76.1526764688475 336.176464795773
-78.071819936989 337.589961021846
-80.16137701845 338.624097764199
-82.3898362276537 339.317992180293
-84.7256860790236 339.710761427586
-87.1374150869829 339.841522663539
-89.5935117659552 339.749393045609
-92.0624646303637 339.473489731257
-93.9671496508105 339.05889663071
-95.9464615938647 338.882241218989
-97.8882741091234 339.088460772937
-98.8100785968287 339.380441561048
-99.680460846184 339.822492569392
-101.149694955109 341.386757880156
-102.618835365532 343.114616840785
-103.41170065677 343.910079605585
-104.27453879094 344.590663581794
-105.230681857227 345.104443035727
-106.303461944817 345.399492233699
-106.713770190386 346.531288570432
-107.228679960726 347.543267987376
-107.838417844979 348.44512921263
-108.533210432289 349.246570974296
-109.3032843118 349.95729200047
-110.138866072653 350.586991019254
-111.967459594963 351.642117947047
-113.940803712366 352.48954158247
-115.980711138008 353.206851750319
-118.008994585036 353.87163827539
-119.947466766594 354.561490982478
-121.624440407513 355.409717604225
-123.420511638878 355.988366216128
-125.30065331435 356.317264869516
-127.22983828759 356.416241615718
-129.173039412258 356.305124506061
-131.095229542015 356.003741591876
-132.961381530522 355.53192092449
-13
-108.793459808586 338.178491562312
-108.761770149825 337.639546550517
-108.58868149495 337.261429339354
-108.302295437215 337.016718141442
-107.930713569878 336.877991169398
-107.044368779419 336.808802753394
-106.154459869621 336.834489792293
-106.073443925141 337.246115654414
-106.179084694145 337.69974133343
-106.434163844345 338.143991440242
-106.80146304345 338.52749058575
-107.909212982414 338.52099177212
-108.411899959801 338.464210301345
-29
-119.598467743157 332.850492447322
-119.900662278889 332.501130439048
-120.315978443382 332.184475689834
-121.229334747551 331.555865734523
-121.599054431675 331.197199411397
-121.825254833458 330.777818113273
-121.843775725125 330.274366281634
-121.590456878899 329.663488357966
-119.923148309944 328.726753681605
-118.18571177697 327.95811268658
-116.4576508162 327.170909374659
-114.81846896386 326.178487747615
-114.151621258019 326.174669325059
-113.554150497673 326.31612846226
-112.471712982414 326.831863373225
-111.379902755974 327.319660395091
-110.770716106652 327.426197170918
-110.087466156243 327.373487442439
-109.962305700539 328.554472475951
-110.056710159538 329.838114231532
-110.515239870308 331.084443241065
-110.92622680044 331.649875007277
-111.482455169914 332.153490036433
-112.429406380413 332.649089932149
-113.401539242027 332.906599968379
-114.395912980793 332.986711561387
-115.409586822746 332.950116127437
-117.48307172036 332.769569843715
-118.537001228092 332.74700182647
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/help/index.html b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/help/index.html
deleted file mode 100644
index d8f1d8c..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/help/index.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>2D Straight Skeleton and Offsetting demo</title>
-  </head>
-
-  <body>
-    <P align="center"><FONT size="5">How to use 2D Straight Skeleton and Polygon Offseting Demo</FONT></P>
-    <br>
-    Main Functionality
-    <UL>
-      <LI><A href="#new">Reset application</A></LI>
-      <LI><A href="#new_window">Creating a new window</A></LI>
-      <LI><A href="#print">Print</A></LI>
-      <LI><A href="#close_window">Close the current window</A></LI>
-      <LI><A href="#quit">Quit the application</A></LI>      
-    </UL><br>
-    Input
-    <UL>
-      <LI><A href="#inp_p">Draw a new simple polygon with holes</A></LI>
-    </UL>
-    Generation
-    <UL>
-      <LI><A href="#outss">Generate the straight skeleton on the exterior of the polygon</A></LI>
-      <LI><A href="#inss">Generate the straight skeleton in the interior of the polygon</A></LI>
-      <LI><A href="#dooff">Generate offset polygons</A></LI>
-      <LI><A href="#setoff">Set the offset distance</A></LI>
-    </UL>
-    Persistance
-    <UL>
-      <LI><A href="#load_polygon">Load an existing polygon</A></LI>
-      <LI><A href="#save_polygon">Save the current polygon</A></LI>
-      <LI><A href="#format">Polygon with holes file format</A></LI>
-    </UL>
-
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="new">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Reset application</FONT></STRONG></P>
-    <p>Press Ctrl+N combination keys or go to File menu and choose "New". All the elements will be erased,
-     the window's visible area will be set to default. 
-    (-1, 1, -1, 1)</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="new_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  <p>Create a new window</FONT></STRONG></P>
-    Press Ctrl+W combination keys or go to File menu and choose "New Window". 
-    A new window will appear, modifying the visible area to be the default 
-    (-1, 1, -1, 1).</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="print">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">Print
-	</FONT></STRONG></P>
-    <p>Press Ctrl+P combination keys or go to File menu and choose "Print". The 
-    visible area on the screen will be outputed to the print device of your 
-    choice.</p>
-
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="close_window"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  <p>Close the current window</FONT></STRONG></P>
-    Press Ctrl+X combination keys or go to File menu and choose "Close". You 
-    may do it for any window other than the initial one, this operation will 
-    close only the one you have choosen. If you do this for the initial parent 
-    window, it will close the others too.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="quit">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Quit the application</FONT></STRONG></P>
-    <p>Press Ctrl+Q combination keys or go to File menu and choose "Quit". When 
-    you quit the application, all the windows you have created will be 
-    destroyed.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"><A name="inp_p">
-	  </A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Create a new simple polygon with holes</FONT></STRONG></P>
-
-    <p>This package supports polygons with holes. To create a a polygon with holes you must 
-    first create the <em>outer</em> contour, then the holes. The orientation of the contours is unimportant,
-    but you must create the outer contour first. The holes must be strictly in the interior of 
-    the outer contour. Holes cannot cross each other nor cross the outer contour and a hole cannot be inside
-    any other hole.</p>
-    <P>To draw the outer contour or a hole, Left click on the "Input polygon" layer. 
-    Be sure there is no layer activated in standard toolbar that eat events. 
-    To be sure, press the arrow button situated on the standard toolbar.
-    Left Click anywhere on the application's drawing area to insert points in the 
-    polygon. You may press "Esc" key if you want to erase the last point. 
-    Once you have completed the polygon press the right click to close the 
-    polygon. To deactivate this layer, just press the arrow button situated 
-    on the same toolbar.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="outss"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Generate the straight skeleton on the exterior of the polygon</FONT></STRONG></P>
-    <p>Press Ctrl+O combination keys or go to Generation menu, then choose "Generate Outer Skeleton".
-    The Straight skeleton on the exterior of the polygon currently drawn will be created. 
-    (holes are ignored by this command).<br>
-    As explained in the package's User Manual, the outer skeleton is constructed by placing the polygon
-    as a hole of a big <em>frame</em>. That frame is placed sufficiently away from the polygon
-    to guarantee that the frame will have its own independent offset. Therefore, the constructed
-    exterior skeleton will reach out only as much as it needs in order to make sure the frame offset 
-    doesn't merge with the polygon offset. If you create the offset polygons, you will see the frame offset
-    separatedly from the polygon offset.<br>
-    If the construction fails for any reason, a critical dialog will pop up saying so.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="inss"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Generate the straight skeleton in the interior of the polygon</FONT></STRONG></P>
-    <p>Press Ctrl+I combination keys or go to Generation menu, then choose "Generate Inner Skeleton".
-    The Straight skeleton in the interior of the polygon with holes currently drawn will be created.
-    If the construction fails for any reason, a critical dialog will pop up saying so.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="setoff"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Set the offset distance</FONT></STRONG></P>
-    <p>Press Ctrl+T combination keys or go to Generation menu, then choose "Set Offset Distance".
-       A dialog box will pop up with a slot showing the actual offset distance. You can enter
-       a new value there, and press the OK button; or press the Cancel button to leave the
-       current distance unmodified.<br>
-       The value that is shown initially corresponds to a 1% of the diagonal length of the bbox
-       of the currently load or drawn polygon (or 0 if there is no current polygon). 
-   </p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="dooff"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  Generate offset polygons</FONT></STRONG></P>
-    <p>Press Ctrl+F combination keys or go to Generation menu, then choose "Generate Offset Polygons".
-    If you have created the outer or inner skeleton, a sequence of offset polygons will be created. 
-    If not, a critical dialog box saying that you must first create the skeleton will pop up.<br>
-    The offset polygons will be created in the same region were the skeleton was created (exterior or interior)<br>
-    If you loaded or drawn a polygon, and <em>after</em> that, you have defined an offset distance, the offset polygons
-    will be created for that distance. On the other hand, if you have not defined an offset distance since the last time
-    you loaded or drawn the current polygon, the program will automatically pick up an offset distance corresponnding to 
-    a 1% of the diagonal length of the bbox of the polygon, and will create not 1 but 30 offset polygons stepping by that
-    automatic distance.<br>
-    If the construction fails for any reason, a critical dialog will pop up saying so.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="load_polygon"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  <p>Load an existing polygon wit holes</FONT></STRONG></P>
-    Press Ctrl+L combination keys or go to File menu and choose "Load 
-    Polygon". A load file dialog will appear, having a filter that displays 
-    only the files with "poly" extension. Choose a file then press "Open" 
-    button or hit "Enter" key.<br>
-    <FONT SIZE=3 COLOR="#0000FF"> The polygon saved does not contain the 
-      visible area. The application will change the current visible area to 
-      fit the bounding box of the polygon.</FONT></p>
-  <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-  <P align="left"><STRONG><FONT size="5"></FONT></STRONG> </P>
-	
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="save_polygon"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-	  <p>Save the current polygon with holes</FONT></STRONG></P>
-    Press Ctrl+S combination keys or go to File menu, then choose "Save 
-    Polygon". A save file dialog will appear. 
-    You may change the name then press "Save" or hit "Enter" 
-    key. To cancel the save process just press Esc key.</p>
-
-    <P align="left"><STRONG><FONT color="#3300cc" size="4">
-	  <A name="format"></A></FONT></STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="4"></FONT>
-      </STRONG> </P>
-    <P align="left"><STRONG><FONT color="#3300cc" size="3">
-    <p>Polygon with holes file format</FONT></STRONG></P>
-    <p>The files loaded and saved by this demo must have the extension ".poly"
-    and follow this simple text-based format:</p>
-    <pre>
-      (number of contours)[new-line]                           * integer
-      (number of vertices in outer contout)[new-line]          * integer
-      (x-coord) (y-coord)[new-line]                            * double
-      (x-coord) (y-coord)[new-line]                            * double
-      (x-coord) (y-coord)[new-line]                            * double
-      ..
-      (EOF) or (number of vertices in hole 0)[new-line]        * integer
-      (x-coord) (y-coord)[new-line]                            * double
-      (x-coord) (y-coord)[new-line]                            * double
-      ..
-      (EOF) or (number of vertices in hole 1)[new-line]        * integer
-      (x-coord) (y-coord)[new-line]                            * double
-      (x-coord) (y-coord)[new-line]                            * double
-      ..
-      ..
-    </pre>
-    <p>The package is distributed with some sample files you can look at</p>
-
-
-<hr>
-Last modified: Thu March, 2006
-  </body>
-</html>
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/ss_types.h b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/ss_types.h
deleted file mode 100644
index 6425aa9..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/ss_types.h
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef SSKEL_DEMO_SS_TYPES_H
-#define SSKEL_DEMO_SS_TYPES_H
-
-#include <CGAL/Straight_skeleton_builder_2.h>
-#include <CGAL/Polygon_offset_builder_2.h>
-#include <CGAL/compute_outer_frame_margin.h>
-
-namespace demo
-{
-
-typedef CGAL::Straight_skeleton_2<K> SSkel;
-
-typedef SSkel::Halfedge_iterator     Halfedge_iterator;
-typedef SSkel::Vertex_handle         Vertex_handle;
-typedef SSkel::Face_const_iterator   Face_const_iterator;
-typedef SSkel::Halfedge_const_handle Halfedge_const_handle ;
-typedef SSkel::Vertex_const_handle   Vertex_const_handle ;
-
-typedef boost::shared_ptr<SSkel> SSkelPtr ;
-
-extern void draw_point  ( Point const& v, CGAL::Color c ) ;
-extern void draw_segment( Point const& s, Point const& t, CGAL::Color c ) ;
-extern void wait_on_user() ;
-
-struct Visitor
-{
-  void on_contour_edge_entered ( Halfedge_const_handle const& he ) const
-  {
-    draw_segment(he->opposite()->vertex()->point(),he->vertex()->point(),CGAL::RED);
-  }
-
-  void on_initialization_started( int size_of_vertices ) const
-  {
-    mTotalVertices = size_of_vertices ;
-    mVertexCount0 = 0 ;
-    mVertexCount1 = 0 ;
-    mReflexVertexCount = 0 ;
-    mDegenerateVertexCount = 0 ;
-    mFoundEdgeEventCount = 0 ;
-    mFoundSplitEventCount = 0 ;
-    mProcessedEdgeEventCount = 0 ;
-    mProcessedSplitEventCount = 0 ;
-    mProcessedPseudoSplitEventCount = 0 ;
-    mAnihiliationCount = 0 ;
-    mStage = 0 ;
-  }
-
-  void on_initial_events_collected( Vertex_const_handle const& v, bool is_reflex, bool is_degenerate ) const
-  {
-    ++ mVertexCount0 ;
-    if ( is_reflex )
-      ++ mReflexVertexCount ;
-    if ( is_degenerate )
-      ++ mDegenerateVertexCount ;
-
-    draw_point(v->point(),CGAL::BLACK );
-
-    //printf("\rInitialization: %d/%d (%d%%)",mVertexCount0,mTotalVertices,(mVertexCount0*100/mTotalVertices));
-  }
-
-  void on_edge_event_created( Vertex_const_handle const& 
-                            , Vertex_const_handle const& 
-                            )  const
-  {
-    ++ mFoundEdgeEventCount ;
-  }
-
-  void on_split_event_created( Vertex_const_handle const&  ) const
-  {
-    ++ mFoundSplitEventCount ;
-  }
-
-  void on_pseudo_split_event_created( Vertex_const_handle const& 
-                                    , Vertex_const_handle const& 
-                                    ) const
-  {
-  }
-
-  void on_initialization_finished() const { printf("\n"); ++ mStage ; }
-
-  void on_propagation_started() const {}
-
-  void on_anihiliation_event_processed ( Vertex_const_handle const& node0
-                                       , Vertex_const_handle const& node1
-                                       ) const
-  {
-    draw_segment(node0->point(),node1->point(),CGAL::BLACK);
-    ++ mAnihiliationCount ;
-  }
-
-  void on_edge_event_processed( Vertex_const_handle const& lseed
-                              , Vertex_const_handle const& rseed
-                              , Vertex_const_handle const& node
-                              ) const
-  {
-    draw_segment(lseed->point(),node->point(), CGAL::BLACK );
-    draw_segment(rseed->point(),node->point(), CGAL::BLACK );
-
-    ++ mProcessedEdgeEventCount ;
-  }
-
-  void on_split_event_processed( Vertex_const_handle const& seed
-                               , Vertex_const_handle const& node0
-                               , Vertex_const_handle const& 
-                               ) const
-  {
-    draw_segment(seed->point(),node0->point(), CGAL::BLACK );
-    ++ mProcessedSplitEventCount ;
-  }
-
-  void on_pseudo_split_event_processed( Vertex_const_handle const& lseed
-                                      , Vertex_const_handle const& rseed
-                                      , Vertex_const_handle const& node0
-                                      , Vertex_const_handle const& node1
-                                      ) const
-  {
-    draw_segment(lseed->point(),node0->point(), CGAL::BLACK );
-    draw_segment(rseed->point(),node1->point(), CGAL::BLACK );
-    ++ mProcessedPseudoSplitEventCount ;
-  }
-
-  void on_vertex_processed( Vertex_const_handle const& node ) const
-  {
-    if ( node->is_contour() )
-    {
-      ++ mVertexCount1 ;
-      wait_on_user();
-      //printf("\rPropagation: %d/%d (%d%%)",mVertexCount1,mTotalVertices,(mVertexCount1*100/mTotalVertices));
-    }
-  }
-
-  void on_propagation_finished() const { printf("\n"); ++ mStage ; }
-
-  void on_cleanup_started() const {}
-
-  void on_cleanup_finished() const {}
-
-  void on_error( char const* what ) const
-  {
-    std::cerr << what << std::endl ;
-  }
-
-  void on_algorithm_finished ( bool /* finished_ok */ ) const
-  {
-  }
-
-  mutable int mTotalVertices ;
-  mutable int mVertexCount0 ;
-  mutable int mVertexCount1 ;
-  mutable int mReflexVertexCount ;
-  mutable int mDegenerateVertexCount ;
-  mutable int mFoundEdgeEventCount ;
-  mutable int mFoundSplitEventCount ;
-  mutable int mProcessedEdgeEventCount ;
-  mutable int mProcessedSplitEventCount ;
-  mutable int mProcessedPseudoSplitEventCount ;
-  mutable int mAnihiliationCount ;
-  mutable int mStage ;
-
-  void print_stats()
-  {
-    std::cout << "VertexCount                   =" << mTotalVertices << std::endl
-              << "ReflexVertexCount             =" << mReflexVertexCount << std::endl
-              << "DegenerateVertexCount         =" << mDegenerateVertexCount << std::endl
-              << "FoundEdgeEventCount           =" << mFoundEdgeEventCount << std::endl
-              << "FoundSplitEventCount          =" << mFoundSplitEventCount << std::endl
-              << "ProcessedEdgeEventCount       =" << mProcessedEdgeEventCount << std::endl
-              << "ProcessedSplitEventCount      =" << mProcessedSplitEventCount << std::endl
-              << "ProcessedPseudoSplitEventCount=" << mProcessedPseudoSplitEventCount << std::endl
-              << "AnihiliationCount             =" << mAnihiliationCount << std::endl ;
-  }
-
-} ;
-
-typedef CGAL::Straight_skeleton_builder_traits_2<K>                         SSkelBuilderTraits;
-typedef CGAL::Straight_skeleton_builder_2<SSkelBuilderTraits,SSkel,Visitor> SSkelBuilder;
-
-typedef CGAL::Polygon_offset_builder_traits_2<K>                          OffsetBuilderTraits;
-typedef CGAL::Polygon_offset_builder_2<SSkel,OffsetBuilderTraits,Polygon> OffsetBuilder;
-
-
-}
-
-#endif // SSKEL_DEMO_SS_TYPES_H
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2.cpp b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2.cpp
deleted file mode 100644
index f832c7d..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#include <CGAL/basic.h>
-
-
-#include<string>
-#include<iostream>
-#include<sstream>
-#include<fstream>
-#include<iomanip>
-#include<list>
-#include<map>
-
-#include <qplatinumstyle.h>
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qinputdialog.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qfiledialog.h>
-#include <qtimer.h>
-#include <qthread.h>
-#include <qtextstream.h>
-#include <qprogressbar.h>
-#include <qsocket.h>
-
-#include "cgal_types.h"
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/IO/Color.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/IO/Qt_help_window.h>
-#include <CGAL/IO/pixmaps/demoicon.xpm>
-
-#include <CGAL/assertions_behaviour.h>
-
-#include "ss_types.h"
-#include "straight_skeleton_2_toolbar.h"
-#include "straight_skeleton_2_toolbar_layers.h"
-#include "straight_skeleton_2_layers.h"
-
-// This is here only to allow a breakpoint to be placed so I can trace back the problem.
-void error_handler ( char const* what, char const* expr, char const* file, int line, char const* msg )
-{
-  std::cerr << "CGAL error: " << what << " violation!" << std::endl
-       << "Expr: " << expr << std::endl
-       << "File: " << file << std::endl
-       << "Line: " << line << std::endl;
-  if ( msg != 0)
-      std::cerr << "Explanation:" << msg << std::endl;
-}
-
-namespace demo
-{
-
-const QString my_title_string("Straight_skeleton_2 Demo");
-
-int current_state;
-
-SSkelPtr sskel;
-bool     sskel_valid ;
-Regions  input ;
-Regions  output ;
-Doubles  offsets ;
-
-class MyWindow : public QMainWindow
-{
-  Q_OBJECT
-public:
-  MyWindow(int w, int h)
-  {
-    widget = new CGAL::Qt_widget(this);
-    setCentralWidget(widget);
-
-    //create a timer for checking if somthing changed
-    QTimer *timer = new QTimer( this );
-    connect( timer, SIGNAL(timeout()),
-             this, SLOT(timerDone()) );
-    timer->start( 200, FALSE );
-
-    // file menu
-    QPopupMenu * file = new QPopupMenu( this );
-    menuBar()->insertItem( "&File", file );
-    file->insertItem("&New", this, SLOT(new_instance()), CTRL+Key_N);
-    file->insertItem("New &Window", this, SLOT(new_window()), CTRL+Key_W);
-    file->insertSeparator();
-    file->insertItem("&Load Polygon", this, SLOT(load_polygon()), CTRL+Key_L);
-    file->insertItem("&Save Polygon", this, SLOT(save_polygon()), CTRL+Key_S);
-    file->insertSeparator();
-    file->insertItem("Print", widget, SLOT(print_to_ps()), CTRL+Key_P);
-    file->insertSeparator();
-    file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_X );
-    file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
-
-    // drawing menu
-    QPopupMenu * gen = new QPopupMenu( this );
-    menuBar()->insertItem( "&Generate", gen );
-    gen->insertItem("Generate Outer Skeleton", this, SLOT(create_outer_skeleton()), CTRL+Key_O );
-    gen->insertItem("Generate Inner Skeleton", this, SLOT(create_inner_skeleton()), CTRL+Key_I );
-    gen->insertItem("Generate Offset", this, SLOT(create_offset()), CTRL+Key_F );
-    gen->insertItem("Set Offset Distance", this, SLOT(set_offset()), CTRL+Key_T );
-
-    // help menu
-    QPopupMenu * help = new QPopupMenu( this );
-    menuBar()->insertItem( "&Help", help );
-    help->insertItem("How To", this, SLOT(howto()), Key_F1);
-    help->insertSeparator();
-    help->insertItem("&About", this, SLOT(about()), CTRL+Key_A );
-    help->insertItem("About &Qt", this, SLOT(aboutQt()) );
-
-    //the standard toolbar
-    stoolbar = new CGAL::Qt_widget_standard_toolbar (widget, this, "ST");
-    //the new tools toolbar
-    newtoolbar = new Tools_toolbar(widget, this);
-
-    //the new scenes toolbar
-    vtoolbar = new Layers_toolbar(widget, this, input, sskel, output);
-
-    resize(w,h);
-    widget->set_window(-1, 1, -1, 1);
-    widget->setMouseTracking(true);
-
-    //connect the widget to the main function that receives the objects
-    connect(widget, SIGNAL(new_cgal_object(CGAL::Object)),
-            this, SLOT(get_new_object(CGAL::Object)));
-
-    //application flag stuff
-    old_state = 0;
-
- };
-
- void draw_segment ( Point const& s, Point const& t, CGAL::Color c )
- {
-   Qt_layer_show_progress& progress = vtoolbar->get_progress_layer();
-   if ( progress.is_active() )
-   {
-     progress.add_figure( Qt_layer_show_progress::FigurePtr( new Qt_layer_show_progress::Bisector( Segment(s,t), c ) ) ) ;
-     widget->redraw();
-   }
- }
-
- void draw_point ( Point const& v, CGAL::Color c )
- {
-   Qt_layer_show_progress& progress = vtoolbar->get_progress_layer();
-   if ( progress.is_active() )
-   {
-     progress.add_figure( Qt_layer_show_progress::FigurePtr( new Qt_layer_show_progress::Vertex(v, c) ) ) ;
-     widget->redraw();
-   }
- }
-
-private:
-  void something_changed(){current_state++;};
-
-public slots:
-  void new_instance()
-  {
-    widget->lock();
-    widget->clear();
-    sskel = SSkelPtr() ;
-    input.clear();
-    offsets.clear();
-    output.clear();
-    // set the Visible Area to the Interval
-    widget->set_window(-1.1, 1.1, -1.1, 1.1);
-    widget->unlock();
-  }
-
-
-private slots:
-
-  void get_new_object(CGAL::Object obj)
-  {
-    CGAL_Polygon lCgalPoly ;
-    if (CGAL::assign(lCgalPoly, obj))
-    {
-      CGAL::Bbox_2 lBbox = lCgalPoly.bbox();
-      double w = lBbox.xmax() - lBbox.xmin();
-      double h = lBbox.ymax() - lBbox.ymin();
-      double s = std::sqrt(w*w+h*h);
-      double m = s * 0.01 ;
-      offsets.clear();
-      for ( int c = 1 ; c < 30 ; ++ c )
-        offsets.insert(c*m);
-
-      RegionPtr lRegion;
-
-      if ( input.size() == 0 )
-      {
-        lRegion = RegionPtr( new Region() ) ;
-        input.push_back(lRegion);
-      }
-      else
-        lRegion = input.front();
-
-      CGAL::Orientation lExpected = ( lRegion->size() == 0 ? CGAL::COUNTERCLOCKWISE : CGAL::CLOCKWISE ) ;
-      if ( lCgalPoly.is_simple() && lCgalPoly.orientation() != lExpected )
-        lCgalPoly.reverse_orientation();
-
-      lRegion->push_back( PolygonPtr( new Polygon(lCgalPoly.vertices_begin(),lCgalPoly.vertices_end()) ) ) ;
-
-      input.push_back(lRegion);
-    }
-    widget->redraw();
-  };
-
-
-  void create_inner_skeleton()
-  {
-    if ( input.size() > 0 )
-    {
-      vtoolbar->get_progress_layer().clear();
-
-      Region const& lRegion = *input.front();
-
-      SSkelBuilder builder ;
-      for( Region::const_iterator bit = lRegion.begin(), ebit = lRegion.end() ; bit != ebit ; ++ bit )
-      {
-        builder.enter_contour((*bit)->begin(),(*bit)->end());
-      }
-      sskel = builder.construct_skeleton() ;
-      sskel_valid = bool(sskel) ;
-      if ( !sskel_valid )
-        QMessageBox::critical( this, my_title_string,"Straight Skeleton construction failed." );
-      widget->redraw();
-      something_changed();
-    }
-  }
-
-  void create_outer_skeleton()
-  {
-    if ( input.size() > 0 )
-    {
-      Region const& lRegion = *input.front();
-      if ( lRegion.size() > 0 )
-      {
-        Polygon const& lOuter = *lRegion.front() ;
-
-        Doubles::iterator last = offsets.end() ;
-        FT lMaxOffset = offsets.size() > 0 ? *--last : 10.0 ;
-
-        boost::optional<FT> lOptMargin = CGAL::compute_outer_frame_margin(lOuter.rbegin(),lOuter.rend(),lMaxOffset);
-        if ( lOptMargin )
-        {
-          double lMargin = CGAL::to_double(*lOptMargin);
-          
-          CGAL::Bbox_2 lBbox = CGAL::bbox_2(lOuter.begin(),lOuter.end());
-
-          double flx = lBbox.xmin() - lMargin ;
-          double fhx = lBbox.xmax() + lMargin ;
-          double fly = lBbox.ymin() - lMargin ;
-          double fhy = lBbox.ymax() + lMargin ;
-
-          Point lFrame[4]= { Point(flx,fly)
-                           , Point(fhx,fly)
-                           , Point(fhx,fhy)
-                           , Point(flx,fhy)
-                           } ;
-
-          vtoolbar->get_progress_layer().clear();
-          SSkelBuilder builder ;
-          builder.enter_contour(lFrame,lFrame+4);
-          builder.enter_contour(lOuter.rbegin(),lOuter.rend());
-          sskel = builder.construct_skeleton() ;
-          sskel_valid = bool(sskel) ;
-          if ( !sskel_valid )
-            QMessageBox::critical( this, my_title_string,"Straight Skeleton construction failed." );
-
-          widget->redraw();
-          something_changed();
-        }
-        else
-          QMessageBox::critical( this, my_title_string,"This polygon has a very sharp vertex. Unable to create outer straight skeleton." );
-
-      }
-    }
-  }
-  void create_offset()
-  {
-    if ( sskel_valid )
-    {
-      output.clear();
-
-      if ( offsets.size() == 0 )
-        offsets.insert(1);
-
-      for ( Doubles::const_iterator i = offsets.begin() ; i != offsets.end() ; ++ i )
-      {
-        double offset = *i ;
-        RegionPtr lRegion( new Region ) ;
-        OffsetBuilder lOffsetBuilder(*sskel);
-        lOffsetBuilder.construct_offset_contours(offset, std::back_inserter(*lRegion) );
-        if ( lRegion->size() > 0 )
-          output.push_back(lRegion);
-      }
-      widget->redraw();
-      something_changed();
-    }
-    else
-      QMessageBox::critical( this, my_title_string,"You must generate the skeleton first (outer or inner)." );
-  }
-
-  void set_offset()
-  {
-    double lOld = offsets.size() > 0 ? *offsets.begin() : 0.0 ;
-
-    bool ok = FALSE;
-    QString text = QInputDialog::getText( "Straight Skeleton and Offseting demo"
-                                        , "Enter offset distance"
-                                        , QLineEdit::Normal
-                                        , QString::number(lOld)
-                                        , &ok
-                                        , this
-                                        );
-    if ( ok && !text.isEmpty() )
-    {
-      double tmp = text.toDouble(&ok);
-      if ( ok )
-      {
-        offsets.clear() ;
-        offsets.insert(tmp) ;
-      }
-    }
-  }
-
-  void about()
-  {
-    QMessageBox::about( this, my_title_string,
-                        "Straight Skeleton and Polygon Offsetting demo\n"
-                        "Copyright CGAL at 2006");
-  };
-
-  void aboutQt()
-  {
-    QMessageBox::aboutQt( this, my_title_string );
-  }
-
-  void howto()
-  {
-    QString home;
-    home = "help/index.html";
-    CGAL::Qt_help_window *help = new
-                                 CGAL::Qt_help_window(home, ".", 0, "help viewer");
-    help->resize(400, 400);
-    help->setCaption("Demo HowTo");
-    help->show();
-  }
-
-  void new_window()
-  {
-    MyWindow *ed = new MyWindow(500, 500);
-    ed->setCaption("View");
-    ed->stoolbar->clear_history();
-    ed->widget->set_window(-1.1, 1.1, -1.1, 1.1);
-    ed->show();
-    something_changed();
-  }
-
-  void timerDone()
-  {
-    if(old_state!=current_state)
-    {
-      widget->redraw();
-      old_state = current_state;
-    }
-  }
-
-
-  void save_polygon()
-  {
-    if ( input.size() > 0 )
-    {
-      Region const& lRegion = *input.front();
-
-      if ( lRegion.size() > 0 )
-      {
-        QString fileName = QFileDialog::getSaveFileName("sample.poly", "Region files (*.poly)", this );
-
-        if ( !fileName.isNull() )
-        {
-          std::ofstream out(fileName.ascii());
-
-          CGAL::set_ascii_mode(out);
-
-          out << lRegion.size() << std::endl ;
-
-          for ( Region::const_iterator bit = lRegion.begin(), ebit = lRegion.end() ; bit != ebit ; ++ bit )
-          {
-            Polygon const& lContour = **bit ;
-            out << lContour.size();
-            for ( Polygon::const_iterator vit = lContour.begin(), evit = lContour.end() ; vit != evit ; ++ vit )
-              out << vit->x() << ' ' << vit->y() ;
-          }
-        }
-      }
-    }
-  }
-
-  void load_polygon()
-  {
-    QString s( QFileDialog::getOpenFileName(QString::null, "Polygonal PolygonalRegion Files (*.poly)", this ) );
-    if ( s.isEmpty() )
-      return;
-
-    bool auto_create_offsets = true ;
-    offsets.clear() ;
-
-    QString soft = s + QString(".oft");
-    std::ifstream offsets_file(soft.ascii());
-    if ( offsets_file )
-    {
-      CGAL::set_ascii_mode(offsets_file);
-
-      while ( offsets_file )
-      {
-        double v ;
-        offsets_file >> v;
-        offsets.insert(v);
-      }
-      auto_create_offsets = false ;
-    }
-
-    std::ifstream in(s.ascii());
-    if ( in )
-    {
-      CGAL::set_ascii_mode(in);
-
-      input.clear();
-
-      RegionPtr lRegion( new Region() ) ;
-
-      int ccb_count ;
-      in >> ccb_count ;
-
-      for ( int i = 0 ; i < ccb_count ; ++ i )
-      {
-        PolygonPtr lPoly( new Polygon() );
-        int v_count ;
-        in >> v_count ;
-        for ( int j = 0 ; j < v_count ; ++ j )
-        {
-          double x,y ;
-          in >> x >> y ;
-          lPoly->push_back( Point(x,y) ) ;
-        }
-        if ( lPoly->size() >= 3 )
-        {
-          if ( i == 0 )
-          {
-            CGAL::Bbox_2 lBbox = CGAL::bbox_2(lPoly->begin(),lPoly->end());
-            double w = lBbox.xmax() - lBbox.xmin();
-            double h = lBbox.ymax() - lBbox.ymin();
-            double s = std::sqrt(w*w+h*h);
-            double m = s * 0.01 ;
-            widget->set_window(lBbox.xmin()-m, lBbox.xmax()+m, lBbox.ymin()-m, lBbox.ymax()+m);
-            if ( auto_create_offsets )
-            {
-              for ( int c = 1 ; c < 30 ; ++ c )
-                offsets.insert(c*m);
-            }
-          }
-
-          CGAL::Orientation expected = ( i == 0 ? CGAL::COUNTERCLOCKWISE : CGAL::CLOCKWISE ) ;
-
-          double area = CGAL::to_double(CGAL::polygon_area_2(lPoly->begin(),lPoly->end(),K()));
-
-          CGAL::Orientation orientation = area > 0 ? CGAL::COUNTERCLOCKWISE : area < 0 ? CGAL::CLOCKWISE : CGAL::COLLINEAR ;
-
-          if ( orientation == expected )
-               lRegion->push_back(lPoly);
-          else lRegion->push_back( PolygonPtr( new Polygon(lPoly->rbegin(),lPoly->rend()) ) ) ;
-        }
-      }
-
-      input.push_back(lRegion);
-    }
-
-    sskel = SSkelPtr() ;
-
-    vtoolbar->get_progress_layer().clear();
-
-    output.clear();
-    widget->redraw();
-    something_changed();
-  }
-
-private:
-  CGAL::Qt_widget        *widget;
-  CGAL::Qt_widget_standard_toolbar *stoolbar;
-  Tools_toolbar          *newtoolbar;
-  Layers_toolbar         *vtoolbar;
-  int                    old_state;
-};
-
-} // namespace demo
-
-#include "straight_skeleton_2.moc"
-
-demo::MyWindow* mainwin = 0 ;
-
-namespace demo
-{
-
-void draw_segment( Point const& s, Point const& t, CGAL::Color c )
-{
-  if ( mainwin )
-    mainwin->draw_segment(s,t,c);
-}
-
-void draw_point( Point const& v, CGAL::Color c )
-{
-  if ( mainwin )
-    mainwin->draw_point(v,c);
-}
-
-void wait_on_user()
-{
-}
-
-}
-
-int
-main(int argc, char **argv)
-{
-  QApplication app( argc, argv );
-
-  demo::current_state = -1;
-  CGAL::set_error_handler  (error_handler);
-  CGAL::set_warning_handler(error_handler);
-
-  mainwin = new demo::MyWindow(500,500);
-
-  app.setMainWidget(mainwin);
-  mainwin->setCaption(demo::my_title_string);
-  mainwin->setMouseTracking(TRUE);
-  QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm);
-  mainwin->setIcon(cgal_icon);
-  mainwin->show();
-
-  int r = app.exec();
-
-  delete mainwin ;
-
-  return r;
-}
-
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_layers.h b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_layers.h
deleted file mode 100644
index c1ca026..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_layers.h
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#include <CGAL/IO/Qt_widget_layer.h>
-
-template <class SSkel>
-class Qt_layer_show_skeleton : public CGAL::Qt_widget_layer
-{
-
-  typedef typename SSkel::Halfedge_const_handle Halfedge_const_handle ;
-  typedef typename SSkel::Vertex_const_handle   Vertex_const_handle ;
-  typedef typename SSkel::Face_const_iterator   Face_const_iterator ;
-
-  typedef boost::shared_ptr<SSkel> SSkelPtr ;
-
-public:
-
-
-  Qt_layer_show_skeleton(Layers_toolbar* aParent, char const* aName, SSkelPtr const& aSSkelPtr)
-    : CGAL::Qt_widget_layer(aParent,aName)
-    , mSSkelPtr(aSSkelPtr)
-	, null_halfedge()
-	, null_vertex()
-  {}
-
-  void draw()
-  {
-    typename SSkel::Traits::Construct_segment_2 construct_segment ;
-
-    if ( !mSSkelPtr )
-      return ;
-
-    widget->lock();
-
-    int watchdog_limit = mSSkelPtr->size_of_halfedges();
-
-    for ( Face_const_iterator fit = mSSkelPtr->faces_begin(), efit = mSSkelPtr->faces_end()
-          ; fit != efit
-          ; ++ fit
-        )
-    {
-      Halfedge_const_handle hstart = fit->halfedge();
-      Halfedge_const_handle he     = hstart ;
-
-      int watchdog = watchdog_limit ;
-
-      do
-      {
-        if ( he == null_halfedge )
-          break ;
-
-        if ( he->is_bisector() )
-        {
-          bool lVertexOK      = he->vertex() != null_vertex ;
-          bool lOppositeOK    = he->opposite() != null_halfedge ;
-          bool lOppVertexOK   = lOppositeOK && he->opposite()->vertex() != null_vertex ;
-          bool lVertexHeOK    = lVertexOK && he->vertex()->halfedge() != null_halfedge ;
-          bool lOppVertexHeOK = lOppVertexOK && he->opposite()->vertex()->halfedge() != null_halfedge ;
-
-          if ( lVertexOK && lOppVertexOK && lVertexHeOK && lOppVertexHeOK )
-          {
-            *widget << ( he->is_inner_bisector()? CGAL::BLUE : CGAL::GREEN ) ;
-            *widget << construct_segment(he->opposite()->vertex()->point(),he->vertex()->point()) ;
-          }
-        }
-        he = he->next();
-      }
-      while ( -- watchdog > 0 && he != hstart ) ;
-    }
-
-    widget->unlock();
-  }
-
-  virtual void activating  (){ widget->redraw() ; };
-  virtual void deactivating(){ widget->redraw() ; };
-
-private:
-
-  SSkelPtr const& mSSkelPtr;
-  const Halfedge_const_handle null_halfedge ;
-  const Vertex_const_handle   null_vertex ;
-
-}
-;//end class
-
-
-template <class RegionList>
-class Qt_layer_show_regions : public CGAL::Qt_widget_layer
-{
-  typedef typename RegionList::value_type RegionPtr ;
-
-  typedef typename RegionPtr::element_type Region ;
-
-  typedef typename Region::value_type BoundaryPtr ;
-
-  typedef typename BoundaryPtr::element_type Boundary ;
-
-  typedef typename RegionList::const_iterator const_region_iterator ;
-
-  typedef typename Region::const_iterator const_boundary_iterator ;
-
-  typedef typename Boundary::const_iterator const_vertex_iterator ;
-
-  demo::K::Construct_segment_2 construct_segment ;
-
-public:
-
-  Qt_layer_show_regions(Layers_toolbar* aParent, char const* aName, RegionList const& aRegions, CGAL::Color aColor )
-    : CGAL::Qt_widget_layer(aParent,aName)
-    , mRegions(aRegions)
-    , mColor(aColor)
-  {
-  }
-
-  void draw()
-  {
-    widget->lock();
-
-    *widget << mColor;
-
-    for ( const_region_iterator rit = mRegions.begin(), erit = mRegions.end(); rit != erit; ++ rit )
-    {
-      for ( const_boundary_iterator bit = (*rit)->begin(), ebit = (*rit)->end(); bit != ebit; ++ bit )
-      {
-        const_vertex_iterator first = (*bit)->begin();
-        const_vertex_iterator end   = (*bit)->end  ();
-        const_vertex_iterator last  = end - 1 ;
-        for ( const_vertex_iterator it = first ; it != end ; ++ it )
-        {
-          const_vertex_iterator nx = ( it != last ? it + 1 : first ) ;
-          *widget << construct_segment(*it,*nx) ;
-        }
-      }
-    }
-
-    widget->unlock();
-
-  }
-
-  virtual void activating  (){ widget->redraw() ; };
-  virtual void deactivating(){ widget->redraw() ; };
-
-private:
-
-  RegionList const& mRegions;
-  CGAL::Color mColor ;
-}
-;//end class
-
-
-class Qt_layer_show_progress : public CGAL::Qt_widget_layer
-{
-  typedef CGAL::Qt_widget_layer base ;
-
-public:
-
-  struct Figure
-  {
-    virtual ~Figure() {}
-
-    virtual void draw ( CGAL::Qt_widget& widget ) const = 0 ;
-  } ;
-
-  typedef boost::shared_ptr<Figure> FigurePtr ;
-  typedef std::vector<FigurePtr> FigureVector ;
-  typedef FigureVector::const_iterator figure_const_iterator ;
-
-  struct Bisector : Figure
-  {
-    Bisector ( demo::Segment const& s_, CGAL::Color c_ ) : s(s_), c(c_) {}
-
-    virtual void draw ( CGAL::Qt_widget& widget ) const
-    {
-      widget << c ;
-      widget << s ;
-    }
-
-    demo::Segment s ;
-    CGAL::Color   c ;
-  } ;
-
-  struct Vertex : Figure
-  {
-    Vertex ( demo::Point const& v_, CGAL::Color c_ ) : v(v_), c(c_) {}
-
-    virtual void draw ( CGAL::Qt_widget& widget ) const
-    {
-      widget << c ;
-      widget << CGAL::CIRCLE ;
-      widget << v ;
-    }
-
-    demo::Point v ;
-    CGAL::Color c ;
-
-  } ;
-
-public:
-
-
-  Qt_layer_show_progress(Layers_toolbar* aParent, char const* aName )  : CGAL::Qt_widget_layer(aParent,aName) {}
-
-  void clear() { mFigures.clear() ; }
-
-  void add_figure ( FigurePtr const& aFigure ) { mFigures.push_back(aFigure) ; }
-
-  void draw()
-  {
-    widget->lock();
-
-    for ( figure_const_iterator it = mFigures.begin(), eit = mFigures.end() ; it != eit ; ++ it )
-      (*it)->draw(*widget);
-
-    widget->unlock();
-  }
-
-  virtual void activating  (){ widget->redraw() ; base::activating(); };
-  virtual void deactivating(){ widget->redraw() ; base::deactivating(); };
-
-private:
-
-  FigureVector mFigures ;
-
-}
-;//end class
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp
deleted file mode 100644
index fb20fc7..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#include <CGAL/basic.h>
-
-
-#include "cgal_types.h"
-#include "ss_types.h"
-#include "straight_skeleton_2_toolbar.h"
-
-// icons
-
-#include <CGAL/IO/pixmaps/arrow.xpm>
-#include <CGAL/IO/pixmaps/polygon.xpm>
-
-#include <qiconset.h>
-
-
-Tools_toolbar::Tools_toolbar(CGAL::Qt_widget *w, QMainWindow *mw) :
-  QToolBar(mw, "NT")
-{
-    //when it is created, the toolbar has 0 buttons
-    nr_of_buttons = 0;
-    //set the widget
-    widget = w;
-    widget->attach(&getpolybut);
-    getpolybut.deactivate();
-
-    QIconSet set0(QPixmap( (const char**)arrow_small_xpm ),
-                  QPixmap( (const char**)arrow_xpm ));
-    QIconSet set1(QPixmap( (const char**)polygon_small_xpm ),
-                  QPixmap( (const char**)polygon_xpm ));
-
-  but[0] = new QToolButton(this, "deactivate layer");
-  but[0]->setIconSet(set0);
-  but[0]->setTextLabel("Deactivate Layer");
-
-  but[1] = new QToolButton(this, "polygon");
-  but[1]->setIconSet(set1);
-  but[1]->setTextLabel("Input Polygon");
-
-  button_group = new QButtonGroup(0, "exclusive_group");
-  button_group->insert(but[0]);
-  button_group->insert(but[1]);
-  button_group->setExclusive(true);
-
-  but[0]->setToggleButton(true);
-  but[1]->setToggleButton(true);
-
-  connect(but[1], SIGNAL(stateChanged(int)),
-        &getpolybut, SLOT(stateChanged(int)));
-  nr_of_buttons = 2;
-  }
-
-#include "straight_skeleton_2_toolbar.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h
deleted file mode 100644
index be17d63..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#ifndef CGAL_STRAIGHT_SKELETON_2_TOOLBAR_H
-#define CGAL_STRAIGHT_SKELETON_2_TOOLBAR_H
-
-
-#include "cgal_types.h"
-// TODO: check if some of those includes shouldn't be in the .C file
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_get_polygon.h>
-
-
-#include <qobject.h>
-#include <qmainwindow.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qbuttongroup.h>
-
-class Tools_toolbar : public QToolBar
-{
-  Q_OBJECT
-public:
-  Tools_toolbar(CGAL::Qt_widget *w, QMainWindow *mw);
-
-private:
-  QToolButton     *but[10];
-  CGAL::Qt_widget *widget;
-  QButtonGroup    *button_group;
-  int             nr_of_buttons;
-
-  CGAL::Qt_widget_get_polygon<demo::CGAL_Polygon> getpolybut;
-};//end class
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp
deleted file mode 100644
index 20c3c07..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#include <CGAL/basic.h>
-
-
-#include "cgal_types.h"
-#include "ss_types.h"
-#include "straight_skeleton_2_toolbar_layers.h"
-#include "straight_skeleton_2_layers.h"
-
-// icons
-#include <CGAL/IO/pixmaps/voronoi.xpm>
-#include <CGAL/IO/pixmaps/show_polygon.xpm>
-#include <CGAL/IO/pixmaps/polygon.xpm>
-
-#include <qiconset.h>
-
-Layers_toolbar::Layers_toolbar(CGAL::Qt_widget*        w
-                              ,QMainWindow*            mw
-                              ,demo::Regions  const&   in
-                              ,demo::SSkelPtr const&   sskel
-                              ,demo::Regions  const&   out
-                              ) : QToolBar(mw, "LT"),
-     nr_of_buttons(0)
-  {
-    showI     = new Qt_layer_show_regions <demo::Regions> (this,"Input",in,CGAL::RED);
-    showSSkel = new Qt_layer_show_skeleton<demo::SSkel>   (this,"Skeleton",sskel);
-    showO     = new Qt_layer_show_regions <demo::Regions> (this,"Offset",out,CGAL::BLACK);
-    progress  = new Qt_layer_show_progress                (this,"Progress");
-
-    //set the widget
-    widget = w;
-    window = mw;
-
-    widget->attach(showI);
-    widget->attach(progress);
-    widget->attach(showSSkel);
-    widget->attach(showO);
-
-    QIconSet set0(QPixmap( (const char**)show_polygon_small_xpm ),
-                  QPixmap( (const char**)show_polygon_xpm ));
-    QIconSet set1(QPixmap( (const char**)voronoi_small_xpm ),
-                  QPixmap( (const char**)voronoi_xpm ));
-    QIconSet set2(QPixmap( (const char**)polygon_small_xpm ),
-                  QPixmap( (const char**)polygon_xpm ));
-    QIconSet set3(QPixmap( (const char**)polygon_small_xpm ),
-                  QPixmap( (const char**)polygon_xpm ));
-
-    but[0] = new QToolButton(this, "polygon");
-    but[0]->setIconSet(set0);
-    but[0]->setTextLabel("Show Simple Polygon");
-
-    but[1] = new QToolButton(this, "straight_skeleton");
-    but[1]->setIconSet(set1);
-    but[1]->setTextLabel("Show Straight Skeleton");
-
-    but[2] = new QToolButton(this, "offset");
-    but[2]->setIconSet(set2);
-    but[2]->setTextLabel("Show Polygon Offset");
-
-    but[3] = new QToolButton(this, "progress");
-    but[3]->setIconSet(set3);
-    but[3]->setTextLabel("Show Progress");
-
-    nr_of_buttons = 4;
-    button_group = new QButtonGroup(0, "nonexclusive");
-
-    for(int i =0; i<nr_of_buttons; i++){
-      but[i]->setToggleButton(true);
-      but[i]->toggle();
-      button_group->insert(but[i]);
-    }
-    //but[1]->toggle();
-    connect(but[0], SIGNAL(stateChanged(int)),
-        showI, SLOT(stateChanged(int)));
-    connect(but[1], SIGNAL(stateChanged(int)),
-        showSSkel, SLOT(stateChanged(int)));
-    connect(but[2], SIGNAL(stateChanged(int)),
-        showO, SLOT(stateChanged(int)));
-    connect(but[3], SIGNAL(stateChanged(int)),
-        progress, SLOT(stateChanged(int)));
-  }
-
-  Layers_toolbar::~Layers_toolbar()
-  {
-    delete showI;
-    delete showSSkel;
-    delete showO;
-    delete progress;
-    delete button_group;
-  }
-
-
-#include "straight_skeleton_2_toolbar_layers.moc"
-
diff --git a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h b/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h
deleted file mode 100644
index 03203e2..0000000
--- a/3rdparty/CGAL-4.6/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-
-#ifndef CGAL_STRAIGHTSKELETON_2_TOOLBAR_LAYERS_H
-#define CGAL_STRAIGHTSKELETON_2_TOOLBAR_LAYERS_H
-
-#include <CGAL/IO/Qt_widget.h>
-
-#include <qobject.h>
-#include <qmainwindow.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qstatusbar.h>
-#include <qbuttongroup.h>
-
-
-template <class T> class Qt_layer_show_regions;
-template <class T> class Qt_layer_show_skeleton;
-class Qt_layer_show_progress ;
-
-class Layers_toolbar : public QToolBar
-{
-  Q_OBJECT
-public:
-  Layers_toolbar( CGAL::Qt_widget*        w
-                , QMainWindow*            mw
-                , demo::Regions  const&   in
-                , demo::SSkelPtr const&   sskel
-                , demo::Regions  const&   out
-                );
-  ~Layers_toolbar();
-
-  Qt_layer_show_progress& get_progress_layer() { return *progress ; }
-
-private:
-  QToolButton         *but[4];
-  CGAL::Qt_widget     *widget;
-  QMainWindow         *window;
-  QButtonGroup        *button_group;
-  int                 nr_of_buttons;
-
-  Qt_layer_show_regions <demo::Regions> *showI;
-  Qt_layer_show_skeleton<demo::SSkel>   *showSSkel;
-  Qt_layer_show_regions <demo::Regions> *showO;
-  Qt_layer_show_progress                *progress ;
-
-};//end class
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Stream_lines_2/CMakeLists.txt
deleted file mode 100644
index 12b9d93..0000000
--- a/3rdparty/CGAL-4.6/demo/Stream_lines_2/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Stream_lines_2_demo)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-find_package(Qt4)
-include_directories (BEFORE ../../include)
-
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Stream_lines_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Stream_lines_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc )
-
-# The executable itself.
-add_executable  ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Stream_lines_2 )
-
-# Link with Qt libraries
-target_link_libraries( Stream_lines_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.cpp b/3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.cpp
deleted file mode 100644
index 101165c..0000000
--- a/3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.cpp
+++ /dev/null
@@ -1,250 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Stream_lines_2.h>
-#include <CGAL/Runge_kutta_integrator_2.h>
-#include <CGAL/Regular_grid_2.h>
-
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include <CGAL/Qt/StreamLinesGraphicsItem.h>
-#include <CGAL/Qt/RegularGridVectorFieldGraphicsItem.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
- 
-// the two base classes
-#include "ui_Stream_lines_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-
-typedef CGAL::Regular_grid_2<K> Regular_grid;
-typedef CGAL::Runge_kutta_integrator_2<Regular_grid> Runge_kutta_integrator;
-typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator> Stream_lines;
-typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Stream_line_iterator_2 Stream_line_iterator;
-typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Point_iterator_2 Point_iterator;
-typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Point_2 Point_2;
-typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Vector_2 Vector;
-
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Stream_lines_2
-{
-  Q_OBJECT
-  
-private:  
-  Stream_lines * stream_lines;
-  Runge_kutta_integrator * runge_kutta_integrator;
-  Regular_grid * regular_grid;
-  double density;
-  double ratio;
-  double integrating;
-  int sampling;  
-  QGraphicsScene scene;  
-
-  CGAL::Qt::StreamLinesGraphicsItem<Stream_lines,K> * sli;
-  CGAL::Qt::RegularGridVectorFieldGraphicsItem<Regular_grid,K> * rgi;
-
-public:
-  MainWindow();
-
-public slots:
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionGenerate_triggered();
-
-  void on_actionRecenter_triggered();
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow(), density(12.0), ratio(1.6), integrating(1.0), sampling(1)
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Stream_lines_2.html");
-  this->addAboutCGAL();
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionGenerate_triggered()
-{
-  stream_lines = new Stream_lines(*regular_grid, *runge_kutta_integrator, density, ratio, sampling);
-
-  sli = new CGAL::Qt::StreamLinesGraphicsItem<Stream_lines, K>(stream_lines);
-  rgi = new CGAL::Qt::RegularGridVectorFieldGraphicsItem<Regular_grid, K>(regular_grid);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   sli, SLOT(modelChanged()));
-
-
-  rgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  rgi->setEdgesPen(QPen(Qt::gray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  sli->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(sli);
-  scene.addItem(rgi);
-
-  on_actionRecenter_triggered();
-  emit(changed());
-}
-
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open grid file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-
-  runge_kutta_integrator = new Runge_kutta_integrator(integrating);
-  double iXSize, iYSize;
-  iXSize = iYSize = 512;
-  unsigned int x_samples, y_samples;
-  ifs >> x_samples;
-  ifs >> y_samples;
-  regular_grid = new Regular_grid(x_samples, y_samples, iXSize, iYSize);
-  /*fill the grid with the appropreate values*/
-  for (unsigned int i=0;i<x_samples;i++)
-    for (unsigned int j=0;j<y_samples;j++)
-      {
-        double xval, yval;
-        ifs >> xval;
-        ifs >> yval;
-        regular_grid->set_field(i, j, Vector(xval, yval));
-      }
-  ifs.close();
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  //  actionRecenter->trigger();
-  on_actionGenerate_triggered();
-  emit(changed());
-    
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  /*
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-  
-  }
-  */
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(rgi->boundingRect());
-  this->graphicsView->fitInView(rgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Stream_lines_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Stream_lines_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-  Q_INIT_RESOURCE(Stream_lines_2);
-
-  MainWindow mainWindow;
-  mainWindow.show();
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Surface_mesher/CMakeLists.txt
deleted file mode 100644
index 86e1c27..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/CMakeLists.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-set ( prj Surface_mesher )
-
-project ( ${prj} )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-set(PACKAGE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-
-# Add several CGAL packages to the include and link paths,
-# if they lie in ${PACKAGE_ROOT}/.
-foreach(INC_DIR ${PACKAGE_ROOT}/include ${PACKAGE_ROOT}/../Mesh_2/include ${PACKAGE_ROOT}/../Data_structure_for_queries_3/include ${PACKAGE_ROOT}/../Marching_cube/include ${PACKAGE_ROOT}/../CGAL_ImageIO/include ${PACKAGE_ROOT}/../GraphicsView/include)
-  if (EXISTS ${INC_DIR})
-    include_directories (BEFORE ${INC_DIR})
-  endif()
-endforeach()
-foreach(LIB_DIR ${PACKAGE_ROOT}/../CGAL_ImageIO/src/CGAL_ImageIO ${PACKAGE_ROOT}/../GraphicsView/src/CGALQt4)
-  if (EXISTS ${LIB_DIR})
-    link_directories (${LIB_DIR})
-  endif()
-endforeach()
-
-include_directories( ./ )
-
-# QGLViwer needs Qt4 configured with QtOpenGL and QtXml support
-
-set( QT_USE_QTOPENGL TRUE )
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-
-find_package(CGAL COMPONENTS ImageIO Qt4)
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND)
-  include( ${CGAL_USE_FILE} )
-
-  find_package(Qt4 )
-  find_package(QGLViewer )
-  find_package(OpenGL    )
-  
-  if ( QGLVIEWER_FOUND )
-
-    include( ${QT_USE_FILE})
-        
-    include_directories( ${QGLVIEWER_INCLUDE_DIR} )
-    add_definitions(${QGLVIEWER_DEFINITIONS})
-
-    set( sources Raw_image_dialog.cpp colorlisteditor.cpp values_list.cpp mainwindow.cpp Surface_mesher.cpp viewer.cpp volume.cpp )
-
-    if(EXISTS ${PACKAGE_ROOT}/../Marching_cube)
-      option(SURFACE_MESH_DEMO_USE_MARCHING_CUBE "Embed a marching cube implementation in the Surface Mesh demo." ON)
-      mark_as_advanced(SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
-    endif()
-    
-    if(EXISTS ${PACKAGE_ROOT}/include/CGAL/Polyhedral_surface_3.h)
-      option(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE "Compile the support for polyhedral surfaces." OFF)
-      mark_as_advanced(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
-    endif()
-
-    option(SURFACE_MESH_DEMO_VERBOSE "Set this option if you want the Surface Mesh demo to display messages on standard output." OFF)
-    mark_as_advanced(SURFACE_MESH_DEMO_VERBOSE)
-
-    if(SURFACE_MESH_DEMO_VERBOSE)
-      add_definitions(-DCGAL_SURFACE_MESHER_VERBOSE)
-    endif()
-
-    if(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
-      set(sources ${sources} polyhedral_surface.cpp)
-    else(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
-      add_definitions(-DCGAL_DO_NOT_USE_POLYHEDRAL_SURFACE)
-    endif(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
-
-    if(SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
-      set(sources ${sources} ${PACKAGE_ROOT}/../Marching_cube/src/mc/ply.c)
-      add_definitions(-DCGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
-    endif()
-    
-    qt4_automoc( ${sources} )
-
-    qt4_generate_moc( "surface.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_surface.cpp" )
-
-    set( sources ${sources} moc_surface.cpp)
-    
-    qt4_wrap_ui( uis ui/values_list.ui ui/mainwindow.ui ui/optionsdialog.ui ui/raw_image.ui )
-    
-    qt4_add_resources( qrc_sources values_list.qrc surface_mesher.qrc  ) 
-
-    add_executable  ( ${prj}  ${sources} ${uis} ${qrc_sources} )
-    
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${prj} )
-
-    # Link the executable to CGAL and third-party libraries
-    target_link_libraries( ${prj} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-    
-    target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-    
-  else( QGLVIEWER_FOUND)
-    message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.")
-  endif( QGLVIEWER_FOUND)
-else(CGAL_FOUND AND CGAL_Qt4_FOUND)
-  if(RUNNING_CGAL_AUTO_TEST)
-    # Just to avoid a warning from CMake if that variable is set on the command line...
-  endif()
-
-  message(STATUS "NOTICE: This demo needs Qt4, and will not be compiled.")
-endif(CGAL_FOUND AND CGAL_Qt4_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.cpp
deleted file mode 100644
index 9f39ee0..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "Raw_image_dialog.h"
-
-Raw_image_dialog::Raw_image_dialog(QWidget* parent)
-  : QDialog(parent) 
-{
-  setupUi(this);
-}
-
-void Raw_image_dialog::update_image_size() {
-  label_image_size->setNum((int)image_word_size() *
-			   dim_x->value() *
-			   dim_y->value() *
-			   dim_z->value());
-}
-
-unsigned int Raw_image_dialog::image_word_size() const {
-  if(short_bt->isChecked())
-    return 2;
-  if(int_bt->isChecked())
-    return 4;
-  else if(float_bt->isChecked())
-    return 4;
-  else if(double_bt->isChecked())
-    return 8;
-  else
-    return 1;
-}
-
-#include "Raw_image_dialog.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.h
deleted file mode 100644
index 0cb0be5..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/Raw_image_dialog.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef RAW_IMAGE_DIALOG_H
-#define RAW_IMAGE_DIALOG_H
-
-#include "ui_raw_image.h"
-
-class Raw_image_dialog : public QDialog, public Ui::Raw_image_dialog 
-{
-  Q_OBJECT
-
-public:
-  Raw_image_dialog(QWidget* parent = 0);
-
-  unsigned int image_word_size() const;
-
-private slots:
-  void update_image_size();
-};
-
-#endif // RAW_IMAGE_DIALOG
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/Surface_mesher.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/Surface_mesher.cpp
deleted file mode 100644
index eae66ca..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/Surface_mesher.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "mainwindow.h"
-#include <QApplication>
-#include <iostream>
-
-int main(int argc, char** argv)
-{
-  QApplication application(argc,argv);
-
-  application.setOrganizationDomain("geometryfactory.com");
-  application.setOrganizationName("GeometryFactory");
-  application.setApplicationName("Surface mesher Qt4 demo");
-
-  MainWindow w;
-
-  if(argc>1)
-    w.surface_open(argv[1]);
-
-  w.show();
-
-  return application.exec();
-  std::cerr << "Exit\n";
-}
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/binary_image.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/binary_image.h
deleted file mode 100644
index 16b0e6e..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/binary_image.h
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008  GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Author(s)     : Laurent RINEAU, Pierre ALLIEZ
-
-#ifndef BINARY_IMAGE_3
-#define BINARY_IMAGE_3
-
-#include <CGAL/basic.h>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <CGAL/algorithm.h>
-
-#include <boost/format.hpp>
-#include <CGAL/ImageIO.h>
-
-#include <limits>
-
-#include <CGAL/Image_3.h>
-
-template <typename FT_, typename Point>
-class CBinary_image_3 : public CGAL::Image_3
-{
-  bool interpolate_;
-  bool labellized_;
-
-public:
-  double min_value;
-  double max_value;
-
-  typedef FT_ FT;
-
-public:
-  CBinary_image_3() : Image_3(), interpolate_(true)
-  {
-  }
-
-  CBinary_image_3(const CBinary_image_3& bi)
-    : Image_3(bi), interpolate_(bi.interpolate_),labellized_(bi.labellized_)
-  {
-    std::cerr << "CBinary_image_3::copy_constructor\n";
-    min_value = bi.min_value;
-    max_value = bi.max_value;
-  }
-
-  ~CBinary_image_3()
-  {
-  }
-
-  void finish_open() {
-    CGAL_IMAGE_IO_CASE(image_ptr.get(),
-                       Word *min; Word *max;
-                       (boost::tie(min, max)) = 
-                         (CGAL::min_max_element((Word*)(data()),
-                                                (Word*)(data()) + 
-                                                xdim() * ydim() * zdim()));
-                        min_value = *min;
-                        max_value = *max;)
-  }
-
-  float xmax() const
-  {
-    return (float)(((image_ptr->xdim) - 1.0)*(image_ptr->vx));
-  }
-
-  float ymax() const
-  {
-    return (float)(((image_ptr->ydim) - 1.0)*(image_ptr->vy));
-  }
-
-  float zmax() const
-  {
-    return (float)(((image_ptr->zdim) - 1.0)*(image_ptr->vz));
-  }
-
-  Point center() 
-  {
-    FT cx = 0.5 * xmax();
-    FT cy = 0.5 * ymax();
-    FT cz = 0.5 * zmax();
-    return Point(cx,cy,cz);
-  }
-
-  FT radius()
-  {
-    return (std::max)((std::max)(xmax(),ymax()),zmax());
-  }
-
-  Point point(const std::size_t i,
-              const std::size_t j,
-              const std::size_t k) const
-  {
-    return Point(i * (image_ptr->vx),
-                 j * (image_ptr->vy),
-                 k * (image_ptr->vz));
-  }
-
-public:
-  bool inside(const float x,
-              const float y, 
-              const float z) const
-  {
-    return ( x >= 0.0f && 
-             y >= 0.0f && 
-             z >= 0.0f && 
-             x <= xmax() &&
-             y <= ymax() &&
-             z <= zmax() );
-  }
-
-  float rand_x() { return (float)rand() / (float)RAND_MAX * xmax(); }
-  float rand_y() { return (float)rand() / (float)RAND_MAX * ymax(); }
-  float rand_z() { return (float)rand() / (float)RAND_MAX * zmax(); }
-
-  void set_interpolation(const bool b)
-  {
-    interpolate_ = b;
-  }
-
-  bool interpolation() const {
-    return interpolate_;
-  }
-
-  void set_labellized(const bool b)
-  {
-    labellized_ = b;
-  }
-
-  bool labellized() const {
-    return labellized_;
-  }
-
-  FT operator()(Point p) const
-  {
-    const float x = static_cast<float>(CGAL::to_double(p.x()));
-    const float y = static_cast<float>(CGAL::to_double(p.y()));
-    const float z = static_cast<float>(CGAL::to_double(p.z()));
-      
-    if(interpolation()) {
-      if(labellized()) {
-	CGAL_IMAGE_IO_CASE(image_ptr.get(),
-			   return (this->labellized_trilinear_interpolation<Word, double>(x, y, z, min_value));)
-      }
-      else {
-	CGAL_IMAGE_IO_CASE(image_ptr.get(),
- 			   return (this->trilinear_interpolation<Word, double>(x, y, z, min_value));)
-      }
-    }
-    else {
-      const std::ptrdiff_t i = static_cast<std::ptrdiff_t>(x/image()->vx + 0.5f);
-      const std::ptrdiff_t j = static_cast<std::ptrdiff_t>(y/image()->vy + 0.5f);
-      const std::ptrdiff_t k = static_cast<std::ptrdiff_t>(z/image()->vz + 0.5f);
-      if( i < 0 ||
-	  j < 0 ||
-	  k < 0 )
-      {
-	return 0;
-      }
-      else
-      {    
-	const std::size_t ui = static_cast<std::size_t>(i);
-	const std::size_t uj = static_cast<std::size_t>(j);
-	const std::size_t uk = static_cast<std::size_t>(k);
-	if( ui >= image()->xdim ||
-	    uj >= image()->ydim ||
-	    uk >= image()->zdim )
-	{
-	  return 0;
-	}
-	else
-	{
-	  return this->value(ui, uj, uk);
-	}
-      }
-    }
-    return FT();
-  }
-}; // end CBinary_image_3
- 
-#endif // BINARY_IMAGE_3
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/colorlisteditor.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/colorlisteditor.cpp
deleted file mode 100644
index 94b7105..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/colorlisteditor.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2007-2007 Trolltech ASA. All rights reserved.
-**
-** This file is part of the example classes of the Qt Toolkit.
-**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file.  Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://trolltech.com/products/qt/licenses/licensing/opensource/
-**
-** If you are unsure which license is appropriate for your use, please
-** review the following information:
-** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
-** or contact the sales department at sales at trolltech.com.
-**
-** In addition, as a special exception, Trolltech gives you certain
-** additional rights. These rights are described in the Trolltech GPL
-** Exception version 1.0, which can be found at
-** http://www.trolltech.com/products/qt/gplexception/ and in the file
-** GPL_EXCEPTION.txt in this package.
-**
-** In addition, as a special exception, Trolltech, as the sole copyright
-** holder for Qt Designer, grants users of the Qt/Eclipse Integration
-** plug-in the right for the Qt/Eclipse Integration to link to
-** functionality provided by Qt Designer and its related libraries.
-**
-** Trolltech reserves all rights not expressly granted herein.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "colorlisteditor.h"
-
-ColorListEditor::ColorListEditor(QWidget *widget) : QComboBox(widget)
-{
-    populateList();
-}
-
-QColor ColorListEditor::color() const
-{
-    return qVariantValue<QColor>(itemData(currentIndex(), Qt::DecorationRole));
-}
-
-void ColorListEditor::setColor(QColor color)
-{
-    setCurrentIndex(findData(color, int(Qt::DecorationRole)));
-}
-
-void ColorListEditor::populateList()
-{
-    QStringList colorNames = QColor::colorNames();
-
-    for (int i = 0; i < colorNames.size(); ++i) {
-        QColor color(colorNames[i]);
-
-        insertItem(i, colorNames[i]);
-        setItemData(i, color, Qt::DecorationRole);
-    }
-}
-
-#include "colorlisteditor.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.cpp
deleted file mode 100644
index cbfd210..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-#include "mainwindow.h"
-
-#include <QFileDialog>
-#include <QUrl>
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <QtDebug>
-#include <QMenu>
-#include <QAction>
-#include <QVariant>
-#include <QStringList>
-#include <QtGlobal>
-#include <QToolBar>
-#include <QDoubleSpinBox>
-#include <QLabel>
-#include <QSettings>
-
-#include <QGLViewer/vec.h>
-
-#include <algorithm> // std::max
-#include <cmath> // std::sqrt
-#include <boost/format.hpp>
-
-#include "ui_mainwindow.h"
-#include "volume.h"
-#ifndef CGAL_DO_NOT_USE_POLYHEDRAL_SURFACE
-#  include "polyhedral_surface.h"
-#endif
-
-MainWindow::MainWindow(MainWindow* other_window /* = 0 */) : 
-  CGAL::Qt::DemosMainWindow(),
-  surface(0)
-{
-  setupUi(this);
-  setAcceptDrops(true);
-
-  if(other_window != 0)
-  {
-    viewer->setCamera(other_window->viewer->camera());
-    connect(other_window, SIGNAL(destroyed()),
-            this, SLOT(close()));
-  }
-
-  this->addAboutCGAL();
-  this->addRecentFiles(this->menu_File,
-		       this->action_Quit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(surface_open(QString)));
-
-  this->readState();
-
-  show_only("");
-}
-
-void MainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-  if (event->mimeData()->hasFormat("text/uri-list"))
-    event->acceptProposedAction();
-}
-
-void MainWindow::dropEvent(QDropEvent *event)
-{
-  QString filename = event->mimeData()->urls().at(0).toLocalFile();
-  surface_open(filename);
-  event->acceptProposedAction();
-}
-
-void MainWindow::surface_open(const QString& filename)
-{
-  if(surface != 0) {
-    delete surface;
-    surface = 0;
-  }
-#ifndef CGAL_DO_NOT_USE_POLYHEDRAL_SURFACE
-  surface = new Polyhedral_surface(this);
-  if(surface->open(filename)) {
-    this->addToRecentFiles(filename);
-    return;
-  }
-  delete surface;
-  surface = 0;
-#endif
-  surface = new Volume(this);
-  if(surface->open(filename)) {
-    this->addToRecentFiles(filename);
-  }
-}
-
-void MainWindow::show_only(QString tag)
-{
-#if 0
-  QTextStream err(stderr);
-#else
-  QString dummy;
-  QTextStream err(&dummy);
-#endif
-  err << "** Show only in \"" << tag << "\"\n";
-  Q_FOREACH(QObject* object, 
-            this->findChildren<QObject*>())
-  {
-    QStringList show_only_in = object->property("show_only_in").toStringList();
-    if(!show_only_in.isEmpty())
-    {
-      err << object->metaObject()->className()
-          << " \"" << object->objectName() << "\" only in: ";
-      foreach(QString s, show_only_in)
-        err << s << " ";
-      const bool visible = show_only_in.contains(tag);
-      err << (visible ? "(enabled)\n" : "(disabled)\n");
-      if(QMenu* menu = qobject_cast<QMenu*>(object)) {
-        menu->menuAction()->setVisible(visible);
-      }
-      else {
-	object->setProperty("visible", QVariant::fromValue<bool>(visible));
-      }
-    }
-  }
-}
-
-void MainWindow::on_action_Open_triggered()
-{
-  QSettings settings;
-  QString directory = settings.value("Open directory",
-				     QDir::current().dirName()).toString();
-  QString filename = QFileDialog::getOpenFileName(this, tr("Open File"),
-                                                  directory,
-                                                  tr("all Files (*.*)"));
-  if(!filename.isEmpty()) {
-    QFileInfo fileinfo(filename);
-    if(fileinfo.isFile() && fileinfo.isReadable()) {
-      settings.setValue("Open directory",
-			fileinfo.absoluteDir().absolutePath());
-      surface_open(filename);
-    }
-  }
-}
-
-void MainWindow::on_action_Quit_triggered()
-{
-  this->writeState();
-  qApp->exit();
-}
-
-void MainWindow::closeEvent(QCloseEvent *event)
-{
-  this->writeState();
-  event->accept();
-}
-
-void MainWindow::on_action_Clone_triggered()
-{
-  MainWindow* other = new MainWindow(this);
-  other->show();
-}
-
-#include "mainwindow.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.h
deleted file mode 100644
index b9b9537..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/mainwindow.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef _MAINWINDOW_H
-#define _MAINWINDOW_H
-
-#include <QMainWindow>
-#include "ui_mainwindow.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-class QDragEnterEvent;
-class QDropEvent;
-class Surface;
-class QGLViewer;
-class QDoubleSpinBox;
-class QCloseEvent;
-
-class MainWindow : public CGAL::Qt::DemosMainWindow, public Ui::MainWindow
-{
-  Q_OBJECT
-public:
-  MainWindow(MainWindow* other_window = 0);
-  void dragEnterEvent(QDragEnterEvent *);
-  void dropEvent(QDropEvent *event);
-
-public slots:
-  void show_only(QString);
-  void surface_open(const QString& filename);
-
-private slots:
-  void on_action_Open_triggered();
-  void on_action_Quit_triggered();
-  void on_action_Clone_triggered();
-  
-private:
-  void closeEvent(QCloseEvent *event);
-  Surface* surface;
-};
-
-
-#endif // _MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.cpp
deleted file mode 100644
index 618d330..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.cpp
+++ /dev/null
@@ -1,494 +0,0 @@
-#include "polyhedral_surface.h"
-#include "get_polyhedral_surface.h"
-
-#include <QMainWindow>
-#include <QString>
-#include <QStatusBar>
-#include <QApplication>
-#include <QAction>
-#include <QDialog>
-#include "ui_optionsdialog.h"
-#include <QDoubleSpinBox>
-#include <iostream>
-#include <fstream>
-#include <boost/format.hpp>
-#include "mainwindow.h"
-
-typedef CGAL_polyhedral_surface::Polyhedron Polyhedron;
-
-Polyhedral_surface::Polyhedral_surface(QObject* parent,
-                                       double sharp_edges_angle_lower_bound,
-                                       double sharp_edges_angle_upper_bound)
-  : Surface(parent), 
-    m_inverse_normals(false),
-    surface_ptr(0),
-    parent(parent),
-    display_octree(false),
-    display_edges_octree(false),
-    display_surface(true),
-    display_all_edges(true),
-    display_control_edges(false),
-    sharp_edges_angle_lower_bound(sharp_edges_angle_lower_bound),
-    sharp_edges_angle_upper_bound(sharp_edges_angle_upper_bound),
-    is_octree_initialized(false),
-    selected_edge(-1),
-    selected_facet(-1),
-    is_dirty(true),
-    list_id(0)
-{
-  connection_map["actionDisplay_octree"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(toggle_display_octree(bool)));
-
-  connection_map["actionDisplay_edges_octree"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(toggle_display_edges_octree(bool)));
-
-  connection_map["actionDisplay_surface"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(toggle_display_surface(bool)));
-
-  connection_map["actionDisplay_all_edges"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(toggle_display_all_edges(bool)));
-
-  connection_map["actionDisplay_control_edges"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(toggle_display_control_edges(bool)));
-
-  connection_map["actionInverse_normals"] = 
-    std::make_pair(SIGNAL(toggled(bool)),
-                   SLOT(set_inverse_normals(bool)));
-
-  connection_map["actionSubdivision"] = 
-    std::make_pair(SIGNAL(triggered()),
-                   SLOT(make_one_subdivision_step()));
-  connection_map["action_Options"] =
-    std::make_pair(SIGNAL(triggered()),
-                   SLOT(on_action_Options_triggered()));
-}
-
-Polyhedral_surface::~Polyhedral_surface()
-{
-  clear();
-  delete surface_ptr;
-}
-
-void Polyhedral_surface::on_action_Options_triggered()
-{
-  QDialog *options_dialog = new QDialog(qobject_cast<QWidget*>(parent));
-  Ui::OptionDialog ui;
-  ui.setupUi(options_dialog);
-
-  QDoubleSpinBox* sb_upper = options_dialog->findChild<QDoubleSpinBox*>("angle_upper_bound");
-  QDoubleSpinBox* sb_lower = options_dialog->findChild<QDoubleSpinBox*>("angle_lower_bound");
-
-  if(!sb_lower || !sb_upper) 
-    return;
-
-  sb_lower->setValue(sharp_edges_angle_lower_bound);
-  sb_upper->setValue(sharp_edges_angle_upper_bound);
-  if(options_dialog->exec() == QDialog::Accepted)
-  {
-    sharp_edges_angle_upper_bound = sb_upper->value();
-    sharp_edges_angle_lower_bound = sb_lower->value();
-    set_sharp_edges_angle_bounds(sharp_edges_angle_lower_bound,
-                                 sharp_edges_angle_upper_bound);
-  }
-}
-
-void Polyhedral_surface::clear() {
-  for(Connection_map::const_iterator
-        it = connection_map.begin(),
-        end = connection_map.end();
-      it != end;
-      ++it)
-  {
-    QAction* action = parent->findChild<QAction*>(it->first);
-    action->setVisible(false);
-  }
-}
-
-void Polyhedral_surface::connect_actions()
-{
-  for(Connection_map::const_iterator
-        it = connection_map.begin(),
-        end = connection_map.end();
-      it != end;
-      ++it)
-  {
-    QAction* action = parent->findChild<QAction*>(it->first);
-    action->setVisible(true);
-    if(action)
-      connect(action, it->second.first,
-              this, it->second.second);
-  }
-  MainWindow* mw = qobject_cast<MainWindow *>(parent);
-  if(mw) {
-//     mw->fix_menus_visibility();
-    mw->show_only("polyhedral");
-  }
-
-
-  connect(this, SIGNAL(changed()), this, SLOT(display_nb_elements_in_status_bar()));
-}
-
-void Polyhedral_surface::display_nb_elements_in_status_bar() const 
-{
-  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
-  if(surface_ptr && mw)
-  {
-    mw->statusBar()->showMessage(QString("%1 vertices. %2 edges. %3 facets.")
-                                 .arg(surface_ptr->size_of_vertices())
-                                 .arg(surface_ptr->size_of_halfedges()/2)
-                                 .arg(surface_ptr->size_of_facets()));
-  }
-}
-
-void Polyhedral_surface::set_dirty()
-{
-  is_dirty = true;
-  emit changed();
-}
-
-void Polyhedral_surface::busy() const 
-{
-  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
-  if(mw)
-  {
-    mw->statusBar()->showMessage(QString("Constructing octree..."));
-  }
-  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-}
-
-void Polyhedral_surface::not_busy() const 
-{
-  QApplication::restoreOverrideCursor();
-  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
-  if(mw)
-  {
-    mw->statusBar()->clearMessage();
-  }
-}
-
-void Polyhedral_surface::set_sharp_edges_angle_bounds(const double lower_bound,
-                                                      const double upper_bound)
-{
-  sharp_edges_angle_lower_bound = lower_bound;
-  sharp_edges_angle_upper_bound = upper_bound;
-  if(surface_ptr) {
-    surface_ptr->set_sharp_edges_angle_bounds(lower_bound, upper_bound);
-    surface_ptr->set_sharp_vertices_angle_bounds(lower_bound, upper_bound);
-    update_data_structures();
-    emit set_dirty();
-  }
-}
-
-void Polyhedral_surface::update_data_structures() 
-{
-  surface_ptr->compute_sharp_edges_incidence_graph();
-  if(display_octree || display_edges_octree) {
-    construct_octree();
-    is_octree_initialized = true;
-  }
-  else
-    is_octree_initialized = false;
-}
-
-void Polyhedral_surface::construct_octree() 
-{
-  busy();
-  surface_ptr->construct_octree();
-  not_busy();
-}
-
-void Polyhedral_surface::toggle_display_octree(bool b)
-{
-  if(surface_ptr && b && !is_octree_initialized) {
-    is_octree_initialized = true;
-    construct_octree();
-  }
-  display_octree = b;
-  emit set_dirty();
-}
-
-void Polyhedral_surface::toggle_display_edges_octree(bool b)
-{
-  if(surface_ptr && b && !is_octree_initialized) {
-    is_octree_initialized = true;
-    construct_octree();
-  }
-  display_edges_octree = b;
-  emit set_dirty();
-}
-
-void Polyhedral_surface::toggle_display_surface(bool b)
-{
-  display_surface = b;
-  emit set_dirty();
-}
-
-void Polyhedral_surface::toggle_display_all_edges(bool b)
-{
-  display_all_edges = b;
-  emit set_dirty();
-}
-
-void Polyhedral_surface::toggle_display_control_edges(bool b)
-{
-  display_control_edges = b;
-  emit set_dirty();
-}
-
-void Polyhedral_surface::make_one_subdivision_step()
-{
-  if(surface_ptr)
-  {
-    Polyhedron output;
-    CSubdivider_loop<Polyhedron , Poly_kernel> pw_loop_subdiviser;
-
-    pw_loop_subdiviser.subdivide(*surface_ptr, output);
-    static_cast<Polyhedron&>(*surface_ptr) = output;
-    surface_ptr->compute_normals();
-    surface_ptr->compute_type();
-    update_data_structures();
-    emit set_dirty();
-  }
-}
-
-bool Polyhedral_surface::open(const QString& filename)
-{
-  clear();
-
-  std::cerr << "Opening file \"" << qPrintable(filename) << "\"...";
-  std::ifstream in(filename.toUtf8());
-  if(!in) return false;
-
-  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-
-  if(surface_ptr)
-    delete surface_ptr;
-  surface_ptr = new CGAL_polyhedral_surface(in, 
-                                            sharp_edges_angle_lower_bound, 
-                                            sharp_edges_angle_upper_bound,
-                                            false /*do not construct 
-                                                    octree*/);
-  if(!in) {
-    QApplication::restoreOverrideCursor();
-    return false;
-  }
-  is_octree_initialized = false;
-  selected_facet = selected_edge = -1;
-  update_data_structures();
-
-  connect_actions();
-  std::cerr << " Done.\n";
-  QApplication::restoreOverrideCursor();
-  float xmin, ymin, zmin, xmax, ymax, zmax;
-  get_bbox(xmin, ymin, zmin, xmax, ymax, zmax);
-  const float xcenter = (xmin + xmax) / 2;
-  const float ycenter = (ymin + ymax) / 2;
-  const float zcenter = (zmin + zmax) / 2;
-  const float xdelta = (-xmin + xmax);
-  const float ydelta = (-ymin + ymax);
-  const float zdelta = (-zmin + zmax);
-//   const float radius = std::max(std::max(xdelta, ydelta), zdelta) * std::sqrt(3.)/ 2.;
-  std::cerr << boost::format("Bounding box: xmin=%1%, ymin=%2%, zmin=%3%\n"
-                             "              xmax=%4%, ymax=%5%, zmax=%6%\n"
-                             "              center=(%7%, %8%, %9%)\n")
-    % xmin % ymin % zmin % xmax % ymax % zmax
-    % xcenter % ycenter % zcenter
-            << boost::format("              span=(%1%,%2%,%3%)\n")
-    % xdelta % ydelta % zdelta;
-  viewer->camera()->setSceneBoundingBox(qglviewer::Vec(xmin, ymin, zmin),
-                                        qglviewer::Vec(xmax, ymax, zmax));
-  viewer->setBackgroundColor(Qt::white);
-  viewer->showEntireScene();
-  
-  QAction* actionInverse_normals = qFindChild<QAction*>(this, "actionInverse_normals");
-  if(actionInverse_normals) actionInverse_normals->setChecked(false);
-  emit set_dirty();
-  return true;
-}
-
-void Polyhedral_surface::close() 
-{
-  delete surface_ptr;
-  surface_ptr = 0;
-}
-
-void Polyhedral_surface::draw() {
-  draw(false);
-}
-
-void Polyhedral_surface::drawWithNames() {
-  draw(true);
-}
-
-void Polyhedral_surface::postSelection(const QPoint&)
-{
-  if(!surface_ptr) return;
-
-  selected_facet = selected_edge = -1;
-    
-  const int nb_vertices = surface_ptr->incidence_graph.vertices.size();
-  const int nb_edges = surface_ptr->incidence_graph.edges.size();
-  if(viewer->selectedName() >= nb_edges + nb_vertices)
-    selected_facet = viewer->selectedName() - nb_edges - nb_vertices;
-  else if(viewer->selectedName() >= nb_vertices)
-    selected_edge = viewer->selectedName() - nb_vertices;
-
-  std::cerr << boost::format("post-selection.\n"
-                             "selectedName()=%1%\n"
-                             "selected edge=%2%\n"
-                             "selected facet=%3%\n")
-    % viewer->selectedName() % selected_edge % selected_facet;
-
-  emit set_dirty();
-}
-  
-void Polyhedral_surface::draw(bool with_names)
-{
-  if(!list_id)
-  {
-    std::cerr << "Generating OpenGL display list ID: ";
-    std::cerr << (list_id = ::glGenLists(1)) << "\n";
-  }
-  if(!with_names)
-  {
-    if(is_dirty)
-      ::glNewList(list_id, GL_COMPILE_AND_EXECUTE);
-    else if(::glIsList(list_id))
-    {
-      ::glCallList(list_id);
-      return;
-    }
-    else
-      std::cerr << "Call list (" << list_id << ")failed.\n";
-  }
-
-  if(surface_ptr)
-  {
-    if(display_surface)
-    {
-      // enable polygon offset
-      ::glEnable(GL_POLYGON_OFFSET_FILL);
-      ::glPolygonOffset(1.0f,1.0f);
-      ::glEnable(GL_LIGHTING);
-      ::glColor3f(0.2f, 0.2f, 1.f);
-      if(with_names)
-        surface_ptr->gl_draw_direct_triangles_with_name(false,
-                                                        true,
-                                                        inverse_normals());
-      else
-        surface_ptr->gl_draw_almost_all_triangles(selected_facet,
-                                                  false,
-                                                  true,
-                                                  inverse_normals());
-      if(!with_names && selected_facet >= 0)
-      {
-        ::glColor3f(1., 1.f, 0.f);
-        surface_ptr->incidence_graph.gl_draw_facet(selected_facet,
-                                                   false,
-                                                   true,
-                                                   inverse_normals());
-      }
-      ::glDisable(GL_LIGHTING);
-      ::glLineWidth(1.0f);
-      if(display_all_edges)
-      {
-        // superimpose ordinary edges
-        ::glColor3d(0.,0.,.8);
-        surface_ptr->superimpose_edges(false,display_control_edges);
-      }
-      // superimpose control edges
-      if(display_control_edges)
-      {
-        ::glDisable(GL_LIGHTING);
-        ::glColor3d(.0, .0, .0);
-        ::glLineWidth(1.0f);
-        surface_ptr->superimpose_edges(true,false);
-      }
-
-      // draw sharp edges
-      ::glColor3ub(128,128,128);
-      if(with_names)
-        surface_ptr->gl_draw_sharp_edges_with_names(3.0f,255,0,0);
-      else
-        surface_ptr->gl_draw_sharp_edges(3.0f,255,0,0);
-      if(!with_names && selected_edge >= 0)
-      {
-        ::glLineWidth(3.0f);
-        ::glColor3d(0., 1., 0.);
-        surface_ptr->incidence_graph.gl_draw_edge(selected_edge);
-      }
-    } // end if display_surface
-    if(!with_names && (display_octree||display_edges_octree) )
-    {
-      ::glColor3ub(0,0,0);
-      ::glLineWidth(1.0f);
-      ::glDisable(GL_LIGHTING);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-      ::glEnable(GL_LINE_STIPPLE);
-      if(display_octree)
-      {
-        ::glColor3ub(0,0,0);
-        surface_ptr->gl_draw_facet_octree();
-      }
-      if(display_edges_octree)
-      {
-        ::glColor3d(1.,0.,0.);
-        surface_ptr->gl_draw_edges_octree();
-      }
-      ::glDisable(GL_LINE_STIPPLE);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-      ::glEnable(GL_LIGHTING);
-    } // end if display_octree
-      
-    ::glDisable(GL_POLYGON_OFFSET_FILL);
-      
-    if(!with_names && is_dirty)
-    {
-      ::glEndList();
-      is_dirty = false;
-    }
-  } // end if(surface_ptr)
-}
-void Polyhedral_surface::get_bbox(float& xmin, float& ymin, float& zmin,
-                                  float& xmax, float& ymax, float& zmax)
-{
-  if(surface_ptr) {
-    xmin=surface_ptr->bbox().xmin();
-    ymin=surface_ptr->bbox().ymin();
-    ymin=surface_ptr->bbox().zmin();
-    xmax=surface_ptr->bbox().xmax();
-    ymax=surface_ptr->bbox().ymax();
-    zmax=surface_ptr->bbox().zmax();
-  }
-  else 
-  {
-    xmin = ymin = zmin = 0.f;
-    xmax = ymax = zmax = 1.f;
-  }
-}
-
-void Polyhedral_surface::set_inverse_normals(const bool b) {
-  m_inverse_normals = b;
-  set_dirty();
-}
-
-bool Polyhedral_surface::inverse_normals() const {
-  return m_inverse_normals;
-}
-
-
-Surface* get_polyhedral_surface(QObject* parent,
-				double sharp_edges_angle_lower_bound,
-				double sharp_edges_angle_upper_bound = 180.)
-{
-  return new Polyhedral_surface(parent,
-				sharp_edges_angle_lower_bound,
-				sharp_edges_angle_upper_bound);
-}
-
-#include "polyhedral_surface.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.h
deleted file mode 100644
index 2044fab..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/polyhedral_surface.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef _POLYHEDRAL_SURFACE_H
-#define _POLYHEDRAL_SURFACE_H
-
-#define CGAL_SURFACE_MESHER_DEBUG_POLYHEDRAL_SURFACE_CONSTRUCTION
-
-#include "surface.h"
-#include "viewer.h"
-#include <CGAL/gl.h>
-
-#include <map>
-#include <utility>
-
-typedef std::pair<const char*, const char*> Signal_slot_pair;
-typedef std::map<const char*, Signal_slot_pair> Connection_map;
-
-// CGAL
-#include <CGAL/basic.h>
-
-// kernel
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-// surface
-#include <CGAL/Polyhedral_surface_3.h>
-
-// piece-wise loop subdivision
-#include <CGAL/pws_loop_subdivision.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Poly_kernel;
-typedef Poly_kernel::FT FT;
-typedef Poly_kernel::Point_3 Poly_point;
-typedef Poly_kernel::Sphere_3 Sphere;
-typedef Poly_kernel::Vector_3 Vector;
-typedef Poly_kernel::Triangle_3 Triangle_3;
-
-typedef CGAL::Polyhedral_surface_3<Poly_kernel,
-              CGAL::Surface_mesher::Has_edges> CGAL_polyhedral_surface;
-
-
-class Polyhedral_surface : public Surface
-{
-  Q_OBJECT;
-  
-public:
-  Polyhedral_surface(QObject* parent,
-		     double sharp_edges_angle_lower_bound = 90,
-		     double sharp_edges_angle_upper_bound = 120);
-
-  ~Polyhedral_surface();
-public slots:
-  void clear();
-  void connect_actions();
-  void display_nb_elements_in_status_bar() const;
-  void set_dirty();
-  void busy() const;
-  void not_busy() const;
-  void set_sharp_edges_angle_bounds(const double lower_bound,
-                                    const double upper_bound);
-  void update_data_structures();
-  void construct_octree();
-  void toggle_display_octree(bool b);
-  void toggle_display_edges_octree(bool b);
-  void toggle_display_surface(bool b);
-  void toggle_display_all_edges(bool b);
-  void toggle_display_control_edges(bool b);
-  void make_one_subdivision_step();
-  void on_action_Options_triggered();
-
-public:
-  bool open(const QString& filename);
-  void close();
-  void draw();
-  void drawWithNames();
-  void postSelection(const QPoint&);
-  void draw(bool with_names);
-  void get_bbox(float& xmin, float& ymin, float& zmin,
-		float& xmax, float& ymax, float& zmax);
-
-public slots:
-  void set_inverse_normals(const bool b);
-
-public:
-  bool inverse_normals() const;
-
-protected:
-  bool m_inverse_normals;
-  CGAL_polyhedral_surface* surface_ptr;
-  QObject* parent;
-  bool display_octree;
-  bool display_edges_octree;
-  bool display_surface;
-  bool display_all_edges;
-  bool display_control_edges;
-  double sharp_edges_angle_lower_bound;
-  double sharp_edges_angle_upper_bound;
-  bool is_octree_initialized;
-  int selected_edge;
-  int selected_facet;
-  bool is_dirty;
-  GLuint list_id;
-  Connection_map connection_map;
-};
-
-#endif // _POLYHEDRAL_SURFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/surface.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/surface.h
deleted file mode 100644
index 8d21bd7..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/surface.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _SURFACE_H
-#define _SURFACE_H
-
-#include <QObject>
-#include <QString>
-#include <QGLWidget>
-
-#include "viewer.h"
-
-class Surface : public QObject
-{
-  Q_OBJECT
-protected:
-  Surface(QObject* parent)
-  {
-    viewer = qFindChild<Viewer*>(parent, "viewer");
-    if(viewer)
-      connect(this, SIGNAL(changed()), viewer, SLOT(updateGL()));
-    viewer->set_surface(this);
-  }
-public slots:
-  virtual bool open(const QString& filename) = 0;
-  virtual void close() = 0;
-  virtual void draw() = 0;
-  virtual void get_bbox(float&, float&, float&,
-			float&, float&, float&) = 0;
-  virtual void drawWithNames() {};
-  virtual void postSelection(const QPoint&) {};
-signals:
-  void changed();
-
-protected:
-  Viewer* viewer;
-};
-
-#endif // _SURFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/mainwindow.ui b/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/mainwindow.ui
deleted file mode 100644
index a64cf73..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/mainwindow.ui
+++ /dev/null
@@ -1,797 +0,0 @@
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1147</width>
-    <height>648</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>CGAL Surface mesh generator</string>
-  </property>
-  <property name="windowIcon" >
-   <iconset resource="../surface_mesher.qrc" >
-    <normaloff>:/icons/cgal_logo.xpm</normaloff>:/icons/cgal_logo.xpm</iconset>
-  </property>
-  <property name="dockNestingEnabled" >
-   <bool>true</bool>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" name="gridLayout_4" >
-    <item row="0" column="0" >
-     <widget class="Viewer" name="viewer" >
-      <property name="sizePolicy" >
-       <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
-        <horstretch>1</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>1147</width>
-     <height>29</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menu_File" >
-    <property name="title" >
-     <string>&File</string>
-    </property>
-    <addaction name="action_Open" />
-    <addaction name="actionSave" />
-    <addaction name="actionExport_surface_mesh_to_OFF" />
-    <addaction name="separator" />
-    <addaction name="action_Quit" />
-   </widget>
-   <widget class="QMenu" name="menuOptions" >
-    <property name="title" >
-     <string>&Options</string>
-    </property>
-    <property name="show_only_in" stdset="0" >
-     <stringlist>
-      <string>volume</string>
-      <string>polyhedral</string>
-     </stringlist>
-    </property>
-    <addaction name="actionInverse_normals" />
-    <addaction name="actionDisplay_octree" />
-    <addaction name="actionDisplay_surface" />
-    <addaction name="actionDisplay_control_edges" />
-    <addaction name="actionDisplay_all_edges" />
-    <addaction name="action_Options" />
-    <addaction name="actionAuto_resize" />
-    <addaction name="actionDisplay_front_and_back" />
-    <addaction name="actionDraw_triangles_edges" />
-    <addaction name="actionUse_Gouraud_shading" />
-    <addaction name="actionShow_triangulation" />
-    <addaction name="actionTriangulation_edges_color" />
-    <addaction name="actionShow_the_image_bounding_box" />
-   </widget>
-   <widget class="QMenu" name="menuEdit" >
-    <property name="title" >
-     <string>&Edit</string>
-    </property>
-    <property name="show_only_in" stdset="0" >
-     <stringlist>
-      <string>polyhedral</string>
-     </stringlist>
-    </property>
-    <addaction name="actionSubdivision" />
-   </widget>
-   <addaction name="menu_File" />
-   <addaction name="menuEdit" />
-   <addaction name="menuOptions" />
-  </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
-    <string>Actions toolbar</string>
-   </property>
-   <property name="allowedAreas" >
-    <set>Qt::AllToolBarAreas</set>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="action_Open" />
-   <addaction name="actionExport_surface_mesh_to_OFF" />
-   <addaction name="separator" />
-   <addaction name="actionAuto_resize" />
-   <addaction name="actionDisplay_front_and_back" />
-   <addaction name="actionInverse_normals" />
-   <addaction name="actionShow_the_image_bounding_box" />
-   <addaction name="separator" />
-   <addaction name="actionDisplay_surface" />
-   <addaction name="actionDisplay_octree" />
-   <addaction name="actionDisplay_edges_octree" />
-  </widget>
-  <widget class="QToolBar" name="toolBar_meshing" >
-   <property name="enabled" >
-    <bool>true</bool>
-   </property>
-   <property name="windowTitle" >
-    <string>Meshing toolbar</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionMarching_cubes" />
-   <addaction name="actionSurface_mesher" />
-  </widget>
-  <widget class="QDockWidget" name="ImageOptions" >
-   <property name="allowedAreas" >
-    <set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
-   </property>
-   <property name="windowTitle" >
-    <string>Images options</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-   <attribute name="dockWidgetArea" >
-    <number>1</number>
-   </attribute>
-   <widget class="QWidget" name="ImageOptionsContents" >
-    <layout class="QGridLayout" name="gridLayout_2" >
-     <item row="0" column="0" >
-      <layout class="QVBoxLayout" name="verticalLayout_3" >
-       <item>
-        <widget class="QGroupBox" name="groupBoxImageType" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="title" >
-          <string>&Image type</string>
-         </property>
-         <property name="show_only_in" stdset="0" >
-          <stringlist>
-           <string>volume</string>
-          </stringlist>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout" >
-          <item>
-           <widget class="QRadioButton" name="grayLevelRadioButton" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text" >
-             <string>Grayscale image</string>
-            </property>
-            <property name="checked" >
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QRadioButton" name="labellizedRadioButton" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text" >
-             <string>Segmented image</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBox" >
-         <property name="title" >
-          <string>&Operations</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_4" >
-          <item>
-           <widget class="QCheckBox" name="interpolationCheckBox" >
-            <property name="text" >
-             <string>Trilinear interpolation</string>
-            </property>
-            <property name="checked" >
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QCheckBox" name="searchSeedsCheckBox" >
-            <property name="text" >
-             <string>Search for seeds</string>
-            </property>
-            <property name="checked" >
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBoxCriteria" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="title" >
-          <string>C&riteria</string>
-         </property>
-         <property name="show_only_in" stdset="0" >
-          <stringlist>
-           <string>volume</string>
-          </stringlist>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_2" >
-          <item>
-           <widget class="QCheckBox" name="manifoldCheckBox" >
-            <property name="text" >
-             <string>Manifold</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QCheckBox" name="sameIndexCheckBox" >
-            <property name="text" >
-             <string>Facets vertices have same index</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QGridLayout" name="gridLayout" >
-            <item row="0" column="0" >
-             <widget class="QLabel" name="label" >
-              <property name="text" >
-               <string>&Sizing bound:</string>
-              </property>
-              <property name="buddy" >
-               <cstring>spinBox_radius_bound</cstring>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="1" >
-             <widget class="QDoubleSpinBox" name="spinBox_radius_bound" >
-              <property name="decimals" >
-               <number>5</number>
-              </property>
-              <property name="maximum" >
-               <double>9999.989999999999782</double>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="0" >
-             <widget class="QLabel" name="label_2" >
-              <property name="text" >
-               <string>&Distance bound:</string>
-              </property>
-              <property name="buddy" >
-               <cstring>spinBox_distance_bound</cstring>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1" >
-             <widget class="QDoubleSpinBox" name="spinBox_distance_bound" >
-              <property name="decimals" >
-               <number>5</number>
-              </property>
-              <property name="maximum" >
-               <double>9999.989999999999782</double>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item row="1" column="0" >
-      <spacer name="verticalSpacer" >
-       <property name="orientation" >
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0" >
-        <size>
-         <width>20</width>
-         <height>0</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <widget class="QDockWidget" name="ImageLabels" >
-   <property name="sizePolicy" >
-    <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-     <horstretch>0</horstretch>
-     <verstretch>0</verstretch>
-    </sizepolicy>
-   </property>
-   <property name="windowTitle" >
-    <string>Image sub-domaines</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-   <attribute name="dockWidgetArea" >
-    <number>1</number>
-   </attribute>
-   <widget class="QWidget" name="ImageLabelsContents" >
-    <property name="sizePolicy" >
-     <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-      <horstretch>10</horstretch>
-      <verstretch>10</verstretch>
-     </sizepolicy>
-    </property>
-    <layout class="QGridLayout" name="gridLayout_3" >
-     <item row="0" column="0" >
-      <widget class="Values_list" native="1" name="values" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-         <horstretch>0</horstretch>
-         <verstretch>5</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="show_only_in" stdset="0" >
-        <stringlist>
-         <string>volume</string>
-        </stringlist>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <action name="action_Open" >
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/fileopen.png</normaloff>:/icons/fileopen.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Open...</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+O</string>
-   </property>
-  </action>
-  <action name="action_Quit" >
-   <property name="text" >
-    <string>&Quit</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+Q</string>
-   </property>
-   <property name="menuRole" >
-    <enum>QAction::QuitRole</enum>
-   </property>
-  </action>
-  <action name="actionInverse_normals" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/flip.png</normaloff>:/icons/flip.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Inverse normals</string>
-   </property>
-   <property name="iconText" >
-    <string>Flip</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+I</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_octree" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/bbox.png</normaloff>:/icons/bbox.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Display oc&tree</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+T</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_surface" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/surface.png</normaloff>:/icons/surface.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Display &surface</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="action_Options" >
-   <property name="text" >
-    <string>&Options...</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionSubdivision" >
-   <property name="text" >
-    <string>Piecewise-smooth &subdivision</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+S</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_all_edges" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Display &all edges</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+A</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_control_edges" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="text" >
-    <string>Display &control edges</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+C</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_edges_octree" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/bbox-red.png</normaloff>:/icons/bbox-red.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Display edges octree</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionMarching_cubes" >
-   <property name="text" >
-    <string>Marching &cubes</string>
-   </property>
-   <property name="iconText" >
-    <string>Marching &cubes</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionSurface_mesher" >
-   <property name="text" >
-    <string>Surface &mesher</string>
-   </property>
-   <property name="iconText" >
-    <string>Surface &mesher</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDisplay_front_and_back" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/twosides.png</normaloff>:/icons/twosides.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Display facets with &front and back</string>
-   </property>
-   <property name="iconText" >
-    <string>Two-sides</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+F</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="action_Clone" >
-   <property name="text" >
-    <string>Clone</string>
-   </property>
-  </action>
-  <action name="actionAuto_resize" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/resize.png</normaloff>:/icons/resize.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Auto-&resize</string>
-   </property>
-   <property name="iconText" >
-    <string>Auto-&resize</string>
-   </property>
-   <property name="toolTip" >
-    <string>Automaticaly zoom in or out when the object change.</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+S</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-     <string>polyhedral</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionDraw_triangles_edges" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Draw triangles &edges</string>
-   </property>
-   <property name="iconText" >
-    <string>Draw triangles &edges</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+E</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionUse_Gouraud_shading" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="text" >
-    <string>Use &Gouraud shading (marching cube only)</string>
-   </property>
-   <property name="iconText" >
-    <string>Use &Gouraud shading</string>
-   </property>
-   <property name="statusTip" >
-    <string>Use Gouraud shading to display the marching cubes.</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+G</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionShow_triangulation" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="text" >
-    <string>Show the whole &triangulation (surface mesher only)</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+T</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionTriangulation_edges_color" >
-   <property name="text" >
-    <string>Choose the triangulation edges &color...</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionExport_surface_mesh_to_OFF" >
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/filesave.png</normaloff>:/icons/filesave.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Export surface mesh to OFF...</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionShow_the_image_bounding_box" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/bbox.png</normaloff>:/icons/bbox.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show the image &bounding box</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+B</string>
-   </property>
-   <property name="show_only_in" stdset="0" >
-    <stringlist>
-     <string>volume</string>
-    </stringlist>
-   </property>
-  </action>
-  <action name="actionSave" >
-   <property name="icon" >
-    <iconset resource="../surface_mesher.qrc" >
-     <normaloff>:/icons/filesave.png</normaloff>:/icons/filesave.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Save the image as Inrimage...</string>
-   </property>
-  </action>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>Viewer</class>
-   <extends>QGLViewer</extends>
-   <header>viewer.h</header>
-  </customwidget>
-  <customwidget>
-   <class>Values_list</class>
-   <extends>QWidget</extends>
-   <header>values_list.h</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
- <tabstops>
-  <tabstop>viewer</tabstop>
-  <tabstop>grayLevelRadioButton</tabstop>
-  <tabstop>labellizedRadioButton</tabstop>
-  <tabstop>manifoldCheckBox</tabstop>
-  <tabstop>sameIndexCheckBox</tabstop>
-  <tabstop>spinBox_radius_bound</tabstop>
-  <tabstop>spinBox_distance_bound</tabstop>
- </tabstops>
- <resources>
-  <include location="../surface_mesher.qrc" />
- </resources>
- <connections>
-  <connection>
-   <sender>labellizedRadioButton</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>sameIndexCheckBox</receiver>
-   <slot>setDisabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>130</x>
-     <y>172</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>139</x>
-     <y>414</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/optionsdialog.ui b/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/optionsdialog.ui
deleted file mode 100644
index 715c83c..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/optionsdialog.ui
+++ /dev/null
@@ -1,128 +0,0 @@
-<ui version="4.0" >
- <class>OptionDialog</class>
- <widget class="QDialog" name="OptionDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>210</width>
-    <height>167</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Set options</string>
-  </property>
-  <property name="windowIcon" >
-   <iconset resource="../../../../../Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc" >:/icons/cgal_logo.xpm</iconset>
-  </property>
-  <layout class="QVBoxLayout" >
-   <item>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="title" >
-      <string>Sharp edges angle bounds</string>
-     </property>
-     <layout class="QGridLayout" >
-      <item row="0" column="0" >
-       <layout class="QGridLayout" >
-        <item row="0" column="0" >
-         <widget class="QLabel" name="label" >
-          <property name="text" >
-           <string>&Lower bound</string>
-          </property>
-          <property name="buddy" >
-           <cstring>angle_lower_bound</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1" >
-         <widget class="QDoubleSpinBox" name="angle_lower_bound" >
-          <property name="maximum" >
-           <double>180.000000000000000</double>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="label_2" >
-          <property name="text" >
-           <string>&Upper bound</string>
-          </property>
-          <property name="buddy" >
-           <cstring>angle_upper_bound</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1" >
-         <widget class="QDoubleSpinBox" name="angle_upper_bound" >
-          <property name="maximum" >
-           <double>180.000000000000000</double>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>0</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="../../../../../Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc" />
- </resources>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>OptionDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>227</x>
-     <y>215</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>90</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>OptionDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>243</x>
-     <y>221</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>252</x>
-     <y>90</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/raw_image.ui b/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/raw_image.ui
deleted file mode 100644
index bff94af..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/raw_image.ui
+++ /dev/null
@@ -1,454 +0,0 @@
-<ui version="4.0" >
- <class>Raw_image_dialog</class>
- <widget class="QDialog" name="Raw_image_dialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>585</width>
-    <height>342</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Open raw image</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout" >
-   <item>
-    <widget class="QGroupBox" name="groupBox_2" >
-     <property name="title" >
-      <string>Image &value type</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout" >
-      <item row="2" column="0" >
-       <widget class="QRadioButton" name="short_bt" >
-        <property name="text" >
-         <string>Short (16 bits)</string>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0" >
-       <widget class="QRadioButton" name="float_bt" >
-        <property name="text" >
-         <string>Float</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1" >
-       <widget class="QRadioButton" name="int_bt" >
-        <property name="text" >
-         <string>Int (32 bits)</string>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="1" >
-       <widget class="QRadioButton" name="double_bt" >
-        <property name="text" >
-         <string>Double</string>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1" >
-       <widget class="QCheckBox" name="signed_bt" >
-        <property name="text" >
-         <string>Signed</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0" >
-       <widget class="QRadioButton" name="char_bt" >
-        <property name="text" >
-         <string>char (8 bits)</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="title" >
-      <string>Image dimensions</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2" >
-      <item>
-       <layout class="QGridLayout" >
-        <item row="0" column="0" >
-         <widget class="QLabel" name="label_dim" >
-          <property name="text" >
-           <string>&Dimensions:</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-          <property name="buddy" >
-           <cstring>dim_x</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0" >
-         <widget class="QLabel" name="label_spacing" >
-          <property name="text" >
-           <string>&Spacing:</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-          <property name="buddy" >
-           <cstring>spacing_x</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1" >
-         <widget class="QSpinBox" name="dim_x" >
-          <property name="prefix" >
-           <string>x: </string>
-          </property>
-          <property name="maximum" >
-           <number>100000000</number>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2" >
-         <widget class="QSpinBox" name="dim_y" >
-          <property name="prefix" >
-           <string>y: </string>
-          </property>
-          <property name="maximum" >
-           <number>100000000</number>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3" >
-         <widget class="QSpinBox" name="dim_z" >
-          <property name="prefix" >
-           <string>z: </string>
-          </property>
-          <property name="maximum" >
-           <number>100000000</number>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1" >
-         <widget class="QDoubleSpinBox" name="spacing_x" >
-          <property name="prefix" >
-           <string>vx: </string>
-          </property>
-          <property name="decimals" >
-           <number>3</number>
-          </property>
-          <property name="value" >
-           <double>1.000000000000000</double>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="2" >
-         <widget class="QDoubleSpinBox" name="spacing_y" >
-          <property name="prefix" >
-           <string>vy: </string>
-          </property>
-          <property name="decimals" >
-           <number>3</number>
-          </property>
-          <property name="value" >
-           <double>1.000000000000000</double>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="3" >
-         <widget class="QDoubleSpinBox" name="spacing_z" >
-          <property name="prefix" >
-           <string>vz: </string>
-          </property>
-          <property name="decimals" >
-           <number>3</number>
-          </property>
-          <property name="value" >
-           <double>1.000000000000000</double>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0" >
-         <widget class="QLabel" name="offset_label" >
-          <property name="text" >
-           <string>&Offset:</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-          <property name="buddy" >
-           <cstring>offset</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1" >
-         <widget class="QSpinBox" name="offset" >
-          <property name="suffix" >
-           <string> bytes</string>
-          </property>
-          <property name="maximum" >
-           <number>999999999</number>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="imagesize_budy" >
-          <property name="text" >
-           <string>Image size:</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1" >
-         <widget class="QLabel" name="label_image_size" >
-          <property name="text" >
-           <string>0</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2" >
-         <widget class="QLabel" name="filesize_budy" >
-          <property name="text" >
-           <string>File size:</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3" >
-         <widget class="QLabel" name="label_file_size" >
-          <property name="text" >
-           <string>0</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Open</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <tabstops>
-  <tabstop>int_bt</tabstop>
-  <tabstop>short_bt</tabstop>
-  <tabstop>signed_bt</tabstop>
-  <tabstop>float_bt</tabstop>
-  <tabstop>double_bt</tabstop>
-  <tabstop>dim_x</tabstop>
-  <tabstop>dim_y</tabstop>
-  <tabstop>dim_z</tabstop>
-  <tabstop>spacing_x</tabstop>
-  <tabstop>spacing_y</tabstop>
-  <tabstop>spacing_z</tabstop>
-  <tabstop>offset</tabstop>
-  <tabstop>buttonBox</tabstop>
- </tabstops>
- <resources/>
- <connections>
-  <connection>
-   <sender>float_bt</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>signed_bt</receiver>
-   <slot>setDisabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>47</x>
-     <y>112</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>553</x>
-     <y>94</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>double_bt</sender>
-   <signal>toggled(bool)</signal>
-   <receiver>signed_bt</receiver>
-   <slot>setDisabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>564</x>
-     <y>127</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>564</x>
-     <y>94</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>191</x>
-     <y>316</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>183</x>
-     <y>313</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>253</x>
-     <y>319</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>252</x>
-     <y>312</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>dim_x</sender>
-   <signal>valueChanged(int)</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>178</x>
-     <y>187</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>99</x>
-     <y>141</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>dim_z</sender>
-   <signal>valueChanged(int)</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>473</x>
-     <y>178</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>441</x>
-     <y>142</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>char_bt</sender>
-   <signal>clicked()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>71</x>
-     <y>52</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>137</x>
-     <y>3</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>short_bt</sender>
-   <signal>clicked()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>117</x>
-     <y>81</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>49</x>
-     <y>6</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>float_bt</sender>
-   <signal>clicked()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>137</x>
-     <y>111</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>67</x>
-     <y>-5</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>int_bt</sender>
-   <signal>clicked()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>358</x>
-     <y>49</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>584</x>
-     <y>52</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>dim_y</sender>
-   <signal>valueChanged(int)</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>332</x>
-     <y>186</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>271</x>
-     <y>142</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>double_bt</sender>
-   <signal>clicked()</signal>
-   <receiver>Raw_image_dialog</receiver>
-   <slot>update_image_size()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>514</x>
-     <y>119</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>581</x>
-     <y>116</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
- <slots>
-  <slot>update_image_size()</slot>
- </slots>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.cpp
deleted file mode 100644
index ac616d0..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-#include "values_list.h"
-#include "ui_values_list.h"
-#include "colorlisteditor.h"
-#include <iostream>
-
-#include <QTreeWidget>
-#include <QTreeWidgetItem>
-#include <QTreeWidgetItemIterator>
-#include <QHeaderView>
-#include <QMetaProperty>
-#include <QItemDelegate>
-#include <QItemEditorFactory>
-#include <QItemEditorCreatorBase>
-#include <QPainter>
-#include <QStringList>
-#include <QString>
-#include <QList>
-#include <QVariant>
-#include <QSettings>
-#include <QUrl>
-#include <QLineEdit>
-#include <QDoubleValidator>
-
-Values_delegate::Values_delegate(QWidget* parent) : QItemDelegate(parent) {}
-void Values_delegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
-{
-  switch(index.column())
-  {
-  case Values_list::Color: {
-    painter->fillRect(option.rect, index.data().value<QColor>());
-    drawFocus(painter, option, option.rect);
-    break;
-  }
-  default:
-    QItemDelegate::paint(painter, option, index);
-  }
-}
-
-QWidget *Values_delegate::createEditor(QWidget *parent,
-                                          const QStyleOptionViewItem & option,
-                                          const QModelIndex & index) const
-{
-  if(index.column() == Values_list::Color)
-  {
-    return new ColorListEditor(parent);
-  }
-  else if(index.column() == Values_list::Value)
-  {
-    QLineEdit* lineedit = new QLineEdit(parent);
-    lineedit->setAutoFillBackground(true);
-    lineedit->setValidator(new QDoubleValidator(lineedit));
-    return lineedit;
-  }
-  else return QItemDelegate::createEditor(parent, option, index);
-}
-  
-void Values_delegate::setEditorData(QWidget *editor,
-                                       const QModelIndex &index) const
-{
-  if(index.column() == Values_list::Color)
-  {
-    ColorListEditor* coloreditor = qobject_cast<ColorListEditor*>(editor);
-    if(coloreditor)
-      coloreditor->setColor(index.data().value<QColor>());
-  }
-  else if(index.column() == Values_list::Value)
-  {
-    QLineEdit* lineedit = qobject_cast<QLineEdit*>(editor);
-    if(lineedit)
-      lineedit->setText(index.data().toString());
-  }
-  else QItemDelegate::setEditorData(editor, index);
-}
-void Values_delegate::setModelData(QWidget *editor, QAbstractItemModel *model,
-                                      const QModelIndex &index) const
-{
-  if(index.column() == Values_list::Color)
-  {
-    ColorListEditor* coloreditor = qobject_cast<ColorListEditor*>(editor);
-    if(coloreditor)
-    {
-      model->setData(index, coloreditor->color());
-      emit new_color(index);
-    }
-  }
-  else if(index.column() == Values_list::Value)
-  {
-    QLineEdit* lineedit = qobject_cast<QLineEdit*>(editor);
-    if(lineedit)
-    {
-      model->setData(index, lineedit->text().toDouble());
-      emit new_value(index);
-    }
-  }
-  else QItemDelegate::setModelData(editor, model, index);
-}
-
-const double Values_list::default_value = 0.0;
-
-Values_list::Values_list(QWidget* parent):
-  QWidget(parent)
-{
-  Ui::Values_list().setupUi(this);
-
-  treeWidget = parent->findChild<QTreeWidget*>("treeWidget");
-  Q_ASSERT_X(treeWidget, "Values_list constructor", "cannot find widget \"treeWidget\"");
-
-  treeWidget->sortByColumn(Value, Qt::AscendingOrder);
-  treeWidget->header()->setClickable(false);
-
-  Values_delegate* values_delegate = new Values_delegate(parent);
-
-  treeWidget->setItemDelegate(values_delegate);
-  connect(values_delegate, SIGNAL(new_value(const QModelIndex&)),
-          this, SIGNAL(values_changed()));
-  connect(values_delegate, SIGNAL(new_color(const QModelIndex&)),
-          this, SIGNAL(colors_changed()));
-  connect(this->treeWidget->model(),
-          SIGNAL(dataChanged (const QModelIndex &, const QModelIndex &)),
-          this, SIGNAL(changed()));
-
-  connect(this, SIGNAL(changed()),
-	  this, SLOT(update_items_cache()));
-}
-
-QColor Values_list::color(const int i) const
-{
-  if(i < 0 || i > treeWidget->topLevelItemCount())
-    return QColor();
-  else
-    return treeWidget->topLevelItem(i)->data(Color, Qt::DisplayRole).value<QColor>();
-}
-
-QColor Values_list::color(const QTreeWidgetItem* item) const
-{
-    return item->data(Color, Qt::DisplayRole).value<QColor>();
-}
-
-int Values_list::numberOfValues() const
-{
-  return treeWidget->topLevelItemCount();
-}
-
-double Values_list::value(const int i) const
-{
-  if(i < 0 || i > numberOfValues())
-    return 0.;
-  else
-    return treeWidget->topLevelItem(i)->data(Value, Qt::DisplayRole).toDouble();
-}
-
-QString Values_list::name(const int i) const
-{
-  if(i < 0 || i > treeWidget->topLevelItemCount())
-    return QString();
-  else
-    return treeWidget->topLevelItem(i)->data(Name, Qt::DisplayRole).toString();
-}
-
-bool Values_list::enabled(const int i) const
-{
-  if(i < 0 || i > treeWidget->topLevelItemCount())
-    return 0.;
-  else
-    return treeWidget->topLevelItem(i)->data(Value, Qt::CheckStateRole).toDouble();
-}
-
-bool Values_list::enabled(const QTreeWidgetItem* item) const
-{
-    return item->data(Value, Qt::CheckStateRole).toDouble();
-}
-
-const QTreeWidgetItem* Values_list::item(const int i) const
-{
-  if(i < 0 || i > treeWidget->topLevelItemCount())
-    return 0;
-  else
-    return treeWidget->topLevelItem(i);
-}
-
-void Values_list::save_values(QString filename) const
-{
-  QSettings settings;
-
-  settings.beginGroup(QUrl::toPercentEncoding(filename));
-  settings.beginWriteArray("values");
-  for (int i = 0; i < numberOfValues(); ++i) {
-    settings.setArrayIndex(i);
-    settings.setValue("value", value(i));
-    settings.setValue("color", color(i));
-    settings.setValue("name", name(i));
-    settings.setValue("enabled", enabled(i));
-  }
- settings.endArray();
- settings.endGroup();
-}
-
-void Values_list::load_values(QString filename) 
-{
-  QSettings settings;
-
-  treeWidget->clear();
-  settings.beginGroup(QUrl::toPercentEncoding(filename));
-  int nb = settings.beginReadArray("values");
-  for (int i = 0; i < nb; ++i) {
-    settings.setArrayIndex(i);
-    QTreeWidgetItem *newItem = new QTreeWidgetItem(treeWidget);
-    newItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
-    newItem->setData(Value, Qt::CheckStateRole, settings.value("enabled").toBool() ? Qt::Checked : Qt::Unchecked);
-    newItem->setData(Value, Qt::DisplayRole, settings.value("value").toDouble());
-    newItem->setData(Color, Qt::DisplayRole, settings.value("color").value<QColor>());
-    newItem->setData(Name, Qt::DisplayRole, settings.value("name").toString());
-  }
-  settings.endArray();
-  settings.endGroup();
-  update_items_cache();
-}
-
-void Values_list::on_minusButton_clicked()
-{
-  Q_FOREACH(QTreeWidgetItem* item, treeWidget->selectedItems())
-  {
-    //   treeWidget->invisibleRootItem()->removeChild(item);
-    delete item;
-  }
-  emit values_changed();
-}
-
-void Values_list::on_plusButton_clicked()
-{
-  addValue();
-}
-
-void Values_list::addValue(const double i)
-{
-  QTreeWidgetItem *newItem = new QTreeWidgetItem(treeWidget);
-  newItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
-  newItem->setData(Value, Qt::CheckStateRole, Qt::Checked);
-  newItem->setData(Value, Qt::DisplayRole, i);
-  QStringList colors = QColor::colorNames();
-  const int color_index = qrand() % colors.size();
-  QColor color = QColor(colors[color_index]);
-  newItem->setData(Color, Qt::DisplayRole, color);
-  newItem->setData(Name, Qt::DisplayRole, "");
-  emit values_changed();
-}
-
-void Values_list::update_items_cache() {
-  items_cache.clear();
-  for(int i = 0, nb = numberOfValues(); i < nb; ++i) {
-    items_cache.insert(std::make_pair(value(i), item(i)));
-  }
-}
-
-const QTreeWidgetItem* Values_list::search(const double value) const
-{
-  Items_cache::const_iterator it = items_cache.find(value);
-  if(it != items_cache.end()) {
-    return it->second;
-  }
-  else {
-    return 0;
-  }
-}
-
-void Values_list::setHeaderTitle(QString title)
-{
-  treeWidget->headerItem()->setText(0, title);
-}
-
-#include "values_list.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.h
deleted file mode 100644
index 4a7d533..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef _VALUES_LIST_H
-#define _VALUES_LIST_H
-
-#include <QWidget>
-#include <QString>
-#include <QList>
-#include <QModelIndex>
-#include <QItemDelegate>
-
-class QTreeWidget;
-class QTreeWidgetItem;
-
-class Values_delegate : public QItemDelegate
-{
-  Q_OBJECT
-public:
-  Values_delegate(QWidget* parent);
-
-signals:
-  void new_color(const QModelIndex&) const;
-  void new_value(const QModelIndex&) const;
-
-protected:
-  void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
-  QWidget *createEditor(QWidget *parent,
-                        const QStyleOptionViewItem & option,
-                        const QModelIndex & index) const;
-  void setEditorData(QWidget *editor,
-                     const QModelIndex &index) const;
-  void setModelData(QWidget *editor, QAbstractItemModel *model,
-                    const QModelIndex &index) const;
-};
-
-class Values_list : public QWidget
-{
-  Q_OBJECT 
-public:
-  enum Field { Value = 0 , Color = 1, Name = 2};
-  Values_list(QWidget* parent);
-  
-  // const accessors
-  int numberOfValues() const;
-  QColor color(const int i) const;
-  QColor color(const QTreeWidgetItem* i) const;
-  double value(const int i) const;
-  QString name(const int i) const;
-  bool enabled(const int i) const;
-  bool enabled(const QTreeWidgetItem* i) const;
-  const QTreeWidgetItem* item(const int i) const;
-  const QTreeWidgetItem* search(const double value) const;
-
-public slots:
-  void save_values(QString) const;
-  void load_values(QString);
-  void on_plusButton_clicked();
-  void on_minusButton_clicked();
-
-  // setters
-  void addValue(const double v = Values_list::default_value);
-
-  void setHeaderTitle(QString);
-
-private slots:
-  void update_items_cache();
-
-signals:
-  void changed();
-  void colors_changed();
-  void values_changed();
-private:
-  QTreeWidget* treeWidget;
-  typedef std::map<double, const QTreeWidgetItem*> Items_cache;
-  Items_cache items_cache;
-
-  static const double default_value;
-};
-
-#endif // _VALUES_LIST_H
-
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.cpp
deleted file mode 100644
index 710be7f..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include "viewer.h"
-#include "surface.h"
-#include <QAction>
-#include <QGLViewer/manipulatedCameraFrame.h>
-
-Viewer::Viewer(QWidget* parent)
-  : QGLViewer(parent), surface(0)
-{
-  // Do not store state in a file
-  setStateFileName("");
-}
-
-void Viewer::init()
-{
-  setBackgroundColor(Qt::white);
-  glLineStipple(5, 0xaaaa);
-  glDisable(GL_LINE_STIPPLE);
-
-  // anti-aliasing
-  glEnable(GL_BLEND);
-  glEnable(GL_LINE_SMOOTH);
-  glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
-  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-}
-
-QString Viewer::helpString() const
-{
-  return ""
-  "<h1>Surface mesher demo</h1>\n"
-  "<p>No help availlable for now.</p>";
-}
-
-void Viewer::interpolateToFitBoundingBox(double xmin, double ymin, double zmin,
-                                         double xmax, double ymax, double zmax)
-{
-  QAction* auto_resize = parent()->parent()->findChild<QAction*>("actionAuto_resize");
-  Q_ASSERT_X(auto_resize, "Viewer::interpolateToFitBoundingBox", "cannot find action \"actionAuto_resize\"");
-  if(auto_resize && auto_resize->isChecked())
-  {
-    qglviewer::Camera new_camera = *(camera ());
-    new_camera.fitBoundingBox(qglviewer::Vec(xmin, ymin, zmin),
-                              qglviewer::Vec(xmax, ymax, zmax));
-    camera()->interpolateTo(*new_camera.frame(), 1.);
-  }
-}
-
-void Viewer::draw()
-{
-  if(surface)
-    surface->draw();
-}
-
-void Viewer::drawWithNames()
-{
-  if(surface)
-    surface->drawWithNames();
-}
-void Viewer::postSelection(const QPoint& p)
-{
-  if(surface)
-    surface->postSelection(p);
-}
-
-void Viewer::set_surface(Surface* s)
-{
-  surface = s;
-}
-
-#include "viewer.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.h
deleted file mode 100644
index 3c1e018..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/viewer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _VIEWER_H
-#define _VIEWER_H
-
-#include <QGLViewer/qglviewer.h>
-
-class Surface;
-
-class Viewer : public QGLViewer
-{
-  Q_OBJECT
-public:
-  Viewer(QWidget* parent);
-
-  void set_surface(Surface*);
-
-public slots:
-  void interpolateToFitBoundingBox(double, double, double, double, double, double);
-
-protected :
-  virtual void init();
-  virtual void draw();
-  virtual void drawWithNames();
-  virtual void postSelection(const QPoint&);
-  virtual QString helpString() const;
-
-  Surface* surface;
-};
-
-#endif // _VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.cpp b/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.cpp
deleted file mode 100644
index 9016fdf..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.cpp
+++ /dev/null
@@ -1,1521 +0,0 @@
-#include <CGAL/basic.h>
-
-#include "volume.h"
-
-#include  <algorithm> // std::sort
-#include <boost/shared_ptr.hpp>
-#include <fstream>
-#include <boost/foreach.hpp>
-
-#include <CGAL/Bbox_3.h>
-
-#include "viewer.h"
-#include "mainwindow.h"
-#include "values_list.h"
-
-#include "File_XT.h" // format XT from Total/ELF
-
-#include <QApplication>
-#include <QFileDialog>
-#include <QAction>
-#include <QStatusBar>
-#include <QDoubleSpinBox>
-#include <QMessageBox>
-#include <QTreeWidgetItem>
-#include <QTime>
-#include <QColor>
-#include <QColorDialog>
-#include <QSettings>
-#include <QUrl>
-#include "Raw_image_dialog.h"
-
-#include <CGAL/glu.h>
-
-#include <CGAL/Surface_mesher/Standard_criteria.h>
-// #include <CGAL/Surface_mesher/Image_surface_oracle_3.h>
-#include <CGAL/Surface_mesher/Implicit_surface_oracle_3.h>
-#include <CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h>
-#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
-
-#include <CGAL/make_surface_mesh.h>
-
-struct Threshold : public std::unary_function<FT, unsigned char> {
-  double isovalue;
-  bool is_identity;
-
-  Threshold(double isovalue) : isovalue(isovalue), is_identity(false) {}
-
-  result_type operator()(FT value)
-  {
-    if(is_identity)
-      return static_cast<unsigned char>(value);
-    else if(value >=  isovalue)
-      return 1;
-    else
-      return 0;
-  }
-};
-
-class Classify_from_isovalue_list :
-  public std::unary_function<FT, unsigned char> 
-{
-  typedef std::pair<FT, result_type> Isovalue;
-  typedef std::vector<Isovalue> Isovalues;
-  boost::shared_ptr<Isovalues> isovalues;
-  bool is_identity;
-
-  struct Sort_isovalues : std::binary_function<Isovalue, Isovalue, bool> 
-  {
-    bool operator()(const Isovalue& isoval1, const Isovalue& isoval2)
-    {
-      return isoval1.first < isoval2.first;
-    }
-  };
-public:
-  Classify_from_isovalue_list(Values_list * list)
-    : is_identity(false)
-  {
-    isovalues = boost::shared_ptr<Isovalues>(new Isovalues(list->numberOfValues()));
-    for(int i = 0, nbs = list->numberOfValues(); i < nbs; ++i )
-      (*isovalues)[i] = std::make_pair(list->value(i), i);
-    std::sort(isovalues->begin(), isovalues->end(), Sort_isovalues());
-  }
-
-  void set_identity(bool b) {
-    is_identity = b;
-  }
-
-  result_type operator()(FT value)
-  {
-    if(is_identity) {
-      return static_cast<unsigned char>(value);
-    }
-    result_type result = 0;
-//     std::cerr << "isovalues: ";
-    for(int i = 1, end = static_cast<int>(isovalues->size()); i <= end; ++i)
-    {
-//       std::cerr << (*isovalues)[i-1] << ", ";
-      if(value >= (*isovalues)[i-1].first &&
-         i >= result)
-      {
-        result = i;
-      }
-    }
-//     if(result>1)
-//       std::cerr << "result = "  << (int)result << "/" << list->numberOfValues() << std::endl;
-//     else
-//       std::cerr << std::endl;
-    if(result>0)
-      return (*isovalues)[result-1].second + 1;
-    else
-      return 0;
-  }
-};
-
-class Generate_surface_identifiers :
-  public std::binary_function<Classify_from_isovalue_list::result_type,
-                              Classify_from_isovalue_list::result_type,
-                              const QTreeWidgetItem*>
-{
-  Values_list* list;
-  bool labellized;
-
-public:
-  Generate_surface_identifiers(Values_list* list)
-    : list(list), labellized(false) {};
-
-  void set_labellized_image(bool b)
-  {
-    labellized = b;
-  }
-
-  result_type operator()(const Classify_from_isovalue_list::result_type& a,
-                         const Classify_from_isovalue_list::result_type& b)
-  {
-    if(labellized)
-      return list->search((std::max)(a, b));
-    else
-      return list->item((std::min)(a, b));
-  }
-};
-
-// class Classify_from_isovalue_list :
-//   public std::unary_function<FT, const QTreeWidgetItem*> 
-// {
-//   typedef std::pair<FT, result_type> Isovalue;
-//   typedef std::vector<Isovalue> Isovalues;
-//   boost::shared_ptr<Isovalues> isovalues;
-
-//   struct Sort_isovalues : std::binary_function<Isovalue, Isovalue, bool> 
-//   {
-//     bool operator()(const Isovalue& isoval1, const Isovalue& isoval2)
-//     {
-//       return isoval1.first < isoval2.first;
-//     }
-//   };
-// public:
-//   Classify_from_isovalue_list(Isovalues_list * list)
-//   {
-//     isovalues = boost::shared_ptr<Isovalues>(new Isovalues(list->numberOfIsoValues()));
-//     for(int i = 0, nbs = list->numberOfIsoValues(); i < nbs; ++i )
-//       (*isovalues)[i] = std::make_pair(list->isovalue(i), list->item(i));
-//     std::sort(isovalues->begin(), isovalues->end(), Sort_isovalues());
-//   }
-
-//   result_type operator()(FT value)
-//   {
-//     int result = 0;
-// //     std::cerr << "isovalues: ";
-//     for(int i = 1, end = isovalues->size(); i <= end; ++i)
-//     {
-// //       std::cerr << (*isovalues)[i-1] << ", ";
-//       if(value >= (*isovalues)[i-1].first &&
-//          i >= result)
-//       {
-//         result = i;
-//       }
-//     }
-//     if(result>1)
-//       std::cerr << boost::format("result = %1%/%2%\n") % result % isovalues->size();
-//     if(result>0)
-//       return (*isovalues)[result-1].second;
-//     else
-//       return 0;
-//   }
-// };
-Volume::Volume(MainWindow* mw) : 
-  Surface(mw),
-  m_sm_angle(30),
-  m_sm_radius(0),
-  m_sm_distance(0),
-  m_relative_precision(0.000000001),
-  m_view_surface(false),
-  m_triangulation_color(QColor(Qt::green)),
-  m_inverse_normals(false),
-  two_sides(false),
-  del(),
-  c2t3(del),
-  mw(mw),
-  lists_draw_surface(),
-  lists_draw_surface_is_valid(false),
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  list_draw_marching_cube(0),
-  list_draw_marching_cube_is_valid(false),
-  lists_draw_surface_mc(),
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  m_view_mc(false)
-{
-  spinBox_radius_bound = mw->findChild<QDoubleSpinBox*>("spinBox_radius_bound");
-  spinBox_distance_bound = mw->findChild<QDoubleSpinBox*>("spinBox_distance_bound");
-  Q_ASSERT_X(spinBox_radius_bound && spinBox_distance_bound,
-             "Volume::Volume()", "Cannot find spinboxes!");
-
-  values_list = mw->values;
-
-  connect(spinBox_radius_bound, SIGNAL(valueChanged(double)),
-          this, SLOT(set_radius_bound(double)));
-  connect(spinBox_distance_bound, SIGNAL(valueChanged(double)),
-          this, SLOT(set_distance_bound(double)));
-
-  connect(mw->actionSurface_mesher, SIGNAL(triggered()),
-          this, SLOT(display_surface_mesher_result()));
-
-  connect(mw->actionInverse_normals, SIGNAL(toggled(bool)),
-          this, SLOT(set_inverse_normals(bool)));
-  m_inverse_normals = mw->actionInverse_normals->isChecked();
-
-  connect(mw->actionDisplay_front_and_back, SIGNAL(toggled(bool)),
-          this, SLOT(set_two_sides(bool)));
-  two_sides = mw->actionDisplay_front_and_back->isChecked();
-
-  connect(mw->actionDraw_triangles_edges, SIGNAL(toggled(bool)),
-          this, SLOT(set_draw_triangles_edges(bool)));
-  draw_triangles_edges = mw->actionDraw_triangles_edges->isChecked();
-
-  connect(mw->actionUse_Gouraud_shading, SIGNAL(toggled(bool)),
-          this, SLOT(set_use_gouraud(bool)));
-  use_gouraud = mw->actionUse_Gouraud_shading->isChecked();
-
-  connect(mw->actionShow_the_image_bounding_box, SIGNAL(toggled(bool)),
-          this, SLOT(set_show_bbox(bool)));
-  show_bbox = mw->actionShow_the_image_bounding_box->isChecked();
-
-  connect(mw->actionShow_triangulation, SIGNAL(toggled(bool)),
-          this, SLOT(set_draw_triangulation(bool)));
-  m_draw_triangulation = mw->actionShow_triangulation->isChecked();
-
-  connect(mw->actionTriangulation_edges_color, SIGNAL(triggered()),
-          this, SLOT(set_triangulation_edges_color()));
-
-  connect(this, SIGNAL(new_bounding_box(double, double, double, double, double, double)),
-          mw->viewer, SLOT(interpolateToFitBoundingBox(double, double, double, double, double, double)));
-
-  connect(values_list, SIGNAL(values_changed()),
-          this, SLOT(changed_parameters()));
-  connect(values_list, SIGNAL(changed()),
-          mw->viewer, SLOT(updateGL()));
-  connect(this, SIGNAL(changed()),
-          this, SLOT(check_can_export_off()));
-
-  connect(mw->labellizedRadioButton, SIGNAL(toggled(bool)),
-	  this, SLOT(labellizedToogled(bool)));
-
-  mw->actionExport_surface_mesh_to_OFF->setEnabled(false);
-  connect(mw->actionExport_surface_mesh_to_OFF, SIGNAL(triggered()),
-          this, SLOT(export_off()));
-
-  connect(mw->actionSave, SIGNAL(triggered()),
-          this, SLOT(save_image_to_inr()));
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  connect(mw->actionMarching_cubes, SIGNAL(triggered()),
-          this, SLOT(display_marchin_cube()));
-#endif
-}
-
-void Volume::set_inverse_normals(const bool b) {
-  m_inverse_normals = b;
-
-  list_draw_marching_cube = 0; // Invalidate the display list for the
-                               // marching cube. See gl_draw_marchingcube()
-                               // for an explanation.
-
-  emit changed();
-}
-
-void Volume::set_two_sides(const bool b) {
-  two_sides = b;
-  emit changed();
-}
-
-void Volume::set_draw_triangles_edges(const bool b) {
-  draw_triangles_edges = b;
-  emit changed();
-}
-
-void Volume::set_draw_triangulation(const bool b) {
-  m_draw_triangulation = b;
-  emit changed();
-}
-
-void Volume::set_triangulation_edges_color() {
-  const QColor color = QColorDialog::getColor(m_triangulation_color, mw);
-  if (color.isValid()) {
-    m_triangulation_color = color;
-    emit changed();
-  }
-}
-
-void Volume::set_use_gouraud(const bool b) {
-  use_gouraud = b;
-  emit changed();
-}
-
-void Volume::set_show_bbox(const bool b) {
-  show_bbox = b;
-  emit changed();
-}
-
-void Volume::only_in()
-{
-  mw->show_only("volume");
-#ifndef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  mw->actionMarching_cubes->setVisible(false);
-#endif
-}
-
-#ifdef CGAL_USE_VTK
-#include <vtkImageData.h>
-#include <vtkDICOMImageReader.h>
-#include <vtkImageReader.h>
-#include <vtkImageGaussianSmooth.h>
-
-bool Volume::opendir(const QString& dirname) 
-{
-  bool result = true;
-  if(!fileinfo.isReadable())
-  {
-    QMessageBox::warning(mw, mw->windowTitle(),
-                         tr("Cannot read directory <tt>%1</tt>!").arg(dirname));
-    status_message(tr("Opening of directory %1 failed!").arg(dirname));
-    result = false;
-  }
-  else
-  {
-    vtkDICOMImageReader* dicom_reader = vtkDICOMImageReader::New();
-    dicom_reader->SetDirectoryName(dirname.toUtf8());
-    vtkImageGaussianSmooth* smoother = vtkImageGaussianSmooth::New();
-    smoother->SetStandardDeviations(1., 1., 1.);
-    smoother->SetInputConnection(dicom_reader->GetOutputPort());
-    smoother->Update();
-    vtkImageData* vtk_image = smoother->GetOutput();
-    dicom_reader->SetReleaseDataFlag(false);
-    vtk_image->SetReleaseDataFlag(false);
-    vtk_image->Print(std::cerr);
-    if(!m_image.read_vtk_image_data(vtk_image))
-    {
-      QMessageBox::warning(mw, mw->windowTitle(),
-                           tr("Error with file <tt>%1/</tt>:\nunknown file format!").arg(dirname));
-      status_message(tr("Opening of file %1/ failed!").arg(dirname));
-      result = false;
-    }
-    else
-    {
-      status_message(tr("File %1/ successfully opened.").arg(dirname));
-      finish_open();
-      result = true;
-    }
-    dicom_reader->Delete();
-    // smoother->Delete();
-  }
-  return result;
-}
-
-bool Volume::open_vtk(const QString& filename)
-{
-  only_in();
-
-  fileinfo.setFile(filename);
-
-  if(fileinfo.isDir())
-  {
-    return opendir(filename);
-  }
-
-  if(!fileinfo.isReadable())
-  {
-    QMessageBox::warning(mw, mw->windowTitle(),
-                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
-    status_message(tr("Opening of file %1 failed!").arg(filename));
-    return false;
-  }
-  else
-  {
-    vtkImageReader* vtk_reader = vtkImageReader::New();
-    vtk_reader->SetFileName(filename.toUtf8());
-    vtk_reader->SetDataScalarTypeToUnsignedChar();
-    vtk_reader->SetDataExtent(0, 249, 0, 249, 0,  124);
-    vtk_reader->SetDataSpacing(1., 1., 1.);
-    vtk_reader->SetFileDimensionality(3);
-    vtk_reader->Update();
-    vtk_reader->Print(std::cerr);
-    vtkImageData* vtk_image = vtk_reader->GetOutput();
-    vtk_image->Print(std::cerr);
-    if(!m_image.read_vtk_image_data(vtk_image))
-    {
-      QMessageBox::warning(mw, mw->windowTitle(),
-                           tr("Error with file <tt>%1</tt>:\nunknown file format!").arg(filename));
-      status_message(tr("Opening of file %1 failed!").arg(filename));
-      return false;
-    }
-    else
-    {
-      status_message(tr("File %1 successfully opened.").arg(filename));
-      finish_open();
-      return true;
-    }
-  }
-}
-
-// Total 3D images (XT format, that is the old Inrimage format, 1994.
-bool Volume::open_xt(const QString& filename)
-{
-  only_in();
-
-  fileinfo.setFile(filename);
-
-  if(fileinfo.isDir())
-  {
-    return false;
-  }
-
-  if(!fileinfo.isReadable())
-  {
-    QMessageBox::warning(mw, mw->windowTitle(),
-                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
-    status_message(tr("Opening of file %1 failed!").arg(filename));
-    return false;
-  }
-  else
-  {
-    long dimx, dimy, dimz;
-    long word_dim;
-    long header_size;
-    const char* filename_stl = qPrintable(filename);
-    CGAL::Total::lire_longueur_entete(filename_stl, &header_size);
-    CGAL::Total::lire_nb_octet(filename_stl, &word_dim);
-    CGAL::Total::lire_longueur_trace(filename_stl, &dimx);
-    CGAL::Total::lire_nb_trace(filename_stl, &dimy);
-    CGAL::Total::lire_nb_plan(filename_stl, &dimz);
-
-    vtkImageReader* vtk_reader = vtkImageReader::New();
-    vtk_reader->SetFileName(filename_stl);
-    switch(word_dim) {
-    case 8:
-      vtk_reader->SetDataScalarTypeToUnsignedChar();
-      break;
-    case 16:
-      vtk_reader->SetDataScalarTypeToUnsignedShort();
-      break;
-    default:
-      return false;
-    }
-    vtk_reader->SetHeaderSize(header_size);
-    vtk_reader->SetDataExtent(1, dimx, 1, dimy, 1,  dimz);
-    vtk_reader->SetDataSpacing(1., 1., 1.);
-    vtk_reader->SetFileDimensionality(3);
-    vtk_reader->Update();
-    vtk_reader->Print(std::cerr);
-    vtkImageData* vtk_image = vtk_reader->GetOutput();
-    vtk_image->Print(std::cerr);
-    if(!m_image.read_vtk_image_data(vtk_image))
-    {
-      QMessageBox::warning(mw, mw->windowTitle(),
-                           tr("Error with file <tt>%1</tt>:\nunknown file format!").arg(filename));
-      status_message(tr("Opening of file %1 failed!").arg(filename));
-      return false;
-    }
-    else
-    {
-      status_message(tr("File %1 successfully opened.").arg(filename));
-      finish_open();
-    }
-    return true;
-  }
-}
-
-#else // CGAL_USE_VTK
-bool Volume::opendir(const QString&)
-{
-  return false;
-}
-
-bool Volume::open_xt(const QString&)
-{
-  return false;
-}
-#endif // CGAL_USE_VTK
-
-bool Volume::open(const QString& filename)
-{
-  only_in();
-
-  fileinfo.setFile(filename);
-
-  if(fileinfo.isDir())
-  {
-    return opendir(filename);
-  }
-
-  if(!fileinfo.isReadable())
-  {
-    QMessageBox::warning(mw, mw->windowTitle(),
-                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
-  }
-  else
-  {
-    if(m_image.read(filename.toStdString().c_str()))
-    {
-      status_message(tr("File %1 successfully opened.").arg(filename));
-      finish_open();
-      return true;
-    }
-    else if(open_xt(filename)) {
-      return true;
-    }
-    else 
-    {
-      QSettings settings;
-      settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath()));
-      if( settings.value("is_raw").toBool() &&
-	  m_image.read_raw(filename.toStdString().c_str(),
-			   settings.value("dim_x").toInt(),
-			   settings.value("dim_y").toInt(),
-			   settings.value("dim_z").toInt(),
-			   settings.value("spacing_x").toDouble(),
-			   settings.value("spacing_y").toDouble(),
-			   settings.value("spacing_z").toDouble(),
-			   settings.value("offset").toInt()) )
-      {
-	status_message(tr("File %1 successfully opened.").arg(filename));
-	finish_open();
-	return true;
-      }
-      else if(QMessageBox::warning(mw, mw->windowTitle(),
-				   tr("Error with file <tt>%1</tt>:\n"
-				      "unknown file format!\n"
-				      "\n"
-				      "Open it as a raw image?").arg(filename),
-				   QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes) 
-      {
-	Raw_image_dialog raw_dialog;
-	raw_dialog.label_file_size->setText(QString("%1 B").arg(fileinfo.size()));
-	if( raw_dialog.exec() && 
-	    m_image.read_raw(filename.toStdString().c_str(),
-			     raw_dialog.dim_x->value(),
-			     raw_dialog.dim_y->value(),
-			     raw_dialog.dim_z->value(),
-			     raw_dialog.spacing_x->value(),
-			     raw_dialog.spacing_y->value(),
-			     raw_dialog.spacing_z->value(),
-			     raw_dialog.offset->value()) )
-	{
-	  status_message(tr("File %1 successfully opened.").arg(filename));
-	  QSettings settings;
-	  settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath()));
-	  settings.setValue("is_raw", true);
-	  settings.setValue("dim_x", raw_dialog.dim_x->value());
-	  settings.setValue("dim_y", raw_dialog.dim_y->value());
-	  settings.setValue("dim_z", raw_dialog.dim_z->value());
-	  settings.setValue("spacing_x", raw_dialog.spacing_x->value());
-	  settings.setValue("spacing_y", raw_dialog.spacing_y->value());
-	  settings.setValue("spacing_z", raw_dialog.spacing_z->value());
-	  settings.setValue("offset", raw_dialog.offset->value());
-	  settings.endGroup();
-	  finish_open();
-	  return true;
-	}
-      }
-    }
-  }
-  status_message(tr("Opening of file %1 failed!").arg(filename));
-  return false;
-}
-
-void Volume::finish_open()
-{
-  m_image.finish_open();
-  mw->viewer->camera()->setSceneBoundingBox(qglviewer::Vec(0, 0, 0),
-                                            qglviewer::Vec(m_image.xmax(),
-                                                           m_image.ymax(),
-                                                           m_image.zmax()));
-
-  mw->viewer->showEntireScene();
-  values_list->load_values(fileinfo.absoluteFilePath());
-  load_image_settings(fileinfo.absoluteFilePath());
-  changed_parameters();
-  emit changed();
-}
-
-void Volume::export_off()
-{
-  QFileDialog filedialog(mw, tr("Export surface to file"));
-  filedialog.setFileMode(QFileDialog::AnyFile);
-  filedialog.setFilter(tr("OFF files (*.off);;"
-                          "All files (*)"));
-  filedialog.setAcceptMode(QFileDialog::AcceptSave);
-  filedialog.setDefaultSuffix("off");
-  if(filedialog.exec())
-  {
-    const QString filename = filedialog.selectedFiles().front();
-    std::cerr << "Saving to file \"" << filename.toLocal8Bit().data() << "\"...";
-    std::ofstream out(filename.toUtf8());
-    CGAL::output_surface_facets_to_off(out, c2t3);
-    if(!out)
-    {
-      QMessageBox::warning(mw, mw->windowTitle(),
-                           tr("Export to the OFF file <tt>%1</tt> failed!").arg(filename));
-      status_message(tr("Export to the OFF file %1 failed!").arg(filename));
-      std::cerr << " failed!\n";
-    }
-    else
-    {
-      std::cerr << " done.\n";
-      status_message(tr("Successfull export to the OFF file %1.").arg(filename));
-    }
-  }
-}
-
-void Volume::save_image_to_inr()
-{
-  QFileDialog filedialog(mw, tr("Export image to Inrimage format"));
-  filedialog.setFileMode(QFileDialog::AnyFile);
-  filedialog.setFilter(tr("Inrimage files (*.inr);;"
-                          "Compressed Inrimage files (*.inr.gz)"));
-  filedialog.setAcceptMode(QFileDialog::AcceptSave);
-  filedialog.setDefaultSuffix("inr.gz");
-  if(filedialog.exec())
-  {
-    const QString filename = filedialog.selectedFiles().front();
-    std::cerr << "Saving image to file \"" << filename.toLocal8Bit().data() << "\"...";
-    const int result = ::_writeImage(m_image.image(), filename.toUtf8());
-    if(result != ImageIO_NO_ERROR)
-    {
-      QMessageBox::warning(mw, mw->windowTitle(),
-                           tr("Export to the Inrimage file <tt>%1</tt> failed!").arg(filename));
-      status_message(tr("Export to the Inrimage file %1 failed!").arg(filename));
-      std::cerr << " failed!\n";
-    }
-    else
-    {
-      std::cerr << " done.\n";
-      status_message(tr("Successfull export to the Inrimage file %1.").arg(filename));
-    }
-  }
-}
-
-void Volume::check_can_export_off()
-{
-  mw->actionExport_surface_mesh_to_OFF->setEnabled(m_view_surface);// || m_view_mc);
-}
-
-void Volume::status_message(QString string)
-{
-  std::cerr << qPrintable(string) << std::endl;
-  mw->statusBar()->showMessage(string);
-}
-
-void Volume::busy() const 
-{
-  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-}
-
-void Volume::not_busy() const 
-{
-  QApplication::restoreOverrideCursor();
-}
-
-void Volume::display_marchin_cube()
-{
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  if(m_surface_mc.empty())
-  {
-    QTime total_time;
-    total_time.start();
-
-    values_list->save_values(fileinfo.absoluteFilePath());
-
-    unsigned int nx = m_image.xdim();
-    unsigned int ny = m_image.ydim();
-    unsigned int nz = m_image.zdim();
-    if(nx * ny * nz == 0)
-    {
-      status_message("No volume loaded.");
-      return;
-    }
-
-    mc_timer.reset();
-    busy();
-    status_message("Marching cubes...");
-
-    mc_timer.start();
-    m_surface_mc.clear();
-
-    if(mc.ntrigs()!=0)
-      mc.clean_all();
-    mc.set_resolution(nx,ny,nz);
-    mc.init_all();
-    mc.set_ext_data(static_cast<unsigned char*>(m_image.image()->data));
-
-    nbs_of_mc_triangles.resize(values_list->numberOfValues());
-
-    for(int value_id = 0; 
-        value_id < values_list->numberOfValues();
-        ++value_id)
-    {
-      status_message(tr("Marching cubes, isovalue #%1...").arg(value_id));
-
-      // set data
-//       for(unsigned int i=0;i<nx;i++)
-//         for(unsigned int j=0;j<ny;j++)
-//           for(unsigned int k=0;k<nz;k++)
-//           {
-//             const float& value = m_image.value(i,j,k);
-//             mc.set_data(value,i,j,k);
-//           }
-      // compute scaling ratio
-      if(value_id > 0)
-        mc.init_temps();
-      mc.run(values_list->value(value_id),
-             m_image.vx(),
-             m_image.vy(),
-             m_image.vz());
-      mc.clean_temps();
-
-      std::vector<double> facets;
-      mc.get_facets(facets);
-
-      mc_timer.stop();
-      const unsigned int begin = value_id == 0 ? 0 : nbs_of_mc_triangles[value_id-1];
-      const unsigned int nbt = facets.size() / 9;
-      for(unsigned int i=begin;i<nbt;i++)
-      {
-        const Point a(facets[9*i],   facets[9*i+1], facets[9*i+2]);
-        const Point b(facets[9*i+3], facets[9*i+4], facets[9*i+5]);
-        const Point c(facets[9*i+6], facets[9*i+7], facets[9*i+8]);
-        const Triangle_3 t(a,b,c);
-        const Vector u = t[1] - t[0];
-        const Vector v = t[2] - t[0];
-        Vector n = CGAL::cross_product(u,v);
-        n = n / std::sqrt(n*n);
-        m_surface_mc.push_back(Facet(t,n,values_list->item(value_id)));
-      }
-      nbs_of_mc_triangles[value_id]=m_surface_mc.size();
-      mc_timer.start();
-    }
-    mc_timer.stop();
-    not_busy();
-    mc_total_time = total_time.elapsed();
-
-    // invalidate the display list
-    lists_draw_surface_mc_is_valid = false;
-    list_draw_marching_cube_is_valid = false;
-  }
-  CGAL::Bbox_3 bbox(0,0,0,0,0,0);
-  for(std::vector<Facet>::const_iterator
-        it = m_surface_mc.begin(), end = m_surface_mc.end();
-      it != end; ++it)
-  {
-    bbox = bbox + it->get<0>().bbox();
-  }
-
-  m_view_mc = true;
-  m_view_surface = false;
-  emit changed();
-  if(!m_surface_mc.empty())
-  {
-    emit new_bounding_box(bbox.xmin(),
-                          bbox.ymin(),
-                          bbox.zmin(),
-                          bbox.xmax(),
-                          bbox.ymax(),
-                          bbox.zmax());
-  }
-  status_message(tr("Marching cubes done. %2 facets in %1s (CPU time), total time is %3s.")
-                 .arg(mc_timer.time())
-                 .arg(m_surface_mc.size())
-                 .arg(mc_total_time/1000.));
-
-  save_image_settings(fileinfo.absoluteFilePath());
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-}
-
-void Volume::display_surface_mesher_result()
-{
-  if(m_surface.empty() || // Either the surface is not computed.
-     m_view_surface) // Or it is computed and displayed, and one want
-                     // to recompute it.
-  {
-    QTime total_time;
-    total_time.start();
-
-    values_list->save_values(fileinfo.absoluteFilePath());
-
-    std::size_t nx = m_image.xdim();
-    std::size_t ny = m_image.ydim();
-    std::size_t nz = m_image.zdim();
-    if(nx * ny * nz == 0)
-    {
-      status_message("No volume loaded.");
-      return;
-    }
-
-    m_surface.clear();
-    sm_timer.reset();
-    busy();
-
-    status_message("Surface meshing...");
-
-    sm_timer.start();
-
-    c2t3.clear();
-    del.clear();
-    Sphere bounding_sphere(m_image.center(),m_image.radius()*m_image.radius());
-
-    Classify_from_isovalue_list classify(values_list);
-    Generate_surface_identifiers generate_ids(values_list);
-
-    m_image.set_interpolation(mw->interpolationCheckBox->isChecked());
-    if(mw->labellizedRadioButton->isChecked()) {
-      std::cerr << "Labellized image\n";
-    }
-    m_image.set_labellized(mw->labellizedRadioButton->isChecked());
-    classify.set_identity(mw->labellizedRadioButton->isChecked());
-    generate_ids.set_labellized_image(mw->labellizedRadioButton->isChecked());
-
-    // definition of the surface
-    Surface_3 surface(m_image, bounding_sphere, m_relative_precision);
-//     Threshold threshold(m_image.isovalue());
-
-    // surface mesh traits class
-    typedef CGAL::Surface_mesher::Implicit_surface_oracle_3<Kernel,
-      //     typedef CGAL::Surface_mesher::Image_surface_oracle_3<Kernel,
-      Surface_3, 
-      Classify_from_isovalue_list,
-      Generate_surface_identifiers> Oracle;
-    Oracle oracle(classify, generate_ids);
-
-    if(mw->searchSeedsCheckBox->isChecked())
-    {
-      typedef std::vector<std::pair<Point, double> > Seeds;
-      Seeds seeds;
-      {
-	std::cerr << "Search seeds...\n";
-	std::set<unsigned char> domains;
-	search_for_connected_components(std::back_inserter(seeds),
-					CGAL::inserter(domains),
-					classify);
-	std::cerr << "Found " << seeds.size() << " seed(s).\n";
-
-	if(mw->labellizedRadioButton->isChecked() && 
-	   values_list->numberOfValues() == 0) 
-	{
-	  Q_FOREACH(unsigned char label, domains) {
-	    if(label != 0) {
-	      values_list->addValue(label);
-	    }
-	  }
-	}
-      }
-      std::ofstream seeds_out("seeds.off");
-      std::ofstream segments_out("segments.txt");
-      seeds_out.precision(18);
-      seeds_out << "OFF\n" << seeds.size() << " 0 0\n";
-      segments_out.precision(18);
-      for(Seeds::const_iterator it = seeds.begin(), end = seeds.end();
-	  it != end; ++it)
-      {
-        seeds_out << it->first << std::endl;
-	CGAL::Random_points_on_sphere_3<Point> random_points_on_sphere_3(it->second);
-	Oracle::Intersect_3 intersect = oracle.intersect_3_object();
-	for(int i = 0; i < 20; ++i)
-	{
-	  const Point test = it->first + (*random_points_on_sphere_3++ - CGAL::ORIGIN);
-	  CGAL::Object o = intersect(surface, Segment_3(it->first, test));
-	  if (const Point* intersection = CGAL::object_cast<Point>(&o)) {
-            segments_out << "2 " << it->first << " " << *intersection << std::endl;
-	    del.insert(*intersection);
-          }
-	  else 
-	  {
-	    std::cerr << 
-	      boost::format("Error. Segment (%1%, %2%) does not intersect the surface! values=(%3%, %4%)\n")
-	      % it->first % test
-	      % surface(it->first) % surface(test);
-	  }
-	}
-      }
-    }
-    else {
-      oracle.construct_initial_points_object()(surface, 
-					       CGAL::inserter(c2t3.triangulation()),
-					       20);
-    }
-
-    std::ofstream points_out("initial-points.off");
-    points_out.precision(18);
-    points_out << "OFF\n" << c2t3.triangulation().number_of_vertices() << " 0 0\n";
-    BOOST_FOREACH(const Tr::Vertex& v,
-                  std::make_pair(c2t3.triangulation().vertices_begin(),
-                                 c2t3.triangulation().vertices_end()))
-    {
-      points_out << v.point() << std::endl;
-    }
-
-    std::cerr << boost::format("Number of initial points: %1%\n") % del.number_of_vertices();
-
-    // defining meshing criteria
-    typedef CGAL::Surface_mesher::Refine_criterion<Tr> Criterion;
-    CGAL::Surface_mesher::Curvature_size_criterion<Tr>
-      curvature_size_criterion (m_sm_distance);
-    CGAL::Surface_mesher::Uniform_size_criterion<Tr>
-      uniform_size_criterion (m_sm_radius);
-    CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
-      aspect_ratio_criterion (m_sm_angle);
-    CGAL::Surface_mesher::Vertices_on_the_same_psc_element_criterion<Tr, Surface_3>
-      vertices_on_the_same_psc_element_criterion(surface);
-    
-    std::vector<Criterion*> criterion_vector;
-    criterion_vector.push_back(&aspect_ratio_criterion);
-    criterion_vector.push_back(&uniform_size_criterion);
-    criterion_vector.push_back(&curvature_size_criterion);
-    if(mw->sameIndexCheckBox->isChecked()) {
-      criterion_vector.push_back(&vertices_on_the_same_psc_element_criterion);
-      std::cerr << "vertices_on_the_same_psc_element_criterion is activated.\n";
-    }
-
-    typedef CGAL::Surface_mesher::Standard_criteria<Criterion> Criteria;
-    Criteria criteria(criterion_vector);
-    std::cerr << "Surface_mesher... angle=" << m_sm_angle << ", radius= " << m_sm_radius
-              << ", distance=" << m_sm_distance << "\n";
-
-    typedef CGAL::Surface_mesher_generator<C2t3,
-      Oracle,
-      Criteria,
-      CGAL::Manifold_tag,
-      CGAL_SURFACE_MESHER_VERBOSITY
-      >::type Surface_mesher_manifold;
-      
-    typedef CGAL::Surface_mesher_generator<C2t3,
-      Oracle,
-      Criteria,
-      CGAL::Non_manifold_tag,
-      CGAL_SURFACE_MESHER_VERBOSITY
-      >::type Surface_mesher_non_manifold; 
-
-    if(mw->manifoldCheckBox->isChecked()) {
-      // meshing surface
-      std::cerr << "manifold criteria is activated.\n";
-//       make_surface_mesh(c2t3, surface, oracle, criteria,
-// 			CGAL::Manifold_tag(), 0);
-      Surface_mesher_manifold manifold_mesher(c2t3, surface, oracle, criteria);
-      manifold_mesher.refine_mesh();
-    }
-    else {
-//       m_view_surface = true;
-      Surface_mesher_non_manifold non_manifold_mesher(c2t3, surface, oracle, criteria);
-#if 0
-      int nb_steps = 0;
-//       direct_draw = true;
-      non_manifold_mesher.init();
-      while(!non_manifold_mesher.is_algorithm_done()) {
-	CGAL::Null_mesh_visitor null_visitor;
-	non_manifold_mesher.one_step(null_visitor);
-	if(++nb_steps % 1000 == 0) {
-	  CGAL::Timer timer;
-	  std::cerr << "(process events...";
-	  timer.start();
-	  list_draw_marching_cube_is_valid = false;
-	  lists_draw_surface_is_valid = false;
-	  for(Tr::Finite_cells_iterator 
-		cit = del.finite_cells_begin(),
-		end = del.finite_cells_end();
-	      cit != end; ++cit)
-	  {
-	    cit->info() = classify(surface(cit->circumcenter()));
-	  }
-// 	  emit changed();
-	  qApp->processEvents();
-	  timer.stop();
-	  std::cerr << timer.time() << " secondes)\n";
-	}
-      }
-#else
-      non_manifold_mesher.refine_mesh();
-#endif
-    }
-    sm_timer.stop();
-    not_busy();
-    direct_draw = false;
-
-    for(Tr::Finite_cells_iterator 
-	  cit = del.finite_cells_begin(),
-	  end = del.finite_cells_end();
-	cit != end; ++cit)
-    {
-      cit->info() = classify(surface(cit->circumcenter()));
-    }
-    // get output surface
-    for(C2t3::Facet_iterator
-          fit = c2t3.facets_begin(), end = c2t3.facets_end();
-        fit != end; ++fit)
-    {
-      const Tr::Cell_handle& cell = fit->first;
-      const int index = fit->second;
-
-      // here "left" means nothing
-      const Point left_circumcenter = cell->circumcenter();
-      const Point right_circumcenter = cell->neighbor(index)->circumcenter();
-
-      const Triangle_3 t = 
-        Triangle_3(cell->vertex(del.vertex_triple_index(index, 0))->point(),
-                   cell->vertex(del.vertex_triple_index(index, 1))->point(),
-                   cell->vertex(del.vertex_triple_index(index, 2))->point());
-      const Vector u = t[1] - t[0];
-      const Vector v = t[2] - t[0];
-      Vector n = CGAL::cross_product(u,v);
-      n = n / std::sqrt(n*n);
-      if(mw->labellizedRadioButton->isChecked()) 
-      {
-	m_surface.push_back(Facet(t,
-				  n,
-				  values_list->search((std::max)(surface(left_circumcenter), 
-								 surface(right_circumcenter)))));
-      }
-      else {
-	m_surface.push_back(Facet(t,n,cell->vertex(del.vertex_triple_index(index, 0))->point().element_index()));
-      }
-    }
-
-    // invalidate the display list
-    lists_draw_surface_is_valid = false;
-    sm_total_time = total_time.elapsed();
-  }
-
-  CGAL::Bbox_3 bbox(0,0,0,0,0,0);
-  for(std::vector<Facet>::const_iterator
-        it = m_surface.begin(), end = m_surface.end();
-      it != end; ++it)
-  {
-    bbox = bbox + it->get<0>().bbox();
-  }
-
-  // toggle visualization
-  m_view_mc = false;
-  m_view_surface = true;
-  emit changed();
-  if(!m_surface.empty())
-  {
-    emit new_bounding_box(bbox.xmin(),
-                          bbox.ymin(),
-                          bbox.zmin(),
-                          bbox.xmax(),
-                          bbox.ymax(),
-                          bbox.zmax());
-  }
-  status_message(tr("Surface meshing done. %1 facets in %2s (CPU time), total time is %3s.")
-                 .arg(m_surface.size())
-                 .arg(sm_timer.time())
-                 .arg(sm_total_time/1000.));
-  save_image_settings(fileinfo.absoluteFilePath());
-}
-
-void Volume::draw()
-{
-  float	ambient[]  =   { 0.25f,
-                         0.20725f,
-                         0.20725f,
-                         0.922f };
-  float	diffuse[]  =   { 1.0f,
-                         0.829f,
-                         0.829f,
-                         0.922f };
-
-  float	specular[]  = {  0.296648f,
-                         0.296648f,
-                         0.296648f,
-                         0.522f };
-
-  float	emission[]  = {  0.3f,
-                         0.3f,
-                         0.3f,
-                         1.0f };
-  float shininess[] = {  11.264f };
-
-  // apply
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT,   ambient);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE,   diffuse);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR,  specular);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess);
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,  emission);
-
-  ::glEnable(GL_LINE_SMOOTH);
-
-  if(two_sides)
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-  else
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); // default
-
-  // draw surface mesh
-  if(m_view_surface)
-  {
-    ::glEnable(GL_LIGHTING);
-    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-    ::glColor3f(0.2f, 0.2f, 1.f);
-    ::glEnable(GL_POLYGON_OFFSET_FILL);
-    ::glPolygonOffset(3.0f,-3.0f);
-    gl_draw_surface();
-
-    if(draw_triangles_edges)
-    {
-      ::glDisable(GL_LIGHTING);
-      ::glLineWidth(1.);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-      ::glColor3ub(0,0,0);
-      ::glDisable(GL_POLYGON_OFFSET_FILL);
-      gl_draw_surface();
-    }
-  }
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  // draw MC surface mesh
-  if(m_view_mc)
-  {
-    ::glEnable(GL_LIGHTING);
-    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-    ::glColor3f(0.2f, 0.2f, 1.f);
-    ::glEnable(GL_POLYGON_OFFSET_FILL);
-    ::glPolygonOffset(3.0f,-3.0f);
-    gl_draw_surface_mc();
-
-    if(draw_triangles_edges)
-    {
-      ::glDisable(GL_LIGHTING);
-      ::glLineWidth(1.);
-      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-      ::glColor3ub(0,0,0);
-      ::glDisable(GL_POLYGON_OFFSET_FILL);
-      gl_draw_surface_mc();
-    }
-  }
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-
-  if(show_bbox) {
-    ::glDisable(GL_LIGHTING);
-    m_image.gl_draw_bbox(3.0f,0,0,0);
-  }
-
-  if(!m_view_mc && m_draw_triangulation)
-  {
-    // draw the triangualtion
-    mw->viewer->qglColor(m_triangulation_color);
-    ::glLineWidth(1.0);
-    ::glBegin(GL_LINES);
-    for(Tr::Finite_edges_iterator 
-          eit = del.finite_edges_begin(), 
-          end = del.finite_edges_end();
-        eit != end; ++eit) 
-    {
-      const Point p1 = eit->first->vertex(eit->second)->point();
-      const Point p2 = eit->first->vertex(eit->third)->point();
-      ::glVertex3d(p1.x(),p1.y(),p1.z());
-      ::glVertex3d(p2.x(),p2.y(),p2.z());
-    }
-    ::glEnd();
-  }
-}
-
-void Volume::set_radius_bound(double d)
-{ 
-  m_sm_radius = FT(d);
-  changed_parameters();
-}
-
-void Volume::set_distance_bound(double d)
-{ 
-  m_sm_distance = FT(d);
-  changed_parameters();
-}
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-void Volume::gl_draw_surface_mc()
-{
-  if(use_gouraud)
-  {
-    gl_draw_marchingcube();
-    return;
-  }
-  
-  if(lists_draw_surface_mc_is_valid)
-  {
-    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
-    {
-      if(values_list->enabled(i))
-      {
-        mw->viewer->qglColor(values_list->color(i));
-        ::glCallList(lists_draw_surface_mc[i]);
-      }
-    }
-  }
-  else
-  {
-    lists_draw_surface_mc.resize(values_list->numberOfValues(), 0);
-    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
-    {
-      if(!lists_draw_surface_mc[i])
-      {
-        lists_draw_surface_mc[i] = ::glGenLists(1);
-      }
-
-      std::cerr << boost::format("(Re-)Generating list #%1% for marching cube surface #%2%"
-                                 " in gl_draw_surface(), ()\n")
-        % lists_draw_surface_mc[i]
-        % i;
-
-      mw->viewer->qglColor(values_list->color(i));
-
-      if(lists_draw_surface_mc[i])             // If
-        ::glNewList(lists_draw_surface_mc[i],  // lists_draw_surface[i]==0 then something
-                    values_list->enabled(i) // got wrong in the list generation.
-                    ? GL_COMPILE_AND_EXECUTE
-                    : GL_COMPILE);
-
-
-      gl_draw_surface(m_surface_mc.begin(),
-                      m_surface_mc.end(),
-                      values_list->item(i));
-        
-      if(lists_draw_surface_mc[i]) // If lists_draw_surface[i]==0 then
-      {                            // something got wrong in the list
-        ::glEndList();             // generation.
-      }
-    }
-    lists_draw_surface_mc_is_valid = (::glGetError() == GL_NO_ERROR);
-  }
-}
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-
-void Volume::gl_draw_surface()
-{
-//   if(mw->labellizedRadioButton->isChecked()) {
-//     mw->viewer->qglColor(::Qt::blue);
-//     gl_draw_surface(m_surface.begin(),
-// 		    m_surface.end(),
-// 		    0);
-//   }
-//   else
-  if(direct_draw) {
-    ::glBegin(GL_TRIANGLES);
-    unsigned int counter = 0;
-    for(Tr::Finite_cells_iterator
-	  cit = del.finite_cells_begin(), end = del.finite_cells_end();
-	cit != end; ++cit)
-    {
-      for(int facet_index = 0; facet_index < 4; ++facet_index)
-      {
-	const Tr::Cell_handle& facet_cell = cit;
-	if(c2t3.face_status(facet_cell, facet_index) == C2t3::NOT_IN_COMPLEX) {
-	  continue;
-	}
-	const Point& a = facet_cell->vertex(del.vertex_triple_index(facet_index, 0))->point();
-	const Point& b = facet_cell->vertex(del.vertex_triple_index(facet_index, 1))->point();
-	const Point& c = facet_cell->vertex(del.vertex_triple_index(facet_index, 2))->point();
-	Vector n = CGAL::cross_product(b-a,c-a);
-	n = n / std::sqrt(n*n); // unit normal
-	if(m_inverse_normals) {
-	  ::glNormal3d(-n.x(),-n.y(),-n.z());
-	} else {
-	  ::glNormal3d(n.x(),n.y(),n.z());
-	}
-	mw->viewer->qglColor(values_list->color(values_list->search(facet_cell->info())));
-	::glVertex3d(a.x(),a.y(),a.z());
-	::glVertex3d(b.x(),b.y(),b.z());
-	::glVertex3d(c.x(),c.y(),c.z());
-	++counter;
-      }
-      ::glEnd();
-    }
-    return;
-  }
-  if(!direct_draw && lists_draw_surface_is_valid)
-  {
-    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
-    {
-      if(values_list->enabled(i))
-      {
-        mw->viewer->qglColor(values_list->color(i));
-        ::glCallList(lists_draw_surface[i]);
-      }
-    }
-  }
-  else
-  {
-    lists_draw_surface.resize(values_list->numberOfValues(), 0);
-    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
-    {
-      if(!lists_draw_surface[i])
-      {
-        lists_draw_surface[i] = ::glGenLists(1);
-      }
-
-      std::cerr << boost::format("(Re-)Generating list #%1% for surface #%2%"
-                                 " in gl_draw_surface(), ()\n")
-        % lists_draw_surface[i]
-        % i;
-        
-      mw->viewer->qglColor(values_list->color(i));
-
-      if(!direct_draw && lists_draw_surface[i]) // If
-        ::glNewList(lists_draw_surface[i],      // lists_draw_surface[i]==0
-                    values_list->enabled(i)     // then something got wrong
-                    ? GL_COMPILE_AND_EXECUTE    // in the list generation.
-                    : GL_COMPILE);
-
-      if(!mw->labellizedRadioButton->isChecked()) 
-      {
-	gl_draw_surface(m_surface.begin(),
-			m_surface.end(),
-			values_list->item(i));
-      }
-      else 
-      {
-	const unsigned char volume_index = values_list->value(i);
-
-	::glBegin(GL_TRIANGLES);
-	unsigned int counter = 0;
-	for(C2t3::Facet_iterator
-	      fit = c2t3.facets_begin(), end = c2t3.facets_end();
-	    fit != end; ++fit)
-	{
-	  Tr::Cell_handle facet_cell = fit->first;
-	  int facet_index = fit->second;
-	  Tr::Cell_handle opposite_cell = facet_cell->neighbor(facet_index);
-	  int opposite_index = opposite_cell->index(facet_cell);
-
-	  if( facet_cell->info() != volume_index ) {
-	    if( opposite_cell->info() == volume_index ) {
-	      std::swap(facet_cell, opposite_cell);
-	      std::swap(facet_index, opposite_index);
-	    }
-	    else 
-	      continue; // go to next facet
-	  }
-	  const Point& a = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 0))->point();
-	  const Point& b = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 1))->point();
-	  const Point& c = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 2))->point();
-	  Vector n = CGAL::cross_product(b-a,c-a);
-	  n = n / std::sqrt(n*n); // unit normal
-	  if(m_inverse_normals) {
-	    ::glNormal3d(-n.x(),-n.y(),-n.z());
-	  } else {
-	    ::glNormal3d(n.x(),n.y(),n.z());
-	  }
-	  ::glVertex3d(a.x(),a.y(),a.z());
-	  ::glVertex3d(b.x(),b.y(),b.z());
-	  ::glVertex3d(c.x(),c.y(),c.z());
-	  ++counter;
-	}
-	::glEnd();
-	std::cerr << boost::format("(c2t3) number of facets: %1%\n")
-	  % counter;
-      }
-
-      if(!direct_draw && lists_draw_surface[i])
-	                        // If lists_draw_surface[i]==0 then
-      {                         // something got wrong in the list
-        ::glEndList();          // generation.
-      }
-    }
-    lists_draw_surface_is_valid = (::glGetError() == GL_NO_ERROR);
-  }
-}
-
-template <typename Iterator>
-void Volume::gl_draw_surface(Iterator begin, Iterator end, const QTreeWidgetItem* i)
-{
-  ::glBegin(GL_TRIANGLES);
-  unsigned int counter = 0;
-  for(Iterator it = begin; it != end; ++it)
-  {
-    const Facet& f = *it;
-
-    if(f.get<2>() != i) continue;
-
-    const Vector& n = f.get<1>();
-
-    if(m_inverse_normals)
-      ::glNormal3d(-n.x(),-n.y(),-n.z());
-    else
-      ::glNormal3d(n.x(),n.y(),n.z());
-
-    const Triangle_3& t = f.get<0>();
-    const Point& a = t[0];
-    const Point& b = t[1];
-    const Point& c = t[2];
-
-    ::glVertex3d(a.x(),a.y(),a.z());
-    ::glVertex3d(b.x(),b.y(),b.z());
-    ::glVertex3d(c.x(),c.y(),c.z());
-    ++counter;
-  }
-  ::glEnd();
-  std::cerr << boost::format("number of facets: %1%\n")
-    % counter;
-}
-
-void Volume::changed_parameters()
-{
-  m_surface.clear();
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  m_surface_mc.clear();
-#endif
-  list_draw_marching_cube_is_valid = false;
-  lists_draw_surface_is_valid = false;
-  c2t3.clear();
-  del.clear();
-  m_view_mc = m_view_surface = false;
-  emit changed();
-}
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-void Volume::gl_draw_one_marching_cube_vertex(int i)
-{
-  if(!m_inverse_normals)
-    glArrayElement(i);
-  else
-  {
-    const Vertex* const vertex = mc.vert(i);
-    ::glNormal3d(-vertex->nx, -vertex->ny, -vertex->nz);
-    ::glVertex3d(vertex->x, vertex->y, vertex->z);
-  }
-}
-
-void Volume::gl_draw_marchingcube()
-{
-  if(list_draw_marching_cube_is_valid)
-    ::glCallList(list_draw_marching_cube);
-  else
-  {
-    if(!list_draw_marching_cube)
-      list_draw_marching_cube = ::glGenLists(1);
-    std::cerr << boost::format("(Re-)Generating list #%1% for"
-                               " gl_draw_marchingcube()\n")
-      % list_draw_marching_cube;
-
-    if(list_draw_marching_cube)          // If list_draw_marching_cube==0 then
-    ::glNewList(list_draw_marching_cube, // something got wrong in the list
-                GL_COMPILE_AND_EXECUTE); // generation.
-
-    ::glVertexPointer(3, GL_DOUBLE, sizeof(Vertex), mc.vertices());
-    ::glNormalPointer(GL_DOUBLE, sizeof(Vertex), &(mc.vertices()->nx));
-    ::glEnableClientState(GL_VERTEX_ARRAY);
-
-    // because of that conditionnal, the display list has to be
-    // reconstructed each time m_inverse_normals is toggled.
-    if(!m_inverse_normals)
-      ::glEnableClientState(GL_NORMAL_ARRAY);
-
-    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i)
-    {
-      const int begin = i == 0 ? 0 : nbs_of_mc_triangles[i-1];
-      const int end = nbs_of_mc_triangles[i];
-      mw->viewer->qglColor(values_list->color(i));
-      ::glBegin(GL_TRIANGLES);
-      for(int i = begin; i < end; ++i)
-      {
-        const MC_Triangle* const trig = mc.trig(i);
-        gl_draw_one_marching_cube_vertex(trig->v1);
-        gl_draw_one_marching_cube_vertex(trig->v2);
-        gl_draw_one_marching_cube_vertex(trig->v3);
-      }
-      ::glEnd();
-    }
-    if(list_draw_marching_cube > 0) // If list_draw_marching_cube==0 then
-    {                               // something got wrong in the list
-      ::glEndList();                // generation.
-      list_draw_marching_cube_is_valid = (::glGetError() == GL_NO_ERROR);
-    }
-    if(!list_draw_marching_cube_is_valid)
-      std::cerr << boost::format("OpenGL error: %1%\n") 
-        % ::gluErrorString(::glGetError());
-  }
-}
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-
-void Volume::save_image_settings(QString filename)
-{
-  QSettings settings;
-  settings.beginGroup(QUrl::toPercentEncoding(filename));
-  settings.setValue("labellized", mw->labellizedRadioButton->isChecked());
-  settings.endGroup();
-}
-
-void Volume::load_image_settings(QString filename)
-{
-  QSettings settings;
-  settings.beginGroup(QUrl::toPercentEncoding(filename));
-  mw->labellizedRadioButton->setChecked(settings.value("labellized").toBool());
-  settings.endGroup();
-}
-
-void Volume::labellizedToogled(bool toggled)
-{
-  if(toggled) {
-    values_list->setHeaderTitle(tr("Label"));
-  }
-  else {
-    values_list->setHeaderTitle(tr("Iso-Value"));
-  }
-}
-
-#include "volume.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.h b/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.h
deleted file mode 100644
index 4599911..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_mesher/volume.h
+++ /dev/null
@@ -1,367 +0,0 @@
-#ifndef _VOLUME_H
-#define _VOLUME_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Object.h>
-#include <CGAL/Timer.h>
-
-
-#include "surface.h"
-#include "binary_image.h"
-
-#include <boost/multi_array.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-#include <boost/format.hpp>
-
-#include <queue>
-#include <vector>
-#include <iterator> // std::back_inserter
-
-#include <QString>
-#include <QFileInfo>
-
-class QTreeWidgetItem;
-
-// kernel
-// #include <CGAL/Simple_cartesian.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel1;
-
-#include <CGAL/Point_with_psc_localisation.h>
-struct Kernel : public Kernel1 {
-  typedef CGAL::Point_with_psc_localisation<Kernel::Point_3,
-                                            const QTreeWidgetItem*> Point_3;
-};
-
-typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Sphere_3 Sphere;
-typedef Kernel::Vector_3 Vector;
-typedef Kernel::Triangle_3 Triangle_3;
-typedef Kernel::Segment_3 Segment_3;
-
-// typedef CGAL::Triple<Triangle_3,Vector,const QTreeWidgetItem*> Facet;
-
-typedef boost::tuple<Triangle_3,Vector,const QTreeWidgetItem*> Facet;
-
-typedef CBinary_image_3<FT,Point> Binary_image;
-
-class QTreeWidgetItem;
-
-// surface mesher
-// #define CGAL_MESHES_NO_OUTPUT
-#include <CGAL/Surface_mesh_vertex_base_3.h>
-#include <CGAL/Triangulation_cell_base_with_info_3.h>
-#include <CGAL/Surface_mesh_cell_base_3.h>
-#include <CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h>
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>
-#include <CGAL/Surface_mesh_default_criteria_3.h>
-#include <CGAL/Implicit_surface_3.h>
-#include <CGAL/Surface_mesh_traits_generator_3.h>
-typedef CGAL::Surface_mesh_vertex_base_3<Kernel> Vb;
-typedef CGAL::Triangulation_cell_base_with_info_3<unsigned char, Kernel> Cb1;
-typedef CGAL::Surface_mesh_cell_base_3<Kernel, Cb1> Cb2;
-typedef CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<Kernel, Cb2> Cb;
-typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
-typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Tr;
-typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<Tr> C2t3;
-typedef CGAL::Implicit_surface_3<Kernel, Binary_image> Surface_3;
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-#include <mc/MarchingCubes.h>
-#endif
-
-class MainWindow;
-class QDoubleSpinBox;
-class Viewer;
-class Values_list;
-
-class Volume : public Surface
-{
-  Q_OBJECT
-public:
-  Volume(MainWindow* mw);
-  ~Volume() {}
-
-private:
-  Binary_image m_image;
-
-  // options
-  FT m_sm_angle;
-  FT m_sm_radius;
-  FT m_sm_distance;
-  double m_relative_precision;
-
-  // visualization
-  bool m_view_surface;
-  bool m_draw_triangulation;
-  QColor m_triangulation_color;
-  bool m_inverse_normals;
-  bool two_sides;
-  bool draw_triangles_edges;
-  bool use_gouraud;
-  bool show_bbox;
-
-  std::vector<Facet> m_surface;
-  Tr del;            // 3D-Delaunay triangulation
-  C2t3 c2t3;         // 2D complex in 3D triangulation
-
-  MainWindow* mw;
-  QFileInfo fileinfo;
-  Values_list* values_list;
-  QDoubleSpinBox* spinBox_radius_bound;
-  QDoubleSpinBox* spinBox_distance_bound;
-
-  bool direct_draw; // do not use display lists
-  std::vector<GLuint> lists_draw_surface;
-  bool lists_draw_surface_is_valid;
-  GLuint list_draw_marching_cube;
-  bool list_draw_marching_cube_is_valid;
-
-  CGAL::Timer sm_timer;
-  int sm_total_time;
-
-#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-  std::vector<Facet> m_surface_mc;
-  MarchingCubes<unsigned char> mc ;
-  std::vector<int> nbs_of_mc_triangles;
-  std::vector<GLuint> lists_draw_surface_mc;
-  bool lists_draw_surface_mc_is_valid;
-  CGAL::Timer mc_timer;
-  int mc_total_time;
-public:
-  void gl_draw_surface_mc();
-  void gl_draw_marchingcube();
-private:
-  void gl_draw_one_marching_cube_vertex(int);
-
-#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-
-  bool m_view_mc; // that boolean is here even with if
-		  // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
-                  // is not defined.
-public slots:
-void display_marchin_cube();
-
-private:
-  template <typename Iterator>
-  void gl_draw_surface(Iterator begin, Iterator end, const QTreeWidgetItem* = 0);
-
-  template <typename PointsOutputIterator,
-	    typename DomainsOutputIterator,
-	    typename TransformOperator>
-  void search_for_connected_components(PointsOutputIterator,
-				       DomainsOutputIterator, 
-				       TransformOperator);
-
-public:
-  void gl_draw_surface();
-
-signals:
-
-  void new_bounding_box(double, double, double, double, double, double);
-
-public slots:
-  void only_in();
-  void set_inverse_normals(const bool);
-  void set_two_sides(const bool);
-  void set_draw_triangles_edges(const bool);
-  void set_triangulation_edges_color();
-  void set_draw_triangulation(const bool);
-  void set_use_gouraud(const bool);
-  void set_show_bbox(const bool);
-  bool open(const QString& filename);
-#ifdef CGAL_USE_VTK
-  bool open_vtk(const QString& filename);
-#endif
-  bool open_xt(const QString& filename);
-  bool opendir(const QString& dirname);
-  void finish_open();
-  void export_off();
-  void save_image_to_inr();
-  void check_can_export_off();
-  void draw();
-  void get_bbox(float& /*xmin*/, float& /*ymin*/, float& /*zmin*/,
-		float& /*xmax*/, float& /*ymax*/, float& /*zmax*/) {}
-  void close() {}
-  void display_surface_mesher_result();
-  void set_radius_bound(double);
-  void set_distance_bound(double);
-  void changed_parameters();
-
-  void labellizedToogled(bool);
-
-  void save_image_settings(QString);
-  void load_image_settings(QString);
-private:
-  void status_message(QString);
-  void busy() const;
-  void not_busy() const;
-};
-
-template <typename PointsOutputIterator,
-	  typename DomainsOutputIterator,
-	  typename TransformOperator>
-void Volume::search_for_connected_components(PointsOutputIterator it,
-					     DomainsOutputIterator dom_it,
-					     TransformOperator transform)
-{
-  const std::size_t nx = m_image.xdim();
-  const std::size_t ny = m_image.ydim();
-  const std::size_t nz = m_image.zdim();
-
-  const double max_v = (std::max)((std::max)(m_image.vx(),
-                                             m_image.vy()),
-                                  m_image.vz());
-
-  typedef unsigned char Marker;
-  typedef typename TransformOperator::result_type Label;
-
-  boost::multi_array<Marker, 3> visited(boost::extents[nx][ny][nz]);
-  typedef boost::tuple<std::size_t, std::size_t, std::size_t, std::size_t>
-                                Indices;
-  typedef std::queue<Indices>   Indices_queue;
-  typedef std::vector<Indices>  Border_vector;
-
-  int number_of_connected_components = 0;
-  for(std::size_t i=0; i<nx; i++)
-    for(std::size_t j=0; j<ny; j++)
-      for(std::size_t k=0; k<nz; k++)
-      {
-        if(visited[i][j][k]>0)
-          continue;
-        const Label current_label = transform(m_image.value(i, j, k));
-	*dom_it++ = current_label;
-        if(current_label == Label()) {
-          visited[i][j][k] = 3;
-          continue;
-        }
-
-        // if we reach here, (i, j, k) is a new connected component
-        ++number_of_connected_components;
-        std::cerr << boost::format("Found new connected component (#%5%) "
-                                   "at voxel (%1%, %2%, %3%), value=%4%, volume id=%6%\n")
-          % i % j % k
-          % m_image.value(i, j, k) 
-          % number_of_connected_components
-          % (int)current_label;
-
-        int nb_voxels = 0;
-
-        Indices_queue queue;
-        Indices indices(i, j ,k, 0);
-        queue.push(indices);
-
-        Border_vector border;
-
-        /*
-         * First pass is a BFS to retrieve all the connected component, and
-         * its border.
-         * Second pass is a BFS initialized with all voxel of the border.
-         * The last voxel of that BFS is used as the seed.
-         */
-        int pass = 1; // pass will be equal to 2 in second pass
-
-        Indices bbox_min = indices;
-        Indices bbox_max = indices;
-
-        while(!queue.empty()) // walk through the connected component
-        {
-          Indices indices = queue.front();
-          queue.pop();
-
-          // warning: those indices i, j and k are local to the while loop
-          const std::size_t i = boost::get<0>(indices);
-          const std::size_t j = boost::get<1>(indices);
-          const std::size_t k = boost::get<2>(indices);
-          const std::size_t depth = boost::get<3>(indices);
-
-          if(visited[i][j][k] < pass)
-          {
-            visited[i][j][k] = pass;
-            if(pass == 1 )
-            {
-              ++nb_voxels;
-              boost::get<0>(bbox_min) = (std::min)(i, boost::get<0>(bbox_min));
-              boost::get<0>(bbox_max) = (std::max)(i, boost::get<0>(bbox_max));
-              boost::get<1>(bbox_min) = (std::min)(j, boost::get<1>(bbox_min));
-              boost::get<1>(bbox_max) = (std::max)(j, boost::get<1>(bbox_max));
-              boost::get<2>(bbox_min) = (std::min)(k, boost::get<2>(bbox_min));
-              boost::get<2>(bbox_max) = (std::max)(k, boost::get<2>(bbox_max));
-            }
-
-            static const int neighbors_offset[6][3] = { { +1,  0,  0 },
-                                                        { -1,  0,  0 },
-                                                        {  0, +1,  0 },
-                                                        {  0, -1,  0 },
-                                                        {  0,  0, +1 },
-                                                        {  0,  0, -1 } };
-            bool voxel_is_on_border = false;
-
-            // Visit neighbors.
-            // (i_n, j_n, k_n) are indices of neighbors.
-            for(int n = 0; n < 6; ++n)
-            {
-              const ptrdiff_t i_n = i + neighbors_offset[n][0];
-              const ptrdiff_t j_n = j + neighbors_offset[n][1];
-              const ptrdiff_t k_n = k + neighbors_offset[n][2];
-              if(i_n < 0 || i_n >= static_cast<ptrdiff_t>(nx) ||
-                 j_n < 0 || j_n >= static_cast<ptrdiff_t>(ny) ||
-                 k_n < 0 || k_n >= static_cast<ptrdiff_t>(nz))
-              {
-                voxel_is_on_border = true;
-                continue;
-              }
-              else
-              {
-                if(transform(m_image.value(i_n, j_n, k_n)) == current_label)
-                {
-                  if(visited[i_n][j_n][k_n] < pass) {
-                    Indices indices(i_n, j_n, k_n, depth+1);
-                    queue.push(indices);
-                  }
-                }
-                else
-                  voxel_is_on_border = true;
-              }
-            } // end for neighbors
-
-            if(pass == 1 && voxel_is_on_border)
-              border.push_back(indices);
-          } // end if voxel not already visited
-
-          if(queue.empty()) {
-            if(pass == 1)
-            { // End of first pass. Begin second pass with the voxels of
-              // the border.
-              for(typename Border_vector::const_iterator
-                    border_it = border.begin(), border_end = border.end();
-                  border_it != border_end; ++border_it)
-                queue.push(*border_it);
-              pass = 2;
-            }
-            else // end of second pass, return the last visited voxel
-            {
-// 	      if(nb_voxels >= 100)
-	      {
-		*it++ = std::make_pair(m_image.point(i, j, k), (depth+1)*max_v);
-		std::cerr << boost::format("Found seed %5%, which is voxel (%1%, %2%, %3%), value=%4%\n")
-		  % i % j % k %  m_image.value(i, j, k) % m_image.point(i, j, k);
-	      }
-            }
-          } // end if queue.empty()
-        } // end while !queue.empty() (with local indices i, j, k)
-
-        std::cerr << boost::format("There was %1% voxel(s) in that component.\n"
-                                   "The bounding box is (%2% %3% %4%, %5% %6% %7%).\n"
-                                   "%8% voxel(s) on border\n")
-          % nb_voxels
-          % boost::get<0>(bbox_min) % boost::get<1>(bbox_min) % boost::get<2>(bbox_min)
-          % boost::get<0>(bbox_max) % boost::get<1>(bbox_max) % boost::get<2>(bbox_max)
-          % border.size();
-      } // end for i,j,k
-} // end function Volume::search_for_connected_components()
-
-#endif // _VOLUME_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_modeling/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Surface_modeling/CMakeLists.txt
deleted file mode 100644
index d7748ff..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_modeling/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Surface_modeling_demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
-  if (EIGEN3_FOUND)
-    include( ${EIGEN3_USE_FILE} )
-    include( CGAL_CreateSingleSourceCGALProgram )
-
-    include_directories (BEFORE "../../include")
-    create_single_source_cgal_program( "deform_mesh_for_botsch08_format.cpp" )
-
-  else()
-    message(STATUS "NOTICE: This program requires the Eigen library, version 3.2 or later and will not be compiled.")
-  endif()
-else()
-  
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp b/3rdparty/CGAL-4.6/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp
deleted file mode 100644
index 6286c34..0000000
--- a/3rdparty/CGAL-4.6/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Polyhedron_items_with_id_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-// HalfedgeGraph adapters for Polyhedron_3
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/boost/graph/properties_Polyhedron_3.h>
-#include <boost/foreach.hpp>
-// #define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
-#include <CGAL/Surface_mesh_deformation.h>
-
-#include <fstream>
-
-
-typedef CGAL::Simple_cartesian<double>                                   Kernel;
-typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
-
-typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
-typedef boost::graph_traits<Polyhedron>::vertex_iterator        vertex_iterator;
-
-typedef CGAL::Surface_mesh_deformation<Polyhedron,CGAL::Default, CGAL::Default, CGAL::ORIGINAL_ARAP> Surface_mesh_deformation;
-
-int main(int argc,char** argv)
-{
-  if  ( argc!=4){
-    std::cerr <<"Usage " << argv[0] << " input.off input.sel input.def\n";
-    return 1;
-  }
-  Polyhedron mesh;
-  std::ifstream input(argv[1]);
-
-  if ( !input || !(input >> mesh) || mesh.empty() ) {
-    std::cerr<< argv[1] << " is not a valid off file" << std::endl;
-    return 1;
-  }
-  input.close();
-
-  // Init the indices of the halfedges and the vertices.
-  set_halfedgeds_items_id(mesh);
-
-  // Create a deformation object
-  Surface_mesh_deformation deform_mesh(mesh);
-
-  // Definition of the region of interest (use the whole mesh)
-  vertex_iterator vb,ve;
-  boost::tie(vb, ve) = boost::vertices(mesh);
-
-  //the selection is set by a file
-  input.open(argv[2]);
-  std::string line;
-  std::vector<vertex_descriptor> control_vertices;
-  while(getline(input, line))
-  {
-    if (line[0]=='#') continue;
-    if (line[0]=='1') deform_mesh.insert_roi_vertex(*vb);
-    if (line[0]=='2') {
-      deform_mesh.insert_control_vertex(*vb);
-      control_vertices.push_back(*vb);
-    }
-    ++vb;
-    if (vb==ve) break;
-  }
-  input.close();
-
-  std::cout << "Using " << control_vertices.size() << " control vertices\n";
-  // The definition of the ROI and the control vertices is done, call preprocess
-  bool is_matrix_factorization_OK = deform_mesh.preprocess();
-  if(!is_matrix_factorization_OK){
-    std::cerr << "Error in preprocessing, check documentation of preprocess()" << std::endl;
-    return 1;
-  }
-
-  //define the transformation
-  input.open(argv[3]);
-  double m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, hw, sink;
-  getline(input, line); // skip first comment line
-  input >> m00 >> m01 >> m02 >> m03;
-  input >> m10 >> m11 >> m12 >> m13;
-  input >> m20 >> m21 >> m22 >> m23;
-  input >> sink >> sink >> sink >> hw;
-
-  Kernel::Aff_transformation_3 aff(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23);
-  BOOST_FOREACH(vertex_descriptor vd, control_vertices)
-  {
-    Surface_mesh_deformation::Point pos = vd->point().transform(aff);
-    deform_mesh.set_target_position(vd, pos);
-  }
-
-  // Call the function deform() with one-time parameters:
-  deform_mesh.deform(1000, 1e-4);
-
-  // Save the deformed mesh into a file
-  std::ofstream output("deform_res.off");
-  output << mesh;
-  output.close();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Triangulation_2/CMakeLists.txt
deleted file mode 100644
index 20cb6ae..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/CMakeLists.txt
+++ /dev/null
@@ -1,105 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Triangulation_2)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL COMPONENTS Qt4)
-
-include(${CGAL_USE_FILE})
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-
-
-#find_package(Qt4)
-
-include_directories (BEFORE ../../include)
-include_directories (BEFORE ./include)
-include_directories (BEFORE ../../../Number_types/include)
-
-include_directories (BEFORE ../../../Triangulation_2/include)
-
-if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
-
-include(${QT_USE_FILE})
-
-#--------------------------------
-# The "constrained Delaunay" demo: Constrained_Delaunay_triangulation_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( CDT_UI_FILES Constrained_Delaunay_triangulation_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" )
-
-# The executable itself.
-add_executable  ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2 )
-
-# Link with Qt libraries
-target_link_libraries( Constrained_Delaunay_triangulation_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Constrained_Delaunay_triangulation_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
-
-#--------------------------------
-# The "Delaunay" demo: Delaunay_triangulation_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Delaunay_triangulation_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" )
-
-# The executable itself.
-add_executable  ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
-
-# Link with Qt libraries
-target_link_libraries( Delaunay_triangulation_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-#--------------------------------
-# The "Regular" demo: Regular_triangulation_2
-#--------------------------------
-# UI files (Qt Designer files)
-qt4_wrap_ui( DT_UI_FILES Regular_triangulation_2.ui )
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc )
-
-# use the Qt MOC preprocessor on classes that derives from QObject
-qt4_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" )
-
-# The executable itself.
-add_executable  ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
-
-add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 )
-
-# Link with Qt libraries
-target_link_libraries( Regular_triangulation_2 ${QT_LIBRARIES} )
-# Link with CGAL
-target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-
-else()
-
-  message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp
deleted file mode 100644
index f874221..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp
+++ /dev/null
@@ -1,734 +0,0 @@
-//#define CGAL_USE_BOOST_BIMAP
-
-#include <fstream>
-#include <vector>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Delaunay_mesher_2.h>
-#include <CGAL/Delaunay_mesh_face_base_2.h>
-#include <CGAL/Delaunay_mesh_size_criteria_2.h>
-#include <CGAL/Lipschitz_sizing_field_2.h>
-#include <CGAL/Lipschitz_sizing_field_criteria_2.h>
-#include <CGAL/Triangulation_conformer_2.h>
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/Timer.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QDragEnterEvent>
-#include <QDropEvent>
-
-// GraphicsView items and event filters (input classes)
-#include "TriangulationCircumcircle.h"
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-
-// the two base classes
-#include "ui_Constrained_Delaunay_triangulation_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-// for viewportsBbox(QGraphicsScene*)
-#include <CGAL/Qt/utility.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Segment_2 Segment_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-typedef CGAL::Triangulation_vertex_base_2<K>  Vertex_base;
-typedef CGAL::Constrained_triangulation_face_base_2<K> Face_base;
-
-template <class Gt,
-          class Fb >
-class Enriched_face_base_2 : public Fb {
-public:
-  typedef Gt Geom_traits;
-  typedef typename Fb::Vertex_handle Vertex_handle;
-  typedef typename Fb::Face_handle Face_handle;
-
-  template < typename TDS2 >
-  struct Rebind_TDS {
-    typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
-    typedef Enriched_face_base_2<Gt,Fb2> Other;
-  };
-
-protected:
-  int status;
-
-public:
-  Enriched_face_base_2(): Fb(), status(-1) {};
-
-  Enriched_face_base_2(Vertex_handle v0, 
-		       Vertex_handle v1, 
-		       Vertex_handle v2)
-    : Fb(v0,v1,v2), status(-1) {};
-
-  Enriched_face_base_2(Vertex_handle v0, 
-		       Vertex_handle v1, 
-		       Vertex_handle v2,
-		       Face_handle n0, 
-		       Face_handle n1, 
-		       Face_handle n2)
-    : Fb(v0,v1,v2,n0,n1,n2), status(-1) {};
-
-  inline
-  bool is_in_domain() const { return (status%2 == 1); };
-
-  inline
-  void set_in_domain(const bool b) { status = (b ? 1 : 0); };
-
-  inline 
-  void set_counter(int i) { status = i; };
-
-  inline 
-  int counter() const { return status; };
-
-  inline 
-  int& counter() { return status; };
-}; // end class Enriched_face_base_2
-
-typedef Enriched_face_base_2<K, Face_base> Fb;
-typedef CGAL::Triangulation_data_structure_2<Vertex_base, Fb>  TDS;
-typedef CGAL::Exact_predicates_tag              Itag;
-typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
-typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
-
-typedef CGAL::Lipschitz_sizing_field_2<K> Lipschitz_sizing_field;
-typedef CGAL::Lipschitz_sizing_field_criteria_2<CDT, Lipschitz_sizing_field> Lipschitz_criteria;
-typedef CGAL::Delaunay_mesher_2<CDT, Lipschitz_criteria> Lipschitz_mesher;
-
-typedef CDT::Vertex_handle Vertex_handle;
-typedef CDT::Face_handle Face_handle;
-typedef CDT::All_faces_iterator All_faces_iterator;
-
-
-void
-initializeID(const CDT& ct)
-{
-  for(All_faces_iterator it = ct.all_faces_begin(); it != ct.all_faces_end(); ++it){
-    it->set_counter(-1);
-  }
-}
-
-
-void 
-discoverComponent(const CDT & ct, 
-		  Face_handle start, 
-		  int index, 
-		  std::list<CDT::Edge>& border )
-{
-  if(start->counter() != -1){
-    return;
-  }
-  std::list<Face_handle> queue;
-  queue.push_back(start);
-
-  while(! queue.empty()){
-    Face_handle fh = queue.front();
-    queue.pop_front();
-    if(fh->counter() == -1){
-      fh->counter() = index;
-      fh->set_in_domain(index%2 == 1);
-      for(int i = 0; i < 3; i++){
-	CDT::Edge e(fh,i);
-	Face_handle n = fh->neighbor(i);
-	if(n->counter() == -1){
-	  if(ct.is_constrained(e)){
-	    border.push_back(e);
-	  } else {
-	    queue.push_back(n);
-	  }
-	}
-	
-      }
-    }
-  }
-}
-
-void 
-discoverComponents(const CDT & ct)
-{
-  if (ct.dimension()!=2) return;
-  int index = 0;
-  std::list<CDT::Edge> border;
-  discoverComponent(ct, ct.infinite_face(), index++, border);
-  while(! border.empty()){
-    CDT::Edge e = border.front();
-    border.pop_front();
-    Face_handle n = e.first->neighbor(e.second);
-    if(n->counter() == -1){
-      discoverComponent(ct, n, e.first->counter()+1, border);
-    }
-  }
-} 
-
-
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Constrained_Delaunay_triangulation_2
-{
-  Q_OBJECT
-  
-private:  
-  CDT cdt; 
-  QGraphicsScene scene;
-  std::list<Point_2> seeds;
-
-  CGAL::Qt::DelaunayMeshTriangulationGraphicsItem<CDT> * dgi;
-
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-  CGAL::Qt::TriangulationCircumcircle<CDT> *tcc;
-public:
-  MainWindow();
-
-private:
-  template <typename Iterator> 
-  void insert_polyline(Iterator b, Iterator e)
-  {
-    Point_2 p, q;
-    CDT::Vertex_handle vh, wh;
-    Iterator it = b;
-    vh = cdt.insert(*it);
-    p = *it;
-    ++it;
-    for(; it != e; ++it){
-      q = *it;
-      if(p != q){
-        wh = cdt.insert(*it);
-        cdt.insert_constraint(vh,wh);
-        vh = wh;
-        p = q;
-      } else {
-        std::cout << "duplicate point: " << p << std::endl; 
-      }
-    }
-    emit(changed());
-  }
-
-public slots:
-  void open(QString);
-
-  void processInput(CGAL::Object o);
-
-  void on_actionShowDelaunay_toggled(bool checked);
-
-  void on_actionShow_constrained_edges_toggled(bool checked);
-
-  void on_actionShow_faces_in_domain_toggled(bool checked);
-
-  void on_actionInsertPolyline_toggled(bool checked);
-  
-  void on_actionCircumcenter_toggled(bool checked);
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  void on_actionLoadConstraints_triggered();
-
-  void loadFile(QString);
-
-  void loadPolygonConstraints(QString);
-
-  void loadEdgConstraints(QString);
-
-  void on_actionSaveConstraints_triggered();
-
-  void saveConstraints(QString);
-
-  void on_actionMakeGabrielConform_triggered();
-
-  void on_actionMakeDelaunayConform_triggered();
-
-  void on_actionMakeDelaunayMesh_triggered();
-
-  void on_actionMakeLipschitzDelaunayMesh_triggered();
-
-  void on_actionInsertRandomPoints_triggered();
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  // Add a GraphicItem for the CDT triangulation
-  dgi = new CGAL::Qt::DelaunayMeshTriangulationGraphicsItem<CDT>(&cdt);
-  QColor facesColor(::Qt::blue);
-  facesColor.setAlpha(150);
-  dgi->setFacesInDomainBrush(facesColor);
-    
-  QObject::connect(this, SIGNAL(changed()),
-		   dgi, SLOT(modelChanged()));
-
-  dgi->verticesPen().setColor(Qt::black);
-  dgi->edgesPen().setColor(QColor("#333333"));
-  dgi->constraintsPen().setColor(QColor("#000080"));
-  dgi->setZValue(-1);
-  scene.addItem(dgi);
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true); // inputs polylines which are not closed
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-    
-
-  tcc = new CGAL::Qt::TriangulationCircumcircle<CDT>(&scene, &cdt, this);
-  tcc->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPolyline);
-
-  // Check two actions 
-  this->actionInsertPolyline->setChecked(true);
-  this->actionShowDelaunay->setChecked(true);
-  this->actionShow_faces_in_domain->setChecked(true);
-  this->actionShow_constrained_edges->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Constrained_Delaunay_triangulation_2.html");
-  this->addAboutCGAL();
-  this->setupExportSVG(this->actionExport_SVG, this->graphicsView);
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-
-  std::list<Point_2> points;
-  if(CGAL::assign(points, o)){
-    if(points.size() == 1) {
-      cdt.insert(points.front());
-    }
-    else {
-      /*
-      std::cout.precision(12);
-      std::cout << points.size() << std::endl;
-      for( std::list<Point_2>::iterator it =  points.begin(); it != points.end(); ++it){
-	std::cout << *it << std::endl;
-      }
-      */
-      insert_polyline(points.begin(), points.end());
-    }
-  }
-
-
-  initializeID(cdt);
-  discoverComponents(cdt);
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPolyline_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pi);
-  } else {
-    scene.removeEventFilter(pi);
-  }
-}
-
-
-void
-MainWindow::on_actionShowDelaunay_toggled(bool checked)
-{
-  dgi->setVisibleEdges(checked);
-  update();
-}
-
-void
-MainWindow::on_actionShow_constrained_edges_toggled(bool checked)
-{
-  dgi->setVisibleConstraints(checked);
-  update();
-}
-
-void
-MainWindow::on_actionShow_faces_in_domain_toggled(bool checked)
-{
-  dgi->setVisibleFacesInDomain(checked);
-  update();
-}
-
-void
-MainWindow::on_actionCircumcenter_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(tcc);
-    tcc->show();
-  } else {  
-    scene.removeEventFilter(tcc);
-    tcc->hide();
-  }
-}
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  cdt.clear();
-  emit(changed());
-}
-
-
-void 
-MainWindow::open(QString fileName)
-{
-  if(! fileName.isEmpty()){
-    if(fileName.endsWith(".cgal")){
-      loadFile(fileName);
-      this->addToRecentFiles(fileName);
-    } else if(fileName.endsWith(".plg")){
-      loadPolygonConstraints(fileName);
-      this->addToRecentFiles(fileName);
-    } else if(fileName.endsWith(".edg")){
-      loadEdgConstraints(fileName);
-      this->addToRecentFiles(fileName);
-    }
-  }
-}
-
-void
-MainWindow::on_actionLoadConstraints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Constraint File"),
-						  ".",
-						  tr("Edge files (*.edg);;"
-						     "Poly files (*.plg)"));
-  open(fileName);
-}
-
-void
-MainWindow::loadFile(QString fileName)
-{
-  std::ifstream ifs(qPrintable(fileName));
-  ifs >> cdt;
-  if(!ifs) abort();
-  initializeID(cdt);
-  discoverComponents(cdt);
-  emit(changed());
-  actionRecenter->trigger();
-}
-
-void
-MainWindow::loadPolygonConstraints(QString fileName)
-{
-  K::Point_2 p,q, first;
-  CDT::Vertex_handle vp, vq, vfirst;
-  std::ifstream ifs(qPrintable(fileName));
-  int n;
-  // int counter = 0;
-  while(ifs >> n){
-    int poly_size = n;
-    ifs >> first;
-    p = first;
-    vfirst = vp = cdt.insert(p);
-    n--;
-    while(n--){
-      ifs >> q;
-      vq = cdt.insert(q, vp->face());
-      if(vp != vq) {
-        cdt.insert_constraint(vp,vq);
-        // std::cerr << "inserted constraint #" << counter++ << std::endl;
-      }
-      p = q;
-      vp = vq;
-    }
-    if(poly_size != 2 && vp != vfirst) {
-      cdt.insert_constraint(vp, vfirst);
-    }
-  }
-  
-  
-  initializeID(cdt);
-  discoverComponents(cdt);
-  emit(changed());
-  actionRecenter->trigger();
-}
-
-
-void
-MainWindow::loadEdgConstraints(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  CGAL::Timer tim;
-  tim.start();
-  std::ifstream ifs(qPrintable(fileName));
-  bool first=true;
-  int n;
-  ifs >> n;
-  
-  K::Point_2 p,q, qold;
-
-  CDT::Vertex_handle vp, vq, vqold;
-  while(ifs >> p) {
-    ifs >> q;
-    if(p == q){
-      continue;
-    }
-    if((!first) && (p == qold)){
-      vp = vqold;
-    } else {
-      vp = cdt.insert(p);
-    }
-    vq = cdt.insert(q, vp->face());
-    if(vp != vq) {
-      cdt.insert_constraint(vp,vq);
-    }
-    qold = q;
-    vqold = vq;
-    first = false;
-  }
-
-
-  tim.stop();
-  statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
-  initializeID(cdt);
-  discoverComponents(cdt);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-  actionRecenter->trigger();
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(dgi->boundingRect());
-  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-void
-MainWindow::on_actionSaveConstraints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save Constraints"),
-						  ".",
-						  tr("Poly files (*.poly)\n"
-						     "Edge files (*.edg)"));
-  if(! fileName.isEmpty()){
-    saveConstraints(fileName);
-  }
-}
-
-
-void
-MainWindow::saveConstraints(QString fileName)
-{
-  std::ofstream output(qPrintable(fileName));
-  if (output) output << cdt;
-}
-
-
-void
-MainWindow::on_actionMakeGabrielConform_triggered()
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::size_t nv = cdt.number_of_vertices();
-  CGAL::make_conforming_Gabriel_2(cdt);
-  nv = cdt.number_of_vertices() - nv;
-  initializeID(cdt);
-  discoverComponents(cdt);
-  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionMakeDelaunayConform_triggered()
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::size_t nv = cdt.number_of_vertices();
-  CGAL::make_conforming_Delaunay_2(cdt);
-  initializeID(cdt);
-  discoverComponents(cdt);
-  nv = cdt.number_of_vertices() - nv;
-  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
-   // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionMakeDelaunayMesh_triggered()
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  double edge_length = 0;
-  CGAL::Timer timer;
-  timer.start();
-  initializeID(cdt);
-  discoverComponents(cdt);
-
-  std::size_t nv = cdt.number_of_vertices();
-  CGAL::refine_Delaunay_mesh_2(cdt, Criteria(0.125, edge_length), true);
-  timer.stop();
-  nv = cdt.number_of_vertices() - nv;
-  initializeID(cdt);
-  discoverComponents(cdt);
-  statusBar()->showMessage(QString("Added %1 vertices in %2 seconds").arg(nv).arg(timer.time()), 2000);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-
-}
-
-void
-MainWindow::on_actionMakeLipschitzDelaunayMesh_triggered()
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::set<Point_2> points;
-  for(CDT::Finite_edges_iterator it = cdt.finite_edges_begin();
-      it != cdt.finite_edges_end();
-      ++it){
-    if(cdt.is_constrained(*it)){
-      Segment_2 s = cdt.segment(*it);
-      points.insert(s.source());
-      points.insert(s.target());
-    }
-  }
-
-  initializeID(cdt);
-  discoverComponents(cdt);
-
-  std::size_t nv = cdt.number_of_vertices();
-  Lipschitz_sizing_field field(points.begin(), points.end(), 0.7 ); // k-lipschitz with k=1
-  Lipschitz_criteria criteria(0.125, &field);
-  Lipschitz_mesher mesher(cdt);
-  mesher.set_criteria(criteria);
-  mesher.init(true);
-  //  mesher.set_seeds(m_seeds.begin(),m_seeds.end(),false);
-  mesher.refine_mesh();
-  nv = cdt.number_of_vertices() - nv;
-  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::vector<Point_2> points;
-  points.reserve(number_of_points);
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(*pg++);
-  }
-  cdt.insert(points.begin(), points.end());
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-#include "Constrained_Delaunay_triangulation_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Constrained_Delaunay_triangulation_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-
-  QStringList args = app.arguments();
-  args.removeAt(0);
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui b/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui
deleted file mode 100644
index 0e3cc20..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui
+++ /dev/null
@@ -1,334 +0,0 @@
-<ui version="4.0" >
- <author>GeometryFactory</author>
- <class>Constrained_Delaunay_triangulation_2</class>
- <widget class="QMainWindow" name="Constrained_Delaunay_triangulation_2" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>600</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>CGAL Constrained Delaunay Triangulation</string>
-  </property>
-  <property name="windowIcon" >
-   <iconset resource="../resources/CGAL.qrc" >
-    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" >
-    <item row="0" column="0" >
-     <widget class="QGraphicsView" name="graphicsView" >
-      <property name="focusPolicy" >
-       <enum>Qt::StrongFocus</enum>
-      </property>
-      <property name="verticalScrollBarPolicy" >
-       <enum>Qt::ScrollBarAlwaysOn</enum>
-      </property>
-      <property name="horizontalScrollBarPolicy" >
-       <enum>Qt::ScrollBarAlwaysOn</enum>
-      </property>
-      <property name="transformationAnchor" >
-       <enum>QGraphicsView::NoAnchor</enum>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QToolBar" name="fileToolBar" >
-   <property name="windowTitle" >
-    <string>File Tools</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionClear" />
-   <addaction name="actionLoadConstraints" />
-   <addaction name="actionSaveConstraints" />
-  </widget>
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
-    <string>Visualization Tools</string>
-   </property>
-   <attribute name="toolBarArea" >
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak" >
-    <bool>false</bool>
-   </attribute>
-   <addaction name="actionInsertPolyline" />
-   <addaction name="separator" />
-   <addaction name="actionShowDelaunay" />
-   <addaction name="actionShow_constrained_edges" />
-   <addaction name="actionShowVoronoi" />
-   <addaction name="actionShow_faces_in_domain" />
-   <addaction name="actionCircumcenter" />
-   <addaction name="separator" />
-   <addaction name="actionRecenter" />
-  </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>19</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuFile" >
-    <property name="title" >
-     <string>&File</string>
-    </property>
-    <addaction name="separator" />
-    <addaction name="actionClear" />
-    <addaction name="actionLoadConstraints" />
-    <addaction name="actionSaveConstraints" />
-    <addaction name="actionExport_SVG"/>
-    <addaction name="separator" />
-    <addaction name="actionQuit" />
-   </widget>
-   <widget class="QMenu" name="menuEdit" >
-    <property name="title" >
-     <string>&Edit</string>
-    </property>
-    <addaction name="actionInsertRandomPoints" />
-   </widget>
-   <widget class="QMenu" name="menuTools" >
-    <property name="title" >
-     <string>&Tools</string>
-    </property>
-    <addaction name="actionInsertPolyline" />
-    <addaction name="separator" />
-    <addaction name="actionShowDelaunay" />
-    <addaction name="actionShowVoronoi" />
-    <addaction name="actionShow_constrained_edges" />
-    <addaction name="actionShow_faces_in_domain" />
-    <addaction name="actionCircumcenter" />
-    <addaction name="separator" />
-    <addaction name="actionRecenter" />
-    <addaction name="actionMakeGabrielConform" />
-    <addaction name="actionMakeDelaunayConform" />
-    <addaction name="actionMakeDelaunayMesh" />
-    <addaction name="actionMakeLipschitzDelaunayMesh" />
-   </widget>
-   <addaction name="menuFile" />
-   <addaction name="menuEdit" />
-   <addaction name="menuTools" />
-  </widget>
-  <action name="actionAbout" >
-   <property name="text" >
-    <string>&About</string>
-   </property>
-  </action>
-  <action name="actionAboutCGAL" >
-   <property name="text" >
-    <string>About &CGAL</string>
-   </property>
-  </action>
-  <action name="actionQuit" >
-   <property name="text" >
-    <string>&Quit</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+Q</string>
-   </property>
-  </action>
-  <action name="actionInsertRandomPoints" >
-   <property name="text" >
-    <string>&Insert random points</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+I</string>
-   </property>
-  </action>
-  <action name="actionInsertPolyline" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../icons/Input.qrc" >
-     <normaloff>:/cgal/Input/inputPolyline.png</normaloff>:/cgal/Input/inputPolyline.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Insert Polyline</string>
-   </property>
-   <property name="toolTip" >
-    <string>Insert Point or Polyline</string>
-   </property>
-   <property name="statusTip" >
-    <string>Left: Insert vtx | Right: Final vtx | Del: Delete vtx</string>
-   </property>
-  </action>
-  <action name="actionClear" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileNew.png</normaloff>:/cgal/fileToolbar/fileNew.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Clear</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+C</string>
-   </property>
-  </action>
-  <action name="actionShowVoronoi" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="checked" >
-    <bool>false</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="../icons/Triangulation_2.qrc" >
-     <normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &Voronoi Diagram</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+V</string>
-   </property>
-   <property name="visible" >
-    <bool>false</bool>
-   </property>
-  </action>
-  <action name="actionShowDelaunay" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Constrained_Delaunay_triangulation_2.qrc" >
-     <normaloff>:/cgal/Actions/icons/constrained_triangulation.png</normaloff>:/cgal/Actions/icons/constrained_triangulation.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &triangulation</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+T</string>
-   </property>
-  </action>
-  <action name="actionLoadConstraints" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileOpen.png</normaloff>:/cgal/fileToolbar/fileOpen.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Load...</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+L</string>
-   </property>
-  </action>
-  <action name="actionSaveConstraints" >
-   <property name="icon" >
-    <iconset resource="../icons/File.qrc" >
-     <normaloff>:/cgal/fileToolbar/fileSave.png</normaloff>:/cgal/fileToolbar/fileSave.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Save...</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+S</string>
-   </property>
-  </action>
-  <action name="actionCircumcenter" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Constrained_Delaunay_triangulation_2.qrc" >
-     <normaloff>:/cgal/Actions/icons/circumcenter.png</normaloff>:/cgal/Actions/icons/circumcenter.png</iconset>
-   </property>
-   <property name="text" >
-    <string>&Circumcenter</string>
-   </property>
-   <property name="toolTip" >
-    <string>Draw circumcenter</string>
-   </property>
-  </action>
-  <action name="actionRecenter" >
-   <property name="icon" >
-    <iconset resource="../icons/Input.qrc" >
-     <normaloff>:/cgal/Input/zoom-best-fit</normaloff>:/cgal/Input/zoom-best-fit</iconset>
-   </property>
-   <property name="text" >
-    <string>Re&center the viewport</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+R</string>
-   </property>
-  </action>
-  <action name="actionMakeGabrielConform" >
-   <property name="text" >
-    <string>Make Gabriel conform</string>
-   </property>
-  </action>
-  <action name="actionMakeDelaunayConform" >
-   <property name="text" >
-    <string>Make Delaunay conform</string>
-   </property>
-  </action>
-  <action name="actionMakeDelaunayMesh" >
-   <property name="text" >
-    <string>Make Delaunay mesh</string>
-   </property>
-  </action>
-  <action name="actionMakeLipschitzDelaunayMesh" >
-   <property name="text" >
-    <string>Make Lipschitz Delaunay mesh</string>
-   </property>
-  </action>
-  <action name="actionShow_constrained_edges" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Constrained_Delaunay_triangulation_2.qrc" >
-     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &constrained edges</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+C</string>
-   </property>
-  </action>
-  <action name="actionShow_faces_in_domain" >
-   <property name="checkable" >
-    <bool>true</bool>
-   </property>
-   <property name="icon" >
-    <iconset resource="Constrained_Delaunay_triangulation_2.qrc" >
-     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_in_domain.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_in_domain.png</iconset>
-   </property>
-   <property name="text" >
-    <string>Show &faces in domain</string>
-   </property>
-   <property name="shortcut" >
-    <string>Ctrl+F</string>
-   </property>
-  </action>
-  <action name="actionExport_SVG">
-   <property name="text">
-    <string>&Export SVG...</string>
-   </property>
-  </action>
- </widget>
- <resources>
-  <include location="Constrained_Delaunay_triangulation_2.qrc" />
-  <include location="../icons/File.qrc" />
-  <include location="../resources/CGAL.qrc" />
-  <include location="../icons/Triangulation_2.qrc" />
-  <include location="../icons/Input.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.cpp
deleted file mode 100644
index 014f53e..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.cpp
+++ /dev/null
@@ -1,400 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-
-#include <CGAL/point_generators_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-#include "TriangulationCircumcircle.h"
-#include "TriangulationMovingPoint.h"
-#include "TriangulationConflictZone.h"
-#include "TriangulationRemoveVertex.h"
-#include "TriangulationPointInputAndConflictZone.h"
-#include <CGAL/Qt/TriangulationGraphicsItem.h>
-#include <CGAL/Qt/VoronoiGraphicsItem.h>
-
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-  
-// the two base classes
-#include "ui_Delaunay_triangulation_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Delaunay_triangulation_2
-{
-  Q_OBJECT
-  
-private:  
-  Delaunay dt; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::TriangulationGraphicsItem<Delaunay> * dgi;
-  CGAL::Qt::VoronoiGraphicsItem<Delaunay> * vgi;
-
-  CGAL::Qt::TriangulationMovingPoint<Delaunay> * mp;
-  CGAL::Qt::TriangulationConflictZone<Delaunay> * cz;
-  CGAL::Qt::TriangulationRemoveVertex<Delaunay> * trv;
-  CGAL::Qt::TriangulationPointInputAndConflictZone<Delaunay> * pi;
-  CGAL::Qt::TriangulationCircumcircle<Delaunay> *tcc;
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionMovingPoint_toggled(bool checked);
-
-  void on_actionShowConflictZone_toggled(bool checked);
-
-  void on_actionCircumcenter_toggled(bool checked);
-
-  void on_actionShowDelaunay_toggled(bool checked);
-
-  void on_actionShowVoronoi_toggled(bool checked);
-
-  void on_actionInsertPoint_toggled(bool checked);
-  
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-  virtual void open(QString fileName);
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  this->graphicsView->setAcceptDrops(false);
-
-  // Add a GraphicItem for the Delaunay triangulation
-  dgi = new CGAL::Qt::TriangulationGraphicsItem<Delaunay>(&dt);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   dgi, SLOT(modelChanged()));
-
-  dgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(dgi);
-
-  // Add a GraphicItem for the Voronoi diagram
-  vgi = new CGAL::Qt::VoronoiGraphicsItem<Delaunay>(&dt);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   vgi, SLOT(modelChanged()));
-
-  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(vgi);
-  vgi->hide();
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Delaunay>(&scene, &dt, this );
-
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  mp = new CGAL::Qt::TriangulationMovingPoint<Delaunay>(&dt, this);
-  // TriangulationMovingPoint<Delaunay> emits a modelChanged() signal each
-  // time the moving point moves.
-  // The following connection is for the purpose of emitting changed().
-  QObject::connect(mp, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  trv = new CGAL::Qt::TriangulationRemoveVertex<Delaunay>(&dt, this);
-  QObject::connect(trv, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  tcc = new CGAL::Qt::TriangulationCircumcircle<Delaunay>(&scene, &dt, this);
-  tcc->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-
-  cz = new CGAL::Qt::TriangulationConflictZone<Delaunay>(&scene, &dt, this);
-
-  // 
-  // Manual handling of actions
-  //
-
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPoint);
-  ag->addAction(this->actionMovingPoint);
-  ag->addAction(this->actionCircumcenter);
-  ag->addAction(this->actionShowConflictZone);
-
-  // Check two actions 
-  this->actionInsertPoint->setChecked(true);
-  this->actionShowDelaunay->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Delaunay_triangulation_2.html");
-  this->addAboutCGAL();
-  this->setupExportSVG(actionExport_SVG, graphicsView);
-
-  this->addRecentFiles(this->menuFile, this->actionQuit);
-  connect(this, SIGNAL(openRecentFile(QString)),
-	  this, SLOT(open(QString)));
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  Point_2 p;
-  if(CGAL::assign(p, o)){
-    dt.insert(p);
-  }
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPoint_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pi);
-    scene.installEventFilter(trv);
-  } else {
-    scene.removeEventFilter(pi);
-    scene.removeEventFilter(trv);
-  }
-}
-
-
-void
-MainWindow::on_actionMovingPoint_toggled(bool checked)
-{
-
-  if(checked){
-    scene.installEventFilter(mp);
-  } else {
-    scene.removeEventFilter(mp);
-  }
-}
-
-
-void
-MainWindow::on_actionShowConflictZone_toggled(bool checked)
-{
-
-  if(checked){
-    scene.installEventFilter(cz);
-  } else {
-    scene.removeEventFilter(cz);
-  }
-}
-
-void
-MainWindow::on_actionCircumcenter_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(tcc);
-    tcc->show();
-  } else {  
-    scene.removeEventFilter(tcc);
-    tcc->hide();
-  }
-}
-
-
-void
-MainWindow::on_actionShowDelaunay_toggled(bool checked)
-{
-  dgi->setVisibleEdges(checked);
-}
-
-
-void
-MainWindow::on_actionShowVoronoi_toggled(bool checked)
-{
-  vgi->setVisible(checked);
-}
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  dt.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;  
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  bool ok = false;
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"),
-			     100,
-			     0,
-			     (std::numeric_limits<int>::max)(),
-			     1,
-			     &ok);
-
-  if(!ok) {
-    return;
-  }
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::vector<Point_2> points;
-  points.reserve(number_of_points);
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(*pg++);
-  }
-  dt.insert(points.begin(), points.end());
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    open(fileName);
-  }
-}
-
-
-void
-MainWindow::open(QString fileName)
-{
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::ifstream ifs(qPrintable(fileName));
-  
-  K::Point_2 p;
-  std::vector<K::Point_2> points;
-  while(ifs >> p) {
-    // ignore whatever comes after x and y
-    ifs.ignore((std::numeric_limits<std::streamsize>::max)(), '\n'); 
-    points.push_back(p);
-  }
-  dt.insert(points.begin(), points.end());
-
-  // default cursor
-  QApplication::restoreOverrideCursor();
-  this->addToRecentFiles(fileName);
-  actionRecenter->trigger();
-  emit(changed());
-    
-}
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    for(Delaunay::Finite_vertices_iterator 
-          vit = dt.finite_vertices_begin(),
-          end = dt.finite_vertices_end();
-        vit!= end; ++vit)
-    {
-      ofs << vit->point() << std::endl;
-    }
-  }
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(dgi->boundingRect());
-  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Delaunay_triangulation_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Delaunay_triangulation_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-
-  QStringList args = app.arguments();
-  args.removeAt(0);
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/RegularTriangulationRemoveVertex.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/RegularTriangulationRemoveVertex.h
deleted file mode 100644
index 2afff7e..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/RegularTriangulationRemoveVertex.h
+++ /dev/null
@@ -1,80 +0,0 @@
-
-#ifndef CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
-#define CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-#include <CGAL/Qt/Converter.h>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class RegularTriangulationRemoveVertex : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Vertex_handle Vertex_handle;
-
-  RegularTriangulationRemoveVertex(DT  * dt_, QObject* parent);
-
-protected:
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
- 
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  DT * dt;
-};
-
-
-template <typename T>
-RegularTriangulationRemoveVertex<T>::RegularTriangulationRemoveVertex(T * dt_,
-							  QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_)
-{}
-
-
-
-template <typename T>
-void 
-RegularTriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if((event->modifiers()  & ::Qt::ShiftModifier)
-     && (! (event->modifiers() & ::Qt::ControlModifier))){
-    if(dt->number_of_vertices() == 0){
-      dt->clear();
-    }else {
-      typedef typename Kernel_traits<typename T::Bare_point>::Kernel K;
-      Converter<K> convert;
-      typename T::Vertex_handle selected_vertex = dt->nearest_power_vertex(convert(event->scenePos()));
-      dt->remove(selected_vertex);
-    }
-    emit (modelChanged());
-  }
-}
-
-
-
-template <typename T>
-bool 
-RegularTriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return false;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.cpp
deleted file mode 100644
index 8c9ee55..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-#include <fstream>
-
-// CGAL headers
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
-#include <CGAL/Regular_triangulation_2.h>
-
-#include <CGAL/point_generators_2.h>
-
-// Qt headers
-#include <QtGui>
-#include <QString>
-#include <QActionGroup>
-#include <QFileDialog>
-#include <QInputDialog>
-
-// GraphicsView items and event filters (input classes)
-
-#include "RegularTriangulationRemoveVertex.h"
-#include <CGAL/Qt/GraphicsViewCircleInput.h>
-#include <CGAL/Qt/RegularTriangulationGraphicsItem.h>
-#include <CGAL/Qt/PowerdiagramGraphicsItem.h>
-  
-// for viewportsBbox
-#include <CGAL/Qt/utility.h>
-// the two base classes
-#include "ui_Regular_triangulation_2.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_2 Point_2;
-typedef K::Point_2 Circle_2;
-typedef K::Iso_rectangle_2 Iso_rectangle_2;
-
-typedef double Weight;
-typedef CGAL::Regular_triangulation_euclidean_traits_2<K,Weight>  Gt;
-typedef CGAL::Regular_triangulation_2<Gt> Regular;
-
-class MainWindow :
-  public CGAL::Qt::DemosMainWindow,
-  public Ui::Regular_triangulation_2
-{
-  Q_OBJECT
-  
-private:  
-  Regular dt; 
-  QGraphicsScene scene;  
-
-  CGAL::Qt::RegularTriangulationGraphicsItem<Regular> * dgi;
-  CGAL::Qt::PowerdiagramGraphicsItem<Regular> * vgi;
-
-  CGAL::Qt::RegularTriangulationRemoveVertex<Regular> * trv;
-  CGAL::Qt::GraphicsViewCircleInput<K> * pi;
-public:
-  MainWindow();
-
-public slots:
-
-  void processInput(CGAL::Object o);
-
-  void on_actionShowRegular_toggled(bool checked);
-
-  void on_actionShowPowerdiagram_toggled(bool checked);
-
-  void on_actionInsertPoint_toggled(bool checked);
-  
-  void on_actionInsertRandomPoints_triggered();
-
-  void on_actionLoadPoints_triggered();
-
-  void on_actionSavePoints_triggered();
-
-  void on_actionClear_triggered();
-
-  void on_actionRecenter_triggered();
-
-
-signals:
-  void changed();
-};
-
-
-MainWindow::MainWindow()
-  : DemosMainWindow()
-{
-  setupUi(this);
-
-  // Add a GraphicItem for the Regular triangulation
-  dgi = new CGAL::Qt::RegularTriangulationGraphicsItem<Regular>(&dt);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   dgi, SLOT(modelChanged()));
-
-  dgi->setVerticesPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(dgi);
-
-  // Add a GraphicItem for the Powerdiagram diagram
-  vgi = new CGAL::Qt::PowerdiagramGraphicsItem<Regular>(&dt);
-
-  QObject::connect(this, SIGNAL(changed()),
-		   vgi, SLOT(modelChanged()));
-
-  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
-  scene.addItem(vgi);
-  vgi->hide();
-
-  // Setup input handlers. They get events before the scene gets them
-  // and the input they generate is passed to the triangulation with 
-  // the signal/slot mechanism    
-  pi = new CGAL::Qt::GraphicsViewCircleInput<K>(this, &scene, 1); // emits center/radius
-                                                                           
-
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  trv = new CGAL::Qt::RegularTriangulationRemoveVertex<Regular>(&dt, this);
-  QObject::connect(trv, SIGNAL(modelChanged()),
-		   this, SIGNAL(changed()));
-
-  // 
-  // Manual handling of actions
-  //
-  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
-		   this, SLOT(close()));
-
-  // We put mutually exclusive actions in an QActionGroup
-  QActionGroup* ag = new QActionGroup(this);
-  ag->addAction(this->actionInsertPoint);
-
-  // Check two actions 
-  this->actionInsertPoint->setChecked(true);
-  this->actionShowRegular->setChecked(true);
-
-  //
-  // Setup the scene and the view
-  //
-  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
-  scene.setSceneRect(-100, -100, 100, 100);
-  this->graphicsView->setScene(&scene);
-  this->graphicsView->setMouseTracking(true);
-
-  // Turn the vertical axis upside down
-  this->graphicsView->matrix().scale(1, -1);
-                                                      
-  // The navigation adds zooming and translation functionality to the
-  // QGraphicsView
-  this->addNavigation(this->graphicsView);
-
-  this->setupStatusBar();
-  this->setupOptionsMenu();
-  this->addAboutDemo(":/cgal/help/about_Regular_triangulation_2.html");
-  this->addAboutCGAL();
-}
-
-
-void
-MainWindow::processInput(CGAL::Object o)
-{
-  std::pair<Point_2, K::FT > center_sqr;
-  if(CGAL::assign(center_sqr, o)){
-    Regular::Point wp(center_sqr.first, center_sqr.second);
-    dt.insert(wp);
-  }
-
-  emit(changed());
-}
-
-
-/* 
- *  Qt Automatic Connections
- *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
- * 
- *  setupUi(this) generates connections to the slots named
- *  "on_<action_name>_<signal_name>"
- */
-void
-MainWindow::on_actionInsertPoint_toggled(bool checked)
-{
-  if(checked){
-    scene.installEventFilter(pi);
-    scene.installEventFilter(trv);
-  } else {
-    scene.removeEventFilter(pi);
-    scene.removeEventFilter(trv);
-  }
-}
-
-
-
-void
-MainWindow::on_actionShowRegular_toggled(bool checked)
-{
-  dgi->setVisibleEdges(checked);
-}
-
-
-void
-MainWindow::on_actionShowPowerdiagram_toggled(bool checked)
-{
-  vgi->setVisible(checked);
-}
-
-
-void
-MainWindow::on_actionClear_triggered()
-{
-  dt.clear();
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionInsertRandomPoints_triggered()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
-  CGAL::Qt::Converter<K> convert;
-  Iso_rectangle_2 isor = convert(rect);
-  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
-  const int number_of_points = 
-    QInputDialog::getInteger(this, 
-                             tr("Number of random points"),
-                             tr("Enter number of random points"), 100, 0);
-
-  // wait cursor
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-  std::vector<Point_2> points;
-  points.reserve(number_of_points);
-  for(int i = 0; i < number_of_points; ++i){
-    points.push_back(*pg++);
-  }
-  dt.insert(points.begin(), points.end());
-  // default cursor
-  QApplication::setOverrideCursor(Qt::ArrowCursor);
-  emit(changed());
-}
-
-
-void
-MainWindow::on_actionLoadPoints_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-						  tr("Open Points file"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ifstream ifs(qPrintable(fileName));
-
-    Gt::Weighted_point_2 p;
-    std::vector<Gt::Weighted_point_2> points;
-    while(ifs >> p) {
-      points.push_back(p);
-    }
-    dt.insert(points.begin(), points.end());
-
-    actionRecenter->trigger();
-    emit(changed());
-  }
-}
-
-
-void
-MainWindow::on_actionSavePoints_triggered()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Save points"),
-						  ".");
-  if(! fileName.isEmpty()){
-    std::ofstream ofs(qPrintable(fileName));
-    for(Regular::Finite_vertices_iterator 
-          vit = dt.finite_vertices_begin(),
-          end = dt.finite_vertices_end();
-        vit!= end; ++vit)
-    {
-      ofs << vit->point() << std::endl;
-    }
-  }
-}
-
-
-void
-MainWindow::on_actionRecenter_triggered()
-{
-  this->graphicsView->setSceneRect(dgi->boundingRect());
-  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
-}
-
-
-#include "Regular_triangulation_2.moc"
-#include <CGAL/Qt/resources.h>
-
-int main(int argc, char **argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("geometryfactory.com");
-  app.setOrganizationName("GeometryFactory");
-  app.setApplicationName("Regular_triangulation_2 demo");
-
-  // Import resources from libCGALQt4.
-  // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
-  CGAL_QT4_INIT_RESOURCES;
-
-  MainWindow mainWindow;
-  mainWindow.show();
-
-  QStringList args = app.arguments();
-  args.removeAt(0);
-  Q_FOREACH(QString filename, args) {
-    mainWindow.open(filename);
-  }
-
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationMovingPoint.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationMovingPoint.h
deleted file mode 100644
index e1ec1c2..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationMovingPoint.h
+++ /dev/null
@@ -1,147 +0,0 @@
-
-#ifndef CGAL_QT_TRIANGULATION_MOVING_POINT
-#define CGAL_QT_TRIANGULATION_MOVING_POINT
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class TriangulationMovingPoint : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Face_handle Face_handle;
-  typedef typename DT::Vertex_handle Vertex_handle;
-  typedef typename DT::Point Point;
-
-  TriangulationMovingPoint(DT  * dt_, QObject* parent);
-
-protected:
-  void localize_and_insert_point(QPointF qt_point);
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  DT * dt;
-  Vertex_handle vh;
-  bool movePointToInsert;
-  bool insertedPoint;
-};
-
-
-template <typename T>
-TriangulationMovingPoint<T>::TriangulationMovingPoint(T * dt_,
-							  QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_), vh(), movePointToInsert(false), insertedPoint(false)
-{}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
-{
-  Point p(qt_point.x(), qt_point.y());
-  typename T::Locate_type lt;
-  int li;
-  Face_handle fh = (vh == Vertex_handle()) ? Face_handle() : vh->face();
-  fh = dt->locate(p, lt, li, fh); // fh serves as a hint
-  if(lt != T::VERTEX){
-    vh = dt->insert(p, lt, fh, li);
-    insertedPoint = true;
-    emit(modelChanged());
-  } else {
-    vh = fh->vertex(0);
-    insertedPoint = false;
-  }
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(dt->number_of_vertices() == 0 ||
-     event->modifiers() != 0 ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-  movePointToInsert = true;
-  localize_and_insert_point(event->scenePos());
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-
-  if(! movePointToInsert) return;
-
-  // fh will be destroyed by the removal of vh.
-  // Let us take a neighbor that is not in the star of vh.
-  const Face_handle fh = vh->face();
-  Vertex_handle next_hint = fh->vertex((fh->index(vh)+1)&3);
-  if(insertedPoint){
-    dt->remove(vh);
-  }
-  vh = next_hint;
-  localize_and_insert_point(event->scenePos());
-}
-
-
-template <typename T>
-void 
-TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(! movePointToInsert ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-
-  if(insertedPoint){
-    dt->remove(vh);
-  }
-  vh = Vertex_handle();
-  
-  emit(modelChanged());
- 
-  movePointToInsert = false;
-}
-
-
-
-template <typename T>
-bool 
-TriangulationMovingPoint<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return false; // do not eat move event!
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_MOVING_POINT
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h
deleted file mode 100644
index ede51ab..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-#ifndef CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
-#define CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class TriangulationPointInputAndConflictZone : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Geom_traits K;
-  typedef typename DT::Face_handle Face_handle;
-  typedef typename DT::Point Point;
-
-  TriangulationPointInputAndConflictZone(QGraphicsScene* s, DT  * dt_, QObject* parent);
-
-protected:
-  void localize_and_insert_point(QPointF qt_point);
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  std::list<Face_handle> faces;
-  std::list<QGraphicsPolygonItem*> qfaces;
-  DT * dt;
-  Converter<K> convert;
-  QGraphicsScene *scene_;
-  Point p;
-};
-
-
-template <typename T>
-TriangulationPointInputAndConflictZone<T>::TriangulationPointInputAndConflictZone(QGraphicsScene* s,
-							T * dt_,
-							QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_), scene_(s)
-{}
-
-
-
-
-template <typename T>
-void 
-TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-  p = convert(event->scenePos());
-  if(dt->dimension() < 2 ||
-     event->modifiers() != 0 ||
-     event->button() != ::Qt::LeftButton) {
-    return;
-  }
-  
-
-  dt->find_conflicts(p, faces);
-  for(typename std::list<Face_handle>::iterator it = faces.begin();
-      it != faces.end();
-      ++it){
-    if(! dt->is_infinite(*it)){
-      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
-      QColor color(::Qt::blue);
-      color.setAlpha(150);
-      item->setBrush(color);
-      scene_->addItem(item);
-      qfaces.push_back(item);
-    }
-  }
-}
-
-
-template <typename T>
-void 
-TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent * /*event*/)
-{
-  faces.clear();
-  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
-      it != qfaces.end();
-      ++it){
-    scene_->removeItem(*it);
-    delete *it;
-  }
-  qfaces.clear();
-  emit (generate(CGAL::make_object(p)));
-}
-
-
-
-template <typename T>
-bool 
-TriangulationPointInputAndConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseReleaseEvent(mouseEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationRemoveVertex.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationRemoveVertex.h
deleted file mode 100644
index b67f013..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationRemoveVertex.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#ifndef CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
-#define CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <QGraphicsSceneMouseEvent>
-#include <QEvent>
-#include <list>
-#include <CGAL/Qt/Converter.h>
-
-
-
-namespace CGAL {
-namespace Qt {
-
-template <typename DT>
-class TriangulationRemoveVertex : public GraphicsViewInput
-{
-public:
-  typedef typename DT::Face_handle Face_handle;
-  typedef typename DT::Vertex_handle Vertex_handle;
-  typedef typename DT::Point Point;
-
-  TriangulationRemoveVertex(DT  * dt_, QObject* parent);
-
-protected:
-
-  void mousePressEvent(QGraphicsSceneMouseEvent *event);
- 
-  bool eventFilter(QObject *obj, QEvent *event);
-
-  DT * dt;
-};
-
-
-template <typename T>
-TriangulationRemoveVertex<T>::TriangulationRemoveVertex(T * dt_,
-							  QObject* parent)
-  :  GraphicsViewInput(parent), dt(dt_)
-{}
-
-
-
-template <typename T>
-void 
-TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if((event->modifiers()  & ::Qt::ShiftModifier)
-     && (! (event->modifiers() & ::Qt::ControlModifier))){
-    if(dt->number_of_vertices() == 0){
-      dt->clear();
-    }else {
-      Converter<typename T::Geom_traits> convert;
-      typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
-      dt->remove(selected_vertex);
-    }
-    emit (modelChanged());
-  }
-}
-
-
-
-template <typename T>
-bool 
-TriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return false;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_2.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_2.h
deleted file mode 100644
index 3c61f42..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_2.h
+++ /dev/null
@@ -1,250 +0,0 @@
-// Lakulish Antani
-// Christophe Delage
-// Jane Tournois
-// Pierre Alliez
-#ifndef CGAL_LIPSCHITZ_SIZING_FIELD_2_H
-#define CGAL_LIPSCHITZ_SIZING_FIELD_2_H
-
-#include <list>
-
-#include <CGAL/basic.h>
-#include <CGAL/squared_distance_2.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Search_traits_2.h>
-#include <CGAL/Apollonius_graph_2.h>
-#include <CGAL/Apollonius_graph_traits_2.h>
-
-#include <CGAL/Sizing_field_2.h>
-
-namespace CGAL
-{
-
-template <typename Kernel>
-class Lipschitz_sizing_field_2 
-	: public virtual Sizing_field_2<Kernel>
-{
-public:
-  typedef Point_2<Kernel> Point;
-    
-  typedef Delaunay_triangulation_2<Kernel> Delaunay_triangulation;
-  typedef typename Delaunay_triangulation::All_faces_iterator Face_iterator;
-  typedef typename Delaunay_triangulation::Finite_vertices_iterator Vertex_iterator;
-  typedef typename Delaunay_triangulation::Face_circulator Face_circulator;
-    
-  typedef Search_traits_2<Kernel> Tree_traits;
-  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Search_tree;
-    
-  typedef Apollonius_graph_traits_2<Kernel> Apollonius_traits;
-  typedef Apollonius_graph_2<Apollonius_traits> Apollonius_graph;
-  typedef typename Apollonius_traits::Site_2 Site;
-
-public:    
-  typedef std::list<Site> Site_set_2;
-
-public:
-
-  // comparison functor for sorting sites
-  class Compare_site_2
-  {
-  public:
-    bool operator ()(Site s1, Site s2)
-    {
-      return (s1.weight() > s2.weight());
-    }
-  };
-
-public:
-    
-  // default constructor: empty point set and K = 1.0
-  Lipschitz_sizing_field_2()
-    : K(1.0)
-  {
-    sites = Site_set_2();
-
-    generate_delaunay();
-    extract_poles();
-    generate_sites();
-    generate_apollonius();
-  }
-    
-  // constructor with point set and K as parameters
-  template <typename InputIterator>
-  Lipschitz_sizing_field_2(InputIterator first,
-			   InputIterator beyond,
-			   const double k = 1.0)
-    : K(k)
-  {
-    points = std::list<Point>(first, beyond);
-    generate_delaunay();
-    extract_poles();
-    generate_sites();
-    generate_apollonius();
-  }
-
-  // assignment operator, copies point set and K
-  Lipschitz_sizing_field_2& operator =(const Lipschitz_sizing_field_2& f)
-  {
-    points.clear();
-    if(!poles.empty())
-      poles.clear();
-
-    if(!sites.empty())
-      sites.clear();
-
-    dt.clear();
-    ag.clear();
-
-    points = f.points;
-    K = f.K;
-
-    generate_delaunay();
-    extract_poles();
-    generate_sites();
-    generate_apollonius();
-
-    return *this;
-  }
-
-  double query(const Point& p) const
-  {
-    if(points.empty() || points.size() == 1)
-      return K;
-    Site ns = (*ag.nearest_neighbor(p)).site();
-    return K * weighted_distance(p, ns);
-  }
-
-  void set_K(double k)
-  {
-    K = k;
-  }
-
-  double get_K()
-  {
-    return K;
-  }
-
-  std::list<Point>& get_poles()
-  {
-    return poles;
-  }
-
-protected:
-
-  double K;
-  Site_set_2 sites;
-  std::list<Point> points;
-  std::list<Point> poles;
-  Apollonius_graph ag;
-  Delaunay_triangulation dt;
-
-  // generate the delaunay triangulation (for voronoi diagram)
-  void generate_delaunay()
-  {
-    if(points.empty())
-      return;
-
-    for(typename std::list<Point>::iterator ppi = points.begin();
-	ppi != points.end();ppi++)
-      dt.insert(*ppi);
-  }
-    
-
-  // pole extraction
-  void extract_poles()
-  {
-    if (points.empty())
-      return;
-    Vertex_iterator vi;
-    for (vi = dt.finite_vertices_begin(); vi != dt.finite_vertices_end(); vi++)
-      {
-	Face_circulator fc = dt.incident_faces(vi);
-	Face_circulator c = fc;
-	std::list<Point> vv;
-			    
-	if (fc != NULL)
-	  {
-	    do
-	      {
-		if (!dt.is_infinite(c) && dt.triangle(c).area() != 0)
-		  vv.push_back(dt.dual(c));
-	      } while (++c != fc);
-	  }
-			    
-	// find the farthest voronoi vertex from this point
-	typename std::list<Point>::iterator maxp = vv.begin();
-	for (typename std::list<Point>::iterator pi = vv.begin(); pi != vv.end(); pi++)
-	  {
-	    if (squared_distance(*pi, (*vi).point()) > squared_distance(*maxp, (*vi).point()))
-	      {
-		maxp = pi;
-	      }
-	  }
-	poles.push_back(*maxp);
-			    
-	// find the farthest voronoi vertex from this point in the other half-plane
-	typename std::list<Point>::iterator maxp2 = vv.begin();
-	for (typename std::list<Point>::iterator pi = vv.begin(); pi != vv.end(); pi++)
-	  {
-	    if (angle((Point) *pi, (Point) (*vi).point(), (Point) *maxp) == OBTUSE &&
-		squared_distance(*pi, (*vi).point()) > squared_distance(*maxp2, (*vi).point()))
-	      {
-		maxp2 = pi;
-	      }
-	  }
-	poles.push_back(*maxp2);
-      }
-  }
-
-  void generate_sites()
-  {
-    if(poles.empty())
-      return;
-
-    Search_tree tree_poles(poles.begin(), poles.end());
-    Search_tree tree_points(points.begin(), points.end());
-
-    for(typename std::list<Point>::iterator pi = points.begin();
-	pi != points.end();
-	pi++)
-      {
-
-	// estimate lfs (distance to medial axis estimate)
-	Neighbor_search search_poles(tree_poles, *pi, 1);
-	double lfs = std::sqrt((search_poles.begin())->second);
-
-	// compute distance to nearest input point
-	Neighbor_search search_points(tree_points, *pi, 2); // notice 2
-	typename Neighbor_search::iterator it = search_points.begin();
-	it++; // the first one is...itself
-	double d = std::sqrt(it->second);
-					
-	// take min(lfs,distance to nearest point) as sizing
-	double sizing = (std::min)(lfs,d);
-
-	sites.push_back(Site(*pi, -sizing / K));
-      }
-  }
-
-  // generate apollonius graph
-  // first sorting the sites in decreasing order of weights
-  void generate_apollonius()
-  {
-    if(sites.empty())
-      return;
-    sites.sort(Compare_site_2());
-    ag.insert(sites.begin(),sites.end());
-  }
-			    
-  double weighted_distance(const Point p,
-			   const Site s) const
-  {
-    return std::sqrt(squared_distance(p, s.point())) - s.weight();
-  }
-
-};
-
-}//namespace CGAL
-
-#endif //CGAL_LIPSCHITZ_SIZING_FIELD_2_H
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h
deleted file mode 100644
index 36e0fa1..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h
+++ /dev/null
@@ -1,204 +0,0 @@
-#ifndef DELAUNAY_MESH_SIZING_FIELD_CRITERIA_2_H
-#define DELAUNAY_MESH_SIZING_FIELD_CRITERIA_2_H
-
-#include <CGAL/Mesh_2/Face_badness.h>
-#include <CGAL/Delaunay_mesh_criteria_2.h>
-#include <utility>
-#include <ostream>
-
-#include <CGAL/Lipschitz_sizing_field_2.h>
-
-
-namespace CGAL
-{
-
-template <class CDT, class SF>
-class Lipschitz_sizing_field_criteria_2
-  : public virtual Delaunay_mesh_criteria_2<CDT>
-{
-
-public:
-    
-  typedef SF Sizing_field;
-    
-protected:
-    
-  Sizing_field* sizing_field;
-
-  typedef typename CDT::Geom_traits Geom_traits;
-  Geom_traits traits;
-    
-public:
-    
-  typedef Delaunay_mesh_criteria_2<CDT> Base;
-    
-  Lipschitz_sizing_field_criteria_2(const double aspect_bound = 0.125,
-				    Sizing_field* sf = 0,
-                                    const Geom_traits& traits = Geom_traits())
-    : Base(aspect_bound), sizing_field(sf), traits(traits)
-  {}
-
-  Lipschitz_sizing_field_criteria_2& operator =(const Lipschitz_sizing_field_criteria_2<CDT,SF>& c)
-  {
-    if(&c == this) return *this;
-    this->sizing_field = c.sizing_field;
-    this->traits = c.traits;
-    return *this;
-  }
-
-  inline const Sizing_field* sizing_field_object()
-  {
-    return sizing_field;
-  }
-
-  struct Quality : public std::pair<double, double>
-  {
-    typedef std::pair<double, double> Base;
-      
-    Quality() : Base() {};
-    Quality(double _sine, double _size) : Base(_sine, _size) {};
-      
-    const double& size() const { return second; }
-    const double& sine() const { return first; }
-      
-    // q1<q2 means q1 is prioritised over q2
-    // ( q1 == *this, q2 == q )
-    bool operator<(const Quality& q) const
-    {
-      if( size() > 1 )
-	if( q.size() > 1 )
-	  return ( size() > q.size() );
-	else
-	  return true; // *this is big but not q
-      else
-	if( q.size() >  1 )
-	  return false; // q is big but not *this
-      return( sine() < q.sine() );
-    }
-  };
-    
-  class Is_bad : public Base::Is_bad
-  {
-  protected:
-
-    Sizing_field* sizing_field;
-
-  public:
-
-    typedef typename Base::Is_bad::Point_2 Point_2;
-
-    Is_bad(const double aspect_bound, Sizing_field* sf, 
-           const Geom_traits& traits)
-      : Base::Is_bad(aspect_bound, traits), sizing_field(sf)
-    {
-    }
-
-    Mesh_2::Face_badness operator ()(const typename CDT::Face_handle& fh, Quality& q)
-    {
-      typedef typename CDT::Geom_traits Geom_traits;
-      typedef typename Geom_traits::Compute_area_2 Compute_area_2;
-      typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance_2;
-	    
-      Geom_traits traits; /** @warning traits with data!! */
-	    
-      Compute_squared_distance_2 squared_distance = traits.compute_squared_distance_2_object();
-
-      const Point_2& pa = fh->vertex(0)->point();
-      const Point_2& pb = fh->vertex(1)->point();
-      const Point_2& pc = fh->vertex(2)->point();
-	    
-      double
-	a = CGAL::to_double(squared_distance(pb, pc)),
-	b = CGAL::to_double(squared_distance(pc, pa)),
-	c = CGAL::to_double(squared_distance(pa, pb));
-	    
-      double max_length; // squared max edge length
-      double second_max_length;
-	    
-      if(a < b)
-	{
-	  if(b < c) 
-	    {
-	      max_length = c;
-	      second_max_length = b;
-	    }
-	  else 
-	    { // c<=b
-	      max_length = b;
-	      second_max_length = ( a < c ? c : a );
-	    }
-	}
-      else // b<=a
-	{
-	  if(a < c) 
-	    {
-	      max_length = c;
-	      second_max_length = a;
-	    }
-	  else 
-	    { // c<=a
-	      max_length = a;
-	      second_max_length = ( b < c ? c : b );
-	    }
-	}
-
-      q.second = 0;
-
-      // compute the sizing field at the centroid of the vertices
-      const Point_2& pg = centroid(pa, pb, pc);
-      double squared_size_bound = sizing_field->query(pg);
-      squared_size_bound *= squared_size_bound;
-
-      if( squared_size_bound != 0 )
-	{
-	  q.second = max_length / squared_size_bound;
-	  // normalized by size bound to deal
-	  // with size field
-	  if( q.size() > 1 )
-	    {
-	      q.first = 1; // (do not compute sine)
-	      //std::cout << "imperatively bad!!\n";
-	      return Mesh_2::IMPERATIVELY_BAD;
-	    }
-	}
-
-      Compute_area_2 area_2 = traits.compute_area_2_object();
-	    
-      double area = 2*CGAL::to_double(area_2(pa, pb, pc));
-	    
-      q.first = (area * area) / (max_length * second_max_length); // (sine)
-	    
-      if( q.sine() < this->B )
-	{
-	  //std::cout << "bad!\n";
-	  return Mesh_2::BAD;
-	}
-      else
-	{
-	  //std::cout << "not bad.\n";
-	  return Mesh_2::NOT_BAD;
-	}
-    }
-	
-    Mesh_2::Face_badness operator ()(const Quality q) const
-    {
-      if(q.size() > 1)
-	return Mesh_2::IMPERATIVELY_BAD;
-      if(q.sine() < this->B)
-	return Mesh_2::BAD;
-      else
-	return Mesh_2::NOT_BAD;
-    }
-
-  };
-
-  Is_bad is_bad_object() const
-  { 
-    return Is_bad(this->bound(), sizing_field, traits);
-  }
-
-};
-
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Sizing_field_2.h b/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Sizing_field_2.h
deleted file mode 100644
index ada53b1..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_2/include/CGAL/Sizing_field_2.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef CGAL_SIZING_FIELD_2_H
-#define CGAL_SIZING_FIELD_2_H
-
-#include <list>
-
-#include <CGAL/basic.h>
-
-namespace CGAL
-{
-
-template <typename Kernel>
-class Sizing_field_2 // pure virtual class
-{    
-public:
-  typedef Point_2<Kernel> Point;
-	
-public:
-  Sizing_field_2()
-  {
-  }
-  virtual ~Sizing_field_2()
-  {
-  }
-
-  virtual double query(const Point& p) const = 0;
-};
-
-}//namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Triangulation_3/CMakeLists.txt
deleted file mode 100644
index 23bb267..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/CMakeLists.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project (Triangulation_demo_3)
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL  COMPONENTS Qt4)
-include(${CGAL_USE_FILE})
-
-
-set( QT_USE_QTXML    TRUE )
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTSCRIPT  TRUE )
-set( QT_USE_QTOPENGL  TRUE )
-find_package(Qt4)
-
-find_package(OpenGL)
-
-if(QT4_FOUND)
-  include( ${QT_USE_FILE} )
-  find_package(QGLViewer)
-endif(QT4_FOUND)
-
-# Activate concurrency ? (turned OFF by default)
-option(ACTIVATE_CONCURRENT_TRIANGULATION_3
-  "Activate parallelism in Triangulation_3"
-  OFF)
-  
-# And add -DCGAL_CONCURRENT_TRIANGULATION_3 if that option is ON
-if( ACTIVATE_CONCURRENT_TRIANGULATION_3 )
-  add_definitions( -DCGAL_CONCURRENT_TRIANGULATION_3 )
-  find_package( TBB REQUIRED )
-else( ACTIVATE_CONCURRENT_TRIANGULATION_3 )
-  option( LINK_WITH_TBB
-    "Link with TBB anyway so we can use TBB timers for profiling"
-    ON)
-  if( LINK_WITH_TBB )
-    find_package( TBB )
-  endif( LINK_WITH_TBB )
-endif()
-
-if( TBB_FOUND )
-  include(${TBB_USE_FILE})
-endif()
-
-if ( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
-
-  include(${QT_USE_FILE})
-
-  include_directories (${QGLVIEWER_INCLUDE_DIR})
-  include_directories (BEFORE ../../include ./ )
-
-  # ui files, created with Qt Designer
-  qt4_wrap_ui( uis MainWindow.ui )
-
-  # qrc files (resources files, that contain icons, at least)
-  qt4_add_resources ( RESOURCE_FILES ./T3_demo.qrc )
-
-  # moc files (meta object compiler files, run moc preprocessor on the files with Widget defs)
-  qt4_automoc( MainWindow.cpp Viewer.cpp PreferenceDlg.cpp )
-
-
-  # cpp files
-  add_executable  ( T3_demo T3_demo.cpp
-                    MainWindow.cpp Viewer.cpp
-                    PreferenceDlg.cpp
-                    Scene.cpp ${uis}  ${RESOURCE_FILES} )
-
-  add_to_cached_list( CGAL_EXECUTABLE_TARGETS T3_demo )
-
-  target_link_libraries( T3_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
-  target_link_libraries( T3_demo ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${TBB_LIBRARIES})
-  target_link_libraries( T3_demo ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
-
-else( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
-
-  set(TRIANGULATION_3_MISSING_DEPS "")
-
-  if(NOT CGAL_FOUND)
-    set(TRIANGULATION_3_MISSING_DEPS "the CGAL Qt4 library, ${TRIANGULATION_3_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT QT4_FOUND)
-    set(TRIANGULATION_3_MISSING_DEPS "Qt4, ${TRIANGULATION_3_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT OPENGL_FOUND)
-    set(TRIANGULATION_3_MISSING_DEPS "OpenGL, ${TRIANGULATION_3_MISSING_DEPS}")
-  endif()      	   
-
-  if(NOT QGLVIEWER_FOUND)
-    set(TRIANGULATION_3_MISSING_DEPS "QGLViewer, ${TRIANGULATION_3_MISSING_DEPS}")
-  endif()      	   
-
-
-  message(STATUS "NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}and will not be compiled.")
-
-endif( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.cpp
deleted file mode 100644
index 3d9bcd2..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.cpp
+++ /dev/null
@@ -1,243 +0,0 @@
-#include "MainWindow.h"
-#include <string>
-
-#include "MainWindow.moc" // .moc will be the output from moc preprocessor
-
-MainWindow::MainWindow(QWidget* parent)
- : CGAL::Qt::DemosMainWindow(parent)
-{
-  //  Qt Automatic Connections
-  //   http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
-  //  setupUi(this) automatically generates connections to the slots named
-  //   "on_<action_name>_<signal_name>"
-  setupUi(this);
-
-  this->viewer->setScene(&m_scene);
-  m_scene.setViewer(this->viewer);
-
-  // setup Mode menu group actions
-  QActionGroup *modeGroup = new QActionGroup(this);
-  modeGroup->addAction(this->actionNormal_View);
-  modeGroup->addAction(this->actionInsert_Vertex);
-  modeGroup->addAction(this->actionInsert_Point);
-  modeGroup->addAction(this->actionSelect_Vertex);
-  modeGroup->addAction(this->actionMove_Vertex);
-  modeGroup->addAction(this->actionFind_NearestNb);
-  modeGroup->addAction(this->actionEmpty_Sphere);
-  QObject::connect(modeGroup, SIGNAL(triggered(QAction *)), this, SLOT(setMode(QAction *)));
-
-  // connect menu actions to viewer slots
-  connectActions();
-
-  // About menu
-  // addAboutCGAL() is a function in DemoMainWindow
-  //   it will add a menu action "About CGAL..." to Help menu and connect to popupAboutCGAL
-  //   default popupAboutCGAL points to a fixed file directory ":/cgal/help/about_CGAL.html"
-  //   here we override it with our directory
-  this->addAboutCGAL();
-  // addAboutDemo(QString htmlResourceName) is also a function in DemoMainWindow
-  //   it will add a menu action "About Demo..." to Help menu
-  //   when the action is invoked, it will popup a messageBox showing the given html
-  this->addAboutDemo( "documentation/about.html" );
-
-  // read last setting from .ini file
-  viewer->readSettings();
-}
-
-void MainWindow::connectActions()
-{
-  // Edit menu actions
-  QObject::connect(this->actionIncremental_Construct, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleIncremental(bool)));
-  QObject::connect(this->actionStop_Animation, SIGNAL(triggered()),
-	   this->viewer, SLOT(stopIncremental()));
-  QObject::connect(this->viewer, SIGNAL(stopIncAnimation()),
-	   this, SLOT(stopAnimation()));
-
-  // Show menu actions
-  QObject::connect(this->actionShow_Axis, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleShowAxis(bool)));
-  QObject::connect(this->actionShow_Vertex, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleShowVertex(bool)));
-  QObject::connect(this->actionShow_DEdge, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleShowDEdge(bool)));
-  QObject::connect(this->actionShow_VEdge, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleShowVEdge(bool)));
-  QObject::connect(this->actionShow_Facet, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleShowFacet(bool)));
-  QObject::connect(this->actionFlat, SIGNAL(toggled(bool)),
-	   this->viewer, SLOT(toggleFlat(bool)));
-
-  // Preferences
-  QObject::connect(this->actionPreferences, SIGNAL(triggered()),
-	   this->viewer, SLOT(setPreferences()));
-
-  // Help menu actions
-  QObject::connect(this->actionDemo_Help, SIGNAL(triggered()),
-	   this->viewer, SLOT(help()));
-  QObject::connect(this->actionAbout_T3_demo, SIGNAL(triggered()),
-       this, SLOT(popupAboutDemo()));
-
-  // Quit
-  QObject::connect(this->actionQuit, SIGNAL(triggered()),
-	   qApp, SLOT(closeAllWindows()));
-
-  // Viewer signals
-  QObject::connect(this, SIGNAL(sceneChanged()),
-	   this->viewer, SLOT(updateGL()));
-}
-
-void MainWindow::closeEvent(QCloseEvent * /*event*/)
-{
-  viewer->writeSettings();
-}
-
-/*************************************************************/
-/*  Action functions */
-
-void MainWindow::setMode(QAction *action)
-{
-  if( action == this->actionNormal_View )
-    this->viewer->setMode( viewer->NONE );
-  else if( action == this->actionInsert_Vertex )
-    this->viewer->setMode( viewer->INSERT_V );
-  else if( action == this->actionInsert_Point )
-    this->viewer->setMode( viewer->INSERT_PT );
-  else if( action == this->actionSelect_Vertex )
-    this->viewer->setMode( viewer->SELECT );
-  else if( action == this->actionMove_Vertex )
-    this->viewer->setMode( viewer->MOVE );
-  else if( action == this->actionFind_NearestNb )
-    this->viewer->setMode( viewer->FINDNB );
-  else if( action == this->actionEmpty_Sphere )
-    this->viewer->setMode( viewer->EMPTYSPH );
-}
-
-void MainWindow::on_actionLoad_Points_triggered()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-		     tr("Open an file"),	// dialog caption
-		     ".",	// initial directory
-		     tr("OFF files (*.off);;XYZ files (*.xyz);;All files (*.*)"));	// selection filter
-  if( fileName.isEmpty() )  return;
-
-  // erase old data
-  viewer->clear();
-
-  // parse fileName to get the file type
-  std::string fname = fileName.toAscii().data();
-  std::string ftype = fname.substr( fname.find_last_of('.')+1 );
-
-  if ( ftype.compare("off")==0 || ftype.compare("OFF")==0 ) { // read from OFF file
-    m_scene.loadPointsOFF( fname.data() );
-    // set selectBuffer size (if necessary)
-    viewer->setSelBuffSize();
-  } else if ( ftype.compare("xyz")==0 || ftype.compare("XYZ")==0 ) { // read from XYZ file
-    m_scene.loadPointsXYZ( fname.data() );
-    // set selectBuffer size (if necessary)
-    viewer->setSelBuffSize();
-  } else {
-    viewer->displayMessage( tr("Please select an OFF or XYZ file to open!") );
-  }
-
-  // update viewer
-  emit( sceneChanged() );
-}
-
-void MainWindow::on_actionSave_Points_triggered()
-{
-  if( m_scene.isDTEmpty() ) {
-    viewer->displayMessage( tr("Error: no existing triangulation to be saved.") );
-    return;
-  }
-
-  QString fileName = QFileDialog::getSaveFileName(this,
-		     tr("Save an file"),	// dialog caption
-		     ".",	// initial directory
-		     tr("OFF files (*.off);;XYZ files (*.xyz);;All files (*.*)"));	// selection filter
-  if( fileName.isEmpty() )  return;
-
-  // parse fileName to get the file type
-  std::string fname = fileName.toAscii().data();
-  std::string ftype = fname.substr( fname.find_last_of('.')+1 );
-
-  if ( ftype.compare("off")==0 || ftype.compare("OFF")==0 ) { // save to OFF file
-    m_scene.savePointsOFF( fname.data() );
-  } else if ( ftype.compare("xyz")==0 || ftype.compare("XYZ")==0 ) { // save to XYZ file
-    m_scene.savePointsXYZ( fname.data() );
-  } else {
-    viewer->displayMessage( tr("Please select an OFF or XYZ file to open!") );
-  }
-}
-
-void MainWindow::on_actionGenerate_Points_triggered()
-{
-  bool isOk;
-  int nPoints = QInputDialog::getInteger(this,
-		"3D Triangulation demo", "Number of points: ",	// caption and label
-		100,	// default value
-		4,	// min value
-		2147483647,	// max value
-        1,	// step value of arrow button
-		&isOk);	// if OK is pressed
-
-  if ( isOk) {
-    // erase old data
-    viewer->clear();
-
-  	// generate points
-    m_scene.generatePoints(nPoints);
-    // set selectBuffer size (if necessary)
-    viewer->setSelBuffSize();
-
-    // update viewer
-    emit( sceneChanged() );
-  }// if(isOk)
-}
-
-void MainWindow::stopAnimation()
-{
-  if( this->actionIncremental_Construct->isChecked() )
-    this->actionIncremental_Construct->setChecked( false );
-}
-
-void MainWindow::on_actionClear_Scene_triggered()
-{
-  viewer->clear();
-
-  // update viewer
-  emit( sceneChanged() );
-}
-
-void MainWindow::popupAboutCGAL()
-{
-  // read contents from .html file
-  QFile about_CGAL( "documentation/about_CGAL.html" );
-  about_CGAL.open(QIODevice::ReadOnly);
-  QString about_CGAL_txt = QTextStream(&about_CGAL).readAll();
-#ifdef CGAL_VERSION_STR
-  about_CGAL_txt.replace("<!--CGAL_VERSION-->",
-                         QString(" (version %1, svn r%2)")
-                         .arg(CGAL_VERSION_STR).arg(CGAL_SVN_REVISION));
-#endif
-
-  // popup a message box
-  QMessageBox mb(QMessageBox::NoIcon,
-                 tr("About CGAL..."),
-                 about_CGAL_txt,
-                 QMessageBox::Ok,
-                 this);
-
-  // set links to be accessible by mouse or keyboard
-  QLabel* mb_label = mb.findChild<QLabel*>("qt_msgbox_label");
-  if(mb_label) {
-    mb_label->setTextInteractionFlags(mb_label->textInteractionFlags() | 
-                                      ::Qt::LinksAccessibleByMouse | 
-                                      ::Qt::LinksAccessibleByKeyboard);
-  } else {
-    std::cerr << "Cannot find child \"qt_msgbox_label\" in QMessageBox\n"
-              << "  with Qt version " << QT_VERSION_STR << "!\n";
-  }
-
-  mb.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.h b/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.h
deleted file mode 100644
index a033fbb..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef MAIN_WINDOW_H
-#define MAIN_WINDOW_H
-
-#include "ui_MainWindow.h"
-#include <CGAL/Qt/DemosMainWindow.h>
-#include <QFileDialog>
-#include <QInputDialog>
-#include <QMessageBox>
-
-#include <QtGui>
-
-#include "Scene.h"
-
-class QWidget;
-
-class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
-{
-  Q_OBJECT
-
-public:
-  MainWindow(QWidget* parent = 0);
-  ~MainWindow() {}
-
-public slots:
-  // file menu
-  void on_actionLoad_Points_triggered();
-  void on_actionSave_Points_triggered();
-
-  // edit menu
-  void on_actionGenerate_Points_triggered();
-  void stopAnimation();
-
-  // mode menu
-  void setMode(QAction *a);
-
-  // show menu
-  void on_actionClear_Scene_triggered();
-
-  // about menu
-  void popupAboutCGAL();
-
-  signals:
-  void sceneChanged();
-
-protected:
-  void closeEvent(QCloseEvent *event);
-
-private:
-  void connectActions();
-
-private:
-  Scene m_scene;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.cpp
deleted file mode 100644
index dca25d9..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.cpp
+++ /dev/null
@@ -1,399 +0,0 @@
-#include <QtGui>
-#include "PreferenceDlg.h"
-
-#include "PreferenceDlg.moc" // .moc will be the output from moc preprocessor
-
-PreferenceDlg::PreferenceDlg(QWidget *parent) : QDialog(parent)
-{
-  /* Vertex */
-
-  // create groupbox
-  QGroupBox *groupV = new QGroupBox( tr("Vertex") );
-  // create buttons
-  QPushButton *btnVertex = new QPushButton( tr("Set Color") );
-  // create color label
-  m_labelVertex = new QLabel;
-  m_labelVertex->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create size label
-  QLabel *labelSizeV = new QLabel( tr("Set Size") );
-  // create lineedit
-  m_editSizeV = new QLineEdit;
-
-  // connect to actions
-  connect( btnVertex, SIGNAL(clicked()), this, SLOT(setVertexColor()) );
-  connect( m_editSizeV, SIGNAL(textChanged(const QString&)), this, SLOT(setVertexSize(const QString&)) );
-
-  // lay out the buttons
-  QGridLayout *layoutV = new QGridLayout;
-  layoutV->addWidget( btnVertex, 0, 0 );
-  layoutV->addWidget( m_labelVertex, 0, 1 );
-  layoutV->addWidget( labelSizeV, 1, 0 );
-  layoutV->addWidget( m_editSizeV, 1, 1 );
-  groupV->setLayout( layoutV );
-
-  /* Delaunau Edge */
-
-  // create groupbox
-  QGroupBox *groupDE = new QGroupBox( tr("Delaunay Edge") );
-  // create button
-  QPushButton *btnDEdge = new QPushButton( tr("Set Color") );
-  // create color label
-  m_labelDEdge = new QLabel;
-  m_labelDEdge->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create size label
-  QLabel *labelSizeDE = new QLabel( tr("Set Size") );
-  // create lineedit
-  m_editSizeDE = new QLineEdit;
-
-  // connect to actions
-  connect( btnDEdge, SIGNAL(clicked()), this, SLOT(setDEdgeColor()) );
-  connect( m_editSizeDE, SIGNAL(textChanged(const QString&)), this, SLOT(setDEdgeSize(const QString&)) );
-
-  // lay out the buttons
-  QGridLayout *layoutDE = new QGridLayout;
-  layoutDE->addWidget( btnDEdge, 0, 0 );
-  layoutDE->addWidget( m_labelDEdge, 0, 1 );
-  layoutDE->addWidget( labelSizeDE, 1, 0 );
-  layoutDE->addWidget( m_editSizeDE, 1, 1 );
-  groupDE->setLayout( layoutDE );
-
-  /* Voronoi Edge */
-
-  // create groupbox
-  QGroupBox *groupVE = new QGroupBox( tr("Voronoi Edge") );
-  // create button
-  QPushButton *btnVEdge = new QPushButton( tr("Set Color") );
-  // create color label
-  m_labelVEdge = new QLabel;
-  m_labelVEdge->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create size label
-  QLabel *labelSizeVE = new QLabel( tr("Set Size") );
-  // create lineedit
-  m_editSizeVE = new QLineEdit;
-
-  // connect to actions
-  connect( btnVEdge, SIGNAL(clicked()), this, SLOT(setVEdgeColor()) );
-  connect( m_editSizeVE, SIGNAL(textChanged(const QString&)), this, SLOT(setVEdgeSize(const QString&)) );
-
-  // lay out the buttons
-  QGridLayout *layoutVE = new QGridLayout;
-  layoutVE->addWidget( btnVEdge, 0, 0 );
-  layoutVE->addWidget( m_labelVEdge, 0, 1 );
-  layoutVE->addWidget( labelSizeVE, 1, 0 );
-  layoutVE->addWidget( m_editSizeVE, 1, 1 );
-  groupVE->setLayout( layoutVE );
-
-  /* Facet */
-
-  // create groupbox
-  QGroupBox *groupF = new QGroupBox( tr("Facet") );
-  // create button
-  QPushButton *btnFacet = new QPushButton( tr("Set Color") );
-  // create color label
-  m_labelFacet = new QLabel;
-  m_labelFacet->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create label and spinbox
-  QLabel *labelFacetA = new QLabel( tr("Transparency") );
-  m_spinAlphaF = new QSpinBox;
-  m_spinAlphaF->setRange(0, 255);
-
-  // connect to actions
-  connect( btnFacet, SIGNAL(clicked()), this, SLOT(setFacetColor()) );
-  connect( m_spinAlphaF, SIGNAL(valueChanged(int)), this, SLOT(setFacetAlpha()) );
-
-  // lay out the buttons
-  QGridLayout *layoutF = new QGridLayout;
-  layoutF->addWidget( btnFacet, 0, 0 );
-  layoutF->addWidget( m_labelFacet, 0, 1 );
-  layoutF->addWidget( labelFacetA, 1, 0 );
-  layoutF->addWidget( m_spinAlphaF, 1, 1 );
-  groupF->setLayout( layoutF );
-
-  /* Trackball  */
-
-  // create groupbox
-  QGroupBox *groupB = new QGroupBox( tr("Trackball") );
-  // create button
-  QPushButton *btnBall = new QPushButton( tr("Set Color") );
-  // create color label
-  m_labelBall = new QLabel;
-  m_labelBall->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create label and spinbox
-  QLabel *labelBallA = new QLabel( tr("Transparency") );
-  m_spinAlphaB = new QSpinBox;
-  m_spinAlphaB->setRange(0, 255);
-  // create label and spinbox
-  QLabel *labelStep = new QLabel( tr("Step-long of Resizing") );
-  m_spinStep = new QSpinBox;
-  m_spinStep->setRange(1, 300);
-
-  // connect to actions
-  connect( btnBall, SIGNAL(clicked()), this, SLOT(setTrackballColor()) );
-  connect( m_spinAlphaB, SIGNAL(valueChanged(int)), this, SLOT(setTrackballAlpha()) );
-  connect( m_spinStep, SIGNAL(valueChanged(int)), this, SLOT(setStepLong()) );
-
-  // lay out the buttons
-  QGridLayout *layoutB = new QGridLayout;
-  layoutB->addWidget( btnBall, 0, 0 );
-  layoutB->addWidget( m_labelBall, 0, 1 );
-  layoutB->addWidget( labelBallA, 1, 0 );
-  layoutB->addWidget( m_spinAlphaB, 1, 1 );
-  layoutB->addWidget( labelStep, 2, 0 );
-  layoutB->addWidget( m_spinStep, 2, 1 );
-  groupB->setLayout( layoutB );
-
-  /* Empty Sphere  */
-
-  // create groupbox
-  QGroupBox *groupS = new QGroupBox( tr("Empty Sphere") );
-  // create color label
-  m_labelSphere = new QLabel;
-  m_labelSphere->setFrameStyle(QFrame::Sunken | QFrame::Panel);
-  // create button
-  QPushButton *btnSphere = new QPushButton( tr("Set Color") );
-  // create label and spinbox
-  QLabel *labelSphereA = new QLabel( tr("Transparency") );
-  m_spinAlphaS = new QSpinBox;
-  m_spinAlphaS->setRange(0, 255);
-
-  // connect to actions
-  connect( btnSphere, SIGNAL(clicked()), this, SLOT(setEmptySphereColor()) );
-  connect( m_spinAlphaS, SIGNAL(valueChanged(int)), this, SLOT(setEmptySphereAlpha()) );
-
-  // lay out the buttons
-  QGridLayout *layoutS = new QGridLayout;
-  layoutS->addWidget( btnSphere, 0, 0 );
-  layoutS->addWidget( m_labelSphere, 0, 1 );
-  layoutS->addWidget( labelSphereA, 1, 0 );
-  layoutS->addWidget( m_spinAlphaS, 1, 1 );
-  groupS->setLayout( layoutS );
-
-  /* OK buttons */
-  // create groupbox
-  QGroupBox *groupBtn = new QGroupBox();
-  // buttons
-  QPushButton *ok = new QPushButton( tr("OK") );
-  QPushButton *apply = new QPushButton( tr("Apply") );
-  QPushButton *cancel = new QPushButton( tr("Cancel") );
-  cancel->setFocus();
-
-  // connect to actions
-  connect( ok, SIGNAL(clicked()), this, SLOT(okClicked()) );
-  connect( apply, SIGNAL(clicked()), this, SLOT(applyClicked()) );
-  connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) );
-
-  // lay out the buttons
-  QGridLayout *layoutBtn = new QGridLayout;
-  layoutBtn->addWidget( ok, 0, 0 );
-  layoutBtn->addWidget( cancel, 0, 1 );
-  layoutBtn->addWidget( apply, 0, 2 );
-  groupBtn->setLayout( layoutBtn );
-
-  /* dialog layout */
-
-  // lay out the buttons
-  QGridLayout *main = new QGridLayout;
-  main->addWidget( groupV, 0, 1 );
-  main->addWidget( groupDE, 0, 2 );
-  main->addWidget( groupVE, 0, 3 );
-  main->addWidget( groupF, 1, 1 );
-  main->addWidget( groupB, 1, 2 );
-  main->addWidget( groupS, 1, 3 );
-  main->addWidget( groupBtn, 2, 2, 2, 3 );
-  setLayout( main );
-
-  // set dialog title
-  setWindowTitle( tr("Preferences") );
-}
-
-void PreferenceDlg::init(QColor clrVt, float sizeV, QColor clrDE, float sizeDE,
-                       QColor clrVE, float sizeVE,
-                       QColor clrF, QColor clrB, QColor clrS, int iStep)
-{
-  // vertex color
-  m_colorVertex = clrVt;
-  // show the color in label
-  m_labelVertex->setText(m_colorVertex.name());
-  m_labelVertex->setPalette( QPalette(m_colorVertex) );
-  m_labelVertex->setAutoFillBackground(true);
-  // vertex size
-  m_fSizeVertex = sizeV;
-  m_editSizeV->setText( QString::number( m_fSizeVertex ) );
-
-  // Delaunay edge color
-  m_colorDEdge = clrDE;
-  // show the color in label
-  m_labelDEdge->setText( m_colorDEdge.name() );
-  m_labelDEdge->setPalette( QPalette(m_colorDEdge) );
-  m_labelDEdge->setAutoFillBackground(true);
-  // edge size
-  m_fSizeDEdge = sizeDE;
-  m_editSizeDE->setText( QString::number( m_fSizeDEdge ) );
-
-  // Voronoi edge color
-  m_colorVEdge = clrVE;
-  // show the color in label
-  m_labelVEdge->setText( m_colorVEdge.name() );
-  m_labelVEdge->setPalette( QPalette(m_colorVEdge) );
-  m_labelVEdge->setAutoFillBackground(true);
-  // edge size
-  m_fSizeVEdge = sizeVE;
-  m_editSizeVE->setText( QString::number( m_fSizeVEdge ) );
-
-  // facet color
-  m_colorFacet = clrF;
-  // show the color in label
-  m_labelFacet->setText( m_colorFacet.name() );
-  m_labelFacet->setPalette( QPalette(m_colorFacet) );
-  m_labelFacet->setAutoFillBackground(true);
-  // facet transparency
-  m_spinAlphaF->setValue( m_colorFacet.alpha() );
-
-  // trackball color
-  m_colorTrackball = clrB;
-  // show the color in label
-  m_labelBall->setText(m_colorTrackball.name());
-  m_labelBall->setPalette( QPalette(m_colorTrackball) );
-  m_labelBall->setAutoFillBackground(true);
-  // trackball transparency
-  m_spinAlphaB->setValue( m_colorTrackball.alpha() );
-  // trackball resizing fineness
-  m_spinStep->setValue( iStep );
-
-  // empty sphere color
-  m_colorEmptySphere = clrS;
-  // show the color in label
-  m_labelSphere->setText(m_colorEmptySphere.name());
-  m_labelSphere->setPalette( QPalette(m_colorEmptySphere) );
-  m_labelSphere->setAutoFillBackground(true);
-  // trackball transparency
-  m_spinAlphaS->setValue( m_colorEmptySphere.alpha() );
-}
-
-void PreferenceDlg::setVertexColor()
-{
-  m_colorVertex = QColorDialog::getColor(m_colorVertex, this);
-  if( m_colorVertex.isValid() ) {
-    m_labelVertex->setText(m_colorVertex.name());
-    m_labelVertex->setPalette( QPalette(m_colorVertex) );
-    m_labelVertex->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setVertexSize(const QString& str)
-{
-  bool ok;
-  float size = str.toFloat(&ok);
-  if( ok )
-    m_fSizeVertex = size;
-  else {
-      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
-                 tr("Enter a valid floating number."),
-                 QMessageBox::Ok, this);
-      mb.exec();
-      m_editSizeV->setFocus();
-  }
-}
-
-void PreferenceDlg::setDEdgeColor()
-{
-  m_colorDEdge = QColorDialog::getColor(m_colorDEdge, this);
-  if( m_colorDEdge.isValid() ) {
-    m_labelDEdge->setText( m_colorDEdge.name() );
-    m_labelDEdge->setPalette( QPalette(m_colorDEdge) );
-    m_labelDEdge->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setDEdgeSize(const QString& str)
-{
-  bool ok;
-  float size = str.toFloat(&ok);
-  if( ok )
-    m_fSizeDEdge = size;
-  else {
-      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
-                 tr("Enter a valid floating number."),
-                 QMessageBox::Ok, this);
-      mb.exec();
-      m_editSizeDE->setFocus();
-  }
-}
-
-void PreferenceDlg::setVEdgeColor()
-{
-  m_colorVEdge = QColorDialog::getColor(m_colorVEdge, this);
-  if( m_colorVEdge.isValid() ) {
-    m_labelVEdge->setText( m_colorVEdge.name() );
-    m_labelVEdge->setPalette( QPalette(m_colorVEdge) );
-    m_labelVEdge->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setVEdgeSize(const QString& str)
-{
-  bool ok;
-  float size = str.toFloat(&ok);
-  if( ok )
-    m_fSizeVEdge = size;
-  else {
-      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
-                 tr("Enter a valid floating number."),
-                 QMessageBox::Ok, this);
-      mb.exec();
-      m_editSizeVE->setFocus();
-  }
-}
-
-void PreferenceDlg::setFacetColor()
-{
-  m_colorFacet = QColorDialog::getColor(m_colorFacet, this);
-  if( m_colorFacet.isValid() ) {
-    m_labelFacet->setText( m_colorFacet.name() );
-    m_colorFacet.setAlpha( m_spinAlphaF->value() );
-    m_labelFacet->setPalette( QPalette(m_colorFacet) );
-    m_labelFacet->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setFacetAlpha()
-{
-  m_colorFacet.setAlpha( m_spinAlphaF->value() );
-}
-
-void PreferenceDlg::setTrackballColor()
-{
-  m_colorTrackball = QColorDialog::getColor(m_colorTrackball, this);
-  if( m_colorTrackball.isValid() ) {
-    m_labelBall->setText( m_colorTrackball.name() );
-    m_colorTrackball.setAlpha( m_spinAlphaB->value() );
-    m_labelBall->setPalette( QPalette(m_colorTrackball) );
-    m_labelBall->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setTrackballAlpha()
-{
-  m_colorTrackball.setAlpha( m_spinAlphaB->value() );
-}
-
-void PreferenceDlg::setStepLong()
-{
-  m_iStep = m_spinStep->value();
-}
-
-void PreferenceDlg::setEmptySphereColor()
-{
-  m_colorEmptySphere = QColorDialog::getColor(m_colorEmptySphere, this);
-  if( m_colorEmptySphere.isValid() ) {
-    m_labelSphere->setText( m_colorEmptySphere.name() );
-    m_colorEmptySphere.setAlpha( m_spinAlphaS->value() );
-    m_labelSphere->setPalette( QPalette(m_colorEmptySphere) );
-    m_labelSphere->setAutoFillBackground(true);
-  }
-}
-
-void PreferenceDlg::setEmptySphereAlpha()
-{
-  m_colorEmptySphere.setAlpha( m_spinAlphaS->value() );
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.h b/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.h
deleted file mode 100644
index d4ab184..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/PreferenceDlg.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef PREFERENCE_DLG_H
-#define PREFERENCE_DLG_H
-
-#include <QDialog>
-
-class QLabel;
-class QSpinBox;
-class QLineEdit;
-
-class PreferenceDlg : public QDialog
-{
-  Q_OBJECT
-
-  friend class Viewer;
-
-public:
-  PreferenceDlg(QWidget *parent=0);
-
-private:
-  void init(QColor, float, QColor, float, QColor, float, QColor, QColor, QColor, int);
-
-private slots:
-  void okClicked() { hide(); emit( applyChanges() ); }
-  void applyClicked() { emit( applyChanges() ); }
-
-  void setVertexColor();
-  void setVertexSize(const QString&);
-  void setDEdgeColor();
-  void setDEdgeSize(const QString&);
-  void setVEdgeColor();
-  void setVEdgeSize(const QString&);
-  void setFacetColor();
-  void setFacetAlpha();
-  void setTrackballColor();
-  void setTrackballAlpha();
-  void setStepLong();
-  void setEmptySphereColor();
-  void setEmptySphereAlpha();
-
-  signals: // Signals do not have access specifier
-  void applyChanges();
-
-private:
-  QLabel *m_labelVertex;
-  QLineEdit *m_editSizeV;
-  QLabel *m_labelDEdge;
-  QLineEdit *m_editSizeDE;
-  QLabel *m_labelVEdge;
-  QLineEdit *m_editSizeVE;
-  QLabel *m_labelFacet;
-  QSpinBox *m_spinAlphaF;
-  QLabel *m_labelBall;
-  QSpinBox *m_spinAlphaB;
-  QSpinBox *m_spinStep;
-  QLabel *m_labelSphere;
-  QSpinBox *m_spinAlphaS;
-
-  float m_fSizeVertex;
-  float m_fSizeDEdge;
-  float m_fSizeVEdge;
-  QColor m_colorVertex;
-  QColor m_colorDEdge;
-  QColor m_colorVEdge;
-  QColor m_colorFacet;
-  QColor m_colorTrackball;
-  int m_iStep;
-  QColor m_colorEmptySphere;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.cpp
deleted file mode 100644
index 75c2aad..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2010  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://sccode@scm.gforge.inria.fr/svn/cgal/branches/experimental-packages/GSoC10-demoT3/demos/Triangulation_demo_3/ $
-// $Id: r58170 2010-08-19 20:46:16 -0400 $
-//
-//
-// Author(s)     : Sophie Fei Che <fei at cis.udel.edu>
-//
-// File Description : Demo of CGAL 3D Triangulation package
-
-#include "MainWindow.h"
-#include <QApplication>
-
-int main(int argc, char** argv)
-{
-  QApplication app(argc, argv);
-
-  app.setOrganizationDomain("inria.fr");
-  app.setOrganizationName("INRIA");
-  app.setApplicationName("3D Triangulation Demo");
-
-  MainWindow mw;
-  mw.show();
-
-  return app.exec();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.cpp b/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.cpp
deleted file mode 100644
index c9fdb23..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.cpp
+++ /dev/null
@@ -1,1294 +0,0 @@
-#include <boost/config.hpp>
-
-#if defined(BOOST_MSVC)
- // Avoid warning concerning spatial_sort(QList::begin(), QList.end() QT "bug" 
-#  pragma warning(disable: 4267 )
-#  pragma warning(disable: 4244 )
-#endif
-
-#include "Viewer.h"
-#include <CGAL/glu.h>
-
-
-
-using namespace std;
-
-#include "Viewer.moc" // .moc will be the output from moc preprocessor
-
-void Viewer::init()
-{
-  /* Initial timer for playing incremental construction */
-  m_pTimer = new QTimer(this);
-  connect(m_pTimer, SIGNAL(timeout()), this, SLOT(incremental_insert()));
-
-  /* Scene inits */
-  setBackgroundColor(::Qt::white);
-  // scene are defined by a sphere of 2.0, camera at the center, i.e. (0, 0, 0)
-  setSceneCenter( qglviewer::Vec(-0.,-0.,-0.) );
-  setSceneRadius( 2. );
-  // show text message
-  setTextIsEnabled(true);
-  setForegroundColor(::Qt::red);
-  setFont(QFont("Arial Black", 16, QFont::Bold));
-
-  /* OpenGL inits */
-  // Increase the material shininess, so that the difference between
-  // the two versions of the spiral is more visible.
-  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 50.0);
-  GLfloat specular_color[4] = { 0.8f, 0.8f, 0.8f, 1.0 };
-  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,  specular_color);
-  // Set Smooth Shading
-  ::glShadeModel(GL_SMOOTH);
-
-  // depth buffer setup 
-  ::glClearDepth(1.0f);
-  ::glEnable(GL_DEPTH_TEST);
-  ::glDepthFunc(GL_LEQUAL);
-  ::glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-
-  // enable semi-transparent culling planes
-  ::glEnable(GL_BLEND);
-  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-  // anti-aliasing, i.e. reduce jaggedness (if the OpenGL driver permits that)
-  ::glEnable(GL_POINT_SMOOTH);
-  ::glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
-  ::glEnable(GL_LINE_SMOOTH);
-  ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-
-  /* Add mouse and key description */
-  setKeyDescription( Qt::CTRL + Qt::Key_G, tr("Generate points") );
-  setKeyDescription( Qt::CTRL + Qt::Key_O, tr("Load points") );
-  setKeyDescription( Qt::CTRL + Qt::Key_S, tr("Save points") );
-  setKeyDescription( Qt::CTRL + Qt::Key_Comma, tr("Preference") );
-  setKeyDescription( Qt::CTRL + Qt::Key_H, tr("Hide Kernel Demo") );
-  setKeyDescription( Qt::CTRL + Qt::Key_Q, tr("Quit Kernel Demo") );
-  setKeyDescription( Qt::Key_Return,
-         tr("Insert new point to triangulation in <u>Input-Point</u> mode") );
-  setKeyDescription( Qt::Key_Escape,
-         tr("Cancel insertion in <u>Input-Point</u> mode;<br>")
-         + tr("Cancel current selection in <u>Select</u> mode") );
-  setKeyDescription( Qt::Key_Delete, tr("Delete selected vertices in <u>Select</u> mode") );
-#if QGLVIEWER_VERSION >= 0x020500
-  setMouseBindingDescription(Qt::NoModifier, Qt::LeftButton,
-         tr("Hold to move new point in <u>Input-Point</u> mode;<br>")
-         + tr("Hold to move a vertex in <u>Move</u> mode") );
-  setMouseBindingDescription(Qt::ShiftModifier, Qt::LeftButton,
-         tr("Click to insert a vertex in <u>Input-Vertex</u> mode;<br>")
-         + tr("Click to insert a point in <u>Input-Point</u> mode;<br>")
-         + tr("Click or Drag to select multiple points in <u>Select</u> mode;<br>")
-         + tr("Click to place a query point in <u>Find-Nearest-Neighbor</u> mode;<br>")
-         + tr("Click to place a query point in <u>Show-Empty-Sphere</u> mode") );
-  setMouseBindingDescription(Qt::ControlModifier, Qt::LeftButton,
-         tr("Drag to add vertices to current selection in <u>Select</u> mode") );
-#else
-  setMouseBindingDescription( Qt::LeftButton,
-         tr("Hold to move new point in <u>Input-Point</u> mode;<br>")
-         + tr("Hold to move a vertex in <u>Move</u> mode") );
-  setMouseBindingDescription( Qt::SHIFT + Qt::LeftButton,
-         tr("Click to insert a vertex in <u>Input-Vertex</u> mode;<br>")
-         + tr("Click to insert a point in <u>Input-Point</u> mode;<br>")
-         + tr("Click or Drag to select multiple points in <u>Select</u> mode;<br>")
-         + tr("Click to place a query point in <u>Find-Nearest-Neighbor</u> mode;<br>")
-         + tr("Click to place a query point in <u>Show-Empty-Sphere</u> mode") );
-  setMouseBindingDescription( Qt::CTRL + Qt::LeftButton,
-         tr("Drag to add vertices to current selection in <u>Select</u> mode") );
-#endif
-}
-
-QString Viewer::helpString() const
-{
-  QString text("<h1>3D Triangulation Demo</h1>");
-
-  text += "This example illustrates a generic interactive demo for 3D Triangulation in CGAL. ";
-  text += "This demo could be used as a simple skeleton ";
-  text += "for potential demos of other 3D packages or for teaching CGAL.<br><br>";
-
-  text += "The key feature is to edit vertices/points with mouse.";
-  text += "There are several modes:<br><br>";
-
-  text += " - <u>Normal Mode</u>: ";
-  text += "Rotate, zoom, or translate camera using mouse.<br>";
-  text += " - <u>Insert Vertex</u>: ";
-  text += "Insert a vertex on the surface of the trackball ";
-  text += "and the triangulation will be updated correspondingly.<br>";
-  text += " - <u>Insert Point</u>: ";
-  text += "Insert a point on the surface of the trackball. ";
-  text += "Its conflict region will be highlighted. ";
-  text += "When the new point is moving, ";
-  text += "its conflict region will be updated correspondingly.<br>";
-  text += " - <u>Select</u>: ";
-  text += "Click or drag mouse left button to select multiple points.<br>";
-  text += " - <u>Move</u>: Hold mouse left button to move a vertex ";
-  text += "and the triangulation will be updated correspondingly.<br>";
-  text += " - <u>Find Nearest Neighbor</u>: ";
-  text += "Place a query point and its nearest neighbor will be highlighted.<br>";
-  text += " - <u>Show Empty Sphere</u>: ";
-  text += "Place a query point, locate the point in a cell ";
-  text += "and then show the empty sphere of that cell. ";
-  text += "An empty sphere of a cell is a sphere ";
-  text += "with all four vertices of the cell lying on it ";
-  text += "and no other vertices inside it.<br><br>";
-  text += "<b>Shift+Wheel</b> to resize the trackball when it exists. ";
-  text += "See <b>Mouse</b> page for more details.<br><br>";
-
-  text += "Other basic features include:<br>";
-  text += " - Randomly generate points,<br>";
-  text += " - Read/Write files,<br>";
-  text += " - Show vertices, Voronoi edges, Delaunay edges, and/or facets,<br>";
-  text += " - Incremental Construct: ";
-  text += "Re-construct the current triangulation incrementally. ";
-  text += "If no triangulation exists yet, randomly generate 100 points ";
-  text += "and construct a Delaunay triangulation of those points.<br>";
-
-  return text;
-}
-
-/*************************************************************/
-/*  Draw functions */
-
-void Viewer::draw()
-{
-  if( m_pScene == NULL ) return;
-
-  QFont fontPrompt("Arial", 14);
-
-  if( m_showAxis ) {
-    qglColor(::Qt::black);
-    drawAxis( sceneRadius() );
-  }
-
-  /* Draw vertices */
-  if ( m_showVertex && m_pScene->m_dt.number_of_vertices()>0 ) {
-    for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
-        vit < m_pScene->m_vhArray.end(); ++vit) {
-      if( m_curMode == SELECT && (*vit)->isSeled() )  continue;
-      if( (*vit) == m_nearestNb ) continue;
-      drawVertex( (*vit)->point(), m_colorVertex, m_fSizeVertex );
-    }//end-for-points
-  }//end-if-points
-
-  /* Draw all points during incremental mode */
-  if( !m_incrementalPts.isEmpty() ) {
-    /* draw the rest to-be-inserted vertices */
-    for(QList<Point_3>::iterator pit=m_incrementalPts.begin();
-        pit < m_incrementalPts.end(); ++pit) {
-      drawVertex( (*pit), ::Qt::gray, m_fSizeVertex );
-    }
-
-  	switch( m_curStep ) {
-  	case NEWPT:
-      /* Show prompt messages */
-      qglColor( ::Qt::black );
-      drawText( 10, 20, tr("Highlight the next-to-insert point"), fontPrompt );
-      /* Highlight the next-to-insert point */
-      drawVertex( m_curIncPt, ::Qt::red, m_fSizeVertex );
-      break;
-    case CELL:  // show the tetrahedron that contains the point
-      /* Show prompt messages */
-      qglColor( ::Qt::black );
-      drawText( 10, 20, tr("Show the tetrahedron containing the point"), fontPrompt );
-      drawText( 10, 40, tr("(Only finite facets are drawn)"), fontPrompt );
-      /* Highlight the next-to-insert vertex */
-      drawVertex( m_curIncPt, ::Qt::red, m_fSizeVertex );
-      /* Draw the cell containing that point */
-      for(int i=0; i<4; ++i) {
-        if( m_pScene->m_dt.is_infinite(m_cellContain, i) )  continue;
-        drawFacet( m_pScene->m_dt.triangle( m_cellContain, i ), m_colorFacet );
-      }//end-for-facets
-      break;
-    case CONFLICT:  // show the conflict region
-      /* Show prompt messages */
-      qglColor( ::Qt::black );
-      drawText( 10, 20, tr("Show the conflict region"), fontPrompt );
-      /* Highlight the next-to-insert vertex */
-      drawVertex( m_curIncPt, ::Qt::red, m_fSizeVertex );
-      /* Draw conflict region */
-      for(QList<Facet>::iterator fit = m_boundaryFacets.begin();
-          fit < m_boundaryFacets.end(); ++fit) {
-        if( m_pScene->m_dt.is_infinite(*fit) )  continue;
-        drawFacet( m_pScene->m_dt.triangle(*fit), QColor(215, 80, 0, 96) ); //semi-transparent purple
-      }//end-for-facets
-      break;
-    default:
-      break;
-  	}//end-of=switch
-  }//end-if-incpts
-
-  /* Draw Delaunay edges */
-  if( m_showDEdge ) {
-    for(edges_iterator eit = m_pScene->m_dt.finite_edges_begin();
-        eit != m_pScene->m_dt.finite_edges_end(); ++eit) {
-      Segment_3 seg = m_pScene->m_dt.segment(*eit);
-      drawEdge( seg.vertex(0), seg.vertex(1), m_colorDEdge, m_fSizeDEdge );
-    }//end-for-edges
-  }//end-if-dt
-
-  /* Draw Voronoi edges */
-  if( m_showVEdge ) {
-    for(facets_iterator fit = m_pScene->m_dt.finite_facets_begin();
-        fit != m_pScene->m_dt.finite_facets_end(); ++fit) {
-      Object_3 o = m_pScene->m_dt.dual(*fit);
-      if (const Segment_3 *s = CGAL::object_cast<Segment_3>(&o)) {
-        drawEdge( s->vertex(0), s->vertex(1), m_colorVEdge, m_fSizeVEdge );
-      } else if (const Ray_3 *r = CGAL::object_cast<Ray_3>(&o)) {
-        drawEdge( r->point(0),  // the source of the ray
-                  r->point(1),  // another point on the ray, different from the source
-                  m_colorVEdge, m_fSizeVEdge );
-      }
-    }//end-for-edges
-  }//end-if-vd
-
-  /* Draw facets */
-  if( m_showFacet ) {
-    for(facets_iterator fit = m_pScene->m_dt.finite_facets_begin();
-        fit != m_pScene->m_dt.finite_facets_end(); ++fit) {
-      drawFacet( m_pScene->m_dt.triangle(*fit), m_colorFacet );
-    }//end-for-facets
-  }//end-if-facets
-
-  /* Insert vertex mode */
-  if( m_curMode == INSERT_V ) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Shift+Left: Insert a vertex"), fontPrompt );
-    drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
-    /* Draw the trackball */
-    drawSphere( m_fRadius, m_colorTrackball );
-  }//end-if-insv
-
-  /* Insert point mode */
-  else if( m_curMode == INSERT_PT ) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Shift+Left: Insert a point"), fontPrompt );
-    drawText( width()-200, 40, tr("Hold Left: Move the point"), fontPrompt );
-    drawText( width()-200, 60, tr("Return: Insert to DT"), fontPrompt );
-    drawText( width()-200, 80, tr("Escape: Cancel insertion"), fontPrompt );
-    drawText( width()-200, 100, tr("Shift+Wheel: Resize trackball"), fontPrompt );
-
-    /* Draw the trackball */
-    drawSphere( m_fRadius, m_colorTrackball );
-
-    if( m_hasNewPt ) {
-      /* Draw the newly inserted point */
-      drawVertex( m_newPt, ::Qt::red, m_fSizeVertex );
-      /* Draw conflict region */
-      for(QList<Facet>::iterator fit = m_boundaryFacets.begin();
-          fit < m_boundaryFacets.end(); ++fit) {
-        if( m_pScene->m_dt.is_infinite(*fit) )  continue;
-        drawFacet( m_pScene->m_dt.triangle(*fit), QColor(215, 80, 0, 96) ); //semi-transparent purple
-      }//end-for-facets
-    }//end-if-shown
-  }//end-if-inspt
-
-  /* Select mode */
-  else if( m_curMode == SELECT) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Shift+Left: Select"), fontPrompt );
-    drawText( width()-200, 40, tr("Ctrl+Left: Add selection"),
-              QFont("Arial", 14) );
-    drawText( width()-200, 60, tr("Escape: Cancel selection"), fontPrompt );
-    drawText( width()-200, 80, tr("DEL: Delete selected"), fontPrompt );
-    /* Highlight the selected vertices */
-    for(QList<int>::iterator vit=m_vidSeled.begin(); vit<m_vidSeled.end(); ++vit) {
-      drawVertex( m_pScene->m_vhArray.at(*vit)->point(), ::Qt::red, m_fSizeVertex );
-    }//end-for-seledpts
-    /* Draw the multiple selection window */
-    if( m_isPress ) {
-      ::glDisable( GL_LIGHTING );
-      startScreenCoordinatesSystem();
-      qglColor( QColor(80, 180, 180, 64) );
-      ::glBegin(GL_QUADS);
-      ::glVertex2i(m_rectSel.left(), m_rectSel.top());
-      ::glVertex2i(m_rectSel.right(), m_rectSel.top());
-      ::glVertex2i(m_rectSel.right(), m_rectSel.bottom());
-      ::glVertex2i(m_rectSel.left(), m_rectSel.bottom());
-      ::glEnd();
-      stopScreenCoordinatesSystem();
-      ::glEnable( GL_LIGHTING );
-    }//end-if-press
-  }//end-if-sel
-
-  /* Move mode */
-  else if( m_curMode == MOVE ) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Left Click: Select"), fontPrompt );
-
-    if( m_isMoving ) {
-      drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
-      /* Draw the trackball */
-      drawSphere( m_fRadius, m_colorTrackball );
-      /* Highlight the moving point */
-      drawVertex( m_pScene->m_vhArray.at( m_vidMoving )->point(), ::Qt::red, m_fSizeVertex );
-    }//end-if-v
-  }//end-if-move
-
-  /* FindNb mode */
-  else if( m_curMode == FINDNB ) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
-    drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
-    /* Draw the trackball */
-    drawSphere( m_fRadius, m_colorTrackball );
-    /* Draw the nearest neighbor */
-    if( m_nearestNb != NULL ) {
-      drawVertex( m_queryPt, ::Qt::red, m_fSizeVertex );
-      drawVertex( m_nearestNb->point(), ::Qt::red, m_fSizeVertex );
-    }
-  }//end-if-findnb
-
-  /* EmptySphere mode */
-  else if( m_curMode == EMPTYSPH ) {
-    /* Show prompt messages */
-    qglColor( ::Qt::black );
-    drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
-    drawText( width()-200, 40, tr("Press S: Show/Hide trackball"), fontPrompt );
-    drawText( width()-200, 60, tr("Shift+Wheel: Resize trackball"), fontPrompt );
-    /* Draw the trackball */
-    if( m_showTrackball )
-      drawSphere( m_fRadius, m_colorTrackball );
-
-    if( m_hasEmptyS ) {
-      /* Draw the query point */
-      drawVertex( m_queryPt, ::Qt::red, m_fSizeVertex );
-      /* Draw the cell containing that point */
-      for(int i=0; i<4; ++i) {
-        if( m_pScene->m_dt.is_infinite(m_cellContain, i) )  continue;
-        drawFacet( m_pScene->m_dt.triangle( m_cellContain, i ), m_colorFacet );
-      }//end-for-facets
-      /* Draw the sphere */
-      drawSphere( m_fREmptyS, m_colorEmptySphere, m_centerPt );
-    }
-  }//end-if-emptyS
-}
-
-void Viewer::drawVertex(const Point_3& p, const QColor& clr, float r)
-{
-  /* Draw regular points */
-  if( m_isFlat ) {
-    // disable lighting
-    ::glDisable( GL_LIGHTING );
-
-    ::glPointSize(8.0);
-    qglColor( clr );
-
-    ::glBegin(GL_POINTS);
-    ::glVertex3f( p.x(), p.y(), p.z() );
-    ::glEnd();
-
-    // resume lighting
-    ::glEnable( GL_LIGHTING );
-
-    return;
-  }
-
-  /* Draw vertices as 3D balls */
-  GLboolean lighting, colorMaterial;
-  ::glGetBooleanv( GL_LIGHTING, &lighting );
-  ::glGetBooleanv( GL_COLOR_MATERIAL, &colorMaterial );
-  ::glEnable( GL_LIGHTING );
-  ::glDisable(GL_COLOR_MATERIAL);
-
-  float color[4];
-  color[0] = clr.redF();
-  color[1] = clr.greenF();
-  color[2] = clr.blueF();
-  color[3] = clr.alphaF();
-
-  // move to the point
-  ::glPushMatrix();
-  ::glTranslatef( p.x(), p.y(), p.z() );
-
-  // draw
-  GLUquadricObj* quadratic = ::gluNewQuadric();	// Create A Pointer To The Quadric Object
-  ::gluQuadricNormals( quadratic, GLU_SMOOTH );	// Create Smooth Normals
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color );
-  ::gluSphere( quadratic, r, 16, 16 );
-
-  // move back to origin
-  ::glPopMatrix();
-
-  if ( colorMaterial )
-    ::glEnable( GL_COLOR_MATERIAL );
-  if ( !lighting )
-    ::glDisable( GL_LIGHTING );
-}
-
-void Viewer::drawEdge(const Point_3& from, const Point_3& to, const QColor& clr, float r)
-{
-  /* Draw regular lines */
-  if( m_isFlat ) {
-    // disable lighting
-    ::glDisable( GL_LIGHTING );
-
-    ::glLineWidth(1.0);
-  	qglColor( clr );
-
-    ::glBegin(GL_LINES);
-    ::glVertex3f( from.x(), from.y(), from.z() );
-    ::glVertex3f( to.x(), to.y(), to.z() );
-    ::glEnd();
-
-    // resume lighting
-    ::glEnable( GL_LIGHTING );
-
-    return;
-  }
-
-  /* Draw edges as 3D cylinders */
-  GLboolean lighting, colorMaterial;
-  ::glGetBooleanv( GL_LIGHTING, &lighting );
-  ::glGetBooleanv( GL_COLOR_MATERIAL, &colorMaterial );
-  ::glEnable( GL_LIGHTING );
-  ::glDisable(GL_COLOR_MATERIAL);
-
-  float color[4];
-  color[0] = clr.redF();
-  color[1] = clr.greenF();
-  color[2] = clr.blueF();
-  color[3] = clr.alphaF();
-
-  Vector_3 v = to - from;
-
-  // compute the length of the edge
-  // method 1:
-//  float length = sqrt( CGAL::squared_distance( from, to ) );
-  // method 2:
-  float length = sqrt( v.squared_length() );
-
-  // normalize
-  v = v / length;
-  // compute the angle: cos theta = v.z/1.0
-  GLfloat angle = acos( v.z() ) / 3.1415927 * 180;
-
-  ::glPushMatrix();
-
-  // move to "from" point
-  ::glTranslatef( from.x(), from.y(), from.z() );
-  // rotate from z-axis to from-->to
-  //  axis: cross product of z-axis and from-->to
-  ::glRotatef( angle, -v.y(), v.x(), 0.0f );
-  // draw
-  GLUquadricObj* quadratic = ::gluNewQuadric();	// Create A Pointer To The Quadric Object
-  ::gluQuadricNormals( quadratic, GLU_SMOOTH );	// Create Smooth Normals
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color );
-  // gluCylinder draws a cylinder oriented along the z-axis
-  ::gluCylinder( quadratic, r, r, length, 16, 4 );
-
-  // move back to origin
-  ::glPopMatrix();
-
-  if ( colorMaterial )
-    ::glEnable( GL_COLOR_MATERIAL );
-  if ( !lighting )
-    ::glDisable( GL_LIGHTING );
-}
-
-void Viewer::drawFacet(const Triangle_3& t, const QColor& /*clr*/)
-{
-  // disable lighting
-  ::glDisable( GL_LIGHTING );
-
-  // disable depth buffer writing
-  ::glDepthMask( GL_FALSE );
-
-  qglColor( m_colorFacet );
-
-  ::glBegin(GL_TRIANGLES);
-  Point_3 p0 = t.vertex(0);
-  Point_3 p1 = t.vertex(1);
-  Point_3 p2 = t.vertex(2);
-  ::glVertex3f( p0.x(), p0.y(), p0.z() );
-  ::glVertex3f( p1.x(), p1.y(), p1.z() );
-  ::glVertex3f( p2.x(), p2.y(), p2.z() );
-  ::glEnd();
-
-  // resume depth buffer writing
-  ::glDepthMask( GL_TRUE );
-
-  // resume lighting
-  ::glEnable( GL_LIGHTING );
-}
-
-void Viewer::drawSphere(float r, const QColor& clr, const Point_3& center)
-{
-  GLboolean lighting, colorMaterial;
-  ::glGetBooleanv( GL_LIGHTING, &lighting );
-  ::glGetBooleanv( GL_COLOR_MATERIAL, &colorMaterial );
-  ::glEnable( GL_LIGHTING );
-  ::glDisable(GL_COLOR_MATERIAL);
-
-  float color[4];
-  color[0] = clr.redF();
-  color[1] = clr.greenF();
-  color[2] = clr.blueF();
-  color[3] = clr.alphaF();
-
-  ::glPushMatrix();
-
-  // move to the point
-  if( center != CGAL::ORIGIN )  ::glTranslatef( center.x(), center.y(), center.z() );
-
-  // disable depth buffer writing
-  ::glDepthMask( GL_FALSE );
-  // draw
-  GLUquadricObj* quadratic = ::gluNewQuadric();	// Create A Pointer To The Quadric Object
-  ::gluQuadricNormals( quadratic, GLU_SMOOTH );	// Create Smooth Normals
-  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color );
-  ::gluSphere( quadratic, r, 32, 32 );
-  // resume depth buffer writing
-  ::glDepthMask( GL_TRUE );
-
-  // move back to origin
-  ::glPopMatrix();
-
-  if ( colorMaterial )
-    ::glEnable( GL_COLOR_MATERIAL );
-  if ( !lighting )
-    ::glDisable( GL_LIGHTING );
-}
-
-/*************************************************************/
-/*  Select functions */
-
-void Viewer::drawWithNames()
-{
-  for(int i=0; i<m_pScene->m_vhArray.size(); ++i) {
-    // push a name for each point onto the name stack
-    // note: it can NOT be used between glBegin and glEnd
-    ::glPushName( i );
-
-    // draw the point
-    ::glBegin(GL_POINTS);
-    Point_3& p = m_pScene->m_vhArray.at(i)->point();
-    ::glVertex3f(p.x(), p.y(), p.z());
-    ::glEnd();
-
-    // pop one name off the top of the name stack
-    ::glPopName();
-  }//end-for-points
-
-  // push a name for the newly inserted point
-  if( m_curMode == INSERT_PT && m_hasNewPt ) {
-    ::glPushName( ::GLuint(-1) );
-    ::glBegin(GL_POINTS);
-    ::glVertex3f(m_newPt.x(), m_newPt.y(), m_newPt.z());
-    ::glEnd();
-    ::glPopName();
-  }//end-if-newPt
-}
-
-void Viewer::endSelection(const QPoint& /*point*/)
-{
-  // flush GL buffers
-  ::glFlush();
-
-  // reset GL_RENDER mode (was GL_SELECT) and get the number of selected points
-  size_t nSel = ::glRenderMode(GL_RENDER);
-
-  /* No selection */
-  if( nSel <= 0 ) {
-    if( m_curMode == SELECT )
-      m_isPress = false;
-  }//end-if-notselected
-
-  // each hit record has 4 data: # of names in name stack, min and max depth of old hits,
-  //  name stack contents [see glSelectBuffer man page for more details]
-  //  i.e. (selectBuffer())[4*i+3] is the id pushed on the stack
-
-  /* Check whether the new point is clicked on */
-  else if( m_curMode == INSERT_PT ) {
-  	if( m_hasNewPt && (selectBuffer())[3] == ::GLuint(-1) )
-      m_isMoving = true;
-  }//end-if-inspt
-
-  /* Check whether vertex is clicked on */
-  else if( m_curMode == MOVE ) {
-    m_isMoving = true;
-    m_vidMoving = (selectBuffer())[3];
-    // compute the corresponding size of trackball, i.e. selectedV is on the ball
-    Point_3 p = m_pScene->m_vhArray.at( m_vidMoving )->point();
-    m_fRadius = sqrt( p.x()*p.x() + p.y()*p.y() + p.z()*p.z() );
-  }//end-if-move
-
-  /* Store current selections */
-  else { // m_curMode == SELECT
-    if( m_selMode == NORMAL ) {
-      // remove the old selections
-      for(QList<int>::iterator vit=m_vidSeled.begin();
-          vit < m_vidSeled.end(); ++vit) {
-        m_pScene->m_vhArray.at(*vit)->setSeled( false );
-      }
-      m_vidSeled.clear();
-
-      // record the new selections
-      for(std::size_t i=0; i<nSel; ++i) {
-        m_vidSeled.push_back( (selectBuffer())[4*i+3] );
-        m_pScene->m_vhArray.at( m_vidSeled.back() )->setSeled();
-      }
-    } else {
-      for(std::size_t i=0; i<nSel; ++i) {
-        if( !m_vidSeled.contains( (selectBuffer())[4*i+3] ) ) {
-          m_vidSeled.push_back( (selectBuffer())[4*i+3] );
-          m_pScene->m_vhArray.at( (selectBuffer())[4*i+3] )->setSeled();
-        }//end-if-contain
-      }//end-for
-    }//end-if-add
-  }//end-if-sel
-}
-
-/*************************************************************/
-/*  Mouse and Keyboard functions */
-
-void Viewer::mousePressEvent(QMouseEvent *event)
-{
-  // button() holds the button that caused the event
-  //  note: for mouse move event, button() always return Qt::NoButton
-  // modifiers() holds the keyboard modifier flags at the time of the event
-  // buttons() holds the button state when the event was generated,
-  //  i.e. all buttons that are pressed down
-  // pos() holds the mouse cursor's position relative to the receiving widget
-
-  // Get event modifiers key
-#if QT_VERSION < 0x040000
-  // Bug in Qt : use 0x0f00 instead of Qt::KeyButtonMask with Qt versions < 3.1
-  const Qt::ButtonState modifiers = (Qt::ButtonState)(event->state() & Qt::KeyButtonMask);
-#else
-  const Qt::KeyboardModifiers modifiers = event->modifiers();
-#endif
-
-  if( m_curMode == INSERT_V
-      && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
-  	m_isPress = true;
-  }//end-if-insv
-
-  else if(m_curMode == INSERT_PT && event->button() == Qt::LeftButton ) {
-    /* shift+left to insert */
-    if( modifiers == Qt::SHIFT ) {
-      if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
-        m_isPress = true;
-      else
-        displayMessage( tr("There exists no triangulation yet.") );
-      m_hasNewPt = false;
-    } else { /* left button to move */
-      m_isMoving = false;
-      // define selection window (default was 3)
-      setSelectRegionWidth( 10 );
-      setSelectRegionHeight( 10 );
-      // perform the selection
-      select( event->pos() );
-      if( m_isMoving )
-        // redraw window
-        updateGL();
-      else
-        // if no point is selected, then regular action (rotation) will be performed
-        QGLViewer::mousePressEvent(event);
-    }//end-if-shift
-  }//end-if-inspt
-
-  else if( m_curMode == SELECT && event->button() == Qt::LeftButton ) {
-    // set the selection mode
-    switch( modifiers ) {
-    case Qt::SHIFT : // select
-      m_isPress = true;
-      m_selMode = NORMAL;
-      // initialize multiple selection window
-      m_rectSel = QRect( event->pos(), event->pos() );
-      // redraw window
-      updateGL();
-      break;
-    case Qt::CTRL : // add selection
-      m_isPress = true;
-      m_selMode = ADD;
-      // initialize multiple selection window
-      m_rectSel = QRect( event->pos(), event->pos() );
-      // redraw window
-      updateGL();
-      break;
-    default: // rotate
-      QGLViewer::mousePressEvent(event);
-      break;
-    }
-  }//end-if-select
-
-  else if(m_curMode == MOVE && event->button() == Qt::LeftButton ) {
-  	m_isMoving = false;
-    // define selection window (default was 3)
-    setSelectRegionWidth( 10 );
-    setSelectRegionHeight( 10 );
-    // perform the selection
-    select( event->pos() );
-    if( m_isMoving ) // redraw window
-      updateGL();
-    else // if no point is selected, then regular action (rotation) will be performed
-      QGLViewer::mousePressEvent(event);
-  }//end-if-move
-
-  else if( m_curMode == FINDNB
-      && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
-    if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
-      m_isPress = true;
-    else
-      displayMessage( tr("There exists no triangulation yet.") );
-  }//end-if-findnb
-
-  else if( m_curMode == EMPTYSPH
-      && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
-    if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
-      m_isPress = true;
-    else
-      displayMessage( tr("There exists no triangulation yet.") );
-    m_hasEmptyS = false;
-  }//end-if-emptyS
-
-  else
-    QGLViewer::mousePressEvent(event);
-}
-
-void Viewer::mouseMoveEvent(QMouseEvent *event)
-{
-  if( m_curMode == INSERT_PT && m_isMoving ) {
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      m_newPt = Point_3(pt.x, pt.y, pt.z);
-      // compute the conflict hole induced by point p
-      computeConflict( m_newPt );
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-inspt
-
-  else if( m_curMode == SELECT && m_isPress ) {
-    // update multiple selection window
-    m_rectSel.setBottomRight( event->pos() );
-    // redraw
-    updateGL();
-  }//end-if-sel
-
-  else if( m_curMode == MOVE && m_isMoving ) {
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      // note: QList::operator[] return a modifiable reference;
-      //   while QList::at return a const reference
-      // move_if_no_collision moves the point stored in v to pt
-      //  if there is not already another vertex placed on pt,
-      //  the triangulation is modified s.t. the new position of v is pt;
-      //  otherwise, the vertex at point pt is returned.
-      Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
-                                 m_pScene->m_vhArray.at( m_vidMoving ),
-                                 Point_3( pt.x, pt.y, pt.z ) );
-      int id1 = m_pScene->m_vhArray.indexOf( vh );
-      int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
-      // remove the duplicate in vhArray
-      if( id1 != m_vidMoving )
-        m_pScene->m_vhArray.removeAt( id1 );
-      else if( id2 != -1 )
-        m_pScene->m_vhArray.removeAt( id2 );
-      m_pScene->m_vhArray[m_vidMoving] = vh;
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-move
-
-  else
-    QGLViewer::mouseMoveEvent(event);
-}
-
-void Viewer::mouseReleaseEvent(QMouseEvent *event)
-{
-  /* INS_V mode - Shift+Left: compute and insert a vertex */
-  if( m_curMode == INSERT_V && m_isPress ) {
-    m_isPress = false;
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      m_pScene->m_vhArray.push_back( m_pScene->m_dt.insert( Point_3( pt.x, pt.y, pt.z ) ) );
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-ins
-
-  /* INS_PT mode - Shift+Left: compute and insert a point */
-  else if( m_curMode == INSERT_PT && m_isPress ) {
-    m_isPress = false;
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      m_hasNewPt = true;
-      m_newPt = Point_3(pt.x, pt.y, pt.z);
-      // compute the conflict hole induced by point p
-      computeConflict( m_newPt );
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-inspt
-
-  /* INS_PT mode - Left: compute and insert a point */
-  else if( m_curMode == INSERT_PT && m_isMoving ) {
-    m_isMoving = false;
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      m_newPt = Point_3(pt.x, pt.y, pt.z);
-      // compute the conflict hole induced by point p
-      computeConflict( m_newPt );
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-inspt
-
-  /* SEL mode - Left: terminate multiple point selection */
-  else if( m_curMode == SELECT && m_isPress ) {
-    // might swap left/right and top/bottom to make rectanle valid
-#if QT_VERSION < 0x040000
-    m_rectSel = m_rectSel.normalize();
-#else
-    m_rectSel = m_rectSel.normalized();
-#endif
-
-    if( m_rectSel.width() == 1 && m_rectSel.height() == 1 ) { /* select a point */
-      // set a default selection window
-      setSelectRegionWidth( 10 );
-      setSelectRegionHeight( 10 );
-      // compute rectangle center and perform selection
-      select( m_rectSel.center() );
-      if( m_isPress ) {
-        m_isPress = false;
-      } else {
-        displayMessage( tr("No point is selected.") );
-      }
-    } else {  /* select multiple points, ie. selection window > 1 */
-      // define selection window
-      if( m_rectSel.width() < 10 )
-        setSelectRegionWidth( 10 );
-      else
-        setSelectRegionWidth( m_rectSel.width() );
-      if( m_rectSel.height() < 10 )
-        setSelectRegionHeight( 10 );
-      else
-        setSelectRegionHeight( m_rectSel.height() );
-      // compute rectangle center and perform selection
-      select( m_rectSel.center() );
-      if( m_isPress ) {
-        m_isPress = false;
-        displayMessage( QString::number(m_vidSeled.size()) + tr(" points are selected") );
-      } else { // empty window will cancel the current selection
-        for(QList<int>::iterator iit = m_vidSeled.begin(); iit < m_vidSeled.end(); ++iit)
-          m_pScene->m_vhArray.at(*iit)->setSeled( false );
-  	    m_vidSeled.clear();
-      }
-    }//end-if-selwindow
-
-    // update display to show
-    updateGL();
-  }//end-if-select
-
-  /* MOVE mode - Left: terminate point moving */
-  else if( m_curMode == MOVE && m_isMoving ) {
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      // note: QList::operator[] return a modifiable reference;
-      //   while QList::at return a const reference
-      // move_if_no_collision moves the point stored in v to pt
-      //  if there is not already another vertex placed on pt,
-      //  the triangulation is modified s.t. the new position of v is pt;
-      //  otherwise, the vertex at point pt is returned.
-      Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
-                                 m_pScene->m_vhArray.at( m_vidMoving ),
-                                 Point_3( pt.x, pt.y, pt.z ) );
-      int id1 = m_pScene->m_vhArray.indexOf( vh );
-      int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
-      // remove the duplicate in vhArray
-      if( id1 != m_vidMoving )
-        m_pScene->m_vhArray.removeAt( id1 );
-      else if( id2 != -1 )
-        m_pScene->m_vhArray.removeAt( id2 );
-      m_pScene->m_vhArray[m_vidMoving] = vh;
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-move
-
-  /* FindNb mode - Shift+Left: find the nearest neighbor of the point */
-  else if( m_curMode == FINDNB && m_isPress ) {
-    m_isPress = false;
-    Vec pt;
-    if( computeIntersect( event->pos(), pt ) ) {
-      m_queryPt = Point_3( pt.x, pt.y, pt.z );
-      m_nearestNb = m_pScene->m_dt.nearest_vertex( m_queryPt );
-    }//end-if-compute
-
-    // redraw
-    updateGL();
-  }//end-if-findnb
-
-  /* EmptySphere mode - Shift+Left: show the empty sphere of the cell */
-  else if( m_curMode == EMPTYSPH && m_isPress ) {
-    m_isPress = false;
-    Vec pt;
-    m_hasEmptyS = computeIntersect( event->pos(), pt );
-    if( m_hasEmptyS ) {
-      m_queryPt = Point_3( pt.x, pt.y, pt.z );
-      // find the cell that contains point p in its interior
-      m_cellContain = m_pScene->m_dt.locate( m_queryPt );
-      // show error if point is outside the convex hull
-      if( m_pScene->m_dt.is_infinite( m_cellContain ) ) {
-        m_hasEmptyS = false;
-        displayMessage( tr("Query point is outside the convex hull!") );
-      } else { /* compute the empty sphere */
-        // find the circumcenter of the four vertices of c
-        m_centerPt = m_pScene->m_dt.dual( m_cellContain );
-        // compute the radius of the empty sphere
-        m_fREmptyS = sqrt( CGAL::squared_distance( m_centerPt,
-                             m_cellContain->vertex(0)->point() ) );
-      }
-    }//end-if-compute
-    // redraw
-    updateGL();
-  }//end-if-emptysphere
-
-  else
-    QGLViewer::mouseReleaseEvent(event);
-}
-
-void Viewer::wheelEvent(QWheelEvent *event)
-{
-  // Get event modifiers key
-#if QT_VERSION < 0x040000
-  // Bug in Qt : use 0x0f00 instead of Qt::KeyButtonMask with Qt versions < 3.1
-  const Qt::ButtonState modifiers = (Qt::ButtonState)(event->state() & Qt::KeyButtonMask);
-#else
-  const Qt::KeyboardModifiers modifiers = event->modifiers();
-#endif
-
-  if( (m_curMode == INSERT_V || m_curMode == FINDNB || m_curMode == EMPTYSPH )
-     && modifiers == Qt::SHIFT ) {
-    // delta() returns the distance that the wheel is rotated, in eighths of a degree.
-    //  note: most mouse types work in steps of 15 degrees
-    //  positive value: rotate forwards away from the user;
-    //  negative value: rotate backwards toward the user.
-    m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
-    if( m_fRadius < 0.1f )
-      m_fRadius = 0.1f;
-
-    // redraw
-    updateGL();
-  }//end-if-insv
-
-  else if( m_curMode == INSERT_PT && modifiers == Qt::SHIFT ) {
-    // delta() returns the distance that the wheel is rotated, in eighths of a degree.
-    //  note: most mouse types work in steps of 15 degrees
-    //  positive value: rotate forwards away from the user;
-    //  negative value: rotate backwards toward the user.
-  	float origR = m_fRadius;
-    m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
-    if( m_fRadius < 0.1f )
-      m_fRadius = 0.1f;
-    // update the new point and its conflict region
-    if( m_hasNewPt ) {
-      origR = m_fRadius / origR;
-      m_newPt = Point_3( m_newPt.x()*origR, m_newPt.y()*origR, m_newPt.z()*origR );
-      // compute the conflict hole induced by point p
-      computeConflict( m_newPt );
-    }//end-if-conflict
-
-    // redraw
-    updateGL();
-  }//end-if-inspt
-
-  // resize the trackball when moving a point
-  else if( m_curMode == MOVE && modifiers == Qt::SHIFT && m_isMoving ) {
-  	float origR = m_fRadius;
-    m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
-    if( m_fRadius < 0.1f )
-      m_fRadius = 0.1f;
-    origR = m_fRadius / origR;
-    Point_3 pt = m_pScene->m_vhArray.at( m_vidMoving )->point();
-    // note: QList::operator[] return a modifiable reference;
-    //   while QList::at return a const reference
-    // move_if_no_collision moves the point stored in v to pt
-    //  if there is not already another vertex placed on pt,
-    //  the triangulation is modified s.t. the new position of v is pt;
-    //  otherwise, the vertex at point pt is returned.
-    Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
-                               m_pScene->m_vhArray.at( m_vidMoving ),
-                               Point_3( pt.x()*origR, pt.y()*origR, pt.z()*origR ) );
-    int id1 = m_pScene->m_vhArray.indexOf( vh );
-    int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
-    // remove the duplicate in vhArray
-    if( id1 != m_vidMoving )
-      m_pScene->m_vhArray.removeAt( id1 );
-    else if( id2 != -1 )
-      m_pScene->m_vhArray.removeAt( id2 );
-    m_pScene->m_vhArray[m_vidMoving] = vh;
-
-    // redraw
-    updateGL();
-  }//end-if-move
-
-  else
-    QGLViewer::wheelEvent(event);
-}
-
-void Viewer::keyPressEvent(QKeyEvent *event)
-{
-  // Get event modifiers key
-#if QT_VERSION < 0x040000
-  // Bug in Qt : use 0x0f00 instead of Qt::KeyButtonMask with Qt versions < 3.1
-  const Qt::ButtonState modifiers = (Qt::ButtonState)(event->state() & Qt::KeyButtonMask);
-#else
-  const Qt::KeyboardModifiers modifiers = event->modifiers();
-#endif
-
-  /* Insert the newly inserted point as a vertex */
-  if( m_curMode == INSERT_PT && m_hasNewPt
-     && ( event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter )
-     && modifiers==Qt::NoButton ) {
-    Facet& f = m_boundaryFacets.first(); // a boundary facet, i.e. a pair (cell_handle, i)
-    // insert_in_hole will create a new vertex by starring a hole
-    //   i.e. delete all conflict cells, create a new vertex,
-    //        and for each boundary facet, create a new cell with the new vertex
-    // it takes in an iterator range of conflict cells which specifies a hole
-    //   and (begin, i) is a boundary facet that begin is one of the conflict cell
-    //   but begin->neighbor(i) is not
-    // it returns the handle of the new vertex
-    m_pScene->m_vhArray.push_back( m_pScene->m_dt.insert_in_hole( m_newPt, // the point
-                                     m_conflictCells.begin(), // cell_begin
-                                     m_conflictCells.end(), // cell_end
-                                     f.first, // cell_handle begin
-                                     f.second ) ); // integer i
-
-    m_hasNewPt = false;
-    // erase old conflict hole info
-    m_boundaryFacets.clear();
-    m_conflictCells.clear();
-
-  	// redraw
-    updateGL();
-  }//end-if-insVertex
-
-  /* Cancel the newly inserted point and its conflict region */
-  else if( m_curMode == INSERT_PT && m_hasNewPt
-     && event->key()==Qt::Key_Escape && modifiers==Qt::NoButton ) {
-    m_hasNewPt = false;
-    // erase old conflict hole info
-    m_boundaryFacets.clear();
-    m_conflictCells.clear();
-
-  	// redraw
-    updateGL();
-  }//end-if-escapeIns
-
-  /* Delete selected points */
-  else if( m_curMode == SELECT
-     && event->key()==Qt::Key_Delete && modifiers==Qt::NoButton ) {
-    // sort selected id's in descending order
-    qSort(m_vidSeled.begin(), m_vidSeled.end(), qGreater<int>());
-    for(QList<int>::iterator vit=m_vidSeled.begin(); vit<m_vidSeled.end(); ++vit) {
-      // remove the selected point from DT and vertex_handle_array
-      // note: QList::takeAt will removes the item at index position i and returns it.
-      m_pScene->m_dt.remove( m_pScene->m_vhArray.takeAt( *vit ) );
-  	}
-  	// clear the selection buffer
-  	m_vidSeled.clear();
-
-  	// redraw
-    updateGL();
-  }//end-if-del
-
-  /* Cancel the selection */
-  else if( m_curMode == SELECT
-     && event->key()==Qt::Key_Escape && modifiers==Qt::NoButton ) {
-  	// clear the selection buffer
-    for(QList<int>::iterator iit=m_vidSeled.begin(); iit<m_vidSeled.end(); ++iit) {
-      m_pScene->m_vhArray.at(*iit)->setSeled( false );
-    }
-  	m_vidSeled.clear();
-
-    // redraw
-    updateGL();
-  }//end-if-escapeSel
-
-
-  /* Show/hide the trackball when drawing the empty sphere */
-  else if( m_curMode == EMPTYSPH
-     && event->key()==Qt::Key_S && modifiers==Qt::NoButton ) {
-    m_showTrackball = !m_showTrackball;
-    // redraw
-    updateGL();
-  }//end-if-showBall
-
-  else
-    QGLViewer::keyPressEvent(event);
-}
-
-/*************************************************************/
-/*  Computation functions */
-
-bool Viewer::computeIntersect( const QPoint & pos, Vec & pt )
-{
-  Vec eye, dir;
-  // Compute eye position and direction to the clicked point,
-  //  used to draw a representation of the intersecting line
-  camera()->convertClickToLine( pos, eye, dir );
-  // Compute the intersection point with the sphere
-  //  note that the center of the sphere is at the origin (0, 0, 0)
-  //  thus, (1) pt = eye + t*dir and (2) dist( pt, origin ) = radius
-  //  i.e. (x_eye + t*x_dir)^2 + (y_eye + t*y_dir)^2 + (z_eye + t*z_dir)^2 = r^2
-  //  --> t^2( dir*dir ) + 2t( eye*dir ) + eye*eye - r^2 = 0
-  //      where "dir*dir" is the dot product of vector dir
-  //  we need to solve t and the smaller t (nearer to eye position) is what we want
-  float a = dir*dir;
-  float b = eye*dir;
-  float c = eye*eye - m_fRadius*m_fRadius;
-  float delta = b*b - a*c;
-  if( delta < 0 ) {
-    displayMessage( tr("Point is not on the sphere!") );
-    return false;
-  } else {
-    float t = ( (-1.)*b - sqrt(delta) ) / a;
-    pt = eye + t*dir;
-    return true;
-  }
-}
-
-void Viewer::computeConflict( Point_3 pt )
-{
-  // find the cell that contains point p in its interior
-  m_cellContain = m_pScene->m_dt.locate( pt );
-  // erase old conflict hole info
-  m_boundaryFacets.clear();
-  m_conflictCells.clear();
-  // show msg if point is outside the convex hull
-  if( m_pScene->m_dt.is_infinite( m_cellContain ) )
-    displayMessage( tr("Note: point is outside the convex hull.") );
-  // compute the conflict hole induced by point p
-  m_pScene->m_dt.find_conflicts( pt, // the point
-                  m_cellContain, // starting cell that must be in conflict
-                  std::back_inserter(m_boundaryFacets), // the facets on the boundary
-                  std::back_inserter(m_conflictCells) ); // the cells in conflict
-}
-
-/*************************************************************/
-/*  Animation functions */
-
-void Viewer::toggleIncremental(bool on) {
-  if( on ) {  // play
-    if( m_incrementalPts.isEmpty() ) {
-      /* start play */
-      if( m_pScene->m_dt.number_of_vertices() == 0 ) {
-        CGAL::Random_points_in_cube_3<Point_3> pts_generator(1.0);
-        CGAL::cpp11::copy_n( pts_generator, 100, std::back_inserter(m_incrementalPts) );
-      } else {
-        for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
-            vit < m_pScene->m_vhArray.end(); ++vit) {
-          m_incrementalPts.push_back( (*vit)->point() );
-        }//end-for
-        // erase existing vertices
-        initClean();
-      }//end-if-pts
-      // sorts points in a way that improves space locality
-      CGAL::spatial_sort( m_incrementalPts.begin(), m_incrementalPts.end() );
-      // set the current to "hightlight the new point"
-      m_curStep = INIT;
-    }/* else resume play */
-
-    // set up the timer
-    m_pTimer->start(1000);
-  } else { // pause
-    m_pTimer->stop();
-  }
-
-  // redraw
-  updateGL();
-}
-
-void Viewer::stopIncremental() {
-  if( !m_incrementalPts.isEmpty() ) {
-    // will call toggleIncremental to stop the timer
-    emit( stopIncAnimation() );
-
-    // insert the rest points
-    for(QList<Point_3>::iterator pit=m_incrementalPts.begin();
-        pit < m_incrementalPts.end(); ++pit) {
-      Vertex_handle hint;
-      if( m_pScene->m_vhArray.isEmpty() ) {
-        hint = m_pScene->m_dt.insert( *pit );
-      } else {
-        hint = m_pScene->m_vhArray.last();
-        hint = m_pScene->m_dt.insert( *pit, hint );
-      }
-      m_pScene->m_vhArray.push_back( hint );
-    }
-    m_incrementalPts.clear();
-  }
-
-  // redraw
-  updateGL();
-}
-
-void Viewer::incremental_insert() {
-  Vertex_handle hint;
-  if( !m_incrementalPts.isEmpty() ) {
-  	switch( m_curStep ) {
-  	case INIT:  // end of INIT: get the next-to-insert point
-      m_curIncPt = m_incrementalPts.at(0);
-      m_curStep = NEWPT;
-  	  break;
-    case NEWPT:  // end of NEWPT: locate the cell containing the point
-      if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 ) {
-        computeConflict( m_curIncPt );
-        m_curStep = CELL;
-      }
-      else {
-        // popup the first point and insert it
-        m_curIncPt = m_incrementalPts.takeFirst();
-        if( m_pScene->m_vhArray.isEmpty() ) {
-          hint = m_pScene->m_dt.insert( m_curIncPt );
-        }
-        else {
-          hint = m_pScene->m_vhArray.last();
-          hint = m_pScene->m_dt.insert( m_curIncPt, hint );
-        }
-        m_pScene->m_vhArray.push_back( hint );
-        m_curStep = INIT;
-      }
-      break;
-    case CELL:  // end of CELL: compute the conflict region
-      m_curStep = CONFLICT;
-      break;
-    case CONFLICT:  // end of CONFLICT: do the insertion and go back to INIT
-      // popup the first point and insert it
-      m_curIncPt = m_incrementalPts.takeFirst();
-      if( m_pScene->m_vhArray.isEmpty() ) {
-        hint = m_pScene->m_dt.insert( m_curIncPt );
-      } else {
-        hint = m_pScene->m_vhArray.last();
-        hint = m_pScene->m_dt.insert( m_curIncPt, hint );
-      }
-      m_pScene->m_vhArray.push_back( hint );
-      m_curStep = INIT;
-      break;
-  	}//end-of-switch
-  } else {
-    /* if finished, then start over */
-    for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
-        vit < m_pScene->m_vhArray.end(); ++vit) {
-      m_incrementalPts.push_back( (*vit)->point() );
-    }//end-for
-    // erase existing vertices
-    initClean();
-    // set the current to "hightlight the new point"
-    m_curStep = INIT;
-  }
-
-  // redraw
-  updateGL();
-}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.h b/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.h
deleted file mode 100644
index 1d6e86c..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3/Viewer.h
+++ /dev/null
@@ -1,290 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include "Scene.h"
-#include <QGLViewer/qglviewer.h>
-#include <QMouseEvent>
-#include <QKeyEvent>
-#include <QSettings>
-#include "PreferenceDlg.h"
-
-#include <iostream>
-using namespace qglviewer;
-
-class MainWindow;
-
-class Viewer : public QGLViewer {
-
-  Q_OBJECT
-
-public:
-  Viewer(QWidget* parent)
-    : QGLViewer(parent)
-    , m_showAxis(false)
-    , m_showVertex(true)
-    , m_showDEdge(true)
-    , m_showVEdge(false)
-    , m_showFacet(false)
-    , m_isFlat(false)
-    , m_fRadius(1.)
-    , m_curMode(NONE)
-    , m_isPress(false)
-    , m_isMoving(false)
-    , m_hasNewPt(false)
-    , m_selMode(NORMAL)
-    , m_nearestNb(NULL)
-    , m_hasEmptyS(false)
-    , m_showTrackball(true)
-    , m_pDlgPrefer(NULL)
-   {}
-
-  enum Mode { NONE, INSERT_V, INSERT_PT, MOVE, SELECT, FINDNB, EMPTYSPH };
-
-public:
-  inline void setScene(Scene* pScene) { m_pScene = pScene; }
-
-  // set current mode
-  inline void setMode(Mode m) {
-    m_curMode = m;
-    m_isMoving = false;
-    m_hasEmptyS = false;
-    m_nearestNb = NULL;
-    updateGL();
-  }
-
-  // set selectBuffer size (if necessary)
-  inline void setSelBuffSize() {
-    // Default selectBuffer size is 4000
-    // (i.e. 1000 objects in selection region, since each object pushes 4 values).
-    if( m_pScene->m_vhArray.size() > 900 )
-      // The previous selectBuffer is deleted and a new one is created.
-      setSelectBufferSize( 4*(m_pScene->m_vhArray.size() + 100) );
-  }
-
-  void readSettings() {
-    // read from an .ini file
-    QSettings settings("settings.ini", QSettings::IniFormat);
-    // QVariant value ( const QString & key, const QVariant & defaultValue = QVariant() )
-    // Because QVariant is part of the QtCore library,
-    //   it cannot provide conversion functions to data types such as QColor and QImage,
-    //   which are part of QtGui.
-    // In other words, there is no toColor(), toImage(), or toPixmap() functions in QVariant.
-    // Instead, use the QVariant::value() or the qVariantValue() template function
-    m_colorVertex = settings.value( "Show/vertexcolor", QColor(255, 150, 0) ).value<QColor>();
-#if QT_VERSION >= 0x040600
-    m_fSizeVertex = settings.value( "Show/vertexsize", 0.04f ).toFloat();
-#else
-    m_fSizeVertex = settings.value( "Show/vertexsize", 0.04f ).value<float>();
-#endif
-    m_colorDEdge = settings.value( "Show/dedgecolor", QColor(0, 255, 0) ).value<QColor>();
-#if QT_VERSION >= 0x040600
-    m_fSizeDEdge = settings.value( "Show/dedgesize", 0.01f ).toFloat();
-#else
-    m_fSizeDEdge = settings.value( "Show/dedgesize", 0.01f ).value<float>();
-#endif
-    m_colorVEdge = settings.value( "Show/vedgecolor", QColor(0, 0, 255) ).value<QColor>();
-#if QT_VERSION >= 0x040600
-    m_fSizeVEdge = settings.value( "Show/vedgesize", 0.01f ).toFloat();
-#else
-    m_fSizeVEdge = settings.value( "Show/vedgesize", 0.01f ).value<float>();
-#endif
-    m_colorFacet = settings.value( "Show/facetcolor",
-                             QColor(255, 255, 0, 96) ).value<QColor>();
-    m_colorTrackball = settings.value( "Show/ballcolor",
-                                 QColor(150, 150, 150, 128) ).value<QColor>();
-    m_iStep = settings.value( "Show/ballstep", 4000 ).toInt();
-    m_colorEmptySphere = settings.value( "Show/spherecolor",
-                                   QColor(180, 50, 180, 64) ).value<QColor>();
-  }
-
-  void writeSettings() {
-    // write to an .ini file
-    QSettings settings("settings.ini", QSettings::IniFormat);
-    // The inverse conversion (e.g., from QColor to QVariant) is automatic
-    //   for all data types supported by QVariant, including GUI-related types
-    settings.setValue("Show/vertexcolor", m_colorVertex);
-    settings.setValue("Show/vertexsize", m_fSizeVertex);
-    settings.setValue("Show/dedgecolor", m_colorDEdge);
-    settings.setValue("Show/dedgesize", m_fSizeDEdge);
-    settings.setValue("Show/vedgecolor", m_colorVEdge);
-    settings.setValue("Show/vedgesize", m_fSizeVEdge);
-    settings.setValue("Show/facetcolor", m_colorFacet);
-    settings.setValue("Show/ballcolor", m_colorTrackball);
-    settings.setValue("Show/ballstep", m_iStep);
-    settings.setValue("Show/spherecolor", m_colorEmptySphere);
-  }
-
-public slots :
-  // clear scene
-  void clear() {
-    m_pScene->eraseOldData();
-    m_hasNewPt = false;
-    m_boundaryFacets.clear();
-    m_conflictCells.clear();
-    m_vidSeled.clear();
-    m_isMoving = false;
-    m_nearestNb = NULL;
-    m_hasEmptyS = false;
-    if( !m_incrementalPts.isEmpty() ) {
-      emit( stopIncAnimation() );
-      m_incrementalPts.clear();
-    }
-  }
-
-  // play/pause incremental construction
-  void toggleIncremental(bool on);
-  // clean up old data and information
-  void initClean() {
-    m_pScene->eraseOldData();
-    m_hasNewPt = false;
-    m_boundaryFacets.clear();
-    m_conflictCells.clear();
-    m_vidSeled.clear();
-    m_isMoving = false;
-    m_nearestNb = NULL;
-    m_hasEmptyS = false;
-  }
-  // stop incremental construction
-  void stopIncremental();
-  // incremental insert a vertex (invoked by Timer)
-  void incremental_insert();
-
-  // show options
-  inline void toggleShowAxis(bool flag)  { m_showAxis = flag; updateGL(); }
-  inline void toggleShowVertex(bool flag)  { m_showVertex = flag; updateGL(); }
-  inline void toggleShowDEdge(bool flag)  { m_showDEdge = flag; updateGL(); }
-  inline void toggleShowVEdge(bool flag)  { m_showVEdge = flag; updateGL(); }
-  inline void toggleShowFacet(bool flag)  { m_showFacet = flag; updateGL(); }
-  inline void toggleFlat(bool flag)  { m_isFlat = flag; updateGL(); }
-
-  // set preferences
-  void setPreferences() {
-    if (!m_pDlgPrefer) {
-      m_pDlgPrefer = new PreferenceDlg(this);
-      m_pDlgPrefer->init( m_colorVertex, m_fSizeVertex, m_colorDEdge, m_fSizeDEdge, m_colorVEdge, m_fSizeVEdge,
-              m_colorFacet, m_colorTrackball, m_colorEmptySphere, m_iStep/40 ); // 5*8, 5 degrees of wheel
-      connect(m_pDlgPrefer, SIGNAL(applyChanges()), this, SLOT(acceptChanges()) );
-    }
-    m_pDlgPrefer->show();
-    m_pDlgPrefer->raise();
-    m_pDlgPrefer->activateWindow();
-  }
-
-  void acceptChanges() {
-    m_colorVertex = m_pDlgPrefer->m_colorVertex;
-    m_fSizeVertex = m_pDlgPrefer->m_fSizeVertex;
-    m_colorDEdge = m_pDlgPrefer->m_colorDEdge;
-    m_fSizeDEdge = m_pDlgPrefer->m_fSizeDEdge;
-    m_colorVEdge = m_pDlgPrefer->m_colorVEdge;
-    m_fSizeVEdge = m_pDlgPrefer->m_fSizeVEdge;
-    m_colorFacet = m_pDlgPrefer->m_colorFacet;
-    m_colorTrackball = m_pDlgPrefer->m_colorTrackball;
-    m_iStep = m_pDlgPrefer->m_iStep*40;
-    m_colorEmptySphere = m_pDlgPrefer->m_colorEmptySphere;
-    // redraw
-    updateGL();
-  }
-
-  signals:
-  void stopIncAnimation();
-
-// overloading QGLViewer virtual functions
-protected:
-  // initialize Viewer OpenGL context
-  // Note: the default implement is empty and this is overloading.
-  void init();
-  // draw points, segments, and polygons
-  void draw();
-
-  // customize selection process
-  void drawWithNames();
-  void endSelection(const QPoint& point);
-  // customize mouse events
-  void mousePressEvent(QMouseEvent *event);
-  void mouseMoveEvent(QMouseEvent *event);
-  void mouseReleaseEvent(QMouseEvent *event);
-  void wheelEvent(QWheelEvent *event);
-  // customize key events
-  void keyPressEvent(QKeyEvent *event);
-
-  // customize help message
-  QString helpString() const;
-
-private:
-  // draw a 3d effect vertex
-  void drawVertex(const Point_3& p, const QColor& clr, float r);
-  // draw a 3d effect edge
-  void drawEdge(const Point_3& from, const Point_3& to, const QColor& clr, float r);
-  // draw a facet
-  void drawFacet(const Triangle_3& t, const QColor& clr);
-  // draw a sphere with/without Axis
-  void drawSphere(float r, const QColor& clr, const Point_3& center=CGAL::ORIGIN);
-
-  // test whether the give 3D point is on the sphere
-  inline bool isOnSphere( const Point_3 & pt ) {
-    return ( (pt.x()*pt.x() + pt.y()*pt.y() + pt.z()*pt.z()) == (m_fRadius*m_fRadius) );
-  }
-
-  // compute the intersection point with the sphere
-  bool computeIntersect( const QPoint & pos, Vec & pt );
-  // compute the conflict region
-  void computeConflict( Point_3 pt );
-
-private:
-  Scene* m_pScene;
-  // play timer
-  QTimer* m_pTimer;
-  Point_3 m_curIncPt;
-  QList<Point_3> m_incrementalPts;
-  enum Step { INIT, NEWPT, CELL, CONFLICT };
-  Step m_curStep;
-  Cell_handle m_cellContain;
-  QList<Facet> m_boundaryFacets;
-  QList<Cell_handle> m_conflictCells;
-  // show options
-  bool m_showAxis;
-  bool m_showVertex;
-  bool m_showDEdge;
-  bool m_showVEdge;
-  bool m_showFacet;
-  bool m_isFlat;
-  // trackball
-  float m_fRadius;
-  // mode
-  Mode m_curMode;
-  bool m_isPress;
-  bool m_isMoving;
-  // insert point
-  bool m_hasNewPt;
-  Point_3 m_newPt;
-  // select vertex
-  enum selectionMode { NORMAL, ADD };
-  selectionMode m_selMode;
-  QRect m_rectSel;
-  QList<int> m_vidSeled;
-  // move vertex/point
-  int m_vidMoving;
-  // nearest neighbor
-  Point_3 m_queryPt;
-  Vertex_handle m_nearestNb;
-  // empty sphere
-  bool m_hasEmptyS;
-  bool m_showTrackball;
-  Point_3 m_centerPt;
-  float m_fREmptyS;
-  // change colors
-  PreferenceDlg* m_pDlgPrefer;
-  float m_fSizeVertex;
-  float m_fSizeDEdge;
-  float m_fSizeVEdge;
-  QColor m_colorVertex;
-  QColor m_colorDEdge;
-  QColor m_colorVEdge;
-  QColor m_colorFacet;
-  QColor m_colorTrackball;
-  QColor m_colorEmptySphere;
-  // trackball resizing fineness
-  int m_iStep;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/CMakeLists.txt b/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/CMakeLists.txt
deleted file mode 100644
index 0550a77..0000000
--- a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Triangulation_3_Demo )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  create_single_source_cgal_program( "Triangulation_3_demo.cpp" )
-  create_single_source_cgal_program( "Triangulation_3_color_demo.cpp" )
-  create_single_source_cgal_program( "Triangulation_3_remove_demo.cpp" )
-  create_single_source_cgal_program( "Triangulation_3_voronoi_demo.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/doc_html/index.html b/3rdparty/CGAL-4.6/doc_html/index.html
deleted file mode 100644
index 81ff1c8..0000000
--- a/3rdparty/CGAL-4.6/doc_html/index.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
-<html lang="en-US">
-<head>
-  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-  <link rel="shortcut icon" href="cgal.ico">
-  <TITLE>CGAL - Computational Geometry Algorithms Library</TITLE>
-  <LINK REL=stylesheet TYPE="text/css" HREF="cgal.css">	  
-</head>
-
-<body>
-
-    <CENTER>
-        <IMG SRC="images/cgal_2013_grey.png" ALT="CGAL">
-    </CENTER>
-    <CENTER>
-        <span class=subtitle>Computational Geometry Algorithms Library</span>
-    </CENTER>
-
-
-
-<p>
-The goal of the CGAL Open Source Project is to provide 
-<em>easy access to efficient and reliable geometric algorithms</em>
-in the form of a C++ library.
-</p>
-
-<h3>Manuals</h3>
-
-<ul>
-<li><a href ="Manual/index.html">CGAL Manual - Table of Contents</a>
-<li><a href ="Manual/packages.html">CGAL Manual - Package Overview</a>
-<li>You can also access the CGAL Online Manual from the
-  <a href="http://www.cgal.org/">CGAL website</a>.
-</ul>
-
-
-
-<h3>Further Links</h3>
-
-<ul>
-<li><a href ="http://www.cgal.org/">CGAL Homepage</a>
-<li><a href ="http://www.cgal.org/FAQ.html#installation">FAQ concerning Installation</a>
-<li><a href ="http://www.boost.org/doc/">Boost Documentation</a>
-<li><a href ="http://en.cppreference.com/w/">STL Reference</a>
-</ul>
-
-
-<h3>License</h3>
-
-<p>CGAL is distributed under a dual-license scheme.  CGAL can be used together
-with Open Source software free of charge.  Using CGAL in other contexts can be
-done by obtaining a commercial license from
-<a href="http://www.geometryfactory.com">GeometryFactory</a>.
-For more details see the <a href="http://www.cgal.org/license.html">License</a> page.
-<p>
-
-</body>
-</html>
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/AABB_tree/CMakeLists.txt
deleted file mode 100644
index 2deb035..0000000
--- a/3rdparty/CGAL-4.6/examples/AABB_tree/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( AABB_tree_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "AABB_custom_example.cpp" )
-  create_single_source_cgal_program( "AABB_custom_indexed_triangle_set_array_example.cpp" )
-  create_single_source_cgal_program( "AABB_custom_indexed_triangle_set_example.cpp" )
-  create_single_source_cgal_program( "AABB_custom_triangle_soup_example.cpp" )
-  create_single_source_cgal_program( "AABB_face_graph_triangle_example.cpp" )
-  create_single_source_cgal_program( "AABB_halfedge_graph_edge_example.cpp" )
-  create_single_source_cgal_program( "AABB_insertion_example.cpp" )
-  create_single_source_cgal_program( "AABB_polyhedron_edge_example.cpp" )
-  create_single_source_cgal_program( "AABB_polyhedron_facet_distance_example.cpp" )
-  create_single_source_cgal_program( "AABB_polyhedron_facet_intersection_example.cpp" )
-  create_single_source_cgal_program( "AABB_segment_3_example.cpp" )
-  create_single_source_cgal_program( "AABB_triangle_3_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Algebraic_foundations/CMakeLists.txt
deleted file mode 100644
index 2aac27b..0000000
--- a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Algebraic_foundations_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "algebraic_structure_dispatch.cpp" )
-  create_single_source_cgal_program( "fraction_traits.cpp" )
-  create_single_source_cgal_program( "implicit_interoperable_dispatch.cpp" )
-  create_single_source_cgal_program( "integralize.cpp" )
-  create_single_source_cgal_program( "interoperable.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/CMakeLists.txt
deleted file mode 100644
index 3d99075..0000000
--- a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Algebraic_kernel_d_test )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core MPFI)
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-  include( CGAL_VersionUtils )
-
-  include_directories (BEFORE ../../include)
-
-  create_single_source_cgal_program( "Compare_1.cpp" )
-  create_single_source_cgal_program( "Construct_algebraic_real_1.cpp" )
-  create_single_source_cgal_program( "Isolate_1.cpp" )
-  create_single_source_cgal_program( "Sign_at_1.cpp" )
-  create_single_source_cgal_program( "Solve_1.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/CMakeLists.txt
deleted file mode 100644
index 8b7fb3e..0000000
--- a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Alpha_shapes_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "ex_alpha_shapes_2.cpp" )
-  create_single_source_cgal_program( "ex_weighted_alpha_shapes_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/data/fin b/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/data/fin
deleted file mode 100644
index 3567d2f..0000000
--- a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/data/fin
+++ /dev/null
@@ -1,207 +0,0 @@
-206 
-39 498
-57 502
-70 496
-606 495
-25 492
-54 492
-61 494
-78 494
-85 494
-101 485
-114 487
-119 487
-126 490
-140 488
-148 493
-598 485
-623 492
-34 481
-163 480
-169 475
-184 483
-194 478
-337 482
-354 478
-590 477
-621 480
-25 471
-196 467
-211 466
-224 474
-234 466
-244 468
-246 474
-259 465
-267 466
-277 474
-289 469
-298 466
-309 472
-316 467
-333 466
-363 465
-367 465
-576 474
-633 465
-17 458
-383 455
-394 456
-578 456
-617 459
-20 452
-366 451
-413 454
-423 450
-432 449
-441 447
-567 452
-612 449
-20 439
-380 436
-391 439
-399 444
-427 439
-562 440
-606 440
-17 426
-433 431
-453 431
-456 431
-537 433
-545 425
-605 433
-17 417
-424 422
-435 423
-459 421
-532 421
-607 415
-10 414
-419 406
-438 412
-460 413
-469 406
-524 410
-609 412
-13 396
-415 401
-444 403
-482 399
-519 395
-603 395
-13 385
-417 390
-439 386
-479 393
-512 385
-585 392
--5 379
-415 380
-439 384
-478 381
-487 379
-499 380
-584 378
--2 367
-419 371
-431 368
-585 367
-10 356
-576 361
-11 345
-582 353
-9 342
-579 335
-16 331
-567 333
-20 319
-574 320
-23 314
-568 306
-22 299
-582 302
-25 290
-571 293
-31 280
-560 284
-34 268
-547 270
-42 259
-45 263
-553 263
-48 248
-543 248
-58 237
-68 241
-77 241
-539 237
-85 225
-525 229
-536 233
-103 221
-106 224
-171 222
-176 220
-188 218
-526 219
-122 209
-132 209
-144 212
-150 205
-164 209
-202 213
-525 208
-214 204
-452 197
-525 197
-206 192
-430 189
-444 192
-455 193
-469 190
-484 189
-493 188
-535 193
-216 184
-259 183
-363 175
-370 178
-377 183
-387 181
-415 176
-504 177
-511 177
-536 181
-221 173
-230 169
-243 166
-249 171
-269 173
-343 172
-350 172
-404 167
-410 170
-420 171
-517 174
-545 172
-274 158
-342 156
-522 163
-553 155
-279 149
-332 148
-524 149
-548 146
-275 140
-320 138
-530 142
-547 139
-286 127
-296 132
-319 130
-525 126
-538 131
-301 124
-305 117
-321 119
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp b/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp
deleted file mode 100644
index 8680bd0..0000000
--- a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Weighted_point.h>
-#include <CGAL/Weighted_alpha_shape_euclidean_traits_2.h>
-#include <CGAL/Regular_triangulation_2.h>
-#include <CGAL/Alpha_shape_2.h>
-
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <list>
-
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::FT FT;
-typedef K::Point_2 Point_base;
-typedef CGAL::Weighted_point<Point_base,FT>  Point;
-
-typedef CGAL::Weighted_alpha_shape_euclidean_traits_2<K> Gt;
-typedef CGAL::Regular_triangulation_vertex_base_2<Gt> Rvb;
-typedef CGAL::Alpha_shape_vertex_base_2<Gt,Rvb> Vb;
-typedef CGAL::Regular_triangulation_face_base_2<Gt> Rf;
-typedef CGAL::Alpha_shape_face_base_2<Gt, Rf>  Fb;
-
-typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
-typedef CGAL::Regular_triangulation_2<Gt,Tds> Triangulation_2;
-
-typedef CGAL::Alpha_shape_2<Triangulation_2>  Alpha_shape_2;
-
-typedef Alpha_shape_2::Alpha_shape_edges_iterator Alpha_shape_edges_iterator;
-
-template <class InputIterator, class OutputIterator>
-void
-alpha_edges(InputIterator begin, InputIterator end,
-	    const FT &Alpha,
-	    bool mode,
-	    OutputIterator out)
-  // Generate Alpha Shape
-{
-  std::vector<Gt::Segment_2> V_seg;
-  Alpha_shape_2 A(begin,end);
-
-  if (mode)
-    { A.set_mode(Alpha_shape_2::GENERAL); }
-  else
-    { A.set_mode(Alpha_shape_2::REGULARIZED); };
-  A.set_alpha(Alpha);
-
-  for(Alpha_shape_edges_iterator it =  A.alpha_shape_edges_begin();
-      it != A.alpha_shape_edges_end();
-      ++it){
-    *out++ = A.segment(*it);
-  }
-}
-
-bool
-file_input(std::list<Point>& L)
-{
-
-  std::ifstream is("./data/fin", std::ios::in);
-
-  if(is.fail())
-    {
-      std::cerr << "unable to open file for input" << std::endl;
-      return false;
-    }
-
-  CGAL::set_ascii_mode(is);
-
-  int n;
-  is >> n;
-  std::cout << "Reading " << n << " points" << std::endl;
-  for( ; n>0 ; n--)
-    {
-      Point_base p;
-      is >> p;
-      if(is) {
-        L.push_back(Point (p, FT(10)));
-      } else {
-        return false;
-      }
-    }
-  std::cout << "Points inserted" << std::endl;
-  return true;
-}
-
-
-// Reads a list of points and returns a list of segments corresponding to
-// the weighted Alpha Shape.
-int main()
-{
-  std::list<Point> points;
-  file_input(points);
-  std::vector<Gt::Segment_2> segments;
-  alpha_edges(points.begin(), points.end(),
-	      FT(10000),Alpha_shape_2::GENERAL,
-	      std::back_inserter(segments));
-  std::cout << segments.size() << " alpha shape edges." << std::endl;
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/CMakeLists.txt
deleted file mode 100644
index 3b61355..0000000
--- a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Alpha_shapes_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "ex_alpha_shapes_3.cpp" )
-  create_single_source_cgal_program( "ex_alpha_shapes_exact_alpha.cpp" )
-  create_single_source_cgal_program( "ex_alpha_shapes_with_fast_location_3.cpp" )
-  create_single_source_cgal_program( "ex_fixed_weighted_alpha_shapes_3.cpp" )
-  create_single_source_cgal_program( "ex_periodic_alpha_shapes_3.cpp" )
-  create_single_source_cgal_program( "ex_weighted_alpha_shapes_3.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp b/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp
deleted file mode 100644
index 99f1dbe..0000000
--- a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-#include <CGAL/Alpha_shape_3.h>
-
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_3.h>
-
-// Traits
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_traits_3<K> PK;
-
-// Vertex type
-typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> DsVb;
-typedef CGAL::Triangulation_vertex_base_3<PK,DsVb> Vb;
-typedef CGAL::Alpha_shape_vertex_base_3<PK,Vb> AsVb;
-// Cell type
-typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> DsCb;
-typedef CGAL::Triangulation_cell_base_3<PK,DsCb> Cb;
-typedef CGAL::Alpha_shape_cell_base_3<PK,Cb> AsCb;
-
-typedef CGAL::Triangulation_data_structure_3<AsVb,AsCb> Tds;
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<PK,Tds> P3DT3;
-typedef CGAL::Alpha_shape_3<P3DT3>  Alpha_shape_3;
-
-typedef PK::Point_3                                 Point;
-
-int main()
-{
-  typedef CGAL::Creator_uniform_3<double, Point> Creator;
-  CGAL::Random random(7);
-  CGAL::Random_points_in_cube_3<Point, Creator> in_cube(1, random);
-  std::vector<Point> pts;
-
-  // Generating 1000 random points
-  for (int i=0 ; i < 1000 ; i++) {
-    Point p = *in_cube++;
-    pts.push_back(p);
-  }
-
-  // Define the periodic cube
-  P3DT3 pdt(PK::Iso_cuboid_3(-1,-1,-1,1,1,1));
-  // Heuristic for inserting large point sets (if pts is reasonably large)
-  pdt.insert(pts.begin(), pts.end(), true);
-  // As pdt won't be modified anymore switch to 1-sheeted cover if possible
-  if (pdt.is_triangulation_in_1_sheet()) pdt.convert_to_1_sheeted_covering();
-  std::cout << "Periodic Delaunay computed." << std::endl;
-
-  // compute alpha shape
-  Alpha_shape_3 as(pdt);
-  std::cout << "Alpha shape computed in REGULARIZED mode by default."
-	    << std::endl;
-
-   // find optimal alpha values
-  Alpha_shape_3::NT alpha_solid = as.find_alpha_solid();
-  Alpha_shape_3::Alpha_iterator opt = as.find_optimal_alpha(1);
-  std::cout << "Smallest alpha value to get a solid through data points is "
-	    << alpha_solid << std::endl;
-  std::cout << "Optimal alpha value to get one connected component is "
-	    <<  *opt    << std::endl;
-  as.set_alpha(*opt);
-  assert(as.number_of_solid_components() == 1);
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/CMakeLists.txt
deleted file mode 100644
index 0cbed16..0000000
--- a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Apollonius_graph_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "ag2_exact_traits.cpp" )
-  create_single_source_cgal_program( "ag2_exact_traits_sqrt.cpp" )
-  create_single_source_cgal_program( "ag2_filtered_traits_no_hidden.cpp" )
-  create_single_source_cgal_program( "ag2_hierarchy.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp b/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp
deleted file mode 100644
index 86c0e9e..0000000
--- a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <CGAL/basic.h>
-
-// standard includes
-#include <iostream>
-#include <fstream>
-#include <cassert>
-
-
-#if defined CGAL_USE_LEDA
-#  include <CGAL/leda_real.h>
-#elif defined CGAL_USE_CORE
-#  include <CGAL/CORE_Expr.h>
-#endif
-
-// *** WARNING ***
-// The use of a kernel based on an exact number type is highly inefficient.
-// It is used in this example primarily for illustration purposes.
-// In an efficiency critical context, and/or for the purposes of
-// benchmarking the Apollonius_graph_filtered_traits_2<> class should
-// be used.
-
-#if defined CGAL_USE_LEDA
-// If LEDA is present use leda_real as the exact number type
-typedef leda_real NT;
-
-#elif defined CGAL_USE_CORE
-// Otherwise if CORE is present use CORE's Expr as the exact number type
-typedef CORE::Expr NT;
-
-#else
-
-// Otherwise just use double. This may cause numerical errors but it
-// is still worth doing it to show how to define correctly the traits
-// class
-typedef double NT;
-
-#endif
-
-
-#include <CGAL/Simple_cartesian.h>
-
-typedef CGAL::Simple_cartesian<NT>  Kernel;
-
-
-// typedefs for the traits and the algorithm
-
-#include <CGAL/Apollonius_graph_2.h>
-#include <CGAL/Apollonius_graph_traits_2.h>
-
-// the traits class is now going to assume that the operations
-// +,-,*,/ and sqrt are supported exactly
-typedef
-CGAL::Apollonius_graph_traits_2<Kernel,CGAL::Field_with_sqrt_tag> Traits;
-
-typedef CGAL::Apollonius_graph_2<Traits> Apollonius_graph;
-
-
-
-int main()
-{
-  std::ifstream ifs("data/sites.cin");
-  assert( ifs );
-
-  Apollonius_graph ag;
-  Apollonius_graph::Site_2 site;
-
-  // read the sites and insert them in the Apollonius graph
-  while ( ifs >> site ) {
-    ag.insert(site);
-  }
-
-  // validate the Apollonius graph
-  assert( ag.is_valid(true, 1) );
-  std::cout << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/CMakeLists.txt
deleted file mode 100644
index 13212bf..0000000
--- a/3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Approximate_min_ellipsoid_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "ellipsoid.cpp" )
-  create_single_source_cgal_program( "ellipsoid_for_maple.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/CMakeLists.txt
deleted file mode 100644
index 52f3393..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/CMakeLists.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Arrangement_on_surface_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Bezier_curves.cpp" )
-  create_single_source_cgal_program( "aggregated_insertion.cpp" )
-  create_single_source_cgal_program( "algebraic_curves.cpp" )
-  create_single_source_cgal_program( "algebraic_segments.cpp" )
-  create_single_source_cgal_program( "batched_point_location.cpp" )
-  create_single_source_cgal_program( "bgl_dual_adapter.cpp" )
-  create_single_source_cgal_program( "bgl_primal_adapter.cpp" )
-  create_single_source_cgal_program( "bounded_planar_vertical_decomposition.cpp" )
-  create_single_source_cgal_program( "circles.cpp" )
-  create_single_source_cgal_program( "circular_arcs.cpp" )
-  create_single_source_cgal_program( "circular_line_arcs.cpp" )
-  create_single_source_cgal_program( "conic_multiplicities.cpp" )
-  create_single_source_cgal_program( "conics.cpp" )
-  create_single_source_cgal_program( "consolidated_curve_data.cpp" )
-  create_single_source_cgal_program( "curve_history.cpp" )
-  create_single_source_cgal_program( "dcel_extension.cpp" )
-  create_single_source_cgal_program( "dcel_extension_io.cpp" )
-  create_single_source_cgal_program( "dual_lines.cpp" )
-  create_single_source_cgal_program( "dual_with_data.cpp" )
-  create_single_source_cgal_program( "edge_insertion.cpp" )
-  create_single_source_cgal_program( "edge_manipulation.cpp" )
-  create_single_source_cgal_program( "edge_manipulation_curve_history.cpp" )
-  create_single_source_cgal_program( "face_extension.cpp" )
-  create_single_source_cgal_program( "face_extension_overlay.cpp" )
-  create_single_source_cgal_program( "generic_curve_data.cpp" )
-  create_single_source_cgal_program( "global_insertion.cpp" )
-  create_single_source_cgal_program( "global_removal.cpp" )
-  create_single_source_cgal_program( "incremental_insertion.cpp" )
-  create_single_source_cgal_program( "io.cpp" )
-  create_single_source_cgal_program( "io_curve_history.cpp" )
-  create_single_source_cgal_program( "io_unbounded.cpp" )
-  create_single_source_cgal_program( "isolated_vertices.cpp" )
-  create_single_source_cgal_program( "observer.cpp" )
-  create_single_source_cgal_program( "overlay.cpp" )
-  create_single_source_cgal_program( "overlay_unbounded.cpp" )
-  create_single_source_cgal_program( "point_location_example.cpp" )
-  create_single_source_cgal_program( "polylines.cpp" )
-  create_single_source_cgal_program( "predefined_kernel.cpp" )
-  create_single_source_cgal_program( "predefined_kernel_non_intersecting.cpp" )
-  create_single_source_cgal_program( "rational_functions.cpp" )
-  create_single_source_cgal_program( "rational_functions_rational_coefficients.cpp" )
-  create_single_source_cgal_program( "special_edge_insertion.cpp" )
-  create_single_source_cgal_program( "spherical_insert.cpp" )
-  create_single_source_cgal_program( "sweep_line.cpp" )
-  create_single_source_cgal_program( "tracing_counting.cpp" )
-  create_single_source_cgal_program( "unb_planar_vertical_decomposition.cpp" )
-  create_single_source_cgal_program( "unbounded_non_intersecting.cpp" )
-  create_single_source_cgal_program( "unbounded_rational_functions.cpp" )
-  create_single_source_cgal_program( "vertical_ray_shooting.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_rational_nt.h b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_rational_nt.h
deleted file mode 100644
index 885843f..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_rational_nt.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef CGAL_ARR_RATIONAL_NT_H
-#define CGAL_ARR_RATIONAL_NT_H
-
-#include <CGAL/basic.h>
-
-#ifdef CGAL_USE_GMP
-
-  // GMP is installed. Use the GMP rational number-type. 
-  #include <CGAL/Gmpq.h>
-
-  typedef CGAL::Gmpq                                    Number_type;
-
-#else
-
-  // GMP is not installed. Use CGAL's exact rational number-type.
-  #include <CGAL/MP_Float.h>
-  #include <CGAL/Quotient.h>
-
-  typedef CGAL::Quotient<CGAL::MP_Float>                Number_type;
-
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
deleted file mode 100644
index 745291d..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
-// Adapting the dual of an arrangement to a BGL graph.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_extended_dcel.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/graph_traits_Dual_Arrangement_2.h>
-#include <CGAL/Arr_face_index_map.h>
-
-#include <climits>
-#include <boost/graph/breadth_first_search.hpp>
-#include <boost/graph/visitors.hpp>
-
-#include "arr_print.h"
-
-// A property map that reads/writes the information to/from the extended
-// face.
-template <typename Arrangement, class Type> class Extended_face_property_map {
-public:
-  typedef typename Arrangement::Face_handle       Face_handle;
-
-  // Boost property type definitions.
-  typedef boost::read_write_property_map_tag      category;
-  typedef Type                                    value_type;
-  typedef value_type&                             reference;
-  typedef Face_handle                             key_type;
-
-  // The get function is required by the property map concept.
-  friend reference get(const Extended_face_property_map& /* map */,
-                       key_type key)
-  { return key->data(); }
-
-  // The put function is required by the property map concept.
-  friend void put(Extended_face_property_map /* map */,
-                  key_type key, value_type val)
-  { key->set_data(val); }
-};
-
-typedef CGAL::Cartesian<Number_type>                         Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                   Traits_2;
-typedef CGAL::Arr_face_extended_dcel<Traits_2, unsigned int> Dcel;
-typedef CGAL::Arrangement_2<Traits_2, Dcel>                  Ex_arrangement;
-typedef CGAL::Dual<Ex_arrangement>                           Dual_arrangement;
-typedef CGAL::Arr_face_index_map<Ex_arrangement>             Face_index_map;
-typedef Extended_face_property_map<Ex_arrangement,unsigned int>
-                                                             Face_property_map;
-typedef Kernel::Point_2                                      Point_2;
-typedef Kernel::Segment_2                                    Segment_2;
-
-int main()
-{
-  // Construct an arrangement of seven intersecting line segments.
-  Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3);
-  Ex_arrangement  arr;
-  insert(arr, Segment_2(p1, p6));
-  insert(arr, Segment_2(p1, p4));  insert(arr, Segment_2(p2, p6));
-  insert(arr, Segment_2(p3, p7));  insert(arr, Segment_2(p3, p5));
-  insert(arr, Segment_2(p6, p7));  insert(arr, Segment_2(p4, p7));
-
-  // Create a mapping of the arrangement faces to indices.
-  Face_index_map  index_map(arr);
-
-  // Perform breadth-first search from the unbounded face, using the event
-  // visitor to associate each arrangement face with its discover time.
-  unsigned int    time = 0;
-  boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(),
-                              boost::vertex_index_map(index_map).visitor
-                              (boost::make_bfs_visitor
-                               (stamp_times(Face_property_map(), time,
-                                            boost::on_discover_vertex()))));
-
-  // Print the discover time of each arrangement face.
-  Ex_arrangement::Face_iterator  fit;
-  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
-    std::cout << "Discover time " << fit->data() << " for ";
-    if (fit != arr.unbounded_face()) {
-      std::cout << "face ";
-      print_ccb<Ex_arrangement>(fit->outer_ccb());
-    }
-    else std::cout << "the unbounded face." << std::endl;
-  }
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
deleted file mode 100644
index 9f169f2..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
-// Adapting an arrangement to a BGL graph.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/graph_traits_Arrangement_2.h>
-#include <CGAL/Arr_vertex_index_map.h>
-
-#include <CGAL/boost/graph/dijkstra_shortest_paths.h>
-
-#include <CGAL/property_map.h>
-
-typedef CGAL::Cartesian<Number_type>                    Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>              Traits_2;
-typedef Traits_2::Point_2                               Point_2;
-typedef Traits_2::X_monotone_curve_2                    Segment_2;
-typedef CGAL::Arrangement_2<Traits_2>                   Arrangement_2;
-
-// A functor used to compute the length of an edge.
-class Edge_length_func
-{
-public:
-
-  // Boost property type definitions:
-  typedef boost::readable_property_map_tag        category;
-  typedef double                                  value_type;
-  typedef value_type                              reference;
-  typedef Arrangement_2::Halfedge_handle          key_type;
-
-  double operator()(Arrangement_2::Halfedge_handle e) const
-  {
-    const double     x1 = CGAL::to_double (e->source()->point().x());
-    const double     y1 = CGAL::to_double (e->source()->point().y());
-    const double     x2 = CGAL::to_double (e->target()->point().x());
-    const double     y2 = CGAL::to_double (e->target()->point().y());
-    const double     diff_x = x2 - x1;
-    const double     diff_y = y2 - y1;
-
-    return std::sqrt(diff_x*diff_x + diff_y*diff_y);
-  }
-};
-
-double get(Edge_length_func edge_length, Arrangement_2::Halfedge_handle e)
-{
-  return edge_length(e);
-}
-
-/* The folowing is a workaround for a bug in the BGL upto and including version
- * 103400.
- *
- * Unfortunately some of the calls to the get() function below from the BGL
- * code are qualified with the boost namespace, while others are not. For The
- * qualified calls the compiler naturally looks for the definition of the
- * function in boost namespace. For the other calls it searches the CGAL
- * namespace according to ADL (Koenig Lookup), as the type of the 1st
- * parameter is in CGAL namespace.
- *
- * One way to get around it is to provide 2 similar functions that do the
- * same thing. One in CGAL namespace provided in CGAL/Arr_vertex_map.h, and
- * the other in boost namespace below. The signature of the latter is slightly
- * changed to avoid redefinition. The type of its 1st parameter is defined in
- * boost namespace, and is a simple derivation of the 1st parameter of the
- * CGAL::get() function.
- */
-
-namespace boost {
-
-template <typename Arrangement_2>
-class Arr_vertex_index_map_boost :
-    public CGAL::Arr_vertex_index_map<Arrangement_2>
-{
- public:
-  typedef CGAL::Arr_vertex_index_map<Arrangement_2>     Base;
-  /*! Default constructor. */
-  Arr_vertex_index_map_boost() : Base() {}
-
-  /*! Constructor from CGAL index map. */
-  Arr_vertex_index_map_boost(Base & other) :
-    CGAL::Arr_vertex_index_map<Arrangement_2>(other)
-  {}
-};
-
-/*!
- * Get the index property-map function. Provided so that boost is able to
- * access the Arr_vertex_index_map above.
- * \param index_map The index map.
- * \param v A vertex handle.
- * \return The vertex index.
- */
-template<class Arrangement>
-unsigned int
-get(const boost::Arr_vertex_index_map_boost<Arrangement> & index_map,
-    typename Arrangement::Vertex_handle v) 
-{
-  const CGAL::Arr_vertex_index_map<Arrangement> & index_map_tmp =
-    static_cast<const CGAL::Arr_vertex_index_map<Arrangement> &>(index_map);
-  return CGAL::get<Arrangement>(index_map_tmp, v);
-}
-
-}
- 
-int main()
-{
-  Arrangement_2   arr;
- 
-  // Construct an arrangement of seven intersecting line segments.
-  // We keep a handle for the vertex v_0 that corresponds to the point (1,1).
-  Arrangement_2::Halfedge_handle  e =
-    insert_non_intersecting_curve (arr, Segment_2 (Point_2 (1, 1), 
-                                                   Point_2 (7, 1)));
-  Arrangement_2::Vertex_handle    v0 = e->source();
-  insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7)));
-  insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1)));
-  insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3)));
-  insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4)));
-  insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3)));
-  insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3)));
-
-  // Create a mapping of the arrangement vertices to indices.
-  CGAL::Arr_vertex_index_map<Arrangement_2>        index_map_tmp(arr);
-  boost::Arr_vertex_index_map_boost<Arrangement_2> index_map(index_map_tmp);
-  
-  // Perform Dijkstra's algorithm from the vertex v0.
-  Edge_length_func                                      edge_length;
-  
-  boost::vector_property_map<double, boost::Arr_vertex_index_map_boost<Arrangement_2> > dist_map(static_cast<unsigned int>(arr.number_of_vertices()), index_map);
-  boost::dijkstra_shortest_paths(arr, v0,
-                                 boost::vertex_index_map(index_map).
-                                 weight_map(edge_length).
-                                 distance_map(dist_map));
-  
-  // Print the results:
-  Arrangement_2::Vertex_iterator      vit;
-
-  std::cout << "The distances of the arrangement vertices from ("
-            << v0->point() << ") :" << std::endl;
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
-    std::cout << "(" << vit->point() << ") at distance "
-              << dist_map[vit] << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circles.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circles.cpp
deleted file mode 100644
index 167e603..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circles.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/circles.cpp
-// Constructing an arrangement of circles using the conic-arc traits.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef Kernel::Circle_2                              Circle_2;
-typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
-typedef Traits_2::CoordNT                             CoordNT;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Curve_2                             Curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
-
-int main ()
-{
-  // Create a circle centered at the origin with radius 5.
-  Kernel::Point_2  c1 = Kernel::Point_2 (0, 0);
-  Number_type      sqr_r1 = Number_type (25);       // = 5^2
-  Circle_2         circ1 = Circle_2 (c1, sqr_r1, CGAL::CLOCKWISE);
-  Curve_2          cv1 = Curve_2 (circ1);
-
-  // Create a circle centered at (7,7) with radius 5.
-  Kernel::Point_2  c2 = Kernel::Point_2 (7, 7);
-  Number_type      sqr_r2 = Number_type (25);       // = 5^2
-  Circle_2         circ2 = Circle_2 (c2, sqr_r2, CGAL::CLOCKWISE);
-  Curve_2          cv2 = Curve_2 (circ2);
-
-  // Create a circle centered at (4,-0.5) with radius 3.5 (= 7/2).
-  Kernel::Point_2  c3 = Kernel::Point_2 (4, Number_type (-1,2));
-  Number_type      sqr_r3 = Number_type (49, 4);    // = 3.5^2
-  Circle_2         circ3 = Circle_2 (c3, sqr_r3, CGAL::CLOCKWISE);
-  Curve_2          cv3 = Curve_2 (circ3);
-
-  // Construct the arrangement of the three circles.
-  Arrangement_2    arr;
-
-  insert (arr, cv1);
-  insert (arr, cv2);
-  insert (arr, cv3);
-  
-  // Locate the vertex with maximal degree.
-  Arrangement_2::Vertex_const_iterator  vit;
-  Arrangement_2::Vertex_const_handle    v_max;
-  std::size_t                           max_degree = 0;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-    if (vit->degree() > max_degree) {
-      v_max = vit;
-      max_degree = vit->degree();
-    }
-  }
-
-  std::cout << "The vertex with maximal degree in the arrangement is: "
-            << "v_max = (" << v_max->point() << ") "
-            << "with degree " << max_degree << "." << std::endl;
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circular_arcs.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circular_arcs.cpp
deleted file mode 100644
index 05de471..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circular_arcs.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/circular_arc.cpp
-// Constructing an arrangement of various circular arcs and line segments.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef Kernel::Circle_2                              Circle_2;
-typedef Kernel::Segment_2                             Segment_2;
-typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
-typedef Traits_2::CoordNT                             CoordNT;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Curve_2                             Curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
-
-int main ()
-{
-  std::list<Curve_2>  curves;
-
-  // Create a circle centered at the origin with squared radius 2.
-  Kernel::Point_2  c1 = Kernel::Point_2 (0, 0);
-  Circle_2         circ1 = Circle_2 (c1, Number_type (2));
-  
-  curves.push_back (Curve_2 (circ1));
-
-  // Create a circle centered at (2,3) with radius 3/2 - note that
-  // as the radius is rational we use a different curve constructor.
-  Kernel::Point_2  c2 = Kernel::Point_2 (2, 3);
-  
-  curves.push_back (Curve_2 (c2, Number_type(3, 2)));
-
-  // Create a segment of the line (y = x) with rational endpoints.
-  Kernel::Point_2  s3 = Kernel::Point_2 (-2, -2);
-  Kernel::Point_2  t3 = Kernel::Point_2 (2, 2);
-  Segment_2        seg3 = Segment_2 (s3, t3);
-
-  curves.push_back (Curve_2 (seg3));
-
-  // Create a line segment with the same supporting line (y = x), but
-  // having one endpoint with irrational coefficients.
-  CoordNT          sqrt_15 = CoordNT (0, 1, 15); // = sqrt(15)
-  Point_2          s4 = Point_2 (3, 3);
-  Point_2          t4 = Point_2 (sqrt_15, sqrt_15);
-
-  curves.push_back (Curve_2 (seg3.supporting_line(), s4, t4));
-
-  // Create a circular arc that correspond to the upper half of the
-  // circle centered at (1,1) with squared radius 3. We create the
-  // circle with clockwise orientation, so the arc is directed from
-  // (1 - sqrt(3), 1) to (1 + sqrt(3), 1).
-  Kernel::Point_2  c5 = Kernel::Point_2 (1, 1);
-  Circle_2         circ5 = Circle_2 (c5, 3, CGAL::CLOCKWISE);
-  CoordNT          one_minus_sqrt_3 = CoordNT (1, -1, 3);
-  CoordNT          one_plus_sqrt_3 = CoordNT (1, 1, 3);
-  Point_2          s5 = Point_2 (one_minus_sqrt_3, CoordNT (1));
-  Point_2          t5 = Point_2 (one_plus_sqrt_3, CoordNT (1));
-
-  curves.push_back (Curve_2 (circ5, s5, t5));
-
-  // Create a circular arc of the unit circle, directed clockwise from
-  // (-1/2, sqrt(3)/2) to (1/2, sqrt(3)/2). Note that we orient the
-  // supporting circle accordingly.
-  Kernel::Point_2  c6 = Kernel::Point_2 (0, 0);
-  CoordNT          sqrt_3_div_2 = CoordNT (Number_type(0), Number_type(1,2), Number_type(3));
-  Point_2          s6 = Point_2 (Number_type (-1, 2), sqrt_3_div_2);
-  Point_2          t6 = Point_2 (Number_type (1, 2), sqrt_3_div_2);
-  
-  curves.push_back (Curve_2 (c6, 1, CGAL::CLOCKWISE, s6, t6));
-
-  // Create a circular arc defined by two endpoints and a midpoint,
-  // all having rational coordinates. This arc is the upper-right
-  // quarter of a circle centered at the origin with radius 5.
-  Kernel::Point_2  s7 = Kernel::Point_2 (0, 5);
-  Kernel::Point_2  mid7 = Kernel::Point_2 (3, 4);
-  Kernel::Point_2  t7 = Kernel::Point_2 (5, 0);
-
-  curves.push_back (Curve_2 (s7, mid7, t7));
-
-  // Construct the arrangement of the curves.
-  Arrangement_2    arr;
-
-  insert (arr, curves.begin(), curves.end());
-  
-  // Print the size of the arrangement.
-  std::cout << "The arrangement size:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
deleted file mode 100644
index e176831..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
-// Associating a color attribute with segments using the consolidated
-// curve-data traits.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_landmarks_point_location.h>
-
-enum Segment_color {
-  RED,
-  BLUE
-};
-
-typedef CGAL::Cartesian<Number_type>                      Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                Segment_traits_2;
-typedef Segment_traits_2::Curve_2                         Segment_2;
-typedef CGAL::Arr_consolidated_curve_data_traits_2
-                   <Segment_traits_2, Segment_color>      Traits_2;
-typedef Traits_2::Point_2                                 Point_2;
-typedef Traits_2::Curve_2                                 Colored_segment_2;
-typedef CGAL::Arrangement_2<Traits_2>                     Arrangement_2;
-typedef CGAL::Arr_landmarks_point_location<Arrangement_2> Landmarks_pl;
-
-int main ()
-{
-  // Construct an arrangement containing three RED line segments.
-  Arrangement_2     arr;
-  Landmarks_pl      pl (arr);
-
-  Segment_2         s1 (Point_2(-1, -1), Point_2(1, 3));
-  Segment_2         s2 (Point_2(2, 0), Point_2(3, 3));
-  Segment_2         s3 (Point_2(0, 3), Point_2(2, 5));
-
-  insert (arr, Colored_segment_2 (s1, RED), pl);
-  insert (arr, Colored_segment_2 (s2, RED), pl);
-  insert (arr, Colored_segment_2 (s3, RED), pl);
-
-  // Insert three BLUE line segments.
-  Segment_2         s4 (Point_2(-1, 3), Point_2(4, 1));
-  Segment_2         s5 (Point_2(-1, 0), Point_2(4, 1));
-  Segment_2         s6 (Point_2(-2, 1), Point_2(1, 4));
-
-  insert (arr, Colored_segment_2 (s4, BLUE), pl);
-  insert (arr, Colored_segment_2 (s5, BLUE), pl);
-  insert (arr, Colored_segment_2 (s6, BLUE), pl);
-
-  // Go over all vertices and print just the ones corresponding to intersection
-  // points between RED segments and BLUE segments. Note that we skip endpoints
-  // of overlapping sections.
-  Arrangement_2::Vertex_const_iterator   vit;
-  Segment_color                          color;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-    // Go over the incident halfedges of the current vertex and examine their
-    // colors.
-    bool       has_red = false;
-    bool       has_blue = false;
-
-    Arrangement_2::Halfedge_around_vertex_const_circulator  eit, first;
-
-    eit = first = vit->incident_halfedges();
-    do {
-      // Get the color of the current half-edge.
-      if (eit->curve().data().size() == 1) {
-        color = eit->curve().data().front();
-
-        if (color == RED)
-          has_red = true;
-        else if (color == BLUE)
-          has_blue = true;
-      }
-
-      ++eit;
-    } while (eit != first);
-
-    // Print the vertex only if incident RED and BLUE edges were found.
-    if (has_red && has_blue)
-    {
-      std::cout << "Red-blue intersection at (" << vit->point() << ")" 
-                << std::endl;
-    }
-  }
-
-  // Locate the edges that correspond to a red-blue overlap.
-  Arrangement_2::Edge_iterator   eit;
-
-  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit)
-  {
-    // Go over the incident edges of the current vertex and examine their
-    // colors.
-    bool       has_red = false;
-    bool       has_blue = false;
-
-    Traits_2::Data_container::const_iterator       dit;
-
-    for (dit = eit->curve().data().begin(); dit != eit->curve().data().end();
-         ++dit)
-    {
-      if (*dit == RED)
-        has_red = true;
-      else if (*dit == BLUE)
-        has_blue = true;	
-    }
-
-    // Print the edge only if it corresponds to a red-blue overlap.
-    if (has_red && has_blue)
-      std::cout << "Red-blue overlap at [" << eit->curve() << "]"  << std::endl;
-  }
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/curve_history.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/curve_history.cpp
deleted file mode 100644
index 2449580..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/curve_history.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/curve_history.cpp
-// Constructing an arrangement with curve history.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-
-#include <CGAL/Arrangement_on_surface_with_history_2.h>
-#include <CGAL/Arrangement_with_history_2.h>
-#include <CGAL/Arr_simple_point_location.h>
-
-#include "point_location_utils.h"
-
-typedef CGAL::Cartesian<Number_type>                      Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                Traits_2;
-typedef Traits_2::Point_2                                 Point_2;
-typedef Traits_2::Curve_2                                 Segment_2;
-typedef CGAL::Arrangement_with_history_2<Traits_2>        Arr_with_hist_2;
-typedef Arr_with_hist_2::Curve_handle                     Curve_handle;
-typedef CGAL::Arr_simple_point_location<Arr_with_hist_2>  Point_location;
-
-int main()
-{
-  Arr_with_hist_2   arr;
-
-  // Insert s1, s2 and s3 incrementally:
-  Segment_2 s1(Point_2(0, 3), Point_2(4, 3));
-  insert(arr, s1);
-  Segment_2 s2(Point_2(3, 2), Point_2(3, 5));
-  insert(arr, s2);
-  Segment_2 s3(Point_2(2, 3), Point_2(5, 3));
-  insert(arr, s3);
-
-  // Insert three additional segments aggregately:
-  Segment_2 segs[3];
-  segs[0] = Segment_2(Point_2(2, 6), Point_2(7, 1));
-  segs[1] = Segment_2(Point_2(0, 0), Point_2(2, 6));
-  segs[2] = Segment_2(Point_2(3, 4), Point_2(6, 4));
-  insert(arr, segs, segs + 3);
-
-  // Print out the curves and the number of edges each one induces.
-  Arr_with_hist_2::Curve_iterator            cit;
-  std::cout << "The arrangement contains "
-            << arr.number_of_curves() << " curves:" << std::endl;
-  for (cit = arr.curves_begin(); cit != arr.curves_end(); ++cit)
-    std::cout << "Curve [" << *cit << "] induces "
-              << arr.number_of_induced_edges(cit) << " edges." << std::endl; 
-
-  // Print the arrangement edges, along with the list of curves that
-  // induce each edge.
-  Arr_with_hist_2::Edge_iterator                  eit;
-  Arr_with_hist_2::Originating_curve_iterator     ocit;
-  std::cout << "The arrangement is comprised of "
-            << arr.number_of_edges() << " edges:" << std::endl;
-  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
-    std::cout << "[" << eit->curve() << "]. Originating curves: ";
-    for (ocit = arr.originating_curves_begin(eit);
-         ocit != arr.originating_curves_end(eit); ++ocit)
-      std::cout << " [" << *ocit << "]" << std::flush;
-    std::cout << std::endl;
-  }
-
-  // Perform some point-location queries:
-  Point_location   pl(arr);
-
-  Point_2          p1(4, 6);
-  point_location_query(pl, p1);
-  Point_2          p2(6, 2);
-  point_location_query(pl, p2);
-  Point_2          p3(2, 4);
-  point_location_query(pl, p3);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension.cpp
deleted file mode 100644
index e22ea43..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/dcel_extension.cpp
-// Extending all DCEL records (vertices, edges and faces).
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_extended_dcel.h>
-
-enum Color {BLUE, RED, WHITE};
-
-typedef CGAL::Cartesian<Number_type>                            Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                      Traits_2;
-typedef Traits_2::Point_2                                       Point_2;
-typedef Traits_2::X_monotone_curve_2                            Segment_2;
-typedef CGAL::Arr_extended_dcel<Traits_2,Color, bool, int>      Dcel;
-typedef CGAL::Arrangement_2<Traits_2, Dcel>                     Arrangement_2;
-
-int main ()
-{
-  // Construct the arrangement containing two intersecting triangles.
-  Arrangement_2          arr;
-
-  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
-  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
-  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
-  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
-  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
-  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
-
-  insert_non_intersecting_curve (arr, s1);
-  insert_non_intersecting_curve (arr, s2);
-  insert_non_intersecting_curve (arr, s3);
-  insert (arr, s4);
-  insert (arr, s5);
-  insert (arr, s6);
-
-  // Go over all arrangement vertices and set their colors according to our
-  // coloring convention.
-  Arrangement_2::Vertex_iterator            vit;
-  std::size_t                               degree;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
-  {
-    degree = vit->degree();
-    if (degree == 0)
-      vit->set_data (BLUE);       // Isolated vertex.
-    else if (degree <= 2)
-      vit->set_data (RED);        // Vertex represents an endpoint.
-    else
-      vit->set_data (WHITE);      // Vertex represents an intersection point.
-  }
-
-  // Go over all arrangement edges and set their flags.
-  Arrangement_2::Edge_iterator              eit;
-  bool                                      flag;
-
-  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
-    // Check if the halfegde has the same diretion as its associated
-    // segment. Note that its twin always has an opposite direction.
-    flag = (eit->source()->point() == eit->curve().source());
-    eit->set_data (flag);
-    eit->twin()->set_data (!flag);
-  }
-
-  // For each arrangement face, print the outer boundary and its size.
-  Arrangement_2::Face_iterator              fit;
-  Arrangement_2::Ccb_halfedge_circulator    curr;
-  int                                       boundary_size;
-
-  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
-    boundary_size = 0;
-    if (! fit->is_unbounded()) {
-      curr = fit->outer_ccb();
-      do {
-        ++boundary_size;
-        ++curr;
-      } while (curr != fit->outer_ccb());
-    }
-    fit->set_data (boundary_size);
-  }
-
-  // Copy the arrangement and print the vertices.
-  Arrangement_2    arr2 = arr;
-
-  std::cout << "The arrangement vertices:" << std::endl;
-  for (vit = arr2.vertices_begin(); vit != arr2.vertices_end(); ++vit) {
-    std::cout << '(' << vit->point() << ") - ";
-    switch (vit->data()) {
-     case BLUE  : std::cout << "BLUE."  << std::endl; break;
-     case RED   : std::cout << "RED."   << std::endl; break;
-     case WHITE : std::cout << "WHITE." << std::endl; break;
-    }
-  }
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension_io.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
deleted file mode 100644
index 10e47e1..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/dcel_extension_io.cpp
-// Using the I/O operators for arrangements with extended DCEL records.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_extended_dcel.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/IO/Arr_text_formatter.h>
-#include <CGAL/IO/Arr_iostream.h>
-#include <fstream>
-
-enum Color {BLUE, RED, WHITE};
-
-std::ostream& operator<< (std::ostream& os, const Color& color)
-{
-  switch (color)
-  {
-  case BLUE:  os << "BLUE";  break;
-  case RED:   os << "RED";   break;
-  case WHITE: os << "WHITE"; break;
-  default: os << "ERROR!";
-  }
-  return (os);
-}
-
-std::istream& operator>> (std::istream& is, Color& color)
-{
-  std::string   str;
-  is >> str;
-
-  if (str == "BLUE")
-    color = BLUE;
-  else if (str == "RED")
-    color = RED;
-  else if (str == "WHITE")
-    color = WHITE;
-
-  return (is);
-}
-
-typedef CGAL::Cartesian<Number_type>                      Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                Traits_2;
-typedef Traits_2::Point_2                                 Point_2;
-typedef Traits_2::X_monotone_curve_2                      Segment_2;
-typedef CGAL::Arr_extended_dcel<Traits_2,
-                                Color, bool, int>         Dcel;
-typedef CGAL::Arrangement_2<Traits_2, Dcel>               Arrangement_2;
-typedef CGAL::Arr_extended_dcel_text_formatter<Arrangement_2>  Formatter;
-
-int main ()
-{
-  // Construct the arrangement containing two intersecting triangles.
-  Arrangement_2          arr;
-
-  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
-  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
-  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
-  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
-  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
-  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
-
-  insert_non_intersecting_curve (arr, s1);
-  insert_non_intersecting_curve (arr, s2);
-  insert_non_intersecting_curve (arr, s3);
-  insert (arr, s4);
-  insert (arr, s5);
-  insert (arr, s6);
-
-  // Go over all arrangement vertices and set their colors.
-  Arrangement_2::Vertex_iterator            vit;
-  std::size_t                               degree;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
-  {
-    degree = vit->degree();
-    if (degree == 0)
-      vit->set_data (BLUE);       // Isolated vertex.
-    else if (degree <= 2)
-      vit->set_data (RED);        // Vertex represents an endpoint.
-    else
-      vit->set_data (WHITE);      // Vertex represents an intersection point.
-  }
-
-  // Go over all arrangement edges and set their flags.
-  Arrangement_2::Edge_iterator              eit;
-  bool                                      flag;
-
-  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit)
-  {
-    // Check if the halfegde has the same diretion as its associated
-    // segment. Note that its twin always has an opposite direction.
-    flag = (eit->source()->point() == eit->curve().source());
-    eit->set_data (flag);
-    eit->twin()->set_data (!flag);
-  }
-
-  // Go over all arrangement faces and print their outer boundary and indices.
-  Arrangement_2::Face_iterator              fit;
-  Arrangement_2::Ccb_halfedge_circulator    curr;
-  int                                       boundary_size;
-
-  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-  {
-    boundary_size = 0;
-    if (! fit->is_unbounded())
-    {
-      curr = fit->outer_ccb();
-      do
-      {
-        ++boundary_size;
-        ++curr;
-      } while (curr != fit->outer_ccb());
-    }
-    fit->set_data (boundary_size);
-  }
-
-  // Write the arrangement to a file.
-  std::ofstream    out_file ("arr_ex_dcel_io.dat");
-  Formatter        formatter;
-
-  write (arr, out_file, formatter);
-  out_file.close();
-
-  // Read the arrangement from the file.
-  Arrangement_2    arr2;
-  std::ifstream    in_file ("arr_ex_dcel_io.dat");
-
-  read (arr2, in_file, formatter);
-  in_file.close();
-
-  std::cout << "The arrangement vertices: " << std::endl;
-  for (vit = arr2.vertices_begin(); vit != arr2.vertices_end(); ++vit)
-    std::cout << '(' << vit->point() << ") - " << vit->data() << std::endl;
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_lines.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_lines.cpp
deleted file mode 100644
index c9f99f9..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_lines.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/dual_lines.cpp
-// Checking whether there are three collinear points in a given input set
-// using the arrangement of the dual lines.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <cstdlib>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef CGAL::Arr_linear_traits_2<Kernel>             Traits_2;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Line_2                              Line_2;
-typedef Traits_2::X_monotone_curve_2                  X_monotone_curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
-
-int main (int argc, char *argv[])
-{
-  // Get the name of the input file from the command line, or use the default
-  // points.dat file if no command-line parameters are given.
-  const char * filename = (argc > 1) ? argv[1] : "points.dat";
-
-  // Open the input file.
-  std::ifstream     in_file (filename);
-
-  if (! in_file.is_open()) {
-    std::cerr << "Failed to open " << filename << "!" << std::endl;
-    return 1;
-  }
-
-  // Read the points from the file, and consturct their dual lines.
-  // The input file format should be (all coordinate values are integers):
-  // <n>                                 // number of point.
-  // <x_1> <y_1>                         // point #1.
-  // <x_2> <y_2>                         // point #2.
-  //   :      :       :      :
-  // <x_n> <y_n>                         // point #n.
-  std::vector<Point_2>           points;
-  std::list<X_monotone_curve_2>  dual_lines;
-
-  unsigned int n;
-  in_file >> n;
-  points.resize(n);
-  unsigned int k;
-  for (k = 0; k < n; ++k) {
-    int px, py;
-    in_file >> px >> py;
-    points[k] = Point_2 (px, py);
-
-    // The line dual to the point (p_x, p_y) is y = p_x*x - p_y,
-    // or: p_x*x - y - p_y = 0:
-    dual_lines.push_back (Line_2 (Number_type(px),
-                                  Number_type(-1), 
-                                  Number_type(-py)));
-  }
-  in_file.close();
-
-  // Construct the dual arrangement by aggragately inserting the lines.
-  Arrangement_2      arr;
-
-  insert (arr, dual_lines.begin(), dual_lines.end());
-
-  std::cout << "The dual arrangement size:" << std::endl
-            << "V = " << arr.number_of_vertices()
-            << " (+ " << arr.number_of_vertices_at_infinity()
-            << " at infinity)"
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces()
-            << " (" << arr.number_of_unbounded_faces()
-            << " unbounded)" << std::endl;
-
-  // Look for a vertex whose degree is greater than 4.
-  Arrangement_2::Vertex_const_iterator   vit;
-  bool                                   found_collinear = false;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-    if (vit->degree() > 4) {
-      found_collinear = true;
-      break;
-    }
-  }
-  if (found_collinear)
-    std::cout << "Found at least three collinear points in the input set."
-              << std::endl;
-  else
-    std::cout << "No three collinear points are found in the input set."
-              << std::endl;
-
-  // Pick two points from the input set, compute their midpoint and insert
-  // its dual line into the arrangement.
-  Kernel             ker;
-  const int          k1 = std::rand() % n, k2 = (k1 + 1) % n;
-  Point_2            p_mid = ker.construct_midpoint_2_object() (points[k1],
-                                                                points[k2]);
-  X_monotone_curve_2 dual_p_mid = Line_2 (Number_type(p_mid.x()),
-                                          Number_type(-1), 
-                                          Number_type(-p_mid.y()));
-
-  insert (arr, dual_p_mid);
-
-  // Make sure that we now have three collinear points.
-  found_collinear = false;
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-    if (vit->degree() > 4) {
-      found_collinear = true;
-      break;
-    }
-  }
-  CGAL_assertion (found_collinear);
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_with_data.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_with_data.cpp
deleted file mode 100644
index 9820929..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/dual_with_data.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/dual_lines.cpp
-// Checking whether there are three collinear points in a given input set
-// using the arrangement of the dual lines.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arr_curve_data_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-
-typedef CGAL::Cartesian<Number_type>                     Kernel;
-typedef CGAL::Arr_linear_traits_2<Kernel>                Linear_traits_2;
-typedef Linear_traits_2::Point_2                         Point_2;
-typedef Linear_traits_2::Line_2                          Line_2;
-typedef CGAL::Arr_curve_data_traits_2<Linear_traits_2,
-                                      unsigned int>      Traits_2; 
-typedef Traits_2::X_monotone_curve_2                     X_monotone_curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                    Arrangement_2;
-
-int main (int argc, char *argv[])
-{
-  // Get the name of the input file from the command line, or use the default
-  // points.dat file if no command-line parameters are given.
-  const char * filename = (argc > 1) ? argv[1] : "coll_points.dat";
-
-  // Open the input file.
-  std::ifstream     in_file (filename);
-
-  if (! in_file.is_open()) {
-    std::cerr << "Failed to open " << filename << " ..." << std::endl;
-    return (1);
-  }
-
-  // Read the points from the file, and consturct their dual lines.
-  std::vector<Point_2>           points;
-  std::list<X_monotone_curve_2>  dual_lines;
-
-  unsigned int n;
-  in_file >> n;
-  points.resize (n);
-  unsigned int k;
-  for (k = 0; k < n; ++k) {
-    int px, py;
-    in_file >> px >> py;
-    points[k] = Point_2 (px, py);
-
-    // The line dual to the point (p_x, p_y) is y = p_x*x - p_y,
-    // or: p_x*x - y - p_y = 0:
-    Line_2 dual_line = Line_2(Number_type(px),
-                              Number_type(-1),
-                              Number_type(-py));
-
-    // Generate the x-monotone curve based on the line and the point index.
-    dual_lines.push_back (X_monotone_curve_2 (dual_line, k));
-  }
-  in_file.close();
-
-  // Construct the dual arrangement by aggragately inserting the lines.
-  Arrangement_2      arr;
-
-  insert (arr, dual_lines.begin(), dual_lines.end());
-
-  // Look for vertices whose degree is greater than 4.
-  Arrangement_2::Vertex_const_iterator                    vit;
-  Arrangement_2::Halfedge_around_vertex_const_circulator  circ;
-  unsigned int                                            d;
-
-  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
-    if (vit->degree() > 4) {
-      // There should be vit->degree()/2 lines intersecting at the current
-      // vertex. We print their primal points and their indices.
-      circ = vit->incident_halfedges();
-      for (d = 0; d < vit->degree() / 2; d++) {
-        k = circ->curve().data();     // The index of the primal point.
-        std::cout << "Point no. " << k+1 << ": (" << points[k] << "), ";
-        ++circ;
-      }
-      std::cout << "are collinear." << std::endl;
-    }
-  }
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
deleted file mode 100644
index 990e3c1..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
-// Removing curves and manipulating edges in an arrangement with history.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-#include <CGAL/Arrangement_with_history_2.h>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef Kernel::Point_2                               Rat_point_2;
-typedef Kernel::Circle_2                              Circle_2;
-typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Curve_2                             Curve_2;
-typedef CGAL::Arrangement_with_history_2<Traits_2>    Arr_with_hist_2;
-typedef Arr_with_hist_2::Curve_handle                 Curve_handle;
-typedef CGAL::Arr_walk_along_line_point_location<Arr_with_hist_2>  
-                                                      Point_location;
-
-int main()
-{
-  // Construct an arrangement containing nine circles: C[0] of radius 2 and
-  // C[1], ..., C[8] of radius 1.
-  const Number_type _7_halves = Number_type(7, 2); 
-  Arr_with_hist_2   arr;
-  Curve_2           C[9];
-  Curve_handle      handles[9];
-
-  C[0] = Circle_2(Rat_point_2(_7_halves, _7_halves), 4, CGAL::CLOCKWISE);
-  C[1] = Circle_2(Rat_point_2(_7_halves, 6), 1, CGAL::CLOCKWISE);
-  C[2] = Circle_2(Rat_point_2(5, 6), 1, CGAL::CLOCKWISE);
-  C[3] = Circle_2(Rat_point_2(6, _7_halves), 1, CGAL::CLOCKWISE);
-  C[4] = Circle_2(Rat_point_2(5, 2), 1, CGAL::CLOCKWISE);
-  C[5] = Circle_2(Rat_point_2(_7_halves, 1), 1, CGAL::CLOCKWISE);
-  C[6] = Circle_2(Rat_point_2(2, 2), 1, CGAL::CLOCKWISE);
-  C[7] = Circle_2(Rat_point_2(1, _7_halves), 1, CGAL::CLOCKWISE);
-  C[8] = Circle_2(Rat_point_2(2, 5), 1, CGAL::CLOCKWISE);
-
-  unsigned int k;
-  for (k = 0; k < 9; k++)
-    handles[k] = insert(arr, C[k]);
-
-  std::cout << "The initial arrangement size:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  // Remove the large circle C[0].
-  std::cout << "Removing C[0] : ";
-  std::cout << remove_curve(arr, handles[0]) 
-            << " edges have been removed." << std::endl;
-
-  std::cout << "The arrangement size:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  // Locate the point q, which should be on an edge e.
-  Point_location pl(arr);
-  const Point_2 q = Point_2(_7_halves, 7);
-  Point_location::result_type obj = pl.locate(q);
-  Arr_with_hist_2::Halfedge_const_handle  e;
-
-  CGAL_assertion_code(bool success = ) CGAL::assign(e, obj);
-  CGAL_assertion(success);
- 
-  // Split the edge e to two edges e1 and e2;
-  Arr_with_hist_2::Halfedge_handle        e1, e2;
-
-  e1 = arr.split_edge(arr.non_const_handle(e), q);
-  e2 = e1->next();
-
-  std::cout << "After edge split: "
-            << "V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  // Merge back the two split edges.
-  arr.merge_edge(e1, e2);
-
-  std::cout << "After edge merge: "
-            << "V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges() 
-            << ",  F = " << arr.number_of_faces() << std::endl;
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension.cpp
deleted file mode 100644
index 675bdb4..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/face_extension.cpp
-// Extending the arrangement-face records.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_extended_dcel.h>
-#include <CGAL/Arr_observer.h>
-
-typedef CGAL::Cartesian<Number_type>                   Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>             Traits_2;
-typedef Traits_2::Point_2                              Point_2;
-typedef Traits_2::X_monotone_curve_2                   Segment_2;
-typedef CGAL::Arr_face_extended_dcel<Traits_2, int>    Dcel;
-typedef CGAL::Arrangement_2<Traits_2, Dcel>            Arrangement_2;
-
-// An arrangement observer, used to receive notifications of face splits and
-// to update the indices of the newly created faces.
-class Face_index_observer : public CGAL::Arr_observer<Arrangement_2>
-{
-private:
-  int     n_faces;          // The current number of faces.
-
-public:
-
-  Face_index_observer (Arrangement_2& arr) :
-    CGAL::Arr_observer<Arrangement_2> (arr),
-    n_faces (0)
-  {
-    CGAL_precondition (arr.is_empty());
-    
-    arr.unbounded_face()->set_data (0);
-    n_faces++;
-  }
-
-  virtual void after_split_face (Face_handle /* old_face */,
-                                 Face_handle new_face, bool )
-  {
-    // Assign index to the new face.
-    new_face->set_data (n_faces);
-    n_faces++;
-  }
-};
-
-int main ()
-{
-  // Construct the arrangement containing two intersecting triangles.
-  Arrangement_2          arr;
-  Face_index_observer    obs (arr);
-
-  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
-  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
-  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
-  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
-  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
-  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
-
-  insert_non_intersecting_curve (arr, s1);
-  insert_non_intersecting_curve (arr, s2);
-  insert_non_intersecting_curve (arr, s3);
-  insert (arr, s4);
-  insert (arr, s5);
-  insert (arr, s6);
-
-  // Go over all arrangement faces and print the index of each face and it
-  // outer boundary. The face index is stored in its data field in our case.
-  Arrangement_2::Face_const_iterator            fit;
-  Arrangement_2::Ccb_halfedge_const_circulator  curr;
-
-  std::cout << arr.number_of_faces() << " faces:" << std::endl;
-  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
-    std::cout << "Face no. " << fit->data() << ": ";
-    if (fit->is_unbounded())
-      std::cout << "Unbounded." << std::endl;
-    else {
-      curr = fit->outer_ccb();
-      std::cout << curr->source()->point();
-      do {
-        std::cout << " --> " << curr->target()->point();
-        ++curr;
-      } while (curr != fit->outer_ccb());
-      std::cout << std::endl;
-    }
-  }
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension_overlay.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
deleted file mode 100644
index a79c25a..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/face_extension_overlay.cpp
-// A face overlay of two arrangements with extended face records.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_extended_dcel.h>
-#include <CGAL/Arr_overlay_2.h>
-#include <CGAL/Arr_default_overlay_traits.h>
-
-typedef CGAL::Cartesian<Number_type>                            Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>                      Traits_2;
-typedef Traits_2::Point_2                                       Point_2;
-typedef Traits_2::X_monotone_curve_2                            Segment_2;
-typedef CGAL::Arr_face_extended_dcel<Traits_2, bool>            Dcel;
-typedef CGAL::Arrangement_2<Traits_2, Dcel>                     Arrangement_2;
-typedef CGAL::Arr_face_overlay_traits<Arrangement_2,
-                                      Arrangement_2,
-                                      Arrangement_2,
-                                      std::logical_and<bool> >  Overlay_traits;
-
-int main ()
-{
-  // Construct the first arrangement, containing a square-shaped face.
-  Arrangement_2          arr1;
-
-  Segment_2      s1 (Point_2(2, 2), Point_2(6, 2));
-  Segment_2      s2 (Point_2(6, 2), Point_2(6, 6));
-  Segment_2      s3 (Point_2(6, 6), Point_2(2, 6));
-  Segment_2      s4 (Point_2(2, 6), Point_2(2, 2));
-
-  insert_non_intersecting_curve (arr1, s1);
-  insert_non_intersecting_curve (arr1, s2);
-  insert_non_intersecting_curve (arr1, s3);
-  insert_non_intersecting_curve (arr1, s4);
-
-  // Mark just the bounded face.
-  Arrangement_2::Face_iterator   fit;
-
-  CGAL_assertion (arr1.number_of_faces() == 2);
-  for (fit = arr1.faces_begin(); fit != arr1.faces_end(); ++fit)
-    fit->set_data (fit != arr1.unbounded_face());
-
-  // Construct the second arrangement, containing a rhombus-shaped face.
-  Arrangement_2          arr2;
-
-  Segment_2      t1 (Point_2(4, 1), Point_2(7, 4));
-  Segment_2      t2 (Point_2(7, 4), Point_2(4, 7));
-  Segment_2      t3 (Point_2(4, 7), Point_2(1, 4));
-  Segment_2      t4 (Point_2(1, 4), Point_2(4, 1));
-
-  insert_non_intersecting_curve (arr2, t1);
-  insert_non_intersecting_curve (arr2, t2);
-  insert_non_intersecting_curve (arr2, t3);
-  insert_non_intersecting_curve (arr2, t4);
-
-  // Mark just the bounded face.
-  CGAL_assertion (arr2.number_of_faces() == 2);
-  for (fit = arr2.faces_begin(); fit != arr2.faces_end(); ++fit)
-    fit->set_data (fit != arr2.unbounded_face());
-
-  // Compute the overlay of the two arrangements, marking only the faces that
-  // are intersections of two marked faces in arr1 and arr2, respectively.
-  Arrangement_2          overlay_arr;
-  Overlay_traits         overlay_traits;
-
-  overlay (arr1, arr2, overlay_arr, overlay_traits);
-
-  // Go over the faces of the overlaid arrangement and print just the marked
-  // ones.
-  Arrangement_2::Ccb_halfedge_circulator    curr;
-
-  std::cout << "The union is: ";
-  for (fit = overlay_arr.faces_begin(); fit != overlay_arr.faces_end(); ++fit) {
-    if (! fit->data())
-      continue;
-
-    curr = fit->outer_ccb();
-    std::cout << curr->source()->point();
-    do {
-      std::cout << " --> " << curr->target()->point();
-      ++curr;
-    } while (curr != fit->outer_ccb());
-    std::cout << std::endl;
-  }
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/generic_curve_data.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/generic_curve_data.cpp
deleted file mode 100644
index 711c219..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/generic_curve_data.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/generic_curve_data.cpp
-// Associating a name attribute with segments using the generic curve-data
-// traits.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_curve_data_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <string>
-
-// Define a functor for concatenating name fields.
-typedef std::string   Name;
-
-struct Merge_names
-{
-  Name operator() (const Name& s1, const Name& s2) const
-  {
-    return (s1 + " " + s2);
-  }
-};
-
-typedef CGAL::Cartesian<Number_type>                    Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>              Segment_traits_2;
-typedef CGAL::Arr_polyline_traits_2<Segment_traits_2>   Polyline_traits_2;
-typedef Polyline_traits_2::Curve_2                      Polyline_2;
-typedef CGAL::Arr_curve_data_traits_2<Polyline_traits_2, Name, Merge_names>
-                                                        Traits_2;
-typedef Traits_2::Point_2                               Point_2;
-typedef Traits_2::Curve_2                               Curve_2;
-typedef Traits_2::X_monotone_curve_2                    X_monotone_curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                   Arrangement_2;
-
-int main ()
-{
-  Polyline_traits_2 traits;
-  Polyline_traits_2::Construct_curve_2 poly_const =
-    traits.construct_curve_2_object();
-
-  // Construct an arrangement of four polylines named A--D.
-  Arrangement_2    arr;
-
-  Point_2          points1[5] = {Point_2(0,0), Point_2(2,4), Point_2(3,3),
-                                 Point_2(4,4), Point_2(6,0)};
-  insert (arr, Curve_2 (poly_const (points1, points1 + 5), "A"));
-
-  Point_2          points2[3] = {Point_2(1,5), Point_2(3,3), Point_2(5,5)};
-  insert (arr, Curve_2 (poly_const (points2, points2 + 3), "B"));
-
-  Point_2          points3[4] = {Point_2(1,0), Point_2(2,2),
-                                 Point_2(4,2), Point_2(5,0)};
-  insert (arr, Curve_2 (poly_const (points3, points3 + 4), "C"));
-
-  Point_2          points4[2] = {Point_2(0,2), Point_2(6,2)};
-  insert (arr, Curve_2 (poly_const (points4, points4 + 2), "D"));
-
-  // Print all edges that correspond to an overlapping polyline.
-  Arrangement_2::Edge_iterator    eit;
-
-  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
-    if (eit->curve().data().length() > 1) {
-      std::cout << "[" << eit->curve() << "]  "
-                << "named: " << eit->curve().data() << std::endl;
-
-      // Rename the curve associated with the edge.
-      arr.modify_edge (eit, X_monotone_curve_2 (eit->curve(), "overlap"));
-    }
-  }
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io.cpp
deleted file mode 100644
index f402493..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/io.cpp
-// Using the arrangement I/O operators.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/IO/Arr_iostream.h>
-#include <fstream>
-
-#include "point_location_utils.h"
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>            Traits_2;
-typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
-
-int main ()
-{
-  // Construct the arrangement.
-  Arrangement_2    arr;
-
-  construct_segments_arr (arr);
-
-  std::cout << "Writing an arrangement of size:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges()
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  // Write the arrangement to a file.
-  std::ofstream    out_file ("arr_ex_io.dat");
-
-  out_file << arr;
-  out_file.close();
-
-  // Read the arrangement from the file.
-  Arrangement_2    arr2;
-  std::ifstream    in_file ("arr_ex_io.dat");
-
-  in_file >> arr2;
-  in_file.close();
-
-  std::cout << "Read an arrangement of size:" << std::endl
-            << "   V = " << arr2.number_of_vertices()
-            << ",  E = " << arr2.number_of_edges()
-            << ",  F = " << arr2.number_of_faces() << std::endl;
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_curve_history.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_curve_history.cpp
deleted file mode 100644
index b1b6436..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_curve_history.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/io_curve_history.cpp
-// Using the arrangement-with-history I/O operators.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_with_history_2.h>
-#include <CGAL/IO/Arr_with_history_iostream.h>
-#include <fstream>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>            Traits_2;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Curve_2                             Segment_2;
-typedef CGAL::Arrangement_with_history_2<Traits_2>    Arr_with_hist_2;
-
-int main ()
-{
-  Arr_with_hist_2   arr;
-
-  // Insert six additional segments aggregately:
-  Segment_2         segs[6];
-  segs[0] = Segment_2 (Point_2 (2, 6), Point_2 (7, 1));
-  segs[1] = Segment_2 (Point_2 (3, 2), Point_2 (3, 5));
-  segs[2] = Segment_2 (Point_2 (2, 3), Point_2 (5, 3));
-  segs[3] = Segment_2 (Point_2 (2, 6), Point_2 (7, 1));
-  segs[4] = Segment_2 (Point_2 (0, 0), Point_2 (2, 6));
-  segs[5] = Segment_2 (Point_2 (3, 4), Point_2 (6, 4));
-  insert (arr, segs, segs + 6);
-
-  std::cout << "Writing an arrangement of "
-            << arr.number_of_curves() << " input segments:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges()
-            << ",  F = " << arr.number_of_faces() << std::endl;
-
-  // Write the arrangement to a file.
-  std::ofstream     out_file ("arr_ex_io_hist.dat");
-
-  out_file << arr;
-  out_file.close();
-
-  // Read the arrangement from the file.
-  Arr_with_hist_2   arr2;
-  std::ifstream     in_file ("arr_ex_io_hist.dat");
-
-  in_file >> arr2;
-  in_file.close();
-
-  std::cout << "Read an arrangement of "
-            << arr2.number_of_curves() << " input segments:" << std::endl
-            << "   V = " << arr2.number_of_vertices()
-            << ",  E = " << arr2.number_of_edges()
-            << ",  F = " << arr2.number_of_faces() << std::endl;
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_unbounded.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_unbounded.cpp
deleted file mode 100644
index 4c2374f..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/io_unbounded.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//! \file examples/Arrangement_2/io_unbounded.cpp
-// Using the I/O operators with an arrangement of unbounded curves.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/IO/Arr_iostream.h>
-#include <list>
-#include <fstream>
-
-typedef CGAL::Cartesian<Number_type>                  Kernel;
-typedef CGAL::Arr_linear_traits_2<Kernel>             Traits_2;
-typedef Traits_2::Point_2                             Point_2;
-typedef Traits_2::Segment_2                           Segment_2;
-typedef Traits_2::Ray_2                               Ray_2;
-typedef Traits_2::Line_2                              Line_2;
-typedef Traits_2::X_monotone_curve_2                  X_monotone_curve_2;
-typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
-
-int main ()
-{
-  // Construct an arrangement of five linear objects.
-  Arrangement_2                  arr;
-  std::list<X_monotone_curve_2>  curves;
-
-  curves.push_back (Line_2 (Point_2 (0, 0), Point_2 (2, 1)));
-  curves.push_back (Line_2 (Point_2 (0, 0), Point_2 (2, -1)));
-  curves.push_back (Line_2 (Point_2 (-1, 0), Point_2 (-1, 1)));
-  curves.push_back (Ray_2 (Point_2 (2, 3), Point_2 (2, 4)));
-  curves.push_back (Segment_2 (Point_2 (0, 1), Point_2 (0, 2)));
-
-  insert (arr, curves.begin(), curves.end());
-
-  // Print out the size of the resulting arrangement.
-  std::cout << "Writing an arrangement of size:" << std::endl
-            << "   V = " << arr.number_of_vertices()
-            << " (plus " << arr.number_of_vertices_at_infinity()
-            << " at infinity)"
-            << ",  E = " << arr.number_of_edges()
-            << ",  F = " << arr.number_of_faces()
-            << " (" << arr.number_of_unbounded_faces() << " unbounded)"
-            << std::endl << std::endl;
-
-  // Write the arrangement to a file.
-  std::ofstream    out_file ("arr_ex_io_unbounded.dat");
-
-  out_file << arr;
-  out_file.close();
-
-  // Read the arrangement from the file.
-  Arrangement_2    arr2;
-  std::ifstream    in_file ("arr_ex_io_unbounded.dat");
-
-  in_file >> arr2;
-  in_file.close();
-
-  std::cout << "Read an arrangement of size:" << std::endl
-            << "   V = " << arr2.number_of_vertices()
-            << " (plus " << arr2.number_of_vertices_at_infinity()
-            << " at infinity)"
-            << ",  E = " << arr2.number_of_edges()
-            << ",  F = " << arr2.number_of_faces()
-            << " (" << arr2.number_of_unbounded_faces() << " unbounded)"
-            << std::endl << std::endl;
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/overlay.cpp b/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/overlay.cpp
deleted file mode 100644
index 2276fe7..0000000
--- a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/overlay.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//! \file examples/Arrangement_on_surface_2/overlay.cpp
-// A simple overlay of two arrangements.
-
-#include "arr_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_overlay_2.h>
-#include <CGAL/Arr_default_overlay_traits.h>
-
-typedef CGAL::Cartesian<Number_type>                     Kernel;
-typedef CGAL::Arr_segment_traits_2<Kernel>               Traits_2;
-typedef Traits_2::Point_2                                Point_2;
-typedef Traits_2::X_monotone_curve_2                     Segment_2;
-typedef CGAL::Arrangement_2<Traits_2>                    Arrangement_2;
-typedef CGAL::Arr_default_overlay_traits<Arrangement_2>  Overlay_traits;
-
-int main ()
-{
-  // Construct the first arrangement, containing a square-shaped face.
-  Arrangement_2          arr1;
-
-  Segment_2      s1 (Point_2(2, 2), Point_2(6, 2));
-  Segment_2      s2 (Point_2(6, 2), Point_2(6, 6));
-  Segment_2      s3 (Point_2(6, 6), Point_2(2, 6));
-  Segment_2      s4 (Point_2(2, 6), Point_2(2, 2));
-
-  insert_non_intersecting_curve (arr1, s1);
-  insert_non_intersecting_curve (arr1, s2);
-  insert_non_intersecting_curve (arr1, s3);
-  insert_non_intersecting_curve (arr1, s4);
-
-  // Construct the second arrangement, containing a rhombus-shaped face.
-  Arrangement_2          arr2;
-
-  Segment_2      t1 (Point_2(4, 1), Point_2(7, 4));
-  Segment_2      t2 (Point_2(7, 4), Point_2(4, 7));
-  Segment_2      t3 (Point_2(4, 7), Point_2(1, 4));
-  Segment_2      t4 (Point_2(1, 4), Point_2(4, 1));
-
-  insert_non_intersecting_curve (arr2, t1);
-  insert_non_intersecting_curve (arr2, t2);
-  insert_non_intersecting_curve (arr2, t3);
-  insert_non_intersecting_curve (arr2, t4);
-
-  // Compute the overlay of the two arrangements.
-  Arrangement_2          overlay_arr;
-  Overlay_traits         overlay_traits;
-
-  overlay (arr1, arr2, overlay_arr, overlay_traits);
-
-  // Print the size of the overlaid arrangement.
-  std::cout << "The overlaid arrangement size:" << std::endl
-            << "   V = " << overlay_arr.number_of_vertices()
-            << ",  E = " << overlay_arr.number_of_edges() 
-            << ",  F = " << overlay_arr.number_of_faces() << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/CMakeLists.txt
deleted file mode 100644
index d2c4059..0000000
--- a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( BGL_arrangement_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "dual.cpp" )
-  create_single_source_cgal_program( "primal.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/CMakeLists.txt
deleted file mode 100644
index 6b7672e..0000000
--- a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( BGL_polyhedron_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "distance.cpp" )
-  create_single_source_cgal_program( "incident_vertices.cpp" )
-  create_single_source_cgal_program( "kruskal.cpp" )
-  create_single_source_cgal_program( "kruskal_with_stored_id.cpp" )
-  create_single_source_cgal_program( "normals.cpp" )
-  create_single_source_cgal_program( "range.cpp" )
-  create_single_source_cgal_program( "transform_iterator.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/range.cpp b/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/range.cpp
deleted file mode 100644
index 48133c8..0000000
--- a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/range.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Iterator_range.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <boost/foreach.hpp>
-
-
-#include <iostream>
-#include <fstream>
-#include <list>
-#include <algorithm>
-
-
-typedef CGAL::Simple_cartesian<double>                       Kernel;
-typedef CGAL::Polyhedron_3<Kernel>                           Polyhedron;
-
-typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
-typedef boost::graph_traits<Polyhedron>::vertex_iterator   vertex_iterator;
-
-typedef CGAL::Iterator_range<vertex_iterator> vertex_range;
-
-
-vertex_range vertices_range(const Polyhedron& p)
-{
-  return vertex_range(vertices(p));
-}
-
-struct Fct
-{
-  void operator()(const vertex_descriptor& vd) const
-  {
-    std::cout << vd->point() << std::endl;
-  }
-};
-
-void fct(const Polyhedron& p)
-{
-  vertex_range vr(vertices(p));
-  
-#ifndef CGAL_NO_CPP0X_RANGE_BASED_FOR
-  std::cout << "new for loop" << std::endl;
-  for(vertex_descriptor vd : vr){
-    std::cout << vd->point() << std::endl;
-  }
-#endif
-  
-  std::cout << "BOOST_FOREACH" << std::endl;
-  BOOST_FOREACH(vertex_descriptor vd, vr){
-    std::cout << vd->point() << std::endl;
-  }
-  
-  std::cout << "boost::tie + std::for_each" << std::endl;
-  vertex_iterator vb, ve;
-  
-  boost::tie(vb,ve) = vertices_range(p);
-  std::for_each(vb,ve, Fct());
-}
-
-int main(int, char** argv)
-{
-  Polyhedron P;  
-  std::ifstream in(argv[1]);
-  in >> P ;
-
-  fct(P);
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/CMakeLists.txt
deleted file mode 100644
index d63d022..0000000
--- a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( BGL_surface_mesh_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "connected_components.cpp" )
-  create_single_source_cgal_program( "prim.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/CMakeLists.txt
deleted file mode 100644
index a33cc5a..0000000
--- a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( BGL_triangulation_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "dijkstra.cpp" )
-  create_single_source_cgal_program( "dijkstra_with_internal_properties.cpp" )
-  create_single_source_cgal_program( "emst.cpp" )
-  create_single_source_cgal_program( "face_graph.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/CMakeLists.txt
deleted file mode 100644
index dacd4d4..0000000
--- a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Barycentric_coordinates_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Discrete_harmonic_coordinates_example.cpp" )
-  create_single_source_cgal_program( "Mean_value_coordinates_example.cpp" )
-  create_single_source_cgal_program( "Segment_coordinates_example.cpp" )
-  create_single_source_cgal_program( "Terrain_height_modeling.cpp" )
-  create_single_source_cgal_program( "Triangle_coordinates_example.cpp" )
-  create_single_source_cgal_program( "Triangle_coordinates_speed_test.cpp" )
-  create_single_source_cgal_program( "Wachspress_coordinates_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/CMakeLists.txt
deleted file mode 100644
index f3c9039..0000000
--- a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Boolean_set_operations_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "bezier_traits_adapter.cpp" )
-  create_single_source_cgal_program( "bezier_traits_adapter2.cpp" )
-  create_single_source_cgal_program( "circle_segment.cpp" )
-  create_single_source_cgal_program( "conic_traits_adapter.cpp" )
-  create_single_source_cgal_program( "connect_polygon.cpp" )
-  create_single_source_cgal_program( "do_intersect.cpp" )
-  create_single_source_cgal_program( "dxf_union.cpp" )
-  create_single_source_cgal_program( "sequence.cpp" )
-  create_single_source_cgal_program( "set_union.cpp" )
-  create_single_source_cgal_program( "simple_join_intersect.cpp" )
-  create_single_source_cgal_program( "symmetric_difference.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Box_intersection_d/CMakeLists.txt
deleted file mode 100644
index bd49a1d..0000000
--- a/3rdparty/CGAL-4.6/examples/Box_intersection_d/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Box_intersection_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "box_grid.cpp" )
-  create_single_source_cgal_program( "custom_box_grid.cpp" )
-  create_single_source_cgal_program( "minimal.cpp" )
-  create_single_source_cgal_program( "minimal_self.cpp" )
-  create_single_source_cgal_program( "proximity_custom_box_traits.cpp" )
-  create_single_source_cgal_program( "triangle_self_intersect.cpp" )
-  create_single_source_cgal_program( "triangle_self_intersect_pointers.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/CGAL_ipelets/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/CGAL_ipelets/CMakeLists.txt
deleted file mode 100644
index b5f145a..0000000
--- a/3rdparty/CGAL-4.6/examples/CGAL_ipelets/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( CGAL_ipelets_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "test_grabbers.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/CGALimageIO/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/CGALimageIO/CMakeLists.txt
deleted file mode 100644
index 72ddd74..0000000
--- a/3rdparty/CGAL-4.6/examples/CGALimageIO/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project( CGALImageIO_example ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS ImageIO )
-
-include( ${CGAL_USE_FILE} )
-include( CGAL_CreateSingleSourceCGALProgram )
-
-if(CGAL_ImageIO_FOUND)
-  create_single_source_cgal_program( "convert_raw_image_to_inr.cpp" )
-  create_single_source_cgal_program( "test_imageio.cpp" )
-else()
-  message(STATUS "NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled.")
-endif()
diff --git a/3rdparty/CGAL-4.6/examples/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/CMakeLists.txt
deleted file mode 100644
index ace7a8c..0000000
--- a/3rdparty/CGAL-4.6/examples/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-project(CGAL_EXAMPLES)
-
-cmake_minimum_required(VERSION 2.6.2)
-
-if (CGAL_BRANCH_BUILD) 
-
-foreach (package ${CGAL_CONFIGURED_PACKAGES})
-  #message (STATUS "Current package: ${package}")
-  file( GLOB listtmp "${package}/examples/*")
-  list(APPEND list ${listtmp})
-endforeach()
-
-else()
-
-  file( GLOB list "*")
-
-endif()
-
-list( SORT list )
-
-if(NOT CGAL_BUILDING_LIBS)
-  find_package(CGAL REQUIRED)
-  include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
-endif()
-
-message("== Generating build files for examples ==")
-foreach( entry ${list} )
-
-  if (NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry} )
-
-    file(GLOB files "${entry}/*.cpp")
-
-    # If there is no .cpp files, ignore the sub-directory
-    if(files)  
-     process_CGAL_subdirectory("${entry}" examples example)
-      # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake
-   endif()
-
-  endif()
-  
-endforeach()
-message("== Generating build files for examples (DONE) ==\n")
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Circular_kernel_2/CMakeLists.txt
deleted file mode 100644
index 40638c0..0000000
--- a/3rdparty/CGAL-4.6/examples/Circular_kernel_2/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Circular_kernel_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "functor_has_on_2.cpp" )
-  create_single_source_cgal_program( "intersecting_arcs.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Circular_kernel_3/CMakeLists.txt
deleted file mode 100644
index 68fdd0f..0000000
--- a/3rdparty/CGAL-4.6/examples/Circular_kernel_3/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Circular_kernel_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "functor_compare_theta_3.cpp" )
-  create_single_source_cgal_program( "functor_has_on_3.cpp" )
-  create_single_source_cgal_program( "intersecting_spheres.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Circulator/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Circulator/CMakeLists.txt
deleted file mode 100644
index ffd7a3e..0000000
--- a/3rdparty/CGAL-4.6/examples/Circulator/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Circulator_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "circulator_prog1.cpp" )
-  create_single_source_cgal_program( "circulator_prog2.cpp" )
-  create_single_source_cgal_program( "circulator_prog3.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Combinatorial_map/CMakeLists.txt
deleted file mode 100644
index ae16c0d..0000000
--- a/3rdparty/CGAL-4.6/examples/Combinatorial_map/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Combinatorial_map_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "map_3_dynamic_onmerge.cpp" )
-  create_single_source_cgal_program( "map_3_foreach.cpp" )
-  create_single_source_cgal_program( "map_3_marks.cpp" )
-  create_single_source_cgal_program( "map_3_operations.cpp" )
-  create_single_source_cgal_program( "map_3_simple_example.cpp" )
-  create_single_source_cgal_program( "map_3_with_colored_facets.cpp" )
-  create_single_source_cgal_program( "map_4_simple_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_marks.cpp b/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_marks.cpp
deleted file mode 100644
index 23d7515..0000000
--- a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_marks.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <CGAL/Combinatorial_map.h>
-#include <CGAL/Combinatorial_map_constructors.h>
-#include <CGAL/Combinatorial_map_operations.h>
-#include <iostream>
-#include <cstdlib>
-
-typedef CGAL::Combinatorial_map<3> CMap_3;
-typedef CMap_3::Dart_handle Dart_handle;
-
-int main()
-{
-  CMap_3 cm;
-  
-  // 1) Reserve a mark.
-  int mark = cm.get_new_mark();
-  if ( mark==-1 )
-    {
-      std::cerr<<"No more free mark, exit."<<std::endl;
-      exit(-1);
-    }
-  
-  // 2) Create two tetrahedra.
-  Dart_handle dh1 = CGAL::make_combinatorial_tetrahedron(cm);  
-  Dart_handle dh2 = CGAL::make_combinatorial_tetrahedron(cm);
-
-  // 3) 3-sew them.
-  cm.sew<3>(dh1, dh2);
-  
-  // 4) Mark the darts belonging to the first tetrahedron.
-  for  (CMap_3::Dart_of_cell_range<3>::iterator 
-          it(cm.darts_of_cell<3>(dh1).begin()),
-          itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it)
-    cm.mark(it, mark);
-
-  // 4) Remove the common 2-cell between the two cubes:
-  // the two tetrahedra are merged.
-  CGAL::remove_cell<CMap_3, 2>(cm, dh1);
-
-  // 5) Thanks to the mark, we know which darts come from the first tetrahedron.
-  unsigned int res=0;
-  for (CMap_3::Dart_range::iterator it(cm.darts().begin()),
-	 itend(cm.darts().end()); it!=itend; ++it)
-    {
-      if ( cm.is_marked(it, mark) )
-	++res;
-    }
-  
-  std::cout<<"Number of darts from the first tetrahedron: "<<res<<std::endl;
-  cm.free_mark(mark);
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Convex_decomposition_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Convex_decomposition_3/CMakeLists.txt
deleted file mode 100644
index a2fad42..0000000
--- a/3rdparty/CGAL-4.6/examples/Convex_decomposition_3/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Convex_decomposition_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "list_of_convex_parts.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Convex_hull_2/CMakeLists.txt
deleted file mode 100644
index 4708919..0000000
--- a/3rdparty/CGAL-4.6/examples/Convex_hull_2/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Convex_hull_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-    include_directories (BEFORE "include")
-
-  create_single_source_cgal_program( "array_convex_hull_2.cpp" )
-  create_single_source_cgal_program( "ch_from_cin_to_cout.cpp" )
-  create_single_source_cgal_program( "ch_graham_anderson.cpp" )
-  create_single_source_cgal_program( "ch_timing.cpp" )
-  create_single_source_cgal_program( "convex_hull_yz.cpp" )
-  create_single_source_cgal_program( "iostream_convex_hull_2.cpp" )
-  create_single_source_cgal_program( "vector_convex_hull_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Convex_hull_3/CMakeLists.txt
deleted file mode 100644
index 217deb5..0000000
--- a/3rdparty/CGAL-4.6/examples/Convex_hull_3/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Convex_hull_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "dynamic_hull_3.cpp" )
-  create_single_source_cgal_program( "halfspace_intersection_3.cpp" )
-  create_single_source_cgal_program( "quickhull_3.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_3/halfspace_intersection_3.cpp b/3rdparty/CGAL-4.6/examples/Convex_hull_3/halfspace_intersection_3.cpp
deleted file mode 100644
index ad0deac..0000000
--- a/3rdparty/CGAL-4.6/examples/Convex_hull_3/halfspace_intersection_3.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Convex_hull_3/dual/halfspace_intersection_3.h>
-#include <CGAL/point_generators_3.h>
-
-#include <list>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel   K;
-typedef K::Plane_3                                            Plane;
-typedef K::Point_3                                            Point;
-typedef CGAL::Polyhedron_3<K>                                 Polyhedron_3;
-
-// compute the tangent plane of a point
-template <typename K>
-typename K::Plane_3 tangent_plane (typename K::Point_3 const& p) {
-    typename K::Vector_3 v(p.x(), p.y(), p.z());
-    v = v / sqrt(v.squared_length());
-    typename K::Plane_3 plane(v.x(), v.y(), v.z(), -(p - CGAL::ORIGIN) * v);
-
-    return plane;
-}
-
-int main (void) {
-    // number of generated planes
-    int N = 200;
-
-    // generates random planes on a sphere
-    std::list<Plane> planes;
-    CGAL::Random_points_on_sphere_3<Point> g;
-    for (int i = 0; i < N; i++) {
-        planes.push_back(tangent_plane<K>(*g++));
-    }
-
-    // define polyhedron to hold the intersection
-    Polyhedron_3 P;
-
-    // compute the intersection
-    // if a point inside the intersection is unknown, pass boost::none
-    // to automatically found one using linear programming
-    CGAL::halfspace_intersection_3(planes.begin(),
-                                   planes.end(),
-                                   P,
-                                   Point(0, 0, 0));
-
-    return 0;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Core/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Core/CMakeLists.txt
deleted file mode 100644
index e3fbde5..0000000
--- a/3rdparty/CGAL-4.6/examples/Core/CMakeLists.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-project( Core_examples )
-
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
-
-if ( COMMAND cmake_policy )
-
-  cmake_policy( SET CMP0003 NEW )
-
-endif()
-
-# CGAL and its components
-find_package( CGAL QUIET COMPONENTS Core )
-
-if ( NOT CGAL_Core_FOUND )
-
-  message(STATUS "This project requires the CGAL_Core library, and will not be compiled.")
-  return()
-
-endif()
-
-# include helper file
-include( ${CGAL_USE_FILE} )
-
-
-# Boost and its components
-find_package( Boost REQUIRED )
-
-if ( NOT Boost_FOUND )
-
-  message(STATUS "This project requires the Boost library, and will not be compiled.")
-
-  return()
-
-endif()
-
-# include for local directory
-
-# include for local package
-include_directories( BEFORE ../../include )
-
-
-# Creating entries for all .cpp/.C files with "main" routine
-# ##########################################################
-
-include( CGAL_CreateSingleSourceCGALProgram )
-
-create_single_source_cgal_program( "delaunay.cpp" )
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Envelope_2/CMakeLists.txt
deleted file mode 100644
index 2f06ba0..0000000
--- a/3rdparty/CGAL-4.6/examples/Envelope_2/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Envelope_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "convex_hull.cpp" )
-  create_single_source_cgal_program( "envelope_circles.cpp" )
-  create_single_source_cgal_program( "envelope_segments.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Envelope_3/CMakeLists.txt
deleted file mode 100644
index 172e8ad..0000000
--- a/3rdparty/CGAL-4.6/examples/Envelope_3/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Envelope_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "envelope_planes.cpp" )
-  create_single_source_cgal_program( "envelope_spheres.cpp" )
-  create_single_source_cgal_program( "envelope_triangles.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Filtered_kernel/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Filtered_kernel/CMakeLists.txt
deleted file mode 100644
index d606a05..0000000
--- a/3rdparty/CGAL-4.6/examples/Filtered_kernel/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Filtered_kernel_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Filtered_predicate.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Generator/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Generator/CMakeLists.txt
deleted file mode 100644
index 4fc139f..0000000
--- a/3rdparty/CGAL-4.6/examples/Generator/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Generator_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "ball_d.cpp" )
-  create_single_source_cgal_program( "combination_enumerator.cpp" )
-  create_single_source_cgal_program( "cube_d.cpp" )
-  create_single_source_cgal_program( "grid_d.cpp" )
-  create_single_source_cgal_program( "name_pairs.cpp" )
-  create_single_source_cgal_program( "random_convex_hull_2.cpp" )
-  create_single_source_cgal_program( "random_convex_set.cpp" )
-  create_single_source_cgal_program( "random_degenerate_point_set.cpp" )
-  create_single_source_cgal_program( "random_grid.cpp" )
-  create_single_source_cgal_program( "random_polygon.cpp" )
-  create_single_source_cgal_program( "random_polygon2.cpp" )
-  create_single_source_cgal_program( "random_segments1.cpp" )
-  create_single_source_cgal_program( "random_segments2.cpp" )
-  create_single_source_cgal_program( "sphere_d.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_degenerate_point_set.cpp b/3rdparty/CGAL-4.6/examples/Generator/random_degenerate_point_set.cpp
deleted file mode 100644
index b9e32d1..0000000
--- a/3rdparty/CGAL-4.6/examples/Generator/random_degenerate_point_set.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <cassert>
-#include <vector>
-#include <algorithm>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/algorithm.h>
-#include <CGAL/random_selection.h>
-
-using namespace CGAL;
-
-typedef Simple_cartesian<double>         R;
-typedef R::Point_2                       Point;
-typedef Creator_uniform_2<double,Point>  Creator;
-typedef std::vector<Point>               Vector;
-
-int main() {
-    // Create test point set. Prepare a vector for 1000 points.
-    Vector points;
-    points.reserve(1000);
-
-    // Create 600 points within a disc of radius 150.
-    Random_points_in_disc_2<Point,Creator> g( 150.0);
-    CGAL::cpp11::copy_n( g, 600, std::back_inserter(points));
-
-    // Create 200 points from a 15 x 15 grid.
-    points_on_square_grid_2( 250.0, 200, std::back_inserter(points),Creator());
-
-    // Select 100 points randomly and append them at the end of
-    // the current vector of points.
-    random_selection( points.begin(), points.end(), 100,
-		      std::back_inserter(points));
-
-    // Create 100 points that are collinear to two randomly chosen
-    // points and append them to the current vector of points.
-    random_collinear_points_2( points.begin(), points.end(), 100,
-			       std::back_inserter( points));
-
-    // Check that we have really created 1000 points.
-    assert( points.size() == 1000);
-
-    // Use a random permutation to hide the creation history
-    // of the point set.
-    std::random_shuffle( points.begin(), points.end(), default_random);
-
-    // Check range of values.
-    for ( Vector::iterator i = points.begin(); i != points.end(); i++){
-	assert( i->x() <=  251);
-	assert( i->x() >= -251);
-	assert( i->y() <=  251);
-	assert( i->y() >= -251);
-    }
-    return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_polygon.cpp b/3rdparty/CGAL-4.6/examples/Generator/random_polygon.cpp
deleted file mode 100644
index 0788c6c..0000000
--- a/3rdparty/CGAL-4.6/examples/Generator/random_polygon.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/random_polygon_2.h>
-#include <CGAL/Random.h>
-#include <CGAL/algorithm.h>
-
-#ifdef CGAL_USE_GMP
-#include <CGAL/Gmpz.h>
-typedef CGAL::Gmpz RT;
-#else
-// NOTE: the choice of double here for a number type may cause problems
-//       for degenerate point sets
-#include <CGAL/double.h>
-typedef double RT;
-#endif
-
-
-#include <fstream>
-#include <list>
-
-typedef CGAL::Simple_cartesian<RT>                        K;
-typedef K::Point_2                                        Point_2;
-typedef std::list<Point_2>                                Container;
-typedef CGAL::Polygon_2<K, Container>                     Polygon_2;
-typedef CGAL::Creator_uniform_2<int, Point_2>             Creator;
-typedef CGAL::Random_points_in_square_2<Point_2, Creator> Point_generator;
-
-const double RADIUS = 100;
-const int MAX_POLY_SIZE = 100;
-
-int main( )
-{
-   Polygon_2            polygon;
-   std::list<Point_2>   point_set;
-   CGAL::Random         rand;
-
-   int size = rand.get_int(4, MAX_POLY_SIZE);
-
-   // copy size points from the generator, eliminating duplicates, so the
-   // polygon will have <= size vertices
-   CGAL::copy_n_unique(Point_generator(RADIUS), size,
-                       std::back_inserter(point_set));
-
-   std::ostream_iterator< Point_2 >  out( std::cout, " " );
-   std::cout << "From the following " << point_set.size() << " points "
-             << std::endl;
-   std::copy(point_set.begin(), point_set.end(), out);
-   std::cout << std::endl;
-
-   CGAL::random_polygon_2(point_set.size(), std::back_inserter(polygon),
-                          point_set.begin());
-   std::cout << "The following simple polygon was made: " << std::endl;
-   std::cout << polygon << std::endl;
-   return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/HalfedgeDS/CMakeLists.txt
deleted file mode 100644
index d6d3c9e..0000000
--- a/3rdparty/CGAL-4.6/examples/HalfedgeDS/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( HalfedgeDS_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "hds_prog_color.cpp" )
-  create_single_source_cgal_program( "hds_prog_compact.cpp" )
-  create_single_source_cgal_program( "hds_prog_compact2.cpp" )
-  create_single_source_cgal_program( "hds_prog_default.cpp" )
-  create_single_source_cgal_program( "hds_prog_edge_iterator.cpp" )
-  create_single_source_cgal_program( "hds_prog_graph.cpp" )
-  create_single_source_cgal_program( "hds_prog_graph2.cpp" )
-  create_single_source_cgal_program( "hds_prog_halfedge_iterator.cpp" )
-  create_single_source_cgal_program( "hds_prog_vector.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Inscribed_areas/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Inscribed_areas/CMakeLists.txt
deleted file mode 100644
index bc5759c..0000000
--- a/3rdparty/CGAL-4.6/examples/Inscribed_areas/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Inscribed_areas_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "extremal_polygon_2_area.cpp" )
-  create_single_source_cgal_program( "extremal_polygon_2_perimeter.cpp" )
-  create_single_source_cgal_program( "largest_empty_rectangle.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Interpolation/CMakeLists.txt
deleted file mode 100644
index 045d265..0000000
--- a/3rdparty/CGAL-4.6/examples/Interpolation/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Interpolation_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "interpolation_2.cpp" )
-  create_single_source_cgal_program( "linear_interpolation_2.cpp" )
-  create_single_source_cgal_program( "nn_coordinates_2.cpp" )
-  create_single_source_cgal_program( "nn_coordinates_3.cpp" )
-  create_single_source_cgal_program( "rn_coordinates_2.cpp" )
-  create_single_source_cgal_program( "sibson_interpolation_2.cpp" )
-  create_single_source_cgal_program( "surface_neighbor_coordinates_3.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Interval_skip_list/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Interval_skip_list/CMakeLists.txt
deleted file mode 100644
index 2efa36e..0000000
--- a/3rdparty/CGAL-4.6/examples/Interval_skip_list/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Interval_skip_list_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "intervals.cpp" )
-  create_single_source_cgal_program( "isl_terrain.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Jet_fitting_3/CMakeLists.txt
deleted file mode 100644
index 6f13a4a..0000000
--- a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Jet_fitting_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  # use either Eigen or BLAS/LAPACK
-  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
-  if (NOT EIGEN3_FOUND)
-    find_package(LAPACK)
-    if(LAPACK_FOUND)
-      include( ${LAPACK_USE_FILE} )
-    endif(LAPACK_FOUND)
-  else()
-    include( ${EIGEN3_USE_FILE} )
-  endif()
-    
-  if(EIGEN3_FOUND OR LAPACK_FOUND)
-    # Link with Boost.ProgramOptions (optional)
-    find_package(Boost QUIET COMPONENTS program_options)
-    if(Boost_PROGRAM_OPTIONS_FOUND)
-      if( CGAL_AUTO_LINK_ENABLED )
-        message( STATUS "Boost.ProgramOptions library: found" )
-      else()
-        message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
-      endif()
-      add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
-      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES})
-   endif()
-
-    create_single_source_cgal_program( "Mesh_estimation.cpp" )
-    create_single_source_cgal_program( "Single_estimation.cpp" )
-
-  else(EIGEN3_FOUND OR LAPACK_FOUND)
-
-    message(STATUS "NOTICE: This program requires either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
-
-  endif(EIGEN3_FOUND OR LAPACK_FOUND)
-
-else()
-
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/Mesh_estimation.cpp b/3rdparty/CGAL-4.6/examples/Jet_fitting_3/Mesh_estimation.cpp
deleted file mode 100644
index 4a979c1..0000000
--- a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/Mesh_estimation.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Monge_via_jet_fitting.h>
-
-#include <fstream>
-#include <cassert>
-
-#include <CGAL/property_map.h>
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-#include <boost/program_options.hpp>
-namespace po = boost::program_options;
-#endif
-
-using namespace std;
-
-#include "PolyhedralSurf.h"
-#include "PolyhedralSurf_operations.h"
-#include "PolyhedralSurf_rings.h"
-
-//Kernel of the PolyhedralSurf
-typedef double                DFT;
-typedef CGAL::Simple_cartesian<DFT>  Data_Kernel;
-typedef Data_Kernel::Point_3  DPoint;
-typedef Data_Kernel::Vector_3 DVector;
-
-//HDS
-typedef PolyhedralSurf::Vertex_handle Vertex_handle;
-typedef PolyhedralSurf::Vertex Vertex;
-typedef PolyhedralSurf::Halfedge_handle Halfedge_handle;
-typedef PolyhedralSurf::Halfedge Halfedge;
-typedef PolyhedralSurf::Vertex_iterator Vertex_iterator;
-typedef PolyhedralSurf::Facet_handle Facet_handle;
-typedef PolyhedralSurf::Facet Facet;
-
-struct Hedge_cmp{
-  bool operator()(Halfedge_handle a,  Halfedge_handle b) const{
-    return &*a < &*b;
-  }
-};
-
-struct Facet_cmp{
-  bool operator()(Facet_handle a, Facet_handle b) const{
-    return &*a < &*b;
-  }
-};
-
-//Vertex property map, with std::map
-typedef std::map<Vertex*, int> Vertex2int_map_type;
-typedef boost::associative_property_map< Vertex2int_map_type > Vertex_PM_type;
-typedef T_PolyhedralSurf_rings<PolyhedralSurf, Vertex_PM_type > Poly_rings;
-
-//Hedge property map, with enriched Halfedge with its length
-// typedef HEdge_PM<PolyhedralSurf> Hedge_PM_type;
-// typedef T_PolyhedralSurf_hedge_ops<PolyhedralSurf, Hedge_PM_type> Poly_hedge_ops;
-//Hedge property map, with std::map
-typedef std::map<Halfedge_handle, double, Hedge_cmp> Hedge2double_map_type;
-typedef boost::associative_property_map<Hedge2double_map_type> Hedge_PM_type;
-typedef T_PolyhedralSurf_hedge_ops<PolyhedralSurf, Hedge_PM_type> Poly_hedge_ops;
-
-// //Facet property map with enriched Facet with its normal
-// typedef Facet_PM<PolyhedralSurf> Facet_PM_type;
-// typedef T_PolyhedralSurf_facet_ops<PolyhedralSurf, Facet_PM_type> Poly_facet_ops;
-//Facet property map, with std::map
-typedef std::map<Facet_handle, Vector_3, Facet_cmp> Facet2normal_map_type;
-typedef boost::associative_property_map<Facet2normal_map_type> Facet_PM_type;
-typedef T_PolyhedralSurf_facet_ops<PolyhedralSurf, Facet_PM_type> Poly_facet_ops;
-
-typedef double                   LFT;
-typedef CGAL::Simple_cartesian<LFT>     Local_Kernel;
-typedef CGAL::Monge_via_jet_fitting<Data_Kernel> My_Monge_via_jet_fitting;
-typedef My_Monge_via_jet_fitting::Monge_form My_Monge_form;
-
-
-// default parameter values and global variables
-unsigned int d_fitting = 2;
-unsigned int d_monge = 2;
-unsigned int nb_rings = 0;//seek min # of rings to get the required #pts
-unsigned int nb_points_to_use = 0;//
-bool verbose = false;
-unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
-
-
-//gather points around the vertex v using rings on the
-//polyhedralsurf. the collection of points resorts to 3 alternatives:
-// 1. the exact number of points to be used
-// 2. the exact number of rings to be used
-// 3. nothing is specified
-void gather_fitting_points(Vertex* v,
-			   std::vector<DPoint> &in_points,
-			   Vertex_PM_type& vpm)
-{
-  //container to collect vertices of v on the PolyhedralSurf
-  std::vector<Vertex*> gathered;
-  //initialize
-  in_points.clear();
-
-  //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect
-  //enough rings and discard some points of the last collected ring to
-  //get the exact "nb_points_to_use"
-  if ( nb_points_to_use != 0 ) {
-    Poly_rings::collect_enough_rings(v, nb_points_to_use, gathered, vpm);
-    if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use);
-  }
-  else { // nb_points_to_use=0, this is the default and the option -p is not considered;
-    // then option -a nb_rings is checked. If nb_rings=0, collect
-    // enough rings to get the min_nb_points required for the fitting
-    // else collect the nb_rings required
-    if ( nb_rings == 0 )
-      Poly_rings::collect_enough_rings(v, min_nb_points, gathered, vpm);
-    else Poly_rings::collect_i_rings(v, nb_rings, gathered, vpm);
-  }
-
-  //store the gathered points
-  std::vector<Vertex*>::iterator
-    itb = gathered.begin(), ite = gathered.end();
-  CGAL_For_all(itb,ite) in_points.push_back((*itb)->point());
-}
-
-///////////////MAIN///////////////////////////////////////////////////////
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-int main(int argc, char *argv[])
-#else
-int main()
-#endif
-{
-  string if_name_string;
-  string if_name; //input file name
-  string w_if_name;  //as above, but / replaced by _
-  string res4openGL_fname;
-  string verbose_fname;
-  std::ofstream out_4ogl, out_verbose;
-
-  try {
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-    po::options_description desc("Allowed options");
-    desc.add_options()
-      ("help,h", "produce help message.")
-      ("input-file,f", po::value<string>(&if_name_string)->default_value("data/ellipe0.003.off"),
-       "name of the input off file")
-      ("degree-jet,d", po::value<unsigned int>(&d_fitting)->default_value(2),
-       "degree of the jet, 1 <= degre-jet <= 4")
-      ("degree-monge,m", po::value<unsigned int>(&d_monge)->default_value(2),
-       "degree of the Monge rep, 1 <= degree-monge <= degree-jet")
-      ("nb-rings,a", po::value<unsigned int>(&nb_rings)->default_value(0),
-       "number of rings to collect neighbors. 0 means collect enough rings to make appro possible a>=1 fixes the nb of rings to be collected")
-      ("nb-points,p", po::value<unsigned int>(&nb_points_to_use)->default_value(0),
-       "number of neighbors to use.  0 means this option is not considered, this is the default p>=1 fixes the nb of points to be used")
-      ("verbose,v", po::value<bool>(&verbose)->default_value(false),
-       "verbose output on text file")
-      ;
-
-    po::variables_map vm;
-    po::store(po::parse_command_line(argc, argv, desc), vm);
-    po::notify(vm);
-
-    if (vm.count("help")) {
-      cout << desc << "\n";
-      return 1;
-    }
-#else
-    std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
-    if_name_string = "data/ellipe0.003.off";
-    d_fitting = 2;
-    d_monge = 2;
-    nb_rings = 0;
-    nb_points_to_use = 0;
-    verbose = false;
-#endif
-  }
-  catch(exception& e) {
-    cerr << "error: " << e.what() << "\n";
-    return 1;
-  }
-  catch(...) {
-    cerr << "Exception of unknown type!\n";
-  }
-
-  //modify global variables which are fct of options:
-  min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
-  if (nb_points_to_use < min_nb_points && nb_points_to_use != 0)
-    {std::cerr << "the nb of points asked is not enough to perform the fitting" << std::endl; exit(0);}
-
-  //prepare output file names
-  //--------------------------
-  std::cerr << "if_name_string" << if_name_string  << std::endl;
-  if_name = if_name_string;
-
-  w_if_name = if_name;
-  for(unsigned int i=0; i<w_if_name.size(); i++)
-    if (w_if_name[i] == '/') w_if_name[i]='_';
-  cerr << if_name << '\n';
-  cerr << w_if_name << '\n';
-
-  res4openGL_fname = w_if_name + ".4ogl.txt";
-std::cerr << "res4openGL_fname" << res4openGL_fname  << std::endl;
-  out_4ogl.open(res4openGL_fname.c_str(), std::ios::out);
-  assert(out_4ogl.good());
-  //if verbose only...
-  if(verbose){
-    verbose_fname  = w_if_name + ".verb.txt";
-    out_verbose.open(verbose_fname.c_str(), std::ios::out);
-    assert(out_verbose.good());
-    CGAL::set_pretty_mode(out_verbose);
-  }
-  unsigned int nb_vertices_considered = 0;//count vertices for verbose
-
-  //load the model from <mesh.off>
-  //------------------------------
-  PolyhedralSurf P;
-  std::ifstream stream(if_name.c_str());
-  stream >> P;
-  std::cout << "loadMesh...  "<< "Polysurf with " << P.size_of_vertices()
-	    << " vertices and " << P.size_of_facets()
-	    << " facets. " << std::endl;
-
-  if(verbose)
-    out_verbose << "Polysurf with " << P.size_of_vertices()
-                << " vertices and " << P.size_of_facets()
-                << " facets. " << std::endl;
-  //exit if not enough points in the model
-  if (min_nb_points > P.size_of_vertices())    exit(0);
-
-  //create property maps
-  //-----------------------------
-  //Vertex, using a std::map
-  Vertex2int_map_type vertex2props;
-  Vertex_PM_type vpm(vertex2props);
-
-  //Hedge, with enriched hedge
-  //HEdgePM_type hepm = get_hepm(boost::edge_weight_t(), P);
-  //Hedge, using a std::map
-  Hedge2double_map_type hedge2props;
-  Hedge_PM_type hepm(hedge2props);
-
-  //Facet PM, with enriched Facet
-  //FacetPM_type fpm = get_fpm(boost::vertex_attribute_t(), P);
-  //Facet PM, with std::map
-  Facet2normal_map_type facet2props;
-  Facet_PM_type fpm(facet2props);
-
-  //initialize Polyhedral data : length of edges, normal of facets
-  Poly_hedge_ops::compute_edges_length(P, hepm);
-  Poly_facet_ops::compute_facets_normals(P, fpm);
-
-  //MAIN LOOP: perform calculation for each vertex
-  //----------------------------------------------
-  std::vector<DPoint> in_points;  //container for data points
-  Vertex_iterator vitb, vite;
-
-  //initialize the tag of all vertices to -1
-  vitb = P.vertices_begin(); vite = P.vertices_end();
-  CGAL_For_all(vitb,vite) put(vpm, &(*vitb), -1);
-
-  vitb = P.vertices_begin(); vite = P.vertices_end();
-  for (; vitb != vite; vitb++) {
-    //initialize
-    Vertex* v = &(*vitb);
-    in_points.clear();
-    My_Monge_form monge_form;
-
-    //gather points around the vertex using rings
-    gather_fitting_points(v, in_points, vpm);
-
-    //skip if the nb of points is to small
-    if ( in_points.size() < min_nb_points )
-      {std::cerr << "not enough pts for fitting this vertex" << in_points.size() << std::endl;
-	continue;}
-
-    // perform the fitting
-    My_Monge_via_jet_fitting monge_fit;
-    monge_form = monge_fit(in_points.begin(), in_points.end(),
-			   d_fitting, d_monge);
-    //switch min-max ppal curv/dir wrt the mesh orientation
-    const DVector normal_mesh = Poly_facet_ops::compute_vertex_average_unit_normal(v, fpm);
-    monge_form.comply_wrt_given_normal(normal_mesh);
-
-    //OpenGL output. Scaling for ppal dir, may be optimized with a
-    //global mean edges length computed only once on all edges of P
-    DFT scale_ppal_dir = Poly_hedge_ops::compute_mean_edges_length_around_vertex(v, hepm)/2;
-
-    out_4ogl << v->point()  << " ";
-    monge_form.dump_4ogl(out_4ogl, scale_ppal_dir);
-
-    //verbose txt output
-    if (verbose) {
-      std::vector<DPoint>::iterator itbp = in_points.begin(), itep = in_points.end();
-      out_verbose << "in_points list : " << std::endl ;
-      for (;itbp!=itep;itbp++) out_verbose << *itbp << std::endl ;
-
-      out_verbose << "--- vertex " <<  ++nb_vertices_considered
-                  <<	" : " << v->point() << std::endl
-                  << "number of points used : " << in_points.size() << std::endl
-	;// << monge_form;
-    }
-  } //all vertices processed
-
-  //cleanup filenames
-  //------------------
-  out_4ogl.close();
-  if(verbose) {
-    out_verbose.close();
-  }  
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Kernel_23/CMakeLists.txt
deleted file mode 100644
index 6c7f8c8..0000000
--- a/3rdparty/CGAL-4.6/examples/Kernel_23/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Kernel_23_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "MyKernel.cpp" )
-  create_single_source_cgal_program( "cartesian_converter.cpp" )
-  create_single_source_cgal_program( "exact.cpp" )
-  create_single_source_cgal_program( "intersections.cpp" )
-  create_single_source_cgal_program( "points_and_segment.cpp" )
-  create_single_source_cgal_program( "surprising.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/intersections.cpp b/3rdparty/CGAL-4.6/examples/Kernel_23/intersections.cpp
deleted file mode 100644
index b439c7e..0000000
--- a/3rdparty/CGAL-4.6/examples/Kernel_23/intersections.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/intersections.h>
-#include <CGAL/iterator.h>
-#include <CGAL/point_generators_2.h>
-
-#include <boost/bind.hpp>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef K::Point_2                     Point;
-typedef K::Segment_2                   Segment;
-
-typedef CGAL::Creator_uniform_2<double,Point>              Pt_creator;
-typedef CGAL::Random_points_on_segment_2<Point,Pt_creator> P1;
-typedef CGAL::Random_points_on_circle_2<Point,Pt_creator>  P2;
-typedef CGAL::Creator_uniform_2< Point, Segment>           Seg_creator;
-typedef CGAL::Join_input_iterator_2< P1, P2, Seg_creator>  Seg_iterator;
-
-struct Intersector{
-  typedef CGAL::cpp11::result_of<K::Intersect_2(Segment,Segment)>::type result_type;
-  const Segment& s;
-  K::Intersect_2 intersect;
-
-  Intersector(const Segment& seg): s(seg) {}
-
-  result_type
-  operator() ( const Segment& other) const
-  {
-    return intersect(s, other);
-  }
-};
-
-int main()
-{
-  std::vector<Segment> input;
-
-  // Prepare point generator for the horizontal segment, length 200.
-  P1 p1( Point(-100,0), Point(100,0));
-
-  // Prepare point generator for random points on circle, radius 250.
-  P2 p2( 250);
-
-  // Create segments.
-  Seg_iterator g( p1, p2);
-  CGAL::cpp11::copy_n( g, 200, std::back_inserter(input));
-
-
-  // splitting results with Dispatch_output_iterator
-  std::vector<Point> points;
-  std::vector<Segment> segments;
-
-  typedef CGAL::Dispatch_output_iterator<
-    CGAL::cpp11::tuple<Point,Segment>, CGAL::cpp0x::tuple< std::back_insert_iterator<std::vector<Point> >,
-                                               std::back_insert_iterator<std::vector<Segment> > > >
-    Dispatcher;
-
-  Dispatcher disp = CGAL::dispatch_output<Point,Segment>( std::back_inserter(points),
-                                                          std::back_inserter(segments) );
-
-  // intersects the first segment of input with all other segments
-  // The resulting points or segments are written in the vectors with the same names
-  std::transform( input.begin(), input.end(), disp,
-                  Intersector(input.front()) );
-
-
-  std::cout << "Point intersections: " << points.size() << std::endl;
-  std::cout << "Segment intersections: " << segments.size() << std::endl;
-
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/CMakeLists.txt
deleted file mode 100644
index 577b888..0000000
--- a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Kinetic_data_structures_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Kinetic_Delaunay_triangulation_2.cpp" )
-  create_single_source_cgal_program( "Kinetic_Delaunay_triangulation_3.cpp" )
-  create_single_source_cgal_program( "Kinetic_insert_event.cpp" )
-  create_single_source_cgal_program( "Kinetic_regular_triangulation_3.cpp" )
-  create_single_source_cgal_program( "Kinetic_sort.cpp" )
-  create_single_source_cgal_program( "Kinetic_sweepline.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Kinetic_framework/CMakeLists.txt
deleted file mode 100644
index 3acc1f9..0000000
--- a/3rdparty/CGAL-4.6/examples/Kinetic_framework/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Kinetic_framework_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "adding_a_certificate.cpp" )
-  create_single_source_cgal_program( "defining_a_simulation_traits.cpp" )
-  create_single_source_cgal_program( "listener.cpp" )
-  create_single_source_cgal_program( "pointer_queue.cpp" )
-  create_single_source_cgal_program( "ref_counted.cpp" )
-  create_single_source_cgal_program( "trivial_kds.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerQt.inc b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerQt.inc
deleted file mode 100644
index 9c31178..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerQt.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-# This file must be included in your CMakeLists.txt to use cgal_map_viewer_qt.h.
-# You need to link the libraries in your executable by using 
-# TARGET_LINK_LIBRARIES( myexec ${MAP_VIEWER_LIBRARIES})
-
-if ( NOT CGAL_FOUND OR NOT CGAL_Qt4_FOUND)
-  message(STATUS "NOTICE: Libraries for lcc_viewer not found "
-                 "(CGAL, Qt4, QGLViewer).")
-endif( NOT CGAL_FOUND OR NOT CGAL_Qt4_FOUND)
-
-include( ${CGAL_USE_FILE} )
-
-SET(QT_USE_QTMAIN   TRUE )
-SET(QT_USE_QTOPENGL TRUE) 
-SET(QT_USE_QTXML    TRUE) 
-
-FIND_PACKAGE(Qt4        REQUIRED)
-find_package(QGLViewer  REQUIRED)
-find_package(OpenGL     REQUIRED)
-
-INCLUDE(${QT_USE_FILE})
-add_definitions(${QT_DEFINITIONS})
-
-include_directories( ${QGLVIEWER_INCLUDE_DIR} )
-add_definitions(${QGLVIEWER_DEFINITIONS})
-
-set (MAP_VIEWER_LIBRARIES ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES}
-                          ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
-
-ADD_DEFINITIONS("-DCGAL_LCC_USE_VIEWER -DCGAL_LCC_USE_QT")
-message(STATUS "Libraries for lcc_viewer found. You need to link them "
-               "in your executable by using "
-               "TARGET_LINK_LIBRARIES( myexec \${MAP_VIEWER_LIBRARIES})")
-
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc
deleted file mode 100644
index 126a37e..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-# This file must be included in your CMakeLists.txt to use
-# cgal_map_viewer_vtk.h.
-# You need to link the libraries in your executable by using 
-# TARGET_LINK_LIBRARIES( myexec ${MAP_VIEWER_LIBRARIES})
-
-if ( NOT CGAL_FOUND )
-  MESSAGE(FATAL_ERROR "Please install CGAL.")
-ENDIF(NOT CGAL_FOUND)
-
-include( ${CGAL_USE_FILE} )
-
-set(QT_USE_QT3SUPPORT true)
-set(QT_USE_QTOPENGL true)
-FIND_PACKAGE(Qt4 REQUIRED)
-
-INCLUDE(${QT_USE_FILE})
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-
-FIND_PACKAGE(VTK REQUIRED)
-IF(NOT VTK_DIR)
-  MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
-ENDIF(NOT VTK_DIR)
-
-INCLUDE(${VTK_USE_FILE})
-
-SET(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
-
-# Use the include path and library for Qt that is used by VTK.
-INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
-                    ${CMAKE_CURRENT_SOURCE_DIR})
-
-SET (MAP_VIEWER_LIBRARIES
-     QVTK ${QT_LIBRARIES} vtkRendering vtkGraphics
-     vtkIO vtkCommon)
-
-ADD_DEFINITIONS("-DCGAL_LCC_USE_VIEWER  -DCGAL_LCC_USE_VTK")
-    
-message(STATUS "Libraries for map_viewer found. You need to link them "
-        "in your executable by using "
-        "TARGET_LINK_LIBRARIES( myexec \${MAP_VIEWER_LIBRARIES})")
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLists.txt
deleted file mode 100644
index 6be728b..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project( Linear_cell_complex_examples )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# If you want to visualize a linear cell complex, there are 2 viewers
-# based on qt and vtk. Just uncomment the corresponding lines
-# find_package(CGAL QUIET COMPONENTS Core Qt4)
-# include("CMakeLCCViewerQt.inc")
-# include("CMakeLCCViewerVtk.inc")
-
-# If you don't want to visualize, use the following line (otherwise comment it)
-find_package(CGAL QUIET COMPONENTS Core)
-
-# For Gprof.
-# ADD_DEFINITIONS("-pg")
-# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
-
-# To use valgrind, we must disable rounding math ckeck.
-# add_definition(-DCGAL_DISABLE_ROUNDING_MATH_CHECK)
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-  include_directories(BEFORE ../../include)
-
-  create_single_source_cgal_program( "linear_cell_complex_3.cpp" )
-  create_single_source_cgal_program( "linear_cell_complex_4.cpp" )
-  create_single_source_cgal_program(
-                  "linear_cell_complex_3_with_colored_vertices.cpp" )
-  create_single_source_cgal_program(
-                  "linear_cell_complex_3_with_mypoint.cpp" )
-
-  create_single_source_cgal_program("plane_graph_to_lcc_2.cpp")
-  create_single_source_cgal_program("linear_cell_complex_3_attributes_management.cpp")
-
-  add_executable(linear_cell_complex_3_triangulation
-                          linear_cell_complex_3_triangulation.cpp)
-  target_link_libraries(linear_cell_complex_3_triangulation ${CGAL_LIBRARIES}
-                                   ${CGAL_3RD_PARTY_LIBRARIES}
-                                   ${MAP_VIEWER_LIBRARIES})
-
-  add_executable(voronoi_2 voronoi_2.cpp)
-  target_link_libraries(voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
-                                  ${MAP_VIEWER_LIBRARIES})
-
-  add_executable(voronoi_3 voronoi_3.cpp)
-  target_link_libraries(voronoi_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
-                                  ${MAP_VIEWER_LIBRARIES})
-
-else()
-
-  message(STATUS "This program requires the CGAL library, "
-                  "and will not be compiled.")
-
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/README.txt b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/README.txt
deleted file mode 100644
index 4001f29..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/README.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Examples for Linear_cell_complex package:
-=========================================
-
-* linear_cell_complex_3.cpp
-  linear_cell_complex_3_with_colored_vertices.cpp
-  linear_cell_complex_4.cpp
-
-  Three "basic" examples, detailled in the user manual.
-
-
-* plane_graph_to_lcc_2.cpp
-
-  Program allowing to transform a planar graph into a 2D linear cell complex.
-
-
-* linear_cell_complex_3_triangulation.cpp
-
-  Example showing how to triangulate a face of a Linear_cell_complex, 
-  using CGAL::Constrained_Delaunay_triangulation_2.
-
-
-* voronoi_2.cpp
-
-  Example showing how to compute 2D voronoi diagram of a set of 2D points.
-
-
-* voronoi_3.cpp
-
-  Example showing how to compute 3D voronoi diagram of a set of 3D points.
-
-
-* linear_cell_complex_3_with_mypoint.cpp
-
-  Example showing how to customize the type of points used in LCC.
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp
deleted file mode 100644
index 38abbf0..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Linear_cell_complex_constructors.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-
-#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
-#include <CGAL/Triangulation_vertex_base_with_info_2.h>
-#include <CGAL/Triangulation_face_base_with_info_2.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-
-#include <iostream>
-#include <algorithm>
-#include <vector>
-
-/* If you want to use a viewer, you can use one of the following file
- * depending if you use vtk or qglviewer. */
-#ifdef CGAL_LCC_USE_QT
-#include "linear_cell_complex_3_viewer_qt.h"
-#else 
-#ifdef CGAL_LCC_USE_VTK
-#include "linear_cell_complex_3_viewer_vtk.h"
-#endif
-#endif
-
-typedef CGAL::Linear_cell_complex<3> LCC_3;
-typedef LCC_3::Dart_handle           Dart_handle;
-typedef LCC_3::Point                 Point;
-typedef LCC_3::FT                    FT;
-typedef LCC_3::Traits Traits;
-
-typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits> P_traits;
-typedef CGAL::Triangulation_vertex_base_with_info_2<Dart_handle,P_traits> Vb;
-
-struct Face_info {
-  bool exist_edge[3];
-  bool is_external;
-};
-
-typedef CGAL::Triangulation_face_base_with_info_2<Face_info,P_traits> Fb1;
-
-typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>    Fb;
-typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                   TDS;
-typedef CGAL::No_intersection_tag                                     Itag;
-typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits, TDS,
-                                                   Itag>              CDT;
-
-bool is_external(CDT::Face_handle fh)
-{
-  return fh->info().is_external;
-}
-
-int number_of_existing_edge(CDT::Face_handle fh)
-{
-  unsigned res=0;
-  for (int i=0; i<3; ++i)
-    if (fh->info().exist_edge[i]) ++res;
-  return res;
-}
-
-int get_free_edge(CDT::Face_handle fh)
-{
-  CGAL_assertion( number_of_existing_edge(fh)==2 );
-  for (int i=0; i<3; ++i)
-    if (!fh->info().exist_edge[i]) return i;
-  
-  CGAL_assertion(false);
-  return -1;
-}
-
-void constrained_delaunay_triangulation(LCC_3 &lcc, Dart_handle d1)
-{
-  CGAL::set_ascii_mode(std::cout);
-  std::cout<<"Vertices: ";
-  for (LCC_3::Vertex_attribute_const_range::iterator
-         v=lcc.vertex_attributes().begin(),
-         vend=lcc.vertex_attributes().end(); v!=vend; ++v)
-    std::cout << lcc.point_of_vertex_attribute(v) << "; ";
-  std::cout<<std::endl;
- 
-  LCC_3::Vector normal = CGAL::compute_normal_of_cell_2(lcc,d1);
-  P_traits cdt_traits(normal);
-  CDT cdt(cdt_traits); 
-    
-  //inserting the constraints edge by edge
-  LCC_3::Dart_of_orbit_range<1>::iterator
-    it(lcc.darts_of_orbit<1>(d1).begin());
-
-  CDT::Vertex_handle previous=LCC_3::null_handle, first=LCC_3::null_handle,
-    vh=LCC_3::null_handle;
-
-   for (LCC_3::Dart_of_orbit_range<1>::iterator
-          itend(lcc.darts_of_orbit<1>(d1).end()); it!=itend; ++it)
-   {     
-     vh = cdt.insert(lcc.point(it));
-     vh->info()=it;
-     if( first==NULL ){
-       first=vh;
-     }
-     if( previous!=NULL){
-       CGAL_assertion( previous !=vh );
-       cdt.insert_constraint(previous,vh);
-     }
-
-     previous=vh;
-   }
-   cdt.insert_constraint(previous,first);
-   CGAL_assertion(cdt.is_valid());
-   
-   // sets mark is_external
-   for( CDT::All_faces_iterator fit = cdt.all_faces_begin(),
-          fitend = cdt.all_faces_end(); fit != fitend; ++fit)
-   {
-     fit->info().is_external = false;
-     fit->info().exist_edge[0]=false;
-     fit->info().exist_edge[1]=false;
-     fit->info().exist_edge[2]=false;
-   }
-	
-   std::queue<CDT::Face_handle> face_queue;
-      
-   face_queue.push(cdt.infinite_vertex()->face());
-   while(! face_queue.empty() )
-   {
-     CDT::Face_handle fh = face_queue.front();
-     face_queue.pop();
-     if(!fh->info().is_external)
-     {
-       fh->info().is_external = true;
-       for(int i = 0; i <3; ++i)
-       {
-         if(!cdt.is_constrained(std::make_pair(fh, i)))
-         {
-           face_queue.push(fh->neighbor(i));
-         }
-       }
-     }
-   }
-
-   for( CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(),
-          eitend = cdt.finite_edges_end(); eit != eitend; ++eit)
-   {
-     CDT::Face_handle fh = eit->first;
-     int index = eit->second;
-     CDT::Face_handle opposite_fh = fh->neighbor(index);
-     if(cdt.is_constrained(std::make_pair(fh, index)))
-     {
-       fh->info().exist_edge[index]=true;
-       opposite_fh->info().exist_edge[cdt.mirror_index(fh,index)]=true;
-       
-       if ( !fh->info().is_external && number_of_existing_edge(fh)==2 )
-         face_queue.push(fh);
-       if ( !opposite_fh->info().is_external &&
-            number_of_existing_edge(opposite_fh)==2 )
-         face_queue.push(opposite_fh);
-     }
-   }
-   
-   while( !face_queue.empty() )
-   {
-     CDT::Face_handle fh = face_queue.front();
-     face_queue.pop();
-     CGAL_assertion( number_of_existing_edge(fh)>=2 ); // i.e. ==2 or ==3
-     CGAL_assertion( !fh->info().is_external );
-     
-     if (number_of_existing_edge(fh)==2)
-     {
-       int index = get_free_edge(fh);
-       CDT::Face_handle opposite_fh = fh->neighbor(index);
-
-       CGAL_assertion( !fh->info().exist_edge[index] );
-       CGAL_assertion( !opposite_fh->info().
-                       exist_edge[cdt.mirror_index(fh,index)] );
-       
-       const CDT::Vertex_handle va = fh->vertex(cdt. cw(index));
-       const CDT::Vertex_handle vb = fh->vertex(cdt.ccw(index));
-       
-       Dart_handle ndart=
-         CGAL::insert_cell_1_in_cell_2(lcc,va->info(),vb->info());         
-       va->info()=lcc.beta<2>(ndart);
-
-       fh->info().exist_edge[index]=true;
-       opposite_fh->info().exist_edge[cdt.mirror_index(fh,index)]=true;
-       
-       if ( !opposite_fh->info().is_external &&
-            number_of_existing_edge(opposite_fh)==2 )
-         face_queue.push(opposite_fh);
-     }
-   }   
-}
-
-Dart_handle make_facet(LCC_3& lcc,const std::vector<Point>& points)
-{
-  Dart_handle d =
-    CGAL::make_combinatorial_polygon<LCC_3>(lcc,(unsigned int)points.size());
-  for (unsigned int i=0; i<points.size(); ++i)
-  {
-    lcc.set_vertex_attribute_of_dart(d, lcc.create_vertex_attribute(points[i]));
-    d=lcc.beta<1>(d);
-  }
-  return d;
-}
-
-
-int main()
-{
-  LCC_3 lcc;
-
-  // Create one tetrahedra.
-  Dart_handle d1 = lcc.make_tetrahedron(Point(-1, 0, 0), Point(0, 2, 0),
-                                        Point(1, 0, 0), Point(1, 1, 2));
-
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-  constrained_delaunay_triangulation(lcc,d1);
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-  lcc.clear();
-  std::cout<<std::endl
-           <<"###################################################### \n"
-           <<std::endl;
-
-  // Create one hexahedron.
-  d1 = lcc.make_hexahedron(Point(0,0,0), Point(1,0,0), Point(1,1,0),
-                           Point(0,1,0), Point(0,1,1), Point(0,0,1),
-                           Point(1,0,1), Point(1,1,1));
-
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-  
-  constrained_delaunay_triangulation(lcc,d1);
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;  
-  
-  constrained_delaunay_triangulation(lcc,lcc.beta<2>(d1));
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-  lcc.clear();
-  std::cout<<std::endl
-           <<"###################################################### \n"
-           <<std::endl;
-  
-  std::vector<Point> points;
-  points.push_back(Point(0,0,0));
-  points.push_back(Point(5,15,0));
-  points.push_back(Point(8,18,0));
-  points.push_back(Point(12,5,0));
-  points.push_back(Point(8,3,0));
-  points.push_back(Point(8,-9,0));
-  points.push_back(Point(5,0,0));
-  points.push_back(Point(2,-3,2));
-  d1=make_facet(lcc,points);
-
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-#ifdef CGAL_LCC_USE_VIEWER
-  display_lcc(lcc);
-#endif // CGAL_LCC_USE_VIEWER
-  
-  constrained_delaunay_triangulation(lcc,d1);
-  lcc.display_characteristics(std::cout) << ", valid="
-                                         << lcc.is_valid()<<std::endl;
-#ifdef CGAL_LCC_USE_VIEWER
-  display_lcc(lcc);
-#endif // CGAL_LCC_USE_VIEWER
-
-  lcc.clear();
-  std::cout<<std::endl
-           <<"###################################################### \n"
-           <<std::endl;
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h
deleted file mode 100644
index 56eca67..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h
+++ /dev/null
@@ -1,446 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-// Contributor(s): Adrien Pilleboue
-
-#ifndef CGAL_LCC_3_VIEWER_QT_H
-#define CGAL_LCC_3_VIEWER_QT_H
-
-#include <QApplication>
-#include <QKeyEvent>
-
-#include <QGLViewer/qglviewer.h>
-#include <GL/gl.h>
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/Cartesian_converter.h>
-
-typedef CGAL::Cartesian<double> Local_kernel;
-typedef typename Local_kernel::Point_3  Local_point;
-typedef typename Local_kernel::Vector_3 Local_vector;
-
-template<class LCC, int dim=LCC::ambient_dimension>
-struct Geom_utils;
-
-template<class LCC>
-struct Geom_utils<LCC,3>
-{
-  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
-  { return converter(lcc.point_of_vertex_attribute(vh)); }
-
-  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
-  { return converter(lcc.point(dh)); }
-
-  Local_vector get_facet_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
-  {
-    Local_vector n = converter(CGAL::compute_normal_of_cell_2<LCC>(lcc,dh));
-    n = n/(CGAL::sqrt(n*n));
-    return n;
-  }
-
-  Local_vector get_vertex_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
-  {
-    Local_vector n = converter(CGAL::compute_normal_of_cell_0<LCC>(lcc,dh));
-    n = n/(CGAL::sqrt(n*n));
-    return n;
-  }
-protected:
-  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;
-};
-
-template<class LCC>
-struct Geom_utils<LCC,2>
-{
-  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
-  {
-    Local_point p(converter(lcc.point_of_vertex_attribute(vh).x()),0,
-                  converter(lcc.point_of_vertex_attribute(vh).y()));
-    return p;
-  }
-
-  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
-  { return get_point(lcc, lcc.vertex_attribute(dh)); }
-
-  Local_vector get_facet_normal(LCC&, typename LCC::Dart_const_handle)
-  {
-    Local_vector n(0,1,0);
-    return n;
-  }
-
-  Local_vector get_vertex_normal(LCC&, typename LCC::Dart_const_handle)
-  {
-    Local_vector n(0,1,0);
-    return n;
-  }
-protected:
-  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;
-};
-
-template<class LCC>
-CGAL::Bbox_3 bbox(LCC& lcc)
-{
-  CGAL::Bbox_3 bb;
-  Geom_utils<LCC> geomutils;
-
-  typename LCC::Vertex_attribute_range::const_iterator
-    it=lcc.vertex_attributes().begin(), itend=lcc.vertex_attributes().end();
-  if ( it!=itend )
-  {
-    bb = geomutils.get_point(lcc, it).bbox();
-    for( ++it; it!=itend; ++it)
-    {
-      bb = bb + geomutils.get_point(lcc, it).bbox();
-    }
-  }
-
-  return bb;
-}
-
-template<class LCC>
-class SimpleLCCViewerQt : public QGLViewer
-{
-  typedef typename LCC::Dart_handle Dart_handle;
-
-public:
-
-  // Constructor/Destructor
-  SimpleLCCViewerQt(LCC& alcc) :
-    lcc(alcc),
-    wireframe(false),
-    flatShading(true),
-    edges(true),
-    vertices(true),
-    m_displayListCreated(false)
-  {
-    setWindowTitle("3D lcc viewer");
-    resize(500, 450);
-
-    QGLFormat newFormat = this->format();
-    newFormat.setSampleBuffers(true);
-    newFormat.setSamples(16);
-    this->setFormat(newFormat);
-  }
-
-protected :
-  void drawAllFaces(bool flat)
-  {
-    for(typename LCC::template One_dart_per_cell_range<2>::iterator
-          dartIter=lcc.template one_dart_per_cell<2>().begin();
-        dartIter.cont(); ++dartIter)
-    {
-      Dart_handle& dart = dartIter;
-      ::glBegin(GL_POLYGON);
-      ::glColor3f(1.0f, .7f, .7f);
-
-      if(flat)
-      {
-        Local_vector normal = geomutils.get_facet_normal(lcc,dart);
-        ::glNormal3d(normal.x(), normal.y(), normal.z());
-      }
-
-      for (typename LCC::template Dart_of_orbit_range<1>::const_iterator
-             orbitIter = lcc.template darts_of_orbit<1>(dart).begin();
-           orbitIter.cont(); ++orbitIter)
-      {
-        if(!flat)
-        {
-          // If Gouraud shading: 1 normal per vertex
-          Local_vector n = geomutils.get_vertex_normal(lcc,orbitIter);
-          ::glNormal3d(n.x(),n.y(),n.z());
-        }
-
-        Local_point p = geomutils.get_point(lcc, orbitIter);
-        ::glVertex3d(p.x(),p.y(),p.z());
-      }
-
-      ::glEnd();
-    }
-  }
-
-  void drawAllEdges()
-  {
-    //    ::glDepthRange(0.0, 1.0-0.005);
-    ::glBegin(GL_LINES);
-    ::glColor3f(0.0f, 0.0f, 0.0f);
-
-    for(typename LCC::template One_dart_per_cell_range<1>::iterator
-          dartIter=lcc.template one_dart_per_cell<1>().begin();
-        dartIter.cont(); ++dartIter)
-    {
-      Dart_handle& dart = dartIter;
-
-      Local_point p =  geomutils.get_point(lcc, dartIter);
-      Dart_handle d2 = lcc.other_extremity(dartIter);
-      if ( d2!=NULL )
-      {
-        Local_point p2 = geomutils.get_point(lcc, d2);
-        glVertex3f( p.x(),p.y(),p.z());
-        glVertex3f( p2.x(),p2.y(),p2.z());
-      }
-    }
-
-    ::glEnd();
-    //    ::glDepthRange(0.005, 1.0);
-  }
-
-  void drawAllVertices()
-  {
-    //    ::glDepthRange(0.0, 1.0-0.005);
-    ::glPointSize(7.0);
-    ::glBegin(GL_POINTS);
-    ::glColor3f(0.2f, 0.2f, 0.7f);
-
-    for (typename LCC::Vertex_attribute_const_range::iterator
-           v=lcc.vertex_attributes().begin(),
-           vend=lcc.vertex_attributes().end();
-         v!=vend; ++v)
-    {
-      Local_point p = geomutils.get_point(lcc, v);
-      glVertex3f(p.x(), p.y(), p.z());
-    }
-
-    ::glEnd();
-    //    ::glDepthRange(0.005, 1.0);
-  }
-
-  void initDraw()
-  {
-    //Compile drawFacet
-    std::cout << "Compile Display Lists : Faces," << std::flush;
-    m_dlFaces = ::glGenLists(1);
-    ::glNewList(m_dlFaces, GL_COMPILE);
-    drawAllFaces(false);
-    ::glEndList();
-
-    //Compile drawFacet with flat shading
-    std::cout << "Faces (flat shading), " << std::flush;
-    m_dlFacesFlat = ::glGenLists(1);
-    ::glNewList(m_dlFacesFlat, GL_COMPILE);
-    drawAllFaces(true);
-    ::glEndList();
-
-    //Compile drawEdge
-    std::cout << "edges, " << std::flush;
-    m_dlEdges = ::glGenLists(1);
-    ::glNewList(m_dlEdges, GL_COMPILE);
-    drawAllEdges();
-    ::glEndList();
-
-    //Compile drawvertices
-    std::cout << "vertices" << std::flush;
-    m_dlVertices = ::glGenLists(1);
-    ::glNewList(m_dlVertices, GL_COMPILE);
-    drawAllVertices();
-    ::glEndList();
-
-     std::cout << ". DONE." << std::endl;
-     m_displayListCreated = true;
-  }
-
-  virtual void draw()
-  {
-    if(!m_displayListCreated) initDraw();
-
-    if ( !wireframe )
-    {
-      if(flatShading) ::glCallList(m_dlFacesFlat);
-      else ::glCallList(m_dlFaces);
-    }
-
-    if(edges) ::glCallList(m_dlEdges);
-
-    if(vertices) ::glCallList(m_dlVertices);
-  }
-
-  virtual void init()
-  {
-    // Restore previous viewer state.
-    restoreStateFromFile();
-
-    // Define 'Control+Q' as the new exit shortcut (default was 'Escape')
-    setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q);
-
-    // Add custom key description (see keyPressEvent).
-    setKeyDescription(Qt::Key_W, "Toggles wire frame display");
-    setKeyDescription(Qt::Key_F, "Toggles flat shading display");
-    setKeyDescription(Qt::Key_E, "Toggles edges display");
-    setKeyDescription(Qt::Key_V, "Toggles vertices display");
-
-    // Light default parameters
-    ::glLineWidth(2.4f);
-    ::glPointSize(7.f);
-    //    ::glEnable(GL_POLYGON_OFFSET_FILL);
-    //    ::glPolygonOffset(1.f,1.f);
-    ::glClearColor(1.0f,1.0f,1.0f,0.0f);
-    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
-    ::glEnable(GL_LIGHTING);
-
-    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-    // ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
- //   ::glDepthRange(0.005, 1.0);
-    if (flatShading)
-    {
-      ::glShadeModel(GL_FLAT);
-      ::glDisable(GL_BLEND);
-      ::glDisable(GL_LINE_SMOOTH);
-      ::glDisable(GL_POLYGON_SMOOTH_HINT);
-      ::glBlendFunc(GL_ONE, GL_ZERO);
-      ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-    }
-    else
-    {
-      ::glShadeModel(GL_SMOOTH);
-      ::glEnable(GL_BLEND);
-      ::glEnable(GL_LINE_SMOOTH);
-      ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-      ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    }
-
-    CGAL::Bbox_3 bb = bbox(lcc);
-
-    this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(),
-                                                       bb.ymin(),
-                                                       bb.zmin()),
-                                        qglviewer::Vec(bb.xmax(),
-                                                       bb.ymax(),
-                                                       bb.zmax()));
-
-    this->showEntireScene();
-    initDraw();
-  }
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    const Qt::KeyboardModifiers modifiers = e->modifiers();
-
-    bool handled = false;
-    if ((e->key()==Qt::Key_W) && (modifiers==Qt::NoButton))
-    {
-      wireframe = !wireframe;
-      if (wireframe)
-        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-      else
-        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-      handled = true;
-      updateGL();
-    }
-    else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton))
-    {
-      flatShading = !flatShading;
-      if (flatShading)
-      {
-        ::glShadeModel(GL_FLAT);
-        ::glDisable(GL_BLEND);
-        ::glDisable(GL_LINE_SMOOTH);
-        ::glDisable(GL_POLYGON_SMOOTH_HINT);
-        ::glBlendFunc(GL_ONE, GL_ZERO);
-        ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
-      }
-      else
-      {
-        ::glShadeModel(GL_SMOOTH);
-        ::glEnable(GL_BLEND);
-        ::glEnable(GL_LINE_SMOOTH);
-        ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-        ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-      }
-      handled = true;
-      updateGL();
-    }
-    else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton))
-    {
-      edges = !edges;
-      handled = true;
-      updateGL();
-    }
-    else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton))
-    {
-      vertices = !vertices;
-      handled = true;
-      updateGL();
-    }
-
-    if (!handled)
-      QGLViewer::keyPressEvent(e);
-  }
-
-
-  virtual QString helpString() const
-  {
-    QString text("<h2>L C C   V i e w e r</h2>");
-    text += "Use the mouse to move the camera around the object. ";
-    text += "You can respectively revolve around, zoom and translate with "
-      "the three mouse buttons. ";
-    text += "Left and middle buttons pressed together rotate around the "
-      "camera view direction axis<br><br>";
-    text += "Pressing <b>Alt</b> and one of the function keys "
-      "(<b>F1</b>..<b>F12</b>) defines a camera keyFrame. ";
-    text += "Simply press the function key again to restore it. "
-      "Several keyFrames define a ";
-    text += "camera path. Paths are saved when you quit the application "
-      "and restored at next start.<br><br>";
-    text += "Press <b>F</b> to display the frame rate, <b>A</b> for the "
-      "world axis, ";
-    text += "<b>Alt+Return</b> for full screen mode and <b>Control+S</b> "
-      "to save a snapshot. ";
-    text += "See the <b>Keyboard</b> tab in this window for a complete "
-      "shortcut list.<br><br>";
-    text += "Double clicks automates single click actions: A left button "
-      "double click aligns the closer axis with the camera (if close enough). ";
-    text += "A middle button double click fits the zoom of the camera and "
-      "the right button re-centers the scene.<br><br>";
-    text += "A left button double click while holding right button pressed "
-      "defines the camera <i>Revolve Around Point</i>. ";
-    text += "See the <b>Mouse</b> tab and the documentation web pages for "
-      "details.<br><br>";
-    text += "Press <b>Escape</b> to exit the viewer.";
-    return text;
-  }
-private:
-  LCC& lcc;
-  bool wireframe;
-  bool flatShading;
-  bool edges;
-  bool vertices;
-  Geom_utils<LCC> geomutils;
-
-  GLuint m_dlFaces;
-  GLuint m_dlFacesFlat;
-  GLuint m_dlEdges;
-  GLuint m_dlVertices;
-  bool m_displayListCreated;
-};
-
-template<class LCC>
-void display_lcc(LCC& alcc)
-{
-  int argc=1;
-  typedef char* s;
-
-  const char* argv[2]={"lccviewer","\0"};
-  QApplication app(argc,const_cast<char**>(argv));
-
-  SimpleLCCViewerQt<LCC> mainwindow(alcc);
-  mainwindow.show();
-
-  app.exec();
-};
-
-#endif // CGAL_LCC_3_VIEWER_QT_H
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h
deleted file mode 100644
index 75d0263..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_LCC_3_VIEWER_VTK_H
-#define CGAL_LCC_3_VIEWER_VTK_H
-
-#include <QApplication>
-#include <QVBoxLayout>
-#include <QMenuBar>
-#include <QMainWindow>
-
-#include <QVTKWidget.h>
-
-#include <vtkActor.h>
-#include <vtkRenderer.h>
-#include <vtkRenderWindow.h>
-#include <vtkPolyDataMapper.h>
-#include <vtkPolyData.h>
-#include <vtkPolygon.h>
-#include <vtkCellArray.h>
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/Cartesian_converter.h>
-
-typedef CGAL::Cartesian<double> Local_kernel;
-typedef typename Local_kernel::Point_3  Local_point;
-typedef typename Local_kernel::Vector_3 Local_vector;
-
-template<class LCC, int dim=LCC::ambient_dimension>
-struct Geom_utils;
-
-template<class LCC>
-struct Geom_utils<LCC,3>
-{
-  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
-  { return converter(lcc.point_of_vertex_attribute(vh)); }
-
-  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
-  { return converter(lcc.point(dh)); }
-  
-  Local_vector get_facet_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
-  {
-    Local_vector n = converter(CGAL::compute_normal_of_cell_2<LCC>(lcc,dh));
-    n = n/(CGAL::sqrt(n*n));
-    return n;
-  }
-
-  Local_vector get_vertex_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
-  {
-    Local_vector n = converter(CGAL::compute_normal_of_cell_0<LCC>(lcc,dh));
-    n = n/(CGAL::sqrt(n*n));
-    return n;
-  }
-protected:
-  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;
-};
-
-template<class LCC>
-struct Geom_utils<LCC,2>
-{
-  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
-  {
-    Local_point p(converter(lcc.point_of_vertex_attribute(vh).x()),0,
-                  converter(lcc.point_of_vertex_attribute(vh).y()));
-    return p;
-  }
-
-  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
-  { return get_point(lcc, lcc.vertex_attribute(dh)); }
-
-  Local_vector get_facet_normal(LCC&, typename LCC::Dart_const_handle)
-  {
-    Local_vector n(0,1,0);
-    return n;
-  }
-
-  Local_vector get_vertex_normal(LCC&, typename LCC::Dart_const_handle)
-  {
-    Local_vector n(0,1,0);
-    return n;    
-  }
-protected:
-  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;  
-};
-
-class SimpleViewVtk : public QMainWindow
-{
-public:
-  // Constructor/Destructor
-  SimpleViewVtk(QWidget* p = 0) : QMainWindow(p)
-  {
-    //setupUi(this);
-    centralWidget = new QWidget(this);
-    setCentralWidget(centralWidget);
-    vtkWidget = new QVTKWidget(centralWidget);
-
-    vboxLayout = new QVBoxLayout(centralWidget);
-    vboxLayout->addWidget(vtkWidget);
-
-    QAction* a_fileExit = new QAction(tr("&Exit"), this);
-    a_fileExit->setShortcut(tr("Ctrl+Q"));
-    a_fileExit->setStatusTip(tr("Exit"));
-    connect(a_fileExit, SIGNAL(triggered()), this, SLOT(close()));
-    
-    QMenu* file_menu = this->menuBar()->addMenu(tr("&File"));
-    file_menu->addAction(a_fileExit);
-    
-    // QT/VTK interact
-    ren = vtkRenderer::New();
-    vtkWidget->GetRenderWindow()->AddRenderer(ren);
-
-    resize(500, 450);
-  }
-  
-protected:
-  QWidget     *centralWidget;
-  QVBoxLayout *vboxLayout;
-  QVTKWidget  *vtkWidget;
-  
-  vtkPolyDataMapper *mapper;
-  vtkActor          *actor;
-  vtkRenderer       *ren;   
-};
-
-template<class LCC>
-class SimpleLCCViewerVtk : public SimpleViewVtk
-{
-  typedef typename LCC::Dart_handle Dart_handle;
-  Geom_utils<LCC> geomutils;
-
-public:
-  SimpleLCCViewerVtk(LCC& lcc) : SimpleViewVtk()
-  {
-    setWindowTitle("3D lcc viewer");	
-
-    vtkPolyData *polydata = vtkPolyData::New();
-  
-    int facettreated = lcc.get_new_mark();
-    int vertextreated = lcc.get_new_mark();
-
-    vtkCellArray* polygons = vtkCellArray::New();
-    vtkCellArray* vertices = vtkCellArray::New();  
-    vtkPoints* points = vtkPoints::New();
-    unsigned int nbpoints=0;
-
-    for(typename LCC::Dart_range::iterator it=lcc.darts().begin(),
-        itend=lcc.darts().end(); it!=itend; ++it)
-    {
-      if (!lcc.is_marked(it,facettreated))
-      {
-        unsigned int nb=0;
-
-        for (typename LCC::template Dart_of_orbit_range<1>::iterator
-               it2=lcc.template darts_of_orbit<1>(it).begin();
-             it2.cont(); ++it2)
-        {
-          ++nb;
-          lcc.mark(it2, facettreated);
-          if ( lcc.dimension>=3 && !lcc.is_free(it2, 3) )
-            lcc.mark(lcc.beta(it2, 3), facettreated);
-        }
-
-        polygons->InsertNextCell(nb);
-        for (typename LCC::template Dart_of_orbit_range<1>::iterator
-               it2=lcc.template darts_of_orbit<1>(it).begin();
-             it2.cont(); ++it2)
-        {
-          Local_point p =  geomutils.get_point(lcc, it2);
-          vtkIdType id=points->InsertNextPoint(p.x(),p.y(),p.z());
-          ++nbpoints;
-
-          if ( !lcc.is_marked(it2,vertextreated) )
-          {
-            vertices->InsertNextCell(1);
-            vertices->InsertCellPoint(id);
-            
-            CGAL::mark_cell<LCC, 0>(lcc, it2, vertextreated);
-          }
-	      
-          polygons->InsertCellPoint(id);
-        }
-      }
-      polydata->SetPoints(points);
-      polydata->SetVerts(vertices);
-      polydata->SetPolys(polygons);
-    }
-
-    CGAL_assertion(lcc.is_whole_map_marked(vertextreated));
-    CGAL_assertion(lcc.is_whole_map_marked(facettreated));
-  
-    lcc.free_mark(vertextreated);
-    lcc.free_mark(facettreated);  
-  
-  
-    // Mapper
-    mapper = vtkPolyDataMapper::New();
-    mapper->ImmediateModeRenderingOn();
-    mapper->SetInput(polydata);
-
-    // Actor in scene
-    actor = vtkActor::New();
-    actor->SetMapper(mapper);
-
-    // Add Actor to renderer
-    ren->AddActor(actor);
-
-    // Reset camera
-    ren->ResetCamera();
-
-    ren->GetRenderWindow()->Render();
-  }
-};
-
-template<class LCC>
-void display_lcc(LCC& alcc)
-{
-  int argc=1;
-  typedef char* s;
-  
-  const char* argv[2]={"lccviewer","\0"};
-  QApplication app(argc,const_cast<char**>(argv));
-  
-  SimpleLCCViewerVtk<LCC> mainwindow(alcc);
-  mainwindow.show();
-
-  app.exec();
-};
-
-#endif // CGAL_LCC_3_VIEWER_VTK_H
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_2.cpp b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_2.cpp
deleted file mode 100644
index 24c1174..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_2.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Linear_cell_complex_constructors.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-#include <iostream>
-#include <fstream>
-
-/* If you want to use a viewer, you can use one of the following file
- * depending if you use vtk or qglviewer. */
-#ifdef CGAL_LCC_USE_QT
-#include "linear_cell_complex_3_viewer_qt.h"
-#else 
-#ifdef CGAL_LCC_USE_VTK
-#include "linear_cell_complex_3_viewer_vtk.h"
-#endif
-#endif
-
-/* // If you want to use exact constructions.
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-typedef CGAL::Linear_cell_complex<2,2,
-  CGAL::Linear_cell_complex_traits<2, CGAL::Exact_predicates_exact_constructions_kernel> > LCC_2;
-*/
-
-typedef CGAL::Linear_cell_complex<2> LCC_2;
-typedef LCC_2::Dart_handle           Dart_handle;
-typedef LCC_2::Point                 Point;
-
-typedef CGAL::Delaunay_triangulation_2<LCC_2::Traits> Triangulation;
-
-// Function used to display the voronoi diagram.
-void display_voronoi(LCC_2& alcc, Dart_handle adart)
-{
-  // We remove the infinite face plus all the faces adjacent to it.
-  // Indeed, we cannot view these faces since they do not have
-  // a "correct geometry". 
-  std::stack<Dart_handle> toremove;
-  int mark_toremove=alcc.get_new_mark();
-
-  // adart belongs to the infinite face.
-  toremove.push(adart);
-  CGAL::mark_cell<LCC_2,2>(alcc, adart, mark_toremove);
-
-  // Now we get all the faces adjacent to the infinite face.
-  for (LCC_2::Dart_of_cell_range<2>::iterator
-         it=alcc.darts_of_cell<2>(adart).begin(),
-         itend=alcc.darts_of_cell<2>(adart).end(); it!=itend; ++it)
-  {
-    if ( !alcc.is_marked(alcc.beta(it,2), mark_toremove) )
-    {
-      CGAL::mark_cell<LCC_2,2>(alcc, alcc.beta(it,2), mark_toremove);
-      toremove.push(alcc.beta(it,2));
-    }    
-  }
-  
-  while( !toremove.empty() )
-  {
-    CGAL::remove_cell<LCC_2, 2>(alcc, toremove.top());
-    toremove.pop();
-  }
-
-  CGAL_assertion(alcc.is_without_boundary(1));
-    
-  std::cout<<"Voronoi subdvision, only finite faces:"<<std::endl<<"  ";
-  alcc.display_characteristics(std::cout) << ", valid=" 
-                                          << alcc.is_valid()
-                                          << std::endl;
-  
-#ifdef CGAL_LCC_USE_VIEWER
-  display_lcc(alcc);
-#endif // CGAL_LCC_USE_VIEWER
-}
-
-template<typename LCC, typename TR>
-void transform_dart_to_their_dual(LCC& alcc, LCC& adual,
-                                  std::map<typename TR::Face_handle,
-                                           typename LCC::Dart_handle>& assoc)
-{
-  typename LCC::Dart_range::iterator it1=alcc.darts().begin();
-  typename LCC::Dart_range::iterator it2=adual.darts().begin();
-
-  std::map<typename LCC::Dart_handle, typename LCC::Dart_handle> dual;
-  
-  for ( ; it1!=alcc.darts().end(); ++it1, ++it2 )
-  {
-    dual[it1]=it2;
-  }
-
-  for ( typename std::map<typename TR::Face_handle, typename LCC::Dart_handle>
-          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
-  {
-    assoc[it->first]=dual[it->second];
-  } 
-}
-
-template<typename LCC, typename TR>
-void set_geometry_of_dual(LCC& alcc, TR& tr,
-                          std::map<typename TR::Face_handle,
-                                   typename LCC::Dart_handle>& assoc)
-{
-  for ( typename std::map<typename TR::Face_handle, typename LCC::Dart_handle>
-          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
-  {
-    if ( !tr.is_infinite(it->first) )
-      alcc.set_vertex_attribute
-        (it->second,alcc.create_vertex_attribute(tr.circumcenter(it->first)));
-    else
-      alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());
-  }
-}
-
-int main(int narg, char** argv)
-{
-  if (narg>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"-?")) )
-  {
-    std::cout<<"Usage : voronoi_2 filename"<<std::endl   
-             <<"   filename being a fine containing 2D points used to "
-             <<" compute the Delaunay_triangulation_2."<<std::endl;
-    return EXIT_FAILURE;
-  }
-
-  std::string filename;
-  if ( narg==1 )
-  {
-    filename=std::string("data/points_2");
-    std::cout<<"No filename given: use data/points_2 by default."<<std::endl;
-  }
-  else
-    filename=std::string(argv[1]);
-  
-  // 1) Compute the Delaunay_triangulation_2.
-  Triangulation T;
-
-  std::ifstream iFile(filename.c_str());
-  if (!iFile)
-  {
-    std::cout << "Problem reading file " << filename << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  std::istream_iterator<Point> begin(iFile), end;
-  T.insert(begin, end);
-  CGAL_assertion(T.is_valid(false));
- 
-  // 2) Convert the triangulation into a 2D lcc.
-  LCC_2 lcc;
-  std::map<Triangulation::Face_handle,
-           LCC_2::Dart_handle > face_to_dart;
-  
-  Dart_handle dh=CGAL::import_from_triangulation_2<LCC_2, Triangulation>
-    (lcc, T, &face_to_dart);
-  CGAL_assertion(lcc.is_without_boundary());
-
-  std::cout<<"Delaunay triangulation :"<<std::endl<<"  ";
-  lcc.display_characteristics(std::cout) << ", valid=" 
-                                         << lcc.is_valid() << std::endl;
-
-  // 3) Compute the dual lcc.
-  LCC_2 dual_lcc;
-  Dart_handle ddh=lcc.dual(dual_lcc, dh);
-  // Here, dual_lcc is the 2D Voronoi diagram.
-  CGAL_assertion(dual_lcc.is_without_boundary());
-
-  // 4) We update the geometry of dual_lcc by using the std::map
-  //    face_to_dart.
-  transform_dart_to_their_dual<LCC_2,Triangulation>
-    (lcc, dual_lcc, face_to_dart);
-  set_geometry_of_dual<LCC_2,Triangulation>(dual_lcc, T, face_to_dart);
-  
-  // 5) Display the dual_lcc characteristics.
-  std::cout<<"Voronoi subdvision :"<<std::endl<<"  ";
-  dual_lcc.display_characteristics(std::cout) << ", valid=" 
-                                              << dual_lcc.is_valid()
-                                              << std::endl;
-
-  display_voronoi(dual_lcc, ddh);
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_3.cpp b/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_3.cpp
deleted file mode 100644
index 1a21c42..0000000
--- a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/voronoi_3.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-#include <CGAL/Linear_cell_complex.h>
-#include <CGAL/Linear_cell_complex_constructors.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <iostream>
-#include <fstream>
-
-/* If you want to use a viewer, you can use one of the following file
- * depending if you use vtk or qglviewer. */
-#ifdef CGAL_LCC_USE_QT
-#include "linear_cell_complex_3_viewer_qt.h"
-#else 
-#ifdef CGAL_LCC_USE_VTK
-#include "linear_cell_complex_3_viewer_vtk.h"
-#endif
-#endif
-
-/* // If you want to use exact constructions.
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-typedef CGAL::Linear_cell_complex<3,3,
-  CGAL::Linear_cell_complex_traits<3, CGAL::Exact_predicates_exact_constructions_kernel> > LCC_3;
-*/
-
-typedef CGAL::Linear_cell_complex<3> LCC_3;
-typedef LCC_3::Dart_handle           Dart_handle;
-typedef LCC_3::Point                 Point;
-
-typedef CGAL::Delaunay_triangulation_3<LCC_3::Traits> Triangulation;
-
-// Function used to display the voronoi diagram.
-void display_voronoi(LCC_3& alcc, Dart_handle adart)
-{
-  // We remove the infinite volume plus all the volumes adjacent to it.
-  // Indeed, we cannot view these volumes since they do not have
-  // a "correct geometry". 
-  std::stack<Dart_handle> toremove;
-  int mark_toremove=alcc.get_new_mark();
-
-  // adart belongs to the infinite volume.
-  toremove.push(adart);
-  CGAL::mark_cell<LCC_3,3>(alcc, adart, mark_toremove);
- 
-  // Now we get all the volumes adjacent to the infinite volume.
-  for (LCC_3::Dart_of_cell_range<3>::iterator
-         it=alcc.darts_of_cell<3>(adart).begin(),
-         itend=alcc.darts_of_cell<3>(adart).end(); it!=itend; ++it)
-  {
-    if ( !alcc.is_marked(alcc.beta(it,3), mark_toremove) )
-    {
-      CGAL::mark_cell<LCC_3,3>(alcc, alcc.beta(it,3), mark_toremove);
-      toremove.push(alcc.beta(it,3));
-    }
-  }
-  
-  while( !toremove.empty() )
-  {
-    CGAL::remove_cell<LCC_3, 3>(alcc, toremove.top());
-    toremove.pop();
-  }
-
-  CGAL_assertion(alcc.is_without_boundary(1) && alcc.is_without_boundary(2));
-  
-  std::cout<<"Voronoi subdvision, only finite volumes:"<<std::endl<<"  ";
-  alcc.display_characteristics(std::cout) << ", valid=" 
-                                          << alcc.is_valid()
-                                          << std::endl;
-
-#ifdef CGAL_LCC_USE_VIEWER
-  display_lcc(alcc);
-#endif // CGAL_LCC_USE_VIEWER
-}
-
-template<typename LCC, typename TR>
-void transform_dart_to_their_dual(LCC& alcc, LCC& adual,
-                                  std::map<typename TR::Cell_handle,
-                                           typename LCC::Dart_handle>& assoc)
-{
-  typename LCC::Dart_range::iterator it1=alcc.darts().begin();
-  typename LCC::Dart_range::iterator it2=adual.darts().begin();
-
-  std::map<typename LCC::Dart_handle, typename LCC::Dart_handle> dual;
-  
-  for ( ; it1!=alcc.darts().end(); ++it1, ++it2 )
-  {
-    dual[it1]=it2;
-  }
-
-  for ( typename std::map<typename TR::Cell_handle, typename LCC::Dart_handle>
-          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
-  {
-    assoc[it->first]=dual[it->second];
-  }
-}
-
-template<typename LCC, typename TR>
-void set_geometry_of_dual(LCC& alcc, TR& tr,
-                          std::map<typename TR::Cell_handle,
-                                   typename LCC::Dart_handle>& assoc)
-{
-  for ( typename std::map<typename TR::Cell_handle, typename LCC::Dart_handle>
-          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
-  {
-    if ( !tr.is_infinite(it->first) )
-      alcc.set_vertex_attribute
-        (it->second,alcc.create_vertex_attribute(tr.dual(it->first)));
-    else
-      alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());
-  }
-}
-
-
-int main(int narg, char** argv)
-{
-  if (narg>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"-?")) )
-  {
-    std::cout<<"Usage : voronoi_3 filename"<<std::endl   
-             <<"   filename being a fine containing 3D points used to "
-             <<" compute the Delaunay_triangulation_3."<<std::endl;
-    return EXIT_FAILURE;
-  }
-
-  std::string filename;
-  if ( narg==1 )
-  {
-    filename=std::string("data/points_3");
-    std::cout<<"No filename given: use data/points_3 by default."<<std::endl;
-  }
-  else
-    filename=std::string(argv[1]);
-  
-  // 1) Compute the Delaunay_triangulation_3.
-  Triangulation T;
-
-  std::ifstream iFile(filename.c_str());
-  if (!iFile)
-  {
-    std::cout << "Problem reading file " << filename << std::endl;
-    return EXIT_FAILURE;
-  }
-  
-  std::istream_iterator<Point> begin(iFile), end;
-  T.insert(begin, end);
-  CGAL_assertion(T.is_valid(false));
- 
-  // 2) Convert the triangulation into a 3D lcc.
-  LCC_3 lcc;
-  std::map<Triangulation::Cell_handle,
-           LCC_3::Dart_handle > vol_to_dart;
-
-  Dart_handle dh=CGAL::import_from_triangulation_3<LCC_3, Triangulation>
-    (lcc, T, &vol_to_dart);
-
-  std::cout<<"Delaunay triangulation :"<<std::endl<<"  ";
-  lcc.display_characteristics(std::cout) << ", valid=" 
-                                         << lcc.is_valid() << std::endl;
-
-  // 3) Compute the dual lcc.
-  LCC_3 dual_lcc;
-  Dart_handle ddh=lcc.dual(dual_lcc, dh);
-  // Here, dual_lcc is the 3D Voronoi diagram.
-  CGAL_assertion(dual_lcc.is_without_boundary());
-
-  // 4) We update the geometry of dual_lcc by using the std::map
-  //    face_to_dart.
-  transform_dart_to_their_dual<LCC_3,Triangulation>
-    (lcc, dual_lcc, vol_to_dart);
-  set_geometry_of_dual<LCC_3,Triangulation>(dual_lcc, T, vol_to_dart);
-  
-  // 5) Display the dual_lcc characteristics.
-  std::cout<<"Voronoi subdvision :"<<std::endl<<"  ";
-  dual_lcc.display_characteristics(std::cout) << ", valid=" 
-                                              << dual_lcc.is_valid()
-                                              << std::endl;
-  display_voronoi(dual_lcc, ddh);
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Matrix_search/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Matrix_search/CMakeLists.txt
deleted file mode 100644
index da40414..0000000
--- a/3rdparty/CGAL-4.6/examples/Matrix_search/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Matrix_search_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "sorted_matrix_search.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Mesh_2/CMakeLists.txt
deleted file mode 100644
index 31535c4..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_2/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Mesh_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "conforming.cpp" )
-  create_single_source_cgal_program( "mesh_class.cpp" )
-  create_single_source_cgal_program( "mesh_global.cpp" )
-  create_single_source_cgal_program( "mesh_with_seeds.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Mesh_3/CMakeLists.txt
deleted file mode 100644
index 1938440..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/CMakeLists.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Mesh_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-include_directories(../../include)
-include_directories(../../../Triangulation_3/include)
-include_directories(../../../STL_Extension/include)
-include_directories(../../../AABB_tree/include)
-add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-                -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS)
-
-if ( MESH_3_VERBOSE )
-  add_definitions(-DCGAL_MESH_3_VERBOSE)
-endif()
-
-find_package(CGAL COMPONENTS ImageIO)
-
-if ( CGAL_FOUND )
-  include( ${CGAL_USE_FILE} )
-  find_package(Boost)
-
-  # Activate concurrency ? (turned OFF by default)
-  option(ACTIVATE_CONCURRENT_MESH_3
-    "Activate parallelism in Mesh_3"
-    OFF)
-    
-  # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
-  if( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
-    add_definitions( -DCGAL_CONCURRENT_MESH_3 )
-    find_package( TBB REQUIRED )
-  else( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
-    option( LINK_WITH_TBB
-      "Link with TBB anyway so we can use TBB timers for profiling"
-      ON)
-    if( LINK_WITH_TBB )
-      find_package( TBB )
-    endif( LINK_WITH_TBB )
-  endif()
-  
-  if( TBB_FOUND )
-    include(${TBB_USE_FILE})
-    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
-  endif()
-
-
-  if ( Boost_FOUND AND Boost_VERSION GREATER 103400 )
-    include( CGAL_CreateSingleSourceCGALProgram )
-
-    # Compilable examples
-    create_single_source_cgal_program( "mesh_implicit_sphere.cpp" )
-    create_single_source_cgal_program( "mesh_implicit_sphere_variable_size.cpp" )
-    create_single_source_cgal_program( "mesh_two_implicit_spheres_with_balls.cpp" )
-    create_single_source_cgal_program( "mesh_implicit_domains_2.cpp" "implicit_functions.cpp" )
-    create_single_source_cgal_program( "mesh_cubes_intersection.cpp" )
-    create_single_source_cgal_program( "mesh_cubes_intersection_with_features.cpp" )
-    create_single_source_cgal_program( "mesh_implicit_domains.cpp" "implicit_functions.cpp" )
-   create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" )
-    create_single_source_cgal_program( "mesh_polyhedral_domain_with_features.cpp" )
-    if( WITH_CGAL_ImageIO )
-      create_single_source_cgal_program( "mesh_optimization_example.cpp" )
-      create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" )
-      if( CGAL_ImageIO_USE_ZLIB )
-        create_single_source_cgal_program( "mesh_3D_image.cpp" )
-        create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" )
-      else()
-        message( STATUS "NOTICE: The examples mesh_3D_image.cpp and mesh_3D_image_variable_size.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." )
-      endif()
-    else()
-      message( STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." )
-    endif()
-#    create_single_source_cgal_program( "mesh_polyhedral_implicit_function.cpp" )
-#    create_single_source_cgal_program( "mesh_polyhedral_surface_tolerance_region.cpp" )
-#    create_single_source_cgal_program( "mesh_polyhedral_edge_tolerance_region.cpp" )
-
-  else()
-    message(STATUS "NOTICE: This program requires Boost >= 1.34.1, and will not be compiled.")
-  endif()
-
-else()
-  message(STATUS "This program requires the CGAL library, and will not be compiled.")
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image.cpp
deleted file mode 100644
index b5f1ee1..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/make_mesh_3.h>
-#include <CGAL/Image_3.h>
-
-// Domain
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Loads image
-  CGAL::Image_3 image;
-  image.read("data/liver.inr.gz");
-
-  // Domain
-  Mesh_domain domain(image);
-
-  // Mesh criteria
-  Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=4,
-                         cell_radius_edge_ratio=3, cell_size=8);
-
-  // Meshing
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
-
-  // Output
-  std::ofstream medit_file("out.mesh");
-  c3t3.output_to_medit(medit_file);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image_variable_size.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image_variable_size.cpp
deleted file mode 100644
index 6b9ea99..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_3D_image_variable_size.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#define CGAL_MESH_3_VERBOSE
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-#include <CGAL/Mesh_constant_domain_field_3.h>
-
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/make_mesh_3.h>
-#include <CGAL/Image_3.h>
-
-// Domain
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-typedef CGAL::Mesh_constant_domain_field_3<Mesh_domain::R,
-                                           Mesh_domain::Index> Sizing_field;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Loads image
-  CGAL::Image_3 image;
-  image.read("data/liver.inr.gz");
-
-  // Domain
-  Mesh_domain domain(image);
-
-  // Sizing field: set global size to 8 and kidney size (label 127) to 3
-  double kidney_size = 3.;
-  int volume_dimension = 3;
-  Sizing_field size(8);
-  size.set_size(kidney_size, volume_dimension, 
-                domain.index_from_subdomain_index(127));
-  
-  // Mesh criteria
-  Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
-                         cell_radius_edge_ratio=3, cell_size=size);
-
-  // Meshing
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
-
-  // Output
-  std::ofstream medit_file("out.mesh");
-  c3t3.output_to_medit(medit_file);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_example.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_example.cpp
deleted file mode 100644
index 25cf73d..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_example.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/make_mesh_3.h>
-#include <CGAL/Image_3.h>
-
-// Domain
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Mesh Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Domain
-  CGAL::Image_3 image;
-  image.read("data/liver.inr.gz");
-  Mesh_domain domain(image);
-
-  // Mesh criteria
-  Mesh_criteria criteria(facet_angle=30, facet_size=5, facet_distance=1.5,
-                         cell_radius_edge_ratio=2, cell_size=7);
-
-  // Mesh generation and optimization in one call (sliver_bound is the
-  // targeted dihedral angle in degree)
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
-                                      no_exude(),
-                                      perturb(sliver_bound=10, time_limit=15));
-  
-  // Mesh generation and optimization in several call
-  C3t3 c3t3_bis = CGAL::make_mesh_3<C3t3>(domain, criteria,
-                                          no_perturb(), no_exude());
-  
-  CGAL::perturb_mesh_3(c3t3_bis, domain, time_limit=15);
-
-  // Output
-  std::ofstream medit_file("out.mesh");
-  c3t3.output_to_medit(medit_file);
-  
-  std::ofstream medit_file_bis("out_bis.mesh");
-  c3t3_bis.output_to_medit(medit_file_bis);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_lloyd_example.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
deleted file mode 100644
index 01b093b..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Labeled_image_mesh_domain_3.h>
-#include <CGAL/make_mesh_3.h>
-#include <CGAL/Image_3.h>
-
-// Domain
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Mesh Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Domain
-  CGAL::Image_3 image;
-  image.read("data/liver.inr.gz");
-  Mesh_domain domain(image);
-
-  // Mesh criteria
-  Mesh_criteria criteria(facet_angle=30, facet_distance=1.2,
-                         cell_radius_edge_ratio=2);
-
-  // Mesh generation and optimization in one call
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
-                                      lloyd(time_limit=30),
-                                      no_perturb(),
-                                      exude(time_limit=10, sliver_bound=10));
-  
-  // Mesh generation and optimization in several call
-  C3t3 c3t3_bis = CGAL::make_mesh_3<C3t3>(domain, criteria,
-                                          no_perturb(), no_exude());
-  
-  CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit=30);
-  CGAL::exude_mesh_3(c3t3_bis, sliver_bound=10, time_limit=10);
-  
-  // Output
-  std::ofstream medit_file("out.mesh");
-  c3t3.output_to_medit(medit_file);
-  
-  std::ofstream medit_file_bis("out_bis.mesh");
-  c3t3_bis.output_to_medit(medit_file_bis);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain.cpp
deleted file mode 100644
index a03462e..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Polyhedral_mesh_domain_3.h>
-#include <CGAL/make_mesh_3.h>
-#include <CGAL/refine_mesh_3.h>
-
-// IO
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-// Domain
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Polyhedron_3<K> Polyhedron;
-typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
-
-// Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Create input polyhedron
-  Polyhedron polyhedron;
-  std::ifstream input("data/elephant.off");
-  input >> polyhedron;
-   
-  // Create domain
-  Mesh_domain domain(polyhedron);
-  
-  // Mesh criteria (no cell_size set)
-  Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008,
-                         cell_radius_edge_ratio=3);
-  
-  // Mesh generation
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, no_perturb(), no_exude());
-
-  // Output
-  std::ofstream medit_file("out_1.mesh");
-  c3t3.output_to_medit(medit_file);
-  medit_file.close();
-
-  // Set tetrahedron size (keep cell_radius_edge_ratio), ignore facets
-  Mesh_criteria new_criteria(cell_radius_edge_ratio=3, cell_size=0.03);
-
-  // Mesh refinement
-  CGAL::refine_mesh_3(c3t3, domain, new_criteria);
-
-  // Output
-  medit_file.open("out_2.mesh");
-  c3t3.output_to_medit(medit_file);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp b/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
deleted file mode 100644
index 118aa0a..0000000
--- a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/Mesh_triangulation_3.h>
-#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
-#include <CGAL/Mesh_criteria_3.h>
-
-#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
-#include <CGAL/make_mesh_3.h>
-
-// Domain 
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
-
-// Triangulation
-#ifdef CGAL_CONCURRENT_MESH_3
-  typedef CGAL::Mesh_triangulation_3<
-    Mesh_domain,
-    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
-    CGAL::Parallel_tag                        // Tag to activate parallelism
-  >::type Tr;
-#else
-  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
-#endif
-typedef CGAL::Mesh_complex_3_in_triangulation_3<
-  Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index> C3t3;
-
-// Criteria
-typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
-
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
-
-int main()
-{
-  // Create domain
-  Mesh_domain domain("data/fandisk.off");
-  
-  // Get sharp features
-  domain.detect_features();
-
-  // Mesh criteria
-  Mesh_criteria criteria(edge_size = 0.025,
-                         facet_angle = 25, facet_size = 0.05, facet_distance = 0.005,
-                         cell_radius_edge_ratio = 3, cell_size = 0.05);
-  
-  // Mesh generation
-  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
-
-  // Output
-  std::ofstream medit_file("out.mesh");
-  c3t3.output_to_medit(medit_file);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Min_annulus_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_annulus_d/CMakeLists.txt
deleted file mode 100644
index 0bf8da0..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_annulus_d/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_annulus_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "min_annulus_d.cpp" )
-  create_single_source_cgal_program( "min_annulus_d_fast_exact.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Min_circle_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_circle_2/CMakeLists.txt
deleted file mode 100644
index 0d62715..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_circle_2/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_circle_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "min_circle_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Min_ellipse_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_ellipse_2/CMakeLists.txt
deleted file mode 100644
index 603da36..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_ellipse_2/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_ellipse_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "min_ellipse_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/CMakeLists.txt
deleted file mode 100644
index d78e74e..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_quadrilateral_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "minimum_enclosing_parallelogram_2.cpp" )
-  create_single_source_cgal_program( "minimum_enclosing_rectangle_2.cpp" )
-  create_single_source_cgal_program( "minimum_enclosing_strip_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_sphere_d/CMakeLists.txt
deleted file mode 100644
index f3497b6..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_sphere_d/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_sphere_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "min_sphere_d.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/CMakeLists.txt
deleted file mode 100644
index f89c1ef..0000000
--- a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Min_sphere_of_spheres_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "benchmark.cpp" )
-  create_single_source_cgal_program( "min_sphere_of_spheres_d_2.cpp" )
-  create_single_source_cgal_program( "min_sphere_of_spheres_d_3.cpp" )
-  create_single_source_cgal_program( "min_sphere_of_spheres_d_d.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/CMakeLists.txt
deleted file mode 100644
index e04a0f2..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Minkowski_sum_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "approx_inset.cpp" )
-  create_single_source_cgal_program( "approx_offset.cpp" )
-  create_single_source_cgal_program( "exact_inset.cpp" )
-  create_single_source_cgal_program( "exact_offset.cpp" )
-  create_single_source_cgal_program( "sum_by_decomposition.cpp" )
-  create_single_source_cgal_program( "sum_triangles.cpp" )
-  create_single_source_cgal_program( "sum_with_holes.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_inset.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_inset.cpp
deleted file mode 100644
index e0725f3..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_inset.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//! \file examples/Minkowski_sum_2/approx_inset.cpp
-// Computing the approximated inset of a polygon.
-
-#include "ms_rational_nt.h"
-#include <CGAL/Lazy_exact_nt.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/approximated_offset_2.h>
-#include <CGAL/offset_polygon_2.h>
-#include <CGAL/Timer.h>
-#include <iostream>
-
-typedef CGAL::Lazy_exact_nt<Number_type>           Lazy_exact_nt;
-
-struct Kernel : public CGAL::Cartesian<Lazy_exact_nt> {};
-typedef CGAL::Polygon_2<Kernel>                    Polygon_2;
-
-typedef CGAL::Gps_circle_segment_traits_2<Kernel>  Gps_traits_2;
-typedef Gps_traits_2::Polygon_2                    Offset_polygon_2;
-typedef Gps_traits_2::Polygon_with_holes_2         Offset_polygon_with_holes_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("tight.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the input polygon.
-  Polygon_2        P;
-
-  in_file >> P;
-  in_file.close();
-
-  std::cout << "Read an input polygon with "
-            << P.size() << " vertices." << std::endl;
-
-  // Approximate the offset polygon.
-  const Number_type                      radius = 1;
-  const double                           err_bound = 0.00001;
-  std::list<Offset_polygon_2>            inset_polygons;
-  std::list<Offset_polygon_2>::iterator  iit;
-  CGAL::Timer                            timer;
-
-  timer.start();
-  approximated_inset_2 (P, radius, err_bound,
-                        std::back_inserter (inset_polygons));
-  timer.stop();
-
-  std::cout << "The inset comprises " 
-            << inset_polygons.size() << " polygon(s)." << std::endl;
-  for (iit = inset_polygons.begin(); iit != inset_polygons.end(); ++iit)
-  {
-      std::cout << "    Polygon with "
-                << iit->size() << " vertices." << std::endl;
-  }
-  std::cout << "Inset computation took "
-            << timer.time() << " seconds." << std::endl;
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_offset.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_offset.cpp
deleted file mode 100644
index a9d6ef6..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/approx_offset.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//! \file examples/Minkowski_sum_2/approx_offset.cpp
-// Computing the approximated offset of a polygon.
-
-#include "ms_rational_nt.h"
-#include <CGAL/Lazy_exact_nt.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/approximated_offset_2.h>
-#include <CGAL/offset_polygon_2.h>
-#include <CGAL/Timer.h>
-#include <iostream>
-
-typedef CGAL::Lazy_exact_nt<Number_type>           Lazy_exact_nt;
-
-struct Kernel : public CGAL::Cartesian<Lazy_exact_nt> {};
-typedef CGAL::Polygon_2<Kernel>                    Polygon_2;
-
-typedef CGAL::Gps_circle_segment_traits_2<Kernel>  Gps_traits_2;
-typedef Gps_traits_2::Polygon_2                    Offset_polygon_2;
-typedef Gps_traits_2::Polygon_with_holes_2         Offset_polygon_with_holes_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("spiked.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the input polygon.
-  Polygon_2        P;
-
-  in_file >> P;
-  in_file.close();
-
-  std::cout << "Read an input polygon with "
-            << P.size() << " vertices." << std::endl;
-
-  // Approximate the offset polygon.
-  const Number_type            radius = 5;
-  const double                 err_bound = 0.00001;
-  Offset_polygon_with_holes_2  offset;
-  CGAL::Timer                  timer;
-
-  timer.start();
-  offset = approximated_offset_2 (P, radius, err_bound);
-  timer.stop();
-
-  std::cout << "The offset polygon has "
-            << offset.outer_boundary().size() << " vertices, "
-            << offset.number_of_holes() << " holes." << std::endl;
-  std::cout << "Offset computation took "
-            << timer.time() << " seconds." << std::endl;
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_inset.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_inset.cpp
deleted file mode 100644
index 7b58d49..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_inset.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//! \file examples/Minkowski_sum_2/exact_inset.cpp
-// Computing the exact inner offset of a polygon.
-#include <CGAL/basic.h>
-
-#ifndef CGAL_USE_CORE
-#include <iostream>
-int main ()
-{
-  std::cout << "Sorry, this example needs CORE ..." << std::endl;
-  return (0);
-}
-#else
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/CORE_algebraic_number_traits.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/offset_polygon_2.h>
-#include <CGAL/Timer.h>
-#include <iostream>
-
-typedef CGAL::CORE_algebraic_number_traits     Nt_traits;
-typedef Nt_traits::Rational                    Rational;
-typedef Nt_traits::Algebraic                   Algebraic;
-
-struct Rat_kernel : public CGAL::Cartesian<Rational> {};
-struct Alg_kernel : public CGAL::Cartesian<Algebraic> {};
-struct Conic_traits_2 : public CGAL::Arr_conic_traits_2<Rat_kernel,
-                                                        Alg_kernel,
-                                                        Nt_traits> {};
-
-typedef CGAL::Polygon_2<Rat_kernel>            Polygon_2;
-
-typedef CGAL::Gps_traits_2<Conic_traits_2>     Gps_traits_2;
-typedef Gps_traits_2::Polygon_2                Offset_polygon_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("tight.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the input polygon.
-  Polygon_2        P;
-
-  in_file >> P;
-  in_file.close();
-
-  std::cout << "Read an input polygon with "
-            << P.size() << " vertices." << std::endl;
-
-  // Compute the inner offset of the polygon.
-  Conic_traits_2                         traits;
-  const Rational                         radius = 1;
-  std::list<Offset_polygon_2>            inset_polygons;
-  std::list<Offset_polygon_2>::iterator  iit;
-  CGAL::Timer                            timer;
-
-  timer.start();
-  inset_polygon_2 (P, radius, traits,
-                   std::back_inserter (inset_polygons));
-  timer.stop();
-
-  std::cout << "The inset comprises " 
-            << inset_polygons.size() << " polygon(s)." << std::endl;
-  for (iit = inset_polygons.begin(); iit != inset_polygons.end(); ++iit)
-  {
-      std::cout << "    Polygon with "
-                << iit->size() << " vertices." << std::endl;
-  }
-  std::cout << "Inset computation took "
-            << timer.time() << " seconds." << std::endl;
-  return (0);
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_offset.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_offset.cpp
deleted file mode 100644
index 5d822a5..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/exact_offset.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//! \file examples/Minkowski_sum_2/exact_offset.cpp
-// Computing the exact offset of a polygon.
-#include <CGAL/basic.h>
-
-#ifndef CGAL_USE_CORE
-#include <iostream>
-int main ()
-{
-  std::cout << "Sorry, this example needs CORE ..." << std::endl;
-  return (0);
-}
-#else
-
-#include <CGAL/Cartesian.h>
-#include <CGAL/CORE_algebraic_number_traits.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/offset_polygon_2.h>
-#include <CGAL/Timer.h>
-#include <iostream>
-
-typedef CGAL::CORE_algebraic_number_traits     Nt_traits;
-typedef Nt_traits::Rational                    Rational;
-typedef Nt_traits::Algebraic                   Algebraic;
-
-struct Rat_kernel : public CGAL::Cartesian<Rational> {};
-struct Alg_kernel : public CGAL::Cartesian<Algebraic> {};
-struct Conic_traits_2 : public CGAL::Arr_conic_traits_2<Rat_kernel,
-                                                        Alg_kernel,
-                                                        Nt_traits> {};
-
-typedef CGAL::Polygon_2<Rat_kernel>            Polygon_2;
-
-typedef CGAL::Gps_traits_2<Conic_traits_2>     Gps_traits_2;
-typedef Gps_traits_2::Polygon_2                Offset_polygon_2;
-typedef Gps_traits_2::Polygon_with_holes_2     Offset_polygon_with_holes_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("spiked.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the input polygon.
-  Polygon_2        P;
-
-  in_file >> P;
-  in_file.close();
-
-  std::cout << "Read an input polygon with "
-            << P.size() << " vertices." << std::endl;
-
-  // Compute the offset polygon.
-  Conic_traits_2               traits;
-  const Rational               radius = 5;
-  Offset_polygon_with_holes_2  offset;
-  CGAL::Timer                  timer;
-
-  timer.start();
-  offset = offset_polygon_2 (P, radius, traits);
-  timer.stop();
-
-  std::cout << "The offset polygon has "
-            << offset.outer_boundary().size() << " vertices, "
-            << offset.number_of_holes() << " holes." << std::endl;
-  std::cout << "Offset computation took "
-            << timer.time() << " seconds." << std::endl;
-  return (0);
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_by_decomposition.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_by_decomposition.cpp
deleted file mode 100644
index 7741072..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_by_decomposition.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//! \file examples/Minkowski_sum_2/sum_by_decomposition.cpp
-// Computing the Minkowski sum of two non-convex polygons read from a file
-// using the small-side angle-bisector decomposition strategy.
-
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/minkowski_sum_2.h>
-#include <CGAL/Small_side_angle_bisector_decomposition_2.h>
-#include <iostream>
-#include <fstream>
-
-#include "print_utils.h"
-
-struct Kernel : public CGAL::Exact_predicates_exact_constructions_kernel {};
-
-typedef Kernel::Point_2                               Point_2;
-typedef CGAL::Polygon_2<Kernel>                       Polygon_2;
-typedef CGAL::Polygon_with_holes_2<Kernel>            Polygon_with_holes_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("rooms_star.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the two polygons from the file and compute their Minkowski sum.
-  Polygon_2   P, Q;
-
-  in_file >> P >> Q;
-  in_file.close();
-
-  // Compute the Minkowski sum using the decomposition approach.
-  CGAL::Small_side_angle_bisector_decomposition_2<Kernel>  ssab_decomp;
-
-  Polygon_with_holes_2  sum = minkowski_sum_2 (P, Q, ssab_decomp);
-
-  std::cout << "P (+) Q = "; print_polygon_with_holes (sum);
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_triangles.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_triangles.cpp
deleted file mode 100644
index 24fa26a..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_triangles.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//! \file examples/Minkowski_sum_2/sum_triangles.cpp
-// Computing the Minkowski sum of two triangles.
-
-#include "ms_rational_nt.h"
-#include <CGAL/Cartesian.h>
-#include <CGAL/minkowski_sum_2.h>
-#include <iostream>
-
-#include "print_utils.h"
-
-typedef CGAL::Cartesian<Number_type>                Kernel;
-typedef Kernel::Point_2                             Point_2;
-typedef CGAL::Polygon_2<Kernel>                     Polygon_2;
-typedef CGAL::Polygon_with_holes_2<Kernel>          Polygon_with_holes_2;
-
-int main ()
-{
-  // Construct the first polygon (a triangle).
-  Polygon_2   P;
-
-  P.push_back (Point_2 (0, 0));
-  P.push_back (Point_2 (6, 0));
-  P.push_back (Point_2 (3, 5));
-
-  // Construct the second polygon (a triangle).
-  Polygon_2   Q;
-
-  Q.push_back (Point_2 (0, 0));
-  Q.push_back (Point_2 (2, -2));
-  Q.push_back (Point_2 (2, 2));
-
-  // Compute the Minkowski sum.
-  Polygon_with_holes_2  sum = minkowski_sum_2 (P, Q);
-
-  CGAL_assertion (sum.number_of_holes() == 0);
-
-  std::cout << "P = "; print_polygon (P);
-  std::cout << "Q = "; print_polygon (Q);
-  std::cout << "P (+) Q = "; print_polygon (sum.outer_boundary());
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_with_holes.cpp b/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_with_holes.cpp
deleted file mode 100644
index 66faa59..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/sum_with_holes.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//! \file examples/Minkowski_sum_2/sum_with_holes.cpp
-// Computing the Minkowski sum of two non-convex polygons read from a file.
-
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/minkowski_sum_2.h>
-#include <iostream>
-#include <fstream>
-
-#include "print_utils.h"
-
-struct Kernel : public CGAL::Exact_predicates_exact_constructions_kernel {};
-
-typedef Kernel::Point_2                               Point_2;
-typedef CGAL::Polygon_2<Kernel>                       Polygon_2;
-typedef CGAL::Polygon_with_holes_2<Kernel>            Polygon_with_holes_2;
-
-int main ()
-{
-  // Open the input file.
-  std::ifstream    in_file ("rooms_star.dat");
-
-  if (! in_file.is_open())
-  {
-    std::cerr << "Failed to open the input file." << std::endl;
-    return (1);
-  }
-
-  // Read the two polygons from the file and compute their Minkowski sum.
-  Polygon_2   P, Q;
-
-  in_file >> P >> Q;
-  in_file.close();
-
-  // Compute and print the Minkowski sum.
-  Polygon_with_holes_2  sum = minkowski_sum_2 (P, Q);
-
-  std::cout << "P (+) Q = "; print_polygon_with_holes (sum);
-
-  return (0);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/CMakeLists.txt
deleted file mode 100644
index b08594e..0000000
--- a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Minkowski_sum_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "cube_offset.cpp" )
-  create_single_source_cgal_program( "glide.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Modular_arithmetic/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Modular_arithmetic/CMakeLists.txt
deleted file mode 100644
index 970df04..0000000
--- a/3rdparty/CGAL-4.6/examples/Modular_arithmetic/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Modular_arithmetic_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "modular_filter.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Nef_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Nef_2/CMakeLists.txt
deleted file mode 100644
index 8b563d7..0000000
--- a/3rdparty/CGAL-4.6/examples/Nef_2/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Nef_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "nef_2_construction.cpp" )
-  create_single_source_cgal_program( "nef_2_intersection.cpp" )
-  create_single_source_cgal_program( "nef_2_polylines.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Nef_3/CMakeLists.txt
deleted file mode 100644
index 2058ece..0000000
--- a/3rdparty/CGAL-4.6/examples/Nef_3/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Nef_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "comparison.cpp" )
-  create_single_source_cgal_program( "complex_construction.cpp" )
-  create_single_source_cgal_program( "exploration_SM.cpp" )
-  create_single_source_cgal_program( "extended_kernel.cpp" )
-  create_single_source_cgal_program( "handling_double_coordinates.cpp" )
-  create_single_source_cgal_program( "interface_polyhedron.cpp" )
-  create_single_source_cgal_program( "nefIO.cpp" )
-  create_single_source_cgal_program( "nef_3_construction.cpp" )
-  create_single_source_cgal_program( "nef_3_point_location.cpp" )
-  create_single_source_cgal_program( "nef_3_simple.cpp" )
-  create_single_source_cgal_program( "offIO.cpp" )
-  create_single_source_cgal_program( "point_set_operations.cpp" )
-  create_single_source_cgal_program( "polyline_construction.cpp" )
-  create_single_source_cgal_program( "set_operations.cpp" )
-  create_single_source_cgal_program( "shell_exploration.cpp" )
-  create_single_source_cgal_program( "topological_operations.cpp" )
-  create_single_source_cgal_program( "transformation.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Nef_S2/CMakeLists.txt
deleted file mode 100644
index ce3dc41..0000000
--- a/3rdparty/CGAL-4.6/examples/Nef_S2/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Nef_S2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-    include_directories (BEFORE "include")
-
-  create_single_source_cgal_program( "nef_s2_construction.cpp" )
-  create_single_source_cgal_program( "nef_s2_exploration.cpp" )
-  create_single_source_cgal_program( "nef_s2_point_location.cpp" )
-  create_single_source_cgal_program( "nef_s2_simple.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Partition_2/CMakeLists.txt
deleted file mode 100644
index 5434b3c..0000000
--- a/3rdparty/CGAL-4.6/examples/Partition_2/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Partition_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "approx_convex_partition_2.cpp" )
-  create_single_source_cgal_program( "greene_approx_convex_partition_2.cpp" )
-  create_single_source_cgal_program( "optimal_convex_partition_2.cpp" )
-  create_single_source_cgal_program( "y_monotone_partition_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/CMakeLists.txt
deleted file mode 100644
index abf6a80..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Periodic_2_triangulation_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "p2t2_adding_handles.cpp" )
-  create_single_source_cgal_program( "p2t2_colored_vertices.cpp" )
-  create_single_source_cgal_program( "p2t2_covering.cpp" )
-  create_single_source_cgal_program( "p2t2_find_conflicts.cpp" )
-  create_single_source_cgal_program( "p2t2_geometric_access.cpp" )
-  create_single_source_cgal_program( "p2t2_hierarchy.cpp" )
-  create_single_source_cgal_program( "p2t2_info_insert_with_pair_iterator_2.cpp" )
-  create_single_source_cgal_program( "p2t2_info_insert_with_transform_iterator_2.cpp" )
-  create_single_source_cgal_program( "p2t2_info_insert_with_zip_iterator_2.cpp" )
-  create_single_source_cgal_program( "p2t2_large_point_set.cpp" )
-  create_single_source_cgal_program( "p2t2_simple_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/CMakeLists.txt
deleted file mode 100644
index 911baf1..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Periodic_3_triangulation_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "colored_vertices.cpp" )
-  create_single_source_cgal_program( "covering.cpp" )
-  create_single_source_cgal_program( "find_conflicts.cpp" )
-  create_single_source_cgal_program( "geometric_access.cpp" )
-  create_single_source_cgal_program( "large_point_set.cpp" )
-  create_single_source_cgal_program( "periodic_adding_handles.cpp" )
-  create_single_source_cgal_program( "simple_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/colored_vertices.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/colored_vertices.cpp
deleted file mode 100644
index d605996..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/colored_vertices.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-#include <CGAL/Triangulation_vertex_base_with_info_3.h>
-#include <CGAL/IO/Color.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_filtered_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> VbDS;
-typedef CGAL::Triangulation_vertex_base_3<GT,VbDS> Vb;
-
-typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> CbDS;
-typedef CGAL::Triangulation_cell_base_3<GT,CbDS> Cb;
-
-typedef CGAL::Triangulation_vertex_base_with_info_3<CGAL::Color, GT, Vb> VbInfo;
-typedef CGAL::Triangulation_data_structure_3<VbInfo, Cb>    TDS;
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT, TDS>  PDT;
-
-typedef PDT::Point   Point;
-
-int main()
-{
-  PDT T;
-
-  T.insert(Point(0,0,0));
-  T.insert(Point(.1,0,0));
-  T.insert(Point(0,.1,0));
-  T.insert(Point(0,0,.1));
-  T.insert(Point(.2,.2,.2));
-  T.insert(Point(.9,0,.1));
-
-  // Set the color of finite vertices of degree 6 to red.
-  PDT::Vertex_iterator vit;
-  for (vit = T.vertices_begin(); vit != T.vertices_end(); ++vit)
-    if (T.degree(vit) == 6)
-      vit->info() = CGAL::RED;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/covering.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/covering.cpp
deleted file mode 100644
index fabbe14..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/covering.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-
-#include <iostream>
-#include <vector>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
-
-typedef PDT::Point                  Point;
-typedef PDT::Covering_sheets        Covering_sheets;
-
-int main()
-{
-  PDT T;
-
-  // Input point grid (27 points)
-  for (double x=0. ; x < .9 ; x += 0.33) {
-    for (double y=0. ; y < .9 ; y += 0.33) {
-      for (double z=0. ; z < .9 ; z += 0.33) {
-        T.insert(Point(x,y,z));	  
-  } } }
-
-  Covering_sheets cs = T.number_of_sheets();
-  std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
-  if ( T.is_triangulation_in_1_sheet() ) {                                      // = true
-    bool is_extensible = T.is_extensible_triangulation_in_1_sheet_h1()
-      || T.is_extensible_triangulation_in_1_sheet_h2();                         // = false
-    T.convert_to_1_sheeted_covering();
-    cs = T.number_of_sheets();
-    std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
-    if ( is_extensible )                                                        // = false
-      std::cout<<"It is safe to change the triangulation here."<<std::endl;
-    else
-      std::cout<<"It is NOT safe to change the triangulation here!"<<std::endl;
-
-    T.convert_to_27_sheeted_covering();
-    cs = T.number_of_sheets();
-    std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
-  }
-
-  std::cout<<"It is (again) safe to modify the triangulation."<<std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/find_conflicts.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/find_conflicts.cpp
deleted file mode 100644
index d0397c2..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/find_conflicts.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-#include <CGAL/point_generators_3.h>
-
-#include <vector>
-#include <cassert>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_filtered_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> Delaunay;
-typedef Delaunay::Point                               Point;
-typedef Delaunay::Cell_handle                         Cell_handle;
-typedef Delaunay::Facet                               Facet;
-
-int main()
-{
-  Delaunay T;
-  CGAL::Random_points_in_cube_3<Point> rnd(0.5);
-  GT::Vector_3 v(0.5,0.5,0.5);
-
-  // First, make sure the triangulation is 3D.
-  T.insert(Point(0,0,0));
-  T.insert(Point(.1,0,0));
-  T.insert(Point(0,.1,0));
-  T.insert(Point(0,0,.1));
-
-  // Gets the conflict region of 100 random points
-  // in the Delaunay tetrahedralization
-  for (int i = 0; i != 100; ++i) {
-    Point p = (*rnd++)+v;
-
-    // Locate the point
-    Delaunay::Locate_type lt;
-    int li, lj;
-    Cell_handle c = T.locate(p, lt, li, lj);
-    if (lt == Delaunay::VERTEX)
-      continue; // Point already exists
-
-    // Get the cells that conflict with p in a vector V,
-    // and a facet on the boundary of this hole in f.
-    std::vector<Cell_handle> V;
-    Facet f;
-
-    T.find_conflicts(p, c,
-		     CGAL::Oneset_iterator<Facet>(f), // Get one boundary facet
-		     std::back_inserter(V));          // Conflict cells in V
-    }
-
-  std::cout << "Final triangulation has " << T.number_of_vertices()
-            << " vertices." << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/geometric_access.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/geometric_access.cpp
deleted file mode 100644
index a46c713..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/geometric_access.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_traits_3<K>          PK;
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<PK>       P3DT3;
-
-typedef PK::Point_3        Point;
-typedef PK::Triangle_3     Triangle;
-
-typedef P3DT3::Periodic_triangle           Periodic_triangle;
-typedef P3DT3::Periodic_triangle_iterator  Periodic_triangle_iterator;
-typedef P3DT3::Iterator_type               Iterator_type;
-
-int main() {
-  P3DT3 T;
-
-  T.insert(Point(0,0,0));
-  T.insert(Point(0,0,0.5));
-  T.insert(Point(0,0.5,0.5));
-  T.insert(Point(0.5,0,0.5));
-
-  Periodic_triangle pt;
-  Triangle t_bd;
-
-  // Extracting the triangles that have a non-empty intersection with
-  // the original domain of the 1-sheeted covering space
-  for (Periodic_triangle_iterator ptit = T.periodic_triangles_begin(P3DT3::UNIQUE_COVER_DOMAIN);
-       ptit != T.periodic_triangles_end(P3DT3::UNIQUE_COVER_DOMAIN); ++ptit) {
-    pt = *ptit;
-    if (! (pt[0].second.is_null() && pt[1].second.is_null() && pt[2].second.is_null()) ) {
-      // Convert the current Periodic_triangle to a Triangle if it is
-      // not strictly contained inside the original domain.
-      // Note that this requires EXACT constructions to be exact!
-      t_bd = T.construct_triangle(pt);
-    }
-  }
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/large_point_set.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/large_point_set.cpp
deleted file mode 100644
index ad45336..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/large_point_set.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Timer.h>
-
-#include <iostream>
-#include <vector>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
-
-typedef PDT::Point          Point;
-
-int main()
-{
-  CGAL::Timer t;
-  typedef CGAL::Creator_uniform_3<double, Point> Creator;
-  CGAL::Random random(7);
-  CGAL::Random_points_in_cube_3<Point, Creator> in_cube(.5, random);
-
-  int n = 10000;
-  std::vector<Point> pts;
-
-  PDT PT1, PT2, PT3;
-
-  // Generating n random points
-  for (int i=0 ; i < n ; i++) {
-    Point p = *in_cube;
-    in_cube++;
-    pts.push_back(Point(p.x()+.5,p.y()+.5,p.z()+.5));
-  }
-
-  // Standard insertion
-  t.start();
-  for (int i=0 ; i < n ; i++) {
-    PT1.insert(pts[i]);
-  }
-  t.stop();
-  std::cout<<"  Time: "<<t.time()<<" sec. (Standard insertion)"<<std::endl;
-  t.reset();
-
-  // Iterator range insertion using spatial sorting but no dummy points
-  t.start();
-  PT2.insert(pts.begin(), pts.end()); // third parameter defaults to false
-  t.stop();
-  std::cout<<"  Time: "<<t.time()<<" sec. (with spatial sorting)"<<std::endl;
-  t.reset();
-
-  // Iterator range insertion using spatial sorting and dummy point heuristic
-  t.start();
-  PT3.insert(pts.begin(), pts.end(), true);
-  t.stop();
-  std::cout<<"  Time: "<<t.time()<<" sec. (Dummy point heuristic)"<<std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp
deleted file mode 100644
index b1d5e89..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-#include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h>
-#include <CGAL/Triangulation_vertex_base_3.h>
-
-template < class GT, class VbDS,
-	   class Vb = CGAL::Triangulation_vertex_base_3<GT,VbDS> >
-class My_vertex_base
-  : public Vb
-{
-public:
-  typedef typename Vb::Vertex_handle  Vertex_handle;
-  typedef typename Vb::Cell_handle    Cell_handle;
-  typedef typename Vb::Point          Point;
-
-  template < class TDS2 >
-  struct Rebind_TDS {
-    typedef typename Vb::template Rebind_TDS<TDS2>::Other  Vb2;
-    typedef My_vertex_base<GT, Vb2>                        Other;
-  };
-
-  My_vertex_base() {}
-
-  My_vertex_base(const Point& p)
-    : Vb(p) {}
-
-  My_vertex_base(const Point& p, Cell_handle c)
-    : Vb(p, c) {}
-
-  Vertex_handle   vh;
-  Cell_handle     ch;
-};
-
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_filtered_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> VbDS;
-typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> CbDS;
-typedef CGAL::Triangulation_cell_base_3<GT,CbDS> Cb;
-
-typedef CGAL::Triangulation_data_structure_3<My_vertex_base<GT,VbDS>, Cb> TDS;
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT,TDS> PDT;
-
-typedef PDT::Vertex_handle    Vertex_handle;
-typedef PDT::Point            Point;
-
-int main()
-{
-  PDT T;
-
-  Vertex_handle v0 = T.insert(Point(0,0,0));
-  Vertex_handle v1 = T.insert(Point(.1,0,0));
-  Vertex_handle v2 = T.insert(Point(0,.1,0));
-  Vertex_handle v3 = T.insert(Point(0,0,.1));
-  Vertex_handle v4 = T.insert(Point(.2,.2,.2));
-  Vertex_handle v5 = T.insert(Point(.9,0,.1));
-
-  // Now we can link the vertices as we like.
-  v0->vh = v1;
-  v1->vh = v2;
-  v2->vh = v3;
-  v3->vh = v4;
-  v4->vh = v5;
-  v5->vh = v0;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/simple_example.cpp b/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/simple_example.cpp
deleted file mode 100644
index 5193b88..0000000
--- a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/simple_example.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
-
-#include <iostream>
-#include <fstream>
-#include <cassert>
-#include <list>
-#include <vector>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Periodic_3_triangulation_traits_3<K> GT;
-
-typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
-
-typedef PDT::Cell_handle       Cell_handle;
-typedef PDT::Vertex_handle     Vertex_handle;
-typedef PDT::Locate_type       Locate_type;
-typedef PDT::Point             Point;
-typedef PDT::Iso_cuboid        Iso_cuboid;
-
-int main()
-{
-  Iso_cuboid domain(-1,-1,-1,2,2,2);  // The cube for the periodic domain
-
-  // construction from a list of points :
-  std::list<Point> L;
-  L.push_front(Point(0,0,0));
-  L.push_front(Point(1,0,0));
-  L.push_front(Point(0,1,0));
-
-  PDT T(L.begin(), L.end(), domain); // Put the domain with the constructor
-
-  PDT::size_type n = T.number_of_vertices();
-
-  // insertion from a vector :
-  std::vector<Point> V(3);
-  V[0] = Point(0,0,1);
-  V[1] = Point(1,1,1);
-  V[2] = Point(-1,-1,-1);
-
-  n = n + T.insert(V.begin(), V.end());
-
-  assert( n == 6 );       // 6 points have been inserted
-  assert( T.is_valid() ); // checking validity of T
-
-  Locate_type lt;
-  int li, lj;
-  Point p(0,0,0);
-  Cell_handle c = T.locate(p, lt, li, lj);
-  // p is the vertex of c of index li :
-  assert( lt == PDT::VERTEX );
-  assert( c->vertex(li)->point() == p );
-
-  Vertex_handle v = c->vertex( (li+1)&3 );
-  // v is another vertex of c
-  Cell_handle nc = c->neighbor(li);
-  // nc = neighbor of c opposite to the vertex associated with p
-  // nc must have vertex v :
-  int nli;
-  assert( nc->has_vertex( v, nli ) );
-  // nli is the index of v in nc
-
-  std::ofstream oFileT("output.tri",std::ios::out);
-  // writing file output; 
-  oFileT << T; 
-
-  PDT T1;
-  std::ifstream iFileT("output.tri",std::ios::in);
-  // reading file output; 
-  iFileT >> T1; 
-  assert( T1.is_valid() );
-  assert( T1.number_of_vertices() == T.number_of_vertices() );
-  assert( T1.number_of_cells() == T.number_of_cells() );
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Point_set_2/CMakeLists.txt
deleted file mode 100644
index dba87c4..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_2/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Point_set_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "nearest_neighbor.cpp" )
-  create_single_source_cgal_program( "range_search.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/CMakeLists.txt
deleted file mode 100644
index c5ad9c0..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/CMakeLists.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-# This is the CMake script for compiling this folder.
-
-project( Point_set_processing_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Require packages new or improved since CGAL 3.4
-include_directories (BEFORE ../../../Installation/include/)
-
-# Include this package's headers first
-include_directories (BEFORE . include ../../include)
-
-# Find CGAL
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  find_package(Boost QUIET)
-
-  # VisualC++ optimization for applications dealing with large data
-  if (MSVC)
-    # Use /FR to turn on IntelliSense
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
-
-    # Allow Windows applications to use up to 3GB of RAM
-    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
-
-    # Turn off stupid VC++ warnings
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4311 /wd4800 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
-
-    # Prints new compilation options
-    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
-    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
-    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
-    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
-  endif()
-
-  # Activate concurrency?
-  option(ACTIVATE_CONCURRENT_PSP3
-         "Enable concurrency"
-         OFF)
-     
-  if( ACTIVATE_CONCURRENT_PSP3 OR ENV{ACTIVATE_CONCURRENT_PSP3} )
-    find_package( TBB REQUIRED )
-    if( TBB_FOUND )
-      include(${TBB_USE_FILE})
-      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
-    endif()
-  endif()
-
-  # Executables that do *not* require EIGEN or LAPACK
-  create_single_source_cgal_program( "average_spacing_example.cpp" )
-  create_single_source_cgal_program( "bilateral_smooth_point_set_example.cpp" )
-  create_single_source_cgal_program( "grid_simplification_example.cpp" )
-  create_single_source_cgal_program( "normals_example.cpp" )
-  create_single_source_cgal_program( "property_map.cpp" )
-  create_single_source_cgal_program( "random_simplification_example.cpp" )
-  create_single_source_cgal_program( "read_write_xyz_point_set_example.cpp" )
-  create_single_source_cgal_program( "remove_outliers_example.cpp" )
-  create_single_source_cgal_program( "wlop_simplify_and_regularize_point_set_example.cpp" )
-  create_single_source_cgal_program( "edge_aware_upsample_point_set_example.cpp" )
-  
-  # Use Eigen or BLAS and LAPACK (optional)
-  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
-  if (NOT EIGEN3_FOUND)
-    find_package(LAPACK)
-    if(LAPACK_FOUND)
-      include( ${LAPACK_USE_FILE} )
-    endif(LAPACK_FOUND)
-  else()
-    include( ${EIGEN3_USE_FILE} )
-  endif()
-
-  if(EIGEN3_FOUND OR LAPACK_FOUND)
-    # Executables that require Eigen or BLAS and LAPACK
-    create_single_source_cgal_program( "jet_smoothing_example.cpp" )
-    create_single_source_cgal_program( "normal_estimation.cpp" )
-  else(EIGEN3_FOUND OR LAPACK_FOUND)
-
-    message(STATUS "NOTICE: Some of the executables in this directory need either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
-
-  endif(EIGEN3_FOUND OR LAPACK_FOUND)
-else()
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-endif()
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/average_spacing_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/average_spacing_example.cpp
deleted file mode 100644
index b3d6e13..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/average_spacing_example.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/compute_average_spacing.h>
-#include <CGAL/IO/read_xyz_points.h>
-
-#include <vector>
-#include <fstream>
-#include <boost/tuple/tuple.hpp>
-
-// Types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
-
-// Data type := index, followed by the point, followed by three integers that
-// define the Red Green Blue color of the point.
-typedef boost::tuple<int, Point, int, int, int> IndexedPointWithColorTuple;
-
-int main(int argc, char*argv[])
-{
-    const char* fname = (argc>1)?argv[1]:"data/sphere_20k.xyz";
-    // Reads a .xyz point set file in points.
-    // As the point is the second element of the tuple (that is with index 1)
-    // we use a property map that accesses the 1st element of the tuple.
-    
-    std::vector<IndexedPointWithColorTuple> points;
-    std::ifstream stream(fname);
-    if (!stream ||
-        !CGAL::read_xyz_points(
-            stream, std::back_inserter(points),
-            CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>()))
-    {
-      std::cerr << "Error: cannot read file " << fname << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Initialize index and RGB color fields in tuple.
-    // As the index and RGB color are respectively the first and third-fifth elements
-    // of the tuple we use a get function from the property map that accesses the 0
-    // and 2-4th elements of the tuple.
-    for(unsigned int i = 0; i < points.size(); i++)
-    {
-      points[i].get<0>() = i;   // set index value of tuple to i
-
-      points[i].get<2>() = 0;   // set RGB color to black
-      points[i].get<3>() = 0;
-      points[i].get<4>() = 0;
-    }
-
-    // Computes average spacing.
-    const unsigned int nb_neighbors = 6; // 1 ring
-    FT average_spacing = CGAL::compute_average_spacing(
-                            points.begin(), points.end(),
-                            CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>(),
-                            nb_neighbors);
-    std::cout << "Average spacing: " << average_spacing << std::endl;
-
-    return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp
deleted file mode 100644
index 9c326e2..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/property_map.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-#include <CGAL/bilateral_smooth_point_set.h>
-#include <CGAL/tags.h>
-
-#include <utility> // defines std::pair
-#include <fstream>
-
-// Types
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-
-// Point with normal vector stored in a std::pair.
-typedef std::pair<Point, Vector> PointVectorPair;
-
-
-int main(int argc, char*argv[])
-{
-  const char* input_filename =  (argc>1)?argv[1]:"data/fin90_with_PCA_normals.xyz";
-  const char* output_filename = (argc>2)?argv[2]:"data/fin90_with_PCA_normals_bilateral_smoothed.xyz";
-
-  // Reads a .xyz point set file in points[] * with normals *.
-  std::vector<PointVectorPair> points;
-  std::ifstream stream(input_filename);
-  if (!stream ||
-      !CGAL::read_xyz_points_and_normals(stream,
-                     std::back_inserter(points),
-                     CGAL::First_of_pair_property_map<PointVectorPair>(),
-                     CGAL::Second_of_pair_property_map<PointVectorPair>()))
-  {
-     std::cerr << "Error: cannot read file " << input_filename << std::endl;
-     return EXIT_FAILURE;
-  }
-
-  // Algorithm parameters
-  int k = 120;                 // size of neighborhood. The bigger the smoother the result will be.
-                               // This value should bigger than 1.
-  double sharpness_angle = 25; // control sharpness of the result.
-                               // The bigger the smoother the result will be
-  int iter_number = 3;         // number of times the projection is applied
-  
-  for (int i = 0; i < iter_number; ++i)
-  {
-    /* double error = */
-    CGAL::bilateral_smooth_point_set <CGAL::Parallel_tag>(
-          points.begin(), 
-          points.end(),
-          CGAL::First_of_pair_property_map<PointVectorPair>(),
-          CGAL::Second_of_pair_property_map<PointVectorPair>(),
-          k,
-          sharpness_angle);
-  }
-  
-  //// Save point set.
-  std::ofstream out(output_filename);   
-  if (!out ||
-      !CGAL::write_xyz_points_and_normals(
-      out, points.begin(), points.end(), 
-      CGAL::First_of_pair_property_map<PointVectorPair>(),
-      CGAL::Second_of_pair_property_map<PointVectorPair>()))
-  {
-    return EXIT_FAILURE;
-  }
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp
deleted file mode 100644
index c504081..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/edge_aware_upsample_point_set.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-
-#include <vector>
-#include <fstream>
-
-// types
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-
-
-// Point with normal vector stored in a std::pair.
-typedef std::pair<Point, Vector> PointVectorPair;
-
-
-int main(int argc, char* argv[])
-{
-  const char* input_filename = (argc>1)?argv[1]:"data/before_upsample.xyz";
-  const char* output_filename = (argc>2)?argv[2]:"data/before_upsample_UPSAMPLED.xyz";
-
-  // Reads a .xyz point set file in points[], *with normals*.
-  std::vector<PointVectorPair> points;
-  std::ifstream stream(input_filename);
-
-  if (!stream ||
-      !CGAL::read_xyz_points_and_normals(stream,
-                        std::back_inserter(points),
-                        CGAL::First_of_pair_property_map<PointVectorPair>(),
-                        CGAL::Second_of_pair_property_map<PointVectorPair>()))
-  {
-    std::cerr << "Error: cannot read file " << input_filename << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  //Algorithm parameters
-  const double sharpness_angle = 25;   // control sharpness of the result.
-  const double edge_sensitivity = 0;    // higher values will sample more points near the edges          
-  const double neighbor_radius = 0.25;  // initial size of neighborhood.
-  const unsigned int number_of_output_points = points.size() * 4;
-
-   //Run algorithm 
-   CGAL::edge_aware_upsample_point_set(
-            points.begin(), 
-            points.end(), 
-            std::back_inserter(points),
-            CGAL::First_of_pair_property_map<PointVectorPair>(),
-            CGAL::Second_of_pair_property_map<PointVectorPair>(),
-            sharpness_angle, 
-            edge_sensitivity,
-            neighbor_radius,
-            number_of_output_points);
-
-  // Saves point set.
-  std::ofstream out(output_filename);  
-
-  if (!out ||
-     !CGAL::write_xyz_points_and_normals(
-      out, points.begin(), points.end(), 
-      CGAL::First_of_pair_property_map<PointVectorPair>(),
-      CGAL::Second_of_pair_property_map<PointVectorPair>()))
-  {
-    return EXIT_FAILURE;
-  }
-
-  return EXIT_SUCCESS;
-}
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/jet_smoothing_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/jet_smoothing_example.cpp
deleted file mode 100644
index b7a46d3..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/jet_smoothing_example.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/jet_smooth_point_set.h>
-#include <vector>
-
-// types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-
-int main(void)
-{
-  // generate point set
-  std::vector<Point> points;
-  points.push_back(Point( 0.0, 0.0, 0.001));
-  points.push_back(Point(-0.1,-0.1, 0.002));
-  points.push_back(Point(-0.1,-0.2, 0.001));
-  points.push_back(Point(-0.1, 0.1, 0.002));
-  points.push_back(Point( 0.1,-0.1, 0.000));
-  points.push_back(Point( 0.1, 0.2, 0.001));
-  points.push_back(Point( 0.2, 0.0, 0.002));
-  points.push_back(Point( 0.2, 0.1, 0.000));
-  points.push_back(Point( 0.0,-0.1, 0.001));
-
-  // Smoothing.
-  const unsigned int nb_neighbors = 8; // default is 24 for real-life point sets
-  CGAL::jet_smooth_point_set(points.begin(), points.end(), nb_neighbors);
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normal_estimation.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normal_estimation.cpp
deleted file mode 100644
index f381871..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normal_estimation.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-// normal_estimation.cpp
-
-//----------------------------------------------------------
-// Normal estimation:
-// Reads a point set, compute and orient its normals,
-// and save the point set.
-// Input file formats are .off, .xyz and .pwn.
-// Output file formats are .xyz and .pwn.
-//----------------------------------------------------------
-// normal_estimation file_in file_out [options]
-
-// CGAL
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Memory_sizer.h>
-#include <CGAL/Timer.h>
-
-// This package
-#include <CGAL/pca_estimate_normals.h>
-#include <CGAL/jet_estimate_normals.h>
-#include <CGAL/mst_orient_normals.h>
-#include <CGAL/property_map.h>
-#include <CGAL/IO/read_off_points.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-
-#include <utility> // defines std::pair
-#include <vector>
-#include <cstdlib>
-#include <fstream>
-
-
-// ----------------------------------------------------------------------------
-// Types
-// ----------------------------------------------------------------------------
-
-// kernel
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-
-// Simple geometric types
-typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-
-// Point with normal vector stored in a std::pair.
-typedef std::pair<Point, Vector> PointVectorPair;
-typedef std::vector<PointVectorPair> PointList;
-
-
-// ----------------------------------------------------------------------------
-// Private functions
-// ----------------------------------------------------------------------------
-
-// Computes normals direction by Principal Component Analysis
-void run_pca_estimate_normals(PointList& points, // input points + output normals
-                              unsigned int nb_neighbors_pca_normals) // number of neighbors
-{
-  CGAL::Timer task_timer; task_timer.start();
-  std::cerr << "Estimates Normals Direction by PCA (k="
-            << nb_neighbors_pca_normals << ")...\n";
-
-  // Estimates normals direction.
-  // Note: pca_estimate_normals() requires an iterator over points
-  // as well as property maps to access each point's position and normal.
-  CGAL::pca_estimate_normals(points.begin(), points.end(),
-                             CGAL::First_of_pair_property_map<PointVectorPair>(),
-                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
-                             nb_neighbors_pca_normals);
-
-  long memory = CGAL::Memory_sizer().virtual_size();
-  std::cerr << "done: " << task_timer.time() << " seconds, "
-                        << (memory>>20) << " Mb allocated"
-                        << std::endl;
-}
-
-// Computes normals direction by Jet Fitting
-void run_jet_estimate_normals(PointList& points, // input points + output normals
-                              unsigned int nb_neighbors_jet_fitting_normals) // number of neighbors
-{
-  CGAL::Timer task_timer; task_timer.start();
-  std::cerr << "Estimates Normals Direction by Jet Fitting (k="
-            << nb_neighbors_jet_fitting_normals << ")...\n";
-
-  // Estimates normals direction.
-  // Note: jet_estimate_normals() requires an iterator over points
-  // + property maps to access each point's position and normal.
-  CGAL::jet_estimate_normals(points.begin(), points.end(),
-                             CGAL::First_of_pair_property_map<PointVectorPair>(),
-                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
-                             nb_neighbors_jet_fitting_normals);
-
-  long memory = CGAL::Memory_sizer().virtual_size();
-  std::cerr << "done: " << task_timer.time() << " seconds, "
-                        << (memory>>20) << " Mb allocated"
-                        << std::endl;
-}
-
-// Hoppe92 normal orientation using a Minimum Spanning Tree.
-void run_mst_orient_normals(PointList& points, // input points + input/output normals
-                            unsigned int nb_neighbors_mst) // number of neighbors
-{
-  std::cerr << "Orients Normals with a Minimum Spanning Tree (k="<< nb_neighbors_mst << ")...\n";
-  CGAL::Timer task_timer; task_timer.start();
-
-  // Orients normals.
-  // Note: mst_orient_normals() requires an iterator over points
-  // as well as property maps to access each point's position and normal.
-  PointList::iterator unoriented_points_begin =
-    CGAL::mst_orient_normals(points.begin(), points.end(),
-                             CGAL::First_of_pair_property_map<PointVectorPair>(),
-                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
-                             nb_neighbors_mst);
-
-  // Optional: delete points with an unoriented normal
-  // if you plan to call a reconstruction algorithm that expects oriented normals.
-  points.erase(unoriented_points_begin, points.end());
-
-  long memory = CGAL::Memory_sizer().virtual_size();
-  std::cerr << "done: " << task_timer.time() << " seconds, "
-                        << (memory>>20) << " Mb allocated"
-                        << std::endl;
-}
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "Normal estimation" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    // usage
-    if (argc-1 < 2)
-    {
-      std::cerr << "Reads a point set, compute and orient its normals,\n";
-      std::cerr << "and save the point set.\n";
-      std::cerr << "If the input mesh has normals, print the normals deviation.\n";
-      std::cerr << "\n";
-      std::cerr << "Usage: " << argv[0] << " file_in file_out [options]\n";
-      std::cerr << "Input file formats are .off, .xyz and .pwn.\n";
-      std::cerr << "Output file formats are .xyz and .pwn.\n";
-      std::cerr << "Options:\n";
-      std::cerr << "  -estimate plane|quadric          Estimates normals direction\n";
-      std::cerr << "  using a tangent plane or quadric (default=quadric)\n";
-      std::cerr << "  -nb_neighbors_pca <int>          Number of neighbors\n";
-      std::cerr << "  to compute tangent plane (default=18)\n";
-      std::cerr << "  -nb_neighbors_jet_fitting <int>  Number of neighbors\n";
-      std::cerr << "  to compute quadric (default=18)\n";
-      std::cerr << "  -orient MST                      Orient normals\n";
-      std::cerr << "  using a Minimum Spanning Tree (default=MST)\n";
-      std::cerr << "  -nb_neighbors_mst <int>          Number of neighbors\n";
-      std::cerr << "  to compute the MST (default=18)\n";
-      return EXIT_FAILURE;
-    }
-
-    // Normals Computing options
-    unsigned int nb_neighbors_pca_normals = 18; // K-nearest neighbors = 3 rings (estimate normals by PCA)
-    unsigned int nb_neighbors_jet_fitting_normals = 18; // K-nearest neighbors (estimate normals by Jet Fitting)
-    unsigned int nb_neighbors_mst = 18; // K-nearest neighbors (orient normals by MST)
-    std::string estimate = "quadric"; // estimate normals by jet fitting
-    std::string orient = "MST"; // orient normals using a Minimum Spanning Tree
-
-    // decode parameters
-    std::string input_filename  = argv[1];
-    std::string output_filename = argv[2];
-    for (int i=3; i+1<argc ; ++i)
-    {
-      if (std::string(argv[i])=="-estimate") {
-        estimate = argv[++i];
-        if (estimate != "plane" && estimate != "quadric")
-          std::cerr << "invalid option " << argv[i] << "\n";
-      }
-      else if (std::string(argv[i])=="-nb_neighbors_pca") {
-        nb_neighbors_pca_normals = atoi(argv[++i]);
-      }
-      else if (std::string(argv[i])=="-nb_neighbors_jet_fitting") {
-        nb_neighbors_jet_fitting_normals = atoi(argv[++i]);
-      }
-      else if (std::string(argv[i])=="-orient") {
-        orient = argv[++i];
-        if (orient != "MST")
-          std::cerr << "invalid option " << argv[i] << "\n";
-      }
-      else if (std::string(argv[i])=="-nb_neighbors_mst") {
-        nb_neighbors_mst = atoi(argv[++i]);
-      }
-      else {
-        std::cerr << "invalid option " << argv[i] << "\n";
-      }
-    }
-
-    // Accumulated errors
-    int accumulated_fatal_err = EXIT_SUCCESS;
-
-    CGAL::Timer task_timer; task_timer.start();
-
-    //***************************************
-    // Loads point set
-    //***************************************
-
-    // Reads a .off or .xyz point set file in points[].
-    PointList points;
-    std::cerr << "Open " << input_filename << " for reading..." << std::endl;
-
-    // If OFF file format
-    bool success = false;
-    std::string extension = input_filename.substr(input_filename.find_last_of('.'));
-    if (extension == ".off" || extension == ".OFF")
-    {
-      std::ifstream stream(input_filename.c_str());
-      success = stream &&
-                CGAL::read_off_points(stream,
-                                      std::back_inserter(points),
-                                      CGAL::First_of_pair_property_map<PointVectorPair>());
-    }
-    // If XYZ file format
-    else if (extension == ".xyz" || extension == ".XYZ" ||
-             extension == ".pwn" || extension == ".PWN")
-    {
-      std::ifstream stream(input_filename.c_str());
-      success = stream &&
-                CGAL::read_xyz_points(stream,
-                                      std::back_inserter(points),
-                                      CGAL::First_of_pair_property_map<PointVectorPair>());
-    }
-    if (!success)
-    {
-      std::cerr << "Error: cannot read file " << input_filename << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Prints status
-    int nb_points = points.size();
-    std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
-                                                         << task_timer.time() << " seconds"
-                                                         << std::endl;
-    task_timer.reset();
-
-    //***************************************
-    // Check requirements
-    //***************************************
-
-    if (nb_points == 0)
-    {
-      std::cerr << "Error: empty file" << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Computes normals
-    //***************************************
-
-    // Estimates normals direction.
-    if (estimate == "plane")
-      run_pca_estimate_normals(points, nb_neighbors_pca_normals);
-    else if (estimate == "quadric")
-      run_jet_estimate_normals(points, nb_neighbors_jet_fitting_normals);
-
-    // Orient normals.
-    if (orient == "MST")
-      run_mst_orient_normals(points, nb_neighbors_mst);
-
-    //***************************************
-    // Saves the point set
-    //***************************************
-
-    std::cerr << "Write file " << output_filename << std::endl << std::endl;
-
-    // If XYZ file format
-    /*std::string*/ extension = output_filename.substr(output_filename.find_last_of('.'));
-    if (extension == ".xyz" || extension == ".XYZ" ||
-        extension == ".pwn" || extension == ".PWN")
-    {
-      std::ofstream stream(output_filename.c_str());
-      if (!stream ||
-          !CGAL::write_xyz_points_and_normals(stream,
-                                              points.begin(), points.end(),
-                                              CGAL::First_of_pair_property_map<PointVectorPair>(),
-                                              CGAL::Second_of_pair_property_map<PointVectorPair>()))
-      {
-        std::cerr << "Error: cannot write file " << output_filename << std::endl;
-        return EXIT_FAILURE;
-      }
-    }
-    else
-    {
-        std::cerr << "Error: cannot write file " << output_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    // Returns accumulated fatal error
-    std::cerr << "Tool returned " << accumulated_fatal_err << std::endl;
-    return accumulated_fatal_err;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normals_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normals_example.cpp
deleted file mode 100644
index 77d3808..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normals_example.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/pca_estimate_normals.h>
-#include <CGAL/mst_orient_normals.h>
-#include <CGAL/property_map.h>
-#include <CGAL/IO/read_xyz_points.h>
-
-#include <utility> // defines std::pair
-#include <list>
-#include <fstream>
-
-// Types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-
-// Point with normal vector stored in a std::pair.
-typedef std::pair<Point, Vector> PointVectorPair;
-
-int main(int argc, char*argv[])
-{
-  const char* fname = (argc>1)?argv[1]:"data/sphere_1k.xyz";
-    // Reads a .xyz point set file in points[].
-    std::list<PointVectorPair> points;
-    std::ifstream stream(fname);
-    if (!stream ||
-        !CGAL::read_xyz_points(stream,
-                               std::back_inserter(points),
-                               CGAL::First_of_pair_property_map<PointVectorPair>()))
-    {
-      std::cerr << "Error: cannot read file " << fname<< std::endl;
-        return EXIT_FAILURE;
-    }
-
-    // Estimates normals direction.
-    // Note: pca_estimate_normals() requires an iterator over points
-    // as well as property maps to access each point's position and normal.
-    const int nb_neighbors = 18; // K-nearest neighbors = 3 rings
-    CGAL::pca_estimate_normals(points.begin(), points.end(),
-                               CGAL::First_of_pair_property_map<PointVectorPair>(),
-                               CGAL::Second_of_pair_property_map<PointVectorPair>(),
-                               nb_neighbors);
-
-    // Orients normals.
-    // Note: mst_orient_normals() requires an iterator over points
-    // as well as property maps to access each point's position and normal.
-    std::list<PointVectorPair>::iterator unoriented_points_begin =
-        CGAL::mst_orient_normals(points.begin(), points.end(),
-                                 CGAL::First_of_pair_property_map<PointVectorPair>(),
-                                 CGAL::Second_of_pair_property_map<PointVectorPair>(),
-                                 nb_neighbors);
-
-    // Optional: delete points with an unoriented normal
-    // if you plan to call a reconstruction algorithm that expects oriented normals.
-    points.erase(unoriented_points_begin, points.end());
-
-    return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/random_simplification_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/random_simplification_example.cpp
deleted file mode 100644
index 8692a54..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/random_simplification_example.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/random_simplify_point_set.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-
-#include <vector>
-#include <fstream>
-
-// types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-
-int main(int argc, char*argv[])
-{
-  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
-  // Reads a .xyz point set file in points[].
-  std::vector<Point> points;
-  std::ifstream stream(fname);
-  if (!stream ||
-      !CGAL::read_xyz_points(stream, std::back_inserter(points)))
-  {
-    std::cerr << "Error: cannot read file " << fname << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  // Randomly simplifies using erase-remove idiom
-  const double removed_percentage = 97.0; // percentage of points to remove
-  points.erase(CGAL::random_simplify_point_set(points.begin(), points.end(), removed_percentage),
-               points.end());
-
-  // Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
-  std::vector<Point>(points).swap(points);
-
-  // Saves point set.
-  // Note: write_xyz_points_and_normals() requires an output iterator
-  // over points as well as property maps to access each
-  // point position and normal.
-  std::ofstream out((argc>2)?argv[2]:"Three_lady_copy.xyz");
-  if (!out ||
-	  !CGAL::write_xyz_points(
-	  out, points.begin(), points.end()))
-  {
-	  return EXIT_FAILURE;
-  }
-
-  return EXIT_SUCCESS;
-}
-
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp
deleted file mode 100644
index a23e00c..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/property_map.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-
-#include <utility> // defines std::pair
-#include <vector>
-#include <fstream>
-
-// types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-
-// Point with normal vector stored as a std::pair.
-typedef std::pair<Point, Vector> Pwn;
-
-int main(int argc, char*argv[])
-{
-  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
-    // Reads a .xyz point set file in points[].
-    // Note: read_xyz_points_and_normals() requires an output iterator
-    // over points and as well as property maps to access each
-    // point position and normal.
-    std::vector<Pwn> points;
-    std::ifstream in(fname);
-    if (!in ||
-        !CGAL::read_xyz_points_and_normals(
-            in,std::back_inserter(points),
-            CGAL::First_of_pair_property_map<Pwn>(),
-            CGAL::Second_of_pair_property_map<Pwn>()))
-    {
-      std::cerr << "Error: cannot read file " << fname << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Saves point set.
-    // Note: write_xyz_points_and_normals() requires an output iterator
-    // over points as well as property maps to access each
-    // point position and normal.
-    std::ofstream out("oni_copy.xyz");
-    if (!out ||
-        !CGAL::write_xyz_points_and_normals(
-            out, points.begin(), points.end(),
-            CGAL::First_of_pair_property_map<Pwn>(),
-            CGAL::Second_of_pair_property_map<Pwn>()))
-    {
-      return EXIT_FAILURE;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/remove_outliers_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/remove_outliers_example.cpp
deleted file mode 100644
index fb25df6..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/remove_outliers_example.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/property_map.h>
-#include <CGAL/remove_outliers.h>
-#include <CGAL/IO/read_xyz_points.h>
-
-#include <vector>
-#include <fstream>
-
-// types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-
-int main(int argc, char*argv[])
-{
-  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
-  // Reads a .xyz point set file in points[].
-  // The Identity_property_map property map can be omitted here as it is the default value.
-  std::vector<Point> points;
-  std::ifstream stream(fname);
-  if (!stream ||
-      !CGAL::read_xyz_points(stream, std::back_inserter(points),
-                             CGAL::Identity_property_map<Point>()))
-  {
-    std::cerr << "Error: cannot read file " << fname << std::endl;
-    return EXIT_FAILURE;
-  }
-
-  // Removes outliers using erase-remove idiom.
-  // The Identity_property_map property map can be omitted here as it is the default value.
-  const double removed_percentage = 5.0; // percentage of points to remove
-  const int nb_neighbors = 24; // considers 24 nearest neighbor points
-  points.erase(CGAL::remove_outliers(points.begin(), points.end(),
-                                     CGAL::Identity_property_map<Point>(),
-                                     nb_neighbors, removed_percentage), 
-               points.end());
-
-  // Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
-  std::vector<Point>(points).swap(points);
-
-  return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp b/3rdparty/CGAL-4.6/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp
deleted file mode 100644
index 7370830..0000000
--- a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/wlop_simplify_and_regularize_point_set.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/IO/write_xyz_points.h>
-
-#include <vector>
-#include <fstream>
-
-// types
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point;
-
-int main(int argc, char** argv)
-{
-  const char* input_filename = (argc>1)?argv[1]:"data/sphere_20k.xyz";
-  const char* output_filename = (argc>2)?argv[2]:"data/sphere_20k_WLOPED.xyz";
-
-  // Reads a .xyz point set file in points[]
-  std::vector<Point> points;
-  std::ifstream stream(input_filename);
-
-  if (!stream || !CGAL::read_xyz_points(stream, std::back_inserter(points)))
-  {
-    std::cerr << "Error: cannot read file " << input_filename  << std::endl;
-
-    return EXIT_FAILURE;
-  }
-
-  std::vector<Point> output;
-
-  //parameters
-  const double retain_percentage = 2;   // percentage of points to retain.
-  const double neighbor_radius = 0.5;   // neighbors size.
-
-  CGAL::wlop_simplify_and_regularize_point_set
-                          <CGAL::Parallel_tag> // parallel version
-                          (points.begin(), 
-                           points.end(),
-                           std::back_inserter(output),
-                           retain_percentage,
-                           neighbor_radius
-                           );
-  
-  std::ofstream out(output_filename);
-  if (!out || !CGAL::write_xyz_points(
-      out, output.begin(), output.end()))
-  {
-    return EXIT_FAILURE;
-  }
-
-  return EXIT_SUCCESS;
-}
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/examples/Polygon/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polygon/CMakeLists.txt
deleted file mode 100644
index a8d5d14..0000000
--- a/3rdparty/CGAL-4.6/examples/Polygon/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polygon_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Example.cpp" )
-  create_single_source_cgal_program( "Polygon.cpp" )
-  create_single_source_cgal_program( "polygon_algorithms.cpp" )
-  create_single_source_cgal_program( "projected_polygon.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polyhedron/CMakeLists.txt
deleted file mode 100644
index 8fd02e2..0000000
--- a/3rdparty/CGAL-4.6/examples/Polyhedron/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polyhedron_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-    include_directories (BEFORE "include")
-
-  create_single_source_cgal_program( "polyhedron_prog_color.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_cube.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_cut_cube.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_incr_builder.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_normals.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_off.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_planes.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_simple.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_subdiv.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_subdiv_with_boundary.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_tetra.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_traits.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_vector.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_vertex_color.cpp" )
-  create_single_source_cgal_program( "polyhedron_prog_vertex_normal.cpp" )
-  create_single_source_cgal_program( "polyhedron_self_intersection.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/include/CGAL/Point_inside_polyhedron_3.h b/3rdparty/CGAL-4.6/examples/Polyhedron/include/CGAL/Point_inside_polyhedron_3.h
deleted file mode 100644
index b4b587d..0000000
--- a/3rdparty/CGAL-4.6/examples/Polyhedron/include/CGAL/Point_inside_polyhedron_3.h
+++ /dev/null
@@ -1,403 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot
-
-#ifndef CGAL_POINT_INSIDE_POLYHEDRON_H
-#define CGAL_POINT_INSIDE_POLYHEDRON_H
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_polyhedron_triangle_primitive.h>
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_3.h>
-#include <boost/logic/tribool.hpp>
-#include <boost/math/special_functions/round.hpp>
-
-namespace CGAL {
-
-template<typename AABBTraits, class Polyhedron_3, class Kernel,class Tag_ray_is_vertical=Tag_false>
-class Ray_3_Triangle_3_traversal_traits
-{
-protected:
-  //the status indicates whether the query point is strictly inside the polyhedron, and the number of intersected triangles if yes
-  std::pair<boost::logic::tribool,std::size_t>& m_status;
-  bool m_stop;
-  typedef CGAL::AABB_polyhedron_triangle_primitive<Kernel,Polyhedron_3> Primitive;
-
-public:
-  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status)
-    :m_status(status),m_stop(false)
-  {m_status.first=true;}
-
-  bool go_further() const { return !m_stop; }
-
-  template<class Query>
-  void intersection(const Query& query, const Primitive& primitive)
-  {
-    internal::r3t3_do_intersect_endpoint_position_visitor visitor;
-    std::pair<bool,internal::R3T3_intersection::type> res=
-      internal::do_intersect(primitive.datum(),query,Kernel(),visitor);
-    
-    if (res.first){
-      switch (res.second){
-        case internal::R3T3_intersection::CROSS_FACET:
-          ++m_status.second;
-        break;
-        case internal::R3T3_intersection::ENDPOINT_IN_TRIANGLE:
-          m_status.first=false;
-          m_stop=true;
-        break;
-        default:
-          m_status.first=boost::logic::indeterminate;
-          m_stop=true;
-      }
-    }
-  }
-  
-  template<class Query,class Node>
-  bool do_intersect(const Query& query, const Node& node) const
-  {
-    return AABBTraits().do_intersect_object()(query, node.bbox());
-  }
-};
-
-
-//specialization for vertical ray
-template<typename AABBTraits,class Polyhedron_3, class Kernel>
-class Ray_3_Triangle_3_traversal_traits<AABBTraits,Polyhedron_3,Kernel,Tag_true>: 
-  public Ray_3_Triangle_3_traversal_traits<AABBTraits,Polyhedron_3,Kernel,Tag_false>
-{
-  typedef Ray_3_Triangle_3_traversal_traits<AABBTraits,Polyhedron_3,Kernel,Tag_false> Base;
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Base::Primitive Primitive;
-public:
-  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status):Base(status){}
-
-  template <class Query>
-  bool do_intersect(const Query& query, const Bbox_3& bbox) const
-  {
-    const Point& source=query.point(0);
-    const Point& target=query.point(1);
-    
-    bool inc_z=target.z()>source.z();
-    
-    //the ray does not intersect the z-slab
-    if ( ( inc_z && source.z()>bbox.zmax() )|| (!inc_z && source.z()<bbox.zmin()) ) return false;
-    
-    //the source is not in the x-slab
-    if (source.x() > bbox.xmax() || source.x()<bbox.xmin()) return false;
-    //check if the source is not in the y-slab
-    return source.y() <= bbox.ymax() && source.y()>=bbox.ymin();
-  }
-
-  template <class Query,class Node>
-  bool do_intersect(const Query& query, const Node& node) const
-  {
-    return do_intersect(query,node.bbox());
-  }
-
-private:
-  typename Kernel::Point_2 x_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.y(),p.z());
-  }
-  typename Kernel::Point_2 y_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.x(),p.z());
-  }
-  typename Kernel::Point_2 z_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.x(),p.y());
-  }
-public:
-  template<class Query>
-  void intersection(const Query& query, const Primitive& primitive)
-  {
-    typename Kernel::Triangle_3 t=primitive.datum();
-    if ( !do_intersect(query,t.bbox()) ) return;
-    
-    
-    typename Kernel::Point_2 p0=z_project(t[0]);
-    typename Kernel::Point_2 p1=z_project(t[1]);
-    typename Kernel::Point_2 p2=z_project(t[2]);
-    int indices[3]={0,1,2}; //to track whether triangle points have been swapt
-    typename Kernel::Point_2 q=z_project( query.source() );
-    
-    Orientation orient_2=orientation(p0,p1,p2);
-    
-    //check whether the face has a normal vector in the xy-plane
-    if (orient_2==COLLINEAR){
-      //in that case the projection of the triangle along the z-axis is a segment.
-      const typename Kernel::Point_2& other_point = p0!=p1?p1:p2;
-      //~ if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
-      if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
-      
-      //check if the ray source is above or below the triangle and compare it 
-      //with the direction of the ray
-      //TODO and if yes return
-      //this is just an optimisation, the current code is valid
-      
-      this->m_status.first=boost::logic::indeterminate;
-      this->m_stop=true;
-      return;
-    }
-    
-    
-    //regular case
-    if (orient_2==NEGATIVE){
-      std::swap(p1,p2);
-      std::swap(indices[1],indices[2]);
-    }
-    
-    //check whether the ray intersect the supporting plane
-    Orientation orient_3 = orientation(t[indices[0]],t[indices[1]],t[indices[2]],query.source());
-    if ( orient_3!=COPLANAR && 
-          (
-            //indicates whether the ray is oriented toward the positive side of the plane
-            ( POSITIVE == sign( query.to_vector().z() )  )
-              ==
-            //indicates whether the source of the ray is in the positive side of the plane
-            (orient_3==POSITIVE)
-          )
-    ) return; //no intersection
-    
-
-    //position against first segment
-    switch( orientation(p0,p1,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-    //position against second segment
-    switch( orientation(p1,p2,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-    //position against third segment
-    switch( orientation(p2,p0,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-
-    if (orient_3==COPLANAR){
-      //the endpoint is inside the triangle
-      this->m_status.first=false;
-      this->m_stop=true;
-    }
-    else
-      ++(this->m_status.second);
-  }
-};
-  
-template <class Polyhedron_3,class Kernel>
-class Point_inside_polyhedron_3 {
-
-  typedef CGAL::AABB_polyhedron_triangle_primitive<Kernel,Polyhedron_3> Primitive;
-  typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-  typedef typename Traits::Bounding_box Bounding_box;
-  typedef CGAL::AABB_tree<Traits> Tree;
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::Ray_3 Ray;
-  typedef typename Kernel::Segment_3 Segment;
-  
-  Kernel m_kernel;
-  Polyhedron_3& polyhedron;
-  Tree tree;
-  int N;
-  Point grid_base;
-  std::vector<std::pair<Point,bool> > grid;
-  double grid_dx, grid_dy, grid_dz;
-  static const bool m_on_boundary_point_inside=false;
-  static const bool m_use_a_vertical_ray=true;
-
-public:
-  
-  Point_inside_polyhedron_3(Polyhedron_3& polyhedron, int N = 0, const Kernel& k=Kernel())
-    : m_kernel(k), polyhedron(polyhedron), N(N)
-  {
-    tree.insert(polyhedron.facets_begin(),polyhedron.facets_end());
-    tree.build();
-    if(N>0){
-      initialize_grid();
-    }
-  }
-
-	
-  void initialize_grid()
-  {
-    Random rg;
-    Bounding_box bbox = tree.bbox();
-    grid_dx = bbox.xmax() - bbox.xmin();
-    grid_dy = bbox.ymax() - bbox.ymin();
-    grid_dz = bbox.zmax() - bbox.zmin();
- 	
-    bbox = Bounding_box(bbox.xmin()-0.01*grid_dx, bbox.ymin()-0.01*grid_dy, bbox.zmin()-0.01*grid_dz,
-                        bbox.xmax()+0.01*grid_dx, bbox.ymax()+0.01*grid_dy, bbox.zmax()+0.01*grid_dz);
-    grid_dx = (bbox.xmax() - bbox.xmin())/(N-1);
-    grid_dy = (bbox.ymax() - bbox.ymin())/(N-1);
-    grid_dz = (bbox.zmax() - bbox.zmin())/(N-1);
-    grid_base = Point(bbox.xmin(), bbox.ymin(), bbox.zmin());
- 
-
-    grid.reserve(N*N*N);
-    int points_inside = 0, points_outside=0;
-    for(int i=0; i < N; i++){
-      for(int j=0; j < N; j++){
-        for(int k=0; k < N; k++){
-          Point p(bbox.xmin()+i*grid_dx, bbox.ymin()+j*grid_dy, bbox.zmin()+k*grid_dz);
-          if(i==0 || j==0 || k==0 || i==N-1 || j==N-1 || k==N-1){
-            double eps = grid_dx/100;
-            Vector v(rg.get_double(-eps,eps), rg.get_double(-eps,eps), rg.get_double(-eps,eps));
-            p = p+ v;
-            grid.push_back(std::make_pair(p,false));
-              points_outside++;	
-          } else {
-            double eps = grid_dx/100;
-            Vector v(rg.get_double(-eps,eps), rg.get_double(-eps,eps), rg.get_double(-eps,eps));
-            p = p+ v;
-            const Segment segment(p, grid.back().first);
-            std::size_t M = (grid.back().second)? 0 : 1;
-            bool inside = (tree.number_of_intersected_primitives(segment)&1) == M;
-            if(inside){
-              points_inside++;
-            }else{
-              points_outside++;
-            }
-            grid.push_back(std::make_pair(p,inside));
-          }
-        }
-      }
-    }
-    std::cerr << points_inside << " points inside" << std::endl;
-    std::cerr << points_outside << " points outside" << std::endl;
-  }
-  
-  Bounding_box bbox() const {
-    return tree.bbox();
-  }
-
-private:
-  template <class Query,bool ray_is_vertical>
-  boost::logic::tribool 
-  is_inside_ray_tree_traversal(const Query& query) const {
-    std::pair<boost::logic::tribool,std::size_t> status(boost::logic::indeterminate,0);
-    Ray_3_Triangle_3_traversal_traits<Traits,Polyhedron_3,Kernel,Boolean_tag<ray_is_vertical> > traversal_traits(status);
-    tree.traversal(query, traversal_traits);
-    if ( !boost::logic::indeterminate(status.first) ){
-      if (status.first) return (status.second&1) == 1;
-      //otherwise the point is on the facet
-      return m_on_boundary_point_inside;
-    }
-    return boost::logic::indeterminate;
-  }
-
-public:
-
-  bool operator()(const Point& p) const
-  {
-    const Bounding_box& bbox = tree.bbox();
-
-    if(   p.x() < bbox.xmin() || p.x() > bbox.xmax()
-       || p.y() < bbox.ymin() || p.y() > bbox.ymax()
-       || p.z() < bbox.zmin() || p.z() > bbox.zmax() )
-    {
-      return false;
-    }
-
-    if(N>0)
-    {
-      Vector v = p - grid_base;
-      int i = boost::math::round(v.x() / grid_dx);  
-      int j =  boost::math::round(v.y() / grid_dy);  
-      int k =  boost::math::round(v.z() / grid_dz);
-
-      if(i>N-1)i=N-1;
-      if(j>N-1)j=N-1;
-      if(k>N-1)k=N-1;
-      int index = i*N*N + j*N + k;
-       
-      const std::pair<Point,bool>& close_point = grid[index];
-      typename Kernel::Construct_segment_3 segment = m_kernel.construct_segment_3_object();
-      const Segment query = segment(p, close_point.first);
-      if(p == close_point.first){
-        std::cerr << "error"  << std::endl;
-      }
-      std::size_t M = (close_point.second)? 0 : 1; 
-      bool res = (tree.number_of_intersected_primitives(query)&1) == M;
-      return res;
-    } 
-    else 
-    {
-      typename Kernel::Construct_ray_3 make_ray = m_kernel.construct_ray_3_object();
-      typename Kernel::Construct_vector_3 make_vector = m_kernel.construct_vector_3_object();
-     
-      //start with a vertical ray
-      //~ Ray query = ray(p, vector(CGAL::ORIGIN,*random_point));
-      
-      Random_points_on_sphere_3<Point> random_point(1.);
-      //the direction of the vertical ray depends on the position of the point in the bbox
-      //in order to limit the expected number of nodes visited.
-      Ray query = 
-        m_use_a_vertical_ray ?
-        make_ray(p, make_vector(0,0,(2*p.z() <  tree.bbox().zmax()+tree.bbox().zmin()?-1:1))) :
-        make_ray(p, make_vector(CGAL::ORIGIN,*random_point));
-      boost::logic::tribool res=is_inside_ray_tree_traversal<Ray,true>(query);
-      while (boost::logic::indeterminate(res)){
-        //retry with a random ray
-        query = make_ray(p, make_vector(CGAL::ORIGIN,*random_point++));
-        res=is_inside_ray_tree_traversal<Ray,false>(query);
-      }
-      return res;
-    }
-  }
-  
-  //the original version
-  bool operator()(const Point& p,bool) const
-  {
-    typename Kernel::Construct_ray_3 ray = m_kernel.construct_ray_3_object();
-    typename Kernel::Construct_vector_3 vector = m_kernel.construct_vector_3_object();
-   
-    Random_points_on_sphere_3<Point> random_point(1.);
-    
-    //const Ray query = ray(p, vector(CGAL::ORIGIN,*random_point));
-    
-    //the direction of the vertical ray depends on the position of the point in the bbox
-    //in order to limit the expected number of nodes visited.
-    const Ray query = ray(p, vector(0,0, (2*p.z() <  tree.bbox().zmax()+tree.bbox().zmin()?-1:1) ));
-
-    return (tree.number_of_intersected_primitives(query)&1) == 1;
-  }
-  
-};
-
-} // namespace CGAL
-
-#endif //CGAL_POINT_INSIDE_POLYHEDRON_H
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polyhedron_IO/CMakeLists.txt
deleted file mode 100644
index f89524d..0000000
--- a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polyhedron_IO_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "iv2off.cpp" )
-  create_single_source_cgal_program( "off2iv.cpp" )
-  create_single_source_cgal_program( "off2off.cpp" )
-  create_single_source_cgal_program( "off2stl.cpp" )
-  create_single_source_cgal_program( "off2vrml.cpp" )
-  create_single_source_cgal_program( "off2wav.cpp" )
-  create_single_source_cgal_program( "off_bbox.cpp" )
-  create_single_source_cgal_program( "off_glue.cpp" )
-  create_single_source_cgal_program( "off_transform.cpp" )
-  create_single_source_cgal_program( "polyhedron2vrml.cpp" )
-  create_single_source_cgal_program( "polyhedron_copy.cpp" )
-  create_single_source_cgal_program( "terr_trian.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/CMakeLists.txt
deleted file mode 100644
index 0a5b3b6..0000000
--- a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polyline_simplification_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "points_and_vertices.cpp" )
-  create_single_source_cgal_program( "simplify.cpp" )
-  create_single_source_cgal_program( "simplify_polygon.cpp" )
-  create_single_source_cgal_program( "simplify_polyline.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polynomial/CMakeLists.txt
deleted file mode 100644
index 9389039..0000000
--- a/3rdparty/CGAL-4.6/examples/Polynomial/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polynomial_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "coefficient_access.cpp" )
-  create_single_source_cgal_program( "construction.cpp" )
-  create_single_source_cgal_program( "degree.cpp" )
-  create_single_source_cgal_program( "gcd_up_to_constant_factor.cpp" )
-  create_single_source_cgal_program( "subresultants.cpp" )
-  create_single_source_cgal_program( "substitute.cpp" )
-  create_single_source_cgal_program( "swap_move.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/construction.cpp b/3rdparty/CGAL-4.6/examples/Polynomial/construction.cpp
deleted file mode 100644
index 1d0d64a..0000000
--- a/3rdparty/CGAL-4.6/examples/Polynomial/construction.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <CGAL/Polynomial.h>
-#include <CGAL/Polynomial_traits_d.h>
-#include <CGAL/Polynomial_type_generator.h>
-
-int main(){
-  CGAL::set_pretty_mode(std::cout);
-  
-  typedef CGAL::Polynomial_type_generator<int,2>::Type Poly_2;
-  typedef CGAL::Polynomial_traits_d<Poly_2>            PT_2;
-  typedef PT_2::Coefficient_type                       Poly_1;
-  typedef PT_2::Innermost_coefficient_type             Integer; 
-   
-  PT_2::Construct_polynomial construct_polynomial;
-  
-  // constructing a constant polynomial from int
-  Poly_2 two(2); // = 2 
-  std::cout << "A constant polynomial: " << two << std::endl;
-
-  
-  // construction from an iterator range of univariate polynomials
-  
-  std::list<Poly_1> univariate_coeffs;
-  univariate_coeffs.push_back(Poly_1(3));
-  univariate_coeffs.push_back(Poly_1(0));
-  univariate_coeffs.push_back(Poly_1(5));
-  Poly_2 F = // 5*y^2 + 3
-    construct_polynomial(univariate_coeffs.begin(),univariate_coeffs.end());
-  std::cout << "The bivariate polynomial F: " << F << std::endl;
-  
-   
-  // construction from an iterator range over monomials 
-  
-  std::list<std::pair<CGAL::Exponent_vector, Integer> > innermost_coeffs;
-  innermost_coeffs.push_back(std::make_pair(CGAL::Exponent_vector(0,0),-2));
-  innermost_coeffs.push_back(std::make_pair(CGAL::Exponent_vector(3,5),2));
-  Poly_2 G = // (2*x^3)*y^5 + (-2)
-    construct_polynomial(innermost_coeffs.begin(),innermost_coeffs.end());
-  std::cout << "The bivariate polynomial G: " << G << std::endl;
-  
-  //construction using shift 
-  PT_2::Shift shift;
-  Poly_2 x = shift(Poly_2(1),1,0); // 'multiply' 1 by x_0^1
-  Poly_2 y = shift(Poly_2(1),1,1); // 'multiply' 1 by x_1^1
-  
-  Poly_2 H = 5 * x * y + 3 * y * y; // = 3*y^2 + (5*x)*y
-  std::cout << "The bivariate polynomial H: " << H << std::endl;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Polytope_distance_d/CMakeLists.txt
deleted file mode 100644
index 90e4b00..0000000
--- a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Polytope_distance_d_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "all_furthest_neighbors_2.cpp" )
-  create_single_source_cgal_program( "polytope_distance_d.cpp" )
-  create_single_source_cgal_program( "polytope_distance_d_fast_exact.cpp" )
-  create_single_source_cgal_program( "width_simplex.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Principal_component_analysis/CMakeLists.txt
deleted file mode 100644
index fc4678f..0000000
--- a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Principal_component_analysis_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "barycenter.cpp" )
-  create_single_source_cgal_program( "bounding_box.cpp" )
-  create_single_source_cgal_program( "centroid.cpp" )
-  create_single_source_cgal_program( "linear_least_squares_fitting_points_2.cpp" )
-  create_single_source_cgal_program( "linear_least_squares_fitting_triangles_3.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Profiling_tools/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Profiling_tools/CMakeLists.txt
deleted file mode 100644
index 5c081f2..0000000
--- a/3rdparty/CGAL-4.6/examples/Profiling_tools/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Profiling_tools_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Profile_counter.cpp" )
-  create_single_source_cgal_program( "Profile_histogram_counter.cpp" )
-  create_single_source_cgal_program( "Profile_timer.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/QP_solver/CMakeLists.txt
deleted file mode 100644
index bb80ac8..0000000
--- a/3rdparty/CGAL-4.6/examples/QP_solver/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( QP_solver_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "convex_hull_containment.cpp" )
-  create_single_source_cgal_program( "convex_hull_containment2.cpp" )
-  create_single_source_cgal_program( "convex_hull_containment_benchmarks.cpp" )
-  create_single_source_cgal_program( "cycling.cpp" )
-  create_single_source_cgal_program( "first_lp.cpp" )
-  create_single_source_cgal_program( "first_lp_from_iterators.cpp" )
-  create_single_source_cgal_program( "first_lp_from_mps.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_lp.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_lp_from_iterators.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_lp_from_mps.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_qp.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_qp_from_iterators.cpp" )
-  create_single_source_cgal_program( "first_nonnegative_qp_from_mps.cpp" )
-  create_single_source_cgal_program( "first_qp.cpp" )
-  create_single_source_cgal_program( "first_qp_basic_constraints.cpp" )
-  create_single_source_cgal_program( "first_qp_from_iterators.cpp" )
-  create_single_source_cgal_program( "first_qp_from_mps.cpp" )
-  create_single_source_cgal_program( "important_variables.cpp" )
-  create_single_source_cgal_program( "infeasibility_certificate.cpp" )
-  create_single_source_cgal_program( "invert_matrix.cpp" )
-  create_single_source_cgal_program( "optimality_certificate.cpp" )
-  create_single_source_cgal_program( "print_first_lp.cpp" )
-  create_single_source_cgal_program( "print_first_nonnegative_lp.cpp" )
-  create_single_source_cgal_program( "print_first_nonnegative_qp.cpp" )
-  create_single_source_cgal_program( "print_first_qp.cpp" )
-  create_single_source_cgal_program( "unboundedness_certificate.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/infeasibility_certificate.cpp b/3rdparty/CGAL-4.6/examples/QP_solver/infeasibility_certificate.cpp
deleted file mode 100644
index 72f3f95..0000000
--- a/3rdparty/CGAL-4.6/examples/QP_solver/infeasibility_certificate.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// example: extracting and verifying a proof of infeasibility from the solution
-#include <cassert>
-#include <CGAL/basic.h>
-#include <CGAL/QP_models.h>
-#include <CGAL/QP_functions.h>
-
-// choose exact integral type
-#ifdef CGAL_USE_GMP
-#include <CGAL/Gmpz.h>
-typedef CGAL::Gmpz ET;
-#else
-#include <CGAL/MP_Float.h>
-typedef CGAL::MP_Float ET;
-#endif
-
-// program and solution types
-typedef CGAL::Nonnegative_linear_program_from_iterators
-<int**,                                                // for A
- int*,                                                 // for b
- CGAL::Comparison_result*,                             // for r
- int*>                                                 // for c 
-Program;
-typedef CGAL::Quadratic_program_solution<ET> Solution;
-
-// we demonstrate Farkas Lemma: either the system 
-//     A x <= b
-//       x >= 0
-// has a solution, or there exists y such that
-//       y >= 0 
-//    y^TA >= 0 
-//    y^Tb <  0
-// In the following instance, the first system has no solution,
-// since adding up the two inequalities gives x_2 <= -1:
-//     x_1 - 2x_2  <=  1
-//    -x_1 + 3x_2  <= -2
-//     x_1,   x_2  >=  0
-
-int main() {
-  int  Ax1[] = { 1, -1};                        // column for x1
-  int  Ax2[] = {-2,  3};                        // column for x2
-  int*   A[] = {Ax1, Ax2};                      // A comes columnwise
-  int    b[] = {1, -2};                         // right-hand side
-  CGAL::Comparison_result 
-    r[] = {CGAL::SMALLER, CGAL::SMALLER};      // constraints are "<="
-  int    c[] = {0, 0};                         // zero objective function
-
-  // now construct the linear program; the first two parameters are
-  // the number of variables and the number of constraints (rows of A)
-  Program lp (2, 2, A, b, r, c);
-
-  // solve the program, using ET as the exact type
-  Solution s = CGAL::solve_nonnegative_linear_program(lp, ET());
-
-  // get certificate for infeasibility
-  assert (s.is_infeasible());
-  Solution::Infeasibility_certificate_iterator y = 
-    s.infeasibility_certificate_begin();
-  // check y >= 0
-  assert (y[0] >= 0);
-  assert (y[1] >= 0);
-  // check y^T A >= 0
-  assert (y[0] * A[0][0] + y[1] * A[0][1] >= 0);
-  assert (y[0] * A[1][0] + y[1] * A[1][1] >= 0);
-  // check y^T b < 0
-  assert (y[0] * b[0] + y[1] * b[1] < 0);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/unboundedness_certificate.cpp b/3rdparty/CGAL-4.6/examples/QP_solver/unboundedness_certificate.cpp
deleted file mode 100644
index 53e855e..0000000
--- a/3rdparty/CGAL-4.6/examples/QP_solver/unboundedness_certificate.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// example: extracting and verifying a proof of unboundedness from the solution
-#include <cassert>
-#include <CGAL/basic.h>
-#include <CGAL/QP_models.h>
-#include <CGAL/QP_functions.h>
-
-// choose exact integral type
-#ifdef CGAL_USE_GMP
-#include <CGAL/Gmpz.h>
-typedef CGAL::Gmpz ET;
-#else
-#include <CGAL/MP_Float.h>
-typedef CGAL::MP_Float ET;
-#endif
-
-// program and solution types
-typedef CGAL::Nonnegative_linear_program_from_iterators
-<int**,                                                // for A
- int*,                                                 // for b
- CGAL::Comparison_result*,                             // for r
- int*>                                                 // for c 
-Program;
-typedef CGAL::Quadratic_program_solution<ET> Solution;
-
-// we demonstrate the unboundedness certificate: either the feasible
-// linear program
-// min c^T x 
-//       A x <= b
-//         x >= 0
-// is bounded, or there exists w such that
-//         w >= 0
-//       A w <= 0
-//     c^t w <  0,
-// in which case the objective function becomes arbitrarily small
-// along the ray {x* + tw | t >= 0}, x* any feasible solution.
-// 
-// In the following instance, the linear program is unbounded, since
-// the ray {(t,t)| t>= 1} is feasible, and the objective function becomes
-// arbitrarily small on it:
-// min -x_1 - 2x_2 
-//      x_1 - 2x_2  <=  -1
-//     -x_1 +  x_2  <=   2
-//      x_1,   x_2  >=   0
-
-int main() {
-  int  Ax1[] = { 1, -1};                        // column for x1
-  int  Ax2[] = {-2,  1};                        // column for x2
-  int*   A[] = {Ax1, Ax2};                      // A comes columnwise
-  int    b[] = {-1, 2};                         // right-hand side
-  CGAL::Comparison_result 
-    r[] = {CGAL::SMALLER, CGAL::SMALLER};       // constraints are "<="
-  int    c[] = {-1, -2};                        // objective function
-
-  // now construct the linear program; the first two parameters are
-  // the number of variables and the number of constraints (rows of A)
-  Program lp (2, 2, A, b, r, c);
-
-  // solve the program, using ET as the exact type
-  Solution s = CGAL::solve_nonnegative_linear_program(lp, ET());
-
-  // get certificate for unboundedness
-  assert (s.is_unbounded());
-  Solution::Unboundedness_certificate_iterator w =
-    s.unboundedness_certificate_begin();
-  // check w >= 0
-  assert (w[0] >= 0);
-  assert (w[1] >= 0);
-  // check A w <= 0
-  assert (A[0][0] * w[0] + A[1][0] * w[1] <= 0);
-  assert (A[0][1] * w[0] + A[1][1] * w[1] <= 0);
-  // check c^T w < 0
-  assert (c[0] * w[0] + c[1] * w[1] < 0);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/CMakeLists.txt
deleted file mode 100644
index 70e2747..0000000
--- a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( RangeSegmentTrees_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-    include_directories (BEFORE "include")
-
-  create_single_source_cgal_program( "range_tree_1.cpp" )
-  create_single_source_cgal_program( "range_tree_2.cpp" )
-  create_single_source_cgal_program( "range_tree_3.cpp" )
-  create_single_source_cgal_program( "range_tree_4.cpp" )
-  create_single_source_cgal_program( "range_tree_map_2.cpp" )
-  create_single_source_cgal_program( "range_tree_set_2.cpp" )
-  create_single_source_cgal_program( "segment_tree_1.cpp" )
-  create_single_source_cgal_program( "segment_tree_2.cpp" )
-  create_single_source_cgal_program( "segment_tree_3.cpp" )
-  create_single_source_cgal_program( "segment_tree_4.cpp" )
-  create_single_source_cgal_program( "segment_tree_map_2.cpp" )
-  create_single_source_cgal_program( "segment_tree_set_2.cpp" )
-  create_single_source_cgal_program( "segment_tree_set_3.cpp" )
-  create_single_source_cgal_program( "software_design_rgs.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Rectangular_p_center_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Rectangular_p_center_2/CMakeLists.txt
deleted file mode 100644
index f2d1a23..0000000
--- a/3rdparty/CGAL-4.6/examples/Rectangular_p_center_2/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Rectangular_p_center_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "rectangular_p_center_2.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Ridges_3/CMakeLists.txt
deleted file mode 100644
index 9ac948d..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-project( Ridges_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL QUIET )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  # use either Eigen or BLAS/LAPACK
-  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
-  if (NOT EIGEN3_FOUND)
-    find_package(LAPACK)
-    if(LAPACK_FOUND)
-      include( ${LAPACK_USE_FILE} )
-    endif(LAPACK_FOUND)
-  else()
-    include( ${EIGEN3_USE_FILE} )
-  endif()
-  
-  
-  if(EIGEN3_FOUND OR LAPACK_FOUND)
-    # Link with Boost.ProgramOptions (optional)
-    find_package(Boost QUIET COMPONENTS program_options)
-    if(Boost_PROGRAM_OPTIONS_FOUND)
-      if( CGAL_AUTO_LINK_ENABLED )
-        message( STATUS "Boost.ProgramOptions library: found" )
-      else()
-        message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
-      endif()
-      add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
-      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
-   endif()
-
-   create_single_source_cgal_program( Compute_Ridges_Umbilics.cpp PolyhedralSurf.cpp)
-
-  else(EIGEN3_FOUND OR LAPACK_FOUND)
-
-    message(STATUS "NOTICE: This program requires either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
-
-  endif(EIGEN3_FOUND OR LAPACK_FOUND)
-
-else()
-  
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-  
-endif()
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/Compute_Ridges_Umbilics.cpp b/3rdparty/CGAL-4.6/examples/Ridges_3/Compute_Ridges_Umbilics.cpp
deleted file mode 100644
index 2795ef1..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/Compute_Ridges_Umbilics.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-
-//this is an enriched Polyhedron with facet normals
-#include "PolyhedralSurf.h"
-#include "PolyhedralSurf_rings.h"
-
-#include <CGAL/Ridges.h>
-#include <CGAL/Umbilics.h>
-#include <CGAL/Monge_via_jet_fitting.h>
-#include <fstream>
-#include <cassert>
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-#include <boost/program_options.hpp>
-namespace po = boost::program_options;
-#endif
-
-using namespace std;
-
-
-typedef PolyhedralSurf::Traits          Kernel;
-typedef Kernel::FT                      FT;
-typedef Kernel::Point_3                 Point_3;
-typedef Kernel::Vector_3                Vector_3;
-
-typedef PolyhedralSurf::Vertex_const_handle   Vertex_const_handle;
-typedef PolyhedralSurf::Vertex_const_iterator Vertex_const_iterator;
-
-typedef T_PolyhedralSurf_rings<PolyhedralSurf> Poly_rings;
-typedef CGAL::Monge_via_jet_fitting<Kernel>    Monge_via_jet_fitting;
-typedef Monge_via_jet_fitting::Monge_form      Monge_form;
-
-typedef CGAL::Vertex2Data_Property_Map_with_std_map<PolyhedralSurf> Vertex2Data_Property_Map_with_std_map;
-typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_map Vertex2FT_map;
-typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_map Vertex2Vector_map;
-typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_property_map Vertex2FT_property_map;
-typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_property_map Vertex2Vector_property_map;
-
-//RIDGES
-typedef CGAL::Ridge_line<PolyhedralSurf> Ridge_line;
-typedef CGAL::Ridge_approximation < PolyhedralSurf,
-				    Vertex2FT_property_map,
-				    Vertex2Vector_property_map > Ridge_approximation;
-//UMBILICS
-typedef CGAL::Umbilic<PolyhedralSurf> Umbilic;
-typedef CGAL::Umbilic_approximation < PolyhedralSurf,
-				      Vertex2FT_property_map,
-				      Vertex2Vector_property_map > Umbilic_approximation;
-
-//create property maps
-Vertex2FT_map vertex2k1_map, vertex2k2_map,
-  vertex2b0_map, vertex2b3_map,
-  vertex2P1_map, vertex2P2_map;
-Vertex2Vector_map vertex2d1_map, vertex2d2_map;
-
-Vertex2FT_property_map vertex2k1_pm(vertex2k1_map), vertex2k2_pm(vertex2k2_map),
-  vertex2b0_pm(vertex2b0_map), vertex2b3_pm(vertex2b3_map),
-  vertex2P1_pm(vertex2P1_map), vertex2P2_pm(vertex2P2_map),vertex2P2_p();
-Vertex2Vector_property_map vertex2d1_pm(vertex2d1_map), vertex2d2_pm(vertex2d2_map);
-
-// default fct parameter values and global variables
-unsigned int d_fitting = 3;
-unsigned int d_monge = 3;
-unsigned int nb_rings = 0;//seek min # of rings to get the required #pts
-unsigned int nb_points_to_use = 0;//
-CGAL::Ridge_order tag_order = CGAL::Ridge_order_3;
-double umb_size = 2;
-bool verbose = false;
-unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
-
-/* gather points around the vertex v using rings on the
-   polyhedralsurf. the collection of points resorts to 3 alternatives:
-   1. the exact number of points to be used
-   2. the exact number of rings to be used
-   3. nothing is specified
-*/
-void gather_fitting_points(Vertex_const_handle v,
-			   std::vector<Point_3> &in_points,
-			   Poly_rings& poly_rings)
-{
-  //container to collect vertices of v on the PolyhedralSurf
-  std::vector<Vertex_const_handle> gathered;
-  //initialize
-  in_points.clear();
-
-  //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect
-  //enough rings and discard some points of the last collected ring to
-  //get the exact "nb_points_to_use"
-  if ( nb_points_to_use != 0 ) {
-    poly_rings.collect_enough_rings(v, nb_points_to_use, gathered);//, vpm);
-    if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use);
-  }
-  else { // nb_points_to_use=0, this is the default and the option -p is not considered;
-    // then option -a nb_rings is checked. If nb_rings=0, collect
-    // enough rings to get the min_nb_points required for the fitting
-    // else collect the nb_rings required
-    if ( nb_rings == 0 )
-      poly_rings.collect_enough_rings(v, min_nb_points, gathered);//, vpm);
-    else poly_rings.collect_i_rings(v, nb_rings, gathered);//, vpm);
-  }
-
-  //store the gathered points
-  std::vector<Vertex_const_handle>::const_iterator
-    itb = gathered.begin(), ite = gathered.end();
-  CGAL_For_all(itb,ite) in_points.push_back((*itb)->point());
-}
-
-/* Use the jet_fitting package and the class Poly_rings to compute
-   diff quantities.
-*/
-void compute_differential_quantities(PolyhedralSurf& P, Poly_rings& poly_rings)
-{
-  //container for approximation points
-  std::vector<Point_3> in_points;
-
-  //MAIN LOOP
-  Vertex_const_iterator vitb = P.vertices_begin(), vite = P.vertices_end();
-  for (; vitb != vite; vitb++) {
-    //initialize
-    Vertex_const_handle v = vitb;
-    in_points.clear();
-    Monge_form monge_form;
-    Monge_via_jet_fitting monge_fit;
-
-    //gather points around the vertex using rings
-    gather_fitting_points(v, in_points, poly_rings);
-
-    //exit if the nb of points is too small
-    if ( in_points.size() < min_nb_points )
-      {std::cerr << "Too few points to perform the fitting" << std::endl; exit(1);}
-
-    //For Ridges we need at least 3rd order info
-    assert( d_monge >= 3);
-    // run the main fct : perform the fitting
-     monge_form = monge_fit(in_points.begin(), in_points.end(),
-			   d_fitting, d_monge);
-
-    //switch min-max ppal curv/dir wrt the mesh orientation
-    const Vector_3 normal_mesh = P.computeFacetsAverageUnitNormal(v);
-    monge_form.comply_wrt_given_normal(normal_mesh);
-
-    //Store monge data needed for ridge computations in property maps
-    vertex2d1_map[v] = monge_form.maximal_principal_direction();
-    vertex2d2_map[v] = monge_form.minimal_principal_direction();
-    vertex2k1_map[v] = monge_form.coefficients()[0];
-    vertex2k2_map[v] = monge_form.coefficients()[1];
-    vertex2b0_map[v] = monge_form.coefficients()[2];
-    vertex2b3_map[v] = monge_form.coefficients()[5];
-    if ( d_monge >= 4) {
-      //= 3*b1^2+(k1-k2)(c0-3k1^3)
-      vertex2P1_map[v] =
-	3*monge_form.coefficients()[3]*monge_form.coefficients()[3]
-	+(monge_form.coefficients()[0]-monge_form.coefficients()[1])
-	*(monge_form.coefficients()[6]
-	  -3*monge_form.coefficients()[0]*monge_form.coefficients()[0]
-	  *monge_form.coefficients()[0]);
-      //= 3*b2^2+(k2-k1)(c4-3k2^3)
-      vertex2P2_map[v] =
-	3*monge_form.coefficients()[4]*monge_form.coefficients()[4]
-	+(-monge_form.coefficients()[0]+monge_form.coefficients()[1])
-	*(monge_form.coefficients()[10]
-	  -3*monge_form.coefficients()[1]*monge_form.coefficients()[1]
-	  *monge_form.coefficients()[1]);
-    }
-  } //END FOR LOOP
-}
-
-
-///////////////MAIN///////////////////////////////////////////////////////
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-int main(int argc, char *argv[])
-#else
-int main()
-#endif
-{
-  std::string if_name, of_name;// of_name same as if_name with '/' -> '_'
-
-  try {
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-   unsigned int int_tag;
-   po::options_description desc("Allowed options");
-    desc.add_options()
-      ("help,h", "produce help message.")
-      ("input-file,f", po::value<string>(&if_name)->default_value("data/poly2x^2+y^2-0.062500.off"),
-       "name of the input off file")
-      ("degree-jet,d", po::value<unsigned int>(&d_fitting)->default_value(3),
-       "degree of the jet,  3 <= degre-jet <= 4")
-      ("degree-monge,m", po::value<unsigned int>(&d_monge)->default_value(3),
-       "degree of the Monge rep, 3<= degree-monge <= degree-jet")
-      ("nb-rings,a", po::value<unsigned int>(&nb_rings)->default_value(0),
-       "number of rings to collect neighbors. 0 means collect enough rings to make appro possible a>=1 fixes the nb of rings to be collected")
-      ("nb-points,p", po::value<unsigned int>(&nb_points_to_use)->default_value(0),
-       "number of neighbors to use.  0 means this option is not considered, this is the default p>=1 fixes the nb of points to be used")
-      ("ridge_order,t", po::value<unsigned int>(&int_tag)->default_value(3),
-       "Order of differential quantities used, must be 3 or 4")
-      ("umbilic-patch-size,u", po::value<double>(&umb_size)->default_value(2),
-       "size of umbilic patches (as multiple of 1ring size)")
-      ("verbose,v", po::value<bool>(&verbose)->default_value(false),
-       "verbose output on text file")
-      ;
-
-    po::variables_map vm;
-    po::store(po::parse_command_line(argc, argv, desc), vm);
-    po::notify(vm);
-
-    if (vm.count("help")) {
-      cout << desc << "\n";
-      return 1;
-    }
-
-
-    if (vm.count("ridge_order")){
-      if ( int_tag == 3 ) tag_order = CGAL::Ridge_order_3;
-      if ( int_tag == 4 ) tag_order = CGAL::Ridge_order_4;
-      if ( int_tag != 3 && int_tag != 4 )
-	{cerr << "ridge_order must be CGAL::Ridge_order_3 or CGAL::Ridge_order_4";
-	  return 1;}
-    }
-#else 
-    std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
-    if_name = "data/poly2x^2+y^2-0.062500.off";
-    d_fitting = 3;
-    d_monge = 3;
-    nb_rings = 0;
-    nb_points_to_use = 0;
-    umb_size = 2;
-    verbose = false;
-#endif
-  }
-
-    catch(exception& e) {
-    cerr << "error: " << e.what() << "\n";
-    return 1;
-    }
-    catch(...) {
-      cerr << "Exception of unknown type!\n";
-    }
-
-  //modify global variables
-  min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
-
-  //prepare output file names
-  assert(!if_name.empty());
-  of_name = if_name;
-  for(unsigned int i=0; i<of_name.size(); i++)
-    if (of_name[i] == '/') of_name[i]='_';
-  std::ostringstream str_4ogl;
-  str_4ogl << "data/"
-	   << of_name << "RIDGES"
-	   << "-d" << d_fitting
-	   << "-m" << d_monge
-	   << "-t" << tag_order
-	   << "-a" << nb_rings
-	   << "-p" << nb_points_to_use
-	   << ".4ogl.txt";
-  std::cout << str_4ogl.str() << std::endl ;
-  std::ofstream out_4ogl(str_4ogl.str().c_str() , std::ios::out);
-
-  //if verbose only...
-  std::ostringstream str_verb;
-  str_verb << "data/"
-	   << of_name << "RIDGES"
-	   << "-d" << d_fitting
-	   << "-m" << d_monge
-	   << "-t" << tag_order
-	   << "-a" << nb_rings
-	   << "-p" << nb_points_to_use
-	   << ".verb.txt";
-  std::cout << str_verb.str() << std::endl ;
-  std::ofstream out_verb(str_verb.str().c_str() , std::ios::out);
-
-  //load the model from <mesh.off>
-  PolyhedralSurf P;
-  std::ifstream stream(if_name.c_str());
-  stream >> P;
-  fprintf(stderr, "loadMesh %d Ves %d Facets\n",
-	  (int)P.size_of_vertices(), (int)P.size_of_facets());
-  if(verbose)
-    out_verb << "Polysurf with " << P.size_of_vertices()
-	     << " vertices and " << P.size_of_facets()
-	     << " facets. " << std::endl;
-
-  //exit if not enough points in the model
-  if (min_nb_points > P.size_of_vertices())
-    {std::cerr << "not enough points in the model" << std::endl;   exit(1);}
-
-  //initialize Polyhedral data : normal of facets
-  P.compute_facets_normals();
-
-  //create a Poly_rings object
-  Poly_rings poly_rings(P);
-
-  std::cout << "Compute differential quantities via jet fitting..." << std::endl;
-  //initialize the diff quantities property maps
-  compute_differential_quantities(P, poly_rings);
-
-  //---------------------------------------------------------------------------
-  //Ridges
-  //--------------------------------------------------------------------------
-  std::cout << "Compute ridges..." << std::endl;
-  Ridge_approximation ridge_approximation(P,
-					  vertex2k1_pm, vertex2k2_pm,
-					  vertex2b0_pm, vertex2b3_pm,
-					  vertex2d1_pm, vertex2d2_pm,
-					  vertex2P1_pm, vertex2P2_pm );
-  std::vector<Ridge_line*> ridge_lines;
-  back_insert_iterator<std::vector<Ridge_line*> > ii(ridge_lines);
-
-  //Find MAX_RIDGE, MIN_RIDGE, CREST_RIDGES
-  //   ridge_approximation.compute_max_ridges(ii, tag_order);
-  //   ridge_approximation.compute_min_ridges(ii, tag_order);
-  ridge_approximation.compute_crest_ridges(ii, tag_order);
-
-  // or with the global function
-  CGAL::compute_max_ridges(P,
-			   vertex2k1_pm, vertex2k2_pm,
-			   vertex2b0_pm, vertex2b3_pm,
-			   vertex2d1_pm, vertex2d2_pm,
-			   vertex2P1_pm, vertex2P2_pm,
-			   ii, tag_order);
-
-  std::vector<Ridge_line*>::iterator iter_lines = ridge_lines.begin(),
-    iter_end = ridge_lines.end();
-  //OpenGL output
-  for (;iter_lines!=iter_end;iter_lines++) (*iter_lines)->dump_4ogl(out_4ogl);
-
-
-  for (iter_lines = ridge_lines.begin();iter_lines!=iter_end;iter_lines++){
-    //verbose txt output
-    if (verbose){
-      out_verb << **iter_lines;
-    }
-    delete *iter_lines;
-    }
-
-  //---------------------------------------------------------------------------
-  // UMBILICS
-  //--------------------------------------------------------------------------
-  std::cout << "Compute umbilics..." << std::endl;
-  std::vector<Umbilic*> umbilics;
-  back_insert_iterator<std::vector<Umbilic*> > umb_it(umbilics);
-
-  //explicit construction of the class
- //  Umbilic_approximation umbilic_approximation(P,
-// 					      vertex2k1_pm, vertex2k2_pm,
-// 					      vertex2d1_pm, vertex2d2_pm);
-//   umbilic_approximation.compute(umb_it, umb_size);
-  //or global function call
-  CGAL::compute_umbilics(P,
-			 vertex2k1_pm, vertex2k2_pm,
-			 vertex2d1_pm, vertex2d2_pm,
-			 umb_it, umb_size);
-
-  std::vector<Umbilic*>::iterator iter_umb = umbilics.begin(),
-    iter_umb_end = umbilics.end();
-  // output
-  std::cout << "nb of umbilics " << umbilics.size() << std::endl;
-  for (;iter_umb!=iter_umb_end;iter_umb++) std::cout << **iter_umb;
-
-  //verbose txt output
-  if (verbose) {
-    out_verb << "nb of umbilics " << umbilics.size() << std::endl;
-  }
-  for ( iter_umb = umbilics.begin();iter_umb!=iter_umb_end;iter_umb++){
-    if (verbose) {
-      out_verb << **iter_umb;
-    }
-    delete *iter_umb;
-  }
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.cpp b/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.cpp
deleted file mode 100644
index 8e6a6da..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "PolyhedralSurf.h"
-
-void PolyhedralSurf::compute_facets_normals()
-{
-  std::for_each(this->facets_begin(), this->facets_end(),
-		Facet_unit_normal());
-}
-
-const Vector_3 PolyhedralSurf::computeFacetsAverageUnitNormal(const Vertex_const_handle v)
-{
-  Halfedge_const_handle h;
-  Facet_const_handle f;
-  Vector_3 sum(0., 0., 0.), n;
-
-  Halfedge_around_vertex_const_circulator
-    hedgeb = v->vertex_begin(), hedgee = hedgeb;
-
-  do
-    {
-      h = hedgeb;
-      if (h->is_border_edge())
-	{
-	  hedgeb++;
-	  continue;
-	}
-
-      f =  h->facet();
-      n = f->getUnitNormal();
-      sum = (sum + n);
-      hedgeb++;
-    }
-  while (hedgeb != hedgee);
-  sum = sum / std::sqrt(sum * sum);
-  return sum;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.h b/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.h
deleted file mode 100644
index 9b2ecb0..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef CGAL_POLYHEDRALSURF_H_
-#define CGAL_POLYHEDRALSURF_H_
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <algorithm>
-#include <vector>
-#include <list>
-
-
-#include "PolyhedralSurf_operations.h"
-
-//----------------------------------------------------------------
-// A redefined items class for the Polyhedron_3 with
-// a refined facet with a normal vector
-//---------------------------------------------------------------
-
-//----------------------------------------------------------------
-// Facet with normal and possibly more types. types are recovered
-//from the FGeomTraits template arg
-//----------------------------------------------------------------
-template < class Refs, class Tag, class FGeomTraits >
-class My_facet:public CGAL::HalfedgeDS_face_base < Refs, Tag >
-{
-public:
- typedef typename FGeomTraits::Vector_3 Vector_3;
-
-protected:
-  Vector_3 normal;
-public:
-  My_facet() {}
-  const Vector_3 & getUnitNormal() const { return normal; }
-  void setNormal(Vector_3 n) { normal = n; }
-};
-
-//------------------------------------------------
-// Wrappers [Vertex, Face, Halfedge]
-//------------------------------------------------
-struct Wrappers_VFH:public CGAL::Polyhedron_items_3 {
-  // wrap face
-  //NOTE: [HDS, Face] renamed [Polyhedron, Facet]
-  template < class Refs, class Traits > struct Face_wrapper {
-    //typedef typename Traits::Vector_3 Vector_3;
-    //all types needed by the facet...
-    typedef struct {
-    public:
-       typedef typename Traits::Vector_3 Vector_3;
-     } FGeomTraits;
-    //custom type instantiated...
-    typedef My_facet < Refs, CGAL::Tag_true, FGeomTraits > Face;
-  };
-};
-
-//------------------------------------------------
-//PolyhedralSurf with facet normal operations
-//------------------------------------------------
-typedef double                FT;
-typedef CGAL::Simple_cartesian<FT>  Kernel;
-typedef CGAL::Polyhedron_3 < Kernel, Wrappers_VFH > Polyhedron;
-typedef Kernel::Vector_3 Vector_3;
-
-class PolyhedralSurf:public Polyhedron {
-public:
-  PolyhedralSurf() {}
-  void compute_facets_normals();
-  const Vector_3 computeFacetsAverageUnitNormal(const Vertex_const_handle v);
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_operations.h b/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_operations.h
deleted file mode 100644
index 0c8d80a..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_operations.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef CGAL_POLY_OP_H_
-#define CGAL_POLY_OP_H_
-
-//the facet stores the normal
-struct Facet_unit_normal {
-  template < class Facet >
-  void operator() (Facet & f)
-    {
-      typename Facet::Halfedge_handle h = f.halfedge();
-      typename Facet::Vector_3 normal =
-	CGAL::cross_product(h->vertex()->point() -
-			    h->opposite()->vertex()->point(),
-			    h->next()->vertex()->point() -
-			    h->opposite()->vertex()->point());
-      f.setNormal( normal / CGAL::sqrt(normal * normal));
-    }
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_rings.h b/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_rings.h
deleted file mode 100644
index 8102d5f..0000000
--- a/3rdparty/CGAL-4.6/examples/Ridges_3/PolyhedralSurf_rings.h
+++ /dev/null
@@ -1,172 +0,0 @@
-#ifndef CGAL_PSURF_RINGS_H_
-#define CGAL_PSURF_RINGS_H_
-
-#include <cassert>
-#include <vector>
-#include <map>
-
-using namespace std;
-
-//---------------------------------------------------------------------------
-//T_PolyhedralSurf_rings
-//---------------------------------------------------------------------------
-template < class TPoly > class T_PolyhedralSurf_rings
-{
-protected:
-  //Polyhedron
-  typedef typename TPoly::Vertex_const_handle                     Vertex_const_handle;
-  typedef typename TPoly::Halfedge_const_handle                   Halfedge_const_handle;
-  typedef typename TPoly::Facet_const_handle                      Facet_const_handle;
-  typedef typename TPoly::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator;
-  typedef typename TPoly::Vertex_const_iterator                   Vertex_const_iterator;
-
-  //tag to visit vertices
-  struct Vertex_cmp{//comparison is wrt vertex addresses
-    bool operator()(Vertex_const_handle a,  Vertex_const_handle b) const{
-      return &*a < &*b;
-    }
-  };
-  typedef std::map<Vertex_const_handle, int, Vertex_cmp> Vertex2int_map;
-  Vertex2int_map ring_index_map;
-
-  //vertex indices are initialised to -1
-  void reset_ring_indices(std::vector <Vertex_const_handle> &vces);
-
-  //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors
-  //of start in the nextRing and set indices to i. Also add these vertices in all.
-  void push_neighbours_of(const Vertex_const_handle start, const int ith,
-			  std::vector < Vertex_const_handle > &nextRing,
-			  std::vector < Vertex_const_handle > &all);
-
-  //i >= 1, from a currentRing i-1, collect all neighbors, set indices
-  //to i and store them in nextRing and all.
-  void collect_ith_ring(const int ith,
-			std::vector < Vertex_const_handle > &currentRing,
-			std::vector < Vertex_const_handle > &nextRing,
-			std::vector < Vertex_const_handle > &all);
-
- public:
-  T_PolyhedralSurf_rings(const TPoly& P);
-
-  //collect i>=1 rings : all neighbours up to the ith ring,
-  void collect_i_rings(const Vertex_const_handle v,
-		       const int ring_i,
-		       std::vector < Vertex_const_handle >& all);
-
-  //collect enough rings (at least 1), to get at least min_nb of neighbors
-  void collect_enough_rings(const Vertex_const_handle v,
-			    const unsigned int min_nb,
-			    std::vector < Vertex_const_handle >& all);
-};
-
-////IMPLEMENTATION/////////////////////////////////////////////////////////////////////
-
-template < class TPoly >
-T_PolyhedralSurf_rings <TPoly>::
-T_PolyhedralSurf_rings(const TPoly& P)
-{
-  //init the ring_index_map
-  Vertex_const_iterator itb = P.vertices_begin(), ite = P.vertices_end();
-  for(;itb!=ite;itb++) ring_index_map[itb] = -1;
-}
-
-template < class TPoly >
-void T_PolyhedralSurf_rings <TPoly>::
-push_neighbours_of(const Vertex_const_handle start, const int ith,
-		   std::vector < Vertex_const_handle > &nextRing,
-		   std::vector < Vertex_const_handle > &all)
-{
-  Vertex_const_handle v;
-  Halfedge_around_vertex_const_circulator
-    hedgeb = start->vertex_begin(), hedgee = hedgeb;
-
- CGAL_For_all(hedgeb, hedgee)
-  {
-    v = hedgeb->opposite()->vertex();
-    if (ring_index_map[v] != -1)  continue;//if visited: next
-
-    ring_index_map[v] = ith;
-    nextRing.push_back(v);
-    all.push_back(v);
-  }
-}
-
-template <class TPoly>
-void T_PolyhedralSurf_rings <TPoly>::
-collect_ith_ring(const int ith, std::vector < Vertex_const_handle > &currentRing,
-		 std::vector < Vertex_const_handle > &nextRing,
-		 std::vector < Vertex_const_handle > &all)
-{
-  typename std::vector < Vertex_const_handle >::const_iterator
-    itb = currentRing.begin(), ite = currentRing.end();
-
-  CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all);
-}
-
-template <class TPoly>
-  void T_PolyhedralSurf_rings <TPoly>::
-reset_ring_indices(std::vector < Vertex_const_handle >&vces)
-{
-  typename std::vector < Vertex_const_handle >::const_iterator
-    itb = vces.begin(), ite = vces.end();
-  CGAL_For_all(itb, ite)  ring_index_map[*itb] = -1;
-}
-
-template <class TPoly>
-  void T_PolyhedralSurf_rings <TPoly>::
-collect_i_rings(const Vertex_const_handle v,
-		const int ring_i,
-		std::vector < Vertex_const_handle >& all)
-{
-  std::vector<Vertex_const_handle> current_ring, next_ring;
-  std::vector<Vertex_const_handle> *p_current_ring, *p_next_ring;
-  assert(ring_i >= 1);
-  //initialize
-  p_current_ring = &current_ring;
-  p_next_ring = &next_ring;
-  ring_index_map[v] = 0;
-  current_ring.push_back(v);
-  all.push_back(v);
-
-  for (int i=1; i<=ring_i; i++)
-    {
-      collect_ith_ring(i, *p_current_ring, *p_next_ring, all);
-      //next round must be launched from p_nextRing...
-      p_current_ring->clear();
-      std::swap(p_current_ring, p_next_ring);
-    }
-  //clean up
-  reset_ring_indices(all);
-}
-
-template <class TPoly>
-  void T_PolyhedralSurf_rings <TPoly>::
-collect_enough_rings(const Vertex_const_handle v,
-		     const unsigned int min_nb,
-		     std::vector < Vertex_const_handle >& all)
-{
-  std::vector<Vertex_const_handle> current_ring, next_ring;
-  std::vector<Vertex_const_handle> *p_current_ring, *p_next_ring;
-
-  //initialize
-  p_current_ring = &current_ring;
-  p_next_ring = &next_ring;
-  ring_index_map[v] = 0;
-  current_ring.push_back(v);
-  all.push_back(v);
-
-  int i = 1;
-
-  while ( (all.size() < min_nb) &&  (p_current_ring->size() != 0) )
-    {
-      collect_ith_ring(i, *p_current_ring, *p_next_ring, all);
-      //next round must be launched from p_nextRing...
-      p_current_ring->clear();
-      std::swap(p_current_ring, p_next_ring);
-      i++;
-    }
-  //clean up
-  reset_ring_indices(all);
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/STL_Extension/CMakeLists.txt
deleted file mode 100644
index a0a6b0c..0000000
--- a/3rdparty/CGAL-4.6/examples/STL_Extension/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( STL_Extension_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Default.cpp" )
-  create_single_source_cgal_program( "Dispatch_output_iterator.cpp" )
-  create_single_source_cgal_program( "in_place_list_prog.cpp" )
-  create_single_source_cgal_program( "min_element_if_example.cpp" )
-  create_single_source_cgal_program( "min_max_element_example.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/CMakeLists.txt
deleted file mode 100644
index 658bbd1..0000000
--- a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-project( Scale_space )
-
-# Check CMake version
-cmake_minimum_required( VERSION 2.6.2 )
-if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6 )
-  if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3 )
-    cmake_policy( VERSION 2.8.4 )
-  else()
-    cmake_policy( VERSION 2.6 )
-  endif()
-endif()
-
-find_package( CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-  include( ${CGAL_USE_FILE} )
-
-  # Activate concurrency?
-  option(ACTIVATE_CONCURRENCY
-         "Enable concurrency"
-         ON)
- 
-  if( ACTIVATE_CONCURRENCY )
-    find_package( TBB )
-    if( TBB_FOUND )
-      include( ${TBB_USE_FILE} )
-      list( APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES} )
-    else()
-      message( STATUS "NOTICE: Intel TBB NOT found! The example is faster if TBB is linked." )
-    endif()
-  endif()
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  find_package( Eigen3 3.1.0 )
-  if( EIGEN3_FOUND )
-    include( ${EIGEN3_USE_FILE} )
-    create_single_source_cgal_program( "scale_space.cpp" )
-    create_single_source_cgal_program( "scale_space_incremental.cpp" )
-  else()
-    message( STATUS "NOTICE: The example needs Eigen 3.1 (or greater) and will not be compiled." )
-  endif()
-else()
-  
-  message( STATUS "This program requires the CGAL library, and will not be compiled." )
-  
-endif()
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cpp b/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cpp
deleted file mode 100644
index 7bf1187..0000000
--- a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <fstream>
-#include <iostream>
-
-#include <CGAL/Scale_space_surface_reconstruction_3.h>
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <CGAL/IO/read_off_points.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel     Kernel;
-
-typedef CGAL::Scale_space_surface_reconstruction_3< Kernel >    Reconstruction;
-
-typedef Reconstruction::Point                                   Point;
-typedef std::vector< Point >                                    Point_collection;
-
-typedef Reconstruction::Triple_const_iterator                   Triple_iterator;
-
-int main(int argc, char* argv[]) {
-    if (argc!=2){
-      std::cerr << "Error, no input file provided\n";
-      return 1;
-    }
-    // Read the data.
-    Point_collection points;
-    std::ifstream in(argv[1]);
-    std::cerr << "Reading " << std::flush;
-    if( !in || !CGAL::read_off_points( in, std::back_inserter( points ) ) ) {
-        std::cerr << "Error: cannot read file" << std::endl;
-        return EXIT_FAILURE;
-    }
-	std::cerr << "done: " << points.size() << " points." << std::endl;
-
-	// Construct the mesh in a scale space.
-	Reconstruction reconstruct( 10, 200 );
-	reconstruct.reconstruct_surface( points.begin(), points.end(), 4 );
-    std::cerr << "Reconstruction done:" << std::endl;
-    
-    // Write the reconstruction.
-    std::cerr << "Neighborhood radius^2 = " << reconstruct.neighborhood_squared_radius() << std::endl;
-    for( std::size_t shell = 0; shell < reconstruct.number_of_shells(); ++shell ) {
-        std::cerr << "Shell " << shell << std::endl;
-        for( Triple_iterator it = reconstruct.shell_begin( shell ); it != reconstruct.shell_end( shell ); ++it )
-          std::cout << "3 "<< *it << std::endl; // We write a '3' in front so that it can be assembled into an OFF file
-    }
-
-	std::cerr << "Done." << std::endl;
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/CMakeLists.txt
deleted file mode 100644
index b0d0f10..0000000
--- a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Segment_Delaunay_graph_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "sdg-count-sites.cpp" )
-  create_single_source_cgal_program( "sdg-fast-sp-polygon.cpp" )
-  create_single_source_cgal_program( "sdg-fast-sp.cpp" )
-  create_single_source_cgal_program( "sdg-filtered-traits.cpp" )
-  create_single_source_cgal_program( "sdg-info-set.cpp" )
-  create_single_source_cgal_program( "sdg-red-blue-info.cpp" )
-  create_single_source_cgal_program( "sdg-voronoi-edges.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp b/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp
deleted file mode 100644
index 14628b3..0000000
--- a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-#include <CGAL/Random.h>
-
-// example that shows how to add info to input sites and how this is
-// propagated using the storage traits with info
-//
-// the input sites are considered to be colored either red of blue;
-// points on the plane belonging to sites of different colors become
-// purple.
-
-// standard includes
-#include <iostream>
-#include <fstream>
-#include <cassert>
-
-// an enum representing the color
-enum Red_blue {
-  RED = 1,
-  BLUE = 2,
-  PURPLE = 3
-};
-
-// output operator for the color
-std::ostream&
-operator<<(std::ostream& os, const Red_blue& rb)
-{
-  if ( rb == RED ) { os << "Red"; }
-  else if ( rb == BLUE ) { os << "Blue"; }
-  else if ( rb == PURPLE ) { os << "Purple"; }
-  return os;
-}
-
-// functor that defines how to convert color info when:
-// 1. constructing the storage site of an endpoint of a segment
-// 2. a segment site is split into two sub-segments
-struct Red_blue_convert_info
-{
-  typedef Red_blue      Info;
-  typedef const Info&   result_type;
-
-  inline
-  const Info& operator()(const Info& info0, bool) const {
-    // just return the info of the supporting segment
-    return info0;
-  }
-
-  inline
-  const Info& operator()(const Info& info0, const Info& , bool) const {
-    // just return the info of the supporting segment
-    return info0;
-  }
-};
-
-
-// functor that defines how to merge color info when a site (either
-// point or segment) corresponds to point(s) on plane belonging to
-// more than one input site
-struct Red_blue_merge_info
-{
-  typedef Red_blue   Info;
-  typedef Info       result_type;
-
-  inline
-  Info operator()(const Info& info0, const Info& info1) const {
-    // if the two sites defining the new site have the same info, keep
-    // this common info
-    if ( info0 == info1 ) { return info0; }
-    // otherwise the new site should be purple
-    return PURPLE;
-  }
-};
-
-
-// choose the kernel
-#include <CGAL/Simple_cartesian.h>
-
-struct Rep : public CGAL::Simple_cartesian<double> {};
-
-// typedefs for the geometric traits, storage traits and the algorithm
-#include <CGAL/Segment_Delaunay_graph_2.h>
-#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
-#include <CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h>
-
-
-typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<Rep> Gt;
-
-// define the storage traits with info
-typedef
-CGAL::Segment_Delaunay_graph_storage_traits_with_info_2<Gt,
-							Red_blue,
-							Red_blue_convert_info,
-							Red_blue_merge_info>
-ST;
-
-typedef CGAL::Segment_Delaunay_graph_2<Gt,ST>  SDG2;
-
-typedef SDG2::Finite_vertices_iterator  FVIT;
-typedef SDG2::Site_2                    Site_2;
-
-
-int main()
-{
-
-  std::ifstream ifs("data/sitesxx.rb.cin");
-  assert( ifs );
-
-  SDG2 sdg;
-  Site_2 site;
-
-  // read the sites and their info and insert them in the
-  // segment Delaunay graph; print them as you read them
-  std::cout << std::endl;
-  std::cout << "Input sites:" << std::endl;
-  std::cout << "------------" << std::endl;
-  while ( ifs >> site ) {
-    char c;
-    ifs >> c;
-    Red_blue info = (c == 'r') ? RED : BLUE;
-    std::cout << site << std::flush;
-    std::cout << "\r\t\t\t" << info << std::endl;
-    sdg.insert(site, info);
-  }
-  std::cout << std::endl;
-
-  // validate the segment Delaunay graph
-  assert( sdg.is_valid(true, 1) );
-
-  // print the sites of the segment Delaunay graph and their info
-  std::cout << std::endl << std::endl;
-  std::cout << "Output sites:" << std::endl;
-  std::cout << "-------------" << std::endl;
-  for (FVIT it = sdg.finite_vertices_begin();
-       it != sdg.finite_vertices_end(); ++it) {
-    std::cout << it->site() << std::flush;
-    std::cout << "\r\t\t\t" << it->storage_site().info() << std::endl;
-  }
-  std::cout << std::endl;
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Skin_surface_3/CMakeLists.txt
deleted file mode 100644
index 09f2874..0000000
--- a/3rdparty/CGAL-4.6/examples/Skin_surface_3/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-project( Skin_surface_3_example ) 
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-find_package(CGAL)
-
-
-
-
-if (CGAL_FOUND)
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE include)
-
-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/NGHK_skin_surface_simple.cpp")
-    # The two following .cpp files are in dont_submit, and thus not in the
-    # internal releases.
-    create_single_source_cgal_program( "NGHK_skin_surface_simple.cpp" )
-    create_single_source_cgal_program( "NGHK_skin_surface_subdiv.cpp" )
-  endif()
-  create_single_source_cgal_program( "skin_surface_simple.cpp" )
-  create_single_source_cgal_program( "skin_surface_subdiv.cpp" )
-  create_single_source_cgal_program( "skin_surface_subdiv_with_normals.cpp" )
-  create_single_source_cgal_program( "union_of_balls_simple.cpp" )
-  create_single_source_cgal_program( "union_of_balls_subdiv.cpp" )  
-  
-  find_package(ESBTL)
-  if(ESBTL_FOUND)
-    include_directories( ${ESBTL_INCLUDE_DIR} )
-    create_single_source_cgal_program( "skin_surface_pdb_reader.cpp" )    
-  else(ESBTL_FOUND)
-    message(STATUS "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled.")  
-  endif(ESBTL_FOUND)
-
-else(CGAL_FOUND)
-
-  message(STATUS "NOTICE: This directory requires CGAL library, and will not be compiled.")
-
-endif(CGAL_FOUND)
diff --git a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Snap_rounding_2/CMakeLists.txt
deleted file mode 100644
index 526cc17..0000000
--- a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Snap_rounding_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "snap_rounding.cpp" )
-  create_single_source_cgal_program( "snap_rounding_data.cpp" )
-  create_single_source_cgal_program( "snap_rounding_to_integer.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Spatial_searching/CMakeLists.txt
deleted file mode 100644
index a0d7487..0000000
--- a/3rdparty/CGAL-4.6/examples/Spatial_searching/CMakeLists.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-# Created by the script cgal_create_CMakeLists
-# This is the CMake script for compiling a set of CGAL applications.
-
-project( Spatial_searching )
-
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
- 
-if ( COMMAND cmake_policy )
-
-  cmake_policy( SET CMP0003 NEW )  
-
-endif()
-
-# CGAL and its components
-find_package( CGAL QUIET COMPONENTS  )
-
-if ( NOT CGAL_FOUND )
-
-  message(STATUS "This project requires the CGAL library, and will not be compiled.")
-  return()  
-
-endif()
-
-# include helper file
-include( ${CGAL_USE_FILE} )
-            
-find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
-if (EIGEN3_FOUND)
-  include( ${EIGEN3_USE_FILE} )
-endif()
-
-if (MSVC)
-    # Turn off VC++ warning
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244")
-endif()
-
-
-# include for local directory
-
-# include for local package
-include_directories( BEFORE ../../include )
-
-
-# Creating entries for all .cpp/.C files with "main" routine
-# ##########################################################
-
-include( CGAL_CreateSingleSourceCGALProgram )
-
-create_single_source_cgal_program( "circular_query.cpp" )
-
-create_single_source_cgal_program( "distance_browsing.cpp" )
-
-create_single_source_cgal_program( "iso_rectangle_2_query.cpp" )
-
-create_single_source_cgal_program( "nearest_neighbor_searching.cpp" )
-
-create_single_source_cgal_program( "searching_with_circular_query.cpp" )
-
-create_single_source_cgal_program( "searching_with_point_with_info.cpp" )
-
-create_single_source_cgal_program( "searching_with_point_with_info_inplace.cpp" )
-
-create_single_source_cgal_program( "searching_with_point_with_info_pmap.cpp" )
-
-create_single_source_cgal_program( "searching_surface_mesh_vertices.cpp" )
-
-create_single_source_cgal_program( "searching_polyhedron_vertices.cpp" )
-
-create_single_source_cgal_program( "user_defined_point_and_distance.cpp" )
-
-create_single_source_cgal_program( "using_fair_splitting_rule.cpp" )
-
-create_single_source_cgal_program( "weighted_Minkowski_distance.cpp" )
-
-
-
-if (EIGEN3_FOUND)
-
-  create_single_source_cgal_program( "fuzzy_range_query.cpp" )
-
-  create_single_source_cgal_program( "general_neighbor_searching.cpp" )
-
-else()
-
-  message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp")
-  message(STATUS "will not be compiled as they use CGAL::Epick_d which requires the Eigen library.")
-
-endif()
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_circular_query.cpp b/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_circular_query.cpp
deleted file mode 100644
index 10e0cdd..0000000
--- a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_circular_query.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Kd_tree.h>
-#include <CGAL/Search_traits_2.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/algorithm.h>
-#include <CGAL/Fuzzy_sphere.h>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef K::Point_2 Point;
-typedef CGAL::Random_points_in_square_2<Point> Random_points_iterator;
-typedef CGAL::Counting_iterator<Random_points_iterator> N_Random_points_iterator;
-typedef CGAL::Search_traits_2<K> Traits;
-typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_circle;
-typedef CGAL::Kd_tree<Traits> Tree;
-typedef CGAL::Random Random;
-
-int main() {
-
-  const int N=1000;
-
-  // generator for random data points in the square ( (-1,-1), (1,1) )
-  Random rnd(0);
-  Random_points_iterator rpit(1.0, rnd);
-
-  // Insert also the N points in the tree
-  Tree tree(N_Random_points_iterator(rpit,0),
-			      N_Random_points_iterator(N));
-
-  // define exact circular range query
-  Point center(0.2, 0.2);
-  Fuzzy_circle exact_range(center, 0.2);
-
-  std::list<Point> result;
-  tree.search(std::back_inserter( result ), exact_range);
-
-  std::cout << "\nPoints in cirle with center " << center << " and radius 0.2" << std::endl;
-
-  std::list<Point>::iterator it;
-  for (it=result.begin(); (it != result.end()); ++it) {
-    std::cout << *it << std::endl;
-  }
-
-  result.clear();
-  // approximate range searching using value 0.1 for fuzziness parameter
-  Fuzzy_circle approximate_range(center, 0.2, 0.1);
-
-  tree.search(std::back_inserter( result ), approximate_range);
-
-  std::cout << "\n\nPoints in cirle with center " << center << " and fuzzy radius [0.1,0.3]" << std::endl;
-
-  for (it=result.begin(); (it != result.end()); ++it) {
-    std::cout << *it << std::endl;
-  }
-  std::cout << "\ndone" << std::endl;
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Spatial_sorting/CMakeLists.txt
deleted file mode 100644
index 21deb62..0000000
--- a/3rdparty/CGAL-4.6/examples/Spatial_sorting/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Spatial_sorting_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "example_delaunay_2.cpp" )
-  create_single_source_cgal_program( "hilbert.cpp" )
-  create_single_source_cgal_program( "hilbert_policies.cpp" )
-  create_single_source_cgal_program( "myPoint.cpp" )
-  create_single_source_cgal_program( "small_example_delaunay_2.cpp" )
-  create_single_source_cgal_program( "sort_indices.cpp" )
-  create_single_source_cgal_program( "sp_sort_using_property_map_2.cpp" )
-  create_single_source_cgal_program( "sp_sort_using_property_map_3.cpp" )
-  create_single_source_cgal_program( "sp_sort_using_property_map_d.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/CMakeLists.txt
deleted file mode 100644
index 7ee09b4..0000000
--- a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Straight_skeleton_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "Create_offset_polygons_2.cpp" )
-  create_single_source_cgal_program( "Create_saop_from_polygon_with_holes_2.cpp" )
-  create_single_source_cgal_program( "Create_skeleton_and_offset_polygons_2.cpp" )
-  create_single_source_cgal_program( "Create_skeleton_and_offset_polygons_with_holes_2.cpp" )
-  create_single_source_cgal_program( "Create_straight_skeleton_2.cpp" )
-  create_single_source_cgal_program( "Create_straight_skeleton_from_polygon_with_holes_2.cpp" )
-  create_single_source_cgal_program( "Low_level_API.cpp" )
-  create_single_source_cgal_program( "Show_offset_polygon.cpp" )
-  create_single_source_cgal_program( "Show_straight_skeleton.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp b/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp
deleted file mode 100644
index fabe27e..0000000
--- a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include<vector>
-
-#include<boost/shared_ptr.hpp>
-
-#include<CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include<CGAL/Polygon_with_holes_2.h>
-#include<CGAL/create_offset_polygons_from_polygon_with_holes_2.h>
-
-#include "print.h"
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K ;
-
-typedef K::Point_2                    Point ;
-typedef CGAL::Polygon_2<K>            Polygon_2 ;
-typedef CGAL::Polygon_with_holes_2<K> PolygonWithHoles ;
-typedef CGAL::Straight_skeleton_2<K>  Ss ;
-
-typedef boost::shared_ptr<PolygonWithHoles> PolygonWithHolesPtr ;
-
-typedef std::vector<PolygonWithHolesPtr> PolygonWithHolesPtrVector;
-
-
-int main()
-{  
-  Polygon_2 outer ;  
-  
-  outer.push_back( Point( 0.0, 0.0) ) ;
-  outer.push_back( Point(10.0, 0.0) ) ;
-  outer.push_back( Point(10.0, 4.5) ) ;
-  outer.push_back( Point(12.0, 4.5) ) ;
-  outer.push_back( Point(12.0, 2.0) ) ;
-  outer.push_back( Point(16.0, 2.0) ) ;
-  outer.push_back( Point(16.0, 8.0) ) ;
-  outer.push_back( Point(12.0, 8.0) ) ;
-  outer.push_back( Point(12.0, 5.5) ) ;
-  outer.push_back( Point(10.0, 5.5) ) ;
-  outer.push_back( Point(10.0,10.0) ) ;
-  outer.push_back( Point( 0.0,10.0) ) ;
-  
-  Polygon_2 hole ;
-  
-  hole.push_back( Point(3.0,3.0) ) ;
-  hole.push_back( Point(3.0,7.0) ) ;
-  hole.push_back( Point(7.0,7.0) ) ;
-  hole.push_back( Point(7.0,3.0) ) ;
-    
-  PolygonWithHoles poly( outer ) ;
-  
-  poly.add_hole( hole ) ;
-      
-  double lOffset = 1 ;
-
-  PolygonWithHolesPtrVector offset_poly_with_holes = CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2(lOffset,poly);
-  
-  print_polygons_with_holes(offset_poly_with_holes);
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/dump_to_eps.h b/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/dump_to_eps.h
deleted file mode 100644
index 8d81c95..0000000
--- a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/dump_to_eps.h
+++ /dev/null
@@ -1,171 +0,0 @@
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-
-namespace CGAL
-{
-
-template<class K>
-Bbox_2 bbox_2 ( Polygon_with_holes_2<K> const& aPolyWH )
-{
-  Bbox_2 rBbox = bbox_2(aPolyWH.outer_boundary().vertices_begin(), aPolyWH.outer_boundary().vertices_end());
-  
-  for ( typename Polygon_with_holes_2<K>::Hole_const_iterator hit = aPolyWH.holes_begin()
-      ; hit != aPolyWH.holes_end() 
-      ; ++ hit 
-      )
-    rBbox = rBbox + bbox_2(hit->vertices_begin(), hit->vertices_end());
-    
-  return rBbox ;
-}
-
-}
-
-template<class K>
-void dump_to_eps( CGAL::Polygon_2<K> const& aPoly, char const* aType, double aScale, std::ostream& rOut )
-{
-  typedef typename CGAL::Polygon_2<K>::const_iterator vertex_const_iterator ;
-    
-  vertex_const_iterator begin = aPoly.vertices_begin() ;
-  vertex_const_iterator end   = aPoly.vertices_end  () ;
-  vertex_const_iterator last  = end - 1 ;
-  
-  for( vertex_const_iterator curr = begin ; curr != end ; ++ curr )
-  {
-    vertex_const_iterator next = curr == last ? begin : curr + 1 ;
-    
-    rOut << aType << std::endl
-         << aScale * curr->x() 
-         << " " 
-         << aScale * curr->y()
-         << " "
-         << aScale * next->x()
-         << " "
-         << aScale * next->y() 
-         << " E\n";
-  }
-}
-
-template<class K>
-void dump_to_eps( CGAL::Polygon_with_holes_2<K> const& aPWH, char const* aType, double aScale, std::ostream& rOut )
-{
-  dump_to_eps(aPWH.outer_boundary(), aType, aScale, rOut ) ;
-      
-  for ( typename CGAL::Polygon_with_holes_2<K>::Hole_const_iterator hit = aPWH.holes_begin()
-      ; hit != aPWH.holes_end()
-      ; ++ hit
-      )
-    dump_to_eps(*hit, aType, aScale, rOut ) ;
-}
-
-template<class K>
-void dump_to_eps( CGAL::Straight_skeleton_2<K> const& aSkeleton, char const* aType, double aScale, std::ostream& rOut )
-{
-  typedef typename CGAL::Straight_skeleton_2<K>::Halfedge_const_iterator Halfedge_const_iterator ;
-  typedef typename CGAL::Straight_skeleton_2<K>::Halfedge_const_handle   Halfedge_const_handle ;
-  
-  for(Halfedge_const_iterator hit = aSkeleton.halfedges_begin(); hit != aSkeleton.halfedges_end(); ++hit)
-  {
-    Halfedge_const_handle h = hit ;
-
-    if( h->is_bisector() && ((h->id()%2)==0) && !h->has_infinite_time() && !h->opposite()->has_infinite_time() )
-    { 
-      rOut << aType << std::endl 
-           << aScale * h->vertex()->point().x() 
-           << " " 
-           << aScale * h->vertex()->point().y()
-           << " "
-           << aScale * h->opposite()->vertex()->point().x()
-           << " "
-           << aScale * h->opposite()->vertex()->point().y() 
-           << " E\n";
-    }
-  }
-}
-
-template<class K>
-void dump_to_eps ( CGAL::Polygon_with_holes_2<K> const&                                     aInput
-                 , std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K> > > const& aOutput
-                 , std::ostream&                                                            rOut
-                 ) 
-{
-  typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K> > > PolyWH_vector ;
-    
-  CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput);
-  
-  for( typename PolyWH_vector::const_iterator it = aOutput.begin() ; it != aOutput.end(); ++ it )
-    lBbox = lBbox + CGAL::bbox_2(**it);
-    
-  double lScale = 1000 / (lBbox.xmax() - lBbox.xmin()) ;
-
-  if ( lScale < 1 )
-    lScale = 1 ;
-    
-  rOut << "%!PS-Adobe-2.0 EPSF-2.0\n%%BoundingBox:" 
-       << static_cast<int>(std::floor(lScale* lBbox.xmin()-1)) 
-       << " " 
-       << static_cast<int>(std::floor(lScale* lBbox.ymin()-1)) 
-       << " "
-       << static_cast<int>(std::ceil(lScale*lBbox.xmax()+1)) 
-       << " " 
-       << static_cast<int>(std::ceil(lScale*lBbox.ymax()+1))
-       << std::endl;
-
-  rOut << "%%EndComments\n"
-          "gsave\n"
-          "1.0 setlinewidth\n"
-          "/input { 1 0 0 setrgbcolor } bind def\n"
-          "/input_w { 0.1 setlinewidth } bind def\n"
-          "/output { 0 1 0 setrgbcolor } bind def\n"
-          "/output_w { 0.1 setlinewidth } bind def\n"
-          "% stroke - x1 y1 x2 y2 E\n"
-          "/E {newpath moveto lineto stroke} bind def\n\n"  ;
-       
-  dump_to_eps(aInput,"input",lScale,rOut);
-   
-  for( typename PolyWH_vector::const_iterator it = aOutput.begin() ; it != aOutput.end(); ++ it )
-    dump_to_eps(**it,"output",lScale,rOut);
-   
-  rOut << "grestore\nshowpage" << std::endl;
-  
-}
-
-template<class K>
-void dump_to_eps ( CGAL::Polygon_with_holes_2<K> const& aInput
-                 , CGAL::Straight_skeleton_2<K>  const& aSkeleton
-                 , std::ostream&                        rOut
-                 ) 
-{
-  CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput);
-    
-  double lScale = 1000 / (lBbox.xmax() - lBbox.xmin()) ;
-
-  if ( lScale < 1 )
-    lScale = 1 ;
-    
-  rOut << "%!PS-Adobe-2.0 EPSF-2.0\n%%BoundingBox:" 
-       << static_cast<int>(std::floor(lScale* lBbox.xmin()-1)) 
-       << " " 
-       << static_cast<int>(std::floor(lScale* lBbox.ymin()-1)) 
-       << " "
-       << static_cast<int>(std::ceil(lScale*lBbox.xmax()+1)) 
-       << " " 
-       << static_cast<int>(std::ceil(lScale*lBbox.ymax()+1))
-       << std::endl;
-
-  rOut << "%%EndComments\n"
-          "gsave\n"
-          "1.0 setlinewidth\n"
-          "/input { 1 0 0 setrgbcolor } bind def\n"
-          "/input_w { 0.1 setlinewidth } bind def\n"
-          "/skeleton { 0 1 0 setrgbcolor } bind def\n"
-          "/skeleton_w { 0.1 setlinewidth } bind def\n"
-          "% stroke - x1 y1 x2 y2 E\n"
-          "/E {newpath moveto lineto stroke} bind def\n\n"  ;
-       
-  dump_to_eps(aInput,"input",lScale,rOut);
-   
-  dump_to_eps(aSkeleton,"skeleton",lScale,rOut);
-   
-  rOut << "grestore\nshowpage" << std::endl;
-  
-}
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/print.h b/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/print.h
deleted file mode 100644
index 832471a..0000000
--- a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/print.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-
-template<class K>
-void print_point ( CGAL::Point_2<K> const& p )
-{
-  std::cout << "(" << p.x() << "," << p.y() << ")" ;
-}
-
-template<class K>
-void print_polygon ( CGAL::Polygon_2<K> const& poly )
-{
-  typedef CGAL::Polygon_2<K> Polygon ;
-  
-  std::cout << "Polygon with " << poly.size() << " vertices" << std::endl ;
-  
-  for( typename Polygon::Vertex_const_iterator vi = poly.vertices_begin() ; vi != poly.vertices_end() ; ++ vi )
-  {
-    print_point(*vi); std::cout << std::endl ;
-  }  
-}
-
-template<class K>
-void print_polygons ( std::vector< boost::shared_ptr< CGAL::Polygon_2<K> > > const& polies )
-{
-  typedef std::vector< boost::shared_ptr< CGAL::Polygon_2<K> > > PolygonVector ;
-  
-  std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ;
-  
-  for( typename PolygonVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi )
-    print_polygon(**pi);
-}
-
-template<class K>
-void print_polygon_with_holes ( CGAL::Polygon_with_holes_2<K> const& polywh )
-{
-  typedef CGAL::Polygon_with_holes_2<K> PolygonWithHoles ;
-  
-  std::cout << "Polygon_with_holes having " << polywh.number_of_holes() << " holes" << std::endl ;
-  
-  print_polygon(polywh.outer_boundary());
-  
-  for( typename PolygonWithHoles::Hole_const_iterator hi = polywh.holes_begin() ; hi != polywh.holes_end() ; ++ hi )
-    print_polygon(*hi);
-}
-
-template<class K>
-void print_polygons_with_holes ( std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K> > > const& polies )
-{
-  typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K> > > PolygonWithHolesVector ;
-  
-  std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ;
-  
-  for( typename PolygonWithHolesVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi )
-    print_polygon_with_holes(**pi);
-}
-
-template<class K>
-void print_straight_skeleton( CGAL::Straight_skeleton_2<K> const& ss )
-{
-  typedef CGAL::Straight_skeleton_2<K> Ss ;
-  
-  typedef typename Ss::Vertex_const_handle     Vertex_const_handle ;
-  typedef typename Ss::Halfedge_const_handle   Halfedge_const_handle ;
-  typedef typename Ss::Halfedge_const_iterator Halfedge_const_iterator ;
-  
-  Halfedge_const_handle null_halfedge ;
-  Vertex_const_handle   null_vertex ;
-
-  std::cout << "Straight skeleton with " << ss.size_of_vertices() 
-            << " vertices, " << ss.size_of_halfedges()
-            << " halfedges and " << ss.size_of_faces()
-            << " faces" << std::endl ;
-            
-  for ( Halfedge_const_iterator i = ss.halfedges_begin(); i != ss.halfedges_end(); ++i )
-  {
-    print_point(i->opposite()->vertex()->point()) ;
-    std::cout << "->" ;
-    print_point(i->vertex()->point());
-    std::cout << " " << ( i->is_bisector() ? "bisector" : "contour" ) << std::endl;
-  }
-}
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Stream_lines_2/CMakeLists.txt
deleted file mode 100644
index c0c6cc5..0000000
--- a/3rdparty/CGAL-4.6/examples/Stream_lines_2/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Stream_lines_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "stl_regular_field.cpp" )
-  create_single_source_cgal_program( "stl_triangular_field.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Subdivision_method_3/CMakeLists.txt
deleted file mode 100644
index 0b1781d..0000000
--- a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Subdivision_method_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "CatmullClark_subdivision.cpp" )
-  create_single_source_cgal_program( "Customized_subdivision.cpp" )
-  create_single_source_cgal_program( "DooSabin_subdivision.cpp" )
-  create_single_source_cgal_program( "Loop_subdivision.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_mesh/CMakeLists.txt
deleted file mode 100644
index 2f8a933..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh/CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Surface_mesh_ )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "sm_aabbtree.cpp" )
-  create_single_source_cgal_program( "sm_bgl.cpp" )
-  create_single_source_cgal_program( "sm_circulators.cpp" )
-  create_single_source_cgal_program( "sm_do_intersect.cpp" )
-  create_single_source_cgal_program( "sm_iterators.cpp" )
-  create_single_source_cgal_program( "sm_kruskal.cpp" )
-  create_single_source_cgal_program( "sm_memory.cpp" )
-  create_single_source_cgal_program( "sm_properties.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_aabbtree.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_aabbtree.cpp
deleted file mode 100644
index b76bbfc..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_aabbtree.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-#include <iostream>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-#include <CGAL/Surface_mesh.h>
-#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
-#include <CGAL/boost/graph/properties_Surface_mesh.h>
-#include <CGAL/boost/graph/Euler_operations.h>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef K::Point_3 Point;
-typedef K::Plane_3 Plane;
-typedef K::Vector_3 Vector;
-typedef K::Segment_3 Segment;
-typedef CGAL::Surface_mesh<Point> Mesh;
-typedef CGAL::AABB_face_graph_triangle_primitive<Mesh> Primitive;
-typedef CGAL::AABB_traits<K, Primitive> Traits;
-typedef CGAL::AABB_tree<Traits> Tree;
-typedef boost::optional< Tree::Intersection_and_primitive_id<Segment>::Type > Segment_intersection;
-typedef boost::optional< Tree::Intersection_and_primitive_id<Plane>::Type > Plane_intersection;
-typedef Tree::Primitive_id Primitive_id;
-
-int main()
-{
-    Point p(1.0, 0.0, 0.0);
-    Point q(0.0, 1.0, 0.0);
-    Point r(0.0, 0.0, 1.0);
-    Point s(0.0, 0.0, 0.0);
-    Mesh m;
-    CGAL::Euler::make_tetrahedron(m, p, q, r, s);
-
-    // constructs AABB tree
-    Tree tree(faces(m).first, faces(m).second, m);
-
-    // constructs segment query
-    Point a(-0.2, 0.2, -0.2);
-    Point b(1.3, 0.2, 1.3);
-    Segment segment_query(a,b);
-
-    // tests intersections with segment query
-    if(tree.do_intersect(segment_query))
-        std::cout << "intersection(s)" << std::endl;
-    else
-        std::cout << "no intersection" << std::endl;
-
-    // computes #intersections with segment query
-    std::cout << tree.number_of_intersected_primitives(segment_query)
-        << " intersection(s)" << std::endl;
-
-    // computes first encountered intersection with segment query
-    // (generally a point)
-    Segment_intersection intersection =
-        tree.any_intersection(segment_query);
-    if(intersection){
-      // gets intersection object
-      if(boost::get<Point>(&(intersection->first))){
-        Point* p = boost::get<Point>(&(intersection->first));
-        std::cout << "intersection object is a point " << *p <<  std::endl;
-        std::cout << "with face "<< intersection->second  <<  std::endl;
-      }
-    }
-
-    // computes all intersections with segment query (as pairs object - primitive_id)
-    std::list<Segment_intersection> intersections;
-    tree.all_intersections(segment_query, std::back_inserter(intersections));
-
-    // computes all intersected primitives with segment query as primitive ids
-    std::list<Primitive_id> primitives;
-    tree.all_intersected_primitives(segment_query, std::back_inserter(primitives));
-
-    // constructs plane query
-    Point base(0.0,0.0,0.5);
-    Vector vec(0.0,0.0,1.0);
-    Plane plane_query(base,vec);
-
-    // computes first encountered intersection with plane query
-    // (generally a segment)
-    Plane_intersection plane_intersection = tree.any_intersection(plane_query);
-    if(plane_intersection){
-      if(boost::get<Segment>(&(plane_intersection->first))){
-        Segment* s = boost::get<Segment>(&(plane_intersection->first));
-        std::cout << "one intersection object is the segment " << s << std::endl;
-        std::cout << "with face "<< intersection->second  <<  std::endl;
-      }
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_iterators.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_iterators.cpp
deleted file mode 100644
index 66c6d8b..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_iterators.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <vector>
-
-#include <boost/foreach.hpp>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Surface_mesh.h>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef CGAL::Surface_mesh<K::Point_3> Mesh;
-typedef Mesh::Vertex_index vertex_descriptor;
-typedef Mesh::Face_index face_descriptor;
-int main()
-{
-  Mesh m;
-
-  // u            x
-  // +------------+
-  // |            |
-  // |            |
-  // |      f     |
-  // |            |
-  // |            |
-  // +------------+
-  // v            w
-
-  // Add the points as vertices
-  vertex_descriptor u = m.add_vertex(K::Point_3(0,1,0));
-  vertex_descriptor v = m.add_vertex(K::Point_3(0,0,0));
-  vertex_descriptor w = m.add_vertex(K::Point_3(1,0,0));
-  vertex_descriptor x = m.add_vertex(K::Point_3(1,1,0));
-
-  /* face_descriptor f = */ m.add_face(u,v,w,x);
-
-  { 
-    std::cout << "all vertices " << std::endl;
-
-    // The vertex iterator type is a nested type of the Vertex_range
-    Mesh::Vertex_range::iterator  vb, ve;
-
-    Mesh::Vertex_range r = m.vertices();
-    // The iterators can be accessed through the C++ range API
-    vb = r.begin(); 
-    ve = r.end();
-    // or the boost Range API
-    vb = boost::begin(r);
-    ve = boost::end(r);
-
-    // or with boost::tie, as the CGAL range derives from std::pair
-    for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb){
-            std::cout << *vb << std::endl;
-    }
-    
-    // Instead of the classical for loop one can use
-    // the boost macro for a range
-    BOOST_FOREACH(vertex_descriptor vd, m.vertices()){
-      std::cout << vd << std::endl;
-    }
-
-    // or the C++11 for loop. Note that there is a ':' and not a ',' as in BOOST_FOREACH 
-    #ifndef CGAL_NO_CPP0X_RANGE_BASED_FOR
-    for(vertex_descriptor vd : m.vertices()){
-      std::cout << vd << std::endl;
-    }
-    #endif
-    
-  }
-  
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_memory.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_memory.cpp
deleted file mode 100644
index ca32782..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_memory.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <vector>
-
-#include <boost/assign.hpp>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Surface_mesh.h>
-
-typedef CGAL::Simple_cartesian<double> K;
-typedef CGAL::Surface_mesh<K::Point_3> Mesh;
-typedef Mesh::Vertex_index vertex_descriptor;
-
-int main()
-{
-  Mesh m;
-  Mesh::Vertex_index u;
-  for(unsigned int i=0; i < 5; ++i){
-    Mesh::Vertex_index v = m.add_vertex(K::Point_3(0,0,i+1));  
-    if(i==2) u=v;
-  }
-
-  m.remove_vertex(u);
-
-  std::cout << "After insertion of 5 vertices and removal of the 3. vertex\n"
-            << "# vertices  / # vertices + # removed vertices = " 
-            << m.number_of_vertices()
-            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
-  
-  std::cout << "Iterate over vertices\n";
-  {
-    BOOST_FOREACH(vertex_descriptor vd, m.vertices()){
-      std::cout << m.point(vd) << std::endl;
-    }
-  }
-  
-  // The status of being used or removed is stored in a property map
-  Mesh::Property_map<Mesh::Vertex_index,bool> removed
-    = m.property_map<Mesh::Vertex_index,bool>("v:removed").first;
- 
-  
-  std::cout << "\nIterate over vertices and deleted vertices\n"
-            << "# vertices / # vertices + # removed vertices = " 
-            << m.number_of_vertices()
-            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
-    {
-    unsigned int i = 0, end = m.number_of_vertices() + m.number_of_removed_vertices();
-    for( ; i < end; ++i) {
-      vertex_descriptor vh(i);
-      assert(m.is_removed(vh) == removed[vh]);
-      std::cout << m.point(vh) << ((m.is_removed(vh)) ? "  R\n" : "\n");
-    }
-  }
-
-  m.collect_garbage();
-
-  std::cout << "\nAfter garbage collection\n"
-            << "# vertices / # vertices + # removed vertices = "
-            << m.number_of_vertices()
-            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
-  
- {
-   unsigned int i = 0, end = m.number_of_vertices() + m.number_of_removed_vertices();
-    for( ; i < end; ++i) {
-      vertex_descriptor vh(i);
-      std::cout << m.point(vh) << ((m.is_removed(vh)) ? "  R\n" : "\n");
-    }
-  }
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp
deleted file mode 100644
index 6665e62..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Discrete_authalic_parameterizer_3.h>
-
-#include <iostream>
-#include <cstdlib>
-#include <fstream>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>      Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Discrete Authalic Parameterization" << std::endl;
-    std::cerr << "  circle border" << std::endl;
-    std::cerr << "  OpenNL solver" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 1)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File name is:
-    const char* input_filename  = argv[1];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    // Note: no cutting => we support only
-    // meshes that are topological disks
-    //***************************************
-
-    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Discrete Authalic Parameterization
-    // (defaults are circular border and OpenNL solver)
-    //***************************************
-
-    typedef CGAL::Discrete_authalic_parameterizer_3<Parameterization_polyhedron_adaptor>
-                                                        Parameterizer;
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Raw output: dump (u,v) pairs
-    Polyhedron::Vertex_const_iterator pVertex;
-    for (pVertex = mesh.vertices_begin();
-        pVertex != mesh.vertices_end();
-        pVertex++)
-    {
-        // (u,v) pair is stored in any halfedge
-        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
-        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
-        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/CMakeLists.txt
deleted file mode 100644
index 2130b34..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/CMakeLists.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-# This is the CMake script for compiling this folder.
-
-
-project( Surface_mesh_parameterization_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Require packages new or improved since CGAL 3.4
-include_directories (BEFORE ../../../Installation/include/)
-
-# Include this package's headers first
-include_directories (BEFORE . include ../../include)
-
-# Find CGAL
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  # VisualC++ optimization for applications dealing with large data
-  if (MSVC)
-    # Use /FR to turn on IntelliSense
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
-
-    # Allow Windows applications to use up to 3GB of RAM
-    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
-
-    # Turn off stupid VC++ warnings
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4311 /wd4800 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
-    
-    # Print new compilation options
-    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
-    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
-    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
-    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
-  endif()
-
-  # g++ 4.1 creates an infinite loop in Surface_mesh_parameterization
-  # if strict-aliasing optimization is on (implied by -O2, -O3 and -Os).
-  if (CMAKE_COMPILER_IS_GNUCXX)
-    SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing")
-    SET (CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}   -fno-strict-aliasing")
-
-    # Print new compilation options
-    string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER )
-    message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
-    message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" )
-  endif()
-
-  # Link with Boost.ProgramOptions (optional)
-  find_package(Boost QUIET COMPONENTS program_options)
-  if(Boost_PROGRAM_OPTIONS_FOUND)
-    if( CGAL_AUTO_LINK_ENABLED )
-      message( STATUS "Boost.ProgramOptions library: found" )
-    else()
-      message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
-    endif()
-    add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
-    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
- endif()
-
-  # Executables that do *not* require Eigen
-  create_single_source_cgal_program( "Authalic_parameterization.cpp" )
-  create_single_source_cgal_program( "Mesh_cutting_parameterization.cpp" )
-  create_single_source_cgal_program( "Simple_parameterization.cpp" )
-  create_single_source_cgal_program( "Square_border_parameterization.cpp" )
-
-  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
- 
-  if (EIGEN3_FOUND)
-    # Executables that require Eigen 3.1
-    include( ${EIGEN3_USE_FILE} )
-    create_single_source_cgal_program( "Complete_parameterization_example.cpp" )
-    create_single_source_cgal_program( "Eigen_parameterization.cpp" )
-  else(EIGEN3_FOUND)
-    message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.")  
-  endif(EIGEN3_FOUND)
-
-  create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" )
-
-else()
-
-  message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp
deleted file mode 100644
index e0d23c9..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp
+++ /dev/null
@@ -1,289 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Discrete_authalic_parameterizer_3.h>
-#include <CGAL/Square_border_parameterizer_3.h>
-#include <CGAL/Parameterization_mesh_patch_3.h>
-
-#include <CGAL/Eigen_solver_traits.h>
-
-#include <iostream>
-#include <fstream>
-#include <cstdlib>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>      Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-// Polyhedron adaptor
-typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-
-// Type describing a border or seam as a vertex list
-typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
-                                            Seam;
-
-
-// ----------------------------------------------------------------------------
-// Private functions
-// ----------------------------------------------------------------------------
-
-// If the mesh is a topological disk, extract its longest border,
-// else compute a very simple cut to make it homeomorphic to a disk.
-// Return the border of this region (empty on error)
-//
-// CAUTION: this cutting algorithm is very naive. Write your own!
-static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
-{
-    // Helper class to compute genus or extract borders
-    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
-                                            Mesh_feature_extractor;
-
-    Seam seam;              // returned list
-
-    // Get reference to Polyhedron_3 mesh
-    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
-
-    // Extract mesh borders and compute genus
-    Mesh_feature_extractor feature_extractor(mesh_adaptor);
-    int nb_borders = feature_extractor.get_nb_borders();
-    int genus = feature_extractor.get_genus();
-
-    // If mesh is a topological disk
-    if (genus == 0 && nb_borders > 0)
-    {
-        // Pick the longest border
-        seam = feature_extractor.get_longest_border();
-    }
-    else // if mesh is *not* a topological disk, create a virtual cut
-    {
-        const int CUT_LENGTH = 6;
-
-        // Build consecutive halfedges array
-        Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
-        seam_halfedges[0] = mesh.halfedges_begin();
-        if (seam_halfedges[0] == NULL)
-            return seam;                    // return empty list
-        int i;
-        for (i=1; i<CUT_LENGTH; i++)
-        {
-            seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
-            if (seam_halfedges[i] == NULL)
-                return seam;                // return empty list
-        }
-
-        // Convert halfedges array to two-ways vertices list
-        for (i=0; i<CUT_LENGTH; i++)
-            seam.push_back(seam_halfedges[i]->vertex());
-        for (i=CUT_LENGTH-1; i>=0; i--)
-            seam.push_back(seam_halfedges[i]->opposite()->vertex());
-    }
-
-    return seam;
-}
-
-// Dump parameterized mesh to an eps file
-static bool write_file_eps(const Parameterization_polyhedron_adaptor& mesh_adaptor,
-                           const char *pFilename,
-                           double scale = 500.0)
-{
-    const Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
-
-    std::ofstream out(pFilename);
-    if(!out)
-        return false;
-    CGAL::set_ascii_mode(out);
-
-    // compute bounding box
-    double xmin,xmax,ymin,ymax;
-    xmin = ymin = xmax = ymax = 0;
-    Polyhedron::Halfedge_const_iterator pHalfedge;
-    for (pHalfedge = mesh.halfedges_begin();
-         pHalfedge != mesh.halfedges_end();
-         pHalfedge++)
-    {
-        double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
-        double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
-        double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
-        double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
-        xmin = (std::min)(xmin,x1);
-        xmin = (std::min)(xmin,x2);
-        xmax = (std::max)(xmax,x1);
-        xmax = (std::max)(xmax,x2);
-        ymax = (std::max)(ymax,y1);
-        ymax = (std::max)(ymax,y2);
-        ymin = (std::min)(ymin,y1);
-        ymin = (std::min)(ymin,y2);
-    }
-
-    out << "%!PS-Adobe-2.0 EPSF-2.0" << std::endl;
-    out << "%%BoundingBox: " << int(xmin+0.5) << " "
-                                << int(ymin+0.5) << " "
-                                << int(xmax+0.5) << " "
-                                << int(ymax+0.5) << std::endl;
-    out << "%%HiResBoundingBox: " << xmin << " "
-                                    << ymin << " "
-                                    << xmax << " "
-                                    << ymax << std::endl;
-    out << "%%EndComments" << std::endl;
-    out << "gsave" << std::endl;
-    out << "0.1 setlinewidth" << std::endl;
-
-    // color macros
-    out << std::endl;
-    out << "% RGB color command - r g b C" << std::endl;
-    out << "/C { setrgbcolor } bind def" << std::endl;
-    out << "/white { 1 1 1 C } bind def" << std::endl;
-    out << "/black { 0 0 0 C } bind def" << std::endl;
-
-    // edge macro -> E
-    out << std::endl;
-    out << "% Black stroke - x1 y1 x2 y2 E" << std::endl;
-    out << "/E {moveto lineto stroke} bind def" << std::endl;
-    out << "black" << std::endl << std::endl;
-
-    // for each halfedge
-    for (pHalfedge = mesh.halfedges_begin();
-         pHalfedge != mesh.halfedges_end();
-         pHalfedge++)
-    {
-        double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
-        double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
-        double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
-        double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
-        out << x1 << " " << y1 << " " << x2 << " " << y2 << " E" << std::endl;
-    }
-
-    /* Emit EPS trailer. */
-    out << "grestore" << std::endl;
-    out << std::endl;
-    out << "showpage" << std::endl;
-
-    return true;
-}
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Discrete Authalic Parameterization" << std::endl;
-    std::cerr << "  Square border" << std::endl;
-    std::cerr << "  Eigen solver" << std::endl;
-    std::cerr << "  Very simple cut if model is not a topological disk" << std::endl;
-    std::cerr << "  Output: EPS" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 2)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off output_file.eps" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File names are:
-    const char* input_filename  = argv[1];
-    const char* output_filename = argv[2];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    //***************************************
-
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Virtually cut mesh
-    //***************************************
-
-    // The parameterization methods support only meshes that
-    // are topological disks => we need to compute a "cutting" of the mesh
-    // that makes it homeomorphic to a disk
-    Seam seam = cut_mesh(mesh_adaptor);
-    if (seam.empty())
-    {
-        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    // Create a second adaptor that virtually "cuts" the mesh following the 'seam' path
-    typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
-                                            Mesh_patch_polyhedron;
-    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
-    if (!mesh_patch.is_valid())
-    {
-        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Discrete Authalic Parameterization (square border)
-    // with Eigen solver
-    //***************************************
-
-    // Border parameterizer
-    typedef CGAL::Square_border_arc_length_parameterizer_3<Mesh_patch_polyhedron>
-                                                            Border_parameterizer;
-    // Eigen solver
-    typedef CGAL::Eigen_solver_traits<>                Solver;
-
-    // Discrete Authalic Parameterization (square border)
-    // with Eigen solver
-    typedef CGAL::Discrete_authalic_parameterizer_3<Mesh_patch_polyhedron,
-                                                    Border_parameterizer,
-                                                    Solver> Parameterizer;
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_patch, Parameterizer());
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Write Postscript file
-    if ( ! write_file_eps(mesh_adaptor, output_filename) )
-    {
-        std::cerr << "Error: cannot write file " << output_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd
deleted file mode 100644
index c85f130..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd
+++ /dev/null
@@ -1 +0,0 @@
-data/mannequin-devil.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp
deleted file mode 100644
index 7c97b3f..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-
-#include <CGAL/Eigen_solver_traits.h>
-
-#include <iostream>
-#include <fstream>
-#include <cstdlib>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>             Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Floater parameterization" << std::endl;
-    std::cerr << "  Circle border" << std::endl;
-    std::cerr << "  Eigen solver" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 1)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File name is:
-    const char* input_filename  = argv[1];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    // Note: no cutting => we support only
-    // meshes that are topological disks
-    //***************************************
-
-    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Floater Mean Value Coordinates parameterization
-    // (circular border) with Eigen solver
-    //***************************************
-
-    // Circular border parameterizer (the default)
-    typedef CGAL::Circular_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
-                                                        Border_parameterizer;
-    // Eigen solver
-    typedef CGAL::Eigen_solver_traits<>                Solver;
-
-    // Floater Mean Value Coordinates parameterization
-    // (circular border) with Eigen solver
-    typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
-                                                         Border_parameterizer,
-                                                         Solver>
-                                                        Parameterizer;
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
-
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Raw output: dump (u,v) pairs
-    Polyhedron::Vertex_const_iterator pVertex;
-    for (pVertex = mesh.vertices_begin();
-        pVertex != mesh.vertices_end();
-        pVertex++)
-    {
-        // (u,v) pair is stored in any halfedge
-        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
-        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
-        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp
deleted file mode 100644
index 413ecb4..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Parameterization_mesh_patch_3.h>
-
-#include <iostream>
-#include <fstream>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>      Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-// Polyhedron adaptor
-typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-
-// Type describing a border or seam as a vertex list
-typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
-                                            Seam;
-
-
-// ----------------------------------------------------------------------------
-// Private functions
-// ----------------------------------------------------------------------------
-
-// If the mesh is a topological disk, extract its longest border,
-// else compute a very simple cut to make it homeomorphic to a disk.
-// Return the border of this region (empty on error)
-//
-// CAUTION: this cutting algorithm is very naive. Write your own!
-static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
-{
-    // Helper class to compute genus or extract borders
-    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
-                                            Mesh_feature_extractor;
-
-    Seam seam;              // returned list
-
-    // Get reference to Polyhedron_3 mesh
-    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
-
-    // Extract mesh borders and compute genus
-    Mesh_feature_extractor feature_extractor(mesh_adaptor);
-    int nb_borders = feature_extractor.get_nb_borders();
-    int genus = feature_extractor.get_genus();
-
-    // If mesh is a topological disk
-    if (genus == 0 && nb_borders > 0)
-    {
-        // Pick the longest border
-        seam = feature_extractor.get_longest_border();
-    }
-    else // if mesh is *not* a topological disk, create a virtual cut
-    {
-        const int CUT_LENGTH = 6;
-
-        // Build consecutive halfedges array
-        Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
-        seam_halfedges[0] = mesh.halfedges_begin();
-        if (seam_halfedges[0] == NULL)
-            return seam;                    // return empty list
-        int i;
-        for (i=1; i<CUT_LENGTH; i++)
-        {
-            seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
-            if (seam_halfedges[i] == NULL)
-                return seam;                // return empty list
-        }
-
-        // Convert halfedges array to two-ways vertices list
-        for (i=0; i<CUT_LENGTH; i++)
-            seam.push_back(seam_halfedges[i]->vertex());
-        for (i=CUT_LENGTH-1; i>=0; i--)
-            seam.push_back(seam_halfedges[i]->opposite()->vertex());
-    }
-
-    return seam;
-}
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Floater parameterization" << std::endl;
-    std::cerr << "  Circle border" << std::endl;
-    std::cerr << "  OpenNL solver" << std::endl;
-    std::cerr << "  Very simple cut if model is not a topological disk" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 1)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File name is:
-    const char* input_filename  = argv[1];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    //***************************************
-
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Virtually cut mesh
-    //***************************************
-
-    // The parameterization methods support only meshes that
-    // are topological disks => we need to compute a "cutting" of the mesh
-    // that makes it homeomorphic to a disk
-    Seam seam = cut_mesh(mesh_adaptor);
-    if (seam.empty())
-    {
-        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    // Create a second adaptor that virtually "cuts" the mesh following the 'seam' path
-    typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
-                                            Mesh_patch_polyhedron;
-    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
-    if (!mesh_patch.is_valid())
-    {
-        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Floater Mean Value Coordinates parameterization
-    //***************************************
-
-    typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron>
-                                            Parameterizer; // Type that defines the error codes
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_patch);
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Raw output: dump (u,v) pairs
-    Polyhedron::Vertex_const_iterator pVertex;
-    for (pVertex = mesh.vertices_begin();
-        pVertex != mesh.vertices_end();
-        pVertex++)
-    {
-        // (u,v) pair is stored in any halfedge
-        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
-        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
-        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Simple_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Simple_parameterization.cpp
deleted file mode 100644
index 490a376..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Simple_parameterization.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-
-#include <iostream>
-#include <fstream>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>      Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Floater parameterization" << std::endl;
-    std::cerr << "  Circle border" << std::endl;
-    std::cerr << "  OpenNL solver" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 1)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File name is:
-    const char* input_filename  = argv[1];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    // Note: no cutting => we support only
-    // meshes that are topological disks
-    //***************************************
-
-    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Floater Mean Value Coordinates parameterization
-    // (defaults are circular border and OpenNL solver)
-    //***************************************
-
-    typedef CGAL::Parameterizer_traits_3<Parameterization_polyhedron_adaptor>
-                                            Parameterizer;  // Type that defines the error codes
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor);
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Raw output: dump (u,v) pairs
-    Polyhedron::Vertex_const_iterator pVertex;
-    for (pVertex = mesh.vertices_begin();
-        pVertex != mesh.vertices_end();
-        pVertex++)
-    {
-        // (u,v) pair is stored in any halfedge
-        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
-        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
-        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp
deleted file mode 100644
index e6c5335..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Square_border_parameterizer_3.h>
-
-#include <iostream>
-#include <fstream>
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef CGAL::Simple_cartesian<double>      Kernel;
-typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "PARAMETERIZATION" << std::endl;
-    std::cerr << "  Floater parameterization" << std::endl;
-    std::cerr << "  square border" << std::endl;
-    std::cerr << "  OpenNL solver" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    if (argc-1 != 1)
-    {
-        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
-        return(EXIT_FAILURE);
-    }
-
-    // File name is:
-    const char* input_filename  = argv[1];
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    // Read the mesh
-    std::ifstream stream(input_filename);
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    //***************************************
-    // Create Polyhedron adaptor
-    // Note: no cutting => we support only
-    // meshes that are topological disks
-    //***************************************
-
-    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
-                                            Parameterization_polyhedron_adaptor;
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    //***************************************
-    // Floater Mean Value Coordinates parameterization
-    // with square border
-    //***************************************
-
-    // Square border parameterizer
-    typedef CGAL::Square_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
-                                                       Border_parameterizer;
-
-    // Floater Mean Value Coordinates parameterizer with square border
-    typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
-                                                         Border_parameterizer>
-                                                        Parameterizer;
-
-    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // Raw output: dump (u,v) pairs
-    Polyhedron::Vertex_const_iterator pVertex;
-    for (pVertex = mesh.vertices_begin();
-        pVertex != mesh.vertices_end();
-        pVertex++)
-    {
-        // (u,v) pair is stored in any halfedge
-        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
-        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
-        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp
deleted file mode 100644
index 9fc63d2..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp
+++ /dev/null
@@ -1,488 +0,0 @@
-// ----------------------------------------------------------------------------
-// USAGE EXAMPLES
-// ----------------------------------------------------------------------------
-
-//----------------------------------------------------------
-// Discrete Conformal Map parameterization
-// circle border
-// OpenNL solver
-// output is a eps map
-// input file is mesh.off
-//----------------------------------------------------------
-// polyhedron_ex_parameterization -t conformal -b circle mesh.off mesh.eps
-
-//----------------------------------------------------------
-// Least Squares Conformal Maps parameterization
-// two pinned vertices (automatically picked)
-// OpenNL solver
-// output is a .obj
-// input file is mesh.off
-//----------------------------------------------------------
-// polyhedron_ex_parameterization -t lscm -b 2pts mesh.off mesh.obj
-
-
-#include <CGAL/Timer.h>
-#include <CGAL/parameterize.h>
-#include <CGAL/Parameterization_mesh_patch_3.h>
-#include <CGAL/Circular_border_parameterizer_3.h>
-#include <CGAL/Square_border_parameterizer_3.h>
-#include <CGAL/Two_vertices_parameterizer_3.h>
-#include <CGAL/Barycentric_mapping_parameterizer_3.h>
-#include <CGAL/Discrete_conformal_map_parameterizer_3.h>
-#include <CGAL/Discrete_authalic_parameterizer_3.h>
-#include <CGAL/Mean_value_coordinates_parameterizer_3.h>
-#include <CGAL/LSCM_parameterizer_3.h>
-#include <CGAL/Parameterization_mesh_feature_extractor.h>
-
-#include <CGAL/OpenNL/linear_solver.h>
-
-#include "Polyhedron_ex.h"
-#include "Mesh_cutter.h"
-#include "Parameterization_polyhedron_adaptor_ex.h"
-
-#include <iostream>
-#include <string.h>
-#include <ctype.h>
-#include <fstream>
-#include <cassert>
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-    #include <boost/program_options.hpp>
-    namespace po = boost::program_options;
-#endif
-
-
-// ----------------------------------------------------------------------------
-// Private types
-// ----------------------------------------------------------------------------
-
-typedef Polyhedron_ex                                       Polyhedron;
-
-// Mesh adaptors
-typedef Parameterization_polyhedron_adaptor_ex              Parameterization_polyhedron_adaptor;
-typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
-                                                            Mesh_patch_polyhedron;
-
-// Type describing a border or seam as a vertex list
-typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
-                                                            Seam;
-
-
-// ----------------------------------------------------------------------------
-// Private functions
-// ----------------------------------------------------------------------------
-
-// Cut the mesh to make it homeomorphic to a disk
-// or extract a region homeomorphic to a disc.
-// Return the border of this region (empty on error)
-//
-// CAUTION:
-// This method is provided "as is". It is very buggy and simply part of this example.
-// Developers using this package should implement a more robust cut algorithm!
-static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
-{
-    // Helper class to compute genus or extract borders
-    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor_ex>
-                                            Mesh_feature_extractor;
-    typedef Mesh_cutter::Backbone           Backbone;
-
-    Seam seam;              // returned list
-
-    // Get refererence to Polyhedron_3 mesh
-    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
-
-    // Extract mesh borders and compute genus
-    Mesh_feature_extractor feature_extractor(mesh_adaptor);
-    int nb_borders = feature_extractor.get_nb_borders();
-    int genus = feature_extractor.get_genus();
-
-    // If mesh is a topological disk
-    if (genus == 0 && nb_borders > 0)
-    {
-        // Pick the longest border
-        seam = feature_extractor.get_longest_border();
-    }
-    else // if mesh is *not* a topological disk, create a virtual cut
-    {
-        Backbone seamingBackbone;           // result of cutting
-        Backbone::iterator he;
-
-        // Compute a cutting path that makes the mesh a "virtual" topological disk
-        mesh.compute_facet_centers();
-        Mesh_cutter cutter(mesh);
-        if (genus == 0)
-        {
-            // no border, we need to cut the mesh
-            assert (nb_borders == 0);
-            cutter.cut(seamingBackbone);    // simple cut
-        }
-        else // genus > 0 -> cut the mesh
-        {
-            cutter.cut_genus(seamingBackbone);
-        }
-
-        // The Mesh_cutter class is quite buggy
-        // => we check that seamingBackbone is valid
-        //
-        // 1) Check that seamingBackbone is not empty
-        if (seamingBackbone.begin() == seamingBackbone.end())
-            return seam;                    // return empty list
-        //
-        // 2) Check that seamingBackbone is a loop and
-        //    count occurences of seam halfedges
-        mesh.tag_halfedges(0);              // Reset counters
-        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
-        {
-            // Get next halfedge iterator (looping)
-            Backbone::iterator next_he = he;
-            next_he++;
-            if (next_he == seamingBackbone.end())
-                next_he = seamingBackbone.begin();
-
-            // Check that seamingBackbone is a loop: check that
-            // end of current HE == start of next one
-            if ((*he)->vertex() != (*next_he)->opposite()->vertex())
-                return seam;                // return empty list
-
-            // Increment counter (in "tag" field) of seam halfedges
-            (*he)->tag( (*he)->tag()+1 );
-        }
-        //
-        // 3) check that the seamingBackbone is a two-way list
-        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
-        {
-            // Counter of halfedge and opposite halfedge must be 1
-            if ((*he)->tag() != 1 || (*he)->opposite()->tag() != 1)
-                return seam;                // return empty list
-        }
-
-        // Convert list of halfedges to a list of vertices
-        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
-            seam.push_back((*he)->vertex());
-    }
-
-    return seam;
-}
-
-// Call appropriate parameterization method based on command line parameters
-template<
-    class ParameterizationMesh_3,   // 3D surface
-    class GeneralSparseLinearAlgebraTraits_d,
-                                    // Traits class to solve a general sparse linear system
-    class SymmetricSparseLinearAlgebraTraits_d
-                                    // Traits class to solve a symmetric sparse linear system
->
-typename CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
-parameterize(ParameterizationMesh_3& mesh,  // Mesh parameterization adaptor
-             const std::string& type,              // type of parameterization (see usage)
-             const std::string& border)            // type of border parameterization (see usage)
-{
-    typename CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::Error_code err;
-
-    if ( (type == std::string("floater"))  && (border == std::string("circle")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Mean_value_coordinates_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("floater")) && (border == std::string("square")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Mean_value_coordinates_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("barycentric")) && (border == std::string("circle")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Barycentric_mapping_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Circular_border_uniform_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("barycentric")) && (border == std::string("square")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Barycentric_mapping_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Square_border_uniform_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("conformal")) && (border == std::string("circle")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Discrete_conformal_map_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("conformal")) && (border == std::string("square")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Discrete_conformal_map_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("authalic")) && (border == std::string("circle")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Discrete_authalic_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("authalic")) && (border == std::string("square")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::Discrete_authalic_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-                GeneralSparseLinearAlgebraTraits_d
-            >());
-    }
-    else if ( (type == std::string("lscm")) && (border == std::string("2pts")) )
-    {
-        err = CGAL::parameterize(
-            mesh,
-            CGAL::LSCM_parameterizer_3<
-                ParameterizationMesh_3,
-                CGAL::Two_vertices_parameterizer_3<ParameterizationMesh_3>,
-                SymmetricSparseLinearAlgebraTraits_d
-            >());
-    }
-    else
-    {
-        std::cerr << "Error: invalid parameters combination " << type << " + " << border << std::endl;
-        err = CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::ERROR_WRONG_PARAMETER;
-    }
-
-    return err;
-}
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-int main(int argc, char * argv[])
-#else
-int main()
-#endif
-{
-    CGAL::Timer total_timer;
-    total_timer.start();
-
-    std::cerr << "PARAMETERIZATION" << std::endl;
-
-    //***************************************
-    // Read options on the command line
-    //***************************************
-
-    std::string type;               // default: Floater param
-    std::string border;             // default: circular border param.
-    std::string solver;             // default: OpenNL solver
-    std::string input;              // required
-    std::string output;             // default: out.eps
-    try
-    {
-#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS
-        po::options_description desc("Allowed options");
-        desc.add_options()
-            ("help,h", "prints this help message")
-            ("type,t", po::value<std::string>(&type)->default_value("floater"),
-            "parameterization method: floater, conformal, barycentric, authalic or lscm")
-            ("border,b", po::value<std::string>(&border)->default_value("circle"),
-            "border shape: circle, square or 2pts (lscm only)")
-            ("solver,s", po::value<std::string>(&solver)->default_value("opennl"),
-            "solver: opennl")
-            ("input,i", po::value<std::string>(&input)->default_value(""),
-            "input mesh (OFF)")
-            ("output,o", po::value<std::string>(&output)->default_value("out.eps"),
-            "output file (EPS or OBJ)")
-            ;
-
-        po::positional_options_description p;
-        p.add("input", 1);
-        p.add("output", 1);
-
-        po::variables_map vm;
-        po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
-        po::notify(vm);
-
-        if (vm.count("help")) {
-            std::cout << desc << "\n";
-            return 1;
-        }
-#else
-        std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
-        std::cerr << "Use hard-coded options" << std::endl;
-        border = "square";
-        type = "floater";
-        solver = "opennl";
-        input = "data/rotor.off";
-        output = "rotor_floater_square_opennl_parameterized.obj";
-#endif
-    }
-    catch(std::exception& e) {
-      std::cerr << "error: " << e.what() << "\n";
-      return 1;
-    }
-    catch(...) {
-      std::cerr << "Exception of unknown type!\n";
-      throw;
-    }
-
-    //***************************************
-    // Read the mesh
-    //***************************************
-
-    CGAL::Timer task_timer;
-    task_timer.start();
-
-    // Read the mesh
-    std::ifstream stream(input.c_str());
-    Polyhedron mesh;
-    stream >> mesh;
-    if(!stream || !mesh.is_valid() || mesh.empty())
-    {
-        std::cerr << "Error: cannot read OFF file " << input << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    std::cerr << "Read file " << input << ": "
-              << task_timer.time() << " seconds "
-              << "(" << mesh.size_of_facets() << " facets, "
-              << mesh.size_of_vertices() << " vertices)" << std::endl;
-    task_timer.reset();
-
-    //***************************************
-    // Create mesh adaptor
-    //***************************************
-
-    // The Surface_mesh_parameterization package needs an adaptor to handle Polyhedron_ex meshes
-    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
-
-    // The parameterization methods support only meshes that
-    // are topological disks => we need to compute a cutting path
-    // that makes the mesh a "virtual" topological disk
-    //
-    // 1) Cut the mesh
-    Seam seam = cut_mesh(mesh_adaptor);
-    if (seam.empty())
-    {
-        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
-        return EXIT_FAILURE;
-    }
-    //
-    // 2) Create adaptor that virtually "cuts" a patch in a Polyhedron_ex mesh
-    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
-    if (!mesh_patch.is_valid())
-    {
-        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
-        return EXIT_FAILURE;
-    }
-
-    std::cerr << "Mesh cutting: " << task_timer.time() << " seconds." << std::endl;
-    task_timer.reset();
-
-    //***************************************
-    // switch parameterization
-    //***************************************
-
-    std::cerr << "Parameterization..." << std::endl;
-
-    // Defines the error codes
-    typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron> Parameterizer;
-    Parameterizer::Error_code err;
-
-    if (solver == std::string("opennl"))
-    {
-        err = parameterize<Mesh_patch_polyhedron,
-                           OpenNL::DefaultLinearSolverTraits<double>,
-                           OpenNL::SymmetricLinearSolverTraits<double>
-                          >(mesh_patch, type, border);
-    }
-    else
-    {
-        std::cerr << "Error: invalid solver parameter " << solver << std::endl;
-        err = Parameterizer::ERROR_WRONG_PARAMETER;
-    }
-
-    // Report errors
-    switch(err) {
-    case Parameterizer::OK: // Success
-        break;
-    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
-    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
-    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
-    case Parameterizer::ERROR_BORDER_TOO_SHORT:
-        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    default: // Error
-        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
-        return EXIT_FAILURE;
-        break;
-    };
-
-    std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl;
-    task_timer.reset();
-
-    //***************************************
-    // Output
-    //***************************************
-
-    // get output file's extension
-    std::string extension = output.substr(output.find_last_of('.'));
-
-    // Save mesh
-    if (extension == ".eps" || extension == ".EPS")
-    {
-        // write Postscript file
-        if ( ! mesh.write_file_eps(output.c_str()) )
-        {
-            std::cerr << "Error: cannot write file " << output << std::endl;
-            return EXIT_FAILURE;
-        }
-    }
-    else if (extension == ".obj" || extension == ".OBJ")
-    {
-        // write Wavefront obj file
-        if ( ! mesh.write_file_obj(output.c_str()) )
-        {
-            std::cerr << "Error: cannot write file " << output << std::endl;
-            return EXIT_FAILURE;
-        }
-    }
-    else
-    {
-        std::cerr << "Error: output format not supported" << output << std::endl;
-        err = Parameterizer::ERROR_WRONG_PARAMETER;
-        return EXIT_FAILURE;
-    }
-
-    std::cerr << "Write file " << output << ": "
-              << task_timer.time() << " seconds " << std::endl;
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/CMakeLists.txt
deleted file mode 100644
index 66401c6..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/CMakeLists.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-# Created by the script cgal_create_cmake_script_with_options
-# This is the CMake script for compiling a set of CGAL applications.
-
-project( Surface_mesh_segmentation )
-
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
- 
-if ( COMMAND cmake_policy )
-
-  cmake_policy( SET CMP0003 NEW )  
-
-endif()
-
-# CGAL and its components
-find_package( CGAL QUIET COMPONENTS  )
-
-if ( NOT CGAL_FOUND )
-
-  message(STATUS "This project requires the CGAL library, and will not be compiled.")
-  return()  
-
-endif()
-
-# include helper file
-include( ${CGAL_USE_FILE} )
-
-
-# Boost and its components
-find_package( Boost REQUIRED )
-
-if ( NOT Boost_FOUND )
-
-  message(STATUS "This project requires the Boost library, and will not be compiled.")
-
-  return()  
-
-endif()
-
-find_package( OpenMesh QUIET )
-
-if ( OpenMesh_FOUND )
-include( UseOpenMesh )
-else()
-  message(STATUS "Examples that use OpenMesh will not be compiled.")
-endif()
-
-
-# include for local package
-include_directories( BEFORE ../../include )
-
-
-
-# Creating entries for all .cpp/.C files with "main" routine
-# ##########################################################
-
-include( CGAL_CreateSingleSourceCGALProgram )
-
-create_single_source_cgal_program( "sdf_values_example.cpp" )
-
-create_single_source_cgal_program( "segmentation_from_sdf_values_example.cpp" )
-
-create_single_source_cgal_program( "segmentation_via_sdf_values_example.cpp" )
-
-create_single_source_cgal_program( "segmentation_with_facet_ids_example.cpp" )
-create_single_source_cgal_program( "segmentation_from_sdf_values_SM_example.cpp")
-
-if(OpenMesh_FOUND)
-  create_single_source_cgal_program( "segmentation_from_sdf_values_OpenMesh_example.cpp" )
-  target_link_libraries( segmentation_from_sdf_values_OpenMesh_example ${OPENMESH_LIBRARIES} )
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp
deleted file mode 100644
index a5a497a..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#define CGAL_BGL_TESTSUITE
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <OpenMesh/Core/IO/MeshIO.hh>
-#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
-
-#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
-
-#include <CGAL/mesh_segmentation.h>
-
-#include <CGAL/property_map.h>
-
-#include <iostream>
-#include <fstream>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-
-typedef OpenMesh::PolyMesh_ArrayKernelT</* MyTraits*/> Mesh;
-
-typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
-typedef boost::graph_traits<Mesh>::face_iterator face_iterator;
-
-int main(int argc, char** argv )
-{
-  Mesh mesh;
-  if (argc==2)
-    OpenMesh::IO::read_mesh(mesh, argv[1]);
-  else
-    OpenMesh::IO::read_mesh(mesh, "data/cactus.off");
-
-  // create a property-map for SDF values
-  typedef std::map<face_descriptor, double> Facet_double_map;
-  Facet_double_map internal_sdf_map;
-  boost::associative_property_map<Facet_double_map> sdf_property_map(internal_sdf_map);
-
-  // compute SDF values
-  CGAL::sdf_values(mesh, sdf_property_map);
-
-  // create a property-map for segment-ids
-  typedef std::map<face_descriptor, std::size_t> Facet_int_map;
-  Facet_int_map internal_segment_map;
-  boost::associative_property_map<Facet_int_map> segment_property_map(internal_segment_map);
-
-  // segment the mesh using default parameters for number of levels, and smoothing lambda
-  // Any other scalar values can be used instead of using SDF values computed using the CGAL function
-  std::size_t number_of_segments = CGAL::segmentation_from_sdf_values(mesh, sdf_property_map, segment_property_map);
-
-  std::cout << "Number of segments: " << number_of_segments << std::endl;
-  // print segment-ids
-  face_iterator facet_it, fend;
-  for(boost::tie(facet_it,fend) = faces(mesh);
-      facet_it != fend; ++facet_it) {
-      // ids are between [0, number_of_segments -1]
-      std::cout << segment_property_map[*facet_it] << " ";
-  }
-  std::cout << std::endl;
-
-  const std::size_t number_of_clusters = 4;       // use 4 clusters in soft clustering
-  const double smoothing_lambda = 0.3;  // importance of surface features, suggested to be in-between [0,1]
-
-  // Note that we can use the same SDF values (sdf_property_map) over and over again for segmentation.
-  // This feature is relevant for segmenting the mesh several times with different parameters.
-  CGAL::segmentation_from_sdf_values(mesh, sdf_property_map, segment_property_map, number_of_clusters, smoothing_lambda);
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/CMakeLists.txt
deleted file mode 100644
index bb408d2..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/CMakeLists.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-# Created by the script cgal_create_cmake_script_with_options
-# This is the CMake script for compiling a set of CGAL applications.
-
-project( Surface_mesh_simplification )
-
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
- 
-if ( COMMAND cmake_policy )
-
-  cmake_policy( SET CMP0003 NEW )  
-
-endif()
-
-# CGAL and its components
-find_package( CGAL QUIET COMPONENTS  )
-
-if ( NOT CGAL_FOUND )
-
-  message(STATUS "This project requires the CGAL library, and will not be compiled.")
-  return()  
-
-endif()
-
-# include helper file
-include( ${CGAL_USE_FILE} )
-
-
-# Boost and its components
-find_package( Boost REQUIRED )
-
-if ( NOT Boost_FOUND )
-
-  message(STATUS "This project requires the Boost library, and will not be compiled.")
-
-  return()  
-
-endif()
-
-
-find_package( OpenMesh QUIET )
-
-if ( OpenMesh_FOUND )
-include( UseOpenMesh )
-else()
-  message(STATUS "Examples that use OpenMesh will not be compiled.")
-endif()
-
-# include for local directory
-
-# include for local package
-include_directories( BEFORE ../../include )
-
-
-
-# Creating entries for all .cpp/.C files with "main" routine
-# ##########################################################
-
-include( CGAL_CreateSingleSourceCGALProgram )
-
-
-create_single_source_cgal_program( "edge_collapse_constrain_sharp_edges.cpp" )
-
-create_single_source_cgal_program( "edge_collapse_constrained_border_polyhedron.cpp" )
-
-create_single_source_cgal_program( "edge_collapse_enriched_polyhedron.cpp" )
-
-create_single_source_cgal_program( "edge_collapse_polyhedron.cpp" )
-
-create_single_source_cgal_program( "edge_collapse_surface_mesh.cpp" )
-create_single_source_cgal_program( "edge_collapse_constrained_border_surface_mesh.cpp" )
-
-if(OpenMesh_FOUND)
-create_single_source_cgal_program( "edge_collapse_OpenMesh.cpp" )
-
-target_link_libraries( edge_collapse_OpenMesh ${OPENMESH_LIBRARIES} )
-endif()
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp
deleted file mode 100644
index 095b551..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-#include <OpenMesh/Core/IO/MeshIO.hh>
-#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
-
-#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-
-typedef OpenMesh::PolyMesh_ArrayKernelT</* MyTraits*/> Surface_mesh;
-
-typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
-typedef boost::graph_traits<Surface_mesh>::edge_iterator edge_iterator;
-
-class Constrained_edge_map
-{
-public:
-  typedef boost::read_write_property_map_tag    category;
-  typedef bool                                  value_type;
-  typedef bool                                  reference;
-  typedef edge_descriptor                       key_type;
-
-  Constrained_edge_map(Surface_mesh& sm)
-    : sm_(sm)
-  {
-    sm_.add_property(constraint);
-  }
-
-  inline friend reference get(const Constrained_edge_map& em, key_type e)
-  {
-    bool b = em.sm_.property(em.constraint,em.sm_.edge_handle(e.idx())); 
-    return b;
-  }
-  
-  inline friend void put(const Constrained_edge_map& em, key_type e, value_type b)
-  {
-    em.sm_.property(em.constraint,em.sm_.edge_handle(e.idx())) = b;
-  }
-
-private:
-  Surface_mesh& sm_;
-  OpenMesh::EPropHandleT<bool> constraint;
-};
-
-
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-int main( int argc, char** argv ) 
-{
-  Surface_mesh surface_mesh;
-  Constrained_edge_map constraints_map(surface_mesh);
-  if (argc==2)
-    OpenMesh::IO::read_mesh(surface_mesh, argv[1]);
-  else
-    OpenMesh::IO::read_mesh(surface_mesh, "cube.off");
-  // For the pupose of the example we mark 10 edges as constrained edges
-  edge_iterator b,e;
-  int count=0;
-  for(boost::tie(b,e) = edges(surface_mesh); b!= e; ++b){
-      put(constraints_map,*b,(count++ <100));
-  }
-  // This is a stop predicate (defines when the algorithm terminates).
-  // In this example, the simplification stops when the number of undirected edges
-  // left in the surface mesh drops below the specified number (1000)
-  SMS::Count_stop_predicate<Surface_mesh> stop(0);
-     
-  // This the actual call to the simplification algorithm.
-  // The surface mesh and stop conditions are mandatory arguments.
-
-  int r = SMS::edge_collapse
-            (surface_mesh
-            ,stop
-             ,CGAL::halfedge_index_map  (get(CGAL::halfedge_index  ,surface_mesh)) 
-             .vertex_point_map(get(boost::vertex_point, surface_mesh))
-             .edge_is_constrained_map(constraints_map) 
-             );
-  
-  surface_mesh.garbage_collection();
-  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
-            << num_edges(surface_mesh) << " final edges.\n" ;
-        
-   OpenMesh::IO::write_mesh(surface_mesh, "out.off");
-  
-  return 0 ;      
-}
-
-// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp
deleted file mode 100644
index e3f8589..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Mesh_3/dihedral_angle_3.h>
-#include <CGAL/property_map.h>
-#include <cmath>
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point_3;
-typedef CGAL::Polyhedron_3<Kernel> Surface_mesh;
-typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
-typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor;
-typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
-typedef boost::graph_traits<Surface_mesh>::edge_iterator edge_iterator;
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-//
-// BGL property map which indicates whether an edge is marked as non-removable
-struct Constrained_edge_map : public boost::put_get_helper<bool,Constrained_edge_map>
-{
-  typedef boost::readable_property_map_tag      category;
-  typedef bool                                  value_type;
-  typedef bool                                  reference;
-  typedef edge_descriptor                       key_type;
-
-  Constrained_edge_map(const CGAL::Unique_hash_map<key_type,bool>& aConstraints)
-    : mConstraints(aConstraints)
-  {}
-
-  reference operator[](key_type const& e) const { return  is_constrained(e); }
-
-  bool is_constrained( key_type const& e ) const {
-    return mConstraints.is_defined(e);
-  }
-
-private:
-  const CGAL::Unique_hash_map<key_type,bool>& mConstraints;
-};
-
-bool is_border (edge_descriptor e, const Surface_mesh& sm)
-{
-  return (face(halfedge(e,sm),sm) == boost::graph_traits<Surface_mesh>::null_face() )
-    || (face(opposite(halfedge(e,sm),sm),sm) == boost::graph_traits<Surface_mesh>::null_face() );
-}
-
-Point_3 point(vertex_descriptor vd,  const Surface_mesh& sm)
-{
-  return get(CGAL::vertex_point, sm, vd);
-}
-
-int main( int argc, char** argv )
-{
-  CGAL::Unique_hash_map<edge_descriptor,bool> constraint_hmap(false);
-
-  Surface_mesh surface_mesh;
-
-  if (argc < 2){
-    std::cerr<< "Usage: " << argv[0] << " input.off [out.off]\n";
-    return 1;
-  }
-
-  std::ifstream is(argv[1]);
-  if(!is){
-    std::cerr<< "Filename provided is invalid\n";
-    return 1;
-  }
-
-  is >> surface_mesh  ;
-
-  Constrained_edge_map constraints_map(constraint_hmap);
-  SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
-                             Constrained_edge_map > placement(constraints_map);
-
-  // map used to check that constrained_edges and the points of its vertices
-  // are preserved at the end of the simplification
-  // Warning: the computation of the dihedral angle is only an approximation and can
-  //          be far from the real value and could influence the detection of sharp
-  //          edges after the simplification
-  std::map<edge_descriptor,std::pair<Point_3, Point_3> >constrained_edges;
-  std::size_t nb_sharp_edges=0;
-
-  // detect sharp edges
-  std::ofstream cst_output("constrained_edges.cgal");
-  edge_iterator eb,ee;
-  for(boost::tie(eb,ee) = edges(surface_mesh); eb != ee ; ++eb )
-  {
-    halfedge_descriptor hd = halfedge(*eb,surface_mesh);
-    if ( is_border(*eb,surface_mesh) ){
-      std::cerr << "border" << std::endl;
-      ++nb_sharp_edges;
-      constraint_hmap[*eb]=true;
-      constrained_edges[*eb]=std::make_pair(point(source(hd,surface_mesh),surface_mesh),
-                                            point(target(hd,surface_mesh),surface_mesh));
-    }
-    else{
-      double angle = CGAL::Mesh_3::dihedral_angle(point(target(opposite(hd,surface_mesh),surface_mesh),surface_mesh),
-                                                  point(target(hd,surface_mesh),surface_mesh),
-                                                  point(target(next(hd,surface_mesh),surface_mesh),surface_mesh),
-                                                  point(target(next(opposite(hd,surface_mesh),surface_mesh),surface_mesh),surface_mesh));
-      if ( CGAL::abs(angle)<100 ){
-        ++nb_sharp_edges;
-        constraint_hmap[*eb]=true;
-        Point_3 p = point(source(hd,surface_mesh),surface_mesh);
-        Point_3 q = point(target(hd,surface_mesh),surface_mesh);
-        constrained_edges[*eb]=std::make_pair(p,q);
-        cst_output << "2 " << p << " "  << q << "\n";
-      }
-    }
-  }
-  cst_output.close();
-
-  std::cerr << "# sharp edges = " << nb_sharp_edges << std::endl;
-
-  // Contract the surface mesh as much as possible
-  SMS::Count_stop_predicate<Surface_mesh> stop(0);
-
-  int r
-  = SMS::edge_collapse(surface_mesh
-                       ,stop
-                       ,CGAL::vertex_index_map(get(CGAL::vertex_external_index, surface_mesh))
-                       .halfedge_index_map(get(CGAL::halfedge_external_index, surface_mesh))
-                       .edge_is_constrained_map(constraints_map)
-                       .get_placement(placement)
-   );
-
-  std::cout << "\nFinished...\n" << r << " edges removed.\n"
-            << num_edges(surface_mesh) << " final edges.\n" ;
-  std::ofstream os(argc > 2 ? argv[2] : "out.off") ; os << surface_mesh ;
-
-  std::cout  << "Checking sharped edges were preserved...\n";
-  // check sharp edges were preserved
-  for(boost::tie(eb,ee) = edges(surface_mesh); eb != ee ; ++eb )
-  {
-    halfedge_descriptor hd = halfedge(*eb,surface_mesh);
-    if ( is_border(*eb,surface_mesh) ){
-      --nb_sharp_edges;
-      assert(
-             constrained_edges[*eb]==std::make_pair( point(source(hd,surface_mesh),surface_mesh),
-                                                     point(target(hd,surface_mesh),surface_mesh)));
-    }
-    else{
-      double angle = CGAL::Mesh_3::dihedral_angle(point(target(opposite(hd,surface_mesh),surface_mesh),surface_mesh),
-                                                  point(target(hd,surface_mesh),surface_mesh),
-                                                  point(target(next(hd,surface_mesh),surface_mesh),surface_mesh),
-                                                  point(target(next(opposite(hd,surface_mesh),surface_mesh),surface_mesh),surface_mesh));
-      if ( CGAL::abs(angle)<100 ){
-        --nb_sharp_edges;
-      assert(
-        constrained_edges[*eb]==std::make_pair( point(source(hd,surface_mesh),surface_mesh),
-                                                point(target(hd,surface_mesh),surface_mesh)));
-      }
-    }
-  }
-  std::cout  << "OK\n";
-  std::cerr << "# sharp edges = " << nb_sharp_edges << std::endl;
-
-  std::cout << "Check that no removable edge has been forgotten..." << std::endl;
-  r = SMS::edge_collapse(surface_mesh
-                         ,stop
-                         ,CGAL::vertex_index_map(get(CGAL::vertex_external_index, surface_mesh))
-                         .halfedge_index_map  (get(CGAL::halfedge_external_index, surface_mesh))
-                         .edge_is_constrained_map(constraints_map)
-                         .get_placement(placement)
-   );
-
-  assert(r==0);
-
-  if ( r==0 )
-    std::cout  << "OK\n";
-  else{
-    std::cout  << "ERROR! " << r << " edges removed!\n";
-    return 1;
-  }
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp
deleted file mode 100644
index 4cb9990..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-#include <iostream>
-#include <fstream>
-#include <map>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-
-// Midpoint placement policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
-
-//Placement wrapper
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
-
-// Stop-condition policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point_3;
-typedef CGAL::Polyhedron_3<Kernel> Surface_mesh;
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-//
-// BGL property map which indicates whether an edge is marked as non-removable
-//
-struct Border_is_constrained_edge_map{
-  const Surface_mesh* sm_ptr;
-  typedef boost::graph_traits<Surface_mesh>::edge_descriptor key_type;
-  typedef bool value_type;
-  typedef value_type reference;
-  typedef boost::readable_property_map_tag category;
-
-  Border_is_constrained_edge_map(const Surface_mesh& sm)
-    : sm_ptr(&sm)
-  {}
-
-  friend bool get(Border_is_constrained_edge_map m, const key_type& edge) {
-    return CGAL::is_border(edge, *m.sm_ptr);
-  }
-};
-
-//
-// Placement class
-//
-typedef SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
-                                   Border_is_constrained_edge_map > Placement;
-
-int main( int argc, char** argv )
-{
-  Surface_mesh surface_mesh;
-
-  if (argc!=2){
-    std::cerr<< "Usage: " << argv[0] << " input.off\n";
-    return 1;
-  }
-
-  std::ifstream is(argv[1]);
-  if(!is){
-    std::cerr<< "Filename provided is invalid\n";
-    return 1;
-  }
-
-  is >> surface_mesh  ;
-
-  // map used to check that constrained_edges and the points of its vertices
-  // are preserved at the end of the simplification
-  std::map<Surface_mesh::Halfedge_handle,std::pair<Point_3, Point_3> >constrained_edges;
-  std::size_t nb_border_edges=0;
-
-  for (Surface_mesh::Halfedge_iterator hit=surface_mesh.halfedges_begin(),
-                                       hit_end=surface_mesh.halfedges_end();
-                                       hit!=hit_end; ++hit )
-  {
-    if ( hit->is_border() ){
-      constrained_edges[hit]=std::make_pair( hit->opposite()->vertex()->point(),
-                                             hit->vertex()->point() );
-      ++nb_border_edges;
-    }
-  }
-
-  // Contract the surface mesh as much as possible
-  SMS::Count_stop_predicate<Surface_mesh> stop(0);
-
-  Border_is_constrained_edge_map bem(surface_mesh);
-
-
-  // This the actual call to the simplification algorithm.
-  // The surface mesh and stop conditions are mandatory arguments.
-  // The index maps are needed because the vertices and edges
-  // of this surface mesh lack an "id()" field.
-  int r = SMS::edge_collapse
-            (surface_mesh
-            ,stop
-            ,CGAL::vertex_index_map(get(CGAL::vertex_external_index,surface_mesh))
-                  .halfedge_index_map  (get(CGAL::halfedge_external_index  ,surface_mesh))
-                  .edge_is_constrained_map(bem)
-                  .get_placement(Placement(bem))
-            );
-
-  std::cout << "\nFinished...\n" << r << " edges removed.\n"
-            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
-
-  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
-
-  // now check!
-  for (Surface_mesh::Halfedge_iterator hit=surface_mesh.halfedges_begin(),
-                                       hit_end=surface_mesh.halfedges_end();
-                                       hit!=hit_end; ++hit )
-  {
-    if (hit->is_border()){
-      --nb_border_edges;
-      assert( constrained_edges[hit] ==
-              std::make_pair( hit->opposite()->vertex()->point(),
-                              hit->vertex()->point() ) );
-    }
-  }
-  assert( nb_border_edges==0 );
-
-  return 0 ;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp
deleted file mode 100644
index 88d1881..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-#include <iostream>
-#include <fstream>
-#include <map>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Surface_mesh.h>
-
-#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
-
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-
-// Midpoint placement policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
-
-//Placement wrapper
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
-
-// Stop-condition policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef Kernel::Point_3 Point_3;
-
-typedef CGAL::Surface_mesh<Point_3> Surface_mesh; 
-typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor;
-typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-//
-// BGL property map which indicates whether an edge is marked as non-removable
-//
-struct Border_is_constrained_edge_map{
-  const Surface_mesh* sm_ptr;
-  typedef edge_descriptor key_type;
-  typedef bool value_type;
-  typedef value_type reference;
-  typedef boost::readable_property_map_tag category;
-
-  Border_is_constrained_edge_map(const Surface_mesh& sm)
-    : sm_ptr(&sm)
-  {}
-
-  friend bool get(Border_is_constrained_edge_map m, const key_type& edge) {
-    return  CGAL::is_border(edge, *m.sm_ptr);
-  }
-};
-
-//
-// Placement class
-//
-typedef SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
-                                   Border_is_constrained_edge_map > Placement;
-
-int main( int argc, char** argv )
-{
-  Surface_mesh surface_mesh;
-
-  if (argc!=2){
-    std::cerr<< "Usage: " << argv[0] << " input.off\n";
-    return 1;
-  }
-
-  std::ifstream is(argv[1]);
-  if(!is){
-    std::cerr<< "Filename provided is invalid\n";
-    return 1;
-  }
-
-  is >> surface_mesh  ;
-  
-  Surface_mesh::Property_map<halfedge_descriptor,std::pair<Point_3, Point_3> > constrained_halfedges;
-
-  constrained_halfedges = surface_mesh.add_property_map<halfedge_descriptor,std::pair<Point_3, Point_3> >("h:vertices").first;
-
-  std::size_t nb_border_edges=0;
-  BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){
-    if(CGAL::is_border(hd,surface_mesh)){
-      constrained_halfedges[hd] = std::make_pair(surface_mesh.point(source(hd,surface_mesh)),
-                                                 surface_mesh.point(target(hd,surface_mesh)));
-      ++nb_border_edges;
-    }
-  }
-
-  // Contract the surface mesh as much as possible
-  SMS::Count_stop_predicate<Surface_mesh> stop(0);
-
-  Border_is_constrained_edge_map bem(surface_mesh);
-  
-  // This the actual call to the simplification algorithm.
-  // The surface mesh and stop conditions are mandatory arguments.
-  int r = SMS::edge_collapse
-            (surface_mesh
-            ,stop
-            ,CGAL::edge_is_constrained_map(bem)
-             .get_placement(Placement(bem))
-            );
-
-  std::cout << "\nFinished...\n" << r << " edges removed.\n"
-            << surface_mesh.number_of_edges() << " final edges.\n" ;
-
-  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
-
-  // now check!
-  BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){
-    if(CGAL::is_border(hd,surface_mesh)){
-      --nb_border_edges;
-      if(constrained_halfedges[hd] != std::make_pair(surface_mesh.point(source(hd,surface_mesh)),
-                                                     surface_mesh.point(target(hd,surface_mesh)))){
-        std::cerr << "oops. send us a bug report\n";
-      }
-
-    }
-  }
-  assert( nb_border_edges==0 );
-
-  return 0 ;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp
deleted file mode 100644
index 1a0a648..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-
-// Visitor base
-#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
-
-// Extended polyhedron items which include an id() field
-#include <CGAL/Polyhedron_items_with_id_3.h>
-
-// Stop-condition policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>
-
-// Non-default cost and placement policies
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h> 
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-
-typedef Kernel::Point_3 Point ;
-
-//
-// Setup an enriched polyhedron type which stores an id() field in the items
-//
-typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3> Surface_mesh; 
-
-typedef Surface_mesh::Halfedge_handle Halfedge_handle ;
-typedef Surface_mesh::Vertex_handle   Vertex_handle ;
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-typedef SMS::Edge_profile<Surface_mesh> Profile ;
-
-
-// The following is a Visitor that keeps track of the simplification process.
-// In this example the progress is printed real-time and a few statistics are
-// recorded (and printed in the end).
-//
-struct Stats
-{
-  Stats() 
-    : collected(0)
-    , processed(0)
-    , collapsed(0)
-    , non_collapsable(0)
-    , cost_uncomputable(0) 
-    , placement_uncomputable(0) 
-  {} 
-  
-  std::size_t collected ;
-  std::size_t processed ;
-  std::size_t collapsed ;
-  std::size_t non_collapsable ;
-  std::size_t cost_uncomputable  ;
-  std::size_t placement_uncomputable ; 
-} ;
-
-struct My_visitor : SMS::Edge_collapse_visitor_base<Surface_mesh>
-{
-  My_visitor( Stats* s) : stats(s){} 
-
-  // Called during the collecting phase for each edge collected.
-  void OnCollected( Profile const&, boost::optional<double> const& )
-  {
-    ++ stats->collected ;
-    std::cerr << "\rEdges collected: " << stats->collected << std::flush ;
-  }                
-  
-  // Called during the processing phase for each edge selected.
-  // If cost is absent the edge won't be collapsed.
-  void OnSelected(Profile const&          
-                 ,boost::optional<double> cost
-                 ,std::size_t             initial
-                 ,std::size_t             current
-                 )
-  {
-    ++ stats->processed ;
-    if ( !cost )
-      ++ stats->cost_uncomputable ;
-      
-    if ( current == initial )
-      std::cerr << "\n" << std::flush ;
-    std::cerr << "\r" << current << std::flush ;
-  }                
-  
-  // Called during the processing phase for each edge being collapsed.
-  // If placement is absent the edge is left uncollapsed.
-  void OnCollapsing(Profile const&          
-                   ,boost::optional<Point>  placement
-                   )
-  {
-    if ( !placement )
-      ++ stats->placement_uncomputable ;
-  }                
-  
-  // Called for each edge which failed the so called link-condition,
-  // that is, which cannot be collapsed because doing so would
-  // turn the surface mesh into a non-manifold.
-  void OnNonCollapsable( Profile const& )
-  {
-    ++ stats->non_collapsable;
-  }                
-  
-  // Called AFTER each edge has been collapsed
-  void OnCollapsed( Profile const&, Vertex_handle )
-  {
-    ++ stats->collapsed;
-  }                
-  
-  Stats* stats ;
-} ;
-
-
-int main( int argc, char** argv ) 
-{
-  Surface_mesh surface_mesh; 
-  
-  std::ifstream is(argv[1]) ; is >> surface_mesh ;
-
-  // The items in this polyhedron have an "id()" field 
-  // which the default index maps used in the algorithm
-  // need to get the index of a vertex/edge.
-  // However, the Polyhedron_3 class doesn't assign any value to
-  // this id(), so we must do it here:
-  int index = 0 ;
-  
-  for( Surface_mesh::Halfedge_iterator eb = surface_mesh.halfedges_begin()
-     , ee = surface_mesh.halfedges_end()
-     ; eb != ee
-     ; ++ eb
-     ) 
-    eb->id() = index++;
-
-  index = 0 ;
-  for( Surface_mesh::Vertex_iterator vb = surface_mesh.vertices_begin()
-     , ve = surface_mesh.vertices_end()
-     ; vb != ve
-     ; ++ vb
-     ) 
-    vb->id() = index++;
-    
-  // In this example, the simplification stops when the number of undirected edges
-  // drops below 10% of the initial count
-  SMS::Count_ratio_stop_predicate<Surface_mesh> stop(0.1);
- 
-  Stats stats ;
-  
-  My_visitor vis(&stats) ;
-    
-  // The index maps are not explicitelty passed as in the previous
-  // example because the surface mesh items have a proper id() field.
-  // On the other hand, we pass here explicit cost and placement
-  // function which differ from the default policies, ommited in
-  // the previous example.
-  int r = SMS::edge_collapse
-           (surface_mesh
-           ,stop
-           ,CGAL::get_cost     (SMS::Edge_length_cost  <Surface_mesh>())
-                 .get_placement(SMS::Midpoint_placement<Surface_mesh>())
-                 .visitor      (vis)
-           );
-  
-  std::cout << "\nEdges collected: "  << stats.collected
-            << "\nEdges proccessed: " << stats.processed
-            << "\nEdges collapsed: "  << stats.collapsed
-            << std::endl
-            << "\nEdges not collapsed due to topological constraints: "  << stats.non_collapsable
-            << "\nEdge not collapsed due to cost computation constraints: "  << stats.cost_uncomputable 
-            << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable 
-            << std::endl ; 
-            
-  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
-            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
-        
-  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
-  
-  return 0 ;      
-}
-
-// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp
deleted file mode 100644
index 60b275e..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-
-// Stop-condition policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
-
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-typedef CGAL::Polyhedron_3<Kernel> Surface_mesh; 
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-int main( int argc, char** argv ) 
-{
-  Surface_mesh surface_mesh;
-  
-  std::ifstream is(argv[1]) ; is >> surface_mesh ;
-
-  // This is a stop predicate (defines when the algorithm terminates).
-  // In this example, the simplification stops when the number of undirected edges
-  // left in the surface mesh drops below the specified number (1000)
-  SMS::Count_stop_predicate<Surface_mesh> stop(1000);
-     
-  // This the actual call to the simplification algorithm.
-  // The surface mesh and stop conditions are mandatory arguments.
-  // The index maps are needed because the vertices and edges
-  // of this surface mesh lack an "id()" field.
-  int r = SMS::edge_collapse
-            (surface_mesh
-            ,stop
-            ,CGAL::vertex_index_map(get(CGAL::vertex_external_index,surface_mesh)) 
-             .halfedge_index_map  (get(CGAL::halfedge_external_index  ,surface_mesh)) 
-             .get_cost (SMS::Edge_length_cost <Surface_mesh>())
-             .get_placement(SMS::Midpoint_placement<Surface_mesh>())
-            );
-  
-  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
-            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
-        
-  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
-  
-  return 0 ;      
-}
-
-// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp b/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp
deleted file mode 100644
index 4b3a6ea..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Surface_mesh.h>
-
-#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
-
-// Simplification function
-#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
-
-// Visitor base
-#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
-
-// Stop-condition policy
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>
-
-// Non-default cost and placement policies
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h> 
-
-typedef CGAL::Simple_cartesian<double> Kernel;
-
-typedef Kernel::Point_3 Point_3;
-
-//
-// Setup an enriched polyhedron type which stores an id() field in the items
-//
-typedef CGAL::Surface_mesh<Point_3> Surface_mesh; 
-
-typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor ;
-typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
-
-namespace SMS = CGAL::Surface_mesh_simplification ;
-
-typedef SMS::Edge_profile<Surface_mesh> Profile ;
-
-
-// The following is a Visitor that keeps track of the simplification process.
-// In this example the progress is printed real-time and a few statistics are
-// recorded (and printed in the end).
-//
-struct Stats
-{
-  Stats() 
-    : collected(0)
-    , processed(0)
-    , collapsed(0)
-    , non_collapsable(0)
-    , cost_uncomputable(0) 
-    , placement_uncomputable(0) 
-  {} 
-  
-  std::size_t collected ;
-  std::size_t processed ;
-  std::size_t collapsed ;
-  std::size_t non_collapsable ;
-  std::size_t cost_uncomputable  ;
-  std::size_t placement_uncomputable ; 
-} ;
-
-struct My_visitor : SMS::Edge_collapse_visitor_base<Surface_mesh>
-{
-  My_visitor( Stats* s) : stats(s){} 
-
-  // Called during the collecting phase for each edge collected.
-  void OnCollected( Profile const&, boost::optional<double> const& )
-  {
-    ++ stats->collected ;
-    std::cerr << "\rEdges collected: " << stats->collected << std::flush ;
-  }                
-  
-  // Called during the processing phase for each edge selected.
-  // If cost is absent the edge won't be collapsed.
-  void OnSelected(Profile const&          
-                 ,boost::optional<double> cost
-                 ,std::size_t             initial
-                 ,std::size_t             current
-                 )
-  {
-    ++ stats->processed ;
-    if ( !cost )
-      ++ stats->cost_uncomputable ;
-      
-    if ( current == initial )
-      std::cerr << "\n" << std::flush ;
-    std::cerr << "\r" << current << std::flush ;
-  }                
-  
-  // Called during the processing phase for each edge being collapsed.
-  // If placement is absent the edge is left uncollapsed.
-  void OnCollapsing(Profile const&          
-                   ,boost::optional<Point>  placement
-                   )
-  {
-    if ( !placement )
-      ++ stats->placement_uncomputable ;
-  }                
-  
-  // Called for each edge which failed the so called link-condition,
-  // that is, which cannot be collapsed because doing so would
-  // turn the surface mesh into a non-manifold.
-  void OnNonCollapsable( Profile const& )
-  {
-    ++ stats->non_collapsable;
-  }                
-  
-  // Called AFTER each edge has been collapsed
-  void OnCollapsed( Profile const&, vertex_descriptor )
-  {
-    ++ stats->collapsed;
-  }                
-  
-  Stats* stats ;
-} ;
-
-
-int main( int argc, char** argv ) 
-{
-  Surface_mesh surface_mesh; 
-  
-  std::ifstream is(argv[1]) ; is >> surface_mesh ;
-
-  // In this example, the simplification stops when the number of undirected edges
-  // drops below 10% of the initial count
-  SMS::Count_ratio_stop_predicate<Surface_mesh> stop(0.1);
- 
-  Stats stats ;
-  
-  My_visitor vis(&stats) ;
-    
-  // The index maps are not explicitelty passed as in the previous
-  // example because the surface mesh items have a proper id() field.
-  // On the other hand, we pass here explicit cost and placement
-  // function which differ from the default policies, ommited in
-  // the previous example.
-  int r = SMS::edge_collapse
-           (surface_mesh
-           ,stop
-           ,CGAL::get_cost     (SMS::Edge_length_cost  <Surface_mesh>())
-                 .get_placement(SMS::Midpoint_placement<Surface_mesh>())
-                 .visitor      (vis)
-           );
-  
-  std::cout << "\nEdges collected: "  << stats.collected
-            << "\nEdges proccessed: " << stats.processed
-            << "\nEdges collapsed: "  << stats.collapsed
-            << std::endl
-            << "\nEdges not collapsed due to topological constraints: "  << stats.non_collapsable
-            << "\nEdge not collapsed due to cost computation constraints: "  << stats.cost_uncomputable 
-            << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable 
-            << std::endl ; 
-            
-  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
-            << num_edges(surface_mesh) << " final edges.\n" ;
-        
-  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
-  
-  return 0 ;      
-}
-
-// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_mesher/CMakeLists.txt
deleted file mode 100644
index ea0a7f3..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_mesher/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Surface_mesher_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-include_directories(../../include)
-
-find_package(CGAL QUIET COMPONENTS ImageIO)
-
-if ( CGAL_FOUND AND CGAL_ImageIO_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  create_single_source_cgal_program( "mesh_a_3d_gray_image.cpp" )
-  create_single_source_cgal_program( "mesh_an_implicit_function.cpp" )
-
-else()
-  if(RUNNING_CGAL_AUTO_TEST)
-    # Just to avoid a warning from CMake if that variable is set on the command line...
-  endif()
-  
-  message(STATUS "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_modeling/CMakeLists.txt
deleted file mode 100644
index 66a5f51..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_modeling/CMakeLists.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Surface_modeling_ )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
-  if (EIGEN3_FOUND)
-    include( ${EIGEN3_USE_FILE} )
-    include( CGAL_CreateSingleSourceCGALProgram )
-
-    include_directories (BEFORE "../../include")
-
-    create_single_source_cgal_program( "all_roi_assign_example.cpp" )
-    create_single_source_cgal_program( "all_roi_assign_example_custom_polyhedron.cpp" )
-    create_single_source_cgal_program( "all_roi_assign_example_Surface_mesh.cpp" )
-    create_single_source_cgal_program( "custom_weight_for_edges_example.cpp" )
-    create_single_source_cgal_program( "deform_polyhedron_with_custom_pmap_example.cpp" )
-    create_single_source_cgal_program( "k_ring_roi_translate_rotate_example.cpp" )
-    create_single_source_cgal_program( "k_ring_roi_translate_rotate_Surface_mesh.cpp" )
-
-    find_package( OpenMesh QUIET )
-    if ( OpenMesh_FOUND )
-    include( UseOpenMesh )
-      create_single_source_cgal_program( "all_roi_assign_example_with_OpenMesh.cpp" )
-      target_link_libraries( all_roi_assign_example_with_OpenMesh ${OPENMESH_LIBRARIES} )
-    else()
-      message(STATUS "Example that use OpenMesh will not be compiled.")
-    endif()
-
-  else()
-    message(STATUS "NOTICE: These examples require the Eigen library, version 3.2 or later and will not be compiled.")
-  endif()
-else()
-  
-    message(STATUS "NOTICE: These exmaples require the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp b/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp
deleted file mode 100644
index 562b996..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-#include <fstream>
-#include <map>
-#include <cmath>
-#include <CGAL/property_map.h>
-
-struct Custom_point_3{
-  // Required by File_scanner_OFF
-  struct R{
-    typedef double RT;
-  };
-
-  double coords[3];
-  Custom_point_3(){}
-  Custom_point_3(double x, double y, double z)
-  { coords[0]=x; coords[1]=y; coords[2]=z; }
-  Custom_point_3(double x, double y, double z, double w)
-  { coords[0]=x/w; coords[1]=y/w; coords[2]=z/w; }
-
-  double x() const {return coords[0];}
-  double y() const {return coords[1];}
-  double z() const {return coords[2];}
-
-  double& operator[](int i)       { return coords[i]; }
-  double  operator[](int i) const { return coords[i]; }
-
-  friend std::ostream& operator<<(std::ostream& out, const Custom_point_3& p)
-  {
-    out << p.x() << " " << p.y() << " " << p.z();
-    return out;
-  }
-
-  friend std::istream& operator<<(std::istream& in, Custom_point_3& p)
-  {
-    in >> p.coords[0] >> p.coords[1] >> p.coords[2];
-    return in;
-  }
-};
-
-#include <CGAL/basic.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-// Halfedge adapters for Polyhedron_3
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/boost/graph/properties_Polyhedron_3.h>
-
-#include <CGAL/Surface_mesh_deformation.h>
-
-struct Custom_traits{
-  typedef Custom_point_3 Point_3;
-  struct Plane_3{};
-};
-
-typedef CGAL::Polyhedron_3<Custom_traits>       Polyhedron;
-
-typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
-typedef boost::graph_traits<Polyhedron>::vertex_iterator      vertex_iterator;
-typedef boost::graph_traits<Polyhedron>::halfedge_descriptor  halfedge_descriptor;
-typedef boost::graph_traits<Polyhedron>::halfedge_iterator    halfedge_iterator;
-
-typedef std::map<vertex_descriptor, std::size_t>   Internal_vertex_map;
-typedef std::map<halfedge_descriptor, std::size_t>     Internal_hedge_map;
-
-typedef boost::associative_property_map<Internal_vertex_map>   Vertex_index_map;
-typedef boost::associative_property_map<Internal_hedge_map>     Hedge_index_map;
-
-typedef CGAL::Surface_mesh_deformation<Polyhedron, Vertex_index_map, Hedge_index_map> Surface_mesh_deformation;
-
-int main()
-{
-  Polyhedron mesh;
-  std::ifstream input("data/plane.off");
-
-  if ( !input || !(input >> mesh) || mesh.empty() ) {
-    std::cerr<< "Cannot open  data/plane.off" << std::endl;
-    return 1;
-  }
-
-  // Index maps must contain an index unique per vertex starting from 0
-  // to the total number of vertices
-  Internal_vertex_map internal_vertex_index_map;
-  Vertex_index_map vertex_index_map(internal_vertex_index_map);
-  vertex_iterator vb, ve;
-  std::size_t counter = 0;
-  for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) {
-    put(vertex_index_map, *vb, counter);
-  }
-
-  Internal_hedge_map internal_hedge_index_map;
-  Hedge_index_map hedge_index_map(internal_hedge_index_map);
-  counter = 0;
-  halfedge_iterator eb, ee;
-  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) {
-    put(hedge_index_map, *eb, counter);
-  }
-
-  Surface_mesh_deformation deform_mesh(mesh, vertex_index_map, hedge_index_map);
-
-  // Insert the whole mesh as region of interest
-  boost::tie(vb, ve) = vertices(mesh);
-  deform_mesh.insert_roi_vertices(vb, ve);
-
-  // Insert two control vertices
-  vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213);
-  vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157);
-  deform_mesh.insert_control_vertex(control_1);
-  deform_mesh.insert_control_vertex(control_2);
-
-  // The definition of the ROI and the control vertices is done, call preprocess
-  bool is_matrix_factorization_OK = deform_mesh.preprocess();
-  if(!is_matrix_factorization_OK){
-    std::cerr << "Check documentation of preprocess()" << std::endl;
-    return 1;
-  }
-
-  // Use set_target_position() to set the constained position
-  // of control_1. control_2 remains at the last assigned positions
-  Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60);
-  deform_mesh.set_target_position(control_1, constrained_pos_1);
-
-  // Deform the mesh, the positions of vertices of 'mesh' are updated
-  deform_mesh.deform();
-  // The function deform() can be called several times if the convergence has not been reached yet
-  deform_mesh.deform();
-
-  // Set the constained position of control_2
-  Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70);
-  deform_mesh.set_target_position(control_2, constrained_pos_2);
-
-
-  // Call the function deform() with one-time parameters:
-  // iterate 10 times and do not use energy based termination criterion
-  deform_mesh.deform(10, 0.0);
-
-  std::ofstream output("deform_1.off");
-  output << mesh; // save deformed mesh
-  output.close();
-
-  // Add another control vertex
-  vertex_descriptor control_3 = *CGAL::cpp11::next(vb, 92);
-  deform_mesh.insert_control_vertex(control_3);
-
-  // The prepocessing step is again needed
-  if(!deform_mesh.preprocess()) {
-    std::cerr << "Check documentation of preprocess()" << std::endl;
-    return 1;
-  }
-
-  Surface_mesh_deformation::Point constrained_pos_3(0.55, 0.30, -0.70);
-  deform_mesh.set_target_position(control_3, constrained_pos_3);
-
-  deform_mesh.deform(15, 0.0);
-
-  output.open("deform_2.off");
-  output << mesh;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/custom_weight_for_edges_example.cpp b/3rdparty/CGAL-4.6/examples/Surface_modeling/custom_weight_for_edges_example.cpp
deleted file mode 100644
index 8fd1ac4..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_modeling/custom_weight_for_edges_example.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-// HalfedgeGraph adapters for Polyhedron_3
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/boost/graph/properties_Polyhedron_3.h>
-
-#include <CGAL/Surface_mesh_deformation.h>
-
-#include <fstream>
-#include <map>
-#include <CGAL/property_map.h>
-
-typedef CGAL::Simple_cartesian<double>   Kernel;
-typedef CGAL::Polyhedron_3<Kernel>       Polyhedron;
-
-typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
-typedef boost::graph_traits<Polyhedron>::vertex_iterator      vertex_iterator;
-typedef boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
-typedef boost::graph_traits<Polyhedron>::halfedge_iterator    halfedge_iterator;
-
-typedef std::map<vertex_descriptor, std::size_t>   Internal_vertex_map;
-typedef std::map<halfedge_descriptor, std::size_t>     Internal_hedge_map;
-
-typedef boost::associative_property_map<Internal_vertex_map>   Vertex_index_map;
-typedef boost::associative_property_map<Internal_hedge_map>     Hedge_index_map;
-
-// A model of SurfaceModelingWeights using a map of pre-computed weights
-struct Weights_from_map
-{
-  typedef Polyhedron Halfedge_graph;
-  Weights_from_map(std::map<halfedge_descriptor, double>* weight_map) : weight_map(weight_map)
-  { }
-  template<class VertexPointMap>
-  double operator()(halfedge_descriptor e, Polyhedron& /*P*/, VertexPointMap /*vpm*/) {
-    return (*weight_map)[e];
-  }
-  std::map<halfedge_descriptor, double>* weight_map;
-};
-
-typedef CGAL::Surface_mesh_deformation<Polyhedron, Vertex_index_map, Hedge_index_map, CGAL::ORIGINAL_ARAP, Weights_from_map> Surface_mesh_deformation;
-
-int main()
-{
-  Polyhedron mesh;
-  std::ifstream input("data/plane.off");
-
-  if ( !input || !(input >> mesh) || mesh.empty() ) {
-    std::cerr << "Cannot open  data/plane.off" << std::endl;
-    return 1;
-  }
-
-  std::map<halfedge_descriptor, double> weight_map;
-  // Store all the weights
-  halfedge_iterator eb, ee;
-  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb)
-  {
-    weight_map[*eb] = 1.0; // store some precomputed weights
-  }
-
-  // Create and initialize the vertex index map
-  Internal_vertex_map internal_vertex_index_map;
-  Vertex_index_map vertex_index_map(internal_vertex_index_map);
-  vertex_iterator vb, ve;
-  std::size_t counter = 0;
-  for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) {
-    put(vertex_index_map, *vb, counter);
-  }
-
-  // Create and initialize the halfedge index map
-  Internal_hedge_map internal_hedge_index_map;
-  Hedge_index_map hedge_index_map(internal_hedge_index_map);
-  counter = 0;
-  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) {
-    put(hedge_index_map, *eb, counter);
-  }
-  Surface_mesh_deformation deform_mesh(mesh,
-                                       vertex_index_map,
-                                       hedge_index_map,
-                                       get(CGAL::vertex_point, mesh),
-                                       Weights_from_map(&weight_map));
-
-  // Deform mesh as desired
-  // .....
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/CMakeLists.txt
deleted file mode 100644
index a633ce8..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/CMakeLists.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-# This is the CMake script for compiling this folder.
-
-project( Surface_reconstruction_points_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-  cmake_policy(VERSION 2.8.4)
-else()
-  cmake_policy(VERSION 2.6)
-endif()
-
-# Require packages new or improved since CGAL 3.5 beta 1
-include_directories (BEFORE ../../../Installation/include)
-include_directories (BEFORE ../../../Point_set_processing_3/include)
-include_directories (BEFORE ../../../Surface_mesher/include)
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Installation/cmake/modules ${CMAKE_MODULE_PATH})
-
-# Include this package's headers first
-include_directories (BEFORE . include ../../include)
-
-# Find CGAL
-find_package(CGAL)
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  # VisualC++ optimization for applications dealing with large data
-  if (MSVC)
-    # Use /FR to turn on IntelliSense
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
-
-    # Allow Windows applications to use up to 3GB of RAM
-    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
-
-    # Turn off stupid VC++ warnings
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4311 /wd4800 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
-
-    # Print new compilation options
-    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
-    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
-    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
-    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
-  endif()
-
-  # Temporary debugging stuff
-  ADD_DEFINITIONS( "-DDEBUG_TRACE" ) # turn on traces
-
-  # Find Eigen3 (requires 3.1.0 or greater)
-  find_package(Eigen3 3.1.0)
-  if (EIGEN3_FOUND)
-    include( ${EIGEN3_USE_FILE} )
-  endif()
-  
-  if (EIGEN3_FOUND)
-    # Executables that require Eigen 3
-    create_single_source_cgal_program( "poisson_reconstruction_example.cpp" )
-    create_single_source_cgal_program( "poisson_reconstruction.cpp" )
-  else()
-    message(STATUS "NOTICE: The examples need Eigen 3.1 (or greater) will not be compiled.")
-  endif()
-
-  
-else()
-
-    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
-
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/include/compute_normal.h b/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/include/compute_normal.h
deleted file mode 100644
index ad8c190..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/include/compute_normal.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _COMPUTE_NORMAL_
-#define _COMPUTE_NORMAL_
-
-template <class Facet, class Kernel>
-typename Kernel::Vector_3 compute_facet_normal(const Facet& f)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Facet::Halfedge_around_facet_const_circulator HF_circulator;
-  Vector normal = CGAL::NULL_VECTOR;
-  HF_circulator he = f.facet_begin();
-  HF_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    const Point& prev = he->prev()->vertex()->point();
-    const Point& curr = he->vertex()->point();
-    const Point& next = he->next()->vertex()->point();
-    Vector n = CGAL::cross_product(next-curr,prev-curr);
-    normal = normal + (n / std::sqrt(n*n));
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-template <class Vertex, class Kernel>
-typename Kernel::Vector_3 compute_vertex_normal(const Vertex& v)
-{
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Vertex::Halfedge_around_vertex_const_circulator HV_circulator;
-  typedef typename Vertex::Facet Facet;
-  Vector normal = CGAL::NULL_VECTOR;
-  HV_circulator he = v.vertex_begin();
-  HV_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    if(!he->is_border())
-    {
-      Vector n = compute_facet_normal<Facet,Kernel>(*he->facet());
-      normal = normal + (n / std::sqrt(n*n));
-    }
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-#endif // _COMPUTE_NORMAL_
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp b/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp
deleted file mode 100644
index 8aaa61b..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-// poisson_reconstruction.cpp
-
-//----------------------------------------------------------
-// Poisson Delaunay Reconstruction method.
-// Reads a point set or a mesh's set of vertices, reconstructs a surface using Poisson,
-// and saves the surface.
-// Output format is .off.
-//----------------------------------------------------------
-// poisson_reconstruction file_in file_out [options]
-
-// CGAL
-#include <CGAL/AABB_tree.h> // must be included before kernel
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_face_graph_triangle_primitive.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Timer.h>
-#include <CGAL/trace.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Surface_mesh_default_triangulation_3.h>
-#include <CGAL/make_surface_mesh.h>
-#include <CGAL/Poisson_implicit_surface_3.h>
-#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
-#include <CGAL/Poisson_reconstruction_function.h>
-#include <CGAL/Point_with_normal_3.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/compute_average_spacing.h>
-
-#include "compute_normal.h"
-
-#include <deque>
-#include <cstdlib>
-#include <fstream>
-#include <math.h>
-
-
-// ----------------------------------------------------------------------------
-// Types
-// ----------------------------------------------------------------------------
-
-// kernel
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-
-// Simple geometric types
-typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
-typedef Kernel::Sphere_3 Sphere;
-typedef std::deque<Point_with_normal> PointList;
-
-// polyhedron
-typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
-
-// Poisson implicit function
-typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
-
-// Surface mesher
-typedef CGAL::Surface_mesh_default_triangulation_3 STr;
-typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
-typedef CGAL::Poisson_implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
-
-// AABB tree
-typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
-typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
-typedef CGAL::AABB_tree<AABB_traits> AABB_tree;
-
-
-struct Counter {
-  int i, N;
-  Counter(int N)
-    : i(0), N(N)
-  {}
-
-  void operator()()
-  {
-    i++;
-    if(i == N){
-      std::cerr << "Counter reached " << N << std::endl;
-    }
-  }
-  
-};
-
-struct InsertVisitor {
-
-  Counter& c;
-  InsertVisitor(Counter& c)
-    : c(c)
-  {}
-
-  void before_insertion()
-  {
-    c();
-  }
-
-};
-
-
-// ----------------------------------------------------------------------------
-// main()
-// ----------------------------------------------------------------------------
-
-int main(int argc, char * argv[])
-{
-    std::cerr << "Poisson Delaunay Reconstruction method" << std::endl;
-
-    //***************************************
-    // decode parameters
-    //***************************************
-
-    // usage
-    if (argc-1 < 2)
-    {
-      std::cerr << "Reads a point set or a mesh's set of vertices, reconstructs a surface using Poisson,\n";
-      std::cerr << "and saves the surface.\n";
-      std::cerr << "\n";
-      std::cerr << "Usage: " << argv[0] << " file_in file_out [options]\n";
-      std::cerr << "Input file formats are .off (mesh) and .xyz or .pwn (point set).\n";
-      std::cerr << "Output file format is .off.\n";
-      std::cerr << "Options:\n";
-      std::cerr << "  -sm_radius <float>     Radius upper bound (default=100 * average spacing)\n";
-      std::cerr << "  -sm_distance <float>   Distance upper bound (default=0.25 * average spacing)\n";
-      
-      return EXIT_FAILURE;
-    }
-
-    // Poisson options
-    FT sm_angle = 20.0; // Min triangle angle (degrees).
-    FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
-    FT sm_distance = 0.25; // Approximation error w.r.t. point set average spacing.
-    std::string solver_name = "eigen"; // Sparse linear solver name.
-    double approximation_ratio = 0.02;
-    double average_spacing_ratio = 5;
-
-    // decode parameters
-    std::string input_filename  = argv[1];
-    std::string output_filename = argv[2];
-    for (int i=3; i+1<argc ; ++i)
-    {
-      if (std::string(argv[i])=="-sm_radius")
-        sm_radius = atof(argv[++i]);
-      else if (std::string(argv[i])=="-sm_distance")
-        sm_distance = atof(argv[++i]);
-      else if (std::string(argv[i])=="-solver")
-        solver_name = argv[++i];
-      else if (std::string(argv[i])=="-approx")
-        approximation_ratio = atof(argv[++i]);
-      else if (std::string(argv[i])=="-ratio")
-        average_spacing_ratio = atof(argv[++i]);
-      else {
-        std::cerr << "Error: invalid option " << argv[i] << "\n";
-        return EXIT_FAILURE;
-      }
-    }
-
-    CGAL::Timer task_timer; task_timer.start();
-
-    //***************************************
-    // Loads mesh/point set
-    //***************************************
-
-    PointList points;
-
-    // If OFF file format
-    std::cerr << "Open " << input_filename << " for reading..." << std::endl;
-    std::string extension = input_filename.substr(input_filename.find_last_of('.'));
-    if (extension == ".off" || extension == ".OFF")
-    {
-      // Reads the mesh file in a polyhedron
-      std::ifstream stream(input_filename.c_str());
-      Polyhedron input_mesh;
-      CGAL::scan_OFF(stream, input_mesh, true /* verbose */);
-      if(!stream || !input_mesh.is_valid() || input_mesh.empty())
-      {
-        std::cerr << "Error: cannot read file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-      }
-
-      // Converts Polyhedron vertices to point set.
-      // Computes vertices normal from connectivity.
-      Polyhedron::Vertex_const_iterator v;
-      for (v = input_mesh.vertices_begin(); v != input_mesh.vertices_end(); v++)
-      {
-        const Point& p = v->point();
-        Vector n = compute_vertex_normal<Polyhedron::Vertex,Kernel>(*v);
-        points.push_back(Point_with_normal(p,n));
-      }
-    }
-    // If XYZ file format
-    else if (extension == ".xyz" || extension == ".XYZ" ||
-             extension == ".pwn" || extension == ".PWN")
-    {
-      // Reads the point set file in points[].
-      // Note: read_xyz_points_and_normals() requires an iterator over points
-      // + property maps to access each point's position and normal.
-      // The position property map can be omitted here as we use iterators over Point_3 elements.
-      std::ifstream stream(input_filename.c_str());
-      if (!stream ||
-          !CGAL::read_xyz_points_and_normals(
-                                stream,
-                                std::back_inserter(points),
-                                CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type())))
-      {
-        std::cerr << "Error: cannot read file " << input_filename << std::endl;
-        return EXIT_FAILURE;
-      }
-    }
-    else
-    {
-      std::cerr << "Error: cannot read file " << input_filename << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Prints status
-    int nb_points = points.size();
-    std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
-                                                        << task_timer.time() << " seconds"
-                                                        << std::endl;
-    task_timer.reset();
-
-    //***************************************
-    // Checks requirements
-    //***************************************
-
-    if (nb_points == 0)
-    {
-      std::cerr << "Error: empty point set" << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    bool points_have_normals = (points.begin()->normal() != CGAL::NULL_VECTOR);
-    if ( ! points_have_normals )
-    {
-      std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    CGAL::Timer reconstruction_timer; reconstruction_timer.start();
-
-    
-    Counter counter(std::distance(points.begin(), points.end()));
-    InsertVisitor visitor(counter) ;
-    
-
-    //***************************************
-    // Computes implicit function
-    //***************************************
-
-    std::cerr << "Computes Poisson implicit function...\n";
-
-    // Creates implicit function from the read points.
-    // Note: this method requires an iterator over points
-    // + property maps to access each point's position and normal.
-    // The position property map can be omitted here as we use iterators over Point_3 elements.
-    Poisson_reconstruction_function function(
-                              points.begin(), points.end(),
-                              CGAL::make_identity_property_map(PointList::value_type()),
-                              CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()),
-                              visitor);
-
-    #ifdef CGAL_EIGEN3_ENABLED
-    {
-      if (solver_name == "eigen")
-      {
-        std::cerr << "Use Eigen 3\n";
-        CGAL::Eigen_solver_traits<Eigen::ConjugateGradient<CGAL::Eigen_sparse_symmetric_matrix<double>::EigenType> > solver;
-        if ( ! function.compute_implicit_function(solver, visitor, 
-                                                approximation_ratio,
-                                                average_spacing_ratio) )
-        {
-          std::cerr << "Error: cannot compute implicit function" << std::endl;
-          return EXIT_FAILURE;
-        }
-      }    
-      else
-      {
-        std::cerr << "Error: invalid solver " << solver_name << "\n";
-        return EXIT_FAILURE;
-      }
-    }
-    #else
-    {
-      std::cerr << "Error: invalid solver " << solver_name << "\n";
-      return EXIT_FAILURE;
-    }
-    #endif
-
-
-    // Prints status
-    std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
-    task_timer.reset();
-
-    //***************************************
-    // Surface mesh generation
-    //***************************************
-
-    std::cerr << "Surface meshing...\n";
-
-    // Computes average spacing
-    FT average_spacing = CGAL::compute_average_spacing(points.begin(), points.end(),
-                                                       6 /* knn = 1 ring */);
-
-    // Gets one point inside the implicit surface
-    Point inner_point = function.get_inner_point();
-    FT inner_point_value = function(inner_point);
-    if(inner_point_value >= 0.0)
-    {
-      std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Gets implicit function's radius
-    Sphere bsphere = function.bounding_sphere();
-    FT radius = std::sqrt(bsphere.squared_radius());
-
-    // Defines the implicit surface: requires defining a
-  	// conservative bounding sphere centered at inner point.
-    FT sm_sphere_radius = 5.0 * radius;
-    FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
-    Surface_3 surface(function,
-                      Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
-                      sm_dichotomy_error/sm_sphere_radius);
-
-    // Defines surface mesh generation criteria
-    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
-                                                        sm_radius*average_spacing,  // Max triangle size
-                                                        sm_distance*average_spacing); // Approximation error
-
-    CGAL_TRACE_STREAM << "  make_surface_mesh(sphere center=("<<inner_point << "),\n"
-                      << "                    sphere radius="<<sm_sphere_radius<<",\n"
-                      << "                    angle="<<sm_angle << " degrees,\n"
-                      << "                    triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
-                      << "                    distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
-                      << "                    dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
-                      << "                    Manifold_with_boundary_tag)\n";
-
-    // Generates surface mesh with manifold option
-    STr tr; // 3D Delaunay triangulation for surface mesh generation
-    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
-    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
-                            surface,                              // implicit surface
-                            criteria,                             // meshing criteria
-                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
-
-    // Prints status
-    std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
-                                     << tr.number_of_vertices() << " output vertices"
-                                     << std::endl;
-    task_timer.reset();
-
-    if(tr.number_of_vertices() == 0)
-      return EXIT_FAILURE;
-
-    // Converts to polyhedron
-    Polyhedron output_mesh;
-    CGAL::output_surface_facets_to_polyhedron(c2t3, output_mesh);
-
-    // Prints total reconstruction duration
-    std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";
-
-    //***************************************
-    // Computes reconstruction error
-    //***************************************
-
-    // Constructs AABB tree and computes internal KD-tree
-    // data structure to accelerate distance queries
-    AABB_tree tree(faces(output_mesh).first, faces(output_mesh).second, output_mesh);
-    tree.accelerate_distance_queries();
-
-    // Computes distance from each input point to reconstructed mesh
-    double max_distance = DBL_MIN;
-    double avg_distance = 0;
-    for (PointList::const_iterator p=points.begin(); p!=points.end(); p++)
-    {
-      double distance = std::sqrt(tree.squared_distance(*p));
-
-      max_distance = (std::max)(max_distance, distance);
-      avg_distance += distance;
-    }
-    avg_distance /= double(points.size());
-
-    std::cerr << "Reconstruction error:\n"
-              << "  max = " << max_distance << " = " << max_distance/average_spacing << " * average spacing\n"
-              << "  avg = " << avg_distance << " = " << avg_distance/average_spacing << " * average spacing\n";
-
-    //***************************************
-    // Saves reconstructed surface mesh
-    //***************************************
-
-    std::cerr << "Write file " << output_filename << std::endl << std::endl;
-    std::ofstream out(output_filename.c_str());
-    out << output_mesh;
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp b/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp
deleted file mode 100644
index 4746f3b..0000000
--- a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <CGAL/trace.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/Surface_mesh_default_triangulation_3.h>
-#include <CGAL/make_surface_mesh.h>
-#include <CGAL/Implicit_surface_3.h>
-#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
-#include <CGAL/Poisson_reconstruction_function.h>
-#include <CGAL/Point_with_normal_3.h>
-#include <CGAL/property_map.h>
-#include <CGAL/IO/read_xyz_points.h>
-#include <CGAL/compute_average_spacing.h>
-
-#include <vector>
-#include <fstream>
-
-// Types
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
-typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
-typedef Kernel::Sphere_3 Sphere;
-typedef std::vector<Point_with_normal> PointList;
-typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
-typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
-typedef CGAL::Surface_mesh_default_triangulation_3 STr;
-typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
-typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
-
-int main(void)
-{
-    // Poisson options
-    FT sm_angle = 20.0; // Min triangle angle in degrees.
-    FT sm_radius = 30; // Max triangle size w.r.t. point set average spacing.
-    FT sm_distance = 0.375; // Surface Approximation error w.r.t. point set average spacing.
-
-    // Reads the point set file in points[].
-    // Note: read_xyz_points_and_normals() requires an iterator over points
-    // + property maps to access each point's position and normal.
-    // The position property map can be omitted here as we use iterators over Point_3 elements.
-    PointList points;
-    std::ifstream stream("data/kitten.xyz");
-    if (!stream ||
-        !CGAL::read_xyz_points_and_normals(
-                              stream,
-                              std::back_inserter(points),
-                              CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type())))
-    {
-      std::cerr << "Error: cannot read file data/kitten.xyz" << std::endl;
-      return EXIT_FAILURE;
-    }
-
-    // Creates implicit function from the read points using the default solver.
-
-    // Note: this method requires an iterator over points
-    // + property maps to access each point's position and normal.
-    // The position property map can be omitted here as we use iterators over Point_3 elements.
-    Poisson_reconstruction_function function(points.begin(), points.end(),
-                                             CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()) );
-
-    // Computes the Poisson indicator function f()
-    // at each vertex of the triangulation.
-    if ( ! function.compute_implicit_function() ) 
-      return EXIT_FAILURE;
-
-    // Computes average spacing
-    FT average_spacing = CGAL::compute_average_spacing(points.begin(), points.end(),
-                                                       6 /* knn = 1 ring */);
-
-    // Gets one point inside the implicit surface
-    // and computes implicit function bounding sphere radius.
-    Point inner_point = function.get_inner_point();
-    Sphere bsphere = function.bounding_sphere();
-    FT radius = std::sqrt(bsphere.squared_radius());
-
-    // Defines the implicit surface: requires defining a
-    // conservative bounding sphere centered at inner point.
-    FT sm_sphere_radius = 5.0 * radius;
-    FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
-    Surface_3 surface(function,
-                      Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
-                      sm_dichotomy_error/sm_sphere_radius);
-
-    // Defines surface mesh generation criteria
-    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
-                                                        sm_radius*average_spacing,  // Max triangle size
-                                                        sm_distance*average_spacing); // Approximation error
-
-    // Generates surface mesh with manifold option
-    STr tr; // 3D Delaunay triangulation for surface mesh generation
-    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
-    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
-                            surface,                              // implicit surface
-                            criteria,                             // meshing criteria
-                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
-
-    if(tr.number_of_vertices() == 0)
-      return EXIT_FAILURE;
-
-    // saves reconstructed surface mesh
-    std::ofstream out("kitten_poisson-20-30-0.375.off");
-    Polyhedron output_mesh;
-    CGAL::output_surface_facets_to_polyhedron(c2t3, output_mesh);
-    out << output_mesh;
-
-    return EXIT_SUCCESS;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Triangulation/CMakeLists.txt
deleted file mode 100644
index d8c08e4..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Triangulation_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-  
-  find_package(Eigen3 3.1.0) 
-  if (EIGEN3_FOUND) 
-    include( ${EIGEN3_USE_FILE} ) 
-    include_directories (BEFORE "../../include")
-
-    create_single_source_cgal_program( "barycentric_subdivision.cpp" )
-    create_single_source_cgal_program( "delaunay_triangulation.cpp" )
-    create_single_source_cgal_program( "triangulation.cpp" )
-    create_single_source_cgal_program( "triangulation_data_structure_dynamic.cpp" )
-    create_single_source_cgal_program( "triangulation_data_structure_static.cpp" )
-
-  else()
-    message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.")
-  endif()
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/delaunay_triangulation.cpp b/3rdparty/CGAL-4.6/examples/Triangulation/delaunay_triangulation.cpp
deleted file mode 100644
index 3c1fa8b..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation/delaunay_triangulation.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <CGAL/Epick_d.h>
-#include <CGAL/point_generators_d.h>
-#include <CGAL/Delaunay_triangulation.h>
-#include <CGAL/algorithm.h>
-#include <CGAL/Timer.h>
-#include <CGAL/assertions.h>
-
-#include <iostream>
-#include <iterator>
-#include <vector>
-
-const int D=5;
-typedef CGAL::Epick_d< CGAL::Dimension_tag<D> >               K;
-typedef CGAL::Delaunay_triangulation<K>                       T;
-// The triangulation uses the default instanciation of the 
-// TriangulationDataStructure template parameter
-
-int main(int argc, char **argv)
-{
-  int N = 100; if( argc > 2 )N = atoi(argv[1]); // number of points
-  CGAL::Timer cost;  // timer
-
-  // Instanciate a random point generator
-  CGAL::Random rng(0);
-  typedef CGAL::Random_points_in_cube_d<T::Point> Random_points_iterator;
-  Random_points_iterator rand_it(D, 1.0, rng);
-  // Generate N random points
-  std::vector<T::Point> points;
-  CGAL::cpp11::copy_n(rand_it, N, std::back_inserter(points));
-  
-  T t(D);
-  CGAL_assertion(t.empty());
-  
-  // insert the points in the triangulation
-  cost.reset();cost.start();
-  std::cout << "  Delaunay triangulation of "<<N<<" points in dim "<<D<< std::flush;
-  t.insert(points.begin(), points.end());
-  std::cout << " done in "<<cost.time()<<" seconds." << std::endl;
-  CGAL_assertion( t.is_valid() );
-
-  // insert with special operations in conflict zone and new created cells
-  cost.reset();
-  std::cout << "  adding "<<N<<" other points "<< std::endl;
-  for(int i=0; i<N; ++i)
-  {
-    T::Vertex_handle v;
-    T::Face f(t.current_dimension()); 
-    T::Facet ft; 
-    T::Full_cell_handle c; 
-    T::Locate_type lt;
-    typedef std::vector<T::Full_cell_handle> Full_cells; 
-    Full_cells zone, new_full_cells; 
-    std::back_insert_iterator<Full_cells> out(zone); 
-    c = t.locate(*++rand_it, lt, f, ft, v);
-    // previously inserted vertex v is used as hint for point location (if defined)
-    T::Facet ftc = t.compute_conflict_zone(*rand_it, c, out); 
-    std::cout<<i<<"     conflict zone of size "<<zone.size()<<" -> "<<std::flush;
-    out = std::back_inserter(new_full_cells);
-    CGAL_assertion( t.is_valid() );
-    v = t.insert_in_hole(*rand_it, zone.begin(), zone.end(), ftc, out);
-    std::cout<<new_full_cells.size()<<" new cells"<<std::endl;
-  }
-
-  std::cout << " done in "<<cost.time()<<" seconds." << std::endl;
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation.cpp b/3rdparty/CGAL-4.6/examples/Triangulation/triangulation.cpp
deleted file mode 100644
index 048bfb1..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <CGAL/Epick_d.h>
-#include <CGAL/point_generators_d.h>
-#include <CGAL/Triangulation.h>
-#include <CGAL/algorithm.h>
-#include <CGAL/assertions.h>
-
-#include <iostream>
-#include <iterator>
-#include <vector>
-
-typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag >  K;
-typedef CGAL::Triangulation<K>                        Triangulation;
-
-int main()
-{
-    const int D = 5;   // we work in Euclidean 5-space
-    const int N = 100; // we will insert 100 points
-    // - - - - - - - - - - - - - - - - - - - - - - - - STEP 1
-    CGAL::Random_points_in_cube_d<Triangulation::Point> rand_it(D, 1.0);
-    std::vector<Triangulation::Point> points;
-    CGAL::cpp11::copy_n(rand_it, N, std::back_inserter(points));
-
-    Triangulation t(D);                      // create triangulation
-    CGAL_assertion(t.empty());
-    t.insert(points.begin(), points.end());  // compute triangulation
-    CGAL_assertion( t.is_valid() );
-    // - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
-    typedef Triangulation::Face Face;
-    typedef std::vector<Face> Faces;
-    Faces edges;
-    std::back_insert_iterator<Faces> out(edges);
-    t.tds().incident_faces(t.infinite_vertex(), 1, out);  
-    // collect faces of dimension 1 (edges) incident to the infinite vertex
-    std::cout << "There are " << edges.size() 
-              << " vertices on the convex hull." << std::endl;
-
-#include "triangulation1.cpp" // See below
-#include "triangulation2.cpp"
-
-    return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Triangulation_2/CMakeLists.txt
deleted file mode 100644
index 070aacd..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation_2/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Triangulation_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "adding_handles.cpp" )
-  create_single_source_cgal_program( "colored_face.cpp" )
-  create_single_source_cgal_program( "constrained.cpp" )
-  create_single_source_cgal_program( "constrained_hierarchy_plus.cpp" )
-  create_single_source_cgal_program( "constrained_plus.cpp" )
-  create_single_source_cgal_program( "copy_triangulation_2.cpp" )
-  create_single_source_cgal_program( "hierarchy.cpp" )
-  create_single_source_cgal_program( "info_insert_with_pair_iterator_2.cpp" )
-  create_single_source_cgal_program( "info_insert_with_pair_iterator_regular_2.cpp" )
-  create_single_source_cgal_program( "info_insert_with_transform_iterator_2.cpp" )
-  create_single_source_cgal_program( "info_insert_with_zip_iterator_2.cpp" )
-  create_single_source_cgal_program( "polygon_triangulation.cpp" )
-  create_single_source_cgal_program( "polylines_triangulation.cpp" )
-  create_single_source_cgal_program( "print_cropped_voronoi.cpp" )
-  create_single_source_cgal_program( "regular.cpp" )
-  create_single_source_cgal_program( "terrain.cpp" )
-  create_single_source_cgal_program( "triangulation_prog1.cpp" )
-  create_single_source_cgal_program( "voronoi.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Triangulation_3/CMakeLists.txt
deleted file mode 100644
index 1ac7540..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation_3/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Triangulation_3_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  
-  find_package( TBB QUIET )
-
-  if( TBB_FOUND )
-    include(${TBB_USE_FILE})
-    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
-  endif()
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "adding_handles_3.cpp" )
-  create_single_source_cgal_program( "color.cpp" )
-  create_single_source_cgal_program( "fast_location_3.cpp" )
-  create_single_source_cgal_program( "find_conflicts_3.cpp" )
-  create_single_source_cgal_program( "info_insert_with_pair_iterator.cpp" )
-  create_single_source_cgal_program( "info_insert_with_pair_iterator_regular.cpp" )
-  create_single_source_cgal_program( "info_insert_with_transform_iterator.cpp" )
-  create_single_source_cgal_program( "info_insert_with_zip_iterator.cpp" )
-  create_single_source_cgal_program( "linking_2d_and_3d.cpp" )
-  create_single_source_cgal_program( "sequential_parallel.cpp" )
-  create_single_source_cgal_program( "parallel_insertion_in_delaunay_3.cpp" )
-  create_single_source_cgal_program( "parallel_insertion_and_removal_in_regular_3.cpp" )
-  create_single_source_cgal_program( "regular_3.cpp" )
-  create_single_source_cgal_program( "simple_triangulation_3.cpp" )
-  create_single_source_cgal_program( "simplex.cpp" )
-  create_single_source_cgal_program( "tds.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/fast_location_3.cpp b/3rdparty/CGAL-4.6/examples/Triangulation_3/fast_location_3.cpp
deleted file mode 100644
index 1d2ce0c..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation_3/fast_location_3.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <CGAL/Random.h>
-
-#include <vector>
-#include <cassert>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
-typedef Delaunay::Point Point;
-
-int main()
-{
-  // generating points on a grid.
-  std::vector<Point> P;
-
-  for (int z=0 ; z<20 ; z++)
-    for (int y=0 ; y<20 ; y++)
-      for (int x=0 ; x<20 ; x++)
-	  P.push_back(Point(x,y,z));
-
-  // building their Delaunay triangulation.
-  Delaunay T(P.begin(), P.end());
-
-  assert( T.number_of_vertices() == 8000 );
-
-  // performing nearest vertex queries to a series of random points,
-  // which is a case where the Fast_location policy is beneficial.
-  for (int i=0; i<10000; ++i)
-    T.nearest_vertex(Point(CGAL::default_random.get_double(0, 20),
-			   CGAL::default_random.get_double(0, 20),
-			   CGAL::default_random.get_double(0, 20)));
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/sequential_parallel.cpp b/3rdparty/CGAL-4.6/examples/Triangulation_3/sequential_parallel.cpp
deleted file mode 100644
index f9f3338..0000000
--- a/3rdparty/CGAL-4.6/examples/Triangulation_3/sequential_parallel.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Timer.h>
-
-#include <iostream>
-#include <fstream>
-#include <vector>
-
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-typedef K::Point_3          Point;
-typedef CGAL::Timer Timer;
-
-const int NUM_INSERTED_POINTS = 10000;
-
-int main()
-{
-  CGAL::Random_points_in_cube_3<Point> rnd(1.);
-
-  std::cerr << "Construction of a 3D Delaunay triangulation from a vector of " 
-            << NUM_INSERTED_POINTS << " random points in a cube" << std::endl;
-  std::vector<Point> V;
-  V.reserve(NUM_INSERTED_POINTS);
-  for (int i = 0; i != NUM_INSERTED_POINTS; ++i)
-    V.push_back(*rnd++);
-  
-  // Sequential Delaunay T3
-  typedef CGAL::Delaunay_triangulation_3<K> SequentialTriangulation;
-
-  Timer t;
-  t.start();
-  SequentialTriangulation S(V.begin(), V.end());
-  t.stop();
-  std::cerr << "Sequential construction takes " << t.time() << " sec." << std::endl;
-  
-// Parallel Delaunay T3
-#ifdef CGAL_LINKED_WITH_TBB
-  typedef CGAL::Triangulation_data_structure_3< 
-    CGAL::Triangulation_vertex_base_3<K>, 
-    CGAL::Triangulation_cell_base_3<K>, 
-    CGAL::Parallel_tag>                          ParallelTds;
-  typedef CGAL::Delaunay_triangulation_3<K, ParallelTds> ParallelTriangulation;
-
-  t.reset();
-  t.start();
-  // Construct the locking data-structure, using the bounding-box of the points
-  ParallelTriangulation::Lock_data_structure locking_ds(
-    CGAL::Bbox_3(-1., -1., -1., 1., 1., 1.), 50);
-  // Construct the triangulation in parallel
-  ParallelTriangulation T(V.begin(), V.end(), &locking_ds);
-  t.stop();
-  std::cerr << "Parallel construction takes " << t.time() << " sec. with "
-            << tbb::task_scheduler_init::default_num_threads() << " threads" << std::endl;
-#endif
-
-  return 0;
-}
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/CMakeLists.txt b/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/CMakeLists.txt
deleted file mode 100644
index 10de0e3..0000000
--- a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( Voronoi_diagram_2_example )
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-  include_directories (BEFORE "../../include")
-
-  create_single_source_cgal_program( "vd_2_point_location.cpp" )
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_tree.h b/3rdparty/CGAL-4.6/include/CGAL/AABB_tree.h
deleted file mode 100644
index 9e1cba3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/AABB_tree.h
+++ /dev/null
@@ -1,1239 +0,0 @@
-// Copyright (c) 2008,2011  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb
-
-#ifndef CGAL_AABB_TREE_H
-#define CGAL_AABB_TREE_H
-
-#include <vector>
-#include <iterator>
-#include <CGAL/internal/AABB_tree/AABB_traversal_traits.h>
-#include <CGAL/internal/AABB_tree/AABB_node.h>
-#include <CGAL/internal/AABB_tree/AABB_search_tree.h>
-#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
-#include <CGAL/internal/AABB_tree/Primitive_helper.h>
-#include <boost/optional.hpp>
-
-#ifdef CGAL_HAS_THREADS
-#include <boost/thread/mutex.hpp>
-#endif
-
-/// \file AABB_tree.h
-
-namespace CGAL {
-
-/// \addtogroup PkgAABB_tree
-/// @{
-
-	/**
-   * Class AABB_tree is a static data structure for efficient
-   * intersection and distance computations in 3D. It builds a
-   * hierarchy of axis-aligned bounding boxes (an AABB tree) from a set
-   * of 3D geometric objects, and can receive intersection and distance
-   * queries, provided that the corresponding predicates are
-   * implemented in the traits class AABBTraits.
-   * An instance of the class `AABBTraits` is internally stored.
-   *
-   * \sa `AABBTraits`
-   * \sa `AABBPrimitive`
-   *
-   */
-	template <typename AABBTraits>
-	class AABB_tree
-	{
-	private:
-		// internal KD-tree used to accelerate the distance queries
-		typedef AABB_search_tree<AABBTraits> Search_tree;
-
-		// type of the primitives container
-		typedef std::vector<typename AABBTraits::Primitive> Primitives;
-
-	public:
-    typedef AABBTraits AABB_traits;
-    
-    /// \name Types
-    ///@{
-
-    /// Number type returned by the distance queries.
-		typedef typename AABBTraits::FT FT;
-
-
-    /// Type of 3D point.
-		typedef typename AABBTraits::Point_3 Point;
-
-    /// Type of input primitive.
-		typedef typename AABBTraits::Primitive Primitive;
-		/// Identifier for a primitive in the tree.
-		typedef typename Primitive::Id Primitive_id;
-		/// Unsigned integral size type.
-		typedef typename Primitives::size_type size_type; 
-    /// Type of bounding box.
-		typedef typename AABBTraits::Bounding_box Bounding_box;
-    /// 
-		typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
-    /// \deprecated 
-		typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
-
-    /*!
-    An alias to `AABBTraits::Intersection_and_primitive_id<Query>`
-    */
-    #ifdef DOXYGEN_RUNNING
-    template<typename Query>
-    using Intersection_and_primitive_id = AABBTraits::Intersection_and_primitive_id<Query>;
-    #else
-    template<typename Query>
-    struct Intersection_and_primitive_id {
-      typedef typename AABBTraits::template Intersection_and_primitive_id<Query>::Type Type;
-    };
-    #endif
-
-    
-    ///@}
-
-	public:
-    /// \name Creation
-    ///@{
-
-    /// Constructs an empty tree, and initializes the internally stored traits
-    /// class using `traits`.
-    AABB_tree(const AABBTraits& traits = AABBTraits());
-
-    /**
-     * @brief Builds the datastructure from a sequence of primitives.
-     * @param first iterator over first primitive to insert
-     * @param beyond past-the-end iterator
-     *
-     * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`.
-     * For compilers that do not support variadic templates, overloads up to 
-     * 5 template arguments are provided.
-     * The tree stays empty if the memory allocation is not successful.
-     */
-    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-		template<typename InputIterator,typename ... T>
-		AABB_tree(InputIterator first, InputIterator beyond,T&& ...);  
-    #else
-		template<typename InputIterator>
-		AABB_tree(InputIterator first, InputIterator beyond);
-    template<typename InputIterator, typename T1>
-		AABB_tree(InputIterator first, InputIterator beyond, T1&);
-    template<typename InputIterator, typename T1, typename T2>
-    AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&);
-    template<typename InputIterator, typename T1, typename T2, typename T3>
-		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
-    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
-		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
-    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
-    #endif
-
-    ///@}
-
-		/// \name Operations
-		///@{
-
-    /// Equivalent to calling `clear()` and then `insert(first,last,t...)`.
-    /// For compilers that do not support variadic templates, overloads up
-    /// to 5 template arguments are provided.
-    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-		template<typename ConstPrimitiveIterator,typename ... T>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...);
-    #else
-		template<typename ConstPrimitiveIterator>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond);
-    template<typename ConstPrimitiveIterator, typename T1>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond, T1&);
-    template<typename ConstPrimitiveIterator, typename T1, typename T2>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&);
-    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&);
-    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&);
-    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&,T5&);
-    #endif
-
-
-    /// Add a sequence of primitives to the set of primitives of the AABB tree.
-    /// `%InputIterator` is any iterator and the parameter pack `T` are any types
-    /// such that `Primitive` has a constructor with the following signature:
-    /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept
-    /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)`
-    /// is made using the internally stored traits.
-    /// For compilers that do not support variadic templates,
-    /// overloads up to 5 template arguments are provided.
-    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-		template<typename InputIterator,typename ... T>
-		void insert(InputIterator first, InputIterator beyond,T&& ...);
-    #else
-		template<typename InputIterator>
-		void insert(InputIterator first, InputIterator beyond);
-    template<typename InputIterator, typename T1>
-		void insert(InputIterator first, InputIterator beyond,T1&);
-    template<typename InputIterator, typename T1, typename T2>
-		void insert(InputIterator first, InputIterator beyond,T1&, T2&);
-    template<typename InputIterator, typename T1, typename T2, typename T3>
-		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
-    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
-		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
-    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
-    #endif
-
-    /// Adds a primitive to the set of primitives of the tree.
-    inline void insert(const Primitive& p);
-
-		/// Clears and destroys the tree.
-		~AABB_tree()
-		{
-			clear();
-		}
-    /// Returns a const reference to the internally stored traits class.
-    const AABBTraits& traits() const{
-      return m_traits; 
-    }
-    
-		/// Clears the tree.
-		void clear()
-		{
-			// clear AABB tree
-      clear_nodes();
-			m_primitives.clear();
-			clear_search_tree();
-		}
-
-		/// Returns the axis-aligned bounding box of the whole tree.
-		/// \pre `!empty()`
-		const Bounding_box bbox() const { 
-			CGAL_precondition(!empty());
-			if(size() > 1)
-				return root_node()->bbox(); 
-			else
-				return AABB_traits().compute_bbox_object()(m_primitives.begin(), 
-																									 m_primitives.end());
-		}
-    
-    /// Returns the number of primitives in the tree.
-		size_type size() const { return m_primitives.size(); }
-    
-    /// Returns \c true, iff the tree contains no primitive.
-		bool empty() const { return m_primitives.empty(); }
-		///@}
-
-    /// \name Advanced
-    ///@{
-
-    /// After one or more calls to `AABB_tree::insert()` the internal data
-    /// structure of the tree must be reconstructed. This procedure
-    /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of
-    /// primitives of the tree.  This procedure is called implicitly
-    /// at the first call to a query member function. You can call
-    /// AABB_tree::build() explicitly to ensure that the next call to
-    /// query functions will not trigger the reconstruction of the
-    /// data structure.
-    void build();
-
-    ///@}
-
-private:
-    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-    template <typename ... T>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T ... ){}
-    template <typename ... T>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T&& ... t)
-    {m_traits.set_shared_data(std::forward<T>(t)...);}
-
-    template <typename ... T>
-    void set_shared_data(T&& ...t){
-      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),std::forward<T>(t)...);
-    }
-    #else
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>){}
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>)
-    {m_traits.set_shared_data();}
-    void set_shared_data(){
-      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>());
-    }
-    
-    template <typename T1>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1){}
-    template <typename T1>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1)
-    {m_traits.set_shared_data(t1);}
-    template <typename T1>
-    void set_shared_data(T1& t1){
-      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1);
-    }
-    
-    template <typename T1, typename T2>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2){}
-    template <typename T1, typename T2>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2)
-    {m_traits.set_shared_data(t1,t2);}
-    template <typename T1, typename T2>
-    void set_shared_data(const T1& t1,const T2& t2){
-      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2);
-    }
-    
-    template <typename T1, typename T2, typename T3>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3){}
-    template <typename T1, typename T2, typename T3>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3)
-    {m_traits.set_shared_data(t1,t2,t3);}
-    template <typename T1, typename T2, typename T3>
-    void set_shared_data(T1& t1,T2& t2,T3& t3){
-      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3);
-    }
-    
-    template <typename T1, typename T2, typename T3, typename T4>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4){}
-    template <typename T1, typename T2, typename T3, typename T4>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4)
-    {m_traits.set_shared_data(t1,t2,t3,t4);}
-    template <typename T1, typename T2, typename T3, typename T4>
-    void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){
-      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4);
-    }
-    
-    template <typename T1, typename T2, typename T3, typename T4, typename T5>
-    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4,T5){}
-    template <typename T1, typename T2, typename T3, typename T4, typename T5>
-    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
-    {m_traits.set_shared_data(t1,t2,t3,t4,t5);}
-    template <typename T1, typename T2, typename T3, typename T4, typename T5>
-    void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){
-      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4,t5);
-    }
-    #endif
-
-		template<typename ConstPointIterator>
-		bool accelerate_distance_queries_impl(ConstPointIterator first,
-                                          ConstPointIterator beyond) const;
-public:
-
-    /// \name Intersection Tests
-    ///@{
-
-		/// Returns `true`, iff the query intersects at least one of
-		/// the input primitives. \tparam Query must be a type for
-		/// which `do_intersect` predicates are
-		/// defined in the traits class `AABBTraits`.
-		template<typename Query>
-		bool do_intersect(const Query& query) const;
-
-    /// Returns the number of primitives intersected by the
-    /// query. \tparam Query must be a type for which
-    /// `do_intersect` predicates are defined
-    /// in the traits class `AABBTraits`.
-		template<typename Query>
-		size_type number_of_intersected_primitives(const Query& query) const;
-
-    /// Outputs to the iterator the list of all intersected primitives
-    /// ids. This function does not compute the intersection points
-    /// and is hence faster than the function `all_intersections()`
-    /// function below. \tparam Query must be a type for which
-    /// `do_intersect` predicates are defined
-    /// in the traits class `AABBTraits`.
-		template<typename Query, typename OutputIterator>
-		OutputIterator all_intersected_primitives(const Query& query, OutputIterator out) const;
-
-
-    /// Returns the first encountered intersected primitive id, iff
-    /// the query intersects at least one of the input primitives. No
-    /// particular order is guaranteed over the tree traversal, such
-    /// that, e.g, the primitive returned is not necessarily the
-    /// closest from the source point of a ray query. \tparam Query
-    /// must be a type for which
-    /// `do_intersect` predicates are defined
-    /// in the traits class `AABBTraits`.
-		template <typename Query>
-		boost::optional<Primitive_id> any_intersected_primitive(const Query& query) const;
-    
-    ///@}
-
-    /// \name Intersections
-    ///@{
-
-    /// Outputs the list of all intersections, as objects of
-    /// `Intersection_and_primitive_id<Query>::%Type`,
-    /// between the query and the input data to
-    /// the iterator. `do_intersect()`
-    /// predicates and intersections must be defined for `Query`
-    /// in the `AABBTraits` class.
-		template<typename Query, typename OutputIterator>
-		OutputIterator all_intersections(const Query& query, OutputIterator out) const;
-
-
-    /// Returns the first encountered intersection. No particular
-    /// order is guaranteed over the tree traversal, e.g, the
-    /// primitive returned is not necessarily the closest from the
-    /// source point of a ray query. Type `Query` must be a type
-    /// for which `do_intersect` predicates
-    /// and intersections are defined in the traits class AABBTraits.
-		template <typename Query>
-    #if CGAL_INTERSECTION_VERSION < 2 && !defined(DOXYGEN_RUNNING)
-		boost::optional<Object_and_primitive_id> 
-    #else
-    boost::optional< typename Intersection_and_primitive_id<Query>::Type >
-    #endif
-    any_intersection(const Query& query) const;
-
-    ///@}
-
-    /// \name Distance Queries
-    ///@{
-
-    /// Returns the minimum squared distance between the query point
-    /// and all input primitives. Method
-    /// `accelerate_distance_queries()` should be called before the
-    /// first distance query, so that an internal secondary search
-    /// structure is build, for improving performance.
-		/// \pre `!empty()`
-		FT squared_distance(const Point& query) const;
-
-    /// Returns the point in the union of all input primitives which
-    /// is closest to the query. In case there are several closest
-    /// points, one arbitrarily chosen closest point is
-    /// returned. Method `accelerate_distance_queries()` should be
-    /// called before the first distance query, so that an internal
-    /// secondary search structure is build, for improving
-    /// performance.
-		/// \pre `!empty()`
-		Point closest_point(const Point& query) const;
-
-    
-    /// Returns a `Point_and_primitive_id` which realizes the
-    /// smallest distance between the query point and all input
-    /// primitives. Method `accelerate_distance_queries()` should be
-    /// called before the first distance query, so that an internal
-    /// secondary search structure is build, for improving
-    /// performance.
-		/// \pre `!empty()`
-		Point_and_primitive_id closest_point_and_primitive(const Point& query) const;
-
-
-    ///@}
-
-    /// \name Accelerating the Distance Queries
-    /// 
-    /// In the following paragraphs, we discuss details of the
-    /// implementation of the distance queries. We explain the
-    /// internal use of hints, how the user can pass his own hints to
-    /// the tree, and how the user can influence the construction of
-    /// the secondary data structure used for accelerating distance
-    /// queries.
-    /// Internally, the distance queries algorithms are initialized
-    /// with some hint, which has the same type as the return type of
-    /// the query, and this value is refined along a traversal of the
-    /// tree, until it is optimal, that is to say until it realizes
-    /// the shortest distance to the primitives. In particular, the
-    /// exact specification of these internal algorithms is that they
-    /// minimize the distance to the object composed of the union of
-    /// the primitives and the hint.
-    /// It follows that 
-    /// - in order to return the exact distance to the set of
-    /// primitives, the algorithms need the hint to be exactly on the
-    /// primitives;
-    /// - if this is not the case, and if the hint happens to be closer
-    /// to the query point than any of the primitives, then the hint
-    /// is returned.
-    ///
-    /// This second observation is reasonable, in the sense that
-    /// providing a hint to the algorithm means claiming that this
-    /// hint belongs to the union of the primitives. These
-    /// considerations about the hints being exactly on the primitives
-    /// or not are important: in the case where the set of primitives
-    /// is a triangle soup, and if some of the primitives are large,
-    /// one may want to provide a much better hint than a vertex of
-    /// the triangle soup could be. It could be, for example, the
-    /// barycenter of one of the triangles. But, except with the use
-    /// of an exact constructions kernel, one cannot easily construct
-    /// points other than the vertices, that lie exactly on a triangle
-    /// soup. Hence, providing a good hint sometimes means not being
-    /// able to provide it exactly on the primitives. In rare
-    /// occasions, this hint can be returned as the closest point.
-    /// In order to accelerate distance queries significantly, the
-    /// AABB tree builds an internal KD-tree containing a set of
-    /// potential hints, when the method
-    /// `accelerate_distance_queries()` is called. This KD-tree
-    /// provides very good hints that allow the algorithms to run much
-    /// faster than with a default hint (such as the
-    /// `reference_point` of the first primitive). The set of
-    /// potential hints is a sampling of the union of the primitives,
-    /// which is obtained, by default, by calling the method
-    /// `reference_point` of each of the primitives. However, such
-    /// a sampling with one point per primitive may not be the most
-    /// relevant one: if some primitives are very large, it helps
-    /// inserting more than one sample on them. Conversely, a sparser
-    /// sampling with less than one point per input primitive is
-    /// relevant in some cases.
-    ///@{
-
-		/// Constructs internal search tree from
-		/// a point set taken on the internal primitives
-		/// returns `true` iff successful memory allocation
-		bool accelerate_distance_queries() const;
-
-    /// Constructs an internal KD-tree containing the specified point
-    /// set, to be used as the set of potential hints for accelerating
-    /// the distance queries. 
-		/// \tparam ConstPointIterator is an iterator with
-    /// value type `Point_and_primitive_id`.
-		template<typename ConstPointIterator>
-		bool accelerate_distance_queries(ConstPointIterator first,
-                                     ConstPointIterator beyond) const
-    {
-      #ifdef CGAL_HAS_THREADS
-      //this ensures that this is done once at a time
-      boost::mutex::scoped_lock scoped_lock(kd_tree_mutex);
-      #endif
-      clear_search_tree();
-      return accelerate_distance_queries_impl(first,beyond);
-      
-    }
-    
-    /// Returns the minimum squared distance between the query point
-    /// and all input primitives. The internal KD-tree is not used.
-		/// \pre `!empty()`
-		FT squared_distance(const Point& query, const Point& hint) const;
-
-    /// Returns the point in the union of all input primitives which
-    /// is closest to the query. In case there are several closest
-    /// points, one arbitrarily chosen closest point is returned. The
-    /// internal KD-tree is not used.
-		/// \pre `!empty()`
-		Point closest_point(const Point& query, const Point& hint) const;
-    
-    /// Returns a `Point_and_primitive_id` which realizes the
-    /// smallest distance between the query point and all input
-    /// primitives. The internal KD-tree is not used.
-		/// \pre `!empty()`
-		Point_and_primitive_id closest_point_and_primitive(const Point& query, const Point_and_primitive_id& hint) const;
-
-    ///@}
-
-	private:
-    // clear nodes
-    void clear_nodes()
-    {
-			if( size() > 1 ) {
-				delete [] m_p_root_node;
-			}
-			m_p_root_node = NULL;
-    }
-
-		// clears internal KD tree
-		void clear_search_tree() const
-		{
-			if ( m_search_tree_constructed )
-			{
-				CGAL_assertion( m_p_search_tree!=NULL );
-				delete m_p_search_tree;
-				m_p_search_tree = NULL;
-				m_search_tree_constructed = false;
-				m_default_search_tree_constructed = false;
-                        }
-		}
-
-	public:
-
-    /// \internal
-		template <class Query, class Traversal_traits>
-		void traversal(const Query& query, Traversal_traits& traits) const
-		{
-			switch(size())
-			{
-			case 0:
-				break;
-			case 1:
-				traits.intersection(query, singleton_data());
-				break;
-			default: // if(size() >= 2)
-				root_node()->template traversal<Traversal_traits,Query>(query, traits, m_primitives.size());
-			}
-		}
-
-	private:
-		typedef AABB_node<AABBTraits> Node;
-
-
-	public:
-		// returns a point which must be on one primitive
-		Point_and_primitive_id any_reference_point_and_id() const
-		{
-			CGAL_assertion(!empty());
-			return Point_and_primitive_id(
-        internal::Primitive_helper<AABB_traits>::get_reference_point(m_primitives[0],m_traits), m_primitives[0].id()
-      );
-		}
-
-	public:
-		Point_and_primitive_id best_hint(const Point& query) const
-		{
-			if(m_search_tree_constructed)
-				return m_p_search_tree->closest_point(query);
-			else
-				return this->any_reference_point_and_id();
-		}
-
-	private:
-    //Traits class
-    AABBTraits m_traits;
-		// set of input primitives
-		Primitives m_primitives;
-		// single root node
-		Node* m_p_root_node;
-    #ifdef CGAL_HAS_THREADS
-    mutable boost::mutex internal_tree_mutex;//mutex used to protect const calls inducing build()
-    mutable boost::mutex kd_tree_mutex;//mutex used to protect calls to accelerate_distance_queries
-    #endif
-  
-    const Node* root_node() const {
-			CGAL_assertion(size() > 1);
-      if(m_need_build){
-        #ifdef CGAL_HAS_THREADS
-        //this ensures that build() will be called once
-        boost::mutex::scoped_lock scoped_lock(internal_tree_mutex);
-        if(m_need_build)
-        #endif
-          const_cast< AABB_tree<AABBTraits>* >(this)->build(); 
-      }
-      return m_p_root_node;
-    }
-
-		const Primitive& singleton_data() const {
-			CGAL_assertion(size() == 1);
-			return *m_primitives.begin();
-		}
-
-		// search KD-tree
-		mutable const Search_tree* m_p_search_tree;
-		mutable bool m_search_tree_constructed;
-    mutable bool m_default_search_tree_constructed;
-    bool m_need_build;
-
-	private:
-		// Disabled copy constructor & assignment operator
-		typedef AABB_tree<AABBTraits> Self;
-		AABB_tree(const Self& src);
-		Self& operator=(const Self& src);
-
-	};  // end class AABB_tree
-
-/// @}
-
-  template<typename Tr>
-  AABB_tree<Tr>::AABB_tree(const Tr& traits)
-    : m_traits(traits)
-    , m_primitives()
-    , m_p_root_node(NULL)
-    , m_p_search_tree(NULL)
-    , m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-  {}
-
-  #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) 
- 	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename ... T>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T&& ... t)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,std::forward<T>(t)...);
- 	}
-  
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename ... T>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T&& ... t)
-	{
-    set_shared_data(std::forward<T>(t)...);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,std::forward<T>(t)...));
-			++first;
-		}
-    m_need_build = true;
-  }
-  
-  // Clears tree and insert a set of primitives
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename ... T>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T&& ... t)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,std::forward<T>(t)...);
-
-    build();
-	}  
-  #else
-  //=============constructor======================
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond);
- 	}
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T1& t1)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,t1);
- 	}
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T1& t1,T2& t2)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,t1,t2);
- 	}
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T1& t1,T2& t2,T3& t3)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,t1,t2,t3);
- 	}
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T1& t1,T2& t2,T3& t3,T4& t4)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,t1,t2,t3,t4);
- 	}
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
-                           ConstPrimitiveIterator beyond,
-                           T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
-		: m_traits()
-    , m_primitives()
-		, m_p_root_node(NULL)
-		, m_p_search_tree(NULL)
-		, m_search_tree_constructed(false)
-    , m_default_search_tree_constructed(false)
-    , m_need_build(false)
-	{
-		// Insert each primitive into tree
-    insert(first, beyond,t1,t2,t3,t4,t5);
- 	}
-  //=============insert======================
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond)
-	{
-    set_shared_data();
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first));
-			++first;
-		}
-    m_need_build = true;
-  }
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T1& t1)
-	{
-    set_shared_data(t1);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,t1));
-			++first;
-		}
-    m_need_build = true;
-  }
-  
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T1& t1, T2& t2)
-	{
-    set_shared_data(t1,t2);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,t1,t2));
-			++first;
-		}
-    m_need_build = true;
-  }
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T1& t1,T2& t2,T3& t3)
-	{
-    set_shared_data(t1,t2,t3);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,t1,t2,t3));
-			++first;
-		}
-    m_need_build = true;
-  }
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T1& t1,T2& t2,T3& t3,T4& t4)
-	{
-    set_shared_data(t1,t2,t3,t4);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,t1,t2,t3,t4));
-			++first;
-		}
-    m_need_build = true;
-  }
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
-                             ConstPrimitiveIterator beyond,
-                             T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
-	{
-    set_shared_data(t1,t2,t3,t4,t5);
-		while(first != beyond)
-		{
-			m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5));
-			++first;
-		}
-    m_need_build = true;
-  }
-
-  //=============rebuild======================
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond);
-
-    build();
-	}
-
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T1& t1)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,t1);
-
-    build();
-	}
-  
-	template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T1& t1, T2& t2)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,t1,t2);
-
-    build();
-	}
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T1& t1,T2& t2,T3& t3)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,t1,t2,t3);
-
-    build();
-	}
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T1& t1,T2& t2,T3& t3,T4& t4)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,t1,t2,t3,t4);
-
-    build();
-	}
-
-  template<typename Tr>
-	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
-	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
-                              ConstPrimitiveIterator beyond,
-                              T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
-	{
-		// cleanup current tree and internal KD tree
-		clear();
-
-		// inserts primitives
-    insert(first, beyond,t1,t2,t3,t4,t5);
-
-    build();
-	}
-  #endif
-
-	template<typename Tr>
-	void AABB_tree<Tr>::insert(const Primitive& p)
-	{
-    m_primitives.push_back(p);
-    m_need_build = true;
-  }
-
-	// Build the data structure, after calls to insert(..)
-	template<typename Tr>
-	void AABB_tree<Tr>::build()
-	{
-    clear_nodes();
-
-    if(m_primitives.size() > 1) {
-
-			// allocates tree nodes
-			m_p_root_node = new Node[m_primitives.size()-1]();
-			if(m_p_root_node == NULL)
-			{
-				std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
-				CGAL_assertion(m_p_root_node != NULL);
-				m_primitives.clear();
-				clear();
-			}
-
-			// constructs the tree
-			m_p_root_node->expand(m_primitives.begin(), m_primitives.end(),
-														m_primitives.size(), m_traits);
-		}
-
-    // In case the users has switched on the accelerated distance query
-    // data structure with the default arguments, then it has to be
-    // rebuilt.
-    if(m_default_search_tree_constructed)
-      accelerate_distance_queries();
-
-    m_need_build = false;    
-	}
-
-
-	// constructs the search KD tree from given points
-	// to accelerate the distance queries
-	template<typename Tr>
-	template<typename ConstPointIterator>
-	bool AABB_tree<Tr>::accelerate_distance_queries_impl(ConstPointIterator first,
-		ConstPointIterator beyond) const
-	{
-		m_p_search_tree = new Search_tree(first, beyond);
-		if(m_p_search_tree != NULL)
-		{
-			m_search_tree_constructed = true;
-			return true;
-		}
-		else
-    {
-			std::cerr << "Unable to allocate memory for accelerating distance queries" << std::endl;
-			return false;
-    }
-	}
-
-	// constructs the search KD tree from internal primitives
-	template<typename Tr>
-	bool AABB_tree<Tr>::accelerate_distance_queries() const
-	{
-		if(m_primitives.empty()) return true;
-    #ifdef CGAL_HAS_THREADS
-    //this ensures that this function will be done once
-    boost::mutex::scoped_lock scoped_lock(kd_tree_mutex);
-    #endif
-
-    //we only redo computation only if needed 
-    if (!m_need_build && m_default_search_tree_constructed)
-      return m_search_tree_constructed;
-    
-		// iterate over primitives to get reference points on them
-		std::vector<Point_and_primitive_id> points;
-		points.reserve(m_primitives.size());
-		typename Primitives::const_iterator it;
-		for(it = m_primitives.begin(); it != m_primitives.end(); ++it)
-			points.push_back(
-        Point_and_primitive_id(
-          internal::Primitive_helper<AABB_traits>::get_reference_point(*it,m_traits), it->id()
-        )
-      );
-
-    // clears current KD tree
-    clear_search_tree();
-    m_default_search_tree_constructed = true;
-		return accelerate_distance_queries_impl(points.begin(), points.end());
-	}
-
-	template<typename Tr>
-	template<typename Query>
-	bool
-		AABB_tree<Tr>::do_intersect(const Query& query) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		Do_intersect_traits<AABBTraits, Query> traversal_traits(m_traits);
-		this->traversal(query, traversal_traits);
-		return traversal_traits.is_intersection_found();
-	}
-
-	template<typename Tr>
-	template<typename Query>
-	typename AABB_tree<Tr>::size_type
-		AABB_tree<Tr>::number_of_intersected_primitives(const Query& query) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    using CGAL::internal::AABB_tree::Counting_output_iterator;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-    typedef Counting_output_iterator<Primitive_id, size_type> Counting_iterator;
-
-    size_type counter = 0;
-    Counting_iterator out(&counter);
-
-		Listing_primitive_traits<AABBTraits, 
-      Query, Counting_iterator> traversal_traits(out,m_traits);
-		this->traversal(query, traversal_traits);
-		return counter;
-	}
-
-	template<typename Tr>
-	template<typename Query, typename OutputIterator>
-	OutputIterator
-		AABB_tree<Tr>::all_intersected_primitives(const Query& query,
-		OutputIterator out) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		Listing_primitive_traits<AABBTraits, 
-      Query, OutputIterator> traversal_traits(out,m_traits);
-		this->traversal(query, traversal_traits);
-		return out;
-	}
-
-	template<typename Tr>
-	template<typename Query, typename OutputIterator>
-	OutputIterator
-		AABB_tree<Tr>::all_intersections(const Query& query,
-		OutputIterator out) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		Listing_intersection_traits<AABBTraits, 
-      Query, OutputIterator> traversal_traits(out,m_traits);
-		this->traversal(query, traversal_traits);
-		return out;
-	}
-
-
-	template <typename Tr>
-	template <typename Query>
-  #if CGAL_INTERSECTION_VERSION < 2
-	boost::optional<typename AABB_tree<Tr>::Object_and_primitive_id>
-  #else
-  boost::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type >
-  #endif
-		AABB_tree<Tr>::any_intersection(const Query& query) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		First_intersection_traits<AABBTraits, Query> traversal_traits(m_traits);
-		this->traversal(query, traversal_traits);
-		return traversal_traits.result();
-	}
-
-	template <typename Tr>
-	template <typename Query>
-	boost::optional<typename AABB_tree<Tr>::Primitive_id>
-		AABB_tree<Tr>::any_intersected_primitive(const Query& query) const
-	{
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		First_primitive_traits<AABBTraits, Query> traversal_traits(m_traits);
-		this->traversal(query, traversal_traits);
-		return traversal_traits.result();
-	}
-
-	// closest point with user-specified hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::Point
-		AABB_tree<Tr>::closest_point(const Point& query,
-		const Point& hint) const
-	{
-		CGAL_precondition(!empty());
-		typename Primitive::Id hint_primitive = m_primitives[0].id();
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		Projection_traits<AABBTraits> projection_traits(hint,hint_primitive,m_traits);
-		this->traversal(query, projection_traits);
-		return projection_traits.closest_point();
-	}
-
-	// closest point without hint, the search KD-tree is queried for the
-	// first closest neighbor point to get a hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::Point
-		AABB_tree<Tr>::closest_point(const Point& query) const
-	{
-		CGAL_precondition(!empty());
-		const Point_and_primitive_id hint = best_hint(query);
-		return closest_point(query,hint.first);
-	}
-
-	// squared distance with user-specified hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::FT
-		AABB_tree<Tr>::squared_distance(const Point& query,
-		const Point& hint) const
-	{
-		CGAL_precondition(!empty());
-		const Point closest = this->closest_point(query, hint);
-		return Tr().squared_distance_object()(query, closest);
-	}
-
-	// squared distance without user-specified hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::FT
-		AABB_tree<Tr>::squared_distance(const Point& query) const
-	{
-		CGAL_precondition(!empty());
-		const Point closest = this->closest_point(query);
-		return Tr().squared_distance_object()(query, closest);
-	}
-
-	// closest point with user-specified hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::Point_and_primitive_id
-		AABB_tree<Tr>::closest_point_and_primitive(const Point& query) const
-	{
-		CGAL_precondition(!empty());
-		return closest_point_and_primitive(query,best_hint(query));
-	}
-
-	// closest point with user-specified hint
-	template<typename Tr>
-	typename AABB_tree<Tr>::Point_and_primitive_id
-		AABB_tree<Tr>::closest_point_and_primitive(const Point& query,
-		const Point_and_primitive_id& hint) const
-	{
-		CGAL_precondition(!empty());
-    using namespace CGAL::internal::AABB_tree;
-    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
-		Projection_traits<AABBTraits> projection_traits(hint.first,hint.second,m_traits);
-		this->traversal(query, projection_traits);
-		return projection_traits.closest_point_and_primitive();
-	}
-
-} // end namespace CGAL
-
-#endif // CGAL_AABB_TREE_H
-
-/***EMACS SETTINGS**    */
-/* Local Variables:     */
-/* tab-width: 2         */
-/* indent-tabs-mode: t  */
-/* End:                 */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
deleted file mode 100644
index 945b743..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
+++ /dev/null
@@ -1,2558 +0,0 @@
-// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Kerber <mkerber at mpi-inf.mpg.de>
-//
-// ============================================================================
-
-#ifndef CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H
-#define CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H
-
-#include <vector>
-#include <set>
-#include <map>
-
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/logical.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-
-#include <CGAL/basic.h>
-#include <CGAL/Cache.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/Handle_with_policy.h>
-#include <CGAL/Arr_enums.h>
-
-#include <CGAL/Algebraic_kernel_d/Bitstream_descartes.h>
-#include <CGAL/Algebraic_kernel_d/Interval_evaluate_1.h>
-#include <CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h>
-#include <CGAL/Algebraic_kernel_d/macros.h>
-#include <CGAL/Algebraic_kernel_d/exceptions.h>
-#include <CGAL/Algebraic_kernel_d/enums.h>
-#include <CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h>
-#include <CGAL/Algebraic_kernel_d/Status_line_CA_1.h>
-#include <CGAL/Algebraic_kernel_d/Event_line_builder.h>
-#include <CGAL/Algebraic_kernel_d/Shear_controller.h>
-#include <CGAL/Algebraic_kernel_d/Shear_transformation.h>
-#include <CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h>
-#include <CGAL/Algebraic_kernel_d/shear.h>
-
-#include <CGAL/Polynomial_traits_d.h>
-
-
-
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-// put includes here
-#endif
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4290)
-#endif
-
-
-namespace CGAL {
-
-template<typename AlgebraicKernelWithAnalysis_2, 
-         typename Rep_>
-class Curve_analysis_2;
-
-namespace internal {
-
-template<typename Comparable,bool has_template_typedefs> 
-  struct Is_derived_from_Handle_with_policy {
-    typedef boost::false_type Tag;
-};
-  
-template<typename Comparable> 
-  struct Is_derived_from_Handle_with_policy<Comparable,true> {
-
-    typedef typename
-      boost::is_base_of< CGAL::Handle_with_policy
-                             < typename Comparable::T,
-			       typename Comparable::Handle_policy,
-                               typename Comparable::Allocator >,
-                         Comparable 
-                       >::type Tag;
-};
-
-
-template<typename Comparable,typename Tag> struct Compare_for_vert_line_map_ 
-    {
-      bool operator() (const Comparable& a, const Comparable& b) const {
-	return a<b;
-      }	
-};
-
-template<typename Comparable>
-  struct Compare_for_vert_line_map_<Comparable,boost::true_type> {
-
-    bool operator() (const Comparable& a, const Comparable& b) const {
-      return CGAL::Handle_id_less_than< Comparable >()(a,b);
-    }
-};
-
-template<typename Comparable> struct Compare_for_vert_line_map
-  : public std::binary_function<Comparable,Comparable,bool> {
-    
-  BOOST_MPL_HAS_XXX_TRAIT_DEF(T)
-  BOOST_MPL_HAS_XXX_TRAIT_DEF(Handle_policy)
-  BOOST_MPL_HAS_XXX_TRAIT_DEF(Allocator)
-
-  typedef typename CGAL::internal::Is_derived_from_Handle_with_policy
-    < Comparable,
-      has_T<Comparable>::value &&
-      has_Handle_policy<Comparable>::value &&
-      has_Allocator<Comparable>::value>::Tag Tag;
-  
-  public:
-
-  bool operator() (const Comparable& a, const Comparable& b) const {
-
-    return eval(a,b);
-  }
-
-  private:
-    
-  Compare_for_vert_line_map_<Comparable,Tag> eval;
-  
-
-};
-
-
-// \brief Representation class for algebraic curves.
-template< typename AlgebraicKernelWithAnalysis_2>
-class Curve_analysis_2_rep {
-
-public:
-    //! this instance's template parameter
-    typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
-
-    //! the class itself
-    typedef Curve_analysis_2_rep Self;
-    
-    //! The handle class
-    typedef CGAL::Curve_analysis_2
-        <Algebraic_kernel_with_analysis_2,Self> Handle;
-    
-    //protected:
-public:
-
-    typedef int size_type;
-    
-    CGAL_ACK_SNAP_ALGEBRAIC_CURVE_KERNEL_2_TYPEDEFS(Handle);
-
-    typedef std::map< Bound, Status_line_1 > 
-    Vert_line_at_rational_map;
-    
-    typedef 
-    std::map< Algebraic_real_1, 
-              Status_line_1, 
-              internal::Compare_for_vert_line_map<Algebraic_real_1> >
-    Vert_line_map;
-    
-    //!\name Constructors
-    //!@{
-
-    //! Default constructor
-    Curve_analysis_2_rep()
-    {
-    }
-    
-    //! Constructor with polynomial
-    Curve_analysis_2_rep(Algebraic_kernel_with_analysis_2 *kernel,
-                         Polynomial_2 poly, 
-                         CGAL::Degeneracy_strategy strategy) :  
-        _m_kernel(kernel), f(poly), degeneracy_strategy(strategy)
-    {
-    }
-    
-    //!@}
-    
-private:
-
-    typedef internal::LRU_hashed_map<
-        Bound,
-        std::vector<Algebraic_real_1>,
-        internal::To_double_hasher > Intermediate_cache;
-
-    Intermediate_cache intermediate_cache;
-
-    typedef internal::Event_line_builder<Algebraic_kernel_with_analysis_2> 
-        Event_line_builder;
-    
-
-    // Internal information struct about x-coordinates
-    struct Event_coordinate_1 {
-        Event_coordinate_1(){} //added to solve a compilation error of gcc-3.4 (bug?)
-        Algebraic_real_1 val;
-        size_type mult_of_prim_res_root;
-        size_type index_of_prim_res_root;
-        size_type mult_of_content_root;
-        size_type index_of_content_root;
-        size_type mult_of_prim_lcoeff_root;
-        size_type index_of_prim_lcoeff_root;
-        boost::optional<Status_line_1> stack;
-    };
-    
-    // Functor to get the X_coordinate of an Event_coordinate
-    struct Val_functor {
-        typedef Event_coordinate_1 argument_type;
-        typedef Algebraic_real_1 result_type;
-        result_type operator() (argument_type event) const {
-            return event.val;
-        }
-    };
-
-
-    //! The object holding the information about events, as an optional
-    mutable boost::optional<std::vector<Event_coordinate_1> > 
-        event_coordinates;
-
-    //! The algebraic kernel to use
-    Algebraic_kernel_with_analysis_2* _m_kernel;
-
-    //! The polynomial defining the curve
-    boost::optional<Polynomial_2> f;
-
-    //! How degenerate situations are handled
-    CGAL::Degeneracy_strategy degeneracy_strategy;
-
-    /*!
-     * \brief The polynomial without its content (the gcd of the coeffs).
-     *
-     * The content is the greatest common divisor of the coefficients of \c f
-     * considered as polynomial <tt>y</tt>. \c The polynomial f_primitive is
-     * \c f/cont(f). The corresponding curve is equal to the curve of \c f,
-     * only without vertical line components.
-     */
-    mutable boost::optional<Polynomial_2> f_primitive;
-    
-    //! the polynomial containing all roots of the resultant of the primitive
-    //! part of f and its y-derivative
-    mutable boost::optional<Polynomial_1> 
-        resultant_of_primitive_and_derivative_y;
-
-    //! the polynomial containing all roots of the resultant of the primitive
-    //! part of f and its x-derivative
-    mutable boost::optional<Polynomial_1> 
-        resultant_of_primitive_and_derivative_x;
-
-    //! The Sturm-Habicht polynomials of f
-    mutable boost::optional<std::vector<Polynomial_2> > 
-        sturm_habicht_of_primitive;
-
-    //! The content of f
-    mutable boost::optional<Polynomial_1> content;
-
-    //! The non-working shear factors, as far as known
-    mutable std::set<Integer> bad_shears;
-
-    //! The already known shear factors
-    mutable std::map<Integer,Handle> sheared_curves;
-
-    //! Has the curve vertical line components
-    mutable boost::optional<bool> has_vertical_component;
-
-    //! The intermediate values
-    mutable boost::optional<std::vector<boost::optional<Bound> > > 
-    intermediate_values;
-
-    //! stores Y_values at rational coordinate
-    mutable Vert_line_at_rational_map vert_line_at_rational_map;
-    
-    //! stores vert_lines
-    mutable Vert_line_map vert_line_map;
-
-    /**! \brief Information about whether arcs at +/- infty 
-     *   are asymptotic to y=beta,
-     *   or go to +/- infty also in y-direction
-     */
-    mutable boost::optional<std::vector<CGAL::Object> >
-    horizontal_asymptotes_left, horizontal_asymptotes_right;
-
-    //! friends
-    friend class ::CGAL::Curve_analysis_2
-        <Algebraic_kernel_with_analysis_2,Self>;
-
-}; // class Curve_analysis_2_rep
-} // namespace internal
-
-
-/*!
- * \brief Analysis for algebraic curves of arbitrary degree. 
- *
- * This class constitutes a model for the concept
- * AlgebraicKernelWithAnalysis_d_2::CurveAnalysis_2.
- * For a square-free bivariate polynomial \c f, a topologic-geometrical
- * analysis of the algebraic curve defined by the vanishing set of \c f
- * is provided. This means, one can ask for the total number, and the position
- * of the critical x-coordinates of the curve, and for each x-coordinate, 
- * geometric information about the curve can be obtained. This data
- * is capsuled into an object of type \c Curve_analysis_2::Status_line_1,
- * which is in fact a \c Status_line_CA_1 object.
- *
- * The restriction to square-free curves is a weak one, since the curves
- * can be made square-free before passed to the analysis. 
- * The \c Construct_curve_2 functor of \c Algebraic_curve_kernel_2 is
- * doing so, thus it accepts arbitrary bivariate polynomials.
- *
- * The analysis is implemented in a "lazy" fashion. This means, when
- * created, the analysis delays all computations until the information
- * is queried for the first time. This means, if only parts of the curves
- * are of interest, only a partial analysis is performed. 
- * We remark that nevertheless, the global \e projection \e step
- * (i.e., computing the (sub)resultants) must be done once a \c Status_line_1
- * is queried. Often, this step forms the bottleneck in the whole computation.
- *
- * For more details of the algorithm, consult the reference:
- * A.Eigenwillig, M.Kerber, N.Wolpert: Fast and Exact Geometric Analysis of 
- * Real Algebraic Plane Curves. Proceedings of the International Symposium 
- * on Symbolic and Algebraic Computation (ISSAC 2007), pp. 151-158
- */
-template<typename AlgebraicKernelWithAnalysis_2, 
-  typename Rep_ 
-   = internal::Curve_analysis_2_rep< AlgebraicKernelWithAnalysis_2> 
->
-class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > {
-  
-    //! \name typedefs
-    //! @{
-
-public:
-    //! this instance' first template parameter
-    typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
-  
-    //! this instance' second template parameter
-    typedef Rep_ Rep;
-
-private:
-  
-    //! The internal type for event coordinates
-    typedef typename Rep::Event_coordinate_1 Event_coordinate_1;
-
-    // Internal class to build lines at events
-    typedef typename Rep::Event_line_builder Event_line_builder;
-
-    // Base class
-    typedef ::CGAL::Handle_with_policy<Rep> Base;
-    
-    // This type
-    typedef CGAL::Curve_analysis_2<Algebraic_kernel_with_analysis_2,Rep> Self;
-    
-public:
-
-    //! Indexing type
-    typedef typename Rep::size_type size_type;
-    
-    CGAL_ACK_SNAP_ALGEBRAIC_CURVE_KERNEL_2_TYPEDEFS(Self);
-
-    //! Required by the CurveKernel_2 concept
-    typedef Algebraic_real_1 Coordinate_1;
-
-    //! Traits type for Polynomial_2
-    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
-
-private:
-
-    /*!
-     * \brief Coercion between the coefficient type of the polynomial
-     * and the bound type of the curve analysis
-     *
-     * Interoperability of both types is required
-     */
-    typedef CGAL::Coercion_traits<Bound, Coefficient> Coercion;
-
-    /*!
-     * \brief The common supertype that both the coefficient and the bound
-     * type are convertible to
-     */
-    typedef typename Coercion::Type Coercion_type;
-
-    //! Polynomial over the \c Coercion_type
-    typedef typename CGAL::Polynomial_traits_d<Polynomial_2>
-        ::template Rebind<Coercion_type,1>::Other::Type Poly_coer_1;
-
-public:
-
-    //! Type to represent points on curves
-    typedef typename Algebraic_kernel_with_analysis_2::Algebraic_real_2 
-      Algebraic_real_2;
-
-    //! Required by the CurveKernel_2 concept
-    typedef Algebraic_real_2 Coordinate_2;
-
-    //! type for horizontal asymtote values
-    typedef CGAL::Object Asymptote_y;
-
-    //! @}
-
-private:
-
-    //! \name Helping structs
-    // @{
-    
-    struct Event_functor {
-        Event_functor(const Self* curve) : curve(curve) {}
-        const Self* curve;
-        typedef size_type argument_type;
-        typedef Status_line_1 result_type;
-        result_type operator() (argument_type index) const {
-            return curve->status_line_at_event(index);
-        }
-    };
-
-    struct Intermediate_functor {
-        Intermediate_functor(const Self* curve) : curve(curve) {}
-        const Self* curve;
-        typedef size_type argument_type;
-        typedef Status_line_1 result_type;
-        result_type operator() (argument_type index) const {
-            return curve->status_line_of_interval(index);
-        }
-    };
-
-    struct Stha_functor {
-        Stha_functor(const Self* curve) : curve(curve) {}
-        const Self* curve;
-        typedef size_type argument_type;
-        typedef Polynomial_1 result_type;
-        result_type operator() (argument_type index) const {
-            return curve->principal_sturm_habicht_of_primitive(index);
-        }
-    };
-
-    //! @}
-
-public:
-
-    //! \name Iterators
-    //! @{
-
-    //! Iterator type for status lines at events
-    typedef boost::transform_iterator<Event_functor, 
-                              boost::counting_iterator<size_type> > 
-    Event_line_iterator;
-
-    //! Iterator type for status lines of intervals
-    typedef boost::transform_iterator<Intermediate_functor, 
-                              boost::counting_iterator<size_type> > 
-    Intermediate_line_iterator;
-
-    //! Iterator type for the principal sturm habicht coefficients of the curve
-    typedef boost::transform_iterator<Stha_functor, 
-                              boost::counting_iterator<size_type> > 
-    Principal_sturm_habicht_iterator;
-
-    //! @}
-
-public:
-
-    //!\name Constructors
-    //!@{  
-      
-    //! Default constructor, constructs an empty and invalid curve analysis
-    Curve_analysis_2() :Base(Rep()) {
-    }
-
-    /*! 
-     * \brief Constructs the curve analysis for the given polynomial
-     *
-     * Analyses the curve that is defined by the vanishing set of the
-     * polynomial \c f. 
-     * \pre \c f is square free.
-     * \param strategy The default strategy 
-     * (\c SHEAR_ONLY_AT_IRRATIONAL_STRATEGY)
-     * is to \c shear the curve
-     * if a degenerate situation is detected during the analysis,
-     * except at rational x-coordinates where the curve can be analysed
-     * more directly. The analysis
-     * is then performed in  the sheared system, and finally translated back
-     * into the original system. 
-     * Using \c SHEAR_STRATEGY, a shear is triggered also for degeneracies
-     * at rational x-coordinate. With both strategies, it is guaranteed that
-     * the analysis works successfully for any square free input curve.
-     * On the other hand, the EXCEPTION_STRATEGY throws an exception of type
-     * \c internal::Zero_resultant_exception<Polynomial_2>, 
-     * instead of performing a shear.
-     *
-     * \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY
-     * because there exist a problem if vertical asymtotes are present at
-     * the rational x-coordinate.
-     */
-    explicit Curve_analysis_2(Algebraic_kernel_with_analysis_2 *kernel,
-                              const Polynomial_2& f,
-                              CGAL::Degeneracy_strategy strategy
-                                  = CGAL_ACK_DEFAULT_DEGENERACY_STRATEGY) 
-        throw(internal::Zero_resultant_exception<Polynomial_2>)
-        : Base(Rep(kernel,f,strategy))
-    {
-
-    }
-
-    //! \brief Copy constructor
-    Curve_analysis_2(const Self& alg_curve)
-        : Base(static_cast<const Base&>(alg_curve)) 
-    {
-    }
-
-
-    //!@}
-
-
-    //! \name Members
-    //!@{
-
-private:
-
-    /*
-     * \brief Sets all status lines at events and of intervals
-     *
-     * Writes the status lines of events and interval into the object.
-     * The value type of both \c InputIterator1 and \c InputIterator2
-     * is \c Status_line_1.
-     */
-    template<typename InputIterator1,typename InputIterator2>
-    void set_event_lines(InputIterator1 event_begin,
-                         InputIterator1 event_end,
-                         InputIterator2 intermediate_begin,
-                         InputIterator2 CGAL_precondition_code(intermediate_end)) const {
-        
-        if(! this->ptr()->event_coordinates) {
-            
-            std::vector<Event_coordinate_1> event_coordinate_vector;
-            
-            for(InputIterator1 it = event_begin; it != event_end; it++) {
-                Event_coordinate_1 curr_event;
-                curr_event.val = it->x();
-                event_coordinate_vector.push_back(curr_event);
-            }
-            this->ptr()->event_coordinates = event_coordinate_vector;
-
-        }
-
-        InputIterator1 it1 = event_begin;
-        for(size_type i = 0; i < number_of_status_lines_with_event() ; i++ ) {
-            this->ptr()->vert_line_map[event_coordinates()[i].val] = *it1; 
-            event_coordinates()[i].stack = *it1;
-
-            it1++;
-        }
-        CGAL_assertion(it1 == event_end);
-
-        if(! this->ptr()->intermediate_values) {
-            this->ptr()->intermediate_values 
-                = std::vector<boost::optional<Bound> >
-                    (number_of_status_lines_with_event()+1);
-        }
-
-        InputIterator2 it2 = intermediate_begin;
-        for(size_type i = 0; 
-            i < static_cast<int>(intermediate_values().size()); 
-            i++,it2++) {
-            
-            CGAL_assertion(it2->x().is_rational());
-            Bound q = it2->x().rational();
-            
-            intermediate_values()[i] = q;
-            this->ptr()->vert_line_map[it2->x()] = *it2;
-            this->ptr()->vert_line_at_rational_map[q] = *it2;
-            
-        }
-        CGAL_assertion(it2 == intermediate_end);
-        
-    }
-
-public:
-
-    /*! \brief Returns whether the curve has a valid defining polynomial
-     */
-    bool has_defining_polynomial() const {
-        return bool(this->ptr()->f);
-    }
-        
-public:
-    
-    /*! \brief Sets the defining polynomial.
-     *
-     * \pre The object has no defining polynomial yet.
-     */
-    void set_f(Polynomial_2 f) {
-        CGAL_precondition(! has_defining_polynomial());
-        if((! this->ptr()->f) || f!=this->ptr()->f.get()) {
-            this->copy_on_write();
-            this->ptr()->f=f;
-        }
-    }
-
-
-public:
-
-    /*! 
-     * \brief Returns whether the curve is y-regular
-     * 
-     * A curve is called y-regular if the leading coefficient of its defining
-     * polynomial wrt y is a constant, i.e., contains no x
-     */
-    bool is_y_regular() const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_is_y_regular();
-        }
-#endif
-        return CGAL::degree(CGAL::leading_coefficient(polynomial_2())) == 0;
-    }
-    
-public:
-
-    /*!
-     * \brief returns whether the curve contains a vertical line as a component
-     *
-     * In algebraic terms, this methods computes whether the content
-     * of its defining polynomial has a real root.
-     */
-    bool has_vertical_component() const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_has_vertical_components();
-        }
-#endif
-        if(is_y_regular()) {
-	    this->ptr()->has_vertical_component = false;
-        }
-        if(! this->ptr()->has_vertical_component) {
-            // This is computed as side effect 
-            // when the event coordinates are computed
-            event_coordinates();
-            CGAL_assertion(this->ptr()->has_vertical_component);
-        }
-        return this->ptr()->has_vertical_component.get();
-    }
-
-public:
-
-    //! Returns the defining polynomial
-    Polynomial_2 polynomial_2() const {
-        CGAL_precondition(bool(this->ptr()->f));
-        return this->ptr()->f.get();
-    }
-
-public:
-
-    /*! 
-     * \brief Returns the number of event lines of the curve
-     *
-     * Algebraically, the number of real roots of the discriminant of
-     * the curve's defining equation is returned.
-     */
-    size_type number_of_status_lines_with_event() const {
-        CGAL_precondition(bool(this->ptr()->f));
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_number_of_status_lines_with_event();
-        }
-#endif
-        return static_cast<size_type>(event_coordinates().size());
-    }
-      
-public:
-
-    /*! 
-     * \brief Returns whether the given x-coordinate is critical for the curve
-     * and which event or interval index the x-coordinate belongs to.
-     * 
-     * \param is_event is set to \c true if the curve has an event
-     * at this x-coordinate, or in other words, if the discriminant of its
-     * defining polynomial vanishes at \c x
-     * \param i is set to the index of the event if \c x is an event. Otherwise
-     * \c i is set to the index of the interval \c x is contained in.
-     */
-    void x_to_index(Algebraic_real_1 x,size_type& i,bool& is_event) const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_x_to_index(x,i,is_event);
-        }
-#endif
-        CGAL_precondition(has_defining_polynomial());
-        typename Rep::Val_functor xval;
-        i = std::lower_bound(
-                ::boost::make_transform_iterator(event_coordinates().begin(), 
-                                                 xval),
-                ::boost::make_transform_iterator(event_coordinates().end(),
-                                                 xval),
-                x
-        ) - ::boost::make_transform_iterator(event_coordinates().begin(), 
-                                             xval);
-        is_event = (i < static_cast<size_type>(event_coordinates().size()) && 
-                    (event_coordinates()[i].val == x) );
-    }
-
-public:
-
-    //! Returns the status line at the <tt>i</tt>-th event of the curve.
-    Status_line_1& status_line_at_event(size_type i) const {
-
-        CGAL_precondition(has_defining_polynomial());
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_status_line_at_event(i);
-        }
-#endif
-        CGAL_precondition_code(
-                size_type n = 
-                static_cast<size_type>(event_coordinates().size());
-        );
-        CGAL_precondition(i>=0 && i<n);
-        if(! event_coordinates()[i].stack) {
-            Status_line_1 event_line = create_status_line_at_event(i);
-            this->ptr()->vert_line_map[event_coordinates()[i].val] 
-                = event_line; 
-            event_coordinates()[i].stack = event_line;
-        }
-        CGAL_postcondition(event_coordinates()[i].stack.get().is_event());
-        return event_coordinates()[i].stack.get();
-    }
-    
-public:    
-
-    //! Returns a status line at the rational <tt>x</tt>-coordinate \c b
-    Status_line_1& status_line_at_exact_x(Bound b) const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_status_line_at_exact_x(b);
-        }
-#endif
-        return status_line_at_exact_x(Algebraic_real_1(b));
-    }
-
-private:
-
-    /*
-     * \brief Returns a status line for an exact value \c alpha that
-     * is not an event of the curve
-     *
-     * This function controls the internal cache that stores already created
-     * status line at non-events. 
-     */
-    Status_line_1& status_line_at_exact_non_event_x(Algebraic_real_1 alpha) 
-        const {
-
-        if(alpha.is_rational()) {
-            
-            typename Rep::Vert_line_at_rational_map::iterator it =
-                this->ptr()->vert_line_at_rational_map.find
-                (alpha.rational());
-            
-            if (it != this->ptr()->vert_line_at_rational_map.end()) {
-                CGAL_assertion(!it->second.is_event());
-                return it->second;
-            }
-        }
-        
-        typename Rep::Vert_line_map::iterator it =
-            this->ptr()->vert_line_map.find(alpha);
-        
-        if (it != this->ptr()->vert_line_map.end()) {
-            CGAL_assertion(!it->second.is_event());
-            return it->second;
-        }
-        
-        
-        // Not stored yet, so create it and store it
-        Status_line_1 cvl 
-            = create_status_line_at_non_event(alpha);
-        CGAL_assertion(!cvl.is_event());
-        this->ptr()->vert_line_map[alpha] = cvl;
-        
-        if(alpha.is_rational()) {
-            this->ptr()->vert_line_at_rational_map[alpha.rational()] = cvl;
-        }
-        return this->ptr()->vert_line_map[alpha];
-    }
-
-public:
-
-    //! Returns a vert line for the <tt>x</tt>-coordinate alpha
-    Status_line_1& status_line_at_exact_x(Algebraic_real_1 alpha) const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_status_line_at_exact_x(alpha);
-        }
-#endif
-        bool is_event_value;
-        size_type index;
-        this->x_to_index(alpha,index,is_event_value);
-        if(is_event_value) {
-            return status_line_at_event(index);
-        }
-        else {
-            return status_line_at_exact_non_event_x(alpha);
-        }
-    }
-
-private:
-    
-    // Creates a status line for the curve's <tt>index</tt>th critical point
-    Status_line_1 create_status_line_at_event(size_type index) const 
-        throw(CGAL::internal::Non_generic_position_exception) {
-
-        Event_coordinate_1& event = event_coordinates()[index];
-        
-        Algebraic_real_1 x = event.val;
-        
-        try {
-            
-            Event_coordinate_1& event = event_coordinates()[index];
-        
-            Algebraic_real_1 x = event.val;
-            
-#if CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES
-            if(event.mult_of_prim_lcoeff_root > 0) {
-                throw CGAL::internal::Non_generic_position_exception();
-            }
-#else
-            if(event.mult_of_prim_lcoeff_root > 0) {
-                if(event.mult_of_prim_lcoeff_root > 1 ||
-                   event.mult_of_prim_res_root > 1) {
-                    throw CGAL::internal::Non_generic_position_exception();
-                }
-            }
-        
-#endif
-        
-#if CGAL_ACK_DEBUG_FLAG
-            double ev_approx = CGAL::to_double(x);
-            CGAL_ACK_DEBUG_PRINT << (index+1) << "th line: "
-                                 << std::setw(6) << std::setprecision(3)
-                                 << ev_approx
-                                 << ".."
-                                 << std::flush;
-#endif	
-            size_type left_arcs 
-                = status_line_for_x(x,CGAL::NEGATIVE).number_of_events();
-            size_type right_arcs 
-                = status_line_for_x(x,CGAL::POSITIVE).number_of_events();
-        
-            bool root_of_resultant=(event.mult_of_prim_res_root>0);
-            bool root_of_content=(event.mult_of_content_root>0);
-        
-            size_type mult_of_resultant  = event.mult_of_prim_res_root;
-
-/*
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << "Event line for " << index << " " 
-                                 << root_of_resultant << " " 
-                                 << root_of_content << " " 
-                                 << mult_of_resultant << " " 
-                                 << left_arcs << " " << right_arcs 
-                                 << std::endl;
-#endif
-*/
-
-            Status_line_1 ev_line 
-                = event_line_builder().create_event_line(index,
-                                                         x,
-                                                         left_arcs,
-                                                         right_arcs,
-                                                         root_of_resultant,
-                                                         root_of_content,
-                                                         mult_of_resultant);
-        
-            event.stack = ev_line;
-
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-
-            return ev_line;
-        } catch(CGAL::internal::Non_generic_position_exception /* exc */) {
-            switch(this->ptr()->degeneracy_strategy) {
-            case(CGAL::EXCEPTION_STRATEGY): {
-                throw CGAL::internal::Non_generic_position_exception();
-                break;
-            }
-	    // Feature does not working atm
-            case(CGAL::SHEAR_ONLY_AT_IRRATIONAL_STRATEGY): {
-	      CGAL_error_msg("Currently not supported");
-	      /*
-	      if(x.is_rational()) {
-                    return create_non_generic_event_at_rational(x,index);
-                }
-                // FALL INTO NEXT CASE                    
-	      */
-            }
-	    case(CGAL::SHEAR_STRATEGY): {
-                return create_non_generic_event_with_shear(index);
-                break;
-            }
-            default:{
-              assert(false); // !!! Never reached
-            }
-            }
-        }
-        // !!! Never reached
-        return Status_line_1();
-    }
-
-private:
-
-    /* 
-     * \brief Method to create a status line using shear and backshear 
-     *
-     * Note that this methods creates <b>all</b> event lines of the object
-     * at once, and stores them in the object.
-     */
-    Status_line_1 create_non_generic_event_with_shear(size_type index) const {
-
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Use sheared technique..." << std::endl;
-#endif
-        internal::Shear_controller<Integer> shear_controller;
-        Integer s(0);
-        while(true) {
-            try {
-                s = shear_controller.get_shear_factor();
-#if CGAL_ACK_DEBUG_FLAG
-                CGAL_ACK_DEBUG_PRINT << "Trying shear factor " 
-                                     << s << std::endl;
-#endif
-                // TODO: Move shear somewhere else
-                Self D(kernel(),
-                       CGAL::internal::shear
-                           (primitive_polynomial_2(),Coefficient(s)),
-                       CGAL::EXCEPTION_STRATEGY);
-                Shear_transformation< Algebraic_kernel_with_analysis_2 > 
-                    shear_transformation(kernel());
-                shear_transformation.report_sheared_disc_roots
-                    (boost::make_transform_iterator(
-                             event_coordinates().begin(),
-                             typename Rep::Val_functor()),
-                     boost::make_transform_iterator(
-                             event_coordinates().end(),
-                             typename Rep::Val_functor()) 
-                    );
-              
-                // Store the sheared curve for later use
-                this->ptr()->sheared_curves.insert(std::make_pair(s,D));
-                shear_transformation(D,-s,(Self&)*this,false);
-                set_vertical_line_components();
-                
-                break;
-            }
-            catch(CGAL::internal::Non_generic_position_exception /* err */) {
-
-                shear_controller.report_failure(s);
-#if CGAL_ACK_DEBUG_FLAG
-                CGAL_ACK_DEBUG_PRINT << "Bad shear factor, retrying..." 
-                                     << std::endl;
-#endif
-            }
-        }
-        
-        return status_line_at_event(index);
-    }
-
-private:
-
-    /*
-     * \brief creates a status line for a rational event x-coordinate
-     *
-     * If an event coordinate is rational, a shear can be prevented
-     * by plugging in the x-coordinate for x and explicitly computing
-     * the square free part of the defining polynomial at this position.
-     *
-     * COMMENTED OUT
-     
-    Status_line_1 create_non_generic_event_at_rational(Algebraic_real_1 x,
-                                                       size_type index) const {
-
-        
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Non-generic, rational position x = " 
-                             << CGAL::to_double(x)
-                             << std::flush;
-#endif
-        
-        CGAL_precondition(x.is_rational());
-        Bound r = x.rational();
-
-	Polynomial_1 f_at_x = kernel()->evaluate_utcf_2_object()
-	  (typename Polynomial_traits_2::Swap()
-	      (primitive_polynomial_2(),0, 1),
-	   r);
-        
-        f_at_x_sq_free 
-            = typename CGAL::Polynomial_traits_d<typename FT::Numerator_type>
-                ::Make_square_free() (f_at_x);
-
-        Bitstream_coefficient_kernel coeff_kernel(kernel(),x);
-        Bitstream_traits traits(coeff_kernel);
-
-        // We need to make an artificial bivariate polynomial
-        typedef typename 
-            CGAL::Polynomial_traits_d<typename FT::Numerator_type>
-            ::template Rebind<typename FT::Numerator_type,1>::Other::Type 
-            Poly_coer_num_2;
-
-        std::vector<typename FT::Numerator_type> coeffs;
-        for(int i = 0; i <= CGAL::degree(f_at_x_sq_free); i++) {
-            coeffs.push_back(typename FT::Numerator_type(f_at_x_sq_free[i]));
-        }
-        Poly_coer_num_2 f_at_x_ext(coeffs.begin(), coeffs.end());
-
-        Bitstream_descartes isolator(CGAL::internal::Square_free_descartes_tag(),
-                                     f_at_x_ext,
-                                     traits);
-        
-        // Now adjacencies
-        std::vector<Bound> bucket_borders;
-
-        int n = isolator.number_of_real_roots();
-
-        if(n==0) {
-            bucket_borders.push_back(0);
-        } else {
-            bucket_borders.push_back(
-                    CGAL::internal::bound_left_of
-                        (kernel(),Algebraic_real_1(isolator.left_bound(0))));
-            for(int i = 1; i < n; i++) {
-                while(Algebraic_real_1(isolator.right_bound(i-1))==
-                      Algebraic_real_1(isolator.left_bound(i))) {
-                    isolator.refine_interval(i-1);
-                    isolator.refine_interval(i);
-                }
-                bucket_borders.push_back(
-                        kernel()->bound_between_1_object()
-                        (Algebraic_real_1(isolator.right_bound(i-1)),
-                         Algebraic_real_1(isolator.left_bound(i)))
-                );
-            }
-            
-            bucket_borders.push_back(
-                    CGAL::internal::bound_right_of
-                        (kernel(),
-			 Algebraic_real_1(isolator.right_bound(n-1))));
-        }
-
-        Bound left = bound_value_in_interval(index);
-        Bound right = bound_value_in_interval(index+1);
-        
-        typedef boost::numeric::interval<Coercion_type> Coercion_interval;
-
-        typename Coercion::Cast cast;
-
-        for(int i = 0; i < static_cast<int>(bucket_borders.size()); i++) {
-            
-            Poly_coer_1 curr_pol 
-                =  primitive_polynomial_2().evaluate(bucket_borders[i]);
-            
-	    CGAL::internal::Interval_evaluate_1
-	      <Poly_coer_1,Bound>
-	      interval_evaluate_1;
-
-            while(true) {
-	      std::pair<Bound,Bound> curr_interval_pair 
-                  = interval_evaluate_1(curr_pol,std::make_pair(left,right));
-	      Coercion_interval curr_interval(curr_interval_pair.first,
-					      curr_interval_pair.second);
-
-	      if(boost::numeric::in_zero(curr_interval)) {
-		// "refine"
-		Bound middle = (left+right)/2;
-		if(middle==r) {
-		  left=(left+middle)/2;
-		  right = (right+middle)/2;
-		} else if(middle>r) {
-		  right=middle;
-		} else {
-		  left=middle;
-		}
-	      } else {
-		break;
-	      }
-            }
-        }
-
-        Status_line_1 left_line 
-            = status_line_at_exact_non_event_x(Algebraic_real_1(left)),
-            right_line 
-            = status_line_at_exact_non_event_x(Algebraic_real_1(right));
-        
-        int n_left = left_line.number_of_events();
-        int n_right = right_line.number_of_events();
-        
-        std::vector<int> left_arcs(bucket_borders.size()+1),
-            right_arcs(bucket_borders.size()+1);
-        
-        for(unsigned int i=0;i<left_arcs.size();i++) {
-            left_arcs[i]=0;
-        }
-        for(unsigned int i=0;i<right_arcs.size();i++) {
-            right_arcs[i]=0;
-        }
-        
-        int curr_index=0;
-        for(int i=0; i < n_left; i++) {
-            
-            while(true) {
-                if(curr_index==static_cast<int>(bucket_borders.size())) {
-                    left_arcs[curr_index]++;
-                    break;
-                } else if(left_line.lower_bound(i)>
-                          bucket_borders[curr_index]) {
-                    curr_index++;
-                } else if(left_line.upper_bound(i)<
-                          bucket_borders[curr_index]) {
-                    left_arcs[curr_index]++;
-                    break;
-                } else {
-                    left_line.refine(i);
-                }
-            }
-        }
-        curr_index=0;
-        for(int i=0; i < n_right; i++) {
-            
-            while(true) {
-                if(curr_index==static_cast<int>(bucket_borders.size())) {
-                    right_arcs[curr_index]++;
-                    break;
-                } else if(right_line.lower_bound(i)>
-                          bucket_borders[curr_index]) {
-                    curr_index++;
-                } else if(right_line.upper_bound(i)<
-                          bucket_borders[curr_index]) {
-                    right_arcs[curr_index]++;
-                    break;
-                } else {
-                    right_line.refine(i);
-                }
-            }
-
-        }
-        
-        typename Status_line_1::Arc_container arc_container;
-        
-        for(int i = 0; i < n; i++) {
-            arc_container.push_back(std::make_pair(left_arcs[i+1],
-                                                   right_arcs[i+1]));
-        }
-        
-        Status_line_1 status_line(x,index,*this,n_left,n_right,arc_container);
-
-        status_line._set_number_of_branches_approaching_infinity
-            (std::make_pair(left_arcs[0],right_arcs[0]),
-             std::make_pair(left_arcs[n+1],right_arcs[n+1]));
-
-        status_line.set_isolator(isolator);
-
-        if(event_coordinates()[index].mult_of_content_root > 0) {
-            status_line._set_v_line();
-        }
-
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-
-        return status_line;
-    }
-    */
-
-public:
-
-    /*! 
-     * \brief Returns the status line for the interval 
-     * preceeding the <tt>i</tt>th event
-     *
-     * Returns a status line for a reference x-coordinate of the <tt>i</tt>th
-     * interval of the curve. If called multiple times for the same <tt>i</tt>,
-     * the same status line is returned.
-     */
-    Status_line_1 status_line_of_interval(size_type i) const
-    {
-        CGAL_precondition(i >= 0 && i <= number_of_status_lines_with_event());
-      
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_status_line_of_interval(i);
-        }
-#endif
-  
-        Bound b = bound_value_in_interval(i);
-        
-        Status_line_1 intermediate_line 
-            = status_line_at_exact_non_event_x(Algebraic_real_1(b));
-
-        CGAL_postcondition(! intermediate_line.is_event());
-
-        return intermediate_line;
-    }
-    
-
-public:
-
-    /*!
-     * \brief returns a status line at position \c x
-     *
-     * If \c x is not an event of the curve, and lies in the <tt>i</tt>th
-     * interval, the result is equal to <tt>status_line_of_interval(i)</tt>.
-     * Different from <tt>status_line_at_exact_x(x)</tt>
-     * the status line \c s returned does not satisft <tt>s.x()==x</tt>.
-     * If \c x is an event, and \c perturb is set to \c CGAL::ZERO,
-     * the status line for the event is returned. Otherwise, the status line
-     * for the left or right neighboring interval is returned, depending
-     * on whether \c perturb is set to \c CGAL::NEGATIVE or \c CGAL::POSITIVE.
-     * If \c x is not an event, \c perturb has no effect. 
-     */ 
-    Status_line_1 status_line_for_x(Algebraic_real_1 x,
-                                    CGAL::Sign perturb = CGAL::ZERO) const
-    {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_status_line_for_x(x,perturb);
-        }
-#endif
-
-        size_type i;
-        bool is_evt;
-        x_to_index(x, i, is_evt);
-        if(is_evt) {
-            if(perturb == CGAL::ZERO)
-                return status_line_at_event(i);
-            if(perturb == CGAL::POSITIVE)
-                i++;
-        } 
-        return status_line_of_interval(i);
-    }
-
-
-private:
-
-    /*
-     * \brief Creates an intermediate line at position \c ar.
-     *
-     * It is required that none of the following situations occurs at position
-     * <tt>ar</tt>: singularity, vertical tangent line, vertical asymptote.\n
-     * Otherwise, the method might run into an infinite loop. 
-     * 
-     * \param index if set to -1, the interval containing \c ar is computed
-     * within the method, and the index of the status line is set accordingly.
-     */
-    Status_line_1
-    create_status_line_at_non_event(Algebraic_real_1 ar, int index = -1) 
-        const {
-
-        if(index==-1) {
-            bool event;
-            x_to_index(ar,index,event);
-            CGAL_assertion(!event);
-        }
-        CGAL_assertion(index>=0);
-
-        // TODO .. delay creation of refinement object 
-        // especially when ar is rational
-        
-        Bitstream_coefficient_kernel coeff_kernel(kernel(),ar);
-        Bitstream_traits traits(coeff_kernel);
-
-        Bitstream_descartes 
-            bitstream_descartes(CGAL::internal::Square_free_descartes_tag(),
-                                primitive_polynomial_2(),
-                                traits);
-
-        size_type root_number=bitstream_descartes.number_of_real_roots();
-
-        Status_line_1 status_line(ar, index, *this, root_number);
-        status_line.set_isolator(bitstream_descartes);
-        
-        CGAL_assertion(! status_line.is_event());
-
-        return status_line;
-    }
-
-private:
-
-   /*
-    * \brief Returns an Event_line_builder instance
-    *
-    * Note: So far, a new instance is created each time the function is called
-    */
-    Event_line_builder event_line_builder() const {
-        
-        return Event_line_builder(kernel(), *this, primitive_polynomial_2());
-    }
-
-public:
-
-    /*! 
-     * \brief Number of arcs over the given interval
-     *
-     * Shortcut for <tt>status_line_of_interval(i).number_of_events()</tt>
-     */
-    size_type arcs_over_interval(size_type i) const {
-        CGAL_precondition(has_defining_polynomial());
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_arcs_over_interval(i);
-        }
-#endif
-        CGAL_assertion_code(
-                size_type n 
-                    = static_cast<size_type>(intermediate_values().size());
-        );
-        CGAL_precondition(i>=0 && i<=n);
-        return status_line_of_interval(i).number_of_events();
-    }
-
-public:
-
-    /*! 
-     * \brief Rational number in the <tt>i</tt>th interval between events
-     *
-     * The result of this method is taken as the reference x-coordinate
-     * for the status lines of intervals.
-     */
-    Bound bound_value_in_interval(size_type i) const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_bound_value_in_interval(i);
-        }
-#endif
-        CGAL_assertion(i>=0 && 
-                       i < static_cast<size_type>
-                           (intermediate_values().size()));
-        if(! intermediate_values()[i]) {
-          // Create it
-            if(event_coordinates().size()==0) {
-                CGAL_assertion(i==0);
-                intermediate_values()[0]=Bound(0);
-            } else {
-                if(i==0) {
-                    intermediate_values()[i] 
-		      = bound_left_of(kernel(),event_coordinates()[i].val);
-                } else if(i == static_cast<size_type>
-                              (event_coordinates().size())) {
-                    intermediate_values()[i] 
-                        = bound_right_of
-		      (kernel(),event_coordinates()[i-1].val);
-                    
-                } else {
-                    intermediate_values()[i]
-		      = kernel()->bound_between_1_object()
-		      (event_coordinates()[i-1].val,
-		       event_coordinates()[i].val);
-                }
-            }
-        }
-        return intermediate_values()[i].get();
-    }
-
-
-public:
-
-    /*! 
-     * Returns the content of the defining polynomial
-     *
-     * The content is the gcd of its coefficients (the polynomial is considered
-     * as polynomial in \c y)
-     */
-    Polynomial_1 content() const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_content();
-        }
-#endif
-        if(! this->ptr()->content) {
-            compute_content_and_primitive_part();
-        }
-        return this->ptr()->content.get();
-    }
-
-public:
-
-    /*! 
-     * Returns the primitive part of the defining polynomial
-     * 
-     * The primitive part of \c f is the \c f divided by its content.
-     */
-    Polynomial_2 primitive_polynomial_2() const {
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_primitive_polynomial_2();
-        }
-#endif
-        if(! this->ptr()->f_primitive) {
-            compute_content_and_primitive_part();
-        }
-        return this->ptr()->f_primitive.get();
-    }
-
-    Algebraic_kernel_with_analysis_2* kernel() const {
-        return this->ptr()->_m_kernel;
-    }
-
-private:
-
-
-    // computes and sets the content and the primitive part for the curve
-    void compute_content_and_primitive_part() const {
-
-        CGAL_assertion(has_defining_polynomial());
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Computing the content..." << std::flush;
-#endif
-        this->ptr()->content 
-            = typename CGAL::Polynomial_traits_d< Polynomial_2 >::
-                Univariate_content_up_to_constant_factor()( polynomial_2() );
-        if(CGAL::degree(content())==0) {
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << "no vertical lines as components" 
-                                 << std::endl;
-#endif
-            this->ptr()->f_primitive=polynomial_2();
-        }
-        else {
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << "non-trivial content found" << std::endl;
-#endif
-            // Content must be square free, because the curve is square free
-            CGAL_assertion( typename CGAL::Polynomial_traits_d< Polynomial_1 >
-                            ::Is_square_free()(content()));
-            this->ptr()->f_primitive=polynomial_2() / content();
-	    
-        }
-
-    }
-
-private:
-
-    //! Returns the Sturm-Habicht sequence of the primitive part of f
-    std::vector<Polynomial_2>& sturm_habicht_of_primitive() const 
-    throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        if(! this->ptr()->sturm_habicht_of_primitive) {
-            compute_sturm_habicht_of_primitive();
-        }  
-        return this->ptr()->sturm_habicht_of_primitive.get();
-    }
-
-public: 
-
-    /*! 
-     * \brief Returns the <tt>i</tt>th Sturm-Habicht polynomial 
-     * of the primitive part of the defining polynomial
-     */
-    Polynomial_2 sturm_habicht_of_primitive(size_type i) const 
-      throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        CGAL_assertion(i>=0 && 
-                    i < static_cast<size_type>
-                       (sturm_habicht_of_primitive().size()));
-        return sturm_habicht_of_primitive()[i];
-    }
-
-public:
-
-    /*! 
-     * \brief Returns the <tt>i</tt>th principal Sturm-Habicht coefficient
-     * of the primitive part of the defining polynomial
-     */
-    Polynomial_1 principal_sturm_habicht_of_primitive(size_type i) const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        CGAL_assertion(i>=0 && 
-                    i < static_cast<size_type>
-                       (sturm_habicht_of_primitive().size()));
-
-        CGAL_assertion(CGAL::degree(sturm_habicht_of_primitive()[i])<=i);
-        if(CGAL::degree(sturm_habicht_of_primitive()[i]) < i) {
-            return Polynomial_1(0);
-        } // else:
-        return sturm_habicht_of_primitive()[i][i];
-    }
-
-public:
-
-    /*! 
-     * \brief Returns the <tt>i</tt>th coprincipal Sturm-Habicht coefficient
-     * of the primitive part of the defining polynomial
-     *
-     * The coprincipal Sturm-Habicht coefficient is the coefficient
-     * of <tt>y^{i-1}</tt> of the <tt>i</tt>th Sturm-Habicht polynomial
-     */
-    Polynomial_1 coprincipal_sturm_habicht_of_primitive(size_type i) const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        CGAL_assertion(i>=1 && 
-                    i < static_cast<size_type>
-                       (sturm_habicht_of_primitive().size()));
-        CGAL_assertion(CGAL::degree(sturm_habicht_of_primitive()[i])<=i);
-        if(CGAL::degree(sturm_habicht_of_primitive()[i]) < i-1) {
-            return Polynomial_1(0);
-        } // else:
-        return sturm_habicht_of_primitive()[i][i-1];
-    }
-
-public:
-
-    /*! 
-     * \brief Returns an iterator to the principal Sturm-Habicht coefficients,
-     * starting with the <tt>0</tt>th one (the resultant)
-     */
-    Principal_sturm_habicht_iterator principal_sturm_habicht_begin() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>(0),
-             Stha_functor(this));
-    }
-
-    //! Returns an iterator to the end of principal Sturm-Habicht coefficients
-    Principal_sturm_habicht_iterator principal_sturm_habicht_end() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>
-                 (sturm_habicht_of_primitive().size()),
-             Stha_functor(this));
-    }
-
-private:
-
-    // Internal method to compute the Sturm-Habicht sequence
-    void compute_sturm_habicht_of_primitive() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Compute Sturm-Habicht.." << std::flush;
-#endif
-        std::vector<Polynomial_2> stha;
-        
-        // Fix a problem for constant primitive part.
-        // In this case, the St.-Ha. sequence is never needed
-        if(CGAL::degree(primitive_polynomial_2()) == 0) {
-            // Set the resultant
-            stha.push_back(primitive_polynomial_2());
-        } else {
-            
-#if CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS
-#warning USES BEZOUT MATRIX FOR SUBRESULTANTS
-            CGAL::internal::bezout_polynomial_subresultants<Polynomial_traits_2>
-                (primitive_polynomial_2(),
-                 CGAL::differentiate(primitive_polynomial_2()),
-                 std::back_inserter(stha));
-            stha.push_back(primitive_polynomial_2());
-            size_type p = CGAL::degree(primitive_polynomial_2());
-            CGAL_assertion(static_cast<size_type>(stha.size()) == p+1);
-            for(size_type i=0;i<p; i++) {
-                if((p-i)%4==0 || (p-i)%4==1) {
-                    stha[i] = stha[i];
-                } else {
-                    stha[i] = -stha[i];
-                }
-            }
-            
-#else
-            typename Polynomial_traits_2::Sturm_habicht_sequence()
-                (primitive_polynomial_2(),std::back_inserter(stha));
-#endif
-        }
-        // Also set the resultant, if not yet set
-        if(! this->ptr()->resultant_of_primitive_and_derivative_y) {
-            this->ptr()->resultant_of_primitive_and_derivative_y = stha[0][0];
-            if(this->ptr()->resultant_of_primitive_and_derivative_y.
-                   get().is_zero()) {
-                throw internal::Zero_resultant_exception<Polynomial_2>
-                    (polynomial_2());
-            }
-        }
-        
-        this->ptr()->sturm_habicht_of_primitive = stha;
-        CGAL_assertion(CGAL::canonicalize
-		       (resultant_of_primitive_and_derivative_y()) == 
-                       CGAL::canonicalize
-		       (principal_sturm_habicht_of_primitive(0)));
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-    }
-
-private:
-
-    //! Returns the resultant of the primitive part of f and its y-derivative
-    Polynomial_1 resultant_of_primitive_and_derivative_y() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        if(! this->ptr()->resultant_of_primitive_and_derivative_y) {
-            compute_resultant_of_primitive_and_derivative_y();
-        }
-        return this->ptr()->resultant_of_primitive_and_derivative_y.get();
-    }
-
-private:
-
-    //! Returns the resultant of the primitive part of f with its x-derivative
-    Polynomial_1 resultant_of_primitive_and_derivative_x() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        if(! this->ptr()->resultant_of_primitive_and_derivative_x) {
-            compute_resultant_of_primitive_and_derivative_x();
-        }
-        return this->ptr()->resultant_of_primitive_and_derivative_x.get();
-    }
-
-private:
-    // Computes <tt>res_y(f,f_y)</tt>, where \c f is the defining polynomial
-    void compute_resultant_of_primitive_and_derivative_y() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Compute resultant.." << std::flush;
-#endif
-
-        CGAL_assertion(has_defining_polynomial());
-
-#if CGAL_ACK_RESULTANT_FIRST_STRATEGY
-#ifndef CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD
-        bool speed_up = true;
-#else
-        bool speed_up=CGAL::degree(polynomial_2()) >= 
-            CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD;
-#endif
-#else
-        bool speed_up=false;
-#endif
-        
-        if(CGAL::degree(polynomial_2()) == 0) {
-	    this->ptr()->resultant_of_primitive_and_derivative_y 
-                = Polynomial_1(1);
-        } else {
-            
-            if(! speed_up) {
-                
-                // Compute resultant using the Sturm-Habicht sequence
-                this->ptr()->resultant_of_primitive_and_derivative_y 
-                    = principal_sturm_habicht_of_primitive(0);
-        
-            } else {
-                typename Polynomial_traits_2::Differentiate diff;
-                this->ptr()->resultant_of_primitive_and_derivative_y
-                    = CGAL::resultant
-                        (primitive_polynomial_2(),
-                         diff(primitive_polynomial_2(),1));
-            }
-
-        }
-
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-
-        if(resultant_of_primitive_and_derivative_y().is_zero()) {
-            throw internal::Zero_resultant_exception<Polynomial_2>
-                (polynomial_2());
-        }
-    }
-    
-    // Computes <tt>res_y(f,f_x)</tt>, where \c f is the defining polynomial
-    void compute_resultant_of_primitive_and_derivative_x() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "Compute x-resultant.." << std::flush;
-#endif
-
-        CGAL_assertion(has_defining_polynomial());
-
-        // Transpose the polynomial
-        Polynomial_2 f_yx = typename Polynomial_traits_2::Swap() 
-            (polynomial_2(),0,1);
-
-        if( CGAL::degree(f_yx) == 0 ) {
-            // Polynomial only consists of horizontal lines
-            // primitive resultant is set to 1
-            this->ptr()->resultant_of_primitive_and_derivative_x 
-                = Polynomial_1(1);
-        } else {
-            
-            Polynomial_2 f_yx_primitive;
-            
-            Polynomial_1 content_yx 
-                = typename CGAL::Polynomial_traits_d< Polynomial_2 >::
-                    Univariate_content_up_to_constant_factor()( f_yx );
-            if(CGAL::degree(content_yx)==0) {
-                f_yx_primitive=f_yx;
-            }
-            else {
-                CGAL_assertion
-                    (typename CGAL::Polynomial_traits_d< Polynomial_1 >::
-                         Is_square_free()(content_yx));
-                f_yx_primitive=f_yx / content_yx;
-                
-            }
-            
-            this->ptr()->resultant_of_primitive_and_derivative_x
-                = CGAL::resultant
-                (typename Polynomial_traits_2::Swap() (f_yx_primitive,0,1),
-                 typename Polynomial_traits_2::Swap() 
-                    (CGAL::differentiate(f_yx_primitive),0,1) );
-        }
-        
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-
-        if(resultant_of_primitive_and_derivative_x().is_zero()) {
-            throw internal::Zero_resultant_exception<Polynomial_2>
-                (polynomial_2());
-        }
-    }
-
-
-
-
-private:
-
-    // Returns the critical event coordinates
-    std::vector<Event_coordinate_1>& event_coordinates() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        if(! this->ptr()->event_coordinates) {
-            compute_event_coordinates();
-        }
-        return this->ptr()->event_coordinates.get();
-    }
-
-private:
-
-    // Returns the intermediate values for intervals between events
-    std::vector<boost::optional<Bound> >& intermediate_values() const 
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-        
-        if(! this->ptr()->intermediate_values) {
-            // This is created during event_coordiantes()
-            event_coordinates();
-            CGAL_assertion(bool(this->ptr()->intermediate_values));
-        }
-        return this->ptr()->intermediate_values.get();
-    }
-
-
-private:
-
-    /*
-     * \brief Computes the event coordinates of the curve.
-     *
-     * This function computes the content of the defining polynomial,
-     * and the roots of its discriminant. These two sets form the critical
-     * x-coordinates of the curve.
-     */
-    void compute_event_coordinates() const
-        throw(internal::Zero_resultant_exception<Polynomial_2>) {
-         
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "compute events..." << std::flush;
-#endif
-         
-        Solve_1 solve_1;
-         
-        std::vector<std::pair<Algebraic_real_1,size_type> > content_pairs;
-        std::vector<Algebraic_real_1> content_roots;
-        std::vector<size_type> content_mults;
-        solve_1(content(),
-                std::back_inserter(content_pairs));
-
-        for(int i=0; i < static_cast<int>(content_pairs.size()); i++ ) {
-            content_roots.push_back(content_pairs[i].first);
-            content_mults.push_back(content_pairs[i].second);
-        }
-        
-        // Set the vertical_line_components flag as side effect
-        this->ptr()->has_vertical_component = (content_roots.size() > 0);
-
-        std::vector<std::pair<Algebraic_real_1,size_type> > res_pairs;
-        std::vector<Algebraic_real_1> res_roots;
-        std::vector<size_type> res_mults;
-        Polynomial_1 R = resultant_of_primitive_and_derivative_y();
-        solve_1(R,std::back_inserter(res_pairs));
-        
-        for(int i=0; i < static_cast<int>(res_pairs.size()); i++ ) {
-            res_roots.push_back(res_pairs[i].first);
-            res_mults.push_back(res_pairs[i].second);
-        }
-
-        std::vector<std::pair<Algebraic_real_1,size_type> > lcoeff_pairs;
-        std::vector<Algebraic_real_1> lcoeff_roots;
-        std::vector<size_type> lcoeff_mults;
-        solve_1(CGAL::leading_coefficient(primitive_polynomial_2()),
-                std::back_inserter(lcoeff_pairs));
-
-        for(int i=0; i < static_cast<int>(lcoeff_pairs.size()); i++ ) {
-            lcoeff_roots.push_back(lcoeff_pairs[i].first);
-            lcoeff_mults.push_back(lcoeff_pairs[i].second);
-        }
-        
-
-        //Now, merge the vertical line positions with the resultant roots
-        typename 
-            CGAL::Real_embeddable_traits<Algebraic_real_1>::Compare compare;
-
-        std::vector<Algebraic_real_1> event_values;
-        std::vector<CGAL::internal::Three_valued> event_values_info;
-
-        CGAL::internal::set_union_with_source
-            (res_roots.begin(),
-             res_roots.end(),
-             content_roots.begin(),
-             content_roots.end(),
-             std::back_inserter(event_values),
-             std::back_inserter(event_values_info),
-             compare);
-
-        // Now, build the Event_coordinate_1 entries 
-        // for each element of event_values
-        size_type curr_res_index = 0, curr_content_index = 0, 
-            curr_lcoeff_index = 0;
-        std::vector<Event_coordinate_1> event_coordinate_vector;
-
-        for(size_type i = 0; 
-            i < static_cast<size_type>(event_values.size()); 
-            i++ ) {
-            
-            Event_coordinate_1 curr_event;
-            curr_event.val = event_values[i];
-            switch(event_values_info[i]) {
-            
-            case(CGAL::internal::ROOT_OF_FIRST_SET): {
-                curr_event.index_of_prim_res_root = curr_res_index;
-                CGAL_expensive_assertion(res_roots[curr_res_index] == 
-                                         event_values[i]);
-                curr_event.mult_of_prim_res_root 
-                    = res_mults[curr_res_index];
-                curr_res_index++;
-                if(curr_lcoeff_index < 
-                   static_cast<size_type>(lcoeff_roots.size()) &&
-                   event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
-                    // We have a root of the leading coefficient
-                    // of the primitve polynomial
-                    curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
-                    curr_event.mult_of_prim_lcoeff_root 
-                        = lcoeff_mults[curr_lcoeff_index];
-                    curr_lcoeff_index++;
-                } else {
-                    curr_event.index_of_prim_lcoeff_root = -1;
-                    curr_event.mult_of_prim_lcoeff_root = 0;
-                }
-                
-                curr_event.index_of_content_root = -1;
-                curr_event.mult_of_content_root = 0;
-                break;
-            }
-            case(CGAL::internal::ROOT_OF_SECOND_SET): {
-                curr_event.index_of_content_root = curr_content_index;
-                CGAL_expensive_assertion(content_roots[curr_content_index] == 
-                                         event_values[i]);
-                curr_event.mult_of_content_root 
-                    = content_mults[curr_content_index];
-                curr_content_index++;
-                curr_event.index_of_prim_res_root = -1;
-                curr_event.mult_of_prim_res_root = 0;
-                CGAL_expensive_assertion(event_values[i]!=
-                                         lcoeff_roots[curr_lcoeff_index]);
-                curr_event.index_of_prim_lcoeff_root = -1;
-                curr_event.mult_of_prim_lcoeff_root = 0;
-                break;
-            }
-            case(CGAL::internal::ROOT_OF_BOTH_SETS): {
-                curr_event.index_of_prim_res_root = curr_res_index;
-                CGAL_expensive_assertion(res_roots[curr_res_index] == 
-                                         event_values[i]);
-                curr_event.mult_of_prim_res_root 
-                    = res_mults[curr_res_index];
-                curr_res_index++;
-                if(curr_lcoeff_index < 
-                   static_cast<size_type>(lcoeff_roots.size()) &&
-                   event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
-                    // We have a root of the leading coefficient
-                    // of the primitve polynomial
-                    curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
-                    curr_event.mult_of_prim_lcoeff_root 
-                        = lcoeff_mults[curr_lcoeff_index];
-                    curr_lcoeff_index++;
-                } else {
-                    curr_event.index_of_prim_lcoeff_root = -1;
-                    curr_event.mult_of_prim_lcoeff_root = 0;
-                }
-                curr_event.index_of_content_root = curr_content_index;
-                CGAL_expensive_assertion(content_roots[curr_content_index] == 
-                                         event_values[i]);
-                curr_event.mult_of_content_root 
-                    = content_mults[curr_content_index];
-                curr_content_index++;
-                break;
-            }
-            } // of switch
-            /*           
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << "Constructed event_coordinate: " 
-                                 << CGAL::to_double(curr_event.val) << " " 
-                                 << "\nmult_of_prim_res_root : "
-                                 << curr_event.mult_of_prim_res_root
-                                 << "\nindex_of_prim_res_root : "
-                                 << curr_event.index_of_prim_res_root
-                                 << "\nmult_of_content_root : "
-                                 << curr_event.mult_of_content_root
-                                 << "\nindex_of_content_root : "
-                                 << curr_event.index_of_content_root
-                                 << "\nmult_of_lcoeff_root : "
-                                 << curr_event.mult_of_prim_lcoeff_root
-                                 << "\nindex_of_lcoeff_root : "
-                                 << curr_event.index_of_prim_lcoeff_root
-                                 << std::endl;
-#endif
-            */
-            event_coordinate_vector.push_back(curr_event);
-        }
-        
-
-        CGAL_assertion(curr_lcoeff_index == 
-                       static_cast<size_type>(lcoeff_roots.size()));
-        CGAL_assertion(curr_res_index == 
-                       static_cast<size_type>(res_roots.size()));
-        CGAL_assertion(curr_content_index == 
-                       static_cast<size_type>(content_roots.size()));
-
-        this->ptr()->intermediate_values 
-            = std::vector<boost::optional<Bound> >
-            (event_coordinate_vector.size()+1);
-        this->ptr()->event_coordinates = event_coordinate_vector;
-      
-#if CGAL_ACK_DEBUG_FLAG
-        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
-#endif
-
-    }
-
-public:    
-
-    /*! 
-     * \brief Returns a \c Curve_analysis_2 object for a sheared curve.
-     *
-     * The shear factor is given by the integer \c s.
-     * This functions only shears the primitive part of the defining equation.
-     * Internal caching is used to avoid repeated shears.
-     *
-     * \todo The sheared curves are not inserted into the curve_cache 
-     * of the Algebraic_curve_kernel_2 yet.
-     */
-    Self& shear_primitive_part(Integer s) const
-        throw(CGAL::internal::Non_generic_position_exception)
-    {
-        CGAL_assertion(s!=0);
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_shear_primitive_part();
-        }
-#endif
-        if(this->ptr()->bad_shears.find(s) !=
-           this->ptr()->bad_shears.end()) {
-            throw CGAL::internal::Non_generic_position_exception();
-        }
-        typedef typename std::map<Integer,Self>::iterator 
-            Map_iterator;
-        Map_iterator it = this->ptr()->sheared_curves.find(s);
-        if(it != this->ptr()->sheared_curves.end()) {
-            return it->second;
-        }
-        try {
-            Shear_transformation<Algebraic_kernel_with_analysis_2> 
-                shear_transformation(kernel());
-            Self D=shear_transformation((Self&)*this, s);
-            std::pair<Map_iterator,bool> insertion =
-                this->ptr()->sheared_curves.insert(std::make_pair(s,D));
-            CGAL_assertion(insertion.second);
-            return insertion.first->second;
-        }
-        catch(CGAL::internal::Non_generic_position_exception /* err */) {
-            this->ptr()->bad_shears.insert(s);
-            throw CGAL::internal::Non_generic_position_exception();
-        }
-    }
-    
-public:
-
-    //! Iterator for sheared curves
-    typename std::map<Coefficient,Self>::const_iterator shear_begin() {
-        return this->ptr()->sheared_curves.begin();
-    }
-
-    //! Iterator for sheared curves
-    typename std::map<Coefficient,Self>::const_iterator shear_end() {
-        return this->ptr()->sheared_curves.end();
-    }
-
-private:	
-  
-    // Sets the flag for vertical lines in all status lines that need it
-    void set_vertical_line_components() const {
-        for(size_type i = 0; 
-            i < static_cast<size_type>(event_coordinates().size()); 
-            i++ ) {
-            
-            if(event_coordinates()[i].mult_of_content_root > 0) {
-                status_line_at_event(i)._set_v_line();
-            }
-        }
-         
-    }
-    
-
-public:
-
-    /*!
-     * \brief Increases the precision of all status lines
-     *
-     * For each status line at an event and each status line that represents
-     * an interval, all y-coordinates are approximated such that their
-     * isolating interval has absolute size smaller then \c precision.
-     */
-    void refine_all(Bound precision) {
-
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_refine_all(precision);
-        }
-#endif
-
-        for(size_type i=0;
-            i<static_cast<size_type>(event_coordinates().size());
-            i++) {
-        /*
-#if CGAL_ACK_DEBUG_FLAG
-            CGAL_ACK_DEBUG_PRINT << i << ": " << std::flush;
-#endif
-        */
-            Status_line_1& el = status_line_at_event(i);
-
-            for(size_type j=0;j<el.number_of_events();j++) {
-/*
-#if CGAL_ACK_DEBUG_FLAG
-                CGAL_ACK_DEBUG_PRINT << j << " " << std::flush;
-#endif
-*/
-                el.refine_to(j,precision);
-            }
-        }
-        for(size_type i=0;
-            i<static_cast<size_type>(intermediate_values().size());
-            i++) {
-            Status_line_1 il = status_line_of_interval(i);
-            for(size_type j=0;j<il.number_of_events();j++) {
-                il.refine_to(j,precision);
-            }
-        }
-    }
-
-public:
-
-    //! \brief Iterator for the status lines at events
-    Event_line_iterator event_begin() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>(0),
-             Event_functor(this));
-    }
-
-    //! \brief Iterator for the status lines at events
-    Event_line_iterator event_end() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>
-             (number_of_status_lines_with_event()),
-             Event_functor(this));
-    }
-
-public:
-   
-    //! \brief Iterator for the status lines for intervals
-    Intermediate_line_iterator intermediate_begin() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>(0),
-             Intermediate_functor(this));
-    }
-
-    //! \brief Iterator for the status lines for intervals
-    Intermediate_line_iterator intermediate_end() const {
-        return boost::make_transform_iterator
-            (boost::counting_iterator<size_type>(intermediate_values().size()),
-             Intermediate_functor(this));
-    }
-
-public:
-
-    /*!
-     * \brief Returns the limit an infinite arc converges to
-     *
-     * \pre <tt>loc==CGAL::ARR_LEFT_BOUNDARY || 
-     *          loc==CGAL::ARR_RIGHT_BOUNDARY</tt>
-     *
-     * This method returns for the <tt>arcno</tt>th arc that goes to -infinity
-     * or +infinity (depending on \c loc) the y-coordinate it converges to.
-     * Possible values are either a \c Algebraic_real_1 object, or one of the
-     * values \c CGAL::ARR_TOP_BOUNDARY, \c CGAL::ARR_BOTTOM_BOUNDARY
-     * that denote that the arc is unbounded in y-direction. 
-     * The result is wrapped into a \c CGAL::Object object.
-     */
-    Asymptote_y asymptotic_value_of_arc(CGAL::Arr_parameter_space loc,
-                                        size_type arcno) const {
-        
-        CGAL_precondition(loc == CGAL::ARR_LEFT_BOUNDARY ||
-                          loc == CGAL::ARR_RIGHT_BOUNDARY);
-
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-        if(CGAL::degree(polynomial_2(),1)==2) {
-            return this->conic_asymptotic_value_of_arc(loc,arcno);
-        }
-#endif
-        
-        if(loc == CGAL::ARR_LEFT_BOUNDARY) {
-            
-            if(! this->ptr()->horizontal_asymptotes_left) {
-                compute_horizontal_asymptotes();
-            }
-            std::vector<Asymptote_y>& asym_info 
-                = this->ptr()->horizontal_asymptotes_left.get();
-            CGAL_precondition(arcno>=0 && 
-                              arcno<static_cast<size_type>(asym_info.size()));
-            return asym_info[arcno];
-        } // else loc == CGAL::ARR_RIGHT_BOUNDARY
-
-        if(! this->ptr()->horizontal_asymptotes_right) {
-            compute_horizontal_asymptotes();
-        }
-        std::vector<Asymptote_y>& asym_info 
-            = this->ptr()->horizontal_asymptotes_right.get();
-        CGAL_precondition(arcno>=0 && 
-                          arcno<static_cast<size_type>(asym_info.size()));
-        return asym_info[arcno];
-        
-    }
-
-
-private:
-
-    // Internal method to compute horizontal asymptotes
-    void compute_horizontal_asymptotes() const {
-      
-        // TODO: Filter out curves with no arc to +/- infty
-
-        Solve_1 solve_1 = kernel()->solve_1_object();
-
-        Polynomial_1 leading_coefficient_in_x 
-            = CGAL::leading_coefficient(typename Polynomial_traits_2::Swap() 
-                                        (polynomial_2(),0,1));
-        std::vector<Algebraic_real_1> roots_of_lcoeff;
-        
-        solve_1(leading_coefficient_in_x,
-                std::back_inserter(roots_of_lcoeff),
-                false);
-        
-
-        std::vector<Bound> stripe_bounds;
-        find_intermediate_values(kernel(),
-				 roots_of_lcoeff.begin(),
-                                 roots_of_lcoeff.end(),
-                                 std::back_inserter(stripe_bounds));
-        Bound leftmost_bound = bound_value_in_interval(0),
-            rightmost_bound = bound_value_in_interval
-                (this->number_of_status_lines_with_event());
-        for(size_type i=0;i<static_cast<size_type>(stripe_bounds.size());i++) {
-            Bound& beta = stripe_bounds[i];
-            Polynomial_1 poly_at_beta 
-	      = kernel()->evaluate_utcf_2_object()(this->polynomial_2(),beta);
-            std::vector<Algebraic_real_1> x_coordinates_at_beta;
-            solve_1(poly_at_beta,std::back_inserter(x_coordinates_at_beta),
-                    false);
-            size_type number_of_roots 
-                = static_cast<size_type>(x_coordinates_at_beta.size());
-            if(number_of_roots>0) {
-                if(leftmost_bound > x_coordinates_at_beta[0].low()) {
-                    leftmost_bound = x_coordinates_at_beta[0].low();
-                }
-                if(rightmost_bound 
-                   < x_coordinates_at_beta[number_of_roots-1].high()) {
-                    rightmost_bound 
-                        = x_coordinates_at_beta[number_of_roots-1].high();
-                }
-            }     
-        }
-        
-        // Just to be sure...
-        leftmost_bound = leftmost_bound - 1;
-        rightmost_bound = rightmost_bound + 1;
-
-        Polynomial_1 curve_at_left_end 
-	= kernel()->evaluate_utcf_2_object()
-	  (typename Polynomial_traits_2::Swap() (this->polynomial_2(),0,1),
-	   leftmost_bound);
-        std::vector<Algebraic_real_1> roots_at_left_end;
-        solve_1(curve_at_left_end,std::back_inserter(roots_at_left_end),false);
-        size_type number_of_roots_at_left_end 
-            = static_cast<size_type>(roots_at_left_end.size());
-        std::vector<Asymptote_y> asym_left_info;
-        size_type current_stripe=0,i=0;
-        while(i<number_of_roots_at_left_end) {
-            if(current_stripe==static_cast<size_type>(stripe_bounds.size())) {
-                asym_left_info.push_back( CGAL::make_object
-                                              (CGAL::ARR_TOP_BOUNDARY) );
-                i++;
-                continue;
-            }
-            if(roots_at_left_end[i].low() > stripe_bounds[current_stripe]) {
-                current_stripe++;
-                continue;
-            }        
-            if(roots_at_left_end[i].high() < stripe_bounds[current_stripe]) {
-                if(current_stripe==0) {
-                    asym_left_info.push_back(CGAL::make_object
-                                                 (CGAL::ARR_BOTTOM_BOUNDARY));
-                    i++;
-                    continue;
-                } else {
-                    asym_left_info.push_back(CGAL::make_object
-                                 (roots_of_lcoeff[current_stripe-1]));
-                    i++;
-                    continue;
-                }
-            }
-            roots_at_left_end[i].refine();
-        }
-        this->ptr()->horizontal_asymptotes_left = asym_left_info;
-         
-        Polynomial_1 curve_at_right_end 
-	= kernel()->evaluate_utcf_2_object()
-  	    (typename Polynomial_traits_2::Swap() (this->polynomial_2(),0,1),
-             rightmost_bound);
-        std::vector<Algebraic_real_1> roots_at_right_end;
-        solve_1(curve_at_right_end,std::back_inserter(roots_at_right_end),false);
-        size_type number_of_roots_at_right_end 
-            = static_cast<size_type>(roots_at_right_end.size());
-        std::vector<Asymptote_y> asym_right_info;
-        current_stripe=0;
-        i=0;
-        while(i<number_of_roots_at_right_end) {
-            if(current_stripe==static_cast<size_type>(stripe_bounds.size())) {
-                asym_right_info.push_back(CGAL::make_object
-                                              (CGAL::ARR_TOP_BOUNDARY) );
-                i++;
-                continue;
-            }
-            if(roots_at_right_end[i].low() > stripe_bounds[current_stripe]) {
-                current_stripe++;
-                continue;
-            }        
-            if(roots_at_right_end[i].high() < stripe_bounds[current_stripe]) {
-                if(current_stripe==0) {
-                    asym_right_info.push_back(CGAL::make_object
-                                                  (CGAL::ARR_BOTTOM_BOUNDARY));
-                    i++;
-                    continue;
-                } else {
-                    asym_right_info.push_back
-                        (CGAL::make_object(roots_of_lcoeff[current_stripe-1]));
-                    i++;
-                    continue;
-                }
-            }
-            roots_at_right_end[i].refine();
-        }
-        this->ptr()->horizontal_asymptotes_right = asym_right_info;
- 
-    }
-
-    //! @}
-
-public:
-
-    template<typename OutputIterator> void get_roots_at_rational
-    (Bound r, OutputIterator it) const {
-        
-        typename Rep::Intermediate_cache::Find_result find_result
-            = this->ptr()->intermediate_cache.find(r);
-
-	std::vector<Algebraic_real_1> p_roots;
-
-        if(find_result.second) {
-            p_roots = find_result.first->second;
-        } else {
-	    Polynomial_2 swapped = typename Polynomial_traits_2::Swap() 
-                              	    (this->polynomial_2(), 0, 1);
-	    Polynomial_1 p = kernel()->evaluate_utcf_2_object()(swapped,r);
-	    kernel()->solve_1_object()(p,std::back_inserter(p_roots),false);
-
-            this->ptr()->intermediate_cache.insert(std::make_pair(r,p_roots));
-            
-        }
-        std::copy(p_roots.begin(),p_roots.end(),it);
-    }
-
-
-    // \name Internal functions for Conic optimization
-    //! @{
-
-#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
-
-private:
-    
-    bool conic_is_y_regular() const {
-        CGAL_error_msg("Implement me");
-        return false;
-    }
-
-    bool conic_has_vertical_component() const {
-        CGAL_error_msg("Implement me");
-        return false;
-    }
-
-    size_type conic_number_of_status_lines_with_event() const {
-        CGAL_error_msg("Implement me");
-        return 0;
-    }
-
-    void conic_x_to_index(Algebraic_real_1 x,size_type& i,bool& is_event) const
-    {
-        CGAL_error_msg("Implement me");
-    }
-
-    Status_line_1& conic_status_line_at_event(size_type i) const {
-        CGAL_error_msg("Implement me");
-        // Just a random status line to make compiler happy
-        return this->ptr()->vert_line_at_rational_map[Bound(0)];
-    }
-
-    Status_line_1& conic_status_line_at_exact_x(Bound b) const {
-        CGAL_error_msg("Implement me");
-        return this->ptr()->vert_line_at_rational_map[Bound(0)];
-    }
-
-    Status_line_1& conic_status_line_at_exact_x(Algebraic_real_1 alpha) const {
-        CGAL_error_msg("Implement me");
-        return this->ptr()->vert_line_at_rational_map[Bound(0)];
-    }
-
-    Status_line_1 conic_status_line_of_interval(size_type i) const {
-        CGAL_error_msg("Implement me");
-        return this->ptr()->vert_line_at_rational_map[Bound(0)];
-    }
-
-    Status_line_1 conic_status_line_for_x
-        (Algebraic_real_1 x,
-         CGAL::Sign perturb = CGAL::ZERO) const {
-        CGAL_error_msg("Implement me");
-        return this->ptr()->vert_line_at_rational_map[Bound(0)];
-    }
-
-    size_type conic_arcs_over_interval(size_type i) const {
-        CGAL_error_msg("Implement me");
-        return -1;
-    }
-
-    Bound conic_bound_value_in_interval(size_type i) const {
-        CGAL_error_msg("Implement me");
-        return Bound(0);
-    }
-
-    Polynomial_1 conic_content() const {
-        CGAL_error_msg("Implement me");
-        return Polynomial_1();
-    }
-
-    Polynomial_2 conic_primitive_polynomial_2() const {
-        CGAL_error_msg("Implement me");
-        return Polynomial_2();
-    }
-
-    Self& conic_shear_primitive_part(Integer s) const {
-        CGAL_error_msg("Implement me");
-        return Self();
-    }
-
-    void conic_refine_all(Bound precision) {
-        CGAL_error_msg("Implement me");
-    }
-
-    Asymptote_y conic_asymptotic_value_of_arc(CGAL::Arr_parameter_space loc,
-                                              size_type arcno) const {
-        CGAL_error_msg("Implement me");
-        return Asymptote_y();
-    }
-
-#endif
-
-
-    //! @}
-
-    //! \name friends
-    //! @{
-
-    // friend function for id-based hashing
-    friend std::size_t hash_value(const Self& x) {
-        return static_cast<std::size_t>(x.id());
-    }
-
-    // another friend
-    friend class Shear_transformation<Algebraic_kernel_with_analysis_2>;
-    
-    //! @}
-
-}; // class Algebraic_curve_2_2
-
-
-//! \brief Prints the objects.
-template<typename AlgebraicKernelWithAnalysis_2, 
-         typename Rep_>
-std::ostream& operator<< (
-        std::ostream& out, 
-        const Curve_analysis_2< AlgebraicKernelWithAnalysis_2, 
-        Rep_ >& curve) {
-
-  typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
-  
-  typedef Rep_ Rep;
-  
-  typedef Curve_analysis_2< Algebraic_kernel_with_analysis_2, Rep > Curve;
-  
-  typedef typename Curve::size_type size_type;
-  typedef typename Curve::Asymptote_y Asymptote_y;
-  
-    
-    switch (::CGAL::get_mode(out)) {
-    case ::CGAL::IO::PRETTY: {
-      
-      out << "--------------- Analysis results ---------------" << std::endl;
-      out << "Number of constructed event lines: " 
-          << curve.number_of_status_lines_with_event() 
-          << std::endl;
-      out << "(Horizontal) asymptotes at -infty: " << std::flush;
-      for (size_type i = 0; i < curve.arcs_over_interval(0); i++) {
-        
-        const Asymptote_y& curr_asym_info_obj 
-          = curve.asymptotic_value_of_arc(CGAL::ARR_LEFT_BOUNDARY,i);
-        typename Curve::Algebraic_real_1 curr_asym_info;
-        bool is_finite = CGAL::assign(curr_asym_info,curr_asym_info_obj);
-        if (!is_finite) {
-          // Assignment to prevent compiler warning
-          CGAL::Arr_parameter_space loc = CGAL::ARR_LEFT_BOUNDARY;
-          CGAL_assertion_code(bool is_valid = )
-            CGAL::assign(loc, curr_asym_info_obj);
-          CGAL_assertion(is_valid);
-          if (loc == CGAL::ARR_TOP_BOUNDARY) {
-            out << "+infty " << std::flush;
-          } else {
-            CGAL_assertion(loc == CGAL::ARR_BOTTOM_BOUNDARY);
-            out << "-infty " << std::flush;
-          }
-        } else { // is_finite
-          out << CGAL::to_double(curr_asym_info) 
-              << " " << std::flush;
-        }
-      }
-      
-      out << std::endl;
-      
-      out << "Intermediate line at " 
-          << CGAL::to_double(curve.bound_value_in_interval(0))
-          << ": " << curve.arcs_over_interval(0) << " passing arcs" 
-          << std::endl 
-          << std::endl;
-      for (size_type i = 0; i < curve.number_of_status_lines_with_event(); 
-           i++) {
-        out << curve.status_line_at_event(i) << std::endl;
-        out << "Intermediate line at " 
-            << CGAL::to_double(curve.bound_value_in_interval(i+1))
-            << ": " << curve.arcs_over_interval(i+1) 
-            << " passing arcs" << std::endl
-            << std::endl;
-      }
-      out << "(Horizontal) asymptotes at +infty: " << std::flush;
-      size_type no_events = curve.number_of_status_lines_with_event();
-      for (size_type i = 0; i < curve.arcs_over_interval(no_events); i++) {
-        
-        const Asymptote_y& curr_asym_info_obj 
-          = curve.asymptotic_value_of_arc(CGAL::ARR_RIGHT_BOUNDARY,i);
-        typename Curve::Algebraic_real_1 curr_asym_info;
-        bool is_finite = CGAL::assign(curr_asym_info,curr_asym_info_obj);
-        if(! is_finite) {
-          // Assignment to prevent compiler warning
-          CGAL::Arr_parameter_space loc = CGAL::ARR_LEFT_BOUNDARY;
-          CGAL_assertion_code(bool is_valid = )
-            CGAL::assign(loc, curr_asym_info_obj);
-          CGAL_assertion(is_valid);
-          if(loc == CGAL::ARR_TOP_BOUNDARY) {
-            out << "+infty " << std::flush;
-          } else {
-            CGAL_assertion(loc == CGAL::ARR_BOTTOM_BOUNDARY);
-            out << "-infty " << std::flush;
-          }
-        } else { // is_finite
-          out << CGAL::to_double(curr_asym_info) 
-              << " " << std::flush;
-        }
-      }
-      
-      out << std::endl;
-      
-      out << "------------------------------------------------" << std::endl;
-      break;
-    }
-    case ::CGAL::IO::BINARY:
-      std::cerr << "BINARY format not yet implemented" << std::endl;
-      break;
-    default:
-      // ASCII
-      out << curve.polynomial_2();
-    }
-    
-    return out;
-}
-
-//! \brief Reads the objects from stream
-template<typename AlgebraicKernelWithAnalysis_2, 
-         typename Rep_>
-std::istream& operator>> (
-    std::istream& is, 
-    Curve_analysis_2< AlgebraicKernelWithAnalysis_2, Rep_ >& curve) {
-  
-  CGAL_precondition(CGAL::is_ascii(is));
-  
-  typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
-
-  typedef Rep_ Rep;
-  
-  typename Curve_analysis_2< Algebraic_kernel_with_analysis_2, Rep >::
-    Polynomial_2 f;
-
-  is >> f;
-
-  // TODO is get_static_instance the right way?
-  curve = Algebraic_kernel_with_analysis_2::get_static_instance().
-    construct_curve_2_object()(f);
-  
-  return is;
-}
-  
-
-} //namespace CGAL
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-
-#endif // ALGEBRAIC_CURVE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
deleted file mode 100644
index e586503..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
+++ /dev/null
@@ -1,786 +0,0 @@
-// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
-//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-//
-// ============================================================================
-
-#ifndef CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
-#define CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
-
-#include <CGAL/basic.h>
-#include <boost/pool/pool_alloc.hpp>
-#include <boost/numeric/interval.hpp>
-
-#include <CGAL/Bbox_2.h>
-
-#include <CGAL/Arithmetic_kernel.h>
-
-namespace CGAL {
-
-namespace internal {
-
-template < class AlgebraicCurveKernel_2, class Rep_, 
-      class HandlePolicy_ ,
-      class Allocator_>
-        //::boost::fast_pool_allocator<Rep_> >
-class Xy_coordinate_2;
-
-
-template < class AlgebraicCurveKernel_2 >
-class Xy_coordinate_2_rep {
-
-public:
-    // this first template argument
-    typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
-
-    // myself
-    typedef Xy_coordinate_2_rep<Algebraic_curve_kernel_2> Self;
-
-    typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
-        Curve_analysis_2;
-
-    typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
-        Algebraic_real_1;
-
-    typedef CGAL::Bbox_2 Bbox_2;
-
-    typedef CGAL::Handle_with_policy<Self>
-        Xy_coordinate_2_inst;
-
-    // constructors
-public:
-    // default constructor ()
-    Xy_coordinate_2_rep() : _m_arcno(-1) {
-    }
-    
-    // standard constructor
-    Xy_coordinate_2_rep(const Algebraic_real_1& x,
-                        const Curve_analysis_2& curve, int arcno) 
-      : _m_kernel(curve.kernel()),_m_x(x), _m_curve(curve), _m_arcno(arcno) {
-    }
-
-    // data
-
-    const Algebraic_curve_kernel_2* _m_kernel;
-
-    // x-coordinate
-    Algebraic_real_1 _m_x;
-    
-    // supporting curve
-    mutable Curve_analysis_2 _m_curve;
-    
-    // arc number on curve
-    mutable int _m_arcno;
-
-    // y-coordinate
-    mutable boost::optional< Algebraic_real_1 > _m_y;
-
-    //! A bounding box for the given point
-    mutable boost::optional< std::pair<double,Bbox_2> > _m_bbox_2_pair;
-
-};
-
-//! \brief class \c Xy_coordinate_2 represents a single root of a system of 
-//! two polynomial equations in two variables that are models 
-//! \c AlgebraicCurveKernel_2::Polynomial_2
-//!
-//! \c Xy_coordinate_2 coordinate is represented by an \c Algebraic_real_1,
-//! a supporting curve and an arcno and is valid only for finite solutions,
-//! i.e., it cannot represent points at infinity 
-template <class AlgebraicCurveKernel_2, 
-          class Rep_ = internal::Xy_coordinate_2_rep<AlgebraicCurveKernel_2>,
-          class HandlePolicy_= CGAL::Handle_policy_union, 
-          class Allocator_ = CGAL_ALLOCATOR(Rep_) >
-class Xy_coordinate_2 : 
-    public ::CGAL::Handle_with_policy<Rep_, HandlePolicy_, Allocator_> 
-{
-public:
-    //! \name public typedefs
-    //!@{
-    
-    //! this instance's first template parameter
-    typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
-    
-    //! this instance's second template parameter
-    typedef Rep_ Rep;
-    
-    //! this instance's third template parameter
-    typedef HandlePolicy_ Handle_policy;
-    
-    //! this instance's fourth template parameter
-    typedef Allocator_ Allocator;
-
-    //! this instance itself
-    typedef Xy_coordinate_2<Algebraic_curve_kernel_2, Rep, Handle_policy,
-        Allocator> Self;
-        
-    //! an instance of AlgebraicKernel_1
-    typedef typename Algebraic_curve_kernel_2::Algebraic_kernel_d_1 
-        Algebraic_kernel_d_1;
-    
-    typedef typename Algebraic_curve_kernel_2::Polynomial_1 Polynomial_1;
-    typedef CGAL::Polynomial_traits_d<Polynomial_1> Polynomial_traits_1;
-
-    typedef typename Algebraic_curve_kernel_2::Polynomial_2 Polynomial_2;
-    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
-
-    //! type of (explicit) x- and y-coordinates
-    typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
-        Algebraic_real_1;
-
-    //! Coefficient type
-    typedef typename Algebraic_curve_kernel_2::Coefficient Coefficient;
-
-    //! type of curve pair analysis
-    typedef typename Algebraic_curve_kernel_2::Curve_pair_analysis_2
-                Curve_pair_analysis_2;
-    
-    //! type of curve analysis
-    typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
-                Curve_analysis_2;
-    
-    //! the handle superclass
-    typedef ::CGAL::Handle_with_policy<Rep, Handle_policy, Allocator> Base;
-
-    //! type for approximation boundaries
-    typedef typename Algebraic_curve_kernel_2::Bound Bound;
-
-    //! type for bound intervals
-    typedef boost::numeric::interval<Bound> Bound_interval;
-
-    //! Type for the bounding box
-    typedef typename Rep::Bbox_2 Bbox_2;
-    
-    //!@}
-private:
-    //! \name private methods
-    //!@{
-
-    /*!\brief
-     * Simplifies the representation of two points whose supporting curves
-     * share a common part.
-     */
-    bool _simplify(const Xy_coordinate_2& p, const Xy_coordinate_2& q) const
-    {
-        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
-
-        if(kernel()->decompose_2_object()(p.curve(), q.curve(), 
-            std::back_inserter(parts_of_f), std::back_inserter(parts_of_g),
-                std::back_inserter(common))) {
-
-            CGAL_assertion((parts_of_f.size() == 1 ||
-                       parts_of_g.size() == 1) && common.size() == 1);
-            if(parts_of_f.size() == 1) {
-                p.simplify_by(kernel()->construct_curve_pair_2_object()(
-                    parts_of_f[0], common[0]));
-            } 
-            
-            if(parts_of_g.size() == 1) {
-                q.simplify_by(kernel()->construct_curve_pair_2_object()(
-                    parts_of_g[0], common[0]));
-            } 
-            return true;
-        }
-        return false;
-    }
-    
-    //!@}
-public:
-    //!\name Constructors
-    //!@{
-
-    /*!\brief 
-     * default constructor
-     *
-     * A default-constructed point supports no operation other than
-     * having \c CGAL::degree(curve()) return \c -1. 
-     */
-    Xy_coordinate_2() : 
-        Base(Rep()) { 
-    }
-
-    /*!\brief
-     * copy constructor
-     */
-    Xy_coordinate_2(const Self& p) : 
-        Base(static_cast<const Base&>(p)) {  
-    }
-
-    /*!\brief
-     * Point at \c x, on \c curve with \c arcno. Finite points on vertical arcs
-     * are also constructed in this way
-     */
-    Xy_coordinate_2(const Algebraic_real_1& x, const Curve_analysis_2& curve,
-                    int arcno) :
-          Base(Rep(x, curve, arcno)) {
-            
-        CGAL_precondition(arcno >= 0);
-        CGAL_precondition_code(
-            typename Curve_analysis_2::Status_line_1 v =
-                curve.status_line_for_x(x);
-        );
-        CGAL_precondition(arcno >= 0 && arcno < v.number_of_events());
-    }
-    
-    /*!\brief
-     * constructs a point from a given represenation
-     */
-    Xy_coordinate_2(Rep rep) : 
-        Base(rep) {  
-    }
-   
-    //!@}
-public:
-    //!\name Access functions
-    //!@{
-    
-    /*!\brief 
-     * x-coordinate of the point
-     */
-    const Algebraic_real_1& x() const { 
-        return this->ptr()->_m_x; 
-    }
-
-    /*!
-     * \brief y-coordinate of this point
-     *
-     * Note: In general, this method results in a extremly large polynomial
-     * for the y-coordinate. It is recommended to use it carefully,
-     * and using get_approximation_y() instead whenever approximations suffice.
-     */
-    Algebraic_real_1 y() const {
-
-        typedef std::vector< Algebraic_real_1 > Roots;
-        // EBEB 2012-07-05 deactivated map for y-roots for not being used
-        // typedef typename Curve_analysis_2::Status_line_1 Key;
-        // EBEB 2012-07-05 deactivated map for y-roots for not being used
-        // typedef Roots Data;
-        // EBEB 2012-07-05 deactivated map for y-roots for not being used
-        //        typedef std::map< Key, Data, CGAL::Handle_id_less_than< Key > > 
-        //    Y_root_map;
-        
-        // EBEB 2012-07-05 deactivated map for y-roots for not being used
-        //static Y_root_map y_root_map;
-
-        if (!this->ptr()->_m_y) {
-            
-            Polynomial_2 f = curve().primitive_polynomial_2();
-            // This will be the defining polynomial of y
-            Polynomial_1 y_pol;
-
-            // Filter: If we know that the point is critical, we can use
-            // the resultant of f and f_y with respect to x as polynomial
-            bool point_is_certainly_critical = false;
-            typename Curve_analysis_2::Status_line_1 line =
-                curve().status_line_at_exact_x(x());
-            
-            // EBEB 2012-07-05 deactivated map for y-roots for not being used
-            //typename Y_root_map::iterator yit = 
-            //    y_root_map.find(line);
-
-            // TODO: Cache resultant computation
-            // exacus-related code shouldn't be used here
-            //curve().x_to_index(x(),i,is_event);
-            if (line.is_event()) {
-                //typename Internal_curve_2::Event1_info ev_info =
-                //   curve().event_info(i);
-                typename Curve_analysis_2::Status_line_1::Arc_pair ipair =
-                    line.number_of_incident_branches(arcno());
-                
-                if (ipair.first != 1 || ipair.second != 1) {
-                    point_is_certainly_critical = true;
-                    y_pol = CGAL::make_square_free(
-                              CGAL::resultant
-                                (typename Polynomial_traits_2::Swap() (f,0,1),
-                                 typename Polynomial_traits_2::Swap() 
-                                   (CGAL::differentiate(f),0,1))
-                        );
-                    // BUGFIX: y_pol might be zero:
-                    if(y_pol.is_zero()) {
-                        // force re-computation with bigger resultant
-                        point_is_certainly_critical=false;
-                    }                             
-                    
-                }
-            }
-            
-            if (!point_is_certainly_critical) {
-                
-                Polynomial_2 r(x().polynomial());
-                y_pol = CGAL::make_square_free(
-			  CGAL::resultant
-                            (typename Polynomial_traits_2::Swap() (f,0,1),
-                             typename Polynomial_traits_2::Swap() (r,0,1))
-                );
-                
-            }
-            typename Algebraic_kernel_d_1::Solve_1 real_roots;
-            
-            Roots y_roots;
-            real_roots(y_pol, std::back_inserter(y_roots), false ); 
-            
-            long prec = 16;
-	    
-	    typename Algebraic_curve_kernel_2::Approximate_absolute_y_2
-	      approx_y=kernel()->approximate_absolute_y_2_object();
-	    
-	    std::pair<Bound,Bound> y_pair = approx_y(*this,prec);
-	    
-	    Bound_interval y_iv(y_pair.first,y_pair.second);
-            
-            typedef typename std::vector<Algebraic_real_1>::const_iterator
-                Iterator;
-            
-            std::list< Iterator > candidates;
-            
-            for (Iterator it = y_roots.begin(); it != y_roots.end(); it++) {
-                Bound_interval it_interval(it->low(), it->high());
-                if (boost::numeric::overlap(it_interval, y_iv)) {
-                    candidates.push_back(it);
-                }
-            }
-            CGAL_assertion(!candidates.empty());
-
-            while (candidates.size() > 1) {
-	        prec*=2;
-	        y_pair = approx_y(*this,prec);
-	    
-                y_iv = Bound_interval(y_pair.first,y_pair.second);
-
-                for (typename std::list< Iterator >::iterator dit, cit =
-                         candidates.begin(); cit != candidates.end(); ) {
-                    bool remove = false;
-                    Bound_interval 
-                        cit_interval((*cit)->low(), (*cit)->high());
-                    if (!boost::numeric::overlap(cit_interval, y_iv)) {
-                        dit = cit;
-                        remove = true;
-                    }
-                    cit++;
-                    if (remove) {
-                        candidates.erase(dit);
-                    }
-                }
-            }
-            CGAL_assertion(static_cast< int >(candidates.size()) == 1);
-            this->ptr()->_m_y = 
-                Algebraic_real_1(
-                        (*candidates.begin())->polynomial(), 
-                        (*candidates.begin())->low(), 
-                        (*candidates.begin())->high()
-                );
-        }
-        CGAL_postcondition(bool(this->ptr()->_m_y));
-        return *this->ptr()->_m_y;
-    }
-    
-    /*!\brief
-     * supporting curve of the point
-     */
-    Curve_analysis_2 curve() const {
-        return this->ptr()->_m_curve; 
-    }
-    
-    /*!\brief
-     * arc number of point
-     *
-     */
-    int arcno() const { 
-        return this->ptr()->_m_arcno; 
-    }
-
-    //!@}
-public:
-    //!\name comparison predicates
-    //!@{
-
-    /*!\brief
-     * compares x-coordinates of \c *this with \c q
-     * 
-     * do we need this method or one should use Algebraic_curve_kernel_2
-     * directly ?
-     */
-    CGAL::Comparison_result compare_x(const Self& q) const {
-    
-        if(this->is_identical(q)) {
-            return CGAL::EQUAL;
-        }
-        return kernel()->compare_1_object()(this->x(), q.x());
-    }
-
-    /*!\brief
-     * compares \c *this with \c q lexicographically
-     */
-    CGAL::Comparison_result compare_xy(const Self& q, 
-        bool equal_x = false) const {
-        
-        if(this->is_identical(q)) 
-            return CGAL::EQUAL;
-
-        CGAL::Comparison_result res = (equal_x ? CGAL::EQUAL : compare_x(q)); 
-        if(res == CGAL::EQUAL) {
-            res = _compare_y_at_x(q);
-        }
-        return res;
-    }
-    
-    //! equality
-    bool operator == (const Self& q) const {return q.compare_xy(*this)== 0;}
-    
-    //! inequality
-    bool operator != (const Self& q) const {return q.compare_xy(*this)!= 0;}
-
-    //! less than in (x,y) lexicographic order
-    bool operator <  (const Self& q) const {return q.compare_xy(*this)> 0;}
-
-    //! less-equal in (x,y) lexicographic order
-    bool operator <= (const Self& q) const {return q.compare_xy(*this)>= 0;}
-
-    //! greater than in (x,y) lexicographic order
-    bool operator >  (const Self& q) const {return q.compare_xy(*this)< 0;}
-
-    //! greater-equal in (x,y) lexicographic order
-    bool operator >= (const Self& q) const {return q.compare_xy(*this)<= 0;}
-    
-    //!@}
-
-    //!@{
-    //! \name 
-
-    const Algebraic_curve_kernel_2* kernel() const {
-        return this->ptr()->_m_kernel;
-    }
-
-private:
-
-    /*!\brief
-     * compares y-coordinates for covertical points \c *this and \c q
-     *
-     * \pre x() == q.x()
-     */
-    CGAL::Comparison_result _compare_y_at_x(const Self& q) const 
-    {
-        CGAL_precondition(this->compare_x(q) == CGAL::EQUAL);
-    
-        Curve_analysis_2 f = curve(), g = q.curve();
-        if(f.is_identical(g)) 
-            return CGAL::sign(arcno() - q.arcno());
-        if(Self::_simplify(*this, q)) 
-            // restart since supporting curves might be equal now
-            return _compare_y_at_x(q);
-                        
-        Curve_pair_analysis_2 cpa_2 =
-            kernel()->construct_curve_pair_2_object()(f, g);
-            
-            
-        typename Curve_pair_analysis_2::Status_line_1 vline =
-            cpa_2.status_line_for_x(x());
-        return CGAL::sign(vline.event_of_curve(arcno(), f) -
-                    vline.event_of_curve(q.arcno(), g));
-    }
-    
-    //!@}
-public:
-    //!\name Reconstructing functions
-    //!@{
-    
-    /*!\brief
-     * Simplifies the representation of a point.
-     * 
-     * Given a decomposition of the point's supporting \c curve() into 
-     * a pair of two curves \c pair, this function searches this point
-     * in the curve pair and resets the curve and the arcno to this
-     * found arc. It can happen, that both curves of the pair fit this 
-     * condition (intersection of the two curves at this point), then it
-     * chooses the simpler one (less total degree).
-     *
-     * \pre pair must be a decomposition of curve()
-     */
-    void simplify_by(const Curve_pair_analysis_2& cpa_2) const {
-    
-        CGAL_precondition_code(
-            Polynomial_2 mult =
-                    cpa_2.curve_analysis(0).polynomial_2() *
-                    cpa_2.curve_analysis(1).polynomial_2();
-        );
-        // common parts
-        CGAL_precondition(CGAL::resultant(mult, 
-                                          curve().polynomial_2()).is_zero());
-        // full parts
-        CGAL_precondition(CGAL::degree(mult) == 
-                          CGAL::degree(curve().polynomial_2()));
-        CGAL_precondition(CGAL::total_degree(mult) ==
-                          CGAL::total_degree(curve().polynomial_2()));
-
-        typename Curve_pair_analysis_2::Status_line_1 cpv_line =
-                cpa_2.status_line_for_x(x());
-        // # of arcs must match
-        CGAL_precondition_code(
-            typename Curve_analysis_2::Status_line_1 cv_line =
-                curve().status_line_for_x(x());
-        );
-        CGAL_precondition(cpv_line.number_of_events() == 
-            cv_line.number_of_events());
-
-        bool cid = false;
-        std::pair<int, int> p = cpv_line.curves_at_event(arcno());
-        if(p.first != -1 && p.second != -1) {
-            // both curves involved: choose simpler one
-            // Remark: In this case, a vertical line in the curves can be
-            // ignored, since it has not been considered when constructing
-            // the point from the composed curved (also including this vertical
-            // line). Therefore, the old arc number is also valid in the curve
-            // pair.
-            Polynomial_2 ff = cpa_2.curve_analysis(0).polynomial_2(),
-	                 gg = cpa_2.curve_analysis(1).polynomial_2();
-            if(total_degree(ff) > total_degree(gg)) 
-                cid = true;
-        } else 
-          cid = (p.first == -1);
-        // overwrite data
-        this->ptr()->_m_curve = cpa_2.curve_analysis(cid);
-        this->ptr()->_m_arcno = (cid == 0 ? p.first : p.second);
-    }
-    
-    //! befriending output iterator
-   // friend std::ostream& operator << <>(std::ostream& os, const Self& pt);
-
-    //!@}
-public:
-    
-    //! Returns whether the x-coordinate equals zero
-    bool is_x_zero() const {
-      return CGAL::is_zero(this->ptr()->_m_x);
-    }
-
-    //! Returns whether the y-coordinate equals zero
-    bool is_y_zero() const {
-      CGAL::Sign lower_sign = CGAL::sign(this->lower_bound_y()),
-                 upper_sign = CGAL::sign(this->upper_bound_y());
-      if( lower_sign == CGAL::ZERO ||upper_sign == CGAL::ZERO) {
-	if(lower_sign==upper_sign) { //both zero
-	  return true;
-	} else { // one zero, one not...isol interval is OPEN
-	  return false;
-	}
-      } else if( lower_sign==upper_sign) { // zero not in isol interval
-	return false;
-      } else { // zero in interval, need to check
-	Polynomial_1 constant_pol =
- 	  CGAL::get_coefficient(curve().primitive_polynomial_2(),0);
-	bool zero_is_root_of_local_pol 
-  	  = kernel()->is_zero_at_1_object()(constant_pol,this->ptr()->_m_x);
-        // Since we know that y_iv is an _isolating_ interval,
-        // we can immediately return
-        return zero_is_root_of_local_pol;
-      }
-    }
-
-    // returns a double approximation of the point
-    std::pair<double, double> to_double() const {
-
-      typedef typename CGAL::Get_arithmetic_kernel<Bound>::Arithmetic_kernel 
-        AT;
-        typedef typename AT::Bigfloat_interval BFI; 
-
-        long old_prec = get_precision(BFI());
-        
-        set_precision (BFI(), 53);
-
-	// rely on double conversion of the x-type
-        double double_x = CGAL::to_double(this->ptr()->_m_x);
-        double double_y;
-
-
-        if (this->lower_bound_y()==this->upper_bound_y()) {
-            double_y = CGAL::to_double(convert_to_bfi(this->lower_bound_y()));
-        } else if(is_y_zero()) {
-            double_y = 0.;
-        } else {
-            while(CGAL::sign(this->lower_bound_y()) != 
-                  CGAL::sign(this->upper_bound_y()) ) {
-                this->refine_y();
-            }
-            long final_prec = set_precision(BFI(),get_precision(BFI())+4);
-            
-            BFI bfi = CGAL::hull(convert_to_bfi(this->lower_bound_y()), 
-				 convert_to_bfi(this->upper_bound_y()));
-            
-            while( !singleton(bfi) &&  
-                   get_significant_bits(bfi) < final_prec  ){
-                this->refine_y();
-                bfi = CGAL::hull(
-                        convert_to_bfi(this->lower_bound_y()), 
-                        convert_to_bfi(this->upper_bound_y()));
-            }
-            double_y 
-                = CGAL::to_double((CGAL::lower(bfi)+ CGAL::upper(bfi)) / 2);
-        }
-        set_precision(BFI(),old_prec);
-        return std::make_pair(double_x, double_y); 
-    }
-
-    public:
-
-    
-    void refine_y() const {
-        this->curve().status_line_at_exact_x(this->x()).refine(this->arcno());
-    }
-
-    Bound lower_bound_y() const {
-      return this->curve().status_line_at_exact_x(this->x()).
-          lower_bound(this->arcno());
-    }
-
-    Bound upper_bound_y() const {
-      return this->curve().status_line_at_exact_x(this->x()).
-          upper_bound(this->arcno());
-    }
-
-#if CGAL_AK_ENABLE_DEPRECATED_INTERFACE
-
-    void refine_x() const {
-      this->x().refine();
-    }
-
-    Bound lower_bound_x() const {
-      return this->x().low();
-    }
-
-    Bound upper_bound_x() const {
-      return this->x().high();
-    }
-
-#endif
-
-
-     // friend function to provide a fast hashing
-    friend std::size_t hash_value(const Self& x) {
-        return static_cast<std::size_t>(x.id());
-    }
-
-    //!@}
-
-}; // class Xy_coordinate_2
-
-template < class AlgebraicCurveKernel_2, class Rep> 
-std::ostream& operator<< (std::ostream& os, 
-    const Xy_coordinate_2<AlgebraicCurveKernel_2, Rep>& pt)
-{
-  switch (::CGAL::get_mode(os)) {
-  case ::CGAL::IO::PRETTY: {
-    os << "[x-coord: " << CGAL::to_double(pt.x()) << "; curve: " <<
-      pt.curve().polynomial_2() << 
-      "; arcno: " << pt.arcno() << "]\n";
-    break;
-  } 
-  case ::CGAL::IO::BINARY:
-    std::cerr << "BINARY format not yet implemented" << std::endl;
-    break;
-  default:
-    // ASCII
-    os << "Algebraic_real_xca_2(";
-    os << pt.x();
-    os << ",";
-    os << pt.curve();
-    os << ",";
-    os << pt.arcno();
-    os << ")";
-  }
-  return os;    
-}
-
-template < class AlgebraicCurveKernel_2, class Rep_ > 
-std::istream& operator >> (
-    std::istream& is,
-    Xy_coordinate_2< AlgebraicCurveKernel_2, Rep_>& pt) {
-
-  CGAL_precondition(CGAL::is_ascii(is));
-  
-  // this instance's first template argument
-  typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
-  
-  // this instance's second template argument
-  typedef Rep_ Rep;
-
-  // myself
-  typedef Xy_coordinate_2< Algebraic_curve_kernel_2, Rep > Xy_coordinate_2;
-  
-  typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
-    Algebraic_real_1;
-
-  typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
-    Curve_analysis_2;
-  
-  // x-coordinate
-  Algebraic_real_1 x;
-    
-  // supporting curve
-  Curve_analysis_2 curve;
-    
-  // arc number on curve
-  int arcno;
-  
-  // read "Algebraic_real_xca_2("
-  swallow(is, 'A');
-  swallow(is, 'l');
-  swallow(is, 'g');
-  swallow(is, 'e');
-  swallow(is, 'b');
-  swallow(is, 'r');
-  swallow(is, 'a');
-  swallow(is, 'i');
-  swallow(is, 'c');
-  swallow(is, '_');
-  swallow(is, 'r');
-  swallow(is, 'e');
-  swallow(is, 'a');
-  swallow(is, 'l');
-  swallow(is, '_');
-  swallow(is, 'x');
-  swallow(is, 'c');
-  swallow(is, 'a');
-  swallow(is, '_');
-  swallow(is, '2');
-  swallow(is, '(');
-  
-  
-  // read values
-  is >> x;
-  swallow(is, ',');
-  
-  is >> curve;
-  swallow(is, ',');
-  
-  is >> arcno;
-  
-  // read the ")
-  swallow(is, ')'); 
-  
-  pt = Xy_coordinate_2(x, curve, arcno);
-  
-  return is;
-}
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2.h b/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2.h
deleted file mode 100644
index 43f83d5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2.h
+++ /dev/null
@@ -1,1345 +0,0 @@
-// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-#ifndef CGAL_APOLLONIUS_GRAPH_2_H
-#define CGAL_APOLLONIUS_GRAPH_2_H
-
-#define CGAL_APOLLONIUS_GRAPH_PSEUDO_CIRCLE_DESIGN 1
-
-
-#include <iostream>
-#include <vector>
-#include <map>
-
-#include <boost/tuple/tuple.hpp>
-
-#include <CGAL/Apollonius_graph_2/basic.h>
-
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Triangulation_data_structure_2.h>
-#include <CGAL/Triangulation_face_base_2.h>
-#include <CGAL/Apollonius_graph_vertex_base_2.h>
-
-#include <CGAL/in_place_edge_list.h>
-#include <CGAL/Segment_Delaunay_graph_2/edge_list.h>
-#include <CGAL/Apollonius_graph_2/Traits_wrapper_2.h>
-
-#include <CGAL/Apollonius_graph_2/Constructions_C2.h>
-
-#include <CGAL/iterator.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Nested_iterator.h>
-#include <CGAL/Concatenate_iterator.h>
-
-
-namespace CGAL {
-
-
-namespace internal {
-
-  template<typename Edge, typename LTag> struct AG2_which_list;
-
-  // use the in-place edge list
-  template<typename E>
-  struct AG2_which_list<E,Tag_true>
-  {
-    typedef E                           Edge;
-    typedef In_place_edge_list<Edge>    List;
-  };
-
-  // do not use the in-place edge list
-  template<typename E>
-  struct AG2_which_list<E,Tag_false>
-  {
-    typedef E                                 Edge;
-    // change the following to Tag_false in order to use
-    // CGAL's Unique_hash_map
-    typedef Tag_true                          Use_stl_map_tag;
-    typedef Edge_list<Edge,Use_stl_map_tag>   List;
-  };
-
-  template < class Node >
-  struct Project_site_2 {
-    typedef Node                   argument_type;
-    typedef typename Node::Site_2  Site;
-    typedef Site                   result_type;
-    Site&       operator()( Node& x) const { return x.site(); }
-    const Site& operator()( const Node& x) const { return x.site(); }
-  };
-
-} // namespace internal
-
-
-template<class Gt,class Agds,class LTag>
-class Apollonius_graph_hierarchy_2;
-
-template < class Gt,
-	   class Agds = Triangulation_data_structure_2 < 
-               Apollonius_graph_vertex_base_2<Gt,true>,
-               Triangulation_face_base_2<Gt> >,
-	   class LTag = Tag_false>
-class Apollonius_graph_2
-  : private Triangulation_2
-  <CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_traits_wrapper_2<Gt>,Agds>
-{
-  friend class Apollonius_graph_hierarchy_2<Gt,Agds,LTag>;
-private:
-  // types and access methods needed for visualization
-  //--------------------------------------------------
-
-  // types
-  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_2<Gt>
-  Construct_Apollonius_bisector_2;
-
-  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_ray_2<Gt>
-  Construct_Apollonius_bisector_ray_2;
-
-  typedef
-  CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_segment_2<Gt>
-  Construct_Apollonius_bisector_segment_2;
-
-  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_primal_ray_2<Gt>
-  Construct_Apollonius_primal_ray_2;
-
-  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_primal_segment_2<Gt>
-  Construct_Apollonius_primal_segment_2;
-
-
-  // access
-  Construct_Apollonius_bisector_2
-  construct_Apollonius_bisector_2_object() const {
-    return Construct_Apollonius_bisector_2();
-  }
-
-  Construct_Apollonius_bisector_ray_2
-  construct_Apollonius_bisector_ray_2_object() const {
-    return Construct_Apollonius_bisector_ray_2();
-  }
-
-  Construct_Apollonius_bisector_segment_2
-  construct_Apollonius_bisector_segment_2_object() const { 
-    return Construct_Apollonius_bisector_segment_2(); 
-  }
-
-  Construct_Apollonius_primal_ray_2
-  construct_Apollonius_primal_ray_2_object() const {
-    return Construct_Apollonius_primal_ray_2(); 
-  }
-
-  Construct_Apollonius_primal_segment_2
-  construct_Apollonius_primal_segment_2_object() const { 
-    return Construct_Apollonius_primal_segment_2();
-  }
-
-
-protected:
-  // some local types
-  typedef
-  CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_traits_wrapper_2<Gt>
-  Modified_traits;
-
-  typedef Triangulation_2<Modified_traits,Agds>  DG;
-
-  typedef DG                                 Delaunay_graph;
-
-public:
-  // TYPES
-  //------
-  typedef Agds                                   Data_structure;
-  typedef Agds                                   Triangulation_data_structure;
-  typedef Gt                                     Geom_traits;
-  typedef typename Gt::Point_2                   Point_2;
-  typedef typename Gt::Site_2                    Site_2;
-
-  typedef typename Agds::Edge                    Edge;
-  typedef typename Agds::Vertex_handle           Vertex_handle;
-  typedef typename Agds::Face_handle             Face_handle;
-  typedef typename Agds::Vertex                  Vertex;
-  typedef typename Agds::Face                    Face;
-
-  typedef typename Agds::Vertex_circulator       Vertex_circulator;
-  typedef typename Agds::Edge_circulator         Edge_circulator;
-  typedef typename Agds::Face_circulator         Face_circulator;
-
-  typedef typename Agds::Face_iterator           All_faces_iterator;
-  typedef typename Agds::Vertex_iterator         All_vertices_iterator;
-  typedef typename Agds::Edge_iterator           All_edges_iterator;
-
-  typedef typename DG::Finite_faces_iterator     Finite_faces_iterator;
-  typedef typename DG::Finite_vertices_iterator  Finite_vertices_iterator;
-  typedef typename DG::Finite_edges_iterator     Finite_edges_iterator;
-
-  typedef typename Agds::size_type               size_type;
-
-  // Auxiliary iterators for convenience
-  // do not use default template argument to please VC++
-  typedef internal::Project_site_2<Vertex>                   Proj_site;
-  typedef Iterator_project<Finite_vertices_iterator, 
-                           Proj_site>
-  /*                                           */ Visible_sites_iterator;
-
-  typedef
-  Apollonius_graph_vertex_base_nested_iterator_traits<
-    Finite_vertices_iterator>  Hidden_sites_nested_iterator_traits;
-  
-
-  typedef Nested_iterator<Finite_vertices_iterator,
-			  Hidden_sites_nested_iterator_traits>
-  /*                                            */ Hidden_sites_iterator;
-
-  typedef Concatenate_iterator<Visible_sites_iterator,
-			       Hidden_sites_iterator>     Sites_iterator;
-
-  typedef Site_2               value_type; // to have a back_inserter
-  typedef const value_type&    const_reference; 
-  typedef value_type&          reference;
-
-public:
-  struct   Vertex_iterator {};
-  struct   Face_iterator {};
-  struct   Edge_iterator {};
-
-protected:
-  // some more local types
-  //  typedef typename Agds::Vertex            Vertex;
-
-  // point lists
-  typedef std::vector<Site_2>              Site_list;
-  typedef typename Site_list::iterator     Site_list_iterator;
-
-  typedef std::map<Face_handle,bool>           Face_map;
-  typedef std::map<Face_handle, Face_handle>   Face_face_map;
-  typedef std::map<Vertex_handle,bool>         Vertex_map;
-  typedef std::set<Edge>                       Edge_list;
-
-  typedef std::list<Vertex_handle>         Vertex_list;
-  typedef typename Vertex_list::iterator   Vertex_list_iterator;
-  typedef Vertex_handle                    Vh_triple[3];
-
-  // the edge list
-  typedef typename internal::AG2_which_list<Edge,LTag>::List  List;
-
-  typedef enum { NO_CONFLICT = -1, INTERIOR, LEFT_VERTEX,
-		 RIGHT_VERTEX, BOTH_VERTICES, ENTIRE_EDGE }
-  Conflict_type;
-
-  static Conflict_type opposite(const Conflict_type& ct) {
-    if ( ct == RIGHT_VERTEX ) { return LEFT_VERTEX; }
-    if ( ct == LEFT_VERTEX ) { return RIGHT_VERTEX; }
-    return ct;
-  }
-
-protected:
-  // Less_than comparator for site weights;
-  // used to sort sites by decreasing weight when a sequence of sites
-  // is inserted
-  class Site_less_than_comparator
-  {
-  private:
-    const Gt& gt;
-  public:
-    Site_less_than_comparator(const Gt& gt) : gt(gt) {}
-
-    bool operator ()(const Site_2& p,
-		     const Site_2& q) {
-      Comparison_result result = gt.compare_weight_2_object()(p, q);
-      return (result == LARGER);
-    }
-  };
-
-public:
-  // CREATION
-  //---------
-  Apollonius_graph_2(const Gt& gt=Gt()) :
-    DG( Modified_traits(gt) ) {}
-
-  template< class Input_iterator >
-  Apollonius_graph_2(Input_iterator first, Input_iterator beyond,
-		     const Gt& gt=Gt())
-    : DG( Modified_traits(gt) )
-  {
-    insert(first, beyond);
-  }
-
-  Apollonius_graph_2(const Apollonius_graph_2 &ag)
-    : DG(ag)
-  {
-    CGAL_postcondition( is_valid() );
-  }
-
-  Apollonius_graph_2&
-  operator=(const Apollonius_graph_2& ag)
-  {
-    if ( this != &ag ) {
-      DG::operator=(ag);
-    }
-    return (*this);
-  }
-
-public:
-  // ACCESS METHODS
-  // --------------
-  const Geom_traits& geom_traits() const {
-    return DG::geom_traits();
-  }
-
-  const Data_structure& data_structure() const { return this->_tds; }
-  const Triangulation_data_structure& tds() const { return this->_tds; }
-
-  int dimension() const {
-    return this->_tds.dimension();
-  }
-
-  size_type number_of_faces() const {
-    return this->_tds.number_of_faces();
-  }
-
-  size_type number_of_vertices() const {
-    return DG::number_of_vertices();
-  }
-
-  size_type number_of_visible_sites() const {
-    return number_of_vertices();
-  }
-
-  size_type number_of_hidden_sites() const {
-    //    if ( !Vertex::StoreHidden ) { return 0; }
-
-    size_type n_hidden(0);
-    for (Finite_vertices_iterator vit = finite_vertices_begin();
-	 vit != finite_vertices_end(); ++vit) {
-      n_hidden += vit->number_of_hidden_sites();
-    }
-
-    return n_hidden;
-  }
-
-  Vertex_handle infinite_vertex() const {
-    return DG::infinite_vertex();
-  }
-
-  Face_handle infinite_face() const {
-    return DG::infinite_face();
-  }
-
-  Vertex_handle finite_vertex() const {
-    return DG::finite_vertex();
-  }
-
-protected:
-  using Delaunay_graph::cw;
-  using Delaunay_graph::ccw;
-
-public:
-  // TRAVERSAL OF THE APOLLONIUS GRAPH
-  //----------------------------------
-  Finite_faces_iterator finite_faces_begin() const {
-    return DG::finite_faces_begin();
-  }
-
-  Finite_faces_iterator finite_faces_end() const {
-    return DG::finite_faces_end();
-  }
-
-  Finite_vertices_iterator finite_vertices_begin() const {
-    return DG::finite_vertices_begin();
-  }
-
-  Finite_vertices_iterator finite_vertices_end() const {
-    return DG::finite_vertices_end();
-  }
-
-  Finite_edges_iterator finite_edges_begin() const {
-    return DG::finite_edges_begin();    
-  }
-  Finite_edges_iterator finite_edges_end() const {
-    return DG::finite_edges_end();    
-  }
-
-
-  Sites_iterator sites_begin() const {
-    return Sites_iterator(visible_sites_end(),
-    			  hidden_sites_begin(),
-    			  visible_sites_begin());
-  }
-
-  Sites_iterator sites_end() const {
-    return Sites_iterator(visible_sites_end(),
-    			  hidden_sites_begin(),
-    			  hidden_sites_end(),0);
-  }
-
-  Visible_sites_iterator visible_sites_begin() const {
-    return Visible_sites_iterator(finite_vertices_begin());
-  }
-
-  Visible_sites_iterator visible_sites_end() const {
-    return Visible_sites_iterator(finite_vertices_end());
-  }
-
-  Hidden_sites_iterator hidden_sites_begin() const {
-    return Hidden_sites_iterator(finite_vertices_end(),
-				 finite_vertices_begin());
-  }
-
-  Hidden_sites_iterator hidden_sites_end() const {
-    return Hidden_sites_iterator(finite_vertices_end(),
-				 finite_vertices_end());
-  }
-
-
-  All_faces_iterator all_faces_begin() const {
-    return DG::all_faces_begin();
-  }
-
-  All_faces_iterator all_faces_end() const {
-    return DG::all_faces_end();
-  }
-
-  All_vertices_iterator all_vertices_begin() const {
-    return DG::all_vertices_begin();
-  }
-
-  All_vertices_iterator all_vertices_end() const {
-    return DG::all_vertices_end();
-  }
-
-  All_edges_iterator all_edges_begin() const {
-    return DG::all_edges_begin();
-  }
-
-  All_edges_iterator all_edges_end() const {
-    return DG::all_edges_end();
-  }
-
-public:
-  // CIRCULATORS
-  //------------
-  Face_circulator
-  incident_faces(Vertex_handle v,
-		 Face_handle f = Face_handle()) const {
-    return DG::incident_faces(v, f);
-  }
-
-  Vertex_circulator
-  incident_vertices(Vertex_handle v,
-		    Face_handle f = Face_handle()) const { 
-    return DG::incident_vertices(v, f);
-  }
-
-  Edge_circulator
-  incident_edges(Vertex_handle v,
-		 Face_handle f = Face_handle()) const {
-    return DG::incident_edges(v, f);
-  }
- 
-public:
-  // PREDICATES
-  //-----------
-  bool is_infinite(const Vertex_handle& v) const {
-    return DG::is_infinite(v);
-  }
-
-  bool is_infinite(const Face_handle& f) const {
-    return DG::is_infinite(f);
-  }
-
-  bool is_infinite(const Face_handle& f, int i) const {
-    return DG::is_infinite(f, i);
-  }
-
-  bool is_infinite(const Edge& e) const {
-    return is_infinite(e.first, e.second);
-  }
-
-  bool is_infinite(const Edge_circulator& ec) const {
-    return DG::is_infinite(ec);
-  }
-
-public:
-  // INSERTION
-  //----------
-  template< class Input_iterator >
-  size_type insert(Input_iterator first, Input_iterator beyond) {
-    // copy to a local container
-    Site_list wp_list;
-    for (Input_iterator it = first; it != beyond; ++it) {
-      wp_list.push_back(*it);
-    }
-
-    // sort by decreasing weight
-    Site_less_than_comparator less_than(geom_traits());
-    std::sort(wp_list.begin(), wp_list.end(), less_than);
-
-    // now insert
-    Site_list_iterator lit;
-    for (lit = wp_list.begin(); lit != wp_list.end(); ++lit) {
-      insert(*lit);
-    }
-
-    // store how many sites where in the range
-    size_type num = wp_list.size();
-
-    // clear the local container
-    wp_list.clear();
-
-    // return the number of sites in range
-    return num;
-  }
-
-  Vertex_handle  insert(const Site_2& p) {
-    return insert(p, Vertex_handle());
-  }
-
-  Vertex_handle  insert(const Site_2& p, Vertex_handle vnear);
-
-public:
-  // REMOVAL
-  //--------
-  void remove(Vertex_handle v);
-
-public:
-  // NEAREST NEIGHBOR LOCATION
-  //--------------------------
-  Vertex_handle  nearest_neighbor(const Point_2& p) const;
-  Vertex_handle  nearest_neighbor(const Point_2& p,
-				  Vertex_handle vnear) const;
-
-public:
-  // ACCESS TO THE DUAL
-  //-------------------
-  typename Gt::Object_2 dual(const Face_handle& f) const;
-
-  Site_2 dual(const Finite_faces_iterator& it) const
-  {
-    typename Gt::Object_2 o = dual(Face_handle(it));
-    Site_2 s;
-    if ( assign(s, o) ) {
-      return s;
-    } else {
-      bool the_assign_statement_must_always_work(false);
-      CGAL_assertion( the_assign_statement_must_always_work );
-    }
-    return s;
-  }
-
-
-private:
-  typename Gt::Object_2 dual(const Edge e) const;
-
-  typename Gt::Object_2 dual(const Edge_circulator& ec) const {
-    return dual(*ec);
-  }
-
-  typename Gt::Object_2 dual(const Finite_edges_iterator& ei) const {
-    return dual(*ei);
-  }
-
-public:
-  // I/O
-  //----
-  void file_input(std::istream&);
-  void file_output(std::ostream&) const;
-
-  template< class Stream >
-  Stream& draw_primal(Stream &str) const
-  {
-    if ( number_of_vertices() < 2 ) {
-      // do nothing
-    } else if ( number_of_vertices() == 2 ) {
-      Vertex_handle v1(finite_vertices_begin());
-      Vertex_handle v2(++finite_vertices_begin());
-      Site_2 p1 = v1->site();
-      Site_2 p2 = v2->site();
-      
-
-      typename Geom_traits::Segment_2 seg =
-	construct_Apollonius_primal_segment_2_object()(p1,p2);
-      typename Geom_traits::Ray_2 ray1 =
-	construct_Apollonius_primal_ray_2_object()(p1,p2,p2);
-      typename Geom_traits::Ray_2 ray2 =
-	construct_Apollonius_primal_ray_2_object()(p2,p1,p1);
-
-      str << seg;
-      str << ray1;
-      str << ray2;
-    } else {
-      All_edges_iterator eit = all_edges_begin();
-      for (; eit != all_edges_end(); ++eit) {
-	draw_primal_edge< Stream >(eit, str);
-      }
-    }
-    return str;
-  }
-
-  template < class Stream > 
-  Stream& draw_dual(Stream &str) const
-  {
-    Finite_edges_iterator eit = finite_edges_begin();
-    for (; eit != finite_edges_end(); ++eit) {
-      typename Gt::Object_2 o = dual(eit);
-      typename Geom_traits::Line_2     l;
-      typename Geom_traits::Segment_2  s;
-      typename Geom_traits::Ray_2      r;
-      CGAL::Hyperbola_2<Gt>            h;
-      CGAL::Hyperbola_segment_2<Gt>    hs;
-      CGAL::Hyperbola_ray_2<Gt>        hr;
-      if (assign(hs, o)) hs.draw(str);
-      else if (assign(s, o))  str << s; 
-      else if (assign(hr, o))  hr.draw(str);
-      else if (assign(r, o))   str << r;
-      else if (assign(h, o))  h.draw(str);
-      else if (assign(l, o)) str << l;
-    }
-    return str;
-  }
-
-protected:
-  template< class Stream >
-  Stream& draw_primal_vertex(const Finite_vertices_iterator& it,
-			     Stream &str) const
-  {
-    return str << it->site().point();
-  }
-
-
-  template< class Stream >
-  Stream& draw_dual_vertex(const Finite_faces_iterator& it,
-			   Stream &str) const
-  {
-    return str << dual(it);
-  }
-
-public:
-  template< class Stream >
-  Stream& draw_primal_edge(const Finite_edges_iterator& eit,
-			   Stream &str) const
-  {
-    return draw_primal_edge(*eit, str);
-  }
-
-  template< class Stream >
-  Stream& draw_primal_edge(const All_edges_iterator& eit,
-			   Stream &str) const
-  {
-    return draw_primal_edge(*eit, str);
-  }
-
-
-  template < class Stream > 
-  Stream& draw_dual_edge(const Finite_edges_iterator& eit,
-			 Stream &str) const
-  {
-    return draw_dual_edge(*eit, str);
-  }
-
-  template< class Stream >
-  Stream& draw_primal_edge(const Edge& e, Stream &str) const
-  {
-    typedef typename Geom_traits::Segment_2     Segment_2;
-    typedef typename Geom_traits::Ray_2         Ray_2;
-    typedef std::pair<Segment_2,Segment_2>      Segment_pair_2;
-
-    typename Geom_traits::Object_2 o = primal(e);
-    Segment_2       s;
-    Ray_2           r;
-    Segment_pair_2  s_pair;
-    CGAL::Hyperbola_segment_2<Gt>    hs;
-    CGAL::Parabola_segment_2<Gt>     ps;
-    if (assign(hs, o))  hs.draw(str);
-    if (assign(s, o))   str << s; 
-    if (assign(ps, o))  ps.draw(str);
-    if (assign(r, o))   str << r;
-    if (assign(s_pair, o)) str << s_pair.first << s_pair.second;
-    return str;
-  }
-
-  template < class Stream > 
-  Stream& draw_dual_edge(const Edge& e, Stream &str) const
-  {
-    if ( is_infinite(e) ) { return str; }
-    typename Gt::Object_2 o = dual(e);
-    typename Geom_traits::Line_2     l;
-    typename Geom_traits::Segment_2  s;
-    typename Geom_traits::Ray_2      r;
-    CGAL::Hyperbola_2<Gt>            h;
-    CGAL::Hyperbola_segment_2<Gt>    hs;
-    CGAL::Hyperbola_ray_2<Gt>        hr;
-    if (assign(hs, o))  hs.draw(str);
-    if (assign(s, o))   str << s; 
-    if (assign(hr, o))  hr.draw(str);
-    if (assign(r, o))   str << r;
-    if (assign(h, o))   h.draw(str);
-    if (assign(l, o))   str << l;
-
-    return str;
-  }
-
-protected:
-  template< class Stream >
-  Stream& draw_primal_face(All_faces_iterator fit, Stream &str) const
-  {
-    for (int i = 0; i < 3; i++) {
-      draw_primal_edge< Stream >(Edge(Face_handle(fit), i), str);
-    }
-    return str;
-  }
-
-
-  template< class Stream >
-  Stream& draw_dual_face(const All_vertices_iterator& vit,
-			 Stream &str) const
-  {
-    Edge_circulator ec_start = incident_edges(Vertex_handle(vit));
-    Edge_circulator ec = ec_start;
-    do {
-      draw_dual_edge< Stream >(*ec, str);
-      ++ec;
-    } while ( ec_start != ec );
-    return str;
-  }
-
-protected:
-  template < class Stream > 
-  Stream& draw_dual_sites(Stream &str) const
-  {
-    All_faces_iterator fit = all_faces_begin();
-    for (; fit != all_faces_end(); ++fit) {
-      Face_handle f(fit);
-      if ( is_infinite(f) ) {
-	if (  is_infinite(f->vertex(0))  ) {
-	  str << circumcircle( f->vertex(1)->site(),
-			       f->vertex(2)->site() );
-	} else if (  is_infinite(f->vertex(1))  ){
-	  str << circumcircle( f->vertex(2)->site(),
-			       f->vertex(0)->site() );
-	} else {
-	  str << circumcircle( f->vertex(0)->site(),
-			       f->vertex(1)->site() );	  
-	}
-      } else {
-	Site_2 wp = circumcircle(f);
-	typename Gt::Rep::Circle_2 c(wp.point(),
-				     CGAL::square(wp.weight()));
-	str << c;
-      }
-    }
-    return str;
-  }
-
-public:
-  // VALIDITY CHECK
-  //---------------
-  bool is_valid(bool verbose = false, int level = 1) const;
-
-public:
-  // MISCELLANEOUS
-  //--------------
-  void clear() {
-    DG::clear();
-  }
-
-  void swap(Apollonius_graph_2& ag) {
-    DG::swap(ag);
-  }
-
-public:
-  // MK: THE FOLLOWING ARE NOT IN THE SPEC
-  //======================================
-  // Primal
-  typename Gt::Object_2 primal(const Edge e) const;
-  typename Gt::Object_2 primal(const Edge_circulator& ec) const {
-    return primal(*ec);
-  }
-  typename Gt::Object_2 primal(const Finite_edges_iterator& ei) const {
-    return primal(*ei);
-  }
-
-protected:
-  // wrappers for the geometric predicates
-
-  // checks is q is contained inside p
-  bool is_hidden(const Site_2 &p, const Site_2 &q) const;
-
-  // returns:
-  //   ON_POSITIVE_SIDE if q is closer to p1
-  //   ON_NEGATIVE_SIDE if q is closer to p2
-  //   ON_ORIENTED_BOUNDARY if q is on the bisector of p1 and p2
-  Oriented_side side_of_bisector(const Site_2 &p1,
-				 const Site_2 &p2,
-				 const Point_2 &q) const;
-
-  Sign incircle(const Site_2 &p1, const Site_2 &p2,
-		const Site_2 &p3, const Site_2 &q) const;
-
-  Sign incircle(const Site_2 &p1, const Site_2 &p2,
-		const Site_2 &q) const;
-
-
-  Sign incircle(const Face_handle& f, const Site_2& q) const;
-
-
-  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
-		const Vertex_handle& v) const;
-
-  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
-		const Vertex_handle& v2, const Vertex_handle& v) const;
-
-
-  
-  bool finite_edge_interior(const Site_2& p1,
-			    const Site_2& p2,
-			    const Site_2& p3,
-			    const Site_2& p4,
-			    const Site_2& q,
-			    bool endpoints_in_conflict) const;
-
-  bool finite_edge_interior(const Face_handle& f, int i,
-			    const Site_2& q,
-			    bool endpoints_in_conflict) const;
-
-  bool finite_edge_interior(const Vertex_handle& v1,
-			    const Vertex_handle& v2,
-			    const Vertex_handle& v3,
-			    const Vertex_handle& v4,
-			    const Vertex_handle& v,
-			    bool endpoints_in_conflict) const;
-
-  bool finite_edge_interior_degenerated(const Site_2& p1,
-					const Site_2& p2,
-					const Site_2& p3,
-					const Site_2& q,
-					bool endpoints_in_conflict) const;
-
-
-  bool finite_edge_interior_degenerated(const Site_2& p1,
-					const Site_2& p2,
-					const Site_2& q,
-					bool endpoints_in_conflict) const;
-
-  bool finite_edge_interior_degenerated(const Face_handle& f, int i,
-					const Site_2& p,
-					bool endpoints_in_conflict) const;
-
-  bool finite_edge_interior_degenerated(const Vertex_handle& v1,
-					const Vertex_handle& v2,
-					const Vertex_handle& v3,
-					const Vertex_handle& v4,
-					const Vertex_handle& v,
-					bool endpoints_in_conflict) const;
-  bool infinite_edge_interior(const Site_2& p2,
-			      const Site_2& p3,
-			      const Site_2& p4,
-			      const Site_2& q,
-			      bool endpoints_in_conflict) const;
-
-
-  bool infinite_edge_interior(const Face_handle& f, int i,
-			      const Site_2& p,
-			      bool endpoints_in_conflict) const;
-
-  bool infinite_edge_interior(const Vertex_handle& v1,
-			      const Vertex_handle& v2,
-			      const Vertex_handle& v3,
-			      const Vertex_handle& v4,
-			      const Vertex_handle& v,
-			      bool endpoints_in_conflict) const;
-
-  Conflict_type
-  infinite_edge_conflict_type(const Site_2& p2,
-			      const Site_2& p3,
-			      const Site_2& p4,
-			      const Site_2& q) const;
-
-  Conflict_type
-  finite_edge_conflict_type_degenerated(const Site_2& p1,
-					const Site_2& p2,
-					const Site_2& q) const;
-
-  bool edge_interior(const Face_handle& f, int i,
-		     const Site_2& p, bool b) const;
-
-
-  bool edge_interior(const Edge& e,
-			    const Site_2& p, bool b) const {
-    return edge_interior(e.first, e.second, p, b);
-  }
-
-  bool edge_interior(const Vertex_handle& v1,
-		     const Vertex_handle& v2,
-		     const Vertex_handle& v3,
-		     const Vertex_handle& v4,
-		     const Vertex_handle& v,
-		     bool endpoints_in_conflict) const;
-
-  bool is_degenerate_edge(const Site_2& p1,
-				 const Site_2& p2,
-				 const Site_2& p3,
-				 const Site_2& p4) const {
-    return geom_traits().is_degenerate_edge_2_object()
-      (p1, p2, p3, p4);
-  }
-
-  bool is_degenerate_edge(const Vertex_handle& v1,
-				 const Vertex_handle& v2,
-				 const Vertex_handle& v3,
-				 const Vertex_handle& v4) const {
-    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
-		       !is_infinite(v3) && !is_infinite(v4) );
-
-    return is_degenerate_edge(v1->site(), v2->site(),
-			      v3->site(), v4->site());
-  }
-
-  bool is_degenerate_edge(const Face_handle& f, int i) const {
-    Vertex_handle v1 = f->vertex( ccw(i) );
-    Vertex_handle v2 = f->vertex(  cw(i) );
-    Vertex_handle v3 = f->vertex(     i  );
-    Vertex_handle v4 = tds().mirror_vertex(f, i);
-
-    return is_degenerate_edge(v1, v2, v3, v4);
-  }
-
-  bool is_degenerate_edge(const Edge& e) const {
-    return is_degenerate_edge(e.first, e.second);
-  }
-
-
-protected:
-  // wrappers for constructions
-  Point_2 circumcenter(const Face_handle& f) const;
-  Point_2 circumcenter(const Site_2& p0, 
-		       const Site_2& p1, 
-		       const Site_2& p2) const;
-
-  Site_2 circumcircle(const Face_handle& f) const;
-  Site_2 circumcircle(const Site_2& p0, 
-		      const Site_2& p1, 
-		      const Site_2& p2) const;
-
-  typename Gt::Line_2 circumcircle(const Site_2& p0,
-				   const Site_2& p1) const;
-
-protected:
-  // wrappers for combinatorial operations on the data structure
-
-  // getting the degree of a vertex
-  typename Data_structure::size_type degree(const Vertex_handle& v) {
-    return this->_tds.degree(v);
-  }
-
-  // getting the symmetric edge
-  Edge sym_edge(const Edge e) const {
-    return sym_edge(e.first, e.second);
-  }
-
-  Edge sym_edge(const Face_handle& f, int i) const {
-    Face_handle f_sym = f->neighbor(i);
-    return Edge(  f_sym, f_sym->index( tds().mirror_vertex(f, i) )  );
-  }
-
-  Edge flip(Face_handle& f, int i);
-  Edge flip(Edge e);
-
-  Vertex_handle insert_in_face(Face_handle& f, const Site_2& p);
-
-  bool          is_degree_2(const Vertex_handle& v) const;
-
-  Vertex_handle insert_degree_2(Edge e);
-  Vertex_handle insert_degree_2(Edge e, const Site_2& p);
-  void          remove_degree_2(Vertex_handle v);
-  void          remove_degree_3(Vertex_handle v);
-  void          remove_degree_3(Vertex_handle v, Face_handle f);
-
-  // this was defined because the hierarchy needs it
-  Vertex_handle create_vertex() {
-    return this->_tds.create_vertex();
-  }
-
-protected:
-  // insertion of the first three sites
-  Vertex_handle  insert_first(const Site_2& p);
-  Vertex_handle  insert_second(const Site_2& p);
-  Vertex_handle  insert_third(const Site_2& p);
-
-  // methods for insertion
-  void initialize_conflict_region(const Face_handle& f, List& l) const;
-  bool check_edge_for_hidden_sites(const Face_handle& f, int i,
-				   const Site_2& p, Vertex_map& vm) const;
-  void expand_conflict_region(const Face_handle& f,
-			      const Site_2& p,
-			      List& l, Face_map& fm, Vertex_map& vm,
-			      std::vector<Vh_triple*>* fe);
-
-  Vertex_handle add_bogus_vertex(Edge e, List& l);
-  Vertex_list   add_bogus_vertices(List& l);
-  void          remove_bogus_vertices(Vertex_list& vl);
-
-  void move_hidden_sites(Vertex_handle& vold, Vertex_handle& vnew);
-
-  // MK: this is not currently used
-  std::vector<Face*> get_faces_for_recycling(Face_map& fm,
-					     unsigned int n_wanted);
-  void remove_hidden_vertices(Vertex_map& vm);
-  Vertex_handle retriangulate_conflict_region(const Site_2& p,
-					      List& l,
-					      Face_map& fm,
-					      Vertex_map& vm);
-
-protected:
-  // methods for removal
-  void  remove_first(Vertex_handle v);
-  void  remove_second(Vertex_handle v);
-  void  remove_third(Vertex_handle v);
-  void  remove_degree_d_vertex(Vertex_handle v);
-  void  minimize_degree(Vertex_handle v);
-
-  void find_conflict_region_remove(const Vertex_handle& v,
-				   const Vertex_handle& vnearest,
-				   List& l, Face_map& fm,
-				   Vertex_map& vm,
-				   std::vector<Vh_triple*>* fe);
-
-protected:
-  // methods for I/O
-
-  template<class T>
-  bool assign(T& t2, const typename Gt::Object_2& o2) const
-  {
-    return geom_traits().assign_2_object()(t2, o2);
-  }
-
-
-protected:
-  template<class OutputItFaces>
-  OutputItFaces find_conflicts(const Face_handle& f,
-			       const Site_2& p,
-			       List& l,
-			       Face_map& fm,
-			       Vertex_map& vm,
-			       OutputItFaces fit) const
-  {
-    // setting fm[f] to true means that the face has been reached and
-    // that the face is available for recycling. If we do not want the
-    // face to be available for recycling we must set this flag to
-    // false.
-    if ( fm.find(f) != fm.end() ) { return fit; }
-    fm[f] = true;
-    CGAL_assertion( incircle(f, p) == NEGATIVE );
-    *fit++ = f;
-
-    //  CGAL_assertion( fm.find(f) != fm.end() );
-    for (int i = 0; i < 3; i++) {
-      bool hidden_found = check_edge_for_hidden_sites(f, i, p, vm);
-
-      Face_handle n = f->neighbor(i);
-
-      if ( !hidden_found ) {
-	Sign s = incircle(n, p);
-	if ( s != NEGATIVE ) { continue; }
-
-	bool interior_in_conflict = edge_interior(f, i, p, true);
-
-	if ( !interior_in_conflict ) { continue; }
-      }
-
-      if ( fm.find(n) != fm.end() ) {
-	Edge e = sym_edge(f, i);
-	if ( l.is_in_list(e) ||
-	     l.is_in_list(sym_edge(e)) ) {
-	  l.remove(e);
-	  l.remove(sym_edge(e));
-	}
-	continue;
-      }
-
-      Edge e = sym_edge(f, i);
-
-      CGAL_assertion( l.is_in_list(e) );
-      int j = tds().mirror_index(f, i);
-      Edge e_before = sym_edge(n, ccw(j));
-      Edge e_after = sym_edge(n, cw(j));
-      if ( !l.is_in_list(e_before) ) {
-	l.insert_before(e, e_before);
-      }
-      if ( !l.is_in_list(e_after) ) {
-	l.insert_after(e, e_after);
-      }
-      l.remove(e);
-
-      fit = find_conflicts(n, p, l, fm, vm, fit);
-    } // for-loop
-    return fit;
-  } // find_conflicts
-
-  bool equal(const Edge& e1, const Edge& e2) const {
-    return e1.first == e2.first && e1.second == e2.second;
-  }
-
-
-protected:
-  template<class OutputItFaces, class OutputItBoundaryEdges,
-	   class OutputItHiddenVertices>
-  boost::tuples::tuple<OutputItFaces, OutputItBoundaryEdges,
-		       OutputItHiddenVertices>
-  get_all(const Site_2& p,
-	  OutputItFaces fit,
-	  OutputItBoundaryEdges eit,
-	  OutputItHiddenVertices vit,
-	  Vertex_handle start,
-	  bool find_nearest) const
-  {
-    CGAL_precondition( dimension() == 2 );
-
-    // first find the nearest neighbor
-    Vertex_handle vnearest = start;
-    if ( find_nearest ) {
-      vnearest = nearest_neighbor(p.point(), start);
-      CGAL_assertion( vnearest != Vertex_handle() );
-    }
-
-    // check if it is hidden
-    if ( is_hidden(vnearest->site(), p) ) {
-      return boost::tuples::make_tuple(fit, eit, vit);
-    }
-
-    // find the first conflict
-
-    // first look for conflict with vertex
-    Face_circulator fc_start = incident_faces(vnearest);
-    Face_circulator fc = fc_start;
-    Face_handle start_f;
-    Sign s;
-    do {
-      Face_handle f(fc);
-      s = incircle(f, p);
-
-      if ( s == NEGATIVE ) {
-	start_f = f;
-	break;
-      }
-      ++fc;
-    } while ( fc != fc_start );
-
-    // we are not in conflict with an Apollonius vertex, so we have to
-    // be in conflict with the interior of an Apollonius edge
-    if ( s != NEGATIVE ) {
-      Edge_circulator ec_start = incident_edges(vnearest);
-      Edge_circulator ec = ec_start;
-
-      bool interior_in_conflict(false);
-      Edge e;
-      do {
-	e = *ec;
-	interior_in_conflict = edge_interior(e, p, false);
-	
-	if ( interior_in_conflict ) { break; }
-	++ec;
-      } while ( ec != ec_start );
-
-      CGAL_assertion( interior_in_conflict );
-
-      *eit++ = e;
-      *eit++ = sym_edge(e);
-      return boost::tuples::make_tuple(fit, eit, vit);
-    }
-
-    // we are in conflict with an Apollonius vertex; start from that and 
-    // find the entire conflict region and then repair the diagram
-    List l;
-    Face_map fm;
-    Vertex_map vm;
-
-    //    *fit++ = start_f;
-    initialize_conflict_region(start_f, l);
-    fit = find_conflicts(start_f, p, l, fm, vm, fit);
-
-    // output the edges on the boundary of the conflict region
-    if ( l.size() > 0 ) {
-      const Edge& e_front = l.front();
-      // here I should be able to write: const Edge& e = l.front();
-      // instead of what I have; but the compiler complains for the
-      // assignment: e = l.next(e);
-      Edge e = l.front();
-      do {
-	*eit++ = e;
-	e = l.next(e);
-      } while ( !equal(e, e_front) );
-    }
-
-    // output the hidden vertices
-    for (typename Vertex_map::iterator it = vm.begin(); it != vm.end(); ++it) {
-      *vit++ = it->first;
-    }
-
-    // clear containers
-    fm.clear();
-    vm.clear();
-    l.clear();
-
-    return boost::tuples::make_tuple(fit, eit, vit);
-  }
-
-public:
-  template<class OutputItFaces, class OutputItBoundaryEdges,
-	   class OutputItHiddenVertices>
-  boost::tuples::tuple<OutputItFaces, OutputItBoundaryEdges,
-		       OutputItHiddenVertices>
-  get_conflicts_and_boundary_and_hidden_vertices(const Site_2& p,
-						 OutputItFaces fit,
-						 OutputItBoundaryEdges eit,
-						 OutputItHiddenVertices vit,
-						 Vertex_handle start =
-						 Vertex_handle()) const
-  {
-    return get_all(p, fit, eit, vit, start, true);
-  }
-
-  template<class OutputItFaces, class OutputItBoundaryEdges>
-  std::pair<OutputItFaces, OutputItBoundaryEdges>
-  get_conflicts_and_boundary(const Site_2& p,
-			     OutputItFaces fit,
-			     OutputItBoundaryEdges eit,
-			     Vertex_handle start =
-			     Vertex_handle()) const {
-    boost::tuples::tuple<OutputItFaces,OutputItBoundaryEdges,Emptyset_iterator>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     fit,
-						     eit,
-						     Emptyset_iterator(),
-						     start);
-    return std::make_pair( boost::tuples::get<0>(tup),
-			   boost::tuples::get<1>(tup) );
-  }
-
-
-  template<class OutputItBoundaryEdges, class OutputItHiddenVertices>
-  std::pair<OutputItBoundaryEdges, OutputItHiddenVertices>
-  get_boundary_of_conflicts_and_hidden_vertices(const Site_2& p,
-						OutputItBoundaryEdges eit,
-						OutputItHiddenVertices vit,
-						Vertex_handle start =
-						Vertex_handle()) const {
-    boost::tuples::tuple<Emptyset_iterator,OutputItBoundaryEdges,
-      OutputItHiddenVertices>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     Emptyset_iterator(),
-						     eit,
-						     vit,
-						     start);
-    return std::make_pair( boost::tuples::get<1>(tup),
-			   boost::tuples::get<2>(tup) );
-  }
-
-
-  template<class OutputItFaces, class OutputItHiddenVertices>
-  std::pair<OutputItFaces, OutputItHiddenVertices>
-  get_conflicts_and_hidden_vertices(const Site_2& p,
-				    OutputItFaces fit,
-				    OutputItHiddenVertices vit,
-				    Vertex_handle start =
-				    Vertex_handle()) const {
-    boost::tuples::tuple<OutputItFaces,Emptyset_iterator,
-      OutputItHiddenVertices>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     fit,
-						     Emptyset_iterator(),
-						     vit,
-						     start);
-    return std::make_pair( boost::tuples::get<0>(tup),
-			   boost::tuples::get<2>(tup) );
-  }
-
-  template<class OutputItFaces>
-  OutputItFaces get_conflicts(const Site_2& p,
-			      OutputItFaces fit,
-			      Vertex_handle start = Vertex_handle()) const {
-    boost::tuples::tuple<OutputItFaces,Emptyset_iterator,Emptyset_iterator>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     fit,
-						     Emptyset_iterator(),
-						     Emptyset_iterator(),
-						     start);
-    return boost::tuples::get<0>(tup);
-  }
-
-  template<class OutputItBoundaryEdges>
-  OutputItBoundaryEdges
-  get_boundary_of_conflicts(const Site_2& p,
-			    OutputItBoundaryEdges eit,
-			    Vertex_handle start = Vertex_handle()) const {
-    boost::tuples::tuple<Emptyset_iterator,OutputItBoundaryEdges,
-      Emptyset_iterator>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     Emptyset_iterator(),
-						     eit,
-						     Emptyset_iterator(),
-						     start);
-    return boost::tuples::get<1>(tup);
-  }
-
-  template<class OutputItHiddenVertices>
-  OutputItHiddenVertices
-  get_hidden_vertices(const Site_2& p,
-		      OutputItHiddenVertices vit,
-		      Vertex_handle start = Vertex_handle()) const {
-    boost::tuples::tuple<Emptyset_iterator,Emptyset_iterator,
-      OutputItHiddenVertices>
-      tup =
-      get_conflicts_and_boundary_and_hidden_vertices(p,
-						     Emptyset_iterator(),
-						     Emptyset_iterator(),
-						     vit,
-						     start);
-    return boost::tuples::get<2>(tup);
-  }
-
-
-}; // Apollonius_graph_2
-
-template<class Gt, class Agds, class LTag>
-std::ostream& operator<<(std::ostream& os,
-			 const Apollonius_graph_2<Gt,Agds,LTag>& ag)
-{
-  ag.file_output(os);
-  return os;
-}
-
-template<class Gt, class Agds, class LTag>
-std::istream& operator>>(std::istream& is,
-			 Apollonius_graph_2<Gt,Agds,LTag>& ag)
-{
-  ag.file_input(is);
-  return is;
-}
-
-} //namespace CGAL
-
-#include <CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h>
-
-
-#endif // CGAL_APOLLONIUS_GRAPH_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h
deleted file mode 100644
index b6fee00..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-#ifndef CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
-#define CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
-
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-template < class Vbb >
-class Apollonius_graph_hierarchy_vertex_base_2
- : public Vbb
-{
-  typedef Vbb                                                Base;
-  typedef typename Base::Apollonius_graph_data_structure_2   Agds;
-
-public:
-  typedef typename Base::Site_2             Site_2;
-  typedef Agds                              Apollonius_graph_data_structure_2;
-  typedef typename Agds::Vertex_handle      Vertex_handle;
-  typedef typename Agds::Face_handle        Face_handle;
-
-  template < typename AGDS2 >
-  struct Rebind_TDS {
-    typedef typename Vbb::template Rebind_TDS<AGDS2>::Other   Vb2;
-    typedef Apollonius_graph_hierarchy_vertex_base_2<Vb2>     Other;
-  };
-
-  Apollonius_graph_hierarchy_vertex_base_2()
-    : Base(), _up(), _down()
-    {}
-  Apollonius_graph_hierarchy_vertex_base_2(const Site_2& p,
-					   Face_handle f)
-    : Base(p,f), _up(), _down()
-    {}
-  Apollonius_graph_hierarchy_vertex_base_2(const Site_2& p)
-    : Base(p), _up(), _down()
-    {}
-
-  Vertex_handle up() {return _up;}
-  Vertex_handle down() {return _down;}
-  void set_up(Vertex_handle u) {_up=u;}
-  void set_down(Vertex_handle d) {if (this) _down=d;}
-
-
- private:
-  Vertex_handle  _up;    // same vertex one level above
-  Vertex_handle  _down;  // same vertex one level below
-};
-
-} //namespace CGAL
-
-#endif // CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_site_2.h b/3rdparty/CGAL-4.6/include/CGAL/Apollonius_site_2.h
deleted file mode 100644
index cdd60bc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_site_2.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-#ifndef CGAL_APOLLONIUS_SITE_2_H
-#define CGAL_APOLLONIUS_SITE_2_H
-
-#include <iostream>
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-
-template < class K >
-class Apollonius_site_2
-{
-public:
-  typedef K                       Kernel;
-  typedef typename K::Point_2     Point_2;
-  typedef Apollonius_site_2<K>    Self;
-  typedef typename K::FT          Weight;
-  typedef typename K::RT          RT;
-  typedef Weight                  FT;
-
-
-public:
-  Apollonius_site_2(const Point_2& p = Point_2(),
-		    const Weight& w = Weight(0))
-    : _p(p), _w(w) {}
-
-  Apollonius_site_2(const Apollonius_site_2& other)
-    : _p(other._p), _w(other._w) {}
-
-  
-  const Point_2& point() const { return _p; }
-  const Weight&  weight() const { return _w; }
-  RT      x() const { return _p.x(); }
-  RT      y() const { return _p.y(); }
-
-  bool operator==(const Apollonius_site_2& other) const
-  {
-    return ( _p == other._p && _w == other._w );
-  }
-
-private:
-  Point_2 _p;
-  Weight  _w;
-
-};
-
-template <class K>
-std::ostream&
-operator<<(std::ostream &os, const Apollonius_site_2<K>& wp)
-{
-  return os << wp.point() << " " << wp.weight();
-}
-
-template <class K>
-std::istream&
-operator>>(std::istream& is, Apollonius_site_2<K>& wp)
-{
-  typename Apollonius_site_2<K>::Weight   weight;
-  typename Apollonius_site_2<K>::Point_2  p;
-  is >> p >> weight;
-  if(is) {
-    wp = Apollonius_site_2<K>(p, weight);
-  }
-  return is;
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_APOLLONIUS_SITE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h
deleted file mode 100644
index d6cbb4a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Kaspar Fischer <fischerk at inf.ethz.ch>
-
-#include <CGAL/eigen_2.h>
-#include <CGAL/eigen.h>
-
-#include <CGAL/Approximate_min_ellipsoid_d.h>
-
-namespace CGAL {
-
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  find_lower_dimensional_approximation()
-  {
-    // (No implementation yet, in accordance with the current
-    // specification in doc_tex ...)
-  }
-
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  compute_center()
-  {
-    // According to (****), the computed ellipsoid E* has the representation
-    //
-    //   E* = { y in R^d | y^T M'/alpha y + 2/alpha y^Tm + (nu/alpha-1) <= 0 }
-    // 
-    // for
-    //
-    //       [ M'  m  ]
-    //   M = [ m^T nu ]
-    //
-    // where M is the matrix defined via E->matrix(i,j).  We need
-    // something in the form
-    //
-    //    E* = { y | (y - c)^T M'/alpha (y - c) + mu <= 0 }.
-    //
-    // Expanding the later and comparing with the original form we
-    // obtain
-    //
-    //    c = - M'^{-1} m
-    //
-    // as the formula for the ellipsoid's center.  Comparing
-    // coefficients we also get
-    //
-    //    mu = nu/alpha-1 - c^T M'/alpha c 
-    //       = nu/alpha-1 + c^T m / alpha
-    //       = (nu + c^Tm)/alpha - 1                               (********)
-    //
-    // In order to compute c, we will compute the inverse of M' and
-    // multiply with m.
-
-    // precondition checking:
-    CGAL_APPEL_ASSERT(!has_center);
-
-    // compute M'^{-1}:
-    mi.resize(d * d);
-    E->compute_inverse_of_submatrix(mi.begin());
-
-    // compute center:
-    center_.resize(d);
-    for (int i=0; i<d; ++i) {
-      FT ci(0);
-      for (int j=0; j<d; ++j)
-	ci += mi[i+d*j] * E->matrix(d,j);
-      center_[i] = -ci;
-    }
-
-    // remember that we have computed the center:
-    has_center = true;
-  }
-
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  compute_axes_2_3()
-  {
-    // According to (****), the computed ellipsoid E* has the representation
-    //
-    //   E* = { y in R^d | y^T M'/alpha y + 2/alpha y^Tm + (nu/alpha-1) <= 0 }
-    // 
-    // for
-    //
-    //       [ M'  m  ]
-    //   M = [ m^T nu ]
-    //
-    // where M is the matrix defined via E->matrix(i,j).  After caling
-    // compute_center() (see above), we have in center_ a point c such
-    // that
-    // 
-    //   E* = { y | (y - c)^T M'/alpha (y - c) + mu <= 0 }.
-    //
-    // where mu = nu/alpha-1 - c^T M'/alpha c.
-    //
-    // Now if we can write M' = U D U^T holds for some diagonal matrix
-    // D and an orthogonal matrix U then the length l_i of the ith axes
-    // (corresponding to the ith "direcion" stored in the ith row of
-    // U) can be obtained by plugging (0,...,0,l_i,0,...,0)U^T=y-c into
-    // the above equation for E*:
-    //
-    //   l_i^2 d[i]/alpha = -mu, 
-    //
-    // which gives l_i = sqrt(-mu*alpha/d[i]).
-
-    // precondition checking:
-    CGAL_APPEL_ASSERT(!has_axes && lengths_.size() == 0 &&
-		      directions_.size() == 0);
-
-    // compute M'^{-1}, if need be:
-    if (!has_center)
-      compute_center();
-
-    const double alpha = (1+achieved_epsilon()) * (d+1);
-
-    // compute mu according to (********):
-    double mu = E->matrix(d,d);
-    for (int i=0; i<d; ++i)
-      mu += center_[i] * E->matrix(d,i);
-    mu = mu/alpha - 1.0;
-    const double factor = -mu*alpha;
-    
-    // compute Eigendecomposition:
-    if (d == 2)
-      compute_axes_2(alpha, factor);
-    else
-      compute_axes_3(alpha, factor);
-
-    // remember that we have computed the axes:
-    has_axes = true;
-  }
-
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  compute_axes_2(const double /* alpha */, const double factor)
-  {
-    CGAL_APPEL_ASSERT(d==2);
-
-    typedef Simple_cartesian<double> K;
-    typedef Vector_2<K> Vector_2;
-
-    // write matrix M' as [ a, b; b, c ]:
-    const double matrix[3] = { E->matrix(0, 0),   // a
-			       E->matrix(0, 1),   // b
-			       E->matrix(1, 1) }; // c
-    
-    std::pair<Vector_2, Vector_2> eigenvectors; // Note: not neces. normalized.
-    std::pair<double, double>     eigenvalues;  // Note: sorted descendent.
-    internal::eigen_symmetric_2<K>(matrix, eigenvectors, eigenvalues);
-    
-    // normalize eigenvectors:
-    double l1=1.0/std::sqrt(eigenvectors.first.x()*eigenvectors.first.x()+
-			    eigenvectors.first.y()*eigenvectors.first.y());
-    double l2=1.0/std::sqrt(eigenvectors.second.x()*eigenvectors.second.x()+
-			    eigenvectors.second.y()*eigenvectors.second.y());
-    
-    // store axes lengths:
-    lengths_.push_back(std::sqrt(factor/eigenvalues.first));
-    lengths_.push_back(std::sqrt(factor/eigenvalues.second));
-    
-    // store directions:
-    directions_.resize(2);
-    directions_[0].push_back(eigenvectors.first.x()*l1);
-    directions_[0].push_back(eigenvectors.first.y()*l1);
-    directions_[1].push_back(eigenvectors.second.x()*l2);
-    directions_[1].push_back(eigenvectors.second.y()*l2);
-  }
-  
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  compute_axes_3(const double /* alpha */, const double factor)
-  {
-    CGAL_APPEL_ASSERT(d==3);
-
-    // write matrix M' as
-    //
-    //        [ a b c ]
-    //   M' = [ b d e ]
-    //        [ c e f ]
-    //
-    const double matrix[6] = { E->matrix(0, 0),   // a
-			       E->matrix(0, 1),   // b
-			       E->matrix(1, 1),   // d
-			       E->matrix(0, 2),   // c
-			       E->matrix(1, 2),   // e
-			       E->matrix(2, 2) }; // f
-    
-    double eigenvectors[3 * 3]; // Note: not necessarily normalized.
-    double eigenvalues[3];      // Note: sorted descendent.
-    internal::eigen_symmetric<double>(matrix, 3, eigenvectors, eigenvalues);
-    
-    // normalize eigenvectors:
-    double l1 = 1.0/std::sqrt(eigenvectors[0] * eigenvectors[0]+  // x^2
-			      eigenvectors[1] * eigenvectors[1]+  // y^2
-			      eigenvectors[2] * eigenvectors[2]); // z^2
-    double l2 = 1.0/std::sqrt(eigenvectors[3] * eigenvectors[3]+  // x^2
-			      eigenvectors[4] * eigenvectors[4]+  // y^2
-			      eigenvectors[5] * eigenvectors[5]); // z^2
-    double l3 = 1.0/std::sqrt(eigenvectors[6] * eigenvectors[6]+  // x^2
-			      eigenvectors[7] * eigenvectors[7]+  // y^2
-			      eigenvectors[8] * eigenvectors[8]); // z^2
-    
-    // store axes lengths:
-    for (int i=0; i<3; ++i)
-      lengths_.push_back(std::sqrt(factor/eigenvalues[i]));
-    
-    // store directions:
-    directions_.resize(3);
-    directions_[0].push_back(eigenvectors[0]*l1);
-    directions_[0].push_back(eigenvectors[1]*l1);
-    directions_[0].push_back(eigenvectors[2]*l1);
-    directions_[1].push_back(eigenvectors[3]*l2);
-    directions_[1].push_back(eigenvectors[4]*l2);
-    directions_[1].push_back(eigenvectors[5]*l2);
-    directions_[2].push_back(eigenvectors[6]*l3);
-    directions_[2].push_back(eigenvectors[7]*l3);
-    directions_[2].push_back(eigenvectors[8]*l3);
-  }
-
-  template<class Traits>
-  void Approximate_min_ellipsoid_d<Traits>::
-  write_eps(const std::string& name)
-  {
-    CGAL_APPEL_ASSERT(d==2 && !is_degenerate());
-
-    namespace Impl = Approximate_min_ellipsoid_d_impl;
-    Impl::Eps_export_2 epsf(name,2.0);
-    epsf.set_label_mode(Impl::Eps_export_2::None);
-
-    // output the input points:
-    for (unsigned int k=0; k<P.size(); ++k) {
-      C_it pk = tco.cartesian_begin(P[k]);
-      const double u = to_double(*pk++);
-      const double v = to_double(*pk);
-      epsf.write_circle(u,v,0.0);
-    }
-
-    // output center:
-    Center_coordinate_iterator c = center_cartesian_begin();
-    const double cx = *c;
-    const double cy = *++c;
-    epsf.write_circle(cx, cy, 0.0, true); // (Note: last arg says to color.)
-
-    // output axes:
-    Axes_lengths_iterator axes = axes_lengths_begin();
-    const double a1 = *axes;
-    const double a2 = *++axes;
-    Axes_direction_coordinate_iterator d1 = axis_direction_cartesian_begin(0);
-    const double d1_x = *d1;
-    const double d1_y = *++d1;
-    Axes_direction_coordinate_iterator d2 = axis_direction_cartesian_begin(1);
-    const double d2_x = *d2;
-    const double d2_y = *++d2;
-    epsf.write_line(cx, cy, cx+a1*d1_x, cy+a1*d1_y, true);
-    epsf.write_line(cx, cy, cx+a2*d2_x, cy+a2*d2_y, true);
-
-    // output the inscribed ellipse:
-    const double alpha_inv = 1.0/((1+achieved_epsilon())*(d+1));
-    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
-    epsf.write_ellipse(to_double(defining_matrix(0,0)*alpha_inv),
-		       to_double(defining_matrix(1,1)*alpha_inv),
-		       to_double(defining_matrix(0,1)*alpha_inv),
-		       to_double(defining_vector(0)*alpha_inv),
-		       to_double(defining_vector(1)*alpha_inv),
-		       to_double(defining_scalar()*alpha_inv-1.0));
-  }
-
-}
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h
deleted file mode 100644
index 73a12f6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h
+++ /dev/null
@@ -1,666 +0,0 @@
-// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Kaspar Fischer <fischerk at inf.ethz.ch>
-
-// Note: whenever a comment refers to "Khachiyan's paper" then the
-// paper "Rounding of polytopes in the real number model of
-// computation" is ment (Mathematics of Operations Research, Vol. 21,
-// No. 2, May 1996).  Nontheless, most comments refer to the
-// accompanying documentation sheet (and not to the above paper), see
-// the file(s) in documentation/.
-
-#include <numeric>
-
-#include <CGAL/tags.h>
-#include <CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h>
-
-namespace CGAL {
-
-  namespace Appel_impl {
-    
-    // Computes the inverse of the positive definite (dxd)-matrix A
-    // into Ai, by using the Cholesky decomposition of A. All three
-    // iterator template parameters must be random access iterators of
-    // value type FT. The iterator tmp must have d entries.  The
-    // routine returns true in case no errors occurred; false is
-    // returned in case of stability problems or when A is not
-    // positive definite.
-    //
-    // Note: A is destroyed in this process.
-    //
-    // Precondition: A and Ai may point to the same matrix (i.e., might alias).
-    template<typename FT,
-	     typename Tmp_iterator,
-	     typename A_iterator,
-	     typename A_inverse_iterator>
-    bool pd_matrix_inverse(const int d,
-			   A_iterator A,
-			   A_inverse_iterator Ai,
-			   Tmp_iterator tmp)
-    {
-      // I use the following version (in matlab notation) from Walter
-      // Gander's lecture "Ausgleichsrechnung" (ETH Zurich, around 2000, see
-      // http://www.inf.ethz.ch/personal/chinella/education/ausgleich/
-      // Demo2.txt):
-      //
-      //    # compute lower-triangular L s.t. A = LL^T:
-      //    for j=1:d
-      //      v = A(j:d,j) - L(j:d,1:j-1) * L(j,1:j-1)';
-      //      L(j:d,j) = v/sqrt(v(1));
-      //    end;
-      //
-      // Observe that the vector v in this pseudo-code is a
-      // (d-j+1)-vector; we use (the last d-j+1 entries of) the vector
-      // tmp to store v.  (Also, the above program uses one-based
-      // counting, the code below is of course zero-based.)  Note also
-      // that instead of computing the result into L we can as well
-      // overwrite the lower part of A.
-      for (int j=0; j<d; ++j) {
-	// compute new column (v in above pseudo-code):
-	for (int i=j; i<d; ++i) {
-	  FT ll(0);
-	  for (int k=0; k<j; ++k)
-	    ll += A[i+k*d] * A[j+k*d];
-	  tmp[i] = A[i+j*d] - ll;
-	}
-
-	// check regularity:
-	if (tmp[j] <= 0) // todo: epsilon?
-	  return false;
-
-	// overwrite column:
-	const FT scale = FT(1)/std::sqrt(tmp[j]);
-	for (int i=j; i<d; ++i)
-	  A[i+j*d] = tmp[i] * scale;
-      }
-
-      // Now that we have in the lower triangular part of A the
-      // Cholesky decomposition A = LL^T of the original A, we compute
-      // the inverse of A see "Numerical Recipes in C", end of Chapter
-      // 2.9.
-      for (int i=0; i<d; ++i) {
-	A[i+i*d] = FT(1)/A[i+i*d];
-	for (int j=i+1; j<d; ++j) {
-	  FT sum(0);
-	  for (int k=i; k<j; ++k)
-	    sum -= A[j+k*d] * A[k+i*d];
-	  A[j+i*d] = sum/A[j+j*d];
-	}
-      }
-    
-      // Finally, we calculate A^{-1} = (L^{-1})^T L^{-1} into Ai:
-      for (int i=0; i<d; ++i)
-	for (int j=0; j<=i; ++j) {
-
-	  // compute entry (i,j) of A^{-1}:
-	  FT sum(0);
-	  for (int k=i; k<d; ++k)
-	    sum += A[k+i*d] * A[k+j*d];
-	  Ai[i+j*d] = sum;
-
-	  // Since A^{-1} is symmetric, we set:
-	  Ai[j+i*d] = sum;
-	}
-
-      return true;
-    }
-
-  } // end of namespace Appel_impl
-
-  template<bool Embed,class Traits>
-  Khachiyan_approximation<Embed,Traits>::
-  ~Khachiyan_approximation()
-  {
-    CGAL_APPEL_ASSERT_EXPENSIVE(is_valid(false));
-  }
-
-  #ifdef CGAL_APPEL_ASSERTION_MODE
-  template<bool Embed,class Traits>
-  void Khachiyan_approximation<Embed,Traits>::compute_M_of_x()
-  // Computes into t the matrix
-  // 
-  //    M(x) = sum(x_i p_i p_i^T,i=0..(n-1)).
-  //
-  // Complexity: O(n d^2)
-  //
-  // Note: we only use this routine to check assertions.
-  {
-    // erase m:
-    for (int i=0; i<d; ++i)
-      for (int j=0; j<d; ++j)
-	t[i+j*d] = FT(0);
-
-    // evaluate products:
-    for (int k=0; k<n; ++k) {
-      C_it pi = tco.cartesian_begin(*P[k]);
-      for (int i=0; i<d_P; ++i, ++pi) {
-	C_it pj = tco.cartesian_begin(*P[k]);
-	for (int j=0; j<d_P; ++j, ++pj)
-	  t[i+j*d] += x[k] * (*pi) * (*pj);
-	if (Embed)
-	  t[i+d_P*d] += x[k] * (*pi);
-      }
-      if (Embed) {
-	C_it pj = tco.cartesian_begin(*P[k]);
-	for (int j=0; j<d_P; ++j, ++pj)
-	  t[d_P+j*d] += x[k] * (*pj);
-	t[d_P+d_P*d] += x[k];
-      }
-    }
-  }
-  #endif // CGAL_APPEL_ASSERTION_MODE
-
-  template<bool Embed,class Traits>
-  bool Khachiyan_approximation<Embed,Traits>::
-  compute_inverse_of_t_into_mi(const Tag_true /* exact*/)
-  // Note: this routine is not used in CGAL; it turned out that using
-  // exact arithmetic, the algorithm is very slow.
-  {
-    // We need to compute into mi the inverse of the matrix t.  We use
-    // Gauss-Jordan elimination to do this.  So we write t and the
-    // identity matrix I as [I|t] and transform this (by means of row
-    // operations) into a system of the form [N|I].  Then N is the
-    // inverse of t.  Why?  This is like solving a linear system with
-    // several right-hand sides simultaneously by Gauss elimination:
-    // Since the transformations we apply do not change the solution
-    // space of the intermediate systems, we can say: The system t x =
-    // e_j has, for any i in {1,...,d}, the same solution space as I x
-    // = n_i (with n_i being the i-th colum of N); it follows that
-    // x=n_i.
-
-    // store the identity matrix in mi:
-    for (int i=0; i<d; ++i)
-      for (int j=0; j<d; ++j)
-	mi[i+j*d] = FT(i==j? 1 : 0);
-
-    // Since it is not always possible to achieve a final form [*|I]
-    // without row exchanges, we try to get the form [*|P(I)] where
-    // P(I) stands for a permutation of the rows of the matrix I ---
-    // in other words: we want a "1" in every row.  Therefore, we
-    // maintain a integer for every row with the number of the column
-    // into which we placed a "1", or a -1 in case we haven't yet
-    // place a "1" in this row.  Also, we maintain for every column
-    // the number of the row into which we placed the one.
-    std::vector<int> col_with_one(d,-1);
-    std::vector<int> row_with_one(d);
-
-    for (int j=d-1; j>=0; --j) {
-      // In this iteration of the loop we try to make the column j of
-      // m a zero vector with exactly one 1 in an unused place (i.e.,
-      // in a place k for which one_in_row(k) isn't yet true).
-
-      // search for a suitable place k:
-      bool found = false;
-      int k = d-1;
-      for (; k>=0; --k)
-	if (!is_zero(t[k+j*d]) && col_with_one[k]<0) {
-	  found = true;
-	  break;
-	}
-      if (!found)
-	return false;
-      col_with_one[k] = j;
-      row_with_one[j] = k;
-
-      // zero out the entries above and below entry k:
-      for (int i=0; i<d; ++i)
-	if (i != k) {
-	  // we add l times row k to row i:
-	  const FT l = -t[i+j*d]/t[k+j*d];
-	  for (int jj=0; jj<d; ++jj)
-	    mi[i+jj*d] += l*mi[k+jj*d];
-	  for (int jj=0; jj<=j; ++jj)
-	    t[i+jj*d]  += l*t[k+jj*d];
-	}
-
-      // finally, we scale row k to get a one at (k,j):
-      for (int jj=0; jj<d; ++jj)
-	mi[k+jj*d] /= t[k+j*d];
-      for (int jj=0; jj<=j; ++jj)
-	t[k+jj*d] /= t[k+j*d];
-    }
-
-    // At this point we know that for any i in {1,...,d} the system m
-    // x = e_i has the some solution as P(I) x = n_i.  So x =
-    // P(I)^{-1} n_i and it thus suffices to undo the permutation:
-    for (int i=0; i<d; ++i)
-      if (row_with_one[i] != i) {
-	const int repl_row = row_with_one[i];
-	const int col = col_with_one[i];
-	for (int j=0; j<d; ++j)
-	  std::swap(mi[i+j*d],mi[repl_row+j*d]);
-	row_with_one[col] = repl_row;
-	col_with_one[repl_row] = col;
-	row_with_one[i] = col_with_one[i] = i;
-    }
-    return true;
-  }
-
-  template<bool Embed,class Traits>
-  bool Khachiyan_approximation<Embed,Traits>::
-  compute_inverse_of_t_into_mi(const Tag_false /* exact */)
-  {
-    // handle the obvious case when the points cannot span \R^d:
-    if (P.size() <= static_cast<unsigned int>(d))
-      return false;
-
-    return Appel_impl::pd_matrix_inverse<FT>(d,
-					     t.begin(),
-					     mi.begin(),
-					     tmp.begin());
-  }
-
-  template<bool Embed,class Traits>
-  bool Khachiyan_approximation<Embed,Traits>::
-    compute_initial_inverse_from_sum()
-  {
-    // assertions:
-    CGAL_APPEL_ASSERT(is_deg);
-
-    // check number of points:
-    if (n == 0)
-      return false;
-
-    // When this routine is called, the variable sum contains the
-    // matrix sum(p_i p_i^T,i=0...(n-1)), which coincides with n M(x)
-    // for x = (1/n,...,1/n).  Our aim is to compute M(x)^{-1} into
-    // the variable mi and, if the latter matrix exits, to set x to
-    // (1/n,...,1/n).  For this, we first compute M(x) into variable t:
-    const FT invOfn = 1/FT(n);
-    for (int i=0; i<d; ++i)
-      for (int j=0; j<d; ++j)
-	t[i+j*d] = sum[i+j*d] * invOfn;
-
-    if (!compute_inverse_of_t_into_mi(Exact_flag()))
-      return false;
-
-    #ifdef CGAL_APPEL_ASSERTION_MODE
-    // We start with the solution (1/n,...,1/n):
-    for (int k=0; k<n; ++k)
-      x[k] = invOfn;
-    #endif // CGAL_APPEL_ASSERTION_MODE
-
-    // Finally, we compute the excess of P[k] (w.r.t. x) into ex[k]
-    // for all k:
-    ex_max = 0;
-    for (int k=0; k<n; ++k) 
-      if ((ex[k] = excess<FT>(tco.cartesian_begin(*P[k]))) > ex[ex_max])
-	ex_max = k;
-    CGAL_APPEL_LOG("appel","  Largest excess after initialization is " <<
-	      to_double(ex[ex_max]) << "." << "\n");
-    
-    // Accoding to Khachiyam (Lemma 3, eq. (2.20) in "Rounding of
-    // polytopes in the real number model of computation"), the
-    // following eps makes (*) hold:
-    eps = n-1;
-    is_exact_eps_uptodate = false;
-
-    return true;
-  }
-
-  #ifdef CGAL_APPEL_ASSERTION_MODE
-  template<bool Embed,class Traits>
-  typename Traits::FT Khachiyan_approximation<Embed,Traits>::
-    representation_error_of_mi()
-  {
-    using std::abs;
-
-    // If the points are degenerate then the inverse of M(x) doesn't
-    // exist, and so we exit immediately:
-    if (is_deg)
-      return FT(0);
-
-    // compute M(x) into the matrix represented by t:
-    compute_M_of_x();
-
-    // compute mi times the matrix M(x) (which should give the
-    // identity matrix):
-    FT max_error(0);
-    for (int i=0; i<d; ++i)
-      for (int j=0; j<d; ++j) {
-	
-	// compute element (i,j) of the product of m and M(x):
-	FT v(0);
-	for (int k=0; k<d; ++k)
-	  v += t[i+k*d] * mi[k+j*d];
-	
-	// check it:
-	const FT exact(i == j? 1 : 0);
-	max_error = (std::max)(max_error,std::abs(v-exact));
-      }
-
-    // update statistics:
-    #ifdef CGAL_APPEL_STATS_MODE
-    max_error_m_all = (std::max)(max_error,max_error_m_all);
-    max_error_m = max_error;
-    #endif
-    CGAL_APPEL_LOG("appel","  The represenation error in m is: " <<
-	      to_double(max_error) << (max_error == FT(0)?
-              " (zero)" : "") << "." << "\n");
-    
-    return max_error;
-  }
-  #endif // CGAL_APPEL_ASSERTION_MODE
-
-  template<bool Embed,class Traits>
-  void Khachiyan_approximation<Embed,Traits>::rank_1_update(int k,
-							    const FT& tau)
-  {
-    // check preconditions:
-    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || tau == eps/((1+eps)*d-1));
-    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || 
-		      excess<ET>(tco.cartesian_begin(*P[k])) == (1+eps)*d);
-    
-    const FT mu = eps / ((d-1)*(1+eps));
-    const FT alpha = 1 + mu;
-    const FT beta = mu / (1+eps);
-
-    // compute into tmp the vector M(x)^{-1} p_k:
-    for (int i=0; i<d; ++i) { // loop to determine tmp[i]
-      tmp[i] = FT(0);
-      C_it pk = tco.cartesian_begin(*P[k]);
-      for (int j=0; j<d_P; ++j, ++pk)
-	tmp[i] += (*pk) * mi[i+j*d];
-      if (Embed)
-	tmp[i] += mi[i+d_P*d];
-    }
-
-    // We need to scale the current matrix m by alpha and add to it
-    // the matrix (tmp tmp^T) times -beta:
-    for (int i=0; i<d; ++i)
-      for (int j=0; j<d; ++j) {
-	mi[i+j*d] *= alpha;
-	mi[i+j*d] -= beta * tmp[i]*tmp[j];
-      }
-
-    // Update ex[k]: We need to scale ex[k] by alpha and subtract from
-    // it beta (p_k^T tmp)^2:
-    ex_max = 0;
-    for (int k=0; k<n; ++k) {
-      
-      // compute gamma = (p_k^T tmp)^2:
-      FT gamma(0);
-      C_it pk = tco.cartesian_begin(*P[k]);
-      for (int i=0; i<d_P; ++i, ++pk)
-	gamma += tmp[i] * (*pk);
-      if (Embed)
-	gamma += tmp[d_P];
-      gamma *= gamma;
-      
-      // update ex[k]:
-      ex[k] *= alpha;
-      ex[k] -= beta*gamma;
-
-      // remember the largest so far:
-      if (ex[k] > ex[ex_max])
-	ex_max = k;
-    }
-
-    // check postcondition:
-    #ifdef CGAL_APPEL_EXP_ASSERTION_MODE
-    representation_error_of_mi();
-    #endif // CGAL_APPEL_EXP_ASSERTION_MODE
-  }
-
-  template<bool Embed,class Traits>
-  bool Khachiyan_approximation<Embed,Traits>::improve(const double desired_eps)
-  {
-    // Take the smallest eps s.t. (excess(p_m) =) p_m^T M(x)^{-1} p_m <=
-    // (1+eps) d holds for all m in {1,...,n}:
-    eps = ex[ex_max]/d - 1;
-    is_exact_eps_uptodate = false;
-    
-    CGAL_APPEL_LOG("appel","  The current eps is: " << to_double(eps) << "\n");
-    
-    // check if we have already reached an acceptable eps:
-    if (eps <= desired_eps) // numerics say we're ready to stop...
-      if (exact_epsilon() <= desired_eps) // ... and if it's o.k, we stop
-        // Note: if FT is inexact, exact_epsilon() may return a
-        // negative number here, which we will interpret as the input
-        // points being degenerate.
-	return true;
-
-    // We optimize along the line
-    //
-    //   x' = (1 - tau) x + tau e_{ex_max},
-    //
-    // i.e., we replace our current solution x with x' for the value
-    // tau which minimizes the objective function on this line.  It
-    // turns out that the minimum is attained at tau = eps/((1+eps)d-1)
-    // which then equals tau = eps/(largest_excess-1).
-    const FT tau = eps / (ex[ex_max] - 1);
-
-    #ifdef CGAL_APPEL_ASSERTION_MODE
-    // replace x by x':
-    for (int i=0; i<n; ++i)
-      x[i] = (1-tau)*x[i];
-    x[ex_max] += tau;
-    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) ||
-		      std::accumulate(x.begin(),x.end(),FT(0)) == FT(1));
-    #endif // CGAL_APPEL_ASSERTION_MODE
-
-    // recompute the inverse m of M(x) (where x is our new x') and
-    // update the excesses in the array ex:
-    rank_1_update(ex_max,tau);
-
-    return false;
-  }
-
-  template<bool Embed,class Traits>
-  double Khachiyan_approximation<Embed,Traits>::exact_epsilon(bool recompute)
-  {
-    CGAL_APPEL_ASSERT(!is_deg);
-
-    // return cached result, if possible:
-    if (!recompute && is_exact_eps_uptodate)
-      return eps_exact;
-
-    // find max p_i^T M(x)^{-1} p_i:
-    ET max = 0;
-    for (int i=0; i<n; ++i)
-      max = (std::max)(max, excess<ET>(tco.cartesian_begin(*P[i])));
-
-    // compute (using exact arithmetic) epsilon via (*):
-    typedef CGAL::Quotient<ET> QET;
-    QET eps_e = QET(max,d)-1;
-    eps_exact = CGAL::to_interval(eps_e).second;
-
-    // debugging output:
-    CGAL_APPEL_LOG("appel",
-		   "Exact epsilon is " << eps_e << " (rounded: " <<
-		   eps_exact << ")." << "\n");
-    
-    // check whether eps is negative (which under exact arithmetic is
-    // not possible, and which we will take as a sign that the input
-    // points are degenerate):
-    if (CGAL::is_negative(eps_e)) {
-      CGAL_APPEL_LOG("appel", "Negative Exact epsilon -> degenerate!" << "\n");
-      is_deg = true;
-    }
-
-    is_exact_eps_uptodate = true;
-    return eps_exact;
-  }
-
-  template<bool Embed,class Traits>
-  bool Khachiyan_approximation<Embed,Traits>::is_valid(bool verbose)
-  {
-    // debugging output:
-    if (verbose) {
-      CGAL_APPEL_IF_STATS(
-        std::cout << "The overall error in the matrix inverse is:   " 
-	          << max_error_m_all << "." << "\n");
-    }
-
-    // handle degenerate case:
-    if (is_deg)
-      return true;
-
-    // check Eq. (*) for the exact epsilon:
-    const double epsilon = exact_epsilon(true);
-    const ET     ratio   = (ET(epsilon)+1)*d;
-    for (int i=0; i<n; ++i)
-      if (excess<ET>(tco.cartesian_begin(*P[i])) > ratio) {
-	CGAL_APPEL_LOG("appel","ERROR: Eq. (*) violated." << "\n");
-	return false;
-      }
-
-    return true;
-  }
-
-  template<bool Embed,class Traits>
-  template<typename Iterator>
-  bool Khachiyan_approximation<Embed,Traits>::
-  compute_inverse_of_submatrix(Iterator inverse)
-  {
-    CGAL_APPEL_ASSERT(!is_deg);
-
-    // copy matrix to destination:
-    for (int i=0; i<d-1; ++i)
-      for (int j=0; j<d-1; ++j)
-	inverse[i+j*(d-1)] = mi[i+j*d];
-
-    // solve in place:
-    return Appel_impl::pd_matrix_inverse<FT>(d-1, inverse,
-					     inverse, tmp.begin());
-  }
-  
-  template<bool Embed,class Traits>
-  void Khachiyan_approximation<Embed,Traits>::print(std::ostream& o)
-  {
-    #ifdef CGAL_APPEL_ASSERTION_MODE
-    o << "xsol := [ ";
-    for (int k=0; k<n; ++k) {
-      o << x[k];
-      if (k<n-1)
-	o << ",";
-    }
-    o << "];" << "\n\n";
-    #endif // CGAL_APPEL_ASSERTION_MODE
-
-    o << "Mi:= matrix([" << "\n";
-    for (int i=0; i<d; ++i) {
-      o << " [ ";
-      for (int j=0; j<d; ++j) {
-	o << mi[i+j*d];
-	if (j<d-1)
-	  o << ",";
-      }
-      o << "]";
-      if (i<d-1)
-	o << ",";
-      o << "\n";
-    }
-    o << "]);" << "\n";
-
-    o << "S:= matrix([" << "\n";
-    for (int i=0; i<d; ++i) {
-      o << " [ ";
-      for (int j=0; j<d; ++j) {
-	o << sum[i+j*d];
-	if (j<d-1)
-	  o << ",";
-      }
-      o << "]";
-      if (i<d-1)
-	o << ",";
-      o << "\n";
-    }
-    o << "]);" << "\n";
-
-    o << "M:= matrix([" << "\n";
-    for (int i=0; i<d; ++i) {
-      o << " [ ";
-      for (int j=0; j<d; ++j) {
-	o << t[i+j*d];
-	if (j<d-1)
-	  o << ",";
-      }
-      o << "]";
-      if (i<d-1)
-	o << ",";
-      o << "\n";
-    }
-    o << "]);" << "\n";
-  }
-  
-  template<bool Embed,class Traits>
-  int Khachiyan_approximation<Embed,Traits>::write_eps() const
-  {
-    CGAL_APPEL_ASSERT(d == 2 && !Embed);
-    static int id = 0;
-
-    namespace Impl = Approximate_min_ellipsoid_d_impl;
-    // (Using "Impl::tostr(id)" in the following doesn't work on GCC 2.95.2.)
-    Impl::Eps_export_2 epsf(Approximate_min_ellipsoid_d_impl::tostr(id)+".eps",
-                            100.0);
-    epsf.set_label_mode(Impl::Eps_export_2::None);
-
-    // output the input points:
-    for (int k=0; k<n; ++k) {
-      C_it pk = tco.cartesian_begin(*P[k]);
-      const double u = to_double(*pk++);
-      const double v = to_double(*pk);
-      epsf.write_circle(u,v,0.0);
-    }
-
-    // output the inscribed ellipse:
-    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
-    epsf.write_cs_ellipse(to_double(mi[0+0*d]),
-			  to_double(mi[1+1*d]),
-			  to_double(mi[1+0*d]));
-
-    // Output the approximation of the minellipse: Since the relaxed
-    // optimality conditions (*) hold, 
-    //
-    //      p_i^T M(x)^{-1} p_i <= (1+eps) d,
-    // 
-    // we can divide by a:=(1+eps)d to get
-    //
-    //     p_i^T M(x)^{-1}/a p_i <= 1,
-    //
-    // which means that all points lie in the ellipsoid defined by the
-    // matrix M(x)^{-1}/alpha.
-    const FT a = (1+eps)*d;
-    for (int k=0; k<n; ++k) {
-      // compute M(x)^{-1}/alpha p_k into vector tmp:
-      for (int i=0; i<d; ++i) { // loop to determine tmp[i]
-	tmp[i] = FT(0);
-	C_it pk = tco.cartesian_begin(*P[k]);
-	for (int j=0; j<d; ++j, ++pk)
-	  tmp[i] += (*pk) * mi[i+j*d];
-      }
-
-      // calculate p^T tmp:
-      FT result(0);
-      C_it pk = tco.cartesian_begin(*P[k]);
-      for (int i=0; i<d; ++i, ++pk)
-	result += (*pk) * tmp[i];
-    }
-
-    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
-    epsf.set_label("E2");
-    epsf.write_cs_ellipse(to_double(mi[0+0*d]/a),
-			  to_double(mi[1+1*d]/a),
-			  to_double(mi[1+0*d]/a));
-    
-    return id++;
-  }
-
-}
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_Bezier_curve_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_Bezier_curve_traits_2.h
deleted file mode 100644
index adaf5f5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_Bezier_curve_traits_2.h
+++ /dev/null
@@ -1,826 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// 
-// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
-//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
-
-#ifndef CGAL_ARR_BEZIER_CURVE_TRAITS_2_H
-#define CGAL_ARR_BEZIER_CURVE_TRAITS_2_H
-
-/*! \file
- * Definition of the Arr_Bezier_curve_traits_2 class. 
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_geometry_traits/Bezier_curve_2.h>
-#include <CGAL/Arr_geometry_traits/Bezier_point_2.h>
-#include <CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h>
-#include <CGAL/Arr_geometry_traits/Bezier_cache.h>
-#include <CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h>
-
-namespace CGAL {
-
-/*! \class
- * A traits class for maintaining an arrangement of Bezier curves with
- * rational control points.
- *
- * The class is templated with four parameters: 
- * Rat_kernel A kernel that defines the type of control points.
- * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
- *            for the coordinates of arrangement vertices and is used to
- *            represent algebraic numbers.
- * Nt_traits A number-type traits class. This class defines the Rational
- *           number type (should be the same as Rat_kernel::FT) and the
- *           Algebraic number type (should be the same as Alg_kernel::FT)
- *           and supports various operations on them.
- * Bounding_traits A traits class for filtering the exact computations.
- *                 By default we use the rational bounding traits.
- */
-template <class RatKernel_, class AlgKernel_, class NtTraits_,
-          class BoundingTraits_ = Bezier_bounding_rational_traits<RatKernel_> >
-class Arr_Bezier_curve_traits_2 
-{
-public:
-
-  typedef RatKernel_                             Rat_kernel;
-  typedef AlgKernel_                             Alg_kernel;
-  typedef NtTraits_                              Nt_traits;
-  typedef BoundingTraits_                        Bounding_traits;
-  typedef Arr_Bezier_curve_traits_2<Rat_kernel,
-                                    Alg_kernel,
-                                    Nt_traits,
-                                    Bounding_traits>   Self;
- 
-  typedef typename Nt_traits::Integer            Integer;
-  typedef typename Rat_kernel::FT                Rational;
-  typedef typename Alg_kernel::FT                Algebraic;
-
-  typedef typename Rat_kernel::Point_2           Rat_point_2;
-  typedef typename Alg_kernel::Point_2           Alg_point_2;
-  
-  // Category tags:
-  typedef Tag_true                               Has_left_category;
-  typedef Tag_true                               Has_merge_category;
-  typedef Tag_false                              Has_do_intersect_category;
-
-  typedef Arr_oblivious_side_tag                 Left_side_category;
-  typedef Arr_oblivious_side_tag                 Bottom_side_category;
-  typedef Arr_oblivious_side_tag                 Top_side_category;
-  typedef Arr_oblivious_side_tag                 Right_side_category;
-
-  // Traits-class types:
-  typedef _Bezier_curve_2<Rat_kernel,
-                          Alg_kernel,
-                          Nt_traits,
-                          Bounding_traits>             Curve_2;
-
-  typedef _Bezier_x_monotone_2<Rat_kernel,
-                               Alg_kernel,
-                               Nt_traits,
-                               Bounding_traits>        X_monotone_curve_2;
-
-  typedef _Bezier_point_2<Rat_kernel,
-                          Alg_kernel,
-                          Nt_traits,
-                          Bounding_traits>             Point_2;
-
-  typedef typename X_monotone_curve_2::Multiplicity    Multiplicity;
-
-
-  // Type definition for the vertical-tangnecy and intersection point cache.
-  typedef _Bezier_cache<Nt_traits>                     Bezier_cache;
-
-private:
-
-  // Type definition for the bounded intersection points mapping.
-  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
-
-  // Data members:
-  mutable Bezier_cache * p_cache;         /*!< Caches vertical tangency points
-                                           * and intersection points that have
-                                           * been computed in an exact manner.
-                                           */
-  mutable Intersection_map * p_inter_map; /*!< Maps curve pairs to their
-                                           * intersection points.
-                                           */
-  bool m_owner;                           /*!< Does this instance own its cache
-                                           * and map structures.
-                                           */
-
-public:
-
-  /// \name Construction.
-  //@{
-
-  /*! Default constructor. */
-  Arr_Bezier_curve_traits_2 ()
-  {
-    p_cache = new Bezier_cache;
-    p_inter_map = new Intersection_map;
-    m_owner = true;
-  }
-
-  /*! Copy constructor. */
-  Arr_Bezier_curve_traits_2 (const Self& tr) :
-    p_cache (tr.p_cache),
-    p_inter_map (tr.p_inter_map),
-    m_owner (false)
-  {}
-
-  /*! Assignmnet operator. */
-  Self& operator= (const Self& tr)
-  {
-    if (this == &tr)
-      return (*this);
-
-    p_cache = tr.p_cache;
-    p_inter_map = tr.p_inter_map;
-    m_owner = false;
-    return (*this);
-  }
-
-  /*! Destructor. */
-  ~Arr_Bezier_curve_traits_2 ()
-  {
-    if (m_owner)
-    {
-      delete p_cache;
-      delete p_inter_map;
-    }
-    p_cache = NULL;
-    p_inter_map = NULL;
-  }
-  //@}
-
-  /// \name Functor definitions for the arrangement traits.
-  //@{
-
-  /*! \class Compare_x_2
-   * The Compare_x_2 functor.
-   */
-  class Compare_x_2
-  {
-  private:
-    const Bezier_cache   *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Compare_x_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      return (p1.compare_x (p2,
-                            const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return (Compare_x_2 (p_cache));
-  }
-
-  /*! \class Compare_xy_2
-   * The Compare_xy_2 functor.
-   */
-  class Compare_xy_2
-  {
-  private:
-    const Bezier_cache   *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Compare_xy_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Compares two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      return (p1.compare_xy (p2,
-                             const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return (Compare_xy_2 (p_cache));
-  }
-
-  /*! \class Construct_min_vertex_2
-   * The Construct_min_vertex_2 functor.
-   */
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The left endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.left());
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  /*! \class Construct_max_vertex_2
-   * The Construct_max_vertex_2 functor.
-   */
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.right());
-    }
-  };
-
-  /*! Get a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  /*! \class Is_vertical_2
-   * The Is_vertical_2 functor.
-   */
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.is_vertical());
-    }
-  };
-
-  /*! Get an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object () const
-  {
-    return Is_vertical_2();
-  }
-
-  /*! \class Compare_y_at_x_2
-   * The Compare_y_at_x_2 functor.
-   */
-  class Compare_y_at_x_2
-  {
-  private:
-    const Bezier_cache   *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Compare_y_at_x_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator() (const Point_2& p,
-                                  const X_monotone_curve_2& cv) const
-    {
-      return (cv.point_position (p, 
-                                 const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return (Compare_y_at_x_2 (p_cache));
-  }
-
-  /*! \class Compare_y_at_x_left_2
-   * The Compare_y_at_x_left_2 functor.
-   */
-  class Compare_y_at_x_left_2
-  {
-  private:
-    const Bezier_cache   *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Compare_y_at_x_left_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      return (cv1.compare_to_left (cv2, p,
-                                   const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
-  {
-    return (Compare_y_at_x_left_2 (p_cache));
-  }
-
-  /*! \class Compare_y_at_x_right_2
-   * The Compare_y_at_x_right_2 functor.
-   */
-  class Compare_y_at_x_right_2
-  {
-  private:
-    const Bezier_cache   *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Compare_y_at_x_right_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      return (cv1.compare_to_right (cv2, p,
-                                    const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return (Compare_y_at_x_right_2 (p_cache));
-  }
-
-  /*! \class Equal_2
-   * The Equal_2 functor.
-   */
-  class Equal_2
-  {
-  private:
-    const Bezier_cache         *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Equal_2 (const Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Check if the two x-monotone curves are the same (have the same graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      return (cv1.equals (cv2,
-                          const_cast<Bezier_cache&> (*p_cache)));
-    }
-
-    /*!
-     * Check if the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      return (p1.equals (p2,
-                         const_cast<Bezier_cache&> (*p_cache)));
-    }
-  };
-
-  /*! Get an Equal_2 functor object. */
-  Equal_2 equal_2_object () const
-  {
-    return (Equal_2 (p_cache));
-  }
-
-  /*! \class Make_x_monotone_2
-   * The Make_x_monotone_2 functor.
-   */
-  class Make_x_monotone_2
-  {
-  private:
-    Bezier_cache         *p_cache;
-
-  public:
-
-    /*! Constructor. */
-    Make_x_monotone_2 (Bezier_cache *cache) :
-      p_cache (cache)
-    {}
-
-    /*!
-     * Cut the given Bezier curve into x-monotone subcurves and insert them
-     * into the given output iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object. The returned
-     *           objects is a wrapper for an X_monotone_curve_2 object.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const Curve_2& B, OutputIterator oi)
-    {
-      typedef typename Bounding_traits::Vertical_tangency_point
-                                                Vertical_tangency_point;
-
-      // Try to compute the bounds of the vertical tangency points.
-      Bounding_traits                           bound_tr;
-      typename Bounding_traits::Control_points  cpts;
-      std::list<Vertical_tangency_point>        vpt_bounds;
-
-      std::copy (B.control_points_begin(), B.control_points_end(),
-                 std::back_inserter(cpts));
-
-      bound_tr.compute_vertical_tangency_points
-          (cpts, std::back_inserter (vpt_bounds));
-
-      // Construct Point_2 from bounded tangency points.
-      std::list<Point_2>                            vpts;
-      bool                                          app_ok = true;
-      typename std::list<Vertical_tangency_point>::const_iterator iter;
-
-      for (iter = vpt_bounds.begin(); iter != vpt_bounds.end(); ++iter)
-      {
-        const typename Bounding_traits::Bez_point_bound& bound = iter->bound;
-        const typename Bounding_traits::Bez_point_bbox&  bbox = iter->bbox;
-
-        if (! bound.can_refine)
-        {
-          // If we cannot refine the vertical-tangency bound anymore, then
-          // we failed to bound the vertical tangency point.
-          // \todo In the future, we might want to use the info.
-          app_ok = false;
-          break;
-        }
-
-        // Construct an approximate vertical tangency point.
-        Point_2   pt;
-
-        if (bound.type == Bounding_traits::Bez_point_bound::RATIONAL_PT)
-        {
-          CGAL_assertion (CGAL::compare (bound.t_min, bound.t_max) == EQUAL); 
-          Rational  t0 = bound.t_min;
-
-          pt = Point_2 (B, t0);
-        }
-        else
-        {
-          pt.add_originator (typename Point_2::Originator(B, bound));
-        }
-        pt.set_bbox (bbox);
-
-        vpts.push_back(pt);
-      }
-
-      // If bounding the approximated vertical-tangency points went fine,
-      // use these points as endpoint for the x-monotone subcurves.
-      if (app_ok)
-      {
-        // Create the x-monotone subcurves with approximate endpoints.
-        typename std::list<Point_2>::const_iterator pit;
-        Point_2       p0(B, Rational(0)); // A rational start point.
-        unsigned int  xid = 1;            // Serial number of the subcurve.
-
-        for (pit = vpts.begin(); pit != vpts.end(); ++pit)
-        {
-          *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
-                                                         p0, *pit,
-                                                         *p_cache));
-          xid++;
-          p0 = *pit;
-        }
-
-        Point_2    p1(B, Rational(1)); // A rational end point.
-
-        *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
-                                                       p0, p1,
-                                                       *p_cache));
-        return (oi);
-      }
-
-      // If we reached here then we have to compute the vertical-tangency
-      // points in an exact manner. We do this by considering all t-values
-      // on B(t) = (X(t), Y(t)), such that X'(t) = 0.
-      const typename Bezier_cache::Vertical_tangency_list&
-        vt_list = p_cache->get_vertical_tangencies (B.id(),
-                                                    B.x_polynomial(),
-                                                    B.x_norm());
-
-      // Create the x-monotone subcurves.
-      Point_2                                        p0 (B, Rational(0));
-      Point_2                                        p1;
-      typename Bezier_cache::Vertical_tangency_iter  it;
-      unsigned int  xid = 1;            // Serial number of the subcurve.
-
-      for (it = vt_list.begin(); it != vt_list.end(); ++it)
-      {
-        p1 = Point_2 (B, *it);
-        *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
-                                                       p0, p1,
-                                                       *p_cache));
-        xid++;
-        p0 = p1;
-      }
-
-      // Create the final subcurve.
-      p1 = Point_2 (B, Rational(1));
-      *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
-                                                     p0, p1,
-                                                     *p_cache));
-      return (oi);
-    }
-  };
-
-  /*! Get a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object () const
-  {
-    return (Make_x_monotone_2 (p_cache));
-  }
-
-  /*! \class Split_2
-   * The Split_2 functor.
-   */
-  class Split_2
-  {
-  public:
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      cv.split (p, c1, c2);
-      return;
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2();
-  }
-
-  /*! \class Intersect_2
-   * The Intersect_2 functor.
-   */
-  class Intersect_2
-  {
-  private:
-    Bezier_cache         *p_cache;
-    Intersection_map     *p_imap;
-
-  public:
-
-    /*! Constructor. */
-    Intersect_2 (Bezier_cache *cache, Intersection_map *imap) :
-      p_cache (cache),
-      p_imap (imap)
-    {}
-
-    /*!
-     * Find the intersections of the two given curves and insert them to the
-     * given output iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi)
-    {
-      return (cv1.intersect (cv2, *p_imap, *p_cache, oi));
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return (Intersect_2 (p_cache, p_inter_map));
-  }
-
-  /*! \class Are_mergeable_2
-   * The Are_mergeable_2 functor.
-   */
-  class Are_mergeable_2
-  {
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable - if they are supported
-     *         by the same line and share a common endpoint; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      return (cv1.can_merge_with (cv2));
-    }
-  };
-
-  /*! Get an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object () const
-  {
-    return Are_mergeable_2();
-  }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2
-  {
-    typedef Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
-                                      Nt_traits, Bounding_traits>       Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
-                                           Nt_traits, Bounding_traits>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve (segment).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2,
-                     X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-      
-      c = cv1.merge (cv2);
-      return;
-    }
-  };
-
-  /*! Get a Merge_2 functor object. */
-  Merge_2 merge_2_object () const
-  {
-    return Merge_2(this);
-  }
-
-  //@}
-
-  /// \name Functor definitions for the Boolean set-operation traits.
-  //@{
-
-  /*! \class Compare_endpoints_xy_2
-   * The Compare_endpoints_xy_2 functor.
-   */
-  class Compare_endpoints_xy_2
-  {
-  public:
-
-    /*!
-     * Compare the endpoints of an $x$-monotone curve lexicographically.
-     * (assuming the curve has a designated source and target points).
-     * \param cv The curve.
-     * \return SMALLER if the curve is directed right;
-     *         LARGER if the curve is directed left.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv)
-    {
-      if (cv.is_directed_right())
-        return (SMALLER);
-      else
-        return (LARGER);
-    }
-  };
-
-  /*! Get a Compare_endpoints_xy_2 functor object. */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-
-  /*! \class Construct_opposite_2
-   * The Construct_opposite_2 functor.
-   */
-  class Construct_opposite_2
-  {
-  public:
-
-    /*!
-     * Construct an opposite x-monotone curve (with swapped source and target).
-     * \param cv The curve.
-     * \return The opposite curve.
-     */
-    X_monotone_curve_2 operator() (const X_monotone_curve_2& cv)
-    {
-      return (cv.flip());
-    }
-  };
-
-  /*! Get a Construct_opposite_2 functor object. */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  }
-
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_accessor.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_accessor.h
deleted file mode 100644
index 1f903b7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_accessor.h
+++ /dev/null
@@ -1,874 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-//                 Efi Fogel         <efif at post.tau.ac.il>
-
-#ifndef CGAL_ARR_ACCESSOR_H
-#define CGAL_ARR_ACCESSOR_H
-
-/*! \file
- * Definition of the Arr_accessor<Arrangement> class.
- */
-
-#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
-
-namespace CGAL {
-
-/*! \class
- * A class that provides access to some of the internal arrangement operations.
- * Used mostly by the global insertion functions and by the sweep-line visitors
- * for utilizing topological and geometrical information available during the
- * algorithms they perform.
- * The Arrangement parameter corresponds to an arrangement instantiation
- * (of the template Arrangement_on_surface_2).
- */
-template <typename Arrangement_>
-class Arr_accessor {
-public:
-  typedef Arrangement_                                  Arrangement_2;
-  typedef Arr_accessor<Arrangement_2>                   Self;
-
-  typedef typename Arrangement_2::Size                  Size;
-  typedef typename Arrangement_2::Point_2               Point_2;
-  typedef typename Arrangement_2::X_monotone_curve_2    X_monotone_curve_2;
-
-  typedef typename Arrangement_2::Vertex_handle         Vertex_handle;
-  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
-  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
-  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
-  typedef typename Arrangement_2::Face_handle           Face_handle;
-  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
-  typedef typename Arrangement_2::Ccb_halfedge_circulator
-                                                        Ccb_halfedge_circulator;
-
-private:
-  typedef typename Arrangement_2::DVertex               DVertex;
-  typedef typename Arrangement_2::DHalfedge             DHalfedge;
-  typedef typename Arrangement_2::DFace                 DFace;
-  typedef typename Arrangement_2::DOuter_ccb            DOuter_ccb;
-  typedef typename Arrangement_2::DInner_ccb            DInner_ccb;
-  typedef typename Arrangement_2::DIso_vertex           DIso_vertex;
-
-private:
-  Arrangement_2* p_arr;           // The associated arrangement.
-
-public:
-
-  /*! Constructor with an associated arrangement. */
-  Arr_accessor(Arrangement_2& arr) : p_arr(&arr) {}
-
-  /* Get the arrangement. */
-  Arrangement_2& arrangement() { return (*p_arr); }
-
-  /* Get the arrangement (const version). */
-  const Arrangement_2& arrangement() const { return (*p_arr); }
-
-  /// \name Accessing the notification functions (for the global functions).
-  //@{
-
-  /*! Notify that a global operation is about to take place. */
-  void notify_before_global_change() { p_arr->_notify_before_global_change(); }
-
-  /*! Notify that a global operation was completed. */
-  void notify_after_global_change() { p_arr->_notify_after_global_change(); }
-  //@}
-
-  /// \name Local operations and predicates for the arrangement.
-  //@{
-
-  /*!
-   * Locate the arrangement feature that contains the given curve-end.
-   * \param cv The curve.
-   * \param ind ARR_MIN_END if we refer to cv's minimal end;
-   *            ARR_MAX_END if we refer to its maximal end.
-   * \param ps_x The boundary condition in x.
-   * \param ps_y The boundary condition in y.
-   * \pre The relevant end of cv has boundary conditions in x or in y.
-   * \return An object that contains the curve end.
-   *         This object may wrap a Face_const_handle (the general case),
-   *         or a Halfedge_const_handle (in case of an overlap).
-   */
-  CGAL::Object locate_curve_end(const X_monotone_curve_2& cv,
-                                Arr_curve_end ind,
-                                Arr_parameter_space ps_x,
-                                Arr_parameter_space ps_y) const
-  {
-    CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
-
-    // Use the topology traits to locate the unbounded curve end.
-    CGAL::Object obj =
-      p_arr->topology_traits()->locate_curve_end(cv, ind, ps_x, ps_y);
-
-    // Return a handle to the DCEL feature.
-    DFace* f;
-    if (CGAL::assign(f, obj))
-      return (CGAL::make_object(p_arr->_const_handle_for(f)));
-
-    DHalfedge* he;
-    if (CGAL::assign(he, obj))
-      return (CGAL::make_object(p_arr->_const_handle_for(he)));
-
-    DVertex* v;
-    if (CGAL::assign(v, obj))
-      return (CGAL::make_object(p_arr->_const_handle_for(v)));
-
-    // We should never reach here:
-    CGAL_error();
-    return Object();
-  }
-
-  /*!
-   * Locate the place for the given curve around the given vertex.
-   * \param vh A handle for the arrangement vertex.
-   * \param cv The given x-monotone curve.
-   * \pre v is one of cv's endpoints.
-   * \return A handle for a halfedge whose target is v, where cv should be
-   *         inserted between this halfedge and the next halfedge around this
-   *         vertex (in a clockwise order).
-   */
-  Halfedge_handle locate_around_vertex(Vertex_handle vh,
-                                       const X_monotone_curve_2& cv) const
-  {
-    typedef
-      Arr_traits_basic_adaptor_2<typename Arrangement_2::Geometry_traits_2>
-      Traits_adaptor_2;
-
-    const Traits_adaptor_2* m_traits = 
-      static_cast<const Traits_adaptor_2*> (p_arr->geometry_traits());
-
-    Arr_curve_end ind = ARR_MIN_END;
-
-    if (m_traits->is_closed_2_object() (cv, ARR_MAX_END) &&
-        m_traits->equal_2_object()
-        (vh->point(), m_traits->construct_max_vertex_2_object()(cv)))
-    {
-      ind = ARR_MAX_END;
-    }
-
-    DHalfedge* he = p_arr->_locate_around_vertex(p_arr->_vertex (vh), cv, ind);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for (he));
-  }
-
-  /*!
-   * Locate the place for the given curve-end around the given vertex,
-   * which lies on the boundary.
-   * \param vh A handle for the arrangement vertex.
-   * \param cv The curve.
-   * \param ind ARR_MIN_END if we refer to cv's minimal end;
-   *            ARR_MAX_END if we refer to its maximal end.
-   * \param ps_x The boundary condition in x.
-   * \param ps_y The boundary condition in y.
-   * \pre The relevant end of cv has boundary conditions in x or in y.
-   * \return A handle for a halfedge whose target is v, where cv should be
-   *         inserted between this halfedge and the next halfedge around this
-   *         vertex (in a clockwise order).
-   */
-  Halfedge_handle
-      locate_around_boundary_vertex(Vertex_handle vh,
-                                    const X_monotone_curve_2& cv,
-                                    Arr_curve_end ind,
-                                    Arr_parameter_space ps_x,
-                                    Arr_parameter_space ps_y) const
-  {
-    CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
-
-    // Use the topology traits to locate the unbounded curve end.
-    DHalfedge* he = p_arr->topology_traits()->
-      locate_around_boundary_vertex(p_arr->_vertex (vh), cv, ind, ps_x, ps_y);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for (he));
-  }
-
-  /*!
-   * Compute the distance (in halfedges) between two halfedges.
-   * \param e1 A handle for the source halfedge.
-   * \param e2 A handle for the destination halfedge.
-   * \return In case e1 and e2 belong to the same connected component, the 
-   *         function returns number of boundary halfedges between the two 
-   *         halfedges. Otherwise, it returns (-1).
-   */
-  int halfedge_distance(Halfedge_const_handle e1,
-                        Halfedge_const_handle e2) const
-  {
-    // If the two halfedges do not belong to the same component, return (-1).
-    const DHalfedge* he1 = p_arr->_halfedge(e1);
-    const DHalfedge* he2 = p_arr->_halfedge(e2);
-    
-    if (he1 == he2) return (0);
-
-    const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
-    const DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
-    const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
-    const DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
-
-    if ((oc1 != oc2) || (ic1 != ic2)) return (-1);
-
-    // Compute the distance between the two halfedges.
-    unsigned int dist = p_arr->_halfedge_distance(he1, he2);
-    return (static_cast<int>(dist));
-  }
-
-  /*!
-   * Determine whether a given query halfedge lies in the interior of a new
-   * face we are about to create, by connecting it with another halfedge
-   * using a given x-monotone curve.
-   * \param prev1 A handle for the query halfedge.
-   * \param prev2 The other halfedge we are about to connect with prev1.
-   * \param cv The x-monotone curve we use to connect prev1 and prev2.
-   * \pre prev1 and prev2 belong to the same connected component, and by
-   *      connecting them using cv we form a new face.
-   * \return (true) if prev1 lies in the interior of the face we are about
-   *         to create, (false) otherwise - in which case prev2 must lie
-   *         inside this new face.
-   */
-  bool defines_outer_ccb_of_new_face(Halfedge_handle prev1,
-                                     Halfedge_handle prev2,
-                                     const X_monotone_curve_2& cv) const
-  {
-    return (p_arr->_defines_outer_ccb_of_new_face(p_arr->_halfedge (prev1),
-                                                  p_arr->_halfedge (prev2),
-                                                  cv));
-  }
-
-  /*!
-   * Check if the given vertex represents one of the ends of a given curve.
-   * \param v The vertex.
-   * \param cv The curve.
-   * \param ind ARR_MIN_END if we refer to cv's minimal end;
-   *            ARR_MAX_END if we refer to its maximal end.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \return Whether v represents the left (or right) end of cv.
-   */
-  bool are_equal(Vertex_const_handle v,
-                 const X_monotone_curve_2& cv, Arr_curve_end ind,
-                 Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
-  {
-    return (p_arr->topology_traits()->are_equal(p_arr->_vertex (v),
-                                                cv, ind, ps_x, ps_y));
-  }
-
-  /*!
-   * Check whether the given halfedge lies on the outer boundary of its
-   * incident face.
-   * \param he The given halfedge.
-   * \return (true) in case he lies on the outer boundary of its incident face;
-   *         (false) if he lies on a hole inside this face.
-   */
-  bool is_on_outer_boundary(Halfedge_const_handle he) const
-  {
-    const DHalfedge* p_he = p_arr->_halfedge(he);
-    return (! p_he->is_on_inner_ccb());
-  }
-
-  /*!
-   * Check whether the given halfedge lies on the inner boundary of its
-   * incident face.
-   * \param he The given halfedge.
-   * \return (true) in case he lies on a hole inside its incident face;
-   *         (false) if he lies on the outer boundary of this face.
-   */
-  bool is_on_inner_boundary(Halfedge_const_handle he) const
-  {
-    const DHalfedge* p_he = p_arr->_halfedge (he);
-    return (p_he->is_on_inner_ccb());
-  }
-
-  /*!
-   * Create a new vertex and associate it with the given point.
-   * \param p The point.
-   * \return A handle for the newly created vertex.
-   */
-  Vertex_handle create_vertex(const Point_2& p)
-  {
-    DVertex* v = p_arr->_create_vertex (p);
-    CGAL_assertion(v != NULL);
-    return (p_arr->_handle_for (v));
-  }
-  
-  /*!
-   * Create a new boundary vertex.
-   * \param cv The curve incident to the boundary.
-   * \param ind The relevant curve-end.
-   * \param ps_x The boundary condition in x.
-   * \param by The boundary condition in y.
-   * \param notify Should we send a notification to the topology traits
-   *               on the creation of the vertex (true by default).
-   * \pre Either ps_x or by does not equal ARR_INTERIOR.
-   * \return A handle for the newly created vertex.
-   */
-  Vertex_handle create_boundary_vertex(const X_monotone_curve_2& cv,
-                                       Arr_curve_end ind,
-                                       Arr_parameter_space ps_x,
-                                       Arr_parameter_space ps_y,
-                                       bool notify = true)
-  {
-    DVertex* v = p_arr->_create_boundary_vertex (cv, ind, ps_x, ps_y);
-
-    CGAL_assertion(v != NULL);
-
-    // Notify the topology traits on the creation of the boundary vertex.
-    if (notify)
-      p_arr->topology_traits()->notify_on_boundary_vertex_creation(v, cv, ind,
-                                                                   ps_x, ps_y);
-    return (p_arr->_handle_for(v));
-  }
-
-  /*!
-   * Locate the arrangement features that will be used for inserting the
-   * given curve end, which has a boundary condition, and set a proper vertex
-   * there.
-   * \param f The face that contains the curve end.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param ps_x The boundary condition at the x-coordinate.
-   * \param ps_y The boundary condition at the y-coordinate.
-   * \return A pair of <Vertex_handle, Halfedge_handle>:
-   *         The first element is the vertex that corresponds to the curve end.
-   *         The second is its predecessor halfedge (if valid).
-   */
-  std::pair<Vertex_handle, Halfedge_handle>
-  place_and_set_curve_end(Face_handle f,
-                          const X_monotone_curve_2& cv, Arr_curve_end ind,
-                          Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-  {
-    DHalfedge* pred;
-    DVertex* v = p_arr->_place_and_set_curve_end(p_arr->_face (f), cv, ind,
-                                                 ps_x, ps_y, &pred);
-
-    if (pred == NULL)
-      // No predecessor halfedge, return just the vertex:
-      return (std::make_pair(p_arr->_handle_for(v), Halfedge_handle()));
-
-    // Return a pair of the vertex and predecessor halfedge:
-    return (std::make_pair(p_arr->_handle_for(v), p_arr->_handle_for(pred)));
-  }
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, where the end vertices
-   * are given by the target points of two given halfedges.
-   * The two halfedges should be given such that in case a new face is formed,
-   * it will be the incident face of the halfedge directed from the first
-   * vertex to the second vertex.
-   * \param he_to The reference halfedge pointing to the first vertex.
-   * \param cv the given curve.
-   * \param cv_dir the direction of the curve
-   * \param he_away The reference halfedge pointing away from the second vertex.
-   * \param new_face Output - whether a new face has been created.
-   * \param swapped_predecessors Output - whether roles of prev1 and prev2 have
-   *        been switched
-   * \param allow_swap_of_predecessors - set to false if no swapping should
-   *        take place at all
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve directed from prev1's target to prev2's target.
-   *         In case a new face has been created, it is given as the incident
-   *         face of this halfedge.
-   */
-  Halfedge_handle insert_at_vertices_ex(Halfedge_handle he_to, 
-                                        const X_monotone_curve_2& cv,
-                                        Arr_halfedge_direction cv_dir,
-                                        Halfedge_handle he_away,
-                                        bool& new_face,
-                                        bool& swapped_predecessors,
-                                        bool allow_swap_of_predecessors = true)
-  {
-    DHalfedge* he = p_arr->_insert_at_vertices(p_arr->_halfedge (he_to),
-                                               cv, cv_dir,
-                                               p_arr->_halfedge (he_away),
-                                               new_face, swapped_predecessors,
-                                               allow_swap_of_predecessors);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for(he));
-  }
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that one of its
-   * endpoints corresponds to a given arrangement vertex, given the exact
-   * place for the curve in the circular list around this vertex. The other
-   * endpoint corrsponds to a free vertex (a newly created vertex or an
-   * isolated vertex).
-   * \param he_to The reference halfedge. We should represent cv as a pair
-   *              of edges, one of them should become he_to's successor.
-   * \param cv The given x-monotone curve.
-   * \param cv_dir The direction of the curve.
-   * \param v The free vertex that corresponds to the other endpoint.
-   * \return A handle to one of the halfedges corresponding to the inserted
-   *         curve, whose target is the vertex v.
-   */
-  Halfedge_handle insert_from_vertex_ex(Halfedge_handle he_to,
-                                        const X_monotone_curve_2& cv,
-                                        Arr_halfedge_direction cv_dir, 
-                                        Vertex_handle v)
-  {
-    DVertex* p_v = p_arr->_vertex(v);
-    if (p_v->is_isolated()) {
-      // Remove the isolated vertex record, which will not be isolated any
-      // more.
-      DIso_vertex* iv = p_v->isolated_vertex();
-      DFace* f = iv->face();
-
-      f->erase_isolated_vertex (iv);
-      p_arr->_dcel().delete_isolated_vertex(iv);
-    }
-
-    DHalfedge* he =
-      p_arr->_insert_from_vertex(p_arr->_halfedge(he_to), cv, cv_dir, p_v);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for (he));
-  }
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that both its
-   * endpoints correspond to free arrangement vertices (newly created vertices
-   * or existing isolated vertices), so a new hole is formed in the face
-   * that contains the two vertices.
-   * \param f The face containing the two end vertices.
-   * \param cv The given x-monotone curve.
-   * \param cv_dir The direction of the curve.
-   * \param v1 The free vertex that corresponds to the left endpoint of cv.
-   * \param v2 The free vertex that corresponds to the right endpoint of cv.
-   * \return A handle to one of the halfedges corresponding to the inserted
-   *         curve, directed from v1 to v2.
-   */
-  Halfedge_handle insert_in_face_interior_ex(Face_handle f,
-                                             const X_monotone_curve_2& cv,
-                                             Arr_halfedge_direction cv_dir, 
-                                             Vertex_handle v1,
-                                             Vertex_handle v2)
-  {
-    DVertex* p_v1 = p_arr->_vertex (v1);
-    DVertex* p_v2 = p_arr->_vertex (v2);
-
-    if (p_v1->is_isolated()) {
-      // Remove the isolated vertex record, which will not be isolated any
-      // more.
-      DIso_vertex* iv1 = p_v1->isolated_vertex();
-      DFace* f1 = iv1->face();
-      f1->erase_isolated_vertex(iv1);
-      p_arr->_dcel().delete_isolated_vertex(iv1);
-    }
-
-    if (p_v2->is_isolated()) {
-      // Remove the isolated vertex record, which will not be isolated any
-      // more.
-      DIso_vertex* iv2 = p_v2->isolated_vertex();
-      DFace* f2 = iv2->face();
-      f2->erase_isolated_vertex(iv2);
-      p_arr->_dcel().delete_isolated_vertex(iv2);
-    }
-
-    DHalfedge* he = p_arr->_insert_in_face_interior(p_arr->_face (f),
-                                                    cv, cv_dir, p_v1, p_v2);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for (he));
-  
-  }
-
-  /*!
-   * Insert the given vertex as an isolated vertex inside the given face.
-   * \param f The face that should contain the isolated vertex.
-   * \param v The isolated vertex.
-   */
-  void insert_isolated_vertex(Face_handle f, Vertex_handle v)
-  { p_arr->_insert_isolated_vertex(p_arr->_face (f), p_arr->_vertex(v)); }
-  
-  /*!
-   * Relocate all holes and isolated vertices to their proper position,
-   * immediately after a face has split due to the insertion of a new halfedge.
-   * In case insert_at_vertices_ex() was invoked and indicated that a new face
-   * has been created, this function should be called with the halfedge
-   * returned by insert_at_vertices_ex().
-   * \param new_he The new halfedge that caused the split, such that the new
-   *               face lies to its left and the old face to its right.
-   */
-  void relocate_in_new_face(Halfedge_handle new_he)
-  { p_arr->_relocate_in_new_face (p_arr->_halfedge (new_he)); }
-
-  void relocate_isolated_vertices_in_new_face(Halfedge_handle new_he)
-  {
-    p_arr->_relocate_isolated_vertices_in_new_face(p_arr->_halfedge(new_he));
-  }
-
-  void relocate_holes_in_new_face(Halfedge_handle new_he)
-  { p_arr->_relocate_holes_in_new_face(p_arr->_halfedge(new_he)); }
-
-  /*!
-   * Move an outer CCB from one face to another.
-   * \param from_face The source face.
-   * \param to_face The destination face.
-   * \param ccb A CCB circulator that corresponds to component to move.
-   */
-  void move_outer_ccb(Face_handle from_face, Face_handle to_face,
-                      Ccb_halfedge_circulator ccb)
-  {
-    p_arr->_move_outer_ccb(p_arr->_face(from_face), p_arr->_face(to_face),
-                           p_arr->_halfedge (ccb));
-  }
-
-  /*!
-   * Move an inner CCB from one face to another.
-   * \param from_face The source face.
-   * \param to_face The destination face.
-   * \param ccb A CCB circulator that corresponds to component to move.
-   */
-  void move_inner_ccb (Face_handle from_face, Face_handle to_face,
-                       Ccb_halfedge_circulator ccb)
-  {
-    p_arr->_move_inner_ccb(p_arr->_face(from_face), p_arr->_face(to_face),
-                           p_arr->_halfedge(ccb));
-  }
-  
-  /*!
-   * Move an isolated vertex from one face to another.
-   * \param from_face The source face.
-   * \param to_face The destination face.
-   * \param v The isolated vertex to move.
-   */
-  void move_isolated_vertex(Face_handle from_face, Face_handle to_face,
-                            Vertex_handle v)
-  {
-    p_arr->_move_isolated_vertex(p_arr->_face(from_face),
-                                 p_arr->_face(to_face), p_arr->_vertex(v));
-  }
-
-  /*!
-   * Remove an isolated vertex from its face.
-   * \param v The isolated vertex to remove.
-   */
-  void remove_isolated_vertex_ex (Vertex_handle v)
-  {
-    CGAL_precondition(v->is_isolated());
-    DVertex* iso_v = p_arr->_vertex(v);
-    p_arr->_remove_isolated_vertex(iso_v);
-  }
-
-  /*!
-   * Modify the point associated with a given vertex. The point may be
-   * geometrically different than the one currently associated with the vertex.
-   * \param v The vertex to modify.
-   * \param p The new point to associate with v.
-   * \return A handle for the modified vertex (same as v).
-   */
-  Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p)
-  {
-    p_arr->_modify_vertex(p_arr->_vertex(v), p);
-    return v;
-  }
-        
-  /*!
-   * Modify the x-monotone curve associated with a given edge. The curve may be
-   * geometrically different than the one currently associated with the edge.
-   * \param e The edge to modify.
-   * \param cv The new x-monotone curve to associate with e.
-   * \return A handle for the modified edge (same as e).
-   */
-  Halfedge_handle modify_edge_ex(Halfedge_handle e,
-                                 const X_monotone_curve_2& cv)
-  {
-    p_arr->_modify_edge(p_arr->_halfedge (e), cv);
-    return e;
-  }
-          
-  /*!
-   * Split a given edge into two at a given point, and associate the given
-   * x-monotone curves with the split edges.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param p The split point.
-   * \param cv1 The curve that should be associated with the first split edge,
-   *            whose source equals e's source and its target is p.
-   * \param cv2 The curve that should be associated with the second split edge,
-   *            whose source is p and its target equals e's target.
-   * \return A handle for the first split halfedge, whose source equals the
-   *         source of e, and whose target is the split point.
-   */
-  Halfedge_handle split_edge_ex(Halfedge_handle e, const Point_2& p,
-                                const X_monotone_curve_2& cv1, 
-                                const X_monotone_curve_2& cv2)
-  {
-    DHalfedge* he = p_arr->_split_edge (p_arr->_halfedge(e), p, cv1, cv2);
-
-    CGAL_assertion(he != NULL);
-    return (p_arr->_handle_for(he));
-  }
-
-  /*!
-   * Split a given edge into two at the given vertex, and associate the given
-   * x-monotone curves with the split edges.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param v The split vertex.
-   * \param cv1 The curve that should be associated with the first split edge,
-   *            whose source equals e's source and its target is v's point.
-   * \param cv2 The curve that should be associated with the second split edge,
-   *            whose source is v's point and its target equals e's target.
-   * \return A handle for the first split halfedge, whose source equals the
-   *         source of e, and whose target is the split vertex v.
-   */
-  Halfedge_handle split_edge_ex(Halfedge_handle e, Vertex_handle v,
-                                const X_monotone_curve_2& cv1,
-                                const X_monotone_curve_2& cv2)
-  {
-    DHalfedge* he = p_arr->_split_edge(p_arr->_halfedge(e), p_arr->_vertex(v),
-                                       cv1, cv2);
-
-    CGAL_assertion (he != NULL);
-    return (p_arr->_handle_for(he));
-  }
-
-  /*!
-   * Split a fictitious edge at the given vertex.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param v The split vertex.
-   * \return A handle for the first split halfedge, whose source equals the
-   *         source of e, and whose target is the split vertex v.
-   */
-  Halfedge_handle split_fictitious_edge(Halfedge_handle e, Vertex_handle v)
-  {
-    CGAL_precondition(e->is_fictitious());
-    DHalfedge* he =  
-      p_arr->topology_traits()->split_fictitious_edge(p_arr->_halfedge(e),
-                                                      p_arr->_vertex(v));
-    return (p_arr->_handle_for(he));
-  }
-
-  /*!
-   * Remove a pair of twin halfedges from the arrangement.
-   * \param e A handle for one of the halfedges to be removed.
-   * \param remove_source Should the source vertex of e be removed if it
-   *                      becomes isolated (true by default).
-   * \param remove_target Should the target vertex of e be removed if it
-   *                      becomes isolated (true by default).
-   * \pre In case the removal causes the creation of a new hole, e should 
-   *      point at this hole.
-   * \return A handle for the remaining face.
-   */
-  Face_handle remove_edge_ex(Halfedge_handle e,
-                             bool remove_source = true,
-                             bool remove_target = true)
-  {
-    DFace* f =
-      p_arr->_remove_edge(p_arr->_halfedge (e), remove_source, remove_target);
-    CGAL_assertion(f != NULL);
-    return (p_arr->_handle_for(f));
-  }
-
-  /*!
-   * Check if the two given halfedges lie on the same inner component.
-   * \param e1 A handle for the first halfedge.
-   * \param e2 A handle for the second halfedge.
-   * \return Whether e1 and e2 lie on the same inner component.
-   */
-  bool are_on_same_inner_component(Halfedge_handle e1, Halfedge_handle e2)
-  {
-     DHalfedge* he1 = p_arr->_halfedge(e1);
-     DHalfedge* he2 = p_arr->_halfedge(e2);
-    const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
-    if (ic1 == NULL) return (false);
-    const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
-    return (ic1 == ic2);
-  }
-
-  /*!
-   * Check if the two given halfedges lie on the same outer component.
-   * \param e1 A handle for the first halfedge.
-   * \param e2 A handle for the second halfedge.
-   * \return Whether e1 and e2 lie on the same outer component.
-   */
-  bool are_on_same_outer_component(Halfedge_handle e1, Halfedge_handle e2)
-  {
-     DHalfedge* he1 = p_arr->_halfedge(e1);
-     DHalfedge* he2 = p_arr->_halfedge(e2);
-    const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : NULL;
-    if (oc1 == NULL) return (false);
-    const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : NULL;
-    return (oc1 == oc2);
-  }
-  //@}
-
-  /// \name Traversal methods for the BOOST graph traits.
-  //@{
-
-  /*! \class
-   * An iterator for traversing all arrangement vertices, including vertices
-   * at infinity (not including fictitious vertices).
-   */
-  typedef typename Arrangement_2::_Is_valid_vertex       Is_valid_vertex;
-  typedef typename Arrangement_2::_Valid_vertex_iterator Valid_vertex_iterator;
-
-  /*! Get an iterator for the first valid arrangement vertex. */
-  Valid_vertex_iterator valid_vertices_begin()
-  { 
-    return (Valid_vertex_iterator
-            (p_arr->topology_traits()->dcel().vertices_begin(),
-             p_arr->topology_traits()->dcel().vertices_end(),
-             Is_valid_vertex (p_arr->topology_traits()))); 
-  }
-
-  /*! Get a past-the-end iterator for the valid arrangement vertices. */
-  Valid_vertex_iterator valid_vertices_end()
-  { 
-    return (Valid_vertex_iterator
-            (p_arr->topology_traits()->dcel().vertices_end(),
-             p_arr->topology_traits()->dcel().vertices_end(),
-             Is_valid_vertex (p_arr->topology_traits()))); 
-  }
-
-  /*! Get the number of valid arrangement vertices. */
-  Size number_of_valid_vertices() const
-  {
-    return (p_arr->topology_traits()->number_of_valid_vertices());
-  }
-  //@}
-
-  /// \name Functions used by the arrangement reader and writer.
-  //@{
-  typedef typename Arrangement_2::Dcel                Dcel;
-  typedef typename Arrangement_2::DVertex_const_iter  Dcel_vertex_iterator;
-  typedef typename Arrangement_2::DEdge_const_iter    Dcel_edge_iterator;
-  typedef typename Arrangement_2::DFace_const_iter    Dcel_face_iterator;
-  typedef typename Arrangement_2::DOuter_ccb_const_iter
-                                                      Dcel_outer_ccb_iterator;
-  typedef typename Arrangement_2::DInner_ccb_const_iter
-                                                      Dcel_inner_ccb_iterator;
-  typedef typename Arrangement_2::DIso_vertex_const_iter
-                                                      Dcel_iso_vertex_iterator;
-
-  typedef DVertex                                     Dcel_vertex;
-  typedef DHalfedge                                   Dcel_halfedge;
-  typedef DFace                                       Dcel_face;
-  typedef DOuter_ccb                                  Dcel_outer_ccb;
-  typedef DInner_ccb                                  Dcel_inner_ccb;
-  typedef DIso_vertex                                 Dcel_isolated_vertex;
-
-  /*!
-   * Get the arrangement DCEL.
-   */
-  const Dcel& dcel() const { return (p_arr->_dcel()); }
-
-  /*!
-   * Clear the entire arrangment.
-   */
-  void clear_all()
-  {
-    p_arr->clear();
-    p_arr->_dcel().delete_all();
-  }
-
-   /*!
-   * Set the boundary of a vertex
-   * \param p A vertex
-   * \param ps_x The boundary condition at x.
-   * \param ps_y The boundary condition at y.
-   * \return A pointer to the created DCEL vertex.
-   */
-  Dcel_vertex* set_vertex_boundary(const Vertex_handle v,
-                                   Arr_parameter_space ps_x,
-                                   Arr_parameter_space ps_y)
-  {
-    Dcel_vertex* v_to_set = p_arr->_vertex(v);
-    v_to_set->set_boundary(ps_x, ps_y);
-    return (v_to_set);
-  }
-
-  /*!
-   * Create a new vertex.
-   * \param p A pointer to the point (may be NULL in case of a vertex at
-   *          infinity).
-   * \param ps_x The boundary condition at x.
-   * \param ps_y The boundary condition at y.
-   * \return A pointer to the created DCEL vertex.
-   */
-  Dcel_vertex* new_vertex(const Point_2* p,
-                          Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-  {
-    Dcel_vertex* new_v = p_arr->_dcel().new_vertex();
-    if (p != NULL) {
-      typename Dcel::Vertex::Point* p_pt = p_arr->_new_point(*p);
-      new_v->set_point(p_pt);
-    }
-    else
-    {
-      CGAL_precondition (p_arr->is_open(ps_x, ps_y));
-      new_v->set_point (NULL);
-    }
-
-    new_v->set_boundary (ps_x, ps_y);
-    return (new_v);
-  }
-
-  /*!
-   * Create a new edge (halfedge pair), associated with the given curve.
-   * \param cv A pointer to the x-monotone curve (may be NULL in case of
-   *           a fictitious edge).
-   * \return A pointer to one of the created DCEL halfedge.
-   */
-  Dcel_halfedge* new_edge(const X_monotone_curve_2* cv)
-  {
-    Dcel_halfedge* new_he = p_arr->_dcel().new_edge();
-
-    if (cv != NULL) {
-      typename Dcel::Halfedge::X_monotone_curve* p_cv = p_arr->_new_curve(*cv);
-      new_he->set_curve(p_cv);
-    }
-    else new_he->set_curve(NULL);
-    return new_he;
-  }
-
-  /*!
-   * Create a new face.
-   * \return A pointer to the created DCEL face.
-   */
-  Dcel_face* new_face() { return (p_arr->_dcel().new_face()); }
-
-  /*!
-   * Create a new outer CCB.
-   * \return A pointer to the created DCEL outer CCB.
-   */
-  Dcel_outer_ccb* new_outer_ccb() { return (p_arr->_dcel().new_outer_ccb()); }
-
-  /*!
-   * Create a new inner CCB.
-   * \return A pointer to the created DCEL inner CCB.
-   */
-  Dcel_inner_ccb* new_inner_ccb()
-  {  return (p_arr->_dcel().new_inner_ccb()); }
-
-  /*!
-   * Create a new isolated vertex.
-   * \return A pointer to the created DCEL isolated vertex.
-   */
-  Dcel_isolated_vertex* new_isolated_vertex()
-  { return (p_arr->_dcel().new_isolated_vertex()); }
-
-  /*!
-   * Update the topology traits after the DCEL has been updated.
-   */
-  void dcel_updated() { p_arr->topology_traits()->dcel_updated(); }
-  //@}
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_circle_segment_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_circle_segment_traits_2.h
deleted file mode 100644
index 74b9371..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_circle_segment_traits_2.h
+++ /dev/null
@@ -1,702 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-//                 Baruch Zukerman   <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_ARR_CIRCLE_SEGMENT_TRAITS_2_H
-#define CGAL_ARR_CIRCLE_SEGMENT_TRAITS_2_H
-
-/*! \file
- * The header file for the Arr_circle_segment_traits_2<Kenrel> class.
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
-
-#include <fstream>
-
-namespace CGAL {
-
-/*! \class
- * A traits class for maintaining an arrangement of circles.
- */
-template <class Kernel_, bool Filter = true>
-class Arr_circle_segment_traits_2 
-{
-public:
-
-  typedef Kernel_                                        Kernel;
-  typedef typename Kernel::FT                            NT;
-  typedef typename Kernel::Point_2                       Rational_point_2;
-  typedef typename Kernel::Segment_2                     Rational_segment_2;
-  typedef typename Kernel::Circle_2                      Rational_circle_2;
-  typedef _One_root_point_2<NT, Filter>                  Point_2;
-  typedef typename Point_2::CoordNT                      CoordNT;
-  typedef _Circle_segment_2<Kernel, Filter>              Curve_2;
-  typedef _X_monotone_circle_segment_2<Kernel, Filter>   X_monotone_curve_2;
-  typedef unsigned int                                   Multiplicity;
-  typedef Arr_circle_segment_traits_2<Kernel, Filter>    Self;
-
-  // Category tags:
-  typedef Tag_true                                     Has_left_category;
-  typedef Tag_true                                     Has_merge_category;
-  typedef Tag_false                                    Has_do_intersect_category;
-
-  typedef Arr_oblivious_side_tag                       Left_side_category;
-  typedef Arr_oblivious_side_tag                       Bottom_side_category;
-  typedef Arr_oblivious_side_tag                       Top_side_category;
-  typedef Arr_oblivious_side_tag                       Right_side_category;
-    
-protected:
-
-  // Type definition for the intersection points mapping.
-  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
-
-  mutable Intersection_map inter_map;   // Mapping pairs of curve IDs to their
-                                        // intersection points.
-  bool m_use_cache;
-
-public:
-
-  /*! Default constructor. */
-  Arr_circle_segment_traits_2 (bool use_intersection_caching = false) :
-    m_use_cache(use_intersection_caching)
-  {}
-
-  /*! Get the next curve index. */
-  static unsigned int get_index () 
-  {
-    static unsigned int index = 0;
-    return (++index);
-  }
-
-  /// \name Basic functor definitions.
-  //@{
-
-  class Compare_x_2
-  {
-  public:
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      if (p1.identical (p2))
-        return (EQUAL);
-
-      return (CGAL::compare (p1.x(), p2.x()));
-    }
-  };
-
-  /*! Get a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return Compare_x_2();
-  }
-
-  class Compare_xy_2
-  {
-  public:
-    /*!
-     * Compares two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      if (p1.identical (p2))
-        return (EQUAL);
-
-      Comparison_result  res = CGAL::compare (p1.x(), p2.x());
-
-      if (res != EQUAL)
-        return (res);
-
-      return (CGAL::compare (p1.y(), p2.y()));
-    }
-  };
-
-  /*! Get a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return Compare_xy_2();
-  }
-
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The left endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.left());
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.right());
-    }
-  };
-
-  /*! Get a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.is_vertical());
-    }
-  };
-
-  /*! Get an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object () const
-  {
-    return Is_vertical_2();
-  }
-
-  class Compare_y_at_x_2
-  {
-  public:
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator() (const Point_2& p,
-                                  const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (cv.is_in_x_range (p));
-
-      return (cv.point_position (p));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return Compare_y_at_x_2();
-  }
-
-  class Compare_y_at_x_right_2
-  {
-  public:
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // right (so their right endpoint is lexicographically larger than p).
-      CGAL_precondition (cv1.point_position (p) == EQUAL &&
-                         cv2.point_position (p) == EQUAL);
-
-      if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
-          (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
-      { //both cv1 and cv2 are vertical
-        CGAL_precondition (!(cv1.right()).equals(p) && !(cv2.right()).equals(p));
-      }
-      else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) != EQUAL) &&
-               (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
-      { //only cv1 is vertical
-        CGAL_precondition (!(cv1.right()).equals(p));
-      }
-      else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
-               (CGAL::compare (cv2.left().x(),cv2.right().x()) != EQUAL))
-      { //only cv2 is vertical
-        CGAL_precondition (!(cv2.right()).equals(p));
-      }
-      else
-      { //both cv1 and cv2 are non vertical
-        CGAL_precondition (CGAL::compare (cv1.right().x(),p.x()) == LARGER &&
-                           CGAL::compare (cv2.right().x(),p.x()) == LARGER);
-      }
-      // Compare the two curves immediately to the right of p:
-      return (cv1.compare_to_right (cv2, p));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return Compare_y_at_x_right_2();
-  }
-
-  class Compare_y_at_x_left_2
-  {
-  public:
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-
-      CGAL_precondition (cv1.point_position (p) == EQUAL &&
-                         cv2.point_position (p) == EQUAL);
-
-      if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
-          (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
-	  { //both cv1 and cv2 are vertical
-         CGAL_precondition (!(cv1.left()).equals(p) && !(cv2.left()).equals(p));
-	  }
-	  else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) != EQUAL) &&
-                   (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
-	  { //only cv1 is vertical
-         CGAL_precondition (!(cv1.left()).equals(p));
-	  }
-	  else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
-                   (CGAL::compare (cv2.left().x(),cv2.right().x()) != EQUAL))
-	  { //only cv2 is vertical
-         CGAL_precondition (!(cv2.left()).equals(p));
-	  }
-	  else
-	  { //both cv1 and cv2 are non vertical
-        CGAL_precondition (CGAL::compare (cv1.left().x(),p.x()) == SMALLER &&
-                           CGAL::compare (cv2.left().x(),p.x()) == SMALLER);
-	  }
-      // Compare the two curves immediately to the left of p:
-      return (cv1.compare_to_left (cv2, p));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
-  {
-    return Compare_y_at_x_left_2();
-  }
-
-  class Equal_2
-  {
-  public:
-    /*!
-     * Check if the two x-monotone curves are the same (have the same graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      if (&cv1 == &cv2)
-        return (true);
-
-      return (cv1.equals (cv2));
-    }
-
-    /*!
-     * Check if the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      return (p1.equals (p2));
-    }
-  };
-
-  /*! Get an Equal_2 functor object. */
-  Equal_2 equal_2_object () const
-  {
-    return Equal_2();
-  }
-  //@}
-
-  /// \name Functor definitions for supporting intersections.
-  //@{
-
-  class Make_x_monotone_2
-  {
-  private:
-    typedef Arr_circle_segment_traits_2<Kernel_, Filter> Self;
-
-    bool m_use_cache;
-
-  public:
-
-    Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache)
-    {}
-
-    /*!
-     * Cut the given conic curve (ocv.is_in_x_range (p)r conic arc) into x-monotone subcurves 
-     * and insert them to the given output iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object. The returned
-     *           objects are all wrcv.is_in_x_range (p)appers X_monotone_curve_2 objects.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
-    {
-      // Increment the serial number of the curve cv, which will serve as its
-      // unique identifier.
-      unsigned int  index = 0;
-      if(m_use_cache)
-        index = Self::get_index();
-
-      if (cv.orientation() == COLLINEAR)
-      {
-        // The curve is a line segment.
-        *oi = make_object (X_monotone_curve_2 (cv.supporting_line(),
-                                               cv.source(), cv.target(),
-                                               index));
-        ++oi;
-        return (oi);
-      }
-
-      // Check the case of a degenrate circle (a point).
-      const typename Kernel::Circle_2&  circ = cv.supporting_circle();
-      CGAL::Sign   sign_rad = CGAL::sign (circ.squared_radius());
-      CGAL_precondition (sign_rad != NEGATIVE);
-      
-      if (sign_rad == ZERO)
-      {
-        // Create an isolated point.
-        *oi = make_object (Point_2 (circ.center().x(), circ.center().y()));
-        ++oi;
-        return (oi);
-      }
-      
-      // The curve is circular: compute the to vertical tangency points
-      // of the supporting circle.
-      Point_2         vpts[2];
-      unsigned int    n_vpts = cv.vertical_tangency_points (vpts);
-
-      if (cv.is_full())
-      {
-        CGAL_assertion (n_vpts == 2);
-
-        // Subdivide the circle into two arcs (an upper and a lower half).
-        *oi = make_object (X_monotone_curve_2 (circ,
-                                               vpts[0], vpts[1],
-                                               cv.orientation(),
-                                               index));
-        ++oi;
-        
-        *oi = make_object (X_monotone_curve_2 (circ,
-                                               vpts[1], vpts[0],
-                                               cv.orientation(),
-                                               index));
-        ++oi;
-      }
-      else
-      {
-        // Act according to the number of vertical tangency points.
-        if (n_vpts == 2)
-        {
-          // Subdivide the circular arc into three x-monotone arcs.
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 cv.source(), vpts[0],
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-        
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 vpts[0], vpts[1],
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 vpts[1], cv.target(),
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-        }
-        else if (n_vpts == 1)
-        {
-          // Subdivide the circular arc into two x-monotone arcs.
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 cv.source(), vpts[0],
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-        
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 vpts[0], cv.target(),
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-        }
-        else
-        {
-          CGAL_assertion (n_vpts == 0);
-
-          // The arc is already x-monotone:
-          *oi = make_object (X_monotone_curve_2 (circ,
-                                                 cv.source(), cv.target(),
-                                                 cv.orientation(),
-                                                 index));
-          ++oi;
-        }
-      }
-      
-      return (oi);
-    }
-  };
-
-  /*! Get a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object () const
-  {
-    return Make_x_monotone_2(m_use_cache);
-  }
-
-  class Split_2
-  {
-  public:
-
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      CGAL_precondition (cv.point_position(p)==EQUAL &&
-      ! p.equals (cv.source()) &&
-      ! p.equals (cv.target()));
-
-      cv.split (p, c1, c2);
-      return;
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2();
-  }
-
-  class Intersect_2
-  {
-  private:
-
-    Intersection_map&  _inter_map;       // The map of intersection points.
-
-  public:
-
-    /*! Constructor. */
-    Intersect_2 (Intersection_map& map) :
-      _inter_map (map)
-    {}
-
-    /*!
-     * Find the intersections of the two given curves and insert them to the
-     * given output iterator. As two segments may itersect only once, only a
-     * single will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      return (cv1.intersect (cv2, oi, &_inter_map));
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return (Intersect_2 (inter_map));
-  }
-
-  class Are_mergeable_2
-  {
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable - if they are supported
-     *         by the same line and share a common endpoint; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      return (cv1.can_merge_with (cv2));
-    }
-  };
-
-  /*! Get an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object () const
-  {
-    return Are_mergeable_2();
-  }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2
-  {
-  protected:
-    typedef Arr_circle_segment_traits_2<Kernel, Filter> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_circle_segment_traits_2<Kernel, Filter>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2,
-                     X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-
-      c = cv1;
-      c.merge (cv2);
-    }
-  };
-
-  /*! Get a Merge_2 functor object. */
-  Merge_2 merge_2_object () const
-  {
-    return Merge_2(this);
-  }
-
-  class Compare_endpoints_xy_2
-  {
-  public:
-    /*!
-     * compare lexicogrphic the endpoints of a x-monotone curve.
-     * \param cv the curve
-     * \return SMALLER if the curve is directed right, else return SMALLER
-     */
-    Comparison_result operator()(const X_monotone_curve_2& cv) const
-    {
-      if(cv.is_directed_right())
-        return(SMALLER);
-      return (LARGER);
-    }
-  };
-
-  /*! Get a Compare_endpoints_xy_2 functor object. */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-
-
-  class Construct_opposite_2
-  {
-  public:
-    /*!
-     * construct an opposite x-monotone curve.
-     * \param cv the curve
-     * \return an opposite x-monotone curve.
-     */
-    X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const
-    {
-      return cv.construct_opposite();
-    }
-  };
-
-  /*! Get a Construct_opposite_2 functor object. */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  } 
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_conic_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_conic_traits_2.h
deleted file mode 100644
index ca8ac42..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_conic_traits_2.h
+++ /dev/null
@@ -1,822 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-
-#ifndef CGAL_ARR_CONIC_TRAITS_2_H
-#define CGAL_ARR_CONIC_TRAITS_2_H
-
-/*! \file
- * The conic traits-class for the arrangement package.
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_geometry_traits/Conic_arc_2.h>
-#include <CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h>
-#include <CGAL/Arr_geometry_traits/Conic_point_2.h>
-
-#include <fstream>
-
-namespace CGAL {
-
-/*!
- * \class A traits class for maintaining an arrangement of conic arcs (bounded
- * segments of algebraic curves of degree 2 at most).
- *
- * The class is templated with two parameters: 
- * Rat_kernel A kernel that provides the input objects or coefficients.
- *            Rat_kernel::FT should be an integral or a rational type.
- * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
- *            for the coordinates of arrangement vertices, which are algebraic
- *            numbers of degree up to 4 (preferably it is CORE::Expr).
- * Nt_traits A traits class for performing various operations on the integer,
- *           rational and algebraic types. 
- */
-template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_>
-class Arr_conic_traits_2 
-{
-public:
-
-  typedef Rat_kernel_                     Rat_kernel;
-  typedef Alg_kernel_                     Alg_kernel;
-  typedef Nt_traits_                      Nt_traits;
-
-  typedef typename Rat_kernel::FT         Rational;
-  typedef typename Rat_kernel::Point_2    Rat_point_2;
-  typedef typename Rat_kernel::Segment_2  Rat_segment_2;
-  typedef typename Rat_kernel::Line_2     Rat_line_2;
-  typedef typename Rat_kernel::Circle_2   Rat_circle_2;
-
-  typedef typename Alg_kernel::FT         Algebraic;
-
-  typedef typename Nt_traits::Integer     Integer;
-
-  typedef Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>  Self;
-
-  // Category tags:
-  typedef Tag_true                        Has_left_category;
-  typedef Tag_true                        Has_merge_category;
-  typedef Tag_false                       Has_do_intersect_category;
-
-  typedef Arr_oblivious_side_tag          Left_side_category;
-  typedef Arr_oblivious_side_tag          Bottom_side_category;
-  typedef Arr_oblivious_side_tag          Top_side_category;
-  typedef Arr_oblivious_side_tag          Right_side_category;
-
-  // Traits objects:
-  typedef _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits> Curve_2;
-  typedef _Conic_x_monotone_arc_2<Curve_2>                X_monotone_curve_2;
-  typedef _Conic_point_2<Alg_kernel>                      Point_2;
-  typedef unsigned int                                    Multiplicity;
-
-private:
-
-  // Type definition for the intersection points mapping.
-  typedef typename X_monotone_curve_2::Conic_id           Conic_id;
-  typedef typename X_monotone_curve_2::Intersection_point_2
-                                                          Intersection_point_2;
-  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
-
-  mutable Intersection_map  inter_map;  // Mapping conic pairs to their
-                                        // intersection points.
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Arr_conic_traits_2 ()
-  {}
-
-  /*! Get the next conic index. */
-  static unsigned int get_index () 
-  {
-    static unsigned int index = 0;
-    return (++index);
-  }
-
-  /// \name Basic functor definitions.
-  //@{
-
-  class Compare_x_2
-  {
-  public:
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const
-    {
-      Alg_kernel   ker;
-      return (ker.compare_x_2_object() (p1, p2));
-    }
-  };
-
-  /*! Get a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return Compare_x_2();
-  }
-
-  class Compare_xy_2
-  {
-  public:
-    /*!
-     * Compares two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Alg_kernel   ker;
-      return (ker.compare_xy_2_object() (p1, p2));
-    }
-  };
-
-  /*! Get a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return Compare_xy_2();
-  }
-
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The left endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.left());
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2 & cv) const
-    {
-      return (cv.right());
-    }
-  };
-
-  /*! Get a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.is_vertical());
-    }
-  };
-
-  /*! Get an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object () const
-  {
-    return Is_vertical_2();
-  }
-
-  class Compare_y_at_x_2
-  {
-  public:
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator() (const Point_2 & p,
-                                  const X_monotone_curve_2 & cv) const
-    {
-      Alg_kernel   ker;
-
-      if (cv.is_vertical())
-      {
-        // A special treatment for vertical segments:
-        // In case p has the same x c-ordinate of the vertical segment, compare
-        // it to the segment endpoints to determine its position.
-        Comparison_result res1 = ker.compare_y_2_object() (p, cv.left());
-        Comparison_result res2 = ker.compare_y_2_object() (p, cv.right());
-
-        if (res1 == res2)
-          return (res1);
-        else
-          return (EQUAL);
-      }
-
-      // Check whether the point is exactly on the curve.
-      if (cv.contains_point(p))
-        return (EQUAL);
-
-      // Get a point q on the x-monotone arc with the same x coordinate as p.
-      Comparison_result  x_res; 
-      Point_2            q;
-
-      if ((x_res = ker.compare_x_2_object() (p, cv.left())) == EQUAL)
-      {
-        q = cv.left();
-      }
-      else
-      {
-	CGAL_precondition (x_res != SMALLER);
-
-	if ((x_res = ker.compare_x_2_object() (p, cv.right())) == EQUAL)
-	{
-	  q = cv.right();
-	}
-	else
-	{
-	  CGAL_precondition (x_res != LARGER);
-
-	  q = cv.point_at_x (p);
-	}
-      }
-
-      // Compare p with the a point of the curve with the same x coordinate.
-      return (ker.compare_y_2_object() (p, q));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return Compare_y_at_x_2();
-  }
-
-  class Compare_y_at_x_left_2
-  {
-  public:
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition (cv1.contains_point (p) &&
-                         cv2.contains_point (p));
-
-      CGAL_precondition_code (
-        Alg_kernel   ker;
-      );
-      CGAL_precondition (ker.compare_xy_2_object() (p, 
-                                                    cv1.left()) == LARGER &&
-                         ker.compare_xy_2_object() (p,
-                                                    cv2.left()) == LARGER);
-
-      // If one of the curves is vertical, it is below the other one.
-      if (cv1.is_vertical())
-      {
-        if (cv2.is_vertical())
-          // Both are vertical:
-          return (EQUAL);
-        else
-          return (SMALLER);
-      }
-      else if (cv2.is_vertical())
-      {
-        return (LARGER);
-      }
-
-      // Compare the two curves immediately to the left of p:
-      return (cv1.compare_to_left (cv2, p));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
-  {
-    return Compare_y_at_x_left_2();
-  }
-
-  class Compare_y_at_x_right_2
-  {
-  public:
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition (cv1.contains_point (p) &&
-                         cv2.contains_point (p));
-
-      CGAL_precondition_code (
-        Alg_kernel   ker;
-      );
-
-      CGAL_precondition (ker.compare_xy_2_object() (p, 
-                                                    cv1.right()) == SMALLER &&
-                         ker.compare_xy_2_object() (p,
-                                                    cv2.right()) == SMALLER);
-
-      // If one of the curves is vertical, it is above the other one.
-      if (cv1.is_vertical())
-      {
-        if (cv2.is_vertical())
-          // Both are vertical:
-          return (EQUAL);
-        else
-          return (LARGER);
-      }
-      else if (cv2.is_vertical())
-      {
-        return (SMALLER);
-      }
-
-      // Compare the two curves immediately to the right of p:
-      return (cv1.compare_to_right (cv2, p));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return Compare_y_at_x_right_2();
-  }
-
-  class Equal_2
-  {
-  public:
-    /*!
-     * Check if the two x-monotone curves are the same (have the same graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      if (&cv1 == &cv2)
-        return (true);
-
-      return (cv1.equals (cv2));
-    }
-
-    /*!
-     * Check if the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      if (&p1 == &p2)
-        return (true);
-
-      Alg_kernel   ker;
-      return (ker.compare_xy_2_object() (p1, p2) == EQUAL);
-    }
-  };
-
-  /*! Get an Equal_2 functor object. */
-  Equal_2 equal_2_object () const
-  {
-    return Equal_2();
-  }
-  //@}
-
-  /// \name Functor definitions for supporting intersections.
-  //@{
-
-  class Make_x_monotone_2
-  {
-    typedef Arr_conic_traits_2 <Rat_kernel_, Alg_kernel_, Nt_traits_>    Self;
-  public:
-
-    /*!
-     * Cut the given conic curve (or conic arc) into x-monotone subcurves 
-     * and insert them to the given output iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object. The returned
-     *           objects are all wrappers X_monotone_curve_2 objects.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
-    {
-      // Increment the serial number of the curve cv, which will serve as its
-      // unique identifier.
-      unsigned int  index = Self::get_index();
-      Conic_id      conic_id (index);
-      
-      // Find the points of vertical tangency to cv and act accordingly.
-      typename Curve_2::Point_2  vtan_ps[2];
-      int                        n_vtan_ps;
-
-      n_vtan_ps = cv.vertical_tangency_points (vtan_ps);
-
-      if (n_vtan_ps == 0)
-      {    
-        // In case the given curve is already x-monotone:
-        *oi = make_object (X_monotone_curve_2 (cv, conic_id));
-        ++oi;
-        return (oi);
-      }
-
-      // Split the conic arc into x-monotone sub-curves. 
-      if (cv.is_full_conic())
-      {
-        // Make sure we have two vertical tangency points.
-        CGAL_assertion(n_vtan_ps == 2);
-
-        // In case the curve is a full conic, split it into two x-monotone
-        // arcs, one going from ps[0] to ps[1], and the other from ps[1] to
-        // ps[0].
-        *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[0], vtan_ps[1], 
-                                               conic_id));
-        ++oi;
-        *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[1], vtan_ps[0], 
-                                               conic_id));
-        ++oi;
-      }
-      else
-      {
-        if (n_vtan_ps == 1)
-        {
-          // Split the arc into two x-monotone sub-curves: one going from the
-          // arc source to ps[0], and the other from ps[0] to the target.
-          *oi = make_object (X_monotone_curve_2 (cv, cv.source(), vtan_ps[0], 
-                                                 conic_id));
-          ++oi;
-          *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[0], cv.target(), 
-                                                 conic_id));
-          ++oi;
-        }
-        else
-        {
-          CGAL_assertion (n_vtan_ps == 2);
-
-          // Identify the first point we encounter when going from cv's source
-          // to its target, and the second point we encounter. Note that the
-          // two endpoints must both be below the line connecting the two
-          // tangnecy points (or both lies above it).
-          int                   ind_first = 0;
-          int                   ind_second = 1;
-          Alg_kernel_           ker;
-          typename Alg_kernel_::Line_2  line =
-            ker.construct_line_2_object() (vtan_ps[0], vtan_ps[1]);
-          const Comparison_result       start_pos =
-            ker.compare_y_at_x_2_object() (cv.source(), line);
-          const Comparison_result       order_vpts =
-            ker.compare_x_2_object() (vtan_ps[0], vtan_ps[1]);
-
-          CGAL_assertion (start_pos != EQUAL &&
-                          ker.compare_y_at_x_2_object() (cv.target(),
-                                                         line) == start_pos);
-          CGAL_assertion (order_vpts != EQUAL);
-
-          if ((cv.orientation() == COUNTERCLOCKWISE &&
-               start_pos == order_vpts) ||
-              (cv.orientation() == CLOCKWISE &&
-               start_pos != order_vpts))
-          {
-            ind_first = 1;
-            ind_second = 0;
-          }
-
-          // Split the arc into three x-monotone sub-curves.
-          *oi = make_object (X_monotone_curve_2 (cv,
-                                                 cv.source(), 
-                                                 vtan_ps[ind_first], 
-                                                 conic_id));
-          ++oi;
-          
-          *oi = make_object (X_monotone_curve_2 (cv,
-                                                 vtan_ps[ind_first], 
-                                                 vtan_ps[ind_second], 
-                                                 conic_id));
-          ++oi;
-          
-          *oi = make_object (X_monotone_curve_2 (cv,
-                                                 vtan_ps[ind_second],
-                                                 cv.target(),
-                                                 conic_id));
-          ++oi;
-        }
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Get a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object () const
-  {
-    return Make_x_monotone_2();
-  }
-
-  class Split_2
-  {
-  public:
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      cv.split (p, c1, c2);
-      return;
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2();
-  }
-
-  class Intersect_2
-  {
-  private:
-
-    Intersection_map&  _inter_map;       // The map of intersection points.
-
-  public:
-
-    /*! Constructor. */
-    Intersect_2 (Intersection_map& map) :
-      _inter_map (map)
-    {}
-
-    /*!
-     * Find the intersections of the two given curves and insert them to the
-     * given output iterator. As two segments may itersect only once, only a
-     * single will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      return (cv1.intersect (cv2, _inter_map, oi));
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return (Intersect_2 (inter_map));
-  }
-
-  class Are_mergeable_2
-  {
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable - if they are supported
-     *         by the same line and share a common endpoint; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      return (cv1.can_merge_with (cv2));
-    }
-  };
-
-  /*! Get an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object () const
-  {
-    return Are_mergeable_2();
-  }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2
-  {
-  protected:
-    typedef Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>       Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve (segment).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2,
-                     X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-
-      c = cv1;
-      c.merge (cv2);
-    }
-  };
-
-  /*! Obtain a Merge_2 functor object. */
-  Merge_2 merge_2_object() const
-  {
-    return Merge_2(this);
-  }
-
-  //@}
-
-  /// \name Functor definitions for the landmarks point-location strategy.
-  //@{
-  typedef double                          Approximate_number_type;
-
-  class Approximate_2
-  {
-  public:
-
-    /*!
-     * Return an approximation of a point coordinate.
-     * \param p The exact point.
-     * \param i The coordinate index (either 0 or 1).
-     * \pre i is either 0 or 1.
-     * \return An approximation of p's x-coordinate (if i == 0), or an 
-     *         approximation of p's y-coordinate (if i == 1).
-     */
-    Approximate_number_type operator() (const Point_2& p,
-                                        int i) const
-    {
-      CGAL_precondition (i == 0 || i == 1);
-
-      if (i == 0)
-	return (CGAL::to_double(p.x()));
-      else
-	return (CGAL::to_double(p.y()));
-    }
-  };
-
-  /*! Get an Approximate_2 functor object. */
-  Approximate_2 approximate_2_object () const
-  {
-    return Approximate_2();
-  }
-
-  class Construct_x_monotone_curve_2
-  {
-  public:
-
-    /*!
-     * Return an x-monotone curve connecting the two given endpoints.
-     * \param p The first point.
-     * \param q The second point.
-     * \pre p and q must not be the same.
-     * \return A segment connecting p and q.
-     */
-    X_monotone_curve_2 operator() (const Point_2& p,
-                                   const Point_2& q) const
-    {
-      return (X_monotone_curve_2 (p, q));
-    }
-  };
-
-  /*! Get a Construct_x_monotone_curve_2 functor object. */
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
-  {
-    return Construct_x_monotone_curve_2();
-  }
-  //@}
-
-  /// \name Functor definitions for the Boolean set-operation traits.
-  //@{
- 
-  class Compare_endpoints_xy_2
-  {
-  public:
-
-    /*!
-     * Compare the endpoints of an $x$-monotone curve lexicographically.
-     * (assuming the curve has a designated source and target points).
-     * \param cv The curve.
-     * \return SMALLER if the curve is directed right;
-     *         LARGER if the curve is directed left.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv) const
-    {
-      if (cv.is_directed_right())
-        return (SMALLER);
-      else
-	return (LARGER);
-    }
-  };
-
-  /*! Get a Compare_endpoints_xy_2 functor object. */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-
-  class Construct_opposite_2
-  {
-  public:
-
-    /*!
-     * Construct an opposite x-monotone (with swapped source and target).
-     * \param cv The curve.
-     * \return The opposite curve.
-     */
-    X_monotone_curve_2 operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.flip());
-    }
-  };
-
-  /*! Get a Construct_opposite_2 functor object. */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  }
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_dcel_base.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_dcel_base.h
deleted file mode 100644
index 9ca21d7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_dcel_base.h
+++ /dev/null
@@ -1,1672 +0,0 @@
-// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein <wein at post.tau.ac.il>
-//                 (based on old version by: Iddo Hanniel and Oren Nechushtan)
-
-#ifndef CGAL_ARR_DCEL_BASE_H
-#define CGAL_ARR_DCEL_BASE_H
-
-/*! \file
- * The definition of the base DCEL class for planar arrangements and its
- * peripheral records.
- */
-
-#include <CGAL/basic.h>
-#include <CGAL/Arr_enums.h>
-#include <list>
-#include <map>
-#include <CGAL/N_step_adaptor_derived.h>
-#include <CGAL/In_place_list.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
-#include <CGAL/assertions.h>
-
-
-namespace CGAL {
-
-inline void* _clean_pointer (const void* p)
-{
-  CGAL_static_assertion(sizeof(void*) == sizeof(size_t));
-  const size_t  mask = ~1;
-  const size_t  val = (reinterpret_cast<size_t>(p) & mask);
-
-  return (reinterpret_cast<void*> (val));
-}
-
-inline void* _set_lsb (const void* p)
-{
-  const size_t  mask = 1;
-  const size_t  val = (reinterpret_cast<size_t>(p) | mask);
-
-  return (reinterpret_cast<void*> (val));
-}
-
-inline bool _is_lsb_set (const void* p)
-{
-  const size_t  mask = 1;
-  const size_t  val = reinterpret_cast<size_t>(p);
-
-  return ((val & mask) != 0); 
-}
-
-/*! \class
- * Base vertex class. 
- */
-template <class Point_> class Arr_vertex_base 
-{
-public:
-
-  typedef Point_       Point;
-
-  /*! \struct
-   * An auxiliary structure for rebinding the vertex with a new point class.
-   */
-  template<typename PNT>
-  struct rebind
-  {
-    typedef Arr_vertex_base<PNT>             other;
-  };
-
-protected:
-
-  void       *p_inc;  // An incident halfedge pointing at the vertex,
-                      // or the isolated vertex information (in case it is
-                      // isolated). The LSB of the pointer indicates whether
-                      // the vertex is isolated.
-  Point      *p_pt;   // The point associated with the vertex.
-  char        pss[2]; // The x and y parameter spaces (condensed in two bytes).
-
-public:
-
-  /*! Default constructor. */
-  Arr_vertex_base() :
-    p_inc (NULL),
-    p_pt (NULL)
-  {
-    pss[0] = pss[1] = static_cast<char> (CGAL::ARR_INTERIOR);
-  }
-  
-  /*! Destructor. */
-  virtual ~Arr_vertex_base() {}
-
-  /*! Check if the point pointer is NULL. */
-  bool has_null_point () const
-  {
-    return (p_pt == NULL);
-  }
-
-  /*! Get the point (const version). */
-  const Point& point() const 
-  {
-    CGAL_assertion (p_pt != NULL);
-    return (*p_pt);
-  }
-
-  /*! Get the point (non-const version). */
-  Point& point() 
-  { 
-    CGAL_assertion (p_pt != NULL);
-    return (*p_pt);
-  }
-
-  /*! Set the point (may be a NULL point). */
-  void set_point (Point *p) 
-  {
-    p_pt = p;
-  }
-
-  /*! Get the boundary type in x. */
-  Arr_parameter_space parameter_space_in_x () const
-  {
-    return (Arr_parameter_space (pss[0]));
-  }
-
-  /*! Get the boundary type in y. */
-  Arr_parameter_space parameter_space_in_y () const
-  {
-    return (Arr_parameter_space (pss[1]));
-  }
-
-  /*! Set the boundary conditions of the vertex. */
-  void set_boundary (Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-  {
-    pss[0] = static_cast<char> (ps_x);
-    pss[1] = static_cast<char> (ps_y);
-    return;
-  }
-
-  /*! Assign from another vertex. */
-  virtual void assign (const Arr_vertex_base<Point>& v)
-  {
-    p_pt = v.p_pt;
-    pss[0] = v.pss[0];
-    pss[1] = v.pss[1];
-  }
-};
-
-/*! \class
- * Base halfedge class.
- */
-template <class X_monotone_curve_> class Arr_halfedge_base 
-{
-public:
-
-  typedef X_monotone_curve_  X_monotone_curve;
-
-  /*! \struct
-   * An auxiliary structure for rebinding the halfedge with a new curve class.
-   */
-  template<typename XCV>
-  struct rebind
-  {
-    typedef Arr_halfedge_base<XCV>           other;
-  };
-
-protected:
-
-  void       *p_opp;   // The opposite halfedge.
-  void       *p_prev;  // The previous halfedge in the component boundary.
-  void       *p_next;  // The next halfedge in the component boundary.
-
-  void       *p_v;     // The incident vertex (the target of the halfedge).
-                       // The LSB of this pointer is used to store the
-                       // direction of the halfedge.
-  void       *p_comp;  // The component this halfedge belongs to: the incident
-                       // face for outer CCBs and the inner CCB information for
-                       // inner CCBs. The LSB of the pointer indicates whether
-                       // the halfedge lies on the boundary of an inner CCB.
-  
-  X_monotone_curve *p_cv; // The associated x-monotone curve.
-
-public:
-
-  /*! Default constructor */
-  Arr_halfedge_base() :
-    p_opp (NULL),
-    p_prev (NULL),
-    p_next (NULL),
-    p_v (NULL),
-    p_comp (NULL),
-    p_cv (NULL)
-  {}
-
-  /*! Destructor. */
-  virtual ~Arr_halfedge_base()
-  {}
-
-  /*! Check if the curve pointer is NULL. */
-  bool has_null_curve () const
-  {
-    return (p_cv == NULL);
-  }
-
-  /*! Get the x-monotone curve (const version). */
-  const X_monotone_curve& curve() const 
-  {
-    CGAL_precondition (p_cv != NULL);
-    return (*p_cv);
-  }
-
-  /*! Get the x-monotone curve (non-const version). */
-  X_monotone_curve& curve () 
-  {
-    CGAL_precondition (p_cv != NULL);
-    return (*p_cv);
-  }
-
-  /*! Set the x-monotone curve. */
-  void set_curve (X_monotone_curve* c)
-  { 
-    p_cv = c;
-
-    // Set the curve for the opposite halfedge as well.
-    Arr_halfedge_base<X_monotone_curve>* opp =
-      reinterpret_cast<Arr_halfedge_base<X_monotone_curve>* > (p_opp);
-
-    opp->p_cv = c;
-  }
-
-  /*! Assign from another halfedge. */
-  virtual void assign (const Arr_halfedge_base<X_monotone_curve>& he)
-  {
-    p_cv = he.p_cv;
-  }
-};
-
-/*!
- * Base face class.
- */
-class Arr_face_base
-{
-public:
-
-  typedef std::list<void*>                      Outer_ccbs_container;
-  typedef Outer_ccbs_container::iterator        Outer_ccb_iterator;
-  typedef Outer_ccbs_container::const_iterator  Outer_ccb_const_iterator;
-
-  typedef std::list<void*>                      Inner_ccbs_container;
-  typedef Inner_ccbs_container::iterator        Inner_ccb_iterator;
-  typedef Inner_ccbs_container::const_iterator  Inner_ccb_const_iterator;
-
-  typedef std::list<void*>                      Isolated_vertices_container;
-  typedef Isolated_vertices_container::iterator Isolated_vertex_iterator;
-  typedef Isolated_vertices_container::const_iterator
-                                                Isolated_vertex_const_iterator;
-  
-protected:
-
-  enum
-  {
-    IS_UNBOUNDED = 1,
-    IS_FICTITIOUS = 2
-  };
-
-  int                          flags;      // Face flags.
-  Outer_ccbs_container         outer_ccbs; // The outer CCBs of the faces.
-  Inner_ccbs_container         inner_ccbs; // The inner CCBs of the face.
-  Isolated_vertices_container  iso_verts;  // The isolated vertices inside
-                                           // the face.
-
-public:
-
-  /*! Default constructor. */
-  Arr_face_base() :
-    flags (0)
-  {}
-
-  /*! Destructor. */
-  virtual ~Arr_face_base()
-  {}
-
-  /*! Check if the face is unbounded. */
-  bool is_unbounded () const
-  {
-    return ((flags & IS_UNBOUNDED) != 0);
-  }
-
-  /*! Set the face as bounded or unbounded. */
-  void set_unbounded (bool unbounded)
-  {
-    flags = (unbounded) ? (flags | IS_UNBOUNDED) : (flags & ~IS_UNBOUNDED);
-  }
-
-  /*! Check if the face is fictitious. */
-  bool is_fictitious () const
-  {
-    return ((flags & IS_FICTITIOUS) != 0);
-  }
-
-  /*! Set the face as fictitious or valid. */
-  void set_fictitious (bool fictitious)
-  {
-    flags = (fictitious) ? (flags | IS_FICTITIOUS) : (flags & ~IS_FICTITIOUS);
-  }
-
-  /*! Assign from another face. */
-  virtual void assign (const Arr_face_base& f)
-  {
-    flags = f.flags;
-  }
-};
-
-// Forward declarations:
-template <class V, class H, class F> class Arr_vertex;
-template <class V, class H, class F> class Arr_halfedge;
-template <class V, class H, class F> class Arr_face;
-template <class V, class H, class F> class Arr_outer_ccb;
-template <class V, class H, class F> class Arr_inner_ccb;
-template <class V, class H, class F> class Arr_isolated_vertex;
-
-/*! \class
- * The default arrangement DCEL vertex class.
- */
-template <class V, class H, class F>
-class Arr_vertex : public V,
-                   public In_place_list_base<Arr_vertex<V,H,F> >
-{
-public:
-
-  typedef V                           Base;
-  typedef Arr_vertex<V,H,F>           Vertex;
-  typedef Arr_halfedge<V,H,F>         Halfedge;
-  typedef Arr_isolated_vertex<V,H,F>  Isolated_vertex;
-
-  /*! Default constructor. */
-  Arr_vertex() 
-  {}
-
-  /*! Check if the vertex is isolated. */
-  bool is_isolated () const
-  {
-    // Note that we use the LSB of the p_inc pointer as a Boolean flag.
-    return (_is_lsb_set (this->p_inc));
-  }
-
-  /*! Get an incident halfedge (const version). */
-  const Halfedge* halfedge () const
-  {
-    CGAL_precondition (! is_isolated());
-    return (reinterpret_cast<const Halfedge*>(this->p_inc));
-  }
-
-  /*! Get an incident halfedge (non-const version). */
-  Halfedge* halfedge ()
-  {
-    CGAL_precondition (! is_isolated());
-    return (reinterpret_cast<Halfedge*>(this->p_inc));
-  }
-
-  /*! Set an incident halfedge (for non-isolated vertices). */
-  void set_halfedge (Halfedge* he)
-  { 
-    // Set the halfedge pointer and reset the LSB.
-    this->p_inc = he;
-  }
-
-  /*! Get the isolated vertex information (const version). */
-  const Isolated_vertex* isolated_vertex () const
-  {
-    CGAL_precondition (is_isolated());
-    return (reinterpret_cast<const Isolated_vertex*>(_clean_pointer 
-                                                     (this->p_inc)));
-  }
-
-  /*! Get the isolated vertex information (non-const version). */
-  Isolated_vertex* isolated_vertex ()
-  {
-    CGAL_precondition (is_isolated());
-    return (reinterpret_cast<Isolated_vertex*>(_clean_pointer (this->p_inc)));
-  }
-
-  /*! Set the isolated vertex information. */
-  void set_isolated_vertex (Isolated_vertex* iv)
-  {
-    // Set the isolated vertex-information pointer and set its LSB.
-    this->p_inc = _set_lsb (iv);
-  }
-};
-
-/*! \class
- * The default arrangement DCEL halfedge class.
- */
-template <class V, class H, class F>
-class Arr_halfedge : public H,
-                     public In_place_list_base<Arr_halfedge<V,H,F> >
-{
-public:
-
-  typedef H                     Base;
-  typedef Arr_vertex<V,H,F>     Vertex;
-  typedef Arr_halfedge<V,H,F>   Halfedge;
-  typedef Arr_face<V,H,F>       Face;
-  typedef Arr_outer_ccb<V,H,F>  Outer_ccb;
-  typedef Arr_inner_ccb<V,H,F>  Inner_ccb;
-
-  /*! Default constructor. */
-  Arr_halfedge()
-  {}
-
-  /*! Get the opposite halfedge (const version). */
-  const Halfedge* opposite () const
-  { 
-    return (reinterpret_cast<const Halfedge*>(this->p_opp));
-  }
-  
-  /*! Get the opposite halfedge (non-const version). */
-  Halfedge* opposite ()
-  { 
-    return (reinterpret_cast<Halfedge*>(this->p_opp));
-  }
-
-  /*! Sets the opposite halfedge. */
-  void set_opposite (Halfedge* he) 
-  { 
-    this->p_opp = he;
-  }
-
-  /*! Get the direction of the halfedge. */
-  Arr_halfedge_direction direction () const
-  {
-    // Note that we use the LSB of the p_v pointer as a Boolean flag.
-    if (_is_lsb_set (this->p_v))
-      return (ARR_LEFT_TO_RIGHT);
-    else
-      return (ARR_RIGHT_TO_LEFT);
-  }
-
-  /*! Set the direction of the edge (and of its opposite halfedge). */
-  void set_direction (Arr_halfedge_direction dir)
-  {
-    Halfedge*   opp = reinterpret_cast<Halfedge*> (this->p_opp);
-
-    if (dir == ARR_LEFT_TO_RIGHT)
-    {
-      this->p_v = _set_lsb (this->p_v);
-      opp->p_v = _clean_pointer (opp->p_v);
-    }
-    else
-    {
-      this->p_v = _clean_pointer (this->p_v);
-      opp->p_v = _set_lsb (opp->p_v);
-    }
-  }
-
-  /*! Get the previous halfedge along the chain (const version). */
-  const Halfedge* prev () const
-  {
-    return (reinterpret_cast<const Halfedge*>(this->p_prev));
-  }
-
-  /*! Get the previous halfedge along the chain (const version). */
-  Halfedge* prev ()
-  {
-    return (reinterpret_cast<Halfedge*>(this->p_prev));
-  }
-
-  /*! Set the previous halfedge along the chain. */
-  void set_prev (Halfedge* he)
-  {
-    this->p_prev = he;
-    he->p_next = this;
-  }
-
-  /*! Get the next halfedge along the chain (const version). */
-  const Halfedge* next () const
-  {
-    return (reinterpret_cast<const Halfedge*>(this->p_next));
-  }
-
-  /*! Get the next halfedge along the chain (const version). */
-  Halfedge* next ()
-  {
-    return (reinterpret_cast<Halfedge*>(this->p_next));
-  }
-
-  /*! Set the next halfedge along the chain. */
-  void set_next (Halfedge* he)
-  {
-    this->p_next = he;
-    he->p_prev = this;
-  }
-
-  /*! Get the target vertex (const version). */
-  const Vertex* vertex () const 
-  { 
-    return (reinterpret_cast<const Vertex*>(_clean_pointer (this->p_v)));
-  }
-
-  /*! Get the target vertex (non-const version). */
-  Vertex* vertex ()
-  { 
-    return (reinterpret_cast<Vertex*>(_clean_pointer (this->p_v)));
-  }
-
-  /*! Set the target vertex. */
-  void set_vertex (Vertex* v)
-  {
-    // Set the vertex pointer, preserving the content of the LSB.
-    if (_is_lsb_set (this->p_v))
-      this->p_v = _set_lsb (v);
-    else
-      this->p_v = v;
-  }
-
-  /*! Check whether the halfedge lies on the boundary of an outer CCB. */
-  bool is_on_outer_ccb () const
-  {
-    return (!_is_lsb_set (this->p_comp));
-  }
-
-
-  /*!
-   * Get an incident outer CCB (const version).
-   * \pre The edge does not lie on an inner CCB.
-   */
-  const Outer_ccb* outer_ccb () const
-  {
-    CGAL_precondition (! is_on_inner_ccb());
-    return (reinterpret_cast<const Outer_ccb*>(this->p_comp));
-  }
-
-  /*!
-   * Get an incident outer CCB (non-const version).
-   * \pre The edge does not lie on an inner CCB.
-   */
-  Outer_ccb* outer_ccb ()
-  {
-    CGAL_precondition (! is_on_inner_ccb());
-    return (reinterpret_cast<Outer_ccb*>(this->p_comp));
-  }
-
-  /*! Set the incident outer CCB. */
-  void set_outer_ccb (Outer_ccb *oc)
-  { 
-    // Set the component pointer and reset its LSB.
-    this->p_comp = oc;
-  }
-
-  /*! Check whether the halfedge lies on the boundary of an inner CCB. */
-  bool is_on_inner_ccb () const
-  {
-    return (_is_lsb_set (this->p_comp));
-  }
-
-  /*!
-   * Get an incident inner CCB (const version).
-   * \pre The edge lies on an inner CCB.
-   */
-  const Inner_ccb* inner_ccb () const 
-  {     
-    CGAL_precondition (is_on_inner_ccb());
-    return (reinterpret_cast<const Inner_ccb*>(_clean_pointer (this->p_comp)));
-  }
-
-  /*!
-   * Get an incident inner CCB (non-const version).
-   * \pre The edge lies on an inner CCB.
-   */
-  Inner_ccb* inner_ccb () 
-  {
-    CGAL_precondition (is_on_inner_ccb());
-    return (reinterpret_cast<Inner_ccb*> (_clean_pointer (this->p_comp)));
-  }
-
-  /*! Set the incident inner CCB. */
-  void set_inner_ccb (Inner_ccb *ic)
-  { 
-    // Set the component pointer and set its LSB.
-    this->p_comp = _set_lsb (ic);
-  }
-};
-
-/*! \class
- * The default arrangement DCEL face class.
- */
-template <class V, class H, class F>
-class Arr_face : public F,
-                 public In_place_list_base<Arr_face<V,H,F> >
-{
-public:
-
-  typedef F                            Base;
-  typedef Arr_vertex<V,H,F>            Vertex;
-  typedef Arr_halfedge<V,H,F>          Halfedge;
-  typedef Arr_face<V,H,F>              Face;
-  typedef Arr_outer_ccb<V,H,F>         Outer_ccb;
-  typedef Arr_inner_ccb<V,H,F>         Inner_ccb;
-  typedef Arr_isolated_vertex<V,H,F>   Isolated_vertex;
-
-  typedef Inner_ccb                    Hole;
-  
-private:
-
-  typedef Cast_function_object<void*,
-                               Halfedge*>        _Ccb_to_halfedge_cast;
-  // typedef Cast_function_object<const void*,
-  //                              const Halfedge*>  _Const_ccb_to_halfedge_cast;
-  typedef _Ccb_to_halfedge_cast _Const_ccb_to_halfedge_cast;
-
-public:
-
-  /*! Default constructor. */
-  Arr_face()
-  {}
-
-  // Definition of the outer CCB iterators:
-  typedef Iterator_project<typename F::Outer_ccb_iterator, 
-                           _Ccb_to_halfedge_cast>   Outer_ccb_iterator;
-
-  typedef Iterator_project<typename F::Outer_ccb_const_iterator,
-                           _Const_ccb_to_halfedge_cast> 
-                                                    Outer_ccb_const_iterator;
-
-  /*! Get the number of outer CCBs the face has. */
-  size_t number_of_outer_ccbs () const
-  {
-    return (this->outer_ccbs.size());
-  }
-
-  /*! Get an iterator for the first outer CCB of the face. */
-  Outer_ccb_iterator outer_ccbs_begin()
-  {
-    return (this->outer_ccbs.begin());
-  }
-
-  /*! Get a past-the-end iterator for the outer CCBs inside the face. */
-  Outer_ccb_iterator outer_ccbs_end()
-  {
-    return (this->outer_ccbs.end());
-  }
-
-  /*! Get an const iterator for the first outer CCB inside the face. */
-  Outer_ccb_const_iterator outer_ccbs_begin() const
-  {
-    return (this->outer_ccbs.begin());
-  }
-
-  /*! Get a const past-the-end iterator for the outer CCBs inside the face. */
-  Outer_ccb_const_iterator outer_ccbs_end() const
-  {
-    return (this->outer_ccbs.end());
-  }
-
-  /*! Add an outer CCB to the face. */
-  void add_outer_ccb (Outer_ccb *oc, Halfedge *h)
-  {
-    oc->set_iterator (this->outer_ccbs.insert (this->outer_ccbs.end(), h));
-    return;
-  }
-
-  /*! Erase an outer CCB of the face. */
-  void erase_outer_ccb (Outer_ccb *oc)
-  {
-    this->outer_ccbs.erase (oc->iterator().current_iterator());
-  }
-
-  // Definition of the inner CCB iterators:
-  typedef Iterator_project<typename F::Inner_ccb_iterator, 
-                           _Ccb_to_halfedge_cast>   Inner_ccb_iterator;
-
-  typedef Iterator_project<typename F::Inner_ccb_const_iterator,
-                           _Const_ccb_to_halfedge_cast> 
-                                                    Inner_ccb_const_iterator;
-
-  typedef Inner_ccb_iterator                        Hole_iterator;
-  typedef Inner_ccb_const_iterator                  Hole_const_iterator;
-  
-  /*! Get the number of inner CCBs the face has. */
-  size_t number_of_inner_ccbs () const
-  {
-    return (this->inner_ccbs.size());
-  }
-
-  /*! Get an iterator for the first inner CCB of the face. */
-  Inner_ccb_iterator inner_ccbs_begin()
-  {
-    return (this->inner_ccbs.begin());
-  }
-
-  /*! Get a past-the-end iterator for the inner CCBs inside the face. */
-  Inner_ccb_iterator inner_ccbs_end()
-  {
-    return (this->inner_ccbs.end());
-  }
-
-  /*! Get an const iterator for the first inner CCB inside the face. */
-  Inner_ccb_const_iterator inner_ccbs_begin() const
-  {
-    return (this->inner_ccbs.begin());
-  }
-
-  /*! Get a const past-the-end iterator for the inner CCBs inside the face. */
-  Inner_ccb_const_iterator inner_ccbs_end() const
-  {
-    return (this->inner_ccbs.end());
-  }
-
-  /*! Add an inner CCB to the face. */
-  void add_inner_ccb (Inner_ccb *ic, Halfedge *h)
-  {
-    ic->set_iterator (this->inner_ccbs.insert (this->inner_ccbs.end(), h));
-    return;
-  }
-
-  /*! Erase an inner CCB of the face. */
-  void erase_inner_ccb (Inner_ccb *ic)
-  {
-    this->inner_ccbs.erase (ic->iterator().current_iterator());
-  }
-
-  // Backward compatibility:
-  size_t number_of_holes () const { return number_of_inner_ccbs(); }
-  Hole_iterator holes_begin() { return inner_ccbs_begin(); }
-  Hole_iterator holes_end() { return inner_ccbs_end(); }
-  Hole_const_iterator holes_begin() const { return inner_ccbs_begin(); }
-  Hole_const_iterator holes_end() const { return inner_ccbs_end(); }
-
-  // Definition of the isloated vertices iterators:
-  typedef I_Dereference_iterator<
-    typename F::Isolated_vertex_iterator,
-    Vertex,
-    typename F::Isolated_vertex_iterator::difference_type,
-    typename F::Isolated_vertex_iterator::iterator_category>
-                                              Isolated_vertex_iterator;
-  
-  typedef I_Dereference_const_iterator<
-    typename F::Isolated_vertex_const_iterator,
-    typename F::Isolated_vertex_iterator,
-    Vertex,
-    typename F::Isolated_vertex_iterator::difference_type,
-    typename F::Isolated_vertex_iterator::iterator_category>
-                                              Isolated_vertex_const_iterator;
-
-  /*! Get the number of isloated vertices inside the face. */
-  size_t number_of_isolated_vertices() const
-  {
-    return (this->iso_verts.size());
-  }
-
-  /*! Get an iterator for the first isloated vertex inside the face. */
-  Isolated_vertex_iterator isolated_vertices_begin()
-  {
-    return (this->iso_verts.begin());
-  }
-
-  /*! Get a past-the-end iterator for the isloated vertices inside the face. */
-  Isolated_vertex_iterator isolated_vertices_end()
-  {
-    return (this->iso_verts.end());
-  }
-
-  /*! Get an const iterator for the first isloated vertex inside the face. */
-  Isolated_vertex_const_iterator isolated_vertices_begin() const
-  {
-    return (this->iso_verts.begin());
-  }
-
-  /*! Get a const past-the-end iterator for the isloated vertices inside the
-   * face. */
-  Isolated_vertex_const_iterator isolated_vertices_end() const
-  {
-    return (this->iso_verts.end());
-  }
-
-  /*! Add an isloated vertex inside the face. */
-  void add_isolated_vertex (Isolated_vertex *iv, Vertex* v)
-  {
-    iv->set_iterator (this->iso_verts.insert (this->iso_verts.end(), v));
-    return;
-  }
-
-  /*! Erase an isloated vertex from the face. */
-  void erase_isolated_vertex (Isolated_vertex *iv)
-  {
-    this->iso_verts.erase (iv->iterator().current_iterator());
-    return;
-  }
-
-};
-
-/*! \class
- * Representation of an outer CCB.
- */
-template <class V, class H, class F>
-class Arr_outer_ccb : public In_place_list_base<Arr_outer_ccb<V,H,F> >
-{
-public:
-
-  typedef Arr_outer_ccb<V,H,F>               Self;
-  typedef Arr_halfedge<V,H,F>                Halfedge;
-  typedef Arr_face<V,H,F>                    Face;
-  typedef typename Face::Outer_ccb_iterator  Outer_ccb_iterator;
-
-private:
-
-  Face               *p_f;    // The face the contains the CCB in its interior.
-  Outer_ccb_iterator  iter;   // The outer CCB identifier.
-  bool iter_is_not_singular;
-
-public:
-
-  /*! Default constructor. */
-  Arr_outer_ccb () :
-    p_f (NULL), iter_is_not_singular(false)
-  {}
-
-  /*! Copy constructor. */
-  Arr_outer_ccb (const Arr_outer_ccb& other )
-    : p_f (other.p_f), iter_is_not_singular(other.iter_is_not_singular)
-  {
-    if(other.iter_is_not_singular) {
-      iter = other.iter;
-    }
-  }
-
-  /*! Get a halfedge along the component (const version). */
-  const Halfedge* halfedge () const
-  {
-    return (*iter);
-  }
-
-  /*! Get a halfedge along the component (non-const version). */
-  Halfedge* halfedge ()
-  {
-    return (*iter);
-  }
-
-  /*! Set a representative halfedge for the component. */
-  void set_halfedge (Halfedge *he)
-  {
-    *iter = he;
-    return;
-  }
-
-  /*! Get the incident face (const version). */
-  const Face* face () const
-  {
-    return (p_f);
-  }
-
-  /*! Get the incident face (non-const version). */
-  Face* face ()
-  {
-    return (p_f);
-  }
-
-  /*! Set the incident face. */
-  void set_face (Face* f)
-  {
-    p_f = f;
-    return;
-  }
-
-  /*! Get the iterator (const version). */
-  Outer_ccb_iterator iterator () const
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iter);
-  }
-
-  /*! Get the iterator (non-const version). */
-  Outer_ccb_iterator iterator ()
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iter);
-  }
-
-  /*! Set the outer CCB iterator. */
-  void set_iterator (Outer_ccb_iterator it)
-  {
-    iter = it;
-    iter_is_not_singular = true;
-    return;
-  }
-};
-
-/*! \class
- * Representation of an inner CCB.
- */
-template <class V, class H, class F>
-class Arr_inner_ccb : public In_place_list_base<Arr_inner_ccb<V,H,F> >
-{
-public:
-
-  typedef Arr_inner_ccb<V,H,F>               Self;
-  typedef Arr_halfedge<V,H,F>                Halfedge;
-  typedef Arr_face<V,H,F>                    Face;
-  typedef typename Face::Inner_ccb_iterator  Inner_ccb_iterator;
-
-private:
-
-  Face               *p_f;    // The face the contains the CCB in its interior.
-  Inner_ccb_iterator  iter;   // The inner CCB identifier.
-  bool iter_is_not_singular;
-
-public:
-
-  /*! Default constructor. */
-  Arr_inner_ccb () :
-    p_f (NULL), iter_is_not_singular(false)
-  {}
-
-  /*! Copy constructor. */
-  Arr_inner_ccb (const Arr_inner_ccb& other )
-    : p_f (other.p_f), iter_is_not_singular(other.iter_is_not_singular)
-  {
-    if(other.iter_is_not_singular) {
-      iter = other.iter;
-    }
-  }
-
-  /*! Get a halfedge along the component (const version). */
-  const Halfedge* halfedge () const
-  {
-    return (*iter);
-  }
-
-  /*! Get a halfedge along the component (non-const version). */
-  Halfedge* halfedge ()
-  {
-    return (*iter);
-  }
-
-  /*! Set a representative halfedge for the component. */
-  void set_halfedge (Halfedge *he)
-  {
-    *iter = he;
-    return;
-  }
-
-  /*! Get the incident face (const version). */
-  const Face* face () const
-  {
-    return (p_f);
-  }
-
-  /*! Get the incident face (non-const version). */
-  Face* face ()
-  {
-    return (p_f);
-  }
-
-  /*! Set the incident face. */
-  void set_face (Face* f)
-  {
-    p_f = f;
-    return;
-  }
-
-  /*! Get the iterator (const version). */
-  Inner_ccb_iterator iterator () const
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iter);
-  }
-
-  /*! Get the iterator (non-const version). */
-  Inner_ccb_iterator iterator ()
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iter);
-  }
-
-  /*! Set the inner CCB iterator. */
-  void set_iterator (Inner_ccb_iterator it)
-  {
-    iter = it;
-    iter_is_not_singular = true;
-    return;
-  }
-};
-
-/*! \class
- * Representation of an isolated vertex.
- */
-template <class V, class H, class F>
-class Arr_isolated_vertex : 
-public In_place_list_base<Arr_isolated_vertex<V,H,F> >
-{
-public:
-
-  typedef Arr_isolated_vertex<V,H,F>                Self;
-  typedef Arr_face<V,H,F>                           Face;
-  typedef typename Face::Isolated_vertex_iterator   Isolated_vertex_iterator;
-
-private:
-
-  Face                        *p_f;     // The containing face.
-  Isolated_vertex_iterator   iv_it;     // The isolated vertex identifier.
-  bool iter_is_not_singular;
-
-public:
-
-  /*! Default constructor. */
-  Arr_isolated_vertex ():
-    p_f (NULL), iter_is_not_singular(false)
-  {}
-
-  /*! Copy constructor. */
-  Arr_isolated_vertex (const Arr_isolated_vertex& other )
-    : p_f (other.p_f), iter_is_not_singular(other.iter_is_not_singular)
-  {
-    if(other.iter_is_not_singular) {
-      iv_it = other.iv_it;
-    }
-  }
-
-  /*! Get the containing face (const version). */
-  const Face* face () const
-  {
-    return (p_f);
-  }
-
-  /*! Get the containing face (non-const version). */
-  Face* face ()
-  {
-    return (p_f);
-  }
-
-  /*! Set the incident face, the one that contains the isolated vertex. */
-  void set_face (Face* f)
-  {
-    p_f = f;
-    return;
-  }
-
-  /*! Get the isolated vertex iterator (const version). */
-  Isolated_vertex_iterator iterator () const
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iv_it);
-  }
-
-  /*! Get the isolated vertex iterator (non-const version). */
-  Isolated_vertex_iterator iterator ()
-  {
-    CGAL_assertion(iter_is_not_singular);
-    return (iv_it);
-  }
-
-  /*! Set the isolated vertex iterator. */
-  void set_iterator (Isolated_vertex_iterator iv)
-  {
-    iv_it = iv;
-    iter_is_not_singular = true;
-    return;
-  }
-};
-
-/*! \class
- * The arrangement DCEL class.
- */
-template <class V, class H, class F,
-          class Allocator = CGAL_ALLOCATOR(int) >
-class Arr_dcel_base
-{
-public:
-
-  // Define the vertex, halfedge and face types.
-  typedef Arr_dcel_base<V,H,F>        Self;
-  typedef Arr_vertex<V,H,F>           Vertex;
-  typedef Arr_halfedge<V,H,F>         Halfedge;
-  typedef Arr_face<V,H,F>             Face;
-  typedef Arr_outer_ccb<V,H,F>        Outer_ccb;
-  typedef Arr_inner_ccb<V,H,F>        Inner_ccb;
-  typedef Arr_isolated_vertex<V,H,F>  Isolated_vertex;
-
-  typedef Inner_ccb                   Hole;
-  
-protected:
-
-  // The vetices, halfedges and faces are stored in three in-place lists.
-  typedef In_place_list<Vertex, false>           Vertex_list;
-  typedef In_place_list<Halfedge, false>         Halfedge_list;
-  typedef In_place_list<Face, false>             Face_list;
-  typedef In_place_list<Outer_ccb, false>        Outer_ccb_list;
-  typedef In_place_list<Inner_ccb, false>        Inner_ccb_list;
-  typedef In_place_list<Isolated_vertex, false>  Iso_vert_list;
-
-  // Vertex allocator.
-  typedef typename Allocator::template rebind<Vertex>    Vertex_alloc_rebind;
-  typedef typename Vertex_alloc_rebind::other            Vertex_allocator;
-
-  // Halfedge allocator.
-  typedef typename Allocator::template rebind<Halfedge>  Halfedge_alloc_rebind;
-  typedef typename Halfedge_alloc_rebind::other          Halfedge_allocator;
-
-  // Face allocator.
-  typedef typename Allocator::template rebind<Face>      Face_alloc_rebind;
-  typedef typename Face_alloc_rebind::other              Face_allocator;
-  
-  // Outer CCB allocator.
-  typedef typename Allocator::template rebind<Outer_ccb> Out_ccb_alloc_rebind;
-  typedef typename Out_ccb_alloc_rebind::other           Outer_ccb_allocator;
-
-  // Inner CCB allocator.
-  typedef typename Allocator::template rebind<Inner_ccb> In_ccb_alloc_rebind;
-  typedef typename In_ccb_alloc_rebind::other            Inner_ccb_allocator;
-
-  // Isolated vertex allocator.
-  typedef typename Allocator::template rebind<Isolated_vertex>
-                                                         Iso_vert_alloc_rebind;
-  typedef typename Iso_vert_alloc_rebind::other          Iso_vert_allocator;
-
-public:
-
-  typedef typename Halfedge_list::size_type              Size;
-  typedef typename Halfedge_list::size_type              size_type;
-  typedef typename Halfedge_list::difference_type        difference_type;
-  typedef typename Halfedge_list::difference_type        Difference;
-  typedef std::bidirectional_iterator_tag                iterator_category;
-
-protected:
-
-  Vertex_list         vertices;             // The vertices container.
-  Halfedge_list       halfedges;            // The halfedges container.
-  Face_list           faces;                // The faces container.
-  Outer_ccb_list      out_ccbs;             // The outer CCBs.
-  Inner_ccb_list      in_ccbs;              // The inner CCBs.
-  Iso_vert_list       iso_verts;            // The isolated vertices.
-
-  Vertex_allocator    vertex_alloc;         // An allocator for vertices.
-  Halfedge_allocator  halfedge_alloc;       // An allocator for halfedges.
-  Face_allocator      face_alloc;           // An allocator for faces.
-  Outer_ccb_allocator out_ccb_alloc;        // An allocator for outer CCBs.
-  Inner_ccb_allocator in_ccb_alloc;         // An allocator for inner CCBs.
-  Iso_vert_allocator  iso_vert_alloc;       // Allocator for isolated vertices.
-
-public:
-
-  // Definitions of iterators.
-  typedef typename Vertex_list::iterator              Vertex_iterator;
-  typedef typename Halfedge_list::iterator            Halfedge_iterator;
-  typedef typename Face_list::iterator                Face_iterator;
-  typedef CGAL::N_step_adaptor_derived<Halfedge_iterator, 2>
-                                                      Edge_iterator;
-  
-  // Definitions of const iterators.
-  typedef typename Vertex_list::const_iterator        Vertex_const_iterator;
-  typedef typename Halfedge_list::const_iterator      Halfedge_const_iterator;
-  typedef typename Face_list::const_iterator          Face_const_iterator;
-  typedef CGAL::N_step_adaptor_derived<Halfedge_const_iterator, 2>
-                                                      Edge_const_iterator;
-
-private:
-
-  // Copy constructor - not supported.
-  Arr_dcel_base (const Self&) ;
-
-  // Assignment operator - not supported.
-  Self& operator= (const Self&);
-
-public:
-  /// \name Construction and destruction.
-  //@{
-  /*! Default constructor. */
-  Arr_dcel_base ()
-  {}
-  
-  /*! Destructor. */
-  ~Arr_dcel_base ()
-  {
-    delete_all();
-  }
-  //@}
-
-  /// \name The DCEL size.
-  //@{
-  /*! Get the number of DCEL vertices. */
-  Size size_of_vertices () const
-  { 
-    return (vertices.size());
-  }
-
-  /*! Get the number of DCEL halfedges (twice the number of edges). */
-  Size size_of_halfedges () const
-  {
-    return (halfedges.size());
-  }
-
-  /*! Get the number of DCEL faces. */
-  Size size_of_faces() const
-  {
-    return (faces.size());
-  }
-
-  /*! Get the number of outer CCBs. */
-  Size size_of_outer_ccbs() const
-  {
-    return (out_ccbs.size());
-  }
-
-  /*! Get the number of inner CCBs. */
-  Size size_of_inner_ccbs() const
-  {
-    return (in_ccbs.size());
-  }
-
-  /*! Get the number of isolated vertices. */
-  Size size_of_isolated_vertices () const
-  {
-    return (iso_verts.size());
-  }
-  //@}
-
-  /// \name Obtaining iterators.
-  //@{
-  Vertex_iterator   vertices_begin()  { return vertices.begin(); }
-  Vertex_iterator   vertices_end()    { return vertices.end(); }
-  Halfedge_iterator halfedges_begin() { return halfedges.begin();}
-  Halfedge_iterator halfedges_end()   { return halfedges.end(); }
-  Face_iterator     faces_begin()     { return faces.begin(); }
-  Face_iterator     faces_end()       { return faces.end(); }
-  Edge_iterator     edges_begin()     { return halfedges.begin(); }
-  Edge_iterator     edges_end()       { return halfedges.end(); }
-  //@}
-
-  /// \name Obtaining constant iterators.
-  //@{
-  Vertex_const_iterator   vertices_begin() const { return vertices.begin(); }
-  Vertex_const_iterator   vertices_end() const { return vertices.end(); }
-  Halfedge_const_iterator halfedges_begin() const { return halfedges.begin(); }
-  Halfedge_const_iterator halfedges_end() const { return halfedges.end(); }
-  Face_const_iterator     faces_begin() const { return faces.begin(); }
-  Face_const_iterator     faces_end() const { return faces.end(); }
-  Edge_const_iterator     edges_begin() const { return halfedges.begin(); }
-  Edge_const_iterator     edges_end() const { return halfedges.end(); }
-  //@}
-
-  // \name Creation of new DCEL features.
-  //@{
-  /*! Create a new vertex. */
-  Vertex* new_vertex()
-  {
-    Vertex     *v = vertex_alloc.allocate (1);
-
-    vertex_alloc.construct (v, Vertex());
-    vertices.push_back (*v);
-    return v;
-  }
-  
-  /*! Create a new pair of opposite halfedges. */
-  Halfedge* new_edge() 
-  {
-    // Create two new halfedges.
-    Halfedge   *h1 = _new_halfedge ();
-    Halfedge   *h2 = _new_halfedge ();
-
-    // Pair them together.
-    h1->set_opposite (h2);
-    h2->set_opposite (h1);
-
-    return (h1);
-  }
-
-  /*! Create a new face. */
-  Face* new_face()
-  {
-    Face       *f = face_alloc.allocate (1);
-    
-    face_alloc.construct (f, Face());
-    faces.push_back (*f);
-    return (f);
-  }
-
-  /*! Create a new outer CCB. */
-  Outer_ccb* new_outer_ccb ()
-  {
-    Outer_ccb  *oc = out_ccb_alloc.allocate (1);
-    out_ccb_alloc.construct (oc, Outer_ccb());
-    out_ccbs.push_back (*oc);
-    return (oc);
-  }
-
-  /*! Create a new inner CCB. */
-  Inner_ccb* new_inner_ccb ()
-  {
-    Inner_ccb  *ic = in_ccb_alloc.allocate (1);
-    
-    in_ccb_alloc.construct (ic, Inner_ccb());
-    in_ccbs.push_back (*ic);
-    return (ic);
-  }
-
-  /*! Create a new isolated vertex. */
-  Isolated_vertex* new_isolated_vertex ()
-  {
-    Isolated_vertex  *iv = iso_vert_alloc.allocate (1);
-    
-    iso_vert_alloc.construct (iv, Isolated_vertex());
-    iso_verts.push_back (*iv);
-    return (iv);
-  }
-  //@}
-
-  /// \name Deletion of DCEL features.
-  //@{
-  /*! Delete an existing vertex. */
-  void delete_vertex (Vertex *v)
-  {
-    vertices.erase (v);
-    vertex_alloc.destroy (v);
-    vertex_alloc.deallocate (v,1);
-  }
-  
-  /*! Delete an existing pair of opposite halfedges. */
-  void delete_edge (Halfedge *h) 
-  {
-    Halfedge   *h_opp = h->opposite();
-
-    _delete_halfedge (h);
-    _delete_halfedge (h_opp);
-  }
-
-  /*! Delete an existing face. */
-  void delete_face(Face *f)
-  {
-    faces.erase (f);
-    face_alloc.destroy (f);
-    face_alloc.deallocate (f, 1);
-  }
-
-  /*! Delete an existing outer CCB. */
-  void delete_outer_ccb (Outer_ccb *oc)
-  {
-    out_ccbs.erase (oc);
-    out_ccb_alloc.destroy (oc);
-    out_ccb_alloc.deallocate (oc, 1);
-  }
-
-  /*! Delete an existing inner CCB. */
-  void delete_inner_ccb (Inner_ccb *ic)
-  {
-    in_ccbs.erase (ic);
-    in_ccb_alloc.destroy (ic);
-    in_ccb_alloc.deallocate (ic, 1);
-  }
-
-  /*! Delete an existing isolated vertex. */
-  void delete_isolated_vertex (Isolated_vertex *iv)
-  {
-    iso_verts.erase (iv);
-    iso_vert_alloc.destroy (iv);
-    iso_vert_alloc.deallocate (iv, 1);
-  }
-  
-  /*! Delete all DCEL features. */
-  void delete_all() 
-  {
-    // Free all vertices.
-    Vertex_iterator    vit = vertices.begin(), v_curr;
-
-    while (vit != vertices.end())
-    {
-      v_curr = vit;
-      ++vit;
-      delete_vertex (&(*v_curr));
-    }
-
-    // Free all halfedges.
-    Halfedge_iterator  hit = halfedges.begin(), h_curr;
-
-    while (hit != halfedges.end())
-    {
-      h_curr = hit;
-      ++hit;
-      _delete_halfedge (&(*h_curr));
-    }
-
-    // Free all faces.
-    Face_iterator      fit = faces.begin(), f_curr;
-
-    while (fit != faces.end())
-    {
-      f_curr = fit;
-      ++fit;
-      delete_face (&(*f_curr));
-    }
-
-    // Free all outer CCBs.
-    typename Outer_ccb_list::iterator   ocit = out_ccbs.begin(), oc_curr;
-
-    while (ocit != out_ccbs.end())
-    {
-      oc_curr = ocit;
-      ++ocit;
-      delete_outer_ccb (&(*oc_curr));
-    }
-
-    // Free all inner CCBs.
-    typename Inner_ccb_list::iterator   icit = in_ccbs.begin(), ic_curr;
-
-    while (icit != in_ccbs.end())
-    {
-      ic_curr = icit;
-      ++icit;
-      delete_inner_ccb (&(*ic_curr));
-    }
-
-    // Free all isolated vertices.
-    typename Iso_vert_list::iterator   ivit = iso_verts.begin(), iv_curr;
-
-    while (ivit != iso_verts.end())
-    {
-      iv_curr = ivit;
-      ++ivit;
-      delete_isolated_vertex (&(*iv_curr));
-    }
-  }
-  //@}
-
-  /*!
-   * Assign our DCEL the contents of another DCEL.
-   */
-  void assign (const Self& dcel)
-  {
-    // Clear the current contents of the DCEL.
-    delete_all();
-
-    // Create duplicated of the DCEL features and map the features of the
-    // given DCEL to their corresponding duplicates.
-    typedef std::map<const Vertex*, Vertex*>                    Vertex_map;
-    typedef std::map<const Halfedge*, Halfedge*>                Halfedge_map;
-    typedef std::map<const Face*, Face*>                        Face_map;
-    typedef std::map<const Outer_ccb*, Outer_ccb*>              Outer_ccb_map;
-    typedef std::map<const Inner_ccb*, Inner_ccb*>              Inner_ccb_map;
-    typedef std::map<const Isolated_vertex*, Isolated_vertex*>  Iso_vert_map;
-
-    Vertex_map                v_map;
-    Vertex_const_iterator     vit;
-    Vertex                   *dup_v;
-
-    for (vit = dcel.vertices_begin(); vit != dcel.vertices_end(); ++vit)
-    {
-      dup_v = new_vertex();
-      dup_v->assign (*vit);
-      v_map.insert (typename Vertex_map::value_type (&(*vit), dup_v));
-    }
-
-    Halfedge_map              he_map;
-    Halfedge_const_iterator   hit;
-    Halfedge                 *dup_h;
-
-    for (hit = dcel.halfedges_begin(); hit != dcel.halfedges_end(); ++hit)
-    {
-      dup_h = _new_halfedge();
-      dup_h->assign (*hit);
-      he_map.insert (typename Halfedge_map::value_type(&(*hit), dup_h));
-    }
-
-    Face_map                  f_map;
-    Face_const_iterator       fit;
-    Face                     *dup_f;
-
-    for (fit = dcel.faces_begin(); fit != dcel.faces_end(); ++fit)
-    {
-      dup_f = new_face();
-      dup_f->assign (*fit);
-      f_map.insert (typename Face_map::value_type(&(*fit), dup_f));
-    }
-
-    Outer_ccb_map                            oc_map;
-    typename Outer_ccb_list::const_iterator  ocit;
-    Outer_ccb                               *dup_oc;
-
-    for (ocit = dcel.out_ccbs.begin(); ocit != dcel.out_ccbs.end(); ++ocit)
-    {
-      dup_oc = new_outer_ccb();
-      oc_map.insert (typename Outer_ccb_map::value_type(&(*ocit), dup_oc));
-    }
-
-    Inner_ccb_map                            ic_map;
-    typename Inner_ccb_list::const_iterator  icit;
-    Inner_ccb                               *dup_ic;
-
-    for (icit = dcel.in_ccbs.begin(); icit != dcel.in_ccbs.end(); ++icit)
-    {
-      dup_ic = new_inner_ccb();
-      ic_map.insert (typename Inner_ccb_map::value_type(&(*icit), dup_ic));
-    }
-
-    Iso_vert_map                            iv_map;
-    typename Iso_vert_list::const_iterator  ivit;
-    Isolated_vertex                        *dup_iv;
-
-    for (ivit = dcel.iso_verts.begin(); ivit != dcel.iso_verts.end(); ++ivit)
-    {
-      dup_iv = new_isolated_vertex();
-      iv_map.insert (typename Iso_vert_map::value_type(&(*ivit), dup_iv));
-    }
-
-    // Update the vertex records.
-    const Vertex             *v;
-    const Halfedge           *h;
-    const Face               *f;
-    const Outer_ccb          *oc;
-    const Inner_ccb          *ic;
-    const Isolated_vertex    *iv;
-    
-    for (vit = dcel.vertices_begin(); vit != dcel.vertices_end(); ++vit)
-    {
-      v = &(*vit);
-      dup_v = (v_map.find (v))->second;
-
-      if (v->is_isolated())
-      {
-        // Isolated vertex - set its information.
-        iv = v->isolated_vertex();
-        dup_iv = (iv_map.find (iv))->second;
-
-        dup_v->set_isolated_vertex (dup_iv);
-      }
-      else
-      {
-        // Regular vertex - set its incident halfedge.
-        h = v->halfedge();
-        dup_h = (he_map.find (h))->second;
-
-        dup_v->set_halfedge (dup_h);
-      }
-    }
-
-    // Update the halfedge records.
-    const Halfedge           *opp, *prev, *next;
-    Halfedge                 *dup_opp, *dup_prev, *dup_next;
-
-    for (hit = dcel.halfedges_begin(); hit != dcel.halfedges_end(); ++hit)
-    {
-      h = &(*hit);
-      v = h->vertex();
-      opp = h->opposite();
-      prev = h->prev();
-      next = h->next();
-
-      dup_h = (he_map.find (h))->second;
-      dup_v = (v_map.find (v))->second;
-      dup_opp = (he_map.find (opp))->second;
-      dup_prev = (he_map.find (prev))->second;
-      dup_next = (he_map.find (next))->second;
-
-      dup_h->set_vertex (dup_v);
-      dup_h->set_opposite (dup_opp);
-      dup_h->set_prev (dup_prev);
-      dup_h->set_next (dup_next);
-      dup_h->set_direction (h->direction());
-
-      if (h->is_on_inner_ccb())
-      {
-        // The halfedge lies on an inner CCB - set its inner CCB record.
-        ic = h->inner_ccb();
-        dup_ic = (ic_map.find (ic))->second;
-        dup_h->set_inner_ccb (dup_ic);
-      }
-      else
-      {
-        // The halfedge lies on an outer CCB - set its outer CCB record.
-        oc = h->outer_ccb();
-        dup_oc = (oc_map.find (oc))->second;
-        dup_h->set_outer_ccb (dup_oc);
-      }
-    }
-
-    // Update the face records, along with the CCB records and isolated vertex
-    // records.
-    typename Face::Outer_ccb_const_iterator        out_ccb_it;
-    typename Face::Inner_ccb_const_iterator        in_ccb_it;
-    typename Face::Isolated_vertex_const_iterator  iso_vert_it;
-    const Halfedge                      *hccb;
-    const Vertex                        *iso_vert;
-    Halfedge                            *dup_hccb;
-    Vertex                              *dup_iso_vert;
-
-    for (fit = dcel.faces_begin(); fit != dcel.faces_end(); ++fit)
-    {
-      f = &(*fit);
-      dup_f = (f_map.find (f))->second;
-      dup_f->set_unbounded (f->is_unbounded());
-      dup_f->set_fictitious (f->is_fictitious());
-
-      // Assign the outer CCBs of the face.
-      for (out_ccb_it = f->outer_ccbs_begin();
-           out_ccb_it != f->outer_ccbs_end(); ++out_ccb_it)
-      {
-        hccb = *out_ccb_it;
-
-        dup_hccb = (he_map.find (hccb))->second;
-        dup_oc = dup_hccb->outer_ccb();
-
-        dup_oc->set_face (dup_f);
-        dup_f->add_outer_ccb (dup_oc, dup_hccb);
-      }
-
-      // Assign the inner CCBs of the face.
-      for (in_ccb_it = f->inner_ccbs_begin();
-           in_ccb_it != f->inner_ccbs_end(); ++in_ccb_it)
-      {
-        hccb = *in_ccb_it;
-
-        dup_hccb = (he_map.find (hccb))->second;
-        dup_ic = dup_hccb->inner_ccb();
-
-        dup_ic->set_face (dup_f);
-        dup_f->add_inner_ccb (dup_ic, dup_hccb);
-      }
-
-      // Assign the isolated vertices.
-      for (iso_vert_it = f->isolated_vertices_begin();
-           iso_vert_it != f->isolated_vertices_end(); ++iso_vert_it)
-      {
-        iso_vert = &(*iso_vert_it);
-
-        dup_iso_vert = (v_map.find (iso_vert))->second;
-        dup_iv = dup_iso_vert->isolated_vertex();
-
-        dup_iv->set_face (dup_f);
-        dup_f->add_isolated_vertex (dup_iv, dup_iso_vert);
-      }
-    }
-
-    return;
-  }
-
-protected:
-
-  /*! Create a new halfedge. */
-  Halfedge * _new_halfedge ()
-  {
-    Halfedge   *h = halfedge_alloc.allocate (1);
-
-    halfedge_alloc.construct (h, Halfedge());
-    halfedges.push_back (*h);
-    return (h);
-  }
-
-  /*! Delete an existing halfedge. */
-  void _delete_halfedge (Halfedge* h)
-  {
-    halfedges.erase (h);
-    halfedge_alloc.destroy (h);
-    halfedge_alloc.deallocate (h, 1);
-  }
-};
-
-} //namespace CGAL
-
-#endif 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h
deleted file mode 100644
index 8512117..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h
+++ /dev/null
@@ -1,3245 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Efi Fogel         <efif at post.tau.ac.il>
-
-#ifndef CGAL_ARR_GEODESIC_ARC_ON_SPHERE_TRAITS_2_H
-#define CGAL_ARR_GEODESIC_ARC_ON_SPHERE_TRAITS_2_H
-
-// #define CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED 1
-
-/*! \file
- * A class that handles great circular arcs embedded on spheres suitable
- * as a geometry traits class for the arrangement on surface package.
- */
-
-#include <fstream>
-
-#include <CGAL/config.h>
-#include <CGAL/tags.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_enums.h>
-
-namespace CGAL {
-
-#define CGAL_X_MINUS_1_Y_0      0
-#define CGAL_X_MINUS_8_Y_6      1
-#define CGAL_X_MINUS_11_Y_7     2
-
-#ifndef CGAL_IDENTIFICATION_XY
-#define CGAL_IDENTIFICATION_XY  CGAL_X_MINUS_1_Y_0
-#endif
-
-template <typename Kernel> class Arr_x_monotone_geodesic_arc_on_sphere_3;
-template <typename Kernel> class Arr_geodesic_arc_on_sphere_3;
-template <typename Kernel> class Arr_extended_direction_3;
-
-/*! A traits class-template for constructing and maintaining arcs of great
- * circles embedded on spheres. It is parameterized from a (linear) geometry
- * kernel, which it also derives from
- */
-template <typename T_Kernel>
-class Arr_geodesic_arc_on_sphere_traits_2 : public T_Kernel {
-  friend class Arr_x_monotone_geodesic_arc_on_sphere_3<T_Kernel>;
-  friend class Arr_geodesic_arc_on_sphere_3<T_Kernel>;
-  friend class Arr_extended_direction_3<T_Kernel>;
-
-public:
-  typedef T_Kernel                              Kernel;
-
-  // Category tags:
-  typedef Tag_true                              Has_left_category;
-  typedef Tag_true                              Has_merge_category;
-  typedef Tag_false                             Has_do_intersect_category;
-
-  typedef Arr_identified_side_tag               Left_side_category;
-  typedef Arr_contracted_side_tag               Bottom_side_category;
-  typedef Arr_contracted_side_tag               Top_side_category;
-  typedef Arr_identified_side_tag               Right_side_category;
-
-  /*! Default constructor */
-  Arr_geodesic_arc_on_sphere_traits_2(){}
-
-protected:
-  typedef typename Kernel::FT                   FT;
-
-  typedef typename Kernel::Direction_3          Direction_3;
-  typedef typename Kernel::Vector_3             Vector_3;
-  typedef typename Kernel::Direction_2          Direction_2;
-  typedef typename Kernel::Vector_2             Vector_2;
-
-  /*! Obtain the possitive (north) pole
-   * \return the possitive (north) pole
-   */
-  inline static const Direction_3& pos_pole()
-  {
-    static const Direction_3 d(0, 0, 1);
-    return d;
-  }
-
-  /*! Obtain the negative (south) pole
-   * \return the negative (south) pole
-   */
-  inline static const Direction_3& neg_pole()
-  {
-    static const Direction_3 d(0, 0, -1);
-    return d;
-  }
-
-  /*! Obtain the intersection of the identification arc and the xy plane.
-   * By default, it is the vector directed along the negative x axis
-   * (x = -infinity).
-   * \return the intersection of the identification arc and the xy plane.
-   */
-  inline static const Direction_2& identification_xy()
-  {
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-    static const Direction_2 d(-1, 0);
-#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_8_Y_6)
-    static const Direction_2 d(-8, 6);
-#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_11_Y_7)
-    static const Direction_2 d(-11, 7);
-#else
-#error CGAL_IDENTIFICATION_XY is not defined
-#endif
-    return d;
-  }
-
-  /*! Obtain the normal of the plane that contains the identification arc.
-   * By default, it is the vector directed along the positive y axis
-   * (y = infinity).
-   * \return the normal of the plane that contains the identification arc.
-   */
-  inline static const Direction_3& identification_normal()
-  {
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-    static const Direction_3 d(0, 1, 0);
-#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_8_Y_6)
-    static const Direction_3 d(6, 8, 0);
-#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_11_Y_7)
-    static const Direction_3 d(7, 11, 0);
-#else
-#error CGAL_IDENTIFICATION_XY is not defined
-#endif
-    return d;
-  }
-
-  /*! Obtain the 2D direction directed along the negative x axis
-   * \return the direction directed at x = -infinity
-   */
-  inline static const Direction_2& neg_x_2()
-  {
-    static const Direction_2 d(-1, 0);
-    return d;
-  }
-
-  /*! Obtain the 2D direction directed along the negative y axis
-   * \return the direction directed at y = -infinity
-   */
-  inline static const Direction_2& neg_y_2()
-  {
-    static const Direction_2 d(0, -1);
-    return d;
-  }
-
-  /*! Obtain the sign of the x-coordinate of a direction in space
-   * \param d the direction in space
-   * \return the sign of the x-coordinate of d
-   */
-  inline static Sign x_sign(Direction_3 d) { return CGAL::sign(d.dx()); }
-
-  /*! Obtain the sign of the y-coordinate of a direction in space
-   * \param d the direction in space
-   * \return the sign of the y-coordinate of d
-   */
-  inline static Sign y_sign(Direction_3 d) { return CGAL::sign(d.dy()); }
-
-  /*! Obtain the sign of the z-coordinate of a direction in space
-   * \param d the direction in space
-   * \return the sign of the z-coordinate of d
-   */
-  inline static Sign z_sign(Direction_3 d) { return CGAL::sign(d.dz()); }
-
-  typedef Direction_2 (*Project)(const Direction_3& d) ;
-
-  /*! Project a 3D direction onto the xy-plane
-   * \param d the 3D direction
-   * \return the projection onto the xy-plane
-   */
-  inline static Direction_2 project_xy(const Direction_3& d)
-  { return Direction_2(d.dx(), d.dy()); }
-
-  /*! Project a 3D direction onto the yz-plane
-   * \param d the 3D direction
-   * \return the projection onto the yz-plane
-   */
-  inline static Direction_2 project_yz(const Direction_3& d)
-  { return Direction_2(d.dy(), d.dz()); }
-
-  /*! Project a 3D direction onto the zx-plane
-   * \param d the 3D direction
-   * \return the projection onto the xz-plane
-   */
-  inline static Direction_2 project_xz(const Direction_3& d)
-  { return Direction_2(d.dx(), d.dz()); }
-
-  /*! Project a 3D direction onto the yz-plane and reflect the y coordinate
-   * \param d the 3D direction
-   * \return the projection onto the yz-plane
-   */
-  inline static Direction_2 project_minus_yz(const Direction_3& d)
-  { return Direction_2(-d.dy(), d.dz()); }
-
-  /*! Project a 3D direction onto the zx-plane and reflect the x coordinate
-   * \param d the 3D direction
-   * \return the projection onto the xz-plane
-   */
-  inline static Direction_2 project_minus_xz(const Direction_3& d)
-  { return Direction_2(-d.dx(), d.dz()); }
-
-  /*! Compare the relative position of a direction and a plane given by its
-   * normal.
-   * \param normal the direction of the plane.
-   * \param dir the direction.
-   */
-  inline Oriented_side oriented_side(const Direction_3& normal,
-                                     const Direction_3 dir) const
-  {
-    FT dot = normal.vector() * dir.vector();
-    return CGAL::sign(dot);
-  }
-
-  /*! Compute the orientation of two directions.
-   * \param d1 the first direction.
-   * \param d2 the second direction.
-   * \return the relative orientation of d1 and d2.
-   */
-  static inline Orientation orientation(const Direction_2& d1,
-                                        const Direction_2& d2)
-  {
-    Kernel kernel;
-    return kernel.orientation_2_object()(d1.vector(), d2.vector());
-  }
-
-  /*! Determined whether a direction is contained in a plane given by its
-   * normal
-   * \param normal the direction of the 3D plane.
-   * \param dir the 3D direction.
-   * \return true if dir is contained in plane; false otherwise.
-   * \pre the plane contains the origin.
-   */
-  inline bool has_on(const Direction_3& normal, const Direction_3& dir) const
-  {
-    FT dot = normal.vector() * dir.vector();
-    return CGAL::sign(dot) == ZERO;
-  }
-
-public:
-  /*! Compare two endpoint directions by v.
-   * \param d1 the first enpoint direction.
-   * \param d2 the second endpoint direction.
-   * \return SMALLER - v(d1) < v(d2);
-   *         EQUAL   - v(d1) = v(d2);
-   *         LARGER  - v(d1) > v(d2).
-   */
-  inline Comparison_result compare_y(const Direction_3& d1,
-                                     const Direction_3& d2) const
-  {
-    Vector_3 v1 = d1.vector();
-    Vector_3 v2 = d2.vector();
-
-    FT dot_p1 = v1.z();
-    FT dot_p2 = v2.z();
-
-    Sign s1 = CGAL::sign(dot_p1);
-    Sign s2 = CGAL::sign(dot_p2);
-
-    if (s1 != s2) {
-      if (s1 == NEGATIVE) return SMALLER;
-      if (s1 == POSITIVE) return LARGER;
-      if (s2 == NEGATIVE) return LARGER;
-      if (s2 == POSITIVE) return SMALLER;
-    }
-    if (s1 == ZERO) return EQUAL;
-
-    FT norm1 = v1 * v1;
-    FT norm2 = v2 * v2;
-
-    return (s1 == POSITIVE) ?
-      CGAL::compare(dot_p1 * dot_p1 * norm2, dot_p2 * dot_p2 * norm1) :
-      CGAL::compare(dot_p2 * dot_p2 * norm1, dot_p1 * dot_p1 * norm2);
-  }
-
-  /*! Compare two directions contained in the xy plane by u.
-   * \param d1 the first direction.
-   * \param d2 the second direction.
-   * \return SMALLER - u(d1) < u(d2);
-   *         EQUAL   - u(d1) = u(d2);
-   *         LARGER  - u(d1) > u(d2).
-   */
-  inline Comparison_result compare_x(const Direction_2& d1,
-                                     const Direction_2& d2) const
-  {
-    const Kernel* kernel = this;
-    if (kernel->equal_2_object()(d1, d2)) return EQUAL;
-    const Direction_2& d = identification_xy();
-    return (kernel->counterclockwise_in_between_2_object()(d, d1, d2)) ?
-      LARGER : SMALLER;
-  }
-
-  /*! Compare two endpoint directions by u.
-   * \param d1 the first enpoint direction.
-   * \param d2 the second endpoint direction.
-   * \return SMALLER - u(d1) < u(d2);
-   *         EQUAL   - u(d1) = u(d2);
-   *         LARGER  - u(d1) > u(d2).
-   * \pre d1 does not coincide with any pole.
-   * \pre d2 does not coincide with any pole.
-   */
-  inline Comparison_result compare_x(const Direction_3& d1,
-                                     const Direction_3& d2) const
-  {
-    // Compare the projections onto the xy plane:
-    Direction_2 d1_2 = project_xy(d1);
-    Direction_2 d2_2 = project_xy(d2);
-    return compare_x(d1_2, d2_2);
-  }
-
-  /*! Compare two endpoint directions lexigoraphically: by u, then by v.
-   * \param d1 the first enpoint direction.
-   * \param d2 the second endpoint direction.
-   * \return SMALLER - u(d1) < u(d2);
-   *         SMALLER - u(d1) = u(d2) and v(d1) < v(d2);
-   *         EQUAL   - u(d1) = u(d2) and v(d1) = v(d2);
-   *         LARGER  - u(d1) = u(d2) and v(d1) > v(d2);
-   *         LARGER  - u(d1) > u(d2).
-   * \pre d1 does not lie on the discontinuity arc.
-   * \pre d2 does not lie on the discontinuity arc.
-   */
-  inline Comparison_result compare_xy(const Direction_3& d1,
-                                      const Direction_3& d2) const
-  {
-    Comparison_result res = compare_x(d1, d2);
-    if (res == EQUAL) return compare_y(d1, d2);
-    return res;
-  }
-
-public:
-  // Traits objects
-  typedef Arr_extended_direction_3<Kernel>                Point_2;
-  typedef Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel> X_monotone_curve_2;
-  typedef Arr_geodesic_arc_on_sphere_3<Kernel>            Curve_2;
-  typedef unsigned int                                    Multiplicity;
-
-public:
-  /// \name Basic functor definitions
-  //@{
-
-  /*! A functor that compares the x-coordinates of two directional points */
-  class Compare_x_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_x_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the x-coordinates of two directional points.
-     * \param p1 the first directional point.
-     * \param p2 the second directional point.
-     * \return SMALLER - x(p1) < x(p2);
-     *         EQUAL   - x(p1) = x(p2);
-     *         LARGER  - x(p1) > x(p2).
-     * \pre p1 does not lie on the boundary.
-     * \pre p2 does not lie on the boundary.
-    */
-    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      CGAL_precondition(p1.is_no_boundary());
-      CGAL_precondition(p2.is_no_boundary());
-
-      return m_traits->compare_x(p1, p2);
-    }
-  };
-
-  /*! Obtain a Compare_x_2 function object */
-  Compare_x_2 compare_x_2_object() const { return Compare_x_2(this); }
-
-  /*! A functor that compares two directional points lexigoraphically:
-   * by x, then by y.
-   */
-  class Compare_xy_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_xy_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare two directional points lexigoraphically: by x, then by y.
-     * \param p1 the first enpoint directional point.
-     * \param p2 the second endpoint directional point.
-     * \return SMALLER - x(p1) < x(p2);
-     *         SMALLER - x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL   - x(p1) = x(p2) and y(p1) = y(p2);
-     *         LARGER  - x(p1) = x(p2) and y(p1) > y(p2);
-     *         LARGER  - x(p1) > x(p2).
-     * \pre p1 does not lie on the boundary.
-     * \pre p2 does not lie on the boundary.
-     */
-    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      CGAL_precondition(p1.is_no_boundary());
-      CGAL_precondition(p2.is_no_boundary());
-
-      return m_traits->compare_xy(p1, p2);
-    }
-  };
-
-  /*! Obtain a Compare_xy_2 function object */
-  Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(this); }
-
-  /*! A functor that obtain the left endpoint of an x-monotone arc */
-  class Construct_min_vertex_2 {
-  public:
-    /*! Obtain the left endpoint of and arc.
-     * \param xc the arc.
-     * \return the left endpoint.
-     */
-    const Point_2& operator()(const X_monotone_curve_2& xc) const
-    { return xc.left(); }
-  };
-
-  /*! Obtain a Construct_min_vertex_2 function object */
-  Construct_min_vertex_2 construct_min_vertex_2_object() const
-  { return Construct_min_vertex_2(); }
-
-  /*! A functor that obtain the right endpoint of an x-monotone arc */
-  class Construct_max_vertex_2 {
-  public:
-    /*! Obtain the right endpoint of an arc.
-     * \param xc the arc.
-     * \return the right endpoint.
-     */
-    const Point_2& operator()(const X_monotone_curve_2& xc) const
-    { return xc.right(); }
-  };
-
-  /*! Obtain a Construct_max_vertex_2 function object */
-  Construct_max_vertex_2 construct_max_vertex_2_object() const
-  { return Construct_max_vertex_2(); }
-
-  /*! A functor that checks whether an x-monotone arc is a vertical */
-  class Is_vertical_2 {
-  public:
-    /*! Check whether a given arc is vertical.
-     * \param xc the arc.
-     * \return true if the curve is a vertical spherical_arc; false otherwise.
-     * \pre the arc is not degenerate (consists of a single point)
-     */
-    bool operator()(const X_monotone_curve_2& xc) const
-    {
-      CGAL_precondition(!xc.is_degenerate());
-      return xc.is_vertical();
-    }
-  };
-
-  /*! Obtain an Is_vertical_2 function object */
-  Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); }
-
-  /*! A functor that compares the y-coordinates of a directional point and
-   * an x-monotone arc at the point x-coordinate
-   */
-  class Compare_y_at_x_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_y_at_x_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Return the location of the given point with respect to the input arc.
-     * \param xc the arc.
-     * \param p the point.
-     * \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve;
-     *         EQUAL   - p lies on the curve.
-     *         LARGER  - y(p) > xc(x(p)), i.e. the point is above the curve;
-     * \pre p is not a construction point.
-     * \pre p is in the x-range of xc.
-     */
-    Comparison_result operator()(const Point_2& p,
-                                 const X_monotone_curve_2& xc) const
-    {
-      CGAL_precondition(!p.is_min_boundary() && !p.is_max_boundary());
-      CGAL_precondition(xc.is_in_x_range(p));
-
-      if (xc.is_vertical()) {
-        // Compare the point with the left endpoint. If smaller, return SMALLER.
-        // Otherwise, if EQUAL, return EQUAL.
-        // Otherwise, compare with the right endpoint. If larger, return LARGER.
-        // Otherwise, return EQUAL:
-        if (!xc.left().is_min_boundary()) {
-          Comparison_result cr = m_traits->compare_y(p, xc.left());
-          if (cr != LARGER) return cr;
-        }
-        if (xc.right().is_max_boundary()) return EQUAL;
-        Comparison_result cr = m_traits->compare_y(p, xc.right());
-        return (cr == LARGER) ? LARGER : EQUAL;
-      }
-
-      // Compare the point to the underlying plane of xc:
-      Oriented_side os = m_traits->oriented_side(xc.normal(), p);
-      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-        (xc.is_directed_right()) ?
-        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_2 function object */
-  Compare_y_at_x_2 compare_y_at_x_2_object() const
-  { return Compare_y_at_x_2(this); }
-
-  /*! A functor that compares the y-coordinates of two x-monotone arcs
-   * immediately to the left of their intersection directional point.
-   */
-  class Compare_y_at_x_left_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_y_at_x_left_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \param p the intersection point.
-     * \return the relative position of xc1 with respect to xc2 immdiately to
-     *         the left of p: SMALLER, EQUAL, or LARGER.
-     * \pre the point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \pre the arcs are not degenerate
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xc1,
-                                 const X_monotone_curve_2& xc2,
-                                 const Point_2& p) const
-    {
-      CGAL_precondition(!xc1.is_degenerate());
-      CGAL_precondition(!xc2.is_degenerate());
-      CGAL_precondition(p == xc1.right());
-      CGAL_precondition(p == xc2.right());
-
-      // If Both arcs are vertical, they overlap:
-      if (xc1.is_vertical() && xc2.is_vertical()) return EQUAL;
-      if (xc1.is_vertical()) return SMALLER;
-      if (xc2.is_vertical()) return LARGER;
-
-      // Non of the arc is verticel. Thus, non of the endpoints coincide with
-      // a pole.
-      // Compare the y-coord. at the x-coord of the most right left-endpoint.
-      const Point_2& l1 = xc1.left();
-      const Point_2& l2 = xc2.left();
-      if (!l1.is_no_boundary()) {
-        // use l2 and xc1:
-        Oriented_side os = m_traits->oriented_side(xc1.normal(), l2);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc1.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-      }
-      if (!l2.is_no_boundary()) {
-        // use l1 and xc2:
-        Oriented_side os = m_traits->oriented_side(xc2.normal(), l1);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc2.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-      }
-
-      if (m_traits->compare_xy(l1, l2) == SMALLER) {
-        // use l2 and xc1:
-        Oriented_side os = m_traits->oriented_side(xc1.normal(), l2);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc1.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-      }
-      // use l1 and xc2:
-      Oriented_side os = m_traits->oriented_side(xc2.normal(), l1);
-      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-        (xc2.is_directed_right()) ?
-        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_left_2 function object */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
-  { return Compare_y_at_x_left_2(this); }
-
-  /*! A functor that compares the y-coordinates of two x-monotone arcs
-   * immediately to the right of their intersection directional point.
-   */
-  class Compare_y_at_x_right_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_y_at_x_right_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \param p the intersection point.
-     * \return the relative position of xc1 with respect to xc2 immdiately to
-     *         the right of p: SMALLER, EQUAL, or LARGER.
-     * \pre the point p lies on both curves, and both of them must also be
-     *      defined to its right (lexicographically).
-     * \pre the arcs are not degenerate
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xc1,
-                                 const X_monotone_curve_2& xc2,
-                                 const Point_2& p) const
-    {
-      CGAL_precondition(!xc1.is_degenerate());
-      CGAL_precondition(!xc2.is_degenerate());
-
-      // CGAL_precondition(p == xc1.left());
-      // CGAL_precondition(p == xc2.left());
-
-      // If Both arcs are vertical, they overlap:
-      if (xc1.is_vertical() && xc2.is_vertical()) return EQUAL;
-      if (xc1.is_vertical()) return LARGER;
-      if (xc2.is_vertical()) return SMALLER;
-
-      // Non of the arcs is verticel. Thus, non of the endpoints coincide with
-      // a pole.
-      // Compare the y-coord. at the x-coord of the most left right-endpoint.
-      const Point_2& r1 = xc1.right();
-      const Point_2& r2 = xc2.right();
-      if (!r1.is_no_boundary()) {
-        // use r2 and xc1:
-        Oriented_side os = m_traits->oriented_side(xc1.normal(), r2);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc1.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-      }
-      if (!r2.is_no_boundary()) {
-        // use r1 and xc2:
-        Oriented_side os = m_traits->oriented_side(xc2.normal(), r1);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc2.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-      }
-      Comparison_result res = m_traits->compare_xy(r1, r2);
-      if (res == LARGER) {
-        // use r2 and xc1:
-        Oriented_side os = m_traits->oriented_side(xc1.normal(), r2);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc1.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-      }
-      if (res == SMALLER) {
-        // use r1 and xc2:
-        Oriented_side os = m_traits->oriented_side(xc2.normal(), r1);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xc2.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-      }
-      // res == equal
-      // if p and r1 are antipodal, compare the plane normals
-      const Kernel* kernel = m_traits;
-      typename Kernel::Construct_opposite_direction_3 opposite_3 =
-        kernel->construct_opposite_direction_3_object();
-      if (!kernel->equal_3_object()(opposite_3(p), r1)) return EQUAL;
-
-      Sign xsign = Traits::x_sign(p);
-      Sign ysign = Traits::y_sign(p);
-      Project project = (xsign == ZERO) ?
-        ((ysign == POSITIVE) ? Traits::project_minus_xz : Traits::project_xz) :
-        ((xsign == POSITIVE) ? Traits::project_yz : Traits::project_minus_yz);
-
-      Direction_2 n1 = project(xc1.normal());
-      Direction_2 n2 = project(xc2.normal());
-      typename Kernel::Construct_opposite_direction_2 opposite_2 =
-        kernel->construct_opposite_direction_2_object();
-      if (!xc1.is_directed_right()) n1 = opposite_2(n1);
-      if (!xc2.is_directed_right()) n2 = opposite_2(n2);
-      if (kernel->equal_2_object()(n1, n2)) return EQUAL;
-      const Direction_2 d(1, 0);
-      return (kernel->counterclockwise_in_between_2_object()(n1, d, n2)) ?
-        SMALLER : LARGER;
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_right_2 function object */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
-  { return Compare_y_at_x_right_2(this); }
-
-  /*! A functor that checks whether two directional points and two x-monotone
-   * arcs are identical.
-   */
-  class Equal_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Equal_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Determines whether the two x-monotone curves are the same (have the
-     * same graph).
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \return true if the two curves are the same; false otherwise.
-     */
-    bool operator()(const X_monotone_curve_2& xc1,
-                    const X_monotone_curve_2& xc2) const
-    {
-      const Kernel* kernel = m_traits;
-      typename Kernel::Equal_3 equal_3 = kernel->equal_3_object();
-      if (xc1.is_full() || xc2.is_full()) {
-        if (!xc1.is_full() || !xc2.is_full()) return false;
-        typename Kernel::Construct_opposite_direction_3 opposite_3 =
-          kernel->construct_opposite_direction_3_object();
-        return (equal_3(xc1.normal(), xc2.normal()) ||
-                equal_3(opposite_3(xc1.normal()), xc2.normal()));
-      }
-
-      if (xc1.is_meridian() || xc2.is_meridian()) {
-        return (xc1.is_meridian() && xc2.is_meridian() &&
-                equal_3(xc1.normal(), xc2.normal()));
-      }
-
-      return (equal_3(xc1.left(), xc2.left()) &&
-              equal_3(xc1.right(), xc2.right()));
-    }
-
-    /*! Determines whether the two points are the same.
-     * \param p1 the first point.
-     * \param p2 the second point.
-     * \return true if the two point are the same; false otherwise.
-     */
-    bool operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      const Kernel* kernel = m_traits;
-      return kernel->equal_3_object()(p1, p2);
-    }
-  };
-
-  /*! Obtain an Equal_2 function object */
-  Equal_2 equal_2_object() const { return Equal_2(this); }
-  //@}
-
-  /// \name Functor definitions to handle boundaries
-  //@{
-
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the x-axis
-   */
-  class Parameter_space_in_x_2 {
-  public:
-    /*! Obtains the parameter space at the end of an arc along the x-axis .
-     * Note that if the arc end coincides with a pole, then unless the arc
-     * coincides with the identification arc, the arc end is considered to
-     * be approaching the boundary, but not on the boundary.
-     * If the arc coincides with the identification arc, it is assumed to
-     * be smaller than any other object.
-     * \param xcv the arc
-     * \param ce the arc end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the arc xcv.
-     *   ARR_LEFT_BOUNDARY  - the arc approaches the identification arc from
-     *                        the right at the arc left end.
-     *   ARR_INTERIOR       - the arc does not approache the identification arc.
-     *   ARR_RIGHT_BOUNDARY - the arc approaches the identification arc from
-     *                        the left at the arc right end.
-     * \pre xcv does not coincide with the vertical identification arc.
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
-                                   Arr_curve_end ce) const
-    {
-      if (xcv.is_vertical()) {
-        CGAL_precondition(!xcv.is_on_boundary());
-        return ARR_INTERIOR;
-      }
-
-      return (ce == ARR_MIN_END) ?
-        ((xcv.left().is_no_boundary()) ? ARR_INTERIOR : ARR_LEFT_BOUNDARY) :
-        ((xcv.right().is_no_boundary()) ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
-    }
-
-    /*! Obtains the parameter space at a point along the x-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     * \pre p does not lie on the vertical identification curve.
-     */
-    Arr_parameter_space operator()(const Point_2 p) const
-    {
-      /*! \todo For now the precondition is not applied. Instead, and as
-       * a convention, if the point lies on the vertical identification
-       * curve it is assumed to be smaller than anything else. Thus,
-       * ARR_LEFT_BOUNDARY is returned.
-       */
-      return (p.is_mid_boundary()) ? ARR_LEFT_BOUNDARY : ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_x_2 function object */
-  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
-  { return Parameter_space_in_x_2(); }
-
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the y-axis
-   */
-  class Parameter_space_in_y_2 {
-  public:
-    /*! Obtains the parameter space at the end of an arc along the y-axis .
-     * Note that if the arc end coincides with a pole, then unless the arc
-     * coincides with the identification arc, the arc end is considered to
-     * be approaching the boundary, but not on the boundary.
-     * If the arc coincides with the identification arc, it is assumed to
-     * be smaller than any other object.
-     * \param xcv the arc
-     * \param ce the arc end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the arc xcv.
-     *   ARR_BOTTOM_BOUNDARY  - the arc approaches the south pole at the arc
-     *                          left end.
-     *   ARR_INTERIOR         - the arc does not approache a contraction point.
-     *   ARR_TOP_BOUNDARY     - the arc approaches the north pole at the arc
-     *                          right end.
-     * There are no horizontal identification arcs!
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
-                                   Arr_curve_end ce) const
-    {
-      return (ce == ARR_MIN_END) ?
-        ((xcv.left().is_min_boundary()) ?  ARR_BOTTOM_BOUNDARY: ARR_INTERIOR) :
-        ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR);
-    }
-
-    /*! Obtains the parameter space at a point along the y-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     * \pre p does not lie on the horizontal identification curve.
-     * There are no horizontal identification arcs!
-     */
-    Arr_parameter_space operator()(const Point_2 p) const
-    {
-      return
-        (p.is_min_boundary()) ? ARR_BOTTOM_BOUNDARY :
-        (p.is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_y_2 function object */
-  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
-  { return Parameter_space_in_y_2(); }
-
-
-  /*! A functor that compares the x-coordinate of arc ends and points on the
-   * boundary of the parameter space.
-   */
-  class Compare_x_on_boundary_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_x_on_boundary_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the x-limit of a direction with the x-coordinate of an
-     * arc end on the boundary.
-     * \param point the point direction.
-     * \param xcv the arc, the endpoint of which is compared.
-     * \param ce the arc-end indicator -
-     *            ARR_MIN_END - the minimal end of xc or
-     *            ARR_MAX_END - the maximal end of xc.
-     * \return the comparison result:
-     *         SMALLER - x(p) < x(xc, ce);
-     *         EQUAL   - x(p) = x(xc, ce);
-     *         LARGER  - x(p) > x(xc, ce).
-     * \pre p lies in the interior of the parameter space.
-     * \pre the ce end of the arc xcv lies on a pole (implying ce is vertical).
-     * \pre xcv does not coincide with the vertical identification curve.
-     */
-    Comparison_result operator()(const Point_2& point,
-                                 const X_monotone_curve_2& xcv,
-                                 Arr_curve_end ce) const
-    {
-      CGAL_precondition(point.is_no_boundary());
-      CGAL_precondition_code
-        (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right(););
-      CGAL_precondition(!p2.is_no_boundary());
-      CGAL_precondition(xcv.is_vertical());
-
-      CGAL_precondition(!xcv.is_on_boundary());
-
-      // xcv is vertical, but does not coincide with the discontinuity arc.
-      // Obtain the direction contained in the underlying plane, which is
-      // also on the xy-plane:
-      Direction_3 normal = xcv.normal();
-      Direction_2 q = (xcv.is_directed_right()) ?
-        Direction_2(-(normal.dy()), normal.dx()) :
-        Direction_2(normal.dy(), -(normal.dx()));
-      Direction_2 p = Traits::project_xy(point);
-      return m_traits->compare_x(p, q);
-    }
-
-    /*! Compare the x-coordinates of 2 arc ends near the boundary of the
-     * parameter space.
-     * \param xcv1 the first arc.
-     * \param ce1 the first arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv1 or
-     *            ARR_MAX_END - the maximal end of xcv1.
-     * \param xcv2 the second arc.
-     * \param ce2 the second arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv2 or
-     *            ARR_MAX_END - the maximal end of xcv2.
-     * \return the second comparison result:
-     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
-     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
-     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
-     * \pre the ce1 end of the arc xcv1 lies on a pole (implying ce1 is
-     *      vertical).
-     * \pre the ce2 end of the arc xcv2 lies on a pole (implying ce2 is
-     *      vertical).
-     * \pre xcv1 does not coincide with the vertical identification curve.
-     * \pre xcv2 does not coincide with the vertical identification curve.
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xcv1,
-                                 Arr_curve_end ce1,
-                                 const X_monotone_curve_2& xcv2,
-                                 Arr_curve_end ce2) const
-    {
-      CGAL_precondition_code
-        (const Point_2& p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right(););
-      CGAL_precondition(!p1.is_no_boundary());
-      CGAL_precondition_code
-        (const Point_2& p2 = (ce2 == ARR_MIN_END) ? xcv2.left() : xcv2.right(););
-      CGAL_precondition(!p2.is_no_boundary());
-
-      CGAL_precondition(xcv1.is_vertical());
-      CGAL_precondition(xcv2.is_vertical());
-
-      CGAL_precondition(!xcv1.is_on_boundary());
-      CGAL_precondition(!xcv2.is_on_boundary());
-
-      // Non of the arcs coincide with the discontinuity arc:
-      // Obtain the directions contained in the underlying planes, which are
-      // also on the xy-plane:
-      Direction_3 normal1 = xcv1.normal();
-      Direction_2 p = (xcv1.is_directed_right()) ?
-        Direction_2(-(normal1.dy()), normal1.dx()) :
-        Direction_2(normal1.dy(), -(normal1.dx()));
-      Direction_3 normal2 = xcv2.normal();
-      Direction_2 q = (xcv2.is_directed_right()) ?
-        Direction_2(-(normal2.dy()), normal2.dx()) :
-        Direction_2(normal2.dy(), -(normal2.dx()));
-      return m_traits->compare_x(p, q);
-    }
-
-    /*! Compare the x-coordinate of two given points that lie on the
-     * horizontal identification arc.
-     * \param p1 the first point.
-     * \param p2 the second point.
-     * There is no horizontal identification arc!
-     */
-    Comparison_result operator()(const Point_2&, const Point_2&) const
-    {
-      CGAL_error_msg("There is no horizontal identification arc!");
-      return SMALLER;
-    }
-  };
-
-  /*! Obtain a Compare_x_on_boundary_2 function object */
-  Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
-  { return Compare_x_on_boundary_2(this); }
-
-
-  /*! A functor that compares the x-coordinates of arc ends near the
-   * boundary of the parameter space.
-   */
-  class Compare_x_near_boundary_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_x_near_boundary_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-
-    /*! Compare the x-coordinates of 2 arc ends near the boundary of the
-     * parameter space.
-     * \param xcv1 the first arc.
-     * \param xcv2 the second arc.
-     * \param ce the curve end indicator -
-     *            ARR_MIN_END - the minimal end of curves or
-     *            ARR_MAX_END - the maximal end of curves.
-     * \return the second comparison result:
-     *         SMALLER - x(xcv1, ce) < x(xcv2, ce);
-     *         EQUAL   - x(xcv1, ce) = x(xcv2, ce);
-     *         LARGER  - x(xcv1, ce) > x(xcv2, ce).
-     * \pre the ce end of the arc xcv1 lies on a pole.
-     * \pre the ce end of the arc xcv2 lies on a pole.
-     * \pre the the $x$-coordinates of xcv1 and xcv2 at their ce end are
-     *      equal (implying that the curves overlap).
-     * \pre xcv1 does not coincide with the vertical identification curve.
-     * \pre xcv2 does not coincide with the vertical identification curve.
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xcv1,
-                                 const X_monotone_curve_2& xcv2,
-                                 Arr_curve_end ce) const
-    {
-      CGAL_precondition_code
-        (const Point_2& p1 = (ce == ARR_MIN_END) ? xcv1.left() : xcv1.right(););
-      CGAL_precondition(!p1.is_no_boundary());
-      CGAL_precondition_code
-        (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv2.left() : xcv2.right(););
-      CGAL_precondition(!p2.is_no_boundary());
-
-      CGAL_precondition(xcv1.is_vertical());
-      CGAL_precondition(xcv2.is_vertical());
-      CGAL_precondition(!xcv1.is_on_boundary());
-      CGAL_precondition(!xcv2.is_on_boundary());
-
-      return EQUAL;
-    }
-  };
-
-  /*! Obtain a Compare_x_near_boundary_2 function object */
-  Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
-  { return Compare_x_near_boundary_2(this); }
-
-
-  /*! A functor that compares the y-coordinates of arc ends near the
-   * boundary of the parameter space.
-   */
-  class Compare_y_near_boundary_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the y-coordinates of 2 curves at their ends near the boundary
-     * of the parameter space.
-     * \param xcv1 the first arc.
-     * \param xcv2 the second arc.
-     * \param ce the arc end indicator.
-     * \return the second comparison result.
-     * \pre the ce ends of the arcs xcv1 and xcv2 lie either on the left
-     *      boundary or on the right boundary of the parameter space (implying
-     *      that they cannot be vertical).
-     * There is no horizontal identification curve!
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xcv1,
-                                 const X_monotone_curve_2& xcv2,
-                                 Arr_curve_end ce) const
-    {
-      CGAL_precondition(!xcv1.is_degenerate());
-      CGAL_precondition(!xcv2.is_degenerate());
-
-      const Point_2& l1 = xcv1.left();
-      const Point_2& r1 = xcv1.right();
-      const Point_2& l2 = xcv2.left();
-      const Point_2& r2 = xcv2.right();
-
-      // If xcv1 is vertical, xcv1 coincides with the discontinuity arc:
-      if (xcv1.is_vertical()) {
-        CGAL_precondition(!l1.is_no_boundary());
-        CGAL_precondition(!r1.is_no_boundary());
-      }
-
-      // If xcv2 is vertical, xcv2 coincides with the discontinuity arc:
-      if (xcv2.is_vertical()) {
-        CGAL_precondition(!l2.is_no_boundary());
-        CGAL_precondition(!r2.is_no_boundary());
-      }
-
-      if (ce == ARR_MIN_END) {
-        // Handle the south pole. It has the smallest y coords:
-        if (l1.is_min_boundary())
-          return (l2.is_min_boundary()) ? EQUAL : SMALLER;
-        if (l2.is_min_boundary()) return LARGER;
-
-        // None of xcv1 and xcv2 endpoints coincide with a pole:
-        Comparison_result cr = m_traits->compare_y(l1, l2);
-        if (cr != EQUAL) return cr;
-
-        // If Both arcs are vertical, they overlap:
-        if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
-        if (xcv1.is_vertical()) return LARGER;
-        if (xcv2.is_vertical()) return SMALLER;
-
-        // Non of the arcs is verticel. Thus, non of the endpoints coincide
-        // with a pole.
-        // Compare the y-coord. at the x-coord of the most left right-endpoint.
-        CGAL_assertion(r1.is_no_boundary());
-        CGAL_assertion(r2.is_no_boundary());
-
-        if (m_traits->compare_xy(r1, r2) == LARGER) {
-          // use r2 and xcv1:
-          Oriented_side os =
-            m_traits->oriented_side(xcv1.normal(), r2);
-          return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-            (xcv1.is_directed_right()) ?
-            ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-            ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-        }
-        // use r1 and xcv2:
-        Oriented_side os = m_traits->oriented_side(xcv2.normal(), r1);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xcv2.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-      }
-
-      // ce == ARR_MAX_END
-
-      // Handle the north pole. It has the largest y coords:
-      if (r1.is_max_boundary()) return (r2.is_max_boundary()) ? EQUAL : LARGER;
-      if (r2.is_max_boundary()) return SMALLER;
-
-      // None of xcv1 and xcv2 endpoints coincide with a pole:
-      Direction_2 r1_xy = Traits::project_xy(r1);
-      Comparison_result cr = m_traits->compare_y(r1, r2);
-      if (cr != EQUAL) return cr;
-
-      // If Both arcs are vertical, they overlap:
-      if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
-      if (xcv1.is_vertical()) return LARGER;
-      if (xcv2.is_vertical()) return SMALLER;
-
-      // Compare to the left:
-      Direction_2 p_r1 = Traits::project_xy(r1);
-      cr = m_traits->compare_y(r1, r2);
-      if (cr != EQUAL) return cr;
-
-      // Non of the arcs is verticel. Thus, non of the endpoints coincide with
-      // a pole.
-      // Compare the y-coord. at the x-coord of the most right left-endpoint.
-      CGAL_assertion(l1.is_no_boundary());
-      CGAL_assertion(l2.is_no_boundary());
-
-      if (m_traits->compare_xy(l1, l2) == SMALLER) {
-        // use l2 and xcv1:
-        Oriented_side os = m_traits->oriented_side(xcv1.normal(), l2);
-        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-          (xcv1.is_directed_right()) ?
-          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
-          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
-      }
-      // use l1 and xcv2:
-      Oriented_side os = m_traits->oriented_side(xcv2.normal(), l1);
-      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
-        (xcv2.is_directed_right()) ?
-        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
-        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
-    }
-  };
-
-  /*! Obtain a Compare_y_near_boundary_2 function object */
-  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
-  { return Compare_y_near_boundary_2(this); }
-
-  /*! A functor that indicates whether a geometric object lies on the
-   * horizontal identification arc. In this setup there is no such entity.
-   */
-  class Is_on_x_identification_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-  public:
-    /*! Determine whether a point lies on the horizontal identification arc.
-     * \param p the point.
-     * \return a Boolean indicating whether p lies on the horizontal
-     * identification arc.
-     */
-    bool operator()(const Point_2&) const
-    {
-      CGAL_error_msg("There is no horizontal identification arc!");
-      return false;
-    }
-
-    /*! Determine whether an arc coincides with the horizontal identification
-     * arc.
-     * \param xcv the arc.
-     * \return a Boolean indicating whether xcv coincides with the horizontal
-     * identification arc.
-     */
-    bool operator()(const X_monotone_curve_2&) const
-    {
-      CGAL_error_msg("There is no horizontal identification arc!");
-      return false;
-    }
-  };
-
-  /*! Obtain a Is_on_x_identification_2 function object */
-  Is_on_x_identification_2 is_on_x_identification_2_object() const
-  { return Is_on_x_identification_2(); }
-
-  /*! A functor that indicates whether a geometric object lies on the
-   * vertical identification arc.
-   */
-  class Is_on_y_identification_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Is_on_y_identification_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Determine whether a point lies on the vertical identification arc.
-     * \param p the point.
-     * \return a Boolean indicating whether p lies on the vertical
-     * identification arc.
-     */
-    bool operator()(const Point_2& p) const { return p.is_mid_boundary(); }
-
-    /*! Determine whether an arc coincides with the vertical identification
-     * arc.
-     * \param xcv the arc.
-     * \return a Boolean indicating whether xcv coincides with the vertical
-     * identification arc.
-     */
-    bool operator()(const X_monotone_curve_2& xcv) const
-    { return xcv.is_on_boundary(); }
-  };
-
-  /*! Obtain a Is_on_y_identification_2 function object */
-  Is_on_y_identification_2 is_on_y_identification_2_object() const
-  { return Is_on_y_identification_2(this); }
-
-  /*! A functor that compares the y-coordinate of two given points
-   * that lie on the vertical identification arc.
-   */
-  class Compare_y_on_boundary_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Compare_y_on_boundary_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Compare the y-coordinate of two given points that lie on the vertical
-     * identification curve.
-     * \param p1 the first point.
-     * \param p2 the second point.
-     * \return SMALLER - p1 is lexicographically smaller than p2;
-     *         EQUAL   - p1 and p2 coincides;
-     *         LARGER  - p1 is lexicographically larger than p2;
-     * \pre p1 lies on the vertical identification arc.
-     * \pre p2 lies on the vertical identification arc.
-     */
-    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      CGAL_precondition(!p1.is_no_boundary());
-      CGAL_precondition(!p2.is_no_boundary());
-      return m_traits->compare_y(p1, p2);
-    }
-  };
-
-  /*! Obtain a Compare_y_on_boundary_2 function object */
-  Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
-  { return Compare_y_on_boundary_2(this); }
-  //@}
-
-  /// \name Functor definitions for supporting intersections.
-  //@{
-
-  /*! A functor that divides an arc into x-monotone arcs. That are, arcs that
-   * do not cross the identification arc.
-   */
-  class Make_x_monotone_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Make_x_monotone_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Cut the given curve into x-monotone subcurves and insert them into the
-     * given output iterator. As spherical_arcs are always x_monotone, only one
-     * object will be contained in the iterator.
-     * \param xc the curve.
-     * \param oi the output iterator, whose value-type is Object. The output
-     *           object is a wrapper of either an X_monotone_curve_2, or - in
-     *           case the input spherical_arc is degenerate - a Point_2 object.
-     * \return the past-the-end iterator.
-     */
-    template<typename OutputIterator>
-    OutputIterator operator()(const Curve_2& c, OutputIterator oi) const
-    {
-      if (c.is_degenerate()) {
-        // The spherical_arc is a degenerate point - wrap it with an object:
-        *oi++ = make_object(c.right());
-        return oi;
-      }
-
-      if (c.is_x_monotone()) {
-        // The spherical arc is monotone - wrap it with an object:
-        // *oi++ = make_object(X_monotone_curve_2(c));
-        const X_monotone_curve_2* xc = &c;
-        *oi++ = make_object(*xc);
-        return oi;
-      }
-
-      if (c.is_full()) {
-        // The spherical arc is full
-        if (c.is_vertical()) {
-          // The arc is vertical => divide it into 2 meridians;
-          const Direction_3& np = m_traits->neg_pole();
-          const Direction_3& pp = m_traits->pos_pole();
-          X_monotone_curve_2 xc1(np, pp, c.normal(), true, true);
-          X_monotone_curve_2 xc2(pp, np, c.normal(), true, false);
-          *oi++ = make_object(xc1);
-          *oi++ = make_object(xc2);
-          return oi;
-        }
-#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
-        // The arc is not vertical => break it at the discontinuity arc:
-        const X_monotone_curve_2 xc(c.normal());
-        *oi++ = make_object(xc);
-#else
-        // Full x-monotone arcs are not supported!
-        // Split the arc at the intersection point with the complement of the
-        // discontinuity arc:
-        Direction_3 normal = c.normal();
-        bool directed_right = Traits::x_sign(normal) == POSITIVE;
-        Direction_3 d1(-(normal.dz()), 0, normal.dx());
-        Direction_3 d2(normal.dz(), 0, -(normal.dx()));
-        X_monotone_curve_2 xc1(d1, d2, normal, false, directed_right);
-        X_monotone_curve_2 xc2(d2, d1, normal, false, directed_right);
-        *oi++ = make_object(xc1);
-        *oi++ = make_object(xc2);
-#endif
-        return oi;
-      }
-
-      const Point_2& source = c.source();
-      const Point_2& target = c.target();
-      const Direction_3& normal = c.normal();
-
-      if (c.is_vertical()) {
-        /* If one of the endpoints coincide with a pole, divide the arc at
-         * the opposite pole:
-         */
-        const Direction_3& np = m_traits->neg_pole();
-        const Direction_3& pp = m_traits->pos_pole();
-        if (source.is_min_boundary() || target.is_min_boundary()) {
-          X_monotone_curve_2 xc1(source, pp, normal, true, true);
-          X_monotone_curve_2 xc2(pp, target, normal, true, false);
-          *oi++ = make_object(xc1);
-          *oi++ = make_object(xc2);
-          return oi;
-        }
-
-        if (source.is_max_boundary() || target.is_max_boundary()) {
-          X_monotone_curve_2 xc1(source, np, normal, true, false);
-          X_monotone_curve_2 xc2(np, target, normal, true, true);
-          *oi++ = make_object(xc1);
-          *oi++ = make_object(xc2);
-          return oi;
-        }
-
-        // None of the enpoints coincide with a pole.
-        bool s_is_positive, t_is_positive, plane_is_positive;
-        CGAL::Sign xsign = Traits::x_sign(normal);
-        if (xsign == ZERO) {
-          s_is_positive = Traits::x_sign(source) == POSITIVE;
-          t_is_positive = Traits::x_sign(target) == POSITIVE;
-          plane_is_positive = Traits::y_sign(normal) == NEGATIVE;
-        } else {
-          s_is_positive = Traits::y_sign(source) == POSITIVE;
-          t_is_positive = Traits::y_sign(target) == POSITIVE;
-          plane_is_positive = xsign == POSITIVE;
-        }
-        bool ccw = ((plane_is_positive && s_is_positive) ||
-                    (!plane_is_positive && !s_is_positive));
-        const Point_2& pole1 = (ccw) ? pp : np;
-        X_monotone_curve_2 xc1(source, pole1, normal, true, ccw);
-        *oi++ = make_object(xc1);
-        if (s_is_positive != t_is_positive) {
-          // Construct 1 more arc:
-          X_monotone_curve_2 xc2(pole1, target, normal, true, !ccw);
-          *oi++ = make_object(xc2);
-          return oi;
-        }
-        // Construct 2 more arcs:
-        const Point_2& pole2 = (ccw) ? np : pp;
-        X_monotone_curve_2 xc2(pole1, pole2, normal, true, !ccw);
-        *oi++ = make_object(xc2);
-        X_monotone_curve_2 xc3(pole2, target, normal, true, ccw);
-        *oi++ = make_object(xc3);
-        return oi;
-      }
-
-      // The curve is not vertical, (none of the enpoints coincide with a pole)
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-      Direction_3 dp = (CGAL::sign(normal.dz()) == POSITIVE) ?
-        Direction_3(-(normal.dz()), 0, normal.dx()) :
-        Direction_3(normal.dz(), 0, -(normal.dx()));
-#else
-      const Direction_2& xy = Traits::identification_xy();
-      FT x = xy.dx();
-      FT y = xy.dy();
-      FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) /  -(normal.dz()));
-      Direction_3 dp(x, y, z);
-#endif
-      Point_2 p(dp, Point_2::MID_BOUNDARY_LOC);
-      Direction_2 s = Traits::project_xy(source);
-      Direction_2 t = Traits::project_xy(target);
-      const Direction_2& d = Traits::identification_xy();
-      const Kernel* kernel = m_traits;
-      bool directed_right =
-        kernel->counterclockwise_in_between_2_object()(d, s, t);
-
-      X_monotone_curve_2 xc1(source, p, normal, false, directed_right);
-      X_monotone_curve_2 xc2(p, target, normal, false, directed_right);
-      *oi++ = make_object(xc1);
-      *oi++ = make_object(xc2);
-      return oi;
-    }
-  };
-
-  /*! Obtain a Make_x_monotone_2 function object */
-  Make_x_monotone_2 make_x_monotone_2_object() const
-  { return Make_x_monotone_2(this); }
-
-  /*! A functor that splits an x-monotone arc at a directional point. */
-  class Split_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Split_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Split a given x-monotone curve at a given point into two sub-curves.
-     * \param xc the curve to split
-     * \param p the split point.
-     * \param xc1 (output) the left resulting subcurve. p is its right
-     * endpoint.
-     * \param xc2 (output) the right resulting subcurve. p is its left
-     * endpoint.
-     * \pre p lies on xc but is not one of its endpoints.
-     * \pre xc is not degenerate
-     */
-    void operator()(const X_monotone_curve_2& xc, const Point_2& p,
-                    X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const
-    {
-      CGAL_precondition(!xc.is_degenerate());
-      const Point_2& source = xc.source();
-      const Point_2& target = xc.target();
-      CGAL_precondition_code(const Kernel* kernel = m_traits);
-      CGAL_precondition_code
-        (typename Kernel::Equal_3 equal_3 = kernel->equal_3_object());
-      CGAL_precondition(!equal_3(p, source));
-      CGAL_precondition(!equal_3(p, target));
-
-      xc1.set_normal(xc.normal());
-      xc1.set_is_vertical(xc.is_vertical());
-      xc1.set_is_degenerate(false);
-      xc1.set_is_empty(false);
-
-      xc2.set_normal(xc.normal());
-      xc2.set_is_vertical(xc.is_vertical());
-      xc2.set_is_empty(false);
-
-      if (xc.is_directed_right()) {
-        xc1.set_source(source);
-        xc1.set_target(p);
-        xc1.set_is_directed_right(true);
-        xc2.set_source(p);
-        xc2.set_target(target);
-        xc2.set_is_directed_right(true);
-      } else {
-        xc1.set_source(p);
-        xc1.set_target(target);
-        xc1.set_is_directed_right(false);
-        xc2.set_source(source);
-        xc2.set_target(p);
-        xc2.set_is_directed_right(false);
-      }
-    }
-  };
-
-  /*! Obtain a Split_2 function object */
-  Split_2 split_2_object() const { return Split_2(this); }
-
-  /*! The clockwise-in-between function object */
-  class Clockwise_in_between_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Clockwise_in_between_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    bool operator()(const Direction_2& d,
-                    const Direction_2& d1, const Direction_2& d2) const
-    {
-      const Kernel* kernel = m_traits;
-      return kernel->counterclockwise_in_between_2_object()(d, d2, d1);
-    }
-  };
-
-  /*! Obtain a Clockwise_in_between function object */
-  Clockwise_in_between_2 clockwise_in_between_2_object() const
-  { return Clockwise_in_between_2(this); }
-
-  /*! A functor that computes intersections between x-monotone arcs. */
-  class Intersect_2 {
-  private:
-
-    /*! Computes the intersection between two arcs contained in the same plane
-     * \param l1_3
-     * \param r1_3
-     * \param l2_3
-     * \param r2_3
-     * \param normal      - the normal of the common plane
-     * \param vertical   - is the plane vertical
-     * \param start      - the start 2d vertex
-     * \param in_between - the in_between operator
-     * \param project    - the projection function
-     * \param oi         - the output iterator
-     */
-    template <typename In_between, typename OutputIterator>
-    OutputIterator compute_intersection(const Point_2& l1_3,
-                                        const Point_2 r1_3,
-                                        const Point_2& l2_3,
-                                        const Point_2 r2_3,
-                                        const Direction_3& normal,
-                                        bool vertical,
-                                        const Direction_2& start,
-                                        const In_between& in_between,
-                                        Project project,
-                                        OutputIterator oi) const
-    {
-      typedef std::pair<Point_2, Multiplicity>                  Point_2_pair;
-      const Kernel* kernel = m_traits;
-      typename Kernel::Equal_2 equal = kernel->equal_2_object();
-
-      Direction_2 l1 = project(l1_3);
-      Direction_2 r1 = project(r1_3);
-      Direction_2 l2 = project(l2_3);
-      Direction_2 r2 = project(r2_3);
-
-      if (equal(l1, l2)) {
-        const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
-        X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true);
-        *oi++ = make_object(xc);
-        return oi;
-      }
-
-      bool l1_eq_start = equal(l1, start);
-      bool l2_eq_start = equal(l2, start);
-
-      if (l1_eq_start || (!l2_eq_start && in_between(l1, start, l2))) {
-        // The following applies only to full circles:
-        if (l1_eq_start && equal(r2, start))
-          *oi++ = make_object(Point_2_pair(r2_3, 1));
-        if (in_between(r1, l1, l2)) return oi;      // no intersection
-        if (equal(r1, l2)) {
-          *oi++ = make_object(Point_2_pair(r1_3, 1));
-          return oi;
-        }
-        const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
-        X_monotone_curve_2 xc(l2_3, trg, normal, vertical, true);
-        *oi++ = make_object(xc);
-        return oi;
-      }
-      CGAL_assertion(l2_eq_start || in_between(l2, start, l1));
-      // The following applies only to full circles:
-      if (l2_eq_start && equal(r1, start))
-        *oi++ = make_object(Point_2_pair(r1_3, 1));
-      if (in_between(r2, l2, l1)) return oi;      // no intersection
-      if (equal(r2, l1)) {
-        *oi++ = make_object(Point_2_pair(r2_3, 1));
-        return oi;
-      }
-      const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
-      X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true);
-      *oi++ = make_object(xc);
-      return oi;
-    }
-
-    /*! Determine whether a direction pierces an arc.
-     * \param point the direction.
-     * \param xc the arc.
-     * \return true iff point pierces xc.
-     * \pre point lies in the underlying plane of xc.
-     */
-    bool is_in_between(const Point_2& point,
-                       const X_monotone_curve_2& xc) const
-    {
-      const Kernel* kernel = m_traits;
-      CGAL_precondition(m_traits->has_on(xc.normal(), point));
-
-      const Point_2& left = xc.left();
-      const Point_2& right = xc.right();
-
-      // Handle the poles:
-      if (point.is_max_boundary()) return (right.is_max_boundary());
-      if (point.is_min_boundary()) return (left.is_min_boundary());
-
-      if (xc.is_vertical()) {
-        // Compare the x coordinates. If they are not equal, return false:
-        Direction_3 normal = xc.normal();
-        bool plane_is_positive, p_is_positive;
-        CGAL::Sign xsign = Traits::x_sign(normal);
-        if (xsign == ZERO) {
-          plane_is_positive = Traits::y_sign(normal) == NEGATIVE;
-          p_is_positive = Traits::x_sign(point) == POSITIVE;
-        } else {
-          plane_is_positive = xsign == POSITIVE;
-          p_is_positive = Traits::y_sign(point) == POSITIVE;
-        }
-
-        bool xc_is_positive = ((plane_is_positive && xc.is_directed_right()) ||
-                               (!plane_is_positive && !xc.is_directed_right()));
-
-        if ((xc_is_positive && !p_is_positive) ||
-            (!xc_is_positive && p_is_positive))
-          return false;
-
-        // Compare the y-coords:
-        return (((left.is_min_boundary()) ||
-                 (m_traits->compare_y(point, left) != SMALLER)) &&
-                ((right.is_max_boundary()) ||
-                 (m_traits->compare_y(point, right) != LARGER)));
-      }
-
-      // The arc is not vertical. Compare the projections onto the xy-plane:
-      typename Kernel::Equal_2 equal_2 = kernel->equal_2_object();
-      Direction_2 p = Traits::project_xy(point);
-      Direction_2 r = Traits::project_xy(right);
-      if (equal_2(p, r)) return true;
-      Direction_2 l = Traits::project_xy(left);
-      if (equal_2(p, l)) return true;
-      return kernel->counterclockwise_in_between_2_object()(p, l, r);
-    }
-
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Intersect_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Find the intersections of the two given curves and insert them into the
-     * given output iterator. As two spherical_arcs may itersect only once,
-     * only a single intersection will be contained in the iterator.
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \param oi the output iterator.
-     * \return the past-the-end iterator.
-     * \pre xc1 and xc2 are not degenerate
-     */
-    template<typename OutputIterator>
-    OutputIterator operator()(const X_monotone_curve_2& xc1,
-                              const X_monotone_curve_2& xc2,
-                              OutputIterator oi) const
-    {
-      CGAL_precondition(!xc1.is_degenerate());
-      CGAL_precondition(!xc2.is_degenerate());
-
-      typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-      typedef typename Kernel::Counterclockwise_in_between_2
-        Counterclockwise_in_between_2;
-      typedef typename Kernel::Equal_3                          Equal_3;
-
-      typedef std::pair<Point_2, Multiplicity>                  Point_2_pair;
-      const Kernel* kernel = m_traits;
-
-      Equal_3 equal_3 = kernel->equal_3_object();
-      const Direction_3& normal1 = xc1.normal();
-      const Direction_3& normal2 = xc2.normal();
-
-      Direction_3 opposite_normal1 =
-        kernel->construct_opposite_direction_3_object()(normal1);
-
-      if (equal_3(normal1, normal2) || equal_3(opposite_normal1, normal2)) {
-        // The underlying planes are the same
-        Counterclockwise_in_between_2 ccib =
-          kernel->counterclockwise_in_between_2_object();
-        typename Traits::Clockwise_in_between_2 cib =
-          m_traits->clockwise_in_between_2_object();
-
-        if (xc1.is_vertical()) {
-          // Both arcs are vertical
-          bool res = kernel->equal_3_object()(normal1, normal2);
-          if ((!res && (xc1.is_directed_right() == xc2.is_directed_right())) ||
-              (res && (xc1.is_directed_right() != xc2.is_directed_right())))
-          {
-            if (xc1.left().is_min_boundary() && xc2.left().is_min_boundary())
-              *oi++ = make_object(Point_2_pair(xc1.left(), 1));
-            if (xc1.right().is_max_boundary() && xc2.right().is_max_boundary())
-              *oi++ = make_object(Point_2_pair(xc1.right(), 1));
-            return oi;
-          }
-
-          /*! If the endpoints of one arc coinside with the 2 poles resp,
-           * the other arc is completely overlapping.
-           */
-          if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) {
-            *oi++ = make_object(xc2);
-            return oi;
-          }
-          if (xc2.left().is_min_boundary() && xc2.right().is_max_boundary()) {
-            *oi++ = make_object(xc1);
-            return oi;
-          }
-          /*! Find an endpoint that does not coincide with a pole, and project
-           * it onto the xy plane. If the projection coincide with the negative
-           * x, project onto the zx plane. Otherwise project onto the yz plane.
-           */
-          const Point_2& point =
-            xc1.left().is_min_boundary() ? xc1.right() : xc1.left();
-
-          CGAL::Sign xsign = Traits::x_sign(normal1);
-          bool xz_plane = xsign == ZERO;
-          Project project =
-            (xz_plane) ? Traits::project_xz : Traits::project_yz;
-
-          Direction_3 normal = (xc1.is_directed_right()) ?
-            normal1 : opposite_normal1;
-
-          bool p_x_is_positive = Traits::x_sign(point) == POSITIVE;
-          bool p_y_is_positive = Traits::y_sign(point) == POSITIVE;
-
-          if ((xz_plane && p_x_is_positive) || (!xz_plane && p_y_is_positive)) {
-            // The endpoints reside in the positive x-halfspace:
-            return compute_intersection(xc1.left(), xc1.right(),
-                                        xc2.left(), xc2.right(),
-                                        normal, true, Traits::neg_y_2(),
-                                        ccib, project, oi);
-          }
-          // The endpoints reside in the negative x-halfspace:
-          return compute_intersection(xc1.left(), xc1.right(),
-                                      xc2.left(), xc2.right(),
-                                      normal, true, Traits::neg_y_2(),
-                                      cib, project, oi);
-        }
-
-        // The arcs are not vertical:
-        bool plane_is_positive = (Traits::z_sign(normal1) == POSITIVE);
-        Direction_3 normal =
-          (plane_is_positive) ? normal1 : opposite_normal1;
-        return compute_intersection(xc1.left(), xc1.right(),
-                                    xc2.left(), xc2.right(),
-                                    normal, false, Traits::identification_xy(),
-                                    ccib, Traits::project_xy, oi);
-      }
-
-      Vector_3 v =
-        kernel->
-        construct_cross_product_vector_3_object()(xc1.normal().vector(),
-                                                  xc2.normal().vector());
-
-      // Determine which one of the two directions:
-      Point_2 ed(v.direction());
-      if (is_in_between(ed, xc1) && is_in_between(ed, xc2)) {
-        *oi++ = make_object(Point_2_pair(ed, 1));
-        return oi;
-      }
-
-      Vector_3 vo(kernel->construct_opposite_vector_3_object()(v));
-      Point_2 edo(vo.direction());
-      if (is_in_between(edo, xc1) && is_in_between(edo, xc2)) {
-        *oi++ = make_object(Point_2_pair(edo, 1));
-        return oi;
-      }
-      return oi;
-    }
-  };
-
-  /*! Obtain an Intersect_2 function object */
-  Intersect_2 intersect_2_object() const { return Intersect_2(this); }
-
-  /*! A functor that tests whether two x-monotone arcs can be merged. */
-  class Are_mergeable_2 {
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Check whether it is possible to merge two given x-monotone curves.
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \return true if the two arcs are mergeable; false otherwise.
-     * Two arcs are mergeable if:
-     * 1. they are supported by the same plane, and
-     * 2. share a common endpoint that is not on the identification arc
-     */
-    bool operator()(const X_monotone_curve_2& xc1,
-                    const X_monotone_curve_2& xc2) const
-    {
-      if (xc1.is_empty() || xc2.is_empty()) return true;
-      if ((xc1.is_full() || xc1.is_meridian()) &&
-          (xc2.is_full() || xc2.is_meridian())) return false;
-
-      const Kernel* kernel = m_traits;
-      typename Kernel::Equal_3 equal = kernel->equal_3_object();
-
-      if (xc1.is_degenerate() && xc2.is_degenerate())
-        return equal(xc1.left(), xc2.left());
-      if ((xc1.is_full() || xc1.is_meridian()) && xc2.is_degenerate())
-        return xc1.has_on(xc2.left());
-      if ((xc2.is_full() || xc2.is_meridian()) && xc1.is_degenerate())
-        return xc2.has_on(xc1.left());
-
-      const Direction_3& normal1 = xc1.normal();
-      const Direction_3& normal2 = xc2.normal();
-      Direction_3 opposite_normal1 =
-        kernel->construct_opposite_direction_3_object()(normal1);
-      if (!equal(normal1, normal2) && !equal(opposite_normal1, normal2))
-        return false;
-
-      bool eq1 = equal(xc1.right(), xc2.left());
-      bool eq2 = equal(xc1.left(), xc2.right());
-
-#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
-      if (eq1 && eq2) return true;
-#else
-      if (eq1 && eq2) return false;
-#endif
-
-      if (eq1 && xc2.left().is_no_boundary()) return true;
-      if (eq2 && xc1.left().is_no_boundary()) return true;
-      return false;
-    }
-  };
-
-  /*! Obtain an Are_mergeable_2 function object */
-  Are_mergeable_2 are_mergeable_2_object() const
-  { return Are_mergeable_2(this); }
-
-  /*! A functor that merges two x-monotone arcs into one */
-  class Merge_2 {
-  protected:
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
-
-  public:
-    /*! Merge two given x-monotone curves into a single curve (spherical_arc).
-     * \param xc1 the first curve.
-     * \param xc2 the second curve.
-     * \param xc Output: the merged curve.
-     * \pre the two curves are mergeable.
-     */
-    void operator()(const X_monotone_curve_2& xc1,
-                    const X_monotone_curve_2& xc2,
-                    X_monotone_curve_2& xc) const
-    {
-      CGAL_precondition (m_traits->are_mergeable_2_object()(xc1, xc2) == true);
-
-      if (xc1.is_degenerate() || xc1.is_empty()) {
-        xc = xc2;
-        return;
-      }
-
-      if (xc2.is_degenerate() || xc2.is_empty()) {
-        xc = xc1;
-        return;
-      }
-
-      const Kernel* kernel = m_traits;
-      typename Kernel::Equal_3 equal = kernel->equal_3_object();
-
-      xc.set_is_degenerate(false);
-      xc.set_is_empty(false);
-      xc.set_is_vertical(xc1.is_vertical());
-
-      bool eq1 = equal(xc1.right(), xc2.left());
-
-#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
-      bool eq2 = equal(xc1.left(), xc2.right());
-      if (eq1 && eq2) {
-        const Point_2& p =
-          xc1.source().is_mid_boundary() ? xc1.source() : xc1.target();
-        xc.set_source(p);
-        xc.set_target(p);
-        xc.set_normal(xc1.normal());
-        xc.set_is_full(true);
-      }
-#endif
-
-      if (xc1.is_directed_right() || xc2.is_directed_right()) {
-        xc.set_normal(xc1.is_directed_right() ? xc1.normal() : xc2.normal());
-        xc.set_is_directed_right(true);
-
-        if (eq1) {
-          xc.set_source(xc1.left());
-          xc.set_target(xc2.right());
-        } else {
-          CGAL_assertion(equal(xc1.left(), xc2.right()));
-          xc.set_source(xc2.left());
-          xc.set_target(xc1.right());
-        }
-      } else {
-        xc.set_normal(xc1.normal());
-        xc.set_is_directed_right(false);
-
-        if (eq1) {
-          xc.set_source(xc2.right());
-          xc.set_target(xc1.left());
-        } else {
-          CGAL_assertion(equal(xc1.left(), xc2.right()));
-          xc.set_source(xc1.right());
-          xc.set_target(xc2.left());
-        }
-      }
-    }
-  };
-
-  /*! Obtain a Merge_2 function object */
-  Merge_2 merge_2_object() const { return Merge_2(this); }
-  //@}
-
-  /// \name Functor definitions for the landmarks point-location strategy.
-  //@{
-  typedef double                          Approximate_number_type;
-
-  class Approximate_2 {
-  public:
-
-    /*! Return an approximation of a point coordinate.
-     * \param p the exact point.
-     * \param i the coordinate index (either 0 or 1).
-     * \pre i is either 0 or 1.
-     * \return an approximation of p's x-coordinate (if i == 0), or an
-     *         approximation of p's y-coordinate (if i == 1).
-     */
-    Approximate_number_type operator()(const Point_2& p, int i) const
-    {
-      CGAL_precondition(i == 0 || i == 1);
-      return (i == 0) ? CGAL::to_double(p.x()) : CGAL::to_double(p.y());
-    }
-  };
-
-  /*! Obtain an Approximate_2 function object */
-  Approximate_2 approximate_2_object() const { return Approximate_2(); }
-
-  class Construct_x_monotone_curve_2 {
-  public:
-
-    /*! Return an x-monotone curve connecting the two given endpoints.
-     * \param p the first point.
-     * \param q the second point.
-     * \pre p and q must not be the same.
-     * \return a spherical_arc connecting p and q.
-     */
-    X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const
-    { return X_monotone_curve_2(p, q); }
-  };
-
-  /*! Obtain a Construct_x_monotone_curve_2 function object */
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
-  { return Construct_x_monotone_curve_2(); }
-  //@}
-
-
-  /// \name Functor definitions for the Boolean set-operation traits.
-  //@{
-
-  class Compare_endpoints_xy_2 {
-  public:
-
-    /*!
-     * Compare the endpoints of an $x$-monotone curve lexicographically.
-     * (assuming the curve has a designated source and target points).
-     * \param xc the curve.
-     * \return SMALLER if the curve is directed right;
-     *         LARGER if the curve is directed left.
-     */
-    Comparison_result operator()(const X_monotone_curve_2& xc)
-    { return (xc.is_directed_right()) ? SMALLER : LARGER; }
-  };
-
-  /*! Obtain a Compare_endpoints_xy_2 function object */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  { return Compare_endpoints_xy_2(); }
-
-  class Construct_opposite_2 {
-  public:
-    /*! Construct an opposite x-monotone (with swapped source and target).
-     * \param xc the curve.
-     * \return the opposite curve.
-     */
-    X_monotone_curve_2 operator()(const X_monotone_curve_2& xc)
-    { return xc.opposite(); }
-  };
-
-  /*! Obtain a Construct_opposite_2 function object */
-  Construct_opposite_2 construct_opposite_2_object() const
-  { return Construct_opposite_2(); }
-  //@}
-
-#if 0
-  /*! Inserter for the spherical_arc class used by the traits-class */
-  template <typename OutputStream>
-  friend OutputStream& operator<<(OutputStream& os, const Point_2& p)
-  {
-    CGAL::To_double<typename Kernel::FT> todouble;
-    os << static_cast<float>(todouble(p.dx())) << ", "
-       << static_cast<float>(todouble(p.dy())) << ", "
-       << static_cast<float>(todouble(p.dz()));
-    return os;
-  }
-
-  /*! Inserter for the spherical_arc class used by the traits-class */
-  template <typename OutputStream>
-  friend OutputStream& operator<<(OutputStream& os,
-                                  const X_monotone_curve_2& xc)
-  {
-    os << "(" << xc.left() << "), (" << xc.right() << ")";
-    return os;
-  }
-
-  /*! Extractor for the spherical_arc class used by the traits-class */
-  template <typename InputStream>
-  friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc)
-  {
-    CGAL_error_msg("Not implemented yet!");
-    return is;
-  }
-#endif
-};
-
-/*! Represent an extended 3D direction that is used in turn to represent a
- * spherical-arc endpoint. The extended data consists of two flags that
- * indicate whether the point is on the x and on a y boundaries,
- * respectively.
- */
-template <typename Kernel>
-class Arr_extended_direction_3 : public Kernel::Direction_3 {
-public:
-  typedef typename Kernel::FT                           FT;
-  typedef typename Kernel::Direction_3                  Direction_3;
-
-  /*! Enumeration of discontinuity type */
-  enum Location_type {
-    NO_BOUNDARY_LOC,
-    MIN_BOUNDARY_LOC,
-    MID_BOUNDARY_LOC,
-    MAX_BOUNDARY_LOC
-  };
-
-private:
-  typedef typename Kernel::Direction_2                  Direction_2;
-
-  /*! The point discontinuity type */
-  Location_type m_location;
-
-  inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); }
-
-  inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); }
-
-  inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); }
-
-public:
-  /*! Default constructor */
-  Arr_extended_direction_3() :
-    Direction_3(0, 0, 1),
-    m_location(MAX_BOUNDARY_LOC)
-  {}
-
-  /*! Constructor */
-  Arr_extended_direction_3(const Direction_3& dir, Location_type location) :
-    Direction_3(dir),
-    m_location(location)
-  {}
-
-  /*! Constructor
-   * \param x the x coordinate
-   * \param y the y coordinate
-   * \param z the z coordinate
-   */
-  Arr_extended_direction_3(const FT& x, const FT& y, const FT& z) :
-    Direction_3(x, y, z)
-  { init(); }
-
-  /*! Constructor from a direction
-   * \param dir the direction
-   */
-  Arr_extended_direction_3(const Direction_3& dir) : Direction_3(dir)
-  { init(); }
-
-  /*! Initialize from a direction
-   * \param dir the direction
-   */
-  void init()
-  {
-    const Direction_3& dir = *this;
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-    if (y_sign(dir) != ZERO) {
-      m_location = NO_BOUNDARY_LOC;
-      return;
-    }
-    CGAL::Sign signx = x_sign(dir);
-    m_location =
-      (signx == POSITIVE) ? NO_BOUNDARY_LOC :
-      ((signx == NEGATIVE) ? MID_BOUNDARY_LOC :
-       ((z_sign(dir) == NEGATIVE) ? MIN_BOUNDARY_LOC : MAX_BOUNDARY_LOC));
-#else
-    if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) {
-      m_location =
-        (z_sign(dir) == NEGATIVE) ? MIN_BOUNDARY_LOC : MAX_BOUNDARY_LOC;
-      return;
-    }
-
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-    Direction_2 dir_xy = Traits::project_xy(dir);
-    Kernel kernel;
-    typename Kernel::Equal_2 equal_2 = kernel.equal_2_object();
-    const Direction_2& xy = Traits::identification_xy();
-    m_location = equal_2(dir_xy, xy) ? MID_BOUNDARY_LOC : NO_BOUNDARY_LOC;
-#endif
-  }
-
-  /*! Copy constructor */
-  Arr_extended_direction_3(const Arr_extended_direction_3& ed) :
-    Direction_3(static_cast<const Direction_3&>(ed))
-  {
-    m_location = ed.discontinuity_type();
-  }
-
-  /*! Assignment operator */
-  Arr_extended_direction_3& operator=(const Arr_extended_direction_3& ed)
-  {
-    *(static_cast<Direction_3*>(this)) = static_cast<const Direction_3&>(ed);
-    m_location = ed.discontinuity_type();
-    return (*this);
-  }
-
-  /*! Obtain the discontinuity type of the point */
-  Location_type discontinuity_type() const
-  { return m_location; }
-
-  bool is_no_boundary() const { return (m_location == NO_BOUNDARY_LOC); }
-
-  bool is_min_boundary() const { return (m_location == MIN_BOUNDARY_LOC); }
-
-  bool is_mid_boundary() const { return (m_location == MID_BOUNDARY_LOC); }
-
-  bool is_max_boundary() const { return (m_location == MAX_BOUNDARY_LOC); }
-};
-
-/*! A Representation of an x-monotone great circular arc embedded on a sphere,
- * as used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class
- * An x-monotone great circular arc cannot cross the closed hemi-circle arc of
- * discontinuity, defined as the longitude that lies in the zx-plane, and is
- * contained in the open halfspace (x > 0).
- * \todo At this point such an arc cannot have an angle of 180 degrees.
- * \todo It is always directed from its source to its target.
- */
-template <typename T_Kernel>
-class Arr_x_monotone_geodesic_arc_on_sphere_3 {
-public:
-  typedef T_Kernel                                    Kernel;
-  typedef typename Kernel::Direction_3                Direction_3;
-  typedef typename Kernel::Plane_3                    Plane_3;
-  typedef typename Kernel::Vector_3                   Vector_3;
-  typedef typename Kernel::Direction_2                Direction_2;
-
-protected:
-  // For some reason compilation under Windows fails without the qualifier
-  typedef CGAL::Arr_extended_direction_3<Kernel>      Arr_extended_direction_3;
-
-  /*! The source point of the arc */
-  Arr_extended_direction_3 m_source;
-
-  /*! The target point of the arc */
-  Arr_extended_direction_3 m_target;
-
-  /*! The direction of the plane that contains the arc */
-  Direction_3 m_normal;
-
-  /*! The arc is vertical */
-  bool m_is_vertical;
-
-  /*! Target (lexicographically) larger than source */
-  bool m_is_directed_right;
-
-  /*! The arc is a full circle */
-  bool m_is_full;
-
-  /* The arc is degenerate - it consists of a single point */
-  bool m_is_degenerate;
-
-  /*! The arc is empty */
-  bool m_is_empty;
-
-  inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); }
-
-  inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); }
-
-  inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); }
-
-  /*! Constructs a plane that contains two directions.
-   * \param d1 the first direction.
-   * \param d2 the second direction.
-   */
-  inline Direction_3 construct_normal_3(const Direction_3& d1,
-                                        const Direction_3& d2) const
-  {
-    Kernel kernel;
-    Vector_3 v = kernel.construct_cross_product_vector_3_object()(d1.vector(),
-                                                                  d2.vector());
-    return v.direction();
-  }
-
-public:
-  /*! Default constructor - constructs an empty arc */
-  Arr_x_monotone_geodesic_arc_on_sphere_3() :
-    m_is_vertical(false),
-    m_is_directed_right(false),
-    m_is_full(false),
-    m_is_degenerate(false),
-    m_is_empty(true)
-  {}
-
-  /*! Constructor
-   * \param src the source point of the arc
-   * \param trg the target point of the arc
-   * \param plane the plane that contains the arc
-   * \param is_vertical is the arc vertical ?
-   * \param is_directed_right is the arc directed from left to right?
-   * \param is_full is the arc a full circle?
-   * \param is_degenerate is the arc degenerate (single point)?
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3
-  (const Arr_extended_direction_3& src,
-   const Arr_extended_direction_3& trg,
-   const Direction_3& normal,
-   bool is_vertical, bool is_directed_right,
-   bool is_full = false, bool is_degenerate = false, bool is_empty = false) :
-    m_source(src),
-    m_target(trg),
-    m_normal(normal),
-    m_is_vertical(is_vertical),
-    m_is_directed_right(is_directed_right),
-    m_is_full(is_full),
-    m_is_degenerate(is_degenerate),
-    m_is_empty(is_empty)
-  {}
-
-  /*! Copy constructor
-   * \param other the other arc
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3
-  (const Arr_x_monotone_geodesic_arc_on_sphere_3& other)
-  {
-    m_source = other.m_source;
-    m_target = other.m_target;
-    m_normal = other.m_normal;
-    m_is_vertical = other.m_is_vertical;
-    m_is_directed_right = other.m_is_directed_right;
-    m_is_full = other.m_is_full;
-    m_is_degenerate = other.m_is_degenerate;
-    m_is_empty = other.m_is_empty;
-  }
-
-  /*! Assignment operator */
-  Arr_x_monotone_geodesic_arc_on_sphere_3& operator=
-  (const Arr_x_monotone_geodesic_arc_on_sphere_3& other)
-  {
-    m_source = other.m_source;
-    m_target = other.m_target;
-    m_normal = other.m_normal;
-    m_is_vertical = other.m_is_vertical;
-    m_is_directed_right = other.m_is_directed_right;
-    m_is_full = other.m_is_full;
-    m_is_degenerate = other.m_is_degenerate;
-    m_is_empty = other.m_is_empty;
-    return (*this);
-  }
-
-  /*! Construct the minor arc from two endpoint directions. The minor arc
-   *  is the one with the smaller angle among the two geodesic arcs with
-   * the given endpoints.
-   * 1. Find out whether the arc is x-monotone.
-   * 2. If it is x-monotone,
-   *    2.1 Find out whether it is vertical, and
-   *    2.2 whether the target is larger than the source (directed right).
-   * The arc is vertical, iff
-   * 1. one of its endpoint direction pierces a pole, or
-   * 2. the projections onto the xy-plane coincide.
-   * \param source the source point.
-   * \param target the target point.
-   * \pre the source and target cannot be equal.
-   * \pre the source and target cannot be antipodal.
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3
-  (const Arr_extended_direction_3& source,
-   const Arr_extended_direction_3& target) :
-    m_source(source),
-    m_target(target),
-    m_is_full(false),
-    m_is_degenerate(false),
-    m_is_empty(false)
-  {
-    CGAL_precondition_code(Kernel kernel);
-    CGAL_precondition(!kernel.equal_3_object()
-                      (kernel.construct_opposite_direction_3_object()(m_source),
-                       m_target));
-    m_normal = construct_normal_3(m_source, m_target);
-    init();
-  }
-
-  /*! Initialize a spherical_arc given that the two endpoint directions
-   * have been set. It is assumed that the arc is the one with the smaller
-   * angle among the two.
-   * 1. Find out whether the arc is x-monotone.
-   * 2. If it is x-monotone,
-   *    2.1 Find out whether it is vertical, and
-   *    2.2 whether the target is larger than the source (directed right).
-   * The arc is vertical, iff
-   * 1. one of its endpoint direction pierces a pole, or
-   * 2. the projections onto the xy-plane coincide.
-   * \param source the source point.
-   * \param target the target point.
-   * \pre the source and target cannot be equal.
-   */
-  void init()
-  {
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    Kernel kernel;
-    CGAL_precondition(!kernel.equal_3_object()(m_source, m_target));
-
-    // Check whether any one of the endpoint coincide with a pole:
-    if (m_source.is_max_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(false);
-      return;
-    }
-    if (m_source.is_min_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(true);
-      return;
-    }
-    if (m_target.is_max_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(true);
-      return;
-    }
-    if (m_target.is_min_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(false);
-      return;
-    }
-
-    // None of the enpoints coincide with a pole:
-    Direction_2 s = Traits::project_xy(m_source);
-    Direction_2 t = Traits::project_xy(m_target);
-
-    Orientation orient = Traits::orientation(s, t);
-    if (orient == COLLINEAR) {
-      set_is_vertical(true);
-      const Direction_2& nx = Traits::neg_x_2();
-      if (Traits::orientation(nx, s) == COLLINEAR) {
-        // Project onto xz plane:
-        s = Traits::project_xz(m_source);
-        t = Traits::project_xz(m_target);
-        const Direction_2& ny = Traits::neg_y_2();
-        Orientation orient1 = Traits::orientation(ny, s);
-        CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t));
-        CGAL_assertion(orient1 == orient2);
-        orient = Traits::orientation(s, t);
-        CGAL_assertion(orient != COLLINEAR);
-        if (orient1 == LEFT_TURN) {
-          set_is_directed_right(orient == LEFT_TURN);
-          return;
-        }
-        set_is_directed_right(orient == RIGHT_TURN);
-        return;
-      }
-      // Project onto yz plane:
-      s = Traits::project_yz(m_source);
-      t = Traits::project_yz(m_target);
-      const Direction_2& ny = Traits::neg_y_2();
-      Orientation orient1 = Traits::orientation(ny, s);
-      CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t));
-      CGAL_assertion(orient1 == orient2);
-      if (orient1 == LEFT_TURN) {
-        orient = Traits::orientation(s, t);
-        CGAL_assertion(orient != COLLINEAR);
-        set_is_directed_right(orient == LEFT_TURN);
-        return;
-      }
-      orient = Traits::orientation(s, t);
-      CGAL_assertion(orient != COLLINEAR);
-      set_is_directed_right(orient == RIGHT_TURN);
-      return;
-    }
-
-    // The arc is not vertical!
-    set_is_vertical(false);
-    set_is_directed_right(orient == LEFT_TURN);
-    set_is_full(kernel.equal_3_object()(m_source, m_target));
-  }
-
-  /*! Construct a full spherical_arc from a plane
-   * \param plane the containing plane.
-   * \pre the plane is not vertical
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3(const Direction_3& normal) :
-    m_normal(normal),
-    m_is_vertical(false),
-    m_is_directed_right(z_sign(normal) == POSITIVE),
-    m_is_full(true),
-    m_is_degenerate(false),
-    m_is_empty(false)
-  {
-    CGAL_precondition(z_sign(normal) != ZERO);
-
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-    Direction_3 d = (CGAL::sign(normal.dz()) == POSITIVE) ?
-      Direction_3(-(normal.dz()), 0, normal.dx()) :
-      Direction_3(normal.dz(), 0, -(normal.dx()));
-#else
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-    typedef typename Kernel::FT                         FT;
-
-    const Direction_2& xy = Traits::identification_xy();
-    FT x = xy.dx();
-    FT y = xy.dy();
-    FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) / -(normal.dz()));
-    Direction_3 d(x, y, z);
-#endif
-    m_source = m_target =
-      Arr_extended_direction_3(d, Arr_extended_direction_3::MID_BOUNDARY_LOC);
-  }
-
-  /*! Construct a full spherical_arc from a common endpoint and a plane
-   * \param plane the containing plane.
-   * \pre the point lies on the plane
-   * \pre the point lies on the open discontinuity arc
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3
-  (const Arr_extended_direction_3& point,
-   const Direction_3& normal) :
-    m_source(point),
-    m_target(point),
-    m_normal(normal),
-    m_is_vertical(false),
-    m_is_directed_right(z_sign(normal) == POSITIVE),
-    m_is_full(true),
-    m_is_degenerate(false),
-    m_is_empty(false)
-  {
-    CGAL_precondition(has_on(point));
-    CGAL_precondition(z_sign(normal) != ZERO);
-#if !defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
-    CGAL_error_msg( "Full x-monotone arcs are not supported!");
-#endif
-  }
-
-  /*! Construct a spherical_arc from two endpoints directions contained
-   * in a plane.
-   * \param plane the containing plane.
-   * \param source the source-point direction.
-   * \param target the target-point direction.
-   * \pre Both endpoint lie on the given plane.
-   * \pre Both endpoint lie on the given plane.
-   */
-  Arr_x_monotone_geodesic_arc_on_sphere_3
-  (const Arr_extended_direction_3& source,
-   const Arr_extended_direction_3& target,
-   const Direction_3& normal) :
-    m_source(source),
-    m_target(target),
-    m_normal(normal),
-    m_is_full(false),
-    m_is_degenerate(false),
-    m_is_empty(false)
-  {
-    CGAL_precondition(has_on(source));
-    CGAL_precondition(has_on(target));
-
-    // Check whether any one of the endpoint coincide with a pole:
-    if (source.is_max_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(false);
-      return;
-    }
-    if (source.is_min_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(true);
-      return;
-    }
-    if (target.is_max_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(true);
-      return;
-    }
-    if (target.is_min_boundary()) {
-      set_is_vertical(true);
-      set_is_directed_right(false);
-      return;
-    }
-
-    if (z_sign(normal) == ZERO) {
-      set_is_vertical(true);
-      bool s_is_positive, plane_is_positive;
-      CGAL::Sign xsign = x_sign(normal);
-      if (xsign == ZERO) {
-        s_is_positive = x_sign(source) == POSITIVE;
-        plane_is_positive = y_sign(normal) == NEGATIVE;
-      } else {
-        s_is_positive = y_sign(source) == POSITIVE;
-        plane_is_positive = xsign == POSITIVE;
-      }
-      bool ccw = ((plane_is_positive && s_is_positive) ||
-                  (!plane_is_positive && !s_is_positive));
-      set_is_directed_right(ccw);
-      return;
-    }
-
-    // The arc is not vertical!
-    set_is_vertical(false);
-    set_is_directed_right(z_sign(normal) == POSITIVE);
-  }
-
-  /*! Set the source endpoint direction.
-   * \param p the endpoint to set.
-   */
-  void set_source(const Direction_3& p) { m_source = p; }
-
-  /*! Set the target endpoint direction.
-   * \param p the endpoint to set.
-   */
-  void set_target(const Direction_3& p) { m_target = p; }
-
-  /*! Set the direction of the underlying plane.
-   * \param normal the plane direction.
-   */
-  void set_normal(const Direction_3& normal) { m_normal = normal; }
-
-  void set_is_vertical(bool flag) { m_is_vertical = flag; }
-  void set_is_directed_right(bool flag) { m_is_directed_right = flag; }
-  void set_is_full(bool flag) { m_is_full = flag; }
-  void set_is_degenerate(bool flag) { m_is_degenerate = flag; }
-  void set_is_empty(bool flag) { m_is_empty = flag; }
-
-  /*! Obtain the source */
-  const Arr_extended_direction_3& source() const { return m_source; }
-
-  /*! Obtain the target */
-  const Arr_extended_direction_3& target() const { return m_target; }
-
-  /*! Obtain the normal to the containing plane */
-  const Direction_3& normal() const { return m_normal; }
-
-  /*! Obtain the (lexicographically) left endpoint direction */
-  const Arr_extended_direction_3& left() const
-  { return (m_is_directed_right ? m_source : m_target); }
-
-  /*! Obtain the (lexicographically) right endpoint */
-  const Arr_extended_direction_3& right() const
-  { return (m_is_directed_right ? m_target : m_source); }
-
-  /*! Determines whether the curve is vertical */
-  bool is_vertical() const { return m_is_vertical; }
-
-  /*! Determines whether the curve is directed lexicographically from left to
-   * right
-   */
-  bool is_directed_right() const { return m_is_directed_right; }
-
-  /*! Determines whether the curve is a full circle */
-  bool is_full() const { return m_is_full; }
-
-  /*! Determines whether the curve is degenerate */
-  bool is_degenerate() const { return m_is_degenerate; }
-
-  /*! Determines whether the curve is degenerate */
-  bool is_empty() const { return m_is_empty; }
-
-  /*! Determine whether the curve lie on the identification arc */
-  bool is_on_boundary() const
-  {
-    /* If the curve is not vertical and non of its endpoints lie on the
-     * boundary, the arc itself cannot lie on the identification arc.
-     */
-    if (m_source.is_no_boundary() || m_target.is_no_boundary() ||
-        !is_vertical())
-      return false;
-
-    /*! The curve is vertical. If at least one endpoint lies on the open
-     * identification arc, it entirely lies on it.
-     */
-    if (m_source.is_mid_boundary() || m_target.is_mid_boundary())
-      return true;
-
-    /* Both endpoints lie on opposite poles respectively. If the normal
-     * coincides with the normal of the plane that contains the identification
-     * arc, the arc lies on the identification arc.
-     */
-#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
-    return ((x_sign(m_normal) == ZERO) &&
-            (((y_sign(m_normal) == NEGATIVE) && !is_directed_right()) ||
-             ((y_sign(m_normal) == POSITIVE) && is_directed_right())));
-#else
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    const Direction_3& iden_normal = Traits::identification_normal();
-    const Direction_2 iden_normal_xy = Traits::project_xy(iden_normal);
-    Direction_2 normal_xy = Traits::project_xy(m_normal);
-    Kernel kernel;
-    if (is_directed_right()) {
-      return kernel.equal_2_object()(normal_xy, iden_normal_xy);
-    } else {
-      Direction_2 opposite_normal_xy =
-        kernel.construct_opposite_direction_2_object()(normal_xy);
-      return kernel.equal_2_object()(opposite_normal_xy, iden_normal_xy);
-    }
-#endif
-  }
-
-  /*! Determine whether the given point is in the x-range of the
-   * spherical_arc.
-   * \param point the query point direction.
-   * \return true if point is in the x-range of the (closed) spherical_arc and
-   * false otherwise.
-   * \pre point does not coincide with one of the poles
-   */
-  bool is_in_x_range(const Arr_extended_direction_3& point) const
-  {
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    CGAL_precondition(!point.is_min_boundary());
-    CGAL_precondition(!point.is_max_boundary());
-
-    Direction_2 p = Traits::project_xy(point);
-    if (is_vertical()) {
-      Direction_2 q = (is_directed_right()) ?
-        Direction_2(-(m_normal.dy()), m_normal.dx()) :
-        Direction_2(m_normal.dy(), -(m_normal.dx()));
-      Kernel kernel;
-      return kernel.equal_2_object()(p, q);
-    }
-
-    // The curve is not vertical:
-    Direction_2 r = Traits::project_xy(right());
-    Kernel kernel;
-    if (kernel.equal_2_object()(p, r)) return true;
-    Direction_2 l = Traits::project_xy(left());
-    if (kernel.equal_2_object()(p, l)) return true;
-    return kernel.counterclockwise_in_between_2_object()(p, l, r);
-  }
-
-  /*! Determines whether the curve is a meridian */
-  bool is_meridian() const
-  { return left().is_min_boundary() && right().is_max_boundary(); }
-
-#if 0
-  /*! Create a bounding box for the spherical_arc */
-  Bbox_2 bbox() const
-  {
-    Kernel kernel;
-    Segment_2 seg = kernel.construct_spherical_arc_2_object()(this->m_source,
-                                                              this->m_target);
-    return kernel.construct_bbox_2_object()(seg);
-  }
-#endif
-
-  /*! Flip the spherical_arc (swap it source and target) */
-  Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const
-  {
-    Arr_x_monotone_geodesic_arc_on_sphere_3 opp;
-    opp.m_source = this->m_target;
-    opp.m_target = this->m_source;
-    opp.m_normal = this->m_normal;
-    opp.m_is_directed_right = !(this->is_directed_right());
-    opp.m_is_vertical = this->is_vertical();
-    opp.m_is_full = this->is_full();
-    opp.m_is_degenerate = this->is_degenerate();
-    opp.m_is_empty = this->is_empty();
-    return opp;
-  }
-
-  /*! Determined whether a direction is contained in a plane
-   * \param plane the 3D plane.
-   * \param dir the 3D direction.
-   * \return true if dir is contained in plane; false otherwise.
-   * \pre the plane contains the origin.
-   */
-  inline bool has_on(const Direction_3& dir) const
-  {
-    typename Kernel::FT dot = normal().vector() * dir.vector();
-    return CGAL::sign(dot) == ZERO;
-  }
-};
-
-/*! A representation of a general great circular arc embedded on a sphere,
- * used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class
- * An arc is uniqely represented by a plane p, and two endpoints the source
- * s and the target t, which lie in the plane p. The points of the arc are
- * the locus of points visited when moving from the source s toward the
- * target t on the plane p in counterclockwise direction along the circle
- * defined by s and t.
- */
-template <typename T_Kernel>
-class Arr_geodesic_arc_on_sphere_3 :
-  public Arr_x_monotone_geodesic_arc_on_sphere_3<T_Kernel> {
-public:
-  typedef T_Kernel                                              Kernel;
-
-protected:
-  typedef Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>       Base;
-
-public:
-  typedef typename Base::Plane_3                                Plane_3;
-  typedef typename Base::Direction_3                            Direction_3;
-  typedef typename Base::Direction_2                            Direction_2;
-
-protected:
-  // For some reason compilation under Windows fails without the qualifier
-  typedef CGAL::Arr_extended_direction_3<Kernel>    Arr_extended_direction_3;
-
-  using Base::x_sign;
-  using Base::y_sign;
-  using Base::z_sign;
-
-  /*! Indicates whether the arc is x-monotone */
-  bool m_is_x_monotone;
-
-public:
-  /*! Default constructor - constructs an empty arc */
-  Arr_geodesic_arc_on_sphere_3() : Base(), m_is_x_monotone(true) {}
-
-  /*! Copy constructor
-   * \param other the other arc
-   */
-  Arr_geodesic_arc_on_sphere_3
-  (const Arr_geodesic_arc_on_sphere_3& other) : Base(other)
-  {
-    m_is_x_monotone = other.m_is_x_monotone;
-  }
-
-  /*! Constructor
-   * \param src the source point of the arc
-   * \param trg the target point of the arc
-   * \param normal the normal to the  plane that contains the arc
-   * \param is_x_monotone is arc  x-monotone ?
-   * \param is_vertical is the arc vertical ?
-   * \param is_directed_right is the arc directed from left to right?
-   * \param is_full is the arc a full (great) circle?
-   * \param is_degenerate is the arc degenerate (single point)?
-   * \pre plane contains the origin
-   * \pre plane contains src
-   * \pre plane contains trg
-   */
-  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& src,
-                               const Arr_extended_direction_3& trg,
-                               const Direction_3& normal,
-                               bool is_x_monotone, bool is_vertical,
-                               bool is_directed_right,
-                               bool is_full = false,
-                               bool is_degenerate = false,
-                               bool is_empty = false) :
-    Base(src, trg, normal,
-         is_vertical, is_directed_right, is_full, is_degenerate, is_empty),
-    m_is_x_monotone(is_x_monotone)
-  {
-    CGAL_precondition(this->has_on(src));
-    CGAL_precondition(this->has_on(trg));
-  }
-
-  /*! Construct a spherical_arc from two endpoint directions. It is assumed
-   * that the arc is the one with the smaller angle among the two.
-   * 1. Find out whether the arc is x-monotone.
-   * 2. If it is x-monotone,
-   *    2.1 Find out whether it is vertical, and
-   *    2.2 whether the target is larger than the source (directed right).
-   * The arc is vertical, iff
-   * 1. one of its endpoint direction pierces a pole, or
-   * 2. the projections onto the xy-plane coincide.
-   * \param source the source point.
-   * \param target the target point.
-   * \pre the source and target cannot be equal.
-   * \pre the source and target cannot be the opoosite of each other.
-   */
-  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source,
-                               const Arr_extended_direction_3& target)
-  {
-    this->set_source(source);
-    this->set_target(target);
-    this->set_is_full(false);
-    this->set_is_degenerate(false);
-    this->set_is_empty(false);
-
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel>         Traits;
-    typedef typename Kernel::Direction_2                        Direction_2;
-    typedef typename Kernel::Direction_3                        Direction_3;
-
-    Kernel kernel;
-    CGAL_precondition(!kernel.equal_3_object()(source, target));
-    CGAL_precondition(!kernel.equal_3_object()
-                      (kernel.construct_opposite_direction_3_object()(source),
-                       target));
-    this->m_normal = this->construct_normal_3(source, target);
-
-    // Check whether one of the endpoints coincides with a pole: */
-    if (source.is_max_boundary()) {
-      this->set_is_vertical(true);
-      this->set_is_directed_right(false);
-      set_is_x_monotone(true);
-      return;
-    }
-    if (source.is_min_boundary()) {
-      this->set_is_vertical(true);
-      this->set_is_directed_right(true);
-      set_is_x_monotone(true);
-      return;
-    }
-    if (target.is_max_boundary()) {
-      this->set_is_vertical(true);
-      this->set_is_directed_right(true);
-      set_is_x_monotone(true);
-      return;
-    }
-    if (target.is_min_boundary()) {
-      this->set_is_vertical(true);
-      this->set_is_directed_right(false);
-      set_is_x_monotone(true);
-      return;
-    }
-
-    // None of the enpoints coincide with a pole:
-    Direction_3 normal = this->m_normal;
-    if (z_sign(normal) == ZERO) {
-      // The arc is vertical
-      this->set_is_vertical(true);
-      bool s_is_positive, t_is_positive, plane_is_positive;
-      CGAL::Sign xsign = x_sign(normal);
-      if (xsign == ZERO) {
-        s_is_positive = x_sign(source) == POSITIVE;
-        t_is_positive = x_sign(target) == POSITIVE;
-        plane_is_positive = y_sign(normal) == NEGATIVE;
-      } else {
-        s_is_positive = y_sign(source) == POSITIVE;
-        t_is_positive = y_sign(target) == POSITIVE;
-        plane_is_positive = xsign == POSITIVE;
-      }
-      set_is_x_monotone(s_is_positive == t_is_positive);
-      bool ccw = ((plane_is_positive && s_is_positive) ||
-                  (!plane_is_positive && !s_is_positive));
-      this->set_is_directed_right(ccw);
-      return;
-    }
-
-    // The arc is not vertical!
-    this->set_is_vertical(false);
-    Direction_2 s = Traits::project_xy(source);
-    Direction_2 t = Traits::project_xy(target);
-    Orientation orient = Traits::orientation(s, t);
-
-    const Direction_2& d = Traits::identification_xy();
-    if (orient == LEFT_TURN) {
-      this->set_is_directed_right(true);
-      set_is_x_monotone(!kernel.counterclockwise_in_between_2_object()(d, s, t));
-      return;
-    }
-
-    // (orient == RIGHT_TURN)
-    this->set_is_directed_right(false);
-    set_is_x_monotone(!kernel.counterclockwise_in_between_2_object()(d, t, s));
-    return;
-  }
-
-  /*! Construct a spherical_arc from two endpoint directions contained
-   * in a plane.
-   * \param plane the containing plane.
-   * \param source the source-point direction.
-   * \param target the target-point direction.
-   * \param normal the normal to the plane containing the arc
-   * \pre plane contain the origin
-   * \pre Both endpoints lie on the given plane.
-   */
-  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source,
-                               const Arr_extended_direction_3& target,
-                               const Direction_3& normal)
-  {
-    Kernel kernel;
-
-    this->set_source(source);
-    this->set_target(target);
-    this->set_normal(normal);
-    this->set_is_degenerate(false);
-    this->set_is_empty(false);
-
-    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
-
-    CGAL_precondition(this->has_on(source));
-    CGAL_precondition(this->has_on(target));
-
-    if (z_sign(normal) == ZERO) {
-      this->set_is_vertical(true);
-
-      // Check whether both endpoint coincide with the poles:
-      if (source.is_min_boundary() && target.is_max_boundary()) {
-        // Both endpoints coincide with the 2 poles respectively.
-        this->set_is_directed_right(true);
-        this->set_is_full(false);
-        set_is_x_monotone(true);
-        return;
-      }
-
-      if (source.is_max_boundary() && target.is_min_boundary()) {
-        // Both endpoints coincide with the 2 poles respectively.
-        this->set_is_directed_right(false);
-        this->set_is_full(false);
-        set_is_x_monotone(true);
-        return;
-      }
-
-      CGAL::Sign xsign = x_sign(normal);
-      bool xz_plane = xsign == ZERO;
-      bool s_is_positive, t_is_positive, plane_is_positive;
-      if (xz_plane) {
-        s_is_positive = x_sign(source) == POSITIVE;
-        t_is_positive = x_sign(target) == POSITIVE;
-        plane_is_positive = y_sign(normal) == NEGATIVE;
-      } else {
-        s_is_positive = y_sign(source) == POSITIVE;
-        t_is_positive = y_sign(target) == POSITIVE;
-        plane_is_positive = xsign == POSITIVE;
-      }
-
-      // Process degenerate cases:
-      if (source.is_min_boundary()) {
-        this->set_is_directed_right(true);
-        set_is_x_monotone((plane_is_positive && t_is_positive) ||
-                          (!plane_is_positive && !t_is_positive));
-        return;
-      }
-      if (source.is_max_boundary()) {
-        this->set_is_directed_right(false);
-        set_is_x_monotone((plane_is_positive && !t_is_positive) ||
-                          (!plane_is_positive && t_is_positive));
-        return;
-      }
-      if (target.is_min_boundary()) {
-        this->set_is_directed_right(false);
-        set_is_x_monotone((plane_is_positive && !s_is_positive) ||
-                          (!plane_is_positive && s_is_positive));
-        return;
-      }
-      if (target.is_max_boundary()) {
-        this->set_is_directed_right(true);
-        set_is_x_monotone((plane_is_positive && s_is_positive) ||
-                          (!plane_is_positive && !s_is_positive));
-        return;
-      }
-      if (s_is_positive != t_is_positive) {
-        set_is_x_monotone(false);
-        return;
-      }
-
-      /* Non of the endpoints coincide with a pole.
-       * The projections of both endpoints lie on the same hemi-circle.
-       * Thus, either the arc is x-monotone, or it includes both poles.
-       * This means that it is sufficient to check whether one pole lies
-       * on the arc in order to determine x-monotonicity
-       */
-
-      typename Traits::Project project =
-        (xz_plane) ? Traits::project_xz : Traits::project_yz;
-      Direction_2 s = project(source);
-      Direction_2 t = project(target);
-      const Direction_2& ny = Traits::neg_y_2();
-      typename Kernel::Counterclockwise_in_between_2 ccib =
-        kernel.counterclockwise_in_between_2_object();
-      set_is_x_monotone((plane_is_positive && !ccib(ny, s, t)) ||
-                        (!plane_is_positive && !ccib(ny, t, s)));
-
-      bool ccw = ((plane_is_positive && s_is_positive) ||
-                  (!plane_is_positive && !s_is_positive));
-      this->set_is_directed_right(ccw);
-      return;
-    }
-
-    // The arc is not vertical!
-    this->set_is_vertical(false);
-    this->set_is_directed_right(z_sign(normal) == POSITIVE);
-    const Direction_2& d = Traits::identification_xy();
-    Direction_2 s = Traits::project_xy(source);
-    Direction_2 t = Traits::project_xy(target);
-    typename Kernel::Counterclockwise_in_between_2 ccib =
-      kernel.counterclockwise_in_between_2_object();
-    bool plane_is_positive = (z_sign(normal) == POSITIVE);
-    set_is_x_monotone((plane_is_positive && !ccib(d, s, t)) ||
-                      (!plane_is_positive && !ccib(d, t, s)));
-  }
-
-  /*! Construct a full spherical_arc from a plane.
-   * \param plane the containing plane.
-   */
-  Arr_geodesic_arc_on_sphere_3(const Direction_3& normal)
-  {
-    this->normal(normal);
-    this->set_is_vertical(CGAL::sign(normal.dz()) == ZERO);
-    this->set_is_directed_right(true);
-    this->set_is_full(true);
-    this->set_is_degenerate(false);
-    this->set_is_empty(false);
-    set_is_x_monotone(false);
-  }
-
-  /*! Indicates whether the arc is x-monotone
-   * \return true if the arc is x-monotone; false otherwise
-   */
-  bool is_x_monotone() const { return m_is_x_monotone; }
-
-  /*! Set the flag that indicates whether the arc is x-monotone
-   * \param flag indicates whether the arc is x-monotone
-   */
-  void set_is_x_monotone(bool flag) { m_is_x_monotone = flag; }
-};
-
-/*! Inserter for the spherical_arc class used by the traits-class */
-template <typename Kernel, typename OutputStream>
-OutputStream& operator<<(OutputStream& os,
-                         const Arr_extended_direction_3<Kernel>& ed)
-{
-#if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS)
-  os << "("
-     << ed.dx() << ", " << ed.dy() << ",  " << ed.dz();
-  os << ")"
-     << ", "
-     << (ed.is_min_boundary() ? "min" :
-         ed.is_max_boundary() ? "max" :
-         ed.is_mid_boundary() ? "dis" : "reg");
-#else
-  // CGAL::To_double<typename Kernel::FT> todouble;
-  // os << static_cast<float>(todouble(ed.dx())) << ", "
-  //    << static_cast<float>(todouble(ed.dy())) << ", "
-  //    << static_cast<float>(todouble(ed.dz()));
-#endif
-  const typename Kernel::Direction_3* dir = &ed;
-  os << *dir;
-  return os;
-}
-
-/*! Inserter for the spherical_arc class used by the traits-class */
-template <typename Kernel, typename OutputStream>
-OutputStream&
-operator<<(OutputStream& os,
-           const Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>& arc)
-{
-#if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS)
-  os << "("
-     << "(" << arc.source() << "), (" << arc.target() << ")"
-     << "("
-     << ", (" << arc.normal() << ")"
-     << ", " << (arc.is_vertical() ? " |" : "!|")
-     << ", " << (arc.is_directed_right() ? "=>" : "<=")
-     << ", " << (arc.is_full() ? "o" : "/");
-#else
-  os << arc.source() << " " << arc.target() << " ";
-  if (!arc.is_meridian()) os << "0";
-  else os << "1 " << arc.normal();
-#endif
-  return os;
-}
-
-/*! Extractor for the spherical-arc point class used by the traits-class */
-template <typename Kernel, typename InputStream>
-InputStream&
-operator>>(InputStream& is, Arr_extended_direction_3<Kernel>& point)
-{
-  typename Kernel::Direction_3* dir = &point;
-  is >> *dir;
-  point.init();
-  return is;
-}
-
-/*! Extractor for the spherical_arc class used by the traits-class */
-template <typename Kernel, typename InputStream>
-InputStream&
-operator>>(InputStream& is,
-           Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>& arc)
-{
-  Arr_extended_direction_3<Kernel> source, target;
-  is >> source >> target;
-  arc.set_source(source);
-  arc.set_target(target);
-  unsigned int flag;
-  is >> flag;
-  if (flag == 1) {
-    typename Kernel::Direction_3 normal;
-    is >> normal;
-    arc.set_normal(normal);
-  }
-  else {
-    Kernel kernel;
-    CGAL_precondition(!kernel.equal_3_object()
-                      (kernel.construct_opposite_direction_3_object()(source),
-                       target));
-    typename Kernel::Vector_3 v =
-      kernel.construct_cross_product_vector_3_object()(source.vector(),
-                                                       target.vector());
-    arc.set_normal(v.direction());
-  }
-  arc.init();
-  return is;
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
deleted file mode 100644
index 8229a8c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
+++ /dev/null
@@ -1,956 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
-//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
-
-#ifndef CGAL_BEZIER_CURVE_2_H
-#define CGAL_BEZIER_CURVE_2_H
-
-/*! \file
- * Header file for the _Bezier_curve_2 class.
- */
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Arr_geometry_traits/de_Casteljau_2.h>
-#include <algorithm>
-#include <deque>
-#include <vector>
-#include <list>
-#include <ostream>
-
-namespace CGAL {
-
-/*! \class _Bezier_curve_2
- * Representation of a Bezier curve, specified by (n+1) control points
- * p_0, ... , p_n that define the curve (X(t), Y(t)) for 0 <= t <= 1,
- * where X(t) and Y(t) are polynomials of degree n.
- *
- * The class is templated with three parameters: 
- * Rat_kernel A geometric kernel, where Alg_kernel::FT is the number type
- *            for the coordinates of control points (and subsequently also for
- *            the polynomial coefficients). This number type must be the same
- *            as Nt_traits::Rational.
- * Alg_kernel A geometric kernel, where Alg_kernel::FT is a number type
- *            for representing algebraic numbers. This number type must be the
- *            same as Nt_traits::Algebraic.
- * Nt_traits A traits class that defines the Integer, Rational and Algebraic
- *           number-types, as well as the Polynomial class (a polynomial with
- *           integer coefficients) and enables performing various operations
- *           on objects of these types.
- * Bounding_traits A traits class for filtering the exact computations.
- */
-
-// Forward declaration:
-template <class RatKernel_, class AlgKernel_, class NtTraits_,
-          class BoundingTraits_>
-class _Bezier_curve_2;
-
-template <class RatKernel_, class AlgKernel_, class NtTraits_,
-          class BoundingTraits_>
-class _Bezier_curve_2_rep
-{
-  friend class _Bezier_curve_2<RatKernel_, AlgKernel_, NtTraits_,
-                               BoundingTraits_>;
-
-public:
-
-  typedef RatKernel_                              Rat_kernel;
-  typedef AlgKernel_                              Alg_kernel;
-  typedef NtTraits_                               Nt_traits;
-  typedef BoundingTraits_                         Bounding_traits;
-
-  typedef typename Rat_kernel::Point_2            Rat_point_2;
-  typedef typename Alg_kernel::Point_2            Alg_point_2;
-  
-  typedef typename Nt_traits::Integer             Integer;
-  typedef typename Nt_traits::Rational            Rational;
-  typedef typename Nt_traits::Algebraic           Algebraic;
-  typedef typename Nt_traits::Polynomial          Polynomial;
-
-private:
-
-  typedef std::deque<Rat_point_2>                 Control_point_vec;
-
-  Control_point_vec   _ctrl_pts;      /*!< The control points (we prefer deque
-                                           to a vector, as it enables
-                                           push_front()). */
-  Bbox_2              _bbox;          /*!< A bounding box for the curve. */
-  bool                _no_self_inter; /*!< Whether the curve surely has  no
-                                           self intersections. */
-
-  /// \name Lazily-evaluated values of the polynomials B(t) = (X(t), Y(t)).
-  //@{
- 
-  // X(t) is given by *p_polyX(t) / _normX:
-  mutable Polynomial        *p_polyX;       // The polynomial for x.
-  mutable Integer           *p_normX;       // Normalizing factor for y.
-
-  // Y(t) is given by _polyY(t) / _normY:
-  mutable Polynomial        *p_polyY;       // The polynomial for y.
-  mutable Integer           *p_normY;       // Normalizing factor for y.
-  //@}
-
-public:
-
-  /*! Default constructor. */
-  _Bezier_curve_2_rep () : 
-    _no_self_inter (true),
-    p_polyX(NULL),
-    p_normX(NULL),
-    p_polyY(NULL),
-    p_normY(NULL)
-  {}
-
-  /*! Copy constructor (isn't really used). */
-  _Bezier_curve_2_rep (const _Bezier_curve_2_rep& other) :
-    _ctrl_pts(other._ctrl_pts),
-    _bbox(other._bbox),
-    _no_self_inter(other._no_self_inter),
-    p_polyX(NULL),
-    p_normX(NULL),
-    p_polyY(NULL),
-    p_normY(NULL)
-  {
-    if (other.p_polyX != NULL)
-      p_polyX = new Polynomial(*(other.p_polyX));
-    if (other.p_polyY != NULL)
-      p_polyY = new Polynomial(*(other.p_polyY));
-    if (other.p_normX != NULL)
-      p_normX = new Integer(*(other.p_normX));
-    if (other.p_normY != NULL)
-      p_normY = new Integer(*(other.p_normY));
-  }
-
-  /*!
-   * Constructor from a given range of control points.
-   * \param pts_begin An iterator pointing to the first point in the range.
-   * \param pts_end A past-the-end iterator for the range.
-   * \pre The value-type of the input iterator must be Rat_kernel::Point_2.
-   *      It is forbidden to specify two identical consecutive control points.
-   */
-  template <class InputIterator>
-  _Bezier_curve_2_rep (InputIterator pts_begin, InputIterator pts_end) :
-    p_polyX(NULL),
-    p_normX(NULL),
-    p_polyY(NULL),
-    p_normY(NULL)
-  {
-    // Copy the control points and compute their bounding box.
-    const int   pts_size = std::distance (pts_begin, pts_end);
-    double      x, y;
-    double      x_min = 0, x_max = 0;
-    double      y_min = 0, y_max = 0;
-    int         k;
-
-    CGAL_precondition_msg (pts_size > 1,
-                           "There must be at least 2 control points.");
-
-    _ctrl_pts.resize (pts_size);
-    
-    for (k = 0; pts_begin != pts_end; ++pts_begin, k++)
-    {
-//SL: Acccording to the fact that all operations are based on polynomials
-//    duplicated control points can be allowed.
-//      // Make sure that we do not have two identical consecutive control
-//      // points.
-//      CGAL_precondition_msg
-//          (k == 0 || ! equal (*pts_begin, _ctrl_pts[k - 1]),
-//           "Two consecutive control points must not be identical.");
-
-      // Copy the current control point.
-      _ctrl_pts[k] = *pts_begin;
-
-      // Update the bounding box, if necessary.
-      x = CGAL::to_double (pts_begin->x());
-      y = CGAL::to_double (pts_begin->y());
-
-      if (k == 0)
-      {
-        x_min = x_max = x;
-        y_min = y_max = y;
-      }
-      else
-      {
-        if (x < x_min)
-          x_min = x;
-        else if (x > x_max)
-          x_max = x;
-
-        if (y < y_min)
-          y_min = y;
-        else if (y > y_max)
-          y_max = y;
-      }
-    }
-
-    // Construct the bounding box.
-    _bbox = Bbox_2 (x_min, y_min, x_max, y_max);
-
-    // Use the bounding traits to determine whether the curve surely has
-    // not self intersections.
-    Bounding_traits     bound_tr;
-
-    _no_self_inter = ! bound_tr.may_have_self_intersections (_ctrl_pts);
-  }
-
-  /*! Destructor. */
-  ~_Bezier_curve_2_rep ()
-  {
-    if (p_polyX != NULL) 
-      delete p_polyX;
-    if (p_normX != NULL) 
-      delete p_normX;
-    if (p_polyY != NULL) 
-      delete p_polyY;
-    if (p_normY != NULL) 
-      delete p_normY;
-  }
-
-  /// \name Access the polynomials (lazily evaluated).
-  //@{
-
-  /*! Check if the polynomials are already constructed. */
-  bool has_polynomials () const
-  {
-    return (p_polyX != NULL && p_normX != NULL &&
-            p_polyY != NULL && p_normY != NULL);
-  }
-
-  /*! Get the polynomial X(t). */
-  const Polynomial& x_polynomial () const 
-  {
-    if (p_polyX == NULL)
-      _construct_polynomials ();
-    
-    return (*p_polyX);
-  }
-
-  /*! Get the normalizing factor for X(t). */
-  const Integer& x_norm () const 
-  {
-    if (p_normX == NULL)
-      _construct_polynomials ();
-    
-    return (*p_normX);
-  }
-
-  /*! Get the polynomial Y(t). */
-  const Polynomial& y_polynomial () const 
-  {
-    if (p_polyY == NULL)
-      _construct_polynomials ();
-
-    return (*p_polyY);
-  }
-
-  /*! Get the normalizing factor for Y(t). */
-  const Integer& y_norm () const 
-  {
-    if (p_normY == NULL)
-      _construct_polynomials ();
-    
-    return (*p_normY);
-  }
-  //@}
-
-private:
-
-  /*!
-   * Construct the representation of X(t) and Y(t).
-   * The function is declared as "const" as it changes only mutable members.
-   */
-  void _construct_polynomials () const;
-
-  /*!
-   * Compute the value of n! / (j! k! (n-k-j)!).
-   */
-  Integer _choose (int n, int j, int k) const;
-
-};
-
-template <class RatKernel_, class AlgKernel_, class NtTraits_,
-          class BoundingTraits_>
-class _Bezier_curve_2 :
-  public Handle_for<_Bezier_curve_2_rep<RatKernel_,
-                                        AlgKernel_,
-                                        NtTraits_,
-                                        BoundingTraits_> >
-{
-public:
-
-  typedef RatKernel_                              Rat_kernel;
-  typedef AlgKernel_                              Alg_kernel;
-  typedef NtTraits_                               Nt_traits;
-  typedef BoundingTraits_                         Bounding_traits;
-  typedef _Bezier_curve_2<Rat_kernel,
-                          Alg_kernel,
-                          Nt_traits,
-                          Bounding_traits>        Self;
-
-private:
-
-  typedef _Bezier_curve_2_rep<Rat_kernel,
-                              Alg_kernel,
-                              Nt_traits,
-                              Bounding_traits>    Bcv_rep;
-  typedef Handle_for<Bcv_rep>                     Bcv_handle;
-
-  typedef typename Bcv_rep::Control_point_vec     Control_pt_vec;
-
-public:
-
-  typedef typename Bcv_rep::Rat_point_2           Rat_point_2;
-  typedef typename Bcv_rep::Alg_point_2           Alg_point_2;
-  
-  typedef typename Bcv_rep::Integer               Integer;
-  typedef typename Bcv_rep::Rational              Rational;
-  typedef typename Bcv_rep::Algebraic             Algebraic;
-  typedef typename Bcv_rep::Polynomial            Polynomial;
-
-  typedef typename Control_pt_vec::const_iterator Control_point_iterator;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  _Bezier_curve_2 () :
-    Bcv_handle (Bcv_rep())
-  {}
-
-  /*!
-   * Copy constructor.
-   */
-  _Bezier_curve_2 (const Self& bc) :
-    Bcv_handle (bc)
-  {}
-
-  /*!
-   * Constructor from a given range of control points.
-   * \param pts_begin An iterator pointing to the first point in the range.
-   * \param pts_end A past-the-end iterator for the range.
-   * \pre The value-type of the input iterator must be Rat_kernel::Point_2.
-   *      It is forbidden to specify two identical consecutive control points.
-   */
-  template <class InputIterator>
-  _Bezier_curve_2 (InputIterator pts_begin, InputIterator pts_end) :
-    Bcv_handle (Bcv_rep (pts_begin, pts_end))
-  {}
-
-  /*!
-   * Assignment operator.
-   */
-  Self& operator= (const Self& bc)
-  {
-    if (this == &bc || this->identical (bc))
-      return (*this);
-
-    Bcv_handle::operator= (bc);
-    return (*this);
-  }
-  
-  /*!
-   * Get a unique curve ID (based on the actual representation pointer).
-   */
-  size_t id () const
-  {
-    return (reinterpret_cast<size_t> (this->ptr()));
-  }
-
-  /*!
-   * Get the polynomial for the x-coordinates of the curve.
-   */
-  const Polynomial& x_polynomial () const
-  {
-    return (this->_rep().x_polynomial());
-  }
-
-  /*!
-   * Get the normalizing factor for the x-coordinates.
-   */
-  const Integer& x_norm () const 
-  {
-    return (this->_rep().x_norm());
-  }
-
-  /*!
-   * Get the polynomial for the y-coordinates of the curve.
-   */
-  const Polynomial& y_polynomial () const 
-  {
-    return (this->_rep().y_polynomial());
-  }
-
-  /*!
-   * Get the normalizing factor for the y-coordinates.
-   */
-  const Integer& y_norm () const 
-  {
-    return (this->_rep().y_norm());
-  }
-
-  /*!
-   * Get the number of control points inducing the Bezier curve.
-   */
-  unsigned int number_of_control_points () const
-  {
-    return (this->_rep()._ctrl_pts.size());
-  }
-
-  /*!
-   * Get the i'th control point.
-   * \pre i must be between 0 and n - 1, where n is the number of control
-   *      points.
-   */
-  const Rat_point_2& control_point (unsigned int i) const
-  {
-    CGAL_precondition (i < number_of_control_points());
-
-    return ((this->_rep()._ctrl_pts)[i]);
-  }
-
-  /*!
-   * Get an interator for the first control point.
-   */
-  Control_point_iterator control_points_begin () const
-  {
-    return (this->_rep()._ctrl_pts.begin());
-  }
-
-  /*!
-   * Get a past-the-end interator for control points.
-   */
-  Control_point_iterator control_points_end () const
-  {
-    return (this->_rep()._ctrl_pts.end());
-  }
-
-  /*!
-   * Check if both curve handles refer to the same object.
-   */
-  bool is_same (const Self& bc) const
-  {
-    return (this->identical (bc));
-  }
-
-  /*!
-   * Compute a point of the Bezier curve given a rational t-value.
-   * \param t The given t-value.
-   * \return The point B(t).
-   */
-  Rat_point_2 operator() (const Rational& t) const;
-  
-  /*!
-   * Compute a point of the Bezier curve given an algebraic t-value.
-   * \param t The given t-value.
-   * \return The point B(t).
-   */
-  Alg_point_2 operator() (const Algebraic& t) const;
- 
-  /*!
-   * Sample a portion of the curve (for drawing purposes, etc.).
-   * \param t_start The t-value to start with.
-   * \param t_end The t-value to end at.
-   * \param n_samples The required number of samples.
-   * \param oi Output: An output iterator for the samples. The value-type of
-   *                   this iterator must be std::pair<double, double>.
-   * \return A past-the-end iterator for the samples.
-   */
-  template <class OutputIterator>
-  OutputIterator sample (const double& t_start, const double& t_end,
-                         unsigned int n_samples,
-                         OutputIterator oi) const 
-  {
-    // Convert the coordinates of the control points to doubles.
-    typedef Simple_cartesian<double>                        App_kernel;
-    typedef App_kernel::Point_2                             App_point_2;
-
-    const unsigned int             n_pts = number_of_control_points();
-    std::vector<App_point_2>       app_ctrl_pts (n_pts);
-    unsigned int                   k;
-
-    for (k = 0; k < n_pts; k++)
-    {
-      const Rat_point_2&   pt = control_point(k);
-
-      app_ctrl_pts[k] = App_point_2 (CGAL::to_double (pt.x()),
-                                     CGAL::to_double (pt.y()));
-    }
-
-    // Sample the approximated curve.
-    const unsigned int   n = (n_samples >= 2) ? n_samples : 2; 
-    const double         delta_t = (t_end - t_start) / (n - 1);
-    App_point_2          p;
-
-    for (k = 0; k < n; k++)
-    {
-      p = point_on_Bezier_curve_2 (app_ctrl_pts.begin(), app_ctrl_pts.end(),
-                                   t_start + k * delta_t);
-
-      *oi = std::make_pair (p.x(), p.y());
-      ++oi;
-    }
-
-    return (oi);
-  }
-
-  /*!
-   * Compute all parameter values t such that the x-coordinate of B(t) is x0.
-   * Note that the function does not return only values between 0 and 1, so
-   * the output t-values may belong to the imaginary continuation of the curve.
-   * \param x0 The given x-coordinate.
-   * \param oi Output: An output iterator for the t-values.
-   * \return A past-the-end iterator.
-   */
-  template <class OutputIterator>
-  OutputIterator get_t_at_x (const Rational& x0,
-                             OutputIterator oi) const
-  {
-    return (_solve_t_values (this->_rep().x_polynomial(), 
-                             this->_rep().x_norm(), 
-                             x0,
-                             oi));
-  }
-
-  /*!
-   * Compute all parameter values t such that the y-coordinate of B(t) is y0.
-   * Note that the function does not return only values between 0 and 1, so
-   * the output t-values may belong to the imaginary continuation of the curve.
-   * \param y0 The given y-coordinate.
-   * \param oi Output: An output iterator for the t-values.
-   * \return A past-the-end iterator.
-   */
-  template <class OutputIterator>
-  OutputIterator get_t_at_y (const Rational& y0,
-                             OutputIterator oi) const
-  {
-    return (_solve_t_values (this->_rep().y_polynomial(), 
-                             this->_rep().y_norm(), y0,
-                             oi));
-  }
-
-  /*!
-   * Check if the two curves have the same support.
-   */
-  bool has_same_support (const Self& bc) const;
-
-  /*!
-   * Get the bounding box of the curve.
-   */
-  const Bbox_2& bbox () const
-  {
-    return (this->_rep()._bbox);
-  }
-
-  /*!
-   * Check if the curve contains not self intersections.
-   * Note that there may not be any self intersections even if the
-   * function returns true (but not vice versa).
-   */
-  bool has_no_self_intersections () const
-  {
-    return (this->_rep()._no_self_inter);
-  }
-
-private:
-
-  // Get the representation.
-  inline const Bcv_rep& _rep () const
-  {
-    return (*(this->ptr()));
-  }
-
-  inline Bcv_rep& _rep ()
-  {
-    return (*(this->ptr()));
-  }
-
-  /*!
-   * Compute all parameter values t, such that P(t) = val.
-   * \param poly The polynomial.
-   * \param norm Its normalizing factor.
-   * \param val The required value.
-   * \param oi Output: An output iterator for the t-values.
-   * \return A past-the-end iterator.
-   */
-  template <class OutputIterator>
-  OutputIterator _solve_t_values (const Polynomial& poly,
-                                  const Integer& norm,
-                                  const Rational& val,
-                                  OutputIterator oi) const
-  {
-    // Construct the polynomial P(t) - val = 0:
-    Nt_traits             nt_traits;
-    const Integer         numer = nt_traits.numerator (val);
-    const Integer         denom = nt_traits.denominator (val);
-    const int             deg = nt_traits.degree (poly);
-    if (deg <=0 ) return oi;
-    Integer              *coeffs = new Integer [deg + 1];
-    int                   k;
-
-    for (k = 1; k <= deg; k++)
-    {
-      coeffs[k] = nt_traits.get_coefficient (poly, k) * denom;
-    }
-    coeffs[0] = nt_traits.get_coefficient (poly, 0) * denom -
-                numer * norm;
-
-    // Solve the polynomial and obtain the t-values.
-    OutputIterator  end = nt_traits.compute_polynomial_roots
-                            (nt_traits.construct_polynomial (coeffs, deg),
-                             oi);
-
-    delete[] coeffs;
-    return (end);
-  }
-};
-
-/*!
- * Exporter for Bezier curves.
- */
-template <class Rat_kernel, class Alg_kernel, class Nt_traits, 
-          class Bounding_traits>
-std::ostream& 
-operator<< (std::ostream& os, 
-            const _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
-                                  Bounding_traits> & bc)
-{
-  const unsigned int  n = bc.number_of_control_points();
-  unsigned int        k;
-
-  os << n;
-  for (k = 0; k < n; k++)
-    os << "  " << bc.control_point(k);
-
-  return (os);
-}
-
-/*!
- * Importer for Bezier curves.
- */
-template <class Rat_kernel, class Alg_kernel, class Nt_traits, 
-          class Bounding_traits>
-std::istream& 
-operator>> (std::istream& is, 
-            _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
-                            Bounding_traits> & bc)
-{
-  // Read the number of control points.
-  unsigned int  n;
-
-  is >> n;
-
-  // Read the control points.
-  std::vector<typename Rat_kernel::Point_2>   ctrl_pts (n);
-  unsigned int                                k;
-
-  for (k = 0; k < n; k++)
-    is >> ctrl_pts[k];
-
-  // Set the Bezier curve.
-  bc = _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
-                       Bounding_traits> (ctrl_pts.begin(),
-                                         ctrl_pts.end());
-
-  return (is);
-}
-
-// ---------------------------------------------------------------------------
-// Construct the representation of X(t) and Y(t).
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-void _Bezier_curve_2_rep<RatKer, AlgKer, NtTrt,
-                         BndTrt>::_construct_polynomials () const
-{
-  const int        n = _ctrl_pts.size() - 1;
-  Rational        *coeffsX = new Rational [n + 1];
-  Rational        *coeffsY = new Rational [n + 1];
-  const Rational   rat_zero = Rational (0);
-  int              j, k;
-  
-  CGAL_precondition_msg (n > 0,
-                         "There must be at least 2 control points.");
-  
-  for (j = 0; j <= n; j++)
-    coeffsX[j] = coeffsY[j] = rat_zero;
-  
-  // Compute the rational coefficients, given by the formula:
-  //
-  //                     n
-  //                   *****
-  //                   *   *      / n \   k        n-k
-  //   (X(t), Y(t)) =   *    p_k (     ) t  (1 - t)
-  //                   *   *      \ k /
-  //                   *****
-  //                    k=0
-  //
-  Rational               px, py;
-  Integer                n_over_k_j;
-  bool                   even_exp;
-  
-  typename Control_point_vec::const_iterator pts_begin = _ctrl_pts.begin();  
-  typename Control_point_vec::const_iterator pts_end = _ctrl_pts.end();  
-
-  for (k = 0; pts_begin != pts_end; ++pts_begin, k++)
-  {
-    px = pts_begin->x();
-    py = pts_begin->y();
-    
-    // By simplifying (1 - t)^(n-k) we obtain that the k'th expression of
-    // the above sum is given by:
-    //
-    //     n-k
-    //    *****
-    //    *   *     j            n!         j+k
-    //     *    (-1)  p_k ---------------- t
-    //    *   *            j! k! (n-k-j)!
-    //    *****
-    //     j=0
-    //
-    even_exp = true; 
-    for (j = 0; j <= n - k; j++)
-    {
-      n_over_k_j = _choose (n, k, j);
-      
-      if (even_exp)
-      {
-        // We should add the current values to the coefficients of the
-        // monomial t^(n_j).
-        coeffsX[j + k] += px * n_over_k_j;
-        coeffsY[j + k] += py * n_over_k_j;
-      }
-      else
-      {
-        // We should subtract the current values from the coefficients of the
-        // monomial t^(n_j).
-        coeffsX[j + k] -= px * n_over_k_j;
-        coeffsY[j + k] -= py * n_over_k_j;
-      }
-      
-      // As we increment j, negate the "even" flag for the exponent (n-j).
-      even_exp = !even_exp;
-    } // loop on j.
-  } // loop on k.
-  
-  // Convert the rational polynomials to polynomials with rational
-  // coefficients (plus normalizing factors).
-  Nt_traits        nt_traits;
-  p_polyX = new Polynomial;
-  p_normX = new Integer;
-  p_polyY = new Polynomial;
-  p_normY = new Integer;
-  
-  nt_traits.construct_polynomial (coeffsX, n,
-                                  *p_polyX, *p_normX);
-  delete[] coeffsX;
-  
-  nt_traits.construct_polynomial (coeffsY, n,
-                                  *p_polyY, *p_normY);
-  delete[] coeffsY;
-
-//  CGAL_assertion (nt_traits.degree (*p_polyX) >= 0);
-//  CGAL_assertion (nt_traits.degree (*p_polyY) >= 0);
-
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Compute the value of n! / (j! k! (n-k-j)!).
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-typename _Bezier_curve_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::Integer
-_Bezier_curve_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_choose (int n,
-                                                             int j,
-                                                             int k) const
-{
-  Integer   reduced_fact = 1;
-  Integer   j_fact = 1, k_fact = 1;
-  int       i;
-  
-  for (i = n - k - j + 1; i <= n; i++)
-    reduced_fact *= Integer (i);
-  
-  for (i = 2; i <= j; i++)
-    j_fact *= Integer (i);
-  
-  for (i = 2; i <= k; i++)
-    k_fact *= Integer (i);
-
-  return (CGAL::div (reduced_fact, (j_fact * k_fact)));
-}
-
-// ---------------------------------------------------------------------------
-// Compute a point on the Bezier curve B(t) given a rational t-value.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-typename _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::Rat_point_2
-_Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::operator()
-        (const Rational& t) const 
-{
-  // Check for extermal t values (either 0 or 1).
-  const CGAL::Sign   sign_t = CGAL::sign (t);
-
-  CGAL_precondition (sign_t != NEGATIVE);
-
-  if (sign_t == ZERO)
-  {
-    // If t is 0, simply return the first control point.
-    return (this->_rep()._ctrl_pts[0]);
-  }
-
-  Comparison_result  res = CGAL::compare (t, Rational(1));
-
-  CGAL_precondition (res != LARGER);
-
-  if (res == EQUAL)
-  {
-    // If t is 1, simply return the first control point.
-    return (this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1]);
-  }
-
-  // Evaluate the point for 0 < t < 1.
-  if (! this->_rep().has_polynomials())
-  {
-    // Use de Casteljau's algorithm to evaluate the polynomial at t.
-    return (point_on_Bezier_curve_2 (this->_rep()._ctrl_pts.begin(),
-                                     this->_rep()._ctrl_pts.end(),
-                                     t));
-  }
-
-  // Compute the x and y coordinates using the X(t), Y(t) polynomials.
-  Rational           x, y;
-  Nt_traits          nt_traits;
-    
-  x = nt_traits.evaluate_at (this->_rep().x_polynomial(), t) /
-      Rational (this->_rep().x_norm(), 1);
-  y = nt_traits.evaluate_at (this->_rep().y_polynomial(), t) /
-      Rational (this->_rep().y_norm(), 1);
-  
-  // Return the point.
-  return (Rat_point_2 (x, y));
-}
-
-// ---------------------------------------------------------------------------
-// Compute a point on the Bezier curve B(t) given an algebraic t-value.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-typename _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::Alg_point_2
-_Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::operator()
-          (const Algebraic& t) const
-{
-  // Check for extermal t values (either 0 or 1).
-  Nt_traits          nt_traits;
-  const CGAL::Sign   sign_t = CGAL::sign (t);
-
-  CGAL_precondition (sign_t != NEGATIVE);
-
-  if (sign_t == ZERO)
-  {
-    // If t is 0, simply return the first control point.
-    const Rat_point_2&  p_0 = this->_rep()._ctrl_pts[0];
-    
-    return (Alg_point_2 (nt_traits.convert (p_0.x()),
-                         nt_traits.convert (p_0.y())));
-  }
-
-  Comparison_result  res = CGAL::compare (t, Algebraic(1));
-
-  CGAL_precondition (res != LARGER);
-
-  if (res == EQUAL)
-  {
-    // If t is 1, simply return the first control point.
-    const Rat_point_2&  p_n = 
-      this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1];
-    
-    return (Alg_point_2 (nt_traits.convert (p_n.x()),
-                         nt_traits.convert (p_n.y())));
-  }
-
-  // The t-value is between 0 and 1: Compute the x and y coordinates.
-  const Algebraic    x = nt_traits.evaluate_at (this->_rep().x_polynomial(), t)/
-                         nt_traits.convert (this->_rep().x_norm());
-  const Algebraic    y = nt_traits.evaluate_at (this->_rep().y_polynomial(), t)/
-                         nt_traits.convert (this->_rep().y_norm());
-
-  return (Alg_point_2 (x, y));
-}
-
-// ---------------------------------------------------------------------------
-// Check if the two curves have the same support.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::has_same_support
-        (const Self& bc) const
-{
-  // If one curve is of degree d1 and the other of degree d2, there can be
-  // at most d1*d2 intersection points between them.
-  const int      deg1 = number_of_control_points() - 1;
-  const int      deg2 = bc.number_of_control_points() - 1;
-  const int      n_samples = deg1*deg2;
-  Rat_point_2    p1;
-  int            k;
-  
-  for (k = 0; k <= n_samples; k++)
-  {
-    // Compute p1 = B1(k/n_samples), where B1 is (*this) curve.
-    if (k == 0)
-      p1 = (this->_rep()._ctrl_pts[0]);
-    else if (k == 1)
-      p1 = (this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1]);
-    else
-      p1 = this->operator() (Rational (k, n_samples));
-    
-    // Get all t-values such that the x-coordinate of B2(t) equals x1,
-    // and check if there exists a t-value such that the y-coordinate of
-    // b2(t) equals the y-coordinate of p1.
-    std::list<Algebraic>                           t_vals;
-    typename std::list<Algebraic>::const_iterator  t_iter;
-    Nt_traits                             nt_traits;
-    const Algebraic&                      y1 = nt_traits.convert (p1.y());
-    bool                                  eq_y = false;
-    
-    bc.get_t_at_x (p1.x(), std::back_inserter(t_vals));
-    
-    for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
-    {
-      const Alg_point_2&  p2 = bc (*t_iter);
-      
-      if (CGAL::compare (y1, p2.y()) == CGAL::EQUAL)
-      {
-        eq_y = true;
-        break;
-      }
-    }
-    
-    // If we found a point on B1 which is not of B2, the two curves do not
-    // have the same support.
-    if (! eq_y)
-      return (false);
-  }
-  
-  // If we reached here, we found (d1*d2 + 1) common points of B1 and B2.
-  // This means they have the same support.
-  return (true);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
deleted file mode 100644
index db40c8a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
+++ /dev/null
@@ -1,2820 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
-//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
-
-#ifndef CGAL_BEZIER_X_MONOTONE_2_H
-#define CGAL_BEZIER_X_MONOTONE_2_H
-
-/*! \file
- * Header file for the _Bezier_x_monotone_2 class.
- */
-
-#include <CGAL/Arr_geometry_traits/Bezier_curve_2.h>
-#include <CGAL/Arr_geometry_traits/Bezier_point_2.h>
-#include <CGAL/Arr_geometry_traits/Bezier_cache.h>
-#include <ostream>
-
-namespace CGAL {
-
-/*! \class
- * Representation of an x-monotone Bezier subcurve, specified by a Bezier curve
- * and two end points.
- */
-template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_,
-          class Bounding_traits_>
-class _Bezier_x_monotone_2
-{
-public:
-
-  typedef Rat_kernel_                             Rat_kernel;
-  typedef Alg_kernel_                             Alg_kernel;
-  typedef Nt_traits_                              Nt_traits;
-  typedef Bounding_traits_                        Bounding_traits;
-  typedef _Bezier_curve_2<Rat_kernel,
-                          Alg_kernel,
-                          Nt_traits,
-                          Bounding_traits>              Curve_2;
-  typedef _Bezier_point_2<Rat_kernel,
-                          Alg_kernel,
-                          Nt_traits,
-                          Bounding_traits>              Point_2;
-  typedef _Bezier_x_monotone_2<Rat_kernel,
-                               Alg_kernel,
-                               Nt_traits,
-                               Bounding_traits>         Self;
-
-  typedef unsigned int                                  Multiplicity;
-
-  typedef _Bezier_cache<Nt_traits>                      Bezier_cache;
-
-private:
-
-  typedef typename Alg_kernel::Point_2            Alg_point_2;
-  typedef typename Rat_kernel::Point_2            Rat_point_2;
-
-  typedef typename Nt_traits::Integer             Integer;
-  typedef typename Nt_traits::Rational            Rational;
-  typedef typename Nt_traits::Algebraic           Algebraic;
-  typedef typename Nt_traits::Polynomial          Polynomial;
-
-  typedef typename Point_2::Originator               Originator;
-  typedef typename Point_2::Originator_iterator      Originator_iterator;
-  typedef typename Bounding_traits::Bez_point_bound  Bez_point_bound;
-  typedef typename Bounding_traits::Bez_point_bbox   Bez_point_bbox;
-
-  // Type definition for the vertical tangency-point mapping.
-  typedef typename Bezier_cache::Curve_id                 Curve_id;
-  typedef std::pair<Curve_id, Curve_id>                   Curve_pair;
-  typedef typename Bezier_cache::Vertical_tangency_list   Vert_tang_list;
-  typedef typename Bezier_cache::Vertical_tangency_iter   Vert_tang_iter;
-
-  // Type definition for the intersection-point mapping.
-  typedef typename Bezier_cache::Intersection_list        Intersect_list;
-  typedef typename Bezier_cache::Intersection_iter        Intersect_iter;
-
-  // Representation of an intersection point with its multiplicity:
-  typedef std::pair<Point_2,Multiplicity>                Intersection_point_2;
-
-  /*! \class Less_intersection_point
-   * Comparison functor for intersection points.
-   */
-  class Less_intersection_point
-  {
-  private:
-    Bezier_cache    *p_cache;
-    
-  public:
-
-    Less_intersection_point (Bezier_cache& cache) :
-      p_cache (&cache)
-    {}
-
-    bool operator() (const Intersection_point_2& ip1,
-                     const Intersection_point_2& ip2) const
-    {
-      // Use an xy-lexicographic comparison.
-      return (ip1.first.compare_xy (ip2.first, *p_cache) == SMALLER);
-    }
-  };
-
-  // Type definition for the bounded intersection-point mapping.
-  typedef std::list<Point_2>                          Intersection_list;
-
-  /*! \struct Less_curve_pair
-   * An auxiliary functor for comparing a pair of curve IDs.
-   */
-  struct Less_curve_pair
-  {
-    bool operator() (const Curve_pair& cp1, const Curve_pair& cp2) const
-    {
-      // Compare the pairs of IDs lexicographically.
-      return (cp1.first < cp2.first ||
-              (cp1.first == cp2.first && cp1.second < cp2.second));
-    }
-  };
-
-  /*! \struct Subcurve
-   * For the usage of the _exact_vertical_position() function.
-   */
-  struct Subcurve
-  {
-    std::list<Rat_point_2>    control_points;
-    Rational                  t_min;
-    Rational                  t_max;
-
-    /*! Get the rational bounding box of the subcurve. */
-    void bbox (Rational& x_min, Rational& y_min,
-               Rational& x_max, Rational& y_max) const
-    {
-      typename std::list<Rat_point_2>::const_iterator  pit =
-        control_points.begin();
-
-      CGAL_assertion (pit != control_points.end());
-
-      x_min = x_max = pit->x();
-      y_min = y_max = pit->y();
-
-      for (++pit; pit != control_points.end(); ++pit)
-      {
-        if (CGAL::compare (x_min, pit->x()) == LARGER)
-          x_min = pit->x();
-        else if (CGAL::compare (x_max, pit->x()) == SMALLER)
-          x_max = pit->x();
-
-        if (CGAL::compare (y_min, pit->y()) == LARGER)
-          y_min = pit->y();
-        else if (CGAL::compare (y_max, pit->y()) == SMALLER)
-          y_max = pit->y();
-      }
-
-      return;
-    }
-  };
-
-public:
-
-  typedef std::map<Curve_pair,
-                   Intersection_list,
-                   Less_curve_pair>               Intersection_map;
-  typedef typename Intersection_map::value_type   Intersection_map_entry;
-  typedef typename Intersection_map::iterator     Intersection_map_iterator;
-
-private:
-
-  // Data members:
-  Curve_2       _curve;        /*!< The supporting Bezier curve. */
-  unsigned int  _xid;          /*!< The serial number of the basic x-monotone
-                                    subcurve of the Bezier curve. */
-  Point_2       _ps;           /*!< The source point. */
-  Point_2       _pt;           /*!< The target point. */
-  bool          _dir_right;    /*!< Is the subcurve directed right
-                                    (or left). */
-  bool          _inc_to_right; /*!< Does the parameter value increase when
-                                    traversing the subcurve from left to
-                                    right. */
-  bool          _is_vert;      /*!< Is the subcurve a vertical segment. */
-
-public:
-
-  /*! Default constructor. */
-  _Bezier_x_monotone_2 () :
-    _xid(0),
-    _dir_right (false),
-    _is_vert (false)
-  {}
-
-  /*!
-   * Constructor given two endpoints.
-   * \param B The supporting Bezier curve.
-   * \param xid The serial number of the x-monotone subcurve with respect to
-   *            the parameter range of the Bezier curve.
-   *            For example, if B is split to two x-monotone subcurves at t',
-   *            the subcurve defined over [0, t'] has a serial number 1,
-   *            and the other, defined over [t', 1] has a serial number 2.
-   * \param ps The source point.
-   * \param pt The target point.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre B should be an originator of both ps and pt.
-   * \pre xid is a non-zero serial number.
-   */
-  _Bezier_x_monotone_2 (const Curve_2& B, unsigned int xid,
-                        const Point_2& ps, const Point_2& pt,
-                        Bezier_cache& cache);
-
-  /*!
-   * Get the supporting Bezier curve.
-   */
-  const Curve_2& supporting_curve () const
-  {
-    return (_curve);
-  }
-
-  /*!
-   * Get the x-monotone ID of the curve.
-   */
-  unsigned int xid () const
-  {
-    return (_xid);
-  }
-
-  /*!
-   * Get the source point.
-   */
-  const Point_2& source () const
-  {
-    return (_ps);
-  }
-
-  /*!
-   * Get the target point.
-   */
-  const Point_2& target () const
-  {
-    return (_pt);
-  }
-
-  /*!
-   * Get the left endpoint (the lexicographically smaller one).
-   */
-  const Point_2& left () const
-  {
-    return (_dir_right ? _ps : _pt);
-  }
-
-  /*!
-   * Get the right endpoint (the lexicographically larger one).
-   */
-  const Point_2& right () const
-  {
-    return (_dir_right ? _pt : _ps);
-  }
-
-  /*!
-   * Check if the subcurve is a vertical segment.
-   */
-  bool is_vertical () const
-  {
-    return (_is_vert);
-  }
-
-  /*!
-   * Check if the subcurve is directed from left to right.
-   */
-  bool is_directed_right () const
-  {
-    return (_dir_right);
-  }
-
-  /*!
-   * Get the approximate parameter range defining the curve.
-   * \return A pair of t_src and t_trg, where B(t_src) is the source point
-   *         and B(t_trg) is the target point.
-   */
-  std::pair<double, double> parameter_range () const;
-
-  /*!
-   * Get the relative position of the query point with respect to the subcurve.
-   * \param p The query point.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre p is in the x-range of the arc.
-   * \return SMALLER if the point is below the arc;
-   *         LARGER if the point is above the arc;
-   *         EQUAL if p lies on the arc.
-   */
-  Comparison_result point_position (const Point_2& p,
-                                    Bezier_cache& cache) const;
-
-  /*!
-   * Compare the relative y-position of two x-monotone subcurve to the right
-   * of their intersection point.
-   * \param cv The other subcurve.
-   * \param p The intersection point.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre p is incident to both subcurves, and both are defined to its right.
-   * \return SMALLER if (*this) lies below cv to the right of p;
-   *         EQUAL in case of an overlap (should not happen);
-   *         LARGER if (*this) lies above cv to the right of p.
-   */
-  Comparison_result compare_to_right (const Self& cv,
-                                      const Point_2& p,
-                                      Bezier_cache& cache) const;
-
-  /*!
-   * Compare the relative y-position of two x-monotone subcurve to the left
-   * of their intersection point.
-   * \param cv The other subcurve.
-   * \param p The intersection point.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre p is incident to both subcurves, and both are defined to its left.
-   * \return SMALLER if (*this) lies below cv to the right of p;
-   *         EQUAL in case of an overlap (should not happen);
-   *         LARGER if (*this) lies above cv to the right of p.
-   */
-  Comparison_result compare_to_left (const Self& cv,
-                                     const Point_2& p,
-                                     Bezier_cache& cache) const;
-
-  /*!
-   * Check whether the two subcurves are equal (have the same graph).
-   * \param cv The other subcurve.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \return (true) if the two subcurves have the same graph;
-   *         (false) otherwise.
-   */
-  bool equals (const Self& cv,
-               Bezier_cache& cache) const;
-
-  /*!
-   * Compute the intersections with the given subcurve.
-   * \param cv The other subcurve.
-   * \param inter_map Caches the bounded intersection points.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \param oi The output iterator.
-   * \return The past-the-end iterator.
-   */
-  template<class OutputIterator>
-  OutputIterator intersect (const Self& cv,
-                            Intersection_map& inter_map,
-                            Bezier_cache& cache,
-                            OutputIterator oi) const
-  {
-    // In case we have two x-monotone subcurves of the same Bezier curve,
-    // check if they have a common left endpoint.
-    if (_curve.is_same (cv._curve))
-    {
-      if (left().is_same (cv.left()) || left().is_same (cv.right()))
-      {
-        *oi = CGAL::make_object (Intersection_point_2 (left(), 0));
-        ++oi;
-      }
-    }
-
-    // Compute the intersections of the two sucurves. Note that for caching
-    // purposes we always apply the _intersect() function on the subcurve whose
-    // curve ID is smaller.
-    std::vector<Intersection_point_2>   ipts;
-    Self                                ovlp_cv;
-    bool                                do_ovlp;
-
-    if (_curve.id() <= cv._curve.id())
-      do_ovlp = _intersect (cv, inter_map, cache, ipts, ovlp_cv);
-    else
-      do_ovlp = cv._intersect (*this, inter_map, cache, ipts, ovlp_cv);
-
-    // In case of overlap, just report the overlapping subcurve.
-    if (do_ovlp)
-    {
-      *oi = CGAL::make_object (ovlp_cv);
-      ++oi;
-      return (oi);
-    }
-
-    // If we have a set of intersection points, sort them in ascending
-    // xy-lexicorgraphical order, and insert them to the output iterator.
-    typename std::vector<Intersection_point_2>::const_iterator  ip_it;
-
-    std::sort (ipts.begin(), ipts.end(), Less_intersection_point (cache));
-    for (ip_it = ipts.begin(); ip_it != ipts.end(); ++ip_it)
-    {
-      *oi = CGAL::make_object (*ip_it);
-      ++oi;
-    }
-
-    // In case we have two x-monotone subcurves of the same Bezier curve,
-    // check if they have a common right endpoint.
-    if (_curve.is_same (cv._curve))
-    {
-      if (right().is_same (cv.left()) || right().is_same (cv.right()))
-      {
-        *oi = CGAL::make_object (Intersection_point_2 (right(), 0));
-        ++oi;
-      }
-    }
-
-    return (oi);
-  }
-
-  /*!
-   * Split the subcurve into two at a given split point.
-   * \param p The split point.
-   * \param c1 Output: The first resulting arc, lying to the left of p.
-   * \param c2 Output: The first resulting arc, lying to the right of p.
-   * \pre p lies in the interior of the subcurve (not one of its endpoints).
-   */
-  void split (const Point_2& p,
-              Self& c1, Self& c2) const;
-
-  /*!
-   * Check if the two subcurves are mergeable.
-   * \param cv The other subcurve.
-   * \return Whether the two subcurves can be merged.
-   */
-  bool can_merge_with (const Self& cv) const;
-
-  /*!
-   * Merge the current arc with the given arc.
-   * \param cv The other subcurve.
-   * \pre The two arcs are mergeable.
-   * \return The merged arc.
-   */
-  Self merge (const Self& cv) const;
-
-  /*!
-   * Flip the subcurve (swap its source and target points).
-   * \return The flipped subcurve.
-   */
-  Self flip () const
-  {
-    // Note that we just swap the source and target of the original subcurve
-    // and do not touch the supporting Beizer curve.
-    Self  cv = *this;
-
-    cv._ps = this->_pt;
-    cv._pt = this->_ps;
-    cv._dir_right = ! this->_dir_right;
-
-    return (cv);
-  }
-
-private:
-
-  /*!
-   * Check if the given t-value is in the range of the subcurve.
-   * \param t The parameter value.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \return If t in the parameter-range of the subcurve.
-   */
-  bool _is_in_range (const Algebraic& t,
-                     Bezier_cache& cache) const;
-
-  /*!
-   * Check if the given point lies in the range of this x-monotone subcurve.
-   * \param p The point, which lies on the supporting Bezier curve.
-   * \param is_certain Output: Is the answer we provide is certain.
-   * \return Whether p is on the x-monotone subcurve.
-   */
-  bool _is_in_range (const Point_2& p, bool& is_certain) const;
-
-  /*!
-   * Given a point p that lies on the supporting Bezier curve (X(t), Y(t)),
-   * determine whether p lies within the t-range of the x-monotone subcurve.
-   * If so, the value t0 such that p = (X(t0), Y(t0)) is also computed.
-   * \param p The point, which lies on the supporting Bezier curve.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \param t0 Output: A parameter value such that p = (X(t0), Y(t0)).
-   * \param is_endpoint Output: Whether p equals on the of the endpoints.
-   * \return Whether p lies in the t-range of the subcurve.
-   */
-  bool _is_in_range (const Point_2& p,
-                     Bezier_cache& cache,
-                     Algebraic& t0,
-                     bool& is_endpoint) const;
-
-  /*!
-   * Compute a y-coordinate of a point on the x-monotone subcurve with a
-   * given x-coordinate.
-   * \param x0 The given x-coodinate.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \return The y-coordinate.
-   */
-  Algebraic _get_y (const Rational& x0,
-                    Bezier_cache& cache) const;
-
-  /*!
-   * Compare the slopes of the subcurve with another given Bezier subcurve at
-   * their given intersection point.
-   * \param cv The other subcurve.
-   * \param p The intersection point.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre p lies of both subcurves.
-   * \pre Neither of the subcurves is a vertical segment.
-   * \return SMALLER if (*this) slope is less than cv's;
-   *         EQUAL if the two slopes are equal;
-   *         LARGER if (*this) slope is greater than cv's.
-   */
-  Comparison_result _compare_slopes (const Self& cv,
-                                     const Point_2& p,
-                                     Bezier_cache& cache) const;
-
-  /*!
-   * Get the range of t-value over which the subcurve is defined.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \return A pair comprised of the t-value for the source point and the
-   *         t-value for the target point.
-   */
-  std::pair<Algebraic, Algebraic> _t_range (Bezier_cache& cache) const;
-
-  /*!
-   * Compare the relative y-position of two x-monotone subcurve to the right
-   * (or to the left) of their intersection point, whose multiplicity is
-   * greater than 1.
-   * \param cv The other subcurve.
-   * \param p The query point.
-   * \param to_right Should we compare to p's right or to p's left.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \pre The x-coordinate of the right endpoint of *this is smaller than
-   *      (or equal to) the x-coordinate of the right endpoint of cv.
-   * \pre p is a common point of both subcurves.
-   * \pre Neither of the subcurves is a vertical segment.
-   * \return SMALLER if (*this) lies below cv next to p;
-   *         EQUAL in case of an overlap (should not happen);
-   *         LARGER if (*this) lies above cv next to p.
-   */
-  Comparison_result _compare_to_side (const Self& cv,
-                                      const Point_2& p,
-                                      bool to_right,
-                                      Bezier_cache& cache) const;
-
-  /*!
-   * Clip the control polygon of the supporting Bezier curve such that it
-   * fits the current x-monotone subcurve.
-   * \param ctrl Output: The clipped control polygon.
-   * \param t_min Output: The minimal t-value of the clipped curve.
-   * \param t_max Output: The maximal t-value of the clipped curve.
-   */
-  void _clip_control_polygon
-        (typename Bounding_traits::Control_points& ctrl,
-         typename Bounding_traits::NT& t_min,
-         typename Bounding_traits::NT& t_max) const;
-
-  /*!
-   * Approximate the intersection points between the supporting Bezier curves
-   * of the given x-monotone curves.
-   * \param cv The x-monotone curve we intersect.
-   * \param inter_pts Output: An output list of intersection points between
-   *                          the supporting Bezier curves.
-   *                          In case (*this) and cv are subcurve of the same
-   *                          Bezier curve, only the self-intersection points
-   *                          between the subcurves are approximated.
-   * \return Whether all intersection points where successfully approximated.
-   */
-  bool _approximate_intersection_points (const Self& cv,
-                                         std::list<Point_2>& inter_pts) const;
-
-  /*!
-   * Compute the intersections with the given subcurve.
-   * \param cv The other subcurve.
-   * \param inter_map Caches the bounded intersection points.
-   * \param cache Caches the vertical tangency points and intersection points.
-   * \param ipts Output: A vector of intersection points + multiplicities.
-   * \param ovlp_cv Output: An overlapping subcurve (if exists).
-   * \return Whether an overlap has occured.
-   */
-  bool _intersect (const Self& cv,
-                   Intersection_map& inter_map,
-                   Bezier_cache& cache,
-                   std::vector<Intersection_point_2>& ipts,
-                   Self& ovlp_cv) const;
-
-  /*!
-   * Compute the exact vertical position of the given point with respect to
-   * the x-monotone curve.
-   * \param p The point.
-   * \param force_exact Sould we force an exact result.
-   * \return SMALLER if the point is below the curve;
-   *         LARGER if the point is above the curve;
-   *         EQUAL if p lies on the curve.
-   */
-  Comparison_result _exact_vertical_position (const Point_2& p,
-                                              bool force_exact) const;
-
-};
-
-/*!
- * Exporter for Bezier curves.
- */
-template <class Rat_kernel, class Alg_kernel, class Nt_traits, 
-          class Bounding_traits>
-std::ostream& 
-operator<< (std::ostream& os, 
-            const _Bezier_x_monotone_2<Rat_kernel, Alg_kernel, Nt_traits, 
-                                       Bounding_traits>& cv)
-{
-  os << cv.supporting_curve()
-     << " [" << cv.xid()
-     << "] | " << cv.source() 
-     << " --> " << cv.target();
-
-  return (os);
-}
-
-// ---------------------------------------------------------------------------
-// Constructor given two endpoints.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_x_monotone_2
-        (const Curve_2& B, unsigned int xid,
-         const Point_2& ps, const Point_2& pt,
-         Bezier_cache& cache) :
-  _curve (B),
-  _xid (xid),
-  _ps (ps),
-  _pt (pt),
-  _is_vert (false)
-{
-  CGAL_precondition (xid > 0);
-
-  // Get the originators of the point that correspond to the curve B.
-  Originator_iterator   ps_org = ps.get_originator (B, _xid);
-  CGAL_precondition (ps_org != ps.originators_end()); 
-  
-  Originator_iterator   pt_org = pt.get_originator (B, _xid);
-  CGAL_precondition (pt_org != pt.originators_end());
-  
-  // Check if the subcurve is directed left or right.
-  const Comparison_result    res = _ps.compare_x (_pt, cache);
-
-  if (res == EQUAL)
-  {
-    // We have a vertical segment. Check if the source is below the target.
-    _is_vert = true;
-    _dir_right = (CGAL::compare (_ps.y(), _pt.y()) == SMALLER);
-  }
-  else
-  {
-    _dir_right = (res == SMALLER);
-  }
-  
-  // Check if the value of the parameter t increases when we traverse the
-  // curve from left to right: If the curve is directed to the right, we
-  // check if t_src < t_trg, otherwise we check whether t_src > t_trg.
-  Comparison_result      t_res;
-  
-  if (CGAL::compare (ps_org->point_bound().t_max,
-                     pt_org->point_bound().t_min) == SMALLER ||
-      CGAL::compare (ps_org->point_bound().t_min,
-                     pt_org->point_bound().t_max) == LARGER)
-  {
-    // Perform the comparison assuming that the possible parameter
-    // values do not overlap.
-    t_res = CGAL::compare (ps_org->point_bound().t_min, 
-                           pt_org->point_bound().t_min);
-  }
-  else
-  {
-    // In this case both exact parameter values must be known.
-    // We use them to perform an exact comparison.
-    CGAL_assertion (ps_org->has_parameter() && pt_org->has_parameter());
-    
-    t_res = CGAL::compare (ps_org->parameter(), pt_org->parameter());
-  }
-
-  CGAL_precondition (t_res != EQUAL);
-
-  if (_dir_right)
-    _inc_to_right = (t_res == SMALLER);
-  else
-    _inc_to_right = (t_res == LARGER);
-}
-
-// ---------------------------------------------------------------------------
-// Get the approximate parameter range defining the curve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-std::pair<double, double> 
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::parameter_range () const
-{
-  // First try to use the approximate representation of the endpoints.
-  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion (s_org != _ps.originators_end());
-
-  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion (t_org != _pt.originators_end());
-
-  double  t_src = (CGAL::to_double (s_org->point_bound().t_min) +
-                   CGAL::to_double (s_org->point_bound().t_max)) / 2;
-  double  t_trg = (CGAL::to_double (t_org->point_bound().t_min) +
-                   CGAL::to_double (t_org->point_bound().t_max)) / 2;
-
-  return (std::make_pair (t_src, t_trg));
-}
-
-// ---------------------------------------------------------------------------
-// Get the relative position of the query point with respect to the subcurve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::point_position
-    (const Point_2& p,
-     Bezier_cache& cache) const
-{
-  Nt_traits nt_traits;
-  
-  //First check if the bezier is a vertical segment
-  if (is_vertical())
-  {
-    if (! p.is_exact()) p.make_exact (cache);
-    if (! _ps.is_exact()) _ps.make_exact (cache);    
-    if (! _pt.is_exact()) _ps.make_exact (cache);    
-    
-    if (p.is_rational() && _ps.is_rational() && _pt.is_rational())
-    {
-      const Rat_point_2&  rat_p = (Rat_point_2) p;
-      const Rat_point_2&  rat_ps = (Rat_point_2) _ps;
-      const Rat_point_2&  rat_pt = (Rat_point_2) _pt;
-
-      Comparison_result res1 = (CGAL::compare (rat_p.y(), rat_ps.y()));
-      Comparison_result res2 = (CGAL::compare (rat_p.y(), rat_pt.y()));
-      return (res1==res2 ? res1:EQUAL);
-    }
-    
-    Comparison_result res1 = (CGAL::compare (p.y(), _ps.y()));
-    Comparison_result res2 = (CGAL::compare (p.y(), _pt.y()));
-    return (res1==res2 ? res1:EQUAL);
-  }
-
-  if (p.identical(_ps)) {
-    return EQUAL;
-  }
-  
-  // Then check whether the bezier is an horizontal segment or 
-  // if p has the same x-coordinate as one of the endpoint
-  
-  const Comparison_result  res1 =  p.compare_x (_ps, cache);
-
-  if (res1 == EQUAL || nt_traits.degree(_curve.y_polynomial()) <= 0)
-  {
-    if (! p.is_exact()) p.make_exact (cache);
-    if (! _ps.is_exact()) _ps.make_exact (cache);
-
-    // If both point are rational, compare their rational y-coordinates.
-    if (p.is_rational() && _ps.is_rational())
-    {
-      const Rat_point_2&  rat_p = (Rat_point_2) p;
-      const Rat_point_2&  rat_ps = (Rat_point_2) _ps;
-
-      return (CGAL::compare (rat_p.y(), rat_ps.y()));
-    }
-
-    // Compare the algebraic y-coordinates.
-    return (CGAL::compare (p.y(), _ps.y()));
-  }
-  
-  if (p.identical(_pt)) {
-    return EQUAL;
-  }
-
-  const Comparison_result  res2 = p.compare_x (_pt, cache);
-  
-  if (res2 == EQUAL)
-  {
-    // In this case both points must be exact.
-    CGAL_assertion (p.is_exact() && _pt.is_exact());
-
-    // If both point are rational, compare their rational y-coordinates.
-    if (p.is_rational() && _pt.is_rational())
-    {
-      const Rat_point_2&  rat_p = (Rat_point_2) p;
-      const Rat_point_2&  rat_pt = (Rat_point_2) _pt;
-
-      return (CGAL::compare (rat_p.y(), rat_pt.y()));
-    }
-
-    // Compare the algebraic y-coordinates.
-    return (CGAL::compare (p.y(), _pt.y()));
-  }
-  
-  // Make sure that p is in the x-range of our subcurve.
-  CGAL_precondition (res1 != res2);
-  
-  // Check for the case when curve is an originator of the point.
-  Originator_iterator   p_org = p.get_originator (_curve, _xid);
- 
-  if (p_org != p.originators_end())
-  {
-    CGAL_assertion_code
-      (Originator_iterator ps_org = _ps.get_originator (_curve, _xid);
-       CGAL_assertion(ps_org != _ps.originators_end());
-       Originator_iterator pt_org = _pt.get_originator (_curve, _xid);
-       CGAL_assertion(pt_org != _pt.originators_end()));
-
-    // Check if the point is in the parameter range of this subcurve.
-    // First try an approximate check of the parameter bounds.
-    bool  correct_res;
-    bool  in_range = false;
-
-    in_range = _is_in_range (p, correct_res);
-
-    if (! correct_res)
-    {
-      // Perform the comparsion in an exact manner.
-      if (! p.is_exact())
-        p.make_exact (cache);
-
-      CGAL_assertion (p_org->has_parameter());
-
-      in_range = _is_in_range (p_org->parameter(), cache);
-    }
-
-    if (in_range)
-      return (EQUAL);
-  }
-  
-  // Call the vertical-position function that uses the bounding-boxes
-  // to evaluate the comparsion result.
-  typename Bounding_traits::Control_points  cp;
-
-  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
-             std::back_inserter(cp));
-
-  Originator_iterator           ps_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion (ps_org != _ps.originators_end());
-  
-  Originator_iterator           pt_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion (pt_org != _pt.originators_end());
-  
-  Comparison_result             res_bound = EQUAL;
-  typename Bounding_traits::NT  x_min, y_min, x_max, y_max;
-  bool                          can_refine;
-
-  p.get_bbox (x_min, y_min, x_max, y_max);
-
-  if (CGAL::compare (ps_org->point_bound().t_max,
-                     pt_org->point_bound().t_min) == SMALLER)
-  {
-    // Examine the parameter range of the originator of the source point
-    // with respect to the current subcurve B, and make sure that B(t_max)
-    // lies to the left of p if the curve is directed from left to right
-    // (or to the right of p, if the subcurve is directed from right to left).
-    can_refine = ! _ps.is_exact();
-    do
-    {
-      const Rat_point_2&  ps = _curve (ps_org->point_bound().t_max);
-
-      if ((_dir_right && CGAL::compare (ps.x(), x_min) != LARGER) ||
-          (! _dir_right && CGAL::compare (ps.x(), x_max) != SMALLER))
-        break;
-
-      if (can_refine)
-        can_refine = _ps.refine();
-    } while (can_refine);
-
-    // Examine the parameter range of the originator of the target point
-    // with respect to the current subcurve B, and make sure that B(t_min)
-    // lies to the right of p if the curve is directed from left to right
-    // (or to the left of p, if the subcurve is directed from right to left).
-    can_refine = ! _pt.is_exact();
-    do
-    {
-      const Rat_point_2&  pt = _curve (pt_org->point_bound().t_min);
-
-      if ((_dir_right && CGAL::compare (pt.x(), x_max) != SMALLER) ||
-          (! _dir_right && CGAL::compare (pt.x(), x_min) != LARGER))
-        break;
-
-      if (can_refine)
-        can_refine = _pt.refine();
-    } while (can_refine);
-
-    // In this case the parameter value of the source is smaller than the
-    // target's, so we compare the point with the subcurve of B defined over
-    // the proper parameter range.
-    res_bound = p.vertical_position (cp,
-                                     ps_org->point_bound().t_max,
-                                     pt_org->point_bound().t_min);
-  }
-  else if (CGAL::compare (pt_org->point_bound().t_max,
-                          ps_org->point_bound().t_min) == SMALLER)
-  {
-    // Examine the parameter range of the originator of the source point
-    // with respect to the current subcurve B, and make sure that B(t_min)
-    // lies to the left of p if the curve is directed from left to right
-    // (or to the right of p, if the subcurve is directed from right to left).
-    can_refine = ! _ps.is_exact();
-    do
-    {
-      const Rat_point_2&  ps = _curve (ps_org->point_bound().t_min);
-
-      if ((_dir_right && CGAL::compare (ps.x(), x_min) != LARGER) ||
-          (! _dir_right && CGAL::compare (ps.x(), x_max) != SMALLER))
-        break;
-
-      if (can_refine)
-        can_refine = _ps.refine();
-    } while (can_refine);
-
-    // Examine the parameter range of the originator of the target point
-    // with respect to the current subcurve B, and make sure that B(t_max)
-    // lies to the right of p if the curve is directed from left to right
-    // (or to the left of p, if the subcurve is directed from right to left).
-    can_refine = ! _pt.is_exact();
-    do
-    {
-      const Rat_point_2&  pt = _curve (pt_org->point_bound().t_max);
-
-      if ((_dir_right && CGAL::compare (pt.x(), x_max) != SMALLER) ||
-          (! _dir_right && CGAL::compare (pt.x(), x_min) != LARGER))
-        break;
-
-      if (can_refine)
-        can_refine = _pt.refine();
-    } while (can_refine);
-
-    // In this case the parameter value of the source is large than the
-    // target's, so we compare the point with the subcurve of B defined over
-    // the proper parameter range.
-    res_bound = p.vertical_position (cp,
-                                     pt_org->point_bound().t_max,
-                                     ps_org->point_bound().t_min);
-  }
-
-  if (res_bound != EQUAL)
-    return (res_bound);
- 
-  
-  if ( p.is_rational() ){
-    const Rational& px = ((Rat_point_2) p).x();
-    
-    Integer denom_px=nt_traits.denominator(px);
-    Integer numer_px=nt_traits.numerator(px);
-    Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&numer_px,0);
-    Polynomial poly_x = nt_traits.scale(_curve.x_polynomial(),denom_px) - poly_px;
-    
-    std::vector <Algebraic> roots;
-    std::pair<double,double> prange = parameter_range();
-    nt_traits.compute_polynomial_roots (poly_x,prange.first,prange.second,std::back_inserter(roots));
-    
-    CGAL_assertion(roots.size()==1); //p is in the range and the curve is x-monotone
-    
-    return CGAL::compare(
-      ((Rat_point_2) p).y(),
-      nt_traits.evaluate_at (_curve.y_polynomial(), *roots.begin())
-    );
-  }
-  
-  // In this case we have to switch to exact computations and check whether
-  // p lies of the given subcurve. We take one of p's originating curves and
-  // compute its intersections with our x-monotone curve.
-  if (! p.is_exact())
-    p.make_exact (cache);
-
-  CGAL_assertion (p.originators_begin() != p.originators_end());
-    
-  Originator   org = *(p.originators_begin());
-  bool         do_ovlp;
-  bool         swap_order = (_curve.id() > org.curve().id());
-  const Intersect_list&  inter_list = (! swap_order ?
-    (cache.get_intersections (_curve.id(),
-                              _curve.x_polynomial(), _curve.x_norm(),
-                              _curve.y_polynomial(), _curve.y_norm(),
-                              org.curve().id(),
-                              org.curve().x_polynomial(), org.curve().x_norm(),
-                              org.curve().y_polynomial(), org.curve().y_norm(),
-                              do_ovlp)) :
-    (cache.get_intersections (org.curve().id(),
-                              org.curve().x_polynomial(), org.curve().x_norm(),
-                              org.curve().y_polynomial(), org.curve().y_norm(),
-                              _curve.id(),
-                              _curve.x_polynomial(), _curve.x_norm(),
-                              _curve.y_polynomial(), _curve.y_norm(),
-                              do_ovlp)));
-
-  if (do_ovlp)
-    return (EQUAL);
-    
-  // Go over the intersection points and look for p there.
-  Intersect_iter       iit;
-    
-  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
-  {
-    // Get the parameter of the originator and compare it to p's parameter.
-    const Algebraic&  s = swap_order ? iit->s : iit->t;
-      
-    if (CGAL::compare (s, org.parameter()) == EQUAL)
-    {
-      // Add this curve as an originator for p.
-      const Algebraic&  t = swap_order ? iit->t : iit->s;
-    
-      CGAL_assertion (_is_in_range (t, cache));
-
-      Point_2&  pt = const_cast<Point_2&> (p);
-      pt.add_originator (Originator (_curve, _xid, t));
-
-      // The point p lies on the subcurve.
-      return (EQUAL);
-    }
-  }
-  
-  // We now know that p is not on the subcurve. We therefore subdivide the
-  // curve using exact rational arithmetic, until we reach a separation
-  // between the curve and the point. (This case should be very rare.)
-  // Note that we first try to work with inexact endpoint representation, and
-  // only if we fail we make the endpoints of the x-monotone curves exact.
-  if (! p.is_exact())
-    p.make_exact (cache);
-
-  Comparison_result  exact_res = _exact_vertical_position (p, false);
-
-  if (exact_res != EQUAL)
-    return (exact_res);
-
-  if (! _ps.is_exact())
-    _ps.make_exact (cache);
-  
-  if (! _pt.is_exact())
-    _pt.make_exact (cache);
-
-  return (_exact_vertical_position (p, true));
-}
-
-// ---------------------------------------------------------------------------
-// Compare the relative y-position of two x-monotone subcurves to the right
-// of their intersection point.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::compare_to_right
-        (const Self& cv,
-         const Point_2& p,
-         Bezier_cache& cache) const
-{
-  CGAL_precondition (p.compare_xy (right(), cache) != LARGER);
-  CGAL_precondition (p.compare_xy (cv.right(), cache) != LARGER);
-
-  if (this == &cv)
-    return (EQUAL);
-
-  // Make sure that p is incident to both curves (either equals the left
-  // endpoint or lies in the curve interior). Note that this is important to
-  // carry out these tests, as it assures us the eventually both curves are
-  // originators of p.
-  if (! p.equals (left(), cache))
-  {
-    if (point_position (p, cache) != EQUAL)
-    {
-      CGAL_precondition_msg (false, "p is not on cv1");
-    }
-  }
-  
-  if (! p.equals (cv.left(), cache))
-  {
-    if (cv.point_position (p, cache) != EQUAL)
-    {
-      CGAL_precondition_msg (false, "p is not on cv2");
-    }
-  }
-
-  // Check for vertical subcurves. A vertical segment is above any other
-  // x-monotone subcurve to the right of their common endpoint.
-  if (is_vertical())
-  {
-    if (cv.is_vertical())
-      // Both are vertical segments with a common endpoint, so they overlap:
-      return (EQUAL);
-    
-    return (LARGER);
-  }
-  else if (cv.is_vertical())
-  {
-    return (SMALLER);
-  }
-    
-  // Check if both subcurves originate from the same Bezier curve.
-  Nt_traits       nt_traits;
-
-  if (_curve.is_same (cv._curve))
-  {
-    // Get the originator, and check whether p is a vertical tangency
-    // point of this originator (otherwise it is a self-intersection point,
-    // and we proceed as if it is a regular intersection point).
-    Originator_iterator  org = p.get_originator(_curve, _xid);
-
-    CGAL_assertion (org != p.originators_end());
-
-    if (org->point_bound().type == Bez_point_bound::VERTICAL_TANGENCY_PT)
-    {
-      CGAL_assertion (_inc_to_right != cv._inc_to_right);
-
-      if (! p.is_exact())
-      {
-        // Comparison based on the control polygon of the bounded vertical
-        // tangency point, using the fact this polygon is y-monotone.
-        const typename Bounding_traits::Control_points& cp = 
-          org->point_bound().ctrl;
-
-        if (_inc_to_right)
-        {
-          return (CGAL::compare (cp.back().y(), cp.front().y()));
-        }
-        else
-        {
-          return (CGAL::compare (cp.front().y(), cp.back().y()));
-        }
-      }
-    
-      // Iddo: Handle rational points (using de Casteljau derivative)?
-    
-      // In this case we know that we have a vertical tangency at t0, so
-      // X'(t0) = 0. We evaluate the sign of Y'(t0) in order to find the
-      // vertical position of the two subcurves to the right of this point.
-      CGAL_assertion (org->has_parameter());
-    
-      const Algebraic&  t0 = org->parameter();
-      Polynomial        polyY_der = nt_traits.derive (_curve.y_polynomial());
-      const CGAL::Sign  sign_der =
-        CGAL::sign (nt_traits.evaluate_at (polyY_der, t0));
-    
-      CGAL_assertion (sign_der != CGAL::ZERO);
-    
-      if (_inc_to_right)
-        return ((sign_der == CGAL::POSITIVE) ? LARGER : SMALLER);
-      else
-        return ((sign_der == CGAL::NEGATIVE) ? LARGER : SMALLER);
-    }
-  }
-
-  // Compare the slopes of the two supporting curves at p. In the general
-  // case, the slopes are not equal and their comparison gives us the
-  // vertical order to p's right.
-  Comparison_result   slope_res = _compare_slopes (cv, p, cache);
-
-  if (slope_res != EQUAL)
-    return (slope_res);
-
-  // Compare the two subcurves by choosing some point to the right of p
-  // and comparing the vertical position there.
-  Comparison_result   right_res;
-  
-  if (right().compare_x (cv.right(), cache) != LARGER)
-  {
-    right_res = _compare_to_side (cv, p,
-                                  true,           // Compare to p's right.
-                                  cache);
-  }
-  else
-  {
-    right_res = cv._compare_to_side (*this, p,
-                                     true,        // Compare to p's right.
-                                     cache);
-    
-    right_res = CGAL::opposite (right_res);
-  }
-  
-  return (right_res);
-}
-
-// ---------------------------------------------------------------------------
-// Compare the relative y-position of two x-monotone subcurve to the left
-// of their intersection point.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::compare_to_left
-        (const Self& cv,
-         const Point_2& p,
-         Bezier_cache& cache) const
-{
-  CGAL_precondition (p.compare_xy (left(), cache) != SMALLER);
-  CGAL_precondition (p.compare_xy (cv.left(), cache) != SMALLER);
-
-  if (this == &cv)
-    return (EQUAL);
-
-  // Make sure that p is incident to both curves (either equals the right
-  // endpoint or lies in the curve interior). Note that this is important to
-  // carry out these tests, as it assures us the eventually both curves are
-  // originators of p.
-  if (! p.equals (right(), cache))
-  {
-    if (point_position (p, cache) != EQUAL)
-    {
-      CGAL_precondition_msg (false, "p is not on cv1");
-    }
-  }
-
-  if (! p.equals (cv.right(), cache))
-  {
-    if (cv.point_position (p, cache) != EQUAL)
-    {
-      CGAL_precondition_msg (false, "p is not on cv2");
-    }
-  }
-  
-  // Check for vertical subcurves. A vertical segment is below any other
-  // x-monotone subcurve to the left of their common endpoint.
-  if (is_vertical())
-  {
-    if (cv.is_vertical())
-      // Both are vertical segments with a common endpoint, so they overlap:
-      return (EQUAL);
-    
-    return (SMALLER);
-  }
-  else if (cv.is_vertical())
-  {
-    return (LARGER);
-  }
-    
-  // Check if both subcurves originate from the same Bezier curve.
-  Nt_traits       nt_traits;
-
-  if (_curve.is_same (cv._curve))
-  {
-    // Get the originator, and check whether p is a vertical tangency
-    // point of this originator (otherwise it is a self-intersection point,
-    // and we proceed as if it is a regular intersection point).
-    Originator_iterator  org = p.get_originator (_curve, _xid);
-
-    CGAL_assertion (org != p.originators_end());
-    CGAL_assertion (_inc_to_right != cv._inc_to_right);
-    
-    if (org->point_bound().type == Bez_point_bound::VERTICAL_TANGENCY_PT)
-    {
-      if (! p.is_exact())
-      {
-        // Comparison based on the control polygon of the bounded vertical
-        // tangency point, using the fact this polygon is y-monotone.
-        const typename Bounding_traits::Control_points& cp = 
-          org->point_bound().ctrl;
-      
-        if (_inc_to_right)
-        {
-          return (CGAL::compare(cp.front().y(), cp.back().y()));
-        }
-        else
-        {
-          return (CGAL::compare(cp.back().y(), cp.front().y()));
-        }
-      }
-    
-      // Iddo: Handle rational points (using de Casteljau derivative)?
-    
-      // In this case we know that we have a vertical tangency at t0, so
-      // X'(t0) = 0. We evaluate the sign of Y'(t0) in order to find the
-      // vertical position of the two subcurves to the right of this point.
-      CGAL_assertion (org->has_parameter());
-    
-      const Algebraic&  t0 = org->parameter();
-      Polynomial        polyY_der = nt_traits.derive (_curve.y_polynomial());
-      const CGAL::Sign  sign_der =
-        CGAL::sign (nt_traits.evaluate_at (polyY_der, t0));
-    
-      CGAL_assertion (sign_der != CGAL::ZERO);
-      
-      if (_inc_to_right)
-        return ((sign_der == CGAL::NEGATIVE) ? LARGER : SMALLER);
-      else
-        return ((sign_der == CGAL::POSITIVE) ? LARGER : SMALLER);
-    }
-  }
-
-  // Compare the slopes of the two supporting curves at p. In the general
-  // case, the slopes are not equal and their comparison gives us the
-  // vertical order to p's right; note that we swap the order of the curves
-  // to obtains their position to the left.
-  Comparison_result   slope_res = cv._compare_slopes (*this, p, cache);
-    
-  if (slope_res != EQUAL)
-    return (slope_res);
-
-  // Compare the two subcurves by choosing some point to the left of p
-  // and compareing the vertical position there.
-  Comparison_result   left_res;
-  
-  if (left().compare_x (cv.left(), cache) != SMALLER)
-  {
-    left_res = _compare_to_side (cv, p,
-                                 false,          // Compare to p's left.
-                                 cache);
-  }
-  else
-  {
-    left_res = cv._compare_to_side (*this, p,
-                                    false,       // Compare to p's left.
-                                    cache);
-    left_res = CGAL::opposite (left_res);
-  }
-  
-  return (left_res);
-}
-
-// ---------------------------------------------------------------------------
-// Check whether the two subcurves are equal (have the same graph).
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::equals
-        (const Self& cv,
-         Bezier_cache& cache) const
-{
-  // Check if the two subcurves have overlapping supporting curves.
-  if (! _curve.is_same (cv._curve))
-  {
-    //special case when curves are vertical
-    if (cv.is_vertical()){
-      if (is_vertical())
-        return compare(left().x(),cv.left().x())==EQUAL;
-      return false;
-    }
-    
-    // Check whether the two curves have the same support:
-    if (! _curve.has_same_support (cv._curve))
-      return (false);
-    
-    // Mark that the two curves overlap in the cache.
-    const Curve_id               id1 = _curve.id();
-    const Curve_id               id2 = cv._curve.id();
-
-    if (id1 < id2)
-      cache.mark_as_overlapping (id1, id2);
-    else
-      cache.mark_as_overlapping (id2, id1);
-  }
-
-  // Check for equality of the endpoints.
-  return (left().equals (cv.left(), cache) &&
-          right().equals (cv.right(), cache));
-}
-
-// ---------------------------------------------------------------------------
-// Split the subcurve into two at a given split point.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::
-split(const Point_2& p, Self& c1, Self& c2) const
-{
-  //this was added to handle the case where p is the endpoint of another
-  //Bezier curve and the curve is vertical
-  if ( p.is_rational() && is_vertical() ){
-    Nt_traits nt_traits;
-    Rat_point_2 rp = (Rat_point_2) p;
-    std::list<Algebraic> sols;
-
-    // typename std::list<Algebraic>::iterator sol = sols.begin();
-    Integer rpyn = nt_traits.numerator(rp.y());
-    Polynomial poly_y =
-      nt_traits.scale(_curve.y_polynomial(),
-                      nt_traits.denominator(rp.y())) -
-                        nt_traits.construct_polynomial(&rpyn, 0);
-    nt_traits.compute_polynomial_roots(poly_y, 0, 1, std::back_inserter(sols));
-    CGAL_assertion(sols.size() == 1);
-    p.add_originator(Originator(_curve, _xid,*sols.begin()) );
-  }
-  
-  CGAL_precondition(p.get_originator(_curve, _xid) != p.originators_end() ||
-                    p.is_rational());
-
-  // Duplicate the curve.
-  c1 = c2 = *this;
-    
-  // Perform the split.
-  if (_dir_right)
-  {
-    c1._pt = p;
-    c2._ps = p;
-  }
-  else
-  {
-    c1._ps = p;
-    c2._pt = p;
-  }
-}
-
-// ---------------------------------------------------------------------------
-// Check if the two subcurves are mergeable.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::can_merge_with
-        (const Self& cv) const
-{
-  // Note that we only allow merging subcurves of the same originating
-  // Bezier curve (overlapping curves will not do in this case).
-  return (_curve.is_same (cv._curve) &&
-          _xid == cv._xid &&
-          (right().is_same (cv.left()) || left().is_same (cv.right())));
-  
-  return (false);
-}
-
-// ---------------------------------------------------------------------------
-// Merge the current arc with the given arc.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::Self
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::merge
-        (const Self& cv) const
-{
-  CGAL_precondition (_curve.is_same (cv._curve));
-  CGAL_precondition (_xid == cv._xid);
-
-  Self    res = *this;
-
-  if (right().is_same (cv.left()))
-  {
-    // Extend the subcurve to the right.
-    if (_dir_right)
-      res._pt = cv.right();
-    else
-      res._ps = cv.right();
-  }
-  else
-  {
-    CGAL_precondition (left().is_same (cv.right()));
-    
-    // Extend the subcurve to the left.
-    if (_dir_right)
-      res._ps = cv.left();
-    else
-      res._pt = cv.left();
-  }
-
-  return (res);
-}
-
-// ---------------------------------------------------------------------------
-// Check if the given t-value is in the range of the subcurve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
-        (const Algebraic& t,
-         Bezier_cache& cache) const
-{
-  // First try to use the approximate representation of the endpoints.
-  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion (s_org != _ps.originators_end());
-
-  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion (t_org != _pt.originators_end());
-
-  Nt_traits            nt_traits;
-
-  bool  p_lt_ps =
-      (CGAL::compare (t, nt_traits.convert (s_org->point_bound().t_min)) == 
-       SMALLER);
-  bool  p_gt_ps =
-      (CGAL::compare (t, nt_traits.convert (s_org->point_bound().t_max)) ==
-       LARGER);
-  bool  p_lt_pt =
-      (CGAL::compare (t, nt_traits.convert (t_org->point_bound().t_min)) ==
-       SMALLER);
-  bool  p_gt_pt =
-      (CGAL::compare (t, nt_traits.convert (t_org->point_bound().t_max)) ==
-       LARGER);
-
-  if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
-  {
-    // The point p is definately in the x-range of the subcurve, as its
-    // parameter is between the source and target parameters.
-    return (true);
-  }
-  
-  if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
-  {
-    // The point p is definately not in the x-range of the subcurve,
-    // as its parameter is smaller than both source and target parameter
-    // (or greater than both of them).
-    return (false);
-  }
-  
-  // Obtain the exact t-range of the curve and peform an exact comparison.
-  std::pair<Algebraic, Algebraic> range = _t_range (cache);
-  const Algebraic&                t_src = range.first;
-  const Algebraic&                t_trg = range.second;
-  
-  const Comparison_result  res1 = CGAL::compare (t, t_src);
-  const Comparison_result  res2 = CGAL::compare (t, t_trg);
-  
-  return (res1 == EQUAL || res2 == EQUAL || res1 != res2);
-}
-
-// ---------------------------------------------------------------------------
-// Check if the given point lies in the range of this x-monotone subcurve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
-        (const Point_2& p,
-         bool& is_certain) const
-{
-  is_certain = true;
-  
-  // Check the easy case that p is one of the subcurve endpoints.
-  if (p.is_same(_ps) || p.is_same(_pt))
-    return true;
-
-  // Compare the parameter of p with the parameters of the endpoints.
-  Originator_iterator  p_org = p.get_originator (_curve, _xid);
-
-  if (p_org == p.originators_end())
-  {
-    CGAL_assertion (p.get_originator (_curve) != p.originators_end());
-
-    // In this case a different x-monotone curve of the supporting Bezier
-    // curve is an originator of the point, so we know that p does not
-    // lie in the range of our x-monotone subcurve.
-    return (false);
-  }
-
-  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion (s_org != _ps.originators_end());
-  
-  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion (t_org != _pt.originators_end());
-  
-  bool      can_refine_p = ! p.is_exact();
-  bool      can_refine_s = ! _ps.is_exact();
-  bool      can_refine_t = ! _pt.is_exact();
-  
-  while (can_refine_p || can_refine_s || can_refine_t)
-  {
-    bool  p_lt_ps = (CGAL::compare (p_org->point_bound().t_max,
-                                    s_org->point_bound().t_min) == SMALLER);
-    bool  p_gt_ps = (CGAL::compare (p_org->point_bound().t_min,
-                                    s_org->point_bound().t_max) == LARGER);
-    bool  p_lt_pt = (CGAL::compare (p_org->point_bound().t_max,
-                                    t_org->point_bound().t_min) == SMALLER);
-    bool  p_gt_pt = (CGAL::compare (p_org->point_bound().t_min,
-                                    t_org->point_bound().t_max) == LARGER);
-
-    if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
-    {
-      // The point p is definately in the x-range of the subcurve, as its
-      // parameter is between the source and target parameters.
-      return (true);
-    }
-
-    if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
-    {
-      // The point p is definately not in the x-range of the subcurve,
-      // as its parameter is smaller than both source and target parameter
-      // (or greater than both of them).
-      return (false);
-    }
-    
-    // Try to refine the points.
-    if (can_refine_p)
-      can_refine_p = p.refine();
-    
-    if (can_refine_s)
-      can_refine_s = _ps.refine();
-    
-    if (can_refine_t)
-      can_refine_t = _pt.refine();
-  }
-
-  // If we reached here, we do not have a certain answer.
-  is_certain = false;
-  return (false);
-}
-
-// ---------------------------------------------------------------------------
-// Given a point p that lies on the supporting Bezier curve (X(t), Y(t)),
-// determine whether p lies within the t-range of the x-monotone subcurve.
-// If so, the value t0 such that p = (X(t0), Y(t0)) is also computed.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
-        (const Point_2& p,
-         Bezier_cache& cache,
-         Algebraic& t0,
-         bool& is_endpoint) const
-{
-  // The given point p must be rational, otherwise there is no point checking
-  // whether it lies in the interior of the curve.
-  if (! p.is_rational())
-  {
-    is_endpoint = false;
-    return (false);
-  }
-
-  const Rat_point_2&    rat_p = (Rat_point_2) p;
-
-  // Determine the parameter range [t_min, t_max] for our x-monotone
-  // subcurve.
-  std::pair<Algebraic, Algebraic>          t_range = _t_range (cache);
-  Algebraic                                t_min, t_max;
-
-  if ((_dir_right && _inc_to_right) || (! _dir_right && ! _inc_to_right))
-  {
-    t_min = t_range.first;
-    t_max = t_range.second;
-  }
-  else
-  {
-    t_min = t_range.second;
-    t_max = t_range.first;
-  }
-
-  // The given point p must lie on (X(t), Y(t)) for some t-value. Obtain the
-  // parameter value t0 for that point. We start by computing all t-values
-  // such that X(t) equals the x-coordinate of p.
-  Nt_traits                                nt_traits;
-  std::list<Algebraic>                     t_vals;
-  typename std::list<Algebraic>::iterator  t_iter;
-  Comparison_result                        res1, res2;
-  Algebraic                                y0;
-
-  if ( is_vertical() ){
-    if ( compare(rat_p.x(),left().x())==EQUAL ){
-      _curve.get_t_at_y (rat_p.y(), std::back_inserter(t_vals));
-      
-      for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
-      {
-        // Compare the current t-value with t_min.
-        res1 = CGAL::compare (t_min, *t_iter);
-
-        if (res1 == LARGER)
-          continue;
-
-
-        if (res1 == EQUAL)
-        {
-          t0 = t_min;
-          is_endpoint = true;
-          return (true);
-        }
-
-        // Compare the current t-value with t_max.
-        res2 = CGAL::compare (t_max, *t_iter);
-
-        if (res2 == EQUAL)
-        {
-          t0 = t_max;
-          is_endpoint = true;
-          return (true);
-        }
-
-        if (res2 == LARGER)
-        {
-          t0 = *t_iter;
-          is_endpoint = false;
-          return (true);
-        }
-      }
-    }
-    is_endpoint = false;
-    return (false);          
-  }
-  
-  _curve.get_t_at_x (rat_p.x(), std::back_inserter(t_vals));
-  CGAL_assertion (! t_vals.empty() );
-
-  for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
-  {
-    // Compare the current t-value with t_min.
-    res1 = CGAL::compare (t_min, *t_iter);
-
-    if (res1 == LARGER)
-      continue;
-
-    // Make sure the y-coordinates match.
-    y0 = nt_traits.evaluate_at (_curve.y_polynomial(), *t_iter) /
-         nt_traits.convert (_curve.y_norm());
-
-    if (CGAL::compare (nt_traits.convert (rat_p.y()), y0) == EQUAL)
-    {
-      if (res1 == EQUAL)
-      {
-        t0 = t_min;
-        is_endpoint = true;
-        return (true);
-      }
-
-      // Compare the current t-value with t_max.
-      res2 = CGAL::compare (t_max, *t_iter);
-
-      if (res2 == EQUAL)
-      {
-        t0 = t_max;
-        is_endpoint = true;
-        return (true);
-      }
-
-      if (res2 == LARGER)
-      {
-        t0 = *t_iter;
-        is_endpoint = false;
-        return (true);
-      }
-    }
-  }
-
-  // In this case, we have not found a t-value in the range of our subcurve,
-  // so p does not lie on the subcurve:
-  is_endpoint = false;
-  return (false);
-}
-
-// ---------------------------------------------------------------------------
-// Compute a y-coordinate of a point on the x-monotone subcurve with a
-// given x-coordinate.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::Algebraic
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_get_y
-        (const Rational& x0,
-         Bezier_cache& cache) const
-{
-  // Obtain the t-values for with the x-coordinates of the supporting
-  // curve equal x0.
-  std::list<Algebraic>  t_vals;
-
-  _curve.get_t_at_x (x0, std::back_inserter(t_vals));
-
-  // Find a t-value that is in the range of the current curve.
-  Nt_traits                                nt_traits;
-  typename std::list<Algebraic>::iterator  t_iter;
-  std::pair<Algebraic, Algebraic>          t_range = _t_range (cache);
-  const Algebraic&                         t_src = t_range.first;
-  const Algebraic&                         t_trg = t_range.second;
-  Comparison_result                        res1, res2;
-  
-  for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
-  {
-    res1 = CGAL::compare (*t_iter, t_src);
-
-    if (res1 == EQUAL)
-    {
-      // Return the y-coordinate of the source point:
-      return (_ps.y());
-    }
-
-    res2 = CGAL::compare (*t_iter, t_trg);
-
-    if (res2 == EQUAL)
-    {
-      // Return the y-coordinate of the source point:
-      return (_pt.y());
-    }
-
-    if (res1 != res2)
-    {
-      // We found a t-value in the range of our x-monotone subcurve.
-      // Use this value to compute the y-coordinate.
-      return (nt_traits.evaluate_at (_curve.y_polynomial(), *t_iter) /
-              nt_traits.convert (_curve.y_norm()));
-    }
-  }
-  
-  // If we reached here, x0 is not in the x-range of our subcurve.
-  CGAL_error();
-  return (0);
-}
-
-// ---------------------------------------------------------------------------
-// Compare the slopes of the subcurve with another given Bezier subcurve at
-// their given intersection point.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_compare_slopes
-        (const Self& cv,
-         const Point_2& p,
-         Bezier_cache& cache) const
-{
-  // Get the originators of p.
-  Originator_iterator     org1 = p.get_originator (_curve, _xid);
-  const bool              valid_org1 = (org1 != p.originators_end());
-
-  Originator_iterator     org2 = p.get_originator (cv._curve, cv._xid);
-  const bool              valid_org2 = (org2 != p.originators_end());
-
-  CGAL_assertion (valid_org1 || valid_org2);
-
-  // If the point is only approximated, we can carry out a comparison using
-  // an approximate number type.
-  if (valid_org1 && valid_org2 && ! p.is_exact())
-  {
-    // If the point is inexact, we assume it is a bounded intersection
-    // point of two curves, and therefore the bounding angle these curves
-    // span do not overlap.
-    const Bez_point_bound&  bound1 = org1->point_bound();
-    const Bez_point_bound&  bound2 = org2->point_bound();
-    Bounding_traits         bound_tr;
-    
-    return (bound_tr.compare_slopes_at_intersection_point (bound1,
-                                                           bound2));
-  }
-
-  // Obtain the parameter values t1 and t2 that correspond to the point p.
-  // Note that it is possible that one of the curves is not an originator
-  // of p. This can happen if p is an endpoint of the other curve (hence
-  // it must be a ratioal point!) and lies in its interior. In this
-  // (degenerate) case we compute the parameter value and set the appropriate
-  // originator for p.
-  Nt_traits         nt_traits;
-  Algebraic         t1;
-  Algebraic         t2;
-
-  if (valid_org1)
-  {
-    CGAL_assertion (org1->has_parameter());
-    t1 = org1->parameter();
-  }
-  else
-  {
-    bool    is_endpoint1;
-    CGAL_assertion_code (bool   in_range1 =)
-    _is_in_range (p, cache, t1, is_endpoint1);
-    CGAL_assertion (in_range1);
-    p.add_originator (Originator (_curve, _xid, t1));
-  }
-
-  if (valid_org2)
-  {
-    CGAL_assertion (org2->has_parameter());
-    t2 = org2->parameter();
-  }
-  else
-  {
-    bool    is_endpoint2;
-    CGAL_assertion_code (bool   in_range2 =)
-    cv._is_in_range (p, cache, t2, is_endpoint2);
-    CGAL_assertion (in_range2);
-    p.add_originator (Originator (cv._curve, cv._xid, t2));
-  }
-
-  // The slope of (X(t), Y(t)) at t0 is given by Y'(t0)/X'(t0).
-  // Compute the slope of (*this).
-  // Note that we take special care of the case X'(t0) = 0, when the tangent
-  // is vertical and its slope is +/- oo.
-  Polynomial        derivX = nt_traits.derive (_curve.x_polynomial());
-  Polynomial        derivY = nt_traits.derive (_curve.y_polynomial());
-  Algebraic         numer1 = nt_traits.evaluate_at (derivY, t1) *
-                             nt_traits.convert (_curve.x_norm());
-  Algebraic         denom1 = nt_traits.evaluate_at (derivX, t1) *
-                             nt_traits.convert (_curve.y_norm());
-  CGAL::Sign        inf_slope1 = CGAL::ZERO;
-  Algebraic         slope1;
-
-  if (CGAL::sign (denom1) == CGAL::ZERO)
-  {
-    inf_slope1 = is_directed_right() ? CGAL::sign (numer1) : CGAL::opposite( CGAL::sign (numer1) );
-
-    // If both derivatives are zero, we cannot perform the comparison:
-    if (inf_slope1 == CGAL::ZERO)
-      return (EQUAL);
-  }
-  else
-  {
-    slope1 = numer1 / denom1;
-  }
-
-  // Compute the slope of the other subcurve.
-  derivX = nt_traits.derive (cv._curve.x_polynomial());
-  derivY = nt_traits.derive (cv._curve.y_polynomial());
-  Algebraic         numer2 = nt_traits.evaluate_at (derivY, t2) *
-                             nt_traits.convert (cv._curve.x_norm());
-  Algebraic         denom2 = nt_traits.evaluate_at (derivX, t2) *
-                             nt_traits.convert (cv._curve.y_norm());
-  CGAL::Sign        inf_slope2 = CGAL::ZERO;
-  Algebraic         slope2;
-
-  if (CGAL::sign (denom2) == CGAL::ZERO)
-  {
-    inf_slope2 = cv.is_directed_right() ? CGAL::sign (numer2) : CGAL::opposite( CGAL::sign (numer2) );
-
-    // If both derivatives are zero, we cannot perform the comparison:
-    if (inf_slope2 == CGAL::ZERO)
-      return (EQUAL);
-  }
-  else
-  {
-    slope2 = numer2 / denom2;
-  }
-
-  // Handle the comparison when one slope (or both) is +/- oo.
-  if (inf_slope1 == CGAL::POSITIVE)
-    return (inf_slope2 == CGAL::POSITIVE ? EQUAL : LARGER);
-  
-  if (inf_slope1 == CGAL::NEGATIVE)
-    return (inf_slope2 == CGAL::NEGATIVE ? EQUAL : SMALLER);
-
-  if (inf_slope2 == CGAL::POSITIVE)
-    return (SMALLER);
-
-  if (inf_slope2 == CGAL::NEGATIVE)
-    return (LARGER);
-
-  // Compare the slopes.
-  return (CGAL::compare (slope1, slope2));
-}
-
-// ---------------------------------------------------------------------------
-// Get the range of t-value over which the subcurve is defined.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-std::pair<typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
-                                        BndTrt>::Algebraic, 
-          typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
-                                        BndTrt>::Algebraic>
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_t_range
-        (Bezier_cache& cache) const
-{
-  Originator_iterator  ps_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion(ps_org != _ps.originators_end());
-  
-  Originator_iterator  pt_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion(pt_org != _pt.originators_end());
-  
-  // Make sure that the two endpoints are exact.
-  if (! ps_org->has_parameter())
-    _ps.make_exact (cache);
-  
-  if (! pt_org->has_parameter())
-    _pt.make_exact (cache);
-  
-  return (std::make_pair (ps_org->parameter(),
-                          pt_org->parameter()));
-}
-
-// ---------------------------------------------------------------------------
-// Compare the relative y-position of two x-monotone subcurve to the right
-// (or to the left) of their intersection point, whose multiplicity is
-// greater than 1.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_compare_to_side
-        (const Self& cv,
-         const Point_2& p,
-         bool to_right,
-         Bezier_cache& cache) const
-{
-  // Get the intersection points of the two curves from the cache. Note that
-  // we make sure that the ID of this->_curve is smaller than of cv's curve ID.
-  const bool             no_swap_curves = (_curve.id() <= cv._curve.id());
-  bool                   do_ovlp;
-  const Intersect_list&  inter_list =
-    (no_swap_curves ?
-     (cache.get_intersections (_curve.id(),
-                               _curve.x_polynomial(), _curve.x_norm(),
-                               _curve.y_polynomial(), _curve.y_norm(),
-                               cv._curve.id(),
-                               cv._curve.x_polynomial(), cv._curve.x_norm(),
-                               cv._curve.y_polynomial(), cv._curve.y_norm(),
-                               do_ovlp)) :
-     (cache.get_intersections (cv._curve.id(),
-                               cv._curve.x_polynomial(), cv._curve.x_norm(),
-                               cv._curve.y_polynomial(), cv._curve.y_norm(),
-                               _curve.id(),
-                               _curve.x_polynomial(), _curve.x_norm(),
-                               _curve.y_polynomial(), _curve.y_norm(),
-                               do_ovlp)));
-
-  // Get the parameter value for the point p.
-  Originator_iterator          org = p.get_originator (_curve, _xid);
-  
-  CGAL_assertion (org != p.originators_end());
-  CGAL_assertion (org->has_parameter());
-  
-  const Algebraic&             t0 = org->parameter();
-
-  // Get the parameter range of the curve.
-  const std::pair<Algebraic,
-                  Algebraic>&  range = _t_range (cache);
-  const Algebraic&             t_src = range.first;
-  const Algebraic&             t_trg = range.second;
-
-  // Find the next intersection point that lies to the right of p.
-  Intersect_iter               iit;
-  Algebraic                    next_t;
-  Comparison_result            res = CGAL::EQUAL;
-  bool                         found = false;
-  
-  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
-  {
-    // Check if the current point lies to the right (left) of p. We do so by
-    // considering its originating parameter value s (or t, if we swapped
-    // the curves).
-    const Algebraic&     t = (no_swap_curves ? (iit->s) : iit->t);
-    
-    res = CGAL::compare (t, t0);
-    if ((to_right && ((_inc_to_right && res == LARGER) ||
-                      (! _inc_to_right && res == SMALLER))) ||
-        (! to_right && ((_inc_to_right && res == SMALLER) ||
-                        (! _inc_to_right && res == LARGER))))
-    {
-      if (! found)
-      {
-        next_t = t;
-        found = true;
-      }
-      else
-      {
-        // If we have already located an intersection point to the right
-        // (left) of p, choose the leftmost (rightmost) of the two points.
-        res = CGAL::compare (t, next_t);
-        if ((to_right && ((_inc_to_right && res == SMALLER) ||
-                          (! _inc_to_right && res == LARGER))) ||
-            (! to_right && ((_inc_to_right && res == LARGER) ||
-                            (! _inc_to_right && res == SMALLER))))
-        {
-          next_t = t;
-        }
-      }
-    }
-  }
-  
-  // If the next intersection point occurs before the right (left) endpoint
-  // of the subcurve, keep it. Otherwise, take the parameter value at
-  // the endpoint.
-  if (found)
-  {
-    if (to_right == _dir_right)
-      res = CGAL::compare (t_trg, next_t);
-    else
-      res = CGAL::compare (t_src, next_t);
-  }
-  
-  if (! found ||
-      (to_right && ((_inc_to_right && res == SMALLER) ||
-                    (! _inc_to_right && res == LARGER))) ||
-      (! to_right && ((_inc_to_right && res == LARGER) ||
-                      (! _inc_to_right && res == SMALLER))))
-  {
-    next_t = ((to_right == _dir_right) ? t_trg : t_src);
-  }
-  
-  // Find a rational value between t0 and t_next. Using this value, we
-  // a point with rational coordinates on our subcurve. We also locate a point
-  // on the other curve with the same x-coordinates.
-  Nt_traits           nt_traits;
-  const Rational&     mid_t = nt_traits.rational_in_interval (t0, next_t);
-  const Rat_point_2&  q1 = _curve (mid_t);
-  const Algebraic&    y2 = cv._get_y (q1.x(), cache);
-
-  // We now just have to compare the y-coordinates of the two points we have
-  // computed.
-  return (CGAL::compare (nt_traits.convert (q1.y()), y2));
-}
-
-// ---------------------------------------------------------------------------
-// Clip the control polygon of the supporting Bezier curve such that it fits
-// the current x-monotone subcurve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
-                          BndTrt>::_clip_control_polygon
-        (typename Bounding_traits::Control_points& ctrl,
-         typename Bounding_traits::NT& t_min,
-         typename Bounding_traits::NT& t_max) const
-{
-  // Start from the control polygon of the supporting curve.
-  ctrl.clear();
-  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
-             std::back_inserter (ctrl));
-
-  // The x-monotone subcurve is defined over a parameter range
-  // 0 <= t_min < t_max <= 1. Determine the endpoint with minimal t-value and
-  // the one with maximal t-value.
-  const Point_2&       p_min = (_inc_to_right ? left() : right());
-  Originator_iterator  org_min = p_min.get_originator (_curve, _xid);
-  const Point_2&       p_max = (_inc_to_right ? right() : left());
-  Originator_iterator  org_max = p_max.get_originator (_curve, _xid);
-  bool                 clipped_min = false;
-
-  CGAL_assertion (org_min != p_min.originators_end());
-  CGAL_assertion (org_max != p_max.originators_end());
-
-  // Check if t_min = 0. If so, there is no need to clip.
-  if (! (org_min->point_bound().type == Bez_point_bound::RATIONAL_PT &&
-         CGAL::sign (org_min->point_bound().t_min) == CGAL::ZERO))
-  {
-    // It is possible that the paramater range of the originator is too large.
-    // We therefore make sure it fits the current bounding box of the point
-    // (which we know is tight enough).
-    p_min.fit_to_bbox();
-
-    // Obtain two control polygons, the first for [0, t_min] and the other for
-    // [t_min, 1] and take the second one.
-    typename Bounding_traits::Control_points    cp_a;
-    typename Bounding_traits::Control_points    cp_b;
-
-    t_min = org_min->point_bound().t_max;
-    de_Casteljau_2 (ctrl.begin(), ctrl.end(),
-                    t_min,
-                    std::back_inserter(cp_a),
-                    std::front_inserter(cp_b));
-
-    ctrl.clear();
-    std::copy (cp_b.begin(), cp_b.end(),
-               std::back_inserter (ctrl));
-    clipped_min = true;
-  }
-  else
-  {
-    t_min = 0;
-  }
-
-  // Check if t_max = 1. If so, there is no need to clip.
-  if (! (org_max->point_bound().type == Bez_point_bound::RATIONAL_PT &&
-         CGAL::compare (org_max->point_bound().t_max, 1) == CGAL::EQUAL))
-  {
-    // It is possible that the paramater range of the originator is too large.
-    // We therefore make sure it fits the current bounding box of the point
-    // (which we know is tight enough).
-    p_max.fit_to_bbox();
-
-    // Obtain two control polygons, the first for [t_min, t_max] and the other
-    // for [t_max, 1] and take the first one.
-    typename Bounding_traits::Control_points    cp_a;
-    typename Bounding_traits::Control_points    cp_b;
-
-    if (clipped_min)
-    {
-      t_max = (org_max->point_bound().t_min - t_min) / (1 - t_min);
-    }
-    else
-    {
-      t_max = org_max->point_bound().t_min;
-    }
-
-    de_Casteljau_2 (ctrl.begin(), ctrl.end(),
-                    t_max,
-                    std::back_inserter(cp_a),
-                    std::front_inserter(cp_b));
-
-    ctrl.clear();
-    std::copy (cp_a.begin(), cp_a.end(),
-               std::back_inserter (ctrl));
-    t_max = org_max->point_bound().t_min;
-  }
-  else
-  {
-    t_max = 1;
-  }
-
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Approximate the intersection points between the two given curves.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
-                          BndTrt>::_approximate_intersection_points
-        (const Self& cv,
-         std::list<Point_2>& inter_pts) const
-{
-  typedef typename Bounding_traits::Intersection_point  Intersection_point;
-
-  inter_pts.clear();
-
-  // Get the supporting Bezier curves, and make local copies of their control
-  // polygons.
-  const Curve_2&                            B1 = this->_curve;
-  const Curve_2&                            B2 = cv._curve;
-  typename Bounding_traits::Control_points  cp1;
-  typename Bounding_traits::NT              t_min1 = 0, t_max1 = 1;
-  typename Bounding_traits::Control_points  cp2;
-  typename Bounding_traits::NT              t_min2 = 0, t_max2 = 1;
-  bool                                      is_self_intersection = false;
-
-  if (! B1.is_same (B2))
-  {
-    // In case B1 and B2 are different curves, use their full control polygons
-    // in order to approximate all intersection points between the two
-    // supporting Bezier curves.
-    std::copy (B1.control_points_begin(), B1.control_points_end(),
-               std::back_inserter (cp1));
-    std::copy (B2.control_points_begin(), B2.control_points_end(),
-               std::back_inserter(cp2));
-  }
-  else
-  {
-    // In this case we need to approximate the (self-)intersection points of
-    // two subcurves of the same Bezier curve. Clip the control polygons and
-    // obtain the control polygons of the two subcurves.
-    _clip_control_polygon (cp1, t_min1, t_max1);
-    cv._clip_control_polygon (cp2, t_min2, t_max2);
-    is_self_intersection = true;
-  }
-
-  // Use the bounding traits to isolate the intersection points.
-  Bounding_traits                  bound_tr;
-  std::list<Intersection_point>    ipt_bounds;
-
-  bound_tr.compute_intersection_points (cp1, cp2,
-                                        std::back_inserter (ipt_bounds));
-
-  // Construct the approximated points.
-  typename std::list<Intersection_point>::const_iterator  iter;
-  
-  for (iter = ipt_bounds.begin(); iter != ipt_bounds.end(); ++iter)
-  {
-    const Bez_point_bound&  bound1 = iter->bound1; 
-    const Bez_point_bound&  bound2 = iter->bound2; 
-    const Bez_point_bbox&   bbox = iter->bbox; 
-    
-    // In case it is impossible to further refine the point, stop here.
-    if (! bound1.can_refine || ! bound2.can_refine)
-      return (false);
-    
-    // Create the approximated intersection point.
-    Point_2                 pt;
-    
-    if (bound1.type == Bounding_traits::Bez_point_bound::RATIONAL_PT &&
-        bound2.type == Bounding_traits::Bez_point_bound::RATIONAL_PT)
-    {
-      CGAL_assertion (CGAL::compare (bound1.t_min, bound1.t_max) == EQUAL); 
-      CGAL_assertion (CGAL::compare (bound2.t_min, bound2.t_max) == EQUAL); 
-      Rational   t1 = bound1.t_min;
-      Rational   t2 = bound2.t_min;
-      Nt_traits  nt_traits;
-
-      if (is_self_intersection)
-      {
-        // Set the originators with the curve x-monotone IDs.
-        // Note that the parameter values we have computed relate to the
-        // parameter range [t_min1, t_max1] and [t_min2, t_max2], respectively,
-        // so we scale them back to the parameter range [0, 1] that represent
-        // the entire curve.
-        t1 = t_min1 + t1 * (t_max1 - t_min1);
-        t2 = t_min2 + t2 * (t_max2 - t_min2);
-
-        pt = Point_2 (B1, _xid, t1);
-        pt.add_originator (Originator (B2, cv._xid, t2));
-      }
-      else
-      {
-        // Set the originators referring to the entire supporting curves.
-        pt = Point_2 (B1, t1);
-        pt.add_originator (Originator (B2, nt_traits.convert (t2)));
-      }
-    }
-    else
-    {
-      if (is_self_intersection)
-      {
-        // Set the originators with the curve x-monotone IDs.
-        // Note that the parameter values we have computed relate to the
-        // parameter range [t_min1, t_max1] and [t_min2, t_max2], respectively,
-        // so we scale them back to the parameter range [0, 1] that represent
-        // the entire curve.
-        Bez_point_bound  sc_bound1 = bound1;
-        sc_bound1.t_min = t_min1 + bound1.t_min * (t_max1 - t_min1);
-        sc_bound1.t_max = t_min1 + bound1.t_max * (t_max1 - t_min1);
-        pt.add_originator (Originator (B1, _xid, sc_bound1));
-
-        Bez_point_bound  sc_bound2 = bound2;
-        sc_bound2.t_min = t_min2 + bound2.t_min * (t_max2 - t_min2);
-        sc_bound2.t_max = t_min2 + bound2.t_max * (t_max2 - t_min2);
-        pt.add_originator (Originator (B2, cv._xid, sc_bound2));
-      }
-      else
-      {
-        // Set the originators with the curve x-monotone IDs.
-        pt.add_originator (Originator (B1, bound1));
-        pt.add_originator (Originator (B2, bound2));
-      }
-    }
-    pt.set_bbox (bbox);
-
-    inter_pts.push_back (pt);
-  }
-
-  // The approximation process ended OK.
-  return (true);
-}
-
-// ---------------------------------------------------------------------------
-// Compute the intersections with the given subcurve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_intersect
-    (const Self& cv,
-     Intersection_map& inter_map,
-     Bezier_cache& cache,
-     std::vector<Intersection_point_2>& ipts,
-     Self& ovlp_cv) const
-{
-  CGAL_precondition (_curve.id() <= cv._curve.id());
-
-  ipts.clear();
-
-  // In case the two x-monotone curves are subcurves of the same Bezier curve,
-  // first check if this base curve is not self-intersecting. If this is the
-  // case we can avoid any attempt of computing intersection points between
-  // the two subcurves.
-  const bool                self_intersect = (_curve.id() == cv._curve.id());
-
-  if (self_intersect)
-  {
-    if (_xid == cv._xid)
-      return (false);
-
-    if (_curve.has_no_self_intersections())
-      return (false);
-  }
-
-  // Construct the pair of curve IDs and look for it in the intersection map.
-  Curve_pair                 curve_pair (_curve.id(), cv._curve.id());
-  Intersection_map_iterator  map_iter = inter_map.find (curve_pair);
-  std::list<Point_2>         inter_pts;
-  bool                       app_ok = true;
-
-  if (map_iter != inter_map.end())
-  {
-    // Get the intersection points between the two supporting curves as stored
-    // in the map.
-    inter_pts = map_iter->second;
-  }
-  else
-  {
-    // Approximate the intersection points and store them in the map.
-    // Note that we do not store approximated self-intersections in the map,
-    // as they realte only to the pecific x-monotone curves, and not to the
-    // entire curve.
-    app_ok = _approximate_intersection_points (cv,
-                                               inter_pts);
-
-    if (app_ok && ! self_intersect)
-      inter_map[curve_pair] = inter_pts;
-  }
-
-  // Try to approximate the intersection points.
-  bool                in_range1, in_range2;
-  bool                correct_res;
-
-  if (app_ok)
-  {
-    // Approximations are computed using de Casteljau subdivision and 
-    // filtering using skewed bounding boxes. A property of these bboxes
-    // if that it can fail in the following cases: (i) there are two intersection
-    // points lying very close together, (ii) there exists an intersection point 
-    // whose multiplicity is greater than 1, or (iii) the curves overlap.
-    // If the approximation went OK, then we know that we have a simple
-    // intersection point (with multiplicity 1) if intersection point
-    // is not rational (otherwise it is unknown: at this point, an intersection point
-    // is rational if it was found as a control point during the de Casteljau subdivision)
-    // We go over the points and report the ones lying in the parameter
-    // ranges of both curves. Note that in case of self-intersections,
-    // all points we get are in the respective parameter range of the curves.
-    typename std::list<Point_2>::iterator  pit;
-    
-    for (pit = inter_pts.begin(); pit != inter_pts.end(); ++pit)
-    {
-      // Check if the point is in the range of this curve - first using
-      // its parameter bounds, and if we fail we perform an exact check.
-      if (! self_intersect)
-      {
-        in_range1 = _is_in_range (*pit, correct_res);
-      }
-      else
-      {
-        in_range1 = true;
-        correct_res = true;
-      }
-
-      if (! correct_res)
-      {
-        if (! pit->is_exact())
-          pit->make_exact (cache);
-        
-        Originator_iterator  p_org = pit->get_originator (_curve, _xid);
-        CGAL_assertion (p_org != pit->originators_end());
-        
-        in_range1 = _is_in_range (p_org->parameter(), cache);
-      }
-
-      if (! in_range1)
-        continue;
-
-      // Check if the point is in the range of the other curve - first using
-      // its parameter bounds, and if we fail we perform an exact check.
-      if (! self_intersect)
-      {
-        in_range2 = cv._is_in_range (*pit, correct_res);
-      }
-      else
-      {
-        in_range2 = true;
-        correct_res = true;
-      }
-
-      if (! correct_res)
-      {
-        if (! pit->is_exact())
-          pit->make_exact (cache);
-        
-        Originator_iterator  p_org = pit->get_originator (cv._curve, cv._xid);
-        CGAL_assertion (p_org != pit->originators_end());
-        
-        in_range2 = cv._is_in_range (p_org->parameter(), cache);
-      }
-      
-      if (in_range1 && in_range2)
-      {
-        // In case the originators of the intersection point are not marked
-        // with x-monotone identifiers, mark them now as we know in which
-        // subcurves they lie.
-        Originator_iterator  p_org1 = pit->get_originator (_curve, _xid);
-        CGAL_assertion (p_org1 != pit->originators_end());
-
-        if (p_org1->xid() == 0)
-          pit->update_originator_xid (*p_org1, _xid);
-
-        Originator_iterator  p_org2 = pit->get_originator (cv._curve, cv._xid);
-        CGAL_assertion (p_org2 != pit->originators_end());
-
-        if (p_org2->xid() == 0)
-          pit->update_originator_xid (*p_org2, cv._xid);
-
-        // The point lies within the parameter range of both curves, so we
-        // report it as a valid intersection point with multiplicity 1 or unknown.
-        ipts.push_back (Intersection_point_2 (*pit, pit->is_rational()?0:1));
-      }
-    }
-
-    // Since the apporximation went fine we cannot possibly have an overlap:
-    return (false);
-  }
-
-  // We did not succeed in isolate the approximate intersection points.
-  // We therefore resort to the exact procedure and exactly compute them.
-  bool                   do_ovlp;
-  const Intersect_list&  inter_list =
-    cache.get_intersections (_curve.id(),
-                             _curve.x_polynomial(), _curve.x_norm(),
-                             _curve.y_polynomial(), _curve.y_norm(),
-                             cv._curve.id(),
-                             cv._curve.x_polynomial(), cv._curve.x_norm(),
-                             cv._curve.y_polynomial(), cv._curve.y_norm(),
-                             do_ovlp);
-
-  if (do_ovlp)
-  {
-    // Check the case of co-inciding endpoints
-    if (left().equals (cv.left(), cache))
-    {
-      if (right().equals (cv.right(), cache))
-      {
-        // The two curves entirely overlap one another:
-        ovlp_cv = cv;
-        return (true);
-      }
-
-      Algebraic     t_right;
-      bool          is_endpoint;
-
-      if (_is_in_range (cv.right(), cache, t_right, is_endpoint))
-      {
-        CGAL_assertion (! is_endpoint);
-
-        // Case 1 - *this:   s +-----------+ t
-        //             cv:   s'+=====+ t'
-        //
-        // Take cv as the overlapping subcurve, and add originators for its
-        // right endpoint referring to *this.
-        ovlp_cv = cv;
-        ovlp_cv.right().add_originator (Originator (_curve, _xid, t_right));
-
-        return (true);
-      }
-      else if (cv._is_in_range (right(), cache, t_right, is_endpoint))
-      {
-        CGAL_assertion (! is_endpoint);
-
-        // Case 2 - *this:   s +----+ t
-        //             cv:   s'+==========+ t'
-        //
-        // Take this as the overlapping subcurve, and add originators for its
-        // right endpoint referring to cv.
-        ovlp_cv = *this;
-        ovlp_cv.right().add_originator (Originator (cv._curve, cv._xid,
-                                                    t_right));
-
-        return (true);
-      }
-
-      // In this case the two curves do not overlap, but have a common left
-      // endpoint.
-      ipts.push_back (Intersection_point_2 (left(), 0));
-      return (false);
-    }
-    else if (right().equals (cv.right(), cache))
-    {
-      Algebraic     t_left;
-      bool          is_endpoint;
-
-      if (_is_in_range (cv.left(), cache, t_left, is_endpoint))
-      {
-        CGAL_assertion (! is_endpoint);
-
-        // Case 3 - *this:   s +-----------+ t
-        //             cv:         s'+=====+ t'
-        //
-        // Take cv as the overlapping subcurve, and add originators for its
-        // left endpoint referring to *this.
-        ovlp_cv = cv;
-        ovlp_cv.left().add_originator (Originator (_curve, _xid, t_left));
-
-        return (true);
-      }
-      else if (cv._is_in_range (left(), cache, t_left, is_endpoint))
-      {
-        CGAL_assertion (! is_endpoint);
-
-        // Case 4 - *this:         s +----+ t
-        //             cv:   s'+==========+ t'
-        //
-        // Take this as the overlapping subcurve, and add originators for its
-        // left endpoint referring to cv.
-        ovlp_cv = *this;
-        ovlp_cv.left().add_originator (Originator (cv._curve, cv._xid,
-                                                   t_left));
-
-        return (true);
-      }
-
-      // In this case the two curves do not overlap, but have a common right
-      // endpoint.
-      ipts.push_back (Intersection_point_2 (right(), 0));
-      return (false);
-    }
-
-    // If we reached here, none of the endpoints coincide.
-    // Check the possible overlap scenarios.
-    Point_2         ovrp_src, ovlp_trg;
-    Algebraic       t_cv_src;
-    Algebraic       t_cv_trg;
-    bool            is_endpoint = false;
-
-    if (_is_in_range (cv._ps, cache, t_cv_src, is_endpoint) &&
-        ! is_endpoint)
-    {
-      if (_is_in_range (cv._pt, cache, t_cv_trg, is_endpoint) &&
-          ! is_endpoint)
-      {
-        // Case 5 - *this:   s +-----------+ t
-        //             cv:     s' +=====+ t'
-        //
-        // Take cv as the overlapping subcurve, and add originators for its
-        // endpoints referring to *this.
-        ovlp_cv = cv;
-        ovlp_cv._ps.add_originator (Originator (_curve, _xid, t_cv_src));
-        ovlp_cv._pt.add_originator (Originator (_curve, _xid, t_cv_trg));
-
-        return (true);
-      }
-      else
-      {
-        // Case 6 - *this:   s +-----------+ t
-        //             cv:            s' +=====+ t'
-        //
-        // Use *this as a base, and replace its source point.
-        ovlp_cv = *this;
-        ovlp_cv._ps = cv._ps;
-        ovlp_cv._ps.add_originator (Originator (_curve, _xid, t_cv_src));
-
-        // Add an originator to the target point, referring to cv:
-        CGAL_assertion_code (bool  pt_in_cv_range =)
-        cv._is_in_range (ovlp_cv._pt, cache, t_cv_trg, is_endpoint);
-        CGAL_assertion (pt_in_cv_range);
-        ovlp_cv._pt.add_originator (Originator (cv._curve, cv._xid, t_cv_trg));
-
-        return (true);
-      }
-    }
-    else if (_is_in_range (cv._pt, cache, t_cv_trg, is_endpoint) &&
-             ! is_endpoint)
-    {
-      // Case 7 - *this:      s +-----------+ t
-      //             cv:   s' +=====+ t'
-      //
-      // Use *this as a base, and replace its target point.
-      ovlp_cv = *this;
-      ovlp_cv._pt = cv._pt;
-      ovlp_cv._pt.add_originator (Originator (_curve, _xid, t_cv_trg));
-
-      // Add an originator to the source point, referring to cv:
-      CGAL_assertion_code (bool  ps_in_cv_range =)
-      cv._is_in_range (ovlp_cv._ps, cache, t_cv_src, is_endpoint);
-      CGAL_assertion (ps_in_cv_range);
-      ovlp_cv._ps.add_originator (Originator (cv._curve, cv._xid, t_cv_src));
-
-      return (true);
-    }
-    else if (cv._is_in_range (_ps, cache, t_cv_src, is_endpoint) &&
-             cv._is_in_range (_pt, cache, t_cv_trg, is_endpoint))
-    {
-      // Case 8 - *this:      s +---------+ t
-      //             cv:  s' +================+ t'
-      //
-      // Take *this as the overlapping subcurve, and add originators for its
-      // endpoints referring to cv.
-      ovlp_cv = *this;
-      ovlp_cv._ps.add_originator (Originator (cv._curve, cv._xid, t_cv_src));
-      ovlp_cv._pt.add_originator (Originator (cv._curve, cv._xid, t_cv_trg));
-
-      return (true);
-    }
-
-    // If we reached here, there are no overlaps:
-    return (false);
-  }
-
-  // Go over the points and report the ones lying in the parameter ranges
-  // of both curves.
-  Intersect_iter          iit;
-
-  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
-  {
-    if (_is_in_range (iit->s, cache) &&
-        cv._is_in_range (iit->t, cache))
-    {
-      // Construct an intersection point with unknown multiplicity.
-      Point_2                 pt (iit->x, iit->y,
-                                  true);        // Dummy parameter.
-
-      pt.add_originator (Originator (_curve, _xid, iit->s));
-      pt.add_originator (Originator (cv._curve, cv._xid, iit->t));
-
-      ipts.push_back (Intersection_point_2 (pt, 0));
-    }
-  }
-
-  // Mark that there is no overlap:
-  return (false);
-}
-
-// ---------------------------------------------------------------------------
-// Compute the exact vertical position of the point p with respect to the
-// curve.
-//
-template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
-Comparison_result
-_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_exact_vertical_position
-    (const Point_2& p,
-     bool force_exact) const
-{
-  // If it is a rational point, obtain its rational reprsentation.
-  Rat_point_2              rat_p;
-
-  if (p.is_rational())
-    rat_p = (Rat_point_2) p;
-
-  // Get a rational approximation of the parameter values at the endpoints.
-  Nt_traits                nt_traits;
-  Originator_iterator      ps_org = _ps.get_originator (_curve, _xid);
-  CGAL_assertion (ps_org != _ps.originators_end());
-  
-  Originator_iterator      pt_org = _pt.get_originator (_curve, _xid);
-  CGAL_assertion (pt_org != _pt.originators_end());
-
-  Rational                 my_t_min;
-  Rational                 my_t_max;
-
-  
-  bool      can_refine_s = ! _ps.is_exact();
-  bool      can_refine_t = ! _pt.is_exact();
-    
-  do {
-    if (CGAL::compare (ps_org->point_bound().t_max,
-                       pt_org->point_bound().t_min) == SMALLER)
-    {
-      // In case the parameter value of the source is smaller than the target's.
-      my_t_min = ps_org->point_bound().t_max;
-      my_t_max = pt_org->point_bound().t_min;
-      break;
-    }
-    else
-      if (CGAL::compare (pt_org->point_bound().t_max,
-                                     ps_org->point_bound().t_min) == SMALLER)
-    {
-      // In case the parameter value of the target is smaller than the source's.
-      my_t_min = pt_org->point_bound().t_max;
-      my_t_max = ps_org->point_bound().t_min;
-      break;
-    }
-    // Try to refine the points.
-
-    if (can_refine_s)
-      can_refine_s = _ps.refine();
-    
-    if (can_refine_t)
-      can_refine_t = _pt.refine();    
-  }
-  while(can_refine_s || can_refine_t);
-
-  // Start the subdivision process from the entire supporting curve.
-  std::list<Subcurve>      subcurves;
-  Subcurve                 init_scv;
-  Rational                 x_min, y_min, x_max, y_max;
-  bool                     no_x_ovlp;
-  Comparison_result        res_y_min, res_y_max;
-
-  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
-             std::back_inserter (init_scv.control_points));
-  init_scv.t_min = 0;
-  init_scv.t_max = 1;
-  subcurves.push_back (init_scv);
-
-  while (! subcurves.empty())
-  {
-    // Go over the list of subcurves and consider only those lying in the
-    // given [t_min, t_max] bound.
-    typename std::list<Subcurve>::iterator  iter = subcurves.begin();
-    bool                                    is_fully_in_range;
-
-    while (iter != subcurves.end())
-    {
-      if (CGAL::compare (iter->t_max, my_t_min) == SMALLER ||
-          CGAL::compare (iter->t_min, my_t_max) == LARGER)
-      {
-        // Subcurve out of bounds of the x-monotone curve we consider - erase
-        // it and continue to next subcurve.
-        subcurves.erase(iter++);
-        continue;
-      }
-        
-      // Construct the bounding box of the subcurve and compare it to
-      // the bounding box of the point.
-      iter->bbox (x_min, y_min, x_max, y_max);
-
-      if (p.is_rational())
-      {
-        no_x_ovlp = (CGAL::compare (x_min, rat_p.x()) == LARGER ||
-                     CGAL::compare (x_max, rat_p.x()) == SMALLER);
-      }
-      else
-      {
-        no_x_ovlp = (CGAL::compare (nt_traits.convert (x_min),
-                                    p.x()) == LARGER ||
-                     CGAL::compare (nt_traits.convert (x_max),
-                                    p.x()) == SMALLER);
-      }
-
-      if (no_x_ovlp)
-      {
-        // Subcurve out of x-bounds - erase it and continue to next subcurve.
-        subcurves.erase(iter++);
-        continue;
-      }
-
-      // In this case, check if there is an overlap in the y-range.
-      if (p.is_rational())
-      {
-        res_y_min = CGAL::compare (rat_p.y(), y_min);
-        res_y_max = CGAL::compare (rat_p.y(), y_max);
-      }
-      else
-      {
-        res_y_min = CGAL::compare (p.y(), nt_traits.convert (y_min));
-        res_y_max = CGAL::compare (p.y(), nt_traits.convert (y_max));
-      }
-     
-      is_fully_in_range = (CGAL::compare (iter->t_min, my_t_min) != SMALLER) &&
-                          (CGAL::compare (iter->t_max, my_t_max) != LARGER);
-
-      if (res_y_min != res_y_max || ! is_fully_in_range)
-      {
-        // Subdivide the current subcurve and replace iter with the two
-        // resulting subcurves using de Casteljau's algorithm.
-        Subcurve           scv_l, scv_r;
-
-        scv_l.t_min = iter->t_min;
-        scv_r.t_max = iter->t_max;
-        scv_l.t_max = scv_r.t_min = (iter->t_min + iter->t_max) / 2;
-
-        bisect_control_polygon_2 (iter->control_points.begin(),
-                                  iter->control_points.end(),
-                                  std::back_inserter(scv_l.control_points),
-                                  std::front_inserter(scv_r.control_points));
-
-        subcurves.insert (iter, scv_l);
-        subcurves.insert (iter, scv_r);
-        subcurves.erase(iter++);
-
-        continue;
-      }
-
-      if (res_y_min == res_y_max)
-      {
-        CGAL_assertion (res_y_min != EQUAL);
-
-        // We reached a separation, as p is either strictly above or strictly
-        // below the bounding box of the current subcurve.
-        return (res_y_min);
-      }
-
-      // If we got here without entering one of the clauses above,
-      // then iter has not been incremented yet.
-      ++iter; 
-    }
-  }
-
-  // We can reach here only if we do not force an exact result.
-  CGAL_assertion (! force_exact);
-  return (EQUAL);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
deleted file mode 100644
index b15d0d4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
+++ /dev/null
@@ -1,2458 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein        <wein at post.tau.ac.il>
-//                 Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_CIRCLE_SEGMENT_2_H
-#define CGAL_CIRCLE_SEGMENT_2_H
-
-/*! \file
- * Header file for the _Circle_segment_2<Kernel, Filter> class.
- */
-#include <CGAL/Sqrt_extension.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Handle_for.h>
-#include <list>
-#include <map>
-#include <ostream>
-
-namespace CGAL {
-
-// Forward declaration:
-template <class NumberType_, bool Filter_> class _One_root_point_2;
-
-/*! \class
- * Representation of a point whose coordinates are one-root numbers.
- */
-template <class NumberType_, bool Filter_>
-class _One_root_point_2_rep //: public Ref_counted
-{
-  friend class _One_root_point_2<NumberType_, Filter_>;
-
-public:
-
-  typedef NumberType_                               NT;
-  typedef _One_root_point_2_rep<NT, Filter_>        Self;
-  typedef Sqrt_extension<NT,NT,Tag_true,Boolean_tag<Filter_> >    CoordNT;
-
-private:
-
-  CoordNT       _x;            // The coordinates.
-  CoordNT       _y;
-
-public:
-
-  /*! Default constructor. */
-  _One_root_point_2_rep () :
-    _x (0),
-    _y (0)
-  {}
-
-  /*! Constructor of a point with one-root coefficients. 
-     This constructor of a point can also be used with rational coefficients
-     thanks to convertor of CoordNT. */
-  _One_root_point_2_rep (const CoordNT& x, const CoordNT& y) :
-    _x (x),
-    _y (y)
-  {}
-};
-
-/*! \class
- * A handle for a point whose coordinates are one-root numbers.
- */
-template <class NumberType_, bool Filter_>
-class _One_root_point_2 :
-  public Handle_for<_One_root_point_2_rep<NumberType_, Filter_> >
-{
-public:
-
-  typedef NumberType_                           NT;
-  typedef _One_root_point_2<NT, Filter_>        Self;
-
-private:
-
-  typedef _One_root_point_2_rep<NT, Filter_>    Point_rep;
-  typedef Handle_for<Point_rep>                 Point_handle;
-
-public:
-
-  typedef typename Point_rep::CoordNT           CoordNT;
-
-  /*! Default constructor. */
-  _One_root_point_2 () :
-    Point_handle (Point_rep())
-  {}
-
-  /*! Copy constructor. */
-  _One_root_point_2 (const Self& p) :
-    Point_handle (p)
-  {}
-
-  /*! Constructor of a point with one-root coefficients. 
-     This constructor of a point can also be used with rational coefficients
-     thanks to convertor of CoordNT. */
-  _One_root_point_2 (const CoordNT& x, const CoordNT& y) :
-    Point_handle (Point_rep (x, y))
-  {}
-
-  /*! Get the x-coordinate. */
-  const CoordNT& x () const
-  {
-    return (this->ptr()->_x);
-  }
-
-  /*! Get the y-coordinate. */
-  const CoordNT& y () const
-  {
-    return (this->ptr()->_y);
-  }
-
-  /*! Check for equality. */
-  bool equals (const Self& p) const
-  {
-    if (this->identical (p))
-      return (true);
-
-    return (CGAL::compare (this->ptr()->_x, p.ptr()->_x) == EQUAL &&
-            CGAL::compare (this->ptr()->_y, p.ptr()->_y) == EQUAL);
-  }
-/*
-  bool operator != (const Self& p) const
-  {
-    return !equals(p);
-  }
-*/
-  /*! Set the point coordinates. */
-  void set (const NT& x, const NT& y)
-  {
-    this->copy_on_write();
-    this->ptr()->_x = CoordNT (x);
-    this->ptr()->_y = CoordNT (y);
-    return;
-  }
-
-  /*! Set the point coordinates. */
-  void set (const CoordNT& x, const CoordNT& y)
-  {
-    this->copy_on_write();
-    this->ptr()->_x = x;
-    this->ptr()->_y = y;
-    return;
-  }
-};
-
-/*!
- * Exporter for conic arcs.
- */
-template <class NT, bool Filter>
-std::ostream&
-operator<< (std::ostream& os,
-            const _One_root_point_2<NT, Filter>& p)
-{
-  os << CGAL::to_double(p.x()) << ' ' << CGAL::to_double(p.y());
-  return (os);
-}
-
-/*
-template <class NT, bool Filter>
-std::istream & operator >> (std::istream & is, 
-                            _One_root_point_2<NT, Filter>& p)
-{
-  typename _One_root_point_2<NT, Filter>::CoordNT ort1,ort2;
-  is >> ort1 >> ort2;
-  p=_One_root_point_2<NT, Filter>(ort1,ort2);
-  return is;
-}
-*/
-
-/*! \class
- * Representation of a circle, a circular arc or a line segment.
- */
-template <class Kernel_, bool Filter_>
-class _Circle_segment_2
-{
-public:
-
-  typedef Kernel_                                          Kernel;
-  typedef typename Kernel::FT                              NT;
-  typedef _One_root_point_2<NT, Filter_>                   Point_2;
-  typedef typename Kernel::Circle_2                        Circle_2;
-  typedef typename Kernel::Segment_2                       Segment_2;
-  typedef typename Kernel::Line_2                          Line_2;
-
-protected:
-
-  typedef typename Point_2::CoordNT                        CoordNT;
-
-  // Data members:
-  Line_2        _line;        // The supporting line (for line segments).
-  Circle_2      _circ;        // The supporting circle (for circular arcs).
-  bool          _is_full;     // Whether we have a full circle.
-  bool          _has_radius;  // Is the radius (not just the squared radius)
-                              // explicitly specified).
-  NT            _radius;      // The radius, in case it is specified.
-  Point_2       _source;      // The source point.
-  Point_2       _target;      // The target point.
-  Orientation   _orient;      // The orientation (COLLINEAR for line segments).
-
-public:
-
-  /*! Default constructor. */
-  _Circle_segment_2 () :
-    _is_full (false),
-    _has_radius (false),
-    _orient (COLLINEAR)
-  {}
-
-  /*!
-   * Constructor from a line segment.
-   * \param seg The segment.
-   */
-  _Circle_segment_2 (const Segment_2& seg) :
-    _line (seg),
-    _is_full (false),
-    _has_radius (false),
-    _source (seg.source().x(), seg.source().y()),
-    _target (seg.target().x(), seg.target().y()),
-    _orient (COLLINEAR)
-  {}
-
-  /*!
-  * Constructor from of a line segment.
-   * \param ps The source point.
-   * \param pt The target point.
-   */
-  _Circle_segment_2 (const typename Kernel::Point_2& ps,
-                     const typename Kernel::Point_2& pt) :
-    _line (ps, pt),
-    _is_full (false),
-    _has_radius (false),
-    _source (ps.x(), ps.y()),
-    _target (pt.x(), pt.y()),
-    _orient (COLLINEAR)
-  {}
-
-  /*!
-   * Constructor of a segment, given a supporting line and two endpoints,
-   * which need not necessarily have rational coordinates.
-   * \param line The supporting line.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre Both endpoints lie on the supporting line.
-   */
-  _Circle_segment_2 (const Line_2& line,
-                     const Point_2& source, const Point_2& target) :
-    _line (line),
-    _is_full (false),
-    _has_radius (false),
-    _source (source),
-    _target (target),
-    _orient (COLLINEAR)
-  {
-    CGAL_precondition (CGAL::compare (source.x()*line.a() + line.c(),
-                                      -source.y()*line.b()) == EQUAL);
-
-    CGAL_precondition (CGAL::compare (target.x()*line.a() + line.c(),
-                                      -target.y()*line.b()) == EQUAL);
-  }
-
-  /*!
-   * Constructor from a circle.
-   * \param circ The circle.
-   */
-  _Circle_segment_2 (const Circle_2& circ) :
-    _circ (circ),
-    _is_full (true),
-    _has_radius (false),
-    _orient (circ.orientation())
-  {
-    CGAL_assertion (_orient != COLLINEAR);
-  }
-
-  /*!
-   * Constructor from a circle.
-   * \param c The circle center.
-   * \param r The radius.
-   * \param orient The orientation of the circle.
-   */
-  _Circle_segment_2 (const typename Kernel::Point_2& c,
-                     const NT& r,
-                     Orientation orient = COUNTERCLOCKWISE) :
-    _circ (c, r*r, orient),
-    _is_full (true),
-    _has_radius (true),
-    _radius (r),
-    _orient (orient)
-  {
-    CGAL_assertion (orient != COLLINEAR);
-  }
-
-  /*!
-   * Constructor of a circular arc, given a supporting circle and two
-   * endpoints, which need not necessarily have rational coordinates.
-   * The orientation of the circle determines the orientation of the arc.
-   * \param circ The supporting circle.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre Both endpoints lie on the supporting circle.
-   */
-  _Circle_segment_2 (const Circle_2& circ,
-                     const Point_2& source, const Point_2& target) :
-    _circ (circ),
-    _is_full (false),
-    _has_radius (false),
-    _source (source),
-    _target (target),
-    _orient (circ.orientation())
-  {
-    CGAL_assertion (_orient != COLLINEAR);
-
-    CGAL_precondition
-      (CGAL::compare (CGAL::square (source.x() - circ.center().x()),
-                      circ.squared_radius() -
-                      CGAL::square (source.y() - circ.center().y())) == EQUAL);
-
-    CGAL_precondition
-      (CGAL::compare (CGAL::square (target.x() - circ.center().x()),
-                      circ.squared_radius() -
-                      CGAL::square (target.y() - circ.center().y())) == EQUAL);
-  }
-
-  /*!
-   * Constructor of a circular arc, given a supporting circle and two
-   * endpoints, which need not necessarily have rational coordinates.
-   * \param c The circle center.
-   * \param r The radius.
-   * \param orient The orientation of the circle.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre Both endpoints lie on the supporting circle.
-   */
-  _Circle_segment_2 (const typename Kernel::Point_2& c,
-                     const NT& r, Orientation orient,
-                     const Point_2& source, const Point_2& target) :
-    _circ (c, r*r, orient),
-    _is_full (false),
-    _has_radius (true),
-    _radius (r),
-    _source (source),
-    _target (target),
-    _orient (orient)
-  {
-    CGAL_assertion (orient != COLLINEAR);
-
-    CGAL_precondition
-      (CGAL::compare (CGAL::square (source.x() - c.x()),
-                      CGAL::square (r) -
-                      CGAL::square (source.y() - c.y())) == EQUAL);
-
-    CGAL_precondition
-      (CGAL::compare (CGAL::square (target.x() - c.x()),
-                      CGAL::square (r) -
-                      CGAL::square (target.y() - c.y())) == EQUAL);
-  }
-
-  /*!
-   * Constructor of a circular arc, from the given three points, in case of
-   * three collinear points, a segment will be constructed.            
-   * \param p1 The arc source.
-   * \param p2 A point in the interior of the arc.
-   * \param p3 The arc target.
-   * \pre p1 and p3 are not equal.
-   */
-   _Circle_segment_2 (const typename Kernel::Point_2& p1,
-                      const typename Kernel::Point_2& p2,
-                      const typename Kernel::Point_2& p3) :
-     _is_full(false),
-     _has_radius(false),
-     _source(p1.x(), p1.y()),
-     _target(p3.x(), p3.y())
-  {
-    // Set the source and target.
-    NT          x1 = p1.x();
-    NT          y1 = p1.y();
-    NT          x2 = p2.x();
-    NT          y2 = p2.y();
-    NT          x3 = p3.x();
-    NT          y3 = p3.y();
-
-  
-    // Make sure that the source and the taget are not the same.
-    CGAL_precondition (Kernel().compare_xy_2_object() (p1, p3) != EQUAL);
-
-    // Compute the lines: A1*x + B1*y + C1 = 0,
-    //               and: A2*x + B2*y + C2 = 0,
-    // where:
-    const NT  _two  = 2;
-
-    const NT  A1 = _two*(x1 - x2);
-    const NT  B1 = _two*(y1 - y2);
-    const NT  C1 = CGAL::square(y2) - CGAL::square(y1) + 
-                   CGAL::square(x2) - CGAL::square(x1);
-
-    const NT  A2 = _two*(x2 - x3);
-    const NT  B2 = _two*(y2 - y3);
-    const NT  C2 = CGAL::square(y3) - CGAL::square(y2) +
-                   CGAL::square(x3) - CGAL::square(x2);
-
-    // Compute the coordinates of the intersection point between the
-    // two lines, given by (Nx / D, Ny / D), where:
-    const NT  Nx = B1*C2 - B2*C1;
-    const NT  Ny = A2*C1 - A1*C2;
-    const NT  D = A1*B2 - A2*B1;
-
-    // Make sure the three points are not collinear.
-    const bool  points_collinear = (CGAL::sign (D) == ZERO);
-
-    if (points_collinear)
-    {
-      _line  = Line_2(p1, p3);
-      _orient = COLLINEAR;
-      return;
-    }
-
-    // The equation of the underlying circle is given by:
-    
-    NT x_center = Nx / D;
-    NT y_center = Ny / D;
-
-    typename Kernel::Point_2 circ_center(x_center, y_center);
-
-
-    
-    NT sqr_rad = (CGAL::square(D*x2 - Nx) + CGAL::square(D*y2 - Ny)) / 
-                 CGAL::square(D);
-
-    // Determine the orientation: If the mid-point forms a left-turn with
-    // the source and the target points, the orientation is positive (going
-    // counterclockwise).
-    // Otherwise, it is negative (going clockwise).
-    Kernel                         ker;
-    typename Kernel::Orientation_2 orient_f = ker.orientation_2_object();
- 
-    if (orient_f(p1, p2, p3) == LEFT_TURN)
-      _orient = COUNTERCLOCKWISE;
-    else
-      _orient = CLOCKWISE;
-
-     _circ = Circle_2(circ_center, sqr_rad, _orient);
-  }
-
-  /*!
-   * Get the orientation of the curve. 
-   * \return COLLINEAR in case of a line segment,
-   *         CLOCKWISE or COUNTERCLOCKWISE for circular curves.
-   */
-  inline Orientation orientation () const
-  {
-    return (_orient);
-  }
-
-  /*! Check if the arc is linear. */
-  inline bool is_linear () const
-  {
-    return (_orient == COLLINEAR);
-  }
-
-  /*! Check if the arc is circular. */
-  inline bool is_circular () const
-  {
-    return (_orient != COLLINEAR);
-  }
-
-  /*!
-   * Get the supporting line.
-   * \pre The curve orientation is COLLINEAR.
-   */
-  const Line_2& supporting_line () const
-  {
-    CGAL_precondition (_orient == COLLINEAR);
-    return (_line);
-  }
-
-  /*!
-   * Get the supporting circle.
-   * \pre The curve orientation is not COLLINEAR.
-   */
-  const Circle_2& supporting_circle () const
-  {
-    CGAL_precondition (_orient != COLLINEAR);
-    return (_circ);
-  }
-
-  /*! Check if the curve is a full circle. */
-  bool is_full () const
-  {
-    return (_is_full);
-  }
-
-  /*!
-   * Get the source point.
-   * \pre The curve is not a full circle.
-   */
-  const Point_2& source () const
-  {
-    CGAL_precondition (! _is_full);
-    return (_source);
-  }
-
-  /*!
-   * Get the target point.
-   * \pre The curve is not a full circle.
-   */
-  const Point_2& target () const
-  {
-    CGAL_precondition (! _is_full);
-    return (_target);
-  }
-
-  /*!
-   * Get the vertical tangency points the arc contains.
-   * \param vpts Output: The vertical tagnecy points.
-   * \pre The curve is circular.
-   * \return The number of points (0, 1, or 2).
-   */
-  unsigned int vertical_tangency_points (Point_2 *vpts) const
-  {
-    CGAL_precondition (_orient != COLLINEAR);
-    unsigned int  n_vpts = 0;
-
-    if (_is_full)
-    {
-      // In case of a full circle, create both vertical tangency points:
-      const NT&     x0 = _circ.center().x();
-      const NT&     y0 = _circ.center().y();
-      CoordNT       xv_left;
-      CoordNT       xv_right;
-
-      if (_has_radius)
-      {
-        // In case the radius is explicitly given:
-        xv_left = CoordNT (x0 - _radius);
-        xv_right = CoordNT (x0 + _radius);
-      }
-      else
-      {
-        // In case only the squared root is given:
-        xv_left = CoordNT (x0, NT(-1), _circ.squared_radius());
-        xv_right = CoordNT (x0, NT(1), _circ.squared_radius());
-      }
-
-      vpts[0] = Point_2 (xv_left, y0);
-      vpts[1] = Point_2 (xv_right, y0);
-      return (2);
-    }
-
-    if (_orient == COUNTERCLOCKWISE)
-    {
-      // Compute the vertical tangency points for the arc:
-      n_vpts = _ccw_vertical_tangency_points (_source, _target, vpts);
-    }
-    else
-    {
-      // Compute the vertical tangency points for the opposite arc:
-      n_vpts = _ccw_vertical_tangency_points (_target, _source, vpts);
-
-      // Swap their order, if necessary.
-      if (n_vpts == 2)
-      {
-        Point_2   temp = vpts[0];
-        vpts[0] = vpts[1];
-        vpts[1] = temp;
-      }
-    }
-
-    return (n_vpts);
-  }
-
-private:
-
-  /*!
-   * Get the vertical tangency points the arc contains, assuming it is
-   * counterclockwise oreinted.
-   * \param vpts Output: The vertical tagnecy points.
-   * \return The number of points (0, 1, or 2).
-   */
-  unsigned int _ccw_vertical_tangency_points (const Point_2& src,
-                                              const Point_2& trg,
-                                              Point_2 *vpts) const
-  {
-    unsigned int  n_vpts = 0;
-    const NT&     x0 = _circ.center().x();
-    const NT&     y0 = _circ.center().y();
-    int           qs = _quart_index (src);
-    int           qt = _quart_index (trg);
-  
-    if (qs == qt)
-    {
-      if ((qs == 0 || qs == 1) && CGAL::compare (src.x(), trg.x()) == LARGER)
-        // We have an x-monotone arc lying on the upper half of the circle:
-        return (0);
-      
-      if ((qs == 2 || qs == 3) && CGAL::compare (src.x(), trg.x()) == SMALLER)
-        // We have an x-monotone arc lying on the lower half of the circle:
-        return (0);
-    }
-
-    // Make sure the target quarter is larger than the source quarter, by 
-    // adding 4 to its index, if necessary.
-    if (qt <= qs)
-      qt += 4;
-
-    // Start traversing the quarter-planes and collect the vertical tangency
-    // points we encounter.
-    while (qs < qt)
-    {
-      if ((qs % 4) == 1)
-      {
-        // We collect the left tangency point when going from Q[1] to Q[2]:
-        if (CGAL::compare (x0, trg.x()) != LARGER ||
-            CGAL::compare (y0, trg.y()) != EQUAL)
-        {
-          if (_has_radius)
-            vpts[n_vpts] = Point_2 (CoordNT (x0 - _radius), y0);
-          else
-            vpts[n_vpts] = Point_2 (CoordNT (x0, NT(-1), _circ.squared_radius()),
-                                             y0);
-
-          n_vpts++;
-        }
-      }
-      else if ((qs % 4) == 3)
-      {
-        // We collect the right tangency point when going from Q[3] to Q[0]:
-        if (CGAL::compare (x0, trg.x()) != SMALLER ||
-            CGAL::compare (y0, trg.y()) != EQUAL)
-        {
-          if (_has_radius)
-            vpts[n_vpts] = Point_2 (CoordNT (x0 + _radius), y0);
-          else
-            vpts[n_vpts] = Point_2 (CoordNT (x0, NT(1), _circ.squared_radius()),
-                                             y0);
-          n_vpts++;
-        }
-      }
-
-      qs++;
-    }
-
-    return (n_vpts);
-  }
-
-  /*!
-   * Get the index of the quarter-plane containing the given point,
-   * where the circle center is considered to be the origin.
-   */
-  int _quart_index (const Point_2& p) const
-  {
-    // The plane looks like:
-    //
-    //      Q[1] :  |   Q[0]:
-    //      x <= 0  |   x >  0
-    //      y >  0  |   y >= 0
-    //    ----------+-----------
-    //      Q[2] :  |   Q[3]:
-    //      x <  0  |   x >= 0
-    //      y <= 0  |   y <  0
-    //
-    const CGAL::Sign   sign_x = CGAL::sign (p.x() - _circ.center().x());
-    const CGAL::Sign   sign_y = CGAL::sign (p.y() - _circ.center().y());
-
-    if (sign_x == POSITIVE)
-    {
-      return ((sign_y == NEGATIVE) ? 3 : 0);
-    }
-    else if (sign_x == NEGATIVE)
-    {
-      return ((sign_y == POSITIVE) ? 1 : 2);
-    }
-
-    CGAL_assertion (sign_y != ZERO);
-    return ((sign_y == POSITIVE) ? 1 : 3);
-  }
-};
-
-/*!
- * Exporter for line segments and circular arcs.
- */
-template <class Kernel, bool Filter>
-std::ostream& 
-operator<< (std::ostream& os, 
-            const _Circle_segment_2<Kernel, Filter>& c)
-{
-  if (c.orientation() == COLLINEAR)
-  {
-    os<< "segment: " << c.source() << " -> " << c.target();
-  }
-  else
-  {
-    if(!c.is_full())
-    {
-      os << "circular arc: " << c.supporting_circle() << ' '
-         << c.source() << " -> " << c.target();
-    }
-    else
-    {
-      os << "circular arc: " << c.supporting_circle();
-    }
-  }
-
-  return (os);
-}
-
-/*! \class
- * Representation of an x-monotone circular arc.
- */
-template <class Kernel_, bool Filter_>
-class _X_monotone_circle_segment_2
-{
-public:
-
-  typedef Kernel_                                          Kernel;
-  typedef _X_monotone_circle_segment_2<Kernel, Filter_>    Self;
-  typedef typename Kernel::FT                              NT;
-  typedef _One_root_point_2<NT, Filter_>                   Point_2;
-  typedef typename Kernel::Circle_2                        Circle_2;
-  typedef typename Kernel::Line_2                          Line_2;
-  typedef typename Point_2::CoordNT                        CoordNT;
-
-  // Type definition for the intersection points mapping.
-  typedef std::pair<unsigned int, unsigned int>   Curve_id_pair;
-  typedef unsigned int                            Multiplicity;
-  typedef std::pair<Point_2,Multiplicity>         Intersection_point_2;
-  typedef std::list<Intersection_point_2>         Intersection_list;
-
-  /*!
-   * \struct Less functor for Curve_id_pair.
-   */
-  struct Less_id_pair
-  {
-    bool operator() (const Curve_id_pair& ip1, const Curve_id_pair& ip2) const
-    {
-      // Compare the pairs of IDs lexicographically.
-      return (ip1.first < ip2.first ||
-              (ip1.first == ip2.first && ip1.second < ip2.second));
-    }
-  };
-
-  typedef std::map<Curve_id_pair,
-                   Intersection_list,
-                   Less_id_pair>                  Intersection_map;
-  typedef typename Intersection_map::value_type   Intersection_map_entry;
-  typedef typename Intersection_map::iterator     Intersection_map_iterator;
-
-protected:
-
-  NT           _first;       // The x-coordinate of the circle center.
-                             // Or: the coefficient of x in the line equation.
-
-  NT           _second;      // The y-coordinate of the circle center.
-                             // Or: the coefficient of y in the line equation.
-
-  NT           _third;       // The squared radius of the supporting circle.
-                             // Or: the free coefficient in the line equation.
-  
-  Point_2      _source;      // The source point.
-  Point_2      _target;      // The target point.
-
-  enum {
-    IS_DIRECTED_RIGHT_MASK = 1,
-    IS_VERTICAL_SEGMENT_MASK = 2,
-    COUNTERCLOCKWISE_CODE = 4,
-    CLOCKWISE_CODE = 8,
-    ORIENTATION_MASK = 4 + 8,
-    INDEX_SHIFT_BITS = 4
-  };
-
-  unsigned int _info;        // A bit vector, where:
-                             // Bit 0 (the LSB): marks if the arc is directed
-                             //                  from left to right.
-                             // Bit 1: marks if the arc is a vertical segment.
-                             // Bits 2-3: mark the orientation.
-                             // The rest of the bits represent the curve index.
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  _X_monotone_circle_segment_2 () :
-    _first(), 
-    _second(),
-    _third(),
-    _source(), _target(),
-    _info (0)
-  {}
-
-  /*!
-   * Construct an arc from a line segment.
-   * \param line The supporting line.
-   * \param source The source point.
-   * \param target The target point.
-   */
-  _X_monotone_circle_segment_2 (const Line_2& line,
-                                const Point_2& source, const Point_2& target,
-                                unsigned int index = 0) :
-    _first (line.a()),
-    _second (line.b()),
-    _third (line.c()),
-    _source (source), 
-    _target(target),
-    _info (index << INDEX_SHIFT_BITS)
-  {
-    // Check if the segment is directed left or right:
-    Comparison_result   res = CGAL::compare (source.x(), target.x());
-
-    if (res == EQUAL)
-    {
-      CGAL_precondition (CGAL::sign(_second) == ZERO);
-
-      // We have a vertical segment - compare the points by their
-      // y-coordinates:
-      _info = (_info | IS_VERTICAL_SEGMENT_MASK);
-      res = CGAL::compare (source.y(), target.y());
-    }
-
-    CGAL_precondition (res != EQUAL);
-    if (res == SMALLER)
-      _info = (_info | IS_DIRECTED_RIGHT_MASK);
-  }
-
-  /*!
-   * Construct a segment arc from two kernel points
-   * \param source the source point.
-   * \ param target the target point.
-   * \pre source and target are not equal.
-   */
-  _X_monotone_circle_segment_2 (const typename Kernel::Point_2& source,
-                                const typename Kernel::Point_2& target) :
-    _source(source.x(), source.y()),
-    _target(target.x(), target.y()),
-    _info (0)
-  {
-    Line_2 line(source, target);
-    _first  = line.a();
-    _second = line.b();
-    _third  = line.c();
-    
-    // Check if the segment is directed left or right:
-    Comparison_result   res = CGAL::compare (source.x(), target.x());
-
-    if (res == EQUAL)
-    {
-      CGAL_precondition (CGAL::sign(_second) == ZERO);
-
-      // We have a vertical segment - compare the points by their
-      // y-coordinates:
-      _info = (_info | IS_VERTICAL_SEGMENT_MASK);
-      res = CGAL::compare (source.y(), target.y());
-    }
-
-    CGAL_precondition (res != EQUAL);
-    if (res == SMALLER)
-      _info = (_info | IS_DIRECTED_RIGHT_MASK);
-  }
-     
-
-  /*! 
-   * Construct a circular arc.
-   * \param line The supporting line.
-   * \param source The source point.
-   * \param target The target point.
-   * \param orient The orientation of the arc.
-   */
-  _X_monotone_circle_segment_2 (const Circle_2& circ,
-                                const Point_2& source, const Point_2& target,
-                                Orientation orient,
-                                unsigned int index = 0) :
-    _first (circ.center().x()),
-    _second (circ.center().y()),
-    _third (circ.squared_radius()),
-    _source (source), 
-    _target(target),
-    _info (index << INDEX_SHIFT_BITS)
-  {
-    // Check if the segment is directed left or right:
-    Comparison_result   res = CGAL::compare (source.x(), target.x());
-
-    CGAL_precondition (res != EQUAL);
-    if (res == SMALLER)
-      _info = (_info | IS_DIRECTED_RIGHT_MASK);
-
-    // Set the orientation.
-    CGAL_precondition (orient != COLLINEAR);
-    if (orient == COUNTERCLOCKWISE)
-      _info = (_info | COUNTERCLOCKWISE_CODE);
-    else
-      _info = (_info | CLOCKWISE_CODE);
-  }
-
-  /*! Check if the arc is linear. */
-  inline bool is_linear () const
-  {
-    return ((_info & ORIENTATION_MASK) == 0);
-  }
-
-  /*! Check if the arc is circular. */
-  inline bool is_circular () const
-  {
-    return ((_info & ORIENTATION_MASK) != 0);
-  }
-
-  /*!
-   * Get the supporting line. 
-   * \pre The arc is linear (a line segment).
-   */
-  Line_2 supporting_line () const
-  {
-    CGAL_precondition (is_linear());
-
-    return (Line_2 (a(), b(), c()));
-  }
-
-  /*!
-   * Get the supporting circle. 
-   * \pre The arc is circular.
-   */
-  Circle_2 supporting_circle () const
-  {
-    CGAL_precondition (is_circular());
-
-    typename Kernel::Point_2  center (x0(), y0());
-    return (Circle_2 (center , sqr_r(), orientation()));
-  }
-
-  /*! Get the source point. */
-  inline const Point_2& source () const
-  {
-    return (_source);
-  }
-
-  /*! Get the target point. */
-  inline const Point_2& target () const
-  {
-    return (_target);
-  }
-
-  /*! True if the arc is directed right, false otherwise. */
-  bool is_directed_right () const
-  {
-    return ((_info & IS_DIRECTED_RIGHT_MASK) != 0);
-  }
-
-  /*! Get the left endpoint of the arc. */
-  inline const Point_2& left () const
-  {
-    return (((_info & IS_DIRECTED_RIGHT_MASK) != 0) ? _source : _target);
-  }
-
-  /*! Get the right endpoint of the arc. */
-  inline const Point_2& right () const
-  {
-    return (((_info & IS_DIRECTED_RIGHT_MASK) != 0) ? _target : _source);
-  }
-
-  /*!
-   * Check whether the given point is in the x-range of the arc.
-   */
-  bool is_in_x_range (const Point_2& p) const
-  {
-    Comparison_result    res = CGAL::compare (p.x(), left().x());
-
-    if (res == SMALLER)
-      return (false);
-    else if (res == EQUAL)
-      return (true);
-
-    return (CGAL::compare (p.x(), right().x()) != LARGER);
-  }
-
-  /*! Check if the arc is a vertical segment. */
-  inline bool is_vertical () const
-  {
-    return ((_info & IS_VERTICAL_SEGMENT_MASK) != 0);
-  }
-
-  /*! Get the orientation of the arc. */ 
-  inline Orientation orientation() const
-  {
-    unsigned int   _or = (_info & ORIENTATION_MASK);
-
-    if (_or == COUNTERCLOCKWISE_CODE)
-      return (CGAL::COUNTERCLOCKWISE);
-    else if (_or == CLOCKWISE_CODE)
-      return (CGAL::CLOCKWISE);
-
-    CGAL_assertion (_or == 0);
-    return (CGAL::COLLINEAR);
-  }
-
-  /*!
-   * Check the position of a given point with respect to the arc.
-   */
-  Comparison_result point_position (const Point_2& p) const
-  {
-    if (is_linear())
-      return (_line_point_position (p));
-    else
-      return (_circ_point_position (p));
-  }
-
-
-  /*!
-   * Compare the two arcs to the right of their intersection point.
-   */
-  Comparison_result compare_to_right (const Self& cv, const Point_2& p) const
-  {
-    if (is_linear())
-    {
-      if (cv.is_linear())
-        return (_lines_compare_to_right (cv, p));
-      
-      Comparison_result   res = cv._circ_line_compare_to_right (*this, p);
-      
-      if (res != EQUAL)
-        res = (res == SMALLER) ? LARGER : SMALLER;
-
-      return (res);
-    }
-    else
-    {
-      if (cv.is_linear())
-        return (_circ_line_compare_to_right (cv, p));
-
-      return (_circs_compare_to_right (cv, p));
-    }
-  }
-
-  /*!
-   * Compare the two arcs to the left of their intersection point.
-   */
-  Comparison_result compare_to_left (const Self& cv, const Point_2& p) const
-  {
-    if (is_linear())
-    {
-      if (cv.is_linear())
-        return (_lines_compare_to_left (cv, p));
-      
-      Comparison_result   res = cv._circ_line_compare_to_left (*this, p);
-      
-      if (res != EQUAL)
-        res = (res == SMALLER) ? LARGER : SMALLER;
-
-      return (res);
-    }
-    else
-    {
-      if (cv.is_linear())
-        return (_circ_line_compare_to_left (cv, p));
-
-      return (_circs_compare_to_left (cv, p));
-    }
-  }
-
-  /*!
-   * Check whether the two arcs have the same supporting curve.
-   */
-  bool has_same_supporting_curve (const Self& cv) const
-  {
-    // Check if the curve indices are the same.
-    if (_index() != 0 && _index() == cv._index())
-      return (true);
-
-    // Make sure that the supporting curves are of the same type.
-    if (is_linear() && ! cv.is_linear())
-      return (false);
-
-    if (! is_linear() && cv.is_linear())
-      return (false);
-
-    // Compare the curve coefficients.
-    if (! is_linear())
-    {
-      // The two circles must have the same center and the same radius.
-      return (CGAL::compare (x0(), cv.x0()) == EQUAL &&
-              CGAL::compare (y0(), cv.y0()) == EQUAL &&
-              CGAL::compare (sqr_r(), cv.sqr_r()) == EQUAL);
-    }
-
-    // Compare the line equations: Note that these may be scaled.
-    NT    fact1;
-    NT    fact2;
-
-    if (is_vertical())
-    {
-      if (! cv.is_vertical())
-        return (false);
-
-      fact1 = a();
-      fact2 = cv.a();
-    }
-    else
-    {
-      fact1 = b();
-      fact2 = cv.b();
-    }
-
-    return (CGAL::compare (fact2*a(), fact1*cv.a()) == EQUAL &&
-            CGAL::compare (fact2*b(), fact1*cv.b()) == EQUAL &&
-            CGAL::compare (fact2*c(), fact1*cv.c()) == EQUAL);
-  }
-
-  /*!
-   * Check if the two curves are equal.
-   */
-  bool equals (const Self& cv) const
-  {
-    if (! this->has_same_supporting_curve (cv))
-      return (false);
-
-    if (is_linear())
-    {
-      // In case of line segments we can swap the source and target:
-      return ((_source.equals (cv._source) && _target.equals (cv._target)) ||
-              (_source.equals (cv._target) && _target.equals (cv._source)));
-    }
-
-    // Once again, opposite circular arcs are considered to be equal:
-    return ((orientation() == cv.orientation() &&
-             _source.equals (cv._source) && _target.equals (cv._target)) ||
-            (orientation() != cv.orientation() &&
-             _source.equals (cv._target) && _target.equals (cv._source)));
-  }
-
-  /*!
-   * Split the curve at a given point into two sub-arcs.
-   */
-  void split (const Point_2& p, Self& c1, Self& c2) const
-  {
-    // Copy the properties of this arc to the sub-arcs.
-    c1 = *this;
-    c2 = *this;
-
-    // Change the endpoint, such that c1 lies to the right of c2:
-    if (is_directed_right())
-    {
-      c1._target = p;
-      c2._source = p;
-    }
-    else
-    {
-      c1._source = p;
-      c2._target = p;
-    }
-
-    return;
-  }
-
-  /*!
-   * Compute the intersections between the two arcs or segments.
-   */
-  template <class OutputIterator>
-  OutputIterator intersect (const Self& cv, OutputIterator oi,
-                            Intersection_map *inter_map = NULL) const
-  {
-    // First check whether the two arcs have the same supporting curve.
-    if (has_same_supporting_curve (cv))
-    {
-      // Check for overlaps between the two arcs.
-      Self    overlap;
-
-      if (_compute_overlap (cv, overlap))
-      {
-        // There can be just a single overlap between two x-monotone arcs:
-        *oi = CGAL::make_object (overlap);
-        ++oi;
-        return (oi);
-      }
-
-      // In case there is not overlap and the supporting curves are the same,
-      // there cannot be any intersection points, unless the two arcs share
-      // a common end point.
-      // Note that in this case we do not define the multiplicity of the
-      // intersection points we report.
-      unsigned int  mult = 0;
-      if (left().equals (cv.left()) || left().equals(cv.right()))
-      {
-        *oi = CGAL::make_object (std::make_pair (left(), mult));
-        ++oi;
-      }
-
-      if (right().equals (cv.right()) || right().equals(cv.left()))
-      {
-        *oi = CGAL::make_object (std::make_pair (right(), mult));
-        ++oi;
-      }
-
-      return (oi);
-    }
-
-    // Before computing the intersection points between the two supporting
-    // curves, check if their intersection has already been computed and
-    // cached.
-    Curve_id_pair                id_pair;
-    Intersection_map_iterator    map_iter;
-    Intersection_list            inter_list;
-    bool                         invalid_ids = false;
-
-    if (inter_map != NULL && _index() != 0 && cv._index() != 0)
-    {
-      if (_index() < cv._index())
-        id_pair = Curve_id_pair (_index(), cv._index());
-      else
-        id_pair = Curve_id_pair (cv._index(), _index());
-      
-      map_iter = inter_map->find (id_pair);
-    }
-    else
-    {
-      // In case one of the IDs is invalid, we do not look in the map neither
-      // we cache the results.
-      if (inter_map != NULL)
-        map_iter = inter_map->end();
-      invalid_ids = true;
-    }
-
-    if (inter_map == NULL || map_iter == inter_map->end())
-    {
-      // Compute the intersections points between the two supporting curves.
-      if (is_linear())
-      {
-        if (cv.is_linear())
-          _lines_intersect (cv, inter_list);
-        else
-          cv._circ_line_intersect (*this, inter_list);
-      }
-      else
-      {
-        if (cv.is_linear())
-          _circ_line_intersect (cv, inter_list);
-        else
-          _circs_intersect (cv, inter_list);
-      }
-
-      // Cache the result.
-      if (! invalid_ids)
-        (*inter_map)[id_pair] = inter_list;
-    }
-    else
-    {
-      // Obtain the precomputed intersection points from the map.
-      inter_list = (*map_iter).second;
-    }
-
-    // Report only the intersection points that lie on both arcs.
-    typename Intersection_list::const_iterator   iter;
-
-    for (iter = inter_list.begin(); iter != inter_list.end(); ++iter)
-    {
-      if (this->_is_between_endpoints (iter->first) &&
-          cv._is_between_endpoints (iter->first))
-      {
-        *oi = CGAL::make_object (*iter);
-        ++oi;
-      }
-    }
-
-    return (oi);
-  }
-
-  /*!
-   * Check whether it is possible to merge our arc with the given arc.
-   */
-  bool can_merge_with (const Self& cv) const
-  {
-    // In order to merge the two arcs, they should have the same supporting
-    // curve.
-    if (! this->has_same_supporting_curve (cv))
-      return (false);
-
-    // Check if the left endpoint of one curve is the right endpoint of the
-    // other.
-    return (right().equals (cv.left()) ||
-            left().equals (cv.right()));
-  }
-
-  /*!
-   * Merge our arc with the given arc.
-   * \pre The two arcs are mergeable.
-   */
-  void merge (const Self& cv)
-  {
-    CGAL_precondition (this->can_merge_with (cv));
-
-    // Check if we should extend the arc to the left or to the right.
-    if (right().equals (cv.left()))
-    {
-      // Extend the arc to the right.
-      if (is_directed_right())
-        this->_target = cv.right();
-      else
-        this->_source = cv.right();
-    }
-    else
-    {
-      CGAL_precondition (left().equals (cv.right()));
-
-      // Extend the arc to the left.
-      if (is_directed_right())
-        this->_source = cv.left();
-      else
-        this->_target = cv.left();
-    }
-
-    return;
-  }
-
-  /*! construct an opposite arc. */
-  Self construct_opposite() const
-  {
-    Self opp_cv;
-    opp_cv._first = this->_first;
-    opp_cv._second = this-> _second;
-    opp_cv._third = this-> _third;
-    opp_cv._source = this->_target;
-    opp_cv._target = this->_source;
-
-    // Take care of the information bits: We flip the orientation bits and
-    // the bits that marks the direction.
-    if (is_linear())
-      opp_cv._info = (this->_info ^ IS_DIRECTED_RIGHT_MASK);
-    else
-      opp_cv._info = (this->_info ^ IS_DIRECTED_RIGHT_MASK ^ ORIENTATION_MASK);
-
-    return (opp_cv);
-  }
-
-  Bbox_2 bbox() const
-  {
-    double x_min = to_double(left().x());
-    double x_max = to_double(right().x());   
-    double y_min = to_double(left().y()); 
-    double y_max = to_double(right().y());
-    if(y_min > y_max)
-      std::swap(y_min, y_max);
-    if(is_circular())
-    {
-      const Circle_2& circ = this->supporting_circle();
-      if(_is_upper())
-      {
-        y_max = to_double(circ.center().y())+ 
-                std::sqrt(to_double(circ.squared_radius()));
-      }
-      else
-      {
-        y_min = to_double(circ.center().y()) - 
-                std::sqrt(to_double(circ.squared_radius()));
-      }
-    }
-
-    
-    return Bbox_2(x_min, y_min, x_max, y_max);
-  }
-
-protected:
-
-  /*! Get the curve index. */
-  inline unsigned int _index () const
-  {
-    return (_info >> INDEX_SHIFT_BITS);
-  }
-
-  /// \name Accessors for circular arcs.
-  //@{
-
-  /*! Get the x-coordinate of the center of the supporting circle. */
-  inline const NT& x0 () const
-  {
-    return (_first);
-  }
-
-  /*! Get the y-coordinate of the center of the supporting circle. */
-  inline const NT& y0 () const
-  {
-    return (_second);
-  }
-
-  /*! Get the squared radius of the supporting circle. */
-  inline const NT& sqr_r () const
-  {
-    return (_third);
-  }
-
-  /*!
-   * Check if the circular arc lies on the upper half of the supporting circle.
-   */
-  inline bool _is_upper () const
-  {
-    Orientation  orient = orientation();
-    bool         dir_right = ((_info & IS_DIRECTED_RIGHT_MASK) != 0);
-
-    CGAL_precondition (orient != COLLINEAR);
-
-    return ((orient == COUNTERCLOCKWISE && !dir_right) ||
-            (orient == CLOCKWISE && dir_right));
-  }
-  //@}
-
-  /// \name Accessors for line segments.
-  //@{
-
-  /*! Get the coefficient of x in the equation of the supporting line. */
-  inline const NT& a () const
-  {
-    return (_first);
-  }
-
-  /*! Get the coefficient of y in the equation of the supporting line. */
-  inline const NT& b () const
-  {
-    return (_second);
-  }
-
-  /*! Get the free coefficient in the equation of the supporting line. */
-  inline const NT& c () const
-  {
-    return (_third);
-  }
-  //@}
-
-  /// \name Auxiliary functions for the point_position predicate.
-  //@{
-
-  /*!
-   * Check the position of a given point with respect to a line segment.
-   */
-  Comparison_result _line_point_position (const Point_2& p) const
-  {
-    // Check if we have a vertical segment.
-
-    CGAL_precondition (is_in_x_range(p));
-
-    Comparison_result    res;
-
-    if (is_vertical())
-    {
-      // left() is the lower endpoint:
-      res = CGAL::compare (p.y(), left().y());
-
-      if (res != LARGER)
-        return (res);
-
-      // left() is the upper endpoint:
-      res = CGAL::compare (p.y(), right().y());
-
-      if (res != SMALLER)
-        return (res);
-
-      // p lies in the interior of the vertical segment:
-      return (EQUAL);
-    }
-
-    // Compute the y-coordinate of the vertical projection of p onto the
-    // supporting line.
-    const CoordNT        y_proj = (a()*p.x() + c()) / (-b());
-
-    return (CGAL::compare (p.y(), y_proj));
-  }
-
-  /*!
-   * Check the position of a given point with respect to a circular arc.
-   */
-  Comparison_result _circ_point_position (const Point_2& p) const
-  {
-
-    Comparison_result   c_res = CGAL::compare (p.y(), y0());
-
-    if (_is_upper())
-    {
-      // Check if p lies below the "equator" (while the arc lies above it):
-      if (c_res == SMALLER)
-        return (SMALLER);
-    }
-    else
-    {
-      // Check if p lies above the "equator" (while the arc lies below it):
-      if (c_res == LARGER)
-        return (LARGER);
-    }
-
-    // Check if p lies inside the supporting circle, namely we have to check
-    // whether (p.x() - x0)^2 + (p.y() - y0)^2 < r^2:
-    Comparison_result   res =
-                         CGAL::compare (CGAL::square (p.x() - x0()),
-                                        sqr_r() - CGAL::square (p.y() - y0()));
-
-    if (res == EQUAL)
-      // p lies on the circle:
-      return (EQUAL);
-
-    if (_is_upper())
-    {
-      // If p is inside the circle, it lies below the upper arc:
-      return (res);
-    }
-    else
-    {
-      // If p is inside the circle, it lies above the lower arc:
-      return (res == SMALLER ? LARGER : SMALLER);
-    }
-  }
-  //@}
-
-  /// \name Auxiliary functions for the compare_to_right predicate.
-  //@{
-
-  /*!
-   * Compare two line segments to the right of their intersection point.
-   */
-  Comparison_result _lines_compare_to_right (const Self& cv,
-                                             const Point_2& /* p */) const
-  {
-    if (_index() != 0 && _index() == cv._index())
-      return (EQUAL);
-
-    // Special treatment for vertical segments: a vertical segment is larger
-    // than any other non-vertical segment.
-    if (is_vertical())
-    {
-      if (cv.is_vertical())
-        return (EQUAL);
-
-      return (LARGER);
-    }
-    else if (cv.is_vertical())
-    {
-      return (SMALLER);
-    }
-
-    // Compare the slopes: -A1/B1 and -A2/B2. We actually negate the slopes
-    // and swap the result.
-    return (CGAL::compare (cv.a()/cv.b(), a()/b()));
-  }
-
-  /*!
-   * Compare a circular arcs (this) and a line segment (cv) to the right of
-   * their intersection point.
-   */
-  Comparison_result _circ_line_compare_to_right (const Self& cv,
-                                                 const Point_2& p) const
-  {
-    // A vertical segment lies above any other circle to the right of p:
-    if (cv.is_vertical())
-      return (SMALLER);
-    
-    // We have to compare the slopes of the supporting circles and the
-    // supporting line at p:
-    //
-    //    p.x() - x0(1)           A(2)
-    //   ---------------  and  - ------
-    //    y0(1) - p.y()           B(2)
-    //
-    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
-
-    // Check the case of a vertical tangent.
-    if (sign_denom1 == ZERO)
-    {
-      // The arc lies above any line segment if it is an upper arc, or below
-      // any segment if it is a lower arc.
-      return (_is_upper() ? LARGER : SMALLER);
-    }
-
-    // Compare (p.x() - x0(1)) and (A(2)/B(2)*(p.y() - y0(1)).
-    // Note that if the denominator is negative, we have to swap the result.
-    const bool        swap_res = (sign_denom1 == NEGATIVE);
-    Comparison_result slope_res = CGAL::compare (p.x() - x0(),
-                                                 (p.y() - y0())*cv.a()/cv.b());
-
-    if (slope_res != EQUAL)
-    {
-      if (swap_res)
-        // Swap the comparison result, if necessary:
-        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
-      
-      return (slope_res);
-    }
-
-    // In this case we have a tangency point at p. If the circular arc is an
-    // upper arc, it must lie below the tangent line, and if it is a lower arc
-    // it must lie above the tangent line.
-    return (_is_upper() ? SMALLER : LARGER);
-  }
-
-  /*!
-   * Compare two circular arcs to the right of their intersection point.
-   */
-  Comparison_result _circs_compare_to_right (const Self& cv,
-                                             const Point_2& p) const
-  {
-    if (_index() != 0 && _index() == cv._index())
-    {
-      // Check the case of comparing two circular arcs that originate from the
-      // same supporting circle. Their comparison result is not EQUAL only if
-      // one is an upper arc and the other is a lower arc.
-      if (_is_upper() && ! cv._is_upper())
-        return (LARGER);
-      else if (! _is_upper() && cv._is_upper())
-        return (SMALLER);
-      else
-        return (EQUAL);
-    }
-
-    // We have to compare the slopes of the two supporting circles at p:
-    //
-    //    p.x() - x0(1)         p.x() - x0(2)
-    //   ---------------  and  ---------------
-    //    y0(1) - p.y()         y0(2) - p.y()
-    //
-    const CGAL::Sign  sign_numer1 = CGAL::sign (p.x() - x0());
-    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
-    const CGAL::Sign  sign_numer2 = CGAL::sign (p.x() - cv.x0());
-    const CGAL::Sign  sign_denom2 = CGAL::sign (cv.y0() - p.y());
-
-    // Check the case of vertical tangents.
-    if (sign_denom1 == ZERO)
-    {
-      if (sign_denom2 == ZERO)
-      {
-        if (_is_upper())
-        {
-          if (cv._is_upper())
-          {
-            // The two circles have a vertical tangent:
-            // The one with a larger radius is above the other.
-            return (CGAL::compare (sqr_r(), cv.sqr_r()));
-          }
-          else
-          {
-            // The other curve is directed downwards:
-            return (LARGER);
-          }
-        }
-        else
-        {
-          if (cv._is_upper())
-          {
-            // The other curve is directed upwards:
-            return (SMALLER);
-          }
-          else
-          {
-            // The two circles have a vertical tangent:
-            // The one with a smaller radius is above the other.
-            return (CGAL::compare (cv.sqr_r(), sqr_r()));
-          }
-        }
-      }
-
-      // The other arc does not have a vertical tangent.
-      return (_is_upper() ? LARGER : SMALLER);
-    }
-    else if (sign_denom2 == ZERO)
-    {
-      return (cv._is_upper() ? SMALLER : LARGER);
-    }
-
-    // Try to act according to the slope signs.
-    CGAL::Sign   sign_slope1;
-    CGAL::Sign   sign_slope2;
-
-    if (sign_numer1 == sign_denom1)
-      sign_slope1 = POSITIVE;
-    else if (sign_numer1 == ZERO)
-      sign_slope1 = ZERO;
-    else
-      sign_slope1 = NEGATIVE;
-
-    if (sign_numer2 == sign_denom2)
-      sign_slope2 = POSITIVE;
-    else if (sign_numer2 == ZERO)
-      sign_slope2 = ZERO;
-    else
-      sign_slope2 = NEGATIVE;
-
-    if ((sign_slope1 == POSITIVE && sign_slope2 != POSITIVE) ||
-        (sign_slope1 == ZERO && sign_slope2 == NEGATIVE))
-      return (LARGER);
-
-    if ((sign_slope2 == POSITIVE && sign_slope1 != POSITIVE) ||
-        (sign_slope2 == ZERO && sign_slope1 == NEGATIVE))
-      return (SMALLER);
-
-    // Compare the slopes of the two tangents to the circles.
-    Comparison_result  slope_res;
-    
-    if (sign_slope1 == ZERO && sign_slope2 == ZERO)
-    {
-      // Special case were both circles have a horizontal tangent:
-      slope_res = EQUAL;
-    }
-    else
-    {
-      // Actually compare the slopes.    
-      const bool    swap_res = (sign_denom1 != sign_denom2);
-      const CoordNT A = (cv.y0() - y0())*p.x() + (y0()*cv.x0() - cv.y0()*x0());
-      const CoordNT B = (cv.x0() - x0())*p.y();
-     
-      slope_res = CGAL::compare (A, B);
-
-      if (slope_res != EQUAL && swap_res)
-      {
-        // Swap the comparison result, if necessary:
-        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
-      }
-    }
-
-    // In case the two circles have different tangent slopes at p:
-    if (slope_res != EQUAL)
-      return (slope_res);
-
-    // In this case we have a tangency point at p.
-    if (_is_upper())
-    {
-      if (cv._is_upper())
-      {
-        // The circle with a larger radius is above the other.
-        return (CGAL::compare (sqr_r(), cv.sqr_r()));
-      }
-      else
-      {
-        // The other curve is above our curve:
-        return (SMALLER);
-      }
-    }
-    else
-    {
-      if (cv._is_upper())
-      {
-        // Out curve is above the other curve:
-        return (LARGER);
-      }
-      else
-      {
-        // The circle with a smaller radius is above the other.
-        return (CGAL::compare (cv.sqr_r(), sqr_r()));
-      }
-    }
-  }
-  //@}
-
-  /// \name Auxiliary functions for the compare_to_left predicate.
-  //@{
-
-  /*!
-   * Compare two line segments to the left of their intersection point.
-   */
-  Comparison_result _lines_compare_to_left (const Self& cv,
-                                            const Point_2& ) const
-  {
-    if (_index() != 0 && _index() == cv._index())
-      return (EQUAL);
-
-    // Special treatment for vertical segments: a vertical segment is smaller
-    // than any other non-vertical segment.
-    if (is_vertical())
-    {
-      if (cv.is_vertical())
-        return (EQUAL);
-
-      return (SMALLER);
-    }
-    else if (cv.is_vertical())
-    {
-      return (LARGER);
-    }
-
-    // Compare the slopes: -A1/B1 and -A2/B2 and swap the result.
-    //  We actually negate the slopes and compare them.
-    return (CGAL::compare (a()/b(), cv.a()/cv.b()));
-  }
-
-  /*!
-   * Compare a circular arcs (this) and a line segment (cv) to the left of
-   * their intersection point.
-   */
-  Comparison_result _circ_line_compare_to_left (const Self& cv,
-                                                const Point_2& p) const
-  {
-    // A vertical segment lies below any other circle to the left of p:
-    if (cv.is_vertical())
-      return (LARGER);
-    
-    // We have to compare the slopes of the supporting circles and the
-    // supporting line at p, and return the swapped result:
-    //
-    //    p.x() - x0(1)           A(2)
-    //   ---------------  and  - ------
-    //    y0(1) - p.y()           B(2)
-    //
-    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
-
-    // Check the case of a vertical tangent.
-    if (sign_denom1 == ZERO)
-    {
-      // The arc lies above any line segment if it is an upper arc, or below
-      // any segment if it is a lower arc.
-      return (_is_upper() ? LARGER : SMALLER);
-    }
-
-    // Compare (p.x() - x0(1)) and (A(2)/B(2)*(p.y() - y0(1)).
-    // Note that if the denominator is negative, we have to swap the result.
-    const bool        swap_res = (sign_denom1 == NEGATIVE);
-    Comparison_result slope_res = CGAL::compare (p.x() - x0(),
-                                                 (p.y() - y0())*cv.a()/cv.b());
-
-    if (slope_res != EQUAL)
-    {
-      if (swap_res)
-        // Swap the comparison result, if necessary:
-        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
-      
-      // Swap at any case to get the position to the left:
-      return ((slope_res == SMALLER) ? LARGER : SMALLER);
-    }
-
-    // In this case we have a tangency point at p. If the circular arc is an
-    // upper arc, it must lie below the tangent line, and if it is a lower arc
-    // it must lie above the tangent line.
-    return (_is_upper() ? SMALLER : LARGER);
-  }
-
-  /*!
-   * Compare the two arcs to the left of their intersection point.
-   */
-  Comparison_result _circs_compare_to_left (const Self& cv, 
-                                            const Point_2& p) const
-  {
-    if (_index() != 0 && _index() == cv._index())
-    {
-      // Check the case of comparing two circular arcs that originate from the
-      // same supporting circle. Their comparison result is not EQUAL only if
-      // one is an upper arc and the other is a lower arc.
-      if (_is_upper() && ! cv._is_upper())
-        return (LARGER);
-      else if (! _is_upper() && cv._is_upper())
-        return (SMALLER);
-      else
-        return (EQUAL);
-    }
-
-    // We have to compare the slopes of the two supporting circles at p:
-    //
-    //    p.x() - x0(1)         p.x() - x0(2)
-    //   ---------------  and  ---------------
-    //    y0(1) - p.y()         y0(2) - p.y()
-    //
-    // Eventually, we should take the opposite result.
-    const CGAL::Sign  sign_numer1 = CGAL::sign (p.x() - x0());
-    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
-    const CGAL::Sign  sign_numer2 = CGAL::sign (p.x() - cv.x0());
-    const CGAL::Sign  sign_denom2 = CGAL::sign (cv.y0() - p.y());
-
-    // Check the case of vertical tangents.
-    if (sign_denom1 == ZERO)
-    {
-      if (sign_denom2 == ZERO)
-      {
-        if (_is_upper())
-        {
-          if (cv._is_upper())
-          {
-            // The two circles have a vertical tangent:
-            // The one with a larger radius is above the other.
-            return (CGAL::compare (sqr_r(), cv.sqr_r()));
-          }
-          else
-          {
-            // The other curve is directed downwards:
-            return (LARGER);
-          }
-        }
-        else
-        {
-          if (cv._is_upper())
-          {
-            // The other curve is directed upwards:
-            return (SMALLER);
-          }
-          else
-          {
-            // The two circles have a vertical tangent:
-            // The one with a smaller radius is above the other.
-            return (CGAL::compare (cv.sqr_r(), sqr_r()));
-          }
-        }
-      }
-
-      // The other arc does not have a vertical tangent.
-      return (_is_upper() ? LARGER : SMALLER);
-    }
-    else if (sign_denom2 == ZERO)
-    {
-      return (cv._is_upper() ? SMALLER : LARGER);
-    }
-
-    // Try to act according to the slope signs.
-    CGAL::Sign   sign_slope1;
-    CGAL::Sign   sign_slope2;
-
-    if (sign_numer1 == sign_denom1)
-      sign_slope1 = POSITIVE;
-    else if (sign_numer1 == ZERO)
-      sign_slope1 = ZERO;
-    else
-      sign_slope1 = NEGATIVE;
-
-    if (sign_numer2 == sign_denom2)
-      sign_slope2 = POSITIVE;
-    else if (sign_numer2 == ZERO)
-      sign_slope2 = ZERO;
-    else
-      sign_slope2 = NEGATIVE;
-
-    if ((sign_slope1 == POSITIVE && sign_slope2 != POSITIVE) ||
-        (sign_slope1 == ZERO && sign_slope2 == NEGATIVE))
-      return (SMALLER);
-
-    if ((sign_slope2 == POSITIVE && sign_slope1 != POSITIVE) ||
-        (sign_slope2 == ZERO && sign_slope1 == NEGATIVE))
-      return (LARGER);
-
-    // Compare the slopes of the two tangents to the circles.
-    Comparison_result  slope_res;
-    
-    if (sign_slope1 == ZERO && sign_slope2 == ZERO)
-    {
-      // Special case were both circles have a horizontal tangent:
-      slope_res = EQUAL;
-    }
-    else
-    {
-      // Actually compare the slopes.    
-      const bool    swap_res = (sign_denom1 != sign_denom2);
-      const CoordNT A = (cv.y0() - y0())*p.x() + (y0()*cv.x0() - cv.y0()*x0());
-      const CoordNT B = (cv.x0() - x0())*p.y();
-     
-      slope_res = CGAL::compare (A, B);
-
-      if (slope_res != EQUAL && swap_res)
-      {
-        // Swap the comparison result, if necessary:
-        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
-      }
-    }
-
-    // In case the two circles have different tangent slopes at p, return
-    // the opposite of the slope result (since the slope result is the
-    // comparison result to the right of the intersection point):
-    if (slope_res != EQUAL)
-      return ((slope_res == SMALLER) ? LARGER : SMALLER);
-
-    // In this case we have a tangency point at p.
-    if (_is_upper())
-    {
-      if (cv._is_upper())
-      {
-        // The circle with a larger radius is above the other.
-        return (CGAL::compare (sqr_r(), cv.sqr_r()));
-      }
-      else
-      {
-        // The other curve is above our curve:
-        return (SMALLER);
-      }
-    }
-    else
-    {
-      if (cv._is_upper())
-      {
-        // Out curve is above the other curve:
-        return (LARGER);
-      }
-      else
-      {
-        // The circle with a smaller radius is above the other.
-        return (CGAL::compare (cv.sqr_r(), sqr_r()));
-      }
-    }
-  }
-  //@}
-
-  /// \name Auxiliary functions for computing intersections.
-  //@{
-
-  /*!
-   * Compute the intersections between two line segments.
-   */
-  void _lines_intersect (const Self& cv,
-                         Intersection_list& inter_list) const
-  {
-    // The intersection of the lines:
-    //   a1*x + b1*y + c1 = 0   and   a2*x + b2*y + c2 = 0 ,
-    // is given by:
-    //
-    //      b1*c2 - c1*b2     c1*a2 - a1*c2
-    //   ( --------------- , --------------- )
-    //      a1*b2 - b1*a2     a1*b2 - b1*a2
-    //
-    unsigned int  mult = 1;
-    const NT      denom = a()*cv.b() - b()*cv.a();
-
-    // Make sure the supporting lines are not parallel.
-    if (CGAL::sign(denom) == ZERO)
-      return;
-
-    const NT      x_numer = b()*cv.c() - c()*cv.b();
-    const NT      y_numer = c()*cv.a() - a()*cv.c();
-    Point_2       p (x_numer / denom, y_numer / denom);
-
-    inter_list.push_back (Intersection_point_2 (p, mult));
-    return;
-  }
-
-  /*!
-   * Compute the intersections between the supporting circle of (*this) and 
-   * the supporting line of the segement cv.
-   */
-  void _circ_line_intersect (const Self& cv,
-                             Intersection_list& inter_list) const
-  {
-    Point_2       p;
-    unsigned int  mult;
-
-    // First check the special cases of vertical and horizontal lines.
-    if (cv.is_vertical())
-    {
-      // The equation of the vertical line is x = -c / a.
-      // The y-coordinates of the intersection points are:
-      //   y =  y0 +/- sqrt(r^2 - (x - x0)^2)
-      //
-      const NT   vx = -cv.c() / cv.a();
-      const NT   vdisc = sqr_r() - CGAL::square (vx - x0());
-      CGAL::Sign sign_vdisc = CGAL::sign (vdisc);
-      
-      if (sign_vdisc == NEGATIVE)
-      {
-        // The circle and the vertical line do not intersect.
-        return;
-      }
-      else if (sign_vdisc == ZERO)
-      {
-        // A single tangency point, given by:
-        mult = 2;
-        p = Point_2 (vx, y0());
-        inter_list.push_back (Intersection_point_2 (p, mult));
-        
-        return;
-      }
-      
-      // Compute the two intersection points:
-      mult = 1;
-
-      p = Point_2 (CoordNT (vx),
-                   CoordNT (y0(), NT(-1), vdisc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-      
-      p = Point_2 (CoordNT (vx),
-                   CoordNT (y0(), NT(1), vdisc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      return;
-    }
-    else if (CGAL::sign (cv.a()) == ZERO)
-    {
-      // The equation of the horizontal line is y = -c / b.
-      // The y-coordinates of the intersection points are:
-      //   x =  x0 +/- sqrt(r^2 - (y - y0)^2)
-      //
-      const NT   hy = -cv.c() / cv.b();
-      const NT   hdisc = sqr_r() - CGAL::square (hy - y0());
-      CGAL::Sign sign_hdisc = CGAL::sign (hdisc);
-      
-      if (sign_hdisc == NEGATIVE)
-      {
-        // The circle and the vertical line do not intersect.
-        return;
-      }
-      else if (sign_hdisc == ZERO)
-      {
-        // A single tangency point, given by:
-        mult = 2;
-        p = Point_2 (x0(), hy);
-        inter_list.push_back (Intersection_point_2 (p, mult));
-
-        return;
-      }
-      
-      // Compute the two intersection points:
-      mult = 1;
-
-      p = Point_2 (CoordNT (x0(), NT(-1), hdisc),
-                   CoordNT (hy));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      p = Point_2 (CoordNT (x0(), NT(1), hdisc),
-                   CoordNT (hy));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      return;
-    }
-
-    // Compute the squared distance between the line and the circle center,
-    // inducing the discriminant of the quadratic equations we have to solve.
-    const NT   line_factor = CGAL::square(cv.a()) + CGAL::square(cv.b());
-    const NT   disc = line_factor*sqr_r() -
-                      CGAL::square(cv.a()*x0() + cv.b()*y0() + cv.c());
-    CGAL::Sign sign_disc = CGAL::sign (disc);
-
-    if (sign_disc == NEGATIVE)
-    {
-      // The circle and the line do not intersect:
-      return;
-    }
-
-    // Compare the square-free part of the solution:
-    const NT   aux = cv.b()*x0() - cv.a()*y0();
-    const NT   x_base = (aux*cv.b() - cv.a()*cv.c()) / line_factor;
-    const NT   y_base = (-aux*cv.a() - cv.b()*cv.c()) / line_factor;
-
-    if (sign_disc == ZERO)
-    {
-      // A single tangency point, given by:
-      mult = 2;
-      p = Point_2 (x_base, y_base);
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      return;
-    }
-
-    // We have two intersection points, whose coordinates are one-root numbers.
-    bool       minus_root_first = (CGAL::sign(cv.b()) == POSITIVE);
-    const NT   x_root_coeff = cv.b() / line_factor;
-    const NT   y_root_coeff = cv.a() / line_factor;
-
-    mult = 1;
-    if (minus_root_first)
-    {
-      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
-                   CoordNT (y_base, y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
-                   CoordNT (y_base, -y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-    }
-    else
-    {
-      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
-                   CoordNT (y_base, -y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
-                   CoordNT (y_base, y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-    }
-
-    return;
-  }
-
-  /*!
-   * Compute the intersections between two circles.
-   */
-  void _circs_intersect (const Self& cv,
-                         Intersection_list& inter_list) const
-  {
-    Point_2       p;
-    unsigned int  mult;
-
-    // Compute the squared distance between the circle centers, inducing the
-    // discriminant of the quadratic equations we have to solve.
-    const NT   diff_x = cv.x0() - x0();
-    const NT   diff_y = cv.y0() - y0();    
-    const NT   sqr_dist = CGAL::square(diff_x) + CGAL::square(diff_y);
-    const NT   diff_sqr_rad = sqr_r() - cv.sqr_r();
-    const NT   disc = 2*sqr_dist*(sqr_r() + cv.sqr_r()) -
-                      (CGAL::square(diff_sqr_rad) + CGAL::square(sqr_dist));
-    CGAL::Sign sign_disc = CGAL::sign (disc);
-
-    if (sign_disc == NEGATIVE)
-    {
-      // The two circles do not intersect.
-      return;
-    }
-
-    // Compare the square-free part of the solution:
-    const NT   x_base = ((x0() + cv.x0()) + diff_x*diff_sqr_rad/sqr_dist) / 2;
-    const NT   y_base = ((y0() + cv.y0()) + diff_y*diff_sqr_rad/sqr_dist) / 2;
-
-    if (sign_disc == ZERO)
-    {
-      // A single tangency point, given by:
-      mult = 2;
-      p = Point_2 (x_base, y_base);
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      return;
-    }
-
-    // We have two intersection points, whose coordinates are one-root numbers.
-    CGAL::Sign sign_diff_y = CGAL::sign (diff_y);
-    bool       minus_root_first;
-
-    if (sign_diff_y == ZERO)
-      minus_root_first = (CGAL::sign (diff_x) == NEGATIVE);
-    else
-      minus_root_first = (sign_diff_y == POSITIVE);
-
-    const NT   x_root_coeff = diff_y / (2 * sqr_dist);
-    const NT   y_root_coeff = diff_x / (2 * sqr_dist);
-
-    mult = 1;
-    if (minus_root_first)
-    {
-      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
-                   CoordNT (y_base, y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
-                   CoordNT (y_base, -y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-    }
-    else
-    {
-      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
-                   CoordNT (y_base, -y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-
-      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
-                   CoordNT (y_base, y_root_coeff, disc));
-      inter_list.push_back (Intersection_point_2 (p, mult));
-    }
-
-    return;
-  }
-
-  /*!
-   * Check if the given point lies on the arc.
-   * \pre p lies on the supporting curve.
-   */
-  bool _is_between_endpoints (const Point_2& p) const
-  {
-    if (is_linear())
-    {
-      if (is_vertical())
-      {
-        // Check if the point is in the y-range of the arc.
-        // Note that left() is the lower endpoint and right() is the upper
-        // endpoint of the segment in this case. 
-        Comparison_result    res = CGAL::compare (p.y(), left().y());
-
-        if (res == SMALLER)
-          return (false);
-        else if (res == EQUAL)
-          return (true);
-
-        return (CGAL::compare (p.y(), right().y()) != LARGER);
-      }
-
-      // For non-vertical segments, it is sufficient to check if the point
-      // is in the x-range of the arc.
-      return (this->is_in_x_range (p));
-    }
-
-    // The supporting curve is a circle:
-    // Check whether p lies on the upper or on the lower part of the circle.
-    Comparison_result   c_res = CGAL::compare (p.y(), y0());
-
-    if ((_is_upper() && c_res == SMALLER) ||
-        (! _is_upper() && c_res == LARGER))
-    {
-      // The point lies on the other half of the circle:
-      return (false);
-    }
-
-    // Check if the point is in the x-range of the arc.
-    return (this->is_in_x_range (p));
-  }
-
-  /*!
-   * Check if the given point lies in the interior of the arc.
-   * \pre p lies on the supporting curve.
-   */
-  bool _is_strictly_between_endpoints (const Point_2& p) const
-  {
-    if (p.equals (_source) || p.equals (_target))
-      return (false);
-    
-    return (_is_between_endpoints (p));
-  }
-
-  /*!
-   * Compute the overlap with a given arc having the same supporting curve.
-   * \param cv The given arc.
-   * \param overlap Output: The overlapping arc (if any).
-   * \return Whether we found an overlap.
-   */
-  bool _compute_overlap (const Self& cv, Self& overlap) const
-  {
-    // Check if the two arcs are identical.
-    if (is_linear())
-    {
-      // In case of line segments we can swap the source and target:
-      if (((_source.equals (cv._source) && _target.equals (cv._target)) ||
-           (_source.equals (cv._target) && _target.equals (cv._source))))
-      {
-        overlap = cv;
-        return (true);
-      }
-    }
-    else
-    {
-      if ((orientation() == cv.orientation() &&
-           _source.equals (cv._source) && _target.equals (cv._target)) ||
-          (orientation() != cv.orientation() &&
-           _source.equals (cv._target) && _target.equals (cv._source)))
-      {
-        overlap = cv;
-        return (true);
-      }
-    }
-
-    // Check for other overlaps:
-    if (_is_strictly_between_endpoints (cv.left()))
-    {
-      if (_is_strictly_between_endpoints (cv.right()))
-      {
-        // Case 1 - *this:     +----------->
-        //             cv:       +=====>
-        overlap = cv;
-        return (true);
-      }
-      else
-      {
-        // Case 2 - *this:     +----------->
-        //             cv:               +=====>
-        overlap = *this;
-
-        if (overlap.is_directed_right())
-          overlap._source = cv.left();
-        else
-          overlap._target = cv.left();
-
-        return (true);
-      }
-    }
-    else if (_is_strictly_between_endpoints (cv.right()))
-    {
-      // Case 3 - *this:     +----------->
-      //             cv:   +=====>
-      overlap = *this;
-
-      if (overlap.is_directed_right())
-        overlap._target = cv.right();
-      else
-        overlap._source = cv.right();
-
-      return (true);
-    }
-    else if (cv._is_between_endpoints (_source) &&
-             cv._is_between_endpoints (_target) &&
-             (cv._is_strictly_between_endpoints (_source) ||
-              cv._is_strictly_between_endpoints (_target)))
-    {
-      // Case 4 - *this:     +----------->
-      //             cv:   +================>
-      overlap = *this;
-      return (true);
-    }
-
-    // If we reached here, there are no overlaps:
-    return (false);
-  }
-
-  public:
-  template <class OutputIterator>
-  void approximate(OutputIterator oi, unsigned int n) const
-  {
-    const double x_left = CGAL::to_double(this->source().x());
-    const double y_left = CGAL::to_double(this->source().y());
-
-    const double x_right = CGAL::to_double(this->target().x());
-    const double y_right = CGAL::to_double(this->target().y());
-    if(this->is_linear())
-    {
-      *oi = std::make_pair(x_left, y_left);
-      ++oi;
-
-      *oi = std::make_pair(x_right, y_right);
-      ++oi;
-      return;
-    }
-
-    // Otherwise, sample (n - 1) equally-spaced points in between.
-    const double  app_xcenter = CGAL::to_double (this->_first);
-    const double  app_ycenter = CGAL::to_double (this->_second);
-    const double  app_sqr_rad = CGAL::to_double (this->_third);
-   
-    const double  x_jump = (x_right - x_left) / n;
-    double        x, y;
-    double        disc;
-    unsigned int        i;
-
-    const bool is_up = this->_is_upper();
-    *oi = std::make_pair (x_left, y_left);   // The left point.
-    ++oi;
-    for (i = 1; i < n; i++)
-    {
-      x = x_left + x_jump*i;
-      disc = app_sqr_rad - CGAL::square(x - app_xcenter);
-      CGAL_precondition(disc >= 0);
-      if(is_up)
-        y = app_ycenter + std::sqrt(disc);
-      else
-        y = app_ycenter - std::sqrt(disc);
-
-      *oi = std::make_pair(x, y);
-      ++oi;
-    }
-    *oi = std::make_pair(x_right, y_right);   // The right point.
-    ++oi;
-  }
-
-  //@}
-};
-
-/*!
- * Exporter for circular arcs (or line segments).
- */
-template <class Kernel, bool Filter>
-std::ostream& 
-operator<< (std::ostream& os, 
-            const _X_monotone_circle_segment_2<Kernel, Filter> & arc)
-{
-  if (! arc.is_linear())
-    os << "(" << arc.supporting_circle() << ") ";
-
-  os << "[" << arc.source() << " --> " << arc.target() << "]";
-  return (os);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
deleted file mode 100644
index d73e12e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
+++ /dev/null
@@ -1,1870 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein <wein at post.tau.ac.il>
-
-#ifndef CGAL_CONIC_ARC_2_H
-#define CGAL_CONIC_ARC_2_H
-
-/*! \file
- * Header file for the _Conic_arc_2<Int_kernel, Alg_kernel, Nt_traits> class.
- */
-
-#include <CGAL/Arr_geometry_traits/Conic_point_2.h>
-#include <CGAL/Arr_geometry_traits/Conic_intersections_2.h>
-#include <CGAL/Bbox_2.h>
-
-#include <ostream>
-
-namespace CGAL {
-
-
-/*!
- * Representation of a conic arc -- a bounded segment that lies on a conic
- * curve, the loci of all points satisfying the equation:
- *   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0
- *
- * The class is templated with three parameters: 
- * Rat_kernel A kernel that provides the input objects or coefficients.
- *            Rat_kernel::FT should be an integral or a rational type.
- * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
- *            for the coordinates of arrangement vertices, which are algebraic
- *            numbers of degree up to 4 (preferably it is CORE::Expr).
- * Nt_traits A traits class for performing various operations on the integer,
- *           rational and algebraic types. 
- */
-
-template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_>
-class _Conic_arc_2
-{
-public:
-
-  typedef Rat_kernel_                                      Rat_kernel;
-  typedef Alg_kernel_                                      Alg_kernel;
-  typedef Nt_traits_                                       Nt_traits;
-
-  typedef _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits>  Self;
- 
-  typedef typename Rat_kernel::FT                          Rational;
-  typedef typename Rat_kernel::Point_2                     Rat_point_2;
-  typedef typename Rat_kernel::Segment_2                   Rat_segment_2;
-  typedef typename Rat_kernel::Circle_2                    Rat_circle_2;
-
-  typedef typename Nt_traits::Integer                      Integer;
-
-  typedef typename Alg_kernel::FT                          Algebraic;
-  typedef typename Alg_kernel::Point_2                     Point_2;
-  typedef _Conic_point_2<Alg_kernel>                       Conic_point_2;
-
-protected:
-
-  Integer        _r;       //
-  Integer        _s;       // The coefficients of the supporting conic curve:
-  Integer        _t;       //
-  Integer        _u;       //
-  Integer        _v;       //   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 .
-  Integer        _w;       //
-
-  Orientation    _orient;  // The orientation of the conic.
-
-  // Bit masks for the _info field.
-  enum
-  {
-    IS_VALID = 1,
-    IS_FULL_CONIC = 2
-  };
-
-  int            _info;    // Does the arc represent a full conic curve.
-  Conic_point_2  _source;  // The source of the arc (if not a full curve).
-  Conic_point_2  _target;  // The target of the arc (if not a full curve).
-
-  /*! \struct
-   * For arcs whose base is a hyperbola we store the axis (a*x + b*y + c = 0)
-   * which separates the two bracnes of the hyperbola. We also store the side
-   * (NEGATIVE or POSITIVE) that the arc occupies.
-   * In case of line segments connecting two algebraic endpoints, we use this
-   * structure two store the coefficients of the line supporting this segment.
-   * In this case we set the side field to be ZERO.
-   */   
-  struct Extra_data
-  {
-    Algebraic     a;
-    Algebraic     b;
-    Algebraic     c;
-    Sign          side;
-  };
-
-  Extra_data    *_extra_data_P;  // The extra data stored with the arc
-                                 // (may be NULL).
-
-public:
-
-  /// \name Construction and destruction functions.
-  //@{
-
-  /*!
-   * Default constructor.
-   */
-  _Conic_arc_2 () :
-    _r(0), _s(0), _t(0), _u(0), _v(0), _w(0),
-    _orient (COLLINEAR),
-    _info (0),
-    _extra_data_P (NULL)
-  {}
-
-  /*!
-   * Copy constructor.
-   * \param arc The copied arc.
-   */
-  _Conic_arc_2 (const Self& arc) :
-    _r(arc._r), _s(arc._s), _t(arc._t), _u(arc._u), _v(arc._v), _w(arc._w),
-    _orient (arc._orient),
-    _info (arc._info),
-    _source(arc._source),
-    _target(arc._target)
-  {
-    if (arc._extra_data_P != NULL)
-      _extra_data_P = new Extra_data (*(arc._extra_data_P));
-    else
-      _extra_data_P = NULL;
-  }
-
-  /*! 
-   * Construct a conic arc which is the full conic:
-   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
-   * \pre The conic C must be an ellipse (so 4rs - t^2 > 0).
-   */
-  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
-                const Rational& u, const Rational& v, const Rational& w) :
-    _extra_data_P (NULL)
-  {
-    // Make sure the given curve is an ellipse (4rs - t^2 should be positive).
-    CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE);
-
-    // Set the arc to be the full conic (and compute the orientation).
-    Rational    rat_coeffs [6];
-
-    rat_coeffs[0] = r;
-    rat_coeffs[1] = s;
-    rat_coeffs[2] = t;
-    rat_coeffs[3] = u;
-    rat_coeffs[4] = v;
-    rat_coeffs[5] = w;
-
-    _set_full (rat_coeffs, true);
-  }
-
-  /*! 
-   * Construct a conic arc which lies on the conic:
-   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
-   * \param orient The orientation of the arc (clockwise or counterclockwise).
-   * \param source The source point.
-   * \param target The target point.
-   * \pre The source and the target must be on the conic boundary and must
-   * not be the same.
-   */
-  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
-                const Rational& u, const Rational& v, const Rational& w,
-                const Orientation& orient,
-                const Point_2& source, const Point_2& target) :
-    _orient (orient),
-    _source (source),
-    _target (target),
-    _extra_data_P (NULL)
-  {
-    // Make sure that the source and the taget are not the same.
-    CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
-                                                           target) != EQUAL);
-
-    // Set the arc properties (no need to compute the orientation).
-    Rational    rat_coeffs [6];
-
-    rat_coeffs[0] = r;
-    rat_coeffs[1] = s;
-    rat_coeffs[2] = t;
-    rat_coeffs[3] = u;
-    rat_coeffs[4] = v;
-    rat_coeffs[5] = w;
-
-    _set (rat_coeffs);
-  }
-
-  /*!
-   * Construct a conic arc from the given line segment.
-   * \param seg The line segment with rational endpoints.
-   */
-  _Conic_arc_2 (const Rat_segment_2& seg) :
-    _orient (COLLINEAR),
-    _extra_data_P (NULL)
-  {
-    // Set the source and target.
-    Rat_kernel        ker;
-    Rat_point_2       source = ker.construct_vertex_2_object() (seg, 0); 
-    Rat_point_2       target = ker.construct_vertex_2_object() (seg, 1); 
-    Rational          x1 = source.x();
-    Rational          y1 = source.y();
-    Rational          x2 = target.x();
-    Rational          y2 = target.y();
-    Nt_traits         nt_traits;
-
-    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
-    _target = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2));
- 
-    // Make sure that the source and the taget are not the same.
-    CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source,
-                                                           _target) != EQUAL);
-
-    // The supporting conic is r=s=t=0, and u*x + v*y + w = 0 should hold
-    // for both the source (x1,y1) and the target (x2, y2).
-    const Rational    _zero (0);
-    const Rational    _one (1);
-    Rational          rat_coeffs [6];
-
-    rat_coeffs[0] = _zero;
-    rat_coeffs[1] = _zero;
-    rat_coeffs[2] = _zero;
-
-    if (CGAL::compare (x1, x2) == EQUAL)
-    {
-      // The supporting conic is a vertical line, of the form x = CONST.
-      rat_coeffs[3] = _one;
-      rat_coeffs[4] = _zero;
-      rat_coeffs[5] = -x1;
-    }
-    else
-    {
-      // The supporting line is A*x + B*y + C = 0, where:
-      //
-      //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2 
-      //
-      rat_coeffs[3] = y2 - y1;
-      rat_coeffs[4] = x1 - x2;
-      rat_coeffs[5] = x2*y1 - x1*y2;
-    }
-
-    // Set the arc properties (no need to compute the orientation).
-    _set (rat_coeffs);
-  }
-
-  /*!
-   * Set a circular arc that corresponds to a full circle.
-   * \param circ The circle (with rational center and rational squared radius).
-   */ 
-  _Conic_arc_2 (const Rat_circle_2& circ) :
-    _orient (CLOCKWISE),
-    _extra_data_P (NULL)
-  {
-    // Get the circle properties.
-    Rat_kernel        ker;
-    Rat_point_2       center = ker.construct_center_2_object() (circ); 
-    Rational          x0 = center.x();
-    Rational          y0 = center.y();
-    Rational          R_sqr = ker.compute_squared_radius_2_object() (circ); 
-
-    // Produce the correponding conic: if the circle center is (x0,y0)
-    // and its squared radius is R^2, that its equation is:
-    //   x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0
-    // Note that this equation describes a curve with a negative (clockwise) 
-    // orientation.
-    const Rational    _zero (0);
-    const Rational    _one (1);
-    const Rational    _minus_two (-2);
-    Rational          rat_coeffs [6];
-
-    rat_coeffs[0] = _one;
-    rat_coeffs[1] = _one;
-    rat_coeffs[2] = _zero;
-    rat_coeffs[3] = _minus_two*x0;
-    rat_coeffs[4] = _minus_two*y0;
-    rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr;
-
-    // Set the arc to be the full conic (no need to compute the orientation).
-    _set_full (rat_coeffs, false);
-  }
-
-  /*!
-   * Set a circular arc that lies on the given circle:
-   *   C: (x - x0)^2 + (y - y0)^2 = R^2
-   * \param orient The orientation of the circle.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre The source and the target must be on the conic boundary and must
-   *      not be the same.
-   */  
-  _Conic_arc_2 (const Rat_circle_2& circ,
-                const Orientation& orient,
-                const Point_2& source, const Point_2& target) :
-    _orient(orient),
-    _source(source),
-    _target(target),
-    _extra_data_P (NULL)
-  {
-    // Make sure that the source and the taget are not the same.
-    CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
-                                                           target) != EQUAL);
-    CGAL_precondition (orient != COLLINEAR);
-
-    // Get the circle properties.
-    Rat_kernel        ker;
-    Rat_point_2       center = ker.construct_center_2_object() (circ);
-    Rational          x0 = center.x();
-    Rational          y0 = center.y();
-    Rational          R_sqr = ker.compute_squared_radius_2_object() (circ); 
-
-    // Produce the correponding conic: if the circle center is (x0,y0)
-    // and it squared radius is R^2, that its equation is:
-    //   x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0
-    // Since this equation describes a curve with a negative (clockwise) 
-    // orientation, we multiply it by -1 if necessary to obtain a positive
-    // (counterclockwise) orientation.
-    const Rational    _zero (0);
-    Rational          rat_coeffs[6];
-
-    if (_orient == COUNTERCLOCKWISE)
-    {
-      const Rational  _minus_one (-1);
-      const Rational  _two (2);
-
-      rat_coeffs[0] = _minus_one;
-      rat_coeffs[1] = _minus_one;
-      rat_coeffs[2] = _zero;
-      rat_coeffs[3] = _two*x0;
-      rat_coeffs[4] = _two*y0;
-      rat_coeffs[5] = R_sqr - x0*x0 - y0*y0;
-    }
-    else
-    {
-      const Rational    _one (1);
-      const Rational    _minus_two (-2);
-
-      rat_coeffs[0] = _one;
-      rat_coeffs[1] = _one;
-      rat_coeffs[2] = _zero;
-      rat_coeffs[3] = _minus_two*x0;
-      rat_coeffs[4] = _minus_two*y0;
-      rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr;
-    }
-
-    // Set the arc properties (no need to compute the orientation).
-    _set (rat_coeffs);
-  }
-
-  /*!
-   * Construct a circular arc from the given three points.
-   * \param p1 The arc source.
-   * \param p2 A point in the interior of the arc.
-   * \param p3 The arc target.
-   * \pre The three points must not be collinear.
-   */
-  _Conic_arc_2 (const Rat_point_2& p1,
-                const Rat_point_2& p2,
-                const Rat_point_2& p3):
-    _extra_data_P (NULL)
-  {
-    // Set the source and target.
-    Rational          x1 = p1.x();
-    Rational          y1 = p1.y();
-    Rational          x2 = p2.x();
-    Rational          y2 = p2.y();
-    Rational          x3 = p3.x();
-    Rational          y3 = p3.y();
-    Nt_traits         nt_traits;
-
-    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
-    _target = Point_2 (nt_traits.convert (x3), nt_traits.convert (y3));
- 
-    // Make sure that the source and the taget are not the same.
-    CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source,
-                                                           _target) != EQUAL);
-
-    // Compute the lines: A1*x + B1*y + C1 = 0,
-    //               and: A2*x + B2*y + C2 = 0,
-    // where:
-    const Rational  _two  = 2;
-
-    const Rational  A1 = _two*(x1 - x2);
-    const Rational  B1 = _two*(y1 - y2);
-    const Rational  C1 = y2*y2 - y1*y1 + x2*x2 - x1*x1;
-
-    const Rational  A2 = _two*(x2 - x3);
-    const Rational  B2 = _two*(y2 - y3);
-    const Rational  C2 = y3*y3 - y2*y2 + x3*x3 - x2*x2;
-
-    // Compute the coordinates of the intersection point between the
-    // two lines, given by (Nx / D, Ny / D), where:
-    const Rational  Nx = B1*C2 - B2*C1;
-    const Rational  Ny = A2*C1 - A1*C2;
-    const Rational  D = A1*B2 - A2*B1;
-
-    // Make sure the three points are not collinear.
-    const bool  points_collinear = (CGAL::sign (D) == ZERO);
-
-    if (points_collinear)
-    {
-      _info = 0;           // Inavlid arc.
-      return;
-    }
-
-    // The equation of the underlying circle is given by:
-    Rational          rat_coeffs[6];
-    
-    rat_coeffs[0] = D*D;
-    rat_coeffs[1] = D*D;
-    rat_coeffs[2] = 0;
-    rat_coeffs[3] = -_two*D*Nx;
-    rat_coeffs[4] = -_two*D*Ny;
-    rat_coeffs[5] = 
-      Nx*Nx + Ny*Ny - ((D*x2 - Nx)*(D*x2 - Nx) + (D*y2 - Ny)*(D*y2 - Ny));
-
-    // Determine the orientation: If the mid-point forms a left-turn with
-    // the source and the target points, the orientation is positive (going
-    // counterclockwise).
-    // Otherwise, it is negative (going clockwise).
-    Alg_kernel                         ker;
-    typename Alg_kernel::Orientation_2 orient_f = ker.orientation_2_object();
-
-
-    Point_2  p_mid = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2));
- 
-    if (orient_f(_source, p_mid, _target) == LEFT_TURN)
-      _orient = COUNTERCLOCKWISE;
-    else
-      _orient = CLOCKWISE;
-
-    // Set the arc properties (no need to compute the orientation).
-    _set (rat_coeffs);
-  }
-
-  /*!
-   * Construct a conic arc from the given five points, specified by the
-   * points p1, p2, p3, p4 and p5.
-   * \param p1 The source point of the given arc.
-   * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5.
-   * \param p5 The target point of the given arc.
-   * \pre No three points are collinear.
-   */
-  _Conic_arc_2 (const Rat_point_2& p1,
-		const Rat_point_2& p2,
-		const Rat_point_2& p3,
-		const Rat_point_2& p4,
-		const Rat_point_2& p5) :
-    _extra_data_P(NULL)
-  {
-    // Make sure that no three points are collinear.
-    Rat_kernel                         ker;
-    typename Rat_kernel::Orientation_2 orient_f = ker.orientation_2_object();
-    const bool                         point_collinear =
-      (orient_f (p1, p2, p3) == COLLINEAR ||
-       orient_f (p1, p2, p4) == COLLINEAR ||
-       orient_f (p1, p2, p5) == COLLINEAR ||
-       orient_f (p1, p3, p4) == COLLINEAR ||
-       orient_f (p1, p3, p5) == COLLINEAR ||
-       orient_f (p1, p4, p5) == COLLINEAR ||
-       orient_f (p2, p3, p4) == COLLINEAR ||
-       orient_f (p2, p3, p5) == COLLINEAR ||
-       orient_f (p2, p4, p5) == COLLINEAR ||
-       orient_f (p3, p4, p5) == COLLINEAR);
-
-    if (point_collinear)
-    {
-      _info = 0;           // Inavlid arc.
-      return;
-    }
-
-    // Set the source and target.
-    Rational          x1 = p1.x();
-    Rational          y1 = p1.y();
-    Rational          x5 = p5.x();
-    Rational          y5 = p5.y();
-    Nt_traits         nt_traits;
-
-    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
-    _target = Point_2 (nt_traits.convert (x5), nt_traits.convert (y5));
-
-    // Set a conic curve that passes through the five given point.
-    typename Rat_kernel::Conic_2   temp_conic;
-    Rational                       rat_coeffs [6];
-
-    temp_conic.set (p1, p2, p3, p4, p5);
-
-    // Get the conic coefficients.
-    rat_coeffs[0] = temp_conic.r();
-    rat_coeffs[1] = temp_conic.s();
-    rat_coeffs[2] = temp_conic.t();
-    rat_coeffs[3] = temp_conic.u();
-    rat_coeffs[4] = temp_conic.v();
-    rat_coeffs[5] = temp_conic.w();
-
-    // Determine the orientation: If one of the midpoints forms a left-turn
-    // with the source and the target points, the orientation is positive
-    // (going counterclockwise).
-    // Otherwise, it is negative (going clockwise).
-    const Orientation                  turn = orient_f(p1, p2, p5);
-
-    if (turn == LEFT_TURN)
-    {
-      _orient = COUNTERCLOCKWISE;
-      CGAL_precondition (orient_f(p1, p3, p5) == LEFT_TURN &&
-			 orient_f(p1, p4, p5) == LEFT_TURN);
-    }
-    else
-    {
-      _orient = CLOCKWISE;
-      CGAL_precondition (orient_f(p1, p3, p5) != LEFT_TURN &&
-			 orient_f(p1, p4, p5) != LEFT_TURN);
-    }
-
-    // Set the arc properties (no need to compute the orientation).
-    _set (rat_coeffs);
-
-    // Make sure that all midpoints are strictly between the
-    // source and the target.
-    Point_2  mp2 = Point_2 (nt_traits.convert (p2.x()),
-			    nt_traits.convert (p2.y()));
-    Point_2  mp3 = Point_2 (nt_traits.convert (p3.x()),
-			    nt_traits.convert (p3.y()));
-    Point_2  mp4 = Point_2 (nt_traits.convert (p4.x()),
-			    nt_traits.convert (p4.y()));
-    
-    if (! _is_strictly_between_endpoints (mp2) ||
-	! _is_strictly_between_endpoints (mp3) ||
-	! _is_strictly_between_endpoints (mp4))
-    {
-      _info = 0;               // Inalvid arc.
-    }
-  }
-
-  /*!
-   * Construct a conic arc which lies on the conic:
-   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
-   * The source and the target are specified by the intersection of the
-   * conic with:
-   *   C_1: r_1*x^2 + s_1*y^2 + t_1*xy + u_1*x + v_1*y + w_1 = 0
-   *   C_2: r_2*x^2 + s_2*y^2 + t_2*xy + u_2*x + v_2*y + w_2 = 0
-   * The user must also specify the source and the target with approximated
-   * coordinates. The actual intersection points that best fits the source 
-   * (or the target) will be selected.
-   */
-  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
-		const Rational& u, const Rational& v, const Rational& w,
-		const Orientation& orient,
-		const Point_2& app_source,
-		const Rational& r_1, const Rational& s_1, const Rational& t_1,
-		const Rational& u_1, const Rational& v_1, const Rational& w_1,
-		const Point_2& app_target,
-		const Rational& r_2, const Rational& s_2, const Rational& t_2,
-		const Rational& u_2, const Rational& v_2, const Rational& w_2):
-    _orient(orient),
-    _extra_data_P(NULL)
-  {
-    // Create the integer coefficients of the base conic.
-    Rational          rat_coeffs [6];
-    Nt_traits         nt_traits;
-    Integer           base_coeffs[6];
-    int               deg_base;
-
-    rat_coeffs[0] = r;
-    rat_coeffs[1] = s;
-    rat_coeffs[2] = t;
-    rat_coeffs[3] = u;
-    rat_coeffs[4] = v;
-    rat_coeffs[5] = w;
-
-    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
-                                    base_coeffs);
-
-    if (CGAL::sign (base_coeffs[0]) == ZERO &&
-	CGAL::sign (base_coeffs[1]) == ZERO &&
-	CGAL::sign (base_coeffs[2]) == ZERO)
-    {
-      deg_base = 1;
-    }
-    else
-    {
-      deg_base = 2;
-    }
-
-    // Compute the endpoints.
-    Rational          aux_rat_coeffs [6];
-    Integer           aux_coeffs[6];
-    int               deg_aux;
-    Algebraic         xs[4];
-    int               n_xs;
-    Algebraic         ys[4];
-    int               n_ys;
-    int               i, j;
-    Algebraic         val;
-    bool              found;
-    double            dx, dy;
-    double            curr_dist;
-    double            min_dist = -1;
-    int               k;
-
-    for (k = 1; k <= 2; k++)
-    {
-      // Get the integer coefficients of the k'th auxiliary conic curve.
-      aux_rat_coeffs[0] = (k == 1) ? r_1 : r_2;
-      aux_rat_coeffs[1] = (k == 1) ? s_1 : s_2;
-      aux_rat_coeffs[2] = (k == 1) ? t_1 : t_2;
-      aux_rat_coeffs[3] = (k == 1) ? u_1 : u_2;
-      aux_rat_coeffs[4] = (k == 1) ? v_1 : v_2;
-      aux_rat_coeffs[5] = (k == 1) ? w_1 : w_2;
-
-      nt_traits.convert_coefficients (aux_rat_coeffs, aux_rat_coeffs + 6,
-				      aux_coeffs);
-
-      if (CGAL::sign (aux_coeffs[0]) == ZERO &&
-	  CGAL::sign (aux_coeffs[1]) == ZERO &&
-	  CGAL::sign (aux_coeffs[2]) == ZERO)
-      {
-	deg_aux = 1;
-      }
-      else
-      {
-	deg_aux = 2;
-      }
-
-      // Compute the x- and y-coordinates of intersection points of the base
-      // conic and the k'th auxiliary conic.
-      n_xs = _compute_resultant_roots (nt_traits,
-				       base_coeffs[0], base_coeffs[1],
-				       base_coeffs[2],
-				       base_coeffs[3], base_coeffs[4],
-				       base_coeffs[5],
-				       deg_base,
-				       aux_coeffs[0], aux_coeffs[1],
-				       aux_coeffs[2],
-				       aux_coeffs[3], aux_coeffs[4],
-				       aux_coeffs[5],
-				       deg_aux,
-				       xs);
-
-      n_ys = _compute_resultant_roots (nt_traits,
-				       base_coeffs[1], base_coeffs[0],
-				       base_coeffs[2],
-				       base_coeffs[4], base_coeffs[3],
-				       base_coeffs[5],
-				       deg_base,
-				       aux_coeffs[1], aux_coeffs[0],
-				       aux_coeffs[2],
-				       aux_coeffs[4], aux_coeffs[3],
-				       aux_coeffs[5],
-				       deg_aux,
-				       ys);
-
-      // Find the intersection point which is nearest the given approximation
-      // and set it as the endpoint.
-      found = false;
-      for (i = 0; i < n_xs; i++)
-      {
-	for (j = 0; j < n_ys; j++)
-	{
-	  // Check if the point (xs[i], ys[j]) lies on both conics.
-	  val = nt_traits.convert(base_coeffs[0]) * xs[i]*xs[i] +
-	        nt_traits.convert(base_coeffs[1]) * ys[j]*ys[j] +
-	        nt_traits.convert(base_coeffs[2]) * xs[i]*ys[j] +
-	        nt_traits.convert(base_coeffs[3]) * xs[i] +
-                nt_traits.convert(base_coeffs[4]) * ys[j] +
-	        nt_traits.convert(base_coeffs[5]);
-
-	  if (CGAL::sign (val) != ZERO)
-	    continue;
-
-	  val = nt_traits.convert(aux_coeffs[0]) * xs[i]*xs[i] +
-	        nt_traits.convert(aux_coeffs[1]) * ys[j]*ys[j] +
-	        nt_traits.convert(aux_coeffs[2]) * xs[i]*ys[j] +
-	        nt_traits.convert(aux_coeffs[3]) * xs[i] +
-                nt_traits.convert(aux_coeffs[4]) * ys[j] +
-	        nt_traits.convert(aux_coeffs[5]);
-	  
-	  if (CGAL::sign (val) == ZERO)
-	  {
-	    // Compute the distance of (xs[i], ys[j]) from the approximated
-	    // endpoint.
-	    if (k == 1)
-	    {
-	      dx = CGAL::to_double (xs[i] - app_source.x());
-	      dy = CGAL::to_double (ys[j] - app_source.y());
-	    }
-	    else
-	    {
-	      dx = CGAL::to_double (xs[i] - app_target.x());
-	      dy = CGAL::to_double (ys[j] - app_target.y());
-	    }
-
-	    curr_dist = dx*dx + dy*dy;
-
-	    // Update the endpoint if (xs[i], ys[j]) is the nearest pair so
-	    // far.
-	    if (! found || curr_dist < min_dist)
-	    {
-	      if (k == 1)
-		_source = Point_2 (xs[i], ys[j]);
-	      else
-		_target = Point_2 (xs[i], ys[j]);
-
-	      min_dist = curr_dist;
-	      found = true;
-	    }
-	  }
-	}
-      }
-
-      if (! found)
-      {
-	_info = 0;           // Invalid arc.
-	return;
-      }
-    }
- 
-    // Make sure that the source and the target are not the same.
-    if (Alg_kernel().compare_xy_2_object() (_source,
-					    _target) == EQUAL)
-    {
-      _info = 0;      // Invalid arc.
-      return;
-    }
-
-    // Set the arc properties (no need to compute the orientation).
-    _set (rat_coeffs);
-  }
-
-  /*!
-   * Destructor.
-   */
-  virtual ~_Conic_arc_2 ()
-  {
-    if (_extra_data_P != NULL)
-      delete _extra_data_P;
-  }
-
-  /*!
-   * Assignment operator.
-   * \param arc The copied arc.
-   */
-  const Self& operator= (const Self& arc)
-  {
-    if (this == &arc)
-      return (*this);
-
-    // Free any existing data.
-    if (_extra_data_P != NULL)
-      delete _extra_data_P;
-
-    // Copy the arc's attributes.
-    _r = arc._r;
-    _s = arc._s;
-    _t = arc._t;
-    _u = arc._u;
-    _v = arc._v;
-    _w = arc._w;
-
-    _orient = arc._orient;
-    _info = arc._info;
-    _source = arc._source;
-    _target = arc._target;
-
-    // Duplicate the extra data, if necessary.
-    if (arc._extra_data_P != NULL)
-      _extra_data_P = new Extra_data (*(arc._extra_data_P));
-    else
-      _extra_data_P = NULL;
-
-    return (*this);
-  }
-  //@}
-
-  /// \name Get the arc properties.
-  //@{
-
-  /*!
-   * Check if the arc is valid.
-   */
-  bool is_valid () const
-  {
-    return ((_info & IS_VALID) != 0);
-  }
-
-  /*! 
-   * Get the coefficients of the underlying conic.
-   */
-  const Integer& r () const {return (_r);}
-  const Integer& s () const {return (_s);}
-  const Integer& t () const {return (_t);}
-  const Integer& u () const {return (_u);}
-  const Integer& v () const {return (_v);}
-  const Integer& w () const {return (_w);}
-
-  /*!
-   * Check whether the arc is x-monotone.
-   */
-  bool is_x_monotone () const
-  {
-    // Check if the arc contains no vertical tangency points.
-    Point_2      vtan_ps[2];
-    return (vertical_tangency_points (vtan_ps) == 0);
-  }
-
-  /*!
-   * Check whether the arc is y-monotone.
-   */
-  bool is_y_monotone () const
-  {
-    // Check if the arc contains no horizontal tangency points.
-    Point_2      htan_ps[2];
-    return (horizontal_tangency_points (htan_ps) == 0);
-  }
-
-  /*!
-   * Check whether the arc represents a full conic curve.
-   */
-  bool is_full_conic () const
-  {
-    return ((_info & IS_FULL_CONIC) != 0);
-  }
-
-  /*!
-   * Get the arc's source.
-   * \return The source point.
-   * \pre The arc does not represent a full conic curve.
-   */
-  const Point_2& source () const
-  {
-    CGAL_precondition (! is_full_conic());
-
-    return (_source);
-  }
-
-  /*!
-   * Get the arc's target.
-   * \return The target point.
-   * \pre The arc does not represent a full conic curve.
-   */
-  const Point_2& target () const
-  {
-    CGAL_precondition (! is_full_conic());
-
-    return (_target);
-  }
-
-  /*!
-   * Get the orientation of the arc.
-   * \return The orientation.
-   */
-  Orientation orientation () const
-  {
-    return (_orient);
-  }
-
-  /*!
-   * Get a bounding box for the conic arc.
-   * \return The bounding box.
-   */
-  Bbox_2 bbox () const
-  {
-    CGAL_precondition (is_valid());
-
-    double    x_min = 0, y_min = 0;
-    double    x_max = 0, y_max = 0;
-
-    if (is_full_conic())
-    {
-      // In case of a full conic (an ellipse or a circle), compute the
-      // horizontal and vertical tangency points and use them to bound the arc.
-      Point_2   tan_ps[2];
-      CGAL_assertion_code(int n_tan_ps);
-
-      CGAL_assertion_code(n_tan_ps = vertical_tangency_points(tan_ps));
-      CGAL_assertion(n_tan_ps == 2);
-
-      if (CGAL::to_double(tan_ps[0].x()) < CGAL::to_double(tan_ps[1].x()))
-      {
-        x_min = CGAL::to_double(tan_ps[0].x());
-        x_max = CGAL::to_double(tan_ps[1].x());
-      }
-      else
-      {
-        x_min = CGAL::to_double(tan_ps[1].x());
-        x_max = CGAL::to_double(tan_ps[0].x());
-      }
-
-      CGAL_assertion_code(n_tan_ps = horizontal_tangency_points(tan_ps));
-      CGAL_assertion(n_tan_ps == 2);
-
-      if (CGAL::to_double(tan_ps[0].y()) < CGAL::to_double(tan_ps[1].y()))
-      {
-        y_min = CGAL::to_double(tan_ps[0].y());
-        y_max = CGAL::to_double(tan_ps[1].y());
-      }
-      else
-      {
-        y_min = CGAL::to_double(tan_ps[1].y());
-        y_max = CGAL::to_double(tan_ps[0].y());
-      }
-    }
-    else
-    {
-      // Use the source and target to initialize the exterme points.
-      bool   source_left = 
-        CGAL::to_double(_source.x()) < CGAL::to_double(_target.x());
-      x_min = source_left ?
-        CGAL::to_double(_source.x()) : CGAL::to_double(_target.x());
-      x_max = source_left ?
-        CGAL::to_double(_target.x()) : CGAL::to_double(_source.x());
-      
-      bool   source_down = 
-        CGAL::to_double(_source.y()) < CGAL::to_double(_target.y());
-      y_min = source_down ?
-        CGAL::to_double(_source.y()) : CGAL::to_double(_target.y());
-      y_max = source_down ?
-        CGAL::to_double(_target.y()) : CGAL::to_double(_source.y());
-
-      // Go over the vertical tangency points and try to update the x-points.
-      Point_2    tan_ps[2];
-      int        n_tan_ps;
-      int        i;
-
-      n_tan_ps = vertical_tangency_points (tan_ps);
-      for (i = 0; i < n_tan_ps; i++)
-      {
-        if (CGAL::to_double(tan_ps[i].x()) < x_min)
-          x_min = CGAL::to_double(tan_ps[i].x());
-        if (CGAL::to_double(tan_ps[i].x()) > x_max)
-          x_max = CGAL::to_double(tan_ps[i].x());
-      }
-
-      // Go over the horizontal tangency points and try to update the y-points.
-      n_tan_ps = horizontal_tangency_points (tan_ps);
-      for (i = 0; i < n_tan_ps; i++)
-      {
-        if (CGAL::to_double(tan_ps[i].y()) < y_min)
-          y_min = CGAL::to_double(tan_ps[i].y());
-        if (CGAL::to_double(tan_ps[i].y()) > y_max)
-          y_max = CGAL::to_double(tan_ps[i].y());
-      }
-    }
-
-    // Return the resulting bounding box.
-    return (Bbox_2 (x_min, y_min, x_max, y_max));
-  }
-  //@}
-
-  /// \name Modifying functions.
-  //@{
-
-  /*!
-   * Set the source point of the conic arc.
-   * \param ps The new source point.
-   * \pre The arc is not a full conic curve.
-   *      ps must lie on the supporting conic curve.
-   */
-  void set_source (const Point_2& ps)
-  {
-    CGAL_precondition (! is_full_conic());
-    CGAL_precondition (_is_on_supporting_conic (ps));
-    CGAL_precondition (Alg_kernel().orientation_2_object()
-                       (_source, ps, _target) == _orient ||
-                       Alg_kernel().orientation_2_object()
-                       (ps, _source, _target) == _orient);
-
-    _source = ps;
-    return;
-  }
-
-  /*!
-   * Set the target point of the conic arc.
-   * \param pt The new source point.
-   * \pre The arc is not a full conic curve.
-   *      pt must lie on the supporting conic curve.
-   */
-  void set_target (const Point_2& pt)
-  {
-    CGAL_precondition (! is_full_conic());
-    CGAL_precondition (_is_on_supporting_conic (pt));
-    CGAL_precondition (Alg_kernel().orientation_2_object()
-                       (_source, pt, _target) == _orient ||
-                       Alg_kernel().orientation_2_object()
-                       (_source, _target, pt) == _orient);
-
-    _target = pt;
-    return;
-  }
-
-  //@}
-
-  /// \name Compute points on the arc.
-  //@{
-
-  /*!
-   * Calculate the vertical tangency points of the arc.
-   * \param vpts The vertical tangency points.
-   * \pre The vpts vector should be allocated at the size of 2.
-   * \return The number of vertical tangency points.
-   */
-  int vertical_tangency_points (Point_2* vpts) const
-  {
-    // No vertical tangency points for line segments:
-    if (_orient == COLLINEAR)
-      return (0);
-
-    // Calculate the vertical tangency points of the supporting conic.
-    Point_2 ps[2];
-    int     n;
-
-    n = _conic_vertical_tangency_points (ps);
-
-    // Return only the points that are contained in the arc interior.
-    int    m = 0;
-    
-    for (int i = 0; i < n; i++)
-    {
-      if (is_full_conic() || _is_strictly_between_endpoints(ps[i]))
-      {
-        vpts[m] = ps[i];
-        m++;
-      }
-    }
-
-    // Return the number of vertical tangency points found.
-    CGAL_assertion (m <= 2);
-    return (m);
-  }
-
-  /*!
-   * Calculate the horizontal tangency points of the arc.
-   * \param hpts The horizontal tangency points.
-   * \pre The hpts vector should be allocated at the size of 2.
-   * \return The number of horizontal tangency points.
-   */
-  int horizontal_tangency_points (Point_2* hpts) const
-  {
-    // No horizontal tangency points for line segments:
-    if (_orient == COLLINEAR)
-      return (0);
-
-    // Calculate the horizontal tangency points of the conic.
-    Point_2    ps[2];
-    int        n;
-
-    n = _conic_horizontal_tangency_points (ps);
-
-    // Return only the points that are contained in the arc interior.
-    int    m = 0;
-    
-    for (int i = 0; i < n; i++)
-    {
-      if (is_full_conic() || _is_strictly_between_endpoints(ps[i]))
-      {
-        hpts[m] = ps[i];
-        m++;
-      }
-    }
-
-    // Return the number of horizontal tangency points found.
-    CGAL_assertion (m <= 2);
-    return (m);
-  }
-
-  /*!
-   * Find all points on the arc with a given x-coordinate.
-   * \param p A placeholder for the x-coordinate.
-   * \param ps The point on the arc at x(p).
-   * \pre The vector ps should be allocated at the size of 2.
-   * \return The number of points found.
-   */
-  int points_at_x (const Point_2& p,
-                       Point_2 *ps) const
-  {
-    // Get the y coordinates of the points on the conic.
-    Algebraic    ys[2];
-    int          n;
-
-    n = _conic_get_y_coordinates (p.x(), ys);
-    
-    // Find all the points that are contained in the arc.
-    int   m = 0;
-    
-    for (int i = 0; i < n; i++)
-    {
-      ps[m] = Point_2 (p.x(), ys[i]);
-
-      if (is_full_conic() || _is_between_endpoints(ps[m]))
-        m++;
-    }
-
-    // Return the number of points on the arc.
-    CGAL_assertion (m <= 2);
-    return (m);
-  }
-
-  /*!
-   * Find all points on the arc with a given y-coordinate.
-   * \param p A placeholder for the y-coordinate.
-   * \param ps The point on the arc at x(p).
-   * \pre The vector ps should be allocated at the size of 2.
-   * \return The number of points found.
-   */
-  int points_at_y (const Point_2& p,
-                       Point_2 *ps) const
-  {
-    // Get the y coordinates of the points on the conic.
-    Algebraic    xs[2];
-    int          n;
-
-    n = _conic_get_x_coordinates (p.y(), xs);
-    
-    // Find all the points that are contained in the arc.
-    int   m = 0;
-    
-    for (int i = 0; i < n; i++)
-    {
-      ps[m] = Point_2 (xs[i], p.y());
-
-      if (is_full_conic() || _is_between_endpoints(ps[m]))
-        m++;
-    }
-
-    // Return the number of points on the arc.
-    CGAL_assertion (m <= 2);
-    return (m);
-  }
-  //@}
-
-private:
-
-  /// \name Auxiliary construction functions.
-  //@{
-
-  /*!
-   * Set the properties of a conic arc (for the usage of the constructors).
-   * \param rat_coeffs A vector of size 6, storing the rational coefficients
-   *                   of x^2, y^2, xy, x, y and the free coefficient resp.
-   */
-  void _set (const Rational* rat_coeffs)
-  {
-    _info = IS_VALID;
-
-    // Convert the coefficients vector to an equivalent vector of integer
-    // coefficients.
-    Nt_traits         nt_traits;
-    Integer           int_coeffs[6];
-
-    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
-                                    int_coeffs);
-
-    // Check the orientation of conic curve, and negate the conic coefficients
-    // if its given orientation.
-    typename Rat_kernel::Conic_2   temp_conic (rat_coeffs[0], rat_coeffs[1],
-                                               rat_coeffs[2], rat_coeffs[3],
-                                               rat_coeffs[4], rat_coeffs[5]);
-
-    if (_orient == temp_conic.orientation())
-    {
-      _r = int_coeffs[0];
-      _s = int_coeffs[1];
-      _t = int_coeffs[2];
-      _u = int_coeffs[3];
-      _v = int_coeffs[4];
-      _w = int_coeffs[5];
-    }
-    else
-    {
-      _r = -int_coeffs[0];
-      _s = -int_coeffs[1];
-      _t = -int_coeffs[2];
-      _u = -int_coeffs[3];
-      _v = -int_coeffs[4];
-      _w = -int_coeffs[5];
-    }
-
-    // Make sure both endpoint lie on the supporting conic.
-    if (! _is_on_supporting_conic (_source) ||
-	! _is_on_supporting_conic (_target))
-    {
-      _info = 0;          // Invalid arc.
-      return;
-    }
-
-    _extra_data_P = NULL;
-
-    // Check whether we have a degree 2 curve.
-    if ((CGAL::sign (_r) != ZERO ||
-	 CGAL::sign (_s) != ZERO ||
-	 CGAL::sign (_t) != ZERO))
-    {
-      if (_orient == COLLINEAR)
-      {
-        // We have a segment of a line pair with rational coefficients.
-        // Compose the equation of the underlying line
-        // (with algebraic coefficients).
-        const Algebraic        x1 = _source.x(), y1 = _source.y();
-        const Algebraic        x2 = _target.x(), y2 = _target.y();
-        
-        // The supporting line is A*x + B*y + C = 0, where:
-        //
-        //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2 
-        //
-        // We use the extra dat field to store the equation of this line.
-        _extra_data_P = new Extra_data;
-        _extra_data_P->a = y2 - y1;
-        _extra_data_P->b = x1 - x2;
-        _extra_data_P->c = x2*y1 - x1*y2;
-        _extra_data_P->side = ZERO;
-
-        // Make sure the midpoint is on the line pair (thus making sure that
-        // the two points are not taken from different lines).
-        Alg_kernel       ker;
-        Point_2          p_mid = ker.construct_midpoint_2_object() (_source,
-                                                                    _target);
-        
-        if (CGAL::sign ((nt_traits.convert(_r)*p_mid.x() + 
-                         nt_traits.convert(_t)*p_mid.y() + 
-                         nt_traits.convert(_u)) * p_mid.x() +
-                        (nt_traits.convert(_s)*p_mid.y() +
-                         nt_traits.convert(_v)) * p_mid.y() +
-                        nt_traits.convert(_w)) != ZERO)
-        {
-          _info = 0;          // Invalid arc.
-          return;
-        }
-      }
-      else 
-      {
-        // The sign of (4rs - t^2) detetmines the conic type:
-        // - if it is possitive, the conic is an ellipse,
-        // - if it is negative, the conic is a hyperbola,
-        // - if it is zero, the conic is a parabola.
-        CGAL::Sign   sign_conic = CGAL::sign (4*_r*_s - _t*_t);
-
-        if (sign_conic == NEGATIVE)
-          // Build the extra hyperbolic data
-          _build_hyperbolic_arc_data ();
-
-        if (sign_conic != POSITIVE)
-        {
-          // In case of a non-degenerate parabola or a hyperbola, make sure 
-          // the arc is not infinite.
-          Alg_kernel       ker;
-          Point_2          p_mid = ker.construct_midpoint_2_object() (_source,
-                                                                      _target);
-          Point_2          ps[2];
-
-          bool  finite_at_x = (points_at_x(p_mid, ps) > 0);
-          bool  finite_at_y = (points_at_y(p_mid, ps) > 0);
-      
-          if (! finite_at_x && ! finite_at_y)
-          {
-            _info = 0;          // Invalid arc.
-            return;
-          }
-        }
-      }
-    }
-
-    // Mark that this arc valid and is not a full conic curve.
-    _info = IS_VALID;
-
-    return;
-  }
-
-  /*!
-   * Set the properties of a conic arc that is really a full curve
-   * (that is, an ellipse).
-   * \param rat_coeffs A vector of size 6, storing the rational coefficients
-   *                   of x^2, y^2, xy, x, y and the free coefficient resp.
-   * \param comp_orient Should we compute the orientation of the given curve.
-   */
-  void _set_full (const Rational* rat_coeffs,
-                  const bool& comp_orient)
-  {
-    // Convert the coefficients vector to an equivalent vector of integer
-    // coefficients.
-    Nt_traits         nt_traits;
-    Integer           int_coeffs[6];
-
-    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
-                                    int_coeffs);
-
-    // Check the orientation of conic curve, and negate the conic coefficients
-    // if its given orientation.
-    typename Rat_kernel::Conic_2   temp_conic (rat_coeffs[0], rat_coeffs[1],
-                                               rat_coeffs[2], rat_coeffs[3],
-                                               rat_coeffs[4], rat_coeffs[5]);
-    const Orientation              temp_orient = temp_conic.orientation();
-
-    if (comp_orient)
-      _orient = temp_orient;
-
-    if (_orient == temp_orient)
-    {
-      _r = int_coeffs[0];
-      _s = int_coeffs[1];
-      _t = int_coeffs[2];
-      _u = int_coeffs[3];
-      _v = int_coeffs[4];
-      _w = int_coeffs[5];
-    }
-    else
-    {
-      _r = -int_coeffs[0];
-      _s = -int_coeffs[1];
-      _t = -int_coeffs[2];
-      _u = -int_coeffs[3];
-      _v = -int_coeffs[4];
-      _w = -int_coeffs[5];
-    }
-
-    // Make sure the conic is a non-degenerate ellipse:
-    // The coefficients should satisfy (4rs - t^2) > 0.
-    const bool  is_ellipse = (CGAL::sign (4*_r*_s - _t*_t) == POSITIVE);
-    CGAL_assertion (is_ellipse);
-
-    // We do not have to store any extra data with the arc.
-    _extra_data_P = NULL;
-
-    // Mark that this arc is a full conic curve.
-    if (is_ellipse)
-      _info = IS_VALID | IS_FULL_CONIC;
-    else
-      _info = 0;
-
-    return;
-  }
-
-  /*!
-   * Build the data for hyperbolic arc, contaning the characterization of the
-   * hyperbolic branch the arc is placed on.
-   */
-  void _build_hyperbolic_arc_data ()
-  {
-    // Let phi be the rotation angle of the conic from its canonic form.
-    // We can write:
-    // 
-    //                          t
-    //  sin(2*phi) = -----------------------
-    //                sqrt((r - s)^2 + t^2)
-    // 
-    //                        r - s
-    //  cos(2*phi) = -----------------------
-    //                sqrt((r - s)^2 + t^2)
-    //
-    Nt_traits        nt_traits;
-    const int        or_fact = (_orient == CLOCKWISE) ? -1 : 1;
-    const Algebraic  r = nt_traits.convert (or_fact * _r);
-    const Algebraic  s = nt_traits.convert (or_fact * _s);
-    const Algebraic  t = nt_traits.convert (or_fact * _t);
-    const Algebraic  cos_2phi = (r - s) / nt_traits.sqrt((r-s)*(r-s) + t*t);
-    const Algebraic  _zero = 0;
-    const Algebraic  _one = 1;
-    const Algebraic  _two = 2;
-    Algebraic        sin_phi;
-    Algebraic        cos_phi;
-
-    // Calculate sin(phi) and cos(phi) according to the half-angle formulae:
-    // 
-    //  sin(phi)^2 = 0.5 * (1 - cos(2*phi))
-    //  cos(phi)^2 = 0.5 * (1 + cos(2*phi))
-    Sign             sign_t = CGAL::sign (t);
-
-    if (sign_t == ZERO)
-    {
-      // sin(2*phi) == 0, so phi = 0 or phi = PI/2
-      if (CGAL::sign (cos_2phi) == POSITIVE)
-      {
-        // phi = 0.
-        sin_phi = _zero;
-        cos_phi = _one;
-      }
-      else
-      {
-        // phi = PI/2.
-        sin_phi = _one;
-        cos_phi = _zero;        
-      }
-    }
-    else if (sign_t == POSITIVE)
-    {
-      // sin(2*phi) > 0 so 0 < phi < PI/2.
-      sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two);
-      cos_phi = nt_traits.sqrt((_one - cos_2phi) / _two);
-    }
-    else
-    {
-      // sin(2*phi) < 0 so PI/2 < phi < PI.
-      sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two);
-      cos_phi = -nt_traits.sqrt((_one - cos_2phi) / _two);
-    }
-           
-    // Calculate the center (x0, y0) of the conic, given by the formulae:
-    //
-    //        t*v - 2*s*u                t*u - 2*r*v
-    //  x0 = -------------   ,     y0 = -------------
-    //        4*r*s - t^2                4*r*s - t^2
-    //
-    // The denominator (4*r*s - t^2) must be negative for hyperbolas.
-    const Algebraic  u = nt_traits.convert (or_fact * _u);
-    const Algebraic  v = nt_traits.convert (or_fact * _v);
-    const Algebraic  det = 4*r*s - t*t;
-    Algebraic        x0, y0;
-
-    CGAL_assertion (CGAL::sign (det) == NEGATIVE);
-    
-    x0 = (t*v - _two*s*u) / det;
-    y0 = (t*u - _two*r*v) / det;
-   
-    // The axis separating the two branches of the hyperbola is now given by:
-    // 
-    //  cos(phi)*x + sin(phi)*y - (cos(phi)*x0 + sin(phi)*y0) = 0
-    //
-    // We store the equation of this line in the extra data structure and also
-    // the sign (side of half-plane) our arc occupies with respect to the line.
-    _extra_data_P = new Extra_data;
-
-    _extra_data_P->a = cos_phi;
-    _extra_data_P->b = sin_phi;
-    _extra_data_P->c = - (cos_phi*x0 + sin_phi*y0);
-
-    // Make sure that the two endpoints are located on the same branch
-    // of the hyperbola.
-    _extra_data_P->side = _sign_of_extra_data (_source.x(), _source.y());
-
-    CGAL_assertion (_extra_data_P->side != ZERO);
-    CGAL_assertion (_extra_data_P->side == _sign_of_extra_data(_target.x(),
-							      _target.y()));
-
-    return;
-  }
-  //@}
-
-protected:
-
-  /// \name Auxiliary functions.
-  //@{
-
-  /*!
-   * Evaluate the sign of (a*x + b*y + c) stored with the extra data field
-   * at a given point.
-   * \param px The x-coordinate of query point.
-   * \param py The y-coordinate of query point.
-   * \return The sign of (a*x + b*y + c).
-   */
-  Sign _sign_of_extra_data (const Algebraic& px,
-			    const Algebraic& py) const
-  {
-    CGAL_assertion (_extra_data_P != NULL);
-
-    if (_extra_data_P == NULL)
-      return (ZERO);
-
-    Algebraic         val = (_extra_data_P->a*px + _extra_data_P->b*py + 
-                             _extra_data_P->c);
-
-    return (CGAL::sign (val));
-  }
-
-  /*!
-   * Check whether the given point lies on the supporting conic of the arc.
-   * \param p The query point.
-   * \return (true) if p lies on the supporting conic; (false) otherwise.
-   */
-  bool _is_on_supporting_conic (const Point_2& p) const
-  {
-    // Check whether p satisfies the conic equation.
-    // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0.
-    Nt_traits        nt_traits;
-    const Algebraic  val = (nt_traits.convert(_r)*p.x() + 
-			    nt_traits.convert(_t)*p.y() +
-			    nt_traits.convert(_u)) * p.x() +
-                           (nt_traits.convert(_s)*p.y() + 
-			    nt_traits.convert(_v)) * p.y() +
-                           nt_traits.convert(_w);
-
-    return (CGAL::sign (val) == ZERO);
-  }
- 
-  /*!
-   * Check whether the given point is between the source and the target.
-   * The point is assumed to be on the conic's boundary.
-   * \param p The query point.
-   * \return (true) if the point is between the two endpoints, 
-   *         (false) if it is not.
-   */
-  bool _is_between_endpoints (const Point_2& p) const
-  {
-    CGAL_precondition (! is_full_conic());
-
-    // Check if p is one of the endpoints.
-    Alg_kernel                         ker;
-
-    if (ker.equal_2_object() (p, _source) || 
-        ker.equal_2_object() (p, _target))
-    {
-      return (true);
-    }
-    else
-    {
-      return (_is_strictly_between_endpoints(p));
-    }
-  }
-
-  /*!
-   * Check whether the given point is strictly between the source and the
-   * target (but not any of them).
-   * The point is assumed to be on the conic's boundary.
-   * \param p The query point.
-   * \return (true) if the point is strictly between the two endpoints, 
-   *         (false) if it is not.
-   */
-  bool _is_strictly_between_endpoints (const Point_2& p) const
-  {
-    // In case this is a full conic, any point on its boundary is between
-    // its end points.
-    if (is_full_conic())
-      return (true);
-
-    // Check if we have extra data available.
-    if (_extra_data_P != NULL)
-    {
-      if (_extra_data_P->side != ZERO)
-      {
-        // In case of a hyperbolic arc, make sure the point is located on the
-        // same branch as the arc.
-        if (_sign_of_extra_data(p.x(), p.y()) != _extra_data_P->side)
-          return (false);
-      }
-      else
-      {
-        // In case we have a segment of a line pair, make sure that p really
-        // satisfies the equation of the line.
-        if (_sign_of_extra_data(p.x(), p.y()) != ZERO)
-          return (false);
-      }
-    }
-
-    // Act according to the conic degree.
-    Alg_kernel                         ker;
-
-    if (_orient == COLLINEAR)
-    {
-      Comparison_result  res1;
-      Comparison_result  res2;
-
-      if (ker.compare_x_2_object() (_source, _target) == EQUAL)
-      {
-        // In case of a vertical segment - just check whether the y coordinate
-        // of p is between those of the source's and of the target's.
-        res1 = ker.compare_y_2_object() (p, _source);
-        res2 = ker.compare_y_2_object() (p, _target);
-      }
-      else
-      {
-        // Otherwise, since the segment is x-monotone, just check whether the
-        // x coordinate of p is between those of the source's and of the 
-        // target's.
-        res1 = ker.compare_x_2_object() (p, _source);
-        res2 = ker.compare_x_2_object() (p, _target);
-      }
-
-      // If p is not in the (open) x-range (or y-range) of the segment, it
-      // cannot be contained in the segment.
-      if (res1 == EQUAL || res2 == EQUAL || res1 == res2)
-	return (false);
-
-      // Perform an orientation test: This is crucial for segment of line
-      // pairs, as we want to make sure that p lies on the same line as the
-      // source and the target.
-      return (ker.orientation_2_object()(_source, p, _target) == COLLINEAR);
-    }
-    else
-    {
-      // In case of a conic of degree 2, make a decision based on the conic's
-      // orientation and whether (source,p,target) is a right or a left turn.
-      if (_orient == COUNTERCLOCKWISE)
-        return (ker.orientation_2_object()(_source, p, _target) == LEFT_TURN);
-      else
-        return (ker.orientation_2_object()(_source, p, _target) == RIGHT_TURN);
-    }
-  }
-  
-  /*!
-   * Find the vertical tangency points of the undelying conic.
-   * \param ps The output points of vertical tangency.
-   *           This area must be allocated at the size of 2.
-   * \return The number of vertical tangency points.
-   */
-  int _conic_vertical_tangency_points (Point_2* ps) const
-  {
-    // In case the base conic is of degree 1 (and not 2), the arc has no
-    // vertical tangency points.
-    if (CGAL::sign (_s) == ZERO)
-      return (0);
-
-    // We are interested in the x coordinates where the quadratic equation:
-    //  s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0
-    // has a single solution (obviously if s = 0, there are no such points).
-    // We therefore demand that the discriminant of this equation is zero:
-    //  (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0
-    const Integer _two = 2;
-    const Integer _four = 4;
-    Algebraic     xs[2];
-    Algebraic    *xs_end;
-    int           n_xs;
-    Nt_traits     nt_traits;
-    
-    xs_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s,
-						 _two*_t*_v - _four*_s*_u,
-						 _v*_v - _four*_s*_w,
-						 xs);
-    n_xs = static_cast<int>(xs_end - xs);
-
-    // Find the y-coordinates of the vertical tangency points.
-    Algebraic     ys[2];
-    Algebraic    *ys_end;
-    int           n_ys;
-
-    if (CGAL::sign (_t) == ZERO)
-    {
-      // The two vertical tangency points have the same y coordinate:
-      ys[0] = nt_traits.convert (-_v) /nt_traits.convert (_two*_s);
-      n_ys = 1;
-    }
-    else
-    {
-      ys_end =
-        nt_traits.solve_quadratic_equation (_four*_r*_s*_s - _s*_t*_t,
-                                            _four*_r*_s*_v - _two*_s*_t*_u,
-                                            _r*_v*_v - _t*_u*_v + _t*_t*_w,
-                                            ys);
-      n_ys = static_cast<int>(ys_end - ys);
-    }
-
-    // Pair the x and y coordinates and obtain the vertical tangency points.
-    int   n = 0;
-    int   i, j;
-
-    for (i = 0; i < n_xs; i++)
-    {
-      if (n_ys == 1)
-      {
-        ps[n] = Point_2 (xs[i], ys[0]);
-        n++;
-      }
-      else
-      {
-        for (j = 0; j < n_ys; j++)
-        {
-          if (CGAL::compare (nt_traits.convert(_two*_s) * ys[j],
-                             -(nt_traits.convert(_t) * xs[i] +
-                               nt_traits.convert(_v))) == EQUAL) 
-          {
-            ps[n] = Point_2 (xs[i], ys[j]);
-            n++;
-            break;
-          }
-        }
-      }
-    }
-
-    CGAL_assertion (n <= 2);
-    return (n);
-  }
-
-  /*!
-   * Find the horizontal tangency points of the undelying conic.
-   * \param ps The output points of horizontal tangency.
-   *           This area must be allocated at the size of 2.
-   * \return The number of horizontal tangency points.
-   */
-  int _conic_horizontal_tangency_points (Point_2* ps) const
-  {
-    const Integer _zero = 0;
-
-    // In case the base conic is of degree 1 (and not 2), the arc has no
-    // vertical tangency points.
-    if (CGAL::sign (_r) == ZERO)
-      return (0);
-
-    // We are interested in the y coordinates were the quadratic equation:
-    //  r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0
-    // has a single solution (obviously if r = 0, there are no such points).
-    // We therefore demand that the discriminant of this equation is zero:
-    //  (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0
-    const Integer _two = 2;
-    const Integer _four = 4;
-    int           n;
-    Algebraic     ys[2];
-    Algebraic    *ys_end;
-    Nt_traits     nt_traits;
-
-    ys_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s,
-						 _two*_t*_u - _four*_r*_v,
-						 _u*_u - _four*_r*_w,
-						 ys);
-    n = static_cast<int>(ys_end - ys);
-
-    // Compute the x coordinates and construct the horizontal tangency points.
-    Algebraic     x;
-    int           i;
-
-    for (i = 0; i < n; i++)
-    {
-      // Having computed y, x is the single solution to the quadratic equation
-      // above, and since its discriminant is 0, x is simply given by:
-      x = -(nt_traits.convert(_t)*ys[i] + nt_traits.convert(_u)) / 
-        nt_traits.convert(_two*_r);
-
-      ps[i] = Point_2 (x, ys[i]);
-    }
-      
-    CGAL_assertion (n <= 2);
-    return (n);
-  }
-
-  /*!
-   * Find the y coordinates of the underlying conic at a given x coordinate.
-   * \param x The x coordinate.
-   * \param ys The output y coordinates. 
-   * \pre The vector ys must be allocated at the size of 2.
-   * \return The number of y coordinates computed (either 0, 1 or 2).
-   */
-  int _conic_get_y_coordinates (const Algebraic& x,
-                                Algebraic *ys) const
-  {
-    // Solve the quadratic equation for a given x and find the y values:
-    //  s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0
-    Nt_traits     nt_traits;
-    Algebraic     A = nt_traits.convert(_s);
-    Algebraic     B = nt_traits.convert(_t)*x + nt_traits.convert(_v);
-    Algebraic     C = (nt_traits.convert(_r)*x + 
-                       nt_traits.convert(_u))*x + nt_traits.convert(_w);
-
-    return (_solve_quadratic_equation (A, B, C, ys[0], ys[1]));
-  }
-
-  /*!
-   * Find the x coordinates of the underlying conic at a given y coordinate.
-   * \param y The y coordinate.
-   * \param xs The output x coordinates. 
-   * \pre The vector xs must be allocated at the size of 2.
-   * \return The number of x coordinates computed (either 0, 1 or 2).
-   */
-  int _conic_get_x_coordinates (const Algebraic& y,
-                                Algebraic *xs) const
-  {
-    // Solve the quadratic equation for a given y and find the x values:
-    //  r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0
-    Nt_traits     nt_traits;
-    Algebraic     A = nt_traits.convert(_r);
-    Algebraic     B = nt_traits.convert(_t)*y + nt_traits.convert(_u);
-    Algebraic     C = (nt_traits.convert(_s)*y + 
-                       nt_traits.convert(_v))*y + nt_traits.convert(_w);
-
-    return (_solve_quadratic_equation (A, B, C, xs[0], xs[1]));
-  }
-
-  /*!
-   * Solve the given quadratic equation: Ax^2 + B*x + C = 0.
-   * \param x_minus The root obtained from taking -sqrt(discriminant).
-   * \param x_plus The root obtained from taking -sqrt(discriminant).
-   * \return The number of disticnt solutions to the equation.
-   */
-  int _solve_quadratic_equation (const Algebraic& A,
-                                 const Algebraic& B,
-                                 const Algebraic& C,
-                                 Algebraic& x_minus, Algebraic& x_plus) const
-  {
-    // Check if we actually have a linear equation.
-    if (CGAL::sign(A) == ZERO)
-    {
-      if (CGAL::sign(B) == ZERO)
-	return (0);
-
-      x_minus = x_plus = -C / B;
-      return (1);
-    }
-
-    // Compute the discriminant and act according to its sign.
-    const Algebraic  disc = B*B - 4*A*C;
-    Sign             sign_disc = CGAL::sign (disc);
-
-    if (sign_disc == NEGATIVE)
-    {
-      // No real-valued solutions:
-      return (0);
-    }
-    else if (sign_disc == ZERO)
-    {
-      // One distinct solution:
-      x_minus = x_plus = -B / (2*A);
-      return (1);
-    }
-
-    // Compute the two distinct solutions:
-    Algebraic     _2A = 2*A;
-    Nt_traits     nt_traits;
-    Algebraic     sqrt_disc = nt_traits.sqrt (disc);
-
-    x_minus = -(B + sqrt_disc) / _2A;
-    x_plus = (sqrt_disc - B) / _2A;
-    return (2);
-  }
-  //@}
-
-};
-
-/*!
- * Exporter for conic arcs.
- */
-template <class Rat_kernel, class Alg_kernel, class Nt_traits>
-std::ostream& 
-operator<< (std::ostream& os, 
-            const _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits> & arc)
-{
-  os << "{" << CGAL::to_double(arc.r()) << "*x^2 + "
-     << CGAL::to_double(arc.s()) << "*y^2 + "
-     << CGAL::to_double(arc.t()) << "*xy + " 
-     << CGAL::to_double(arc.u()) << "*x + "
-     << CGAL::to_double(arc.v()) << "*y + "
-     << CGAL::to_double(arc.w()) << "}";
-
-  if (arc.is_full_conic())
-  {
-    os << " - Full curve";
-  }
-  else
-  {
-    os << " : (" << CGAL::to_double(arc.source().x()) << "," 
-       << CGAL::to_double(arc.source().y()) << ") ";
-
-    if (arc.orientation() == CLOCKWISE)
-      os << "--cw-->";
-    else if (arc.orientation() == COUNTERCLOCKWISE)
-      os << "--ccw-->";
-    else
-      os << "--l-->";
-
-    os << " (" << CGAL::to_double(arc.target().x()) << "," 
-       << CGAL::to_double(arc.target().y()) << ")";
-  }
-
-  return (os);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
deleted file mode 100644
index a385ce3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
+++ /dev/null
@@ -1,2140 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein <wein at post.tau.ac.il>
-
-#ifndef CGAL_CONIC_X_MONOTONE_ARC_2_H
-#define CGAL_CONIC_X_MONOTONE_ARC_2_H
-
-/*! \file
- * Header file for the _Conic_x_monotone_arc_2<Conic_arc_2> class.
- */
-
-#include <CGAL/Arr_geometry_traits/Conic_intersections_2.h>
-
-#include <map>
-#include <ostream>
-
-namespace CGAL {
-
-/*!
- * Representation of an x-monotone conic arc.
- * The class is templated by a representation of a general bounded conic arc.
- */
-
-template <class Conic_arc_>
-class _Conic_x_monotone_arc_2 : private Conic_arc_
-{
-public:
-
-  typedef Conic_arc_                              Conic_arc_2;
-  typedef _Conic_x_monotone_arc_2<Conic_arc_2>    Self;
-  
-  typedef typename Conic_arc_2::Alg_kernel        Alg_kernel;
-  typedef typename Conic_arc_2::Algebraic         Algebraic;
-
-  typedef typename Conic_arc_2::Point_2           Point_2;
-  typedef typename Conic_arc_2::Conic_point_2     Conic_point_2;
-
-  // Type definition for the intersection points mapping.
-  typedef typename Conic_point_2::Conic_id        Conic_id;
-  typedef std::pair<Conic_id, Conic_id>           Conic_pair;
-  typedef std::pair<Conic_point_2, unsigned int>  Intersection_point_2;
-  typedef std::list<Intersection_point_2>         Intersection_list;
-
-  using Conic_arc_2::_sign_of_extra_data;
-  using Conic_arc_2::_is_between_endpoints;
-  using Conic_arc_2::_is_strictly_between_endpoints;
-  using Conic_arc_2::_conic_get_y_coordinates;
-  /*!
-   * \struct Less functor for Conic_pair.
-   */
-  struct Less_conic_pair
-  {
-    bool operator() (const Conic_pair& cp1, const Conic_pair& cp2) const
-    {
-      // Compare the pairs of IDs lexicographically.
-      return (cp1.first < cp2.first ||
-              (cp1.first == cp2.first && cp1.second < cp2.second));
-    }
-  };
-
-  typedef std::map<Conic_pair,
-                   Intersection_list,
-                   Less_conic_pair>               Intersection_map;
-  typedef typename Intersection_map::value_type   Intersection_map_entry;
-  typedef typename Intersection_map::iterator     Intersection_map_iterator;
-
-protected:
-  
-  typedef Conic_arc_2                             Base;
-
-  typedef typename Conic_arc_2::Integer           Integer;
-  typedef typename Conic_arc_2::Nt_traits         Nt_traits;
-  typedef typename Conic_arc_2::Rat_kernel        Rat_kernel;
-
-  // Bit masks for the _info field (the two least significant bits are already
-  // used by the base class).
-  enum
-  {
-    IS_VERTICAL_SEGMENT = 4,
-    IS_DIRECTED_RIGHT = 8,
-    DEGREE_1 = 16,
-    DEGREE_2 = 32,
-    DEGREE_MASK = 16 + 32,
-    PLUS_SQRT_DISC_ROOT = 64,
-    FACING_UP = 128,
-    FACING_DOWN = 256,
-    FACING_MASK = 128 + 256,
-    IS_SPECIAL_SEGMENT = 512
-  };
-
-  Algebraic      alg_r;      // The coefficients of the supporting conic curve:
-  Algebraic      alg_s;      //
-  Algebraic      alg_t;      //   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 ,
-  Algebraic      alg_u;      //
-  Algebraic      alg_v;      // converted to algebraic numbers.
-  Algebraic      alg_w;      //
-
-  Conic_id      _id;         // The ID number of the supporting conic curve.
-    
-public:
-
-  /// \name Constrcution methods.
-  //@{
-
-  /*!
-   * Default constructor.
-   */
-  _Conic_x_monotone_arc_2 () :
-    Base (),
-    _id ()
-  {}
-
-  /*!
-   * Copy constructor.
-   * \param arc The copied arc.
-   */
-  _Conic_x_monotone_arc_2 (const Self& arc) :
-    Base (arc),
-    alg_r (arc.alg_r),
-    alg_s (arc.alg_s),
-    alg_t (arc.alg_t),
-    alg_u (arc.alg_u),
-    alg_v (arc.alg_v),
-    alg_w (arc.alg_w),
-    _id (arc._id)
-  {}
-
-  /*!
-   * Construct an x-monotone arc from a conic arc.
-   * \param arc The given (base) arc.
-   * \pre The given arc is x-monotone.
-   */
-  _Conic_x_monotone_arc_2 (const Base& arc) :
-    Base (arc),
-    _id ()
-  {
-    CGAL_precondition (arc.is_valid() && arc.is_x_monotone());
-
-    _set ();
-  }
-
-  /*!
-   * Construct an x-monotone arc from a conic arc.
-   * \param arc The given (base) arc.
-   * \param id The ID of the base arc.
-   */
-  _Conic_x_monotone_arc_2 (const Base& arc,
-                           const Conic_id& id) :
-    Base (arc),
-    _id (id)
-  {
-    CGAL_precondition (arc.is_valid() && id.is_valid());
-
-    _set ();
-  }
-
-  /*!
-   * Construct an x-monotone sub-arc from a conic arc.
-   * \param arc The given (base) arc.
-   * \param source The source point.
-   * \param target The target point.
-   * \param id The ID of the base arc.
-   */
-  _Conic_x_monotone_arc_2 (const Base& arc,
-                           const Point_2& source, const Point_2& target,
-                           const Conic_id& id) :
-    Base (arc),
-    _id (id)
-  {
-    CGAL_precondition (arc.is_valid() && id.is_valid());
-
-    // Set the two endpoints.
-    this->_source = source;
-    this->_target = target;
-
-    _set();
-  }
-
-  /*!
-   * Construct a special segment connecting to given endpoints (for the usage
-   * of the landmarks point-location strategy).
-   * \param source The source point.
-   * \param target The target point.
-   */
-  _Conic_x_monotone_arc_2 (const Point_2& source, const Point_2& target) :
-    Base()
-  {
-    // Set the basic properties and clear the _info bits.
-    this->_source = source;
-    this->_target = target;
-    this->_orient = COLLINEAR;
-    this->_info = 0;
- 
-    // Check if the arc is directed right (the target is lexicographically
-    // greater than the source point), or to the left.
-    Alg_kernel         ker;
-    Comparison_result  dir_res = ker.compare_xy_2_object() (this->_source,
-                                                            this->_target);
-
-    CGAL_precondition (dir_res != EQUAL);
-    if (dir_res == EQUAL)
-      // Invalid arc:
-      return;
-
-    this->_info = (Conic_arc_2::IS_VALID | DEGREE_1);
-    if (dir_res == SMALLER)
-      this->_info = (this->_info | IS_DIRECTED_RIGHT);
-
-    // Compose the equation of the underlying line.
-    const Algebraic        x1 = source.x(), y1 = source.y();
-    const Algebraic        x2 = target.x(), y2 = target.y();
-
-    // The supporting line is A*x + B*y + C = 0, where:
-    //
-    //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2 
-    //
-    // We use the extra data field to store the equation of this line.
-    this->_extra_data_P = new typename Base::Extra_data;
-    this->_extra_data_P->a = y2 - y1;
-    this->_extra_data_P->b = x1 - x2;
-    this->_extra_data_P->c = x2*y1 - x1*y2;
-    this->_extra_data_P->side = ZERO;
-
-    // Check if the segment is vertical.
-    if (CGAL::sign (this->_extra_data_P->b) == ZERO)
-      this->_info = (this->_info | IS_VERTICAL_SEGMENT);
-
-    // Mark that this is a special segment.
-    this->_info = (this->_info | IS_SPECIAL_SEGMENT);
-
-    return;
-  }
-
-  /*!
-   * Construct a special segment of a given line connecting to given
-   * endpoints.
-   * \param a, b, c The coefficients of the supporting line (ax + by + c = 0).
-   * \param source The source point.
-   * \param target The target point.
-   */
-  _Conic_x_monotone_arc_2 (const Algebraic& a,
-                           const Algebraic& b,
-                           const Algebraic& c,
-                           const Point_2& source, const Point_2& target) :
-    Base()
-  {
-    // Make sure the two endpoints lie on the supporting line.
-    CGAL_precondition (CGAL::sign (a * source.x() +
-                                   b * source.y() + c) == CGAL::ZERO);
-
-    CGAL_precondition (CGAL::sign (a * target.x() +
-                                   b * target.y() + c) == CGAL::ZERO);
-
-    // Set the basic properties and clear the _info bits.
-    this->_source = source;
-    this->_target = target;
-    this->_orient = COLLINEAR;
-    this->_info = 0;
- 
-    // Check if the arc is directed right (the target is lexicographically
-    // greater than the source point), or to the left.
-    Alg_kernel         ker;
-    Comparison_result  res = ker.compare_x_2_object() (this->_source,
-                                                       this->_target);
-
-    this->_info = (Conic_arc_2::IS_VALID | DEGREE_1);
-    if (res == EQUAL)
-    {
-      // Mark that the segment is vertical.
-      this->_info = (this->_info | IS_VERTICAL_SEGMENT);
-
-      // Compare the endpoints lexicographically.
-      res = ker.compare_y_2_object() (this->_source,
-                                      this->_target);
-
-      CGAL_precondition (res != EQUAL);
-      if (res == EQUAL)
-      {
-        // Invalid arc:
-        this->_info = 0;
-        return;
-      }
-    }
-
-    if (res == SMALLER)
-      this->_info = (this->_info | IS_DIRECTED_RIGHT);
-
-    // Store the coefficients of the line.
-    this->_extra_data_P = new typename Base::Extra_data;
-    this->_extra_data_P->a = a;
-    this->_extra_data_P->b = b;
-    this->_extra_data_P->c = c;
-    this->_extra_data_P->side = ZERO;
-
-    // Mark that this is a special segment.
-    this->_info = (this->_info | IS_SPECIAL_SEGMENT);
-
-    return;
-  } 
-
-  /*!
-   * Assignment operator.
-   * \param arc The copied arc.
-   */
-  const Self& operator= (const Self& arc)
-  {
-    CGAL_precondition (arc.is_valid());
-
-    if (this == &arc)
-      return (*this);
-
-    // Copy the base arc.
-    Base::operator= (arc);
-
-    // Set the rest of the properties.
-    alg_r = arc.alg_r;
-    alg_s = arc.alg_s;
-    alg_t = arc.alg_t;
-    alg_u = arc.alg_u;
-    alg_v = arc.alg_v;
-    alg_w = arc.alg_w;
-
-    _id = arc._id;
-
-    return (*this);
-  }
-  //@}
-
-  /// \name Accessing the arc properties.
-  //@{
-
-  /*! 
-   * Get the coefficients of the underlying conic.
-   */
-  const Integer& r () const {return (this->_r);}
-  const Integer& s () const {return (this->_s);}
-  const Integer& t () const {return (this->_t);}
-  const Integer& u () const {return (this->_u);}
-  const Integer& v () const {return (this->_v);}
-  const Integer& w () const {return (this->_w);}
-
-  /*!
-   * Get the arc's source.
-   * \return The source point.
-   */
-  const Conic_point_2& source () const
-  {
-    return (this->_source);
-  }
-
-  /*!
-   * Get the arc's target.
-   * \return The target point.
-   */
-  const Conic_point_2& target () const
-  {
-    return (this->_target);
-  }
-
-  /*!
-   * Get the orientation of the arc.
-   * \return The orientation.
-   */
-  Orientation orientation () const
-  {
-    return (this->_orient);
-  }
-
-  /*!
-   * Get the left endpoint of the arc.
-   */
-  const Conic_point_2& left () const
-  {
-    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
-      return (this->_source);
-    else
-      return (this->_target);
-  }
-
-  /*!
-   * Get the right endpoint of the arc.
-   */
-  const Conic_point_2& right () const
-  {
-    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
-      return (this->_target);
-    else
-      return (this->_source);
-  }
-
-  /*!
-   * Return true iff the conic arc is directed right iexicographically.
-   */
-  bool is_directed_right() const
-  {
-    return ((this->_info & IS_DIRECTED_RIGHT) != 0);
-  }
-
-  /*!
-   * Get a bounding box for the conic arc.
-   * \return The bounding box.
-   */
-  Bbox_2 bbox () const
-  {
-    return (Base::bbox());
-  }
-  //@}
-
-  /// \name Predicates.
-  //@{
-
-  /*!
-   * Check if the conic arc is a vertical segment.
-   */
-  bool is_vertical () const
-  {
-    return ((this->_info & IS_VERTICAL_SEGMENT) != 0);
-  }
-
-  /*!
-   * Check whether the given point lies on the arc.
-   * \param p The qury point.
-   * \param (true) if p lies on the arc; (false) otherwise.
-   */
-  bool contains_point (const Conic_point_2& p) const
-  {
-    // First check if p lies on the supporting conic. We first check whether
-    // it is one of p's generating conic curves.
-    bool       p_on_conic = false;
-
-    if (p.is_generating_conic (_id))
-    {
-      p_on_conic = true;
-    }
-    else
-    {
-      // Check whether p satisfies the supporting conic equation.
-      p_on_conic = _is_on_supporting_conic (p.x(), p.y());
-
-      if (p_on_conic)
-      {
-        // As p lies on the supporting conic of our arc, add its ID to
-        // the list of generating conics for p.
-        Conic_point_2&  p_non_const = const_cast<Conic_point_2&> (p);
-        p_non_const.set_generating_conic (_id);
-      }
-    }
-
-    if (! p_on_conic)
-      return (false);
-
-    // Check if p is between the endpoints of the arc.
-    return (_is_between_endpoints (p));
-  }
-  //@}
-
-  /// \name Constructing points on the arc.
-  //@{
-
-  /*!
-   * Compute a point on the arc with the same x-coordiante as the given point.
-   * \param p The given point.
-   * \pre The arc is not vertical and p is in the x-range of the arc.
-   * \return A point on the arc with the same x-coordiante as p.
-   */
-  Point_2 point_at_x (const Point_2& p) const
-  {
-    // Make sure that p is in the x-range of the arc.
-    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0);
-
-    CGAL_precondition_code (
-      Alg_kernel   ker;
-    );
-
-    CGAL_precondition (ker.compare_x_2_object() (p, left()) != SMALLER &&
-                       ker.compare_x_2_object() (p, right()) != LARGER);
-
-    if (_is_special_segment())
-    {
-      // In case of a special segment, the equation of the supported line
-      // (a*x + b*y + c) = 0 is stored with the extra data field, and we
-      // simply have:
-      Algebraic        _y = -(this->_extra_data_P->a*p.x() + 
-                              this->_extra_data_P->c) /
-                            this->_extra_data_P->b;
-
-      // Return the computed point.
-      return (Point_2 (p.x(), _y));
-    }
-
-    // Compute the y-coordinate according to the degree of the supporting
-    // conic curve.
-    Nt_traits        nt_traits;
-    Algebraic        y;
-
-    if ((this->_info & DEGREE_MASK) == DEGREE_1)
-    {
-      // In case of a linear curve, the y-coordinate is a simple linear
-      // expression of x(p) (note that v is not 0 as the arc is not vertical):
-      //   y = -(u*x(p) + w) / v
-      y = -(alg_u*p.x() + alg_w) / alg_v;
-    }
-    else if (this->_orient == COLLINEAR)
-    {
-      CGAL_assertion (this->_extra_data_P != NULL);
-
-      // In this case the equation of the supporting line is given by the
-      // extra data structure.
-      y = -(this->_extra_data_P->a * p.x() +
-            this->_extra_data_P->c) / this->_extra_data_P->b;
-    }
-    else
-    {
-      CGAL_assertion ((this->_info & DEGREE_MASK) == DEGREE_2);
-
-      // In this case the y-coordinate is one of solutions to the quadratic
-      // equation:
-      //  s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0
-      Algebraic  A = alg_s;
-      Algebraic  B = alg_t*p.x() + alg_v;
-      Algebraic  C = (alg_r*p.x() + alg_u)*p.x() + alg_w;
-
-      if (CGAL::sign(this->_s) == ZERO)
-      {
-        // In this case A is 0 and we have a linear equation.
-        CGAL_assertion (CGAL::sign (B) != ZERO);
-
-        y = -C / B;
-      }
-      else
-      {
-        // Solve the quadratic equation.
-        Algebraic  disc = B*B - 4*A*C;
-
-        CGAL_assertion (CGAL::sign (disc) != NEGATIVE);
-
-        // We take either the root involving -sqrt(disc) or +sqrt(disc)
-        // based on the information flags.
-        if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0)
-        {
-          y = (nt_traits.sqrt (disc) - B) / (2*A);
-        }
-        else
-
-        {
-          y = -(B + nt_traits.sqrt (disc)) / (2*A);
-        }
-      }
-    }
-
-    // Return the computed point.
-    return (Point_2 (p.x(), y));
-  }
-
-  /*!
-   * Get a polyline approximating the conic arc.
-   * \param n The maximal number of sample points.
-   * \param oi An output iterator, whose value-type is pair<double,double>
-   *           (representing an approximated point).
-   *           In case the arc is a line segment, there are 2 output points,
-   *           otherwise the arc is approximated by the polyline defined by
-   *           (p_0, p_1, ..., p_n), where p_0 and p_n are the left and right
-   *           endpoints of the arc, respectively.
-   */
-  template <class OutputIterator>
-  OutputIterator polyline_approximation (size_t n,
-                                         OutputIterator oi) const
-  {
-    CGAL_precondition (n != 0);
-
-    const double  x_left = CGAL::to_double (left().x());
-    const double  y_left = CGAL::to_double (left().y());
-    const double  x_right = CGAL::to_double (right().x());
-    const double  y_right = CGAL::to_double (right().y());
-
-    if (this->_orient == COLLINEAR)
-    {
-      // In case of a line segment, return the two endpoints.
-      *oi = std::pair<double, double> (x_left, y_left);
-      ++oi;
-      *oi = std::pair<double, double> (x_right, y_right);
-      ++oi;
-      return (oi);
-    }
-    
-    // Otherwise, sample (n - 1) equally-spaced points in between.
-    const double  app_r = CGAL::to_double (this->_r);
-    const double  app_s = CGAL::to_double (this->_s);
-    const double  app_t = CGAL::to_double (this->_t);
-    const double  app_u = CGAL::to_double (this->_u);
-    const double  app_v = CGAL::to_double (this->_v);
-    const double  app_w = CGAL::to_double (this->_w);
-    const double  x_jump = (x_right - x_left) / n;
-    double        x, y;
-    const bool    A_is_zero = (CGAL::sign(this->_s) == ZERO);
-    double        A = app_s, B, C;
-    double        disc;
-    size_t        i;
-
-    *oi = std::pair<double, double> (x_left, y_left);   // The left point.
-    ++oi;
-    for (i = 1; i < n; i++)
-    {
-      x = x_left + x_jump*i;
-
-      // Solve the quadratic equation: A*x^2 + B*x + C = 0:
-      B = app_t*x + app_v;
-      C = (app_r*x + app_u)*x + app_w;
-
-      if (A_is_zero)
-      {
-        y = -C / B;
-      }
-      else
-      {
-        disc = B*B - 4*A*C;
-
-        if (disc < 0)
-          disc = 0;
-
-        // We take either the root involving -sqrt(disc) or +sqrt(disc)
-        // based on the information flags.
-        if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0)
-        {
-          y = (std::sqrt(disc) - B) / (2*A);
-        }
-        else
-        {
-          y = -(B + std::sqrt (disc)) / (2*A);
-        }
-      }
-
-      *oi = std::pair<double, double> (x, y);
-      ++oi;
-    }
-    *oi = std::pair<double, double> (x_right, y_right);   // The right point.
-    ++oi;
-
-    return (oi);
-  }
-
-  /*!
-   * Compare to arcs immediately to the right of their intersection point.
-   * \param arc The compared arc.
-   * \param p The reference intersection point.
-   * \return The relative position of the arcs to the right of p.
-   * \pre Both arcs we compare are not vertical segments.
-   */
-  Comparison_result compare_to_right (const Self& arc,
-                                      const Conic_point_2& p) const
-  {
-    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0 &&
-                       (arc._info & IS_VERTICAL_SEGMENT) == 0);
-
-    // In case one arc is facing upwards and another facing downwards, it is
-    // clear that the one facing upward is above the one facing downwards.
-    if (_has_same_supporting_conic (arc))
-    {
-      if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
-        return (LARGER);
-      else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP) != 0)
-        return (SMALLER);
-
-      // In this case the two arcs overlap.
-      CGAL_assertion ((this->_info & FACING_MASK) == 
-                      (arc._info & FACING_MASK));
-
-      return (EQUAL);
-    }
-
-    // Compare the slopes of the two arcs at p, using their first-order
-    // partial derivatives.
-    Algebraic      slope1_numer, slope1_denom;
-    Algebraic      slope2_numer, slope2_denom;
-
-    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
-    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
-
-    // Check if any of the slopes is vertical.
-    const bool     is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO);
-    const bool     is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO);
-
-    if (!is_vertical_slope1 && !is_vertical_slope2)
-    {
-      // The two derivatives at p are well-defined: use them to determine
-      // which arc is above the other (the one with a larger slope is below).
-      Comparison_result slope_res = CGAL::compare (slope1_numer*slope2_denom,
-                                                   slope2_numer*slope1_denom);
-
-      if (slope_res != EQUAL)
-        return (slope_res);
-
-      // Use the second-order derivative.
-      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
-      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
-
-      slope_res = CGAL::compare (slope1_numer*slope2_denom,
-                                 slope2_numer*slope1_denom);
-
-      if (slope_res != EQUAL)
-        return (slope_res);
-
-      // Use the third-order derivative.
-      _derive_by_x_at (p, 3, slope1_numer, slope1_denom);
-      arc._derive_by_x_at (p, 3, slope2_numer, slope2_denom);
-      
-      slope_res = CGAL::compare (slope1_numer*slope2_denom,
-                                 slope2_numer*slope1_denom);
-
-      // \todo Handle higher-order derivatives:
-      CGAL_assertion (slope_res != EQUAL);
-
-      return (slope_res);
-    }
-    else if (!is_vertical_slope2)
-    {
-      // The first arc has a vertical slope at p: check whether it is
-      // facing upwards or downwards and decide accordingly.
-      CGAL_assertion ((this->_info & FACING_MASK) != 0);
-
-      if ((this->_info & FACING_UP) != 0)
-        return (LARGER);
-      return (SMALLER);
-    }
-    else if (!is_vertical_slope1)
-    {
-      // The second arc has a vertical slope at p_int: check whether it is
-      // facing upwards or downwards and decide accordingly.
-      CGAL_assertion ((arc._info & FACING_MASK) != 0);
-
-      if ((arc._info & FACING_UP) != 0)
-        return (SMALLER);
-      return (LARGER);
-    }
-
-    // The two arcs have vertical slopes at p_int:
-    // First check whether one is facing up and one down. In this case the
-    // comparison result is trivial.
-    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
-      return (LARGER);
-    else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
-      return (SMALLER);
-
-    // Compute the second-order derivative by y and act according to it.
-    _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
-    arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
-
-    Comparison_result slope_res = CGAL::compare (slope1_numer*slope2_denom,
-                                                 slope2_numer*slope1_denom);
-
-    // If necessary, use the third-order derivative by y.
-    if (slope_res == EQUAL)
-    {
-      // \todo Check this!
-      _derive_by_y_at (p, 3, slope1_numer, slope1_denom);
-      arc._derive_by_y_at (p, 3, slope2_numer, slope2_denom);
-      
-      slope_res = CGAL::compare (slope2_numer*slope1_denom,
-                                 slope1_numer*slope2_denom);
-    }
-
-    // \todo Handle higher-order derivatives:
-    CGAL_assertion(slope_res != EQUAL);
-
-    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0)
-    {
-      // Both are facing up.
-      return ((slope_res == LARGER) ? SMALLER : LARGER);
-    }
-    // Both are facing down.
-    return (slope_res);
-  }
-
-  /*!
-   * Compare to arcs immediately to the leftt of their intersection point.
-   * \param arc The compared arc.
-   * \param p The reference intersection point.
-   * \return The relative position of the arcs to the left of p.
-   * \pre Both arcs we compare are not vertical segments.
-   */
-  Comparison_result compare_to_left (const Self& arc,
-                                     const Conic_point_2& p) const
-  {
-    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0 &&
-                       (arc._info & IS_VERTICAL_SEGMENT) == 0);
-
-    // In case one arc is facing upwards and another facing downwards, it is
-    // clear that the one facing upward is above the one facing downwards.
-    if (_has_same_supporting_conic (arc))
-    {
-      if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
-        return (LARGER);
-      else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
-        return (SMALLER);
-
-      // In this case the two arcs overlap.
-      CGAL_assertion ((this->_info & FACING_MASK) == 
-                      (arc._info & FACING_MASK));
-
-      return (EQUAL);
-    }
-
-    // Compare the slopes of the two arcs at p, using their first-order
-    // partial derivatives.
-    Algebraic      slope1_numer, slope1_denom;
-    Algebraic      slope2_numer, slope2_denom;
-
-    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
-    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
-
-    // Check if any of the slopes is vertical.
-    const bool     is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO);
-
-    const bool     is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO);
-
-    if (!is_vertical_slope1 && !is_vertical_slope2)
-    {
-      // The two derivatives at p are well-defined: use them to determine
-      // which arc is above the other (the one with a larger slope is below).
-      Comparison_result  slope_res = CGAL::compare(slope2_numer*slope1_denom,
-                                                   slope1_numer*slope2_denom);
-
-      if (slope_res != EQUAL)
-        return (slope_res);
-
-      // Use the second-order derivative.
-      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
-      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
-
-      slope_res = CGAL::compare (slope1_numer*slope2_denom,
-                                 slope2_numer*slope1_denom);
-
-      if (slope_res != EQUAL)
-        return (slope_res);
-
-      // Use the third-order derivative.
-      _derive_by_x_at (p, 3, slope1_numer, slope1_denom);
-      arc._derive_by_x_at (p, 3, slope2_numer, slope2_denom);
-      
-      slope_res = CGAL::compare (slope2_numer*slope1_denom,
-                                 slope1_numer*slope2_denom);
-
-      // \todo Handle higher-order derivatives:
-      CGAL_assertion (slope_res != EQUAL);
-
-      return (slope_res);
-    }
-    else if (!is_vertical_slope2)
-    {
-      // The first arc has a vertical slope at p: check whether it is
-      // facing upwards or downwards and decide accordingly.
-      CGAL_assertion ((this->_info & FACING_MASK) != 0);
-
-      if ((this->_info & FACING_UP) != 0)
-        return (LARGER);
-      return (SMALLER);
-    }
-    else if (!is_vertical_slope1)
-    {
-      // The second arc has a vertical slope at p_int: check whether it is
-      // facing upwards or downwards and decide accordingly.
-      CGAL_assertion ((arc._info & FACING_MASK) != 0);
-
-      if ((arc._info & FACING_UP) != 0)
-        return (SMALLER);
-      return (LARGER);
-    }
-
-    // The two arcs have vertical slopes at p_int:
-    // First check whether one is facing up and one down. In this case the
-    // comparison result is trivial.
-    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
-      return (LARGER);
-    else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
-      return (SMALLER);
-
-    // Compute the second-order derivative by y and act according to it.
-    _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
-    arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
-
-    Comparison_result  slope_res = CGAL::compare(slope2_numer*slope1_denom,
-                                                 slope1_numer*slope2_denom);
-
-    // If necessary, use the third-order derivative by y.
-    if (slope_res == EQUAL)
-    {
-      // \todo Check this!
-      _derive_by_y_at (p, 3, slope1_numer, slope1_denom);
-      arc._derive_by_y_at (p, 3, slope2_numer, slope2_denom);
-
-      slope_res = CGAL::compare (slope2_numer*slope1_denom,
-                                 slope1_numer*slope2_denom);
-    }
-
-    // \todo Handle higher-order derivatives:
-    CGAL_assertion(slope_res != EQUAL);
-
-    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0)
-    {
-      // Both are facing up.
-      return ((slope_res == LARGER) ? SMALLER : LARGER);
-    }
-    // Both are facing down.
-    return (slope_res);
-  }
-
-  /*!
-   * Compute the intersections with the given arc.
-   * \param arc The given intersecting arc.
-   * \param inter_map Maps conic pairs to lists of their intersection points.
-   * \param oi The output iterator.
-   * \return The past-the-end iterator.
-   */
-  template<class OutputIterator>
-  OutputIterator intersect (const Self& arc,
-                            Intersection_map& inter_map,
-                            OutputIterator oi) const
-  {
-    if (_has_same_supporting_conic (arc))
-    {
-      // Check for overlaps between the two arcs.
-      Self    overlap;
-
-      if (_compute_overlap (arc, overlap))
-      {
-        // There can be just a single overlap between two x-monotone arcs:
-        *oi = make_object (overlap);
-        oi++;
-        return (oi);
-      }
-
-      // In case there is not overlap and the supporting conics are the same,
-      // there cannot be any intersection points, unless the two arcs share
-      // an end point.
-      // Note that in this case we do not define the multiplicity of the
-      // intersection points we report.
-      Alg_kernel  ker;
-
-      if (ker.equal_2_object() (left(), arc.left()))
-      {
-        Intersection_point_2  ip (left(), 0);
-
-        *oi = make_object (ip);
-        oi++;
-      }
-
-      if (ker.equal_2_object() (right(), arc.right()))
-      {
-        Intersection_point_2  ip (right(), 0);
-
-        *oi = make_object (ip);
-        oi++;
-      }
-
-      return (oi);
-    }
-
-    // Search for the pair of supporting conics in the map (the first conic
-    // ID in the pair should be smaller than the second one, to guarantee
-    // uniqueness).
-    Conic_pair                   conic_pair;
-    Intersection_map_iterator    map_iter;
-    Intersection_list            inter_list;
-    bool                         invalid_ids = false;
-
-    if (_id.is_valid() && arc._id.is_valid())
-    {
-      if (_id < arc._id)
-        conic_pair = Conic_pair (_id, arc._id);
-      else
-        conic_pair = Conic_pair (arc._id, _id);
-      
-      map_iter = inter_map.find (conic_pair);
-    }
-    else
-    {
-      // In case one of the IDs is invalid, we do not look in the map neither
-      // we cache the results.
-      map_iter = inter_map.end();
-      invalid_ids = true;
-    }
-
-    if (map_iter == inter_map.end())
-    {
-      // In case the intersection points between the supporting conics have
-      // not been computed before, compute them now and store them in the map.
-      _intersect_supporting_conics (arc, inter_list);
-
-      if (! invalid_ids)
-        inter_map[conic_pair] = inter_list;
-    }
-    else
-    {
-      // Obtain the precomputed intersection points from the map.
-      inter_list = (*map_iter).second;
-    }
-
-    // Go over the list of intersection points and report those that lie on
-    // both x-monotone arcs.
-    typename Intersection_list::const_iterator  iter;
-
-    for (iter = inter_list.begin(); iter != inter_list.end(); ++iter)
-    {
-      if (_is_between_endpoints ((*iter).first) &&
-          arc._is_between_endpoints ((*iter).first))
-      {
-        *oi = make_object (*iter);
-        ++oi;
-      }
-    }
-
-    return (oi);
-  }
-  //@}
-
-  /// \name Constructing x-monotone arcs.
-  //@{
-
-  /*!
-   * Split the arc into two at a given split point.
-   * \param p The split point.
-   * \param c1 Output: The first resulting arc, lying to the left of p.
-   * \param c2 Output: The first resulting arc, lying to the right of p.
-   * \pre p lies in the interior of the arc (not one of its endpoints).
-   */
-  void split (const Conic_point_2& p,
-              Self& c1, Self& c2) const
-  {
-    // Make sure that p lies on the interior of the arc.
-    CGAL_precondition_code (
-      Alg_kernel   ker;
-    );
-
-    CGAL_precondition (this->contains_point (p) &&
-                       ! ker.equal_2_object() (p, this->_source) &&
-                       ! ker.equal_2_object() (p, this->_target));
-
-    // Make copies of the current arc.
-    c1 = *this;
-    c2 = *this;
-
-    // Assign the endpoints of the arc.
-    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
-    {
-      // The arc is directed from left to right, so p becomes c1's target
-      // and c2's source.
-      c1._target = p;
-      c2._source = p;
-
-      if (! p.is_generating_conic (_id))
-      {
-        c1._target.set_generating_conic (_id);
-        c2._source.set_generating_conic (_id);
-      }
-    }
-    else
-    {
-      // The arc is directed from right to left, so p becomes c2's target
-      // and c1's source.
-      c1._source = p;
-      c2._target = p;
-
-      if (! p.is_generating_conic (_id))
-      {
-        c1._source.set_generating_conic (_id);
-        c2._target.set_generating_conic (_id);
-      }
-    }
-
-    return;
-  }
-
-  /*!
-   * Flip the arc.
-   * \return An arc with swapped source and target and a reverse orienation.
-   */
-  Self flip () const
-  {
-    // Make a copy of the current arc.
-    Self    arc = *this;
-
-    // Reverse the orientation.
-    if (this->_orient == CLOCKWISE)
-      arc._orient = COUNTERCLOCKWISE;
-    else if (this->_orient == COUNTERCLOCKWISE)
-      arc._orient = CLOCKWISE;
-
-    // Swap the source and the target.
-    arc._source = this->_target;
-    arc._target = this->_source;
-
-    // Change the direction bit among the information flags.
-    arc._info = (this->_info ^ IS_DIRECTED_RIGHT);
-
-    return (arc);
-  }
-
-  /*!
-   * Trim the arc given its new endpoints.
-   * \param ps The new source point.
-   * \param pt The new target point.
-   * \return The new trimmed arc.
-   * \pre Both ps and pt lies on the arc and must conform with the current
-   *      direction of the arc.
-   */
-  Self trim (const Conic_point_2& ps,
-             const Conic_point_2& pt) const
-  {
-    // Make sure that both ps and pt lie on the arc.
-    CGAL_precondition (this->contains_point (ps) &&
-                       this->contains_point (pt));
-
-    // Make sure that the endpoints conform with the direction of the arc.
-    Self         arc = *this;
-    Alg_kernel   ker;
-
-    if (! ((((this->_info & IS_DIRECTED_RIGHT) != 0) &&
-            ker.compare_xy_2_object() (ps, pt) == SMALLER) ||
-           (((this->_info & IS_DIRECTED_RIGHT) == 0) &&
-            ker.compare_xy_2_object() (ps, pt) == LARGER)))
-    {
-      // We are allowed to change the direction only in case of a segment.
-      CGAL_assertion (this->_orient == COLLINEAR);
-      arc._info = (this->_info ^ IS_DIRECTED_RIGHT);
-    }
-
-    // Make a copy of the current arc and assign its endpoints.    
-    if (! ker.equal_2_object() (ps, this->_source))
-    {
-      arc._source = ps;
-
-      if (! ps.is_generating_conic (_id))
-        arc._source.set_generating_conic (_id);
-    }
-    
-    if (! ker.equal_2_object() (pt, this->_target))
-    {
-      arc._target = pt;
-
-      if (! pt.is_generating_conic (_id))
-        arc._target.set_generating_conic (_id);
-    }
-
-    return (arc);
-  }
-
-  /*!
-   * Check whether the two arcs are equal (have the same graph).
-   * \param arc The compared arc.
-   * \return (true) if the two arcs have the same graph; (false) otherwise.
-   */
-  bool equals (const Self& arc) const
-  {
-    // The two arc must have the same supporting conic curves.
-    if (! _has_same_supporting_conic (arc))
-      return (false);
-
-    // Check that the arc endpoints are the same.
-    Alg_kernel   ker;
-
-    if(this->_orient == COLLINEAR)
-    {
-      CGAL_assertion(arc._orient == COLLINEAR);
-      return((ker.equal_2_object() (this->_source, arc._source) &&
-              ker.equal_2_object() (this->_target, arc._target)) ||
-              (ker.equal_2_object() (this->_source, arc._target) &&
-               ker.equal_2_object() (this->_target, arc._source)));
-    }
-
-    if (this->_orient == arc._orient)
-    {
-      // Same orientation - the source and target points must be the same.
-      return (ker.equal_2_object() (this->_source, arc._source) &&
-              ker.equal_2_object() (this->_target, arc._target));
-    }
-    else
-    {
-      // Reverse orientation - the source and target points must be swapped.
-      return (ker.equal_2_object() (this->_source, arc._target) &&
-              ker.equal_2_object() (this->_target, arc._source));
-    }
-  }
-
-  /*!
-   * Check whether it is possible to merge the arc with the given arc.
-   * \param arc The query arc.
-   * \return (true) if it is possible to merge the two arcs;
-   *         (false) otherwise.
-   */
-  bool can_merge_with (const Self& arc) const
-  {
-    // In order to merge the two arcs, they should have the same supporting
-    // conic.
-    if (! _has_same_supporting_conic (arc))
-      return (false);
-
-    // Check if the left endpoint of one curve is the right endpoint of the
-    // other.
-    Alg_kernel   ker;
-
-    return (ker.equal_2_object() (right(), arc.left()) ||
-            ker.equal_2_object() (left(), arc.right()));
-  }
-
-  /*!
-   * Merge the current arc with the given arc.
-   * \param arc The arc to merge with.
-   * \pre The two arcs are mergeable.
-   */
-  void merge (const Self& arc)
-  {
-    CGAL_precondition (this->can_merge_with (arc));
-
-    // Check if we should extend the arc to the left or to the right.
-    Alg_kernel   ker;
-
-    if (ker.equal_2_object() (right(), arc.left()))
-    {
-      // Extend the arc to the right.
-      if ((this->_info & IS_DIRECTED_RIGHT) != 0)
-        this->_target = arc.right();
-      else
-        this->_source = arc.right();
-    }
-    else
-    {
-      CGAL_precondition (ker.equal_2_object() (left(), arc.right()));
-
-      // Extend the arc to the left.
-      if ((this->_info & IS_DIRECTED_RIGHT) != 0)
-        this->_source = arc.left();
-      else
-        this->_target = arc.left();
-    }
-
-    return;
-  }
-
-  bool is_upper() const
-  {
-    return ((this->_info & FACING_UP) != 0);
-  }
-
-  bool is_lower() const
-  {
-    return ((this->_info & FACING_DOWN) != 0);
-  }
-  //@}
-
-private:
-
-  /// \name Auxiliary (private) functions.
-  //@{
-
-  /*!
-   * Set the properties of the x-monotone conic arc (for the usage of the
-   * constructors).
-   */
-  void _set ()
-  {
-    // Convert the coefficients of the supporting conic to algebraic numbers.
-    Nt_traits        nt_traits;
-
-    alg_r = nt_traits.convert (this->_r);
-    alg_s = nt_traits.convert (this->_s);
-    alg_t = nt_traits.convert (this->_t);
-    alg_u = nt_traits.convert (this->_u);
-    alg_v = nt_traits.convert (this->_v);
-    alg_w = nt_traits.convert (this->_w);
-
-    // Set the generating conic ID for the source and target points.
-    this->_source.set_generating_conic (_id);
-    this->_target.set_generating_conic (_id);
-
-    // Clear the _info bits.
-    this->_info = Conic_arc_2::IS_VALID;
-
-    // Check if the arc is directed right (the target is lexicographically
-    // greater than the source point), or to the left.
-    Alg_kernel         ker;
-    Comparison_result  dir_res = ker.compare_xy_2_object() (this->_source, 
-							    this->_target);
-
-    CGAL_assertion (dir_res != EQUAL);
-
-    if (dir_res == SMALLER)
-      this->_info = (this->_info | IS_DIRECTED_RIGHT);
-
-    // Compute the degree of the underlying conic.
-    if (CGAL::sign (this->_r) != ZERO ||
-        CGAL::sign (this->_s) != ZERO ||
-        CGAL::sign (this->_t) != ZERO)
-    {
-      this->_info = (this->_info | DEGREE_2);
-      
-      if (this->_orient == COLLINEAR)
-      {
-        this->_info = (this->_info | IS_SPECIAL_SEGMENT);
-        
-        if (ker.compare_x_2_object() (this->_source, this->_target) == EQUAL)
-        {
-          // The arc is a vertical segment:
-          this->_info = (this->_info | IS_VERTICAL_SEGMENT);
-        }
-        
-        return;
-      }
-    }
-    else
-    {
-      CGAL_assertion (CGAL::sign (this->_u) != ZERO ||
-                      CGAL::sign (this->_v) != ZERO);
-
-      if (CGAL::sign (this->_v) == ZERO)
-      {
-
-        // The supporting curve is of the form: _u*x + _w = 0
-        this->_info = (this->_info | IS_VERTICAL_SEGMENT);
-      }
-
-      this->_info = (this->_info | DEGREE_1);
-
-      return;
-    }
-
-    if (this->_orient == COLLINEAR)
-      return;
-
-    // Compute a midpoint between the source and the target and get the y-value
-    // of the arc at its x-coordiante.
-    Point_2          p_mid = ker.construct_midpoint_2_object() (this->_source,
-                                                                this->_target);
-    Algebraic        ys[2];
-    CGAL_assertion_code(int              n_ys = )
-      _conic_get_y_coordinates (p_mid.x(), ys);
-                        
-    CGAL_assertion (n_ys != 0);
-
-    // Check which solution lies on the x-monotone arc.
-    Point_2          p_arc_mid (p_mid.x(), ys[0]);
-
-    if (_is_strictly_between_endpoints (p_arc_mid))
-    {
-      // Mark that we should use the -sqrt(disc) root for points on this
-      // x-monotone arc.
-      this->_info = (this->_info & ~PLUS_SQRT_DISC_ROOT);
-    }
-    else
-    {
-      CGAL_assertion (n_ys == 2);
-      p_arc_mid = Point_2 (p_mid.x(), ys[1]);
-
-      CGAL_assertion (_is_strictly_between_endpoints (p_arc_mid));
-
-      // Mark that we should use the +sqrt(disc) root for points on this
-      // x-monotone arc.
-      this->_info = (this->_info | PLUS_SQRT_DISC_ROOT);
-    }
-
-    // Check whether the conic is facing up or facing down:
-    // Check whether the arc (which is x-monotone of degree 2) lies above or
-    // below the segement that contects its two end-points (x1,y1) and (x2,y2).
-    // To do that, we find the y coordinate of a point on the arc whose x
-    // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2.
-    Comparison_result res = ker.compare_y_2_object() (p_arc_mid, p_mid);
-
-    if (res == LARGER)
-    {
-      // The arc is above the connecting segment, so it is facing upwards.
-      this->_info = (this->_info | FACING_UP);
-    }
-    else if (res == SMALLER)
-    {
-      // The arc is below the connecting segment, so it is facing downwards.
-      this->_info = (this->_info | FACING_DOWN);
-    }
-
-    return;
-  }
-
-  /*!
-   * Check if the arc is a special segment connecting two algebraic endpoints
-   * (and has no undelying integer conic coefficients).
-   */
-  bool _is_special_segment () const
-  {
-    return ((this->_info & IS_SPECIAL_SEGMENT) != 0);
-  }
-
-  /*!
-   * Check whether the given point lies on the supporting conic of the arc.
-   * \param px The x-coordinate of query point.
-   * \param py The y-coordinate of query point.
-   * \return (true) if p lies on the supporting conic; (false) otherwise.
-   */
-  bool _is_on_supporting_conic (const Algebraic& px,
-                                const Algebraic& py) const
-  {
-    CGAL::Sign       _sign;
-
-    if (! _is_special_segment())
-    {
-      // Check whether p satisfies the conic equation.
-      // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0.
-      _sign = CGAL::sign ((alg_r*px + alg_t*py + alg_u) * px +
-                          (alg_s*py + alg_v) * py +
-                          alg_w);
-    }
-    else
-    {
-      // Check whether p satisfies the equation of the line stored with the
-      // extra data.
-      _sign = _sign_of_extra_data (px, py);
-    }
-
-    return (_sign == ZERO);
-  }
-
-  /*!
-   * Check whether the two arcs have the same supporting conic.
-   * \param arc The compared arc.
-   * \return (true) if the two supporting conics are the same.
-   */
-  bool _has_same_supporting_conic (const Self& arc) const
-  {
-    // Check if the two arcs originate from the same conic:
-    if (_id == arc._id && _id.is_valid() && arc._id.is_valid())
-      return (true);
-
-    // In case both arcs are collinear, check if they have the same
-    // supporting lines.
-    if (this->_orient == COLLINEAR && arc._orient == COLLINEAR)
-    {
-      // Construct the two supporting lines and compare them.
-      Alg_kernel                             ker;
-      typename Alg_kernel::Construct_line_2  construct_line =
-                                                 ker.construct_line_2_object();
-      typename Alg_kernel::Line_2          l1 = construct_line (this->_source,
-                                                                this->_target);
-      typename Alg_kernel::Line_2          l2 = construct_line (arc._source,
-                                                                arc._target);
-      typename Alg_kernel::Equal_2         equal = ker.equal_2_object();
-
-      if (equal (l1, l2))
-        return (true);
-      
-      // Try to compare l1 with the opposite of l2.
-      l2 = construct_line (arc._target, arc._source);
-
-      return (equal (l1, l2));
-    }
-    else if (this->_orient == COLLINEAR || arc._orient == COLLINEAR)
-    {
-      // Only one arc is collinear, so the supporting curves cannot be the
-      // same:
-      return (false);
-    }
-
-    // Check whether the coefficients of the two supporting conics are equal
-    // up to a constant factor.
-    Integer        factor1 = 1;
-    Integer        factor2 = 1;
-
-    if (CGAL::sign (this->_r) != ZERO)
-      factor1 = this->_r;
-    else if (CGAL::sign (this->_s) != ZERO)
-      factor1 = this->_s;
-    else if (CGAL::sign (this->_t) != ZERO)
-      factor1 = this->_t;
-    else if (CGAL::sign (this->_u) != ZERO)
-      factor1 = this->_u;
-    else if (CGAL::sign (this->_v) != ZERO)
-      factor1 = this->_v;
-    else if (CGAL::sign (this->_w) != ZERO)
-      factor1 = this->_w;
-
-    if (CGAL::sign (arc._r) != ZERO)
-      factor2 = arc._r;
-    else if (CGAL::sign (arc._s) != ZERO)
-      factor2 = arc._s;
-    else if (CGAL::sign (arc._t) != ZERO)
-      factor2 = arc._t;
-    else if (CGAL::sign (arc._u) != ZERO)
-
-      factor2 = arc._u;
-    else if (CGAL::sign (arc._v) != ZERO)
-      factor2 = arc._v;
-    else if (CGAL::sign (arc._w) != ZERO)
-      factor2 = arc._w;
-
-    return (CGAL::compare  (this->_r * factor2, arc._r * factor1) == EQUAL &&
-            CGAL::compare  (this->_s * factor2, arc._s * factor1) == EQUAL &&
-            CGAL::compare  (this->_t * factor2, arc._t * factor1) == EQUAL &&
-            CGAL::compare  (this->_u * factor2, arc._u * factor1) == EQUAL &&
-            CGAL::compare  (this->_v * factor2, arc._v * factor1) == EQUAL &&
-            CGAL::compare  (this->_w * factor2, arc._w * factor1) == EQUAL);
-  }
-
-  /*!
-   * Get the i'th order derivative by x of the conic at the point p=(x,y).
-   * \param p The point where we derive.
-   * \param i The order of the derivatives (either 1, 2 or 3).
-   * \param slope_numer The numerator of the slope.
-   * \param slope_denom The denominator of the slope.
-   * \todo Allow higher order derivatives.
-   */
-  void _derive_by_x_at (const Point_2& p, const unsigned int& i,
-                        Algebraic& slope_numer, Algebraic& slope_denom) const
-  {
-    if (_is_special_segment())
-    {
-      // Special treatment for special segments, given by (a*x + b*y + c = 0),
-      // so their first-order derivative by x is simply -a/b. The higher-order
-      // derivatives are all 0.
-      if (i == 1)
-      {
-        if (CGAL::sign (this->_extra_data_P->b) != NEGATIVE)
-        {          
-          slope_numer = - this->_extra_data_P->a;
-          slope_denom = this->_extra_data_P->b;
-        }
-        else
-        {
-          slope_numer = this->_extra_data_P->a;
-          slope_denom = - this->_extra_data_P->b;
-        }
-      }
-      else
-      {
-        slope_numer = 0;
-        slope_denom = 1;
-      }
-
-      return;
-    }
-
-    // The derivative by x of the conic
-    //   C: {r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0}
-    // at the point p=(x,y) is given by:
-    //
-    //           2r*x + t*y + u       alpha
-    //   y' = - ---------------- = - -------
-    //           2s*y + t*x + v       beta
-    //
-    const Algebraic  _two = 2;
-    const Algebraic  sl_numer = _two*alg_r*p.x() + alg_t*p.y() + alg_u;
-    const Algebraic  sl_denom = _two*alg_s*p.y() + alg_t*p.x() + alg_v;
-    
-    if (i == 1)
-    {
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -sl_numer;
-        slope_denom = sl_denom;
-      }
-      else
-      {
-        slope_numer = sl_numer;
-        slope_denom = -sl_denom;
-      }
-
-      return;
-    }
-
-    // The second-order derivative is given by:
-    //
-    //             s*alpha^2 - t*alpha*beta + r*beta^2     gamma
-    //   y'' = -2 ------------------------------------- = -------
-    //                           beta^3                    delta
-    //
-    const Algebraic  sl2_numer = alg_s * sl_numer*sl_numer -
-                                 alg_t * sl_numer*sl_denom +
-                                 alg_r * sl_denom*sl_denom;
-    const Algebraic  sl2_denom = sl_denom*sl_denom*sl_denom;
-
-    if (i == 2)
-    {
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -_two *sl2_numer;
-        slope_denom = sl2_denom;
-      }
-      else
-      {
-        slope_numer = _two *sl2_numer;
-        slope_denom = -sl2_denom;
-      }
-
-      return;
-    }
-
-    // The third-order derivative is given by:
-    //
-    //              (2s*alpha - t*beta) * gamma
-    //   y''' = -6 ------------------------------
-    //                    beta^2 * delta
-    //
-    const Algebraic  sl3_numer = (_two * alg_s * sl_numer -
-                                  alg_t * sl_denom) * sl2_numer;
-    const Algebraic  sl3_denom = sl_denom*sl_denom * sl2_denom;
-
-    if (i == 3)
-    {
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -6 * sl3_numer;
-        slope_denom = sl3_denom;
-      }
-      else
-      {
-        slope_numer = 6 * sl3_numer;
-        slope_denom = -sl2_denom;
-      }
-
-      return;
-    }
-
-    // \todo Handle higher-order derivatives as well.
-    CGAL_error();
-    return;
-  }
-
-  /*!
-   * Get the i'th order derivative by y of the conic at the point p=(x,y).
-   * \param p The point where we derive.
-   * \param i The order of the derivatives (either 1, 2 or 3).
-   * \param slope_numer The numerator of the slope.
-   * \param slope_denom The denominator of the slope.
-   * \todo Allow higher order derivatives.
-   */
-  void _derive_by_y_at (const Point_2& p, const int& i,
-                        Algebraic& slope_numer, Algebraic& slope_denom) const
-  {
-    if (_is_special_segment())
-    {
-      // Special treatment for special segments, given by (a*x + b*y + c = 0),
-      // so their first-order derivative by x is simply -b/a. The higher-order
-      // derivatives are all 0.
-      if (i == 1)
-      {
-        if (CGAL::sign (this->_extra_data_P->a) != NEGATIVE)
-        {          
-          slope_numer = - this->_extra_data_P->b;
-          slope_denom = this->_extra_data_P->a;
-        }
-        else
-        {
-          slope_numer = this->_extra_data_P->b;
-          slope_denom = - this->_extra_data_P->a;
-        }
-      }
-      else
-      {
-        slope_numer = 0;
-        slope_denom = 1;
-      }
-
-      return;
-    }
-
-    // The derivative by y of the conic
-    //   C: {r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0}
-    // at the point p=(x,y) is given by:
-    //
-    //           2s*y + t*x + v     alpha
-    //   x' = - ---------------- = -------
-    //           2r*x + t*y + u      beta
-    //
-    const Algebraic  _two = 2;
-    const Algebraic  sl_numer = _two*alg_s*p.y() + alg_t*p.x() + alg_v;
-    const Algebraic  sl_denom = _two*alg_r*p.x() + alg_t*p.y() + alg_u;
-
-    if (i == 1)
-    {
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -sl_numer;
-        slope_denom = sl_denom;
-      }
-      else
-      {
-        slope_numer = sl_numer;
-        slope_denom = -sl_denom;
-      }
-
-
-      return;
-    }
-
-    // The second-order derivative is given by:
-    //
-    //             r*alpha^2 - t*alpha*beta + s*beta^2
-    //   x'' = -2 -------------------------------------
-    //                           beta^3
-    //
-    const Algebraic  sl2_numer = alg_r * sl_numer*sl_numer -
-                                 alg_t * sl_numer*sl_denom +
-                                 alg_s * sl_denom*sl_denom;
-    const Algebraic  sl2_denom = sl_denom*sl_denom*sl_denom;
-
-    if (i == 2)
-    {
-
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -_two *sl2_numer;
-        slope_denom = sl2_denom;
-      }
-      else
-      {
-        slope_numer = _two *sl2_numer;
-        slope_denom = -sl2_denom;
-      }
-
-      return;
-    }
-
-    // The third-order derivative is given by:
-    //
-    //              (2t*alpha - t*beta) * gamma
-    //   y''' = -6 ------------------------------
-    //                    beta^2 * delta
-    //
-    const Algebraic  sl3_numer = (_two * alg_r * sl_numer -
-                                  alg_t * sl_denom) * sl2_numer;
-    const Algebraic  sl3_denom = sl_denom*sl_denom * sl2_denom;
-
-    if (i == 3)
-    {
-      // Make sure that the denominator is always positive.
-      if (CGAL::sign (sl_denom) != NEGATIVE)
-      {
-        slope_numer = -6 * sl3_numer;
-        slope_denom = sl3_denom;
-      }
-      else
-      {
-        slope_numer = 6 * sl3_numer;
-        slope_denom = -sl2_denom;
-      }
-
-      return;
-    }
-
-    // \todo Handle higher-order derivatives as well.
-    CGAL_error();
-    return;
-  }
-
-  /*!
-   * Compute the overlap with a given arc, which is supposed to have the same
-   * supporting conic curve as this arc.
-   * \param arc The given arc.
-   * \param overlap Output: The overlapping arc (if any).
-   * \return Whether we found an overlap.
-   */
-  bool _compute_overlap (const Self& arc, Self& overlap) const
-  {
-    // Check if the two arcs are identical.
-    if (equals (arc))
-    {
-      overlap = arc;
-      return (true);
-    }
-
-    if (_is_strictly_between_endpoints (arc.left()))
-    {
-      if (_is_strictly_between_endpoints(arc.right()))
-      {
-        // Case 1 - *this:     +----------->
-        //            arc:       +=====>
-        overlap = arc;
-        return (true);
-      }
-      else
-      {
-        // Case 2 - *this:     +----------->
-        //            arc:               +=====>
-        overlap = *this;
-
-        if ((overlap._info & IS_DIRECTED_RIGHT) != 0)
-          overlap._source = arc.left();
-        else
-          overlap._target = arc.left();
-
-        return (true);
-      }
-    }
-    else if (_is_strictly_between_endpoints (arc.right()))
-    {
-      // Case 3 - *this:     +----------->
-      //            arc:   +=====>
-      overlap = *this;
-
-      if ((overlap._info & IS_DIRECTED_RIGHT) != 0)
-        overlap._target = arc.right();
-      else
-        overlap._source = arc.right();
-
-      return (true);
-    }
-    else if (arc._is_between_endpoints (this->_source) &&
-             arc._is_between_endpoints (this->_target) &&
-             (arc._is_strictly_between_endpoints(this->_source) ||
-              arc._is_strictly_between_endpoints(this->_target)))
-    {
-      // Case 4 - *this:     +----------->
-      //            arc:   +================>
-      overlap = *this;
-      return (true);
-    }
-
-    // If we reached here, there are no overlaps:
-    return (false);
-  }
-
-  /*!
-   * Intersect the supporing conic curves of this arc and the given arc.
-   * \param arc The arc to intersect with.
-   * \param inter_list The list of intersection points.
-   */
-  void _intersect_supporting_conics (const Self& arc,
-                                     Intersection_list& inter_list) const
-  {
-    if (_is_special_segment() && ! arc._is_special_segment())
-    {
-      // If one of the arcs is a special segment, make sure it is (arc).
-      arc._intersect_supporting_conics (*this, inter_list);
-      return;
-    }
-
-    const int   deg1 = ((this->_info & DEGREE_MASK) == DEGREE_1) ? 1 : 2;
-    const int   deg2 = ((arc._info & DEGREE_MASK) == DEGREE_1) ? 1 : 2;
-    Nt_traits   nt_traits;
-    Algebraic   xs[4];
-    int         n_xs = 0;
-    Algebraic   ys[4];
-    int         n_ys = 0;
-
-    if (arc._is_special_segment())
-    {
-      // The second arc is a special segment (a*x + b*y + c = 0).
-      if (_is_special_segment())
-      {
-        // Both arc are sepcial segment, so they have at most one intersection
-        // point.
-        Algebraic   denom = this->_extra_data_P->a * arc._extra_data_P->b -
-                            this->_extra_data_P->b * arc._extra_data_P->a;
-
-        if (CGAL::sign (denom) != CGAL::ZERO)
-        {
-          xs[0] = (this->_extra_data_P->b * arc._extra_data_P->c -
-                   this->_extra_data_P->c * arc._extra_data_P->b) / denom;
-          n_xs = 1;
-
-          ys[0] = (this->_extra_data_P->c * arc._extra_data_P->a -
-                   this->_extra_data_P->a * arc._extra_data_P->c) / denom;
-          n_ys = 1;
-        }
-      }
-      else
-      {
-        // Compute the x-coordinates of the intersection points.
-        n_xs = _compute_resultant_roots (nt_traits,
-                                         alg_r, alg_s, alg_t,
-                                         alg_u, alg_v, alg_w,
-                                         deg1,
-                                         arc._extra_data_P->a,
-                                         arc._extra_data_P->b,
-                                         arc._extra_data_P->c,
-                                         xs);
-        CGAL_assertion (n_xs <= 2);
-      
-        // Compute the y-coordinates of the intersection points.
-        n_ys = _compute_resultant_roots (nt_traits,
-                                         alg_s, alg_r, alg_t,
-                                         alg_v, alg_u, alg_w,
-                                         deg1,
-                                         arc._extra_data_P->b,
-                                         arc._extra_data_P->a,
-                                         arc._extra_data_P->c,
-                                         ys);
-        CGAL_assertion (n_ys <= 2);
-      }
-    }
-    else
-    {
-      // Compute the x-coordinates of the intersection points.
-      n_xs = _compute_resultant_roots (nt_traits,
-                                       this->_r, this->_s, this->_t,
-                                       this->_u, this->_v, this->_w,
-                                       deg1,
-                                       arc._r, arc._s, arc._t,
-                                       arc._u, arc._v, arc._w,
-                                       deg2,
-                                       xs);
-      CGAL_assertion (n_xs <= 4);
-      
-      // Compute the y-coordinates of the intersection points.
-      n_ys = _compute_resultant_roots (nt_traits,
-                                       this->_s, this->_r, this->_t,
-                                       this->_v, this->_u, this->_w,
-                                       deg1,
-                                       arc._s, arc._r, arc._t,
-                                       arc._v, arc._u, arc._w,
-                                       deg2,
-                                       ys);
-      CGAL_assertion (n_ys <= 4);
-    }
-
-    // Pair the coordinates of the intersection points. As the vectors of
-    // x and y-coordinates are sorted in ascending order, we output the
-    // intersection points in lexicographically ascending order.
-    unsigned int  mult;
-    int   i, j;
-
-    if (arc._is_special_segment())
-    {
-      if (n_xs == 0 || n_ys == 0)
-        return;
-
-      if (n_xs == 1 && n_ys == 1)
-      {
-        // Single intersection.
-        Conic_point_2         ip (xs[0], ys[0]);
-
-        ip.set_generating_conic (_id);
-        ip.set_generating_conic (arc._id);
-
-        // In case the other curve is of degree 2, this is a tangency point.
-        mult = (deg1 == 1 || _is_special_segment()) ? 1 : 2;
-        inter_list.push_back (Intersection_point_2 (ip, mult));
-      }
-      else if (n_xs == 1 && n_ys == 2)
-      {
-        Conic_point_2         ip1 (xs[0], ys[0]);
-
-        ip1.set_generating_conic (_id);
-        ip1.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip1, 1));
-
-        Conic_point_2         ip2 (xs[0], ys[1]);
-
-        ip2.set_generating_conic (_id);
-        ip2.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip2, 1));
-      }
-      else if (n_xs == 2 && n_ys == 1)
-      {
-        Conic_point_2         ip1 (xs[0], ys[0]);
-
-        ip1.set_generating_conic (_id);
-        ip1.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip1, 1));
-
-        Conic_point_2         ip2 (xs[1], ys[0]);
-
-        ip2.set_generating_conic (_id);
-        ip2.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip2, 1));
-
-      }
-      else
-      {
-        CGAL_assertion (n_xs == 2 && n_ys == 2);
-
-        // The x-coordinates and the y-coordinates are given in ascending
-        // order. If the slope of the segment is positive, we pair the
-        // coordinates as is - otherwise, we swap the pairs.
-        int                   ind_first_y = 0, ind_second_y = 1;
-
-        if (CGAL::sign (arc._extra_data_P->b) == 
-            CGAL::sign(arc._extra_data_P->a))
-        {
-          ind_first_y = 1;
-          ind_second_y = 0;
-        }
-
-        Conic_point_2         ip1 (xs[0], ys[ind_first_y]);
-
-        ip1.set_generating_conic (_id);
-        ip1.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip1, 1));
-
-        Conic_point_2         ip2 (xs[1], ys[ind_second_y]);
-
-        ip2.set_generating_conic (_id);
-        ip2.set_generating_conic (arc._id);
-
-        inter_list.push_back (Intersection_point_2 (ip2, 1));
-      }
-      
-      return;
-    }
-
-    for (i = 0; i < n_xs; i++)
-    {
-      for (j = 0; j < n_ys; j++)
-      {
-        if (_is_on_supporting_conic (xs[i], ys[j]) &&
-            arc._is_on_supporting_conic (xs[i], ys[j]))
-        {
-          // Create the intersection point and set its generating conics.
-          Conic_point_2         ip (xs[i], ys[j]);
-
-          ip.set_generating_conic (_id);
-          ip.set_generating_conic (arc._id);
-
-          // Compute the multiplicity of the intersection point.
-          if (deg1 == 1 && deg2 == 1)
-            mult = 1;
-          else
-            mult = _multiplicity_of_intersection_point (arc, ip);
-
-          // Insert the intersection point to the output list.
-          inter_list.push_back (Intersection_point_2 (ip, mult));
-        }
-      }
-    }
-
-    return;
-  }
-
-  /*!
-   * Compute the multiplicity of an intersection point.
-   * \param arc The arc to intersect with.
-   * \param p The intersection point.
-   * \return The multiplicity of the intersection point.
-   */
-  unsigned int _multiplicity_of_intersection_point (const Self& arc,
-                                                    const Point_2& p) const
-  {
-    CGAL_assertion (! _is_special_segment() || ! arc._is_special_segment());
-
-    // Compare the slopes of the two arcs at p, using their first-order
-    // partial derivatives.
-    Algebraic      slope1_numer, slope1_denom;
-    Algebraic      slope2_numer, slope2_denom;
-
-    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
-    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
-
-    if (CGAL::compare (slope1_numer*slope2_denom,
-                       slope2_numer*slope1_denom) != EQUAL)
-    {
-      // Different slopes at p - the mutiplicity of p is 1:
-      return (1);
-    }
-
-    if (CGAL::sign (slope1_denom) != ZERO &&
-        CGAL::sign (slope2_denom) != ZERO)
-    {
-      // The curves do not have a vertical slope at p.
-      // Compare their second-order derivative by x:
-      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
-      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
-    }
-    else
-    {
-      // Both curves have a vertical slope at p.
-      // Compare their second-order derivative by y:
-      _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
-      arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
-    }
-
-    if (CGAL::compare (slope1_numer*slope2_denom,
-                       slope2_numer*slope1_denom) != EQUAL)
-    {
-      // Different curvatures at p - the mutiplicity of p is 2:
-      return (2);
-    }
-
-    // If we reached here, the multiplicity of the intersection point is 3:
-    return (3);
-  }
-  //@}
-
-};
-
-/*!
- * Exporter for x-monotone conic arcs.
- */
-template <class Conic_arc_2>
-std::ostream& operator<< (std::ostream& os, 
-                          const _Conic_x_monotone_arc_2<Conic_arc_2>& arc)
-{
-  // Output the supporting conic curve.
-  os << "{" << CGAL::to_double(arc.r()) << "*x^2 + "
-     << CGAL::to_double(arc.s()) << "*y^2 + "
-     << CGAL::to_double(arc.t()) << "*xy + " 
-     << CGAL::to_double(arc.u()) << "*x + "
-     << CGAL::to_double(arc.v()) << "*y + "
-     << CGAL::to_double(arc.w()) << "}";
-
-  // Output the endpoints.
-  os << " : (" << CGAL::to_double(arc.source().x()) << "," 
-     << CGAL::to_double(arc.source().y()) << ") ";
-
-  if (arc.orientation() == CLOCKWISE)
-    os << "--cw-->";
-  else if (arc.orientation() == COUNTERCLOCKWISE)
-    os << "--ccw-->";
-  else
-    os << "--l-->";
-
-  os << " (" << CGAL::to_double(arc.target().x()) << "," 
-     << CGAL::to_double(arc.target().y()) << ")";
-
-  return (os);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Polyline_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Polyline_2.h
deleted file mode 100644
index c9845cb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Polyline_2.h
+++ /dev/null
@@ -1,556 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ron Wein  <wein at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-//                 Dror Atariah <dror.atariah at fu-berlin.de>
-
-#ifndef CGAL_ARR_POLYLINE_2_H
-#define CGAL_ARR_POLYLINE_2_H
-
-/*! \file
- * Header file for the polyline classes used by the Arr_polyline_traits_2
- * class.
- */
-#include <list>
-#include <iostream>
-#include <vector>
-#include <iterator>
-#include <CGAL/Bbox_2.h>
-
-namespace CGAL {
-
-  namespace polyline{
-
-    /*! \class
-     * Representation of a polyline.
-     */
-    template <typename Segment_type_T, typename Point_type_T>
-    class Polyline_2 {
-    public:
-      typedef Segment_type_T                         Segment_type_2;
-      typedef Point_type_T                           Point_type_2;
-
-    protected:
-      // The segments that comprise the poyline:
-      typedef typename std::vector<Segment_type_2>   Segments_container;
-      Segments_container                             m_segments;
-
-    public:
-      typedef typename Segments_container::size_type Segments_size_type;
-
-      /*! Default constructor. */
-      Polyline_2() : m_segments() {}
-
-      Polyline_2(const Segment_type_2& seg) : m_segments()
-      {
-        m_segments.push_back(seg);
-      }
-
-      /*
-       * Roadmap:
-       * - Currently construction from points is marked as deprecated.
-       *   For the sake of backwards compatibility, it is not removed yet.
-       * - In the next release, construction from points will be removed.
-       * - Then, the remaining construction from segments will become private
-       *   in this class as construction is provided by the traits.
-       *   Furthermore, the polyline traits class will become a friend of
-       *   this class.
-       */
-      /*!
-       * Constructor from a range. The range can be either:
-       *
-       * For the sake of backwards compatibility we have to keep the possibility
-       * of construction from a range of points. Therefore, we have to test the
-       * type of the elements of the range again.
-       * Since ultimately the construction from points will be deprecated, the
-       * actual constructor that we implemented which handles a range of point
-       * is already deprecated and SHOULD NOT BE USED.
-       *
-       * If you want to construct a polyline from a range of points, use the
-       * construction functors from the traits class.
-       *
-       * - Range of points, and the polyline is defined by the order of the
-       *   points.
-       * - Range of linear object. The polyline is the sequence of linear
-       *   objects.
-       * \param begin An iterator pointing to the first point in the range.
-       * \param end An iterator pointing after the last point in the range.
-       * \pre Depends on the range's content. See the implementations for
-       *      further details.
-       */
-      template <typename InputIterator>
-      Polyline_2(InputIterator begin, InputIterator end) :
-        m_segments()
-      {
-        typedef typename std::iterator_traits<InputIterator>::value_type VT;
-        typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
-        construct_polyline(begin, end, Is_point());
-      }
-
-      /*!
-       * Construct a polyline from a range of segments.
-       * \param begin An iterator pointing to the first segment in the range.
-       * \param end An iterator pointing after the past-the-end segment
-       *        in the range.
-       * \pre The end of segment n should be the beginning of segment n+1.
-       */
-      template <typename InputIterator>
-      void construct_polyline(InputIterator begin, InputIterator end,
-                              boost::false_type)
-      {
-        m_segments.assign(begin, end);
-      }
-
-      /*!
-       * Construct a polyline from a range of points.
-       * \param begin An iterator pointing to the first point in the range.
-       * \param end An iterator pointing after the last point in the range.
-       * \pre There are at least 2 points in the range.
-       *      In other cases, an empty polyline will be created.
-       */
-      template <typename InputIterator>
-      CGAL_DEPRECATED void construct_polyline(InputIterator begin,
-                                              InputIterator end,
-                                              boost::true_type)
-      {
-        // Check if there are no points in the range:
-        InputIterator  ps = begin;
-
-        if (ps == end)
-          return;
-
-        InputIterator pt = ps;
-        ++pt;
-
-        // The range contains only one point. A degenerated polyline is
-        // constructed.
-        // With one degenerated segment, where source=target.
-        if (pt == end) {
-          m_segments.push_back(Segment_type_2(*ps, *ps));
-          return;
-        }
-
-        // Construct a segment from each to adjacent points.
-        // The container has to contain at least two points.
-        while (pt != end) {
-          m_segments.push_back(Segment_type_2(*ps, *pt));
-          ++ps;
-          ++pt;
-        }
-      }
-
-      /*
-       * Roadmap: Make this private in the next version (after the traits
-       *          becomes friendly...)
-       */
-      /*!
-       * Append a segment to the (x-monotone) polyline.
-       * Warning: This is a risky function! Don't use it! Prefer the
-       *          provided implementation in the traits class.
-       * \param seg The new segment to be appended to the polyline.
-       * \pre If the polyline is not empty, seg source must be the
-       *      same as the target point of the last segment in the polyline.
-       */
-      inline void push_back(const Segment_type_2& seg)
-      {
-        this->m_segments.push_back(seg);
-      }
-
-      /*!
-       * Append a segment to the (x-monotone) polyline.
-       * Warning: This is a risky function! Don't use it! Prefer the
-       *          provided implementation in the traits class.
-       * \param seg The new segment to be appended to the polyline.
-       * \pre If the polyline is not empty, seg source must be the
-       *      same as the target point of the last segment in the polyline.
-       */
-      inline void push_front(const Segment_type_2& seg)
-      {
-        this->m_segments.insert(this->m_segments.begin(), seg);
-      }
-
-      /*!
-       * Append a point to the polyline.
-       * To properly implemented this function the traits class is needed,
-       * thus it is deprecated.
-       */
-      CGAL_DEPRECATED void push_back(const Point_type_2& p)
-      {
-        CGAL_assertion(!m_segments.empty());
-        Point_type_2 pt = p;
-        Point_type_2 ps = m_segments.back().target();
-        m_segments.push_back(Segment_type_2(ps, pt));
-      }
-
-      /*!
-       * \return The bounding-box.
-       */
-      Bbox_2 bbox() const
-      {
-        // Compute the union of the bounding boxes of all segments.
-        Segments_size_type n = this->number_of_segments();
-        Bbox_2 bbox;
-        for (std::size_t i = 0; i < n; ++i) {
-          bbox = (i > 0) ? (bbox + (*this)[i].bbox()) : (*this)[i].bbox();
-        }
-        return bbox;
-      }
-
-      class const_iterator;
-      friend class const_iterator;
-      typedef std::reverse_iterator<const_iterator>
-      const_reverse_iterator;
-
-      /*! An iterator for the polyline points. */
-      class CGAL_DEPRECATED const_iterator {
-      public:
-        // Type definitions:
-        typedef std::bidirectional_iterator_tag     iterator_category;
-        typedef Point_type_2                        value_type;
-        typedef std::ptrdiff_t                      difference_type;
-        typedef size_t                              size_type;
-        typedef const value_type&                   reference;
-        typedef const value_type*                   pointer;
-
-      private:
-        // The polyline curve.
-        const Polyline_2<Segment_type_2, Point_type_2>* m_cvP;
-        int   m_num_pts;                            // Its number of points.
-        int   m_index;                              // The current point.
-
-        /*!
-         * Private constructor.
-         * \param cv The scanned curve.
-         * \param index The index of the segment.
-         */
-        const_iterator(const Polyline_2<Segment_type_2, Point_type_2>* cvP,
-                       int index) :
-          m_cvP(cvP),
-          m_index(index)
-        {
-          if (m_cvP == NULL)
-            m_num_pts = 0;
-          else
-            m_num_pts = (m_cvP->number_of_segments() == 0) ?
-              0 : (m_cvP->number_of_segments() + 1);
-        }
-
-      public:
-
-        /*! Default constructor. */
-        const_iterator() :
-          m_cvP(NULL),
-          m_num_pts(0),
-          m_index(-1)
-        {}
-
-        /*!
-         * Dereference operator.
-         * \return The current point.
-         */
-        const Point_type_2& operator*() const
-        {
-          CGAL_assertion(m_cvP != NULL);
-          CGAL_assertion((m_index >= 0) && (m_index < m_num_pts));
-
-          if (m_index == 0) {
-            // First point is the source of the first segment.
-            return ((*m_cvP)[0]).source();
-          }
-          else {
-            // Return the target of the(i-1)'st segment.
-            return ((*m_cvP)[m_index - 1]).target();
-          }
-        }
-
-        /*!
-         * Arrow operator.
-         * \return A pointer to the current point.
-         */
-        const Point_type_2* operator->() const
-        {
-          return (&(this->operator* ()));
-        }
-
-        /*! Increment operators. */
-        const_iterator& operator++()
-        {
-          if ((m_cvP != NULL) && (m_index < m_num_pts))
-            ++m_index;
-          return (*this);
-        }
-
-        const_iterator operator++(int)
-        {
-          const_iterator  temp = *this;
-          if ((m_cvP != NULL) && (m_index < m_num_pts))
-            ++m_index;
-          return temp;
-        }
-
-        /*! Decrement operators. */
-        const_iterator& operator-- ()
-        {
-          if ((m_cvP != NULL) && (m_index >= 0))
-            --m_index;
-          return (*this);
-        }
-
-        const_iterator operator--(int)
-        {
-          const_iterator  temp = *this;
-          if ((m_cvP != NULL) && (m_index >= 0))
-            --m_index;
-          return temp;
-        }
-
-        /*! Equality operators. */
-        bool operator==(const const_iterator& it) const
-        {
-          return ((m_cvP == it.m_cvP) && (m_index == it.m_index));
-        }
-
-        bool operator!=(const const_iterator& it) const
-        {
-          return ((m_cvP != it.m_cvP) || (m_index != it.m_index));
-        }
-
-        friend class Polyline_2<Segment_type_2, Point_type_2>;
-      };
-
-      /* ! Get an iterator for the polyline points.*/
-      CGAL_DEPRECATED const_iterator begin() const
-      {
-        if (number_of_segments() == 0)
-          return (const_iterator(NULL, -1));
-        else
-          return (const_iterator(this, 0));
-      }
-
-      /*! Get a past-the-end iterator for the polyline points.*/
-      CGAL_DEPRECATED const_iterator end() const
-      {
-        if (number_of_segments() == 0)
-          return (const_iterator(NULL, -1));
-        else
-          return (const_iterator(this, number_of_segments() + 1));
-      }
-
-      /*! Get a reverse iterator for the polyline points. */
-      CGAL_DEPRECATED const_reverse_iterator rbegin() const
-      {
-        return (const_reverse_iterator(end()));
-      }
-
-      /*! Get a reverse past-the-end iterator for the polyline points. */
-      CGAL_DEPRECATED const_reverse_iterator rend() const
-      {
-        return (const_reverse_iterator(begin()));
-      }
-
-      typedef typename Segments_container::const_iterator
-      Segment_const_iterator;
-      typedef typename std::reverse_iterator<Segment_const_iterator>
-      Segment_const_reverse_iterator;
-
-      /*! Get an iterator for the polyline's segments. */
-      Segment_const_iterator begin_segments() const
-      { return m_segments.begin(); }
-
-      /*! Get a past-the-end iterator for the polyline's segments. */
-      Segment_const_iterator end_segments() const
-      { return m_segments.end(); }
-
-      /*! Get a reverse iterator for the polyline's segments. */
-      Segment_const_reverse_iterator rbegin_segments() const
-      { return (Segment_const_reverse_iterator(end_segments())); }
-
-      /*! Get a reverse past-the-end iterator for the polyline points. */
-      Segment_const_reverse_iterator rend_segments() const
-      { return (Segment_const_reverse_iterator(begin_segments())); }
-
-      /*! Deprecated!
-       * Get the number of points contained in the polyline.
-       * In general (for example if the polyline is not bounded), then the
-       * number of vertices cannot be read-off from the number of segments, and
-       * the traits class is needed.
-       * \return The number of points.
-       */
-      CGAL_DEPRECATED std::size_t points() const
-      {
-        return (number_of_segments() == 0) ? 0 : number_of_segments() + 1;
-      }
-
-      /*! Deprecated! Replaced by number_of_segments()
-       * Get the number of segments that comprise the poyline.
-       * \return The number of segments.
-       */
-      CGAL_DEPRECATED Segments_size_type size() const
-      { return m_segments.size(); }
-
-      /*!
-       * Get the number of segments that comprise the poyline.
-       * \return The number of segments.
-       */
-      Segments_size_type number_of_segments() const
-      { return m_segments.size(); }
-
-      /*!
-       * Get the ith segment of the polyline.
-       * \param i The segment index(from 0 to size()-1).
-       * \return A const reference to the segment.
-       */
-      inline const Segment_type_2& operator[](const std::size_t i) const
-      {
-        CGAL_assertion(i < number_of_segments());
-        return (m_segments[i]);
-      }
-
-      /*! Clear the polyline. */
-      inline void clear()
-      {
-        m_segments.clear();
-      }
-    };
-
-    /*! \class
-     * Representation of an x-monotone polyline.
-     * An x-monotone polyline is always directed from left to right.
-     */
-    template <typename Segment_type_2_T, typename Point_type_2_T>
-    class X_monotone_polyline_2 :
-      public Polyline_2<Segment_type_2_T, Point_type_2_T>
-    {
-    public:
-      typedef Segment_type_2_T                          Segment_type_2;
-      typedef Point_type_2_T                            Point_type_2;
-
-      typedef Polyline_2<Segment_type_2, Point_type_2>  Base;
-
-      /*! Default constructor. */
-      X_monotone_polyline_2() : Base() {}
-
-      X_monotone_polyline_2(Segment_type_2 seg) : Base(seg){ }
-
-      /*! Constructor
-       * Similar to the constructor of a general polyline.
-       * Like in the case of general polyline, for the sake of backwards
-       * compatibility we have to keep an implementation of construction
-       * from a range of points. DO NOT USE THIS CONSTRUCTION.
-       */
-      template <typename InputIterator>
-      X_monotone_polyline_2(InputIterator begin, InputIterator end) :
-        Base(begin, end)
-      {
-        typedef typename std::iterator_traits<InputIterator>::value_type VT;
-        typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
-        construct_x_monotone_polyline(begin, end, Is_point());
-      }
-
-      /*!
-       * Constructs from a range of segments.
-       * This constructor is expected to be called only from the
-       * traits class, after the input was verified there.
-       * \pre The range of segments form an x-monotone polyline.
-       */
-      template <typename InputIterator>
-      void construct_x_monotone_polyline(InputIterator, InputIterator,
-                                         boost::false_type)
-      {}
-
-      /*!
-       * Constructs from a range of points, defining the endpoints of the
-       * polyline segments.
-       */
-      template <typename InputIterator>
-      CGAL_DEPRECATED void construct_x_monotone_polyline(InputIterator,
-                                                         InputIterator,
-                                                         boost::true_type)
-      {}
-    };
-
-    /*! Output operator for a polyline. */
-    template <typename Segment_type_2_T, typename Point_type_2_T>
-    std::ostream&
-    operator<<(std::ostream & os,
-               const Polyline_2<Segment_type_2_T, Point_type_2_T>& cv)
-    {
-      typedef Segment_type_2_T                          Segment_type_2;
-      typedef Point_type_2_T                            Point_type_2;
-      typedef Polyline_2<Segment_type_2, Point_type_2>  Curve_2;
-
-      typename Curve_2::Segment_const_iterator iter = cv.begin_segments();
-      while (iter != cv.end_segments()) {
-        if (iter == cv.begin_segments()) {
-          os << " " << *iter;
-          ++iter;
-        }
-        else {
-          os << " <-> " << *iter;
-          ++iter;
-        }
-      }
-      return (os);
-    }
-
-
-    /*! Input operator for a polyline. */
-    template <typename Segment_type_2_T, typename Point_type_2_T>
-    std::istream&
-    operator>>(std::istream& is,
-               Polyline_2<Segment_type_2_T, Point_type_2_T>& pl)
-    {
-      typedef Segment_type_2_T                          Segment_type_2;
-      typedef Point_type_2_T                            Point_type_2;
-      typedef Polyline_2<Segment_type_2, Point_type_2>  Curve_2;
-
-      // Read the number of input points.
-      unsigned int        n_pts;
-
-      is >> n_pts;
-
-      CGAL_precondition_msg(n_pts > 1,
-                            "Input must contain at least two points");
-
-      // Read m_num_pts points to a list.
-      Point_type_2 p;
-      std::list<Point_type_2> pts;
-      for (unsigned int i = 0; i < n_pts; ++i) {
-        is >> p;
-        pts.push_back(p);
-      }
-
-      std::list<Segment_type_2> segments;
-      typename std::list<Point_type_2>::iterator curr = pts.begin();
-      typename std::list<Point_type_2>::iterator next = pts.begin();
-      ++next;
-      while (next != pts.end()) {
-        segments.push_back(Segment_type_2(*curr, *next));
-        ++curr;
-        ++next;
-      }
-
-      // Create the polyline curve.
-      pl = Curve_2(segments.begin(), segments.end());
-
-      return (is);
-    }
-  } // namespace polyline
-} //namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_linear_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_linear_traits_2.h
deleted file mode 100644
index f817baf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_linear_traits_2.h
+++ /dev/null
@@ -1,1892 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-
-#ifndef CGAL_ARR_LINEAR_TRAITS_2_H
-#define CGAL_ARR_LINEAR_TRAITS_2_H
-
-/*! \file
- * The traits-class for handling linear objects (lines, rays and segments)
- * in the arrangement package.
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_enums.h>
-#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
-#include <fstream>
-
-namespace CGAL {
-
-template <class Kernel_> class Arr_linear_object_2;
-
-/*! \class
- * A traits class for maintaining an arrangement of linear objects (lines,
- * rays and segments), aoviding cascading of computations as much as possible.
- */
-template <class Kernel_>
-class Arr_linear_traits_2 : public Kernel_ {
-  friend class Arr_linear_object_2<Kernel_>;
-
-public:
-
-  typedef Kernel_                         Kernel;
-  typedef typename Kernel::FT             FT;
-
-  typedef typename Algebraic_structure_traits<FT>::Is_exact 
-                                          Has_exact_division;
-
-  // Category tags:
-  typedef Tag_true                        Has_left_category;
-  typedef Tag_true                        Has_merge_category;
-  typedef Tag_false                       Has_do_intersect_category;
-
-  typedef Arr_open_side_tag               Left_side_category;
-  typedef Arr_open_side_tag               Bottom_side_category;
-  typedef Arr_open_side_tag               Top_side_category;
-  typedef Arr_open_side_tag               Right_side_category;
-  
-  typedef typename Kernel::Line_2         Line_2;
-  typedef typename Kernel::Ray_2          Ray_2;
-  typedef typename Kernel::Segment_2      Segment_2;
-
-  typedef CGAL::Segment_assertions<Arr_linear_traits_2<Kernel> >
-                                          Segment_assertions;
-
-  /*!
-   * \class Representation of a linear with cached data.
-   */
-  class _Linear_object_cached_2
-  {
-  public:
-
-    typedef typename Kernel::Line_2                Line_2;
-    typedef typename Kernel::Ray_2                 Ray_2;
-    typedef typename Kernel::Segment_2             Segment_2;
-    typedef typename Kernel::Point_2               Point_2;
-
-  protected:
-
-    Line_2    l;                // The supporting line.
-    Point_2   ps;               // The source point (if exists).
-    Point_2   pt;               // The target point (if exists).
-    bool      has_source;       // Is the source point valid
-                                // (false for a line).
-    bool      has_target;       // Is the target point valid
-                                // (false for a line and for a ray).
-    bool      is_right;         // Is the object directed to the right
-                                // (for segments and rays).
-    bool      is_vert;          // Is this a vertical object.
-    bool      is_horiz;         // Is this a horizontal object.
-    bool      has_pos_slope;    // Does the supporting line has a positive
-                                // slope (if all three flags is_vert, is_horiz
-                                // and has_pos_slope are false, then the line
-                                // has a negative slope).
-    bool      is_degen;         // Is the object degenerate (a single point).
-
-  public:
-
-    /*!
-     * Default constructor.
-     */
-    _Linear_object_cached_2 () :
-      has_source (true),
-      has_target (true),
-      is_vert (false),
-      is_horiz (false),
-      has_pos_slope (false),
-      is_degen (true)
-    {}
-
-    /*!
-     * Constructor for segment from two points.
-     * \param p1 source point.
-     * \param p2 target point.
-     * \pre The two points must not be equal.
-     */
-    _Linear_object_cached_2(const Point_2& source, const Point_2& target) :
-      ps (source),
-      pt (target),
-      has_source (true),
-      has_target (true)
-    {
-      Kernel   kernel;
-
-      Comparison_result  res = kernel.compare_xy_2_object()(source, target);
-      is_degen = (res == EQUAL);
-      is_right = (res == SMALLER);
-
-      CGAL_precondition_msg (! is_degen,
-                             "Cannot construct a degenerate segment.");
-
-      l = kernel.construct_line_2_object()(source, target);
-      is_vert = kernel.is_vertical_2_object()(l);
-      is_horiz = kernel.is_horizontal_2_object()(l);
-      has_pos_slope = _has_positive_slope();
-    }
-
-    /*!
-     * Constructor from a segment.
-     * \param seg The segment.
-     * \pre The segment is not degenerate.
-     */
-    _Linear_object_cached_2 (const Segment_2& seg)
-    {
-      Kernel   kernel;
-
-      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (seg),
-                          "Cannot construct a degenerate segment.");
-
-      typename Kernel_::Construct_vertex_2
-        construct_vertex = kernel.construct_vertex_2_object();
-
-      ps = construct_vertex(seg, 0);
-      has_source = true;
-      pt = construct_vertex(seg, 1);
-      has_target = true;
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      
-      CGAL_assertion (res != EQUAL);
-      is_degen = false;
-      is_right = (res == SMALLER);
-
-      l = kernel.construct_line_2_object()(seg);
-      is_vert = kernel.is_vertical_2_object()(seg);
-      is_horiz = kernel.is_horizontal_2_object()(seg);
-      has_pos_slope = _has_positive_slope();
-    }
-
-    /*!
-     * Constructor from a ray.
-     * \param ray The ray.
-     * \pre The ray is not degenerate.
-     */
-    _Linear_object_cached_2 (const Ray_2& ray)
-    {
-      Kernel   kernel;
-
-      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (ray),
-                          "Cannot construct a degenerate ray.");
-
-      typename Kernel_::Construct_point_on_2
-        construct_vertex = kernel.construct_point_on_2_object();
-
-      ps = construct_vertex(ray, 0);         // The source point.
-      has_source = true;
-      pt = construct_vertex(ray, 1);         // Some point on the ray.
-      has_target = false;
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      CGAL_assertion (res != EQUAL);
-      is_degen = false;
-      is_right = (res == SMALLER);
-
-      l = kernel.construct_line_2_object()(ray);
-      is_vert = kernel.is_vertical_2_object()(ray);
-      is_horiz = kernel.is_horizontal_2_object()(ray);
-      has_pos_slope = _has_positive_slope();
-    }
-
-    /*!
-     * Constructor from a line.
-     * \param ln The line.
-     * \pre The line is not degenerate.
-     */
-    _Linear_object_cached_2 (const Line_2& ln) :
-      l (ln),
-      has_source (false),
-      has_target (false)
-    {
-      Kernel   kernel;
-
-      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (ln),
-                          "Cannot construct a degenerate line.");
-
-      typename Kernel_::Construct_point_on_2
-        construct_vertex = kernel.construct_point_on_2_object();
-
-      ps = construct_vertex(ln, 0);         // Some point on the line.
-      has_source = false;
-      pt = construct_vertex(ln, 1);         // Some point further on the line.
-      has_target = false;
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      CGAL_assertion (res != EQUAL);
-      is_degen = false;
-      is_right = (res == SMALLER);
-
-      is_vert = kernel.is_vertical_2_object()(ln);
-      is_horiz = kernel.is_horizontal_2_object()(ln);
-      has_pos_slope = _has_positive_slope();
-    }
-
-    /*!
-     * Check whether the x-coordinate of the left point is infinite.
-     * \return ARR_LEFT_BOUNDARY if the left point is near the boundary;
-     *         ARR_INTERIOR if the x-coordinate is finite.
-     */
-    Arr_parameter_space left_infinite_in_x () const
-    {
-      if (is_vert || is_degen)
-        return (ARR_INTERIOR);
-
-      return (is_right) ?
-        (has_source ? ARR_INTERIOR : ARR_LEFT_BOUNDARY) :
-        (has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY);
-    }
-
-    /*!
-     * Check whether the y-coordinate of the left point is infinite.
-     * \return ARR_BOTTOM_BOUNDARY if the left point is at y = -oo;
-     *         ARR_INTERIOR if the y-coordinate is finite.
-     *         ARR_TOP_BOUNDARY if the left point is at y = +oo;
-     */
-    Arr_parameter_space left_infinite_in_y () const
-    {
-      if (is_horiz || is_degen)
-        return ARR_INTERIOR;
-
-      if (is_vert) {
-        return (is_right) ?
-          (has_source ? ARR_INTERIOR : ARR_BOTTOM_BOUNDARY) :
-          (has_target ? ARR_INTERIOR : ARR_BOTTOM_BOUNDARY);
-      }
-
-      if ((is_right && has_source) || (! is_right && has_target))
-          return ARR_INTERIOR;
-
-      return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
-    }
-
-    /*!
-     * Check whether the left point is finite.
-     */
-    bool has_left () const
-    {
-      if (is_right)
-        return (has_source);
-      else 
-        return (has_target);
-    }
-
-    /*!
-     * Obtain the (lexicographically) left endpoint.
-     * \pre The left point is finite.
-     */
-    const Point_2& left () const
-    {
-      CGAL_precondition (has_left());
-      return (is_right ? ps : pt);
-    }
-
-    /*!
-     * Set the (lexicographically) left endpoint.
-     * \param p The point to set.
-     * \pre p lies on the supporting line to the left of the right endpoint.
-     */
-    void set_left (const Point_2& p, bool CGAL_assertion_code(check_validity) = true)
-    {
-      CGAL_precondition (! is_degen);
-
-      CGAL_precondition_code (
-        Kernel    kernel;
-      );
-      CGAL_precondition 
-        (Segment_assertions::_assert_is_point_on (p, l, 
-                                                  Has_exact_division()) &&
-         (! check_validity || ! has_right() ||
-          kernel.compare_xy_2_object() (p, right()) == SMALLER));
-
-      if (is_right)
-      {
-        ps = p;
-        has_source = true;
-      }
-      else
-      {
-        pt = p;
-        has_target = true;
-      }
-    }
-
-    /*!
-     * Set the (lexicographically) left endpoint as infinite.
-     */
-    void set_left ()
-    {
-      CGAL_precondition (! is_degen);
-
-      if (is_right)
-        has_source = false;
-      else
-        has_target = false;
-    }
-
-    /*!
-     * Check whether the x-coordinate of the right point is infinite.
-     * \return ARR_RIGHT_BOUNDARY if the right point is near the boundary;
-     *         ARR_INTERIOR if the x-coordinate is finite.
-     */
-    Arr_parameter_space right_infinite_in_x () const
-    {
-      if (is_vert || is_degen)
-        return ARR_INTERIOR;
-
-      return (is_right) ?
-        (has_target ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY) :
-        (has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
-    }
-
-    /*!
-     * Check whether the y-coordinate of the right point is infinite.
-     * \return ARR_BOTTOM_BOUNDARY if the right point is at y = -oo;
-     *         ARR_INTERIOR if the y-coordinate is finite.
-     *         ARR_TOP_BOUNDARY if the right point is at y = +oo;
-     */
-    Arr_parameter_space right_infinite_in_y () const
-    {
-      if (is_horiz || is_degen)
-        return ARR_INTERIOR;
-
-      if (is_vert) {
-        return (is_right) ?
-          (has_target ? ARR_INTERIOR : ARR_TOP_BOUNDARY) :
-          (has_source ? ARR_INTERIOR : ARR_TOP_BOUNDARY);
-      }
-
-      if ((is_right && has_target) || (! is_right && has_source))
-          return ARR_INTERIOR;
-
-      return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY);
-    }
-
-    /*!
-     * Check whether the right point is finite.
-     */
-    bool has_right () const
-    {
-      if (is_right)
-        return (has_target);
-      else 
-        return (has_source);
-    }
-
-    /*!
-     * Obtain the (lexicographically) right endpoint.
-     * \pre The right endpoint is finite.
-     */
-    const Point_2& right () const
-    {
-      CGAL_precondition (has_right());
-      return (is_right ? pt : ps);
-    }
-
-    /*!
-     * Set the (lexicographically) right endpoint.
-     * \param p The point to set.
-     * \pre p lies on the supporting line to the right of the left endpoint.
-     */
-    void set_right (const Point_2& p, bool CGAL_assertion_code(check_validity) = true)
-    {
-      CGAL_precondition (! is_degen);
-      CGAL_precondition_code (
-        Kernel    kernel;
-      );
-      CGAL_precondition 
-        (Segment_assertions::_assert_is_point_on (p, l, 
-                                                  Has_exact_division()) &&
-         (! check_validity || ! has_left() ||
-          kernel.compare_xy_2_object() (p, left()) == LARGER));
-
-      if (is_right)
-      {
-        pt = p;
-        has_target = true;
-      }
-      else
-      {
-        ps = p;
-        has_source = true;
-      }
-    }
-
-    /*!
-     * Set the (lexicographically) right endpoint as infinite.
-     */
-    void set_right ()
-    {
-      CGAL_precondition (! is_degen);
-
-      if (is_right)
-        has_target = false;
-      else
-        has_source = false;
-    }
-
-    /*!
-     * Obtain the supporting line.
-     */
-    const Line_2& supp_line () const
-    {
-      CGAL_precondition (! is_degen);
-      return (l);
-    }
-
-    /*!
-     * Check whether the curve is vertical.
-     */
-    bool is_vertical () const
-    {
-      CGAL_precondition (! is_degen);
-      return (is_vert);
-    }
-
-    /*!
-     * Check whether the curve is degenerate.
-     */
-    bool is_degenerate () const
-    {
-      return (is_degen);
-    }
-
-    /*!
-     * Check whether the curve is directed lexicographic from left to right
-     */
-    bool is_directed_right () const
-    {
-      return (is_right);
-    }
-
-    /*!
-     * Check whether the given point is in the x-range of the object.
-     * \param p The query point.
-     * \return (true) is in the x-range of the segment; (false) if it is not.
-     */
-    bool is_in_x_range (const Point_2& p) const
-    {
-      Kernel                          kernel;
-      typename Kernel_::Compare_x_2   compare_x = kernel.compare_x_2_object();
-      Comparison_result               res1;
-
-      if (left_infinite_in_x() == ARR_INTERIOR)
-      {
-        if (left_infinite_in_y() != ARR_INTERIOR)
-          // Compare with some point on the curve.
-          res1 = compare_x (p, ps);
-        else
-          res1 = compare_x (p, left());
-      }
-      else
-      {
-        // p is obviously to the right.
-        res1 = LARGER;
-      }
-
-      if (res1 == SMALLER)
-        return (false);
-      else if (res1 == EQUAL)
-        return (true);
-
-      Comparison_result               res2;
-
-      if (right_infinite_in_x() == ARR_INTERIOR)
-      {
-        if (right_infinite_in_y() != ARR_INTERIOR)
-          // Compare with some point on the curve.
-          res2 = compare_x (p, ps);
-        else
-          res2 = compare_x (p, right());
-      }
-      else
-      {
-        // p is obviously to the right.
-        res2 = SMALLER;          
-      }
-
-      return (res2 != LARGER);
-    }
-
-    /*!
-     * Check whether the given point is in the y-range of the object.
-     * \param p The query point.
-     * \pre The object is vertical.
-     * \return (true) is in the y-range of the segment; (false) if it is not.
-     */
-    bool is_in_y_range (const Point_2& p) const
-    {
-      CGAL_precondition (is_vertical());
-
-      Kernel                          kernel;
-      typename Kernel_::Compare_y_2   compare_y = kernel.compare_y_2_object();
-      Arr_parameter_space             inf = left_infinite_in_y();
-      Comparison_result               res1;
-
-      CGAL_assertion (inf != ARR_TOP_BOUNDARY);
-      if (inf == ARR_INTERIOR)
-        res1 = compare_y (p, left());
-      else
-        res1 = LARGER;           // p is obviously above.
-
-      if (res1 == SMALLER)
-        return (false);
-      else if (res1 == EQUAL)
-        return (true);
-
-      Comparison_result               res2;
-
-      inf = right_infinite_in_y();
-      CGAL_assertion (inf != ARR_BOTTOM_BOUNDARY);
-      if (inf == ARR_INTERIOR)
-        res2 = compare_y (p, right());
-      else
-        res2 = SMALLER;          // p is obviously below.
-
-      return (res2 != LARGER);
-    }
-
-  private:
-
-    /*!
-     * Determine if the supporting line has a positive slope.
-     */
-    bool _has_positive_slope () const
-    {
-      if (is_vert)
-        return (true);
-
-      if (is_horiz)
-        return (false);
-
-      // Construct a horizontal line and compare its slope the that of l.
-      Kernel     kernel;
-      Line_2     l_horiz = kernel.construct_line_2_object() (Point_2 (0, 0),
-                                                             Point_2 (1, 0));
-
-      return (kernel.compare_slope_2_object() (l, l_horiz) == LARGER);
-    }
-  };
-
-public:
-
-  // Traits objects
-  typedef typename Kernel::Point_2              Point_2;
-  typedef Arr_linear_object_2<Kernel>           X_monotone_curve_2;
-  typedef Arr_linear_object_2<Kernel>           Curve_2;
-  typedef unsigned int                          Multiplicity;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Arr_linear_traits_2 ()
-  {}
-
-  /// \name Basic functor definitions.
-  //@{
-
-  /*! A functor that compares the x-coordinates of two points */
-  class Compare_x_2 {
-  protected:
-    typedef Arr_linear_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits * m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     * The constructor is declared private to allow only the functor
-     * obtaining function, which is a member of the nesting class,
-     * constructing it.
-     */
-    Compare_x_2(const Traits * traits) : m_traits(traits) {}
-
-    //! Allow its functor obtaining function calling the private constructor.
-    friend class Arr_linear_traits_2<Kernel>;
-    
-  public:
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      const Kernel * kernel = m_traits;
-      return (kernel->compare_x_2_object()(p1, p2));
-    }
-  };
-
-  /*! Obtain a Compare_x_2 functor. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return Compare_x_2(this);
-  }
-
-  /*! A functor that compares the x-coordinates of two points */
-  class Compare_xy_2 {
-  public:
-    /*!
-     * Compare two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Kernel    kernel;
-      return (kernel.compare_xy_2_object()(p1, p2));
-    }
-  };
-
-  /*! Obtain a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return Compare_xy_2();
-  }
-
-  /*! A functor that obtains the left endpoint of a segment or a ray. */
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \pre The left end of cv is a valid (bounded) point.
-     * \return The left endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (! cv.is_degenerate());
-      CGAL_precondition (cv.has_left());
-
-      return (cv.left());
-    }
-  };
-
-  /*! Obtain a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  /*! A functor that obtains the right endpoint of a segment or a ray. */
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \pre The right end of cv is a valid (bounded) point.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (! cv.is_degenerate());
-      CGAL_precondition (cv.has_right());
-
-      return (cv.right());
-    }
-  };
-
-  /*! Obtain a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  /*! A functor that checks whether a given linear curve is vertical. */
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (! cv.is_degenerate());
-      return (cv.is_vertical());
-    }
-  };
-
-  /*! Obtain an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object () const
-  {
-    return Is_vertical_2();
-  }
-
-  /*! A functor that compares the y-coordinates of a point and a line at
-   * the point x-coordinate
-   */
-  class Compare_y_at_x_2 {
-  protected:
-    typedef Arr_linear_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     * The constructor is declared private to allow only the functor
-     * obtaining function, which is a member of the nesting class,
-     * constructing it.
-     */
-    Compare_y_at_x_2(const Traits * traits) : m_traits(traits) {}
-
-    //! Allow its functor obtaining function calling the private constructor.
-    friend class Arr_linear_traits_2<Kernel>;
-    
-  public:
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator() (const Point_2& p,
-                                  const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (! cv.is_degenerate());
-      CGAL_precondition (cv.is_in_x_range (p));
-
-      const Kernel * kernel = m_traits;
-      if (! cv.is_vertical())
-        // Compare p with the segment's supporting line.
-        return (kernel->compare_y_at_x_2_object()(p, cv.supp_line()));
-
-      // Compare with the vertical segment's end-points.
-      typename Kernel::Compare_y_2  compare_y = kernel->compare_y_2_object();
-      const Comparison_result res1 =
-        cv.has_left() ? compare_y (p, cv.left()) : LARGER;
-      const Comparison_result res2 = 
-        cv.has_right() ? compare_y (p, cv.right()) : SMALLER;
-
-      return (res1 == res2) ? res1 : EQUAL;
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return Compare_y_at_x_2(this);
-  }
-
-  /*! A functor that compares compares the y-coordinates of two linear
-   * curves immediately to the left of their intersection point.
-   */
-  class Compare_y_at_x_left_2
-  {
-  public:
-    /*!
-     * Compare the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& CGAL_precondition_code(p)) const
-    {
-      CGAL_precondition (! cv1.is_degenerate());
-      CGAL_precondition (! cv2.is_degenerate());
-
-      Kernel                        kernel;
-
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition_code (
-        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition 
-        (Segment_assertions::_assert_is_point_on (p, cv1, 
-                                                  Has_exact_division()) &&
-         Segment_assertions::_assert_is_point_on (p, cv2,
-                                                  Has_exact_division()));
-
-      CGAL_precondition ((! cv1.has_left() ||
-                          compare_xy(cv1.left(), p) == SMALLER) &&
-                         (! cv2.has_left() ||
-                          compare_xy(cv2.left(), p) == SMALLER));
-
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-      // Notice we use the supporting lines in order to compare the slopes,
-      // and that we swap the order of the curves in order to obtain the
-      // correct result to the left of p.
-      return (kernel.compare_slope_2_object()(cv2.supp_line(), cv1.supp_line()));
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
-  {
-    return Compare_y_at_x_left_2();
-  }
-
-  /*! A functor that compares compares the y-coordinates of two linear
-   * curves immediately to the right of their intersection point.
-   */
-  class Compare_y_at_x_right_2
-  {
-  public:
-    /*!
-     * Compare the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& CGAL_precondition_code(p)) const
-    {
-      CGAL_precondition (! cv1.is_degenerate());
-      CGAL_precondition (! cv2.is_degenerate());
-
-      Kernel                        kernel;
-
-      // Make sure that p lies on both curves, and that both are defined to its
-      // right (so their right endpoint is lexicographically larger than p).
-      CGAL_precondition_code (
-        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, cv1, 
-                                                  Has_exact_division()) &&
-         Segment_assertions::_assert_is_point_on (p, cv2,
-                                                  Has_exact_division()));
-
-      CGAL_precondition ((! cv1.has_right() ||
-                          compare_xy(cv1.right(), p) == LARGER) &&
-                         (! cv2.has_right() ||
-                          compare_xy(cv2.right(), p) == LARGER));
-
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-      // Notice we use the supporting lines in order to compare the slopes.
-      return (kernel.compare_slope_2_object()(cv1.supp_line(),
-                                              cv2.supp_line()));
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return Compare_y_at_x_right_2();
-  }
-
-  /*! A functor that checks whether two points and two linear curves are
-   * identical.
-   */
-  class Equal_2
-  {
-  public:
-    /*!
-     * Check whether the two x-monotone curves are the same (have the same
-     * graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      CGAL_precondition (! cv1.is_degenerate());
-      CGAL_precondition (! cv2.is_degenerate());
-
-      Kernel                    kernel;
-      typename Kernel::Equal_2  equal = kernel.equal_2_object();
-
-      // Check that the two supporting lines are the same.
-      if (! equal (cv1.supp_line(), cv2.supp_line()) &&
-          ! equal (cv1.supp_line(), 
-                   kernel.construct_opposite_line_2_object()(cv2.supp_line())))
-      {
-        return (false);
-      }
-
-      // Check that either the two left endpoints are at infinity, or they
-      // are bounded and equal.
-      if ((cv1.has_left() != cv2.has_left()) ||
-          (cv1.has_left() && ! equal (cv1.left(), cv2.left())))
-      {
-        return (false);
-      }
-
-      // Check that either the two right endpoints are at infinity, or they
-      // are bounded and equal.
-      return ((cv1.has_right() == cv2.has_right()) &&
-              (! cv1.has_right() || equal (cv1.right(), cv2.right())));
-    }
-
-    /*!
-     * Check whether the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Kernel    kernel;
-      return (kernel.equal_2_object()(p1, p2));
-    }
-  };
-
-  /*! Obtain an Equal_2 functor object. */
-  Equal_2 equal_2_object () const
-  {
-    return Equal_2();
-  }
-  //@}
-
-  /// \name Functor definitions to handle boundaries
-  //@{
-
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the x-axis
-   */
-  class Parameter_space_in_x_2 {
-  public:
-    /*! Obtains the parameter space at the end of a line along the x-axis.
-     * \param xcv the line
-     * \param ce the line end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the line xcv.
-     *   ARR_LEFT_BOUNDARY  - the line approaches the identification arc from
-     *                        the right at the line left end.
-     *   ARR_INTERIOR       - the line does not approache the identification arc.
-     *   ARR_RIGHT_BOUNDARY - the line approaches the identification arc from
-     *                        the left at the line right end.
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
-                                   Arr_curve_end ce) const
-    {
-      CGAL_precondition (! xcv.is_degenerate());
-      return (ce == ARR_MIN_END) ?
-        xcv.left_infinite_in_x() : xcv.right_infinite_in_x();
-    }
-
-    /*! Obtains the parameter space at a point along the x-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     */
-    Arr_parameter_space operator()(const Point_2 ) const
-    {
-      return ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_x_2 function object */
-  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
-  { return Parameter_space_in_x_2(); }
-  
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the y-axis
-   */
-  class Parameter_space_in_y_2 {
-  public:
-    /*! Obtains the parameter space at the end of a line along the y-axis .
-     * Note that if the line end coincides with a pole, then unless the line
-     * coincides with the identification arc, the line end is considered to
-     * be approaching the boundary, but not on the boundary.
-     * If the line coincides with the identification arc, it is assumed to
-     * be smaller than any other object.
-     * \param xcv the line
-     * \param ce the line end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the line xcv.
-     *   ARR_BOTTOM_BOUNDARY  - the line approaches the south pole at the line
-     *                          left end.
-     *   ARR_INTERIOR         - the line does not approache a contraction point.
-     *   ARR_TOP_BOUNDARY     - the line approaches the north pole at the line
-     *                          right end.
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
-                                   Arr_curve_end ce) const
-    {
-      CGAL_precondition (! xcv.is_degenerate());
-
-      return (ce == ARR_MIN_END) ?
-        xcv.left_infinite_in_y() : xcv.right_infinite_in_y();
-    }
-
-    /*! Obtains the parameter space at a point along the y-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     */
-    Arr_parameter_space operator()(const Point_2 ) const
-    {
-      return ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_y_2 function object */
-  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
-  { return Parameter_space_in_y_2(); }
-
-  /*! A function object that compares the x-limits of arc ends on the
-   * boundary of the parameter space
-   */
-  class Compare_x_at_limit_2 {
-  protected:
-    typedef Arr_linear_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     * The constructor is declared private to allow only the functor
-     * obtaining function, which is a member of the nesting class,
-     * constructing it.
-     */
-    Compare_x_at_limit_2(const Traits* traits) : m_traits(traits) {}
-
-    //! Allow its functor obtaining function calling the private constructor.
-    friend class Arr_linear_traits_2<Kernel>;
-
-  public:
-    /*! Compare the x-limit of a vertical line at a point with the x-limit of
-     * a line end on the boundary at y = +/- oo.
-     * \param p the point direction.
-     * \param xcv the line, the endpoint of which is compared.
-     * \param ce the line-end indicator -
-     *            ARR_MIN_END - the minimal end of xc or
-     *            ARR_MAX_END - the maximal end of xc.
-     * \return the comparison result:
-     *         SMALLER - x(p) < x(xc, ce);
-     *         EQUAL   - x(p) = x(xc, ce);
-     *         LARGER  - x(p) > x(xc, ce).     
-     * \pre p lies in the interior of the parameter space.
-     * \pre the ce end of the line xcv lies on a boundary, implying
-     *      that xcv1 is vertical.
-     */
-    Comparison_result operator()(const Point_2 & p,
-                                 const X_monotone_curve_2 & xcv,
-                                 Arr_curve_end ) const
-    {
-      CGAL_precondition(! xcv.is_degenerate());
-      CGAL_precondition(xcv.is_vertical());
-
-      const Kernel* kernel = m_traits;
-      return (kernel->compare_x_at_y_2_object()(p, xcv.supp_line()));
-    }
-
-    /*! Compare the x-limits of 2 arcs ends on the boundary of the
-     * parameter space at y = +/- oo.
-     * \param xcv1 the first arc.
-     * \param ce1 the first arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv1 or
-     *            ARR_MAX_END - the maximal end of xcv1.
-     * \param xcv2 the second arc.
-     * \param ce2 the second arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv2 or
-     *            ARR_MAX_END - the maximal end of xcv2.
-     * \return the second comparison result:
-     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
-     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
-     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
-     * \pre the ce1 end of the line xcv1 lies on a boundary, implying
-     *      that xcv1 is vertical.
-     * \pre the ce2 end of the line xcv2 lies on a boundary, implying
-     *      that xcv2 is vertical.
-     */
-    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
-                                 Arr_curve_end /* ce1 */,
-                                 const X_monotone_curve_2 & xcv2,
-                                 Arr_curve_end /*! ce2 */) const
-    {
-      CGAL_precondition(! xcv1.is_degenerate());
-      CGAL_precondition(! xcv2.is_degenerate());
-      CGAL_precondition(xcv1.is_vertical());
-      CGAL_precondition(xcv2.is_vertical());
-
-      const Kernel* kernel = m_traits;
-      const Point_2 p = kernel->construct_point_2_object()(ORIGIN);
-      return (kernel->compare_x_at_y_2_object()(p, xcv1.supp_line(),
-                                                xcv2.supp_line()));
-    }
-  };
-
-  /*! Obtain a Compare_x_at_limit_2 function object */
-  Compare_x_at_limit_2 compare_x_at_limit_2_object() const
-  { return Compare_x_at_limit_2(this); }
-
-  /*! A function object that compares the x-coordinates of arc ends near the
-   * boundary of the parameter space
-   */
-  class Compare_x_near_limit_2 {
-  public:
-
-    /*! Compare the x-coordinates of 2 arcs ends near the boundary of the
-     * parameter space at y = +/- oo.
-     * \param xcv1 the first arc.
-     * \param ce1 the first arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv1 or
-     *            ARR_MAX_END - the maximal end of xcv1.
-     * \param xcv2 the second arc.
-     * \param ce2 the second arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv2 or
-     *            ARR_MAX_END - the maximal end of xcv2.
-     * \return the second comparison result:
-     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
-     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
-     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
-     * \pre the ce end of the line xcv1 lies on a boundary, implying
-     *      that xcv1 is vertical.
-     * \pre the ce end of the line xcv2 lies on a boundary, implying
-     *      that xcv2 is vertical.
-     * \pre the the $x$-coordinates of xcv1 and xcv2 at their ce ends are
-     *      equal, implying that the curves overlap!
-     */
-    Comparison_result
-    operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1),
-               const X_monotone_curve_2& CGAL_precondition_code(xcv2),
-               Arr_curve_end /*! ce2 */) const
-    {
-      CGAL_precondition(! xcv1.is_degenerate());
-      CGAL_precondition(! xcv2.is_degenerate());
-      CGAL_precondition(xcv1.is_vertical());
-      CGAL_precondition(xcv2.is_vertical());
-      return EQUAL;
-    }
-  };
-
-  /*! Obtain a Compare_x_near_limit_2 function object */
-  Compare_x_near_limit_2 compare_x_near_limit_2_object() const
-  { return Compare_x_near_limit_2(); }
-    
-
-  /*! A function object that compares the y-limits of arc ends on the
-   * boundary of the parameter space.
-   */
-  class Compare_y_near_boundary_2 {
-  protected:
-    typedef Arr_linear_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     * The constructor is declared private to allow only the functor
-     * obtaining function, which is a member of the nesting class,
-     * constructing it.
-     */
-    Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {}
-
-    //! Allow its functor obtaining function calling the private constructor.
-    friend class Arr_linear_traits_2<Kernel>;
-    
-  public:
-    /*! Compare the y-limits of 2 lines at their ends on the boundary
-     * of the parameter space at x = +/- oo.
-     * \param xcv1 the first arc.
-     * \param xcv2 the second arc.
-     * \param ce the line end indicator.
-     * \return the second comparison result.
-     * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left
-     * boundary or on the right boundary of the parameter space.
-     */
-    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
-                                 const X_monotone_curve_2 & xcv2,
-                                 Arr_curve_end ce) const
-    {
-      // Make sure both curves are defined at x = -oo (or at x = +oo).
-      CGAL_precondition(! xcv1.is_degenerate());
-      CGAL_precondition(! xcv2.is_degenerate());
-      CGAL_precondition((ce == ARR_MIN_END &&
-                         xcv1.left_infinite_in_x() == ARR_LEFT_BOUNDARY &&
-                         xcv2.left_infinite_in_x() == ARR_LEFT_BOUNDARY) ||
-                        (ce == ARR_MAX_END &&
-                         xcv1.right_infinite_in_x() == ARR_RIGHT_BOUNDARY &&
-                         xcv2.right_infinite_in_x() == ARR_RIGHT_BOUNDARY));
-
-      // Compare the slopes of the two supporting lines.
-      const Kernel* kernel = m_traits;
-      const Comparison_result res_slopes =
-        kernel->compare_slope_2_object()(xcv1.supp_line(), xcv2.supp_line());
-
-      if (res_slopes == EQUAL) {
-        // In case the two supporting line are parallel, compare their
-        // relative position at x = 0, which is the same as their position
-        // at infinity.
-        const Point_2 p = kernel->construct_point_2_object()(ORIGIN);
-        return (kernel->compare_y_at_x_2_object()(p, xcv1.supp_line(),
-                                                  xcv2.supp_line()));
-      }
-
-      // Flip the slope result if we compare at x = -oo:
-      return (ce == ARR_MIN_END) ? CGAL::opposite(res_slopes) : res_slopes;
-    }
-  };
-
-
-  /*! Obtain a Compare_y_limit_on_boundary_2 function object */
-  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
-  { return Compare_y_near_boundary_2(this); }
-  
-  //@}
-  
-  /// \name Functor definitions for supporting intersections.
-  //@{
-
-  class Make_x_monotone_2
-  {
-  public:
-    /*!
-     * Cut the given curve into x-monotone subcurves and insert them into the
-     * given output iterator. As segments are always x_monotone, only one
-     * object will be contained in the iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object. The output
-     *           object is a wrapper of an X_monotone_curve_2 which is
-     *           essentially the same as the input curve.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
-    {
-      // Wrap the curve with an object.
-      *oi = make_object (cv);
-      ++oi;
-
-      return (oi);
-    }
-  };
-
-  /*! Obtain a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object () const
-  {
-    return Make_x_monotone_2();
-  }
-
-  class Split_2
-  {
-  public:
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      CGAL_precondition (! cv.is_degenerate());
-
-      // Make sure that p lies on the interior of the curve.
-      CGAL_precondition_code (
-        Kernel                        kernel;
-        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, cv,
-                                                  Has_exact_division()) &&
-         (! cv.has_left() || compare_xy(cv.left(), p) == SMALLER) &&
-         (! cv.has_right() || compare_xy(cv.right(), p) == LARGER));
-
-      // Perform the split.
-      c1 = cv;
-      c1.set_right (p);
-
-      c2 = cv;
-      c2.set_left (p);
-
-      return;
-    }
-  };
-
-  /*! Obtain a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2();
-  }
-
-  class Intersect_2
-  {
-  public:
-    /*!
-     * Find the intersections of the two given curves and insert them into the
-     * given output iterator. As two segments may itersect only once, only a
-     * single intersection will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      CGAL_precondition (! cv1.is_degenerate());
-      CGAL_precondition (! cv2.is_degenerate());
-
-      // Intersect the two supporting lines.
-      Kernel       kernel;
-      CGAL::Object obj = kernel.intersect_2_object()(cv1.supp_line(),
-                                                     cv2.supp_line());
-
-      if (obj.is_empty())
-      {
-        // The supporting line are parallel lines and do not intersect:
-        return (oi);
-      }
-
-      // Check whether we have a single intersection point.
-      const Point_2  *ip = object_cast<Point_2> (&obj);
-      
-      if (ip != NULL)
-      {
-        // Check whether the intersection point ip lies on both segments.
-        const bool    ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
-                                                      cv1.is_in_x_range(*ip);
-
-        if (ip_on_cv1)
-        {
-          const bool  ip_on_cv2 = cv2.is_vertical() ? cv2.is_in_y_range(*ip) :
-                                                      cv2.is_in_x_range(*ip);
-
-          if (ip_on_cv2)
-          {
-            // Create a pair representing the point with its multiplicity,
-            // which is always 1 for line segments.
-            std::pair<Point_2,Multiplicity>   ip_mult (*ip, 1);
-            *oi = make_object (ip_mult);
-            oi++;
-          }
-        }
-        return (oi);
-      }
-
-      // In this case, the two supporting lines overlap.
-      // We start with the entire cv1 curve as the overlapping subcurve,
-      // then clip it to form the true overlapping curve.
-      typename Kernel::Compare_xy_2  compare_xy = kernel.compare_xy_2_object();
-      X_monotone_curve_2             ovlp = cv1;
-
-      if (cv2.has_left())
-      {
-        // If the left endpoint of cv2 is to the right of cv1's left endpoint,
-        // clip the overlapping subcurve.
-        if (! cv1.has_left())
-        {
-          ovlp.set_left (cv2.left(), false);
-        }
-        else
-        {
-          if (compare_xy (cv1.left(), cv2.left()) == SMALLER)
-            ovlp.set_left (cv2.left(), false);
-        }
-      }
-
-      if (cv2.has_right())
-      {
-        // If the right endpoint of cv2 is to the left of cv1's right endpoint,
-        // clip the overlapping subcurve.
-        if (! cv1.has_right())
-        {
-          ovlp.set_right (cv2.right(), false);
-        }
-        else
-        {
-          if (compare_xy (cv1.right(), cv2.right()) == LARGER)
-            ovlp.set_right (cv2.right(), false);
-        }
-      }
-
-      // Examine the resulting subcurve.
-      Comparison_result        res = SMALLER;
-
-      if (ovlp.has_left() && ovlp.has_right())
-        res = compare_xy (ovlp.left(), ovlp.right());
-
-      if (res == SMALLER)
-      {
-        // We have discovered a true overlapping subcurve:
-        *oi = make_object (ovlp);
-        oi++;
-      }
-      else if (res == EQUAL)
-      {
-        // The two objects have the same supporting line, but they just share
-        // a common endpoint. Thus we have an intersection point, but we leave
-        // the multiplicity of this point undefined.
-        std::pair<Point_2,Multiplicity>   ip_mult (ovlp.left(), 0);
-        *oi = make_object (ip_mult);
-        oi++;
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Obtain an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return Intersect_2();
-  }
-
-  class Are_mergeable_2
-  {
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable - if they are supported
-     *         by the same line and share a common endpoint; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      CGAL_precondition (! cv1.is_degenerate());
-      CGAL_precondition (! cv2.is_degenerate());
-
-      Kernel                    kernel;
-      typename Kernel::Equal_2  equal = kernel.equal_2_object();
-
-      // Check whether the two curves have the same supporting line.
-      if (! equal (cv1.supp_line(), cv2.supp_line()) && 
-          ! equal (cv1.supp_line(), 
-                   kernel.construct_opposite_line_2_object()(cv2.supp_line())))
-        return (false);
-
-      // Check whether the left endpoint of one curve is the right endpoint of the
-      // other.
-      return ((cv1.has_right() && cv2.has_left() &&
-               equal (cv1.right(), cv2.left())) ||
-              (cv2.has_right() && cv1.has_left() &&
-               equal (cv2.right(), cv1.left())));
-    }
-  };
-
-  /*! Obtain an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object () const
-  {
-    return Are_mergeable_2();
-  }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2
-  {
-  protected:
-    typedef Arr_linear_traits_2<Kernel> Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_linear_traits_2<Kernel>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve (segment).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2,
-                     X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-
-      CGAL_precondition(!cv1.is_degenerate());
-      CGAL_precondition(!cv2.is_degenerate());
-
-      Equal_2 equal = m_traits->equal_2_object();
-
-      // Check which curve extends to the right of the other.
-      if (cv1.has_right() && cv2.has_left() &&
-          equal(cv1.right(), cv2.left()))
-      {
-        // cv2 extends cv1 to the right.
-        c = cv1;
-
-        if (cv2.has_right())
-          c.set_right(cv2.right());
-        else
-          c.set_right();      // Unbounded endpoint. 
-      }
-      else {
-        CGAL_precondition(cv2.has_right() && cv1.has_left() &&
-                          equal(cv2.right(), cv1.left()));
-
-        // cv1 extends cv2 to the right.
-        c = cv2;
-
-        if (cv1.has_right())
-          c.set_right(cv1.right());
-        else
-          c.set_right();      // Unbounded endpoint.
-      }
-    }
-  };
-
-  /*! Obtain a Merge_2 functor object. */
-  Merge_2 merge_2_object () const { return Merge_2(this); }
-  //@}
-
-  /// \name Functor definitions for the landmarks point-location strategy.
-  //@{
-  typedef double                          Approximate_number_type;
-
-  class Approximate_2
-  {
-  public:
-
-    /*!
-     * Return an approximation of a point coordinate.
-     * \param p The exact point.
-     * \param i The coordinate index (either 0 or 1).
-     * \pre i is either 0 or 1.
-     * \return An approximation of p's x-coordinate (if i == 0), or an 
-     *         approximation of p's y-coordinate (if i == 1).
-     */
-    Approximate_number_type operator() (const Point_2& p,
-                                        int i) const
-    {
-      CGAL_precondition (i == 0 || i == 1);
-
-      if (i == 0)
-        return (CGAL::to_double(p.x()));
-      else
-        return (CGAL::to_double(p.y()));
-    }
-  };
-
-  /*! Obtain an Approximate_2 functor object. */
-  Approximate_2 approximate_2_object () const
-  {
-    return Approximate_2();
-  }
-
-  class Construct_x_monotone_curve_2
-  {
-  public:
-
-    /*!
-     * Return an x-monotone curve connecting the two given endpoints.
-     * \param p The first point.
-     * \param q The second point.
-     * \pre p and q must not be the same.
-     * \return A segment connecting p and q.
-     */
-    X_monotone_curve_2 operator() (const Point_2& p,
-                                   const Point_2& q) const
-    {
-      Kernel     kernel;
-      Segment_2  seg = kernel.construct_segment_2_object() (p, q);
-
-      return (X_monotone_curve_2 (seg));
-    }
-  };
-
-  /*! Obtain a Construct_x_monotone_curve_2 functor object. */
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
-  {
-    return Construct_x_monotone_curve_2();
-  }
-  //@}
-
-};
-
-/*!
- * \class A representation of a segment, as used by the Arr_segment_traits_2
- * traits-class.
- */
-template <class Kernel_>
-class Arr_linear_object_2 :
-    public Arr_linear_traits_2<Kernel_>::_Linear_object_cached_2
-{
-  typedef typename Arr_linear_traits_2<Kernel_>::_Linear_object_cached_2 
-                                                                   Base;
-
-public:
-
-  typedef Kernel_                                           Kernel;
-
-  typedef typename Kernel::Point_2                          Point_2;
-  typedef typename Kernel::Segment_2                        Segment_2;
-  typedef typename Kernel::Ray_2                            Ray_2;
-  typedef typename Kernel::Line_2                           Line_2;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Arr_linear_object_2 () :
-    Base()
-  {}
-    
-  /*!
-   * Constructor from two points.
-   * \param s The source point.
-   * \param t The target point.
-   * \pre The two points must not be the same.
-   */
-  Arr_linear_object_2(const Point_2& s, const Point_2& t):
-    Base(s, t)
-  {}
-
-  /*!
-   * Constructor from a segment.
-   * \param seg The segment.
-   * \pre The segment is not degenerate.
-   */
-  Arr_linear_object_2 (const Segment_2& seg) :
-    Base (seg)
-  {}
-
-  /*!
-   * Constructor from a ray.
-   * \param ray The segment.
-   * \pre The ray is not degenerate.
-   */
-  Arr_linear_object_2 (const Ray_2& ray) :
-    Base (ray)
-  {}
-
-  /*!
-   * Constructor from a line.
-   * \param line The line.
-   * \pre The line is not degenerate.
-   */
-  Arr_linear_object_2 (const Line_2& line) :
-    Base (line)
-  {}
-
-  /*!
-   * Check whether the object is actually a segment.
-   */
-  bool is_segment () const
-  {
-    return (! this->is_degen && this->has_source && this->has_target);
-  }
-
-  /*!
-   * Cast to a segment.
-   * \pre The linear object is really a segment.
-   */
-  Segment_2 segment () const
-  {
-    CGAL_precondition (is_segment());
-
-    Kernel     kernel;
-    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
-    return seg;
-  }
-
-  /*!
-   * Check whether the object is actually a ray.
-   */
-  bool is_ray () const
-  {
-    return (! this->is_degen && (this->has_source != this->has_target));
-  }
-
-  /*!
-   * Cast to a ray.
-   * \pre The linear object is really a ray.
-   */
-  Ray_2 ray () const
-  {
-    CGAL_precondition (is_ray());
-
-    Kernel     kernel;
-    Ray_2      ray = (this->has_source) ?
-      kernel.construct_ray_2_object() (this->ps, this->l) :
-      kernel.construct_ray_2_object()
-        (this->pt, kernel.construct_opposite_line_2_object()(this->l));
-    return ray;
-  }
-
-  /*!
-   * Check whether the object is actually a line.
-   */
-  bool is_line () const
-  {
-    return (! this->is_degen && ! this->has_source && ! this->has_target);
-  }
-
-  /*!
-   * Cast to a line.
-   * \pre The linear object is really a line.
-   */
-  Line_2 line () const
-  {
-    CGAL_precondition (is_line());
-    return (this->l);
-  }
-
-  /*!
-   * Get the supporting line.
-   * \pre The object is not a point.
-   */
-  const Line_2& supporting_line () const
-  {
-    CGAL_precondition (! this->is_degen);
-    return (this->l);
-  }
-
-  /*!
-   * Get the source point.
-   * \pre The object is a point, a segment or a ray.
-   */
-  const Point_2& source() const
-  {
-    CGAL_precondition (! is_line());
-
-    if (this->is_degen)
-      return (this->ps);      // For a point.
-
-    if (this->has_source)
-      return (this->ps);      // For a segment or a ray.
-    else
-      return (this->pt);      // For a "flipped" ray.
-  }
-
-  /*!
-   * Get the target point.
-   * \pre The object is a point or a segment.
-   */
-  const Point_2& target() const
-  {
-    CGAL_precondition (! is_line() && ! is_ray());
-
-    return (this->pt);
-  }
-
-  /*!
-   * Create a bounding box for the linear object.
-   */
-  Bbox_2 bbox() const
-  {
-    CGAL_precondition(this->is_segment());
-    Kernel     kernel;
-    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
-    return (kernel.construct_bbox_2_object() (seg));
-  }
-
-  // Introducing casting operators instead from a curve to
-  // Kernel::Segment_2, Kernel::Ray_2, and Kernel::Line_2 creates an
-  // umbiguity. The compiler will barf on the last one, because there are
-  // 2 constructors of Kernel::Line_2: one from Kernel::Segment_2 and one
-  // from Kernel::Ray_2. Together with the cast to Kernel::Line_2, the
-  // compiler will have 3 equivalent options to choose from.
-};
-
-/*!
- * Exporter for the segment class used by the traits-class.
- */
-template <class Kernel, class OutputStream>
-OutputStream& operator<< (OutputStream& os,
-                          const Arr_linear_object_2<Kernel>& lobj)
-{
-  // Print a letter identifying the object type, then the object itself.
-  if (lobj.is_segment())
-    os << " S " << lobj.segment();
-  else if (lobj.is_ray())
-    os << " R " << lobj.ray();
-  else
-    os << " L " << lobj.line();
-
-  return (os);
-}
-
-/*!
- * Importer for the segment class used by the traits-class.
- */
-template <class Kernel, class InputStream>
-InputStream& operator>> (InputStream& is, Arr_linear_object_2<Kernel>& lobj)
-{
-  // Read the object type.
-  char        c;
-
-  do
-  {
-    is >> c;
-  } while ((c != 'S' && c != 's') &&
-           (c != 'R' && c != 'r') &&
-           (c != 'L' && c != 'l'));
-
-  // Read the object accordingly.
-  if (c == 'S' || c == 's')
-  {
-    typename Kernel::Segment_2  seg;
-    is >> seg;
-    lobj = seg;
-  }
-  else if (c == 'R' || c == 'r')
-  {
-    typename Kernel::Ray_2      ray;
-    is >> ray;
-    lobj = ray;
-  }
-  else
-  {
-    typename Kernel::Line_2     line;
-    is >> line;
-    lobj = line;
-  }
-
-  return (is);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_basic_traits_2.h
deleted file mode 100644
index f36fe98..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_basic_traits_2.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
-//                 Ron Wein  <wein at post.tau.ac.il>
-//                 (based on old version by: Iddo Hanniel,
-//                                           Eyal Flato,
-//                                           Oren Nechushtan,
-//                                           Ester Ezra,
-//                                           Shai Hirsch,
-//                                           and Eugene Lipovetsky)
-
-#ifndef CGAL_ARR_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
-#define CGAL_ARR_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
-
-/*! \file The basic non-caching segment traits-class for the arrangement
- * package. This traits class handles x-monotone non-intersecting segments.
- * It is a model of the ArrangementBasicTraits_2 concept. The class is
- * templated by a kernel and inherits from it all the types and many of the
- * functors required by the concept it models.
- */
-
-#include <CGAL/Algebraic_structure_traits.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/assertions.h>
-#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
-
-namespace CGAL {
-
-/*! \class
- * A model of the ArrangementBasicTraits_2 concept that handles x-monotone
- * non-intersecting line segments.
- */
-template <class T_Kernel>
-class Arr_non_caching_segment_basic_traits_2 : public T_Kernel
-{
-public:
-
-  typedef T_Kernel                              Kernel;
-
-  typedef typename Kernel::FT                   FT;
-
-private:
-  typedef Algebraic_structure_traits<FT> AST; 
-  typedef typename AST::Is_exact FT_is_exact; 
-public:
-
-  typedef Boolean_tag<FT_is_exact::value> Has_exact_division;
-
-  typedef
-  CGAL::Segment_assertions<Arr_non_caching_segment_basic_traits_2<Kernel> >
-                                                Segment_assertions;
-
-  // Categories:
-  typedef Tag_true                              Has_left_category;
-  typedef Tag_false                             Has_do_intersect_category;
- 
-  typedef Arr_oblivious_side_tag                Left_side_category;
-  typedef Arr_oblivious_side_tag                Bottom_side_category;
-  typedef Arr_oblivious_side_tag                Top_side_category;
-  typedef Arr_oblivious_side_tag                Right_side_category;
-    
-  /*! Default Constructor */
-  Arr_non_caching_segment_basic_traits_2()
-  {}
-  
-  /// \name Types and functor inherited from the kernel
-  //@{
-
-  // Traits types:
-  typedef typename Kernel::Point_2                 Point_2;
-  typedef typename Kernel::Segment_2               X_monotone_curve_2;
-  typedef unsigned int                             Multiplicity;
-
-  /*! Compare the x-coordinates of two points */
-  typedef typename Kernel::Compare_x_2             Compare_x_2;
-
-  /*! Compare two points lexigoraphically; by x, then by y */
-  typedef typename Kernel::Compare_xy_2            Compare_xy_2;
-
-  /*! Obtain the left endpoint of a given segment */
-  typedef typename Kernel::Construct_min_vertex_2  Construct_min_vertex_2;
-
-  /*! Obtain the right endpoint of a given segment */
-  typedef typename Kernel::Construct_max_vertex_2  Construct_max_vertex_2;
-  
-  /*! Check whether a given segment is vertical */
-  typedef typename Kernel::Is_vertical_2           Is_vertical_2;
-  
-  /*! Return the location of a given point with respect to an input segment */
-  typedef typename Kernel::Compare_y_at_x_2        Compare_y_at_x_2;
-  
-  /*! Check if two segments or if two points are identical */
-  typedef typename Kernel::Equal_2                 Equal_2;
-
-  //@}
-
-  /// \name Functor introduced here (based on the kernel)
-  //@{
-
-  /*! \class 
-   * A functor for comparing two segments to the left of a point 
-   */
-  class Compare_y_at_x_left_2 {
-  public:
-    
-    /* 
-     * Compare the y value of two segments immediately to the left of their
-     * intersection point.
-     * \param cv1 The first segment.
-     * \param cv2 The second segment.
-     * \param p The intersection point.
-     * \pre The point p lies on both segments, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator()(const X_monotone_curve_2 & cv1,
-                                 const X_monotone_curve_2 & cv2,
-                                 const Point_2 & p) const
-    {
-      Kernel kernel;
-
-      // The two segments must be defined at q and also to its left.
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&&
-         Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division()));
-
-      CGAL_precondition_code(
-        Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
-        typename Kernel::Construct_vertex_2 construct_vertex =
-          kernel.construct_vertex_2_object();
-        const Point_2 & source1 = construct_vertex(cv1, 0);
-        const Point_2 & target1 = construct_vertex(cv1, 1);
-        const Point_2 & left1 =
-          (kernel.less_xy_2_object()(source1, target1)) ? source1 : target1;
-        const Point_2 & source2 = construct_vertex(cv2, 0);
-        const Point_2 & target2 = construct_vertex(cv2, 1);
-        const Point_2 & left2 =
-          (kernel.less_xy_2_object()(source2, target2)) ? source2 : target2;
-        );
-      
-      CGAL_precondition(compare_xy(left1, p) == SMALLER &&
-                        compare_xy(left2, p) == SMALLER);
-    
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-      // Notice that we swap the order of the curves in order to obtain the
-      // correct result to the left of p.
-      return kernel.compare_slope_2_object()(cv2, cv1);
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
-  {
-    return Compare_y_at_x_left_2();
-  }
-  
-  /*! \class
-   * A functor for comparing two segments to the right of a point. 
-   */
-  class Compare_y_at_x_right_2 {
-  public:
-    
-    /*! 
-     * Compare the y value of two segments immediately to the right of their
-     * intersection point.
-     * \param cv1 The first segment.
-     * \param cv2 The second segment.
-     * \param p The intersection point.
-     * \pre The point p lies on both segments, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-
-    Comparison_result operator()(const X_monotone_curve_2 & cv1,
-                                 const X_monotone_curve_2 & cv2,
-                                 const Point_2 & p) const
-    {
-      Kernel kernel;
-
-      // The two segments must be defined at q and also to its right.
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&&
-         Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division()));
-
-      CGAL_precondition_code(
-        Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
-        typename Kernel::Construct_vertex_2 construct_vertex =
-          kernel.construct_vertex_2_object();
-        const Point_2 & source1 = construct_vertex(cv1, 0);
-        const Point_2 & target1 = construct_vertex(cv1, 1);
-        const Point_2 & right1 =
-          (kernel.less_xy_2_object()(source1, target1)) ? target1 : source1;
-        const Point_2 & source2 = construct_vertex(cv2, 0);
-        const Point_2 & target2 = construct_vertex(cv2, 1);
-        const Point_2 & right2 =
-          (kernel.less_xy_2_object()(source2, target2)) ? target2 : source2;
-        );
-
-      CGAL_precondition(compare_xy(right1, p) == LARGER &&
-                        compare_xy(right2, p) == LARGER);
-
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-       return kernel.compare_slope_2_object()(cv1, cv2);
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
-  {
-    return Compare_y_at_x_right_2();
-  }
-  //@}
-
-  /// \name Functor definitions for the landmarks point-location strategy.
-  //@{
-  typedef double                          Approximate_number_type;
-
-  class Approximate_2
-  {
-  public:
-
-    /*!
-     * Return an approximation of a point coordinate.
-     * \param p The exact point.
-     * \param i The coordinate index (either 0 or 1).
-     * \pre i is either 0 or 1.
-     * \return An approximation of p's x-coordinate (if i == 0), or an 
-     *         approximation of p's y-coordinate (if i == 1).
-     */
-    Approximate_number_type operator() (const Point_2& p,
-                                        int i) const
-    {
-      CGAL_precondition (i == 0 || i == 1);
-
-      if (i == 0)
-	return (CGAL::to_double(p.x()));
-      else
-	return (CGAL::to_double(p.y()));
-    }
-  };
-
-  /*! Get an Approximate_2 functor object. */
-  Approximate_2 approximate_2_object () const
-  {
-    return Approximate_2();
-  }
-
-  typedef typename Kernel::Construct_segment_2    Construct_x_monotone_curve_2;
-
-  /*! Get a Construct_x_monotone_curve_2 functor object. */
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
-  {
-    return (this->construct_segment_2_object());
-  }
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_traits_2.h
deleted file mode 100644
index 4a9302c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_non_caching_segment_traits_2.h
+++ /dev/null
@@ -1,430 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Efi Fogel    <efif at post.tau.ac.il>
-//                 Ron Wein     <wein at post.tau.ac.il>
-//                 (base on old version by: Iddo Hanniel)
-
-#ifndef CGAL_ARR_NON_CACHING_SEGMENT_TRAITS_H
-#define CGAL_ARR_NON_CACHING_SEGMENT_TRAITS_H
-
-/*! \file The non-caching segment traits-class for the arrangement package.
- * This traits class handles general segments. It is a model of the
- * ArrangementTraits_2 concept, a refinement of the ArrangementBasicTraits_2
- * concept. The class is templated by a kernel and inherits from the
- * Arr_non_caching_segment_basic_traits_2 class instanciated with the kernel -
- * a model of the ArrangementBasicTraits_2 concept. It defined a few additional
- * functors required by the concept it models.
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_non_caching_segment_basic_traits_2.h>
-#include <CGAL/intersections.h>
-
-namespace CGAL {
-
-/*! \class 
- * A model of the ArrangementTraits_2 concept that handles general 
- * line segments.
- */
-template <class T_Kernel>
-class Arr_non_caching_segment_traits_2 :
-  public Arr_non_caching_segment_basic_traits_2<T_Kernel>
-{
-public:
-  typedef T_Kernel                                         Kernel;
-  
-  typedef Arr_non_caching_segment_basic_traits_2<Kernel>   Base;
-  typedef typename Base::Segment_assertions                Segment_assertions;
-  typedef typename Base::Has_exact_division                Has_exact_division;
-
-  /*! Default constructor */
-  Arr_non_caching_segment_traits_2() : Base() {}
-
-  /// \name Types and functors inherited from the base
-  //@{
-
-  // Traits types:
-  typedef typename Base::Has_left_category           Has_left_category;
-  typedef typename Base::Has_do_intersect_category   Has_do_intersect_category;
-
-  typedef typename Base::Left_side_category      Left_side_category;
-  typedef typename Base::Bottom_side_category    Bottom_side_category;
-  typedef typename Base::Top_side_category       Top_side_category;
-  typedef typename Base::Right_side_category     Right_side_category;
-
-  typedef typename Base::Point_2                     Point_2;
-  typedef typename Base::X_monotone_curve_2          X_monotone_curve_2;
-  typedef typename Base::Multiplicity                Multiplicity;
-
-  /*! Compare the x-coordinates of two points */
-  typedef typename Base::Compare_x_2            Compare_x_2;
-
-  /*! Compare two points lexigoraphically; by x, then by y */
-  typedef typename Base::Compare_xy_2           Compare_xy_2;
-
-  /*! Obtain the left endpoint of a given segment */
-  typedef typename Base::Construct_min_vertex_2 Construct_min_vertex_2;
-
-  /*! Obtain the right endpoint of a given segment */
-  typedef typename Base::Construct_max_vertex_2 Construct_max_vertex_2;
-  
-  /*! Check whether a given segment is vertical */
-  typedef typename Base::Is_vertical_2          Is_vertical_2;
-  
-  /*! Return the location of a given point with respect to an input segment */
-  typedef typename Base::Compare_y_at_x_2       Compare_y_at_x_2;
-  
-  /*! Check if two segments or if two points are identical */
-  typedef typename Base::Equal_2                Equal_2;
-
-  /*! Compare the y value of two segments immediately to the left of their
-   * intersection point
-   */
-  typedef typename Base::Compare_y_at_x_left_2  Compare_y_at_x_left_2;
-
-  /*! Compare the y value of two segments immediately to the right of their
-   * intersection point
-   */
-  typedef typename Base::Compare_y_at_x_right_2 Compare_y_at_x_right_2;
-  
-  //@}
-
-  /// \name Types and functors introduced here (based on the kernel)
-  //@{
-
-  // Categories:
-  typedef Tag_true                              Has_merge_category;
-  
-  // Traits types:
-  typedef X_monotone_curve_2                    Curve_2;
-
-  /*! \class
-   * A functor for splitting curves into x-monotone pieces.
-   */
-  class Make_x_monotone_2
-  {
-  public:
-   
-    /*! 
-     * Cut the given segment into x-monotone subcurves and insert them into
-     * the given output iterator. As segments are always x_monotone, only one
-     * x-monotone curve is inserted into the output iterator.
-     * \param cv The segment.
-     * \param oi The output iterator, whose value-type is Object. The output
-     *           object is a wrapper of an X_monotone_curve_2 object.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator()(const Curve_2 & cv, OutputIterator oi) const
-    {
-      *oi = make_object (cv);
-      ++oi;
-      return (oi);
-    }
-  };
-
-  /*! Get a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object() const
-  {
-    return Make_x_monotone_2();
-  }
-
-  /*! \class
-   * A functor for splitting a segment into two segements.
-   */
-  class Split_2
-  {
-    typedef Arr_non_caching_segment_traits_2<T_Kernel>    Self;
-  public:
-    
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator()(const X_monotone_curve_2 & cv, const Point_2 & p,
-                    X_monotone_curve_2 & c1, X_monotone_curve_2 & c2) const
-    {
-      Base base;
-
-      // Make sure that p lies on the interior of the curve.
-      CGAL_precondition_code (
-        Compare_xy_2 compare_xy = base.compare_xy_2_object();
-      );
-
-      Construct_min_vertex_2 min_vertex = base.construct_min_vertex_2_object();
-      Construct_max_vertex_2 max_vertex = base.construct_max_vertex_2_object();
-
-      const Point_2 & left = min_vertex(cv);
-      const Point_2 & right = max_vertex(cv);
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on(p, cv, Has_exact_division())&&
-         compare_xy(left, p) == SMALLER &&
-         compare_xy(right, p) == LARGER);
-
-      typename Base::Construct_segment_2 construct_segment =
-        base.construct_segment_2_object();
-
-      Self self;
-      if(self.compare_endpoints_xy_2_object()(cv) == SMALLER)
-      {
-        c1 = construct_segment(left, p);
-        c2 = construct_segment(p, right);
-      }
-      else
-      {
-        c1 = construct_segment(p, left);
-        c2 = construct_segment(right, p);
-      }
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object() const
-  {
-    return Split_2();
-  }
-
-  /*! \class
-   * A functor for computing intersections. 
-   */
-  class Intersect_2
-  {
-    typedef Arr_non_caching_segment_traits_2<T_Kernel>    Self;
-  public:
-    /*! Find the intersections of the two given segments and insert them into
-     * the given output iterator. As two segments may itersect only once, only
-     * a single intersection will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator()(const X_monotone_curve_2 & cv1,
-                              const X_monotone_curve_2 & cv2,
-                              OutputIterator oi) const
-    {
-      Base   base;
-      Object res = base.intersect_2_object()(cv1, cv2);
-    
-      // There is no intersection:
-      if (res.is_empty())
-        return (oi);
-
-      // Chack if the intersection is a point:
-      const Point_2             *ip;
-
-      if ((ip = object_cast<Point_2> (&res)) != NULL)
-      {
-        // Create a pair representing the point with its multiplicity,
-        // which is always 1 for line segments for all practical purposes.
-        // If the two segments intersect at their endpoints, then the
-        // multiplicity is undefined, but we deliberately ignore it for
-        // efficieny reasons.
-        std::pair<Point_2,Multiplicity> ip_mult(*ip, 1);
-        *oi = make_object (ip_mult);
-        ++oi;
-      }
-      else
-      {
-        // The intersection is a segment.
-
-        const X_monotone_curve_2 *ov = object_cast<X_monotone_curve_2>(&res);  
-        CGAL_assertion (ov != NULL);
-
-        Self self;
-        Comparison_result cmp1 = self.compare_endpoints_xy_2_object()(cv1);
-        Comparison_result cmp2 = self.compare_endpoints_xy_2_object()(cv2);
-        
-        if(cmp1 == cmp2)
-        {
-          // cv1 and cv2 have the same directions, maintain this direction
-          // in the overlap segment
-          if(self.compare_endpoints_xy_2_object()(*ov) != cmp1)
-          {
-            Kernel k;
-            res = make_object(k.construct_opposite_segment_2_object()(*ov));
-          }
-        }
-
-        *oi = res;
-        ++oi;
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object() const
-  {
-    return Intersect_2();
-  }
-
-  /*! \class
-   * A functor for testing whether two segments are mergeable.
-   */
-  class Are_mergeable_2 {
-  protected:
-    typedef Arr_non_caching_segment_traits_2<Kernel>    Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_non_caching_segment_traits_2<Kernel>;
-
-  public:
-   
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable, that is, if they are
-     *         supported by the same line; (false) otherwise.
-     * \pre cv1 and cv2 share a common endpoint.
-     */
-    bool operator()(const X_monotone_curve_2 & cv1,
-                    const X_monotone_curve_2 & cv2) const
-    {
-      const Base* base = m_traits;
-      Equal_2 equal = base->equal_2_object();
-      Construct_min_vertex_2 min_vertex = base->construct_min_vertex_2_object();
-      Construct_max_vertex_2 max_vertex = base->construct_max_vertex_2_object();
-      if (!equal(max_vertex(cv1), min_vertex(cv2)) &&
-          !equal(max_vertex(cv2), min_vertex(cv1)))
-        return false;
-      
-      // Check if the two curves have the same supporting line.
-      return (base->compare_slope_2_object()(cv1, cv2) == EQUAL);
-    }
-  };
-
-  /*! Obtain an Are_mergeable_2 functor object */
-  Are_mergeable_2 are_mergeable_2_object() const
-  { return Are_mergeable_2(this); }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2 {
-  protected:
-    typedef Arr_non_caching_segment_traits_2<Kernel>    Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_non_caching_segment_traits_2<Kernel>;
-
-  public:
-    /*!
-     * Merge two given segments into a single segment.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator()(const X_monotone_curve_2 & cv1,
-                    const X_monotone_curve_2 & cv2,
-                    X_monotone_curve_2 & c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-
-      const Base* base = m_traits;
-      Equal_2 equal = base->equal_2_object();
-      Construct_min_vertex_2 min_vertex = base->construct_min_vertex_2_object();
-      Construct_max_vertex_2 max_vertex = base->construct_max_vertex_2_object();
-
-      // Check which curve extends to the right of the other.
-      const Point_2& left1 = min_vertex(cv1);
-      const Point_2& right1 = max_vertex(cv1);
-      const Point_2& left2 = min_vertex(cv2);
-      const Point_2& right2 = max_vertex(cv2);
-
-      if (equal(right1, left2)) {
-        // cv2 extends cv1 to the right.
-        c = base->construct_segment_2_object()(left1, right2);
-        return;
-      }
-      // cv1 extends cv2 to the right.
-      CGAL_precondition(equal(right2, left1));
-
-      c = base->construct_segment_2_object()(left2, right1);
-    }
-  };
-
-  /*! Obtain a Merge_2 functor object */
-  Merge_2 merge_2_object() const { return Merge_2(this); }
-  //@}
-
-  //! \name Functor definitions for the Boolean set-operations.
-  //@{
-  typedef typename Kernel::Construct_opposite_segment_2  Construct_opposite_2; 
-
-  /*! Obtain a Construct_opposite_2 functor object */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  }
-
-  class Compare_endpoints_xy_2 
-  {
-  public:
-    /*!
-     * Compare the two endpoints of a given curve lexigoraphically.
-     * \param cv The curve.
-     * \return SMALLER if cv is directed from left to right and LARGER
-     * otherwise.
-     */
-    Comparison_result operator()(const X_monotone_curve_2& cv) const
-    {
-      typedef typename Kernel::Construct_vertex_2     Construct_vertex_2;
-
-      Kernel k;
-      Base b;
-      Construct_vertex_2 ctr_v = k.construct_vertex_2_object();
-      Compare_xy_2 cmp_xy = b.compare_xy_2_object();
-      return(cmp_xy(ctr_v(cv,0), ctr_v(cv,1)));
-    }
-  };
-
-  /*! Obtain a Compare_endpoints_xy_2 functor object */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
deleted file mode 100644
index 1bd7d70..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
+++ /dev/null
@@ -1,444 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-//                 (based on old version by Eyal Flato)
-//                 Efi Fogel  <efif at post.tau.ac.il>
-
-#ifndef CGAL_ARR_SIMPLE_POINT_LOCATION_FUNCTIONS_H
-#define CGAL_ARR_SIMPLE_POINT_LOCATION_FUNCTIONS_H
-
-/*! \file
- * Member-function definitions for the Arr_simple_point_location<Arrangement>
- * class.
- */
-
-namespace CGAL {
-
-//-----------------------------------------------------------------------------
-// Locate the arrangement feature containing the given point.
-//
-template <class Arrangement>
-typename Arr_simple_point_location<Arrangement>::Result_type
-Arr_simple_point_location<Arrangement>::locate(const Point_2& p) const
-{
-  // Go over the arrangement vertices and check whether one of them equals
-  // the query point.
-  typename Traits_adaptor_2::Equal_2 equal = m_geom_traits->equal_2_object();
-  typename Arrangement::Vertex_const_iterator  vit;
-  for (vit = m_arr->vertices_begin(); vit != m_arr->vertices_end(); ++vit) {
-    Vertex_const_handle vh = vit;
-    if (equal(p, vh->point()))
-      return make_result(vh);
-  }
-
-  // Go over arrangement halfedges and check whether one of them contains
-  // the query point in its interior.
-  typename Traits_adaptor_2::Is_in_x_range_2  is_in_x_range = 
-    m_geom_traits->is_in_x_range_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_2 cmp_y_at_x = 
-    m_geom_traits->compare_y_at_x_2_object();
-
-  typename Arrangement::Edge_const_iterator   eit;
-  for (eit = m_arr->edges_begin(); eit != m_arr->edges_end(); ++eit) {
-    Halfedge_const_handle hh = eit;
-    if (is_in_x_range(hh->curve(), p) && (cmp_y_at_x(p, hh->curve()) == EQUAL))
-      return make_result(hh);
-  }
-
-  // Shoot a vertical ray from the query point.
-  // The ray shooting returns either a vertex of a halfedge (or an empty
-  // object).
-  Optional_result_type optional_obj = _base_vertical_ray_shoot(p, true);
-  if (optional_empty(optional_obj)) {
-    // We should return the unbounded face.
-    Face_const_handle fh = Face_const_handle(m_topol_traits->initial_face());
-    return make_result(fh);
-  }
-
-  const Result_type& obj = optional_assign(optional_obj);
-  
-  // In case the ray-shooting returned a vertex, we have to locate the first
-  // halfedge whose source vertex is v, rotating clockwise around the vertex
-  // from "6 o'clock", and to return its incident face.   
-  const Vertex_const_handle* vh = Result().template assign<Vertex_const_handle>(obj);
-  if (vh) {
-    Halfedge_const_handle hh = _first_around_vertex(*vh);
-    Face_const_handle fh = hh->face();
-    return make_result(fh);
-  }
-
-  const Halfedge_const_handle* hh = Result().template assign<Halfedge_const_handle>(obj);
-  if (hh) {
-    // Make sure that the edge is directed from right to left, so that p
-    // (which lies below it) is contained in its incident face. If necessary,
-    // we take the twin halfedge.
-    Face_const_handle fh = ((*hh)->direction() == ARR_LEFT_TO_RIGHT) ?
-      (*hh)->twin()->face() : (*hh)->face();    // Return the incident face.
-    return make_result(fh);
-  }
-
-  CGAL_error();
-  return default_result();
-}
-
-//-----------------------------------------------------------------------------
-// Locate the arrangement feature which a vertical ray emanating from the
-// given point hits (not inculding isolated vertices).
-//
-template <class Arrangement>
-typename Arr_simple_point_location<Arrangement>::Optional_result_type
-Arr_simple_point_location<Arrangement>::
-_base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
-{
-  // Set the results for comparison according to the ray direction.
-  const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
-  const Comparison_result curve_above_under = (shoot_up ? LARGER : SMALLER);
-
-  // Go over all halfedges in the arrangement.
-  typename Traits_adaptor_2::Is_vertical_2 is_vertical =
-    m_geom_traits->is_vertical_2_object();
-  typename Traits_adaptor_2::Compare_y_position_2 compare_y_position =
-    m_geom_traits->compare_y_position_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right =
-    m_geom_traits->compare_y_at_x_right_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_left_2 compare_y_at_x_left =
-    m_geom_traits->compare_y_at_x_left_2_object();
-
-  typename Dcel::Edge_const_iterator  eit = 
-    m_topol_traits->dcel().edges_begin();
-  typename Dcel::Edge_const_iterator  e_end =
-    m_topol_traits->dcel().edges_end();
-  const typename Dcel::Halfedge*  he;   // The current edge.
-  const typename Dcel::Vertex*    vs;   // The current edge source
-  const typename Dcel::Vertex*    vt;   // The current edge target.
-  Comparison_result               res_s;
-  Comparison_result               res;
-  Comparison_result               y_res;
-  bool                            in_x_range;
-  const typename Dcel::Halfedge*  closest_he = NULL; // The closest so far.
-  const typename Dcel::Vertex*    cl_vs = NULL;      // Its source.
-  const typename Dcel::Vertex*    cl_vt = NULL;      // Its target.
-
-  while (eit != e_end) {
-    // Get the current edge and its source and target vertices.
-    he = &(*eit);
-    vs = he->opposite()->vertex();
-    vt = he->vertex();
-
-    // Determine whether p is in the x-range of the curve and above or below it
-    // (according to the direction of the shoot).
-    res_s = m_topol_traits->compare_x(p, vs);
-
-    in_x_range = (res_s == EQUAL) ? true :
-      ((((res_s == SMALLER) && (he->direction() == ARR_LEFT_TO_RIGHT)) ||
-        ((res_s == LARGER) && (he->direction() == ARR_RIGHT_TO_LEFT))) ? false :
-       (res_s != m_topol_traits->compare_x(p, vt)));
-
-    if (in_x_range)
-      res = m_topol_traits->compare_y_at_x(p, he);
-
-    if (in_x_range && (res == point_above_under)) {
-      if (closest_he == NULL) {
-        // If no other x-monotone curve containing p in its x-range has been
-        // found yet, take the current one as the vertically closest to p.
-        closest_he = he;
-        cl_vs = vs;
-        cl_vt = vt;
-      }
-      else {
-        // Compare with the vertically closest curve so far and detemine the
-        // curve closest to p. We first check the case that the two curves
-        // have a common endpoint (note that the two curves do not intersect
-        // in their interiors). Observe that if such a common vertex exists,
-        // it is certainly not a vertex at infinity, therefore it is
-        // associated with a valid point.
-        if (((cl_vs == vs) && (closest_he->direction() == eit->direction())) ||
-            ((cl_vs == vt) && (closest_he->direction() != eit->direction())))
-        {
-          CGAL_assertion(! cl_vs->has_null_point());
-
-          y_res = (closest_he->direction() == ARR_LEFT_TO_RIGHT) ?
-            // Both curves extend to the right from a common point.
-            compare_y_at_x_right(closest_he->curve(), eit->curve(), 
-                                 cl_vs->point()) :
-            // Both curves extend to the left from a common point.
-            compare_y_at_x_left(closest_he->curve(), eit->curve(),
-                                cl_vs->point());
-          
-        }
-        else if ((cl_vt == vs && closest_he->direction() != eit->direction()) ||
-                 (cl_vt == vt && closest_he->direction() == eit->direction()))
-        {
-          CGAL_assertion(! cl_vt->has_null_point());
-
-          y_res = (closest_he->direction() == ARR_LEFT_TO_RIGHT) ?
-            // Both curves extend to the left from a common point.
-            compare_y_at_x_left(closest_he->curve(), eit->curve(), 
-                                cl_vt->point()) :
-            // Both curves extend to the right from a common point.
-            compare_y_at_x_right(closest_he->curve(), eit->curve(), 
-                                 cl_vt->point());
-        }
-        else {
-          // In case the two curves do not have a common endpoint, but overlap
-          // in their x-range (both contain p), just compare their positions.
-          // Note that in this case one of the edges may be fictitious, so we
-          // preform the comparsion symbolically in this case.
-          y_res = (closest_he->has_null_curve()) ? curve_above_under :
-            ((eit->has_null_curve()) ? point_above_under :
-             compare_y_position(closest_he->curve(), eit->curve()));
-        }
- 
-        // If the current edge is closer to the query point than the closest
-        // edge so far, update the closest edge.
-        if (y_res == curve_above_under) {
-          closest_he = he;
-          cl_vs = vs;
-          cl_vt = vt;
-        }
-      }
-    }
-
-    if ((in_x_range && res == EQUAL) &&
-        ! eit->has_null_curve() && is_vertical(eit->curve()))
-    {
-      // Check if the query point is one of the end-vertices of the vertical
-      // edge.
-      Comparison_result  res1 = m_topol_traits->compare_xy(p, vs);
-      Comparison_result  res2 = m_topol_traits->compare_xy(p, vt);
-
-      if (! (((res1 == EQUAL) && (res2 == curve_above_under)) ||
-             ((res1 == curve_above_under) && (res2 == EQUAL))))
-      {
-        // The vertical ray overlaps an existing vertical edge containing p.
-        // In this case simply return this edge.
-        closest_he = he;
-        return make_result(Halfedge_const_handle(closest_he));
-      }
-    }
-
-    // Move to the next edge.
-    ++eit;
-  }
-
-  // If we did not locate a closest halfedge, return an empty object.
-  if (closest_he == NULL)
-    return make_optional_result();
-
-  // If we found a fictitious edge, return it now.
-  if (closest_he->has_null_curve())
-    return make_result(Halfedge_const_handle(closest_he));
-
-  // If one of the closest edge's end vertices has the same x-coordinate
-  // as the query point, return this vertex.
-  if (! is_vertical(closest_he->curve())) {
-    if (! cl_vs->has_null_point() &&
-        m_geom_traits->compare_x_2_object()(cl_vs->point(), p) == EQUAL)
-      return make_result(Vertex_const_handle(cl_vs));
-    else if (! cl_vt->has_null_point() &&
-             m_geom_traits->compare_x_2_object()(cl_vt->point(), p) == EQUAL)
-      return make_result(Vertex_const_handle(cl_vt));
-  }
-  else {
-    CGAL_assertion_code(
-      Comparison_result  res1 = m_topol_traits->compare_xy(p, cl_vs);
-      Comparison_result  res2 = m_topol_traits->compare_xy(p, cl_vt));
-
-    CGAL_assertion(res1 == res2);
-    CGAL_assertion(res1 == point_above_under);
-
-    return ((shoot_up && closest_he->direction() == ARR_LEFT_TO_RIGHT) ||
-            (! shoot_up && closest_he->direction() == ARR_RIGHT_TO_LEFT)) ?
-      make_result(Vertex_const_handle(cl_vs)) :
-      make_result(Vertex_const_handle(cl_vt));
-  }
-
-  // Otherwise, return the closest edge.
-  return make_result(Halfedge_const_handle(closest_he));
-}
-
-//-----------------------------------------------------------------------------
-// Locate the arrangement feature which a vertical ray emanating from the
-// given point hits, considering isolated vertices.
-//
-template <typename Arrangement>
-typename Arr_simple_point_location<Arrangement>::Result_type
-Arr_simple_point_location<Arrangement>::_vertical_ray_shoot(const Point_2& p,
-                                                            bool shoot_up) const
-{
-  // Locate the arrangement feature which a vertical ray emanating from the
-  // given point hits, when not considering the isolated vertices.
-  // This feature may not exist, or be either a vertex of a halfedge.
-  Optional_result_type optional_obj = _base_vertical_ray_shoot(p, shoot_up);
-  bool                   found_vertex = false;
-  bool                   found_halfedge = false;
-  Vertex_const_handle    closest_v;
-  Halfedge_const_handle  closest_he;
-
-  if (! optional_empty(optional_obj)) {
-    const Result_type& obj = optional_assign(optional_obj);
-    const Vertex_const_handle* p_vh = Result().template assign<Vertex_const_handle>(obj);
-    if (p_vh) {
-      found_vertex = true;
-      closest_v = *p_vh;
-    }
-    else {
-      const Halfedge_const_handle* p_hh =
-        Result().template assign<Halfedge_const_handle>(obj);
-      CGAL_assertion(p_hh != NULL);
-      found_halfedge = true;
-      closest_he = *p_hh;
-    }
-  }
-  
-  // Set the result for comparison according to the ray direction.
-  const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
-
-  // Go over all isolated vertices in the arrangement.
-  typename Traits_adaptor_2::Compare_x_2 compare_x =
-    m_geom_traits->compare_x_2_object();
-  typename Traits_adaptor_2::Compare_xy_2 compare_xy =
-    m_geom_traits->compare_xy_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_2 compare_y_at_x =
-    m_geom_traits->compare_y_at_x_2_object();
-
-  Vertex_const_handle                          vh;
-  typename Arrangement::Vertex_const_iterator  vit;
-  for (vit = m_arr->vertices_begin(); vit != m_arr->vertices_end(); ++vit) {
-    vh = vit;
-    if (! vh->is_isolated())
-      continue;
-
-    // The current isolated vertex should have the same x-coordinate as the
-    // query point in order to be below or above it.
-    if (compare_x(p, vh->point()) != EQUAL)
-      continue;
-
-    // Make sure the isolated vertex is above the query point (if we shoot up)
-    // or below it (if we shoot down).
-    if (compare_xy(p, vh->point()) != point_above_under)
-      continue;
-
-    // Check if the isolated vertex is closer to p than the current closest
-    // object.
-    if ((found_vertex &&
-         (closest_v->is_at_open_boundary() ||
-          compare_xy(vh->point(), closest_v->point()) == point_above_under)) ||
-        (! found_vertex &&
-         (! found_halfedge ||
-          closest_he->is_fictitious() ||
-          compare_y_at_x(vh->point(), closest_he->curve()) ==
-          point_above_under)))
-    {
-      found_vertex = true;
-      closest_v = vh;
-    }
-  }
-
-  // If we found a vertex, return it.
-  if (found_vertex)
-    return make_result(closest_v);
-
-  if (found_halfedge) {
-    // If we found a valid edge, return it.
-    if (! closest_he->is_fictitious())
-      return make_result(closest_he);
-  
-    // If we found a fictitious edge, we have to return a handle to its
-    // incident unbounded face.
-    if ((shoot_up && closest_he->direction() == ARR_LEFT_TO_RIGHT) ||
-        (!shoot_up && closest_he->direction() == ARR_RIGHT_TO_LEFT))
-      closest_he = closest_he->twin();
-    Face_const_handle fh = closest_he->face();
-    return make_result(fh);
-  }
-
-  // If we have no halfedge above, return the initial face.
-  Face_const_handle  uf = Face_const_handle(m_topol_traits->initial_face());
-  return make_result(uf);
-}
-
-//-----------------------------------------------------------------------------
-// Find the first halfedge with a given source vertex, when going clockwise
-// from "6 o'clock" around this vertex.
-//
-template <class Arrangement>
-typename Arr_simple_point_location<Arrangement>::Halfedge_const_handle
-Arr_simple_point_location<Arrangement>::
-_first_around_vertex(Vertex_const_handle v) const
-{
-  // Travrse the incident halfedges of the current vertex and locate the
-  // lowest one to its left and the topmost to its right.
-  typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right =
-    m_geom_traits->compare_y_at_x_right_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_left_2  compare_y_at_x_left =
-    m_geom_traits->compare_y_at_x_left_2_object();
-
-  const Halfedge_const_handle   invalid_handle;
-  Halfedge_const_handle         lowest_left;
-  Halfedge_const_handle         top_right;
-
-  bool found_lowest_left = false;
-  bool found_top_right = false;
-  
-  typename Arrangement::Halfedge_around_vertex_const_circulator  first = 
-    v->incident_halfedges();
-  typename Arrangement::Halfedge_around_vertex_const_circulator  curr = first;
-
-  do {
-    // Check whether the current halfedge is defined to the left or to the
-    // right of the given vertex.
-    if (curr->direction() == ARR_LEFT_TO_RIGHT) {
-      // The curve associated with the current halfedge is defined to the left
-      // of v.
-      if (! found_lowest_left ||
-          (! curr->is_fictitious() &&
-           compare_y_at_x_left(curr->curve(), lowest_left->curve(), 
-                               v->point()) == SMALLER))
-      {
-        lowest_left = curr;
-        found_lowest_left = true;
-      }
-    }
-    else {
-      // The curve associated with the current halfedge is defined to the right
-      // of v.
-      if (! found_top_right ||
-          (! curr->is_fictitious() &&
-           compare_y_at_x_right(curr->curve(), top_right->curve(), 
-                                v->point()) == LARGER))
-      {
-        top_right = curr;
-        found_top_right = true;
-      }
-    }
-
-    ++curr;
-  } while (curr != first);
-
-  // The first halfedge we encounter is the lowest to the left, but if there
-  // is no edge to the left, we first encounter the topmost halfedge to the 
-  // right. Note that as the halfedge we located has v as its target, we now
-  // have to return its twin.
-  return (found_lowest_left) ? lowest_left->twin() : top_right->twin();
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
deleted file mode 100644
index 19cd793..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
+++ /dev/null
@@ -1,2320 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Oren Nechushtan <theoren at math.tau.ac.il>
-//                 Iddo Hanniel <hanniel at math.tau.ac.il>
-
-#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H
-#define CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H
-
-//#define CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION 
-
-#include <CGAL/Arr_tags.h>
-#include <CGAL/basic.h>
-#include <CGAL/Arr_point_location/Td_predicates.h>
-#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h>
-
-#include <boost/optional.hpp>
-#include <boost/variant.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include <cmath>
-#include <ctime>
-#include <list>
-#include <vector>
-#include <map>
-
-namespace CGAL {
-
-/*! \class Trapezoidal_decomposition_2
- * parameters    Traits
- * Description   Implementation for a planar trapezoidal map also known as
- *   trapezoidal decomposition and vertical decomposition.
- *
- * For requirements on Traits and X_curve classes see 
- *   Trapezoidal_decomposition_2 documentation.
- */
-template < class Td_traits>
-class Trapezoidal_decomposition_2
-{
-public:
-  enum Locate_type {
-    POINT=0,
-    CURVE,
-    TRAPEZOID,
-    UNBOUNDED_TRAPEZOID=8
-  };
-
-  //forward declarations & friend classes declarations
-  class Base_map_item_iterator;
-  class In_face_iterator;
-  friend class In_face_iterator;
-  
-  //type of trapezoidal decomposition traits
-  typedef Td_traits Traits;
-
-  //type of the class itself
-  typedef Trapezoidal_decomposition_2<Traits> Self;
-
-  //typedef of arrangement on surface
-  typedef typename Traits::Arrangement_on_surface_2 Arrangement_on_surface_2;
-
-  //type of traits adaptor
-  typedef typename Traits::Arrangement_on_surface_2::Traits_adaptor_2		
-    Traits_adaptor_2;
-  
-  //type of point
-  typedef typename Traits::Point Point;
-  
-  //!type of Halfedge_handle
-  typedef typename Traits::Halfedge_handle
-    Halfedge_handle;
- 
-  //!type of Halfedge_const_handle
-  typedef typename Traits::Halfedge_const_handle
-    Halfedge_const_handle;
-  
-  //!type of Vertex_const_handle
-  typedef typename Traits::Vertex_const_handle
-    Vertex_const_handle;
-  
-  //type of X_monotone_curve
-  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
-
-  //type of Curve end: X_monotone_curve_2 ref & Arr_curve_end
-  typedef typename Traits::Curve_end    Curve_end;
-
-  //type of td_map_item
-  typedef typename Traits::Td_map_item Td_map_item;
-
-  //type of Td_nothing
-  typedef typename Traits::Td_nothing Td_nothing;
-
-  //type of Td_active_trapezoid
-  typedef typename Traits::Td_active_trapezoid Td_active_trapezoid;
-  
-  //type of Td_inactive_trapezoid
-  typedef typename Traits::Td_inactive_trapezoid Td_inactive_trapezoid;
-
-  //type of Td_active_edge
-  typedef typename Traits::Td_active_edge Td_active_edge;
-
-  //type of Td_inactive_edge
-  typedef typename Traits::Td_inactive_edge Td_inactive_edge;
-
-  //type of Td_active_vertex
-  typedef typename Traits::Td_active_vertex Td_active_vertex;
-
-  //type of Td_active_fictitious_vertex
-  typedef typename Traits::Td_active_fictitious_vertex 
-    Td_active_fictitious_vertex;
-
-  //type of Td_inactive_vertex
-  typedef typename Traits::Td_inactive_vertex Td_inactive_vertex;
-
-  //type of Td_inactive_fictitious_vertex
-  typedef typename Traits::Td_inactive_fictitious_vertex 
-    Td_inactive_fictitious_vertex;
-
-  //type of Curve end pair
-  typedef typename Traits::Curve_end_pair Curve_end_pair;
-
-  //type of Halfedge_const_handle-s' vector
-  typedef std::vector<Halfedge_const_handle> Halfedge_container;
-
-  //predicates
-  //typedef CGAL::Td_active_map_item<Td_map_item> Td_active_map_item;
-  typedef CGAL::Td_active_edge_item<Td_map_item, Traits> Td_active_edge_item;
-
-  //type of search structure DAG node
-  typedef Td_dag_node< Traits > Dag_node;
-
-  //type of map of DAG nodes
-  typedef std::map< int,Dag_node > Nodes_map;
-
-  //type of trapezoids comparison function - for the map
-  typedef Td_map_item_handle_less<const Td_map_item* const> 
-    Td_map_item_ptr_less;
-  
-  //type of trapezoids ptr map
-  typedef std::map<const Td_map_item*, Td_map_item*, Td_map_item_ptr_less> 
-    Td_map_item_ptr_map;
-
-public:
-  
-  /*! \class Base_map_item_iterator
-   * member of Trapezoidal_decomposition_2<Traits>
-   * Description Implements a basic Trapezoid iterator
-   */
-  class Base_map_item_iterator
-  {
-  public:
-    //constructors
-    Base_map_item_iterator() : traits(0), m_cur_item(Td_map_item(0)){ }
-
-    Base_map_item_iterator(const Traits* traits_,
-                           boost::optional<Td_map_item&> curr = boost::none)
-      :traits(traits_), m_cur_item((curr) ? *curr : Td_map_item(0) ) { }
-
-    Base_map_item_iterator(const Base_map_item_iterator &it)
-          :traits(it.traits), m_cur_item(it.m_cur_item) { }
-
-    //operator overloading
-    Base_map_item_iterator  & operator=(const Base_map_item_iterator &it)
-    {
-      traits = it.traits;
-      m_cur_item = it.m_cur_item;
-      return *this;
-    }
-
-    bool operator==(const Base_map_item_iterator &it) const
-    {
-      return (m_cur_item == it.m_cur_item);
-    }
-
-    bool operator!=(const Base_map_item_iterator &it) const
-    {
-      return !operator==(it);
-    }
-      
-    Td_map_item& operator*() //const
-    {
-      CGAL_precondition(!traits->is_empty_item(m_cur_item));
-      return m_cur_item;
-    }
-
-    bool operator!() const
-    {
-      return traits->is_empty_item(m_cur_item);//!m_cur_item;
-    }
-    
-  protected:
-    const Traits *traits; //pointer to the traits
-    Td_map_item m_cur_item; //the current map item (or none)
-  };
-
-/*! \class In_face_iterator
-   * member of Trapezoidal_decomposition_2<Traits>
-   * Derived from Base_map_item_iterator class
-   * Description Implements a Trapezoid iterator along a Halfedge
-   */
-  class In_face_iterator : public Base_map_item_iterator
-  {
-
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
-    using Base_map_item_iterator::m_cur_item;
-    using Base_map_item_iterator::traits;
-#endif
-
-  protected:
-    //reference to the seperating X_monotone_curve_2
-    const X_monotone_curve_2& m_sep;
-
-  public:
-    //constructors
-    In_face_iterator(const Traits* traits_, Halfedge_const_handle sep, 
-                     boost::optional<Td_map_item&> curr = boost::none) 
-            :Base_map_item_iterator(traits_,curr), m_sep(sep->curve()) 
-    { }
-
-    In_face_iterator(const Traits* traits_, const X_monotone_curve_2& sep, 
-                     boost::optional<Td_map_item&> curr = boost::none) 
-            :Base_map_item_iterator(traits_,curr), m_sep(sep) 
-    { }
-
-
-    In_face_iterator(const In_face_iterator &it) 
-            :Base_map_item_iterator((Base_map_item_iterator&)it),
-              m_sep(it.m_sep)                                   
-    { }
-
-    //operatoror overloading
-    bool operator==(const In_face_iterator &it) const
-    {
-      return ( Base_map_item_iterator::operator==(it) && 
-               traits->equal_2_object()(m_sep,it.m_sep));
-    }
-    
-    /*
-      destription:
-      advances m_cur_item to one of the right neighbours according to the relation
-      between the seperating Halfedge (m_sep) and the right() trapezoid point.
-      precoditions:
-      m_sep doesn't intersect any existing edges except possibly on common end
-      points.
-      postconditions:
-      if the rightmost trapezoid was traversed m_cur_item is set to NULL.
-      remark:
-      if the seperator is vertical, using the precondition assumptions it
-      follows that there is exactly one trapezoid to travel.
-    */
-    In_face_iterator& operator++()
-    {
-      if (traits->is_empty_item(m_cur_item)) 
-        return *this;// end reached, do nothing!
-      
-#ifndef CGAL_TD_DEBUG
-      CGAL_warning(traits != NULL);
-#else
-      CGAL_assertion(traits != NULL);
-      CGAL_assertion(traits->is_active(m_cur_item));
-      //m_cur_item should be a trapezoid or an edge
-      CGAL_assertion(!traits->is_td_vertex(m_cur_item));
-#endif
-      
-      if (traits->is_td_trapezoid(m_cur_item))
-      {
-        //if the map item is a trapezoid 
-        Td_active_trapezoid tr (boost::get<Td_active_trapezoid>(m_cur_item));
-
-#ifndef CGAL_TD_DEBUG
-        CGAL_warning_code(Dag_node* tt = tr.dag_node();)
-        CGAL_warning(!tt->is_inner_node());
-#else
-        CGAL_assertion_code(Dag_node* tt = tr.dag_node();)
-        CGAL_assertion(tt);
-        CGAL_assertion(!tt->is_inner_node());
-#endif
-          
-        // handle degeneracies
-        typename Traits::Compare_curve_end_xy_2 compare_xy = 
-          traits->compare_curve_end_xy_2_object();
-        if (compare_xy (traits->vtx_to_ce(tr.left()),
-                        Curve_end(m_sep,ARR_MAX_END)) != SMALLER)
-        {
-          //if the trapezoid's left end point is equal to or larger from the 
-          //  max end of sep, we reached the end of the iterator
-          m_cur_item = Td_map_item(0);
-        }
-        else
-        {
-          //if the trapezoid's left end point is smaller from the sep's max end
-
-          //comparing the y value of the trapezoid's right end point and sep 
-          //   (at the trapezoid's right x value), in order to select the
-          //    next trapezoid in the iterator
-          typename Traits::Compare_curve_end_y_at_x_2 compare_y_at_x = 
-            traits->compare_curve_end_y_at_x_2_object();
-          switch (compare_y_at_x (traits->vtx_to_ce(tr.right()), m_sep))
-          {
-           case SMALLER:
-              m_cur_item = tr.rt();
-            break;
-           case LARGER:
-              m_cur_item = tr.rb();
-            break;
-           case EQUAL:
-            // end reached
-             m_cur_item = Td_map_item(0);
-            break;
-           default:       
-             m_cur_item = Td_map_item(0);
-            break;
-          }
-        }
-      }
-      else 
-      {
-        //if the map item is an edge
-
-        Td_active_edge e (boost::get<Td_active_edge>(m_cur_item));
-        CGAL_assertion_code(Dag_node* tt = e.dag_node();)
-        CGAL_assertion(tt != NULL);
-        CGAL_assertion(tt->is_inner_node());
-
-        //go to next() of the current edge.
-        // as long as there is an edge fragment of the same 
-        //  edge - next() exists.
-        // If next() does not exist we reached the last fragment of the edge
-        m_cur_item = e.next();
-        if (!traits->is_empty_item(m_cur_item))
-        {
-          //if next() exists, find the next real edge fragment trapezoid
-          //    (skip points)
-          while(traits->is_td_vertex(m_cur_item))
-          {
-            Dag_node* node = 
-              boost::apply_visitor(dag_node_visitor(),m_cur_item);
-            m_cur_item = node->left_child().get_data();
-          }
-              
-          //make sure we stopped in an edge
-          CGAL_warning(traits->is_td_edge(m_cur_item));
-        }
-      }
-      return *this;
-    }
-    
-    In_face_iterator operator++(int)
-    {
-      In_face_iterator tmp = *this;
-      ++*this;
-      return tmp;
-    }
-
-    const X_monotone_curve_2& seperator()
-    {
-      return m_sep;
-    }
-
-    Td_active_trapezoid& trp()
-    {
-      CGAL_precondition (!traits->is_empty_item(m_cur_item));
-      CGAL_precondition (traits->is_active(m_cur_item) && 
-                         traits->is_td_trapezoid(m_cur_item));
-      return boost::get<Td_active_trapezoid>(m_cur_item);
-    }
-
-    Td_active_edge& e() 
-    {
-      CGAL_precondition (!traits->is_empty_item(m_cur_item));
-      CGAL_precondition (traits->is_active(m_cur_item) && 
-                         traits->is_td_edge(m_cur_item));
-      return boost::get<Td_active_edge>(m_cur_item);
-    }
-
-  };
-  
-  /*!  Visitors for accessing td map items methods */
-  class rb_visitor : public boost::static_visitor<Td_map_item>
-  {
-  public:
-    Td_map_item operator()(Td_active_trapezoid& t) const
-    {
-      return t.rb();
-    }
-    
-    template < typename T >
-    Td_map_item operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return Td_map_item(0);
-    }
-  };
-
-  class set_rb_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_rb_visitor (const Td_map_item& rb) : m_rb(rb) {}
-    
-    
-    void operator()(Td_active_trapezoid& t) const
-    {
-      t.set_rb(m_rb);
-    }
-    
-    template < typename T >
-    void operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-    }
-    
-  private:
-    const Td_map_item& m_rb;
-  };
-
-  class rt_visitor : public boost::static_visitor<Td_map_item>
-  {
-  public:
-    Td_map_item operator()(Td_active_trapezoid& t) const
-    {
-      return t.rt();
-    }
-    
-    template < typename T >
-    Td_map_item operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return Td_map_item(0);
-    }
-  };
-
-  class set_rt_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_rt_visitor (const Td_map_item& rt) : m_rt(rt) {}
-    
-    void operator()(Td_active_trapezoid& t) const
-    {
-      t.set_rt(m_rt);
-    }
-    
-    template < typename T >
-    void operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-
-  private:
-    const Td_map_item& m_rt;
-  };
-  
-  class lb_visitor : public boost::static_visitor<Td_map_item>
-  {
-  public:
-    Td_map_item operator()(Td_active_trapezoid& t) const
-    {
-      return t.lb();
-    }
-
-    template < typename T >
-    Td_map_item operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return Td_map_item(0);
-    }
-  };
-
-  class set_lb_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_lb_visitor (const Td_map_item& lb) : m_lb(lb) {}
-    
-    void operator()(Td_active_trapezoid& t) const
-    {
-      return t.set_lb(m_lb);
-    }
-    
-    template < typename T >
-    void operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-    }
-    
-  private:
-    const Td_map_item& m_lb;
-  };
-
-  class set_lt_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_lt_visitor (const Td_map_item& lt) : m_lt(lt) {}
-
-    void operator()(Td_active_trapezoid& t) const
-    {
-      t.set_lt(m_lt);
-    }
-    
-    template < typename T >
-    void operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-
-  private:
-    const Td_map_item& m_lt;
-  };
-
-  class bottom_he_visitor : public boost::static_visitor<Halfedge_const_handle>
-  {
-  public:
-    Halfedge_const_handle operator()(Td_active_trapezoid& t) const
-    {
-      return t.bottom();
-    }
-    
-    template < typename T >
-    Halfedge_const_handle operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-      return Halfedge_const_handle();
-    }
-  };
- 
-  class set_bottom_he_visitor : public boost::static_visitor< void  >
-  {
-  public:
-    set_bottom_he_visitor (Halfedge_const_handle he) : m_bottom_he(he) {}
-    
-    void operator()(Td_active_trapezoid& t) const
-    {
-      t.set_bottom(m_bottom_he);
-    }
-   
-    template < typename T >
-    void operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-  private:
-    Halfedge_const_handle m_bottom_he;
-  };
-
-  class top_he_visitor : public boost::static_visitor<Halfedge_const_handle>
-  {
-  public:
-     Halfedge_const_handle operator()(Td_active_trapezoid& t) const
-    {
-      return t.top();
-    }
-    
-    template < typename T >
-    Halfedge_const_handle operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return Halfedge_const_handle();
-    }
-  };
- 
-  class set_top_he_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_top_he_visitor (Halfedge_const_handle he) : m_top_he(he) {}
-    
-    void operator()(Td_active_trapezoid& t) const
-    {
-      t.set_top(m_top_he);
-    }
-    
-    template < typename T >
-    void operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-    }
-  private:
-    Halfedge_const_handle m_top_he;
-  };
-
-  class cw_he_visitor : public boost::static_visitor< Halfedge_const_handle  >
-  {
-  public:
-    Halfedge_const_handle operator()(Td_active_vertex& t) const
-    {
-      return t.cw_he();
-    }
-    Halfedge_const_handle operator()(Td_active_fictitious_vertex& t) const
-    {
-      return t.cw_he();
-    }
-    
-    template < typename T >
-    Halfedge_const_handle operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-      return Halfedge_const_handle();
-    }
-  };
- 
-  class set_cw_he_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_cw_he_visitor (Halfedge_const_handle he) : m_cw_he(he) {}
-    
-    void operator()(Td_active_vertex& t) const
-    {
-      t.set_cw_he(m_cw_he);
-    }
-    void operator()(Td_active_fictitious_vertex& t) const
-    {
-      t.set_cw_he(m_cw_he);
-    }
-   
-    template < typename T >
-    void operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-  private:
-    Halfedge_const_handle m_cw_he;
-  };
-
-  class dag_node_visitor : public boost::static_visitor<Dag_node*>
-  {
-  public:
-    Dag_node* operator()(Td_nothing& /* t */) const
-    {
-      CGAL_assertion(false);
-      return NULL;
-    }
-    Dag_node* operator()(Td_inactive_trapezoid& /* t */) const
-    {
-      CGAL_assertion(false);
-      return NULL;
-    }
-
-    template < typename T >
-    Dag_node* operator()(T& t) const
-    {
-      return t.dag_node();
-    }
-  };
-
-  class set_dag_node_visitor : public boost::static_visitor<void>
-  {
-  public:
-    set_dag_node_visitor(Dag_node* node):m_node(node) {}
-    
-    void operator()(Td_nothing& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-    void operator()(Td_inactive_trapezoid& /*t*/) const
-    {
-      CGAL_assertion(false);
-    }
-
-    template < typename T >
-    void operator()(T& t) const
-    {
-      t.set_dag_node(m_node);
-    }
-  
-  private:
-    Dag_node* m_node;
-  };
-
-  class curve_end_for_fict_vertex_visitor :
-    public boost::static_visitor<boost::optional<Curve_end> >
-  {
-  public:
-    boost::optional<Curve_end> operator()(Td_active_fictitious_vertex& t) const
-    {
-      return t.curve_end();
-    }
-
-    boost::optional<Curve_end>
-    operator()(Td_inactive_fictitious_vertex& t) const
-    {
-      return t.curve_end();
-    }
-
-    template < typename T >
-    boost::optional<Curve_end> operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return boost::none;
-    }
-  };
-
-  class point_for_vertex_visitor : public boost::static_visitor< Point  >
-  {
-  public:
-    Point operator()(Td_active_vertex& t) const
-    {
-      return t.point();
-    }
-
-    Point operator()(Td_inactive_vertex& t) const
-    {
-      return t.point();
-    }
-    
-    template < typename T >
-    Point operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return Point();
-    } 
-  };
-  
-  class curve_end_for_active_vertex_visitor :
-    public boost::static_visitor<boost::optional<Curve_end> >
-  {
-    public:
-    boost::optional<Curve_end> operator()(Td_active_vertex& t) const
-    {
-      return t.curve_end();
-    }
-
-    boost::optional<Curve_end> operator()(Td_active_fictitious_vertex& t) const
-    {
-      return t.curve_end();
-    }
-
-    template < typename T >
-    boost::optional<Curve_end> operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return boost::none;
-    }
-  };
-
-  class vertex_for_active_vertex_visitor :
-    public boost::static_visitor<Vertex_const_handle>
-  {
-    public:
-    Vertex_const_handle operator()(Td_active_vertex& t) const
-    {
-      return t.vertex();
-    }
-
-    Vertex_const_handle operator()(Td_active_fictitious_vertex& t) const
-    {
-      return t.vertex();
-    }
-
-    template < typename T >
-    Vertex_const_handle operator()(T& /*t*/) const
-    {
-      CGAL_assertion(false);
-      return Vertex_const_handle();
-    }
-  };
-
-  class cv_for_edge_visitor :
-    public boost::static_visitor<boost::optional<const X_monotone_curve_2&> >
-  {
-  public:
-    boost::optional<const X_monotone_curve_2&>
-    operator()(Td_active_edge& t) const
-    {
-      return t.halfedge()->curve();
-    }
-
-    boost::optional<const X_monotone_curve_2&>
-    operator()(Td_inactive_edge& t) const
-    {
-      return t.curve();
-    }
-
-    template <typename T>
-    boost::optional<const X_monotone_curve_2&> operator()(T& /* t */) const
-    {
-      CGAL_assertion(false);
-      return boost::none;
-    }
-  };
-
-  ////MICHAL: currently not in use since split is implemented as removed and insert two
-  //struct Before_split_data 
-  //{
-  //  X_monotone_curve_2 m_cv_before_split;
-  //  Td_map_item* m_p_old_t;
-  //  Td_map_item* m_p_t1;
-  //  Td_map_item* m_p_t2;
-  //  In_face_iterator* m_p_btm_it;
-  //  In_face_iterator* m_p_mid_it;
-  //  In_face_iterator* m_p_top_it;
-  //  
-  //};    
-        
-  //////////////////////////////////////////////
-  //Trapezoidal_decomposition_2 member functions:
-  //////////////////////////////////////////////
-    
-    
-protected:
-    
-  /*!  is_edge_to_right variants:
-      returning true if the given edge is on the right side 
-      of the given point / curve-end */
-    
-  bool is_edge_to_right(Halfedge_const_handle he, const Point& p) const
-  {
-    typename Traits::Equal_curve_end_2 equal = 
-      traits->equal_curve_end_2_object();
-    //p is either min or max end of he
-    CGAL_precondition(equal(Curve_end(he,ARR_MIN_END), p) ||
-                      equal(Curve_end(he,ARR_MAX_END), p));
-      
-    return equal(Curve_end(he,ARR_MIN_END), p);
-  }
-    
-  bool is_edge_to_right(Halfedge_const_handle he, const Curve_end& ce) const
-  {
-    typename Traits::Equal_curve_end_2 equal = 
-      traits->equal_curve_end_2_object();
-    //p is either min or max end of he
-    CGAL_precondition(equal(Curve_end(he,ARR_MIN_END), ce) ||
-                      equal(Curve_end(he,ARR_MAX_END), ce));
-      
-    //if the curve end ce is on the right boundary - return false;
-    if (traits->parameter_space_in_x_2_object()
-          (ce.cv(), ce.ce()) == ARR_RIGHT_BOUNDARY)
-    {
-      return false;
-    }
-    
-    return equal(Curve_end(he,ARR_MIN_END), ce);
-  }
-    
-  //returns true if the given curve is on the right side of the given point
-  bool is_curve_to_right(const X_monotone_curve_2& cv, const Point& p) const
-  {
-    typename Traits::Equal_curve_end_2 equal = 
-      traits->equal_curve_end_2_object();
-    //p is either min or max end of he
-    CGAL_precondition(equal(Curve_end(cv,ARR_MIN_END), p) ||
-                      equal(Curve_end(cv,ARR_MAX_END), p));
-      
-    return equal(Curve_end(cv,ARR_MIN_END), p);
-  }
-    
-  /*!  is_end_point_left_low variants:
-      returning true if the first curve-end is left-low
-      of the second curve-end */
-  bool is_end_point_left_low(const Point& p1, const Point& p2) const
-  {
-    return (traits->compare_xy_2_object()(p1, p2) == SMALLER);
-  }
-    
-  bool is_end_point_left_low(const Point& p, const Curve_end& ce) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(p, ce) == SMALLER);
-  }
-
-  bool is_end_point_left_low(const Curve_end& ce, const Point& p) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(p, ce) == LARGER);
-  }
-
-  bool is_end_point_left_low(const Curve_end& ce1, const Curve_end& ce2) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(ce1, ce2) == SMALLER);
-  }
-  
-  template <typename T>
-  bool is_end_point_left_low(const T& t, const Dag_node& node) const
-  {
-    typename Traits::Compare_curve_end_xy_2 compare = 
-      traits->compare_curve_end_xy_2_object();
-    Td_map_item vtx_item (node.get_data());
-    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
-    if (is_fict_vtx) {
-      return (compare(t, 
-                      *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
-                                             vtx_item))) == SMALLER);
-    }
-    else {
-      return (compare(t, boost::apply_visitor(point_for_vertex_visitor(), 
-                                              vtx_item)) == SMALLER);
-    }
-  }
-    
-  /*!  is_end_point_right_top variants:
-      returning true if the first curve-end is right-top
-      of the second curve-end */
-  bool is_end_point_right_top(const Point& p1, const Point& p2) const
-  {
-    return (traits->compare_xy_2_object()(p1, p2) == LARGER);
-  }
-    
-  bool is_end_point_right_top(const Point& p, const Curve_end& ce) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(p, ce) == LARGER);
-  }
-
-  bool is_end_point_right_top(const Curve_end& ce, const Point& p) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(p, ce) == SMALLER);
-  }
-    
-  bool is_end_point_right_top(const Curve_end& ce1, const Curve_end& ce2) const
-  {
-    return (traits->compare_curve_end_xy_2_object()(ce1, ce2) == LARGER);
-  }
-
-  template <typename T>
-  bool is_end_point_right_top(const T& t, const Dag_node& node) const
-  {
-    typename Traits::Compare_curve_end_xy_2 compare = 
-      traits->compare_curve_end_xy_2_object();
-    Td_map_item vtx_item (node.get_data());
-    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
-    if (is_fict_vtx) {
-      return (compare(t, 
-                 *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
-                                        vtx_item)))  == LARGER);
-    }
-    else {
-      return (compare(t, 
-                  boost::apply_visitor(point_for_vertex_visitor(), 
-                                       vtx_item)) == LARGER);
-    }
-  }
-
-  template <typename T>
-  bool are_equal_end_points(const T& t, const Dag_node& node) const
-  {
-    typename Traits::Equal_curve_end_2 equal =
-      traits->equal_curve_end_2_object();
-    Td_map_item vtx_item (node.get_data());
-    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
-    if (is_fict_vtx) {
-      return equal(t, 
-                   *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
-                                          vtx_item)));
-    }
-    else {
-      return equal(t, 
-                   boost::apply_visitor(point_for_vertex_visitor(), 
-                                        vtx_item));
-    }
-  }
-  
-  /*!
-   * finds the node of the leftmost trapezoid with respect to a curve.
-   * \param left_cv_end_node The dag node representing the left endpoint of 
-   *        the cv
-   * \param cv The curve
-   * \param cres SMALLER/EQUAL/LARGER (searching for the leftmost trapezoid 
-   *        which is below/on/above cv) 
-   * \return The required DAG node
-   */
-  Dag_node find_leftmost_dag_node_of_curve(const Dag_node& left_cv_end_node, 
-                                           const X_monotone_curve_2& cv, 
-                                           Comparison_result cres) const
-  {
-    CGAL_assertion(traits != NULL);
-    Td_map_item& item = left_cv_end_node.get_data();
-    CGAL_precondition(traits->is_td_vertex(item));
-    CGAL_precondition (are_equal_end_points(Curve_end(cv,ARR_MIN_END), 
-                                            left_cv_end_node));
-    
-    //if ( traits->is_fictitious_vertex(item) )
-    //{
-    //  CGAL_precondition(traits->equal_curve_end_2_object()
-    //    (Curve_end(cv,ARR_MIN_END), *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))));
-    //}
-    //else 
-    //{ 
-    //  CGAL_precondition(traits->equal_curve_end_2_object()
-    //     (Curve_end(cv,ARR_MIN_END), boost::apply_visitor(point_for_vertex_visitor(), item)));
-    //}
-    //find the node of the curve's leftmost trapezoid 
-    Dag_node cv_leftmost_node(left_cv_end_node.right_child());
-    if (traits->is_fictitious_vertex(item) )
-    {
-      Curve_end ce( *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
-                                           item)));
-      search_using_dag_with_cv(cv_leftmost_node, traits, ce, &cv, cres);
-    }
-    else
-    {
-      Point p( boost::apply_visitor(point_for_vertex_visitor(), item));
-      search_using_dag_with_cv(cv_leftmost_node, traits, p, &cv, cres);
-    }
-    return cv_leftmost_node;
-  }
-
-   /*!
-   * follow_curve variants:
-   * follows trapezoids along a curve (below/on/above it)
-   * \param left_cv_end_node The dag node representing the left endpoint of 
-   *        the cv
-   * \param he/cv The halfedge / The curve
-   * \param cres SMALLER/EQUAL/LARGER (indicating the position with respect to the curve) 
-   * \return An iterator for td map items along a curve
-   */
-  In_face_iterator follow_curve(const Dag_node& left_cv_end_node,
-                                Halfedge_const_handle he,
-                                Comparison_result up) const
-  {
-    return follow_curve(left_cv_end_node, he->curve(), up);
-  }
-      
-  In_face_iterator follow_curve(const Dag_node& left_cv_end_node,
-                                const X_monotone_curve_2& cv,
-                                Comparison_result up) const
-  {
-    Dag_node cv_leftmost_node(find_leftmost_dag_node_of_curve(left_cv_end_node,cv,up));
-    //return a trapezoid iterator that starts from this trapezoid
-    //  and continues according to the curve cv
-    return In_face_iterator(traits, cv, cv_leftmost_node.get_data());
-  }
-    
-  //-----------------------------------------------------------------------------
-  // Description:
-  //  Input: pointer to left trapezoid, pointer to right trapezoid
-  //  Output: true iff the merging took place
-  //  If the two input trapezoids can be merged they are ,
-  //  with one copy destroyed(the right one).
-  // Preconditions:
-  //  the right trapezoid is to the right of the left one
-  bool merge_if_possible(Td_map_item& left_item, Td_map_item& right_item)
-  {
-    CGAL_precondition(traits->is_empty_item(left_item) || 
-                      (traits->is_active(left_item) && 
-                       traits->is_td_trapezoid(left_item)));
-    CGAL_precondition(traits->is_empty_item(right_item) || 
-                      (traits->is_active(right_item) && 
-                       traits->is_td_trapezoid(right_item)));
-    
-    if (traits->is_empty_item(left_item) || traits->is_empty_item(right_item))
-      return false;
-    
-    Td_active_trapezoid& left  (boost::get<Td_active_trapezoid>(left_item));
-    Td_active_trapezoid& right (boost::get<Td_active_trapezoid>(right_item));
-
-    if (traits->is_trapezoids_top_equal(left,right) &&
-        traits->is_trapezoids_bottom_equal(left,right) &&
-        traits->equal_curve_end_2_object()
-         (traits->vtx_to_ce(left.right()), traits->vtx_to_ce(right.left())))
-    {
-      left.merge_trapezoid(right);
-      //set the depth to be the max of the two merged nodes
-      left.dag_node()->depth() = (std::max)(left.dag_node()->depth(),
-                                            right.dag_node()->depth());
-      CGAL_postcondition(
-        left.is_on_right_boundary() == right.is_on_right_boundary());
-    
-      return true;
-    }
-    return false;
-  }
-    
-  //---------------------------------------------------------------------------
-  // Description:
-  //  splits the trapezoid with vertical line through v 
-  //  assuming that he (the first cw halfedge starting at 12 o'clock) is in the
-  //  desired direction, such that v is their source
-  // Precondition:
-  //  The trapezoid is active and contains v in its closure
-  //
-  Dag_node& split_trapezoid_by_vertex(Dag_node& tt,
-                                      Vertex_const_handle v,
-                                      Halfedge_const_handle he);
-
-  Td_map_item build_vertex_map_item(Vertex_const_handle v,
-                                    Halfedge_const_handle he,
-                                    Dag_node* node);
-  //---------------------------------------------------------------------------
-  // Description:
-  //  the opposite operation for spliting the trapezoid with 
-  //  vertical line through ce 
-  // Precondition:
-  //  The root trapezoid is degenerate point (ce) and is active 
-  void undo_split_trapezoid_by_vertex(Dag_node& tr_node, const Curve_end& ce);
- 
-  void deactivate_trapezoid (Dag_node& trpz_node, Dag_node* active_node) const;
-
-  void deactivate_vertex (Dag_node& vtx_node) const;
-
-  void deactivate_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const;
-
-  //-----------------------------------------------------------------------------
-  // Description:
-  //  splits the trapezoid that corresponds to the root of the
-  //  trapezoidal tree with an input halfedge he
-  // Precondition:
-  //  The root trapezoid is active
-  //  The root trapezoid is devided by he or is equal to it and is vertical.
-  Dag_node& split_trapezoid_by_halfedge(Dag_node& split_node, 
-                                        Td_map_item& prev_e,
-                                        Td_map_item& prev_bottom_tr, 
-                                        Td_map_item& prev_top_tr, 
-                                        Halfedge_const_handle he);
-
-
-  //---------------------------------------------------------------------------
-  // Description:
-  //  update
-  //   tr.bottom()
-  //   vertical_ray_shoot downward from tr
-  //   tr.top()
-  //    vertical_ray_shoot upward from tr
-  //  update all the curves incident to the vertex that there's a new curve 
-  //  starting from this vertex
-  //  this point must be an interior point and not a point on the boundaries,
-  //  since a point on the boundaries is related to one curve only  
-  Td_map_item&
-  update_vtx_with_new_edge(Halfedge_const_handle he,
-                           const Curve_end& ce,
-                           Td_map_item& vtx_item,
-                           const Locate_type& CGAL_precondition_code(lt));
-  
-  Td_map_item& insert_curve_at_vtx_using_dag(Halfedge_const_handle he,
-                                             Vertex_const_handle v,
-                                             Td_map_item& tr,
-                                             const Locate_type&
-                                             CGAL_precondition_code(lt));
-        
-
-  //void set_trp_params_after_halfedge_update(Halfedge_const_handle old_he,
-  //                                          Halfedge_const_handle new_he,
-  //                                          Td_map_item& vtx_item); //MICHAL: not in use
-  
-
-  void update_vtx_cw_he_after_merge(const X_monotone_curve_2& old_cv,
-                                    Halfedge_const_handle new_he,
-                                    Td_map_item& vtx_item);
-  
-  ////MICHAL: currently not in use since split is implemented as: remove and insert two
-  //void set_trp_params_after_split_halfedge_update(Halfedge_const_handle new_he,
-  //                                                Td_map_item& vtx_item,
-  //                                                Halfedge_const_handle he1, 
-  //                                                Halfedge_const_handle he2);
-  
-  //-----------------------------------------------------------------------------
-  // Description:
-  //  update map items traveled along an iterator till end reached
-  //   with the new halfedge
-  // precondition:
-  //  end==0 or end is on the path of the iterator
-  // postcondition:
-  //  end is pointer to the last trapezoid encountered,if any
-  void update_map_items_after_merge(In_face_iterator& it,
-                                    Halfedge_const_handle old_he,
-                                    Halfedge_const_handle new_he,
-                                    Vertex_const_handle min_v,
-                                    Vertex_const_handle max_v,
-                                    Td_map_item& end);
-  
-
-  //---------------------------------------------------------------------------
-  // Description:
-  //  advances input Data structure using data structure,input point p and 
-  //  possibly Halfedge p_he till
-  //  p is found(if p_he hadn't been given)
-  //  p_he is found(if p_he was given)
-  //  or
-  //  leaf node reached
-  // postcondition:
-  //  output is the closest active trapezoid to ce/p_he
-  // remark:
-  //  use this function with care!
-  Locate_type search_using_dag(Dag_node& curr_node,
-                               const Traits* traits,
-                               const Point& p,
-                               Halfedge_const_handle he,
-                               Comparison_result up = EQUAL) const;
-
-  ////-------------------------------------------------------------------------
-  //// Description:
-  ////  advances input Data structure using data structure,input point p and 
-  ////  possibly Halfedge p_he till
-  ////  p is found(if p_he hadn't been given)
-  ////  p_he is found(if p_he was given)
-  ////  or
-  ////  leaf node reached
-  //// postcondition:
-  ////  output is the closest active trapezoid to ce/p_he
-  //// remark:
-  ////  use this function with care!
-  //void search_and_print_using_dag (std::ostream& out, 
-  //                                Dag_node& curr_node,
-  //                                const Traits* traits,
-  //                                const Point& p,
-  //                                Halfedge_const_handle he,
-  //                                Comparison_result up = EQUAL) const;
-    
-  //---------------------------------------------------------------------------
-  // Description:
-  //  advances input Data structure using data structure,input point ce and 
-  //  possibly Halfedge p_he till
-  //  ce is found(if p_he hadn't been given)
-  //  p_he is found(if p_he was given)
-  //  or
-  //  leaf node reached
-  // postcondition:
-  //  output is the closest active trapezoid to ce/p_he
-  // remark:
-  //  use this function with care!
-  Locate_type search_using_dag (Dag_node& curr_node,
-                                const Traits* traits,
-                                const Curve_end& ce,
-                                Halfedge_const_handle he,
-                                Comparison_result up = EQUAL) const;
-      
-  //---------------------------------------------------------------------------
-  // Description:
-  //  advances input Data structure using data structure,input point ce and 
-  //  possibly X_monotone_curve_2 p_cv till
-  //  ce is found(if p_cv hadn't been given)
-  //  p_cv is found(if p_cv was given)
-  //  or
-  //  leaf node reached
-  // postcondition:
-  //  output is the closest active trapezoid to ce/p_cv
-  // remark:
-  //  use this function with care!
-  Locate_type search_using_dag_with_cv(Dag_node& curr_node,
-                                       const Traits* traits,
-                                       const Curve_end& ce,
-                                       const X_monotone_curve_2* p_cv,
-                                       Comparison_result up = EQUAL) const;
-      
-  //---------------------------------------------------------------------------
-  // Description:
-  //  advances input Data structure using data structure,input point ce and 
-  //  possibly X_monotone_curve_2 p_cv till
-  //  p is found(if p_cv hadn't been given)
-  //  p_cv is found(if p_cv was given)
-  //  or
-  //  leaf node reached
-  // postcondition:
-  //  output is the closest active trapezoid to ce/p_cv
-  // remark:
-  //  use this function with care!
-  Locate_type search_using_dag_with_cv (Dag_node& curr_node,
-                                        const Traits* traits,
-                                        const Point& p,
-                                        const X_monotone_curve_2* p_cv,
-                                        Comparison_result up = EQUAL) const;    
-      
-    
-  Dag_node container2dag(Nodes_map& ar, int left, int right,
-                         int& num_of_new_nodes) const;
-    
-  bool is_last_edge(Halfedge_const_handle he, Td_map_item& vtx_item);
-  
-  /*==============================================
-    Trapezoidal_decomposition_2 public member functions
-    ==============================================*/
-public:
-    
-  Trapezoidal_decomposition_2(bool with_guarantees = true) :
-    m_largest_leaf_depth(0),
-    m_number_of_dag_nodes(1),
-    m_number_of_curves(0),
-    traits(0),
-    m_arr(0),
-    m_depth_threshold(CGAL_TD_DEFAULT_DEPTH_THRESHOLD),
-    m_size_threshold(CGAL_TD_DEFAULT_SIZE_THRESHOLD)
-  {
-    init();
-    set_with_guarantees(with_guarantees);
-  }
-    
-  Trapezoidal_decomposition_2(const double& depth_th, const double& size_th,
-                              bool with_guarantees = true) :
-    m_largest_leaf_depth(0),
-    m_number_of_curves(0),
-    m_number_of_dag_nodes(1),
-    traits(0),
-    m_arr(0),
-    m_depth_threshold(depth_th),
-    m_size_threshold(size_th)
-  {
-    init();
-    set_with_guarantees(with_guarantees);
-  }
-
-  //MICHAL: problematic, should not be used
-  //Trapezoidal_decomposition_2(const Self& td) 
-  //  : m_with_guarantees(td.m_with_guarantees),
-  //    m_number_of_curves(td.m_number_of_curves),
-  //    m_largest_leaf_depth(td.m_largest_leaf_depth),
-  //    m_number_of_dag_nodes(td.m_number_of_dag_nodes),
-  //    traits(td.traits),
-  //    m_arr(td.m_arr),
-  //    last_cv(Td_map_item(0)), prev_cv(Td_map_item(0)), 
-  //    m_depth_threshold(td.m_depth_threshold),
-  //    m_size_threshold(td.m_size_threshold)
-  //{
-  //  Td_map_item_ptr_map htr;
-  //  /*! \todo allocate hash_map size according to content.
-  //   * \todo change vector<> to in_place_list and pointer hash to trapezoidal
-  //   * hash..
-  //   */
-  //  //X_trapezoid_vector vtr;
-  //  std::vector<Td_map_item> vtr;
-  //  Td_active_map_item pr;
-  //  int sz = Td_map_item_filter(vtr, &td.dag_root());
-  //  //! \todo Reduce the 3 iterations to 1 (or 2) iterator.
-  //  // First iteration: filter out the active trapezoids.
-  //  typename std::vector<Td_map_item>::const_iterator it;
-  //  for (it = vtr.begin(); it != vtr.end(); ++it) 
-  //  {
-  //    Dag_node* ds_copy = new Dag_node(*it);
-  //    const Td_map_item* cur = &*it;
-  //    Td_map_item* tr_copy = &*(*ds_copy);
-  //    tr_copy->set_dag_node(ds_copy);
-  //    CGAL_assertion(&*(*tr_copy->dag_node()) == tr_copy);
-  //    ds_copy->depth() = cur->dag_node()->depth();
-  //    // We cheat a little with the depth.
-  //    htr.insert(typename Td_map_item_ptr_map::value_type(cur, tr_copy));
-  //    // Second iteration: generate new copies of trapezoids and nodes.
-  //  }
-  //    
-  //  for (it = vtr.begin(); it!=vtr.end(); ++it) 
-  //  {
-  //    const Td_map_item* cur = &*it;
-  //    Td_map_item* tr_copy = htr.find(cur)->second;
-  //    const Dag_node* child;
-  //    CGAL_assertion(tr_copy);
-  //    tr_copy->set_rt(cur->rt() ? 
-  //                    htr.find(cur->rt())->second : NULL);
-  //    tr_copy->set_rb(cur->rb() ?
-  //                    htr.find(cur->rb())->second : NULL);
-  //    tr_copy->set_lt(cur->lt() ? 
-  //                    htr.find(cur->lt())->second : NULL);
-  //    tr_copy->set_lb(cur->lb() ? 
-  //                    htr.find(cur->lb())->second : NULL);
-
-  //    if (cur->dag_node()->is_inner_node()) 
-  //    {
-  //      child = &cur->dag_node()->right_child();
-  //      while (child && child->is_inner_node() && !pr(*(*child)))
-  //        child = &child->left_child();
-  //      tr_copy->dag_node()->set_right_child(*child);
-  //      child = &cur->dag_node()->left_child();
-  //      while (child && child->is_inner_node() && !pr(*(*child))) 
-  //        child = &child->left_child();
-  //      tr_copy->dag_node()->set_left_child(*child);
-  //    }
-  //    // Third iteration: generate links in-between trapezoids 
-  //    //  and in-between nodes .
-  //  }
-  //  m_dag_root = htr.find(&*(*td.m_dag_root))->second->dag_node();
-  //}
-  // 
-   
-  /*
-    TODO: Should we add another constructor with non const argument that 
-    rebuild the trapezoidal decomposition prior to copy construction?
-  */
-  virtual ~Trapezoidal_decomposition_2()
-  {
-    CGAL_warning(m_dag_root != NULL);
-    if (!m_dag_root) return;
-    
-    delete m_dag_root;
-    
-    if (traits)
-      delete traits;
-  }
-  
-  //---------------------------------------------------------------------------
-  // Description:
-  //  if Halfedge or twin already inserted the latter is returned.
-  //  otherwise the left-low most edge-degenerate trapezoid that represents the
-  //  input Halfedge is returned
-  // Remark:
-  //  Given an edge-degenerate trapezoid representing a Halfedge,
-  //  all the other trapezoids representing the Halfedge can be extracted
-  //  via moving continously to the left and right neighbours.
-  Td_map_item insert(Halfedge_const_handle he);
-    
-  
-  //---------------------------------------------------------------------------
-  // Description:
-  // inserts a range of halfedges into the Search structure.
-  // First it randomly shuffles the container and then it inserts the Halfedges 
-  //  according to the new order
-  // Precondition: the data structure is empty
-  template <class Halfedge_iterator>
-  void insert(Halfedge_iterator begin, Halfedge_iterator end)
-  {
-    //Precondition: the data structure is empty 
-    CGAL_precondition(m_number_of_curves == 0);
-
-    if (begin == end)
-      return;
-    
-    //insert the shuffled halfedges into the search structure
-    
-    //disable the rebuild check from within the halfedge insert and check here 
-    //  for rebuild
-    bool do_rebuild = set_with_guarantees(false);
-    
-    bool start_over = true;
-    while (start_over)
-    {
-      start_over = false;
-
-      //random_shuffle the range
-      std::random_shuffle(begin,end);
-    
-      Halfedge_const_handle he_cst;
-      Halfedge_iterator it = begin;
-      for (; it < end ; ++it)
-      {
-        if (do_rebuild && not_within_limits()) 
-        {
-          std::cout << "starting over after " << number_of_curves() << std::flush;
-          start_over = true;
-          clear();
-          break;
-        }
-
-        he_cst = *it;
-        insert(he_cst); 
-      }
-      if (it != end)
-        continue;
-      
-      //after inserting the last halfedge in the range
-      //  perform another rebuild check
-      if (do_rebuild && not_within_limits()) //MICHAL: should I use needs_update() instead (with the random check)?
-      {
-        start_over = true;
-        clear();
-      }
-    }
-
-    //enable the rebuild from within the halfedge insert 
-    set_with_guarantees(do_rebuild);
-  }
-    
-
-  // removal functions
-    
-  //---------------------------------------------------------------------------
-  // Description:
-  //
-  void remove(Halfedge_const_handle he);
-    
-  ////-------------------------------------------------------------------------
-  //// Description:
-  ////
-  //template <class curve_iterator>
-  //void remove(curve_iterator begin, curve_iterator end)
-  //{
-  //  if(begin == end)
-  //    return;
-  //  
-  //  std::random_shuffle(begin,end);
-  //  
-  //  curve_iterator it=begin,next=it;
-  //  while(it!=end) 
-  //  {
-  //    ++next;
-  //    remove(*it);
-  //    it=next;
-  //  }
-  //}
-    
-  void clear()
-  {
-    delete m_dag_root;
-    init();
-  }
-    
-
-//  //-------------------------------------------------------------------------
-//  // Description:
-//  //  returns the active trapezoid representing the input point.
-//  // Precondition:
-//  //  The trapezoidal tree is not empty
-//  // Postcondition:
-//  //  the input locate type is set to the type of the output trapezoid.
-//  // Remark:
-//  //  locate call may change the class
-//  Td_map_item& locate_and_print(std::ostream& out, const Point& p) const
-//  {
-//    
-//#ifdef CGAL_TD_DEBUG
-//    
-//    CGAL_assertion(traits);
-//    CGAL_assertion(m_dag_root);
-//    
-//#endif
-//    
-//    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
-//    
-//#ifdef CGAL_TD_DEBUG
-//    
-//    CGAL_precondition(!!curr);
-//    
-//#endif
-//    //the actual locate. curr is the DAG root, the traits, 
-//    //the point to location, and 0 - indicates point location
-//    search_and_print_using_dag(out, curr,traits,p,Halfedge_const_handle());//m_empty_he_handle);
-//    
-//    
-//#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-//    
-//    locate_opt_push(curr.get_data());
-//    
-//#endif
-//    
-//    return *curr;
-//  }
-
-  //---------------------------------------------------------------------------
-  // Description:
-  //  returns the active trapezoid representing the input point.
-  // Precondition:
-  //  The trapezoidal tree is not empty
-  // Postcondition:
-  //  the input locate type is set to the type of the output trapezoid.
-  // Remark:
-  //  locate call may change the class
-  Td_map_item& locate(const Point& p,Locate_type &t) const
-  {
-    //print_dag_addresses(*m_dag_root);
-#ifdef CGAL_TD_DEBUG
-    
-    CGAL_assertion(traits);
-    CGAL_assertion(m_dag_root);
-    
-#endif
-    
-    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
-    
-#ifdef CGAL_TD_DEBUG
-    
-    CGAL_precondition(!!curr);
-    
-#endif
-    //the actual locate. curr is the DAG root, the traits, 
-    //the point to location, and 0 - indicates point location
-    t = search_using_dag(curr,traits,p,Halfedge_const_handle());
-    
-#ifdef CGAL_TD_DEBUG
-    
-    CGAL_postcondition(t == POINT || t == CURVE || t == TRAPEZOID ||
-                       t == UNBOUNDED_TRAPEZOID);
-    
-#endif
-    
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-    
-    locate_opt_push(curr.get_data());
-    
-#endif
-    
-    return *curr;
-  }
-    
-  //---------------------------------------------------------------------------
-  // Description:
-  //  returns the active trapezoid representing the input point.
-  // Precondition:
-  //  The trapezoidal tree is not empty
-  // Postcondition:
-  //  the input locate type is set to the type of the output trapezoid.
-  // Remark:
-  //  locate call may change the class
-  Td_map_item& locate(const Curve_end& ce, Locate_type& lt) const
-  {
-    
-#ifdef CGAL_TD_DEBUG
-    
-    CGAL_assertion(traits);
-    CGAL_assertion(m_dag_root);
-    
-#endif
-    
-    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
-    
-    //the actual locate. curr is the DAG root, the traits, 
-    //the end point to locate, 
-    //and NULL as cv ptr - indicates point location
-    lt = search_using_dag (curr, traits, ce, Halfedge_const_handle());
-    
-#ifdef CGAL_TD_DEBUG
-    
-    CGAL_postcondition(lt == POINT || lt == CURVE || lt == TRAPEZOID ||
-                       lt == UNBOUNDED_TRAPEZOID);
-    
-#endif
-    
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-    
-    locate_opt_push(curr.get_data());
-    
-#endif
-    
-    return curr.get_data();
-  }
-  
-  //---------------------------------------------------------------------------
-  // Description:
-  //  returns the active trapezoid containing the point represented by vertex.
-  // Precondition:
-  //  The trapezoidal tree is not empty
-  // Postcondition:
-  //  the input locate type is set to the type of the output trapezoid.
-  // Remark:
-  //  locate call may change the class
-  Td_map_item& locate( Vertex_const_handle v, Locate_type& lt) const
-  {
-    CGAL_precondition(traits != NULL);
-    return locate(traits->vtx_to_ce(v), lt);
-  }
-
-  //---------------------------------------------------------------------------
-  // Description:
-  // 
-  // preconditions:
-  //  p is not on an edge or a vertex.
-  Td_map_item& vertical_ray_shoot(const Point& p,Locate_type& t,
-                                  const bool up_direction = true) const;
-  
-  
-  ////MICHAL: commented due to inefficient depth update, remove and insert instead
-  //void before_split_edge(const X_monotone_curve_2& cv,
-  //                       const X_monotone_curve_2& cv1, 
-  //                       const X_monotone_curve_2& cv2);
-
-  ////MICHAL: commented due to inefficient depth update, remove and insert instead
-  ////-------------------------------------------------------------------------
-  //// Description:
-  //// Input:
-  ////  1 whole curves
-  ////  2 partial halfedge_handle-s
-  //// precondition:
-  ////  The two halfedges are valid
-  ////  The first input curve is the union of the two halfedges.
-  ////  The intersection of the latter is a point inside the 
-  ////  interior of the former.
-  ////  The latter are ordered from left-down to right-up
-  //// postcondition:
-  ////  The first input curve is broken into two halfedges 
-  ////  corresponding to the input.
-  //void split_edge(const X_monotone_curve_2& cv, Halfedge_const_handle he1, 
-  //                Halfedge_const_handle he2);
-
- 
-  void merge_edge(Halfedge_const_handle he1, Halfedge_const_handle he2,
-                  const X_monotone_curve_2& cv);
-
-  
-  void after_merge_edge(Halfedge_const_handle merged_he, 
-                        Halfedge_const_handle before_mrg_he)
-  {
-    //Precondition:
-    // the merge uses the suspected halfedge before the arrangement merge
-    CGAL_precondition(merged_he == before_mrg_he || 
-                      merged_he == before_mrg_he->twin());
-  }
-  
-
-  unsigned long size() const
-  {
-    return m_dag_root->size();
-  }
-  
-  unsigned long number_of_curves() const
-  {
-    return m_number_of_curves;
-  }
-  
-  void init_arrangement_and_traits(const Arrangement_on_surface_2* arr,
-                                   bool allocate_traits = true)
-  {
-    m_arr = arr;
-    m_trts_adaptor = 
-      static_cast<const Traits_adaptor_2*> (arr->geometry_traits());
-    
-    if (allocate_traits)
-      traits = new Td_traits(*m_trts_adaptor);
-  }
-  
-  
-  
-#ifdef CGAL_TD_DEBUG
-  /*------------------------------------------------------------------
-    description:
-    returns whether the Trapezoidal Dag is valid
-  */
-  bool is_valid(const Dag_node& ds) const
-  {
-    if ( !ds ) return true;
-    if (ds->is_valid(traits) && ds->dag_node() &&
-        is_valid(ds.left_child()) && is_valid(ds.right_child())) 
-      return true;
-    CGAL_warning(ds->is_valid(traits));
-    CGAL_warning(ds->dag_node());
-    CGAL_warning(is_valid(ds.left_child()));
-    CGAL_warning(is_valid(ds.right_child()));
-    return false;
-  }
-  /*------------------------------------------------------------------
-    description:
-    returns whether the member Trapezoidal data structure is valid
-  */
-  bool is_valid() const
-  {
-    return is_valid(*m_dag_root);
-  }
-  //void debug() const
-  //{
-  //  std::cout << "\nTrapezoidal_decomposition_2<Traits>::debug()\n" << *this
-  //            << std::endl;
-  //  Td_map_item x;
-  //  x.debug(); //MICHAL: will not work!
-  //}
-#endif
-  
-  /*------------------------------------------------------------------
-    description:
-    Rebuilds the trapezoid data structure by reinserting the curves 
-    in a random order in an empty data structure.
-    
-    postcondition:
-    The old and new data structures agree on their member curves.
-    ------------------------------------------------------------------*/
-  Self& rebuild()
-  {
-#ifdef CGAL_TD_DEBUG
-    std::cout << "\nrebuild!  " << m_number_of_curves << std::endl
-              << std::flush;
-#endif
-
-    Halfedge_container container;
-
-#ifdef CGAL_TD_DEBUG
-    unsigned long rep = Halfedge_filter(container, &dag_root());
-#endif
-    
-    clear();
-    
-    //// initialize container to point to curves in Td_map_item Tree
-    //if (rep>0)
-    //{
-    //  bool o = set_with_guarantees(false);
-    //  typename std::vector<Halfedge_const_handle>::iterator 
-    //    it = container.begin(),
-    //    it_end = container.end();
-    //  while(it!=it_end) 
-    //  {
-    //    insert(*it);
-    //    ++it;
-    //  }
-    //  set_with_guarantees(o);
-    //}
-
-    //insert the already inserted curves from scratch in order to build a
-    // search structure guaranteeing logarithmic query time and linear size
-    insert(container.begin(), container.end());
-     
-#ifdef CGAL_TD_DEBUG
-    CGAL_assertion(is_valid());
-    unsigned long sz = number_of_curves();
-    if (sz != rep)
-    {
-      std::cerr << "\nnumber_of_curves()=" << sz;
-      std::cerr << "\nrepresentatives.size()=" << rep;
-      CGAL_assertion(number_of_curves() == rep);
-    }
-#endif
-    
-    container.clear();
-    return *this;
-  }
-  
-  /* 
-     Input:  
-     a list of pointers to Td_map_items and a Td_map_item boolean predicate.
-     Output: 
-     void
-     Postcondition:
-     the list pointers correspond to all the Td_map_items in the data
-     structure for which the predicate value is true. 
-  */
-  
-  template <typename Container, typename Predicate>
-  void filter(Container& c, const Predicate& pr, const Dag_node * ds) const
-  {
-    CGAL_assertion(ds);
-    ds->filter(c,pr);
-  }
-
-  template <typename Container, typename Predicate>
-  void filter(Container& c, const Predicate& pr) const
-  {
-    filter(c, pr, &dag_root());
-  }
-
-  ////MICHAL: not in use
-  //template <class Container>
-  //unsigned long Td_map_item_filter(Container& container, 
-  //                                 const Dag_node* ds) const
-  ///* Return a container for all active map items */
-  //{
-  //  ds->filter(container, Td_active_map_item());
-  //  return container.size();
-  //}
-
-  template <typename Halfedge_container>
-  unsigned long Halfedge_filter(Halfedge_container& container, 
-                                const Dag_node* ds) const
-  /* Return a container for all active curves */
-  {
-    unsigned long sz = number_of_curves();
-    std::list<Td_map_item> representatives;
-    //X_trapezoid_list representatives;
-    ds->filter(representatives, Td_active_edge_item(*traits));
-    
-#ifndef CGAL_TD_DEBUG
-    
-    CGAL_warning(sz==representatives.size());
-    
-#else
-    
-    unsigned long rep=representatives.size();
-    if (sz != rep)
-    {
-      std::cerr << "\nnumber_of_curves()=" << sz;
-      std::cerr << "\nrepresentatives.size()=" << rep;
-      CGAL_assertion(number_of_curves()==representatives.size());
-    }
-    
-#endif
-    
-    if (sz > 0)
-    {
-      typename std::list<Td_map_item>::iterator it = representatives.begin(),
-        it_end = representatives.end();
-      //typename X_trapezoid_list::iterator it = representatives.begin(),
-      //  it_end = representatives.end();
-      while(!(it==it_end))
-      {
-        Td_active_edge e (boost::get<Td_active_edge>(*it));
-        container.push_back(e.halfedge()); //it represents an active trapezoid
-        ++it;
-      }
-    }
-    if(! container.empty()) {
-      std::random_shuffle(container.begin(),container.end());
-    }
-    return sz;
-  }
-  
-  
-  
-  /*------------------------------------------------------------------
-    Input: None
-    Output: bool
-    Description:
-    determines according to pre defined conditions whether the
-    current Trapezoidal_decomposition_2<Traits> needs update
-    Postconditions:
-    The output is true iff the depth of the Trapezoidal Tree is more then
-    DepthThreshold times log of the X_curve count or the Trapezoidal Tree's
-    size 
-    is more then SizeThreshold times the log of the last count.
-  */
-  bool set_with_guarantees(bool u)
-  {
-    bool old = m_with_guarantees;
-    m_with_guarantees = u;
-    return old;
-  }
-
-  //This method occasionaly(!) checks the guarantees 
-  // It is currently not in use, since the guarantees are constantly checked in O(1) time
-  bool needs_update() 
-  {
-    unsigned long num_of_cv = number_of_curves();
-    //to avoid signed / unsigned conversion warnings
-    // rand() returns an int but a non negative one.
-    if (static_cast<unsigned long>(std::rand()) > 
-        RAND_MAX / ( num_of_cv + 1))
-      return false;
-    /*       INTERNAL COMPILER ERROR overide
-             #ifndef __GNUC__
-    */
-#ifdef CGAL_TD_REBUILD_DEBUG
-    std::cout << "\n|heavy!" << std::flush;
-#endif
-    
-    return not_within_limits();
-  }
-  
-  /*------------------------------------------------------------------
-    input: None
-    output: bool
-    Description:
-    uses needs_update to determine whether the
-    Trapezoidal_decomposition_2<Traits> needs update
-    and calls rebuild accordingly
-    Postcondition:
-    the return value is true iff rebuilding took place.
-  */
-  bool update()
-  {
-    //if the structure violates the guarantees - rebuild
-    if (not_within_limits()) //needs_update()) 
-    {
-      rebuild(); 
-      return true;
-    }
-    
-    return false;
-  }
-  
-  bool not_within_limits()
-  {
-    unsigned long num_of_cv = number_of_curves();
-    
-    //Cond 1: Depth is greater than threshold*log(number of curves)
-    bool cond1 = largest_leaf_depth() > 
-                   (depth_threshold()*(std::log(double(num_of_cv+1))));
-    //Cond 2: Number of nodes is greater than threshold*number of curves
-    bool cond2 = number_of_dag_nodes() > (size_threshold()*(num_of_cv + 1));
-    
-    //return true if at least one of the conditions is true
-    return cond1 || cond2;
-  }
-
-  /* returns a reference to the internal data structure */
-  const Dag_node& dag_root() const {return *m_dag_root;}
-  
-  /* returns a reference to the internal data structure */
-  const Traits& get_traits() const {return *traits;}
-  
-  /* returns a reference to the internal depth threshold constant */
-  const double& depth_threshold() const
-  {
-    return m_depth_threshold;
-  }
-  
-  /* sets the internal depth threshold constant to the parameter and 
-     returns its reference */
-  void depth_threshold(const double& depth_th)
-  {
-    m_depth_threshold = depth_th;
-  }
-  
-  /* returns a reference to the internal size threshold constant */
-  const double& size_threshold() const
-  {
-    return m_size_threshold;
-  }
-  
-  /* sets the internal size threshold constant to the parameter and 
-     returns its reference */
-  void size_threshold(const double& size_th)
-  {
-    m_size_threshold = size_th;
-  }
-
-  void update_largest_leaf_depth( unsigned long depth )
-  {
-    if(m_largest_leaf_depth < depth )
-        m_largest_leaf_depth = depth;
-  }
-
-  unsigned long largest_leaf_depth()
-  {
-    //CGAL_assertion((m_largest_leaf_depth + 1) == m_dag_root->rec_depth());
-    return m_largest_leaf_depth;
-  }
-
-  unsigned long number_of_dag_nodes()
-  {
-    //CGAL_assertion(m_number_of_dag_nodes == m_dag_root->size());
-    return m_number_of_dag_nodes;
-  }
-
-  unsigned long longest_query_path_length()
-  {
-    return longest_query_path_length_rec(true, *m_dag_root,
-                                         true, *m_dag_root, *m_dag_root);
-  }
-
-
-protected:
-  
-  //Trapezoidal Decomposition data members
-  Dag_node* m_dag_root;
-  unsigned long m_largest_leaf_depth; //holds the leargest depth of a leaf in the DAG
-  unsigned long m_number_of_dag_nodes; //holds the number of nodes in the DAG
-  bool m_with_guarantees; //whether the structure holds logarithmic query time and linear size guarantees //m_needs_update; 
-  unsigned long m_number_of_curves;
-  const Traits* traits;
-  //Before_split_data m_before_split;
-  const Arrangement_on_surface_2* m_arr;
-  const Traits_adaptor_2* m_trts_adaptor;
-  
-  Halfedge_const_handle m_empty_he_handle;
-
-private:
-  
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-  
-  mutable Td_map_item last_cv;
-  mutable Td_map_item prev_cv;
-  
-#endif
- 
-  unsigned long longest_query_path_length_rec(bool minus_inf,
-                                              Dag_node& min_node, 
-                                              bool plus_inf,
-                                              Dag_node& max_node,
-                                              Dag_node& node);
-    
-  void init()
-  {
-    // traits may be initialized later
-    m_dag_root = new Dag_node(Td_active_trapezoid());
-    //(*m_dag_root)->set_dag_node(m_dag_root);
-    boost::apply_visitor(set_dag_node_visitor(m_dag_root),
-                         m_dag_root->get_data());
-    
-    m_number_of_curves = 0;
-    m_largest_leaf_depth = 0; 
-    m_number_of_dag_nodes = 1; //the root is the only node in the DAG
-    
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-    
-    locate_opt_empty();
-    
-#endif
-    
-  }
-  
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-  
-  void locate_opt_push(Td_map_item& cv_tr) const
-  {
-    prev_cv = last_cv;
-    last_cv = cv_tr;
-  }
-  void locate_opt_empty() const
-  {
-    last_cv = Td_map_item(0);
-    prev_cv = Td_map_item(0);
-  }
-  bool locate_opt_swap(Td_map_item& item) const
-  {
-    item = last_cv;
-    last_cv = prev_cv;
-    prev_cv = item;
-    return (!traits->is_empty_item(item));
-  }
-  void locate_optimization(const Curve_end& ce, Td_map_item& item,
-                            Locate_type& lt) const
-  {
-    bool res = false;
-    // optimization
-    if (locate_opt_swap(item) && traits->is_active(item) )
-    {
-      if (traits->is_td_vertex(item))
-        res = are_equal_end_points(ce, item);
-
-      //if (traits->is_td_vertex(item))
-      //{
-      //  if ( traits->is_fictitious_vertex(item) )
-      //  {
-      //    res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
-      //  }
-      //  else 
-      //  { 
-      //    res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item));
-      //  }      
-      //}
-      if (traits->is_td_trapezoid(item))
-        res = traits->is_inside(item,ce);
-    }
-    if (!res && locate_opt_swap(item) && traits->is_active(item) )
-    {
-      if (traits->is_td_vertex(item))
-        res = are_equal_end_points(ce, item);
-      //if (traits->is_td_vertex(item))
-      //{
-      //  if ( traits->is_fictitious_vertex(item) )
-      //  {
-      //    res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
-      //  }
-      //  else 
-      //  { 
-      //    res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item));
-      //  }      
-      //}
-      if (traits->is_td_trapezoid(item))
-        res = traits->is_inside(item,ce);
-    }
-    if (res)
-    {
-      if (traits->is_td_vertex(item)) 
-        lt=POINT;
-      else
-      {
-        Td_active_trapezoid tr (boost::get<Td_active_trapezoid>(item));       
-        lt = tr.is_on_boundaries()? UNBOUNDED_TRAPEZOID : TRAPEZOID;
-      }
-    }
-    else
-      item = locate(ce,lt);
-  }
-  
-#endif
-
-
-  void print_cv_data(const X_monotone_curve_2& cv,
-                     std::ostream& out = std::cout) const
-  {
-    out << "min end: " << std::endl;
-    print_ce_data(cv, ARR_MIN_END, out);
-    out << std::endl << "max end: " << std::endl;
-    print_ce_data(cv, ARR_MAX_END, out);
-    out << std::endl << std::endl ;
-  }
-
-  void print_point_data(const Point& p, std::ostream& out = std::cout) const
-  {
-    out << "x: " << CGAL::to_double(p.x()) << ", y: "
-        << CGAL::to_double(p.y()) << std::endl;
-  }
-
-  void print_ce_data(const X_monotone_curve_2& cv, Arr_curve_end ce,
-                     std::ostream& out = std::cout) const
-  {
-    Arr_parameter_space ps_x = traits->parameter_space_in_x_2_object()(cv, ce);
-    Arr_parameter_space ps_y = traits->parameter_space_in_y_2_object()(cv, ce);
-    
-    if (ps_x == ARR_INTERIOR && ps_y == ARR_INTERIOR)
-    {
-      if (ce == ARR_MIN_END)
-        out << "x: "
-            << CGAL::to_double(traits->construct_min_vertex_2_object()(cv).x())
-            << ", y: "
-            << CGAL::to_double(traits->construct_min_vertex_2_object()(cv).y())
-            << std::endl;
-      else
-        out << "x: "
-            << CGAL::to_double(traits->construct_max_vertex_2_object()(cv).x())
-            << ", y: "
-            << CGAL::to_double(traits->construct_max_vertex_2_object()(cv).y())
-            << std::endl;
-    }
-    else if (ps_x == ARR_INTERIOR && ps_y != ARR_INTERIOR)
-    {
-      out << " vertical asymptote, " ;
-      if (ps_y == ARR_TOP_BOUNDARY)
-        out << " y -> +oo " << std::endl;
-      else
-        out << " y -> -oo " << std::endl;
-    }
-    else if (ps_x != ARR_INTERIOR && ps_y == ARR_INTERIOR)
-    {
-      out << " horizontal asymptote, " ;
-      if (ps_x == ARR_RIGHT_BOUNDARY)
-        out << " x -> +oo " << std::endl;
-      else
-        out << " x -> -oo " << std::endl;
-    }
-    else //both are not interior
-    {
-      if (ps_x == ARR_RIGHT_BOUNDARY)
-        out << " x -> +oo " ;
-      else
-        out << " x -> -oo " ;
-      if (ps_y == ARR_TOP_BOUNDARY)
-        out << " , y -> +oo " << std::endl;
-      else
-        out << " , y -> -oo " << std::endl;
-    
-    }
-  }
-
-
-  void print_dag_addresses(const Dag_node& curr) const
-  {
-    
-    std::cout << "----------------- DAG ----------------" <<std::endl
-              << "--------------------------------------" <<std::endl;
-    
-    print_dag_addresses_rec(curr, 0);
-    std::cout << "----------------- END OF DAG ----------------" <<std::endl
-              << "---------------------------------------------" <<std::endl;
-    
-  }
-  
-  void print_dag_addresses_rec(const Dag_node& curr ,int level,
-                               std::ostream& out = std::cout) const
-  {
-    
-    out << "------ level " << level << ", depth " << curr.depth()
-        << " ------\n";
-    out << " (void *)curr : " << (void *)(&curr) << std::endl;
-    out << "      (void *)curr->TRPZ : " << (void *)(curr.operator->())
-        << std::endl;
-
-    //curr is the current pointer to node in the data structure
-    //item holds the trapezoidal map item connected to curr.
-    Td_map_item item = curr.get_data();
-    if (traits->is_td_vertex(item))
-    { 
-      out << " POINT : " ;
-      
-      // if the map item represents a fictitious vertex
-      if (traits->is_fictitious_vertex(item))
-      {
-        const Curve_end left_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
-        print_ce_data(left_ce.cv(), left_ce.ce(), out);
-      }
-      else // if the map item represents a vertex
-      {
-        Point p = boost::apply_visitor(point_for_vertex_visitor(),item);
-        print_point_data(p, out);
-      }
-      out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
-          << std::endl;
-      out << "          (void *)right_child: " << (void*)(&(curr.right_child()))
-          << std::endl;
-      print_dag_addresses_rec(curr.left_child(), level+1, out);
-      print_dag_addresses_rec(curr.right_child(), level+1, out);
-      return;
-    }
-    if (traits->is_td_edge(item))
-    { 
-      // bool is_active = traits->is_active(item);
-      // if the map item represents an edge
-      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), item));
-      
-      //   so top() is a real Halfedge with a curve() if curr is active
-      //   or curr holds the curve if curr is not active 
-      out << " CURVE : " ;
-      print_cv_data(he_cv, out);
-      out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
-          << std::endl;
-      out << "          (void *)right_child: " << (void*)(&(curr.right_child()))
-          << std::endl;
-      print_dag_addresses_rec(curr.left_child(), level+1, out);
-      print_dag_addresses_rec(curr.right_child(), level+1, out);
-      return;
-    }
-    else
-    {
-      // if ithe map item represents a trapezoid
-      if (traits->is_active(item))
-        out << " TRAPEZOID \n";
-      else //trapezoid is removed - may have a left child
-      {
-        out << " REMOVED TRAPEZOID \n";
-        if (curr.left_child().is_null())
-          return;
-        out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
-            << std::endl;
-        print_dag_addresses_rec(curr.left_child(), level+1, out);
-      }
-    }
-  }
-
-public: 
-  void print_dag(std::ostream& out) const
-  {
-    
-    out << "----------------- DAG ----------------" << std::endl
-        << "--------------------------------------" << std::endl;
-    
-    print_dag_addresses_rec(*m_dag_root , 0, out);
-    out << "----------------- END OF DAG ----------------" << std::endl
-        << "---------------------------------------------" << std::endl;
-    
-  }
-
-protected:
-  double m_depth_threshold;
-  double m_size_threshold;
-};
-
-} //namespace CGAL
-
-#include <CGAL/Arr_point_location/Td_active_trapezoid.h>
-#include <CGAL/Arr_point_location/Td_inactive_trapezoid.h>
-#include <CGAL/Arr_point_location/Td_active_edge.h>
-#include <CGAL/Arr_point_location/Td_inactive_edge.h>
-#include <CGAL/Arr_point_location/Td_active_vertex.h>
-#include <CGAL/Arr_point_location/Td_active_fictitious_vertex.h>
-#include <CGAL/Arr_point_location/Td_inactive_vertex.h>
-#include <CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h>
-
-// The member-function definitions can be found under:
-#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h>
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
deleted file mode 100644
index 4502e79..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
+++ /dev/null
@@ -1,3110 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: svn+ssh://balasmic@scm.gforge.inria.fr/svn/cgal/trunk/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h $
-// $Id: Arr_trapezoid_ric_pl_impl.h 56667 2010-06-09 07:37:13Z sloriot $
-//
-//
-// Author(s)     : Michal Balas   <balasmic at post.tau.ac.il>
-//                based on the methods implemented in Trapezoidal_decomposition.h by Oren Nechushtan
-
-#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_FUNCTIONS_H
-#define CGAL_TRAPEZOIDAL_DECOMPOSITION_FUNCTIONS_H
-
-/*! \file
-* Member-function definitions for the Trapezoidal_decomposition_2<Traits>
-* class.
-*/
-
-#include <algorithm>
-
-#include <CGAL/assertions.h>
-#include <CGAL/use.h>
-
-namespace CGAL {
-
-//-----------------------------------------------------------------------------
-// Description:
-//  splits the trapezoid with vertical line through v
-//  assuming that he_bottom_ray_shoot & he_top_ray_shoot are in the
-//  desired direction, such that v is their source
-// Precondition:
-//  The trapezoid is active and contains v in its closure
-//
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Dag_node &
-Trapezoidal_decomposition_2<Td_traits>
-::split_trapezoid_by_vertex(Dag_node& split_node,
-                            Vertex_const_handle v,
-                            Halfedge_const_handle he)
-{
-  CGAL_precondition(!split_node.is_null());
-  if (split_node.is_null())  return split_node;
-
-
-  Td_map_item curr_item (split_node.get_data());
-  CGAL_precondition(traits->is_active(curr_item));
-
-  Dag_node left_node, right_node;
-
-  if (traits->is_td_trapezoid(curr_item))
-  {
-    Td_active_trapezoid& tr (boost::get<Td_active_trapezoid>(curr_item));
-
-    CGAL_warning(traits->is_in_closure(tr, traits->vtx_to_ce(v)));
-
-    left_node.set_data(Td_active_trapezoid
-                        (tr.left(), v, tr.bottom(), tr.top()));
-
-    right_node.set_data(Td_active_trapezoid
-                        (v, tr.right(), tr.bottom(), tr.top()));
-
-    Td_active_trapezoid& left_tr  (boost::get<Td_active_trapezoid>(left_node.get_data()));
-    Td_active_trapezoid& right_tr (boost::get<Td_active_trapezoid>(right_node.get_data()));
-
-    CGAL_warning(traits->is_trapezoids_top_equal(left_tr,right_tr));
-    CGAL_warning(traits->is_trapezoids_bottom_equal(left_tr,right_tr));
-    CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary());
-    CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary());
-
-    left_tr.init_neighbours(tr.lb(),tr.lt(),right_node.get_data(),right_node.get_data());
-    right_tr.init_neighbours(left_node.get_data(),left_node.get_data(),tr.rb(),tr.rt());
-    if (!traits->is_empty_item(tr.lb()))
-    {
-      Td_active_trapezoid& lb(boost::get<Td_active_trapezoid>(tr.lb()));
-      lb.set_rb(left_node.get_data());
-    }
-    if (!traits->is_empty_item(tr.lt()))
-    {
-      Td_active_trapezoid& lt(boost::get<Td_active_trapezoid>(tr.lt()));
-      lt.set_rt(left_node.get_data());
-    }
-    if (!traits->is_empty_item(tr.rb()))
-    {
-      Td_active_trapezoid& rb(boost::get<Td_active_trapezoid>(tr.rb()));
-      rb.set_lb(right_node.get_data());
-    }
-    if (!traits->is_empty_item(tr.rt()))
-    {
-      Td_active_trapezoid& rt(boost::get<Td_active_trapezoid>(tr.rt()));
-      rt.set_lt(right_node.get_data());
-    }
-
-  }
-  else //if the curr_item is an edge
-  {
-    Td_active_edge& e (boost::get<Td_active_edge>(curr_item));
-
-    CGAL_warning(traits->is_in_closure(e, traits->vtx_to_ce(v)));
-
-    left_node.set_data(Td_active_edge(e.halfedge()));
-
-    right_node.set_data(Td_active_edge(e.halfedge()));
-
-    Td_active_edge& left_e  (boost::get<Td_active_edge>(left_node.get_data()));
-    Td_active_edge& right_e (boost::get<Td_active_edge>(right_node.get_data()));
-
-    //CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary());
-    //CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary());
-
-    left_e.init_neighbours(boost::none);//left_e.init_neighbours(e.lb(),e.lt(),Td_map_item(),right_node.get_data());
-    right_e.init_neighbours(e.next());//right_e.init_neighbours(left_node.get_data(),left_node.get_data(),e.rb(),e.rt());
-
-  }
-
-  // left and right are set to the point itself,
-  // bottom and top are set to the ray shooting resulting curves at this
-  // stage.
-  //need to define the boundaries flag before creating the trapezoid
-  Td_map_item vtx_item (build_vertex_map_item(v, he, &split_node));
-  split_node.replace( vtx_item, left_node, right_node); //nodes depth are updated here
-  update_largest_leaf_depth( (std::max)(left_node.depth(), right_node.depth()) );
-  m_number_of_dag_nodes += 2;
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-  if (last_cv == curr_item)
-    last_cv = vtx_item;
-  if (prev_cv == curr_item)
-    prev_cv = vtx_item;
-#endif
-
-  const Dag_node* left_ptr  = &split_node.left_child();
-  const Dag_node* right_ptr = &split_node.right_child();
-
-  boost::apply_visitor(set_dag_node_visitor((Dag_node*)left_ptr),left_ptr->get_data()); //(*left_ptr)->set_dag_node((Dag_node*)left_ptr);
-  boost::apply_visitor(set_dag_node_visitor((Dag_node*)right_ptr),right_ptr->get_data()); //(*right_ptr)->set_dag_node((Dag_node*)right_ptr);
-
-  //print_dag_addresses(*m_dag_root);
-
-  return split_node;
-}
-
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item
-Trapezoidal_decomposition_2<Td_traits>
-::build_vertex_map_item(Vertex_const_handle v,
-                        Halfedge_const_handle he,
-                        Dag_node* node)
-{
-  Curve_end ce(traits->vtx_to_ce(v));
-  if ((traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce()) == ARR_INTERIOR)
-      && (traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce()) == ARR_INTERIOR))
-  {
-    Td_active_vertex vtx (v, he, node);
-    return vtx;
-  }
-  else
-  {
-    Td_active_fictitious_vertex vtx (v, he, node);
-    return vtx;
-  }
-}
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//  the opposite operation for spliting the trapezoid with
-//  vertical line through ce
-// Precondition:
-//  tr_node data is a td vertex and is active
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::undo_split_trapezoid_by_vertex(Dag_node& tr_node, const Curve_end& ce)
-{
-  CGAL_precondition(!tr_node.is_null());
-  Td_map_item item = tr_node.get_data();
-  CGAL_precondition(traits->is_active(item));
-  CGAL_precondition(traits->is_td_vertex(item));
-
-  //get the ds left child and right child nodes of
-  //    tr_node (in the search structure)
-  Dag_node tr_left_node  = tr_node.left_child();
-  Dag_node tr_right_node = tr_node.right_child();
-
-  //advances the ds nodes until ce is found
-  search_using_dag(tr_left_node,  traits, ce, m_empty_he_handle);
-  search_using_dag(tr_right_node, traits, ce, m_empty_he_handle);
-
-  //make sure the trapezoids are active before merging them
-  //CGAL_assertion(traits->is_active(tr_left_node.get_data()) && traits->is_active(tr_right_node.get_data()));
-
-  // bool mrg_res =
-  merge_if_possible(tr_left_node.get_data(), tr_right_node.get_data());
-
-  CGAL_warning(!tr_left_node.is_inner_node());
-  CGAL_warning(!tr_right_node.is_inner_node());
-
-
-  deactivate_trapezoid( tr_right_node, &tr_left_node); //tr_right_node->remove(&tr_left_node);
-  update_largest_leaf_depth( tr_left_node.depth()); //tr_left_node is not an inner node
-  // mark root as deleted
-  deactivate_vertex(tr_node); //tr_node->remove();
-  //no need to update m_number_of_dag_nodes because the number of nodes did not change.
-  // removed nodes were only marked as removed
-}
-
-
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::deactivate_trapezoid (Dag_node& trpz_node, Dag_node* active_node) const
-{
-  CGAL_precondition(traits->is_active(trpz_node.get_data()));
-  CGAL_precondition(traits->is_td_trapezoid(trpz_node.get_data()));
-  trpz_node.set_data(Td_inactive_trapezoid());
-  if (active_node)
-    trpz_node.set_left_child(*active_node);
-}
-
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::deactivate_vertex (Dag_node& vtx_node) const
-{
-  CGAL_precondition(traits->is_active(vtx_node.get_data()));
-  CGAL_precondition(traits->is_td_vertex(vtx_node.get_data()));
-  if (traits->is_fictitious_vertex(vtx_node.get_data()))
-  {
-    Td_active_fictitious_vertex& v(boost::get<Td_active_fictitious_vertex>(vtx_node.get_data()));
-    vtx_node.set_data(Td_inactive_fictitious_vertex(v.vertex(), &vtx_node));
-  }
-  else
-  {
-    Td_active_vertex& v(boost::get<Td_active_vertex>(vtx_node.get_data()));
-    vtx_node.set_data(Td_inactive_vertex(v.vertex(), &vtx_node));
-  }
-}
-
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::deactivate_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const
-{
-  CGAL_precondition(traits->is_active(edge_node.get_data()));
-  CGAL_precondition(traits->is_td_edge(edge_node.get_data()));
-
-  edge_node.set_data(Td_inactive_edge(cv, &edge_node));
-}
-
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//  splits the trapezoid that corresponds to the root of the
-//  trapezoidal tree with an input halfedge he
-// Precondition:
-//  The root trapezoid is active
-//  The root trapezoid is devided by he or is equal to it and is vertical.
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Dag_node &
-Trapezoidal_decomposition_2<Td_traits>
-::split_trapezoid_by_halfedge(Dag_node& split_node,
-                              Td_map_item& prev_e,
-                              Td_map_item& prev_bottom_tr,
-                              Td_map_item& prev_top_tr,
-                              Halfedge_const_handle he)
-{
-
-  CGAL_warning(traits != NULL);
-  CGAL_precondition(traits->is_active(split_node.get_data()));
-  CGAL_precondition(traits->is_td_trapezoid(split_node.get_data()));
-
-  Td_map_item curr_item (split_node.get_data());
-  Td_active_trapezoid& split_tr = boost::get<Td_active_trapezoid>(curr_item);
-
-  // sets left and right according to td_edge's source and target positions
-  // sets bottom and top to Halfedge itself
-  // no need to set the boundaries since its irrelevant for this trapezoid
-  //   type (TD_EDGE)
-  Td_active_edge sep(he, &split_node);
-
-
-  //creates a one-way path for all the td edges
-  //that represent the Halfedge.
-  //rb() is used to retrieve the
-  //next on path information
-
-  Dag_node top_node(Td_active_trapezoid
-                        (split_tr.left(), split_tr.right(), he, split_tr.top()));
-                         //Td_active_trapezoid::TD_TRAPEZOID,
-                         //split_tr.on_boundaries_flag() &
-                         // (CGAL_TD_ON_LEFT_BOUNDARY  |
-                         //  CGAL_TD_ON_RIGHT_BOUNDARY |
-                         //  CGAL_TD_ON_TOP_BOUNDARY  )));
-  Dag_node bottom_node(Td_active_trapezoid
-                        (split_tr.left(),split_tr.right(), split_tr.bottom(), he));
-                         //Td_active_trapezoid::TD_TRAPEZOID,
-                         //split_tr.on_boundaries_flag() &
-                         // (CGAL_TD_ON_LEFT_BOUNDARY  |
-                         //  CGAL_TD_ON_RIGHT_BOUNDARY |
-                         //  CGAL_TD_ON_BOTTOM_BOUNDARY )));
-
-  Td_active_trapezoid& bottom = boost::get<Td_active_trapezoid>(bottom_node.get_data());
-  Td_active_trapezoid& top    = boost::get<Td_active_trapezoid>(top_node.get_data());
-
-  top.init_neighbours(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt());
-  bottom.init_neighbours(split_tr.lb(), prev_bottom_tr, split_tr.rb(), boost::none);
-
-  if (!traits->is_empty_item(prev_bottom_tr))
-  {
-    Td_active_trapezoid& prev_btm (boost::get<Td_active_trapezoid>(prev_bottom_tr));
-    prev_btm.set_rt(bottom_node.get_data());
-  }
-  if (!traits->is_empty_item(prev_top_tr))
-  {
-    Td_active_trapezoid& prev_top (boost::get<Td_active_trapezoid>(prev_top_tr));
-    prev_top.set_rb(top_node.get_data());
-  }
-  if (!traits->is_empty_item(split_tr.lb()))
-  {
-    Td_active_trapezoid& lb (boost::get<Td_active_trapezoid>(split_tr.lb()));
-    lb.set_rb(bottom_node.get_data());
-  }
-  if (!traits->is_empty_item(split_tr.lt()))
-  {
-    Td_active_trapezoid& lt (boost::get<Td_active_trapezoid>(split_tr.lt()));
-    lt.set_rt(top_node.get_data());
-  }
-  if (!traits->is_empty_item(split_tr.rb()))
-  {
-    Td_active_trapezoid& rb (boost::get<Td_active_trapezoid>(split_tr.rb()));
-    rb.set_lb(bottom_node.get_data());
-  }
-  if (!traits->is_empty_item(split_tr.rt()))
-  {
-    Td_active_trapezoid& rt (boost::get<Td_active_trapezoid>(split_tr.rt()));
-    rt.set_lt(top_node.get_data());
-  }
-  split_node.replace(sep,bottom_node,top_node); //nodes depth are updated here
-  update_largest_leaf_depth( (std::max)(bottom_node.depth(), top_node.depth()) );
-  m_number_of_dag_nodes += 2; //two new nodes were added to the DAG
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-  if (last_cv == curr_item)
-    last_cv = sep;
-  if (prev_cv == curr_item)
-    prev_cv = sep;
-#endif
-
-  const Dag_node* bottomPtr = &split_node.left_child();
-  const Dag_node* topPtr    = &split_node.right_child();
-
-  boost::apply_visitor(set_dag_node_visitor((Dag_node*)bottomPtr),
-                       bottomPtr->get_data());
-  boost::apply_visitor(set_dag_node_visitor((Dag_node*)topPtr),
-                       topPtr->get_data());
-
-  // Td_active_edge& new_e = boost::get<Td_active_edge>(split_node.get_data());
-  if (!traits->is_empty_item(prev_e))
-  {
-    Td_active_edge& e ( boost::get<Td_active_edge>(prev_e));
-    e.set_next(split_node.get_data());
-  }
-  //update these trapezoids pointers.
-  // will be used for the next trapezoid that should be split
-  //  by this Halfedge
-  prev_bottom_tr = bottomPtr->get_data(); //(*bottomPtr).operator->();
-  prev_top_tr    = topPtr->get_data(); //(*topPtr).operator->();
-  prev_e         = split_node.get_data(); //tt.operator->();
-
-  return split_node;
-}
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//  update
-//   tr.bottom()
-//   vertical_ray_shoot downward from tr
-//   tr.top()
-//    vertical_ray_shoot upward from tr
-//  update all the curves incident to the vertex that there's a new curve
-//  starting from this vertex
-//  this point must be an interior point and not a point on the boundaries,
-//  since a point on the boundaries is related to one curve only
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item &
-Trapezoidal_decomposition_2<Td_traits>
-::update_vtx_with_new_edge(Halfedge_const_handle he,
-                           const Curve_end& ce,
-                           Td_map_item& vtx_item,
-                           const Locate_type&
-                              CGAL_precondition_code(lt))
-{
-  CGAL_assertion(traits != NULL);
-  CGAL_precondition(lt == POINT);
-  CGAL_precondition(traits->is_active(vtx_item));
-
-  //ee is interior
-  CGAL_assertion((traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce())
-                                                          == ARR_INTERIOR) &&
-                 (traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce())
-                                                          == ARR_INTERIOR) );
-  //the underlying point of ce
-  const Point& p = (ce.ce() == ARR_MIN_END) ?
-                    traits->construct_min_vertex_2_object()(ce.cv()) :
-                    traits->construct_max_vertex_2_object()(ce.cv()) ;
-
-  //set cw to hold the halfedge whose source is p,
-  // which is clockwise "smallest" starting from top (12 o'clock)
-  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
-  if (traits->compare_cw_around_point_2_object()
-      (he->curve(), is_edge_to_right(he,p),
-       cw_he->curve(),
-       is_edge_to_right(cw_he,p), p) == SMALLER)
-  {
-    boost::apply_visitor(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he);
-  }
-
-  return vtx_item;
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item &
-Trapezoidal_decomposition_2<Td_traits>
-::insert_curve_at_vtx_using_dag (Halfedge_const_handle he,
-                                   Vertex_const_handle v,
-                                   Td_map_item& item,
-                                   const Locate_type&
-                                   CGAL_precondition_code(lt))
-{
-  CGAL_precondition(lt==TRAPEZOID || lt==UNBOUNDED_TRAPEZOID);
-
-  Dag_node* node = boost::apply_visitor(dag_node_visitor(), item);
-
-  CGAL_assertion(node != NULL);
-  CGAL_assertion (he != m_empty_he_handle);
-
-
-  //we need to use the halfedge whose source is v. //MICHAL: do we have to?
-  if (he->source() == v)
- // if ((ce_pair.second == ARR_MIN_END && he->direction() == ARR_LEFT_TO_RIGHT) ||
- //     (ce_pair.second == ARR_MAX_END && he->direction() == ARR_RIGHT_TO_LEFT)  )
-  {
-    return *split_trapezoid_by_vertex(*node, v, he);
-  }
-  else
-  {
-    return *split_trapezoid_by_vertex(*node, v, he->twin());
-  }
-}
-
-////-----------------------------------------------------------------------------
-//// Description:
-//template <class Td_traits>
-//void Trapezoidal_decomposition_2<Td_traits>
-//::set_trp_params_after_halfedge_update(Halfedge_const_handle old_he,
-//                                       Halfedge_const_handle new_he,
-//                                       Td_map_item& vtx_item)
-//{
-//  CGAL_precondition(old_he != m_empty_he_handle);
-//  CGAL_precondition(traits->is_td_vertex(vtx_item));
-//  CGAL_precondition(traits->is_active(vtx_item));
-//
-//  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
-//
-//  //make sure the cw_he is added in same direction as before
-//  //  such that vtx_item is the source (done inside the set methods)
-//  if (cw_he == old_he || cw_he->twin() == old_he)
-//  {
-//    boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item);
-//  }
-//}
-
-//-----------------------------------------------------------------------------
-// Description:
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::update_vtx_cw_he_after_merge (const X_monotone_curve_2& old_cv,
-                                Halfedge_const_handle new_he,
-                                Td_map_item& vtx_item)
-{
-  CGAL_precondition(traits->is_td_vertex(vtx_item));
-  CGAL_precondition(traits->is_active(vtx_item));
-
-  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
-
-  //make sure the cw_he is added in same direction as before
-  //  such that v_tr is the source (done inside the set methods)
-  if (traits->equal_2_object()(cw_he->curve(), old_cv))
-  {
-    boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item);
-  }
-}
-
-////MICHAL: currently not in use since split is implemented as removed and insert two
-////         in case the split is done differenty - this method would have to be rewritten since it is obsolete
-//template <class Td_traits>
-//void Trapezoidal_decomposition_2<Td_traits>
-//::set_trp_params_after_split_halfedge_update(Halfedge_const_handle new_he,
-//                                            Td_map_item& vtx_item,
-//                                            Halfedge_const_handle he1,
-//                                            Halfedge_const_handle he2)
-//{
-//  CGAL_precondition(traits->is_td_vertex(vtx_item));
-//  CGAL_precondition(traits->is_active(vtx_item));
-//
-//  Halfedge_const_handle top_he (boost::apply_visitor(top_he_visitor(), vtx_item));
-//  Halfedge_const_handle bottom_he (boost::apply_visitor(bottom_he_visitor(), vtx_item));
-//
-//  //make sure the top & bottom are added in same direction as before
-//  //  such that sep is the source (done inside the set methods)
-//  if ((top_he == he1) || (top_he == he1->twin()) ||
-//      (top_he == he2) || (top_he == he2->twin()) )
-//  {
-//     boost::apply_visitor(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he);
-//  }
-//  if ((bottom_he == he1) || (bottom_he == he1->twin()) ||
-//      (bottom_he == he2) || (bottom_he == he2->twin()) )
-//  {
-//    boost::apply_visitor(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he);
-//  }
-//}
-
-//-----------------------------------------------------------------------------
-// Description:
-//  update geometric boundary(top and bottom) for trapezoids
-//  traveled along an iterator till end reached
-//  precondition:
-//  end==0 or end is on the path of the iterator
-// postcondition:
-//  end is pointer to the last trapezoid encountered,if any
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::update_map_items_after_merge (In_face_iterator& it,
-                                Halfedge_const_handle old_he,
-                                Halfedge_const_handle new_he,
-                                Vertex_const_handle /* min_v */,
-                                Vertex_const_handle /* max_v */,
-                                Td_map_item& end)
-{
-  Td_map_item last_item = Td_map_item(0);
-
-  while (!!it && !(*it == end))
-  {
-    Td_map_item curr_item = *it;
-    CGAL_assertion(traits->is_active(curr_item));
-
-    if (traits->is_td_edge(curr_item))
-    {
-      Td_active_edge& e(boost::get<Td_active_edge>(curr_item));
-      if (e.halfedge() == old_he || e.halfedge() == old_he->twin())
-        e.set_halfedge(new_he);
-    }
-    else if (traits->is_td_trapezoid(curr_item))
-    {
-      Td_active_trapezoid& tr(boost::get<Td_active_trapezoid>(curr_item));
-      if (tr.bottom() == old_he || tr.bottom() == old_he->twin())
-        tr.set_bottom(new_he);
-      if (tr.top() == old_he || tr.top() == old_he->twin())
-        tr.set_top(new_he);
-    }
-    else //if is_td_vertex
-    {
-      Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), curr_item));
-      if (cw_he == old_he || cw_he == old_he->twin())
-        boost::apply_visitor(set_cw_he_visitor(new_he), curr_item);
-    }
-
-    last_item = *it;
-    ++it;
-  }
-  end = last_item;
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-//  advances input Data structure using data structure,input point p and
-//  possibly Halfedge p_he till
-//  p is found(if p_he hadn't been given)
-//  p_he is found(if p_he was given)
-//  or
-//  leaf node reached
-// postcondition:
-//  output is the closest active trapezoid to ce/p_he
-// remark:
-//  use this function with care!
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
-Trapezoidal_decomposition_2<Td_traits>
-::search_using_dag (Dag_node& curr_node,
-                    const Traits* traits,
-                    const Point& p,
-                    Halfedge_const_handle he,
-                    Comparison_result up /*=EQUAL*/) const
-{
-
-  while(true)
-  {
-    //curr_node is the current pointer to node in the data structure
-    //curr_item is the curent Td_map_item held in curr_node
-    Td_map_item curr_item(curr_node.get_data());
-
-    if (traits->is_td_vertex(curr_item))
-    { // if the curr_item represents a vertex
-      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
-      //if ((is_fict_vtx  && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
-      //    (!is_fict_vtx &&  is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) )
-      if (is_end_point_left_low(p, curr_node))
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      //else if ((is_fict_vtx  && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
-      //         (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) )
-      else if (is_end_point_right_top(p, curr_node))
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      //else if ((is_fict_vtx  && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
-      //         (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
-      else if (are_equal_end_points(p, curr_node))
-      {
-        if (he == m_empty_he_handle) //if he is the empty handle
-        {
-          if ( up == EQUAL )
-          {      // point found!
-            if (traits->is_active(curr_item))
-              return POINT;
-            curr_node = curr_node.left_child();
-          }
-          else if ( up == LARGER ) {          // vertical ray shut up
-            curr_node = curr_node.right_child();
-          }
-          else /*if ( up == SMALLER ) */ {
-            curr_node = curr_node.left_child();               // vertical ray shut down
-          }
-          continue;
-        }
-        else //if he was given
-        {
-          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
-                               (Curve_end(he,ARR_MIN_END), p);
-          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
-                               (Curve_end(he,ARR_MAX_END), p);
-
-          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
-          CGAL_USE(is_equal_to_he_max);
-
-          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
-          continue;
-        }
-      }
-      else
-      {
-        CGAL_assertion(is_end_point_left_low(p,curr_node) ||
-                       is_end_point_right_top(p,curr_node) ||
-                       are_equal_end_points(p,curr_node));
-
-                    //(is_fict_vtx &&
-                    //  (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-                    //   is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-                    //   traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) ||
-                    // (!is_fict_vtx &&
-                    //  (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-                    //   is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-                    //   traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p))));
-
-        return Locate_type();
-      }
-    }
-    if (traits->is_td_edge(curr_item))
-    { // if curr_item represents an edge,
-      //   so top() is a real Halfedge with a curve() if curr_item is active
-      //   or curr_item holds the curve if it is not active
-      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
-
-      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
-      if (cres == SMALLER)
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      else if (cres == LARGER)
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      else
-      {
-        // p is on the curve itself
-         CGAL_warning(
-          (cres == EQUAL) &&
-          (traits->compare_curve_end_x_2_object()
-                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
-          (traits->compare_curve_end_x_2_object()
-                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
-
-        if (he == m_empty_he_handle) //if he was not given
-        {
-          // For a vertical curve, we always visit it after visiting
-          // one of its endpoints.
-          if ((up == EQUAL) || traits->is_vertical(curr_item))
-          {
-            if (traits->is_active(curr_item))
-              return CURVE;
-            curr_node = curr_node.left_child();
-          }
-          else if (up == LARGER)
-          {
-            curr_node = curr_node.right_child();
-          }
-          else
-          { // if (up==SMALLER)
-            curr_node = curr_node.left_child();
-          }
-          continue;
-        }
-        else //if he was given
-        {
-          //p is a parameter space interior point
-          bool is_min_equal = traits->equal_curve_end_2_object()
-                                      (Curve_end(he,ARR_MIN_END),
-                                       Curve_end(he_cv,ARR_MIN_END));
-
-          bool is_max_equal = traits->equal_curve_end_2_object()
-                                      (Curve_end(he,ARR_MAX_END),
-                                       Curve_end(he_cv,ARR_MAX_END));
-
-          CGAL_warning (is_min_equal || is_max_equal);
-          CGAL_USE(is_max_equal);
-
-          Comparison_result res =
-             is_min_equal ?
-              traits->compare_cw_around_point_2_object()
-                       (he_cv, is_curve_to_right(he_cv,p),
-                        he->curve(), is_edge_to_right(he,p), p) :
-              traits->compare_cw_around_point_2_object()
-                       (he->curve(), is_edge_to_right(he,p),
-                        he_cv, is_curve_to_right(he_cv,p), p ,false);
-
-          switch(res)
-          {
-           case LARGER:
-            curr_node = curr_node.right_child();
-            break;
-           case SMALLER:
-            curr_node = curr_node.left_child();
-            break;
-           case EQUAL:
-            switch(up)
-            {
-             case LARGER:
-              curr_node = curr_node.right_child();
-              break;
-             case SMALLER:
-              curr_node = curr_node.left_child();
-              break;
-             case EQUAL:
-              if (traits->is_active(curr_item))
-                return CURVE;
-              curr_node = curr_node.left_child();
-              break;
-            }
-            break;
-          }
-        }
-      }
-    }
-    else
-    {
-      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
-      if (traits->is_active(curr_item))
-      {
-        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
-        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
-      }
-      curr_node = curr_node.left_child();
-      continue;
-    }
-  }
-}
-
-
-
-////-----------------------------------------------------------------------------
-//// Description:
-////  advances input Data structure using data structure,input point p and
-////  possibly Halfedge p_he till
-////  p is found(if p_he hadn't been given)
-////  p_he is found(if p_he was given)
-////  or
-////  leaf node reached
-//// postcondition:
-////  output is the closest active trapezoid to ce/p_he
-//// remark:
-////  use this function with care!
-//template <class Td_traits>
-//void
-//Trapezoidal_decomposition_2<Td_traits>
-//::search_and_print_using_dag (std::ostream& out,
-//                              Dag_node& curr_node,
-//                              const Traits* traits,
-//                              const Point& p,
-//                              Halfedge_const_handle he,
-//                              Comparison_result up /*=EQUAL*/) const
-//{
-//  out << "QUERY: " << std::endl;
-//  out << "x: " << CGAL::to_double(p.x())
-//      << ", y: " << CGAL::to_double(p.y()) << std::endl;
-//
-//
-//
-//  while(true)
-//  {
-//    //curr_node is the current pointer to node in the data structure
-//    //curr_item is the curent Td_map_item held in curr_node
-//    Td_map_item curr_item(curr_node.get_data());
-//
-//    if (traits->is_td_vertex(curr_item))
-//    {
-//      // if the map item represents a vertex
-//
-//      out << " VERTEX : " ;
-//      if (traits->is_active(curr_item))
-//        out << " (active) ";
-//      else
-//        out << " (inactive) ";
-//
-//      // if the curr_item represents a vertex
-//      bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
-//      if (is_fict_vtx)
-//      {
-//        Curve_end vtx_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)));
-//        print_ce_data(vtx_ce.cv(), vtx_ce.ce(), out);
-//      }
-//      else
-//      {
-//        print_point_data(boost::apply_visitor(point_for_vertex_visitor(),curr_item), out);
-//      }
-//
-//      if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
-//        (!is_fict_vtx &&  is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) )
-//      {
-//        out << " Going left " << std::endl;
-//        curr_node = curr_node.left_child();
-//        continue;
-//      }
-//      else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
-//               (!is_fict_vtx &&  is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) )
-//      {
-//        out << " Going right " << std::endl;
-//        curr_node = curr_node.right_child();
-//        continue;
-//      }
-//      else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
-//               (!is_fict_vtx &&  traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(),curr_item), p)) )
-//      {
-//        out << " Equal to query " << std::endl;
-//        if (he == m_empty_he_handle) //if he is the empty handle
-//        {
-//          if ( up == EQUAL )
-//          {      // point found!
-//            if (traits->is_active(curr_item))
-//            {
-//              out << " Found active point! " << std::endl;
-//              return;
-//            }
-//            out << " (equal to inactive point) Going left " << std::endl;
-//            curr_node = curr_node.left_child();
-//          }
-//          else if ( up == LARGER )
-//          {          // vertical ray shut up
-//            out << " Going right " << std::endl;
-//            curr_node = curr_node.right_child();
-//          }
-//          else //if ( up == SMALLER )
-//          {       // vertical ray shut down
-//            out << " Going left " << std::endl;
-//            curr_node = curr_node.left_child();
-//          }
-//          continue;
-//        }
-//        else //if he was given
-//        {
-//          //NOT GONNA HAPPEN
-//        }
-//      }
-//      else
-//      {
-//        out << " Problem - comparing to point" << std::endl;
-//        return;
-//      }
-//    }
-//    if (traits->is_td_edge(curr_item))
-//    {
-//      // if curr_item represents an edge,
-//      //   so top() is a real Halfedge with a curve() if curr_item is active
-//      //   or curr_item holds the curve if it is not active
-//      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
-//
-//      out << " EDGE : " ;
-//      if (traits->is_active(curr_item))
-//      {
-//        out << " (active) ";
-//        if (traits->is_vertical(curr_item))
-//          out << " (vertical) ";
-//      }
-//      else
-//        out << " (inactive) ";
-//
-//      print_cv_data(he_cv, out);
-//
-//      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
-//      if (cres == SMALLER)
-//      {
-//        out << " Going left " << std::endl;
-//        curr_node = curr_node.left_child();
-//        continue;
-//      }
-//      else if (cres == LARGER)
-//      {
-//        out << " Going right " << std::endl;
-//        curr_node = curr_node.right_child();
-//        continue;
-//      }
-//      else
-//      {
-//        // p is on the CURVE (top_he = curr.top()) itself
-//        out << " query is on the curve " << std::endl;
-//
-//        CGAL_assertion(
-//          (cres == EQUAL) &&
-//          (traits->compare_curve_end_x_2_object()
-//                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
-//          (traits->compare_curve_end_x_2_object()
-//                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
-//        if (he == m_empty_he_handle) //if he was not given
-//        {
-//          // For a vertical curve, we always visit it after visiting
-//          // one of its endpoints.
-//          if ((up == EQUAL) || traits->is_vertical(curr_item))
-//          {
-//            if (traits->is_active(curr_item))
-//            {
-//              out << " On active curve " << std::endl;
-//              return;
-//            }
-//            out << " (equal to inactive curve) Going left " << std::endl;
-//            curr_node = curr_node.left_child();
-//          }
-//          else if (up == LARGER) {
-//            out << " Going right " << std::endl;
-//            curr_node = curr_node.right_child();
-//          }
-//          else { // if (up==SMALLER)
-//            out << " Going left " << std::endl;
-//            curr_node = curr_node.left_child();
-//          }
-//          continue;
-//        }
-//        else //if he was given
-//        {
-//          //NOT GONNA HAPPEN
-//        }
-//      }
-//    }
-//    else
-//    {
-//      // if item represents a trapezoid
-//      out << " TRAPEZOID : " ;
-//      if (traits->is_active(curr_item))
-//      {
-//        out << " (active) ";
-//        Td_active_trapezoid tr =  boost::get<Td_active_trapezoid>(curr_item);
-//        if (tr.is_on_boundaries())
-//          out << " UNBOUNDED! ";
-//        else
-//          out << " BOUNDED! ";
-//        return;
-//      }
-//      else
-//        out << " (inactive) ";
-//      out << " (on inactive trapezoid) Going left " << std::endl;
-//      curr_node = curr_node.left_child();
-//      continue;
-//    }
-//  }
-//}
-
-//-----------------------------------------------------------------------------
-// Description:
-//  advances input Data structure using data structure,input point ce and
-//  possibly Halfedge p_he till
-//  ce is found(if p_he hadn't been given)
-//  p_he is found(if p_he was given)
-//  or
-//  leaf node reached
-// postcondition:
-//  output is the closest active trapezoid to ce/p_he
-// remark:
-//  use this function with care!
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
-Trapezoidal_decomposition_2<Td_traits>
-::search_using_dag (Dag_node& curr_node,
-                    const Traits* traits,
-                    const Curve_end& ce,
-                    Halfedge_const_handle he,
-                    Comparison_result up /*=EQUAL*/) const
-{
-  if (he == m_empty_he_handle)
-    return search_using_dag_with_cv (curr_node,traits,ce,NULL, up);
-  else
-    return search_using_dag_with_cv (curr_node,traits,ce,&he->curve(), up);
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-//  advances input Data structure using data structure,input point ce and
-//  possibly X_monotone_curve_2 p_cv till
-//  ce is found(if p_cv hadn't been given)
-//  p_cv is found(if p_cv was given)
-//  or
-//  leaf node reached
-// postcondition:
-//  output is the closest active trapezoid to ce/p_cv
-// remark:
-//  use this function with care!
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
-Trapezoidal_decomposition_2<Td_traits>
-::search_using_dag_with_cv (Dag_node& curr_node,
-                            const Traits* traits,
-                            const Curve_end& ce,
-                            const X_monotone_curve_2* p_cv,
-                            Comparison_result up /*=EQUAL*/) const
-{
-  while(true)
-  {
-    //curr_node is the current pointer to node in the data structure
-    //curr_item is the curent Td_map_item held in curr_node
-    Td_map_item curr_item(curr_node.get_data());
-
-    if (traits->is_td_vertex(curr_item))
-    { // if the curr_item represents a vertex
-      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
-      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
-      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
-      if (is_end_point_left_low(ce, curr_node))
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      //else if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
-      //         (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
-      else if (is_end_point_right_top(ce, curr_node))
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
-      //         (!is_fict_vtx &&  traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
-      else if (are_equal_end_points(ce, curr_node))
-      {
-        if (!p_cv) //if p_cv was not given
-        {
-          if ( up == EQUAL )
-          {      // point found!
-            if (traits->is_active(curr_item))
-              return POINT;
-            curr_node = curr_node.left_child();
-          }
-          else if ( up == LARGER )
-          {          // vertical ray shut up
-            curr_node = curr_node.right_child();
-          }
-          else
-          { // if ( up == SMALLER )
-            curr_node = curr_node.left_child();               // vertical ray shut down
-          }
-          continue;
-        }
-        else //if p_cv was given
-        {
-          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
-                               (Curve_end(*p_cv,ARR_MIN_END), ce);
-          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
-                               (Curve_end(*p_cv,ARR_MAX_END), ce);
-
-          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
-          CGAL_USE(is_equal_to_he_max);
-
-          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
-
-          continue;
-        }
-      }
-      else
-      {
-        CGAL_assertion(is_end_point_left_low(ce, curr_node) ||
-                       is_end_point_right_top(ce, curr_node) ||
-                       are_equal_end_points(ce, curr_node));
-          //(is_fict_vtx &&
-          //            (is_end_point_left_low(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-          //             is_end_point_right_top(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-          //             traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) ||
-          //           (!is_fict_vtx &&
-          //            (is_end_point_left_low(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-          //             is_end_point_right_top(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-          //             traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),ce))));
-        return Locate_type();
-      }
-    }
-    if (traits->is_td_edge(curr_item))
-    { // if curr_item represents an edge,
-      //   so top() is a real Halfedge with a curve() if curr_item is active
-      //   or curr_item holds the curve if it is not active
-
-      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
-      Comparison_result cres = traits->compare_curve_end_y_at_x_2_object()(ce, he_cv);
-      if (cres == SMALLER)
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      else if (cres == LARGER)
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      else
-      {
-        // ce is on the CURVE (he_cv = ce.cv()) itself
-        CGAL_warning(
-          (cres == EQUAL) &&
-          (traits->compare_curve_end_x_2_object()
-                        (ce, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
-          (traits->compare_curve_end_x_2_object()
-                        (ce, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
-
-        if (!p_cv) //if p_cv was not given
-        {
-          // For a vertical curve, we always visit it after visiting
-          // one of its endpoints.
-          if ((up == EQUAL) || traits->is_vertical(curr_item))
-          {
-            if (traits->is_active(curr_item))
-              return CURVE;
-            curr_node = curr_node.left_child();
-          }
-          else if (up == LARGER)
-          {
-            curr_node = curr_node.right_child();
-          }
-          else
-          { // if (up==SMALLER)
-            curr_node = curr_node.left_child();
-          }
-          continue;
-        }
-        else //if p_cv was given
-        {
-          Comparison_result res = EQUAL;
-
-          if ((traits->parameter_space_in_x_2_object()
-                      (ce.cv(), ce.ce()) == ARR_INTERIOR) &&
-              (traits->parameter_space_in_y_2_object()
-                      (ce.cv(), ce.ce()) == ARR_INTERIOR) )
-          {
-            //if ce is interior then there might be more than one curve
-            // with ce as its endpoint
-            bool is_min_equal = traits->equal_curve_end_2_object()
-                                      (Curve_end(*p_cv,ARR_MIN_END),
-                                       Curve_end(he_cv,ARR_MIN_END));
-
-            bool is_max_equal = traits->equal_curve_end_2_object()
-                                      (Curve_end(*p_cv,ARR_MAX_END),
-                                       Curve_end(he_cv,ARR_MAX_END));
-
-            CGAL_warning (is_min_equal || is_max_equal);
-            CGAL_USE(is_max_equal);
-
-            //the underlying point of ce
-            const Point& p = (ce.ce() == ARR_MIN_END) ?
-                           traits->construct_min_vertex_2_object()(ce.cv()) :
-                           traits->construct_max_vertex_2_object()(ce.cv()) ;
-
-            res = is_min_equal ?
-                    traits->compare_cw_around_point_2_object()
-                           (he_cv, is_curve_to_right(he_cv,p),
-                            *p_cv, is_curve_to_right(*p_cv,p), p)  :
-                    traits->compare_cw_around_point_2_object()
-                           (*p_cv, is_curve_to_right(*p_cv,p),
-                            he_cv, is_curve_to_right(he_cv,p), p ,false);
-          }
-
-          switch(res)
-          {
-           case LARGER:
-            curr_node = curr_node.right_child();
-          break;
-           case SMALLER:
-            curr_node = curr_node.left_child();
-            break;
-           case EQUAL:
-            switch(up)
-            {
-             case LARGER:
-              curr_node = curr_node.right_child();
-              break;
-             case SMALLER:
-              curr_node = curr_node.left_child();
-              break;
-             case EQUAL:
-              if (traits->is_active(curr_item))
-                return CURVE;
-              curr_node = curr_node.left_child();
-              break;
-            }
-            break;
-          }
-        }
-      }
-    }
-    else
-    {
-      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
-      if (traits->is_active(curr_item))
-      {
-        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
-        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
-      }
-      curr_node = curr_node.left_child();
-      continue;
-    }
-  }
-}
-
-
-
-
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//  advances input Data structure using data structure,input point ce and
-//  possibly X_monotone_curve_2 p_cv till
-//  ce is found(if p_cv hadn't been given)
-//  p_cv is found(if p_cv was given)
-//  or
-//  leaf node reached
-// postcondition:
-//  output is the closest active trapezoid to ce/p_cv
-// remark:
-//  use this function with care!
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
-Trapezoidal_decomposition_2<Td_traits>
-::search_using_dag_with_cv (Dag_node& curr_node,
-                            const Traits* traits,
-                            const Point& p,
-                            const X_monotone_curve_2* p_cv,
-                            Comparison_result up /*=EQUAL*/) const
-{
-
-  while(true)
-  {
-    //curr_node is the current pointer to node in the data structure
-    //curr_item is the curent Td_map_item held in curr_node
-    Td_map_item curr_item(curr_node.get_data());
-
-    if (traits->is_td_vertex(curr_item))
-    { // if the curr_item represents a vertex
-      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
-      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
-      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
-      if (is_end_point_left_low(p, curr_node))
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      //else if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
-      //         (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
-      else if (is_end_point_right_top(p, curr_node))
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
-      //         (!is_fict_vtx &&  traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
-      else if (are_equal_end_points(p, curr_node))
-      {
-        if (!p_cv) //if p_cv was not given
-        {
-          if ( up == EQUAL )
-          {      // point found!
-            if (traits->is_active(curr_item))
-              return POINT;
-            curr_node = curr_node.left_child();
-          }
-          else if ( up == LARGER )
-          {          // vertical ray shut up
-            curr_node = curr_node.right_child();
-          }
-          else
-          { // if ( up == SMALLER )
-            curr_node = curr_node.left_child();               // vertical ray shut down
-          }
-          continue;
-        }
-        else //if p_cv was given
-        {
-          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
-                               (Curve_end(*p_cv,ARR_MIN_END), p);
-          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
-                               (Curve_end(*p_cv,ARR_MAX_END), p);
-
-          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
-          CGAL_USE(is_equal_to_he_max);
-
-          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
-
-          continue;
-        }
-      }
-      else
-      {
-        CGAL_assertion(is_end_point_left_low(p, curr_node) ||
-                       is_end_point_right_top(p, curr_node) ||
-                       are_equal_end_points(p, curr_node));
-        //CGAL_assertion((is_fict_vtx &&
-        //              (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-        //               is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
-        //               traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) ||
-        //             (!is_fict_vtx &&
-        //              (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-        //               is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
-        //               traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p))));
-        return Locate_type();
-      }
-    }
-    if (traits->is_td_edge(curr_item))
-    { // if curr_item represents an edge,
-      //   so top() is a real Halfedge with a curve() if curr_item is active
-      //   or curr_item holds the curve if it is not active
-      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
-      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
-      if (cres == SMALLER)
-      {
-        curr_node = curr_node.left_child();
-        continue;
-      }
-      else if (cres == LARGER)
-      {
-        curr_node = curr_node.right_child();
-        continue;
-      }
-      else
-      {
-        // p is on the CURVE itself
-        CGAL_warning(
-          (cres == EQUAL) &&
-          (traits->compare_curve_end_x_2_object()
-                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
-          (traits->compare_curve_end_x_2_object()
-                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
-
-        if (!p_cv) //if p_cv was not given
-        {
-          // For a vertical curve, we always visit it after visiting
-          // one of its endpoints.
-          if ((up == EQUAL) || traits->is_vertical(curr_item))
-          {
-            if (traits->is_active(curr_item))
-              return CURVE;
-            curr_node = curr_node.left_child();
-          }
-          else if (up == LARGER)
-          {
-            curr_node = curr_node.right_child();
-          }
-          else
-          { // if (up==SMALLER)
-            curr_node = curr_node.left_child();
-          }
-          continue;
-        }
-        else //if p_cv was given
-        {
-          Comparison_result res = EQUAL;
-
-          //p is interior then there might be more than one curve
-          // with p as its endpoint
-          bool is_min_equal = traits->equal_curve_end_2_object()
-                                    (Curve_end(*p_cv,ARR_MIN_END),
-                                     Curve_end(he_cv,ARR_MIN_END));
-
-          bool is_max_equal = traits->equal_curve_end_2_object()
-                                    (Curve_end(*p_cv,ARR_MAX_END),
-                                     Curve_end(he_cv,ARR_MAX_END));
-
-          CGAL_warning (is_min_equal || is_max_equal);
-          CGAL_USE(is_max_equal);
-
-          res = is_min_equal ?
-                  traits->compare_cw_around_point_2_object()
-                         (he_cv, is_curve_to_right(he_cv,p),
-                          *p_cv, is_curve_to_right(*p_cv,p), p)  :
-                  traits->compare_cw_around_point_2_object()
-                           (*p_cv, is_curve_to_right(*p_cv,p),
-                            he_cv, is_curve_to_right(he_cv,p), p ,false);
-
-          switch(res)
-          {
-           case LARGER:
-            curr_node = curr_node.right_child();
-          break;
-           case SMALLER:
-            curr_node = curr_node.left_child();
-            break;
-           case EQUAL:
-            switch(up)
-            {
-             case LARGER:
-              curr_node = curr_node.right_child();
-              break;
-             case SMALLER:
-              curr_node = curr_node.left_child();
-              break;
-             case EQUAL:
-              if (traits->is_active(curr_item))
-                return CURVE;
-              curr_node = curr_node.left_child();
-              break;
-            }
-            break;
-          }
-        }
-      }
-    }
-    else
-    {
-      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
-      if (traits->is_active(curr_item))
-      {
-        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
-        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
-      }
-      curr_node = curr_node.left_child();
-      continue;
-    }
-  }
-}
-
-
-
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Dag_node
-Trapezoidal_decomposition_2<Td_traits>
-::container2dag (Nodes_map& ar, int left, int right,
-                 int& num_of_new_nodes) const
-{
-  CGAL_warning(traits != NULL);
-
-  if (right > left)
-  {
-    int d = (int)std::floor((double(right+left))/2);
-    Dag_node& node(ar.find(d)->second);
-    Td_map_item item(node.get_data());
-    CGAL_assertion(traits->is_active(item));
-    CGAL_assertion(traits->is_td_trapezoid(item));
-    Dag_node& tr_node( ar.find(d)->second);
-    Td_active_trapezoid& tr( boost::get<Td_active_trapezoid>(tr_node.get_data()));
-    Vertex_const_handle v = tr.right();
-
-    Curve_end ce(traits->vtx_to_ce(v));
-    bool is_interior = traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce())
-                      && traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce());
-
-    Dag_node curr_node;
-    Dag_node left_child  (container2dag(ar,left,d,num_of_new_nodes));
-    Dag_node right_child (container2dag(ar,d+1,right,num_of_new_nodes));
-    if (is_interior)
-    {
-      curr_node.replace(Td_map_item(Td_active_vertex(v,m_empty_he_handle)),left_child, right_child);
-    }
-    else
-    {
-      curr_node.replace(Td_map_item(Td_active_fictitious_vertex(v,m_empty_he_handle)),left_child, right_child);
-    }
-
-    num_of_new_nodes++;
-    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())),curr_node.left_child().get_data());
-    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())),curr_node.right_child().get_data());
-    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&curr_node),curr_node.get_data());
-    //curr_node.left_child()->set_dag_node(&curr_node.left_child());
-    //curr_node.right_child()->set_dag_node(&curr_node.right_child());
-    //curr_node->set_dag_node(&curr_node);// fake temporary node
-    deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted
-    boost::apply_visitor(set_dag_node_visitor((Dag_node*)NULL),curr_node.get_data());//curr_node->set_dag_node(0);
-
-    return curr_node;
-  }
-  else
-  {
-    return ar.find(left)->second;
-  }
-}
-
-template <class Td_traits>
-bool Trapezoidal_decomposition_2<Td_traits>
-::is_last_edge(Halfedge_const_handle he , Td_map_item& vtx_item)
-{
-  CGAL_precondition(traits->is_td_vertex(vtx_item));
-  CGAL_precondition(traits->is_active(vtx_item));
-
-  Vertex_const_handle v (boost::apply_visitor(vertex_for_active_vertex_visitor(), vtx_item));
-
-  typename Arrangement_on_surface_2::Halfedge_around_vertex_const_circulator first, second;
-  first = second = v->incident_halfedges();
-  ++second;
-  if (he->source() == v)
-    he = he->twin();
-  CGAL_assertion(he == first);
-  if (second == first) //if he is the only halfedge around v -> return true
-    return true;
-  return false;
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-//  if Halfedge or twin already inserted the latter is returned.
-//  otherwise the left-low most edge-degenerate trapezoid that represents the
-//  input Halfedge is returned
-// Remark:
-//  Given an edge-degenerate trapezoid representing a Halfedge,
-//  all the other trapezoids representing the Halfedge can be extracted
-//  via moving continously to the left and right neighbours.
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item
-Trapezoidal_decomposition_2<Td_traits>
-::insert(Halfedge_const_handle he) //::insert_in_face_interior(Halfedge_const_handle he)
-{
-  //print_cv_data(he->curve());
-  if (m_with_guarantees)
-    update();
-
-  // locate the input Halfedge end points in the Td_map_item Dag
-
-  CGAL_assertion(traits != NULL);
-
-  //get the two vertices of the halfedge
-  Vertex_const_handle v1 = (he->direction() == ARR_LEFT_TO_RIGHT) ? he->source() : he->target();
-  Vertex_const_handle v2 = (he->direction() == ARR_LEFT_TO_RIGHT) ? he->target() : he->source();
-
-  //define the Curve end points (curve end = vertex)
-  const Curve_end ce1(he, ARR_MIN_END); //MICHAL: to be removed?
-  const Curve_end ce2(he, ARR_MAX_END); //MICHAL: to be removed?
-
-  // make sure that the two endpoints  are not the same point
-  CGAL_precondition(!traits->equal_curve_end_2_object()(ce1, ce2));
-
-  Locate_type lt1,lt2;
-
-  //should hold the trapezoids in which the edge endpoints should be located
-  Td_map_item item1;
-  Td_map_item item2;
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-
-  locate_optimization(ce1,item1,lt1);
-
-#else
-  //location of the left endpoint of the edge we're inserting
-  item1 = locate(ce1,lt1);
-
-#endif
-
-
-  //the inserted edge should not cut any existing edge
-  if (lt1 == CURVE)
-  {
-    CGAL_precondition_msg(lt1 != CURVE, "Input is not planar as\
-      one of the input point inside previously inserted Halfedge.");
-    return Td_map_item(0);
-  }
-
-  //if the edge starts at vertex, we should not insert it into the DAG,
-  //but we should update all the edges incident to the vertex.
-  //else if this is a new vertex - insert a node to the DAG that will represent the new vertex.
-  //the incident edges in this case is only the edge itself, and so it is a trivial operation.
-  Td_map_item p1_item = (lt1 == POINT) ?
-    update_vtx_with_new_edge(he,ce1,item1,lt1) :
-    insert_curve_at_vtx_using_dag(he,v1,item1,lt1);
-
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-
-  locate_optimization(ce2,item2,lt2);
-  locate_opt_empty();
-
-#else
-  // TODO(oren): locating the second endpoint. this is not necessary,
-  // and time consuming.
-  item2 = locate(ce2,lt2);
-
-#endif
-
-  if (lt2==CURVE)
-  {
-    CGAL_precondition_msg(lt2!=CURVE,"Input is not planar as\
-      one of the input point inside previously inserted Halfedge.");
-    return Td_map_item(0);
-  }
-
-  Td_map_item p2_item = (lt2 == POINT) ?
-    update_vtx_with_new_edge(he,ce2,item2,lt2) :
-    insert_curve_at_vtx_using_dag(he,v2,item2,lt2);
-
-  // locate and insert end points of the input halfedge to the Td_map_item
-  // Dag if needed
-  Dag_node p1_node(*(boost::apply_visitor(dag_node_visitor(), p1_item)));
-  //Dag_node p2_node(*(boost::apply_visitor(dag_node_visitor(), p2_item)));// Not in use
-
-  // create the Td_map_item iterator for traveling along the Trapezoids that
-  // intersect the input Halfedge, using left-low to right-high order
-  In_face_iterator it = follow_curve(p1_node,he,LARGER);
-  boost::optional<Td_active_trapezoid> curr_trp = boost::none;
-  Td_map_item prev = p1_item;
-  Td_map_item prev_bottom_tr = Td_map_item(0); //active_tr
-  Td_map_item prev_top_tr = Td_map_item(0); //active_tr
-  Td_map_item old_e = Td_map_item(0);
-  Td_map_item old_top_tr = Td_map_item(0); //active_tr
-  Td_map_item old_bottom_tr = Td_map_item(0); //active_tr
-
-  Dag_node* node = 0;
-  bool first_time = true;
-
-  CGAL_assertion(!traits->is_empty_item(*it) && traits->is_td_trapezoid(*it));
-
-  while(!!it) //this means as long as the iterator is valid
-  {
-    curr_trp = it.trp();
-    CGAL_assertion(curr_trp != boost::none);
-    prev_bottom_tr = (*curr_trp).lb();
-    prev_top_tr = (*curr_trp).lt();
-
-    // pass using it along cv
-    it++;             //this is the logic of the iterator.
-                      // the iterator goes to the next trapezoid right-high.
-    node = (*curr_trp).dag_node();
-    if(first_time)
-    {
-      Halfedge_const_handle top_he ((*curr_trp).top());
-      if((top_he == he) || (top_he == he->twin())) {
-        CGAL_warning((top_he != he) && (top_he != he->twin()));
-        return Td_map_item(0);
-      }
-    }
-    first_time = false;
-
-    CGAL_assertion(node != NULL);
-    split_trapezoid_by_halfedge (*node, old_e, old_bottom_tr, old_top_tr, he);
-
-
-
-    if (node->is_inner_node())
-    {
-      // merge adjacent trapezoids on input Halfedge's bottom side if possible
-      //   make sure we try to merge active trapezoids
-      //node->left_child() is active
-      Td_map_item new_btm_item = node->left_child().get_data();
-      CGAL_assertion(traits->is_td_trapezoid(new_btm_item) && traits->is_active(new_btm_item));
-      if(merge_if_possible(prev_bottom_tr, new_btm_item))
-      {
-        Dag_node* left_child_node = boost::apply_visitor(dag_node_visitor(),prev_bottom_tr);
-        node->set_left_child(*left_child_node);
-        old_bottom_tr = prev_bottom_tr;
-        m_number_of_dag_nodes--; //update number of nodes in the DAG after merge
-      }
-
-      // merge adjacent trapezoids on input Halfedge's top side if possible
-      //   make sure we try to merge active trapezoids
-      //node->right_child() is active
-      Td_map_item new_top_item = node->right_child().get_data();
-      CGAL_assertion(traits->is_td_trapezoid(new_top_item) && traits->is_active(new_top_item));
-      if(merge_if_possible(prev_top_tr, new_top_item))
-      {
-        Dag_node* right_child_node = boost::apply_visitor(dag_node_visitor(),
-                                                          prev_top_tr);
-        node->set_right_child(*right_child_node);
-        old_top_tr = prev_top_tr;
-        m_number_of_dag_nodes--; //update number of DAG nodes after merge
-      }
-      // update trapezoid's left/right neighbouring relations
-      //MICHAL: if the assertion below fails then we need to check why
-      CGAL_assertion(!traits->is_td_trapezoid(prev));
-      if(traits->is_td_trapezoid(prev))
-      {
-        //MICHAL: if we reach here ->then this need to be uncommented
-        //        I thought that prev is always a degenerate point
-        //curr_trp->set_lb(prev);
-        //curr_trp->set_lt(prev);
-        //prev->set_rb(curr_trp);
-        //prev->set_rt(curr_trp);
-      }
-    }
-    else
-    {
-
-#ifdef CGAL_TD_DEBUG
-
-      CGAL_assertion((*curr_trp).is_valid(traits));
-
-#endif
-
-      break;
-    }
-
-  }
-  m_number_of_curves++;
-
-#ifdef CGAL_TD_DEBUG
-  write(std::cout,*m_dag_root,*traits) << std::endl;
-  std::cout << "\nTD::insert() exited with data structure"
-            << is_valid(*m_dag_root) << std::endl;
-#endif
-
-  return old_e;
-}
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//
-// Remark:
-//  Assumes the map to be planar.
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::remove(Halfedge_const_handle he)
-{
-  //print_dag_addresses(*m_dag_root);
-
-  if (m_with_guarantees)
-    update();
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-  locate_opt_empty();
-#endif
-
-  CGAL_warning(traits != NULL);
-
-  //calculating leftmost and rightmost curve ends of he
-  const Curve_end leftmost(he,ARR_MIN_END);
-  const Curve_end rightmost(he,ARR_MAX_END);
-
-  //locating leftmost & rightmost curve ends
-  Locate_type lt1,lt2;
-  Td_map_item p1_item = locate(leftmost,lt1);
-  Td_map_item p2_item = locate(rightmost,lt2);
-
-  //both should be located on a point degenerate trapezoid
-  CGAL_warning(lt1==POINT && lt2==POINT);
-
-  if (lt1!=POINT || lt2!=POINT)
-    return;
-
-  CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != NULL);
-  CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != NULL);
-
-  //retrieve the Dag_nodes of the two point-degenerate trapezoid
-  Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item));//*t1.dag_node();
-  Dag_node& p2_node = *(boost::apply_visitor(dag_node_visitor(), p2_item));//*t2.dag_node();
-
-  //calculate the immediate lower, central and upper neighbourhood of
-  // the curve in the data structure
-  //In_face_iterator btm_it(follow_curve(tt1,he,SMALLER));
-  In_face_iterator btm_it(follow_curve(p1_node,he,SMALLER));
-  In_face_iterator mid_it(follow_curve(p1_node,he,EQUAL));
-  In_face_iterator top_it(follow_curve(p1_node,he,LARGER));
-
-  bool inc_btm = true; //true if btm_it should be be incremented (not top_it)
-  bool prev_inc_btm = false; //holds the inc_btm from previous iteration
-  bool end_reached = false; //true if this is the last iteration
-
-  //define the map of new DAG nodes of the new trapezoids
-  Nodes_map new_array;
-  int last_index[] = {0,0};
-  int sz = 0;
-
-  Td_active_trapezoid& btm_it_tr (btm_it.trp());
-  Td_active_trapezoid& top_it_tr (top_it.trp());
-  Vertex_const_handle left_v = btm_it_tr.left();
-  Vertex_const_handle right_v;
-  Td_map_item last_btm_tr_item = Td_map_item(0); //pointer to the last btm_it tr
-  Td_map_item last_top_tr_item = Td_map_item(0); //pointer to the last top_it tr
-  Td_map_item last_new_tr_item = Td_map_item(0); //last new trpz that was created
-  Td_map_item old_tr_item      = Td_map_item(0); //old trpz on which the new is based
-
-
-  CGAL_warning((top_it.trp()).left() == left_v);
-
-  //-----------------------------------
-  //1. remove adjacency at left end point
-  //  first_cv_tr is the first trapezoid representing he (type TD_EDGE)
-  Td_map_item first_edge_fragment_item (*mid_it);
-
-  //-----------------------------------
-  //2. update the map & the dag with new trapezoids which are merge of the
-  //  trapezaoids above and below the removed halfedge.
-  do {
-    btm_it_tr = btm_it.trp();
-    top_it_tr = top_it.trp();
-
-    // decide which of btm_it,top_it to increment
-    inc_btm = is_end_point_left_low(Curve_end(traits->vtx_to_ce(btm_it_tr.right())),
-                                    Curve_end(traits->vtx_to_ce(top_it_tr.right())));
-    // the current iterator that should be incremented
-    In_face_iterator& curr_it =  inc_btm ? btm_it : top_it;
-    Td_active_trapezoid& curr_it_tr (curr_it.trp());
-
-    // reference to the last curr_it tr
-    Td_map_item& last_tr_item (inc_btm ? last_btm_tr_item : last_top_tr_item);
-
-    //set the new trpz right end
-    right_v = curr_it_tr.right();
-
-    // create a new trapezoid (the merge of top_it and btm_it)
-    typename Nodes_map::value_type
-      pair(sz,
-           Dag_node(Td_active_trapezoid(left_v, right_v,
-                                        btm_it_tr.bottom(),top_it_tr.top()),
-                    (std::max)(btm_it_tr.dag_node()->depth(),
-                              top_it_tr.dag_node()->depth())));
-    new_array.insert(pair);
-    //copy trapezoid data from btm and top trapezoids
-    Dag_node& new_node = (new_array.find(sz))->second;
-    ++sz;
-    Td_active_trapezoid& tr(boost::get<Td_active_trapezoid>(new_node.get_data()));
-    tr.set_dag_node(&new_node);
-    tr.set_lb(btm_it_tr.lb());
-    tr.set_lt(top_it_tr.lt());
-    //new_node->set_dag_node(&new_node);
-    //new_node->set_lb(btm_it->lb());
-    //new_node->set_lt(top_it->lt());
-    if (!traits->is_empty_item(last_new_tr_item))
-    {
-      if (traits->is_trpz_top_equal(last_new_tr_item, new_node.get_data()))
-      {
-        tr.set_lt(last_new_tr_item); //new_node->set_lt(last_new_tr);
-      }
-
-      if (traits->is_trpz_bottom_equal(last_new_tr_item, new_node.get_data()))
-      {
-        tr.set_lb(last_new_tr_item); //new_node->set_lb(last_new_tr);
-      }
-    }
-    if (!traits->is_empty_item(tr.lb()))
-    {
-      Td_map_item lb_item = tr.lb();
-      Td_active_trapezoid& lb_tr(boost::get<Td_active_trapezoid>(lb_item));
-      lb_tr.set_rb(new_node.get_data());
-    }
-    if (!traits->is_empty_item(tr.lt()))
-    {
-      Td_map_item lt_item = tr.lt();
-      Td_active_trapezoid& lt_tr(boost::get<Td_active_trapezoid>(lt_item));
-      lt_tr.set_rt(new_node.get_data());
-    }
-
-    last_new_tr_item = new_node.get_data(); //new_node.operator->(); //get the last new trapezoid created
-
-    //update arguments for next iteration:
-    left_v = right_v; //new left is curr right
-    last_btm_tr_item = *btm_it;
-    last_top_tr_item = *top_it;
-
-    old_tr_item = *curr_it;  //the old trpz on which the new is based
-    curr_it++; //increment the iterator to the next trapezoid
-    //curr_it_tr  = *(curr_it.trp());
-    end_reached = !btm_it || !top_it;
-
-    //copy neighbouring trapezoids in case top/btm are not the same for the old
-    //  trapezoid and the next trapezoid after incrementing the old one
-    if (!btm_it ||
-        (inc_btm && !traits->is_trpz_bottom_equal(old_tr_item,*curr_it)))
-    {
-      Td_map_item rb (boost::apply_visitor(rb_visitor(),old_tr_item));
-      if (!traits->is_empty_item(rb))
-      {
-        boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr);
-        boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb);
-      }
-    }
-    if (!top_it ||
-        (!inc_btm && !traits->is_trpz_top_equal(old_tr_item,*curr_it)))
-    {
-      Td_map_item rt (boost::apply_visitor(rt_visitor(),old_tr_item));
-      if (!traits->is_empty_item(rt))
-      {
-        boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr);
-        boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt);
-      }
-    }
-
-    //set the no longer relevant trapezoids as removed and add the new nodes
-    //  as their replacement
-
-    Dag_node* last_tr_node (boost::apply_visitor(dag_node_visitor(), last_tr_item));
-
-    if (prev_inc_btm != inc_btm)
-    {
-      int num_of_new_nodes = 0;
-      Dag_node tmp =
-        container2dag (new_array, last_index[inc_btm ? 0 : 1],
-                        sz-1, num_of_new_nodes);
-
-      deactivate_trapezoid( *last_tr_node, &tmp); //last_tr->remove(&tmp);
-      m_number_of_dag_nodes += num_of_new_nodes; //new vertex nodes (rooted at tmp) were added
-      m_number_of_dag_nodes += 1; //new node (tmp) was added
-
-      last_index[inc_btm ? 0 : 1] = sz;
-      prev_inc_btm = inc_btm; //update for next iteration
-      //tmp is the root of a sub graph.
-      //The largest depth in this sub-graph may be the largest leaf depth
-      update_largest_leaf_depth( tmp.max_depth() );
-
-    }
-    else
-    {
-      int num_of_new_nodes = 0;
-      Dag_node tmp = container2dag (new_array, sz-1, sz-1, num_of_new_nodes);
-
-      deactivate_trapezoid( *last_tr_node, &tmp); //last_tr->remove(&tmp);
-      m_number_of_dag_nodes += 1; //new node (tmp) was added
-
-      last_index[inc_btm ? 0 : 1] = sz;
-      //tmp is a node with no children
-      update_largest_leaf_depth( tmp.max_depth() );
-    }
-
-    // update the dag node pointer in the trapezoid
-    const Dag_node* real = &last_tr_node->left_child();
-    boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real);
-  }
-  while(!end_reached);
-
-
-  // get the iterator (btm_it or top_it) that holds the trapezoid that was
-  //  not removed in the last iteration
-  In_face_iterator& it = !prev_inc_btm ? btm_it : top_it;
-  Td_active_trapezoid& tr (it.trp());
-  // remove the last trapezoid to remove and set the last new trapezoid
-  //  created as its replacement. update the relevant data
-  Td_map_item rb = tr.rb();
-  Td_map_item rt = tr.rt();
-
-  int num_of_new_nodes = 0;
-  Dag_node tmp =
-    container2dag(new_array, last_index[!inc_btm ? 0 : 1],
-                  static_cast<int>(new_array.size())-1, num_of_new_nodes);
-
-  deactivate_trapezoid( *(tr.dag_node()), &tmp);  //it->remove(&tmp);
-  //tmp is the root of a sub graph.
-  //The largest depth in this sub-graph may be the largest leaf depth
-  update_largest_leaf_depth( tmp.depth() );
-  m_number_of_dag_nodes += num_of_new_nodes; //new node (tmp) was added
-
-  const Dag_node* real = &tr.dag_node()->left_child();
-  boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real);
-
-  if (!traits->is_empty_item(rb))
-  {
-    boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb);
-    boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr);
-  }
-  if (!traits->is_empty_item(rt))
-  {
-    boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt);
-    boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr);
-  }
-
-  //-----------------------------------
-  //3. remove the trapezoids that represent the removed halfedge
-  boost::shared_ptr<X_monotone_curve_2> removed_cv_ptr (new X_monotone_curve_2(he->curve()));
-  Base_map_item_iterator last_edge_fragment_it = mid_it;//Base_trapezoid_iterator last_mid = mid_it;
-  Dag_node* e_node = NULL;
-  while(!!++mid_it)
-  {
-    e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
-    deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
-    last_edge_fragment_it = mid_it;
-  }
-
-  //-----------------------------------
-  //4. remove adjacency at right end point
-
-  //remove the final trapezoid representing the removed halfedge
-  e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
-  deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
-
-  //-----------------------------------
-  //5. if the halfedge vertices are now isolated, undo the split trapezoid
-  //  by point(vtx) operation
-  if (is_last_edge(he ,p1_item))
-    undo_split_trapezoid_by_vertex (p1_node, leftmost);
-
-  if (is_last_edge(he ,p2_item))
-    undo_split_trapezoid_by_vertex (p2_node, rightmost);
-
-  //-----------------------------------
-  //6. reevaluating number of curves
-  m_number_of_curves--;
-}
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//
-// preconditions:
-//  p is not on an edge or a vertex.
-template <class Td_traits>
-typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item&
-Trapezoidal_decomposition_2<Td_traits>
-::vertical_ray_shoot(const Point & p,Locate_type & lt,
-                     const bool up_direction /*=true*/) const
-{
-#ifdef CGAL_TD_DEBUG
-  CGAL_assertion(traits);
-#endif
-
-  // We replace the following locate with a direct call to
-  // search_using_dag because we need to deal
-  // with cases where the source of shoot is a point/curve.
-  // reference t_p = locate(p,lt);
-
-  Dag_node curr = *m_dag_root;
-
-  lt = search_using_dag(curr, traits, p, m_empty_he_handle ,
-                                  up_direction ?
-                                  CGAL::LARGER : CGAL::SMALLER);
-
-  Td_map_item& item(curr.get_data());
-
-  if (traits->is_td_trapezoid(item))
-  {
-    CGAL_assertion(traits->is_active(item));
-    /* using exact traits, it may happen that p is on the
-       right side of the trapezoid directly under its
-       right point(analogouly directly above its left point).
-       with the trapezoid extending to the left.
-       In this case vertical ray shoot upwards(downwards)
-       doesn't returns c as output.
-
-       Example.
-       x---x
-       p
-       x------x
-    */
-    Td_active_trapezoid& tr (boost::get<Td_active_trapezoid>(item));
-
-    if ((up_direction && !tr.is_on_right_boundary() &&
-        (traits->compare_curve_end_x_2_object()
-          (p,traits->vtx_to_ce(tr.right())) == EQUAL) &&
-        (tr.is_on_left_boundary() ||
-          !traits->equal_curve_end_2_object()(traits->vtx_to_ce(tr.left()),
-                                              traits->vtx_to_ce(tr.right())))) ||
-        (!up_direction && !tr.is_on_left_boundary() &&
-        (traits->compare_curve_end_x_2_object()
-          (p,traits->vtx_to_ce(tr.left())) == EQUAL) &&
-        (tr.is_on_right_boundary() ||
-          !traits->equal_curve_end_2_object()(traits->vtx_to_ce(tr.left()),
-                                              traits->vtx_to_ce(tr.right())))))
-    {
-      // recalculate vertical ray shoot using locate on point
-      return up_direction ?
-          locate(traits->vtx_to_ce(tr.right()),lt) : locate(traits->vtx_to_ce(tr.left()),lt);
-    }
-
-    if (up_direction ? tr.is_on_top_boundary() : tr.is_on_bottom_boundary())
-      lt = UNBOUNDED_TRAPEZOID;
-    else
-      lt = TRAPEZOID;
-
-  }
-  return item;
-}
-
-//MICHAL: commented due to inefficient depth update, remove and insert instead
-//-----------------------------------------------------------------------------
-//// Description:
-////
-//template <class Td_traits>
-//void Trapezoidal_decomposition_2<Td_traits>
-//::before_split_edge(const X_monotone_curve_2& cv,
-//                   const X_monotone_curve_2& cv1,
-//                   const X_monotone_curve_2& cv2)
-//{
-//#ifdef MICHAL_DEBUG
-//  std::cout << "SPLITTING: --------------------------" << std::endl;
-//  std::cout << "cv before split" << std::endl;
-//  print_cv_data(cv);
-//  std::cout << "cv1 before split" << std::endl;
-//  print_cv_data(cv1);
-//  std::cout << "cv2 before split" << std::endl;
-//  print_cv_data(cv2);
-//#endif
-//
-//#ifdef CGAL_TD_DEBUG
-//  std::cout << "\nTD::before_split_edge(" << cv << "," << cv1 << "," << cv2
-//            << ") called with "
-//            << (is_valid(*m_dag_root) ? "valid" : "invalid")
-//            << " data structure" <<  std::endl;
-//  write(std::cout,*m_dag_root,*traits) << std::endl;
-//#endif
-//
-//  if (m_with_guarantees) update();
-//
-//#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-//
-//  locate_opt_empty();
-//
-//#endif
-//
-//#ifndef CGAL_TD_DEBUG
-//
-//  if (!traits)
-//  {
-//    CGAL_warning(traits != NULL);
-//    return;
-//  }
-//  if (!traits->are_mergeable_2_object()(cv1,cv2))
-//  {
-//    CGAL_warning(traits->are_mergeable_2_object()(cv1,cv2));
-//    return;
-//  }
-//
-//#else
-//
-//  if (!traits->are_mergeable_2_object()(cv1,cv2))
-//  {
-//    std::cerr << "\ncv " << cv;
-//    std::cerr << "\ncv1 " << cv1;
-//    std::cerr << "\ncv1 " << cv2 << std::endl;
-//  }
-//  CGAL_precondition(traits != NULL);
-//  CGAL_precondition(traits->are_mergeable_2_object()(cv1,cv2));
-//
-//#endif
-//
-//  // find the splitting point (curve end)
-//  Curve_end split_ce =
-//      traits->equal_curve_end_2_object()(Curve_end(cv1, ARR_MAX_END),
-//                                        Curve_end(cv2, ARR_MIN_END) ) ?
-//      Curve_end(cv1, ARR_MAX_END) : Curve_end(cv2, ARR_MAX_END);
-//
-//
-//
-//#ifndef CGAL_TD_DEBUG
-//
-//  CGAL_warning( is_end_point_left_low(Curve_end(cv,ARR_MIN_END),split_ce) );
-//
-//  CGAL_warning( is_end_point_right_top(Curve_end(cv,ARR_MAX_END),split_ce) );
-//
-//#else
-//
-//  CGAL_precondition( is_end_point_left_low(Curve_end(cv,ARR_MIN_END),split_ce) );
-//
-//  CGAL_precondition( is_end_point_right_top(Curve_end(cv,ARR_MAX_END),split_ce) );
-//
-//#endif
-//
-//  // find extremal points
-//  const Curve_end leftmost = (traits->equal_curve_end_2_object()
-//                                (Curve_end(cv1, ARR_MAX_END),
-//                                 Curve_end(cv2, ARR_MIN_END) ))?
-//                            Curve_end(cv1,ARR_MIN_END) :
-//                            Curve_end(cv2,ARR_MIN_END) ;
-//
-//  const Curve_end rightmost = (traits->equal_curve_end_2_object()
-//                                 (Curve_end(cv1, ARR_MAX_END),
-//                                  Curve_end(cv2, ARR_MIN_END) ))?
-//                            Curve_end(cv2,ARR_MAX_END) :
-//                            Curve_end(cv1,ARR_MAX_END) ;
-//
-//  CGAL_assertion(traits->equal_curve_end_2_object()
-//                              (Curve_end(cv,ARR_MIN_END), leftmost));
-//  CGAL_assertion(traits->equal_curve_end_2_object()
-//                              (Curve_end(cv,ARR_MAX_END), rightmost));
-//
-//  //locate the trapezoids of the extremal points
-//  Locate_type lt1,lt2;
-//
-//  // representing trapezoids for extremal points
-//  X_trapezoid& t1 = locate(leftmost,lt1);
-//  X_trapezoid& t2 = locate(rightmost,lt2);
-//
-//#ifndef CGAL_TD_DEBUG
-//
-//  CGAL_warning(lt1==POINT && lt2==POINT);
-//  CGAL_warning(t1.is_active() && t2.is_active());
-//
-//#else
-//
-//  CGAL_precondition(lt1==POINT && lt2==POINT);
-//  CGAL_precondition(t1.is_active() && t2.is_active());
-//  CGAL_warning(t1.dag_node() != NULL);
-//  CGAL_warning(t2.dag_node() != NULL);
-//
-//#endif
-//  m_before_split.m_cv_before_split = cv;
-//  //set iterators for below curve, on curve & above curve
-//  Dag_node& tt1 = *t1.dag_node();
-//  m_before_split.m_p_btm_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,SMALLER));
-//  m_before_split.m_p_mid_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,EQUAL));
-//  m_before_split.m_p_top_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,LARGER));
-//  //locate the splitting point in the trapezoidal map
-//  //  should be found on a degenerate trapezoid representing a curve
-//  Locate_type lt;
-//  X_trapezoid& old_t = locate(split_ce,lt);
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion(lt==CURVE);
-//  CGAL_precondition(old_t.is_active());
-//  CGAL_warning(old_t.dag_node());
-//
-//#endif
-//  //the DAG node of the curve trapezoid where the spiltting point is
-//  Dag_node& old_split_node = *old_t.dag_node();
-//
-//  CGAL_assertion(traits->equal_curve_end_2_object()
-//                  (traits->vtx_to_ce(old_t.left()),leftmost));
-//
-//  CGAL_assertion(traits->equal_curve_end_2_object()
-//                  (traits->vtx_to_ce(old_t.right()),rightmost));
-//
-//
-//
-//  m_before_split.m_p_old_t = &old_t;
-//  m_before_split.m_p_t1 = &t1;
-//  m_before_split.m_p_t2 = &t2;
-//
-//}
-
-//-----------------------------------------------------------------------------
-// Description:
-// Input:
-//  1 whole curves
-//  2 partial halfedge_handle-s
-// precondition:
-//  The two halfedges are valid
-//  The first input curve is the union of the two halfedges.
-//  The intersection of the latter is a point inside the
-//  interior of the former.
-//  The latter are ordered from left-down to right-up
-// postcondition:
-//  The first input curve is broken into two halfedges
-//  corresponding to the input.
-
-
-
-
-//MICHAL: commented due to inefficient depth update, remove and insert instead
-//template <class Td_traits>
-//void Trapezoidal_decomposition_2<Td_traits>
-//::split_edge(const X_monotone_curve_2& cv,Halfedge_const_handle he1,
-//               Halfedge_const_handle he2)
-//{
-//  //make sure both halfedges are valid
-//  CGAL_precondition_code(Halfedge_const_handle invalid_he);
-//  CGAL_precondition( he1 != invalid_he);
-//  CGAL_precondition( he2 != invalid_he);
-//
-//#ifdef CGAL_TD_DEBUG
-//  std::cout << "\nTD::split_edge(" << cv << "," << he1 << "," << he2
-//            << ") called with " << (is_valid(*m_dag_root) ? "valid" : "invalid")
-//            << " data structure" <<  std::endl;
-//  write(std::cout,*m_dag_root,*traits) << std::endl;
-//#endif
-//
-//
-//  // find the splitting point (vertex & curve end)
-//  Vertex_const_handle split_v =
-//      traits->equal_curve_end_2_object()(Curve_end(he1, ARR_MAX_END),
-//                                        Curve_end(he2, ARR_MIN_END) ) ?
-//      ((he1->direction()== ARR_LEFT_TO_RIGHT) ?
-//        he1->target() : he1->source())
-//     :((he2->direction()== ARR_LEFT_TO_RIGHT) ?
-//        he2->target() : he2->source());
-//
-//  Curve_end ce(traits->vtx_to_ce(split_v));
-//
-//  // find extremal points
-//  const Curve_end leftmost = (traits->equal_curve_end_2_object()
-//                                (Curve_end(he1, ARR_MAX_END),
-//                                 Curve_end(he2, ARR_MIN_END) ))?
-//                            Curve_end(he1,ARR_MIN_END) :
-//                            Curve_end(he2,ARR_MIN_END) ;
-//
-//  const Curve_end rightmost = (traits->equal_curve_end_2_object()
-//                                 (Curve_end(he1, ARR_MAX_END),
-//                                  Curve_end(he2, ARR_MIN_END) ))?
-//                            Curve_end(he2,ARR_MAX_END) :
-//                            Curve_end(he1,ARR_MAX_END) ;
-//
-//
-//  //MICHAL: new
-//  X_trapezoid& t1 = *m_before_split.m_p_t1;
-//  X_trapezoid& t2 = *m_before_split.m_p_t2;
-//  X_trapezoid& old_t = *m_before_split.m_p_old_t;
-//  In_face_iterator& bottom_it = *m_before_split.m_p_btm_it;
-//  In_face_iterator& mid_it = *m_before_split.m_p_mid_it;
-//  In_face_iterator& top_it = *m_before_split.m_p_top_it;
-//  //MICHAL: new end
-//
-//  //the DAG node of the curve trapezoid where the spiltting point is
-//  Dag_node& old_split_node = *old_t.dag_node();
-//
-//
-//  // previous left and right sons of this DAG node
-//  const Dag_node& old_left = old_split_node.left_child();
-//  const Dag_node& old_right= old_split_node.right_child();
-//
-//  //define the left halfedge and the right halfedge, according
-//  //  to the splitting point
-//  //Halfedge_const_handle* p_left_he  = NULL;
-//  //Halfedge_const_handle* p_right_he = NULL;
-//  Halfedge_const_handle left_he  = he2;
-//  Halfedge_const_handle right_he = he1;
-//
-//  if (traits->equal_curve_end_2_object() (Curve_end(he2,ARR_MIN_END), ce))
-//  {
-//    left_he  = he1; //p_left_he  = &he1;
-//    right_he = he2; //p_right_he = &he2;
-//  }
-//  //else
-//  //{
-//  //  p_left_he  = &he2;
-//  //  p_right_he = &he1;
-//  //}
-//
-//  CGAL_assertion(old_t.is_active());
-//
-//  //updating the data structure:
-//  //  the cv trpz where the splitting point is located will hold the point
-//  //  its new left will hold the left cv (left and right children as before)
-//  //  its new right will hold the right cv (left and right children asa before)
-//
-//  //defining the new left child node
-//  const Dag_node& new_left_node =
-//          Dag_node(X_trapezoid(old_t.left(), split_v,
-//                               left_he, left_he, //*p_left_he, *p_left_he,
-//                               X_trapezoid::TD_EDGE),
-//                   old_left, old_right);
-//
-//  //defining the new right child node
-//  const Dag_node& new_right_node =
-//          Dag_node(X_trapezoid(split_v, old_t.right(),
-//                               right_he, right_he, //*p_right_he, *p_right_he,
-//                               X_trapezoid::TD_EDGE),
-//                   old_left, old_right);
-//
-//  //defining the new parent node (which is the splitting point):
-//
-//  //split_v is the ARR_MAX_END of left_te, and ARR_MIN_END of right_te.
-//  //need to send the halfedge whose source is split_v.
-//  Halfedge_const_handle btm_he = left_he;
-//  if (btm_he->direction() == ARR_LEFT_TO_RIGHT)
-//    btm_he = btm_he->twin();
-//  //Halfedge_const_handle* p_btm = p_left_he;
-//  //if ((*p_btm)->direction() == ARR_LEFT_TO_RIGHT)
-//  //  p_btm = &(*p_btm)->twin();
-//
-//  Halfedge_const_handle top_he = right_he;
-//  if (top_he->direction() == ARR_RIGHT_TO_LEFT)
-//    top_he = top_he->twin();
-//  //Halfedge_const_handle* p_top = p_right_he;
-//  //if ((*p_top)->direction() == ARR_RIGHT_TO_LEFT)
-//  //  p_top = &(*p_top)->twin();
-//
-//
-//  const Dag_node& new_pnt_node =
-//          Dag_node(X_trapezoid(split_v, split_v, btm_he, top_he, //*p_btm, *p_top,
-//                               X_trapezoid::TD_VERTEX),
-//                   new_left_node, new_right_node);
-//
-//  X_trapezoid& new_left_t = *new_left_node;
-//  X_trapezoid& new_right_t= *new_right_node;
-//  X_trapezoid& new_t      = *new_pnt_node;
-//
-//  // locate trapezoid trees that correspond to the closest
-//  //   trapezoids above and below ce
-//  X_trapezoid* left_top_t   = top_it.operator->();
-//  X_trapezoid* left_bottom_t= bottom_it.operator->();
-//
-//  while(is_end_point_left_low(traits->vtx_to_ce(left_top_t->right()),ce))
-//    left_top_t = left_top_t->rb();
-//
-//  while(is_end_point_left_low(traits->vtx_to_ce(left_bottom_t->right()),ce))
-//    left_bottom_t = left_bottom_t->rt();
-//
-//  Dag_node left_top    = *left_top_t->dag_node();
-//  Dag_node left_bottom = *left_bottom_t->dag_node();
-//
-//  //replace the old curve cv with the new curves in the leftmost
-//  //  and rightmost end points.
-//  //the curve end ce belongs to cv interior
-//  set_trp_params_after_split_halfedge_update (left_he , t1, he1, he2);
-//  set_trp_params_after_split_halfedge_update (right_he, t2, he1, he2);
-//
-//  //set the point's lb() which is:
-//  //     the first halfedge adjacent to the point emanating toward up
-//  //     or right sweeped using a counter clockwise sweep
-//  //     starting from up direction not including.
-//  //set the point's rt() which is:
-//  //     the first halfedge adjacent to the point emanating toward bottom
-//  //     or left sweeped using a counter clockwise sweep
-//  //     starting from bottom direction not including.
-//  new_t.set_rt (&new_left_t);
-//  new_t.set_lb (&new_right_t);
-//
-//  //set lb() and rt(0 of the two halfedges trapezoids
-//  // rt() is the next clockwise degenerate_curve around
-//  //      rightmost end_point (possibly himself)
-//  // lb() is the next clockwise degenerate_curve around
-//  //      leftmost end_point (possibly himself)
-//  new_left_t.set_lb ((old_t.lb() != &old_t) ? old_t.lb() : &new_left_t);
-//  new_left_t.set_rt (&new_right_t);
-//  new_right_t.set_lb(&new_left_t);
-//  new_right_t.set_rt((old_t.rt() != &old_t)? old_t.rt() : &new_right_t);
-//
-//  // update geometric boundary for trapezoids representing cv
-//  // first update the trapezoids of the new left curve
-//  X_trapezoid* prev = 0;
-//  while(*mid_it != old_t)
-//  {
-//    mid_it->set_top(left_he);
-//    mid_it->set_bottom(left_he);
-//    mid_it->set_right(split_v);
-//
-//    //MICHAL: added this assertion just to be sure:
-//    CGAL_assertion(mid_it->type() == X_trapezoid::TD_EDGE); //MICHAL: won't work, I removed the type() method
-//
-//    //MICHAL: who is prev?
-//    prev = mid_it.operator->();
-//    mid_it++;
-//  }
-//  if (prev)
-//  {
-//    prev->set_rb(&new_left_t); //MICHAL: I don't understand this
-//  }
-//  else // new_left_t is leftmost representative for he
-//  {
-//    //set_neighbours_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing
-//  }
-//  if (t1.rt()==&old_t) t1.set_rt(&new_left_t);
-//  if (t1.lb()==&old_t) t1.set_lb(&new_left_t);
-//  mid_it++;
-//  new_right_t.set_rb(mid_it.operator->()); //MICHAL: what does it do?
-//
-//  prev = 0;
-//  while(!!mid_it)
-//  {
-//    mid_it->set_top(right_he);
-//    mid_it->set_bottom(right_he);
-//    mid_it->set_left(split_v);
-//
-//    //MICHAL: added this assertion just to be sure:
-//    CGAL_assertion(mid_it->type() == X_trapezoid::TD_EDGE);
-//
-//    prev = mid_it.operator->();
-//    mid_it++;
-//  }
-//  if (prev)
-//  {
-//    new_right_t.set_rb(old_t.rb()); //MICHAL: I don't understand this
-//  }
-//  else // new_right_t is rightmost representative for te
-//  {
-//    //set_neighbours_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing
-//  }
-//  if (t2.rt()==&old_t) t2.set_rt(&new_right_t);
-//  if (t2.lb()==&old_t) t2.set_lb(&new_right_t);
-//
-//  // update geometric boundary for trapezoids below te
-//  while (*bottom_it != *left_bottom)
-//  {
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//    CGAL_assertion (traits->equal_2_object()(bottom_it->top()->curve(), cv));
-//
-//#endif
-//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
-//    CGAL_assertion (bottom_it->type() == X_trapezoid::TD_TRAPEZOID);
-//
-//    bottom_it->set_top(left_he);
-//    bottom_it++;
-//  }
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion (*bottom_it==*left_bottom);
-//
-//#endif
-//
-//  Dag_node& bottom_tt = *bottom_it->dag_node();
-//  bottom_it++;
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion(traits->is_in_closure (*bottom_tt, ce));
-//
-//#endif
-//
-//  split_trapezoid_by_vertex (bottom_tt, split_v, btm_he, top_he); //*p_btm, *p_top);
-//  // set the splitting trapezoid to be the same one that splits the
-//  // X_curve'like trapezoid
-//  *bottom_tt = new_t;
-//  // update top curves
-//  bottom_tt.left_child()->set_top(left_he);
-//  bottom_tt.right_child()->set_top(right_he);
-//  // left and right are not neighbours.
-//  bottom_tt.left_child()->set_rt(0);
-//  bottom_tt.right_child()->set_lt(0);
-//
-//
-//  while(!!bottom_it)
-//  {
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//    CGAL_assertion(traits->equal_2_object() (bottom_it->top()->curve(), cv));
-//
-//#endif
-//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
-//    CGAL_assertion(bottom_it->type() == X_trapezoid::TD_TRAPEZOID);
-//
-//    bottom_it->set_top(right_he);
-//    bottom_it++;
-//  }
-//
-//  // update geometric boundary for trapezoids above cv
-//  while (*top_it != *left_top)
-//  {
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//    CGAL_assertion(traits->equal_2_object() (top_it->bottom()->curve(), cv));
-//
-//#endif
-//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
-//    CGAL_assertion(top_it->type() == X_trapezoid::TD_TRAPEZOID);
-//
-//    top_it->set_bottom(left_he);
-//    top_it++;
-//  }
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion(*top_it == *left_top);
-//
-//#endif
-//
-//  Dag_node &top_tt = *top_it->dag_node();
-//  top_it++;
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion(traits->is_in_closure (*top_tt, ce));
-//
-//#endif
-//
-//  split_trapezoid_by_vertex (top_tt, split_v, btm_he, top_he);// left_he, right_he);
-//  // set the splitting trapezoid to be the same one that splits the
-//  // X_curve'like trapezoid
-//  *top_tt = new_t;
-//  // update bottom side
-//  top_tt.left_child()->set_bottom(left_he);
-//  top_tt.right_child()->set_bottom(right_he);
-//  // left and right aren't neighbours
-//  top_tt.left_child()->set_rb(0);
-//  top_tt.right_child()->set_lb(0);
-//
-//  while(!!top_it)
-//  {
-//
-//#ifndef CGAL_TD_DEBUG
-//
-//    CGAL_warning(traits->equal_2_object()(top_it->bottom()->curve(), cv));
-//
-//#else
-//
-//    if (!traits->equal_2_object()(top_it->bottom()->curve(), cv))
-//      std::cout << "\ntop_it->bottom()->curve() "<< top_it->bottom()->curve()
-//                << "\t cv= " << cv;
-//    CGAL_assertion(traits->equal_2_object()(top_it->bottom()->curve() ,cv));
-//
-//#endif
-//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
-//    CGAL_assertion(top_it->type() == X_trapezoid::TD_TRAPEZOID);
-//
-//    top_it->set_bottom(right_he);
-//    top_it++;
-//  }
-//
-//  // mark inactive trapezoids
-//  //  depth of new_pnt_node is updated here (in the remove operation)
-//  //   and also depth of the sub-DAG rooted at it
-//  old_t.remove((Dag_node*)&new_pnt_node);
-//  update_largest_leaf_depth( new_pnt_node.max_depth() ); //MICHAL: this is a recursive call for the sub-DAG --EXPENSIVE!
-//  //adding nodes for the splitting-point and the two parts of the split curve
-//  m_number_of_dag_nodes += 3;
-//  old_t.set_curve_for_rem_he(m_before_split.m_cv_before_split); //MICHAL: added this so the trpz will hold the original curve before the split
-//
-//  const Dag_node* p_new       = &old_t.dag_node()->left_child();
-//  const Dag_node* p_new_left  = &p_new->left_child();
-//  const Dag_node* p_new_right = &p_new->right_child();
-//  const Dag_node* p_old_left  = &p_new_left->left_child();
-//  const Dag_node* p_old_right = &p_new_left->right_child();
-//
-//  (*p_new)->set_dag_node ((Dag_node*)p_new);
-//  (*p_new_left)->set_dag_node ((Dag_node*)p_new_left);
-//  (*p_new_right)->set_dag_node ((Dag_node*)p_new_right);
-//  (*p_old_left)->set_dag_node ((Dag_node*)p_old_left);
-//  (*p_old_right)->set_dag_node ((Dag_node*)p_old_right);
-//
-//#ifdef CGAL_TD_DEBUG
-//
-//  CGAL_assertion (old_split_node->is_valid(traits));
-//  CGAL_assertion (new_pnt_node->is_valid(traits));
-//  CGAL_assertion ((*p_new)->is_valid(traits));
-//  CGAL_assertion ((*p_new_left)->is_valid(traits));
-//  CGAL_assertion ((*p_new_right)->is_valid(traits));
-//  CGAL_assertion ((*p_old_left)->is_valid(traits));
-//  CGAL_assertion ((*p_old_right)->is_valid(traits));
-//  CGAL_assertion (top_tt->is_valid(traits));
-//  CGAL_assertion (bottom_tt->is_valid(traits));
-//  CGAL_assertion (old_left->is_valid(traits));
-//  CGAL_assertion (old_right->is_valid(traits));
-//  CGAL_assertion (traits->is_degenerate_point(**p_new));
-//  CGAL_assertion (traits->is_degenerate_curve(**p_new_left));
-//  CGAL_assertion (traits->is_degenerate_curve(**p_new_right));
-//  CGAL_assertion (traits->equal_curve_end_2_object()
-//                  (Curve_end((*p_new_right)->bottom(), ARR_MIN_END),
-//                   (*p_new)->right()) );
-//  CGAL_assertion (traits->equal_curve_end_2_object()
-//                  (Curve_end((*p_new_left)->top(), ARR_MAX_END),
-//                   (*p_new)->left()) );
-//#endif
-//
-//  // reevaluating number of curves
-//  m_number_of_curves++;
-//
-//#ifdef CGAL_TD_DEBUG
-//  std::cout << "\nTD::split_edge() exited with data structure"
-//            << is_valid(*m_dag_root) << std::endl;
-//  write(std::cout,*m_dag_root,*traits) << std::endl;
-//#endif
-//}
-//
-
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//
-template <class Td_traits>
-void Trapezoidal_decomposition_2<Td_traits>
-::merge_edge (Halfedge_const_handle he1,
-              Halfedge_const_handle he2,
-              const X_monotone_curve_2& cv)
-{
-  //make sure the halfedge is valid
-  CGAL_precondition_code(Halfedge_const_handle invalid_he);
-  CGAL_precondition( he1 != invalid_he);
-  CGAL_precondition( he2 != invalid_he);
-
-#ifdef CGAL_TD_DEBUG
-  std::cout << "\nTD::merge_edge(" << he1->curve() << "," << he2->curve()
-            << "," << cv
-            << ") called with " << (is_valid(*m_dag_root) ? "valid" : "invalid")
-            << " data structure" <<  std::endl;
-  write(std::cout,*m_dag_root,*traits) << std::endl;
-#endif
-
-  if (m_with_guarantees)
-    update();
-
-#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
-
-  locate_opt_empty();
-
-#endif
-
-  const X_monotone_curve_2& cv1 = he1->curve();
-  const X_monotone_curve_2& cv2 = he2->curve();
-
-  if (!traits)
-  {
-    CGAL_warning(traits != NULL);
-    return;
-  }
-  if (!traits->are_mergeable_2_object() (cv1, cv2))
-  {
-    CGAL_warning(traits->are_mergeable_2_object() (cv1, cv2));
-    return;
-  }
-
-  // Calculate the common/merged point (Curve_end) of cv1 and cv2.
-  // There should be one!
-  Curve_end ce = traits->equal_curve_end_2_object()
-                    (Curve_end(cv1,ARR_MAX_END),Curve_end(cv2,ARR_MIN_END)) ?
-                  Curve_end(cv1,ARR_MAX_END) :
-    // [-- cv1 -->] p [-- cv2 -->] or [<-- cv2 --] p [<-- cv1 --]
-                 traits->equal_curve_end_2_object()
-                    (Curve_end(cv1,ARR_MIN_END),Curve_end(cv2,ARR_MAX_END)) ?
-    // [<-- cv1 --] p [<-- cv2 --] or [-- cv2 -->] p [-- cv1 -->]
-                  Curve_end(cv1,ARR_MIN_END) : //
-                 traits->equal_curve_end_2_object()
-                    (Curve_end(cv1,ARR_MIN_END),Curve_end(cv2,ARR_MIN_END)) ?
-    // [<-- cv1 --] p [-- cv2 -->]
-                  Curve_end(cv1,ARR_MIN_END) :
-    // [-- cv1 -->] p [<-- cv2 --]
-                  Curve_end(cv1,ARR_MAX_END);
-
-  //find the halfedge that will contain the merged curve
-  // [<-- cv1 --] p [<-- cv2 --] or [<-- cv1 --] p [-- cv2 -->]-> he1->twin()
-  // [-- cv1 -->] p [-- cv2 -->] or [-- cv1 -->] p [<-- cv2 --]-> he1
-  //  Notice the curve cv is not yet updated
-  Halfedge_const_handle merged_he =
-            (traits->equal_curve_end_2_object()
-                (Curve_end(cv1, ARR_MIN_END), Curve_end(cv2, ARR_MAX_END)) ||
-             traits->equal_curve_end_2_object()
-                (Curve_end(cv1, ARR_MIN_END), Curve_end(cv2, ARR_MIN_END)) )
-             ? he1->twin() :  he1;
-
-#ifdef CGAL_TD_DEBUG
-  // ce is interior to the union curve
-  CGAL_precondition(
-        is_end_point_left_low (Curve_end(cv, ARR_MIN_END), ce));
-  CGAL_precondition(
-        is_end_point_right_top (Curve_end(cv, ARR_MAX_END), ce));
-
-#endif
-
-  //get the leftmost & rightmost Curve_end-s
-
-  Curve_end leftmost  (cv, ARR_MIN_END);
-  Curve_end rightmost (cv, ARR_MAX_END);
-
-  //locate the leftmost, rightmost and the merged point in the data structure
-  Locate_type lt1,lt2,lt;
-  Td_map_item leftp_item  = locate (leftmost, lt1);
-  Td_map_item rightp_item = locate (rightmost, lt2);
-  Td_map_item mrgp_item   = locate (ce, lt);
-
-
-  //varifying that all trapezoids are not NULL and are of type POINT
-  CGAL_warning (boost::apply_visitor(dag_node_visitor(),leftp_item) != NULL);
-  CGAL_warning (boost::apply_visitor(dag_node_visitor(),rightp_item)!= NULL);
-  CGAL_warning (boost::apply_visitor(dag_node_visitor(),mrgp_item)  != NULL);
-
-
-
-  //define the left curve and the right curve, according
-  //  to the common point (that is merged)
-  const X_monotone_curve_2* p_left_cv  = &cv2;
-  const X_monotone_curve_2* p_right_cv = &cv1;
-  Halfedge_const_handle left_he = he2;
-  Halfedge_const_handle right_he = he1;
-  if (traits->equal_curve_end_2_object() (Curve_end (cv2, ARR_MIN_END), ce))
-  {
-    p_left_cv  = &cv1;
-    p_right_cv = &cv2;
-    left_he = he1;
-    right_he = he2;
-  }
-
-#ifdef CGAL_TD_DEBUG
-
-  //CGAL_assertion (traits->equal_curve_end_2_object()
-  //                (leftp_item.left(), leftmost));
-  //CGAL_assertion (traits->equal_curve_end_2_object()
-  //                (rightp_item.left(), rightmost));
-
-  CGAL_assertion (is_end_point_left_low(leftmost, ce));
-  CGAL_assertion (is_end_point_left_low(ce, rightmost));
-  //compare left cv min with leftmost
-  CGAL_assertion (traits->equal_curve_end_2_object()
-                  (Curve_end(*p_left_cv, ARR_MIN_END), leftmost));
-  //compare left cv max with ce
-  CGAL_assertion (traits->equal_curve_end_2_object()
-                  (Curve_end(*p_left_cv, ARR_MAX_END), ce));
-  //compare right cv min with ce
-  CGAL_assertion (traits->equal_curve_end_2_object()
-                  (Curve_end(*p_right_cv, ARR_MIN_END), ce));
-  //compare right cv max with rightmost
-  CGAL_assertion (traits->equal_curve_end_2_object()
-                  (Curve_end(*p_right_cv, ARR_MAX_END), rightmost));
-
-#endif
-
-  //get the nodes of leftmost point and merge point
-  Dag_node& leftp_node  = *(boost::apply_visitor(dag_node_visitor(),leftp_item));
-  Dag_node& mrgp_node = *(boost::apply_visitor(dag_node_visitor(),mrgp_item));
-
-  //set iterators for below left curve, on left curve & above left curve
-  In_face_iterator
-    btm_left_it (follow_curve (leftp_node, *p_left_cv, SMALLER)),
-    mid_left_it (follow_curve (leftp_node, *p_left_cv, EQUAL)),
-    top_left_it (follow_curve (leftp_node, *p_left_cv, LARGER));
-
-  //set iterators for below right curve, on right curve & above right curve
-  In_face_iterator
-    btm_right_it (follow_curve (mrgp_node, *p_right_cv, SMALLER)),
-    mid_right_it (follow_curve (mrgp_node, *p_right_cv, EQUAL)),
-    top_right_it (follow_curve (mrgp_node, *p_right_cv, LARGER));
-
-
-#ifdef CGAL_TD_DEBUG
-
-  CGAL_assertion (btm_left_it.operator->());
-  CGAL_assertion (mid_left_it.operator->());
-  CGAL_assertion (top_left_it.operator->());
-  CGAL_assertion (btm_right_it.operator->());
-  CGAL_assertion (mid_right_it.operator->());
-  CGAL_assertion (top_right_it.operator->());
-  CGAL_assertion (traits->is_active(*btm_left_it.operator->()));
-  CGAL_assertion (traits->is_active(*mid_left_it.operator->()));
-  CGAL_assertion (traits->is_active(*top_left_it.operator->()));
-  CGAL_assertion (traits->is_active(*btm_right_it.operator->()));
-  CGAL_assertion (traits->is_active(*mid_right_it.operator->()));
-  CGAL_assertion (traits->is_active(*top_right_it.operator->()));
-
-#endif
-
-  //replacing old curves with the new merged halfedge
-
-  Td_map_item  left_cv_fraction_item = *mid_left_it;
-  Td_map_item  on_cv_left            = Td_map_item(0);
-  Td_map_item  on_cv_right           = *mid_right_it;
-  Td_map_item  above_cv_left         = Td_map_item(0);
-  Td_map_item  above_cv_right        = *top_right_it;
-  Td_map_item  below_cv_left         = Td_map_item(0);
-  Td_map_item  below_cv_right        = *btm_right_it;
-  Td_map_item  right_cv_fraction_item= Td_map_item(0);
-  Td_map_item  dummy1                = Td_map_item(0);
-  Td_map_item  dummy2                = Td_map_item(0);
-
-  Vertex_const_handle leftmost_v  =
-    (left_he->direction() == ARR_LEFT_TO_RIGHT) ? left_he->source() :
-                                                  left_he->target();
-  Vertex_const_handle rightmost_v =
-    (right_he->direction() == ARR_LEFT_TO_RIGHT) ? right_he->target() :
-                                                   right_he->source();
-  //replacing the given curve with a new Halfedge_handle along the trapezoids
-  // starting at the iterator, until the end (last parameter) is reached.
-  // updating the last param as the last updated trapzoid
-  update_map_items_after_merge (mid_left_it, left_he, merged_he,
-                                leftmost_v, rightmost_v, on_cv_left);
-  update_map_items_after_merge (mid_right_it, right_he, merged_he,
-                                leftmost_v, rightmost_v, right_cv_fraction_item);
-  update_map_items_after_merge (top_left_it, left_he, merged_he,
-                                leftmost_v, rightmost_v, above_cv_left);
-  update_map_items_after_merge (top_right_it, right_he, merged_he,
-                                leftmost_v, rightmost_v, dummy1);
-  update_map_items_after_merge (btm_left_it, left_he, merged_he,
-                                leftmost_v, rightmost_v, below_cv_left);
-  update_map_items_after_merge (btm_right_it, right_he, merged_he,
-                                leftmost_v, rightmost_v, dummy2);
-
-
-  // merge trapezoids that were split by the upward and downward
-  // vertical extensions from ce (the merged point)
-
-  // make sure only active trapezoids are merged
-  CGAL_assertion( traits->is_active(above_cv_left) && traits->is_active(above_cv_right) );
-  CGAL_assertion( traits->is_active(below_cv_left) && traits->is_active(below_cv_right) );
-
-  merge_if_possible (above_cv_left, above_cv_right);
-  merge_if_possible (below_cv_left, below_cv_right);
-
-  // mark older trapezoids as inactive - nodes depth are updated here
-  Dag_node* above_cv_right_node (boost::apply_visitor(dag_node_visitor(),above_cv_right));
-  Dag_node* above_cv_left_node  (boost::apply_visitor(dag_node_visitor(),above_cv_left));
-  deactivate_trapezoid( *above_cv_right_node, above_cv_left_node); //above_cv_right->remove(above_cv_left->dag_node());
-  Dag_node* below_cv_right_node (boost::apply_visitor(dag_node_visitor(),below_cv_right));
-  Dag_node* below_cv_left_node  (boost::apply_visitor(dag_node_visitor(),below_cv_left));
-  deactivate_trapezoid( *below_cv_right_node, below_cv_left_node); //below_cv_right->remove(below_cv_left->dag_node());
-  update_largest_leaf_depth((std::max)(above_cv_left_node->depth(),
-                                       below_cv_left_node->depth()));
-  //no need to update m_number_of_dag_nodes because the number of nodes did not change.
-
-
-#ifdef CGAL_TD_DEBUG
-
-  CGAL_warning (!traits->is_empty_item(on_cv_left));
-  CGAL_warning (!traits->is_empty_item(on_cv_right));
-
-#endif
-
-  // make the merged point's representative inactive
-  deactivate_vertex(mrgp_node); //mrgp_node->remove();
-
-  CGAL_assertion(traits->is_td_edge(on_cv_left) && traits->is_active(on_cv_left));
-
-  Td_active_edge& e_left (boost::get<Td_active_edge>(on_cv_left));
-  e_left.set_next(on_cv_right);
-
-  CGAL_assertion(traits->is_td_edge(on_cv_right) && traits->is_active(on_cv_right));
-
-  //replacing the curve in the end points' trapezoids themselves (updating top/ bottom)
-  update_vtx_cw_he_after_merge (*p_left_cv, merged_he, leftp_item);
-  update_vtx_cw_he_after_merge (*p_right_cv, merged_he, rightp_item); //MICHAL: maybe I should pass the he1 & he2?
-
-#ifdef CGAL_TD_DEBUG
-
-  CGAL_warning(!traits->is_empty_item(left_cv_fraction_item));
-  CGAL_warning(!traits->is_empty_item(right_cv_fraction_item));
-
-#endif
-
-  // reevaluating number of curves
-  m_number_of_curves--;
-
-#ifdef CGAL_TD_DEBUG
-  std::cout << "\nTD::merge_edge() exited with data structure"
-            << is_valid(*m_dag_root) << std::endl;
-  write(std::cout,*m_dag_root,*traits) << std::endl;
-#endif
-
-}
-
-
-//-----------------------------------------------------------------------------
-// Description:
-//
-template <class Td_traits>
-unsigned long
-Trapezoidal_decomposition_2<Td_traits>
-::longest_query_path_length_rec(bool minus_inf, Dag_node& min_node,
-                                bool plus_inf, Dag_node& max_node,
-                                Dag_node& node)
-{
-  //if NULL
-  if (node.is_null())
-    return 0;
-
-  //if not valid range or empty return 0
-  if (!minus_inf && !plus_inf)
-  {
-    Td_map_item min_node_item(min_node.get_data());
-    if (traits->is_fictitious_vertex(min_node_item))
-    {
-      const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item)));
-
-      Td_map_item max_node_item(max_node.get_data());
-      if (traits->is_fictitious_vertex(max_node_item))
-      {
-        const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
-
-        //min-fict, max-fict
-        if (!is_end_point_left_low(min_ce, max_ce))
-          return 0;
-      }
-      else
-      {
-        const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
-
-        //min-fict, max-pt
-        //if smaller than the point represented by min_node
-        if (!is_end_point_left_low(min_ce, max_p))
-          return 0;
-      }
-    }
-    else
-    {
-      const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item));
-
-      Td_map_item max_node_item(max_node.get_data());
-      if (traits->is_fictitious_vertex(max_node_item))
-      {
-        const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
-
-        //min-pt, max-fict
-        if (!is_end_point_left_low(min_p, max_ce))
-          return 0;
-      }
-      else
-      {
-        const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
-
-        //min-pt, max-pt
-        //if smaller than the point represented by min_node
-        if (!is_end_point_left_low(min_p, max_p))
-          return 0;
-      }
-    }
-  }
-
-
-  //if node represents a trapezoid
-  if (traits->is_td_trapezoid(node.get_data()) )
-    return 1;
-
-  //if node represents a curve
-  if (!traits->is_td_vertex(node.get_data()) )
-    return (1 + (std::max)(
-                  longest_query_path_length_rec(minus_inf, min_node,
-                                                plus_inf, max_node,
-                                                node.left_child()) ,
-                  longest_query_path_length_rec(minus_inf, min_node,
-                                                plus_inf, max_node,
-                                                node.right_child()) ));
-
-  //if node represents a vertex
-  Td_map_item curr_item(node.get_data());
-  //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
-
-  //if node is smaller than min, use min in the next recursion min bound, otherwise use node
-  Dag_node new_min_node = node;
-  if (!minus_inf)
-  {
-    Td_map_item min_node_item(min_node.get_data());
-    if (traits->is_fictitious_vertex(min_node_item))
-    {
-      const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item)));
-      //if smaller than the point represented by min_node
-      //if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) ||
-      //    (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_ce) ))
-      if (is_end_point_right_top(min_ce, node))
-      {
-        new_min_node = min_node;
-      }
-    }
-    else
-    {
-      const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item));
-      //if smaller than the point represented by min_node
-      //if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) ||
-      //    (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_p) ))
-      if (is_end_point_right_top(min_p, node))
-      {
-        new_min_node = min_node;
-      }
-    }
-  }
-
-  //if node is larger than max, use max in the next recursion max bound, otherwise use node
-  Dag_node new_max_node = node;
-  if (!plus_inf)
-  {
-    Td_map_item max_node_item(max_node.get_data());
-    if (traits->is_fictitious_vertex(max_node_item))
-    {
-      const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
-      //if larger than the point represented by max_node
-      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) ||
-      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_ce) ))
-      if (is_end_point_left_low(max_ce, node))
-      {
-        new_max_node = max_node;
-      }
-    }
-    else
-    {
-      const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
-      //if smaller than the point represented by min_node
-      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) ||
-      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_p) ))
-      if (is_end_point_left_low(max_p, node))
-      {
-        new_max_node = max_node;
-      }
-    }
-  }
-  //o/w continue with updated parameters
-  return (1 + (std::max)(
-                  longest_query_path_length_rec(minus_inf, min_node,
-                                                false, new_max_node,
-                                                node.left_child()) ,
-                  longest_query_path_length_rec(false, new_min_node,
-                                                plus_inf, max_node,
-                                                node.right_child()) ));
-
-}
-
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_polyline_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_polyline_traits_2.h
deleted file mode 100644
index aa48ded..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_polyline_traits_2.h
+++ /dev/null
@@ -1,3007 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University(Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
-//                 Ron Wein  <wein at post.tau.ac.il>
-//                 Dror Atariah <dror.atariah at fu-berlin.de>
-
-#ifndef CGAL_ARR_POLYLINE_TRAITS_2_H
-#define CGAL_ARR_POLYLINE_TRAITS_2_H
-
-/*! \file
- * The traits-class for the linear piece-wiese(polyline) type of curves of the
- * arrangement package.
- */
-
-#include <iterator>
-#include <boost/type_traits/is_same.hpp>
-
-#include <CGAL/basic.h>
-#include <CGAL/tags.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_geometry_traits/Polyline_2.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_enums.h>
-
-namespace CGAL {
-
-  template <typename SegmentTraits_2 = Arr_segment_traits_2<> >
-  class Arr_polyline_traits_2 {
-  public:
-    typedef SegmentTraits_2                          Segment_traits_2;
-
-    // Tag definitions:
-    typedef Tag_true                                 Has_left_category;
-    typedef Tag_true                                 Has_merge_category;
-    typedef Tag_false                                Has_do_intersect_category;
-
-    typedef typename Segment_traits_2::Left_side_category   Left_side_category;
-    typedef typename Segment_traits_2::Bottom_side_category Bottom_side_category;
-    typedef typename Segment_traits_2::Top_side_category    Top_side_category;
-    typedef typename Segment_traits_2::Right_side_category  Right_side_category;
-
-    typedef typename Arr_are_all_sides_oblivious_tag
-    <Left_side_category, Bottom_side_category,
-     Top_side_category, Right_side_category>::result
-    Are_all_sides_oblivious_tag;
-
-  private:
-    typedef Arr_polyline_traits_2<Segment_traits_2>  Self;
-
-    // Data members:
-    const Segment_traits_2* m_seg_traits;    // The base segment-traits class.
-    bool m_own_traits;
-
-  private:
-    enum { INVALID_INDEX = 0xffffffff };
-
-  public:
-    /*! Default constructor */
-    Arr_polyline_traits_2() :
-      m_seg_traits(new Segment_traits_2()), m_own_traits(true) {}
-
-    /*! Constructor with given segment traits
-     * \param seg_traits an already existing segment tarits which is passed will
-     *        be used by the class.
-     */
-    Arr_polyline_traits_2(const Segment_traits_2* seg_traits) :
-      m_seg_traits(seg_traits), m_own_traits(false){ }
-
-    /* Destructor
-     * Deletes the segment tarits class in case it was constructed during the
-     * construction of this.
-     */
-    ~Arr_polyline_traits_2(){
-      if (m_own_traits)
-        delete m_seg_traits;
-    }
-
-    /*! Obtain the segment traits.
-     * \return the segment traits.
-     */
-    const Segment_traits_2* segment_traits_2() const { return m_seg_traits; }
-
-    /// \name Types and functors inherited from the base segment traits.
-    //@{
-
-    // Traits types:
-    typedef typename Segment_traits_2::Point_2            Point_2;
-    typedef typename Segment_traits_2::X_monotone_curve_2 X_monotone_segment_2;
-    typedef typename Segment_traits_2::Curve_2            Segment_2;
-
-    /*!
-     * A polyline represents a general continuous piecewise-linear
-     * curve, without degenerated segments.
-     */
-    typedef polyline::Polyline_2<Segment_2, Point_2>      Curve_2;
-    /*!
-     * An x monotone polyline represents a continuous piecewise-linear
-     * curve which is either strongly x-monotone or vertical. Again,
-     * the polyline is without degenerated segments.
-     */
-    typedef polyline::X_monotone_polyline_2<X_monotone_segment_2, Point_2>
-      X_monotone_curve_2;
-
-    typedef typename Segment_traits_2::Multiplicity       Multiplicity;
-
-    /*! Compare the x-coordinates of two points. */
-    class Compare_x_2 {
-    private:
-      // Oblivious implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2,
-                                   Arr_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs1) :
-          seg_traits->construct_min_vertex_2_object()(xs1);
-        const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs2) :
-          seg_traits->construct_min_vertex_2_object()(xs2);
-        return seg_traits->compare_x_2_object()(p1, p2);
-      }
-
-      // Boundary implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2,
-                                   Arr_not_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Parameter_space_in_x_2 ps_x =
-          seg_traits->parameter_space_in_x_2_object();
-        const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
-        const Arr_parameter_space ps_x2 = ps_x(xs2, ce2);
-
-        if (ps_x1 != ps_x2) {
-          if (ps_x1 == ARR_LEFT_BOUNDARY) return LARGER;
-          if (ps_x1 == ARR_RIGHT_BOUNDARY) return SMALLER;
-          if (ps_x2 == ARR_LEFT_BOUNDARY) return SMALLER;
-          if (ps_x2 == ARR_RIGHT_BOUNDARY) return LARGER;
-        }
-
-        // ps_x1 == ps_x2
-        if (ps_x1 != ARR_INTERIOR) return EQUAL;
-
-        typename Segment_traits_2::Parameter_space_in_y_2 ps_y =
-          seg_traits->parameter_space_in_y_2_object();
-        const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
-        const Arr_parameter_space ps_y2 = ps_y(xs2, ce2);
-        if (ps_y1 == ARR_INTERIOR) {
-          const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-            seg_traits->construct_max_vertex_2_object()(xs1) :
-            seg_traits->construct_min_vertex_2_object()(xs1);
-          if (ps_y2 == ARR_INTERIOR) {
-            const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-              seg_traits->construct_max_vertex_2_object()(xs2) :
-              seg_traits->construct_min_vertex_2_object()(xs2);
-            return seg_traits->compare_x_2_object()(p1, p2);
-          }
-          typename Segment_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
-            seg_traits->compare_x_on_boundary_2_object();
-          return cmp_x_on_bnd(p1, xs2, ce2);
-        }
-        if (ps_y2 == ARR_INTERIOR) {
-          const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-            seg_traits->construct_max_vertex_2_object()(xs2) :
-            seg_traits->construct_min_vertex_2_object()(xs2);
-          typename Segment_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
-            seg_traits->compare_x_on_boundary_2_object();
-          return opposite(cmp_x_on_bnd(p2, xs1, ce1));
-        }
-        return seg_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
-      }
-
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_x_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /*! Compare the x-coordinates of two directional points.
-       * \param p1 the first directional point.
-       * \param p2 the second directional point.
-       * \return SMALLER - x(p1) < x(p2);
-       *         EQUAL   - x(p1) = x(p2);
-       *         LARGER  - x(p1) > x(p2).
-       * \pre p1 does not lie on the boundary.
-       * \pre p2 does not lie on the boundary.
-       */
-      Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-      { return m_poly_traits.segment_traits_2()->compare_x_2_object()(p1, p2); }
-
-      /*! Compare two ends of x-monotone curves in x.
-       * \param xs1 the first curve.
-       * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
-       *            ARR_MIN_END - the minimal end of xs1 or
-       *            ARR_MAX_END - the maximal end of xs1.
-       * \param xs2 the second curve.
-       * \param ce2 the curve-end indicator of the second x-monoton curve xs2:
-       *            ARR_MIN_END - the minimal end of xs2 or
-       *            ARR_MAX_END - the maximal end of xs2.
-       */
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2)
-      { return operator()(xs1, ce1, xs2, ce2, Are_all_sides_oblivious_tag()); }
-    };
-
-    /*! Get a Compare_x_2 functor object. */
-    Compare_x_2 compare_x_2_object() const
-    { return Compare_x_2(*this); }
-
-    /*! Compare two curve-ends or points lexigoraphically: by x, then by y. */
-    class Compare_xy_2 {
-    private:
-      // Oblivious implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2,
-                                   Arr_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs1) :
-          seg_traits->construct_min_vertex_2_object()(xs1);
-        const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs2) :
-          seg_traits->construct_min_vertex_2_object()(xs2);
-        return seg_traits->compare_xy_2_object()(p1, p2);
-      }
-
-      // Boundary implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2,
-                                   Arr_not_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Parameter_space_in_x_2 ps_x =
-          seg_traits->parameter_space_in_x_2_object();
-        typename Segment_traits_2::Parameter_space_in_y_2 ps_y =
-          seg_traits->parameter_space_in_y_2_object();
-        const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
-        const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
-        const Arr_parameter_space ps_x2 = ps_x(xs2, ce2);
-        const Arr_parameter_space ps_y2 = ps_y(xs2, ce2);
-
-        if (ps_x1 != ps_x2) {
-          if (ps_x1 == ARR_LEFT_BOUNDARY) return LARGER;
-          if (ps_x1 == ARR_RIGHT_BOUNDARY) return SMALLER;
-          if (ps_x2 == ARR_LEFT_BOUNDARY) return SMALLER;
-          if (ps_x2 == ARR_RIGHT_BOUNDARY) return LARGER;
-        }
-
-        if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) {
-          const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-            seg_traits->construct_max_vertex_2_object()(xs1) :
-            seg_traits->construct_min_vertex_2_object()(xs1);
-          // ps1 == ARR_INTERIOR
-
-          if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) {
-            const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-              seg_traits->construct_max_vertex_2_object()(xs2) :
-              seg_traits->construct_min_vertex_2_object()(xs2);
-
-            // ps1 == ARR_INTERIOR
-            // ps2 == ARR_INTERIOR
-            return seg_traits->compare_xy_2_object()(p1, p2);
-          }
-
-          // The cases ps_x2 == ARR_{LEFT,RIGHT}_BOUNDARY are handled above
-
-          // ps1 == ARR_INTERIOR
-          // ps_x2 == ARR_INTERIOR
-          // ps_y2 != ARR_INTERIOR
-          CGAL_assertion(ps_x2 == ARR_INTERIOR);
-          // EFEF: missing implementation for open boundary.
-          typename Segment_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
-            seg_traits->compare_x_on_boundary_2_object();
-          Comparison_result res = cmp_x_on_bnd(p1, xs2, ce2);
-          if (res != EQUAL) return res;
-          if (ps_y2 == ARR_TOP_BOUNDARY) return SMALLER;
-          CGAL_assertion(ps_y2 == ARR_BOTTOM_BOUNDARY);
-          return LARGER;
-        }
-
-        // ps1 != ARR_INTERIOR
-        if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) {
-          const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-            seg_traits->construct_max_vertex_2_object()(xs2) :
-            seg_traits->construct_min_vertex_2_object()(xs2);
-
-          // The cases ps_x1 == ARR_{LEFT,RIGHT}_BOUNDARY are handled above
-
-          // ps_x1 == ARR_INTERIOR
-          // ps_y1 != ARR_INTERIOR
-          // ps2 == ARR_INTERIOR
-          CGAL_assertion(ps_x1 == ARR_INTERIOR);
-          typename Segment_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
-            seg_traits->compare_x_on_boundary_2_object();
-          Comparison_result res = cmp_x_on_bnd(p2, xs1, ce1);
-          if (res != EQUAL) return opposite(res);
-          if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER;
-          CGAL_assertion(ps_y1 == ARR_BOTTOM_BOUNDARY);
-          return SMALLER;
-        }
-
-        // ps1 != ARR_INTERIOR
-        // ps2 != ARR_INTERIOR
-        // ps_x1 == ps_x2
-        if (ps_x1 == ARR_INTERIOR) {
-          // ps_y1 != ARR_INTERIOR
-          // ps_y2 != ARR_INTERIOR
-          Comparison_result res =
-            seg_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
-          if (res != EQUAL) return res;
-          if (ps_y1 == ps_y2) return EQUAL;
-          return (ps_y1 == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER;
-        }
-
-        CGAL_assertion(ce1 == ce2);
-        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs1) :
-          seg_traits->construct_min_vertex_2_object()(xs1);
-        const Point_2& p2 = (ce2 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs2) :
-          seg_traits->construct_min_vertex_2_object()(xs2);
-        return seg_traits->compare_y_on_boundary_2_object()(p1, p2);
-      }
-
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_xy_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /*! Compare two directional points lexigoraphically: by x, then by y.
-       * \param p1 the first enpoint directional point.
-       * \param p2 the second endpoint directional point.
-       * \return SMALLER - x(p1) < x(p2);
-       *         SMALLER - x(p1) = x(p2) and y(p1) < y(p2);
-       *         EQUAL   - x(p1) = x(p2) and y(p1) = y(p2);
-       *         LARGER  - x(p1) = x(p2) and y(p1) > y(p2);
-       *         LARGER  - x(p1) > x(p2).
-       * \pre p1 does not lie on the boundary.
-       * \pre p2 does not lie on the boundary.
-       */
-      Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-      { return m_poly_traits.segment_traits_2()->compare_xy_2_object()(p1, p2); }
-
-      /*! Compare two ends of x-monotone curves lexicographically.
-       * \param xs1 the first curve.
-       * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
-       *            ARR_MIN_END - the minimal end of xs1 or
-       *            ARR_MAX_END - the maximal end of xs1.
-       * \param xs2 the second curve.
-       * \param ce2 the curve-end indicator of the second x-monoton curve xs2:
-       *            ARR_MIN_END - the minimal end of xs2 or
-       *            ARR_MAX_END - the maximal end of xs2.
-       */
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_curve_end ce2)
-      { return operator()(xs1, ce1, xs2, ce2, Are_all_sides_oblivious_tag()); }
-    };
-
-    /*! Get a Compare_xy_2 functor object. */
-    Compare_xy_2 compare_xy_2_object() const
-    { return Compare_xy_2(*this); }
-
-    ///@}
-
-    /// \name Basic predicate functors(based on the segment traits).
-    //@{
-
-    class Number_of_points_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /* The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /* Constructor. */
-      Number_of_points_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      int operator()(const Curve_2& cv) const
-      {
-        int num_seg = cv.number_of_segments();
-        return (num_seg == 0) ? 0 : num_seg + 1;
-      }
-    };
-
-    Number_of_points_2 number_of_points_2_object() const
-    { return Number_of_points_2(this); }
-
-
-    class Construct_min_vertex_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /* Constructor. */
-      Construct_min_vertex_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*!
-       * Get the left endpoint of the x-monotone curve(segment).
-       * \param cv The polyline curve.
-       * \return The left endpoint.
-       */
-      const Point_2& operator()(const X_monotone_curve_2& cv) const
-      {
-        CGAL_assertion(cv.number_of_segments() > 0);
-
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-
-        if (seg_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER)
-          return seg_traits->construct_min_vertex_2_object()(cv[0]);
-        else
-          return seg_traits->
-            construct_min_vertex_2_object()(cv[cv.number_of_segments()-1]);
-      }
-    };
-
-    /*! Get a Construct_min_vertex_2 functor object. */
-    Construct_min_vertex_2 construct_min_vertex_2_object() const
-    { return Construct_min_vertex_2(*this); }
-
-    class Construct_max_vertex_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Construct_max_vertex_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*!
-       * Get the right endpoint of the x-monotone curve(segment).
-       * \param cv The polyline.
-       * \return The right endpoint.
-       */
-      const Point_2& operator()(const X_monotone_curve_2& cv) const
-      {
-        CGAL_assertion(cv.number_of_segments() > 0);
-
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-
-        if (seg_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER)
-          return seg_traits->
-            construct_max_vertex_2_object()(cv[cv.number_of_segments()-1]);
-        else
-          return seg_traits->construct_max_vertex_2_object()(cv[0]);
-      }
-    };
-
-    /*! Get a Construct_max_vertex_2 functor object. */
-    Construct_max_vertex_2 construct_max_vertex_2_object() const
-    { return Construct_max_vertex_2(*this); }
-
-    class Is_vertical_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Is_vertical_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /*!
-       * Check whether the given x-monotone curve is a vertical segment.
-       * \param cv The curve.
-       * \return (true) if the curve is a vertical segment;(false) otherwise.
-       */
-      bool operator()(const X_monotone_curve_2& cv) const
-      {
-        // An x-monotone polyline can represent a vertical segment only if it
-        // is comprised of vertical segments. If the first segment is vertical,
-        // all segments are vertical in an x-monotone polyline
-        return m_poly_traits.segment_traits_2()->is_vertical_2_object()(cv[0]);
-      }
-    };
-
-    /*! Get an Is_vertical_2 functor object. */
-    Is_vertical_2 is_vertical_2_object() const
-    { return Is_vertical_2(*this); }
-
-    class Compare_y_at_x_2 {
-    private:
-      // Oblivious implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        const Point_2& p = (ce1 == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs1) :
-          seg_traits->construct_min_vertex_2_object()(xs1);
-        return seg_traits->compare_y_at_x_2_object()(p, xs2);
-      }
-
-      // Boundary implementation
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2,
-                                   Arr_not_all_sides_oblivious_tag) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Parameter_space_in_x_2 ps_x =
-          seg_traits->parameter_space_in_x_2_object();
-        typename Segment_traits_2::Parameter_space_in_y_2 ps_y =
-          seg_traits->parameter_space_in_y_2_object();
-        typename Segment_traits_2::Construct_min_vertex_2 min_vertex =
-          seg_traits->construct_min_vertex_2_object();
-        typename Segment_traits_2::Construct_max_vertex_2 max_vertex =
-          seg_traits->construct_max_vertex_2_object();
-
-        const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
-        const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
-
-        CGAL_assertion(((ce1 == ARR_MAX_END) && (ps_x1 != ARR_LEFT_BOUNDARY)) ||
-                       ((ce1 == ARR_MIN_END) && (ps_x1 != ARR_RIGHT_BOUNDARY)));
-
-        if (ps_x1 == ARR_INTERIOR) {
-          if (ps_y1 == ARR_TOP_BOUNDARY) {
-            typename Segment_traits_2::Equal_2 equal =
-              seg_traits->equal_2_object();
-            const Point_2& p = (ce1 == ARR_MAX_END) ?
-              max_vertex(xs1) : min_vertex(xs1);
-            if (equal(p, max_vertex(xs2))) return EQUAL;
-            if (equal(p, min_vertex(xs2))) return EQUAL;
-            return LARGER;
-          }
-          if (ps_y1 == ARR_BOTTOM_BOUNDARY) {
-            typename Segment_traits_2::Equal_2 equal =
-              seg_traits->equal_2_object();
-            const Point_2& p = (ce1 == ARR_MAX_END) ?
-              max_vertex(xs1) : min_vertex(xs1);
-            if (equal(p, max_vertex(xs2))) return EQUAL;
-            if (equal(p, min_vertex(xs2))) return EQUAL;
-            return SMALLER;
-          }
-          // ps_y1 == ARR_INTERIOR
-          const Point_2& p = (ce1 == ARR_MAX_END) ?
-            max_vertex(xs1) : min_vertex(xs1);
-          return seg_traits->compare_y_at_x_2_object()(p, xs2);
-        }
-        // ps_x1 == ARR_RIGHT_BOUNDARY || ARR_LEFT_BOUNDARY
-        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
-          max_vertex(xs1) : min_vertex(xs1);
-        const Point_2& p2 = (ce1 == ARR_MAX_END) ?
-          max_vertex(xs2) : min_vertex(xs2);
-        return seg_traits->compare_y_on_boundary_2_object()(p1, p2);
-      }
-
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_y_at_x_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*!
-       * Return the location of the given point with respect to the input curve.
-       * \param p The point.
-       * \param xcv The polyline curve.
-       * \pre p is in the x-range of cv.
-       * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-       *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-       *         EQUAL if p lies on the curve.
-       */
-      Comparison_result operator()(const Point_2& p,
-                                   const X_monotone_curve_2& xcv) const
-      {
-        // Get the index of the segment in xcv containing p.
-        std::size_t i = m_poly_traits.locate(xcv, p);
-        CGAL_precondition(i != INVALID_INDEX);
-
-        // Compare the segment xcv[i] and p.
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        return seg_traits->compare_y_at_x_2_object()(p, xcv[i]);
-      }
-
-      /*!
-       * Return the location of the given curve_end with respect to the input
-       * curve.
-       * \param xcv The polyline curve.
-       * \param ce the curve-end indicator of the x-monotone segment xl:
-       *            ARR_MIN_END - the minimal end of xl or
-       *            ARR_MAX_END - the maximal end of xl.
-       * \param xcv The polyline curve.
-       * \pre the curve-end is in the x-range of xcv.
-       * \return SMALLER if if y(xs, ce) < cv(x(xs, ce)), i.e.  the curve-end
-       *           is below the curve xcv;
-       *         LARGER if y(xs, ce) > cv(x(xs, ce)), i.e. the curve-end is
-       *           above the curve xcv;
-       *         EQUAL if the curve-end lies on the curve xcv.
-       */
-      Comparison_result operator()(const X_monotone_segment_2& xs1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_segment_2& xs2) const
-      { return operator()(xs1, ce1, xs2, Are_all_sides_oblivious_tag()); }
-    };
-
-    /*! Get a Compare_y_at_x_2 functor object. */
-    Compare_y_at_x_2 compare_y_at_x_2_object() const
-    { return Compare_y_at_x_2(*this); }
-
-    class Compare_y_at_x_left_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_y_at_x_left_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*!
-       * Compare the y value of two x-monotone curves immediately to the left
-       * of their intersection point.
-       * \param cv1 The first polyline curve.
-       * \param cv2 The second polyline curve.
-       * \param p The intersection point.
-       * \pre The point p lies on both curves, and both of them must be also be
-       *      defined(lexicographically) to its left.
-       * \return The relative position of cv1 with respect to cv2 immdiately to
-       *         the left of p: SMALLER, LARGER or EQUAL.
-       */
-      Comparison_result operator()(const X_monotone_curve_2& cv1,
-                                   const X_monotone_curve_2& cv2,
-                                   const Point_2& p) const
-      {
-        // Get the indices of the segments in cv1 and cv2 containing p and
-        // defined to its left.
-        std::size_t i1 = m_poly_traits.locate_side(cv1, p, false);
-        std::size_t i2 = m_poly_traits.locate_side(cv2, p, false);
-
-        CGAL_precondition(i1 != INVALID_INDEX);
-        CGAL_precondition(i2 != INVALID_INDEX);
-
-        // Compare cv1[i1] and cv2[i2] at p's left.
-        return m_poly_traits.segment_traits_2()->
-          compare_y_at_x_left_2_object()(cv1[i1], cv2[i2], p);
-      }
-    };
-
-    /*! Get a Compare_y_at_x_left_2 functor object. */
-    Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
-    { return Compare_y_at_x_left_2(*this); }
-
-    class Compare_y_at_x_right_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_y_at_x_right_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*!
-       * Compare the y value of two x-monotone curves immediately to the right
-       * of their intersection point.
-       * \param cv1 The first curve.
-       * \param cv2 The second curve.
-       * \param p The intersection point.
-       * \pre The point p lies on both curves, and both of them must be also be
-       *      defined(lexicographically) to its right.
-       * \return The relative position of cv1 with respect to cv2 immdiately to
-       *         the right of p: SMALLER, LARGER or EQUAL.
-       */
-      Comparison_result operator()(const X_monotone_curve_2& cv1,
-                                   const X_monotone_curve_2& cv2,
-                                   const Point_2& p) const
-      {
-        // Get the indices of the segments in cv1 and cv2 containing p and
-        // defined to its right.
-        std::size_t i1=m_poly_traits.locate_side(cv1, p, true);
-        std::size_t i2=m_poly_traits.locate_side(cv2, p, true);
-
-        CGAL_precondition(i1 != INVALID_INDEX);
-        CGAL_precondition(i2 != INVALID_INDEX);
-
-        // Compare cv1[i1] and cv2[i2] at p's right.
-        return m_poly_traits.segment_traits_2()->
-          compare_y_at_x_right_2_object()(cv1[i1], cv2[i2], p);
-      }
-    };
-
-    /*! Get a Compare_y_at_x_right_2 functor object. */
-    Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
-    { return Compare_y_at_x_right_2(*this); }
-
-    class Equal_2 {
-    protected:
-
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-
-      /*! Constructor. */
-      Equal_2(const Polyline_traits_2& poly_tr) : m_poly_traits(poly_tr) {}
-
-      /*!
-       * Check if the two points are the same.
-       * \param p1 The first point.
-       * \param p2 The second point.
-       * \return (true) if the two point are the same;(false) otherwise.
-       */
-      bool operator()(const Point_2& p1, const Point_2& p2) const
-      { return m_poly_traits.segment_traits_2()->equal_2_object()(p1, p2); }
-
-      /*!
-       * Check if the two x-monotone curves are the same(have the same graph).
-       * \param cv1 The first curve.
-       * \param cv2 The second curve.
-       * \return(true) if the two curves are the same;(false) otherwise.
-       */
-      bool operator()(const X_monotone_curve_2 & cv1,
-                      const X_monotone_curve_2 & cv2) const
-      {
-        // Check the pairwise equality of the contained segments.
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Equal_2 equal =
-          seg_traits->equal_2_object();
-        typename Segment_traits_2::Compare_x_2 compare_x =
-          seg_traits->compare_x_2_object();
-        typename Segment_traits_2::Compare_y_at_x_2 compare_y_at_x =
-          seg_traits->compare_y_at_x_2_object();
-        typename Segment_traits_2::Construct_max_vertex_2 max_vertex =
-          seg_traits->construct_max_vertex_2_object();
-        typename Segment_traits_2::Compare_endpoints_xy_2 comp_endpt =
-          seg_traits->compare_endpoints_xy_2_object();
-        Is_vertical_2 is_vertical = m_poly_traits.is_vertical_2_object();
-        Construct_min_vertex_2 xpoly_min_v =
-          m_poly_traits.construct_min_vertex_2_object();
-        Construct_max_vertex_2 xpoly_max_v =
-          m_poly_traits.construct_max_vertex_2_object();
-
-        // The first and last points of the segments should be equal.
-        bool res = equal(xpoly_min_v(cv1), xpoly_min_v(cv2));
-        if (!res) return false;
-        res = equal(xpoly_max_v(cv1), xpoly_max_v(cv2));
-        if (!res) return false;
-
-        // If the first and last points are equal and the curves are vertical,
-        // it means that it is equal.
-        bool ver1 = is_vertical(cv1);
-        bool ver2 = is_vertical(cv2);
-        // both curves are vertical and therefore equal.
-        if (ver1 && ver2) return true;
-        // one is vertical and the other is not - hence not equal.
-        if (ver1 || ver2) return false;
-
-        // If we arrived here it means that the first and last point of the
-        // curve are equal.
-        std::size_t i = 0;
-        std::size_t j = 0;
-        std::size_t n1 = cv1.number_of_segments();
-        std::size_t n2 = cv2.number_of_segments();
-        Comparison_result is_cv1_left_to_right = comp_endpt(cv1[0]);
-        Comparison_result is_cv2_left_to_right = comp_endpt(cv2[0]);
-
-        while ((i < (n1-1)) || (j < (n2-1))) {
-          Point_2 point1, point2;
-          std::size_t cv1_seg_ind, cv2_seg_ind;
-          if (SMALLER == is_cv1_left_to_right) {
-            cv1_seg_ind = i;
-            point1 = max_vertex(cv1[cv1_seg_ind]);
-          }
-          else {
-            cv1_seg_ind = n1 - 1 - i;
-            point1 = max_vertex(cv1[cv1_seg_ind]);
-          }
-          if (SMALLER == is_cv2_left_to_right) {
-            cv2_seg_ind = j;
-            point2 = max_vertex(cv2[cv2_seg_ind]);
-          }
-          else {
-            cv2_seg_ind = n2 - 1 - j;
-            point2 = max_vertex(cv2[cv2_seg_ind]);
-          }
-
-          bool res = equal(point1, point2);
-          // Easy case - the two points are equal
-          if (res) {
-            ++i;
-            ++j;
-          }
-          else {
-            Comparison_result res_x = compare_x(point1,point2);
-            // Check if the different point is a collinear point situated on
-            // the line between its two neighbors.
-            if (SMALLER == res_x) {
-              Comparison_result res_y_at_x =
-                compare_y_at_x(point1, cv2[cv2_seg_ind]);
-              if (EQUAL == res_y_at_x) ++i;
-              else return false;
-            }
-            else if (LARGER == res_x) {
-              Comparison_result res_y_at_x =
-                compare_y_at_x(point2,cv1[cv1_seg_ind]);
-              if (EQUAL == res_y_at_x) ++j;
-              else return false;
-            }
-            else {
-              return false;
-            }
-          }
-        }
-        return true;
-      }
-    };
-
-    /*! Get an Equal_2 functor object. */
-    Equal_2 equal_2_object() const
-    { return Equal_2(*this); }
-
-    class Compare_endpoints_xy_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
-      /*! The traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_endpoints_xy_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*!
-       * Compare the endpoints of an \(x\)-monotone curve lexicographically.
-       * (assuming the curve has a designated source and target points).
-       * \param cv The curve.
-       * \return SMALLER if the curve is oriented left-to-right;
-       *         LARGER if the curve is oriented right-to-left.
-       */
-      Comparison_result operator()(const X_monotone_curve_2& xcv) const
-      {
-        return (m_poly_traits.segment_traits_2()->
-                compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) ?
-          (SMALLER) : (LARGER);
-      }
-    };
-
-    Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-    { return Compare_endpoints_xy_2(*this); }
-
-    class Construct_opposite_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
-      /*! The traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor */
-      Construct_opposite_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*!
-       * Construct the reversed \(x\)-monotone polyline of the input.
-       * Note that the functor constructs the opposites of _all_ segments
-       * constituting xcv.
-       * \param xcv the \(x\)-monotone polyline to be reveres
-       * \pre xcv contains at least one segment
-       * \return An \(x\)-monotone polyline with the same graph as the input xcv
-       *         only with a reverse orientation.
-       */
-      X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Construct_opposite_2 const_op =
-          seg_traits->construct_opposite_2_object();
-        std::vector<X_monotone_segment_2> rev_segs;
-        typename X_monotone_curve_2::Segment_const_iterator it;
-        for (it = xcv.begin_segments(); it != xcv.end_segments(); ++it)
-          rev_segs.push_back(const_op(*it));
-        return X_monotone_curve_2(rev_segs.rbegin(),rev_segs.rend());
-      }
-    };
-
-    Construct_opposite_2 construct_opposite_2_object() const
-    { return Construct_opposite_2(*this); }
-
-    ///@}
-
-    /// \name Construction functors(based on the segment traits).
-    //@{
-
-    class Make_x_monotone_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Make_x_monotone_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*!
-       * Cut the given curve into x-monotone sub-curves and insert them into the
-       * given output iterator.
-       *
-       * \pre if `cv` is not empty then it must be continuous and well-oriented.
-       * \param cv The curve.
-       * \param oi The output iterator, whose value-type is Object. The output
-       *           object is a wrapper of a X_monotone_curve_2.
-       * \return The past-the-end iterator.
-       */
-      template<class OutputIterator>
-      OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const
-      {
-        std::cout << std::endl;
-
-        typedef typename Curve_2::Segment_const_iterator const_seg_iterator;
-
-        // If the polyline is empty, return.
-        if (cv.number_of_segments() == 0) return oi;
-
-        Construct_x_monotone_curve_2 ctr_x_curve =
-          m_poly_traits.construct_x_monotone_curve_2_object();
-
-        typename Segment_traits_2::Make_x_monotone_2 make_seg_x_monotone =
-          m_poly_traits.segment_traits_2()->make_x_monotone_2_object();
-
-        typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-          m_poly_traits.segment_traits_2()->compare_endpoints_xy_2_object();
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        typename Segment_traits_2::Construct_opposite_2 ctr_seg_opposite =
-          m_poly_traits.segment_traits_2()->construct_opposite_2_object();
-#endif
-
-        // Convert the input polyline to a sequence of CGAL objects, such
-        // that each Object wraps an x-monotone segment.
-        std::vector<Object> x_seg_objects;
-        const_seg_iterator it_segs;
-        for (it_segs = cv.begin_segments(); it_segs != cv.end_segments();
-             ++it_segs)
-          make_seg_x_monotone(*it_segs, std::back_inserter(x_seg_objects));
-        typename std::vector<Object>::iterator it = x_seg_objects.begin();
-        X_monotone_segment_2 x_seg;
-#if defined (CGAL_NO_ASSERTIONS)
-        CGAL::assign(x_seg, *it);
-#else
-        bool assign_res = CGAL::assign(x_seg, *it);
-        CGAL_assertion(assign_res);
-#endif
-
-        // If the polyline consists of a single x-monotone segment, return.
-        if (x_seg_objects.size() == 1) {
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-          if (cmp_seg_endpts(x_seg) == LARGER)
-            x_seg = ctr_seg_opposite(x_seg);
-#endif
-          *oi++ = make_object(ctr_x_curve(x_seg));
-          x_seg_objects.clear();
-          return oi;
-        }
-
-        CGAL_precondition_code
-          (
-           // To be used in order to verify continuity and well-orientedness
-           // of the input curve cv.
-           typename Segment_traits_2::Construct_min_vertex_2 min_seg_v =
-             m_poly_traits.segment_traits_2()->construct_min_vertex_2_object();
-           typename Segment_traits_2::Construct_max_vertex_2 max_seg_v =
-             m_poly_traits.segment_traits_2()->construct_max_vertex_2_object();
-           typename Segment_traits_2::Equal_2 equal =
-             m_poly_traits.segment_traits_2()->equal_2_object();
-           Point_2 last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
-             max_seg_v(x_seg) : min_seg_v(x_seg);
-           Point_2 next_src;
-           );
-
-        // The polyline consists of at least 2 x-monotone segments:
-        Push_back_2 push_back = m_poly_traits.push_back_2_object();
-        typename Segment_traits_2::Is_vertical_2 is_seg_vertical =
-          m_poly_traits.segment_traits_2()->is_vertical_2_object();
-
-        bool is_start_vertical = is_seg_vertical(x_seg);
-        Comparison_result start_dir = cmp_seg_endpts(x_seg);
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        Push_front_2 push_front = m_poly_traits.push_front_2_object();
-        if (cmp_seg_endpts(x_seg) == LARGER)
-          x_seg = ctr_seg_opposite(x_seg);
-#endif
-        X_monotone_curve_2 x_polyline = ctr_x_curve(x_seg);
-
-        for (++it; it != x_seg_objects.end(); ++it) {
-          X_monotone_segment_2 x_seg;
-#if defined (CGAL_NO_ASSERTIONS)
-          CGAL::assign(x_seg, *it);
-#else
-          bool assign_res = CGAL::assign(x_seg, *it);
-          CGAL_assertion(assign_res);
-#endif
-
-          // Test that cv is continuous and well-oriented.
-          CGAL_precondition_code
-            (
-             next_src = (cmp_seg_endpts(x_seg) == SMALLER) ?
-               min_seg_v(x_seg) : max_seg_v(x_seg);
-             );
-          CGAL_precondition_msg
-            (
-             equal(last_target, next_src),
-             "cv must form a continuous and well oriented curve."
-             );
-          CGAL_precondition_code
-            (
-             last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
-               max_seg_v(x_seg) : min_seg_v(x_seg);
-             );
-
-          if ((cmp_seg_endpts(x_seg) != start_dir) ||
-              (is_seg_vertical(x_seg) != is_start_vertical))
-          {
-            // Construct an x-monotone curve from the sub-range which was found
-            *oi++ = make_object(x_polyline);
-            is_start_vertical = is_seg_vertical(x_seg);
-            start_dir = cmp_seg_endpts(x_seg);
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-            if (cmp_seg_endpts(x_seg) == LARGER)
-              x_seg = ctr_seg_opposite(x_seg);
-#endif
-            x_polyline = ctr_x_curve(x_seg);
-          }
-          else {
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-            if (cmp_seg_endpts(x_seg) == LARGER) {
-              x_seg = ctr_seg_opposite(x_seg);
-              push_front(x_polyline, x_seg);
-            }
-            else
-              push_back(x_polyline, x_seg);
-#else
-            push_back(x_polyline, x_seg);
-#endif
-          }
-        }
-        if (x_polyline.number_of_segments() != 0)
-          *oi++ = make_object(x_polyline);
-        x_seg_objects.clear();
-        return oi;
-      }
-    };
-
-    /*! Get a Make_x_monotone_2 functor object. */
-    Make_x_monotone_2 make_x_monotone_2_object() const
-    { return Make_x_monotone_2(*this); }
-
-    /* Functor to augment a polyline by either adding a vertex or a segment
-     * at the back.
-     * TODO: Test all the operator()'s. (Don't forget vertical cases!)
-     */
-    class Push_back_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Push_back_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /* Append a point `p` to an existing polyline `cv` at the back. */
-      void operator()(Curve_2& cv, const Point_2& p) const
-      {
-        typedef typename Curve_2::Segments_size_type size_type;
-        size_type num_seg = cv.number_of_segments();
-        CGAL_precondition(num_seg > 0);
-        int last_seg = num_seg-1;
-
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-          seg_traits->compare_endpoints_xy_2_object();
-
-        /*
-         * Since it is desired to maintain `cv` well-oriented, we have
-         * to append the segment [cv[last_seg].target(),p]. The
-         * following test determines which end of the last segment is
-         * the target, i.e. the actual end of `cv`.
-         */
-        if (cmp_seg_endpts(cv[last_seg]) == SMALLER) {
-          typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-            seg_traits->construct_max_vertex_2_object();
-          cv.push_back(Segment_2(get_max_v(cv[last_seg]), p));
-        }
-        else {
-          typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-            seg_traits->construct_min_vertex_2_object();
-          cv.push_back(Segment_2(get_min_v(cv[last_seg]), p));
-        }
-      }
-
-
-      /* Append a segment `seg` to an existing polyline `cv`. If `cv` is
-         empty, `seg` will be its first segment. */
-      void operator()(Curve_2& cv, const Segment_2& seg) const
-      { cv.push_back(seg); }
-
-      /* Append a point `p` to an existing polyline `xcv` at the back. */
-      void operator()(X_monotone_curve_2& xcv, const Point_2& p) const
-      {
-        typedef typename X_monotone_curve_2::Segments_size_type size_type;
-        size_type num_seg = xcv.number_of_segments();
-        CGAL_precondition(num_seg > 0);
-
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        CGAL_precondition_code
-          (
-           typename Segment_traits_2::Compare_x_2 comp_x =
-             seg_traits->compare_x_2_object();
-           typename Segment_traits_2::Compare_xy_2 comp_xy =
-             seg_traits->compare_xy_2_object();
-           Is_vertical_2 is_vertical = m_poly_traits.is_vertical_2_object();
-           );
-
-        if (seg_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) {
-          // xcv is oriented left-to-right
-          typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-            seg_traits->construct_max_vertex_2_object();
-          CGAL_precondition
-            (
-             (!is_vertical(xcv) &&
-              (comp_x(get_max_v(xcv[num_seg-1]), p) == SMALLER)) ||
-             (is_vertical(xcv) &&
-              (comp_x(get_max_v(xcv[num_seg-1]), p) == EQUAL) &&
-              (comp_xy(get_max_v(xcv[num_seg-1]), p) == SMALLER))
-             );
-          xcv.push_back(X_monotone_segment_2(get_max_v(xcv[num_seg-1]), p));
-        }
-        else {
-          // xcv is oriented right-to-left
-          typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-            seg_traits->construct_min_vertex_2_object();
-          CGAL_precondition
-            (
-             (!is_vertical(xcv) &&
-              (comp_x(get_min_v(xcv[num_seg-1]), p) == LARGER)) ||
-             (is_vertical(xcv) &&
-              (comp_x(get_min_v(xcv[num_seg-1]), p) == EQUAL) &&
-              (comp_xy(get_min_v(xcv[num_seg-1]), p) == LARGER))
-             );
-          xcv.push_back(X_monotone_segment_2(get_min_v(xcv[num_seg-1]), p));
-        }
-      }
-
-      /* Append a segment `seg` to an existing polyline `xcv` at the back. */
-      void operator()(X_monotone_curve_2& xcv,
-                      const X_monotone_segment_2& seg) const
-      {
-        CGAL_precondition_code
-          (
-           typedef typename X_monotone_curve_2::Segments_size_type size_type;
-           size_type num_seg = xcv.number_of_segments();
-           const Segment_traits_2* seg_traits =
-             m_poly_traits.segment_traits_2();
-           typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-             seg_traits->compare_endpoints_xy_2_object();
-           Comparison_result dir = cmp_seg_endpts(seg);
-           typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-             seg_traits->construct_max_vertex_2_object();
-           typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-             seg_traits->construct_min_vertex_2_object();
-           typename Segment_traits_2::Equal_2 equal =
-             seg_traits->equal_2_object();
-           typename Segment_traits_2::Is_vertical_2 is_vertical =
-             seg_traits->is_vertical_2_object();
-           );
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              ((is_vertical(xcv[0]) && is_vertical(seg)) ||
-                               (!is_vertical(xcv[0]) && !is_vertical(seg))),
-                              "xcv is vertical and seg is not or vice versa!");
-
-        CGAL_precondition_msg((num_seg == 0) || (cmp_seg_endpts(xcv[0]) == dir),
-                              "xcv and seg do not have the same orientation!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              !equal(get_min_v(seg), get_max_v(seg)),
-                              "Seg degenerates to a point!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              (((dir != SMALLER) ||
-                                equal(get_max_v(xcv[num_seg-1]),
-                                      get_min_v(seg)))),
-                              "Seg does not extend to the right!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              (((dir != LARGER) ||
-                                equal(get_min_v(xcv[num_seg-1]),
-                                      get_max_v(seg)))),
-                              "Seg does not extend to the left!");
-
-        xcv.push_back(seg);
-      }
-    };
-
-    /*! Get a Push_back_2 functor object. */
-    Push_back_2 push_back_2_object() const
-    { return Push_back_2(*this); }
-
-    /* Functor to augment a polyline by either adding a vertex or a segment
-     * at the front.
-     * TODO: Test all the operator()'s. (Don't forget vertical cases!)
-     */
-    class Push_front_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Push_front_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /* Append a point `p` to an existing polyline `cv` at the front. */
-      void operator()(Curve_2& cv, const Point_2& p) const
-      {
-        CGAL_precondition_code
-          (
-           typedef typename Curve_2::Segments_size_type size_type;
-           size_type num_seg = cv.number_of_segments();
-           );
-        CGAL_precondition(num_seg > 0);
-
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-          seg_traits->compare_endpoints_xy_2_object();
-
-        if (cmp_seg_endpts(cv[0]) == SMALLER) {
-          typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-            seg_traits->construct_min_vertex_2_object();
-          cv.push_front(Segment_2(p, get_min_v(cv[0])));
-        }
-        else {
-          typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-            seg_traits->construct_max_vertex_2_object();
-          cv.push_front(Segment_2(p, get_max_v(cv[0])));
-        }
-      }
-
-
-      /* Append a segment `seg` to an existing polyline `cv` at the front. */
-      void operator()(Curve_2& cv, const Segment_2& seg) const
-      { cv.push_front(seg); }
-
-      /* Append a point `p` to an existing polyline `xcv` at the front. */
-      void operator()(const X_monotone_curve_2& xcv, Point_2& p) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        CGAL_precondition_code
-          (
-           typedef typename X_monotone_curve_2::Segments_size_type size_type;
-           size_type num_seg = xcv.number_of_segments();
-           typename Segment_traits_2::Compare_x_2 comp_x =
-             seg_traits->compare_x_2_object();
-           typename Segment_traits_2::Compare_xy_2 comp_xy =
-             seg_traits->compare_xy_2_object();
-           Is_vertical_2 is_vertical = m_poly_traits.is_vertical_2_object();
-           );
-        CGAL_precondition(num_seg > 0);
-
-        if (seg_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) {
-          // xcv is oriented left-to-right
-          typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-            seg_traits->construct_max_vertex_2_object();
-          CGAL_precondition
-            (
-             (!is_vertical(xcv) &&
-              (comp_x(get_max_v(xcv[0]), p) == LARGER)) ||
-             (is_vertical(xcv) &&
-              (comp_x(get_max_v(xcv[0]), p) == EQUAL) &&
-              (comp_xy(get_max_v(xcv[0]), p) == LARGER))
-             );
-          xcv.push_front(X_monotone_segment_2(p, get_max_v(xcv[0])));
-        }
-        else {
-          // xcv is oriented right-to-left
-          typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-            seg_traits->construct_min_vertex_2_object();
-          CGAL_precondition
-            (
-             (!is_vertical(xcv) &&
-              (comp_x(get_min_v(xcv[0]), p) == SMALLER)) ||
-             (is_vertical(xcv) &&
-              (comp_x(get_min_v(xcv[0]), p) == EQUAL) &&
-              (comp_xy(get_min_v(xcv[0]), p) == SMALLER))
-             );
-          xcv.push_front(X_monotone_segment_2(p, get_min_v(xcv[0])));
-        }
-      }
-
-      /* Append a segment `seg` to an existing polyline `xcv` at the front. */
-      void operator()(X_monotone_curve_2& xcv,
-                      const X_monotone_segment_2& seg) const
-      {
-        CGAL_precondition_code
-          (
-           typedef typename X_monotone_curve_2::Segments_size_type size_type;
-           size_type num_seg = xcv.number_of_segments();
-           const Segment_traits_2* seg_traits =
-             m_poly_traits.segment_traits_2();
-           typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-             seg_traits->compare_endpoints_xy_2_object();
-           Comparison_result dir = cmp_seg_endpts(seg);
-           typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-             seg_traits->construct_max_vertex_2_object();
-           typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-             seg_traits->construct_min_vertex_2_object();
-           typename Segment_traits_2::Compare_xy_2 comp_xy =
-             seg_traits->compare_xy_2_object();
-           typename Segment_traits_2::Equal_2 equal =
-             seg_traits->equal_2_object();
-           typename Segment_traits_2::Is_vertical_2 is_vertical =
-             seg_traits->is_vertical_2_object();
-           );
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              ((is_vertical(xcv[0]) && is_vertical(seg)) ||
-                               (!is_vertical(xcv[0]) && !is_vertical(seg))),
-                              "xcv is vertical and seg is not or vice versa!");
-
-        CGAL_precondition_msg((num_seg == 0) || (cmp_seg_endpts(xcv[0]) == dir),
-                              "xcv and seg do not have the same orientation!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              !equal(get_min_v(seg), get_max_v(seg)),
-                              "Seg degenerates to a point!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              (((dir != SMALLER) ||
-                                equal(get_min_v(xcv[0]), get_max_v(seg)))),
-                              "Seg does not extend to the left!");
-
-        CGAL_precondition_msg((num_seg == 0) ||
-                              (((dir != LARGER) ||
-                                equal(get_max_v(xcv[0]), get_min_v(seg)))),
-                              "Seg does not extend to the right!");
-
-        xcv.push_front(seg);
-      }
-    };
-
-    /*! Get a Push_front_2 functor object. */
-    Push_front_2 push_front_2_object() const
-    { return Push_front_2(*this); }
-
-    class Split_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Split_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-    public:
-      /*!
-       * Split a given x-monotone curve at a given point into two sub-curves.
-       * \param cv The curve to split
-       * \param p The split point.
-       * \param c1 Output: The left resulting subcurve(p is its right endpoint).
-       * \param c2 Output: The right resulting subcurve(p is its left endpoint).
-       * \pre p lies on cv but is not one of its end-points.
-       */
-      void operator()(const X_monotone_curve_2& xcv, const Point_2& p,
-                      X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename Segment_traits_2::Construct_min_vertex_2 min_vertex =
-          seg_traits->construct_min_vertex_2_object();
-        typename Segment_traits_2::Construct_max_vertex_2 max_vertex =
-          seg_traits->construct_max_vertex_2_object();
-        typename Segment_traits_2::Equal_2 equal =
-          seg_traits->equal_2_object();
-        typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-          seg_traits->compare_endpoints_xy_2_object();
-
-        // Make sure the split point is not one of the curve endpoints.
-        CGAL_precondition((!equal(m_poly_traits.
-                                  construct_min_vertex_2_object()(xcv), p)));
-        CGAL_precondition((!equal(m_poly_traits.
-                                  construct_max_vertex_2_object()(xcv), p)));
-
-        CGAL_precondition_msg(xcv.number_of_segments() > 0,
-                              "Cannot split a polyline of length zero.");
-
-        Comparison_result dir = cmp_seg_endpts(xcv[0]);
-
-        // Locate the segment on the polyline xcv that contains p.
-        std::size_t i = m_poly_traits.locate(xcv, p);
-
-        CGAL_precondition(i != INVALID_INDEX);
-
-        // Clear the output curves.
-        xcv1.clear();
-        xcv2.clear();
-
-        // Push all segments labeled(0, 1, ... , i-1) into xcv1.
-        for (std::size_t j = 0; j < i; ++j)
-          xcv1.push_back(xcv[j]);
-
-        if (dir == SMALLER){
-          // Check whether the split point is xcv[i]'s source or target.
-          if (equal(max_vertex(xcv[i]), p)) {
-            // The entire i'th segment belongs to xcv1:
-            xcv1.push_back(xcv[i]);
-          } else if (equal(min_vertex(xcv[i]), p)) {
-            // The entire i'th segments belongs to xcv2:
-            xcv2.push_back(xcv[i]);
-          } else {
-            // The i'th segment should be split: The left part(seg1)
-            // goes to xcv1, and the right part(seg2) goes to xcv2.
-            X_monotone_segment_2 seg1, seg2;
-            m_poly_traits.segment_traits_2()->
-              split_2_object()(xcv[i], p, seg1, seg2);
-
-            xcv1.push_back(seg1);
-            xcv2.push_back(seg2);
-          }
-        }
-        else{
-          if (equal(min_vertex(xcv[i]), p)) {
-            xcv1.push_back(xcv[i]);
-          } else if (equal(max_vertex(xcv[i]), p)) {
-            xcv2.push_back(xcv[i]);
-          } else {
-            X_monotone_segment_2 seg1, seg2;
-            m_poly_traits.segment_traits_2()->
-              split_2_object()(xcv[i], p, seg1, seg2);
-
-            if (cmp_seg_endpts(seg2) == LARGER){
-              xcv1.push_back(seg2);
-            }
-            else{
-              // seg2 has to be reversed
-              seg2 = m_poly_traits.segment_traits_2()->
-                construct_opposite_2_object()(seg2);
-              xcv1.push_back(seg2);
-            }
-
-            if (cmp_seg_endpts(seg1) == LARGER){
-              xcv2.push_back(seg1);
-            } else {
-              // seg2 has to be reversed
-              seg1 = m_poly_traits.segment_traits_2()->
-                construct_opposite_2_object()(seg1);
-              xcv1.push_back(seg1);
-            }
-          }
-        }
-
-        // Push all segments labeled(i+1, i+2, ... , n-1) into xcv1.
-        std::size_t n = xcv.number_of_segments();
-
-        for (std::size_t j = i+1; j < n; ++j)
-          xcv2.push_back(xcv[j]);
-
-        if (dir != SMALLER){
-          X_monotone_curve_2 tmp;
-          tmp = xcv1;
-          xcv1 = xcv2;
-          xcv2 = tmp;
-        }
-      }
-    };
-
-    /*! Get a Split_2 functor object. */
-    Split_2 split_2_object() const
-    { return Split_2(*this); }
-
-    class Intersect_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Intersect_2(const Polyline_traits_2& traits) : m_poly_traits(traits) {}
-
-      /*!
-       * Find the intersections of the two given curves and insert them into the
-       * given output iterator. As two segments may itersect only once, only a
-       * single intersection will be contained in the iterator.
-       * Note: If the intersection yields an overlap then it will be oriented
-       *       from left-to-right.
-       * \param cv1 The first curve.
-       * \param cv2 The second curve.
-       * \param oi The output iterator.
-       * \return The past-the-end iterator.
-       */
-      template <typename OutputIterator>
-      OutputIterator operator()(const X_monotone_curve_2& cv1,
-                                const X_monotone_curve_2& cv2,
-                                OutputIterator oi) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Compare_y_at_x_2 cmp_y_at_x = m_poly_traits.compare_y_at_x_2_object();
-        typename Segment_traits_2::Equal_2 equal = seg_traits->equal_2_object();
-        typename Segment_traits_2::Construct_min_vertex_2 min_vertex =
-          seg_traits->construct_min_vertex_2_object();
-        typename Segment_traits_2::Construct_max_vertex_2 max_vertex =
-          seg_traits->construct_max_vertex_2_object();
-        typename Segment_traits_2::Intersect_2 intersect =
-          seg_traits->intersect_2_object();
-        typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-          seg_traits->compare_endpoints_xy_2_object();
-
-        Comparison_result dir1 = cmp_seg_endpts(cv1[0]);
-        Comparison_result dir2 = cmp_seg_endpts(cv2[0]);
-
-        const std::size_t n1 = cv1.number_of_segments();
-        const std::size_t n2 = cv2.number_of_segments();
-
-        std::size_t i1 = (dir1 == SMALLER) ? 0 : n1-1;
-        std::size_t i2 = (dir2 == SMALLER) ? 0 : n2-1;
-
-        X_monotone_curve_2 ocv;           // Used to represent overlaps.
-
-        Compare_xy_2 compare_xy = m_poly_traits.compare_xy_2_object();
-        Comparison_result left_res =
-          compare_xy(cv1[i1], ARR_MIN_END, cv2[i2], ARR_MIN_END);
-
-        if (left_res == SMALLER) {
-          // cv1's left endpoint is to the left of cv2's left endpoint:
-          // Locate the index i1 of the segment in cv1 which contains cv2's
-          // left endpoint.
-          i1 = m_poly_traits.locate_impl(cv1, cv2[i2], ARR_MIN_END,
-                                         Are_all_sides_oblivious_tag());
-          if (i1 == INVALID_INDEX) return oi;
-
-          if (equal(max_vertex(cv1[i1]), min_vertex(cv2[i2]))) {
-            if (((dir1 == SMALLER) && (i1 == n1-1)) ||
-                ((dir1 == LARGER) && (i1 == 0))){
-              // cv1's right endpoint equals cv2's left endpoint
-              // Thus we can return this single(!) intersection point
-              std::pair<Point_2, Multiplicity>  p(max_vertex(cv1[i1]), 0);
-              *oi++ = make_object(p);
-              return oi;
-            }
-            dir1 == SMALLER ? ++i1 : (i1 != 0) ? --i1 : INVALID_INDEX;
-            left_res = EQUAL;
-          }
-        }
-        else if (left_res == LARGER) {
-          // cv1's left endpoint is to the right of cv2's left endpoint:
-          // Locate the index i2 of the segment in cv2 which contains cv1's
-          // left endpoint.
-          i2 = m_poly_traits.locate_impl(cv2, cv1[i1], ARR_MIN_END,
-                                         Are_all_sides_oblivious_tag());
-          if (i2 == INVALID_INDEX) return oi;
-
-          if (equal(max_vertex(cv2[i2]), min_vertex(cv1[i1]))) {
-            if (((dir2 == SMALLER) && (i2 == n2-1)) ||
-                ((dir2 == LARGER) && (i2 == 0))){
-              // cv2's right endpoint equals cv1's left endpoint
-              // Thus we can return this single(!) intersection point
-              std::pair<Point_2, Multiplicity>  p(max_vertex(cv2[i2]), 0);
-              *oi++ = make_object(p);
-              return oi;
-            }
-
-            dir2 == SMALLER ? ++i2 : (i2 != 0) ? --i2 : INVALID_INDEX;
-            left_res = EQUAL;
-          }
-        }
-
-        // Check if the the left endpoint lies on the other polyline.
-        bool left_coincides = (left_res == EQUAL);
-        bool left_overlap = false;
-
-        if (left_res == SMALLER)
-          left_coincides = (cmp_y_at_x(cv2[i2], ARR_MIN_END, cv1[i1]) == EQUAL);
-        else if (left_res == LARGER)
-          left_coincides = (cmp_y_at_x(cv1[i1], ARR_MIN_END, cv2[i2]) == EQUAL);
-
-        // The main loop: Go simultaneously over both polylines.
-        Comparison_result right_res = left_res;
-        bool right_coincides = left_coincides;
-        bool right_overlap = false;
-
-        while (((dir1==SMALLER) && (dir2 == SMALLER) && (i1 < n1) &&(i2 < n2))||
-               ((dir1!=SMALLER) && (dir2 == SMALLER) &&
-                (i1 != INVALID_INDEX) && (i2 < n2)) ||
-               ((dir1==SMALLER) && (dir2 != SMALLER) && (i1 < n1) &&
-                (i2 != INVALID_INDEX)) ||
-               ((dir1!=SMALLER) && (dir2 != SMALLER) &&
-                (i1 != INVALID_INDEX) && (i2 != INVALID_INDEX)))
-          {
-            right_res = compare_xy(cv1[i1], ARR_MAX_END, cv2[i2], ARR_MAX_END);
-
-            right_coincides = (right_res == EQUAL);
-            if (right_res == SMALLER)
-              right_coincides =
-                (cmp_y_at_x(cv1[i1], ARR_MAX_END, cv2[i2]) == EQUAL);
-            else if (right_res == LARGER)
-              right_coincides =
-                (cmp_y_at_x(cv2[i2], ARR_MAX_END, cv1[i1]) == EQUAL);
-
-            right_overlap = false;
-
-            if (!right_coincides && !left_coincides) {
-              // Non of the endpoints of the current segment of one polyline
-              // coincides with the curent segment of the other polyline:
-              // Output the intersection if exists.
-              oi = intersect(cv1[i1], cv2[i2], oi);
-            }
-            else if (right_coincides && left_coincides) {
-              // An overlap exists between the current segments of the
-              // polylines: Output the overlapping segment.
-              right_overlap = true;
-              if (left_res == SMALLER) {
-                if (right_res == SMALLER) {
-                  X_monotone_segment_2 seg(min_vertex(cv2[i2]),
-                                           max_vertex(cv1[i1]));
-                  ocv.push_back(seg);
-                }
-                else {
-                  X_monotone_segment_2 seg(min_vertex(cv2[i2]),
-                                           max_vertex(cv2[i2]));
-                  ocv.push_back(seg);
-                }
-              }
-              else {
-                if (right_res == SMALLER) {
-                  X_monotone_segment_2 seg(min_vertex(cv1[i1]),
-                                           max_vertex(cv1[i1]));
-                  ocv.push_back(seg);
-                }
-                else {
-                  X_monotone_segment_2 seg(min_vertex(cv1[i1]),
-                                           max_vertex(cv2[i2]));
-                  ocv.push_back(seg);
-                }
-              }
-            }
-            else if (left_coincides && !right_coincides) {
-              // The left point of the current segment of one polyline
-              // coincides with the current segment of the other polyline.
-              if (left_overlap) {
-                // An overlap occured at the previous iteration:
-                // Output the overlapping polyline.
-                CGAL_assertion(ocv.number_of_segments() > 0);
-                *oi++ = make_object(ocv);
-                ocv.clear();
-              }
-              else {
-                // The left point of the current segment of one
-                // polyline coincides with the current segment of the
-                // other polyline, and no overlap occured at the
-                // previous iteration: Output the intersection
-                // point. The derivative of at least one of the
-                // polylines is not defined at this point, so we give
-                // it multiplicity 0.
-                if (left_res == SMALLER) {
-                  std::pair<Point_2, Multiplicity> p(min_vertex(cv2[i2]), 0);
-                  *oi++ = make_object(p);
-                }
-                else {
-                  std::pair<Point_2, Multiplicity> p(min_vertex(cv1[i1]), 0);
-                  *oi++ = make_object(p);
-                }
-              }
-            }
-
-            // Proceed forward.
-            if (right_res != SMALLER) {
-              if (dir2 == SMALLER)
-                ++i2;
-              else {
-                if (i2 == 0)
-                  i2 = INVALID_INDEX;
-                else
-                  --i2;
-              }
-            }
-            if (right_res != LARGER) {
-              if (dir1 == SMALLER)
-                ++i1;
-              else {
-                if (i1 == 0)
-                  i1 = INVALID_INDEX;
-                else --i1;
-              }
-            }
-            left_res = (right_res == SMALLER) ? LARGER :
-              (right_res == LARGER) ? SMALLER : EQUAL;
-
-            left_coincides = right_coincides;
-            left_overlap = right_overlap;
-          } // END of while loop
-
-        // Output the remaining overlapping polyline, if necessary.
-        if (ocv.number_of_segments() > 0) {
-          *oi++ = make_object(ocv);
-        }
-        else if (right_coincides) {
-          typedef std::pair<Point_2,Multiplicity> return_point;
-          return_point ip;
-          if (right_res == SMALLER) {
-            ip = (dir1 == SMALLER) ?
-              return_point(max_vertex(cv1[i1-1]), 0) :
-              (i1 != INVALID_INDEX) ?
-              return_point(max_vertex(cv1[i1+1]), 0) :
-              return_point(max_vertex(cv1[0]), 0);
-            *oi++ = make_object(ip);
-          }
-          else if (right_res == LARGER) {
-            ip = (dir2 == SMALLER) ?
-              return_point(max_vertex(cv2[i2-1]), 0) :
-              (i2 != INVALID_INDEX) ?
-              return_point(max_vertex(cv2[i2+1]), 0) :
-              return_point(max_vertex(cv2[0]), 0);
-            *oi++ = make_object(ip);
-          }
-          else if (((i1 > 0) && (dir1 == SMALLER)) ||
-                   ((i1 < n1) && (dir1 != SMALLER)) ||
-                   ((i1 == INVALID_INDEX) && (dir1 != SMALLER)))
-          {
-            ip = (dir1 == SMALLER) ?
-              return_point(max_vertex(cv1[i1-1]), 0) :
-              (i1 != INVALID_INDEX) ?
-              return_point(max_vertex(cv1[i1+1]), 0) :
-              return_point(max_vertex(cv1[0]), 0);
-            *oi++ = make_object(ip);
-          }
-          else {
-            CGAL_assertion_msg((dir2 == SMALLER && i2 > 0) ||
-                               (dir2 != SMALLER && i2 < n2) ||
-                               (dir2 != SMALLER &&
-                                (i1 == INVALID_INDEX || i2 ==INVALID_INDEX)),
-                               "Wrong index for xcv2 in Intersect_2 of "
-                               "polylines.");
-            ip = (dir2 == SMALLER) ?
-              return_point(max_vertex(cv2[i2-1]), 0) :
-              (i2 != INVALID_INDEX) ?
-              return_point(max_vertex(cv2[i2+1]), 0) :
-              return_point(max_vertex(cv2[0]), 0);
-            *oi++ = make_object(ip);
-          }
-        }
-        return oi;
-      }
-    };
-
-    /*! Get an Intersect_2 functor object. */
-    Intersect_2 intersect_2_object() const
-    { return Intersect_2(*this); }
-
-    class Are_mergeable_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Are_mergeable_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*!
-       * Check whether it is possible to merge two given x-monotone curves.
-       * \param cv1 The first curve.
-       * \param cv2 The second curve.
-       * \return(true) if the two curves are mergeable, that is, they share a
-       * common endpoint and the same orientation;(false) otherwise.
-       */
-      bool operator()(const X_monotone_curve_2& cv1,
-                      const X_monotone_curve_2& cv2) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Construct_min_vertex_2 min_vertex =
-          m_poly_traits.construct_min_vertex_2_object();
-        Construct_max_vertex_2 max_vertex =
-          m_poly_traits.construct_max_vertex_2_object();
-        typename Segment_traits_2::Equal_2 equal =
-          seg_traits->equal_2_object();
-        typename Segment_traits_2::Is_vertical_2 is_seg_vertical =
-          seg_traits->is_vertical_2_object();
-
-        Comparison_result dir1 =
-          m_poly_traits.compare_endpoints_xy_2_object()(cv1);
-        Comparison_result dir2 =
-          m_poly_traits.compare_endpoints_xy_2_object()(cv2);
-
-        if (dir1 != dir2)
-          return false;
-
-        bool ver1 = is_seg_vertical(cv1[0]);
-        bool ver2 = is_seg_vertical(cv2[0]);
-
-        return (
-                (
-                 (// Both are directed from left-to-right
-                  (dir1 == SMALLER) &&
-                  ((equal(max_vertex(cv1),min_vertex(cv2))) ||
-                   (equal(max_vertex(cv2),min_vertex(cv1))))
-                  ) ||
-                 (// Both are directed from right-to-left
-                  (dir1 == LARGER) &&
-                  ((equal(min_vertex(cv1),max_vertex(cv2))) ||
-                   (equal(max_vertex(cv1),min_vertex(cv2))))
-                  )
-                 ) &&
-                (// Either both should be vertical or both should
-                 // be NOT vertical.
-                 (ver1 && ver2) || (!ver1 && !ver2)));
-      }
-    };
-
-    /*! Get an Are_mergeable_2 functor object. */
-    Are_mergeable_2 are_mergeable_2_object() const
-    { return Are_mergeable_2(*this); }
-
-    /*! \class Merge_2
-     * A functor that merges two x-monotone curves into one.
-     */
-    /* Roadmap: Allow merging of overlapping polylines. This means also
-     *          changing the segment traits class.
-     */
-    class Merge_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Geometry_traits;
-      /*! The traits (in case it has state) */
-      const Geometry_traits& m_poly_traits;
-
-    public:
-      /*! Constructor
-       * \param traits the traits (in case it has state)
-       */
-      Merge_2(const Geometry_traits& traits) : m_poly_traits(traits) {}
-
-      /*!
-       * Merge two given x-monotone curves into a single curve(segment).
-       * \param cv1 The first curve.
-       * \param cv2 The second curve.
-       * \param c Output: The merged curve.
-       * \pre The two curves are mergeable.
-       */
-      void operator()(const X_monotone_curve_2 & cv1,
-                      const X_monotone_curve_2 & cv2,
-                      X_monotone_curve_2 & c) const
-      {
-        CGAL_precondition(m_poly_traits.are_mergeable_2_object()(cv1, cv2));
-
-        Construct_min_vertex_2 get_min_v =
-          m_poly_traits.construct_min_vertex_2_object();
-        Construct_max_vertex_2 get_max_v =
-          m_poly_traits.construct_max_vertex_2_object();
-        Compare_endpoints_xy_2 cmp_seg_endpts =
-          m_poly_traits.compare_endpoints_xy_2_object();
-        Equal_2 equal = m_poly_traits.equal_2_object();
-
-        c.clear();
-        if (
-            // Either both are left-to-right and cv2 is to the right of cv1
-            ((cmp_seg_endpts(cv1)==SMALLER) &&
-             (equal(get_max_v(cv1),get_min_v(cv2)))) ||
-            // or both are right-to-left and cv2 is to the left of cv1
-            ((cmp_seg_endpts(cv1)==LARGER) &&
-             (equal(get_min_v(cv1), get_max_v(cv2))))
-            )
-        {
-          const std::size_t n1 = cv1.number_of_segments();
-          const std::size_t n2 = cv2.number_of_segments();
-          std::size_t       i;
-
-          // cv2 extends cv1 to the right:
-          for (i = 0; i < n1 - 1; ++i)
-            c.push_back(cv1[i]);
-
-          // Try to merge the to contiguous line segments:
-          if (m_poly_traits.segment_traits_2()->
-              are_mergeable_2_object()(cv1[n1 - 1], cv2[0])) {
-            X_monotone_segment_2 seg;
-            m_poly_traits.segment_traits_2()->
-              merge_2_object()(cv1[n1 - 1], cv2[0], seg);
-            c.push_back(seg);
-          }
-          else {
-            c.push_back(cv1[n1 - 1]);
-            c.push_back(cv2[0]);
-          }
-
-          for (i = 1; i < n2; ++i)
-            c.push_back(cv2[i]);
-        }
-        else
-          return this->operator()(cv2,cv1,c);
-      }
-    };
-
-    /*! Get a Merge_2 functor object. */
-    Merge_2 merge_2_object() const { return Merge_2(*this); }
-    ///@}
-
-    /// \name Functor definitions for the landmarks point-location strategy.
-    //@{
-
-#if 0
-    // The following block assumes that the segment traits template parameter
-    // is a model of the ArrangementLandmarkTraits concept; in other words, it
-    // defines the nested types Approximate_number_type and Approximate_2 and
-    // the member function approximate_2_object(). It cannot be used as is if
-    // the segment traits does not model the ArrangementLandmarkTraits concept.
-    // The functor Construct_x_monotone_curve_2 is provided regardless of the
-    // segment traits.
-
-    typedef typename Segment_traits_2::Approximate_number_type
-      Approximate_number_type;
-    typedef typename Segment_traits_2::Approximate_2    Approximate_2;
-
-    /*! Get an Approximate_2 functor object. */
-    Approximate_2 approximate_2_object() const
-    { return segment_traits_2()->approximate_2_object(); }
-#else
-    // The following block defines the nested types Approximate_number_type and
-    // Approximate_2 and the member function approximate_2_object() based on the
-    // corresponding types and function definitions of the segment traits. If
-    // the segment traits does not provide these definitions, they are defined
-    // as dummies. Essentially, the polyline traits becomes a practical model of
-    // the ArrangementLandmarkTraits concept only if the segment traits is a
-    // model of this concept.
-    //
-    // The following implementation is inspired by
-    // http://stackoverflow.com/a/11816999/1915421
-
-    template <typename T>
-    struct Void {
-      typedef void type;
-    };
-
-    template <typename T, typename _ = void>
-    struct has_approximate_2 {
-      // Generic implementation
-      typedef void                      Approximate_number_type;
-      typedef void                      Approximate_2;
-    };
-
-    template <typename T>
-    struct has_approximate_2<T, typename Void<typename T::Approximate_2>::type>
-    {
-      // Specialization for types holding a nested type T::Approximate_2
-      typedef typename T::Approximate_number_type
-        Approximate_number_type;
-      typedef typename T::Approximate_2  Approximate_2;
-    };
-
-    typedef typename has_approximate_2<Segment_traits_2>::Approximate_number_type
-      Approximate_number_type;
-    typedef typename has_approximate_2<Segment_traits_2>::Approximate_2
-      Approximate_2;
-
-    /*! Get an Approximate_2 functor object. */
-    Approximate_2 approximate_2_object_impl(boost::false_type) const
-    { return segment_traits_2()->approximate_2_object(); }
-
-    Approximate_2 approximate_2_object_impl(boost::true_type) const { }
-
-    Approximate_2 approximate_2_object() const
-    {
-      typedef typename boost::is_same<void, Approximate_2>::type      Is_void;
-      return approximate_2_object_impl(Is_void());
-    }
-#endif
-    //@}
-
-    class Construct_curve_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Construct_curve_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /* Returns an polyline connecting the two given endpoints. */
-      Curve_2 operator()(const Point_2& p, const Point_2& q) const
-      {
-        CGAL_precondition_msg (!m_poly_traits.
-                               segment_traits_2()->equal_2_object()(p,q),
-                               "Cannot construct a degenerated segment");
-        return Curve_2(Segment_2(p,q));
-      }
-
-      /* Returns a polyline consists of one given segment. */
-      Curve_2 operator()(const Segment_2& seg) const
-      {
-        return Curve_2(seg);
-      }
-
-      /* Construct a well-oriented polyline from a range of either
-         `SegmentTraits::Point_2` or `SegmentTraits::Segment_2`. */
-      template <typename ForwardIterator>
-      Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
-      {
-        typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
-        typedef typename boost::is_same<VT, Point_2>::type Is_point;
-        // Dispatch the range to the appropriate implementation.
-        return constructor_impl(begin, end, Is_point());
-      }
-
-      /*! Construction of a polyline from a range of points.
-       * \pre The range contains at least two points
-       * \pre Consecutive points are disjoint.
-       * \return Well-oriented polyline connecting the given
-       *         points. The order of the vertices is determined by
-       *         their order in the range.  Furthermore, the
-       *         orientation of the polyline is induced by their
-       *         order.
-       */
-      template <typename ForwardIterator>
-      Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
-                               boost::true_type) const
-      {
-        // Container of the segments to be created.
-        std::vector<Segment_2> segs;
-
-        // The range must contain at least two points.
-        CGAL_precondition_msg(std::distance(begin,end)>1,
-                              "Range of points must contain at least 2 points");
-        CGAL_precondition_code
-          (
-           typename Segment_traits_2::Equal_2 equal =
-           m_poly_traits.segment_traits_2()->equal_2_object();
-           );
-        ForwardIterator curr = begin;
-        ForwardIterator next = curr;
-        ++next;
-        while (next != end) {
-          CGAL_precondition_msg(!equal(*curr,*next),
-                                "Cannot construct a degenerated segment");
-          segs.push_back(Segment_2(*curr,*next));
-          ++next;
-          ++curr;
-        }
-
-        return Curve_2(segs.begin(), segs.end());
-      }
-
-      /*! Construction implementation from a range of segments.
-       *
-       *  Note that the segments in the range are NOT necessarily x-monotone,
-       *  thus it is impossible to test (even in precondition) whether the input
-       *  forms a continuous and well oriented polyline.
-       *  \pre Range should contain at least one segment.
-       */
-      template <typename ForwardIterator>
-      Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
-                               boost::false_type) const
-      {
-        // Range has to contain at least one segment
-        CGAL_precondition(begin != end);
-
-        return Curve_2(begin, end);
-      }
-    };
-
-    /*! Get a Construct_curve_2 functor object. */
-    Construct_curve_2 construct_curve_2_object() const
-    { return Construct_curve_2(*this); }
-
-    class Construct_x_monotone_curve_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>       Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Construct_x_monotone_curve_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits) {}
-
-      /*! Returns an x-monotone polyline connecting the two given endpoints.
-       * \param p The first point.
-       * \param q The second point.
-       * \pre p and q must not be the same.
-       * \return A segment connecting p and q.
-       */
-      X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const
-      {
-        CGAL_precondition_code
-          (typename Segment_traits_2::Equal_2 equal =
-             m_poly_traits.segment_traits_2()->equal_2_object(););
-        CGAL_precondition_msg
-          (!equal(p,q),
-           "Cannot construct a degenerated segment as a polyline");
-        X_monotone_segment_2 seg(p, q);
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        if (m_poly_traits.segment_traits_2()->compare_xy_2_object()(p,q) ==
-          LARGER)
-          seg = m_poly_traits.segment_traits_2()->
-            construct_opposite_2_object()(seg);
-#endif
-
-        return X_monotone_curve_2(seg);
-      }
-
-      /*! Returns an x-monotone polyline consists of one given segment.
-       * \param seg input segment.
-       * \pre seg is not degenerated.
-       * \return An x-monotone polyline with one segment, namely seg.
-       */
-      X_monotone_curve_2 operator()(const X_monotone_segment_2& seg) const
-      {
-        CGAL_precondition_code
-          (
-           /*
-            * Test that the segment is not degenerated. We do this test
-            * independently from the SegmentTraits in use, as we do not allow
-            * a polyline with degenerated segments.
-            */
-           const Segment_traits_2* seg_traits =
-           m_poly_traits.segment_traits_2();
-           typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-           seg_traits->construct_min_vertex_2_object();
-           typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-           seg_traits->construct_max_vertex_2_object();
-           typename Segment_traits_2::Equal_2 equal =
-           seg_traits->equal_2_object();
-
-           CGAL_precondition_msg(!equal(get_min_v(seg),get_max_v(seg)),
-                                 "Cannot construct a degenerated segment");
-           );
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        if (m_poly_traits.segment_traits_2()->
-            compare_endpoints_xy_2_object()(seg) == LARGER)
-          return X_monotone_segment_2(m_poly_traits.segment_traits_2()->
-                                      construct_opposite_2_object()(seg));
-#endif
-
-        return X_monotone_curve_2(seg);
-      }
-
-      /*!
-       * Construct an x-monotone polyline which is well-oriented from a range of
-       * elements.
-       * \pre Range should from a continuous well-oriented x-monotone polyline.
-       */
-      template <typename ForwardIterator>
-      X_monotone_curve_2 operator()(ForwardIterator begin,
-                                    ForwardIterator end) const
-      {
-        typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
-        typedef typename boost::is_same<VT,Point_2>::type Is_point;
-        // Dispatch the range to the appropriate implementation.
-        return constructor_impl(begin, end, Is_point());
-      }
-
-      /*!
-       * Construct an x-monotone polyline from a range of points. The
-       * polyline may be oriented left-to-right or right-to-left
-       * depending on the lexicographical order of the points in the
-       * input.
-       * \pre Range contains at least two points.
-       * \pre No two consecutive points are the same.
-       * \pre The points form an continuous well-oriented x-monotone polyline.
-       * \post By the construction the returned polyline is well-oriented.
-       */
-      template <typename ForwardIterator>
-      X_monotone_curve_2 constructor_impl(ForwardIterator begin,
-                                          ForwardIterator end,
-                                          boost::true_type) const
-      {
-        // Vector of the segments to be constructed from the range of points
-        std::vector<X_monotone_segment_2> segs;
-        // Make sure the range of points contains at least two points.
-        ForwardIterator ps = begin;
-        CGAL_precondition(ps != end);
-        ForwardIterator pt = ps;
-        ++pt;
-        CGAL_precondition_msg((pt != end),
-                              "Range of points must contain at least 2 points");
-
-        CGAL_precondition_code
-          (
-           const Segment_traits_2* seg_traits =
-             m_poly_traits.segment_traits_2();
-           // Initialize two comparison functors
-           typename Segment_traits_2::Compare_x_2 compare_x =
-             seg_traits->compare_x_2_object();
-           typename Segment_traits_2::Compare_xy_2 compare_xy =
-             seg_traits->compare_xy_2_object();
-           // Make sure there is no changed of directions.
-           // Saves the comp_x between the first two points
-           const Comparison_result cmp_x_res = compare_x(*ps, *pt);
-           // Save the comp_xy between the first two points
-           const Comparison_result cmp_xy_res = compare_xy(*ps, *pt);
-           );
-
-        // Assure that the first two points are not the same.
-        // Note that this also assures that non of the consecutive
-        // points are equal in the whole range.
-        CGAL_precondition(cmp_xy_res != EQUAL);
-
-        while (pt != end) {
-          CGAL_precondition(compare_xy(*ps, *pt) == cmp_xy_res);
-          CGAL_precondition(compare_x(*ps, *pt) == cmp_x_res);
-
-          segs.push_back(X_monotone_segment_2(*ps,*pt));
-          ++ps; ++pt;
-        }
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        if (m_poly_traits.segment_traits_2()->
-          compare_endpoints_xy_2_object()(*segs.begin()) == LARGER)
-          {
-            X_monotone_curve_2 xcv(segs.begin(), segs.end());
-            return m_poly_traits.construct_opposite_2_object()(xcv);
-          }
-#endif
-
-        return X_monotone_curve_2(segs.begin(), segs.end());
-      }
-
-      /*! Returns an x-monotone polyline from a range of segments.
-       * \param begin An iterator pointing to the first segment in the range.
-       * \param end An iterator pointing to the past-the-end segment
-       * in the range.
-       * \pre The range contains at least one segment.
-       * \pre Segments correspond to a well-oriented polyline. That
-       *      is, the target of the i-th segment is an source of the
-       *      (i+1)th segment.
-       * \pre The sequence of segments in the range forms a weak x-monotone
-       *      polyline.
-       * \pre The container should support bidirectional iteration.
-       * \return A continuous, well-oriented x-monotone polyline which
-       *         is directed either left-to-right or right-to-left
-       *         depending on the segments in the input.
-       */
-      template <typename ForwardIterator>
-      X_monotone_curve_2 constructor_impl(ForwardIterator begin,
-                                          ForwardIterator end,
-                                          boost::false_type) const
-      {
-        CGAL_precondition_msg
-          (
-           begin != end,
-           "Input range of segments has to contain at least"
-           "one segment"
-           );
-
-        CGAL_precondition_code
-          (
-           const Segment_traits_2* seg_traits =
-             m_poly_traits.segment_traits_2();
-           typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-             seg_traits->compare_endpoints_xy_2_object();
-           typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-             seg_traits->construct_min_vertex_2_object();
-           typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-             seg_traits->construct_max_vertex_2_object();
-           typename Segment_traits_2::Equal_2 equal =
-             seg_traits->equal_2_object();
-
-           ForwardIterator curr = begin;
-           ForwardIterator next = begin;
-           ++next;
-           );
-
-
-        CGAL_precondition_msg
-          (
-           (next != end) || !equal(get_max_v(*curr),get_min_v(*curr)),
-           "Cannot construct a polyline with degenerated segment"
-           );
-
-        CGAL_precondition_code
-          (
-           // Range contains at least two segments
-
-           Comparison_result init_dir = cmp_seg_endpts(*curr);
-           while (next != end){
-             CGAL_precondition_msg
-               (!equal(get_min_v(*next),get_max_v(*next)),
-                "Cannot construct a polyline with degenerated segment"
-                );
-             CGAL_precondition_msg
-               (
-                init_dir == cmp_seg_endpts(*next),
-                "Segments must form x-monotone polyline"
-                );
-             if (init_dir == SMALLER){
-               CGAL_precondition_msg
-                 (
-                  equal(get_max_v(*curr),get_min_v(*next)),
-                  "Segments should concatenate in source->target manner"
-                  );
-             }
-             else{
-               CGAL_precondition_msg
-                 (
-                  equal(get_min_v(*curr),get_max_v(*next)),
-                  "Segments should concatenate in source->target manner"
-                  );
-             }
-             ++curr;
-             ++next;
-           }
-           );
-
-#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
-        if (m_poly_traits.segment_traits_2()->
-          compare_endpoints_xy_2_object()(*begin) == LARGER)
-          {
-            X_monotone_curve_2 xcv(begin, end);
-            return m_poly_traits.construct_opposite_2_object()(xcv);
-          }
-#endif
-
-        return X_monotone_curve_2(begin, end);
-      }
-    };
-
-    /*! Get a Construct_x_monotone_curve_2 functor object. */
-    Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
-    { return Construct_x_monotone_curve_2(*this); }
-
-    /*! A function object that obtains the parameter space of a geometric
-     * entity along the x-axis
-     */
-    class Parameter_space_in_x_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Parameter_space_in_x_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Obtains the parameter space at the end of a curve along the x-axis .
-       * Note that if the curve-end coincides with a pole, then unless the curve
-       * coincides with the identification curve, the curve-end is considered to
-       * be approaching the boundary, but not on the boundary.
-       * If the curve coincides with the identification curve, it is assumed to
-       * be smaller than any other object.
-       * \param xcv the curve
-       * \param ce the curve-end indicator:
-       *     ARR_MIN_END - the minimal end of xc or
-       *     ARR_MAX_END - the maximal end of xc
-       * \return the parameter space at the ce end of the curve xcv.
-       *   ARR_LEFT_BOUNDARY  - the curve approaches the identification curve
-       *                        from the right at the curve left end.
-       *   ARR_INTERIOR       - the curve does not approache the identification
-       *                        curve.
-       *   ARR_RIGHT_BOUNDARY - the curve approaches the identification curve
-       *                        from the left at the curve right end.
-       * \pre xcv does not coincide with the vertical identification curve.
-       */
-      Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
-                                     Arr_curve_end ce) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Comparison_result direction =
-          seg_traits->compare_endpoints_xy_2_object()(xcv[0]);
-        const X_monotone_segment_2& xs =
-          (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
-           ((direction == LARGER) && (ce == ARR_MIN_END))) ?
-          xcv[0] : xcv[xcv.number_of_segments()-1];
-        return seg_traits->parameter_space_in_x_2_object()(xs, ce);
-      }
-
-      /*! Obtains the parameter space at a point along the x-axis.
-       * \param p the point.
-       * \return the parameter space at p.
-       * \pre p does not lie on the vertical identification curve.
-       */
-      Arr_parameter_space operator()(const Point_2 p) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        return seg_traits->parameter_space_in_x_2_object()(p);
-      }
-    };
-
-    /*! Obtain a Parameter_space_in_x_2 function object */
-    Parameter_space_in_x_2 parameter_space_in_x_2_object() const
-    { return Parameter_space_in_x_2(*this); }
-
-    /*! A function object that obtains the parameter space of a geometric
-     * entity along the y-axis
-     */
-    class Parameter_space_in_y_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Parameter_space_in_y_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Obtains the parameter space at the end of an curve along the y-axis .
-       * Note that if the curve-end coincides with a pole, then unless the curve
-       * coincides with the identification curve, the curve-end is considered to
-       * be approaching the boundary, but not on the boundary.
-       * If the curve coincides with the identification curve, it is assumed to
-       * be smaller than any other object.
-       * \param xcv the curve
-       * \param ce the curve-end indicator:
-       *     ARR_MIN_END - the minimal end of xcv or
-       *     ARR_MAX_END - the maximal end of xcv
-       * \return the parameter space at the ce end of the curve xcv.
-       *   ARR_BOTTOM_BOUNDARY  - the curve approaches the south pole at the
-       *                          curve left end.
-       *   ARR_INTERIOR         - the curve does not approache a contraction
-       *                          point.
-       *   ARR_TOP_BOUNDARY     - the curve approaches the north pole at the
-       *                          curve right end.
-       * There are no horizontal identification curves!
-       */
-      Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
-                                     Arr_curve_end ce) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Comparison_result direction =
-          seg_traits->compare_endpoints_xy_2_object()(xcv[0]);
-        const X_monotone_segment_2& xs =
-          (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
-           ((direction == LARGER) && (ce == ARR_MIN_END))) ?
-          xcv[0] : xcv[xcv.number_of_segments()-1];
-        return seg_traits->parameter_space_in_y_2_object()(xs, ce);
-      }
-
-      /*! Obtains the parameter space at a point along the y-axis.
-       * \param p the point.
-       * \return the parameter space at p.
-       * \pre p does not lie on the horizontal identification curve.
-       * There are no horizontal identification curves!
-       */
-      Arr_parameter_space operator()(const Point_2 p) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        return seg_traits->parameter_space_in_y_2_object()(p);
-      }
-    };
-
-    /*! Obtain a Parameter_space_in_y_2 function object */
-    Parameter_space_in_y_2 parameter_space_in_y_2_object() const
-    { return Parameter_space_in_y_2(*this); }
-
-    /*! A functor that compares the x-coordinate of curve-ends and points on the
-     * boundary of the parameter space.
-     */
-    class Compare_x_on_boundary_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_x_on_boundary_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Compare the x-limit of a point with the x-coordinate of an
-       * x-curve-end on the boundary.
-       * \param point the point.
-       * \param xcv the x-curve, the endpoint of which is compared.
-       * \param ce the x-curve-end indicator:
-       *            ARR_MIN_END - the minimal end of xcv or
-       *            ARR_MAX_END - the maximal end of xcv.
-       * \return the comparison result:
-       *         SMALLER - x(p) < x(xcv, ce);
-       *         EQUAL   - x(p) = x(xcv, ce);
-       *         LARGER  - x(p) > x(xcv, ce).
-       * \pre p lies in the interior of the parameter space.
-       * \pre the ce end of the x-curve xcv lies on the top boundary.
-       * \pre xcv does not coincide with the vertical identification curve.
-       */
-      Comparison_result operator()(const Point_2& point,
-                                   const X_monotone_curve_2& xcv,
-                                   Arr_curve_end ce) const
-      {
-        const Segment_traits_2* seg_traits =
-          m_poly_traits.segment_traits_2();
-        Comparison_result direction =
-          seg_traits->compare_endpoints_xy_2_object()(xcv[0]);
-        const X_monotone_segment_2& xs =
-          (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
-           ((direction == LARGER) && (ce == ARR_MIN_END))) ?
-          xcv[0] : xcv[xcv.number_of_segments()-1];
-        return seg_traits->compare_x_on_boundary_2_object()(point, xs, ce);
-      }
-
-      /*! Compare the x-coordinates of 2 curve-ends near the boundary of the
-       * parameter space.
-       * \param xcv1 the first curve.
-       * \param ce1 the first curve-end indicator:
-       *            ARR_MIN_END - the minimal end of xcv1 or
-       *            ARR_MAX_END - the maximal end of xcv1.
-       * \param xcv2 the second curve.
-       * \param ce2 the second  curve-end indicator:
-       *            ARR_MIN_END - the minimal end of xcv2 or
-       *            ARR_MAX_END - the maximal end of xcv2.
-       * \return the second comparison result:
-       *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
-       *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
-       *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
-       * \pre the ce1 end of the curve xcv1 lies on a pole (implying ce1 is
-       *      vertical).
-       * \pre the ce2 end of the curve xcv2 lies on a pole (implying ce2 is
-       *      vertical).
-       * \pre xcv1 does not coincide with the vertical identification curve.
-       * \pre xcv2 does not coincide with the vertical identification curve.
-       */
-      Comparison_result operator()(const X_monotone_curve_2& xcv1,
-                                   Arr_curve_end ce1,
-                                   const X_monotone_curve_2& xcv2,
-                                   Arr_curve_end ce2) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Comparison_result direction1 =
-          seg_traits->compare_endpoints_xy_2_object()(xcv1[0]);
-        const X_monotone_segment_2& xs1 =
-          (((direction1 == SMALLER) && (ce1 == ARR_MAX_END)) ||
-           ((direction1 == LARGER) && (ce1 == ARR_MIN_END))) ?
-          xcv1[0] : xcv1[xcv1.number_of_segments()-1];
-        Comparison_result direction2 =
-          seg_traits->compare_endpoints_xy_2_object()(xcv2[0]);
-        const X_monotone_segment_2& xs2 =
-          (((direction2 == SMALLER) && (ce2 == ARR_MAX_END)) ||
-           ((direction2 == LARGER) && (ce2 == ARR_MIN_END))) ?
-          xcv2[0] : xcv2[xcv2.number_of_segments()-1];
-        return seg_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
-      }
-    };
-
-    /*! Obtain a Compare_x_on_boundary_2 function object. */
-    Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
-    { return Compare_x_on_boundary_2(*this); }
-
-    /*! A functor that compares the y-coordinate of two given points
-     * that lie on the vertical identification curve.
-     */
-    class Compare_y_on_boundary_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_y_on_boundary_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Compare the y-coordinate of two given points that lie on the vertical
-       * identification curve.
-       * \param p1 the first point.
-       * \param p2 the second point.
-       * \return SMALLER - p1 is lexicographically smaller than p2;
-       *         EQUAL   - p1 and p2 coincides;
-       *         LARGER  - p1 is lexicographically larger than p2;
-       * \pre p1 lies on the vertical identification curve.
-       * \pre p2 lies on the vertical identification curve.
-       */
-      Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        return seg_traits->compare_y_on_boundary_2_object()(p1, p2);
-      }
-    };
-
-    /*! Obtain a Compare_y_on_boundary_2 function object */
-    Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
-    { return Compare_y_on_boundary_2(*this); }
-
-    /*! A functor that compares the y-coordinates of curve-ends near the
-     * boundary of the parameter space.
-     */
-    class Compare_y_near_boundary_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Compare_y_near_boundary_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Compare the y-coordinates of 2 curves at their ends near the boundary
-       * of the parameter space.
-       * \param xcv1 the first curve.
-       * \param xcv2 the second curve.
-       * \param ce the curve-end indicator:
-       *     ARR_MIN_END - the minimal end or
-       *     ARR_MAX_END - the maximal end
-       * \return the second comparison result.
-       * \pre the ce ends of the curves xcv1 and xcv2 lie either on the left
-       *      boundary or on the right boundary of the parameter space (implying
-       *      that they cannot be vertical).
-       * There is no horizontal identification curve!
-       */
-      Comparison_result operator()(const X_monotone_curve_2& xcv1,
-                                   const X_monotone_curve_2& xcv2,
-                                   Arr_curve_end ce) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        Comparison_result direction1 =
-          seg_traits->compare_endpoints_xy_2_object()(xcv1[0]);
-        const X_monotone_segment_2& xs1 =
-          (((direction1 == SMALLER) && (ce == ARR_MAX_END)) ||
-           ((direction1 == LARGER) && (ce == ARR_MIN_END))) ?
-          xcv1[0] : xcv1[xcv1.number_of_segments()-1];
-        Comparison_result direction2 =
-          seg_traits->compare_endpoints_xy_2_object()(xcv2[0]);
-        const X_monotone_segment_2& xs2 =
-          (((direction2 == SMALLER) && (ce == ARR_MAX_END)) ||
-           ((direction2 == LARGER) && (ce == ARR_MIN_END))) ?
-          xcv2[0] : xcv2[xcv2.number_of_segments()-1];
-        return seg_traits->compare_y_near_boundary_2_object()(xs1, xs2, ce);
-      }
-    };
-
-    /*! Obtain a Compare_y_near_boundary_2 function object */
-    Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
-    { return Compare_y_near_boundary_2(*this); }
-
-    /*! A functor that indicates whether a geometric object lies on the
-     * vertical identification arc.
-     */
-    class Is_on_y_identification_2 {
-    protected:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-    public:
-      /*! Constructor. */
-      Is_on_y_identification_2(const Polyline_traits_2& traits) :
-        m_poly_traits(traits)
-      {}
-
-      /*! Determine whether a point lies in the vertical boundary.
-       * \param p the point.
-       * \return a Boolean indicating whether p lies in the vertical boundary.
-       */
-      bool operator()(const Point_2& p) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        return seg_traits->is_on_y_identification_2_object()(p);
-      }
-
-      /*! Determine whether an x-monotone curve lies in the vertical boundary.
-       * \param xcv the x-monotone curve.
-       * \return a Boolean indicating whether xcv lies in the vertical boundary.
-       */
-      bool operator()(const X_monotone_curve_2& xcv) const
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        typename X_monotone_curve_2::Segment_const_iterator it;
-        for (it = xcv.begin_segments(); it != xcv.end_segments(); ++it)
-          if (! seg_traits->is_on_y_identification_2_object()(*it))
-            return false;
-        return true;
-      }
-    };
-
-    /*! Obtain a Is_on_y_identification_2 function object */
-    Is_on_y_identification_2 is_on_y_identification_2_object() const
-    { return Is_on_y_identification_2(*this); }
-
-  private:
-    /*
-     * Roadmap: locate() should return an iterator to the located segment
-     */
-    /*!
-     * Return the index of the segment in the polyline that contains the
-     * point q in its x-range. The function performs a binary search, so if the
-     * point q is in the x-range of the polyline with n segments, the segment
-     * containing it can be located in O(log n) operations.
-     * \param cv The polyline curve.
-     * \param q The point.
-     * \return An index i such that q is in the x-range of cv[i].
-     *         If q is not in the x-range of cv, returns INVALID_INDEX.
-     */
-    template <typename Compare>
-    std::size_t locate_gen(const X_monotone_curve_2& cv, Compare compare) const
-    {
-      // The direction of cv. SMALLER means left-to-right and
-      // otherwise right-to-left
-      Comparison_result direction = segment_traits_2()->
-        compare_endpoints_xy_2_object()(cv[0]);
-      std::size_t from, to;
-      if (direction == SMALLER) {
-        from = 0;
-        to = cv.number_of_segments() - 1;
-      }
-      else {
-        from = cv.number_of_segments() - 1;
-        to = 0;
-      }
-
-      // Test if q is one of cv's end points
-      Comparison_result res_from = compare(cv[from], ARR_MIN_END);
-      if (res_from == EQUAL) return from;
-
-      Comparison_result res_to = compare(cv[to], ARR_MAX_END);
-      if (res_to == EQUAL) return to;
-
-      // Check whether the point is either lexicographically to the left of
-      // the curve or lexicographically to the right of the curve.
-      if (res_to == res_from)
-        // If the x-monotone polyline is vertical, return the index of the
-        // segment that is closest to the point. Otherwise, the point is not
-        // in the x-range of the polyline.
-        return (is_vertical_2_object()(cv)) ?
-          ((res_to == SMALLER) ? from : to) : INVALID_INDEX;
-
-      // Perform a binary search to locate the segment that contains q in its
-      // range:
-      while (((direction == SMALLER) && (to > from)) ||
-             ((direction == LARGER) && (to < from)))
-      {
-        std::size_t mid = (from + to) / 2;
-        if (((direction == SMALLER) && (mid > from)) ||
-            ((direction == LARGER) && (mid < from)))
-        {
-          Comparison_result res_mid = compare(cv[mid], ARR_MIN_END);
-          if (res_mid == EQUAL) {
-            // Ensure that the returned segment contains the query point
-            // on its right end (if possible)
-            if ((direction == SMALLER) && (mid > 0)) --mid;
-             else if ((direction == LARGER) &&
-                      ((mid + 1) < cv.number_of_segments()))
-               ++mid;
-            return mid;
-          }
-          if (res_mid == res_from) from = mid;
-          else to = (direction == SMALLER) ? mid - 1 : mid + 1;
-        }
-        else {
-          CGAL_assertion(((direction == SMALLER) && (mid < to)) ||
-                         ((direction == LARGER) && (mid > to)));
-          Comparison_result res_mid = compare(cv[mid], ARR_MAX_END);
-          if (res_mid == EQUAL) return mid;
-          if (res_mid == res_to) to = mid;
-          else from = (direction == SMALLER) ? mid + 1 : mid - 1;
-        }
-      }
-      // In case (from == to), and we know that the polyline contains the q:
-      CGAL_assertion(from == to);
-      return from;
-    }
-
-    // A utility class that compare a curve-end with a point.
-    template <typename Comparer>
-    class Compare_points {
-    private:
-      typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
-      /*! The polyline traits (in case it has state) */
-      const Polyline_traits_2& m_poly_traits;
-
-      const Point_2& m_point;
-
-      Comparer m_compare;
-
-    public:
-      // Constructor
-      Compare_points(const Polyline_traits_2& traits, Comparer compare,
-                     const Point_2& p) :
-        m_poly_traits(traits),
-        m_point(p),
-        m_compare(compare)
-      {}
-
-      // Compare the given curve-end with the stored point.
-      Comparison_result operator()(const X_monotone_segment_2& xs,
-                                   Arr_curve_end ce)
-      {
-        const Segment_traits_2* seg_traits = m_poly_traits.segment_traits_2();
-        const Point_2& p = (ce == ARR_MAX_END) ?
-          seg_traits->construct_max_vertex_2_object()(xs) :
-          seg_traits->construct_min_vertex_2_object()(xs);
-        return m_compare(p, m_point);
-      }
-    };
-
-    // A utility class that compare two curve-ends.
-    template <typename Comparer>
-    class Compare_curve_ends {
-    private:
-      const X_monotone_segment_2& m_x_monotone_segment;
-
-      Arr_curve_end m_curve_end;
-
-      Comparer m_compare;
-
-    public:
-      // Constructor
-      Compare_curve_ends(Comparer compare,
-                         const X_monotone_segment_2& xs, Arr_curve_end ce) :
-        m_x_monotone_segment(xs),
-        m_curve_end(ce),
-        m_compare(compare)
-      {}
-
-      // Compare the given curve-end with the stored point.
-      Comparison_result operator()(const X_monotone_segment_2& xs,
-                                   Arr_curve_end ce)
-      { return m_compare(xs, ce, m_x_monotone_segment, m_curve_end); }
-    };
-
-    //
-    std::size_t locate_impl(const X_monotone_curve_2& xcv,
-                             const X_monotone_segment_2& xs,
-                             Arr_curve_end ce,
-                             Arr_not_all_sides_oblivious_tag) const
-    {
-      const Segment_traits_2* seg_traits = segment_traits_2();
-      if (seg_traits->is_vertical_2_object()(xcv[0])) {
-        // Verify that q has the same x-coord as xcv (which is vertical)
-        Compare_x_2 compare_x = compare_x_2_object();
-        Comparison_result res = compare_x(xcv[0], ARR_MIN_END, xs, ce);
-        if (res != EQUAL) return INVALID_INDEX;
-
-        Compare_curve_ends<Compare_xy_2> compare(compare_xy_2_object(), xs, ce);
-        return locate_gen(xcv, compare);
-      }
-
-      Compare_curve_ends<Compare_x_2> compare(compare_x_2_object(), xs, ce);
-      return locate_gen(xcv, compare);
-    }
-
-    //
-    std::size_t locate_impl(const X_monotone_curve_2& xcv,
-                             const X_monotone_segment_2& xs,
-                             Arr_curve_end ce,
-                             Arr_all_sides_oblivious_tag) const
-    {
-      const Segment_traits_2* seg_traits = segment_traits_2();
-      const Point_2& p = (ce == ARR_MAX_END) ?
-        seg_traits->construct_max_vertex_2_object()(xs) :
-        seg_traits->construct_min_vertex_2_object()(xs);
-      return locate(xcv, p);
-    }
-
-    //
-    std::size_t locate(const X_monotone_curve_2& xcv, const Point_2& q) const
-    {
-      const Segment_traits_2* seg_traits = segment_traits_2();
-      if (seg_traits->is_vertical_2_object()(xcv[0])) {
-        // Verify that q has the same x-coord as cv (which is vertical)
-        typename Segment_traits_2::Construct_min_vertex_2 min_vertex =
-          seg_traits->construct_min_vertex_2_object();
-        typename Segment_traits_2::Compare_x_2 compare_x =
-          seg_traits->compare_x_2_object();
-        Comparison_result res = compare_x(min_vertex(xcv[0]), q);
-        if (res != EQUAL) return INVALID_INDEX;
-
-        Compare_points<Compare_xy_2> compare(seg_traits, compare_xy_2_object(), q);
-        return locate_gen(xcv, compare);
-      }
-
-      Compare_points<Compare_x_2> compare(seg_traits, compare_x_2_object(), q);
-      return locate_gen(xcv, compare);
-    }
-
-    /*!
-     * Find the index of the segment in the polyline that is defined to the
-     * left(or to the right) of the point q.
-     * \param cv The polyline curve.
-     * \param q The point.
-     * \param to_right(true) if we wish to locate a segment to the right of q,
-     *               (false) if we wish to locate a segment to its right.
-     * \return An index i such that segments[i] is defined to the left(or to the
-     *         right) of q, or INVALID_INDEX if no such segment exists.
-     */
-    std::size_t locate_side(const X_monotone_curve_2& cv,
-                             const Point_2& q, const bool& to_right) const
-    {
-      // First locate a segment segments[i] that contains q in its x-range.
-      std::size_t i = locate(cv, q);
-      if (i == INVALID_INDEX) return INVALID_INDEX;
-
-      typename Segment_traits_2::Equal_2 equal =
-        segment_traits_2()->equal_2_object();
-      typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
-        segment_traits_2()->compare_endpoints_xy_2_object();
-      typename Segment_traits_2::Compare_x_2 comp_x =
-        segment_traits_2()->compare_x_2_object();
-      typename Segment_traits_2::Is_vertical_2 is_vert =
-        segment_traits_2()->is_vertical_2_object();
-      typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
-        segment_traits_2()->construct_max_vertex_2_object();
-      typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
-        segment_traits_2()->construct_min_vertex_2_object();
-
-      Comparison_result direction = cmp_seg_endpts(cv[i]);
-
-      if ((!is_vert(cv[0]) && (comp_x(get_min_v(cv[i]), q) == EQUAL)) ||
-          (is_vert(cv[0]) && equal(get_min_v(cv[i]), q))){
-        // q is the left endpoint of the i'th segment:
-        if (to_right)
-          return i;
-        else {
-          // to_left
-          if (direction == SMALLER)
-            if (i == 0)
-              return INVALID_INDEX;
-            else
-              return i - 1;
-          else {
-            if (i == cv.number_of_segments()-1)
-              return INVALID_INDEX;
-            else
-              return i+1;
-          }
-        }
-      }
-
-      if ((!is_vert(cv[0]) && (comp_x(get_max_v(cv[i]), q) == EQUAL)) ||
-          (is_vert(cv[0]) && equal(get_max_v(cv[i]), q)))
-      {
-        // q is the right endpoint of the i'th segment:
-        if (!to_right)
-          return i;
-        else {
-          if (direction == SMALLER){
-            if (i == (cv.number_of_segments() - 1))
-              return INVALID_INDEX;
-            else
-              return i + 1;
-          }
-          else {
-            if (i == 0)
-              return INVALID_INDEX;
-            else
-              return i-1;
-          }
-        }
-      }
-
-      // In case q is in cv[i]'s interior:
-      return i;
-    }
-  };
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h
deleted file mode 100644
index 84fbe7d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
-//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
-
-#ifndef CGAL_BASE_RATIONAL_ARC_DS_D_1_H
-#define CGAL_BASE_RATIONAL_ARC_DS_D_1_H
-
-#include <vector>
-#include <ostream>
-#include <CGAL/Arr_enums.h>
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-
-#include <CGAL/Fraction_traits.h>
-#include <CGAL/Arithmetic_kernel.h>
-#include <CGAL/Algebraic_kernel_d_1.h>
-
-#include <map>
-#include <boost/detail/algorithm.hpp>
-
-namespace CGAL {
-namespace Arr_rational_arc {
-
-template <typename Algebraic_kernel_ >
-class Base_rational_arc_ds_1
-{
-public:
-  typedef Algebraic_kernel_                             Algebraic_kernel;
-  typedef Base_rational_arc_ds_1<Algebraic_kernel>      Self;
-
-  //typedef typename Algebraic_kernel::Multiplicity_type  Multiplicity;
-  typedef unsigned int                                  Multiplicity;
-  typedef typename Algebraic_kernel::Coefficient        Coefficient;
-  
-  typedef typename Get_arithmetic_kernel<Coefficient>::Arithmetic_kernel
-                                                        Arithmetic_kernel;
-  typedef typename Arithmetic_kernel::Rational          Rational; 
-  typedef typename Arithmetic_kernel::Integer           Integer;
-  typedef typename Algebraic_kernel::Algebraic_real_1   Algebraic_real_1;
-  
-  typedef typename Algebraic_kernel::Polynomial_1       Polynomial_1;
-  typedef Polynomial_traits_d<Polynomial_1>             Polynomial_traits_1;
-  typedef Fraction_traits<Rational>                     FT_rat_1;
-  typedef typename Algebraic_kernel::Solve_1            Solve_1;
-  typedef typename Algebraic_kernel::Bound              Bound;
-  typedef Algebraic_structure_traits<Polynomial_1>      AT_poly;
-  
-  typedef Polynomial<Rational>                          Poly_rat_1;
-  typedef Polynomial_traits_d<Poly_rat_1>               PT_rat_1;
-  typedef Fraction_traits <Poly_rat_1>                  FT_poly_rat_1;
-  typedef std::vector<Algebraic_real_1>                 Algebraic_vector;
-  typedef std::vector<Multiplicity>                     Multiplicity_vector;
-  typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
-                                                        Root_multiplicity_vector;
-
-  CGAL_static_assertion((boost::is_same<Integer,Coefficient>::value));
-  CGAL_static_assertion((boost::is_same<Polynomial_1,
-                       typename FT_poly_rat_1::Numerator_type>::value));
-
-public:
-   
-  //---------------------------------------------------------------------
-  // Print a polynomial nicely.
-
-  static std::ostream& print_polynomial(std::ostream& os,
-                                        const Polynomial_1& poly,
-                                        char var) 
-  {
-    // Get the degree.
-    const int    deg = CGAL::degree(poly);
-   
-    Integer     coeff;
-    CGAL::Sign  sgn;
-    int         k;
-
-    if (deg < 0)
-    {
-      os << '0';
-      return (os);
-    }
-
-    for (k = deg; k >= 0; k--)
-    { 
-      //coeff = pt::Get_coefficient()(poly, k);
-      coeff = CGAL::get_coefficient(poly, k);
-  
-      if (k == deg)
-        os << coeff;
-      else if ((sgn = CGAL::sign (coeff)) == POSITIVE)
-        os << " + " << coeff;
-      else if (sgn == NEGATIVE)
-        os << " - " << -coeff;
-      else
-        continue;
-     
-      if (k > 1)
-        os << '*' << var << '^' << k;
-      else if (k == 1)
-        os << '*' << var;
-    }
-
-    return (os);
-  }
-
-}; //Base_rational_arc_ds_1
-
-}   // namespace Arr_rational_arc
-}   //namespace CGAL {
-
-#endif //CGAL_BASE_RATIONAL_ARC_DS_D_1_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h
deleted file mode 100644
index b0409c5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h
+++ /dev/null
@@ -1,2606 +0,0 @@
-// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
-//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
-
-
-#ifndef CGAL_RATIONAL_ARC_D_1_H
-#define CGAL_RATIONAL_ARC_D_1_H
-
-#include <vector>
-#include <list>
-#include <ostream>
-#include <CGAL/Arr_enums.h>
-#include <CGAL/tags.h>
-#include <CGAL/Arr_tags.h>
-
-#include <CGAL/Fraction_traits.h>
-#include <CGAL/Arithmetic_kernel.h>
-#include <CGAL/Algebraic_kernel_d_1.h>
-
-#include <CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h>
-#include <CGAL/Arr_rat_arc/Algebraic_point_2.h>
-#include <CGAL/Arr_rat_arc/Cache.h>
-#include <CGAL/Arr_rat_arc/Rational_function.h>
-#include <CGAL/Arr_rat_arc/Rational_function_pair.h>
-
-#include <boost/detail/algorithm.hpp>
-
-namespace CGAL {
-namespace Arr_rational_arc {
-
-//--------------------------------------------------------------------------//
-//   class Base_rational_arc_d_1
-//Representation of an segment of a rational function, given as:
-//
-//        Numerator(x)
-//   y = -------------              x_l <= x <= x_r
-//        Denominator(x)
-//
-// where Numerator and Denominator are polynomial with integer (or rational) coefficients.
-// The class is templated with two parameters: 
-// Algebraic_kernel: An algebraic kernel for the intersection points of the curves
-//
-// This class serves as the base for the classes:
-// Rational_arc_d_1 (a general, not necessarily continuous arc) 
-// Continuous_rational_arc_d_1 (a continuous portion of a rational function).
-//--------------------------------------------------------------------------//
-
-template <typename Algebraic_kernel_>
-class Base_rational_arc_d_1
-{
-public:
-  typedef Algebraic_kernel_                                 Algebraic_kernel;
-  typedef Base_rational_arc_d_1<Algebraic_kernel>           Self;
-
-  typedef CGAL::Arr_rational_arc::Base_rational_arc_ds_1<Algebraic_kernel>
-    Base_rational_arc_ds_1;
-  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel>
-                                                            Rational_function;
-  typedef CGAL::Arr_rational_arc::Rational_function_pair<Algebraic_kernel>
-    Rational_function_pair;
-  typedef CGAL::Arr_rational_arc::Algebraic_point_2<Algebraic_kernel>
-                                                            Algebraic_point_2;
-
-  typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel>   Cache;
-
-  typedef typename Base_rational_arc_ds_1::Multiplicity     Multiplicity;
-  typedef typename Base_rational_arc_ds_1::Polynomial_1     Polynomial_1;
-  typedef typename Base_rational_arc_ds_1::Coefficient      Coefficient;
-  typedef typename Base_rational_arc_ds_1::Arithmetic_kernel
-                                                            Arithmetic_kernel;
-  typedef typename Base_rational_arc_ds_1::Rational         Rational; 
-  typedef typename Base_rational_arc_ds_1::Integer          Integer;
-  typedef typename Base_rational_arc_ds_1::Algebraic_real_1 Algebraic_real_1;
-  typedef typename Base_rational_arc_ds_1::Algebraic_vector Algebraic_vector;
-  typedef typename Base_rational_arc_ds_1::Multiplicity_vector
-                                                            Multiplicity_vector;
-  
-  typedef std::vector<Rational>                             Rat_vector;
-
-  typedef Polynomial_traits_d<Polynomial_1>                 Polynomial_traits_1;
-  typedef typename Base_rational_arc_ds_1::FT_rat_1         FT_rat_1;
-  typedef typename Base_rational_arc_ds_1::Solve_1          Solve_1;
-  typedef typename Algebraic_kernel::Bound                  Bound;
-  typedef Algebraic_structure_traits<Polynomial_1>          AT_poly;
-  
-  typedef Polynomial<Rational>                              Poly_rat_1;
-  typedef Polynomial_traits_d<Poly_rat_1>                   PT_rat_1;
-  typedef Fraction_traits <Poly_rat_1>                      FT_poly_rat_1;
-
-  typedef Algebraic_point_2                                 Point_2;
-  
-  CGAL_static_assertion((boost::is_same<Integer, Coefficient>::value));
-  CGAL_static_assertion((boost::is_same<Polynomial_1,
-                       typename FT_poly_rat_1::Numerator_type>::value));
-
-public:
-  const Rational_function& get_rational_function(const Polynomial_1& numerator,
-                                                 const Polynomial_1& denominator,
-                                                 const Cache& cache) const
-  {
-    return cache.get_rational_function(numerator, denominator);
-  }
-  const Rational_function& get_rational_function(const Rational& rat,
-                                                 const Cache& cache) const
-  {
-    return cache.get_rational_function(rat);
-  }
-  const Rational_function_pair get_rational_pair(const Rational_function& f, 
-                                                 const Rational_function& g,
-                                                 const Cache& cache) const
-  {
-    CGAL_precondition(f.id() != g.id());
-    return cache.get_rational_pair(f, g);
-  }
-
-public:
-  //------------------------------
-  //Base_rational_arc_d_1 members
-  //------------------------------
-  enum
-  {
-    SRC_AT_X_MINUS_INFTY = 1,
-    SRC_AT_X_PLUS_INFTY = 2,
-    SRC_AT_Y_MINUS_INFTY = 4,
-    SRC_AT_Y_PLUS_INFTY = 8,
-
-    SRC_INFO_BITS = SRC_AT_X_MINUS_INFTY + SRC_AT_X_PLUS_INFTY +
-    SRC_AT_Y_MINUS_INFTY + SRC_AT_Y_PLUS_INFTY,
-
-    TRG_AT_X_MINUS_INFTY = 16,
-    TRG_AT_X_PLUS_INFTY = 32,
-    TRG_AT_Y_MINUS_INFTY = 64,
-    TRG_AT_Y_PLUS_INFTY = 128,
-
-    TRG_INFO_BITS = TRG_AT_X_MINUS_INFTY + TRG_AT_X_PLUS_INFTY +
-    TRG_AT_Y_MINUS_INFTY + TRG_AT_Y_PLUS_INFTY,
-
-    IS_DIRECTED_RIGHT = 256,
-    IS_CONTINUOUS = 512,
-    IS_VALID = 1024
-  };
- 
-  Rational_function _f;    // The rational function 
-  Algebraic_point_2   _ps;   // The source point.
-  Algebraic_point_2   _pt;   // The target point.
-  int     _info;   // A set of Boolean flags. 
-
-public:
-  //------------
-  //Constructors
-  //------------
-
-  //---------------------------------------------------------------------------
-  //default constructor
-  Base_rational_arc_d_1() :
-    _info(0)
-  {}
- 
-  //---------------------------------------------------------------------------
-  // Constructor of a whole polynomial curve defined by pcoeffs - the rational
-  // coefficients of the polynomial p(x).
-  
-  Base_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
-    _info(0)
-  {
-    _init(P, Integer(1), cache);
-  }
-
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
-    _info(0)
-  {
-    // Set the numerator & denominator polynomials.
-    Polynomial_1 _numer;
-    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                                 pcoeffs.end()));
-    Integer denom_int;
-    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
-        
-    _init(_numer,denom_int,cache);
-  }
-
-  void _init(const Polynomial_1& P,const Integer& Q_int,const Cache& cache)
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_int));
-    //set rational function 
-    Polynomial_1 Q= typename Polynomial_traits_1::Construct_polynomial()(Q_int);
-    _f = get_rational_function(P, Q, cache);
-
-    //Mark that the endpoints of the polynomial are unbounded
-    //(the source is at x = -oo and the target is at x = +oo).
-    _info = (_info | SRC_AT_X_MINUS_INFTY);
-    _info = (_info | TRG_AT_X_PLUS_INFTY);
-    _info = (_info | IS_DIRECTED_RIGHT);
-
-    // Check whether the end points lie at y = -oo or at y = +oo.
-    const int    deg_num(CGAL::degree(P));
-    Integer lead_coeff(CGAL::leading_coefficient(Q));
-    CGAL::Sign   lead_sign(CGAL::sign(lead_coeff));
-  
-    if (deg_num > 0)
-    {
-      // Check if the degree is even or odd and check the sign of the leading
-      // coefficient of the polynomial.
-   
-      CGAL_assertion(lead_sign != CGAL::ZERO);
-
-      if (deg_num % 2 == 0)
-      {
-        // Polynomial of an even degree.
-        if (lead_sign == CGAL::NEGATIVE) 
-          _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_MINUS_INFTY);
-        else
-          _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_PLUS_INFTY);
-      }
-      else
-      {
-        // Polynomial of an odd degree.
-        if (lead_sign == CGAL::NEGATIVE)
-          _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_MINUS_INFTY);
-        else
-          _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY);
-      }
-    }
-    else
-    {
-      // In the case of a constant polynomial it is possible to set a finite
-      // y-coordinate for the source and target points.
-      //x coordinate is 0 although in practice is +-oo
-      _ps = Algebraic_point_2(_f,Algebraic_real_1());
-      //x coordinate is 0 although in practice is +-oo
-      _pt = Algebraic_point_2(_f,Algebraic_real_1());
-    }
-
-    // Mark that the arc is continuous and valid.
-    _info = (_info | IS_CONTINUOUS);
-    _info = (_info | IS_VALID);
-
-  }  
-
-  //---------------------------------------------------------------------------
-  //Constructor of a polynomial ray, defined by y = p(x), 
-  //for x_s <= x if the ray is directed to the right, or
-  //for x_s >= x if it is directed to the left.
-  //param pcoeffs The rational coefficients of the polynomial p(x).
-  //param x_s The x-coordinate of the source point.
-  //param dir_right Is the ray directed to the right (to +oo) or to the left
-  //(to -oo).
-
-  Base_rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s,
-                        bool dir_right, const Cache& cache) :
-    _info(0)
-  {
-    _init(P, Polynomial_1(1), x_s, dir_right, cache);
-  }
-
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs,const Algebraic_real_1& x_s,
-                        bool dir_right, const Cache& cache) :
-    _info(0)
-  {
-    // Set the numerator & denominator polynomials.
-    Polynomial_1 _numer;
-    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                                 pcoeffs.end()));
-    Integer denom_int;
-    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
-    
-    _init(_numer, denom_int, x_s, dir_right, cache);
-  }
-
-  void _init(const Polynomial_1& P,const Integer& Q_int,
-             const Algebraic_real_1& x_s, bool dir_right,const Cache& cache)
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_int));
-    //set rational function 
-    Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int);
-    _f = get_rational_function(P,Q,cache);
-
-    // Mark that the target points of the polynomial is unbounded.
-    if (dir_right)
-    {
-      _info = (_info | TRG_AT_X_PLUS_INFTY);
-      _info = (_info | IS_DIRECTED_RIGHT);
-    }
-    else
-    {
-      _info = (_info | TRG_AT_X_MINUS_INFTY);
-    }
-
-    // Set the source point.
-    _ps=Algebraic_point_2(_f,x_s);
-
-    // Check whether the target point lies at y = -oo or at y = +oo.
-    const int   deg_num(CGAL::degree(P));
-    Integer     lead_coeff(CGAL::leading_coefficient(P));
-    CGAL::Sign  lead_sign(CGAL::sign(lead_coeff));
-
-    if (deg_num > 0)
-    {
-      //Check if the degree is even or odd and check the sign of the leading
-      // coefficient of the polynomial.
-      CGAL_assertion(lead_sign != CGAL::ZERO);
-
-      if (dir_right)
-      {
-        // The target is at x= +oo, thus:
-        if (lead_sign == CGAL::POSITIVE)
-          _info = (_info | TRG_AT_Y_PLUS_INFTY);
-        else
-          _info = (_info | TRG_AT_Y_MINUS_INFTY);
-      }
-      else
-      {
-        // The target is at x= -oo, thus:
-        if ((deg_num % 2 == 0 && lead_sign == CGAL::POSITIVE) ||
-            (deg_num % 2 == 1 && lead_sign == CGAL::NEGATIVE))
-          _info = (_info | TRG_AT_Y_PLUS_INFTY);
-        else
-          _info = (_info | TRG_AT_Y_MINUS_INFTY);
-      }
-    }
-    else
-    {
-      // In the case of a constant polynomial it is possible to set a finite
-      // y-coordinate for the target point.
-      // x coordinate is 0 although in practice is +-oo
-      _pt = Algebraic_point_2(get_rational_function(P, Q, cache), 
-                              Algebraic_real_1());
-    }
-
-    // Mark that the arc is continuous and valid.
-    _info = (_info | IS_CONTINUOUS);
-    _info = (_info | IS_VALID);
-  }
-
-  //---------------------------------------------------------------------------
-  //Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
-  //for x_s <= x if the ray is directed to the right, or
-  //for x_s >= x if it is directed to the left.
-  //param pcoeffs The rational coefficients of the polynomial p(x).
-  //param x_s The x-coordinate of the source point.
-  //param x_t The x-coordinate of the target point.
-  //precondition: The two x-coordinates must not be equal.
-  Base_rational_arc_d_1(const Polynomial_1& P,
-                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-                        const Cache& cache):
-    _info(0)
-  {
-    _init(P,Integer(1), x_s, x_t, cache);
-  }
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs,
-                        const Algebraic_real_1& x_s,const Algebraic_real_1& x_t,
-                        const Cache& cache):
-    _info(0)
-  {    
-    // Set the numerator & denominator polynomials.
-    Polynomial_1 _numer;
-    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                                 pcoeffs.end()));
-    Integer denom_int;
-    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
-    
-    _init(_numer, denom_int, x_s, x_t, cache);
-  }    
-
-  void _init(const Polynomial_1& P,const Integer& Q_int,
-             const Algebraic_real_1& x_s,const Algebraic_real_1& x_t,
-             const Cache& cache)
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_int));
-    //set rational function 
-    Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int);
-    _f = get_rational_function(P, Q, cache);
-
-    // Compare the x-coordinates and determine the direction.
-    Comparison_result   x_res = CGAL::compare(x_s, x_t);
-
-    CGAL_precondition(x_res != EQUAL);
-
-    if (x_res == SMALLER)
-      _info = (_info | IS_DIRECTED_RIGHT);
-
-    // Set the endpoints.
-    _ps=Algebraic_point_2(_f,x_s);
-    _pt=Algebraic_point_2(_f,x_t);
-    
-    // Mark that the arc is continuous and valid.
-    _info = (_info | IS_CONTINUOUS);
-    _info = (_info | IS_VALID);
-    return;
-  }
-
-  //---------------------------------------------------------------------------
-  //Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
-  //param pcoeffs The rational coefficients of the polynomial p(x).
-  //param qcoeffs The rational coefficients of the polynomial q(x).
-  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
-                        const Cache& cache) :
-    _info(0)
-  {
-    _init(P,Q,cache);
-  }
-
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                        const Cache& cache) :
-    _info(0)
-  {
-    Polynomial_1 _numer;
-    Polynomial_1 _denom;
-    Poly_rat_1 numer_rat(typename
-                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                          pcoeffs.end()));
-    Poly_rat_1 denom_rat(typename
-                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
-                                                          qcoeffs.end()));
-    Integer denom_numer_int,denom_denom_int;
-    typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int);
-    typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int);
-    _numer *= denom_denom_int;
-    _denom *= denom_numer_int;
-
-    _init(_numer,_denom,cache);
-  }
-  void _init(const Polynomial_1& P_, const Polynomial_1& Q_, const Cache& cache) 
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_));
-    //set rational function 
-    // Set the numerator & denominator polynomials.
-
-    Polynomial_1 P;
-    Polynomial_1 Q;
-    _canonicalize(P_, Q_, P, Q);
-                     
-    _f = get_rational_function(P, Q, cache);
-
-    // Mark that the endpoints of the rational functions are unbounded (the
-    // source is at x = -oo and the target is at x = +oo).
-    _info = (_info | SRC_AT_X_MINUS_INFTY);
-    _info = (_info | TRG_AT_X_PLUS_INFTY);
-    _info = (_info | IS_DIRECTED_RIGHT);
-
-    
-    // Analyze the bahaviour of the rational function at x = -oo (the source).
-    Algebraic_real_1          y0;
-    const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0);
-
-    if (inf_s == ARR_BOTTOM_BOUNDARY)
-      _info = (_info | SRC_AT_Y_MINUS_INFTY);
-    else if (inf_s == ARR_TOP_BOUNDARY)
-      _info = (_info | SRC_AT_Y_PLUS_INFTY);
-    else // if (inf_s == ARR_INTERIOR)
-      _ps = Algebraic_point_2();   //the point is a dummy
-    //Analyze the bahaviour of the rational function at x = +oo (the target).
-    const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0);
-
-    if (inf_t == ARR_BOTTOM_BOUNDARY)
-      _info = (_info | TRG_AT_Y_MINUS_INFTY);
-    else if (inf_t == ARR_TOP_BOUNDARY)
-      _info = (_info | TRG_AT_Y_PLUS_INFTY);
-    else // if (inf_t == ARR_INTERIOR)
-      _pt =  Algebraic_point_2();   //the point is a dummy
-
-    // Mark that the arc is valid. As it may have poles, we mark it
-    // as continuous only if the denominator has no roots.
-    _info = ( _info | ( this->_is_continuous() ?
-            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
-  }
-
-  //---------------------------------------------------------------------------
-  //Constructor of a ray of a rational function, defined by y = p(x)/q(x),
-  //for x_s <= x if the ray is directed to the right, or 
-  //for x_s >= x if the ray is directed to the left.
-  //param pcoeffs The rational coefficients of the polynomial p(x).
-  //param qcoeffs The rational coefficients of the polynomial q(x).
-  //param x_s The x-coordinate of the source point.
-  //param dir_right Is the ray directed to the right (to +oo) or to the left
-  //(to -oo).
-  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
-                        const Algebraic_real_1& x_s, bool dir_right,
-                        const Cache& cache) :
-    _info(0)
-  {
-    _init(P, Q, x_s, dir_right, cache);
-  }
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                        const Algebraic_real_1& x_s, bool dir_right,
-                        const Cache& cache) :
-    _info(0)
-  {
-    // Set the numerator and denominator polynomials.
-    Polynomial_1 _numer;
-    Polynomial_1 _denom;
-    Poly_rat_1 numer_rat(typename
-                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                          pcoeffs.end()));
-    Poly_rat_1 denom_rat(typename
-                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
-                                                          qcoeffs.end()));
-    Integer denom_numer_int,denom_denom_int;
-    typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int);
-    typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int);
-    _numer *= denom_denom_int;
-    _denom *= denom_numer_int;
-
-    _init(_numer,_denom, x_s, dir_right, cache);
-  }
-
-  void _init(const Polynomial_1& P_, const Polynomial_1& Q_,
-             const Algebraic_real_1& x_s, bool dir_right,
-             const Cache& cache) 
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_));
-    //set rational function 
-    Polynomial_1 P;
-    Polynomial_1 Q;
-    _canonicalize(P_,Q_,P,Q);
-    _f = get_rational_function(P, Q, cache);
-
-    // Mark that the target points of the polynomial is unbounded.
-    if (dir_right)
-    {
-      _info = (_info | TRG_AT_X_PLUS_INFTY);
-      _info = (_info | IS_DIRECTED_RIGHT);
-    }
-    else
-    {
-      _info = (_info | TRG_AT_X_MINUS_INFTY);
-    }
-
-
-    //The source point has a bounded x-coordinate. 
-    _ps = Algebraic_point_2(_f, x_s);
-    //check if the source point lies next to a pole.
-    if (typename Algebraic_kernel::Sign_at_1()(Q, x_s) != CGAL::ZERO)
-    {
-      // We have a nomral endpoint.
-      //nothing to do....
-    }
-    else
-    {
-      // The y-coodinate is unbounded, but we can set its sign.
-      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_s);
-      const CGAL::Sign sign_s = (dir_right ? signs.second : signs.first);
-
-      _info = (sign_s == CGAL::NEGATIVE) ?
-        (_info | SRC_AT_Y_MINUS_INFTY) : (_info | SRC_AT_Y_PLUS_INFTY);
-    }
-
-    // Set the properties of the target.
-    Algebraic_real_1    y0;
-    Arr_parameter_space inf_t;
-    if (dir_right)
-    {
-      // The target point is at x = +oo.
-      inf_t=_analyze_at_plus_infinity(P, Q, y0);
-    }
-    else
-    {
-      // The target point is at x = -oo.
-      inf_t =_analyze_at_minus_infinity(P, Q, y0);
-    }
-  
-    if (inf_t == ARR_BOTTOM_BOUNDARY) 
-      _info = (_info | TRG_AT_Y_MINUS_INFTY);
-    else if (inf_t == ARR_TOP_BOUNDARY)
-      _info = (_info | TRG_AT_Y_PLUS_INFTY);
-    else // if (inf_t == ARR_INTERIOR)
-      _pt = Algebraic_point_2( ); //the point is a dummy
-
-    // Mark that the arc is valid. As it may have poles, we mark it
-    // as continuous only if the denominator has no roots.
-    _info = ( _info | ( this->_is_continuous() ?
-            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
-  }
-  //---------------------------------------------------------------------------
-  //Constructor of a ray of a rational function, defined by y = p(x)/q(x),
-  //where: x_min <= x <= x_max
-  //param pcoeffs The rational coefficients of the polynomial p(x).
-  //param qcoeffs The rational coefficients of the polynomial q(x).
-  //param x_s The x-coordinate of the source point.
-  //param x_t The x-coordinate of the target point.
-  //precondition: The two x-coordinates must not be equal.
-  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
-                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-                        const Cache& cache):
-    _info(0)
-  {
-    _init(P, Q, x_s, x_t, cache);
-  }
-
-  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-                        const Cache& cache):
-    _info(0)
-  {
-    Polynomial_1 _numer;
-    Polynomial_1 _denom;
-    Poly_rat_1 numer_rat(typename
-                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
-                                                          pcoeffs.end()));
-    Poly_rat_1 denom_rat(typename
-                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
-                                                          qcoeffs.end()));
-    Integer denom_numer_int,denom_denom_int;
-    typename FT_poly_rat_1::Decompose()(numer_rat,_numer,denom_numer_int);
-    typename FT_poly_rat_1::Decompose()(denom_rat,_denom,denom_denom_int);
-    _numer *= denom_denom_int;
-    _denom *= denom_numer_int;
-
-    _init(_numer,_denom,x_s,x_t,cache);
-  }
-
-  void _init(const Polynomial_1& P_, const Polynomial_1& Q_,
-             const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-             const Cache& cache)
-  {
-    CGAL_precondition(!CGAL::is_zero(Q_));
-    //set rational function 
-    Polynomial_1 P;
-    Polynomial_1 Q;
-    _canonicalize(P_, Q_, P, Q);
-    _f = get_rational_function(P, Q, cache);
-
-    // Compare the x-coordinates and determine the direction.
-    Comparison_result   x_res = CGAL::compare(x_s, x_t);
-    CGAL_precondition(x_res != EQUAL);
-
-    if (x_res == SMALLER)
-      _info = (_info | IS_DIRECTED_RIGHT);
-
-        //Set the source point and check if it lies next to a pole.
-    _ps = Algebraic_point_2(_f, x_s);
-
-    //check if source point lies next to a pole.
-    if (typename Algebraic_kernel::Sign_at_1()(Q,x_s) != CGAL::ZERO)
-    {
-      // We have a nomral endpoint.
-      //nothing to do ..
-    }
-    else
-    {
-      // The y-coodinate is unbounded, but we can set its sign.
-      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_s);
-      const CGAL::Sign sign_s =
-        ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.second : signs.first;
-   
-      if (sign_s == CGAL::NEGATIVE)
-        _info = (_info | SRC_AT_Y_MINUS_INFTY);
-      else
-        _info = (_info | SRC_AT_Y_PLUS_INFTY);
-    }
-
-    //Set the target point and check if it lies next to a pole.
-    _pt=Algebraic_point_2(_f,x_t);
-
-    //check if target point lies next to a pole.
-    if (typename Algebraic_kernel::Sign_at_1()(Q,x_t) != CGAL::ZERO)
-    {
-      // We have a nomral endpoint.
-      //nothing to do ..
-    }
-    else
-    {
-      // The y-coodinate is unbounded, but we can set its sign.
-      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_t);
-      const CGAL::Sign sign_t =
-        ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.first : signs.second;
-
-      if (sign_t == CGAL::NEGATIVE)
-        _info = (_info | TRG_AT_Y_MINUS_INFTY);
-      else
-        _info = (_info | TRG_AT_Y_PLUS_INFTY);
-    }
-
-    //Mark that the arc is valid. As it may have poles, we mark it
-    //as continuous only if the denominator has no roots.
-    _info = ( _info | ( this->_is_continuous() ?
-            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
-
-  }
-
-  //-----------------------------
-  // Accessing the arc properties
-  //-----------------------------
- 
-  //-----------------------------------------------------------------
-  //Get the numerator polynomial of the underlying rational function.
-  const Polynomial_1& numerator() const
-  {
-    return(_f.numer());
-  }
-
-  //------------------------------------------------------------------
-  //Get the denominator polynomial of the underlying rational function
-  const Polynomial_1& denominator() const
-  {
-    return(_f.denom());
-  }
-
-  //---------------------------------------------------------
-  //Check if the x-coordinate of the source point is infinite
-  Arr_parameter_space source_parameter_space_in_x() const
-  {
-    return
-      ((_info & SRC_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY :
-      ((_info & SRC_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY :
-      ARR_INTERIOR;
-  }
-
-  //---------------------------------------------------------
-  //Check if the y-coordinate of the source point is infinite
-  Arr_parameter_space source_parameter_space_in_y() const
-  {
-    return
-      ((_info & SRC_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY :
-      ((_info & SRC_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY :
-      ARR_INTERIOR;
-  }
-
-  //---------------------------------------------------------
-  //Check if the x-coordinate of the target point is infinite
-  Arr_parameter_space target_boundary_in_x() const
-  {
-    return
-      ((_info & TRG_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY :
-      ((_info & TRG_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY :
-      ARR_INTERIOR;
-  }
-
-  //---------------------------------------------------------
-  //Check if the y-coordinate of the target point is infinite
-  Arr_parameter_space target_boundary_in_y() const
-  {
-    return ((_info & TRG_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY :
-      ((_info & TRG_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY :
-      ARR_INTERIOR;
-  }
-
-  //--------------------
-  //Get the source point
-  const Algebraic_point_2& source() const
-  {
-    CGAL_precondition((_info & IS_VALID) != 0 &&
-                      source_parameter_space_in_x() == ARR_INTERIOR &&
-                      source_parameter_space_in_y() == ARR_INTERIOR);
-    return (_ps);
-  }
-
-  //----------------------------------------
-  //Get the x-coordinate of the source point
-  Algebraic_real_1 source_x() const
-  {
-    CGAL_precondition((_info & IS_VALID) != 0 &&
-                      source_parameter_space_in_x() == ARR_INTERIOR);
-    return (_ps.x());
-  }
-
-  //----------------------------------------
-  //Get the y-coordinate of the source point
-  //TODO: should we eliminate the function???
-  //Algebraic source_y () const
-  //{
-  // CGAL_precondition ((_info & IS_VALID) != 0 &&
-  //        source_parameter_space_in_y() == ARR_INTERIOR);
-  // return (_ps.y());
-  //}
-
-  //--------------------
-  //Get the target point
-  const Algebraic_point_2& target() const
-  {
-    CGAL_precondition((_info & IS_VALID) != 0 &&
-                      target_boundary_in_x() == ARR_INTERIOR &&
-                      target_boundary_in_y() == ARR_INTERIOR);
-    return (_pt);
-  }
-
-  //----------------------------------------
-  //Get the x-coordinate of the target point
-  Algebraic_real_1 target_x() const
-  {
-    CGAL_precondition((_info & IS_VALID) != 0 &&
-                      target_boundary_in_x() == ARR_INTERIOR);
-    return (_pt.x());
-  }
-
-  //----------------------------------------
-  //Get the y-coordinate of the target point
-  //TODO: should we eliminate the function???
-  //Algebraic target_y () const
-  //{
-  // CGAL_precondition ((_info & IS_VALID) != 0 &&
-  //        target_boundary_in_y() == ARR_INTERIOR);
-  // return (_pt.y());
-  //}
-
-  //-------------------------------------------------------
-  //Check if the x-coordinate of the left point is infinite
-  Arr_parameter_space left_parameter_space_in_x() const
-  {
-    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
-      source_parameter_space_in_x() : target_boundary_in_x();
-  }
-
-  //-------------------------------------------------------
-  //Check if the y-coordinate of the left point is infinite
-  Arr_parameter_space left_parameter_space_in_y() const
-  {
-    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
-      source_parameter_space_in_y() : target_boundary_in_y();
-  }
-  //--------------------------------------------------------
-  //Check if the x-coordinate of the right point is infinite
-  Arr_parameter_space right_parameter_space_in_x() const
-  {
-    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
-      target_boundary_in_x() : source_parameter_space_in_x();
-  }
-
-  //--------------------------------------------------------
-  //Check if the y-coordinate of the right point is infinite
-  Arr_parameter_space right_parameter_space_in_y() const
-  {
-    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
-      target_boundary_in_y() : source_parameter_space_in_y();
-  }
-
-  //------------------------------------
-  //Get the x_value of the left endpoint
-  const Algebraic_real_1& left_x() const
-  {
-    CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR);
-    return ((_info & IS_DIRECTED_RIGHT) ? _ps.x() : _pt.x());
-  }
-
-  //------------------------------------
-  //Get the x_value of the right endpoint
-  const Algebraic_real_1& right_x() const
-  {
-    CGAL_precondition((_info & IS_VALID) != 0 &&
-        right_parameter_space_in_x() == ARR_INTERIOR );
-    return ((_info & IS_DIRECTED_RIGHT) ? _pt.x() : _ps.x());
-  }
-  //---------------------
-  //Get the left endpoint
-  const Algebraic_point_2& left() const
-  {
-    CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR &&
-        left_parameter_space_in_y() == ARR_INTERIOR);
-    return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt);
-  }
-
-  //----------------------
-  //Get the right endpoint
-  const Algebraic_point_2& right() const
-  {
-    CGAL_precondition(right_parameter_space_in_x() == ARR_INTERIOR &&
-        right_parameter_space_in_y() == ARR_INTERIOR);
-    return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps);
-  }
-
-  //-------------------------
-  //Check if the arc is valid
-  bool is_valid() const
-  {
-    return ((_info & IS_VALID) != 0);
-  }
-
-  //------------------------------
-  //Check if the arc is continuous
-  bool is_continuous() const
-  {
-    return ((_info & IS_CONTINUOUS) != 0);
-  }
-
-  //----------------------------------
-  //Check if the arc is directed right
-  bool is_directed_right() const
-  {
-    return ((_info & IS_DIRECTED_RIGHT) != 0);
-  }
-
-  //--------------
-  //name Modifiers
-  //---------------
-
-  //--------------------------------
-  //Mark the arc as being continuous
-  void set_continuous()
-  {
-    _info = (_info | IS_CONTINUOUS);
-  }
-
-  //-----------------------------
-  //Mark the arc as being invalid
-  void set_invalid()
-  {
-    _info = (_info & ~IS_VALID);
-  }
-
-//   bool is_intersecting(Self& arc)
-//   {
-//     Arr_parameter_space left_parameter_space = ( (left_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.left_parameter_space_in_x() != ARR_INTERIOR) ) ?
-//       ARR_LEFT_BOUNDARY :
-//       ARR_INTERIOR;
-//     Arr_parameter_space right_parameter_space = ( (right_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.right_parameter_space_in_x()!= ARR_INTERIOR) ) ?
-//       ARR_RIGHT_BOUNDARY :
-//       ARR_INTERIOR;
-//     Algebraic_real_1 left,right;
-//     if (left_parameter_space == ARR_INTERIOR)
-//       left = 
-//         (left_parameter_space_in_x()!= ARR_INTERIOR)     ? arc.left_x():
-//         (arc.left_parameter_space_in_x()!= ARR_INTERIOR) ? left_x() :
-//         (arc.left_x() < left_x())                 ? left_x() :
-//         arc.left_x();
-//     if (right_parameter_space == ARR_INTERIOR)
-//       right = (right_parameter_space_in_x()!= ARR_INTERIOR)  ? arc.right_x():
-//         (arc.right_parameter_space_in_x()!= ARR_INTERIOR) ? right_x() :
-//         (arc.right_x() < right_x())     ? right_x() :
-//         arc.right_x();
-//     if (left > right)
-//       return false;
-  
-//     //check if the base functions are equal
-//     if (_has_same_base (arc))
-//       return true;
-//     Rational_function_pair rat_pair = get_rational_pair(get_rational_function(this->_numer,this->_denom),
-//         get_rational_function(arc._numer,arc._denom));
-//     return rat_pair.is_intersecting_in_range(left_parameter_space,left,right_parameter_space,right);
-//   }
-  
-  //--------------------------------------------------------
-  //Split the arc into two at a given pole. 
-  //The function returns the sub-arc to the left of the pole 
-  //and sets (*this) to be the right sub-arc.
-  //param x0 The x-coordinate of the pole.
-  //precondition x0 lies in the interior of the arc.
-  //return The sub-arc to the left of the pole.
-   
-  Self split_at_pole(const Algebraic_real_1& x0)
-  {
-    // Analyze the behaviour of the function near the given pole.
-    const std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x0);
-    const CGAL::Sign    sign_left = signs.first;
-    const CGAL::Sign    sign_right = signs.second;
-
-    // Create a fictitious point that represents the x-coordinate of the pole.
-    Algebraic_point_2 p0(_f, x0);
-
-    // Make a copy of the current arc.
-    Self       c1 = *this;
-
-    // Split the arc, such that c1 lies to the left of the pole and (*this)
-    // to its right.
-    if ((_info & IS_DIRECTED_RIGHT) != 0)
-    {
-      c1._pt = p0;
-      c1._info = (c1._info & ~TRG_INFO_BITS);
-      if (sign_left == CGAL::NEGATIVE)
-        c1._info = (c1._info | TRG_AT_Y_MINUS_INFTY);
-      else
-        c1._info = (c1._info | TRG_AT_Y_PLUS_INFTY);
-
-      this->_ps = p0;
-      this->_info = (this->_info & ~SRC_INFO_BITS);
-      if (sign_right == CGAL::NEGATIVE)
-        this->_info = (this->_info | SRC_AT_Y_MINUS_INFTY);
-      else
-        this->_info = (this->_info | SRC_AT_Y_PLUS_INFTY);
-    }
-    else
-    {
-      c1._ps = p0;
-      c1._info = (c1._info & ~SRC_INFO_BITS);
-      if (sign_left == CGAL::NEGATIVE)
-        c1._info = (c1._info | SRC_AT_Y_MINUS_INFTY);
-      else
-        c1._info = (c1._info | SRC_AT_Y_PLUS_INFTY);
-  
-      this->_pt = p0;
-      this->_info = (this->_info & ~TRG_INFO_BITS);
-      if (sign_right == CGAL::NEGATIVE)
-        this->_info = (this->_info | TRG_AT_Y_MINUS_INFTY);
-      else
-        this->_info = (this->_info | TRG_AT_Y_PLUS_INFTY);
-    }
-
-    // Mark the sub-arc c1 as continuous.
-    c1._info = (c1._info | IS_CONTINUOUS);
-
-    return (c1);
-  }
-  
-  //---------------
-  //name Predicates
-  //---------------
- 
-
-  //---------------------------------------------------------------------------
-  //Get the relative position of the point with respect to the rational arc.
-  //param p The query point.
-  //precondition: p is in the x-range of the arc.
-  //    both p's supporting curve and the rational arc are continous
-  //return SMALLER if the point is below the arc;
-  //       LARGER if the point is above the arc;
-  //       EQUAL if p lies on the arc.
-  Comparison_result point_position(const Algebraic_point_2& p,
-                                   const Cache& cache) const
-  {
-    // Make sure that p is in the x-range of the arc and check whether it
-    // has the same x-coordinate as one of the endpoints.
-    CGAL_precondition(is_continuous());
-    CGAL_precondition(_is_in_true_x_range(p.x()));
-    if (p.rational_function() == _f)
-      return EQUAL;
-    Rational_function_pair rat_pair(get_rational_pair(p.rational_function(), _f,
-                                                      cache));
-    return rat_pair.compare_f_g_at(p.x());
-  }
-  //---------------------------------------------------------------------------
-  //Compare the x-coordinate of a vertical asymptote of the arc 
-  //(one of its ends) and the given point.
-  Comparison_result compare_end(Arr_curve_end ce,
-                                const Algebraic_point_2& p) const
-  {
-    Algebraic_real_1 x0;
-
-    if (ce == ARR_MIN_END) {
-      CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR &&
-                     left_parameter_space_in_y() != ARR_INTERIOR);
-      if ((_info & IS_DIRECTED_RIGHT) != 0)
-        x0 = _ps.x();
-      else
-        x0 = _pt.x();
-    }
-    else
-    {
-      CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR &&
-                     right_parameter_space_in_y() != ARR_INTERIOR);
-      if ((_info & IS_DIRECTED_RIGHT) != 0)
-        x0 = _pt.x();
-      else
-        x0 = _ps.x();
-    }
-
-    // Compare the x-coordinates.
-    const Comparison_result  res = CGAL::compare(x0, p.x());
-
-    if (res != EQUAL)
-      return (res);
-
-    return ((ce == ARR_MIN_END) ?  LARGER : SMALLER);
-  }
-  
-  //------------------------------------------------------------------
-  //Compare the x-coordinate of a vertical asymptotes of the two arcs.
-  //approaching from the same direction
-  Comparison_result compare_near_end(const Self& arc, Arr_curve_end ce,
-                                     const Cache& cache) const
-  {
-    CGAL_precondition_code(
-      if (ce == ARR_MIN_END)
-      {
-        CGAL_precondition(this->left_parameter_space_in_y() != ARR_INTERIOR);
-        CGAL_precondition(arc.left_parameter_space_in_y() != ARR_INTERIOR);
-        CGAL_precondition(this->left_parameter_space_in_y() ==
-                          arc.left_parameter_space_in_y());
-      }
-      else // (ce == ARR_MAX_END)
-      {
-        CGAL_precondition(this->right_parameter_space_in_y() != ARR_INTERIOR);
-        CGAL_precondition(arc.right_parameter_space_in_y() != ARR_INTERIOR);
-        CGAL_precondition(this->right_parameter_space_in_y() ==
-                          arc.right_parameter_space_in_y());
-      }
-      );
-
-    // Get the x-coordinates of the vertical asymptote.
-    Algebraic_real_1 x((ce == ARR_MIN_END)? this->left_x() : this->right_x());
-    CGAL_assertion(CGAL::compare(x, (ce == ARR_MIN_END)?
-                                 arc.left_x () : arc.right_x()) == EQUAL);
-
-    //both arcs have vertical asymptotes and come from the same side of the
-    //x-axis compare value of functions close to the root on the correct side
-    if (_has_same_base(arc))
-      return CGAL::EQUAL;
-    Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache);
-    
-    CGAL::Comparison_result comp_f_g_y =
-      rat_pair.compare_f_g_at(x,ce == ARR_MAX_END ?
-                              CGAL::NEGATIVE : CGAL::POSITIVE);
-    if (ce == ARR_MAX_END)
-    {
-      return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
-        comp_f_g_y : -comp_f_g_y;
-    }
-    else
-    {
-      return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
-        -comp_f_g_y : comp_f_g_y;
-    }
-  }
-
-  //------------------------------------------------------------------
-  //Compare the x-coordinate of a vertical asymptotes of the two arcs.   
-  Comparison_result compare_ends(Arr_curve_end ind1,const Self& arc, 
-                                 Arr_curve_end ind2, const Cache& cache) const
-  {
-    // Get the x-coordinates of the first vertical asymptote.
-    Algebraic_real_1             x1;
-
-    if (ind1 == ARR_MIN_END)
-    {
-      CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR &&
-                     left_parameter_space_in_y() != ARR_INTERIOR);
-      if ((_info & IS_DIRECTED_RIGHT) != 0)
-        x1 = _ps.x();
-      else
-        x1 = _pt.x();
-    }
-    else
-    {
-      CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR &&
-                     right_parameter_space_in_y() != ARR_INTERIOR);
-      if ((_info & IS_DIRECTED_RIGHT) != 0)
-        x1 = _pt.x();
-      else
-        x1 = _ps.x();
-    }
-
-    // Get the x-coordinates of the second vertical asymptote.
-    Algebraic_real_1                x2;
-
-    if (ind2 == ARR_MIN_END)
-    {
-      CGAL_assertion(arc.left_parameter_space_in_x() == ARR_INTERIOR &&
-                     arc.left_parameter_space_in_y() != ARR_INTERIOR);
-      if ((arc._info & IS_DIRECTED_RIGHT) != 0)
-        x2 = arc._ps.x();
-      else
-        x2 = arc._pt.x();
-    }
-    else
-    {
-      CGAL_assertion(arc.right_parameter_space_in_x() == ARR_INTERIOR &&
-                     arc.right_parameter_space_in_y() != ARR_INTERIOR);
-      if ((arc._info & IS_DIRECTED_RIGHT) != 0)
-        x2 = arc._pt.x();
-      else
-        x2 = arc._ps.x();
-    }
-
-    // Compare the x-coordinates. In case they are not equal we are done.
-    const Comparison_result  res = CGAL::compare(x1, x2);
-
-    if (res != EQUAL)
-      return (res);
-
-    // If the x-coordinates of the asymptote are equal, but one arc is
-    // defined to the left of the vertical asymptote and the other to its
-    // right, we can easily determine the comparison result.
-    if (ind1 == ARR_MAX_END && ind2 == ARR_MIN_END)
-      return (SMALLER);
-    else if (ind1 == ARR_MIN_END && ind2 == ARR_MAX_END)
-      return (LARGER);
-
-    //both arcs have vertical asymptotes and come from the same side of the x-axis
-    //compare value of functions close to the root on the correct side
-    if (_has_same_base(arc))
-      return CGAL::EQUAL;
-    Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache);
-    
-    CGAL::Comparison_result comp_f_g_y =
-      rat_pair.compare_f_g_at(x1, ind1 == ARR_MAX_END ?
-                              CGAL::NEGATIVE : CGAL::POSITIVE);
-    if( ind1 == ARR_MAX_END)
-    {
-      CGAL_postcondition(ind2 == ARR_MAX_END); 
-      CGAL_postcondition(right_parameter_space_in_y() ==
-                         arc.right_parameter_space_in_y());
-      return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
-        comp_f_g_y : -comp_f_g_y;
-    }
-    else
-    {
-      CGAL_postcondition(ind2 == ARR_MIN_END); 
-      CGAL_postcondition(left_parameter_space_in_y() ==
-                         arc.left_parameter_space_in_y());
-      return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
-        -comp_f_g_y : comp_f_g_y;
-    }
-  }
-
-  //------------------------------------------------------------------
-  // Compare the slopes of the arc with another given arc 
-  // at their given intersection point.
-  // param cv The given arc.
-  // param p The intersection point.
-  // param mult Output: The mutiplicity of the intersection point.
-  // return SMALLER if (*this) slope is less than cv's;
-  //      EQUAL if the two slopes are equal;
-  //         LARGER if (*this) slope is greater than cv's.
-  //Comparison_result compare_slopes (const Self& arc,const Algebraic_point_2& p,unsigned int& mult) const
-  //
-  // deleted!!!
-
-  //------------------------------------------------------------------
-  // Compare the two arcs at a given intersection point 
-  // param arc The given arc
-  // param p  The intersection point
-  // param to_left to check to the left or to the right of intersection point
-  // precondition: Both arcs intersect at p
-  // return SMALLER if (*this) lies below the other arc;
-  //   EQUAL if the two supporting functions are equal;
-  //   LARGER if (*this) lies above the other arc.
-
-  Comparison_result compare_at_intersection(const Self& arc,
-                                            const Algebraic_point_2& p,
-                                            bool to_left, const Cache& cache) const
-  {
-    CGAL_precondition(this->point_position(p,cache) == CGAL::EQUAL &&
-                      arc.point_position(p,cache)   == CGAL::EQUAL);
-
-    //check if the base functions are equal
-    if (_has_same_base(arc))
-      return CGAL::EQUAL;
-
-    Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f,cache);
-    return rat_pair.compare_f_g_at(p.x(),
-                                   to_left ? CGAL::SMALLER : CGAL::LARGER);
-  }
-
-  //------------------------------------------------------------------
-  // Compare the two arcs at x = -oo.
-  // param arc The given arc
-  // precondition: Both arcs have a left end which is unbounded in x.
-  // return SMALLER if (*this) lies below the other arc;
-  //   EQUAL if the two supporting functions are equal;
-  //   LARGER if (*this) lies above the other arc.
-
-  Comparison_result compare_at_minus_infinity(const Self& arc,
-                                              const Cache& cache) const
-  {
-    CGAL_precondition(left_parameter_space_in_x() == ARR_LEFT_BOUNDARY &&
-                      arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY);
-
-    //check if the base functions are equal
-    if (_has_same_base(arc))
-      return CGAL::EQUAL;
-
-    Rational_function_pair rat_pair =
-      get_rational_pair(this->_f, arc._f, cache);
-    return rat_pair.compare_f_g_at(ARR_LEFT_BOUNDARY);
-  }
-
-  //------------------------------------------------------------------
-  //Compare the two arcs at x = +oo.
-  //param arc The given arc.
-  //pre Both arcs are have a right end which is unbounded in x.
-  //return SMALLER if (*this) lies below the other arc;
-  //       EQUAL if the two supporting functions are equal;
-  //       LARGER if (*this) lies above the other arc.
-
-  Comparison_result compare_at_plus_infinity(const Self& arc,
-                                             const Cache& cache) const
-  {
-    CGAL_precondition(right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY &&
-                      arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY);
-
-    //check if the base functions are equal
-    if (_has_same_base(arc))
-      return CGAL::EQUAL;
-
-    Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f, cache);
-    return rat_pair.compare_f_g_at(ARR_RIGHT_BOUNDARY);
-  }
-
-  //----------------------------------------------------------
-  // Check whether the two arcs are equal (have the same graph).
-  //param arc The compared arc.
-  //return true if the two arcs have the same graph; false otherwise.
-  bool equals(const Self& arc) const
-  {
-    // The two arc must have the same base rational function.
-    CGAL_precondition(is_valid());
-    CGAL_precondition(arc.is_valid());
-    if (! _has_same_base(arc))
-      return false;
-
-    // Check that the arc left endpoints are the same.
-    Arr_parameter_space inf1 = left_parameter_space_in_x();
-    Arr_parameter_space inf2 = arc.left_parameter_space_in_x();
-
-    if (inf1 != inf2)
-      return false;
-
-    if (inf1 == ARR_INTERIOR)
-    {
-      inf1 = left_parameter_space_in_y();
-      inf2 = arc.left_parameter_space_in_y();
-
-      if (inf1 != inf2)
-        return false;
-    }
-
-    if (inf1 == ARR_INTERIOR &&
-        CGAL::compare(left().x(), arc.left().x()) != EQUAL)
-    {
-      return false;
-    }
-
-    // Check that the arc right endpoints are the same.
-    inf1 = right_parameter_space_in_x();
-    inf2 = arc.right_parameter_space_in_x();
-
-    if (inf1 != inf2)
-      return false;
-
-    if (inf1 == ARR_INTERIOR)
-    {
-        inf1 = right_parameter_space_in_y();
-        inf2 = arc.right_parameter_space_in_y();
-
-        if (inf1 != inf2)
-          return false;
-    }
-
-    if (inf1 == ARR_INTERIOR &&
-        CGAL::compare(right().x(), arc.right().x()) != EQUAL)
-      return false;
-
-    // If we reached here, the two arc are equal:
-    return true;
-  }
-
-  //----------------------------------------------------------
-  //Check whether it is possible to merge the arc with the given arc.
-  //param arc The query arc.
-  //return true if it is possible to merge the two arcs;
-  //   false otherwise.
-  bool can_merge_with(const Self& arc) const
-  {
-    // In order to merge the two arcs, they should have the same base
-    // rational function.
-    CGAL_precondition(is_valid());
-    CGAL_precondition(arc.is_valid());
-    if (! _has_same_base(arc))
-      return false;
-
-    // Check if the left endpoint of one curve is the right endpoint of
-    // the other.
-
-    return ((right_parameter_space_in_x() == ARR_INTERIOR &&
-             right_parameter_space_in_y() == ARR_INTERIOR &&
-             arc.left_parameter_space_in_x() == ARR_INTERIOR &&
-             arc.left_parameter_space_in_y() == ARR_INTERIOR &&
-             //CGAL::equal(right_x() ,arc.left_x() )) ||
-             (right_x() == arc.left_x() )) ||
-            (left_parameter_space_in_x() == ARR_INTERIOR &&
-             left_parameter_space_in_y() == ARR_INTERIOR &&
-             arc.right_parameter_space_in_x() == ARR_INTERIOR &&
-             arc.right_parameter_space_in_y() == ARR_INTERIOR &&
-             //CGAL::equal(left_x(), arc.right_x())));  
-             (left_x() == arc.right_x())));  
-  }
-  //------------------------------------
-  //Constructions of points and curves
-  //------------------------------------
-
-  //------------------------------------
-  // Flip the arc (swap its source and target).
-  // return The flipped arc.
-  Self flip() const
-  {
-    CGAL_precondition(is_valid());
-
-    // Create the flipped arc.
-    Self   arc;
-
-    arc._f = _f;
-    arc._ps = _pt;
-    arc._pt = _ps;
-
-    // Manipulate the information bits.
-    int    src_info = (_info & SRC_INFO_BITS);
-    int    trg_info = (_info & TRG_INFO_BITS);
-    arc._info = (src_info << 4) | (trg_info >> 4) | IS_VALID;
-
-    if ((_info & IS_DIRECTED_RIGHT) == 0)
-      arc._info = (arc._info | IS_DIRECTED_RIGHT);
-
-    if ((_info & IS_CONTINUOUS) != 0)
-      arc._info = (arc._info | IS_CONTINUOUS);
-     
-    return (arc);
-  }
-
-  //------------------------
-  // Print the rational arc.
-  std::ostream& print(std::ostream& os) const
-  {    
-    // Print y as a rational function of x.
-    os << "y = (";    
-    Base_rational_arc_ds_1::print_polynomial(os, this->numerator(), 'x');
-    os << ") / (";
-    Base_rational_arc_ds_1::print_polynomial(os, this->denominator(), 'x');
-    os << ") on ";
-
-    // Print the definition range.
-    Arr_parameter_space      inf_x = source_parameter_space_in_x();
-    if (inf_x == ARR_LEFT_BOUNDARY) 
-      os << "(-oo";
-    else if (inf_x == ARR_RIGHT_BOUNDARY)
-      os << "(+oo";
-    else if (source_parameter_space_in_y() != ARR_INTERIOR)
-      os << '(' << CGAL::to_double(source_x());
-    else
-      os << '[' << CGAL::to_double(source().x());
-
-    os << ", ";
-
-    inf_x = target_boundary_in_x();
-    if (inf_x == ARR_LEFT_BOUNDARY) 
-      os << "-oo)";
-    else if (inf_x == ARR_RIGHT_BOUNDARY)
-      os << "+oo)";
-    else if (target_boundary_in_y() != ARR_INTERIOR)
-      os << CGAL::to_double(target_x()) << ')';
-    else
-      os << CGAL::to_double(target().x()) << ']';
-
-    return (os);
-  }
-
-protected:
-
- 
-  //-------------------------------
-  //Auxiliary (protected) functions.
-  //-------------------------------
-
-  //--------------------------------------------------------------------------
-  // Cannonicalize numerator and denominator such that:
-  //  There are no common devisor
-  //  If negative sign exists, it is in the numerator
-  void _canonicalize(const Polynomial_1& P,const Polynomial_1& Q,
-                     Polynomial_1& P_new  ,Polynomial_1& Q_new)
-  {
-    Polynomial_1 gcd = CGAL::gcd(P,Q);
-    if (gcd != 1)
-    {
-      P_new=CGAL::integral_division(P,gcd);
-      Q_new=CGAL::integral_division(Q,gcd);
-    }
-    else
-    {
-      P_new=P;
-      Q_new=Q;
-    }
-
-    if (typename AT_poly::Unit_part()(Q_new) == -1) //leading coefficient sign
-    {
-      P_new*=-1;
-      Q_new*=-1;
-    }
-    return;
-  }
-  
-  //--------------------------------------------------------------------------
-  // Check if the given x-value is in the x-range of the arc.
-  // param x The x-value.
-  // param eq_src Output: Is this value equal to the x-coordinate of the
-  //                       source point.
-  // param eq_trg Output: Is this value equal to the x-coordinate of the
-  //                       target point.
-   
-  bool _is_in_x_range(const Algebraic_real_1& x, bool& eq_src,
-                      bool& eq_trg) const
-  {
-    Comparison_result  res1;
-
-    eq_src = eq_trg = false;
-    if ((_info & IS_DIRECTED_RIGHT) != 0)
-    {
-      // Compare to the left endpoint (the source in this case).
-      if ((_info & SRC_AT_X_MINUS_INFTY) != 0)
-      {
-        res1 = LARGER;
-      }
-      else
-      {
-        res1 = CGAL::compare(x, _ps.x());
-
-        if (res1 == SMALLER)
-          return false;
-         
-        if (res1 == EQUAL)
-        {
-          eq_src = true;
-          return true;
-        }
-      }
-       
-      // Compare to the right endpoint (the target in this case).
-      if ((_info & TRG_AT_X_PLUS_INFTY) != 0)
-        return true;
-
-      const Comparison_result  res2 = CGAL::compare(x, _pt.x());
-       
-      if (res2 == LARGER)
-        return false;
-        
-      if (res2 == EQUAL)
-        eq_trg = true;
-
-      return true;
-    }
-     
-    // Compare to the left endpoint (the target in this case).
-    if ((_info & TRG_AT_X_MINUS_INFTY) != 0)
-    {
-      res1 = LARGER;
-    }
-    else
-    {
-      res1 = CGAL::compare(x, _pt.x());
-
-      if (res1 == SMALLER)
-        return false;
-         
-      if (res1 == EQUAL)
-      {
-        eq_trg = true;
-        return true;
-      }
-    }
-       
-    // Compare to the right endpoint (the source in this case).
-    if ((_info & SRC_AT_X_PLUS_INFTY) != 0)
-      return true;
-
-    const Comparison_result  res2 = CGAL::compare(x, _ps.x());
-       
-    if (res2 == LARGER)
-      return false;
-        
-    if (res2 == EQUAL)
-      eq_src = true;
-     
-    return true;
-  }
-
-  //----------------------------------------------------------
-  // Check if the given x-value is in the x-range of the arc, 
-  // excluding its open ends.
-  bool _is_in_true_x_range(const Algebraic_real_1& x) const
-  {
-    bool          eq_src, eq_trg;
-    const bool    is_in_x_range_closure = _is_in_x_range(x, eq_src, eq_trg);
-
-    if (! is_in_x_range_closure)
-      return false;
-
-    // Check if we have a vertical asymptote at the source point.
-    if (eq_src && (_info & (SRC_AT_Y_MINUS_INFTY | SRC_AT_Y_PLUS_INFTY)) != 0)
-      return false;
-
-    // Check if we have a vertical asymptote at the target point.
-    if (eq_trg && (_info & (TRG_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY)) != 0)
-      return false;
-
-    // If we reached here, the value is in the true x-range of the arc.
-    return true;
-  }
- 
-  //------------------------------------------------------------------------
-  // Check if the underlying rational function is the same in the given arc.
-  //  param arc The given arc.
-  //   return true if arc's underlying rational function is the same
-  //       as of *this; 
-  //   false otherwise.
-
-  bool _has_same_base(const Self& arc) const
-  {
-    return (this->_f == arc._f);
-  }
-  //bool operator == (const Self& arc) const
-  //{
-  //  if (this == &arc)
-  //    return true;
-  //  if ((_info ==arc._info) &&(_has_same_base(arc) ))
-  //    {
-  //      bool same_source(true);
-  //      bool same_target(true);
-  //      if (  (this->source_parameter_space_in_x () == ARR_INTERIOR) && 
-  //          (this->source_parameter_space_in_y () == ARR_INTERIOR) )
-  //        same_source = (this->source() == arc.source());
-  //      if (  (this->target_boundary_in_x () == ARR_INTERIOR) && 
-  //          (this->target_boundary_in_y () == ARR_INTERIOR) )
-  //        same_target = (this->target() == arc.target());
-  //      return (same_source && same_target);
-  //    }
-  //  return false;
-  //}
-
-  //---------------------------------------------------------------------
-  //Compute infinity type of the rational function P(x)/Q(x) at x = -oo.
-  // param y Output: The value of the horizontal asymptote (if exists).
-  // return The infinity type for the y-coordinate at x = -oo.
-
-  Arr_parameter_space _analyze_at_minus_infinity(const Polynomial_1& P,
-                                                 const Polynomial_1& Q,
-                                                 Algebraic_real_1& y) const
-  {
-    // Get the degree of the polynomials.
-    const int    deg_p(CGAL::degree(P));
-    const int    deg_q(CGAL::degree(Q));
-
-    if (deg_p <= 0 || deg_p <= deg_q)
-      {
-        // We have a zero polynomial or a zero asymptote.
-        y = 0;
-        return (ARR_INTERIOR);
-      }
-    // Get the leading coefficients.
-    Integer p_lead(CGAL::leading_coefficient(P));
-    Integer q_lead(CGAL::leading_coefficient(Q));
-
-    if (deg_p == deg_q)
-      {
-        // We have a horizontal asymptote.
-        y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead));
-        return (ARR_INTERIOR);
-      }
-
-    // We have a tendency to infinity.
-    const int    def_diff = deg_p - deg_q;
-
-    return (CGAL::sign(p_lead) == CGAL::sign (q_lead)) ?
-      ((def_diff % 2 == 0) ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY) :
-      ((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
-  }
-
-  //---------------------------------------------------------------------
-  //Compute infinity type of the rational function P(x)/Q(x) at x = +oo.
-  // param y Output: The value of the horizontal asymptote (if exists).
-  // return The infinity type for the y-coordinate at x = +oo.
-
-  Arr_parameter_space _analyze_at_plus_infinity(const Polynomial_1& P,
-                                                const Polynomial_1& Q,
-                                                Algebraic_real_1& y) const
-  {
-    // Get the degree of the polynomials.
-    const int    deg_p(CGAL::degree(P));
-    const int    deg_q(CGAL::degree(Q));
-
-    if (deg_p <= 0 || deg_p <= deg_q)
-      {
-        // We have a zero polynomial or a zero asymptote.
-        y = 0;
-        return (ARR_INTERIOR);
-      }
-
-    // Get the leading coefficients.
-    Integer p_lead(CGAL::leading_coefficient(P));
-    Integer q_lead(CGAL::leading_coefficient(Q));
-     
-    if (deg_p == deg_q)
-      {
-        // We have a horizontal asymptote.
-        y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead));
-        return (ARR_INTERIOR);
-      }
-
-    // We have a tendency to infinity.
-    return (CGAL::sign(p_lead) == CGAL::sign(q_lead)) ?
-      ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY;
-  }
-
-  //---------------------------------------------------------------------
-  //Compute all zeros of the denominator polynomial that lie within the
-  // x-range of the arc
-
-  template <typename OutputIterator>
-  OutputIterator _denominator_roots(OutputIterator oi, bool& root_at_ps,
-                                    bool& root_at_pt) const
-  {
-    root_at_ps = root_at_pt = false;
-
-    if (CGAL::degree(this->denominator()) == 0)
-      return (oi);
-
-    // Compute the roots of the denominator polynomial.
-    std::list<Algebraic_real_1>                    q_roots;
-    bool                                           eq_src, eq_trg;
-    typename std::list<Algebraic_real_1>::const_iterator  x_iter;
-
-    //solve for roots without caring for multiplicity 
-    //hence the usage of the bool var
-
-    std::copy(_f.poles().begin(),_f.poles().end(),std::back_inserter (q_roots));
-  
-    // Go over the roots and check whether they lie in the x-range of the arc.
-    for (x_iter = q_roots.begin(); x_iter != q_roots.end(); ++x_iter)
-    {
-      if (_is_in_x_range (*x_iter, eq_src, eq_trg))
-      {
-        if (eq_src)
-        {
-          root_at_ps = true;
-        }
-        else if (eq_trg)
-        {
-          root_at_pt = true;
-        }
-        else
-        {
-          // The root lies in the interior of the arc.
-          *oi++ = *x_iter;
-        }
-      }
-    }
-
-    return (oi);
-  }
-
-  //---------------------------------------------------------------------
-  // Check whether the arc is continuous. 
-  bool _is_continuous()
-  {
-    // Compute the roots of the denominator polynomial, and make sure
-    // there are none in the range of definition.
-    std::list<Algebraic_real_1>          q_roots;
-    bool                                 root_at_ps, root_at_pt;
-
-    this->_denominator_roots(std::back_inserter(q_roots),
-        root_at_ps, root_at_pt);
-
-    return (q_roots.empty());
-  }
-
-  //---------------------------------------------------------------------
-  //Determine the signs of the rational functions infinitisimally to the left
-  //   and to the right of the given pole.
-  //   param x0 The x-coordinate of the pole.
-  //   pre x0 lies in the interior of the arc.
-  //   return The signs to the left and to the right of x0.
-  std::pair<CGAL::Sign, CGAL::Sign>
-  _analyze_near_pole(const Algebraic_real_1& x0) const
-  {
-    return std::make_pair( _f.sign_at(x0,CGAL::NEGATIVE),
-        _f.sign_at(x0,CGAL::POSITIVE));
-  }
-
-  //---------------------------------------------------------------------
-  // Print a polynomial nicely.
-
-  //std::ostream& _print_polynomial (std::ostream& os,
-  //    const Polynomial_1& poly,
-  //    char var) const
-  //{
-  //  // Get the degree.
-  //  const int    deg = CGAL::degree(poly);
-  // 
-  //  Integer     coeff;
-  //  CGAL::Sign  sgn;
-  //  int         k;
-
-  //  if (deg < 0)
-  //    {
-  //      os << '0';
-  //      return (os);
-  //    }
-
-  //  for (k = deg; k >= 0; k--)
-  //    { 
-  //      //coeff = pt::Get_coefficient()(poly, k);
-  //      coeff = CGAL::get_coefficient(poly, k);
-  //
-  //      if (k == deg)
-  //        os << coeff;
-  //      else if ((sgn = CGAL::sign (coeff)) == POSITIVE)
-  //        os << " + " << coeff;
-  //      else if (sgn == NEGATIVE)
-  //        os << " - " << -coeff;
-  //      else
-  //        continue;
-  //   
-  //      if (k > 1)
-  //        os << '*' << var << '^' << k;
-  //      else if (k == 1)
-  //        os << '*' << var;
-  //    }
-
-  //  return (os);
-  //}
-
-};
-
-//-------------------------------
-//! Exporter for rational arcs.
-template <typename Algebraic_kernel_>
-std::ostream& operator<<(std::ostream& os, 
-                         const Base_rational_arc_d_1<Algebraic_kernel_> & arc)
-{
-  return (arc.print(os));
-}
-
-/*! \class Continuous_rational_arc_d_1
- * Representation of a continuous portion of a rational function.
- */
-template <typename Algebraic_kernel_>
-class Continuous_rational_arc_d_1:
-    public Base_rational_arc_d_1<Algebraic_kernel_>
-{
-public:
-  bool is_left_to_right() const
-  { return (this->_info && Base::IS_DIRECTED_RIGHT); }
-
-public:
-  typedef Algebraic_kernel_                             Algebraic_kernel;
-  
-  typedef Continuous_rational_arc_d_1<Algebraic_kernel> Self;
-  typedef Base_rational_arc_d_1<Algebraic_kernel>       Base;
-
-  typedef typename Base::Integer                        Integer;
-  typedef typename Base::Rational                       Rational; 
-  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
-  typedef typename Base::Algebraic_point_2              Algebraic_point_2;
-  typedef typename Base::Polynomial_1                   Polynomial_1;
-  typedef typename Base::Multiplicity                   Multiplicity;
-  typedef typename Base::Rational_function              Rational_function;
-  typedef typename Base::Rational_function_pair         Rational_function_pair;
-
-  typedef typename Base::Rat_vector                     Rat_vector;
-  typedef typename Base::Algebraic_vector               Algebraic_vector;
-  typedef typename Base::Multiplicity_vector            Multiplicity_vector;
-
-  typedef typename Base::Cache                          Cache;
-
-  typedef std::pair<Algebraic_point_2, Multiplicity>    Intersection_point_2;
-  //typedef std::pair<Algebraic_point_2, unsigned int>  Intersection_point_2;
-
-
-  /// \name Constrcution methods.
-  //@{
-
-  /*!
-   * Default constructor.
-   */
-  Continuous_rational_arc_d_1() :
-    Base()
-  {}
-
-  /*!
-   * Constrcutor from a base arc.
-   */
-  Continuous_rational_arc_d_1(const Base& arc) :
-    Base(arc)
-  {
-    CGAL_precondition(arc.is_continuous());
-  }
-
-  /*!
-   * Constructor of a whole polynomial curve.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
-    Base(P, cache)
-  {}
-
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
-    Base(pcoeffs, cache)
-  {}
-
-  /*!
-   * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
-   * ray is directed to the right, or for x_s >= x if it is directed to the
-   * left.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param dir_right Is the ray directed to the right (to +oo)
-   *                  or to the left (to -oo).
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P,
-                              const Algebraic_real_1& x_s, 
-                              bool dir_right, const Cache& cache) :
-    Base(P, x_s, dir_right,cache)
-  {}
-
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
-                              const Algebraic_real_1& x_s, 
-                              bool dir_right, const Cache& cache) :
-    Base(pcoeffs, x_s, dir_right,cache)
-  {}
-
-
-  /*!
-   * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param x_t The x-coordinate of the target point.
-   * \pre The two x-coordinates must not be equal.
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P,
-                              const Algebraic_real_1& x_s,
-                              const Algebraic_real_1& x_t, const Cache& cache) :
-    Base(P, x_s, x_t,cache)
-  {}
-
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
-                              const Algebraic_real_1& x_s,
-                              const Algebraic_real_1& x_t, const Cache& cache) :
-    Base(pcoeffs, x_s, x_t,cache)
-  {}
-
-  /*!
-   * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   * \pre The denominator polynomial q(x) does not have any roots.
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
-                              const Cache& cache) :
-    Base(P, Q,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
-                              const Rat_vector& qcoeffs, const Cache& cache) :
-    Base(pcoeffs, qcoeffs,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-
-  /*!
-   * Constructor of a ray of a rational function, defined by y = p(x)/q(x),
-   * for x_s <= x if the ray is directed to the right, or for x_s >= x if it
-   * is directed to the left.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param dir_right Is the ray directed to the right (to +oo)
-   *                  or to the left (to -oo).
-   * \pre The denominator polynomial q(x) does not have any roots in the
-   *      x-range of definition.
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
-                              const Algebraic_real_1& x_s, bool dir_right,
-                              const Cache& cache) :
-    Base(P, Q, x_s, dir_right,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
-                              const Rat_vector& qcoeffs,
-                              const Algebraic_real_1& x_s, bool dir_right,
-                              const Cache& cache) :
-    Base(pcoeffs, qcoeffs, x_s, dir_right,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-
-  /*!
-   * Constructor of a bounded rational arc, defined by y = p(x)/q(x), 
-   * where: x_min <= x <= x_max.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param x_t The x-coordinate of the target point.
-   * \pre The two x-coordinates must not be equal.
-   * \pre The denominator polynomial q(x) does not have any roots in the
-   *      x-range of definition (x_min, x_max).
-   */
-  Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
-                              const Algebraic_real_1& x_s,
-                              const Algebraic_real_1& x_t,const Cache& cache) :
-    Base(P, Q, x_s, x_t,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
-                              const Rat_vector& qcoeffs,
-                              const Algebraic_real_1& x_s,
-                              const Algebraic_real_1& x_t, const Cache& cache) :
-    Base(pcoeffs, qcoeffs, x_s, x_t,cache)
-  {
-    if (!this->_is_continuous())
-    {
-      // Invalid arc, as it is not continuous.
-      this->set_invalid();
-    }
-  }
-
-  //@}
-
-  /// \name Constructions of points and curves.
-  //@{
-      
-  /*!
-   * Compute the intersections with the given arc.
-   * \param arc The given intersecting arc.
-   * \param oi The output iterator.
-   * \return The past-the-end iterator.
-   */
-  template <typename OutputIterator>
-  OutputIterator intersect(const Self& arc, OutputIterator oi,
-                           const Cache& cache) const
-  {
-    CGAL_precondition(this->is_valid() && this->is_continuous());
-    CGAL_precondition(arc.is_valid() && arc.is_continuous());
-
-    if (this->equals(arc))
-    {
-      Self      overlap_arc(*this);
-      *oi++ = make_object(overlap_arc);
-      return (oi);
-    }
-
-    if (this->_has_same_base(arc))
-    {      
-      // Get the left and right endpoints of (*this) and their information
-      // bits.
-      const Algebraic_point_2&   left1 = (this->is_directed_right() ? 
-                                          this->_ps : this->_pt);
-      const Algebraic_point_2&   right1 = (this->is_directed_right() ? 
-                                           this->_pt : this->_ps);
-      int      info_left1, info_right1;
-
-      if (this->is_directed_right())
-      {
-        info_left1 = (this->_info & this->SRC_INFO_BITS);
-        info_right1 = ((this->_info & this->TRG_INFO_BITS) >> 4);
-      }
-      else
-      {
-        info_right1 = (this->_info & this->SRC_INFO_BITS);
-        info_left1 = ((this->_info & this->TRG_INFO_BITS) >> 4);
-      }
-
-      // Get the left and right endpoints of the other arc and their
-      // information bits.
-      const Algebraic_point_2& left2 =
-        (arc.is_directed_right() ? arc._ps : arc._pt);
-      const Algebraic_point_2& right2 =
-        (arc.is_directed_right() ? arc._pt : arc._ps);
-      int      info_left2, info_right2;
-
-      if (arc.is_directed_right())
-      {
-        info_left2 = (arc._info & this->SRC_INFO_BITS);
-        info_right2 = ((arc._info & this->TRG_INFO_BITS) >> 4);
-      }
-      else
-      {
-        info_right2 = (arc._info & this->SRC_INFO_BITS);
-        info_left2 = ((arc._info & this->TRG_INFO_BITS) >> 4);
-      }
-
-      // Locate the left curve-end with larger x-coordinate.
-      bool                 at_minus_infinity = false;
-      Arr_parameter_space  inf_l1 = this->left_parameter_space_in_x();
-      Arr_parameter_space  inf_l2 = arc.left_parameter_space_in_x();
-      Algebraic_point_2    p_left;
-      int                  info_left;
-
-      if (inf_l1 == ARR_INTERIOR && inf_l2 == ARR_INTERIOR)
-      {
-        // Let p_left be the rightmost of the two left endpoints.
-        if (left1.x() > left2.x())
-        {
-          p_left = left1;
-          info_left = info_left1;
-        }
-        else
-        {
-          p_left = left2;
-          info_left = info_left2;
-        }
-      }
-      else if (inf_l1 == ARR_INTERIOR)
-      {
-        // Let p_left be the left endpoint of (*this).
-        p_left = left1;
-        info_left = info_left1;
-      }
-      else if (inf_l2 == ARR_INTERIOR)
-      {
-        // Let p_left be the left endpoint of the other arc.
-        p_left = left2;
-        info_left = info_left2;
-      }
-      else
-      {
-        // Both arcs are defined at x = -oo.
-        at_minus_infinity = true;
-        info_left = info_left1;
-      }
-
-      // Locate the right curve-end with smaller x-coordinate.
-      bool                 at_plus_infinity = false;
-      Arr_parameter_space  inf_r1 = this->right_parameter_space_in_x();
-      Arr_parameter_space  inf_r2 = arc.right_parameter_space_in_x();
-      Algebraic_point_2    p_right;
-      int                  info_right;
-      
-      if (inf_r1 == ARR_INTERIOR && inf_r2 == ARR_INTERIOR)
-      {
-        // Let p_right be the rightmost of the two right endpoints.
-        if (right1.x() < right2.x())
-        {
-          p_right = right1;
-          info_right = info_right1;
-        }
-        else
-        {
-          p_right = right2;
-          info_right = info_right2;
-        }
-      }
-      else if (inf_r1 == ARR_INTERIOR)
-      {
-        // Let p_right be the right endpoint of (*this).
-        p_right = right1;
-        info_right = info_right1;
-      }
-      else if (inf_r2 == ARR_INTERIOR)
-      {
-        // Let p_right be the right endpoint of the other arc.
-        p_right = right2;
-        info_right = info_right2;
-      }
-      else
-      {
-        // Both arcs are defined at x = +oo.
-        at_plus_infinity = true;
-        info_right = info_right2;
-      }
-
-      // Check the case of two bounded (in x) ends.
-      if (! at_minus_infinity && ! at_plus_infinity)
-      {
-        Comparison_result res = CGAL::compare(p_left.x(), p_right.x());
-        if (res == LARGER)
-        {
-          // The x-range of the overlap is empty, so there is no overlap.
-          return (oi);
-        }
-        else if (res == EQUAL)
-        {
-          // We have a single overlapping point. Just make sure this point
-          // is not at y = -/+ oo.
-          if (info_left && 
-              (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0 &&
-              info_right && 
-              (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0)
-          {
-            Intersection_point_2  ip(p_left, 0);
-
-            *oi++ = make_object(ip);
-          }
-
-          return (oi);
-        }
-      }
-
-      // Create the overlapping portion of the rational arc by properly setting
-      // the source (left) and target (right) endpoints and their information
-      // bits.
-      Self      overlap_arc(*this);
-
-      overlap_arc._ps = p_left;
-      overlap_arc._pt = p_right;
-
-      overlap_arc._info = ((info_left) | (info_right << 4) |
-                           this->IS_DIRECTED_RIGHT | this->IS_CONTINUOUS | 
-                           this->IS_VALID);
-
-      *oi++ = make_object(overlap_arc);
-      return (oi);
-    }
-    
-    // We wish to find the intersection points between:
-    //
-    //   y = p1(x)/q1(x)    and     y = p2(x)/q2(x)
-    //
-    // It is clear that the x-coordinates of the intersection points are
-    // the roots of the polynomial: ip(x) = p1(x)*q2(x) - p2(x)*q1(x).
-
-    Rational_function_pair rat_pair =
-      this->get_rational_pair(this->_f, arc._f, cache);
-    
-    typename Algebraic_vector::const_iterator  x_iter;
-    typename Multiplicity_vector::const_iterator  m_iter;
-
-    // Go over the x-values we obtained. For each value produce an
-    // intersection point if it is contained in the x-range of both curves.
-    CGAL_precondition(rat_pair.roots().size() ==
-                      rat_pair.multiplicities().size());
-    for (x_iter = rat_pair.roots().begin(),
-           m_iter = rat_pair.multiplicities().begin();
-         x_iter != rat_pair.roots().end();
-         ++x_iter, ++m_iter)
-    {
-      if (this->_is_in_true_x_range(*x_iter) && arc._is_in_true_x_range(*x_iter))
-      {
-        // Compute the intersection point and obtain its multiplicity.
-        Algebraic_point_2   p(this->_f, *x_iter);
-        // Output the intersection point:
-        Intersection_point_2  ip(p, *m_iter);
-
-        *oi++ = make_object(ip);
-      }
-    }
-
-    return (oi);
-  }
-  
-  /*!
-   * Split the arc into two at a given split point.
-   * \param p The split point.
-   * \param c1 Output: The first resulting arc, lying to the left of p.
-   * \param c2 Output: The first resulting arc, lying to the right of p.
-   * \pre p lies in the interior of the arc (not one of its endpoints).
-   */
-  void split(const Algebraic_point_2& p, Self& c1, Self& c2, const Cache& CGAL_assertion_code(cache)) const
-  {
-    CGAL_precondition(this->is_valid() && this->is_continuous());
-
-    // Make sure that p lies on the interior of the arc.
-    CGAL_precondition(this->point_position(p,cache) == EQUAL &&
-                      (this->source_parameter_space_in_x() != ARR_INTERIOR ||
-                       this->source_parameter_space_in_y() != ARR_INTERIOR ||
-                       (p.x() != this->_ps.x()))  &&
-                      (this->target_boundary_in_x() != ARR_INTERIOR ||
-                       this->target_boundary_in_y() != ARR_INTERIOR ||
-                       (p.x() != this->_pt.x())));
-
-    // Make copies of the current arc.
-    c1 = *this;
-    c2 = *this;
-
-    // Split the arc, such that c1 lies to the left of c2.
-    if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
-    {
-      c1._pt = p;
-      c1._info = (c1._info & ~this->TRG_INFO_BITS);
-      c2._ps = p;
-      c2._info = (c2._info & ~this->SRC_INFO_BITS);
-    }
-    else
-    {
-      c1._ps = p;
-      c1._info = (c1._info & ~this->SRC_INFO_BITS);
-      c2._pt = p;
-      c2._info = (c2._info & ~this->TRG_INFO_BITS);
-    }
-  }
-
-  /*!
-   * Merge the current arc with the given arc.
-   * \param arc The arc to merge with.
-   * \pre The two arcs are mergeable.
-   */
-  void merge(const Self& arc)
-  {
-    CGAL_precondition(this->is_valid() && this->is_continuous());
-    CGAL_precondition(arc.is_valid() && arc.is_continuous());
-    CGAL_precondition(this->can_merge_with(arc));
-
-    // Check if we should extend the arc to the left or to the right.
-    if (this->right_parameter_space_in_x() == ARR_INTERIOR &&
-        this->right_parameter_space_in_y() == ARR_INTERIOR &&
-        arc.left_parameter_space_in_x() == ARR_INTERIOR &&
-        arc.left_parameter_space_in_y() == ARR_INTERIOR &&
-        (this->right().x() == arc.left().x()))
-    {
-      // Extend the arc to the right.
-      if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
-      {
-        if (arc.right_parameter_space_in_x() == ARR_INTERIOR &&
-            arc.right_parameter_space_in_y() == ARR_INTERIOR)
-        {
-          this->_pt = arc.right();
-        }
-        else
-        {
-          if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY);
-          else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY);
-          
-          if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY);
-          else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY);
-
-          this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps;
-        }
-      }
-      else
-      {
-        if (arc.right_parameter_space_in_x() == ARR_INTERIOR &&
-            arc.right_parameter_space_in_y() == ARR_INTERIOR)
-        {
-          this->_ps = arc.right();
-        }
-        else
-        {
-          if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY);
-          else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY);
-
-          if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY);
-          else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY);
-
-          this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps;
-        }
-      }
-    }
-    else
-    {
-      CGAL_precondition(this->left_parameter_space_in_x() == ARR_INTERIOR &&
-                        this->left_parameter_space_in_y() == ARR_INTERIOR &&
-                        arc.right_parameter_space_in_x() == ARR_INTERIOR &&
-                        arc.right_parameter_space_in_y() == ARR_INTERIOR &&
-                        (this->left().x() == arc.right().x()));
-
-      // Extend the arc to the left.
-      if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
-      {
-        if (arc.left_parameter_space_in_x() == ARR_INTERIOR &&
-            arc.left_parameter_space_in_y() == ARR_INTERIOR)
-        {
-          this->_ps = arc.left();
-        }
-        else
-        {
-          if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY);
-          else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY);
-
-          if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY);
-          else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY)
-            this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY);
-
-          this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt;
-        }
-      }
-      else
-      {
-        if (arc.left_parameter_space_in_x() == ARR_INTERIOR &&
-            arc.left_parameter_space_in_y() == ARR_INTERIOR)
-        {
-          this->_pt = arc.left();
-        }
-        else
-        {
-          if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY);
-          else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY);
-
-          if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY);
-          else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY)
-            this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY);
-
-          this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt;
-        }
-      }
-    }
-  }
-  //@}
-
-  
-};
-
-//*! \class Rational_arc_2
-  // * Representation of a generic, not necessarily continuous, portion of a
-  // * rational function.
-  // */
-template <typename Algebraic_kernel_>
-class Rational_arc_d_1 : public Base_rational_arc_d_1<Algebraic_kernel_>
-{
-public:
-  typedef Algebraic_kernel_                             Algebraic_kernel;
-  
-  typedef Rational_arc_d_1<Algebraic_kernel>            Self;
-  typedef Base_rational_arc_d_1<Algebraic_kernel>       Base;
-  typedef Continuous_rational_arc_d_1<Algebraic_kernel> Continuous_arc;
-
-  typedef typename Base::Integer                        Integer;
-  typedef typename Base::Rational                       Rational; 
-  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
-  typedef typename Base::Algebraic_point_2              Algebraic_point_2;
-  typedef typename Base::Polynomial_1                   Polynomial_1;
- 
-  typedef typename Base::Rat_vector                     Rat_vector;
- 
-  typedef typename Base::Cache                          Cache;
-
-  /// \name Constrcution methods.
-  //@{
-
-  /*!
-   * Default constructor.
-   */
-  Rational_arc_d_1() :
-    Base()
-  {}
-
-  /*!
-   * Constructor of a whole polynomial curve.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   */
-  Rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
-    Base(P, cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
-    Base(pcoeffs, cache)
-  {}
-
-  /*!
-   * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
-   * ray is directed to the right, or for x_s >= x if it is directed to the
-   * left.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param dir_right Is the ray directed to the right (to +oo)
-   *                  or to the left (to -oo).
-   */
-  Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, 
-                   bool dir_right, const Cache& cache) :
-    Base(P, x_s, dir_right,cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, 
-                   bool dir_right, const Cache& cache) :
-    Base(pcoeffs, x_s, dir_right,cache)
-  {}
-
-
-  /*!
-   * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param x_t The x-coordinate of the target point.
-   * \pre The two x-coordinates must not be equal.
-   */
-  Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, 
-                   const Algebraic_real_1& x_t, const Cache& cache) :
-    Base(P, x_s, x_t, cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, 
-                   const Algebraic_real_1& x_t,const Cache& cache) :
-    Base(pcoeffs, x_s, x_t, cache)
-  {}
-
-  /*!
-   * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   */
-  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, const Cache& cache) :
-    Base(P, Q,cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                   const Cache& cache) :
-    Base(pcoeffs, qcoeffs, cache)
-  {}
-
-  /*!
-   * Constructor of a ray of a rational function, defined by y = p(x)/q(x),
-   * for x_s <= x if the ray is directed to the right, or for x_s >= x if it
-   * is directed to the left.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param dir_right Is the ray directed to the right (to +oo)
-   *                  or to the left (to -oo).
-   */
-  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
-                   const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) :
-    Base(P, Q, x_s, dir_right, cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                   const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) :
-    Base(pcoeffs, qcoeffs, x_s, dir_right, cache)
-  {}
-  
-  /*!
-   * Constructor of a bounded rational arc, defined by y = p(x)/q(x), 
-   * where: x_min <= x <= x_max.
-   * \param pcoeffs The rational coefficients of the polynomial p(x).
-   * \param qcoeffs The rational coefficients of the polynomial q(x).
-   * \param x_s The x-coordinate of the source point.
-   * \param x_t The x-coordinate of the target point.
-   * \pre The two x-coordinates must not be equal.
-   */
-  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
-                   const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-                   const Cache& cache) :
-    Base(P, Q, x_s, x_t, cache)
-  {}
-
-  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
-                   const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
-                   const Cache& cache) :
-    Base(pcoeffs, qcoeffs, x_s, x_t, cache)
-  {}
-  //@}
-
-  /*!
-   * Subdivide the given portion of a rational function into continuous
-   * sub-arcs, splitting it at the roots of the denominator polynomial.
-   * \param oi An output iterator of Continuous_rational_arc_d_1 objects.
-   */
-  template <typename OutputIterator>
-  OutputIterator make_continuous(OutputIterator oi) const
-  {
-    // Compute the roots of the denominator polynomial.
-    std::list<Algebraic_real_1>          q_roots;
-    bool                                 root_at_ps, root_at_pt;
-
-    if ((this->_info & this->IS_CONTINUOUS) == 0)
-      this->_denominator_roots(std::back_inserter(q_roots),
-                               root_at_ps, root_at_pt);
-
-    // Check the case of a continuous arc:
-    Base    arc = *this;
-
-    if (q_roots.empty())
-    {
-      arc.set_continuous();
-      *oi++ = Continuous_arc(arc);
-      return (oi);
-    }
-
-    // The denominator has roots: split the arc accordingly.
-    typename std::list<Algebraic_real_1>::const_iterator iter;
-
-    for (iter = q_roots.begin(); iter != q_roots.end(); ++iter)
-    {
-      *oi++ = Continuous_arc(arc.split_at_pole(*iter));
-    }
-
-    // Add the final x-monotone sub-arc.
-    arc.set_continuous();
-    *oi++ = Continuous_arc(arc);
-
-    return (oi);
-  }
-};
-
-}   //name_space Arr_rational_arc
-}       //namespace CGAL {
-
-#endif //CGAL_RATIONAL_ARC_D_1_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
deleted file mode 100644
index 713eb92..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
+++ /dev/null
@@ -1,509 +0,0 @@
-// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
-//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
-
-#ifndef CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
-#define CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
-
-#include <CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h>
-#include <CGAL/Arr_rat_arc/Rational_function.h>
-#include <CGAL/Handle_with_policy.h>
-
-namespace CGAL {
-namespace Arr_rational_arc {
-
-template <typename AlgebraicKernel_d_1>
-class Rational_function_canonicalized_pair_rep:
-    public Base_rational_arc_ds_1<AlgebraicKernel_d_1>
-{
-public:
-  typedef AlgebraicKernel_d_1                           Algebraic_kernel_d_1;
-  typedef Base_rational_arc_ds_1<Algebraic_kernel_d_1>  Base;
-
-  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel_d_1>
-                                                        Rational_function;
-  typedef typename Base::Polynomial_1                   Polynomial_1;
-  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
-  typedef typename Base::Algebraic_vector               Algebraic_vector;
-  typedef typename Base::Multiplicity                   Multiplicity;
-  typedef typename Base::Multiplicity_vector            Multiplicity_vector;
-  typedef typename Base::Root_multiplicity_vector       Root_multiplicity_vector;
-  typedef typename Base::Solve_1                        Solve_1;
-  typedef typename Base::Bound                          Bound;
-  typedef typename Base::Coefficient                    Coefficient;
- 
-public:
-  Rational_function_canonicalized_pair_rep(const Rational_function& f, 
-                                           const Rational_function& g,
-                                           Algebraic_kernel_d_1* ak_ptr)
-    :_f(f),_g(g),_ak_ptr(ak_ptr)
-  {
-    CGAL_precondition(_ak_ptr != NULL);
-    //canonicalized representation
-    if ( !(f.id() < g.id()) ) 
-      std::swap(_f,_g);
-    _resultant  = (_f.numer() * _g.denom() - _f.denom() * _g.numer());
-
-    //f and g are not the same...
-    CGAL_precondition(CGAL::is_zero(_resultant) == false);
-                
-    Solve_1 solve_1(_ak_ptr->solve_1_object());   
-    Root_multiplicity_vector rm_vec;
-    
-#if 1
-    solve_1(_resultant,std::back_inserter(rm_vec));
-#else
-    assert(false);
-    // don't use this code yet since g and resultant/g may still have a
-    // common root
-    if( CGAL::internal::may_have_common_factor(_f.denom(),_g.denom())){
-      Polynomial_1 g = CGAL::gcd(_f.denom(), _g.denom());
-      solve_1(CGAL::integral_division(_resultant, g),
-              std::back_inserter(rm_vec));
-      solve_1(g, std::back_inserter(rm_vec));
-      std::sort(rm_vec.begin(), rm_vec.end());
-    }else{
-      solve_1(_resultant, std::back_inserter(rm_vec));
-    }
-#endif
-
-    _roots.reserve(rm_vec.size());
-    _multiplicities.reserve(rm_vec.size());
-  
-    for (typename Root_multiplicity_vector::iterator it = rm_vec.begin();
-         it != rm_vec.end() ; 
-         ++it)
-    {
-      _roots.push_back(it->first);
-      _multiplicities.push_back(it->second);
-    }
-
-    Algebraic_vector tmp;
-    tmp.reserve(_f.poles().size() + _g.poles().size());
-    _event_roots.reserve(rm_vec.size() + _f.poles().size() + _g.poles().size());
-    //merge the roots of f,g & resultant
-    std::merge( _f.poles().begin(), _f.poles().end(),
-                _g.poles().begin(), _g.poles().end(),
-                std::back_inserter(tmp));
-    std::merge(tmp.begin(), tmp.end(),
-               _roots.begin(), _roots.end(),
-               std::back_inserter(_event_roots));
-  
-    //remove duplicate entries
-    typename Algebraic_vector::iterator new_end,old_end;
-    new_end = std::unique(_event_roots.begin(), old_end=_event_roots.end());
-    _event_roots.erase(new_end,old_end);
-
-    //compute the values of _is_above
-    bool curr_is_above = get_is_above_near_minus_infinity();
-    _is_above.push_back(curr_is_above);
-
-    // TBD: is_sorted is provided both by stl and boost. The interface of
-    // boost version changed, and as of version ? it accepts a single
-    // argument, that is a model of the SinglePassRange concept. The stl
-    // version, on the other hand, is on it's way out.
-    // (The name is wrong-should be is_ordered).
-    //
-    // CGAL_precondition(std::is_sorted(_f.poles().begin(),_f.poles().end()));
-    // CGAL_precondition(std::is_sorted(_g.poles().begin(),_g.poles().end()));
-    // CGAL_precondition(std::is_sorted(_roots.begin(),_roots.end()));
-
-    typename Algebraic_vector ::const_iterator it_f_pole = _f.poles().begin();
-    typename Multiplicity_vector::const_iterator it_f_mult =
-      _f.pole_multiplicities().begin();
-    typename Algebraic_vector ::const_iterator it_g_pole = _g.poles().begin();
-    typename Multiplicity_vector::const_iterator it_g_mult =
-      _g.pole_multiplicities().begin();
-    typename Algebraic_vector ::const_iterator it_r_root = _roots.begin();
-    typename Multiplicity_vector::const_iterator it_r_mult =
-      _multiplicities.begin() ; 
-    while ( (it_f_pole != _f.poles().end()) || 
-        (it_g_pole != _g.poles().end()) || 
-        (it_r_root != _roots.end()))
-    {
-      //std::cout << "_f._poles.size() " << _f._poles.size() <<std::endl;
-      //std::cout << "_g._poles.size() " << _g._poles.size()<< std::endl;
-      //std::cout << "_roots.size()    " << _roots.size() << std::endl;
-      //if current event is only a pole of f
-      if ((it_f_pole != _f.poles().end())         && 
-          ((it_g_pole == _g.poles().end()) || (*it_f_pole < *it_g_pole)) &&
-          ((it_r_root == _roots.end()) || (*it_f_pole < *it_r_root)))
-      {
-        if (*it_f_mult % 2 == 1)
-          curr_is_above = (curr_is_above == true ) ? false : true;
-        _is_above.push_back(curr_is_above);
-        ++it_f_pole;
-        ++it_f_mult;
-      }
-      //if current event is only a pole of g
-      else if ((it_g_pole != _g.poles().end())         && 
-               ((it_f_pole == _f.poles().end()) || (*it_g_pole < *it_f_pole)) &&
-               ((it_r_root == _roots.end()) || (*it_g_pole < *it_r_root)))
-      {
-        if (*it_g_mult % 2 == 1)
-          curr_is_above = (curr_is_above == true ) ? false : true;
-        _is_above.push_back(curr_is_above);
-        ++it_g_pole;
-        ++it_g_mult;
-      }
-      //if current event is only a pole of r
-      else if ((it_r_root != _roots.end())         && 
-               ((it_f_pole == _f.poles().end()) || (*it_r_root < *it_f_pole)) &&
-               ((it_g_pole == _g.poles().end()) || (*it_r_root < *it_g_pole)))
-      {
-        if (*it_r_mult % 2 == 1)
-          curr_is_above = (curr_is_above == true ) ? false : true;
-        _is_above.push_back(curr_is_above);
-        ++it_r_root;
-        ++it_r_mult;
-      }
-      //if current event is a pole of f g and r
-      else if ( (it_f_pole != _f.poles().end()) && 
-                (it_g_pole != _g.poles().end()) && 
-                (it_r_root != _roots.end()) &&
-                (*it_r_root == *it_f_pole)    && 
-                (*it_r_root == *it_g_pole))
-      {
-        //both functions switch signs
-        if (_f.sign_at(*it_r_root, CGAL::NEGATIVE) ==
-            _g.sign_at(*it_r_root, CGAL::NEGATIVE))
-          curr_is_above = !curr_is_above;
-        if (*it_r_mult % 2 == 1)
-          curr_is_above = !curr_is_above;
-        if (_f.sign_at(*it_r_root, CGAL::POSITIVE) ==
-            _g.sign_at(*it_r_root, CGAL::POSITIVE))
-          curr_is_above = !curr_is_above;
-        _is_above.push_back(curr_is_above);
-        ++it_f_pole;
-        ++it_f_mult;
-        ++it_g_pole;
-        ++it_g_mult;
-        ++it_r_root;
-        ++it_r_mult;
-      }
-      else
-      {
-        //should not be reached
-        CGAL_postcondition_msg(false,"invalid case in computing _is_above");
-      }
-    }
-    //std::cout << "_is_above.size()            " << _is_above.size() <<std::endl;
-    //std::cout << " _event_roots.size() + 1    " <<  _event_roots.size() + 1 << std::endl;
-    CGAL_postcondition(_is_above.size() == _event_roots.size() + 1);
-    //check for validity using explicit computation
-    CGAL_postcondition_code(std::vector<bool> tmp_is_above =
-                            compute_is_above_explicitly();
-                            );
-    CGAL_postcondition(_is_above == tmp_is_above);   
-  }
-
-  Comparison_result compare_f_g_at(const Algebraic_real_1& x,
-                                   CGAL::Sign epsilon = CGAL::ZERO) const
-  {
-    //f and g must be different 
-    CGAL_precondition(!CGAL::is_zero(_resultant));
-
-    //find interval 
-    typename Algebraic_vector::const_iterator iter =
-      std::lower_bound(_event_roots.begin(), _event_roots.end(),x);
-  
-    //case of a value larger than largest root
-    if (iter == _event_roots.end())
-      return (_is_above.back() ? CGAL:: LARGER : CGAL::SMALLER);
-
-    typename Algebraic_vector::iterator::difference_type dist =
-      iter - _event_roots.begin();
-
-    //if x is not a root, ignore epsilons 
-    if (*iter != x){
-      return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER);
-    }
-
-    //x is a root 
-    if (epsilon == CGAL::ZERO){
-      CGAL_precondition(_f.poles().end() ==
-                        std::find(_f.poles().begin(), _f.poles().end(),x));
-      CGAL_precondition(_g.poles().end() ==
-                        std::find(_g.poles().begin(), _g.poles().end(),x));
-      return (CGAL::EQUAL);
-    }
-    
-    if (epsilon == CGAL::NEGATIVE)
-      return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER);
-    else // CGAL::POSITIVE
-      return (_is_above[dist+1] ? CGAL:: LARGER : CGAL::SMALLER);
-  }
-  Comparison_result compare_f_g_at(Arr_parameter_space boundary) const
-  {
-    CGAL_precondition((boundary == ARR_LEFT_BOUNDARY) ||
-        (boundary == ARR_RIGHT_BOUNDARY) );
-  
-    //f and g are the same...
-    if (CGAL::is_zero(_resultant))
-      return CGAL::EQUAL;
-
-    if (boundary == ARR_LEFT_BOUNDARY)
-      return _is_above.front() ? CGAL::LARGER : CGAL::SMALLER ;
-    else //  boundary = ARR_RIGHT_BOUNDARY
-      return _is_above.back()  ? CGAL::LARGER : CGAL::SMALLER ;
-  }
-
-  bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space,
-                                const Algebraic_real_1 left,
-                                const Arr_parameter_space right_parameter_space,
-                                const Algebraic_real_1 right) const
-  {
-    //the two function intersect iff the left index and the right index
-    //of the array _is_above are different
-
-    //get left index
-    typename Algebraic_vector::const_iterator left_index =
-      (left_parameter_space == ARR_LEFT_BOUNDARY) ? 
-      _event_roots.begin():
-      std::lower_bound(_event_roots.begin(), _event_roots.end(),left);
-    //check if intersect at left index
-    if (*left_index == left) 
-      return true;
-
-    //get right index
-    typename Algebraic_vector::const_iterator right_index =
-      (right_parameter_space == ARR_RIGHT_BOUNDARY) ? 
-      _event_roots.begin():
-      std::lower_bound(_event_roots.begin(), _event_roots.end(),right);
-    //check if intersect at right index
-    if (*right_index == right) 
-      return true;
-  
-    //check if indices are the same
-    return (left_index == right_index);
-  }
-
-  const Rational_function& f() const 
-  {
-    return _f;
-  }
-
-  const Rational_function& g() const 
-  {
-    return _g;
-  }
-
-  const Algebraic_vector & roots() const
-  {
-    return _roots;
-  }
-
-  const Multiplicity_vector & multiplicities() const
-  {
-    return _multiplicities;
-  }
-
-private:
-  bool get_is_above_near_minus_infinity()
-  {
-    bool r = _get_is_above_near_minus_infinity();
-    CGAL_postcondition(r == __get_is_above_near_minus_infinity());
-    return r; 
-  }
-
-  bool _get_is_above_near_minus_infinity()
-  {
-    int f_deg = CGAL::degree(_f.numer()) - CGAL::degree(_f.denom());
-    int g_deg = CGAL::degree(_g.numer()) - CGAL::degree(_g.denom());
-
-    if (f_deg > g_deg)  //f is stronger than g
-      {
-        CGAL::Sign sign = _f.sign_near_minus_infinity();
-        return  (sign == CGAL::NEGATIVE) ? false  :
-          (sign == CGAL::POSITIVE) ? true   :
-          (_g.sign_near_minus_infinity() == CGAL::NEGATIVE);  // _f == zero;
-      }
-    if (f_deg < g_deg)  //g is stronger than f
-      {
-        CGAL::Sign sign = _g.sign_near_minus_infinity();
-        return  (sign == CGAL::NEGATIVE) ? true  :
-          (sign == CGAL::POSITIVE) ? false   :
-          (_f.sign_near_minus_infinity() == CGAL::POSITIVE);  // _g == zero;
-      }
-            
-    //both have the same degree difference, 
-    //check who's leading coeeficient ratio is larger
-    Coefficient lead_coeff_ratio =
-      CGAL::abs(CGAL::leading_coefficient(_f.numer())) *
-      CGAL::leading_coefficient(_g.denom()) -
-      CGAL::abs(CGAL::leading_coefficient(_g.numer())) *
-      CGAL::leading_coefficient(_f.denom());
-    if (lead_coeff_ratio > 0)//f is stronger than g
-      return (_f.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? false : true;
-    if (lead_coeff_ratio < 0)  //g is stronger than f
-      return (_g.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? true : false;
-
-    //ratio is the same, instead of continuing with taylor expansion,
-    //compute explicitly
-
-    return __get_is_above_near_minus_infinity();
-  }
-
-  bool __get_is_above_near_minus_infinity()
-  {
-    Bound b;
-    if (_event_roots.empty())
-      b = Bound(0);
-    else
-      {
-        b = (_ak_ptr->approximate_relative_1_object()(_event_roots.front(), 0)).first - 1;  //lower bound of first root
-      }
-    return is_above_at(b);
-  }
-
-  bool is_above_at(const Bound& b)
-  {
-    //return true if f is above g at b which means return (sign  == positive) of :
-    //
-    //  numer_f * denom _g - numer_f * denom _g
-    //f-g= -------------------------------------- at b
-    //    denom _f  * denom _g 
-
-    //TODO: unnescecary construction of real
-    Algebraic_real_1 x(_ak_ptr->construct_algebraic_real_1_object()(b));
-  
-    CGAL::Sign   numer = _ak_ptr->sign_at_1_object()(_resultant, x);
-    CGAL::Sign   denom_f = _ak_ptr->sign_at_1_object()(_f.denom(),x);
-    CGAL::Sign   denom_g = _ak_ptr->sign_at_1_object()(_g.denom(),x);
-    CGAL::Sign   denom = denom_f * denom_g ;
-    CGAL::Sign   s = numer*denom;
-
-    CGAL_precondition(s != CGAL::ZERO);
-
-    return (s == CGAL::POSITIVE);
-  }
-  std::vector<bool> compute_is_above_explicitly()
-  {
-    std::vector<bool> tmp_is_above;
-    if (_event_roots.size()== 0)
-    {
-      Bound b = 1; //all bound are legal, choose 1 for simplicity
-      tmp_is_above.push_back(is_above_at(b));  
-      return tmp_is_above;
-    }
-  
-    tmp_is_above.reserve(_event_roots.size()+1);  
-    //left boundary
-    Bound b  = (_ak_ptr->approximate_relative_1_object()
-      (_event_roots.front(),0)).first - 1;  //lower bound of first root
-    tmp_is_above.push_back(is_above_at(b));  
-  
-    //mid intervals
-    typename Algebraic_vector::size_type i;
-    for (i = 0; i < _event_roots.size()-1; ++i)
-    {
-      b = _ak_ptr->bound_between_1_object()(_event_roots[i],_event_roots[i+1]);
-      tmp_is_above.push_back(is_above_at(b));      
-    }
-
-    //right boundary
-    b = (_ak_ptr->approximate_relative_1_object()(_event_roots.back(), 0)).second + 1;  //lower bound of last root
-    tmp_is_above.push_back(is_above_at(b));
-    return tmp_is_above;
-  }
-   
-private:   
-  Rational_function _f,_g;
-  Polynomial_1  _resultant;
-  Algebraic_vector _roots;
-  //roots of resultant merged with roots of f & g's denomenators
-  Algebraic_vector _event_roots;
-  Multiplicity_vector _multiplicities;
-  //is f above g in the interval induced by index i of _roots
-  std::vector<bool> _is_above;
-  Algebraic_kernel_d_1* _ak_ptr;
-}; // Rational_function_canonicalized_pair_rep
-
-template <typename Algebraic_kernel_>
-class Rational_function_canonicalized_pair:
-    public Handle_with_policy<Rational_function_canonicalized_pair_rep
-                              <Algebraic_kernel_> >
-{
-public:
-  typedef Algebraic_kernel_                           Algebraic_kernel_d_1;
-  typedef Rational_function_canonicalized_pair_rep<Algebraic_kernel_d_1>
-                                                      Rep;
-  typedef Handle_with_policy<Rep>                     Base;
-  typedef Rational_function_canonicalized_pair<Algebraic_kernel_d_1>
-                                                      Self;
-  typedef typename Rep::Rational_function             Rational_function;
-  typedef typename Rep::Algebraic_real_1              Algebraic_real_1;
-  typedef typename Rep::Polynomial_1                  Polynomial_1;
-  typedef typename Rep::Algebraic_vector              Algebraic_vector;
-  typedef typename Rep::Multiplicity_vector           Multiplicity_vector;
-  typedef typename Rep::Root_multiplicity_vector      Root_multiplicity_vector;
-
-  Rational_function_canonicalized_pair(const Rational_function& f, 
-                                       const Rational_function& g,
-                                       Algebraic_kernel_d_1* ak_ptr) :
-    Base(f, g, ak_ptr) {}
-  //used to solve VS bug...
-  Rational_function_canonicalized_pair(const Self & p) :
-    Base(static_cast<const Base &> (p)) {}
-
-  Comparison_result compare_f_g_at(const Algebraic_real_1& x,
-                                   CGAL::Sign epsilon = CGAL::ZERO) const
-  {
-    return this->ptr()->compare_f_g_at(x,epsilon);
-  }
-
-  Comparison_result compare_f_g_at(Arr_parameter_space boundary) const
-  {
-    return this->ptr()->compare_f_g_at(boundary);
-  }
-
-  bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space,
-                                const Algebraic_real_1 left,
-                                const Arr_parameter_space right_parameter_space,
-                                const Algebraic_real_1 right) const
-  {
-    return this->ptr()->is_intersecting_in_range(left_parameter_space, left,
-                                                 right_parameter_space, right);
-  }
-    
-  const Rational_function& f() const 
-  {
-    return this->ptr()->f();
-  }
-    
-  const Rational_function& g() const 
-  {
-    return this->ptr()->g();
-  }
-
-  const Algebraic_vector & roots() const
-  {
-    return this->ptr()->roots();
-  }
-
-  const Multiplicity_vector & multiplicities() const
-  {
-    return this->ptr()->multiplicities();
-  }
-};  //Rational_function_canonicalized_pair
-
-}   //namespace Arr_rational_arc
-}   //namespace CGAL {   
-
-#endif //CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Singleton.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Singleton.h
deleted file mode 100644
index 3f41489..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Singleton.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
-//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
-
-
-
-#ifndef SINGLETON_H_
-#define SINGLETON_H_
-
-namespace CGAL {
-namespace Arr_rational_arc {
-template <class T>
-class Singleton
-{
-public:
-  static T* instance() 
-  {
-    if(!m_pInstance) 
-      m_pInstance = new T;
-    assert(m_pInstance !=NULL);
-    return m_pInstance;
-  }
-      
-  static void DestroyInstance()
-  {
-    delete m_pInstance;
-    m_pInstance = NULL;
-  };
-private:
-  Singleton();          // ctor hidden
-  ~Singleton();          // dtor hidden
-private:
-  static T* m_pInstance;
-};
-
-template <class T> T* Singleton<T>::m_pInstance=NULL;
-
-}   // namespace Arr_rational_arc
-}   //namespace CGAL { 
-#endif // SINGLETON_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rational_function_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_rational_function_traits_2.h
deleted file mode 100644
index 7f8a00d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_rational_function_traits_2.h
+++ /dev/null
@@ -1,1314 +0,0 @@
-// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
-//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
-
-#ifndef CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
-#define CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
-
-#include <CGAL/tags.h>
-#include <CGAL/Fraction_traits.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arithmetic_kernel.h>
-#include <CGAL/Algebraic_kernel_d_1.h>
-#include <CGAL/Arr_rat_arc/Rational_arc_d_1.h>
-#include <CGAL/Arr_rat_arc/Cache.h>
-
-
-
-namespace CGAL {
-
-/*! \class
- * A traits class for maintaining an arrangement of bounded arcs (segments) of
- * rational functions of arbitrary degree.
- *
- * The class is templated with two parameters: 
- * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
- *            for the coordinates of arrangement vertices, which are algebraic
- *            numbers (defined by Nt_traits::Algebraic).
- * Nt_traits A traits class for performing various operations on the integer,
- *           rational and algebraic types. 
- */
- 
-template <typename AlgebraicKernel_d_1>
-class Arr_rational_function_traits_2
-{
-public:
-  typedef AlgebraicKernel_d_1                           Algebraic_kernel_d_1;
- 
-  typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1>
-                                                        Self;
-  typedef Arr_rational_arc::Base_rational_arc_ds_1<Algebraic_kernel_d_1>
-                                                        Base_rational_arc_ds_1;
-
-  // Traits objects:
-  typedef Arr_rational_arc::Base_rational_arc_d_1<Algebraic_kernel_d_1>
-                                                              Base_curve_2;
-  typedef Arr_rational_arc::Continuous_rational_arc_d_1<Algebraic_kernel_d_1>
-                                                              X_monotone_curve_2;
-  typedef Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_d_1>
-                                                              Curve_2;
-  typedef Arr_rational_arc::Algebraic_point_2<Algebraic_kernel_d_1>
-                                                              Point_2;
-
-  typedef typename Base_rational_arc_ds_1::Algebraic_real_1   Algebraic_real_1;
-  typedef typename Base_rational_arc_ds_1::Multiplicity       Multiplicity;
-  typedef typename Base_curve_2::Rat_vector                   Rat_vector;
-
-  typedef typename Base_rational_arc_ds_1::Integer            Integer;
-  typedef typename Base_rational_arc_ds_1::Rational           Rational; 
-  typedef typename Base_rational_arc_ds_1::Polynomial_1       Polynomial_1; 
-  typedef typename Base_rational_arc_ds_1::Coefficient        Coefficient; 
-
-  typedef typename Base_rational_arc_ds_1::FT_rat_1           FT_rat_1; 
-  typedef typename Base_rational_arc_ds_1::Polynomial_traits_1
-    Polynomial_traits_1;
-  
-  typedef typename Algebraic_kernel_d_1::Bound                Bound; 
-  typedef Bound
-    Approximate_number_type; 
-  
-  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel_d_1>
-                                                              Rational_function;
-  typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1> Cache;
-
-  //Category tags:
-  typedef Tag_true Has_left_category;
-  typedef Tag_true Has_merge_category;
-  typedef Tag_true Has_do_intersect_category;
-
-  typedef Tag_true Has_vertical_segment_category;
-
-  typedef Arr_open_side_tag          Left_side_category;
-  typedef Arr_open_side_tag          Bottom_side_category;
-  typedef Arr_open_side_tag          Top_side_category;
-  typedef Arr_open_side_tag          Right_side_category;
-
-private:
-  mutable Cache                   _cache;
-  mutable Algebraic_kernel_d_1*   _ak_ptr;
-  bool                            delete_ak;
-
-public:
-  Algebraic_kernel_d_1* algebraic_kernel_d_1() const {return _ak_ptr;}
-
-  bool delete_ak_internal_flag() const
-  {
-    return delete_ak;
-  } 
-  // Algebraic_kernel_d_1& algebraic_kernel_d_1()             {return _ak;}
-
-public:
-  const Cache& cache() const {return _cache;}
-
-public:
-  //------------
-  //Constructors
-  //------------
-
-  //---------------------
-  // Default constructor.
-  Arr_rational_function_traits_2() : delete_ak(true)
-  {
-    _ak_ptr = new Algebraic_kernel_d_1;
-    _cache.initialize(_ak_ptr);
-  }
-
-  Arr_rational_function_traits_2(Algebraic_kernel_d_1* ak_ptr) :
-    _ak_ptr(ak_ptr),delete_ak(false)
-  {
-    _cache.initialize(_ak_ptr);
-  }
-
-  Arr_rational_function_traits_2(const Self& other)
-    :delete_ak(other.delete_ak_internal_flag())
-  {
-    //copy kernel
-    if (delete_ak)
-      _ak_ptr = new Algebraic_kernel_d_1(*other.algebraic_kernel_d_1());
-    else
-      _ak_ptr = other.algebraic_kernel_d_1();    
-
-    //copy cache
-    _cache.initialize(other.cache(), _ak_ptr);
-  }
-
-  ~Arr_rational_function_traits_2()
-  {
-    if (delete_ak)
-      delete (_ak_ptr);
-  }
-
-  /*! A functor that constructs an x_monotone curve */
-  class Construct_x_monotone_curve_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
-    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
-
-    /*! The traits */
-    const Traits* _traits;
-
-    /*! Constructor
-     * \param traits the traits
-     */
-    Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-    
-  public:
-    typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; 
-    typedef typename Base_rational_arc_ds_1::Algebraic_real_1
-                                                          Algebraic_real_1;
-    typedef Arr_rational_arc::Continuous_rational_arc_d_1<Algebraic_kernel_d_1>
-                                                          X_monotone_curve_2;
-    typedef Polynomial_1                                  argument_type;
-    typedef Polynomial_1                                  first_argument_type;
-    typedef Polynomial_1                                  second_argument_type;
-    typedef X_monotone_curve_2                            result_type;
-    
-    X_monotone_curve_2 operator()( const Polynomial_1& P) const
-    {
-      return X_monotone_curve_2(P, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()( InputIterator begin, InputIterator end) const
-    {
-      Rat_vector rat_vec(begin,end);
-      return X_monotone_curve_2(rat_vec, _traits->cache());
-    }
-
-    X_monotone_curve_2 operator()(const Polynomial_1& P,
-                                  const Algebraic_real_1& x_s,
-                                  bool dir_right) const
-    {
-      return X_monotone_curve_2(P, x_s, dir_right, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()(InputIterator begin, InputIterator end,
-                                  const Algebraic_real_1& x_s,
-                                  bool dir_right) const
-    {
-      Rat_vector rat_vec(begin,end);
-      return X_monotone_curve_2(rat_vec, x_s, dir_right, _traits->cache());
-    }
-
-    X_monotone_curve_2 operator()(const Polynomial_1& P,
-                                  const Algebraic_real_1& x_s,
-                                  const Algebraic_real_1& x_t) const
-    {
-      return X_monotone_curve_2(P, x_s, x_t, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()(InputIterator begin, InputIterator end,
-                                  const Algebraic_real_1& x_s,
-                                  const Algebraic_real_1& x_t) const
-    {
-      Rat_vector rat_vec(begin,end);
-      return X_monotone_curve_2(rat_vec, x_s, x_t, _traits->cache());
-    }
-
-    X_monotone_curve_2 operator()(const Polynomial_1& P,
-                                  const Polynomial_1& Q) const 
-    {
-      return X_monotone_curve_2(P, Q, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()(InputIterator begin_numer,
-                                  InputIterator end_numer,
-                                  InputIterator begin_denom,
-                                  InputIterator end_denom) const 
-    {
-      Rat_vector rat_vec_numer(begin_numer,end_numer);
-      Rat_vector rat_vec_denom(begin_denom,end_denom);
-      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, _traits->cache());
-    }
-
-    X_monotone_curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
-                                  const Algebraic_real_1& x_s,
-                                  bool dir_right) const
-    {
-      return X_monotone_curve_2(P, Q, x_s, dir_right, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()(InputIterator begin_numer,
-                                  InputIterator end_numer,
-                                  InputIterator begin_denom,
-                                  InputIterator end_denom,
-                                  const Algebraic_real_1& x_s,
-                                  bool dir_right) const
-    {
-      Rat_vector rat_vec_numer(begin_numer,end_numer);
-      Rat_vector rat_vec_denom(begin_denom,end_denom);
-      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s,dir_right,
-                                _traits->cache());
-    }
-
-    X_monotone_curve_2 operator()(const Polynomial_1& P,
-                                  const Polynomial_1& Q,
-                                  const Algebraic_real_1& x_s,
-                                  const Algebraic_real_1& x_t) const
-    {
-      return X_monotone_curve_2(P, Q, x_s, x_t, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    X_monotone_curve_2 operator()(InputIterator begin_numer,
-                                  InputIterator end_numer,
-                                  InputIterator begin_denom,
-                                  InputIterator end_denom,
-                                  const Algebraic_real_1& x_s,
-                                  const Algebraic_real_1& x_t) const
-    {
-      Rat_vector rat_vec_numer(begin_numer, end_numer);
-      Rat_vector rat_vec_denom(begin_denom, end_denom);
-      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t,
-                                _traits->cache());
-    }
-  };
-
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
-  {
-    return Construct_x_monotone_curve_2(this);
-  }
-
-  /*! A functor that constructs an arbitrary curve */
-  class Construct_curve_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
-    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
-
-    /*! The traits */
-    const Traits* _traits;
-
-    /*! Constructor
-     * \param traits the traits
-     */
-    Construct_curve_2(const Traits* traits) : _traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-    
-  public:
-    typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; 
-    typedef typename Base_rational_arc_ds_1::Algebraic_real_1
-                                                          Algebraic_real_1;
-    typedef Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_d_1>
-                                                          Curve_2;
-    typedef Polynomial_1                                  argument_type;
-    typedef Polynomial_1                                  first_argument_type;
-    typedef Polynomial_1                                  second_argument_type;
-    typedef Curve_2                                       result_type;
-    
-    Curve_2 operator()(const Polynomial_1& P) const
-    {
-      return Curve_2(P, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin, InputIterator end) const
-    {
-      Rat_vector rat_vec(begin, end);
-      return Curve_2(rat_vec, _traits->cache());
-    }
-
-    Curve_2 operator()(const Polynomial_1& P,
-                       const Algebraic_real_1& x_s, bool dir_right) const
-    {
-      return Curve_2(P, x_s, dir_right, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin, InputIterator end,
-                       const Algebraic_real_1& x_s, bool dir_right) const
-    {
-      Rat_vector rat_vec(begin, end);
-      return Curve_2(rat_vec, x_s, dir_right, _traits->cache());
-    }
-
-    Curve_2 operator()(const Polynomial_1& P,
-                       const Algebraic_real_1& x_s,
-                       const Algebraic_real_1& x_t) const
-    {
-      return Curve_2(P, x_s, x_t, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin, InputIterator end,
-                       const Algebraic_real_1& x_s,
-                       const Algebraic_real_1& x_t) const
-    {
-      Rat_vector rat_vec(begin,end);
-      return Curve_2(rat_vec, x_s, x_t, _traits->cache());
-    }
-
-    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q) const 
-    {
-      return Curve_2(P, Q, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
-                       InputIterator begin_denom, InputIterator end_denom) const 
-    {
-      Rat_vector rat_vec_numer(begin_numer, end_numer);
-      Rat_vector rat_vec_denom(begin_denom, end_denom);
-      return Curve_2(rat_vec_numer, rat_vec_denom, _traits->cache());
-    }
-
-    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
-                       const Algebraic_real_1& x_s, bool dir_right) const
-    {
-      return Curve_2(P, Q, x_s, dir_right, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
-                       InputIterator begin_denom, InputIterator end_denom,
-                       const Algebraic_real_1& x_s, bool dir_right) const
-    {
-      Rat_vector rat_vec_numer(begin_numer,end_numer);
-      Rat_vector rat_vec_denom(begin_denom,end_denom);
-      return Curve_2(rat_vec_numer, rat_vec_denom, x_s, dir_right,
-                     _traits->cache());
-    }
-
-    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
-                       const Algebraic_real_1& x_s,
-                       const Algebraic_real_1& x_t) const
-    {
-      return Curve_2(P, Q, x_s, x_t, _traits->cache());
-    }
-
-    template <typename InputIterator>
-    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
-                       InputIterator begin_denom, InputIterator end_denom,
-                       const Algebraic_real_1& x_s,
-                       const Algebraic_real_1& x_t) const
-    {
-      Rat_vector rat_vec_numer(begin_numer,end_numer);
-      Rat_vector rat_vec_denom(begin_denom,end_denom);
-      return Curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t, _traits->cache());
-    }
-  };
-
-  Construct_curve_2 construct_curve_2_object() const
-  {
-    return Construct_curve_2(this);
-  }
-
-  /*! Construct a point */
-  class Construct_point_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
-    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
-
-    /*! The traits */
-    const Traits* _traits;
-
-    /*! Constructor
-     * \param traits the traits
-     */
-    Construct_point_2(const Traits* traits) : _traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-    
-  public:
-    Point_2 operator()(const Rational_function& rational_function,
-                       const Algebraic_real_1& x_coordinate)
-    { 
-      return Point_2(rational_function, x_coordinate);
-    }
-
-    Point_2 operator()(const Rational& x, const Rational& y)
-    { 
-      Integer  y_numer,y_denom;
-      typename FT_rat_1::Decompose()(y,y_numer,y_denom);
-      
-      return Point_2(_traits->cache().get_rational_function(Rational(y_numer,
-                                                                     y_denom)),
-                     _traits->algebraic_kernel_d_1()->
-                       construct_algebraic_real_1_object()(x));
-    }
-    Point_2 operator()(const Algebraic_real_1& x, const Rational& y)
-    {   
-      Integer  y_numer;
-      Integer  y_denom;
-      typename FT_rat_1::Decompose()(y, y_numer, y_denom);
-      return Point_2(_traits->cache().get_rational_function(Rational(y_numer,
-                                                                     y_denom)),
-                     x);
-    }
-  }; //Construct_point
-
-  Construct_point_2 construct_point_2_object() const
-  {
-    return Construct_point_2(this);
-  }
-
-//   class Construct_vertical_segment
-//   {
-//   private:
-//     Cache& _cache;
-
-//   public:
-//     Construct_vertical_segment(Cache& cache) : _cache(cache) {}
-
-//     Vertical_segment operator()(const Point_2& p) const
-//     { 
-//       return Vertical_segment(p);
-//     }
-
-//     Vertical_segment operator()(const Point_2& p, bool is_directed_up) const
-//     { 
-//       return Vertical_segment(p, is_directed_up);
-//     }
-
-//     Vertical_segment operator()(const Point_2& p1,const Point_2& p2) const
-//     {       
-//       return Vertical_segment(p1, p2, _cache);
-//     }
-//   }; //Construct_vertical_segment
-
-//   Construct_vertical_segment construct_vertical_segment_object() const
-//   {
-//     return Construct_vertical_segment(_cache);
-//   }
-
-  //------------------------
-  //Functor definitions.
-  //------------------------
-
-  //---------------------------------------------------------------
-  //A functor that compares the x-coordinates of two points 
-  class Compare_x_2
-  {
-  public:
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const
-    {
-      Comparison_result comp = CGAL::compare(p1.x(), p2.x());
-      return (comp);
-    }
-  };
-
-  /*! Obtain a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object() const
-  {
-    return Compare_x_2();
-  }
-
-  /*! A functor that compares two points lexigoraphically: by x, then by y. */
-  class Compare_xy_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
-    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
-
-    /*! The traits */
-    const Traits* _traits;
-
-    /*! Constructor
-     * \param traits the traits
-     */
-    Compare_xy_2(const Traits* traits) : _traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-
-  public:
-    /*!
-     * Compares two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const 
-    {
-      return p1.compare_xy_2(p2, _traits->cache());
-    }
-  };
-
-  /*! Obtain a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object() const
-  {
-    return Compare_xy_2(this);
-  }
-
-  /*! A functor that obtains the left endpoint of a curve. */
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The left endpoint.
-     */
-    const Point_2& operator()(const X_monotone_curve_2 & cv) const
-    {
-      return (cv.left());
-    }
-  };
-
-  /*! Obtain a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object() const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  /*! A functor that obtains the right endpoint of a curve. */
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.right());
-    }
-  };
-
-  /*! Obtain a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object() const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  /*! A functor that checks whether a given curve is vertical. */
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator()(const X_monotone_curve_2&) const
-    {
-      // A rational function can never be vertical.
-      return false;
-    }
-  };
-
-  /*! Obtain an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object() const
-  {
-    return Is_vertical_2();
-  }
-
-  /*! A functor that compares the y-coordinates of a point and a curve at
-   * the point x-coordinate.
-   */
-  class Compare_y_at_x_2
-  {
-  private:
-    Cache& _cache;
-  public:
-    Compare_y_at_x_2(Cache& cache) : _cache(cache) {}
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator()(const Point_2& p,
-                                 const X_monotone_curve_2& cv) const
-    {
-      return (cv.point_position(p,_cache));
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return Compare_y_at_x_2(_cache);
-  }
-
-  /*! A functor that compares compares the y-coordinates of two curves
-   * immediately to the left of their intersection point.
-   */
-  class Compare_y_at_x_left_2
-  {
-  private:
-    Cache& _cache;
-
-  public:
-    Compare_y_at_x_left_2(Cache& cache) :_cache(cache) {}
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition(cv1.point_position(p,_cache) == EQUAL &&
-                        cv2.point_position(p,_cache) == EQUAL);
-
-      CGAL_precondition((cv1.left_parameter_space_in_x() != ARR_INTERIOR ||
-                         cv1.left_parameter_space_in_y() != ARR_INTERIOR ||
-                         (p.x() > cv1.left().x())) &&
-                        (cv2.left_parameter_space_in_x() != ARR_INTERIOR ||
-                         cv2.left_parameter_space_in_y() != ARR_INTERIOR ||
-                         (p.x() > cv2.left().x())));
-
-      // Compare the two arcs.
-      return cv1.compare_at_intersection (cv2,p,true,_cache);}
-  };
-
-  /*! Obtain a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
-  {
-    return Compare_y_at_x_left_2(_cache);
-  }
-
-  /*! A functor that compares compares the y-coordinates of two curves
-   * immediately to the right of their intersection point.
-   */
-  class Compare_y_at_x_right_2
-  {
-  private:
-    Cache& _cache;
-
-  public:
-    Compare_y_at_x_right_2(Cache& cache) :_cache(cache) {}
-    /*!
-     * Compares the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& p) const
-    {
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition(cv1.point_position (p,_cache) == EQUAL &&
-                        cv2.point_position (p,_cache) == EQUAL);
-
-
-      CGAL_precondition((cv1.right_parameter_space_in_x() != ARR_INTERIOR ||
-                         cv1.right_parameter_space_in_y() != ARR_INTERIOR ||
-                         (p.x() < cv1.right().x())) &&
-                        (cv2.right_parameter_space_in_x() != ARR_INTERIOR ||
-                         cv2.right_parameter_space_in_y() != ARR_INTERIOR ||
-                         (p.x() < cv2.right().x())));
-
- 
-      // Compare the two arcs.
-      return cv1.compare_at_intersection (cv2,p,false,_cache);
-    }
-  };
-
-  /*! Obtain a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return Compare_y_at_x_right_2(_cache);
-  }
-
-  /*! A functor that checks whether two points and two curves are identical. */
-  class Equal_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
-    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
-    /*! The traits */
-    const Traits* _traits;
-
-    /*! Constructor
-     * \param traits the traits
-     */
-    Equal_2(const Traits* traits) : _traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-    
-  public:
-    /*!
-     * Check if the two x-monotone curves are the same (have the same graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      if (&cv1 == &cv2)
-        return true;
-
-      return (cv1.equals(cv2));
-    }
-
-    /*!
-     * Check if the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      if (&p1 == &p2)
-        return true;
-
-      return
-        (p1.compare_xy_2(p2, _traits->cache()) == CGAL::EQUAL) ?
-         true : false;
-    }
-  };
-
-  /*! Obtain an Equal_2 functor object. */
-  Equal_2 equal_2_object() const
-  {
-    return Equal_2(this);
-  }
-
-  /*! A functor that divides a curve into continues (x-monotone) curves. */
-  class Make_x_monotone_2
-  {
-  public:
-
-    /*!
-     * Cut the given conic curve (or conic arc) into x-monotone subcurves 
-     * and insert them to the given output iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object. The returned
-     *           objects is a wrapper for an X_monotone_curve_2 object.
-     * \return The past-the-end iterator.
-     */
-    template<typename OutputIterator>
-    OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const 
-    {
-      // Make the rational arc continuous.
-      std::list<X_monotone_curve_2>                           arcs;
-
-      cv.make_continuous(std::back_inserter(arcs));
-
-      // Create objects.
-      typename std::list<X_monotone_curve_2>::const_iterator  iter;
-
-      for (iter = arcs.begin(); iter != arcs.end(); ++iter)
-      {
-        *oi = make_object (*iter);
-        ++oi;
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Obtain a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object() const
-  {
-    return Make_x_monotone_2();
-  }
-
-  /*! A functor that splits a curve at a point. */
-  class Split_2
-  {
-  private:
-    Cache& _cache;
-
-  public:
-    Split_2(Cache& cache) : _cache(cache) {}
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator()(const X_monotone_curve_2& cv, const Point_2 & p,
-                    X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      cv.split(p, c1, c2, _cache);
-    }
-  };
-
-  /*! Obtain a Split_2 functor object. */
-  Split_2 split_2_object() const
-  {
-    return Split_2(_cache);
-  }
-
-  /*! A functor that computes intersections between two curves. */
-  class Intersect_2
-  {
-  private:
-    Cache& _cache;
-  public:
-    Intersect_2(Cache& cache) : _cache(cache) {}
-    /*!
-     * Find the intersections of the two given curves and insert them to the
-     * given output iterator. As two segments may itersect only once, only a
-     * single will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template <typename OutputIterator>
-    OutputIterator operator()(const X_monotone_curve_2& cv1,
-                              const X_monotone_curve_2& cv2,
-                              OutputIterator oi)  const
-    {
-      return (cv1.intersect (cv2, oi,_cache));
-    }
-  };
-
-  /*! Obtain an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object() const
-  {
-    return Intersect_2(_cache);
-  }
-
-  /*! A functor that tests whether two curves can be merged. */
-  class Are_mergeable_2
-  {
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable - if they are supported
-     *         by the same line and share a common endpoint; (false) otherwise.
-     */
-    bool operator()(const X_monotone_curve_2& cv1,
-                    const X_monotone_curve_2& cv2) const
-    {
-      return (cv1.can_merge_with(cv2));
-    }
-  };
-
-  /*! Obtain an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object() const
-  {
-    return Are_mergeable_2();
-  }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2
-  {
-  protected:
-    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1>        Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-    
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve (segment).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator()(const X_monotone_curve_2& cv1,
-                    const X_monotone_curve_2& cv2,
-                    X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
-
-      c = cv1;
-      c.merge(cv2);
-    }
-  };
-
-  /*! Obtain a Merge_2 functor object. */
-  Merge_2 merge_2_object() const
-  {
-    return Merge_2(this);
-  }
-
-  //@}
-
-  /// \name Functor definitions to handle boundaries
-  //@{
-
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the x-axis
-   */
-  class Parameter_space_in_x_2 {
-  public:
-    /*! Obtains the parameter space at the end of a line along the x-axis.
-     * \param xcv the line
-     * \param ce the line end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the line xcv.
-     *   ARR_LEFT_BOUNDARY  - the line approaches the identification arc from
-     *                        the right at the line left end.
-     *   ARR_INTERIOR       - the line does not approache the identification arc.
-     *   ARR_RIGHT_BOUNDARY - the line approaches the identification arc from
-     *                        the left at the line right end.
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
-        Arr_curve_end ce) const
-    {
-      return (ce == ARR_MIN_END) ?
-        xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x();
-    }
-
-    /*! Obtains the parameter space at a point along the x-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     */
-    Arr_parameter_space operator()(const Point_2 ) const
-    {
-      return ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_x_2 function object */
-  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
-  { return Parameter_space_in_x_2(); }
-  
-  /*! A function object that obtains the parameter space of a geometric
-   * entity along the y-axis
-   */
-  class Parameter_space_in_y_2 {
-  public:
-    /*! Obtains the parameter space at the end of a line along the y-axis .
-     * Note that if the line end coincides with a pole, then unless the line
-     * coincides with the identification arc, the line end is considered to
-     * be approaching the boundary, but not on the boundary.
-     * If the line coincides with the identification arc, it is assumed to
-     * be smaller than any other object.
-     * \param xcv the line
-     * \param ce the line end indicator:
-     *     ARR_MIN_END - the minimal end of xc or
-     *     ARR_MAX_END - the maximal end of xc
-     * \return the parameter space at the ce end of the line xcv.
-     *   ARR_BOTTOM_BOUNDARY  - the line approaches the south pole at the line
-     *                          left end.
-     *   ARR_INTERIOR         - the line does not approache a contraction point.
-     *   ARR_TOP_BOUNDARY     - the line approaches the north pole at the line
-     *                          right end.
-     */
-    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
-        Arr_curve_end ce) const
-    {
-      return (ce == ARR_MIN_END) ?
-        xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y();
-    }
-
-    /*! Obtains the parameter space at a point along the y-axis.
-     * \param p the point.
-     * \return the parameter space at p.
-     */
-    Arr_parameter_space operator()(const Point_2 ) const
-    {
-      return ARR_INTERIOR;
-    }
-  };
-
-  /*! Obtain a Parameter_space_in_y_2 function object */
-  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
-  { return Parameter_space_in_y_2(); }
-
-  /*! A function object that compares the x-coordinates of arc ends near the
-   * boundary of the parameter space
-   */
-  class Compare_x_near_boundary_2 {
-  public:
-    /*! Compare the x-coordinate of a point with the x-coordinate of
-     * a line end near the boundary at y = +/- oo.
-     * \param p the point direction.
-     * \param xcv the line, the endpoint of which is compared.
-     * \param ce the line-end indicator -
-     *            ARR_MIN_END - the minimal end of xc or
-     *            ARR_MAX_END - the maximal end of xc.
-     * \return the comparison result:
-     *         SMALLER - x(p) < x(xc, ce);
-     *         EQUAL   - x(p) = x(xc, ce);
-     *         LARGER  - x(p) > x(xc, ce).     
-     * \pre p lies in the interior of the parameter space.
-     * \pre the ce end of the line xcv lies on a boundary.
-     */
-    Comparison_result operator()(const Point_2 & p,
-                                 const X_monotone_curve_2 & xcv,
-                                 Arr_curve_end ce) const
-    {
-      Comparison_result r = xcv.compare_end(ce, p);
-      if (r == EQUAL) 
-        return EQUAL; 
-      return (r == NEGATIVE) ? POSITIVE : NEGATIVE ; 
-    }
-
-    /*! Compare the x-coordinates of 2 arcs ends near the boundary of the
-     * parameter space at y = +/- oo.
-     * \param xcv1 the first arc.
-     * \param ce1 the first arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv1 or
-     *            ARR_MAX_END - the maximal end of xcv1.
-     * \param xcv2 the second arc.
-     * \param ce2 the second arc end indicator -
-     *            ARR_MIN_END - the minimal end of xcv2 or
-     *            ARR_MAX_END - the maximal end of xcv2.
-     * \return the second comparison result:
-     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
-     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
-     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
-     * \pre the ce1 end of the line xcv1 lies on a boundary.
-     * \pre the ce2 end of the line xcv2 lies on a boundary.
-     */
-    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
-                                 Arr_curve_end ce1,
-                                 const X_monotone_curve_2 & xcv2,
-                                 Arr_curve_end ce2) const
-    {
-      return xcv1.compare_ends(ce1, xcv2, ce2);
-    }
-  };
-
-  /*! Obtain a Compare_x_near_boundary_2 function object */
-  Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
-  { return Compare_x_near_boundary_2(); }
-    
-
-  /*! A function object that compares the y-coordinates of arc ends near the
-   * boundary of the parameter space.
-   */
-  class Compare_y_near_boundary_2 
-  {
-  private:
-    Cache& _cache;
-
-  public:
-    /*! Compare the y-coordinates of 2 lines at their ends near the boundary
-     * of the parameter space at x = +/- oo.
-     * \param xcv1 the first arc.
-     * \param xcv2 the second arc.
-     * \param ce the line end indicator.
-     * \return the second comparison result.
-     * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left
-     * boundary or on the right boundary of the parameter space.
-     */
-    Compare_y_near_boundary_2(Cache& cache) : _cache(cache) {}
-    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
-        const X_monotone_curve_2 & xcv2,
-        Arr_curve_end ce) const
-    {
-      return (ce == ARR_MIN_END) ?
-        xcv1.compare_at_minus_infinity(xcv2,_cache) :
-        xcv1.compare_at_plus_infinity(xcv2,_cache);
-    }
-  };
-
-  /*! Obtain a Compare_y_near_boundary_2 function object */
-  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
-  { return Compare_y_near_boundary_2(_cache); }
-
- 
-  /*! A function object that compares at limit
-   */
-  //new functor
-  class Compare_x_at_limit_2
-  {
-   public:
-    /*! Compares the x coordinate of p with the curve end
-     * of xcv that is defined by ce at its limit. 
-     * Returns SMALLER, EQUAL, or LARGER accordingly.
-     */
-    Comparison_result operator()(const Point_2& p,
-                                 const X_monotone_curve_2&  xcv, 
-                                 Arr_curve_end ce)
-    {
-      CGAL_precondition(Parameter_space_in_x_2()(xcv,ce) == ARR_INTERIOR);
-      CGAL_precondition(Parameter_space_in_y_2()(xcv,ce) != ARR_INTERIOR);
-      return CGAL::compare(p.x(),
-                           (ce == ARR_MIN_END) ? xcv.left_x() : xcv.right_x());
-    }
-    /*! Compares the curve end of  xcv1 that is defined by ce1 
-     *  with the curve end of xcv2 that is defined by ce2
-     * at their limits in x. 
-     * Returns SMALLER, EQUAL, or LARGER accordingly.
-     */
-    Comparison_result operator()(const X_monotone_curve_2&  xcv1, 
-                                 Arr_curve_end ce1,
-                                 const X_monotone_curve_2&  xcv2, 
-                                 Arr_curve_end ce2)
-    {
-      CGAL_precondition(Parameter_space_in_x_2()(xcv1,ce1) == ARR_INTERIOR);
-      CGAL_precondition(Parameter_space_in_y_2()(xcv1,ce1) != ARR_INTERIOR);
-      CGAL_precondition(Parameter_space_in_x_2()(xcv2,ce2) == ARR_INTERIOR);
-      CGAL_precondition(Parameter_space_in_y_2()(xcv2,ce2) != ARR_INTERIOR);
-
-      return CGAL::compare((ce1 == ARR_MIN_END) ? xcv1.left_x() : xcv1.right_x(),
-                           (ce2 == ARR_MIN_END) ? xcv2.left_x() : xcv2.right_x());
-    }
-
-  }; //Compare_x_at_limit_2
-
-  /*! Obtain a Compare_x_at_limit_2 function object */
-  Compare_x_at_limit_2 compare_x_at_limit_2_object() const
-  { return Compare_x_at_limit_2(); }
-  //@}
-  
-  /// \name Functor definitions for the Boolean set-operation traits.
-  //@{
- 
-  //new functor
-  class Compare_x_near_limit_2
-  {
-  private:
-    Cache& _cache;
-
-  public:
-    Compare_x_near_limit_2(Cache& cache) : _cache(cache) {}
-    /*! Compares the curve end of  xcv1 that is defined by ce1 
-     *  with the curve end of xcv2 that is defined by ce2
-     * at their limits in x. 
-     * Returns SMALLER, EQUAL, or LARGER accordingly.
-     */
-    Comparison_result operator()( const X_monotone_curve_2& xcv1, 
-                                  const X_monotone_curve_2& xcv2, 
-                                  Arr_curve_end ce) const
-    {
-      return xcv1.compare_near_end(xcv2,ce,_cache);
-    }
-  }; //Compare_x_near_limit_2
-
-  /*! Obtain a Compare_x_near_limit_2 function object */
-  Compare_x_near_limit_2 compare_x_near_limit_2_object() const
-  { return Compare_x_near_limit_2(_cache); }
-
-  class Compare_endpoints_xy_2
-  {
-  public:
-
-    /*!
-     * Compare the endpoints of an $x$-monotone curve lexicographically.
-     * (assuming the curve has a designated source and target points).
-     * \param cv The curve.
-     * \return SMALLER if the curve is directed right;
-     *         LARGER if the curve is directed left.
-     */
-    Comparison_result operator()(const X_monotone_curve_2& cv)
-    {
-      if (cv.is_directed_right())
-        return (SMALLER);
-      else
-        return (LARGER);
-    }
-  };
-
-  /*! Obtain a Compare_endpoints_xy_2 functor object. */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-
-  class Construct_opposite_2
-  {
-  public:
-
-    /*!
-     * Construct an opposite x-monotone (with swapped source and target).
-     * \param cv The curve.
-     * \return The opposite curve.
-     */
-    X_monotone_curve_2 operator()(const X_monotone_curve_2& cv)
-    {
-      return (cv.flip());
-    }
-  };
-
-  /*! Obtain a Construct_opposite_2 functor object. */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  }
-
-  //@}
-
-  class Approximate_2{
-    Approximate_number_type approx_x(const Point_2& p){
-      return Approximate_number_type(p.x().lower());
-    } 
-    Approximate_number_type approx_y(const Point_2& p){
-      typedef typename Algebraic_kernel_d_1::Polynomial_1 Polynomial_1;
-      typename CGAL::Coercion_traits<Polynomial_1,Bound>::Cast cast;  
-      return
-        cast(p.rational_function().numer()).evaluate(p.x().lower())/
-        cast(p.rational_function().denom()).evaluate(p.x().lower());
-    }
-  public:
-    Approximate_number_type operator()(const Point_2& p, int i){
-      if(i==0) return approx_x(p); 
-      if(i==1) return approx_y(p);
-      assert(false);
-      return Approximate_number_type(0);
-    }
-  };
-  
-  Approximate_2 approximate_2_object() const { return Approximate_2(); }
-
-  void cleanup_cache() const
-  {
-    _cache.cleanup();
-  }
-}; //Arr_rational_function_traits_2
-
-}   //namespace CGAL {
-
-
-#endif  //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_segment_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_segment_traits_2.h
deleted file mode 100644
index acfd210..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_segment_traits_2.h
+++ /dev/null
@@ -1,1186 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-//                 Efi Fogel         <efif at post.tau.ac.il>
-
-#ifndef CGAL_ARR_SEGMENT_TRAITS_2_H
-#define CGAL_ARR_SEGMENT_TRAITS_2_H
-
-/*! \file
- * The segment traits-class for the arrangement package.
- */
-
-#include <CGAL/tags.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <fstream>
-
-namespace CGAL {
-
-template <class Kernel_ = Exact_predicates_exact_constructions_kernel>
-class Arr_segment_2;
-
-/*!
- * \class A traits class for maintaining an arrangement of segments, aoviding
- * cascading of computations as much as possible.
- *
- * The class is derived from the parameterized kernel to extend the traits
- * with all the types and operations supported by the kernel. This makes it
- * possible to use the traits class for data structures that extends the
- * Arrangement_2 type and require objects and operations supported by the
- * kernel, but not defined in this derived class.
- */
-template <class Kernel_ = Exact_predicates_exact_constructions_kernel>
-class Arr_segment_traits_2 : public Kernel_
-{
-  friend class Arr_segment_2<Kernel_>;
-
-public:
-
-  typedef Kernel_                         Kernel;
-  typedef typename Kernel::FT             FT;
-
-  typedef typename Algebraic_structure_traits<FT>::Is_exact
-                                          Has_exact_division;
-
-  // Category tags:
-  typedef Tag_true                        Has_left_category;
-  typedef Tag_true                        Has_merge_category;
-  typedef Tag_false                       Has_do_intersect_category;
-
-  typedef Arr_oblivious_side_tag          Left_side_category;
-  typedef Arr_oblivious_side_tag          Bottom_side_category;
-  typedef Arr_oblivious_side_tag          Top_side_category;
-  typedef Arr_oblivious_side_tag          Right_side_category;
-
-  typedef typename Kernel::Line_2         Line_2;
-  typedef CGAL::Segment_assertions<Arr_segment_traits_2<Kernel> >
-                                          Segment_assertions;
-
-  /*!
-   * \class Representation of a segement with cached data.
-   */
-  class _Segment_cached_2
-  {
-  public:
-
-    typedef typename Kernel::Line_2                Line_2;
-    typedef typename Kernel::Segment_2             Segment_2;
-    typedef typename Kernel::Point_2               Point_2;
-
-  protected:
-
-    Line_2    l;                // The line that supports the segment.
-    Point_2   ps;               // The source point of the segment.
-    Point_2   pt;               // The target point of the segment.
-    bool      is_pt_max;        // Is the target (lexicographically) larger
-                                // than the source.
-    bool      is_vert;          // Is this a vertical segment.
-    bool      is_degen;         // Is the segment degenerate (a single point).
-
-  public:
-
-    /*!
-     * Default constructor.
-     */
-    _Segment_cached_2 () :
-      is_vert(false),
-      is_degen(true)
-    {}
-
-    /*!
-     * Constructor from a segment.
-     * \param seg The segment.
-     * \pre The segment is not degenerate.
-     */
-    _Segment_cached_2 (const Segment_2& seg)
-    {
-      Kernel   kernel;
-
-      typename Kernel_::Construct_vertex_2
-        construct_vertex = kernel.construct_vertex_2_object();
-
-      ps = construct_vertex(seg, 0);
-      pt = construct_vertex(seg, 1);
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      is_degen = (res == EQUAL);
-      is_pt_max = (res == SMALLER);
-
-      CGAL_precondition_msg (! is_degen,
-                             "Cannot construct a degenerate segment.");
-
-      l = kernel.construct_line_2_object()(seg);
-      is_vert = kernel.is_vertical_2_object()(seg);
-    }
-
-    /*!
-     * Construct a segment from two end-points.
-     * \param source The source point.
-     * \param target The target point.
-     * \param The two points must not be equal.
-     */
-    _Segment_cached_2 (const Point_2& source, const Point_2& target) :
-      ps (source),
-      pt (target)
-    {
-      Kernel   kernel;
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      is_degen = (res == EQUAL);
-      is_pt_max = (res == SMALLER);
-
-      CGAL_precondition_msg (! is_degen,
-                             "Cannot construct a degenerate segment.");
-
-      l = kernel.construct_line_2_object()(source, target);
-      is_vert = kernel.is_vertical_2_object()(l);
-    }
-
-    /*!
-     * Construct a segment from two end-points on a supporting line.
-     * \param supp_line The supporting line.
-     * \param source The source point.
-     * \param target The target point.
-     * \pre The two endpoints are not the same and both lie on the given line.
-     */
-    _Segment_cached_2 (const Line_2& supp_line,
-                       const Point_2& source, const Point_2& target) :
-      l (supp_line),
-      ps (source),
-      pt (target)
-    {
-      Kernel   kernel;
-
-      CGAL_precondition(
-        Segment_assertions::_assert_is_point_on(source, l,
-                                                Has_exact_division()) &&
-        Segment_assertions::_assert_is_point_on(target,l,
-                                                Has_exact_division())
-        );
-
-      is_vert = kernel.is_vertical_2_object()(l);
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      is_degen = (res == EQUAL);
-      is_pt_max = (res == SMALLER);
-
-      CGAL_precondition_msg (! is_degen,
-                             "Cannot contruct a degenerate segment.");
-    }
-
-    /*!
-     * Assignment operator.
-     * \param seg the source segment to copy from
-     * \pre The segment is not degenerate.
-     */
-    const _Segment_cached_2& operator= (const Segment_2& seg)
-    {
-      Kernel   kernel;
-
-      typename Kernel_::Construct_vertex_2
-        construct_vertex = kernel.construct_vertex_2_object();
-
-      ps = construct_vertex(seg, 0);
-      pt = construct_vertex(seg, 1);
-
-      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
-      is_degen = (res == EQUAL);
-      is_pt_max = (res == SMALLER);
-
-      CGAL_precondition_msg (! is_degen,
-                             "Cannot contruct a degenerate segment.");
-
-      l = kernel.construct_line_2_object()(seg);
-      is_vert = kernel.is_vertical_2_object()(seg);
-
-      return (*this);
-    }
-
-    /*!
-     * Get the (lexicographically) left endpoint.
-     */
-    const Point_2& left () const
-    {
-      return (is_pt_max ? ps : pt);
-    }
-
-    /*!
-     * Set the (lexicographically) left endpoint.
-     * \param p The point to set.
-     * \pre p lies on the supporting line to the left of the right endpoint.
-     */
-    void set_left (const Point_2& p)
-    {
-      CGAL_precondition (! is_degen);
-      CGAL_precondition_code (
-        Kernel    kernel;
-      );
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, l,
-                                                  Has_exact_division()) &&
-         kernel.compare_xy_2_object() (p, right()) == SMALLER);
-
-      if (is_pt_max)
-        ps = p;
-      else
-        pt = p;
-    }
-
-    /*!
-     * Get the (lexicographically) right endpoint.
-     */
-    const Point_2& right () const
-    {
-      return (is_pt_max ? pt : ps);
-    }
-
-    /*!
-     * Set the (lexicographically) right endpoint.
-     * \param p The point to set.
-     * \pre p lies on the supporting line to the right of the left endpoint.
-     */
-    void set_right (const Point_2& p)
-    {
-      CGAL_precondition (! is_degen);
-      CGAL_precondition_code (
-        Kernel    kernel;
-      );
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, l,
-                                                  Has_exact_division()) &&
-         kernel.compare_xy_2_object() (p, left()) == LARGER);
-
-      if (is_pt_max)
-        pt = p;
-      else
-        ps = p;
-    }
-
-    /*!
-     * Get the supporting line.
-     */
-    const Line_2& line () const
-    {
-      CGAL_precondition (! is_degen);
-      return (l);
-    }
-
-    /*!
-     * Check if the curve is vertical.
-     */
-    bool is_vertical () const
-    {
-      CGAL_precondition (! is_degen);
-      return (is_vert);
-    }
-
-    /*!
-     * Check if the curve is directed lexicographic from left to right
-     */
-    bool is_directed_right () const
-    {
-      return (is_pt_max);
-    }
-
-    /*!
-     * Check if the given point is in the x-range of the segment.
-     * \param p The query point.
-     * \return (true) is in the x-range of the segment; (false) if it is not.
-     */
-    bool is_in_x_range (const Point_2& p) const
-    {
-      Kernel                          kernel;
-      typename Kernel_::Compare_x_2   compare_x = kernel.compare_x_2_object();
-      const Comparison_result         res1 = compare_x (p, left());
-
-      if (res1 == SMALLER)
-        return (false);
-      else if (res1 == EQUAL)
-        return (true);
-
-      const Comparison_result         res2 = compare_x (p, right());
-
-      return (res2 != LARGER);
-    }
-
-    /*!
-     * Check if the given point is in the y-range of the segment.
-     * \param p The query point.
-     * \return (true) is in the y-range of the segment; (false) if it is not.
-     */
-    bool is_in_y_range (const Point_2& p) const
-    {
-      Kernel                          kernel;
-      typename Kernel_::Compare_y_2   compare_y = kernel.compare_y_2_object();
-      const Comparison_result         res1 = compare_y (p, left());
-
-      if (res1 == SMALLER)
-        return (false);
-      else if (res1 == EQUAL)
-        return (true);
-
-      const Comparison_result         res2 = compare_y (p, right());
-
-      return (res2 != LARGER);
-    }
-  };
-
-public:
-
-  // Traits objects
-  typedef typename Kernel::Point_2        Point_2;
-  typedef Arr_segment_2<Kernel>           X_monotone_curve_2;
-  typedef Arr_segment_2<Kernel>           Curve_2;
-  typedef unsigned int                    Multiplicity;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Arr_segment_traits_2 ()
-  {}
-
-  /// \name Basic functor definitions.
-  //@{
-
-  class Compare_x_2
-  {
-  public:
-    /*!
-     * Compare the x-coordinates of two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2);
-     *         SMALLER if x(p1) < x(p2);
-     *         EQUAL if x(p1) = x(p2).
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Kernel    kernel;
-
-      return (kernel.compare_x_2_object()(p1, p2));
-    }
-  };
-
-  /*! Get a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return Compare_x_2();
-  }
-
-  class Compare_xy_2
-  {
-  public:
-    /*!
-     * Compare two points lexigoraphically: by x, then by y.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
-     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
-     *         EQUAL if the two points are equal.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Kernel    kernel;
-      return (kernel.compare_xy_2_object()(p1, p2));
-    }
-  };
-
-  /*! Get a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return Compare_xy_2();
-  }
-
-  class Construct_min_vertex_2
-  {
-  public:
-    /*!
-     * Get the left endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The left endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.left());
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2();
-  }
-
-  class Construct_max_vertex_2
-  {
-  public:
-    /*!
-     * Get the right endpoint of the x-monotone curve (segment).
-     * \param cv The curve.
-     * \return The right endpoint.
-     */
-    const Point_2& operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.right());
-    }
-  };
-
-  /*! Get a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2();
-  }
-
-  class Is_vertical_2
-  {
-  public:
-    /*!
-     * Check whether the given x-monotone curve is a vertical segment.
-     * \param cv The curve.
-     * \return (true) if the curve is a vertical segment; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.is_vertical());
-    }
-  };
-
-  /*! Get an Is_vertical_2 functor object. */
-  Is_vertical_2 is_vertical_2_object () const
-  {
-    return Is_vertical_2();
-  }
-
-  class Compare_y_at_x_2
-  {
-  public:
-    /*!
-     * Return the location of the given point with respect to the input curve.
-     * \param cv The curve.
-     * \param p The point.
-     * \pre p is in the x-range of cv.
-     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
-     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
-     *         EQUAL if p lies on the curve.
-     */
-    Comparison_result operator() (const Point_2& p,
-                                  const X_monotone_curve_2& cv) const
-    {
-      CGAL_precondition (cv.is_in_x_range (p));
-
-      Kernel    kernel;
-
-      if (! cv.is_vertical())
-      {
-        // Compare p with the segment's supporting line.
-        return (kernel.compare_y_at_x_2_object()(p, cv.line()));
-      }
-      else
-      {
-        // Compare with the vertical segment's end-points.
-        typename Kernel::Compare_y_2  compare_y = kernel.compare_y_2_object();
-        Comparison_result res1 = compare_y (p, cv.left());
-        Comparison_result res2 = compare_y (p, cv.right());
-
-        if (res1 == res2)
-          return (res1);
-        else
-          return (EQUAL);
-      }
-    }
-  };
-
-  /*! Get a Compare_y_at_x_2 functor object. */
-  Compare_y_at_x_2 compare_y_at_x_2_object () const
-  {
-    return Compare_y_at_x_2();
-  }
-
-  class Compare_y_at_x_left_2
-  {
-  public:
-    /*!
-     * Compare the y value of two x-monotone curves immediately to the left
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its left.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the left of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& CGAL_assertion_code(p)) const
-    {
-      Kernel                        kernel;
-
-      // Make sure that p lies on both curves, and that both are defined to its
-      // left (so their left endpoint is lexicographically smaller than p).
-      CGAL_precondition_code (
-        typename Kernel::Compare_xy_2 compare_xy =
-                                                  kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, cv1,
-                                                  Has_exact_division()) &&
-         Segment_assertions::_assert_is_point_on (p, cv2,
-                                                  Has_exact_division()));
-
-      CGAL_precondition (compare_xy(cv1.left(), p) == SMALLER &&
-                         compare_xy(cv2.left(), p) == SMALLER);
-
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-      // Notice we use the supporting lines in order to compare the slopes,
-      // and that we swap the order of the curves in order to obtain the
-      // correct result to the left of p.
-      return (kernel.compare_slope_2_object()(cv2.line(), cv1.line()));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_left_2 functor object. */
-  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
-  {
-    return Compare_y_at_x_left_2();
-  }
-
-  class Compare_y_at_x_right_2
-  {
-  public:
-    /*!
-     * Compare the y value of two x-monotone curves immediately to the right
-     * of their intersection point.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param p The intersection point.
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographically) to its right.
-     * \return The relative position of cv1 with respect to cv2 immdiately to
-     *         the right of p: SMALLER, LARGER or EQUAL.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv1,
-                                  const X_monotone_curve_2& cv2,
-                                  const Point_2& CGAL_assertion_code(p)) const
-    {
-      Kernel                        kernel;
-
-      // Make sure that p lies on both curves, and that both are defined to its
-      // right (so their right endpoint is lexicographically larger than p).
-      CGAL_precondition_code (
-        typename Kernel::Compare_xy_2 compare_xy =
-                                                 kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, cv1,
-                                                  Has_exact_division()) &&
-         Segment_assertions::_assert_is_point_on (p, cv2,
-                                                  Has_exact_division()));
-
-      CGAL_precondition (compare_xy(cv1.right(), p) == LARGER &&
-                         compare_xy(cv2.right(), p) == LARGER);
-
-      // Compare the slopes of the two segments to determine thir relative
-      // position immediately to the left of q.
-      // Notice we use the supporting lines in order to compare the slopes.
-      return (kernel.compare_slope_2_object()(cv1.line(), cv2.line()));
-    }
-  };
-
-  /*! Get a Compare_y_at_x_right_2 functor object. */
-  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
-  {
-    return Compare_y_at_x_right_2();
-  }
-
-  class Equal_2
-  {
-  public:
-    /*!
-     * Check if the two x-monotone curves are the same (have the same graph).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are the same; (false) otherwise.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      Kernel                    kernel;
-      typename Kernel::Equal_2  equal = kernel.equal_2_object();
-
-      return (equal(cv1.left(), cv2.left()) &&
-              equal(cv1.right(), cv2.right()));
-    }
-
-    /*!
-     * Check if the two points are the same.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \return (true) if the two point are the same; (false) otherwise.
-     */
-    bool operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      Kernel    kernel;
-      return (kernel.equal_2_object()(p1, p2));
-    }
-  };
-
-  /*! Get an Equal_2 functor object. */
-  Equal_2 equal_2_object () const
-  {
-    return Equal_2();
-  }
-  //@}
-
-  /// \name Functor definitions for supporting intersections.
-  //@{
-
-  class Make_x_monotone_2
-  {
-  public:
-    /*!
-     * Cut the given curve into x-monotone subcurves and insert them into the
-     * given output iterator. As segments are always x_monotone, only one
-     * object will be contained in the iterator.
-     * \param cv The curve.
-     * \param oi The output iterator, whose value-type is Object.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
-    {
-      // Wrap the segment with an object.
-      *oi = make_object (cv);
-      ++oi;
-      return (oi);
-    }
-  };
-
-  /*! Get a Make_x_monotone_2 functor object. */
-  Make_x_monotone_2 make_x_monotone_2_object () const
-  {
-    return Make_x_monotone_2();
-  }
-
-  class Split_2
-  {
-  public:
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     * \param cv The curve to split
-     * \param p The split point.
-     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
-     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      // Make sure that p lies on the interior of the curve.
-      CGAL_precondition_code (
-        Kernel                        kernel;
-        typename Kernel::Compare_xy_2 compare_xy =
-                                                 kernel.compare_xy_2_object();
-      );
-
-      CGAL_precondition
-        (Segment_assertions::_assert_is_point_on (p, cv,
-                                                  Has_exact_division()) &&
-         compare_xy(cv.left(), p) == SMALLER &&
-         compare_xy(cv.right(), p) == LARGER);
-
-      // Perform the split.
-      c1 = cv;
-      c1.set_right (p);
-
-      c2 = cv;
-      c2.set_left (p);
-
-      return;
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2();
-  }
-
-  class Intersect_2
-  {
-  public:
-    /*!
-     * Find the intersections of the two given curves and insert them into the
-     * given output iterator. As two segments may itersect only once, only a
-     * single intersection will be contained in the iterator.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param oi The output iterator.
-     * \return The past-the-end iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      // Intersect the two supporting lines.
-      Kernel       kernel;
-      CGAL::Object obj = kernel.intersect_2_object()(cv1.line(), cv2.line());
-
-      if (obj.is_empty())
-      {
-        // The supporting line are parallel lines and do not intersect:
-        return (oi);
-      }
-
-      // Check if we have a single intersection point.
-      const Point_2  *ip = object_cast<Point_2> (&obj);
-
-      if (ip != NULL)
-      {
-        // Check if the intersection point ip lies on both segments.
-        const bool    ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
-                                                      cv1.is_in_x_range(*ip);
-
-        if (ip_on_cv1)
-        {
-          const bool  ip_on_cv2 = cv2.is_vertical() ? cv2.is_in_y_range(*ip) :
-                                                      cv2.is_in_x_range(*ip);
-
-          if (ip_on_cv2)
-          {
-            // Create a pair representing the point with its multiplicity,
-            // which is always 1 for line segments.
-            std::pair<Point_2, Multiplicity>   ip_mult (*ip, 1);
-            *oi = make_object (ip_mult);
-            oi++;
-          }
-        }
-        return (oi);
-      }
-
-      // In this case, the two supporting lines overlap.
-      // The overlapping segment is therefore [p_l,p_r], where p_l is the
-      // rightmost of the two left endpoints and p_r is the leftmost of the
-      // two right endpoints.
-      typename Kernel::Compare_xy_2  compare_xy = kernel.compare_xy_2_object();
-      Point_2                        p_l, p_r;
-
-      if (compare_xy (cv1.left(), cv2.left()) == SMALLER)
-        p_l = cv2.left();
-      else
-        p_l = cv1.left();
-
-      if (compare_xy (cv1.right(), cv2.right()) == SMALLER)
-        p_r = cv1.right();
-      else
-        p_r = cv2.right();
-
-      // Examine the resulting segment.
-      const Comparison_result        res = compare_xy (p_l, p_r);
-
-      if (res == SMALLER)
-      {
-        // We have discovered an overlapping segment:
-        if(cv1.is_directed_right() == cv2.is_directed_right())
-        {
-          // cv1 and cv2 have the same directions, maintain this direction
-          // in the overlap segment
-          if(cv1.is_directed_right())
-          {
-            X_monotone_curve_2  overlap_seg (cv1.line(), p_l, p_r);
-            *oi = make_object (overlap_seg);
-            oi++;
-          }
-          else
-          {
-            X_monotone_curve_2  overlap_seg (cv1.line(), p_r, p_l);
-            *oi = make_object (overlap_seg);
-            oi++;
-          }
-        }
-        else
-        {
-          // cv1 and cv2 have opposite directions, the overlap segment
-          // will be directed from left to right
-          X_monotone_curve_2  overlap_seg (cv1.line(), p_l, p_r);
-          *oi = make_object (overlap_seg);
-          oi++;
-        }
-      }
-      else if (res == EQUAL)
-      {
-        // The two segment have the same supporting line, but they just share
-        // a common endpoint. Thus we have an intersection point, but we leave
-        // the multiplicity of this point undefined.
-        std::pair<Point_2, Multiplicity>   ip_mult (p_r, 0);
-        *oi = make_object (ip_mult);
-        oi++;
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return Intersect_2();
-  }
-
-  class Are_mergeable_2 {
-  protected:
-    typedef Arr_segment_traits_2<Kernel>        Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_segment_traits_2<Kernel>;
-
-  public:
-    /*!
-     * Check whether it is possible to merge two given x-monotone curves.
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \return (true) if the two curves are mergeable, that is, if they are
-     *         supported by the same line; (false) otherwise.
-     * \pre cv1 and cv2 share a common endpoint.
-     */
-    bool operator() (const X_monotone_curve_2& cv1,
-                     const X_monotone_curve_2& cv2) const
-    {
-      if (!m_traits->equal_2_object()(cv1.right(), cv2.left()) &&
-          !m_traits->equal_2_object()(cv2.right(), cv1.left()))
-        return false;
-
-      // Check whether the two curves have the same supporting line.
-      const Kernel* kernel = m_traits;
-      typename Kernel::Equal_2 equal = kernel->equal_2_object();
-      return (equal(cv1.line(), cv2.line()) ||
-              equal(cv1.line(),
-                    kernel->construct_opposite_line_2_object()(cv2.line())));
-    }
-  };
-
-  /*! Get an Are_mergeable_2 functor object. */
-  Are_mergeable_2 are_mergeable_2_object() const
-  { return Are_mergeable_2(this); }
-
-  /*! \class Merge_2
-   * A functor that merges two x-monotone arcs into one.
-   */
-  class Merge_2 {
-  protected:
-    typedef Arr_segment_traits_2<Kernel>        Traits;
-
-    /*! The traits (in case it has state) */
-    const Traits* m_traits;
-
-    /*! Constructor
-     * \param traits the traits (in case it has state)
-     */
-    Merge_2(const Traits* traits) : m_traits(traits) {}
-
-    friend class Arr_segment_traits_2<Kernel>;
-
-  public:
-    /*!
-     * Merge two given x-monotone curves into a single curve (segment).
-     * \param cv1 The first curve.
-     * \param cv2 The second curve.
-     * \param c Output: The merged curve.
-     * \pre The two curves are mergeable.
-     */
-    void operator()(const X_monotone_curve_2& cv1,
-                    const X_monotone_curve_2& cv2,
-                    X_monotone_curve_2& c) const
-    {
-      CGAL_precondition(m_traits->are_mergeable_2_object()(cv1, cv2));
-
-      Equal_2 equal = m_traits->equal_2_object();
-
-      // Check which curve extends to the right of the other.
-      if (equal(cv1.right(), cv2.left())) {
-        // cv2 extends cv1 to the right.
-        c = cv1;
-        c.set_right(cv2.right());
-      }
-      else {
-        CGAL_precondition(equal(cv2.right(), cv1.left()));
-
-        // cv1 extends cv2 to the right.
-        c = cv2;
-        c.set_right(cv1.right());
-      }
-    }
-  };
-
-  /*! Get a Merge_2 functor object. */
-  Merge_2 merge_2_object () const { return Merge_2(this); }
-  //@}
-
-  /// \name Functor definitions for the landmarks point-location strategy.
-  //@{
-  typedef double                          Approximate_number_type;
-
-  class Approximate_2
-  {
-  public:
-
-    /*!
-     * Return an approximation of a point coordinate.
-     * \param p The exact point.
-     * \param i The coordinate index (either 0 or 1).
-     * \pre i is either 0 or 1.
-     * \return An approximation of p's x-coordinate (if i == 0), or an
-     *         approximation of p's y-coordinate (if i == 1).
-     */
-    Approximate_number_type operator() (const Point_2& p,
-                                        int i) const
-    {
-      CGAL_precondition (i == 0 || i == 1);
-      return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
-    }
-  };
-
-  /*! Get an Approximate_2 functor object. */
-  Approximate_2 approximate_2_object () const
-  {
-    return Approximate_2();
-  }
-
-  class Construct_x_monotone_curve_2
-  {
-  public:
-
-    /*!
-     * Return an x-monotone curve connecting the two given endpoints.
-     * \param p The first point.
-     * \param q The second point.
-     * \pre p and q must not be the same.
-     * \return A segment connecting p and q.
-     */
-    X_monotone_curve_2 operator() (const Point_2& p,
-                                   const Point_2& q) const
-    {
-      return (X_monotone_curve_2 (p, q));
-    }
-  };
-
-  /*! Get a Construct_x_monotone_curve_2 functor object. */
-  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
-  {
-    return Construct_x_monotone_curve_2();
-  }
-  //@}
-
-
-  /// \name Functor definitions for the Boolean set-operation traits.
-  //@{
-
-  class Compare_endpoints_xy_2
-  {
-  public:
-
-    /*!
-     * Compare the endpoints of an $x$-monotone curve lexicographically.
-     * (assuming the curve has a designated source and target points).
-     * \param cv The curve.
-     * \return SMALLER if the curve is directed right;
-     *         LARGER if the curve is directed left.
-     */
-    Comparison_result operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.is_directed_right()) ? (SMALLER) : (LARGER);
-    }
-  };
-
-  /*! Get a Compare_endpoints_xy_2 functor object. */
-  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
-  {
-    return Compare_endpoints_xy_2();
-  }
-
-  class Construct_opposite_2
-  {
-  public:
-
-    /*!
-     * Construct an opposite x-monotone (with swapped source and target).
-     * \param cv The curve.
-     * \return The opposite curve.
-     */
-    X_monotone_curve_2 operator() (const X_monotone_curve_2& cv) const
-    {
-      return (cv.flip());
-    }
-  };
-
-  /*! Get a Construct_opposite_2 functor object. */
-  Construct_opposite_2 construct_opposite_2_object() const
-  {
-    return Construct_opposite_2();
-  }
-  //@}
-};
-
-/*!
- * \class A representation of a segment, as used by the Arr_segment_traits_2
- * traits-class.
- */
-template <class Kernel_>
-class Arr_segment_2 :
-    public Arr_segment_traits_2<Kernel_>::_Segment_cached_2
-{
-  typedef Kernel_                                                  Kernel;
-  typedef typename Arr_segment_traits_2<Kernel>::_Segment_cached_2 Base;
-  typedef typename Kernel::Segment_2                               Segment_2;
-  typedef typename Kernel::Point_2                                 Point_2;
-  typedef typename Kernel::Line_2                                  Line_2;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Arr_segment_2 () :
-    Base()
-  {}
-
-  /*!
-   * Constructor from a "kernel" segment.
-   * \param seg The segment.
-   * \pre The segment is not degenerate.
-   */
-  Arr_segment_2 (const Segment_2& seg) :
-    Base(seg)
-  {}
-
-  /*!
-   * Construct a segment from two end-points.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre The two points are not the same.
-   */
-  Arr_segment_2 (const Point_2& source, const Point_2& target) :
-    Base(source,target)
-  {}
-
-  /*!
-   * Construct a segment from a line and two end-points.
-   * \param line The supporting line.
-   * \param source The source point.
-   * \param target The target point.
-   * \pre Both source and target must be on the supporting line.
-   * \pre The two points are not the same.
-   */
-  Arr_segment_2 (const Line_2& line,
-                 const Point_2& source, const Point_2& target) :
-    Base(line,source,target)
-  {}
-
-  /*!
-   * Cast to a segment.
-   */
-  operator Segment_2 () const
-  {
-    Kernel     kernel;
-    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
-    return (seg);
-  }
-
-  /*!
-   * Create a bounding box for the segment.
-   */
-  Bbox_2 bbox() const
-  {
-    Kernel     kernel;
-    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
-    return (kernel.construct_bbox_2_object() (seg));
-  }
-
-  /*!
-   * Get the segment source.
-   */
-  const Point_2& source() const
-  {
-    return (this->ps);
-  }
-
-  /*!
-   * Get the segment target.
-   */
-  const Point_2& target() const
-  {
-    return (this->pt);
-  }
-
-  /*! Flip the segment (swap its source and target). */
-  Arr_segment_2 flip () const
-  {
-    Arr_segment_2   opp;
-    opp.l = this->l;
-    opp.ps = this->pt;
-    opp.pt = this->ps;
-    opp.is_pt_max = !(this->is_pt_max);
-    opp.is_vert = this->is_vert;
-    opp.is_degen = this->is_degen;
-
-    return (opp);
-  }
-};
-
-/*!
- * Exporter for the segment class used by the traits-class.
- */
-template <class Kernel, class OutputStream>
-OutputStream& operator<< (OutputStream& os, const Arr_segment_2<Kernel>& seg)
-{
-  os << static_cast<typename Kernel::Segment_2>(seg);
-  return (os);
-}
-
-/*!
- * Importer for the segment class used by the traits-class.
- */
-template <class Kernel, class InputStream>
-InputStream& operator>> (InputStream& is, Arr_segment_2<Kernel>& seg)
-{
-  typename Kernel::Segment_2   kernel_seg;
-  is >> kernel_seg;
-  seg = kernel_seg;
-  return (is);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
deleted file mode 100644
index 49b11d8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
+++ /dev/null
@@ -1,878 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Efi Fogel         <efif at post.tau.ac.il>
-//                 Ron Wein          <wein at post.tau.ac.il>
-
-#ifndef CGAL_ARR_SPHERICAL_TOPOLOGY_TRAITS_2_IMPL_H
-#define CGAL_ARR_SPHERICAL_TOPOLOGY_TRAITS_2_IMPL_H
-
-/*! \file
- * Member-function definitions for the
- * Arr_spherical_topology_traits_2<GeomTraits> class.
- */
-
-namespace CGAL {
-
-/*! \brief constructs default */
-template <typename GeomTraits, typename Dcel>
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-Arr_spherical_topology_traits_2() :
-  m_spherical_face(NULL),
-  m_north_pole(NULL),
-  m_south_pole(NULL),
-  m_own_geom_traits(true)
-{
-  m_geom_traits = new Traits_adaptor_2;
-  m_boundary_vertices = Vertex_map(Vertex_key_comparer(m_geom_traits));
-}
-
-/*! \brief constructs from a geometry-traits object. */
-template <typename GeomTraits, typename Dcel>
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-Arr_spherical_topology_traits_2(const Geometry_traits_2* traits) :
-  m_spherical_face(NULL),
-  m_north_pole(NULL),
-  m_south_pole(NULL),
-  m_own_geom_traits(false)
-{
-  m_geom_traits = static_cast<const Traits_adaptor_2*>(traits);
-  m_boundary_vertices = Vertex_map(Vertex_key_comparer(m_geom_traits));
-}
-
-/*! \brief destructs */
-template <typename GeomTraits, typename Dcel>
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-~Arr_spherical_topology_traits_2()
-{
-  // Clear the DCEL.
-  m_dcel.delete_all();
-
-  if (m_own_geom_traits && (m_geom_traits != NULL)) {
-    delete m_geom_traits;
-    m_geom_traits = NULL;
-  }
-}
-
-/*! \brief assigns the contents of another topology-traits class */
-template <typename GeomTraits, typename Dcel>
-void Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-assign(const Self& other)
-{
-  // Clear the current DCEL and duplicate the other DCEL.
-  m_dcel.delete_all();
-  m_dcel.assign(other.m_dcel);
-
-  // Take care of the traits object.
-  if (m_own_geom_traits && m_geom_traits != NULL) {
-    delete m_geom_traits;
-    m_geom_traits = NULL;
-  }
-
-  if (other.m_own_geom_traits) {
-    m_geom_traits = new Traits_adaptor_2;
-    m_own_geom_traits = true;
-  }
-  else {
-    m_geom_traits = other.m_geom_traits;
-    m_own_geom_traits = false;
-  }
-
-  // Update the rest of the properties.
-  dcel_updated();
-}
-
-/*! \brief initializes an empty DCEL structure. */
-template <typename GeomTraits_, typename Dcel_>
-void Arr_spherical_topology_traits_2<GeomTraits_, Dcel_>::dcel_updated()
-{
-  typedef Dcel_                                         Dcel;
-
-  // Go over the DCEL vertices and locate the south and north pole (if any)
-  // and any other vertex on the line of discontinuity.
-
-  m_north_pole = NULL;
-  m_south_pole = NULL;
-  m_boundary_vertices.clear();
-
-  typename Dcel::Vertex_iterator vit = this->m_dcel.vertices_begin();
-  for (; vit != this->m_dcel.vertices_end(); ++vit) {
-    Arr_parameter_space bx = vit->parameter_space_in_x();
-    Arr_parameter_space by = vit->parameter_space_in_y();
-
-    if (by == ARR_BOTTOM_BOUNDARY) m_south_pole = &(*vit);
-    else if (by == ARR_TOP_BOUNDARY) m_north_pole = &(*vit);
-    else if (bx != ARR_INTERIOR) {
-      const Point_2& key = vit->point();
-      m_boundary_vertices.insert(Vertex_value(key, &(*vit)));
-    }
-  }
-
-  // Go over the DCEL faces and locate the spherical face, which is the only
-  // face with no outer CCB.
-
-  m_spherical_face = NULL;
-  typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
-  for (; fit != this->m_dcel.faces_end(); ++fit) {
-    if (fit->number_of_outer_ccbs() == 0) {
-      CGAL_assertion(m_spherical_face == NULL);
-
-      m_spherical_face = &(*fit);
-      break;
-    }
-  }
-  CGAL_assertion(m_spherical_face != NULL);
-}
-
-/*! \brief initializes an empty DCEL structure. */
-template <typename GeomTraits, typename Dcel>
-void Arr_spherical_topology_traits_2<GeomTraits, Dcel>::init_dcel()
-{
-  // std::cout << "init_dcel()" << std::endl;
-  // Clear the current DCEL.
-  m_dcel.delete_all();
-  m_boundary_vertices.clear();
-
-  // Create the face.
-  m_spherical_face = this->m_dcel.new_face();
-  m_spherical_face->set_unbounded(false);
-  m_spherical_face->set_fictitious(false);
-
-  m_north_pole = NULL;
-  m_south_pole = NULL;
-}
-
-/*! \brief determines whether a point lies in the interior of a given face. */
-template <typename GeomTraits, typename Dcel>
-bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
-{
-  // std::cout << "is_in_face()" << std::endl;
-  CGAL_precondition((v == NULL) || !v->has_null_point());
-  CGAL_precondition((v == NULL) ||
-                    m_geom_traits->equal_2_object()(p, v->point()));
-
-  /* There is always one face that contains everything else. It has no
-   * outer CCB's. When a new face is constructed, we make sure that the
-   * face that contains everything also contains the north pole. (In the
-   * degenerate case, where a vertex coincides with the north pole, the face
-   * that contains everything is incident to the north pole.)
-   * If the face has no outer ccb's, it contains everything:
-   */
-#if 0
-  std::cout << "p: " << p
-            << ", f->number_of_outer_ccbs(): " << f->number_of_outer_ccbs()
-            << std::endl;
-#endif
-  if (f->number_of_outer_ccbs() == 0) return true;
-  if (((v != NULL) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
-      (m_geom_traits->parameter_space_in_y_2_object()(p) == ARR_TOP_BOUNDARY))
-    return false;
-
-  /*! \todo a temporary test
-   * if (((v != NULL) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
-   *   (p.is_min_boundary()))
-   * return false;
-   */
-
-  typename Traits_adaptor_2::Parameter_space_in_x_2 ps_x_op =
-    m_geom_traits->parameter_space_in_x_2_object();
-  typename Traits_adaptor_2::Parameter_space_in_y_2 ps_y_op =
-    m_geom_traits->parameter_space_in_y_2_object();
-  typename Traits_adaptor_2::Compare_x_2 cmp_x_op =
-    m_geom_traits->compare_x_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_2 cmp_y_at_x_op =
-    m_geom_traits->compare_y_at_x_2_object();
-  typename Traits_adaptor_2::Compare_x_point_curve_end_2 cmp_x_pt_ce =
-    m_geom_traits->compare_x_point_curve_end_2_object();
-
-  // Process the input point.
-  bool p_is_interior_x = !(m_geom_traits->is_on_y_identification_2_object()(p));
-
-  /* Maintain a counter of the number of x-monotone curves that intersect an
-   * upward vertical ray emanating from p. Handle degenerate cases as
-   * explained below).
-   */
-  unsigned int num_intersections = 0;
-
-  /* Traverse all outer CCBs of the face. For each boundary component go over
-   * all its halfedges, and count those which are above p.
-   */
-  typename Face::Outer_ccb_const_iterator oit;
-  for (oit = f->outer_ccbs_begin(); oit != f->outer_ccbs_end(); ++oit) {
-    const Halfedge* first = *oit;
-    const Halfedge* curr = first;
-
-    /* Compare p to the source vertex of the first halfedge. If p coincides
-     * with this vertex, p is obviously not in the interior of the face.
-     */
-    if (curr->opposite()->vertex() == v) return false;
-
-    /*! We identify 2 main cases:
-     * 1. The vertical ray intersects the boundary at a halfedge. In this
-     * case the x-possition of p is strictly larger than the x-possition of
-     * the current-curve source, and strictly smaller than x-possition of
-     * the current-curve target, or vise versa.
-     * 2. The vertical ray intersects the boundary at a vertex. In this case:
-     * a. the x-possition of p is strictly smaller than the x-position of the
-     * current-curve source, and equal to the x-position of the current-curve
-     * target, and
-     * b. the x-possition of p is equal to the x-position of the next-curve
-     * source (not counting vertical curves in between), and strictly larger
-     * than the x-possition of the next-curve target, or vise verase (that is,
-     * the "smaller" and "larger" interchanged).
-     */
-
-    /* Indicates that a change between the x-position of p and the x-position
-     * of the current-curve source, and the x-position of p and the x-position
-     * of the current-curve target is pending. Used to handle case (2) above.
-     */
-    bool change_pending = false;
-
-    /*! Indicates that the conditions described in (2.b) above are met during
-     * the 1st iteration in the loop, which implies that the last curve must be
-     * checked.
-     */
-    bool last_pending = false;
-
-    Comparison_result res_pending = EQUAL, res_last = EQUAL,
-      res_source = EQUAL, res_target;
-    Arr_parameter_space ps_x_pending = ARR_INTERIOR, ps_x_last = ARR_INTERIOR,
-      ps_x_source, ps_x_target = ARR_INTERIOR,
-      ps_y_source, ps_y_target;
-
-    do {
-      /* Compare p to the target vertex of the current halfedge. If the
-       * vertex v is on the boundary of the component, p is not in the interior
-       * the face.
-       */
-      if (curr->vertex() == v) return false;
-
-      // Ignore vertical curves:
-      bool is_vertical = m_geom_traits->is_vertical_2_object()(curr->curve());
-      if (is_vertical) {
-        /* If this outer ccb chain contains the north pole, and our point
-         * lies horizontaly between the two vertical curves that meet at
-         * the north pole, increase the intersection counter
-         */
-        if (curr->direction() == ARR_LEFT_TO_RIGHT) {
-          Arr_parameter_space ps_y_1 = ps_y_op(curr->curve(), ARR_MAX_END);
-          Arr_parameter_space ps_y_2 = ps_y_op(curr->next()->curve(),
-                                               ARR_MAX_END);
-          if ((ps_y_1 == ARR_TOP_BOUNDARY) && (ps_y_2 == ARR_TOP_BOUNDARY)) {
-            // Compare the x-coordinates:
-            Comparison_result rc1 =
-              cmp_x_pt_ce(p, curr->curve(), ARR_MAX_END);
-            Comparison_result rc2 =
-              cmp_x_pt_ce(p, curr->next()->curve(), ARR_MAX_END);
-            if (rc1 == opposite(rc2)) ++num_intersections;
-          }
-        }
-        curr = curr->next();
-        continue;
-      }
-
-      /* If the current halfedge belongs to an "antenna". Namely, its
-       * incident face is the same as its twin's, skip it to avoid counting
-       * it twice.
-       */
-      const Face* curr_face = (curr->is_on_inner_ccb()) ?
-        curr->inner_ccb()->face() : curr->outer_ccb()->face();
-      const Halfedge* opp_he = curr->opposite();
-      const Face* opp_curr_face = (opp_he->is_on_inner_ccb()) ?
-        opp_he->inner_ccb()->face() : opp_he->outer_ccb()->face();
-
-      if (curr_face == opp_curr_face) {
-        curr = curr->next();
-        continue;
-      }
-
-      Arr_curve_end ind_source, ind_target;
-      if (curr->direction() == ARR_LEFT_TO_RIGHT) {
-        ind_source = ARR_MIN_END;
-        ind_target = ARR_MAX_END;
-      }
-      else {
-        ind_source = ARR_MAX_END;
-        ind_target = ARR_MIN_END;
-      }
-
-      ps_x_source = ps_x_op(curr->curve(), ind_source);
-      ps_x_target = ps_x_op(curr->curve(), ind_target);
-
-      ps_y_source = ps_y_op(curr->curve(), ind_source);
-      ps_y_target = ps_y_op(curr->curve(), ind_target);
-
-      if (!p_is_interior_x) {
-        if (ps_x_source == ps_x_target) {
-          curr = curr->next();
-          continue;
-        }
-
-        if (ps_x_target != ARR_INTERIOR) {
-          change_pending = true;
-          ps_x_pending = (ps_x_target == ARR_LEFT_BOUNDARY) ?
-            ARR_RIGHT_BOUNDARY : ARR_LEFT_BOUNDARY;
-        }
-        if (ps_x_source != ARR_INTERIOR) {
-          if (change_pending) {
-            change_pending = false;
-            if (ps_x_pending == ps_x_source) {
-              Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
-              if (res_y_at_x == EQUAL) return false;
-              if (res_y_at_x == SMALLER) num_intersections++;
-            }
-          } else {
-            // This must be the first curve. Remember to check the last curve
-            ps_x_last = (ps_x_source == ARR_LEFT_BOUNDARY) ?
-              ARR_RIGHT_BOUNDARY : ARR_LEFT_BOUNDARY;
-            last_pending = true;
-          }
-        }
-        curr = curr->next();
-        continue;
-      }
-
-      res_source = (ps_x_source == ARR_LEFT_BOUNDARY) ? LARGER :
-        (ps_x_source == ARR_RIGHT_BOUNDARY) ? SMALLER :
-        (ps_y_source == ARR_INTERIOR) ?
-        cmp_x_op(p, curr->opposite()->vertex()->point()) :
-        cmp_x_pt_ce(p, curr->curve(), ind_source);
-
-      res_target = (ps_x_target == ARR_LEFT_BOUNDARY) ? LARGER :
-        (ps_x_target == ARR_RIGHT_BOUNDARY) ? SMALLER :
-        (ps_y_target == ARR_INTERIOR) ?
-        cmp_x_op(p, curr->vertex()->point()) :
-        cmp_x_pt_ce(p, curr->curve(), ind_target);
-
-      /* If a vertical ray is shot from p upward, the x-monotone curve
-       * associated with curr is hit once.
-       */
-      if (res_source == res_target) {
-        curr = curr->next();
-        continue;
-      }
-
-      if (res_source != EQUAL) {
-        change_pending = true;
-        res_pending = (res_source == SMALLER) ? LARGER : SMALLER;
-      }
-      if (res_target != EQUAL) {
-        if (change_pending) {
-          change_pending = false;
-          if (res_pending == res_target) {
-            Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
-            if (res_y_at_x == EQUAL) return false;
-            if (res_y_at_x == SMALLER) num_intersections++;
-          }
-        } else {
-          // This must be the first curve. Remember to check the last curve
-          res_last = (res_target == SMALLER) ? LARGER : SMALLER;
-          last_pending = true;
-        }
-      }
-
-      /* Proceed to the next halfedge along the component boundary.
-       * Note that the source vertex of this halfedge is the current target.
-       */
-      curr = curr->next();
-    } while (curr != first);
-
-    if (last_pending) {
-      if (!p_is_interior_x) {
-        if (ps_x_last == ps_x_target) {
-          Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
-          if (res_y_at_x == EQUAL) return false;
-          if (res_y_at_x == SMALLER) num_intersections++;
-        }
-        continue;
-      }
-
-      if (res_last == res_source) {
-        Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
-        if (res_y_at_x == EQUAL) return false;
-        if (res_y_at_x == SMALLER) num_intersections++;
-      }
-    }
-  }
-  /* The query point lies inside the connected components if the face does
-   * not contain the north pole, and the vertical ray intersects the
-   * boundaries an odd number of times. As mentioned above, if the face does
-   * contain the north pole, then it contains everything, (and has no outer
-   * CCB's at all).
-   */
-  return (num_intersections& 0x1);
-}
-
-/*! \brief compares the relative y-position of a point and a halfedge */
-template <typename GeomTraits, typename Dcel>
-Comparison_result
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-compare_y_at_x(const Point_2& p, const Halfedge* he) const
-{
-  // std::cout << "compare_y_at_x(Point_2&,Halfedge*)" << std::endl;
-  return m_geom_traits->compare_y_at_x_2_object()(p, he->curve());
-}
-
-/*! \brief determine whether a vertex is associated with a curve end */
-template <typename GeomTraits, typename Dcel>
-bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-are_equal(const Vertex* v,
-          const X_monotone_curve_2& xc, Arr_curve_end ind,
-          Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
-{
-#if 0
-  std::cout << "are_equal"
-            << ", v: " << v->point()
-            << ", xc: " << xc << ", " << ind
-            << std::endl;
-#endif
-  CGAL_precondition(ps_x == ARR_LEFT_BOUNDARY || ps_x == ARR_RIGHT_BOUNDARY ||
-                    ps_y == ARR_BOTTOM_BOUNDARY || ps_y == ARR_TOP_BOUNDARY);
-
-  // If the given boundary conditions do not match those of the given
-  // vertex, v cannot represent the curve end.
-  if (ps_y != v->parameter_space_in_y()) return false;
-
-  if (ps_y != ARR_INTERIOR) return (ps_y == v->parameter_space_in_y());
-
-  if (((ps_x == ARR_INTERIOR) && (v->parameter_space_in_x() != ARR_INTERIOR)) ||
-      ((ps_x != ARR_INTERIOR) && (v->parameter_space_in_x() == ARR_INTERIOR)))
-    return false;
-
-  CGAL_assertion(ps_x != ARR_INTERIOR);
-  /* Both vertices have the same x boundary conditions =>
-   * comapare their y-position.
-   */
-  const Point_2& p1 = v->point();
-  const Point_2& p2 = (ind == ARR_MIN_END) ?
-    m_geom_traits->construct_min_vertex_2_object()(xc) :
-    m_geom_traits->construct_max_vertex_2_object()(xc);
-  return (m_geom_traits->compare_y_on_boundary_2_object()(p1, p2) == EQUAL);
-}
-
-/*! \brief receives a notification on the creation of a new boundary vertex */
-template <typename GeomTraits, typename Dcel>
-void
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-notify_on_boundary_vertex_creation(Vertex* v,
-                                   const X_monotone_curve_2& xc,
-                                   Arr_curve_end ind,
-                                   Arr_parameter_space
-                                     CGAL_assertion_code(ps_x),
-                                   Arr_parameter_space ps_y)
-{
-  // std::cout << "notify_on_boundary_vertex_creation()" << std::endl;
-  if (ps_y == ARR_BOTTOM_BOUNDARY) {
-    m_south_pole = v;
-    return;
-  }
-  if (ps_y == ARR_TOP_BOUNDARY) {
-    m_north_pole = v;
-    return;
-  }
-  CGAL_assertion(ps_x != ARR_INTERIOR);
-  const Point_2& key = (ind == ARR_MIN_END) ?
-    m_geom_traits->construct_min_vertex_2_object()(xc) :
-    m_geom_traits->construct_max_vertex_2_object()(xc);
-  m_boundary_vertices.insert(Vertex_value(key, v));
-}
-
-template <typename GeomTraits, typename Dcel>
-bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-let_me_decide_the_outer_ccb(std::pair< CGAL::Sign, CGAL::Sign> signs1,
-                            std::pair< CGAL::Sign, CGAL::Sign> signs2,
-                            bool& swap_predecessors) const
-{
-  // no perimetric in top-bottom for first loop
-  CGAL_precondition(signs1.second == CGAL::ZERO);
-
-  // no perimetric in top-bottom for second loop
-  CGAL_precondition(signs2.second == CGAL::ZERO);
-
-  // choose prev1 to define outer ccb of new face if it is a non-perimetric loop,
-  // otherwise choose prev2
-  // TODO what if both are non-zero? does it occur?
-  // TODO EBEB check this!!!!
-  swap_predecessors = (signs2.first != CGAL::POSITIVE);
-
-  // but only if the at least one of the loops is perimetric, otherwise return
-  // false to let leftmost-vertex decide which becomes part of the new outer ccb
-  return (signs1.first != CGAL::ZERO) || (signs2.first != CGAL::ZERO);
-}
-
-/*! \brief given a curve end with boundary conditions and a face that contains
- * the interior of the curve, find a place for a boundary vertex that will
- * represent the curve end along the face boundary */
-template <typename GeomTraits, typename Dcel>
-CGAL::Object
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-place_boundary_vertex(Face* /* f */,
-                      const X_monotone_curve_2& xc, Arr_curve_end ind,
-                      Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-{
-  // std::cout << "place_boundary_vertex()" << std::endl;
-  if (ps_y == ARR_BOTTOM_BOUNDARY) {
-    if (m_south_pole == NULL) return Object();
-    return CGAL::make_object(m_south_pole);
-  }
-
-  if (ps_y == ARR_TOP_BOUNDARY) {
-    if (m_north_pole == NULL) return Object();
-    return CGAL::make_object(m_north_pole);
-  }
-
-  CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
-
-  const Point_2& key = (ind == ARR_MIN_END) ?
-    m_geom_traits->construct_min_vertex_2_object()(xc) :
-    m_geom_traits->construct_max_vertex_2_object()(xc);
-  typename Vertex_map::iterator it = m_boundary_vertices.find(key);
-
-  if (it != m_boundary_vertices.end()) {
-    Vertex* v = it->second;
-    return CGAL::make_object(v);
-  }
-
-  // The vertex hasn't been created yet, return a null object:
-  return Object();
-}
-
-/*! \brief locate the predecessor halfedge for the given curve around a given
- * vertex with boundary conditions. */
-template <typename GeomTraits, typename Dcel>
-typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
-Arr_spherical_topology_traits_2<GeomTraits,Dcel>::
-locate_around_boundary_vertex(Vertex* v,
-                              const X_monotone_curve_2& xc,
-                              Arr_curve_end ind,
-                              Arr_parameter_space ps_x,
-                              Arr_parameter_space ps_y) const
-{
-  // std::cout << "locate_around_boundary_vertex()" << std::endl;
-  if (ps_y == ARR_BOTTOM_BOUNDARY) {
-    CGAL_assertion(v == m_south_pole);
-    return (_locate_around_pole(m_south_pole, xc, ind));
-  }
-
-  if (ps_y == ARR_TOP_BOUNDARY) {
-    CGAL_assertion(v == m_north_pole);
-    return (_locate_around_pole(m_north_pole, xc, ind));
-  }
-
-  CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
-
-  return (_locate_around_vertex_on_discontinuity(v, xc, ind));
-}
-
-/*! \brief locates a DCEL feature that contains a given curve end. */
-template <typename GeomTraits, typename Dcel>
-CGAL::Object Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
-                 Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-{
-  // Act according to the boundary conditions.
-  if (ps_y == ARR_TOP_BOUNDARY) {
-    // In case the curve end coincides with the north pole, return the vertex
-    // representing the north pole, if one exists. Otherwise, return the face
-    // containing this pole (the spherical face).
-    if (m_north_pole != NULL) return CGAL::make_object(m_north_pole);
-    return CGAL::make_object(m_spherical_face);
-  }
-
-  typename Vertex_map::iterator it;
-  Vertex* v = NULL;
-
-  if (ps_y == ARR_BOTTOM_BOUNDARY) {
-    // In case the curve end coincides with the south pole, return the vertex
-    // representing the south pole, if one exists. Otherwise, search for the
-    // face containing this pole.
-    if (m_south_pole != NULL) return CGAL::make_object(m_south_pole);
-    it = m_boundary_vertices.begin();
-  }
-  else {
-    CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
-
-    // Check if the given curve end is incident to a vertex on the line of
-    // discontinuity. If so, return this vertex. Otherwise, locate the first
-    // vertex above it.
-    const Point_2& key = (ind == ARR_MIN_END) ?
-      m_geom_traits->construct_min_vertex_2_object()(xc) :
-      m_geom_traits->construct_max_vertex_2_object()(xc);
-    it = m_boundary_vertices.find(key);
-    if (it != m_boundary_vertices.end()) {
-      v = it->second;
-      return CGAL::make_object(v);
-    }
-
-    it = m_boundary_vertices.lower_bound(key);
-  }
-
-  // At this point, the iterator it points to a vertex on the line of
-  // discontinuity that is strictly above the curve end. If there is none,
-  // we know the curve end is contained in the spherical face. Otherwise,
-  // we return the face that lies below the vertex v.
-  if (it == m_boundary_vertices.end())
-    return CGAL::make_object(m_spherical_face);
-
-  v = it->second;
-  return CGAL::make_object(_face_below_vertex_on_discontinuity(v));
-}
-
-/*! \brief determines whether a given boundary vertex is redundant */
-template <typename GeomTraits, typename Dcel>
-bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-is_redundant(const Vertex* v) const
-{ return (v->halfedge() == NULL); }
-
-/* \brief erases a given redundant vertex */
-template <typename GeomTraits, typename Dcel>
-typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-erase_redundant_vertex(Vertex* v)
-{
-  const Arr_parameter_space ps_y = v->parameter_space_in_y();
-  if (ps_y == ARR_BOTTOM_BOUNDARY) {
-    m_south_pole = NULL;
-    return NULL;
-  }
-  if (ps_y == ARR_TOP_BOUNDARY) {
-    m_north_pole = NULL;
-    return NULL;
-  }
-  CGAL_assertion_code(Arr_parameter_space ps_x = v->parameter_space_in_x());
-  CGAL_assertion(ps_x != ARR_INTERIOR);
-  m_boundary_vertices.erase(v->point());
-  return NULL;
-}
-
-/*! \brief obtains the curve associated with a boundary vertex */
-template <typename GeomTraits, typename Dcel>
-const typename
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::X_monotone_curve_2&
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-_curve(const Vertex* v, Arr_curve_end& ind) const
-{
-  // std::cout << "curve()" << std::endl;
-  const Halfedge* he = v->halfedge();
-  ind = (he->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-  return he->curve();
-}
-
-/*! \brief returns the halfedge, the target vertex of which is given, that is
- * the predecessor of a halfedge, the curve of which is given, that is about
- * to be inserted into the dcel.
- */
-template <typename GeomTraits, typename Dcel>
-typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-_locate_around_vertex_on_discontinuity(Vertex* v,
-                                       const X_monotone_curve_2& xc,
-                                       Arr_curve_end ind) const
-{
-  // If the vertex is isolated, there is no predecssor halfedge.
-  if (v->is_isolated()) return NULL;
-
-  // Get the first incident halfedge around v and the next halfedge.
-  Halfedge* first = v->halfedge();
-  Halfedge* curr = first;
-  CGAL_assertion(curr != NULL);
-  Halfedge* next = curr->next()->opposite();
-
-  // If is only one halfedge incident to v, return this halfedge as xc's
-  // predecessor:
-  if (curr == next) return curr;
-
-  // Otherwise, we traverse the halfedges around v until we find the pair
-  // of adjacent halfedges between which we should insert xc.
-  typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
-    m_geom_traits->is_between_cw_2_object();
-  bool eq_curr, eq_next;
-
-  while (!is_between_cw(xc, (ind == ARR_MIN_END), curr->curve(),
-                        (curr->direction() == ARR_RIGHT_TO_LEFT), next->curve(),
-                        (next->direction() == ARR_RIGHT_TO_LEFT), v->point(),
-                        eq_curr, eq_next))
-  {
-    // The curve must not be equal to one of the curves already incident to v.
-    CGAL_assertion(!eq_curr && !eq_next);
-
-    // Move to the next pair of incident halfedges.
-    curr = next;
-    next = curr->next()->opposite();
-
-    // Make sure we have not completed a full traversal around v without
-    // locating a place for the new curve xc.
-    CGAL_assertion(curr != first);
-  }
-
-  // Return the halfedge we have located.
-  return curr;
-}
-
-/*! \brief returns the halfedge, the target vertex of which is a given pole,
- * that is the predecessor of a halfedge, the curve of which is given, that
- * is about to be inserted into the dcel.
- */
-template <typename GeomTraits, typename Dcel>
-typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-_locate_around_pole(Vertex* v,
-                    const X_monotone_curve_2& xc, Arr_curve_end ind) const
-{
-  CGAL_assertion((v == m_south_pole) || (v == m_north_pole));
-
-  // std::cout << "locate_around_pole() " << ind << std::endl;
-  // If the vertex is isolated, return a null halfedge:
-  if (v->is_isolated()) return NULL;
-
-  // Get the first incident halfedge around v and the next halfedge:
-  Halfedge* first = v->halfedge();
-  Halfedge* curr = first;
-  CGAL_assertion(curr != NULL);
-  Halfedge* next = curr->next()->opposite();
-
-  // If there is only one halfedge, it is the predecessor, return it:
-  if (curr == next) return curr;
-
-  // If we compare a curve and its successor around the south (resp. north)
-  // pole, the result LARGER (resp. SMALLER) indicates that the line of
-  // discontinuity is located in between the two curves.
-  const Comparison_result cross_res = (v == m_south_pole) ? LARGER : SMALLER;
-
-  // Traverse all other halfedges, and compare their x-positions next to the
-  // pole with the query curve xc.
-  typename Traits_adaptor_2::Compare_x_curve_ends_2 cmp_x_curve_ends =
-    m_geom_traits->compare_x_curve_ends_2_object();
-  Arr_curve_end curr_end, next_end;
-  Comparison_result curr_res, next_res;
-  Comparison_result curr_next_res;
-
-  curr_end =
-    (curr->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END;
-  curr_res = cmp_x_curve_ends(xc, ind, curr->curve(), curr_end);
-  do {
-    next_end =
-      (next->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END;
-    next_res = cmp_x_curve_ends(xc, ind, next->curve(), next_end);
-    curr_next_res =
-      cmp_x_curve_ends(curr->curve(), curr_end, next->curve(), next_end);
-    if (curr_next_res == cross_res) {
-      // The line of discontinuity must lie between curr and next, so the
-      // comparison result of xc with the two curves should be equal:
-      if (curr_res == next_res) return curr;
-    }
-    else {
-      // The line of discontinuity does not lie between curr and next, so the
-      // comparison results must be different if xc lies in between.
-      if (curr_res != next_res) return curr;
-    }
-
-    // Move to the next halfedge around the pole.
-    curr = next;
-    curr_end = next_end;
-    curr_res = next_res;
-    next = curr->next()->opposite();
-  } while (curr != first);
-
-  // We sould never reach here:
-  CGAL_error();
-  return NULL;
-}
-
-/*! \brief Return the face that lies below the given vertex, which lies
- * on the line of discontinuity.
- */
-template <typename GeomTraits, typename Dcel>
-typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Face*
-Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
-_face_below_vertex_on_discontinuity(Vertex* v) const
-{
-  // If the vertex is isolated, just return the face that contains it.
-  if (v->is_isolated()) return (v->isolated_vertex()->face());
-
-  // Get the first incident halfedge around v and the next halfedge.
-  Halfedge* first = v->halfedge();
-  Halfedge* curr = first;
-  CGAL_assertion(curr != NULL);
-  Halfedge* next = curr->next()->opposite();
-
-  // If there is only one halfedge incident to v, return its incident face.
-  if (curr == next)
-    return ((curr->is_on_inner_ccb()) ?
-            curr->inner_ccb()->face() : curr->outer_ccb()->face());
-
-  // Otherwise, we traverse the halfedges around v and locate the first
-  // halfedge we encounter if we go from "6 o'clock" clockwise.
-  // First locate the lower left and the top right halfedges around v.
-  typename Traits_adaptor_2::Compare_y_at_x_right_2 cmp_y_at_x_op_right =
-    m_geom_traits->compare_y_at_x_right_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_left_2  cmp_y_at_x_op_left =
-    m_geom_traits->compare_y_at_x_left_2_object();
-
-  Halfedge* lowest_left = NULL;
-  Halfedge* top_right = NULL;
-
-  do {
-    // Check whether the current halfedge is defined to the left or to the
-    // right of the given vertex.
-    if (curr->direction() == ARR_LEFT_TO_RIGHT) {
-      // The curve associated with the current halfedge is defined to the left
-      // of v.
-      if (lowest_left == NULL ||
-          cmp_y_at_x_op_left(curr->curve(), lowest_left->curve(), v->point())
-          == SMALLER)
-      {
-        lowest_left = curr;
-      }
-    }
-    else {
-      // The curve associated with the current halfedge is defined to the right
-      // of v.
-      if (top_right == NULL ||
-          cmp_y_at_x_op_right(curr->curve(), top_right->curve(), v->point()) ==
-          LARGER)
-      {
-        top_right = curr;
-      }
-    }
-
-    // Move to the next halfedge around the vertex.
-    curr = curr->next()->opposite();
-  } while (curr != first);
-
-  // The first halfedge we encounter is the lowest to the left, but if there
-  // is no edge to the left, we first encounter the topmost halfedge to the
-  // right. Note that as the halfedge we located has v as its target, we now
-  // have to return its twin.
-  first =
-    (lowest_left != NULL) ? lowest_left->opposite() : top_right->opposite();
-  // std::cout << "first: " << first->opposite()->vertex()->point() << " => "
-  //           << first->vertex()->point() << std::endl;
-
-  // Face* f = (first->is_on_inner_ccb()) ?
-  //   first->inner_ccb()->face() : first->outer_ccb()->face();
-  // std::cout << "outer: " << f->number_of_outer_ccbs() << std::endl;
-  // std::cout << "inner: " << f->number_of_inner_ccbs() << std::endl;
-  // Return the incident face.
-  return ((first->is_on_inner_ccb()) ?
-          first->inner_ccb()->face() : first->outer_ccb()->face());
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_unb_planar_topology_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arr_unb_planar_topology_traits_2.h
deleted file mode 100644
index 7432611..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arr_unb_planar_topology_traits_2.h
+++ /dev/null
@@ -1,637 +0,0 @@
-// Copyright (c) 2006,2007,2008,2009,2010,2011,2012,2013 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-//                 Efi Fogel  <efif at post.tau.ac.il>
-
-#ifndef CGAL_ARR_UNB_PLANAR_TOPOLOGY_TRAITS_2_H
-#define CGAL_ARR_UNB_PLANAR_TOPOLOGY_TRAITS_2_H
-
-/*! \file
- * Definition of the Arr_unb_planar_topology_traits_2<GeomTraits> class.
- */
-
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h>
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h>
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h>
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h>
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h>
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h>
-#include <CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h>
-
-namespace CGAL {
-
-// Forward declaration:
-template <typename GeomTraits_, typename TopTraits_>
-class Arrangement_on_surface_2;
-
-/*! \class Arr_unb_planar_topology_traits_2
- * A topology-traits class that encapsulates the embedding of 2D arrangements
- * of unbounded curves on the plane.
- */
-template <typename GeomTraits_,
-          typename Dcel_ = Arr_default_dcel<GeomTraits_> >
-class Arr_unb_planar_topology_traits_2 :
-  public Arr_planar_topology_traits_base_2<GeomTraits_, Dcel_>
-{
-private:
-  typedef Arr_planar_topology_traits_base_2<GeomTraits_, Dcel_>
-                                                          Base;
-
-public:
-  ///! \name The geometry-traits types.
-  //@{
-  typedef GeomTraits_                                     Geometry_traits_2;
-  typedef typename Base::Point_2                          Point_2;
-  typedef typename Base::X_monotone_curve_2               X_monotone_curve_2;
-  //@}
-
-  ///! \name The DCEL types.
-  //@{
-  typedef Dcel_                                           Dcel;
-  typedef typename Base::Size                             Size;
-  typedef typename Base::Vertex                           Vertex;
-  typedef typename Base::Halfedge                         Halfedge;
-  typedef typename Base::Face                             Face;
-  typedef typename Base::Outer_ccb                        Outer_ccb;
-  typedef typename Base::Inner_ccb                        Inner_ccb;
-  typedef typename Base::Isolated_vertex                  Isolated_vertex;
-  //@}
-
-  //! \name Arrangement types
-  //!@{
-  typedef Arr_unb_planar_topology_traits_2<Geometry_traits_2, Dcel> Self;
-  typedef Arr_traits_basic_adaptor_2<Geometry_traits_2>   Traits_adaptor_2;
-  //!@}
-
-  ///! \name The side tags
-  //@{
-  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
-  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
-  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
-  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
-
-  BOOST_MPL_ASSERT(
-      (boost::mpl::or_<
-       boost::is_same< Left_side_category, Arr_oblivious_side_tag >,
-       boost::is_same< Left_side_category, Arr_open_side_tag > >
-      )
-  );
-  BOOST_MPL_ASSERT(
-      (boost::mpl::or_<
-       boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >,
-       boost::is_same< Bottom_side_category, Arr_open_side_tag > >
-      )
-  );
-  BOOST_MPL_ASSERT(
-      (boost::mpl::or_<
-       boost::is_same< Top_side_category, Arr_oblivious_side_tag >,
-       boost::is_same< Top_side_category, Arr_open_side_tag > >
-      )
-  );
-  BOOST_MPL_ASSERT(
-      (boost::mpl::or_<
-       boost::is_same< Right_side_category, Arr_oblivious_side_tag >,
-       boost::is_same< Right_side_category, Arr_open_side_tag > >
-      )
-  );
-  //@}
-
-  /*! \struct
-   * An auxiliary structure for rebinding the topology traits with a new
-   * geometry-traits class and a new DCEL class.
-   */
-  template <typename T, typename D>
-  struct rebind {
-    typedef Arr_unb_planar_topology_traits_2<T, D> other;
-  };
-
-protected:
-  // Data members:
-  Vertex* v_bl;         // A fictitious vertex at (-oo,-oo).
-  Vertex* v_tl;         // A fictitious vertex at (-oo,+oo).
-  Vertex* v_br;         // A fictitious vertex at (-oo,+oo).
-  Vertex* v_tr;         // A fictitious vertex at (+oo,+oo).
-  Size n_inf_verts;     // Number of vertices at infinity.
-  Face* fict_face;      // The fictitious DCEL face.
-
-  // Copy constructor and assignment operator - not supported.
-  Arr_unb_planar_topology_traits_2(const Self&);
-  Self& operator=(const Self&);
-
-public:
-  ///! \name Construction methods.
-  //@{
-
-  /*! Default constructor. */
-  Arr_unb_planar_topology_traits_2();
-
-  /*! Constructor with a geometry-traits class. */
-  Arr_unb_planar_topology_traits_2(const Geometry_traits_2* tr);
-
-  /*! Assign the contents of another topology-traits class. */
-  void assign(const Self& other);
-  //@}
-
-  ///! \name Accessing the DCEL and constructing iterators.
-  //@{
-
-  /*! Determine whether the DCEL reprsenets an empty structure. */
-  bool is_empty_dcel() const
-  {
-    // An empty arrangement contains just two four vertices at infinity
-    // and eight fictitious halfedges connecting them.
-    return (this->m_dcel.size_of_vertices() == 4 &&
-            this->m_dcel.size_of_halfedges() == 8);
-  }
-
-  /*! Check if the given vertex is concrete (associated with a point). */
-  bool is_concrete_vertex(const Vertex* v) const
-  {
-    return (! v->has_null_point());
-  }
-
-  /*! Get the number of concrete vertices. */
-  Size number_of_concrete_vertices() const
-  {
-    // All vertices not lying at infinity are concrete.
-    return (this->m_dcel.size_of_vertices() - n_inf_verts);
-  }
-
-  /*! Check if the given vertex is valid (not a fictitious one). */
-  bool is_valid_vertex(const Vertex* v) const
-  {
-    return (! v->has_null_point() ||
-            (v != v_bl && v != v_tl && v != v_br && v != v_tr));
-  }
-
-  /*! Get the number of valid vertices. */
-  Size number_of_valid_vertices() const
-  {
-    // All vertices, except the four fictitious one, are valid.
-    return (this->m_dcel.size_of_vertices() - 4);
-  }
-
-  /*! Check if the given halfedge is valid (not a fictitious one). */
-  bool is_valid_halfedge(const Halfedge* he) const
-  {
-    return (! he->has_null_curve());
-  }
-
-  /*! Get the number of valid halfedges. */
-  Size number_of_valid_halfedges() const
-  {
-    // Note that we do not count fictitious halfedges (each vertex at infinity
-    // induces two fictitious halfedges).
-    return (this->m_dcel.size_of_halfedges() - 2*n_inf_verts);
-  }
-
-  /*! Check if the given face is valid (not a fictitious one). */
-  bool is_valid_face (const Face* f) const
-  {
-    return (! f->is_fictitious());
-  }
-
-  /*! Get the number of valid faces. */
-  Size number_of_valid_faces() const
-  {
-    // We do not count the ficitious DCEL face.
-    return (this->m_dcel.size_of_faces() - 1);
-  }
-  //@}
-
-private:
-  /// \name Auxiliary type definitions.
-  //@{
-  typedef Arrangement_on_surface_2<Geometry_traits_2, Self>    Arr;
-
-  // Type definition for the constuction sweep-line visitor.
-  typedef Arr_construction_subcurve<Geometry_traits_2>         CSubcurve;
-  typedef Arr_construction_event<Geometry_traits_2, CSubcurve, Arr>
-                                                               CEvent;
-  typedef Arr_unb_planar_construction_helper<Geometry_traits_2,
-                                             Arr,
-                                             CEvent,
-                                             CSubcurve>        CHelper;
-
-  // Type definition for the basic insertion sweep-line visitor.
-  typedef Arr_basic_insertion_traits_2<Geometry_traits_2, Arr> BInsTraits;
-  typedef Arr_construction_subcurve<BInsTraits>                BISubcurve;
-  typedef Arr_construction_event<BInsTraits, BISubcurve, Arr>
-                                                               BIEvent;
-  typedef Arr_unb_planar_insertion_helper<BInsTraits, Arr, BIEvent, BISubcurve>
-                                                               BIHelper;
-
-  // Type definition for the insertion sweep-line visitor.
-  typedef Arr_insertion_traits_2<Geometry_traits_2, Arr>       InsTraits;
-  typedef Arr_construction_subcurve<InsTraits>                 ISubcurve;
-  typedef Arr_construction_event<InsTraits, ISubcurve, Arr>
-                                                               IEvent;
-  typedef Arr_unb_planar_insertion_helper<InsTraits, Arr, IEvent, ISubcurve>
-                                                               IHelper;
-
-  // Type definition for the batched point-location sweep-line visitor.
-  typedef Arr_batched_point_location_traits_2<Arr>             BplTraits;
-  typedef Arr_unb_planar_batched_pl_helper<BplTraits, Arr>     BplHelper;
-
-  // Type definition for the vertical decomposition sweep-line visitor.
-  typedef Arr_batched_point_location_traits_2<Arr>             VdTraits;
-  typedef Arr_unb_planar_vert_decomp_helper<VdTraits, Arr>     VdHelper;
-
-  // Type definition for the overlay sweep-line visitor.
-  template <class ExGeomTraits_, class ArrangementA_, class ArrangementB_>
-  struct _Overlay_helper : public Arr_unb_planar_overlay_helper
-      <ExGeomTraits_, ArrangementA_, ArrangementB_, Arr,
-       Arr_construction_event<ExGeomTraits_,
-                              Arr_overlay_subcurve<ExGeomTraits_>,
-                              Arr>,
-       Arr_overlay_subcurve<ExGeomTraits_> >
-  {
-    typedef Arr_unb_planar_overlay_helper
-              <ExGeomTraits_, ArrangementA_, ArrangementB_, Arr,
-               Arr_construction_event<ExGeomTraits_,
-                                      Arr_overlay_subcurve<ExGeomTraits_>,
-                                      Arr>,
-               Arr_overlay_subcurve<ExGeomTraits_> >     Base;
-
-    typedef typename Base::Traits_2                      Traits_2;
-    typedef typename Base::Arrangement_red_2             Arrangement_red_2;
-    typedef typename Base::Arrangement_blue_2            Arrangement_blue_2;
-    typedef typename Base::Arrangement_2                 Arrangement_2;
-    typedef typename Base::Event                         Event;
-    typedef typename Base::Subcurve                      Subcurve;
-    typedef typename Base::Construction_helper           Construction_helper;
-
-    _Overlay_helper(const ArrangementA_* arrA, const ArrangementB_* arrB) :
-      Base(arrA, arrB) {}
-  };
-  //@}
-
-public:
-  ///! \name Visitor types.
-  //@{
-
-  typedef Arr_construction_sl_visitor<CHelper>
-    Sweep_line_construction_visitor;
-
-  typedef Arr_insertion_sl_visitor<IHelper>
-    Sweep_line_insertion_visitor;
-
-  typedef Sweep_line_construction_visitor
-    Sweep_line_non_intersecting_construction_visitor;
-
-  typedef Arr_basic_insertion_sl_visitor<BIHelper>
-    Sweep_line_non_intersecting_insertion_visitor;
-
-  template <class OutputIterator_>
-  struct Sweep_line_batched_point_location_visitor :
-    public Arr_batched_pl_sl_visitor<BplHelper, OutputIterator_>
-  {
-    typedef OutputIterator_                                   Output_iterator;
-
-    typedef Arr_batched_pl_sl_visitor<BplHelper, Output_iterator>   Base;
-    typedef typename Base::Traits_2                                 Traits_2;
-    typedef typename Base::Event                                    Event;
-    typedef typename Base::Subcurve                                 Subcurve;
-
-    Sweep_line_batched_point_location_visitor(const Arr* arr,
-                                              Output_iterator& oi) :
-      Base(arr, oi)
-    {}
-  };
-
-  template <class OutputIterator_>
-  struct Sweep_line_vertical_decomposition_visitor :
-    public Arr_vert_decomp_sl_visitor<VdHelper, OutputIterator_>
-  {
-    typedef OutputIterator_                                   Output_iterator;
-    typedef Arr_vert_decomp_sl_visitor<VdHelper, Output_iterator>
-                                                             Base;
-
-    typedef typename Base::Traits_2                           Traits_2;
-    typedef typename Base::Event                              Event;
-    typedef typename Base::Subcurve                           Subcurve;
-
-    Sweep_line_vertical_decomposition_visitor(const Arr* arr,
-                                              Output_iterator* oi) :
-      Base(arr, oi) {}
-  };
-
-  template <class ArrangementA_, class ArrangementB_, class OverlayTraits_>
-  struct Sweep_line_overlay_visitor :
-    public Arr_overlay_sl_visitor
-        <_Overlay_helper<Arr_overlay_traits_2<Geometry_traits_2,
-                                              ArrangementA_,
-                                              ArrangementB_>,
-                         ArrangementA_,
-                         ArrangementB_>,
-         OverlayTraits_>
-  {
-    typedef ArrangementA_                            ArrangementA_2;
-    typedef ArrangementB_                            ArrangementB_2;
-    typedef Arr                                      Arrangement_result_2;
-    typedef OverlayTraits_                           Overlay_traits;
-
-    typedef Arr_overlay_traits_2<Geometry_traits_2,
-                                 ArrangementA_2,
-                                 ArrangementB_2>     Geom_ovl_traits_2;
-
-    typedef _Overlay_helper<Geom_ovl_traits_2,
-                            ArrangementA_2,
-                            ArrangementB_2>          Ovl_helper;
-
-    typedef Arr_overlay_sl_visitor<Ovl_helper,
-                                   Overlay_traits>   Base;
-
-    typedef typename Base::Traits_2                  Traits_2;
-    typedef typename Base::Event                     Event;
-    typedef typename Base::Subcurve                  Subcurve;
-
-    Sweep_line_overlay_visitor(const ArrangementA_2* arrA,
-                               const ArrangementB_2* arrB,
-                               Arrangement_result_2* arr_res,
-                               Overlay_traits* overlay_tr) :
-      Base(arrA, arrB, arr_res, overlay_tr)
-    {}
-  };
-
-  typedef Arr_inc_insertion_zone_visitor<Arr>
-                                        Zone_insertion_visitor;
-
-  typedef Arr_walk_along_line_point_location<Arr>
-                                        Default_point_location_strategy;
-
-  typedef Arr_walk_along_line_point_location<Arr>
-                                        Default_vertical_ray_shooting_strategy;
-  //@}
-
-  ///! \name Topology-traits methods.
-  //@{
-
-  /*!
-   * Initialize an empty DCEL structure.
-   */
-  void init_dcel();
-
-  /*!
-   * Make the necessary updates after the DCEL structure have been updated.
-   */
-  void dcel_updated();
-
-  /*!
-   * Check if the given vertex is associated with the given curve end.
-   * \param v The vertex.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \pre The curve has a boundary condition in either x or y.
-   * \return Whether v represents the given curve end.
-   */
-  bool are_equal(const Vertex* v,
-                 const X_monotone_curve_2& cv, Arr_curve_end ind,
-                 Arr_parameter_space ps_x, Arr_parameter_space ps_y) const;
-
-  /*!
-   * Given a curve end with boundary conditions and a face that contains the
-   * interior of the curve, find a place for a boundary vertex that will
-   * represent the curve end along the face boundary.
-   * \param f The face.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \pre The curve has a boundary condition in either x or y.
-   * \return An object that contains the curve end.
-   *         In our case this object always wraps a fictitious edge.
-   */
-  CGAL::Object place_boundary_vertex(Face* f,
-                                     const X_monotone_curve_2& cv,
-                                     Arr_curve_end ind,
-                                     Arr_parameter_space ps_x,
-                                     Arr_parameter_space ps_y);
-
-  /*!
-   * Locate the predecessor halfedge for the given curve around a given
-   * vertex with boundary conditions.
-   * \param v The vertex.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \pre The curve has a boundary condition in either x or y, and should be
-   *      incident to the vertex v.
-   * \return An object that contains the curve end.
-   */
-  Halfedge*
-  locate_around_boundary_vertex(Vertex* /* v */,
-                                const X_monotone_curve_2& /* cv */,
-                                Arr_curve_end /* ind */,
-                                Arr_parameter_space /* ps_x */,
-                                Arr_parameter_space /* ps_y */) const
-  {
-    CGAL_error();
-    return (NULL);
-  }
-
-  /*!
-   * Locate a DCEL feature that contains the given unbounded curve end.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \pre The curve end is unbounded in either x or y.
-   * \return An object that contains the curve end.
-   *         In our case this object may either wrap an unbounded face,
-   *         or an edge with an end-vertex at infinity (in case of an overlap).
-   */
-  CGAL::Object locate_curve_end(const X_monotone_curve_2& cv,
-                                Arr_curve_end ind,
-                                Arr_parameter_space ps_x,
-                                Arr_parameter_space ps_y);
-
-  /*!
-   * Split a fictitious edge using the given vertex.
-   * \param e The edge to split (one of the pair of halfedges).
-   * \param v The split vertex.
-   * \pre e is a fictitious halfedge.
-   * \return A halfedge whose direction is the same as e's and whose target is
-   *         the split vertex v.
-   */
-  Halfedge* split_fictitious_edge(Halfedge* e, Vertex* v);
-
-  /*!
-   * Determine whether the given face is unbounded.
-   * \param f The face.
-   * \return Whether f is unbounded.
-   */
-  bool is_unbounded(const Face* f) const;
-
-  /*!
-   * Determine whether the given boundary vertex is redundant.
-   * \param v The vertex.
-   * \return Whether v is redundant, and should be erased.
-   */
-  bool is_redundant(const Vertex* v) const;
-
-  /*!
-   * Erase the given redundant vertex by merging a fictitious edge.
-   * The function does not free the vertex v itself.
-   * \param v The vertex.
-   * \pre v is a redundant vertex.
-   * \return One of the pair of halfedges that form the merged edge.
-   */
-  Halfedge* erase_redundant_vertex(Vertex* v);
-
-    //! reference_face (const version).
-  /*! The function returns a reference face of the arrangement.
-      All reference faces of arrangements of the same type have a common
-      point.
-      \return A pointer to the reference face.
-  */
-  const Face* reference_face() const
-  {
-    assert(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT);
-    return v_tr->halfedge()->outer_ccb()->face();
-  }
-
-  //! reference_face (non-const version).
-  /*! The function returns a reference face of the arrangement.
-      All reference faces of arrangements of the same type have a common
-      point.
-      \return A pointer to the reference face.
-  */
-  Face* reference_face()
-  {
-    assert(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT);
-    return v_tr->halfedge()->outer_ccb()->face();
-  }
-
-  //@}
-
-  /// \name Additional accessors, specialized for this topology-traits class.
-  //@{
-
-  /*! This function is used by the "walk" point-location strategy. */
-  const Face* initial_face() const { return fict_face; }
-
-  /*! Get the fictitious face (const version). */
-  const Face* fictitious_face() const { return fict_face; }
-
-  /*! Get the fictitious face (non-const version). */
-  Face* fictitious_face() { return fict_face; }
-
-  /*! Get the bottom-left fictitious vertex (const version). */
-  const Vertex* bottom_left_vertex() const { return (v_bl); }
-
-  /*! Get the bottom-left fictitious vertex (non-const version). */
-  Vertex* bottom_left_vertex() { return (v_bl); }
-
-  /*! Get the top-left fictitious vertex (const version). */
-  const Vertex* top_left_vertex() const { return (v_tl); }
-
-  /*! Get the top-left fictitious vertex (non-const version). */
-  Vertex* top_left_vertex() { return (v_tl); }
-
-  /*! Get the bottom-right fictitious vertex (const version). */
-  const Vertex* bottom_right_vertex() const { return (v_br); }
-
-  /*! Get the bottom-right fictitious vertex (non-const version). */
-  Vertex* bottom_right_vertex() { return (v_br); }
-
-  /*! Get the top-right fictitious vertex (const version). */
-  const Vertex* top_right_vertex() const { return (v_tr); }
-
-  /*! Get the top-right fictitious vertex (non-const version). */
-  Vertex* top_right_vertex() { return (v_tr); }
-  //@}
-
-  /// \name Additional predicates, specialized for this topology-traits class.
-  //@{
-
-  /*!
-   * Compare the given vertex (which may lie at infinity) and the given point.
-   * \param p The point.
-   * \param v The vertex.
-   * \return The result of the comparison of the x-coordinates of p and v.
-   */
-  virtual Comparison_result compare_x(const Point_2& p,
-                                      const Vertex* v) const;
-
-  /*!
-   * Compare the given vertex (which may lie at infinity) and the given point.
-   * \param p The point.
-   * \param v The vertex.
-   * \return The result of the xy-lexicographic comparison of p and v.
-   */
-  virtual Comparison_result compare_xy(const Point_2& p,
-                                       const Vertex* v) const;
-
-  /*!
-   * Compare the relative y-position of the given point and the given edge
-   * (which may be fictitious).
-   * \param p The point.
-   * \param he The edge (one of the pair of halfedges).
-   * \pre p should lie in the x-range of the given edge.
-   * \return The relative y-position of the point p and the edge.
-   */
-  virtual Comparison_result compare_y_at_x(const Point_2& p,
-                                           const Halfedge* he) const;
-  //@}
-
-protected:
-
-  /// \name Auxiliary functions.
-  //@{
-
-  /*!
-   * Get the curve associated with a boundary vertex.
-   * \param v The vertex as infinity.
-   * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
-   *                    ARR_MAX_END if it is induced by the curve's maximal end.
-   * \pre v is a valid (not fictitious) boundary.
-   * \return The curve that induces v, or NULL if v has no incident curves yet.
-   */
-  const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
-
-  /*!
-   * Check whether the given infinite curve end lies on the given fictitious
-   * halfedge.
-   * \param cv The curve.
-   * \param ind Whether we refer to the minimal or maximal end of cv.
-   * \param ps_x The boundary condition of the curve end in x.
-   * \param ps_y The boundary condition of the curve end in y.
-   * \param he The fictitious halfedge.
-   * \param eq_source Output: Whether the curve coincides with he's source.
-   * \param eq_target Output: Whether the curve coincides with he's target.
-   * \return Whether the curve end lies on the fictitious halfedge.
-   */
-  bool _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
-                               Arr_parameter_space ps_x,
-                               Arr_parameter_space ps_y,
-                               const Halfedge* he,
-                               bool& eq_source, bool& eq_target);
-  //@}
-};
-
-} //namespace CGAL
-
-#include <CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h>
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_2_iterators.h b/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_2_iterators.h
deleted file mode 100644
index 779b9e6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_2_iterators.h
+++ /dev/null
@@ -1,548 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-
-#ifndef CGAL_ARRANGEMENT_2_ITERATORS_H
-#define CGAL_ARRANGEMENT_2_ITERATORS_H
-
-/*! \file
- * Definitions of auxiliary iterator adaptors.
- */
-
-namespace CGAL {
-
-/*!
- * \class
- * An iterator adaptor for dereferencing the value-type of the iterator class
- * (given as Iterator_), which is supposed to be a pointer, and handle it as
- * the value-type given by Value_.
- */
-template <class Iterator_, class Value_, class Diff_, class Category_>
-class I_Dereference_iterator
-{
-public:
-
-  // Type definitions:
-  typedef Iterator_                               Iterator;
-  typedef I_Dereference_iterator<Iterator_,
-				 Value_,
-				 Diff_,
-				 Category_>       Self;
-
-  typedef Category_                               iterator_category;
-  typedef Value_                                  value_type;
-  typedef value_type&                             reference;
-  typedef value_type*                             pointer;
-  typedef Diff_                                   difference_type;
-
-protected:
-
-  Iterator        iter;           // The internal iterator.
-
-public:
-
-  /// \name Construction
-  //@{
-  I_Dereference_iterator ()
-  {}
-
-  I_Dereference_iterator (Iterator it) :
-    iter(it)
-  {}
-  //@}
-
-  /// \name Basic operations.
-  //@{
-  bool operator== (const Self& it) const
-  {
-    return (iter == it.iter);
-  }
-    
-  bool operator!= (const Self& it) const
-  {
-    return (!(iter == it.iter));
-  }
-    
-  Iterator current_iterator () const
-  {
-    return (iter);
-  }
-    
-  pointer ptr () const
-  {
-    return (static_cast<value_type *> (*iter));
-  }
-
-  reference operator* () const
-  {
-    return (*(ptr()));
-  }
-
-  pointer operator-> () const
-  {
-    return (ptr());
-  }
-  //@}
-    
-  /// \name Incremernt operations (forward category).
-  //@{
-  Self& operator++()
-  {
-    ++iter;
-    return (*this);
-  }
-
-  Self operator++ (int )
-  {
-    Self tmp = *this;
-    ++iter;
-    return (tmp);
-  }
-  //@}
-
-  /// \name Decremernt operations (bidirectional category).
-  //@{
-  Self& operator-- ()
-  {
-    --iter;
-    return (*this);
-  }
-
-  Self operator-- (int )
-  {
-    Self tmp = *this;
-    --iter;
-    return (tmp);
-  }
-  //@}
-};
-
-/*!
- * \class
- * An iterator adaptor for dereferencing the value-type of the const iterator
- * class (given as CIterator_), which is supposed to be a pointer, and handle
- * it as the value-type given by Value_.
- */
-template <class CIterator_, class MIterator_, 
-	  class Value_, class Diff_, class Category_>
-class I_Dereference_const_iterator
-{
-public:
-
-  // Type definitions:
-  typedef CIterator_                              Const_iterator;
-  typedef MIterator_                              Mutable_iterator;
-  typedef I_Dereference_const_iterator<CIterator_,
-				       MIterator_,
-				       Value_,
-				       Diff_,
-				       Category_> Self;
-
-  typedef Category_                               iterator_category;
-  typedef Value_                                  value_type;
-  typedef const value_type&                       reference;
-  typedef const value_type*                       pointer;
-  typedef Diff_                                   difference_type;
-
-protected:
-
-  Const_iterator        iter;           // The internal iterator.
-
-public:
-
-  /// \name Construction
-  //@{
-  I_Dereference_const_iterator ()
-  {}
-
-  I_Dereference_const_iterator (Const_iterator it) :
-    iter(it)
-  {}
-
-  I_Dereference_const_iterator (Mutable_iterator it) :
-    iter (Const_iterator (&(*it)))
-  {}
-
-  //@}
-
-  /// \name Basic operations.
-  //@{
-  bool operator== (const Self& it) const
-  {
-    return (iter == it.iter);
-  }
-    
-  bool operator!= (const Self& it) const
-  {
-    return (!(iter == it.iter));
-  }
-    
-  Const_iterator current_iterator () const
-  {
-    return (iter);
-  }
-    
-  pointer ptr () const
-  {
-    return (static_cast<const value_type *> (*iter));
-  }
-
-  reference operator* () const
-  {
-    return (*(ptr()));
-  }
-
-  pointer operator-> () const
-  {
-    return (ptr());
-  }
-  //@}
-    
-  /// \name Incremernt operations (forward category).
-  //@{
-  Self& operator++()
-  {
-    ++iter;
-    return (*this);
-  }
-
-  Self operator++ (int )
-  {
-    Self tmp = *this;
-    ++iter;
-    return (tmp);
-  }
-  //@}
-
-  /// \name Decremernt operations (bidirectional category).
-  //@{
-  Self& operator-- ()
-  {
-    --iter;
-    return (*this);
-  }
-
-  Self operator-- (int )
-  {
-    Self tmp = *this;
-    --iter;
-    return (tmp);
-  }
-  //@}
-};
-
-/*!
- * \class
- * An iterator adaptor for the filtering a DCEL iterator (given as Iterator_)
- * using a given filter functor (Filter_).
- */
-template <class Iterator_, class Filter_,
-          class Value_, class Diff_, class Category_>
-class I_Filtered_iterator
-{
-public:
-
-  typedef Iterator_                       Iterator;
-  typedef Filter_                         Filter; 
-  typedef I_Filtered_iterator<Iterator_,
-                              Filter_,
-                              Value_,
-                              Diff_,
-                              Category_>  Self;
-
-  typedef Category_                       iterator_category;
-  typedef Value_                          value_type;
-  typedef value_type&                     reference;
-  typedef value_type*                     pointer;
-  typedef Diff_                           difference_type;
-
-protected:
-
-  Iterator        nt;       // The internal iterator (this member should not
-                            // be renamed in order to comply with the
-                            // HalfedgeDS circulators that refer to it).
-  Iterator        iend;     // A past-the-end iterator.        
-  Filter          filt;     // The filter functor.
-
-public:
-
-  /*! Constructors. */
-  I_Filtered_iterator()
-  {}
-
-  I_Filtered_iterator (Iterator it) :
-    nt (it),
-    iend (nt)
-  {}
-
-  I_Filtered_iterator (Iterator it, Iterator end) :
-    nt (it),
-    iend (end)
-  {
-    while (nt != iend && ! filt (*nt))
-      ++nt;
-  }
-
-  I_Filtered_iterator (Iterator it, Iterator end, Filter f) :
-    nt (it),
-    iend (end),
-    filt (f)
-  {
-    while (nt != iend && ! filt (*nt))
-      ++nt;
-  }
-
-  /*! Access operations. */
-  Iterator current_iterator() const
-  {
-    return (nt);
-  }
-
-  Iterator past_the_end () const
-  {
-    return (iend);
-  }
-
-  Filter filter () const
-  {
-    return (filt);
-  }
-
-  pointer ptr() const
-  {
-    return static_cast<pointer>(&(*nt));
-  }
-
-  /*! Equality operators. */
-  bool operator== (const Self& it) const
-  {
-    return (nt == it.nt);
-  }
-  
-  bool operator!= (const Self& it) const 
-  {
-    return !(*this == it);
-  }
-  
-  /*! Dereferencing operators. */
-  reference operator*() const
-  {
-    return (*(ptr()));
-  }
-  
-  pointer operator->() const
-  {
-    return ptr();
-  }
-
-  /*! Increment operators. */
-  Self& operator++ ()
-  {
-    do
-    {
-      ++nt;
-    } while (!(nt == iend) && ! filt (*nt));
-
-    return (*this);
-  }
-   
-  Self operator++ (int)
-  {
-    Self tmp = *this;
-    ++(*this);
-    return tmp;
-  }
-
-  /*! Decrement operators. */
-  Self& operator-- ()
-  {
-    do
-    {
-      --nt;
-    } while (!(nt == iend) && ! filt (*nt));
-
-    return (*this);
-  }
-
-  Self operator-- (int)
-  {
-    Self tmp = *this;
-    --(*this);
-    return tmp;
-  }
-};
-
-/*!
- * \class
- * An iterator adaptor for the filtering a DCEL const iterator (given as
- * CIterator_) using a given filter functor (Filter_).
- */
-template <class CIterator_, class Filter_, class MIterator_,
-          class Value_, class Diff_, class Category_>
-class I_Filtered_const_iterator
-{
-public:
-
-  typedef CIterator_                             Iterator;
-  typedef Filter_                                Filter;
-  typedef I_Filtered_const_iterator<CIterator_,
-                                    Filter_,
-                                    MIterator_,
-                                    Value_,
-                                    Diff_,
-                                    Category_>   Self;
-
-  typedef Category_                              iterator_category;
-  typedef Value_                                 value_type;
-  typedef const value_type&                      reference;
-  typedef const value_type*                      pointer;
-  typedef Diff_                                  difference_type;
-
-  typedef I_Filtered_iterator<MIterator_, Filter_,
-                              Value_, Diff_,
-                              Category_>         mutable_iterator;
-
-protected:
-
-  Iterator       nt;       // The internal iterator (this member should not
-                           // be renamed in order to comply with the
-                           // HalfedgeDS circulators that refer to it).
-  Iterator       iend;     // A past-the-end iterator.        
-  Filter         filt;     // The filter functor.
-
-public:
-
-  /*! Constructors. */
-  I_Filtered_const_iterator()
-  {}
-
-  I_Filtered_const_iterator (Iterator it) :
-    nt (it),
-    iend (it)
-  {}
-
-  I_Filtered_const_iterator (Iterator it, Iterator end) :
-    nt (it),
-    iend (end)
-  {
-    while (nt != iend && ! filt (*nt))
-      ++nt;
-  }
-
-  I_Filtered_const_iterator (Iterator it, Iterator end, Filter f) :
-    nt (it),
-    iend (end),
-    filt (f)
-  {
-    while (nt != iend && ! filt (*nt))
-      ++nt;
-  }
-
-  I_Filtered_const_iterator (mutable_iterator it) :
-    nt (it.current_iterator()),
-    iend (it.past_the_end()),
-    filt (it.filter())
-  {
-    //    while (nt != iend && ! filt (*nt))
-    //      ++nt;
-  }
-
-  /*! Access operations. */
-  Iterator current_iterator() const
-  {
-    return (nt);
-  }
-
-  Iterator past_the_end () const
-  {
-    return (iend);
-  }
-
-  Filter filter () const
-  {
-    return (filt);
-  }
-
-  pointer ptr() const
-  {
-    return static_cast<pointer>(&(*nt));
-  }
-
-  /*! Equality operators. */
-  bool operator== (const Self& it) const
-  {
-    return (nt == it.nt);
-  }
-  
-  bool operator!= (const Self& it) const 
-  {
-    return !(*this == it);
-  }
-  
-  /*! Dereferencing operators. */
-  reference operator*() const
-  {
-    return (*(ptr()));
-  }
-  
-  pointer operator->() const
-  {
-    return ptr();
-  }
-
-  /*! Increment operators. */
-  Self& operator++ ()
-  {
-    do
-    {
-      ++nt;
-    } while (!(nt == iend) && ! filt (*nt));
-
-    return (*this);
-  }
-   
-  Self operator++ (int)
-  {
-    Self tmp = *this;
-    ++(*this);
-    return tmp;
-  }
-
-  /*! Decrement operators. */
-  Self& operator-- ()
-  {
-    do
-    {
-      --nt;
-    } while (!(nt == iend) && ! filt (*nt));
-
-    return (*this);
-  }
-
-  Self operator-- (int)
-  {
-    Self tmp = *this;
-    --(*this);
-    return tmp;
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
deleted file mode 100644
index 3509eb0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
+++ /dev/null
@@ -1,5476 +0,0 @@
-// Copyright (c) 2005,2006,2007,2008,2009,2010,2011,2012,2013 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
-//                 Efi Fogel         <efif at post.tau.ac.il>
-//                 Eric Berberich    <eric.berberich at cgal.org>
-//                 (based on old version by: Iddo Hanniel,
-//                                           Eyal Flato,
-//                                           Oren Nechushtan,
-//                                           Ester Ezra,
-//                                           Shai Hirsch,
-//                                           and Eugene Lipovetsky)
-//
-
-#ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_IMPL_H
-#define CGAL_ARRANGEMENT_ON_SURFACE_2_IMPL_H
-
-#ifndef CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-#define CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE 0
-#endif
-
-/*! \file
- * Member-function definitions for the Arrangement_2<GeomTraits, TopTraits>
- * class-template.
- */
-
-#include <CGAL/function_objects.h>
-#include <CGAL/use.h>
-
-namespace CGAL {
-
-//-----------------------------------------------------------------------------
-// Default constructor.
-//
-template <typename GeomTraits, typename TopTraits>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::Arrangement_on_surface_2() :
-  m_topol_traits()
-{
-  typedef has_Left_side_category<GeomTraits> Cond_left;
-  typedef internal::Validate_left_side_category<GeomTraits, Cond_left::value>
-    Validate_left_side_category;
-  void (Validate_left_side_category::*pleft)(void) =
-    &Validate_left_side_category::template missing__Left_side_category<int>;
-  (void)pleft;
-
-  typedef has_Bottom_side_category<GeomTraits> Cond_bottom;
-  typedef internal::Validate_bottom_side_category<GeomTraits,
-                                                  Cond_bottom::value>
-    Validate_bottom_side_category;
-  void (Validate_bottom_side_category::*pbottom)(void) =
-    &Validate_bottom_side_category::template missing__Bottom_side_category<int>;
-  (void)pbottom;
-
-  typedef has_Top_side_category<GeomTraits> Cond_top;
-  typedef internal::Validate_top_side_category<GeomTraits, Cond_top::value>
-    Validate_top_side_category;
-  void (Validate_top_side_category::*ptop)(void) =
-    &Validate_top_side_category::template missing__Top_side_category<int>;
-  (void)ptop;
-
-  typedef has_Right_side_category<GeomTraits> Cond_right;
-  typedef internal::Validate_right_side_category<GeomTraits, Cond_right::value>
-    Validate_right_side_category;
-  void (Validate_right_side_category::*pright)(void) =
-    &Validate_right_side_category::template missing__Right_side_category<int>;
-  (void)pright;
-
-  // Initialize the DCEL structure to represent an empty arrangement.
-  m_topol_traits.init_dcel();
-
-  // Allocate the traits.
-  m_geom_traits = new Traits_adaptor_2;
-  m_own_traits = true;
-}
-
-//-----------------------------------------------------------------------------
-// Copy constructor.
-//
-template <typename GeomTraits, typename TopTraits>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-Arrangement_on_surface_2(const Self& arr) :
-  m_geom_traits(NULL),
-  m_own_traits(false)
-{
-  assign(arr);
-}
-
-//-----------------------------------------------------------------------------
-// Constructor given a traits object.
-//
-template <typename GeomTraits, typename TopTraits>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-Arrangement_on_surface_2(const Geometry_traits_2* geom_traits) :
-  m_topol_traits(geom_traits)
-{
-  typedef has_Left_side_category<GeomTraits> Cond_left;
-  typedef internal::Validate_left_side_category<GeomTraits, Cond_left::value>
-    Validate_left_side_category;
-  void (Validate_left_side_category::*pleft)(void) =
-    &Validate_left_side_category::template missing__Left_side_category<int>;
-  (void)pleft;
-
-  typedef has_Bottom_side_category<GeomTraits> Cond_bottom;
-  typedef internal::Validate_bottom_side_category<GeomTraits,
-                                                  Cond_bottom::value>
-    Validate_bottom_side_category;
-  void (Validate_bottom_side_category::*pbottom)(void) =
-    &Validate_bottom_side_category::template missing__Bottom_side_category<int>;
-  (void)pbottom;
-
-  typedef has_Top_side_category<GeomTraits> Cond_top;
-  typedef internal::Validate_top_side_category<GeomTraits, Cond_top::value>
-    Validate_top_side_category;
-  void (Validate_top_side_category::*ptop)(void) =
-    &Validate_top_side_category::template missing__Top_side_category<int>;
-  (void)ptop;
-
-  typedef has_Right_side_category<GeomTraits> Cond_right;
-  typedef internal::Validate_right_side_category<GeomTraits, Cond_right::value>
-    Validate_right_side_category;
-  void (Validate_right_side_category::*pright)(void) =
-    &Validate_right_side_category::template missing__Right_side_category<int>;
-  (void)pright;
-
-  // Initialize the DCEL structure to represent an empty arrangement.
-  m_topol_traits.init_dcel();
-
-  // Set the traits.
-  m_geom_traits = static_cast<const Traits_adaptor_2*>(geom_traits);
-  m_own_traits = false;
-}
-
-//-----------------------------------------------------------------------------
-// Assignment operator.
-//
-template <typename GeomTraits, typename TopTraits>
-Arrangement_on_surface_2<GeomTraits, TopTraits>&
-Arrangement_on_surface_2<GeomTraits, TopTraits>::operator=(const Self& arr)
-{
-  if (this == &arr) return (*this);     // handle self-assignment
-  assign(arr);
-  return (*this);
-}
-
-//-----------------------------------------------------------------------------
-// Assign an arrangement.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::assign(const Self& arr)
-{
-  // Clear the current contents of the arrangement.
-  clear();
-
-  // Notify the observers that an assignment is to take place.
-  _notify_before_assign(arr);
-
-  // Assign the topology-traits object.
-  m_topol_traits.assign(arr.m_topol_traits);
-
-  // Go over the vertices and create duplicates of the stored points.
-  Point_2* dup_p;
-  DVertex* p_v;
-
-  typename Dcel::Vertex_iterator vit;
-  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit) {
-    p_v = &(*vit);
-
-    if (! p_v->has_null_point()) {
-      // Create the duplicate point and store it in the points container.
-      dup_p = _new_point(p_v->point());
-
-      // Associate the vertex with the duplicated point.
-      p_v->set_point(dup_p);
-    }
-  }
-
-  // Go over the edge and create duplicates of the stored curves.
-  typename Dcel::Edge_iterator eit;
-  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit) {
-    DHalfedge* p_e = &(*eit);
-
-    if (! p_e->has_null_curve()) {
-      // Create the duplicate curve and store it in the curves container.
-      X_monotone_curve_2* dup_cv = _new_curve(p_e->curve());
-
-      // Associate the halfedge (and its twin) with the duplicated curve.
-      p_e->set_curve(dup_cv);
-    }
-  }
-
-  // Take care of the traits object.
-  if (m_own_traits && (m_geom_traits != NULL)) {
-    delete m_geom_traits;
-    m_geom_traits = NULL;
-  }
-
-  m_geom_traits = (arr.m_own_traits) ? new Traits_adaptor_2 : arr.m_geom_traits;
-  m_own_traits = arr.m_own_traits;
-
-  // Notify the observers that the assignment has been performed.
-  _notify_after_assign();
-}
-
-//-----------------------------------------------------------------------------
-// Destructor.
-//
-template <typename GeomTraits, typename TopTraits>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::~Arrangement_on_surface_2()
-{
-  // Free all stored points.
-  typename Dcel::Vertex_iterator vit;
-  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit)
-    if (! vit->has_null_point())
-      _delete_point(vit->point());
-
-  // Free all stores curves.
-  typename Dcel::Edge_iterator eit;
-  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit)
-    if (! eit->has_null_curve())
-      _delete_curve(eit->curve());
-
-  // Free the traits object, if necessary.
-  if (m_own_traits && (m_geom_traits != NULL)) {
-    delete m_geom_traits;
-    m_geom_traits = NULL;
-  }
-
-  // Detach all observers still attached to the arrangement.
-  Observers_iterator  iter = m_observers.begin();
-  Observers_iterator  next;
-  Observers_iterator  end = m_observers.end();
-
-  while (iter != end) {
-    next = iter;
-    ++next;
-    (*iter)->detach();
-    iter = next;
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Clear the arrangement.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::clear()
-{
-  // Notify the observers that we are about to clear the arragement.
-  _notify_before_clear();
-
-  // Free all stored points.
-  typename Dcel::Vertex_iterator vit;
-  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit)
-    if (! vit->has_null_point()) _delete_point(vit->point());
-
-  // Free all stores curves.
-  typename Dcel::Edge_iterator eit;
-  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit)
-    if (! eit->has_null_curve()) _delete_curve(eit->curve());
-
-  // Clear the DCEL and construct an empty arrangement.
-  _dcel().delete_all();
-  m_topol_traits.init_dcel();
-
-  // Notify the observers that we have just cleared the arragement.
-  _notify_after_clear();
-}
-
-//-----------------------------------------------------------------------------
-// Insert a point as an isolated vertex in the interior of a given face.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_in_face_interior(const Point_2& p, Face_handle f)
-{
-  DFace* p_f = _face(f);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: insert_in_face_interior (interface)" << std::endl;
-  std::cout << "pt   : " << p << std::endl;
-  std::cout << "face : " << &(*f) << std::endl;
-#endif
-
-  // Create a new vertex associated with the given point.
-  // We assume the point has no boundary conditions.
-  DVertex* v = _create_vertex(p);
-  Vertex_handle vh(v);
-
-  // Insert v as an isolated vertex inside the given face.
-  _insert_isolated_vertex(p_f, v);
-
-  // Return a handle to the new isolated vertex.
-  return vh;
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement as a new hole (inner
-// component) inside the given face.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: insert_in_face_interior (interface)" << std::endl;
-  std::cout << "cv   : " << cv << std::endl;
-  std::cout << "face : " << &(*f) << std::endl;
-#endif
-
-  DFace* p_f = _face(f);
-
-  // Check if cv's left end has boundary conditions, and obtain a vertex v1
-  // that corresponds to this end.
-  const Arr_parameter_space  ps_x1 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-  const Arr_parameter_space  ps_y1 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-  DHalfedge* fict_prev1 = NULL;
-
-  DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
-    // The curve has a valid left endpoint: Create a new vertex associated
-    // with the curve's left endpoint.
-    _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv)) :
-    // Locate the DCEL features that will be used for inserting the curve's
-    // left end.
-    _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
-
-  // Check if cv's right end has boundary conditions, and obtain a vertex v2
-  // that corresponds to this end.
-  const Arr_parameter_space  ps_x2 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
-  const Arr_parameter_space  ps_y2 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
-  DHalfedge* fict_prev2 = NULL;
-
-  DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
-    // The curve has a valid right endpoint: Create a new vertex associated
-    // with the curve's right endpoint.
-    _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv)) :
-    // Locate the DCEL features that will be used for inserting the curve's
-    // right end.
-    _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
-
-  // Create the edge connecting the two vertices (note we know v1 is
-  // lexicographically smaller than v2).
-  DHalfedge* new_he;
-
-  if ((fict_prev1 == NULL) && (fict_prev2 == NULL))
-    // Both vertices represent valid points.
-    new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
-  else if ((fict_prev1 == NULL) && (fict_prev2 != NULL)) {
-    // v1 represents a valid point and v2 is inserted using its predecessor.
-    new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
-    new_he = new_he->opposite();
-  }
-  else if ((fict_prev1 != NULL) && (fict_prev2 == NULL))
-    // v1 is inserted using its predecessor and v2 represents a valid point.
-    new_he = _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
-  else {
-    // Both vertices are inserted using their predecessor halfedges.
-
-    // Comment:
-    // In case the inserted curve has two vertical asymptotes at the top
-    // it happens that fict_prev1 is split by the max end and becomes the
-    // prev edge, which is fict_prev2. Since both pointers are equal they
-    // both point to the max end. Thus, we advance fict_prev1 by one
-    // such that it points to the min end again.
-    // Note that this only happens at the top. At the bottom everything
-    // goes fine since the insertion order is reverted with respect to the
-    // orientation of the edges.
-    //
-    // In the other function such a fix is not needed, as at most one
-    // curve-end reaches the boundary. It is also not possible to delay
-    // it to _insert_at_vertices, as that expects the two predecessor
-    // halfedges as input. An early detecting is also not possible
-    // (i.e.~in _place_and_set_curve_end), as that needs to know to be
-    // called from here!
-    if (fict_prev1 == fict_prev2) fict_prev1 = fict_prev1->next();
-
-    // Note that in this case we may create a new face.
-    bool new_face_created = false;
-    bool check_swapped_predecessors = false;
-    new_he = _insert_at_vertices(fict_prev1, cv, ARR_LEFT_TO_RIGHT,
-                                 fict_prev2->next(), new_face_created,
-                                 check_swapped_predecessors);
-    // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minumum so far
-    CGAL_assertion(!check_swapped_predecessors);
-    // usually one would expect to have an new_he (and its twin) lying on the
-    // same _inner_ CCB ...
-
-    if (new_face_created) {
-      // ... but in case that a new face got created new_he should lie on an
-      // outer CCB
-      CGAL_assertion(new_he->is_on_outer_ccb());
-      // Note! new_he is not needed to define the new outer CCB of the new face
-      // Here, it can be the outer ccb of the old face, as there is also not
-      // swapping taking place!
-
-      // In case a new face has been created (pointed by the new halfedge we
-      // obtained), we have to examine the holes and isolated vertices in the
-      // existing face (pointed by the twin halfedge) and move the relevant
-      // holes and isolated vertices into the new face.
-      _relocate_in_new_face(new_he);
-    }
-  }
-
-  // Return a handle to the new halfedge directed from left to right.
-  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that its left
-// endpoint corresponds to a given arrangement vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_from_left_vertex(const X_monotone_curve_2& cv,
-                        Vertex_handle v,
-                        Face_handle f)
-{
-  CGAL_precondition_code
-    (const bool at_obnd1 =
-     !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END));
-  CGAL_precondition_msg
-    ((! at_obnd1 &&
-      m_geom_traits->equal_2_object()
-      (v->point(),
-       m_geom_traits->construct_min_vertex_2_object()(cv))) ||
-     (at_obnd1 && v->is_at_open_boundary()),
-     "The input vertex should be the left curve end.");
-
-  // Check if cv's right end has boundary conditions. If not, create a vertex
-  // that corresponds to the right endpoint.
-  const Arr_parameter_space  ps_x2 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
-  const Arr_parameter_space  ps_y2 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
-  DVertex* v2 = NULL;
-  DHalfedge* fict_prev2 = NULL;
-
-  if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR))
-    // The curve has a valid right endpoint: Create a new vertex associated
-    // with the curve's right endpoint.
-    v2 = _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv));
-
-  // Check if the given vertex, corresponding to the left curve end, has no
-  // incident edges.
-  if (v->degree() == 0) {
-    // The given vertex is an isolated one: We should in fact insert the curve
-    // in the interior of the face containing this vertex.
-    DVertex* v1 = _vertex(v);
-    DIso_vertex* iv = NULL;
-    DFace* p_f = NULL;
-
-    if (v->is_isolated()) {
-      // Obtain the face from the isolated vertex.
-      iv = v1->isolated_vertex();
-      p_f = iv->face();
-    }
-    else {
-      // In this case the face that contains v should be provided by the user.
-      CGAL_precondition(f != Face_handle());
-      p_f = _face(f);
-    }
-
-    // If the vertex that corresponds to cv's right end has boundary
-    // conditions, create it now.
-    if (v2 == NULL)
-      // Locate the DCEL features that will be used for inserting the curve's
-      // right end.
-      v2 = _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2,
-                                    &fict_prev2);
-
-    if (iv != NULL) {
-      // Remove the isolated vertex v1, as it will not be isolated any more.
-      p_f->erase_isolated_vertex(iv);
-      _dcel().delete_isolated_vertex(iv);
-    }
-
-    // Create the edge connecting the two vertices (note that we know that
-    // v1 is smaller than v2).
-    DHalfedge* new_he;
-    if (fict_prev2 == NULL)
-      new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
-    else {
-      new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
-      new_he = new_he->opposite();
-    }
-
-    // Return a handle to the new halfedge directed from v1 to v2.
-    CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
-    return (Halfedge_handle(new_he));
-  }
-
-  // Go over the incident halfedges around v and find the halfedge after
-  // which the new curve should be inserted.
-  DHalfedge* prev1 = _locate_around_vertex(_vertex(v), cv, ARR_MIN_END);
-  CGAL_assertion_msg
-    (prev1 != NULL,
-     "The inserted curve cannot be located in the arrangement.");
-
-  DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
-    prev1->outer_ccb()->face();
-
-  // If the vertex that corresponds to cv's right end has boundary conditions,
-  // create it now.
-  if (v2 == NULL)
-    // Locate the DCEL features that will be used for inserting the curve's
-    // right end.
-    v2 =
-      _place_and_set_curve_end(f1, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
-
-  // Perform the insertion (note that we know that prev1->vertex is smaller
-  // than v2).
-  DHalfedge* new_he;
-
-  if (fict_prev2 == NULL)
-    // Insert the halfedge given the predecessor halfedge of v1.
-    new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
-  else {
-    // Insert the halfedge given the two predecessor halfedges.
-    // Note that in this case we may create a new face.
-    bool new_face_created = false;
-    bool check_swapped_predecessors = false;
-    new_he = _insert_at_vertices(prev1, cv, ARR_LEFT_TO_RIGHT,
-                                 fict_prev2->next(),
-                                 new_face_created, check_swapped_predecessors);
-    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
-    // merges the CCB as an "interior" extension into an outer CCB of a face
-    // incident the parameter space's boundary.
-    CGAL_assertion(!check_swapped_predecessors);
-
-    if (new_face_created) {
-      CGAL_assertion(new_he->is_on_outer_ccb());
-      // Note! new_he is not needed to define the new outer CCB of the new face
-      // Here, it can be the outer ccb of the old face, as there is also not
-      // swapping taking place!
-
-      // In case a new face has been created (pointed by the new halfedge we
-      // obtained), we have to examine the holes and isolated vertices in the
-      // existing face (pointed by the twin halfedge) and move the relevant
-      // holes and isolated vertices into the new face.
-      _relocate_in_new_face(new_he);
-    }
-  }
-
-  // Return a handle to the halfedge directed toward the new vertex v2.
-  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that one its left
-// endpoint corresponds to a given arrangement vertex, given the exact place
-// for the curve in the circular list around this vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: insert_from_left_vertex (interface)" << std::endl;
-  std::cout << "cv   : " << cv << std::endl;
-  if (!prev->is_fictitious()) {
-    std::cout << "prev : " << prev ->curve() << std::endl;
-  } else {
-    std::cout << "prev : fictitious" << std::endl;
-  }
-  std::cout << "dir  : " << prev->direction() << std::endl;
-#endif
-
-  CGAL_precondition_code
-    (const bool at_obnd1 =
-     !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END));
-  CGAL_precondition_msg
-    ((! at_obnd1 &&
-      m_geom_traits->equal_2_object()
-      (prev->target()->point(),
-       m_geom_traits->construct_min_vertex_2_object()(cv))) ||
-     (at_obnd1 && prev->target()->is_at_open_boundary()),
-     "The target of the input halfedge should be the left curve end.");
-
-  CGAL_precondition_msg
-    (at_obnd1 || _locate_around_vertex(_vertex(prev->target()),
-                                       cv, ARR_MIN_END) == _halfedge(prev),
-     "In the clockwise order of curves around the vertex, "
-     " cv must succeed the curve of prev.");
-
-  // Get the predecessor halfedge for the insertion of the left curve end.
-  DHalfedge* prev1 = _halfedge(prev);
-  DFace* f1 = _face(prev->face());
-
-  // Check if cv's right end has boundary conditions, and obtain a vertex
-  // that corresponds to this end.
-  const Arr_parameter_space  ps_x2 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
-  const Arr_parameter_space  ps_y2 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
-  DHalfedge* fict_prev2 = NULL;
-
-  DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
-    // The curve has a valid right endpoint: Create a new vertex associated
-    // with the curve's right endpoint.
-    _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv)) :
-    // Locate the DCEL features that will be used for inserting the curve's
-    // right end.
-    _place_and_set_curve_end(f1, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
-
-  // Perform the insertion (note that we know that prev1->vertex is smaller
-  // than v2).
-  DHalfedge* new_he;
-
-  if (fict_prev2 == NULL)
-    // Insert the halfedge given the predecessor halfedge of the left vertex.
-    new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
-  else {
-    // Insert the halfedge given the two predecessor halfedges.
-    // Note that in this case we may create a new face.
-    bool new_face_created = false;
-    bool check_swapped_predecessors = false;
-    new_he = _insert_at_vertices(prev1, cv, ARR_LEFT_TO_RIGHT,
-                                 fict_prev2->next(), new_face_created,
-                                 check_swapped_predecessors);
-    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
-    // merges the CCB as an "interior" extension into an outer CCB of a face
-    // incident the parameter space's boundary.
-    CGAL_assertion(!check_swapped_predecessors);
-
-    if (new_face_created) {
-      CGAL_assertion(new_he->is_on_outer_ccb());
-      // Note! new_he is not needed to define the new outer CCB of the new face
-      // Here, it can be the outer ccb of the old face, as there is also not
-      // swapping taking place!
-
-      // In case a new face has been created (pointed by the new halfedge we
-      // obtained), we have to examine the holes and isolated vertices in the
-      // existing face (pointed by the twin halfedge) and move the relevant
-      // holes and isolated vertices into the new face.
-      _relocate_in_new_face(new_he);
-    }
-  }
-
-  // Return a handle to the halfedge directed toward the new vertex v2.
-  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that its right
-// endpoint corresponds to a given arrangement vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_from_right_vertex(const X_monotone_curve_2& cv,
-                         Vertex_handle v, Face_handle f)
-{
-  CGAL_precondition_code
-    (const bool at_obnd2 =
-     !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END));
-  CGAL_precondition_msg
-    ((! at_obnd2 &&
-      m_geom_traits->equal_2_object()
-      (v->point(),
-       m_geom_traits->construct_max_vertex_2_object()(cv))) ||
-     (at_obnd2 && v->is_at_open_boundary()),
-     "The input vertex should be the right curve end.");
-
-  // Check if cv's left end has boundary conditions. If not, create a vertex
-  // that corresponds to the left endpoint.
-  const Arr_parameter_space  ps_x1 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-  const Arr_parameter_space  ps_y1 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-  DVertex* v1 = NULL;
-  DHalfedge* fict_prev1 = NULL;
-
-  if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR))
-    // The curve has a valid left endpoint: Create a new vertex associated
-    // with the curve's left endpoint.
-    v1 = _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv));
-
-  // Check if the given vertex, corresponding to the right curve end, has no
-  // incident edges.
-  if (v->degree() == 0) {
-    // The given vertex is an isolated one: We should in fact insert the curve
-    // in the interior of the face containing this vertex.
-    DVertex* v2 = _vertex(v);
-    DIso_vertex* iv = NULL;
-    DFace* p_f = NULL;
-
-    if (v->is_isolated()) {
-      // Obtain the face from the isolated vertex.
-      iv = v2->isolated_vertex();
-      p_f = iv->face();
-    }
-    else {
-      // In this case the face that contains v should be provided by the user.
-      CGAL_precondition(f != Face_handle());
-      p_f = _face(f);
-    }
-
-    // If the vertex that corresponds to cv's left end has boundary
-    // conditions, create it now.
-    if (v1 == NULL)
-      // Locate the DCEL features that will be used for inserting the curve's
-      // left end.
-      v1 = _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1,
-                                    &fict_prev1);
-
-    if (iv != NULL) {
-      // Remove the isolated vertex v2, as it will not be isolated any more.
-      p_f->erase_isolated_vertex(iv);
-      _dcel().delete_isolated_vertex(iv);
-    }
-
-    // Create the edge connecting the two vertices (note that we know that
-    // v1 is smaller than v2).
-    DHalfedge* new_he = (fict_prev1 == NULL) ?
-      _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2) :
-      _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
-
-    // Return a handle to the new halfedge whose target is the new vertex v1.
-    CGAL_postcondition(new_he->opposite()->direction() == ARR_RIGHT_TO_LEFT);
-    return (Halfedge_handle(new_he->opposite()));
-  }
-
-  // Go over the incident halfedges around v and find the halfedge after
-  // which the new curve should be inserted.
-  DHalfedge* prev2 = _locate_around_vertex(_vertex(v), cv, ARR_MAX_END);
-  CGAL_assertion_msg
-    (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
-
-  DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
-    prev2->outer_ccb()->face();
-
-  // If the vertex that corresponds to cv's left end has boundary conditions,
-  // create it now.
-  if (v1 == NULL)
-    // Locate the DCEL features that will be used for inserting the curve's
-    // left end.
-    v1 =
-      _place_and_set_curve_end(f2, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
-
-  // Perform the insertion (note that we know that prev2->vertex is larger
-  // than v1).
-  DHalfedge* new_he;
-
-  if (fict_prev1 == NULL)
-    // Insert the halfedge given the predecessor halfedge of v2.
-    new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
-  else {
-    // Insert the halfedge given the two predecessor halfedges.
-    // Note that in this case we may create a new face.
-    bool new_face_created = false;
-    bool check_swapped_predecessors = false;
-    new_he = _insert_at_vertices(prev2, cv, ARR_RIGHT_TO_LEFT,
-                                 fict_prev1->next(), new_face_created,
-                                 check_swapped_predecessors);
-    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
-    // merges the CCB as an "interior" extension into an outer CCB of a face
-    // incident the parameter space's boundary.
-    CGAL_assertion(!check_swapped_predecessors);
-
-    if (new_face_created) {
-      CGAL_assertion(new_he->is_on_outer_ccb());
-      // Note! new_he is not needed to define the new outer CCB of the new face
-      // Here, it can be the outer ccb of the old face, as there is also not
-      // swapping taking place!
-
-      // In case a new face has been created (pointed by the new halfedge we
-      // obtained), we have to examine the holes and isolated vertices in the
-      // existing face (pointed by the twin halfedge) and move the relevant
-      // holes and isolated vertices into the new face.
-      _relocate_in_new_face(new_he);
-    }
-
-  }
-
-  // Return a handle to the halfedge directed toward the new vertex v1.
-  CGAL_postcondition(new_he->direction() == ARR_RIGHT_TO_LEFT);
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that its right
-// endpoint corresponds to a given arrangement vertex, given the exact place
-// for the curve in the circular list around this vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_from_right_vertex(const X_monotone_curve_2& cv,
-                         Halfedge_handle prev)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: insert_from_right_vertex (interface)" << std::endl;
-  std::cout << "cv   : " << cv << std::endl;
-  if (!prev->is_fictitious())
-    std::cout << "prev : " << prev ->curve() << std::endl;
-  else
-    std::cout << "prev : fictitious" << std::endl;
-  std::cout << "dir  : " << prev->direction() << std::endl;
-#endif
-
-  CGAL_precondition_code
-    (const bool at_obnd2 =
-     !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END));
-  CGAL_precondition_msg
-    ((! at_obnd2 &&
-      m_geom_traits->equal_2_object()
-      (prev->target()->point(),
-       m_geom_traits->construct_max_vertex_2_object()(cv))) ||
-     (at_obnd2 && prev->target()->is_at_open_boundary()),
-     "The input vertex should be the right curve end.");
-
-  CGAL_precondition_msg
-    (at_obnd2 ||
-     (_locate_around_vertex(_vertex(prev->target()), cv, ARR_MAX_END) ==
-      _halfedge(prev)),
-     "In the clockwise order of curves around the vertex, "
-     " cv must succeed the curve of prev.");
-
-  // Get the predecessor halfedge for the insertion of the right curve end.
-  DHalfedge* prev2 = _halfedge(prev);
-  DFace* f2 = _face(prev->face());
-
-  // Check if cv's left end has boundary conditions, and obtain a vertex v1
-  // that corresponds to this end.
-  const Arr_parameter_space  ps_x1 =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-  const Arr_parameter_space  ps_y1 =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-  DHalfedge* fict_prev1 = NULL;
-
-  DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
-    // The curve has a valid left endpoint: Create a new vertex associated
-    // with the curve's left endpoint.
-    _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv)) :
-    // Locate the DCEL features that will be used for inserting the curve's
-    // left end.
-    _place_and_set_curve_end(f2, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
-
-  // Perform the insertion (note that we know that prev2->vertex is larger
-  // than v1).
-  DHalfedge* new_he;
-
-  if (fict_prev1 == NULL)
-    // Insert the halfedge given the predecessor halfedge of the right vertex.
-    new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
-  else {
-    // Insert the halfedge given the two predecessor halfedges.
-    // Note that in this case we may create a new face.
-    bool new_face_created = false;
-    bool check_swapped_predecessors = false;
-    new_he = _insert_at_vertices(prev2, cv, ARR_RIGHT_TO_LEFT,
-                                 fict_prev1->next(), new_face_created,
-                                 check_swapped_predecessors);
-    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
-    // merges the CCB as an "interior" extension into an outer CCB of a face
-    // incident the parameter space's boundary.
-    CGAL_assertion(!check_swapped_predecessors);
-
-    if (new_face_created) {
-      CGAL_assertion(new_he->is_on_outer_ccb());
-      // Note! new_he is not needed to define the new outer CCB of the new face
-      // Here, it can be the outer ccb of the old face, as there is also not
-      // swapping taking place!
-
-      // In case a new face has been created (pointed by the new halfedge we
-      // obtained), we have to examine the holes and isolated vertices in the
-      // existing face (pointed by the twin halfedge) and move the relevant
-      // holes and isolated vertices into the new face.
-      _relocate_in_new_face(new_he);
-    }
-  }
-
-  // Return a handle to the halfedge directed toward the new vertex v1.
-  CGAL_postcondition(new_he->direction() == ARR_RIGHT_TO_LEFT);
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that both its
-// endpoints corresponds to a given arrangement vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_at_vertices(const X_monotone_curve_2& cv,
-                   Vertex_handle v1, Vertex_handle v2,
-                   Face_handle f)
-{
-  CGAL_USE(f);
-
-  // Determine which one of the given vertices matches the left end of the
-  // given curve.
-  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
-  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
-
-  Arr_curve_end ind1;
-  Arr_curve_end ind2;
-
-  if (! at_obnd1) {
-    CGAL_precondition_code(Vertex_handle v_right);
-
-    if (! v1->is_at_open_boundary() &&
-        m_geom_traits->equal_2_object()
-        (v1->point(),
-         m_geom_traits->construct_min_vertex_2_object()(cv)))
-    {
-      ind1 = ARR_MIN_END;
-      ind2 = ARR_MAX_END;
-      CGAL_precondition_code(v_right = v2);
-    }
-    else {
-      CGAL_precondition_msg
-        (! v2->is_at_open_boundary() &&
-         m_geom_traits->equal_2_object()
-         (v2->point(),
-          m_geom_traits->construct_min_vertex_2_object()(cv)),
-         "One of the input vertices should be the left curve end.");
-
-      ind1 = ARR_MAX_END;
-      ind2 = ARR_MIN_END;
-      CGAL_precondition_code(v_right = v1);
-    }
-
-    CGAL_precondition_msg
-      ((! at_obnd2 &&
-        m_geom_traits->equal_2_object()
-        (v_right->point(),
-         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
-       (at_obnd2 && v_right->is_at_open_boundary()),
-       "One of the input vertices should be the right curve end.");
-  }
-  else {
-    if (! at_obnd2) {
-      CGAL_precondition_code(Vertex_handle v_left);
-
-      if (! v1->is_at_open_boundary() &&
-          m_geom_traits->equal_2_object()
-          (v1->point(),
-           m_geom_traits->construct_max_vertex_2_object()(cv)))
-      {
-        ind1 = ARR_MAX_END;
-        ind2 = ARR_MIN_END;
-        CGAL_precondition_code(v_left = v2);
-      }
-      else {
-        CGAL_precondition_msg
-          (! v2->is_at_open_boundary() &&
-           m_geom_traits->equal_2_object()
-           (v2->point(),
-            m_geom_traits->construct_max_vertex_2_object()(cv)),
-           "One of the input vertices should be the right curve end.");
-
-        ind1 = ARR_MIN_END;
-        ind2 = ARR_MAX_END;
-        CGAL_precondition_code(v_left = v1);
-      }
-
-      CGAL_precondition_msg
-        (at_obnd1 && v_left->is_at_open_boundary(),
-         "One of the input vertices should be the left curve end.");
-    }
-    else {
-      Arr_parameter_space  ps_x1 =
-        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-      Arr_parameter_space  ps_y1 =
-        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-
-      // Check which vertex should be associated with the minimal curve-end
-      // (so the other is associated with the maximal curve-end).
-      if (m_topol_traits.are_equal(_vertex(v1), cv, ARR_MIN_END, ps_x1, ps_y1))
-      {
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(v2), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        ind1 = ARR_MIN_END;
-        ind2 = ARR_MAX_END;
-      }
-      else {
-        CGAL_assertion(m_topol_traits.are_equal
-                       (_vertex(v2), cv, ARR_MIN_END, ps_x1, ps_y1));
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(v1), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        ind1 = ARR_MAX_END;
-        ind2 = ARR_MIN_END;
-      }
-    }
-  }
-
-  // Check whether one of the vertices has no incident halfedges.
-  if (v1->degree() == 0) {
-    // Get the face containing the isolated vertex v1.
-    DVertex* p_v1 = _vertex(v1);
-    DIso_vertex* iv1 = NULL;
-    DFace* f1 = NULL;
-
-    if (p_v1->is_isolated()) {
-      // Obtain the containing face from the isolated vertex record.
-      iv1 = p_v1->isolated_vertex();
-      f1 = iv1->face();
-
-      // Remove the isolated vertex v1, as it will not be isolated any more.
-      f1->erase_isolated_vertex(iv1);
-      _dcel().delete_isolated_vertex(iv1);
-    }
-
-    // Check whether the other vertex also has no incident halfedges.
-    if (v2->degree() == 0) {
-      // Both end-vertices are isolated. Make sure they are contained inside
-      // the same face.
-      DVertex* p_v2 = _vertex(v2);
-      DIso_vertex* iv2 = NULL;
-      DFace* f2 = NULL;
-
-      if (p_v2->is_isolated()) {
-        // Obtain the containing face from the isolated vertex record.
-        iv2 = p_v2->isolated_vertex();
-        f2 = iv2->face();
-
-        CGAL_assertion_msg
-          ((f1 == NULL) || (f1 == f2),
-           "The two isolated vertices must be located inside the same face.");
-
-        // Remove the isolated vertex v2, as it will not be isolated any more.
-        f2->erase_isolated_vertex(iv2);
-        _dcel().delete_isolated_vertex(iv2);
-      }
-      else if (f1 == NULL)
-        // In this case the containing face must be given by the user.
-        CGAL_precondition(f != Face_handle());
-
-      // Perform the insertion.
-      Arr_halfedge_direction cv_dir =
-        (ind1 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
-      DHalfedge* new_he = _insert_in_face_interior(f1, cv, cv_dir, p_v1, p_v2);
-
-      return (Halfedge_handle(new_he));
-    }
-
-    // Go over the incident halfedges around v2 and find the halfedge after
-    // which the new curve should be inserted.
-    DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
-    CGAL_assertion_msg
-      (prev2 != NULL,
-       "The inserted curve cannot be located in the arrangement.");
-
-    CGAL_assertion_code
-      (DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
-       prev2->outer_ccb()->face());
-
-    CGAL_assertion_msg
-      ((f1 == NULL) || (f1 == f2),
-       "The inserted curve should not intersect the existing arrangement.");
-
-    // Perform the insertion. Note that the returned halfedge is directed
-    // toward v1 (and not toward v2), so we return its twin.
-    Arr_halfedge_direction cv_dir =
-      (ind2 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
-    DHalfedge* new_he = _insert_from_vertex(prev2, cv, cv_dir, p_v1);
-
-    return (Halfedge_handle(new_he->opposite()));
-  }
-  else if (v2->degree() == 0) {
-    // Get the face containing the isolated vertex v2.
-    DVertex* p_v2 = _vertex(v2);
-    DIso_vertex* iv2 = NULL;
-    DFace* f2 = NULL;
-
-    if (v2->is_isolated()) {
-      // Obtain the containing face from the isolated vertex record.
-      iv2 = p_v2->isolated_vertex();
-      f2 = iv2->face();
-
-      // Remove the isolated vertex v2, as it will not be isolated any more.
-      f2->erase_isolated_vertex(iv2);
-      _dcel().delete_isolated_vertex(iv2);
-    }
-
-    // Go over the incident halfedges around v1 and find the halfedge after
-    // which the new curve should be inserted.
-    DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
-    CGAL_assertion_msg
-      (prev1 != NULL,
-       "The inserted curve cannot be located in the arrangement.");
-
-    CGAL_assertion_code
-      (DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
-       prev1->outer_ccb()->face());
-
-    CGAL_assertion_msg
-      ((f2 == NULL) || (f2 == f1),
-       "The inserted curve should not intersect the existing arrangement.");
-
-    // Perform the insertion.
-    Arr_halfedge_direction cv_dir =
-      (ind1 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
-    DHalfedge* new_he = _insert_from_vertex(prev1, cv, cv_dir, p_v2);
-
-    return (Halfedge_handle(new_he));
-  }
-
-  // Go over the incident halfedges around v1 and v2 and find the two
-  // halfedges after which the new curve should be inserted, respectively.
-  DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
-  DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
-
-  CGAL_assertion_msg
-    (((prev1 != NULL) && (prev2 != NULL)),
-     "The inserted curve cannot be located in the arrangement.");
-
-  // Perform the insertion.
-  return insert_at_vertices(cv, Halfedge_handle(prev1), Halfedge_handle(prev2));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that both its
-// endpoints correspond to given arrangement vertices, given the exact
-// place for the curve in one of the circular lists around a vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_at_vertices(const X_monotone_curve_2& cv,
-                   Halfedge_handle prev1,
-                   Vertex_handle v2)
-{
-  // Determine which one of the given vertices mathces the left end of the
-  // given curve.
-  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
-  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
-
-  Arr_curve_end      ind2;
-
-  if (! at_obnd1) {
-    CGAL_precondition_code(Vertex_handle  v_right);
-
-    if (! prev1->target()->is_at_open_boundary() &&
-        m_geom_traits->equal_2_object()
-        (prev1->target()->point(),
-         m_geom_traits->construct_min_vertex_2_object()(cv)))
-    {
-      ind2 = ARR_MAX_END;
-      CGAL_precondition_code(v_right = v2);
-    }
-    else {
-      CGAL_precondition_msg
-        (! v2->is_at_open_boundary() &&
-         m_geom_traits->equal_2_object()
-         (v2->point(),
-          m_geom_traits->construct_min_vertex_2_object()(cv)),
-         "One of the input vertices should be the left curve end.");
-
-      ind2 = ARR_MIN_END;
-      CGAL_precondition_code(v_right = prev1->target());
-    }
-
-    CGAL_precondition_msg
-      ((! at_obnd2 &&
-        m_geom_traits->equal_2_object()
-        (v_right->point(),
-         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
-       (at_obnd2 && v_right->is_at_open_boundary()),
-       "One of the input vertices should be the right curve end.");
-  }
-  else {
-    if (! at_obnd2) {
-      CGAL_precondition_code(Vertex_handle v_left);
-
-      if (! prev1->target()->is_at_open_boundary() &&
-          m_geom_traits->equal_2_object()
-          (prev1->target()->point(),
-           m_geom_traits->construct_max_vertex_2_object()(cv)))
-      {
-        ind2 = ARR_MIN_END;
-        CGAL_precondition_code(v_left = v2);
-      }
-      else {
-        CGAL_precondition_msg
-          (! v2->is_at_open_boundary() &&
-           m_geom_traits->equal_2_object()
-           (v2->point(),
-            m_geom_traits->construct_max_vertex_2_object()(cv)),
-           "One of the input vertices should be the right curve end.");
-
-        ind2 = ARR_MAX_END;
-        CGAL_precondition_code(v_left = prev1->target());
-      }
-
-      CGAL_precondition_msg
-        (at_obnd1 && v_left->is_at_open_boundary(),
-         "One of the input vertices should be the left curve end.");
-    }
-    else {
-      Arr_parameter_space  ps_x1 =
-        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-      Arr_parameter_space  ps_y1 =
-        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-
-      // Check which vertex should be associated with the minimal curve-end
-      // (so the other is associated with the maximal curve-end).
-      if (m_topol_traits.are_equal(_vertex(prev1->target()),
-                                   cv, ARR_MIN_END, ps_x1, ps_y1))
-      {
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(v2), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        ind2 = ARR_MAX_END;
-      }
-      else {
-        CGAL_assertion(m_topol_traits.are_equal
-                       (_vertex(v2), cv, ARR_MIN_END, ps_x1, ps_y1));
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(prev1->target()), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        ind2 = ARR_MIN_END;
-      }
-    }
-  }
-
-  // Check whether v2 is has no incident edges.
-  if (v2->degree() == 0) {
-    // Get the face containing the isolated vertex v2.
-    DVertex* p_v2 = _vertex(v2);
-    DIso_vertex* iv2 = NULL;
-    DFace* f2 = NULL;
-
-    if (v2->is_isolated()) {
-      iv2 = p_v2->isolated_vertex();
-      f2 = iv2->face();
-
-      CGAL_assertion_msg
-        (f2 == _face(prev1->face()),
-         "The inserted curve should not intersect the existing arrangement.");
-
-      // Remove the isolated vertex v2, as it will not be isolated any more.
-      f2->erase_isolated_vertex(iv2);
-      _dcel().delete_isolated_vertex(iv2);
-    }
-
-    // Perform the insertion.
-    Arr_halfedge_direction cv_dir =
-      (ind2 == ARR_MAX_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
-    DHalfedge* new_he = _insert_from_vertex(_halfedge(prev1), cv, cv_dir, p_v2);
-
-    return (Halfedge_handle(new_he));
-  }
-
-  // Go over the incident halfedges around v2 and find the halfedge after
-  // which the new curve should be inserted.
-  DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
-  CGAL_assertion_msg
-    (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
-
-  // Perform the insertion.
-  return (insert_at_vertices(cv, prev1, Halfedge_handle(prev2)));
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that both its
-// endpoints correspond to given arrangement vertices, given the exact
-// place for the curve in both circular lists around these two vertices.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-insert_at_vertices(const X_monotone_curve_2& cv,
-                   Halfedge_handle prev1,
-                   Halfedge_handle prev2)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: insert_at_vertices (interface)" << std::endl;
-  std::cout << "cv   : " << cv << std::endl;
-  if (!prev1->is_fictitious())
-    std::cout << "prev1: " << prev1->curve() << std::endl;
-  else
-    std::cout << "prev1: fictitious" << std::endl;
-  std::cout << "dir1 : " << prev1->direction() << std::endl;
-  if (!prev2->is_fictitious())
-    std::cout << "prev2: " << prev2->curve() << std::endl;
-  else
-    std::cout << "prev2: fictitious" << std::endl;
-  std::cout << "dir2 : " << prev2->direction() << std::endl;
-#endif
-
-  // Determine which one of the given vertices (the target vertices of the
-  // given halfedges) mathces the left end of the given curve.
-  // Thus, we can determine the comparison result between prev1->target()
-  // and prev2->target().
-  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
-  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
-  Comparison_result  res;
-
-  if (! at_obnd1) {
-    CGAL_precondition_code(Vertex_handle  v_right);
-
-    if (! prev1->target()->is_at_open_boundary() &&
-        m_geom_traits->equal_2_object()
-        (prev1->target()->point(),
-         m_geom_traits->construct_min_vertex_2_object()(cv)))
-    {
-      res = SMALLER;
-      CGAL_precondition_code(v_right = prev2->target());
-    }
-    else {
-      CGAL_precondition_msg
-        (! prev2->target()->is_at_open_boundary() &&
-         m_geom_traits->equal_2_object()
-         (prev2->target()->point(),
-          m_geom_traits->construct_min_vertex_2_object()(cv)),
-         "One of the input vertices should be the left curve end.");
-
-      res = LARGER;
-      CGAL_precondition_code(v_right = prev1->target());
-    }
-
-    CGAL_precondition_msg
-      ((! at_obnd2 &&
-        m_geom_traits->equal_2_object()
-        (v_right->point(),
-         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
-       (at_obnd2 && v_right->is_at_open_boundary()),
-       "One of the input vertices should be the right curve end.");
-  }
-  else {
-    if (! at_obnd2) {
-      CGAL_precondition_code(Vertex_handle  v_left);
-
-      if (! prev1->target()->is_at_open_boundary() &&
-          m_geom_traits->equal_2_object()
-          (prev1->target()->point(),
-           m_geom_traits->construct_max_vertex_2_object()(cv)))
-      {
-        res = LARGER;
-        CGAL_precondition_code(v_left = prev2->target());
-      }
-      else {
-        CGAL_precondition_msg
-          (! prev2->target()->is_at_open_boundary() &&
-           m_geom_traits->equal_2_object()
-           (prev2->target()->point(),
-            m_geom_traits->construct_max_vertex_2_object()(cv)),
-           "One of the input vertices should be the right curve end.");
-
-        res = SMALLER;
-        CGAL_precondition_code(v_left = prev1->target());
-      }
-
-      CGAL_precondition_msg
-        (at_obnd1 && v_left->is_at_open_boundary(),
-         "One of the input vertices should be the left curve end.");
-    }
-    else {
-      Arr_parameter_space ps_x1 =
-        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
-      Arr_parameter_space ps_y1 =
-        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
-      // Check which vertex should be associated with the minimal curve-end
-      // (so the other is associated with the maximal curve-end), and
-      // determine the comparison result of the two vertices accordingly.
-      if (m_topol_traits.are_equal(_vertex(prev1->target()),
-                                   cv, ARR_MIN_END, ps_x1, ps_y1))
-      {
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(prev2->target()), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        res = SMALLER;
-      }
-      else {
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(prev2->target()), cv, ARR_MIN_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END)));
-        CGAL_assertion
-          (m_topol_traits.are_equal
-           (_vertex(prev1->target()), cv, ARR_MAX_END,
-            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
-            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
-
-        res = LARGER;
-      }
-    }
-  }
-
-  // Check if e1 and e2 are on the same connected component.
-  DHalfedge* p_prev1 = _halfedge(prev1);
-  DHalfedge* p_prev2 = _halfedge(prev2);
-
-  // Note that in this case we may create a new face.
-  bool new_face_created = false;
-  bool swapped_predecessors = false;
-  DHalfedge* new_he =
-    _insert_at_vertices(p_prev1, cv,
-                        (res == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                        p_prev2->next(), new_face_created,
-                        swapped_predecessors);
-
-  if (new_face_created)
-    // Comment EBEB 2012-10-21: Here we allow swapping, as there might be
-    // a local minima (or other needs), and thus new_he can lie on an inner CCB.
-    // In fact we cannot expect new_he to lie on an inner or on an outer CCB.
-
-    // In case a new face has been created (pointed by the new halfedge we
-    // obtained), we have to examine the holes and isolated vertices in the
-    // existing face (pointed by the twin halfedge) and move the relevant
-    // holes and isolated vertices into the new face.
-    _relocate_in_new_face(new_he);
-
-  // Return a handle to the new halfedge directed from prev1's target to
-  // prev2's target. Note that this may be the twin halfedge of the one
-  // returned by _insert_at_vertices();
-  if (swapped_predecessors) new_he = new_he->opposite();
-
-  return (Halfedge_handle(new_he));
-}
-
-//-----------------------------------------------------------------------------
-// Replace the point associated with the given vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-modify_vertex(Vertex_handle vh, const Point_2& p)
-{
-  CGAL_precondition_msg
-    (! vh->is_at_open_boundary(),
-     "The modified vertex must not lie on open boundary.");
-  CGAL_precondition_msg(m_geom_traits->equal_2_object()(vh->point(), p),
-                        "The new point is different from the current one.");
-
-  // Modify the vertex.
-  _modify_vertex(_vertex(vh), p);
-
-  // Return a handle to the modified vertex.
-  return vh;
-}
-
-//-----------------------------------------------------------------------------
-// Remove an isolated vertex from the interior of a given face.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-remove_isolated_vertex(Vertex_handle v)
-{
-  CGAL_precondition(v->is_isolated());
-
-  // Get the face containing v.
-  DVertex* p_v = _vertex(v);
-  DIso_vertex* iv = p_v->isolated_vertex();
-  DFace* p_f = iv->face();
-  Face_handle f = Face_handle(p_f);
-
-  // Notify the observers that we are abount to remove a vertex.
-  _notify_before_remove_vertex(v);
-
-  // Remove the isolated vertex from the face that contains it.
-  p_f->erase_isolated_vertex(iv);
-  _dcel().delete_isolated_vertex(iv);
-
-  // Delete the vertex.
-  _delete_point(p_v->point());
-  _dcel().delete_vertex(p_v);
-
-  // Notify the observers that the vertex has been removed.
-  _notify_after_remove_vertex();
-
-  // Return a handle for the face that used to contain the deleted vertex.
-  return f;
-}
-
-//-----------------------------------------------------------------------------
-// Replace the x-monotone curve associated with the given edge.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv)
-{
-  CGAL_precondition_msg(! e->is_fictitious(),
-                        "The edge must be a valid one.");
-  CGAL_precondition_msg(m_geom_traits->equal_2_object()(e->curve(), cv),
-                        "The new curve is different from the current one.");
-
-  // Modify the edge.
-  _modify_edge(_halfedge(e), cv);
-
-  // Return a handle to the modified halfedge.
-  return e;
-}
-
-//-----------------------------------------------------------------------------
-// Split a given edge into two, and associate the given x-monotone
-// curves with the split edges.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-split_edge(Halfedge_handle e,
-           const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
-{
-  CGAL_precondition_msg(! e->is_fictitious(), "The edge must be a valid one.");
-
-  // Get the split halfedge and its twin, its source and target.
-  DHalfedge* he1 = _halfedge(e);
-  DHalfedge* he2 = he1->opposite();
-  DVertex* source = he2->vertex();
-  CGAL_precondition_code(DVertex* target = he1->vertex());
-
-  // Determine the point where we split the halfedge. We also determine which
-  // curve should be associated with he1 (and he2), which is the curve who
-  // has an endpoint that equals e's source, and which should be associated
-  // with the new pair of halfedges we are about to split (the one who has
-  // an endpoint which equals e's target).
-  if ((m_geom_traits->parameter_space_in_x_2_object()(cv1, ARR_MAX_END) ==
-       ARR_INTERIOR) &&
-      (m_geom_traits->parameter_space_in_y_2_object()(cv1, ARR_MAX_END) ==
-       ARR_INTERIOR))
-  {
-    const Point_2 & cv1_right =
-      m_geom_traits->construct_max_vertex_2_object()(cv1);
-
-    if ((m_geom_traits->parameter_space_in_x_2_object()(cv2, ARR_MIN_END) ==
-         ARR_INTERIOR) &&
-        (m_geom_traits->parameter_space_in_y_2_object()(cv2, ARR_MIN_END) ==
-         ARR_INTERIOR) &&
-        m_geom_traits->equal_2_object()(m_geom_traits->
-                                        construct_min_vertex_2_object()(cv2),
-                                        cv1_right))
-    {
-      // cv1's right endpoint and cv2's left endpoint are equal, so this should
-      // be the split point. Now we check whether cv1 is incident to e's source
-      // and cv2 to its target, or vice versa.
-      if (_are_equal(source, cv1, ARR_MIN_END)) {
-        CGAL_precondition_msg
-          (_are_equal(target, cv2, ARR_MAX_END),
-           "The subcurve endpoints must match e's end vertices.");
-
-        return (Halfedge_handle(_split_edge(he1, cv1_right, cv1, cv2)));
-      }
-
-      CGAL_precondition_msg
-        (_are_equal(source, cv2, ARR_MAX_END) &&
-         _are_equal(target, cv1, ARR_MIN_END),
-         "The subcurve endpoints must match e's end vertices.");
-
-      return (Halfedge_handle(_split_edge(he1, cv1_right, cv2, cv1)));
-    }
-  }
-
-  if ((m_geom_traits->parameter_space_in_x_2_object()(cv1, ARR_MIN_END) ==
-       ARR_INTERIOR) &&
-      (m_geom_traits->parameter_space_in_y_2_object()(cv1, ARR_MIN_END) ==
-       ARR_INTERIOR))
-  {
-    const Point_2 & cv1_left =
-      m_geom_traits->construct_min_vertex_2_object()(cv1);
-
-    if ((m_geom_traits->parameter_space_in_x_2_object()(cv2, ARR_MAX_END) ==
-         ARR_INTERIOR) &&
-        (m_geom_traits->parameter_space_in_y_2_object()(cv2, ARR_MAX_END) ==
-         ARR_INTERIOR) &&
-        m_geom_traits->equal_2_object()(m_geom_traits->
-                                        construct_max_vertex_2_object()(cv2),
-                                        cv1_left))
-    {
-      // cv1's left endpoint and cv2's right endpoint are equal, so this should
-      // be the split point. Now we check whether cv1 is incident to e's source
-      // and cv2 to its target, or vice versa.
-      if (_are_equal(source, cv2, ARR_MIN_END)) {
-        CGAL_precondition_msg
-          (_are_equal(target, cv1, ARR_MAX_END),
-           "The subcurve endpoints must match e's end vertices.");
-
-        return (Halfedge_handle(_split_edge(he1, cv1_left, cv2, cv1)));
-      }
-
-      CGAL_precondition_msg
-        (_are_equal(source, cv1, ARR_MAX_END) &&
-         _are_equal(target, cv2, ARR_MIN_END),
-         "The subcurve endpoints must match e's end vertices.");
-
-      return (Halfedge_handle(_split_edge(he1, cv1_left, cv1, cv2)));
-    }
-  }
-
-  CGAL_error_msg("The two subcurves must have a common endpoint.");
-  return Halfedge_handle();
-}
-
-//-----------------------------------------------------------------------------
-// Merge two edges to form a single edge, and associate the given x-monotone
-// curve with the merged edge.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-merge_edge(Halfedge_handle e1, Halfedge_handle e2,
-           const X_monotone_curve_2& cv)
-{
-  CGAL_precondition_msg(! e1->is_fictitious() && ! e2->is_fictitious(),
-                        "The edges must be a valid.");
-
-  // Assign pointers to the existing halfedges, such that we have:
-  //
-  //            he1      he3
-  //         -------> ------->
-  //       (.)      (.)v     (.)
-  //         <------- <-------
-  //            he2      he4
-  //
-  DHalfedge* _e1 = _halfedge(e1);
-  DHalfedge* _e2 = _halfedge(e2);
-  DHalfedge* he1 = NULL;
-  DHalfedge* he2 = NULL;
-  DHalfedge* he3 = NULL;
-  DHalfedge* he4 = NULL;
-
-  if (_e1->vertex() == _e2->opposite()->vertex()) {
-    he1 = _e1;
-    he2 = he1->opposite();
-    he3 = _e2;
-    he4 = he3->opposite();
-  }
-  else if (_e1->opposite()->vertex() == _e2->opposite()->vertex()) {
-    he2 = _e1;
-    he1 = he2->opposite();
-    he3 = _e2;
-    he4 = he3->opposite();
-  }
-  else if (_e1->vertex() == _e2->vertex()) {
-    he1 = _e1;
-    he2 = he1->opposite();
-    he4 = _e2;
-    he3 = he4->opposite();
-  }
-  else if (_e1->opposite()->vertex() == _e2->vertex()) {
-    he2 = _e1;
-    he1 = he2->opposite();
-    he4 = _e2;
-    he3 = he4->opposite();
-  }
-  else {
-    CGAL_precondition_msg(false,
-                          "The input edges do not share a common vertex.");
-    return Halfedge_handle();
-  }
-
-  // The vertex we are about to delete is now he1's target vertex.
-  // Make sure that he1 and he4 are the only halfedges directed to v.
-  DVertex* v = he1->vertex();
-
-  CGAL_precondition_msg
-    (! v->has_null_point(),
-     "The vertex removed by the merge must not lie on open boundary.");
-  CGAL_precondition_msg
-    (he1->next()->opposite() == he4 &&
-     he4->next()->opposite() == he1,
-     "The degree of the deleted vertex is greater than 2.");
-
-  // Make sure the curve ends match the end vertices of the merged edge.
-  CGAL_precondition_msg
-    ((_are_equal(he2->vertex(), cv, ARR_MIN_END) &&
-      _are_equal(he3->vertex(), cv, ARR_MAX_END)) ||
-     (_are_equal(he3->vertex(), cv, ARR_MIN_END) &&
-      _are_equal(he2->vertex(), cv, ARR_MAX_END)),
-     "The endpoints of the merged curve must match the end vertices.");
-
-  // Keep pointers to the components that contain two halfedges he3 and he2,
-  // pointing at the end vertices of the merged halfedge.
-  DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
-  DOuter_ccb* oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
-
-  DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
-  DOuter_ccb* oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
-
-  // Notify the observers that we are about to merge an edge.
-  _notify_before_merge_edge(e1, e2, cv);
-
-  // As he1 and he2 will evetually represent the merged edge, while he3 and he4
-  // will be deleted, check if the deleted halfedges are represantatives of a
-  // the CCBs they belong to. If so, replace he3 by he1 and he4 by he2. Note
-  // that as we just change the component representatives, we do not have to
-  // notify the observers on the change.
-  if (oc1 != NULL && oc1->halfedge() == he3)
-    oc1->set_halfedge(he1);
-  else if (ic1 != NULL && ic1->halfedge() == he3)
-    ic1->set_halfedge(he1);
-
-  if (oc2 != NULL && oc2->halfedge() == he4)
-    oc2->set_halfedge(he2);
-  else if (ic2 != NULL && ic2->halfedge() == he4)
-    ic2->set_halfedge(he2);
-
-  // If he3 is the incident halfedge to its target, replace it by he1.
-  if (he3->vertex()->halfedge() == he3)
-    he3->vertex()->set_halfedge(he1);
-
-  // Disconnect he3 and he4 from the edge list.
-  if (he3->next() == he4) {
-    // he3 and he4 form an "antenna", so he1 and he2 must be connected
-    // together.
-    he1->set_next(he2);
-  }
-  else {
-    he1->set_next(he3->next());
-    he4->prev()->set_next(he2);
-  }
-
-  // Note that he1 (and its twin) is going to represent the merged edge while
-  // he3 (and its twin) is going to be removed. We therefore associate the
-  // merged curve with he1 and delete the curve associated with he3.
-  he1->curve() = cv;
-  _delete_curve(he3->curve());
-
-  // Set the properties of the merged edge.
-  he1->set_vertex(he3->vertex());
-
-  // Notify the observers that we are about to delete a vertex.
-  _notify_before_remove_vertex(Vertex_handle(v));
-
-  // Delete the point associated with the merged vertex.
-  _delete_point(v->point());
-
-  // Delete the merged vertex.
-  _dcel().delete_vertex(v);
-
-  // Notify the observers that the vertex has been deleted.
-  _notify_after_remove_vertex();
-
-  // Delete the redundant halfedge pair.
-  _dcel().delete_edge(he3);
-
-  // Create a handle for one of the merged halfedges.
-  Halfedge_handle hh(he1);
-
-  // Notify the observers that the edge has been merge.
-  _notify_after_merge_edge(hh);
-
-  // Return a handle for one of the merged halfedges.
-  return hh;
-}
-
-//-----------------------------------------------------------------------------
-// Remove an edge from the arrangement.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-remove_edge(Halfedge_handle e, bool remove_source, bool remove_target)
-{
-  // Comment EBEB 2012-08-06: this has become a simple forwarding function
-  // the intelligence of wether to swap he with he->opposite()
-  // has been moved to _remove_edge itself, as additional computed
-  // data is reused there
-
-  CGAL_precondition_msg(! e->is_fictitious(),
-                        "The edge must be a valid one.");
-
-  DHalfedge* he1 = _halfedge(e);
-  DFace* f = _remove_edge(he1, remove_source, remove_target);
-  return Face_handle(f);
-}
-
-//-----------------------------------------------------------------------------
-// Protected member functions (for internal use).
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Locate the place for the given curve around the given vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_locate_around_vertex(DVertex* v,
-                      const X_monotone_curve_2& cv, Arr_curve_end ind) const
-{
-  // Check if the given curve-end has boundary conditions.
-  const Arr_parameter_space ps_x =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ind);
-  const Arr_parameter_space ps_y =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ind);
-
-  if ((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR))
-    // Use the topology-traits class to locate the predecessor halfedge for
-    // cv around the given vertex.
-    return m_topol_traits.locate_around_boundary_vertex(v, cv, ind, ps_x, ps_y);
-
-  // In case of a non-boundary vertex, we look for the predecessor around v.
-  // Get the first incident halfedge around v and the next halfedge.
-  DHalfedge* first = v->halfedge();
-  DHalfedge* curr = first;
-
-  if (curr == NULL) return NULL;
-
-  DHalfedge* next = curr->next()->opposite();
-
-  // In case there is only one halfedge incident to v, return this halfedge.
-  if (curr == next) return curr;
-
-  // Otherwise, we traverse the halfedges around v until we find the pair
-  // of adjacent halfedges between which we should insert cv.
-  typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
-    m_geom_traits->is_between_cw_2_object();
-
-  bool eq_curr, eq_next;
-  while (! is_between_cw(cv, (ind == ARR_MIN_END),
-                         curr->curve(),
-                         (curr->direction() == ARR_RIGHT_TO_LEFT),
-                         next->curve(),
-                         (next->direction() == ARR_RIGHT_TO_LEFT),
-                         v->point(), eq_curr, eq_next))
-  {
-    // If cv equals one of the curves associated with the halfedges, it is
-    // an illegal input curve, as it already exists in the arrangement.
-    if (eq_curr || eq_next) return NULL;
-
-    // Move to the next pair of incident halfedges.
-    curr = next;
-    next = curr->next()->opposite();
-
-    // If we completed a full traversal around v without locating the
-    // place for cv, it follows that cv overlaps and existing curve.
-    if (curr == first) return NULL;
-  }
-
-  // Return the halfedge we have located.
-  return curr;
-}
-
-//-----------------------------------------------------------------------------
-// Compute the distance (in halfedges) between two halfedges.
-//
-template <typename GeomTraits, typename TopTraits>
-unsigned int
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_halfedge_distance(const DHalfedge* e1, const DHalfedge* e2) const
-{
-  CGAL_precondition(e1 != e2);
-  if (e1 == e2) return (0);
-
-  // Traverse the halfedge chain from e1 until reaching e2.
-  const DHalfedge* curr = e1->next();
-  unsigned int dist = 1;
-
-  while (curr != e2) {
-    // If we have returned to e1, e2 is not reachable from e1.
-    if (curr == e1) {
-      CGAL_error();
-      return (0);
-    }
-
-    curr = curr->next();
-    ++dist;
-  }
-
-  // We have located e2 along the boundary of e1's component - return the
-  // distance (number of halfedges) between e1 and e2.
-  return (dist);
-}
-
-//-----------------------------------------------------------------------------
-//Compare the length of the induced paths from e1 to e2 and from e2 to e1.
-// return SMALLER if e1 to e2 is shorter, EQUAL if paths lengths are equal,
-//  o/w LARGER
-//
-template <typename GeomTraits, typename TopTraits>
-Comparison_result
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compare_induced_path_length(const DHalfedge* e1, const DHalfedge* e2) const
-{
-  CGAL_precondition(e1 != e2);
-  if (e1 == e2) return EQUAL;
-
-  // Traverse the halfedge chain from e1 until reaching e2.
-  const DHalfedge* curr1 = e1->next();
-  // Traverse the halfedge chain from e2 until reaching e1.
-  const DHalfedge* curr2 = e2->next();
-
-  while ((curr1 != e2) && (curr2 != e1)) {
-    // If we have returned to e1, e2 is not reachable from e1.
-    if (curr1 == e1) {
-      CGAL_error();
-      return EQUAL;
-    }
-
-    // If we have returned to e2, e1 is not reachable from e2.
-    if (curr2 == e2) {
-      CGAL_error();
-      return EQUAL;
-    }
-
-    curr1 = curr1->next();
-    curr2 = curr2->next();
-  }
-
-  // Return SMALLER if e1 to e2 is shorter than e2 to e1,
-  //  EQUAL if their lengths are equal, or LARGER if e2 to e1 is longer.
-  Comparison_result res =
-    (curr1 == e2) ? ((curr2 != e1) ? SMALLER : EQUAL) : LARGER;
-
-  CGAL_postcondition_code(int dist1 = _halfedge_distance(e1,e2));
-  CGAL_postcondition_code(int dist2 = _halfedge_distance(e2,e1));
-  CGAL_postcondition(((dist1 < dist2) && (res == SMALLER)) ||
-                     ((dist1 == dist2) && (res == EQUAL)) ||
-                     ((dist1 > dist2) && (res == LARGER)));
-
-  return res;
-}
-
-//-----------------------------------------------------------------------------
-// Move a given outer CCB from one face to another.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he)
-{
-  // Get the DCEL record that represents the outer CCB.
-  DOuter_ccb* oc = he->outer_ccb();
-
-  CGAL_assertion(oc->face() == from_face);
-
-  // Notify the observers that we are about to move an outer CCB.
-  Ccb_halfedge_circulator circ = (Halfedge_handle(he))->ccb();
-
-  _notify_before_move_outer_ccb(Face_handle(from_face), Face_handle(to_face),
-                                circ);
-
-  // Remove the hole from the current face.
-  from_face->erase_outer_ccb(oc);
-
-  // Modify the component that represents the hole.
-  oc->set_face(to_face);
-  to_face->add_outer_ccb(oc, he);
-
-  // Notify the observers that we have moved the outer CCB.
-  _notify_after_move_outer_ccb(circ);
-}
-
-//-----------------------------------------------------------------------------
-// Move a given inner CCB (hole) from one face to another.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_move_inner_ccb(DFace* from_face, DFace* to_face, DHalfedge* he)
-{
-  // Get the DCEL record that represents the inner CCB.
-  DInner_ccb* ic = he->inner_ccb();
-
-  CGAL_assertion(ic->face() == from_face);
-
-  // Notify the observers that we are about to move an inner CCB.
-  Ccb_halfedge_circulator   circ = (Halfedge_handle(he))->ccb();
-
-  _notify_before_move_inner_ccb(Face_handle(from_face), Face_handle(to_face),
-                                circ);
-
-  // Remove the hole from the current face.
-  from_face->erase_inner_ccb(ic);
-
-  // Modify the component that represents the hole.
-  ic->set_face(to_face);
-  to_face->add_inner_ccb(ic, he);
-
-  // Notify the observers that we have moved the inner CCB.
-  _notify_after_move_inner_ccb(circ);
-}
-
-//-----------------------------------------------------------------------------
-// Insert the given vertex as an isolated vertex inside the given face.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_insert_isolated_vertex(DFace* f, DVertex* v)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: _insert_isolated_vertex (internal)" << std::endl;
-  if (!v->has_null_point())
-    std::cout << "v->point: " << v->point() << std::endl;
-  std::cout << "face   : " << f << std::endl;
-#endif
-
-  Face_handle fh(f);
-  Vertex_handle vh(v);
-
-  // Notify the observers that we are about to insert an isolated vertex
-  // inside f.
-  _notify_before_add_isolated_vertex(fh, vh);
-
-  // Create an isolated vertex-information object,
-  DIso_vertex* iv = _dcel().new_isolated_vertex();
-
-  // Set a pointer to the face containing the vertex.
-  iv->set_face(f);
-
-  // Initiate a new hole inside the given face.
-  f->add_isolated_vertex(iv, v);
-
-  // Associate the information with the vertex.
-  v->set_isolated_vertex(iv);
-
-  // Notify the observers that we have formed a new isolated vertex.
-  _notify_after_add_isolated_vertex(vh);
-}
-
-//-----------------------------------------------------------------------------
-// Move a given isolated vertex from one face to another.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v)
-{
-  // Get the DCEL isolated-vertex record.
-  DIso_vertex* iv = v->isolated_vertex();
-
-  // Notify the observers that we are about to move an isolated vertex.
-  Vertex_handle vh(v);
-
-  _notify_before_move_isolated_vertex(Face_handle(from_face),
-                                      Face_handle(to_face), vh);
-
-  // Set the new face is the isolated vertex-information object.
-  iv->set_face(to_face);
-
-  // Move the isolated vertex from the first face to the other.
-  from_face->erase_isolated_vertex(iv);
-  to_face->add_isolated_vertex(iv, v);
-
-  // Notify the observers that we have moved the isolated vertex.
-  _notify_after_move_isolated_vertex(vh);
-}
-
-//-----------------------------------------------------------------------------
-// Create a new vertex and associate it with the given point.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_create_vertex(const Point_2& p)
-{
-  // Notify the observers that we are about to create a new vertex.
-  Point_2* p_p = _new_point(p);
-
-  _notify_before_create_vertex(*p_p);
-
-  // Create a new vertex and associate it with the given point.
-  DVertex* v = _dcel().new_vertex();
-
-  v->set_point(p_p);
-  v->set_boundary(ARR_INTERIOR, ARR_INTERIOR);
-
-  // Notify the observers that we have just created a new vertex.
-  Vertex_handle   vh(v);
-  _notify_after_create_vertex(vh);
-
-  return v;
-}
-
-//-----------------------------------------------------------------------------
-// Create a new vertex on boundary
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_create_boundary_vertex(const X_monotone_curve_2& cv, Arr_curve_end ind,
-                        Arr_parameter_space ps_x, Arr_parameter_space ps_y)
-{
-  CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
-
-  // Notify the observers that we are about to create a new boundary vertex.
-  _notify_before_create_boundary_vertex(cv, ind, ps_x, ps_y);
-
-  // Create a new vertex and set its boundary conditions.
-  DVertex* v = _dcel().new_vertex();
-
-  v->set_boundary(ps_x, ps_y);
-
-  // Act according to the boundary type if there is one:
-  if (is_open(ps_x, ps_y))
-    // The curve-end lies on open boundary so the vertex is not associated
-    // with a valid point.
-    v->set_point(NULL);
-  else {
-    // Create a boundary vertex associated with a valid point.
-    Point_2* p_p = (ind == ARR_MIN_END) ?
-      _new_point(m_geom_traits->construct_min_vertex_2_object()(cv)) :
-      _new_point(m_geom_traits->construct_max_vertex_2_object()(cv));
-
-    v->set_point(p_p);
-  }
-
-  // Notify the observers that we have just created a new boundary vertex.
-  Vertex_handle   vh(v);
-  _notify_after_create_boundary_vertex(vh);
-
-  return v;
-}
-
-//-----------------------------------------------------------------------------
-// Locate the DCEL features that will be used for inserting the given curve
-// end, which has a boundary condition, and set the proper vertex there.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_place_and_set_curve_end(DFace* f,
-                         const X_monotone_curve_2& cv, Arr_curve_end ind,
-                         Arr_parameter_space ps_x, Arr_parameter_space ps_y,
-                         DHalfedge** p_pred)
-{
-  // Use the topology traits to locate the DCEL feature that contains the
-  // given curve end.
-  CGAL::Object obj =
-    m_topol_traits.place_boundary_vertex(f, cv, ind, ps_x, ps_y);
-  DVertex* v;
-  DHalfedge* fict_he;
-
-  // Act according to the result type.
-  if (CGAL::assign(fict_he, obj)) {
-    // The curve end is located on a fictitious edge. We first create a new
-    // vertex that corresponds to the curve end.
-    v = _create_boundary_vertex(cv, ind, ps_x, ps_y);
-
-    // Split the fictitious halfedge at the newly created vertex.
-    // The returned halfedge is the predecessor for the insertion of the curve
-    // end around v.
-    _notify_before_split_fictitious_edge(Halfedge_handle(fict_he),
-                                         Vertex_handle(v));
-
-    *p_pred = m_topol_traits.split_fictitious_edge(fict_he, v);
-
-    _notify_after_split_fictitious_edge(Halfedge_handle(*p_pred),
-                                        Halfedge_handle((*p_pred)->next()));
-  }
-  else if (CGAL::assign(v, obj)) {
-    // In this case we are given an existing vertex that represents the curve
-    // end. We now have to locate the predecessor edge for the insertion of cv
-    // around this vertex.
-    *p_pred =
-      m_topol_traits.locate_around_boundary_vertex(v, cv, ind, ps_x, ps_y);
-  }
-  else {
-    CGAL_assertion(obj.is_empty());
-
-    // In this case we have to create a new vertex that reprsents the given
-    // curve end.
-    v = _create_boundary_vertex(cv, ind, ps_x, ps_y);
-
-    // Notify the topology traits on the creation of the boundary vertex.
-    m_topol_traits.notify_on_boundary_vertex_creation(v, cv, ind, ps_x, ps_y);
-
-    // There are no edges incident to v, therefore no predecessor halfedge.
-    *p_pred = NULL;
-  }
-
-  // Return the vertex that represents the curve end.
-  return v;
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that both its
-// endpoints correspond to free arrangement vertices (newly created vertices
-// or existing isolated vertices), so a new inner CCB is formed in the face
-// that contains the two vertices.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_insert_in_face_interior(DFace* f,
-                         const X_monotone_curve_2& cv,
-                         Arr_halfedge_direction cv_dir,
-                         DVertex* v1, DVertex* v2)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: _insert_in_face_interior (internal)" << std::endl;
-  std::cout << "face  : " << f << std::endl;
-  std::cout << "cv    : " << cv << std::endl;
-  std::cout << "cv_dir: " << cv_dir << std::endl;
-  if (!v1->has_null_point())
-    std::cout << "v1->point: " << v1->point() << std::endl;
-  if (!v2->has_null_point())
-    std::cout << "v2->point: " << v2->point() << std::endl;
-#endif
-
-  // Notify the observers that we are about to create a new edge.
-  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
-
-  // Create a pair of twin halfedges connecting the two vertices,
-  // and link them together to form a new connected component, a hole in f.
-  DHalfedge* he1 = _dcel().new_edge();
-  DHalfedge* he2 = he1->opposite();
-  DInner_ccb* ic = _dcel().new_inner_ccb();
-  X_monotone_curve_2* dup_cv = _new_curve(cv);
-
-  ic->set_face(f);
-  he1->set_curve(dup_cv);
-
-  he1->set_next(he2);
-  he1->set_vertex(v1);
-  he1->set_inner_ccb(ic);
-
-  he2->set_next(he1);
-  he2->set_vertex(v2);
-  he2->set_inner_ccb(ic);
-
-  // Assign the incident halfedges of the two new vertices.
-  v1->set_halfedge(he1);
-  v2->set_halfedge(he2);
-
-  // Set the direction of the halfedges
-  he2->set_direction(cv_dir);
-
-  // Create a handle to the new halfedge pointing at the curve target.
-  Halfedge_handle hh(he2);
-
-  // Notify the observers that we have created a new edge.
-  _notify_after_create_edge(hh);
-
-  // Notify the observers that we are about to form a new inner CCB inside f.
-  _notify_before_add_inner_ccb(Face_handle(f), hh);
-
-  // Initiate a new inner CCB inside the given face.
-  f->add_inner_ccb(ic, he2);
-
-  // Notify the observers that we have formed a new inner CCB.
-  _notify_after_add_inner_ccb(hh->ccb());
-
-  return he2;
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, such that one of its
-// endpoints corresponds to a given arrangement vertex, given the exact
-// place for the curve in the circular list around this vertex. The other
-// endpoint corrsponds to a free vertex (a newly created vertex or an
-// isolated vertex).
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
-                    Arr_halfedge_direction cv_dir,
-                    DVertex* v)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: _insert_from_vertex (internal)" << std::endl;
-  if (!he_to->has_null_curve())
-    std::cout << "he_to: " << he_to->curve() << std::endl;
-  else
-    std::cout << "he_to: fictitious" << std::endl;
-  std::cout << "f_to: " << (he_to->is_on_inner_ccb() ?
-                            he_to->inner_ccb()->face() :
-                            he_to->outer_ccb()->face()) << std::endl;
-  std::cout << "cv    : " << cv << std::endl;
-  std::cout << "cv_dir: " << cv_dir << std::endl;
-  if (!v->has_null_point())
-    std::cout << "v->point: " << v->point() << std::endl;
-#endif
-
-  // Get the incident face of the previous halfedge. Note that this will also
-  // be the incident face of the two new halfedges we are about to create.
-  DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : NULL;
-  DOuter_ccb* oc = (ic == NULL) ? he_to->outer_ccb() : NULL;
-
-  // The first vertex is the one that the he_to halfedge points to.
-  // The second vertex is given by v.
-  DVertex* v1 = he_to->vertex();
-  DVertex* v2 = v;
-
-  // Notify the observers that we are about to create a new edge.
-  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
-
-  // Create a pair of twin halfedges connecting the two vertices,
-  // and associate them with the given curve.
-  DHalfedge* he1 = _dcel().new_edge();
-  DHalfedge* he2 = he1->opposite();
-  X_monotone_curve_2* dup_cv = _new_curve(cv);
-
-  he1->set_curve(dup_cv);
-
-  he1->set_vertex(v1);
-  he2->set_vertex(v2);
-
-  // Set the component for the new halfedge pair.
-  if (oc != NULL) {
-    // On an outer component:
-    he1->set_outer_ccb(oc);
-    he2->set_outer_ccb(oc);
-  }
-  else {
-    // On an inner component:
-    he1->set_inner_ccb(ic);
-    he2->set_inner_ccb(ic);
-  }
-
-  // Associate the incident halfedge of the new vertex.
-  v2->set_halfedge(he2);
-
-  // Link the new halfedges around the existing vertex v1.
-  he2->set_next(he1);
-  he1->set_next(he_to->next());
-
-  he_to->set_next(he2);
-
-  // Set the direction of the halfedges
-  he2->set_direction(cv_dir);
-
-  // Notify the observers that we have created a new edge.
-  _notify_after_create_edge(Halfedge_handle(he2));
-
-  // Return a pointer to the new halfedge whose target is the free vertex v.
-  return he2;
-}
-
-//-----------------------------------------------------------------------------
-// Insert an x-monotone curve into the arrangement, where the end vertices
-// are given by the target points of two given halfedges.
-// The two halfedges should be given such that in case a new face is formed,
-// it will be the incident face of the halfedge directed from the first
-// vertex to the second vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_insert_at_vertices(DHalfedge* he_to,
-                    const X_monotone_curve_2& cv,
-                    Arr_halfedge_direction cv_dir,
-                    DHalfedge* he_away,
-                    bool& new_face,
-                    bool& swapped_predecessors,
-                    bool allow_swap_of_predecessors /* = true */)
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "_insert_at_vertices: " << cv << std::endl;
-#endif
-  // Comment: This is how the situation looks
-  //    ----to--->  >>cv_dir>>  ---away--->
-  //               o ===cv=== 0
-  //    <-tonext--              <-awaynext-
-  // or to be read from right to left ...
-  // this way, he_to and he_away lie
-  // BEFORE insertion on the same inner ccb and
-  // AFTER insertion on the same outer ccb
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: _insert_at_vertices (internal)" << std::endl;
-
-  if (!he_to->has_null_curve())
-    std::cout << "he_to: " << he_to->curve() << std::endl;
-  else
-    std::cout << "he_to: fictitious" << std::endl;
-  std::cout << "dir1 : " << he_to->direction() << std::endl;
-  std::cout << "f_to : " << (he_to->is_on_inner_ccb() ?
-                            he_to->inner_ccb()->face() :
-                            he_to->outer_ccb()->face()) << std::endl;
-  std::cout << "cv    : " << cv << std::endl;
-  std::cout << "cv_dir: " << cv_dir << std::endl;
-  if (!he_away->has_null_curve())
-    std::cout << "he_away: " << he_away->curve() << std::endl;
-  else
-    std::cout << "he_away: fictitious" << std::endl;
-  std::cout << "dir 2 : " << he_away->direction() << std::endl;
-  std::cout << "f_away: " << (he_away->is_on_inner_ccb() ?
-                             he_away->inner_ccb()->face() :
-                             he_away->outer_ccb()->face()) << std::endl;
-#endif
-
-  CGAL_precondition(he_to != NULL);
-  CGAL_precondition(he_away != NULL);
-
-  // TODO EBEB 2012-10-21 rewrite the code in terms of he_to and he_away instead of prev1 and prev2
-  // the remainder of the function we deal with this situation adds he1 and
-  // he2 in this way:
-  //    ----prev1---> ( --he2--> ) ---p2next--->
-  //                  o ===cv=== 0
-  //    <---p1next--- ( <--he1-- ) <---prev2----
-  DHalfedge* prev1 = he_to;
-  DHalfedge* prev2 = he_away->prev();
-
-  CGAL_precondition(prev1 != NULL);
-  CGAL_precondition(prev2 != NULL);
-  CGAL_precondition(prev1 != prev2);
-
-  // in general we do not swap ...
-  swapped_predecessors = false;
-
-  // default values for signs
-  std::pair<Sign, Sign> signs1(ZERO, ZERO);
-  std::pair<Sign, Sign> signs2(ZERO, ZERO);
-  // Remark: signs1 and signs2 are only used later when hole1==hole2
-
-  // Comment: This also checks which is the 'cheaper' (previously the
-  //          'shorter') way to insert the curve. Now cheaper means checking
-  //          less local minima!
-  if (allow_swap_of_predecessors) {
-    bool swap_predecessors = false;
-
-    // Comment EBEB 2012-08-05 hole1/hole2 appear later as ic1/ic2, but we keep
-    // them here, as the usage is rather local to decide swapping
-    DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
-    DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
-
-    if ((hole1 == hole2) && (hole1 != NULL)) {
-      // .. only in this special case, we have to check wether swapping should
-      // take place
-
-      // EBEB 2012-07-26 the following code enables optimizations:
-      // - avoid length-test
-      // - search only local minima to find leftmost vertex
-      // - re-use of signs of ccbs
-      // signs1/2 are only used when hole1 == hole2,
-      // thus we have to init them now
-      Arr_halfedge_direction cv_dir1 = cv_dir;
-      std::list<std::pair<const DHalfedge*, int> > local_mins1;
-      signs1 =
-        _compute_signs_and_local_minima(prev1, cv, cv_dir1, prev2->next(),
-                                        std::back_inserter(local_mins1));
-
-      Arr_halfedge_direction cv_dir2 = (cv_dir == ARR_LEFT_TO_RIGHT) ?
-        CGAL::ARR_RIGHT_TO_LEFT : CGAL::ARR_LEFT_TO_RIGHT;
-      std::list< std::pair< const DHalfedge*, int > > local_mins2;
-      signs2 =
-        _compute_signs_and_local_minima(prev2, cv, cv_dir2, prev1->next(),
-                                        std::back_inserter(local_mins2));
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "signs1.x: " << signs1.first << std::endl;
-      std::cout << "signs1.y: " << signs1.second << std::endl;
-      std::cout << "signs2.x: " << signs2.first << std::endl;
-      std::cout << "signs2.y: " << signs2.second << std::endl;
-      std::cout << "#local_mins1: " << local_mins1.size() << std::endl;
-      std::cout << "#local_mins2: " << local_mins2.size() << std::endl;
-#endif
-
-      if (!m_topol_traits.let_me_decide_the_outer_ccb(signs1, signs2,
-                                                      swap_predecessors))
-      {
-        // COMMENT: The previous solution needed O(min(length1, length2)) steps
-        //          to determine which path is shorter and the search for the
-        //          leftmost vertex on a path needs O(#local_mins) geometric
-        //          comparison. This solution saves the initial loop to
-        //          determine the shorter path and will only need O(min(#local
-        //          _mins1, #local_mins2)) geometric comparisons to determine
-        //          the leftmost vertex on a path.
-
-        // If there are no local minima in one the paths, it is expected
-        // that the topology traits (or its adapter) do decide the outer ccb.
-        CGAL_assertion(local_mins1.size() > 0);
-        CGAL_assertion(local_mins2.size() > 0);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-        std::cout << "decide swap" << std::endl;
-#endif
-
-        swap_predecessors =
-          !((local_mins1.size() < local_mins2.size()) ?
-            (  _defines_outer_ccb_of_new_face(prev1, cv, prev2->next(),
-                                              local_mins1.begin(),
-                                              local_mins1.end())) :
-            (! _defines_outer_ccb_of_new_face(prev2, cv, prev1->next(),
-                                              local_mins2.begin(),
-                                              local_mins2.end())));
-      }
-
-      // perform the swap
-      if (swap_predecessors) {
-        std::swap(prev1, prev2);
-        cv_dir = (cv_dir == ARR_LEFT_TO_RIGHT) ?
-          CGAL::ARR_RIGHT_TO_LEFT : CGAL::ARR_LEFT_TO_RIGHT;
-        std::swap(signs1, signs2);
-        std::swap(local_mins1, local_mins2);
-
-        // and store the value
-        swapped_predecessors = true;
-      }
-    }
-
-    // EBEB: For now, local_mins1/2 are local to this pre-check
-    // Idea: Use it later, however, this spoils uses of _insert_at_vertices
-    //       where allow_swap = false
-    //       On the other hand: this would allow to set representative
-    //       halfedge of ccbs to point to minimal vertex
-
-  } // allow_swap_of_predecessors
-
-  // Get the vertices that match cv's endpoints.
-  DVertex* v1 = prev1->vertex();
-  DVertex* v2 = prev2->vertex();
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "Aos_2: _insert_at_vertices (internal)" << std::endl;
-
-  std::cout << "cv   : " << cv << std::endl;
-  if (!prev1->has_null_curve())
-    std::cout << "prev1: " << prev1->curve() << std::endl;
-  else
-    std::cout << "prev1: fictitious" << std::endl;
-  std::cout << "dir1 : " << prev1->direction() << std::endl;
-  std::cout << "pref: " << (prev1->is_on_inner_ccb() ?
-                            prev1->inner_ccb()->face() :
-                            prev1->outer_ccb()->face()) << std::endl;
-  if (!prev2->has_null_curve())
-    std::cout << "prev2: " << prev2->curve() << std::endl;
-  else
-    std::cout << "prev2: fictitious" << std::endl;
-  std::cout << "dir 2: " << prev2->direction() << std::endl;
-  std::cout << "pref2: " << (prev2->is_on_inner_ccb() ?
-                             prev2->inner_ccb()->face() :
-                             prev2->outer_ccb()->face()) << std::endl;
-  std::cout << "cv_dir: " << cv_dir << std::endl;
-#endif
-
-  // Get the components containing the two previous halfedges and the incident
-  // face (which should be the same for the two components).
-  DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
-  DOuter_ccb* oc1 = (ic1 == NULL) ? prev1->outer_ccb() : NULL;
-  DFace* f = (ic1 != NULL) ? ic1->face() : oc1->face();
-  DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
-  DOuter_ccb* oc2 = (ic2 == NULL) ? prev2->outer_ccb() : NULL;
-
-  CGAL_precondition_code(DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face());
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "ic1: " << ic1 << std::endl;
-  std::cout << "ic2: " << ic2 << std::endl;
-  std::cout << "oc1: " << oc1 << std::endl;
-  std::cout << "oc2: " << oc2 << std::endl;
-  std::cout << "f1: " << &(*f) << std::endl;
-
-#if 0
-  DHalfedge* curr = prev1;
-  if (curr != curr->next()) {
-    curr = curr->next();
-    while (curr != prev1) {
-      if (!curr->has_null_curve())
-        std::cout << "curr: " << curr->curve() << std::endl;
-      else
-        std::cout << "curr: fictitious" << std::endl;
-      std::cout << "dir: "
-                << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ?
-                    "L2R" : "R2L")
-                << std::endl;
-      curr = curr->next();
-    }
-  } else {
-    std::cout << "only prev1" << std::endl;
-  }
-#endif
-
-  CGAL_precondition_code(std::cout << "f2: " << &(*f2) << std::endl);
-
-#if 0
-  curr = prev2;
-  if (curr != curr->next()) {
-    curr = curr->next();
-    while (curr != prev2) {
-      if (!curr->has_null_curve())
-        std::cout << "curr: " << curr->curve() << std::endl;
-      else
-        std::cout << "curr: fictitious" << std::endl;
-      std::cout << "dir: "
-                << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ?
-                    "L2R" : "R2L")
-                << std::endl;
-      curr = curr->next();
-    }
-  } else
-    std::cout << "only prev2" << std::endl;
-#endif
-#endif // CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-
-  CGAL_precondition_msg
-    (f == f2, "The two halfedges must share the same incident face.");
-
-  // In case the two previous halfedges lie on the same inner component inside
-  // the face f, we use the topology-traits class to determine whether we have
-  // to create a new face by splitting f, and if so - whether new face is
-  // contained in the existing face or just adjacent to it.
-  bool split_new_face = true;
-  bool is_split_face_contained = false;
-
-  if ((ic1 != NULL) && (ic1 == ic2)) {
-
-    // EBEB 2012-08-06:
-    // This is new code. It relies on the (computed) signs and replaces to
-    // trace the ccb again (in particular for torical arrangements)
-    // TODO EBEB 2012-08-06:
-    // Check what to do here, when allow_swap_of_predecessors = false and thus
-    // signs1 and signs2 set to DEFAULT (=ZERO) values.
-    // swapping is currently only disabled when _insert_at_vertices is called
-    // from Arr_construction_sl_visitor, which however uses the
-    // 'swap_predecessors' member of the topology traits' construction helper.
-    // So it's questionable whether we can combine the light-weigth swap
-    // information with the slightly more expensive sign computations, to keep
-    // efficient translated code after compile-time.
-    std::pair<bool, bool> res =
-      m_topol_traits.face_split_after_edge_insertion(signs1, signs2);
-
-    split_new_face = res.first;
-    is_split_face_contained = res.second;
-
-    // The result <false, true> is illegal:
-    CGAL_assertion(split_new_face || ! is_split_face_contained);
-  }
-
-  // Notify the observers that we are about to create a new edge.
-  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
-
-  // Create a pair of twin halfedges connecting v1 and v2 and associate them
-  // with the given curve.
-  DHalfedge* he1 = _dcel().new_edge();
-  DHalfedge* he2 = he1->opposite();
-  X_monotone_curve_2* dup_cv = _new_curve(cv);
-
-  he1->set_curve(dup_cv);
-
-  he1->set_vertex(v1);
-  he2->set_vertex(v2);
-
-  // Connect the new halfedges to the existing halfedges around the two
-  // incident vertices.
-  he1->set_next(prev1->next());
-  he2->set_next(prev2->next());
-
-  prev1->set_next(he2);
-  prev2->set_next(he1);
-
-  he2->set_direction(cv_dir);
-
-  // Check the various cases of insertion (in the design document: the
-  // various sub-cases of case 3 in the insertion procedure).
-  if (((ic1 != NULL) || (ic2 != NULL)) && (ic1 != ic2)) {
-    // In case we have to connect two disconnected components, no new face
-    // is created.
-    new_face = false;
-
-    // Check whether both halfedges are inner components (holes) in the same
-    // face, or whether one is a hole and the other is on the outer boundary
-    // of the face.
-    Face_handle fh(f);
-
-    if ((ic1 != NULL) && (ic2 != NULL)) {
-      // In this case (3.1) we have to connect to inner CCBs (holes) inside f.
-      // Notify the observers that we are about to merge two holes in the face.
-      _notify_before_merge_inner_ccb(fh,
-                                     (Halfedge_handle(prev1))->ccb(),
-                                     (Halfedge_handle(prev2))->ccb(),
-                                     Halfedge_handle(he1));
-
-      // Remove the inner component prev2 belongs to, and unite it with the
-      // inner component that prev1 belongs to.
-      f->erase_inner_ccb(ic2);
-
-      // Set the merged component for the two new halfedges.
-      he1->set_inner_ccb(ic1);
-      he2->set_inner_ccb(ic1);
-
-      // Make all halfedges along ic2 to point to ic1.
-      DHalfedge* curr;
-
-      for (curr = he2->next(); curr != he1; curr = curr->next())
-        curr->set_inner_ccb(ic1);
-
-      // Delete the redundant inner CCB.
-      _dcel().delete_inner_ccb(ic2);
-
-      // Notify the observers that we have merged the two inner CCBs.
-      _notify_after_merge_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
-    }
-    else {
-      // In this case (3.2) we connect a hole (inner CCB) with an outer CCB
-      // of the face that contains it. We remove the hole and associate the
-      // pair of new halfedges with the outer boundary of the face f.
-      DInner_ccb* del_ic;
-      DOuter_ccb* oc;
-      DHalfedge* ccb_first;
-      DHalfedge* ccb_last;
-
-      if (ic1 != NULL) {
-        // We remove the inner CCB ic1 and merge in with the outer CCB oc2.
-        del_ic = ic1;
-        oc = oc2;
-        ccb_first = he1->next();
-        ccb_last = he2;
-      }
-      else {
-        // We remove the inner CCB ic2 and merge in with the outer CCB oc1.
-        del_ic = ic2;
-        oc = oc1;
-        ccb_first = he2->next();
-        ccb_last = he1;
-      }
-
-      he1->set_outer_ccb(oc);
-      he2->set_outer_ccb(oc);
-
-      // Notify the observers that we are about to remove an inner CCB from
-      // the face.
-      _notify_before_remove_inner_ccb(fh, (Halfedge_handle(ccb_first))->ccb());
-
-      // Remove the inner CCB from the face, as we have just connected it to
-      // the outer boundary of its incident face.
-      f->erase_inner_ccb(del_ic);
-
-      // Make all halfedges along the inner CCB to point to the outer CCB of f.
-      DHalfedge* curr;
-      for (curr = ccb_first; curr != ccb_last; curr = curr->next())
-        curr->set_outer_ccb(oc);
-
-      // Delete the redundant hole.
-      _dcel().delete_inner_ccb(del_ic);
-
-      // Notify the observers that we have removed an inner ccb.
-      _notify_after_remove_inner_ccb(fh);
-    }
-  }
-  else if (! split_new_face) {
-    // RWRW: NEW!
-    CGAL_assertion((ic1 == ic2) && (ic1 != NULL));
-
-    // Handle the special case where we close an inner CCB, such that
-    // we form two outer CCBs of the same face.
-    Face_handle fh(f);
-
-    // Notify the obserers we are about to remove an inner CCB from f.
-    _notify_before_remove_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
-
-    // Erase the inner CCB from the incident face and delete the
-    // corresponding component.
-    f->erase_inner_ccb(ic1);
-
-    _dcel().delete_inner_ccb(ic1);
-
-    // Notify the observers that the inner CCB has been removed.
-    _notify_after_remove_inner_ccb(fh);
-
-    // Handle the first split outer CCB (the one containing he1):
-    // Notify the obserers we are about to add an outer CCB to f.
-    _notify_before_add_outer_ccb(fh, Halfedge_handle(he1));
-
-    // Create a new outer CCB that for the face f, and make he1 the
-    // representative halfedge of this component.
-    DOuter_ccb* f_oc1 = _dcel().new_outer_ccb();
-
-    f->add_outer_ccb(f_oc1, he1);
-    f_oc1->set_face(f);
-    he1->set_outer_ccb(f_oc1);
-
-    // Set the component of all halfedges that used to belong to he1's CCB.
-    DHalfedge* curr;
-
-    for (curr = he1->next(); curr != he1; curr = curr->next())
-      curr->set_outer_ccb(f_oc1);
-
-    // Notify the observers that we have added an outer CCB to f.
-    _notify_after_add_outer_ccb((Halfedge_handle(he1))->ccb());
-
-    // Handle the second split outer CCB (the one containing he2):
-    // Notify the obserers we are about to add an outer CCB to f.
-    _notify_before_add_outer_ccb(fh, Halfedge_handle(he2));
-
-    // Create a new outer CCB that for the face f, and make he2 the
-    // representative halfedge of this component.
-    DOuter_ccb* f_oc2 = _dcel().new_outer_ccb();
-
-    f->add_outer_ccb(f_oc2, he2);
-    f_oc2->set_face(f);
-    he2->set_outer_ccb(f_oc2);
-
-    // Set the component of all halfedges that used to belong to he2's CCB.
-    for (curr = he2->next(); curr != he2; curr = curr->next())
-      curr->set_outer_ccb(f_oc2);
-
-    // Notify the observers that we have added an outer CCB to f.
-    _notify_after_add_outer_ccb((Halfedge_handle(he2))->ccb());
-
-    // Mark that in this case no new face is created:
-    new_face = false;
-  }
-  else if ((ic1 == ic2) && (oc1 == oc2)) {
-    // In this case we created a pair of halfedge that connect halfedges that
-    // already belong to the same component. This means we have to cretae a
-    // new face by splitting the existing face f.
-    // Notify the observers that we are about to split a face.
-    Face_handle fh(f);
-
-    _notify_before_split_face(fh, Halfedge_handle(he1));
-
-    // Create the new face and create a single outer component which should
-    // point to he2.
-    DFace* new_f = _dcel().new_face();
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-    std::cout << "new face: " << new_f << std::endl;
-#endif
-
-    DOuter_ccb* new_oc = _dcel().new_outer_ccb();
-
-    new_face = true;
-    new_f->add_outer_ccb(new_oc, he2);
-    new_oc->set_face(new_f);
-
-    // Set the components of the new halfedge he2, which should be the new
-    // outer comoponent of the new face.
-    // Note that there are several cases for setting he1's component, so we
-    // do not do it yet.
-    he2->set_outer_ccb(new_oc);
-
-    // Set the component of all halfedges that used to belong to he2's CCB.
-    DHalfedge* curr;
-
-    for (curr = he2->next(); curr != he2; curr = curr->next())
-      curr->set_outer_ccb(new_oc);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-    std::cout << "(=> prev1=" << &(*prev1) << ") he2= " << &(*he2)
-              << "  defines new outer CCB" << std::endl;
-    std::cout << "he2dir  : " << he2->direction() << std::endl;
-    std::cout << "prev1->face(): " << (prev1->is_on_inner_ccb() ?
-                                       prev1->inner_ccb()->face() :
-                                       prev1->outer_ccb()->face())
-              << std::endl;
-    std::cout << "signs1: " << signs1.first  << "," << signs1.second
-              << std::endl;
-#endif
-
-    // Check whether the two previous halfedges lie on the same innder CCB
-    // or on the same outer CCB (distinguish case 3.3 and case 3.4).
-    bool   is_hole;
-
-    if (ic1 != NULL) {
-      // In this case (3.3) we have two distinguish two sub-cases.
-      if (is_split_face_contained) {
-        // Comment: This is true for all non-identification topologies
-
-        // The halfedges prev1 and prev2 belong to the same inner component
-        // (hole) inside the face f, such that the new edge creates a new
-        // face that is contained in f (case 3.3.1).
-        is_hole = true;
-
-        // In this case, he1 lies on an inner CCB of f.
-        he1->set_inner_ccb(ic1);
-
-        // Note that the current representative of the inner CCB may not
-        // belong to the hole any more. In this case we replace the hole
-        // representative by he1.
-        if (! ic1->halfedge()->is_on_inner_ccb())
-          ic1->set_halfedge(he1);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-        std::cout << "(=> prev2=" << &(*prev2) << ") he1= " << &(*he1)
-                  << "  defines new inner CCB" << std::endl;
-        std::cout << "he1dir  : " << he1->direction() << std::endl;
-        std::cout << "prev2->face(): " << (prev2->is_on_inner_ccb() ?
-                                           prev2->inner_ccb()->face() :
-                                           prev2->outer_ccb()->face())
-                  << std::endl;
-        std::cout << "signs2: " << signs2.first  << "," << signs2.second
-                  << std::endl;
-#endif
-      }
-      else {
-        // Comment: This case can only occur in identification topologies
-
-        // The new face we have created should be adjacent to the existing
-        // face (case 3.3.2).
-        is_hole = false;
-
-        // Notify the obserers we are about to add an outer CCB to f.
-        _notify_before_add_outer_ccb(fh, Halfedge_handle(he1));
-
-        // Create a new outer CCB that for the face f, and make he1 the
-        // representative halfedge of this component.
-        DOuter_ccb* f_oc = _dcel().new_outer_ccb();
-
-        f->add_outer_ccb(f_oc, he1);
-        f_oc->set_face(f);
-        he1->set_outer_ccb(f_oc);
-
-        // Set the component of all halfedges that used to belong to he1's
-        // CCB.
-        for (curr = he1->next(); curr != he1; curr = curr->next())
-          curr->set_outer_ccb(f_oc);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-        std::cout << "(=> prev2=" << &(*prev2) << ") he1= " << &(*he1) << "  defines new outer CCB" << std::endl;
-        std::cout << "he1dir  : " << he1->direction() << std::endl;
-        std::cout << "prev2->face(): " << (prev2->is_on_inner_ccb() ?
-                                           prev2->inner_ccb()->face() :
-                                           prev2->outer_ccb()->face())
-                  << std::endl;
-        std::cout << "signs2: " << signs2.first  << "," << signs2.second
-                  << std::endl;
-#endif
-
-        // Notify the observers that we have added an outer CCB to f.
-        _notify_after_add_outer_ccb((Halfedge_handle(he1))->ccb());
-
-        // Go over all other outer CCBs of f and check whether they should be
-        // moved to be outer CCBs of the new face.
-        DOuter_ccb_iter  oc_it = f->outer_ccbs_begin();
-        DOuter_ccb_iter  oc_to_move;
-
-
-        while (oc_it != f->outer_ccbs_end()) {
-          // Use the topology traits to determine whether the representative
-          // of the current outer CCB should belong to the same face as he2
-          // (which is on the outer boundary of the new face).
-          bool increment = true;
-          if (*oc_it != he1) {
-
-            // he2 is supposed to be a perimetric path and so all of the oc_its,
-            // we only have to detect which one. We do so by comparing signs of
-            // ccbs:
-            // IDEA EBEB 2012-07-28
-            // store signs of CCB with CCB in DCEL and use them here
-            // *oc_it is already closed, so we do a full round
-            // (default = false)
-            std::pair<Sign, Sign> signs_oc =
-              _compute_signs(*oc_it, Has_identified_sides_category());
-
-            bool move = false;
-
-            // TODO EBEB 2013-07-15 refactor into own function
-            // TODO EBEB 2012-08-07 this either compares signs in left-right
-            // direction OR signs in bottom-top direction, which will probably
-            // not work for torus!
-            if ((signs2.first != CGAL::ZERO) && (signs_oc.first != CGAL::ZERO))
-            {
-              if (signs2.first != signs_oc.first) move = true;
-            }
-            else if ((signs2.second != CGAL::ZERO) &&
-                     (signs_oc.second != CGAL::ZERO))
-            {
-              if (signs2.second != signs_oc.second) move = true;
-            }
-
-            if (move) {
-              // We increment the itrator before moving the outer CCB, because
-              // this operation invalidates the iterator.
-              increment = false;
-              oc_to_move = oc_it;
-              ++oc_it;
-
-              _move_outer_ccb(f, new_f, *oc_to_move);
-            }
-          }
-
-          if (increment) ++oc_it;
-        }
-      }
-    }
-    else {
-      // In this case the face f is simply split into two (case 3.4).
-      is_hole = false;
-
-      // In this case, he1 lies on an outer CCB of f.
-      he1->set_outer_ccb(oc1);
-
-      // As the outer component of the exisitng face f may associated with
-      // one of the halfedges along the boundary of the new face, we set it
-      // to be he1.
-      oc1->set_halfedge(he1);
-    }
-
-    // Check whether we should mark the original face and the new face as
-    // bounded or as unbounded faces.
-    if (! f->is_unbounded())
-      // The original face is bounded, so the new face split from it is
-      // obviously bounded.
-      new_f->set_unbounded(false);
-    else if (is_hole)
-      // The new face is a hole inside the original face, so it must be
-      // bounded.
-      new_f->set_unbounded(false);
-    else {
-      // Use the topology traits to determine whether each of the split
-      // faces is unbounded. Note that if the new face is bounded, then f
-      // obviously reamins unbounded and there is no need for further checks.
-      new_f->set_unbounded(m_topol_traits.is_unbounded(new_f));
-
-      if (new_f->is_unbounded())
-        f->set_unbounded(m_topol_traits.is_unbounded(f));
-    }
-
-    // Notify the observers that we have split the face.
-    _notify_after_split_face(fh, Face_handle(new_f), is_hole);
-  }
-  else {
-    CGAL_assertion((oc1 != NULL) && (oc2 != NULL) && (oc1 != oc2));
-
-    // In case prev1 and prev2 belong to different outer CCBs of the same
-    // face f (case 3.5), we have to merge this ccbs into one. Note that we
-    // do not create a new face.
-    new_face = false;
-
-    // Notify the observers that we are about to merge two outer CCBs.
-    Face_handle fh(f);
-
-    _notify_before_merge_outer_ccb(fh,
-                                   (Halfedge_handle(prev1))->ccb(),
-                                   (Halfedge_handle(prev2))->ccb(),
-                                   Halfedge_handle(he1));
-
-    // Remove the outer component prev2 belongs to, and unite it with the
-    // outer component that prev1 belongs to.
-    f->erase_outer_ccb(oc2);
-
-    // Set the merged component for the two new halfedges.
-    he1->set_outer_ccb(oc1);
-    he2->set_outer_ccb(oc1);
-
-    // Make all halfedges along oc2 to point to oc1.
-    DHalfedge* curr;
-
-    for (curr = he2->next(); curr != he1; curr = curr->next())
-      curr->set_outer_ccb(oc1);
-
-    // Delete the redundant outer CCB.
-    _dcel().delete_outer_ccb(oc2);
-
-    // Notify the observers that we have merged the two CCBs.
-    _notify_after_merge_outer_ccb(fh, (Halfedge_handle(he1))->ccb());
-  }
-
-  // Notify the observers that we have created a new edge.
-  _notify_after_create_edge(Halfedge_handle(he2));
-
-  // TODO EBEB 2012-08-08 add postcondition that checks sanity
-#if 0
-  {
-    DHalfedge* he1 = he2->opposite();
-    DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
-    DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
-    DFace* f1 = (ic1 != NULL) ? ic1->face() : oc1->face();
-    DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
-    DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
-    DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face();
-    CGAL_postcondition((ic1 != ic2) || (f1 == f2));
-  }
-#endif
-
-  // Return the halfedge directed from v1 to v2.
-  return he2;
-}
-
-//-----------------------------------------------------------------------------
-// Relocate all inner CCBs (holes) to their proper position,
-// immediately after a face has split due to the insertion of a new halfedge.
-//
-template <typename GeomTraits, typename TopTraits>
-void  Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_relocate_inner_ccbs_in_new_face(DHalfedge* new_he)
-{
-  // The given halfedge points to the new face, while its twin points to the
-  // old face (the one that has just been split).
-  DFace* new_face = (new_he->is_on_inner_ccb()) ?
-    new_he->inner_ccb()->face() : new_he->outer_ccb()->face();
-  DHalfedge* opp_he = new_he->opposite();
-  const bool opp_on_inner_ccb = opp_he->is_on_inner_ccb();
-  DFace* old_face = opp_on_inner_ccb ? opp_he->inner_ccb()->face() :
-    opp_he->outer_ccb()->face();
-
-  CGAL_assertion(new_face != old_face);
-
-  // Examine the inner CCBs inside the existing old face and move the relevant
-  // ones into the new face.
-  DInner_ccb_iter ic_it = old_face->inner_ccbs_begin();
-  while (ic_it != old_face->inner_ccbs_end()) {
-    // In case the new edge represents the current component in the old face
-    // (note we take the opposite halfedge, as it is incident to the old face),
-    // then the new face already forms a hole in the old face, and we do not
-    // need to move it.
-    CGAL_assertion((*ic_it)->is_on_inner_ccb());
-
-    if (opp_on_inner_ccb && ((*ic_it)->inner_ccb() == opp_he->inner_ccb())) {
-      ++ic_it;
-      continue;
-    }
-
-    // Check whether the current inner CCB is inside new face (we actually
-    // check if a representative vertex is located in the new face).
-    if (m_topol_traits.is_in_face(new_face, (*ic_it)->vertex()->point(),
-                                  (*ic_it)->vertex()))
-    {
-      // We store the current iterator which get then incremented before it
-      // gets moved, as the move operation invalidates the iterator.
-      DInner_ccb_iter ic_to_move = ic_it;
-      ++ic_it;
-      _move_inner_ccb(old_face, new_face, *ic_to_move); // move the hole
-    }
-    else
-      ++ic_it;
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Relocate all isolated vertices to their proper position,
-// immediately after a face has split due to the insertion of a new halfedge.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_relocate_isolated_vertices_in_new_face(DHalfedge* new_he)
-{
-  // The given halfedge points to the new face, while its twin points to the
-  // old face (the one that has just been split).
-  DFace* new_face = (new_he->is_on_inner_ccb()) ?
-    new_he->inner_ccb()->face() :
-    new_he->outer_ccb()->face();
-  DHalfedge* opp_he = new_he->opposite();
-  DFace* old_face = (opp_he->is_on_inner_ccb()) ?
-    opp_he->inner_ccb()->face() :
-    opp_he->outer_ccb()->face();
-
-  CGAL_assertion(new_face != old_face);
-
-  // Examine the isolated vertices inside the existing old face and move the
-  // relevant ones into the new face.
-  DIso_vertex_iter    iv_it;
-  DIso_vertex_iter    iv_to_move;
-
-  iv_it = old_face->isolated_vertices_begin();
-  while (iv_it != old_face->isolated_vertices_end()) {
-    // Check whether the isolated vertex lies inside the new face.
-    if (m_topol_traits.is_in_face(new_face, iv_it->point(), &(*iv_it))) {
-      // We increment the isolated vertices itrator before moving the vertex,
-      // because this operation invalidates the iterator.
-      iv_to_move  = iv_it;
-      ++iv_it;
-
-      // Move the isolated vertex.
-      _move_isolated_vertex(old_face, new_face, &(*iv_to_move));
-    }
-    else
-      ++iv_it;
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Relocate all holes (inner CCBs) and isolated vertices to their proper
-// position, immediately after a face has split due to the insertion of a new
-// halfedge.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_relocate_in_new_face(DHalfedge* new_he)
-{
-  _relocate_inner_ccbs_in_new_face(new_he);
-  _relocate_isolated_vertices_in_new_face(new_he);
-}
-
-//-----------------------------------------------------------------------------
-// Replace the point associated with the given vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_modify_vertex(DVertex* v, const Point_2& p)
-{
-  // Notify the observers that we are about to modify a vertex.
-  Vertex_handle vh(v);
-  _notify_before_modify_vertex(vh, p);
-
-  // Modify the point associated with the vertex.
-  v->point() = p;
-
-  // Notify the observers that we have modified the vertex.
-  _notify_after_modify_vertex(vh);
-}
-
-//-----------------------------------------------------------------------------
-// Replace the x-monotone curve associated with the given edge.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_modify_edge(DHalfedge* he, const X_monotone_curve_2& cv)
-{
-  // Notify the observers that we are about to modify an edge.
-  Halfedge_handle e(he);
-  _notify_before_modify_edge(e, cv);
-
-  // Modify the curve associated with the halfedge.
-  he->curve() = cv;
-
-  // Notify the observers that we have modified the edge.
-  _notify_after_modify_edge(e);
-}
-
-//-----------------------------------------------------------------------------
-// Check if the given vertex represents one of the ends of a given curve.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_are_equal(const DVertex* v,
-           const X_monotone_curve_2& cv, Arr_curve_end ind) const
-{
-  // In case the given curve end has boundary conditions, use the topology
-  // traits to determine whether it is equivalent to v.
-  const Arr_parameter_space ps_x =
-    m_geom_traits->parameter_space_in_x_2_object()(cv, ind);
-  const Arr_parameter_space ps_y =
-    m_geom_traits->parameter_space_in_y_2_object()(cv, ind);
-
-  if ((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR))
-    return (m_topol_traits.are_equal(v, cv, ind, ps_x, ps_y));
-
-  // Otherwise, the curve end is a valid endpoint. Check that v is also
-  // associated with a valid point that equals this endpoint.
-  if (v->has_null_point()) return false;
-
-  return (ind == ARR_MIN_END) ?
-    (m_geom_traits->equal_2_object()
-     (m_geom_traits->construct_min_vertex_2_object()(cv), v->point())) :
-    (m_geom_traits->equal_2_object()
-     (m_geom_traits->construct_max_vertex_2_object()(cv), v->point()));
-}
-
-//-----------------------------------------------------------------------------
-// Split a given edge into two at a given point, and associate the given
-// x-monotone curves with the split edges.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_split_edge(DHalfedge* e, const Point_2& p,
-            const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
-{
-  // Allocate a new vertex and associate it with the split point.
-  // Note that this point must not have any boundary conditions.
-  DVertex* v = _create_vertex(p);
-
-  // Split the edge from the given vertex.
-  return (_split_edge(e, v, cv1, cv2));
-}
-
-//-----------------------------------------------------------------------------
-// Split a given edge into two at a given vertex, and associate the given
-// x-monotone curves with the split edges.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_split_edge(DHalfedge* e, DVertex* v,
-            const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
-{
-  // Get the split halfedge and its twin, its source and target.
-  DHalfedge* he1 = e;
-  DHalfedge* he2 = he1->opposite();
-  DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
-  DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
-  DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
-  DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
-
-  // Notify the observers that we are about to split an edge.
-  _notify_before_split_edge(Halfedge_handle(e), Vertex_handle(v), cv1, cv2);
-
-  // Allocate a pair of new halfedges.
-  DHalfedge* he3 = _dcel().new_edge();
-  DHalfedge* he4 = he3->opposite();
-
-  // Connect the new halfedges:
-  //
-  //            he1      he3
-  //         -------> ------->
-  //       (.)      (.)v     (.)
-  //         <------- <-------
-  //            he2      he4
-  //
-  v->set_halfedge(he4);
-
-  if (he1->next() != he2) {
-    // Connect e3 between e1 and its successor.
-    he3->set_next(he1->next());
-
-    // Insert he4 between he2 and its predecessor.
-    he2->prev()->set_next(he4);
-  }
-  else
-    // he1 and he2 form an "antenna", so he4 becomes he3's successor.
-    he3->set_next(he4);
-
-  if (oc1 != NULL)
-    he3->set_outer_ccb(oc1);
-  else
-    he3->set_inner_ccb(ic1);
-
-  he3->set_vertex(he1->vertex());
-  he4->set_vertex(v);
-  he4->set_next(he2);
-
-  if (oc2 != NULL)
-    he4->set_outer_ccb(oc2);
-  else
-    he4->set_inner_ccb(ic2);
-
-  if (he1->vertex()->halfedge() == he1)
-    // If he1 is the incident halfedge to its target, he3 replaces it.
-    he1->vertex()->set_halfedge(he3);
-
-  // Update the properties of the twin halfedges we have just split.
-  he1->set_next(he3);
-  he1->set_vertex(v);
-
-  // The direction of he3 is the same as he1's (and the direction of he4 is
-  // the same as he2).
-  he3->set_direction(he1->direction());
-
-  // Associate cv1 with he1 (and its twin). We allocate a new curve for cv2
-  // and associate it with he3 (and its twin).
-  X_monotone_curve_2* dup_cv2 = _new_curve(cv2);
-
-  he1->curve() = cv1;
-  he3->set_curve(dup_cv2);
-
-  // Notify the observers that we have split an edge into two.
-  _notify_after_split_edge(Halfedge_handle(he1), Halfedge_handle(he3));
-
-  // Return a handle for one of the existing halfedge that is incident to the
-  // split point.
-  return he1;
-}
-
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_indices(Arr_parameter_space /* ps_x_curr */,
-                 Arr_parameter_space /* ps_y_curr */,
-                 Arr_parameter_space /* ps_x_next */,
-                 Arr_parameter_space /* ps_y_next */,
-                 int& /* x_index */, int& /* y_index */,
-                 boost::mpl::bool_<false>) const
-{ /* nothing if no identification */ }
-
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
-                 Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
-                 int& x_index, int& y_index,  boost::mpl::bool_<true>) const
-{
-  // If we cross the identification curve in x, then we must update the
-  // x_index. Note that a crossing takes place in the following cases:
-  //                .                                  .
-  //                .                                  .
-  //                .                                  .
-  //                . v    he                   he     . v
-  //       <-------(.)<---------             -------->(.)------->
-  //                .                                  .
-  //       (BEFORE) .    (AFTER)              (BEFORE) .  (AFTER)
-  //       x_index-1.    x_index              x_index  .  x_index+1
-  //
-  if ((ps_x_curr == ARR_LEFT_BOUNDARY) && (ps_x_next == ARR_RIGHT_BOUNDARY)) {
-    CGAL_assertion(is_identified(Left_side_category()) &&
-                   is_identified(Right_side_category()));
-    --x_index; // in "negative" u-direction
-  }
-  else if ((ps_x_curr == ARR_RIGHT_BOUNDARY) &&
-           (ps_x_next == ARR_LEFT_BOUNDARY))
-  {
-    CGAL_assertion(is_identified(Left_side_category()) &&
-                   is_identified(Right_side_category()));
-    ++x_index; // in "positive" u-direction
-  }
-
-  // Check if we cross the identification curve in y.
-  if ((ps_y_curr == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_TOP_BOUNDARY)) {
-    CGAL_assertion(is_identified(Bottom_side_category()) &&
-                   is_identified(Top_side_category()));
-    --y_index; // in "negative" v-direction
-  }
-  else if ((ps_y_curr == ARR_TOP_BOUNDARY) &&
-           (ps_y_next == ARR_BOTTOM_BOUNDARY))
-  {
-    CGAL_assertion(is_identified(Bottom_side_category()) &&
-                   is_identified(Top_side_category()));
-    ++y_index; // in "positive" v-direction
-  }
-}
-
-// Computes signs and locale minima of an open path to be closed by a
-// newly inserted curve.
-//
-// Precondition The OutputIterator must be a back inserter.
-// Precondition The traveresed ccb is an inner ccb; thus, it cannot be
-//              on an open boundary.
-// Postcondition If NULL is a local minimum, it is inserted first.
-//                No other local minima can be NULL.
-template <typename GeomTraits, typename TopTraits>
-template <typename OutputIterator>
-std::pair<Sign, Sign>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_signs_and_local_minima(const DHalfedge* he_to,
-                                const X_monotone_curve_2& cv,
-                                Arr_halfedge_direction cv_dir,
-                                const DHalfedge* he_away,
-                                OutputIterator local_mins_it) const
-{
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "he_to: " << he_to->opposite()->vertex()->point()
-            << " => " << he_to->vertex()->point() << std::endl;
-  std::cout << "cv: " << cv << std::endl;
-  std::cout << "cv_dir: " << cv_dir << std::endl;
-  std::cout << "he_away: " << he_away->opposite()->vertex()->point()
-            << " => " << he_away->vertex()->point() << std::endl;
-#endif
-
-  // We go over the sequence of vertices, starting from he_away's target
-  // vertex, until reaching he_to's source vertex, and find the leftmost
-  // one. Note that we do this carefully, keeping track of the number of
-  // times we crossed the identification curve in x or in y (if they exist).
-  // Note that the path must not be incident to any vertex on open boundary.
-  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
-    m_geom_traits->parameter_space_in_x_2_object();
-  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
-    m_geom_traits->parameter_space_in_y_2_object();
-
-  // TODO 2012-09-20 check "correction" here too (as in "other" function of this kind
-  int x_index = 0;
-  int y_index = 0;
-
-  // Obtain the parameter space pair of cv.
-  Arr_curve_end cv_to_end =
-    (cv_dir == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
-  Arr_parameter_space ps_x_cv_to = parameter_space_in_x(cv, cv_to_end);
-  Arr_parameter_space ps_y_cv_to = parameter_space_in_y(cv, cv_to_end);
-  Arr_curve_end cv_away_end =
-    (cv_dir == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-  Arr_parameter_space ps_x_cv_away = parameter_space_in_x(cv, cv_away_end);
-  Arr_parameter_space ps_y_cv_away = parameter_space_in_y(cv, cv_away_end);
-
-  // Obtain the parameter space pair of he_to and he_away
-  Arr_curve_end he_to_tgt_end =
-    (he_to->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-  Arr_parameter_space ps_x_he_to =
-    parameter_space_in_x(he_to->curve(), he_to_tgt_end);
-  Arr_parameter_space ps_y_he_to =
-    parameter_space_in_y(he_to->curve(), he_to_tgt_end);
-  Arr_curve_end he_away_src_end =
-    (he_away->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
-  Arr_parameter_space ps_x_he_away =
-    parameter_space_in_x(he_away->curve(), he_away_src_end);
-  Arr_parameter_space ps_y_he_away =
-    parameter_space_in_y(he_away->curve(), he_away_src_end);
-  Arr_curve_end he_away_tgt_end =
-    (he_away->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-  Arr_parameter_space ps_x_he_away_tgt =
-    parameter_space_in_x(he_away->curve(), he_away_tgt_end);
-  Arr_parameter_space ps_y_he_away_tgt =
-    parameter_space_in_y(he_away->curve(), he_away_tgt_end);
-
-  Arr_parameter_space ps_x_curr, ps_y_curr;
-  Arr_parameter_space ps_x_next, ps_y_next;
-  Arr_parameter_space ps_x_save, ps_y_save;
-
-  ps_x_curr = ps_x_cv_away;
-  ps_y_curr = ps_y_cv_away;
-  ps_x_next = ps_x_he_away;
-  ps_y_next = ps_y_he_away;
-  ps_x_save = ps_x_he_away_tgt;
-  ps_y_save = ps_y_he_away_tgt;
-
-  CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
-  CGAL_assertion(!is_open(ps_x_next, ps_y_next));
-
-  if ((cv_dir == ARR_RIGHT_TO_LEFT) &&
-      (he_away->direction() == ARR_LEFT_TO_RIGHT)) {
-    const DHalfedge* null_he = NULL;
-    *local_mins_it++ = std::make_pair(null_he, x_index);
-  }
-
-  _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
-                   x_index, y_index, Has_identified_sides_category());
-
-  const DHalfedge* he = he_away;
-  while (he != he_to) {
-    ps_x_curr = ps_x_save;
-    ps_y_curr = ps_y_save;
-    CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
-
-    Arr_curve_end he_next_src_end, he_next_tgt_end;
-    if (he->next()->direction() == ARR_LEFT_TO_RIGHT) {
-      he_next_src_end = ARR_MIN_END;
-      he_next_tgt_end = ARR_MAX_END;
-    }
-    else {
-      he_next_src_end = ARR_MAX_END;
-      he_next_tgt_end = ARR_MIN_END;
-    }
-
-    ps_x_next = parameter_space_in_x(he->next()->curve(), he_next_src_end);
-    ps_y_next = parameter_space_in_y(he->next()->curve(), he_next_src_end);
-    CGAL_assertion(!is_open(ps_x_next, ps_y_next));
-
-    ps_x_save = parameter_space_in_x(he->next()->curve(), he_next_tgt_end);
-    ps_y_save = parameter_space_in_y(he->next()->curve(), he_next_tgt_end);
-
-    // If the halfedge is directed from right to left and its successor is
-    // directed from left to right, the target vertex might be the smallest:
-    if ((he->direction() == ARR_RIGHT_TO_LEFT) &&
-        (he->next()->direction() == ARR_LEFT_TO_RIGHT))
-      *local_mins_it++  = std::make_pair(he, x_index);
-
-    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
-                     x_index, y_index, Has_identified_sides_category());
-
-    // Move to the next halfedge.
-    he = he->next();
-  }
-
-  ps_x_curr = ps_x_he_to;
-  ps_y_curr = ps_y_he_to;
-  ps_x_next = ps_x_cv_to;
-  ps_y_next = ps_y_cv_to;
-
-  CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
-  CGAL_assertion(!is_open(ps_x_next, ps_y_next));
-
-  if ((he_to->direction() == ARR_RIGHT_TO_LEFT) &&
-      (cv_dir == ARR_LEFT_TO_RIGHT))
-    *local_mins_it++  = std::make_pair(he_to, x_index);
-
-  _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next, x_index, y_index,
-                   Has_identified_sides_category());
-
-  return (std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index)));
-}
-
-// Computes the signs of a closed ccb (loop) when deleting he_anchor and its
-// opposite belonging to different faces for the case where non of the
-// boundaries is identified, thus, return the pair (ZERO, ZERO)
-template <typename GeomTraits, typename TopTraits>
-std::pair<Sign, Sign>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_signs(const DHalfedge* /* he_anchor */, boost::mpl::bool_<false>) const
-{ return (std::make_pair(ZERO, ZERO)); }
-
-  // Computes the signs of a closed ccb (loop) when deleting he_anchor and its
-// opposite belonging to different faces.
-template <typename GeomTraits, typename TopTraits>
-std::pair<Sign, Sign>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_signs(const DHalfedge* he_anchor, boost::mpl::bool_<true>) const
-{
-  // We go over the sequence of vertices, starting from he_before's target
-  // vertex, until reaching he_after's source vertex, and find the leftmost
-  // one. Note that we do this carefully, keeping track of the number of
-  // times we crossed the identification curve in x or in y (if they exist).
-  // Note that the path must not be incident to any vertex on open boundary.
-  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
-    m_geom_traits->parameter_space_in_x_2_object();
-  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
-    m_geom_traits->parameter_space_in_y_2_object();
-  // typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right_2 =
-  //   m_geom_traits->compare_y_at_x_right_2_object();
-
-  // IDEA EBEB 2012-07-28 store indices of local_minima with CCB in DCEL:
-  // - determine values upon insertion of a curve
-  // - or if this is not possible, perform the following computation
-  //   on-demand only
-
-  // init with edges at first link
-  // assuming that he_anchor has been removed
-  const DHalfedge* he_curr = he_anchor;
-  CGAL_assertion(! he_curr->has_null_curve());
-  const DHalfedge* he_next = he_anchor->next();
-  // init edge where loop should end
-  const DHalfedge* he_end = he_anchor;
-
-  int x_index = 0;
-  int y_index = 0;
-
-  // obtain the parameter space pair of he_curr
-  Arr_curve_end he_curr_tgt_end =
-    (he_curr->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-  Arr_parameter_space ps_x_save =
-    parameter_space_in_x(he_curr->curve(), he_curr_tgt_end);
-  Arr_parameter_space ps_y_save =
-    parameter_space_in_y(he_curr->curve(), he_curr_tgt_end);
-
-  Arr_parameter_space ps_x_curr, ps_y_curr;
-  Arr_parameter_space ps_x_next, ps_y_next;
-
-  // start loop
-  do {
-    ps_x_curr = ps_x_save;
-    ps_y_curr = ps_y_save;
-    CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
-
-    Arr_curve_end he_next_src_end =
-      (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
-    ps_x_next = parameter_space_in_x(he_next->curve(), he_next_src_end);
-    ps_y_next = parameter_space_in_y(he_next->curve(), he_next_src_end);
-    CGAL_assertion(!is_open(ps_x_next, ps_y_next));
-
-    Arr_curve_end he_next_tgt_end =
-      (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-    ps_x_save = parameter_space_in_x(he_next->curve(), he_next_tgt_end);
-    ps_y_save = parameter_space_in_y(he_next->curve(), he_next_tgt_end);
-
-    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
-                     x_index, y_index, Has_identified_sides_category());
-
-    // iterate
-    he_curr = he_next;
-    he_next = he_next->next();
-  } while (he_curr != he_end);
-
-  // Return the leftmost vertex and its x_index (with respect to he_before).
-  return (std::make_pair(sign(x_index), sign(y_index)));
-}
-
-// Computes the halfedge that points at the smallest vertex in a closed ccb
-// when deleting he_anchor and its opposite belonging to same face
-// (loop-about-to-split).
-template <typename GeomTraits, typename TopTraits>
-std::pair<std::pair<Sign, Sign>,
-          const typename Arrangement_on_surface_2<GeomTraits,
-                                                  TopTraits>::DHalfedge*>
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_compute_signs_and_min(const DHalfedge* he_anchor,
-                       Arr_parameter_space& ps_x_min,
-                       Arr_parameter_space& ps_y_min,
-                       int& index_min) const
-{
-  // Initialize
-  const DHalfedge* he_min = NULL;
-  ps_x_min = ARR_INTERIOR;
-  ps_y_min = ARR_INTERIOR;
-  index_min = 0;
-
-  // We go over the sequence of vertices, starting from he_before's target
-  // vertex, until reaching he_after's source vertex, and find the leftmost
-  // one. Note that we do this carefully, keeping track of the number of
-  // times we crossed the identification curve in x or in y (if they exist).
-  // Note that the path must not be incident to any vertex on open boundary.
-  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
-    m_geom_traits->parameter_space_in_x_2_object();
-  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
-    m_geom_traits->parameter_space_in_y_2_object();
-
-  // init with edges at first link.
-  // assuming that he_anchor has been removed
-  const DHalfedge* he_curr = he_anchor->opposite()->prev();
-  const DHalfedge* he_next = he_anchor->next();
-  // init edge where loop should end
-  const DHalfedge* he_end = he_anchor->opposite();
-
-  int x_index = 0;
-  int y_index = 0;
-
-  // obtain the parameter space pair of he_curr
-  Arr_parameter_space ps_x_save, ps_y_save;
-  if (he_curr->has_null_curve()) {
-    ps_x_save = he_curr->vertex()->parameter_space_in_x();
-    ps_y_save = he_curr->vertex()->parameter_space_in_y();
-  }
-  else {
-    Arr_curve_end he_curr_tgt_end =
-      (he_curr->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-    ps_x_save = parameter_space_in_x(he_curr->curve(), he_curr_tgt_end);
-    ps_y_save = parameter_space_in_y(he_curr->curve(), he_curr_tgt_end);
-  }
-
-  // TODO EBEB 2012-09-20 check whether this fix is correct
-  // EBEB 2012-08-22 the 'start' of one (out of two) loops might
-  // be directed towards the identification.
-  // In this cases, we have to adapt the index:
-  int x_correction = 0;
-  if (ps_x_save == ARR_RIGHT_BOUNDARY) {
-    x_correction--;
-  }
-
-  Arr_parameter_space ps_x_curr, ps_y_curr;
-  Arr_parameter_space ps_x_next, ps_y_next;
-
-  // Start loop
-  do {
-    ps_x_curr = ps_x_save;
-    ps_y_curr = ps_y_save;
-
-    if (he_next->has_null_curve()) {
-      ps_x_next = he_next->opposite()->vertex()->parameter_space_in_x();
-      ps_y_next = he_next->opposite()->vertex()->parameter_space_in_y();
-      ps_x_save = he_next->vertex()->parameter_space_in_x();
-      ps_y_save = he_next->vertex()->parameter_space_in_y();
-    }
-    else {
-      Arr_curve_end he_next_src_end =
-        (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
-      ps_x_next = parameter_space_in_x(he_next->curve(), he_next_src_end);
-      ps_y_next = parameter_space_in_y(he_next->curve(), he_next_src_end);
-
-      Arr_curve_end he_next_tgt_end =
-        (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
-      ps_x_save = parameter_space_in_x(he_next->curve(), he_next_tgt_end);
-      ps_y_save = parameter_space_in_y(he_next->curve(), he_next_tgt_end);
-    }
-
-    // If the halfedge is directed from right to left and its successor is
-    // directed from left to right, the target vertex might be the smallest:
-    if ((he_curr->direction() == ARR_RIGHT_TO_LEFT) &&
-        (he_next->direction() == ARR_LEFT_TO_RIGHT))
-    {
-      const int index_curr = x_index + x_correction;
-
-      // Test the halfedge incident to the leftmost vertex.
-      // Note that we may visit the same vertex several times.
-
-      if ((he_min == NULL) ||
-          (index_curr < index_min) ||
-          ((index_curr == index_min) &&
-           ((he_curr->vertex() != he_min->vertex()) &&
-            _is_smaller(he_curr, ps_x_curr, ps_y_curr,
-                        he_min, ps_x_min, ps_y_min,
-                        Are_all_sides_oblivious_category()))))
-      {
-        index_min = index_curr;
-        ps_x_min = ps_x_curr;
-        ps_y_min = ps_y_curr;
-        he_min = he_curr;
-      }
-    }
-
-    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
-                     x_index, y_index, Has_identified_sides_category());
-
-    // iterate
-    he_curr = he_next;
-    he_next = he_next->next();
-
-    CGAL_assertion(he_curr != he_anchor);
-
-  } while (he_next != he_end);
-
-  // Return the leftmost vertex and the signs.
-  return std::make_pair(std::make_pair(sign(x_index), sign(y_index)), he_min);
-}
-
-/* This is the implementation for the case where all 4 boundary sides are
- * oblivious.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller(const DHalfedge* he1,
-            Arr_parameter_space /* ps_x1 */, Arr_parameter_space /* ps_y1 */,
-            const DHalfedge* he2,
-            Arr_parameter_space /* ps_x2 */, Arr_parameter_space /* ps_y2 */,
-            Arr_all_sides_oblivious_tag) const
-{
-  CGAL_precondition(he1->direction() == ARR_RIGHT_TO_LEFT);
-  CGAL_precondition(he2->direction() == ARR_RIGHT_TO_LEFT);
-  CGAL_precondition(he1->vertex() != he2->vertex());
-  return
-    (m_geom_traits->compare_xy_2_object()(he1->vertex()->point(),
-                                          he2->vertex()->point()) == SMALLER);
-}
-
-/* This is a wrapper for the case where any boundary side is not
- * necessarily oblivious.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller(const DHalfedge* he1,
-            Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-            const DHalfedge* he2,
-            Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-            Arr_not_all_sides_oblivious_tag tag) const
-{
-  CGAL_precondition(he1->direction() == ARR_RIGHT_TO_LEFT);
-  CGAL_precondition(he2->direction() == ARR_RIGHT_TO_LEFT);
-  CGAL_precondition(he1->vertex() != he2->vertex());
-
-  /* If he1 points to a vertex on the left or the bottom boundary, then it
-   * is the smaller.
-   */
-  if ((ps_x1 == ARR_LEFT_BOUNDARY) || (ps_y1 == ARR_BOTTOM_BOUNDARY))
-    return true;
-
-  /* If he2 points to a vertex on the left or the bottom boundary, then it
-   * is the smaller.
-   */
-  if ((ps_x2 == ARR_LEFT_BOUNDARY) || (ps_y2 == ARR_BOTTOM_BOUNDARY))
-    return false;
-
-  return _is_smaller(he1->curve(), he1->vertex()->point(), ps_x1, ps_y1,
-                     he2->curve(), he2->vertex()->point(), ps_x2, ps_y2, tag);
-}
-
-/* This is the implementation for the case where all 4 boundary sides are
- * oblivious.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller(const X_monotone_curve_2& /* cv1 */, const Point_2& p1,
-            Arr_parameter_space /* ps_x1 */, Arr_parameter_space /* ps_y1 */,
-            const X_monotone_curve_2& /* cv2 */, const Point_2& p2,
-            Arr_parameter_space /* ps_x2 */, Arr_parameter_space /* ps_y2 */,
-            Arr_all_sides_oblivious_tag) const
-{
-  CGAL_precondition(! m_geom_traits->equal_2_object()(p1, p2));
-  return (m_geom_traits->compare_xy_2_object()(p1, p2) == SMALLER);
-}
-
-/*! This is the implementation for the case where any boundary side is not
- * necessarily oblivious.
- * This can be further refined as the combination of LEFT and LEFT can occur
- * only when the right and left boundary sides are identified.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
-            Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-            const X_monotone_curve_2& cv2, const Point_2& p2,
-            Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-            Arr_not_all_sides_oblivious_tag) const
-{
-  CGAL_precondition(! m_geom_traits->equal_2_object()(p1, p2));
-
-  if (ps_x2 == ARR_INTERIOR) {
-    if (ps_x1 == ARR_INTERIOR) {
-      if (ps_y2 == ARR_INTERIOR) {
-        if (ps_y1 == ARR_INTERIOR)
-          return (m_geom_traits->compare_xy_2_object()(p1,p2) == SMALLER);
-
-        // ps1 == {INTERIOR, !INTERIOR}, ps2 == {INTERIOR,INTERIOR},
-        Comparison_result res =
-          m_geom_traits->compare_x_on_boundary_2_object()(p2, cv1, ARR_MIN_END);
-        return
-          (res == EQUAL) ? (ps_y1 == ARR_BOTTOM_BOUNDARY) : (res == LARGER);
-      }
-
-      if (ps_y1 == ARR_INTERIOR) {
-        // ps1 == {INTERIOR,INTERIOR}, ps2 == {INTERIOR,!INTERIOR}
-        Comparison_result res =
-          m_geom_traits->compare_x_on_boundary_2_object()(p1, cv2, ARR_MIN_END);
-        return (res == EQUAL) ? (ps_y2 == ARR_TOP_BOUNDARY) : (res == SMALLER);
-      }
-
-      // ps1 == {INTERIOR,!INTERIOR}, ps2 == {INTERIOR,!INTERIOR}
-      Comparison_result res =
-        m_geom_traits->compare_x_on_boundary_2_object()(cv1, ARR_MIN_END,
-                                                        cv2, ARR_MIN_END);
-      return (res == EQUAL) ?
-        ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) :
-        (res == SMALLER);
-    }
-
-    // ps_x2 == ARR_INTERIOR, ps_x == ARR_LEFT_BOUNDARY
-    CGAL_assertion(ps_x1 == ARR_LEFT_BOUNDARY);
-    return true;
-  }
-  if (ps_x1 == ARR_INTERIOR)
-    // ps_x2 == ARR_LEFT_BOUNDARY, ps_x == ARR_INTERIOR
-    return false;
-
-  // ps_x2 == ARR_LEFT_BOUNDARY, ps_x == ARR_LEFT_BOUNDARY
-  Comparison_result res =
-    m_geom_traits->compare_y_on_boundary_2_object()(p1, p2);
-  return (res == SMALLER);
-}
-
-/* This is the implementation for the case where all 4 boundary sides are
- * oblivious.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller_near_right(const X_monotone_curve_2& cv1,
-                       const X_monotone_curve_2& cv2,
-                       const Point_2& p,
-                       Arr_parameter_space /* ps_x */,
-                       Arr_parameter_space /* ps_y */,
-                       Arr_all_sides_oblivious_tag) const
-{
-  return
-    (m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == SMALLER);
-}
-
-/*! This is the implementation for the case where any one of the 4 boundary
- * sides can be of any type.
- */
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_smaller_near_right(const X_monotone_curve_2& cv1,
-                       const X_monotone_curve_2& cv2,
-                       const Point_2& p,
-                       Arr_parameter_space ps_x, Arr_parameter_space ps_y,
-                       Arr_not_all_sides_oblivious_tag) const
-{
-  CGAL_precondition((ps_x == ARR_INTERIOR) || (ps_x == ARR_LEFT_BOUNDARY));
-  CGAL_precondition((ps_y == ARR_INTERIOR) || (ps_x == ARR_BOTTOM_BOUNDARY));
-
-  if ((ps_x == ARR_INTERIOR) && (ps_y == ARR_INTERIOR))
-    return
-      (m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == SMALLER);
-  return
-    (m_geom_traits->compare_y_near_boundary_2_object()(cv1, cv2, ARR_MIN_END) ==
-     SMALLER);
-}
-
-//-----------------------------------------------------------------------------
-// Determine whether a given subsequence (halfedge, curve, halfedge)
-// lies in the interior of a new face we are about to create
-// Comment: This is how the situation looks
-//    ----to--->  >>cv_dir>>  ---away--->
-//               o ===cv=== 0
-//    <-tonext--              <-awaynext-
-// or to be read from right to left ... this way, he_to and he_away lie
-// BEFORE insertion on the same inner ccb and
-// AFTER insertion on the same outer ccb
-//
-// Precondition: The range of local minima [lm_begin,lm_end) is greater than 0.
-//   That is, there is at least one local minimum, which might be the leftend
-//   of cv itself.
-// Precondition: If the leftend of cv is a local minimum, it must be the first
-//   in the range.
-template <typename GeomTraits, typename TopTraits>
-template <typename InputIterator>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_defines_outer_ccb_of_new_face(const DHalfedge* he_to,
-                               const X_monotone_curve_2& cv,
-                               const DHalfedge* he_away,
-                               InputIterator lm_begin,
-                               InputIterator lm_end) const
-{
-  // Search for the leftmost vertex among the local minima
-  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
-    m_geom_traits->parameter_space_in_x_2_object();
-  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
-    m_geom_traits->parameter_space_in_y_2_object();
-
-  // check all reported local minima
-  InputIterator lm_it = lm_begin;
-
-  int index_min = lm_it->second;
-  const DHalfedge* he_min = lm_it->first;
-  const DVertex* v_min =
-    (he_min == NULL) ? he_away->opposite()->vertex() : he_min->vertex();
-  const X_monotone_curve_2* cv_min =
-    (he_min == NULL) ? &cv : &(he_min->curve());
-  Arr_parameter_space ps_x_min = parameter_space_in_x(*cv_min, ARR_MIN_END);
-  Arr_parameter_space ps_y_min = parameter_space_in_y(*cv_min, ARR_MIN_END);
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "1 set global min to " << *cv_min << std::endl;
-#endif
-
-  for (++lm_it; lm_it != lm_end; ++lm_it) {
-    const DHalfedge* he = lm_it->first;
-    CGAL_assertion(he->direction() == CGAL::ARR_RIGHT_TO_LEFT);
-    int index = lm_it->second;
-    Arr_parameter_space ps_x_he_min =
-      parameter_space_in_x(he->curve(), ARR_MIN_END);
-    Arr_parameter_space ps_y_he_min =
-      parameter_space_in_y(he->curve(), ARR_MIN_END);
-
-    // If the following condition is met, the vertex is indeed the smallest:
-    // The current x_index is smaller than the x_index of the smallest
-    // recorded, or
-    // The current x_index is equivalent to the recorded x_index, and
-    //   - No smallest has bin recorded so far, or
-    //   - The current target vertex and the recorded vertex are the same and
-    //       * The current curve is smaller than the recorded curve, or
-    //   - The current curve end is smaller then the recorded curve end.
-    // smaller than its source, so we should check whether it is also smaller
-    // Note that we compare the vertices lexicographically: first by the
-    // indices, then by x, then by y.
-
-    if ((index < index_min) ||
-        ((index == index_min) &&
-         ((v_min == he->vertex()) ?
-          _is_smaller_near_right(he->curve(), *cv_min,
-                                 v_min->point(), ps_x_min, ps_y_min,
-                                 Are_all_sides_oblivious_category()) :
-          _is_smaller(he->curve(), he->vertex()->point(),
-                      ps_x_he_min, ps_y_he_min,
-                      *cv_min, v_min->point(), ps_x_min, ps_y_min,
-                      Are_all_sides_oblivious_category()))))
-    {
-      index_min = index;
-      cv_min = &(he->curve());
-      ps_x_min = ps_x_he_min;
-      ps_y_min = ps_y_he_min;
-      he_min = he;
-      v_min = he->vertex();
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "2 set global min to " << *cv_min << std::endl;
-#endif
-    }
-  }
-
-  CGAL_assertion(v_min != NULL);
-  CGAL_assertion(!v_min->has_null_point());
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-  std::cout << "v_min: " << v_min->point() << std::endl;
-  std::cout << "he_min: ";
-  if (he_min)
-    std::cout << he_min->opposite()->vertex()->point()
-              << " => " << he_min->vertex()->point();
-  else std::cout << "NULL";
-  std::cout << std::endl;
-#endif
-
-  CGAL_assertion(! he_min || (he_min->direction() == ARR_RIGHT_TO_LEFT));
-
-  // Note that the curves of the leftmost edge and its successor are defined
-  // to the right of the leftmost vertex. We compare them to the right of this
-  // point to determine whether he_to (the curve) and he_away are incident to
-  // the hole to be created or not.
-  const X_monotone_curve_2& cv_next = (he_min == NULL) ?
-    he_away->curve() : ((he_min == he_to) ? cv : he_min->next()->curve());
-  return _is_above(*cv_min, cv_next, v_min->point(), ps_y_min,
-                   Top_or_bottom_sides_category());
-}
-
-// Is the first given x-monotone curve above the second given?
-// This function is invoked when the bottom and top boundaries are neither
-// identified nor contracted
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
-          const Point_2& point,
-          Arr_parameter_space /* ps_y1 */,
-          Arr_boundary_cond_tag) const
-{
-  return (m_geom_traits->compare_y_at_x_right_2_object()(xcv1, xcv2, point) ==
-          LARGER);
-}
-
-// Is the first given x-monotone curve above the second given?
-// This function is invoked when the bottom and top boundaries are identified
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
-          const Point_2& point,
-          Arr_parameter_space ps_y1,
-          Arr_has_identified_side_tag) const
-{
-  // Check whether the vertex lies on the identification curve in y,
-  // in which case special care must be taken.
-  if ((ps_y1 == ARR_BOTTOM_BOUNDARY) || (ps_y1 == ARR_TOP_BOUNDARY)) {
-    // TODO EBEB 2010-10-08 is this code really executed or should it be part
-    // of top traits?
-
-    // Both current and next curves are incident to the identification curve.
-    // As v_min is the leftmost vertex, we know that their left ends must have
-    // a boundary condition of type identification in y.
-    Arr_parameter_space  ps_y2 =
-      m_geom_traits->parameter_space_in_y_2_object()(xcv2, ARR_MIN_END);
-
-    // Check if the curves lie on opposite sides of the identification curve.
-    if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY))
-      // In this case the current curve is "above" the next one to the right
-      // of v_min, in a cyclic order around the identification curve.
-      return true;
-
-    if ((ps_y1 == ARR_TOP_BOUNDARY) && (ps_y2 == ARR_BOTTOM_BOUNDARY))
-      // In this case the current curve is "below" the next one to the right
-      // of v_min, in a cyclic order around the identification curve.
-      return false;
-
-    // If both curves are on the same side of the identification curve, we
-    // continue to compare them to the right of v_min.
-    CGAL_assertion(((ps_y1 == ARR_BOTTOM_BOUNDARY) &&
-                    (ps_y2 == ARR_BOTTOM_BOUNDARY)) ||
-                   ((ps_y1 == ARR_TOP_BOUNDARY) &&
-                    (ps_y2 == ARR_TOP_BOUNDARY)));
-  }
-
-  return _is_above(xcv1, xcv2, point, ps_y1, Arr_all_sides_oblivious_tag());
-}
-
-// Is the first given x-monotone curve above the second given?
-// This function is invoked when the bottom or top boundaries are contracted
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
-          const Point_2& point,
-          Arr_parameter_space ps_y1,
-          Arr_has_contracted_side_tag) const
-{
-  // Check whether the leftmost vertex is a contraction point in y,
-  // in which case special care must be taken.
-  if (((ps_y1 == ARR_TOP_BOUNDARY) && is_contracted(Bottom_side_category())) ||
-      ((ps_y1 == ARR_BOTTOM_BOUNDARY) && is_contracted(Top_side_category())))
-  {
-    // Compare the horizontal position of the two curve-ends at the point
-    // of contraction.
-    Comparison_result x_res =
-      m_geom_traits->compare_x_curve_ends_2_object()(xcv1, ARR_MIN_END,
-                                                     xcv2, ARR_MIN_END);
-
-    // Observe that if x_res == EQUAL the given subsequence is always exterior.
-    return (((ps_y1 == ARR_BOTTOM_BOUNDARY) && (x_res == SMALLER)) ||
-            ((ps_y1 == ARR_TOP_BOUNDARY) && (x_res == LARGER)));
-  }
-
-  return _is_above(xcv1, xcv2, point, ps_y1, Arr_all_sides_oblivious_tag());
-}
-
-
-//-----------------------------------------------------------------------------
-// Remove a pair of twin halfedges from the arrangement.
-// In case the removal causes the creation of a new hole, the given halfedge
-// should point at this hole.
-//
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DFace*
-Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
-{
-  // Obtain the pair of twin edges to be removed, the connected components they
-  // belong to and their incident faces.
-  DHalfedge* he1 = e;
-  DHalfedge* he2 = e->opposite();
-  DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
-  DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
-  DFace* f1 = (oc1 != NULL) ? oc1->face() : ic1->face();
-  DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
-  DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
-  DFace* f2 = (oc2 != NULL) ? oc2->face() : ic2->face();
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-#if 0
-  std::cout << "before swap" << std::endl;
-  std::cout << "he1c: " << he1->curve() <<  ", " << he1->direction()
-            << std::endl;
-  std::cout << "he2c: " << he2->curve() <<  ", " << he2->direction()
-            << std::endl;
-  std::cout << "he1: " << he1 << std::endl;
-  std::cout << "he2: " << he2 << std::endl;
-  std::cout << "ic1: " << ic1 << std::endl;
-  std::cout << "ic2: " << ic2 << std::endl;
-  std::cout << "oc1: " << oc1 << std::endl;
-  std::cout << "oc2: " << oc2 << std::endl;
-  std::cout << "f1 : " << f1 << std::endl;
-  std::cout << "f2 : " << f2 << std::endl;
-#endif
-#endif
-
-  // will be used for "_hole_creation_on_edge_removal"
-  std::pair< CGAL::Sign, CGAL::Sign > signs1(ZERO, ZERO);
-  std::pair< CGAL::Sign, CGAL::Sign > signs2(ZERO, ZERO);
-
-  // If the removal of he1 (and its twin halfedge) form an "antenna", there
-  // is neither a need to compute signs and nor swapping of the halfedges
-  if ((he1->next() != he2) && (he2->next() != he1)) {
-
-    // If f1 == f2 (same_face-case), then we consider two loops that occur when
-    // he1 and he2 get removed; if f1 != f2, then he1 and he2 seperates the two
-    // faces that will be merged upon their removal---here both he1 and he2
-    // belong to a full cycle, and THAT IS WHY we give the f1 == f2 test to
-    // determine whether end of loop should be he1->opposite() and
-    // he2->opposite(), respectively.
-
-    // If f1 != f2, the removal of he1 (and its twin halfedge) will cause
-    // the two incident faces to merge. Thus, swapping is not needed.
-    bool swap_he1_he2 = false;
-    if (f1 == f2) {
-      // In this case one of the following can happen: (a) a new hole will be
-      // created by the removal of the edge (case 3.2.1 of the removal
-      // procedure), or (b) an outer CCB will be split into two (case 3.2.2).
-      // We begin by locating the leftmost vertex along the path from he1 to its
-      // twin he2 and the leftmost vertex point along the path from the twin to
-      // he1 (both paths do not include he1 and he2 themselves).
-
-      // Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
-      // signs2 out of this scope (for the non-planar case), the code must be
-      // dispatched, so that the planar case is not affected.
-
-      // Compute signs of ccbs for he1 and he2 used later for
-      // _hole_creation_on_edge_removal
-
-      // Compute the signs and minimum along ccb of he1:
-      Arr_parameter_space ps_x_min1, ps_y_min1;
-      int index_min1;
-      std::pair<std::pair<Sign, Sign>, const DHalfedge*> res1 =
-        _compute_signs_and_min(he1, ps_x_min1, ps_y_min1, index_min1);
-      signs1 = res1.first;
-      const DHalfedge* he_min1 = res1.second;
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "signs1.x: " << signs1.first << std::endl;
-      std::cout << "signs1.y: " << signs1.second << std::endl;
-      if (! he_min1->is_fictitious())
-        std::cout << "he_min1: " << he_min1->curve() << std::endl;
-      else std::cout << "he_min1 fictitious" << std::endl;
-#endif
-
-      // Compute the signs and minimum along ccb of he2:
-      Arr_parameter_space ps_x_min2, ps_y_min2;
-      int index_min2;
-      std::pair<std::pair<Sign, Sign>, const DHalfedge*> res2 =
-        _compute_signs_and_min(he2, ps_x_min2, ps_y_min2, index_min2);
-      signs2 = res2.first;
-      const DHalfedge* he_min2 = res2.second;
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "signs2.x: " << signs2.first << std::endl;
-      std::cout << "signs2.y: " << signs2.second << std::endl;
-      if (! he_min2->is_fictitious())
-        std::cout << "he_min2: " << he_min2->curve() << std::endl;
-      else std::cout << "he_min2 fictitious" << std::endl;
-#endif
-
-      // TODO EBEB 2012-07-29
-      // is this the right thing to do for torus, or let TopTraits decide?
-      bool is_perimetric1 = signs1.first || signs1.second;
-      bool is_perimetric2 = signs2.first || signs2.second;
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << std::endl
-                << "index 1: " << index_min1
-                << ", ps_x_min1: " << ps_x_min1
-                << ", ps_y_min1: " << ps_y_min1
-                << ", is_perimetric1: " << is_perimetric1
-                << std::endl;
-
-      std::cout << "index 2: " << index_min2
-                << ", ps_x_min2: " << ps_x_min2
-                << ", ps_y_min2: " << ps_y_min2
-                << ", is_perimetric2: " << is_perimetric2
-                << std::endl;
-#endif
-
-      if (is_perimetric1 || is_perimetric2) {
-#if 1 // this is old code
-        swap_he1_he2 =
-          (! is_perimetric1) ? false :
-          ((! is_perimetric2) ? true : false);
-          // We are in case (a) and he1 is directed to the new hole to be
-          // created or
-          // We are in case (a) and he2 is directed to the new hole to be
-          // created.
-        // Both paths are perimetric; thus, we are in case (b).
-#else // THIS IS NEW CODE 2012-08-06 which is much easier to read
-        swap_he1_he2 = !is_perimetric2;
-#endif
-      }
-      else {
-        // const DVertex* v_min1 = he_min1->vertex(); const DVertex* v_min2 =
-        // he_min2->vertex(); Both paths from he1 to he2 and back from he2 to
-        // he1 are not perimetric, so we are in case (a). As we want to
-        // determine which halfedge points to the new hole to be created (he1
-        // or he2), we have to compare the two leftmost vertices
-        // lexicographically, first by the indices then by x and y. v_min2
-        // lies to the left of v_min1 if and only if he1 points at the hole we
-        // are about to create.
-        //
-        //         +---------------------+
-        //         |                     |
-        //         |   he1    +----+     |
-        //         +--------->+    |     |
-        //         |          +----+     |
-        //         |      v_min1         |
-        //         |                     |
-        //  v_min2 +---------------------+
-        //
-        // Note that if one of the paths we have examined ends at a boundary
-        // side of the parameter space (and only of the paths may end at a
-        // boundary side of the parameter space), then the other path becomes
-        // a hole in a face bounded by the parameter-space boundary.
-
-        // TODO EBEB 2012-08-22 check whether this fix is correct
-        // EBEB 2012-08-22 the 'start' of the two loops might lie
-        // on different sides of the identification, which is only
-        // problematic when either he1 or he2 points to the
-        // identification. In these cases, we have to adapt the indices:
-        typename Traits_adaptor_2::Parameter_space_in_x_2
-          parameter_space_in_x =
-          m_geom_traits->parameter_space_in_x_2_object();
-
-        Arr_curve_end he1_tgt_end =
-          (he1->direction() == ARR_LEFT_TO_RIGHT ? ARR_MAX_END : ARR_MIN_END);
-        Arr_parameter_space ps_x_he1_tgt =
-          parameter_space_in_x(he1->curve(), he1_tgt_end);
-        if (ps_x_he1_tgt == ARR_RIGHT_BOUNDARY) index_min2 -= 1;
-
-        Arr_curve_end he2_tgt_end =
-          (he2->direction() == ARR_LEFT_TO_RIGHT ? ARR_MAX_END : ARR_MIN_END);
-        Arr_parameter_space ps_x_he2_tgt =
-          parameter_space_in_x(he2->curve(), he2_tgt_end);
-        if (ps_x_he2_tgt == ARR_RIGHT_BOUNDARY) index_min1 -= 1;
-
-        swap_he1_he2 =
-          (index_min1 > index_min2) ? false :
-          ((index_min1 < index_min2) ? true :
-           _is_smaller(he_min1, ps_x_min1, ps_y_min1,
-                       he_min2, ps_x_min2, ps_y_min2,
-                       Are_all_sides_oblivious_category()));
-      }
-    }
-
-    // swapping?
-    if (swap_he1_he2) {
-      // swap all entries
-      std::swap(he1, he2);
-      std::swap(ic1, ic2);
-      std::swap(oc1, oc2);
-      std::swap(f1 , f2);
-      // not needed below here std::swap(local_mins1, local_mins2);
-      std::swap(signs1, signs2);
-    }
-  }
-
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-#if 0
-  std::cout << "after swap" << std::endl;
-  std::cout << "he1c: " << he1->curve() <<  ", " << he1->direction()
-            << std::endl;
-  std::cout << "he1c: " << he2->curve() <<  ", " << he2->direction()
-            << std::endl;
-  std::cout << "he1: " << he1 << std::endl;
-  std::cout << "he2: " << he2 << std::endl;
-  std::cout << "ic1: " << ic1 << std::endl;
-  std::cout << "ic2: " << ic2 << std::endl;
-  std::cout << "oc1: " << oc1 << std::endl;
-  std::cout << "oc2: " << oc2 << std::endl;
-  std::cout << "f1 : " << f1 << std::endl;
-  std::cout << "f2 : " << f2 << std::endl;
-#endif
-#endif
-
-  // Now the real removal starts.
-  DHalfedge* prev1 = NULL;
-  DHalfedge* prev2 = NULL;
-
-  // Notify the observers that we are about to remove an edge.
-  Halfedge_handle  hh(e);
-
-  _notify_before_remove_edge(hh);
-
-  // Check if the two incident faces are equal, in which case no face will be
-  // merged and deleted (and a hole may be created).
-  if (f1 == f2) {
-    // Check whether the two halfedges are successors along the face boundary.
-    if ((he1->next() == he2) && (he2->next() == he1)) {
-      CGAL_assertion((ic1 != NULL) && (ic1 == ic2));
-
-      // The two halfedges form a "singleton" hole inside the incident face
-      // (case 1 of the removal procedure, as detailed in the design document),
-      // so we simply have to remove it.
-      // First notify the observers that we are about to remove this hole
-      // (inner CCB).
-      Face_handle fh(f1);
-
-      _notify_before_remove_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
-
-      // Erase the inner CCB from the incident face and delete the
-      // corresponding component.
-      f1->erase_inner_ccb(ic1);
-
-      _dcel().delete_inner_ccb(ic1);
-
-      // Notify the observers that the inner CCB has been removed.
-      _notify_after_remove_inner_ccb(fh);
-
-      // Remove the end-vertices, if necessary.
-      if (remove_target) {
-        if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-            (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-        {
-          he1->vertex()->set_halfedge(NULL);    // disconnect the end vertex
-          _remove_vertex_if_redundant(he1->vertex(), f1);
-        }
-        else {
-          // Delete the he1's target vertex and its associated point.
-          _notify_before_remove_vertex(Vertex_handle(he1->vertex()));
-
-          _delete_point(he1->vertex()->point());
-          _dcel().delete_vertex(he1->vertex());
-
-          _notify_after_remove_vertex();
-        }
-      }
-      else
-        // The remaining target vertex now becomes an isolated vertex inside
-        // the containing face:
-        _insert_isolated_vertex(f1, he1->vertex());
-
-      if (remove_source) {
-        if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-            (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-        {
-          he2->vertex()->set_halfedge(NULL);    // disconnect the end vertex
-          _remove_vertex_if_redundant(he2->vertex(), f1);
-        }
-        else {
-          // Delete the he1's source vertex and its associated point.
-          _notify_before_remove_vertex(Vertex_handle(he2->vertex()));
-
-          _delete_point(he2->vertex()->point());
-          _dcel().delete_vertex(he2->vertex());
-
-          _notify_after_remove_vertex();
-        }
-      }
-      else
-        // The remaining source vertex now becomes an isolated vertex inside
-        // the containing face:
-        _insert_isolated_vertex(f1, he2->vertex());
-
-      // Delete the curve associated with the edge to be removed.
-      _delete_curve(he1->curve());
-      _dcel().delete_edge(he1);
-
-      // Notify the observers that an edge has been deleted.
-      _notify_after_remove_edge();
-
-      // Return the face that used to contain the hole.
-      return f1;
-    }
-    else if ((he1->next() == he2) || (he2->next() == he1)) {
-      CGAL_assertion((oc1 == oc2) && (ic1 == ic2));
-
-      // In this case the two halfedges form an "antenna" (case 2).
-      // Make he1 point at the tip of this "antenna" (swap the pointer if
-      // necessary).
-      bool remove_tip_vertex = remove_target;
-
-      if (he2->next() == he1) {
-        he1 = he2;
-        he2 = he1->opposite();
-        remove_tip_vertex = remove_source;
-      }
-
-      // Remove the two halfedges from the boundary chain by connecting
-      // he1's predecessor with he2's successor.
-      prev1 = he1->prev();
-      prev1->set_next(he2->next());
-
-      // In case the halfedges to be deleted are represantatives of their
-      // CCB (note that noth should belong to the same CCB, be it an outer
-      // CCB or an inner one), make prev1 the components representative.
-      if ((oc1 != NULL) &&
-          ((oc1->halfedge() == he1) || (oc1->halfedge() == he2)))
-        oc1->set_halfedge(prev1);
-      else if ((ic1 != NULL) &&
-               ((ic1->halfedge() == he1) || (ic1->halfedge() == he2)))
-        ic1->set_halfedge(prev1);
-
-      // In case he2 is the representative halfedge of its target vertex,
-      // replace it by prev1 (which also points at this vertex).
-      if (he2->vertex()->halfedge() == he2)
-        he2->vertex()->set_halfedge(prev1);
-
-      // Try to temove the base vertex, in case it has boundary conditions.
-      if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-          (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-        _remove_vertex_if_redundant(he2->vertex(), f1);
-
-      // Remove the redundant tip vertex, if necessary.
-      if (remove_tip_vertex) {
-        if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-            (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-        {
-          he1->vertex()->set_halfedge(NULL);    // disconnect the end vertex
-          _remove_vertex_if_redundant(he1->vertex(), f1);
-        }
-        else {
-          // Delete the vertex that forms the tip of the "antenna".
-          _notify_before_remove_vertex(Vertex_handle(he1->vertex()));
-
-          _delete_point(he1->vertex()->point());
-          _dcel().delete_vertex(he1->vertex());
-
-          _notify_after_remove_vertex();
-        }
-      }
-      else
-        // The remaining "antenna" tip now becomes an isolated vertex inside
-        // the containing face:
-        _insert_isolated_vertex(f1, he1->vertex());
-
-      // Delete the curve associated with the edge to be removed.
-      _delete_curve(he1->curve());
-      _dcel().delete_edge(he1);
-
-      // Notify the observers that an edge has been deleted.
-      _notify_after_remove_edge();
-
-      // Return the incident face.
-      return f1;
-    }
-
-    // In this case the degree of both end-vertices is at least 2, so we
-    // can use the two predecessor halfedges of he1 and he2.
-    bool        add_inner_ccb = false;
-
-    prev1 = he1->prev();
-    prev2 = he2->prev();
-
-    if ((ic1 != NULL) && (ic1 == ic2)) {
-      // If both halfedges lie on the same inner component (hole) inside the
-      // face (case 3.1), we have to split this component into two holes.
-      //
-      //    +-----------------------------+
-      //    |           prev1             |
-      //    |   +----+ /    +----+        |
-      //    |   |    +......+    |        |
-      //    |   +----+      +----+        |
-      //    |                             |
-      //    +-----------------------------+
-      //
-      // Notify the observers we are about to split an inner CCB.
-      _notify_before_split_inner_ccb(Face_handle(f1),
-                                     (Halfedge_handle
-                                      (*(ic1->iterator())))->ccb(),
-                                     Halfedge_handle(he1));
-
-      // We first make prev1 the new representative halfedge of the first
-      // inner CCB.
-      ic1->set_halfedge(prev1);
-
-      // Create a new component that represents the new hole we split.
-      DInner_ccb* new_ic = _dcel().new_inner_ccb();
-      f1->add_inner_ccb(new_ic, prev2);
-      new_ic->set_face(f1);
-
-      // Associate all halfedges along the hole boundary with the new inner
-      // component.
-      DHalfedge* curr;
-      for (curr = he1->next(); curr != he2; curr = curr->next())
-        curr->set_inner_ccb(new_ic);
-
-      // Notify the observers that the hole has been split.
-      _notify_after_split_inner_ccb(Face_handle(f1),
-                                    (Halfedge_handle(prev1))->ccb(),
-                                    (Halfedge_handle(prev2))->ccb());
-    }
-    else if (oc1 != oc2) {
-      // RWRW: NEW!
-      CGAL_assertion((oc1 != NULL) && (oc2 != NULL));
-
-      // In case both halfegdes he1 and he2 are incident to the same face
-      // but lie on different outer CCBs of this face, removing this pair of
-      // halfedge causes the two components two merge and to become an
-      // inner CCB in the face.
-      // We first remove the outer CCB oc1 from f, and inform the observers
-      // on doing so.
-      Face_handle fh(f1);
-
-      _notify_before_remove_outer_ccb(fh, (Halfedge_handle(he1))->ccb());
-
-      f1->erase_outer_ccb(oc1);
-      _dcel().delete_outer_ccb(oc1);
-
-      _notify_after_remove_outer_ccb(fh);
-
-      // We now remove the outer CCBs oc2 from f, and inform the observers
-      // on doing so.
-      _notify_before_remove_outer_ccb(fh, (Halfedge_handle(he2))->ccb());
-
-      f2->erase_outer_ccb(oc2);
-      _dcel().delete_outer_ccb(oc2);
-
-      _notify_after_remove_outer_ccb(fh);
-
-      // Mark that we should eventually add a new inner CCB inside the face.
-      add_inner_ccb = true;
-    }
-    else {
-      CGAL_assertion((oc1 != NULL) && (oc1 == oc2));
-
-      // If both halfedges are incident to the same outer CCB of their
-      // face (case 3.2), we have to distinguish two sub-cases:
-      // TODO EBEB 2012-07-30 replace with signs
-      if (_hole_creation_on_edge_removal(signs1, signs2, true)) {
-        // We have to create a new hole in the interior of the incident face
-        // (case 3.2.1):
-        //
-        //    +-----------------------------+
-        //    | prev1                       |
-        //    v         +----+              |
-        //    +........>+    |              |
-        //    |   he1   +----+              |
-        //    |                             |
-        //    +-----------------------------+
-        //
-        // Note that it is guaranteed that he1 points at this new hole, while
-        // he2 points at the boundary of the face that contains this hole.
-        // First notify the observers we are about to form a new inner
-        // CCB inside f1.
-        _notify_before_add_inner_ccb(Face_handle(f1),
-                                     Halfedge_handle(he1->next()));
-
-        // Create a new component that represents the new hole.
-        DInner_ccb* new_ic = _dcel().new_inner_ccb();
-
-        f1->add_inner_ccb(new_ic, he1->next());
-        new_ic->set_face(f1);
-
-        // Associate all halfedges along the hole boundary with the new inner
-        // component.
-        DHalfedge* curr;
-        for (curr = he1->next(); curr != he2; curr = curr->next())
-          curr->set_inner_ccb(new_ic);
-
-        // As the outer CCB of f1 may be represented by any of the
-        // halfedges in between he1 -> ... -> he2 (the halfedges in between
-        // represent the outer boundary of the new hole that is formed),
-        // We represent the outer boundary of f1 by prev1, which definitely
-        // stays on the outer boundary.
-        oc1->set_halfedge(prev1);
-
-        // Notify the observers that a new hole has been formed.
-        Ccb_halfedge_circulator hccb = (Halfedge_handle(he1->next()))->ccb();
-
-        _notify_after_add_inner_ccb(hccb);
-      }
-      else {
-        // We have to split the outer CCB into two outer components
-        // (case 3.2.2), such that the number of outer CCBs of the face is
-        // incremented.
-        //
-        //    +----------------------------+
-        //    |                            |
-        //    |            prev1           |
-        //    +<........+<.................|
-        //    |         |                  |
-        //    |         |                  |
-        //    |         |                  |
-        //    |         |                  |
-        //    |  prev2  |                  |
-        //    +........>+..................|
-        //    |                            |
-        //    +----------------------------+
-        //
-
-        // First we notify the observers that we are about to split an outer
-        // component.
-        _notify_before_split_outer_ccb(Face_handle(f1),
-                                       Halfedge_handle(he1)->ccb(),
-                                       Halfedge_handle(he1));
-
-        // Create a new outer component.
-        DOuter_ccb* new_oc = _dcel().new_outer_ccb();
-
-        f1->add_outer_ccb(new_oc, he1->next());
-        new_oc->set_face(f1);
-
-        // Associate all halfedges from he1 until he2 with the new CCB.
-        DHalfedge* curr;
-
-        for (curr = he1->next(); curr != he2; curr = curr->next())
-          curr->set_outer_ccb(new_oc);
-
-        // As the outer CCB of f1 may be represented by any of the
-        // halfedges in between he1 -> ... -> he2 (the halfedges in between
-        // are on the new outer CCB we have just created), we represent the
-        // former outer CCB by prev1, which definately stays on it.
-        oc1->set_halfedge(prev1);
-
-        // Notify the observers that a new outer CCB has been formed.
-        _notify_after_split_outer_ccb(Face_handle(f1),
-                                      Halfedge_handle(he1->next())->ccb(),
-                                      Halfedge_handle(prev1)->ccb());
-      }
-    }
-
-    // Disconnect the two halfedges we are about to delete from the edge list.
-    prev1->set_next(he2->next());
-    prev2->set_next(he1->next());
-
-    // If one of these edges is an incident halfedge of its target vertex,
-    // replace it by the appropriate predecessor.
-    if (he1->vertex()->halfedge() == he1)
-      he1->vertex()->set_halfedge(prev2);
-
-    if (he2->vertex()->halfedge() == he2)
-      he2->vertex()->set_halfedge(prev1);
-
-    // Remove the end vertices, in case they become redundant.
-    if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-        (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-      _remove_vertex_if_redundant(he1->vertex(), f1);
-
-    if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-        (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-      _remove_vertex_if_redundant(he2->vertex(), f1);
-
-    // Delete the curve associated with the edge to be removed.
-    _delete_curve(he1->curve());
-
-    // Delete the pair of halfedges.
-    _dcel().delete_edge(he1);
-
-    // RWRW: NEW!
-    // In case we have to create a new inner CCB inside the face (new removal
-    // case), do it now.
-    if (add_inner_ccb) {
-      // Notify the observers that we are about to create a new inner CCB
-      // inside the merged face.
-      Halfedge_handle hh(prev1);
-
-      _notify_before_add_inner_ccb(Face_handle(f1), hh);
-
-      // Initiate a new inner CCB inside the given face.
-      DInner_ccb* new_ic = _dcel().new_inner_ccb();
-
-      f1->add_inner_ccb(new_ic, prev1);
-      new_ic->set_face(f1);
-
-      // Set the innser CCB of the halfedges along the component boundary.
-      DHalfedge* curr = prev1;
-
-      do {
-        curr->set_inner_ccb(new_ic);
-        curr = curr->next();
-      } while (curr != prev1);
-
-      // Notify the observers that we have formed a new inner CCB.
-      _notify_after_add_inner_ccb(hh->ccb());
-    }
-
-    // Notify the observers that an edge has been deleted.
-    _notify_after_remove_edge();
-
-    // Return the incident face.
-    return f1;
-  }
-
-  CGAL_assertion(f1 != f2);
-
-  // The two incident faces are not the same - in this case, the edge we are
-  // about to delete separates these two faces. We therefore have to delete
-  // one of these faces and merge it with the other face.
-  // First notify the observers we are about to merge the two faces.
-  _notify_before_merge_face(Face_handle(f1), Face_handle(f2),
-                            Halfedge_handle(he1));
-
-  // We begin by checking whether one of the faces is a hole inside the other
-  // face.
-  DHalfedge* curr;
-
-  prev1 = he1->prev();
-  prev2 = he2->prev();
-
-  CGAL_assertion((ic1 == NULL) || (ic2 == NULL));
-
-  if ((ic1 == NULL) && (ic2 == NULL)) {
-    bool add_inner_ccb = false;
-
-    // Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
-    // signs2 out of this scope (for the non-planar case), the code must be
-    // dispatched, so that the planar case is not affected.
-
-    // Compute the signs of the ccbs for he1 and he2.
-    // The signs are computed here, a sub case of (f1 != f2), in addition to
-    // the case (f1 == f2) above. This way unnecessary computations of the
-    // signs are avoided.
-
-    // EFEF 2013-07-29. The call to _compute_signs() is dispatched.
-    // Currently, only 2 cases are supported, namely, the case where non of
-    // the boundaries are identified and the case where at least one pair of
-    // opposite boundaries are identified. However, the code for the latter
-    // assumes that non of the (other) boundaries is open. A 3rd version
-    // that supports the remaining case, (for example the cylinder), should
-    // be developed and used.
-    signs1 = _compute_signs(he1, Has_identified_sides_category());
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "signs1.x: " << signs1.first << std::endl;
-      std::cout << "signs1.y: " << signs1.second << std::endl;
-#endif
-
-      signs2 = _compute_signs(he2, Has_identified_sides_category());
-#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
-      std::cout << "signs2.x: " << signs2.first << std::endl;
-      std::cout << "signs2.y: " << signs2.second << std::endl;
-#endif
-
-    // Both halfedges lie on the outer boundary of their incident faces
-    // (case 3.4). We have to distinguish two possible sub-cases.
-      // TODO EBEB 2012-07-30 replace with signs
-    if (_hole_creation_on_edge_removal(signs1, signs2, false)) {
-      // We have to remove the outer CCBs of f1 and f2 that he1 and he2 lie
-      // on, and create a new hole in the merged face (case 3.4.2).
-      // We first remove the outer CCB oc1 from f1, and inform the observers
-      // on doing so.
-      _notify_before_remove_outer_ccb(Face_handle(f1),
-                                      (Halfedge_handle(he1))->ccb());
-
-      f1->erase_outer_ccb(oc1);
-      _dcel().delete_outer_ccb(oc1);
-
-      _notify_after_remove_outer_ccb(Face_handle(f1));
-
-      // We now remove the outer CCBs oc2 from f2, and inform the observers
-      // on doing so.
-      _notify_before_remove_outer_ccb(Face_handle(f2),
-                                      (Halfedge_handle(he2))->ccb());
-
-      f2->erase_outer_ccb(oc2);
-      _dcel().delete_outer_ccb(oc2);
-
-      _notify_after_remove_outer_ccb(Face_handle(f2));
-
-      // Mark that we should eventually add a new inner CCB in the merged face.
-      add_inner_ccb = true;
-    }
-    else {
-      // f1 and f2 are two adjacent faces (case 3.4.1), so we simply merge
-      // them.
-      // We first set the connected component of f2's outer-boundary halfedges
-      // to be the same as f1's outer component.
-      for (curr = he2->next(); curr != he2; curr = curr->next())
-        curr->set_outer_ccb(oc1);
-    }
-
-    // Move the holes inside f2 to f1.
-    DInner_ccb_iter ic_it = f2->inner_ccbs_begin();
-    DInner_ccb_iter ic_to_move;
-
-    while (ic_it != f2->inner_ccbs_end()) {
-      // We increment the holes itrator before moving the hole, because
-      // this operation invalidates the iterator.
-      ic_to_move  = ic_it;
-      ++ic_it;
-
-      _move_inner_ccb(f2, f1, *ic_to_move);
-    }
-
-    // In case he1, which is about to be deleted, is a representative
-    // halfedge of outer component of f1, we replace it by its predecessor.
-    if (oc1->halfedge() == he1)
-      oc1->set_halfedge(prev1);
-
-    // Move the isolated vertices inside f2 to f1.
-    DIso_vertex_iter iv_it = f2->isolated_vertices_begin();
-    DIso_vertex_iter iv_to_move;
-
-    while (iv_it != f2->isolated_vertices_end()) {
-      // We increment the isolated vertices itrator before moving the vertex,
-      // because this operation invalidates the iterator.
-      iv_to_move  = iv_it;
-      ++iv_it;
-
-      _move_isolated_vertex(f2, f1, &(*iv_to_move));
-    }
-
-    // If he1 or he2 are the incident halfedges to their target vertices,
-    // we replace them by the appropriate predecessors.
-    if (he1->vertex()->halfedge() == he1)
-      he1->vertex()->set_halfedge(prev2);
-
-    if (he2->vertex()->halfedge() == he2)
-      he2->vertex()->set_halfedge(prev1);
-
-    // Disconnect the two halfedges we are about to delete from the edge
-    // list.
-    prev1->set_next(he2->next());
-    prev2->set_next(he1->next());
-
-    // Delete the curve associated with the edge to be removed.
-    _delete_curve(he1->curve());
-
-    // If the face f2 we have just merged with f1 is unbounded, then the
-    // merged face is also unbounded.
-    if (f2->is_unbounded())
-      f1->set_unbounded(true);
-
-    // Delete the face f2.
-    _dcel().delete_face(f2);
-
-    // Notify the observers that the faces have been merged.
-    _notify_after_merge_face(Face_handle(f1));
-
-    // Remove the end vertices, in case they become redundant.
-    if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-        (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-      _remove_vertex_if_redundant(he1->vertex(), f1);
-
-    if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-        (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-      _remove_vertex_if_redundant(he2->vertex(), f1);
-
-    // Delete the pair of halfedges.
-    _dcel().delete_edge(he1);
-
-    // In case we have to create a new inner CCB inside the merged face
-    // (case 3.4.1), do it now.
-    if (add_inner_ccb) {
-      // Notify the observers that we are about to create a new inner CCB
-      // inside the merged face.
-      Halfedge_handle hh(prev1);
-
-      _notify_before_add_inner_ccb(Face_handle(f1), hh);
-
-      // Initiate a new inner CCB inside the given face.
-      DInner_ccb* new_ic = _dcel().new_inner_ccb();
-
-      f1->add_inner_ccb(new_ic, prev1);
-      new_ic->set_face(f1);
-
-      // Set the innser CCB of the halfedges along the component boundary.
-      curr = prev1;
-      do {
-        curr->set_inner_ccb(new_ic);
-        curr = curr->next();
-      } while (curr != prev1);
-
-      // Notify the observers that we have formed a new inner CCB.
-      _notify_after_add_inner_ccb(hh->ccb());
-    }
-
-    // Notify the observers that an edge has been deleted.
-    _notify_after_remove_edge();
-
-    // Return the merged face.
-    return f1;
-  }
-
-  // In this case we merge a face with another face that now forms a hole
-  // inside it (case 3.3). We first make sure that f1 contains the hole f2, so
-  // we can merge f2 with it (we swap roles between the halfedges if
-  // necessary).
-  if (ic2 != NULL) {
-    he1 = he2;
-    he2 = he1->opposite();
-
-    ic1 = ic2;
-    ic2 = NULL;
-
-    oc2 = oc1;
-    oc1 = NULL;
-
-    DFace* tf = f1;
-    f1 = f2;
-    f2 = tf;
-
-    prev1 = he1->prev();
-    prev2 = he2->prev();
-  }
-
-  // By removing the edge we open a closed face f2 contained in f1. By doing
-  // this, the outer boundary of f2 unites with the hole boundary that ic1
-  // represents. We therefore have to set the component of all halfedges
-  // along the boundary of f2 to be ic1.
-  for (curr = he2->next(); curr != he2; curr = curr->next())
-    curr->set_inner_ccb(ic1);
-
-  // Move the inner CCBs inside f2 to f1.
-  DInner_ccb_iter ic_it = f2->inner_ccbs_begin();
-  DInner_ccb_iter ic_to_move;
-
-  while (ic_it != f2->inner_ccbs_end()) {
-    // We increment the holes itrator before moving the hole, because
-    // this operation invalidates the iterator.
-    ic_to_move  = ic_it;
-    ++ic_it;
-
-    _move_inner_ccb(f2, f1, *ic_to_move);
-  }
-
-  // Move the isolated vertices inside f2 to f1.
-  DIso_vertex_iter iv_it = f2->isolated_vertices_begin();
-  DIso_vertex_iter iv_to_move;
-
-  while (iv_it != f2->isolated_vertices_end()) {
-    // We increment the isolated vertices itrator before moving the vertex,
-    // because this operation invalidates the iterator.
-    iv_to_move  = iv_it;
-    ++iv_it;
-
-    _move_isolated_vertex(f2, f1, &(*iv_to_move));
-  }
-
-  // Notice that f2 will be merged with f1, but its boundary will still be
-  // a hole inside this face. In case he1 is a represantative of this hole,
-  // replace it by its predecessor.
-  if (ic1->halfedge() == he1)
-    ic1->set_halfedge(prev1);
-
-  // If he1 or he2 are the incident halfedges to their target vertices,
-  // we replace them by the appropriate predecessors.
-  if (he1->vertex()->halfedge() == he1)
-    he1->vertex()->set_halfedge(prev2);
-
-  if (he2->vertex()->halfedge() == he2)
-    he2->vertex()->set_halfedge(prev1);
-
-  // Disconnect the two halfedges we are about to delete from the edge
-  // list.
-  prev1->set_next(he2->next());
-  prev2->set_next(he1->next());
-
-  // Delete the curve associated with the edge to be removed.
-  _delete_curve(he1->curve());
-
-  // If the face f2 we have just merged with f1 is unbounded, then the merged
-  // face is also unbounded.
-  if (f2->is_unbounded())
-    f1->set_unbounded(true);
-
-  // Delete the face f2.
-  _dcel().delete_face(f2);
-
-  // Notify the observers that the faces have been merged.
-  _notify_after_merge_face(Face_handle(f1));
-
-  // Remove the end vertices, in case they become redundant.
-  if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-      (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-    _remove_vertex_if_redundant(he1->vertex(), f1);
-
-  if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
-      (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
-    _remove_vertex_if_redundant(he2->vertex(), f1);
-
-  // Delete the pair of halfedges.
-  _dcel().delete_edge(he1);
-
-  // Notify the observers that an edge has been deleted.
-  _notify_after_remove_edge();
-
-  // Return the merged face.
-  return f1;
-
-  // TODO EBEB 2012-08-06 it seems that a torus case is missing
-}
-
-// Decide whether a hole is created
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_hole_creation_on_edge_removal(std::pair< CGAL::Sign, CGAL::Sign > signs1,
-                               std::pair< CGAL::Sign, CGAL::Sign > signs2,
-                               bool same_face) {
-  // EBEB 2013-07-16 Remark: For tiled surfaces, this function has to respect the
-  // topology of the tiled surface
-
-  // TODO EBEB 2013-07-16 Add code for torus (double identification)
-  CGAL::Sign sign1 = signs1.first;
-  CGAL::Sign sign2 = signs2.first;
-
-  if (same_face) return true;
-  return ((CGAL::ZERO != sign1) && (sign1 == opposite(sign2)));
-}
-
-//-----------------------------------------------------------------------------
-// Remove a vertex in case it becomes redundant after the deletion of an
-// incident edge.
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_remove_vertex_if_redundant(DVertex* v, DFace* f)
-{
-  CGAL_precondition((v->parameter_space_in_x() != ARR_INTERIOR) ||
-                    (v->parameter_space_in_y() != ARR_INTERIOR));
-
-  // In case the vertex has no incident halfedges, remove it if it is
-  // redundant. Otherwise, make it an isolated vertex.
-  if (v->halfedge() == NULL) {
-    if (m_topol_traits.is_redundant(v)) {
-      // Remove the vertex and notify the observers on doing so.
-      _notify_before_remove_vertex(Vertex_handle(v));
-
-      m_topol_traits.erase_redundant_vertex(v);
-
-      // Note the topology traits do not free the vertex - we now do it.
-      if (! v->has_null_point())
-        _delete_point(v->point());
-      _dcel().delete_vertex(v);
-
-      _notify_after_remove_vertex();
-    }
-    else
-      // Keep the vertex as an isolated one.
-      _insert_isolated_vertex(f, v);
-    return;
-  }
-
-  // Get the first two incident halfedges of v.
-  DHalfedge* he1 = v->halfedge();
-  DHalfedge* he2 = he1->next()->opposite();
-
-  if (he2->next()->opposite() != he1)
-    // In this case there are more than two incident edges, so v obviously
-    // cannot be removed.
-    return;
-
-  if (! he1->has_null_curve() || ! he2->has_null_curve())
-    // We can only merge fictitious halfedges.
-    return;
-
-  // Now check if the vertex is redundant. If it is, remove it by merging
-  // its two incident fictitious halfedges.
-  if (m_topol_traits.is_redundant(v)) {
-    // Use the topology traits to merge the two fictitious halfedges.
-    _notify_before_merge_fictitious_edge(Halfedge_handle(he1),
-                                         Halfedge_handle(he2));
-
-    he1 = m_topol_traits.erase_redundant_vertex(v);
-
-    _notify_after_merge_fictitious_edge(Halfedge_handle(he1));
-
-    // Note the topology traits do not free the vertex - we now do it.
-    _notify_before_remove_vertex(Vertex_handle(v));
-
-    if (! v->has_null_point())
-      _delete_point(v->point());
-    _dcel().delete_vertex(v);
-
-    _notify_after_remove_vertex();
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Remove an isolated vertex from the interior of a given face (but not from
-// the DCEL).
-//
-template <typename GeomTraits, typename TopTraits>
-void Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_remove_isolated_vertex(DVertex* v)
-{
-  // Remove the isolated vertex from the face and delete its record.
-  DIso_vertex* iv = v->isolated_vertex();
-  DFace* f = iv->face();
-
-  f->erase_isolated_vertex(iv);
-  _dcel().delete_isolated_vertex(iv);
-}
-
-//---------------------------------------------------------------------------
-// Check whether the arrangement is valid. In particular, check the
-// validity of each vertex, halfedge, and face.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::is_valid() const
-{
-  Vertex_const_iterator vit;
-  bool is_vertex_valid;
-  for (vit = vertices_begin(); vit != vertices_end(); ++vit) {
-    is_vertex_valid = _is_valid(vit);
-    if (!is_vertex_valid) {
-      CGAL_warning_msg(is_vertex_valid, "Invalid vertex.");
-      return false;
-    }
-  }
-
-  Halfedge_const_iterator heit;
-  bool is_halfedge_valid;
-  for (heit = halfedges_begin(); heit != halfedges_end(); ++heit) {
-    is_halfedge_valid = _is_valid(heit);
-    if (! is_halfedge_valid) {
-      CGAL_warning_msg(is_halfedge_valid, "Invalid halfedge.");
-      return false;
-    }
-  }
-
-  Face_const_iterator     fit;
-  bool                    is_face_valid;
-
-  for (fit = faces_begin(); fit != faces_end(); ++fit) {
-    is_face_valid = _is_valid(fit);
-    if (! is_face_valid) {
-      CGAL_warning_msg(is_face_valid, "Invalid face.");
-      return false;
-    }
-  }
-
-  bool  are_vertices_unique = _are_vertices_unique();
-  if (! are_vertices_unique) {
-    CGAL_warning_msg(are_vertices_unique,
-                     "Found two vertices with the same geometric point.");
-    return false;
-  }
-
-  // If we reached here, the arrangement is valid.
-  return true;
-}
-
-//---------------------------------------------------------------------------
-// Check the validity of a vertex.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_valid(Vertex_const_handle v) const
-{
-  // Do not check isolated vertices, as they have no incident halfedges.
-  if (v->is_isolated()) return true;
-
-  // Make sure that the vertex is the target of all its incident halfedges.
-  Halfedge_around_vertex_const_circulator circ = v->incident_halfedges();
-  Halfedge_around_vertex_const_circulator start = circ;
-
-  do {
-    if (circ->target() != v) return false;
-    ++circ;
-  } while (circ != start);
-
-  // In case of a non-boundary vertex, make sure the curves are correctly
-  // ordered around this vertex.
-  if ((v->parameter_space_in_x() == ARR_INTERIOR) &&
-      (v->parameter_space_in_y() == ARR_INTERIOR))
-  {
-    if (! _are_curves_ordered_cw_around_vertrex(v)) return false;
-  }
-
-  return true;
-}
-
-//---------------------------------------------------------------------------
-// Check the validity of a halfedge.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_valid(Halfedge_const_handle he) const
-{
-  // Check relations with the previous and the next halfedges.
-  if (he->prev()->target() != he->source()) return false;
-
-  if (he->target() != he->next()->source()) return false;
-
-  // Check relations with the twin.
-  if (he != he->twin()->twin()) return false;
-
-  if (he->source() != he->twin()->target() ||
-      he->target() != he->twin()->source())
-    return false;
-
-  if (he->direction() == he->twin()->direction()) return false;
-
-  // Stop here in case of a fictitious edge.
-  if (he->is_fictitious()) return true;
-
-  // Check that the end points of the curve associated with the halfedge
-  // really equal the source and target vertices of this halfedge.
-  const X_monotone_curve_2& cv = he->curve();
-  const DVertex* source = _vertex(he->source());
-  const DVertex* target = _vertex(he->target());
-  Comparison_result res = ((source->parameter_space_in_x() == ARR_INTERIOR) &&
-                           (source->parameter_space_in_y() == ARR_INTERIOR) &&
-                           (target->parameter_space_in_x() == ARR_INTERIOR) &&
-                           (target->parameter_space_in_y() == ARR_INTERIOR)) ?
-    m_geom_traits->compare_xy_2_object()(source->point(), target->point()) :
-    ((he->direction() == ARR_LEFT_TO_RIGHT) ? SMALLER : LARGER);
-
-  if (res == SMALLER) {
-    if (he->direction() != ARR_LEFT_TO_RIGHT)
-      return false;
-
-    return (_are_equal(_vertex(he->source()), cv, ARR_MIN_END) &&
-            _are_equal(_vertex(he->target()), cv, ARR_MAX_END));
-  }
-  else if (res == LARGER) {
-    if (he->direction() != ARR_RIGHT_TO_LEFT)
-      return false;
-
-    return (_are_equal(_vertex(he->source()), cv, ARR_MAX_END) &&
-            _are_equal(_vertex(he->target()), cv, ARR_MIN_END));
-  }
-
-  // In that case, the source and target of the halfedge are equal.
-  return false;
-}
-
-//---------------------------------------------------------------------------
-// Check the validity of a face.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_valid(Face_const_handle f) const
-{
-  // Check if all outer components of the face refer to f.
-  const DFace* p_f = _face(f);
-  DOuter_ccb_const_iter oc_it;
-  const DHalfedge* he;
-  const DOuter_ccb* oc;
-  for (oc_it = p_f->outer_ccbs_begin(); oc_it != p_f->outer_ccbs_end(); ++oc_it)
-  {
-    he = *oc_it;
-    if (he->is_on_inner_ccb()) return false;
-
-    oc = he->outer_ccb();
-    if (oc->face() != p_f) return false;
-
-    if (! _is_outer_ccb_valid(oc, he)) return false;
-  }
-
-  // Check if all inner components of the face refer to f.
-  DInner_ccb_const_iter ic_it;
-  const DInner_ccb* ic;
-
-  for (ic_it = p_f->inner_ccbs_begin(); ic_it != p_f->inner_ccbs_end(); ++ic_it)
-  {
-    he = *ic_it;
-    if (! he->is_on_inner_ccb()) return false;
-
-    ic = he->inner_ccb();
-    if (ic->face() != p_f) return false;
-
-    if (! _is_inner_ccb_valid(ic, he)) return false;
-  }
-
-  // Check if all isolated vertices inside the face refer to f.
-  DIso_vertex_const_iter iv_it;
-  const DVertex* v;
-  const DIso_vertex* iv;
-  for (iv_it = p_f->isolated_vertices_begin();
-       iv_it != p_f->isolated_vertices_end(); ++iv_it)
-  {
-    v = &(*iv_it);
-    if (! v->is_isolated()) return false;
-
-    iv = v->isolated_vertex();
-    if (iv->face() != p_f) return false;
-  }
-
-  // If we reached here, the face is valid.
-  return true;
-}
-
-//---------------------------------------------------------------------------
-// Check the validity of an outer CCB.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const
-{
-  // Make sure that all halfedges along the CCB refer to the same component.
-  const DHalfedge* curr = first;
-  bool found_rep = false;
-
-  do {
-    if (curr->is_on_inner_ccb()) return false;
-
-    if (oc != curr->outer_ccb()) return false;
-
-    if (! found_rep && oc->halfedge() == curr) found_rep = true;
-
-    curr = curr->next();
-  } while (curr != first);
-
-  // Return if we found the CCB representative along the outer CCB.
-  return found_rep;
-}
-
-//---------------------------------------------------------------------------
-// Check the validity of an inner CCB.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const
-{
-  // Make sure that all halfedges along the CCB refer to the same component.
-  const DHalfedge* curr = first;
-  bool found_rep = false;
-
-  do {
-    if (! curr->is_on_inner_ccb()) return false;
-
-    if (ic != curr->inner_ccb()) return false;
-
-    if (! found_rep && ic->halfedge() == curr) found_rep = true;
-
-    curr = curr->next();
-  } while (curr != first);
-
-  // Return if we found the CCB representative along the inner CCB.
-  return found_rep;
-}
-
-//---------------------------------------------------------------------------
-// Check that all vertices are unique (no two vertices with the same
-// geometric point).
-//
-template <typename GeomTraits, typename TopTraits>
-bool
-Arrangement_on_surface_2<GeomTraits, TopTraits>::_are_vertices_unique() const
-{
-  if (number_of_vertices() < 2) return true;
-
-  // Store all points associated with non-boundary vertices.
-  std::vector<Point_2>  points_vec(number_of_vertices());
-  Vertex_const_iterator vit;
-  unsigned int          i = 0;
-
-  for (vit = vertices_begin(); vit != vertices_end(); ++vit) {
-    if ((vit->parameter_space_in_x() == ARR_INTERIOR) &&
-        (vit->parameter_space_in_y() == ARR_INTERIOR))
-    {
-      points_vec[i] = vit->point();
-      ++i;
-    }
-  }
-  points_vec.resize(i);
-
-  // Sort the vector of points and make sure no two adjacent points in the
-  // sorted vector are equal.
-  typedef typename Traits_adaptor_2::Compare_xy_2       Compare_xy_2;
-  typedef typename Traits_adaptor_2::Equal_2            Equal_2;
-
-  Equal_2       equal = m_geom_traits->equal_2_object();
-  Compare_xy_2  compare_xy = m_geom_traits->compare_xy_2_object();
-  Compare_to_less<Compare_xy_2> cmp = compare_to_less(compare_xy);
-
-  std::sort(points_vec.begin(), points_vec.end(), cmp);
-  for (i = 1; i < points_vec.size(); ++i) {
-    if (equal(points_vec[i-1], points_vec[i])) return false;
-  }
-
-  return true;
-}
-
-//---------------------------------------------------------------------------
-// Check that the curves around a given vertex are ordered clockwise.
-//
-template <typename GeomTraits, typename TopTraits>
-bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
-_are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const
-{
-  if (v->degree() < 3) return true;
-
-  typename Traits_adaptor_2::Is_between_cw_2  is_between_cw =
-    m_geom_traits->is_between_cw_2_object();
-
-  Halfedge_around_vertex_const_circulator circ = v->incident_halfedges();
-  Halfedge_around_vertex_const_circulator first = circ;
-  Halfedge_around_vertex_const_circulator prev, next;
-  bool eq1, eq2;
-
-  do {
-    prev = circ; --prev;
-    next = circ; ++next;
-
-    if (!is_between_cw(circ->curve(), (circ->direction() == ARR_RIGHT_TO_LEFT),
-                       prev->curve(), (prev->direction() == ARR_RIGHT_TO_LEFT),
-                       next->curve(), (next->direction() == ARR_RIGHT_TO_LEFT),
-                       v->point(), eq1, eq2))
-      return false;
-
-    if (eq1 || eq2) return false;
-
-    ++circ;
-  } while (circ != first);
-
-  return true;
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_on_surface_2.h b/3rdparty/CGAL-4.6/include/CGAL/Arrangement_on_surface_2.h
deleted file mode 100644
index 5471a93..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_on_surface_2.h
+++ /dev/null
@@ -1,2926 +0,0 @@
-// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s): Ron Wein          <wein at post.tau.ac.il>
-//            Efi Fogel         <efif at post.tau.ac.il>
-//            Eric Berberich    <ericb at post.tau.ac.il>
-//            (based on old version by: Iddo Hanniel,
-//                                      Eyal Flato,
-//                                      Oren Nechushtan,
-//                                      Ester Ezra,
-//                                      Shai Hirsch,
-//                                      and Eugene Lipovetsky)
-#ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
-#define CGAL_ARRANGEMENT_ON_SURFACE_2_H
-
-/*! \file
- * The header file for the Arrangement_on_surface_2<Traits,Dcel> class.
- */
-
-#include <map>
-#include <vector>
-#include <algorithm>
-#include <boost/mpl/assert.hpp>
-
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_enums.h>
-#include <CGAL/HalfedgeDS_iterator.h>
-#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
-#include <CGAL/In_place_list.h>
-#include <CGAL/Arr_default_dcel.h>
-#include <CGAL/Arr_observer.h>
-#include <CGAL/Arr_accessor.h>
-#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Iterator_transform.h>
-
-namespace CGAL {
-
-/*! \class Arrangement_on_surface_2
- * The arrangement class, representing 2-dimensional subdivisions induced on
- * an arbitrary surface by a set of arbitrary planar.
- * The GeomTraits parameter corresponds to a geometry-traits class that
- * is defines the Point_2 and X_monotone_curve_2 types and implements the
- * geometric predicates and constructions for the family of curves it defines.
- * The TopTraits parameter corresponds to a topology-traits class that defines
- * the topological structure of the surface. Note that the geometry traits
- * class should also be aware of the kind of surface on which its curves and
- * points are defined.
- */
-template <typename GeomTraits_, typename TopTraits_>
-class Arrangement_on_surface_2 {
-public:
-  typedef GeomTraits_                                     Geometry_traits_2;
-  typedef TopTraits_                                      Topology_traits;
-
-  // first define adaptor ...
-  typedef Arr_traits_basic_adaptor_2<Geometry_traits_2>   Traits_adaptor_2;
-
-  // .. as it completes (potentially) missing side tags
-  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
-  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
-  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
-  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
-
-  BOOST_MPL_ASSERT(
-                   (typename
-                    Arr_sane_identified_tagging<Left_side_category,
-                    Bottom_side_category,
-                    Top_side_category,
-                    Right_side_category>::result)
-                   );
-
-public:
-  typedef Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
-  Self;
-
-  typedef typename Geometry_traits_2::Point_2             Point_2;
-  typedef typename Geometry_traits_2::X_monotone_curve_2  X_monotone_curve_2;
-
-  // maybe remove this in a future version (that supports complete handling
-  // of all sides)
-  typedef typename Arr_are_all_sides_oblivious_tag<Left_side_category,
-                                                   Bottom_side_category,
-                                                   Top_side_category,
-                                                   Right_side_category>::result
-    Are_all_sides_oblivious_category;
-
-  typedef typename Arr_has_identified_sides<Left_side_category,
-                                            Bottom_side_category>::result
-    Has_identified_sides_category;
-
-  typedef typename Arr_two_sides_category<Bottom_side_category,
-                                          Top_side_category>::result
-    Top_or_bottom_sides_category;
-
-public:
-  typedef typename Topology_traits::Dcel            Dcel;
-  typedef typename Dcel::Size                       Size;
-
-protected:
-  friend class Arr_observer<Self>;
-  friend class Arr_accessor<Self>;
-
-  // Internal DCEL types:
-  typedef typename Dcel::Vertex                     DVertex;
-  typedef typename Dcel::Halfedge                   DHalfedge;
-  typedef typename Dcel::Face                       DFace;
-  typedef typename Dcel::Outer_ccb                  DOuter_ccb;
-  typedef typename Dcel::Inner_ccb                  DInner_ccb;
-  typedef typename Dcel::Isolated_vertex            DIso_vertex;
-
-  typedef typename Dcel::difference_type            DDifference;
-  typedef typename Dcel::iterator_category          DIterator_category;
-
-  typedef typename Dcel::Vertex_iterator            DVertex_iter;
-  typedef typename Dcel::Vertex_const_iterator      DVertex_const_iter;
-
-  typedef typename Dcel::Halfedge_iterator          DHalfedge_iter;
-  typedef typename Dcel::Halfedge_const_iterator    DHalfedge_const_iter;
-
-  typedef typename Dcel::Edge_iterator              DEdge_iter;
-  typedef typename Dcel::Edge_const_iterator        DEdge_const_iter;
-
-  typedef typename Dcel::Face_iterator              DFace_iter;
-  typedef typename Dcel::Face_const_iterator        DFace_const_iter;
-
-  typedef typename DFace::Outer_ccb_iterator        DOuter_ccb_iter;
-  typedef typename DFace::Outer_ccb_const_iterator  DOuter_ccb_const_iter;
-
-  typedef typename DFace::Inner_ccb_iterator        DInner_ccb_iter;
-  typedef typename DFace::Inner_ccb_const_iterator  DInner_ccb_const_iter;
-
-  typedef typename DFace::Isolated_vertex_iterator  DIso_vertex_iter;
-  typedef typename DFace::Isolated_vertex_const_iterator
-                                                    DIso_vertex_const_iter;
-
-protected:
-  /*! \class
-   * A functor for filtering DCEL vertices at infinity.
-   */
-  class _Is_concrete_vertex {
-  private:
-    const Topology_traits* m_topol_traits;
-
-  public:
-    _Is_concrete_vertex() : m_topol_traits(NULL) {}
-
-    _Is_concrete_vertex(const Topology_traits* topol_traits) :
-      m_topol_traits(topol_traits)
-    {}
-
-    bool operator()(const DVertex& v) const
-    {
-      if (m_topol_traits == NULL)
-        return true;
-
-      return (m_topol_traits->is_concrete_vertex(&v));
-    }
-  };
-
-  /*! \class
-   * A functor for filtering fictitious DCEL vertices.
-   */
-  class _Is_valid_vertex {
-  private:
-    const Topology_traits* m_topol_traits;
-
-  public:
-    _Is_valid_vertex() : m_topol_traits(NULL) {}
-
-    _Is_valid_vertex(const Topology_traits* topol_traits) :
-      m_topol_traits(topol_traits)
-    {}
-
-    bool operator()(const DVertex& v) const
-    {
-      if (m_topol_traits == NULL)
-        return true;
-
-      return (m_topol_traits->is_valid_vertex(&v));
-    }
-  };
-
-  /*! \struct
-   * A functor for filtering fictitious DCEL halfedges.
-   */
-  class _Is_valid_halfedge {
-  private:
-    const Topology_traits* m_topol_traits;
-
-  public:
-    _Is_valid_halfedge() : m_topol_traits(NULL) {}
-
-    _Is_valid_halfedge(const Topology_traits* topol_traits) :
-      m_topol_traits(topol_traits)
-    {}
-
-    bool operator()(const DHalfedge& he) const
-    {
-      if (m_topol_traits == NULL)
-        return true;
-
-      return (m_topol_traits->is_valid_halfedge(&he));
-    }
-  };
-
-  /*! \struct
-   * A functor for filtering the fictitious faces.
-   */
-  class _Is_valid_face {
-  private:
-    const Topology_traits* m_topol_traits;
-
-  public:
-    _Is_valid_face() : m_topol_traits(NULL) {}
-
-    _Is_valid_face(const Topology_traits* topol_traits) :
-      m_topol_traits(topol_traits)
-    {}
-
-    bool operator()(const DFace& f) const
-    {
-      if (m_topol_traits == NULL)
-        return true;
-
-      return (m_topol_traits->is_valid_face(&f));
-    }
-  };
-
-  /*! \struct
-   * A functor for filtering bounded faces.
-   */
-  class _Is_unbounded_face {
-  private:
-    const Topology_traits* m_topol_traits;
-
-  public:
-    _Is_unbounded_face() : m_topol_traits(NULL) {}
-
-    _Is_unbounded_face(const Topology_traits* topol_traits) :
-      m_topol_traits(topol_traits)
-    {}
-
-    const Topology_traits* topology_traits() const { return m_topol_traits; }
-
-    bool operator()(const DFace& f) const
-    {
-      return (m_topol_traits->is_valid_face(&f) &&
-              m_topol_traits->is_unbounded(&f));
-    }
-  };
-
-public:
-  // Forward declerations:
-  class Vertex;
-  class Halfedge;
-  class Face;
-
-  // Definition of the halfedge data-structure itereators and circulators:
-  typedef I_Filtered_iterator<DVertex_iter, _Is_concrete_vertex,
-                              Vertex, DDifference, DIterator_category>
-    Vertex_iterator;
-
-  typedef I_Filtered_const_iterator<DVertex_const_iter, _Is_concrete_vertex,
-                                    DVertex_iter, Vertex, DDifference,
-                                    DIterator_category>
-    Vertex_const_iterator;
-
-  typedef I_Filtered_iterator<DHalfedge_iter, _Is_valid_halfedge,
-                              Halfedge, DDifference, DIterator_category>
-    Halfedge_iterator;
-
-  typedef I_Filtered_const_iterator<DHalfedge_const_iter, _Is_valid_halfedge,
-                                    DHalfedge_iter, Halfedge, DDifference,
-                                    DIterator_category>
-    Halfedge_const_iterator;
-
-  /*! \class
-   * Edges iterator - defined as a derived class to make it assignable
-   * to the halfedge iterator type.
-   */
-  class Edge_iterator :
-    public I_Filtered_iterator<DEdge_iter, _Is_valid_halfedge,
-                               Halfedge, DDifference, DIterator_category>
-  {
-    typedef I_Filtered_iterator<DEdge_iter, _Is_valid_halfedge,
-                                Halfedge, DDifference, DIterator_category>
-    Base;
-
-  public:
-    Edge_iterator() {}
-
-    Edge_iterator(DEdge_iter iter, DEdge_iter iend,
-                  const _Is_valid_halfedge& pred) :
-      Base(iter, iend, pred)
-    {}
-
-    // Casting to a halfedge iterator.
-    operator Halfedge_iterator() const
-    {
-      return (Halfedge_iterator(DHalfedge_iter(this->current_iterator())));
-    }
-
-    operator Halfedge_const_iterator() const
-    {
-      return (Halfedge_const_iterator
-              (DHalfedge_const_iter(this->current_iterator())));
-    }
-  };
-
-  class Edge_const_iterator :
-    public I_Filtered_const_iterator<DEdge_const_iter, _Is_valid_halfedge,
-                                     DEdge_iter, Halfedge, DDifference,
-                                     DIterator_category>
-  {
-    typedef I_Filtered_const_iterator<DEdge_const_iter, _Is_valid_halfedge,
-                                      DEdge_iter, Halfedge, DDifference,
-                                      DIterator_category>    Base;
-
-  public:
-    Edge_const_iterator() {}
-
-    Edge_const_iterator(Edge_iterator iter) :
-      Base(iter.current_iterator(), iter.past_the_end(), iter.filter())
-    {}
-
-    Edge_const_iterator(DEdge_const_iter iter, DEdge_const_iter iend,
-                        const _Is_valid_halfedge& pred) :
-      Base(iter, iend, pred)
-    {}
-
-    // Casting to a halfedge iterator.
-    operator Halfedge_const_iterator() const
-    {
-      return (Halfedge_const_iterator
-              (DHalfedge_const_iter(this->current_iterator())));
-    }
-  };
-
-  typedef I_Filtered_iterator<DFace_iter, _Is_valid_face,
-                              Face, DDifference,
-                              DIterator_category>     Face_iterator;
-
-  typedef I_Filtered_const_iterator<DFace_const_iter, _Is_valid_face,
-                                    DFace_iter, Face,
-                                    DDifference, DIterator_category>
-    Face_const_iterator;
-
-  typedef _HalfedgeDS_vertex_circ<Halfedge, Halfedge_iterator,
-                                  Bidirectional_circulator_tag>
-    Halfedge_around_vertex_circulator;
-
-  typedef _HalfedgeDS_vertex_const_circ<Halfedge, Halfedge_const_iterator,
-                                        Bidirectional_circulator_tag>
-    Halfedge_around_vertex_const_circulator;
-
-  typedef _HalfedgeDS_facet_circ<Halfedge, Halfedge_iterator,
-                                 Bidirectional_circulator_tag>
-    Ccb_halfedge_circulator;
-
-  typedef _HalfedgeDS_facet_const_circ<Halfedge, Halfedge_const_iterator,
-                                       Bidirectional_circulator_tag>
-    Ccb_halfedge_const_circulator;
-
-  /*! \class
-   * Unbounded faces iterator - defined as a derived class to make it
-   * assignable to the face iterator type.
-   */
-  class Unbounded_face_iterator :
-    public I_Filtered_iterator<DFace_iter, _Is_unbounded_face,
-                               Face, DDifference, DIterator_category>
-  {
-    typedef I_Filtered_iterator<DFace_iter, _Is_unbounded_face,
-                                Face, DDifference, DIterator_category>
-      Base;
-
-  public:
-    Unbounded_face_iterator() {}
-
-    Unbounded_face_iterator(DFace_iter iter, DFace_iter iend,
-                            const _Is_unbounded_face& is_unbounded) :
-      Base(iter, iend, is_unbounded)
-    {}
-
-    // Casting to a face iterator.
-    operator Face_iterator() const
-    {
-      return (Face_iterator(DFace_iter(this->current_iterator()),
-                            DFace_iter(this->past_the_end()),
-                            _Is_valid_face(this->filter().topology_traits())));
-    }
-
-    operator Face_const_iterator() const
-    {
-      return (Face_const_iterator
-              (DFace_const_iter(this->current_iterator()),
-               DFace_const_iter(this->past_the_end()),
-               _Is_valid_face(this->filter().topology_traits())));
-    }
-  };
-
-  class Unbounded_face_const_iterator :
-    public I_Filtered_const_iterator<DFace_const_iter, _Is_unbounded_face,
-                                     DFace_iter, Face, DDifference,
-                                     DIterator_category>
-  {
-    typedef I_Filtered_const_iterator<DFace_const_iter, _Is_unbounded_face,
-                                      DFace_iter, Face, DDifference,
-                                      DIterator_category>   Base;
-
-  public:
-    Unbounded_face_const_iterator() {}
-
-    Unbounded_face_const_iterator(Unbounded_face_iterator iter) : Base(iter) {}
-
-    Unbounded_face_const_iterator(DFace_const_iter iter,
-                                  DFace_const_iter iend,
-                                  const _Is_unbounded_face& is_unbounded) :
-      Base(iter, iend, is_unbounded)
-    {}
-
-    // Casting to a face iterator.
-    operator Face_const_iterator() const
-    {
-      return (Face_const_iterator(DFace_const_iter(this->current_iterator()),
-                                  DFace_const_iter(this->past_the_end())));
-    }
-  };
-
-protected:
-  struct _Halfedge_to_ccb_circulator {
-    typedef DHalfedge*               argument_type;
-    typedef Ccb_halfedge_circulator  result_type;
-
-    result_type operator()(argument_type s) const
-    { return Ccb_halfedge_circulator(Halfedge_iterator(s)); }
-  };
-
-  struct _Const_halfedge_to_ccb_circulator {
-    typedef const DHalfedge*               argument_type;
-    typedef Ccb_halfedge_const_circulator  result_type;
-
-    result_type operator()(argument_type s) const
-    { return Ccb_halfedge_const_circulator(Halfedge_const_iterator(s)); }
-  };
-
-  typedef Cast_function_object<DVertex, Vertex>   _Vertex_to_vertex;
-
-public:
-  typedef Iterator_transform<DOuter_ccb_iter, _Halfedge_to_ccb_circulator>
-                                      Outer_ccb_iterator;
-
-  typedef Iterator_transform<DOuter_ccb_const_iter,
-                             _Const_halfedge_to_ccb_circulator>
-                                      Outer_ccb_const_iterator;
-
-  typedef Iterator_transform<DInner_ccb_iter, _Halfedge_to_ccb_circulator>
-                                      Inner_ccb_iterator;
-
-  typedef Iterator_transform<DInner_ccb_const_iter,
-                             _Const_halfedge_to_ccb_circulator>
-                                      Inner_ccb_const_iterator;
-
-  /*! \class
-   * Isolated vertices iterator - defined as a class to make it assignable
-   * to the vertex iterator type.
-   */
-  class Isolated_vertex_iterator :
-    public Iterator_project<DIso_vertex_iter, _Vertex_to_vertex>
-  {
-    typedef Iterator_project<DIso_vertex_iter, _Vertex_to_vertex>       Base;
-
-  public:
-    Isolated_vertex_iterator() {}
-
-    Isolated_vertex_iterator(DIso_vertex_iter iter) : Base(iter) {}
-
-    // Casting to a vertex iterator.
-    operator Vertex_iterator() const
-    { return (Vertex_iterator(DVertex_iter(this->ptr()))); }
-
-    operator Vertex_const_iterator() const
-    { return (Vertex_const_iterator(DVertex_const_iter(this->ptr()))); }
-  };
-
-  class Isolated_vertex_const_iterator :
-    public Iterator_project<DIso_vertex_const_iter, _Vertex_to_vertex>
-  {
-    typedef Iterator_project<DIso_vertex_const_iter, _Vertex_to_vertex>  Base;
-
-  public:
-    Isolated_vertex_const_iterator() {}
-
-    Isolated_vertex_const_iterator(Isolated_vertex_iterator iter) :
-      Base(iter)
-    {}
-
-    Isolated_vertex_const_iterator(DIso_vertex_const_iter iter) :
-      Base(iter)
-    {}
-
-    // Casting to a vertex iterator.
-    operator Vertex_const_iterator() const
-    { return (Vertex_const_iterator(DVertex_const_iter(this->ptr()))); }
-  };
-
-protected:
-  class _Valid_vertex_iterator :
-    public I_Filtered_iterator<DVertex_iter, _Is_valid_vertex, Vertex,
-                               DDifference, DIterator_category>
-  {
-    typedef I_Filtered_iterator<DVertex_iter, _Is_valid_vertex, Vertex,
-                                DDifference, DIterator_category> Base;
-
-  public:
-    _Valid_vertex_iterator() {}
-
-    _Valid_vertex_iterator(DVertex_iter iter, DVertex_iter iend,
-                           const _Is_valid_vertex& pred) :
-      Base(iter, iend, pred)
-    {}
-
-    // Casting to a vertex iterator.
-    operator Vertex_iterator() const
-    { return (Vertex_iterator(DVertex_iter(this->current_iterator()))); }
-
-    operator Vertex_const_iterator() const
-    {
-      return (Vertex_const_iterator(DVertex_const_iter
-                                    (this->current_iterator())));
-    }
-  };
-
-public:
-  // Definition of handles (equivalent to iterators):
-  typedef Vertex_iterator              Vertex_handle;
-  typedef Halfedge_iterator            Halfedge_handle;
-  typedef Face_iterator                Face_handle;
-
-  typedef Vertex_const_iterator        Vertex_const_handle;
-  typedef Halfedge_const_iterator      Halfedge_const_handle;
-  typedef Face_const_iterator          Face_const_handle;
-
-  /*! \class
-   * The arrangement vertex class.
-   */
-  class Vertex : public DVertex {
-    typedef DVertex                     Base;
-
-  public:
-    /*! Default constrcutor. */
-    Vertex() {}
-
-    /*! Check whether the vertex lies on an open boundary. */
-    bool is_at_open_boundary() const { return (Base::has_null_point()); }
-
-    /*! Get the vertex degree (number of incident edges). */
-    Size degree() const
-    {
-      if (this->is_isolated())
-        return (0);
-
-      // Go around the vertex and count the incident halfedges.
-      const DHalfedge* he_first = Base::halfedge();
-      const DHalfedge* he_curr = he_first;
-      Size n = 0;
-
-      if (he_curr != NULL) {
-        do {
-          ++n;
-          he_curr = he_curr->next()->opposite();
-        } while (he_curr != he_first);
-      }
-      return (n);
-    }
-
-    /*!
-     * Get the incident halfedges (non-const version).
-     * \pre The vertex is not isolated.
-     */
-    Halfedge_around_vertex_circulator incident_halfedges()
-    {
-      CGAL_precondition(! this->is_isolated());
-      return Halfedge_around_vertex_circulator
-        (DHalfedge_iter(Base::halfedge()));
-    }
-
-    /*!
-     * Get the incident halfedges (const version).
-     * \pre The vertex is not isolated.
-     */
-    Halfedge_around_vertex_const_circulator incident_halfedges() const
-    {
-      CGAL_precondition(! this->is_isolated());
-      return Halfedge_around_vertex_const_circulator
-        (DHalfedge_const_iter(Base::halfedge()));
-    }
-
-    /*!
-     * Get the face that contains the vertex (non-const version).
-     * \pre The vertex is isolated.
-     */
-    Face_handle face()
-    {
-      CGAL_precondition(this->is_isolated());
-      return (DFace_iter(Base::isolated_vertex()->face()));
-    }
-
-    /*!
-     * Get the face that contains the vertex (const version).
-     * \pre The vertex is isolated.
-     */
-    Face_const_handle face() const
-    {
-      CGAL_precondition(this->is_isolated());
-      return (DFace_const_iter(Base::isolated_vertex()->face()));
-    }
-
-
-  private:
-    // Blocking access to inherited functions from the Dcel::Vertex.
-    bool has_null_point() const;
-    void set_point(Point_2* );
-    void set_boundary(Arr_parameter_space , Arr_parameter_space );
-    const DHalfedge* halfedge() const;
-    DHalfedge* halfedge();
-    void set_halfedge(DHalfedge* );
-    const DIso_vertex* isolated_vertex() const;
-    DIso_vertex* isolated_vertex();
-    void set_isolated_vertex(DIso_vertex* );
-  };
-
-  /*!
-   * \class The arrangement halfedge class.
-   */
-  class Halfedge : public DHalfedge {
-    typedef DHalfedge             Base;
-
-  public:
-    /*! Default constrcutor. */
-    Halfedge() {}
-
-    /*! Check whether the halfedge is fictitious. */
-    bool is_fictitious() const
-    { return (Base::has_null_curve()); }
-
-    /*! Get the source vertex (non-const version). */
-    Vertex_handle source()
-    { return (DVertex_iter(Base::opposite()->vertex())); }
-
-    /*! Get the source vertex (const version). */
-    Vertex_const_handle source() const
-    { return (DVertex_const_iter(Base::opposite()->vertex())); }
-
-    /*! Get the target vertex (non-const version). */
-    Vertex_handle target()
-    { return (DVertex_iter(Base::vertex())); }
-
-    /*! Get the target vertex (const version). */
-    Vertex_const_handle target() const
-    { return (DVertex_const_iter(Base::vertex())); }
-
-    /*! Get the incident face (non-const version). */
-    Face_handle face()
-    {
-      return (! Base::is_on_inner_ccb()) ?
-        DFace_iter(Base::outer_ccb()->face()) :
-        DFace_iter(Base::inner_ccb()->face());
-    }
-
-    /*! Get the incident face (const version). */
-    Face_const_handle face() const
-    {
-      return (! Base::is_on_inner_ccb()) ?
-        DFace_const_iter(Base::outer_ccb()->face()) :
-        DFace_const_iter(Base::inner_ccb()->face());
-    }
-
-    /*! Get the twin halfedge (non-const version). */
-    Halfedge_handle twin()
-    { return (DHalfedge_iter(Base::opposite())); }
-
-    /*! Get the twin halfedge (const version). */
-    Halfedge_const_handle twin() const
-    { return (DHalfedge_const_iter(Base::opposite())); }
-
-    /*! Get the previous halfegde in the chain (non-const version). */
-    Halfedge_handle prev()
-    { return (DHalfedge_iter(Base::prev())); }
-
-    /*! Get the previous halfegde in the chain (const version). */
-    Halfedge_const_handle prev() const
-    { return (DHalfedge_const_iter(Base::prev())); }
-
-    /*! Get the next halfegde in the chain (non-const version). */
-    Halfedge_handle next()
-    { return (DHalfedge_iter(Base::next())); }
-
-    /*! Get the next halfegde in the chain (const version). */
-    Halfedge_const_handle next() const
-    { return (DHalfedge_const_iter(Base::next())); }
-
-    /*! Get the connected component of the halfedge (non-const version). */
-    Ccb_halfedge_circulator ccb()
-    { return Ccb_halfedge_circulator(DHalfedge_iter(this)); }
-
-    /*! Get the connected component of the halfedge (const version). */
-    Ccb_halfedge_const_circulator ccb() const
-    { return Ccb_halfedge_const_circulator(DHalfedge_const_iter(this)); }
-
-  private:
-
-    // Blocking access to inherited functions from the Dcel::Halfedge.
-    bool has_null_curve() const;
-    void set_curve(X_monotone_curve_2* );
-    const DHalfedge* opposite() const;
-    DHalfedge* opposite();
-    void set_opposite(DHalfedge* );
-    void set_direction(Arr_halfedge_direction );
-    void set_prev(DHalfedge* );
-    void set_next(DHalfedge* );
-    const DVertex* vertex() const ;
-    DVertex* vertex();
-    void set_vertex(DVertex* );
-    const DOuter_ccb* outer_ccb() const;
-    DOuter_ccb* outer_ccb();
-    void set_outer_ccb(DOuter_ccb* );
-    const DInner_ccb* inner_ccb() const;
-    DInner_ccb* inner_ccb();
-    void set_inner_ccb(DInner_ccb* );
-  };
-
-  /*!
-   * \class The arrangement face class.
-   */
-  class Face : public DFace {
-    typedef DFace                 Base;
-
-  public:
-    /*! Default constrcutor. */
-    Face() {}
-
-    /*! Get an iterator for the outer CCBs of the face (non-const version). */
-    Outer_ccb_iterator outer_ccbs_begin()
-    { return (DOuter_ccb_iter(Base::outer_ccbs_begin())); }
-
-    /*! Get an iterator for the outer CCBs the face (const version). */
-    Outer_ccb_const_iterator outer_ccbs_begin() const
-    { return (DOuter_ccb_const_iter(Base::outer_ccbs_begin())); }
-
-    /*! Get a past-the-end iterator for the outer CCBs (non-const version). */
-    Outer_ccb_iterator outer_ccbs_end()
-    { return (DOuter_ccb_iter(Base::outer_ccbs_end())); }
-
-    /*! Get a past-the-end iterator for the outer CCBs (const version). */
-    Outer_ccb_const_iterator outer_ccbs_end() const
-    { return (DOuter_ccb_const_iter(Base::outer_ccbs_end())); }
-
-    /*! Get an iterator for the inner CCBs of the face (non-const version). */
-    Inner_ccb_iterator inner_ccbs_begin()
-    { return (DInner_ccb_iter(Base::inner_ccbs_begin())); }
-
-    /*! Get an iterator for the inner CCBs the face (const version). */
-    Inner_ccb_const_iterator inner_ccbs_begin() const
-    { return (DInner_ccb_const_iter(Base::inner_ccbs_begin())); }
-
-    /*! Get a past-the-end iterator for the inner CCBs (non-const version). */
-    Inner_ccb_iterator inner_ccbs_end()
-    { return (DInner_ccb_iter(Base::inner_ccbs_end())); }
-
-    /*! Get a past-the-end iterator for the inner CCBs (const version). */
-    Inner_ccb_const_iterator inner_ccbs_end() const
-    { return (DInner_ccb_const_iter(Base::inner_ccbs_end())); }
-
-    /*! Get an iterator for the isolated_vertices inside the face
-     * (non-const version).
-     */
-    Isolated_vertex_iterator isolated_vertices_begin()
-    { return (DIso_vertex_iter(Base::isolated_vertices_begin())); }
-
-    /*! Get an iterator for the isolated_vertices inside the face
-     * (const version).
-     */
-    Isolated_vertex_const_iterator isolated_vertices_begin() const
-    { return (DIso_vertex_const_iter(Base::isolated_vertices_begin())); }
-
-    /*! Get a past-the-end iterator for the isolated_vertices
-     * (non-const version).
-     */
-    Isolated_vertex_iterator isolated_vertices_end()
-    { return (DIso_vertex_iter(Base::isolated_vertices_end())); }
-
-    /*! Get a past-the-end iterator for the isolated_vertices
-     * (const version).
-     */
-    Isolated_vertex_const_iterator isolated_vertices_end() const
-    { return (DIso_vertex_const_iter(Base::isolated_vertices_end())); }
-
-    /// \name These functions are kept for Arrangement_2 compatibility:
-    //@{
-
-    /*!
-     * Check whether the face has an outer CCB.
-     */
-    bool has_outer_ccb() const
-    { return (Base::number_of_outer_ccbs() > 0); }
-
-    /*!
-     * Get a circulator for the outer boundary (non-const version).
-     * \pre The face has a single outer CCB.
-     */
-    Ccb_halfedge_circulator outer_ccb()
-    {
-      CGAL_precondition(Base::number_of_outer_ccbs() == 1);
-
-      DOuter_ccb_iter iter = Base::outer_ccbs_begin();
-      DHalfedge* he = *iter;
-      return Ccb_halfedge_circulator(DHalfedge_iter(he));
-    }
-
-    /*!
-     * Get a circulator for the outer boundary (const version).
-     * \pre The face has a single outer CCB.
-     */
-    Ccb_halfedge_const_circulator outer_ccb() const
-    {
-      CGAL_precondition(Base::number_of_outer_ccbs() == 1);
-
-      DOuter_ccb_const_iter iter = Base::outer_ccbs_begin();
-      const DHalfedge* he = *iter;
-      return Ccb_halfedge_const_circulator(DHalfedge_const_iter(he));
-    }
-
-    /*! Get the number of holes (inner CCBs) inside the face. */
-    Size number_of_holes() const
-    { return (Base::number_of_inner_ccbs()); }
-
-    /*! Get an iterator for the holes inside the face (non-const version). */
-    Inner_ccb_iterator holes_begin()
-    { return (this->inner_ccbs_begin()); }
-
-    /*! Get an iterator for the holes inside the face (const version). */
-    Inner_ccb_const_iterator holes_begin() const
-    { return (this->inner_ccbs_begin()); }
-
-    /*! Get a past-the-end iterator for the holes (non-const version). */
-    Inner_ccb_iterator holes_end()
-    { return (this->inner_ccbs_end()); }
-
-    /*! Get a past-the-end iterator for the holes (const version). */
-    Inner_ccb_const_iterator holes_end() const
-    { return (this->inner_ccbs_end()); }
-    //@}
-
-  private:
-    // Blocking access to inherited functions from the Dcel::Face.
-    void set_unbounded(bool);
-    void set_fictitious(bool);
-    void add_outer_ccb(DOuter_ccb*, Halfedge*);
-    void erase_outer_ccb(DOuter_ccb*);
-    void add_inner_ccb(DInner_ccb*, Halfedge*);
-    void erase_inner_ccb(DInner_ccb*);
-    void add_isolated_vertex(DIso_vertex*, DVertex*);
-    void erase_isolated_vertex(DIso_vertex*);
-  };
-
-protected:
-  typedef CGAL_ALLOCATOR(Point_2)                 Points_alloc;
-  typedef CGAL_ALLOCATOR(X_monotone_curve_2)      Curves_alloc;
-
-  typedef Arr_observer<Self>                      Observer;
-  typedef std::list<Observer*>                    Observers_container;
-  typedef typename Observers_container::iterator  Observers_iterator;
-
-  typedef typename Observers_container::reverse_iterator
-                                                  Observers_rev_iterator;
-
-  // Data members:
-  Topology_traits         m_topol_traits;  // the topology traits.
-  Points_alloc            m_points_alloc;  // allocator for the points.
-  Curves_alloc            m_curves_alloc;  // allocator for the curves.
-  Observers_container     m_observers;     // pointers to existing observers.
-  const Traits_adaptor_2* m_geom_traits;   // the geometry-traits adaptor.
-  bool                    m_own_traits;    // inidicates whether the geometry
-                                           // traits should be freed up.
-
-public:
-  /// \name Constructors.
-  //@{
-
-  /*! Default constructor. */
-  Arrangement_on_surface_2();
-
-  /*! Copy constructor. */
-  Arrangement_on_surface_2(const Self & arr);
-
-  /*! Constructor given a traits object. */
-  Arrangement_on_surface_2(const Geometry_traits_2* geom_traits);
-  //@}
-
-  /// \name Assignment functions.
-  //@{
-
-  /*! Assignment operator. */
-  Self& operator=(const Self& arr);
-
-  /*! Assign an arrangement. */
-  void assign(const Self& arr);
-  //@}
-
-  /// \name Destruction functions.
-  //@{
-
-  /*! Destructor. */
-  virtual ~Arrangement_on_surface_2();
-
-  /*! Clear the arrangement. */
-  virtual void clear();
-  //@}
-
-  /// \name Access the traits-class objects.
-  //@{
-
-  /*! Access the geometry-traits object (const version). */
-  inline const Traits_adaptor_2* traits_adaptor() const
-  { return (m_geom_traits); }
-
-  /*! Access the geometry-traits object (const version). */
-  inline const Geometry_traits_2* geometry_traits() const
-  { return (m_geom_traits); }
-
-  /*! Access the topology-traits object (non-const version). */
-  inline Topology_traits* topology_traits()
-  { return (&m_topol_traits); }
-
-  /*! Access the topology-traits object (const version). */
-  inline const Topology_traits* topology_traits() const
-  { return (&m_topol_traits); }
-  //@}
-
-  /// \name Access the arrangement dimensions.
-  //@{
-
-  /*! Check whether the arrangement is empty. */
-  bool is_empty() const
-  { return (m_topol_traits.is_empty_dcel()); }
-
-  /*!
-   * Check whether the arrangement is valid. In particular, check the
-   * validity of each vertex, halfedge and face, their incidence relations
-   * and the geometric properties of the arrangement.
-   */
-  bool is_valid() const;
-
-  /*! Get the number of arrangement vertices. */
-  Size number_of_vertices() const
-  { return (m_topol_traits.number_of_concrete_vertices()); }
-
-  /*! Get the number of isolated arrangement vertices. */
-  Size number_of_isolated_vertices() const
-  { return (_dcel().size_of_isolated_vertices()); }
-
-  /*! Get the number of arrangement halfedges (the result is always even). */
-  Size number_of_halfedges() const
-  { return (m_topol_traits.number_of_valid_halfedges()); }
-
-  /*! Get the number of arrangement edges. */
-  Size number_of_edges() const
-  { return (m_topol_traits.number_of_valid_halfedges() / 2); }
-
-  /*! Get the number of arrangement faces. */
-  Size number_of_faces() const
-  { return (m_topol_traits.number_of_valid_faces()); }
-
-  /*! Get the number of unbounded faces in the arrangement. */
-  Size number_of_unbounded_faces() const
-  {
-    Unbounded_face_const_iterator iter = unbounded_faces_begin();
-    Unbounded_face_const_iterator end = unbounded_faces_end();
-    Size n_unb = 0;
-
-    while (iter != end) {
-      ++n_unb;
-      ++iter;
-    }
-
-    return (n_unb);
-  }
-  //@}
-
-  /// \name Traversal functions for the arrangement vertices.
-  //@{
-
-  /*! Get an iterator for the first vertex in the arrangement. */
-  Vertex_iterator vertices_begin()
-  {
-    return (Vertex_iterator(_dcel().vertices_begin(), _dcel().vertices_end(),
-                            _Is_concrete_vertex(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end iterator for the arrangement vertices. */
-  Vertex_iterator vertices_end()
-  {
-    return (Vertex_iterator(_dcel().vertices_end(), _dcel().vertices_end(),
-                            _Is_concrete_vertex(&m_topol_traits)));
-  }
-
-  /*! Get a const iterator for the first vertex in the arrangement. */
-  Vertex_const_iterator vertices_begin() const
-  {
-    return (Vertex_const_iterator(_dcel().vertices_begin(),
-                                  _dcel().vertices_end(),
-                                  _Is_concrete_vertex(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end const iterator for the arrangement vertices. */
-  Vertex_const_iterator vertices_end() const
-  {
-    return (Vertex_const_iterator(_dcel().vertices_end(),
-                                  _dcel().vertices_end(),
-                                  _Is_concrete_vertex(&m_topol_traits)));
-  }
-  //@}
-
-  /// \name Traversal functions for the arrangement halfedges.
-  //@{
-
-  /*! Get an iterator for the first halfedge in the arrangement. */
-  Halfedge_iterator halfedges_begin()
-  {
-    return (Halfedge_iterator(_dcel().halfedges_begin(),
-                              _dcel().halfedges_end(),
-                              _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end iterator for the arrangement halfedges. */
-  Halfedge_iterator halfedges_end()
-  {
-    return (Halfedge_iterator(_dcel().halfedges_end(),
-                              _dcel().halfedges_end(),
-                              _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a const iterator for the first halfedge in the arrangement. */
-  Halfedge_const_iterator halfedges_begin() const
-  {
-    return (Halfedge_const_iterator(_dcel().halfedges_begin(),
-                                    _dcel().halfedges_end(),
-                                    _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end const iterator for the arrangement halfedges. */
-  Halfedge_const_iterator halfedges_end() const
-  {
-    return (Halfedge_const_iterator(_dcel().halfedges_end(),
-                                    _dcel().halfedges_end(),
-                                    _Is_valid_halfedge(&m_topol_traits)));
-  }
-  //@}
-
-  /// \name Traversal functions for the arrangement edges.
-  //@{
-
-  /*! Get an iterator for the first edge in the arrangement. */
-  Edge_iterator edges_begin()
-  {
-    return (Edge_iterator(_dcel().edges_begin(), _dcel().edges_end(),
-                          _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end iterator for the arrangement edges. */
-  Edge_iterator edges_end()
-  {
-    return (Edge_iterator(_dcel().edges_end(), _dcel().edges_end(),
-                          _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a const iterator for the first edge in the arrangement. */
-  Edge_const_iterator edges_begin() const
-  {
-    return (Edge_const_iterator(_dcel().edges_begin(), _dcel().edges_end(),
-                                _Is_valid_halfedge(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end const iterator for the arrangement edges. */
-  Edge_const_iterator edges_end() const
-  {
-    return (Edge_const_iterator(_dcel().edges_end(), _dcel().edges_end(),
-                                _Is_valid_halfedge(&m_topol_traits)));
-  }
-  //@}
-
-  /// \name Traversal functions for the arrangement faces.
-  //@{
-
-  /*! Get an iterator for the first face in the arrangement. */
-  Face_iterator faces_begin()
-  {
-    return (Face_iterator(_dcel().faces_begin(), _dcel().faces_end(),
-                          _Is_valid_face(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end iterator for the arrangement faces. */
-  Face_iterator faces_end()
-  {
-    return (Face_iterator(_dcel().faces_end(), _dcel().faces_end(),
-                          _Is_valid_face(&m_topol_traits)));
-  }
-
-  /*! Get a const iterator for the first face in the arrangement. */
-  Face_const_iterator faces_begin() const
-  {
-    return (Face_const_iterator(_dcel().faces_begin(), _dcel().faces_end(),
-                                _Is_valid_face(&m_topol_traits)));
-  }
-
-  /*! Get a past-the-end const iterator for the arrangement faces. */
-  Face_const_iterator faces_end() const
-  {
-    return (Face_const_iterator(_dcel().faces_end(), _dcel().faces_end(),
-                                _Is_valid_face(&m_topol_traits)));
-  }
-
-  //! reference_face (const version).
-  /*! The function returns a reference face of the arrangement.
-   * All reference faces of arrangements of the same type have a common
-   * point.
-   * \return A const handle to the reference face.
-   */
-  Face_const_handle reference_face() const
-  {
-    return _const_handle_for(this->topology_traits()->reference_face());
-  }
-
-  //! reference_face (non-const version).
-  /*! The function returns a reference face of the arrangement.
-    All reference faces of arrangements of the same type have a common
-    point.
-    \return A handle to the reference face.
-  */
-  Face_handle reference_face()
-  { return _handle_for(this->topology_traits()->reference_face()); }
-
-  //@}
-
-  /// \name Traversal functions for the unbounded faces of the arrangement.
-  //@{
-
-  /*! Get an iterator for the first unbounded face in the arrangement. */
-  Unbounded_face_iterator unbounded_faces_begin()
-  {
-    return Unbounded_face_iterator(_dcel().faces_begin(), _dcel().faces_end(),
-                                   _Is_unbounded_face(&m_topol_traits));
-  }
-
-  /*! Get a past-the-end iterator for the unbounded arrangement faces. */
-  Unbounded_face_iterator unbounded_faces_end()
-  {
-    return Unbounded_face_iterator(_dcel().faces_end(), _dcel().faces_end(),
-                                   _Is_unbounded_face(&m_topol_traits));
-  }
-
-  /*! Get a const iterator for the first unbounded face in the arrangement. */
-  Unbounded_face_const_iterator unbounded_faces_begin() const
-  {
-    return Unbounded_face_const_iterator(_dcel().faces_begin(),
-                                         _dcel().faces_end(),
-                                         _Is_unbounded_face(&m_topol_traits));
-  }
-
-  /*! Get a past-the-end const iterator for the unbounded arrangement faces. */
-  Unbounded_face_const_iterator unbounded_faces_end() const
-  {
-    return Unbounded_face_const_iterator(_dcel().faces_end(),
-                                         _dcel().faces_end(),
-                                         _Is_unbounded_face(&m_topol_traits));
-  }
-
-  /*! Get the fictitious face (non-const version). */
-  Face_handle fictitious_face()
-  {
-    // The fictitious contains all other faces in a single hole inside it.
-    return
-      Face_handle(const_cast<DFace*>(this->topology_traits()->initial_face()));
-  }
-
-  /*!
-   * Get the unbounded face (const version).
-   * The fictitious contains all other faces in a single hole inside it.
-   */
-  Face_const_handle fictitious_face() const
-  { return DFace_const_iter(this->topology_traits()->initial_face()); }
-  //@}
-
-  /// \name Casting away constness for handle types.
-  //@{
-  Vertex_handle non_const_handle(Vertex_const_handle vh)
-  {
-    DVertex* p_v = (DVertex*)&(*vh);
-    return (Vertex_handle(p_v));
-  }
-
-  Halfedge_handle non_const_handle(Halfedge_const_handle hh)
-  {
-    DHalfedge* p_he = (DHalfedge*)&(*hh);
-    return (Halfedge_handle(p_he));
-  }
-
-  Face_handle non_const_handle(Face_const_handle fh)
-  {
-    DFace* p_f = (DFace*) &(*fh);
-    return (Face_handle(p_f));
-  }
-  //@}
-
-  /// \name Specilaized insertion functions.
-  //@{
-
-  /*!
-   * Insert a point that forms an isolated vertex in the interior of a given
-   * face.
-   * \param p The given point.
-   * \param f The face into which we insert the new isolated vertex.
-   * \return A handle for the isolated vertex that has been created.
-   */
-  Vertex_handle insert_in_face_interior(const Point_2& p, Face_handle f);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement as a new hole (inner
-   * component) inside the given face.
-   * \param cv The given x-monotone curve.
-   * \param f The face into which we insert the new hole.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve, directed (lexicographically) from left to right.
-   */
-  Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv,
-                                          Face_handle f);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that its left
-   * endpoint corresponds to a given arrangement vertex.
-   * \param cv The given x-monotone curve.
-   * \param v The given vertex.
-   * \param f The face that contains v (in case it has no incident edges).
-   * \pre The left endpoint of cv is incident to the vertex v.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve, whose target is the new vertex.
-   */
-  Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv,
-                                          Vertex_handle v,
-                                          Face_handle f = Face_handle());
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that its left
-   * endpoints corresponds to a given arrangement vertex, given the exact
-   * place for the curve in the circular list around this vertex.
-   * \param cv The given x-monotone curve.
-   * \param prev The reference halfedge. We should represent cv as a pair
-   *             of edges, one of them should become prev's successor.
-   * \pre The target vertex of prev is cv's left endpoint.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve, whose target is the new vertex that was created.
-   */
-  Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv,
-                                          Halfedge_handle prev);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that its right
-   * endpoint corresponds to a given arrangement vertex.
-   * \param cv The given x-monotone curve.
-   * \param v The given vertex.
-   * \param f The face that contains v (in case it has no incident edges).
-   * \pre The right endpoint of cv is incident to the vertex v.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve, whose target is the new vertex.
-   */
-  Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv,
-                                           Vertex_handle v,
-                                           Face_handle f = Face_handle());
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that its right
-   * endpoints corresponds to a given arrangement vertex, given the exact
-   * place for the curve in the circular list around this vertex.
-
-   * \param cv The given x-monotone curve.
-   * \param prev The reference halfedge. We should represent cv as a pair
-   *             of edges, one of them should become prev's successor.
-   * \pre The target vertex of prev is cv's right endpoint.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve, whose target is the new vertex that was created.
-   */
-  Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv,
-                                           Halfedge_handle prev);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that both its
-   * endpoints correspond to given arrangement vertices.
-   * \param cv The given x-monotone curve.
-   * \param v1 The first vertex.
-   * \param v2 The second vertex.
-   * \param f The face that contains v1 and v2
-   *          (in case both have no incident edges).
-   * \pre v1 and v2 corresponds to cv's endpoints.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve directed from v1 to v2.
-   */
-  Halfedge_handle insert_at_vertices(const X_monotone_curve_2& cv,
-                                     Vertex_handle v1,
-                                     Vertex_handle v2,
-                                     Face_handle f = Face_handle());
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that both its
-   * endpoints correspond to given arrangement vertices, given the exact
-   * place for the curve in one of the circular lists around a vertex.
-   * \param cv The given x-monotone curve.
-   * \param prev1 The reference halfedge for the first vertex.
-   * \param v2 The second vertex.
-   * \pre The target vertex of prev1 and v2 corresponds to cv's endpoints.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve directed from prev1 to v2.
-   */
-  Halfedge_handle insert_at_vertices(const X_monotone_curve_2& cv,
-                                     Halfedge_handle prev1,
-                                     Vertex_handle v2);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that both its
-   * endpoints correspond to given arrangement vertices, given the exact
-   * place for the curve in both circular lists around these two vertices.
-   * \param cv the given curve.
-   * \param prev1 The reference halfedge for the first vertex.
-   * \param prev2 The reference halfedge for the second vertex.
-   * \pre The target vertices of prev1 and prev2 are cv's endpoints.
-   * \return A handle for one of the halfedges corresponding to the inserted
-   *         curve directed from prev1's target to prev2's target.
-   */
-  Halfedge_handle insert_at_vertices(const X_monotone_curve_2 & cv,
-                                     Halfedge_handle prev1,
-                                     Halfedge_handle prev2);
-
-  //@}
-
-  /// \name Vertex manipulation functions.
-  //@{
-
-  /*!
-   * Replace the point associated with the given vertex.
-   * \param v The vertex to modify.
-   * \param p The point that should be associated with the edge.
-   * \pre p is geometrically equivalent to the current point
-   *      associated with v.
-   * \return A handle for a the modified vertex (same as v).
-   */
-  Vertex_handle modify_vertex(Vertex_handle v, const Point_2& p);
-
-  /*!
-   * Remove an isolated vertex from the interior of a given face.
-   * \param v The vertex to remove.
-   * \pre v is an isolated vertex (it has no incident halfedges).
-   * \return A handle for the face containing v.
-   */
-  Face_handle remove_isolated_vertex(Vertex_handle v);
-
-  ///@}
-
-  /// \name Halfedge manipulation functions.
-  //@{
-
-  /*!
-   * Replace the x-monotone curve associated with the given edge.
-   * \param e The edge to modify.
-   * \param cv The curve that should be associated with the edge.
-   * \pre cv is geometrically equivalent to the current curve
-   *      associated with e.
-   * \return A handle for a the modified halfedge (same as e).
-   */
-  Halfedge_handle modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv);
-
-  /*!
-   * Split a given edge into two, and associate the given x-monotone
-   * curves with the split edges.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param cv1 The curve that should be associated with the first split edge.
-   * \param cv2 The curve that should be associated with the second split edge.
-
-   * \pre cv1's source and cv2's target equal the endpoints of the curve
-   *      currently assoicated with e (respectively), and cv1's target equals
-   *      cv2's target, and this is the split point (ot vice versa).
-   * \return A handle for the halfedge whose source is the source of the the
-   *         original halfedge e, and whose target is the split point.
-   */
-  Halfedge_handle split_edge(Halfedge_handle e,
-                             const X_monotone_curve_2& cv1,
-                             const X_monotone_curve_2& cv2);
-
-  /*!
-   * Merge two edges to form a single edge, and associate the given x-monotone
-   * curve with the merged edge.
-   * \param e1 The first edge to merge (one of the pair of twin halfegdes).
-   * \param e2 The second edge to merge (one of the pair of twin halfegdes).
-   * \param cv The curve that should be associated with merged edge.
-   * \return A handle for the merged halfedge.
-   */
-  Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2,
-                             const X_monotone_curve_2& cv);
-
-  /*!
-   * Remove an edge from the arrangement.
-   * \param e The edge to remove (one of the pair of twin halfegdes).
-   * \param remove_source Should the source vertex of e be removed if it
-   *                      becomes isolated (true by default).
-   * \param remove_target Should the target vertex of e be removed if it
-   *                      becomes isolated (true by default).
-   * \return A handle for the remaining face.
-   */
-  Face_handle remove_edge(Halfedge_handle e,
-                          bool remove_source = true,
-                          bool remove_target = true);
-
-  //@}
-
-protected:
-  /// \name Determining the boundary-side conditions.
-  //@{
-
-  /*! Determines whether a boundary-side categoty indicates an open side.
-   */
-  inline bool is_open(Arr_boundary_side_tag) const { return false; }
-  inline bool is_open(Arr_open_side_tag) const { return true; }
-
-  /*! Determines whether the given x and y parameter spaces are open.
-   * These parameter spaces are typically associated with a particular curve
-   * end.
-   * \param ps_x The parameter space in x.
-   * \param ps_y The parameter space in y.
-   */
-  inline bool is_open(Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
-  {
-    return
-      (((ps_x == ARR_LEFT_BOUNDARY) && is_open(Left_side_category())) ||
-       ((ps_x == ARR_RIGHT_BOUNDARY) && is_open(Right_side_category())) ||
-       ((ps_y == ARR_BOTTOM_BOUNDARY) && is_open(Bottom_side_category())) ||
-       ((ps_y == ARR_TOP_BOUNDARY) && is_open(Top_side_category())));
-
-  }
-
-  /*! Determines whether a boundary-side categoty indicates a constracted side.
-   */
-  inline bool is_contracted(Arr_boundary_side_tag) const { return false; }
-  inline bool is_contracted(Arr_contracted_side_tag) const { return true; }
-
-  /*! Determines whether a boundary-side categoty indicates a constracted side.
-   */
-  inline bool is_identified(Arr_boundary_side_tag) const { return false; }
-  inline bool is_identified(Arr_identified_side_tag) const { return true; }
-  //@}
-
-  /// \name Allocating and de-allocating points and curves.
-  //@{
-
-  /*! Allocate a new point. */
-  Point_2*_new_point(const Point_2& pt)
-  {
-    Point_2* p_pt = m_points_alloc.allocate(1);
-
-    m_points_alloc.construct(p_pt, pt);
-    return (p_pt);
-  }
-
-  /*! De-allocate a point. */
-  void _delete_point(Point_2& pt)
-  {
-    Point_2* p_pt = &pt;
-
-    m_points_alloc.destroy(p_pt);
-    m_points_alloc.deallocate(p_pt, 1);
-  }
-
-  /*! Allocate a new curve. */
-  X_monotone_curve_2* _new_curve(const X_monotone_curve_2& cv)
-  {
-    X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1);
-    m_curves_alloc.construct(p_cv, cv);
-    return (p_cv);
-  }
-
-  /*! De-allocate a curve. */
-  void _delete_curve(X_monotone_curve_2& cv)
-  {
-    X_monotone_curve_2* p_cv = &cv;
-
-    m_curves_alloc.destroy(p_cv);
-    m_curves_alloc.deallocate(p_cv, 1);
-  }
-  //@}
-
-  /// \name Converting handles to pointers (for the arrangement accessor).
-  //@{
-
-  /*! Access the DCEL (non-const version). */
-  inline Dcel& _dcel() { return (m_topol_traits.dcel()); }
-
-  /*! Access the DCEL (const version). */
-  inline const Dcel& _dcel() const
-  { return (m_topol_traits.dcel()); }
-
-  /*! Convert a vertex handle to a pointer to a DCEL vertex. */
-  inline DVertex* _vertex(Vertex_handle vh) const
-  { return (&(*vh)); }
-
-  /*! Convert a constant vertex handle to a pointer to a DCEL vertex. */
-  inline const DVertex* _vertex(Vertex_const_handle vh) const
-  { return (&(*vh)); }
-
-  /*! Convert a halfedge handle to a pointer to a DCEL halfedge. */
-  inline DHalfedge* _halfedge(Halfedge_handle hh) const
-  { return (&(*hh)); }
-
-  /*! Convert a constant halfedge handle to a pointer to a DCEL halfedge. */
-  inline const DHalfedge* _halfedge(Halfedge_const_handle hh) const
-  { return (&(*hh)); }
-
-  /*! Convert a face handle to a pointer to a DCEL face. */
-  inline DFace* _face(Face_handle fh) const
-  { return (&(*fh)); }
-
-  /*! Convert a constant face handle to a pointer to a DCEL face. */
-  inline const DFace* _face(Face_const_handle fh) const
-  { return (&(*fh)); }
-  //@}
-
-  /// \name Converting pointers to handles (for the arrangement accessor).
-  //@{
-
-  /*! Convert a pointer to a DCEL vertex to a vertex handle. */
-  Vertex_handle _handle_for(DVertex* v)
-  { return (Vertex_handle(v)); }
-
-  /*! Convert a pointer to a DCEL vertex to a constant vertex handle. */
-  Vertex_const_handle _const_handle_for(const DVertex* v) const
-  { return (Vertex_const_handle(v)); }
-
-  /*! Convert a pointer to a DCEL halfedge to a halfedge handle. */
-  Halfedge_handle _handle_for(DHalfedge* he)
-  { return (Halfedge_handle(he)); }
-
-
-  /*! Convert a pointer to a DCEL halfedge to a constant halfedge handle. */
-  Halfedge_const_handle _const_handle_for(const DHalfedge* he) const
-  { return (Halfedge_const_handle(he)); }
-
-  /*! Convert a pointer to a DCEL face to a face handle. */
-  Face_handle _handle_for(DFace* f)
-  { return (Face_handle(f)); }
-
-  /*! Convert a pointer to a DCEL face to a constant face handle. */
-  Face_const_handle _const_handle_for(const DFace* f) const
-  { return (Face_const_handle(f)); }
-  //@}
-
-  /// \name Auxiliary (protected) functions.
-  //@{
-
-  /*! Is the vertex incident to a given halfedge lexicographically smaller than
-   * the vertex incident to another given halfedge. Recall that the incident
-   * vertex is the target vertex. This function is used, for example, in the
-   * search for lexicographically smallest vertex in a CCB, when an edge is
-   * about to be removed from the DCEL.
-   *
-   * This is the implementation for the case where all 4 boundary sides are
-   * oblivious.
-   *
-   * \param he1 the given first halfedge
-   * \param ps_x1 the parameter space in x of the vertex incident to he1
-   * \param ps_y1 the parameter space in y of the vertex incident to he1
-   * \param he2 the given second halfedge
-   * \param ps_x2 the parameter space in x of the vertex incident to he2
-   * \param ps_y2 the parameter space in y of the vertex incident to he2
-   * \precondition he1 is directed from right to left
-   * \precondition he2 is directed from right to left
-   * \precondition the vertex incident to he1 (he1->vertex()) is different
-   *        than the vertex incident to he1 (he2->vertex()), and thus their
-   *        geometric mappings (he1->vertex()->point() and
-   *        he2->vertex()->point()) are not equal.
-   */
-  bool _is_smaller(const DHalfedge* he1,
-                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-                   const DHalfedge* he2,
-                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-                   Arr_all_sides_oblivious_tag) const;
-
-  /*! This is a wrapper for the case where any boundary side is not
-   * necessarily oblivious.
-   */
-  bool _is_smaller(const DHalfedge* he1,
-                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-                   const DHalfedge* he2,
-                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-                   Arr_not_all_sides_oblivious_tag) const;
-
-  /*! Is the lexicographically minimal vertex of a given x-monotone curve
-   * lexicographically smaller than the lexicographically minimal vertex of
-   * another given x-monotone curve. This function is used, for example, when
-   * a new curve is to be inserted into the arrangement. In this case the
-   * search is conducted over the curves that will comprise a new CCB.
-   *
-   * This is the implementation for the case where all 4 boundary sides are
-   * oblivious.
-   *
-   * \param cv1 the given first x-monotone curve
-   * \param ps_x1 the parameter space in x of the minimal point of cv1
-   * \param ps_y1 the parameter space in y of the minimal point of cv1
-   * \param cv2 the given second x-monotone curve
-   * \param ps_x2 the parameter space in x of the minimal point of cv2
-   * \param ps_y2 the parameter space in y of the minimal point of cv2
-   * \precondition the minimal points of cv1 and cv2 are not equal.
-   */
-  bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
-                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-                   const X_monotone_curve_2& cv2, const Point_2& p2,
-                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-                   Arr_all_sides_oblivious_tag) const;
-
-  /*! This is the implementation for the case where any one of the 4 boundary
-   * sides can be of any type.
-   */
-  bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
-                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
-                   const X_monotone_curve_2& cv2, const Point_2& p2,
-                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
-                   Arr_not_all_sides_oblivious_tag) const;
-
-  /*! Given two x-monotone curves that share their minimal end point.
-   * The function return true if the y-coordinate of the first curve curve
-   * near its minimal end smaller than the y-coordinate of the second curve
-   * (near its minimal end). This function is used, for example, when
-   * a new curve is to be inserted into the arrangement. In this case the
-   * search is conducted over the curves that will comprise a new CCB.
-   *
-   * This is the implementation for the case where all 4 boundary sides are
-   * oblivious.
-   *
-   * \param cv1 the given first x-monotone curve
-   * \param cv2 the given second x-monotone curve
-   * \param p the shared minimal point of cv1 and cv2
-   * \param ps_x the parameter space in x of the minimal point of cv1
-   * \param ps_y the parameter space in y of the minimal point of cv1
-   * \precondition the minimal points of cv1 and cv2 are equal.
-   */
-  bool _is_smaller_near_right(const X_monotone_curve_2& cv1,
-                              const X_monotone_curve_2& cv2,
-                              const Point_2& p,
-                              Arr_parameter_space ps_x,
-                              Arr_parameter_space ps_y,
-                              Arr_all_sides_oblivious_tag) const;
-
-  /*! This is the implementation for the case where any one of the 4 boundary
-   * sides can be of any type.
-   */
-  bool _is_smaller_near_right(const X_monotone_curve_2& cv1,
-                              const X_monotone_curve_2& cv2,
-                              const Point_2& p,
-                              Arr_parameter_space ps_x,
-                              Arr_parameter_space ps_y,
-                              Arr_not_all_sides_oblivious_tag) const;
-
-  /*!
-   * Locate the place for the given curve around the given vertex.
-   * \param v The given arrangement vertex.
-   * \param cv The given x-monotone curve.
-   * \param ind Whether we refer to the minimal or maximal end of cv.
-   * \return A pointer to a halfedge whose target is v, where cv should be
-   *         inserted between this halfedge and the next halfedge around this
-   *         vertex (in a clockwise order).
-   *         A NULL return value indicates a precondition violation.
-   */
-  DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv,
-                                   Arr_curve_end ind) const;
-
-  /*!
-   * Compute the distance (in halfedges) between two halfedges.
-   * \param e1 The source halfedge.
-   * \param e2 The destination halfedge.
-   * \pre e1 and e2 belong to the same connected component
-   * \return The number of halfedges along the component boundary between the
-   *         two halfedges.
-   */
-  unsigned int _halfedge_distance(const DHalfedge* e1,
-                                  const DHalfedge* e2) const;
-
-  /*!
-   * Compare the length of the induced paths from e1 to e2 and
-   *  from e2 to e1.
-   * \pre e1 and e2 belong to the same connected component
-   * \return The comparison result
-   */
-  Comparison_result _compare_induced_path_length(const DHalfedge* e1,
-                                                 const DHalfedge* e2) const;
-
-  /*
-   * Updates the indices according to boundary locations
-   */
-  void
-  _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
-                   Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
-                   int& x_index, int& y_index,  boost::mpl::bool_<true>) const;
-
-  /*
-   * Updates the indices according to boundary locations (i.e. does nothing)
-   */
-  void
-  _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
-                   Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
-                   int& x_index, int& y_index,  boost::mpl::bool_<false>) const;
-
-  /*
-   * Is the first given x-monotone curve above the second given?
-   * \param xcv1 the first given curve
-   * \param ps_y1 the parameter space in y of xcv1
-   * \param xcv2 the second given curve
-   * \param Arr_identified_side_tag used for dispatching to ensure that this
-   *        function is invoked when the bottom and top boundaries are
-   *        identified
-   */
-  bool _is_above(const X_monotone_curve_2& xcv1,
-                 const X_monotone_curve_2& xcv2,
-                 const Point_2& point,
-                 Arr_parameter_space ps_y1,
-                 Arr_has_identified_side_tag) const;
-
-  /*
-   * Is the first given x-monotone curve above the second given?
-   * \param xcv1 the first given curve
-   * \param ps_y1 the parameter space in y of xcv1
-   * \param xcv2 the second given curve
-   * \param Arr_contracted_side_tag used for dispatching to ensure that this
-   *        function is invoked when the bottom or top boundaries are
-   *        contracted
-   */
-  bool _is_above(const X_monotone_curve_2& xcv1,
-                 const X_monotone_curve_2& xcv2,
-                 const Point_2& point,
-                 Arr_parameter_space ps_y1,
-                 Arr_has_contracted_side_tag) const;
-
-  /*
-   * Is the first given x-monotone curve above the second given?
-   * \param xcv1 the first given curve
-   * \param ps_y1 the parameter space in y of xcv1
-   * \param xcv2 the second given curve
-   * \param Arr_oblivious_side_tag used for dispatching to ensure that this
-   *        function is invoked when the bottom and top boundaries are neither
-   *        identified nor contracted
-   */
-  bool _is_above(const X_monotone_curve_2& xcv1,
-                 const X_monotone_curve_2& xcv2,
-                 const Point_2& point,
-                 Arr_parameter_space ps_y1,
-                 Arr_boundary_cond_tag) const;
-
-  /*!
-   * Computes the signs (in left/right and bottom/top) of a path
-   * induced by the sequence he_to=>cv,cv_dir=>he_away, and reports
-   * as side-effect the halfedges pointing to local minima copied
-   * to an outputiterator.
-   * \param he_to The predecessor halfedge.
-   * \param cv The x-monotone curve we use to connect he_to's target and
-   *           he_away's source vertex.
-   * \param cv_dir the direction of the curve between he_to and he_away
-   * \param he_away The succcessor halfedge.
-   * \param local_mins_it the outputiterator
-   * (value_type = std::pair< DHalfedge*, int >, where the int denotes the
-   * index) to report the halfedges pointing to local minima (<-shaped
-   * situation)
-   * \return A pair of signs for the induced path (ZERO if non-perimetric,
-   * POSITIVE if perimetric ccb is oriented in positive direction,
-   * NEGATIVE if perimetric ccb is oriented in negative direction).
-   */
-  template <typename OutputIterator>
-  std::pair<Sign, Sign>
-  _compute_signs_and_local_minima(const DHalfedge* he_to,
-                                  const X_monotone_curve_2& cv,
-                                  Arr_halfedge_direction cv_dir,
-                                  const DHalfedge* he_away,
-                                  OutputIterator local_mins_it) const;
-
-  /*!
-   * Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
-   * represented by a given halfedge, and the halfedge pointing to the smallest
-   * vertex on the ccb.
-   * \param he The representative halfedge on the ccb.
-   * \param ps_x_min The parameter space in x of the smallest vertex.
-   * \param ps_y_min The parameter space in y of the smallest vertex.
-   * \param index_min The index of the smallest vertex.
-   * \return A pair of, a pair of signs for the induced path, and the halfedge
-   *     pointing to the smallest vertex.
-   *     A sign ZERO is if the ccb is non-perimetric,
-   *     POSITIVE if the ccb is perimetric and oriented in positive direction,
-   *     NEGATIVE if the ccb is perimetric and oriented in negative direction).
-   */
-  std::pair<std::pair<Sign, Sign>,  const DHalfedge*>
-  _compute_signs_and_min(const DHalfedge* he,
-                         Arr_parameter_space& ps_x_min,
-                         Arr_parameter_space& ps_y_min,
-                         int& index_min) const;
-
-  /*!
-   * Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
-   * represented by a given halfedge.
-   * \param he The representative halfedge on the ccb.
-   * \return A pair of signs for the induced path.
-   *     A sign ZERO is if the ccb is non-perimetric,
-   *     POSITIVE if the ccb is perimetric and oriented in positive direction,
-   *     NEGATIVE if the ccb is perimetric and oriented in negative direction).
-   */
-  std::pair<Sign, Sign> _compute_signs(const DHalfedge* he,
-                                       boost::mpl::bool_<true>) const;
-
-  /*! Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
-   * represented by a given halfedge for the case where non of the boundaries
-   * is identified.
-   * \return the pair (ZERO, ZERO)
-   */
-  std::pair<Sign, Sign> _compute_signs(const DHalfedge* he,
-                                       boost::mpl::bool_<false>) const;
-
-  /*!
-   * Given two predecessor halfedges that will be used for inserting a
-   * new halfedge pair (he_to is the predecessor of the directed curve
-   * cv, cv_dir and he_away will be the successor), such that the
-   * insertion will create a new face that forms a hole inside an existing
-   * face, determine whether he_to=>cv,cv_dir=>he_away will be part
-   * of the new outer ccb of the new face.
-   * \param he_to The predecessor halfedge.
-   * \param cv The x-monotone curve we use to connect he_to's target and
-   *           he_away's source vertex.
-   * \param cv_dir the direction of the curve between he_to and he_away
-   * \param he_away The succcessor halfedge.
-   * \pre he_to and he_away belong to the same inner CCB.
-   * \return true if he_to=>cv,cv_dir=>he_away lie in the interior of the face we
-   *         are about to create (i.e.~are part of the new outer ccb),
-   *         false otherwise - in which case the subsequence
-   *         he_away->next()=>cv,opposite(cv_dir)=>he_to->next()
-   *         must be incident to this new face (i.e.~are part
-   *         of the new outer ccb).
-   */
-  template <typename InputIterator>
-  bool _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
-                                      const X_monotone_curve_2& cv,
-                                      const DHalfedge* he_away,
-                                      InputIterator lm_begin,
-                                      InputIterator lm_end) const;
-
-  /*!
-   * Move a given outer CCB from one face to another.
-   * \param from_face The face currently containing the component.
-   * \param to_face The face into which we should move the component.
-   * \param he A halfedge lying on the outer component.
-   */
-  void _move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he);
-
-  /*!
-   * Move a given inner CCB (hole) from one face to another.
-   * \param from_face The face currently containing the component.
-   * \param to_face The face into which we should move the component.
-   * \param he A halfedge lying on the inner component.
-   */
-  void _move_inner_ccb(DFace* from_face, DFace* to_face, DHalfedge* he);
-
-  /*!
-   * Insert the given vertex as an isolated vertex inside the given face.
-   * \param f The face that should contain the isolated vertex.
-   * \param v The isolated vertex.
-   */
-  void _insert_isolated_vertex(DFace* f, DVertex* v);
-
-  /*!
-   * Move a given isolated vertex from one face to another.
-   * \param from_face The face currently containing the isolated vertex.
-   * \param to_face The face into which we should move the isolated vertex.
-   * \param v The isolated vertex.
-   */
-  void _move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v);
-
-  /*!
-   * Create a new vertex and associate it with the given point.
-   * \param p The point.
-   * \return A pointer to the newly created vertex.
-   */
-  DVertex* _create_vertex(const Point_2& p);
-
-  /*!
-   * Create a new boundary vertex.
-   * \param cv The curve incident to the boundary.
-   * \param ind The relevant curve-end.
-   * \param bx The boundary condition in x.
-   * \param by The boundary condition in y.
-   * \pre Either bx or by does not equal ARR_INTERIOR.
-   * \return A pointer to the newly created vertex.
-   */
-  DVertex* _create_boundary_vertex(const X_monotone_curve_2& cv,
-                                   Arr_curve_end ind,
-                                   Arr_parameter_space bx,
-                                   Arr_parameter_space by);
-
-  /*!
-   * Locate the DCEL features that will be used for inserting the given curve
-   * end, which has a boundary condition, and set a proper vertex there.
-   * \param f The face that contains the curve end.
-   * \param cv The x-monotone curve.
-   * \param ind The curve end.
-   * \param bx The boundary condition at the x-coordinate.
-   * \param by The boundary condition at the y-coordinate.
-   * \param p_pred Output: The predecessor halfedge around this vertex
-   *                       (may be NULL, if no such halfedge exists).
-   * \return The vertex that corresponds to the curve end.
-   */
-  DVertex* _place_and_set_curve_end(DFace* f,
-                                    const X_monotone_curve_2& cv,
-                                    Arr_curve_end ind,
-                                    Arr_parameter_space bx,
-                                    Arr_parameter_space by,
-                                    DHalfedge** p_pred);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that both its
-   * endpoints correspond to free arrangement vertices (newly created vertices
-   * or existing isolated vertices), so a new inner CCB is formed in the face
-   * that contains the two vertices.
-   * \param f The face containing the two end vertices.
-   * \param cv The given x-monotone curve.
-   * \param cv_dir The direction of the curve
-   * \param v1 The free vertex that corresponds to the left endpoint of cv.
-   * \param v2 The free vertex that corresponds to the right endpoint of cv.
-   * \return A pointer to one of the halfedges corresponding to the inserted
-   *         curve, directed from v1 to v2.
-   */
-  DHalfedge* _insert_in_face_interior(DFace* f,
-                                      const X_monotone_curve_2& cv,
-                                      Arr_halfedge_direction cv_dir,
-                                      DVertex* v1, DVertex* v2);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, such that one of its
-   * endpoints corresponds to a given arrangement vertex, given the exact
-   * place for the curve in the circular list around this vertex. The other
-   * endpoint corrsponds to a free vertex (a newly created vertex or an
-   * isolated vertex).
-   * \param he_to The reference halfedge. We should represent cv as a pair
-   *              of edges, one of them should become he_to's successor.
-   * \param cv The given x-monotone curve.
-   * \param cv_dir The direction of cv.
-   * \param v The free vertex that corresponds to the other endpoint.
-   * \return A pointer to one of the halfedges corresponding to the inserted
-   *         curve, whose target is the vertex v.
-   */
-  DHalfedge* _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
-                                 Arr_halfedge_direction cv_dir,
-                                 DVertex* v);
-
-  /*!
-   * Insert an x-monotone curve into the arrangement, where the end vertices
-   * are given by the target points of two given halfedges.
-   * The two halfedges should be given such that in case a new face is formed,
-   * it will be the incident face of the halfedge directed from the first
-   * vertex to the second vertex.
-   * \param he_to The reference halfedge pointing to the insertion vertex
-   * \param cv the given curve.
-   * \param cv_dir the direction of the curve
-   * \param he_away the reference halfedge for the second vertex.
-   * \param res the comparison result of the points associated with prev1's
-   *            target vertex and prev2's target vertex.
-   * \param new_face (Output) indicates whether a new face has been created.
-   * \param swapped_predecessors (Output) indicates whether roles of prev1 and
-   *                                      prev2 have been switched
-   * \param allow_swap_of_predecessors set to false if no swapping should
-   *                                   take place at all
-   * \return A pointer to one of the halfedges corresponding to the inserted
-   *         curve directed from prev1's target to prev2's target.
-   *         In case a new face has been created, it is given as the incident
-   *         face of this halfedge.
-   */
-  DHalfedge* _insert_at_vertices(DHalfedge* he_to,
-                                 const X_monotone_curve_2& cv,
-                                 Arr_halfedge_direction cv_dir,
-                                 DHalfedge* he_away,
-                                 bool& new_face,
-                                 bool& swapped_predecessors,
-                                 bool allow_swap_of_predecessors = true);
-
-  /*!
-   * Relocate all inner CCBs and isolated vertices to their proper position,
-   * immediately after a face has split due to the insertion of a new halfedge.
-   * \param new_he The new halfedge that caused the split, such that the new
-   *               face lies to its left and the old face to its right.
-   */
-  void _relocate_in_new_face(DHalfedge* new_he);
-
-  /*!
-   * Relocate all inner CCBs to their proper position,
-   * immediately after a face has split due to the insertion of a new halfedge.
-   * \param new_he The new halfedge that caused the split, such that the new
-   *               face lies to its left and the old face to its right.
-   */
-  void _relocate_inner_ccbs_in_new_face(DHalfedge* new_he);
-
-  /*!
-   * Relocate all  vertices to their proper position,
-   * immediately after a face has split due to the insertion of a new halfedge.
-   * \param new_he The new halfedge that caused the split, such that the new
-   *               face lies to its left and the old face to its right.
-   */
-  void _relocate_isolated_vertices_in_new_face(DHalfedge* new_he);
-
-  /*!
-   * Replace the point associated with the given vertex.
-   * \param v The vertex to modify.
-   * \param p The point that should be associated with the edge.
-   */
-  void _modify_vertex(DVertex* v, const Point_2& p);
-
-  /*!
-   * Replace the x-monotone curve associated with the given edge.
-   * \param e The edge to modify.
-   * \param cv The curve that should be associated with the edge.
-   */
-  void _modify_edge(DHalfedge* he, const X_monotone_curve_2& cv);
-
-  /*!
-   * Check if the given vertex represents one of the ends of a given curve.
-   * \param v The vertex.
-   * \param cv The curve.
-   * \param ind Indicates whether the minimal or the maximal end of cv is
-   *            refereed to.
-   * \return Whether v represents the left (or right) end of cv.
-   */
-  bool _are_equal(const DVertex* v,
-                  const X_monotone_curve_2& cv, Arr_curve_end ind) const;
-
-  /*!
-   * Split a given edge into two at a given point, and associate the given
-   * x-monotone curves with the split edges.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param p The split point.
-   * \param cv1 The curve that should be associated with the first split edge,
-   *            whose source equals e's source and its target is p.
-   * \param cv2 The curve that should be associated with the second split edge,
-   *            whose source is p and its target equals e's target.
-   * \return A pointer to the first split halfedge, whose source equals the
-   *         source of e, and whose target is the split point.
-   */
-  DHalfedge* _split_edge(DHalfedge* e, const Point_2& p,
-                         const X_monotone_curve_2& cv1,
-                         const X_monotone_curve_2& cv2);
-
-  /*!
-   * Split a given edge into two at a given vertex, and associate the given
-   * x-monotone curves with the split edges.
-   * \param e The edge to split (one of the pair of twin halfegdes).
-   * \param v The split vertex.
-   * \param cv1 The curve that should be associated with the first split edge,
-   *            whose source equals e's source and its target is v.
-   * \param cv2 The curve that should be associated with the second split edge,
-   *            whose source is v and its target equals e's target.
-   * \return A pointer to the first split halfedge, whose source equals the
-   *         source of e, and whose target is v.
-   */
-  DHalfedge* _split_edge(DHalfedge* e, DVertex* v,
-                         const X_monotone_curve_2& cv1,
-                         const X_monotone_curve_2& cv2);
-
-  /*!
-   * Remove a pair of twin halfedges from the arrangement.
-   * \param e One of the halfedges to be removed.
-   * \param remove_source Should the source vertex of e be removed if it
-   *                      becomes isolated.
-   * \param remove_target Should the target vertex of e be removed if it
-   *                      becomes isolated.
-   * \pre In case the removal causes the creation of a new inner CCB (hole),
-   *      e should point at this hole.
-   * \return A pointer to the remaining face.
-   */
-  DFace* _remove_edge(DHalfedge* e, bool remove_source, bool remove_target);
-
-  /*!
-   * Decides whether a hole is created when an edge is removed.
-   *
-   * \param signs1 signs of future ccb1
-   * \param signs2 signs of future ccb2
-   * \param same_face to he and he->opposite() belong to same face
-   * return true, in case a new hole is created, false otherwise
-   */
-  bool _hole_creation_on_edge_removal(std::pair< CGAL::Sign, CGAL::Sign > signs1,
-                                      std::pair< CGAL::Sign, CGAL::Sign > signs2,
-                                      bool same_face);
-
-  /*!
-   * Remove a vertex in case it becomes redundant after the deletion of an
-   * incident edge.
-   * \param v The vertex.
-   * \param f The face that contains v (in case it becomes isolated).
-   */
-  void _remove_vertex_if_redundant(DVertex* v, DFace* f);
-
-  /*!
-   * Remove an isolated vertex from the interior of its face (but not from
-   * the DCEL).
-   * \param v The isolated vertex to remove.
-   */
-  void _remove_isolated_vertex(DVertex* v);
-  //@}
-
-  /// \name Auxiliary (protected) functions for validity checking.
-  //@{
-
-  /*! Check the validity of a given vertex. */
-  bool _is_valid(Vertex_const_handle v) const;
-
-  /*! Check the validity of a given halfedge. */
-  bool _is_valid(Halfedge_const_handle he) const;
-
-  /*! Check the validity of a given face. */
-  bool _is_valid(Face_const_handle f) const;
-
-  /*! Check the validity of an outer CCB. */
-  bool _is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const;
-
-  /*! Check the validity of an inner CCB. */
-  bool _is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const;
-
-  /*!
-   * Check that all vertices are unique (no two vertices with the same
-   * geometric point.
-   */
-  bool _are_vertices_unique() const;
-
-  /*! Check that the curves around a given vertex are ordered clockwise. */
-  bool _are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const;
-
-  //@}
-
-protected:
-  /// \name Managing and notifying the arrangement observers.
-  //@{
-
-  /*!
-   * Register a new observer (so it starts receiving notifications).
-   * \param p_obs A pointer to the observer object.
-   */
-  void _register_observer(Observer* p_obs) { m_observers.push_back(p_obs); }
-
-  /*!
-   * Unregister a new observer (so it stops receiving notifications).
-   * \param p_obs A pointer to the observer object.
-   * \return Whether the observer was successfully unregistered.
-   */
-  bool _unregister_observer(Observer* p_obs)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-
-    for (iter = m_observers.begin(); iter != end; ++iter) {
-      if ((*iter) == p_obs) {
-        // Remove the p_ob pointer from the list of observers.
-        m_observers.erase (iter);
-        return true;
-      }
-    }
-
-    // If we reached here, the observer was not registered.
-    return false;
-  }
-
-protected:
-  /* Notify the observers on global arrangement operations: */
-
-  void _notify_before_assign(const Self& arr)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_assign(arr);
-  }
-
-  void _notify_after_assign()
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_assign();
-  }
-
-  void _notify_before_clear()
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_clear();
-  }
-
-  void _notify_after_clear()
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_clear();
-  }
-
-  void _notify_before_global_change()
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_global_change();
-  }
-
-  void _notify_after_global_change()
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_global_change();
-  }
-
-  /* Notify the observers on local changes in the arrangement: */
-
-  void _notify_before_create_vertex(const Point_2& p)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_create_vertex(p);
-  }
-
-  void _notify_after_create_vertex(Vertex_handle v)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_create_vertex(v);
-  }
-
-  void _notify_before_create_boundary_vertex(const X_monotone_curve_2& cv,
-                                             Arr_curve_end ind,
-                                             Arr_parameter_space bx,
-                                             Arr_parameter_space by)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_create_boundary_vertex(cv, ind, bx, by);
-  }
-
-  void _notify_after_create_boundary_vertex(Vertex_handle v)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_create_boundary_vertex(v);
-  }
-
-  void _notify_before_create_edge(const X_monotone_curve_2& c,
-                                  Vertex_handle v1, Vertex_handle v2)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_create_edge(c, v1, v2);
-  }
-
-  void _notify_after_create_edge(Halfedge_handle e)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_create_edge(e);
-  }
-
-  void _notify_before_modify_vertex(Vertex_handle v, const Point_2& p)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_modify_vertex(v, p);
-  }
-
-  void _notify_after_modify_vertex(Vertex_handle v)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_modify_vertex(v);
-  }
-
-  void _notify_before_modify_edge(Halfedge_handle e,
-                                  const X_monotone_curve_2& c)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_modify_edge(e, c);
-  }
-
-  void _notify_after_modify_edge(Halfedge_handle e)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_modify_edge(e);
-  }
-
-  void _notify_before_split_edge(Halfedge_handle e, Vertex_handle v,
-                                 const X_monotone_curve_2& c1,
-                                 const X_monotone_curve_2& c2)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_split_edge(e, v, c1, c2);
-  }
-
-  void _notify_after_split_edge(Halfedge_handle e1, Halfedge_handle e2)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_split_edge(e1, e2);
-  }
-
-  void _notify_before_split_fictitious_edge(Halfedge_handle e, Vertex_handle v)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_split_fictitious_edge(e, v);
-  }
-
-  void _notify_after_split_fictitious_edge(Halfedge_handle e1,
-                                           Halfedge_handle e2)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_split_fictitious_edge(e1, e2);
-  }
-
-  void _notify_before_split_face(Face_handle f, Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_split_face(f, e);
-  }
-
-  void _notify_after_split_face(Face_handle f, Face_handle new_f, bool is_hole)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_split_face(f, new_f, is_hole);
-  }
-
-  void _notify_before_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h,
-                                      Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_split_outer_ccb(f, h, e);
-  }
-
-  void _notify_after_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h1,
-                                     Ccb_halfedge_circulator h2)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_split_outer_ccb(f, h1, h2);
-  }
-
-  void _notify_before_split_inner_ccb(Face_handle f, Ccb_halfedge_circulator h,
-                                      Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_split_inner_ccb(f, h, e);
-  }
-
-  void _notify_after_split_inner_ccb(Face_handle f,
-                                     Ccb_halfedge_circulator h1,
-                                     Ccb_halfedge_circulator h2)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_split_inner_ccb(f, h1, h2);
-  }
-
-  void _notify_before_add_outer_ccb(Face_handle f, Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_add_outer_ccb(f, e);
-  }
-
-  void _notify_after_add_outer_ccb(Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_add_outer_ccb(h);
-  }
-
-  void _notify_before_add_inner_ccb(Face_handle f, Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_add_inner_ccb(f, e);
-  }
-
-  void _notify_after_add_inner_ccb(Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_add_inner_ccb(h);
-  }
-
-  void _notify_before_add_isolated_vertex(Face_handle f, Vertex_handle v)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_add_isolated_vertex(f, v);
-  }
-
-  void _notify_after_add_isolated_vertex(Vertex_handle v)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_add_isolated_vertex(v);
-  }
-
-  void _notify_before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
-                                 const X_monotone_curve_2& c)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_merge_edge(e1, e2, c);
-  }
-
-  void _notify_after_merge_edge(Halfedge_handle e)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_merge_edge(e);
-  }
-
-  void _notify_before_merge_fictitious_edge(Halfedge_handle e1,
-                                            Halfedge_handle e2)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_merge_fictitious_edge(e1, e2);
-  }
-
-  void _notify_after_merge_fictitious_edge(Halfedge_handle e)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_merge_fictitious_edge(e);
-  }
-
-  void _notify_before_merge_face(Face_handle f1, Face_handle f2,
-                                 Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_merge_face(f1, f2, e);
-  }
-
-  void _notify_after_merge_face(Face_handle f)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_merge_face(f);
-  }
-
-  void _notify_before_merge_outer_ccb(Face_handle f,
-                                      Ccb_halfedge_circulator h1,
-                                      Ccb_halfedge_circulator h2,
-                                      Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_merge_outer_ccb(f, h1, h2, e);
-  }
-
-  void _notify_after_merge_outer_ccb(Face_handle f,
-                                     Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_merge_outer_ccb(f, h);
-  }
-
-  void _notify_before_merge_inner_ccb(Face_handle f,
-                                      Ccb_halfedge_circulator h1,
-                                      Ccb_halfedge_circulator h2,
-                                      Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_merge_inner_ccb(f, h1, h2, e);
-  }
-
-  void _notify_after_merge_inner_ccb(Face_handle f,
-                                     Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_merge_inner_ccb(f, h);
-  }
-
-  void _notify_before_move_outer_ccb(Face_handle from_f,
-                                     Face_handle to_f,
-                                     Ccb_halfedge_circulator h)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_move_outer_ccb(from_f, to_f, h);
-  }
-
-  void _notify_after_move_outer_ccb(Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_move_outer_ccb(h);
-  }
-
-  void _notify_before_move_inner_ccb(Face_handle from_f,
-                                     Face_handle to_f,
-                                     Ccb_halfedge_circulator h)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_move_inner_ccb(from_f, to_f, h);
-  }
-
-  void _notify_after_move_inner_ccb(Ccb_halfedge_circulator h)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_move_inner_ccb(h);
-  }
-
-  void _notify_before_move_isolated_vertex(Face_handle from_f,
-                                           Face_handle to_f,
-                                           Vertex_handle v)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_move_isolated_vertex(from_f, to_f, v);
-  }
-
-
-  void _notify_after_move_isolated_vertex(Vertex_handle v)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_move_isolated_vertex(v);
-  }
-
-  void _notify_before_remove_vertex(Vertex_handle v)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_remove_vertex(v);
-  }
-
-  void _notify_after_remove_vertex()
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_remove_vertex();
-  }
-
-  void _notify_before_remove_edge(Halfedge_handle e)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_remove_edge(e);
-  }
-
-  void _notify_after_remove_edge()
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_remove_edge();
-  }
-
-  void _notify_before_remove_outer_ccb(Face_handle f, Ccb_halfedge_circulator h)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_remove_outer_ccb(f, h);
-  }
-
-  void _notify_after_remove_outer_ccb(Face_handle f)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_remove_outer_ccb(f);
-  }
-
-  void _notify_before_remove_inner_ccb(Face_handle f, Ccb_halfedge_circulator h)
-  {
-    Observers_iterator iter;
-    Observers_iterator end = m_observers.end();
-    for (iter = m_observers.begin(); iter != end; ++iter)
-      (*iter)->before_remove_inner_ccb(f, h);
-  }
-
-  void _notify_after_remove_inner_ccb(Face_handle f)
-  {
-    Observers_rev_iterator iter;
-    Observers_rev_iterator end = m_observers.rend();
-    for (iter = m_observers.rbegin(); iter != end; ++iter)
-      (*iter)->after_remove_inner_ccb(f);
-  }
-  //@}
-};
-
-//-----------------------------------------------------------------------------
-// Declarations of the various global insertion and removal functions.
-//-----------------------------------------------------------------------------
-
-// In some compilers there is a template deduction disambiguity between this
-// function and the following function receiving two InputIterator.
-// For now the solution is to add a dummy variable at the end (referring
-// to point-location). Maybe the proper solution is to use boost::enable_if
-// together with appropriate tag.
-/*!
- * Insert a curve or x-monotone curve into the arrangement (incremental
- * insertion).
- * The inserted curve can be x-monotone (or not) and may intersect the
- * existing arrangement.
- * \param arr The arrangement.
- * \param cv The curve to be inserted.
- * \param pl A point-location object associated with the arrangement.
- */
-template <typename GeomTraits, typename TopTraits, typename Curve,
-          typename PointLocation>
-void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-            const Curve& c, const PointLocation& pl,
-            typename PointLocation::Point_2* = 0);
-
-/*!
- * Insert a curve or x-monotone curve into the arrangement (incremental
- * insertion).
- * The inserted curve can be x-monotone (or not) and may intersect the
- * existing arrangement. The default "walk" point-location strategy is used
- * for the curve insertion.
- * \param arr The arrangement.
- * \param cv The curve to be inserted.
- */
-template <typename GeomTraits, typename TopTraits, typename Curve>
-void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-            const Curve& c);
-
-/*!
- * Insert a range of curves or x-monotone curves into the arrangement
- * (aggregated insertion).
- * The inserted curves may intersect one another and may also intersect the
- * existing arrangement.
- * \param arr The arrangement.
- * \param begin An iterator for the first curve in the range.
- * \param end A past-the-end iterator for the curve range.
- * \pre The value type of the iterators must be Curve_2.
- */
-template <typename GeomTraits, typename TopTraits, typename InputIterator>
-void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-            InputIterator begin, InputIterator end);
-
-/*!
- * Insert an x-monotone curve into the arrangement (incremental insertion)
- * when the location of the left endpoint of the curve is known and is
- * given as an isertion hint.
- * The inserted x-monotone curve may intersect the existing arrangement.
- * \param arr The arrangement.
- * \param cv The x-monotone curve to be inserted.
- * \param obj An object that represents the location of cv's left endpoint
- *            in the arrangement.
- */
-
-template <typename GeomTraits, typename TopTraits>
-void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-            const typename GeomTraits::X_monotone_curve_2& c,
-            const Object& obj);
-
-/*!
- * Insert an x-monotone curve into the arrangement, such that the curve
- * interior does not intersect with any existing edge or vertex in the
- * arragement (incremental insertion).
- * \param arr The arrangement.
- * \param c The x-monotone curve to be inserted.
- * \param pl A point-location object associated with the arrangement.
- * \pre The interior of c does not intersect any existing edge or vertex.
- * \return A handle for one of the new halfedges corresponding to the
- *         inserted curve, directed (lexicographically) from left to right.
- */
-template <typename GeomTraits, typename TopTraits, typename PointLocation>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-insert_non_intersecting_curve
-(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
- const typename GeomTraits::X_monotone_curve_2& c,
- const PointLocation& pl);
-
-/*!
- * Insert an x-monotone curve into the arrangement, such that the curve
- * interior does not intersect with any existing edge or vertex in the
- * arragement (incremental insertion). The default point-location strategy
- * is used for the curve insertion.
- * \param arr The arrangement.
- * \param c The x-monotone curve to be inserted.
- * \pre The interior of c does not intersect any existing edge or vertex.
- * \return A handle for one of the new halfedges corresponding to the inserted
- *         curve, directed (lexicographically) from left to right.
- */
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
-insert_non_intersecting_curve
-(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
- const typename GeomTraits::X_monotone_curve_2& c);
-
-/*!
- * Insert a range of pairwise interior-disjoint x-monotone curves into
- * the arrangement, such that the curve interiors do not intersect with
- * any existing edge or vertex in the arragement (aggregated insertion).
- * \param arr The arrangement.
- * \param begin An iterator for the first x-monotone curve in the range.
- * \param end A past-the-end iterator for the x-monotone curve range.
- * \pre The value type of the iterators must be X_monotone_curve_2.
- *      The curves in the range are pairwise interior-disjoint, and their
- *      interiors do not intersect any existing edge or vertex.
- */
-template <typename GeomTraits, typename TopTraits, typename InputIterator>
-void insert_non_intersecting_curves
-(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
- InputIterator begin, InputIterator end);
-
-/*!
- * Remove an edge from the arrangement. In case it is possible to merge
- * the edges incident to the end-vertices of the removed edge after its
- * deletion, the function performs these merges as well.
- * \param arr The arrangement.
- * \param e The edge to remove (one of the pair of twin halfegdes).
- * \return A handle for the remaining face.
- */
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
-remove_edge(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-            typename Arrangement_on_surface_2<GeomTraits,
-                                              TopTraits>::Halfedge_handle e);
-
-/*!
- * Insert a vertex that corresponds to a given point into the arrangement.
- * The inserted point may lie on any existing arrangement feature.
- * \param arr The arrangement.
- * \param p The point to be inserted.
- * \param pl A point-location object associated with the arrangement.
- * \return A handle to the vertex that corresponds to the given point.
- */
-template <typename GeomTraits, typename TopTraits, typename PointLocation>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
-insert_point(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-             const typename GeomTraits::Point_2& p,
-             const PointLocation& pl);
-
-/*!
- * Insert a vertex that corresponds to a given point into the arrangement.
- * The inserted point may lie on any existing arrangement feature.
- * \param arr The arrangement.
- * \param p The point to be inserted.
- * \return A handle to the vertex that corresponds to the given point.
- */
-template <typename GeomTraits, typename TopTraits>
-typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
-insert_point(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-             const typename GeomTraits::Point_2& p);
-
-/*!
- * Remove a vertex from the arrangement.
- * \param arr The arrangement.
- * \param v The vertex to remove.
- * \return Whether the vertex has been removed or not.
- */
-template <typename GeomTraits, typename TopTraits>
-bool
-remove_vertex(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-              typename Arrangement_on_surface_2<GeomTraits,
-                                                TopTraits>::Vertex_handle v);
-
-
-/*!
- * Check the validity of the arrangement. In particular, check that the
- * edegs are disjoint-interior, and the holes are located in their proper
- * position.
- * \param arr The arrangement.
- * \return Whether the arrangement is valid.
- */
-template <typename GeomTraits, typename TopTraits>
-bool is_valid(const Arrangement_on_surface_2<GeomTraits, TopTraits>& arr);
-
-/*!
- * Compute the zone of the given x-monotone curve in the existing arrangement.
- * Meaning, it output the arrangment's vertices, edges and faces that the
- * x-monotone curve intersects.
- * \param arr The arrangement.
- * \param c The x-monotone curve that its zone was computed.
- * \param oi Output iterator of CGAL::Object to insert the zone elements to.
- * \param pi The point location strategy that is used to locate the starting
- * point.
- * \return The output iterator that the curves were inserted to.
- */
-template <typename GeomTraits, typename TopTraits,
-          typename OutputIterator, typename PointLocation>
-OutputIterator zone(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-                    const typename GeomTraits::X_monotone_curve_2& c,
-                    OutputIterator oi,
-                    const PointLocation& pl);
-
-/*!
- * Compute the zone of the given x-monotone curve in the existing arrangement.
- * Overloaded version with no point location object - the walk point-location
- * strategy is used as default.
- * \param arr The arrangement.
- * \param c The x-monotone curve that its zone was computed.
- * \param oi Output iterator of CGAL::Object to insert the zone elements to.
- * \return The output iterator that the curves were inserted to.
- */
-template <typename GeomTraits, typename TopTraits, typename OutputIterator>
-OutputIterator zone(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-                    const typename GeomTraits::X_monotone_curve_2& c,
-                    OutputIterator oi);
-
-/*!
- * Checks if the given curve/x-monotone curve intersects the existing
- * arrangement.
- * \param arr The arrangement.
- * \param c The curve/x-monotone curve.
- * \param pi The point location strategy that is used to locate the starting
- * point.
- * \return True if the curve intersect the arrangement, false otherwise.
- */
-template <typename GeomTraits, typename TopTraits, typename Curve,
-          typename PointLocation>
-bool do_intersect(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-                  const Curve& c, const PointLocation& pl);
-
-/*!
- * Checks if the given curve/x-monotone curve intersects the existing
- * arrangement.
- * Overloaded version with no point location object - the walk point-location
- * strategy is used as default.
- * \param arr The arrangement.
- * \param c The x-monotone curve/curve.
- * \return True if the curve intersect the arrangement, false otherwise.
- */
-template <typename GeomTraits, typename TopTraits, typename Curve>
-bool do_intersect(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
-                  const Curve& c);
-
-} //namespace CGAL
-
-// The function definitions can be found under:
-#include <CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h>
-#include <CGAL/Arrangement_2/Arrangement_on_surface_2_global.h>
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_mapping_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Barycentric_mapping_parameterizer_3.h
deleted file mode 100644
index f9b4186..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_mapping_parameterizer_3.h
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
-#define CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
-
-#include <CGAL/Fixed_border_parameterizer_3.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-/// \file Barycentric_mapping_parameterizer_3.h
-
-namespace CGAL {
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class Barycentric_mapping_parameterizer_3 implements <i>Tutte Barycentric Mapping algorithm</i> \cgalCite{t-hdg-63}.
-/// This algorithm is also called <i>Tutte Uniform Weights</i> by other authors.
-///
-/// One-to-one mapping is guaranteed if the surface's border is mapped to a convex polygon.
-///
-/// This class is used by the main
-/// parameterization algorithm Fixed_border_parameterizer_3::parameterize().
-/// - It provides default BorderParameterizer_3 and SparseLinearAlgebraTraits_d template
-///   parameters that make sense.
-/// - It implements compute_w_ij() to compute `w_ij = (i,j)` coefficient of matrix A
-///   for `j` neighbor vertex of `i` based on Tutte Barycentric Mapping method.
-/// - It implements an optimized version of is_one_to_one_mapping().
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-///
-/// \tparam ParameterizationMesh_3       3D surface mesh.
-/// \tparam BorderParameterizer_3        Strategy to parameterize the surface border.
-/// \tparam SparseLinearAlgebraTraits_d  Traits class to solve a sparse linear system.
-///        Note: the system is *not* symmetric because `Fixed_border_parameterizer_3`
-///        does not remove (yet) border vertices from the system.
-
-/*!
-\sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-\sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-\sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-\sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-\sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-\sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
- */
-
-template
-<
-    class ParameterizationMesh_3,
-    class BorderParameterizer_3
-                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-    class SparseLinearAlgebraTraits_d
-                = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>
->
-class Barycentric_mapping_parameterizer_3
-    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-{
-// Private types
-private:
-    // Superclass
-    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    typedef BorderParameterizer_3           Border_param;
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-    /// @endcond
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-// Public operations
-public:
-    /// Constructor
-    Barycentric_mapping_parameterizer_3(Border_param border_param = Border_param(),
-                                        ///< object that maps the surface's border to 2D space.
-                                        Sparse_LA sparse_la = Sparse_LA())
-                                        ///< Traits object to access a sparse linear system.
-    :   Fixed_border_parameterizer_3<Adaptor,
-                                   Border_param,
-                                   Sparse_LA>(border_param, sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-// Protected operations
-protected:
-    /// Compute w_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
-    virtual NT compute_w_ij(const Adaptor& /* mesh */,
-			  Vertex_const_handle /* main_vertex_v_i */,
-			  Vertex_around_vertex_const_circulator /* neighbor_vertex_v_j */ )
-    {
-        /// Tutte Barycentric Mapping algorithm is the most simple one:
-        /// w_ij = 1 for j neighbor vertex of i.
-        return 1;
-    }
-
-    /// Check if 3D -> 2D mapping is one-to-one.
-    virtual bool  is_one_to_one_mapping (const Adaptor& /* mesh */,
-				       const Matrix& /* A */,
-				       const Vector& /* Bu */,
-				       const Vector& /* Bv */)
-    {
-        /// Theorem: one-to-one mapping is guaranteed if all w_ij coefficients
-        ///          are > 0 (for j vertex neighbor of i) and if the surface
-        ///          border is mapped onto a 2D convex polygon.
-        /// All w_ij coefficients = 1 (for j vertex neighbor of i), thus mapping
-        /// is guaranteed if the surface border is mapped onto a 2D convex polygon.
-        return Base::get_border_parameterizer().is_border_convex ();
-    }
-};
-
-
-} //namespace CGAL
-
-#endif //CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Basic_sweep_line_2.h b/3rdparty/CGAL-4.6/include/CGAL/Basic_sweep_line_2.h
deleted file mode 100644
index 8be9ec2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Basic_sweep_line_2.h
+++ /dev/null
@@ -1,533 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 (based on old version by Tali Zvi)
-
-#ifndef CGAL_BASIC_SWEEP_LINE_2_H
-#define CGAL_BASIC_SWEEP_LINE_2_H
-
-/*! \file
- * Definition of the Basic_sweep_line_2 class.
- */
-
-#include <boost/mpl/assert.hpp>
-#include <CGAL/assertions.h>
-#include <CGAL/memory.h>
-#include <CGAL/Sweep_line_2/Sweep_line_functors.h>
-#include <CGAL/Sweep_line_2/Sweep_line_subcurve.h>
-#include <CGAL/Sweep_line_2/Sweep_line_event.h>
-#include <CGAL/Multiset.h>
-#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
-#include <CGAL/Arr_tags.h>
-#include <vector>
-#include <algorithm>
-#include <iterator>
-
-#ifndef CGAL_SL_VERBOSE
-
-#define CGAL_SL_DEBUG(a)
-#define CGAL_PRINT_INSERT(a)
-#define CGAL_PRINT_ERASE(a)
-#define CGAL_PRINT_NEW_EVENT(p, e) 
-#define CGAL_PRINT_UPDATE_EVENT(p, e) 
-#define CGAL_PRINT(a)
-
-#else
-
-#include <iostream>
-
-#define CGAL_SL_DEBUG(a)  {a;}
-#define CGAL_PRINT_INSERT(a) { std::cout << "+++ inserting "; \
-                          (a)->Print(); \
-                          std::cout << "    currentPos = "; \
-                          PrintEvent(this->m_currentEvent); \
-                          std::cout << std::endl; \
-                          }
-#define CGAL_PRINT_ERASE(a)  { std::cout << "--- erasing "; \
-                          (a)->Print(); }
-#define CGAL_PRINT_NEW_EVENT(p, e) \
-{ std::cout << "%%% a new event was created at " << (p) << std::endl; \
-  (e)->Print(); }
-#define CGAL_PRINT_UPDATE_EVENT(p, e) \
-{ std::cout << "%%% an event was updated at " << (p) << std::endl; \
-  (e)->Print(); }
-#define CGAL_PRINT(a) { std::cout << a; }
-
-#endif
-
-namespace CGAL {
-
-/*! \class Basic_Sweep_line_2 
- * A class that implements the sweep line algorithm for general x-monotone
- * curves that are pairwise disjoint in their interiors (an additional set
- * of isolated points may also be supplied).
- * The x-montone curve type and the point type are defined by the traits class
- * that is one of the template parameters.
- */
-template <typename Traits_,
-          typename Visitor_,
-          typename Subcurve_ = Sweep_line_subcurve<Traits_>,
-          typename Event_ = Sweep_line_event<Traits_, Subcurve_>,
-          typename Allocator_ = CGAL_ALLOCATOR(int)>
-class Basic_sweep_line_2 {
-public:
-  typedef Traits_                                         Traits_2;
-  typedef Visitor_                                        Visitor;
-  typedef Event_                                          Event;
-  typedef Subcurve_                                       Subcurve;
-  typedef Allocator_                                      Allocator;
-
-  typedef Arr_traits_basic_adaptor_2<Traits_2>            Traits_adaptor_2;
-  typedef typename Traits_adaptor_2::Point_2              Point_2;
-  typedef typename Traits_adaptor_2::X_monotone_curve_2   X_monotone_curve_2;
-
-  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
-  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
-  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
-  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
-
-  BOOST_MPL_ASSERT(
-      (typename 
-       Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, 
-       Top_side_category, Right_side_category >::result)
-  );
-  
-protected:
-  typedef typename Arr_are_all_sides_oblivious_tag< 
-                     Left_side_category, Bottom_side_category, 
-                     Top_side_category, Right_side_category >::result
-    Are_all_sides_oblivious_category;
-  
-public:
-  typedef CGAL::Compare_events<Traits_adaptor_2, Event> Compare_events;
-  typedef Multiset<Event*, Compare_events, Allocator>   Event_queue; 
-  typedef typename Event_queue::iterator                Event_queue_iterator;
-
-  typedef typename Event::Subcurve_iterator
-    Event_subcurve_iterator;
-
-  typedef Sweep_line_event<Traits_2, Subcurve>          Base_event;
-  typedef typename Base_event::Attribute                Attribute;
-  
-  typedef Sweep_line_subcurve<Traits_2>                 Base_subcurve;
-  typedef class Curve_comparer<Traits_2, Base_subcurve> Compare_curves;
-  typedef Multiset<Base_subcurve*,
-                   Compare_curves, 
-                   Allocator>                           Status_line;
-  typedef typename Status_line::iterator                Status_line_iterator;
-
-  typedef typename Allocator::template rebind<Event>    Event_alloc_rebind;
-  typedef typename Event_alloc_rebind::other            Event_alloc;
-
-  typedef typename Allocator::template rebind<Subcurve> Subcurve_alloc_rebind;
-  typedef typename Subcurve_alloc_rebind::other         Subcurve_alloc;
-
-protected:
-  /*! \struct
-   * An auxiliary functor for comparing event pointers.
-   */
-  struct CompEventPtr {
-    Comparison_result operator()(Event *e1, Event *e2) const
-    {
-      if (e1 < e2) return (SMALLER);
-      if (e1 > e2) return (LARGER);
-      return (EQUAL);
-    }
-  };
-
-  typedef Multiset<Event*, CompEventPtr>           Allocated_events_set;
-  typedef typename Allocated_events_set::iterator  Allocated_events_iterator;
-
-  // Data members:
-  const Traits_adaptor_2* m_traits;  // A traits-class object.
-  bool m_traitsOwner;                // Whether this object was allocated by
-                                     // this class (and thus should be freed).
-
-  Event* m_currentEvent;             // The current event.
-
-  Compare_curves m_statusLineCurveLess;
-                                     // Comparison functor for the status line.
-
-  Compare_events m_queueEventLess;   // Comparison functor for the event queue.
-
-  Event_queue* m_queue;              // The event queue (the X-structure).
-
-  Subcurve* m_subCurves;             // An array of the subcurves.
-  Status_line m_statusLine;          // The status line (the Y-structure).
-
-  Allocated_events_set m_allocated_events;
-                                     // The events that have been allocated
-                                     // (and have not yet been deallocated).
-
-  Status_line_iterator m_status_line_insert_hint;
-                                     // An iterator of the status line, which
-                                     // is used as a hint for insertions.
-
-  bool m_is_event_on_above;          // Indicates if the current event is on
-                                     // the interior of existing curve. This 
-                                     // may happen only with events that are
-                                     // associated with isolated query points.
-
-  Event_alloc m_eventAlloc;          // An allocator for the events objects.
-  Subcurve_alloc m_subCurveAlloc;    // An allocator for the subcurve objects.
-
-  Event m_masterEvent;               // A master Event (created once by the
-                                     // constructor) for the allocator's usage.
-
-  Subcurve m_masterSubcurve;         // A master Subcurve (created once by the
-                                     // constructor) for the allocator's usage.
-
-  //! \todo m_num_of_subCurves should be a size_t for "huge" data sets
-  unsigned int m_num_of_subCurves;   // Number of subcurves.
-
-  Visitor* m_visitor;                // The sweep-line visitor that will be
-                                     // notified during the sweep.
-
-public:
-  /*! Constructor.
-   * \param visitor A pointer to a sweep-line visitor object.
-   */
-  Basic_sweep_line_2(Visitor* visitor);
-
-  /*! Constructor with a traits class.
-   * \param traits A pointer to a sweep-line traits object.
-   * \param visitor A pointer to a sweep-line visitor object.
-   */
-  Basic_sweep_line_2(const Traits_2* traits, Visitor* visitor);
-
-  /*! Destrcutor. */
-  virtual ~Basic_sweep_line_2();
-
-  /*! Run the sweep-line algorithm on a given range of x-monotone curves.
-   * \param curves_begin An iterator for the first curve in the range.
-   * \param curves_end A past-the-end iterator for the range.
-   * \pre The value-type of CurveInputIterator is X_monotone_curve_2.
-   */
-  template <typename CurveInputIterator>
-  void sweep(CurveInputIterator curves_begin,
-             CurveInputIterator curves_end)
-  {
-    m_visitor->before_sweep();
-    _init_sweep(curves_begin, curves_end);
-    //m_visitor ->after_init();
-    _sweep();
-    _complete_sweep();
-    m_visitor ->after_sweep();
-  }
-
-  /*! Run the sweep-line algorithm on a range of x-monotone curves and a range 
-   * of action event points (if a curve passed through an action point, it will
-   * be split).
-   * \param curves_begin  An iterator for the first x-monotone curve in the
-   *                      range.
-   * \param curves_end A past-the-end iterator for this range.
-   * \param points_begin An iterator for the first point in the range.
-   * \param points_end A past-the-end iterator for this range.
-   * \pre The value-type of XCurveInputIterator is the traits-class
-   *      X_monotone_curve_2, and the value-type of PointInputIterator is the
-   *      traits-class Point_2.
-   */
-  template <typename CurveInputIterator, class PointInputIterator>
-  void sweep(CurveInputIterator curves_begin,
-             CurveInputIterator curves_end,
-             PointInputIterator action_points_begin,
-             PointInputIterator action_points_end)
-  {
-    m_visitor->before_sweep();
-    _init_sweep(curves_begin, curves_end);
-    _init_points(action_points_begin, action_points_end, Base_event::ACTION);
-    //m_visitor ->after_init();
-    _sweep();
-    _complete_sweep();
-    m_visitor ->after_sweep();
-  }
-
-  /*! Run the sweep-line alogrithm on a range of x-monotone curves, a range   
-   * of action event points (if a curve passed through an action point, it will
-   * be split) and a range of query points (if a curve passed through a
-   * query point,it will not be splitted).
-   * \param curves_begin An iterator for the first x-monotone curve in the
-   *                     range.
-   * \param curves_end A past-the-end iterator for this range.
-   * \param points_begin An iterator for the first point in the range.
-   * \param points_end A past-the-end iterator for this range.
-   * \pre The value-type of XCurveInputIterator is the traits-class 
-   *      X_monotone_curve_2, and the value-type of PointInputIterator is the 
-   *      traits-class Point_2.
-   */
-  template <typename CurveInputIterator, typename ActionPointItr,
-            typename QueryPointItr>
-  void sweep(CurveInputIterator curves_begin,
-             CurveInputIterator curves_end,
-             ActionPointItr action_points_begin,
-             ActionPointItr action_points_end,
-             QueryPointItr query_points_begin,
-             QueryPointItr query_points_end)
-  {
-    m_visitor->before_sweep();
-    _init_sweep(curves_begin, curves_end);
-    _init_points(action_points_begin, action_points_end, Base_event::ACTION);
-    _init_points(query_points_begin, query_points_end, Base_event::QUERY);
-    //m_visitor ->after_init();
-    _sweep();
-    _complete_sweep();
-    m_visitor->after_sweep();
-  }
-
-  /*! Get an iterator for the first subcurve in the status line. */
-  Status_line_iterator status_line_begin()
-  { return (m_statusLine.begin()); }
-
-  /*! Get a past-the-end iterator for the subcurves in the status line. */
-  Status_line_iterator status_line_end()
-  { return (m_statusLine.end()); }
-
-  /*! Get the status line size. */
-  unsigned int status_line_size() const
-  { return (m_statusLine.size()); }
-
-  /*! Check if the status line is empty. */
-  bool is_status_line_empty() const
-  { return (m_statusLine.empty()); }
-
-  /*! Get an iterator for the first event in event queue. */
-  Event_queue_iterator event_queue_begin()
-  { return (m_queue->begin()); }
-
-  /*! Get a past-the-end iterator for the events in the in event queue. */
-  Event_queue_iterator event_queue_end()
-  { return (m_queue->end()); }
-
-   /*! Get the event queue size. */
-  unsigned int event_queue_size() const
-  { return (m_queue->size()); }
-
-  /*! Check if the event queue is empty. */
-  bool is_event_queue_empty() const
-  { return (m_queue->empty()); }
-
-  /*! Stop the sweep by erasing the event queue (except for the current event).
-   * This function may called by the visitor during 'arter_handle_event' in
-   * order to stop the sweep-line process.
-   */
-  void stop_sweep();
-
-  /*! Deallocate event object.
-   * This method is made public to allow the visitor to manage the events
-   * deallocation (as necessary). 
-   */
-  void deallocate_event(Event* event);
-
-  /*! Get the current event */
-  Event* current_event() { return m_currentEvent; }
-
-  /*! Get the traits object */
-  const Traits_2* traits() { return m_traits; }
-
-protected:
-  /*! Perform the main sweep-line loop. */
-  void _sweep();
-
-  /*! Create an event object for each input point. */
-  template <typename PointInputIterator>
-  void _init_points(PointInputIterator points_begin,
-                    PointInputIterator points_end,
-                    Attribute type)
-  {
-    for (PointInputIterator pit = points_begin; pit != points_end; ++pit)
-      _init_point(*pit, type);
-  }
-
-  /*! Create a Subcurve object and two Event objects for each curve. */
-  template <typename CurveInputIterator>
-  void _init_curves(CurveInputIterator curves_begin,
-                    CurveInputIterator curves_end)
-  {
-    CurveInputIterator cit;
-    unsigned int index = 0;
-    for (cit = curves_begin; cit != curves_end; ++cit, ++index)
-      _init_curve(*cit, index);
-  }
-
-  /*! Initiliaze the sweep algorithm. */
-  template <typename CurveInputIterator>
-  void _init_sweep(CurveInputIterator curves_begin,
-                   CurveInputIterator curves_end)
-  {
-    m_num_of_subCurves =
-      static_cast<unsigned int>(std::distance(curves_begin, curves_end));
-    _init_structures();
-    _init_curves(curves_begin, curves_end);     // initialize the curves
-  }
-
-  /*! Initialize the data structures for the sweep-line algorithm. */
-  virtual void _init_structures();
-
-  /*! Complete the sweep (complete data strcures). */
-  virtual void _complete_sweep();
-
-  /*! Initialize an event associated with a point.
-   * \param p The given point.
-   * \param type The event type.
-   */
-  void _init_point(const Point_2& pt, Attribute type);
-
-  /*! Initialize the events associated with an x-monotone curve.
-   * \param curve The given x-monotone curve.
-   * \param index Its unique index.
-   */
-  void _init_curve(const X_monotone_curve_2& curve, unsigned int index);
-
-  /*! Initialize an event associated with an x-monotone curve end.
-   * \param cv The given x-monotone curve.
-   * \param ind Its end (ARR_MIN_END or ARR_MAX_END).
-   * \param sc The subcurve corresponding to cv.
-   */
-  void _init_curve_end(const X_monotone_curve_2& cv, Arr_curve_end ind,
-                       Subcurve* sc);
-  
-  /*! Handle the subcurves that are to the left of the event point (i.e., 
-   * subcurves that we are done with).
-   */
-  virtual void _handle_left_curves();
-
-  /*! Handle an event that does not have any incident left curves.
-   * Such an event is usually the left endpoint of its incident right
-   * subcurves, and we locate thei position in the status line.
-   */
-  void _handle_event_without_left_curves();
-
-  /*! Sort the left subcurves of an event point according to their order in
-   * their status line (no geometric comprasions are needed).
-   */
-  void _sort_left_curves();
-
-  /*! Handle the subcurves to the right of the current event point. */
-  virtual void _handle_right_curves();
-
-  /*! Add a subcurve to the right of an event point.
-   * \param event The event point.
-   * \param curve The subcurve to add.
-   * \return (true) if an overlap occured; (false) otherwise.
-   */
-  virtual bool _add_curve_to_right(Event* event, Subcurve* curve,
-                                   bool overlap_exist = false);
-
-  /*! Remove a curve from the status line. */
-  void _remove_curve_from_status_line(Subcurve *leftCurve);
- 
-  /*! Allocate an event object associated with a given point.
-   * \param pt The point.
-   * \param type The event type.
-   * \param ps_x The location of the point in x.
-   * \param ps_y The location of the point in y.
-   * \pre Neither one of the boundary conditions is +/-oo. 
-   * \return The created event.
-   */
-  Event* _allocate_event(const Point_2& pt, Attribute type,
-                         Arr_parameter_space ps_x, Arr_parameter_space ps_y);
-
-  /*! Allocate an event at open boundary, 
-   * which is not associated with a valid point.
-   * \param type The event type.
-   * \param ps_x The location of the point in x.
-   * \param ps_y The location of the point in y.
-   * \param At least one of the boundary conditions is +/-oo.
-   * \return The created event.
-   */
-  Event* _allocate_event_at_open_boundary(Attribute type,
-                                          Arr_parameter_space ps_x,
-                                          Arr_parameter_space ps_y);
-
-  /*! Push a finite event point into the event queue.
-   * \param pt The point associated with the event.
-   * \param type The event type.
-   * \param ps_x The location of the point in x.
-   * \param ps_y The location of the point in y.
-   * \param sc A subcurve that the new event represents on of its endpoints.
-   * \return A pair that comprises a pointer to the event, and a flag
-   *         indicating whether this is a new event (if false, the event
-   *         was in the queue and we just updated it).
-   */
-  std::pair<Event*, bool> _push_event(const Point_2& pt, Attribute type,
-                                      Arr_parameter_space ps_x,
-                                      Arr_parameter_space ps_y,
-                                      Subcurve* sc = NULL);
-
-  /*! Push an event point associated with a curve end into the event queue.
-   * \param cv The x-monotone curve.
-   * \param ind The relevant curve end.
-   * \param type The event type.
-   * \param ps_x The location of the point in x.
-   * \param ps_y The location of the point in y.
-   * \param sc A subcurve that the new event represents on of its endpoints.
-   * \return A pair that comprises a pointer to the event, and a flag
-   *         indicating whether this is a new event (if false, the event
-   *         was in the queue and we just updated it).
-   */
-  std::pair<Event*, bool> _push_event(const X_monotone_curve_2& cv,
-                                      Arr_curve_end ind,
-                                      Attribute type,
-                                      Arr_parameter_space ps_x,
-                                      Arr_parameter_space ps_y,
-                                      Subcurve* sc = NULL);
-
-  void _update_event_at_open_boundary(Event* e,
-                                      const X_monotone_curve_2& cv,
-                                      Arr_curve_end ind,
-                                      bool is_new)
-  {
-    _update_event_at_open_boundary(e, cv, ind, is_new, 
-                                   Are_all_sides_oblivious_category());
-  }
-
-  void _update_event_at_open_boundary(Event* e,
-                                      const X_monotone_curve_2& cv,
-                                      Arr_curve_end ind,
-                                      bool is_new,
-                                      Arr_not_all_sides_oblivious_tag)
-  { m_visitor->update_event(e, cv, ind, is_new); }
-
-  void _update_event_at_open_boundary(Event* /* e */,
-                                      const X_monotone_curve_2& /* cv */,
-                                      Arr_curve_end /* ind */,
-                                      bool /* is_new */,
-                                      Arr_all_sides_oblivious_tag)
-  { CGAL_error(); }
-
-#ifdef CGAL_SL_VERBOSE
-  void PrintEventQueue();
-  void PrintSubCurves();
-  void PrintStatusLine();
-  void PrintOpenBoundaryType(Arr_parameter_space x, Arr_parameter_space y);
-  void PrintEvent(const Event* e);
-#endif
-
-};
-
-//DEBUG UTILITIES
-#ifdef CGAL_SL_VERBOSE
-  #include <CGAL/Sweep_line_2/Sweep_line_2_debug.h>
-#endif
-
-} //namespace CGAL
-
-#include <CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h>
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2.h b/3rdparty/CGAL-4.6/include/CGAL/Bbox_2.h
deleted file mode 100644
index e90bcf0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright (c) 1999,2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_BBOX_2_H
-#define CGAL_BBOX_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/kernel_assertions.h>
-#include <CGAL/IO/io.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template < typename T >
-struct Simple_cartesian;
-
-class Bbox_2
-{
-  typedef cpp11::array<double, 4>            BBox_rep_2;
-
-  BBox_rep_2 rep;
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef Simple_cartesian<double>  R;
-
-             Bbox_2() {}
-
-             Bbox_2(double x_min, double y_min,
-                    double x_max, double y_max)
-		 : rep(CGAL::make_array(x_min, y_min, x_max, y_max)) {}
-
-  inline bool       operator==(const Bbox_2 &b) const;
-  inline bool       operator!=(const Bbox_2 &b) const;
-
-  inline int        dimension() const;
-  inline double     xmin() const;
-  inline double     ymin() const;
-  inline double     xmax() const;
-  inline double     ymax() const;
-
-  inline double     max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
-  inline double     min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
-
-  inline Bbox_2     operator+(const Bbox_2 &b) const;
-  inline Bbox_2&     operator+=(const Bbox_2 &b);
-
-};
-
-inline
-double
-Bbox_2::xmin() const
-{ return rep[0]; }
-
-inline
-double
-Bbox_2::ymin() const
-{ return rep[1]; }
-
-inline
-double
-Bbox_2::xmax() const
-{ return rep[2]; }
-
-inline
-double
-Bbox_2::ymax() const
-{ return rep[3]; }
-
-inline
-bool
-Bbox_2::operator==(const Bbox_2 &b) const
-{
-  return    xmin() == b.xmin() && xmax() == b.xmax()
-         && ymin() == b.ymin() && ymax() == b.ymax();
-}
-
-inline
-bool
-Bbox_2::operator!=(const Bbox_2 &b) const
-{
-  return ! (b == *this);
-}
-
-inline
-int
-Bbox_2::dimension() const
-{ return 2; }
-
-inline
-double
-Bbox_2::min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
-{
-  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) );
-  if(i == 0) { return xmin(); }
-  return ymin();
-}
-
-inline
-double
-Bbox_2::max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
-{
-  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) );
-  if(i == 0) { return xmax(); }
-  return ymax();
-}
-
-inline
-Bbox_2
-Bbox_2::operator+(const Bbox_2 &b) const
-{
-  return Bbox_2((std::min)(xmin(), b.xmin()),
-                (std::min)(ymin(), b.ymin()),
-                (std::max)(xmax(), b.xmax()),
-                (std::max)(ymax(), b.ymax()));
-}
-
-inline
-Bbox_2&
-Bbox_2::operator+=(const Bbox_2& b)
-{
-  rep[0] = (std::min)(xmin(), b.xmin());
-  rep[1] = (std::min)(ymin(), b.ymin());
-  rep[2] = (std::max)(xmax(), b.xmax());
-  rep[3] = (std::max)(ymax(), b.ymax());
-  return *this;
-}
-
-inline
-bool
-do_overlap(const Bbox_2 &bb1, const Bbox_2 &bb2)
-{
-    // check for emptiness ??
-    if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
-        return false;
-    if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
-        return false;
-    return true;
-}
-
-inline
-std::ostream&
-operator<<(std::ostream &os, const Bbox_2 &b)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        os << b.xmin() << ' ' << b.ymin() << ' '
-           << b.xmax() << ' ' << b.ymax();
-        break;
-    case IO::BINARY :
-        write(os, b.xmin());
-        write(os, b.ymin());
-        write(os, b.xmax());
-        write(os, b.ymax());
-        break;
-    default:
-        os << "Bbox_2(" << b.xmin() << ", " << b.ymin() << ", "
-                        << b.xmax() << ", " << b.ymax() << ")";
-        break;
-    }
-    return os;
-}
-
-inline
-std::istream&
-operator>>(std::istream &is, Bbox_2 &b)
-{
-    double xmin, ymin, xmax, ymax;
-
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(xmin) >> iformat(ymin) >> iformat(xmax) >> iformat(ymax);
-        break;
-    case IO::BINARY :
-        read(is, xmin);
-        read(is, ymin);
-        read(is, xmax);
-        read(is, ymax);
-        break;
-    }
-    if (is)
-      b = Bbox_2(xmin, ymin, xmax, ymax);
-    return is;
-}
-
-template <class Input_iterator, class Traits>
-Bbox_2 bbox_2(Input_iterator begin, Input_iterator end, const Traits& traits)
-{
-  if (begin==end) return Bbox_2();
-  typename Traits::Construct_bbox_2 get_bbox = traits.construct_bbox_2_object();
-  Bbox_2 res = get_bbox( *begin );
-  for (++begin; begin!=end; ++begin)
-    res += get_bbox( *begin );
-  return res;
-}
-
-template <class Input_iterator>
-Bbox_2 bbox_2(Input_iterator begin, Input_iterator end)
-{
-  if (begin==end) return Bbox_2();
-  Bbox_2 res = begin->bbox();
-  for (++begin; begin!=end; ++begin)
-    res += begin->bbox();
-  return res;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_BBOX_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2_Line_2_intersection.h b/3rdparty/CGAL-4.6/include/CGAL/Bbox_2_Line_2_intersection.h
deleted file mode 100644
index 02503f3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2_Line_2_intersection.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman
-
-
-#ifndef CGAL_BBOX_2_LINE_2_INTERSECTION_H
-#define CGAL_BBOX_2_LINE_2_INTERSECTION_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Line_2.h>
-//#include <CGAL/Segment_2.h>
-//#include <CGAL/Point_2.h>
-#include <CGAL/kernel_assertions.h>
-#include <CGAL/number_utils.h>
-
-namespace CGAL {
-
-class Bbox_2_Line_2_pair_impl;
-
-class CGAL_EXPORT Bbox_2_Line_2_pair {
-public:
-    enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT};
-    Bbox_2_Line_2_pair() ;
-    Bbox_2_Line_2_pair(Bbox_2_Line_2_pair const &);
-    Bbox_2_Line_2_pair(Bbox_2 const &bbox,
-                            double line_a, double line_b, double line_c);
-    ~Bbox_2_Line_2_pair() ;
-    Bbox_2_Line_2_pair &operator=(Bbox_2_Line_2_pair const &o);
-    // set_bbox(Bbox_2 const &bbox);
-    // set_line(double line_a, double line_b, double line_c);
-    Intersection_results intersection_type() const;
-    bool intersection(double &x, double &y) const;
-    bool intersection(double &x1, double &y1, double &x2, double &y2) const;
-protected:
-    Bbox_2_Line_2_pair_impl *pimpl;
-};
-
-template <class Line>
-Bbox_2_Line_2_pair intersection_computer_line_2(
-    Bbox_2 const &bbox, Line const &line)
-{
-    return Bbox_2_Line_2_pair(bbox, to_double(line->a()),
-        to_double(line->b()), to_double(line->c()));
-}
-
-inline bool do_intersect_line_2(
-    const Bbox_2 &box, double line_a, double line_b, double line_c)
-{
-    Bbox_2_Line_2_pair pair(box, line_a, line_b, line_c);
-    return pair.intersection_type() != Bbox_2_Line_2_pair::NO_INTERSECTION;
-}
-
-template <class Line>
-bool do_intersect_line_2(
-    Bbox_2 const &bbox, Line const &line)
-{
-    return do_intersect_line_2(bbox, to_double(line->a()),
-        to_double(line->b()), to_double(line->c()));
-}
-
-template <class Line>
-bool do_intersect_line_2(
-    Line const &line, Bbox_2 const &bbox)
-{
-    return do_intersect_line_2(bbox, to_double(line->a()),
-        to_double(line->b()), to_double(line->c()));
-}
-
-template <class R>
-inline bool do_intersect(
-    const Line_2<R> &line,
-    const Bbox_2 &box)
-{
-    return do_intersect(box, line);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bbox_3.h b/3rdparty/CGAL-4.6/include/CGAL/Bbox_3.h
deleted file mode 100644
index 8be250b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Bbox_3.h
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright (c) 1999,2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_BBOX_3_H
-#define CGAL_BBOX_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/IO/io.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template < typename T >
-struct Simple_cartesian;
-
-class Bbox_3
-{
-  cpp11::array<double, 6>   rep;
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<3>  Feature_dimension;
-
-  typedef Simple_cartesian<double>  R;
-
-        Bbox_3() {}
-
-        Bbox_3(double x_min, double y_min, double z_min,
-               double x_max, double y_max, double z_max)
-	  : rep(CGAL::make_array(x_min, y_min, z_min, x_max, y_max, z_max)) {}
-
-  inline bool operator==(const Bbox_3 &b) const;
-  inline bool operator!=(const Bbox_3 &b) const;
-
-  inline int dimension() const;
-  double  xmin() const;
-  double  ymin() const;
-  double  zmin() const;
-  double  xmax() const;
-  double  ymax() const;
-  double  zmax() const;
-
-  inline double min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
-  inline double max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
-
-  Bbox_3  operator+(const Bbox_3& b) const;
-  Bbox_3& operator+=(const Bbox_3& b);
-};
-
-inline
-double
-Bbox_3::xmin() const
-{ return rep[0]; }
-
-inline
-double
-Bbox_3::ymin() const
-{ return rep[1]; }
-
-inline
-double
-Bbox_3::zmin() const
-{ return rep[2]; }
-
-inline
-double
-Bbox_3::xmax() const
-{ return rep[3]; }
-
-inline
-double
-Bbox_3::ymax() const
-{ return rep[4]; }
-
-inline
-double
-Bbox_3::zmax() const
-{ return rep[5]; }
-
-inline
-bool
-Bbox_3::operator==(const Bbox_3 &b) const
-{
-  return xmin() == b.xmin() && xmax() == b.xmax()
-      && ymin() == b.ymin() && ymax() == b.ymax()
-      && zmin() == b.zmin() && zmax() == b.zmax();
-}
-
-inline
-bool
-Bbox_3::operator!=(const Bbox_3 &b) const
-{
-  return ! (b == *this);
-}
-
-inline
-int
-Bbox_3::dimension() const
-{ return 3; }
-
-inline
-double
-Bbox_3::min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
-{
-  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) || ( i == 2) );
-  if (i == 0) { return xmin(); }
-  if (i == 1) { return ymin(); }
-  return zmin();
-}
-
-inline
-double
-Bbox_3::max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
-{
-  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) || ( i == 2 ) );
-  if (i == 0) { return xmax(); }
-  if (i == 1) { return ymax(); }
-  return zmax();
-}
-
-inline
-Bbox_3
-Bbox_3::operator+(const Bbox_3& b) const
-{
-  return Bbox_3((std::min)(xmin(), b.xmin()),
-                (std::min)(ymin(), b.ymin()),
-                (std::min)(zmin(), b.zmin()),
-                (std::max)(xmax(), b.xmax()),
-                (std::max)(ymax(), b.ymax()),
-                (std::max)(zmax(), b.zmax()));
-}
-
-inline
-Bbox_3&
-Bbox_3::operator+=(const Bbox_3& b)
-{
-  rep[0] = (std::min)(xmin(), b.xmin());
-  rep[1] = (std::min)(ymin(), b.ymin());
-  rep[2] = (std::min)(zmin(), b.zmin());
-  rep[3] = (std::max)(xmax(), b.xmax());
-  rep[4] = (std::max)(ymax(), b.ymax());
-  rep[5] = (std::max)(zmax(), b.zmax());
-  return *this;
-}
-
-inline
-bool
-do_overlap(const Bbox_3& bb1, const Bbox_3& bb2)
-{
-    // check for emptiness ??
-    if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
-        return false;
-    if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
-        return false;
-    if (bb1.zmax() < bb2.zmin() || bb2.zmax() < bb1.zmin())
-        return false;
-    return true;
-}
-
-
-inline
-std::ostream&
-operator<<(std::ostream &os, const Bbox_3& b)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin()
-		  << ' ' << b.xmax() << ' ' << b.ymax() << ' ' << b.zmax();
-    case IO::BINARY :
-        write(os, b.xmin());
-        write(os, b.ymin());
-        write(os, b.zmin());
-        write(os, b.xmax());
-        write(os, b.ymax());
-        write(os, b.zmax());
-        return os;
-    default:
-        os << "Bbox_3((" << b.xmin()
-           << ", "       << b.ymin()
-           << ", "       << b.zmin() << "), (";
-        os <<               b.xmax()
-           << ", "       << b.ymax()
-           << ", "       << b.zmax() << "))";
-        return os;
-  }
-}
-
-inline
-std::istream&
-operator>>(std::istream &is, Bbox_3& b)
-{
-  double xmin, ymin, zmin, xmax, ymax, zmax;
-
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-      is >> iformat(xmin) >> iformat(ymin) >> iformat(zmin)
-         >> iformat(xmax) >> iformat(ymax) >> iformat(zmax);
-        break;
-    case IO::BINARY :
-        read(is, xmin);
-        read(is, ymin);
-        read(is, zmin);
-        read(is, xmax);
-        read(is, ymax);
-        read(is, zmax);
-        break;
-  }
-  if (is)
-    b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax);
-  return is;
-}
-
-template <class Input_iterator, class Traits>
-Bbox_3 bbox_3(Input_iterator begin, Input_iterator end, const Traits& traits)
-{
-  if (begin==end) return Bbox_3();
-  typename Traits::Construct_bbox_3 get_bbox = traits.construct_bbox_3_object();
-  Bbox_3 res = get_bbox( *begin );
-  for (++begin; begin!=end; ++begin)
-    res += get_bbox( *begin );
-  return res;
-}
-
-template <class Input_iterator>
-Bbox_3 bbox_3(Input_iterator begin, Input_iterator end)
-{
-  if (begin==end) return Bbox_3();
-  Bbox_3 res = begin->bbox();
-  for (++begin; begin!=end; ++begin)
-    res += begin->bbox();
-  return res;
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_BBOX_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bigfloat_interval_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Bigfloat_interval_traits.h
deleted file mode 100644
index a8a8900..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Bigfloat_interval_traits.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
-//                 Ron Wein         <wein at post.tau.ac.il>
-
-
-#ifndef CGAL_BIGFLOAT_INTERVAL_TRAITS_H
-#define CGAL_BIGFLOAT_INTERVAL_TRAITS_H
-
-#include<CGAL/basic.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-#  include <boost/serialization/static_warning.hpp>
-#else
-#  include <boost/static_warning.hpp>
-#endif
-
-#include <CGAL/assertions.h>
-namespace CGAL {
-
-// TODO: rename this into MPFI_traits ? 
-// add a better rounding control 
-
-template<typename BigfloatInterval> class Bigfloat_interval_traits;
-
-template<typename BFI> inline long get_significant_bits(BFI bfi) {
-  typename Bigfloat_interval_traits<BFI>::Relative_precision relative_precision;
-  return  zero_in(bfi) ? -1 : (std::max)(long(0),relative_precision(bfi));
-}
-
-template<typename BFI> inline long set_precision(BFI,long prec) {
-    typename Bigfloat_interval_traits<BFI>::Set_precision set_precision;
-    return set_precision(prec);
-}
-
-template<typename BFI> inline long get_precision(BFI) {
-    typename Bigfloat_interval_traits<BFI>::Get_precision get_precision;
-    return get_precision();
-}
-
-template<typename BFI> inline long relative_precision(const BFI& bfi) {
-    typename Bigfloat_interval_traits<BFI>::Relative_precision 
-      relative_precision;
-    return relative_precision(bfi);
-}
-} //namespace CGAL
-
-#endif // CGAL_BIGFLOAT_INTERVAL_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h
deleted file mode 100644
index 38305e5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$ $Date$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Ron Wein        <wein at post.tau.ac.il>
-
-#ifndef CGAL_GSP_AGG_OP_SWEEP_H
-#define CGAL_GSP_AGG_OP_SWEEP_H
-
-#include <CGAL/Sweep_line_2.h>
-#include <CGAL/Unique_hash_map.h>
-
-namespace CGAL {
-
-template <class Arrangement_,
-          class MetaTraits_,
-          class SweepVisitor,
-          class CurveWrap,
-          class SweepEvent,
-          typename Allocator = CGAL_ALLOCATOR(int) >
-class Gps_agg_op_sweep_line_2 :
-  public Sweep_line_2<MetaTraits_,
-                      SweepVisitor,
-                      CurveWrap,
-                      SweepEvent,
-                      Allocator>
-{
-public:
-
-  typedef Arrangement_                            Arrangement_2;
-  typedef MetaTraits_                             Traits_2;
-  typedef typename Traits_2::Point_2              Point_2;
-  typedef typename Traits_2::X_monotone_curve_2   X_monotone_curve_2;
-
-  typedef typename Arrangement_2::Vertex_handle       Vertex_handle;
-  typedef typename Arrangement_2::Halfedge_handle     Halfedge_handle;
-
-  typedef std::pair<Arrangement_2 *,
-                    std::vector<Vertex_handle> *>     Arr_entry;
-
-  typedef Sweep_line_2<Traits_2,
-                       SweepVisitor,
-                       CurveWrap,
-                       SweepEvent,
-                       Allocator>                 Base;
-
-  typedef SweepEvent                              Event;
-
-
-  typedef typename Base::Event_queue_iterator     EventQueueIter;
-  typedef typename Event::Subcurve_iterator       EventCurveIter;
-
-  typedef typename Base::Base_event               Base_event;
-  typedef typename Base_event::Attribute          Attribute;
-
-  typedef typename Base::Base_subcurve            Base_subcurve;
-  
-  typedef CurveWrap                               Subcurve;
-
-  typedef std::list<Subcurve*>                    SubCurveList;
-  typedef typename SubCurveList::iterator         SubCurveListIter; 
-
-
-  typedef typename Base::Status_line_iterator     StatusLineIter;
-
-public:
-
-  /*!
-   * Constructor.
-   * \param visitor A pointer to a sweep-line visitor object.
-   */
-  Gps_agg_op_sweep_line_2 (SweepVisitor* visitor) : 
-    Base (visitor)
-  {}
-
-  /*!
-   * Constructor.
-   * \param traits A pointer to a sweep-line traits object.
-   * \param visitor A pointer to a sweep-line visitor object.
-   */
-  Gps_agg_op_sweep_line_2 (Traits_2 *traits, SweepVisitor* visitor) :
-    Base(traits, visitor)
-  {}
-
-  /*! Perform the sweep. */
-  template<class CurveInputIterator>
-  void sweep (CurveInputIterator curves_begin,
-              CurveInputIterator curves_end,
-              unsigned int lower,
-              unsigned int upper,
-              unsigned int jump,
-              std::vector<Arr_entry>& arr_vec)
-  {
-    CGAL_assertion (this->m_queue->empty() && 
-                    this->m_statusLine.size() == 0);
-
-    typedef Unique_hash_map<Vertex_handle, Event *>    Vertices_map;
-    typedef typename Traits_2::Compare_xy_2            Compare_xy_2;
-
-    this->m_visitor->before_sweep();
-    // Allocate all of the Subcurve objects as one block.
-    this->m_num_of_subCurves = static_cast<unsigned int>(std::distance (curves_begin, curves_end));
-    this->m_subCurves = 
-      this->m_subCurveAlloc.allocate (this->m_num_of_subCurves);
-
-    this->m_curves_pair_set.resize (2 * this->m_num_of_subCurves);
-
-    // Initialize the event queue using the vertices vectors. Note that these
-    // vertices are already sorted, we simply have to merge them
-    Vertices_map       vert_map;
-    Vertex_handle      vh;
-    Vertex_handle      invalid_v;
-    unsigned int       i = lower;
-    unsigned int       n = static_cast<unsigned int>((arr_vec[i].second)->size());
-    unsigned int       j;
-    EventQueueIter     q_iter;
-    bool               first = true;
-    Attribute          event_type;
-    Event             *event;
-
-    for (j = 0;
-         j < n && (vh = (*(arr_vec[i].second))[j]) != invalid_v;
-         j++)
-    {
-      // Insert the vertices of the first vector one after the other.
-      event_type = _type_of_vertex (vh);
-      if (event_type == Base_event::DEFAULT)
-        continue;
-
-      event = this->_allocate_event (vh->point(), event_type,
-                                     ARR_INTERIOR, ARR_INTERIOR);
-      // \todo When the boolean set operations are exteneded to support
-      //       unbounded curves, we will need here a special treatment.
-
-      #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
-        event->set_finite();
-      #endif
-      
-      if (! first)
-      {
-        q_iter = this->m_queue->insert_after (q_iter, event);
-      }
-      else
-      {
-        q_iter = this->m_queue->insert (event);
-        first = false;
-      }
-
-      vert_map[vh] = event;
-    }
-
-    Comparison_result  res = LARGER;
-    Compare_xy_2       comp_xy = this->m_traits->compare_xy_2_object();
-    EventQueueIter     q_end = this->m_queue->end();
-
-    for (i += jump; i <= upper; i += jump)
-    {
-      // Merge the vertices of the other vectors into the existing queue.
-      q_iter = this->m_queue->begin();
-      n = static_cast<unsigned int>((arr_vec[i].second)->size());
-
-      for (j = 0;
-           j < n && (vh = (*(arr_vec[i].second))[j]) != invalid_v;
-           j++)
-      {
-        event_type = _type_of_vertex (vh);
-        if (event_type == Base_event::DEFAULT)
-          continue;
-
-        while (q_iter != q_end &&
-               (res = comp_xy (vh->point(), (*q_iter)->point())) == LARGER)
-        {
-          ++q_iter;
-        }
-
-        if (res == SMALLER || q_iter == q_end)
-        {
-          event = this->_allocate_event (vh->point(), event_type,
-                                         ARR_INTERIOR, ARR_INTERIOR);
-          // \todo When the boolean set operations are exteneded to support
-          //       unbounded curves, we will need here a special treatment.
-          
-          #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
-             event->set_finite();
-          #endif
-
-          this->m_queue->insert_before (q_iter, event);
-          vert_map[vh] = event;
-        }
-        else if (res == EQUAL)
-        {
-          // In this case q_iter points to an event already associated with
-          // the vertex, so we just update the map:
-          vert_map[vh] = *q_iter;
-        }
-      }
-    }
-
-    // Go over all curves (which are associated with halfedges) and associate
-    // them with the events we have just created.
-    unsigned int           index = 0;
-    CurveInputIterator     iter;
-    Halfedge_handle        he;
-    Event                 *e_left;
-    Event                 *e_right;
-
-    for (iter = curves_begin; iter != curves_end; ++iter, index++)
-    {
-      // Get the events associated with the end-vertices of the current
-      // halfedge.
-      he = iter->data().halfedge();
-
-      CGAL_assertion (vert_map.is_defined (he->source()));
-      CGAL_assertion (vert_map.is_defined (he->target()));
-
-      if ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT)
-      {
-        e_left = vert_map[he->source()];
-        e_right = vert_map[he->target()];
-      }
-      else
-      {
-        e_left = vert_map[he->target()];
-        e_right = vert_map[he->source()];
-      }
-
-      // Create the subcurve object.
-      this->m_subCurveAlloc.construct (this->m_subCurves + index,
-                                       this->m_masterSubcurve);
-
-      (this->m_subCurves + index)->init (*iter);
-      (this->m_subCurves + index)->set_left_event(e_left);
-      (this->m_subCurves + index)->set_right_event(e_right);
-    
-      e_right->add_curve_to_left (this->m_subCurves + index);  
-      this->_add_curve_to_right (e_left, this->m_subCurves + index);
-    }
-
-    // Perform the sweep:
-    this->_sweep();
-    this->_complete_sweep();
-    this->m_visitor->after_sweep();
-
-    return;
-  }
-    
-private:
-   
-  /*!
-   * Check if the given vertex is an endpoint of an edge we are going
-   * to use in the sweep.
-   */
-  Attribute _type_of_vertex (Vertex_handle v)
-  {
-    typename Arrangement_2::Halfedge_around_vertex_circulator  first, circ;
-
-    circ = first = v->incident_halfedges();
-    do
-    {
-      // Check if the current edge separates two faces with unequal
-      // containment flags (otherwise we will simply not keep it).
-      if (circ->face()->contained() != circ->twin()->face()->contained())
-      {
-        if ((Arr_halfedge_direction)circ->direction() == ARR_LEFT_TO_RIGHT)
-          return (Base_event::RIGHT_END);
-        else
-          return (Base_event::LEFT_END);
-      }
-      ++circ;
-
-    } while (circ != first);
-
-    // If we reached here, we should not keep this vertex.
-    return (Base_event::DEFAULT);
-  }
-};
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h
deleted file mode 100644
index 88883df..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_GPS_DEFAULT_DCEL_H
-#define CGAL_GPS_DEFAULT_DCEL_H
-
-/*! \file
- * This class is the default \dcel{} class used by the General_polygon_set_2
- * and Polygon_set_2} class-templates to represent the undelying internal
- * Arrangement_2 data structure.
- */
-
-#include <CGAL/Arr_default_dcel.h>
-
-namespace CGAL {
-
-class Gps_face_base : public Arr_face_base
-{
-protected:
-  mutable char m_info;
-  
-  enum
-  {
-    CONTAINED = 1,
-    VISITED   = 2
-  };
-
-
-public:
-  //Constructor
-  Gps_face_base() :
-    Arr_face_base(),
-    m_info(0)
-  {}
-
-   /*! Assign from another face. */
-  virtual void assign (const Arr_face_base& f)
-  {
-    Arr_face_base::assign (f);
-
-    const Gps_face_base & ex_f = static_cast<const Gps_face_base&>(f);
-    m_info = ex_f.m_info;
-  }
-  
-  bool contained() const
-  {
-    return (m_info & CONTAINED) != 0;
-  }
-
-  void set_contained(bool b)
-  {
-    if (b)
-      m_info |= CONTAINED;
-    else
-      m_info &= ~CONTAINED;
-  }
-
-  bool visited() const
-  {
-    return (m_info & VISITED) != 0;
-  }
-
-  void set_visited(bool b) const
-  {
-    if (b)
-      m_info |= VISITED;
-    else
-      m_info &= ~VISITED;
-  }
-
-};
-
-
-template <class Traits_>
-class Gps_default_dcel :
-  public Arr_dcel_base<Arr_vertex_base<typename Traits_::Point_2>,
-                       Arr_halfedge_base<typename Traits_::X_monotone_curve_2>,
-                       Gps_face_base>
-{
-public:
-  /*! Default constructor. */
-  Gps_default_dcel() {}
-};
-
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h
deleted file mode 100644
index e51a16c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h
+++ /dev/null
@@ -1,1417 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$ 
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
-//                 Guy Zucker <guyzucke at post.tau.ac.il> 
-
-
-#ifndef CGAL_GPS_ON_SURFACE_BASE_2_H
-#define CGAL_GPS_ON_SURFACE_BASE_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Object.h>
-#include <CGAL/enum.h>
-#include <CGAL/iterator.h> 
-#include <CGAL/Arrangement_on_surface_2.h>
-#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
-
-#include <CGAL/Arr_overlay_2.h>
-#include <CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_intersection_functor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_join_functor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_difference_functor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_merge.h>
-#include <CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h>
-#include <CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h>
-
-/*!
-  \file   Gps_on_surface_base_2.h
-  \brief  A class that allows Boolean set operations.
-  This class is the base class for General_polygon_set_on_surface_2 and 
-  recieves extra template parameter which allows different validation 
-  policies. If you do not want validation then use the default validation
-  policy. A different validation policy example can be found in 
-  General_polygon_set_on_surface_2.
-*/
-
-
-namespace CGAL {
-
-namespace Boolean_set_operation_2_internal
-{
-  struct NoValidationPolicy
-  {
-   /*! is_valid - Checks if a Traits::Polygon_2 OR 
-    * Traits::Polygon_with_holes_2 are valid.
-    * In this validation policy we do NOT do anything.
-    */ 
-    template <class Polygon, class Traits>
-    inline static void is_valid(const Polygon&, Traits&) {}
-  };
-}
-
-//! General_polygon_set_on_surface_2 
-/*! This class is the base class for General_polygon_set_on_surface_2 and 
-    recieves extra template parameter which allows different validation 
-    policies. If you do not want validation then use the default validation
-    policy. A different validation policy example can be found in 
-    General_polygon_set_on_surface_2.
- */
-template <class Traits_, class TopTraits_, 
-          class ValidationPolicy = 
-          Boolean_set_operation_2_internal::NoValidationPolicy>
-class Gps_on_surface_base_2
-{
-public:
-  typedef Traits_                                      Traits_2;
-  typedef TopTraits_                                   Topology_traits;
-  typedef typename Traits_2::Polygon_2                 Polygon_2;
-  typedef typename Traits_2::Polygon_with_holes_2      Polygon_with_holes_2;
-  typedef CGAL::Arrangement_on_surface_2<Traits_2, Topology_traits>
-                                                       Arrangement_on_surface_2;
-  typedef typename Arrangement_on_surface_2::Size      Size;
-
-private:
-  typedef Arrangement_on_surface_2                     Aos_2;
-
-  typedef Gps_on_surface_base_2 <
-    Traits_2, Topology_traits, ValidationPolicy>       Self;
-  typedef typename Traits_2::Point_2                   Point_2;
-  typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
-  
-  typedef typename Polygon_with_holes_2::Hole_const_iterator
-    GP_Holes_const_iterator;
-  typedef typename Traits_2::Curve_const_iterator      Curve_const_iterator;
-  typedef typename Traits_2::Compare_endpoints_xy_2
-                                                       Compare_endpoints_xy_2;
-  typedef typename Traits_2::Construct_opposite_2      Construct_opposite_2;
-
-  typedef typename Aos_2::Face_const_iterator          Face_const_iterator;
-  typedef typename Aos_2::Halfedge_const_iterator      Halfedge_const_iterator;
-  typedef typename Aos_2::Vertex_const_iterator        Vertex_const_iterator;
-  typedef typename Aos_2::Edge_const_iterator          Edge_const_iterator;
-  typedef typename Aos_2::Outer_ccb_const_iterator     Outer_ccb_const_iterator;
-  typedef typename Aos_2::Inner_ccb_const_iterator     Inner_ccb_const_iterator;
-  typedef typename Aos_2::Ccb_halfedge_const_circulator 
-    Ccb_halfedge_const_circulator;
-  typedef typename Aos_2::Face_iterator                Face_iterator;
-  typedef typename Aos_2::Halfedge_iterator            Halfedge_iterator;
-  typedef typename Aos_2::Vertex_iterator              Vertex_iterator;
-  typedef typename Aos_2::Edge_iterator                Edge_iterator;
-  typedef typename Aos_2::Outer_ccb_iterator           Outer_ccb_iterator;
-  typedef typename Aos_2::Inner_ccb_iterator           Inner_ccb_iterator;
-  typedef typename Aos_2::Ccb_halfedge_circulator      Ccb_halfedge_circulator;
-  typedef typename Aos_2::Face_handle                  Face_handle;
-  typedef typename Aos_2::Halfedge_handle              Halfedge_handle;
-  typedef typename Aos_2::Vertex_handle                Vertex_handle;
-
-  typedef typename Aos_2::Face_const_handle            Face_const_handle;
-  typedef typename Aos_2::Halfedge_const_handle        Halfedge_const_handle;
-  typedef typename Aos_2::Vertex_const_handle          Vertex_const_handle;
-
-  typedef typename Aos_2::Halfedge_around_vertex_const_circulator
-    Halfedge_around_vertex_const_circulator;
-
-  typedef std::pair<Aos_2 *, 
-                    std::vector<Vertex_handle> *>      Arr_entry;
-
-  typedef typename Arrangement_on_surface_2::
-    Topology_traits::Default_point_location_strategy   Point_location;
-
-protected:
-
-  // Traits* should be removed and only m_traits should be used.
-  // If you, who reads this text, have time, replace m_traits 
-  // with m_traits_adaptor and try to do something about m_traits_owner.
-  Traits_2*                                  m_traits;
-  CGAL::Arr_traits_adaptor_2<Traits_2>       m_traits_adaptor;
-  bool                                       m_traits_owner;
-
-  // the underlying arrangement
-  Aos_2*        m_arr;
-
-
-public:
-
-  // default costructor
-  Gps_on_surface_base_2() : m_traits(new Traits_2()),
-                            m_traits_adaptor(*m_traits),
-                            m_traits_owner(true),
-                            m_arr(new Aos_2(m_traits))       
-  {}
-
-
-  // constructor with traits object
-  Gps_on_surface_base_2(Traits_2& tr) : m_traits(&tr),
-                                        m_traits_adaptor(*m_traits),
-                                        m_traits_owner(false),
-                                        m_arr(new Aos_2(m_traits)) 
-  {}
-
-
-  Gps_on_surface_base_2(const Self& ps) :
-    m_traits(new Traits_2(*(ps.m_traits))),
-    m_traits_adaptor(*m_traits),
-    m_traits_owner(true),
-    m_arr(new Aos_2(*(ps.m_arr)))
-  {}
-
-  
-  Gps_on_surface_base_2& operator=(const Self& ps)
-  {
-    if (this == &ps)
-      return (*this);
-
-    if (m_traits_owner)
-      delete m_traits;
-    delete m_arr;
-    m_traits = new Traits_2(*(ps.m_traits));
-    m_traits_adaptor = CGAL::Arr_traits_adaptor_2<Traits_2>(*m_traits);
-    m_traits_owner = true;
-    m_arr = new Aos_2(*(ps.m_arr));
-    return (*this);
-  }
-
-
-  explicit Gps_on_surface_base_2(const Polygon_2& pgn) : 
-    m_traits(new Traits_2()),
-    m_traits_adaptor(*m_traits),
-    m_traits_owner(true),
-    m_arr(new Aos_2(m_traits)) 
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _insert(pgn, *m_arr);
-  }
-
-  explicit Gps_on_surface_base_2(const Polygon_with_holes_2& pgn_with_holes): 
-    m_traits(new Traits_2()),
-    m_traits_adaptor(*m_traits),
-    m_traits_owner(true),
-    m_arr(new Aos_2(m_traits))
-  {
-    ValidationPolicy::is_valid(pgn_with_holes,*m_traits);
-    _insert(pgn_with_holes, *m_arr);
-  }
-
-protected:
-  Gps_on_surface_base_2(Aos_2* arr) : m_traits(new Traits_2()),
-                                              m_traits_adaptor(*m_traits),
-                                              m_traits_owner(true),
-                                              m_arr(arr)
-   {}
-
-public:
-  //destructor
-  virtual ~Gps_on_surface_base_2()
-  {
-    delete m_arr;
-
-    if (m_traits_owner)
-      delete m_traits;
-  }
-
-  void simplify(const Polygon_2& pgn, Polygon_with_holes_2& res)
-  {
-    typedef Gps_polygon_simplifier<Aos_2>  Simplifier;
-
-    Aos_2*  arr = new Aos_2();
-
-    Simplifier simp(*arr, *m_traits);
-    simp.simplify(pgn);
-    _remove_redundant_edges(arr);
-    Self gps(arr);
-    gps._reset_faces();
-  
-    typedef Oneset_iterator<Polygon_with_holes_2>    OutputItr;
-    OutputItr oi (res);
-    gps.polygons_with_holes(oi);
-  }
-
-  // insert a simple polygon
-  void insert(const Polygon_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _insert(pgn, *m_arr);
-  }
-
-  // insert a polygon with holes
-  void insert(const Polygon_with_holes_2& pgn_with_holes)
-  {
-    ValidationPolicy::is_valid(pgn_with_holes, *m_traits);
-    _insert(pgn_with_holes, *m_arr);
-  }
-  
-  // insert a range of polygons that can be either simple polygons
-  // or polygons with holes
-  // precondition: the polygons are disjoint and simple
-  template <typename PolygonIterator>
-  void insert(PolygonIterator pgn_begin, PolygonIterator pgn_end);
-
-
-  // insert two ranges of : the first one for simple polygons,
-  // the second one for polygons with holes
-  // precondition: the first range is disjoint simple polygons 
-  //               the second range is disjoint polygons with holes
-  template <typename PolygonIterator, typename PolygonWithHolesIterator>
-  void insert(PolygonIterator pgn_begin, PolygonIterator pgn_end,
-              PolygonWithHolesIterator pgn_with_holes_begin,
-              PolygonWithHolesIterator pgn_with_holes_end);
-
-  // test for intersection with a simple polygon
-  bool do_intersect(const Polygon_2 &pgn) const
-  {
-    ValidationPolicy::is_valid(pgn,*m_traits);
-    Self other(pgn);
-    return (do_intersect(other));
-  }
-
-  // test for intersection with a polygon with holes
-  bool do_intersect(const Polygon_with_holes_2& pgn_with_holes) const
-  {
-    ValidationPolicy::is_valid(pgn_with_holes, *m_traits);
-    Self other(pgn_with_holes);
-    return (do_intersect(other));
-  }
-
-  //test for intersection with another Gps_on_surface_base_2 object
-  bool do_intersect(const Self& other) const
-  {
-    if (this->is_empty() || other.is_empty())
-      return false;
-
-    if (this->is_plane() || other.is_plane())
-      return true;
-    
-    Aos_2 res_arr;
-
-    Gps_do_intersect_functor<Aos_2>  func;
-    overlay(*m_arr, *(other.m_arr), res_arr, func);
-    return func.found_reg_intersection();
-  }
-
-  // intersection with a simple polygon
-  void intersection(const Polygon_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _intersection(pgn);
-  }
-
-  // intersection with a polygon with holes
-  void intersection(const Polygon_with_holes_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _intersection(pgn);
-  }
-
-  //intersection with another Gps_on_surface_base_2 object
-  void intersection(const Self& other)
-  {
-    _intersection(other);
-  }
-
-  void intersection(const Self& gps1, const Self& gps2)
-  {
-    this->clear();
-    _intersection(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
-  }
-
-
-  // join with a simple polygon
-  void join(const Polygon_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _join(pgn);
-  }
-
-  // join with a polygon with holes
-  void join(const Polygon_with_holes_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _join(pgn);
-  }
-
-  //join with another Gps_on_surface_base_2 object
-  void join(const Self& other)
-  {
-    _join(other);
-  }
-
-  void join(const Self& gps1, const Self& gps2)
-  {
-    this->clear();
-    _join(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
-  }
-
-  // difference with a simple polygon
-  void difference (const Polygon_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _difference(pgn);
-  }
-
-  // difference with a polygon with holes
-  void difference (const Polygon_with_holes_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _difference(pgn);
-  }
-  
-  //difference with another Gps_on_surface_base_2 object
-  void difference (const Self& other)
-  {
-    _difference(other);
-  }
-
-  void difference(const Self& gps1, const Self& gps2)
-  {
-    this->clear();
-    _difference(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
-  }
-
-
-  // symmetric_difference with a simple polygon
-  void symmetric_difference(const Polygon_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _symmetric_difference(pgn);
-  }
-
-  // symmetric_difference with a polygon with holes
-  void symmetric_difference(const Polygon_with_holes_2& pgn)
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    _symmetric_difference(pgn);
-  }
-
-  //symmetric_difference with another Gps_on_surface_base_2 object
-  void symmetric_difference(const Self& other)
-  {
-    _symmetric_difference(other);
-  }
-
-  void symmetric_difference(const Self& gps1, const Self& gps2)
-  {
-    this->clear();
-    _symmetric_difference(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
-  }
-
-
-  void complement()
-  {
-    this->_complement(m_arr);
-  }
-
-  void complement(const Self& other)
-  {
-    *(this->m_arr) = *(other.m_arr);
-    this->complement();
-  }
-
-  void fix_curves_direction()
-  {
-    _fix_curves_direction(*m_arr);
-  }
-         
-  Size number_of_polygons_with_holes() const;
-
-  Traits_2& traits()
-  {
-    return *m_traits;
-  }
-
-  const Traits_2& traits() const
-  {
-    return *m_traits;
-  }
-
-  bool is_empty() const
-  {
-    // We have to check that all the faces of an empty arrangement are not
-    // conained in the polygon set (there can be several faces in an empty
-    // arrangement, dependant on the topology traits.
-    // The point is that if the arrangement is "empty" (meaning that no curve
-    // or point were inserted and that it is in its original state) then 
-    // all the faces (created by the topology traits) should have the same
-    // result for contained() --- from Boolean operations point of view there
-    // can not be an empty arrangement which has serveral faces with different
-    // attributes.
-    return (m_arr->is_empty() && !m_arr->faces_begin()->contained());
-  }
-
-  bool is_plane() const
-  {
-    // Same comment as in "is_empty" above, just with adjustments.
-    return (m_arr->is_empty() &&  m_arr->faces_begin()->contained());
-  }
-
-  void clear()
-  {
-    m_arr->clear();
-  }
-
-  
-  Oriented_side oriented_side(const Point_2& q) const
-  {
-    Point_location pl(*m_arr);
-
-    Object obj = pl.locate(q);
-    Face_const_iterator f;
-    if (CGAL::assign(f, obj))
-    {
-      if (f->contained())
-        return ON_POSITIVE_SIDE;
-
-      return ON_NEGATIVE_SIDE ;
-    }  
-    return ON_ORIENTED_BOUNDARY ;
-  }
-
-  Oriented_side oriented_side(const Polygon_2& pgn) const
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    Self other(pgn);
-    return (oriented_side(other));
-  }
-
-  Oriented_side oriented_side(const Polygon_with_holes_2& pgn) const
-  {
-    ValidationPolicy::is_valid(pgn, *m_traits);
-    Self other(pgn);
-    return (oriented_side(other));
-  }
-
-  Oriented_side oriented_side(const Self& other) const
-  {
-    if (this->is_empty() || other.is_empty())
-      return ON_NEGATIVE_SIDE;
-
-    if (this->is_plane() || other.is_plane())
-      return ON_POSITIVE_SIDE;
-    
-    Aos_2 res_arr;
-
-    Gps_do_intersect_functor<Aos_2>  func;
-    overlay(*m_arr, *(other.m_arr), res_arr, func);
-    if (func.found_reg_intersection())
-      return ON_POSITIVE_SIDE;
-    
-    if (func.found_boundary_intersection())
-      return ON_ORIENTED_BOUNDARY;
-
-    return ON_NEGATIVE_SIDE;
-  }
-
-
-  // returns the location of the query point
-  bool locate(const Point_2& q, Polygon_with_holes_2& pgn) const;
-
-  /*! Obtain a const reference to the underlying arrangement
-   * \return the underlying arrangement.
-   */
-  const Aos_2& arrangement() const
-  {
-    return *m_arr;
-  }
-
-  /*! Obtain a reference to the underlying arrangement
-   * \return the underlying arrangement.
-   */
-  Aos_2& arrangement()
-  {
-    return *m_arr;
-  }
-  
-protected:
-  
-  bool _is_valid(Aos_2& arr) {
-    if (!CGAL::is_valid(arr))
-      return false;
-
-    Compare_endpoints_xy_2 cmp_endpoints =
-      m_traits->compare_endpoints_xy_2_object();
-
-    for (Edge_const_iterator eci = arr.edges_begin();
-         eci != arr.edges_end();
-         ++eci)
-    {
-      Halfedge_const_handle he = eci;
-      if (he->face() == he->twin()->face())
-      {
-        return false;
-      }
-      if (he->face()->contained() == he->twin()->face()->contained())
-      {
-        return false;
-      }
-
-      const X_monotone_curve_2&  cv = he->curve();
-      const bool                 is_cont = he->face()->contained();
-      const Comparison_result    he_res = 
-        ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT) ?
-        SMALLER : LARGER;
-      const bool                 has_same_dir = (cmp_endpoints(cv) == he_res);
-
-      if ((is_cont && !has_same_dir) || (!is_cont && has_same_dir)) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-public:
-
-  /*! */
-  bool is_valid()
-  {
-    return _is_valid(*this->m_arr);
-  }
-
-  // get the simple polygons, takes O(n)
-  template <typename OutputIterator>
-  OutputIterator polygons_with_holes(OutputIterator out) const;
-
-  // test for intersection of a range of polygons
-  template <typename InputIterator>
-  bool do_intersect(InputIterator begin, InputIterator end, unsigned int k = 5)
-  {
-    Self other(*this);
-    other.intersection(begin, end, k);
-    return (other.is_empty());
-  }
-
-  template <typename InputIterator1, typename InputIterator2>
-  bool do_intersect(InputIterator1 begin1, InputIterator1 end1,
-                    InputIterator2 begin2, InputIterator2 end2,
-                    unsigned int k = 5)
-  {
-    Self other(*this);
-    other.intersection(begin1, end1, begin2, end2, k);
-    return (other.is_empty());
-  }
-
-  // join a range of polygons
-  template <typename InputIterator>
-  void join(InputIterator begin, InputIterator end, unsigned int k = 5)
-  {
-    typename std::iterator_traits<InputIterator>::value_type pgn;
-    this->join(begin, end, pgn, k);
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-
-  // join range of simple polygons
-  // 5 is the magic number in which we switch to a sweep-based algorithm
-  // instead of a D&C algorithm. This point should be further studies, as
-  // it is hard to believe that this is the best value for all applications.
-  template <typename InputIterator>
-  inline void join(InputIterator begin, InputIterator end, Polygon_2&,
-                   unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
- 
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    for (InputIterator itr = begin; itr != end; ++itr, ++i)
-    {
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-
-    Join_merge<Aos_2> join_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
-  
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-
-  //join range of polygons with holes (see previous comment about k=5).
-  template <typename InputIterator>
-  inline void join(InputIterator begin, InputIterator end,
-                   Polygon_with_holes_2&, unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
-    arr_vec[0].first = this->m_arr;
- 
-    unsigned int i = 1;
-    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
-    {
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-
-    Join_merge<Aos_2> join_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
-
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-
-  // (see previous comment about k=5).
-  template <typename InputIterator1, typename InputIterator2>
-  inline void join(InputIterator1 begin1, InputIterator1 end1,
-                   InputIterator2 begin2, InputIterator2 end2,
-                   unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
-                                    std::distance(begin2, end2)+1);
- 
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
-    {
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr1, *(arr_vec[i].first));
-    }
-    
-    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
-    {
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr2, *(arr_vec[i].first));
-    }
-
-    Join_merge<Aos_2> join_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
-
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-
-
-  // intersect range of polygins (see previous comment about k=5).
-  template <typename InputIterator>
-  inline void intersection(InputIterator begin, InputIterator end,
-                           unsigned int k = 5)
-  {
-    typename std::iterator_traits<InputIterator>::value_type pgn;
-    this->intersection(begin, end, pgn, k);
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-  
-  
-  // intersect range of simple polygons
-  template <typename InputIterator>
-  inline void intersection(InputIterator begin, InputIterator end,
-                           Polygon_2&, unsigned int k)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
-    {
-      ValidationPolicy::is_valid((*itr), *m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-    
-    Intersection_merge<Aos_2> intersection_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-  
-  //intersect range of polygons with holes
-  template <typename InputIterator>
-  inline void intersection(InputIterator begin, InputIterator end,
-                           Polygon_with_holes_2&, unsigned int k)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
-    {
-      ValidationPolicy::is_valid((*itr), *m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-    
-    Intersection_merge<Aos_2> intersection_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-  
-  
-  template <typename InputIterator1, typename InputIterator2>
-  inline void intersection(InputIterator1 begin1, InputIterator1 end1,
-                           InputIterator2 begin2, InputIterator2 end2,
-                           unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
-                                    std::distance(begin2, end2)+1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
-    {
-      ValidationPolicy::is_valid(*itr1, *m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr1, *(arr_vec[i].first));
-    }
-    
-    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
-    {
-      ValidationPolicy::is_valid(*itr2,*m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr2, *(arr_vec[i].first));
-    }
-    
-    Intersection_merge<Aos_2> intersection_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-  
-  
-  
-  // symmetric_difference of a range of polygons (similar to xor)
-  // (see previous comment about k=5).
-  template <typename InputIterator>
-    inline void symmetric_difference(InputIterator begin, InputIterator end,
-                                     unsigned int k = 5)
-  {
-    typename std::iterator_traits<InputIterator>::value_type pgn;
-    this->symmetric_difference(begin, end, pgn, k);
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-  
-  
-  // intersect range of simple polygons (see previous comment about k=5).
-  template <typename InputIterator>
-  inline void symmetric_difference(InputIterator begin, InputIterator end,
-                                   Polygon_2&, unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
-    {
-      ValidationPolicy::is_valid(*itr,*m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-    
-    Xor_merge<Aos_2> xor_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-  
-  //intersect range of polygons with holes (see previous comment about k=5).
-  template <typename InputIterator>
-    inline void symmetric_difference(InputIterator begin, InputIterator end,
-                                     Polygon_with_holes_2&, unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
-    {
-      ValidationPolicy::is_valid(*itr,*m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr, *(arr_vec[i].first));
-    }
-    
-    Xor_merge<Aos_2> xor_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-  }
-  
-  // (see previous comment about k=5).
-  template <typename InputIterator1, typename InputIterator2>
-  inline void symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
-                                   InputIterator2 begin2, InputIterator2 end2,
-                                   unsigned int k = 5)
-  {
-    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
-                                    std::distance(begin2, end2)+1);
-    arr_vec[0].first = this->m_arr;
-    unsigned int i = 1;
-    
-    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
-    {
-      ValidationPolicy::is_valid(*itr1, *m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr1, *(arr_vec[i].first));
-    }
-    
-    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
-    {
-      ValidationPolicy::is_valid(*itr2, *m_traits);
-      arr_vec[i].first = new Aos_2(m_traits);
-      _insert(*itr2, *(arr_vec[i].first));
-    }
-    
-    Xor_merge<Aos_2> xor_merge;
-    _build_sorted_vertices_vectors (arr_vec);
-    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
-    
-    //the result arrangement is at index 0
-    this->m_arr = arr_vec[0].first;
-    delete arr_vec[0].second;
-    this->remove_redundant_edges();
-    this->_reset_faces();
-  }
-  
-  static void construct_polygon(Ccb_halfedge_const_circulator ccb,
-                                Polygon_2 & pgn, Traits_2 * tr);
-  
-  bool is_hole_of_face(Face_const_handle f, Halfedge_const_handle he) const;
-  
-  Ccb_halfedge_const_circulator
-  get_boundary_of_polygon(Face_const_iterator f) const;
-  
-  void remove_redundant_edges()
-  {
-    this->_remove_redundant_edges(m_arr);
-  }
-  
-protected:
-  
-  void _remove_redundant_edges(Aos_2* arr)
-  {
-    for (Edge_iterator itr = arr->edges_begin(); itr != arr->edges_end(); )
-    {
-      Halfedge_handle he = itr;
-      if (he->face()->contained() == he->twin()->face()->contained())
-      {
-        Edge_iterator next = itr;
-        ++next;
-        arr->remove_edge(he);
-        itr = next;
-      }
-      else
-        ++itr;
-    }
-  }
-  
-  class Less_vertex_handle
-  {
-    typename Traits_2::Compare_xy_2     comp_xy;
-    
-  public:
-    
-    Less_vertex_handle (const typename Traits_2::Compare_xy_2& cmp) :
-    comp_xy (cmp)
-    {}
-    
-    bool operator() (Vertex_handle v1, Vertex_handle v2) const
-    {
-      return (comp_xy (v1->point(), v2->point()) == SMALLER);
-    }
-  };
-  
-
-  void _complement(Aos_2* arr)
-  {
-    for (Face_iterator fit = arr->faces_begin();
-         fit != arr->faces_end();
-         ++fit)
-    {
-      fit->set_contained(!fit->contained());
-    }
-
-    Construct_opposite_2 ctr_opp = m_traits->construct_opposite_2_object();
-    for (Edge_iterator eit = arr->edges_begin();
-         eit != arr->edges_end();
-         ++eit)
-    {
-      Halfedge_handle he = eit;
-      const X_monotone_curve_2& cv = he->curve();
-      arr->modify_edge(he, ctr_opp(cv));
-    }
-  }
-
-  //fix the directions of the curves (given correct marked face)
-  // it should be called mostly after  symmetric_difference.
-  void _fix_curves_direction(Aos_2& arr)
-  {
-    Compare_endpoints_xy_2 cmp_endpoints =
-      arr.geometry_traits()->compare_endpoints_xy_2_object();
-    Construct_opposite_2 ctr_opp = 
-      arr.geometry_traits()->construct_opposite_2_object();
-
-    for (Edge_iterator eit = arr.edges_begin();
-         eit != arr.edges_end();
-         ++eit)
-    {
-      Halfedge_handle            he = eit;
-      const X_monotone_curve_2&  cv = he->curve();
-      const bool                 is_cont = he->face()->contained();
-      const Comparison_result    he_res = 
-        ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT) ?
-        SMALLER : LARGER;
-      const bool                 has_same_dir = (cmp_endpoints(cv) == he_res);
-      
-      if ((is_cont && !has_same_dir) || (!is_cont && has_same_dir)) {
-        arr.modify_edge(he, ctr_opp(cv));
-      }
-    }
-  }
-
-  void _build_sorted_vertices_vectors (std::vector<Arr_entry>& arr_vec)
-  {
-    Less_vertex_handle    comp (m_traits->compare_xy_2_object());
-    Aos_2                 *p_arr;
-    Vertex_iterator       vit;
-    const std::size_t     n = arr_vec.size();
-    std::size_t           i, j;
-    
-    for (i = 0; i < n; i++)
-    {
-      // Allocate a vector of handles to all vertices in the current
-      // arrangement.
-      p_arr = arr_vec[i].first;
-      arr_vec[i].second = new std::vector<Vertex_handle>;
-      arr_vec[i].second->resize (p_arr->number_of_vertices());
-      
-      for (j = 0, vit = p_arr->vertices_begin();
-           vit != p_arr->vertices_end();
-           j++, ++vit)
-      {
-        (*(arr_vec[i].second))[j] = vit;
-      }
-      
-      // Sort the vector.
-      std::sort (arr_vec[i].second->begin(), arr_vec[i].second->end(), comp);
-    }
-  }
-  
-  template <class Merge>
-  void _divide_and_conquer (unsigned int lower, unsigned int upper,
-                            std::vector<Arr_entry>& arr_vec,
-                            unsigned int k, Merge merge_func)
-  {
-    if ((upper - lower) < k)
-    {
-      merge_func(lower, upper, 1, arr_vec);
-      return;
-    }
-    
-    unsigned int sub_size = ((upper - lower + 1) / k);
-    unsigned int i = 0;
-    unsigned int curr_lower = lower;
-    
-    for (; i<k-1; ++i, curr_lower += sub_size )
-    {
-      _divide_and_conquer(curr_lower, curr_lower + sub_size-1, arr_vec, k,
-                          merge_func);
-    }
-    _divide_and_conquer (curr_lower, upper,arr_vec, k, merge_func);
-    merge_func (lower, curr_lower, sub_size ,arr_vec);
-    
-    return;
-  }
-  
-  // mark all faces as non-visited
-  void _reset_faces() const
-  {
-    _reset_faces(m_arr);
-  }
-  
-  void _reset_faces(Aos_2* arr) const
-  {
-    Face_const_iterator fit = arr->faces_begin();
-    for ( ; fit != arr->faces_end(); ++fit)
-    {
-      fit->set_visited(false);
-    }
-  }
-
-
-  void _insert(const Polygon_2& pgn, Aos_2& arr);
-  
-  // The function below is public because
-  // are_holes_and_boundary_pairwise_disjoint of Gps_polygon_validation is
-  // using it.
-  // I have tried to define it as friend function, but with no success
-  // (probably did something wrong with templates and friend.) Besides,
-  // it was like this before I touched it, so I did not have the energy.
-public:  
-  void _insert(const Polygon_with_holes_2& pgn, Aos_2& arr);
-  
-protected:
-  template<typename PolygonIter>
-  void _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_2& pgn);
-  
-  template<typename PolygonIter>
-  void _insert(PolygonIter p_begin, PolygonIter p_end,
-               Polygon_with_holes_2& pgn);
-  
-  template <typename OutputIterator>
-  void _construct_curves(const Polygon_2& pgn, OutputIterator oi);
-  
-  template <typename OutputIterator>
-  void _construct_curves(const Polygon_with_holes_2& pgn, OutputIterator oi);
-  
-  
-  bool _is_empty(const Polygon_2& pgn) const
-  {
-    const std::pair<Curve_const_iterator, Curve_const_iterator>& itr_pair = 
-      m_traits->construct_curves_2_object()(pgn);
-    return (itr_pair.first == itr_pair.second);
-  }
-  
-  bool _is_empty(const Polygon_with_holes_2& ) const
-  {
-    return (false);
-  }
-  
-  bool _is_plane(const Polygon_2& ) const
-  {
-    return (false);
-  }
-  
-  bool _is_plane(const Polygon_with_holes_2& pgn) const
-  {
-    //typedef typename  Traits_2::Is_unbounded  Is_unbounded;
-    bool unbounded = m_traits->construct_is_unbounded_object()(pgn);
-    std::pair<GP_Holes_const_iterator, 
-      GP_Holes_const_iterator> pair = 
-      m_traits->construct_holes_object()(pgn);
-    return (unbounded && (pair.first == pair.second));
-    //used to return
-    //  (pgn.is_unbounded() && (pgn.holes_begin() == pgn.holes_end()))
-  }
-  
-  void _intersection(const Aos_2& arr)
-  {
-    Aos_2* res_arr = new Aos_2(m_traits);
-    Gps_intersection_functor<Aos_2> func;
-    overlay(*m_arr, arr, *res_arr, func);
-    delete m_arr; // delete the previous arrangement
-    
-    m_arr = res_arr;
-    remove_redundant_edges();
-    //fix_curves_direction(); // not needed for intersection
-    CGAL_assertion(is_valid());
-  }
-  
-  void _intersection(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res) 
-  {
-    Gps_intersection_functor<Aos_2> func;
-    overlay(arr1, arr2, res, func);
-    _remove_redundant_edges(&res);
-    //_fix_curves_direction(res); // not needed for intersection
-    CGAL_assertion(_is_valid(res));
-  }
-  
-  template <class Polygon_>
-  void _intersection(const Polygon_& pgn)
-  {
-    if (_is_empty(pgn))
-      this->clear();
-    if (_is_plane(pgn)) return;
-    if (this->is_empty()) return;
-    if (this->is_plane())
-    {
-      Aos_2* arr = new Aos_2(m_traits);
-      _insert(pgn, *arr);
-      delete (this->m_arr);
-      this->m_arr = arr;
-      return;
-    }
-    
-    Aos_2 second_arr;
-    _insert(pgn, second_arr);
-    _intersection(second_arr);
-  }
-  
-  void _intersection(const Self& other)
-  {
-    if (other.is_empty())
-    {
-      m_arr->clear();
-      return;
-    }
-    if (other.is_plane()) return;
-    if (this->is_empty()) return;
-    if (this->is_plane())
-    {
-      *(this->m_arr) = *(other.m_arr);
-      return;
-    }
-    
-    _intersection(*(other.m_arr));
-  }
-  
-  void _join(const Aos_2& arr)
-  {
-    Aos_2* res_arr = new Aos_2(m_traits);
-    Gps_join_functor<Aos_2> func;
-    overlay(*m_arr, arr, *res_arr, func);
-    delete m_arr; // delete the previous arrangement
-    
-    m_arr = res_arr;
-    remove_redundant_edges();
-    //fix_curves_direction(); // not needed for join
-    CGAL_assertion(is_valid());
-  }
-  
-  void _join(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res) 
-  {
-    Gps_join_functor<Aos_2> func;
-    overlay(arr1, arr2, res, func);
-    _remove_redundant_edges(&res);
-    //_fix_curves_direction(res); // not needed for join
-    CGAL_assertion(_is_valid(res));
-  }
-  
-  template <class Polygon_>
-  void _join(const Polygon_& pgn)
-  {
-    if (_is_empty(pgn)) return;
-    if (_is_plane(pgn))
-    {
-      this->clear();
-      
-      // Even in an empty arrangement there can be several faces
-      // (because of the topology traits).
-      for (Face_iterator fit = this->m_arr->faces_begin();
-           fit != this->m_arr->faces_end(); ++fit)
-        fit->set_contained(true);
-      return;
-    }
-    if (this->is_empty())
-    {
-      Aos_2* arr = new Aos_2(m_traits);
-      _insert(pgn, *arr);
-      delete (this->m_arr);
-      this->m_arr = arr;
-      return;
-    }
-    if (this->is_plane()) return;
-    
-    Aos_2 second_arr;
-    _insert(pgn, second_arr);
-    _join(second_arr);
-  }
-  
-  
-  void _join(const Self& other)
-  {
-    if (other.is_empty()) return;
-    if (other.is_plane())
-    {
-      this->clear();
-
-      // Even in an empty arrangement there can be several faces
-      // (because of the topology traits).
-      for (Face_iterator fit = this->m_arr->faces_begin();
-           fit != this->m_arr->faces_end(); ++fit)
-        fit->set_contained(true);
-      return;
-    }
-    if (this->is_empty())
-    {
-      *(this->m_arr) = *(other.m_arr);
-      return;
-    }
-    if (this->is_plane()) return;
-    _join(*(other.m_arr));
-  }
-  
-  void _difference(const Aos_2& arr)
-  {
-    Aos_2* res_arr = new Aos_2(m_traits);
-    Gps_difference_functor<Aos_2> func;
-    overlay(*m_arr, arr, *res_arr, func);
-    delete m_arr; // delete the previous arrangement
-    
-    m_arr = res_arr;
-    remove_redundant_edges();
-    fix_curves_direction();
-    CGAL_assertion(is_valid());
-  }
-  
-  void _difference(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res) 
-  {
-    Gps_difference_functor<Aos_2> func;
-    overlay(arr1, arr2, res, func);
-    _remove_redundant_edges(&res);
-    _fix_curves_direction(res);
-    CGAL_assertion(_is_valid(res));
-  }
-  
-  template <class Polygon_>
-  void _difference(const Polygon_& pgn)
-  {
-    if (_is_empty(pgn)) return;
-    if (_is_plane(pgn))
-    {
-      this->clear();
-      return;
-    }
-    if (this->is_empty()) return;    
-    if (this->is_plane())
-    {
-      Aos_2* arr = new Aos_2(m_traits);
-      _insert(pgn, *arr);
-      delete (this->m_arr);
-      this->m_arr = arr;
-      this->complement();
-      return;
-    }
-    
-    Aos_2 second_arr;
-    _insert(pgn, second_arr);
-    _difference(second_arr);
-  }
-  
-  
-  void _difference(const Self& other)
-  {
-    if (other.is_empty()) return;
-    if (other.is_plane())
-    {
-      this->clear();
-      return;
-    }
-    if (this->is_empty()) return;
-    if (this->is_plane())
-    {
-      *(this->m_arr) = *(other.m_arr);
-      this->complement();
-      return;
-    }
-    
-    _difference(*(other.m_arr));
-  }
-  
-  void _symmetric_difference(const Aos_2& arr)
-  {
-    Aos_2* res_arr = new Aos_2(m_traits);
-    Gps_sym_diff_functor<Aos_2> func;
-    overlay(*m_arr, arr, *res_arr, func);
-    delete m_arr; // delete the previous arrangement
-    
-    m_arr = res_arr;
-    remove_redundant_edges();
-    fix_curves_direction();
-    CGAL_assertion(is_valid());
-  }
-  
-  void _symmetric_difference(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res) 
-  {
-    Gps_sym_diff_functor<Aos_2> func;
-    overlay(arr1, arr2, res, func);
-    _remove_redundant_edges(&res);
-    _fix_curves_direction(res);
-    CGAL_assertion(_is_valid(res));
-  }
-  
-  template <class Polygon_>
-  void _symmetric_difference(const Polygon_& pgn)
-  {
-    if (_is_empty(pgn)) return;
-    
-    if (_is_plane(pgn))
-    {
-      this->complement();
-      return;
-    }
-    if (this->is_empty())
-    {
-      Aos_2* arr = new Aos_2(m_traits);
-      _insert(pgn, *arr);
-      delete (this->m_arr);
-      this->m_arr = arr;
-      return;
-    }
-    
-    if (this->is_plane())
-    {
-      Aos_2* arr = new Aos_2(m_traits);
-      _insert(pgn, *arr);
-      delete (this->m_arr);
-      this->m_arr = arr;
-      this->complement();
-      return;
-    }
-    
-    Aos_2 second_arr;
-    _insert(pgn, second_arr);
-    _symmetric_difference(second_arr);
-  }
-  
-  
-  void _symmetric_difference(const Self& other)
-  {
-    if (other.is_empty()) return;
-    
-    if (other.is_plane())
-    {
-      this->complement();
-      return;
-    }
-    if (this->is_empty())
-    {
-      *(this->m_arr) = *(other.m_arr);
-      return;
-    }
-    
-    if (this->is_plane())
-    {
-      *(this->m_arr) = *(other.m_arr);
-      this->complement();
-      return;
-    }
-    
-    _symmetric_difference(*(other.m_arr));
-  }
-};
-
-#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h>
-
-} //namespace CGAL
-
-#endif // CGAL_GPS_ON_SURFACE_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h
deleted file mode 100644
index f663060..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h
+++ /dev/null
@@ -1,793 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
-//                 Guy Zucker <guyzucke at post.tau.ac.il>
-
-#ifndef CGAL_GPS_ON_SURFACE_BASE_2_IMPL_H
-#define CGAL_GPS_ON_SURFACE_BASE_2_IMPL_H
-
-#include <CGAL/iterator.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/circulator.h>
-#include <CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h>
-#include <CGAL/Arr_accessor.h>
-
-#include <queue>
-#include <list>
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-void Gps_on_surface_base_2<Traits_, TopTraits_,ValidationPolicy>::
-construct_polygon(Ccb_halfedge_const_circulator ccb, Polygon_2 & pgn,
-                  Traits_ * tr)
-{
-  typedef CGAL::Ccb_curve_iterator<Arrangement_on_surface_2>
-    Ccb_curve_iterator;
-  Ccb_curve_iterator begin(ccb, false);
-  Ccb_curve_iterator end(ccb, true);
-
-  tr->construct_polygon_2_object()(begin, end, pgn);
-}
-
-// The comments below was written after trying to understand what the visitors
-// do. There was no comment by the author of this class.
-// This class is used afterwards to extract polygons from the representing
-// arrangement.
-// This scanner is not the same as the Gps_bfs_scanner. In this file, the
-// Gps_bfs_scanner is used with Init_faces_visitor to init the faces of the
-// representing arrangement.
-// It seems that Gps_bfs_scanner is used for a regular bfs scan on the faces
-// of the arrangements, with comparison to Arr_bfs_scanner that cares about
-// inner ccbs and outer ccbs (it treats them differently).
-// If this is the case, we should unite Gps_bfs_scanner with the regular
-// adaptation of arrangement to boost graph.
-template <class Arrangement, class OutputIterator>
-class Arr_bfs_scanner
-{
-public:
-  typedef typename Arrangement::Geometry_traits_2       Gps_traits;
-  typedef typename Arrangement::Topology_traits         Gps_top_traits;
-  typedef typename Gps_traits::Polygon_2                Polygon_2;
-  typedef typename Gps_traits::Polygon_with_holes_2     Polygon_with_holes_2;
-  typedef typename Arrangement::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-  typedef typename Arrangement::Face_const_iterator     Face_const_iterator;
-  typedef typename Arrangement::Halfedge_const_iterator Halfedge_const_iterator;
-  typedef typename Arrangement::Outer_ccb_const_iterator
-    Outer_ccb_const_iterator;
-  typedef typename Arrangement::Inner_ccb_const_iterator
-    Inner_ccb_const_iterator;
-
-
-protected:
-
-  Gps_traits*                            m_traits;
-  std::queue<Face_const_iterator>        m_holes_q;
-  std::list<Polygon_2>                   m_pgn_holes;
-  OutputIterator                         m_oi;
-
-public:
-
-  /*! Constructor */
-  Arr_bfs_scanner(Gps_traits* tr, OutputIterator oi) : m_traits(tr), m_oi(oi)
-  {}
-
-
-  void scan(Arrangement& arr)
-  {
-    Face_const_iterator   ubf;
-    for (ubf = arr.faces_begin(); ubf != arr.faces_end(); ++ubf)
-    {
-      if (ubf->number_of_outer_ccbs() != 0)
-        continue;
-      if (ubf->visited())
-        continue;
-
-      Inner_ccb_const_iterator  holes_it;
-      if (!ubf->contained())
-      {
-        ubf->set_visited(true);
-        for (holes_it = ubf->inner_ccbs_begin();
-             holes_it != ubf->inner_ccbs_end(); ++holes_it)
-        {
-          scan_ccb (*holes_it);
-        }
-      }
-      else
-      {
-        // ubf is contained -> unbounded polygon !!
-        scan_contained_ubf(ubf);
-
-      }
-
-      while(!m_holes_q.empty())
-      {
-        Face_const_iterator top_f = m_holes_q.front();
-        m_holes_q.pop();
-        top_f->set_visited(true);
-        for (holes_it = top_f->inner_ccbs_begin();
-             holes_it != top_f->inner_ccbs_end(); ++holes_it)
-        {
-          scan_ccb(*holes_it);
-        }
-
-        //scan_uncontained_face(top_f->outer_ccb());
-      }
-    }
-
-    Face_const_iterator   fit;
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-    {
-      fit->set_visited(false);
-    }
-  }
-
-  OutputIterator output_iterator() const
-  {
-    return m_oi;
-  }
-
-  void scan_ccb(Ccb_halfedge_const_circulator ccb)
-  {
-
-    Polygon_2 pgn_boundary;
-    Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
-      construct_polygon(ccb, pgn_boundary, m_traits);
-
-    Ccb_halfedge_const_circulator ccb_end = ccb;
-    do
-    {
-      Halfedge_const_iterator he = ccb;
-      if (!he->twin()->face()->visited())
-        all_incident_faces(he->twin()->face());
-      ++ccb;
-    }
-    while(ccb != ccb_end);
-    Polygon_with_holes_2 pgn =
-      m_traits->construct_polygon_with_holes_2_object()(pgn_boundary,
-                                                        m_pgn_holes.begin(),
-                                                        m_pgn_holes.end());
-    /*Polygon_with_holes_2 pgn(pgn_boundary,
-                             m_pgn_holes.begin(),
-                             m_pgn_holes.end());*/
-    *m_oi = pgn;
-    ++m_oi;
-    m_pgn_holes.clear();
-  }
-
-  void scan_contained_ubf(Face_const_iterator ubf)
-  {
-    CGAL_assertion(ubf->number_of_outer_ccbs() == 0 && ubf->contained());
-    // ubf is contained -> unbounded polygon !!
-    all_incident_faces(ubf);
-    Polygon_2 boundary;
-    Polygon_with_holes_2 pgn =
-      m_traits->construct_polygon_with_holes_2_object()(boundary,
-                                                        m_pgn_holes.begin(),
-                                                        m_pgn_holes.end());
-    /*Polygon_with_holes_2 pgn(boundary,
-                             m_pgn_holes.begin(),
-                             m_pgn_holes.end());*/
-    *m_oi = pgn;
-    ++m_oi;
-    m_pgn_holes.clear();
-  }
-
-
-  void all_incident_faces(Face_const_iterator f)
-  {
-    CGAL_assertion(!f->visited());
-    f->set_visited(true);
-    if (f->number_of_outer_ccbs() != 0)
-    {
-      if (!f->contained())
-      {
-        for (Outer_ccb_const_iterator oci = f->outer_ccbs_begin();
-             oci != f->outer_ccbs_end(); ++oci)
-        {
-          m_pgn_holes.push_back(Polygon_2());
-          Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
-            construct_polygon(*oci, m_pgn_holes.back(), m_traits);
-        }
-
-        m_holes_q.push(f);
-      }
-
-
-      for (Outer_ccb_const_iterator oci = f->outer_ccbs_begin();
-           oci != f->outer_ccbs_end(); ++oci)
-      {
-        Ccb_halfedge_const_circulator ccb_end = *oci;
-        Ccb_halfedge_const_circulator ccb_circ = ccb_end;
-        do
-        {
-          //get the current halfedge on the face boundary
-          Halfedge_const_iterator he  = ccb_circ;
-          Face_const_iterator new_f = he->twin()->face();
-          if (!new_f->visited())
-          {
-            all_incident_faces(new_f);
-          }
-          ++ccb_circ;
-        }
-        while(ccb_circ != ccb_end);
-      }
-    }
-
-    if (f->contained())
-    {
-      Inner_ccb_const_iterator hit;
-      for(hit = f->inner_ccbs_begin(); hit != f->inner_ccbs_end(); ++hit)
-      {
-        Ccb_halfedge_const_circulator ccb_of_hole = *hit;
-        Halfedge_const_iterator he = ccb_of_hole;
-        if (is_single_face(ccb_of_hole))
-        {
-          CGAL_assertion(!he->twin()->face()->contained());
-
-          m_pgn_holes.push_back(Polygon_2());
-          Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
-            construct_polygon(he->twin()->face()->outer_ccb(),
-                              m_pgn_holes.back(), m_traits);
-          m_holes_q.push(he->twin()->face());
-        }
-        else
-        {
-          Ccb_halfedge_const_circulator ccb_end = ccb_of_hole;
-          do
-          {
-            Halfedge_const_iterator he = ccb_of_hole;
-            if (!he->twin()->face()->visited())
-              all_incident_faces(he->twin()->face());
-            ++ccb_of_hole;
-          }
-          while(ccb_of_hole != ccb_end);
-        }
-      }
-    }
-  }
-
-  bool is_single_face(Ccb_halfedge_const_circulator ccb)
-  {
-    Ccb_halfedge_const_circulator ccb_end = ccb;
-    Ccb_halfedge_const_circulator ccb_circ = ccb_end;
-    Halfedge_const_iterator he = ccb;
-    Face_const_iterator curr_f = he->twin()->face();
-    do
-    {
-      //get the current halfedge on the face boundary
-      Halfedge_const_iterator he  = ccb_circ;
-      if (he->twin()->face() != curr_f)
-        return false;
-      if (he->twin()->target()->degree() != 2)
-        return false;
-      ++ccb_circ;
-    }
-    while(ccb_circ != ccb_end);
-    return true;
-  }
-};
-
-
-template <class Arrangement>
-class Init_faces_visitor
-{
-  typedef typename Arrangement::Face_iterator             Face_iterator;
-  typedef typename Arrangement::Halfedge_iterator         Halfedge_iterator;
-
-public:
-
-  //! discovered_face
-/*! discovered_face is called by Gps_bfs_scanner when it reveals a new face
-    during a BFS scan. It is important to say that I have a strong suspition
-    that this place is the reason why discovered_face was once called
-    "flip_face" (WTF?)
-  \param old_f The face that was already revealed
-  \param new_f The face that we have just now revealed
-*/
-  void discovered_face(Face_iterator old_f,
-                       Face_iterator new_f,
-                       Halfedge_iterator /*he*/)
-  {
-    new_f->set_contained(!old_f->contained());
-  }
-};
-
-//! _insert
-/*! The function inserts a polygon into an arrangement, assuming that the
-    polygon is contained in one face of the arrangement.
-  \param pgn The polygon to be inserted to the arrangement. pgn must be
-             completely disjoint from the arrangement
-  \param arr The arrangement to insert the polygon to.
-*/
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-void Gps_on_surface_base_2<Traits_, TopTraits_,ValidationPolicy>::
-_insert(const Polygon_2& pgn, Arrangement_on_surface_2 & arr)
-{
-  typedef Arr_accessor<Arrangement_on_surface_2>                  Arr_accessor;
-
-  Arr_accessor  accessor(arr);
-  Compare_endpoints_xy_2  cmp_ends = m_traits->compare_endpoints_xy_2_object();
-
-  std::pair<Curve_const_iterator, Curve_const_iterator> itr_pair =
-    m_traits->construct_curves_2_object()(pgn);
-
-  if (itr_pair.first == itr_pair.second)
-    return;
-
-  Curve_const_iterator curr = itr_pair.first;
-  Curve_const_iterator end  = itr_pair.second;
-
-  const Arr_parameter_space  ps_x =
-    m_traits_adaptor.parameter_space_in_x_2_object()(*curr, ARR_MIN_END);
-  const Arr_parameter_space  ps_y =
-    m_traits_adaptor.parameter_space_in_y_2_object()(*curr, ARR_MIN_END);
-
-  Object obj_f;
-  if ((ps_x == ARR_INTERIOR) && (ps_y == ARR_INTERIOR))
-  {
-    Point_location pl(arr);
-    obj_f = pl.locate(m_traits->construct_min_vertex_2_object()(*curr));
-  }
-  else
-  {
-    obj_f = accessor.locate_curve_end(*curr, ARR_MIN_END, ps_x, ps_y);
-  }
-
-  Face_const_handle const_f;
-  // face should not be contained as the pgn is completly disjoint of the
-  // arrangement.
-  CGAL_assertion(CGAL::assign(const_f, obj_f) && !const_f->contained());
-  CGAL::assign(const_f, obj_f);
-  Face_iterator f = arr.non_const_handle(const_f);
-
-  Halfedge_handle first_he =
-    arr.insert_in_face_interior(*curr, f);
-  //first_he is directed from left to right (see insert_in_face_interior)
-
-  Halfedge_handle curr_he;
-  if (cmp_ends(*curr) == CGAL::SMALLER)
-  {
-    // curr curve and first_he have the same direction
-    curr_he = first_he;
-    first_he = first_he->twin();
-  }
-  else
-  {
-    // curr curve and first_he have opposite directions
-    CGAL_assertion(cmp_ends(*curr) == CGAL::LARGER);
-    curr_he = first_he->twin();
-  }
-
-  Curve_const_iterator temp = curr;
-  ++temp;
-  if (temp == end) // a polygon with circular arcs may have only
-                  // two edges (full circle for example)
-  {
-    /*Halfedge_handle he =
-      arr.insert_at_vertices(*temp, curr_he, first_he);*/
-    bool new_face_created = false;
-    bool dummy_swapped_predecessors = false;
-    Halfedge_handle he = accessor.insert_at_vertices_ex (curr_he,
-                                                         *temp, (cmp_ends(*temp) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                         first_he->next(),
-                                                         new_face_created,
-                                                         dummy_swapped_predecessors);
-    // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
-    // or do we have to disallow swapping?
-
-    CGAL_assertion(new_face_created);
-    CGAL_assertion((he->face() != he->twin()->face()));
-
-    he->face()->set_contained(true);
-    return;
-  }
-
-  //The polygon has 3 or more edges
-  Curve_const_iterator last = end;
-  --last;
-  for(++curr ; curr != last; ++curr)
-  {
-    const X_monotone_curve_2& curr_cv = *curr;
-    if (cmp_ends(curr_cv) == CGAL::SMALLER)
-      curr_he = arr.insert_from_left_vertex(curr_cv, curr_he);
-    else
-    {
-      CGAL_assertion(cmp_ends(curr_cv) == CGAL::LARGER);
-      curr_he = arr.insert_from_right_vertex(curr_cv, curr_he);
-    }
-  }
-
-  const X_monotone_curve_2& last_cv = *last;
-  /*Halfedge_handle last_he =
-    arr.insert_at_vertices(last_cv, curr_he, first_he); */
-  bool new_face_created = false;
-  bool dummy_swapped_predecessors = false;
-  Halfedge_handle last_he =
-    accessor.insert_at_vertices_ex (curr_he,
-                                    last_cv, ( cmp_ends(last_cv) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                    first_he->next(),
-                                    new_face_created,
-                                    dummy_swapped_predecessors);
-  // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
-  // or do we have to disallow swapping?
-
-  CGAL_assertion(new_face_created);
-  CGAL_assertion((last_he->face() != last_he->twin()->face()));
-
-  last_he->face()->set_contained(true);
-}
-
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template<class PolygonIter >
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  insert(PolygonIter p_begin, PolygonIter p_end)
-{
-  typename std::iterator_traits<PolygonIter>::value_type pgn;
-  //check validity of all polygons
-  for( ; p_begin != p_end; ++p_begin)
-  {
-    ValidationPolicy::is_valid(*p_begin, *m_traits);
-  }
-
-  _insert(p_begin, p_end, pgn);
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template<class PolygonIter, class PolygonWithHolesIter>
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  insert(PolygonIter p_begin, PolygonIter p_end,
-         PolygonWithHolesIter pwh_begin, PolygonWithHolesIter pwh_end)
-{
-  typedef std::list<X_monotone_curve_2>                  XCurveList;
-  typedef Init_faces_visitor<Arrangement_on_surface_2>              My_visitor;
-  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor>     Arr_bfs_scanner;
-
-  XCurveList xcurve_list;
-
-  for( ; p_begin != p_end; ++p_begin)
-  {
-    ValidationPolicy::is_valid(*p_begin, *m_traits);
-    _construct_curves(*p_begin, std::back_inserter(xcurve_list));
-  }
-
-  bool is_unbounded = false;
-  for( ; pwh_begin != pwh_end; ++pwh_begin)
-  {
-    ValidationPolicy::is_valid(*pwh_begin, *m_traits);
-    is_unbounded = (is_unbounded || m_traits->construct_is_unbounded_object()(*pwh_begin));
-    // is_unbounded = (is_unbounded || pwh_begin->is_unbounded());
-    _construct_curves(*pwh_begin, std::back_inserter(xcurve_list));
-  }
-  insert_non_intersecting_curves(*m_arr, xcurve_list.begin(), xcurve_list.end());
-
-  if (is_unbounded)
-  {
-    for (Face_iterator fit = m_arr->faces_begin();
-         fit != m_arr->faces_end(); ++fit)
-    {
-      if (fit->number_of_outer_ccbs() == 0)
-        fit->set_contained(true);
-    }
-  }
-
-  My_visitor v;
-  Arr_bfs_scanner scanner(v);
-  scanner.scan(*m_arr);
-  _reset_faces(m_arr);
-}
-
-//insert a range of simple polygons to the arrangement
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template<class PolygonIter>
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_2 & /*pgn*/)
-{
-  for(PolygonIter pitr = p_begin; pitr != p_end; ++pitr)
-  {
-    this->_insert(*pitr, *m_arr);
-  }
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template<class PolygonIter>
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_with_holes_2 & /*pgn*/)
-{
-  typedef std::list<X_monotone_curve_2>                  XCurveList;
-  typedef Init_faces_visitor<Arrangement_on_surface_2>              My_visitor;
-  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor>     Arr_bfs_scanner;
-
-  XCurveList xcurve_list;
-  bool is_unbounded = false;
-  for( ; p_begin != p_end; ++p_begin)
-  {
-    // is_unbounded = (is_unbounded || p_begin->is_unbounded());
-    is_unbounded = (is_unbounded || m_traits->construct_is_unbounded_object()(*p_begin));
-    _construct_curves(*p_begin, std::back_inserter(xcurve_list));
-
-  }
-  insert_non_intersecting_curves(*m_arr, xcurve_list.begin(), xcurve_list.end());
-
-  if (is_unbounded)
-  {
-    for (Face_iterator fit = m_arr->faces_begin();
-         fit != m_arr->faces_end(); ++fit)
-    {
-      if (fit->number_of_outer_ccbs() == 0)
-        fit->set_contained(true);
-    }
-  }
-
-  My_visitor v;
-  Arr_bfs_scanner scanner(v);
-  scanner.scan(*m_arr);
-  _reset_faces(m_arr);
-}
-
-//insert non-sipmle poloygons with holes (non incident edges may have
-// common vertex,  but they dont intersect at their interior
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  _insert(const Polygon_with_holes_2 & pgn, Arrangement_on_surface_2 & arr)
-{
- // inner function not exposed to user - no validation
- // ValidationPolicy::is_valid(pgn, *m_traits);
-
-  typedef std::list<X_monotone_curve_2>                  XCurveList;
-  typedef Init_faces_visitor<Arrangement_on_surface_2>          My_visitor;
-  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor> Arr_bfs_scanner;
-
-  XCurveList xcurve_list;
-  _construct_curves(pgn, std::back_inserter(xcurve_list));
-  insert_non_intersecting_curves(arr, xcurve_list.begin(), xcurve_list.end());
-
-  //if (pgn.is_unbounded())
-  if (m_traits->construct_is_unbounded_object()(pgn))
-  {
-    for (Face_iterator fit = arr.faces_begin();
-         fit != arr.faces_end(); ++fit)
-    {
-      if (fit->number_of_outer_ccbs() == 0)
-        fit->set_contained(true);
-    }
-  }
-
-  My_visitor v;
-  Arr_bfs_scanner scanner(v);
-  scanner.scan(arr);
-  _reset_faces(&arr);
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template <class OutputIterator>
-  void
-  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  _construct_curves(const Polygon_2 & pgn, OutputIterator oi)
-{
-  std::pair<Curve_const_iterator,
-    Curve_const_iterator> itr_pair =
-    m_traits->construct_curves_2_object()(pgn);
-  std::copy (itr_pair.first, itr_pair.second, oi);
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template <class OutputIterator>
-  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  _construct_curves(const Polygon_with_holes_2 & pgn, OutputIterator oi)
-{
-  //if (!pgn.is_unbounded())
-  if (!m_traits->construct_is_unbounded_object()(pgn))
-  {
-    const Polygon_2& pgn_boundary = m_traits->construct_outer_boundary_object ()(pgn);
-    std::pair<Curve_const_iterator,
-      Curve_const_iterator> itr_pair =
-      m_traits->construct_curves_2_object()(pgn_boundary);
-    std::copy (itr_pair.first, itr_pair.second, oi);
-  }
-  std::pair<GP_Holes_const_iterator, GP_Holes_const_iterator> hpair =
-    m_traits->construct_holes_object()(pgn);
-  GP_Holes_const_iterator hit;
-  for (hit = hpair.first; hit != hpair.second; ++hit)
-  {
-    const Polygon_2& pgn_hole = *hit;
-    std::pair<Curve_const_iterator,
-      Curve_const_iterator> itr_pair =
-      m_traits->construct_curves_2_object()(pgn_hole);
-    std::copy (itr_pair.first, itr_pair.second, oi);
-  }
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  template <class OutputIterator>
-  OutputIterator
-  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  polygons_with_holes(OutputIterator out) const
-{
-  typedef Arr_bfs_scanner<Arrangement_on_surface_2, OutputIterator>     Arr_bfs_scanner;
-  Arr_bfs_scanner scanner(this->m_traits, out);
-  scanner.scan(*(this->m_arr));
-  return (scanner.output_iterator());
-}
-
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  typename Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::Size
-  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  number_of_polygons_with_holes() const
-{
-
-  typedef Arr_bfs_scanner<Arrangement_on_surface_2, Counting_output_iterator>
-    Arr_bfs_scanner;
-  //counting_output_operator CTOR reqires a parameter
-  std::size_t cc = 0;
-  Arr_bfs_scanner scanner(this->m_traits, Counting_output_iterator(&cc));
-  scanner.scan(*(this->m_arr));
-  return (scanner.output_iterator().current_counter());
-}
-
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  bool Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  locate(const Point_2& q, Polygon_with_holes_2& pgn) const
-{
-  Point_location pl(*m_arr);
-
-  Object obj = pl.locate(q);
-  Face_const_iterator f;
-  if (CGAL::assign(f, obj))
-  {
-    if (!f->contained())
-      return false;
-  }
-  else
-  {
-    Halfedge_const_handle he;
-    if (CGAL::assign(he, obj))
-    {
-      if (he->face()->contained())
-        f = he->face();
-      else
-      {
-        CGAL_assertion(he->twin()->face()->contained());
-        f = he->twin()->face();
-      }
-    }
-    else
-    {
-      Vertex_const_handle v;
-      CGAL_assertion(CGAL::assign(v, obj));
-      CGAL::assign(v, obj);
-      Halfedge_around_vertex_const_circulator hav = v->incident_halfedges();
-      Halfedge_const_handle he = hav;
-      if (he->face()->contained())
-        f = he->face();
-      else
-      {
-        CGAL_assertion(he->twin()->face()->contained());
-        f = he->twin()->face();
-      }
-    }
-  }
-
-  typedef Oneset_iterator<Polygon_with_holes_2>    OutputItr;
-  typedef Arr_bfs_scanner<Arrangement_on_surface_2, OutputItr>     Arr_bfs_scanner;
-
-  OutputItr oi (pgn);
-  Arr_bfs_scanner scanner(this->m_traits, oi);
-
-
-  Ccb_halfedge_const_circulator ccb_of_pgn = get_boundary_of_polygon(f);
-  this->_reset_faces();
-  if (ccb_of_pgn == Ccb_halfedge_const_circulator())
-  {
-    // the polygon has no boundary
-
-    // f is unbounded
-    for (Face_iterator fit = m_arr->faces_begin(); fit != m_arr->faces_end();
-         ++fit)
-    {
-      if (fit->number_of_outer_ccbs() == 0)
-        scanner.scan_contained_ubf(fit);
-    }
-  }
-  else
-  {
-    Halfedge_const_handle he_of_pgn = ccb_of_pgn;
-    this->_reset_faces();
-    he_of_pgn->face()->set_visited(true);
-    scanner.scan_ccb(ccb_of_pgn);
-  }
-
-  this->_reset_faces();
-  return true;
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  typename Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::Ccb_halfedge_const_circulator
-  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  get_boundary_of_polygon(Face_const_iterator f) const
-{
-  CGAL_assertion(!f->visited());
-  f->set_visited(true);
-
-  if (f->number_of_outer_ccbs() == 0) // (f->is_unbounded())
-  {
-    return Ccb_halfedge_const_circulator();
-  }
-
-  // We assume that a polygon has only one outer_ccb. This code does not handle
-  // the case where there are more than 1 outer ccbs. If this is the case, we
-  // need to devise a method to convert the outer ccbs to inner ccbs so we
-  // will have only one outer ccb.
-  if (f->number_of_outer_ccbs() > 1)
-    CGAL_error_msg("Not implemented yet.");
-
-	// Some compilers (VC 9) do not like that we directly access the ccb_circ. So we have
-	// to pass through the iterator.
-  Outer_ccb_const_iterator oci_temp = f->outer_ccbs_begin();
-  Ccb_halfedge_const_circulator ccb_end = *oci_temp;
-  Ccb_halfedge_const_circulator ccb_circ = ccb_end;
-  do
-  {
-    //get the current halfedge on the face boundary
-    Halfedge_const_iterator he  = ccb_circ;
-    Face_const_iterator new_f = he->twin()->face();
-    if (!new_f->visited())
-    {
-      if (is_hole_of_face(new_f, he) && !new_f->contained())
-        return (he->twin());
-      return (get_boundary_of_polygon(new_f));
-    }
-    ++ccb_circ;
-  }
-  while(ccb_circ != ccb_end);
-  CGAL_error();
-  return Ccb_halfedge_const_circulator();
-
-}
-
-template <class Traits_, class TopTraits_, class ValidationPolicy>
-  bool Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
-  is_hole_of_face(Face_const_handle f, Halfedge_const_handle he) const
-{
-  Inner_ccb_const_iterator   holes_it;
-  for (holes_it = f->inner_ccbs_begin();
-       holes_it != f->inner_ccbs_end(); ++holes_it)
-  {
-    Ccb_halfedge_const_circulator ccb = *holes_it;
-    Ccb_halfedge_const_circulator ccb_end = ccb;
-    do
-    {
-      Halfedge_const_handle he_inside_hole = ccb;
-      he_inside_hole = he_inside_hole->twin();
-      if (he == he_inside_hole)
-        return true;
-
-      ++ccb;
-    }
-    while(ccb != ccb_end);
-  }
-
-  return false;
-}
-
-#endif // CGAL_GPS_UTILS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
deleted file mode 100644
index 7fcc463..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_GPS_POLYGON_SIMPILFIER_H
-#define CGAL_GPS_POLYGON_SIMPILFIER_H
-
-#include <CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h>
-#include <CGAL/Sweep_line_2.h>
-#include <CGAL/Sweep_line_2/Arr_construction_subcurve.h>
-#include <CGAL/Sweep_line_2/Arr_construction_event.h>
-
-#include <CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h>
-#include <CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h>
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Arr_accessor.h>
-#include <CGAL/iterator.h>
-
-namespace CGAL {
-
-template <class Arrangement_>
-class Gps_polygon_simplifier
-{
-  typedef Arrangement_                                Arrangement_2;
-  typedef typename Arrangement_2::Geometry_traits_2   Traits_2;
-  typedef typename Traits_2::Curve_const_iterator     Curve_const_iterator;
-  typedef typename Traits_2::Polygon_2                Polygon_2;
-  typedef typename Traits_2::Polygon_with_holes_2     Polygon_with_holes_2;
-  typedef typename Traits_2::Construct_curves_2       Construct_curves_2;
-
-  typedef Gps_simplifier_traits<Traits_2>              Meta_traits;
-  typedef typename Meta_traits::Curve_data            Curve_data;
-  typedef typename Meta_traits::X_monotone_curve_2    Meta_X_monotone_curve_2;
-  typedef typename Arrangement_2::Halfedge_handle     Halfedge_handle;
-  typedef typename Arrangement_2::Halfedge_iterator   Halfedge_iterator;
-  typedef typename Arrangement_2::Face_handle         Face_handle;
-  typedef typename Arrangement_2::Face_iterator       Face_iterator;
-  typedef typename Arrangement_2::Edge_iterator       Edge_iterator;
-  typedef typename Arrangement_2::Vertex_handle       Vertex_handle;
-  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
-                                                      Ccb_halfedge_const_circulator;
-  typedef typename Arrangement_2::Ccb_halfedge_circulator
-                                                      Ccb_halfedge_circulator;
-  typedef Arr_construction_subcurve<Meta_traits>      Subcurve;
-  typedef Arr_construction_event<Meta_traits,
-                                 Subcurve,
-                                 Arrangement_2>       Event;
-
-  typedef Gps_agg_op_base_visitor<Meta_traits,
-                                  Arrangement_2,
-                                  Event,
-                                  Subcurve>           Visitor;
-
-  typedef CGAL::Sweep_line_2<Meta_traits,
-                             Visitor,
-                             Subcurve,
-                             Event>                   Sweep_line_2;
-
-  typedef Unique_hash_map<Halfedge_handle,
-                          unsigned int>               Edges_hash;
-
-  typedef Unique_hash_map<Face_handle,
-                          unsigned int>               Faces_hash;
-  typedef Gps_bfs_join_visitor<Arrangement_2>         Bfs_visitor;
-  typedef Gps_bfs_scanner<Arrangement_2, Bfs_visitor> Bfs_scanner;
-
-protected:
-  Arrangement_2*       m_arr;
-  Meta_traits*         m_traits;
-  bool                 m_own_traits;
-  Visitor              m_visitor;
-  Sweep_line_2         m_sweep_line;
-  Edges_hash           m_edges_hash; // maps halfedge to its BC (boundary counter)
-  Faces_hash           m_faces_hash;  // maps face to its IC (inside count)
-
-public:
-   /*! Constructor. */
-  Gps_polygon_simplifier(Arrangement_2& arr, Traits_2& tr) :
-    m_arr(&arr),
-    m_traits(new Meta_traits(tr)),
-    m_own_traits(true),
-    m_visitor(&arr, &m_edges_hash),
-    m_sweep_line(m_traits, &m_visitor)
-  {}
-
-  /*! Destructor. */
-  ~Gps_polygon_simplifier()
-  {
-    if (m_own_traits && (m_traits != NULL)) {
-      delete m_traits;
-      m_traits = NULL;
-    }
-  }
-
-  void simplify(const Polygon_2& pgn)
-  {
-    Construct_curves_2 ctr_curves =
-      reinterpret_cast<Traits_2*>(m_traits)->construct_curves_2_object();
-
-    std::list<Meta_X_monotone_curve_2> curves_list;
-
-    std::pair<Curve_const_iterator,
-              Curve_const_iterator>  itr_pair = ctr_curves(pgn);
-
-    unsigned int index = 0;
-    for(Curve_const_iterator itr = itr_pair.first;
-        itr != itr_pair.second;
-        ++itr, ++index)
-    {
-      Curve_data cv_data(1, 0, index);
-      curves_list.push_back(Meta_X_monotone_curve_2(*itr, cv_data));
-    }
-    m_traits->set_polygon_size(static_cast<unsigned int>(curves_list.size()));
-
-    m_sweep_line.sweep(curves_list.begin(), curves_list.end());
-
-    // we use the first face with out outer ccbs. This assumpsion should
-    // be fixed when we can make a face with no outer ccb to a face with
-    // outer ccb.
-    Face_iterator it;
-    for (it = m_arr->faces_begin(); it != m_arr->faces_end(); ++it)
-      if (it->number_of_outer_ccbs() == 0)
-        break;
-    CGAL_assertion(it != m_arr->faces_end());
-
-    m_faces_hash[it] = 0;
-    Bfs_visitor visitor(&m_edges_hash, &m_faces_hash, 1);
-    visitor.visit_ubf(it, 0);
-    Bfs_scanner scanner(visitor);
-    scanner.scan(*m_arr);
-    visitor.after_scan(*m_arr);
-  }
-
-  const Arrangement_2& arrangement() const
-  {
-    return (*m_arr);
-  }
-
-  Arrangement_2& arrangement()
-  {
-    return (*m_arr);
-  }
-
-};
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h
deleted file mode 100644
index ad13085..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h
+++ /dev/null
@@ -1,815 +0,0 @@
-// Copyright (c) 2008  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s): Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Ron Wein        <wein at post.tau.ac.il>
-//                 Boris Kozorovitzky <boriskoz at post.tau.ac.il>
-//                 Guy Zucker <guyzucke at post.tau.ac.il> 
-
-#ifndef CGAL_GPS_POLYGON_VALIDATION_2_H
-#define CGAL_GPS_POLYGON_VALIDATION_2_H
-
-#include <CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h>
-#include <CGAL/Boolean_set_operations_2/Gps_default_dcel.h>
-#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h>
-
-#include <CGAL/Arrangement_2/Arr_default_planar_topology.h>
-#include <CGAL/Sweep_line_2.h>
-#include <CGAL/Sweep_line_2/Sweep_line_event.h>
-#include <CGAL/Sweep_line_2/Sweep_line_subcurve.h>
-#include <CGAL/Sweep_line_empty_visitor.h>
-#include <CGAL/Arr_default_overlay_traits.h>
-#include <CGAL/Arr_naive_point_location.h>
-
-
-#include <iostream>
-#include <list>
-#include <iterator>
-
-
-namespace CGAL {
-
-/*Arrangement is templated with extended face dcel*/
-template<typename Arrangement_2>
-class ValidationOverlayTraits : 
-  public CGAL::Arr_default_overlay_traits<Arrangement_2> 
-{
-public:
-  typedef CGAL::Arr_default_overlay_traits<Arrangement_2>       Base;
-  typedef typename Base::Face_handle_A                          Face_handle_A;
-  typedef typename Base::Face_handle_B                          Face_handle_B;
-  typedef typename Base::Face_handle_R                          Face_handle_R;
-   
-  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
-    Ccb_halfedge_const_circulator;
-  typedef typename Arrangement_2::Halfedge_const_handle
-    Halfedge_const_handle;
-  typedef typename Arrangement_2::Face_const_handle
-    Face_const_handle;
-  typedef typename Arrangement_2::Inner_ccb_const_iterator
-    Inner_ccb_const_iterator;
-
-  /* red faces source is the arrangement of holes. The blue faces (face) are
-   * caused by the PWH's outer boundary
-   */
-  virtual void create_face(Face_handle_A red_face, Face_handle_B blue_face,
-                           Face_handle_R /*r_face*/) const {    
-    if ((red_face->contained()==true) && (blue_face->contained()==false)) {
-      hole_overlap = true;
-    }
-  }
-
-public:
-  ValidationOverlayTraits() : hole_overlap(false) {}
-  bool getHoleOverlap() {
-    return hole_overlap; 
-  }
-  void setHoleOverlap(bool b) {
-    hole_overlap = b;
-    return;
-  }
-private:    
-  mutable bool hole_overlap;
-}; 
-  
-/*! \class
- * A visitor used for checking whether the edges of a polygon are
- * non-intersecting.
- */
-template <class ArrTraits_>
-class Gps_polygon_validation_visitor : 
-  public Sweep_line_empty_visitor<ArrTraits_>
-{
-private:
-  typedef ArrTraits_                                   Traits_2;
-  typedef Gps_polygon_validation_visitor<Traits_2>     Self;
-  typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
-  typedef typename Traits_2::Point_2                   Point_2;
-
-  typedef Sweep_line_empty_visitor<Traits_2>           Base;
-  typedef typename Base::Event                         Event;
-  typedef typename Base::Subcurve                      Subcurve;
-  typedef typename Base::Status_line_iterator          SL_iterator;
-
-  typedef Basic_sweep_line_2<Traits_2, Self>           Sweep_line;
-
-public:
-  enum Error_code {
-    ERROR_NONE = 0,
-    ERROR_EDGE_INTERSECTION,
-    ERROR_EDGE_VERTEX_INTERSECTION,
-    ERROR_EDGE_OVERLAP,
-    ERROR_VERTEX_INTERSECTION
-  };
-
-  Gps_polygon_validation_visitor(bool is_s_simple = true) : 
-    m_is_valid(true),
-    m_is_s_simple(is_s_simple),
-    m_error_code(ERROR_NONE)
-  {}
-
-  template <class XCurveIterator>
-  void sweep(XCurveIterator begin, XCurveIterator end)
-  {
-    //Perform the sweep
-    reinterpret_cast<Sweep_line*>(this->m_sweep_line)->sweep(begin, end);
-  }
-
-  bool after_handle_event(Event* event, SL_iterator, bool)
-  {
-    if (event->is_intersection()) {
-      m_error_code = ERROR_EDGE_INTERSECTION;
-      m_is_valid = false;
-      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
-    }
-    else if (event->is_weak_intersection()) {
-      m_error_code = ERROR_EDGE_VERTEX_INTERSECTION;
-      m_is_valid = false;
-      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
-    }
-    else if (event->is_overlap()) {
-      m_error_code = ERROR_EDGE_OVERLAP;
-      m_is_valid = false;
-      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
-    } else {
-      if (m_is_s_simple && 
-          (event->number_of_right_curves() + event->number_of_left_curves()) !=
-          2)
-      {
-        m_error_code = ERROR_VERTEX_INTERSECTION;
-        m_is_valid = false;
-        reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
-      }
-    }
-    return true;
-  }
-
-  bool is_valid() const { return m_is_valid; }
-  Error_code error_code() const { return m_error_code; }
-
-protected:
-  bool m_is_valid;
-  bool m_is_s_simple; // is strictly simple
-
-private:
-  Error_code m_error_code;
-};
-
-
-//Traits_2 templates the General_polygon_set_2 Traits.
-//These include types for polygon and PWH.
-template <typename Traits_2>
-bool is_closed_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits)
-{
-
-  typedef Gps_traits_adaptor<Traits_2>              Traits_adapter_2;
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-  typedef typename Traits_adapter_2::Construct_vertex_2 Construct_vertex_2;
-  
-  Cci_pair              itr_pair = traits.construct_curves_2_object()(pgn);
-  Curve_const_iterator  begin = itr_pair.first;
-  Curve_const_iterator  end = itr_pair.second;
-
-  if (begin == end)
-    return true;  // An empty polygon is valid.
-    
-  Traits_adapter_2            traits_adapter;
-  typename Traits_2::Equal_2  equal_func = traits.equal_2_object();
-  Curve_const_iterator        curr, next;
-  Construct_vertex_2    construct_vertex_func;
-  construct_vertex_func = traits_adapter.construct_vertex_2_object();
-  curr = next = begin;
-  ++next;
-
-  if (next == end)
-    return false; // A polygon cannot have just a single edge.
-
-  while (next != end) {
-    // Make sure that the current target equals the next source.
-    if (equal_func (construct_vertex_func (*curr, 0),
-                    construct_vertex_func (*curr, 1)))
-      return false;
-
-    if (! equal_func (construct_vertex_func (*curr, 1), 
-                      construct_vertex_func (*next, 0)))
-      return false;
-
-    // Move to the next pair of edges.
-    curr = next;
-    ++next;
-  }
-
-  // Make sure that the last target equals the first source.
-  if (equal_func (construct_vertex_func (*curr, 0),
-                  construct_vertex_func (*curr, 1)))
-    return false;
-
-  if (! equal_func (construct_vertex_func (*curr, 1),
-                    construct_vertex_func (*begin, 0)))
-    return false;
-
-  return true;
-}
-
-// Previously known as is_strictly_simple
-template <typename Traits_2>
-bool is_simple_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits)
-{
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-
-  // Sweep the boundary curves and look for intersections.
-  typedef Gps_polygon_validation_visitor<Traits_2>  Visitor;
-  typedef Sweep_line_2<Traits_2, Visitor>           Sweep_line;
-
-  Cci_pair              itr_pair = traits.construct_curves_2_object()(pgn);
-  Visitor               visitor;
-  Sweep_line            sweep_line (&traits, &visitor);
-
-  visitor.sweep(itr_pair.first, itr_pair.second);
-  if (!visitor.is_valid()) {
-    switch (visitor.error_code()) {
-     case Visitor::ERROR_NONE: break;
-     case Visitor::ERROR_EDGE_INTERSECTION:
-      CGAL_warning_msg(false, "The polygon boundary self intersects at edges.");
-      break;
-      
-     case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
-      CGAL_warning_msg(false, "The polygon boundary self (weakly) intersects.");
-      break;
-
-     case Visitor::ERROR_EDGE_OVERLAP:
-      CGAL_warning_msg(false, "The polygon boundary self overlaps.");
-      break;
-
-     case Visitor::ERROR_VERTEX_INTERSECTION:
-      CGAL_warning_msg(false, "The polygon boundary intersects at vertices.");
-      break;      
-    }
-    return false;
-  }
-  return true;
-}
-
-template <typename Traits_2>
-bool has_valid_orientation_polygon (const typename Traits_2::Polygon_2& pgn,
-                                    Traits_2 traits)
-{
-
-  typedef Gps_traits_adaptor<Traits_2>              Traits_adapter_2;
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-
-  Cci_pair         itr_pair = traits.construct_curves_2_object()(pgn);
-  Traits_adapter_2 traits_adapter;
-
-  if(itr_pair.first == itr_pair.second)
-    return true; // empty polygon
-
-  return
-    (traits_adapter.orientation_2_object()(itr_pair.first, itr_pair.second) ==
-     COUNTERCLOCKWISE);
-}
-
-/* A valid polygon is :
- * 1 - Closed or empty polygon
- * 2 - Simple (previously known as strictly simple)
- * 3 - Counterclockwise oriented
- */
-template <typename Traits_2>
-bool is_valid_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits)
-{
-  bool closed = is_closed_polygon(pgn,traits);
-  CGAL_warning_msg (closed, "The polygon's boundary is not closed.");
-  if (! closed)
-    return false;
-
-  bool simple = is_simple_polygon(pgn,traits);
-  CGAL_warning_msg (simple, "The polygon is not simple.");  
-  if (!simple)
-    return false;   
-
-  bool valid_orientation = has_valid_orientation_polygon(pgn,traits);
-  CGAL_warning_msg (valid_orientation,
-                    "The polygon has a wrong orientation.");
-  if (! valid_orientation)
-    return false;
-
-  return true;
-}
-
-  
-template <typename Traits_2>
-bool
-is_closed_polygon_with_holes(const typename Traits_2::Polygon_with_holes_2& pgn,
-                             Traits_2 traits)
-{
-  typedef typename Traits_2::Polygon_with_holes_2       Polygon_with_holes_2;    
-  if (! is_closed_polygon (pgn.outer_boundary(),traits))
-    return false;
-
-  typename Polygon_with_holes_2::Hole_const_iterator    itr;
-
-  for (itr = pgn.holes_begin(); itr != pgn.holes_end(); ++itr)
-  {
-    if (! is_closed_polygon (*itr,traits))
-      return false;
-  }
-  return true;
-}
-
-// templated point location version
-template<class Traits_2, class PointLocation>
-bool
-is_crossover_outer_boundary(const typename Traits_2::Polygon_with_holes_2& pgn,
-                            Traits_2 traits, PointLocation& pl)
-{
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-
-  typedef typename Traits_2::Point_2                 Point_2;
-  typedef typename Traits_2::Compare_endpoints_xy_2  Compare_endpoints_xy_2;
-  typedef typename Traits_2::Construct_min_vertex_2  Construct_min_vertex_2; 
-  typedef typename Traits_2::Construct_max_vertex_2  Construct_max_vertex_2;
-  typedef CGAL::Gps_default_dcel<Traits_2>           Dcel;
-
-  // IMPORTATNT! TODO!
-  // Currently the topology traits is the bounded planar traits. This
-  // should be replaced with a templated topology traits!
-  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
-                                                     Topology_traits;
-  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits> 
-    Polygon_set_2;
-
-  typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2;
-  typedef typename Arrangement_2::Halfedge_handle          Halfedge_handle;
-  typedef typename Arrangement_2::Vertex_handle            Vertex_handle;
-  typedef typename Arrangement_2::Vertex_const_handle      Vertex_const_handle;
-  typedef typename Traits_2::Curve_const_iterator          Curve_const_iterator;
-    
-  typename std::list<Halfedge_handle>           he_path;
-  typename std::list<Halfedge_handle>::iterator he_itr;
-  //functors used throughout the function 
-  Construct_min_vertex_2 min_functor = traits.construct_min_vertex_2_object();
-  Construct_max_vertex_2 max_functor = traits.construct_max_vertex_2_object();
-  Compare_endpoints_xy_2 cmp_endpoints =  traits.compare_endpoints_xy_2_object();
-    
-  Cci_pair itr_pair = traits.construct_curves_2_object()(pgn.outer_boundary());
-  Curve_const_iterator  begin = itr_pair.first;
-  Curve_const_iterator  end = itr_pair.second;
-  if (begin == end)
-    return true;  // An empty polygon is valid.
-  // handles to consecutive curves 
-  Curve_const_iterator        curr, next;
-  curr = next = begin;
-  // handles to vertices for insert. one maintains the current curve (already
-  // inserted) and next curve's joint vertex.
-  // the other maintains the next curve's second vertex if it already exists in
-  // the arrangement. 
-  Vertex_handle joint_ver, second_ver; 
-  // closed check guarantees polygon has more than 1 curve    
-  ++next;
-  // halfedge handle whose target is always the joint vertex between next and
-  // curr. 
-  Halfedge_handle last_he;
-    
-  Polygon_set_2 gps(traits);
-  Arrangement_2 arr = gps.arrangement();
-  pl.attach(arr);
-
-  // insert first edge lexicographically to arrangement
-  // compute the joint vertex and insert to the path list a halfedge whose
-  // target is the joint vertex 
-  last_he = CGAL::insert_non_intersecting_curve(arr, *curr);
-  if  (cmp_endpoints(*curr) == SMALLER) {
-    // polygon's boundary first curve is in lexicographic direction 
-    joint_ver = last_he->target();
-    he_path.push_back(last_he); 
-  } else { // polygon's boundary first curve not lexicographic 
-    joint_ver = last_he->source();
-    he_path.push_back(last_he->twin()); 
-  }
-
-  /* insert the rest of the curves to the arrangement efficiently the previous
-   * closed polygon check guarantees equal_func
-   * (construct_vertex_func (*curr, 1), construct_vertex_func (*next, 0)))
-   */
-  while (next != end) {
-    CGAL::Object obj;          
-    Vertex_const_handle cver;
-    Point_2 second_point;
-    if(cmp_endpoints(*next) == SMALLER) { 
-      // next curve's minimum is the joint vertex. Look if it's max exists in
-      // the arrangement and insert lexicographically 
-      second_point = max_functor(*next);
-      obj = pl.locate(second_point);
-      if  (CGAL::assign (cver, obj)) {  
-        // insert where both vertices exist
-        second_ver = arr.non_const_handle(cver); 
-        last_he = arr.insert_at_vertices( *next, joint_ver, second_ver);
-      } else // insert from left vertex  
-        last_he = arr.insert_from_left_vertex ( *next,joint_ver) ;  
-    } else {
-      // next curve's maximum vertex is the joint vertex. try to locate the
-      // min vertex, and insert from right or from both vertices
-      second_point = min_functor(*next);
-      obj = pl.locate(second_point);
-      if  (CGAL::assign (cver, obj))  {
-        // insert where both vertices exist
-        second_ver = arr.non_const_handle(cver); 
-        last_he = arr.insert_at_vertices( *next, joint_ver, second_ver);
-      } else  // insert from right vertex 
-        last_he = arr.insert_from_right_vertex ( *next,joint_ver) ; 
-    }
-    // Move to the next pair of edges.
-    he_path.push_back(last_he); 
-    joint_ver=last_he->target();  
-    curr = next;
-    ++next;
-  } //end of while 
-
-  /* We created a path of halfedges that circulates the polygon
-   * counterclockwise. The polygon should lay on the left of each of these
-   * half edges. If the boundary is invalid, the unbounded face should be
-   * on the left of one of more than one of the halfedges.
-   * The unbounded face is always to the right of the halfedges. We check if
-   * all faces that lay on the right of the halfedges are equal (to the 
-   *"unbounded" face).
-   */
-  typename Arrangement_2::Face_handle fh = (*he_path.begin())->twin()->face();
-  for (he_itr = he_path.begin(); he_itr != he_path.end(); he_itr++) {
-    if ((*he_itr)->twin()->face() != fh)
-      return false;
-  }
-  return true; 
-}
-
-template<typename Traits_2>
-bool is_crossover_outer_boundary(
-  const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits ) {
-
-  typedef CGAL::Gps_default_dcel<Traits_2>                      Dcel;
-  // IMPORTATNT! TODO!
-  // Currently the topology traits is the bounded planar traits. This
-  // should be replaced with a templated topology traits!
-  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
-                                                                Topology_traits;
-
-  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits> 
-                                                                Polygon_set_2;
-  typedef typename Polygon_set_2::Arrangement_on_surface_2      Arrangement_2;
-  typedef CGAL::Arr_naive_point_location<Arrangement_2>         Naive_pl;
-
-  Naive_pl pl;
-  return is_crossover_outer_boundary(pgn, traits, pl);
-}
-
-// previously known as Simple
-template <typename Traits_2>
-bool is_relatively_simple_polygon_with_holes
-(const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits)
-{
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-  typedef typename Traits_2::Construct_curves_2    Construct_curves_2; 
-
-  typedef typename Traits_2::X_monotone_curve_2     X_monotone_curve_2;
-  typedef Gps_polygon_validation_visitor<Traits_2>  Visitor;
-  typedef Sweep_line_2<Traits_2, Visitor>           Sweep_line;
-  typedef typename Traits_2::Polygon_with_holes_2   Polygon_with_holes_2;
-
-  Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
-  // Construct a container of all outer boundary curves.
-  Cci_pair         itr_pair = construct_curves_func (pgn.outer_boundary());
-  std::list<X_monotone_curve_2>  outer_curves;
-  std::copy (itr_pair.first, itr_pair.second,
-             std::back_inserter(outer_curves));
-  // Create visitor and sweep to verify outer boundary is relatively simple
-  Visitor      relative_visitor(false);
-  Sweep_line   sweep_line (&traits, &relative_visitor);
-  relative_visitor.sweep (outer_curves.begin(), outer_curves.end());
-  if (!relative_visitor.is_valid()) {
-    switch (relative_visitor.error_code()) {
-     case Visitor::ERROR_NONE: break;
-     case Visitor::ERROR_EDGE_INTERSECTION:
-      CGAL_warning_msg(false, "The outer boundary self intersects at edges.");
-      std::cout << "The outer boundary self intersects at edges." << std::endl;
-      break;
-      
-     case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
-      CGAL_warning_msg(false, "The outer boundary self (weakly) intersects.");
-      break;
-
-     case Visitor::ERROR_EDGE_OVERLAP:
-      CGAL_warning_msg(false, "The outer boundary self overlaps.");
-      break;
-
-     case Visitor::ERROR_VERTEX_INTERSECTION:
-      CGAL_warning_msg(false, "The outer boundary self intersects at vertices.");
-      break;      
-    }
-    return false;
-  }
-  
-  // Verify every hole is simple 
-  typename Polygon_with_holes_2::Hole_const_iterator  hoit;
-  std::list<X_monotone_curve_2>  hole_curves;    
-  for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
-    bool simple_hole = is_simple_polygon(*hoit, traits);
-    if (!simple_hole)
-      return false;
-  }
-  return true;
-}
-
-template <typename Traits_2>
-bool has_valid_orientation_polygon_with_holes
-(const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits)
-{
-
-  typedef Gps_traits_adaptor<Traits_2>              Traits_adapter_2;
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-  typedef typename Traits_2::Construct_curves_2    Construct_curves_2; 
-
-  typedef typename Traits_adapter_2::Orientation_2      Check_orientation_2;
-  typedef typename Traits_2::Polygon_with_holes_2       Polygon_with_holes_2;
-
-  Traits_adapter_2            traits_adapter;
-
-  Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
-  Check_orientation_2 check_orientation_func =
-    traits_adapter.orientation_2_object();;
-  // Check the orientation of the outer boundary.
-  Cci_pair         itr_pair = construct_curves_func (pgn.outer_boundary());
-
-  if ((itr_pair.first != itr_pair.second) && 
-      (check_orientation_func (itr_pair.first, itr_pair.second) !=
-       COUNTERCLOCKWISE))
-  {
-    return false;
-  }
-
-  // Check the orientation of each of the holes.
-  typename Polygon_with_holes_2::Hole_const_iterator    hoit;
-    
-  for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
-    itr_pair = construct_curves_func (*hoit);
-
-    if ((itr_pair.first != itr_pair.second) &&
-        (check_orientation_func (itr_pair.first, itr_pair.second) != CLOCKWISE))
-    {
-      return false;
-    }
-  }
-  return true;
-}
-
-/* Verify holes do not intersect between themselves as well with the outer
- * boundary (except intersection on a vertex which is allowed).
- *
- * This efficient implementation utilizes the general poygon set for aggregated
- * join operations for N holes which should result in a GPS that contains N
- * independent PWH.
- * Executing a difference(gps, outer boundary) should result in an empty set if
- * no holes intersect the boundary. 
- *
- * An iterative use of the difference free function while iterating over the
- * holes may have an advantage in case there are numerous holes that intersect
- * the boundary and the iterative loop will be stopped after a small number of
- * iterations.  
- */
-template <class Traits_2>
-bool are_holes_and_boundary_pairwise_disjoint
-(const typename Traits_2::Polygon_with_holes_2& pwh, Traits_2& traits)
-{
-  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair; 
-  typedef typename Traits_2::Construct_curves_2    Construct_curves_2; 
-
-  typedef CGAL::Gps_default_dcel<Traits_2>                 Dcel;
-  // IMPORTATNT! TODO!
-  // Currently the topology traits is the bounded planar traits. This
-  // should be replaced with a templated topology traits!
-  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
-                                                           Topology_traits;
-
-  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits> 
-    Polygon_set_2;
-  typedef typename Polygon_set_2::Size                     Size;
-  typedef  typename Traits_2::Polygon_2                    Polygon_2;
-  typedef typename Traits_2::Polygon_with_holes_2          Polygon_with_holes_2;
-  typedef typename Polygon_with_holes_2::Hole_const_iterator
-    Hole_const_iterator;
-  typedef typename Traits_2::X_monotone_curve_2            X_monotone_curve_2;
-  typedef std::pair<Curve_const_iterator,Curve_const_iterator>
-                                                           Cci_pair;
-  typedef typename Traits_2::Construct_curves_2            Construct_curves_2;
-  typedef typename Traits_2::Construct_general_polygon_with_holes_2
-    Construct_polygon_with_holes_2;
-
-  typedef Gps_polygon_validation_visitor<Traits_2>         Visitor;
-  typedef Sweep_line_2<Traits_2, Visitor>                  Sweep_line ;
-  typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2;
-    
-  /* Should be perfored more efficeintly  than using sweep and than
-   * difference().
-   *
-   * Use sweep to find intersections on the interior of curves (not on vertices)
-   * and overlapping edges which are not allowed (note that 0/1 dimension
-   * intersections are not detectes by do_intersect() which only returns the
-   * 2D intersection polygon if exists) 
-   * Note that using this sweep alone allows for a hole and an edge to share
-   * a vertex and intersect (like illegal input pgn_w_overlap_hole.dat in
-   * validation_example)
-   */
-  Hole_const_iterator hoit;
-  // Construct a container of all boundary curves.
-  Polygon_2 pgn2 = traits.construct_outer_boundary_object()(pwh);   
-  Construct_curves_2    construct_curves_func;    
-  Cci_pair     itr_pair = construct_curves_func(pgn2);
-    
-  std::list<X_monotone_curve_2>  curves;
-  std::copy (itr_pair.first, itr_pair.second,
-             std::back_inserter(curves));
-
-  std::pair<Hole_const_iterator, Hole_const_iterator> pair =
-    traits.construct_holes_object()(pwh);
-  //for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit)
-  for (hoit = pair.first; hoit!=pair.second; ++hoit) {
-    itr_pair = construct_curves_func (*hoit);
-    std::copy (itr_pair.first, itr_pair.second, std::back_inserter(curves));
-  }
-
-  // Perform the sweep and check for curve  intersections on the interior.
-  // Traits_2     traits; moved to top, needed also for boundary.
-  Visitor      visitor(false);
-  Sweep_line   sweep_line (&traits, &visitor);
-  visitor.sweep (curves.begin(), curves.end());
-  if  (!visitor.is_valid())
-    return false;
-      
-  Polygon_set_2 gps(traits);
-  // check for 2D  intersections of holes (holes must be disjoint except for
-  // vertices)     
-  Size num_of_holes = 0;
-  // functors for creating a pwh needed for inserting pgns into the arrangement
-  // quickly 
-  Construct_polygon_with_holes_2 construct_pwh_functor =
-    traits.construct_polygon_with_holes_2_object () ;     
-  for (hoit = pwh.holes_begin(); hoit != pwh.holes_end(); ++hoit) {
-    Polygon_2 hole(*hoit);
-    hole.reverse_orientation();
-    /* gps.join() and gps.insert()requires that the polyon insrted is valid,
-     * and therfore hole orientation must be reversed
-     */ 
-    bool intersect = gps.do_intersect(hole);
-    if (intersect)
-      return false;
-    else {
-      /* to use gps.insert(hole) it is required that the set coponents and the
-       * new holes  do not intersect.
-       * because the sweep detects shared edges and the do_intersect query
-       * detects 2D intersections we can safely use the insert(pwh) function
-       * whose performance is better than the join(pgn)
-       */
-      Polygon_with_holes_2 empty_pwh = construct_pwh_functor(hole);
-      // traits.Construct_general_polygon_with_holes_2 (hole);
-      // Polygon_with_holes_2 empty_pwh(hole);
-      gps.insert(empty_pwh);
-      num_of_holes++;
-    }
-  }  
-  /* not good - doesn't work if intersection at vertices is legal.
-   * Size arr_num_of_holes = gps.number_of_polygons_with_holes();  
-   * if (num_of_holes != arr_num_of_holes)
-   *   return false;
-   */
-
-  // check for intersection of holes with the outer boundary
-
-  /* outer boundary can be relatively simple. Execution of 
-   * do_intersect(hole, boundary) or difference(hole,boundary) relies on
-   * implementation of General polygon set which has a precondition that
-   * requires valid polygon or PWH to be inserted (not just a simple polygon).  
-   * This helper function is utilized after checking for the PWH closure,
-   * relative simplicity and orientation. Therefore it is safe to assume the 
-   * outer boundary is  valid PWH with no holes. We can't assume it is a valid
-   * (simple) polygon.
-   */
-  
-  //Polygon_with_holes_2 boundary(pwh.outer_boundary(), fit, fit);     
- Polygon_with_holes_2 boundary =  construct_pwh_functor (pwh.outer_boundary());
-  // Unbounded outer boundaries contain all the holes and the holes were checked
-  // and are OK.
-  if (boundary.is_unbounded()) 
-    return true;
-
-  /* do_intersect predicate will not suffice as hole can be completely outside
-   * the outer boundary in an (extremely strange) case
-   * The gps now contains all the holes. the difference between the boundary
-   * and a union of all the holes should be the empty set. For performance
-   * reasons, we use a customized overlay traits and perform an arrangement
-   * overlay instead of difference
-   */
-  ValidationOverlayTraits<Arrangement_2> valOverlayTraits;
-  valOverlayTraits.setHoleOverlap(false);
-  Polygon_set_2 gps2(traits);
-   
-  Arrangement_2 boundary_arr = gps2.arrangement();
-  gps2._insert(boundary,boundary_arr);
-  Arrangement_2 holes_arr = gps.arrangement();    
-  Arrangement_2 output_arr;
-  overlay(holes_arr, boundary_arr, output_arr, valOverlayTraits);
-  if (valOverlayTraits.getHoleOverlap())
-    return false;
-         
-  /* old code that works less efficiently than the new overly traits
-   * gps.validation_difference(boundary);
-   * if gps is not empty at least one hole intersected the boundary 
-   * if (!gps.is_empty())
-   *   return false;
-   */        
-  return true;
-} 
-
-/* A valid polygon with holes is :
- * 1 - Has empty or closed boundary and all the holes are closed
- * 2 - The PWH is relatively simple polygon (holes are simple...)
- * 3 - Has it's boundary oriented counterclockwise and the holes oriented
- *     clockwise
- * 4 - All the segments (boundry and holes) do not cross or intersect in their
- *     relative interior
- * 5 - The holes are on the interior of the boundary polygon if the boundary
- *     is not empty
- */
-template <typename Traits_2>
-bool
-is_valid_polygon_with_holes(const typename Traits_2::Polygon_with_holes_2& pgn,
-                            Traits_2 traits)
-{
-  bool closed = is_closed_polygon_with_holes(pgn, traits);
-  CGAL_warning_msg(closed, 
-                   "The polygon's boundary or one of its holes is not closed.");
-  if (! closed)
-    return false;
-      
-  bool relatively_simple = is_relatively_simple_polygon_with_holes(pgn, traits);
-  CGAL_warning_msg (relatively_simple, "The polygon is not relatively simple.");
-  if (! relatively_simple)
-    return false;
-    
-  bool no_cross = is_crossover_outer_boundary(pgn, traits);
-  CGAL_warning_msg (no_cross, "The polygon has a crossover.");
-  if (!no_cross)
-    return false;
-          
-  bool valid_orientation = has_valid_orientation_polygon_with_holes(pgn, traits);
-  CGAL_warning_msg (valid_orientation, "The polygon has a wrong orientation.");
-  if (! valid_orientation)
-    return false;
-    
-  bool holes_disjoint = are_holes_and_boundary_pairwise_disjoint(pgn, traits);
-  CGAL_warning_msg
-    (holes_disjoint,
-     "Holes of the PWH intersect amongst themselves or with outer boundary");
-  if (! holes_disjoint)
-    return false;
-      
-  return true;
-}
-
-template <typename Traits_2>
-bool
-is_valid_unknown_polygon(const typename Traits_2::Polygon_with_holes_2& pgn, 
-                         Traits_2& traits)
-{
-  return is_valid_polygon_with_holes(pgn, traits);
-}
-  
-template <typename Traits_2>
-bool is_valid_unknown_polygon(const typename Traits_2::Polygon_2& pgn,
-                              Traits_2& traits)
-{
-  return is_valid_polygon(pgn, traits);
-}
-  
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
deleted file mode 100644
index 88ffec0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
+++ /dev/null
@@ -1,478 +0,0 @@
-// Copyright (c) 1997  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_GPS_SIMPLIFIER_TRAITS_H
-#define CGAL_GPS_SIMPLIFIER_TRAITS_H
-
-#include <CGAL/Boolean_set_operations_2/Gps_traits_decorator.h>
-
-namespace CGAL {
-
-class Gps_simplifier_curve_data
-{
-protected:
-  unsigned int m_bc;
-  unsigned int m_twin_bc;
-  unsigned int m_index;
-
-public:
-  Gps_simplifier_curve_data()
-  {}
-
-  Gps_simplifier_curve_data(unsigned int bc,
-                            unsigned int twin_bc,
-                            unsigned int index):
-    m_bc(bc),
-    m_twin_bc(twin_bc),
-    m_index(index)
-  {}
-
-  unsigned int bc() const
-  {
-    return m_bc;
-  }
-
-  unsigned int twin_bc() const
-  {
-    return m_twin_bc;
-  }
-
-  unsigned int index() const
-  {
-    return m_index;
-  }
-
-  unsigned int& index() 
-  {
-    return m_index;
-  }
-
-  unsigned int& twin_bc() 
-  {
-    return m_twin_bc;
-  }
-
-  void set_bc(unsigned int bc)
-  {
-    m_bc = bc;
-  }
-
-  void set_twin_bc(unsigned int twin_bc)
-  {
-    m_twin_bc = twin_bc;
-  }
-
-  void set_index(unsigned int index)
-  {
-    m_index = index;
-  }
-};
-
-struct Gps_simplifier_point_data
-{
-protected:
-  unsigned int m_index;
-
-public:
-  Gps_simplifier_point_data()
-  {}
-
-  Gps_simplifier_point_data(unsigned int index) : m_index(index)
-  {}
-
-  unsigned int index() const
-  {
-    return m_index;
-  }
-  
-  void set_index(unsigned int index)
-  {
-    m_index = index;
-  }
-};
-
-template <class Traits_>
-class Gps_simplifier_traits :
-  public Gps_traits_decorator<Traits_,
-                              Gps_simplifier_curve_data,
-                              Gps_simplifier_point_data>
-{
-public:
-  typedef Traits_    Traits;
-  typedef Gps_traits_decorator<Traits_,
-                               Gps_simplifier_curve_data,
-                               Gps_simplifier_point_data>    Base;
-  typedef Gps_simplifier_traits<Traits>                      Self;
-  typedef typename Traits::X_monotone_curve_2     Base_X_monotone_curve_2;
-  typedef typename Traits::Point_2                Base_Point_2;
-  typedef typename Traits::Construct_min_vertex_2 Base_Construct_min_vertex_2;
-  typedef typename Traits::Construct_max_vertex_2 Base_Construct_max_vertex_2;
-  typedef typename Traits::Compare_endpoints_xy_2 Base_Compare_endpoints_xy_2;
-  typedef typename Traits::Compare_xy_2           Base_Compare_xy_2;
-  typedef typename Traits::Compare_y_at_x_right_2 Base_Compare_y_at_x_right_2;
-  typedef typename Traits::Compare_y_at_x_2       Base_Compare_y_at_x_2;
-  typedef typename Traits::Intersect_2            Base_Intersect_2;
-  typedef typename Traits::Split_2                Base_Split_2;
-
-protected:
-  unsigned int m_pgn_size;
-
-  
-public:
-
-  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
-  typedef typename Base::Point_2                  Point_2;
-  typedef typename Base::Multiplicity             Multiplicity; 
-
-  typedef typename Base::Curve_data               Curve_data;
-  typedef typename Base::Point_data               Point_data;
-
-  Gps_simplifier_traits()
-  {}
-
-  Gps_simplifier_traits(const Traits & tr) : Base(tr)
-  {}
-
-  unsigned int polygon_size() const
-  {
-    return m_pgn_size;
-  }
-
-  void set_polygon_size(unsigned int pgn_size)
-  {
-    m_pgn_size = pgn_size;
-  }
-
-  bool is_valid_index(unsigned int index) const
-  {
-    return (index < m_pgn_size);
-  }
-
-  unsigned int invalid_index() const
-  {
-    return (m_pgn_size);
-  }
-
-
-  class Intersect_2
-  {
-  private:
-
-    Base_Intersect_2             m_base;
-    Base_Compare_endpoints_xy_2  m_base_cmp_endpoints;
-    Base_Compare_xy_2            m_base_cmp_xy;
-    Base_Construct_min_vertex_2  m_ctr_min_v;
-    const Self * m_self_tr;
-
-  public:
-   
-    /*! Constructor. */
-    Intersect_2 (const Base_Intersect_2& base,
-                 const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
-                 const Base_Compare_xy_2& base_cmp_xy,
-                 const Base_Construct_min_vertex_2& ,
-                 const Self*  tr) : 
-      m_base(base),
-      m_base_cmp_endpoints(base_cmp_endpoints),
-      m_base_cmp_xy(base_cmp_xy),
-      m_self_tr(tr)
-    {}
-
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      //// if the two curves are incident, do not intersect them
-      //if(m_self_tr->is_valid_index(cv1.data().index()) && 
-      //   m_self_tr->is_valid_index(cv2.data().index()))
-      //{
-      //  unsigned int index_diff = 
-      //    (cv1.data().index() > cv2.data().index()) ? 
-      //    (cv1.data().index() - cv2.data().index()):
-      //    (cv2.data().index() - cv1.data().index());
-
-      //  if(index_diff == 1 ||index_diff == m_self_tr->polygon_size() -1)
-      //  {
-      //    return (oi);
-      //  }
-      //}
-      const std::pair<Base_Point_2, Multiplicity>   *base_pt;
-      const Base_X_monotone_curve_2                 *overlap_cv;
-      OutputIterator oi_end;
-      if(m_base_cmp_xy(m_ctr_min_v(cv1.base()),
-                       m_ctr_min_v(cv2.base())) == LARGER)
-        oi_end = m_base(cv1.base(), cv2.base(), oi);
-      else
-        oi_end = m_base(cv2.base(), cv1.base(), oi);
-
-      // convert objects that are associated with Base_X_monotone_curve_2 to
-      // the extenede X_monotone_curve_2 
-      for(; oi != oi_end; ++oi)
-      {
-        base_pt = object_cast<std::pair<Base_Point_2, Multiplicity> >(&(*oi));
-
-        if (base_pt != NULL)
-        {
-          Point_data pt_data(m_self_tr->invalid_index());
-          Point_2 point_plus (base_pt->first, pt_data); // the extended point
-          *oi = CGAL::make_object(std::make_pair(point_plus, 
-                                                 base_pt->second));
-        }
-        else
-        {
-          overlap_cv = object_cast<Base_X_monotone_curve_2> (&(*oi));
-
-          if (overlap_cv != NULL)
-          {
-            unsigned int ov_bc;
-            unsigned int ov_twin_bc;
-            if(m_base_cmp_endpoints(cv1) == m_base_cmp_endpoints(cv2))
-            {
-              // cv1 and cv2 have the same directions
-              ov_bc = cv1.data().bc() + cv2.data().bc();
-              ov_twin_bc = cv1.data().twin_bc() + cv2.data().twin_bc();
-            }
-            else
-            {
-              // cv1 and cv2 have opposite directions
-              ov_bc = cv1.data().bc() + cv2.data().twin_bc();
-              ov_twin_bc = cv1.data().twin_bc() + cv2.data().bc();
-            }
-
-            if(m_base_cmp_endpoints(*overlap_cv) != m_base_cmp_endpoints(cv1))
-            {
-              // overlap_cv, cv1 have opposite directions
-              std::swap(ov_bc, ov_twin_bc);
-            }
-
-            Curve_data cv_data(ov_bc, ov_twin_bc, m_self_tr->invalid_index());
-            *oi = CGAL::make_object (X_monotone_curve_2 (*overlap_cv, cv_data));
-          }
-        }
-      }
-      //return past-end iterator
-      return oi_end;
-    }
-  };
-
-   /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return Intersect_2(this->m_base_tr->intersect_2_object(),
-                       this->m_base_tr->compare_endpoints_xy_2_object(),
-                       this->m_base_tr->compare_xy_2_object(),
-                       this->m_base_tr->construct_min_vertex_2_object(),
-                       this);
-  }
-
-  class Split_2
-  {
-  private:
-    Base_Split_2      m_base_split;
-    const Self * m_self_tr;
-
-  public:
-
-    /*! Constructor. */
-    Split_2 (const Base_Split_2& base, const Self* tr) :
-      m_base_split(base),
-      m_self_tr(tr)
-    {}
-
-    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      m_base_split(cv.base(),
-                   p.base(),
-                   c1.base(),
-                   c2.base());
-      const Curve_data& cv_data = cv.data();
-      c1.set_data(Curve_data(cv_data.bc(),
-                             cv_data.twin_bc(),
-                             m_self_tr->invalid_index()));
-      
-      c2.set_data(Curve_data(cv_data.bc(),
-                             cv_data.twin_bc(),
-                             m_self_tr->invalid_index()));
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return Split_2(this->m_base_tr->split_2_object(), this);
-  }
-
-  class Construct_min_vertex_2
-  {
-  private:
-    Base_Construct_min_vertex_2 m_base;
-    Base_Compare_endpoints_xy_2 m_base_cmp_endpoints;
-    const Self * m_self_tr;
-
-  public:
-
-    Construct_min_vertex_2(const Base_Construct_min_vertex_2& base,
-                          const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
-                          const Self * tr):
-      m_base(base),
-      m_base_cmp_endpoints(base_cmp_endpoints),
-      m_self_tr(tr)
-    {}
-
-    /*!
-      * Get the left endpoint of the x-monotone curve (segment).
-      * \param cv The curve.
-      * \return The left endpoint.
-      */
-    Point_2 operator() (const X_monotone_curve_2 & cv) const
-    {
-      if(!m_self_tr->is_valid_index(cv.data().index()))
-      {
-        return Point_2 (m_base(cv.base()), m_self_tr->invalid_index());
-      }
-      
-      Comparison_result res = m_base_cmp_endpoints(cv);
-      Point_data pt_data;
-      if(res == SMALLER)
-      {
-        // min vertex is the source
-        pt_data.set_index(cv.data().index());
-      }
-      else
-      {
-        // min vertex is the target
-        pt_data.set_index((cv.data().index() + 1) % m_self_tr->polygon_size());
-      }
-      return Point_2 (m_base(cv.base()), pt_data);
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return Construct_min_vertex_2
-      (this->m_base_tr->construct_min_vertex_2_object(),
-       this->m_base_tr->compare_endpoints_xy_2_object(),
-       this);
-  }
-
-
-  class Construct_max_vertex_2
-  {
-  private:
-    Base_Construct_max_vertex_2      m_base;
-    Base_Compare_endpoints_xy_2      m_base_cmp_endpoints;
-    const Self * m_self_tr;
-
-  public:
-
-    Construct_max_vertex_2(const Base_Construct_max_vertex_2& base,
-                          const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
-                          const Self * tr):
-      m_base(base),
-      m_base_cmp_endpoints(base_cmp_endpoints),
-      m_self_tr(tr)
-    {}
-
-    /*!
-      * Get the right endpoint of the x-monotone curve (segment).
-      * \param cv The curve.
-      * \return The left endpoint.
-      */
-    Point_2 operator() (const X_monotone_curve_2 & cv) const
-    {
-      if(!m_self_tr->is_valid_index(cv.data().index()))
-      {
-        return Point_2 (m_base(cv.base()), m_self_tr->invalid_index());
-      }
-      Comparison_result res = m_base_cmp_endpoints(cv);
-      Point_data pt_data;
-      if(res == SMALLER)
-      {
-        // min vertex is the target
-        pt_data.set_index((cv.data().index() + 1) % m_self_tr->polygon_size());
-      }
-      else
-      {
-        // min vertex is the source
-        pt_data.set_index(cv.data().index());
-      }
-      return Point_2 (m_base(cv.base()), pt_data);
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return Construct_max_vertex_2
-      (this->m_base_tr->construct_max_vertex_2_object(),
-       this->m_base_tr->compare_endpoints_xy_2_object(),
-       this);
-  }
-
-  class Compare_xy_2
-  {
-  private:
-    Base_Compare_xy_2       m_base;
-    const Self * m_self_tr;
-
-  public:
-    Compare_xy_2(const Base_Compare_xy_2& base,
-                 const Self * tr):
-      m_base(base),
-      m_self_tr(tr)
-    {}
-
-
-    /*!
-      * Get the left endpoint of the x-monotone curve (segment).
-      * \param cv The curve.
-      * \return The left endpoint.
-      */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      //if one of the indexes is invalid, compare p1 and p2
-      if(! m_self_tr->is_valid_index(p1.data().index()) ||
-        ! m_self_tr->is_valid_index(p2.data().index()))
-        return (m_base(p1.base(), p2.base()));
-
-      // if the two point has the same index, return EQUAL
-      if(p1.data().index() == p2.data().index())
-      {
-        return EQUAL;
-      }
-
-      return (m_base(p1.base(), p2.base()));
-    }
-  };
-
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return Compare_xy_2(this->m_base_tr->compare_xy_2_object(), this);
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h b/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h
deleted file mode 100644
index c8e49d8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_GPS_TRAITS_ADAPTOR_H
-#define CGAL_GPS_TRAITS_ADAPTOR_H
-
-#include <CGAL/enum.h>
-#include <CGAL/assertions.h>
-
-namespace CGAL {
-
-template <class Traits_>
-class Gps_traits_adaptor : public Traits_
-{
-  typedef Traits_                     Base;
-  typedef Gps_traits_adaptor<Base>    Self;
-
-public:
-  typedef typename Base::X_monotone_curve_2      X_monotone_curve_2;
-  typedef typename Base::Point_2                 Point_2;
-  typedef typename Base::Compare_xy_2            Compare_xy_2;
-  typedef typename Base::Compare_y_at_x_right_2  Compare_y_at_x_right_2;
-  typedef typename Base::Compare_endpoints_xy_2  Compare_endpoints_xy_2;
-  typedef typename Base::Construct_min_vertex_2  Construct_min_vertex_2;
-  typedef typename Base::Construct_max_vertex_2  Construct_max_vertex_2;
-
-  /*! Default constructor. */
-  Gps_traits_adaptor () : Base()
-  {}
-
-  /*! Constructor from a base-traits class. */
-  Gps_traits_adaptor (const Base& traits) : Base (traits)
-  {}
-
-  class Construct_vertex_2 
-  {
-  public:
-    Point_2 operator()(const X_monotone_curve_2& cv, int i) const
-    {
-      Base tr;
-      Compare_endpoints_xy_2 cmp_endpoints = 
-        tr.compare_endpoints_xy_2_object();
-      Construct_min_vertex_2 ctr_min_v = tr.construct_min_vertex_2_object();
-      Construct_max_vertex_2 ctr_max_v = tr.construct_max_vertex_2_object();
-      i %= 2;
-      if (i==0)
-      {
-        // return the source
-        if(cmp_endpoints(cv) == SMALLER)
-          return (ctr_min_v(cv));
-        
-        return (ctr_max_v(cv));
-      }
-
-      // else i==1 (return the target)
-      if(cmp_endpoints(cv) == SMALLER)
-        return (ctr_max_v(cv));
-      
-      return (ctr_min_v(cv));
-    }
-  };
-
-  Construct_vertex_2 construct_vertex_2_object() const
-  {
-    return Construct_vertex_2();
-  }
-
-  class Orientation_2
-  {
-  public:
-    template <class CurveInputIteraor>
-    Orientation operator()(CurveInputIteraor begin,
-                           CurveInputIteraor end) const
-    {
-      Self tr;
-      Compare_xy_2 cmp_xy = tr.compare_xy_2_object();
-      Compare_y_at_x_right_2 cmp_y_at_x_right = 
-        tr.compare_y_at_x_right_2_object();
-      Construct_vertex_2 ctr_v = tr.construct_vertex_2_object();
-
-      CurveInputIteraor from_left_most = begin;
-      CurveInputIteraor into_left_most = end;
-
-      Point_2 left_most_v = ctr_v(*from_left_most, 0);
-      
-      --into_left_most;
-
-      CurveInputIteraor ci = from_left_most;
-
-      for(++ci ; ci != end; ++ci)
-      {
-        Comparison_result res_xy = cmp_xy( ctr_v(*ci, 0), left_most_v);
-        if(res_xy == LARGER)
-          continue;
-        if(res_xy == SMALLER)
-        {
-          left_most_v =  ctr_v(*ci, 0);
-          from_left_most = into_left_most = ci;
-          --into_left_most;
-        }
-        else
-        {
-          // res_xy == EQUAL
-          CurveInputIteraor tmp_from_left_most = ci;
-          CurveInputIteraor tmp_into_left_most = ci;
-          --tmp_into_left_most;
-
-          Comparison_result res_from = cmp_y_at_x_right(*from_left_most,
-                                                        *tmp_from_left_most,
-                                                        left_most_v);
-
-          Comparison_result res_to = cmp_y_at_x_right(*into_left_most, 
-                                                      *tmp_into_left_most,
-                                                      left_most_v);
-          
-          CGAL_assertion(res_from != EQUAL && res_to != EQUAL);
-          if(res_from == LARGER && res_to == SMALLER)
-          {
-            if(cmp_y_at_x_right(*tmp_from_left_most,
-                                *into_left_most,
-                                left_most_v) == LARGER)
-            {
-              from_left_most = tmp_from_left_most;
-              into_left_most = tmp_into_left_most;
-            }
-          }
-          else
-            if(res_from == SMALLER && res_to == LARGER)
-            {
-              if(cmp_y_at_x_right(*tmp_into_left_most,
-                                  *from_left_most,
-                                  left_most_v) == LARGER)
-              {
-                from_left_most = tmp_from_left_most;
-                into_left_most = tmp_into_left_most;
-              }
-            }
-        }
-      }// end for
-      Comparison_result res = cmp_y_at_x_right(*into_left_most, 
-                                              *from_left_most,
-                                              left_most_v);
-      CGAL_assertion(res != EQUAL);
-      if(res == SMALLER)
-        return (CLOCKWISE);
-      return (COUNTERCLOCKWISE);
-    }
-  };
-
-  Orientation_2 orientation_2_object() const
-  {
-    return Orientation_2();
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v6.h b/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v6.h
deleted file mode 100644
index 3b23c8f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v6.h
+++ /dev/null
@@ -1,1030 +0,0 @@
-// Copyright (c) 2005-2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot, Sylvain Pion
-
-
-#ifndef CGAL_IPELET_BASE_H
-#define CGAL_IPELET_BASE_H
-
-// Ipe headers use uint which is not standard.
-#ifdef __APPLE__
-typedef unsigned int uint;
-#endif
-
-#include <ipelib.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Weighted_point.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/grabbers.h>
-#include <CGAL/iterator.h>
-#include <CGAL/tuple.h>
-#include<CGAL/Exact_circular_kernel_2.h>
-#include <CGAL/Cartesian_converter.h>
-
-#include <boost/utility.hpp>
-
-namespace CGAL{
-
-  template <class Kernel,int nbf>
-  class Ipelet_base : public Ipelet {
-  private:  
-    const std::string* SubLab;
-    const std::string* HMsg;
-    std::string Name;
-    IpePage* _page;
-    IpeletHelper* _helper;
-  
-  public:
-    
-    //typedefs
-    typedef typename Kernel::FT                                               FT;
-    typedef typename CGAL::Point_2<Kernel>                                    Point_2;
-    typedef typename CGAL::Weighted_point<Point_2,FT>                         Weighted_point_2;
-    typedef typename Kernel::Segment_2                                        Segment_2;
-    typedef typename Kernel::Ray_2                                            Ray_2;
-    typedef typename Kernel::Line_2                                           Line_2;
-    typedef typename Kernel::Iso_rectangle_2                                  Iso_rectangle_2;
-    typedef typename Kernel::Triangle_2                                       Triangle_2;
-    //~ typedef typename CGAL::Polygon_2<Kernel,std::list<Point_2> >              Polygon_2;
-    typedef typename CGAL::Polygon_2<Kernel>              Polygon_2;
-  
-    typedef typename Kernel::Circle_2                                         Circle_2;
-    typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign>           Circular_arc_2;
-  
-  
-    Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
-      :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),_page(NULL),_helper(NULL){};
-    
-    
-    IpePage* get_IpePage() const {return _page;}
-    IpeletHelper* get_IpeletHelper() const {return _helper;}
-    int IpelibVersion() const { return IPELIB_VERSION; }
-    int NumFunctions() const { return nbf; }
-    virtual const char *Label() const{ return &Name[0]; }
-    const char *About() const {return "http://www.cgal.org";};
-    virtual const char *SubLabel(int function) const {return &SubLab[function][0];};
-    virtual const char *HelpMsg(int function) const{return &HMsg[function][0];};
-    void Run (int i, IpePage *page, IpeletHelper *helper) {
-      _page=page;
-      _helper=helper;
-      try{
-        protected_run(i);
-      }
-      catch(...){
-        helper->MessageBox("Error : Save your page in a file and submit it to \n http://www.cgal.org/bug_report.html","OK",NULL,NULL);
-      }
-    };
-
-    virtual void protected_run(int)=0;
-    
-    void group_selected_objects_() const {
-      get_IpePage()->Group(get_IpeletHelper()->CurrentLayer());    
-    }
-    
-    void transform_selected_objects_(const IpeMatrix& tfm) const {
-      for (IpePage::iterator it = get_IpePage() -> begin();it!=get_IpePage() -> end(); ++it)
-        if (it->Select()) it->Transform(tfm);
-    }    
-    
-    void show_help(bool gen=true) const{
-      std::string hmsg;
-      hmsg="<qt><h1>"+Name+"</h1><ul>";
-      if (gen)
-        for(int i=0;i<nbf-1;++i)
-          hmsg=hmsg+"<li><i>"+SubLab[i]+"</i>: "+HMsg[i]+"</li>";
-      else
-        hmsg=hmsg+"<li>"+HMsg[0]+"</li>";
-      _helper->MessageBox(&hmsg[0],"OK",NULL,NULL);
-      return;
-    }
-
-    
-    //grabbers
-    
-    template <class output_iterator>
-    struct Point_grabber:public internal::Point_grabber<Kernel,output_iterator>{
-      Point_grabber(output_iterator it):internal::Point_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Point_grabber<output_iterator> >
-    point_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Point_grabber<output_iterator>(it));
-    }
-    
-
-    template <class output_iterator>
-    struct Segment_grabber:public internal::Segment_grabber<Kernel,output_iterator>{
-      Segment_grabber(output_iterator it):internal::Segment_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Segment_grabber<output_iterator> >
-    segment_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Segment_grabber<output_iterator>(it));
-    }
-    
-    template <class output_iterator>
-    struct Wpoint_grabber:public internal::Wpoint_grabber<Kernel,output_iterator>{
-      Wpoint_grabber(output_iterator it):internal::Wpoint_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Wpoint_grabber<output_iterator> >
-    wpoint_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Wpoint_grabber<output_iterator>(it));
-    }     
-    
-    //Interaction functions
-    //------------------------------
-    
-    void 
-    print_error_message(const char* s) const
-    {
-      _helper->Message(s);
-    }
-    
-    template <class T>
-    std::pair<int,T> 
-    request_value_from_user(std::string msg) const
-    {
-      IpeString str;
-      std::pair<int,T> ret_val=std::make_pair(-1,T());
-      if (_helper-> GetString(msg.c_str(),str)){
-        if (!str.empty()){
-          IpeLex lex(str);
-          lex >> ret_val.second;
-          ret_val.first=1;
-        }
-        else
-          ret_val.first=0;
-      }
-      return ret_val;
-    }
-
-    //Conversion functions
-    //------------------------------
-    Point_2 
-    segment_endpoint(const IpePathSegment& segment,IpePath* obj_ipe,int i) const
-    {
-      CGAL_precondition(i<2);
-      IpeVector pt_ipe = obj_ipe -> Matrix() * segment.CP(i);
-      return Point_2((double)(pt_ipe.iX),(double)(pt_ipe.iY));//conversion into CGAL point
-    }
-
-    Point_2 
-    to_point_2(IpeObject*  object) const
-    {
-      IpeVector pt_ipe = object-> Matrix() * object-> AsMark() -> Position();
-      return Point_2((double)(pt_ipe.iX),(double)(pt_ipe.iY));//conversion into CGAL point
-    }    
-
-    Circle_2 
-    to_circle_2(IpePath* obj_ipe,int subpath=0) const 
-    {
-      const IpeEllipse* ell_ipe = obj_ipe -> SubPath(subpath) -> AsEllipse();
-      IpeMatrix mat_ipe = obj_ipe -> Matrix() * ell_ipe -> Matrix();
-      FT radius = (mat_ipe*IpeVector(1,0)-mat_ipe.Translation()).Len();
-      IpeVector pt_ipe = mat_ipe.Translation();
-      return Circle_2(Point_2(pt_ipe.iX,pt_ipe.iY),radius*radius);
-    }
-
-    
-    //Picking functions
-    //------------------------------
-
-    bool 
-    is_only_rotated_or_scaled(const IpeMatrix& m) const 
-    {
-      return (m.iA[0]==m.iA[3] && m.iA[1]==-m.iA[2]);
-    }
-
-    bool 
-    is_IPE_circle(IpeObject* object,int subpath=0) const 
-    {
-      return ( object -> AsPath() && object -> AsPath() -> SubPath(subpath) -> AsEllipse() 
-        && is_only_rotated_or_scaled(object ->AsPath()->Matrix()));
-    }
-
-    
-private:
-    //declaration
-    template< class multi_output_iterator >
-    bool read_one_active_object( IpeObject* object,
-      multi_output_iterator it_out) const;
-
-public:    
-
-    template< class V,class O>
-    Iso_rectangle_2 
-    read_active_objects (
-      CGAL::Dispatch_or_drop_output_iterator<V,O> it_out,
-      bool deselect_all=true,
-      bool delete_selected_objects=false) const 
-    {
-      IpeRect bbox_ipe;
-      
-      if (!_page->HasSelection()) {
-        return Iso_rectangle_2();
-      }
-      
-      for(IpePage::iterator it = get_IpePage() -> begin(); it!=get_IpePage() -> end(); ++it){
-        if ( !it->Select() )
-          continue;
-        
-        bbox_ipe.AddRect(it->BBox());
-        
-        //Test one function for segments, circles, circle arcs and polygons
-        bool desel_it=read_one_active_object(it->Object(),it_out);
-        if ( delete_selected_objects && desel_it  )
-          it->SetSelect(IpePgObject::ENone);
-      }
-      
-      if (delete_selected_objects)
-        _page -> Delete();
-      
-      if (deselect_all)
-        _page->DeselectAll();
-      
-      Iso_rectangle_2 bbox_cgal(
-        static_cast<double>(bbox_ipe.Min().iX),static_cast<double>(bbox_ipe.Min().iY),
-        static_cast<double>(bbox_ipe.Max().iX),static_cast<double>(bbox_ipe.Max().iY)
-      );
-        
-        return bbox_cgal;
-    }
-    
-    //drawing functions
-    //------------------------------
-
-    void 
-    copy_attributes(IpeAllAttributes& AAttr,IpeObject* obj_ipe) const 
-    {
-      AAttr.iStroke = obj_ipe -> Stroke();
-      
-      if (obj_ipe->AsFillable()){
-        AAttr.iFill = obj_ipe->AsFillable() -> Fill();
-        AAttr.iLineWidth = obj_ipe->AsFillable() -> LineWidth();
-        AAttr.iDashStyle = obj_ipe->AsFillable() -> DashStyle();
-      }  
-      if (obj_ipe->AsPath()){
-        AAttr.iForwardArrow = obj_ipe->AsPath() -> ForwardArrow();
-        AAttr.iBackwardArrow = obj_ipe->AsPath() -> BackwardArrow();
-      }
-    }
-    
-    
-    void 
-    create_polygon_with_holes(bool delete_underlying_polygons=false) const
-    {
-      std::list<IpeSubPath*> SSPqu;
-      for(IpePage::iterator it=get_IpePage()->begin();it!=get_IpePage()->end();++it){
-        if(it->Select() && it->Object()->AsPath()->SubPath(0)->Closed()){
-          IpeSubPath* ssp=it->Object()->AsPath()->SubPath(0)->Transform(it->Object()->AsPath()->Matrix());
-          SSPqu.push_back(ssp);
-        }
-      }
-      if (!delete_underlying_polygons)
-        get_IpePage() -> DeselectAll();
-      IpePath* obj_ipe = new IpePath(get_IpeletHelper() -> Attributes());// create new objects with current attributes
-      for (std::list<IpeSubPath*>::iterator it=SSPqu.begin();it!=SSPqu.end();++it)  
-        obj_ipe->AddSubPath(*it);
-      if (delete_underlying_polygons)
-        get_IpePage()->Delete();
-      get_IpePage()->push_back(IpePgObject(IpePgObject::ESecondary,get_IpeletHelper()->CurrentLayer(),obj_ipe));    
-    }    
-    
-    void 
-    center_selection_in_page() const 
-    {
-      IpeVector paper_size=get_paper_size();
-      IpeMatrix tfm (1,0,0,1,paper_size.iX/2.,paper_size.iY/2.);
-      for (IpePage::iterator it = get_IpePage()->begin(); it != get_IpePage()->end(); ++it)
-        if (it->Select())
-          it->Transform(tfm);
-    }
-    
-    template<class iterator>
-    IpeSegmentSubPath* 
-    create_polyline(const iterator first, const iterator last,bool setclose=false) const 
-    {
-      if (boost::next(first)!=last){
-        IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
-        IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
-        for (iterator it = boost::next(first);it!=last;++it){
-          IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
-          SSP_ipe -> AppendSegment(Prev_pt,Cur_pt);
-          Prev_pt=Cur_pt;
-        }
-        if (setclose)
-          SSP_ipe->SetClosed(true);
-        return SSP_ipe;
-      }
-      return NULL;
-    }
-    
-    
-    template<class iterator>
-    IpePath* 
-    draw_polyline_in_ipe(const iterator first, const iterator last,
-                         bool setclose=false,bool deselect_all=false,
-                         bool blackfill=false,
-                         typename boost::enable_if<
-                                    boost::is_same<
-                                      typename std::iterator_traits<iterator>::value_type,
-                                      Point_2
-                                    > 
-                                  >::type* =NULL) const 
-    {
-      IpeSegmentSubPath* SSP_ipe=create_polyline(first,last,setclose);
-      if (SSP_ipe!=NULL){
-        IpePath* obj_ipe = new IpePath(_helper->Attributes());
-        obj_ipe->AddSubPath(SSP_ipe);
-        if (blackfill)
-          obj_ipe->SetFill(IpeAttribute::Black());
-        _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
-        if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-        return obj_ipe;
-      }
-      return NULL;  
-    }
-    
-    void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
-      IpeEllipse *ellipse = new IpeEllipse(IpeMatrix(sqrt(CGAL::to_double(C.squared_radius())),0,
-                                                     0,sqrt(CGAL::to_double(C.squared_radius())),
-                                                     to_double(C.center().x()),to_double(C.center().y())
-                                           )
-                                );
-      IpePath *path = new IpePath(_helper->Attributes());
-      path->AddSubPath(ellipse);
-      _page->push_back(IpePgObject(IpePgObject::EPrimary,_helper->CurrentLayer(), path));
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
- 
-    void
-    draw_in_ipe(const Point_2& P,bool deselect_all=false) const 
-    {
-      IpeMark *mark = new IpeMark(_helper->Attributes(), IpeVector(CGAL::to_double(P.x()),CGAL::to_double(P.y())));
-      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),mark));
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
-    
-    void 
-    draw_in_ipe(const Segment_2& S,bool deselect_all=false) const 
-    {
-      IpeSegment seg_ipe;
-      seg_ipe.iP = IpeVector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y()));
-      seg_ipe.iQ = IpeVector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y()));
-      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),new IpePath(_helper->Attributes(),seg_ipe)));
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
-    
-    template<class Container>
-    void 
-    draw_in_ipe(const CGAL::Polygon_2<Kernel,Container>& poly,bool deselect_all=false) const 
-    {
-      std::list<Point_2> LP;
-      for (typename CGAL::Polygon_2<Kernel,Container>::iterator it=poly.vertices_begin();it!= poly.vertices_end();++it)
-        LP.push_back(*it);
-      draw_polyline_in_ipe(LP.begin(),LP.end(),true,deselect_all,false);
-    }
-
-    void 
-    draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const 
-    {
-      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath;
-      IpeVector ipeS=IpeVector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()),
-                                CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format
-      IpeVector ipeT=IpeVector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()),
-                                CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format
-      SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0,
-                                   0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
-                                     sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),
-                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()),
-                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())),
-                                   ipeS,ipeT);
-      IpePath* obj_ipe = new IpePath(_helper->Attributes());
-      obj_ipe->AddSubPath(SSP_ipe);
-      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
-
-
-    void
-    draw_in_ipe(const Triangle_2& t,bool deselect_all=false) const 
-    {
-      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
-      IpeVector P0=IpeVector(t[0].x(),t[0].y());
-      IpeVector P1=IpeVector(t[1].x(),t[1].y());
-      IpeVector P2=IpeVector(t[2].x(),t[2].y());
-      SSP_ipe->AppendSegment(P0,P1);
-      SSP_ipe->AppendSegment(P1,P2);
-      SSP_ipe->AppendSegment(P2,P0);
-      SSP_ipe->SetClosed(true);
-      IpePath* obj_ipe = new IpePath(_helper->Attributes());
-      obj_ipe->AddSubPath(SSP_ipe);
-      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
-    
-    void 
-    draw_in_ipe(const Iso_rectangle_2& r,bool deselect_all=false)
-    {
-      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
-      IpeVector P0=IpeVector(r[0].x(),r[0].y());
-      IpeVector P1=IpeVector(r[1].x(),r[1].y());
-      IpeVector P2=IpeVector(r[2].x(),r[2].y());
-      IpeVector P3=IpeVector(r[3].x(),r[3].y());
-      SSP_ipe->AppendSegment(P0,P1);
-      SSP_ipe->AppendSegment(P1,P2);
-      SSP_ipe->AppendSegment(P2,P3);
-      SSP_ipe->AppendSegment(P3,P0);
-      SSP_ipe->SetClosed(true);
-      IpePath* obj_ipe = new IpePath(_helper->Attributes());
-      obj_ipe->AddSubPath(SSP_ipe);
-      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));      
-      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
-    }
-    
-    
-    //Drawing function with bbox : global version
-    template <class T>
-    void 
-    draw_in_ipe(const T& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      Segment_2 s;
-      bool success=cast_into_seg(object,bbox,&s);
-      if (success)
-        draw_in_ipe(s,deselect_all);
-    }
-  private:
-    enum Type_circ_arc{SRC,TRG,OSRC,OTRG};
-  public:  
-    void 
-    draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      std::vector<Circular_arc_2> arc_list;
-      const Circle_2& circle=CGAL::cpp11::get<0>(object);
-      restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
-      if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
-        draw_in_ipe(object,deselect_all);
-        return;
-      }
-      
-      const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
-                            &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object);
-      const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
-                            &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object);
-      std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
-      typedef  typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
-      Map_theta_iterator s_it=map_theta.insert(
-                                std::make_pair(get_theta(*source,circle),std::make_pair(OSRC,source)));
-      /*Map_theta_iterator t_it=*/map_theta.insert(
-                                std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
-      
-      for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
-        const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
-                             &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc);
-        const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
-                             &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc);        
-        map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
-        map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
-      }
-      
-      Map_theta_iterator next_s=s_it;
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      switch (next_s->second.first){
-        case TRG:
-          draw_in_ipe(Circular_arc_2(circle,*source,*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-          break;
-        case OSRC:
-	  CGAL_error();
-        case SRC:{
-          Map_theta_iterator current=next_s;
-          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-          draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-          if(next_s->second.first==OTRG) return;
-          break;
-        }
-        case OTRG:
-          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.end();
-          if (next_s->second.first==TRG){
-            draw_in_ipe(object);
-            return;
-          }
-          else
-            return;
-      }
-      
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      Map_theta_iterator current=next_s;
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      do{
-        if (current->second.first==OTRG) return;
-        assert(current->second.first==SRC);
-        draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-        if (next_s->second.first==OTRG) return;
-        assert(next_s->second.first==TRG);
-        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-        current=next_s;
-        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      }while(true);
-      
-    }
-    
-    
-    void
-    draw_in_ipe(const Circle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      std::vector<Circular_arc_2> arc_list;
-      restrict_circle_to_bbox(object,bbox,std::back_inserter(arc_list));
-      if (arc_list.empty() && bbox.has_on_bounded_side(object.center()) )
-        draw_in_ipe(object,deselect_all);
-      else
-        draw_in_ipe(arc_list.begin(),arc_list.end(),false,deselect_all);
-    }
-      
-    
-    void 
-    draw_in_ipe(const Triangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-       for (unsigned int i=0;i!=3;++i)
-        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all);
-    }
-      
-    void 
-    draw_in_ipe(const Iso_rectangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      for (unsigned int i=0;i!=4;++i)
-        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all); 
-    }
-      
-    void 
-    draw_in_ipe(const Polygon_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      for (typename Polygon_2::Edge_const_iterator it=object.edges_begin();it!=object.edges_end();++it)
-        draw_in_ipe(*it,bbox,deselect_all);
-    }
-      
-      
-      
-    template<class GT,class TDS>
-    void 
-    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
-      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
-      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
-      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
-        draw_in_ipe(tri.segment(*it),bbox);
-      if (deselect_all)
-        _page->DeselectAll();
-    }
-    
-    void
-    draw_in_ipe(const Line_2& line,bool deselect_all=false) const 
-    {
-      IpeVector paper_size=get_paper_size();
-      Iso_rectangle_2 bbox(0,0,paper_size.iX,paper_size.iY);
-      draw_in_ipe(line,bbox,deselect_all);
-    }
-      
-    void
-    draw_in_ipe(const Ray_2& ray,bool deselect_all=false)
-    {
-      IpeVector paper_size=get_paper_size();
-      Iso_rectangle_2 bbox(0,0,paper_size.iX,paper_size.iY);
-      draw_in_ipe(ray,bbox,deselect_all);      
-    }
-    
-    template<class GT,class TDS>
-    void
-    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,bool deselect_all=false,bool make_grp=true) const 
-    {
-      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
-      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
-      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
-      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
-        draw_in_ipe(tri.segment(*it));
-      if (make_grp)
-        _page->Group(_helper->CurrentLayer());
-      if (deselect_all)
-        _page->DeselectAll();
-    }
-    
-    template<class iterator>
-    void 
-    draw_in_ipe(const iterator begin,const iterator end,bool make_grp=true,bool deselect_all=false) const
-    {
-      for (iterator it=begin;it!=end;++it)
-        draw_in_ipe(*it);
-      if (make_grp and ++iterator(begin)!=end)
-        _page->Group(_helper->CurrentLayer());
-      if (deselect_all)
-        _page->DeselectAll();      
-    }
-
-    template<class iterator>
-    void
-    draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false,
-     typename boost::enable_if<  boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Point_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Segment_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circle_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circular_arc_2> ,
-                                                  boost::is_same<typename std::iterator_traits<iterator>::value_type,Polygon_2>
-                                                > > > >
-                    >::type* = NULL) const
-    {
-      for (iterator it=begin;it!=end;++it)
-        draw_in_ipe(*it,bbox);
-      if (make_grp and ++iterator(begin)!=end)
-        _page->Group(_helper->CurrentLayer());
-      if (deselect_all)
-        _page->DeselectAll();      
-    }
-    
-    private:
-    
-    IpeVector 
-    get_paper_size() const {
-      if (IPELIB_VERSION >=  60028)
-        return get_IpeletHelper()->StyleSheet()->findLayout().iPaperSize;
-      else
-        return IpeVector(595,842);
-    }
-    
-    struct Voronoi_from_tri{  //Class using stream to get the voronoi diagram
-      std::list<Ray_2> ray_list;
-      std::list<Line_2> line_list;
-      std::list<Segment_2> seg_list;
-
-      void operator<<(const Ray_2& p){ray_list.push_back(p);}
-      void operator<<(const Line_2& p){line_list.push_back(p);}
-      void operator<<(const Segment_2& p){seg_list.push_back(p);}
-
-    };
-    
-    template <class T,class output_iterator>
-    bool 
-    cast_into_seg(const T& obj,const Iso_rectangle_2& bbox,output_iterator out_it) const{
-      CGAL::Object obj_cgal = CGAL::intersection(obj,bbox);
-      Segment_2 s;
-      bool ret=CGAL::assign(s, obj_cgal);
-      if (ret) *out_it++=s;
-      return ret;
-    }
-    
-    //Convert infinite objects into drawable segments
-    template<class iterator,class output_iterator>
-    void 
-    cast_into_seg(const iterator first,const iterator end,
-                  const Iso_rectangle_2& bbox, output_iterator out_it) const
-    {
-      for (iterator it=first;it!=end;++it)
-        cast_into_seg(*it,bbox,out_it);
-    }
-
-    
-    
-    void 
-    draw_dual_(Voronoi_from_tri& v_recup,const Iso_rectangle_2& bbox,bool makegrp) const
-    {
-      std::vector<Segment_2> seg_cont;
-      //filter degenerate segments
-      for(typename std::list<Segment_2>::iterator iteS = v_recup.seg_list.begin();iteS!=v_recup.seg_list.end();){
-        typename std::list<Segment_2>::iterator itc=iteS++;
-        if (itc->is_degenerate())
-          v_recup.seg_list.erase(itc);
-      }
-      
-      cast_into_seg(v_recup.ray_list.begin(),v_recup.ray_list.end(),bbox,std::back_inserter(seg_cont));//cast rays into segments in bbox
-      cast_into_seg(v_recup.line_list.begin(),v_recup.line_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
-      cast_into_seg(v_recup.seg_list.begin(),v_recup.seg_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
-      draw_in_ipe(seg_cont.begin(), seg_cont.end(),makegrp);
-    }
-    
-    public:
-    template<class Triangulation>
-    void 
-    draw_dual_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,bool makegrp=true,bool deselect_all=false) const
-    {
-    //~ template<class GT,class TDS>
-    //~ void draw_dual_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{
-      Voronoi_from_tri v_recup;
-      T.draw_dual(v_recup);
-      draw_dual_(v_recup,bbox,makegrp);
-      if (deselect_all) _page->DeselectAll();
-    }
-
-    template<class Triangulation>
-    void
-    draw_skeleton_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,
-                         bool makegrp=true,bool deselect_all=false) const
-    {
-    //~ template<class GT,class TDS>
-    //~ void draw_skeleton_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{    
-      Voronoi_from_tri v_recup;
-      T.draw_skeleton(v_recup);
-      draw_dual_(v_recup,bbox,makegrp);
-      if (deselect_all) _page->DeselectAll();
-    }
-    
-    //Circle restriction
-  private:
-    inline double get_theta(const Point_2& point, const Circle_2& circle) const {
-      return atan2(CGAL::to_double(point.y()-circle.center().y()),CGAL::to_double(point.x()-circle.center().x()));
-    }
-  
-    //SK objects
-    typedef CGAL::Exact_circular_kernel_2 SK;
-    typedef SK::Circle_2                  Exact_circle_2;
-    typedef SK::Point_2                   Exact_point_2;
-    typedef SK::Circular_arc_point_2      Circular_arc_point_2;
-
-
-
-    //s and t are given such that if center of exact_circle is inside bbox then turn COUNTERCLOCKWISE
-    Circular_arc_2 
-    build_arc(const Exact_circle_2& exact_circle,const SK::Circular_arc_point_2& s,
-              const SK::Circular_arc_point_2& t,bool sign_known=false) const 
-    {
-      Point_2 sd=Point_2(CGAL::to_double(s.x()),CGAL::to_double(s.y()));
-      Point_2 td=Point_2(CGAL::to_double(t.x()),CGAL::to_double(t.y()));
-      Point_2 center(CGAL::to_double(exact_circle.center().x()),CGAL::to_double(exact_circle.center().y()));
-      CGAL::Cartesian_converter<SK,Kernel> conv;
-      Circle_2 approx_circle=conv(exact_circle);  
-      if (!sign_known){
-        CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
-        return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign);
-      }
-      return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
-    }
-
-    void 
-    get_pair_indices(int* array,int* pair) const {
-      for (int i=0;i<8;++i)
-        if (array[i]!=-1) *pair++=i;
-    }
-
-    void 
-    set_done(int* array,int index) const {
-      for (int i =0;i<8;++i)
-        if (array[i]==index) array[i]=-1;
-    }
-
-
-    bool 
-    indices_are_on_opposite_side(int* array) const {
-        if (array[0]!=-1 || array[5]!=-1)
-          return array[2]!=-1 || array[7]!=-1;
-        if (array[1]!=-1 || array[6]!=-1)
-          return array[3]!=-1 || array[4]!=-1;
-        return false;
-    }
-
-    int 
-    count_points(int* array) const {
-      int ret=0;
-      for (int i =0;i<8;++i)
-        if (array[i]!=-1) ++ret;
-      return ret;
-    }
-
-  public:
-    //
-    // .-----7---------2-------.
-    // |                       |
-    // 3                       6
-    // |     indices           |
-    // 4                       1
-    // |                       |
-    // .-----0---------5-------.
-    template <class Output_iterator>
-    void 
-    restrict_circle_to_bbox(const Circle_2& approx_circle,
-                            const Iso_rectangle_2& bbox,Output_iterator out) const
-    {
-      CGAL::Cartesian_converter<Kernel,SK> conv;
-      Exact_circle_2 exact_circle=conv(approx_circle);
-
-      SK::Intersect_2 inter=SK().intersect_2_object();
-      std::vector< std::pair<Circular_arc_point_2,unsigned> > points;
-      points.reserve(8);
-      
-      std::vector<CGAL::Object> ints;
-      ints.reserve(2);
-      std::pair<Circular_arc_point_2,unsigned> tmp_pt;
-      
-      int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1};
-      
-      for (unsigned i=0;i!=4;++i){
-        ints.clear();
-        SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4]));
-        inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints));
-        unsigned index=0;
-        bool ok=true;
-        switch (ints.size()){
-          case 1:
-            ok=CGAL::assign(tmp_pt,ints[0]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[i]=index;
-            indices[(i+1)%4+4]=index;
-            break;
-          case 2:
-            int right_ind=i<2?0:1;
-            ok=CGAL::assign(tmp_pt,ints[right_ind]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[i]=index;
-            ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[(i+1)%4+4]=index;      
-            break;
-        }
-      }
-
-      //corner case
-      for (unsigned i=0;i!=4;++i){
-        if (indices[i]!=-1 && indices[i+4]!=-1){
-          *out++=build_arc(exact_circle,points[ indices[i+4] ].first,points[ indices[i] ].first);
-          if (points[ indices[i] ].second==1) set_done(indices,indices[i]);
-          else indices[i]=-1;      
-          if (points[ indices[i+4] ].second==1) set_done(indices,indices[i+4]);
-          else indices[i+4]=-1;
-        }
-      }
-      int rem_pt=count_points(indices);
-      if (rem_pt==4){
-        //double opposite
-        if (indices[0]!=-1){
-          *out++=build_arc(exact_circle,points[ indices[7] ].first,points[ indices[0] ].first);
-          if (indices[7]!=indices[2] && indices[0]!=indices[5])
-            *out++=build_arc(exact_circle,points[ indices[5] ].first,points[ indices[2] ].first);
-        }
-        else{
-          *out++=build_arc(exact_circle,points[ indices[6] ].first,points[ indices[3] ].first);
-          if (indices[6]!=indices[1] && indices[3]!=indices[4])
-            *out++=build_arc(exact_circle,points[ indices[4] ].first,points[ indices[1] ].first);      
-        }
-        return;  
-      }
-      
-      if (rem_pt==2){
-        int pair[2];
-        get_pair_indices(indices,pair);
-        if (!indices_are_on_opposite_side(indices))
-          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first,true);
-        else
-          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first);
-        return;
-      }
-      assert (rem_pt==0);
-    }
-  };
-  
-  
-  //definition
-  template <class Kernel,int nbf>
-  template< class multi_output_iterator >
-  bool 
-  Ipelet_base<Kernel,nbf>::read_one_active_object(IpeObject* object,
-                                                  multi_output_iterator it_out) const 
-  {
-    if (object->AsGroup()){
-      bool deselect_grp=false;
-      for (IpeGroup::const_iterator it=object->AsGroup()->begin();
-                                    it!=object->AsGroup()->end();++it)
-      {
-        IpeObject *obj = (*it)->Clone();
-        obj->SetMatrix(obj->Matrix()*object->Matrix());
-        bool cur=read_one_active_object(obj,it_out);
-        deselect_grp=deselect_grp || cur;
-      }
-      return deselect_grp;
-    }
-    
-    //detect Points
-    if( object->AsMark() ){
-      if ( !CGAL::Is_in_tuple<Point_2,typename multi_output_iterator::Value_type_tuple>::value ) 
-        return true;
-      it_out++=to_point_2(object);
-      return false;
-    }
-    bool to_deselect=true;
-    //Test one function for segments, circles, circle arcs and polygons
-    if (object->AsPath()){
-      //iterate on each subpath
-      to_deselect=false;
-      for (int i=0;i<object->AsPath()->NumSubPaths();++i){
-        if(object->AsPath()-> SubPath(i)->AsSegs()){
-          std::list<Segment_2> seg_list;
-          bool is_polygon=object-> AsPath() -> SubPath(i)->Closed();
-          
-          const IpeSegmentSubPath* SSP_ipe = object -> AsPath() -> SubPath(i) -> AsSegs();
-          for(int j=0; j< SSP_ipe->NumSegments();++j){
-            if (SSP_ipe -> Segment(j).Type()==IpePathSegment::ESegment){
-              //TODO depending on if current_it  is  a polygon or not do not do the same thing
-              seg_list.push_back(Segment_2(segment_endpoint(SSP_ipe -> Segment(j),object -> AsPath(),0),
-                                  segment_endpoint(SSP_ipe -> Segment(j),object -> AsPath(),1)));
-            }
-            else{
-              //retrieve circle arcs
-              if(SSP_ipe -> Segment(j).Type()==IpePathSegment::EArc &&
-                 is_only_rotated_or_scaled(object->AsPath()->Matrix()))
-              {//retreve circle arcs
-                if ( !CGAL::Is_in_tuple<Circular_arc_2,typename multi_output_iterator::Value_type_tuple>::value ){
-                  to_deselect=true;
-                  continue;
-                }
-                is_polygon=false;
-                IpePath* obj_ipe=object->AsPath();
-                IpeMatrix mat=obj_ipe->Matrix() * SSP_ipe->Segment(j).Matrix();
-                IpeVector ipe_center=IpeVector(mat.iA[4],mat.iA[5]);
-                IpeVector ipe_first=obj_ipe->Matrix() * SSP_ipe->Segment(j).CP(0);
-                IpeVector ipe_last=obj_ipe->Matrix() * SSP_ipe->Segment(j).Last();
-                //TODO Check how object is defined
-                Circular_arc_2 arc(
-                            Circle_2(Point_2(ipe_center.iX,ipe_center.iY),(ipe_first-ipe_center).Len()*(ipe_first-ipe_center).Len()),
-                            Point_2(ipe_first.iX,ipe_first.iY),
-                            Point_2(ipe_last.iX,ipe_last.iY),
-                            mat.iA[0]*mat.iA[3]-mat.iA[1]*mat.iA[2]<0?CGAL::CLOCKWISE:CGAL::COUNTERCLOCKWISE
-                          );
-                it_out++=arc;
-              }
-              else
-                to_deselect=true;
-            }
-          }
-          if (object->AsPath() -> SubPath(i)->Closed() && 
-              (SSP_ipe -> Segment(0).CP(0)-SSP_ipe -> Segment(SSP_ipe->NumSegments()-1).CP(1)).Len()!=0 ){ //for close polygon, seg
-            seg_list.push_back( Segment_2(
-                              segment_endpoint(SSP_ipe -> Segment(SSP_ipe->NumSegments()-1),object-> AsPath(),1),
-                              segment_endpoint(SSP_ipe -> Segment(0),object-> AsPath(),0)
-                              ));
-          }
-          //~ if (seg_list.empty())
-            //~ to_deselect=true;
-          
-          if (is_polygon){
-            if (  !CGAL::Is_in_tuple<Polygon_2,typename multi_output_iterator::Value_type_tuple>::value  )
-              to_deselect=true;
-            else{
-              Polygon_2 polygon;
-              typename std::list<Segment_2>::iterator its=seg_list.begin();
-              for (;its!=seg_list.end();++its)
-                polygon.push_back(its->source());
-              it_out++=polygon;
-            }
-          }
-          else{
-            if (  !CGAL::Is_in_tuple<Segment_2,typename multi_output_iterator::Value_type_tuple>::value  )
-              to_deselect=true;
-            else{
-              for (typename std::list<Segment_2>::iterator its=seg_list.begin();its!=seg_list.end();++its)
-                it_out++=*its;
-            }
-          }
-        }
-        else
-          if (is_IPE_circle(object,i)){
-            if (  !CGAL::Is_in_tuple<Circle_2,typename multi_output_iterator::Value_type_tuple>::value )
-              to_deselect=true;
-            else{
-              Circle_2 C=to_circle_2(object -> AsPath(),i);
-              it_out++=C;
-            }
-          }
-          else
-            to_deselect=true; // avoid deleting no handled objects
-      }
-    }
-    return to_deselect;
-  }
-
-} //CGAL
-
-#define CGAL_IPELET(T) IPELET_DECLARE Ipelet *NewIpelet(){ return new T; }
-
-#endif //CGAL_IPELET_BASE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v7.h b/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v7.h
deleted file mode 100644
index 4a2c415..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base_v7.h
+++ /dev/null
@@ -1,1035 +0,0 @@
-// Copyright (c) 2005-2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot, Sylvain Pion
-
-
-#ifndef CGAL_IPELET_BASE_H
-#define CGAL_IPELET_BASE_H
-
-// Ipe headers use uint which is not standard.
-#ifdef __APPLE__
-typedef unsigned int uint;
-#endif
-
-#include <ipelib.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Weighted_point.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/grabbers.h>
-#include <CGAL/iterator.h>
-#include <CGAL/tuple.h>
-#include<CGAL/Exact_circular_kernel_2.h>
-#include <CGAL/Cartesian_converter.h>
-
-#include <boost/utility.hpp>
-
-#define CURRENTLAYER get_IpeletData()->iLayer
-#define CURRENTATTRIBUTES get_IpeletData()->iAttributes
-
-namespace CGAL{
-
-  template <class Kernel,int nbf>
-  class Ipelet_base : public ipe::Ipelet {
-  private:  
-    const std::string* SubLab;
-    const std::string* HMsg;
-    std::string Name;
-    ipe::IpeletData* data_;
-    ipe::IpeletHelper* helper_;
-
-  public:
-    
-    typedef ipe::Vector IpeVector; //ipe6 compatibility
-    typedef ipe::Curve  IpeSegmentSubPath;//ipe6 compatibility
-    typedef ipe::Matrix IpeMatrix;//ipe6 compatibility
-    typedef ipe::Path   IpePath;//ipe6 compatibility
-    //indicates if the selection should be primary or secondary. Exactly one primary selection should exist
-    ipe::TSelect get_selection_type() const { return get_IpePage()->primarySelection()==-1 ? ipe::EPrimarySelected : ipe::ESecondarySelected;}  
-    //ipe6 compatibility
-    void transform_selected_objects_(const IpeMatrix& tfm) const {
-      for (int i=0;i<get_IpePage()->count();++i)
-        if (get_IpePage()->select(i)!=ipe::ENotSelected)
-          get_IpePage()->transform(i,tfm);      
-    }
- 
-    void delete_selected_objects_() const {
-      for (unsigned i=get_IpePage()->count();i>0;--i)
-        if (get_IpePage()->select(i-1)!=ipe::ENotSelected)
-          get_IpePage()->remove(i-1);
-    }  
-    
-    void group_selected_objects_() const {
-      ipe::Group* grp=new ipe::Group();
-      for (unsigned i=get_IpePage()->count();i>0;--i)
-        if (get_IpePage()->select(i-1)!=ipe::ENotSelected){
-          grp->push_back( get_IpePage()->object(i-1)->clone() );      
-          //~ grp->push_back( get_IpePage()->object(i-1) );      
-          get_IpePage()->remove(i-1);      
-        }
-      get_IpePage()->append(get_selection_type(),CURRENTLAYER,grp);    
-    }
-    
-  
-    
-    //typedefs
-    typedef typename Kernel::FT                                               FT;
-    typedef typename CGAL::Point_2<Kernel>                                    Point_2;
-    typedef typename CGAL::Weighted_point<Point_2,FT>                         Weighted_point_2;
-    typedef typename Kernel::Segment_2                                        Segment_2;
-    typedef typename Kernel::Ray_2                                            Ray_2;
-    typedef typename Kernel::Line_2                                           Line_2;
-    typedef typename Kernel::Iso_rectangle_2                                  Iso_rectangle_2;
-    typedef typename Kernel::Triangle_2                                       Triangle_2;
-    //~ typedef typename CGAL::Polygon_2<Kernel,std::list<Point_2> >              Polygon_2;
-    typedef CGAL::Polygon_2<Kernel>                                           Polygon_2;
-  
-    typedef typename Kernel::Circle_2                                         Circle_2;
-    typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign>           Circular_arc_2;
-  
-  
-    Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
-      :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),data_(NULL),helper_(NULL){};
-    
-    
-    ipe::Page* get_IpePage() const {return data_->iPage;}
-    ipe::IpeletData* get_IpeletData() const {return data_;}
-    ipe::IpeletHelper* get_IpeletHelper() const {return helper_;}
-    int ipelibVersion() const { return ipe::IPELIB_VERSION; }
-    int NumFunctions() const { return nbf; }
-    virtual const char *Label() const{ return &Name[0]; }
-    const char *About() const {return "http://www.cgal.org";};
-    virtual const char *SubLabel(int function) const {return &SubLab[function][0];};
-    virtual const char *HelpMsg(int function) const{return &HMsg[function][0];};
-    bool run (int i, ipe::IpeletData* data, ipe::IpeletHelper* helper) {
-      data_=data;
-      helper_=helper;
-      try{
-        protected_run(i);
-        return true;
-      }
-      catch(...){
-        helper->messageBox("Error : Save your page in a file and submit it to \n http://www.cgal.org/bug_report.html",NULL,ipe::IpeletHelper::EOkCancelButtons);
-        return false;
-      }
-    };
-
-    virtual void protected_run(int)=0;
-    
-    void show_help(bool gen=true) const{
-      std::string hmsg;
-      hmsg="<qt><h1>"+Name+"</h1><ul>";
-      if (gen)
-        for(int i=0;i<nbf-1;++i)
-          hmsg=hmsg+"<li><i>"+SubLab[i]+"</i>: "+HMsg[i]+"</li>";
-      else
-        hmsg=hmsg+"<li>"+HMsg[0]+"</li>";
-      get_IpeletHelper()->messageBox(&hmsg[0],NULL,ipe::IpeletHelper::EOkCancelButtons);
-      return;
-    }
-
-    
-    //grabbers
-    
-    template <class output_iterator>
-    struct Point_grabber:public internal::Point_grabber<Kernel,output_iterator>{
-      Point_grabber(output_iterator it):internal::Point_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Point_grabber<output_iterator> >
-    point_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Point_grabber<output_iterator>(it));
-    }
-    
-
-    template <class output_iterator>
-    struct Segment_grabber:public internal::Segment_grabber<Kernel,output_iterator>{
-      Segment_grabber(output_iterator it):internal::Segment_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Segment_grabber<output_iterator> >
-    segment_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Segment_grabber<output_iterator>(it));
-    }
-    
-    template <class output_iterator>
-    struct Wpoint_grabber:public internal::Wpoint_grabber<Kernel,output_iterator>{
-      Wpoint_grabber(output_iterator it):internal::Wpoint_grabber<Kernel,output_iterator>(it){}
-    };
-      
-    template<class output_iterator>
-    boost::function_output_iterator<Wpoint_grabber<output_iterator> >
-    wpoint_grabber(output_iterator it){
-      return boost::make_function_output_iterator(Wpoint_grabber<output_iterator>(it));
-    }     
-    
-    //Interaction functions
-    //------------------------------
-    
-    void 
-    print_error_message(const char* s) const
-    {
-      get_IpeletHelper()->message(s);
-    }
-    
-    template <class T>
-    std::pair<int,T> 
-    request_value_from_user(std::string msg) const
-    {
-      ipe::String str;
-      std::pair<int,T> ret_val=std::make_pair(-1,T());
-      if (get_IpeletHelper()-> getString(msg.c_str(),str)){
-        if (!str.empty()){
-          ipe::Lex lex(str);
-          lex >> ret_val.second;
-          ret_val.first=1;
-        }
-        else
-          ret_val.first=0;
-      }
-      return ret_val;
-    }
-
-    //Conversion functions
-    //------------------------------
-    Point_2 
-    segment_endpoint(const ipe::CurveSegment& segment,ipe::Path* obj_ipe,int i) const
-    {
-      CGAL_precondition(i<2);
-      ipe::Vector pt_ipe = obj_ipe -> matrix() * segment.cp(i);
-      return Point_2((double)(pt_ipe.x),(double)(pt_ipe.y));//conversion into CGAL point
-    }
-
-    Point_2 
-    to_point_2(ipe::Object*  object) const
-    {
-      ipe::Vector pt_ipe = object-> matrix() * object-> asReference() -> position();
-      return Point_2((double)(pt_ipe.x),(double)(pt_ipe.y));//conversion into CGAL point
-    }    
-
-    Circle_2 
-    to_circle_2(ipe::Path* obj_ipe,int subpath=0) const 
-    {
-      const ipe::Ellipse* ell_ipe = obj_ipe -> shape().subPath(subpath) -> asEllipse();
-      ipe::Matrix mat_ipe = obj_ipe -> matrix() * ell_ipe -> matrix();
-      FT radius = (mat_ipe*ipe::Vector(1,0)-mat_ipe.translation()).len();
-      ipe::Vector pt_ipe = mat_ipe.translation();
-      return Circle_2(Point_2(pt_ipe.x,pt_ipe.y),radius*radius);
-    }
-
-    
-    //Picking functions
-    //------------------------------
-
-    bool 
-    is_only_rotated_or_scaled(const ipe::Matrix& m) const 
-    {
-      return (m.a[0]==m.a[3] && m.a[1]==-m.a[2]);
-    }
-
-    bool 
-    is_IPE_circle(ipe::Object* object,int subpath=0) const 
-    {
-      return ( object -> asPath() && object -> asPath() -> shape().subPath(subpath) -> asEllipse() 
-        && is_only_rotated_or_scaled(object ->asPath()->matrix()));
-    }
-
-    
-public:
-    //declaration
-    template< class multi_output_iterator >
-    bool read_one_active_object( ipe::Object* object,
-      multi_output_iterator it_out) const;
-
-public:    
-
-    template< class V,class O>
-    Iso_rectangle_2 
-    read_active_objects (
-      CGAL::Dispatch_or_drop_output_iterator<V,O> it_out,
-      bool deselect_all=true,
-      bool delete_selected_objects=false) const 
-    {
-      ipe::Rect bbox_ipe;
-      
-      if (!get_IpePage()->hasSelection()) {
-        return Iso_rectangle_2();
-      }
-      
-      for (int i=0;i<get_IpePage()->count();++i){
-        if (get_IpePage()->select(i)==ipe::ENotSelected)
-          continue;
-        
-        bbox_ipe.addRect(get_IpePage()->bbox(i));
-        
-        //Test one function for segments, circles, circle arcs and polygons
-        bool desel_it=read_one_active_object(get_IpePage()->object(i),it_out);
-        if ( delete_selected_objects && desel_it  )
-          get_IpePage()->setSelect(i,ipe::ENotSelected);
-      }
-      
-      if (delete_selected_objects)
-        delete_selected_objects_();
-      
-      if (deselect_all)
-        get_IpePage()->deselectAll();
-      
-      Iso_rectangle_2 bbox_cgal(
-        static_cast<double>(bbox_ipe.bottomLeft().x),static_cast<double>(bbox_ipe.bottomLeft().y),
-        static_cast<double>(bbox_ipe.topRight().x),static_cast<double>(bbox_ipe.topRight().y)
-      );
-        
-        return bbox_cgal;
-    }
-    
-    //drawing functions
-    //------------------------------
-    void 
-    create_polygon_with_holes(bool delete_underlying_polygons=false) const
-    {
-      std::list<ipe::SubPath*> SSPqu;
-      for (int i=0;i<get_IpePage()->count();++i){
-        if (get_IpePage()->select(i)!=ipe::ENotSelected && get_IpePage()->object(i)->asPath()->shape().subPath(0)->closed() ){
-          ipe::SubPath* ssp=new ipe::Curve(*get_IpePage()->object(i)->asPath()->shape().subPath(0)->asCurve());
-          SSPqu.push_back(ssp);
-        }  
-      }
-      if (!delete_underlying_polygons)
-        get_IpePage() -> deselectAll();
-      ipe::Shape shape;// create new objects with current attributes
-      for (std::list<ipe::SubPath*>::iterator it=SSPqu.begin();it!=SSPqu.end();++it)  
-        shape.appendSubPath(*it);
-      if (delete_underlying_polygons)
-        delete_selected_objects_();
-      get_IpePage()->append(get_selection_type(),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));    
-    }
-    
-    void 
-    center_selection_in_page() const 
-    {
-      ipe::Vector paper_size=get_paper_size();
-      ipe::Matrix tfm (1,0,0,1,paper_size.x/2.,paper_size.y/2.);
-      for (int i=0;i<get_IpePage()->count();++i)
-        if (get_IpePage()->select(i)!=ipe::ENotSelected )
-          get_IpePage()->transform(i,tfm);
-    }
-    
-    template<class iterator>
-    ipe::Curve* 
-    create_polyline(const iterator first, const iterator last,bool setclose=false) const 
-    {
-      if (boost::next(first)!=last){
-        ipe::Curve* SSP_ipe = new ipe::Curve();
-        ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
-        for (iterator it = boost::next(first);it!=last;++it){
-          ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
-          SSP_ipe -> appendSegment(Prev_pt,Cur_pt);
-          Prev_pt=Cur_pt;
-        }
-        if (setclose)
-          SSP_ipe->setClosed(true);
-        return SSP_ipe;
-      }
-      return NULL;
-    }
-    
-    
-    template<class iterator>
-    ipe::Path* 
-    draw_polyline_in_ipe(const iterator first, const iterator last,
-                         bool setclose=false,bool deselect_all=false,
-                         bool blackfill=false,
-                         typename boost::enable_if<
-                                    boost::is_same<
-                                      typename std::iterator_traits<iterator>::value_type,
-                                      Point_2
-                                    > 
-                                  >::type* =NULL) const 
-    {
-      ipe::Curve* SSP_ipe=create_polyline(first,last,setclose);
-      if (SSP_ipe!=NULL){
-        ipe::Shape shape;
-        shape.appendSubPath(SSP_ipe);
-        ipe::Path* obj_ipe=new ipe::Path(CURRENTATTRIBUTES,shape);
-        if (blackfill){
-          obj_ipe->setPathMode(ipe::EStrokedAndFilled);
-          obj_ipe->setFill(ipe::Attribute::BLACK());
-        }
-        get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,obj_ipe);
-        return obj_ipe;
-      }
-      return NULL;  
-    }
-    
-    void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
-      ipe::Ellipse *ellipse = new ipe::Ellipse(ipe::Matrix(sqrt(CGAL::to_double(C.squared_radius())),0,
-                                                     0,sqrt(CGAL::to_double(C.squared_radius())),
-                                                     to_double(C.center().x()),to_double(C.center().y())
-                                           )
-                                );
-      ipe::Shape shape;
-      shape.appendSubPath(ellipse);
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
-    }
- 
-    void
-    draw_in_ipe(const Point_2& P,bool deselect_all=false) const 
-    {
-      ipe::Reference *mark = new ipe::Reference(CURRENTATTRIBUTES,CURRENTATTRIBUTES.iMarkShape, ipe::Vector(CGAL::to_double(P.x()),CGAL::to_double(P.y())));
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,mark);      
-    }
-    
-    void 
-    draw_in_ipe(const Segment_2& S,bool deselect_all=false) const 
-    {
-      ipe::Segment seg_ipe;
-      seg_ipe.iP = ipe::Vector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y()));
-      seg_ipe.iQ = ipe::Vector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y()));
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe)));      
-    }
-    
-    template<class Container>
-    void 
-    draw_in_ipe(const CGAL::Polygon_2<Kernel,Container>& poly,bool deselect_all=false) const 
-    {
-      std::list<Point_2> LP;
-      for (typename CGAL::Polygon_2<Kernel,Container>::iterator it=poly.vertices_begin();it!= poly.vertices_end();++it)
-        LP.push_back(*it);
-      draw_polyline_in_ipe(LP.begin(),LP.end(),true,deselect_all,false);
-    }
-
-    void 
-    draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const 
-    {
-      ipe::Curve* SSP_ipe = new ipe::Curve;
-      ipe::Vector ipeS=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()),
-                                CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format
-      ipe::Vector ipeT=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()),
-                                CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format
-      SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0,
-                                   0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
-                                     sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),
-                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()),
-                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())),
-                                   ipeS,ipeT);
-      ipe::Shape shape;
-      shape.appendSubPath(SSP_ipe);
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
-    }
-
-
-    void
-    draw_in_ipe(const Triangle_2& t,bool deselect_all=false) const 
-    {
-      ipe::Curve* SSP_ipe = new ipe::Curve();
-      ipe::Vector P0=ipe::Vector(t[0].x(),t[0].y());
-      ipe::Vector P1=ipe::Vector(t[1].x(),t[1].y());
-      ipe::Vector P2=ipe::Vector(t[2].x(),t[2].y());
-      SSP_ipe->appendSegment(P0,P1);
-      SSP_ipe->appendSegment(P1,P2);
-      SSP_ipe->appendSegment(P2,P0);
-      SSP_ipe->setClosed(true);
-      ipe::Shape shape;
-      shape.appendSubPath(SSP_ipe);
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
-    }
-    
-    void 
-    draw_in_ipe(const Iso_rectangle_2& r,bool deselect_all=false)
-    {
-      ipe::Curve* SSP_ipe = new ipe::Curve();
-      ipe::Vector P0=ipe::Vector(r[0].x(),r[0].y());
-      ipe::Vector P1=ipe::Vector(r[1].x(),r[1].y());
-      ipe::Vector P2=ipe::Vector(r[2].x(),r[2].y());
-      ipe::Vector P3=ipe::Vector(r[3].x(),r[3].y());
-      SSP_ipe->appendSegment(P0,P1);
-      SSP_ipe->appendSegment(P1,P2);
-      SSP_ipe->appendSegment(P2,P3);
-      SSP_ipe->appendSegment(P3,P0);
-      SSP_ipe->setClosed(true);
-      ipe::Shape shape;
-      shape.appendSubPath(SSP_ipe);
-      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
-    }
-    
-    
-    //Drawing function with bbox : global version
-    template <class T>
-    void 
-    draw_in_ipe(const T& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      Segment_2 s;
-      bool success=cast_into_seg(object,bbox,&s);
-      if (success)
-        draw_in_ipe(s,deselect_all);
-    }
-  private:
-    enum Type_circ_arc{SRC,TRG,OSRC,OTRG};
-  public:  
-    void 
-    draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      std::vector<Circular_arc_2> arc_list;
-      const Circle_2& circle=CGAL::cpp11::get<0>(object);
-      restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
-      if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
-        draw_in_ipe(object,deselect_all);
-        return;
-      }
-      
-      const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
-                            &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object);
-      const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
-                            &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object);
-      std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
-      typedef  typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
-      Map_theta_iterator s_it=map_theta.insert(
-                                std::make_pair(get_theta(*source,circle),std::make_pair(OSRC,source)));
-      /* Map_theta_iterator t_it=*/
-                              map_theta.insert(
-                                std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
-      
-      for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
-        const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
-                             &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc);
-        const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
-                             &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc);        
-        map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
-        map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
-      }
-      
-      Map_theta_iterator next_s=s_it;
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      switch (next_s->second.first){
-        case TRG:
-          draw_in_ipe(Circular_arc_2(circle,*source,*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-          break;
-        case OSRC:
-	  CGAL_error();
-        case SRC:{
-          Map_theta_iterator current=next_s;
-          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-          draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-          if(next_s->second.first==OTRG) return;
-          break;
-        }
-        case OTRG:
-          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.end();
-          if (next_s->second.first==TRG){
-            draw_in_ipe(object);
-            return;
-          }
-          else
-            return;
-      }
-      
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      Map_theta_iterator current=next_s;
-      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      do{
-        if (current->second.first==OTRG) return;
-        assert(current->second.first==SRC);
-        draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
-        if (next_s->second.first==OTRG) return;
-        assert(next_s->second.first==TRG);
-        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-        current=next_s;
-        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
-      }while(true);
-      
-    }
-    
-    
-    void
-    draw_in_ipe(const Circle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      std::vector<Circular_arc_2> arc_list;
-      restrict_circle_to_bbox(object,bbox,std::back_inserter(arc_list));
-      if (arc_list.empty() && bbox.has_on_bounded_side(object.center()) )
-        draw_in_ipe(object,deselect_all);
-      else
-        draw_in_ipe(arc_list.begin(),arc_list.end(),false,deselect_all);
-    }
-      
-    
-    void 
-    draw_in_ipe(const Triangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-       for (unsigned int i=0;i!=3;++i)
-        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all);
-    }
-      
-    void 
-    draw_in_ipe(const Iso_rectangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      for (unsigned int i=0;i!=4;++i)
-        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all); 
-    }
-      
-    void 
-    draw_in_ipe(const Polygon_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      for (typename Polygon_2::Edge_const_iterator it=object.edges_begin();it!=object.edges_end();++it)
-        draw_in_ipe(*it,bbox,deselect_all);
-    }
-      
-      
-      
-    template<class GT,class TDS>
-    void 
-    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
-    {
-      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
-      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
-      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
-      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
-        draw_in_ipe(tri.segment(*it),bbox);
-      if (deselect_all)
-        get_IpePage()->deselectAll();
-    }
-    
-    void
-    draw_in_ipe(const Line_2& line,bool deselect_all=false) const 
-    {
-      ipe::Vector paper_size=get_paper_size();
-      Iso_rectangle_2 bbox(0,0,paper_size.x,paper_size.y);
-      draw_in_ipe(line,bbox,deselect_all);
-    }
-      
-    void
-    draw_in_ipe(const Ray_2& ray,bool deselect_all=false)
-    {
-      ipe::Vector paper_size=get_paper_size();
-      Iso_rectangle_2 bbox(0,0,paper_size.x,paper_size.y);
-      draw_in_ipe(ray,bbox,deselect_all);      
-    }
-    
-    template<class GT,class TDS>
-    void
-    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,bool deselect_all=false,bool make_grp=true) const 
-    {
-      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
-      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
-      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
-      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
-        draw_in_ipe(tri.segment(*it));
-      if (make_grp)
-        group_selected_objects_();
-      if (deselect_all)
-        get_IpePage()->deselectAll();
-    }
-    
-    template<class iterator>
-    void 
-    draw_in_ipe(const iterator begin,const iterator end,bool make_grp=true,bool deselect_all=false) const
-    {
-      for (iterator it=begin;it!=end;++it)
-        draw_in_ipe(*it);
-      if (make_grp and ++iterator(begin)!=end)
-        group_selected_objects_();
-      if (deselect_all)
-        get_IpePage()->deselectAll();
-    }
-
-    template<class iterator>
-    void
-    draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false,
-     typename boost::enable_if<  boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Point_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Segment_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circle_2> ,
-                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circular_arc_2> ,
-                                                  boost::is_same<typename std::iterator_traits<iterator>::value_type,Polygon_2>
-                                                > > > >
-                    >::type* = NULL) const
-    {
-      for (iterator it=begin;it!=end;++it)
-        draw_in_ipe(*it,bbox);
-      if (make_grp and ++iterator(begin)!=end)
-        group_selected_objects_();
-      if (deselect_all)
-        get_IpePage()->deselectAll();      
-    }
-    
-    private:
-    
-    ipe::Vector 
-    get_paper_size() const {
-        return data_->iDoc->cascade()->findLayout()->iPaperSize;
-    }
-    
-    struct Voronoi_from_tri{  //Class using stream to get the voronoi diagram
-      std::list<Ray_2> ray_list;
-      std::list<Line_2> line_list;
-      std::list<Segment_2> seg_list;
-
-      void operator<<(const Ray_2& p){ray_list.push_back(p);}
-      void operator<<(const Line_2& p){line_list.push_back(p);}
-      void operator<<(const Segment_2& p){seg_list.push_back(p);}
-
-    };
-    
-    template <class T,class output_iterator>
-    bool 
-    cast_into_seg(const T& obj,const Iso_rectangle_2& bbox,output_iterator out_it) const{
-      CGAL::Object obj_cgal = CGAL::intersection(obj,bbox);
-      Segment_2 s;
-      bool ret=CGAL::assign(s, obj_cgal);
-      if (ret) *out_it++=s;
-      return ret;
-    }
-    
-    //Convert infinite objects into drawable segments
-    template<class iterator,class output_iterator>
-    void 
-    cast_into_seg(const iterator first,const iterator end,
-                  const Iso_rectangle_2& bbox, output_iterator out_it) const
-    {
-      for (iterator it=first;it!=end;++it)
-        cast_into_seg(*it,bbox,out_it);
-    }
-
-    
-    
-    void 
-    draw_dual_(Voronoi_from_tri& v_recup,const Iso_rectangle_2& bbox,bool makegrp) const
-    {
-      std::vector<Segment_2> seg_cont;
-      //filter degenerate segments
-      for(typename std::list<Segment_2>::iterator iteS = v_recup.seg_list.begin();iteS!=v_recup.seg_list.end();){
-        typename std::list<Segment_2>::iterator itc=iteS++;
-        if (itc->is_degenerate())
-          v_recup.seg_list.erase(itc);
-      }
-      
-      cast_into_seg(v_recup.ray_list.begin(),v_recup.ray_list.end(),bbox,std::back_inserter(seg_cont));//cast rays into segments in bbox
-      cast_into_seg(v_recup.line_list.begin(),v_recup.line_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
-      cast_into_seg(v_recup.seg_list.begin(),v_recup.seg_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
-      draw_in_ipe(seg_cont.begin(), seg_cont.end(),makegrp);
-    }
-    
-    public:
-    template<class Triangulation>
-    void 
-    draw_dual_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,bool makegrp=true,bool deselect_all=false) const
-    {
-    //~ template<class GT,class TDS>
-    //~ void draw_dual_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{
-      Voronoi_from_tri v_recup;
-      T.draw_dual(v_recup);
-      draw_dual_(v_recup,bbox,makegrp);
-      if (deselect_all) get_IpePage()->deselectAll();
-    }
-
-    template<class Triangulation>
-    void
-    draw_skeleton_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,
-                         bool makegrp=true,bool deselect_all=false) const
-    {
-    //~ template<class GT,class TDS>
-    //~ void draw_skeleton_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{    
-      Voronoi_from_tri v_recup;
-      T.draw_skeleton(v_recup);
-      draw_dual_(v_recup,bbox,makegrp);
-      if (deselect_all) get_IpePage()->deselectAll();
-    }
-    
-    //Circle restriction
-  private:
-    inline double get_theta(const Point_2& point, const Circle_2& circle) const {
-      return atan2(CGAL::to_double(point.y()-circle.center().y()),CGAL::to_double(point.x()-circle.center().x()));
-    }
-  
-    //SK objects
-    typedef CGAL::Exact_circular_kernel_2 SK;
-    typedef SK::Circle_2                  Exact_circle_2;
-    typedef SK::Point_2                   Exact_point_2;
-    typedef SK::Circular_arc_point_2      Circular_arc_point_2;
-
-
-
-    //s and t are given such that if center of exact_circle is inside bbox then turn COUNTERCLOCKWISE
-    Circular_arc_2 
-    build_arc(const Exact_circle_2& exact_circle,const SK::Circular_arc_point_2& s,
-              const SK::Circular_arc_point_2& t,bool sign_known=false) const 
-    {
-      Point_2 sd=Point_2(CGAL::to_double(s.x()),CGAL::to_double(s.y()));
-      Point_2 td=Point_2(CGAL::to_double(t.x()),CGAL::to_double(t.y()));
-      Point_2 center(CGAL::to_double(exact_circle.center().x()),CGAL::to_double(exact_circle.center().y()));
-      CGAL::Cartesian_converter<SK,Kernel> conv;
-      Circle_2 approx_circle=conv(exact_circle);  
-      if (!sign_known){
-        CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
-        return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign);
-      }
-      return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
-    }
-
-    void 
-    get_pair_indices(int* array,int* pair) const {
-      for (int i=0;i<8;++i)
-        if (array[i]!=-1) *pair++=i;
-    }
-
-    void 
-    set_done(int* array,int index) const {
-      for (int i =0;i<8;++i)
-        if (array[i]==index) array[i]=-1;
-    }
-
-
-    bool 
-    indices_are_on_opposite_side(int* array) const {
-        if (array[0]!=-1 || array[5]!=-1)
-          return array[2]!=-1 || array[7]!=-1;
-        if (array[1]!=-1 || array[6]!=-1)
-          return array[3]!=-1 || array[4]!=-1;
-        return false;
-    }
-
-    int 
-    count_points(int* array) const {
-      int ret=0;
-      for (int i =0;i<8;++i)
-        if (array[i]!=-1) ++ret;
-      return ret;
-    }
-
-  public:
-    //
-    // .-----7---------2-------.
-    // |                       |
-    // 3                       6
-    // |     indices           |
-    // 4                       1
-    // |                       |
-    // .-----0---------5-------.
-    template <class Output_iterator>
-    void 
-    restrict_circle_to_bbox(const Circle_2& approx_circle,
-                            const Iso_rectangle_2& bbox,Output_iterator out) const
-    {
-      CGAL::Cartesian_converter<Kernel,SK> conv;
-      Exact_circle_2 exact_circle=conv(approx_circle);
-
-      SK::Intersect_2 inter=SK().intersect_2_object();
-      std::vector< std::pair<Circular_arc_point_2,unsigned> > points;
-      points.reserve(8);
-      
-      std::vector<CGAL::Object> ints;
-      ints.reserve(2);
-      std::pair<Circular_arc_point_2,unsigned> tmp_pt;
-      
-      int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1};
-      
-      for (unsigned i=0;i!=4;++i){
-        ints.clear();
-        SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4]));
-        inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints));
-        unsigned index=0;
-        bool ok=true;
-        switch (ints.size()){
-          case 1:
-            ok=CGAL::assign(tmp_pt,ints[0]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[i]=index;
-            indices[(i+1)%4+4]=index;
-            break;
-          case 2:
-            int right_ind=i<2?0:1;
-            ok=CGAL::assign(tmp_pt,ints[right_ind]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[i]=index;
-            ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]);
-            assert(ok);
-            points.push_back(tmp_pt);
-            index=points.size()-1;
-            indices[(i+1)%4+4]=index;      
-            break;
-        }
-      }
-
-      //corner case
-      for (unsigned i=0;i!=4;++i){
-        if (indices[i]!=-1 && indices[i+4]!=-1){
-          *out++=build_arc(exact_circle,points[ indices[i+4] ].first,points[ indices[i] ].first);
-          if (points[ indices[i] ].second==1) set_done(indices,indices[i]);
-          else indices[i]=-1;      
-          if (points[ indices[i+4] ].second==1) set_done(indices,indices[i+4]);
-          else indices[i+4]=-1;
-        }
-      }
-      int rem_pt=count_points(indices);
-      if (rem_pt==4){
-        //double opposite
-        if (indices[0]!=-1){
-          *out++=build_arc(exact_circle,points[ indices[7] ].first,points[ indices[0] ].first);
-          if (indices[7]!=indices[2] && indices[0]!=indices[5])
-            *out++=build_arc(exact_circle,points[ indices[5] ].first,points[ indices[2] ].first);
-        }
-        else{
-          *out++=build_arc(exact_circle,points[ indices[6] ].first,points[ indices[3] ].first);
-          if (indices[6]!=indices[1] && indices[3]!=indices[4])
-            *out++=build_arc(exact_circle,points[ indices[4] ].first,points[ indices[1] ].first);      
-        }
-        return;  
-      }
-      
-      if (rem_pt==2){
-        int pair[2];
-        get_pair_indices(indices,pair);
-        if (!indices_are_on_opposite_side(indices))
-          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first,true);
-        else
-          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first);
-        return;
-      }
-      assert (rem_pt==0);
-    }
-  };
-  
-  
-  //definition
-  template <class Kernel,int nbf>
-  template< class multi_output_iterator >
-  bool 
-  Ipelet_base<Kernel,nbf>::read_one_active_object(ipe::Object* object,
-                                                  multi_output_iterator it_out) const 
-  {
-    if (object->asGroup()){
-      bool deselect_grp=false;
-      for (ipe::Group::const_iterator it=object->asGroup()->begin();
-                                    it!=object->asGroup()->end();++it)
-      {
-        ipe::Object *obj = (*it)->clone();
-        obj->setMatrix(obj->matrix()*object->matrix());
-        bool cur=read_one_active_object(obj,it_out);
-        deselect_grp=deselect_grp || cur;
-      }
-      return deselect_grp;
-    }
-    
-    //detect Points
-    if( object->asReference() ){
-      if ( !CGAL::Is_in_tuple<Point_2,typename multi_output_iterator::Value_type_tuple>::value ) 
-        return true;
-      it_out++=to_point_2(object);
-      return false;
-    }
-    bool to_deselect=true;
-    //Test one function for segments, circles, circle arcs and polygons
-    if (object->asPath()){
-      //iterate on each subpath
-      to_deselect=false;
-      for (int i=0;i<object->asPath()->shape().countSubPaths();++i){
-        if(object->asPath()-> shape().subPath(i)->asCurve()){
-          std::list<Segment_2> seg_list;
-          bool is_polygon=object-> asPath() -> shape().subPath(i)->closed();
-          
-          const ipe::Curve* SSP_ipe = object -> asPath() -> shape().subPath(i) -> asCurve();
-          for(int j=0; j< SSP_ipe->countSegments();++j){
-            if (SSP_ipe -> segment(j).type()==ipe::CurveSegment::ESegment){
-              //TODO depending on if current_it  is  a polygon or not do not do the same thing
-              seg_list.push_back(Segment_2(segment_endpoint(SSP_ipe -> segment(j),object -> asPath(),0),
-                                  segment_endpoint(SSP_ipe -> segment(j),object -> asPath(),1)));
-            }
-            else{
-              //retrieve circle arcs
-              if(SSP_ipe -> segment(j).type()==ipe::CurveSegment::EArc &&
-                 is_only_rotated_or_scaled(object->asPath()->matrix()))
-              {//retreve circle arcs
-                if ( !CGAL::Is_in_tuple<Circular_arc_2,typename multi_output_iterator::Value_type_tuple>::value ){
-                  to_deselect=true;
-                  continue;
-                }
-                is_polygon=false;
-                ipe::Path* obj_ipe=object->asPath();
-                ipe::Matrix mat=obj_ipe->matrix() * SSP_ipe->segment(j).matrix();
-                ipe::Vector ipe_center=ipe::Vector(mat.a[4],mat.a[5]);
-                ipe::Vector ipe_first=obj_ipe->matrix() * SSP_ipe->segment(j).cp(0);
-                ipe::Vector ipe_last=obj_ipe->matrix() * SSP_ipe->segment(j).last();
-                //TODO Check how object is defined
-                Circular_arc_2 arc(
-                            Circle_2(Point_2(ipe_center.x,ipe_center.y),(ipe_first-ipe_center).len()*(ipe_first-ipe_center).len()),
-                            Point_2(ipe_first.x,ipe_first.y),
-                            Point_2(ipe_last.x,ipe_last.y),
-                            mat.a[0]*mat.a[3]-mat.a[1]*mat.a[2]<0?CGAL::CLOCKWISE:CGAL::COUNTERCLOCKWISE
-                          );
-                it_out++=arc;
-              }
-              else
-                to_deselect=true;
-            }
-          }
-          if (object->asPath() -> shape().subPath(i)->closed() && 
-              (SSP_ipe -> segment(0).cp(0)-SSP_ipe -> segment(SSP_ipe->countSegments()-1).cp(1)).len()!=0 ){ //for close polygon, seg
-            seg_list.push_back( Segment_2(
-                              segment_endpoint(SSP_ipe -> segment(SSP_ipe->countSegments()-1),object-> asPath(),1),
-                              segment_endpoint(SSP_ipe -> segment(0),object-> asPath(),0)
-                              ));
-          }
-          //~ if (seg_list.empty())
-            //~ to_deselect=true;
-          
-          if (is_polygon){
-            if (  !CGAL::Is_in_tuple<Polygon_2,typename multi_output_iterator::Value_type_tuple>::value  )
-              to_deselect=true;
-            else{
-              Polygon_2 polygon;
-              typename std::list<Segment_2>::iterator its=seg_list.begin();
-              for (;its!=seg_list.end();++its)
-                polygon.push_back(its->source());
-              it_out++=polygon;
-            }
-          }
-          else{
-            if (  !CGAL::Is_in_tuple<Segment_2,typename multi_output_iterator::Value_type_tuple>::value  )
-              to_deselect=true;
-            else{
-              for (typename std::list<Segment_2>::iterator its=seg_list.begin();its!=seg_list.end();++its)
-                it_out++=*its;
-            }
-          }
-        }
-        else
-          if (is_IPE_circle(object,i)){
-            if (  !CGAL::Is_in_tuple<Circle_2,typename multi_output_iterator::Value_type_tuple>::value )
-              to_deselect=true;
-            else{
-              Circle_2 C=to_circle_2(object -> asPath(),i);
-              it_out++=C;
-            }
-          }
-          else
-            to_deselect=true; // avoid deleting no handled objects
-      }
-    }
-    return to_deselect;
-  }
-
-} //CGAL
-
-#define CGAL_IPELET(T) IPELET_DECLARE ipe::Ipelet *newIpelet(){ return new T; }
-
-#endif //CGAL_IPELET_BASE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloat.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloat.h
deleted file mode 100644
index 5ed2344..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloat.h
+++ /dev/null
@@ -1,628 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: BigFloat.h
- * Synopsis: 
- * 		An implementation of BigFloat numbers with error bounds.
- * 
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_BIGFLOAT_H_
-#define _CORE_BIGFLOAT_H_
-
-#include <CGAL/CORE/BigFloatRep.h>
-
-namespace CORE { 
-
-class Expr;
-
-/// \class BigFloat BigFloat.h
-/// \brief BigFloat is a class of Float-Point number with error bounds.
-typedef RCImpl<BigFloatRep> RCBigFloat;
-
-class CGAL_CORE_EXPORT BigFloat : public RCBigFloat {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  BigFloat() : RCBigFloat(new BigFloatRep()) {}
-  /// constructor for <tt>short</tt>
-  BigFloat(short i) : RCBigFloat(new BigFloatRep(i)) {}
-  /// constructor for <tt>float</tt>
-  BigFloat(float i) : RCBigFloat(new BigFloatRep(i)) {}
-  /// constructor for <tt>int</tt>
-  BigFloat(int i) : RCBigFloat(new BigFloatRep(i)) {}
-  /// constructor for <tt>long</tt>
-  BigFloat(long l) : RCBigFloat(new BigFloatRep(l)) {}
-  /// constructor for <tt>double</tt>
-  BigFloat(double d) : RCBigFloat(new BigFloatRep(d)) {}
-  /// constructor for <tt>const char* </tt>(default base = 10)
-  BigFloat(const char* s) : RCBigFloat(new BigFloatRep(s)) {}
-  /// constructor for <tt>std::string</tt>(default base = 10)
-  BigFloat(const std::string& s) : RCBigFloat(new BigFloatRep(s)) {}
-
-  /// constructor for <tt>int</tt> and <tt>long</tt>
-  //     This is a hack because in Sturm, we need to approximate any
-  //     coefficient type NT to a BigFloat, and it would complain if we
-  //     do not have this method explicitly:
-  BigFloat(int& i, const extLong& /*r*/, const extLong& /*a*/)
-      : RCBigFloat(new BigFloatRep(i)) {}
-  BigFloat(long& x, const extLong& /*r*/, const extLong& /*a*/)
-      : RCBigFloat(new BigFloatRep(x)) {}
-  /// constructor from <tt>BigInt</tt>, error and exponent values
-  BigFloat(const BigInt& I, unsigned long er, long ex)
-      : RCBigFloat(new BigFloatRep(I, er, ex)) {}
-  /// constructor from <tt>BigInt</tt>, exponent values
-  BigFloat(const BigInt& I, long ex)
-      : RCBigFloat(new BigFloatRep(I, ex)) {}
-  BigFloat(const BigInt& I)
-      : RCBigFloat(new BigFloatRep(I)) {}
-  /// constructor for <tt>BigRat</tt>
-  BigFloat(const BigRat& R, const extLong& r = defRelPrec,
-           const extLong& a = defAbsPrec)
-      : RCBigFloat(new BigFloatRep()) {
-    rep->approx(R, r, a);
-  }
-
-  // REMARK: it is somewhat against our principles to have BigFloat
-  // know about Expr, but BigFloat has a special role in our system!
-  // ===============================
-  /// constructor for <tt>Expr</tt>
-  explicit BigFloat(const Expr& E, const extLong& r = defRelPrec,
-           const extLong& a = defAbsPrec);
-
-  //Dummy
-  explicit BigFloat(const BigFloat& E, const extLong& ,
-           const extLong&): RCBigFloat(E) {
-    rep->incRef();
-  }
-
-  /// constructor for <tt>BigFloatRep</tt>
-  explicit BigFloat(BigFloatRep* r) : RCBigFloat(new BigFloatRep()) {
-    rep = r;
-  }
-
-  // constructor for exp2
-  explicit BigFloat(BigFloatRep* r, bool) : RCBigFloat(r) {
-  }
-
-
-  //@}
-
-  /// \name Copy-Assignment-Destructor
-  //@{
-  /// copy constructor
-  BigFloat(const BigFloat& rhs) : RCBigFloat(rhs) {
-    rep->incRef();
-  }
-  /// assignment operator
-  BigFloat& operator=(const BigFloat& rhs) {
-    if (this != &rhs) {
-      rep->decRef();
-      rep = rhs.rep;
-      rep->incRef();
-    }
-    return *this;
-  }
-  /// destructor
-  ~BigFloat() {
-    rep->decRef();
-  }
-  //@}
-
-  /// \name Compound Assignment Operators
-  //@{
-  /// operator+=
-  BigFloat& operator+= (const BigFloat& x) {
-    BigFloat z;
-    z.rep->add(*rep, *x.rep);
-    *this = z;
-    return *this;
-  }
-  /// operator-=
-  BigFloat& operator-= (const BigFloat& x) {
-    BigFloat z;
-    z.rep->sub(*rep, *x.rep);
-    *this = z;
-    return *this;
-  }
-  /// operator*=
-  BigFloat& operator*= (const BigFloat& x) {
-    BigFloat z;
-    z.rep->mul(*rep, *x.rep);
-    *this = z;
-    return *this;
-  }
-  /// operator/=
-  BigFloat& operator/= (const BigFloat& x) {
-    BigFloat z;
-    z.rep->div(*rep, *x.rep, defBFdivRelPrec);
-    *this = z;
-    return *this;
-  }
-  //@}
-
-  /// \name Unary Minus Operator
-  //@{
-  /// unary plus
-  BigFloat operator+() const {
-    return BigFloat(*this);
-  }
-  /// unary minus
-  BigFloat operator-() const {
-    return BigFloat(-rep->m, rep->err, rep->exp);
-  }
-  //@}
-
-  /// \name String Conversion Functions
-  //@{
-  /// set value from <tt>const char*</tt> (base = 10)
-  void fromString(const char* s, const extLong& p=defBigFloatInputDigits) {
-    rep->fromString(s, p);
-  }
-  /// convert to <tt>std::string</tt> (base = 10)
-  std::string toString(long prec=defBigFloatOutputDigits, bool sci=false) const {
-    return rep->toString(prec, sci);
-  }
-  std::string str() const {
-    return toString();
-  }
-  //@}
-
-  /// \name Conversion Functions
-  //@{
-  /// return int value
-  int intValue() const {
-    return static_cast<int>(rep->toLong());
-  }
-  /// return long value
-  long longValue() const {
-    long l = rep->toLong();
-    if ((l == LONG_MAX) || (l == LONG_MIN))
-      return l; // return the overflown value.
-    if ((sign() < 0) && (cmp(BigFloat(l)) != 0)) {
-      // a negative value not exactly rounded.
-      l--; // rounded to floor.
-    }
-    return l;
-  }
-  /// return float value
-  float floatValue() const {
-    return static_cast<float>(rep->toDouble());
-  }
-  /// return double value
-  double doubleValue() const {
-    return rep->toDouble();
-  }
-  /// return BigInt value
-  BigInt BigIntValue() const {
-    return rep->toBigInt();
-  }
-  /// return BigRat value
-  BigRat BigRatValue() const {
-    return rep->BigRatize();
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  /// Has Exact Division
-  static bool hasExactDivision() {
-    return false;
-  }
-  
-  //CONSTANTS
-  /// return BigFloat(0)
-  static const BigFloat& getZero();
-  /// return BigFloat(1)
-  static const BigFloat& getOne();
-
-  /// sign function
-  /** \note This is only the sign of the mantissa, it can be taken to be
-      the sign of the BigFloat only if !(isZeroIn()). */
-  int sign() const {
-    assert((err() == 0 && m() == 0) || !(isZeroIn()));
-    return rep->signM();
-  }
-  /// check whether contains zero
-  /** \return true if contains zero, otherwise false */
-  bool isZeroIn() const {
-    return rep->isZeroIn();
-  }
-  /// absolute value function
-  BigFloat abs() const {
-    return (sign()>0) ? +(*this) : -(*this);
-  }
-  ///  comparison function
-  int cmp(const BigFloat& x) const {
-    return rep->compareMExp(*x.rep);
-  }
-
-  /// get mantissa
-  const BigInt& m() const {
-    return rep->m;
-  }
-  /// get error bits
-  unsigned long err() const {
-    return rep->err;
-  }
-  /// get exponent
-  long exp() const {
-    return rep->exp;
-  }
-
-  /// check whether err == 0
-  /** \return true if err == 0, otherwise false */
-  bool isExact() const {
-    return rep->err == 0;
-  }
-  /// set err to 0
-  /** \return an exact BigFloat, see Tutorial for why this is useful! */
-  BigFloat& makeExact() {
-    makeCopy();
-    rep->err =0;
-    return *this;
-  }
-  /// set err to 0, but first add err to the mantissa (m)
-  /** \return the ceiling exact BigFloat, variant of makeExact */
-  BigFloat& makeCeilExact() {
-    makeCopy();
-    rep->m += rep->err;
-    rep->err =0;
-    return *this;
-  }
-  /// set err to 0, but subtract err from the mantissa (m)
-  /** \return the floor exact BigFloat, variant of makeExact */
-  BigFloat& makeFloorExact() {
-    makeCopy();
-    rep->m -= rep->err;
-    rep->err =0;
-    return *this;
-  }
-  /// set err to 1
-  /** \return an inexact BigFloat, see Tutorial for why this is useful! */
-  BigFloat& makeInexact() {
-    makeCopy();
-    rep->err =1;
-    return *this;
-  }
-
-  /// return lower bound of Most Significant Bit
-  extLong lMSB() const {
-    return rep->lMSB();
-  }
-  /// return upper bound of Most Significant Bit
-  extLong uMSB() const {
-    return rep->uMSB();
-  }
-  /// return Most Significant Bit
-  extLong MSB() const {
-    return rep->MSB();
-  }
-
-  /// floor of Lg(err)
-  extLong flrLgErr() const {
-    return rep->flrLgErr();
-  }
-  /// ceil of Lg(err)
-  extLong clLgErr() const {
-    return rep->clLgErr();
-  }
-
-  /// division with relative precsion <tt>r</tt>
-  BigFloat div(const BigFloat& x, const extLong& r) const {
-    BigFloat y;
-    y.rep->div(*rep, *x.rep, r);
-    return y;
-  }
-  /// exact division by 2
-  BigFloat div2() const {
-    BigFloat y;
-    y.rep->div2(*rep);
-    return y;
-  }
-
-  /// squareroot
-  BigFloat sqrt(const extLong& a) const {
-    BigFloat x;
-    x.rep->sqrt(*rep, a);
-    return x;
-  }
-  /// squareroot with initial approximation <tt>init</tt>
-  BigFloat sqrt(const extLong& a, const BigFloat& init) const {
-    BigFloat x;
-    x.rep->sqrt(*rep, a, init);
-    return x;
-  }
-  //@}
-
-  /// \name Utility Functions
-  //@{
-  /// approximate BigInt number
-  void approx(const BigInt& I, const extLong& r, const extLong& a) {
-    makeCopy();
-    rep->trunc(I, r, a);
-  }
-  /// approximate BigFloat number
-  void approx(const BigFloat& B, const extLong& r, const extLong& a) {
-    makeCopy();
-    rep->approx(*B.rep, r, a);
-  }
-  /// approximate BigRat number
-  void approx(const BigRat& R, const extLong& r, const extLong& a) {
-    makeCopy();
-    rep->approx(R, r, a);
-  }
-  /// dump internal data
-  void dump() const {
-    rep->dump();
-  }
-  //@}
-
-  /// returns a BigFloat of value \f$ 2^e \f$
-  static BigFloat exp2(int e) {
-    return BigFloat(BigFloatRep::exp2(e),true);
-  }
-
-}; // class BigFloat
-
-//@} // For compatibility with BigInt
-
-/// \name File I/O Functions
-//@{
-/// read from file
-void readFromFile(BigFloat& bf, std::istream& in, long maxLength = 0);
-/// write to file
-void writeToFile(const BigFloat& bf, std::ostream& in,
-		int base=10, int charsPerLine=80);
-
-/// IO stream operator<<
-inline std::ostream& operator<< (std::ostream& o, const BigFloat& x) {
-  x.getRep().operator<<(o);
-  return o;
-}
-/// IO stream operator>>
-inline std::istream& operator>> (std::istream& i, BigFloat& x) {
-  x.makeCopy();
-  x.getRep().operator>>(i);
-  return i;
-}
-//@}
-
-/// operator+
-inline BigFloat operator+ (const BigFloat& x, const BigFloat& y) {
-  BigFloat z;
-  z.getRep().add(x.getRep(), y.getRep());
-  return z;
-}
-/// operator-
-inline BigFloat operator- (const BigFloat& x, const BigFloat& y) {
-  BigFloat z;
-  z.getRep().sub(x.getRep(), y.getRep());
-  return z;
-}
-/// operator*
-inline BigFloat operator* (const BigFloat& x, const BigFloat& y) {
-  BigFloat z;
-  z.getRep().mul(x.getRep(), y.getRep());
-  return z;
-}
-/// operator/
-inline BigFloat operator/ (const BigFloat& x, const BigFloat& y) {
-  BigFloat z;
-  z.getRep().div(x.getRep(),y.getRep(),defBFdivRelPrec);
-  return z;
-}
-
-/// operator==
-inline bool operator== (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) == 0;
-}
-/// operator!=
-inline bool operator!= (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) != 0;
-}
-/// operator>=
-inline bool operator>= (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) >= 0;
-}
-/// operator>
-inline bool operator> (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) > 0;
-}
-/// operator<=
-inline bool operator<= (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) <= 0;
-}
-/// operator<
-inline bool operator< (const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y) < 0;
-}
-
-/// sign
-inline int sign(const BigFloat& x) {
-  return x.sign();
-}
-/// div2
-inline BigFloat div2(const BigFloat& x){
-  return x.div2();
-}
-/// abs
-inline BigFloat abs(const BigFloat& x) {
-  return x.abs();
-}
-/// cmp
-inline int cmp(const BigFloat& x, const BigFloat& y) {
-  return x.cmp(y);
-}
-/// pow
-CGAL_CORE_EXPORT BigFloat pow(const BigFloat&, unsigned long);
-/// power
-inline BigFloat power(const BigFloat& x, unsigned long p) {
-  return pow(x, p);
-}
-/// root(x,k,prec,xx) returns the k-th root of x to precision prec.
-///   The argument x is an initial approximation.
-BigFloat root(const BigFloat&, unsigned long k, const extLong&, const BigFloat&);
-inline BigFloat root(const BigFloat& x, unsigned long k) {
-  return root(x, k, defBFsqrtAbsPrec, x);
-}
-
-/// sqrt to defAbsPrec:
-inline BigFloat sqrt(const BigFloat& x) {
-  return x.sqrt(defBFsqrtAbsPrec);
-}
-
-/// convert an BigFloat Interval to a BigFloat with error bits
-inline BigFloat centerize(const BigFloat& a, const BigFloat& b) {
-  BigFloat z;
-  z.getRep().centerize(a.getRep(), b.getRep());
-  return z;
-}
-
-/// minStar(m,n) returns the min-star of m and n
-inline long minStar(long m, long n) {
-  if (m*n <= 0) return 0;
-  if (m>0) 
-    return core_min(m, n);
-  else 
-    return core_max(m, n);
-}
-/// \name Functions for Compatibility with BigInt (needed by Poly, Curves)
-//@{
-/// isDivisible(a,b) = "is a divisible by b"
-/** 	Assuming that a and  b are in coanonized forms.
-	Defined to be true if mantissa(b) | mantissa(a) && 
-	exp(b) = min*(exp(b), exp(a)).
- *      This concepts assume a and b are exact BigFloats.
- */
-inline bool isDivisible(const BigFloat& a, const BigFloat& b) {
-  // assert: a and b are exact BigFloats.
-  if (sign(a.m()) == 0) return true;
-  if (sign(b.m()) == 0) return false;
-  unsigned long bin_a = getBinExpo(a.m());
-  unsigned long bin_b = getBinExpo(b.m());
-  
-  BigInt m_a = a.m() >> bin_a;
-  BigInt m_b = b.m() >> bin_b;
-  long e_a = bin_a + BigFloatRep::bits(a.exp());
-  long e_b = bin_b + BigFloatRep::bits(b.exp());
-  long dx = minStar(e_a, e_b);
-
-  return isDivisible(m_a, m_b) && (dx == e_b); 
-}
-
-inline bool isDivisible(double x, double y) {
-  //Are these exact?
-  return isDivisible(BigFloat(x), BigFloat(y)); 
-}
-
-/// div_exact(x,y) returns the BigFloat quotient of x divided by y
-/**	This is defined only if isDivisible(x,y).
- */
-// Chee (8/1/2004)   The definition of div_exact(x,y) 
-//   ensure that Polynomials<NT> works with NT=BigFloat and NT=double.
-//Bug: We should first normalize the mantissas of the Bigfloats and
-//then do the BigInt division. For e.g. 1 can be written as 2^{14}*2{-14}.
-//Now if we divide 2 by one using this representation of one and without
-// normalizing it then we get zero.
-inline BigFloat div_exact(const BigFloat& x, const BigFloat& y) {
-  BigInt z;
-  assert (isDivisible(x,y));
-  unsigned long bin_x = getBinExpo(x.m());
-  unsigned long bin_y = getBinExpo(y.m());
-
-  BigInt m_x = x.m() >> bin_x;
-  BigInt m_y = y.m() >> bin_y;
-  long e_x = bin_x + BigFloatRep::bits(x.exp());
-  long e_y = bin_y + BigFloatRep::bits(y.exp());
-  //Since y divides x, e_y = minstar(e_x, e_y)
-  z = div_exact(m_x, m_y);
-
-  //  mpz_divexact(z.get_mp(), x.m().get_mp(), y.m().get_mp()); THIS WAS THE BUG
-  // assert: x.exp() - y.exp() does not under- or over-flow.
-  return BigFloat(z, e_x - e_y);  
-}
-
-inline BigFloat div_exact(double x, double y) {
-  return div_exact(BigFloat(x), BigFloat(y));
-}
-// Remark: there is another notion of "exact division" for BigFloats,
-// 	and that is to make the division return an "exact" BigFloat
-// 	i.e., err()=0.  
-
-/// gcd(a,b) =  BigFloat(gcd(a.mantissa,b.matissa), min(a.exp(), b.exp()) )
-inline BigFloat gcd(const BigFloat& a, const BigFloat& b) {
-  if (sign(a.m()) == 0) return core_abs(b);
-  if (sign(b.m()) == 0) return core_abs(a);
-
-  BigInt r;
-  long dx;
-  unsigned long bin_a = getBinExpo(a.m());
-  unsigned long bin_b = getBinExpo(b.m());
-
-/* THE FOLLOWING IS ALTERNATIVE CODE, for GCD using base B=2^{14}:
- *std::cout << "bin_a=" << bin_a << ",bin_b=" << bin_b << std::endl;
-  std::cout << "a.exp()=" << a.exp() << ",b.exp()=" << b.exp() << std::endl;
-  long chunk_a = BigFloatRep::chunkFloor(bin_a);
-  long chunk_b = BigFloatRep::chunkFloor(bin_b);
-  BigInt m_a = BigFloatRep::chunkShift(a.m(), chunk_a);
-  BigInt m_b = BigFloatRep::chunkShift(b.m(), chunk_b);
-
-  r = gcd(m_a, m_b);
-  dx = minStar(chunk_a + a.exp(), chunk_b + b.exp());
-*/
-  BigInt m_a = a.m() >> bin_a;
-  BigInt m_b = b.m() >> bin_b;
-  r = gcd(m_a, m_b);
-  dx = minStar(bin_a + BigFloatRep::bits(a.exp()),
-		  bin_b + BigFloatRep::bits(b.exp()));
-
-  long chunks = BigFloatRep::chunkFloor(dx);
-  r <<= (dx - BigFloatRep::bits(chunks));
-  dx = chunks;
-
-  return BigFloat(r, 0, dx);
-}
-
-// Not needed for now:
-/// div_rem
-// inline void div_rem(BigFloat& q, BigFloat& r,
-// 	const BigFloat& a, const BigFloat& b) {
-  //q.makeCopy();
-  //r.makeCopy();
-  //mpz_tdiv_qr(q.get_mp(), r.get_mp(), a.get_mp(), b.get_mp());
-//}//
-
-
-// constructor BigRat from BigFloat
-inline BigRat::BigRat(const BigFloat& f) : RCBigRat(new BigRatRep()){
-  *this = f.BigRatValue();
-}
-} //namespace CORE
-#endif // _CORE_BIGFLOAT_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloatRep.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloatRep.h
deleted file mode 100644
index 7cef72c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigFloatRep.h
+++ /dev/null
@@ -1,447 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: BigFloatRep.h
- * Synopsis: 
- * 		Internal Representation BigFloat.
- * 
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_BIGFLOATREP_H_
-#define _CORE_BIGFLOATREP_H_
-
-#include <CGAL/CORE/BigRat.h>
-#include <CGAL/CORE/CoreAux.h>
-#include <CGAL/CORE/CoreDefs.h>
-#include <CGAL/CORE/extLong.h>
-
-namespace CORE { 
-
-//  forward reference
-class BigFloat;
-
-//  class BigFloatRep (internal representation for BigFloat)
-class CGAL_CORE_EXPORT BigFloatRep : public RCRepImpl<BigFloatRep> {
-public:
-  static long chunkCeil(long bits);  //inline
-  static long chunkFloor(long bits); //inline
-  static long bits(long chunks);     //inline
-  static BigInt chunkShift(const BigInt& x, long s); //inline
-  static double lg10(BigInt x);      //inline
-  static long floorlg10(BigInt x);   //inline
-
-  /// exp2(e) returns 2^e : called by BigFloat::exp2(e)
-  /** e can be negative */
-  static BigFloatRep* exp2(int e);
-
-  struct DecimalOutput;
-
-  friend class BigFloat;
-
-  BigInt        m;
-  unsigned long err;
-  long          exp;
-
-public:
-  //  constructors
-  BigFloatRep(int=0);           //inline
-  BigFloatRep(short);           //inline
-  BigFloatRep(float);           //inline
-  BigFloatRep(long);          //inline
-  BigFloatRep(double);        //inline
-  BigFloatRep(const BigInt& I, unsigned long u, long l); //inline
-  BigFloatRep(const BigInt& I, long l); //inline
-  BigFloatRep(const BigInt& I); //inline
-  BigFloatRep(const char *);  //inline
-
-  BigRat BigRatize() const;   //inline
-
-  //  the destructor
-  ~BigFloatRep(); //inline
-
-  CORE_MEMORY(BigFloatRep)    // allocate the memory pool, unless
-	                      // memory pool feature is disabled.
-
-  //  approximation
-  void trunc(const BigInt&, const extLong&, const extLong&);
-  void truncM(const BigFloatRep&, const extLong&, const extLong&);
-  void approx(const BigFloatRep&, const extLong&, const extLong&);
-
-  void div(const BigInt&, const BigInt&, const extLong&, const extLong&);
-  void approx(const BigRat&, const extLong&, const extLong&); //inline
-
-  //  error-normalization
-  void eliminateTrailingZeroes(); //inline
-  void normal();
-  void bigNormal(BigInt&);
-
-  //  arithmetics
-public:
-  void add(const BigFloatRep&, const BigFloatRep&);
-  void sub(const BigFloatRep&, const BigFloatRep&);
-  void mul(const BigFloatRep&, const BigFloatRep&);
-  void div(const BigFloatRep&, const BigFloatRep&, const extLong&);
-  void div2(const BigFloatRep&); ///< exact division by 2
-  /// Converts a pair of BigFloatReps into one with error bounds
-  void centerize(const BigFloatRep&, const BigFloatRep&);
-private:
-  //  squareroot
-  //    arguments:      r = value whose square root we want
-  //                    a = absolute precision of the desired result
-  //                    init = initial approx. to the square root (for Newton)
-  void sqrt(const BigInt& r, const extLong& a);
-  /// sqrt(r,a,rr) -- compute sqrt(r) to absolute precision a,
-  ///      starting from initial approximation of rr.
-  void sqrt(const BigInt& r, const extLong& a, const BigFloat& init);
-  void sqrt(const BigFloatRep& r, const extLong& a);
-  /// sqrt(r,a,rr) -- compute sqrt(r) to absolute precision a,
-  ///      starting from initial approximation of rr.
-  void sqrt(const BigFloatRep& r, const extLong& a, const BigFloat& init);
-
-  //  comparison
-  int compareMExp(const BigFloatRep&) const;
-
-  //  builtin functions
-  extLong lMSB() const;      //inline
-  extLong uMSB() const;      //inline
-  extLong MSB() const;       //inline
-  extLong flrLgErr() const;  //inline
-  extLong clLgErr() const;   //inline
-
-  bool    isZeroIn() const;  //inline
-  int     signM() const;     //inline
-
-  //  cast functions
-  double toDouble() const;
-  long toLong() const;
-  BigInt toBigInt() const;
-
-  //  conversion
-
-  // toString() Joaquin Grech 31/5/2003
-  std::string toString(long prec=defBigFloatOutputDigits, bool sci=false) const;
-  std::string round(std::string inRep, long& L10, unsigned int width) const;
-  DecimalOutput toDecimal(unsigned int width=defBigFloatOutputDigits,
-                          bool Scientific=false) const;
-  void fromString(const char *p, const extLong & prec = defBigFloatInputDigits);
-
-  void dump() const;  //inline
-  long adjustE(long E, BigInt M, long e) const;
-
-public:
-  //  stream operators
-  std::ostream& operator <<(std::ostream&) const; //inline
-  std::istream& operator >>(std::istream&);
-};//class BigFloatRep
-
-////////////////////////////////////////////////////////////
-//  Implementations
-////////////////////////////////////////////////////////////
-
-struct BigFloatRep::DecimalOutput {
-  std::string rep;    // decimal output string
-  int sign;           // 0, +1 or -1
-  bool isScientific;  // false=positional notation
-  int noSignificant;  // number of significant digits
-  //   -1 means this information is not explicitly
-  //   given, and must be determined from rep, etc.
-  bool isExact;       //
-  int errorCode;      // 0 = no error
-                      // 1 = sign of number is unknown (e.g., mantissa
-                      //  is smaller than error)
-
-  DecimalOutput() : rep(""), sign(1), isScientific(false),
-                    noSignificant(0), isExact(false), errorCode(0) {}
-};//DecimalOutput
-
-// constants used by BigFloatRep
-//	NOTES:  CHUNK_BIT is the number of bits in each Chunk
-//	Since LONG_BIT = 32 or 64, then CHUNK_BIT = 14 or 30.
-//	We have:  0 <= err < 4 * 2^{CHUNK_BIT}
-
-const long CHUNK_BIT = (long)(LONG_BIT / 2 - 2); 	//  chunks
-const long HALF_CHUNK_BIT = (CHUNK_BIT + 1) / 2;
-const long DBL_MAX_CHUNK = (DBL_MAX_EXP - 1) / CHUNK_BIT + 1;
-const double lgTenM = 3.321928094887362;
-
-inline long BigFloatRep::chunkCeil(long bits) {
-  if (bits > 0)
-    return (bits - 1) / CHUNK_BIT + 1;
-  else
-    return - (- bits) / CHUNK_BIT;
-}//chunkCeil
-
-inline long BigFloatRep::chunkFloor(long bits) {
-  if (bits >= 0)
-    return bits / CHUNK_BIT;
-  else
-    return - (- bits - 1) / CHUNK_BIT - 1;
-}//chunkFloor
-
-// bits(c) returns the number of bits in c chunks:
-inline long BigFloatRep::bits(long chunks) {
-  return CHUNK_BIT * chunks;
-}
-
-inline BigInt BigFloatRep::chunkShift(const BigInt& x, long s) {
-  if (!s || sign(x) == 0)
-    return x;
-  else if (s > 0)
-    //  shift left
-    if (sign(x) > 0)
-      return x << static_cast<unsigned long>(bits(s));
-    else //  x < 0
-      return - ((-x) << static_cast<unsigned long>(bits(s)));
-  else //  shift right
-    if (sign(x) > 0)
-      return x >> static_cast<unsigned long>(bits(-s));
-    else //  x < 0
-      return - ((-x) >> static_cast<unsigned long>(bits(-s)));
-}//chunkShift
-
-inline BigFloatRep* BigFloatRep::exp2(int e) {
-  long ee;  // this is going to be the exponent
-  if (e >= 0)
-    ee = e/CHUNK_BIT;
-  else
-    ee = - ((-e + CHUNK_BIT -1)/CHUNK_BIT);
-
-  int rem = e - (ee * CHUNK_BIT);     // Assert: 0 <= rem < CHUNK_BIT
-
-  return new BigFloatRep((1<<rem), 0, ee);
-  // Here, we assume CHUNK_BIT is less than int width
-}
-
-//  constructors
-inline BigFloatRep::BigFloatRep(short n)
-  : m(n), err(0), exp(0) {}
-
-inline BigFloatRep::BigFloatRep(float n)
-  : m(n), err(0), exp(0) {}
-
-//  Chee (8/8/04) -- introduced constructor from int
-inline BigFloatRep::BigFloatRep(int n)
-  : m(n), err(0), exp(0) {}
-
-//  Chee (8/8/04) -- introduced constructor from long
-inline BigFloatRep::BigFloatRep(long n)
-  : m(n), err(0), exp(0) {}
-
-//  Chee (8/8/04) -- introduced constructor from double
-/* This turns out to be an alternative implementation of the
- * original one in BigFloat.cpp!!
-inline BigFloatRep::BigFloatRep(double d)
-	    : m(IntMantissa(d)), err(0), exp(0) {
-     BigFloatRep * bfr = exp2(IntExponent(d));  // take care of the exponent
-     m *= bfr->m;
-     exp = bfr->exp;
-}
-*/
-
-inline BigFloatRep::BigFloatRep(const BigInt& I, unsigned long er, long ex)
-  : m(I), err(er), exp(ex) {}
-
-inline BigFloatRep::BigFloatRep(const BigInt& I)
-  : m(I), err(0), exp(0) {}
-
-//Constructs the BigFloat representing I*2^{ex}.
-//If ex >=0 then it is clear how to do it.
-//Otherwise, let |ex| = CHUNK_BIT * q + r. Then
-//I*2^{ex} = I*2^{CHUNK_BIT -r} 2^{-CHUNK_BIT * (q+1)}
-inline BigFloatRep::BigFloatRep(const BigInt& I, long ex) {
-  err=0;
-  exp = chunkFloor(ex);
-  if(ex >= 0)
-    m = I<<(ex - bits(exp));
-  else{//ex < 0
-    exp = chunkFloor(abs(ex));
-    m = I << (CHUNK_BIT - (-ex - bits(exp)));
-    exp = -1*(1 + exp);
-  }
-}
-
-inline BigFloatRep::BigFloatRep(const char *str) : m(0), err(0), exp(0) {
-  fromString(str);
-}
-
-inline BigRat BigFloatRep::BigRatize() const {
-  if (exp >= 0)
-    return BigRat(chunkShift(m, exp), 1);
-  else
-    return BigRat(m, chunkShift(1, - exp));
-}
-
-//  the destructor
-inline BigFloatRep::~BigFloatRep() {}
-
-inline void BigFloatRep::approx(const BigRat& R, const extLong& r, const extLong& a) {
-  div(numerator(R), denominator(R), r, a);
-}
-
-//  eliminate trailing zeroes
-inline void BigFloatRep::eliminateTrailingZeroes() {
-  // eliminate trailing 0's    -- IP 10/9/98
-  /*if (err == 0 && m != 0) {
-    while ((m & ((1 << CHUNK_BIT) - 1)) == 0) {
-      m >>= CHUNK_BIT;
-      exp++;
-    }
-  }*/
-  // new code, much faster, Zilin Du (Nov, 2003)
-  if (err == 0 && sign(m) != 0) {
-    int r = getBinExpo(m) / CHUNK_BIT;
-    m >>= (r * CHUNK_BIT);
-    exp += r;
-  }
-}
-
-//  bultin functions
-inline extLong BigFloatRep::lMSB() const {
-  if (!isZeroIn())
-    return extLong(floorLg(abs(m) - err)) + bits(exp);
-  else
-    return extLong(CORE_negInfty);
-}
-
-/// uMSB() returns an upper bound on log_2(abs(*this)).
-/** Returns -1 if (*this)=0.  
- * Not well-defined if zero is in the interval. 
- */
-inline extLong BigFloatRep::uMSB() const {
-  return extLong(floorLg(abs(m) + err)) + bits(exp);
-}
-
-inline extLong BigFloatRep::MSB() const {
-  // Note : MSB is undefined if it's not exact.
-  if (sign(m))          // sign(m) is non-zero
-    return extLong(floorLg(m)) + bits(exp);
-  else
-    return extLong(CORE_negInfty);
-}
-
-inline extLong BigFloatRep::flrLgErr() const {
-  if (err)
-    return extLong(flrLg(err)) + bits(exp);
-  else
-    return extLong(CORE_negInfty);
-}
-
-inline extLong BigFloatRep::clLgErr() const {
-  if (err)
-    return extLong(clLg(err)) + bits(exp);
-  else
-    return extLong(CORE_negInfty);
-}
-
-// isZero() = true iff zero is inside the interval of BigFloat:
-inline bool BigFloatRep::isZeroIn() const {
-  if (err == 0){
-    return (m == 0);	//Nov 6, 2002: bug fix!
-  }
-  long lm = bitLength(m);
-  if (lm > CHUNK_BIT+2) {
-    return false;   // since err < 4 * 2^{CHUNK_BIT}
-  } else {
-    return (abs(m) <= BigInt(err));
-  }
-}
-
-inline int BigFloatRep::signM() const {
-  return sign(m);
-}
-
-inline double BigFloatRep::lg10(BigInt x) {
-  if (x == 0)
-    return 0;
-
-  BigInt t(abs(x));
-  long l = -1;
-  double d = 0;
-
-  while (t > 0) {
-    l++;
-    d /= 10;
-    d += ulongValue(t%10);
-    t /= 10;
-  }
-  return std::log10(d) + l;
-}
-
-// this is a simpler form of lg10()
-inline long BigFloatRep::floorlg10(BigInt x) {
-  if (x == 0)
-    return 0;
-  BigInt t(abs(x));
-  long l = -1;
-
-  while (t > 0) {
-    l++;
-    t /= 10;
-  }
-  return l;
-}
-
-inline std::ostream& BigFloatRep::operator<<(std::ostream& o) const {
-  bool sci = (o.flags() & std::ios::scientific) > 0;
-  BigFloatRep::DecimalOutput r = toDecimal(o.precision(), sci);
-  if (r.sign == -1)
-    o << "-";
-  o << r.rep;
-  return o;
-}
-
-/* Returns a std::string with precision and format specified
-   Works as cout << with the exception that if the output
-   contains any error it returns a NULL
-   Joaquin Grech 31/5/03
-   */
-inline std::string BigFloatRep::toString(long prec, bool sci) const {
-  BigFloatRep::DecimalOutput r = toDecimal(prec, sci);
-
-  if (r.errorCode == 0) {
-    if (r.sign < 0)
-      return std::string("-")+r.rep;
-    else
-      return r.rep;
-  }
-  return NULL;
-}
-
-inline void BigFloatRep::dump() const {
-  std::cout << "---- BFRep: " << this << " ----" << std::endl;
-  std::cout << "  BF value: ";
-  this->operator<<(std::cout);
-  std::cout <<  std::endl;
-  std::cout << "  m = " << m << std::endl;
-  std::cout << "  err = " << err << std::endl;
-  std::cout << "  exp = " << exp << std::endl;
-  std::cout << " -- End of BFRep " << this << " -- " << std::endl;
-}
-
-} //namespace CORE
-#endif // _CORE_BIGFLOATREP_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigInt.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/BigInt.h
deleted file mode 100644
index aa388c2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigInt.h
+++ /dev/null
@@ -1,562 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: BigInt.h
- * Synopsis: 
- * 		a wrapper class for mpz from GMP
- * 
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-#ifndef _CORE_BIGINT_H_
-#define _CORE_BIGINT_H_
-
-#include <CGAL/CORE/Gmp.h>
-#include <CGAL/CORE/RefCount.h>
-#include <CGAL/CORE/MemoryPool.h>
-#include <string>
-
-namespace CORE { 
-
-
-class BigIntRep : public RCRepImpl<BigIntRep> {
-public:
-  BigIntRep() {
-    mpz_init(mp);
-  }
-  // Note : should the copy-ctor be alloed at all ? [Sylvain Pion]
-  BigIntRep(const BigIntRep& z) : RCRepImpl<BigIntRep>() {
-    mpz_init_set(mp, z.mp);
-  }
-  BigIntRep(signed char c) {
-    mpz_init_set_si(mp, c);
-  }
-  BigIntRep(unsigned char c) {
-    mpz_init_set_ui(mp, c);
-  }
-  BigIntRep(signed int i) {
-    mpz_init_set_si(mp, i);
-  }
-  BigIntRep(unsigned int i) {
-    mpz_init_set_ui(mp, i);
-  }
-  BigIntRep(signed short int s) {
-    mpz_init_set_si(mp, s);
-  }
-  BigIntRep(unsigned short int s) {
-    mpz_init_set_ui(mp, s);
-  }
-  BigIntRep(signed long int l) {
-    mpz_init_set_si(mp, l);
-  }
-  BigIntRep(unsigned long int l) {
-    mpz_init_set_ui(mp, l);
-  }
-  BigIntRep(float f) {
-    mpz_init_set_d(mp, f);
-  }
-  BigIntRep(double d) {
-    mpz_init_set_d(mp, d);
-  }
-  BigIntRep(const char* s, int base=0) {
-    mpz_init_set_str(mp, s, base);
-  }
-  BigIntRep(const std::string& s, int base=0) {
-    mpz_init_set_str(mp, s.c_str(), base);
-  }
-  explicit BigIntRep(mpz_srcptr z) {
-    mpz_init_set(mp, z);
-  }
-  ~BigIntRep() {
-    mpz_clear(mp);
-  }
-
-  CORE_MEMORY(BigIntRep)
-
-  mpz_srcptr get_mp() const {
-    return mp;
-  }
-  mpz_ptr get_mp() {
-    return mp;
-  }
-private:
-  mpz_t mp;
-};
-
-typedef RCImpl<BigIntRep> RCBigInt;
-class CGAL_CORE_EXPORT BigInt : public RCBigInt {
-public:
-  /// \name Constructors
-  //@{
-  /// default constructor
-  BigInt() : RCBigInt(new BigIntRep()) {}
-  /// constructor for <tt>signed char</tt>
-  BigInt(signed char x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>unsigned char</tt>
-  BigInt(unsigned char x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>signed short int</tt>
-  BigInt(signed short int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>unsigned short int</tt>
-  BigInt(unsigned short int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>signed int</tt>
-  BigInt(signed int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>unsigned int</tt>
-  BigInt(unsigned int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>signed long int</tt>
-  BigInt(signed long int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>unsigned long int</tt>
-  BigInt(unsigned long int x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>float</tt>
-  BigInt(float x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>double</tt>
-  BigInt(double x) : RCBigInt(new BigIntRep(x)) {}
-  /// constructor for <tt>const char*</tt> with base
-  BigInt(const char* s, int base=0) : RCBigInt(new BigIntRep(s, base)) {}
-  /// constructor for <tt>std::string</tt> with base
-  BigInt(const std::string& s, int base=0) : RCBigInt(new BigIntRep(s, base)) {}
-  /// constructor for <tt>mpz_srcptr</tt>
-  explicit BigInt(mpz_srcptr z) : RCBigInt(new BigIntRep(z)) {}
-  //@}
-
-  /// \name Copy-Assignment-Destructor
-  //@{
-  /// copy constructor
-  BigInt(const BigInt& rhs) : RCBigInt(rhs) {
-    rep->incRef();
-  }
-  /// assignment operator
-  BigInt& operator=(const BigInt& rhs) {
-    if (this != &rhs) {
-      rep->decRef();
-      rep = rhs.rep;
-      rep->incRef();
-    }
-    return *this;
-  }
-  /// destructor
-  ~BigInt() {
-    rep->decRef();
-  }
-  //@}
-
-  /// \name Overloaded operators
-  //@{
-  BigInt& operator +=(const BigInt& rhs) {
-    makeCopy();
-    mpz_add(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator -=(const BigInt& rhs) {
-    makeCopy();
-    mpz_sub(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator *=(const BigInt& rhs) {
-    makeCopy();
-    mpz_mul(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator /=(const BigInt& rhs) {
-    makeCopy();
-    mpz_tdiv_q(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator %=(const BigInt& rhs) {
-    makeCopy();
-    mpz_tdiv_r(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator &=(const BigInt& rhs) {
-    makeCopy();
-    mpz_and(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator |=(const BigInt& rhs) {
-    makeCopy();
-    mpz_ior(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator ^=(const BigInt& rhs) {
-    makeCopy();
-    mpz_xor(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigInt& operator <<=(unsigned long ul) {
-    makeCopy();
-    mpz_mul_2exp(get_mp(), get_mp(), ul);
-    return *this;
-  }
-  BigInt& operator >>=(unsigned long ul) {
-    makeCopy();
-    mpz_tdiv_q_2exp(get_mp(), get_mp(), ul);
-    return *this;
-  }
-  //@}
-
-  /// \name unary, increment, decrement operators
-  //@{
-  BigInt operator+() const {
-    return BigInt(*this);
-  }
-  BigInt operator-() const {
-    BigInt r;
-    mpz_neg(r.get_mp(), get_mp());
-    return r;
-  }
-  BigInt& operator++() {
-    makeCopy();
-    mpz_add_ui(get_mp(), get_mp(), 1);
-    return *this;
-  }
-  BigInt& operator--() {
-    makeCopy();
-    mpz_sub_ui(get_mp(), get_mp(), 1);
-    return *this;
-  }
-  BigInt operator++(int) {
-    BigInt r(*this);
-    ++(*this);
-    return r;
-  }
-  BigInt operator--(int) {
-    BigInt r(*this);
-    --(*this);
-    return r;
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  /// Has Exact Division
-  static bool hasExactDivision() {
-    return false;
-  }
-  /// get mpz pointer (const)
-  mpz_srcptr get_mp() const {
-    return rep->get_mp();
-  }
-  /// get mpz pointer
-  mpz_ptr get_mp() {
-    return rep->get_mp();
-  }
-  //@}
-
-  /// \name String Conversion Functions
-  //@{
-  /// set value from <tt>const char*</tt>
-  int set_str(const char* s, int base = 0) {
-    makeCopy();
-    return mpz_set_str(get_mp(), s, base);
-  }
-  /// convert to <tt>std::string</tt>
-  std::string get_str(int base = 10) const {
-    int n = mpz_sizeinbase (get_mp(), base) + 2;
-    char *buffer = new char[n];
-    mpz_get_str(buffer, base, get_mp());
-    std::string result(buffer);
-    delete [] buffer;
-    return result;
-  }
-  //@}
-
-  /// \name Conversion Functions
-  //@{
-  /// intValue
-  int intValue() const {
-    return static_cast<int>(mpz_get_si(get_mp()));
-  }
-  /// longValue
-  long longValue() const {
-    return mpz_get_si(get_mp());
-  }
-  /// ulongValue
-  unsigned long ulongValue() const {
-    return mpz_get_ui(get_mp());
-  }
-  /// doubleValue
-  double doubleValue() const {
-    return mpz_get_d(get_mp());
-  }
-  //@}
-};
-
-inline BigInt operator+(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_add(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator-(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_sub(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator*(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_mul(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator/(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_tdiv_q(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator%(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_tdiv_r(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator&(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_and(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator|(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_ior(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator^(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_xor(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigInt operator<<(const BigInt& a, unsigned long ul) {
-  BigInt r;
-  mpz_mul_2exp(r.get_mp(), a.get_mp(), ul);
-  return r;
-}
-inline BigInt operator>>(const BigInt& a, unsigned long ul) {
-  BigInt r;
-  mpz_tdiv_q_2exp(r.get_mp(), a.get_mp(), ul);
-  return r;
-}
-
-inline int cmp(const BigInt& x, const BigInt& y) {
-  return mpz_cmp(x.get_mp(), y.get_mp());
-}
-inline bool operator==(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) == 0;
-}
-inline bool operator!=(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) != 0;
-}
-inline bool operator>=(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) >= 0;
-}
-inline bool operator>(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) > 0;
-}
-inline bool operator<=(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) <= 0;
-}
-inline bool operator<(const BigInt& a, const BigInt& b) {
-  return cmp(a, b) < 0;
-}
-
-inline std::ostream& operator<<(std::ostream& o, const BigInt& x) {
-  //return CORE::operator<<(o, x.get_mp());
-  return CORE::io_write(o, x.get_mp());
-}
-inline std::istream& operator>>(std::istream& i, BigInt& x) {
-  x.makeCopy();
-  //return CORE::operator>>(i, x.get_mp());
-  return CORE::io_read(i, x.get_mp());
-}
-
-/// sign
-inline int sign(const BigInt& a) {
-  return mpz_sgn(a.get_mp());
-}
-/// abs
-inline BigInt abs(const BigInt& a) {
-  BigInt r;
-  mpz_abs(r.get_mp(), a.get_mp());
-  return r;
-}
-/// neg
-inline BigInt neg(const BigInt& a) {
-  BigInt r;
-  mpz_neg(r.get_mp(), a.get_mp());
-  return r;
-}
-/// negate
-inline void negate(BigInt& a) {
-  a.makeCopy();
-  mpz_neg(a.get_mp(), a.get_mp());
-}
-/// cmpabs
-inline int cmpabs(const BigInt& a, const BigInt& b) {
-  return mpz_cmpabs(a.get_mp(), b.get_mp());
-}
-
-/// \name Conversion Functions
-//@{
-/// longValue
-inline long longValue(const BigInt& a) {
-  return a.longValue();
-}
-/// ulongValue
-inline unsigned long ulongValue(const BigInt& a) {
-  return a.ulongValue();
-}
-/// doubleValue
-inline double doubleValue(const BigInt& a) {
-  return a.doubleValue();
-}
-//@}
-
-/// \name File I/O Functions
-//@{
-/// read from file
-void readFromFile(BigInt& z, std::istream& in, long maxLength = 0);
-/// write to file
-void writeToFile(const BigInt& z, std::ostream& in, int base=10, int charsPerLine=80);
-//@}
-
-/// \name Misc Functions
-//@{
-/// isEven
-inline bool isEven(const BigInt& z) {
-  return mpz_even_p(z.get_mp());
-}
-/// isOdd
-inline bool isOdd(const BigInt& z) {
-  return mpz_odd_p(z.get_mp());
-}
-
-/// get exponent of power 2
-inline unsigned long getBinExpo(const BigInt& z) {
-  return mpz_scan1(z.get_mp(), 0);
-}
-/// get exponent of power k
-inline void getKaryExpo(const BigInt& z, BigInt& m, int& e, unsigned long k) {
-  mpz_t f;
-  mpz_init_set_ui(f, k);
-  m.makeCopy();
-  e = mpz_remove(m.get_mp(), z.get_mp(), f);
-  mpz_clear(f);
-}
-
-/// divisible(x,y) = "x | y"
-inline bool isDivisible(const BigInt& x, const BigInt& y) {
-  return mpz_divisible_p(x.get_mp(), y.get_mp()) != 0;
-}
-inline bool isDivisible(int x, int y) {
-  return x % y == 0;
-}
-inline bool isDivisible(long x, long y) {
-  return x % y == 0;
-}
-/// exact div
-inline void divexact(BigInt& z, const BigInt& x, const BigInt& y) {
-  z.makeCopy();
-  mpz_divexact(z.get_mp(), x.get_mp(), y.get_mp());
-}
-// Chee (1/12/2004)   The definition of div_exact(x,y) next
-//   ensure that in Polynomials<NT> works with both NT=BigInt and NT=int:
-inline BigInt div_exact(const BigInt& x, const BigInt& y) {
-  BigInt z;	     // precodition: isDivisible(x,y)
-  divexact(z, x, y); // z is set to x/y;
-  return z;
-}
-inline int div_exact(int x, int y) {
-  return x/y;  // precondition: isDivisible(x,y)
-}
-inline long div_exact(long x, long y) {
-  return x/y;  // precondition: isDivisible(x,y)
-}
-
-
-/// gcd
-inline BigInt gcd(const BigInt& a, const BigInt& b) {
-  BigInt r;
-  mpz_gcd(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-/// div_rem
-inline void div_rem(BigInt& q, BigInt& r, const BigInt& a, const BigInt& b) {
-  q.makeCopy();
-  r.makeCopy();
-  mpz_tdiv_qr(q.get_mp(), r.get_mp(), a.get_mp(), b.get_mp());
-}
-/// power
-inline void power(BigInt& c, const BigInt& a, unsigned long ul) {
-  c.makeCopy();
-  mpz_pow_ui(c.get_mp(), a.get_mp(), ul);
-}
-
-// pow
-inline BigInt pow(const BigInt& a, unsigned long ui) {
-  BigInt r;
-  power(r, a, ui);
-  return r;
-}
-
-// bit length
-inline int bitLength(const BigInt& a) {
-  return mpz_sizeinbase(a.get_mp(), 2);
-}
-/// floorLg -- floor of log_2(a)
-/** Convention: a=0, floorLg(a) returns -1. 
- *  This makes sense for integer a.
- */
-inline long floorLg(const BigInt& a) {
-  return (sign(a) == 0) ? (-1) : (bitLength(a)-1);
-}
-/// ceilLg -- ceiling of log_2(a) where a=BigInt, int or long
-/** Convention: a=0, ceilLg(a) returns -1. 
- *  This makes sense for integer a.
- */
-inline long ceilLg(const BigInt& a) {
-  if (sign(a) == 0)
-    return -1;
-  unsigned long len = bitLength(a);
-  return (mpz_scan1(a.get_mp(), 0) == len-1) ? (len-1) : len;
-}
-inline long ceilLg(long a) { // need this for Polynomial<long>
-  return ceilLg(BigInt(a));
-}
-inline long ceilLg(int a) { // need this for Polynomial<int>
-  return ceilLg(BigInt(a));
-}
-
-
-// return a gmp_randstate_t structure
-extern gmp_randstate_t* getRandstate();
-/// seed function
-inline void seed(const BigInt& a) {
-  gmp_randseed(*getRandstate(), a.get_mp());
-}
-/// randomize function
-inline BigInt randomize(const BigInt& a) {
-  BigInt r;
-  mpz_urandomm(r.get_mp(), *getRandstate(), a.get_mp());
-  return r;
-}
-//@}
-
-} //namespace CORE
-#endif // _CORE_BIGINT_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigRat.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/BigRat.h
deleted file mode 100644
index 80a9ab8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/BigRat.h
+++ /dev/null
@@ -1,489 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: BigRat.h
- * Synopsis: 
- * 		a wrapper class for mpq from GMP
- * 
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_BIGRAT_H_
-#define _CORE_BIGRAT_H_
-
-#include <CGAL/CORE/BigInt.h>
-
-namespace CORE { 
-
-class BigRatRep : public RCRepImpl<BigRatRep> {
-public:
-  BigRatRep() {
-    mpq_init(mp);
-  }
-  // Note : should the copy-ctor be alloed at all ? [Sylvain Pion]
-  BigRatRep(const BigRatRep& z)  : RCRepImpl<BigRatRep>() {
-    mpq_init(mp);
-    mpq_set(mp, z.mp);
-  }
-  BigRatRep(signed char c) {
-    mpq_init(mp);
-    mpq_set_si(mp, c, 1);
-  }
-  BigRatRep(unsigned char c) {
-    mpq_init(mp);
-    mpq_set_ui(mp, c, 1);
-  }
-  BigRatRep(signed int i) {
-    mpq_init(mp);
-    mpq_set_si(mp, i, 1);
-  }
-  BigRatRep(unsigned int i) {
-    mpq_init(mp);
-    mpq_set_ui(mp, i, 1);
-  }
-  BigRatRep(signed short int s) {
-    mpq_init(mp);
-    mpq_set_si(mp, s, 1);
-  }
-  BigRatRep(unsigned short int s) {
-    mpq_init(mp);
-    mpq_set_ui(mp, s, 1);
-  }
-  BigRatRep(signed long int l) {
-    mpq_init(mp);
-    mpq_set_si(mp, l, 1);
-  }
-  BigRatRep(unsigned long int l) {
-    mpq_init(mp);
-    mpq_set_ui(mp, l, 1);
-  }
-  BigRatRep(float f) {
-    mpq_init(mp);
-    mpq_set_d(mp, f);
-  }
-  BigRatRep(double d) {
-    mpq_init(mp);
-    mpq_set_d(mp, d);
-  }
-  BigRatRep(const char* s) {
-    mpq_init(mp);
-    mpq_set_str(mp, s, 0);
-  }
-  BigRatRep(const std::string& s) {
-    mpq_init(mp);
-    mpq_set_str(mp, s.c_str(), 0);
-  }
-  explicit BigRatRep(mpq_srcptr q) {
-    mpq_init(mp);
-    mpq_set(mp, q);
-  }
-  BigRatRep(mpz_srcptr z) {
-    mpq_init(mp);
-    mpq_set_z(mp, z);
-  }
-  BigRatRep(mpz_srcptr n, mpz_srcptr d) {
-    mpq_init(mp);
-    mpz_set(mpq_numref(mp), n);
-    mpz_set(mpq_denref(mp), d);
-    mpq_canonicalize(mp);
-  }
-  ~BigRatRep() {
-    mpq_clear(mp);
-  }
-
-  CORE_MEMORY(BigRatRep)
-
-  mpq_srcptr get_mp() const {
-    return mp;
-  }
-  mpq_ptr get_mp() {
-    return mp;
-  }
-private:
-  mpq_t mp;
-}; //BigRatRep
-
-class BigFloat;
-
-typedef RCImpl<BigRatRep> RCBigRat;
-class BigRat : public RCBigRat {
-public:
-  /// \name Constructors
-  //@{
-  /// default constructor
-  BigRat() : RCBigRat(new BigRatRep()) {}
-  /// constructor for <tt>signed char</tt>
-  BigRat(signed char x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>unsigned char</tt>
-  BigRat(unsigned char x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>signed short int</tt>
-  BigRat(signed short int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>unsigned short int</tt>
-  BigRat(unsigned short int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>signed int</tt>
-  BigRat(signed int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>unsigned int</tt>
-  BigRat(unsigned int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>signed long int</tt>
-  BigRat(signed long int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>unsigned long int</tt>
-  BigRat(unsigned long int x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>float</tt>
-  BigRat(float x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>double</tt>
-  BigRat(double x) : RCBigRat(new BigRatRep(x)) {}
-  /// constructor for <tt>const char*</tt> with base
-  BigRat(const char* s) : RCBigRat(new BigRatRep(s)) {}
-  /// constructor for <tt>std::string</tt> with base
-  BigRat(const std::string& s) : RCBigRat(new BigRatRep(s)) {}
-  /// constructor for <tt>mpq_srcptr</tt>
-  explicit BigRat(mpq_srcptr z) : RCBigRat(new BigRatRep(z)) {}
-  /// constructor for <tt>BigInt</tt>
-  BigRat(const BigInt& z) : RCBigRat(new BigRatRep(z.get_mp())) {}
-  /// constructor for two <tt>BigInts</tt>
-  BigRat(const BigInt& n, const BigInt& d)
-      : RCBigRat(new BigRatRep(n.get_mp(), d.get_mp())) {}
-  /// constructor for <tt>BigFloat</tt>
-  BigRat(const BigFloat&);
-  //@}
-
-  /// \name Copy-Assignment-Destructor
-  //@{
-  /// copy constructor
-  BigRat(const BigRat& rhs) : RCBigRat(rhs) {
-    rep->incRef();
-  }
-  /// assignment operator
-  BigRat& operator=(const BigRat& rhs) {
-    if (this != &rhs) {
-      rep->decRef();
-      rep = rhs.rep;
-      rep->incRef();
-    }
-    return *this;
-  }
-  /// destructor
-  ~BigRat() {
-    rep->decRef();
-  }
-  //@}
-
-  /// \name Overloaded operators
-  //@{
-  BigRat& operator +=(const BigRat& rhs) {
-    makeCopy();
-    mpq_add(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigRat& operator -=(const BigRat& rhs) {
-    makeCopy();
-    mpq_sub(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigRat& operator *=(const BigRat& rhs) {
-    makeCopy();
-    mpq_mul(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigRat& operator /=(const BigRat& rhs) {
-    makeCopy();
-    mpq_div(get_mp(), get_mp(), rhs.get_mp());
-    return *this;
-  }
-  BigRat& operator <<=(unsigned long ul) {
-    makeCopy();
-    mpq_mul_2exp(get_mp(), get_mp(), ul);
-    return *this;
-  }
-  BigRat& operator >>=(unsigned long ul) {
-    makeCopy();
-    mpq_div_2exp(get_mp(), get_mp(), ul);
-    return *this;
-  }
-  //@}
-
-  /// \name div2, unary, increment, decrement operators
-  //@{
-
-  /// exact division by 2 (this method is provided for compatibility)
-  BigRat div2() const {
-    BigRat r; BigRat t(2);     // probably not most efficient way
-    mpq_div(r.get_mp(), get_mp(), t.get_mp());
-    return r;
-  }
-  BigRat operator+() const {
-    return BigRat(*this);
-  }
-  BigRat operator-() const {
-    BigRat r;
-    mpq_neg(r.get_mp(), get_mp());
-    return r;
-  }
-  BigRat& operator++() {
-    makeCopy();
-    mpz_add(get_num_mp(),get_num_mp(),get_den_mp());
-    return *this;
-  }
-  BigRat& operator--() {
-    makeCopy();
-    mpz_sub(get_num_mp(),get_num_mp(),get_den_mp());
-    return *this;
-  }
-  BigRat operator++(int) {
-    BigRat r(*this);
-    ++(*this);
-    return r;
-  }
-  BigRat operator--(int) {
-    BigRat r(*this);
-    --(*this);
-    return r;
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  /// Canonicalize
-  void canonicalize() {
-    makeCopy();
-    mpq_canonicalize(get_mp());
-  } 
-  /// Has Exact Division
-  static bool hasExactDivision() {
-    return true;
-  }
-
-  /// return mpz pointer of numerator (const)
-  mpz_srcptr get_num_mp() const {
-    return mpq_numref(get_mp());
-  }
-  /// return mpz pointer of numerator
-  mpz_ptr get_num_mp() {
-    return mpq_numref(get_mp());
-  }
-  /// return mpz pointer of denominator
-  mpz_srcptr get_den_mp() const {
-    return mpq_denref(get_mp());
-  }
-  /// return mpz pointer of denominator
-  mpz_ptr get_den_mp() {
-    return mpq_denref(get_mp());
-  }
-
-  /// get mpq pointer (const)
-  mpq_srcptr get_mp() const {
-    return rep->get_mp();
-  }
-  /// get mpq pointer
-  mpq_ptr get_mp() {
-    return rep->get_mp();
-  }
-  //@}
-
-  /// \name String Conversion Functions
-  //@{
-  /// set value from <tt>const char*</tt>
-  int set_str(const char* s, int base = 0) {
-    makeCopy();
-    return mpq_set_str(get_mp(), s, base);
-  }
-  /// convert to <tt>std::string</tt>
-  std::string get_str(int base = 10) const {
-    int n = mpz_sizeinbase(mpq_numref(get_mp()), base) + mpz_sizeinbase(mpq_denref(get_mp()), base)+ 3;
-    char *buffer = new char[n];
-    mpq_get_str(buffer, base, get_mp());
-    std::string result(buffer);
-    delete [] buffer;
-    return result;
-  }
-  //@}
-
-  /// \name Conversion Functions
-  //@{
-  /// intValue
-  int intValue() const {
-    return static_cast<int>(doubleValue());
-  }
-  /// longValue
-  long longValue() const {
-    return static_cast<long>(doubleValue());
-  }
-  /// doubleValue
-  double doubleValue() const {
-    return mpq_get_d(get_mp());
-  }
-  /// BigIntValue
-  BigInt BigIntValue() const {
-    BigInt r;
-    mpz_tdiv_q(r.get_mp(), get_num_mp(), get_den_mp());
-    return r;
-  }
-  //@}
-}; //BigRat class
-
-inline BigRat operator+(const BigRat& a, const BigRat& b) {
-  BigRat r;
-  mpq_add(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigRat operator-(const BigRat& a, const BigRat& b) {
-  BigRat r;
-  mpq_sub(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigRat operator*(const BigRat& a, const BigRat& b) {
-  BigRat r;
-  mpq_mul(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-inline BigRat operator/(const BigRat& a, const BigRat& b) {
-  BigRat r;
-  mpq_div(r.get_mp(), a.get_mp(), b.get_mp());
-  return r;
-}
-// Chee (3/19/2004):
-//   The following definitions of div_exact(x,y) and gcd(x,y)
-//   ensures that in Polynomial<NT>
-/// divisible(x,y) = "x | y"
-inline BigRat div_exact(const BigRat& x, const BigRat& y) {
-	BigRat z;
-	mpq_div(z.get_mp(), x.get_mp(), y.get_mp());
-	return z;
-}
-/// numerator
-inline BigInt numerator(const BigRat& a) {
-  return BigInt(a.get_num_mp());
-}
-/// denominator
-inline BigInt denominator(const BigRat& a) {
-  return BigInt(a.get_den_mp());
-}
-
-inline BigRat gcd(const BigRat& x, const BigRat& y) {
-  //	return BigRat(1);  // Remark: we may want replace this by
-			   // the definition of gcd of a quotient field
-			   // of a UFD [Yap's book, Chap.3]
-  //Here is one possible definition: gcd of x and y is just the
-  //gcd of the numerators of x and y divided by the gcd of the
-  //denominators of x and y.
-  BigInt n = gcd(numerator(x), numerator(y));
-  BigInt d = gcd(denominator(x), denominator(y));
-  return BigRat(n,d);
-		
-}
-// Chee: 8/8/2004: need isDivisible to compile Polynomial<BigRat>
-// A trivial implementation is to return true always. But this
-// caused tPolyRat to fail.
-// So we follow the definition of
-// Expr::isDivisible(e1, e2) which checks if e1/e2 is an integer.  
-inline bool isInteger(const BigRat& x) {
-  return BigInt(x.get_den_mp()) == 1;
-}
-inline bool isDivisible(const BigRat& x, const BigRat& y) {
-  BigRat r;
-  mpq_div(r.get_mp(), x.get_mp(), y.get_mp());
-  return isInteger(r);
-}
-inline BigRat operator<<(const BigRat& a, unsigned long ul) {
-  BigRat r;
-  mpq_mul_2exp(r.get_mp(), a.get_mp(), ul);
-  return r;
-}
-inline BigRat operator>>(const BigRat& a, unsigned long ul) {
-  BigRat r;
-  mpq_div_2exp(r.get_mp(), a.get_mp(), ul);
-  return r;
-}
-
-inline int cmp(const BigRat& x, const BigRat& y) {
-  return mpq_cmp(x.get_mp(), y.get_mp());
-}
-inline bool operator==(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) == 0;
-}
-inline bool operator!=(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) != 0;
-}
-inline bool operator>=(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) >= 0;
-}
-inline bool operator>(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) > 0;
-}
-inline bool operator<=(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) <= 0;
-}
-inline bool operator<(const BigRat& a, const BigRat& b) {
-  return cmp(a, b) < 0;
-}
-
-inline std::ostream& operator<<(std::ostream& o, const BigRat& x) {
-  //return CORE::operator<<(o, x.get_mp());
-  return CORE::io_write(o, x.get_mp());
-}
-inline std::istream& operator>>(std::istream& i, BigRat& x) {
-  x.makeCopy();
-  //return CORE::operator>>(i, x.get_mp());
-  return CORE::io_read(i, x.get_mp());
-}
-
-/// sign
-inline int sign(const BigRat& a) {
-  return mpq_sgn(a.get_mp());
-}
-/// abs
-inline BigRat abs(const BigRat& a) {
-  BigRat r;
-  mpq_abs(r.get_mp(), a.get_mp());
-  return r;
-}
-/// neg
-inline BigRat neg(const BigRat& a) {
-  BigRat r;
-  mpq_neg(r.get_mp(), a.get_mp());
-  return r;
-}
-/// div2
-inline BigRat div2(const BigRat& a) {
-  BigRat r(a);
-  return r.div2();
-}
-/// longValue
-inline long longValue(const BigRat& a) {
-  return a.longValue();
-}
-/// doubleValue
-inline double doubleValue(const BigRat& a) {
-  return a.doubleValue();
-}
-/// return BigInt value
-inline BigInt BigIntValue(const BigRat& a) {
-  return a.BigIntValue();
-}
-
-} //namespace CORE
-#endif // _CORE_BIGRAT_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/CORE.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/CORE.h
deleted file mode 100644
index 2e353ce..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/CORE.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CORE.h
- * Synopsis:
- *      The main inclusion file for the Core Library system.
- *      All "Core programs" must include this file.
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_CORE_H_
-#define _CORE_CORE_H_
-
-#include <CGAL/CORE/CoreDefs.h>
-#include <CGAL/CORE/Timer.h>
-
-// User can still access machine types:
-typedef double machine_double;
-typedef long machine_long;
-
-#ifndef CORE_LEVEL
-#   define CORE_LEVEL  DEFAULT_CORE_LEVEL
-#endif
-
-#if CORE_LEVEL  == 1
-#   define Real double
-#   define Expr double
-#elif CORE_LEVEL  == 2
-#   include <CGAL/CORE/Real.h>
-#   undef long
-#   undef double
-#   define long Real
-#   define double Real
-#   define Expr Real
-#elif CORE_LEVEL  == 3
-#   include <CGAL/CORE/Expr.h>
-#   undef long
-#   undef double
-#   define long Expr
-#   define double Expr
-#   define Real Expr
-#elif CORE_LEVEL == 4
-#   include <CGAL/CORE/Expr.h>
-#endif
-
-#endif // _CORE_CORE_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Config.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Config.h
deleted file mode 100644
index f8c331d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Config.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_CONFIG_H_
-#define _CORE_CONFIG_H_
-
-// disable debug
-//#define CORE_DISABLE_DEBUG
-
-// disable inline functions
-//#define CORE_DISABLE_INLINE
-
-// disable memory pool
-//#define CORE_DISABLE_MEMPOOL
-
-// debug reference counting
-//#define CORE_RC_DEBUG 1
-
-#include <CGAL/auto_link/CORE.h>
-
-#include <CGAL/export/CORE.h>
-
-#endif // _CORE_CONFIG_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreAux.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreAux.h
deleted file mode 100644
index 82aea07..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreAux.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CoreAux.h
- * Synopsis:
- *      Auxilliary functions
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_COREAUX_H_
-#define _CORE_COREAUX_H_
-
-#include <iostream>
-#include <fstream>
-#include "CGAL/CORE/Impl.h"
-
-namespace CORE { 
-
-#ifndef LONG_BIT // such as in Linux
-  #define LONG_BIT (sizeof(long) * 8)
-#endif
-
-/// CORE_EPS is unit roundoff for IEEE standard double, i.e., 2^{-53}.
-// NOTES:
-// (1) CORE_EPS is used in our Floating Point Filter (Filter.h)
-// (2) 2^{-53} is called "unit roundoff" and
-// 	is the roundoff error for numbers in the range [1,2).
-//  	"Machine epsilon" is 2*CORE_EPS = 2^{-52}.  It is the
-//  	smallest gap between two normal machine numbers  --Chee 8/2003
-//
-// const double eps = (ldexp(1.0, -53)); // fails to link on SunPro
-#define CORE_EPS ((1.0/(1<<30))/(1<<23))
-// 
-#define CORE_MACHINE_EPS ((1.0/(1<<30))/(1<<22))
-
-/// relEps is relative error for IEEE standard double, 1+2^{-52}.
-const double relEps = (1.0 + std::ldexp(1.0, -52));
-
-/// CORE_DIAGFILE is used for all warning and error messages
-extern const char* CORE_DIAGFILE;
-
-/// template function returns the maximum value of two
-template <class T>
-inline const T& core_max(const T& a, const T& b) {
-  return ((a > b) ? a : b);
-}
-
-/// template function returns the minimum value of two
-template <class T>
-inline const T& core_min(const T& a, const T& b) {
-  return ((a < b) ? a : b);
-}
-
-/// template function returns the maximum value of three
-template <class T>
-inline const T& core_max(const T& a, const T& b, const T& c) {
-  return ((a > b) ? core_max(a, c) : core_max(b, c));
-}
-
-/// template function swaps two values
-template <class T>
-inline  void core_swap(T& a, T& b) {
-  T tmp;
-  tmp = a;
-  a = b;
-  b = tmp;
-}
-
-/// template function rotate three values
-template <class T>
-inline  void core_rotate(T& a, T& b, T& c) {
-  T tmp;
-  tmp = a;
-  a = b;
-  b = c;
-  c = tmp;
-}
-
-/// template function returns the minimum value of three
-template <class T>
-inline const T& core_min(const T& a, const T& b, const T& c) {
-  return ((a < b) ? core_min(a, c) : core_min(b, c));
-}
-
-/// template function returns the absolute value
-template <class T>
-inline const T core_abs(const T& a) {
-  return ((a < T(0)) ? -a : a);
-}
-
-/// returns floor log base 2 of abs(x)
-/**  CONVENTION: lg(0) = -1 */
-CGAL_CORE_EXPORT int flrLg(long x);
-
-/// returns floor log base 2 of unsigned long x
-/**  CONVENTION: lg(0) = -1 */
-CGAL_CORE_EXPORT int flrLg(unsigned long x);
-
-/// returns ceiling log base 2 of abs(x)
-/**  CONVENTION: lg(0) = -1 */
-CGAL_CORE_EXPORT int clLg(long x);
-
-/// returns ceiling log base 2 of unsigned long x
-/**  CONVENTION: lg(0) = -1 */
-CGAL_CORE_EXPORT int clLg(unsigned long x);
-
-/// gcd for machine type long
-CGAL_CORE_EXPORT long gcd(long m, long n);
-
-/// abs for int type
-inline int abs(int x) {
-  return (x>=0) ? x : (-x);
-}
-
-/// abs for long type
-inline long abs(long x) {
-  return (x>=0) ? x : (-x);
-}
-
-/// sign for int type
-inline int sign(int x) {
-  return (x==0) ? 0 : ((x>0) ? 1 : (-1));
-}
-
-/// sign for long type
-inline long sign(long x) {
-  return (x==0) ? 0 : ((x>0) ? 1 : (-1));
-}
-
-/// overloaded << to print out std::string
-inline std::ostream& operator<< (std::ostream& o, const std::string& s) {
-  o << s.c_str();
-  return o;
-}
-
-/// implements the "integer mantissa" function
-//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
-CGAL_CORE_EXPORT double IntMantissa(double d);
-
-/// implements the "integer exponent" function
-//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
-CGAL_CORE_EXPORT int IntExponent(double d);
-
-/// Writes out an error or warning message in the local file CORE_DIAGFILE
-/** If last argument (err) is TRUE, then this is considered an error 
- *  (not just warning).  In this case, the message is also printed in
- *  std::cerr, using std::perror(). 
- *  */
-CGAL_CORE_EXPORT void core_error(std::string msg, std::string file, int lineno, bool err);
-
-/// This is for debugging messages
-inline void core_debug(std::string msg){
-  std::cout << __FILE__ << "::" << __LINE__ << ": " << msg
-	    << std::endl;
-}
-
-
-} //namespace CORE
-#endif // _CORE_COREAUX_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreDefs.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreDefs.h
deleted file mode 100644
index f0ac592..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/CoreDefs.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CoreDefs.h
- * Synopsis:
- *       This contains useful Core Library global parameters which
- *       users may modify at runtime or compile time
- *       For each parameter, we provide corresponding methods to
- *       modify or examine the values.
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_COREDEFS_H_
-#define _CORE_COREDEFS_H_
-
-#include <CGAL/CORE/extLong.h>
-
-namespace CORE { 
-
-//////////////////////////////////////////////////////////////
-// defined constants
-//////////////////////////////////////////////////////////////
-
-/// default accuracy level
-#define DEFAULT_CORE_LEVEL 3
-
-/// short hand for positive infinity
-#define CORE_INFTY  (CORE_posInfty)
-
-//////////////////////////////////////////////////////////////
-// global precision parameters
-//////////////////////////////////////////////////////////////
-
-/// Abort Flag -- default value is true
-/** The normal behavior is to abort when an invalid expression
- * is constructed.  This flag can be used to turn off this abort.
- * In any case, an error message will be printed */
-CGAL_CORE_EXPORT extern bool AbortFlag;
-
-/// Invalid Flag -- initiallly value is non-negative
-/** If the Abort Flag is false, then the Invalid flag will be set to
- *  a negative value whenever an invalid expression is constructed.
- *  It is the user's responsibility to check this flag and to make
- *  it non-negative again. */
-CGAL_CORE_EXPORT extern int InvalidFlag;
-
-/// Escape Precision in bits
-CGAL_CORE_EXPORT extern extLong EscapePrec;
-
-/// current ur when EscapePrec triggered
-/** this flag becomes negative when default EscapePrec is applied */
-CGAL_CORE_EXPORT extern long EscapePrecFlag;
-
-/// Escape Precision Warning Flag
-/** this flag is true by default, and will cause a warning to be printed
-    when EscapePrec is reached */
-CGAL_CORE_EXPORT extern bool EscapePrecWarning;
-
-// These following two values determine the precision of computing
-// approximations in Expr.
-
-/// default Relative Precision in bits
-CGAL_CORE_EXPORT extern extLong defRelPrec;
-/// default Absolute Precision in bits
-CGAL_CORE_EXPORT extern extLong defAbsPrec;
-
-/// default # of decimal digits for conversion from a BF to string.
-/** This value cannot be CORE_INFTY.
-    See also defOutputDigits. 
-    */
-/*  QUESTION: the following comment seems to contradict the above comment:
-	"controls the printout precision of std::cout for BigFloat"
-    Perhaps, we should merge defOutputDigits and defBigFloatOutputDigits?
-    */
-CGAL_CORE_EXPORT extern long defBigFloatOutputDigits;
-
-/// default input precision in digits for converting a string to a Real or Expr
-/** This value can be CORE_INFTY */
-CGAL_CORE_EXPORT extern extLong defInputDigits;
-
-/// controls the printout precision of std::cout for Real and Expr
-/** This value cannot be CORE_INFTY
-    See also defBigFloatOutputDigits. 
-    (it really should be an int, as in std::cout.setprecision(int)). */
-CGAL_CORE_EXPORT extern long defOutputDigits;
-
-/// default input precision in digits for converting a string to a BigFloat
-/** This value cannot be CORE_INFTY. */
-CGAL_CORE_EXPORT extern long defBigFloatInputDigits;
-
-/// default BigFloat Division Relative Precision
-CGAL_CORE_EXPORT extern extLong defBFdivRelPrec;
-
-/// default BigFloat Sqrt Absolute Precision
-CGAL_CORE_EXPORT extern extLong defBFsqrtAbsPrec;
-
-//////////////////////////////////////////////////////////////
-// Mode parameters: incremental, progressive, filters
-//////////////////////////////////////////////////////////////
-
-/// floating point filter flag
-CGAL_CORE_EXPORT extern bool fpFilterFlag;
-/// if true, evaluation of expressions would be incremental
-CGAL_CORE_EXPORT extern bool incrementalEvalFlag;
-/// progressive evaluation flag
-CGAL_CORE_EXPORT extern bool progressiveEvalFlag;
-/// rational reduction flag
-CGAL_CORE_EXPORT extern bool rationalReduceFlag;
-/// default initial (bit) precision for AddSub Progressive Evaluation
-CGAL_CORE_EXPORT extern long defInitialProgressivePrec;
-
-//////////////////////////////////////////////////////////////
-// methods for setting global precision parameters
-// 	including: scientific vs. positional format
-//	All the set methods return the previous global value if any
-//////////////////////////////////////////////////////////////
-
-/// set default composite precision [defAbsPrec, defRelPrec]
-/** It determines the precision to which an Expr evaluates its
-    (exact, implicit) constant value. */
-inline void setDefaultPrecision(const extLong &r, const extLong &a) {
-  defRelPrec = r;
-  defAbsPrec = a;
-}
-
-/// set default relative precision
-inline extLong setDefaultRelPrecision(const extLong &r) {
-  extLong old = defRelPrec;
-  defRelPrec = r;
-  return old;
-}
-
-/// set default absolute precision
-inline extLong setDefaultAbsPrecision(const extLong &a) {
-  extLong old = defAbsPrec;
-  defAbsPrec = a;
-  return old;
-}
-
-/// set default input digits (for Expr, Real)
-/** it controls the absolute error */
-inline extLong setDefaultInputDigits(const extLong &d) {
-  extLong old = defInputDigits;
-  defInputDigits = d;
-  return old;
-}
-
-/// set default output digits (for Expr, Real)
-inline long setDefaultOutputDigits(long d = defOutputDigits,
-                                   std::ostream& o = std::cout) {
-  long old = defOutputDigits;
-  defOutputDigits = d;
-  o.precision(d);
-  return old;
-}
-
-/// set default input digits for BigFloat
-inline long setDefaultBFInputDigits(long d) {
-  long old = defBigFloatInputDigits;
-  defBigFloatInputDigits = d;
-  return old;
-}
-
-/// set default output digits for BigFloat
-inline long setDefaultBFOutputDigits(long d) {
-  long old = defBigFloatOutputDigits;
-  defBigFloatOutputDigits = d;
-  return old;
-}
-
-/// turn floating-point filter on/off
-inline bool setFpFilterFlag(bool f) {
-  bool oldf = fpFilterFlag;
-  fpFilterFlag = f;
-  return oldf;
-}
-
-/// turn incremental evaluation flag on/off
-inline bool setIncrementalEvalFlag(bool f) {
-  bool oldf = incrementalEvalFlag;
-  incrementalEvalFlag = f;
-  return oldf;
-}
-
-/// turn progressive evaluation flag on/off
-inline bool setProgressiveEvalFlag(bool f) {
-  bool oldf = progressiveEvalFlag;
-  progressiveEvalFlag = f;
-  return oldf;
-}
-
-/// set initial bit precision for progressive evaluation:
-inline long setDefInitialProgressivePrec(long n) {
-  long oldn = defInitialProgressivePrec;
-  defInitialProgressivePrec = n;
-  return oldn;
-}
-
-/// turn rational reduction flag on/off
-inline bool setRationalReduceFlag(bool f) {
-  bool oldf = rationalReduceFlag;
-  rationalReduceFlag = f;
-  return oldf;
-}
-
-/// CORE_init(..) is the CORE initialization function.
-/** We recommend calling it before anything else.  Originally motivated
-    by need to get around gnu's compiler bug in which the variable 
-    "defAbsPrec" was not properly initialized.  But it has other uses,
-    e.g., overriding the default std::cout precision (most systems 
-    initializes this value to 6) to our own */
-inline void CORE_init(long d) {
-  defAbsPrec = CORE_posInfty;
-  defOutputDigits = d;
-  std::setprecision(defOutputDigits);
-}
-
-/// change to scientific output format
-inline void setScientificFormat(std::ostream& o = std::cout) {
-  o.setf(std::ios::scientific, std::ios::floatfield);
-}
-
-/// change to positional output format
-inline void setPositionalFormat(std::ostream& o = std::cout) {
-  o.setf(std::ios::fixed, std::ios::floatfield);
-}
-
-} //namespace CORE
-#endif // _CORE_COREDEFS_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Expr.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Expr.h
deleted file mode 100644
index f38795e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Expr.h
+++ /dev/null
@@ -1,551 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Expr.h
- * Synopsis: a class of Expression in Level 3
- * 
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *       Vikram Sharma<sharma at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_EXPR_H_
-#define _CORE_EXPR_H_
-
-#include <CGAL/CORE/ExprRep.h>
-
-namespace CORE { 
-
-/// \class Expr Expr.h
-/// \brief Expr is a class of Expression in Level 3
-typedef RCImpl<ExprRep> RCExpr;
-
-class Expr : public RCExpr {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  Expr() : RCExpr(new ConstDoubleRep()) {}
-  /// constructor for <tt>int</tt>
-  Expr(int i) : RCExpr(new ConstDoubleRep(i)) {}
-  /// constructor for <tt>short</tt>
-  Expr(short i) : RCExpr(new ConstDoubleRep(i)) {}
-  /// constructor for <tt>unsigned int</tt>
-  Expr(unsigned int ui) : RCExpr(new ConstDoubleRep(ui)) {}
-
-  /// constructor for <tt>long</tt>
-  Expr(long l) : RCExpr(new ConstRealRep(Real(l))) {}
-  /// constructor for <tt>unsigned long</tt>
-  Expr(unsigned long ul) : RCExpr(new ConstRealRep(Real(ul))) {}
-
-  /// constructor for <tt>float</tt>
-  /** \note the results of this constructor may appear unpredictable to the 
-   *  user.  E.g.,  one may assume that new Expr(.1) is exactly equal to .1,
-   *  but it will be print as
-   *      .1000000000000000055511151231257827021181583404541015625.
-   *  This is so because .1 cannot be represented exactly as a double
-   *  (or, for that matter, as a binary fraction of any finite length). 
-   *  The value is the closest double value determined by the compiler.
-   */
-  Expr(float f) : RCExpr(NULL) { // check for valid numbers
-    // (i.e., not infinite and not NaN)
-    if (! CGAL_CORE_finite(f)) {
-      std::cerr << " ERROR : constructed an invalid float! " << std::endl;
-      if (AbortFlag)
-        abort();
-      InvalidFlag = -1;
-    }
-    rep = new ConstDoubleRep(f);
-  }
-  /// constructor for <tt>double</tt>
-  Expr(double d) : RCExpr(NULL) { // check for valid numbers
-    // (i.e., not infinite and not NaN)
-    if (! CGAL_CORE_finite(d)) {
-      std::cerr << " ERROR : constructed an invalid double! " << std::endl;
-      if (AbortFlag)
-        abort();
-      InvalidFlag = -2;
-    }
-    rep = new ConstDoubleRep(d);
-  }
-
-  /// constructor for <tt>BigInt</tt>
-  Expr(const BigInt& I) : RCExpr(new ConstRealRep(Real(I))) {}
-  /// constructor for <tt>BigRat</tt>
-  Expr(const BigRat& R) : RCExpr(new ConstRealRep(Real(R))) {}
-
-  /// constructor for <tt>BigFloat</tt>
-  Expr(const BigFloat& F) : RCExpr(new ConstRealRep(Real(F))) {}
-
-  /// constructor for <tt>const char*</tt>
-  /** construct Expr from a string representation \a s
-   * with precision \a prec. It is perfectly predictable:
-   * new Expr(".1") is exactly equal to .1, as one would expect. Therefore,
-   * it is generally recommended that the (String) constructor be used in
-   * preference to the (double) constructor.
-   */
-  Expr(const char *s, const extLong& p = defInputDigits)
-      : RCExpr(new ConstRealRep(Real(s, p))) {}
-
-  /// constructor for <tt>std::string</tt>
-  Expr(const std::string& s, const extLong& p = defInputDigits)
-      : RCExpr(new ConstRealRep(Real(s, p))) {}
-
-  /// constructor for <tt>Real</tt>
-  Expr(const Real &r) : RCExpr(new ConstRealRep(r)) {}
-
-  /// constructor for Polynomial node (n-th root)
-  /** default value n=0 means the first positive root */
-  template <class NT>
-  Expr(const Polynomial<NT>& p, int n = 0)
-      : RCExpr(new ConstPolyRep<NT>(p, n)) {}
-
-  /// constructor for Polynomial node (root in Interval <tt>I</tt>)
-  template <class NT>
-  Expr(const Polynomial<NT>& p, const BFInterval& I)
-      : RCExpr(new ConstPolyRep<NT>(p, I)) {}
-
-  /// constructor for ExprRep
-  Expr(ExprRep* p) : RCExpr(p) {}
-  //@}
-
-  /// \name Copy-Assignment-Destructors
-  //@{
-  /// copy constructor
-  Expr(const Expr& rhs) : RCExpr(rhs) {
-    rep->incRef();
-  }
-
-  /// = operator
-  Expr& operator=(const Expr& rhs) {
-    if (this != &rhs) {
-      rep->decRef();
-      rep = rhs.rep;
-      rep->incRef();
-    }
-    return *this;
-  }
-  /// destructor
-  ~Expr() {
-    rep->decRef();
-  }
-  //@}
-
-  /// \name Compound Assignment Operators
-  //@{
-  /// += operator
-  Expr& operator+=(const Expr& e) {
-    *this = new AddRep(rep, e.rep);
-    return *this;
-  }
-  /// -= operator
-  Expr& operator-=(const Expr& e) {
-    *this = new SubRep(rep, e.rep);
-    return *this;
-  }
-  /// *= operator
-  Expr& operator*=(const Expr& e) {
-    *this = new MultRep(rep, e.rep);
-    return *this;
-  }
-  /// /= operator
-  Expr& operator/=(const Expr& e) {
-    if ((e.rep)->getSign() == 0) {
-      std::cerr << " ERROR : division by zero ! " << std::endl;
-      if (AbortFlag)
-        abort();
-      InvalidFlag = -3;
-    }
-    *this = new DivRep(rep, e.rep);
-    return *this;
-  }
-  //@}
-
-  /// \name Unary Minus, Increment and Decrement Operators
-  //@{
-  /// unary plus
-  Expr operator+() const {
-    return Expr(*this);
-  }
-  /// unary minus
-  Expr operator-() const {
-    return Expr(new NegRep(rep));
-  }
-  /// left increment operator (++i)
-  Expr& operator++() {
-    *this += 1;
-    return *this;
-  }
-  /// right increment operator (i++)
-  Expr operator++(int) {
-    Expr t(*this);
-    *this += 1;
-    return t;
-  }
-  /// left decrement operator (--i)
-  Expr& operator--() {
-    *this -= 1;
-    return *this;
-  }
-  /// right deccrement operator (i--)
-  Expr operator--(int) {
-    Expr t(*this);
-    *this -= 1;
-    return t;
-  }
-  //@}
-
-  /// \name String Conversion Functions
-  //@{
-  /// set value from <tt>const char*</tt>
-  void fromString(const char* s, const extLong& prec = defInputDigits) {
-    *this = Expr(s, prec);
-  }
-  /// convert to <tt>std::string</tt>
-  /** give decimal string representation */
-  std::string toString(long prec=defOutputDigits, bool sci=false) const {
-    return rep->toString(prec, sci);
-  }
-  //@}
-  //
-
-  /// \name Conversion Functions
-  //@{
-  /// convert to \c int
-  int intValue() const {
-    return approx(64, 1024).intValue();
-  }
-  /// convert to \c long
-  long longValue() const {
-    return approx(64, 1024).longValue();
-  }
-  /// convert to \c float
-  float floatValue() const {
-    return approx(53, 1024).floatValue();
-  }
-  /// convert to \c double
-  /** chen: - use equivalent precision (rel:53, abs: 1024)
-    as in IEEE double. enforce an evaluation in case
-    before this has been done before casting. */
-  double doubleValue() const {
-    return approx(53, 1024).doubleValue();
-  }
-  /// convert to an interval defined by a pair of \c double
-  /** If value is exact, the two \c double will coincide
-   */
-  CGAL_CORE_EXPORT void doubleInterval(double & lb, double & ub) const;
-  /// convert to \c BigInt (approximate it first!)
-  BigInt BigIntValue() const {
-    return rep->BigIntValue();
-  }
-  /// convert to \c BigRat (approximate it first!)
-  BigRat BigRatValue() const {
-    return rep->BigRatValue();
-  }
-  /// convert to \c BigFloat (approximate it first!)
-  /** Ought to allow BigFloatValue() take an optional precision argument */
-  BigFloat BigFloatValue() const {
-    return rep->BigFloatValue();
-  }
-  //@}
-
-  /// \name Approximation Function
-  //@{
-  /// Compute approximation to combined precision [\a r, \a a].
-  /** Here is the definition of what this means:
-       If e is the exact value and ee is the approximate value,
-       then  |e - ee| <= 2^{-a} or  |e - ee| <= 2^{-r} |e|. */
-  const Real & approx(const extLong& relPrec = defRelPrec,
-                      const extLong& absPrec = defAbsPrec) const {
-    return rep->getAppValue(relPrec, absPrec);
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  //CONSTANTS:
-  /// return Expr(0)
-  CGAL_CORE_EXPORT static const Expr& getZero();
-
-  /// return Expr(1)
-  CGAL_CORE_EXPORT static const Expr& getOne();
-
-  /// Has Exact Division
-  static bool hasExactDivision() {
-    return true;
-  }
-
-  /// get the sign
-  int sign() const {
-    return rep->getSign();
-  }
-  /// is zero?
-  bool isZero() const {
-    return sign() == 0;
-  }
-  /// absolute value
-  Expr abs() const {
-    return (sign() >= 0) ? +(*this) : -(*this);
-  }
-
-  /// compare function
-  int cmp(const Expr& e) const {
-    return rep == e.rep ? 0 : SubRep(rep, e.rep).getSign();
-  }
-
-  /// return the internal representation
-  ExprRep* Rep() const {
-    return rep;
-  }
-  /// get exponent of current approximate value
-  long getExponent() const {
-    return BigFloatValue().exp();
-  }
-  /// get mantissa of current approximate value
-  BigInt getMantissa() const {
-    return BigFloatValue().m();
-  }
-  //@}
-
-public:
-  /// \name Debug Helper Function
-  //@{
-  /// debug function
-  void  debug(int mode = TREE_MODE, int level = DETAIL_LEVEL,
-              int depthLimit = INT_MAX) const;
-  //@}
-  /// debug information levels
-  enum {LIST_MODE, TREE_MODE, SIMPLE_LEVEL, DETAIL_LEVEL};
-};// class Expr
-
-#define CORE_EXPR_ZERO Expr::getZero()
-
-/// I/O Stream operator<<
-inline std::ostream& operator<<(std::ostream& o, const Expr& e) {
-  o << *(const_cast<ExprRep*>(&e.getRep()));
-  return o;
-}
-/// I/O Stream operator>>
-inline std::istream& operator>>(std::istream& i, Expr& e) {
-  Real rVal;
-  i >> rVal; // precision is = defInputDigits
-  if (i)
-    e = rVal;		// only assign when reading is successful.
-  return i;
-}
-
-/// floor function
-CGAL_CORE_EXPORT BigInt floor(const Expr&, Expr&);
-/// power function
-CGAL_CORE_EXPORT Expr pow(const Expr&, unsigned long);
-
-/// addition
-inline Expr operator+(const Expr& e1, const Expr& e2) {
-  return Expr(new AddRep(e1.Rep(), e2.Rep()));
-}
-/// substraction
-inline Expr operator-(const Expr& e1, const Expr& e2) {
-  return Expr(new SubRep(e1.Rep(), e2.Rep()));
-}
-/// multiplication
-inline Expr operator*(const Expr& e1, const Expr& e2) {
-  return Expr(new MultRep(e1.Rep(), e2.Rep()));
-}
-/// division
-inline Expr operator/(const Expr& e1, const Expr& e2) {
-  if (e2.sign() == 0) {
-    std::cerr << " ERROR : division by zero ! " << std::endl;
-    if (AbortFlag)
-      abort();
-    InvalidFlag = -4;
-  }
-  return Expr(new DivRep(e1.Rep(), e2.Rep()));
-}
-/// modulo operator
-inline Expr operator%(const Expr& e1, const Expr& e2) {
-  Expr result;
-  floor(e1/e2, result);
-  return result;
-}
-
-/// operator ==
-/** this is inefficient if you compare to zero:
- *  e.g., if (e != 0) {...} use e.isZero() instead */
-inline bool operator==(const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) == 0;
-}
-/// operator !=
-inline bool operator!=(const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) != 0;
-}
-/// operator <
-inline bool operator< (const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) < 0;
-}
-/// operator <=
-inline bool operator<=(const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) <= 0;
-}
-/// operator <
-inline bool operator> (const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) > 0;
-}
-/// operator >=
-inline bool operator>=(const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2) >= 0;
-}
-
-/// return sign
-inline int sign(const Expr& e) {
-  return e.sign();
-}
-/// is zero?
-inline bool isZero(const Expr& e) {
-  return e.isZero();
-}
-/// compare
-/** compare two Expr \a e1 and \a e2, return
- * \retval -1 if e1 < e2,
- * \retval 0 if e1 = e2,
- * \retval 1 if e1 > e2. */
-inline int cmp(const Expr& e1, const Expr& e2) {
-  return e1.cmp(e2);
-}
-/// absolute value
-inline Expr abs(const Expr& x) {
-  return x.abs();
-}
-/// absolute value (same as abs)
-inline Expr fabs(const Expr& x) {
-  return abs(x);
-}
-/// floor
-inline BigInt floor(const Expr& e) {
-  Expr tmp;
-  return floor(e, tmp);
-}
-/// ceiling
-inline BigInt ceil(const Expr& e) {
-  return -floor(-e);
-}
-/// floorLg
-inline long floorLg(const Expr& e) {
-  Expr tmp;
-  return floorLg(floor(e));
-}
-/// ceilLg
-inline long ceilLg(const Expr& e) {
-  Expr tmp;
-  return ceilLg(ceil(e));
-}
-/// power
-inline Expr power(const Expr& e, unsigned long p) {
-  return pow(e, p);
-}
-
-/// divisibility predicate
-/** We do not check if e2 is 0.
- * */
-// NOTE:  The name "isDivisible" is not consistent
-// 		with the analogous "divisible" predicate in BigInt!
-inline bool isDivisible(const Expr& e1, const Expr& e2) {
-  Expr result;
-  floor(e1/e2, result);
-  return (result.sign() == 0);
-}
-
-/// square root
-inline Expr sqrt(const Expr& e) {
-  if (e.sign() < 0) {
-    std::cerr << " ERROR : sqrt of negative value ! " << std::endl;
-    if (AbortFlag)
-      abort();
-    InvalidFlag = -5;
-  }
-  return Expr(new SqrtRep(e.Rep()));
-}
-
-//Following two have been added to make NT=Expr work for Polynomial<NT>
-/// gcd
-inline Expr gcd(const Expr& /*a*/, const Expr& /*b*/) {
-  return Expr(1);
-}
-inline Expr div_exact(const Expr& x, const  Expr& y) {
-  return x/y - x%y;
-}
-
-/// helper function for constructing Polynomial node (n-th node)
-template <class NT>
-inline Expr rootOf(const Polynomial<NT>& p, int n = 0) {
-  return Expr(p, n);
-}
-
-/// helper function for constructing Polynomial node witb BFInterval
-template <class NT>
-inline Expr rootOf(const Polynomial<NT>& p, const BFInterval& I) {
-  return Expr(p, I);
-}
-/// helper function for constructing Polynomial node with pair of BigFloats
-template <class NT>
-inline Expr rootOf(const Polynomial<NT>& p, const BigFloat& x,
-		const BigFloat& y) {
-  return Expr(p, BFInterval(x, y) );
-}
-/// helper function for constructing Polynomial node with pair of doubles
-template <class NT>
-inline Expr rootOf(const Polynomial<NT>& p, double x, double y) {
-  return Expr(p, BFInterval(BigFloat(x), BigFloat(y)) );
-}
-/// helper function for constructing Polynomial node with pair of ints
-template <class NT>
-inline Expr rootOf(const Polynomial<NT>& p, int x, int y) {
-  return Expr(p, BFInterval(BigFloat(x), BigFloat(y)) );
-}
-
-/// constructor for Polynomial node of the form x^m - n (i.e., radicals)
-/** We assume that n >= 0 and m >= 1
- * */
-template <class NT>
-inline Expr radical(const NT& n, int m) {
-  assert(n>=0 && m>=1);
-  if (n == 0 || n == 1 || m == 1)
-    return Expr(n);
-  Polynomial<NT> Q(m);
-  Q.setCoeff(0, -n);
-  Q.setCoeff(m, 1);
-  return Expr(Q, 0);
-}
-
-// We include this file here and not from inside Poly.h,
-// because otherwise VC++.net2003 can't compile Expr.cpp
-#include <CGAL/CORE/poly/Poly.tcc>
-
-} //namespace CORE
-#endif // _CORE_EXPR_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/ExprRep.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/ExprRep.h
deleted file mode 100644
index 19c5bbc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/ExprRep.h
+++ /dev/null
@@ -1,1314 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: ExprRep.h
- * Synopsis: Internal Representation of Expr.
- * 
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *       Vikram Sharma<sharma at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_EXPRREP_H_
-#define _CORE_EXPRREP_H_
-
-#include <CGAL/CORE/Real.h>
-#include <CGAL/CORE/Filter.h>
-#include <CGAL/CORE/poly/Sturm.h>
-
-namespace CORE { 
-
-#ifdef CORE_DEBUG_BOUND
-// These counters are incremented each time each bound is recognized as equal
-// to the best one in computeBound().
-extern unsigned int BFMSS_counter;
-extern unsigned int Measure_counter;
-// extern unsigned int Cauchy_counter;
-extern unsigned int LiYap_counter;
-// These counters are incremented each time each bound is recognized as equal
-// to the best one in computeBound(), and it's strictly the best.
-extern unsigned int BFMSS_only_counter;
-extern unsigned int Measure_only_counter;
-// extern unsigned int Cauchy_only_counter;
-extern unsigned int LiYap_only_counter;
-// This counter is incremented each time the precision needed matches the
-// root bound.
-extern unsigned int rootBoundHitCounter;
-#endif
-
-const extLong EXTLONG_BIG = (1L << 30);
-const extLong EXTLONG_SMALL = -(1L << 30);
-
-const double log_5 = log(double(5))/log(double(2));
-
-// Returns the ceil of log_2(5^a).
-inline extLong ceilLg5(const extLong & a) {
-#if defined (_MSC_VER)
-  return (int) ::ceil(log_5 * a.toLong());
-#else
-  return (int) std::ceil(log_5 * a.toLong());
-#endif
-}
-
-/// \struct NodeInfo
-/// \brief store information of a node
-struct NodeInfo {
-  Real     appValue;		///< current approximate value
-  bool     appComputed;  	///< true if the approx value been computed
-  bool     flagsComputed;  	///< true if rootBound parameters have been computed
-  extLong  knownPrecision; 	///< Precision achieved by current approx value
-
-#ifdef CORE_DEBUG
-  extLong relPrecision;
-  extLong absPrecision;
-  unsigned long numNodes;
-#endif
-
-  /// d_e bounds the degree of the minimal polynomial of a DAG expression
-  /** Basically, d_e is equal to 2^k where k is the number of square-root nodes
-   *   in the DAG.  If there are other kinds of non-linear nodes, this is
-   *   generalized accordingly.   */
-  extLong d_e;
-
-  bool visited;   	///< flag in counting # of sqrts
-  int sign; 		///< sign of the value being represented.
-
-  extLong  uMSB; ///< upper bound of the position of Most Significant Bit
-  extLong  lMSB; ///< lower bound of the position of Most Significant Bit
-
-  // For the degree-length method mentioned in Chee's book.
-  /* the degree of defining polynomial P(X) obtained from Resultant calculus
-   * (deprecated now) */
-  // extLong degree;
-
-  // extLong length; ///< length is really lg(|| P(X) ||)
-  extLong measure; ///< measure is really lg(Measure)
-
-  // For our new bound.
-  /// 2^{high(E)} is an UPPER bound for the moduli of ALL conjugates of E.
-  /** In our papers, high is equal to log_2(\overline{\mu(E)}). */
-  extLong high;
-  /// 2^{-low(E)} is LOWER bound on the moduli of ALL NON_ZERO conjugate of E.
-  /** BE CAREFUL!  NOTE THAT UNLIKE "high", the sign of low is negated here!
-      In our papers, low is equal to -log_2(\underline{\nu(E)})  */
-  extLong low;
-  /// \brief upper bound of the leading coefficient of minimal defining
-  ///        polynomial of $E$.
-  extLong lc;
-  /// \brief upper bound of the last non-zero coefficient of minimal defining
-  ///        polynomial of $E$.
-  extLong tc;
-
-  // For the 2-ary BFMSS bound.
-  extLong v2p, v2m;
-  // For the 5-ary BFMSS bound.
-  extLong v5p, v5m;
-  /// 2^u25 is an upper bound for the moduli of all the conjugates of U(E)
-  /** where E = 2^v2*5^v5*U(E)/L(E), U(E) and L(E) are division-free. */
-  extLong u25;
-  /// 2^l25 is an upper bound for the moduli of all the conjugates of L(E)
-  /** where E = 2^v2*5^v5*U(E)/L(E), U(E) and L(E) are division-free. */
-  extLong l25;
-
-  int ratFlag;		///< rational flag
-  BigRat* ratValue;	///< rational value
-
-  /// default constructor
-  CGAL_CORE_EXPORT NodeInfo();
-};//NodeInfo struct
-
-//  forward reference
-// class Expr;
-
-/// \class ExprRep
-/// \brief The sharable, internal representation of expressions
-//  Members: private: int refCount,
-//            public:  NodeInfo* nodeInfo,
-//                     filteredFp ffVal.
-class ExprRep {
-public:
-  /// \name Constructor and Destructor
-  //@{
-  /// default constructor
-  CGAL_CORE_EXPORT ExprRep();
-  /// virtual destructor for this base class
-  virtual ~ExprRep() {
-    if (nodeInfo != NULL) // This check is only for optimization.
-      delete nodeInfo;
-  }
-  //@}
-
-  /// \name Reference Counting
-  //@{
-  /// increase reference counter
-  void incRef() {
-    ++refCount;
-  }
-  /// decrease reference counter
-  void decRef() {
-    if (--refCount == 0)
-      delete this;
-  }
-  /// return reference counter
-  int getRefCount() const {
-    return refCount;
-  }
-  /// check whether reference counter == 1
-  int isUnique() const {
-    return refCount == 1;
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  /// Get the approximate value
-  CGAL_CORE_EXPORT const Real & getAppValue(const extLong& relPrec = defRelPrec,
-                                            const extLong& absPrec = defAbsPrec);
-  /// Get the sign.
-  int getSign();
-  int getExactSign();
-
-  const Real& appValue() const {
-    return nodeInfo->appValue;
-  }
-  Real& appValue() {
-    return nodeInfo->appValue;
-  }
-
-  const bool& appComputed() const {
-    return nodeInfo->appComputed;
-  }
-  bool& appComputed() {
-    return nodeInfo->appComputed;
-  }
-
-  const bool& flagsComputed() const {
-    return nodeInfo->flagsComputed;
-  }
-  bool& flagsComputed() {
-    return nodeInfo->flagsComputed;
-  }
-
-  const extLong& knownPrecision() const {
-    return nodeInfo->knownPrecision;
-  }
-  extLong& knownPrecision() {
-    return nodeInfo->knownPrecision;
-  }
-
-#ifdef CORE_DEBUG
-  const extLong& relPrecision() const {
-    return nodeInfo->relPrecision;
-  }
-  extLong& relPrecision() {
-    return nodeInfo->relPrecision;
-  }
-
-  const extLong& absPrecision() const {
-    return nodeInfo->absPrecision;
-  }
-  extLong& absPrecision() {
-    return nodeInfo->absPrecision;
-  }
-
-  const unsigned long& numNodes() const {
-    return nodeInfo->numNodes;
-  }
-  unsigned long& numNodes() {
-    return nodeInfo->numNodes;
-  }
-#endif
-
-  const extLong& d_e() const {
-    return nodeInfo->d_e;
-  }
-  extLong& d_e() {
-    return nodeInfo->d_e;
-  }
-
-  const bool& visited() const {
-    return nodeInfo->visited;
-  }
-  bool& visited() {
-    return nodeInfo->visited;
-  }
-
-  const int& sign() const {
-    return nodeInfo->sign;
-  }
-  int& sign() {
-    return nodeInfo->sign;
-  }
-
-  const extLong& uMSB() const {
-    return nodeInfo->uMSB;
-  }
-  extLong& uMSB() {
-    return nodeInfo->uMSB;
-  }
-
-  const extLong& lMSB() const {
-    return nodeInfo->lMSB;
-  }
-  extLong& lMSB() {
-    return nodeInfo->lMSB;
-  }
-
-  //  const extLong& length() const { return nodeInfo->length; }
-  //  extLong& length() { return nodeInfo->length; }
-
-  const extLong& measure() const {
-    return nodeInfo->measure;
-  }
-  extLong& measure() {
-    return nodeInfo->measure;
-  }
-
-  const extLong& high() const {
-    return nodeInfo->high;
-  }
-  extLong& high() {
-    return nodeInfo->high;
-  }
-
-  const extLong& low() const {
-    return nodeInfo->low;
-  }
-  extLong& low() {
-    return nodeInfo->low;
-  }
-
-  const extLong& lc() const {
-    return nodeInfo->lc;
-  }
-  extLong& lc() {
-    return nodeInfo->lc;
-  }
-
-  const extLong& tc() const {
-    return nodeInfo->tc;
-  }
-  extLong& tc() {
-    return nodeInfo->tc;
-  }
-
-  const extLong& v2p() const {
-    return nodeInfo->v2p;
-  }
-  extLong& v2p() {
-    return nodeInfo->v2p;
-  }
-
-  const extLong& v2m() const {
-    return nodeInfo->v2m;
-  }
-  extLong& v2m() {
-    return nodeInfo->v2m;
-  }
-
-  extLong v2() const {
-    return v2p()-v2m();
-  }
-
-  const extLong& v5p() const {
-    return nodeInfo->v5p;
-  }
-  extLong& v5p() {
-    return nodeInfo->v5p;
-  }
-
-  const extLong& v5m() const {
-    return nodeInfo->v5m;
-  }
-  extLong& v5m() {
-    return nodeInfo->v5m;
-  }
-
-  extLong v5() const {
-    return v5p()-v5m();
-  }
-
-  const extLong& u25() const {
-    return nodeInfo->u25;
-  }
-  extLong& u25() {
-    return nodeInfo->u25;
-  }
-
-  const extLong& l25() const {
-    return nodeInfo->l25;
-  }
-  extLong& l25() {
-    return nodeInfo->l25;
-  }
-
-  const int& ratFlag() const {
-    return nodeInfo->ratFlag;
-  }
-  int& ratFlag() {
-    return nodeInfo->ratFlag;
-  }
-
-  const BigRat* ratValue() const {
-    return nodeInfo->ratValue;
-  }
-  BigRat*& ratValue() {
-    return nodeInfo->ratValue;
-  }
-
-  /// Get BigFloat
-  BigInt BigIntValue();
-  BigRat BigRatValue();
-  BigFloat BigFloatValue();
-  /// represent as a string in decimal value
-  // toString() Joaquin Grech 31/5/2003
-  std::string toString(long prec=defOutputDigits, bool sci=false) {
-    return (getAppValue(defRelPrec, defAbsPrec)).toString(prec,sci);
-  }
-  //@}
-
-  /// \name Debug functions
-  //@{
-  /// dump the contents in this DAG node
-  const std::string dump(int = OPERATOR_VALUE) const;
-  /// print debug information in list mode
-  virtual void debugList(int level, int depthLimit) const = 0;
-  /// print debug information in tree mode
-  virtual void debugTree(int level, int indent, int depthLimit) const = 0;
-  //@}
-
-  /// \name I/O Stream
-  //@{
-  CGAL_CORE_EXPORT friend std::ostream& operator<<(std::ostream&, ExprRep&);
-  //@}
-
-private:
-  int refCount;    // reference count
-
-public:
-  enum {OPERATOR_ONLY, VALUE_ONLY, OPERATOR_VALUE, FULL_DUMP};
-
-  NodeInfo* nodeInfo;	///< node information
-  filteredFp ffVal;	///< filtered value
-
-  /// \name Approximation Functions
-  //@{
-  /// initialize nodeInfo
-  virtual void initNodeInfo() = 0;
-  /// compute the sign, uMSB, lMSB, etc.
-  virtual void computeExactFlags() = 0;
-  /// compute the minimal root bound
-  CGAL_CORE_EXPORT extLong computeBound();
-  /// driver function to approximate
-  CGAL_CORE_EXPORT void approx(const extLong& relPrec, const extLong& absPrec);
-  /// compute an approximate value satifying the specified precisions
-  virtual void computeApproxValue(const extLong&, const extLong&) = 0;
-  /// Test whether the current approx. value satisfies [relPrec, absPrec]
-  CGAL_CORE_EXPORT bool withinKnownPrecision(const extLong&, const extLong&);
-  //@}
-
-  /// \name Misc Functions
-  //@{
-  /// reduce current node
-  CGAL_CORE_EXPORT void reduceToBigRat(const BigRat&);
-  /// reduce current node
-  CGAL_CORE_EXPORT void reduceTo(const ExprRep*);
-  /// reduce current node to zero
-  CGAL_CORE_EXPORT void reduceToZero();
-  /// return operator string
-  virtual const std::string op() const {
-    return "UNKNOWN";
-  }
-  //@}
-
-  /// \name Degree Bound Functions
-  //@{
-  /// compute "d_e" based on # of sqrts
-  CGAL_CORE_EXPORT extLong degreeBound();
-  /// count actually computes the degree bound of current node.
-  virtual extLong count() = 0;
-  /// reset the flag "visited"
-  virtual void clearFlag() = 0;
-  //@}
-#ifdef CORE_DEBUG
-  virtual unsigned long dagSize() = 0;
-  virtual void fullClearFlag() = 0;
-#endif
-};//ExprRep
-
-/// \class ConstRep
-/// \brief constant node
-class ConstRep : public ExprRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  ConstRep() {}
-  /// destructor
-  virtual ~ConstRep() {}
-  //@}
-
-  /// \name Debug Functions
-  //@{
-  /// print debug information in list mode
-  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
-  /// print debug information in tree mode
-  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
-  //@}
-protected:
-  /// initialize nodeInfo
-  CGAL_CORE_EXPORT virtual void initNodeInfo();
-  /// return operator in string
-  const std::string op() const {
-    return "C";
-  }
-  /// count returns the degree of current node
-  //extLong count() { return d_e(); }
-  CGAL_CORE_EXPORT extLong count();
-  /// clear visited flag
-  void clearFlag() {
-    visited() = false;
-  }
-#ifdef CORE_DEBUG
-  unsigned long dagSize();
-  void fullClearFlag();
-#endif
-};
-
-/// \class ConstDoubleRep
-/// \brief constant node
-class ConstDoubleRep : public ConstRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  ConstDoubleRep() {}
-  /// constructor for all \c double type
-  ConstDoubleRep(double d) {
-    ffVal = d;
-  }
-  /// destructor
-  ~ConstDoubleRep() {}
-  //@}
-  CORE_MEMORY(ConstDoubleRep)
-protected:
-  /// compute sign and MSB
-  CGAL_CORE_EXPORT void computeExactFlags();
-  /// compute approximation value
-  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
-};
-
-/// \class ConstRealRep
-/// \brief constant node
-class ConstRealRep : public ConstRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  ConstRealRep() : value(CORE_REAL_ZERO) { }
-  /// constructor for all \c Real type
-  CGAL_CORE_EXPORT ConstRealRep(const Real &);
-  /// destructor
-  ~ConstRealRep() {}
-  //@}
-  CORE_MEMORY(ConstRealRep)
-private:
-  Real value; ///< internal representation of node
-protected:
-  /// compute sign and MSB
-  void computeExactFlags();
-  /// compute approximation value
-  void computeApproxValue(const extLong&, const extLong&);
-};
-
-/// \class Constant Polynomial Node
-/// \brief template class where NT is supposed to be some number type
-template <class NT>
-class ConstPolyRep : public ConstRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// default constructor
-  ConstPolyRep() { }
-
-  /// constructor for Polynomial
-  ConstPolyRep(const Polynomial<NT>& p, int n) : ss(p) {
-    // isolate roots using Sturm Sequences
-    I = ss.isolateRoot(n);
-    // check whether n-th root exists
-    if (I.first == 1 && I.second == 0) {
-      core_error("CORE ERROR! root index out of bound",
-		      __FILE__, __LINE__, true);
-      abort();
-    }
-    // test if the root isolated in I is 0:
-    if ((I.first == 0)&&(I.second == 0))
-      ffVal = 0;
-    else
-      ffVal = computeFilteredValue();	// silly to use a filter here!
-    					// since sign is known.
-  }
-
-  /// constructor for Polynomial
-  ConstPolyRep(const Polynomial<NT>& p, const BFInterval& II)
-	  : ss(p), I(II) {
-    BFVecInterval v;
-    ss.isolateRoots(I.first, I.second, v);
-    I = v.front();
-    if (v.size() != 1) {
-      core_error("CORE ERROR! non-isolating interval",
-		      __FILE__, __LINE__, true);
-      abort();
-    }
-    ffVal = computeFilteredValue(); // Chee: this line seems unnecessary
-  }
-
-  /// destructor
-  ~ConstPolyRep() {}
-  //@}
-  CORE_MEMORY(ConstPolyRep)
-
-private:
-  Sturm<NT> ss; ///< internal Sturm sequences
-  BFInterval I; ///< current interval contains the real value
-  		// IMPORTANT: I.first and I.second are exact BigFloats
-  filteredFp computeFilteredValue() {
-    // refine initial interval to absolute error of 2^(lMSB(k)-54) where
-    // 	  k is a lower bound on the root (use Cauchy Lower Bound).
-    //    Hence, the precision we pass to refine should be 54-lMSB(k).
-
-    // refine with newton (new method)
-    // ss.seq[0] could be zero!!
-    // I=ss.newtonRefine(I,
-    //            54-(ss.seq[0].CauchyLowerBound()).lMSB().asLong());
-    extLong lbd = ss.seq[0].CauchyLowerBound().lMSB();
-
-    if (lbd.isTiny())
-      I = ss.newtonRefine(I, 54);
-    else
-      I = ss.newtonRefine(I, 54-lbd.asLong()); // is this necessary?
-
-    //return I.first.doubleValue(); // NOTE:  This is not quite right!
-    // It should be "centralized" to set
-    // the error bit correctly.
-    // E.g., otherwise, radical(4,2) will print wrongly.
-    if ((I.first == 0) && (I.second == 0))	// Checkfor zero value
-      return filteredFp(0);
-    BigFloat x = centerize(I.first, I.second);
-    double val = x.doubleValue();
-    double max = core_max(core_abs(I.first), core_abs(I.second)).doubleValue();
-    int ind = 1;
-    /*
-    long ee = x.exp()*CHUNK_BIT;
-    unsigned long err = ee > 0 ? (x.err() << ee) : (x.err() >> (-ee));
-    double max = core_abs(val) + err;
-    int ind = longValue((BigInt(x.err()) << 53) / (x.m() + x.err())); 
-    */
-    return filteredFp(val, max, ind); // Aug 8, 2004, Comment from Chee:
-       // I think we should get rid of filters here!  Given the interval I,
-       // we either know the sign (I.first >=0) or (I.second <=0)
-       // or we don't.  We don't need to compute all the index stuff.
-       // In fact, you have lost the sign in the above computation...
-       // ALSO, why bother to use filter?
-  }//computeFilteredValue
-
-protected:
-  void initNodeInfo() {
-    nodeInfo = new NodeInfo();
-    d_e() = ss.seq[0].getTrueDegree(); // return degree of the polynomial
-  }
-  /// compute sign and MSB
-  void computeExactFlags() {
-
-    if ((I.first == 0) && (I.second == 0)) {
-      reduceToZero();
-      return;
-    } else if (I.second > 0) {
-      uMSB() = I.second.uMSB();
-      lMSB() = I.first.lMSB();
-      sign() = 1;
-    } else { // we know that I.first < 0
-      lMSB() = I.second.lMSB();
-      uMSB() = I.first.uMSB();
-      sign() = -1;
-    }
-    // length() = 1+ ss.seq[0].length().uMSB();
-    measure() = 1+ ss.seq[0].length().uMSB();	// since measure<= length
-
-    // compute u25, l25, v2p, v2m, v5p, v5m
-    v2p() = v2m() = v5p() = v5m() = 0;
-    u25() = 1+ss.seq[0].CauchyUpperBound().uMSB();
-    l25() = ceilLg(ss.seq[0].getLeadCoeff());  // assumed coeff is integer!!
-    		// ceilLg(BigInt) and ceilLg(Expr) are defined. But if
-    		// NT=int, ceilLg(int) is ambiguous!  Added ceilLg(int)
-		// under BigInt.h
-
-    // compute high, low, lc, tc
-    high() = u25();
-    low() = - (ss.seq[0].CauchyLowerBound().lMSB()); // note the use of negative
-    lc() = l25();
-    tc() = ceilLg(ss.seq[0].getTailCoeff());
-
-    // no rational reduction
-    if (rationalReduceFlag)
-      ratFlag() = -1;
-
-    flagsComputed() = true;
-    appValue()=centerize(I.first, I.second);// set an initial value for appValue
-  }
-  /// compute approximation value
-  void computeApproxValue(const extLong& relPrec, const extLong& absPrec) {
-    extLong pr = -lMSB() + relPrec;
-    extLong p = pr < absPrec ? pr : absPrec;
-
-    // bisection sturm (old method)
-    //I = ss.refine(I, p.asLong()+1);
-
-    // refine with newton (new method)
-    I = ss.newtonRefine(I, p.asLong()+1);
-    appValue() = centerize(I.first, I.second);
-  }
-};
-/// \class UnaryOpRep
-/// \brief unary operator node
-class UnaryOpRep : public ExprRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  UnaryOpRep(ExprRep* c) : child(c)  {
-    child->incRef();
-  }
-  /// destructor
-  virtual ~UnaryOpRep() {
-    child->decRef();
-  }
-  //@}
-
-  /// \name Debug Functions
-  //@{
-  /// print debug information in list mode
-  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
-  /// print debug information in tree mode
-  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
-  //@}
-protected:
-  ExprRep* child; ///< pointer to its child node
-  /// initialize nodeInfo
-  CGAL_CORE_EXPORT virtual void initNodeInfo();
-  /// clear visited flag
-  CGAL_CORE_EXPORT void clearFlag();
-#ifdef CORE_DEBUG
-  unsigned long dagSize();
-  void fullClearFlag();
-#endif
-};
-
-/// \class NegRep
-/// \brief unary minus operator node
-class NegRep : public UnaryOpRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  NegRep(ExprRep* c) : UnaryOpRep(c) {
-    ffVal = - child->ffVal;
-  }
-  /// destructor
-  ~NegRep() {}
-  //@}
-
-  CORE_MEMORY(NegRep)
-protected:
-  /// compute sign and MSB
-  CGAL_CORE_EXPORT void computeExactFlags();
-  /// compute approximation value
-  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
-  /// return operator in string
-  const std::string op() const {
-    return "Neg";
-  }
-  /// count computes the degree of current node, i.e., d_e().
-  /** This is now a misnomer, but historically accurate.
-   */
-  CGAL_CORE_EXPORT extLong count();
-};
-
-/// \class SqrtRep
-/// \brief squartroot operator node
-class SqrtRep : public UnaryOpRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  SqrtRep(ExprRep* c) : UnaryOpRep(c) {
-    ffVal = (child->ffVal).sqrt();
-  }
-  /// destructor
-  ~SqrtRep() {}
-  //@}
-
-  CORE_MEMORY(SqrtRep)
-protected:
-  /// compute sign and MSB
-  CGAL_CORE_EXPORT void computeExactFlags();
-  /// compute approximation value
-  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
-  /// return operator in string
-  const std::string op() const {
-    return "Sqrt";
-  }
-  /// count computes the degree of current node, i.e., d_e().
-  /** This is now a misnomer, but historically accurate.
-   */
-  CGAL_CORE_EXPORT extLong count();
-};
-
-/// \class BinOpRep
-/// \brief binary operator node
-class BinOpRep : public ExprRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  BinOpRep(ExprRep* f, ExprRep* s) : first(f), second(s) {
-    first->incRef();
-    second->incRef();
-  }
-  /// destructor
-  virtual ~BinOpRep() {
-    first->decRef();
-    second->decRef();
-  }
-  //@}
-
-  /// \name Debug Functions
-  //@{
-  /// print debug information in list mode
-  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
-  /// print debug information in tree mode
-  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
-  //@}
-protected:
-  ExprRep* first;  ///< first operand
-  ExprRep* second; ///< second operand
-
-  /// initialize nodeInfo
-  CGAL_CORE_EXPORT virtual void initNodeInfo();
-  /// clear visited flags
-  CGAL_CORE_EXPORT void clearFlag();
-  /// count computes the degree of current node, i.e., d_e().
-  /** This is now a misnomer, but historically accurate.
-   */
-  CGAL_CORE_EXPORT extLong count();
-#ifdef CORE_DEBUG
-  CGAL_CORE_EXPORT unsigned long dagSize();
-  CGAL_CORE_EXPORT void fullClearFlag();
-#endif
-};
-
-/// \struct Add
-/// \brief "functor" class used as parameter to AddSubRep<>
-struct Add {
-  /// name
-  CGAL_CORE_EXPORT static const char* name;
-
-  /// unary operator
-  template <class T>
-  const T& operator()(const T& t) const {
-    return t;
-  }
-
-  /// binary operator
-  template <class T>
-  T operator()(const T& a, const T& b) const {
-    return a+b;
-  }
-};
-
-/// \struct Sub
-/// \brief "functor" class used as parameter to AddSubRep<>
-struct Sub {
-  /// name
-  CGAL_CORE_EXPORT static const char* name;
-
-  /// unary operator
-  template <class T>
-  T operator()(const T& t) const {
-    return -t;
-  }
-
-  /// binary operator
-  template <class T>
-  T operator()(const T& a, const T& b) const {
-    return a-b;
-  }
-};
-
-/// \class AddSubRep
-/// \brief template class where operator is supposed to be Add or Sub
-template <class Operator>
-class AddSubRep : public BinOpRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  AddSubRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
-    ffVal = Op(first->ffVal, second->ffVal);
-  }
-  /// destructor
-  ~AddSubRep() {}
-  //@}
-
-  CORE_MEMORY(AddSubRep)
-protected:
-  /// compute sign and MSB
-   void computeExactFlags();
-  /// compute approximation value
-   void computeApproxValue(const extLong&, const extLong&);
-  /// return operator in string
-  const std::string op() const {
-    return Operator::name;
-  }
-private:
-  static Operator Op;
-};//AddSubRep class
-
-template <class Operator>
-Operator AddSubRep<Operator>::Op;
-
-  /// AddSubRep<Op>::computeExactFlags()
-  ///     This function is the heart of Expr class,
-  ///     and hence the heart of Core Library!
-  /// Here is where we use the root bounds.
-template <class Operator>
-void AddSubRep<Operator>::computeExactFlags() {
-  if (!first->flagsComputed())
-    first->computeExactFlags();
-  if (!second->flagsComputed())
-    second->computeExactFlags();
-
-  int sf = first->sign();
-  int ss = second->sign();
-
-  if ((sf == 0) && (ss == 0)) { // the node is zero
-    reduceToZero();
-    return;
-  } else if (sf == 0) { // first operand is zero
-    reduceTo(second);
-    sign() = Op(ss);
-    appValue() = Op(appValue());
-    if (rationalReduceFlag && ratFlag() > 0)
-      *(ratValue()) = Op(*(ratValue()));
-    return;
-  } else if (ss == 0) { // second operand is zero
-    reduceTo(first);
-    return;
-  }
-  // rational node
-  if (rationalReduceFlag) {
-    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
-      BigRat val=Op(*(first->ratValue()), *(second->ratValue()));
-      reduceToBigRat(val);
-      ratFlag() = first->ratFlag() + second->ratFlag();
-      return;
-    } else
-      ratFlag() = -1;
-  }
-
-  // neither operand is zero
-  extLong df    = first->d_e();
-  extLong ds    = second->d_e();
-  // extLong md    = df < ds ? df : ds;
-  // extLong l1    = first->length();
-  // extLong l2    = second->length();
-  extLong m1    = first->measure();
-  extLong m2    = second->measure();
-
-  // length() = df * l2 + ds * l1 + d_e() + md;
-  measure() = m1 * ds + m2 * df + d_e();
-
-  // BFMSS[2,5] bound.
-  v2p() = core_min(first->v2p() + second->v2m(),
-		  first->v2m() + second->v2p());
-  v2m() = first->v2m() + second->v2m();
-  v5p() = core_min(first->v5p() + second->v5m(),
-		  first->v5m() + second->v5p());
-  v5m() = first->v5m() + second->v5m();
-
-  if (v2p().isInfty() || v5p().isInfty())
-    u25() = CORE_INFTY;
-  else
-    u25() = EXTLONG_ONE + core_max(first->v2p() + second->v2m()
-	    - v2p() + ceilLg5(first->v5p() + second->v5m() - v5p())
-            + first->u25() + second->l25(),
-                                   first->v2m() + second->v2p() - v2p()
-            + ceilLg5(first->v5m() + second->v5p() - v5p())
-            + first->l25() + second->u25());
-  l25() = first->l25() + second->l25();
-
-  lc() = ds * first->lc() + df * second->lc();
-  tc() = measure();
-
-  high() = core_max(first->high(),second->high())+EXTLONG_ONE;
-  // The following is a subset of the minimization in computeBound().
-  low() = core_min(measure(), (d_e()-EXTLONG_ONE)*high() + lc());
-
-  extLong lf = first->lMSB();
-  extLong ls = second->lMSB();
-  extLong uf = first->uMSB();
-  extLong us = second->uMSB();
-
-  extLong l  = core_max(lf, ls);
-  extLong u  = core_max(uf, us);
-
-#ifdef CORE_TRACE
-  std::cout << "INSIDE Add/sub Rep: " << std::endl;
-#endif
-
-  if (Op(sf, ss) != 0) {     // can't possibly cancel out
-#ifdef CORE_TRACE
-    std::cout << "Add/sub Rep:  Op(sf, ss) non-zero" << std::endl;
-#endif
-
-    uMSB() = u + EXTLONG_ONE;
-    lMSB() = l;            // lMSB = core_min(lf, ls)+1 better
-    sign() = sf;
-  } else {               // might cancel out
-#ifdef CORE_TRACE
-    std::cout << "Add/sub Rep:  Op(sf, ss) zero" << std::endl;
-#endif
-
-    uMSB() = u + EXTLONG_ONE;
-    uMSB() = u;
-    if (lf >= us + EXTLONG_TWO) {// one is at least 1 order of magnitude larger
-#ifdef CORE_TRACE
-      std::cout << "Add/sub Rep:  Can't cancel" << std::endl;
-#endif
-
-      lMSB() = lf - EXTLONG_ONE;     // can't possibly cancel out
-      sign() = sf;
-    } else if (ls >= uf + EXTLONG_TWO) {
-#ifdef CORE_TRACE
-      std::cout << "Add/sub Rep:  Can't cancel" << std::endl;
-#endif
-
-      lMSB() = ls - EXTLONG_ONE;
-      sign() = Op(ss);
-    } else if (ffVal.isOK()) {// begin filter computation
-#ifdef CORE_TRACE
-      std::cout << "Add/sub Rep:  filter used" << std::endl;
-#endif
-#ifdef CORE_DEBUG_FILTER
-      std::cout << "call filter in " << op() << "Rep" << std::endl;
-#endif
-      sign() = ffVal.sign();
-      lMSB() = ffVal.lMSB();
-      uMSB() = ffVal.uMSB();
-    } else {			// about the same size, might cancel out
-#ifdef CORE_TRACE
-      std::cout << "Add/sub Rep:  iteration start" << std::endl;
-#endif
-
-      extLong lowBound = computeBound();
-      /* Zilin 06/11/2003
-       * as BFMSS[2] might be a negative number, lowBound can be negative.
-       * In this case, we just set it to 1 since we need at least one bit
-       * to get the sign.  In the future, we may need to improve this.
-       */
-      if (lowBound <= EXTLONG_ZERO)
-        lowBound = EXTLONG_ONE;
-
-      if (!progressiveEvalFlag) {
-        // convert the absolute error requirement "lowBound" to
-        // a relative error requirement "ur", s.t.
-        //    |x|*2^(-ur) <= 2^(-lowBound).
-        // ==> r >= a + lg(x) >= a + (uMSB + 1);
-        //	    extLong  rf = lowBound + (uf + 1);
-        //	    extLong  rs = lowBound + (us + 1);
-        //	    first->approx(rf, CORE_INFTY);
-        //	    second->approx(rs, CORE_INFTY);
-        // Chen: considering the uMSB is also an approximate bound.
-        // we choose to use absolute precision up-front.
-        Real newValue = Op(first->getAppValue(CORE_INFTY,
-				lowBound + EXTLONG_ONE),
-                           second->getAppValue(CORE_INFTY,
-				   lowBound + EXTLONG_ONE));
-        if (!newValue.isZeroIn()) { // Op(first, second) != 0
-          lMSB() = newValue.lMSB();
-          uMSB() = newValue.uMSB();   // chen: to get tighers value.
-          sign() = newValue.sign();
-        } else if (lowBound.isInfty()) {//check if rootbound is too big
-          core_error("AddSubRep:root bound has exceeded the maximum size\n \
-            but we still cannot decide zero.\n", __FILE__, __LINE__, false);
-        } else {               // Op(first, second) == 0
-          lMSB() = CORE_negInfty;
-          sign() = 0;
-        }
-      } else {  // else do progressive evaluation
-#ifdef CORE_TRACE
-        std::cout << "Add/sub Rep:  progressive eval" << std::endl;
-#endif
-        // Oct 30, 2002: fixed a bug here!  Old versions used relative
-        // precision bounds, but one should absolute precision for addition!
-        // Moreover, this is much more efficient.
-
-        // ua is the upper bound on the absolute precision in our iteration
-	// Chee, Aug 8, 2004: it is important that ua be strictly
-	//     larger than lowBound AND the defaultInitialProgressivePrec,
-	//     so that we do at least one iteration of the for-loop. So:
-	// i is the variable for iteration.
-        extLong i = core_min(defInitialProgressivePrec, lowBound.asLong());
-        extLong ua = lowBound.asLong() + EXTLONG_ONE;
-        //   NOTE: ua is allowed to be CORE_INFTY
-	
-#ifdef CORE_DEBUG_BOUND
-        std::cout << "DebugBound:" << "ua = " << ua << std::endl;
-#endif
-        // We initially set the lMSB and sign as if the value is zero:
-        lMSB() = CORE_negInfty;
-        sign() = 0;
-
-        EscapePrecFlag = 0;	// reset the Escape Flag
-
-        // Now we try to determine the real lMSB and sign,
-        // in case it is not really zero:
-#ifdef CORE_TRACE
-        std::cout << "Upper bound (ua) for iteration is " << ua << std::endl;
-	std::cout << "Starting iteration at i = " << i << std::endl;
-#endif
-
-        for ( ; i<ua; i*=EXTLONG_TWO) {
-          // relative bits = i
-	  //
-	  // PROBLEM WITH NEXT LINE: you must ensure that
-	  // first and second are represented by BigFloats...
-	  //
-          Real newValue = Op(first->getAppValue(CORE_INFTY, i),
-                             second->getAppValue(CORE_INFTY, i));
-
-#ifdef CORE_TRACE
-	  if (newValue.getRep().ID() == REAL_BIGFLOAT) 
-	  std::cout << "BigFloat! newValue->rep->ID() = "
-		  << newValue.getRep().ID() << std::endl;
-	  else 
-	  std::cout << "ERROR, Not BigFloat! newValue->rep->ID() ="
-		  << newValue.getRep().ID() << std::endl;
-	  std::cout << "newValue = Op(first,second) = "
-		  << newValue << std::endl;
-	  std::cout << "first:appVal, appComputed, knownPrec, sign ="
-		  << first->appValue() << ","
-		  << first->appComputed() << ","
-		  << first->knownPrecision() << ","
-		  << first->sign() << std::endl;
-	  std::cout << "second:appVal, appComputed, knownPrec, sign ="
-		  << second->appValue() << ","
-		  << second->appComputed() << ","
-		  << second->knownPrecision() << ","
-		  << second->sign() << std::endl;
-#endif
-          if (!newValue.isZeroIn()) {   // Op(first, second) != 0
-            lMSB() = newValue.lMSB();
-            uMSB() = newValue.uMSB();
-            sign() = newValue.sign();
-#ifdef CORE_DEBUG_BOUND
-            std::cout << "DebugBound(Exit Loop): " << "i=" << i << std::endl;
-#endif
-#ifdef CORE_TRACE
-	    std::cout << "Zero is not in, lMSB() = " << lMSB()
-		    << ", uMSB() = " << uMSB()
-		    << ", sign() = " << sign() << std::endl;
-	    std::cout << "newValue = " << newValue << std::endl;
-#endif
-
-            break; // assert -- this must happen in the loop if nonzero!
-          }
-          //8/9/01, Chee: implement escape precision here:
-          if (i> EscapePrec) {
-            EscapePrecFlag = -i.asLong();//negative means EscapePrec is used
-	    core_error("Escape precision triggered at",
-            		 __FILE__, __LINE__, false);
-            if (EscapePrecWarning)
-              std::cout<< "Escape Precision triggered at "
-		      << EscapePrec << " bits" << std::endl;
-#ifdef CORE_DEBUG
-            std::cout << "EscapePrecFlags=" << EscapePrecFlag << std::endl;
-            std::cout << "ua =" << ua  << ",lowBound=" << lowBound << std::endl;
-#endif
-            break;
-          }// if
-        }// for (long i=1...)
-
-#ifdef CORE_DEBUG_BOUND
-        rootBoundHitCounter++;
-#endif
-
-        if (sign() == 0 && ua .isInfty()) {
-          core_error("AddSubRep: root bound has exceeded the maximum size\n \
-            but we still cannot decide zero.\n", __FILE__, __LINE__, true);
-        } // if (sign == 0 && ua .isInfty())
-      }// else do progressive
-    }
-  }
-  flagsComputed() = true;
-}// AddSubRep::computeExactFlags
-
-template <class Operator>
-void AddSubRep<Operator>::computeApproxValue(const extLong& relPrec,
-    const extLong& absPrec) {
-  // Nov 13, 2002: added the analog of "reduceTo(first)" and "reduceTo(second)"
-  //  that is found in computeExactFlags.  This is more efficient, but
-  //  it also removes a NaN warning in subsequent logic!
-  //  E.g., if first=0, then first->uMSB and first->lMSB are -infty, and
-  //  subtracting them creates NaN.  Chee and Zilin.
-  if (first->sign() == 0) {
-    appValue() = Op(second->getAppValue(relPrec, absPrec));
-    return;
-  }
-  if (second->sign() == 0) {
-    appValue() = first->getAppValue(relPrec, absPrec);
-    return;
-  }
-  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
-    extLong rf = first->uMSB()-lMSB()+relPrec+EXTLONG_FOUR;  // 2 better
-    if (rf < EXTLONG_ZERO)
-      rf = EXTLONG_ZERO;  // from Koji's thesis P63: Proposition 26
-    extLong rs = second->uMSB()-lMSB()+relPrec+EXTLONG_FOUR; // 2 better
-    if (rs < EXTLONG_ZERO)
-      rs = EXTLONG_ZERO;  // from Koji's thesis P63: Proposition 26
-    extLong  a  = absPrec + EXTLONG_THREE;                      // 1 better
-    appValue() = Op(first->getAppValue(rf, a), second->getAppValue(rs, a));
-  } else {
-    std::cerr << "lMSB = " << lMSB() << std::endl; // should be in core_error
-    core_error("CORE WARNING: a huge lMSB in AddSubRep",
-	 	__FILE__, __LINE__, false);
-  }
-}
-
-/// \typedef AddRep
-/// \brief AddRep for easy of use
-typedef AddSubRep<Add> AddRep;
-
-/// \typedef SubRep
-/// \brief SuRep for easy of use
-typedef AddSubRep<Sub> SubRep;
-
-/// \class MultRep
-/// \brief multiplication operator node
-class MultRep : public BinOpRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  MultRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
-    ffVal = first->ffVal * second->ffVal;
-  }
-  /// destructor
-  ~MultRep() {}
-  //@}
-  
-  CORE_MEMORY(MultRep)
-  protected:
-  /// compute sign and MSB
-  CGAL_CORE_EXPORT void computeExactFlags();
-  /// compute approximation value
-  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
-  /// return operator in string
-  const std::string op() const {
-    return "*";
-  }
-};
-
-/// \class DivRep
-/// \brief division operator node
-class DivRep : public BinOpRep {
-public:
-  /// \name Constructors and Destructor
-  //@{
-  /// constructor
-  DivRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
-    ffVal = first->ffVal / second->ffVal;
-  }
-  /// destructor
-  ~DivRep() {}
-  //@}
-
-  CORE_MEMORY(DivRep)
-protected:
-  /// compute sign and MSB
-  CGAL_CORE_EXPORT void computeExactFlags();
-  /// compute approximation value
-  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
-  /// return operator in string
-  const std::string op() const {
-    return "/";
-  }
-};
-
-// inline functions
-inline int ExprRep::getExactSign() {
-  if (!nodeInfo)
-    initNodeInfo();
-
-  if (!flagsComputed()) {
-    degreeBound();
-#ifdef CORE_DEBUG
-    dagSize();
-    fullClearFlag();
-#endif
-    computeExactFlags();
-  }
-  return sign();
-}
-
-// Chee, 7/17/02: degreeBound() function is now
-// taken out of "computeExactFlags()
-inline int ExprRep::getSign() {
-  if (ffVal.isOK())
-    return ffVal.sign();
-  else
-    return getExactSign();
-}
-
-// you need force to approximate before call these functions!!
-inline BigInt ExprRep::BigIntValue() {
-  return getAppValue().BigIntValue();
-}
-
-inline BigRat ExprRep::BigRatValue() {
-  return getAppValue().BigRatValue();
-}
-
-inline BigFloat ExprRep::BigFloatValue() {
-  return getAppValue().BigFloatValue();
-}
-
-} //namespace CORE
-#endif // _CORE_EXPRREP_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Filter.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Filter.h
deleted file mode 100644
index 0f1f590..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Filter.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Filter.h
- * Synopsis:
- *      This is a simple filtered floating point number,
- *      represented by the main class, FilterFp.
- *      based on the Burnikel-Funke-Schirra (BFS) filter scheme.
- *      We do not use IEEE exception mechanism here.
- *      It is used by the Expr class.
- * 
- * Written by 
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_FILTER_H_
-#define _CORE_FILTER_H_
-
-#include <CGAL/config.h>
-#include <CGAL/CORE/Real.h>
-#include <cmath>
-
-#if !defined CGAL_CFG_NO_CPP0X_ISFINITE
-  #define CGAL_CORE_finite(x)	std::isfinite(x)
-#elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW
-  #define CGAL_CORE_finite(x)	_finite(x)
-  #define ilogb(x)	(int)_logb(x)
-#else
-  #define CGAL_CORE_finite(x)	finite(x)
-#endif
-
-#if defined(sun) || defined(__sun)
-  #include <ieeefp.h>
-#endif
-
-namespace CORE { 
-
-const int POWTWO_26 = (1 << 26);  ///< constant 2^26
-
-/// \class filteredFp Filter.h
-/// \brief filteredFp represents filtered floating point
-///        numbers, based on BFS filter
-class filteredFp {
-  double fpVal;         // approximate double value for some "real value"
-  double maxAbs;        // if (|fpVal| > maxAbs * ind * 2^{-53}) then
-  int ind;              // sign of value is sign(fpVal).  Else, don't know.
-  // REFERENCE: Burnikel, Funke, Schirra (BFS) filter
-  // Chee: in isOK(), you used the test "|fpVal| >= maxAbs * ind * 2^{-53}" 
-  // which seems to be correct (i.e., not |fpVal| > maxAbs * ind * 2^{-53})
-public:
-  /// \name Constructors
-  //@{
-  /// constructor
-  filteredFp (double val = 0.0)
-      : fpVal(val), maxAbs(core_abs(val)), ind(0) {}
-  /// constructor
-  filteredFp (double val, double m, int i)
-      : fpVal(val), maxAbs(m), ind(i) {}
-
-  /// construct a filteredFp from Real v.
-  /** if v causes an overflow, fpVal = +/- Infty
-      if v causes an underflow, fpVal = ...? */
-  filteredFp (const Real & value) : fpVal(0.0), maxAbs(0.0), ind(0) {
-    if (value != CORE_REAL_ZERO) {
-      ind = 1;
-      fpVal = value.doubleValue();
-      if (value.MSB() <= -1075)
-	maxAbs = 1;
-      else	
-      	maxAbs = core_abs(fpVal); // NaN are propagated correctly by core_abs.
-    }
-  }
-  //@}
-
-  /// \name Help Functions
-  //@{
-  /// return filtered value (for debug)
-  double getValue() const {
-    return fpVal;
-  }
-  /// check whether the sign (!) of the filtered value is OK
-  bool isOK() const {
-    return (fpFilterFlag  && // To disable filter
-            CGAL_CORE_finite(fpVal) && // Test for infinite and NaNs
-            (core_abs(fpVal) >= maxAbs*ind*CORE_EPS));
-  }
-  /// return the sign of fitered value.
-  /** (Note: must call isOK() to check whether the sign is ok
-      before call this function.) */
-  int sign() const {
-#ifdef CORE_DEBUG
-    assert(isOK());
-#endif
-    if (fpVal == 0.0)
-      return 0;
-    else
-      return fpVal > 0.0 ? 1: -1;
-  }
-  /// lower bound on MSB
-  /** defined to be cel(lg(real value));
-      ilogb(x) is floor(log_2(|x|)). 
-      Also, ilogb(0) = -INT_MAX.  ilogb(NaN) = ilogb(+/-Inf) = INT_MAX */
-  extLong lMSB() const {
-    return extLong(ilogb(core_abs(fpVal)-maxAbs*ind*CORE_EPS));
-  }
-  /// upper bound on MSB
-  extLong uMSB() const {
-    return extLong(ilogb(core_abs(fpVal)+maxAbs*ind*CORE_EPS));
-  }
-  //@}
-
-  /// \name Operators
-  //@{
-  /// unary minus
-  filteredFp operator -() const {
-    return filteredFp(-fpVal, maxAbs, ind);
-  }
-  /// addition
-  filteredFp operator+ (const filteredFp& x) const {
-    return filteredFp(fpVal+x.fpVal, maxAbs+x.maxAbs, 1+core_max(ind, x.ind));
-  }
-  /// subtraction
-  filteredFp operator- (const filteredFp& x) const {
-    return filteredFp(fpVal-x.fpVal, maxAbs+x.maxAbs, 1+core_max(ind, x.ind));
-  }
-  /// multiplication
-  filteredFp operator* (const filteredFp& x) const {
-    return filteredFp(fpVal*x.fpVal, maxAbs*x.maxAbs+DBL_MIN, 1+ind+x.ind);
-  }
-  /// division
-  filteredFp operator/ (const filteredFp& x) const {
-    if (x.fpVal == 0.0)
-      core_error("possible zero divisor!", __FILE__, __LINE__, false);
-    double xxx = core_abs(x.fpVal) / x.maxAbs - (x.ind+1)*CORE_EPS + DBL_MIN;
-    if (xxx > 0) {
-      double val =  fpVal / x.fpVal;
-      double maxVal = ( core_abs(val) + maxAbs / x.maxAbs) / xxx + DBL_MIN;
-      return filteredFp(val, maxVal, 1 + core_max(ind, x.ind + 1));
-    } else
-      return filteredFp(getDoubleInfty(), 0.0, 0);
-  }
-  /// square root
-  filteredFp sqrt () const {
-    if (fpVal < 0.0)
-      core_error("possible negative sqrt!", __FILE__, __LINE__, false);
-    if (fpVal > 0.0) {
-      double val = std::sqrt(fpVal);
-      return filteredFp(val,  ( maxAbs / fpVal ) * val, 1 + ind);
-    } else
-      return filteredFp(0.0, std::sqrt(maxAbs) * POWTWO_26, 1 + ind);
-  }
-
-  /// dump function
-  void dump (std::ostream&os) const {
-    os << "Filter=[fpVal=" << fpVal << ",maxAbs=" << maxAbs << ",ind=" << ind << "]";
-  }
-
-  /// helper function (to avoid warning under some compilers)
-  static double getDoubleInfty() {
-    static double d = DBL_MAX;
-    return 2*d;
-  }
-  //@}
-}; //filteredFp class
-
-inline std::ostream & operator<< (std::ostream & os, const filteredFp& fp) {
-  fp.dump(os);
-  return os;
-}
-
-} //namespace CORE
-#endif // _CORE_FILTER_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Gmp.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Gmp.h
deleted file mode 100644
index 164095f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Gmp.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-// CORE LIBRARY FILE
-#ifndef _CORE_GMP_H_
-#define _CORE_GMP_H_
-
-#include <CGAL/CORE/Impl.h>
-#include <gmp.h>
-
-namespace CORE { 
-
-CGAL_CORE_EXPORT std::ostream& io_write (std::ostream &, mpz_srcptr);
-CGAL_CORE_EXPORT std::ostream& io_write (std::ostream &, mpq_srcptr);
-CGAL_CORE_EXPORT std::istream& io_read (std::istream &, mpz_ptr);
-CGAL_CORE_EXPORT std::istream& io_read (std::istream &, mpq_ptr);
-//std::ostream& operator<< (std::ostream &, mpz_srcptr);
-//std::ostream& operator<< (std::ostream &, mpq_srcptr);
-//std::istream& operator>> (std::istream &, mpz_ptr);
-//std::istream& operator>> (std::istream &, mpq_ptr);
-
-} //namespace CORE
-#endif // _CORE_GMP_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Impl.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Impl.h
deleted file mode 100644
index 5271f33..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Impl.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_IMPL_H_
-#define _CORE_IMPL_H_
-
-#include <CGAL/CORE/Config.h>
-
-// The following lines only for MS Visual C++
-#ifdef _MSC_VER
-  #pragma warning(disable: 4291) // no matching operator delete found
-  #pragma warning(disable: 4146) 
-  #pragma warning(disable: 4267)
-  #pragma warning(disable: 4244) 
-#endif
-
-// condition preprocessor for inline function
-#ifndef CORE_DISABLE_INLINE
-  #define CORE_INLINE inline
-#else
-  #define CORE_INLINE
-#endif
-
-// Macros for memory pool
-#ifdef CORE_DISABLE_MEMORY_POOL
-  #define CORE_MEMORY(T)
-#else
-  #include <CGAL/CORE/MemoryPool.h>
-  #define CORE_MEMORY(T)                                                 \
-    void *operator new( size_t size)                                     \
-    { return MemoryPool<T>::global_allocator().allocate(size); }         \
-    void operator delete( void *p, size_t )                              \
-    { MemoryPool<T>::global_allocator().free(p); }
-#endif
-
-// include some common header files
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cmath>
-#include <cfloat>
-#include <cassert>
-#include <cctype>
-#include <climits>
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <string>
-
-#endif // _CORE_IMPL_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/MemoryPool.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/MemoryPool.h
deleted file mode 100644
index 9152f87..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/MemoryPool.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: MemoryPool.h
- * Synopsis:
- *      a memory pool template class.
- * 
- * Written by 
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-#ifndef _CORE_MEMORYPOOL_H_
-#define _CORE_MEMORYPOOL_H_
-
-#include <new>           // for placement new
-#include <cassert>
-
-namespace CORE { 
-
-#define CORE_EXPANSION_SIZE 1024
-template< class T, int nObjects = CORE_EXPANSION_SIZE >
-class MemoryPool {
-public:
-   MemoryPool() : head( 0 ) {}
-
-   void* allocate(std::size_t size);
-   void free(void* p);
-
-  // Access the corresponding static global allocator.
-  static MemoryPool<T>& global_allocator() {
-    return memPool;
-  }
-  
-private:
-   struct Thunk { 
-      T object;
-      Thunk* next;
-   };
-
-private:
-   Thunk* head; // next available block in the pool
-
-private:
-  // Static global allocator.
-  static MemoryPool<T, nObjects> memPool;   
-};
-
-template <class T, int nObjects >
-MemoryPool<T, nObjects> MemoryPool<T, nObjects>::memPool;
-
-template< class T, int nObjects >
-void* MemoryPool< T, nObjects >::allocate(std::size_t) {
-   if ( head == 0 ) { // if no more memory in the pool
-      const int last = nObjects - 1;
-
-      // use the global operator new to allocate a block for the pool
-      Thunk* pool = reinterpret_cast<Thunk*>(
-	 ::operator new(nObjects * sizeof(Thunk)));
-
-      // initialize the chain (one-directional linked list)
-      head = pool;
-      for (int i = 0; i < last; ++i ) {
-	 pool[i].next = &pool[i+1];
-      }
-      pool[last].next = 0;
-   }
-
-   // set head to point to the next object in the list
-   Thunk* currentThunk = head;
-   head = currentThunk->next;
-
-   return currentThunk;
-}
-
-template< class T, int nObjects >
-void MemoryPool< T, nObjects >::free(void* t) {
-   assert(t != 0);     
-   if (t == 0) return; // for safety
-
-   // recycle the object memory, by putting it back into the chain
-   reinterpret_cast<Thunk*>(t)->next = head;
-   head = reinterpret_cast<Thunk*>(t);
-}
-
-} //namespace CORE
-
-#endif // _CORE_MEMORYPOOL_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Promote.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Promote.h
deleted file mode 100644
index 8893ba0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Promote.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Expr.h
- * Synopsis: a class of Expression in Level 3
- *
- * Written by
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu>
- *       Vikram Sharma<sharma at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Source: /home/exact/cvsroot/exact/corelib/inc/CORE/Promote.h,v $
- * $Revision$ $Date$
- ***************************************************************************/
-
-#ifndef __PROMOTE_H__
-#define __PROMOTE_H__
-
-#include <CGAL/CORE/Impl.h>
-
-namespace CORE { 
-
-/// hasExactDivision()
-///   CHECKING if NT has exact division
-///   NOTE: it is important that the compiler does not try to
-///   prove theorems about arithmetic identities like "x*(y/x) == y"
-///   USAGE:  If you want to check if a number type NT has exact division, do for example,
-///            if (hasExactDivision< NT >::check()) ...
-///   		We use this in Polynomial<NT> class.
-template < class NT >
-struct hasExactDivision {
-  static bool check() {		// This default function is supposed to work for NT other than BigRat or Expr
-     return false;
-  }
-};
-
-template<> struct hasExactDivision<Expr> {
-  static bool check() {
-     return true;
-  }
-};
-template<> struct hasExactDivision<BigRat> {
-  static bool check() {
-     return true;
-  }
-};
-
-template<typename T1, typename T2>
-class Promotion;
-
-template<typename T>
-class Promotion<T, T> {
-  public:
-    typedef T ResultT;
-};
-
-#define MAX_TYPE(T1, T2)		\
-  typename Promotion<T1, T2>::ResultT
-
-#define DEFINE_MAX_TYPE(T1, T2, Tr)	\
-  template<> class Promotion<T1, T2> {	\
-    public:				\
-      typedef Tr ResultT;		\
-  };					\
-  template<> class Promotion<T2, T1> {	\
-    public:				\
-      typedef Tr ResultT;		\
-  };
-
-/*
- * For example:
- *
- * DEFINE_MAX_TYPE(BigInt, BigRat, BigRat)   	// define the promotion
- *
- * template<typename T1, typename T2> 		// define function f with type templates
- *   MAX_TYPE(T1, T2) f(T1& , T2& );
- *
- * or
- *
- * template<typename T1, typename T2> 		// define function f with type templates
- *   const MAX_TYPE(T1, T2)& f(T1& , T2& );
- *
- * BigInt  a  =  1;
- * BigRat  b  = "1/3";
- * BigRat  c  =  f(a, b);			// or, typename Promotion<BigInt, BigRat>::ResultT c = f(a,b);
- *
- * REMARK: this mechanism is used by the eval function for polynomial evaluation (see Poly.tcc)
- * where the two types are NT (type of coefficients) and N (type of evaluation point).
- */
-
-/* 
- * primary types: (11)
- *
- * 	bool, 
- *	char, unsigned char, 
- *	short, unsigned short,
- * 	int, unsigned int, 
- *	long, unsigned long, 
- *	float, double
- *
- * CORE types: (5)
- *
- * 	BigInt < BigFloat < BigRat < Real < Expr
- *
- *      (NOTE: BigFloat here must be error-free)
- *
- */
-
-class BigInt;
-class BigFloat;
-class BigRat;
-class Expr;
-
-DEFINE_MAX_TYPE(long, BigInt, BigInt)
-DEFINE_MAX_TYPE(long, BigFloat, BigFloat)
-DEFINE_MAX_TYPE(long, BigRat, BigRat)
-DEFINE_MAX_TYPE(long, Expr, Expr)
-
-DEFINE_MAX_TYPE(int, BigInt, BigInt)
-DEFINE_MAX_TYPE(int, BigFloat, BigFloat)
-DEFINE_MAX_TYPE(int, BigRat, BigRat)
-DEFINE_MAX_TYPE(int, Expr, Expr)
-
-DEFINE_MAX_TYPE(BigInt, BigFloat, BigFloat)
-DEFINE_MAX_TYPE(BigInt, BigRat, BigRat)
-DEFINE_MAX_TYPE(BigInt, Expr, Expr)
-
-DEFINE_MAX_TYPE(BigFloat, BigRat, BigRat)
-DEFINE_MAX_TYPE(BigFloat, Expr, Expr)
-
-DEFINE_MAX_TYPE(BigRat, Expr, Expr)
-
-} //namespace CORE
-
-#endif //__PROMOTE_H__
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Real.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Real.h
deleted file mode 100644
index 52c802f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Real.h
+++ /dev/null
@@ -1,496 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Real.h
- * 
- * Synopsis: The Real class is a superclass for all the number 
- *           systems in the Core Library (int, long, float, double,
- *           BigInt, BigRat, BigFloat, etc)
- * 
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-#ifndef _CORE_REAL_H_
-#define _CORE_REAL_H_
-#include "RealRep.h"
-
-namespace CORE { 
-// class Real
-typedef RCImpl<RealRep> RCReal;
-class Real : public RCReal {
-public:
-  Real(int i=0) : RCReal(new RealLong(i)) {}
-  Real(unsigned int ui) : RCReal(NULL) {
-    (ui<=INT_MAX) ? (rep=new RealLong(static_cast<int>(ui))) : (rep=new RealBigInt(ui));
-  }
-  Real(long l) : RCReal(new RealLong(l)) {}
-  Real(unsigned long ul) : RCReal(NULL) {
-    (ul<=LONG_MAX) ? (rep=new RealLong(static_cast<long>(ul))) : (rep=new RealBigInt(ul));
-  }
-  Real(float f) : RCReal(new RealDouble(f)) {}
-  Real(double d) : RCReal(new RealDouble(d)) {}
-  Real(const BigInt& I) : RCReal(new RealBigInt(I)) {}
-  Real(const BigRat& R) : RCReal(new RealBigRat(R)) {}
-  Real(const BigFloat& F) : RCReal(new RealBigFloat(F)) {}
-  Real(const char* s, const extLong& prec=defInputDigits) : RCReal(NULL) {
-    constructFromString(s, prec);
-  }
-  Real(const std::string& s, const extLong& prec=defInputDigits) : RCReal(NULL){
-    constructFromString(s.c_str(), prec);
-  }
-
-  /// \name Copy-Assignment-Destructor
-  //@{
-  /// copy constructor
-  Real(const Real& rhs) : RCReal(rhs) {
-    rep->incRef();
-  }
-  /// assignment operator
-  Real& operator=(const Real& rhs) {
-    if (this != &rhs) {
-      rep->decRef();
-      rep = rhs.rep;
-      rep->incRef();
-    }
-    return *this;
-  }
-  /// destructor
-  ~Real() {
-    rep->decRef();
-  }
-  //@}
-
-  /// \name Compound Assignment Operators
-  //@{
-  /// operator+=
-  Real& operator+=(const Real& x);
-  /// operator-=
-  Real& operator-=(const Real& x);
-  /// operator*=
-  Real& operator*=(const Real& x);
-  /// operator/=
-  Real& operator/=(const Real& x);
-  //@}
-
-  /// \name Unary Minus, Increment and Decrement Operators
-  //@{
-  /// unary plus
-  Real operator+() const {
-    return Real(*this);
-  }
-  /// unary minus
-  Real operator-() const {
-    return -(*rep);
-  }
-  /// left increment operator (++i)
-  Real& operator++() {
-    *this += 1;
-    return *this;
-  }
-  /// left decrement operator (--i)
-  Real& operator--() {
-    *this -= 1;
-    return *this;
-  }
-  /// right increment operator (i++)
-  Real operator++(int) {
-    Real t(*this);
-    *this += 1;
-    return t;
-  }
-  /// right deccrement operator (i--)
-  Real operator--(int) {
-    Real t(*this);
-    *this -= 1;
-    return t;
-  }
-  //@}
-
-  /// \name String Conversion Functions
-  //@{
-  /// set value from <tt>const char*</tt>
-  void fromString(const char* s, const extLong& prec = defInputDigits) {
-    *this = Real(s, prec);
-  }
-  /// convert to <tt>std::string</tt>
-  /** give decimal string representation */
-  std::string toString(long prec=defOutputDigits, bool sci=false) const {
-    return rep->toString(prec, sci);
-  }
-  //@}
-
-  /// \name Conversion Functions
-  //@{
-  /// convert to \c int
-  int intValue() const {
-    return static_cast<int>(longValue());
-  }
-  /// convert to \c long
-  long longValue() const {
-    return rep->longValue();
-  }
-  /// convert to \c float
-  float floatValue() const {
-    return static_cast<float>(doubleValue());
-  }
-  /// convert to \c double
-  double doubleValue() const {
-    return rep->doubleValue();
-  }
-  /// convert to \c BigInt
-  BigInt BigIntValue() const {
-    return rep->BigIntValue();
-  }
-  /// convert to \c BigRat
-  BigRat BigRatValue() const {
-    return rep->BigRatValue();
-  }
-  /// convert to \c BigFloat (approximate it first!)
-  BigFloat BigFloatValue() const {
-    return rep->BigFloatValue();
-  }
-  //@}
-
-  /// \name Aprroximation Function
-  //@{
-  /// approximation
-  Real approx(const extLong& r=defRelPrec, const extLong& a=defAbsPrec) const {
-    return rep->approx(r, a);
-  }
-  //@}
-
-  /// \name Helper Functions
-  //@{
-  /// sign function
-  int sign() const {
-    return rep->sgn();
-  }
-  /// isZero function
-  bool isZero() const {
-    return sign() == 0;
-  }
-  /// return true if interval contains zero
-  bool isZeroIn() const {
-    return rep->isZeroIn();
-  }
-  /// absolute value function
-  Real abs() const {
-    return (sign() >= 0) ? +(*this) : -(*this);
-  }
-
-  /// get mantissa of current approximate value
-  BigInt getMantissa() const {
-    return BigFloatValue().m();
-  }
-  /// get exponent of current approximate value
-  long getExponent() const {
-    return BigFloatValue().exp();
-  }
-
-  /// return true if error free otherwise return false;
-  bool  isExact() const {
-    return rep->isExact();
-  }
-
-  /// low bound of MSB
-  extLong lMSB() const {
-    return isExact() ? MSB():(rep->BigFloatValue()).lMSB();
-  }
-  /// upper bound of MSB
-  extLong uMSB() const {
-    return isExact() ? MSB():(rep->BigFloatValue()).uMSB();
-  }
-  /// MSB - Most Significant Bit
-  extLong MSB() const {
-    return rep->mostSignificantBit;
-  }
-
-  /// floor of log_2 of Error
-  extLong flrLgErr() const {
-    return rep->flrLgErr();
-  }
-  /// ceil of log_2 of Error
-  extLong clLgErr() const {
-    return rep->clLgErr();
-  }
-
-  /// division with desired precision
-  Real div(const Real& x, const extLong& r) const;
-  /// squareroot
-  Real sqrt(const extLong& x) const {
-    return rep->sqrt(x);
-  }
-  /// squareroot with initial approximation
-  Real sqrt(const extLong& x, const BigFloat& A) const {
-    return rep->sqrt(x, A);
-  }
-
-  /// correspond to the variables "u25, l25, v2p, v2m, v5p, v5m" in Expr
-  void ULV_E(extLong &up, extLong &lp, extLong &v2p, extLong &v2m,
-             extLong &v5p, extLong &v5m) const {
-    rep->ULV_E(up, lp, v2p, v2m, v5p, v5m);
-  }
-
-  /// degree of polynomial P(x)
-  unsigned long degree() const {
-    return rep->degree();
-  }
-  /// \f$ lg(|| P(X) ||_2) \f$
-  unsigned long length() const {
-    return rep->length();
-  }
-  /// \f$ lg(|| P(X) ||_\infty) \f$
-  unsigned long height() const {
-    return rep->height();
-  }
-  //@}
-
-  /// return Real(0)
-  CGAL_CORE_EXPORT static const Real& getZero();
-private:
-  CGAL_CORE_EXPORT void constructFromString(const char *str, const extLong& prec);
-};
-
-#define CORE_REAL_ZERO Real::getZero()
-
-const long halfLongMax = LONG_MAX /2;
-const long halfLongMin = LONG_MIN /2;
-
-struct _real_add {
-  template <class T>
-  static Real eval(const T& a, const T& b) {
-    return a+b;
-  }
-  // specialized for two long values
-  static Real eval(long a, long b) {
-    if ((a > halfLongMax && b > halfLongMax) || (a < halfLongMin && b < halfLongMin))
-      return BigInt(a)+BigInt(b);
-    else
-      return a+b;
-  }
-};
-
-struct _real_sub {
-  template <class T>
-  static Real eval(const T& a, const T& b) {
-    return a-b;
-  }
-  // specialized for two long values
-  static Real eval(long a, long b) {
-    if ((a > halfLongMax && b < halfLongMin) || (a < halfLongMin && b > halfLongMax))
-      return BigInt(a)-BigInt(b);
-    else
-      return a-b;
-  }
-};
-
-struct _real_mul {
-  template <class T>
-  static Real eval(const T& a, const T& b) {
-    return a*b;
-  }
-  // specialized for two long values
-  static Real eval(long a, long b) {
-    if (flrLg(a) + flrLg(b) >= static_cast<int>(LONG_BIT-2))
-      return BigInt(a)*BigInt(b);
-    else
-      return a*b;
-  }
-};
-
-template <class Op>
-struct _real_binary_op {
-  static Real eval(const RealRep& a, const RealRep& b) {
-    if (a.ID() == REAL_BIGRAT || b.ID() == REAL_BIGRAT) {
-      if (!a.isExact()) { // a must be a BigFloat and b must be a BigRat
-        BigFloat bf_a = a.BigFloatValue(), bf_b;
-        bf_b.approx(b.BigRatValue(), CORE_posInfty, -bf_a.flrLgErr());
-        return Op::eval(bf_a, bf_b);
-      } else if (!b.isExact()) { // a must be a BigRat and b must be a BigFloat
-        BigFloat bf_a, bf_b = b.BigFloatValue();
-        bf_a.approx(a.BigRatValue(), CORE_posInfty, -bf_b.flrLgErr());
-        return Op::eval(bf_a, bf_b);
-      } else // both are BigRat
-        return Op::eval(a.BigRatValue(), b.BigRatValue());
-    } else if (a.ID() == REAL_BIGFLOAT || b.ID() == REAL_BIGFLOAT
-               || a.ID() == REAL_DOUBLE || b.ID() == REAL_DOUBLE) {
-      return Op::eval(a.BigFloatValue(), b.BigFloatValue());
-    } else if (a.ID() == REAL_BIGINT || b.ID() == REAL_BIGINT) {
-      return Op::eval(a.BigIntValue(), b.BigIntValue());
-    } else { // a.ID() == REAL_LONG && b.ID() == REAL_LONG
-      return Op::eval(a.longValue(), b.longValue());
-    }
-  }
-};
-
-typedef _real_binary_op<_real_add> real_add;
-typedef _real_binary_op<_real_sub> real_sub;
-typedef _real_binary_op<_real_mul> real_mul;
-
-struct real_div {
-  static Real eval(const RealRep& a, const RealRep& b, const extLong& r) {
-    if (a.ID() == REAL_BIGRAT || b.ID() == REAL_BIGRAT) {
-      if (!a.isExact()) { // a must be a BigFloat and b must be a BigRat
-        BigFloat bf_a = a.BigFloatValue(), bf_b;
-        bf_b.approx(b.BigRatValue(), bf_a.MSB() - bf_a.flrLgErr() + 1, CORE_posInfty);
-        return bf_a.div(bf_b, r);
-      } else if (!b.isExact()) { // a must be a BigRat and b must be a BigFloat
-        BigFloat bf_a, bf_b = b.BigFloatValue();
-        bf_a.approx(a.BigRatValue(), bf_b.MSB() - bf_b.flrLgErr() + 1, CORE_posInfty);
-        return bf_a.div(bf_b, r);
-      } else // both are BigRat
-        return a.BigRatValue()/b.BigRatValue();
-    } else if (a.ID() == REAL_BIGFLOAT || b.ID() == REAL_BIGFLOAT
-               || a.ID() == REAL_DOUBLE || b.ID() == REAL_DOUBLE) {
-      return a.BigFloatValue().div(b.BigFloatValue(), r);
-    } else if (a.ID() == REAL_BIGINT || b.ID() == REAL_BIGINT) {
-      return BigRat(a.BigIntValue(), b.BigIntValue());
-    } else { // a.ID() == REAL_LONG && b.ID() == REAL_LONG
-      return BigRat(a.longValue(), b.longValue());
-    }
-  }
-};
-
-CGAL_CORE_EXPORT std::istream& operator>>(std::istream& i, Real& r);
-
-inline std::ostream& operator<<(std::ostream& o, const Real& r) {
-  return r.getRep().operator<<(o);
-}
-
-inline Real& Real::operator+=(const Real& rhs) {
-  *this = real_add::eval(getRep(), rhs.getRep());
-  return *this;
-}
-inline Real& Real::operator-=(const Real& rhs) {
-  *this = real_sub::eval(getRep(), rhs.getRep());
-  return *this;
-}
-inline Real& Real::operator*=(const Real& rhs) {
-  *this = real_mul::eval(getRep(), rhs.getRep());
-  return *this;
-}
-inline Real& Real::operator/=(const Real& rhs) {
-  *this = real_div::eval(getRep(), rhs.getRep(), defRelPrec);
-  return *this;
-}
-
-// operator+
-inline Real operator+(const Real& x, const Real& y) {
-  return real_add::eval(x.getRep(), y.getRep());
-}
-// operator-
-inline Real operator-(const Real& x, const Real& y) {
-  return real_sub::eval(x.getRep(), y.getRep());
-}
-// operator*
-inline Real operator*(const Real& x, const Real& y) {
-  return real_mul::eval(x.getRep(), y.getRep());
-}
-// operator/
-inline Real operator/(const Real& x, const Real& y) {
-  return real_div::eval(x.getRep(), y.getRep(), defRelPrec);
-}
-// div w/ precision
-inline Real Real::div(const Real& x, const extLong& r) const {
-  return real_div::eval(getRep(), x.getRep(), r);
-}
-
-inline int cmp(const Real& x, const Real& y) {
-  return (x-y).sign();
-}
-inline bool operator==(const Real& x, const Real& y) {
-  return cmp(x, y) == 0;
-}
-inline bool operator!=(const Real& x, const Real& y) {
-  return cmp(x, y) != 0;
-}
-inline bool operator>=(const Real& x, const Real& y) {
-  return cmp(x, y) >= 0;
-}
-inline bool operator>(const Real& x, const Real& y) {
-  return cmp(x, y) > 0;
-}
-inline bool operator<=(const Real& x, const Real& y) {
-  return cmp(x, y) <= 0;
-}
-inline bool operator<(const Real& x, const Real& y) {
-  return cmp(x, y) < 0;
-}
-
-/// floor function
-CGAL_CORE_EXPORT BigInt floor(const Real&, Real&);
-/// power function
-CGAL_CORE_EXPORT Real pow(const Real&, unsigned long);
-
-/// return sign
-inline int sign(const Real& r) {
-  return r.sign();
-}
-/// is zero?
-inline bool isZero(const Real& r) {
-  return r.sign() == 0;
-}
-/// absolute value
-inline Real abs(const Real& x) {
-  return x.abs();
-}
-/// absolute value (same as abs)
-inline Real fabs(const Real& x) {
-  return abs(x);
-}
-/// floor
-inline BigInt floor(const Real& r) {
-  Real tmp;
-  return floor(r, tmp);
-}
-/// ceiling
-inline BigInt ceil(const Real& r) {
-  return -floor(-r);
-}
-/// power
-inline Real power(const Real& r, unsigned long p) {
-  return pow(r, p);
-}
-/// square root
-inline Real sqrt(const Real& x) {
-  return x.sqrt(defAbsPrec);
-}
-
-// class Realbase_for (need defined after Real)
-// unary minus operator
-template <class T>
-inline Real Realbase_for<T>::operator-() const {
-  return -ker;
-}
-template <>
-inline Real RealLong::operator-() const {
-  return ker < -LONG_MAX ? -BigInt(ker) : -ker;
-}
-
-} //namespace CORE
-#endif // _CORE_REAL_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/RealRep.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/RealRep.h
deleted file mode 100644
index 4c9d986..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/RealRep.h
+++ /dev/null
@@ -1,514 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: RealRep.h
- * Synopsis: 
- * 		Internal Representation for Real
- *
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- * 
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-#ifndef _CORE_REALREP_H_
-#define _CORE_REALREP_H_
-#include "BigFloat.h"
-
-namespace CORE { 
-
-class Real;
-
-class RealRep {
-public:
-  extLong mostSignificantBit;
-public:
-  RealRep() : refCount(1) {}
-  virtual ~RealRep() {}
-  virtual int ID() const = 0;
-
-  virtual long longValue() const = 0;
-  virtual double doubleValue() const = 0;
-  virtual BigInt BigIntValue() const = 0;
-  virtual BigRat BigRatValue() const = 0;
-  virtual BigFloat BigFloatValue() const = 0;
-
-  virtual BigFloat approx(const extLong&, const extLong&) const = 0;
-  virtual Real operator-() const = 0;
-
-  virtual bool isExact() const = 0;
-  virtual int sgn() const = 0;
-  virtual bool isZeroIn() const = 0;
-
-  virtual BigFloat sqrt(const extLong&) const = 0;
-  virtual BigFloat sqrt(const extLong&, const BigFloat&) const = 0;
-
-  virtual void ULV_E(extLong &, extLong&, extLong&,
-		  extLong&, extLong&, extLong&) const = 0;
-  virtual extLong flrLgErr() const = 0;
-  virtual extLong clLgErr() const = 0;
-  virtual unsigned long degree() const = 0;
-  virtual unsigned long length() const = 0;
-  virtual unsigned long height() const = 0;
-
-  virtual std::string toString(long prec, bool sci) const = 0;
-  virtual std::ostream& operator<<(std::ostream& o) const = 0;
-public:
-  void incRef() {
-    ++refCount;
-  }
-  void decRef() {
-    if (--refCount == 0)
-      delete this;
-  }
-  int getRefCount() const {
-    return refCount;
-  }
-private:
-  int refCount;
-};//realRep class
-
-template <class T>
-class Realbase_for : public RealRep {
-public:
-  CORE_MEMORY(Realbase_for)
-  Realbase_for(const T& k);
-  ~Realbase_for() {}
-  int ID() const;
-
-  long longValue() const {
-    return ker.longValue();
-  }
-  double doubleValue() const {
-    return ker.doubleValue();
-  }
-  BigInt BigIntValue() const {
-    return BigInt(ker);
-  }
-  BigRat BigRatValue() const {
-    return BigRat(ker);
-  }
-  BigFloat BigFloatValue() const {
-    return BigFloat(ker);
-  }
-
-  BigFloat approx(const extLong&, const extLong&) const;
-  Real operator-() const;
-
-  bool isExact() const {
-    return true;
-  }
-  int sgn() const {
-    return ker > 0.0 ? 1 : ( ker == 0.0 ? 0 : -1);
-  }
-  bool isZeroIn() const {
-    return ker == 0.0;
-  }
-
-  BigFloat sqrt(const extLong&) const;
-  BigFloat sqrt(const extLong&, const BigFloat&) const;
-
-  void ULV_E(extLong &, extLong&, extLong&, extLong&, extLong&, extLong&) const;
-  extLong flrLgErr() const {
-    return CORE_negInfty;
-  }
-  extLong clLgErr() const {
-    return CORE_negInfty;
-  }
-  unsigned long degree() const {
-    return 1;
-  }
-  unsigned long length() const;
-  unsigned long height() const;
-
-  std::string toString(long, bool) const {
-    std::stringstream st;
-    st << ker;
-    return st.str();
-  }
-  std::ostream& operator<<(std::ostream& o) const {
-    return o << ker;
-  }
-private:
-  T ker;
-};//Realbase_for class
-
-typedef Realbase_for<long> RealLong;
-typedef Realbase_for<double> RealDouble;
-typedef Realbase_for<BigInt> RealBigInt;
-typedef Realbase_for<BigRat> RealBigRat;
-typedef Realbase_for<BigFloat> RealBigFloat;
-
-enum { REAL_LONG, REAL_DOUBLE, REAL_BIGINT, REAL_BIGRAT, REAL_BIGFLOAT };
-
-// constructors
-template<>
-inline RealLong::Realbase_for(const long& l) : ker(l) {
-  mostSignificantBit = (ker != 0 ) ? extLong(flrLg(ker)) : CORE_negInfty;
-}
-template<>
-inline RealDouble::Realbase_for(const double& d) : ker(d) {
-  mostSignificantBit = BigFloat(ker).MSB();
-}
-template<>
-inline RealBigInt::Realbase_for(const BigInt& l) : ker(l) {
-  mostSignificantBit = (sign(ker)) ? extLong(floorLg(ker)) : CORE_negInfty;
-}
-template<>
-inline RealBigRat::Realbase_for(const BigRat& l) : ker(l) {
-  mostSignificantBit = BigFloat(ker).MSB();
-}
-template<>
-inline RealBigFloat::Realbase_for(const BigFloat& l) : ker(l) {
-  mostSignificantBit = ker.MSB();
-}
-
-// ID()
-template<>
-inline int RealLong::ID() const {
-  return REAL_LONG;
-}
-template<>
-inline int RealDouble::ID() const {
-  return REAL_DOUBLE;
-}
-template<>
-inline int RealBigInt::ID() const {
-  return REAL_BIGINT;
-}
-template<>
-inline int RealBigRat::ID() const {
-  return REAL_BIGRAT;
-}
-template<>
-inline int RealBigFloat::ID() const {
-  return REAL_BIGFLOAT;
-}
-
-// cast functions
-template<>
-inline long RealLong::longValue() const {
-  return ker;
-}
-template<>
-inline long RealDouble::longValue() const {
-  return static_cast<long>(ker);
-}
-template<>
-inline double RealLong::doubleValue() const {
-  return static_cast<double>(ker);
-}
-template<>
-inline double RealDouble::doubleValue() const {
-  return ker;
-}
-template<>
-inline BigInt   RealBigInt::BigIntValue() const {
-  return ker;
-}
-template<>
-inline BigInt   RealBigRat::BigIntValue() const {
-  return ker.BigIntValue();
-}
-template<>
-inline BigInt RealBigFloat::BigIntValue() const {
-  return ker.BigIntValue();
-}
-template<>
-inline BigRat   RealBigRat::BigRatValue() const {
-  return ker;
-}
-template<>
-inline BigRat RealBigFloat::BigRatValue() const {
-  return ker.BigRatValue();
-}
-template<>
-inline BigFloat RealBigFloat::BigFloatValue() const {
-  return ker;
-}
-
-// isExact()
-template<>
-inline bool RealBigFloat::isExact() const {
-  return ker.isExact();
-}
-
-// sign()
-template<>
-inline int RealBigInt::sgn() const {
-  return sign(ker);
-}
-template<>
-inline int RealBigRat::sgn() const {
-  return sign(ker);
-}
-template<>
-inline int RealBigFloat::sgn() const {
-  return ker.sign();
-}
-
-// isZeroIn()
-template<>
-inline bool RealBigInt::isZeroIn() const {
-  return sign(ker) == 0;
-}
-template<>
-inline bool RealBigRat::isZeroIn() const {
-  return sign(ker) == 0;
-}
-template<>
-inline bool RealBigFloat::isZeroIn() const {
-  return ker.isZeroIn();
-}
-
-// approx
-template <class T>
-inline BigFloat Realbase_for<T>::approx(const extLong& r, const extLong& a) const {
-  BigFloat x;
-  x.approx(ker, r, a);
-  return x;
-}
-template <>
-inline BigFloat RealLong::approx(const extLong& r, const extLong& a) const {
-  BigFloat x;
-  x.approx(BigInt(ker), r, a);
-  return x;
-}
-template <>
-inline BigFloat RealDouble::approx(const extLong& r, const extLong& a) const {
-  BigFloat x;
-  x.approx(BigRat(ker), r, a);
-  return x;
-}
-
-// sqrt
-template <class T>
-inline BigFloat Realbase_for<T>::sqrt(const extLong& a) const {
-  return BigFloat(ker).sqrt(a);
-}
-template <class T>
-inline BigFloat Realbase_for<T>::sqrt(const extLong& a, const BigFloat& A) const {
-  return BigFloat(ker).sqrt(a, A);
-}
-
-// ULV_E()
-template<>
-inline void RealLong::ULV_E(extLong &up, extLong &lp, extLong &v2p,
-                            extLong &v2m, extLong &v5p, extLong &v5m) const {
-  // TODO : extract the power of 5.
-  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
-  if (ker == 0)
-    return;
-
-  // Extract the power of 2.
-  unsigned long exp = 0;
-  unsigned long tmp_ker = ker;
-  while ((tmp_ker&1) != 0) {
-    tmp_ker = tmp_ker/2;
-    ++exp;
-  }
-  up = clLg(tmp_ker);
-  lp = 0;
-  v2p = exp;
-}
-template<>
-inline void RealDouble::ULV_E(extLong &up, extLong &lp, extLong &v2p,
-                              extLong &v2m, extLong &v5p, extLong &v5m) const {
-  // TODO : can probably be made faster using frexp() or such.
-  // TODO : extract the power of 5.
-  BigRat R = BigRat(ker);
-  up  = ceilLg(numerator(R));
-  v2m = ceilLg(denominator(R));
-  lp = v2p = v5m = v5p = EXTLONG_ZERO;
-}
-template<>
-inline void RealBigInt::ULV_E(extLong &up, extLong &lp, extLong &v2p,
-                              extLong &v2m, extLong &v5p, extLong &v5m) const {
-  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
-  if (ker == 0)
-    return;
-
-  // Extract power of 5.
-  int exp5;
-  BigInt remainder5;
-  getKaryExpo(ker, remainder5, exp5, 5);
-  v5p = exp5;
-  // Extract power of 2.
-  int exp2 = getBinExpo(remainder5);
-  up = ceilLg(remainder5) - exp2;
-  v2p = exp2;
-}
-template<>
-inline void RealBigRat::ULV_E(extLong &up, extLong &lp, extLong &v2p,
-                              extLong &v2m, extLong &v5p, extLong &v5m) const {
-  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
-  if (ker == 0)
-    return;
-
-  // Extract power of 5.
-  int exp5;
-  BigInt num5, den5;
-  getKaryExpo(numerator(ker), num5, exp5, 5);
-  if (exp5 != 0) {
-    v5p = exp5;
-    den5 = denominator(ker);
-  } else {
-    getKaryExpo(denominator(ker), den5, exp5, 5);
-    v5m = exp5;
-  }
-
-  // Now we work with num5/den5.
-  int exp2 = getBinExpo(num5);
-  if (exp2 != 0) {
-    v2p = exp2;
-  } else {
-    exp2 = getBinExpo(den5);
-    v2m = exp2;
-  }
-
-  up = ceilLg(num5) - v2p;
-  lp = ceilLg(den5) - v2m;
-}
-template<>
-inline void RealBigFloat::ULV_E(extLong &up, extLong &lp, extLong &v2p,
-                                extLong &v2m, extLong &v5p, extLong &v5m) const {
-  // TODO : extract power of 5.
-  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
-  BigRat R = ker.BigRatValue();
-  up  = ceilLg(numerator(R));
-  v2m = ceilLg(denominator(R));
-}
-
-// flrLgErr && clLgErr
-template<>
-inline extLong RealBigFloat::flrLgErr() const {
-  return ker.flrLgErr();
-}
-template<>
-inline extLong RealBigFloat::clLgErr() const {
-  return ker.clLgErr();
-}
-
-// height && length
-template<>
-inline unsigned long RealLong::length() const {
-  return clLg(1+ core_abs(ker));
-}	// length is (log_2(1+ker^2)) /2.
-
-template<>
-inline unsigned long RealLong::height() const {
-  return clLg(core_max(1L, core_abs(ker)));
-}	// height is max{1, |ker|}
-
-template<>
-inline unsigned long RealDouble::length() const {
-  BigRat R  = BigRat(ker);
-  long ln = 1 + ceilLg(numerator(R));
-  long ld = 1 + ceilLg(denominator(R));
-  return (ln>ld) ? ln : ld; ///< an upper bound on log_2(sqrt(num^2+den^2))
-}
-
-template<>
-inline unsigned long RealDouble::height() const {
-  BigRat R  = BigRat(ker);
-  long ln = ceilLg(numerator(R));
-  long ld = ceilLg(denominator(R));
-  return (ln>ld) ? ln : ld; ///< an upper bound on log_2(max(|num|, |den|))
-}
-template<>
-inline unsigned long RealBigInt::length() const {
-  return ceilLg(1 + abs(ker));
-}
-
-template<>
-inline unsigned long RealBigInt::height() const {
-  BigInt r(abs(ker));
-  if (r<1)
-    r = 1;
-  return ceilLg(r);
-}
-
-template<>
-inline unsigned long RealBigFloat::length() const {
-  // Chen Li: A bug fixed.
-  // The statement in the older version with the bug was:
-  //   BigRat R  = BigRat(ker);
-  // The BigRat(BigFloat) actually is a
-  // conversion operator (defined in BigFloat.h), _NOT_
-  // an ordinary class constructor! The C++ language
-  // specify that an intialization is not an assignment
-  // but a constructor operation!
-  // Considering that BigRat(BigFloat) is a conversion
-  // operator not really a constructor. The programmer's
-  // intent is obvious to do an assignment.
-  // However, the g++ seems to be confused by the above
-  // initialization.
-  BigRat R  = ker.BigRatValue();
-  long   ln = 1 + ceilLg(numerator(R));
-  long   ld = 1 + ceilLg(denominator(R));
-  return ( ln > ld ) ? ln : ld;
-}
-
-template<>
-inline unsigned long RealBigFloat::height() const {
-  // Chen Li: A bug fixed. The old statement with the bug was:
-  //   BigRat R  = BigRat(ker);
-  // Detailed reasons see above (in RealBigFloat::length()!
-  BigRat R  = ker.BigRatValue();
-  long     ln = ceilLg(numerator(R));
-  long     ld = ceilLg(denominator(R));
-  return   ( ln > ld ) ? ln : ld;
-}
-
-template<>
-inline unsigned long RealBigRat::length() const {
-  long ln = 1 + ceilLg(numerator(ker));
-  long ld = 1 + ceilLg(denominator(ker));
-  return ( ln > ld ) ? ln : ld;
-}
-
-template<>
-inline unsigned long RealBigRat::height() const {
-  long ln = ceilLg(numerator(ker));
-  long ld = ceilLg(denominator(ker));
-  return (ln > ld ) ? ln : ld;
-}
-
-// toString()
-template<>
-inline std::string RealBigInt::toString(long, bool) const {
-  return ker.get_str();
-}
-template<>
-inline std::string RealBigRat::toString(long, bool) const {
-  return ker.get_str();
-}
-template<>
-inline std::string RealBigFloat::toString(long prec, bool sci) const {
-  return ker.toString(prec, sci);
-}
-
-} //namespace CORE
-#endif // _CORE_REALREP_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/RefCount.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/RefCount.h
deleted file mode 100644
index 7393a16..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/RefCount.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: RefCount.h
- * Synopsis: 
- *     1. This file defines two templated classes:
- *               RCRepImpl<class N>
- *     to create Reps of the class N.  The basic functions provided by
- *     this class is reference counting.   The other class is
- *               RCImpl<class T>
- *     for implementing the envelop-letter paradigm for a class whose Rep
- *     is the class T.  So, T is the "letter", and RCImpl<T> the "envelop".
- *
- *     2. All Rep classes (BigIntRep, BigFloatRep, BigRatRep, ExprRep, etc)
- *     are derived from RCRepImpl<N>.  E.g.,
- *
- *         class BigRatRep : public RCRepImp<BigRatRep> {
- *         ...
- *         }
- *     (Note the recursive use of "BigRatRep").
- *
- *     3. All Number classes (BigInt, BigFloat, BigRat, Expr, etc)
- *     are derived from RCImpl<T>.  E.g.
- *
- *         typedef RCImpl<BigRatRep> RCBigRat;
- *         class BigRat : public RCBigRat {
- *         ...
- *         }
- * 
- * Written by 
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-
-#ifndef _CORE_REFCOUNT_H_
-#define _CORE_REFCOUNT_H_
-
-namespace CORE { 
-
-template<class Deriving>
-class RCRepImpl {
-public:
-  RCRepImpl() : refCount(1) {}
-  void incRef() {
-    ++refCount;
-  }
-  // Without static_cast this to Deriving*,
-  // the destructor of Deriving class will never been called.
-  // this is an example of simulating dynamic binding from ATL.
-  void decRef() {
-    if (--refCount == 0)
-      delete static_cast<Deriving*>(this);
-  }
-  int getRefCount() const {
-    return refCount;
-  }
-private:
-  int refCount;
-};
-
-template<class T>
-class RCImpl {
-protected:
-  RCImpl(T* p) : rep(p) {}
-  RCImpl(const RCImpl& x) : rep(x.rep) {}
-  T* rep; ///<= rep is the actual representation
-public:
-  /// get rep (const)
-  const T& getRep() const {
-    return *rep;
-  }
-  /// get rep (non-const)
-  T& getRep() {
-    return *rep;
-  }
-
-  
-  /// clone data
-  void makeCopy() {
-    if (rep->getRefCount() > 1) {
-      T* oldValue = rep;
-      rep->decRef(); // safe since rep has been referred at least once.
-      rep = oldValue ? new T(*oldValue) : 0; 
-    }
-  }
- 
-#ifdef CORE_RC_DEBUG
-  /// get counter
-  int getRefCount() const {
-    return rep->getRefCount();
-  }
-#endif
-};
-
-} //namespace CORE
-#endif // _CORE_REFCOUNT_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/Timer.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/Timer.h
deleted file mode 100644
index 72e4eb6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/Timer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Timer.h
- * Synopsis:
- *      Timer is a class to provide simple timing functions:
- *
- *      Here is an example of how to use it:
- *
- *		Timer timer;
- *
- *              timer.start();
- *              .. do some tasks for timing ..
- *              timer.stop();
- *
- *              long clock = timer.getClocks();     // get CPU clocks
- *              long seconds = time.getSeconds();   // get seconds
- *
- * Written by 
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_TIMER_H_
-#define _CORE_TIMER_H_
-
-#include <CGAL/CORE/Impl.h>
-#include <ctime>
-
-namespace CORE { 
-
-class Timer {
-private:
-  long startClock;
-  long clocks;
-
-public:
-  Timer() : startClock(0), clocks(0) {}
-
-  void start() {
-    startClock = clock();
-  }
-
-  void stop() {
-    clocks = clock() - startClock;
-  }
-
-  long getClocks() {
-    return clocks;
-  }
-
-  float getSeconds() {
-    return (float)clocks / CLOCKS_PER_SEC;
-  }
-};
-
-} //namespace CORE
-#endif // _CORE_TIMER_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/extLong.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/extLong.h
deleted file mode 100644
index 3091bb7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/extLong.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: extLong.h
- * Synopsis: 
- * 		An extended class for long
- *
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>,
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>,
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef _CORE_EXTLONG_H_
-#define _CORE_EXTLONG_H_
-
-#include <CGAL/CORE/Impl.h>
-#include <CGAL/CORE/CoreAux.h>
-
-namespace CORE { 
-
-#ifndef LONG_MAX
-#error "haven't define LONG_MAX"
-#endif
-
-#ifndef LONG_MIN
-#error "haven't define LONG_MIN"
-#endif
-
-// LONG_MAX and LONG_MIN is assumed in this class:
-
-const long EXTLONG_MAX = LONG_MAX;
-const long EXTLONG_MIN = LONG_MIN + 1;
-const long EXTLONG_NAN = LONG_MIN;
-const unsigned long U_EXTLONG_MAX = LONG_MAX;
-
-/// \class extLong
-/// \brief extended long integer
-class CGAL_CORE_EXPORT extLong {
-private:
-  long val;  ///< internal representation
-  int  flag; ///< flags
-  /**<  0 -- Normal;
-        1 -- Overflow (positive);
-       -1 -- Overflow (negative);
-        2 -- NaN (sign can not be determined) */
-
-  static void add(extLong& z, long x, long y);
-
-public:
-
-  /// \name Constructors
-  //@{
-  /// default constructor
-  extLong();
-  /// constructor for \c bool
-  extLong(bool isNaN);
-  /// constructor for \c int
-  extLong(int);
-  /// constructor for \c unsigned int
-  extLong(unsigned int);
-  /// constructor for \c long
-  extLong(long);
-  /// constructor for \c unsigned long
-  extLong(unsigned long);
-  //@}
-
-  /// \name Arithmetic and assignment operators
-  //@{
-  extLong& operator +=(const extLong&);
-  extLong& operator -=(const extLong&);
-  extLong& operator *=(const extLong&);
-  extLong& operator /=(const extLong&);
-  //@}
-
-  /// \name Incremental, Decremental, Unary minus operators
-  //@{
-  extLong& operator++();
-  extLong  operator++(int);
-  extLong& operator--();
-  extLong  operator--(int);
-  extLong  operator-() const;
-  //@}
-
-  /// \name Conversion Function
-  //@{
-  std::string toString() const {
-    std::stringstream st;
-    st << (*this);
-    return st.str();
-  }    
-  long toLong() const;
-  //@}
-
-  /// \name Builtin functions
-  //@{
-  long asLong() const;
-  bool isInfty() const;
-  bool isTiny() const;
-  bool isNaN() const;
-  int  sign() const;
-  /// comparison
-  int cmp(const extLong &) const;
-  //@}
-
-  /// \name I/O Stream
-  ///@{
-  friend  CGAL_CORE_EXPORT std::ostream& operator <<(std::ostream&, const extLong&);
-  //@}
-
-  static const extLong& getNaNLong();
-  static const extLong& getPosInfty();
-  static const extLong& getNegInfty();
-};
-
-
-
-// constants (Globally)
-#define CORE_NaNLong extLong::getNaNLong()
-#define CORE_posInfty extLong::getPosInfty()
-#define CORE_negInfty extLong::getNegInfty()
-
-const extLong EXTLONG_ZERO(0);
-const extLong EXTLONG_ONE(1);
-const extLong EXTLONG_TWO(2);
-const extLong EXTLONG_THREE(3);
-const extLong EXTLONG_FOUR(4);
-const extLong EXTLONG_FIVE(5);
-const extLong EXTLONG_SIX(6);
-const extLong EXTLONG_SEVEN(7);
-const extLong EXTLONG_EIGHT(8);
-
-// inline functions
-
-//  private comparison function
-inline int extLong::cmp(const extLong& x) const {
-  if (isNaN() || x.isNaN()) {
-    core_error("Two extLong NaN's cannot be compared!",
-               __FILE__, __LINE__, false);
-  }
-  return (val == x.val) ? 0 : ((val > x.val) ? 1 : -1);
-}
-
-// default constructor (cheapest one)
-inline extLong::extLong() : val(0), flag(0) {}
-
-inline extLong::extLong(int i) : val(i), flag(0) {
-  if (val == EXTLONG_MAX)
-    flag = 1;
-  else if (val <= EXTLONG_MIN)
-    flag = -1;
-}
-
-inline extLong::extLong(unsigned int ui) : val(ui), flag(0) {
-  if (val >= EXTLONG_MAX) {
-    val  = EXTLONG_MAX;
-    flag = 1;
-  }
-}
-
-inline extLong::extLong(long l) : val(l), flag(0) {
-  if (val >= EXTLONG_MAX)
-    flag = 1;
-  else if (val <= EXTLONG_MIN)
-    flag = -1;
-}
-
-inline extLong::extLong(unsigned long u) {
-  if (u >= U_EXTLONG_MAX) {
-    val  = EXTLONG_MAX;
-    flag = 1;
-  } else {
-    val = static_cast<long>(u);
-    flag = 0;
-  }
-}
-
-// isNaN defaults to false
-inline extLong::extLong(bool isNaN) : val(0), flag(0) {
-  if (isNaN) {
-    val = EXTLONG_NAN;
-    flag = 2;
-  }
-}
-
-// comparison operators
-inline bool operator== (const extLong& x, const extLong& y) {
-  return x.cmp(y) == 0;
-}
-
-inline bool operator!= (const extLong& x, const extLong& y) {
-  return x.cmp(y) != 0;
-}
-
-inline bool operator< (const extLong& x, const extLong& y) {
-  return x.cmp(y) < 0;
-}
-
-inline bool operator<= (const extLong& x, const extLong& y) {
-  return x.cmp(y) <= 0;
-}
-
-inline bool operator> (const extLong& x, const extLong& y) {
-  return x.cmp(y) > 0;
-}
-
-inline bool operator>= (const extLong& x, const extLong& y) {
-  return x.cmp(y) >= 0;
-}
-
-//  arithmetic operators
-inline extLong operator+ (const extLong& x, const extLong& y) {
-  return extLong(x)+=y;
-}
-
-inline extLong operator- (const extLong& x, const extLong& y) {
-  return extLong(x)-=y;
-}
-
-inline extLong operator* (const extLong& x, const extLong& y) {
-  return extLong(x)*=y;
-}
-
-inline extLong operator/ (const extLong& x, const extLong& y) {
-  return extLong(x)/=y;
-}
-
-inline extLong& extLong::operator++ () {
-  *this += 1;
-  return *this;
-}
-
-inline extLong extLong::operator++ (int) {
-  extLong r(*this);
-  *this += 1;
-  return r;
-}
-
-inline extLong& extLong::operator-- () {
-  *this -= 1;
-  return *this;
-}
-
-inline extLong extLong::operator-- (int) {
-  extLong r(*this);
-  *this -= 1;
-  return r;
-}
-
-//  conversion to long
-inline long extLong::toLong() const {
-  return val;
-}
-
-// builtin functions
-inline long extLong::asLong() const {
-  return val;
-}
-
-inline bool extLong::isInfty() const {
-  return (flag == 1);
-}
-
-inline bool extLong::isTiny() const {
-  return (flag == -1);
-}
-
-inline bool extLong::isNaN() const {
-  return (flag == 2);
-}
-
-} //namespace CORE
-#endif // _CORE_EXTLONG_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/circle2d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/circle2d.h
deleted file mode 100644
index 4399eae..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/circle2d.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: circle2d.h
- * Synopsis:
- *      Basic 2-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _CIRCLE2D_H
-#define _CIRCLE2D_H
-
-#include <CGAL/CORE/geom2d/point2d.h>
-#include <CGAL/CORE/geom2d/line2d.h>
-
-class Circle2d : public GeomObj {
-
-   /* An instance C of the data type circle is an oriented circle 
-      in the plane passing through three points p1, p2, p3. The 
-      orientation of C is equal to the orientation of the three defining
-      points. i.e. orientation(p1, p2, p3).
-      If \Labs{\{p1, p2, p3\}} = 1, C is the empty circle with center p1.
-      If p1, p2 and p3 are collinear, C is a straight line passing through
-      p1, p2 and p3 in this order and the center of C is undefined.    
-    */
-
-private:
- 
-   Point2d p1;  // the 3 points defining the circle
-   Point2d p2;
-   Point2d p3;
-
-   int orient;  //orientation(p1, p2, p3)
-
-   Point2d* cp;  //pointer to center
-   double * rp;  //pointer to radius
-
-public:
-
-   Circle2d( const Point2d& p1, const Point2d& p2,  const Point2d& p3);
-   //initialized to the oriented circle through points p1, p2, p3 
-
-   Circle2d(const Point2d& a, const Point2d& b0);
-   //initialized to the counter-clockwise oriented circle with center a 
-   //passing through b0 
-
-   Circle2d(const Point2d& p);
-   //initialized to the trivial circle with center p
-
-   Circle2d();
-   //initialized to the trivial circle with center (0,0)
-
-   Circle2d(const Point2d& c, double r);
-   //initialized to the circle with center c and radius r with positive
-   //(i.e. counter-clockwise) orientation
-
-   Circle2d(const Circle2d& c);
-   //copy constructor 
-
-   virtual ~Circle2d(); 
-
-   Circle2d& operator=(const Circle2d& C);
-
-   //operations
-
-   Point2d center();
-   //return the center of the circle
-
-   double radius();
-   //returns the radius. 
-   //precond: the orientation of the circle is not 0
-
-   Point2d point1() const { return p1; }
-   Point2d point2() const { return p2; }
-   Point2d point3() const { return p3; }
-
-//   Point2d point_on_circle(float alpha);
-   //returns a point p on the circle with angle of alpha
-
-   bool is_degerate() const { return orient == 0; }
-   //returns true if the defining points are collinear
-
-   bool is_trivial() const {return p1 == p2; }
-   //returns true if radius is zero
-
-   int orientation() const { return orient; }
-
-   int side_of(const Point2d& p) const; 
-   // returns -1, +1 or 0 if p lies right of, left of or on the circle
-   // respectively
-
-   bool inside(const Point2d& p);
-   //returns true if p lies inside of the circle
-
-   bool outside(const Point2d& p); 
-   
-   bool contains(const Point2d& p) const ;
-   //returns true if p lies on the circle, false otherwise
-
-   double distance(const Point2d& p);
-   //returns the distance between p and the circle: distance to center - radius
-
-   double distance(const Line2d& l);
-   //returns the distance between l and the circle
-   //distance from center to l minus radius
-
-   double distance(Circle2d& D);
-   //returns the distance between this circle and circle D
-   //distance between two centers minus two radius
-
-   bool operator==(const Circle2d& D) const ;
-   bool operator!=(const Circle2d& D) const 
-	{ return !operator==(D); }
-
-   friend std::ostream& operator<<(std::ostream& out, Circle2d& c);
-   friend std::istream& operator>>(std::istream& in, Circle2d c); //?? Circle2d &
-
-}; // class Circle2d
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/line2d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/line2d.h
deleted file mode 100644
index c50bc61..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/line2d.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: line2d.h
- * Synopsis:
- *      Basic 2-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _LINE2D_H_
-#define _LINE2D_H_
-
-#include <CGAL/CORE/geom2d/point2d.h>
-
-class Line2d : public GeomObj {
-
-  /* An instance l of the data type $line$ is a directed straight line
-     in the two dimensional plane. The angle between a right oriented 
-     horizontal line and $l$ is called the direction of $l$.
-   */
-  /* member Vector is not used in this class, it's intended for use in
-       the operator+,- etc 
-     need to do: assure p0 != p1
-   */
-private:
-
-  Point2d p0;
-  Point2d p1;
-  Vector V;
-
-public:
-
-  /*************************************************************
-   *  constructors
-   *************************************************************/
-
-  Line2d(const Point2d & p, const Vector &v);
-  // line initialized to pass through points p and p+v
-
-  Line2d(const Point2d &p, const Point2d &q);
-  //line is initialized to pass through points p and q directed from p to q
-
-//  Line2d(const point& p, double alpha);
-  //line passes through point p with direction alpha
-
-  Line2d(const double& a, const double& b, const double& c);
-
-  Line2d(const Line2d &);
-
-  Line2d();
-  //line passes through the origin with direction 0.
-
-  virtual ~Line2d() {}
-  /*************************************************************
-   *   member functions
-   *************************************************************/
-
-  Vector direction() const { return p1-p0; }
-   // returns the direction as a vector 
-
-  Point2d startPt() const { return p0; }  
-  Point2d stopPt() const  { return p1; }
-
-  double distance(Point2d q) const;
-   // returns the Euclidean distance between this line and point q
-
-  Point2d projection(const Point2d& p) const;
-   // returns the projection of p on this line
-
-  int orientation( const Point2d& p ) const;
-   // orientation of p0, p1 and p
-
-   // the sine/cosine of the angle made with positive x-direction
-  double sine() const { return (p1.Y() - p0.Y()) / p0.distance(p1); }
-  double cosine() const { return (p1.X() - p0.X()) / p0.distance(p1); }
-
-  Line2d rotate90( const Point2d& q)
-  { return Line2d(startPt().rotate90(q), stopPt().rotate90(q)); }
-
-  double y_abs() const;
-  // returns the y-abscissa of the line 
-
-  double slope() const ;    
-  //precond: is not vertical
-
-  /*************************************************************
-   *   predicates
-   *************************************************************/
-
-  bool isVertical() const { return p0.X() == p1.X(); }
-  bool isHorizontal() const { return p0.Y() == p1.Y(); }
-  bool is_trivial() const {return p0 == p1; }   //meaning for a line?
-
-  bool contains( const Point2d& p) const { 
-          return orientation2d(p0, p1, p) == 0; }
-  bool isCoincident( const Line2d& g) const { 
-          return contains(g.p0) && contains(g.p1); }  
-  bool isParallel(const Line2d& l) const {
-    return det(V, l.direction()) == 0; }
-
-  bool operator==( const Line2d& g ) const { return isCoincident(g); }
-  bool operator!=( const Line2d& g ) const { return !operator==(g); }
-
-  /*************************************************************
-   *   intersection
-   *************************************************************/
-
-  int intersects(const Line2d& t) const;
-   // decides whether *this and t intersects
-   // return dim of intersection. 
-   // return -1 if no intersection
-
-  GeomObj* intersection(const Line2d& g) const;
-   //if this line and g intersect in a single point, this point is 
-   // assigned to p and the result is true, otherwise the result is false
-
-  /*************************************************************
-   *   angles and others
-   *************************************************************/
-  friend int orientation2d( const Line2d& l, const Point2d& p);
-  // computes the orientation (a, b, p), where a!=b and a and b appear 
-  // in this order on line l
-
-  friend int cmp_slopes(const Line2d& l1, const Line2d& l2) 
-  //l1.slope > l2.slope: +1; equal: 0; otherwise: -1
-  {
-     if (l1.slope() == l2.slope())
-         return 0;
-     else
-         return (l1.slope() > l2.slope()) ? +1 : -1;
-  } 
-  
-  /*************************************************************
-   *   I/O
-   *************************************************************/
-
-  friend std::istream& operator>>(std::istream& in, Line2d& l);
-  friend std::ostream &operator<<(std::ostream & out, const Line2d & l);
-}; // class Line2d
-
-extern Line2d p_bisector(const Point2d& p, const Point2d& q);
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/point2d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/point2d.h
deleted file mode 100644
index 62e7d6b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/point2d.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: point2d.h
- * Synopsis:
- *      Basic 2-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-
-#ifndef _POINT2D_H
-#define _POINT2D_H
-
-#ifndef CORE_LEVEL
-#  define CORE_LEVEL 3
-#endif
-
-#include <CGAL/CORE/CORE.h>
-#include <CGAL/CORE/linearAlgebra.h>
-#include <CGAL/CORE/geombase.h>
-
-class Point2d : public GeomObj {
-
-private:
-  double x, y;
-
-public:
- 
-  //CONSTRUCTORS
-  //
-  Point2d();  //initialized to origin(0,0)
-  Point2d(double, double);
-  Point2d(const Point2d &);
-  Point2d(Vector v);
-  //create a point initialized to the point $(v[0], v[1])$ 
-  //precondition: v.dim() = 2
-
-  //DESTRUCTOR
-  virtual ~Point2d() {}
-
-  //ASSIGNMENT AND QUERY
-  //
-  Point2d& operator=(const Point2d&);
-  
-  double X() const { return x; }
-  double Y() const { return y; } 
-  void setX( const double a){ x = a; }
-  void setY( const double a){ y = a; } 
-  void set( const double a, const double b){ x = a; y = b;} 
-  
-  int dim() const { return 2; }
-
-  //CONVERSION
-  //
-  Vector toVector() const { return Vector(X(), Y()); } 
-
-  //DISTANCES
-  //
-  double distance(const Point2d) const;
-  // returns the Euclidean distance between p and this
-
-  double distance() const { return distance(Point2d(0, 0)); }
-  // returns distance between this and origin
-
-  //VECTOR OPERATIONS
-  //
-  Vector operator-(const Point2d &) const;
-  Point2d operator+(const Vector &) const;
-
-  //TRANSFORMATIONS
-  //
-  Point2d rotate90( const Point2d& q);
-  // returns the point rotated about q by angle of 90 degrees
-
-  //COMPARISONS
-  //
-  bool operator==(const Point2d&) const;
-  bool operator!=(const Point2d& p) const {return !operator==(p); }
-  
-  //INPUT-OUTPUT
-  //
-  friend std::ostream& operator<< (std::ostream&, const Point2d);
-  // write point p to output stream
-  // The format is, e.g.,  Point2d(1.0, 23)
-
-  friend std::istream& operator>> (std::istream&, Point2d&);
-  // reads the x and y coordinates of point p from the input stream
-  // The format is " ( x , y ) " where the white spaces are optional.
-  // Even the comma and the "(" and ")" are optional.
-  // The comment char '#' is allowed, and the rest of
-  // the line is then treated as white space.
-  // However, you must not use other kinds of parenthesis
-  // E.g., the following are all equivalent:
-  // 	1.0 -0.2 # comment
-  // 	( +1.0, -0.2)
-  // 	1.0, -.2 
-
-  friend int readPoints(std::istream &iS,
-		  Point2d *pA, int MaxN = 1000, int N = 0);
-  // reads a sequence of points from input stream iS into Point2d array pA.
-  // The input stream constains a sequence of 2K+1 numbers of the form
-  //     [NN]   ( x1 ,  y1 )  ( x2 , y2 )  ... ( xK , yK )
-  // The i-th point is (xi, yi). 
-  //    (0) NN is optional if N is given as argument (then N is set to NN)
-  //    (1) Any of the "(", "," and ")" are optional
-  //    (2) Newlines, extra white spaces, '#' are all ignored.
-  //    (3) Also, everything after '#' is discarded.
-  // If N > MaxN, nothing is read and 0 is returned.  
-  // Returns the number of points actually read, i.e, min(K, N).
-  
-}; //Point2d Class
-
-// //////////////////////////////////////////////////
-// AUXILLIARY FUNCTIONS:
-// //////////////////////////////////////////////////
-
-Point2d midPoint(const Point2d& a, const Point2d& b); 
-// returns midpoint between a and b
-
-Point2d aCenter(const Point2d& a, const Point2d& b, machine_double alpha =0.5); 
-// returns the "asymmetric Center" point 
-// that is alpha-fraction of the distance from a to b
-
-double area(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns twice (!) the signed area of triangle (a,b,c)
-  
-int orientation2d(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns sign of area(a,b,c)
-  
-bool leftTurn(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns true iff orientation2d(a,b,c) = +1
-  
-bool rightTurn(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns true iff orientation2d(a,b,c) = -1
-
-bool collinear(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns true iff orientation2d(a,b,c) = 0
-  
-bool between(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns true iff orientation2d(a,b,c) = 0 and b is strictly
-  //    between a and c.
-
-//variant of between:
-bool betweenVar(const Point2d& a, const Point2d& b, const Point2d& c);
-  // returns true iff the scalar product (a-b, c-b) is positive.
-  //    In case orientation2d(a,b,c)=0, then this is equivalent to
-  //    b being strictly between a and c.
-
-// THE FOLLOWING ARE CALLED by
-// 	operator>>(..) and readPoints(..)
-// bool getToNum( std::istream& in, char mark, bool strict=false) ;
-// bool getToChar( std::istream& in, char mark) ;
-// bool startNum(char c) ;
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/segment2d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/segment2d.h
deleted file mode 100644
index 3b4cb36..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom2d/segment2d.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: segment2d.h
- * Synopsis:
- *      Basic 2-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-
-#ifndef _SEGMENT2D_H_
-#define _SEGMENT2D_H_
-
-#include <CGAL/CORE/geom2d/point2d.h>
-#include <CGAL/CORE/geom2d/line2d.h>
-
-/************************************************************
- *  Class Segment2d:
- *
- *  An instance s of Segment2d is a finite or infinite line segment
- *  in the two dimensional plane, defined by a start point
- *  s.startPt() and a stop point s.stopPt().  It can be regarded
- *  as an open or a closed segment (default: open), and directed
- *  or not (default: directed).
- *
- *  We do not necessarily assume that startPt() != stopPt().
- ************************************************************/
-
-class Segment2d : public GeomObj {
-
-private:
-
-  Point2d p0;
-  Point2d p1;
-  bool directed;  // segments can be directed or not (default is directed)
-  bool open;     // segments can be open or closed (default is open)
-
-public:
-
-  /************************************************************
-   *   constructors
-   ************************************************************/
-
-  Segment2d(const Segment2d &);
-
-  Segment2d(const Point2d &p, const Point2d &q);
-  	//finite segment with endpoints p and q
-
-  Segment2d(const Point2d & p, const Vector & v);
-	//ray segment
-
-  Segment2d();
-  	//unit segment from (0,0) to (1,0) 
-
-  virtual ~Segment2d() {}
-  /*************************************************************
-   *   member functions
-   *************************************************************/
-
-  Point2d startPt() const { return p0; }  
-  Point2d stopPt() const { return p1; }
-
-  void reverse() { Point2d pTmp = p0; p0=p1; p1=pTmp; }
-   //  reverses the direction of the segment
-
-  Line2d toLine() const { return Line2d(p0,p1); }
- 
-  double length() const { return p0.distance(p1); }
-    //length of segment
-
-  double distance( const Point2d& p ) const;
-   // returns the Euclidean distance between this segment and point q
-
-  Point2d nearPt( const Point2d& p ) const;
-   // returns the point on segment closest to q;
-
-  void setDirected( bool _directed ) { directed = _directed; }
-  void setOpen( bool _open ) { directed = open; }
-
-   // orientation of p0, p1 and p
-  int orientation( const Point2d& p ) const {
-    return toLine().orientation(p); }
-
-  /*************************************************************
-   *   predicates
-   *************************************************************/
-  bool isOpen() const {return open; }
-  bool isDirected() const {return directed; }
-  bool isTrivial() const {return p0 == p1; }  
-  bool isVertical() const { return p0.X() == p1.X(); }
-  bool isHorizontal() const { return p0.Y() == p1.Y(); }
-  bool isCollinear( Point2d& p ) const { return toLine().contains(p); }
-  bool isCoincident( const Segment2d& s) const;
-  bool isParallel( const Segment2d& s ) {
-    return toLine().isParallel( s.toLine() );  }
-
-  bool contains( const Point2d& p ) const;
-  bool contains( const Segment2d& s ) const { 
-     return contains(s.startPt()) && contains(s.stopPt()); }  
-
-  bool operator==(const Segment2d& s) const { return isCoincident(s); }
-
-  bool operator!=(const Segment2d& s) const { return !isCoincident(s); }
-
-  /*************************************************************
-   *   intersection
-   *************************************************************/
-
-  int intersects( const Line2d& l ) const;
-   //decides whether *this and t intersect in one point
-   // return dim of intersetion
-  
-  int intersects( const Segment2d& s ) const;
-   //decides whether *this and t intersect in one point
-   // return dim of intersetion
-
-  GeomObj* intersection( const Line2d& l ) const;
-   // return intersection point if this segment and l intersect at a single point
-   // the intersection point is returned 
-  
-  GeomObj* intersection( const Segment2d& s ) const;
-   // return intersection point if this segment and s intersect at a single point
-   // the intersection point is returned 
- 
-  /*************************************************************
-   *   angles
-   *************************************************************/
-
-   // the sine/cosine of the angle made with positive x-direction
-  double sine() const { return (p1.Y() - p0.Y()) / length() ; }
-  double cosine() const { return (p1.X() - p0.X()) / length() ; }
-
-  Line2d rotate90(const Point2d& q)
-  { return Line2d(startPt().rotate90(q), stopPt().rotate90(q)); }
-
-   // computes the orientation (a, b, p), where a!=b and a and b appear 
-   // in this order on segment l
-  friend int orientation2d( const Segment2d& s, const Point2d& p) {
-    return orientation2d( s.toLine(), p ); 
-  }
-
-  friend int cmp_slopes( const Segment2d& s1, const Segment2d& s2) 
-   //l1.slope > l2.slope: +1; equal: 0; otherwise: -1
-  {
-     Line2d l1 = s1.toLine();
-     Line2d l2 = s2.toLine();
-     if (l1.slope() == l2.slope())
-         return 0;
-     else
-         return (l1.slope() > l2.slope()) ? +1 : -1;
-  } 
-  
-  /*************************************************************
-   *   I/O
-   *************************************************************/
-
-
-  friend std::istream& operator>>(std::istream& in, Segment2d& l);
-  friend std::ostream &operator<<(std::ostream & out, const Segment2d & l);
-   // syntax: {[} p {===} q {]}
-
-}; //class Segment2d
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/line3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/line3d.h
deleted file mode 100644
index 5965022..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/line3d.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: line3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
- 
-#ifndef _LINE3D_H_
-#define _LINE3D_H_
-
-#include <CGAL/CORE/geom3d/point3d.h>
-
-class Line3d : public GeomObj{
-
- /************************************************************
-  *  An instance l of the class Line3d is a directed line
-  *  in the three dimensional plane. The angle between a right oriented 
-  *  horizontal line and $l$ is called the direction of $l$.
-  *  We assume that l is defined by two points, l.startPt()
-  *  and l.stopPt().  We do not assure that these points are distinct.
-  *  So the line could be "improper".  But most operators assume
-  *  that lines are proper (it is the user's responsibility to check).
-  *
-  *  In the future, we may generalize this to allow the dual 
-  *  representation in terms of a linear equation.
-  *
-  *  Member Vector is not used in this class. It is intended for use in
-  *  the operator+/-, etc.
-  ************************************************************/
-private:
-
-  Point3d p0; // = startPt
-  Point3d p1; // = stopPt
-  Vector V;   // = stopPt - startPt
-
-public:
-
-  /************************************************************
-   *   constructors
-   ************************************************************/
-
-  Line3d(const Point3d & p, const Vector &v);
-  // line initialized to pass through points p and p+v
-
-  Line3d(const Point3d &p, const Point3d &q);
-  //line is initialized to pass through points p and q directed from p to q
-
-  Line3d(const Line3d &l);
-  //copy constructor
-
-  //Line3d(const Segment3d & s): p0(s.startPt()), p1(s.stopPt()), V(s.direction()) {}
-  //construct from a segment
-
-  Line3d();
-  //horizontal line passes through the origin with direction 0.
-
-  virtual ~Line3d() {}
-  /************************************************************
-   *   MEMBERS
-   ************************************************************/
-
-  virtual int dim() const { return 1; }
-
-  Point3d startPt() const { return p0; }  
-  Point3d stopPt() const { return p1; }
-  const Vector direction() const { return V; }
-  
-  double distance(const Point3d& q) const;
-  // returns the Euclidean distance between this line and point q
-  
-  Point3d projection(const Point3d& p) const;
-  // returns the projection of p on this line
-
-  /************************************************************
-   *   PREDICATES
-   ************************************************************/
-
-  bool isProper() {return p0 == p1; }   
-  bool contains(const Point3d& p) const;
-
-  bool isCoincident(const Line3d& g) const;
-  bool isParallel(const Line3d& g) const;  // same slope
-  bool isSkew(const Line3d& l2) const;
-
-  bool operator==(const Line3d& g) const { return isCoincident(g); }
-  bool operator!=(const Line3d& g) { return !operator==(g); }
-
-  int intersects(const Line3d& g ) const;
-    // return the dimension of the intersection of g with this line:
-    // 	-1 if disjoint (i.e., parallel but distinct lines)
-    //  1  if coincident
-    //  0  if intersect in a point.  In this case, the
-    //		intersection point is assigned to p if this is available.
-
-  GeomObj* intersection(const Line3d &l) const;
-
-  /************************************************************
-   *   I/O 
-   ************************************************************/
-
-  friend std::istream& operator>>(std::istream& in, Line3d& l);
-  friend std::ostream& operator<<(std::ostream & out, const Line3d & l);
-
-}; //class Line3d
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/plane3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/plane3d.h
deleted file mode 100644
index 019f673..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/plane3d.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: plane3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _PLANE3D_H_
-#define _PLANE3D_H_
-
-#include <CGAL/CORE/geom3d/point3d.h>
-#include <CGAL/CORE/geom3d/line3d.h>
-
-class Segment3d;
-
-class Plane3d : public GeomObj{
-
-private:
-
-  // ax + by + cz + d = 0
-  double a; 
-  double b; 
-  double c; 
-  double d; 
-  Vector n;
-
-public:
-  /************************************************************
-   *   constructors
-   ************************************************************/
-
-  Plane3d(): a(0.0), b(0.0), c(0.0), d(0.0), n(0.0, 0.0, 0.0) {}
-  //trivial plane
-
-  Plane3d(const Plane3d & plane);
-  //copy constructor
-
-  Plane3d(const Point3d & p, const Vector &v);
-  // plane with direction v passes through point p 
-
-  Plane3d(const Point3d &p1, const Point3d &p2, const Point3d &p3);
-  //plane passes through points p1, p2, p3
-
-  Plane3d(const Point3d &p, const Line3d &l);
-  //plane passes through point p and line l
-
-  Plane3d(const Point3d &p, const Segment3d &s);
-  //plane passes through point p and segment s
-
-  Plane3d(const Vector &v1, double d1);
-  // plane determined by vector and displacement
-
-  // plane determined by equation
-  Plane3d(double a1, double b1, double c1, double d1);  
-  
-  virtual ~Plane3d() {}
-/************************************************************
-  *   member functions
- ************************************************************/
-
-  virtual int dim() const { return 2; }
-  
-  double* coeffients() const;
-  double A() const { return a; }
-  double B() const { return b; }
-  double C() const { return c; }
-  double displacement() const { return d; }
-  const Vector& normal() const { return n; }
-
-   // test if plane is trivial
-  bool isTrivial() const { return a==double(0) && b==double(0) && c==double(0); }
-
-   // apply equation of plane to a point
-  double apply( const Point3d& p ) const { return a*p.X()+b*p.Y()+c*p.Z()+d; }
-  
-   // plane against plane predicates
-  bool isCoincident(const Plane3d& pl) const;
-  bool isParallel(const Plane3d& pl) const; 
-   // test parallel
-  bool isParallel(const Line3d& l) const; 
-
-  bool contains( const Point3d& p ) const;
-  bool contains( const Line3d& l ) const;
-  bool contains( const Segment3d& s ) const;
-
-   // returns the projection of p on this line
-  Point3d projection(const Point3d& p) const;
-
-   /** be careful of line(segment) projection
-    *  It could be a line(segment) or point
-    *  The function returns degenerated line(segment) in point case
-    **/
-  Line3d projection(const Line3d& l) const;
-  Segment3d projection(const Segment3d& s) const;
-
-   //distance
-  double distance( const Point3d& p ) const;
-  double distance( const Line3d& l ) const;
-  double distance( const Segment3d& s ) const;
-
-   /** intersect predicates
-    * later implementation may return like this:
-    * return dimension of intersection 
-    * return -1 if not intersect 
-    * return 0 if intersect on a point ... and so on.
-    **/
-  int intersects( const Line3d& l ) const;
-  int intersects( const Point3d& p ) const;
-  int intersects( const Segment3d& s ) const;
-  int intersects( const Plane3d& pl ) const;
-
-   // return intersection 
-  GeomObj* intersection( const Line3d& l ) const;
-  GeomObj* intersection( const Segment3d& s ) const;
-  GeomObj* intersection( const Plane3d& pl ) const;
-
-  bool operator==(const Plane3d& pl) const { return isCoincident(pl); }
-  bool operator!=(const Plane3d& pl) { return !operator==(pl); }
-
-  friend std::istream& operator>>(std::istream& in, Plane3d& pl);
-  friend std::ostream& operator<<(std::ostream& out, const Plane3d& pl);
-
-}; //class Plane3d
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/point3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/point3d.h
deleted file mode 100644
index be9495c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/point3d.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: point3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _POINT3D_H
-#define _POINT3D_H
-
-#include <CGAL/CORE/CORE.h>
-#include <CGAL/CORE/linearAlgebra.h>
-#include <CGAL/CORE/geombase.h>
-
- // class defination for 3d points
-class Point3d : public GeomObj{
-
-private:
-  double x, y, z;
- 
-public:
- 
-  /************************************************************
-   * constructors and destructors
-   ************************************************************/
-  Point3d();  //initialized to origin(0,0,0)
-  Point3d(double x, double y, double z);
-  Point3d(const Point3d & p);
-  Point3d(const Vector& v);
-    //create a point initialized to the point $(v[0], v[1], v[2])$ 
-    //precondition: v.dim() >= 3 (only the first 3 components are used)
-
-  //destructor
-  virtual ~Point3d() {}
-
-  /************************************************************
-   * Methods
-   ************************************************************/
-  Point3d& operator=(const Point3d&);
-  
-  double X() const { return x; }
-  double Y() const { return y; } 
-  double Z() const { return z; } 
-
-  Vector toVector() const { return Vector(x, y, z); } 
-
-  virtual int dim() const { return 0; }
-
-  double distance(const Point3d& p) const;
-    // returns the Euclidean distance between p and this
-
-  double distance() const { return distance(Point3d(0, 0, 0)); }
-    // returns distance between this and origin
-
-  Point3d negate() const { return Point3d(-x, -y, -z); }
-  Vector operator-(const Point3d &p) const;
-  Point3d operator+(const Vector &v) const;
-  Point3d operator-(const Vector &v) const;
-  Point3d operator*(const double& d) const;
- 
- /************************************************************
-   * predicates
-   ************************************************************/
-
-  bool operator==(const Point3d&) const;
-  bool operator!=(const Point3d& p) const {return !operator==(p); }
-  
-  /************************************************************
-   * I/O, debugging
-   ************************************************************/
-  friend std::ostream& operator<< (std::ostream&, const Point3d&);
-    // write point p to output stream
-
-  friend std::istream& operator>>(std::istream&, Point3d&);
-    // reads the x and y coordinates of point p from the input stream
-
-  // routines to display point:
-  void dump() const {
-    std::cout << "(" << x <<", " << y << z << ")" ; // simply outputs "(x, y)"
-  }
-
-  void dump(const char* s) const {
-    std::cout << s << "(" << x <<", " << y << z << ")" ; // s is the prefix message
-  }
-
-  void dump(const char* s, const char* ss) const {
-    std::cout << s << "(" << x <<", " << y << z << ss ; // ss is the suffix message
-  }
-
-   // compute signed volume of a tetrahedron
-  friend double signed_volume(const Point3d& a, const Point3d& b, 
-                     const Point3d& c, const Point3d& d);
-
-};//class Point3d
-
-
-/************************************************************
- *	Inline implementation and some 3d predicates
- ************************************************************/
-// removed inline implementation for compile under visual c++
-// Zilin Du
-
-// midPt(p, q) returns (p+q)/2:
-Point3d midPt3d ( Point3d& a, Point3d& b);
-
-/* orientation3d(a, b, c, d) 
- *   computes the orientation of points a, b, c, d as the sign
- *   of the determinant
- *              | ax  ay  az 1 |
- *              | bx  by  bz 1 |
- *              | cx  cy  cz 1 |
- *              | dx  dy  dz 1 |
- *   i.e., it returns +1 if d lies in the opposite side w.r.t. the 
- *   counter-clockwise side of plane formed by a, b, c
- */
-int orientation3d(const Point3d& a, const Point3d& b, 
-                         const Point3d& c, const Point3d& d); 
-
-/* area(a, b, c) returns 1/2 times the determinant of orientation(a,b,c)
- * above.  This is the signed area of the triangle determined by a, b, c,
- * positive if orientation(a,b,c) > 0, and negative otherwise.  */
-
-double volume(const Point3d& a, const Point3d& b, 
-                     const Point3d& c, const Point3d& d);
-
-
-/* returns true if points a, b, c and d are coplanar, i.e.,
- * orientation(a, b, c, d) = 0, and false otherwise. 
- */
-bool coplanar(const Point3d& a, const Point3d& b, 
-                     const Point3d& c, const Point3d& d);
-
-/************************************************************
- *  CONSTANTS 
- ************************************************************/
-
-static Point3d ORIGIN_3D(0.0, 0.0, 0.0);
-static Point3d X_UNIT_3D(1.0, 0.0, 0.0);
-static Point3d Y_UNIT_3D(0.0, 1.0, 0.0);
-static Point3d Z_UNIT_3D(0.0, 0.0, 1.0);
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/polygon3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/polygon3d.h
deleted file mode 100644
index 530d427..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/polygon3d.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: polygon3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _POLYGON3D_H_
-#define _POLYGON3D_H_
-
-#include <CGAL/CORE/geom3d/point3d.h>
-#include <CGAL/CORE/geom3d/segment3d.h>
-#include <CGAL/CORE/geom3d/plane3d.h>
-#include <CGAL/CORE/geom3d/line3d.h>
-
-class Polygon3d : public GeomObj {
-
-private:
-  class PointNode {
-    public:
-      Point3d  *p;
-      PointNode *prev;
-      PointNode *next;
-
-      PointNode( const Point3d& _p ) { p = new Point3d(_p); prev=NULL; next=NULL; }
-      ~PointNode()  { delete p; }
-  };
-
-  PointNode* headN;       //head of linked list
-  int size;               //length of the list
-
-public:
-  class Iterator;
-  friend class Iterator;
-  class Iterator {
-    private:
-      PointNode* pointer;
-
-    public:
-      Iterator( PointNode* node ) { pointer = node; }
-
-      PointNode* getPointer() { return pointer; }
-      //bool hasNext() { return pointer->next != Polygon3d::headN; }
-      //Point3d* nextPoint() { pointer=pointer->next; return pointer->prev->p; }
-
-      Iterator& operator =(Iterator & it) { pointer=it.getPointer(); return *this; }
-
-       // postfix only
-      Iterator& operator ++(int) { pointer = pointer->next; return *this; }
-      Iterator& operator --(int) { pointer = pointer->prev; return *this; } 
-      Point3d* getPoint() { return pointer->p; }
-
-       // remove current node
-      void remove( )      { 
-          PointNode* temp = pointer;
-          pointer->next->prev = pointer->prev;
-          pointer->prev->next = pointer->next;
-          pointer = pointer->prev;
-          delete temp;
-      }
-
-  };
-
-   // default
-  Polygon3d();
-
-  // initialize given a triangle
-  // not included, use Polygon3d::toPolygon() instead
-  //Polygon3d(const Triangle3d& T);
-  
-
-
- //copy constructor
-  Polygon3d(const Polygon3d& plg);
-
-  virtual ~Polygon3d();
-
-  /************************************************************
-   *   member functions
-   ************************************************************/
-
-   // view a polygon as a surface
-  virtual int dim() const { return 2; }
-   
-  int getSize() const { return size; }
-
-  Iterator getIterator() { return Iterator(headN); }
-
-  bool searchPoint( const Point3d& p ) const;
-  Point3d* getPoint( int index ) const;
-   // append to the end of list
-  void addPoint( const Point3d& p );  
-
-   // remove point at given position
-  void removePoint( int index );
-   // return false if point doesn't exist
-  bool removePoint( const Point3d& p );
-  void removeAllPoints();
-  
-   // get next point of p
-   // return NULL if p doesn't exist
-  Point3d* nextPoint( const Point3d& p ) const;
-
-   // get previous point of p
-   // return NULL if p doesn't exist
-  Point3d* prevPoint( const Point3d& p ) const;
-
-   //operators
-  Point3d* operator []( int index ) const { return getPoint(index); }
-  Polygon3d& operator =(const Polygon3d& plg);
-
-   // test identity
-  bool operator ==(Polygon3d& plg) const;
-  bool operator !=(Polygon3d& plg) const  { return !(*this == plg); }
-
-   // verify if polygon is valid
-  bool verify();
-   
-   // test coplanarity 
-  bool isCoplanar( const Point3d& p ) const;
-  bool isCoplanar( const Segment3d& s )  const { 
-         return isCoplanar(s.startPt()) && isCoplanar(s.stopPt()); }
-  bool isCoplanar( const Line3d& l )     const { 
-         return isCoplanar(l.startPt()) && isCoplanar(l.stopPt()); }
-
-  bool isCoplanar( const Plane3d& pl ) const;
-
-   // test if p is on any edge
-  bool isOnEdge( const Point3d& p ) const;
- 
-protected:  
-  void freeMemory();      // delete the point list
-
-   // copy point list from other polygon
-   // make sure old list has been deleted before calling this
-  void copy( const Polygon3d& plg );
-
-  /************************************************************
-   *   I/O 
-   ************************************************************/
-
-  friend std::ostream& operator<<(std::ostream& in, const Polygon3d& plg);
-  
-}; //class Polygon3d
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/segment3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/segment3d.h
deleted file mode 100644
index 2f027a4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/segment3d.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: segment3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef _SEGMENT3D_H_
-#define _SEGMENT3D_H_
-
-#include <CGAL/CORE/geom3d/point3d.h>
-#include <CGAL/CORE/geom3d/line3d.h>
-
-/************************************************************
- *  Class Segment3d:
- *
- *  An instance s of Segment3d is a finite or infinite line segment
- *  in the three dimensional plane, defined by a start point
- *  s.startPt() and a stop point s.stopPt().  It can be regarded
- *  as an open or a closed segment (default: open), and directed
- *  or not (default: directed).
- *
- *  We do not necessarily assume that startPt() != stopPt().
- ************************************************************/
-
-#define S_TYPE_FINITE 0
-#define S_TYPE_RAY    1
-#define S_TYPE_LINE   2
-
-class Plane3d;
-
-class Segment3d : public GeomObj{
-
-private:
-
-  Point3d p0;
-  Point3d p1;
-  bool directed;     // segments can be directed or not (default is directed)
-  bool open;        // segments can be open or closed (default is open)
-  //int finite;     // 0=finite, 1=ray, 2=line (default is 0)
-
-public:
-
-  /************************************************************
-   *   constructors
-   ************************************************************/
-
-  Segment3d(const Segment3d &s);
-
-  Segment3d(const Point3d &p, const Point3d &q);
-  	//finite segment with endpoints p and q
-
-  Segment3d(const Point3d & p, const Vector & v);
-	//ray segment
-
-  Segment3d();
-  	//trivial segment from (0,0) to (0,0) 
-
-  virtual ~Segment3d() {}
-  /*************************************************************
-   *   member functions
-   *************************************************************/
-  
-  virtual int dim() const { return 1; }
-
-  Point3d startPt() const { return p0; }  
-  Point3d stopPt()  const { return p1; }
-  Vector direction() const { return p1 - p0; }
-
-  void reverse();
-  //  reverses the direction of the segment
-
-  void setDirected( bool beDirected ) { directed = beDirected; }
-  void setOpen(  bool beOpen ) { open = beOpen; }
-  
-  void setStartPt( Point3d& p ) { p0 = p; }
-  void setStopPt ( Point3d& p ) { p1 = p; }
-
-  double length() const { return p0.distance(p1); }
-    //length of segment
-    
-  Line3d toLine() const { return Line3d(p0,p1); }
- 
-  double distance( const Point3d& p ) const;
-  // returns the Euclidean distance between this segment and point q
-
-  Point3d nearPt( const Point3d& q ) const;
-   // returns the point on segment closest to q;
-
-  /*************************************************************
-   *   predicates
-   *************************************************************/
-
-  bool isDirected() const { return directed; }
-  bool isOpen() const {return open; }
-  bool isTrivial() const {return p0 == p1; }  
-  bool isCollinear( const Point3d& p ) const {return toLine().contains(p); }
-  bool contains( const Segment3d& s ) const { return contains(s.startPt()) && contains(s.stopPt()); }
-  bool isCoincident( const Segment3d& s) const;
-  
-  bool isCoplanar( const Line3d& s) const;
-  bool isCoplanar( const Segment3d& s) const;
-  
-  bool contains( const Point3d& p ) const;
-  
-  bool operator==( const Segment3d& s ) { return isCoincident( s ); }
-
-  bool operator!=( const Segment3d& s ) { return !operator==(s); }
-
-  /*************************************************************
-   *   intersection
-   *************************************************************/
-
-  int intersects( const Line3d& l ) const;
-  //decides whether *this and t intersect in one point
-  // return dim of intersetion
-  
-  int intersects( const Segment3d& s ) const;
-  //decides whether *this and t intersect in one point
-  // return dim of intersetion
-
-  GeomObj* intersection( const Line3d& l ) const;
-  // return intersection point if this segment and l intersect at a single point
-  // the intersection point is returned 
-  
-  GeomObj* intersection( const Segment3d& s ) const;
-  // return intersection point if this segment and s intersect at a single point
-  // the intersection point is returned 
- 
-  Plane3d bisect_plane() const;
-   // return bisector plane
-   
-  /*************************************************************
-   *   I/O
-   *************************************************************/
-
-  friend std::istream& operator>>(std::istream& in, Segment3d& l);
-  friend std::ostream& operator<<(std::ostream& out, const Segment3d& l);
-
-}; //class Segment3d
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/triangle3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/triangle3d.h
deleted file mode 100644
index c8b3d4c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geom3d/triangle3d.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/*****************************************************************
- * File: triangle3d.h
- * Synopsis:
- *      Basic 3-dimensional geometry
- * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
- *
- *****************************************************************
- * CORE Library Version 1.4 (July 2001)
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-
-#ifndef _TRIANGLE3D_H_
-#define _TRIANGLE3D_H_
-
-#include <CGAL/CORE/geom3d/point3d.h>
-#include <CGAL/CORE/geom3d/line3d.h>
-#include <CGAL/CORE/geom3d/segment3d.h>
-#include <CGAL/CORE/geom3d/plane3d.h>
-#include <CGAL/CORE/geom3d/polygon3d.h>
-
-class Triangle3d : public GeomObj{
-
-private:
-  
-  // three vertices
-  Point3d p0; 
-  Point3d p1; 
-  Point3d p2;
-
-public:
-
-  /************************************************************
-   *   constructors
-   ************************************************************/
-
-  Triangle3d(const Point3d& v1, const Point3d& v2, const Point3d& v3);
-  // given three vertices
-
-  Triangle3d(const Triangle3d& T);
-  // given a triangle
-
-  Triangle3d(): p0(ORIGIN_3D), p1(ORIGIN_3D), p2(ORIGIN_3D) {}
-  //trivial triangle
-
-  virtual ~Triangle3d() {}
-  /************************************************************
-   *   member functions
-   ************************************************************/
-
-   // view a triangle as a surface
-  virtual int dim() const { return 2; }
-   
-  Point3d V1() const { return p0; }
-  Point3d V2() const { return p1; }
-  Point3d V3() const { return p2; }
-  
-  Vector normal() const { return (p1 - p0).cross( p2 - p0); }
-  // return normal of the plane containing this triangle
-
-  Plane3d toPlane() const { return Plane3d(p0,p1,p2); }  
- 
-  Polygon3d* toPolygon() const;
-  /************************************************************
-   *   predicates
-   ************************************************************/
-   
-  inline bool isCoplanar( const Point3d& p ) const   { 
-                return orientation3d(p0, p1, p2, p) == 0; }
-  inline bool isCoplanar( const Segment3d& s ) const { 
-                return isCoplanar(s.startPt()) && isCoplanar(s.stopPt()); }
-  inline bool isCoplanar( const Line3d& l )   const  { 
-                return isCoplanar(l.startPt()) && isCoplanar(l.stopPt()); }
-  inline bool isCoplanar( const Triangle3d& T ) const {
-                return isCoplanar(T.V1()) && isCoplanar(T.V2()) && isCoplanar(T.V3()); }
-  inline bool isCoplanar( const Plane3d& pl )  const { 
-                return pl.contains(p0) && pl.contains(p1) && pl.contains(p2); }
-
-   // test if p is on triangle 
-  bool contains( const Point3d& p ) const;
-   // test if s is on triangle 
-  inline bool contains( const Segment3d& s ) const  {
-               return contains( s.startPt() ) && contains( s.stopPt() ); }
-
-  // test if T is on triangle 
-  inline bool contains( const Triangle3d& T ) const  {
-               return contains( T.V1() ) && contains( T.V2() ) && contains( T.V3() ); }
-
-
-  bool isOnEdge( const Point3d& p ) const;
-  // test if p is on the edge
-
-  bool inside( const Point3d& p ) const;
-  // test if p is inside the triangle
-  
-  /************************************************************
-   *  Intersection
-   ************************************************************/
-
-  /** all intersect predicates return the dimension of the intersection 
-    * -1 if disjoint (i.e., parallel but distinct lines)
-    * 0  if coincident
-    * 0  if intersect in a point.  In this case, the
-    *
-    // 	-1 if disjoint (i.e., parallel but distinct lines)
-    //  1  if coincident
-    //  0  if intersect in a point.  In this case, the
-    //		intersection point is assigned to p if this is available.
-  **/
-  
-   // intersect predicates
-  bool do_intersect( const Segment3d& s ) const;
-  bool do_intersect( const Line3d& l ) const;
-  bool do_intersect( const Plane3d& pl ) const;
-  bool do_intersect( const Triangle3d& t ) const;
-  
-   // these are consistent with other classes
-   // they return the dimension of the intersection
-   // return -1 if no intersection
-  int  intersects( const Segment3d& s ) const;
-  int  intersects( const Line3d& l ) const;
-  int  intersects( const Plane3d& pl ) const;
-  int  intersects( const Triangle3d& T ) const;
-
-   // general intersections
-  GeomObj* intersection( const Segment3d& s ) const;
-  GeomObj* intersection( const Line3d& l ) const;
-  GeomObj* intersection( const Plane3d& pl ) const;
-  GeomObj* intersection( const Triangle3d& t ) const;
-
-   // coplanar intersections
-  GeomObj* coplanar_intersection( const Segment3d& s ) const;
-  GeomObj* coplanar_intersection( const Line3d& l ) const;
-  GeomObj* coplanar_intersection( const Triangle3d& T ) const;
-
-  Polygon3d* in_half_plane( const Point3d& pa, 
-                           const Point3d& pb, 
-                           const Point3d& pSide,
-                           Polygon3d& plg ) const;
-
-  int coplanar_orientation( const Point3d& pa, const Point3d& pb, 
-                            const Point3d& ps, const Point3d& p ) const;
-  /************************************************************
-   *   I/O 
-   ************************************************************/
-
-  friend std::istream& operator>>(std::istream& in, Triangle3d& T);
-  friend std::ostream& operator<<(std::ostream & out, const Triangle3d & T);
-  
-}; //class Triangle3d
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geombase.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geombase.h
deleted file mode 100644
index 4273627..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geombase.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/******************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2002 Exact Computation Project
- * 
- * File: geombase.h
- * Synopsis:
- *      Code that is common to (and included by) geometry2d.h 
- *      and geometry3d.h
- *
- * Written by
- *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef CORE_GEOMETRY_H
-#define CORE_GEOMETRY_H
-
-#include <CGAL/CORE/CORE.h>
-
-
-//base class for geom2d and geom3d classes
-class GeomObj {
-
-public:
-
-  // Exceptions
-
-  class Exception {
-  	public:
-  	  virtual void print_message( char* msg ) { std::cerr << msg <<std::endl; }
-  };
-
-  class NoIntersection : public Exception { };
-
-  class IllegalOperation : public Exception { };
-
-  virtual int dim() const { return -1; }
-
-}; //class GeomObj
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry2d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry2d.h
deleted file mode 100644
index 4c71891..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry2d.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/******************************************************************
- * Core Library Version 1.5, August 2002
- * Copyright (c) 1995-2002 Exact Computation Project
- * 
- * File: geometry2d.h
- * Synopsis:
- *      Basic 2-dimensional geometry
- *
- * Written by
- *      Yaping Yuan (yqy0522 at cs.nyu.edu), 1999.
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef CORE_GEOMETRY2D_H
-#define CORE_GEOMETRY2D_H
-
-#ifndef CORE_LEVEL
-#  define CORE_LEVEL 3
-#endif
-
-#include <CGAL/CORE/geom2d/point2d.h>
-#include "CGAL/CORE/geom2d/line2d.h"
-#include "CGAL/CORE/geom2d/circle2d.h"
-#include "CGAL/CORE/geom2d/segment2d.h"
-
-// automaticall link necessary static library under visual c++
-#ifdef _MSC_VER
-	#if CORE_LEVEL == 1
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level1.lib")
-		#else
-			#pragma comment(lib, "corex_level1.lib")
-		#endif
-	#elif CORE_LEVEL == 2
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level2.lib")
-		#else
-			#pragma comment(lib, "corex_level2.lib")
-		#endif
-	#elif CORE_LEVEL == 3
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level3.lib")
-		#else
-			#pragma comment(lib, "corex_level3.lib")
-		#endif
-	#endif
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry3d.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry3d.h
deleted file mode 100644
index f7fba65..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/geometry3d.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/******************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2002 Exact Computation Project
- * 
- * File: geometry3d.h
- *
- * Written by
- *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef CORE_GEOMETRY3D_H
-#define CORE_GEOMETRY3D_H
-
-#ifndef CORE_LEVEL
-#  define CORE_LEVEL 3
-#endif
-
-#include <CGAL/CORE/linearAlgebra.h>
-
-class Point3d;
-class Line3d;
-class Segment3d;
-class Plane3d;
-class Triangle3d;
-class Polygon3d;
-
-#include <CGAL/CORE/geom3d/point3d.h>
-#include <CGAL/CORE/geom3d/line3d.h>
-#include <CGAL/CORE/geom3d/segment3d.h>
-#include <CGAL/CORE/geom3d/plane3d.h>
-#include <CGAL/CORE/geom3d/triangle3d.h>
-#include <CGAL/CORE/geom3d/polygon3d.h>
-
-// automaticall link necessary static library under visual c++
-#ifdef _MSC_VER
-	#if CORE_LEVEL == 1
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level1.lib")
-		#else
-			#pragma comment(lib, "corex_level1.lib")
-		#endif
-	#elif CORE_LEVEL == 2
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level2.lib")
-		#else
-			#pragma comment(lib, "corex_level2.lib")
-		#endif
-	#elif CORE_LEVEL == 3
-		#ifdef _DEBUG
-			#pragma comment(lib, "corexDebug_level3.lib")
-		#else
-			#pragma comment(lib, "corex_level3.lib")
-		#endif
-	#endif
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/linearAlgebra.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/linearAlgebra.h
deleted file mode 100644
index d4dfb89..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/linearAlgebra.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004                                     
- * Copyright (c) 1995-2004 Exact Computation Project                         
- * All rights reserved.                                                      
- *                                                                           
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).                
- * You can redistribute it and/or modify it under the terms of the GNU       
- * General Public License as published by the Free Software Foundation,      
- * either version 3 of the License, or (at your option) any later version.   
- *                                                                           
- * Licensees holding a valid commercial license may use this file in         
- * accordance with the commercial license agreement provided with the        
- * software.                                                                 
- *                                                                           
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
- *                                                                           
- *                                                                           
- * $URL$                                                                     
- * $Id$                                                                      
- ***************************************************************************/
-/******************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2002 Exact Computation Project
- * 
- * File: LinearAlgebra.h
- * Synopsis:
- *      Linear Algebra Extension of Core Library introducing
- *              class Vector
- *              class Matrix
- *
- * Written by
- *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $Id$
- *****************************************************************/
-
-#ifndef CORE_LINEAR_ALGEBRA_H
-#define CORE_LINEAR_ALGEBRA_H
-
-#ifndef CORE_LEVEL
-#  define CORE_LEVEL 3
-#endif
-
-#include <cstdarg>
-#include <CGAL/CORE/CORE.h>
-
-class Vector;
-class Matrix;
-
-////////////////////////////////////////////////////////////////////////
-//  Class Vector
-//     Generic vectors
-//     Operations implemented:  addition, subtraction, dot product
-////////////////////////////////////////////////////////////////////////
-
-class Vector {
-private:
-   int     dim;
-   double* _rep;
-public:
-   class RangeException { };
-   class ArithmeticException { };
-
-   explicit Vector(int);
-   Vector();
-   Vector(double, double);
-   Vector(double, double, double);
-   Vector(const Vector&);
-   Vector(int, double *);
-   ~Vector();
-
-   const Vector& operator=(const Vector&);
-
-   bool operator==(const Vector&);
-   bool operator!=(const Vector&);
-   const Vector& operator+=(const Vector&);
-   const Vector& operator-=(const Vector&);
-   const Vector& operator*=(double);
-
-   const double& operator[](int) const;
-   double& operator[](int);
-
-   double norm() const;
-   double maxnorm() const;
-   double infnorm() const;
-   double dimension() const {return dim;}
-   bool isZero() const;
-   Vector cross(const Vector &v) const; 
-   static Vector crossProduct(int, ...);
-
-   friend Vector operator+(const Vector&, const Vector&);
-   friend Vector operator-(const Vector&, const Vector&);
-   friend Vector operator-(const Vector&);
-   friend Vector operator*(const Vector&, double);
-   friend Vector operator*(double, const Vector&);
-   friend Vector operator*(const Matrix&, const Vector&);
-   friend Vector operator*(const Vector&, const Matrix&);
-   friend double dotProduct(const Vector&, const Vector&);
-
-   friend std::istream& operator>>(std::istream&, Vector&);
-   friend std::ostream& operator<<(std::ostream&, const Vector&);
-};
-
-////////////////////////////////////////////////////////////////////////
-//  Class Matrix
-//     Generic matrices
-//     Operations implemented:  addition, subtraction, multiplication
-////////////////////////////////////////////////////////////////////////
-
-class Matrix {
-private:
-   int dim1, dim2;
-   double* _rep;
-
-public:
-   class RangeException { };
-   class ArithmeticException { };
-
-   explicit Matrix(int);
-   Matrix(int, int);
-   Matrix(int, int, double *);
-   Matrix(double, double,
-          double, double);
-   Matrix(double, double, double,
-          double, double, double,
-          double, double, double);
-   Matrix(const Matrix&);
-   ~Matrix();
-
-   Matrix& operator=(const Matrix&);
-
-   bool operator==(const Matrix&);
-   bool operator!=(const Matrix&);
-
-   const Matrix& operator+=(const Matrix&);
-   const Matrix& operator-=(const Matrix&);
-   const Matrix& operator*=(double);
-
-   const double& operator()(int, int) const;
-   double& operator()(int, int);
-
-   // added by chen li
-   //   const Vector& row(int i) const;
-   //   const Vector& col(int i) const;
-   Matrix matrixAlgebraRemainder(int, int) const;
-   double valueAlgebraRemainder(int, int) const;
-   const Matrix& transpose();
-
-   double determinant() const;
-
-   int dimension_1() const { return dim1; }
-   int dimension_2() const { return dim2; }
-
-   friend Matrix operator+(const Matrix&, const Matrix&);
-   friend Matrix operator-(const Matrix&, const Matrix&);
-   friend Matrix operator*(const Matrix&, double);
-   friend Matrix operator*(double, const Matrix&);
-   friend Vector operator*(const Vector&, const Matrix&);
-   friend Vector operator*(const Matrix&, const Vector&);
-   friend Matrix operator*(const Matrix&, const Matrix&);
-   friend Matrix transpose(const Matrix&);
-
-   friend double det(const double a, const double b,
-                const double c, const double d);
-   friend double det(const Vector u, const Vector & v);  // u,v are 2d vectors
-   
-   friend std::istream& operator>>(std::istream&, Matrix&);
-   friend std::ostream& operator<<(std::ostream&, const Matrix&);
-
-}; //Matrix
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.h
deleted file mode 100644
index 5a00c62..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.h
+++ /dev/null
@@ -1,527 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Curves.h
- *
- * Description: 
- * 	Two templated classes are defined here:
- *		Curve and BiPoly
- *	These classes are parametrized by the number type
- *		(called NT) which represents the
- *		domain of the coefficients of the underlying
- *		polynomials.  Standard default is NT=BigInt, but
- *		we will allow NT=int, NT=BigRat, NT=BigFloat, NT=Expr.
- *	BiPoly represents the class of bivariate polynomials,
- *		i.e.,  each BiPoly object is an element of NT[X,Y].
- *		We store each BiPoly as a list of polynomials in X.
- *	Curve represents the class of plane curves whose equation
- *		is A(X,Y)=0, for some BiPoly A(X,Y).
- *	Features:
- *		--Constructor from strings such as
- *			"3 x^2 + 7 xy^2 - 4 x + 13".
- *		--Basic plot functions
- *
- *	To Do:
- *	  --Dump should produce human readable strings like
- *	  	"3 x^2 + 7 xy^2 - 4 x + 13".
- *	  --String constructor generalizations:
- *	  	(1) allow one "=" sign (e.g., "3 x^2 = y^2 - xy")(DONE)
- *		(2) allow general parenthesis
- *		(3) allow X and Y (DONE)
- *	  --We should be able to read/write
- *	  	curve definitions from/to files
- *	  --Plot should be more efficient (use previous roots
- *	  	to help find the next roots, there should be
- *	  	a "plot structure" that is persistent)
- *	  --Plot should refine in both x- and y-increments.
- *	  --Plot should have some option to show the
- *	  	x- and y-axes, and to label some points.
- *	  --verticalIntersect(...) should be implemented using
- *	        Polynomial<BigFloat>, not Polynomial<Expr> for efficiency
- *	  --the plot parameters (eps,xmin,xmax,ymin,ymax) must be
- *	        made part of the Curve class (static members).
- *	        Incorporate the "setParams" method into class.
- *
- *  Author:  Vikram Sharma and Chee Yap
- *  Date:    April 12, 2004
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-
-#ifndef CORE_CURVES_H
-#define CORE_CURVES_H
-
-#include <fstream>
-#include <list>
-#include "CGAL/CORE/poly/Poly.h"
-
-namespace CORE { 
-
-// ==================================================
-// Curve Class
-// ==================================================
-
-//typedef BigInt NT;
-//typedef Expr   NT;
-//typedef Polynomial<NT>        PolyNT;
-//typedef std::vector<Expr>	VecExpr;
-//typedef std::vector<BigInt>	VecBigInt;
-//typedef std::vector<NT>       VecNT;
-//typedef std::vector<Polynomial<NT> >	VecPoly;
-
-template <class NT>
-class Monomial{
-  //Helper class to store the coefficients for given x-deg and y-deg 
-  //Used by string input routines
- public:
-  NT coeff;
-  int xdeg;
-  int ydeg;
-
-  Monomial(){
-  }
-
-  Monomial(NT& cf, int& dx, int& dy){
-    coeff = cf;
-    xdeg = dx;
-    ydeg = dy;
-  }
-
-  void dump(){
-    std::cout << coeff << "X^" << xdeg << " Y^" << ydeg;
-  }
-};
-
-
-//Class of Bivariate polynomials
-//	Viewed as a polynomial in Y with
-//	coefficients which are polynomials in X
-template <class NT>
-class BiPoly{
- private:
-  //The following are used in the constructor from strings.
-  //For more details see the related constructor.
-  void constructFromString(string& s, char myX='x', char myY='y');
-  void constructX(int n, BiPoly<NT>& P);
-  void constructY(int n, BiPoly<NT>& P);
-  int getnumber(const char* c, int i, unsigned int len, BiPoly<NT> & P);
-  bool isint(char c);
-  int getint(const char* c, int i, unsigned int len, int & n);
-  int matchparen(const char* cstr, int start);
-  int getbasicterm(string s, BiPoly<NT> & P);
-  int getterm(string s, BiPoly<NT> & P);
-
- public:
-  int ydeg; //Y-degree of the polynomial
-  std::vector<Polynomial<NT> > coeffX; //vector of (1+ydeg) polynomials in X
-	// If ydeg = d, then the polynomial is F(X,Y) =
-        //   (Y^d * coeffX[d]) + (Y^{d-1} * coeffX[d-1]) +...+ (coeffX[0]).
-
-  ////////////////////////////////////////////////////////
-  //Constructors
-  ////////////////////////////////////////////////////////
-
-  //BiPoly()
-  BiPoly(); // zero polynomial
-
-  //BiPoly(n)
-  BiPoly(int n);// creates a BiPoly with nominal y-degree equal to n.
-
-  //BiPoly(vp)
-  BiPoly(std::vector<Polynomial<NT> > vp); // From vector of Polynomials
-
-  //BiPoly(p, flag):
-  //	if true, it converts polynomial p(X) into P(Y)
-  // 	if false, it creates the polynomial Y-p(X)
-  BiPoly(Polynomial<NT> p, bool flag=false);
-  
-  //BiPoly(deg, d[], C[]):
-  //	Takes in a list of list of coefficients.
-  //	Each cofficient list represents a polynomial in X
-  //
-  //  deg - ydeg of the bipoly
-  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
-  //  C[] - list of coefficients, we use array d to select the
-  //      coefficients
-  BiPoly(int deg, int *d, NT *C);
-
-  //BiPoly(String s, char myX, char myY)
-  //  myX and myY are names of the two variables.
-  //  Default values of myX and myY are 'x' and 'y'.
-  //  The string s has the form "3 x^2 + 7 xy^2 - 4 x + 13"
-  //
-  //  For now, we assume no parentheses, * or =.
-  
-  BiPoly(const string& s, char myX='x', char myY='y');
-  BiPoly(const char* s, char myX='x', char myY='y');
-
-  // copy constructor
-  BiPoly(const BiPoly<NT>&);
-
-  //Destructor
-  ~BiPoly();
-  //Destructor helper
-  void deleteCoeffX();
-
-
-  ////////////////////////////////////////////////////////
-  // METHODS
-  ////////////////////////////////////////////////////////
-  
-  // filedump (msg, ofs, com, com2)
-  // 	where msg, com, com2 are strings.
-  // 	msg is an message and com, com2 are the strings
-  // 	preceding each output line
-  // 	(e.g., msg="BiVariate Polynomial"  and com=com2="# ")
-  // This is called by the other dump functions
-  void dump(std::ostream & os, std::string msg = "",
-      std::string com="# ", std::string com2 = "# ") const;
-  // dump(ofs, msg, com) -- dump to file
-  //void dump(std::ofstream & ofs, std::string msg,
-  //    std::string com="# ", std::string com2="# ") const;
-
-  // dump(msg, com) -- dump to std output
-  void dump(std::string msg="", std::string com="",
-      std::string com2="") const;
-
-  /*Cannot work with these two functions right now.
-    BiPoly as per now can only handle BigInt and int since
-    Expr cannot be handled by Polynomial class.*/
-  
-  // yPolynomial(x) 
-  //   returns the polynomial (in Y) when we substitute X=x
-  
-  /* BiPoly<NT> yPolynomial(const Expr & x) {
-
-    VecExpr vE;
-
-    for (int i=0; i<= ydeg; i++) {
-      vE.push_back(coeffX[i].eval(x));
-    }
-    
-    return BiPoly<NT>(vE);
-  }//yPolynomial
-  */
-
-  Polynomial<NT> yPolynomial(const NT & x);
-
-  // Expr version of yPoly (temporary hack)
-  Polynomial<Expr> yExprPolynomial(const Expr & x);
-
-  // BF version of yPoly (temporary hack)
-  Polynomial<BigFloat> yBFPolynomial(const BigFloat & x);
-
-  // xPolynomial(y) 
-  //   returns the polynomial (in X) when we substitute Y=y
-  //   
-  //   N.B. May need the
-  //   		Polynomial<Expr> xExprPolynomial(Expr y)
-  //   version too...
-  //
-  Polynomial<NT> xPolynomial(const NT & y) ;
-  
-  // getYdegree()
-  int getYdegree() const;
-  
-  // getXdegree()
-  int getXdegree();
-
-  // getTrueYdegree
-  int getTrueYdegree();
-
-  //eval(x,y)
-  Expr eval(Expr x, Expr y);//Evaluate the polynomial at (x,y)
-
-  ////////////////////////////////////////////////////////
-  // Polynomial arithmetic (these are all self-modifying)
-  ////////////////////////////////////////////////////////
-  
-  // Expands the nominal y-degree to n;
-  //	Returns n if nominal y-degree is changed to n
-  //	Else returns -2
-
-  int expand(int n);
-
-  // contract() gets rid of leading zero polynomials
-  //	and returns the new (true) y-degree;
-  //	It returns -2 if this is a no-op
-
-  int contract();
-
-  // Self-assignment
-  BiPoly<NT> & operator=( const BiPoly<NT>& P);
-
-  // Self-addition
-  BiPoly<NT> & operator+=( BiPoly<NT>& P);
-   
-  // Self-subtraction
-  BiPoly<NT> & operator-=( BiPoly<NT>& P);
-
-  // Self-multiplication
-  BiPoly<NT> & operator*=( BiPoly<NT>& P);
-  
-  // Multiply by a polynomial in X
-  BiPoly<NT> & mulXpoly( Polynomial<NT> & p);
-
-  //Multiply by a constant
-  BiPoly<NT> & mulScalar( NT & c);
-
-  // mulYpower: Multiply by Y^i (COULD be a divide if i<0)
-  BiPoly<NT> & mulYpower(int s);
-  
-  // Divide by a polynomial in X.
-  // We replace the coeffX[i] by the pseudoQuotient(coeffX[i], P)
-  BiPoly<NT> & divXpoly( Polynomial<NT> & p);
-  
-  //Using the standard definition of pseudRemainder operation.
-  //	--No optimization!
-  BiPoly<NT>  pseudoRemainderY (BiPoly<NT> & Q);
-
-  //Partial Differentiation
-  //Partial Differentiation wrt Y
-  BiPoly<NT> & differentiateY();
-
-  BiPoly<NT> & differentiateX();
-  BiPoly<NT> & differentiateXY(int m, int n);//m times wrt X and n times wrt Y
-
-  //Represents the bivariate polynomial in (R[X])[Y] as a member
-  //of (R[Y])[X].
-  //But since our polynomials in X can only have NT coeff's thus
-  // to represent the above polynomial we switch X and Y once
-  // the conversion has been done.
-  //NOTE: This is different from replacing X by Y which was
-  //      done in the case of the constructor from a polynomial in X
-  //Need to calculate resultant wrt X.
-  BiPoly<NT> & convertXpoly();
-
-  //Set Coeffecient to the polynomial passed as a parameter
-  bool setCoeff(int i, Polynomial<NT> p);
-
-  void reverse();
-  Polynomial<NT> replaceYwithX();
-
-  //Binary-power operator
-  BiPoly<NT>& pow(unsigned int n);
-
-  //Returns a Bipoly corresponding to s, which is supposed to
-  //contain as place-holders the chars 'x' and 'y'.
-  BiPoly<NT> getbipoly(string s);
-};//BiPoly Class
-
-  ////////////////////////////////////////////////////////
-  // Helper Functions
-  ////////////////////////////////////////////////////////
-//Experimental version of constructor from strings containing general 
-//parentheses
-
-
-// zeroPinY(P)
-//	checks whether a Bi-polynomial is a zero Polynomial
-template <class NT>
-bool zeroPinY(BiPoly<NT> & P);
-
-// gcd(P,Q)
-//   This gcd is based upon the subresultant PRS to avoid
-//   exponential coeffecient growth and gcd computations, both of which 
-//   are expensive since the coefficients are polynomials
-
-template <class NT>
-BiPoly<NT> gcd( BiPoly<NT>& P ,BiPoly<NT>& Q);
-
-// resY(P,Q):
-//      Resultant of Bi-Polys P and Q w.r.t. Y.
-//      So the resultant is a polynomial in X
-template <class NT>
-Polynomial<NT>  resY( BiPoly<NT>& P ,BiPoly<NT>& Q);
-
-// resX(P,Q):
-//      Resultant of Bi-Polys P and Q w.r.t. X.
-//      So the resultant is a polynomial in Y
-//	We first convert P, Q to polynomials in X. Then 
-// 	call resY and then turn it back into a polynomial in Y
-//	QUESTION: is this last switch really necessary???
-template <class NT>
-BiPoly<NT>  resX( BiPoly<NT>& P ,BiPoly<NT>& Q);
-
-//Equality operator for BiPoly
-template <class NT>
-bool operator==(const BiPoly<NT>& P, const BiPoly<NT>& Q);
-
-//Addition operator for BiPoly
-template <class NT>
- BiPoly<NT> operator+(const BiPoly<NT>& P, const BiPoly<NT>& Q);
-
-//Subtraction operator for BiPoly
-template <class NT>
- BiPoly<NT> operator-(const BiPoly<NT>& P, const BiPoly<NT>& Q);
-
-//Multiplication operator for BiPoly
-template <class NT>
- BiPoly<NT> operator*(const BiPoly<NT>& P, const BiPoly<NT>& Q);
-
-
-  ////////////////////////////////////////////////////////
-  //Curve Class
-  //  	extends BiPoly Class
-  ////////////////////////////////////////////////////////
-
-template < class NT >
-class Curve : public BiPoly<NT> {
-public:
-  // Colors for plotting curves
-
-  static const int NumColors=7;
-  static double red_comp(int i){
-  	static double RED_COMP[] = {0.9, 0.8, 0.7, 0.6, 0.8, 0.8, 0.7};
-	return RED_COMP[i % NumColors];
-  }
-  static double green_comp(int i){
-  	static double GREEN_COMP[] = {0.5, 0.9, 0.3, 0.9, 0.7, 0.55, 0.95};
-	return GREEN_COMP[i % NumColors];
-  }
-  static double blue_comp(int i){
-  	static double BLUE_COMP[] = {0.8, 0.3, 0.8, 0.5, 0.4, 0.85, 0.35};
-	return BLUE_COMP[i % NumColors];
-  }
-
-  Curve(); // zero polynomial
-  
-  //Curve(vp):
-  //    construct from a vector of polynomials
-  Curve(std::vector<Polynomial<NT> > vp);
-  //	  : BiPoly<NT>(vp){
-  //}
-  
-  //Curve(p):
-  //	Converts a polynomial p(X) to a BiPoly in one of two ways:
-  // 	    (1) if flag is false, the result is Y-p(X) 
-  // 	    (2) if flag is true, the result is p(Y) 
-  //    The default is (1) because we usually want to plot the
-  //        graph of the polynomial p(X)
-  Curve(Polynomial<NT> p, bool flag=false);
-  //	  : BiPoly<NT>(p, flag){
-  //}
-
-  //Curve(deg, d[], C[]):
-  //	Takes in a list of list of coefficients.
-  //	Each cofficient list represents a polynomial in X
-  //
-  //  deg - ydeg of the bipoly
-  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
-  //  C[] - list of coefficients, we use array d to select the
-  //      coefficients
-  Curve(int deg, int *d, NT *C);
-  //	  : BiPoly<NT>(deg, d, C){
-  //}
-
-  Curve(const BiPoly<NT> &P);
-  //	  : BiPoly<NT>(P){
-  //}
-
-  //Curve(n) -- the nominal y-degree is n
-  Curve(int n);
-
-  //Creates a curve from a string (no parentheses, no *, no =)
-  Curve(const string & s, char myX='x', char myY='y');
-  Curve(const char* s, char myX='x', char myY='y');
-
-  /////////////////////////////////////////////////////////////////////////
-  // verticalIntersections(x, vecI, aprec=0):
-  //    The list vecI is passed an isolating intervals for y's such that (x,y)
-  //    lies on the curve.
-  //    If aprec is non-zero (!), the intervals have with < 2^{-aprec}.
-  //    Return is -2 if curve equation does not depend on Y
-  //    	-1 if infinitely roots at x,
-  //    	0 if no roots at x
-  //    	1 otherwise
-
-  int verticalIntersections(const BigFloat & x, BFVecInterval & vI,
-			    int aprec=0);
-  
-  // TO DO: 
-  // 		horizontalIntersections(...)
-  
-  /////////////////////////////////////////////////////////////////////////
-  // plot(eps, x1, y1, x2, y2)
-  //
-  // 	All parameters have defaults
-  //
-  //    Gives the points on the curve at resolution "eps".  Currently,
-  //    eps is viewed as delta-x step size (but it could change).
-  //    The display is done in the rectangale 
-  //    defined by [(x1, y1), (x2, y2)].
-  //    The output is written into a file in the format specified
-  //    by our drawcurve function (see COREPATH/ext/graphics).
-  //
-  //    Heuristic: the open polygonal lines end when number of roots
-  //    changes...
-  //
-  int  plot( BigFloat eps=0.1, BigFloat x1=-1.0,
-	     BigFloat y1=-1.0, BigFloat x2=1.0, BigFloat y2=1.0, int fileNo=1);
-
-// selfIntersections():
-//   this should be another member function that lists
-//   all the self-intersections of a curve
-//
-//  template <class NT>
-//  void selfIntersections(BFVecInterval &vI){
-//  ...
-//  }
-
-};// Curve class
-
-
-  ////////////////////////////////////////////////////////
-  // Curve helper functions
-  ////////////////////////////////////////////////////////
-
-
-//Xintersections(C, D, vI):
-//  returns the list vI of x-ccordinates of possible intersection points.
-//  Assumes that C & D are quasi-monic.(or generally aligned)
-template <class NT>
-void  Xintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI);
-
-//Yintersections(C, D, vI):
-//	similar to Xintersections
-template <class NT>
-void  Yintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI);
-
-// Display Intervals
-template <class NT>
-void showIntervals(char* s, BFVecInterval &vI);
-
-// Set Display Parameters
-// ...
-
-////////////////////////////////////////////////////////
-// IMPLEMENTATIONS ARE FOUND IN Curves.tcc
-////////////////////////////////////////////////////////
-#include <CGAL/CORE/poly/Curves.tcc>
-
-
-} //namespace CORE
-#endif
-/*************************************************************************** */
-// END
-/*************************************************************************** */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.tcc b/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.tcc
deleted file mode 100644
index c458c9f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Curves.tcc
+++ /dev/null
@@ -1,1429 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- *  File: Curves.tcc
- *
- *  Description: 
- *  	This file contains the implementations of
- *		functions defined by Curves.h
- *	It is included through Curves.h
- *  	Please see Curves.h for more details.
- *
- *  Author:  Vikram Sharma and Chee Yap
- *  Date:    April 12, 2004
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-
-//CONSTRUCTORS FOR THE BIPOLY CLASS
-  ////////////////////////////////////////////////////////
-  //Constructors
-  ////////////////////////////////////////////////////////
-
-template <class NT>
-BiPoly<NT>::BiPoly(){ // zero polynomial
-    ydeg = -1;
-  }
-  
-  //BiPoly(n)
-
-template <class NT>
-BiPoly<NT>::BiPoly(int n){// creates a BiPoly with nominal y-degree equal to n.
-
-     // To support this constructor, you need functions
-     // that are equivalent to "setCoeff(i, PolyNT q)" in the Poly Class
-     // You also want "getCoeff(i)" functions.
-     // E.g. BiPoly<NT> p(10);
-     //      PolyNT q(3, {1,2,3,4});
-     //      p.setCoeff(10, q);
-     //      p.setCoeff(0, PolyNT());
-     //
-    ydeg = n;
-    if (n<0) return; // coeffX not needed
-    for(int i=0; i<= ydeg; i++){
-      Polynomial<NT> temp;
-      coeffX.push_back(temp);      
-    }
-  }
-
-  //BiPoly(vp)
-template <class NT>
-BiPoly<NT>::BiPoly(std::vector<Polynomial<NT> > vp){ 
-    // From vector of Polynomials
-    ydeg = vp.size() - 1;
-    if(ydeg >=0){
-      coeffX = vp;
-    }
-  }
-  
-  //BiPoly(p, flag):
-  //	if true, it converts polynomial p(X) into P(Y)
-  // 	if false, it creates the polynomial Y-p(X)
-
-template <class NT>
-BiPoly<NT>::BiPoly(Polynomial<NT> p, bool flag){
-    if (flag){
-      ydeg = p.getTrueDegree();
-      if(ydeg >=0){
-        for(int i=0; i<=ydeg; i++){
-	  Polynomial<NT> temp(0);
-	  temp.setCoeff(0, p.getCoeffi(i));
-	  coeffX.push_back(temp);	// does STL make a copy of temp?
-        }//for
-      }//if
-    } else {
-      ydeg = 1;
-      coeffX.push_back(p);
-      coeffX.push_back(Polynomial<NT>::polyUnity());
-    }//else
-  }//BiPoly(p)
-
-
-  //BiPoly(deg, d[], C[]):
-  //	Takes in a list of list of coefficients.
-  //	Each cofficient list represents a polynomial in X
-  //
-  //  deg - ydeg of the bipoly
-  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
-  //  C[] - list of coefficients, we use array d to select the
-  //      coefficients
-
-template <class NT>
-BiPoly<NT>::BiPoly(int deg, int *d, NT *C){
-
-    ydeg = deg;
-    Polynomial<NT> temp;
-    int max=0;
-    for(int i=0; i <=deg; i++)
-      max = core_max(d[i],max);
-
-    NT *c = new NT[max];
-
-    for(int i=0; i<= deg; i++){
-      for(int j=0; j <=d[i]; j++)
-	c[j] = C[i+j];
-      temp = Polynomial<NT>(d[i],c);
-      coeffX.push_back(temp);      
-    }
-    delete[] c;
-  }//BiPoly(deg,d[],C[])
-
-
-//The BNF syntax is the following:-
-//    [bipoly] -> [term]| [term] +/- [bipoly]
-//    [term] -> [basic term]|[basic term] [term]|[basic term]*[term]
-//    [basic term] -> [number]|'x'|'y'|[basic term]'^'[number]
-//                    | '(' [bipoly]')'|'-'
-//Unary minus is treated as a basic term
-template <class NT>
-BiPoly<NT>::BiPoly(const char * s, char myX, char myY){
-	string ss(s);
-	constructFromString(ss, myX, myY);
-}
-template <class NT>
-BiPoly<NT>::BiPoly(const string & s, char myX, char myY){
-	string ss(s);
-	constructFromString(ss, myX, myY);
-}
-template <class NT>
-void BiPoly<NT>::constructFromString(string & s, char myX, char myY){
-  if((myX != 'x' || myX != 'X') && (myY != 'y' || myY != 'Y')){
-    //Replace myX with 'x' and myY with 'y' in s.
-    unsigned int loc = s.find(myX, 0);
-    while(loc != string::npos){
-      s.replace(loc,1,1,'x');
-      loc = s.find(myX, loc+1);
-    }
-    loc = s.find(myY, 0);
-    while(loc != string::npos){
-      s.replace(loc,1,1,'y');
-      loc = s.find(myY, loc+1);
-    }
-  }
-  (*this) =  (*this).getbipoly(s);
-
-}
-
-//Constructor from another BiPoly
-template <class NT>
-BiPoly<NT>::BiPoly(const BiPoly<NT> &P) : ydeg(P.ydeg), coeffX(P.coeffX) {
-}
-
-  //Destructor
-template <class NT>
-void BiPoly<NT>::deleteCoeffX(){
-  coeffX.clear();
-}
-
-template <class NT>
-BiPoly<NT>::~BiPoly(){
-  if (ydeg >= 0)
-    deleteCoeffX();
-}
-
-
-
-
-  ////////////////////////////////////////////////////////
-  // METHODS USED BY STRING CONSTRUCTOR ABOVE
-  ////////////////////////////////////////////////////////
-
-
-//Sets the input BiPoly to X^n
-template <class NT>
-void BiPoly<NT>::constructX(int n, BiPoly<NT>& P){
-  assert(n>= -1);
-  P.deleteCoeffX();//Clear the present coeffecients
-  Polynomial<NT> q(n);//Nominal degree n
-  q.setCoeff(n,NT(1)); 
-  if (n>0) q.setCoeff(0,NT(0));
-  P.coeffX.push_back(q);
-  P.ydeg = 0;
-}
-
-//Sets the input BiPoly to Y^n
-template <class NT>
-void BiPoly<NT>::constructY(int n, BiPoly<NT>& P){
-  P.ydeg = 0;
-  P.deleteCoeffX();//Clear the present coeffecients
-  NT cs[] = {1};
-  Polynomial<NT> q(0, cs);
-  P.coeffX.push_back(q);//P is the unit bipoly. Now we just multiply Y^n
-  P.mulYpower(n);
-}
-
-//Returns in P the coeffecient starting from start
-template <class NT>
-int BiPoly<NT>::getnumber(const char* c, int start, unsigned int len,
-			  BiPoly<NT> & P){
-  int j=0;
-  char *temp = new char[len];
-  while(isint(c[j+start])){
-    temp[j]=c[j+start];j++;
-  }
-  temp[j] = '\0';
-  NT cf = NT(temp);
-  P.deleteCoeffX();
-  Polynomial<NT> q(0);
-  q.setCoeff(0, cf);
-  P.coeffX.push_back(q);
-  P.ydeg = 0;
-  delete[] temp;
-
-  return (j-1+start);//Exactly the length of the number
-}
-
-template <class NT>
-bool BiPoly<NT>::isint(char c){
-  if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
-     c == '5' || c == '6' || c == '7' || c == '8' || c == '9')
-    return true;
-  else
-    return false;
-}
-
-
-//Returns as integer the number starting from start in c
-template <class NT>
-int BiPoly<NT>::getint(const char* c, int start, unsigned int len,
-			  int & n){
-  int j=0;
-  char *temp = new char[len];
-  while(isint(c[j+start])){
-    temp[j]=c[j+start];j++;
-  }
-  temp[j] = '\n';
-  n = atoi(temp);
-  delete[] temp;
-
-  return (j-1+start);//Exactly the length of the number
-}
-
-//Given a string starting with an open parentheses returns the place
-// which marks the end of the corresponding closing parentheses.
-//Strings of the form (A).
-template <class NT>
-int BiPoly<NT>::matchparen(const char* cstr, int start){
-  int count = 0;
-  int j=start;
-  
-  do{
-    if(cstr[j] == '('){
-      count++;
-    }
-    if(cstr[j] == ')'){
-      count--;
-    }
-    j++;      
-  }while(count != 0 );//j is one more than the matching ')'
-  
-  return j-1;
-}
-
-
-template <class NT>
-int BiPoly<NT>::getbasicterm(string s, BiPoly<NT> & P){
-  const char * cstr = s.c_str();
-  unsigned int len = s.length();
-  int i=0;
-  //BiPoly<NT> * temp = new BiPoly<NT>();
-
-  if(isint(cstr[i])){
-    i = getnumber(cstr, i, len, P);
-  }else if(cstr[i] == 'x'||cstr[i] == 'X'){
-    constructX(1, P);
-  }else if(cstr[i] == 'y'||cstr[i] == 'Y'){
-    constructY(1, P);
-  }else if(cstr[i] =='('){
-    int oldi = i;
-    i = matchparen(cstr, i);
-    string t = s.substr(oldi+1, i -oldi -1);
-    P = getbipoly(t);
-  }else if(cstr[i] == '-'){//Unary Minus
-    P.ydeg = 0;
-    P.deleteCoeffX();//Clear the present coeffecients
-    NT cs[] = {-1};
-    Polynomial<NT> q(0, cs);
-    P.coeffX.push_back(q);
-  }else{
-    std::cout <<"ERROR IN PARSING BASIC TERM" << std::endl;
-  }
-  //i+1 points to the beginning of next syntaxtic object in the string.
- if(cstr[i+1] == '^'){
-    int n;
-    i = getint(cstr, i+2, len, n);
-    P.pow(n);
-  }
-  return i;
-}
-
-
-template <class NT>
-int BiPoly<NT>::getterm(string s, BiPoly<NT> & P){
-  unsigned int len = s.length();
-  if(len == 0){// Zero BiPoly
-    P = BiPoly<NT>();
-    return 0;
-  }
-  unsigned int ind, oind;
-  const char* cstr =s.c_str();
-  string t;
-  //P will be used to accumulate the product of basic terms.
-  ind = getbasicterm(s, P);
-  while(ind != len-1 && cstr[ind + 1]!='+' && cstr[ind + 1]!='-' ){
-    //Recursively get the basic terms till we reach the end or see
-    // a '+' or '-' sign.
-    if(cstr[ind + 1] == '*'){
-      t = s.substr(ind + 2, len - ind -2);
-      oind = ind + 2;
-    }else{
-      t = s.substr(ind + 1, len -ind -1);
-      oind = ind + 1;
-    }
-
-    BiPoly<NT> R;
-    ind = oind + getbasicterm(t, R);//Because the second term is the offset in
-                                     //t
-    P *= R;
-  }
-
-  return ind;
-}
-
-template <class NT>
-BiPoly<NT> BiPoly<NT>::getbipoly(string s){
-
-    //Remove white spaces from the string
-    unsigned int cnt=s.find(' ',0);
-    while(cnt != string::npos){
-      s.erase(cnt, 1);
-      cnt = s.find(' ', cnt);
-    }
-
-    unsigned int len = s.length();
-    if(len <= 0){//Zero Polynomial
-      return BiPoly<NT>();
-    }
-
-    //To handle the case when there is one '=' sign
-    //Suppose s is of the form s1 = s2. Then we assign s to
-    //s1 + (-1)(s2) and reset len
-    unsigned int loc;
-    if((loc=s.find('=',0)) != string::npos){
-      s.replace(loc,1,1,'+');
-      string s3 = "(-1)(";
-      s.insert(loc+1, s3);
-      len = s.length();
-      s.insert(len, 1, ')');
-    }
-    len = s.length();
-
-    const char *cstr = s.c_str();
-    string t;
-    BiPoly<NT> P;
-    // P will be the polynomial in which we accumulate the
-    //sum and difference of the different terms.
-    unsigned int ind;
-
-    if(cstr[0] == '-'){
-      t = s.substr(1, len);
-      ind = getterm(t,P) + 1;
-      NT negone(-1);
-      P.mulScalar(negone);
-    }else{
-      ind = getterm(s, P);
-    }
-
-    unsigned int oind =0;//the string between oind and ind is a term
-    while(ind != len -1){
-      BiPoly<NT> R;
-      t = s.substr(ind + 2, len -ind -2);
-      oind = ind;
-      ind = oind + 2 + getterm(t, R);
-      if(cstr[oind + 1] == '+')
-	P += R;
-      else if(cstr[oind + 1] == '-')
-	P -= R;
-      else
-	std::cout << "ERROR IN PARSING BIPOLY! " << std::endl;
-    }
-
-    return P;
-}
-
-  ////////////////////////////////////////////////////////
-  // METHODS
-  ////////////////////////////////////////////////////////
-  
-  // filedump (msg, ofs, com, com2)
-  // 	where msg and com are strings.
-  // 	msg is an message and com is the character preceding each line
-  // 	(e.g., msg=""  and com=com2="# ")
-  // This is called by the other dump functions
-template <class NT>
-void BiPoly<NT>::dump(std::ostream & os, std::string msg,
-    std::string com, std::string com2) const {
-    if (msg != "")
-      os << msg << std::endl;
-    if(ydeg == -1) {
-      os << com << " Zero Polynomial" << std::endl;
-      return;
-    }
-    bool first = true;
-    os << com;
-    for (int i=0; i <= ydeg; i++){
-      if (!zeroP(coeffX[i])){
-	if (i % 3 == 0) os << std::endl << com2 ;  // output 3 coefficients per line
-	if (first) first = false;
-	else os << " + ";
-	os << "[";
-	coeffX[i].filedump(os,"","",com2); // Note: first comment string is ""
-	os << "]";
-        if (i > 0) os <<" * y^"<< i ;
-      }
-    }
-  }//dump
-
-  // dump(ofs, msg, com, com2) -- dump to file
-  //
-/*
-template <class NT>
-void BiPoly<NT>::dump(std::ofstream & ofs, std::string msg,
-              std::string com, std::string com2) const {
-    dump(ofs, msg, com, com2);
-  }
-*/
-  // dump(msg, com) -- dump to std output
-template <class NT>
-void BiPoly<NT>::dump(std::string msg, std::string com,
-    std::string com2) const {
-    dump(std::cout, msg, com, com2);
-  }
-
-  /* ***********************************************************
-    We want to substitute X or Y with a general Expression or BigFloat
-    into a BiPoly.  E.g., the following produces a Y-polynomial
-    after replacing X by x:
-
-  BiPoly<NT> yPolynomial(const Expr & x) {
-
-    VecExpr vE;
-    for (int i=0; i<= ydeg; i++) {
-        vE.push_back(coeffX[i].eval(x));
-    }
-    return Polynomial<Expr>(vE);
-  }//yPolynomial
-    
-    But this has many problems.
-    Solution below is to have special yExprPolynomial(x).
-    *********************************************************** */
-  
-template <class NT>
-Polynomial<NT> BiPoly<NT>::yPolynomial(const NT & x) {
-    NT coeffVec[ydeg+1];
-    int d=-1;
-    for(int i=ydeg; i >= 0 ; i--){
-      coeffVec[i] = coeffX[i].eval(x);
-      if ((d < 0) && (coeffVec[i] != 0))
-	      d = i;
-    }
-    return Polynomial<NT>(d, coeffVec);
-  }
-
-  // Specialized version of yPolynomial for Expressions
-template <class NT>
-  Polynomial<Expr> BiPoly<NT>::yExprPolynomial(const Expr & x) {
-    Expr coeffVec[ydeg+1];
-    int d=-1;
-    for(int i=ydeg; i >= 0 ; i--){
-      coeffVec[i] = coeffX[i].eval(x);
-      if ((d < 0) && (coeffVec[i] != 0))
-	      d = i;
-    }
-    return Polynomial<Expr>(d, coeffVec);
-  }
-
-  // Specialized version of yPolynomial for BigFloat
-  // ASSERTION: BigFloat x is exact
-template <class NT>
-  Polynomial<BigFloat> BiPoly<NT>::yBFPolynomial(const BigFloat & x) {
-    BigFloat coeffVec[ydeg+1];
-    int d=-1;
-    for(int i=ydeg; i >= 0 ; i--){
-      coeffVec[i] = coeffX[i].eval(x);
-      if ((d < 0) && (coeffVec[i] != 0))
-	      d = i;
-    }
-    return Polynomial<BigFloat>(d, coeffVec);
-  }
-
-  // xPolynomial(y) 
-  //   returns the polynomial (in X) when we substitute Y=y
-  //   
-  //   N.B. May need the
-  //   		Polynomial<Expr> xExprPolynomial(Expr y)
-  //   version too...
-  //
-
-template <class NT>
-Polynomial<NT> BiPoly<NT>::xPolynomial(const NT & y) {
-    Polynomial<NT> res = coeffX[0];
-    NT yPower(y);
-    for(int i=1; i <= ydeg ; i++){
-      res += coeffX[i].mulScalar(yPower);
-      yPower *= y;
-    }
-    return res;
-  }//xPolynomial
-  
-
-  // getYdegree()
-template <class NT>
-int BiPoly<NT>::getYdegree() const {
-    return ydeg;
-  }
-  
-  // getXdegree()
-template <class NT>
-int BiPoly<NT>::getXdegree(){
-    int deg=-1;
-    for(int i=0; i <=ydeg; i++)
-      deg = max(deg, coeffX[i].getTrueDegree());
-    return deg;
-  }
-
-  // getTrueYdegree
-template <class NT>
-int BiPoly<NT>::getTrueYdegree(){
-    for (int i=ydeg; i>=0; i--){
-      coeffX[i].contract();
-      if (!zeroP(coeffX[i]))
-	return i;
-    }
-    return -1;	// Zero polynomial
-  }//getTrueYdegree
-
-
-  //eval(x,y)
-template <class NT>
-Expr BiPoly<NT>::eval(Expr x, Expr y){//Evaluate the polynomial at (x,y)
-    Expr e = 0;
-
-    for(int i=0; i <=ydeg; i++){
-      e += coeffX[i].eval(x)*pow(y,i);
-    }
-    return e;
-  }//eval
-
-  ////////////////////////////////////////////////////////
-  // Polynomial arithmetic (these are all self-modifying)
-  ////////////////////////////////////////////////////////
-  
-  // Expands the nominal y-degree to n;
-  //	Returns n if nominal y-degree is changed to n
-  //	Else returns -2
-
-template <class NT>
-int BiPoly<NT>::expand(int n) {
-    if ((n <= ydeg)||(n < 0))
-      return -2;
-    
-    for(int i=ydeg+1; i <=n ;i++)
-      coeffX.push_back(Polynomial<NT>::polyZero());
-    
-    ydeg = n;
-    return n;
-  }//expand
-
-  // contract() gets rid of leading zero polynomials
-  //	and returns the new (true) y-degree;
-  //	It returns -2 if this is a no-op
-
-template <class NT>
-int BiPoly<NT>::contract() {
-    int d = getTrueYdegree();
-    if (d == ydeg)
-      return (-2);  // nothing to do
-    else{
-      for (int i = ydeg; i> d; i--)
-	coeffX.pop_back();
-      ydeg = d;
-    }
-    return d;
-  }//contract
-
-  // Self-assignment
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::operator=( const BiPoly<NT>& P) {
-  if (this == &P)
-    return *this;	// self-assignment
-  ydeg = P.getYdegree();
-  coeffX = P.coeffX;
-  return *this;
-  }//operator=
-
-
-  // Self-addition
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::operator+=( BiPoly<NT>& P) { // +=
-
-    int d = P.getYdegree();
-    if (d > ydeg)
-      expand(d);
-    for (int i = 0; i<=d; i++)
-      coeffX[i] += P.coeffX[i];
-
-  return *this;
-  }//operator+=
-   
-  // Self-subtraction
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::operator-=( BiPoly<NT>& P) { // -=
-    int d = P.getYdegree();
-    if (d > ydeg)
-      expand(d);
-  for (int i = 0; i<=d; i++)
-    coeffX[i] -= P.coeffX[i];
-
-  return *this;
-  }//operator-=
-
-  // Self-multiplication
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::operator*=( BiPoly<NT>& P) { // *=
-    int d = ydeg + P.getYdegree();
-
-    std::vector<Polynomial<NT> > vP;
-
-    Polynomial<NT>* c = new Polynomial<NT> [d + 1];
-    for(int i=0; i <=d; i++)
-      c[i] = Polynomial<NT>();
-    
-    for (int i = 0; i<=P.getYdegree(); i++)
-      for (int j = 0; j<=ydeg; j++) {
-	if(!zeroP(P.coeffX[i]) && !zeroP(coeffX[j]))
-	  c[i+j] += P.coeffX[i] * coeffX[j];
-      }
-
-    for(int i=0; i <= d; i++)
-      vP.push_back(c[i]);
-
-    delete[] c;
-    coeffX.clear();
-    coeffX = vP;
-    ydeg = d;
-    return *this;
-  }//operator*=
-  
-  // Multiply by a polynomial in X
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::mulXpoly( Polynomial<NT> & p) {
-    contract();
-    if (ydeg == -1)
-      return *this;
-
-    for (int i = 0; i<=ydeg ; i++)
-      coeffX[i] *= p;
-    return *this;
-  }//mulXpoly
-
-  //Multiply by a constant
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::mulScalar( NT & c) {
-    for (int i = 0; i<=ydeg ; i++)
-      coeffX[i].mulScalar(c);
-    return *this;
-  }//mulScalar
-
-  // mulYpower: Multiply by Y^i (COULD be a divide if i<0)
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::mulYpower(int s) {
-  // if s >= 0, then this is equivalent to
-  // multiplying by Y^s;  if s < 0, to dividing by Y^s
-  if (s==0)
-    return *this;
-  int d = s+getTrueYdegree();
-  if (d < 0) {
-    ydeg = -1;
-    deleteCoeffX();
-    return *this;
-  }
-
-  std::vector<Polynomial<NT> > vP;
-  if(s > 0){
-    for(int i=0; i < s; i ++)
-      vP.push_back(Polynomial<NT>::polyZero());
-    for(int i=s; i<=d; i++)
-      vP.push_back(coeffX[i-s]);
-  }
-
-  if (s < 0) {
-    for (int j=-1*s; j <= d-s; j++)
-      vP.push_back(coeffX[j]);
-  }
-
-  coeffX = vP;
-  ydeg= d;
-  return *this;
-  }//mulYpower
-
-
-  
-  // Divide by a polynomial in X.
-  // We replace the coeffX[i] by the pseudoQuotient(coeffX[i], P)
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::divXpoly( Polynomial<NT> & p) {
-    contract();
-    if (ydeg == -1)
-      return *this;
-
-    for (int i = 0; i<=ydeg ; i++)
-      coeffX[i] = coeffX[i].pseudoRemainder(p);
-
-    return *this;
-  }// divXpoly
-
-
-  
-  //Using the standard definition of pseudRemainder operation.
-  //	--No optimization!
-template <class NT>
-BiPoly<NT> BiPoly<NT>::pseudoRemainderY (BiPoly<NT> & Q){
-    contract();
-    Q.contract();
-    int qdeg = Q.getYdegree();
-    Polynomial<NT> LC(Q.coeffX[qdeg]), temp1(LC), temp;
-    BiPoly<NT> P(Q);
-
-    std::vector<Polynomial<NT> > S;//The quotient in reverse order
-    if(ydeg < qdeg){
-      return (*this);
-    }
-    (*this).mulXpoly(temp1.power(ydeg - qdeg +1));
-
-    while(ydeg >= qdeg){
-      temp1 = coeffX[ydeg];
-      temp = temp1.pseudoRemainder(LC);
-      S.push_back(temp);
-      P.mulXpoly(temp);
-      P.mulYpower(ydeg - qdeg);
-      *this -= P;
-      contract();
-      P = Q;//P is used as a temporary since mulXpower and mulYpower are
-            // self modifying
-    }
-
-    //Correct the order of S
-    std::vector<Polynomial<NT> > vP;
-
-    for(int i= S.size()-1; i>=0; i--)
-      vP.push_back(S[i]);
-
-
-    return BiPoly<NT>(vP);
-    
-  }//pseudoRemainder
-
-  //Partial Differentiation
-  //Partial Differentiation wrt Y
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::differentiateY() {	
-  if (ydeg >= 0) {
-    for (int i=1; i<=ydeg; i++)
-      coeffX[i-1] = coeffX[i].mulScalar(i);
-    ydeg--;
-  }
-  return *this;
-  }// differentiation wrt Y
-
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::differentiateX() {	
-    if (ydeg >= 0)
-      for (int i=0; i<=ydeg; i++)
-	coeffX[i].differentiate();
-    
-    return *this;
-  }// differentiation wrt X
-
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::differentiateXY(int m, int n) {//m times wrt X and n times wrt Y
-    assert(m >=0); assert(n >=0);
-    for(int i=1; i <=m; i++)
-      (*this).differentiateX();
-    for(int i=1; i <=n; i++)
-      (*this).differentiateY();
-    
-    return *this;
-  }
-
-  //Represents the bivariate polynomial in (R[X])[Y] as a member
-  //of (R[Y])[X].
-  //But since our polynomials in X can only have NT coeff's thus
-  // to represent the above polynomial we switch X and Y once
-  // the conversion has been done.
-  //NOTE: This is different from replacing X by Y which was
-  //      done in the case of the constructor from a polynomial in X
-  //Need to calculate resultant wrt X.
-template <class NT>
-BiPoly<NT> & BiPoly<NT>::convertXpoly(){
-    getTrueYdegree();
-    if(ydeg == -1) return (*this);
-    NT *cs = new NT[ydeg +1];
-    int xdeg = getXdegree();
-    std::vector<Polynomial<NT> > vP;
-
-    for(int i=0; i<=xdeg; i++){
-      for(int j=0; j<=ydeg; j++){
-	cs[j] = coeffX[j].getCoeffi(i);
-      }
-      
-      vP.push_back(Polynomial<NT>(ydeg, cs));
-    }
-    delete[] cs;
-      
-    ydeg = xdeg;
-    coeffX = vP;
-    return (*this);
-  }
-
-  //Set Coeffecient to the polynomial passed as a parameter
-template <class NT>
-bool BiPoly<NT>::setCoeff(int i, Polynomial<NT> p){
-    if(i < 0 || i > ydeg)
-      return false;
-    coeffX[i] = p;
-    return true;
-  }
-  
-template <class NT>
-void BiPoly<NT>::reverse() {
-    Polynomial<NT> tmp;
-    for (int i=0; i<= ydeg/2; i++) {
-      tmp = coeffX[i];
-      coeffX[i] =   coeffX[ydeg-i];
-      coeffX[ydeg-i] = tmp;
-    }
-  }//reverse
-
-  //replaceYwithX()
-  //   used used when the coeffX in BiPoly are constants,
-  //   to get the corresponding univariate poly in X
-  //   E.g., Y^2+2*Y+9 will be converted to X^2+2*X+9
-template <class NT>
-Polynomial<NT>  BiPoly<NT>::replaceYwithX(){
-    int m = getTrueYdegree();
-    NT *cs = new NT[m+1];
-    for(int i=0; i <= m ; i++)
-      cs[i]=coeffX[i].getCoeffi(0);
-    delete[] cs;
-
-    return Polynomial<NT>(m,cs);
-  }//replaceYwithX
-  
-template <class NT>
-BiPoly<NT>&  BiPoly<NT>::pow(unsigned int n){
-
-  if (n == 0) {
-    ydeg = 0;
-    deleteCoeffX();
-    Polynomial<NT> unity(0);
-    coeffX.push_back(unity);
-  }else if(n == 1){
-
-  }else{
-    BiPoly<NT> x(*this);
-
-    while ((n % 2) == 0) { // n is even
-      x *= x;
-      n >>= 1;
-    }
-    BiPoly<NT> u(x);
-    while (true) {
-      n >>= 1;
-      if (n == 0){
-	(*this) = u;
-	return (*this);
-      }
-      x *= x;
-      if ((n % 2) == 1) // n is odd
-        u *= x;
-    }
-    (*this) = u;
-  }
-  return (*this);
-}//pow
-
-
-
-  ////////////////////////////////////////////////////////
-  // Helper Functions
-  ////////////////////////////////////////////////////////
-
-// isZeroPinY(P)
-//	checks whether a Bi-polynomial is a zero Polynomial
-template <class NT>
-bool isZeroPinY(BiPoly<NT> & P){
-    if(P.getTrueYdegree() == -1)
-      return true;
-    return false;
-}
-
-// gcd(P,Q)
-//   This gcd is based upon the subresultant PRS to avoid
-//   exponential coeffecient growth and gcd computations, both of which 
-//   are expensive since the coefficients are polynomials
-
-template <class NT>
-BiPoly<NT> gcd( BiPoly<NT>& P ,BiPoly<NT>& Q){
-    int m = P.getTrueYdegree();
-    int n = Q.getTrueYdegree();
-
-    //If both Bi-Polys are zero then return zero
-    if( m==-1 && n==-1){
-      return BiPoly<NT>();//Had to do this for the type of
-                          //return value o/w causes problem in
-    }                    //assignment operation
-
-    if(m < n) {
-      return gcd(Q, P);
-    }
-
-    //If one of the Bi-Polys are zero then return the other
-    if(n==-1)
-      return P;
-
-    //When the two BiPolys are just univariate Polynomials in X
-    if(m==0 && n==0){
-      std::vector<Polynomial<NT> > vP;
-      vP.push_back(gcd(P.coeffX[0], Q.coeffX[0]));
-      return BiPoly<NT>(vP);//Had to do this for the type of
-                            //return value
-      }
-    
-    int delta = m - n;
-    Polynomial<NT> a(Q.coeffX[n]);
-    std::vector<NT> vN;
-    vN.push_back(pow(BigInt(-1),delta + 1));
-    Polynomial<NT> beta(vN);
-    Polynomial<NT> phi(power(a, delta)), t;
-    m = n;
-    BiPoly<NT> temp;
-    P.pseudoRemainderY(Q);
-
-    while(!isZeroPinY(P)){
-      P.divXpoly(beta);
-      n = P.getTrueYdegree();
-      delta = m - n;
-      beta = power(phi, delta)*a.mulScalar(pow(BigInt(-1),delta+1));
-      a = P.coeffX[n];
-      t = power(phi, delta -1);
-      phi = power(a,delta).pseudoRemainder(t);
-      m = n;
-      temp = Q;//Swapping the pseudo-remainder for the next step
-      Q = P;
-      P = temp;
-      P.pseudoRemainderY(Q);
-  }
-    return Q;
-}//gcd
-
-// resY(P,Q):
-//      Resultant of Bi-Polys P and Q w.r.t. Y.
-//      So the resultant is a polynomial in X
-template <class NT>
-Polynomial<NT>  resY( BiPoly<NT>& P ,BiPoly<NT>& Q){
-
-  int m = P.getTrueYdegree();
-  int n = Q.getTrueYdegree();
-
-  //If either polynomial is zero, return zero
-  if( m == -1 || n == -1) return Polynomial<NT>();//::polyZero();
-
-  if(n > m)
-    return resY(Q, P);
-
-  Polynomial<NT> b(Q.coeffX[n]);
-  Polynomial<NT> lc(P.coeffX[m]), C, temp;
-  BiPoly<NT> r;
-  
-  r = P.pseudoRemainderY(Q);
-  C = b * r.coeffX[r.getTrueYdegree()];
-  C = C.pseudoRemainder(lc);
-
-  if(isZeroPinY(P) && n > 0)
-    return Polynomial<NT>();//::polyZero();
-
-  if(Q.getTrueYdegree() == 0 && isZeroPinY(P))
-    return power(Q.coeffX[0], m);
-
-  int l = P.getTrueYdegree();
-
-  temp = power(b, m-l).mulScalar(pow(BigInt(-1),m*n))*resY(Q,P);
-  temp = temp.pseudoRemainder(power(C,n));
-  return temp;
-
-}//resY
-
-// resX(P,Q):
-//      Resultant of Bi-Polys P and Q w.r.t. X.
-//      So the resultant is a polynomial in Y
-//	We first convert P, Q to polynomials in X. Then 
-// 	call resY and then turns it back into a polynomial in Y
-//	QUESTION: is this last switch really necessary???
-template <class NT>
-BiPoly<NT>  resX( BiPoly<NT>& P ,BiPoly<NT>& Q){
-  P.convertXpoly();
-  Q.convertXpoly();
-
-  // Polynomial<NT> p(resY(P,Q));
-  // return BiPoly<NT>(p);
-  return(resY(P,Q)); // avoid the switch back
-}//resX
-
-
-//Equality operator for BiPoly
-template <class NT>
-bool operator==(const BiPoly<NT>& P, const BiPoly<NT>& Q) {	// ==
-  BiPoly<NT> P1(P);
-  BiPoly<NT> Q1(Q);
-  P1.contract();
-  Q1.contract();
-  if(P1.getYdegree() != Q1.getYdegree())
-    return false;
-  else{
-    for(int i=0; i <= P1.getYdegree() ; i++){
-      if(P1.coeffX[i] != Q1.coeffX[i])
-	return false;
-    }
-  }
-  return true;
-}
-
-  // Addition P + Q
-template <class NT>
-BiPoly<NT> operator+(const BiPoly<NT>& P, const BiPoly<NT>& Q ) { // +
-  return BiPoly<NT>(P) += Q;
-}
-  // Subtraction P - Q
-template <class NT>
-BiPoly<NT> operator-(const  BiPoly<NT>& P,const  BiPoly<NT>& Q ) { // +
-  return BiPoly<NT>(P) -= Q;
-}
-
-  // Multiplication P * Q
-template <class NT>
-BiPoly<NT> operator*(const  BiPoly<NT>& P, const BiPoly<NT>& Q ) { // +
-  return BiPoly<NT>(P) *= Q;
-}
-
-
-  ////////////////////////////////////////////////////////
-  //Curve Class
-  //  	extends BiPoly Class
-  ////////////////////////////////////////////////////////
-
-template < class NT >
-Curve<NT>::Curve(){} // zero polynomial
-  
-  //Curve(vp):
-  //    construct from a vector of polynomials
-template < class NT >
-Curve<NT>::Curve(std::vector<Polynomial<NT> > vp)
-	  : BiPoly<NT>(vp){
-  }
-  
-  //Curve(p):
-  //	Converts a polynomial p(X) to a BiPoly in one of two ways:
-  // 	    (1) if flag is false, the result is Y-p(X) 
-  // 	    (2) if flag is true, the result is p(Y) 
-  //    The default is (1) because we usually want to plot the
-  //        graph of the polynomial p(X)
-template < class NT >
-Curve<NT>::Curve(Polynomial<NT> p, bool flag)
-	  : BiPoly<NT>(p, flag){
-  }
-
-  //Curve(deg, d[], C[]):
-  //	Takes in a list of list of coefficients.
-  //	Each cofficient list represents a polynomial in X
-  //
-  //  deg - ydeg of the bipoly
-  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
-  //  C[] - list of coefficients, we use array d to select the
-  //      coefficients
-template < class NT >
-Curve<NT>::Curve(int deg, int *d, NT *C)
-	  : BiPoly<NT>(deg, d, C){
-  }
-
-template < class NT >
-Curve<NT>::Curve(const BiPoly<NT> &P)
-	  : BiPoly<NT>(P){
-  }
-
-  //Curve(n)
-template < class NT >
-Curve<NT>::Curve(int n)
-	  : BiPoly<NT>(n){// creates a Curve with nominal y-degree equal to n
-  }
-
-  //Creates a curve from a string (no parentheses, no *)
-template < class NT >
-Curve<NT>::Curve(const string & s, char myX, char myY)
-	  : BiPoly<NT>(s, myX, myY){
-  }
-template < class NT >
-Curve<NT>::Curve(const char * s, char myX, char myY)
-	  : BiPoly<NT>(s, myX, myY){
-  }
-
-
-  // verticalIntersections(x, vecI, aprec=0):
-  //
-  //    The list vecI is passed an isolating intervals for y's such that (x,y)
-  //    lies on the curve.
-  //    If aprec is non-zero (!), the intervals have with < 2^{-aprec}.
-  //    Return is -2 if curve equation does not depend on Y
-  //    	-1 if infinitely roots at x,
-  //    	0 if no roots at x
-  //    	1 otherwise
-  //
-  //    ASSERTION: x is an exact BigFloat
-
-template < class NT >
-int Curve<NT>::verticalIntersections(const BigFloat & x, BFVecInterval & vI,
-	int aprec) {
-    int d= Curve<NT>::getTrueYdegree();
-    if(d <= 0) return(-2);
-    	   // This returns a NULL vI, which should be caught by caller
-	
-    Polynomial<Expr> PY = this->yExprPolynomial(x); // should be replaced
-    // assert(x.isExact());
-    // Polynomial<BigFloat> PY = yBFPolynomial(x); // unstable still
-
-    d = PY.getTrueDegree();
-    if(d <= 0) return(d);
-
-    Sturm<Expr> Ss(PY); // should be replaced by BigFloat version
-    // Sturm<BigFloat> Ss(PY); // unstable still
-    Ss.isolateRoots(vI);
-
-    int s = vI.size();
-    if ((aprec != 0) && (s>0))
-	Ss.newtonRefineAllRoots(vI, aprec);
-    
-    return s;
-  }
-  
-  // plot(eps, x1, y1, x2, y2)
-  //
-  // 	All parameters have defaults
-  //
-  //    Gives the points on the curve at resolution "eps".  Currently,
-  //    eps is viewed as delta-x step size (but it could change).
-  //    The display is done in the rectangale 
-  //    defined by [(x1, y1), (x2, y2)].
-  //    The output is written into a file in the format specified
-  //    by our drawcurve function (see COREPATH/ext/graphics).
-  //
-  //    Heuristic: the open polygonal lines end when number of roots
-  //    changes...
-  //
-  //    TO DO:
-  //       (1) need to automatically readjust x- and y-scales
-  //              independently
-  //       (2) reorder parameters in this order: x1, x2, y1, y2
-  //            [Then y1, y2 can be automatically determined]
-  //       (3) should allow the ability to look for interesting
-  //             features
-  //
-  //    ASSERTION: all input BigFloats are exact
-  //
-template < class NT >
-int Curve<NT>::plot( BigFloat eps, BigFloat x1,
-	BigFloat y1, BigFloat x2, BigFloat y2, int fileNo){
-
-  const char* filename[] = {"data/input", "data/plot", "data/plot2"};
-
-  assert(eps.isExact()); // important for plotting...
-  assert(x1.isExact());
-  assert(y1.isExact());
-
-  ofstream outFile;
-  outFile.open(filename[fileNo]); // ought to check if open is successful!
-  outFile << "########################################\n";
-  outFile << "# Curve equation: \n";
-  this->dump(outFile,"", "# ");
-  outFile << std::endl;
-  outFile << "# Plot parameters:  step size (eps) = " << eps << std::endl;
-  outFile << "#                   x1 = " << x1 << ",\t y1 = " << y1 << std::endl;
-  outFile << "#                   x2 = " << x2 << ",\t y2 = " << y2 << std::endl;
-  outFile << "########################################\n";
-  outFile << "# X-axis " << std::endl;
-  outFile << "o 2" << std::endl;
-  outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
-  outFile << x1 << "\t" << 0 << std::endl;
-  outFile << x2 << "\t" << 0 << std::endl;
-  outFile << "########################################\n";
-  outFile << "# Y-axis " << std::endl;
-  outFile << "o 2" << std::endl;
-  outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
-  outFile << 0 << "\t" << y1 << std::endl;
-  outFile << 0 << "\t" << y2 << std::endl;
-  // assert(eps>0)
-  int aprec = -(eps.lMSB()).toLong(); // By definition, eps.lMSB() <= lg(eps)
-
-  BigFloat xCurr = x1;
-  BigFloat xLast = x1;
-  unsigned int numRoots=0;
-  unsigned int numPoints=0;
-  BFVecInterval vI;
-
-cout <<"Current value of x " << xCurr << endl;
-  //===================================================================
-  // FIRST locate the first x-value where there are roots for plotting
-  //===================================================================
-  do {
-    vI.clear();
-    if (verticalIntersections(xCurr, vI, aprec) > 0) {
-      numRoots = vI.size();
-cout <<"Number of roots at " << xCurr << " are " << numRoots<<endl;
-    }
-    xCurr += eps;
-
-  } while ((numRoots == 0) && (xCurr < x2));//numRoots <= ydeg
-
-  if (numRoots == 0 && x2 <= xCurr) {//if numRoots > 0 then there exists a
-                                     //valid point for plotting
-	  return -1; // nothing to plot!
-  }
-
-  int limit = ((x2 - xCurr + eps)/eps).intValue()+1;
-  //std::cout << "Limit = " << limit << std::endl;
-  machine_double plotCurves[this->getTrueYdegree()][limit];//plot buffer 
-  machine_double yval;
-
-  for (unsigned int i=0; i< numRoots; i++) {
-     yval = (vI[i].first + vI[i].second).doubleValue()/2;
-     if (yval < y1) plotCurves[i][numPoints] = y1.doubleValue();
-     else if (yval > y2) plotCurves[i][numPoints] = y2.doubleValue();
-     else plotCurves[i][numPoints] = yval;
-  }
-
-  vI.clear();
-  xLast = xCurr - eps;  // -eps to compensate for the forward value of xCurr
-  numPoints = 1;
-
-  //===================================================================
-  // Get all the curves in a main loop
-  // 	-- dump the curves when an x-interval is discovered
-  // 	We define an "x-interval" to be a maximal interval
-  // 	where the number of curves is constant (this is a heuristic!)
-  // 	Note that this includes the special case where number is 0.
-  //===================================================================
-
-  BigFloat tmp; // used to step from xLast to xCurr in loops
-
-  while (xCurr < x2) { //main loop
-    //std::cout << "Doing verticalintersec at " << xCurr << std::endl;
-    verticalIntersections(xCurr, vI, aprec);
-    if (vI.size() != numRoots) { // an x-interval discovered!
-	// write previous x-interval to output file
-        outFile << "########################################\n";
-        outFile << "# New x-interval with " << numRoots << " roots\n";
-	for (unsigned int i=0; i< numRoots; i++) {
-          outFile << "#=======================================\n";
-          outFile << "# Curve No. " << i+1 << std::endl;
-	  outFile << "o " << numPoints << std::endl;
-	  outFile << red_comp(i) << "\t"
-		  << green_comp(i)  << "\t"
-		  << blue_comp(i) << std::endl;
-	  tmp = xLast;
-	  for (unsigned int j=0; j< numPoints; j++) {
-
-		  outFile << tmp << "	\t\t"
-			  << plotCurves[i][j] << "\n";
-		  tmp += eps;
-	  }//for j
-	}//for i
-	numPoints = 0;          // reset
-	numRoots = vI.size();   // reset
-	xLast = xCurr;		// reset
-    }//if vI.size() !=
-    if (numRoots>0){ // record curr. vertical intersections if numRoots>0
-      for (unsigned int i=0; i< numRoots; i++) {
-         yval = (vI[i].first + vI[i].second).doubleValue()/2;
-	 // HERE SHOULD BE A LOOP TO OUTPUT MORE POINTS IN CASE THE slope IS LARGE
-	 // Idea: let previous value of yval be yval-old.  
-	 //
-	 // Two cases:
-	 // (1) When i=0:
-	 // 	you need to search backwards and forwards
-	 // 	(yval-old is not defined in this case)
-	 //
-	 // (2) When i>0:
-	 // 	If  |yval-old - yval| > 2eps, we must plot using horizontalIntersection()
-	 // 	We must start from
-	 // 		y = yval-old until
-	 // 			EITHER (y = (vI[i+1].first + vI[i+1].second)/2)
-	 // 			OR (sign of slope changes)
-	 // 			OR (hit the ymax or ymin boundary)
-	 //
-         if (yval < y1) plotCurves[i][numPoints] = y1.doubleValue();
-         else if (yval > y2) plotCurves[i][numPoints] = y2.doubleValue();
-         else plotCurves[i][numPoints] = yval;
-      }//for i
-      vI.clear();  //Should clear the intersection points
-      numPoints++;
-    }//if
-    xCurr += eps;
-if (!xCurr.isExact()) std::cout<<"xCurr has error! xCurr=" << xCurr << std::endl;
-   }//main while loop
-
-   // Need to flush out the final x-interval:
-   if ((numRoots>0) && (numPoints >0)) { 
-	// write to output file
-        outFile << "########################################\n";
-        outFile << "# New x-interval with " << numRoots << " roots\n";
-	for (unsigned int i=0; i< numRoots; i++) {
-          outFile << "#=======================================\n";
-          outFile << "# Curve No. " << i+1 << std::endl;
-	  outFile << "o " << numPoints << std::endl;
-	  outFile << red_comp(i) << "\t"
-		  << green_comp(i)  << "\t"
-		  << blue_comp(i) << std::endl;
-	  tmp = xLast;
-	  for (unsigned int j=0; j< numPoints; j++) {
-
-		  outFile << tmp << "	\t\t"
-			  << plotCurves[i][j] << "\n";
-		  tmp += eps;
-	  }//for j
-	}//for i
-    }//if
-
-    // Put out the final frame (this hides the artificial cut-off of curves
-    outFile << "########################################\n";
-    outFile << "# FRAME around our figure " << std::endl;
-    outFile << "p 4" << std::endl;
-    outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
-    outFile << x1 << "\t" << y1 << std::endl;
-    outFile << x2 << "\t" << y1 << std::endl;
-    outFile << x2 << "\t" << y2 << std::endl;
-    outFile << x1 << "\t" << y2 << std::endl;
-    outFile << "######### End of File ##################\n";
-
-    outFile.close();
-    return 0;
-  }//plot
-
-// selfIntersections():
-//   this should be another member function that lists
-//   all the self-intersections of a curve
-//
-//  template <class NT>
-//  void selfIntersections(BFVecInterval &vI){
-//  ...
-//  }
-
-
-
-  ////////////////////////////////////////////////////////
-  // Curve helper functions
-  ////////////////////////////////////////////////////////
-
-
-//Xintersections(C, D, vI):
-//  returns the list vI of x-ccordinates of possible intersection points.
-//  Assumes that C & D are quasi-monic.(or generally aligned)
-template <class NT>
-void  Xintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI){
-  Sturm<NT> Ss(resY(P, Q));
-  Ss.isolateRoots(vI);
-}
-
-//Yintersections(C, D, vI):
-//	similar to Xintersections
-template <class NT>
-void  Yintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI){
-  Sturm<NT> Ss(resX(P, Q));
-  Ss.isolateRoots(vI);
-}
-
-// Display Intervals
-// 
-template <class NT>//DO I NEED THIS OVERHERE AS WELL?
-void showIntervals(char* s, BFVecInterval &vI) {
-   std::cout << s;
-   for (unsigned int i=0; i< vI.size(); i++) {
-   	std::cout << "[ " << vI[i].first << ", " 
-   		<< vI[i].second << " ],  " ;
-   }
-   std::cout << std::endl;
-}
-
-
-/*************************************************************************** */
-// END
-/*************************************************************************** */
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.h
deleted file mode 100644
index 3bb3f5b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.h
+++ /dev/null
@@ -1,435 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Poly.h
- *  
- * Description: simple polynomial class
- * 
- *	REPRESENTATION:
- *	--Each polynomial has a nominal "degree" (this
- *		is an upper bound on the true degree, which
- *		is determined by the first non-zero coefficient).
- *	--coefficients are parametrized by some number type "NT".
- *	--coefficients are stored in the "coeff" array of
- *		length "degree + 1".  
- *		CONVENTION: coeff[i] is the coefficient of X^i.  So, a
- *			    coefficient list begins with the constant term.
- *	--IMPORTANT CONVENTION:
- *		the zero polynomial has degree -1
- *		while nonzero constant polynomials have degree 0.
- * 
- *	FUNCTIONALITY:
- *	--Polynomial Ring Operations (+,-,*)
- *	--Power
- *	--Evaluation
- *	--Differentiation
- *	--Remainder, Quotient 
- *      --GCD
- *	--Resultant, Discriminant (planned)
- *	--Polynomial Composition (planned)
- *	--file I/O (planned)
- *	
- * Author: Chee Yap 
- * Date:   May 28, 2002
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#ifndef CORE_POLY_H
-#define CORE_POLY_H
-
-#include <CGAL/CORE/BigFloat.h>
-#include <CGAL/CORE/Promote.h>
-#include <vector>
-
-namespace CORE { 
-using namespace std;
-class Expr;
-// ==================================================
-// Typedefs
-// ==================================================
-
-//typedef std::vector<Expr>	VecExpr;
-//typedef std::pair<Expr, Expr>	Interval;
-//typedef std::vector<Interval>	VecInterval;
-typedef std::pair<BigFloat, BigFloat>	BFInterval;
-// NOTE: an error condition is indicated by
-// the special interval (1, 0)
-typedef std::vector<BFInterval>	BFVecInterval;
-
-
-// ==================================================
-// Polynomial Class
-// ==================================================
-
-template <class NT>
-class Polynomial {
- private:
-  //The following are used in the constructor from strings.
-  //For more details see the related constructor.
-
-public:
-  typedef std::vector<NT> VecNT;
-  typedef NT coeffType;
-
-  int degree;	// This is the nominal degree (an upper bound
-  // on the true degree)
-  NT * coeff;	// coeff is an array of size degree+1;
-  //	This remark holds even when degree = -1.
-  // Notes:
-  // (1) coeff[i] is the coefficient of x^i
-  // (2) The Zero Polynomial has degree -1
-  // (3) Nonzero Constant Polynomials has degree 0
-
-  // STATIC MEMBERS
-  // static NT ccc_; // THIS IS A TEMPORARY HACK
-  static  int COEFF_PER_LINE;		// pretty print parameters
-  static const char * INDENT_SPACE;		// pretty print parameters
-
-  static const Polynomial<NT> & polyZero();
-  static const Polynomial<NT> & polyUnity();
-  static Polynomial polyWilkinson;	      // a sample polynomial
-  static int NT_TYPE; // NT_TYPE = 1 if NT is integer type (int,long,BigInt)
-                      // NT_TYPE = 2 if NT is BigFloat 
-                      // NT_TYPE = 3 if NT is BigRat 
-                      // NT_TYPE = 4 if NT is Expr 
-                      // Hack?  NT_TYPE is needed for root bounds, etc.
-
-  // Constructors:
-  Polynomial(void);	// the Zero Polynomial
-  Polynomial(int n);	// construct the Unit Polynomial of nominal deg n>=0
-  Polynomial(int n, const NT * coef);
-  Polynomial(const Polynomial &);
-  Polynomial(const VecNT &);
-  Polynomial(int n, const char* s[]);
-  Polynomial(const string & s, char myX='x');
-  Polynomial(const char* s, char myX='x');
-  ~Polynomial();
-
-  private:
-  void constructX(int n, Polynomial<NT>& P);
-  void constructFromString(string & s, char myX='x');
-  int getnumber(const char* c, int i, unsigned int len, Polynomial<NT> & P);
-  bool isint(char c);
-  int getint(const char* c, int i, unsigned int len, int & n);
-  int matchparen(const char* cstr, int start);
-  int getbasicterm(string & s, Polynomial<NT> & P);
-  int getterm(string & s, Polynomial<NT> & P);
-
-
-  public:
-  //Returns a Polynomial corresponding to s, which is supposed to
-  //contain as place-holders the chars 'x' and 'y'.
-  Polynomial<NT> getpoly(string & s);
-
-  // Assignment:
-  Polynomial & operator=(const Polynomial&);
-
-  // Expand and Contract
-  //  -- they are semi-inverses: i.e., Contract(expand(p))=p
-  int expand(int n);	// Change the current degree to n
-  // Helper function for polynomial arithmetic
-  int contract();	// get rid of leading zeros
-
-  // Polynomial arithmetic (these are all self-modifying):
-  Polynomial & operator+=(const Polynomial&);	// +=
-  Polynomial & operator-=(const Polynomial&);	// -=
-  Polynomial & operator*=(const Polynomial&);	// *=
-  Polynomial & operator-();			// unary minus
-  Polynomial & power (unsigned int n) ;		// power (*this is changed!)
-
-  Polynomial & mulScalar (const NT & c);	// return (*this) * (c)
-  Polynomial & mulXpower(int i); // If i >= 0, then this is equivalent
-                                 // to multiplying by X^i.
-                                 // If i < 0 to dividing by X^i
-  Polynomial pseudoRemainder (const Polynomial& B, NT& C); // C = return value
-  Polynomial pseudoRemainder (const Polynomial& B);        // no C version
-  // The pseudo quotient of (*this) mod B
-  //	is returned, but (*this) is transformed
-  //	into the pseudo remainder.  If the argument C is provided,
-  //	Then C*(*this) = B*pseudo-quotient + pseudo-remainder.
-  Polynomial & negPseudoRemainder (const Polynomial& B);  // negative remainder
-  Polynomial reduceStep (const Polynomial& B ); //helper for pseudoRemainder
-  // One step of pseudo remainder
-  // What is returned is a special polynomial C + X*M  (not "C+M")
-  //    telling us the initial constant C and
-  //    the quotient M of C*(THIS) divided by p.
-  Polynomial testReduceStep(const Polynomial& A, const Polynomial& B); //helper
-
-  // Get functions
-  int getDegree() const;        // nominal degree
-  int getTrueDegree() const;    // true degree
-  NT getCoeffi(int i) const;
-  const NT & getLeadCoeff() const;      // get TRUE leading coefficient
-  const NT & getTailCoeff() const;      // get last non-zero coefficient
-  NT** getCoeffs() ;		// get all coefficients
-  const NT& getCoeff(int i) const;      // Get single coefficient of X^i
-                                        // NULL pointer if invalid i
-  // Set functions
-  bool setCoeff(int i, const NT & cc);  // Make cc the coefficient of X^i
-                                        // Return FALSE if invalid i
-                                        // !! User's responsibility to
-                                        // delete the old coefficient if
-                                        // necessary !!
-  // Helper Functions:
-  /// Reverse reverses the coefficients
-  void reverse();		
-  /// Negation of a polynomial (multiplication by -1)
-  /// Useful for Sturm
-  Polynomial & negate();	
-  /// Suppressing Zero Roots
-  /// It amounts to dividing (*this) by X^k, so that the
-  /// the tail coeff is non-zero. Returns the value of k.
-  int makeTailCoeffNonzero();
-
-  // Evaluation Functions:
-  /// Polynomial evaluation where the coefficients are approximated first
-  /// Returns a BigFloat with error that contains the value
-  BigFloat evalApprox(const BigFloat& f, 
-    const extLong& r=defRelPrec, const extLong& a=defAbsPrec) const;
-  /// Polynomial evaluation at a BigFloat value.
-  /// The returned BigFloat (with error) has the exact sign.  
-  /// In particular, if the value is 0, we return 0.
-  /// @param oldMSB is any estimate of the negative log of the evaluation
-  BigFloat evalExactSign(const BigFloat& val, const extLong& oldMSB=54) const;
-  /// Polynomial evaluation that return the same type as its argument
-  /// Caution: The type T must be greater or equal to the type NT
-  /// 	NOTE: Eventually, we will remove this restriction by
-  /// 	introduce MaxType(NT,T) for the return type.
-  template <class T>
-  MAX_TYPE(NT, T) eval(const T&) const;	
-
-  // Bounds
-  BigFloat CauchyUpperBound() const;  // Cauchy Root Upper Bound
-  BigFloat CauchyLowerBound() const;  // Cauchy Root Lower Bound
-  BigInt CauchyBound() const;  // Cauchy Root Bound from Erich Kaltofen
-  BigInt UpperBound() const;  // Another Cauchy Root Bound; an improvement over
-                               //Erich Kaltofen
-  BigFloat sepBound() const;	// separation bound (multiple roots allowed)
-  BigFloat height() const;	// height return type BigFloat
-  BigFloat length() const;	// length return type BigFloat
-
-  // Differentiation
-  Polynomial & differentiate() ;		// self-differentiation
-  Polynomial & differentiate(int n) ;		// multi self-differentiation
-
-  // Reductions of polynomials (NT must have gcd function)
-  Polynomial sqFreePart(); // Square free part of P is P/gcd(P,P'). Return gcd
-  Polynomial & primPart();   // Primitive Part of *this (which is changed)
-
-  //////////////////////////////////////////////////////////////////
-  // Resultant and discriminant
-  // NT & resultant() ;				// resultant
-  // NT & discriminant() ;			// discriminant
-
-  // Composition of Polynomials:
-  // NOT yet implemented
-
-  //////////////////////////////////////////////////////////////////
-  // Polynomial Dump
-  void dump(std::ofstream & ofs, std::string msg="",
-         std::string com="# ", std::string com2="# ") const;  // dump to file
-  void dump(std::string msg="", std::string com="# ",
-	 std::string com2="# ") const; // dump to cout
-  void filedump(std::ostream & os, std::string msg="", std::string com="# ",
-	 std::string com2="# ") const; // dump workhorse (called by dump())
-  void mapleDump() const;              // dump of maple code for Polynomial
-
-}; //Polynomial Class
-
-// template < class NT >
-//     NT Polynomial<NT>::ccc_;
-
-// ==================================================
-// Static Constants
-//	Does this belong here?
-// ==================================================
-
-template < class NT >
-CORE_INLINE
-const Polynomial<NT> & Polynomial<NT>::polyZero() {
-  static Polynomial<NT> zeroP;
-  return zeroP;
-}
-
-template < class NT >
-CORE_INLINE
-const Polynomial<NT> & Polynomial<NT>::polyUnity() {
-  static NT c[] = {1};
-  static Polynomial<NT> unityP(0, c);
-  return unityP;
-}
-
-// ==================================================
-// Useful functions for Polynomial class
-// ==================================================
-
-// polynomial arithmetic:
-template < class NT >
-Polynomial<NT> operator+(const Polynomial<NT>&, const Polynomial<NT>&);// +
-template < class NT >
-Polynomial<NT> operator-(const Polynomial<NT>&, const Polynomial<NT>&);// -
-template < class NT >
-Polynomial<NT> operator*(const Polynomial<NT>&, const Polynomial<NT>&);// *
-template < class NT >
-Polynomial<NT> power(const Polynomial<NT>&, int n);		// power
-template < class NT >
-Polynomial<NT> differentiate(const Polynomial<NT>&);		// differentiate
-template < class NT >
-Polynomial<NT> differentiate(const Polynomial<NT>&, int n);	// multi-differ.
-//Content of a Polynomial
-template < class NT >
-NT content(const Polynomial<NT>& p);
-
-template <class NT>
-bool isDivisible(Polynomial<NT> p, Polynomial<NT> q);
-
-// GCD of two polynomials
-template < class NT >
-Polynomial<NT> gcd(const Polynomial<NT>& p, const Polynomial<NT>& q);
-
-//Resultant of two polynomials
-template < class NT >
-NT res( Polynomial<NT> p,  Polynomial<NT> q);
-
-//Principal Subresultant Coefficient (psc) of two polynomials
-template < class NT >
-NT psc(int i, Polynomial<NT> p,  Polynomial<NT> q);
-
-//Returns the polynomial which contains only the real roots
-//of P which have multiplicity d
-template < class NT >
-Polynomial<NT> factorI(Polynomial<NT> p, int d);
-
-// comparisons
-template < class NT >
-bool operator==(const Polynomial<NT>&, const Polynomial<NT>&); // ==
-template < class NT >
-bool operator!=(const Polynomial<NT>&, const Polynomial<NT>&); // !=
-template < class NT >
-bool zeroP(const Polynomial <NT>&);			// =Zero Poly?
-template < class NT >
-bool unitP(const Polynomial <NT>&);			// =Unit Poly?
-
-// stream i/o
-template < class NT >
-std::ostream& operator<<(std::ostream&, const Polynomial<NT>&);
-template < class NT >
-std::istream& operator>>(std::istream&, Polynomial<NT>&);
-
-// ==================================================
-// Inline Functions
-// ==================================================
-
-// friend polynomial arithmetic:
-template < class NT >
-CORE_INLINE
-Polynomial<NT> operator+(const Polynomial<NT>& p1,
-                         const Polynomial<NT>& p2) {	// +
-  return Polynomial<NT>(p1) += p2;
-}
-template < class NT >
-CORE_INLINE
-Polynomial<NT> operator-(const Polynomial<NT>& p1,
-                         const Polynomial<NT>& p2) {	// -
-  return Polynomial<NT>(p1) -= p2;
-}
-template < class NT >
-CORE_INLINE
-Polynomial<NT> operator*(const Polynomial<NT>& p1,
-                         const Polynomial<NT>& p2) {	// *
-  return Polynomial<NT> (p1) *= p2;
-}
-template < class NT >
-CORE_INLINE
-Polynomial<NT> power(const Polynomial<NT>& p, int n) {				// power
-  return Polynomial<NT>(p).power(n);
-}
-
-// equal to zero poly?
-template < class NT >
-CORE_INLINE
-bool zeroP(const Polynomial <NT>& p) {			// =Zero Poly?
-  return (p.getTrueDegree()== -1);
-}
-template < class NT >
-CORE_INLINE
-bool unitP(const Polynomial <NT>& p) {			// =Unit Poly?
-  int d = p.getTrueDegree();
-  return ((d == 0) && p.coeff[0]==1 );
-}
-
-// get functions
-template < class NT >
-CORE_INLINE
-int Polynomial<NT>::getDegree() const {
-  return degree;
-}
-// get TRUE leading coefficient
-template < class NT >
-CORE_INLINE
-const NT & Polynomial<NT>::getLeadCoeff() const {
-  return getCoeff(getTrueDegree());
-}
-
-// get last non-zero coefficient
-template < class NT >
-CORE_INLINE
-const NT & Polynomial<NT>::getTailCoeff() const {
-  for (int i = 0; i<= getTrueDegree(); i++)
-    if (coeff[i] != 0)
-      return coeff[i];
-  // This ought to be an error (user should check this) :
-  NT * zero = new NT(0);
-  return *zero;
-}
-
-template < class NT >
-CORE_INLINE
-NT** Polynomial<NT>::getCoeffs() {
-  return &coeff;
-}
-template < class NT >
-CORE_INLINE
-const NT& Polynomial<NT>::getCoeff(int i) const {
-  //if (i > degree) return NULL;
-  assert(i <= degree);
-  return coeff[i];
-}
-// set functions
-template < class NT >
-CORE_INLINE
-bool Polynomial<NT>::setCoeff(int i, const NT & cc) {
-  if ((i<0) || (i > degree))
-    return false;
-  coeff[i] = cc;
-  return true;
-}
-
-// IMPLEMENTATIONS ARE FOUND IN
-//#include <CGAL/CORE/poly/Poly.tcc>
-//
-// We include this file from CORE/Expr.h, AFTER the definition
-// of class Expr, because otherwise VC++.net2003 can'y compile Expr.cpp
-
-} //namespace CORE
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.tcc b/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.tcc
deleted file mode 100644
index e747e7a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Poly.tcc
+++ /dev/null
@@ -1,1560 +0,0 @@
-/*
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Poly.tcc
- * Purpose: 
- *	Template implementations of the functions
- *	of the Polynomial<NT> class (found in Poly.h)
- * 
- * OVERVIEW:  
- *	Each polynomial has a nominal "degree" (this
- *		is an upper bound on the true degree, which
- *		is determined by the first non-zero coefficient).
- *	Coefficients are parametrized by some number type "NT".
- *	Coefficients are stored in the "coeff" array of
- *		length "degree + 1".  
- *	IMPORTANT CONVENTION: the zero polynomial has degree -1
- *		while nonzero constant polynomials have degree 0.
- *	
- * Bugs:
- *	Currently, coefficient number type NT only accept
- *			NT=BigInt and NT=int
- * 
- *	To see where NT=Expr will give trouble,
- *			look for NOTE_EXPR below.
- * 
- * Author: Chee Yap, Sylvain Pion and Vikram Sharma
- * Date:   May 28, 2002
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-
-template <class NT>
-int Polynomial<NT>::COEFF_PER_LINE  = 4;           // pretty print parameters
-template <class NT>
-const char* Polynomial<NT>::INDENT_SPACE ="   ";  // pretty print parameters
-
-// ==================================================
-// Polynomial Constructors
-// ==================================================
-
-template <class NT>
-Polynomial<NT>::Polynomial(void) {
-  degree = -1; 	// this is the zero polynomial!
-  coeff = NULL;
-}
-
-//Creates a polynomial with nominal degree n
-template <class NT>
-Polynomial<NT>::Polynomial(int n) {
-  assert(n>= -1);
-  degree = n;
-  if (n == -1)
-    return;	// return the zero polynomial!
-  if (n>=0)
-    coeff = new NT[n+1];
-  coeff[0]=1;			// otherwise, return the unity polynomial
-  for (int i=1; i<=n; i++)
-    coeff[i]=0;
-}
-
-template <class NT>
-Polynomial<NT>::Polynomial(int n, const NT * c) {
-  //assert("array c has n+1 elements");
-  degree = n;
-  if (n >= 0) {
-    coeff = new NT[n+1];
-    for (int i = 0; i <= n; i++)
-      coeff[i] = c[i];
-  }
-}
-
-//
-// Constructor from a vector of NT's
-///////////////////////////////////////
-template <class NT>
-Polynomial<NT>::Polynomial(const VecNT & vN) {
-  degree = vN.size()-1;
-  if (degree >= 0) {
-    coeff = new NT[degree+1];
-    for (int i = 0; i <= degree; i++)
-      coeff[i] = vN[i];
-  }
-}
-
-template <class NT>
-Polynomial<NT>::Polynomial(const Polynomial<NT> & p):degree(-1) { 
-  //degree must be initialized to -1 otherwise delete is called on coeff in operator=
-  coeff = NULL;//WHY?
-  *this = p;	// reduce to assignment operator=
-}
-
-// Constructor from a Character string of coefficients
-///////////////////////////////////////
-template <class NT>
-Polynomial<NT>::Polynomial(int n, const char * s[]) {
-  //assert("array s has n+1 elements");
-  degree = n;
-  if (n >= 0) {
-    coeff = new NT[n+1];
-    for (int i = 0; i <= n; i++)
-      coeff[i] = s[i];
-  }
-}
-
-//The BNF syntax is the following:-
-//    [poly] -> [term]| [term] '+/-' [poly] |
-//    		'-' [term] | '-' [term] '+/-' [poly]
-//    [term] -> [basic term] | [basic term] [term] | [basic term]*[term]
-//    [basic term] -> [number] | 'x' | [basic term] '^' [number]
-//                    | '(' [poly] ')' 
-//COMMENT: 
-//  [number] is assumed to be a BigInt; in the future, we probably
-//  want to generalize this to BigFloat, etc.
-//
-template <class NT>
-Polynomial<NT>::Polynomial(const string & s, char myX) {
-   string ss(s);
-   constructFromString(ss, myX);
-}
-template <class NT>
-Polynomial<NT>::Polynomial(const char * s, char myX) {
-   string ss(s);
-   constructFromString(ss, myX);
-}
-template <class NT>
-void Polynomial<NT>::constructFromString(string & s, char myX) {
-  if(myX != 'x' || myX != 'X'){
-    //Replace myX with 'x'.
-    string::size_type loc = s.find(myX, 0);
-    while(loc != string::npos){
-      s.replace(loc,1,1,'x');
-      loc = s.find(myX, loc+1);
-    }
-  }
-
-  coeff = NULL;//Did this to ape the constructor from polynomial above
-  *this = getpoly(s);
-}
-
-template <class NT>
-Polynomial<NT>::~Polynomial() {
-  if(degree >= 0)
-    delete[] coeff;
-}
-
-  ////////////////////////////////////////////////////////
-  // METHODS USED BY STRING CONSTRUCTOR ABOVE
-  ////////////////////////////////////////////////////////
-
-
-//Sets the input Polynomial to X^n
-template <class NT>
-void Polynomial<NT>::constructX(int n, Polynomial<NT>& P){
-  Polynomial<NT> q(n);//Nominal degree n
-  q.setCoeff(n,NT(1));
-  if (n>0) q.setCoeff(0,NT(0));
-  P = q;
-}
-
-//Returns in P the coeffecient starting from start
-template <class NT>
-int Polynomial<NT>::getnumber(const char* c, int start, unsigned int len,
-			  Polynomial<NT> & P){
-  int j=0;
-  char *temp = new char[len];
-  while(isint(c[j+start])){
-    temp[j]=c[j+start];j++;
-  }
-  temp[j] = '\0';
-  NT cf = NT(temp);
-  Polynomial<NT> q(0);
-  q.setCoeff(0, cf);
-  P = q;
-  delete[] temp;
-  return (j-1+start);//Exactly the length of the number
-}
-
-template <class NT>
-bool Polynomial<NT>::isint(char c){
-  if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
-     c == '5' || c == '6' || c == '7' || c == '8' || c == '9')
-    return true;
-  else
-    return false;
-}
-
-
-//Returns as integer the number starting from start in c
-template <class NT>
-int Polynomial<NT>::getint(const char* c, int start, unsigned int len,
-			  int & n){
-  int j=0;
-  char *temp = new char[len];
-  while(isint(c[j+start])){
-    temp[j]=c[j+start];j++;
-  }
-  temp[j] = '\n';
-  n = atoi(temp);
-  delete[] temp;
-  return (j-1+start);//Exactly the length of the number
-}
-
-//Given a string starting with an open parentheses returns the place
-// which marks the end of the corresponding closing parentheses.
-//Strings of the form (A).
-template <class NT>
-int Polynomial<NT>::matchparen(const char* cstr, int start){
-  int count = 0;
-  int j=start;
-  
-  do{
-    if(cstr[j] == '('){
-      count++;
-    }
-    if(cstr[j] == ')'){
-      count--;
-    }
-    j++;      
-  }while(count != 0 );//j is one more than the matching ')'
-  
-  return j-1;
-}
-
-
-template <class NT>
-int Polynomial<NT>::getbasicterm(string & s, Polynomial<NT> & P){
-  const char * cstr = s.c_str();
-  unsigned int len = s.length();
-  int i=0;
-  //Polynomial<NT> * temp = new Polynomial<NT>();
-
-  if(isint(cstr[i])){
-    i = getnumber(cstr, i, len, P);
-  }else if(cstr[i] == 'x'||cstr[i] == 'X'){
-    constructX(1, P);
-  }else if(cstr[i] =='('){
-    int oldi = i;
-    i = matchparen(cstr, i);
-    string t = s.substr(oldi+1, i -oldi -1);
-    P = getpoly(t);
-  }else{
-    std::cout <<"ERROR IN PARSING BASIC TERM" << std::endl;
-  }
-  //i+1 points to the beginning of next syntactic object in the string.
- if(cstr[i+1] == '^'){
-    int n;
-    i = getint(cstr, i+2, len, n);
-    P.power(n);
-  }
-  return i;
-}
-
-
-template <class NT>
-int Polynomial<NT>::getterm(string & s, Polynomial<NT> & P){
-  unsigned int len = s.length();
-  if(len == 0){// Zero Polynomial
-    P=Polynomial<NT>();
-    return 0;
-  }
-  unsigned int ind, oind;
-  const char* cstr =s.c_str();
-  string t;
-  //P will be used to accumulate the product of basic terms.
-  ind = getbasicterm(s, P);
-  while(ind != len-1 && cstr[ind + 1]!='+' && cstr[ind + 1]!='-' ){
-    //Recursively get the basic terms till we reach the end or see
-    // a '+' or '-' sign.
-    if(cstr[ind + 1] == '*'){
-      t = s.substr(ind + 2, len - ind -2);
-      oind = ind + 2;
-    }else{
-      t = s.substr(ind + 1, len -ind -1);
-      oind = ind + 1;
-    }
-
-    Polynomial<NT> R;
-    ind = oind + getbasicterm(t, R);//Because the second term is the offset in
-                                     //t
-    P *= R;
-  }
-
-  return ind;
-}
-
-template <class NT>
-Polynomial<NT> Polynomial<NT>::getpoly(string & s){
-
-    //Remove white spaces from the string
-    string::size_type cnt=s.find(' ',0);
-    while(cnt != string::npos){
-      s.erase(cnt, 1);
-      cnt = s.find(' ', cnt);
-    }
-
-    unsigned int len = s.length();
-    if(len <= 0){//Zero Polynomial
-      return Polynomial<NT>();
-    }
-
-    //To handle the case when there is one '=' sign
-    //Suppose s is of the form s1 = s2. Then we assign s to
-    //s1 + (-1)(s2) and reset len
-    string::size_type loc;
-    if((loc=s.find('=',0)) != string::npos){
-      s.replace(loc,1,1,'+');
-      string s3 = "(-1)(";
-      s.insert(loc+1, s3);
-      len = s.length();
-      s.insert(len, 1, ')');
-    }
-    len = s.length();
-
-    const char *cstr = s.c_str();
-    string t;
-    Polynomial<NT> P;
-    // P will be the polynomial in which we accumulate the
-    //sum and difference of the different terms.
-    unsigned int ind;
-    if(cstr[0] == '-'){
-      t = s.substr(1, len);
-      ind = getterm(t,P) + 1;
-      P.negate();
-    }else{
-      ind = getterm(s, P);
-    }
-    unsigned int oind =0;//the string between oind and ind is a term
-    while(ind != len -1){
-      Polynomial<NT> R;
-      t = s.substr(ind + 2, len -ind -2);
-      oind = ind;
-      ind = oind + 2 + getterm(t, R);
-      if(cstr[oind + 1] == '+')
-		P += R;
-      else if(cstr[oind + 1] == '-')
-		P -= R;
-      else
-	std::cout << "ERROR IN PARSING POLY! " << std::endl;
-    }
-
-    return (P);
-}
-
-  ////////////////////////////////////////////////////////
-  // METHODS
-  ////////////////////////////////////////////////////////
-
-// assignment:
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::operator=(const Polynomial<NT>& p) {
-  if (this == &p)
-    return *this;	// self-assignment
-  if (degree >=0)  delete[] coeff;
-  degree = p.getDegree();
-  if (degree < 0) return *this;
-  coeff = new NT[degree +1];
-  for (int i = 0; i <= degree; i++)
-    coeff[i] = p.coeff[i];
-  return *this;
-}
-
-// getTrueDegree
-template <class NT>
-int Polynomial<NT>::getTrueDegree() const {
-  for (int i=degree; i>=0; i--) {
-    if (sign(coeff[i]) != 0)
-      return i;
-  }
-  return -1;	// Zero polynomial
-}
-
-//get i'th Coeff. We check whether i is not greater than the
-// true degree and if not then return coeff[i] o/w 0
-template <class NT>
-NT Polynomial<NT>::getCoeffi(int i) const {
-  int deg = getTrueDegree();
-  if(i > deg)
-      return NT(0);
-  return coeff[i];
-}
-
-// ==================================================
-// polynomial arithmetic
-// ==================================================
-
-// Expands the nominal degree to n;
-//	Returns n if nominal degree is changed to n
-//	Else returns -2
-template <class NT>
-int Polynomial<NT>::expand(int n) {
-  if ((n <= degree)||(n < 0))
-    return -2;
-  int i;
-  NT * c = coeff;
-  coeff = new NT[n+1];
-  for (i = 0; i<= degree; i++)
-    coeff[i] = c[i];
-  for (i = degree+1; i<=n; i++)
-    coeff[i] = 0;
-  delete[] c;
-  degree = n;
-  return n;
-}
-
-// contract() gets rid of leading zero coefficients
-//	and returns the new (true) degree;
-//	It returns -2 if this is a no-op
-template <class NT>
-int Polynomial<NT>::contract() {
-  int d = getTrueDegree();
-  if (d == degree)
-    return (-2);  // nothing to do
-  else
-    degree = d;
-  NT * c = coeff;
-  if (degree !=-1){
-    coeff = new NT[d+1];
-    for (int i = 0; i<= d; i++)
-      coeff[i] = c[i];
-  }
-  delete[] c;
-  return d;
-}
-
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::operator+=(const Polynomial<NT>& p) { // +=
-  int d = p.getDegree();
-  if (d > degree)
-    expand(d);
-  for (int i = 0; i<=d; i++)
-    coeff[i] += p.coeff[i];
-
-  return *this;
-}
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::operator-=(const Polynomial<NT>& p) { // -=
-  int d = p.getDegree();
-  if (d > degree)
-    expand(d);
-  for (int i = 0; i<=d; i++)
-    coeff[i] -= p.coeff[i];
-  return *this;
-}
-
-// SELF-MULTIPLICATION
-// This is quadratic time multiplication!
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::operator*=(const Polynomial<NT>& p) { // *=
-  if (degree==-1) return *this;
-  if (p.getDegree()==-1){
-    degree=-1;
-    delete[] coeff;
-    return *this;
-  }
-  int d = degree + p.getDegree();
-  NT * c = new NT[d+1];
-  for (int i = 0; i<=d; i++)
-    c[i] = 0;
-
-  for (int i = 0; i<=p.getDegree(); i++)
-    for (int j = 0; j<=degree; j++) {
-      c[i+j] += p.coeff[i] * coeff[j];
-    }
-  degree = d;
-  delete[] coeff;
-  coeff = c;
-  return *this;
-}
-
-// Multiply by a scalar
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::mulScalar( const NT & c) {
-  for (int i = 0; i<=degree ; i++)
-    coeff[i] *= c;
-  return *this;
-}
-
-// mulXpower: Multiply by X^i (COULD be a divide if i<0)
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::mulXpower(int s) {
-  // if s >= 0, then this is equivalent to
-  // multiplying by X^s;  if s < 0, to dividing by X^s
-  if (s==0)
-    return *this;
-  int d = s+getTrueDegree();
-  if (d < 0) {
-    degree = -1;
-    delete[] coeff;
-    coeff = NULL;
-    return *this;
-  }
-  NT * c = new NT[d+1];
-  if (s>0)
-    for (int j=0;  j <= d; j++) {
-      if (j <= degree)
-        c[d-j] = coeff[d-s-j];
-      else
-        c[d-j] = 0;
-    }
-  if (s<0) {
-    for (int j=0; j <= d; j++)
-      c[d-j] = coeff[d-s-j];  // since s<0, (d-s-j) > (d-j) !!
-  }
-  delete[] coeff;
-  coeff = c;
-  degree = d;
-  return *this;
-}//mulXpower
-
-// REDUCE STEP (helper for PSEUDO-REMAINDER function)
-// Let THIS=(*this) be the current polynomial, and P be the input
-//	argument for reduceStep.  Let R be returned polynomial.
-//	R has the special form as a binomial,
-//		R = C + X*M
-//	where C is a constant and M a monomial (= coeff * some power of X).
-//	Moreover, THIS is transformed to a new polynomial, THAT, which
-//	is given by
-// 		(C * THIS) = M * P  + THAT
-//	MOREOVER: deg(THAT) < deg(THIS) unless deg(P)>deg(Q).
-//	Basically, C is a power of the leading coefficient of P.
-//	REMARK: R is NOT defined as C+M, because in case M is
-//	a constant, then we cannot separate C from M.
-//	Furthermore, R.mulScalar(-1) gives us M.
-template <class NT>
-Polynomial<NT> Polynomial<NT>::reduceStep (
-  const Polynomial<NT>& p) {
-  // 	Chee: Omit the next 2 contractions as unnecessary
-  // 	since reduceStep() is only called by pseudoRemainder().
-  // 	Also, reduceStep() already does a contraction before returning.
-  // p.contract();	
-  // contract();	// first contract both polynomials
-  Polynomial<NT> q(p);		// q is initially a copy of p
-  //	but is eventually M*P
-  int pDeg  = q.degree;
-  int myDeg = degree;
-  if (pDeg == -1)
-    return *(new Polynomial());  // Zero Polynomial
-  // NOTE: pDeg=-1 (i.e., p=0) is really an error condition!
-  if (myDeg < pDeg)
-    return *(new Polynomial(0));  // Unity Polynomial
-  // i.e., C=1, M=0.
-  // Now (myDeg >= pDeg).  Start to form the Return Polynomial R=C+X*M
-  Polynomial<NT> R(myDeg - pDeg + 1);  // deg(M)= myDeg - pDeg
-  q.mulXpower(myDeg - pDeg);  	 // q is going to become M*P
-
-  NT myLC = coeff[myDeg];	  // LC means "leading coefficient"
-  NT qLC = q.coeff[myDeg];  // p also has degree "myDeg" (qLC non-zero)
-  NT LC;
-
-  //  NT must support
-  //  isDivisible(x,y), gcd(x,y), div_exact(x,y) in the following:
-  //  ============================================================
-  if (isDivisible(myLC, qLC)) { // myLC is divisible by qLC
-    LC = div_exact(myLC, qLC);	 
-    R.setCoeff(0, 1);  		 //  C = 1,
-
-    R.setCoeff(R.degree, LC); //  M = LC * X^(myDeg-pDeg)
-    q.mulScalar(LC); 	  //  q = M*P. 
-  }
-  else if (isDivisible(qLC, myLC)) { // qLC is divisible by myLC
-    LC = div_exact(qLC, myLC);	 //
-    if ((LC != 1) && (LC != -1)) { // IMPORTANT: unlike the previous
-      // case, we need an additional condition
-      // that LC != -1.  THis is because
-      // if (LC = -1), then we have qLC and
-      // myLC are mutually divisible, and
-      // we would be updating R twice!
-      R.setCoeff(0, LC); 	   // C = LC, 
-      R.setCoeff(R.degree, 1);     // M = X^(myDeg-pDeg)(THIS WAS NOT DONE)
-      mulScalar(LC); 	   	   // THIS => THIS * LC
-
-    }
-  } else {  			// myLC and qLC are not mutually divisible
-    NT g = gcd(qLC, myLC); 	// This ASSUMES gcd is defined in NT !!
-    //NT g = 1;  			// In case no gcd is available
-    if (g == 1) {
-      R.setCoeff(0, qLC);	  	// C = qLC
-      R.setCoeff(R.degree, myLC);	 // M = (myLC) * X^{myDeg-pDeg}
-      mulScalar(qLC);	 		// forming  C * THIS
-      q.mulScalar(myLC);		// forming  M * P
-    } else {
-      NT qLC1= div_exact(qLC,g);
-      NT myLC1= div_exact(myLC,g);
-      R.setCoeff(0, qLC1);	  	// C = qLC/g
-      R.setCoeff(R.degree, myLC1);	// M = (myLC/g) * X^{myDeg-pDeg}
-      mulScalar(qLC1);	 	// forming  C * THIS
-      q.mulScalar(myLC1);		// forming  M * P
-    }
-  }
-  (*this) -= q;		// THAT = (C * THIS) - (M * P)
-
-  contract();
-
-  return R;		// Returns R = C + X*M
-}// reduceStep
-
-// For internal use only:
-// Checks that c*A = B*m + AA 
-// 	where A=(*oldthis) and AA=(*newthis)
-template <class NT>
-Polynomial<NT> Polynomial<NT>::testReduceStep(const Polynomial<NT>& A, 
-	const Polynomial<NT>& B) {
-std::cout << "+++++++++++++++++++++TEST REDUCE STEP+++++++++++++++++++++\n";
-  Polynomial<NT> cA(A);
-  Polynomial<NT> AA(A);
-  Polynomial<NT> quo;
-  quo = AA.reduceStep(B);	        // quo = c + X*m  (m is monomial, c const)
-                                // where c*A = B*m + (*newthis)
-std::cout << "A = " << A << std::endl;
-std::cout << "B = " << B << std::endl;
-  cA.mulScalar(quo.coeff[0]);    // A -> c*A
-  Polynomial<NT> m(quo);
-  m.mulXpower(-1);            // m's value is now m
-std::cout << "c = " << quo.coeff[0] << std::endl;
-std::cout << "c + xm = " << quo << std::endl;
-std::cout << "c*A = " << cA << std::endl;
-std::cout << "AA = " << AA << std::endl;
-std::cout << "B*m = " << B*m << std::endl;
-std::cout << "B*m + AA = " << B*m + AA << std::endl;
-  if (cA == (B*m + AA))
-	  std::cout << "CORRECT inside testReduceStep" << std::endl;
-  else
-	  std::cout << "ERROR inside testReduceStep" << std::endl;
-std::cout << "+++++++++++++++++END TEST REDUCE STEP+++++++++++++++++++++\n";
-  return quo;
-}
-
-// PSEUDO-REMAINDER and PSEUDO-QUOTIENT:
-// Let A = (*this) and B be the argument polynomial.
-// Let Quo be the returned polynomial, 
-// and let the final value of (*this) be Rem.
-// Also, C is the constant that we maintain.
-// We are computing A divided by B.  The relation we guarantee is 
-// 		(C * A) = (Quo * B)  + Rem
-// where deg(Rem) < deg(B).  So Rem is the Pseudo-Remainder
-// and Quo is the Pseudo-Quotient.
-// Moreover, C is uniquely determined (we won't spell it out)
-// except to note that
-//	C divides D = (LC)^{deg(A)-deg(B)+1}
-//	where LC is the leading coefficient of B.
-// NOTE: 1. Normally, Pseudo-Remainder is defined so that C = D
-// 	 So be careful when using our algorithm.
-// 	 2. We provide a version of pseudoRemainder which does not
-// 	 require C as argument.  [For efficiency, we should provide this
-//	 version directly, instead of calling the other version!]
-
-template <class NT>
-Polynomial<NT> Polynomial<NT>::pseudoRemainder (
-  const Polynomial<NT>& B) {
-	NT temp;	// dummy argument to be discarded
-	return pseudoRemainder(B, temp);
-}//pseudoRemainder
-
-template <class NT>
-Polynomial<NT> Polynomial<NT>::pseudoRemainder (
-  const Polynomial<NT>& B, NT & C) { 
-  contract();         // Let A = (*this).  Contract A.
-  Polynomial<NT> tmpB(B);
-  tmpB.contract();    // local copy of B
-  C = NT(1);  // Initialized to C=1.
-  if (B.degree == -1)  {
-    std::cout << "ERROR in Polynomial<NT>::pseudoRemainder :\n" <<
-    "    -- divide by zero polynomial" << std::endl;
-    return Polynomial(0);  // Unit Polynomial (arbitrary!)
-  }
-  if (B.degree > degree) {
-    return Polynomial(); // Zero Polynomial
-    // CHECK: 1*THIS = 0*B + THAT,  deg(THAT) < deg(B)
-  }
-
-  Polynomial<NT> Quo;  // accumulate the return polynomial, Quo
-  Polynomial<NT> tmpQuo;
-  while (degree >= B.degree) {  // INVARIANT: C*A = B*Quo + (*this)
-    tmpQuo = reduceStep(tmpB);  // Let (*this) be (*oldthis), which
-			        // is transformed into (*newthis). Then,
-                                //     c*(*oldthis) = B*m + (*newthis)
-                                // where tmpQuo = c + X*m
-    // Hence,   C*A =   B*Quo +   (*oldthis)      -- the old invariant
-    //        c*C*A = c*B*Quo + c*(*oldthis)
-    //              = c*B*Quo + (B*m + (*newthis))
-    //              = B*(c*Quo + m)  + (*newthis)
-    // i.e, to update invariant, we do C->c*C,  Quo --> c*Quo + m.
-    C *= tmpQuo.coeff[0];	    // C = c*C
-    Quo.mulScalar(tmpQuo.coeff[0]); // Quo -> c*Quo
-    tmpQuo.mulXpower(-1);           // tmpQuo is now equal to m
-    Quo += tmpQuo;                  // Quo -> Quo + m 
-  }
-
-  return Quo;	// Quo is the pseudo-quotient
-}//pseudoRemainder
-
-// Returns the negative of the pseudo-remainder
-// 	(self-modification)
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::negPseudoRemainder (
-  const Polynomial<NT>& B) {
-	NT temp;	// dummy argument to be discarded
-	pseudoRemainder(B, temp);
-	if (temp < 0) return (*this);
-	return negate();
-}
-
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::operator-() {	// unary minus
-  for (int i=0; i<=degree; i++)
-    coeff[i] *= -1;
-  return *this;
-}
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::power(unsigned int n) {	// self-power
-  if (n == 0) {
-    degree = 0;
-    delete [] coeff;
-    coeff = new NT[1];
-    coeff[0] = 1;
-  } else {
-    Polynomial<NT> p = *this;
-    for (unsigned int i=1; i<n; i++)
-      *this *= p;		// Would a binary power algorithm be better?
-  }
-  return *this;
-}
-
-// evaluation of BigFloat value
-//   NOTE: we think of the polynomial as an analytic function in this setting
-//      If the coefficients are more general than BigFloats,
-//      then we may get inexact outputs, EVEN if the input value f is exact.
-//      This is because we would have to convert these coefficients into
-//      BigFloats, and this conversion precision is controlled by the
-//      global variables defRelPrec and defAbsPrec.
-//   
-/*
-template <class NT>
-BigFloat Polynomial<NT>::eval(const BigFloat& f) const {	// evaluation
-  if (degree == -1)
-    return BigFloat(0);
-  if (degree == 0)
-    return BigFloat(coeff[0]);
-  BigFloat val(0);
-  for (int i=degree; i>=0; i--) {
-    val *= f;
-    val += BigFloat(coeff[i]);	
-  }
-  return val;
-}//eval
-*/
-
-/// Evaluation Function (generic version, always returns the exact value)
-///
-///  This evaluation function is easy to use, but may not be efficient
-///  when you have BigRat or Expr values.
-///
-/// User must be aware that the return type of eval is Max of Types NT and T.
-///
-/// E.g., If NT is BigRat, and T is Expr then Max(NT,T)=Expr. 
-/// 	
-/// REMARK: If NT is BigFloat, it is assumed that the BigFloat is error-free.  
-
-template <class NT>
-template <class T>
-MAX_TYPE(NT, T) Polynomial<NT>::eval(const T& f) const {	// evaluation
-  typedef MAX_TYPE(NT, T) ResultT;
-  if (degree == -1)
-    return ResultT(0);
-  if (degree == 0)
-    return ResultT(coeff[0]);
-  ResultT val(0);
-  for (int i=degree; i>=0; i--) {
-    val *= ResultT(f);
-    val += ResultT(coeff[i]);	
-  }
-  return val;
-}//eval
-
-
-/// Approximate Evaluation of Polynomials
-/// 	the coefficients of the polynomial are approximated to some
-///	specified composite precision (r,a).
-/// @param  f evaluation point 
-/// @param  r relative precision to which the coefficients are evaluated
-/// @param  a absolute precision to which the coefficients are evaluated
-/// @return a BigFloat with error containing value of the polynomial.
-///     If zero is in this BigFloat interval, then we don't know the sign.
-//
-// 	ASSERT: NT = BigRat or Expr
-//
-template <class NT>
-BigFloat Polynomial<NT>::evalApprox(const BigFloat& f, 
-	const extLong& r, const extLong& a) const {	// evaluation
-  if (degree == -1)
-    return BigFloat(0);
-  if (degree == 0)
-    return BigFloat(coeff[0], r, a);
-
-  BigFloat val(0), c;
-  for (int i=degree; i>=0; i--) {
-    c = BigFloat(coeff[i], r, a);	
-    val *= f; 
-    val += c;
-  }
-  return val;
-}//evalApprox
-
-// This BigInt version of evalApprox should never be called...
-template <>
-CORE_INLINE
-BigFloat Polynomial<BigInt>::evalApprox(const BigFloat& /*f*/,
-	const extLong& /*r*/, const extLong& /*a*/) const {	// evaluation
-  assert(0);
-  return BigFloat(0);
-}
-
-
-
-/**
- * Evaluation at a BigFloat value
- * using "filter" only when NT is BigRat or Expr.
- * Using filter means we approximate the polynomials
- * coefficients using BigFloats.  If this does not give us
- * the correct sign, we will resort to an "exact" evaluation
- * using Expr.
- *
- * If NT <= BigFloat, we just call eval().
- *
-   We use the following heuristic estimates of precision for coefficients:
-
-      r = 1 + lg(|P|_\infty) + lg(d+1)  		if f <= 1
-      r = 1 + lg(|P|_\infty) + lg(d+1) + d*lg|f| 	if f > 1
-      
-   if the filter fails, then we use Expr to do evaluation.
-
-   This function is mainly called by Newton iteration (which
-   has some estimate for oldMSB from previous iteration).
-
-   @param p polynomial to be evaluated
-   @param val the evaluation point
-   @param oldMSB an rough estimate of the lg|p(val)|
-   @return bigFloat interval contain p(val), with the correct sign
-
- ***************************************************/
-template <class NT>
-BigFloat Polynomial<NT>::evalExactSign(const BigFloat& val,
-	 const extLong& oldMSB) const {
-    assert(val.isExact());
-    if (getTrueDegree() == -1)
-      return BigFloat(0);
-  
-    extLong r;
-    r = 1 + BigFloat(height()).uMSB() + clLg(long(getTrueDegree()+1));
-    if (val > 1)
-      r += getTrueDegree() * val.uMSB();
-    r += core_max(extLong(0), -oldMSB);
-  
-    if (hasExactDivision<NT>::check()) { // currently, only to detect NT=Expr and NT=BigRat
-        BigFloat rVal = evalApprox(val, r);
-        if (rVal.isZeroIn()) {
-	  Expr eVal = eval(Expr(val));	// eval gives exact value
-	  eVal.approx(54,CORE_INFTY);  // if value is 0, we get exact 0
-	  return eVal.BigFloatValue();
-	} else 
-          return rVal;
-    } else
-	return BigFloat(eval(val));
-
-   //return 0; // unreachable
-  }//evalExactSign
-  
-
-//============================================================
-// Bounds
-//============================================================
-
-// Cauchy Upper Bound on Roots
-// -- ASSERTION: NT is an integer type
-template < class NT >
-BigFloat Polynomial<NT>::CauchyUpperBound() const {
-  if (zeroP(*this))
-    return BigFloat(0);
-  NT mx = 0;
-  int deg = getTrueDegree();
-  for (int i = 0; i < deg; ++i) {
-    mx = core_max(mx, abs(coeff[i]));
-  }
-  Expr e = mx;
-  e /= Expr(abs(coeff[deg]));
-  e.approx(CORE_INFTY, 2);
-  // get an absolute approximate value with error < 1/4
-  return (e.BigFloatValue().makeExact() + 2);
-}
-
-//============================================================
-// An iterative version of computing Cauchy Bound from Erich Kaltofen.
-// See the writeup under collab/sep/.
-//============================================================
-template < class NT >
-BigInt Polynomial<NT>::CauchyBound() const {
-  int deg = getTrueDegree();
-  BigInt B(1);
-  BigFloat lhs(0), rhs(1);
-  while (true) {
-    /* compute \sum_{i=0}{deg-1}{|a_i|B^i} */
-    lhs = 0;
-    for (int i=deg-1; i>=0; i--) {
-      lhs *= B;
-      lhs += abs(coeff[i]);
-    }
-    lhs /= abs(coeff[deg]);
-    lhs.makeFloorExact();
-    /* compute B^{deg} */
-    if (rhs <= lhs) {
-      B <<= 1;
-      rhs *= (BigInt(1)<<deg);
-    } else
-      break;
-  }
-  return B;
-}
-
-//====================================================================
-//Another iterative bound which is at least as good as the above bound
-//by Erich Kaltofen.
-//====================================================================
-template < class NT >
-BigInt Polynomial<NT>::UpperBound() const {
-  int deg = getTrueDegree();
-
-  BigInt B(1);
-  BigFloat lhsPos(0), lhsNeg(0), rhs(1);
-  while (true) {
-    /* compute \sum_{i=0}{deg-1}{|a_i|B^i} */
-    lhsPos = lhsNeg = 0;
-    for (int i=deg-1; i>=0; i--) {
-      if (coeff[i]>0) {
-      	lhsPos = lhsPos * B + coeff[i];
-      	lhsNeg = lhsNeg * B;
-      } else {
-      	lhsNeg = lhsNeg * B - coeff[i];
-      	lhsPos = lhsPos * B;
-      } 
-    }
-    lhsNeg /= abs(coeff[deg]);
-    lhsPos /= abs(coeff[deg]);
-    lhsPos.makeCeilExact();
-    lhsNeg.makeCeilExact();
-
-    /* compute B^{deg} */
-    if (rhs <= max(lhsPos,lhsNeg)) {
-      B <<= 1;
-      rhs *= (BigInt(1)<<deg);
-    } else
-      break;
-  }
-  return B;
-}
-
-// Cauchy Lower Bound on Roots
-// -- ASSERTION: NT is an integer type
-template < class NT >
-BigFloat Polynomial<NT>::CauchyLowerBound() const {
-  if ((zeroP(*this)) || coeff[0] == 0)
-    return BigFloat(0);
-  NT mx = 0;
-  int deg = getTrueDegree();
-  for (int i = 1; i <= deg; ++i) {
-    mx = core_max(mx, abs(coeff[i]));
-  }
-  Expr e = Expr(abs(coeff[0]))/ Expr(abs(coeff[0]) + mx);
-  e.approx(2, CORE_INFTY);
-  // get an relative approximate value with error < 1/4
-  return (e.BigFloatValue().makeExact().div2());
-}
-
-// Separation bound for polynomials that may have multiple roots.
-// We use the Rump-Schwartz bound.
-//
-//    ASSERT(the return value is an exact BigFloat and a Lower Bound)
-//
-template < class NT >
-BigFloat Polynomial<NT>::sepBound() const {
-  BigInt d;
-  BigFloat e;
-  int deg = getTrueDegree();
-
-  CORE::power(d, BigInt(deg), ((deg)+4)/2);
-  e = CORE::power(height()+1, deg);
-  e.makeCeilExact(); // see NOTE below
-  return (1/(e*2*d)).makeFloorExact();
-        // BUG fix: ``return 1/e*2*d'' was wrong
-        // NOTE: the relative error in this division (1/(e*2*d))
-        //   is defBFdivRelPrec (a global variable), but
-        //   since this is always positive, we are OK.
-        //   But to ensure that defBFdivRelPrec is used,
-        //   we must make sure that e and d are exact.
-        // Finally, using "makeFloorExact()" is OK because
-        //   the mantissa minus error (i.e., m-err) will remain positive
-        //   as long as the relative error (defBFdivRelPrec) is >1.
-}
-
-/// height function
-/// @return a BigFloat with error
-template < class NT >
-BigFloat Polynomial<NT>::height() const {
-  if (zeroP(*this))
-    return BigFloat(0);
-  int deg = getTrueDegree();
-  NT ht = 0;
-  for (int i = 0; i< deg; i++)
-    if (ht < abs(coeff[i]))
-      ht = abs(coeff[i]);
-  return BigFloat(ht);
-}
-
-/// length function
-/// @return a BigFloat with error
-template < class NT >
-BigFloat Polynomial<NT>::length() const {
-  if (zeroP(*this))
-    return BigFloat(0);
-  int deg = getTrueDegree();
-  NT length = 0;
-  for (int i = 0; i< deg; i++)
-    length += abs(coeff[i]*coeff[i]);
-  return sqrt(BigFloat(length));
-}
-
-//============================================================
-// differentiation
-//============================================================
-
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::differentiate() {	// self-differentiation
-  if (degree >= 0) {
-    NT * c = new NT[degree];
-    for (int i=1; i<=degree; i++)
-      c[i-1] = coeff[i] * i;
-    degree--;
-    delete[] coeff;
-    coeff = c;
-  }
-  return *this;
-}// differentiation
-
-// multi-differentiate
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::differentiate(int n) {
-  assert(n >= 0);
-  for (int i=1; i<=n; i++)
-    this->differentiate();
-  return *this;
-} // multi-differentiate
-
-
-// ==================================================
-// GCD, content, primitive and square-free parts
-// ==================================================
-
-/// divisibility predicate for polynomials
-// isDivisible(P,Q) returns true iff Q divides P
-// To FIX: the predicate name is consistent with Expr.h but not with BigInt.h
-template <class NT>
-bool isDivisible(Polynomial<NT> p, Polynomial<NT> q) {
-  if(zeroP(p))
-    return true;
-  if(zeroP(q))
-    return false;  // We should really return error!
-  if(p.getTrueDegree() < q.getTrueDegree())
-    return false;
-  p.pseudoRemainder(q);
-  if(zeroP(p))
-    return true;
-  else
-    return false;
-}//isDivisible
-
-//Content of a polynomial P
-//      -- content(P) is just the gcd of all the coefficients
-//      -- REMARK: by definition, content(P) is non-negative
-//                 We rely on the fact that NT::gcd always
-//                 return a non-negative value!!!
-template <class NT>
-NT content(const Polynomial<NT>& p) {
-  if(zeroP(p))
-    return 0;
-  int d = p.getTrueDegree();
-  if(d == 0){
-    if(p.coeff[0] > 0)
-      return p.coeff[0];
-    else
-      return -p.coeff[0];
-  }
-
-  NT content = p.coeff[d];
-  for (int i=d-1; i>=0; i--) {
-    content = gcd(content, p.coeff[i]);
-    if(content == 1) break;   // remark: gcd is non-negative, by definition
-  }
-  //if (p.coeff[0] < 0) return -content;(BUG!)
-  return content;
-}//content
-
-// Primitive Part:  (*this) is transformed to primPart and returned
-//	-- primPart(P) is just P/content(P)
-//	-- Should we return content(P) instead? [SHOULD IMPLEMENT THIS]
-// IMPORTANT: we require that content(P)>0, hence
-// 	the coefficients of primPart(P) does 
-// 	not change sign; this is vital for use in Sturm sequences
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::primPart() {
-  // ASSERT: GCD must be provided by NT
-  int d = getTrueDegree();
-  assert (d >= 0);
-  if (d == 0) {
-    if (coeff[0] > 0) coeff[0] = 1;
-    else coeff[0] = -1;
-    return *this;
-  }
-
-  NT g = content(*this);
-  if (g == 1 && coeff[d] > 0)
-     return (*this);  
-  for (int i=0; i<=d; i++) {
-     coeff[i] =  div_exact(coeff[i], g);
-  }
-  return *this;
-}// primPart
-
-//GCD of two polynomials.
-//   --Assumes that the coeffecient ring NT has a gcd function
-//   --Returns the gcd with a positive leading coefficient (*)
-//     otherwise division by gcd causes a change of sign affecting
-//     Sturm sequences.
-//   --To Check: would a non-recursive version be much better?
-template <class NT>
-Polynomial<NT> gcd(const Polynomial<NT>& p, const Polynomial<NT>& q) {
-
-  // If the first polynomial has a smaller degree then the second,
-  // then change the order of calling
-  if(p.getTrueDegree() < q.getTrueDegree())
-    return gcd(q,p);
-
-  // If any polynomial is zero then the gcd is the other polynomial
-  if(zeroP(q)){
-    if(zeroP(p))
-       return p;
-    else{
-       if(p.getCoeffi(p.getTrueDegree()) < 0){
-         return Polynomial<NT>(p).negate();
-       }else
-         return p;	// If q<>0, then we know p<>0
-   }
-  }
-  Polynomial<NT> temp0(p);
-  Polynomial<NT> temp1(q);
-
-  // We want to compute:
-  // gcd(p,q) = gcd(content(p),content(q)) * gcd(primPart(p), primPart(q))
-
-  NT cont0 = content(p);	// why is this temporary needed?
-  NT cont1 = content(q);
-  NT cont = gcd(cont0,cont1);
-  temp0.primPart();
-  temp1.primPart();
-
-  temp0.pseudoRemainder(temp1);
-  return (gcd(temp1, temp0).mulScalar(cont));
-}//gcd
-
-// sqFreePart()
-// 	-- this is a self-modifying operator!
-// 	-- Let P =(*this) and Q=square-free part of P.
-// 	-- (*this) is transformed into P, and gcd(P,P') is returned
-// NOTE: The square-free part of P is defined to be P/gcd(P, P')
-template <class NT>
-Polynomial<NT>  Polynomial<NT>::sqFreePart() {
-
-  int d = getTrueDegree();
-  if(d <= 1) // linear polynomials and constants are square-free
-    return *this;
-
-  Polynomial<NT> temp(*this);
-  Polynomial<NT> R = gcd(*this, temp.differentiate()); // R = gcd(P, P')
-
-  // If P and P' have a constant gcd, then P is squarefree
-  if(R.getTrueDegree() == 0)
-    return (Polynomial<NT>(0)); // returns the unit polynomial as gcd
-
-  (*this)=pseudoRemainder(R); // (*this) is transformed to P/R, the sqfree part
-  //Note: This is up to multiplication by units
-  return (R); // return the gcd
-}//sqFreePart()
-
-
-// ==================================================
-// Useful member functions
-// ==================================================
-
-// reverse:
-// 	reverses the list of coefficients
-template <class NT>
-void Polynomial<NT>::reverse() {
-  NT tmp;
-  for (int i=0; i<= degree/2; i++) {
-    tmp = coeff[i];
-    coeff[i] =   coeff[degree-i];
-    coeff[degree-i] = tmp;
-  }
-}//reverse
-
-// negate: 
-// 	multiplies the polynomial by -1
-// 	Chee: 4/29/04 -- added negate() to support negPseudoRemainder(B)
-template <class NT>
-Polynomial<NT> & Polynomial<NT>::negate() {
-  for (int i=0; i<= degree; i++) 
-    coeff[i] *= -1;  	// every NT must be able to construct from -1
-  return *this;
-}//negate
-
-// makeTailCoeffNonzero
-// 	Divide (*this) by X^k, so that the tail coeff becomes non-zero.
-//	The value k is returned.  In case (*this) is 0, return k=-1.
-//	Otherwise, if (*this) is unchanged, return k=0.
-template <class NT>
-int Polynomial<NT>::makeTailCoeffNonzero() {
-  int k=-1;
-  for (int i=0; i <= degree; i++) {
-    if (coeff[i] != 0) {
-      k=i;
-      break;
-    }
-  }
-  if (k <= 0)
-    return k;	// return either 0 or -1
-  degree -=k;		// new (lowered) degree
-  NT * c = new NT[1+degree];
-  for (int i=0; i<=degree; i++)
-    c[i] = coeff[i+k];
-  delete[] coeff;
-  coeff = c;
-  return k;
-}//
-
-// filedump(string msg, ostream os, string com, string com2):
-//      Dumps polynomial to output stream os
-//      msg is any message
-//      NOTE: Default is com="#", which is placed at start of each 
-//            output line. 
-template <class NT>
-void Polynomial<NT>::filedump(std::ostream & os,
-                          std::string msg,
-			  std::string commentString,
-                          std::string commentString2) const {
-  int d= getTrueDegree();
-  if (msg != "") os << commentString << msg << std::endl;
-  int i=0;
-  if (d == -1) { // if zero polynomial
-    os << commentString << "0";
-    return;
-  }
-  for (; i<=d;  ++i)	// get to the first non-zero coeff
-    if (coeff[i] != 0)
-      break;
-  int termsInLine = 1;
-
-  // OUTPUT the first nonzero term
-  os << commentString;
-  if (coeff[i] == 1) {			// special cases when coeff[i] is
-    if (i>1) os << "x^" << i;	// either 1 or -1 
-    else if (i==1) os << "x" ;
-    else os << "1";
-  } else if (coeff[i] == -1) {
-    if (i>1) os << "-x^" << i;
-    else if (i==1) os << "-x" ;
-    else os << "-1";
-  } else {				// non-zero coeff
-    os << coeff[i];
-    if (i>1) os << "*x^" << i;
-    else if (i==1) os << "x" ;
-  } 
-  // OUTPUT the remaining nonzero terms
-  for (i++ ; i<= getTrueDegree(); ++i) {
-    if (coeff[i] == 0) 
-      continue;
-    termsInLine++;
-    if (termsInLine % Polynomial<NT>::COEFF_PER_LINE == 0) {
-      os << std::endl;
-      os << commentString2;
-    }
-    if (coeff[i] == 1) {		// special when coeff[i] = 1
-      if (i==1) os << " + x";
-      else os << " + x^" << i;
-    } else if (coeff[i] == -1) {	// special when coeff[i] = -1
-      if (i==1) os << " - x";
-      else os << " -x^" << i;
-    } else {				// general case
-      if(coeff[i] > 0){	
-	os << " + ";
-        os << coeff[i];
-      }else
-        os << coeff[i];
-
-      if (i==1) os << "*x";
-      else os << "*x^" << i;
-    } 
-  }
-}//filedump
-
-// dump(message, ofstream, commentString) -- dump to file
-template <class NT>
-void Polynomial<NT>::dump(std::ofstream & ofs,
-		std::string msg,
-		std::string commentString,
-                std::string commentString2) const {
-  filedump(ofs, msg, commentString, commentString2);
-}
-
-// dump(message) 	-- to std output
-template <class NT>
-void Polynomial<NT>::dump(std::string msg, std::string com,
-		std::string com2) const {
-  filedump(std::cout, msg, com, com2);
-}
-
-// Dump of Maple Code for Polynomial
-template <class NT>
-void Polynomial<NT>::mapleDump() const {
-  if (zeroP(*this)) {
-    std::cout << 0 << std::endl;
-    return;
-  }
-  std::cout << coeff[0];
-  for (int i = 1; i<= getTrueDegree(); ++i) {
-    std::cout << " + (" << coeff[i] << ")";
-    std::cout << "*x^" << i;
-  }
-  std::cout << std::endl;
-}//mapleDump
-
-// ==================================================
-// Useful friend functions for Polynomial<NT> class
-// ==================================================
-
-// friend differentiation
-template <class NT>
-Polynomial<NT> differentiate(const Polynomial<NT> & p) {	  // differentiate
-  Polynomial<NT> q(p);
-  return q.differentiate();
-}
-
-// friend multi-differentiation
-template <class NT>
-Polynomial<NT> differentiate(const Polynomial<NT> & p, int n) {//multi-differentiate
-  Polynomial<NT> q(p);
-  assert(n >= 0);
-  for (int i=1; i<=n; i++)
-    q.differentiate();
-  return q;
-}
-
-// friend equality comparison
-template <class NT>
-bool operator==(const Polynomial<NT>& p, const Polynomial<NT>& q) {	// ==
-  int d, D;
-  Polynomial<NT> P(p);
-  P.contract();
-  Polynomial<NT> Q(q);
-  Q.contract();
-  if (P.degree < Q.degree) {
-    d = P.degree;
-    D = Q.degree;
-    for (int i = d+1; i<=D; i++)
-      if (Q.coeff[i] != 0)
-        return false;	// return false
-  } else {
-    D = P.degree;
-    d = Q.degree;
-    for (int i = d+1; i<=D; i++)
-      if (P.coeff[i] != 0)
-        return false;	// return false
-  }
-  for (int i = 0; i <= d; i++)
-    if (P.coeff[i] != Q.coeff[i])
-      return false;	// return false
-  return true; 	// return true
-}
-
-// friend non-equality comparison
-template <class NT>
-bool operator!=(const Polynomial<NT>& p, const Polynomial<NT>& q) {	// !=
-  return (!(p == q));
-}
-
-// stream i/o
-template <class NT>
-std::ostream& operator<<(std::ostream& o, const Polynomial<NT>& p) {
-  o <<   "Polynomial<NT> ( deg = " << p.degree ;
-  if (p.degree >= 0) {
-    o << "," << std::endl;
-    o << ">  coeff c0,c1,... = " << p.coeff[0];
-    for (int i=1; i<= p.degree; i++)
-      o << ", " <<  p.coeff[i] ;
-  }
-  o << ")" << std::endl;
-  return o;
-}
-
-// fragile version...
-template <class NT>
-std::istream& operator>>(std::istream& is, Polynomial<NT>& p) {
-  is >> p.degree;
-  // Don't you need to first do  "delete[] p.coeff;"  ??
-  p.coeff = new NT[p.degree+1];
-  for (int i=0; i<= p.degree; i++)
-    is >> p.coeff[i];
-  return is;
-}
-
-// ==================================================
-// Simple test of poly
-// ==================================================
-
-template <class NT>
-bool testPoly() {
-  int c[] = {1, 2, 3};
-  Polynomial<NT> p(2, c);
-  std::cout << p;
-
-  Polynomial<NT> zeroP;
-  std::cout << "zeroP  : " << zeroP << std::endl;
-
-  Polynomial<NT> P5(5);
-  std::cout << "Poly 5 : " << P5 << std::endl;
-
-  return 0;
-}
-
-
-//Resultant of two polynomials.
-//Since we use pseudoRemainder we have to modify the original algorithm.
-//If C * P = Q * R + S, where C is a constant and S = prem(P,Q), m=deg(P),
-// n=deg(Q) and l = deg(S).
-//Then res(P,Q) = (-1)^(mn) b^(m-l) res(Q,S)/C^(n)
-//The base case being res(P,Q) = Q^(deg(P)) if Q is a constant, zero otherwise
-template <class NT>
-NT res(Polynomial<NT> p, Polynomial<NT> q) {
-
-  int m, n;
-  m = p.getTrueDegree();
-  n = q.getTrueDegree();
-
-  if(m == -1 || n == -1) return 0;  // this definition is not certified
-  if(m == 0 && n == 0) return 1;    // this definition is at variance from
-                                    // Yap's book (but is OK for purposes of
-                                    // checking the vanishing of resultants
-  if(n > m) return (res(q, p));
-
-  NT b = q.coeff[n];//Leading coefficient of Q
-  NT lc = p.coeff[m], C;
-
-  p.pseudoRemainder(q, C);
-
-  if(zeroP(p) && n ==0)
-     return (pow(q.coeff[0], m));	
-
-  int l = p.getTrueDegree();
-
-  return(pow(NT(-1), m*n)*pow(b,m-l)*res(q,p)/pow(C,n));
-}
-
-//i^th Principal Subresultant Coefficient (psc) of two polynomials.
-template <class NT>
-NT psc(int i,Polynomial<NT> p, Polynomial<NT> q) {
-
-  assert(i >= 0);
-  if(i == 0)
-     return res(p,q);
-
-  int m = p.getTrueDegree();
-  int n = q.getTrueDegree();
-
-  if(m == -1 || n == -1) return 0;
-  if(m < n) return psc(i, q, p);
-
-  if ( i == n) //This case occurs when i > degree of gcd
-     return pow(q.coeff[n], m - n);
-
-  if(n < i && i <= m)
-     return 0;
-
-  NT b = q.coeff[n];//Leading coefficient of Q
-  NT lc = p.coeff[m], C;	
-
-
-  p.pseudoRemainder(q, C);
-
-  if(zeroP(p) && i < n)//This case occurs when i < deg(gcd)
-     return 0;
-
-  if(zeroP(p) && i == n)//This case occurs when i=deg(gcd) might be constant
-     return pow(q.coeff[n], m - n);
-
-  int l = p.getTrueDegree();
-  return pow(NT(-1),(m-i)*(n-i))*pow(b,m-l)*psc(i,q,p)/pow(C, n-i);
-
-}
-
-//factorI(p,m)
-//    computes the polynomial q which containing all roots
-//    of multiplicity m of a given polynomial P
-//    Used to determine the nature of intersection of two algebraic curves
-//    The algorithm is given in Wolperts Thesis
-template <class NT>
-Polynomial<NT> factorI(Polynomial<NT> p, int m){
-  int d=p.getTrueDegree();
-  Polynomial<NT> *w = new Polynomial<NT>[d+1];
-  w[0] = p;
-  Polynomial<NT> temp;
-
-  for(int i = 1; i <=d ; i ++){
-     temp = w[i-1];
-     w[i] = gcd(w[i-1],temp.differentiate());
-  }
-
-  Polynomial<NT> *u = new Polynomial<NT>[d+1];
-  u[d] = w[d-1];
-  for(int i = d-1; i >=m; i--){
-	temp = power(u[i+1],2);
-     for(int j=i+2; j <=d; j++){
-        temp *= power(u[j],j-i+1);
-     }
-     u[i] = w[i-1].pseudoRemainder(temp);//i-1 since the array starts at 0
-  } 
-	
-	delete[] w;
-  return u[m];
-}
-
-// ==================================================
-// End of Polynomial<NT>
-// ==================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Sturm.h b/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Sturm.h
deleted file mode 100644
index 8332d67..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE/poly/Sturm.h
+++ /dev/null
@@ -1,1149 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- *  File: Sturm.h
- * 
- *  Description: 
- *  The templated class Sturm implements Sturm sequences.
- *  Basic capabilities include:
- *     counting number of roots in an interval, 
- *     isolating all roots in an interval
- *     isolating the i-th largest (or smallest) root in interval
- *  It is based on the Polynomial class.
- * 
- *   BigFloat intervals are used for this (new) version.
- *   It is very important that the BigFloats used in these intervals
- *   have no error at the beginning, and this is maintained
- *   by refinement.  Note that if x, y are error-free BigFloats,
- *   then (x+y)/2 may not be error-free (in current implementaion.
- *   We have to call a special "exact divide by 2" method,
- *   (x+y).div2() for this purpose.
- *
- *   CONVENTION: an interval defined by a pair of BigFloats x, y
- *   has this interpretation:
- *       (1) if x>y,  it represents an invalid interval.
- *       (2) if x=y,  it represents a unique point x.
- *       (3) if x<y,  it represents the open interval (x,y).
- *           In this case, we always may sure that x, y are not zeros.
- * 
- *   TODO LIST and Potential Bugs:
- *   (1) Split an isolating interval to give definite sign (done)
- *   (2) Should have a test for square-free polynomials (done)
- * 
- *  Author:  Chee Yap and Sylvain Pion, Vikram Sharma
- *  Date:    July 20, 2002
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-
-#ifndef CORE_STURM_H
-#define CORE_STURM_H
-
-#include "CGAL/CORE/BigFloat.h"
-#include "CGAL/CORE/Expr.h"
-#include "CGAL/CORE/poly/Poly.h"
-
-namespace CORE { 
-
-// ==================================================
-// Sturm Class
-// ==================================================
-
-template < class NT >
-class Sturm {
-public:
-  int len;      // len is 1 less than the number of non-zero entries in array seq.
-  		//     I.e., len + 1 = length of the Sturm Sequence
-                // N.B. When len = -1 or len = 0 are special,
-                //     the array seq is not used!
-                //     Hence, one must test these special cases
-  Polynomial<NT> * seq;      // array of polynomials of length "len+1"
-  Polynomial<NT> g;//GCD of input polynomial P and it's derivative P'
-  NT cont;//Content of the square-free part of input polynomial P
-  //Thus P = g * cont * seq[0]
-  static int N_STOP_ITER;    // Stop IterE after this many iterations. This
-  // is initialized below, outside the Newton class
-  bool NEWTON_DIV_BY_ZERO;   // This is set to true when there is divide by
-  // zero in Newton iteration (at critical value)
-  // User is responsible to check this and to reset.
-  typedef Polynomial<NT> PolyNT;
-
-  // ===============================================================
-  // CONSTRUCTORS
-  // ===============================================================
-  // Null Constructor
-  Sturm() : len(0), NEWTON_DIV_BY_ZERO(false) {}
-
-  // Constructor from a polynomial
-  Sturm(Polynomial<NT> pp) : NEWTON_DIV_BY_ZERO(false) {
-    len = pp.getTrueDegree();
-    if (len <= 0) return; // hence, seq is not defined in these cases
-    seq = new Polynomial<NT> [len+1];
-    seq[0] = pp;
-    g = seq[0].sqFreePart();
-    cont = content(seq[0]);
-    seq[0].primPart();
-    seq[1] = differentiate(seq[0]);
-    int i;
-    for (i=2; i <= len; i++) {
-      seq[i] = seq[i-2];
-      seq[i].negPseudoRemainder(seq[i-1]);
-      if (zeroP(seq[i])){
-	len = i-1;//Since len is one less than the number of non-zero entries.
-        break;
-      }
-      seq[i].primPart(); // Primitive part is important to speed
-      // up large polynomials! However, for first 2 polymials,
-      // we MUST NOT take primitive part, because we
-      // want to use them in Newton Iteration
-    }
-  }
-
-  // Chee: 7/31/04
-  // 	We need BigFloat version of Sturm(Polynomial<NT>pp) because
-  // 	of curve verticalIntersection() ... .  We also introduce
-  // 	various support methods in BigFloat.h (exact_div, gcd, etc).
-  // Constructor from a BigFloat polynomial 
-  //	Need the fake argument to avoid compiler overloading errors
-  Sturm(Polynomial<BigFloat> pp, bool /* fake */) : NEWTON_DIV_BY_ZERO(false) {
-    len = pp.getTrueDegree();
-    if (len <= 0) return; // hence, seq is not defined in these cases
-    seq = new Polynomial<NT> [len+1];
-    seq[0] = pp;
-    g = seq[0].sqFreePart();
-    cont = content(seq[0]);
-    seq[0].primPart();
-    seq[1] = differentiate(seq[0]);
-    int i;
-    for (i=2; i <= len; i++) {
-      seq[i] = seq[i-2];
-      seq[i].negPseudoRemainder(seq[i-1]);
-      if (zeroP(seq[i])){
-	len = i-1;//Since len is one less than the number of non-zero entries.
-	//len = i;
-        break;
-      }
-      seq[i].primPart(); // Primitive part is important to speed
-      // up large polynomials! However, for first 2 polymials,
-      // we DO NOT take primitive part, because we
-      // want to use them in Newton Iteration
-    }
-  }
-
-  // Constructor from an array of NT's
-  //   -- this code is identical to constructing from a polynomial...
-  Sturm(int n, NT * c) : NEWTON_DIV_BY_ZERO(false) {
-    Polynomial<NT> pp(n, c); // create the polynomial pp first and call the
-    (*this) = Sturm<NT>(pp);//constructor from a polynomial
-  }
-
-  // copy constructor
-  Sturm(const Sturm&s) : len(s.len), NEWTON_DIV_BY_ZERO(s.NEWTON_DIV_BY_ZERO) {
-    if (len <= 0) return;
-    seq = new Polynomial<NT> [len+1];
-    for (int i=0; i<=len; i++)
-      seq[i] = s.seq[i];
-  }
-
-  // assignment operator
-  const Sturm& operator=(const Sturm& o) {
-    if (this == &o)
-      return *this;
-    if (len > 0)
-      delete[] seq;
-    NEWTON_DIV_BY_ZERO = o.NEWTON_DIV_BY_ZERO;
-    len = o.len;
-    if (len > 0) {
-      seq = new Polynomial<NT>[len+1];
-      for (int i=0; i<=len; i++)
-        seq[i] = o.seq[i];
-    }
-    return *this;
-  }
-
-  // destructor
-  ~Sturm() {
-    if (len != 0)
-      delete[] seq;
-  }
-
-  // METHODS
-
-  // dump functions
-  void dump(std::string msg) const {
-    std::cerr << msg << std::endl;
-    if (len <= 0) std::cerr << " len = " << len << std::endl;
-    else
-       for (int i=0; i<=len; i++)
-         std::cerr << " seq[" << i << "] = " << seq[i] << std::endl;
-  }
-  void dump() const {
-    dump("");
-  }
-
-  // signVariations(x, sx)
-  //   where sx = sign of evaluating seq[0] at x
-  //   PRE-CONDITION: sx != 0  and len > 0
-  int signVariations(const BigFloat & x, int sx) const {
-    assert((sx != 0) && (len >0));
-    int cnt = 0;
-    int last_sign = sx;
-    for (int i=1; i<=len; i++) {// Chee (4/29/04): Bug fix,
-        // should start iteration at i=1, not i=0.  Potential error
-        // if seq[0].eval(x)=0 (though not in our usage).
-      int sgn = sign(seq[i].evalExactSign(x));
-      if (sgn*last_sign < 0) {
-        cnt++;
-        last_sign *= -1;
-      }
-    }
-    return cnt;
-  }
-
-  // signVariations(x)
-  //   --the first polynomial eval is not yet done
-  //   --special return value of -1, indicating x is root!
-  int signVariations(const BigFloat & x) const {
-    if (len <= 0) return len; 
-    int signx = sign(seq[0].evalExactSign(x));
-    if (signx == 0)
-      return (-1);    // THIS indicates that x is a root...
-    		      // REMARK: in our usage, this case does not arise
-    return signVariations(x, signx);
-  }//signVariations(x)
-
-  // signVariation at +Infinity
-  int signVariationsAtPosInfty() const {
-    if (len <= 0) return len;
-    int cnt = 0;
-    int last_sign = sign(seq[0].coeff[seq[0].getTrueDegree()]);
-    assert(last_sign != 0);
-    for (int i=1; i<=len; i++) {
-      int sgn = sign(seq[i].coeff[seq[i].getTrueDegree()]);
-      if (sgn*last_sign < 0)
-        cnt++;
-      if (sgn != 0)
-        last_sign = sgn;
-    }
-    return cnt;
-  }
-
-  // signVariation at -Infinity
-  int signVariationsAtNegInfty() const {
-    if (len <= 0) return len;
-    int cnt = 0;
-    int last_sign = sign(seq[0].coeff[seq[0].getTrueDegree()]);
-    if (seq[0].getTrueDegree() % 2 != 0)
-      last_sign *= -1;
-    assert(last_sign != 0);
-    for (int i=1; i<=len; i++) {
-      int parity = (seq[i].getTrueDegree() % 2 == 0) ? 1 : -1;
-      int sgn = parity * sign(seq[i].coeff[seq[i].getTrueDegree()]);
-      if (sgn*last_sign < 0)
-        cnt++;
-      if (sgn != 0)
-        last_sign = sgn;
-    }
-    return cnt;
-  }
-
-  // numberOfRoots(x,y):
-  //   COUNT NUMBER OF ROOTS in the close interval [x,y]
-  //   IMPORTANT: Must get it right even if x, y are roots
-  //   Assert("x and y are exact")
-  //       [If the user is unsure of this assertion, do
-  //        "x.makeExact(); y.makeExact()" before calling].
-  ///////////////////////////////////////////
-  int numberOfRoots(const BigFloat &x, const BigFloat &y) const {
-    assert(x <= y);   // we allow x=y
-    if (len <= 0) return len;  // return of -1 means infinity of roots!
-    int signx = sign(seq[0].evalExactSign(x));
-    if (x == y) return ((signx == 0) ? 1 : 0);
-    int signy = sign(seq[0].evalExactSign(y));
-    // easy case: THIS SHOULD BE THE OVERWHELMING MAJORITY
-
-    if (signx != 0 && signy != 0)
-      return (signVariations(x, signx) - signVariations(y, signy));
-    // harder case: THIS SHOULD BE VERY INFREQUENT
-    BigFloat sep = (seq[0].sepBound()).div2();
-    BigFloat newx, newy;
-    if (signx == 0)
-      newx = x - sep;
-    else
-      newx = x;
-    if (signy == 0)
-      newy = y + sep;
-    else
-      newy = y;
-    return (signVariations(newx, sign(seq[0].evalExactSign(newx)))
-            - signVariations(newy, sign(seq[0].evalExactSign(newy))) );
-  }//numberOfRoots
-
-  // numberOfRoots():
-  //   Counts the number of real roots of a polynomial
-  ///////////////////////////////////////////
-  int numberOfRoots() const {
-    if (len <= 0) return len;  // return of -1 means infinity of roots!
-    //    BigFloat bd = seq[0].CauchyUpperBound();
-    //    return numberOfRoots(-bd, bd);
-    return signVariationsAtNegInfty() - signVariationsAtPosInfty();
-  }
-
-  // numberOfRoots above or equal to x:
-  //   Default value x=0 (i.e., number of positive roots)
-  //   assert(len >= 0)
-  ///////////////////////////////////////////
-  int numberOfRootsAbove(const BigFloat &x = 0) const {
-    if (len <= 0) return len;  // return of -1 means infinity of roots!
-    int signx = sign(seq[0].evalExactSign(x));
-    if (signx != 0)
-      return signVariations(x, signx) - signVariationsAtPosInfty();
-    BigFloat newx = x - (seq[0].sepBound()).div2();
-    return signVariations(newx, sign(seq[0].evalExactSign(newx)))
-           - signVariationsAtPosInfty();
-  }
-
-  // numberOfRoots below or equal to x:
-  //   Default value x=0 (i.e., number of negative roots)
-  //   assert(len >= 0)
-  ///////////////////////////////////////////
-  int numberOfRootsBelow(const BigFloat &x = 0) const {
-    if (len <= 0) return len;  // return of -1 means infinity of roots!
-    int signx = sign(seq[0].evalExactSign(x));
-    if (signx != 0)
-      return signVariationsAtNegInfty() - signVariations(x, signx);
-    BigFloat newx = x + (seq[0].sepBound()).div2();
-    return signVariationsAtNegInfty()
-           - signVariations(newx, sign(seq[0].evalExactSign(newx)));
-  }
-
-
-  /// isolateRoots(x, y, v)
-  ///             Assertion(x, y are exact BigFloats)
-  ///   isolates all the roots in [x,y] and returns them in v.
-  /**   v is a list of intervals
-   *    [x,y] is the initial interval to be isolated
-   *
-   *    Properties we guarantee in the return values:
-   *
-   *    (0) All the intervals have exact BigFloats as endpoints
-   *    (1) If 0 is a root, the corresponding isolating interval will be
-   *        exact, i.e., we return [0,0].
-   *    (2) If an interval is [0,x], it contains a positive root
-   *    (3) If an interval is [y,0], it contains a negative root
-   */
-  void isolateRoots(const BigFloat &x, const BigFloat &y,
-                    BFVecInterval &v) const {
-    assert(x<=y);
-
-    int n = numberOfRoots(x,y);
-    if (n == 0) return;
-    if (n == 1) {
-      if ((x > 0) || (y < 0)) // usual case: 0 is not in interval
-        v.push_back(std::make_pair(x, y));
-      else { // if 0 is inside our interval (this extra
-	     // service is not strictly necessary!)
-        if (seq[0].coeff[0] == 0)
-          v.push_back(std::make_pair(BigFloat(0), BigFloat(0)));
-        else if (numberOfRoots(0,y) == 0)
-          v.push_back(std::make_pair(x, BigFloat(0)));
-        else
-          v.push_back(std::make_pair(BigFloat(0), y));
-      }
-    } else { // n > 1
-      BigFloat mid = (x+y).div2(); // So mid is exact.
-      if (sign(seq[0].evalExactSign(mid)) != 0)  { // usual case: mid is non-root
-      	isolateRoots(x, mid, v);
-      	isolateRoots(mid, y, v); 
-      } else { // special case: mid is a root
-	BigFloat tmpEps = (seq[0].sepBound()).div2();  // this is exact!
-	if(mid-tmpEps > x )//Since otherwise there are no roots in (x,mid)
-	  isolateRoots(x, (mid-tmpEps).makeCeilExact(), v);
-	v.push_back(std::make_pair(mid, mid));
-	if(mid+tmpEps < y)//Since otherwise there are no roots in (mid,y)
-	  isolateRoots((mid+tmpEps).makeFloorExact(), y, v);
-      }
-    }
-  }//isolateRoots(x,y,v)
-
-  // isolateRoots(v)
-  ///   isolates all roots and returns them in v
-  /**   v is a vector of isolated intervals
-   */
-  void isolateRoots(BFVecInterval &v) const {
-    if (len <= 0) {
-       v.clear(); return;
-    }
-    BigFloat bd = seq[0].CauchyUpperBound();
-    // Note: bd is an exact BigFloat (this is important)
-    isolateRoots(-bd, bd, v);
-  }
-
-  // isolateRoot(i)
-  ///   Isolates the i-th smallest root 
-  ///         If i<0, isolate the (-i)-th largest root
-  ///   Defaults to i=0 (i.e., the smallest positive root a.k.a. main root)
-  BFInterval isolateRoot(int i = 0) const {
-    if (len <= 0) 
-       return BFInterval(1,0);   // ERROR CONDITION
-    if (i == 0)
-      return mainRoot();
-    BigFloat bd = seq[0].CauchyUpperBound();
-    return isolateRoot(i, -bd, bd);
-  }
-
-  // isolateRoot(i, x, y)
-  ///   isolates the i-th smallest root in [x,y]
-  /**   If i is negative, then we want the i-th largest root in [x,y]
-   *    We assume i is not zero.
-   */
-  BFInterval isolateRoot(int i, BigFloat x, BigFloat y) const {
-    int n = numberOfRoots(x,y);
-    if (i < 0) {//then we want the n-i+1 root
-      i += n+1;
-      if (i <= 0)
-        return BFInterval(1,0); // ERROR CONDITION
-    }
-    if (n < i)
-      return BFInterval(1,0);  // ERROR CONDITION INDICATED
-    //Now 0< i <= n
-    if (n == 1) {
-      if ((x>0) || (y<0)) return BFInterval(x, y);
-      if (seq[0].coeff[0] == NT(0)) return BFInterval(0,0);
-      if (numberOfRoots(0, y)==0) return BFInterval(x,0);
-      return BFInterval(0,y);
-    }
-    BigFloat m = (x+y).div2();
-    n = numberOfRoots(x, m);
-    if (n >= i)
-	    return isolateRoot(i, x, m);
-    // Now (n < i) but we have to be careful if m is a root
-    if (sign(seq[0].evalExactSign(m)) != 0)   // usual case
-      return isolateRoot(i-n, m, y);
-    else
-      return isolateRoot(i-n+1, m, y);
-  }
-
-  // same as isolateRoot(i).
-  BFInterval diamond(int i) const {
-    return isolateRoot(i);
-  }
-
-  // First root above
-  BFInterval firstRootAbove(const BigFloat &e) const {
-    if (len <= 0)
-       return BFInterval(1,0);   // ERROR CONDITION
-    return isolateRoot(1, e, seq[0].CauchyUpperBound());
-  }
-
-  // Main root (i.e., first root above 0)
-  BFInterval mainRoot() const {
-    if (len <= 0)
-       return BFInterval(1,0);   // ERROR CONDITION
-    return isolateRoot(1, 0, seq[0].CauchyUpperBound());
-  }
-
-  // First root below
-  BFInterval firstRootBelow(const BigFloat &e) const {
-    if (len <= 0)
-       return BFInterval(1,0);   // ERROR CONDITION
-    BigFloat bd = seq[0].CauchyUpperBound(); // bd is exact
-    int n = numberOfRoots(-bd, e);
-    if (n <= 0)
-      return BFInterval(1,0);
-    BigFloat bdBF = BigFloat(ceil(bd));
-    if (n == 1)
-      return BFInterval(-bdBF, e);
-    return isolateRoot(n, -bdBF, e);
-  }
-
-  // Refine an interval I to absolute precision 2^{-aprec}
-  //   THIS USES bisection only!  Use only for debugging (it is too slow)
-  //
-  BFInterval refine(const BFInterval& I, int aprec) const {
-    // assert( There is a unique root in I )
-    // We repeat binary search till the following holds
-    //      width/2^n <= eps             (eps = 2^(-aprec))
-    //   => log(width/eps) <= n
-    //   => n = ceil(log(width/eps)) this many steps of binary search
-    //   will work.
-    // At each step we verify
-    //   seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) < 0
-
-    BigFloat width = I.second - I.first;
-    if (width <= 0) return I;  // Nothing to do if the
-                               //   interval I is exact or inconsistent
-    BigFloat eps = BigFloat::exp2(-aprec);   //  eps = 2^{-aprec}
-    extLong n =  width.uMSB() + (extLong)aprec;
-
-
-    BFInterval J = I;           // Return value is the Interval J
-    BigFloat midpoint;
-    while(n >= 0) {
-      midpoint = (J.second + J.first).div2();
-      BigFloat m = seq[0].evalExactSign(midpoint);
-      if (m == 0) {
-        J.first = J.second = midpoint;
-        return J;
-      }
-      if (seq[0].evalExactSign(J.first) * m < 0) {
-        J.second = midpoint;
-      } else {
-        J.first = midpoint;
-      }
-
-      n--;
-    }
-
-    return J;
-  }//End Refine
-
-  // Refine First root above
-  BFInterval refinefirstRootAbove(const BigFloat &e, int aprec) const {
-    BFInterval I = firstRootAbove(e);
-    return refine(I,aprec);
-  }
-
-  // Refine First root below
-  BFInterval refinefirstRootBelow(const BigFloat &e, int aprec) const {
-    BFInterval I = firstRootBelow(e);
-    return refine(I,aprec);
-  }
-
-  // refineAllRoots(v, aprec)
-  //     will modify v so that v is a list of isolating intervals for
-  //     the roots of the polynomial in *this.  The size of these intervals
-  //     are at most 2^{-aprec}.
-  // If v is non-null, we assume it is a list of initial isolating intervals.
-  // If v is null, we will first call isolateRoots(v) to set this up.
-  void refineAllRoots( BFVecInterval &v, int aprec) {
-    BFVecInterval v1;
-    BFInterval  J;
-    if (v.empty())
-      isolateRoots(v);
-
-    for (BFVecInterval::const_iterator it = v.begin();
-         it != v.end(); ++it) {        // Iterate through all the intervals
-      //refine them to the given precision aprec
-      J = refine(BFInterval(it->first, it->second), aprec);
-      v1.push_back(std::make_pair(J.first, J.second));
-    }
-    v.swap(v1);
-  }//End of refineAllRoots
-
-  // This is the new version of "refineAllRoots"
-  //    	based on Newton iteration
-  // It should be used instead of refineAllRoots!
-  void newtonRefineAllRoots( BFVecInterval &v, int aprec) {
-
-    BFVecInterval v1;
-    BFInterval  J;
-
-    if (v.empty())
-      isolateRoots(v);
-    for (BFVecInterval::iterator it = v.begin();
-         it != v.end(); ++it) {        // Iterate through all the intervals
-      //refine them to the given precision aprec
-      J = newtonRefine(*it, aprec);
-
-      if (NEWTON_DIV_BY_ZERO) {
-        J.first = 1;
-        J.second = 0;   // indicating divide by zero
-      }
-      v1.push_back(std::make_pair(J.first, J.second));
-    }
-    v.swap(v1);
-  }//End of newtonRefineAllRoots
-
-  /** val = newtonIterN(n, bf, del, err, fuMSB, ffuMSB)
-   * 
-   *    val is the root after n iterations of Newton
-   *       starting from initial value of bf and is exact.
-   *    fuMSB and ffuMSB are precision parameters for the approximating
-   *		the coefficients of the underlyinbg polynomial, f(x).
-   *    	THEY are used ONLY if the coefficients of the polynomial
-   *		comes from a field (in particular, Expr or BigRat).
-   *		We initially approximate the coefficients of f(x) to fuMSB 
-   *		relative bits, and f'(x) to ffuMSB relative bits.
-   *		The returned values of fuMSB and ffuMSB are the final
-   *		precision used by the polynomial evaluation algorithm.
-   *    Return by reference, "del" (difference between returned val and value
-   *       in the previous Newton iteration)
-   *
-   *    Also, "err" is returned by reference and bounds the error in "del".
-   *
-   *    IMPORTANT: we assume that when x is an exact BigFloat,
-   *    then Polynomial<NT>::eval(x) will be exact!
-   *    But current implementation of eval() requires NT <= BigFloat.
-   * ****************************************************/    
-
-  BigFloat newtonIterN(long n, const BigFloat& bf, BigFloat& del,
-	unsigned long & err, extLong& fuMSB, extLong& ffuMSB) {
-    if (len <= 0) return bf;   // Nothing to do!  User must
-                               // check this possibility!
-    BigFloat val = bf;  
-    // val.makeExact();    // val is exact
-
-    // newton iteration
-    for (int i=0; i<n; i++) {
-      ////////////////////////////////////////////////////
-      // Filtered Eval
-      ////////////////////////////////////////////////////
-      BigFloat ff = seq[1].evalExactSign(val, 3*ffuMSB); //3 is a slight hack
-      ffuMSB = ff.uMSB();
-      //ff is guaranteed to have the correct sign as the exact evaluation.
-      ////////////////////////////////////////////////////
-
-      if (ff == 0) {
-        NEWTON_DIV_BY_ZERO = true;
-        del = 0;
-        core_error("Zero divisor in Newton Iteration",
-                __FILE__, __LINE__, false);
-        return 0;
-      }
-
-      ////////////////////////////////////////////////////
-      // Filtered Eval
-      ////////////////////////////////////////////////////
-      BigFloat f= seq[0].evalExactSign(val, 3*fuMSB); //3 is a slight hack
-      fuMSB = f.uMSB();
-      ////////////////////////////////////////////////////
-
-      if (f == 0) {
-        NEWTON_DIV_BY_ZERO = false;
-        del = 0;    // Indicates that we have reached the exact root
-		    //    This is because eval(val) is exact!!!
-        return val; // val is the exact root, before the last iteration
-      }
-      del = f/ff; // But the accuracy of "f/ff" must be controllable
-		    // by the caller...
-      err = del.err();
-      del.makeExact(); // makeExact() is necessary
-      val -= del;
-      // val.makeExact();  // -- unnecessary...
-    }
-    return val;
-  }//newtonIterN
-
-  //Another version of newtonIterN which does not return the error 
-  //and passing the uMSB as arguments; it is easier for the user to call
-  //this.
-  BigFloat newtonIterN(long n, const BigFloat& bf, BigFloat& del){
-    unsigned long err;
-    extLong fuMSB=0, ffuMSB=0;
-    return newtonIterN(n, bf, del, err, fuMSB, ffuMSB);
-  }
-
-  // v = newtonIterE(prec, bf, del, fuMSB, ffuMSB)
-  //
-  //    return the value v which is obtained by Newton iteration
-  //    until del.uMSB < -prec, starting from initial value of bf.
-  //    Returned value is an exact BigFloat.
-  //    We guarantee at least one Newton step (so del is defined).
-  //
-  //	   The parameters fuMSB and ffuMSB are precision parameters for
-  //	   evaluating coefficients of f(x) and f'(x), used similarly
-  //	   as described above for newtonIterN(....)
-  //
-  //    Return by reference "del" (difference between returned val and value
-  //       in the previous Newton iteration).  This "del" is an upper bound
-  //       on the last (f/f')-value in Newton iteration.
-  //
-  //    IN particular, if v is in the Newton zone of a root z^*, then z^* is
-  //       guaranteed to lie inside [v-del, v+del].
-  //
-  //    Note that this is dangerous unless you know that bf is already
-  //       in the Newton zone.  So we use the global N_STOP_ITER to
-  //       prevent infinite loop.
-
-  BigFloat newtonIterE(int prec, const BigFloat& bf, BigFloat& del, 
-	extLong& fuMSB, extLong& ffuMSB) {
-    // usually, prec is positive
-    int count = N_STOP_ITER; // upper bound on number of iterations
-    int stepsize = 1;
-    BigFloat val = bf;
-    unsigned long err = 0;
-
-    do {
-      val = newtonIterN(stepsize, val, del, err, fuMSB, ffuMSB);
-      count -= stepsize;
-      stepsize++; // heuristic
-    } while ((del != 0) && ((del.uMSB() >= -prec) && (count >0))) ;
-
-    if (count == 0) core_error("newtonIterE: reached count=0",
-		    	__FILE__, __LINE__, true);
-    del = BigFloat(core_abs(del.m()), err, del.exp() );
-    del.makeCeilExact();
-    return val;
-  }
-
-  //Another version of newtonIterE which avoids passing the uMSB's.
-  BigFloat newtonIterE(int prec, const BigFloat& bf, BigFloat& del){
-    extLong fuMSB=0, ffuMSB=0;
-    return newtonIterE(prec, bf, del, fuMSB, ffuMSB);
-  }
-  // A Smale bound which is an \'a posteriori condition. Applying 
-  // Newton iteration to any point z satisfying this condition we are 
-  // sure to converge to the nearest root in a certain interval of z.
-  // The condition is for all k >= 2,
-  //    | \frac{p^(k)(z)}{k!p'(z)} |^{1\(k-1)} < 1/8 * |\frac{p'(z)}{p(z)}|
-  // Note: code below has been streamlined (Chee)
-  /*
-    bool smaleBound(const Polynomial<NT> * p, BigFloat z){
-    int deg = p[0].getTrueDegree();
-    BigFloat max, temp, temp1, temp2;
-    temp2 = p[1].eval(z);
-    temp = core_abs(temp2/p[0].eval(z))/8;
-    BigInt fact_k = 2;
-    for(int k = 2; k <= deg; k++){
-      temp1 = core_abs(p[k].eval(z)/(fact_k*temp2)); 
-      if(k-1 == 2)
-	temp1 = sqrt(temp1);
-      else
-	temp1 = root(temp1, k-1);
-      if(temp1 >= temp) return false; 
-    }
-    return true;
-    }
-   */
-
-  //An easily computable Smale's point estimate for Newton as compared to the
-  //one above. The criterion is
-  //
-  // ||f||_{\infty} * \frac{|f(z)|}{|f'(z)|^2} 
-  //                * \frac{\phi'(|z|)^2}{\phi(|z|)}  < 0.03
-  // where
-  //           \phi(r) = \sum_{i=0}{m}r^i,
-  //           m = deg(f)
-  //
-  //It is given as Theorem B in [Smale86].
-  //Reference:- Chapter 8 in Complexity and Real Computation, by
-  //            Blum, Cucker, Shub and Smale
-  //
-  //For our implementation we calculate an upper bound on
-  //the second fraction in the inequality above.  For r>0,
-  //
-  //    \phi'(r)^2     m^2 (r^m + 1)^2
-  //     ---------  <  -------------------          (1)
-  //    \phi(r)        (r-1) (r^{m+1} - 1)
-  //
-  // Alternatively, we have
-  // 
-  //    \phi'(r)^2     (mr^{m+1} + 1)^2
-  //     ---------  <  -------------------          (2)
-  //    \phi(r)        (r-1)^3 (r^{m+1} - 1)
-  //
-  // The first bound is better when r > 1.
-  // The second bound is better when r << 1.
-  // Both bounds (1) and (2) assumes r is not equal to 1.
-  // When r=1, the exact value is
-  //
-  //    \phi'(r)^2     m^2 (m + 1)
-  //     ---------  =  -----------                  (3)
-  //    \phi(r)            4
-  // 
-  // REMARK: smaleBoundTest(z) actually computes an upper bound
-  // 	on alpha(f,z), and compares it to 0.02 (then our theory
-  // 	says that z is a robust approximate zero).
-  //
-  bool smaleBoundTest(const BigFloat& z){
-    assert(z.isExact());   // the bound only makes sense for exact z
-
-#ifdef CORE_DEBUG
-    std::cout <<"Computing Smale's bound = " <<  std::endl;
-#endif
-
-    if(seq[0].evalExactSign(z) == 0)// Reached the exact root.
-      return true;
-
-    BigFloat fprime = core_abs(seq[1].evalExactSign(z));
-    fprime.makeFloorExact();
-    if (fprime == 0) return false;  // z is a critical value!
-    BigFloat temp =        // evalExactSign(z) may have error.
-      core_abs(seq[0].evalExactSign(z));
-    temp = (temp.makeCeilExact()/power(fprime, 2)).makeCeilExact();
-    temp = temp*seq[0].height();  // remains exact
-    //Thus, temp >=  ||f||_{\infty} |\frac{f(z)}{f'(z)^2}|
-
-    int m = seq[0].getTrueDegree();    
-    BigFloat x = core_abs(z);
-    if (x==1)   // special case, using (3)
-	    return (temp * BigFloat(m*m*(m+1)).div2().div2() < 0.02);
-
-    BigFloat temp1;
-    if (x>1) { // use formula (1)
-      temp1 = power(m* (power(x, m)+1), 2);          // m^2*(x^m + 1)^2
-      temp1 /= ((x - 1)*(power(x, m+1) - 1));        // formula (1)
-    } else {  // use formula (2)
-      temp1 = power(m*(power(x, m+1) +1), 2);        // (m*x^{m+1} + 1)^2
-      temp1 /= (power(x - 1,3)*(power(x, m+1) -1));  // formula (2)
-    }
-
-#ifdef CORE_DEBUG
-    std::cout <<"Value returned by Smale bound = " << temp * temp1.makeCeilExact() << std::endl;
-#endif
-
-    if(temp * temp1.makeCeilExact() < 0.03)          // make temp1 exact!
-      return true;
-    else
-      return false;
-  }//smaleBoundTest
-
-
-  // yapsBound(p)
-  // 	returns a bound on size of isolating interval of polynomial p
-  // 	which is guaranteed to be in the Newton Zone.
-  //    N.B. p MUST be square-free
-  //
-  //   Reference: Theorem 6.37, p.184 of Yap's book
-  //   	   [Fundamental Problems of Algorithmic Algebra]
-
-  BigFloat yapsBound(const Polynomial<NT> & p) const {
-    int deg = p.getTrueDegree();
-    return  1/(1 + pow(BigFloat(deg), 3*deg+9)
-               *pow(BigFloat(2+p.height()),6*deg));
-  }
-
-  //newtonRefine(J, a) 
-  //
-  //    ASSERT(J is an isolating interval for some root x^*)
-  //
-  //    ASSERT(J.first and J.second are exact BigFloats)
-  //
-  //    Otherwise, the boundaries of the interval are not well defined.
-  //    We will return a refined interval with exact endpoints,
-  //    still called J, containing x^* and
-  //
-  // 			|J| < 2^{-a}.
-  //
-  // 	TO DO: write a version of newtonRefine(J, a, sign) where
-  // 	sign=J.first.sign(), since you may already know the sign
-  // 	of J.first.  This will skip the preliminary stuff in the
-  // 	current version.
-  //
-  BFInterval newtonRefine(BFInterval &J, int aprec) {
-
-#ifdef CORE_DEBUG_NEWTON
-std::cout << "In newtonRefine, input J=" << J.first
-	<< ", " << J.second << " precision = " << aprec << std::endl;
-#endif
-
-    if (len <= 0) return J;   // Nothing to do!  User must
-                               // check this possibility!
-      
-
-    if((J.second - J.first).uMSB() < -aprec){
-      return (J);
-    }
-    int xSign, leftSign, rightSign;
-
-    leftSign = sign(seq[0].evalExactSign(J.first));
-    if (leftSign == 0) {
-      J.second = J.first;
-      return J;
-    }
-
-    rightSign = sign(seq[0].evalExactSign(J.second));
-    if (rightSign == 0) {
-      J.first = J.second;
-      return J;
-    }
-
-    assert( leftSign * rightSign < 0 );
-
-    //N is number of times Newton is called without checking
-    // whether the result is still in the interval or not
-    #define NO_STEPS 2
-    // REMARK: NO_STEPS=1 is incorrect, as it may lead to
-    //      linear convergence (it is somewhat similar to Dekker-Brent's
-    //      idea of guaranteeing that bisection does not
-    //	    destroy the superlinear convergence of Newton.
-    int N = NO_STEPS;
-
-    BigFloat x, del, olddel, temp;
-    unsigned long err;
-    BigFloat yap = yapsBound(seq[0]);
-
-    BigFloat old_width = J.second - J.first;
-    x = (J.second + J.first).div2();
-
-    // initial estimate for the evaluation of filter to floating point precision
-    extLong fuMSB=54, ffuMSB=54;
-
-    //MAIN WHILE LOOP. We ensure that J always contains the root
-
-    while ( !smaleBoundTest(x) && 
-	    (J.second - J.first) > yap &&
-	   (J.second - J.first).uMSB() >= -aprec) {
-      x = newtonIterN(N, x, del, err, fuMSB, ffuMSB);
-      if ((del == 0)&&(NEWTON_DIV_BY_ZERO == false)) {  // reached exact root!
-        J.first = J.second = x;
-        return J;
-      }
-
-      BigFloat left(x), right(x);
-      if (del>0) {
-      	left -= del; right += del;
-      } else {
-      	left += del; right -= del;
-      }
-
-      // update interval
-      if ((left > J.first)&&(left <J.second)) {
-	  int lSign = sign(seq[0].evalExactSign(left));
-          if (lSign == leftSign)  // leftSign=sign of J.first
-            J.first = left;
-	  else if (lSign == 0) {
-            J.first = J.second = left;
-            return J;
-          } else {
-	    J.second = left;
-          }	
-      }
-      if ((right < J.second)&&(right >J.first)) {
-	  int rSign = sign(seq[0].evalExactSign(right));
-          if (rSign == rightSign)
-            J.second = right;
-	  else if (rSign == 0) {
-            J.first = J.second = right;
-            return J;
-          } else {
-            J.first = right;
-          }
-      }
-      BigFloat width = J.second - J.first;
-
-      //left and right are exact, since x is exact.
-      if (width*2 <= old_width && !NEWTON_DIV_BY_ZERO) {
-                                  // we can get a better root:
-
-	// No, it is not necessary to update x to
-	// the midpoint of the new interval J.
-	// REASON: basically, it is hard to be smarter than Newton's method!
-	// Newton might bring x very close to one endpoint, but it can be
-	// because the root is near there!  In any case,
-	// by setting x to the center of J, you only gain at most
-	// one bit of accuracy, but you stand to loose an
-	// arbitrary amount of bits of accuracy if you are unlucky!
-	// So I will comment out the next line.  --Chee (Aug 9, 2004).
-	// 
-	// x = (J.second + J.first).div2();
-	if (J.first > x || J.second < x)
-	  x = (J.second + J.first).div2();
-
-	old_width = width; // update width
-
-        N ++;      // be more confident or aggressive
-	           //  (perhaps we should double N)
-		   //
-      } else {// Either NEWTON_DIV_BY_ZERO=true
-	      // Or width has not decreased sufficiently
-	x = (J.second + J.first).div2();//Reset x to midpoint since it was the
-	                                //value from a failed Newton step
-	xSign = sign(seq[0].evalExactSign(x));
-	if (xSign == rightSign) {
-	  J.second = x;
-	} else if (xSign == leftSign) {
-	  J.first = x;
-	} else { // xSign must be 0
-	  J.first = J.second = x; return J;
-	}
-	x = (J.second + J.first).div2();
-
-	old_width = old_width.div2(); // update width
-	
-	// reduce value of N:
-	N = core_max(N-1, NO_STEPS);   // N must be at least NO_STEPS
-      }
-    }//MAIN WHILE LOOP
-
-    if((J.second - J.first).uMSB() >= -aprec){ // The interval J
-                    //still hasn't reached the required precision.
-                    //But we know the current value of x (call it x_0)
-		    //is in the strong Newton basin of the
-		    //root x^* (because it passes Smale's bound)
-      //////////////////////////////////////////////////////////////////
-      //Both x_0 and the root x^* are in the interval J.
-      //Let NB(x^*) be the strong Newton basin of x^*.  By definition,
-      //x_0 is in NB(x^*) means that:
-      //
-      //    x_0 is in NB(x^*) iff |x_n-x^*| \le 2^{-2^{n}+1} |x_0-x^*|
-      //    
-      // where x_n is the n-th iterate of Newton.  
-      //    
-      //  LEMMA 1: if x_0  \in NB(x^*) then 
-      //               |x_0 - x^*| <= 2|del|      (*)
-      //  and
-      //               |x_1 - x^*| <= |del|       (**)
-      //
-      //  where del = -f(x_0)/f'(x_0) and x_1 = x_0 + del
-      //Proof:
-      //Since x_0 is in the strong Newton basin, we have
-      //         |x_1-x^*| <= |x_0-x^*|/2.        (***)
-      //The bound (*) is equivalent to
-      //         |x_0-x^*|/2 <= |del|.
-      //This is equivalent to
-      //         |x_0-x^*| - |del| <= |x_0-x^*|/2,
-      //which follows from
-      //         |x_0-x^* + del| <= |x_0-x^*|/2,
-      //which is equivalent to (***).  
-      //The bound (**) follows from (*) and (***).
-      //QED
-      //
-      //  COMMENT: the above derivation refers to the exact values,
-      //  but what we compute is X_1 where X_1 is an approximation to
-      //  x_1.  However, let us write X_1 = x_0 - DEL, where DEL is
-      //  an approximation to del.  
-      //
-      //  LEMMA 2:  If |DEL| >= |del|,
-      //  then (**) holds with X_1 and DEL in place of x_1 and del.
-      //  
-      //  NOTE: We implemented this DEL in newtonIterE.   
-
-#ifdef CORE_DEBUG
-      std::cout << "Inside Newton Refine: Refining Part " << std::endl;
-
-      if((J.second - J.first) > yap)
-	std::cout << "Smales Bound satisfied " << std::endl;
-      else
-	std::cout << "Chees Bound satisfied " << std::endl;
-#endif
-      xSign = sign(seq[0].evalExactSign(x));
-      if(xSign == 0){
-	J.first = J.second = x; 
-	return J; // missing before!
-      }
-
-      //int k = clLg((-(J.second - J.first).lMSB() + aprec).asLong());
-      x = newtonIterE(aprec, x, del, fuMSB, ffuMSB);
-      xSign = sign(seq[0].evalExactSign(x));
-
-      if(xSign == leftSign){//Root is greater than x
-	J.first = x;
-	J.second = x + del;  // justified by Lemma 2 above
-      }else if(xSign == rightSign){//Root is less than x
-	J.first = x - del;   // justified by Lemma 2 above
-	J.second = x ;
-      }else{//x is the root
-	J.first = J.second = x;
-      }
-    }
-
-
-
-#ifdef CORE_DEBUG
-    std::cout << " Returning from Newton Refine: J.first = " << J.first
-	      << " J.second = " << J.second << " aprec = " << aprec
-	      << " Sign at the interval endpoints = " 
-	      << sign(seq[0].evalExactSign(J.first))
-	      << " : " << sign(seq[0].evalExactSign(J.second)) << " Err at starting = " 
-	      << J.first.err() << " Err at end = " << J.second.err() << std::endl;
-#endif
-
-    assert( (seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) <= 0) );
-
-#ifdef CORE_DEBUG_NEWTON
-    if (seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) > 0)
-      std::cout <<" ERROR! Root is not in the Interval " << std::endl;
-    if(J.second - J.first >  BigFloat(1).exp2(-aprec))
-      std::cout << "ERROR! Newton Refine failed to achieve the desired precision" << std::endl;
-#endif
-
-      return(J);
- }//End of newton refine
-
-};// Sturm class
-
-// ==================================================
-// Static initialization
-// ==================================================
-template <class NT>
-int Sturm<NT>:: N_STOP_ITER = 10000;   // stop IterE after this many loops
-// Reset this as needed
-
-// ==================================================
-// Helper Functions 
-// ==================================================
-
-// isZeroIn(I):
-//          returns true iff 0 is in the closed interval I
-CORE_INLINE bool isZeroIn(BFInterval I) {
-	return ((I.first <= 0.0) && (I.second >= 0.0));
-}
-
-/////////////////////////////////////////////////////////////////
-//  DIAGNOSTIC TOOLS
-/////////////////////////////////////////////////////////////////
-// Polynomial tester:   P is polynomial to be tested
-//          prec is the bit precision for root isolation
-//          n is the number of roots predicted
-
-template<class NT>
-CORE_INLINE void testSturm(const Polynomial<NT>&P, int prec, int n = -1) {
-  Sturm<NT> Ss (P);
-  BFVecInterval v;
-  Ss.refineAllRoots(v, prec);
-  std::cout << "   Number of roots is " << v.size() <<std::endl;
-  if ((n >= 0) & (v.size() == (unsigned)n))
-    std::cout << " (CORRECT!)" << std::endl;
-  else
-    std::cout << " (ERROR!) " << std::endl;
-  int i = 0;
-  for (BFVecInterval::const_iterator it = v.begin();
-       it != v.end(); ++it) {
-    std::cout << ++i << "th Root is in ["
-    << it->first << " ; " << it->second << "]" << std::endl;
-  }
-}// testSturm
-
-// testNewtonSturm( Poly, aprec, n)
-//   will run the Newton-Sturm refinement to isolate the roots of Poly
-//         until absolute precision aprec.
-//   n is the predicated number of roots
-//      (will print an error message if n is wrong)
-template<class NT>
-CORE_INLINE void testNewtonSturm(const Polynomial<NT>&P, int prec, int n = -1) {
-  Sturm<NT> Ss (P);
-  BFVecInterval v;
-  Ss.newtonRefineAllRoots(v, prec);
-  std::cout << "   Number of roots is " << v.size();
-  if ((n >= 0) & (v.size() == (unsigned)n))
-    std::cout << " (CORRECT!)" << std::endl;
-  else
-    std::cout << " (ERROR!) " << std::endl;
-
-  int i = 0;
-  for (BFVecInterval::iterator it = v.begin();
-       it != v.end(); ++it) {
-    std::cout << ++i << "th Root is in ["
-    << it->first << " ; " << it->second << "]" << std::endl;
-    if(it->second - it->first <= (1/power(BigFloat(2), prec)))
-      std::cout << " (CORRECT!) Precision attained" << std::endl;
-    else
-      std::cout << " (ERROR!) Precision not attained" << std::endl;
-  }
-}// testNewtonSturm
-
-} //namespace CORE
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_BigFloat.h b/3rdparty/CGAL-4.6/include/CGAL/CORE_BigFloat.h
deleted file mode 100644
index 48e2dff..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE_BigFloat.h
+++ /dev/null
@@ -1,548 +0,0 @@
-// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
-//============================================================================
-
-#ifndef CGAL_CORE_BIGFLOAT_H
-#define CGAL_CORE_BIGFLOAT_H
-
-#include <CGAL/basic.h>
-#include <CGAL/number_type_basic.h>
-#include <CGAL/CORE/BigFloat.h>
-#include <CGAL/CORE_coercion_traits.h>
-#include <CGAL/Interval_traits.h> 
-#include <CGAL/Bigfloat_interval_traits.h> 
-
-namespace CGAL {
-
-// ######### Interval_traits 
-
-template<> 
-class Interval_traits<CORE::BigFloat> 
-    : public internal::Interval_traits_base<CORE::BigFloat>{
-    typedef CORE::BigFloat Interval;
-public: 
-    typedef Interval_traits<CORE::BigFloat> Self; 
-    typedef CORE::BigFloat Type;
-    typedef CORE::BigFloat Bound;
-    typedef CGAL::Tag_true Is_interval; 
-    typedef CGAL::Tag_true Is_bigfloat_interval; 
-  
- 
-    struct Lower :public std::unary_function<Interval,Bound>{
-        Bound operator() ( Interval x ) const {   
-            CORE::BigFloat result = ::CORE::BigFloat(x.m()-x.err(),0,x.exp());
-            CGAL_postcondition(result <= x);
-            return result; 
-        }
-    };
-    
-    struct Upper :public std::unary_function<Interval,Bound>{
-        Bound operator() ( Interval x ) const {     
-            CORE::BigFloat result = ::CORE::BigFloat(x.m()+x.err(),0,x.exp());
-            CGAL_postcondition(result >= x);
-            return result; 
-        }
-    };
-
-    struct Width :public std::unary_function<Interval,Bound>{
-         
-        Bound operator() ( Interval x ) const {    
-            unsigned long err = 2*x.err();
-            return Bound(CORE::BigInt(err),0,x.exp());
-        }
-    };
-
-    struct Median :public std::unary_function<Interval,Bound>{
-         
-        Bound operator() ( Interval x ) const {   
-            return Bound(x.m(),0,x.exp());
-        }
-    };
-
-    struct Norm :public std::unary_function<Interval,Bound>{
-        Bound operator() ( Interval x ) const {
-          BOOST_USING_STD_MAX();
-          return max BOOST_PREVENT_MACRO_SUBSTITUTION (Upper()(x).abs(),Lower()(x).abs());
-        }
-    };
-    
-    struct Zero_in :public std::unary_function<Interval,bool>{
-        bool operator() ( Interval x ) const {      
-            return x.isZeroIn(); 
-        }
-    };
-
-    struct In :public std::binary_function<Bound,Interval,bool>{  
-        bool operator()( Bound x, const Interval& a ) const {    
-            CGAL_precondition(CGAL::singleton(x));
-            return (Lower()(a) <= x && x <= Upper()(a));
-        }
-    };
-
-    struct Equal :public std::binary_function<Interval,Interval,bool>{  
-        bool operator()( const Interval& a, const Interval& b ) const { 
-            return (Upper()(a) == Upper()(b) &&  Lower()(a) == Lower()(b));
-        }
-    };
-    
-    struct Subset :public std::binary_function<Interval,Interval,bool>{  
-        bool operator()( const Interval& a, const Interval& b ) const {   
-            return Lower()(b) <= Lower()(a) && Upper()(a) <= Upper()(b);
-        }
-    };
-    
-    struct Proper_subset :public std::binary_function<Interval,Interval,bool>{ 
-        bool operator()( const Interval& a, const Interval& b ) const { 
-            return Subset()(a,b) && (!Equal()(a,b));
-        }
-    };
-    
-    struct Intersection :public std::binary_function<Interval,Interval,Interval>{ 
-      Interval operator()( const Interval& a, const Interval& b ) const {
-            BOOST_USING_STD_MAX();
-            BOOST_USING_STD_MIN();
-            // std::cout <<"a= (" << a.m() << "+-" << a.err() << ")*2^" << a.exp() << std::endl;
-            Bound l(max BOOST_PREVENT_MACRO_SUBSTITUTION (Lower()(a),Lower()(b)));
-            Bound u(min BOOST_PREVENT_MACRO_SUBSTITUTION (Upper()(a),Upper()(b)));
-
-            if(u < l ) throw Exception_intersection_is_empty();
-            return Construct()(l,u);
-        }
-    };
- 
-
-    struct Overlap :public std::binary_function<Interval,Interval,bool>{
-        bool operator() ( Interval x, Interval y ) const {       
-            Self::Zero_in Zero_in;
-            bool result = Zero_in(x-y);
-            return result;
-        }
-    };
-   
-    struct Hull :public std::binary_function<Interval,Interval,Interval>{
-
-      // for debugging
-/*      void print_bf(CORE::BigFloat bf, std::string s) const {
-        
-        std::cout << s << ".m()=" << bf.m() << ","
-                  << s << ".err()=" << bf.err() << ","
-                  << s << ".exp()=" << bf.exp() << ","
-                  << "td=" << bf << std::endl;
-      }
-*/
-
-        Interval operator() ( Interval x, Interval y ) const {
-            BOOST_USING_STD_MAX();
-            BOOST_USING_STD_MIN();
-#if 0
-            // this is not possible since CORE::centerize has a bug.
-            Interval result = CORE::centerize(x,y);
-#else 
-
-            //print_bf(x,"x");
-            //print_bf(y,"y");
-            
-             CORE::BigFloat result;
-             
-            // Unfortunately, CORE::centerize(x,y) has bugs. 
-            if ((x.m() == y.m()) && (x.err() == y.err()) && (x.exp() == y.exp())) { 
-                return x;
-            }
-                         
-            CORE::BigFloat lower = min BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::lower(x), CGAL::lower(y));
-            CORE::BigFloat upper = max BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::upper(x), CGAL::upper(y));
-
-            CORE::BigFloat mid = (lower + upper)/2;
-             
-            //print_bf(lower,"lower");
-            //print_bf(upper,"upper");
-            //print_bf(mid,"mid");
-
-            // Now we have to compute the error. The problem is that .err() is just a long
-            CORE::BigFloat err = (upper - lower)/CORE::BigFloat(2);
-                   
-            //print_bf(err,"err");
-
-            //std::cout << "lower    " << lower << std::endl;
-            //std::cout << "upper    " << upper << std::endl;
-            //std::cout << "mid      " << mid << std::endl;
-            //std::cout << "err I    " << err << std::endl;
-            
-            // shift such that err.m()+err.err() fits into long 
-            int digits_long = std::numeric_limits<long>::digits;
-            if(::CORE::bitLength(err.m()+err.err()) >= digits_long){
-                long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ; 
-                //std::cout << "shift " << shift<< std::endl;
-                long new_err = ((err.m()+err.err()) >> shift).longValue()+1; 
-                err = CORE::BigFloat(0,new_err,0) * CORE::BigFloat::exp2(err.exp()*CORE::CHUNK_BIT+shift);
-            }else{           
-                err = CORE::BigFloat(0,err.m().longValue()+err.err(),err.exp());
-            }
-            //print_bf(err,"new_err");
-
-            // TODO: This is a workaround for a bug in operator+ 
-            // of CORE::Bigfloat. If the exponent difference is too big,
-            // this might cause problems, since the error is a long
-            if(mid.exp() > err.exp()) {
-                long mid_err = mid.err();
-                CORE::BigInt mid_m = mid.m();
-                mid_err = mid_err << (mid.exp()-err.exp())*CORE::CHUNK_BIT;
-                mid_m = mid_m << (mid.exp()-err.exp())*CORE::CHUNK_BIT;
-                mid = CORE::BigFloat(mid_m,mid_err,err.exp());
-                //print_bf(mid,"corr_mid");
-            }
-            
-            //print_bf(result,"result");        
-
-            result = mid + err;  
-             
-#endif 
-
-            CGAL_postcondition( 
-                    CGAL::lower(result) 
-                    <=  min BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::lower(x), CGAL::lower(y)));
-            CGAL_postcondition( 
-                    CGAL::upper(result) 
-                    >= max BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::upper(x), CGAL::upper(y)));
-
-            
-
-            return result ;
-        }
-    };
-
-    struct Singleton :public std::unary_function<Interval,bool> {
-        bool operator() ( Interval x ) const {       
-            return (x.err() == 0); 
-        }
-    };
-
-    struct Construct :public std::binary_function<Bound,Bound,Interval>{
-        Interval operator()( const Bound& l,const Bound& r) const {
-            CGAL_precondition( l < r ); 
-            return Hull()(l,r);
-        }
-    };
-};
-
-
-// ########### Bigfloat_interval_traits 
-
-
-// template<typename BFI> long relative_precision(BFI bfi);
-namespace internal{
-
-CORE::BigFloat 
-inline 
-round(const CORE::BigFloat& x, long rel_prec = CORE::defRelPrec.toLong() ){
-    CGAL_postcondition(rel_prec >= 0);   
-
-    // since there is not rel prec defined if Zero_in(x)
-    if (x.isZeroIn()) return x; 
-    // if (CGAL::get_significant_bits(x) <= rel_prec) return x;
-   
-// if 1 
-//    CORE::BigFloat xr;
-//    xr.approx(x,rel_prec,1024);
-//    typedef CORE::BigFloat BF; 
-// else       
-    typedef CORE::BigFloat BF; 
-    BF xr;
-   
-    CORE::BigInt m = x.m();
-    long         err = x.err();
-    long         exp = x.exp(); 
-   
-
-//    std::cout <<"(" << m << "+-" <<err << ")*2^"<<(CORE::CHUNK_BIT*exp) << std::endl; 
-//    if (err != 0) 
-//      std::cout <<"current prec: " <<  CGAL::relative_precision(x) << std::endl;
-//    else 
-//      std::cout <<"current prec: " << " SINGLETON " << std::endl;
-//    std::cout <<"desired prec: " << rel_prec << std::endl; 
-//    std::cout <<"bitLength: " << CORE::bitLength(m) << std::endl; 
-//    long shift = ::CORE::bitLength(m) - rel_prec - 1;
-   
-    long shift ;
-    if (err == 0)
-      shift = ::CORE::bitLength(m) - rel_prec - 3;
-    else      
-      shift = CGAL::relative_precision(x) - rel_prec -1; 
-    
-    if( shift > 0 ){    
-      m   >>= shift ; 
-      err >>= shift; 
-      xr = BF(m,err+1,0)*BF::exp2(exp*CORE::CHUNK_BIT+shift);     
-    }else{    // noting to do
-        xr = x; 
-    }
-
-//    std::cout <<"(" <<m << "+-" <<err+1 << ")*2^"<<(CORE::CHUNK_BIT*exp) << std::endl; 
-//    if (xr.err() != 0) 
-//      std::cout <<"current prec: " <<  CGAL::relative_precision(xr) << std::endl;
-//    else 
-//      std::cout <<"current prec: " << " SINGLETON "<< std::endl;
-//    std::cout <<"desired prec: " << rel_prec << std::endl; 
-    
-// endif     
-    CGAL_postcondition(singleton(xr) || CGAL::relative_precision(xr) - rel_prec >= 0); 
-    CGAL_postcondition(singleton(xr) || CGAL::relative_precision(xr) - rel_prec <= 32);   
-    CGAL_postcondition(BF(xr.m()-xr.err(),0,xr.exp()) <= BF(x.m()-x.err(),0,x.exp()));
-    CGAL_postcondition(BF(xr.m()+xr.err(),0,xr.exp()) >= BF(x.m()+x.err(),0,x.exp()));
-    return xr;     
-}
-}
-
-template<> class Bigfloat_interval_traits<CORE::BigFloat> 
-:public Interval_traits<CORE::BigFloat>
-{
-
-    typedef CORE::BigFloat NT;
-    typedef CORE::BigFloat BF;
-public:
-  typedef Bigfloat_interval_traits<NT> Self;
-  
-   struct Relative_precision {
-        // type for the \c AdaptableUnaryFunction concept.
-        typedef NT  argument_type;
-        // type for the \c AdaptableUnaryFunction concept.
-        typedef long  result_type;
-
-        long operator()( NT x) const { 
-          CGAL_precondition(!Singleton()(x));
-          CGAL_precondition(!CGAL::zero_in(x));
-          
-          x = x.abs();
-          NT w = Width()(x);
-          w /= ::CORE::BigFloat(x.m()-x.err(),0,x.exp());    
-          w = w.abs();
-          return -(CORE::ceilLg(w.m()+w.err())+w.exp()*CORE::CHUNK_BIT);
-        }
-    };
-       
-    struct Set_precision {
-        // type for the \c AdaptableUnaryFunction concept.
-        typedef long  argument_type;
-        // type for the \c AdaptableUnaryFunction concept.
-        typedef long  result_type;  
-     
-        long operator() ( long prec ) const {    
-            long result =  ::CORE::defRelPrec.toLong();
-            ::CORE::defRelPrec = prec; 
-            ::CORE::defBFdivRelPrec = prec;
-            return result; 
-        }
-    };
-     
-    struct Get_precision {
-        // type for the \c AdaptableGenerator concept.
-        typedef long  result_type;  
-     
-        long operator() () const {
-            return  ::CORE::defRelPrec.toLong(); 
-        }
-    };
-};
-
-
-
-
-//
-// Algebraic structure traits
-//
-template <> class Algebraic_structure_traits< CORE::BigFloat >
-  : public Algebraic_structure_traits_base< CORE::BigFloat,
-                                            Field_with_kth_root_tag >  {
-  public:
-    typedef Tag_false          Is_exact;
-    typedef Tag_true           Is_numerical_sensitive;
-
-    class Sqrt
-      : public std::unary_function< Type, Type > {
-      public:
-        Type operator()( const Type& x ) const {
-            // What I want is a sqrt computed with ::CORE::defRelPrec bits.
-            // And not ::CORE::defBFsqrtAbsPrec as CORE does. 
-            
-            CGAL_precondition(::CORE::defRelPrec.toLong() > 0);
-            CGAL_precondition(x > 0);
-            
-            Type a = CGAL::internal::round(x, ::CORE::defRelPrec.toLong()*2);
-            CGAL_postcondition(a > 0); 
-
-            Type tmp1 = 
-                CORE::BigFloat(a.m(),0,0).sqrt(::CORE::defRelPrec.toLong());
-            Type err  =  
-                Type(0,long(std::sqrt(double(a.err()))),0) 
-                * CORE::BigFloat::exp2(a.exp()*7);
-            Type result = tmp1*CORE::BigFloat::exp2(a.exp()*7) + err;
-           
-            CGAL_postcondition(result >= 0);
-            CGAL_postcondition(CGAL::lower(result*result) <= CGAL::lower(x));
-            CGAL_postcondition(CGAL::upper(result*result) >= CGAL::upper(x));
-
-            return result;
-        }
-    };
-
-    class Kth_root
-      : public std::binary_function<int, Type, Type> {
-      public:
-        Type operator()( int k,
-                                        const Type& x) const {
-            CGAL_precondition_msg( k > 0, "'k' must be positive for k-th roots");
-            // CORE::radical isn't implemented for negative values of x, so we
-            //  have to handle this case separately
-            if( x < 0 && k%2 != 0) {
-              return Type(-CORE::radical( -x, k ) );
-            }
-
-            return Type( CORE::radical( x, k ) );
-        }
-    };
-};
-
-//
-// Real embeddable traits
-//
-template <> class Real_embeddable_traits< CORE::BigFloat >
-  : public INTERN_RET::Real_embeddable_traits_base< CORE::BigFloat , CGAL::Tag_true  > {
-  public:
-    class Abs
-      : public std::unary_function< Type, Type > {
-      public:
-        Type operator()( const Type& x ) const {
-            Type result; 
-          
-            if(x.isZeroIn()){
-                CORE::BigInt m; 
-                if(x.m() < 0 ){
-                    m = -(x.m()-x.err());
-                }else{
-                    m =  x.m()+x.err();
-                }
-                if(m % 2 == 1) m += 1;
-                
-                Type upper(m,0,x.exp());
-                result = CORE::centerize(CORE::BigFloat(0),upper);
-                
-                CGAL_postcondition(result.m()-result.err() <= 0); 
-                if(result.m()-result.err() != 0){
-                    result = this->operator()(result);
-                }
-                CGAL_postcondition(result.m()-result.err() == 0); 
-            }else{
-                result = CORE::abs(x);
-            }
-            CGAL_postcondition(result.m()-result.err() >= 0); 
-            CGAL_postcondition(Type(result.m()+result.err(),0,result.exp()) 
-                         >= Type(x.m()+x.err(),0,x.exp()));       
-            return result;
-        }
-    };
-
-    class Sgn
-      : public std::unary_function< Type, ::CGAL::Sign > {
-      public:
-        ::CGAL::Sign operator()( const Type& x ) const {
-            ::CGAL::Sign result =  sign( x.sign());
-            return result; 
-        }
-    };
-
-    class Compare
-      : public std::binary_function< Type, Type,
-                                Comparison_result > {
-      public:
-        Comparison_result operator()( const Type& x,
-                                            const Type& y ) const {
-          return (Comparison_result) sign( (x-y).sign());
-        }
-        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type, 
-                Comparison_result )
-    };
-
-    class To_double
-      : public std::unary_function< Type, double > {
-      public:
-        double operator()( const Type& x ) const {
-          // this call is required to get reasonable values for the double
-          // approximation
-          return x.doubleValue();
-        }
-    };
-
-    class To_interval
-      : public std::unary_function< Type, std::pair< double, double > > {
-    public:
-        std::pair<double, double> operator()( const Type& x ) const {
-                        
-            double lb,ub;
-           
-            Type x_lower = CGAL::lower(CGAL::internal::round(CGAL::lower(x),50));
-            Type x_upper = CGAL::upper(CGAL::internal::round(CGAL::upper(x),50));
-            
-            // since matissa has 50 bits only, conversion to double is exact 
-            lb = x_lower.doubleValue();
-            CGAL_postcondition(lb == x_lower);
-            ub = x_upper.doubleValue();
-            CGAL_postcondition(ub == x_upper);             
-            
-            std::pair<double, double> result(lb,ub);
-            CGAL_postcondition( result.first  <=  CORE::Expr(CGAL::lower(x)));
-            CGAL_postcondition( result.second >=  CORE::Expr(CGAL::upper(x)));
-            return result;      
-        }
-    };
-};
-
-} //namespace CGAL
-
-//since types are included by CORE_coercion_traits.h:
-#include <CGAL/CORE_Expr.h>
-#include <CGAL/CORE_BigInt.h>
-#include <CGAL/CORE_BigRat.h>
-#include <CGAL/CORE_BigFloat.h>
-#include <CGAL/CORE_arithmetic_kernel.h>
-
-namespace Eigen {
-  template<class> struct NumTraits;
-  template<> struct NumTraits<CORE::BigFloat>
-  {
-    typedef CORE::BigFloat Real;
-    typedef CORE::BigFloat NonInteger;
-    typedef CORE::BigFloat Nested;
-
-    static inline Real epsilon() { return 0; }
-    static inline Real dummy_precision() { return 0; }
-
-    enum {
-      IsInteger = 0,
-      IsSigned = 1,
-      IsComplex = 0,
-      RequireInitialization = 1,
-      ReadCost = 6,
-      AddCost = 60,
-      MulCost = 60
-    };
-  };
-}
-
-#endif // CGAL_CORE_BIGFLOAT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_coercion_traits.h b/3rdparty/CGAL-4.6/include/CGAL/CORE_coercion_traits.h
deleted file mode 100644
index d097ffc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/CORE_coercion_traits.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
-
-
-#ifndef CGAL_CORE_COERCION_TRAITS_H
-#define CGAL_CORE_COERCION_TRAITS_H 1
-
-#include <CGAL/number_type_basic.h>
-
-#ifdef CGAL_USE_CORE
-
-#ifndef CORE_LEVEL
-#define CORE_LEVEL 4
-#endif
-
-#include <CGAL/CORE/CORE.h>
-
-//#include <NiX/Coercion_traits.h>
-
-namespace CGAL {
-
-//CORE internal coercions:
-
-
-// The following definitions reflect the interaction of the CORE number types
-// with the built in types,
-// CORE BigInt:
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,::CORE::BigInt)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,::CORE::BigInt)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,::CORE::BigInt)
-
-
-// CORE BigRat:
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::BigRat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::BigRat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::BigRat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::BigRat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::BigRat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigInt,::CORE::BigRat)
-
-// CORE Expr:
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigInt,::CORE::Expr)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigRat,::CORE::Expr)
-
-
-
-// NOTE that CORE::BigFloat counts as an interval ! 
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::BigFloat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::BigFloat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::BigFloat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::BigFloat)
-    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::BigFloat)
-
-template <> 
-struct Coercion_traits<CORE::BigFloat , ::CORE::BigInt>{
-    typedef Tag_true  Are_explicit_interoperable;
-    typedef Tag_false Are_implicit_interoperable;
-    typedef CORE::BigFloat Type;
-    
-    struct Cast{
-        typedef Type result_type;
-        Type operator()(const CORE::BigFloat& x)  const { return x;}
-        Type operator()(const ::CORE::BigInt x) const {
-            CORE::BigFloat result;
-            result.approx(x,CORE::defRelPrec.toLong(),LONG_MAX);
-            // Do not use MakeFloorExact as it changes the Bigfloat
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
-            return result; 
-        }
-    };
-};
-
-template <> 
-struct Coercion_traits<CORE::BigFloat , ::CORE::BigRat>{
-    typedef Tag_true  Are_explicit_interoperable;
-    typedef Tag_false Are_implicit_interoperable;
-    typedef CORE::BigFloat Type;
-    
-    struct Cast{
-        typedef Type result_type;
-        Type operator()(const CORE::BigFloat& x)  const { return x;}
-        Type operator()(const ::CORE::BigRat x) const {
-            
-	  CORE::BigFloat result(x,CORE::defRelPrec.toLong(),LONG_MAX);
-            // Do not use MakeFloorExact as it changes the Bigfloat
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
-            return result; 
-        }
-    };
-};
-
-template <> 
-struct Coercion_traits<CORE::BigFloat , ::CORE::Expr>{
-    typedef Tag_true  Are_explicit_interoperable;
-    typedef Tag_false Are_implicit_interoperable;
-    typedef CORE::BigFloat Type;
-    
-    struct Cast{
-        typedef Type result_type;
-        Type operator()(const CORE::BigFloat& x)  const { return x;}
-        Type operator()(const ::CORE::Expr x) const {
-            CORE::BigFloat result(x, CORE::defRelPrec.toLong(),LONG_MAX);
-            // Do not use MakeFloorExact as it changes the Bigfloat
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
-            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
-            return result; 
-        }
-    };
-};
-
-template <> struct Coercion_traits< ::CORE::BigInt, CORE::BigFloat >
-    :public Coercion_traits< CORE::BigFloat , ::CORE::BigInt >{}; 
-
-template <> struct Coercion_traits< ::CORE::BigRat, CORE::BigFloat >
-    :public Coercion_traits< CORE::BigFloat , ::CORE::BigRat >{}; 
-
-template <> struct Coercion_traits< ::CORE::Expr, CORE::BigFloat >
-    :public Coercion_traits< CORE::BigFloat , ::CORE::Expr>{};        
-        
-
-
-
-
-
-// not provieded by CORE
-// Note that this is not symmetric to LEDA
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigInt)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigRat)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::BigRat)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigFloat)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::BigFloat)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::Expr)
-//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::Expr)
-
-} //namespace CGAL
-
-#endif // CGAL_USE_CORE
-#endif //CGAL_CORE_COERCION_TRAITS_H 1
-//EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_2.h
deleted file mode 100644
index 3b0c9f7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_2.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 1997-2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_CIRCLE_2_H
-#define CGAL_CARTESIAN_CIRCLE_2_H
-
-#include <CGAL/Cartesian/predicates_on_points_2.h>
-#include <boost/tuple/tuple.hpp>
-
-namespace CGAL {
-
-template <class R_ >
-class CircleC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::RT                   RT;
-  typedef typename R_::Circle_2             Circle_2;
-  typedef typename R_::Point_2              Point_2;
-
-  typedef boost::tuple<Point_2, FT, Orientation>   Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  CircleC2() {}
-
-  explicit CircleC2(const Point_2 &center, const FT &squared_radius = FT(0),
-           const Orientation &orient = COUNTERCLOCKWISE) // Is this new?
-  {
-    CGAL_kernel_precondition( ( squared_radius >= FT(0) ) &
-                              ( orient    != COLLINEAR) );
-
-    base = Rep(center, squared_radius, orient);
-  }
- 
-  bool           operator==(const CircleC2 &s) const;
-  bool           operator!=(const CircleC2 &s) const;
-
-  const Point_2 & center() const
-  {
-    return get(base).template get<0>();
-  }
-
-  const FT & squared_radius() const
-  {
-    return get(base).template get<1>();
-  }
-
-  Orientation orientation() const
-  {
-    return get(base).template get<2>();
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_3.h
deleted file mode 100644
index 5eed587..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Circle_3.h
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s)     : Monique Teillaud, Pedro Machado, Sebastien Loriot
-
-#ifndef CGAL_CARTESIAN_CIRCLEC3_H
-#define CGAL_CARTESIAN_CIRCLEC3_H
-
-#include <CGAL/Interval_nt.h>
-
-namespace CGAL {
-
-template <class R_ >
-class CircleC3 {
-  typedef typename R_::Sphere_3                 Sphere_3;
-  typedef typename R_::Plane_3                  Plane_3;
-  typedef typename R_::Point_3                  Point_3;
-  typedef typename R_::Vector_3                 Vector_3;
-  typedef typename R_::Direction_3              Direction_3;
-  typedef typename R_::FT                       FT;
-
-  typedef std::pair<Sphere_3, Plane_3>             Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-  Base base;  
-
-public:
-  typedef R_                                     R;
-
-  CircleC3() {}
-
-  CircleC3(const Point_3& center, const FT& squared_r, const Direction_3& d)
-  {
-    CGAL_kernel_assertion(squared_r >= FT(0));
-    // non-degenerated Direction
-    CGAL_kernel_assertion((d.dx() != FT(0)) || (d.dy() != FT(0)) || (d.dz() != FT(0)));
-    base = Rep(Sphere_3(center,squared_r),
-                plane_from_point_direction(center, d));
-  }
-
-  CircleC3(const Point_3& center, const FT& squared_r, const Vector_3& normal) 
-  {
-    CGAL_kernel_assertion(squared_r >= FT(0));
-    // non-degenerated Vector
-    CGAL_kernel_assertion((normal.x() != FT(0)) ||
-                          (normal.y() != FT(0)) ||
-                          (normal.z() != FT(0)));
-    base = Rep(Sphere_3(center,squared_r),
-                Plane_3(center, normal.direction()));
-  }
-
-  CircleC3(const Point_3& center, const FT& squared_r, const Plane_3& p)
-  {
-    // the plane contains the center and it is not degenerate
-    CGAL_kernel_assertion(!R().is_degenerate_3_object()(p));
-    CGAL_kernel_assertion((p.a() * center.x() +
-                           p.b() * center.y() +
-                           p.c() * center.z() +
-                           p.d()) == CGAL::ZERO);
-    CGAL_kernel_assertion(squared_r >= FT(0));
-    base = Rep(Sphere_3(center,squared_r), p);
-  }
-
-  CircleC3(const Sphere_3 &s1, const Sphere_3 &s2) {
-    Object obj = R().intersect_3_object()(s1, s2);
-    // s1,s2 must intersect
-    CGAL_kernel_precondition(!(obj.is_empty()));
-    const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
-    if(circle_ptr!=NULL)
-      base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
-    else {
-      const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
-      CGAL_kernel_precondition(point!=NULL);
-      CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
-      base = Rep(circle.diametral_sphere(), circle.supporting_plane());
-    }
-  }
-
-  CircleC3(const Plane_3 &p, const Sphere_3 &s, int) : base(s, p) {}
-
-  CircleC3(const Plane_3 &p, const Sphere_3 &s) {
-    Object obj = R().intersect_3_object()(p, s);
-    // s1,s2 must intersect
-    CGAL_kernel_precondition(!(obj.is_empty()));
-    const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
-    if(circle_ptr!=NULL)
-      base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
-    else {
-      const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
-      CGAL_kernel_precondition(point!=NULL);
-      CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
-      base = Rep(circle.diametral_sphere(), circle.supporting_plane());
-    }
-  }
-
-  CircleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) {
-	  // p, q, r are not collinear
-	  CGAL_kernel_precondition(!R().collinear_3_object()(p, q, r));
-		Plane_3 p1 = R().construct_plane_3_object()(p, q, r);
-    Plane_3 p2 = R().construct_bisector_3_object()(p, q);
-    Plane_3 p3 = R().construct_bisector_3_object()(p, r);
-    Object obj = R().intersect_3_object()(p1, p2, p3);
-    // must be a point, otherwise they are collinear
-    const Point_3& center=*object_cast<Point_3>(&obj);
-		FT sqr = R().compute_squared_distance_3_object()(center, r);
-		Sphere_3 s = R().construct_sphere_3_object()(center, sqr);
-		base = Rep(s, p1);
-  }
-
-  const Plane_3& supporting_plane() const
-  {
-    return get(base).second;
-  }
-
-  const Sphere_3& supporting_sphere() const
-  {
-    return diametral_sphere();
-  }
-
-  Point_3 center() const
-  {
-    return diametral_sphere().center();
-  }
-
-  FT squared_radius() const
-  {
-    return diametral_sphere().squared_radius();
-  }
-
-  const Sphere_3& diametral_sphere() const
-  {
-    return get(base).first;
-  }
-
-  double approximate_area() const
-  {
-    return CGAL_PI * to_double(squared_radius());
-  }
-
-  double approximate_squared_length() const
-  {
-    return CGAL_PI * CGAL_PI * 4.0 * to_double(squared_radius());
-  }
-
-  FT area_divided_by_pi() const
-  {
-    return squared_radius();
-  }
-
-  FT squared_length_divided_by_pi_square() const
-  {
-    return 4 * squared_radius();
-  }
-
-  // this bbox function
-  // can be optimize by doing different cases
-  // for each variable = 0 (cases with is_zero)
-  CGAL::Bbox_3 bbox() const
-  {
-    typedef CGAL::Interval_nt<false> Interval;
-    CGAL::Interval_nt<false>::Protector ip;
-    const Sphere_3 &s = diametral_sphere();
-    const FT &sq_r = s.squared_radius();
-    const Point_3 &p = s.center();
-    if(sq_r == FT(0)) return p.bbox();
-    const Plane_3 &plane = supporting_plane();
-    const Interval a = CGAL::to_interval(plane.a());
-    const Interval b = CGAL::to_interval(plane.b());
-    const Interval c = CGAL::to_interval(plane.c());
-    const Interval x = CGAL::to_interval(p.x());
-    const Interval y = CGAL::to_interval(p.y());
-    const Interval z = CGAL::to_interval(p.z());
-    const Interval r2 = CGAL::to_interval(sq_r);
-    const Interval r = CGAL::sqrt(r2); // maybe we can work with r2
-                                       // in order to save this operation
-                                       // but if the coefficients are to high
-                                       // the multiplication would lead to inf
-                                       // results
-    const Interval a2 = CGAL::square(a);
-    const Interval b2 = CGAL::square(b);
-    const Interval c2 = CGAL::square(c);
-    const Interval sqr_sum = a2 + b2 + c2;
-    const Interval mx = r * CGAL::sqrt((sqr_sum - a2)/sqr_sum);
-    const Interval my = r * CGAL::sqrt((sqr_sum - b2)/sqr_sum);
-    const Interval mz = r * CGAL::sqrt((sqr_sum - c2)/sqr_sum);
-    return CGAL::Bbox_3((x-mx).inf(),(y-my).inf(),(z-mz).inf(),
-                        (x+mx).sup(),(y+my).sup(),(z+mz).sup());
-  }
-
-  bool operator==(const CircleC3 &) const;
-  bool operator!=(const CircleC3 &) const;
-
-  bool has_on(const Point_3 &p) const;
-  bool has_on_bounded_side(const Point_3 &p) const;
-  bool has_on_unbounded_side(const Point_3 &p) const;
-  Bounded_side bounded_side(const Point_3 &p) const;
-
-  bool is_degenerate() const
-  {
-    return diametral_sphere().is_degenerate();
-  }
-
-};
-
-template < class R >
-inline
-bool
-CircleC3<R>::
-has_on(const typename CircleC3<R>::Point_3 &p) const
-{
-  return R().has_on_3_object()(diametral_sphere(),p) &&
-         R().has_on_3_object()(supporting_plane(),p);
-}
-
-template < class R >
-inline
-bool
-CircleC3<R>::
-has_on_bounded_side(const typename CircleC3<R>::Point_3 &p) const
-{
-  CGAL_kernel_precondition(R().has_on_3_object()(supporting_plane(), p));
-  return squared_distance(center(),p) < squared_radius();
-}
-
-template < class R >
-inline
-bool
-CircleC3<R>::
-has_on_unbounded_side(const typename CircleC3<R>::Point_3 &p) const
-{
-  CGAL_kernel_precondition(R().has_on_3_object()(supporting_plane(), p));
-  return squared_distance(center(),p) > squared_radius();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-Bounded_side
-CircleC3<R>::
-bounded_side(const typename CircleC3<R>::Point_3 &p) const
-{
-  CGAL_kernel_precondition(is_degenerate() || R().has_on_3_object()(supporting_plane(), p));
-  return diametral_sphere().bounded_side(p);
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-CircleC3<R>::operator==(const CircleC3<R> &t) const
-{
-  if (CGAL::identical(base, t.base))
-    return true;
-  if(!(center() == t.center() &&
-       squared_radius() == t.squared_radius())) return false;
-
-  const typename R::Plane_3 p1 = supporting_plane();
-  const typename R::Plane_3 p2 = t.supporting_plane();
-
-  if(is_zero(p1.a())) {
-    if(!is_zero(p2.a())) return false;
-    if(is_zero(p1.b())) {
-      if(!is_zero(p2.b())) return false;
-      return p1.c() * p2.d() == p1.d() * p2.c();
-    }
-    return (p2.c() * p1.b() == p1.c() * p2.b()) &&
-           (p2.d() * p1.b() == p1.d() * p2.b());
-  }
-  return (p2.b() * p1.a() == p1.b() * p2.a()) &&
-         (p2.c() * p1.a() == p1.c() * p2.a()) &&
-         (p2.d() * p1.a() == p1.d() * p2.a());
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-CircleC3<R>::operator!=(const CircleC3<R> &t) const
-{
-  return !(*this == t);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_CIRCLEC3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_2.h
deleted file mode 100644
index ba71236..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_2.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_DIRECTION_2_H
-#define CGAL_CARTESIAN_DIRECTION_2_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template < class R_ >
-class DirectionC2
-{
-  typedef DirectionC2<R_>                   Self;
-  typedef typename R_::FT                   FT;
-  typedef FT                                RT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Vector_2             Vector_2;
-  typedef typename R_::Line_2               Line_2;
-  typedef typename R_::Ray_2                Ray_2;
-  typedef typename R_::Segment_2            Segment_2;
-  typedef typename R_::Direction_2          Direction_2;
-
-  typedef cpp11::array<FT, 2>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef R_                                     R;
-
-  DirectionC2() {}
- 
-  DirectionC2(const FT &x, const FT &y)
-    : base(CGAL::make_array(x, y)) {}
-
-  bool operator==(const DirectionC2 &d) const;
-  bool operator!=(const DirectionC2 &d) const;
-
-  Vector_2 to_vector() const;
-
-  const RT & dx() const
-  {
-      return get(base)[0];
-  }
-  const RT & dy() const
-  {
-      return get(base)[1];
-  }
-};
-
-template < class R >
-inline
-bool
-DirectionC2<R>::operator==(const DirectionC2<R> &d) const
-{
-  if (CGAL::identical(base, d.base))
-      return true;
-  return equal_direction(*this, d);
-}
-
-template < class R >
-inline
-bool
-DirectionC2<R>::operator!=(const DirectionC2<R> &d) const
-{
-  return !( *this == d );
-}
-
-
-template < class R >
-inline
-typename DirectionC2<R>::Vector_2
-DirectionC2<R>::to_vector() const
-{
-  return Vector_2(dx(), dy());
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_3.h
deleted file mode 100644
index 814f54e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Direction_3.h
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_DIRECTION_3_H
-#define CGAL_CARTESIAN_DIRECTION_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/predicates/kernel_ftC3.h>
-
-namespace CGAL {
-
-template < class R_ >
-class DirectionC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Ray_3                Ray_3;
-  typedef typename R_::Segment_3            Segment_3;
-  typedef typename R_::Direction_3          Direction_3;
-
-  typedef cpp11::array<FT, 3>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef R_                                R;
-
-  DirectionC3() {}
-
-  explicit DirectionC3(const Vector_3 &v)
-    : base(CGAL::make_array(v.x(), v.y(), v.z())) {}
-  // { *this = v.direction(); }
-
-  explicit DirectionC3(const Line_3 &l)
-  { *this = l.rep().direction(); }
-
-  explicit DirectionC3(const Ray_3 &r)
-  { *this = r.direction(); }
-
-  explicit DirectionC3(const Segment_3 &s)
-  { *this = s.direction(); }
-
-  DirectionC3(const FT &x, const FT &y, const FT &z)
-    : base(CGAL::make_array(x, y, z)) {}
-
-  typename R::Boolean   operator==(const DirectionC3 &d) const;
-  typename R::Boolean   operator!=(const DirectionC3 &d) const;
-
-  Vector_3       to_vector() const;
-  Vector_3       vector() const { return to_vector(); }
-
-  const FT & dx() const
-  {
-      return get(base)[0];
-  }
-  const FT & dy() const
-  {
-      return get(base)[1];
-  }
-  const FT & dz() const
-  {
-      return get(base)[2];
-  }
-
-  const FT & hdx() const
-  {
-      return dx();
-  }
-  const FT & hdy() const
-  {
-      return dy();
-  }
-  const FT & hdz() const
-  {
-      return dz();
-  }
-  FT hw() const
-  {
-      return FT(1);
-  }
-};
-
-template < class R >
-inline
-typename R::Boolean
-DirectionC3<R>::operator==(const DirectionC3<R> &d) const
-{
-  if (CGAL::identical(base, d.base))
-      return true;
-  return equal_directionC3(dx(), dy(), dz(), d.dx(), d.dy(), d.dz());
-}
-
-template < class R >
-inline
-typename R::Boolean
-DirectionC3<R>::operator!=(const DirectionC3<R> &d) const
-{
-  return !(*this == d);
-}
-
-template < class R >
-inline
-typename DirectionC3<R>::Vector_3
-DirectionC3<R>::to_vector() const
-{
-  return Vector_3(dx(), dy(), dz());
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_cuboid_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_cuboid_3.h
deleted file mode 100644
index 1cac28a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_cuboid_3.h
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_ISO_CUBOID_3_H
-#define CGAL_CARTESIAN_ISO_CUBOID_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Cartesian/predicates_on_points_3.h>
-
-namespace CGAL {
-
-template < class R_ >
-class Iso_cuboidC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Iso_cuboid_3         Iso_cuboid_3;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-  typedef typename R_::Construct_point_3    Construct_point_3;
-
-  typedef cpp11::array<Point_3, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                R;
-
-  Iso_cuboidC3() {}
-
-  Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int)
-    : base(CGAL::make_array(p, q))
-  {
-    // I have to remove the assertions, because of Cartesian_converter.
-    // CGAL_kernel_assertion(p.x()<=q.x());
-    // CGAL_kernel_assertion(p.y()<=q.y());
-    // CGAL_kernel_assertion(p.z()<=q.z());
-  }
-
-  Iso_cuboidC3(const Point_3 &p, const Point_3 &q)
-  {
-    Construct_point_3 construct_point_3;
-    FT minx, maxx, miny, maxy, minz, maxz;
-    if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); }
-    else               { minx = q.x(); maxx = p.x(); }
-    if (p.y() < q.y()) { miny = p.y(); maxy = q.y(); }
-    else               { miny = q.y(); maxy = p.y(); }
-    if (p.z() < q.z()) { minz = p.z(); maxz = q.z(); }
-    else               { minz = q.z(); maxz = p.z(); }
-    base = Rep(CGAL::make_array(construct_point_3(minx, miny, minz),
-	                         construct_point_3(maxx, maxy, maxz)));
-  }
-
-  Iso_cuboidC3(const Point_3 &left,   const Point_3 &right,
-               const Point_3 &bottom, const Point_3 &top,
-               const Point_3 &far_,   const Point_3 &close)
-    : base(CGAL::make_array(Construct_point_3()(left.x(),  bottom.y(), far_.z()),
-                             Construct_point_3()(right.x(), top.y(),    close.z())))
-  {
-    CGAL_kernel_precondition(!less_x(right, left));
-    CGAL_kernel_precondition(!less_y(top, bottom));
-    CGAL_kernel_precondition(!less_z(close, far_));
-  }
-
-  Iso_cuboidC3(const FT& min_x, const FT& min_y, const FT& min_z,
-               const FT& max_x, const FT& max_y, const FT& max_z)
-    : base(CGAL::make_array(Construct_point_3()(min_x, min_y, min_z),
-	                     Construct_point_3()(max_x, max_y, max_z)))
-  {
-    CGAL_kernel_precondition(min_x <= max_x);
-    CGAL_kernel_precondition(min_y <= max_y);
-    CGAL_kernel_precondition(min_z <= max_z);
-  }
-
-  Iso_cuboidC3(const FT& min_hx, const FT& min_hy, const FT& min_hz,
-               const FT& max_hx, const FT& max_hy, const FT& max_hz, 
-               const FT& hw)
-  {
-    if (hw == FT(1))
-       base = Rep(CGAL::make_array(Construct_point_3()(min_hx, min_hy, min_hz),
-		                    Construct_point_3()(max_hx, max_hy, max_hz)));
-    else
-       base = Rep(CGAL::make_array(Construct_point_3()(min_hx/hw, min_hy/hw, min_hz/hw),
-                                    Construct_point_3()(max_hx/hw, max_hy/hw, max_hz/hw)));
-  }
-
-  typename R::Boolean   operator==(const Iso_cuboidC3& s) const;
-  typename R::Boolean   operator!=(const Iso_cuboidC3& s) const;
-
-  const Point_3 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-      return get(base)[0];
-  }
-  const Point_3 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-      return get(base)[1];
-  }
-  Point_3 vertex(int i) const;
-  Point_3 operator[](int i) const;
-
-  Iso_cuboid_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Iso_cuboidC3(t.transform((this->min)()), t.transform((this->max)()));
-  }
-
-  Bounded_side bounded_side(const Point_3& p) const;
-  typename R::Boolean           has_on(const Point_3& p) const;
-  typename R::Boolean           has_on_boundary(const Point_3& p) const;
-  typename R::Boolean           has_on_bounded_side(const Point_3& p) const;
-  typename R::Boolean           has_on_unbounded_side(const Point_3& p) const;
-  typename R::Boolean           is_degenerate() const;
-  const FT &   xmin() const;
-  const FT &   ymin() const;
-  const FT &   zmin() const;
-  const FT &   xmax() const;
-  const FT &   ymax() const;
-  const FT &   zmax() const;
-  const FT &   min_coord(int i) const;
-  const FT &   max_coord(int i) const;
-
-  FT           volume() const;
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-Iso_cuboidC3<R>::operator==(const Iso_cuboidC3<R>& r) const
-{ // FIXME : predicate
-  if (CGAL::identical(base, r.base))
-      return true;
-  return (this->min)() == (r.min)() && (this->max)() == (r.max)();
-}
-
-template < class R >
-inline
-typename R::Boolean
-Iso_cuboidC3<R>::operator!=(const Iso_cuboidC3<R>& r) const
-{
-  return !(*this == r);
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::xmin() const
-{
-  return (this->min)().x();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::ymin() const
-{
-  return (this->min)().y();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::zmin() const
-{
-  return (this->min)().z();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::xmax() const
-{
-  return (this->max)().x();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::ymax() const
-{
-  return (this->max)().y();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::zmax() const
-{
-  return (this->max)().z();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::min_coord(int i) const
-{
-  CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
-  if (i == 0)
-     return xmin();
-  else if (i == 1)
-     return ymin();
-  else 
-     return zmin();
-}
-
-template < class R >
-inline
-const typename Iso_cuboidC3<R>::FT &
-Iso_cuboidC3<R>::max_coord(int i) const
-{
-  CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
-  if (i == 0)
-     return xmax();
-  else if (i == 1)
-     return ymax();
-  else 
-     return zmax();
-}
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-typename Iso_cuboidC3<R>::Point_3
-Iso_cuboidC3<R>::vertex(int i) const
-{
-  Construct_point_3 construct_point_3;
-  switch (i%8)
-  {
-    case 0: return (this->min)();
-    case 1: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->min)().hz());
-    case 2: return construct_point_3((this->max)().hx(), (this->max)().hy(), (this->min)().hz());
-    case 3: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->min)().hz());
-    case 4: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->max)().hz());
-    case 5: return construct_point_3((this->min)().hx(), (this->min)().hy(), (this->max)().hz());
-    case 6: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->max)().hz());
-    default: // case 7:
-        return (this->max)();
-  }
-}
-
-template < class R >
-inline
-typename Iso_cuboidC3<R>::Point_3
-Iso_cuboidC3<R>::operator[](int i) const
-{
-  return vertex(i);
-}
-
-template < class R >
-inline
-typename Iso_cuboidC3<R>::FT
-Iso_cuboidC3<R>::volume() const
-{
-  return (xmax()-xmin()) * (ymax()-ymin()) * (zmax()-zmin());
-}
-
-template < class R >
-CGAL_KERNEL_MEDIUM_INLINE
-Bounded_side
-Iso_cuboidC3<R>::
-bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
-{
-  if (strict_dominance(p, (this->min)()) && strict_dominance((this->max)(), p) )
-    return ON_BOUNDED_SIDE;
-  if (dominance(p, (this->min)()) && dominance((this->max)(), p))
-    return ON_BOUNDARY;
-  return ON_UNBOUNDED_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-Iso_cuboidC3<R>::
-has_on_boundary(const typename Iso_cuboidC3<R>::Point_3& p) const
-{
-  return bounded_side(p) == ON_BOUNDARY;
-}
-
-template < class R >
-inline
-typename R::Boolean
-Iso_cuboidC3<R>::
-has_on(const typename Iso_cuboidC3<R>::Point_3& p) const
-{
-  return bounded_side(p) == ON_BOUNDARY;
-}
-
-template < class R >
-inline
-typename R::Boolean
-Iso_cuboidC3<R>::
-has_on_bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
-{
-  return bounded_side(p) == ON_BOUNDED_SIDE;
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-Iso_cuboidC3<R>::
-has_on_unbounded_side(const typename Iso_cuboidC3<R>::Point_3& p)
-    const
-{
-  return bounded_side(p) == ON_UNBOUNDED_SIDE;
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-Iso_cuboidC3<R>::is_degenerate() const
-{ // FIXME : predicate
-  return (this->min)().hx() == (this->max)().hx()
-      || (this->min)().hy() == (this->max)().hy()
-      || (this->min)().hz() == (this->max)().hz();
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_ISO_CUBOID_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_rectangle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_rectangle_2.h
deleted file mode 100644
index 7f2fa1d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Iso_rectangle_2.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_ISO_RECTANGLE_2_H
-#define CGAL_CARTESIAN_ISO_RECTANGLE_2_H
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template <class R_>
-class Iso_rectangleC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Iso_rectangle_2      Iso_rectangle_2;
-  typedef typename R_::Construct_point_2    Construct_point_2;
-
-  typedef cpp11::array<Point_2, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  Iso_rectangleC2() {}
-
-  // Iso_rectangleC2(const Point_2 &p, const Point_2 &q)
-  //  : base(p, q) {}
-
-  Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int)
-    : base(CGAL::make_array(p, q))
-  {
-    // I have to remove the assertions, because of Cartesian_converter.
-    // CGAL_kernel_assertion(p<=q);
-  }
-
-  const Point_2 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-      return get(base)[0];
-  }
-  const Point_2 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-      return get(base)[1];
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_ISO_RECTANGLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_2.h
deleted file mode 100644
index a8fb1c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_2.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_LINE_2_H
-#define CGAL_CARTESIAN_LINE_2_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/predicates/kernel_ftC2.h>
-
-namespace CGAL {
-
-template < class R_ >
-class LineC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Direction_2          Direction_2;
-  typedef typename R_::Vector_2             Vector_2;
-  typedef typename R_::Ray_2                Ray_2;
-  typedef typename R_::Segment_2            Segment_2;
-  typedef typename R_::Line_2               Line_2;
-
-  typedef cpp11::array<FT, 3>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef R_                                     R;
-
-  LineC2() {}
-
-  LineC2(const FT &a, const FT &b, const FT &c)
-    : base(CGAL::make_array(a, b, c)) {}
-  
-  typename R_::Boolean   operator==(const LineC2 &l) const;
-  typename R_::Boolean   operator!=(const LineC2 &l) const;
-
-  const FT & a() const
-  {
-      return get(base)[0];
-  }
-  const FT & b() const
-  {
-      return get(base)[1];
-  }
-  const FT & c() const
-  {
-      return get(base)[2];
-  }
-
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-LineC2<R>::operator==(const LineC2<R> &l) const
-{
-  if (CGAL::identical(base, l.base))
-      return true;
-  return equal_lineC2(a(), b(), c(), l.a(), l.b(), l.c());
-}
-
-template < class R >
-inline
-typename R::Boolean
-LineC2<R>::operator!=(const LineC2<R> &l) const
-{
-  return ! (*this == l);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_LINE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_3.h
deleted file mode 100644
index 79acd83..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Line_3.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_LINE_3_H
-#define CGAL_CARTESIAN_LINE_3_H
-
-#include <utility>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template < class R_ >
-class LineC3
-{
-  typedef typename R_::RT                   RT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Ray_3                Ray_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Segment_3            Segment_3;
-
-  typedef std::pair<Point_3, Vector_3>             Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  LineC3() {}
-
-  LineC3(const Point_3 &p, const Point_3 &q)
-  { *this = R().construct_line_3_object()(p, q); }
-
-  explicit LineC3(const Segment_3 &s)
-  { *this = R().construct_line_3_object()(s); }
-
-  explicit LineC3(const Ray_3 &r)
-  { *this = R().construct_line_3_object()(r); }
-
-  LineC3(const Point_3 &p, const Vector_3 &v)
-    : base(p, v) {}
-
-  LineC3(const Point_3 &p, const Direction_3 &d)
-  { *this = R().construct_line_3_object()(p, d); }
-
-  bool        operator==(const LineC3 &l) const;
-  bool        operator!=(const LineC3 &l) const;
-
-  Plane_3     perpendicular_plane(const Point_3 &p) const;
-  Line_3      opposite() const;
-
-  const Point_3 &     point() const
-  {
-      return get(base).first;
-  }
-
-  const Vector_3 & to_vector() const
-  {
-      return get(base).second;
-  }
-
-  Direction_3 direction() const
-  {
-      return Direction_3(to_vector());
-  }
-
-  Point_3     point(int i) const;
-
-  bool        has_on(const Point_3 &p) const;
-  bool        is_degenerate() const;
-};
-
-template < class R >
-inline
-bool
-LineC3<R>::operator==(const LineC3<R> &l) const
-{
-  if (CGAL::identical(base, l.base))
-      return true;
-  return has_on(l.point()) && (direction() == l.direction());
-}
-
-template < class R >
-inline
-bool
-LineC3<R>::operator!=(const LineC3<R> &l) const
-{
-  return !(*this == l);
-}
-
-template < class R >
-inline
-typename LineC3<R>::Point_3
-LineC3<R>::point(int i) const
-{ return point() + to_vector()*RT(i); }
-
-template < class R >
-inline
-typename LineC3<R>::Plane_3
-LineC3<R>::
-perpendicular_plane(const typename LineC3<R>::Point_3 &p) const
-{
-  return Plane_3(p, to_vector());
-}
-
-template < class R >
-inline
-typename LineC3<R>::Line_3
-LineC3<R>::opposite() const
-{
-  return Line_3(point(), -to_vector());
-}
-
-template < class R >
-inline
-bool
-LineC3<R>::
-has_on(const typename LineC3<R>::Point_3 &p) const
-{
-  return collinear(point(), point()+to_vector(), p);
-}
-
-template < class R >
-inline
-bool
-LineC3<R>::is_degenerate() const
-{
-  return to_vector() == NULL_VECTOR;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Plane_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Plane_3.h
deleted file mode 100644
index 61a84c9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Plane_3.h
+++ /dev/null
@@ -1,311 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_PLANE_3_H
-#define CGAL_CARTESIAN_PLANE_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Cartesian/solve_3.h>
-#include <CGAL/Cartesian/plane_constructions_3.h>
-
-namespace CGAL {
-
-template <class R_>
-class PlaneC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Ray_3                Ray_3;
-  typedef typename R_::Segment_3            Segment_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Circle_3             Circle_3;
-  typedef typename R_::Construct_point_3    Construct_point_3;
-  typedef typename R_::Construct_point_2    Construct_point_2;
-
-  typedef cpp11::array<FT, 4>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef R_                                     R;
-
-  PlaneC3() {}
-
-  PlaneC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
-  { *this = plane_from_points<R>(p, q, r); }
-
-  PlaneC3(const Point_3 &p, const Direction_3 &d)
-  { *this = plane_from_point_direction<R>(p, d); }
-
-  PlaneC3(const Point_3 &p, const Vector_3 &v)
-  { *this = plane_from_point_direction<R>(p, v.direction()); }
-
-  PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d)
-    : base(CGAL::make_array(a, b, c, d)) {}
-
-  PlaneC3(const Line_3 &l, const Point_3 &p)
-  { *this = plane_from_points<R>(l.point(),
-	                      l.point()+l.direction().to_vector(),
-			      p); }
-
-  PlaneC3(const Segment_3 &s, const Point_3 &p)
-  { *this = plane_from_points<R>(s.start(), s.end(), p); }
-
-  PlaneC3(const Ray_3 &r, const Point_3 &p)
-  { *this = plane_from_points<R>(r.start(), r.second_point(), p); }
-
-  typename R::Boolean   operator==(const PlaneC3 &p) const;
-  typename R::Boolean   operator!=(const PlaneC3 &p) const;
-
-  const FT & a() const
-  {
-      return get(base)[0];
-  }
-  const FT & b() const
-  {
-      return get(base)[1];
-  }
-  const FT & c() const
-  {
-      return get(base)[2];
-  }
-  const FT & d() const
-  {
-      return get(base)[3];
-  }
-
-  Line_3       perpendicular_line(const Point_3 &p) const;
-  Plane_3      opposite() const;
-
-  Point_3      point() const;
-  Point_3      projection(const Point_3 &p) const;
-  Vector_3     orthogonal_vector() const;
-  Direction_3  orthogonal_direction() const;
-  Vector_3     base1() const;
-  Vector_3     base2() const;
-
-  Point_3      to_plane_basis(const Point_3 &p) const;
-
-  Point_2      to_2d(const Point_3 &p) const;
-  Point_3      to_3d(const Point_2 &p) const;
-
-  typename R::Oriented_side     oriented_side(const Point_3 &p) const;
-  typename R::Boolean           has_on_positive_side(const Point_3 &l) const;
-  typename R::Boolean           has_on_negative_side(const Point_3 &l) const;
-  typename R::Boolean           has_on(const Point_3 &p) const
-  {
-    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
-  }
-  typename R::Boolean           has_on(const Line_3 &l) const
-  {
-    return has_on(l.point())
-       &&  has_on(l.point() + l.direction().to_vector());
-  }
-  typename R::Boolean           has_on(const Circle_3 &circle) const
-  {
-    if(circle.squared_radius() != FT(0)) {
-      const Plane_3& p = circle.supporting_plane();
-      if(is_zero(a())) {
-        if(!is_zero(p.a())) return false;
-        if(is_zero(b())) {
-          if(!is_zero(p.b())) return false;
-          return c() * p.d() == d() * p.c();
-        }
-        return (p.c() * b() == c() * p.b()) &&
-               (p.d() * b() == d() * p.b());
-      }
-      return (p.b() * a() == b() * p.a()) &&
-             (p.c() * a() == c() * p.a()) &&
-             (p.d() * a() == d() * p.a());
-    } else return has_on(circle.center());
-  }
-
-  typename R::Boolean           is_degenerate() const;
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-PlaneC3<R>::operator==(const PlaneC3<R> &p) const
-{
-  if (CGAL::identical(base, p.base))
-      return true;
-  return equal_plane(*this, p);
-}
-
-template < class R >
-inline
-typename R::Boolean
-PlaneC3<R>::operator!=(const PlaneC3<R> &p) const
-{
-  return !(*this == p);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Point_3
-PlaneC3<R>::point() const
-{
-  return point_on_plane(*this);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Point_3
-PlaneC3<R>::
-projection(const typename PlaneC3<R>::Point_3 &p) const
-{
-  return projection_plane(p, *this);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Vector_3
-PlaneC3<R>::orthogonal_vector() const
-{
-  return R().construct_orthogonal_vector_3_object()(*this);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Direction_3
-PlaneC3<R>::orthogonal_direction() const
-{
-  return Direction_3(a(), b(), c());
-}
-
-template < class R >
-typename PlaneC3<R>::Vector_3
-PlaneC3<R>::base1() const
-{
-  return R().construct_base_vector_3_object()(*this, 1);
-}
-
-template < class R >
-typename PlaneC3<R>::Vector_3
-PlaneC3<R>::base2() const
-{
-  return R().construct_base_vector_3_object()(*this, 2);
-}
-
-template < class R >
-typename PlaneC3<R>::Point_3
-PlaneC3<R>::
-to_plane_basis(const typename PlaneC3<R>::Point_3 &p) const
-{
-  FT alpha, beta, gamma;
-  Construct_point_3 construct_point_3;
-  Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(),
-	alpha, beta, gamma);
-
-  return construct_point_3(alpha, beta, gamma);
-}
-
-template < class R >
-typename PlaneC3<R>::Point_2
-PlaneC3<R>::
-to_2d(const typename PlaneC3<R>::Point_3 &p) const
-{
-  FT alpha, beta, gamma;
-  Construct_point_2 construct_point_2;
-
-  Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(),
-	alpha, beta, gamma);
-
-  return construct_point_2(alpha, beta);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Point_3
-PlaneC3<R>::
-to_3d(const typename PlaneC3<R>::Point_2 &p) const
-{
-  return R().construct_lifted_point_3_object()(*this, p);
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Line_3
-PlaneC3<R>::
-perpendicular_line(const typename PlaneC3<R>::Point_3 &p) const
-{
-  return Line_3(p, orthogonal_direction());
-}
-
-template < class R >
-inline
-typename PlaneC3<R>::Plane_3
-PlaneC3<R>::opposite() const
-{
-  return PlaneC3<R>(-a(), -b(), -c(), -d());
-}
-
-template < class R >
-inline
-typename R::Oriented_side
-PlaneC3<R>::
-oriented_side(const typename PlaneC3<R>::Point_3 &p) const
-{
-  return side_of_oriented_plane(*this, p);
-}
-
-template < class R >
-inline
-typename R::Boolean
-PlaneC3<R>::
-has_on_positive_side(const  typename PlaneC3<R>::Point_3 &p) const
-{
-  return oriented_side(p) == ON_POSITIVE_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-PlaneC3<R>::
-has_on_negative_side(const  typename PlaneC3<R>::Point_3 &p) const
-{
-  return oriented_side(p) == ON_NEGATIVE_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-PlaneC3<R>::
-is_degenerate() const
-{ // FIXME : predicate
-  return CGAL_NTS is_zero(a()) && CGAL_NTS is_zero(b()) &&
-         CGAL_NTS is_zero(c());
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_PLANE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_2.h
deleted file mode 100644
index 9d50292..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_2.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_POINT_2_H
-#define CGAL_CARTESIAN_POINT_2_H
-
-#include <CGAL/Origin.h>
-
-namespace CGAL {
-
-template < class R_ >
-class PointC2
-{
-  typedef PointC2<R_>                       Self;
-  typedef typename R_::FT                   FT;
-// http://www.cgal.org/Members/Manual_test/LAST/Developers_internal_manual/Developers_manual/Chapter_code_format.html#sec:programming_conventions
-  typedef typename R_::Vector_2             Vector_2_;
-  typedef typename R_::Point_2              Point_2;
-
-  // We do not use reference counting here as it is done at the Vector_2 level.
-  Vector_2_ base;
-
-public:
-
-  typedef typename Vector_2_::Cartesian_const_iterator Cartesian_const_iterator;
-  
-  typedef R_                                R;
-
-  PointC2() {}
-
-  PointC2(const Origin &)
-    : base(NULL_VECTOR) {}
-
-  PointC2(const FT &x, const FT &y)
-    : base(x, y) {}
-
-  PointC2(const FT &hx, const FT &hy, const FT &hw)
-    : base(hx, hy, hw) {}
-
-  const FT& x() const
-  {
-      return base.x();
-  }
-  
-  const FT& y() const
-  {
-      return base.y();
-  }
-
-  const FT& hx() const
-  {
-      return base.hx();
-  }
-  const FT& hy() const
-  {
-      return base.hy();
-  }
-  const FT& hw() const
-  {
-      return base.hw();
-  }
-
-  Cartesian_const_iterator cartesian_begin() const 
-  {
-    return base.cartesian_begin(); 
-  }
-
-  Cartesian_const_iterator cartesian_end() const 
-  {
-    return base.cartesian_end(); 
-  }
-
-  typename R_::Boolean   operator==(const PointC2 &p) const
-  {
-      return base == p.base;
-  }
-  typename R_::Boolean   operator!=(const PointC2 &p) const
-  {
-      return !(*this == p);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_POINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_3.h
deleted file mode 100644
index 364f1bb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Point_3.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri and Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_POINT_3_H
-#define CGAL_CARTESIAN_POINT_3_H
-
-#include <CGAL/Origin.h>
-
-namespace CGAL {
-
-template < class R_ >
-class PointC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-  // We do not use reference counting here as it is done at the Vector_3 level.
-  Vector_3 base;
-
-public:
-  typedef typename Vector_3::Cartesian_const_iterator Cartesian_const_iterator;
-  typedef R_                                R;
-
-  PointC3() {}
-
-  PointC3(const Origin &)
-    : base(NULL_VECTOR) {}
-
-  PointC3(const FT &x, const FT &y, const FT &z)
-    : base(x, y, z) {}
-
-  PointC3(const FT &x, const FT &y, const FT &z, const FT &w)
-    : base(x, y, z, w) {}
-
-  const FT & x() const
-  {
-      return base.x();
-  }
-  const FT & y() const
-  {
-      return base.y();
-  }
-  const FT & z() const
-  {
-      return base.z();
-  }
-
-  const FT & hx() const
-  {
-      return base.hx();
-  }
-  const FT & hy() const
-  {
-      return base.hy();
-  }
-  const FT & hz() const
-  {
-      return base.hz();
-  }
-  const FT & hw() const
-  {
-      return base.hw();
-  }
-
-  const FT & cartesian(int i) const;
-  const FT & operator[](int i) const;
-  const FT & homogeneous(int i) const;
-
-  Cartesian_const_iterator cartesian_begin() const 
-  {
-    return base.cartesian_begin(); 
-  }
-
-  Cartesian_const_iterator cartesian_end() const 
-  {
-    return base.cartesian_end();
-  }
-
-  int dimension() const
-  {
-      return base.dimension();
-  }
-
-  Point_3 transform(const Aff_transformation_3 &t) const
-  {
-    return t.transform(*this);
-  }
-};
-
-template < class R >
-inline
-const typename PointC3<R>::FT &
-PointC3<R>::cartesian(int i) const
-{
-  return base.cartesian(i);
-}
-
-template < class R >
-inline
-const typename PointC3<R>::FT &
-PointC3<R>::operator[](int i) const
-{
-  return base[i];
-}
-
-template < class R >
-inline
-const typename PointC3<R>::FT &
-PointC3<R>::homogeneous(int i) const
-{
-  return base.homogeneous(i);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_POINT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_2.h
deleted file mode 100644
index c42f933..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_2.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_RAY_2_H
-#define CGAL_CARTESIAN_RAY_2_H
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template < class R_ >
-class RayC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Ray_2                Ray_2;
-
-  typedef cpp11::array<Point_2, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  RayC2() 
-  {}
-
-  RayC2(const Point_2 &sp, const Point_2 &secondp)
-    : base(CGAL::make_array(sp, secondp)) 
-  {}
-
-
-  const Point_2&
-  source() const
-  {
-    return get(base)[0];
-  }
-
-  const Point_2 &
-  second_point() const
-  {
-    return get(base)[1];
-  }
-
-  typename R_::Boolean   is_degenerate() const
-  {
-    return source() == second_point();
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_RAY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_3.h
deleted file mode 100644
index 224fa01..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Ray_3.h
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_RAY_3_H
-#define CGAL_CARTESIAN_RAY_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template < class R_ >
-class RayC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Ray_3                Ray_3;
-
-  typedef cpp11::array<Point_3, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  RayC3() {}
-
-  RayC3(const Point_3 &sp, const Point_3 &secondp)
-    : base(CGAL::make_array(sp, secondp)) {}
-
-  RayC3(const Point_3 &sp, const Vector_3 &v)
-    : base(CGAL::make_array(sp, sp + v)) {}
-
-  RayC3(const Point_3 &sp, const Direction_3 &d)
-    : base(CGAL::make_array(sp, sp + d.to_vector())) {}
-
-  RayC3(const Point_3 &sp, const Line_3 &l)
-    : base(CGAL::make_array(sp, sp + l.to_vector())) {}
-
-  typename R::Boolean          operator==(const RayC3 &r) const;
-  typename R::Boolean          operator!=(const RayC3 &r) const;
-
-  const Point_3 &   source() const
-  {
-      return get(base)[0];
-  }
-  const Point_3 &   second_point() const
-  {
-      return get(base)[1];
-  }
-  Point_3     point(int i) const;
-
-  Direction_3 direction() const;
-  Vector_3    to_vector() const;
-  Line_3      supporting_line() const;
-  Ray_3       opposite() const;
-
-  typename R::Boolean          is_degenerate() const;
-  typename R::Boolean          has_on(const Point_3 &p) const;
-  typename R::Boolean          collinear_has_on(const Point_3 &p) const;
-};
-
-template < class R >
-inline
-typename R::Boolean
-RayC3<R>::operator==(const RayC3<R> &r) const
-{
-    if (CGAL::identical(base, r.base))
-	return true;
-    return source() == r.source() && direction() == r.direction();
-}
-
-template < class R >
-inline
-typename R::Boolean
-RayC3<R>::operator!=(const RayC3<R> &r) const
-{
-  return !(*this == r);
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename RayC3<R>::Point_3
-RayC3<R>::point(int i) const
-{
-  CGAL_kernel_precondition( i >= 0 );
-  if (i == 0) return source();
-  if (i == 1) return second_point();
-  return source() + FT(i) * (second_point() - source());
-}
-
-template < class R >
-inline
-typename RayC3<R>::Vector_3
-RayC3<R>::to_vector() const
-{
-  return second_point() - source();
-}
-
-template < class R >
-inline
-typename RayC3<R>::Direction_3
-RayC3<R>::direction() const
-{
-  return Direction_3( second_point() - source() );
-}
-
-template < class R >
-inline
-typename RayC3<R>::Line_3
-RayC3<R>::supporting_line() const
-{
-  return Line_3(*this);
-}
-
-template < class R >
-inline
-typename RayC3<R>::Ray_3
-RayC3<R>::opposite() const
-{
-  return RayC3<R>( source(), - direction() );
-}
-
-template < class R >
-typename R::Boolean
-RayC3<R>::
-has_on(const typename RayC3<R>::Point_3 &p) const
-{
-  return (p == source()) ||
-         ( collinear(source(), p, second_point())
-           && ( Direction_3(p - source()) == direction() ));
-}
-
-template < class R >
-inline
-typename R::Boolean
-RayC3<R>::is_degenerate() const
-{
-  return source() == second_point();
-}
-
-template < class R >
-inline
-typename R::Boolean
-RayC3<R>::
-collinear_has_on(const typename RayC3<R>::Point_3 &p) const
-{
-  CGAL_kernel_exactness_precondition( collinear(source(), p, second_point()) );
-
-  typename R::Comparison_result cx = compare_x(source(), second_point());
-  if (cx != EQUAL)
-    return cx != compare_x(p, source());
-
-  typename R::Comparison_result cy = compare_y(source(), second_point());
-  if (cy != EQUAL)
-    return cy != compare_y(p, source());
-
-  typename R::Comparison_result cz = compare_z(source(), second_point());
-  if (cz != EQUAL)
-    return cz != compare_z(p, source());
-
-  return true; // p == source()
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_RAY_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_2.h
deleted file mode 100644
index f720455..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_2.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_SEGMENT_2_H
-#define CGAL_CARTESIAN_SEGMENT_2_H
-
-#include <CGAL/array.h>
-#include <CGAL/Cartesian/predicates_on_points_2.h>
-
-namespace CGAL {
-template < class R_ >
-class SegmentC2
-{
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Segment_2            Segment_2;
-
-  typedef cpp11::array<Point_2, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  SegmentC2() 
-  {}
-
-  SegmentC2(const Point_2 &sp, const Point_2 &ep)
-    : base(CGAL::make_array(sp, ep))
-  {}
-
-  const Point_2 &   
-  source() const
-  {
-      return get(base)[0];
-  }
-  
-  const Point_2 &   
-  target() const
-  {
-      return get(base)[1];
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_SEGMENT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_3.h
deleted file mode 100644
index 70244a6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Segment_3.h
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_SEGMENT_3_H
-#define CGAL_CARTESIAN_SEGMENT_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template < class R_ >
-class SegmentC3
-{
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Segment_3            Segment_3;
-
-  typedef cpp11::array<Point_3, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  SegmentC3() {}
-
-  SegmentC3(const Point_3 &sp, const Point_3 &ep)
-    : base(CGAL::make_array(sp, ep)) {}
-
-  bool        has_on(const Point_3 &p) const;
-  bool        collinear_has_on(const Point_3 &p) const;
-
-  bool        operator==(const SegmentC3 &s) const;
-  bool        operator!=(const SegmentC3 &s) const;
-
-  const Point_3 &   source() const
-  {
-      return get(base)[0];
-  }
-  const Point_3 &   target() const
-  {
-      return get(base)[1];
-  }
-
-  const Point_3 &   start() const;
-  const Point_3 &   end() const;
-
-  const Point_3 &   min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-  const Point_3 &   max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-  const Point_3 &   vertex(int i) const;
-  const Point_3 &   point(int i) const;
-  const Point_3 &   operator[](int i) const;
-
-  Direction_3 direction() const;
-  Vector_3    to_vector() const;
-  Line_3      supporting_line() const;
-  Segment_3   opposite() const;
-
-  bool        is_degenerate() const;
-};
-
-template < class R >
-inline
-bool
-SegmentC3<R>::operator==(const SegmentC3<R> &s) const
-{
-  if (CGAL::identical(base, s.base))
-      return true;
-  return source() == s.source() && target() == s.target();
-}
-
-template < class R >
-inline
-bool
-SegmentC3<R>::operator!=(const SegmentC3<R> &s) const
-{
-  return !(*this == s);
-}
-
-template < class R >
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::start() const
-{
-  return source();
-}
-
-template < class R >
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::end() const
-{
-  return target();
-}
-
-template < class R >
-inline
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  return lexicographically_xyz_smaller(source(),target()) ? source()
-                                                          : target();
-}
-
-template < class R >
-inline
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  return lexicographically_xyz_smaller(source(),target()) ? target()
-                                                          : source();
-}
-
-template < class R >
-inline
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::vertex(int i) const
-{
-  return (i%2 == 0) ? source() : target();
-}
-
-template < class R >
-inline
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::point(int i) const
-{
-  return vertex(i);
-}
-
-template < class R >
-inline
-const typename SegmentC3<R>::Point_3 &
-SegmentC3<R>::operator[](int i) const
-{
-  return vertex(i);
-}
-
-template < class R >
-inline
-typename SegmentC3<R>::Vector_3
-SegmentC3<R>::to_vector() const
-{
-  return target() - source();
-}
-
-template < class R >
-inline
-typename SegmentC3<R>::Direction_3
-SegmentC3<R>::direction() const
-{
-  return Direction_3( target() - source() );
-}
-
-template < class R >
-inline
-typename SegmentC3<R>::Line_3
-SegmentC3<R>::supporting_line() const
-{
-  return Line_3(*this);
-}
-
-template < class R >
-inline
-typename SegmentC3<R>::Segment_3
-SegmentC3<R>::opposite() const
-{
-  return SegmentC3<R>(target(), source());
-}
-
-template < class R >
-inline
-bool
-SegmentC3<R>::is_degenerate() const
-{
-  return source() == target();
-}
-
-template < class R >
-inline
-bool
-SegmentC3<R>::
-has_on(const typename SegmentC3<R>::Point_3 &p) const
-{
-  return are_ordered_along_line(source(), p, target());
-}
-
-template < class R >
-inline
-bool
-SegmentC3<R>::
-collinear_has_on(const typename SegmentC3<R>::Point_3 &p) const
-{
-  return collinear_are_ordered_along_line(source(), p, target());
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_SEGMENT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Sphere_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Sphere_3.h
deleted file mode 100644
index d59e03a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Sphere_3.h
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_SPHERE_3_H
-#define CGAL_CARTESIAN_SPHERE_3_H
-
-#include <CGAL/Handle_for.h>
-#include <CGAL/Interval_nt.h>
-#include <boost/tuple/tuple.hpp>
-#include <CGAL/Kernel/global_functions_3.h>
-
-namespace CGAL {
-
-template <class R_>
-class SphereC3
-{
-  typedef typename R_::FT                   FT;
-// http://www.cgal.org/Members/Manual_test/LAST/Developers_internal_manual/Developers_manual/Chapter_code_format.html#sec:programming_conventions
-  typedef typename R_::Point_3              Point_3_;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Sphere_3             Sphere_3;
-  typedef typename R_::Circle_3             Circle_3;
-
-  typedef boost::tuple<Point_3_, FT, Orientation>   Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  SphereC3() {}
-
-  SphereC3(const Point_3_ &center, const FT &squared_radius,
-           const Orientation &o = COUNTERCLOCKWISE)
-  {
-    CGAL_kernel_precondition( (squared_radius >= FT(0)) &
-                              (o != COLLINEAR) );
-
-    base = Rep(center, squared_radius, o);
-  }
-
-  // Sphere passing through and oriented by p,q,r,s
-  SphereC3(const Point_3_ &p, const Point_3_ &q,
-           const Point_3_ &r, const Point_3_ &s)
-  {
-    Orientation orient = make_certain(CGAL::orientation(p, q, r, s));
-    Point_3_ center = circumcenter(p, q, r, s);
-    FT      squared_radius = squared_distance(p, center);
-
-    base = Rep(center, squared_radius, orient);
-  }
-
-  // Sphere with great circle passing through p,q,r, oriented by o
-  SphereC3(const Point_3_ &p, const Point_3_ &q, const Point_3_ &r,
-	   const Orientation &o = COUNTERCLOCKWISE)
-  {
-    CGAL_kernel_precondition(o != COLLINEAR);
-
-    Point_3_ center = circumcenter(p, q, r);
-    FT      squared_radius = squared_distance(p, center);
-
-    base = Rep(center, squared_radius, o);
-  }
-
-  // Sphere with diameter pq and orientation o
-  SphereC3(const Point_3_ &p, const Point_3_ &q,
-           const Orientation &o = COUNTERCLOCKWISE)
-  {
-    CGAL_kernel_precondition(o != COLLINEAR);
-
-    Point_3_ center = midpoint(p, q);
-    FT      squared_radius = squared_distance(p, center);
-
-    base = Rep(center, squared_radius, o);
-  }
-
-  explicit SphereC3(const Point_3_ &center,
-           const Orientation& o = COUNTERCLOCKWISE)
-  {
-    CGAL_kernel_precondition(o != COLLINEAR);
-
-    base = Rep(center, FT(0), o);
-  }
-
-  typename R::Boolean   operator==(const SphereC3 &) const;
-  typename R::Boolean   operator!=(const SphereC3 &) const;
-
-  const Point_3_ & center() const
-  {
-      return get(base).template get<0>();
-  }
-  const FT & squared_radius() const
-  {
-      // Returns the square of the radius (instead of the radius itself,
-      // which would require square roots)
-      return get(base).template get<1>();
-  }
-  Orientation orientation() const
-  {
-      return get(base).template get<2>();
-  }
-
-  // A circle is degenerate if its (squared) radius is null or negative
-  typename R::Boolean   is_degenerate() const;
-
-  // Returns a circle with opposite orientation
-  Sphere_3 opposite() const;
-
-  typename R_::Oriented_side  oriented_side(const Point_3_ &p) const;
-  //! precond: ! x.is_degenerate() (when available)
-  // Returns R::ON_POSITIVE_SIDE, R::ON_ORIENTED_BOUNDARY or
-  // R::ON_NEGATIVE_SIDE
-  typename R::Boolean   has_on(const Circle_3 &p) const;
-  typename R::Boolean   has_on(const Point_3_ &p) const;
-  typename R::Boolean   has_on_boundary(const Point_3_ &p) const;
-  typename R::Boolean   has_on_positive_side(const Point_3_ &p) const;
-  typename R::Boolean   has_on_negative_side(const Point_3_ &p) const;
-
-  typename R_::Bounded_side bounded_side(const Point_3_ &p) const;
-  //! precond: ! x.is_degenerate() (when available)
-  // Returns R::ON_BOUNDED_SIDE, R::ON_BOUNDARY or R::ON_UNBOUNDED_SIDE
-  typename R::Boolean   has_on_bounded_side(const Point_3_ &p) const;
-  typename R::Boolean   has_on_unbounded_side(const Point_3_ &p) const;
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-SphereC3<R>::operator==(const SphereC3<R> &t) const
-{
-  if (CGAL::identical(base, t.base))
-      return true;
-  return center() == t.center() &&
-         squared_radius() == t.squared_radius() &&
-         orientation() == t.orientation();
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::operator!=(const SphereC3<R> &t) const
-{
-  return !(*this == t);
-}
-
-template < class R >
-CGAL_KERNEL_MEDIUM_INLINE
-typename R::Oriented_side
-SphereC3<R>::
-oriented_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-  return enum_cast<Oriented_side>(bounded_side(p)) * orientation();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Bounded_side
-SphereC3<R>::
-bounded_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-  return enum_cast<Bounded_side>(compare(squared_radius(),
-                                         squared_distance(center(), p)));
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-has_on(const typename SphereC3<R>::Circle_3 &c) const
-{
-  typedef typename SphereC3<R>::Point_3_ Point_3_;
-  typedef typename SphereC3<R>::FT      FT;
-  Point_3_ proj = c.supporting_plane().projection(center());
-  if(!(proj == c.center())) return false;
-  const FT d2 = squared_distance(center(),c.center());
-  return ((squared_radius() - d2) == c.squared_radius());
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-has_on(const typename SphereC3<R>::Point_3_ &p) const
-{
-  return has_on_boundary(p);
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-has_on_boundary(const typename SphereC3<R>::Point_3_ &p) const
-{
-    // FIXME: it's a predicate...
-  return squared_distance(center(),p) == squared_radius();
-  // NB: J'ai aussi trouve ailleurs :
-  // return oriented_side(p)==ON_ORIENTED_BOUNDARY;
-  // a voir...
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-SphereC3<R>::
-has_on_negative_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-  if (orientation() == COUNTERCLOCKWISE)
-    return has_on_unbounded_side(p);
-  return has_on_bounded_side(p);
-  // NB: J'ai aussi trouve ailleurs :
-  // return oriented_side(p)==ON_NEGATIVE_SIDE;
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Boolean
-SphereC3<R>::
-has_on_positive_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-  if (orientation() == COUNTERCLOCKWISE)
-    return has_on_bounded_side(p);
-  return has_on_unbounded_side(p);
-  // NB: J'ai aussi trouve ailleurs :
-  // return oriented_side(p)==ON_POSITIVE_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-has_on_bounded_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-    // FIXME: it's a predicate...
-  return squared_distance(center(),p) < squared_radius();
-  // NB: J'ai aussi trouve ailleurs :
-  // return bounded_side(p)==ON_BOUNDED_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-has_on_unbounded_side(const typename SphereC3<R>::Point_3_ &p) const
-{
-    // FIXME: it's a predicate...
-  return squared_distance(center(),p) > squared_radius();
-  // NB: J'ai aussi trouve ailleurs :
-  // return bounded_side(p)==ON_UNBOUNDED_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-SphereC3<R>::
-is_degenerate() const
-{
-    // FIXME: it's a predicate (?)
-  return CGAL_NTS is_zero(squared_radius());
-}
-
-template < class R >
-inline
-typename SphereC3<R>::Sphere_3
-SphereC3<R>::opposite() const
-{
-  return SphereC3<R>(center(), squared_radius(),
-                               CGAL::opposite(orientation()) );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_SPHERE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Tetrahedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Tetrahedron_3.h
deleted file mode 100644
index 8535637..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Tetrahedron_3.h
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_TETRAHEDRON_3_H
-#define CGAL_CARTESIAN_TETRAHEDRON_3_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/enum.h>
-#include <vector>
-#include <functional>
-
-namespace CGAL {
-
-template <class R_>
-class TetrahedronC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Tetrahedron_3        Tetrahedron_3;
-
-  typedef cpp11::array<Point_3, 4>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  TetrahedronC3() {}
-
-  TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r,
-                const Point_3 &s)
-    : base(CGAL::make_array(p, q, r, s)) {}
-
-  const Point_3 &    vertex(int i) const;
-  const Point_3 &    operator[](int i) const;
-
-  typename R::Boolean         operator==(const TetrahedronC3 &t) const;
-  typename R::Boolean         operator!=(const TetrahedronC3 &t) const;
-
-  typename R::Orientation    orientation() const;
-  typename R::Oriented_side  oriented_side(const Point_3 &p) const;
-  typename R::Bounded_side   bounded_side(const Point_3 &p) const;
-
-  typename R::Boolean         has_on_boundary(const Point_3 &p) const;
-  typename R::Boolean         has_on_positive_side(const Point_3 &p) const;
-  typename R::Boolean         has_on_negative_side(const Point_3 &p) const;
-  typename R::Boolean         has_on_bounded_side(const Point_3 &p) const;
-  typename R::Boolean         has_on_unbounded_side(const Point_3 &p) const;
-
-  typename R::Boolean         is_degenerate() const;
-};
-
-template < class R >
-typename R::Boolean
-TetrahedronC3<R>::
-operator==(const TetrahedronC3<R> &t) const
-{
-  if (CGAL::identical(base, t.base))
-      return true;
-  if (orientation() != t.orientation())
-      return false;
-
-  std::vector< Point_3 > V1;
-  std::vector< Point_3 > V2;
-  typename std::vector< Point_3 >::iterator uniq_end1;
-  typename std::vector< Point_3 >::iterator uniq_end2;
-  int k;
-  for ( k=0; k < 4; k++) V1.push_back( vertex(k));
-  for ( k=0; k < 4; k++) V2.push_back( t.vertex(k));
-  typename R::Less_xyz_3 Less_object = R().less_xyz_3_object();
-  std::sort(V1.begin(), V1.end(), Less_object);
-  std::sort(V2.begin(), V2.end(), Less_object);
-  uniq_end1 = std::unique( V1.begin(), V1.end());
-  uniq_end2 = std::unique( V2.begin(), V2.end());
-  V1.erase( uniq_end1, V1.end());
-  V2.erase( uniq_end2, V2.end());
-  return V1 == V2;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::
-operator!=(const TetrahedronC3<R> &t) const
-{
-  return !(*this == t);
-}
-
-template < class R >
-const typename TetrahedronC3<R>::Point_3 &
-TetrahedronC3<R>::
-vertex(int i) const
-{
-  if (i<0) i=(i%4)+4;
-  else if (i>3) i=i%4;
-  switch (i)
-    {
-    case 0: return get(base)[0];
-    case 1: return get(base)[1];
-    case 2: return get(base)[2];
-    default: return get(base)[3];
-    }
-}
-
-template < class R >
-inline
-const typename TetrahedronC3<R>::Point_3 &
-TetrahedronC3<R>::
-operator[](int i) const
-{
-  return vertex(i);
-}
-
-template < class R >
-typename R::Orientation
-TetrahedronC3<R>::
-orientation() const
-{
-  return R().orientation_3_object()(vertex(0), vertex(1),
-                                    vertex(2), vertex(3));
-}
-
-template < class R >
-typename R::Oriented_side
-TetrahedronC3<R>::
-oriented_side(const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  typename R::Orientation o = orientation();
-  if (o != ZERO)
-    return enum_cast<Oriented_side>(bounded_side(p)) * o;
-
-  CGAL_kernel_assertion (!is_degenerate());
-  return ON_ORIENTED_BOUNDARY;
-}
-
-template < class R >
-typename R::Bounded_side
-TetrahedronC3<R>::
-bounded_side(const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return R().bounded_side_3_object()
-               (static_cast<const typename R::Tetrahedron_3&>(*this), p);
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::has_on_boundary
-  (const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return oriented_side(p) == ON_ORIENTED_BOUNDARY;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::has_on_positive_side
-  (const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return oriented_side(p) == ON_POSITIVE_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::has_on_negative_side
-  (const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return oriented_side(p) == ON_NEGATIVE_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::has_on_bounded_side
-  (const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return bounded_side(p) == ON_BOUNDED_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::has_on_unbounded_side
-  (const typename TetrahedronC3<R>::Point_3 &p) const
-{
-  return bounded_side(p) == ON_UNBOUNDED_SIDE;
-}
-
-template < class R >
-inline
-typename R::Boolean
-TetrahedronC3<R>::is_degenerate() const
-{
-  return orientation() == COPLANAR;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_TETRAHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_2.h
deleted file mode 100644
index 07bbbe0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_2.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_TRIANGLE_2_H
-#define CGAL_CARTESIAN_TRIANGLE_2_H
-
-#include <CGAL/Cartesian/predicates_on_points_2.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template <class R_>
-class TriangleC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Vector_2             Vector_2;
-  typedef typename R_::Triangle_2           Triangle_2;
-
-  typedef cpp11::array<Point_2, 3>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                    R;
-
-  TriangleC2() {}
-
-  TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
-    : base(CGAL::make_array(p, q, r)) {}
-
-
-  const Point_2 &
-  vertex(int i) const
-  {
-    if (i>2) i = i%3;
-    else if (i<0) i = (i%3) + 3;
-    return (i==0) ? get(base)[0] :
-      (i==1) ? get(base)[1] :
-      get(base)[2];
-  }
-  
-  const Point_2 &
-  operator[](int i) const
-  {
-    return vertex(i);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_TRIANGLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_3.h
deleted file mode 100644
index 219f33b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Triangle_3.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_TRIANGLE_3_H
-#define CGAL_CARTESIAN_TRIANGLE_3_H
-
-#include <CGAL/Handle_for.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template <class R_>
-class TriangleC3
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Triangle_3           Triangle_3;
-
-  typedef cpp11::array<Point_3, 3>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                     R;
-
-  TriangleC3() {}
-
-  TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
-    : base(CGAL::make_array(p, q, r)) {}
-
-  bool       operator==(const TriangleC3 &t) const;
-  bool       operator!=(const TriangleC3 &t) const;
-
-  Plane_3    supporting_plane() const;
-
-  bool       has_on(const Point_3 &p) const;
-  bool       is_degenerate() const;
-
-  const Point_3 & vertex(int i) const;
-  const Point_3 & operator[](int i) const;
-
-  FT         squared_area() const;
-};
-
-template < class R >
-bool
-TriangleC3<R>::operator==(const TriangleC3<R> &t) const
-{
-  if (CGAL::identical(base, t.base))
-      return true;
-
-  int i;
-  for(i=0; i<3; i++)
-    if ( vertex(0) == t.vertex(i) )
-       break;
-
-  return (i<3) && vertex(1) == t.vertex(i+1) && vertex(2) == t.vertex(i+2);
-}
-
-template < class R >
-inline
-bool
-TriangleC3<R>::operator!=(const TriangleC3<R> &t) const
-{
-  return !(*this == t);
-}
-
-template < class R >
-const typename TriangleC3<R>::Point_3 &
-TriangleC3<R>::vertex(int i) const
-{
-  if (i<0) i=(i%3)+3;
-  else if (i>2) i=i%3;
-  return (i==0) ? get(base)[0] :
-         (i==1) ? get(base)[1] :
-                  get(base)[2];
-}
-
-template < class R >
-inline
-const typename TriangleC3<R>::Point_3 &
-TriangleC3<R>::operator[](int i) const
-{
-  return vertex(i);
-}
-
-template < class R >
-CGAL_KERNEL_MEDIUM_INLINE
-typename TriangleC3<R>::FT
-TriangleC3<R>::squared_area() const
-{
-  return internal::squared_area(vertex(0), vertex(1), vertex(2), R());
-}
-
-template < class R >
-inline
-typename TriangleC3<R>::Plane_3
-TriangleC3<R>::supporting_plane() const
-{
-  return Plane_3(vertex(0), vertex(1), vertex(2));
-}
-
-template < class R >
-inline
-bool
-TriangleC3<R>::
-has_on(const typename TriangleC3<R>::Point_3 &p) const
-{
-  return R().has_on_3_object()
-               (static_cast<const typename R::Triangle_3&>(*this), p);
-}
-
-template < class R >
-bool
-TriangleC3<R>::is_degenerate() const
-{
-  return collinear(vertex(0),vertex(1),vertex(2));
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_TRIANGLE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_2.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_2.h
deleted file mode 100644
index 4c9f7dd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_2.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann
-
-#ifndef CGAL_CARTESIAN_VECTOR_2_H
-#define CGAL_CARTESIAN_VECTOR_2_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/array.h>
-#include <CGAL/constant.h>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template < class R_ >
-class VectorC2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Vector_2             Vector_2;
-  typedef typename R_::Segment_2            Segment_2;
-  typedef typename R_::Ray_2                Ray_2;
-  typedef typename R_::Line_2               Line_2;
-  typedef typename R_::Direction_2          Direction_2;
-
-  typedef cpp11::array<FT, 2>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef typename Rep::const_iterator      Cartesian_const_iterator;
-
-  typedef R_                                R;
-
-  VectorC2() {}
- 
-  VectorC2(const FT &x, const FT &y)
-    : base(CGAL::make_array(x, y)) {}
-
-  VectorC2(const FT &hx, const FT &hy, const FT &hw)
-    : base( hw != FT(1) ? CGAL::make_array(hx/hw, hy/hw)
-                        : CGAL::make_array(hx, hy) ) {}
-
-  const FT & x() const
-  {
-      return CGAL::get(base)[0];
-  }
-
-  const FT & y() const
-  {
-      return CGAL::get(base)[1];
-  }
-
-  const FT & hx() const
-  {
-      return x();
-  }
-
-  const FT & hy() const
-  {
-      return y();
-  }
-
-  const FT& hw() const
-  {
-    return constant<FT, 1>();
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return CGAL::get(base).begin();
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return CGAL::get(base).end();
-  }
-
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool 
-operator==(const VectorC2<R> &v, const VectorC2<R> &w)
-{
-  return w.x() == v.x() && w.y() == v.y();
-}
-
-template < class R >
-inline
-bool 
-operator!=(const VectorC2<R> &v, const VectorC2<R> &w)
-{
-  return !(v == w);
-}
-
-template < class R >
-inline
-bool
-operator==(const VectorC2<R> &v, const Null_vector &)
-{
-  return CGAL_NTS is_zero(v.x()) && CGAL_NTS is_zero(v.y());
-}
-
-template < class R >
-inline
-bool
-operator==(const Null_vector &n, const VectorC2<R> &v)
-{
-  return v == n;
-}
-
-template < class R >
-inline
-bool
-operator!=(const VectorC2<R> &v, const Null_vector &n)
-{
-  return !(v == n);
-}
-
-template < class R >
-inline
-bool
-operator!=(const Null_vector &n, const VectorC2<R> &v)
-{
-  return !(v == n);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_VECTOR_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_3.h b/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_3.h
deleted file mode 100644
index 14ce5e6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Vector_3.h
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author        : Andreas Fabri
-
-#ifndef CGAL_CARTESIAN_VECTOR_3_H
-#define CGAL_CARTESIAN_VECTOR_3_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/array.h>
-#include <CGAL/constant.h>
-
-namespace CGAL {
-
-template < class R_ >
-class VectorC3
-{
-// http://www.cgal.org/Members/Manual_test/LAST/Developers_internal_manual/Developers_manual/Chapter_code_format.html#sec:programming_conventions
-  typedef typename R_::FT                   FT_;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Ray_3                Ray_3;
-  typedef typename R_::Segment_3            Segment_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Direction_3          Direction_3;
-
-  typedef cpp11::array<FT_, 3>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef typename Rep::const_iterator      Cartesian_const_iterator;
-
-  typedef R_                                R;
-
-  VectorC3() {}
-
-  VectorC3(const Null_vector &n)
-  { *this = R().construct_vector_3_object()(n); }
-
-  VectorC3(const Point_3 &a, const Point_3 &b)
-  { *this = R().construct_vector_3_object()(a, b); }
-
-  explicit VectorC3(const Segment_3 &s)
-  { *this = R().construct_vector_3_object()(s); }
-
-  explicit VectorC3(const Ray_3 &r)
-  { *this = R().construct_vector_3_object()(r); }
-
-  explicit VectorC3(const Line_3 &l)
-  { *this = R().construct_vector_3_object()(l); }
-
-  VectorC3(const FT_ &x, const FT_ &y, const FT_ &z)
-    : base(CGAL::make_array(x, y, z)) {}
-
-  VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
-    : base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
-                       : CGAL::make_array(x, y, z) ) {}
-
-  const FT_ & x() const
-  {
-      return get(base)[0];
-  }
-  const FT_ & y() const
-  {
-      return get(base)[1];
-  }
-  const FT_ & z() const
-  {
-      return get(base)[2];
-  }
-
-  const FT_ & hx() const
-  {
-      return x();
-  }
-  const FT_ & hy() const
-  {
-      return y();
-  }
-  const FT_ & hz() const
-  {
-      return z();
-  }
-  const FT_ & hw() const
-  {
-      return constant<FT_, 1>();
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return get(base).begin();
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return get(base).end();
-  }
-
-  const FT_ & cartesian(int i) const;
-  const FT_ & operator[](int i) const;
-  const FT_ & homogeneous(int i) const;
-
-  int dimension() const
-  {
-      return 3;
-  }
-
-  Vector_3 operator+(const VectorC3 &w) const;
-  Vector_3 operator-(const VectorC3 &w) const;
-  Vector_3 operator-() const;
-  Vector_3 operator/(const FT_ &c) const;
-  FT_ squared_length() const;
-  Direction_3 direction() const;
-};
-
-template < class R >
-inline
-bool
-operator==(const VectorC3<R> &v, const VectorC3<R> &w)
-{
-  return w.x() == v.x() && w.y() == v.y() && w.z() == v.z();
-}
-
-template < class R >
-inline
-bool
-operator!=(const VectorC3<R> &v, const VectorC3<R> &w)
-{
-  return !(v == w);
-}
-
-template < class R >
-inline
-bool
-operator==(const VectorC3<R> &v, const Null_vector &) 
-{
-  return CGAL_NTS is_zero(v.x()) && CGAL_NTS is_zero(v.y()) &&
-         CGAL_NTS is_zero(v.z());
-}
-
-template < class R >
-inline
-bool
-operator==(const Null_vector &n, const VectorC3<R> &v) 
-{
-  return v == n;
-}
-
-template < class R >
-inline
-bool
-operator!=(const VectorC3<R> &v, const Null_vector &n)
-{
-  return !(v == n);
-}
-
-template < class R >
-inline
-bool
-operator!=(const Null_vector &n, const VectorC3<R> &v)
-{
-  return !(v == n);
-}
-
-template < class R >
-inline
-const typename VectorC3<R>::FT_ &
-VectorC3<R>::cartesian(int i) const
-{
-  CGAL_kernel_precondition( (i>=0) & (i<3) );
-  if (i==0) return x();
-  if (i==1) return y();
-  return z();
-}
-
-template < class R >
-inline
-const typename VectorC3<R>::FT_ &
-VectorC3<R>::operator[](int i) const
-{
-  return cartesian(i);
-}
-
-template < class R >
-const typename VectorC3<R>::FT_ &
-VectorC3<R>::homogeneous(int i) const
-{
-  if (i==3) return hw();
-  return cartesian(i);
-}
-
-template < class R >
-inline
-typename VectorC3<R>::Vector_3
-VectorC3<R>::
-operator+(const VectorC3<R> &w) const
-{
-  return VectorC3<R>(x() + w.x(), y() + w.y(), z() + w.z());
-}
-
-template < class R >
-inline
-typename VectorC3<R>::Vector_3
-VectorC3<R>::operator-(const VectorC3<R> &w) const
-{
-  return VectorC3<R>(x() - w.x(), y() - w.y(), z() - w.z());
-}
-
-template < class R >
-inline
-typename VectorC3<R>::Vector_3
-VectorC3<R>::operator-() const
-{
-  return R().construct_opposite_vector_3_object()(*this);
-}
-
-template < class R >
-inline
-typename VectorC3<R>::FT_
-VectorC3<R>::squared_length() const
-{
-  return CGAL_NTS square(x()) + CGAL_NTS square(y()) + CGAL_NTS square(z());
-}
-
-template < class R >
-inline
-typename VectorC3<R>::Vector_3
-VectorC3<R>::
-operator/(const typename VectorC3<R>::FT_ &c) const
-{
-  return VectorC3<R>(x()/c, y()/c, z()/c);
-}
-
-template < class R >
-inline
-typename VectorC3<R>::Direction_3
-VectorC3<R>::direction() const
-{
-  return Direction_3(*this);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CARTESIAN_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cell_attribute_with_point.h b/3rdparty/CGAL-4.6/include/CGAL/Cell_attribute_with_point.h
deleted file mode 100644
index 95193df..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cell_attribute_with_point.h
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_CELL_ATTRIBUTE_WITH_POINT_H
-#define CGAL_CELL_ATTRIBUTE_WITH_POINT_H 1
-
-#include <CGAL/Cell_attribute.h>
-
-namespace CGAL {
-
-  /** @file Cell_attribute_with_point.h
-   * Definition of cell attribute with point, with or without info.
-   */
-
-  /// Point associated with a cell.
-  template < class Point >
-  class Point_for_cell
-  {
-  public:
-    /// Contructor without parameter.
-    Point_for_cell()
-    {}
-
-    /// Contructor with a point in parameter.
-    Point_for_cell(const Point& apoint) : mpoint(apoint)
-    {}
-
-    /// Get the point associated with the cell.
-    Point& point()
-    { return mpoint; }
-
-    /// Get the point associated with the cell.
-    const Point& point() const
-    { return mpoint; }
-
-  protected:
-    /// The point associated with the cell.
-    Point mpoint;
-  };
-
-  /// Attribute associated with a point and an info.
-  template < class LCC, class Info_=void, class Tag=Tag_true,
-             class Functor_on_merge_=Null_functor,
-             class Functor_on_split_=Null_functor >
-  class Cell_attribute_with_point :
-    public Cell_attribute<LCC, Info_, Tag,
-                          Functor_on_merge_, Functor_on_split_>,
-    public Point_for_cell<typename LCC::Point>
-  {
-    template < unsigned int, class, class, class, class >
-    friend class Combinatorial_map_base;
-
-    template <class, class, class, class>
-    friend class Compact_container;
-
-  public:
-    typedef Cell_attribute_with_point<LCC, Info_, Tag, Functor_on_merge_,
-                                      Functor_on_split_> Self;
-
-    typedef Cell_attribute<LCC, Info_, Tag,
-                           Functor_on_merge_, Functor_on_split_> Base1;
-    typedef Point_for_cell<typename LCC::Point> Base2;
-
-    typedef typename LCC::Point             Point;
-    typedef typename LCC::Dart_handle       Dart_handle;
-    typedef typename LCC::Dart_const_handle Dart_const_handle;
-
-    typedef Info_                Info;
-    typedef Functor_on_merge_    Functor_on_merge;
-    typedef Functor_on_split_    Functor_on_split;
-
-    using Base1::info;
-
-    bool operator==(const Self& other) const
-    { return Base1::operator==(other) && this->point()==other.point(); }
-
-    bool operator!=(const Self& other) const
-    { return !operator==(other); }
-
-    // protected:
-    /// Default contructor.
-    Cell_attribute_with_point()
-    {}
-
-    /// Contructor with a point in parameter.
-    Cell_attribute_with_point(const Point& apoint) : Base2(apoint)
-    {}
-
-    /// Contructor with a point and an attribute in parameters.
-    Cell_attribute_with_point(const Point& apoint, const Info& ainfo) :
-      Base1(ainfo),
-      Base2(apoint)
-    {}
-  };
-
-  /// Attribute associated with a point and without info.
-  template < class LCC, class Tag,
-             class Functor_on_merge_,
-             class Functor_on_split_ >
-  class Cell_attribute_with_point<LCC, void, Tag,
-                                  Functor_on_merge_, Functor_on_split_> :
-    public Cell_attribute<LCC, void, Tag, Functor_on_merge_, Functor_on_split_>,
-    public Point_for_cell<typename LCC::Point>
-  {
-    template < unsigned int, class, class, class, class  >
-    friend class Combinatorial_map_base;
-
-    template <class, class, class, class>
-    friend class Compact_container;
-
-  public:
-    typedef Cell_attribute<LCC, void, Tag,
-                           Functor_on_merge_, Functor_on_split_> Base1;
-    typedef Point_for_cell<typename LCC::Point> Base2;
-
-    typedef typename LCC::Point             Point;
-    typedef typename LCC::Dart_handle       Dart_handle;
-    typedef typename LCC::Dart_const_handle Dart_const_handle;
-
-    typedef Functor_on_merge_ Functor_on_merge;
-    typedef Functor_on_split_ Functor_on_split;
-
-    bool operator==(const Cell_attribute_with_point& other) const
-    { return Base1::operator==(other) && this->point()==other.point(); }
-
-    bool operator!=(const Cell_attribute_with_point& other) const
-    { return !operator==(other); }
-
-    template<typename Cellattr>
-    bool operator==(const Cellattr&) const
-    { return false; }
-
-    //  protected:
-    /// Default contructor.
-    Cell_attribute_with_point()
-    {}
-
-    /// Contructor with a point in parameter.
-    Cell_attribute_with_point(const Point& apoint) : Base2(apoint)
-    {}
-  };
-} // namespace CGAL
-
-#endif // CGAL_CELL_ATTRIBUTE_WITH_POINT_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cell_iterators.h b/3rdparty/CGAL-4.6/include/CGAL/Cell_iterators.h
deleted file mode 100644
index 0d061e0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Cell_iterators.h
+++ /dev/null
@@ -1,453 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_CELL_ITERATORS_H
-#define CGAL_CELL_ITERATORS_H 1
-
-#include <CGAL/Dart_iterators.h>
-#include <CGAL/Combinatorial_map_basic_operations.h>
-
-#include <boost/type_traits/is_same.hpp>
-
-// TODO do all the orbit iterator of any orbit ?
-
-namespace CGAL {
-
-  /** @file Cell_iterators.h
-   * All the cell iterators. Not commented in doxygen to avoid too much
-   * classes in the documentation.
-   * There are 3 classes:
-   *  - CMap_cell_iterator<Map,Ite,i,dim>: "tools" class used for the
-   *    two following iterators.
-   * * - CMap_one_dart_per_incident_cell_iterator<Map,Ite,i,dim>
-   * * - CMap_one_dart_per_cell_iterator<Map,Ite,i,dim>
-   */
-
-  //****************************************************************************
-  template <typename Map_,typename Ite, unsigned int i,
-            unsigned int dim=Map_::dimension,bool Const=false,
-            typename Use_mark=typename Ite::Use_mark>
-  class CMap_cell_iterator;
-  //****************************************************************************
-  /* Class CMap_cell_iterator<Map,Ite,i,dim,Tag_true>: to iterate onto the
-   * cells incident to the given iterator which uses mark.
-   */
-  template <typename Map_,typename Ite,unsigned int i,
-            unsigned int dim,bool Const>
-  class CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_true>: public Ite
-  {
-  public:
-    typedef CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_true> Self;
-    typedef Ite Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-  protected:
-    /// Unmark all the marked darts during the iterator.
-    void unmark_treated_darts()
-    {
-      if (this->mmap->is_whole_map_unmarked(mcell_mark_number)) return;
-
-      this->mmap->negate_mark(this->mmark_number);
-      this->mmap->negate_mark(mcell_mark_number);
-
-      Ite::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this),
-                           mcell_mark_number);
-
-      while (this->mmap->number_of_unmarked_darts(mcell_mark_number) > 0 ||
-             this->mmap->number_of_unmarked_darts(this->mmark_number) > 0)
-      {
-        this->operator++();
-      }
-
-      this->mmap->negate_mark(mcell_mark_number);
-      this->mmap->negate_mark(this->mmark_number);
-
-      CGAL_assertion(this->mmap->is_whole_map_unmarked(this->mmark_number));
-      CGAL_assertion(this->mmap->is_whole_map_unmarked(mcell_mark_number));
-    }
-
-  public:
-    /// Main constructor.
-    CMap_cell_iterator(Map& amap, Dart_handle adart):
-      Ite(amap, adart, amap.get_new_mark()),
-      mcell_mark_number(amap.get_new_mark())
-    {
-      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
-                              Tag_true>::value) );
-      CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number));
-
-      mark_cell<Map,i,dim>(amap, adart, mcell_mark_number);
-    }
-
-    /// Destructor.
-    ~CMap_cell_iterator()
-    {
-      if (this->mmap->get_number_of_times_mark_reserved(mcell_mark_number)==1)
-        unmark_treated_darts();
-      this->mmap->free_mark(mcell_mark_number);
-      this->mmap->free_mark(this->mmark_number);
-      this->mcell_mark_number = -1; // To avoid basic class to try to unmark darts.
-      this->mmark_number = -1; // To avoid basic class to try to unmark darts.
-    }
-
-    /// Copy constructor.
-    CMap_cell_iterator(const Self& aiterator):
-      Ite(aiterator),
-      mcell_mark_number(aiterator.mcell_mark_number)
-    {
-      this->mmap->share_a_mark(this->mmark_number);
-      this->mmap->share_a_mark(this->mcell_mark_number);
-    }
-
-    /// Assignment operator.
-    Self& operator=(const Self& aiterator)
-    {
-      if (this != &aiterator)
-      {
-        Ite::operator=(aiterator);
-        this->mmap->share_a_mark(this->mmark_number);
-        this->mmap->share_a_mark(mcell_mark_number);
-      }
-      return *this;
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      unmark_treated_darts();
-      Ite::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this), mcell_mark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      do
-      {
-        Ite::operator++();
-      }
-      while (this->cont() &&
-             this->mmap->is_marked((*this), mcell_mark_number));
-
-      if (this->cont())
-      {
-        mark_cell<Map,i,dim>(*this->mmap, (*this),
-                             mcell_mark_number);
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  private:
-    /// A mark used to mark treated cells.
-    int mcell_mark_number;
-  };
-  //****************************************************************************
-  /* Class CMap_cell_iterator<Map,Ite,i,dim,Tag_false>: to iterate onto the
-   * cells incident to the given iterator which does not use mark.
-   */
-  template <typename Map_,typename Ite, unsigned int i,
-            unsigned int dim,bool Const>
-  class CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_false>: public Ite
-  {
-  public:
-    typedef CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_false> Self;
-    typedef Ite Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-  protected:
-    /// Unmark all the marked darts during the iterator.
-    void unmark_treated_darts()
-    {
-      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
-
-      this->mmap->negate_mark(mmark_number);
-
-      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
-
-      Ite::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this),
-                           mmark_number);
-      while (this->mmap->number_of_unmarked_darts(mmark_number) > 0)
-        this->operator++();
-      this->mmap->negate_mark(mmark_number);
-      CGAL_assertion(this->mmap->is_whole_map_unmarked(mmark_number));
-    }
-
-  public:
-    /// Main constructor.
-    CMap_cell_iterator(Map& amap, Dart_handle adart):
-      Ite(amap, adart),
-      mmark_number(amap.get_new_mark())
-    {
-      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
-                              Tag_true>::value) );
-      CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
-      mark_cell<Map,i,dim>(amap, adart, mmark_number);
-    }
-
-    /// Destructor.
-    ~CMap_cell_iterator()
-    {
-      if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
-        unmark_treated_darts();
-      this->mmap->free_mark(mmark_number);
-      this->mmark_number = -1; // To avoid basic class to try to unmark darts.
-    }
-
-    /// Copy constructor.
-    CMap_cell_iterator(const Self& aiterator):
-      Ite(aiterator),
-      mmark_number(aiterator.mmark_number)
-    { this->mmap->share_a_mark(mmark_number); }
-
-    /// Assignment operator.
-    Self& operator=(const Self & aiterator)
-    {
-      if (this != &aiterator)
-      {
-        Ite::operator=(aiterator);
-        mmark_number = aiterator.mmark_number;
-        this->mmap->share_a_mark(mmark_number);
-      }
-      return *this;
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      unmark_treated_darts();
-      Ite::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      do
-      {
-        Ite::operator++();
-      }
-      while (this->cont() &&
-             this->mmap->is_marked((*this), mmark_number));
-
-      if (this->cont())
-        mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
-      return *this;
-    }
-
-  private:
-    /// A mark used to mark treated cells.
-    int mmark_number;
-  };
-  //****************************************************************************
-  /* Class CMap_cell_iterator<Map,CMap_dart_iterator_basic_of_all<Map>,
-     i,dim,Tag_false>: specialization to iterate onto
-     * all the cells of the map.
-     */
-  template <typename Map_,unsigned int i,unsigned int dim,bool Const>
-  class CMap_cell_iterator<Map_,CMap_dart_iterator_basic_of_all<Map_,Const>,
-                           i,dim,Const,Tag_false>:
-    public CMap_dart_iterator_basic_of_all<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_all<Map_,Const> Base;
-    typedef CMap_cell_iterator<Map_,Base,i,dim,Const,Tag_false> Self;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-  protected:
-    /// Unmark all the marked darts during the iterator.
-    void unmark_treated_darts()
-    {
-      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
-
-      this->mmap->negate_mark(mmark_number);
-
-      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
-
-      Base::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this),
-                           mmark_number);
-      while (this->mmap->number_of_unmarked_darts(mmark_number) > 0)
-        this->operator++();
-      this->mmap->negate_mark(mmark_number);
-      CGAL_assertion(this->mmap->is_whole_map_unmarked(mmark_number));
-    }
-
-  public:
-    /// Main constructor.
-    CMap_cell_iterator(Map& amap):
-      Base(amap),
-      mmark_number(amap.get_new_mark())
-    {
-      CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
-                              Tag_true>::value) );
-      CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
-      mark_cell<Map,i,dim>(amap, (*this), mmark_number);
-    }
-
-   /// Constructor with a dart in parameter (for end iterator).
-    CMap_cell_iterator(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mmark_number(amap.get_new_mark())
-    {
-      if (adart!=this->mmap->null_handle)
-        mark_cell<Map,i,dim>(amap, (*this), mmark_number);
-    }
-
-    /// Destructor.
-    ~CMap_cell_iterator()
-    {
-      if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
-        unmark_treated_darts();
-      this->mmap->free_mark(mmark_number);
-      this->mmark_number = -1; // To avoid basic class to try to unmark darts.
-    }
-
-    /// Copy constructor.
-    CMap_cell_iterator(const Self& aiterator):
-      Base(aiterator),
-      mmark_number(aiterator.mmark_number)
-    { this->mmap->share_a_mark(mmark_number); }
-
-    /// Assignment operator.
-    Self& operator=(const Self& aiterator)
-    {
-      if (this != &aiterator)
-      {
-        Base::operator=(aiterator);
-        mmark_number = aiterator.mmark_number;
-        this->mmap->share_a_mark(mmark_number);
-      }
-      return *this;
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      unmark_treated_darts();
-      Base::rewind();
-      mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      do
-      {
-        Base::operator++();
-      }
-      while (this->cont() &&
-             this->mmap->is_marked((*this), mmark_number));
-
-      if (this->cont())
-        mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
-      return *this;
-    }
-
-  private:
-    /// A mark used to mark treated cells.
-    int mmark_number;
-  };
-  //****************************************************************************
-  /* Class CMap_one_dart_per_incident_cell_iterator<Map,i,j,dim>: to iterate
-   * onto one dart per i-cell incident to the given j-cell.
-   */
-  template <typename Map_,unsigned int i,unsigned int j,
-            unsigned int dim=Map_::dimension,bool Const=false>
-  class CMap_one_dart_per_incident_cell_iterator:
-    public CMap_cell_iterator<Map_,
-                              CMap_dart_iterator_basic_of_cell
-                              <Map_,j,dim,Const>, i,dim,Const>
-  {
-  public:
-    typedef CMap_one_dart_per_incident_cell_iterator<Map_,i,j,dim,Const> Self;
-    typedef CMap_cell_iterator<Map_,
-                               CMap_dart_iterator_basic_of_cell<Map_,j,
-                                                                dim,Const>,
-                               i,dim,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-    typedef Tag_false Basic_iterator;
-
-    /// Main constructor.
-    CMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  /* Class CMap_one_dart_per_cell_iterator<Map,i,dim>: to iterate onto the
-   * i-cells incident of the map (one dart by each i-cell).
-   */
-  template <typename Map_,unsigned int i,unsigned int dim=Map_::dimension,
-            bool Const=false>
-  class CMap_one_dart_per_cell_iterator:
-    public CMap_cell_iterator<Map_,CMap_dart_iterator_basic_of_all<Map_,Const>,
-                              i,dim,Const>
-  {
-  public:
-    typedef CMap_one_dart_per_cell_iterator<Map_,i,dim,Const> Self;
-    typedef CMap_cell_iterator<Map_,
-                               CMap_dart_iterator_basic_of_all<Map_,Const>,
-                               i,dim,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-    typedef Tag_false Basic_iterator;
-
-    /// Main constructor.
-    CMap_one_dart_per_cell_iterator(Map& amap): Base(amap)
-    {}
-    /// Constructor with a dart in parameter (for end iterator).
-    CMap_one_dart_per_cell_iterator(Map& amap, Dart_handle adart):
-	     Base(amap, adart)
-    {}
-  };
-//****************************************************************************
-//****************************************************************************
-} // namespace CGAL
-//******************************************************************************
-#endif // CGAL_CELL_ITERATORS_H
-//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Circle_2.h
deleted file mode 100644
index f31db79..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circle_2.h
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-//                 Sven Schoenherr
-
-#ifndef CGAL_CIRCLE_2_H
-#define CGAL_CIRCLE_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Circle_2 : public R_::Kernel_base::Circle_2
-{
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_2               Point_2;
-  typedef typename R_::Kernel_base::Circle_2 RCircle_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-
-  typedef Circle_2                           Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Circle_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef RCircle_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Circle_2() {}
-
-  Circle_2(const RCircle_2& t)
-    : RCircle_2(t) {}
-
-  Circle_2(const Point_2 &center, const FT &squared_radius,
-	   const Orientation &orientation)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, orientation)) {}
-
-  Circle_2(const Point_2 &center, const FT &squared_radius)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, COUNTERCLOCKWISE)) {}
-
-  Circle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, r)) {}
-
-  Circle_2(const Point_2 & p, const Point_2 & q,
-	   const Orientation &orientation)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, orientation)) {}
-
-  Circle_2(const Point_2 & p, const Point_2 & q)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, COUNTERCLOCKWISE)) {}
-
-  Circle_2(const Point_2 & p, const Point_2 & q, const FT &bulge)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, bulge)) {}
-
-  Circle_2(const Point_2 & center, const Orientation& orientation)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), orientation)) {}
-
-  Circle_2(const Point_2 & center)
-    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), COUNTERCLOCKWISE)) {}
-
-  typename cpp11::result_of<typename R::Construct_center_2(Circle_2)>::type
-  center() const
-  {
-    return R().construct_center_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_squared_radius_2(Circle_2)>::type
-  squared_radius() const
-  {
-    return R().compute_squared_radius_2_object()(*this);
-  }
-
-  Orientation orientation() const
-  {
-    // This make_certain(), the uncertain orientation of circles, the orientation
-    // of circles, are all yucky.
-    return make_certain(R().orientation_2_object()(*this));
-  }
-
-
-  typename R::Bounded_side
-  bounded_side(const Point_2 &p) const
-  {
-    return R().bounded_side_2_object()(*this, p);
-  }
-
-  typename R::Oriented_side
-  oriented_side(const Point_2 &p) const
-  {
-    return R().oriented_side_2_object()(*this, p);
-  }
-
-  typename R::Boolean
-  has_on_boundary(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_BOUNDARY;
-  }
-
-  typename R::Boolean
-  has_on_bounded_side(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_BOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_unbounded_side(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_UNBOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_negative_side(const Point_2 &p) const
-  {
-    if (orientation() == COUNTERCLOCKWISE)
-      return has_on_unbounded_side(p);
-    return has_on_bounded_side(p);
-  }
-
-  typename R::Boolean
-  has_on_positive_side(const Point_2 &p) const
-  {
-    if (orientation() == COUNTERCLOCKWISE)
-      return has_on_bounded_side(p);
-    return has_on_unbounded_side(p);
-  }
-
-  typename R::Boolean
-  is_degenerate() const
-  {
-    return CGAL_NTS is_zero(squared_radius());
-  }
-
-  Circle_2
-  opposite() const
-  {
-    //return R().construct_opposite_circle_2_object()(*this);
-    return Circle_2(center(),
-		    squared_radius(),
-		    CGAL::opposite(orientation()) );
-  }
-
-  Bbox_2
-  bbox() const
-  {
-    return R().construct_bbox_2_object()(*this);
-  }
-
-  typename R::Boolean
-  operator==(const Circle_2 &c) const
-  {
-    return R().equal_2_object()(*this, c);
-  }
-
-  typename R::Boolean
-  operator!=(const Circle_2 &c) const
-  {
-    return !(*this == c);
-  }
-
-  Circle_2 transform(const Aff_transformation_2 &t) const
-  {
-    return t.transform(*this);
-  }
-
-  Circle_2 orthogonal_transform(const Aff_transformation_2 &t) const;
-
-
-};
-
-template <class R_>
-Circle_2<R_>
-Circle_2<R_>::
-orthogonal_transform(const typename R_::Aff_transformation_2& t) const
-{
-  typedef typename  R_::RT  RT;
-  typedef typename  R_::FT  FT;
-  typedef typename  R_::Vector_2  Vector_2;
-
-  Vector_2 vec(RT(1), RT(0) );   // unit vector // AF: was FT
-  vec = vec.transform(t);             // transformed
-  FT sq_scale = vec.squared_length();       // squared scaling factor
-
-  return Circle_2(t.transform(center()),
-                               sq_scale * squared_radius(),
-                               t.is_even() ? orientation()
-                                           : CGAL::opposite(orientation()));
-}
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Circle_2<R>& c)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        os << c.center() << ' ' << c.squared_radius() << ' '
-           << static_cast<int>(c.orientation());
-        break;
-    case IO::BINARY :
-        os << c.center();
-        write(os, c.squared_radius());
-        write(os, static_cast<int>(c.orientation()));
-        break;
-    default:
-        os << "Circle_2(" << c.center() <<  ", " << c.squared_radius() ;
-        switch (c.orientation()) {
-        case CLOCKWISE:
-            os << ", clockwise)";
-            break;
-        case COUNTERCLOCKWISE:
-            os << ", counterclockwise)";
-            break;
-        default:
-            os << ", collinear)";
-            break;
-        }
-        break;
-    }
-    return os;
-}
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Circle_2<R> &c)
-{
-  return insert(os, c);
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Circle_2<R>& c)
-{
-    typename R::Point_2 center;
-    typename R::FT squared_radius;
-    int o;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> center >> iformat(squared_radius) >> o;
-        break;
-    case IO::BINARY :
-        is >> center;
-        read(is, squared_radius);
-        is >> o;
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-	c = Circle_2<R>(center, squared_radius, static_cast<Orientation>(o));
-    return is;
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Circle_2<R> &c)
-{
-  return extract(is,c);
-}
-
-} //namespace CGAL
-
-#endif  // CGAL_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h b/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h
deleted file mode 100644
index 3ea4831..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (c) 2003-2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud, Sylvain Pion, Pedro Machado
-
-// Partially supported by the IST Programme of the EU as a Shared-cost
-// RTD (FET Open) Project under Contract No  IST-2000-26473 
-// (ECG - Effective Computational Geometry for Curves and Surfaces) 
-// and a STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
-#define CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
-
-#include <iostream>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Interval_nt.h>
-#include <boost/type_traits/is_same.hpp>
-
-namespace CGAL {
-namespace internal {
-
-  template <class CK >
-  class Circular_arc_point_2_base
-  {
-    typedef typename CK::FT                      FT;
-    typedef typename CK::Root_of_2               Root_of_2;
-    typedef typename CK::Point_2                 Point_2;
-    
-  public: // fixme ?
-    typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
-    typedef typename CK::template Handle<Root_for_circles_2_2>::type  Base;
-    
-    Circular_arc_point_2_base() 
-    {}
-    
-    Circular_arc_point_2_base(const Root_for_circles_2_2 & np)
-      :  _p(np)
-    {}
-
-    Circular_arc_point_2_base(const Point_2 & p)
-      :  _p(p.x(),p.y()/*,1,1,-p.x()-p.y()*/)
-    {}
-
-    const Root_of_2 & x() const 
-    { return get(_p).x(); }
-    
-    const Root_of_2 & y() const 
-    { return get(_p).y(); }
-    
-    CGAL::Bbox_2 bbox() const
-    {
-      return get(_p).bbox();
-    }
-
-    const Root_for_circles_2_2 & coordinates() const 
-    { return get(_p); }
-
-    bool equal_ref(const Circular_arc_point_2_base &p) const
-    {
-      return CGAL::identical(_p, p._p);      
-    }
-
-  private:
-    Base _p;
-  };
-
-  template < typename CK >
-  std::ostream &
-  print(std::ostream & os, const Circular_arc_point_2_base<CK> &p)
-  {
-    return os << "CirclArcEndPoint_2(" << std::endl
-	      << p.x() << ", " << p.y() << ')';
-  }
-
-template < typename BK, typename Base_CK >
-class Filtered_bbox_circular_arc_point_2_base
-  : public Base_CK::Circular_arc_point_2
-{
-public:
-  typedef Filtered_bbox_circular_arc_point_2_base<BK,Base_CK> Self;
-  typedef typename Base_CK::Circular_arc_point_2 P_point;
-
-  typedef typename BK::Point_2               Point_2;
-  typedef typename BK::Root_for_circles_2_2  Root_for_circles_2_2;
-
-  ////Construction/////
-  Filtered_bbox_circular_arc_point_2_base()
-    : P_point(), bb(NULL)
-  {}
-
-  Filtered_bbox_circular_arc_point_2_base(const P_point& pt)
-    : P_point(pt), bb(NULL)
-  {}
-
-  explicit Filtered_bbox_circular_arc_point_2_base(const Root_for_circles_2_2 & np)
-    : P_point(np), bb(NULL)
-  {}
-
-  explicit Filtered_bbox_circular_arc_point_2_base(const Point_2 & p)
-    : P_point(p), bb(NULL)
-  {}
-
-  Filtered_bbox_circular_arc_point_2_base(const Self &c) 
-    : P_point(c), bb(c.bb ? new Bbox_2(*(c.bb)) : NULL)
-  {}
-
-  Filtered_bbox_circular_arc_point_2_base&
-  operator=(const Self& c) {
-    if(this != &c)
-    {
-      this->P_point::operator=(c);
-
-      if (bb != NULL){ 
-        delete bb;
-      }
-      bb = c.bb ? new Bbox_2(*(c.bb)) : NULL;
-    }
-    return *this;
-  }
-	
-  ~Filtered_bbox_circular_arc_point_2_base() {
-    if(bb) {
-      delete bb; 
-      bb = 0;
-    }
-  }
-
-  ////Bbox related accessors////
-  
-  bool has_no_bbox() const
-  { return (bb==NULL);}
-
-  Bbox_2  bbox() const
-  { 
-    if(this->has_no_bbox())
-      bb= new Bbox_2(P_point::bbox());
-              
-    return *bb;     
-  }
-
-private:
-  mutable Bbox_2         *bb;
-}; // end class Filtered_bbox_circular_arc_point_2_base
-
-
-} // namespace internal
-} // namespace CGAL
-
-#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_3.h
deleted file mode 100644
index d9bc72f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_3.h
+++ /dev/null
@@ -1,323 +0,0 @@
-// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
-//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
-
-// Partially supported by the IST Programme of the EU as a 
-// STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_3_H
-#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_3_H
-
-#include <CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h>
-#include <CGAL/Circular_kernel_3/Intersection_traits.h>
-#include <boost/tuple/tuple.hpp>
-
-namespace CGAL {
-  namespace internal{
-    template < class SK >
-    class Circular_arc_3 {
-      typedef typename SK::Plane_3              Plane_3;
-      typedef typename SK::Circle_3             Circle_3;
-      typedef typename SK::Sphere_3             Sphere_3;
-      typedef typename SK::Point_3              Point_3;
-      typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
-      typedef typename SK::Line_3               Line_3;
-      typedef typename SK::FT                   FT;
-
-    private:
-
-      typedef boost::tuple<Circle_3, Circular_arc_point_3, 
-                               Circular_arc_point_3> Rep;
-      typedef typename SK::template Handle<Rep>::type Base;
-
-      Base base;
-      mutable bool _full;
-      // It is the sign of the cross product 
-      // of the vector (Center -> S) x (Center -> T)
-      // it saves execution time for the has_on functor
-      Sign _sign_cross_product;
-
-    public:
-
-      const Sphere_3& reference_sphere(){
-        return get_ref_sphere(get(base).template get<0>());
-      };
-
-        
-      Circular_arc_3()
-      {}
-
-      // The arc of circle goes from s to t in counterclockwise orientation
-      // in relation to the normal vector N of the supporting plane
-      // such that 
-      // if N.x != 0 then N.x > 0
-      // else if N.y != 0 -> N.y > 0
-      // else N.z > 0
-      // Interesting thing is that if _sign_cross_product is negative
-      // the arc is the bigger one (angle > pi)
-      Circular_arc_3(const Circle_3 &c, 
-                     const Circular_arc_point_3 &s,
-                     const Circular_arc_point_3 &t) 
-      : _full(false)
-      {
-        // l must pass through s and t, and s != t
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
-        CGAL_kernel_precondition(s != t);
-        base = Rep(c,s,t);
-        // we can optimize the computations of the sign (for the has_on functor), 
-        // by computing the vector s-c and t-s, in order to use them directly on 
-        // another compute_sign_of_cross_product function
-        // we can save time computing the substractions
-        // the problem is: more memory space is needed
-        _sign_cross_product =
-          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
-      }
-
-      Circular_arc_3(const Circle_3 &c, 
-                     const Point_3 &s,
-                     const Circular_arc_point_3 &t) 
-      : _full(false)
-      {
-        // l must pass through s and t, and s != t
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
-        CGAL_kernel_precondition(Circular_arc_point_3(s) != t);
-        base = Rep(c,s,t);
-        _sign_cross_product = 
-          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
-      }
-
-      Circular_arc_3(const Circle_3 &c, 
-                     const Circular_arc_point_3 &s,
-                     const Point_3 &t) 
-      : _full(false)
-      {
-        // l must pass through s and t, and s != t
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
-        CGAL_kernel_precondition(s != Circular_arc_point_3(t));
-        base = Rep(c,s,t);
-        _sign_cross_product = 
-          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
-      }
-
-      Circular_arc_3(const Circle_3 &c, 
-                     const Point_3 &s,
-                     const Point_3 &t) 
-      : _full(false)
-      {
-        // l must pass through s and t, and s != t
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
-        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
-        CGAL_kernel_precondition(Circular_arc_point_3(s) != 
-                                 Circular_arc_point_3(t));
-        base = Rep(c,s,t);
-        _sign_cross_product = 
-          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
-      }
-
-      // This is the one of the two cases we want that s == t
-      // that makes the is_full() correct and complete
-      Circular_arc_3(const Circle_3 &c)
-      : _full(true)
-      {
-        const Plane_3 &p = c.supporting_plane();
-        if(is_zero(p.b()) && is_zero(p.c())) {
-          const Circular_arc_point_3 v = 
-	    SphericalFunctors::y_extremal_point<SK>(c,true);
-          base = Rep(c,v,v);
-        } else {
-          const Circular_arc_point_3 v = 
-	    SphericalFunctors::x_extremal_point<SK>(c,true);
-          base = Rep(c,v,v);
-        }
-        /* don't matter
-        _sign_cross_product = 0;
-        */
-      }
-
-      // This is the second case where we want that s == t
-      // that makes the is_full() correct and complete
-      Circular_arc_3(const Circle_3 &c,const Circular_arc_point_3& point)
-      : base(Rep(c,point,point)),_full(true)
-      {CGAL_kernel_precondition(SK().has_on_3_object()(c,point));}
-      
-      Circular_arc_3(const Circle_3 &c, 
-                     const Sphere_3 &s1, bool less_xyz_s1,
-                     const Sphere_3 &s2, bool less_xyz_s2) 
-      {
-         typedef typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type result_type;
-         std::vector<result_type> sols1, sols2;
-         // The spheres must not include the circle
-         CGAL_kernel_precondition(!SK().has_on_3_object()(s1,c));
-         CGAL_kernel_precondition(!SK().has_on_3_object()(s2,c));
-         SK().intersect_3_object()(c, s1, std::back_inserter(sols1));
-         SK().intersect_3_object()(c, s2, std::back_inserter(sols2));
-         // l must intersect s1 and s2
-         CGAL_kernel_precondition(sols1.size() > 0);
-         CGAL_kernel_precondition(sols2.size() > 0);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
-            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
-              &sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]
-            );
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
-            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
-              &sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]
-            );        
-         // the source and target must be different
-         CGAL_kernel_precondition(pair1.first != pair2.first);
-         *this = Circular_arc_3(c, pair1.first, pair2.first);
-      }
-
-      Circular_arc_3(const Circle_3 &c, 
-                     const Plane_3 &p1, bool less_xyz_p1,
-                     const Plane_3 &p2, bool less_xyz_p2) 
-      {
-        typedef typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type result_type;
-         std::vector<result_type> sols1, sols2;
-         // The planes must not include the circle
-         CGAL_kernel_precondition(!SK().has_on_3_object()(p1,c));
-         CGAL_kernel_precondition(!SK().has_on_3_object()(p2,c));
-         SK().intersect_3_object()(c, p1, std::back_inserter(sols1));
-         SK().intersect_3_object()(c, p2, std::back_inserter(sols2));
-         // l must intersect s1 and s2
-         CGAL_kernel_precondition(sols1.size() > 0);
-         CGAL_kernel_precondition(sols2.size() > 0);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
-           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
-              &sols1[(sols1.size()==1)?(0):(less_xyz_p1?0:1)]
-            );
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
-           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
-              &sols2[(sols2.size()==1)?(0):(less_xyz_p2?0:1)]
-            );                
-         // the source and target must be different
-         CGAL_kernel_precondition(pair1.first != pair2.first);
-         *this = Circular_arc_3(c, pair1.first, pair2.first);
-      }
-
-      Circular_arc_3(const Point_3 &begin,
-		     const Point_3 &middle,
-		     const Point_3 &end)
-      {
-	CGAL_kernel_precondition(!typename SK::Collinear_3()(begin, middle, end));
-	const Circle_3 c = Circle_3(begin, middle, end);
-	base = Rep(c,begin,end);
-        _sign_cross_product =
-          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>
-	         (begin,end,c.center());
-      }
-
-      const Circle_3& supporting_circle() const 
-      {
-        return get(base).template get<0>();
-      }
-
-      const Circular_arc_point_3& source() const 
-      {
-        return get(base).template get<1>();
-      }
-
-      const Circular_arc_point_3& target() const 
-      {
-        return get(base).template get<2>();
-      }
-
-      Plane_3 supporting_plane() const {
-        return supporting_circle().supporting_plane();
-      }
-
-      Point_3 center() const {
-        return supporting_circle().center();
-      }
-
-      FT squared_radius() const {
-        return supporting_circle().squared_radius();
-      }
-
-      Sphere_3 diametral_sphere() const {
-        return supporting_circle().diametral_sphere();
-      }
-
-      bool is_full() const {
-        return _full;
-      }
-
-      Sign sign_cross_product() const {
-        return _sign_cross_product;
-      }
-
-      double approximate_angle() const {
-        if(is_full()) return 2.0*CGAL_PI;
-        const double x1 = to_double(source().x());
-        const double y1 = to_double(source().y());
-        const double z1 = to_double(source().z());
-        const double x2 = to_double(target().x());
-        const double y2 = to_double(target().y());
-        const double z2 = to_double(target().z());
-        const double dx = x2-x1;
-        const double dy = y2-y1;
-        const double dz = z2-z1;
-        const double d_sq = dx*dx + dy*dy + dz*dz;
-        const double r_sq = to_double(squared_radius());
-        const double ap_ang = 2.0 * std::asin(0.5 * std::sqrt(d_sq / r_sq));
-        if(sign_cross_product() == NEGATIVE) return 2.0 * CGAL_PI - ap_ang;
-        else return ap_ang;
-      }
-
-      double approximate_squared_length() const {
-        const double ang = approximate_angle();
-        return ang * ang * to_double(squared_radius());
-      }
-
-      // It is of course possible to increase the precision
-      // maybe it will be done after
-      CGAL::Bbox_3 bbox() const {
-        return supporting_circle().bbox();
-      }
-
-      bool operator==(const Circular_arc_3 &) const;
-      bool operator!=(const Circular_arc_3 &) const;
-
-    };
-
-    template < class SK >
-    CGAL_KERNEL_INLINE
-    bool
-    Circular_arc_3<SK>::operator==(const Circular_arc_3<SK> &t) const
-    {
-      if (CGAL::identical(base, t.base))
-        return true;		
-      return CGAL::SphericalFunctors::non_oriented_equal<SK>(*this, t);
-    }
-
-    template < class SK >
-    CGAL_KERNEL_INLINE
-    bool
-    Circular_arc_3<SK>::operator!=(const Circular_arc_3<SK> &t) const
-    {
-      return !(*this == t);
-    }
-
-  }
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h b/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h
deleted file mode 100644
index b970139..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
-//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
-
-// Partially supported by the IST Programme of the EU as a 
-// STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
-#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
-
-#include <iostream>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Handle.h>
-#include <CGAL/Circular_kernel_3/Intersection_traits.h>
-//#include <CGAL/global_functions_on_roots_and_polynomials_2_2.h> 
-// fixme, devrait
-// appeler fonction de global_functions_on_circular_arcs
-
-namespace CGAL {
-  namespace internal {
-
-template <class SK >
-class Circular_arc_point_3
-{
-  typedef typename SK::FT                         FT;
-  typedef typename SK::Root_of_2                  Root_of_2;
-  typedef typename SK::Point_3                    Point_3;
-  typedef typename SK::Algebraic_kernel           Algebraic_kernel;
-  typedef typename Algebraic_kernel::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
-  typedef typename Algebraic_kernel::Polynomial_1_3             Polynomial_1_3;
-  typedef typename Algebraic_kernel::Polynomials_for_line_3     Polynomials_for_line_3;
-  typedef typename SK::Line_3                     Line_3;
-  typedef typename SK::Plane_3                    Plane_3;
-  typedef typename SK::Sphere_3                   Sphere_3;
-  typedef typename SK::Circle_3                   Circle_3;
-  typedef typename SK::Root_for_spheres_2_3       Root_for_spheres_2_3;
-
-  typedef Root_for_spheres_2_3  Rep__;
-  typedef typename SK::template Handle<Rep__>::type  Base;
-
-  Base base;
-
-public: 
-
-  Circular_arc_point_3() {}
-	
-  Circular_arc_point_3(const Root_of_2 & x,
-                       const Root_of_2 & y,
-                       const Root_of_2 & z)
-  : base(x,y,z){}
-
-  Circular_arc_point_3(const Root_for_spheres_2_3 & np)
-  : base(np){}
-
-  Circular_arc_point_3(const Point_3 & p)
-  : base(p.x(),p.y(),p.z()){}
-
-  Circular_arc_point_3(const Sphere_3 &s1, 
-                       const Sphere_3 &s2,
-                       const Sphere_3 &s3,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Sphere_3, Sphere_3, Sphere_3>::type> sols;
-    SK().intersect_3_object()(s1, s2, s3, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);
-      *this = pair->first.rep();
-    } 
-  }
-
-  Circular_arc_point_3(const Plane_3 &p, 
-                       const Sphere_3 &s1,
-                       const Sphere_3 &s2,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Plane_3, Sphere_3, Sphere_3>::type> sols;
-    SK().intersect_3_object()(p, s1, s2, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);
-      *this = pair->first.rep();
-    } 
-  }
-
-  Circular_arc_point_3(const Plane_3 &p1, 
-                       const Plane_3 &p2,
-                       const Sphere_3 &s,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Plane_3, Plane_3, Sphere_3>::type> sols;
-    SK().intersect_3_object()(p1, p2, s, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);      
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    }
-  }
-
-  Circular_arc_point_3(const Line_3 &l,
-                       const Sphere_3 &s,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
-    SK().intersect_3_object()(l, s, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    }
-  }
-
-  Circular_arc_point_3(const Circle_3 &c,
-                       const Plane_3 &p,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type> sols;
-    SK().intersect_3_object()(c, p, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    }
-  }
-
-  Circular_arc_point_3(const Circle_3 &c,
-                       const Sphere_3 &s,
-                       const bool less_xyz = true) {
-    std::vector<typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type> sols;
-    SK().intersect_3_object()(c, s, std::back_inserter(sols));
-    // s1,s2,s3 must intersect
-    CGAL_kernel_precondition(sols.size() != 0);
-    if(sols.size() == 1) {
-      // the intersection must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    } else {
-      // the intersections must be a point
-      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
-        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
-      CGAL_kernel_precondition(pair!=NULL);            
-      *this = pair->first.rep();
-    }
-  }
-
-  const Root_of_2 & x() const { return get(base).x(); }
-  const Root_of_2 & y() const { return get(base).y(); }
-  const Root_of_2 & z() const { return get(base).z(); }
-	  
-  const Root_for_spheres_2_3 & coordinates() const { return get(base); }
-
-  const CGAL::Bbox_3 bbox() const {
-    return get(base).bbox();
-  }
-
-  bool operator==(const Circular_arc_point_3 &) const;
-  bool operator!=(const Circular_arc_point_3 &) const;
-
-};
-
-template < class SK >
-CGAL_KERNEL_INLINE
-bool
-Circular_arc_point_3<SK>::operator==(const Circular_arc_point_3<SK> &t) const
-{
-  if (CGAL::identical(base, t.base))
-      return true;
-  return x() == t.x() &&
-         y() == t.y() &&
-         z() == t.z();
-}
-
-template < class SK >
-CGAL_KERNEL_INLINE
-bool
-Circular_arc_point_3<SK>::operator!=(const Circular_arc_point_3<SK> &t) const
-{
-  return !(*this == t);
-}
-    
-template < typename SK >
-std::ostream &
-print(std::ostream & os, const Circular_arc_point_3<SK> &p)
-{
-  return os << "CirclArcEndPoint_3(" << p.x() << ", " << p.y() << ')' << std::endl;
-}
-
-  } // namespace internal
-} // namespace CGAL
-
-#endif // CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Line_arc_3.h b/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Line_arc_3.h
deleted file mode 100644
index cc0e73b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Line_arc_3.h
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
-//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
-
-// Partially supported by the IST Programme of the EU as a 
-// STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_SPHERICAL_KERNEL_LINE_ARC_3_H
-#define CGAL_SPHERICAL_KERNEL_LINE_ARC_3_H
-
-#include <CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h>
-#include <CGAL/Circular_kernel_3/Intersection_traits.h>
-#include <boost/tuple/tuple.hpp>
-
-namespace CGAL {
-  namespace internal{
-    template <class SK> class Line_arc_3 {
-
-      typedef typename SK::Plane_3              Plane_3;
-      typedef typename SK::Sphere_3             Sphere_3;
-      typedef typename SK::Point_3              Point_3;
-      typedef typename SK::Segment_3            Segment_3;
-      typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
-      typedef typename SK::Line_3               Line_3;
-      typedef typename SK::FT                   FT;
-
-    private:
-      typedef boost::tuple<Line_3, Circular_arc_point_3, 
-                             Circular_arc_point_3>  Rep;
-      typedef typename SK::template Handle<Rep>::type  Base;
-
-      Base base;
-      mutable unsigned char begin_less_xyz_than_end_flag;
-
-      bool begin_less_xyz_than_end() const {
-        if(begin_less_xyz_than_end_flag == 0) {
-          if(SK().compare_xyz_3_object()(source(), target()) < 0)
-            begin_less_xyz_than_end_flag = 2;
-          else begin_less_xyz_than_end_flag = 1;
-        } return begin_less_xyz_than_end_flag == 2;
-      }
-
-    public:
-      Line_arc_3()
-      : begin_less_xyz_than_end_flag(0) 
-      {}
-
-      Line_arc_3(const Line_3 &l, 
-                 const Circular_arc_point_3 &s,
-                 const Circular_arc_point_3 &t) 
-      : begin_less_xyz_than_end_flag(0)
-      {
-        // l must pass through s and t, and s != t
-        CGAL_kernel_precondition(SK().has_on_3_object()(l,s));
-        CGAL_kernel_precondition(SK().has_on_3_object()(l,t));
-        CGAL_kernel_precondition(s != t);
-        base = Rep(l,s,t);
-      }
-
-      Line_arc_3(const Segment_3 &s) 
-      : begin_less_xyz_than_end_flag(0)
-      {
-        base = Rep(s.supporting_line(),
-                   s.source(),
-                   s.target());
-      }
-
-      Line_arc_3(const Point_3 &s,
-                 const Point_3 &t) 
-      : begin_less_xyz_than_end_flag(0)
-      {
-        CGAL_kernel_precondition(s != t);
-        base = Rep(SK().construct_line_3_object()(s,t),s,t);
-      }
-
-      Line_arc_3(const Line_3 &l, 
-                 const Sphere_3 &s,
-                 bool less_xyz_first = true) 
-      {
-        std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
-         SK().intersect_3_object()(l, s, std::back_inserter(sols));
-         // l must intersect s in 2 points 
-         CGAL_kernel_precondition(sols.size() == 2);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
-           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
-            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[1]);
-         if(less_xyz_first) {
-           *this = Line_arc_3(l, pair1.first, pair2.first);
-         } else {
-           *this = Line_arc_3(l, pair2.first, pair1.first);
-         } 
-      }
-
-      Line_arc_3(const Line_3 &l, 
-                 const Sphere_3 &s1, bool less_xyz_s1,
-                 const Sphere_3 &s2, bool less_xyz_s2) 
-      {
-        std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols1, sols2;
-         SK().intersect_3_object()(l, s1, std::back_inserter(sols1));
-         SK().intersect_3_object()(l, s2, std::back_inserter(sols2));
-         // l must intersect s1 and s2
-         CGAL_kernel_precondition(sols1.size() > 0);
-         CGAL_kernel_precondition(sols2.size() > 0);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
-            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]);
-         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
-            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]);
-         // the source and target must be different
-         CGAL_kernel_precondition(pair1.first != pair2.first);
-         *this = Line_arc_3(l, pair1.first, pair2.first);
-      }
-
-      Line_arc_3(const Line_3 &l, 
-                 const Plane_3 &p1,
-                 const Plane_3 &p2) 
-      {
-         // l must not be on p1 or p2
-         CGAL_kernel_precondition(!SK().has_on_3_object()(p1,l));
-         CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
-         // l must intersect p1 and p2
-         typedef typename SK3_Intersection_traits<SK, Line_3, Plane_3>::type Intersection;
-         Intersection i1 = SK().intersect_3_object()(l, p1);
-         Intersection i2 = SK().intersect_3_object()(l, p2);
-         const typename SK::Point_3* point1=boost::get<typename SK::Point_3>( & *i1 );
-         const typename SK::Point_3* point2=boost::get<typename SK::Point_3>( & *i2 );
-         CGAL_assertion(point1!=NULL);
-         CGAL_assertion(point2!=NULL);
-         // the source and target must be different
-         CGAL_kernel_precondition(*point1 != *point2);
-         *this = Line_arc_3(l, *point1, *point2);
-      }
-
-      const Line_3& supporting_line() const 
-      {
-        return get(base).template get<0>();
-      }
-
-      const Circular_arc_point_3& source() const 
-      {
-        return get(base).template get<1>();
-      }
-
-      const Circular_arc_point_3& target() const 
-      {
-        return get(base).template get<2>();
-      }
-
-      const Circular_arc_point_3& lower_xyz_extremity() const
-      {
-        return begin_less_xyz_than_end() ? source() : target();
-      }
-
-      const Circular_arc_point_3& higher_xyz_extremity() const
-      {
-        return begin_less_xyz_than_end() ? target() : source();
-      }
-
-      const CGAL::Bbox_3 bbox() const {
-        return source().bbox() + target().bbox();
-      }
-
-      bool operator==(const Line_arc_3 &) const;
-      bool operator!=(const Line_arc_3 &) const;
-
-    };
-
-    template < class SK >
-    CGAL_KERNEL_INLINE
-    bool
-    Line_arc_3<SK>::operator==(const Line_arc_3<SK> &t) const
-    {
-      if (CGAL::identical(base, t.base))
-        return true;
-      return CGAL::SphericalFunctors::non_oriented_equal<SK>(*this, t);
-    }
-
-    template < class SK >
-    CGAL_KERNEL_INLINE
-    bool
-    Line_arc_3<SK>::operator!=(const Line_arc_3<SK> &t) const
-    {
-      return !(*this == t);
-    }
-
-  }
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator/Circulator_adapters.h b/3rdparty/CGAL-4.6/include/CGAL/Circulator/Circulator_adapters.h
deleted file mode 100644
index bb7c08b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circulator/Circulator_adapters.h
+++ /dev/null
@@ -1,690 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
-
-#ifndef CGAL_CIRCULATOR_IMPL_H
-#define CGAL_CIRCULATOR_IMPL_H 1
-
-#include <CGAL/circulator.h>
-
-namespace CGAL {
-
-template < class  S>
-class Forward_circulator_over_struct
-    : public Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
-public:
-
-// DEFINITION
-//
-// Given a structure `S' that have a data member `S* next' that realizes a
-// ring like data structure the adaptor
-// `Forward_circulator_over_struct< S>' provides a forward circulator
-// for it. If the structure `S' has additionally a second data member of
-// type `S* prev' that realizes the reverse direction the adaptor
-// `Bidirectional_circulator_over_struct< S>' provides a bidirectional
-// circulator for it. In addition, adaptors for const circulators are
-// provided with the names `Forward_const_circulator_over_struct< S>'
-// and `Bidirectional_const_circulator_over_struct< S>'. A circulator
-// becomes invalid whenever the object it refers to gets deleted from the
-// data structure.
-
-    typedef Forward_circulator_over_struct<S> Self;
-    typedef Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t> Base1;
-    typedef typename Base1::reference reference;
-    typedef typename Base1::pointer   pointer;
-
-// CREATION
-//
-// New creation variable is: `circ'
-
-    Forward_circulator_over_struct() {}
-        // a circulator `circ' with singular value.
-
-    Forward_circulator_over_struct( S* ptr)
-        : Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>( ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    reference  operator*()             const { return *(S*)this->_ptr;}
-    pointer    operator->()            const { return  (S*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = ((S*)this->_ptr)->next;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-};
-
-
-template < class  S>
-class Forward_const_circulator_over_struct
-    : public Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
-public:
-
-    typedef Forward_const_circulator_over_struct<S> Self;
-    typedef const S&  reference;
-    typedef const S*  pointer;
-
-// CREATION
-
-    Forward_const_circulator_over_struct() {}
-        // a circulator `circ' with singular value.
-
-    Forward_const_circulator_over_struct( const S* ptr)
-        : Forward_circulator_ptrbase<S,std::ptrdiff_t,
-                                     std::size_t>((void*)ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    reference  operator*()             const { return *(const S*)this->_ptr;}
-    pointer    operator->()            const { return  (const S*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = ((S*)this->_ptr)->next;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-};
-
-
-template < class  S>
-class Bidirectional_circulator_over_struct
-  : public Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
-public:
-
-    typedef Bidirectional_circulator_over_struct<S> Self;
-    typedef Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,
-                                             std::size_t> Base1;
-    typedef typename Base1::reference reference;
-    typedef typename Base1::pointer   pointer;
-
-// CREATION
-//
-// New creation variable is: `circ'
-
-    Bidirectional_circulator_over_struct() {}
-        // a circulator `circ' with singular value.
-
-    Bidirectional_circulator_over_struct( S* ptr)
-        : Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,
-                                           std::size_t>( ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    reference  operator*()             const { return *(S*)this->_ptr;}
-    pointer    operator->()            const { return  (S*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = ((S*)this->_ptr)->next;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        this->_ptr = ((S*)this->_ptr)->prev;
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-};
-
-
-template < class  S>
-class Bidirectional_const_circulator_over_struct
-  : public Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
-public:
-
-    typedef Bidirectional_const_circulator_over_struct<S> Self;
-    typedef const S&  reference;
-    typedef const S*  pointer;
-
-// CREATION
-
-    Bidirectional_const_circulator_over_struct() {}
-        // a circulator `circ' with singular value.
-
-    Bidirectional_const_circulator_over_struct( const S* ptr)
-        : Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>(
-            (void*)ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    reference  operator*()             const { return *(const S*)this->_ptr;}
-    pointer    operator->()            const { return  (const S*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = ((S*)this->_ptr)->next;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        this->_ptr = ((S*)this->_ptr)->prev;
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-};
-template < class  C>
-class Forward_circulator_over_class
-    : public Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
-public:
-    typedef Forward_circulator_over_class<C> Self;
-
-// DEFINITION
-//
-// Given a class `C' that has a member function `C* next()' that realizes
-// a ring like data structure the adaptor
-// `Forward_circulator_over_class<C>' provides a forward circulator
-// for it. If the class `C' has additionally a second member function `C*
-// prev()' that realizes the reverse direction the adaptor
-// `Bidirectional_circulator_over_class<C>' provides a bidirectional
-// circulator for it. In addition, adaptors for const circulators are
-// provided with the names `Forward_const_circulator_over_class<C>'
-// and `Bidirectional_const_circulator_over_class<C>'. A circulator
-// becomes invalid whenever the object it refers to gets deleted from the
-// data structure.
-
-    Forward_circulator_over_class() {}
-        // a circulator `circ' with a singular value.
-
-    Forward_circulator_over_class( C* ptr)
-        : Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>( ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-//
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    C&   operator*()                   const { return *(C*)this->_ptr;}
-    C*   operator->()                  const { return  (C*)this->_ptr;}
-    Self& operator++() {
-        this->_ptr = ((C*)this->_ptr)->next();
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-};
-
-template < class  C>
-class Forward_const_circulator_over_class
-    : public Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
-public:
-    typedef Forward_const_circulator_over_class<C> Self;
-
-    Forward_const_circulator_over_class() {}
-        // a circulator `circ' with singular value.
-
-    Forward_const_circulator_over_class( const C* ptr)
-        : Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>
-            ((void*)ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-//
-// OPERATIONS
-
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    const C&  operator*()              const { return *(C*)this->_ptr;}
-    const C*  operator->()             const { return  (C*)this->_ptr;}
-    Self& operator++() {
-        this->_ptr = (void*)(((C*)this->_ptr)->next());
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-};
-
-template < class  C>
-class Bidirectional_circulator_over_class
-  : public Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
-public:
-    typedef Bidirectional_circulator_over_class<C> Self;
-
-    Bidirectional_circulator_over_class() {}
-        // a circulator `circ' with singular value.
-
-    Bidirectional_circulator_over_class( C* ptr)
-        : Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>
-            (ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-//
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    C&   operator*()                   const { return *(C*)this->_ptr;}
-    C*   operator->()                  const { return  (C*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = ((C*)this->_ptr)->next();
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        this->_ptr = ((C*)this->_ptr)->prev();
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-};
-
-template < class  C>
-class Bidirectional_const_circulator_over_class
-  : public Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
-public:
-    typedef Bidirectional_const_circulator_over_class<C> Self;
-//
-// CREATION
-
-    Bidirectional_const_circulator_over_class() {}
-        // a circulator `circ' with singular value.
-
-    Bidirectional_const_circulator_over_class( const C* ptr)
-        : Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>(
-            (void*)ptr) {}
-        // a circulator `circ' initialized to point to the element `*ptr'.
-
-//
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return this->_ptr == NULL;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
-    bool operator!=( const Self& c)    const { return !(*this == c); }
-    const C&  operator*()              const { return *(C*)this->_ptr;}
-    const C*  operator->()             const { return  (C*)this->_ptr;}
-
-    Self& operator++() {
-        this->_ptr = (void*)(((C*)this->_ptr)->next());
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        this->_ptr = (void*)(((C*)this->_ptr)->prev());
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-};
-template < class A, class T, class U, class I>
-class Circulator_over_array
-    : public Random_access_circulator_ptrbase<T,I,U>{
-    U _size;
-    U _i;
-public:
-
-// DEFINITION
-//
-// Given a data structure `A' that provides random access with an index of
-// type `U' to its sequence of stored elements of type `T' with the member
-// function `operator[]' the adaptor `Circulator_over_array< A, T, U,
-// I>' provides a random access circulator for `A'. The corresponding
-// const circulator is `Const_circulator_over_array< A, T, U, I>'. All
-// circulators for an array `a' become invalid whenever `a' changes its
-// size (due to deletions or insertions).
-//
-// `A' is a random access data structure and `T' its value type. `U' is
-// the unsigned integral type carrying the size of the array and the
-// actual index within the container. `I' is the signed integral type used
-// as distance type and as index type in the random access circulator.
-
-// TYPES
-
-    typedef A                              Array;
-    typedef Circulator_over_array<A,T,U,I> Self;
-
-// CREATION
-
-    Circulator_over_array() : _size(0), _i(0) {}
-        // a circulator `circ' with singular value.
-
-    Circulator_over_array( A& array, U size, U start = 0)
-        : Random_access_circulator_ptrbase<T,I,U>( &array),
-          _size( size), _i(start) {}
-        // a circulator `circ' initialized to refer to the element
-        // `(array.*access)(start)'. The circulator `circ' contains a
-        // singular value if `start >= size'. Precondition: The
-        // expressions `(array.*access)(i)' are valid in the range
-        // 0 <= i < `size' .
-
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return _i >= _size;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c) const {
-        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
-        CGAL_assertion( _size == c._size); // same size when instantiated ?
-        return _i == c._i;
-    }
-    bool operator!=( const Self& c) const { return !(*this == c); }
-    T&  operator*() const {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        return ((A*)this->_ptr)->operator[](_i);
-    }
-    T*  operator->() const {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        return &(((A*)this->_ptr)->operator[](_i));
-    }
-    Self& operator++() {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        ++ _i;
-        if ( _i >= _size)
-            _i = 0;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        if ( _i <= 0)
-            _i = _size - 1;
-        else
-            -- _i;
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-    Self& operator+=( I n);
-    Self  operator+( I n) const {
-        Self tmp = *this;
-        return tmp += n;
-    }
-    Self& operator-=( I n) { return operator+=( -n); }
-    Self  operator-( I n) const {
-        Self tmp = *this;
-        return tmp += -n;
-    }
-    I     operator-( const Self& c) const {
-        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
-        CGAL_assertion( _size == c._size); // same size when instantiated ?
-        return _i - c._i;
-    }
-    T&    operator[](I n) const {
-        Self tmp = *this;
-        tmp += n;
-        return tmp.operator*();
-    }
-    Self  min_circulator() {
-        return Self( *((A*)this->_ptr), _size);
-    }
-    // no relational ordering
-};
-
-template < class Dist, class  A, class  T, class U, class  I>
-inline
-Circulator_over_array< A, T, U, I>
-operator+( Dist n, const Circulator_over_array< A, T, U, I>& circ) {
-    Circulator_over_array< A, T, U, I> tmp = circ;
-    return tmp += I(n);
-}
-
-template < class A, class T, class U, class I>
-Circulator_over_array< A, T, U, I>&
-Circulator_over_array< A, T, U, I>::
-operator+=( I n) {
-    CGAL_assertion( this->_ptr != NULL);
-    CGAL_assertion( _i < _size);
-    _i = non_negative_mod( (I)(_i) + n, _size);
-    CGAL_assertion( _i < _size);
-    return *this;
-}
-
-template < class  A, class  T, class U, class  I>
-class Const_circulator_over_array
-    : public Random_access_circulator_ptrbase<T,I,U> {
-    U _size;
-    U _i;
-public:
-
-// TYPES
-
-    typedef A                                    Array;
-    typedef Const_circulator_over_array<A,T,U,I> Self;
-
-// New creation variable is: `circ'
-//
-// CREATION
-
-    Const_circulator_over_array() : _size(0), _i(0) {}
-        // a const circulator `circ' with singular value.
-
-    Const_circulator_over_array( const A& array, U size, U start = 0)
-        : Random_access_circulator_ptrbase<T,I,U>(
-              (void*)(&array)), _size( size), _i(start) {}
-        // a const circulator `circ' initialized to refer to the element
-        // `(array.*access)(start)'. The circulator `circ' contains a
-        // singular value if `start >= size'. Precondition: The
-        // expressions `(array.*access)(i)' are valid in the range
-        // 0 <= i < `size' .
-
-//
-// OPERATIONS
-
-    bool operator==( Nullptr_t p) const {
-        CGAL_assertion( p == NULL);
-        return _i >= _size;
-    }
-    bool operator!=( Nullptr_t p) const { return !(*this == p); }
-    bool operator==( const Self& c) const {
-        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
-        CGAL_assertion( _size == c._size); // same size when instantiated ?
-        return _i == c._i;
-    }
-    bool operator!=( const Self& c) const { return !(*this == c); }
-    const T&  operator*() const {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        return ((const A*)this->_ptr)->operator[](_i);
-    }
-    const T*  operator->() const {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        return &(((const A*)this->_ptr)->operator[](_i));
-    }
-    Self& operator++() {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        ++ _i;
-        if ( _i >= _size)
-            _i = 0;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-    Self& operator--() {
-        CGAL_assertion( this->_ptr != NULL);
-        CGAL_assertion( _i < _size);
-        if ( _i <= 0)
-            _i = _size - 1;
-        else
-            -- _i;
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-    Self& operator+=( I n);
-
-    Self  operator+( I n) const {
-        Self tmp = *this;
-        return tmp += n;
-    }
-    Self& operator-=( I n) {
-        return operator+=( -n);
-    }
-    Self  operator-( I n) const {
-        Self  tmp = *this;
-        return tmp += -n;
-    }
-    I
-    operator-( const Self& c)  const {
-        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
-        CGAL_assertion( _size == c._size); // same size when instantiated ?
-        return _i - c._i;
-    }
-    const T&  operator[](I n) const {
-        Self tmp = *this;
-        tmp += n;
-        return tmp.operator*();
-    }
-    Self  min_circulator() {
-        return Self( *((const A*)this->_ptr), _size);
-    }
-    // no relational ordering
-};
-
-template < class Dist, class  A, class  T, class U, class  I>
-inline
-Const_circulator_over_array< A, T, U, I>
-operator+( Dist n, const Const_circulator_over_array<A,T,U,I>& circ) {
-    Const_circulator_over_array< A, T, U, I> tmp = circ;
-    return tmp += I(n);
-}
-
-template < class A, class T, class U, class I>
-Const_circulator_over_array< A, T, U, I>&
-Const_circulator_over_array< A, T, U, I>::
-operator+=( I n) {
-    CGAL_assertion( this->_ptr != NULL);
-    CGAL_assertion( _i < _size);
-    _i = non_negative_mod( (I)(_i) + n, _size);
-    CGAL_assertion( _i < _size);
-    return *this;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CIRCULATOR_IMPL_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator_identity.h b/3rdparty/CGAL-4.6/include/CGAL/Circulator_identity.h
deleted file mode 100644
index a9a0448..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circulator_identity.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-//                 Sylvain Pion
-
-#ifndef CGAL_CIRCULATOR_IDENTITY_H
-#define CGAL_CIRCULATOR_IDENTITY_H 1
-
-#include <CGAL/circulator.h>
-
-namespace CGAL {
-
-template < class C,
-           class Ref = typename C::reference,
-           class Ptr = typename C::pointer>
-class Circulator_identity {
-protected:
-  C        nt;    // The internal circulator.
-public:
-  typedef C  Circulator;
-  typedef Circulator_identity<C,Ref,Ptr> Self;
-
-  typedef typename  C::iterator_category   iterator_category;
-  typedef typename  C::value_type          value_type;
-  typedef typename  C::difference_type     difference_type;
-  typedef typename  C::size_type           size_type;
-  typedef typename  C::reference           reference;
-  typedef typename  C::pointer             pointer;
-
-  // CREATION
-  // --------
-
-  Circulator_identity() {}
-  Circulator_identity( Circulator j) : nt(j) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-  Circulator  current_circulator() const { return nt;}
-
-  bool operator==( Nullptr_t p) const {
-    CGAL_assertion( p == 0);
-    return ( nt == 0);                                    //###//
-  }
-  bool operator!=( Nullptr_t p) const {
-    return !(*this == p);
-  }
-  bool operator==( const Self& i) const {
-    return ( nt == i.nt);                                    //###//
-  }
-  bool operator!=( const Self& i) const {
-    return !(*this == i);
-  }
-  Ref  operator*() const {
-    return *nt;                                              //###//
-  }
-  Ptr  operator->() const {
-    return nt.operator->();                                  //###//
-  }
-  Self& operator++() {
-    ++nt;                                                    //###//
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  // OPERATIONS Bidirectional Category
-  // ---------------------------------
-
-  Self& operator--() {
-    --nt;                                                    //###//
-    return *this;
-  }
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-
-  // OPERATIONS Random Access Category
-  // ---------------------------------
-
-  Self  min_circulator() const {
-    return Self( nt.min_circulator());                       //###//
-  }
-  Self& operator+=( difference_type n) {
-    nt += n;                                                 //###//
-    return *this;
-  }
-  Self  operator+( difference_type n) const {
-    Self tmp = *this;
-    return tmp += n;
-  }
-  Self& operator-=( difference_type n) {
-    return operator+=( -n);
-  }
-  Self  operator-( difference_type n) const {
-    Self tmp = *this;
-    return tmp += -n;
-  }
-  difference_type  operator-( const Self& i) const {
-    return nt - i.nt;                                        //###//
-  }
-  Ref  operator[]( difference_type n) const {
-    Self tmp = *this;
-    tmp += n;
-    return tmp.operator*();
-  }
-};
-
-template < class Dist, class C, class Ref, class Ptr>
-inline
-Circulator_identity<C,Ref,Ptr>
-operator+( Dist n, Circulator_identity<C,Ref,Ptr> i) {
-  return i += n;
-}
-
-} //namespace CGAL
-#endif // CGAL_CIRCULATOR_IDENTITY_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator_on_node.h b/3rdparty/CGAL-4.6/include/CGAL/Circulator_on_node.h
deleted file mode 100644
index f755824..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Circulator_on_node.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-//                 Sylvain Pion
-
-#ifndef CGAL_CIRCULATOR_ON_NODE_H
-#define CGAL_CIRCULATOR_ON_NODE_H 1
-
-#include <CGAL/circulator.h>
-
-namespace CGAL {
-
-template < class Node,
-           class Next,
-           class Prev,
-           class Ref = Node&,
-           class Ptr = Node*,
-           class Ctg = Bidirectional_circulator_tag>
-class Circulator_on_node {
-protected:
-  Ptr      nt;    // The internal node ptr.
-public:
-  typedef  Circulator_on_node<Node,Next,Prev,Ref,Ptr,Ctg> Self;
-
-  typedef  Ctg                iterator_category;
-  typedef  Node               value_type;
-  typedef  std::ptrdiff_t     difference_type;
-  typedef  std::size_t        size_type;
-  typedef  Ref                reference;
-  typedef  Ptr                pointer;
-
-  // CREATION
-  // --------
-
-  Circulator_on_node() : nt(0) {}
-  Circulator_on_node( Ptr p) : nt(p) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-  Ptr  ptr() const { return nt;}
-
-  bool operator==( Nullptr_t p) const {
-    CGAL_assertion( p == 0);
-    return ( nt == 0);
-  }
-  bool  operator!=( Nullptr_t p) const { return !(*this == p); }
-  bool  operator==( const Self& i) const { return ( nt == i.nt); }
-  bool  operator!=( const Self& i) const { return !(*this == i); }
-  Ref   operator*()  const { return *nt; }
-  Ptr   operator->() const { return nt; }
-  Self& operator++() {
-    Next next;
-    nt = next(nt);
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  // OPERATIONS Bidirectional Category
-  // ---------------------------------
-
-  Self& operator--() {
-    Prev prev;
-    nt = prev(nt);
-    return *this;
-  }
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_CIRCULATOR_ON_NODE_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map.h
deleted file mode 100644
index 0f35785..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map.h
+++ /dev/null
@@ -1,3796 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_H
-#define CGAL_COMBINATORIAL_MAP_H 1
-
-#include <CGAL/Compact_container.h>
-#include <CGAL/internal/Combinatorial_map_utility.h>
-#include <CGAL/internal/Combinatorial_map_internal_functors.h>
-#include <CGAL/internal/Combinatorial_map_group_functors.h>
-#include <CGAL/internal/Combinatorial_map_copy_functors.h>
-#include <CGAL/internal/Combinatorial_map_sewable.h>
-#include <CGAL/Combinatorial_map_functors.h>
-#include <CGAL/Combinatorial_map_min_items.h>
-#include <CGAL/Dart_const_iterators.h>
-#include <CGAL/Cell_const_iterators.h>
-#include <CGAL/Combinatorial_map_basic_operations.h>
-#include <CGAL/Combinatorial_map_storages.h>
-#include <CGAL/Unique_hash_map.h>
-#include <bitset>
-#include <vector>
-#include <deque>
-
-#include <boost/type_traits/is_same.hpp>
-
-#include <CGAL/config.h>
-
-namespace CGAL {
-
-  /** @file Combinatorial_map.h
-   * Definition of generic dD Combinatorial map.
-   */
-
-  /** Generic definition of combinatorial map in dD.
-   * The Combinatorial_map class describes an dD combinatorial map. It allows
-   * mainly to create darts, to use marks onto these darts, to get and set
-   * the beta links, and to manage enabled attributes.
-   */
-  template < unsigned int d_, class Refs,
-             class Items_=Combinatorial_map_min_items<d_>,
-             class Alloc_=CGAL_ALLOCATOR(int),
-             class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_> >
-  class Combinatorial_map_base: public Storage_
-  {
-    template<typename CMap,unsigned int i,typename Enabled>
-    friend struct CGAL::internal::Call_merge_functor;
-    template<typename CMap,unsigned int i,typename Enabled>
-    friend struct CGAL::internal::Call_split_functor;
-    template<class Map, unsigned int i, unsigned int nmi>
-    friend struct Remove_cell_functor;
-    template<class Map, unsigned int i>
-    friend struct Contract_cell_functor;
-    template <typename CMap, typename Attrib>
-    friend struct internal::Reverse_orientation_of_map_functor;
-    template <typename CMap, typename Attrib>
-    friend struct internal::Reverse_orientation_of_connected_component_functor;
-    template<typename CMap>
-    friend struct internal::Init_attribute_functor;
-
-  public:
-    template < unsigned int A, class B, class I, class D, class S >
-    friend class Combinatorial_map_base;
-
-    /// Types definition
-    typedef Storage_                                                    Storage;
-    typedef Storage                                                     Base;
-    typedef Combinatorial_map_base<d_, Refs, Items_, Alloc_, Storage_ > Self;
-
-    typedef typename Base::Dart Dart;
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Dart_const_handle Dart_const_handle;
-    typedef typename Base::Dart_container Dart_container;
-    typedef typename Base::Dart_wrapper Dart_wrapper;
-    typedef typename Base::size_type size_type;
-    typedef typename Base::Helper Helper;
-    typedef typename Base::Attributes Attributes;
-    typedef typename Base::Items Items;
-    typedef typename Base::Alloc Alloc;
-    typedef typename Base::Use_index Use_index;
-
-    static const size_type NB_MARKS = Base::NB_MARKS;
-    static const unsigned int dimension = Base::dimension;
-
-    typedef typename Base::Null_handle_type Null_handle_type;
-    static Null_handle_type null_handle;
-
-    using Base::null_dart_handle;
-    using Base::mdarts;
-    using Base::get_beta;
-    using Base::is_free;
-    using Base::set_dart_mark;
-    using Base::get_dart_mark;
-    using Base::flip_dart_mark;
-    using Base::set_dart_marks;
-    using Base::get_dart_marks;
-    using Base::dart_link_beta;
-    using Base::dart_unlink_beta;
-    using Base::attribute;
-    using Base::mattribute_containers;
-    using Base::get_attribute;
-    using Base::dart_of_attribute;
-    using Base::set_dart_of_attribute;
-    using Base::info_of_attribute;
-    using Base::info;
-    using Base::dart;
-
-    /// Typedef for Dart_range, a range through all the darts of the map.
-    typedef Dart_container       Dart_range;
-    typedef const Dart_container Dart_const_range;
-
-    /// Typedef for attributes
-    template<int i>
-    struct Attribute_type: public Base::template Attribute_type<i>
-    {};
-    template<int i>
-    struct Attribute_handle: public Base::template Attribute_handle<i>
-    {};
-    template<int i>
-    struct Attribute_const_handle:
-      public Base::template Attribute_const_handle<i>
-    {};
-    template<int i>
-    struct Attribute_range: public Base::template Attribute_range<i>
-    {};
-    template<int i>
-    struct Attribute_const_range:
-      public Base::template Attribute_const_range<i>
-    {};
-
-  public:
-    /** Default Combinatorial_map constructor.
-     * The map is empty.
-     */
-    Combinatorial_map_base()
-    {
-      CGAL_static_assertion_msg(Dart::dimension==dimension,
-                  "Dimension of dart different from dimension of map");
-
-      CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1,
-                  "Too many attributes in the tuple Attributes_enabled");
-      this->init_storage();
-
-      this->mnb_used_marks = 0;
-      this->mmask_marks.reset();
-
-      for ( size_type i = 0; i < NB_MARKS; ++i)
-      {
-        this->mfree_marks_stack[i]        = (int)i;
-        this->mindex_marks[i]             = i;
-        this->mnb_marked_darts[i]         = 0;
-        this->mnb_times_reserved_marks[i] = 0;
-      }
-
-      this->automatic_attributes_management = true;
-
-      init_dart(null_dart_handle);
-
-      CGAL_assertion(number_of_darts()==0);
-    }
-
-    /** Copy the given combinatorial map into *this.
-     *  Note that both CMap can have different dimensions and/or non void attributes.
-     *  @param amap the combinatorial map to copy.
-     *  @post *this is valid.
-     */
-    template <typename CMap2, typename Converters, typename Pointconverter>
-    void copy(const CMap2& amap, const Converters& converters,
-              const Pointconverter& pointconverter)
-    {
-      this->clear();
-
-      this->mnb_used_marks = amap.mnb_used_marks;
-      this->mmask_marks    = amap.mmask_marks;
-
-      for (size_type i = 0; i < NB_MARKS; ++i)
-      {
-        this->mfree_marks_stack[i]        = amap.mfree_marks_stack[i];
-        this->mindex_marks[i]             = amap.mindex_marks[i];
-        this->mnb_marked_darts[i]         = amap.mnb_marked_darts[i];
-        this->mnb_times_reserved_marks[i] = amap.mnb_times_reserved_marks[i];
-      }
-
-      init_dart(null_dart_handle, amap.get_marks(amap.null_dart_handle));
-
-      // Create an mapping between darts of the two maps (originals->copies).
-      // TODO: replace the std::map by a boost::unordered_map
-      // (here we cannot use CGAL::Unique_hash_map because it does not provide
-      // iterators...
-      std::map<typename CMap2::Dart_const_handle, Dart_handle> dartmap;
-
-      for (typename CMap2::Dart_const_range::const_iterator
-             it=amap.darts().begin(), itend=amap.darts().end();
-           it!=itend; ++it)
-      {
-        dartmap[it]=mdarts.emplace();
-        init_dart(dartmap[it], amap.get_marks(it));
-      }
-
-      unsigned int min_dim=(dimension<amap.dimension?dimension:amap.dimension);
-
-      typename std::map<typename CMap2::Dart_const_handle,Dart_handle>
-        ::iterator dartmap_iter, dartmap_iter_end=dartmap.end();
-      for (dartmap_iter=dartmap.begin(); dartmap_iter!=dartmap_iter_end;
-           ++dartmap_iter)
-      {
-        for (unsigned int i=0; i<=min_dim; i++)
-        {
-          if (!amap.is_free(dartmap_iter->first,i) &&
-              (dartmap_iter->first)<(amap.beta(dartmap_iter->first,i)))
-          {
-            basic_link_beta(dartmap_iter->second,
-                            dartmap[amap.beta(dartmap_iter->first,i)], i);
-          }
-        }
-      }
-
-      /** Copy attributes */
-      for (dartmap_iter=dartmap.begin(); dartmap_iter!=dartmap_iter_end;
-           ++dartmap_iter)
-      {
-        Helper::template Foreach_enabled_attributes
-          < internal::Copy_attributes_functor <CMap2, Refs, Converters,
-            Pointconverter> >::
-          run(&amap, static_cast<Refs*>(this),
-              dartmap_iter->first, dartmap_iter->second,
-              converters, pointconverter);
-      }
-
-      CGAL_assertion (is_valid () == 1);
-    }
-
-    template <typename CMap2>
-    void copy(const CMap2& amap)
-    {
-      CGAL::cpp11::tuple<> converters;
-      Default_converter_cmap_0attributes_with_point<CMap2, Refs> pointconverter;
-      return copy< CMap2, CGAL::cpp11::tuple<>,
-          Default_converter_cmap_0attributes_with_point<CMap2, Refs> >
-          (amap, converters, pointconverter);
-    }
-
-    template <typename CMap2, typename Converters>
-    void copy(const CMap2& amap, const Converters& converters)
-    {
-      Default_converter_cmap_0attributes_with_point<CMap2, Refs> pointconverter;
-      return copy< CMap2, Converters,
-          Default_converter_cmap_0attributes_with_point<CMap2, Refs> >
-          (amap, converters, pointconverter);
-    }
-
-    // Copy constructor from a map having exactly the same type.
-    Combinatorial_map_base (const Self & amap)
-    { copy<Self>(amap); }
-
-    // "Copy constructor" from a map having different type.
-    template <typename CMap2>
-    Combinatorial_map_base(const CMap2& amap)
-    { copy<CMap2>(amap); }
-
-    // "Copy constructor" from a map having different type.
-    template <typename CMap2, typename Converters>
-    Combinatorial_map_base(const CMap2& amap, Converters& converters)
-    { copy<CMap2,Converters>(amap, converters); }
-
-    // "Copy constructor" from a map having different type.
-    template <typename CMap2, typename Converters, typename Pointconverter>
-    Combinatorial_map_base(const CMap2& amap, Converters& converters,
-                           const Pointconverter& pointconverter)
-    { copy<CMap2,Converters, Pointconverter>
-          (amap, converters, pointconverter); }
-
-    /** Affectation operation. Copies one map to the other.
-     * @param amap a combinatorial map.
-     * @return A copy of that combinatorial map.
-     */
-    Self & operator= (const Self & amap)
-    {
-      if (this!=&amap)
-      {
-        Self tmp(amap);
-        this->swap(tmp);
-      }
-      return *this;
-    }
-
-    /** Swap this combinatorial map with amap, a second combinatorial map.
-     * Note that the two maps have exactly the same type.
-     * @param amap a combinatorial map.
-     */
-    void swap(Self & amap)
-    {
-      if (this!=&amap)
-      {
-        amap.mdarts.swap(mdarts);
-
-        std::swap_ranges(mnb_times_reserved_marks,
-                         mnb_times_reserved_marks+NB_MARKS,
-                         amap.mnb_times_reserved_marks);
-        std::swap(mmask_marks,amap.mmask_marks);
-        std::swap(mnb_used_marks, amap.mnb_used_marks);
-        std::swap_ranges(mindex_marks,mindex_marks+NB_MARKS,
-                         amap.mindex_marks);
-        std::swap_ranges(mfree_marks_stack, mfree_marks_stack+NB_MARKS,
-                         amap.mfree_marks_stack);
-        std::swap_ranges(mused_marks_stack,mused_marks_stack+NB_MARKS,
-                         amap.mused_marks_stack);
-        std::swap_ranges(mnb_marked_darts,mnb_marked_darts+NB_MARKS,
-                         amap.mnb_marked_darts);
-        mattribute_containers.swap(amap.mattribute_containers);
-#ifndef CGAL_CMAP_DEPRECATED
-        std::swap(null_dart_handle, amap.null_dart_handle);
-        this->mnull_dart_container.swap(amap.mnull_dart_container);
-#endif // CGAL_CMAP_DEPRECATED
-      }
-    }
-
-    /** Clear the combinatorial map. Remove all darts and all attributes.
-     *  Note that reserved marks are not free.
-     */
-    void clear()
-    {
-      mdarts.clear();
-      for ( unsigned int i = 0; i < NB_MARKS; ++i)
-        this->mnb_marked_darts[i]  = 0;
-
-      internal::Clear_all::run(mattribute_containers);
-      this->init_storage();
-      init_dart(null_dart_handle);
-    }
-
-    /** Test if the map is empty.
-     *  @return true iff the map is empty.
-     */
-    bool is_empty() const
-    { return mdarts.empty(); }
-
-    /** Create a new dart and add it to the map.
-     * The marks of the darts are initialised with mmask_marks, i.e. the dart
-     * is unmarked for all the marks.
-     * @return a Dart_handle on the new dart.
-     */
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    template < typename... Args >
-    Dart_handle create_dart(const Args&... args)
-    {
-      Dart_handle res=mdarts.emplace(args...);
-      init_dart(res);
-      return res;
-    }
-#else
-    Dart_handle create_dart()
-    {
-      Dart_handle res=mdarts.emplace();
-      init_dart(res);
-      return res;
-    }
-    template < typename T1 >
-    Dart_handle create_dart(const T1 &t1)
-    {
-      Dart_handle res=mdarts.emplace(t1);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4, typename T5 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4, const T5 &t5)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4, typename T5,
-               typename T6 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4, const T5 &t5, const T6 &t6)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4, typename T5,
-               typename T6, typename T7 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4, const T5 &t5, const T6 &t6,
-                            const T7 &t7)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4, typename T5,
-               typename T6, typename T7, typename T8 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4, const T5 &t5, const T6 &t6,
-                            const T7 &t7, const T8 &t8)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8);
-      init_dart(res);
-      return res;
-    }
-    template < typename T1, typename T2, typename T3, typename T4, typename T5,
-               typename T6, typename T7, typename T8, typename T9 >
-    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
-                            const T4 &t4, const T5 &t5, const T6 &t6,
-                            const T7 &t7, const T8 &t8, const T9 &t9)
-    {
-      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9);
-      init_dart(res);
-      return res;
-    }
-#endif
-
-    /** Erase a dart from the list of darts.
-     * @param adart the dart to erase.
-     */
-    void erase_dart(Dart_handle adart)
-    {
-      // 1) We update the number of marked darts.
-      for ( unsigned int i = 0; i < mnb_used_marks; ++i)
-      {
-        if (is_marked(adart, mused_marks_stack[i]))
-          --mnb_marked_darts[mused_marks_stack[i]];
-      }
-
-      // 2) We update the attribute_ref_counting.
-      Helper::template Foreach_enabled_attributes
-        <internal::Decrease_attribute_functor<Self> >::run(this,adart);
-
-      // 3) We erase the dart.
-      mdarts.erase(adart);
-    }
-
-    /// @return a Dart_range (range through all the darts of the map).
-    Dart_range& darts()             { return mdarts;}
-    Dart_const_range& darts() const { return mdarts; }
-
-    /** Get the first dart of this map.
-     * @return the first dart.
-     */
-    Dart_handle first_dart()
-    {
-      if (darts().begin() == darts().end()) return null_handle;
-      return mdarts.begin();
-    }
-    Dart_const_handle first_dart() const
-    {
-      if (darts().begin() == darts().end()) return null_handle;
-      return mdarts.begin();
-    }
-
-    /// @return the Dart_handle corresponding to the given dart.
-    Dart_handle dart_handle(Dart& adart)
-    { return mdarts.iterator_to(adart); }
-    Dart_const_handle dart_handle(const Dart& adart) const
-    { return mdarts.iterator_to(adart); }
-
-    /** Return the highest dimension for which dh is not free.
-     * @param dh a dart handle
-     * @return the dimension d such that dh is not d-free but k-free for
-     *         all k>d. -1 if the dart is free for all d in {0..n}
-     */
-    int highest_nonfree_dimension(Dart_const_handle dh) const
-    {
-      for (int i=(int)dimension; i>=0; --i)
-      { if ( !is_free(dh, i) ) return i; }
-      return -1;
-    }
-
-    /** Return a dart belonging to the same edge and to the second vertex
-     * of the current edge (NULL if such a dart does not exist).
-     * @return An handle to the opposite dart.
-     */
-    Dart_handle opposite(Dart_handle dh)
-    {
-      for (unsigned int i = 2; i <= dimension; ++i)
-        if (!is_free(dh, i)) return beta(dh, i);
-      return null_handle;
-    }
-    Dart_const_handle opposite(Dart_const_handle dh) const
-    {
-      for (unsigned int i = 2; i <= dimension; ++i)
-        if (!is_free(dh, i)) return beta(dh, i);
-      return null_handle;
-    }
-
-    /** Return a dart incident to the other extremity of the current edge,
-     *  but contrary to opposite, non necessary to the same edge
-     *  (NULL if such a dart does not exist).
-     * @return An handle to the opposite dart.
-     */
-    Dart_handle other_extremity(Dart_handle dh)
-    {
-      for (unsigned int i = 1; i <= dimension; ++i)
-        if (!is_free(dh, i)) return beta(dh, i);
-      return null_handle;
-    }
-    Dart_const_handle other_extremity(Dart_const_handle dh) const
-    {
-      for (unsigned int i = 1; i <= dimension; ++i)
-        if (!is_free(dh, i)) return beta(dh, i);
-      return null_handle;
-    }
-
-    // Set the handle on the i th attribute
-    template<unsigned int i>
-    void set_dart_attribute(Dart_handle dh,
-                            typename Attribute_handle<i>::type ah)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                     "set_dart_attribute<i> called but i-attributes are disabled.");
-
-      if ( this->template attribute<i>(dh)==ah ) return;
-
-      if ( this->template attribute<i>(dh)!=null_handle )
-      {
-        this->template get_attribute<i>(this->template attribute<i>(dh)).
-          dec_nb_refs();
-        if ( this->template get_attribute<i>(this->template attribute<i>(dh)).
-             get_nb_refs()==0 )
-          this->template erase_attribute<i>(this->template attribute<i>(dh));
-      }
-
-      this->template basic_set_dart_attribute<i>(dh, ah);
-
-      if ( ah!=null_handle )
-      {
-        this->template set_dart_of_attribute<i>(ah, dh);
-        this->template get_attribute<i>(ah).inc_nb_refs();
-      }
-    }
-
-  protected:
-    /// Marks can be modified even for const handle; otherwise it is not
-    /// possible to iterate through const combinatorial maps.
-
-    // Initialize a given dart: all beta to null_dart_handle and all
-    // attributes to null, all marks unmarked.
-    void init_dart(Dart_handle adart)
-    {
-      set_dart_marks(adart, mmask_marks);
-
-      for (unsigned int i = 0; i <= dimension; ++i)
-        dart_unlink_beta(adart, i);
-
-      Helper::template Foreach_enabled_attributes
-          <internal::Init_attribute_functor<Self> >::run(this, adart);
-    }
-    // Initialize a given dart: all beta to null_dart_handle and all
-    // attributes to null, marks are given.
-    void init_dart(Dart_handle adart,
-                   const std::bitset<NB_MARKS>& amarks)
-    {
-      set_marks(adart, amarks);
-
-      for (unsigned int i = 0; i <= dimension; ++i)
-        dart_unlink_beta(adart, i);
-
-      Helper::template Foreach_enabled_attributes
-          <internal::Init_attribute_functor<Self> >::run(this, adart);
-    }
-
-  public:
-
-    /// @return the betas of ADart (beta are used in the same order than
-    ///         they are given as parameters)
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    template<typename ...Betas>
-    Dart_handle beta(Dart_handle ADart, Betas... betas)
-    { return CGAL::internal::Beta_functor<Self, Dart_handle, Betas...>::
-        run(this, ADart, betas...); }
-    template<typename ...Betas>
-    Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const
-    { return CGAL::internal::Beta_functor<const Self, Dart_const_handle, Betas...>::
-        run(this, ADart, betas...); }
-    template<int... Betas>
-    Dart_handle beta(Dart_handle ADart)
-    { return CGAL::internal::Beta_functor_static<Self, Dart_handle, Betas...>::
-        run(this, ADart); }
-    template<int... Betas>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return CGAL::internal::Beta_functor_static<const Self, Dart_const_handle, Betas...>::
-        run(this, ADart); }
-#else
-    Dart_handle beta(Dart_handle ADart, int B1)
-    { return this->get_beta(ADart, B1); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2)
-    { return beta(beta(ADart, B1), B2); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3)
-    { return beta(beta(ADart, B1), B2, B3); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4)
-    { return beta(beta(ADart, B1), B2, B3, B4); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5)
-    { return beta(beta(ADart, B1), B2, B3, B4, B5); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6)
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7)
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7, int B8)
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); }
-    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7, int B8, int B9)
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); }
-
-    template<int B1>
-    Dart_handle beta(Dart_handle ADart)
-    { return this->template get_beta<B1>(ADart); }
-    template<int B1, int B2>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4, B5>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4, B5, B6>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-             int B7>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4, B5, B6, B7>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-             int B7, int B8>
-    Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4, B5, B6, B7, B8>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-             int B7, int B8, int B9>
-     Dart_handle beta(Dart_handle ADart)
-    { return beta<B2, B3, B4, B5, B6, B7, B8, B9>(beta<B1>(ADart)); }
-
-    Dart_const_handle beta(Dart_const_handle ADart, int B1) const
-    { return this->get_beta(ADart, B1); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2) const
-    { return beta(beta(ADart, B1), B2); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3) const
-    { return beta(beta(ADart, B1), B2, B3); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4) const
-    { return beta(beta(ADart, B1), B2, B3, B4); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5) const
-    { return beta(beta(ADart, B1), B2, B3, B4, B5); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6) const
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7) const
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7, int B8) const
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); }
-    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
-                           int B4, int B5, int B6, int B7, int B8, int B9) const
-    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); }
-
-    template<int B1>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return this->template get_beta<B1>(ADart); }
-    template<int B1, int B2>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4, B5>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4, B5, B6>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-              int B7>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4, B5, B6, B7>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-              int B7, int B8>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4, B5, B6, B7, B8>(beta<B1>(ADart)); }
-    template<int B1, int B2, int B3, int B4, int B5, int B6,
-              int B7, int B8, int B9>
-    Dart_const_handle beta(Dart_const_handle ADart) const
-    { return beta<B2, B3, B4, B5, B6, B7, B8, B9>(beta<B1>(ADart)); }
-#endif
-
-    /** Count the number of used marks.
-     * @return the number of used marks.
-     */
-    size_type number_of_used_marks() const
-    { return mnb_used_marks; }
-
-    /** Test if a given mark is reserved.
-     *  @return true iff the mark is reserved (ie in used).
-     */
-    bool is_reserved(int amark) const
-    {
-      CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      return (mnb_times_reserved_marks[(size_type)amark]!=0);
-    }
-
-    /**  Count the number of marked darts for a given mark.
-     * @param amark the mark index.
-     * @return the number of marked darts for amark.
-     */
-    size_type number_of_marked_darts(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      return mnb_marked_darts[(size_type)amark];
-    }
-
-    /**  Count the number of unmarked darts for a given mark.
-     * @param amark the mark index.
-     * @return the number of unmarked darts for amark.
-     */
-    size_type number_of_unmarked_darts(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      return number_of_darts() - number_of_marked_darts(amark);
-    }
-
-    /** Test if all the darts are unmarked for a given mark.
-     * @param amark the mark index.
-     * @return true iff all the darts are unmarked for amark.
-     */
-    bool is_whole_map_unmarked(int amark) const
-    { return number_of_marked_darts(amark) == 0; }
-
-    /** Test if all the darts are marked for a given mark.
-     * @param amark the mark index.
-     * @return true iff all the darts are marked for amark.
-     */
-    bool is_whole_map_marked(int amark) const
-    {  return number_of_marked_darts(amark) == number_of_darts(); }
-
-    /** Reserve a new mark.
-     * Get a new free mark and return its index.
-     * All the darts are unmarked for this mark.
-     * @return the index of the new mark.
-     * @pre mnb_used_marks < NB_MARKS
-     */
-    int get_new_mark() const
-    {
-      if (mnb_used_marks == NB_MARKS)
-      {
-        std::cerr << "Not enough Boolean marks: "
-          "increase NB_MARKS in item class." << std::endl;
-        return -1;
-      }
-
-      int m = mfree_marks_stack[mnb_used_marks];
-      mused_marks_stack[mnb_used_marks] = m;
-
-      mindex_marks[m] = mnb_used_marks;
-      mnb_times_reserved_marks[m]=1;
-
-      ++mnb_used_marks;
-      CGAL_assertion(is_whole_map_unmarked(m));
-
-      return m;
-    }
-
-    /** Increase the number of times a mark is reserved.
-     *  @param amark the mark to share.
-     */
-    void share_a_mark(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      ++mnb_times_reserved_marks[(size_type)amark];
-    }
-
-    /** @return the number of times a mark is reserved.
-     *  @param amark the mark to share.
-     */
-    size_type get_number_of_times_mark_reserved(int amark) const
-    {
-      CGAL_assertion( (size_type)amark<NB_MARKS );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      return mnb_times_reserved_marks[amark];
-    }
-
-    /** Negate the mark of all the darts for a given mark.
-     * After this call, all the marked darts become unmarked and all the
-     * unmarked darts become marked (in constant time operation).
-     * @param amark the mark index
-     */
-    void negate_mark(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      mnb_marked_darts[amark] = number_of_darts() - mnb_marked_darts[amark];
-
-      mmask_marks.flip((size_type)amark);
-    }
-
-    /** Test if a given dart is marked for a given mark.
-     * @param adart the dart to test.
-     * @param amark the given mark.
-     * @return true iff adart is marked for the mark amark.
-     */
-    bool is_marked(Dart_const_handle adart, int amark) const
-    {
-      // CGAL_assertion( adart != null_dart_handle );
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      return get_dart_mark(adart, amark)!=mmask_marks[(size_type)amark];
-    }
-
-    /** Set the mark of a given dart to a state (on or off).
-     * @param adart the dart.
-     * @param amark the given mark.
-     * @param astate the state of the mark (on or off).
-     */
-    void set_mark_to(Dart_const_handle adart, int amark,
-                     bool astate) const
-    {
-      CGAL_assertion( adart != null_dart_handle );
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      if (is_marked(adart, amark) != astate)
-      {
-        if (astate) ++mnb_marked_darts[(size_type)amark];
-        else --mnb_marked_darts[(size_type)amark];
-
-        flip_dart_mark(adart, amark);
-      }
-    }
-
-    /** Mark the given dart.
-     * @param adart the dart.
-     * @param amark the given mark.
-     */
-    void mark(Dart_const_handle adart, int amark) const
-    {
-      CGAL_assertion( adart != null_dart_handle );
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      if (is_marked(adart, amark)) return;
-
-      ++mnb_marked_darts[(size_type)amark];
-      flip_dart_mark(adart, amark);
-    }
-
-    /** Unmark the given dart.
-     * @param adart the dart.
-     * @param amark the given mark.
-     */
-    void unmark(Dart_const_handle adart, int amark) const
-    {
-      CGAL_assertion( adart != null_dart_handle );
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      if (!is_marked(adart, amark)) return;
-
-      --mnb_marked_darts[(size_type)amark];
-      flip_dart_mark(adart, amark);
-    }
-
-    /** Mark null_dart (used as a sentinel in iterators).
-     * As null dart does not belong to the set of darts, it is not counted
-     * as number of marked darts.
-     * @param amark the given mark.
-     */
-    void mark_null_dart(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-#ifdef CGAL_CMAP_DEPRECATED
-      if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-        set_dart_mark(null_dart_handle, amark, !mmask_marks[(size_type)amark]);
-    }
-
-    /** Unmark null_dart.
-     * @param amark the given mark.
-     */
-    void unmark_null_dart(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-#ifdef CGAL_CMAP_DEPRECATED
-      if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-        set_dart_mark(null_dart_handle, amark, mmask_marks[(size_type)amark]);
-    }
-
-    /** Unmark all the darts of the map for a given mark.
-     * If all the darts are marked or unmarked, this operation takes O(1)
-     * operations, otherwise it traverses all the darts of the map.
-     * @param amark the given mark.
-     */
-    void unmark_all(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-
-      if ( is_whole_map_marked(amark) )
-      {
-        negate_mark(amark);
-      }
-      else if ( !is_whole_map_unmarked(amark) )
-      {
-        for ( typename Dart_range::const_iterator it(darts().begin()),
-               itend(darts().end()); it!=itend; ++it)
-          unmark(it, amark);
-      }
-      CGAL_assertion(is_whole_map_unmarked(amark));
-      unmark_null_dart(amark);
-    }
-
-    /** Free a given mark, previously calling unmark_all_darts.
-     * @param amark the given mark.
-     */
-    void free_mark(int amark) const
-    {
-      CGAL_assertion( is_reserved(amark) );
-      CGAL_assume( (size_type)amark<NB_MARKS );
-
-      if ( mnb_times_reserved_marks[amark]>1 )
-      {
-        --mnb_times_reserved_marks[amark];
-        return;
-      }
-
-      unmark_all(amark);
-
-      // 1) We remove amark from the array mused_marks_stack by
-      //    replacing it with the last mark in this array.
-      mused_marks_stack[mindex_marks[(size_type)amark]] =
-        mused_marks_stack[--mnb_used_marks];
-      mindex_marks[mused_marks_stack[mnb_used_marks]] =
-        mindex_marks[(size_type)amark];
-
-      // 2) We add amark in the array mfree_marks_stack and update its index.
-      mfree_marks_stack[ mnb_used_marks ] = amark;
-      mindex_marks[(size_type)amark] = mnb_used_marks;
-
-      mnb_times_reserved_marks[amark]=0;
-    }
-
-    /** Test if this map is without boundary for a given dimension.
-     * @param i the dimension.
-     * @return true iff all the darts are not i-free.
-     * @pre 1<=i<=n
-     */
-    bool is_without_boundary(unsigned int i) const
-    {
-      CGAL_assertion(1<=i && i<=dimension);
-      for ( typename Dart_const_range::const_iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; ++it)
-        if (is_free(it, i)) return false;
-      return true;
-    }
-
-    /** Test if this map is without boundary for all the dimensions.
-     * @return true iff all the darts are non free.
-     */
-    bool is_without_boundary() const
-    {
-      for ( typename Dart_const_range::const_iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; ++it)
-        for ( unsigned int i = 1; i<=dimension; ++i)
-          if (is_free(it, i)) return false;
-      return true;
-    }
-
-    /** Close the combinatorial map for a given dimension.
-     *  @param i the dimension to close
-     *  @return the number of new darts.
-     *  @pre 2<=i<=n (TODO case i==1)
-     *  @TODO move into Combinatorial_map_operations ?
-     */
-    template<unsigned int i>
-    unsigned int close()
-    {
-      CGAL_assertion( 2<=i && i<=dimension );
-      unsigned int res = 0;
-      Dart_handle d, d2;
-
-      for ( typename Dart_range::iterator it(darts().begin());
-           it!=darts().end(); ++it)
-      {
-        if ( this->template is_free<i>(it) )
-        {
-          d = create_dart();
-          ++res;
-
-          link_beta_for_involution<i>(it, d);
-
-          // Special cases for 0 and 1
-          if ( !this->template is_free<1>(it) && !this->template is_free<i>(beta<1>(it)) )
-            link_beta<1>(beta<1,i>(it),d);
-          if ( !this->template is_free<0>(it) && !this->template is_free<i>(beta<0>(it)) )
-            link_beta<0>(beta<0,i>(it),d);
-          // General case for 2...dimension
-          for ( unsigned int j=2; j<=dimension; ++j)
-          {
-            if ( j+1!=i && j!=i && j!=i+1 &&
-                 !is_free(it,j) && !this->template is_free<i>(beta(it, j)) )
-            {
-              basic_link_beta_for_involution(beta(it, j, i), d, j);
-            }
-          }
-
-          d2 = it;
-          while (d2 != null_dart_handle && !this->template is_free<i-1>(d2))
-          { d2 = beta<i-1, i>(d2); }
-          if (d2 != null_dart_handle)
-          {
-            if (i==2) basic_link_beta<1>(d2, d);
-            else basic_link_beta_for_involution<i-1>(d2, d);
-          }
-        }
-      }
-      return res;
-    }
-
-    /** Test if the map is valid.
-     * @return true iff the map is valid.
-     */
-    bool is_valid() const
-    {
-      bool valid = true;
-      unsigned int i = 0, j = 0;
-      std::vector<int> marks(dimension+1);
-      for ( i=0; i<=dimension; ++i)
-        marks[i] = -1;
-
-      Helper::template
-        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
-          run(this,&marks);
-
-      for ( typename Dart_range::const_iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; ++it)
-      {
-        if ( !valid )
-        { // We continue the traversal to mark all the darts.
-          for ( i=0; i<=dimension; ++i)
-            if (marks[i]!=-1) mark(it,marks[i]);
-        }
-        else
-        {
-          // beta0 must be the inverse of beta1
-          if ((!is_free(it, 0) && beta(it, 0, 1)!=it) ||
-              (!is_free(it, 1) && beta(it, 1, 0)!=it ))
-          {
-            std::cerr << "Map not valid: beta(0) "
-              "is not the inverse of beta(1) for "
-                      <<&(*it) << std::endl;
-            valid = false;
-          }
-
-          // Each beta(i>=2) must be an involution
-          for ( i = 2; i <= dimension; ++i)
-            if (!is_free(it, i) && beta(it, i, i)!=it)
-            {
-              std::cerr << "Map not valid: beta(" << i
-                        << ") is not an involution for "
-                        <<&(*it) << std::endl;
-              valid = false;
-            }
-
-          // beta1 o betai and beta0 o betai (i>=3) must be involutions
-          if (!is_free(it, 0))
-          {
-            for ( i = 3; i <= dimension; ++i)
-              if ((is_free(it, i) != is_free(beta(it, 0), i)) ||
-                  (!is_free(it, i) && beta(it, 0, i)!=beta(it, i, 1)))
-              {
-                std::cerr << "Map not valid: beta(0) o beta(" << i
-                          << ") is not an involution for "
-                          <<&(*it) << std::endl;
-                valid = false;
-              }
-          }
-          if (!is_free(it, 1))
-          {
-            for ( i = 3; i <= dimension; ++i)
-              if ((is_free(it, i) != is_free(beta(it, 1), i)) ||
-                  (!is_free(it, i) && beta(it, 1, i)!=beta(it, i, 0)))
-              {
-                std::cerr << "Map not valid: beta(1) o beta(" << i
-                          << ") is not an involution for "
-                          <<&(*it)<< std::endl;
-                valid = false;
-              }
-          }
-
-          // beta(i>=2) o beta(j>=i+2) must be an involution
-          for ( i = 2; i <= dimension; ++i)
-          {
-            if (!is_free(it, i))
-            {
-              for ( j = i + 2; j <= dimension; ++j)
-                if ((is_free(it, j)!=is_free(beta(it, i), j)) ||
-                    (!is_free(it, j) && beta(it, i, j)!=beta(it, j, i)))
-                {
-                  std::cerr << "Map not valid: beta(" << i
-                            << ") o beta(" << j
-                            << ") is not an involution for "
-                            << &(*it)<< std::endl;
-                  valid = false;
-                }
-            }
-          }
-          Helper::template Foreach_enabled_attributes
-            <internal::Test_is_valid_attribute_functor<Self> >::
-            run(this,it,&marks,&valid);
-        }
-      }
-      for ( i=0; i<=dimension; ++i)
-        if ( marks[i]!=-1 )
-        {
-          CGAL_assertion( is_whole_map_marked(marks[i]) );
-          free_mark(marks[i]);
-        }
-
-      return valid;
-    }
-
-    /// correct invalid attributes in the map
-    void correct_invalid_attributes()
-    {
-      std::vector<int> marks(dimension+1);
-      for ( unsigned int i=0; i<=dimension; ++i)
-        marks[i] = -1;
-
-      Helper::template
-        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
-          run(this,&marks);
-
-      for ( typename Dart_range::iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; ++it)
-      {
-        Helper::template Foreach_enabled_attributes
-          <internal::Correct_invalid_attributes_functor<Self> >::
-          run(this,it,&marks);
-      }
-
-      for ( unsigned int i=0; i<=dimension; ++i)
-        if ( marks[i]!=-1 )
-        {
-          CGAL_assertion( is_whole_map_marked(marks[i]) );
-          free_mark(marks[i]);
-        }
-    }
-
-    /// @return the number of darts.
-    size_type number_of_darts() const
-    { return mdarts.size(); }
-
-    /// @return an estimation of the bytes used by the combinatorial map.
-    size_type bytes() const
-    {
-      return mdarts.capacity() * sizeof(Dart) +
-        internal::Count_bytes_all_attributes_functor<Self>::run(*this);
-    }
-
-    /** Write the content of the map: each dart and each beta links.
-     * @param os the ostream.
-     * @return the ostream.
-     */
-    std::ostream& display_darts(std::ostream & os, bool attribs=false) const
-    {
-      unsigned int nb = 0;
-      for ( typename Dart_range::const_iterator it=darts().begin();
-           it!=darts().end(); ++it)
-      {
-        os << " dart " << &(*it) << "; beta[i]=";
-        for ( unsigned int i=0; i<=dimension; ++i)
-        {
-          os << &(*it->beta(i)) << ",\t";
-          if (it->is_free(i)) os << "\t";
-        }
-        if ( attribs )
-        {
-          Helper::template Foreach_enabled_attributes
-              <Display_attribute_functor<Self> >::run(this, it);
-        }
-        os << std::endl;
-        ++nb;
-      }
-      os << "Number of darts: " << nb <<"(sizeofdarts="
-         <<number_of_darts()<<")" << std::endl;
-      return os;
-    }
-
-    /** Write the content of each given orbit of the map.
-     * @param aos the ostream.
-     * @return the ostream.
-     */
-    template < class Ite >
-    std::ostream& display_orbits(std::ostream & aos) const
-    {
-      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
-                              Tag_true>::value) );
-      unsigned int nb = 0;
-      int amark = get_new_mark();
-      for ( typename Dart_range::const_iterator it1(darts().begin()),
-             itend(darts().end()); it1!=itend; ++it1)
-      {
-        if ( !is_marked(it1, amark) )
-        {
-          ++nb;
-          for ( Ite it2(*this, it1, amark); it2.cont(); ++it2 )
-          {
-            aos << &(**it2) << " - " << std::flush;
-            mark(*it2, amark);
-          }
-          aos << std::endl;
-        }
-      }
-      CGAL_assertion( is_whole_map_marked(amark) );
-      free_mark(amark);
-      aos << "Number of orbits: " << nb << std::endl;
-      return aos;
-    }
-
-    /** Write the content of each i-cell of the map.
-     * @param aos the ostream.
-     * @return the ostream.
-     */
-    template < unsigned int i >
-    std::ostream& display_cells(std::ostream & aos) const
-    {
-      return display_orbits<CMap_dart_const_iterator_basic_of_cell<Self,i> >
-        (aos);
-    }
-
-    /** Write the number of darts and cells of the map into a given ostream.
-     * @param os the ostream.
-     * @return the ostream.
-     */
-    std::ostream& display_characteristics(std::ostream & os) const
-    {
-      std::vector<unsigned int> cells(dimension+2);
-      for ( unsigned int i=0; i<=dimension+1; ++i)
-      { cells[i]=i; }
-
-      std::vector<unsigned int> res = count_cells(cells);
-
-      os << "#Darts=" << number_of_darts();
-      for ( unsigned int i=0; i<=dimension; ++i)
-        os<<", #"<<i<<"-cells="<<res[i];
-      os<<", #ccs="<<res[dimension+1];
-
-      return os;
-    }
-
-    /// Create a new attribute.
-    /// @return a handle on the new attribute.
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    template<unsigned int i, typename ...Args>
-    typename Attribute_handle<i>::type create_attribute(const Args&... args)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-     typename Attribute_handle<i>::type res=
-       CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(args...);
-     // Reinitialize the ref counting of the new attribute. This is normally
-     // not required except if create_attribute is used as "copy contructor".
-     this->template get_attribute<i>(res).mrefcounting = 0;
-     return res;
-    }
-#else
-    template<unsigned int i>
-    typename Attribute_handle<i>::type
-    create_attribute()
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace();
-    }
-    template<unsigned int i, typename T1>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-     typename Attribute_handle<i>::type res=
-       CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1);
-     this->template get_attribute<i>(res).mrefcounting = 0;
-     return res;
-    }
-    template<unsigned int i, typename T1, typename T2>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
-             typename T5>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-                     const T5 &t5)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4, t5);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-                     const T5 &t5, const T6 &t6)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-                     const T5 &t5, const T6 &t6, const T7 &t7)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7, typename T8>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-                     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8);
-    }
-    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7, typename T8, typename T9>
-    typename Attribute_handle<i>::type
-    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-                     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8,
-                     const T9 &t9)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "create_attribute<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9);
-    }
-#endif
-
-    /// Erase an attribute.
-    /// @param h a handle to the attribute to erase.
-    template<unsigned int i>
-    void erase_attribute(typename Attribute_handle<i>::type h)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "erase_attribute<i> but i-attributes are disabled");
-      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).erase(h);
-    }
-
-    /// @return the number of attributes.
-    template <unsigned int i>
-    size_type number_of_attributes() const
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "number_of_attributes<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers).size();
-    }
-
-    /** Set the i th attribute of all the darts of a given i-cell.
-     * @param adart a dart of the i-cell.
-     * @param ah the vertex to set.
-     */
-    template<unsigned int i>
-    void set_attribute(Dart_handle dh,
-                       typename Attribute_handle<i>::type ah)
-    {
-      CGAL_static_assertion(i<=dimension);
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                  "set_attribute<i> but i-attributes are disabled");
-      for ( typename Dart_of_cell_range<i>::iterator it(*this, dh);
-            it.cont(); ++it)
-      {
-        this->template set_dart_attribute<i>(it, ah);
-      }
-    }
-
-    /// @return a Attributes_range<i> (range through all the
-    /// attributes<i> of the map).
-    template<unsigned int i>
-    typename Attribute_range<i>::type & attributes()
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                                "attributes<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers);
-    }
-
-    template<unsigned int i>
-    typename Attribute_const_range<i>::type & attributes() const
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                                "attributes<i> but i-attributes are disabled");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_containers);
-    }
-
-    // Get the ith dynamic onsplit functor (by reference so that we can
-    // modify it directly).
-    template<int i>
-    boost::function<void(typename Attribute_type<i>::type&,
-                         typename Attribute_type<i>::type&)>&
-    onsplit_functor()
-    {
-      CGAL_static_assertion_msg
-          (Helper::template Dimension_index<i>::value>=0,
-           "onsplit_functor<i> but "
-           "i-attributes are disabled");
-
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (m_onsplit_functors);
-    }
-
-    // Get the ith dynamic onsplit functor (by reference so that we can
-    // modify it directly).
-    template<int i>
-    const boost::function<void(typename Attribute_type<i>::type&,
-                               typename Attribute_type<i>::type&)>&
-    onsplit_functor() const
-    {
-      CGAL_static_assertion_msg
-          (Helper::template Dimension_index<i>::value>=0,
-           "onsplit_functor<i> but "
-           "i-attributes are disabled");
-
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (m_onsplit_functors);
-    }
-
-    // Get the ith dynamic onmerge functor (by reference so that we can
-    // modify it directly).
-    template<int i>
-    boost::function<void(typename Attribute_type<i>::type&,
-                               typename Attribute_type<i>::type&)>&
-    onmerge_functor()
-    {
-      CGAL_static_assertion_msg
-          (Helper::template Dimension_index<i>::value>=0,
-           "onsplit_functor<i> but "
-           "i-attributes are disabled");
-
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (m_onmerge_functors);
-    }
-    // Get the ith dynamic onmerge functor (by reference so that we can
-    // modify it directly).
-    template<int i>
-    const boost::function<void(typename Attribute_type<i>::type&,
-                               typename Attribute_type<i>::type&)>&
-    onmerge_functor() const
-    {
-      CGAL_static_assertion_msg
-          (Helper::template Dimension_index<i>::value>=0,
-           "onsplit_functor<i> but "
-           "i-attributes are disabled");
-
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (m_onmerge_functors);
-    }
-
-    /** Double link a dart with beta 0 to a second dart.
-     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
-     * with \em adart1. Attributes are not updated, thus we can obtain
-     * a non-valid map with darts belonging to a same orbit and having
-     * different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    void basic_link_beta_0(Dart_handle adart1, Dart_handle adart2)
-    {
-      this->template dart_link_beta<0>(adart1, adart2);
-      this->template dart_link_beta<1>(adart2, adart1);
-    }
-
-    /** Double link a dart with beta 0 to a second dart.
-     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
-     * with \em adart1. Attributes are not updated, thus we can obtain
-     * a non-valid map with darts belonging to a same orbit and having
-     * different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    void basic_link_beta_1(Dart_handle adart1, Dart_handle adart2)
-    {
-      this->template dart_link_beta<1>(adart1, adart2);
-      this->template dart_link_beta<0>(adart2, adart1);
-    }
-
-    /** Double link a dart with beta i to a second dart, when i>=2.
-     * \em adart1 is i-linked to \em adart2 and \em adart2 is i-linked
-     * with \em adart1. Attributes are not updated, thus we can obtain
-     * a non-valid map with darts belonging to a same orbit and having
-     * different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     * @param i the dimension of the beta.
-     */
-    template<unsigned int i>
-    void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( i>=2 && i<=dimension );
-      this->template dart_link_beta<i>(adart1, adart2);
-      this->template dart_link_beta<i>(adart2, adart1);
-    }
-    void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2,
-                                        unsigned int i)
-    {
-      CGAL_assertion( i>=2 && i<=dimension );
-      CGAL_assertion( i>=2 && i<=dimension );
-      dart_link_beta(adart1, adart2, i);
-      dart_link_beta(adart2, adart1, i);
-    }
-
-    /** Double link a dart with betai to a second dart.
-     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
-     * with \em adart1. Attributes are not updated, thus we can obtain
-     * a non-valid map with darts belonging to a same orbit and having
-     * different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    template<unsigned int i>
-    void basic_link_beta(Dart_handle adart1, Dart_handle adart2)
-    {
-      if ( i==0 ) basic_link_beta_0(adart1, adart2);
-      else if ( i==1 ) basic_link_beta_1(adart1, adart2);
-      else basic_link_beta_for_involution<i>(adart1, adart2);
-    }
-    void basic_link_beta(Dart_handle adart1, Dart_handle adart2,
-                         unsigned int i)
-    {
-      if ( i==0 ) basic_link_beta_0(adart1, adart2);
-      else if ( i==1 ) basic_link_beta_1(adart1, adart2);
-      else basic_link_beta_for_involution(adart1, adart2, i);
-    }
-
-    /** Double link two darts, and update the NULL attributes.
-     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
-     * with \em adart1. The NULL attributes of \em adart1 are updated to
-     * non NULL attributes associated to \em adart2, and vice-versa.
-     * If both darts have an attribute, the attribute of adart1 is
-     * associated to adart2.
-     * We can obtain a non-valid map with darts belonging to a same cell
-     * and having different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    void link_beta_0(Dart_handle adart1, Dart_handle adart2)
-    {
-      Helper::template Foreach_enabled_attributes_except
-        <internal::Group_attribute_functor_of_dart<Self, 0>, 1>::
-        run(this,adart1,adart2);
-      this->template dart_link_beta<0>(adart1, adart2);
-      this->template dart_link_beta<1>(adart2, adart1);
-    }
-
-    /** Double link two darts, and update the NULL attributes.
-     * \em adart1 is 1-linked to \em adart2 and \em adart2 is 0-linked
-     * with \em adart1. The NULL attributes of \em adart1 are updated to
-     * non NULL attributes associated to \em adart2, and vice-versa.
-     * If both darts have an attribute, the attribute of adart1 is
-     * associated to adart2.
-     * We can obtain a non-valid map with darts belonging to a same cell
-     * and having different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    void link_beta_1(Dart_handle adart1, Dart_handle adart2)
-    {
-      Helper::template Foreach_enabled_attributes_except
-        <internal::Group_attribute_functor_of_dart<Self, 1>, 1>::
-        run(this,adart1,adart2);
-      this->template dart_link_beta<1>(adart1, adart2);
-      this->template dart_link_beta<0>(adart2, adart1);
-    }
-
-    /** Double link two darts, and update the NULL attributes.
-     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
-     * with \em adart1. The NULL attributes of \em adart1 are updated to
-     * non NULL attributes associated to \em adart2, and vice-versa.
-     * If both darts have an attribute, the attribute of adart1 is
-     * associated to adart2.
-     * We can obtain a non-valid map with darts belonging to a same cell
-     * and having different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     * @param i the dimension of the beta.
-     * @pre 2<=i<=dimension.
-     */
-    template<unsigned int i>
-    void link_beta_for_involution(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( 2<=i && i<=dimension );
-      Helper::template Foreach_enabled_attributes_except
-        <internal::Group_attribute_functor_of_dart<Self, i>, i>::
-        run(this,adart1,adart2);
-      this->template dart_link_beta<i>(adart1, adart2);
-      this->template dart_link_beta<i>(adart2, adart1);
-    }
-
-    /** Double link two darts, and update the NULL attributes.
-     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
-     * with \em adart1. The NULL attributes of \em adart1 are updated to
-     * non NULL attributes associated to \em adart2, and vice-versa.
-     * If both darts have an attribute, the attribute of adart1 is
-     * associated to adart2.
-     * We can obtain a non-valid map with darts belonging to a same cell
-     * and having different attributes.
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     */
-    template<unsigned int i>
-    void link_beta(Dart_handle adart1, Dart_handle adart2)
-    {
-      if ( are_attributes_automatically_managed() )
-      {
-        if ( i==0 ) link_beta_0(adart1, adart2);
-        else if ( i==1 ) link_beta_1(adart1, adart2);
-        else link_beta_for_involution<i>(adart1, adart2);
-      }
-      else basic_link_beta<i>(adart1, adart2);
-    }
-
-    /** Double link a dart with betai to a second dart.
-     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
-     * with \em adart1. The NULL attributes of \em adart1 are updated to
-     * non NULL attributes associated to \em adart2, and vice-versa,
-     * if both darts have an attribute, the attribute of adart1 is
-     * associated to adart2 (only if update_attributes==true).
-     * @param adart1 a first dart.
-     * @param adart2 a second dart.
-     * @param update_attributes a boolean to update the enabled attributes.
-     *         (deprecated, now we use are_attributes_automatically_managed())
-     */
-    template<unsigned int i>
-    void link_beta(Dart_handle adart1, Dart_handle adart2,
-                   bool update_attributes)
-    {
-      if ( update_attributes ) link_beta<i>(adart1, adart2);
-      else basic_link_beta<i>(adart1, adart2);
-    }
-
-    /** Double unlink a dart with beta 0.
-     * beta0(\em adart) is 1-unlinked and \em adart is 0-unlinked.
-     * The attributes are not updated, thus we can obtain a non-valid map
-     * with darts belonging to different orbits and having the same
-     * attributes.
-     * @param adart a dart.
-     */
-    void unlink_beta_0(Dart_handle adart)
-    {
-      CGAL_assertion(!this->template is_free<0>(adart));
-      this->template dart_unlink_beta<1>(beta<0>(adart));
-      this->template dart_unlink_beta<0>(adart);
-    }
-
-    /** Double unlink a dart with beta 1.
-     * beta1(\em adart) is 0-unlinked and \em adart is 1-unlinked.
-     * The attributes are not updated, thus we can obtain a non-valid map
-     * with darts belonging to different orbits and having the same
-     * attributes.
-     * @param adart a dart.
-     */
-    void unlink_beta_1(Dart_handle adart)
-    {
-      CGAL_assertion(!this->template is_free<1>(adart));
-      this->template dart_unlink_beta<0>(beta<1>(adart));
-      this->template dart_unlink_beta<1>(adart);
-    }
-
-    /** Double unlink a dart with beta i, for i>=2.
-     * betai(\em adart) is i-unlinked and \em adart is i-unlinked.
-     * The attributes are not updated, thus we can obtain a non-valid map
-     * with darts belonging to different orbits and having the same
-     * attributes.
-     * @param adart a dart.
-     * @param i the dimension of the beta.
-     */
-    template<unsigned int i>
-    void unlink_beta_for_involution(Dart_handle adart)
-    {
-      CGAL_assertion(!this->template is_free<i>(adart));
-      CGAL_assertion(2<=i && i<=dimension);
-      this->template dart_unlink_beta<i>(beta<i>(adart));
-      this->template dart_unlink_beta<i>(adart);
-    }
-    void unlink_beta_for_involution(Dart_handle adart, unsigned int i)
-    {
-      CGAL_assertion(!is_free(adart,i));
-      CGAL_assertion(2<=i && i<=dimension);
-      dart_unlink_beta(beta(adart, i), i);
-      dart_unlink_beta(adart, i);
-    }
-
-    /** Double unlink a dart with beta i.
-     * betai(\em adart) is i-1-unlinked and \em adart is i-unlinked.
-     * The attributes are not updated, thus we can obtain a non-valid map
-     * with darts belonging to different orbits and having the same
-     * attributes.
-     * @param adart a dart.
-     * @param i the dimension of the beta.
-     */
-    template<unsigned int i>
-    void unlink_beta(Dart_handle adart)
-    {
-      if ( i==0 ) unlink_beta_0(adart);
-      else if ( i==1 ) unlink_beta_1(adart);
-      else unlink_beta_for_involution<i>(adart);
-    }
-    void unlink_beta(Dart_handle adart, unsigned int i)
-    {
-      if ( i==0 ) unlink_beta_0(adart);
-      else if ( i==1 ) unlink_beta_1(adart);
-      else unlink_beta_for_involution(adart, i);
-    }
-
-    /** Test if it is possible to sew by betai the two given darts
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @return true iff \em adart1 can be i-sewn with \em adart2.
-     */
-    template<unsigned int i>
-    bool is_sewable(Dart_const_handle adart1, Dart_const_handle adart2) const
-    {
-      return CGAL::internal::
-          Is_sewable_functor<Self, i>::run(this, adart1, adart2);
-    }
-
-    /** Topological sew by beta1 the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<1>(adart1, adart2).
-     */
-    void topo_sew_1(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( (is_sewable<1>(adart1,adart2)) );
-
-      if ( adart1==adart2 )
-      {
-        for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart1);
-              it.cont(); ++it )
-        {
-          basic_link_beta_1(it, it);
-        }
-      }
-      else
-      {
-        int m = get_new_mark();
-        std::deque<Dart_handle> dartv;
-        for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0>
-              it(*this, adart1, m); it.cont(); ++it )
-        {
-          mark(it,m);
-          dartv.push_back(it);
-        }
-
-        CGAL::CMap_dart_iterator_of_involution<Self,1>     I1(*this, adart1);
-        CGAL::CMap_dart_iterator_of_involution_inv<Self,1> I2(*this, adart2);
-        for ( ; I1.cont(); ++I1, ++I2 )
-        {
-          if ( is_marked(I1,m) ) basic_link_beta_1(I1, I2);
-          else                   basic_link_beta_0(I1, I2);
-        }
-
-        for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
-              it!=dartv.end(); ++it)
-        { unmark(*it,m); }
-        CGAL_assertion( is_whole_map_unmarked(m) );
-        free_mark(m);
-      }
-    }
-
-    /** Topological sew by beta0 two given darts plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<0>(adart1, adart2).
-     */
-    void topo_sew_0(Dart_handle adart1, Dart_handle adart2)
-    { topo_sew_1(adart2, adart1); }
-
-    /** Topological sew by betai two given darts plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre 2<=i<=dimension.
-     * @pre is_sewable<i>(adart1, adart2).
-     */
-    template<unsigned int i>
-    void topo_sew_for_involution(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( 2<=i && i<=Self::dimension );
-      CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
-
-      CGAL::CMap_dart_iterator_of_involution<Self,i>     I1(*this, adart1);
-      CGAL::CMap_dart_iterator_of_involution_inv<Self,i> I2(*this, adart2);
-      for ( ; I1.cont();  ++I1, ++I2 )
-      {
-        basic_link_beta_for_involution<i>(I1, I2);
-      }
-    }
-
-    /** Topological sew by betai two given darts plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<i>(adart1, adart2).
-     */
-    template<unsigned int i>
-    void topo_sew(Dart_handle adart1, Dart_handle adart2)
-    {
-      if ( i==0 ) topo_sew_1(adart2, adart1);
-      else if ( i==1 ) topo_sew_1(adart1, adart2);
-      else topo_sew_for_involution<i>(adart1, adart2);
-    }
-
-    /** Sew by beta0 the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity, and updates enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<0>(adart1, adart2).
-     * @post is_valid()
-     */
-    void sew_0(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( (is_sewable<0>(adart1,adart2)) );
-
-      if ( adart1==adart2 )
-      {
-        for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart1);
-              it.cont(); ++it )
-        {
-          basic_link_beta_1(it, it);
-        }
-        return;
-      }
-
-      int m = get_new_mark();
-      std::deque<Dart_handle> dartv;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
-            it(*this, adart1, m); it.cont(); ++it )
-      {
-        mark(it,m);
-        dartv.push_back(it);
-      }
-
-      int mark = get_new_mark();
-      CGAL_assertion( mark!=-1 );
-
-      CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
-          I1(*this, adart1, mark);
-      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, 1>
-          I2(*this, adart2, mark);
-
-      // This first loop do not modify the map, but only the attributes
-      // (by calling when required the onmerge functors).
-      for ( ; I1.cont(); ++I1, ++I2 )
-      {
-        if ( is_marked(I1,m) )
-          Helper::template Foreach_enabled_attributes_except
-              <CGAL::internal::Group_attribute_functor<Self, 0>, 1>::
-              run(this, I1, I2);
-        else
-          Helper::template Foreach_enabled_attributes_except
-              <CGAL::internal::Group_attribute_functor<Self, 1>, 1>::
-              run(this, I1, I2);
-      }
-
-      // Now we update the beta links.
-      negate_mark( mark );
-      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
-      {
-        if ( is_marked(I1,m) ) basic_link_beta_0(I1, I2);
-        else                   basic_link_beta_1(I1, I2);
-      }
-
-      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
-            it!=dartv.end(); ++it )
-      { unmark(*it,m); }
-      CGAL_assertion( is_whole_map_unmarked(m) );
-      free_mark(m);
-
-      negate_mark( mark );
-      CGAL_assertion( is_whole_map_unmarked(mark) );
-      free_mark(mark);
-    }
-
-    /** Sew by beta1 the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity, and updates enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<1>(adart1, adart2).
-     * @post is_valid()
-     */
-    void sew_1(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( (is_sewable<1>(adart1,adart2)) );
-
-      if ( adart1==adart2 )
-      {
-        for ( CGAL::CMap_dart_iterator_of_involution<Self, 1>
-              it(*this, adart1); it.cont(); ++it )
-        {
-          basic_link_beta_1(it, it);
-        }
-        return;
-      }
-
-      int m = get_new_mark();
-      std::deque<Dart_handle> dartv;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
-            it(*this, adart1, m); it.cont(); ++it )
-      {
-        mark(it,m);
-        dartv.push_back(it);
-      }
-
-      int mark = get_new_mark();
-      CGAL_assertion( mark!=-1 );
-
-      CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
-          I1(*this, adart1, mark);
-      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, 1>
-          I2(*this, adart2, mark);
-
-      // This first loop do not modify the map, but only the attributes
-      // (by calling when required the onmerge functors).
-      for ( ; I1.cont(); ++I1, ++I2 )
-      {
-        CGAL_assertion( I2.cont() );
-        if ( is_marked(I1,m) )
-          Helper::template Foreach_enabled_attributes_except
-              <internal::Group_attribute_functor<Self, 1>, 1>::
-              run(this, I1, I2);
-        else
-          Helper::template Foreach_enabled_attributes_except
-              <internal::Group_attribute_functor<Self, 0>, 1>::
-              run(this, I1, I2);
-      }
-
-      // Now we update the beta links.
-      negate_mark( mark );
-      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
-      {
-        if ( is_marked(I1,m) ) basic_link_beta_1(I1, I2);
-        else                   basic_link_beta_0(I1, I2);
-      }
-
-      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
-            it!=dartv.end(); ++it )
-      { unmark(*it,m); }
-      CGAL_assertion( is_whole_map_unmarked(m) );
-      free_mark(m);
-
-      negate_mark( mark );
-      CGAL_assertion( is_whole_map_unmarked(mark) );
-      free_mark(mark);
-    }
-
-    /** Sew by betai the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity, and updates enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<i>(adart1, adart2).
-     * @pre 2<=i<=dimension.
-     * @post is_valid()
-     */
-    template<unsigned int i>
-    void sew_for_involution(Dart_handle adart1, Dart_handle adart2)
-    {
-      CGAL_assertion( 2<=i && i<=dimension );
-      CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
-
-      int mark=get_new_mark();
-      CGAL_assertion( mark!=-1 );
-
-      CGAL::CMap_dart_iterator_basic_of_involution<Self, i>
-          I1(*this, adart1, mark);
-      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, i>
-          I2(*this, adart2, mark);
-
-      // This first loop do not modify the map, but only the attributes
-      // (by calling when required the onmerge functors).
-      for ( ; I1.cont(); ++I1, ++I2 )
-      {
-        Helper::template Foreach_enabled_attributes_except
-            <CGAL::internal::Group_attribute_functor<Self, i>, i>::
-            run(this, I1, I2);
-      }
-
-      // Now we update the beta links.
-      negate_mark( mark );
-      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
-      {
-        basic_link_beta_for_involution<i>(I1, I2);
-      }
-
-      negate_mark( mark );
-      CGAL_assertion( is_whole_map_unmarked(mark) );
-      free_mark(mark);
-    }
-
-    /** Sew by betai the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity, and updates enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @pre is_sewable<i>(adart1, adart2).
-     * @post is_valid()
-     */
-    template<unsigned int i>
-    void sew(Dart_handle adart1, Dart_handle adart2)
-    {
-      if ( are_attributes_automatically_managed() )
-      {
-        if ( i==0 ) sew_0(adart1, adart2);
-        else if ( i==1 ) sew_1(adart1, adart2);
-        else sew_for_involution<i>(adart1, adart2);
-      }
-      else topo_sew<i>(adart1, adart2);
-    }
-
-    /** Sew by betai the two given darts plus all the required darts
-     * to satisfy the combinatorial map validity. Enabled attributes
-     * are updated only if update_attributes==true.
-     * @param adart1 the first dart.
-     * @param adart2 the second dart.
-     * @param update_attributes a boolean to update the enabled attributes
-     *         (deprecated, now we use are_attributes_automatically_managed())
-     * @pre is_sewable<i>(adart1, adart2).
-     */
-    template<unsigned int i>
-    void sew(Dart_handle adart1, Dart_handle adart2, bool update_attributes)
-    {
-      if ( update_attributes ) sew<i>(adart1, adart2);
-      else topo_sew<i>(adart1, adart2);
-    }
-
-    /** Topological unsew by beta1 the given dart plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid
-     * @param adart first dart.
-     * @pre !adart->is_free(1).
-     */
-    void topo_unsew_1(Dart_handle adart)
-    {
-      CGAL_assertion( !this->template is_free<1>(adart) );
-
-      int m = get_new_mark();
-      std::deque<Dart_handle> dartv;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0> it(*this, adart, m);
-            it.cont(); ++it )
-      {
-        mark(it,m);
-        dartv.push_back(it);
-      }
-
-      for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
-            it.cont(); ++it )
-      {
-        if ( is_marked(it,m) ) unlink_beta_1(it);
-        else unlink_beta_0(it);
-      }
-
-      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
-            it!=dartv.end(); ++it )
-      { unmark(*it,m); }
-      CGAL_assertion( is_whole_map_unmarked(m) );
-      free_mark(m);
-    }
-
-    /** Topological unsew by beta0 the given dart plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid
-     * @param adart first dart.
-     * @pre !adart->is_free(0).
-     */
-    void topo_unsew_0(Dart_handle adart)
-    {
-      CGAL_assertion( !this->template is_free<0>(adart) );
-      topo_unsew_1( adart->template beta<0>() );
-    }
-
-    /** Topological unsew by betai the given dart plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid
-     * @param adart first dart.
-     * @pre !adart->is_free(i).
-     * @pre 2<=i<=dimension.
-     */
-    template<unsigned int i>
-    void topo_unsew_for_involution(Dart_handle adart)
-    {
-      CGAL_assertion( !this->template is_free<i>(adart) );
-      CGAL_assertion( 2<=i && i<=Self::dimension );
-
-      for ( CGAL::CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
-            it.cont(); ++it )
-      { unlink_beta<i>(it); }
-    }
-
-    /** Topological unsew by betai the given dart plus all the required darts
-     * to satisfy the combinatorial map validity: but do not update attributes
-     * thus the map can be non valid
-     * @param adart first dart.
-     * @pre !adart->is_free(i).
-     */
-    template<unsigned int i>
-    void topo_unsew(Dart_handle adart)
-    {
-      if ( i==0 ) topo_unsew_0(adart);
-      else if ( i==1 ) topo_unsew_1(adart);
-      else topo_unsew_for_involution<i>(adart);
-    }
-
-    /** Unsew by beta0 the given dart plus all the required darts
-     * to satisfy the combinatorial map validity, and update enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart first dart.
-     * @pre !adart->is_free(0).
-     * @post is_valid()
-     */
-    void unsew_0(Dart_handle adart)
-    {
-      CGAL_assertion( !this->template is_free<0>(adart) );
-
-      int m=get_new_mark();
-      std::deque<Dart_handle> dartv;
-      std::deque<Dart_handle> modified_darts;
-      std::deque<Dart_handle> modified_darts2;
-
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0> it(*this, adart, m);
-            it.cont(); ++it )
-      {
-        mark(it, m);
-        dartv.push_back(it);
-      }
-
-      for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
-            it.cont(); ++it )
-      {
-        if ( is_marked(it, m) )
-        {
-          modified_darts.push_back(it);
-          modified_darts2.push_back(beta<0>(it));
-          unlink_beta_0(it);
-        }
-        else
-        {
-          modified_darts2.push_back(it);
-          modified_darts.push_back(beta<1>(it));
-          unlink_beta_1(it);
-        }
-      }
-
-      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
-            it!=dartv.end(); ++it )
-      { unmark(*it,m); }
-
-      CGAL_assertion( is_whole_map_unmarked(m) );
-      free_mark(m);
-
-      // We test the split of all the incident cells for all the non
-      // void attributes.
-      Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<Self,0>, 1>::
-          run(this, modified_darts, modified_darts2);
-    }
-
-    /** Unsew by beta1 the given dart plus all the required darts
-     * to satisfy the combinatorial map validity, and update enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart first dart.
-     * @pre !adart->is_free(1).
-     * @post is_valid()
-     */
-    void unsew_1(Dart_handle adart)
-    {
-      CGAL_assertion( !this->template is_free<1>(adart) );
-
-      int m = get_new_mark();
-      std::deque<Dart_handle> dartv;
-      std::deque<Dart_handle> modified_darts;
-      std::deque<Dart_handle> modified_darts2;
-
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0>
-            it(*this, adart, m); it.cont(); ++it)
-      {
-        mark(it, m);
-        dartv.push_back(it);
-      }
-
-      for ( CGAL::CMap_dart_iterator_of_involution<Self, 1> it(*this, adart);
-            it.cont(); ++it )
-      {
-        if ( is_marked(it, m) )
-        {
-          modified_darts2.push_back(it);
-          modified_darts.push_back(beta<1>(it));
-          unlink_beta_1(it);
-        }
-        else
-        {
-          modified_darts.push_back(it);
-          modified_darts2.push_back(beta<0>(it));
-          unlink_beta_0(it);
-        }
-      }
-
-      for ( typename std::deque<Dart_handle>::iterator
-             it=dartv.begin(); it!=dartv.end(); ++it)
-      { unmark(*it, m); }
-      CGAL_assertion( is_whole_map_unmarked(m) );
-      free_mark(m);
-
-      // We test the split of all the incident cells for all the non
-      // void attributes.
-      Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<Self,1>, 1>::
-          run(this, modified_darts, modified_darts2);
-    }
-
-    /** Unsew by betai the given dart plus all the required darts
-     * to satisfy the combinatorial map validity, and update enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart first dart.
-     * @pre !adart->is_free(i).
-     * @post is_valid()
-     * @pre 2<=i<=dimension
-     */
-    template<unsigned int i>
-    void unsew_for_involution(Dart_handle adart)
-    {
-      CGAL_assertion(2<=i && i<=Self::dimension);
-      CGAL_assertion( !this->template is_free<i>(adart) );
-
-      std::deque<Dart_handle> modified_darts;
-
-      for ( CGAL::CMap_dart_iterator_of_involution<Self, i> it(*this, adart);
-            it.cont(); ++it )
-      {
-        modified_darts.push_back(it);
-        modified_darts.push_back(beta<i>(it));
-        unlink_beta_for_involution<i>(it);
-      }
-
-      // We test the split of all the incident cells for all the non
-      // void attributes.
-      Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<Self, i>, i>::
-          run(this, modified_darts);
-    }
-
-    /** Unsew by betai the given dart plus all the required darts
-     * to satisfy the combinatorial map validity, and update enabled
-     * attributes when necessary so that the final map is valid.
-     * @param adart first dart.
-     * @pre !adart->is_free(i).
-     * @post is_valid()
-     */
-    template<unsigned int i>
-    void unsew(Dart_handle adart)
-    {
-      if ( are_attributes_automatically_managed() )
-      {
-        if ( i==0 ) unsew_0(adart);
-        else if ( i==1 ) unsew_1(adart);
-        else unsew_for_involution<i>(adart);
-      }
-      else topo_unsew<i>(adart);
-    }
-
-    /** Unsew by betai the given dart plus all the required darts
-     * to satisfy the combinatorial map validity. Enabled attributes
-     * are updated only if update_attributes==true.
-     * @param adart first dart.
-     * @param update_attributes a boolean to update the enabled attributes
-     *         (deprecated, now we use are_attributes_automatically_managed())
-     * @pre !adart->is_free(i).
-     */
-    template<unsigned int i>
-    void unsew(Dart_handle adart, bool update_attributes)
-    {
-      if ( update_attributes ) unsew<i>(adart);
-      else topo_unsew<i>(adart);
-    }
-
-    /** Reverse the orientation (swap beta 0 & 1 links) of the entire map.
-     * A valid map after this operation remains valid.
-     * @param none
-     * @return none
-     */
-    void reverse_orientation()
-    {
-      internal::Reverse_orientation_of_map_functor<Self>::run(this);
-    }
-
-    /** Reverse the orientation (swap beta 0 & 1 links) of the connected
-     * component containing the given dart.
-     * A valid map after this operation remains valid.
-     * @param adart handle to a dart
-     * @return none
-     */
-    void reverse_orientation_connected_component (Dart_handle adart)
-    {
-      internal::Reverse_orientation_of_connected_component_functor<Self>::
-          run(this, adart);
-    }
-
-    /** Count the marked cells (at least one marked dart).
-     * @param amark the mark to consider.
-     * @param avector containing the dimensions of the cells to count.
-     * @return a vector containing the number of cells.
-     */
-    std::vector<unsigned int>
-    count_marked_cells(int amark, const std::vector<unsigned int>& acells) const
-    {
-      std::vector<unsigned int> res(dimension+2);
-      std::vector<int> marks(dimension+2);
-
-      // Initialization of the result
-      for ( unsigned int i=0; i<dimension+2; ++i)
-      {
-        res[i]=0;
-        marks[i]=-1;
-      }
-
-      // Mark reservation
-      for ( unsigned int i=0; i<acells.size(); ++i)
-      {
-        CGAL_assertion(acells[i]<=dimension+1);
-        if ( marks[acells[i]]==-1 )
-        {
-          marks[acells[i]] = get_new_mark();
-        }
-      }
-
-      // Counting and marking cells
-      for ( typename Dart_range::const_iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; ++it)
-      {
-        if ( is_marked(it, amark) )
-        {
-          CGAL::internal::Foreach_static
-            <CGAL::internal::Count_cell_functor<Self>,dimension+1>::
-            run(this, it, &marks, &res);
-        }
-      }
-
-      // Unmarking darts
-      std::vector<unsigned int> tounmark;
-      for ( unsigned int i=0; i<acells.size(); ++i)
-      {
-        if ( is_whole_map_marked(marks[acells[i]]) ||
-             is_whole_map_unmarked(marks[acells[i]]))
-        {
-          free_mark(marks[acells[i]]);
-        }
-        else
-        {
-          tounmark.push_back(marks[acells[i]]);
-        }
-      }
-
-      if ( tounmark.size() > 0 )
-      {
-        for ( typename Dart_range::const_iterator it(darts().begin()),
-               itend(darts().end()); it!=itend; ++it)
-        {
-          for ( unsigned int i=0; i<tounmark.size(); ++i)
-            unmark(it, tounmark[i]);
-        }
-        for ( unsigned int i=0; i<tounmark.size(); ++i)
-        {
-          CGAL_assertion(is_whole_map_unmarked(tounmark[i]));
-          free_mark(tounmark[i]);
-        }
-      }
-
-      return res;
-    }
-
-    /** Count the number of given cells
-     * @param avector containing the dimensions of the cells to count.
-     * @return a vector containing the number of cells.
-     */
-    std::vector<unsigned int>
-    count_cells(const std::vector<unsigned int>& acells) const
-    {
-      std::vector<unsigned int> res;
-      int m = get_new_mark();
-      negate_mark(m); // We mark all the cells.
-
-      res = count_marked_cells(m, acells);
-
-      negate_mark(m); // We unmark the cells
-      free_mark(m);
-
-      return res;
-    }
-
-    /** Count the number of cells in each dimension.
-     * @return a vector containing the number of cells.
-     */
-    std::vector<unsigned int> count_all_cells() const
-    {
-      std::vector<unsigned int> dim(dimension+2);
-
-      for ( unsigned int i=0; i<dimension+2; ++i)
-        dim[i]=i;
-
-      return count_cells(dim);
-    }
-
-  protected:
-    /** Set simultaneously all the marks of a given dart.
-     * @param adart the dart.
-     * @param amarks the marks to set.
-     */
-    void set_marks(Dart_const_handle adart,
-                   const std::bitset<NB_MARKS> & amarks) const
-    { set_dart_marks(adart, amarks ^ mmask_marks); }
-
-    /** Get simultaneously all the marks of a given dart.
-     * @param adart the dart.
-     * @return allt the marks of adart.
-     */
-    std::bitset<NB_MARKS> get_marks(Dart_const_handle adart) const
-    { return get_dart_marks(adart) ^ mmask_marks; }
-
-    /** Get the mask associated to a given mark.
-     * @param amark the mark.
-     * @return the mask associated to mark amark.
-     */
-    bool get_mask_mark(int amark) const
-    {
-      CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
-      return mmask_marks[(size_type)amark];
-    }
-
-  public:
-    /** Erase marked darts from the map.
-     * Marked darts are unlinked before to be removed, thus surviving darts
-     * are correctly linked, but the map is not necessarily valid depending
-     * on the configuration of removed darts. User must check carefully marked
-     * darts before calling this method.
-     * @param amark the mark of darts to erase.
-     * @return the number of removed darts.
-     */
-    unsigned int erase_marked_darts(int amark)
-    {
-      unsigned int res = 0, i = 0;
-      Dart_handle d;
-      for ( typename Dart_range::iterator it(darts().begin()),
-             itend(darts().end()); it!=itend; )
-      {
-        d = it++;
-        if (is_marked(d, amark))
-        {
-          for ( i = 0; i <= dimension; ++i)
-          { if (!d->is_free(i)) unlink_beta(d, i); }
-          erase_dart(d); ++res;
-        }
-      }
-      return res;
-    }
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    //**************************************************************************
-    // Dart_of_orbit_basic_range
-    template<unsigned int ... Beta>
-    struct Dart_of_orbit_basic_range : public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
-     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
-       CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> > Base;
-
-      Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, int amark=-1):
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_basic_const_range
-    template<unsigned int ... Beta>
-    struct Dart_of_orbit_basic_const_range : public CGAL::CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
-    {
-      typedef CGAL::CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
-      Base;
-
-      Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle
-                                      adart, int amark=-1):
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_range
-    template<unsigned int ... Beta>
-    struct Dart_of_orbit_range : public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_of_orbit<Self,Beta...>,
-     CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_of_orbit<Self,Beta...>,
-       CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> > Base;
-
-      Dart_of_orbit_range(Self &amap, Dart_handle adart) : Base(amap,adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_const_range
-    template<unsigned int ... Beta>
-    struct Dart_of_orbit_const_range : public CGAL::CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> >
-    {
-      typedef CGAL::CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> > Base;
-
-      Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart):
-        Base(amap,adart)
-      {}
-    };
-    //**************************************************************************
-    /// @return a range on all the darts of the given orbit
-    template<unsigned int ... Beta>
-    Dart_of_orbit_range<Beta...> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<Beta...>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int ... Beta>
-    Dart_of_orbit_const_range<Beta...>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<Beta...>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int ... Beta>
-    Dart_of_orbit_basic_range<Beta...> darts_of_orbit_basic(Dart_handle adart,
-                                                            int amark=-1)
-    { return Dart_of_orbit_basic_range<Beta...>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int ... Beta>
-    Dart_of_orbit_basic_const_range<Beta...>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<Beta...>(*this,adart,amark); }
-    //**************************************************************************
-#else
-    //**************************************************************************
-    // Dart_of_orbit_basic_range
-    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
-             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-    struct Dart_of_orbit_basic_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-        B8,B9>,
-     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-        B8,B9> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-      B8,B9>,
-       CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,
-                                               B6,B7,B8,B9> > Base;
-
-      Dart_of_orbit_basic_range(Self &amap, Dart_handle adart,
-                                int /*amark*/=-1):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_basic_const_range
-    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
-             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-    struct Dart_of_orbit_basic_const_range: public CMap_const_range
-    <Self,
-     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-        B8,B9> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit
-       <Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
-
-      Dart_of_orbit_basic_const_range(const Self &amap,
-                                      Dart_const_handle adart, int amark=-1):
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_range
-    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
-             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-    struct Dart_of_orbit_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9>,
-     CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-      B8,B9>,
-       CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-      B8,B9> >
-      Base;
-
-      Dart_of_orbit_range(Self &amap, Dart_handle adart):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_orbit_const_range
-    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
-             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-    struct Dart_of_orbit_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
-        B8,B9> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_of_orbit
-       <Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
-
-      Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    /// @return a range on all the darts of the given orbit
-    Dart_of_orbit_range<> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1>
-    Dart_of_orbit_range<B1> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2>
-    Dart_of_orbit_range<B1,B2> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3>
-    Dart_of_orbit_range<B1,B2,B3> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
-    Dart_of_orbit_range<B1,B2,B3,B4> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5>
-    Dart_of_orbit_range<B1,B2,B3,B4,B5> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4,B5>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6>
-    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7>
-    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
-    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
-    (Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
-              unsigned int B9>
-    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-    darts_of_orbit(Dart_handle adart)
-    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>(*this,adart); }
-    //--------------------------------------------------------------------------
-    // Const versions.
-    Dart_of_orbit_const_range<> darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1>
-    Dart_of_orbit_const_range<B1> darts_of_orbit(Dart_const_handle
-                                                 adart) const
-    { return Dart_of_orbit_const_range<B1>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2>
-    Dart_of_orbit_const_range<B1,B2> darts_of_orbit(Dart_const_handle
-                                                    adart) const
-    { return Dart_of_orbit_const_range<B1,B2>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3>
-    Dart_of_orbit_const_range<B1,B2,B3> darts_of_orbit
-    (Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
-    Dart_of_orbit_const_range<B1,B2,B3,B4>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5>
-    Dart_of_orbit_const_range<B1,B2,B3,B4,B5>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6>
-    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7>
-    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
-    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
-              unsigned int B9>
-    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-    darts_of_orbit(Dart_const_handle adart) const
-    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-        (*this,adart); }
-    //--------------------------------------------------------------------------
-    // Basic versions
-    Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart,
-                                                     int amark=-1)
-    { return Dart_of_orbit_basic_range<>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    Dart_of_orbit_basic_const_range<> darts_of_orbit_basic
-    (Dart_const_handle adart,int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1>
-    Dart_of_orbit_basic_range<B1> darts_of_orbit_basic(Dart_handle adart,
-                                                       int amark=-1)
-    { return Dart_of_orbit_basic_range<B1>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1>
-    Dart_of_orbit_basic_const_range<B1> darts_of_orbit_basic
-    (Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2>
-    Dart_of_orbit_basic_range<B1,B2> darts_of_orbit_basic(Dart_handle adart,
-                                                          int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2>
-    Dart_of_orbit_basic_const_range<B1,B2> darts_of_orbit_basic
-    (Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3>
-    Dart_of_orbit_basic_range<B1,B2,B3> darts_of_orbit_basic(Dart_handle adart,
-                                                             int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3>
-    Dart_of_orbit_basic_const_range<B1,B2,B3> darts_of_orbit_basic
-    (Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4> darts_of_orbit_basic
-    (Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5> darts_of_orbit_basic
-    (Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6> darts_of_orbit_basic
-    (Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit_basic
-    (Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
-    (Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
-              unsigned int B9>
-    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-    darts_of_orbit_basic(Dart_handle adart, int amark=-1)
-    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
-              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
-              unsigned int B9>
-    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-    darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
-        (*this,adart,amark); }
-    //**************************************************************************
-#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    //**************************************************************************
-    // Dart_of_cell_basic_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_cell_basic_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
-
-      Dart_of_cell_basic_range(Self &amap, Dart_handle adart, int amark=-1) :
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_cell_basic_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_cell_basic_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
-
-      Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart,
-                                     int amark=-1) :
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_cell_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_cell_range: public CGAL::CMap_range
-    <Self,CMap_dart_iterator_of_cell<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self,CMap_dart_iterator_of_cell<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> > Base;
-
-      Dart_of_cell_range(Self &amap, Dart_handle adart) :
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_cell_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_cell_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> > Base;
-
-      Dart_of_cell_const_range(const Self &amap, Dart_const_handle adart) :
-        Base(amap, adart)
-      {}
-    };
-    //--------------------------------------------------------------------------
-    /// @return a range on all the darts of the given i-cell
-    template<unsigned int i, int dim>
-    Dart_of_cell_basic_range<i,dim> darts_of_cell_basic(Dart_handle adart,
-                                                        int amark=-1)
-    { return Dart_of_cell_basic_range<i,dim>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, int dim>
-    Dart_of_cell_basic_const_range<i,dim> darts_of_cell_basic
-    (Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_cell_basic_const_range<i,dim>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_cell_basic_range<i,Self::dimension>
-    darts_of_cell_basic(Dart_handle adart, int amark=-1)
-    { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_cell_basic_const_range<i,Self::dimension>
-    darts_of_cell_basic(Dart_const_handle adart, int amark=-1) const
-    { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, int dim>
-    Dart_of_cell_range<i,dim> darts_of_cell(Dart_handle adart)
-    { return Dart_of_cell_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, int dim>
-    Dart_of_cell_const_range<i,dim> darts_of_cell(Dart_const_handle adart) const
-    { return Dart_of_cell_const_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_cell_range<i,Self::dimension> darts_of_cell(Dart_handle adart)
-    { return darts_of_cell<i,Self::dimension>(adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_cell_const_range<i,Self::dimension>
-    darts_of_cell(Dart_const_handle adart) const
-    { return darts_of_cell<i,Self::dimension>(adart); }
-    //**************************************************************************
-    // Dart_of_involution_basic_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_basic_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_basic_of_involution<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_basic_of_involution<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> > Base;
-
-      Dart_of_involution_basic_range(Self &amap, Dart_handle adart,
-                                     int amark=-1):
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_involution_basic_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_basic_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
-      Base;
-
-      Dart_of_involution_basic_const_range(const Self &amap,
-                                           Dart_const_handle adart,
-                                           int amark=-1) :
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    template<unsigned int i,int dim>
-    Dart_of_involution_basic_range<i,dim>
-    darts_of_involution_basic(Dart_handle adart, int amark=-1)
-    { return Dart_of_involution_basic_range<i,dim>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i,int dim>
-    Dart_of_involution_basic_const_range<i,dim>
-    darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_involution_basic_const_range<i,dim>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_basic_range<i,Self::dimension>
-    darts_of_involution_basic(Dart_handle adart, int amark=-1)
-    { return Dart_of_involution_basic_range<i,Self::dimension>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_basic_const_range<i,Self::dimension>
-    darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_involution_basic_const_range<i,Self::dimension>
-        (*this,adart,amark); }
-    //**************************************************************************
-    // Dart_of_involution_inv_basic_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_inv_basic_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_basic_of_involution_inv<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_basic_of_involution_inv<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
-      Base;
-
-      Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart,
-                                         int amark=-1):
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_involution_inv_basic_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_inv_basic_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_basic_of_involution_inv
-      <Self,i,dim> >
-      Base;
-
-      Dart_of_involution_inv_basic_const_range(const Self &amap,
-                                               Dart_const_handle adart,
-                                               int amark=-1) :
-        Base(amap, adart, amark)
-      {}
-    };
-    //**************************************************************************
-    template<unsigned int i,int dim>
-    Dart_of_involution_inv_basic_range<i,dim>
-    darts_of_involution_inv_basic(Dart_handle adart, int amark=-1)
-    { return Dart_of_involution_inv_basic_range<i,dim>(*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i,int dim>
-    Dart_of_involution_inv_basic_const_range<i,dim>
-    darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_involution_inv_basic_const_range<i,dim>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_inv_basic_range<i,Self::dimension>
-    darts_of_involution_inv_basic(Dart_handle adart, int amark=-1)
-    { return Dart_of_involution_inv_basic_range<i,Self::dimension>
-        (*this,adart,amark); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_inv_basic_const_range<i,Self::dimension>
-    darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const
-    { return Dart_of_involution_inv_basic_const_range<i,Self::dimension>
-        (*this,adart,amark); }
-    //**************************************************************************
-    // Dart_of_involution_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_of_involution<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_of_involution<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> > Base;
-
-      Dart_of_involution_range(Self &amap, Dart_handle adart) :
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_involution_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> > Base;
-
-      Dart_of_involution_const_range(const Self &amap,
-                                     Dart_const_handle adart):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    template<unsigned int i,int dim>
-    Dart_of_involution_range<i,dim>
-    darts_of_involution(Dart_handle adart)
-    { return Dart_of_involution_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i,int dim>
-    Dart_of_involution_const_range<i,dim>
-    darts_of_involution(Dart_const_handle adart) const
-    { return Dart_of_involution_const_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_range<i,Self::dimension>
-    darts_of_involution(Dart_handle adart)
-    { return Dart_of_involution_range<i,Self::dimension>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_const_range<i,Self::dimension>
-    darts_of_involution(Dart_const_handle adart) const
-    { return Dart_of_involution_const_range<i,Self::dimension>(*this,adart); }
-    //**************************************************************************
-    // Dart_of_involution_inv_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_inv_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_dart_iterator_of_involution_inv<Self,i,dim>,
-     CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_dart_iterator_of_involution_inv<Self,i,dim>,
-       CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> > Base;
-
-      Dart_of_involution_inv_range(Self &amap, Dart_handle adart) :
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // Dart_of_involution_inv_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct Dart_of_involution_inv_const_range: public CMap_const_range
-    <Self, CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
-      Base;
-
-      Dart_of_involution_inv_const_range(const Self &amap,
-                                         Dart_const_handle adart):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    template<unsigned int i,int dim>
-    Dart_of_involution_inv_range<i,dim>
-    darts_of_involution_inv(Dart_handle adart)
-    { return Dart_of_involution_inv_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i,int dim>
-    Dart_of_involution_inv_const_range<i,dim>
-    darts_of_involution_inv(Dart_const_handle adart) const
-    { return Dart_of_involution_inv_const_range<i,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_inv_range<i,Self::dimension>
-    darts_of_involution_inv(Dart_handle adart)
-    { return Dart_of_involution_inv_range<i,Self::dimension>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    Dart_of_involution_inv_const_range<i,Self::dimension>
-    darts_of_involution_inv(Dart_const_handle adart) const
-    { return Dart_of_involution_inv_const_range<i,Self::dimension>
-        (*this,adart); }
-    //**************************************************************************
-    // Dart_basic_range
-    struct Dart_basic_range {
-      typedef CGAL::CMap_dart_iterator_basic_of_all<Self> iterator;
-      typedef CGAL::CMap_dart_const_iterator_basic_of_all<Self> const_iterator;
-      Dart_basic_range(Self &amap) : mmap(amap)
-      {}
-      iterator begin() { return iterator(mmap); }
-      iterator end()   { return iterator(mmap,mmap.null_handle); }
-      const_iterator begin() const { return const_iterator(mmap); }
-      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-      size_type size() const
-      { return mmap.number_of_darts(); }
-      bool empty() const
-      { return mmap.is_empty(); }
-    private:
-      Self & mmap;
-    };
-    //**************************************************************************
-    // Dart_basic_const_range
-    struct Dart_basic_const_range {
-      typedef CGAL::CMap_dart_const_iterator_basic_of_all<Self> const_iterator;
-      Dart_basic_const_range(Self &amap) : mmap(amap)
-      {}
-      const_iterator begin() const { return const_iterator(mmap); }
-      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-      size_type size() const
-      { return mmap.number_of_darts(); }
-      bool empty() const
-      { return mmap.is_empty(); }
-    private:
-      const Self & mmap;
-    };
-    //**************************************************************************
-    Dart_basic_range darts_basic()
-    { return Dart_basic_range(*this); }
-    //--------------------------------------------------------------------------
-    Dart_basic_const_range darts_basic() const
-    { return Dart_basic_const_range(*this); }
-    //**************************************************************************
-    // One_dart_per_incident_cell_range
-    template<unsigned int i,unsigned int j,int dim=Self::dimension>
-    struct One_dart_per_incident_cell_range: public CGAL::CMap_range
-    <Self, CGAL::CMap_one_dart_per_incident_cell_iterator<Self,i,j,dim>,
-     CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
-    {
-      typedef CGAL::CMap_range
-      <Self, CGAL::CMap_one_dart_per_incident_cell_iterator<Self,i,j,dim>,
-       CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
-      Base;
-
-      One_dart_per_incident_cell_range(Self &amap, Dart_handle adart):
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // One_dart_per_incident_cell_const_range
-    template<unsigned int i,unsigned int j,int dim=Self::dimension>
-    struct One_dart_per_incident_cell_const_range: public CMap_const_range
-    <Self, CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
-    {
-      typedef CMap_const_range
-      <Self, CGAL::CMap_one_dart_per_incident_cell_const_iterator
-      <Self,i,j,dim> > Base;
-
-      One_dart_per_incident_cell_const_range(const Self &amap,
-                                             Dart_const_handle adart) :
-        Base(amap, adart)
-      {}
-    };
-    //**************************************************************************
-    // One_dart_per_cell_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct One_dart_per_cell_range {
-      typedef CGAL::CMap_one_dart_per_cell_iterator<Self,i,dim> iterator;
-      typedef CGAL::CMap_one_dart_per_cell_const_iterator<Self,i,dim>
-      const_iterator;
-      One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0)
-      {}
-      iterator begin() { return iterator(mmap); }
-      iterator end()   { return iterator(mmap,mmap.null_handle); }
-      const_iterator begin() const { return const_iterator(mmap); }
-      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-      size_type size() const
-      {
-        if (msize==0)
-          for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
-            ++msize;
-        return msize;
-      }
-      bool empty() const
-      { return mmap.is_empty(); }
-    private:
-      Self & mmap;
-      mutable size_type msize;
-    };
-    //**************************************************************************
-    // One_dart_per_cell_const_range
-    template<unsigned int i,int dim=Self::dimension>
-    struct One_dart_per_cell_const_range {
-      typedef CGAL::CMap_one_dart_per_cell_const_iterator<Self,i,dim>
-      const_iterator;
-      One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0)
-      {}
-      const_iterator begin() const { return const_iterator(mmap); }
-      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-      size_type size() const
-      {
-        if (msize==0)
-          for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
-            ++msize;
-        return msize;
-      }
-      bool empty() const
-      { return mmap.is_empty(); }
-    private:
-      const Self & mmap;
-      mutable size_type msize;
-    };
-    //**************************************************************************
-    /// @return a range on the i-cells incindent to the given j-cell.
-    template<unsigned int i, unsigned int j, int dim>
-    One_dart_per_incident_cell_range<i,j,dim>
-    one_dart_per_incident_cell(Dart_handle adart)
-    { return One_dart_per_incident_cell_range<i,j,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, unsigned int j, int dim>
-    One_dart_per_incident_cell_const_range<i,j,dim>
-    one_dart_per_incident_cell(Dart_const_handle adart) const
-    { return One_dart_per_incident_cell_const_range<i,j,dim>(*this,adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, unsigned int j>
-    One_dart_per_incident_cell_range<i,j,Self::dimension>
-    one_dart_per_incident_cell(Dart_handle adart)
-    { return one_dart_per_incident_cell<i,j,Self::dimension>(adart); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, unsigned int j>
-    One_dart_per_incident_cell_const_range<i,j,Self::dimension>
-    one_dart_per_incident_cell(Dart_const_handle adart) const
-    { return one_dart_per_incident_cell<i,j,Self::dimension>(adart); }
-    //--------------------------------------------------------------------------
-    /// @return a range on all the i-cells
-    template<unsigned int i, int dim>
-    One_dart_per_cell_range<i,dim> one_dart_per_cell()
-    { return One_dart_per_cell_range<i,dim>(*this); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i, int dim>
-    One_dart_per_cell_const_range<i,dim> one_dart_per_cell() const
-    { return One_dart_per_cell_const_range<i,dim>(*this); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    One_dart_per_cell_range<i,Self::dimension> one_dart_per_cell()
-    { return one_dart_per_cell<i,Self::dimension>(); }
-    //--------------------------------------------------------------------------
-    template<unsigned int i>
-    One_dart_per_cell_const_range<i,Self::dimension> one_dart_per_cell() const
-    { return one_dart_per_cell<i,Self::dimension>(); }
-    //--------------------------------------------------------------------------
-
-  public:
-
-    /** Compute the dual of a Combinatorial_map.
-     * @param amap the cmap in which we build the dual of this map.
-     * @param adart a dart of the initial map, NULL by default.
-     * @return adart of the dual map, the dual of adart if adart!=NULL,
-     *         any dart otherwise.
-     * As soon as we don't modify this map and amap map, we can iterate
-     * simultaneously through all the darts of the two maps and we have
-     * each time of the iteration two "dual" darts.
-     */
-    Dart_handle dual(Self& amap, Dart_handle adart=null_handle)
-    {
-      CGAL_assertion( is_without_boundary(dimension) );
-
-      CGAL::Unique_hash_map< Dart_handle, Dart_handle,
-        typename Self::Hash_function > dual;
-      Dart_handle d, d2, res = amap.null_handle;
-
-      // We clear amap. TODO return a new amap ?
-      amap.clear();
-
-      // We create a copy of all the dart of the map.
-      for ( typename Dart_range::iterator it=darts().begin();
-            it!=darts().end(); ++it)
-      {
-        dual[it] = amap.create_dart();
-        if ( it==adart && res==amap.null_handle ) res = dual[it];
-      }
-
-      // Then we link the darts by using the dual formula :
-      // G(B,b1,b2,...,bn-1,bn) =>
-      //    dual(G)=(B, b(n-1)obn, b(n-2)obn,...,b1obn, bn)
-      // We suppose darts are run in the same order for both maps.
-      typename Dart_range::iterator it2=amap.darts().begin();
-      for ( typename Dart_range::iterator it=darts().begin();
-            it!=darts().end(); ++it, ++it2)
-      {
-        d = it2; // The supposition on the order allows to avoid d=dual[it];
-        CGAL_assertion( it2==dual[it] );
-
-        // First case outside the loop since we need to use link_beta1
-        if ( amap.template is_free<1>(d) &&
-             beta<dimension, dimension-1>(it)!=null_dart_handle )
-          amap.basic_link_beta_1(d, dual[beta<dimension, dimension-1>(it)]);
-
-        // and during the loop we use link_beta(d1,d2,i)
-        for ( unsigned int i=dimension-2; i>=1; --i)
-        {
-          if ( amap.is_free(d,dimension-i) &&
-               beta(it, dimension, i)!=null_dart_handle )
-            amap.basic_link_beta(d, dual[beta(it, dimension, i)], dimension-i);
-        }
-        if ( amap.template is_free<dimension>(d) )
-        {
-          CGAL_assertion ( !this->template is_free<dimension>(it) );
-          amap.basic_link_beta(d, dual[beta<dimension>(it)], dimension);
-        }
-      }
-
-      //  CGAL_postcondition(amap2.is_valid());
-
-      if ( res==amap.null_handle ) res = amap.darts().begin();
-      return res;
-    }
-
-
-    /** Test if the connected component of cmap containing dart dh1 is
-     *  isomorphic to the connected component of map2 containing dart dh2,
-     *  starting from dh1 and dh2.
-     * @param dh1  initial dart for this map
-     * @param map2 the second combinatorial map
-     * @param dh2  initial dart for map2
-     * @param testAttributes Boolean to test the equality of attributes (true)
-     *                       or not (false)
-     * @return true iff the cc of map is isomorphic to the cc of map2 starting
-     *     from dh1 and dh2; by testing the equality of attributes if
-     *     testAttributes is true
-     */
-    template <unsigned int d2, typename Refs2, typename Items2, class Alloc2,
-              class Storage2>
-    bool are_cc_isomorphic(Dart_const_handle dh1,
-                           const Combinatorial_map_base
-                           <d2,Refs2,Items2,Alloc2, Storage2>& map2,
-                           typename Combinatorial_map_base
-                           <d2,Refs2,Items2,Alloc2, Storage2>::Dart_const_handle dh2,
-                           bool testAttributes=true) const
-    {
-      // CGAL_assertion(dimension==map2.dimension);
-      typedef Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2> Map2;
-
-      bool match = true;
-
-      // Two stacks used to run through the two maps.
-      std::deque< Dart_const_handle > toTreat1;
-      std::deque< typename Map2::Dart_const_handle > toTreat2;
-
-      int m1 = get_new_mark();
-      int m2 = map2.get_new_mark();
-
-      toTreat1.push_back(dh1);
-      toTreat2.push_back(dh2);
-
-      Dart_const_handle current;
-      typename Map2::Dart_const_handle other;
-
-      unsigned int i = 0;
-      CGAL::Unique_hash_map<Dart_const_handle,
-                            typename Map2::Dart_const_handle,
-                            typename Self::Hash_function> bijection;
-
-      if ( testAttributes )
-      {
-        internal::Test_is_same_attribute_functor<Self, Map2>::
-            value = true;
-        internal::Test_is_same_attribute_functor<Map2, Self>::
-            value = true;
-      }
-
-      while (match && !toTreat1.empty())
-      {
-        // Next dart
-        current = toTreat1.front();
-        toTreat1.pop_front();
-        other = toTreat2.front();
-        toTreat2.pop_front();
-
-        if (!is_marked(current, m1))
-        {
-          if (map2.is_marked(other, m2))
-            match=false;
-          else
-          {
-            bijection[current] = other;
-
-            mark(current, m1);
-            map2.mark(other, m2);
-
-            if (testAttributes)
-            {
-              // We need to test in both direction because
-              // Foreach_enabled_attributes only test non void attributes
-              // of Self.
-              Helper::template Foreach_enabled_attributes
-                < internal::Test_is_same_attribute_functor<Self, Map2> >::
-                run(this,&map2,current, other);
-              Map2::Helper::template Foreach_enabled_attributes
-                < internal::Test_is_same_attribute_functor<Map2, Self> >::
-                run(&map2,this,other, current);
-              if ( !internal::Test_is_same_attribute_functor<Self, Map2>::
-                   value ||
-                   !internal::Test_is_same_attribute_functor<Map2, Self>::
-                   value )
-                match=false;
-            }
-
-            // We test if the injection is valid with its neighboors.
-            // We go out as soon as it is not satisfied.
-            for (i = 0; match && i <= dimension; ++i)
-            {
-              if ( i>map2.dimension )
-              {
-                if (!is_free(current,i)) match=false;
-              }
-              else
-              {
-                if (is_free(current,i))
-                {
-                  if (!map2.is_free(other,i))
-                    match = false;
-                }
-                else
-                {
-                  if (map2.is_free(other,i))
-                    match = false;
-                  else
-                  {
-                    if (is_marked(beta(current,i), m1) !=
-                        map2.is_marked(map2.beta(other,i), m2))
-                      match = false;
-                    else
-                    {
-                      if (!is_marked(beta(current,i), m1))
-                      {
-                        toTreat1.push_back(beta(current,i));
-                        toTreat2.push_back(map2.beta(other,i));
-                      }
-                      else
-                      {
-                        if (bijection[beta(current,i)]!=map2.beta(other,i))
-                          match = false;
-                      }
-                    }
-                  }
-                }
-              }
-            }
-            // Now we test if the second map has more beta links than the first
-            for ( i=dimension+1; match && i<=map2.dimension; ++i )
-            {
-              if (!map2.is_free(other,i)) match=false;
-            }
-          }
-        }
-        else
-        {
-          if (!map2.is_marked(other, m2))
-            match = false;
-        }
-      }
-
-      // Here we test if both queue are empty
-      if ( !toTreat1.empty() || !toTreat2.empty() ) match = false;
-
-      // Here we unmark all the marked darts.
-      toTreat1.clear();
-      toTreat2.clear();
-
-      toTreat1.push_back(dh1);
-      toTreat2.push_back(dh2);
-
-      while (!toTreat1.empty())
-      {
-        current = toTreat1.front();
-        toTreat1.pop_front();
-        other = toTreat2.front();
-        toTreat2.pop_front();
-
-        unmark(current, m1);
-        map2.unmark(other, m2);
-
-        for (i = 0; match && i <= dimension; ++i)
-        {
-          if (!is_free(current,i) && is_marked(beta(current,i), m1))
-          {
-            CGAL_assertion(!map2.is_free(other,i) &&
-                           map2.is_marked(map2.beta(other,i), m2));
-            toTreat1.push_back(beta(current,i));
-            toTreat2.push_back(map2.beta(other,i));
-          }
-        }
-      }
-
-      free_mark(m1);
-      map2.free_mark(m2);
-
-      return match;
-    }
-
-    /** Test if this cmap is isomorphic to map2.
-     * @pre cmap is connected.
-     * @param map2 the second combinatorial map
-     * @param testAttributes Boolean to test the equality of attributes (true)
-     *                       or not (false)
-     * @return true iff this map is isomorphic to map2, testing the equality
-     *         of attributes if testAttributes is true
-     */
-    template <unsigned int d2, typename Refs2, typename Items2, class Alloc2,
-              class Storage2>
-    bool is_isomorphic_to(const Combinatorial_map_base
-                          <d2,Refs2,Items2,Alloc2, Storage2>& map2,
-                          bool testAttributes=true)
-    {
-      // if ( dimension!=map2.dimension ) return false;
-
-      Dart_const_handle d1=darts().begin();
-
-      for (typename Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2>::
-             Dart_range::const_iterator it(map2.darts().begin()),
-             itend(map2.darts().end()); it!=itend; ++it)
-      {
-        if (are_cc_isomorphic(d1, map2, it, testAttributes))
-        {
-          return true;
-        }
-      }
-
-      return false;
-    }
-
-    /** Test if the attributes of this map are automatically updated.
-     * @return true iff the boolean automatic_attributes_management is set to true.
-     */
-    bool are_attributes_automatically_managed() const
-    {
-      return automatic_attributes_management;
-    }
-
-    /** Sets the automatic_attributes_management boolean.
-     */
-    void set_automatic_attributes_management(bool newval)
-    {
-      if (this->automatic_attributes_management == false && newval == true)
-      {
-        correct_invalid_attributes();
-      }
-
-      this->automatic_attributes_management = newval;
-    }
-
-  protected:
-    /// Number of times each mark is reserved. 0 if the mark is free.
-    mutable size_type mnb_times_reserved_marks[NB_MARKS];
-
-    /// Mask marks to know the value of unmark dart, for each index i.
-    mutable std::bitset<NB_MARKS> mmask_marks;
-
-    /// Number of used marks.
-    mutable size_type mnb_used_marks;
-
-    /// Index of each mark, in mfree_marks_stack or in mfree_marks_stack.
-    mutable size_type mindex_marks[NB_MARKS];
-
-    /// "Stack" of free marks.
-    mutable int mfree_marks_stack[NB_MARKS];
-
-    /// "Stack" of used marks.
-    mutable int mused_marks_stack[NB_MARKS];
-
-    /// Number of marked darts for each used marks.
-    mutable size_type mnb_marked_darts[NB_MARKS];
-
-    /// Automatic management of the attributes:
-    /// true means attributes are always maintained updated during operations.
-    bool automatic_attributes_management;
-
-    /// Tuple of unary and binary functors (for all non void attributes).
-    typename Helper::Split_functors m_onsplit_functors;
-    typename Helper::Merge_functors m_onmerge_functors;
-  };
-
-  template < unsigned int d_, class Refs, class Items_, class Alloc_,
-             class Storage_ >
-  typename Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::
-     Base::Null_handle_type
-     Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::null_handle =
-     Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::Base::null_handle;
-
-  template < unsigned int d_,
-             class Items_=Combinatorial_map_min_items<d_>,
-             class Alloc_=CGAL_ALLOCATOR(int),
-             class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_> >
-  class Combinatorial_map :
-    public Combinatorial_map_base<d_,
-                                  Combinatorial_map<d_,Items_,Alloc_, Storage_>,
-                                  Items_, Alloc_, Storage_ >
-  {
-  public:
-    typedef Combinatorial_map<d_, Items_,Alloc_, Storage_>  Self;
-    typedef Combinatorial_map_base<d_, Self, Items_, Alloc_, Storage_> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Dart_const_handle Dart_const_handle;
-    typedef typename Base::Alloc Alloc;
-
-    Combinatorial_map() : Base()
-    {}
-
-    Combinatorial_map(const Self & amap)
-    { Base::template copy<Self>(amap); }
-
-    template < class CMap >
-    Combinatorial_map(const CMap & amap)
-    { Base::template copy<CMap>(amap); }
-
-    template < class CMap, typename Converters >
-    Combinatorial_map(const CMap & amap, const Converters& converters)
-    { Base::template copy<CMap, Converters>
-          (amap, converters); }
-
-    template < class CMap, typename Converters, typename Pointconverter >
-    Combinatorial_map(const CMap & amap, const Converters& converters,
-                      const Pointconverter& pointconverter)
-    { Base::template copy<CMap, Converters, Pointconverter>
-          (amap, converters, pointconverter); }
-  };
-
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_basic_operations.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_basic_operations.h
deleted file mode 100644
index 2e19785..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_basic_operations.h
+++ /dev/null
@@ -1,357 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H
-#define CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H 1
-
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/tags.h>
-
-namespace CGAL
-{
-  /** @file Combinatorial_map_basic_operations.h
-   * Basic operations on a combinatorial map.
-   */
-
-  /** Test if the two given darts belong to the same given orbit.
-   * @param amap a combinatorial map.
-   * @param adart1 the first dart.
-   * @param adart2 the second dart.
-   * @return true iff the two darts belong to the same orbit.
-   */
-  template < class Map, class Iterator >
-  bool belong_to_same_orbit(const Map & amap, 
-                            typename Map::Dart_const_handle adart1,
-                            typename Map::Dart_const_handle adart2)
-  {
-    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
-                                           Tag_false>::value) );
-    bool found=false;
-
-    for (Iterator it(amap, adart1); !found && it.cont(); ++it)
-    {
-      if (it == adart2) found = true;
-    }
-
-    return found;
-  }
-
-  /** Test if all the darts of a given orbit are marked.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the orbit.
-   * @param amark the mark.
-   * @return true iff all the darts are marked.
-   */
-  template < class Map, class Iterator >
-  bool is_whole_orbit_marked(const Map & amap, 
-                             typename Map::Dart_const_handle adart,
-                             int amark)
-  {
-    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
-                                           Tag_false>::value) );
-    bool res=true;
-
-    for ( Iterator it(amap, adart); res && it.cont(); ++it )
-    {
-      if (!amap.is_marked(it, amark)) res = false;
-    }
-
-    return res;
-  }
-
-  /** Test if all the darts of a given orbit are unmarked.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the orbit.
-   * @param amark the mark.
-   * @return true iff all the darts are unmarked.
-   */
-  template < class Map, class Iterator >
-  bool is_whole_orbit_unmarked(const Map & amap, 
-                               typename Map::Dart_const_handle adart,
-                               int amark)
-  {
-    amap.negate_mark(amark);
-    bool res=CGAL::is_whole_orbit_marked<Map,Iterator>(amap, adart, amark);
-    amap.negate_mark(amark);
-    return res;
-  }
-
-  /** Mark a given orbit with a given mark.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the orbit.
-   * @param amark the mark.
-   * @return the number of darts of the marked orbit.
-   * @pre The whole orbit must be unmarked.
-   */
-  template < class Map, class Iterator >
-  typename Map::size_type mark_orbit(const Map & amap,
-                                     typename Map::Dart_const_handle adart,
-                                     int amark)
-  {
-    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
-                            Tag_true>::value) );
-    CGAL_assertion( (is_whole_orbit_unmarked<Map,
-                     CMap_non_basic_iterator<Map,Iterator> >
-                     (amap, adart, amark)) );
-    typename Map::size_type res=0;
-
-    for (Iterator it(amap, adart, amark); it.cont(); ++it)
-    {
-      amap.mark(it, amark);
-      ++res;
-    }
-
-    return res;
-  }
-
-  /** Unmark a given orbit with a given mark.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the orbit.
-   * @param amark the mark.
-   * @return the number of darts of the unmarked orbit.
-   * @pre The whole orbit must be marked.
-   */
-  template < class Map, class Iterator >
-  typename Map::size_type unmark_orbit(const Map & amap, 
-                                       typename Map::Dart_const_handle adart,
-                                       int amark)
-  {
-    amap.negate_mark(amark);
-    typename Map::size_type
-        res=CGAL::mark_orbit<Map, Iterator>(amap, adart, amark);
-    amap.negate_mark(amark);
-    return res;
-  }
-
-  /** Test if the two given darts belong to the same cell.
-   * @param amap a combinatorial map.
-   * @param adart1 the first dart.
-   * @param adart2 the second dart.
-   * @return true iff the two darts belong to the same cell.
-   */
-  template < class Map, unsigned int i, unsigned int d>
-  bool belong_to_same_cell(const Map & amap, 
-                           typename Map::Dart_const_handle adart1,
-                           typename Map::Dart_const_handle adart2)
-  {
-    return CGAL::belong_to_same_orbit<Map,
-        typename Map::template Dart_of_cell_range<i,d>::const_iterator>
-        (amap, adart1, adart2);
-  }
-
-  template < class Map, unsigned int i>
-  bool belong_to_same_cell(const Map & amap, 
-                           typename Map::Dart_const_handle adart1,
-                           typename Map::Dart_const_handle adart2)
-  {
-    return CGAL::belong_to_same_cell<Map,i,Map::dimension>(amap,adart1,adart2);
-  }
-
-
-  /** Test if all the darts of a given cell are marked.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the cell.
-   * @param amark the mark.
-   * @return true iff all the darts are marked.
-   */
-  template < class Map, unsigned int i, unsigned int d>
-  bool is_whole_cell_marked(const Map & amap, 
-                            typename Map::Dart_const_handle adart,
-                            int amark)
-  {  
-    return CGAL::is_whole_orbit_marked<Map,
-        typename Map::template Dart_of_cell_range<i,d>::const_iterator>
-        (amap, adart, amark);
-  }
-
-  template < class Map, unsigned int i>
-  bool is_whole_cell_marked(const Map & amap, 
-                            typename Map::Dart_const_handle adart,
-                            int amark)
-  {  
-    return CGAL::is_whole_cell_marked<Map,i,Map::dimension>(amap,adart,amark);
-  }
-
-  /** Test if all the darts of a given cell are unmarked.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the cell.
-   * @param amark the mark.
-   * @return true iff all the darts are marked.
-   */
-  template < class Map, unsigned int i, unsigned int d >
-  bool is_whole_cell_unmarked(const Map & amap, 
-                              typename Map::Dart_const_handle adart,
-                              int amark)
-  {  
-    return CGAL::is_whole_orbit_unmarked<Map,
-        typename Map::template Dart_of_cell_range<i,d>::iterator>
-        (amap, adart, amark);
-  }
-
-  template < class Map, unsigned int i>
-  bool is_whole_cell_unmarked(const Map & amap, 
-                              typename Map::Dart_const_handle adart,
-                              int amark)
-  {  
-    return CGAL::is_whole_cell_unmarked<Map,i,Map::dimension>
-        (amap,adart,amark);
-  }
-
-  /** Mark a given cell with a given mark.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the cell.
-   * @param amark the mark.
-   * @return the number of darts of the marked cell.
-   * @pre The whole cell must be unmarked.
-   */
-  template < class Map, unsigned int i, unsigned int d >
-  typename Map::size_type mark_cell(const Map & amap, 
-                                    typename Map::Dart_const_handle adart,
-                                    int amark)
-  { return CGAL::mark_orbit<Map,
-        typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
-        (amap, adart, amark); }
-     
-  template < class Map, unsigned int i>
-  typename Map::size_type mark_cell(const Map & amap, 
-                                    typename Map::Dart_const_handle adart,
-                                    int amark)
-  { return CGAL::mark_cell<Map,i,Map::dimension>(amap, adart, amark);}
-
-  /** Unmark a given orbit with a given mark.
-   * @param amap a combinatorial map.
-   * @param adart a dart of the cell.
-   * @param amark the mark.
-   * @return the number of darts of the unmarked cell.
-   * @pre The whole cell must be marked.
-   */
-  template < class Map, unsigned int i, unsigned int d >
-  typename Map::size_type unmark_cell(const Map & amap, 
-                                      typename Map::Dart_handle adart,
-                                      int amark)
-  { return CGAL::unmark_orbit<Map,
-        typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
-        (amap, adart, amark);}
-
-  template < class Map, unsigned int i >
-  typename Map::size_type unmark_cell(const Map & amap, 
-                                      typename Map::Dart_handle adart,
-                                      int amark)
-  { return CGAL::unmark_cell<Map,i,Map::dimension>(amap, adart, amark); }
-     
-  /** Compute the degree of a given i-cell c.
-   * The degree is the number of distinct i+1 cells incident to c.
-   * @param amap a combinatorial map. 
-   * @param adart a dart of the cell.
-   * @return the degree of the cell.
-   */
-  template < class Map, unsigned int i >
-  typename Map::size_type degree( const Map & amap, 
-                                  typename Map::Dart_handle adart )
-  {
-    CGAL_assertion(adart != NULL);
-  
-    typename Map::size_type nbIncident = 0;
-    int mark = amap.get_new_mark();
-    int treated = amap.get_new_mark();
-    CGAL_assume(mark != -1); CGAL_assume( treated != -1);
-
-    typename Map::template
-      Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
-    for ( ;it.cont(); ++it )
-    {
-      if (!amap.is_marked(*it, treated))
-      {
-        ++nbIncident;
-        CGAL::mark_cell<Map,i+1>(amap, *it, treated);
-      }
-      amap.mark(*it,mark);
-    }
-  
-    amap.negate_mark(mark);
-    for (it.rewind(); it.cont(); ++it)
-    {
-      if (amap.is_marked(*it, treated))
-        CGAL::unmark_cell<Map,i+1>(amap, *it, treated);
-      amap.mark(*it,mark);
-    }
-  
-    amap.negate_mark(mark);
-    CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-    CGAL_assertion( amap.is_whole_map_unmarked(treated) );
-
-    amap.free_mark(mark);
-    amap.free_mark(treated);
-  
-    CGAL_assertion(nbIncident != 0);
-    return nbIncident;
-  }
-
-  /** Compute the co-degree of a given i-cell c.
-   * The co-degree is the number of distinct i-1 cells incident to c.
-   * @param amap a combinatorial map. 
-   * @param adart a dart of the cell.
-   * @return the co-degree of the cell.
-   */
-  template < class Map, unsigned int i >
-  typename Map::size_type codegree(const Map & amap, 
-                                   typename Map::Dart_handle adart)
-  {
-    CGAL_assertion(adart != NULL);
-  
-    typename Map::size_type nbIncident = 0;
-    int mark = amap.get_new_mark();
-    int treated = amap.get_new_mark();
-    CGAL_assume(mark != -1); CGAL_assume( treated != -1);
-
-    typename Map::template
-      Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
-    for ( ; it.cont(); ++it)
-    {
-      if (!amap.is_marked(*it, treated))
-      {
-        ++nbIncident;
-        CGAL::mark_cell<Map,i-1>(amap, *it, treated);
-      }
-      amap.mark(*it,mark);
-    }
-  
-    amap.negate_mark(mark);
-    for (it.rewind(); it.cont(); ++it)
-    {
-      if (amap.is_marked(*it, treated))      
-        CGAL::unmark_cell<Map,i-1>(amap, *it, treated);
-      amap.mark(*it,mark);
-    }
-
-    amap.negate_mark(mark);
-    CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-    CGAL_assertion( amap.is_whole_map_unmarked(treated) );
-
-    amap.free_mark(mark);
-    amap.free_mark(treated);
-  
-    CGAL_assertion(nbIncident != 0);
-    return nbIncident;
-  }
-
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_functors.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_functors.h
deleted file mode 100644
index cbdef1f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_functors.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_FUNCTORS_H
-#define CGAL_COMBINATORIAL_MAP_FUNCTORS_H
-
-#include <CGAL/Dart_const_iterators.h>
-#include <CGAL/Combinatorial_map_basic_operations.h>
-#include <CGAL/internal/Combinatorial_map_internal_functors.h>
-#include <vector>
-
-/* Definition of functors used to manage attributes (we need functors as
- * attributes are stored in tuple, thus all the access must be done at
- * compiling time). Some of these functors are used with
- * Foreach_enabled_attributes to iterate through all the non void attribs.
- * Functors allowing to group/ungroup attributes are defined in
- * Combinatorial_map_group_functors.h. Some internal functors are defined
- * in internal/Combinatorial_map_internal_functors.h.
- *
- * Reserve_mark_functor<CMap> to reserve one mark, used with
- *   Foreach_enabled_attributes to reserve a mark for each non void attribute.
- *
- * Display_attribute_functor<CMap> to display the address of the i-attribute
- *   of a given dart (can be used with Foreach_enabled_attributes)
- *
- * Set_i_attribute_functor<CMap, i> to set the i-attribute of a given
- *   i-cell.
- *
- * Test_is_valid_attribute_functor<CMap> to test if an attribute is valid
- *    (used with Foreach_enabled_attributes)
- */
-
-namespace CGAL
-{
-/** @file Combinatorial_map_functors.h
- * Definition of functors used for dD Combinatorial map.
- */
-// ****************************************************************************
-/// Functor used to reserve one mark, used with Foreach_enabled_attributes
-/// to reserve a mark for each enabled attribute.
-template<typename CMap>
-struct Reserve_mark_functor
-{
-  template <unsigned int i>
-  static void run(const CMap* amap, std::vector<int>* marks)
-  { (*marks)[i] = amap->get_new_mark(); }
-};
-// ****************************************************************************
-/// Functor used to display the address of the i-cell attribute. Can be used
-/// with Foreach_enabled_attributes.
-template<typename CMap>
-struct Display_attribute_functor
-{
-  template <unsigned int i>
-  static void run(const CMap* /*amap*/,
-                  typename CMap::Dart_const_handle adart)
-  {
-    if ( adart->template attribute<i>()==NULL )
-      std::cout<<"NULL";
-    else
-      std::cout<<&*(adart->template attribute<i>());
-  }
-};
-// ****************************************************************************
-/// Functor used to test if a cell is valid
-template<typename CMap>
-struct Test_is_valid_attribute_functor
-{
-  template <unsigned int i>
-  static bool run(const CMap* amap,
-                  typename CMap::Dart_const_handle adart)
-  {
-    int mark=amap->get_new_mark();
-    bool res = true;
-    CGAL::internal::Test_is_valid_attribute_functor<CMap>::
-        run<i>(amap, adart, mark, &res);
-
-    amap->negate_mark(mark);
-    if ( !amap->is_whole_map_marked(mark) )
-    {
-      for ( CGAL::CMap_dart_const_iterator_basic_of_cell<CMap,i>
-            it(*amap, adart, mark); it.cont(); ++it )
-        amap->unmark(it, mark);
-    }
-    CGAL_assertion ( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-
-    return res;
-  }
-};
-// ****************************************************************************
-/// Functor used to set the i-attribute of a given i-cell.
-/// We can use any range as Range type, by default we use
-/// Dart_of_cell_range<i>
-template<typename CMap, unsigned int i,
-         typename T=typename CMap::template Attribute_type<i>::type>
-struct Set_i_attribute_functor
-{
-  static void run( CMap* amap, typename CMap::Dart_handle dh,
-                   typename CMap::template Attribute_handle<i>::type ah )
-  {
-    amap->template set_attribute<i>(dh, ah);
-  }
-};
-/// Specialization for void attributes.
-template<typename CMap, unsigned int i>
-struct Set_i_attribute_functor<CMap,i,CGAL::Void>
-{
-  static void run( CMap*, typename CMap::Dart_handle,
-                   typename CMap::template Attribute_handle<i>::type)
-  {}
-};
-// ****************************************************************************
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_FUNCTORS_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_insertions.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_insertions.h
deleted file mode 100644
index 7466c50..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_insertions.h
+++ /dev/null
@@ -1,729 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_INSERTIONS_H
-#define CGAL_COMBINATORIAL_MAP_INSERTIONS_H
-
-#include <deque>
-
-namespace CGAL
-{
-/** @file Combinatorial_map_insertions.h
- * Insertion operations on combinatorial map.
- */
-
-/** Insert a vertex in a given edge.
- * @param amap the used combinatorial map.
- * @param adart a dart of the edge (!=NULL && !=null_dart_handle).
- * @param update_attributes a boolean to update the enabled attributes
- *        (deprecated, now we use are_attributes_automatically_managed())
- * @return a dart of the new vertex.
- */
-template<class CMap>
-typename CMap::Dart_handle
-insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
-                         typename CMap::template
-                         Attribute_handle<0>::type ah=CMap::null_handle,
-                         bool update_attributes=true )
-{
-  typename CMap::Dart_handle d1, d2;
-  int mark=amap.get_new_mark();
-
-  // 1) We store all the darts of the edge.
-  std::deque<typename CMap::Dart_handle> vect;
-  int m=amap.get_new_mark();
-  {
-    for ( typename CMap::template Dart_of_cell_basic_range<1>::iterator
-          it=amap.template darts_of_cell_basic<1>(adart, m).begin();
-          it != amap.template darts_of_cell_basic<1>(adart, m).end(); ++it )
-      vect.push_back(it);
-  }
-
-  // 2) For each dart of the cell, we modify link of neighbors.
-  typename std::deque<typename CMap::Dart_handle>::iterator it = vect.begin();
-  for (; it != vect.end(); ++it)
-  {
-    d1 = amap.create_dart();
-
-    if (!amap.template is_free<1>(*it))
-    { amap.basic_link_beta_1(d1, amap.template beta<1>(*it)); }
-
-    for ( unsigned int dim=2; dim<=CMap::dimension; ++dim )
-    {
-      if (!amap.is_free(*it, dim) && amap.is_marked(amap.beta(*it, dim), mark))
-      {
-        amap.basic_link_beta_for_involution(amap.beta(*it, dim), d1, dim);
-        amap.basic_link_beta_for_involution(*it, amap.beta(*it, dim, 1), dim);
-      }
-    }
-
-    amap.basic_link_beta_1(*it, d1);
-
-    if (amap.are_attributes_automatically_managed() && update_attributes)
-    {
-      // We copy all the attributes except for dim=0
-      CMap::Helper::template Foreach_enabled_attributes_except
-        <CGAL::internal::Group_attribute_functor_of_dart<CMap>, 0>::
-        run(&amap,*it,d1);
-    }
-    if (ah != CMap::null_handle)
-    {
-      // We initialise the 0-atttrib to ah
-      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-          run(&amap, d1, ah);
-    }
-    amap.mark(*it, mark);
-  }
-
-  for (it = vect.begin(); it != vect.end(); ++it)
-  {
-    amap.unmark(*it, m);
-    amap.unmark(*it, mark);
-  }
-
-  CGAL_assertion(amap.is_whole_map_unmarked(m));
-  CGAL_assertion(amap.is_whole_map_unmarked(mark));
-
-  amap.free_mark(m);
-  amap.free_mark(mark);
-
-  if (amap.are_attributes_automatically_managed() && update_attributes)
-  {
-    CGAL::internal::Degroup_attribute_functor_run<CMap, 1>::
-      run(&amap, adart, amap.template beta<1>(adart));
-  }
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-  CGAL_assertion( amap.is_valid() );
-#endif
-
-  return amap.template beta<1>(adart);
-}
-
-/** Insert a vertex in the given 2-cell which is splitted in triangles,
- * once for each inital edge of the facet.
- * @param amap the used combinatorial map.
- * @param adart a dart of the facet to triangulate.
- * @param update_attributes a boolean to update the enabled attributes
- *        (deprecated, now we use are_attributes_automatically_managed())
- * @return A dart incident to the new vertex.
- */
-template < class CMap >
-typename CMap::Dart_handle
-insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
-                         typename CMap::template
-                         Attribute_handle<0>::type ah=CMap::null_handle,
-                         bool update_attributes=true )
-{
-  CGAL_assertion(adart!=amap.null_dart_handle);
-
-  typename CMap::Dart_handle first=adart, prev=amap.null_handle,
-    cur=amap.null_handle, next=amap.null_handle,
-    n1=amap.null_handle, n2=amap.null_handle,
-    nn1=amap.null_handle, nn2=amap.null_handle;
-
-  // If the facet is open, we search the dart 0-free
-  while ( !amap.template is_free<0>(first) &&
-          amap.template beta<0>(first)!=adart )
-    first = amap.template beta<0>(first);
-
-  // Mark used to mark darts already treated.
-  int treated = amap.get_new_mark();
-
-  // Stack of marked darts
-  std::deque<typename CMap::Dart_handle> tounmark;
-
-  // Now we run through the facet
-  cur = first;
-  do
-  {
-    next = amap.template beta<1>(cur);
-    amap.mark(cur, treated);
-    tounmark.push_back(cur);
-
-    if (!amap.template is_free<0>(cur))
-    {
-      n1=amap.create_dart();
-      amap.link_beta_0(cur, n1);
-    }
-    else n1 = amap.null_handle;
-
-    if (!amap.template is_free<1>(cur))
-    {
-      n2 = amap.create_dart();
-      amap.link_beta_1(cur, n2);
-    }
-    else n2 = amap.null_handle;
-
-    if ( n1!=amap.null_handle )
-    {
-      if ( n2!=amap.null_handle )
-        amap.basic_link_beta_0(n1, n2);
-
-      if ( prev!=amap.null_handle )
-        amap.template basic_link_beta_for_involution<2>(prev, n1);
-
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-            run(&amap, n1, ah);
-      }
-    }
-
-    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
-    {
-      if ( !amap.is_free(adart, dim) )
-      {
-        if ( !amap.is_marked(amap.beta(cur, dim), treated) )
-        {
-          if (n1!=amap.null_handle)
-          {
-            nn1=amap.create_dart();
-            amap.link_beta_1(amap.beta(cur, dim), nn1);
-            amap.basic_link_beta_for_involution(n1, nn1, dim);
-          }
-          else nn1=amap.null_handle;
-
-          if (n2!=amap.null_handle)
-          {
-            nn2=amap.create_dart();
-            amap.link_beta_0(amap.beta(cur, dim), nn2);
-            amap.basic_link_beta_for_involution(n2, nn2, dim);
-            if (amap.are_attributes_automatically_managed() && update_attributes)
-            {
-              CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-                  run(&amap, nn2, ah);
-            }
-          }
-          else nn2=amap.null_handle;
-
-          if (nn1 != amap.null_handle && nn2 != amap.null_handle)
-            amap.basic_link_beta_1(nn1, nn2);
-
-          if (nn1 != amap.null_handle && prev != amap.null_handle)
-            amap.template basic_link_beta_for_involution<2>
-              (nn1, amap.beta(prev, dim));
-
-          amap.mark(amap.beta(cur, dim), treated);
-        }
-        else
-        {
-          if ( n1!=amap.null_handle )
-            amap.basic_link_beta_for_involution(n1,
-                                                amap.beta(cur, dim, 1), dim);
-          if ( n2!=amap.null_handle )
-            amap.basic_link_beta_for_involution(n2,
-                                                amap.beta(cur, dim, 0), dim);
-        }
-      }
-    }
-
-    prev = n2;
-    cur = next;
-  }
-  while(cur!=first && cur!=amap.null_dart_handle);
-
-  if (n2 != amap.null_handle)
-  {
-    amap.template basic_link_beta_for_involution<2>
-        (amap.template beta<0>(first), n2);
-    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
-    {
-      if ( !amap.is_free(adart, dim) )
-      {
-        amap.template basic_link_beta_for_involution<2>
-          (amap.beta(first, 0, dim), amap.beta(n2, dim));
-      }
-    }
-  }
-
-  // Now we unmark all marked darts, and we degroup the new faces with the
-  // initial one (if 2-attributes are non void).
-  for ( typename std::deque<typename CMap::Dart_handle>::iterator
-        itd=tounmark.begin(); itd!=tounmark.end(); ++itd )
-  {
-    amap.unmark(*itd, treated);
-    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
-    {
-      if ( !amap.is_free(*itd, dim) )
-        amap.unmark(amap.beta(*itd, dim), treated);
-    }
-    if ( *itd!=adart )
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        CGAL::internal::Degroup_attribute_functor_run<CMap, 2>::
-            run(&amap, adart, *itd);
-      }
-  }
-
-  CGAL_assertion(amap.is_whole_map_unmarked(treated));
-  amap.free_mark(treated);
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-  CGAL_assertion( amap.is_valid() );
-#endif
-
-  return n1;
-}
-/** Insert a dangling edge in a 2-cell between given by a dart.
- * @param amap the used combinatorial map.
- * @param adart1 a first dart of the facet (!=NULL && !=null_dart_handle).
- * @param update_attributes a boolean to update the enabled attributes
- *        (deprecated, now we use are_attributes_automatically_managed())
- * @return a dart of the new edge, not incident to the vertex of adart1.
- */
-template<class CMap>
-typename CMap::Dart_handle
-insert_dangling_cell_1_in_cell_2( CMap& amap,
-                                  typename CMap::Dart_handle adart1,
-                                  typename CMap::template
-                                  Attribute_handle<0>::type ah=CMap::null_handle,
-                                  bool update_attributes=true )
-{
-  int mark1 = amap.get_new_mark();
-  std::deque<typename CMap::Dart_handle> to_unmark;
-  {
-    for ( CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
-          it.cont(); ++it )
-    {
-      to_unmark.push_back(it);
-      amap.mark(it,mark1);
-    }
-  }
-
-  typename CMap::Dart_handle d1 = amap.null_handle;
-  typename CMap::Dart_handle d2 = amap.null_handle;
-  unsigned int s1 = 0;
-
-  int treated=amap.get_new_mark();
-
-  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1>
-      it1(amap, adart1, treated);
-
-  for ( ; it1.cont(); ++it1)
-  {
-    d1 = amap.create_dart();
-    d2 = amap.create_dart();
-
-    if ( amap.is_marked(it1, mark1) ) s1 = 0;
-    else s1 = 1;
-
-    if ( !amap.is_free(it1, s1) )
-    {
-      if ( s1==0 )
-        amap.link_beta_1(amap.template beta<0>(it1), d2);
-      else
-        amap.link_beta_0(amap.template beta<1>(it1), d2);
-    }
-
-    if (s1==0)
-    {
-      amap.link_beta_0(it1, d1);
-      amap.link_beta_0(d1, d2);
-    }
-    else
-    {
-      amap.link_beta_1(it1, d1);
-      amap.link_beta_1(d1, d2);
-    }
-
-    amap.template basic_link_beta_for_involution<2>(d1, d2);
-
-    for ( unsigned int dim=3; dim<=CMap::dimension; ++dim)
-    {
-      if ( !amap.is_free(it1, dim) &&
-           amap.is_marked(amap.beta(it1, dim), treated) )
-      {
-        amap.basic_link_beta_for_involution
-          (amap.beta(it1, dim, CGAL_BETAINV(s1)), d1, dim);
-        amap.basic_link_beta_for_involution
-          (amap.beta(it1, dim, CGAL_BETAINV(s1), 2), d2, dim);
-      }
-    }
-    if (amap.are_attributes_automatically_managed() && update_attributes)
-    {
-      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-          run(&amap, d1, ah);
-    }
-    amap.mark(it1, treated);
-  }
-
-  amap.negate_mark(treated);
-  for ( it1.rewind(); it1.cont(); ++it1 )
-  { amap.mark(it1, treated); }
-
-  CGAL_assertion( amap.is_whole_map_marked(treated) );
-  amap.free_mark(treated);
-
-  for ( typename std::deque<typename CMap::Dart_handle>::iterator
-        it=to_unmark.begin(); it!=to_unmark.end(); ++it)
-  { amap.unmark(*it, mark1); }
-
-  CGAL_assertion( amap.is_whole_map_unmarked(mark1) );
-  amap.free_mark(mark1);
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-  CGAL_assertion( amap.is_valid() );
-#endif
-
-  return amap.template beta<0>(adart1);
-}
-
-/** Test if an edge can be inserted onto a 2-cell between two given darts.
- * @param amap the used combinatorial map.
- * @param adart1 a first dart.
- * @param adart2 a second dart.
- * @return true iff an edge can be inserted between adart1 and adart2.
- */
-template < class CMap >
-bool is_insertable_cell_1_in_cell_2(const CMap& amap,
-                                    typename CMap::Dart_const_handle adart1,
-                                    typename CMap::Dart_const_handle adart2)
-{
-  if ( adart1==adart2 ) return false;
-  for ( CGAL::CMap_dart_const_iterator_of_orbit<CMap,1> it(amap,adart1);
-        it.cont(); ++it )
-  {
-    if ( it==adart2 )  return true;
-  }
-  return false;
-}
-
-/** Insert an edge in a 2-cell between two given darts.
- * @param amap the used combinatorial map.
- * @param adart1 a first dart of the facet (!=NULL && !=null_dart_handle).
- * @param adart2 a second dart of the facet. If NULL insert a dangling edge.
- * @param update_attributes a boolean to update the enabled attributes
- *        (deprecated, now we use are_attributes_automatically_managed())
- * @return a dart of the new edge, and not incident to the
- *         same vertex than adart1.
- */
-template<class CMap>
-typename CMap::Dart_handle
-insert_cell_1_in_cell_2(CMap& amap,
-                        typename CMap::Dart_handle adart1,
-                        typename CMap::Dart_handle adart2,
-                        bool update_attributes=true)
-{
-  if ( adart2==amap.null_handle )
-    return insert_dangling_cell_1_in_cell_2(amap,adart1);
-
-  CGAL_assertion(is_insertable_cell_1_in_cell_2<CMap>(amap, adart1, adart2));
-
-  int m1=amap.get_new_mark();
-  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it1(amap, adart1, m1);
-
-  int m2=amap.get_new_mark();
-  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it2(amap, adart2, m2);
-
-  int mark1=amap.get_new_mark();
-  std::deque<typename CMap::Dart_handle> to_unmark;
-  {
-    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
-          it.cont(); ++it )
-    {
-      to_unmark.push_back(it);
-      amap.mark(it, mark1);
-    }
-  }
-
-  typename CMap::Dart_handle d1=amap.null_handle;
-  typename CMap::Dart_handle d2=amap.null_handle;
-  unsigned int s1=0;
-
-  int treated=amap.get_new_mark();
-
-  for ( ; it1.cont(); ++it1, ++it2)
-  {
-    CGAL_assertion (it2.cont() );
-    d1 = amap.create_dart();
-    d2 = amap.create_dart();
-
-    if ( amap.is_marked(it1, mark1) ) s1 = 0;
-    else s1 = 1;
-
-    if ( !amap.is_free(it1, s1) )
-    {
-      if ( s1==0 ) amap.link_beta_1(amap.template beta<0>(it1), d2);
-      else amap.link_beta_0(amap.template beta<1>(it1), d2);
-    }
-
-    if ( !amap.is_free(it2, s1) )
-    {
-      if ( s1==0 ) amap.link_beta_1(amap.template beta<0>(it2), d1);
-      else amap.link_beta_0(amap.template beta<1>(it2), d1);
-    }
-
-    if ( s1==0 )
-    {
-      amap.link_beta_0(it1, d1);
-      amap.link_beta_0(it2, d2);
-    }
-    else
-    {
-      amap.link_beta_1(it1, d1);
-      amap.link_beta_1(it2, d2);
-    }
-    amap.template basic_link_beta_for_involution<2>(d2, d1);
-
-    for ( unsigned int dim=3; dim<=CMap::dimension; ++dim)
-    {
-      if ( !amap.is_free(it1, dim) &&
-           amap.is_marked(amap.beta(it1, dim), treated) )
-      {
-        amap.basic_link_beta_for_involution
-          (amap.beta(it1, dim, CGAL_BETAINV(s1)), d1, dim);
-        amap.basic_link_beta_for_involution
-          (amap.beta(it1, dim, CGAL_BETAINV(s1), 2), d2, dim);
-      }
-    }
-
-    amap.mark(it1,treated);
-  }
-
-  if (amap.are_attributes_automatically_managed() && update_attributes)
-  {
-    CGAL::internal::Degroup_attribute_functor_run<CMap, 2>::run(&amap, d1, d2);
-  }
-
-  amap.negate_mark(m1);
-  amap.negate_mark(m2);
-  it1.rewind(); it2.rewind();
-  for ( ; it1.cont(); ++it1, ++it2)
-  {
-    amap.mark(it1,m1);
-    amap.unmark(it1,treated);
-    amap.mark(it2,m2);
-  }
-  amap.negate_mark(m1);
-  amap.negate_mark(m2);
-  CGAL_assertion( amap.is_whole_map_unmarked(m1) );
-  CGAL_assertion( amap.is_whole_map_unmarked(m2) );
-  CGAL_assertion( amap.is_whole_map_unmarked(treated) );
-  amap.free_mark(m1);
-  amap.free_mark(m2);
-  amap.free_mark(treated);
-
-  typename std::deque<typename CMap::Dart_handle>::iterator it =
-    to_unmark.begin();
-  for (; it != to_unmark.end(); ++it)
-  { amap.unmark(*it, mark1); }
-  CGAL_assertion( amap.is_whole_map_unmarked(mark1) );
-  amap.free_mark(mark1);
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-  CGAL_assertion( amap.is_valid() );
-#endif
-
-  return amap.template beta<0>(adart1);
-}
-
-/** Test if a 2-cell can be inserted onto a given 3-cell along
- * a path of edges.
- * @param amap the used combinatorial map.
- * @param afirst iterator on the begining of the path.
- * @param alast  iterator on the end of the path.
- * @return true iff a 2-cell can be inserted along the path.
- */
-template <class CMap, class InputIterator>
-bool is_insertable_cell_2_in_cell_3(const CMap& amap,
-                                    InputIterator afirst,
-                                    InputIterator alast)
-{
-  CGAL_assertion( CMap::dimension>= 3 );
-
-  // The path must have at least one dart.
-  if (afirst==alast) return false;
-  typename CMap::Dart_const_handle prec = amap.null_handle;
-  typename CMap::Dart_const_handle od = amap.null_handle;
-
-  for (InputIterator it(afirst); it!=alast; ++it)
-  {
-    // The path must contain only non empty darts.
-    if (*it == amap.null_handle || *it==amap.null_dart_handle) return false;
-
-    // Two consecutive darts of the path must belong to two edges
-    // incident to the same vertex of the same volume.
-    if (prec != amap.null_handle)
-    {
-      od = amap.other_extremity(prec);
-      if ( od==amap.null_handle ) return false;
-
-      // of and *it must belong to the same vertex of the same volume
-      if ( !CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *it) )
-        return false;
-    }
-    prec = *it;
-  }
-
-  // The path must be closed.
-  od = amap.other_extremity(prec);
-  if ( od==amap.null_handle ) return false;
-
-  if (!CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *afirst))
-    return false;
-
-  return true;
-}
-
-/** Insert a 2-cell in a given 3-cell along a path of darts.
- * @param amap the used combinatorial map.
- * @param afirst iterator on the begining of the path.
- * @param alast  iterator on the end of the path.
- * @param update_attributes a boolean to update the enabled attributes
- *        (deprecated, now we use are_attributes_automatically_managed())
- * @return a dart of the new 2-cell.
- */
-template<class CMap, class InputIterator>
-typename CMap::Dart_handle
-insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast,
-                        bool update_attributes=true)
-{
-  CGAL_assertion(is_insertable_cell_2_in_cell_3(amap,afirst,alast));
-
-  typename CMap::Dart_handle prec = amap.null_handle, d = amap.null_handle,
-    dd = amap.null_handle, first = amap.null_handle;
-  bool withBeta3 = false;
-
-  {
-    for (InputIterator it(afirst); !withBeta3 && it!=alast; ++it)
-    {
-      if (!amap.template is_free<2>(*it)) withBeta3 = true;
-    }
-  }
-
-  {
-    for (InputIterator it(afirst); it!=alast; ++it)
-    {
-      d = amap.create_dart();
-      if ( withBeta3 )
-        dd = amap.create_dart();
-
-      if (prec != amap.null_handle)
-      {
-        amap.basic_link_beta_0(prec, d);
-        if (withBeta3)
-          amap.basic_link_beta_1(amap.template beta<3>(prec), dd);
-      }
-      else first = d;
-
-      if ( !amap.template is_free<2>((*it)) )
-        amap.template basic_link_beta_for_involution<2>
-            (amap.template beta<2>(*it), dd);
-
-      amap.template link_beta_for_involution<2>(*it, d);
-      if ( withBeta3 )
-        amap.template link_beta_for_involution<3>(d, dd);
-
-      prec = d;
-    }
-  }
-
-  amap.basic_link_beta_0(prec, first);
-  if ( withBeta3 )
-  {
-    amap.basic_link_beta_1(amap.template beta<3>(prec),
-                           amap.template beta<3>(first));
-  }
-
-  // Make copies of the new facet for dimension >=4
-  for ( unsigned int dim=4; dim<=CMap::dimension; ++dim )
-  {
-    if ( !amap.is_free(first, dim) )
-    {
-      typename CMap::Dart_handle first2 = amap.null_handle;
-      prec = amap.null_handle;
-      for ( CMap_dart_iterator_basic_of_orbit<CMap, 1> it(amap, first);
-            it.cont(); ++it )
-      {
-        d = amap.create_dart();
-        amap.basic_link_beta_for_involution(amap.template beta<2>(it), d, dim);
-        if ( withBeta3 )
-        {
-          dd = amap.create_dart();
-          amap.basic_link_beta_for_involution
-            (amap.template beta<2,3>(it), dd, dim);
-          amap.template basic_link_beta_for_involution<3>(d, dd);
-        }
-        if ( prec!=amap.null_handle )
-        {
-          amap.link_beta_0(prec, d);
-          if ( withBeta3 )
-          {
-            amap.basic_link_beta_1(amap.template beta<3>(prec), dd);
-          }
-        }
-        else first2 = prec;
-
-        // We consider dim2=2 out of the loop to use link_beta instead of
-        // basic _link_beta (to modify non void attributes only once).
-        if ( !amap.template is_free<2>(it) &&
-             amap.is_free(amap.template beta<2>(it), dim) )
-          amap.template link_beta_for_involution<2>
-            (amap.beta(it,2,dim), d);
-        if ( withBeta3 &&
-             !amap.template is_free<2>(amap.template beta<3>(it)) &&
-             amap.is_free(amap.template beta<3,2>(it), dim) )
-          amap.template link_beta_for_involution<2>(amap.beta(it,3,2,dim), dd);
-
-        for ( unsigned int dim2=3; dim2<=CMap::dimension; ++dim2 )
-        {
-          if ( dim2+1!=dim && dim2!=dim && dim2!=dim+1 )
-          {
-            if ( !amap.is_free(it, dim2) && amap.is_free(amap.beta(it, dim2), dim) )
-              amap.basic_link_beta_for_involution(amap.beta(it, dim2, dim),
-                                                  d, dim2);
-            if ( withBeta3 && !amap.is_free(amap.template beta<3>(it), dim2) &&
-                 amap.is_free(amap.beta(it, 3, dim2), dim) )
-              amap.basic_link_beta_for_involution
-                (amap.beta(it, 3, dim2, dim), dd, dim2);
-          }
-        }
-        prec = d;
-      }
-      amap.basic_link_beta_0( prec, first2 );
-      if ( withBeta3 )
-      {
-        amap.basic_link_beta_1( amap.template beta<3>(prec),
-                                amap.template beta<3>(first2) );
-      }
-    }
-  }
-
-  // Degroup the attributes
-  if ( withBeta3 )
-  { // Here we cannot use Degroup_attribute_functor_run as new darts do not
-    // have their 3-attribute
-    if (amap.are_attributes_automatically_managed() && update_attributes)
-    {
-      CGAL::internal::Degroup_attribute_functor_run<CMap, 3>::
-          run(&amap, first, amap.template beta<3>(first));
-    }
-  }
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-  CGAL_assertion( amap.is_valid() );
-#endif
-
-  return first;
-}
-
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_INSERTIONS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_iterators_base.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_iterators_base.h
deleted file mode 100644
index ff5e517..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_iterators_base.h
+++ /dev/null
@@ -1,604 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH
-#define CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH 1
-
-#include <CGAL/Compact_container.h>
-#include <queue>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace CGAL {
-
-  /** @file Combinatorial_map_iterators_base.h
-   * Basic classes that serve as tools for definition of iterators.
-   There are 3 classes:
-   *  - CMap_dart_iterator<Map,Const> is the basic generic class defining
-   *    what is an interator on darts.
-   *  - CMap_extend_iterator<Map,Ite,Bi> to extend the given iterator by adding
-   *    the involution Bi.
-   *  - CMap_non_basic_iterator<Map_,Ite> to transform the basic iterator Ite
-   *    into the corresponding non basic iterator.
-   *  - CMap_range<Map,It,ConstIt,BasicIt> generic definition of a range
-   *    given an iterator and its const version
-   *  - CMap_const_range<Map,It,ConstIt,BasicIt> generic definition of a const
-   *    range given an iterator and its const version
-   */
-  //****************************************************************************
-  /// OperationState: type to keep the last operation used by the previous ++.
-  typedef char OperationState;
-
-  /// Enum of all the possible operations used by the ++ operator.
-  enum
-  {
-    OP_NONE = -1, ///< Beginning of the iterator (there is not yet operator++).
-    OP_BETAI,     ///< Previous op was the first beta.
-    OP_BETAI_INV, ///< Previous op was the inverse of the first beta.
-    OP_BETAJ,     ///< Previous op was the second beta.
-    OP_BETAK,     ///< Previous op was the third beta.
-    OP_BETA0I,    ///< Previous op was beta0 o the first beta.
-    OP_BETAI1,    ///< Previous op was the first beta o beta1.
-    OP_BETAIJ,    ///< Previous op was the composition of two beta.
-    OP_BETAJI,    ///< Previous op was the composition of two beta.
-    OP_BETA21,     ///< Previous op was beta21.
-    OP_JUMP,      ///< Previous op was a jump .
-    OP_POP,       ///< Previous op pop a dart from a stack or a queue.
-    OP_END        ///< Previous op go out of the iterator.
-  };
-  //****************************************************************************
-  /** Generic class of iterator onto darts.
-   * Class CMap_dart_iterator is a generic iterator. All the combinatorial
-   * map iterator classes inherit from this class (or one of its subclass).
-   */
-  template < typename Map_,bool Const=false >
-  class CMap_dart_iterator: public boost::mpl::if_c< Const,
-      typename Map_::Dart_container::const_iterator,
-      typename Map_::Dart_container::iterator>::type
-    //public internal::CC_iterator<typename Map_::Dart_container,Const>
-  {
-  public:
-    typedef CMap_dart_iterator<Map_,Const> Self;
-
-    typedef typename boost::mpl::if_c< Const,
-          typename Map_::Dart_container::const_iterator,
-          typename Map_::Dart_container::iterator>::type Base;
-
-    typedef typename boost::mpl::if_c< Const,
-                                       typename Map_::Dart_const_handle,
-                                       typename Map_::Dart_handle>::type
-                                     Dart_handle;
-    typedef typename boost::mpl::if_c< Const, const Map_,
-                                       Map_>::type Map;
-
-    typedef std::input_iterator_tag iterator_category;
-    typedef typename Base::value_type value_type;
-    typedef typename Base::difference_type difference_type;
-    typedef typename Base::pointer pointer;
-    typedef typename Base::reference reference;
-
-    /// true iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator(Map& amap, Dart_handle adart):
-      Base(adart),
-      mmap(&amap),
-      mfirst_dart(adart),
-      mprev_op(OP_NONE)
-    {}
-
-    /// == operator.
-    bool operator==(const Self& aiterator) const
-    {
-      return ( ((*this==mmap->null_handle) && (aiterator==mmap->null_handle)) ||
-               (mfirst_dart == aiterator.mfirst_dart &&
-               static_cast<const Base&>(*this)==
-                static_cast<const Base&>(aiterator)) );
-    }
-
-    /// != operator.
-    bool operator!=(const Self& aiterator) const
-    { return !operator==(aiterator); }
-
-    /// Accessor to the initial dart of the iterator.
-    Dart_handle get_first_dart() const { return mfirst_dart; }
-
-    /// Accessor to the combinatorial map.
-    Map* get_combinatorial_map() const { return mmap; }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    { set_current_dart(mfirst_dart); mprev_op = OP_NONE; }
-
-    /// Test if the iterator is at its end.
-    bool cont() const
-    { return static_cast<const Base&>(*this)!=mmap->null_handle; }
-
-    /// Get the previous operation used for the last ++.
-    OperationState prev_operation()  const { return mprev_op; }
-
-  protected:
-    /// Set the current dart to a given dart
-    void set_current_dart(Dart_handle adart)
-    { Base::operator=(adart); }
-
-  private:
-    /// operator -- in private to invalidate the base operator.
-    Self& operator--()
-    { return *this; }
-    /// operator -- in private to invalidate the base operator.
-    Self operator--(int)
-    { return *this; }
-
-  protected:
-    /// test if adart->beta(ai) exists and is not marked for amark
-    bool is_unmarked(Dart_handle adart, unsigned int ai, unsigned amark) const
-    { return
-#ifdef CGAL_CMAP_DEPRECATED
-        !mmap->is_free(adart,ai) && // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-        !mmap->is_marked(mmap->beta(adart,ai), amark);
-    }
-
-    /// test if adart->beta(ai)->beta(aj) exists
-    bool exist_betaij(Dart_handle adart, unsigned int ai, unsigned int aj) const
-    { return !mmap->is_free(adart, ai) && !mmap->is_free(mmap->beta(adart, ai), aj); }
-
-    /// test if adart->beta(ai)->beta(aj) exists and is not marked for amark
-    bool is_unmarked2(Dart_handle adart, unsigned int ai, unsigned int aj,
-                      unsigned amark) const
-    { return
-#ifdef CGAL_CMAP_DEPRECATED
-         exist_betaij(adart, ai, aj) && // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-        !mmap->is_marked(mmap->beta(adart, ai, aj), amark);
-    }
-
-  protected:
-    /// The map containing the darts to iterate on.
-    Map* mmap;
-
-    /// The initial dart of the iterator.
-    Dart_handle mfirst_dart;
-
-    /// The last operation used for the ++ operator.
-    OperationState mprev_op;
-  };
-  //****************************************************************************
-  /* Class CMap_extend_iterator<Map,Ite,Bi> which extend a given iterator by
-   * adding Bi and by using a stack and a mark.
-   * General case when Ite does not have already a stack.
-   */
-  template <typename Map_,typename Ite,int Bi,
-            typename Ite_has_stack=typename Ite::Use_mark>
-  class CMap_extend_iterator: public Ite
-  {
-  public:
-    typedef CMap_extend_iterator<Map_,Ite,Bi, Ite_has_stack> Self;
-    typedef Ite Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    CGAL_static_assertion( (Bi<=Map::dimension &&
-                            boost::is_same<Ite_has_stack,Tag_false>::value) );
-
-  public:
-    /// Main constructor.
-    CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
-      Base(amap, adart),
-      mmark_number(amark),
-      minitial_dart(adart)
-    {
-      if ( minitial_dart!=amap.null_handle )
-      {
-        this->mmap->mark_null_dart(mmark_number);
-        this->mmap->mark(minitial_dart, mmark_number);
-        if (!this->mmap->is_free(minitial_dart, Bi) &&
-            this->mmap->beta(minitial_dart, Bi)!=minitial_dart )
-        {
-          mto_treat.push(this->mmap->beta(minitial_dart, Bi));
-          this->mmap->mark(this->mmap->beta(minitial_dart, Bi), mmark_number);
-        }
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::operator= ( Base(*this->mmap,minitial_dart) );
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark(minitial_dart, mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-      if (!this->mmap->is_free(minitial_dart, Bi) &&
-          this->mmap->beta(minitial_dart, Bi)!=minitial_dart)
-      {
-        mto_treat.push(this->mmap->beta(minitial_dart, Bi));
-        this->mmap->mark(this->mmap->beta(minitial_dart, Bi), mmark_number);
-      }
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      do
-      {
-        Base::operator++();
-      }
-      while ( this->cont() &&
-              this->mmap->is_marked(*this, mmark_number) );
-
-      if ( !this->cont() )
-      {
-        if ( !mto_treat.empty() )
-        {
-          Base::operator= ( Base(*this->mmap,mto_treat.front()) );
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-          CGAL_assertion( this->mmap->is_marked((*this), mmark_number) );
-
-          if (
-#ifdef CGAL_CMAP_DEPRECATED
-        !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-               !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) )
-          {
-            mto_treat.push(this->mmap->beta(*this, Bi));
-            this->mmap->mark(this->mmap->beta(*this, Bi), mmark_number);
-          }
-        }
-      }
-      else
-      {
-        this->mmap->mark((*this), mmark_number);
-        if (
-#ifdef CGAL_CMAP_DEPRECATED
-        !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-             !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) )
-        {
-          mto_treat.push(this->mmap->beta(*this, Bi));
-          this->mmap->mark(this->mmap->beta(*this, Bi), mmark_number);
-        }
-      }
-
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-
-    /// Initial dart
-    Dart_handle minitial_dart;
-  };
-  //****************************************************************************
-  /* Class CMap_extend_iterator<Map,Ite,Bi> which extend a given iterator by
-   * adding Bi and by using a stack and a mark.
-   * Specialization when Ite has already a stack.
-   */
-  template <typename Map_,typename Ite,int Bi>
-  class CMap_extend_iterator<Map_,Ite,Bi,Tag_true>: public Ite
-  {
-  public:
-    typedef CMap_extend_iterator<Map_,Ite,Bi,Tag_true> Self;
-    typedef Ite Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// Main constructor.
-    CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
-      Base(amap, adart, amark)
-    {
-      if ( this->minitial_dart!=amap.null_handle &&
-           !this->mmap->is_free(this->minitial_dart, Bi) &&
-           this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
-      {
-        this->mto_treat.push(this->mmap->beta(this->minitial_dart, Bi));
-        this->mmap->mark(this->mmap->beta(this->minitial_dart, Bi), this->mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(this->mmark_number != -1);
-      Base::rewind();
-      if ( !this->mmap->is_free(this->minitial_dart, Bi) &&
-           this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
-      {
-        this->mto_treat.push(this->mmap->beta(this->minitial_dart, Bi));
-        this->mmap->mark(this->mmap->beta(this->minitial_dart, Bi), this->mmark_number);
-      }
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      Base::operator++();
-
-      if ( this->cont() )
-      {
-        CGAL_assertion( this->mmap->is_marked(*this, this->mmark_number) );
-
-        if (
-#ifdef CGAL_CMAP_DEPRECATED
-            !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
-#endif // CGAL_CMAP_DEPRECATED
-            !this->mmap->is_marked(this->mmap->beta(*this, Bi), this->mmark_number) )
-        {
-          this->mto_treat.push(this->mmap->beta(*this, Bi));
-          this->mmap->mark(this->mmap->beta(*this, Bi), this->mmark_number);
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-  };
-  //****************************************************************************
-  //* Class CMap_non_basic_iterator allows to transform a basic_iterator onto
-  //* a non basic one, depending if the basic iterator uses mark or not.
-  template <typename Map_,typename Basic_iterator,
-            typename Use_mark=typename Basic_iterator::Use_mark>
-  class CMap_non_basic_iterator;
-  //****************************************************************************
-  template <typename Map_,typename Base_>
-  class CMap_non_basic_iterator<Map_,Base_,Tag_true>:
-    public Base_
-  {
-  public:
-    typedef CMap_non_basic_iterator<Map_,Base_,Tag_true> Self;
-    typedef Base_ Base;
-
-    typedef typename Base::Map Map;
-    typedef typename Base::Dart_handle Dart_handle;
-
-    /// True iff this iterator is basic
-    typedef Tag_false Basic_iterator;
-
-    CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
-                            Tag_true>::value) );
-
-    /// Main constructor.
-    CMap_non_basic_iterator(Map& amap, Dart_handle adart1):
-      Base(amap, adart1, amap.get_new_mark())
-    {}
-
-    /// Destructor.
-    ~CMap_non_basic_iterator()
-    {
-      CGAL_assertion( this->mmark_number!=-1 );
-      if (this->mmap->get_number_of_times_mark_reserved
-          (this->mmark_number)==1)
-        unmark_treated_darts();
-      this->mmap->free_mark(this->mmark_number);
-      this->mmark_number = -1; // To avoid basic class to try to unmark darts.
-    }
-
-    /// Copy constructor.
-    CMap_non_basic_iterator(const Self& aiterator):
-      Base(aiterator)
-    { this->mmap->share_a_mark(this->mmark_number); }
-
-    /// Assignment operator.
-    Self& operator=(const Self& aiterator)
-    {
-      if (this != &aiterator)
-      {
-        if (this->mmap->get_number_of_times_mark_reserved
-            (this->mmark_number)==1)
-          unmark_treated_darts();
-        this->mmap->free_mark(this->mmark_number);
-        this->mmark_number = -1;
-
-        Base::operator=(aiterator);
-        this->mmap->share_a_mark(this->mmark_number);
-      }
-      return *this;
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      unmark_treated_darts();
-      Base::rewind();
-    }
-
-    using Base::operator++;
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Unmark all the marked darts during the iterator.
-    void unmark_treated_darts()
-    {
-      if (this->mmap->is_whole_map_unmarked(this->mmark_number)) return;
-
-      this->mmap->negate_mark(this->mmark_number);
-
-      if (this->mmap->is_whole_map_unmarked(this->mmark_number)) return;
-
-      Base::rewind();
-      while (this->mmap->number_of_unmarked_darts(this->mmark_number) > 0)
-        this->operator++();
-      this->mmap->negate_mark(this->mmark_number);
-      CGAL_assertion(this->mmap->is_whole_map_unmarked(this->mmark_number));
-    }
-  };
-  //****************************************************************************
-  template <typename Map_,typename Base_>
-  class CMap_non_basic_iterator<Map_,Base_,Tag_false>:
-    public Base_
-  {
-  public:
-    typedef CMap_non_basic_iterator<Map_,Base_,Tag_false> Self;
-    typedef Base_ Base;
-
-    typedef typename Base::Map Map;
-    typedef typename Base::Dart_handle Dart_handle;
-
-    /// True iff this iterator is basic
-    typedef Tag_false Basic_iterator;
-
-    CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
-                            Tag_true>::value) );
-
-    /// Main constructor.
-    CMap_non_basic_iterator(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  template <typename Map_, typename It, typename Const_it,
-            typename Basic_iterator=typename It::Basic_iterator>
-  struct CMap_range
-  {
-    typedef It iterator;
-    typedef Const_it const_iterator;
-    CMap_range(Map_ &amap, typename Map_::Dart_handle adart) :
-      mmap(amap), mdart(adart), msize(0)
-    {}
-    iterator begin()             { return iterator(mmap,mdart); }
-    iterator end()               { return iterator(mmap,mmap.null_handle); }
-    const_iterator begin() const { return const_iterator(mmap,mdart); }
-    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-    typename Map_::size_type size() const
-    {
-      if (msize==0)
-        for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
-          ++msize;
-      return msize;
-    }
-    bool empty() const
-    { return mmap.is_empty(); }
-  private:
-    Map_ & mmap;
-    typename Map_::Dart_handle mdart;
-    mutable typename Map_::size_type msize;
-  };
-  //****************************************************************************
-  template <typename Map_, typename It, typename Const_it>
-  struct CMap_range<Map_,It,Const_it,Tag_true>
-  {
-    typedef CMap_range<Map_,It,Const_it,Tag_true> Base_cmap_range;
-    typedef It iterator;
-    typedef Const_it const_iterator;
-    CMap_range(Map_ &amap, typename Map_::Dart_handle adart, int amark=-1):
-      mmap(amap), mdart(adart), msize(0), mmark(amark)
-    {}
-    iterator begin()             { return iterator(mmap,mdart,mmark); }
-    iterator end()               { return iterator(mmap,mmap.null_handle,mmark); }
-    const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
-    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle,mmark); }
-    typename Map_::size_type size() const
-    {
-      if (msize==0)
-        for ( CMap_non_basic_iterator<Map_,const_iterator> it(mmap,mdart);
-              it.cont(); ++it )
-          ++msize;
-      return msize;
-    }
-    bool empty() const
-    { return mmap.is_empty(); }
-  private:
-    Map_ & mmap;
-    typename Map_::Dart_handle mdart;
-    mutable typename Map_::size_type msize;
-    int mmark;
-  };
-  //****************************************************************************
-  template <typename Map_, typename Const_it,
-            typename Basic_iterator=typename Const_it::Basic_iterator>
-  struct CMap_const_range
-  {
-    typedef Const_it const_iterator;
-    CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart):
-      mmap(amap), mdart(adart), msize(0)
-    {}
-    const_iterator begin() const { return const_iterator(mmap,mdart); }
-    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
-    typename Map_::size_type size() const
-    {
-      if (msize==0)
-        for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
-          ++msize;
-      return msize;
-    }
-    bool empty() const
-    { return mmap.is_empty(); }
-  private:
-    const Map_ & mmap;
-    typename Map_::Dart_const_handle mdart;
-    mutable typename Map_::size_type msize;
-  };
-  //****************************************************************************
-  template <typename Map_, typename Const_it>
-  struct CMap_const_range<Map_,Const_it,Tag_true>
-  {
-    typedef Const_it const_iterator;
-    CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart,
-                     int amark=-1):
-      mmap(amap), mdart(adart), msize(0), mmark(amark)
-    {}
-    const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
-    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle,mmark); }
-    typename Map_::size_type size() const
-    {
-      if (msize==0)
-        for ( CMap_non_basic_iterator<Map_,const_iterator> it(mmap,mdart);
-              it.cont(); ++it )
-          ++msize;
-      return msize;
-    }
-    bool empty() const
-    { return mmap.is_empty(); }
-  private:
-    const Map_ & mmap;
-    typename Map_::Dart_const_handle mdart;
-    mutable typename Map_::size_type msize;
-    int mmark;
-  };
-  //****************************************************************************
-} // namespace CGAL
-//******************************************************************************
-#endif // CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH
-//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_operations.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_operations.h
deleted file mode 100644
index 453d276..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_operations.h
+++ /dev/null
@@ -1,811 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_OPERATIONS_H
-#define CGAL_COMBINATORIAL_MAP_OPERATIONS_H 1
-
-#include <CGAL/Combinatorial_map_basic_operations.h>
-#include <CGAL/Combinatorial_map_insertions.h>
-#include <deque>
-#include <stack>
-
-namespace CGAL
-{
-  /** @file Combinatorial_map_operations.h
-   * Some operations to modify a combinatorial map.
-   */
-
-  /** Test if an i-cell can be removed.
-   *  An i-cell can be removed if i==CMap::dimension or i==CMap::dimension-1,
-   *     or if there are at most two (i+1)-cell incident to it.
-   * @param adart a dart of the i-cell.
-   * @return true iff the i-cell can be removed.
-   */
-  template <class CMap, unsigned int i, unsigned int nmi=CMap::dimension-i>
-  struct Is_removable_functor
-  {
-    static bool run(const CMap& amap, typename CMap::Dart_const_handle adart)
-    {
-      // TODO? Optimisation for dim-2, and to not test all the darts of the cell?
-      bool res = true;
-      for ( CGAL::CMap_dart_const_iterator_of_cell<CMap,i> it(amap, adart);
-            res && it.cont(); ++it )
-      {
-        if ( amap.template beta<i+2,i+1>(it)!=
-             amap.template beta<CGAL_BETAINV(i+1),i+2>(it) )
-          res = false;
-      }
-      return res;
-    }
-  };
-  // Specialization for i=CMap::dimension
-  template <class CMap, unsigned int i>
-  struct Is_removable_functor<CMap, i, 0>
-  {
-    static bool run(const CMap&, typename CMap::Dart_const_handle)
-    { return true; }
-  };
-  // Specialization for i=CMap::dimension-1
-  template <class CMap, unsigned int i>
-  struct Is_removable_functor<CMap, i, 1>
-  {
-    static bool run(const CMap&, typename CMap::Dart_const_handle)
-    { return true; }
-  };
-  /** Test if an i-cell can be removed.
-   *  An i-cell can be removed if i==CMap::dimension or i==CMap::dimension-1,
-   *     or if there are at most two (i+1)-cell incident to it.
-   * @param adart a dart of the i-cell.
-   * @return true iff the i-cell can be removed.
-   */
-  template < class CMap, unsigned int i >
-  bool is_removable(const CMap& amap, typename CMap::Dart_const_handle adart)
-  { return CGAL::Is_removable_functor<CMap, i>::run(amap,adart); }
-
-  /** Remove an i-cell, 0<i<dimension, and merge eventually both incident
-   *  (i+1)-cells.
-   *  @param amap the used combinatorial map.
-   *  @param adart a dart of the i-cell to remove.
-   *  @param update_attributes a boolean to update the enabled attributes
-   *         (deprecated, now we use are_attributes_automatically_managed())
-   *  @return the number of deleted darts.
-   */
-  template<class CMap, unsigned int i, unsigned int nmi>
-  struct Remove_cell_functor
-  {
-    static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes)
-    {
-      CGAL_static_assertion ( 1<=i && i<CMap::dimension );
-      CGAL_assertion( (is_removable<CMap,i>(amap, adart)) );
-
-      size_t res = 0;
-
-      typename CMap::Dart_handle d1, d2;
-      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
-
-      int mark = amap.get_new_mark();
-      int mark_modified_darts = amap.get_new_mark();
-
-      std::deque<typename CMap::Dart_handle> to_erase;
-
-      const int iinv = CGAL_BETAINV(i);
-
-      // First we store and mark all the darts of the i-cell to remove.
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i> it(amap,adart,mark);
-            it.cont(); ++it )
-      {
-        to_erase.push_back(it);
-        if ( !amap.template is_free<i+1>(it) && dg1==amap.null_handle )
-        { dg1=it; dg2=amap.template beta<i+1>(it); }
-        amap.mark(it, mark);
-        ++res;
-      }
-
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        // We group the two (i+1)-cells incident if they exist.
-        if ( dg1!=amap.null_handle )
-          CGAL::internal::Group_attribute_functor_run<CMap, i+1>::
-              run(&amap, dg1, dg2);
-      }
-
-      // During the operation, we store in modified_darts the darts modified
-      // to test after the loop the non void attributes that are split.
-      std::deque<typename CMap::Dart_handle> modified_darts;
-
-      // If i==1, we modify beta1, thus in modified_darts we store all
-      // the darts having beta0 modified, and in modified_darts2 all the
-      // darts having beta1 modified. For i>1 all the modified darts are
-      // stored in modified_darts.
-      std::deque<typename CMap::Dart_handle> modified_darts2;
-      std::deque<typename CMap::Dart_handle> &first_modified_darts=
-          (i==1?modified_darts2:modified_darts);
-
-      // For each dart of the i-cell, we modify i-links of neighbors.
-      typename std::deque<typename CMap::Dart_handle>::iterator it =
-          to_erase.begin();
-      for ( ; it!=to_erase.end(); ++it )
-      {
-        d1=amap.template beta<iinv>(*it);
-        while ( d1!=amap.null_dart_handle && amap.is_marked(d1, mark) )
-        {
-          d1=amap.template beta<i+1, iinv>(d1);
-          if ( d1==amap. template beta<iinv>(*it) ) d1=amap.null_dart_handle;
-        }
-
-        if ( !amap.is_marked(d1, mark_modified_darts) )
-        {
-          d2=amap.template beta<i+1,i>(*it);
-          while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) )
-          {
-            d2=amap.template beta<i+1,i>(d2);
-            if ( d2==amap.template beta<i+1,i>(*it) )
-              d2=amap.null_dart_handle;
-          }
-
-          if ( !amap.is_marked(d2, mark_modified_darts) )
-          {
-            if ( d1!=amap.null_dart_handle )
-            {
-              if ( d2!=amap.null_dart_handle && d1!=d2 )
-              {
-                //d1->basic_link_beta(d2, i);
-                amap.template basic_link_beta<i>(d1, d2);
-                amap.mark(d1, mark_modified_darts);
-                amap.mark(d2, mark_modified_darts);
-                first_modified_darts.push_back(d1);
-                modified_darts.push_back(d2);
-                // TODO push only one out of two dart ?
-
-                /*if ( i==1 )
-                {
-                  d2->basic_link_beta(d1, 0);
-                  modified_darts.push_back(d2);
-                }*/
-                //            modified_darts2.push_back(d1);
-              }
-              else
-              {
-                if ( !amap.template is_free<i>(d1) )
-                {
-                  amap.template unlink_beta<i>(d1);
-                  CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
-                  amap.mark(d1, mark_modified_darts);
-                  first_modified_darts.push_back(d1);
-                }
-              }
-            }
-            else if ( d2!=amap.null_dart_handle )
-            {
-              if ( !amap.template is_free<iinv>(d2) )
-              {
-                amap.template unlink_beta<iinv>(d2);
-                CGAL_assertion( !amap.is_marked(d2, mark_modified_darts) );
-                amap.mark(d2, mark_modified_darts);
-                modified_darts.push_back(d2);
-              }
-            }
-          }
-        }
-        if ( amap.template is_free<i+1>(*it) &&
-             !amap.template is_free<i>(*it) )
-        {
-          d1 = amap.template beta<i>(*it);
-          if ( !amap.template is_free<iinv>(d1) )
-          {
-            amap.template unlink_beta<iinv>(d1);
-            CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
-            amap.mark(d1, mark_modified_darts);
-            modified_darts.push_back(d1);
-          }
-        }
-      }
-
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        // We test the split of all the incident cells for all the non
-        // void attributes.
-        if ( i==1 )
-          CMap::Helper::template Foreach_enabled_attributes_except
-              <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
-              run(&amap, modified_darts, modified_darts2,
-                  mark_modified_darts);
-        else
-          CMap::Helper::template Foreach_enabled_attributes_except
-              <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
-              run(&amap, modified_darts, mark_modified_darts);
-      }
-
-      // We remove all the darts of the i-cell.
-      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
-      { amap.erase_dart(*it); }
-
-      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-      amap.free_mark(mark);
-
-      // If no attribute is enabled (or if only i-attributes are enabled),
-      // the darts are not unmark by Foreach_enabled_attributes_except.
-      // Thus we unmark them now.
-      if ( !amap.is_whole_map_unmarked(mark_modified_darts) )
-      {
-        for ( typename std::deque<typename CMap::Dart_handle>::
-                iterator it=modified_darts.begin();
-              it!=modified_darts.end(); ++it )
-          amap.unmark(*it, mark_modified_darts);
-        if ( i==1 )
-        {
-          for ( typename std::deque<typename CMap::Dart_handle>::
-                  iterator it=modified_darts2.begin();
-                it!=modified_darts2.end(); ++it )
-            amap.unmark(*it, mark_modified_darts);
-        }
-      }
-
-      CGAL_assertion ( amap.is_whole_map_unmarked(mark_modified_darts) );
-      amap.free_mark(mark_modified_darts);
-
-#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
-      CGAL_assertion( amap.is_valid() );
-#endif
-
-      return res;
-    }
-  };
-
-  /** Remove a d-cell, in a d-map (special case).
-   *  @param amap the used combinatorial map.
-   *  @param adart a dart of the volume to remove.
-   *  @param update_attributes a boolean to update the enabled attributes
-   *         (deprecated, now we use are_attributes_automatically_managed())
-   *  @return the number of deleted darts.
-   */
-  template<class CMap,unsigned int i>
-  struct Remove_cell_functor<CMap,i,0>
-  {
-    static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes)
-    {
-      int mark = amap.get_new_mark();
-      std::deque<typename CMap::Dart_handle> to_erase;
-      size_t res = 0;
-
-      std::deque<typename CMap::Dart_handle> modified_darts;
-
-      // We mark all the darts of the d-cell.
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,CMap::dimension>
-            it(amap,adart,mark); it.cont(); ++it )
-      {
-        to_erase.push_back(it);
-        amap.mark(it,mark);
-        ++res;
-      }
-
-      // We unlink all the darts of the volume for beta-d.
-      typename std::deque<typename CMap::Dart_handle>::iterator
-        it = to_erase.begin();
-      for ( it = to_erase.begin(); it != to_erase.end(); ++it )
-      {
-        if ( !amap.template is_free<CMap::dimension>(*it) &&
-             !amap.is_marked(amap.template beta<CMap::dimension>(*it), mark) )
-        {
-          if (amap.are_attributes_automatically_managed() && update_attributes)
-          {
-            modified_darts.push_back(amap.template beta<CMap::dimension>(*it));
-          }
-          amap.template unlink_beta_for_involution<CMap::dimension>(*it);
-        }
-      }
-
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        // We test the split of all the incident cells for all the non
-        // void attributes.
-        CMap::Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<CMap,i>,
-           CMap::dimension>::run(&amap, modified_darts);
-      }
-
-      // We remove all the darts of the d-cell.
-      for ( it = to_erase.begin(); it != to_erase.end(); ++it )
-      { amap.erase_dart(*it); }
-
-      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-      amap.free_mark(mark);
-
-#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
-      CGAL_assertion( amap.is_valid() );
-#endif
-
-      return res;
-    }
-  };
-
-  /** Remove a vertex, and merge eventually both incident edges.
-   * @param amap the used combinatorial map.
-   * @param adart a dart of the vertex to remove.
-   * @param update_attributes a boolean to update the enabled attributes
-   *        (deprecated, now we use are_attributes_automatically_managed())
-   * @return the number of deleted darts.
-   */
-  template<class CMap,unsigned int nmi>
-  struct Remove_cell_functor<CMap,0,nmi>
-  {
-    static size_t run(CMap& amap, typename CMap::Dart_handle adart,
-                      bool update_attributes)
-    {
-      CGAL_assertion( (is_removable<CMap,0>(amap,adart)) );
-
-      size_t res = 0;
-
-      typename CMap::Dart_handle d1, d2;
-      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
-
-      int mark = amap.get_new_mark();
-//      int mark_modified_darts = amap.get_new_mark();
-
-      // First we store and mark all the darts of the 0-cell to remove.
-      std::deque<typename CMap::Dart_handle> to_erase;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart,mark);
-            it.cont(); ++it )
-      {
-        to_erase.push_back(it);
-        if ( !amap.template is_free<0>(it) && dg1==amap.null_handle )
-        { dg1=it; dg2=amap.template beta<0>(it); }
-        amap.mark(it, mark);
-        ++res;
-      }
-
-      if (amap.are_attributes_automatically_managed() && update_attributes )
-      {
-        // We group the two edges incident if they exist.
-        if ( dg1!=amap.null_handle )
-          CGAL::internal::Group_attribute_functor_run<CMap, 1>::
-              run(&amap, dg1, dg2);
-      }
-
-      // During the operation, we store in modified_darts the darts modified
-      // by beta0 to test after the loop non void attributes that are split.
-      std::deque<typename CMap::Dart_handle> modified_darts;
-      // And we store in modified_darts2 all the darts having beta1 modified.
-      std::deque<typename CMap::Dart_handle> modified_darts2;
-
-      // For each dart of the vertex, we modify 0 and 1-links of neighbors.
-      typename std::deque<typename CMap::Dart_handle>::iterator it =
-          to_erase.begin();
-      for ( ; it != to_erase.end(); ++it)
-      {
-        if ( !amap.template is_free<0>(*it) )
-        {
-          if ( !amap.template is_free<1>(*it) &&
-               amap.template beta<0>(*it)!=(*it) )
-          {
-            amap.basic_link_beta_1(amap.template beta<0>(*it),
-                                   amap.template beta<1>(*it));
-            if (amap.are_attributes_automatically_managed() && update_attributes)
-            {
-              modified_darts.push_back(amap.template beta<0>(*it));
-              modified_darts2.push_back(amap.template beta<1>(*it));
-              // TODO push only one out of two dart ?
-            }
-          }
-          else
-          {
-            amap.template dart_unlink_beta<1>(amap.template beta<0>(*it));
-            if (amap.are_attributes_automatically_managed() && update_attributes)
-            {
-              modified_darts.push_back(amap.template beta<0>(*it));
-            }
-          }
-
-          for ( unsigned int j=2; j<=CMap::dimension; ++j )
-          {
-            if ( !amap.is_free(*it,j) )
-            {
-              amap.basic_link_beta(amap.template beta<0>(*it),
-                                   amap.beta(*it,j), j);
-            //((*it)->beta(0))->basic_link_beta((*it)->beta(j),j);
-            }
-          }
-        }
-        else
-        {
-          if ( !amap.template is_free<1>(*it) )
-          {
-            amap.template dart_unlink_beta<0>(amap.template beta<1>(*it));
-            if (amap.are_attributes_automatically_managed() && update_attributes)
-            {
-              modified_darts2.push_back(amap.template beta<1>(*it));
-            }
-          }
-
-          for ( unsigned int j=2; j<=CMap::dimension; ++j )
-          {
-            if ( !amap.is_free(*it,j) )
-            { amap.unlink_beta(*it, j); }
-          }
-        }
-      }
-
-      if (amap.are_attributes_automatically_managed() && update_attributes)
-      {
-        // We test the split of all the incident cells for all the non
-        // void attributes.
-        CMap::Helper::template Foreach_enabled_attributes_except
-            <CGAL::internal::Test_split_attribute_functor<CMap,0>, 1>::
-            run(&amap,modified_darts, modified_darts2);
-      }
-
-      // We remove all the darts of the 0-cell.
-      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
-      { amap.erase_dart(*it); }
-
-      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-      amap.free_mark(mark);
-
-#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
-      CGAL_assertion( amap.is_valid() );
-#endif
-
-      return res;
-    }
-  };
-
-  /** Remove an i-cell, 0<=i<=dimension.
-   * @param amap the used combinatorial map.
-   * @param adart a dart of the i-cell to remove.
-   * @param update_attributes a boolean to update the enabled attributes
-   * @return the number of deleted darts.
-   */
-  template < class CMap, unsigned int i >
-  size_t remove_cell(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes = true)
-  {
-    return
-        CGAL::Remove_cell_functor<CMap,i,CMap::dimension-i>::run(amap,adart,update_attributes);
-  }
-
-  /** Test if an i-cell can be contracted.
-   *  An i-cell can be contracted if i==1
-   *     or if there are at most two (i-1)-cell incident to it.
-   * @param adart a dart of the i-cell.
-   * @return true iff the i-cell can be contracted.
-   */
-  template <class CMap, unsigned int i>
-  struct Is_contractible_functor
-  {
-    static bool run(const CMap& amap, typename CMap::Dart_const_handle adart)
-    {
-      // TODO ? Optimisation possible to not test all the darts of the cell ?
-      bool res = true;
-      for ( CGAL::CMap_dart_const_iterator_of_cell<CMap,i> it(amap, adart);
-            res && it.cont(); ++it )
-      {
-        if ( amap.template beta<i-2,i-1>(it)!=
-             amap.template beta<i-1,CGAL_BETAINV(i-2)>(it) )
-          res = false;
-      }
-      return res;
-    }
-  };
-  // Specialization for i=0
-  template <class CMap>
-  struct Is_contractible_functor<CMap, 0>
-  {
-    static bool run(const CMap&, typename CMap::Dart_const_handle)
-    { return false; }
-  };
-  // Specialization for i=1
-  template <class CMap>
-  struct Is_contractible_functor<CMap, 1>
-  {
-    static bool run(const CMap&, typename CMap::Dart_const_handle)
-    { return true; }
-  };
-  /** Test if an i-cell can be contracted.
-   *  An i-cell can be contracted if i==1
-   *     or if there are at most two (i-1)-cell incident to it.
-   * @param adart a dart of the i-cell.
-   * @return true iff the i-cell can be contracted.
-   */
-  template < class CMap, unsigned int i >
-  bool is_contractible(const CMap& amap, typename CMap::Dart_const_handle adart)
-  { return CGAL::Is_contractible_functor<CMap, i>::run(amap,adart); }
-
-  /** Contract an i-cell, 1<i<=dimension, and merge eventually both incident
-   *  (i-1)-cells.
-   * @param amap the used combinatorial map.
-   * @param adart a dart of the i-cell to contract.
-   * @return the number of deleted darts.
-   */
-  template<class CMap, unsigned int i>
-  struct Contract_cell_functor
-  {
-    static size_t run(CMap& amap, typename CMap::Dart_handle adart)
-    {
-      CGAL_static_assertion ( 2<=i && i<=CMap::dimension );
-      CGAL_assertion( (is_contractible<CMap,i>(amap, adart)) );
-
-      size_t res = 0;
-
-      typename CMap::Dart_handle d1, d2;
-      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
-
-      int mark = amap.get_new_mark();
-      int mark_modified_darts = amap.get_new_mark();
-
-      const int imuinv = CGAL_BETAINV(i-1);
-
-      // First we store and mark all the darts of the i-cell to contract.
-      std::deque<typename CMap::Dart_handle> to_erase;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i> it(amap,adart,mark);
-            it.cont(); ++it )
-      {
-        to_erase.push_back(it);
-        if ( !amap.template is_free<i-1>(it) && dg1==amap.null_handle )
-        { dg1=it; dg2=amap.template beta<i-1>(it); }
-        amap.mark(it, mark);
-        ++res;
-      }
-
-      if ( amap.are_attributes_automatically_managed() )
-      {
-        // We group the two (i+1)-cells incident if they exist.
-        if ( dg1!=amap.null_handle )
-          CGAL::internal::Group_attribute_functor_run<CMap,i-1>::
-            run(&amap, dg1, dg2);
-      }
-
-      // During the operation, we store in modified_darts the darts modified
-      // to test after the loop the non void attributes that are split.
-      std::deque<typename CMap::Dart_handle> modified_darts;
-
-      // For each dart of the i-cell, we modify i-links of neighbors.
-      typename std::deque<typename CMap::Dart_handle>::iterator it =
-          to_erase.begin();
-      for ( ; it!=to_erase.end(); ++it )
-      {
-        d1 = amap.template beta<i>(*it);
-        while ( d1!=amap.null_dart_handle && amap.is_marked(d1, mark) )
-        {
-          d1 = amap.template beta<imuinv,i>(d1);
-          if (d1 == amap.template beta<i>(*it)) d1 = amap.null_dart_handle;
-        }
-
-        if ( !amap.is_marked(d1, mark_modified_darts) )
-        {
-          d2 = amap.template beta<i-1,i>(*it);
-          while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) )
-          {
-            d2 = amap.template beta<i-1,i>(d2);
-            if ( d2==amap.template beta<i-1,i>(*it) )
-              d2=amap.null_dart_handle;
-          }
-
-          if ( !amap.is_marked(d2, mark_modified_darts) )
-          {
-            if (d1 != amap.null_dart_handle)
-            {
-              if (d2 != amap.null_dart_handle && d1!=d2 )
-              {
-                amap.template basic_link_beta_for_involution<i>(d1, d2);
-                amap.mark(d1, mark_modified_darts);
-                amap.mark(d2, mark_modified_darts);
-                modified_darts.push_back(d1);
-                modified_darts.push_back(d2);
-                // TODO push only one out of two dart ?
-              }
-              else
-              {
-                if ( !amap.template is_free<i>(d1) )
-                {
-                  amap.template unlink_beta<i>(d1);
-                  CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
-                  amap.mark(d1, mark_modified_darts);
-                  modified_darts.push_back(d1);
-                }
-              }
-            }
-            else if (d2 != amap.null_dart_handle)
-            {
-              if ( !amap.is_free(d2,i) )
-              {
-                amap.template unlink_beta<i>(d2);
-                CGAL_assertion( !amap.is_marked(d2, mark_modified_darts) );
-                amap.mark(d2, mark_modified_darts);
-                modified_darts.push_back(d2);
-              }
-            }
-          }
-        }
-        if (amap.is_free(*it,i-1) && !amap.is_free(*it,i))
-        {
-          d1 = amap.beta(*it,i);
-          if ( !amap.is_free(d1,i) )
-          {
-            amap.template unlink_beta<i>(d1);
-            CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
-            amap.mark(d1, mark_modified_darts);
-            modified_darts.push_back(d1);
-          }
-        }
-      }
-
-      if ( amap.are_attributes_automatically_managed() )
-      {
-        // We test the split of all the incident cells for all the non
-        // void attributes.
-        CMap::Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
-          run(&amap, modified_darts, mark_modified_darts);
-      }
-
-      // We remove all the darts of the i-cell.
-      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
-      { amap.erase_dart(*it); }
-
-      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-      amap.free_mark(mark);
-
-      // If no attribute is enabled (or if only i-attributes are enabled),
-      // the darts are not unmark by Foreach_enabled_attributes_except.
-      // Thus we unmark them now.
-      if ( !amap.is_whole_map_unmarked(mark_modified_darts) )
-      {
-        for ( typename std::deque<typename CMap::Dart_handle>::
-              iterator it=modified_darts.begin();
-              it!=modified_darts.end(); ++it )
-          amap.unmark(*it, mark_modified_darts);
-      }
-
-      CGAL_assertion ( amap.is_whole_map_unmarked(mark_modified_darts) );
-      amap.free_mark(mark_modified_darts);
-
-#ifdef CGAL_CMAP_TEST_VALID_CONTRACTIONS
-      CGAL_assertion( amap.is_valid() );
-#endif
-
-      return res;
-    }
-  };
-
-  /** Contract an edge, and merge eventually both incident vertices.
-   * @param amap the used combinatorial map.
-   * @param adart a dart of the edge to contract.
-   * @return the number of deleted darts.
-   */
-  template<class CMap>
-  struct Contract_cell_functor<CMap,1>
-  {
-    static size_t run(CMap& amap, typename CMap::Dart_handle adart)
-    {
-      CGAL_assertion( (is_contractible<CMap,1>(amap,adart)) );
-
-      size_t res = 0;
-
-      typename CMap::Dart_handle d1, d2;
-      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
-
-      int mark = amap.get_new_mark();
-//      int mark_modified_darts = amap.get_new_mark();
-
-      // First we store and mark all the darts of the 1-cell to contract.
-      std::deque<typename CMap::Dart_handle> to_erase;
-      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,1> it(amap,adart,mark);
-            it.cont(); ++it )
-      {
-        to_erase.push_back(it);
-        if ( dg1==amap.null_handle && !amap.template is_free<0>(it) &&
-             !amap.template is_free<1>(it) )
-        { dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); }
-        amap.mark(it, mark);
-        ++res;
-      }
-
-      if ( amap.are_attributes_automatically_managed() )
-      {
-        // We group the two vertices incident if they exist.
-        if ( dg1!=amap.null_handle )
-          CGAL::internal::Group_attribute_functor_run<CMap, 0, 1>::
-            run(&amap, dg1, dg2);
-      }
-
-      // During the operation, we store in modified_darts the darts modified
-      // by beta0 to test after the loop non void attributes that are split.
-      std::deque<typename CMap::Dart_handle> modified_darts;
-      // And we store in modified_darts2 all the darts having beta1 modified.
-      std::deque<typename CMap::Dart_handle> modified_darts2;
-
-      // For each dart of the cell, we modify link of neighbors.
-      typename std::deque<typename CMap::Dart_handle>::iterator it =
-        to_erase.begin();
-      for ( ; it!=to_erase.end(); ++it )
-      {
-        if ( !amap.template is_free<0>(*it) )
-        {
-          if ( !amap.template is_free<1>(*it) )
-          {
-            if ( amap.template beta<1>(*it)!=*it )
-            {
-               /*modified_darts2.push_back((*it)->template beta<0>());
-              if ( (*it)->beta(0)!=(*it)->beta(1) )*/
-              if ( amap.are_attributes_automatically_managed() )
-              {
-                modified_darts.push_back(amap.template beta<1>(*it));
-              }
-              amap.basic_link_beta_1(amap.template beta<0>(*it),
-                                     amap.template beta<1>(*it));
-            }
-          }
-          else
-          {
-            if ( amap.are_attributes_automatically_managed() )
-            {
-              modified_darts2.push_back(amap.template beta<0>(*it));
-            }
-            amap.template dart_unlink_beta<1>(amap.template beta<0>(*it));
-          }
-        }
-        else
-        {
-          if ( !amap.template is_free<1>(*it) )
-          {
-            if ( amap.are_attributes_automatically_managed() )
-            {
-              modified_darts.push_back(amap.template beta<1>(*it));
-            }
-            amap.template dart_unlink_beta<0>(amap.template beta<1>(*it));
-          }
-        }
-      }
-
-      // We remove all the darts of the cell.
-      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
-      { amap.erase_dart(*it); }
-
-      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
-      amap.free_mark(mark);
-
-      if ( amap.are_attributes_automatically_managed() )
-      {
-        // We test the split of all the incident cells for all the non
-        // void attributes.
-        CMap::Helper::template Foreach_enabled_attributes_except
-          <CGAL::internal::Test_split_attribute_functor<CMap,1>, 1>::
-          run(&amap, modified_darts, modified_darts2);
-      }
-
-#ifdef CGAL_CMAP_TEST_VALID_CONTRACTIONS
-      CGAL_assertion( amap.is_valid() );
-#endif
-
-      return res;
-    }
-  };
-
-  /** Contract an i-cell, 1<=i<=dimension.
-   * @param amap the used combinatorial map.
-   * @param adart a dart of the i-cell to remove.
-   * @return the number of deleted darts.
-   */
-  template < class CMap, unsigned int i >
-  size_t contract_cell(CMap& amap, typename CMap::Dart_handle adart)
-  { return CGAL::Contract_cell_functor<CMap,i>::run(amap,adart); }
-
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_OPERATIONS_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_storages.h b/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_storages.h
deleted file mode 100644
index 0476dfd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_storages.h
+++ /dev/null
@@ -1,409 +0,0 @@
-// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_STORAGES_H
-#define CGAL_COMBINATORIAL_MAP_STORAGES_H 1
-
-#include <CGAL/Handle_hash_function.h>
-
-#include <CGAL/Compact_container.h>
-
-namespace CGAL {
-
-  /** @file Combinatorial_map_storages.h
-   * Definition of storages for dD Combinatorial map.
-   */
-
-  struct Index_hash_function {
-    typedef std::size_t result_type;
-    template <class H>
-    std::size_t operator() (const H& h) const {
-      return h;
-    }
-  };
-
-  // Storage of darts with compact container, beta with handles
-  template<unsigned int d_, class Items_, class Alloc_ >
-  class Combinatorial_map_storage_1
-  {
-  public:
-    typedef Combinatorial_map_storage_1<d_, Items_, Alloc_> Self;
-    typedef CGAL::Tag_false Use_index;
-
-    typedef internal::Combinatorial_map_helper<Self> Helper;
-
-    typedef typename Items_::template Dart_wrapper<Self>  Dart_wrapper;
-    typedef typename Dart_wrapper::Dart                   Dart;
-    typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
-
-    typedef Compact_container<Dart,Dart_allocator>  Dart_container;
-
-    typedef typename Dart_container::iterator       Dart_handle;
-    typedef typename Dart_container::const_iterator Dart_const_handle;
-    typedef typename Dart_container::size_type      size_type;
-
-    typedef CGAL::Void* Null_handle_type;
-    static Null_handle_type null_handle;
-
-    typedef Items_ Items;
-    typedef Alloc_ Alloc;
-
-    template <typename T>
-    struct Container_for_attributes :
-        public Compact_container<T, typename Alloc_::template rebind<T>::other>
-    {};
-
-    /// Typedef for attributes
-    typedef typename Dart_wrapper::Attributes Attributes;
-
-    template<int i>
-    struct Attribute_type: public Helper::template Attribute_type<i>
-    {};
-    template<int i>
-    struct Attribute_handle: public Helper::template Attribute_handle<i>
-    {};
-    template<int i>
-    struct Attribute_const_handle:
-      public Helper::template Attribute_const_handle<i>
-    {};
-    template<int i>
-    struct Attribute_range: public Helper::template Attribute_range<i>
-    {};
-    template<int i>
-    struct Attribute_const_range:
-      public Helper::template Attribute_const_range<i>
-    {};
-
-    /// Number of marks
-    static const size_type NB_MARKS = 32;
-
-    /// The dimension of the combinatorial map.
-    static const unsigned int dimension = d_;
-
-    typedef Handle_hash_function Hash_function;
-
-    // Init
-    void init_storage()
-    {
-#ifdef CGAL_CMAP_DEPRECATED
-      // We must do this ony once, but problem because null_dart_handle
-      // is static !
-      if ( mnull_dart_container.empty() )
-#endif // CGAL_CMAP_DEPRECATED
-      { // emplace null_dart; initialized in Combinatorial_map class
-        null_dart_handle = mnull_dart_container.emplace();
-      }
-    }
-
-   /** Return if this dart is free for adimension.
-     * @param dh a dart handle
-     * @param i the dimension.
-     * @return true iff dh is linked with NULL for \em adimension.
-     */
-    template<unsigned int i>
-    bool is_free(Dart_const_handle dh) const
-    {
-      CGAL_assertion( dh!=NULL );
-      CGAL_assertion(i <= dimension);
-      return dh->mbeta[i]==null_dart_handle;
-    }
-    bool is_free(Dart_const_handle dh, unsigned int i) const
-    {
-      CGAL_assertion( dh!=NULL );
-      CGAL_assertion(i <= dimension);
-      return dh->mbeta[i]==null_dart_handle;
-    }
-
-    /// Set simultaneously all the marks of this dart to a given value.
-    void set_dart_marks(Dart_const_handle ADart,
-                        const std::bitset<NB_MARKS>& amarks) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->set_marks(amarks);
-    }
-    /// Return all the marks of a dart.
-    std::bitset<NB_MARKS> get_dart_marks(Dart_const_handle ADart) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      return ADart->get_marks();
-    }
-    /// Return the mark value of dart a given mark number.
-    bool get_dart_mark(Dart_const_handle ADart, int amark) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      return ADart->get_mark(amark);
-    }
-
-    /// Set the mark of a given mark number to a given value.
-    void set_dart_mark(Dart_const_handle ADart, int amark, bool avalue) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->set_mark(amark, avalue);
-    }
-
-    /// Flip the mark of a given mark number to a given value.
-    void flip_dart_mark(Dart_const_handle ADart, int amark) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->flip_mark(amark);
-    }
-
-    // Access to beta maps
-    Dart_handle get_beta(Dart_handle ADart, int B1)
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return ADart->mbeta[B1];
-    }
-    Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-    template<int B1>
-    Dart_handle get_beta(Dart_handle ADart)
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-    template<int B1>
-    Dart_const_handle get_beta(Dart_const_handle ADart) const
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-
-    // return a handle on the i-attribute
-    template<unsigned int i>
-    typename Attribute_handle<i>::type attribute(Dart_handle ADart)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                     "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (ADart->mattribute_handles);
-    }
-    template<unsigned int i>
-    typename Attribute_const_handle<i>::type
-    attribute(Dart_const_handle ADart) const
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                     "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (ADart->mattribute_handles);
-    }
-
-    // get the attribute given its handle
-    template<unsigned int i>
-    typename Attribute_type<i>::type&
-    get_attribute(typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type&
-    get_attribute(typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-
-    Dart & get_dart(Dart_handle ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-    const Dart & get_dart(Dart_const_handle ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-
-    // Get the dart of the given attribute
-    template<unsigned int i>
-    Dart_handle dart_of_attribute(typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->dart();
-    }
-    template<unsigned int i>
-    Dart_const_handle
-    dart_of_attribute(typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->dart();
-    }
-
-    // Set the dart of the given attribute
-    template<unsigned int i>
-    void set_dart_of_attribute(typename Attribute_handle<i>::type ah,
-                               Dart_handle adart)
-    {
-      CGAL_assertion( ah!=NULL );
-      ah->set_dart(adart);
-    }
-
-    // Get the info of the given attribute
-    template<unsigned int i>
-    typename Attribute_type<i>::type::Info &
-    info_of_attribute(typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->info();
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type::Info &
-    info_of_attribute(typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->info();
-    }
-
-    // Get the info of the i-cell attribute associated with the given dart
-    template<unsigned int i>
-    typename Attribute_type<i>::type::Info & info(Dart_handle adart)
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return info_of_attribute<i>(attribute<i>(adart));
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type::Info &
-    info(Dart_const_handle adart) const
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return info_of_attribute<i>(attribute<i>(adart));
-    }
-
-    // Get the dart of the i-cell attribute associated with the given dart
-    template<unsigned int i>
-    Dart_handle & dart(Dart_handle adart)
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return dart_of_attribute<i>(attribute<i>(adart));
-    }
-    template<unsigned int i>
-    Dart_const_handle dart(Dart_const_handle adart) const
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return dart_of_attribute<i>(attribute<i>(adart));
-    }
-
-    void display_dart(Dart_const_handle ADart) const
-    { std::cout<<&*ADart; }
-
-    template<unsigned int i>
-    void display_attribute(typename Attribute_const_handle<i>::type ah) const
-    { std::cout<<&*ah; }
-
-  protected:
-    // Set the handle on the i th attribute
-    template<unsigned int i>
-    void basic_set_dart_attribute(Dart_handle dh,
-                                  typename Attribute_handle<i>::type ah)
-    {
-      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (dh->mattribute_handles) = ah;
-    }
-
-    /** Link a dart with a given dart for a given dimension.
-     * @param adart the dart to link.
-     * @param adart2 the dart to link with.
-     * @param i the dimension.
-     */
-    template<unsigned int i>
-    void dart_link_beta(Dart_handle adart, Dart_handle adart2)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(adart!=NULL && adart2!=NULL);
-      CGAL_assertion(adart!=null_dart_handle);
-      adart->mbeta[i] = adart2;
-    }
-    void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(adart!=NULL && adart2!=NULL);
-      CGAL_assertion(adart!=null_dart_handle);
-      adart->mbeta[i] = adart2;
-    }
-
-    /** Unlink a dart for a given dimension.
-     * @param adart a dart.
-     * @param i the dimension.
-     */
-    template<unsigned int i>
-    void dart_unlink_beta(Dart_handle adart)
-    {
-      CGAL_assertion(adart!=NULL && i <= dimension);
-      adart->mbeta[i] = null_dart_handle;
-    }
-    void dart_unlink_beta(Dart_handle adart, unsigned int i)
-    {
-      CGAL_assertion(adart!=NULL && i <= dimension);
-      adart->mbeta[i] = null_dart_handle;
-    }
-
-  public:
-    /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle.
-#ifdef CGAL_CMAP_DEPRECATED
-    static
-#endif // CGAL_CMAP_DEPRECATED
-    Dart_handle null_dart_handle; // Todo Dart_const_handle ??
-
-  protected:
-    /// Dart container.
-    Dart_container mdarts;
-
-    /// Container for the null_dart_handle, static data member.
-#ifdef CGAL_CMAP_DEPRECATED
-    static
-#endif // CGAL_CMAP_DEPRECATED
-    Dart_container mnull_dart_container;
-
-    /// Tuple of attributes containers
-    typename Helper::Attribute_containers mattribute_containers;
-  };
-
-  /// null_handle
-  template < unsigned int d_, class Items_, class Alloc_ >
-  typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_handle_type
-  Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle = NULL;
-
-#ifdef CGAL_CMAP_DEPRECATED
-  /// Allocation of static data members
-  /// mnull_dart_container
-  template<unsigned int d_, class Items_, class Alloc_ >
-  typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_container
-  Combinatorial_map_storage_1<d_, Items_, Alloc_>::mnull_dart_container;
-
-  /// null_dart_handle
-  template < unsigned int d_, class Items_, class Alloc_ >
-  typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_handle
-  Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_dart_handle;
-  // =  mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
-  // Does not work on windows => segfault
-  // Thus we initialize null_dart_handle in the Combinatorial_map constructor
-#endif // CGAL_CMAP_DEPRECATED
-
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Compact_container.h b/3rdparty/CGAL-4.6/include/CGAL/Compact_container.h
deleted file mode 100644
index 8b96bce..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Compact_container.h
+++ /dev/null
@@ -1,1166 +0,0 @@
-// Copyright (c) 2003,2004,2007-2010  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2014  GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_COMPACT_CONTAINER_H
-#define CGAL_COMPACT_CONTAINER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Default.h>
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-#include <cstring>
-
-#include <CGAL/memory.h>
-#include <CGAL/iterator.h>
-#include <CGAL/CC_safe_handle.h>
-#include <CGAL/Time_stamper.h>
-
-#include <boost/mpl/if.hpp>
-
-// An STL like container with the following properties :
-// - to achieve compactness, it requires access to a pointer stored in T,
-//   specified by a traits.  This pointer is supposed to be 4 bytes aligned
-//   when the object is alive, otherwise, the container uses the 2 least
-//   significant bits to store information in the pointer.
-// - Ts are allocated in arrays of increasing size, which are linked together
-//   by their first and last element.
-// - the iterator looks at the famous 2 bits to know if it has to deal with
-//   a free/used/boundary element.
-
-// TODO :
-// - Add .resize() (and proper copy of capacity_).
-// - Add preconditions in input that real pointers need to have clean bits.
-//   Also for the allocated memory alignment, and sizeof().
-// - Do a benchmark before/after.
-// - Check the end result with Valgrind.
-// - The bit squatting mechanism will be reused for the conflict flag, maybe
-//   it could be put out of the class.
-
-// TODO low priority :
-// - rebind<> the allocator
-// - Exception safety guarantees
-// - Thread safety guarantees
-// - std requirements on iterators says all defined operations are constant
-//   time amortized (it's not true here, maybe it could be with some work...)
-// - all this is expected especially when there are not so many free objects
-//   compared to the allocated elements.
-// - Should block_size be selectable/hintable by .reserve() ?
-// - would be nice to have a temporary_free_list (still active elements, but
-//   which are going to be freed soon).  Probably it prevents compactness.
-// - eventually something to copy this data structure, providing a way to
-//   update the pointers (give access to a hash_map, at least a function that
-//   converts an old pointer to the new one ?).  Actually it doesn't have to
-//   be stuck to a particular DS, because for a list it's useful too...
-// - Currently, end() can be invalidated on insert() if a new block is added.
-//   It would be nice to fix this.  We could insert the new block at the
-//   beginning instead ?  That would drop the property that iterator order
-//   is preserved.  Maybe it's not a problem if end() is not preserved, after
-//   all nothing is going to dereference it, it's just for comparing with
-//   end() that it can be a problem.
-//   Another way would be to have end() point to the end of an always
-//   empty block (containing no usable element), and insert new blocks just
-//   before this one.
-//   Instead of having the blocks linked between them, the start/end pointers
-//   could point back to the container, so that we can do more interesting
-//   things (e.g. freeing empty blocks automatically) ?
-
-namespace CGAL {
-
-#define CGAL_GENERATE_MEMBER_DETECTOR(X)                                             \
-template<typename T> class has_##X {                                          \
-    struct Fallback { int X; };                                               \
-    struct Derived : T, Fallback { };                                         \
-                                                                              \
-    template<typename U, U> struct Check;                                     \
-                                                                              \
-    typedef char ArrayOfOne[1];                                               \
-    typedef char ArrayOfTwo[2];                                               \
-                                                                              \
-    template<typename U> static ArrayOfOne & func(                            \
-                                            Check<int Fallback::*, &U::X> *); \
-    template<typename U> static ArrayOfTwo & func(...);                       \
-  public:                                                                     \
-    typedef has_##X type;                                                     \
-    enum { value = sizeof(func<Derived>(0)) == 2 };                           \
-} // semicolon is after the macro call
-
-#define CGAL_INIT_COMPACT_CONTAINER_BLOCK_SIZE 14
-#define CGAL_INCREMENT_COMPACT_CONTAINER_BLOCK_SIZE 16
-
-template<unsigned int first_block_size_, unsigned int block_size_increment>
-struct Addition_size_policy
-{
-  static const unsigned int first_block_size = first_block_size_;
-
-  template<typename Compact_container>
-  static void increase_size(Compact_container& cc)
-  { cc.block_size += block_size_increment; }
-
-  template<typename Compact_container>
-  static void get_index_and_block(typename Compact_container::size_type i,
-                                  typename Compact_container::size_type& index,
-                                  typename Compact_container::size_type& block)
-  {
-    typedef typename Compact_container::size_type ST;
-    const ST TWO_M_N = 2*first_block_size_ - block_size_increment;
-    ST delta = TWO_M_N*TWO_M_N + 8*block_size_increment*i;
-    block= (static_cast<ST>(std::sqrt(static_cast<double>(delta))) - TWO_M_N)
-      / (2*block_size_increment);
-
-    if ( block==0 )
-    { index = i + 1; }
-    else
-    {
-      const typename Compact_container::size_type first_element_in_block =
-        block*(first_block_size_+ (block_size_increment*(block - 1))/2);
-
-      index=i - first_element_in_block + 1;
-    }
-  }
-};
-
-template<unsigned int k>
-struct Constant_size_policy
-{
-  static const unsigned int first_block_size = k;
-
-  template<typename Compact_container>
-  static void increase_size(Compact_container& /*cc*/)
-  {}
-
-  template<typename Compact_container>
-  static void get_index_and_block(typename Compact_container::size_type i,
-                                  typename Compact_container::size_type& index,
-                                  typename Compact_container::size_type& block)
-  {
-    block=i/k;
-    index=(i%k)+1;
-  }
-};
-
-// The following base class can be used to easily add a squattable pointer
-// to a class (maybe you loose a bit of compactness though).
-// TODO : Shouldn't adding these bits be done automatically and transparently,
-//        based on the traits class info ?
-class Compact_container_base
-{
-  void * p;
-public:
-  Compact_container_base()
-  : p(NULL) {}
-  void *   for_compact_container() const { return p; }
-  void * & for_compact_container()       { return p; }
-};
-
-// The traits class describes the way to access the pointer.
-// It can be specialized.
-template < class T >
-struct Compact_container_traits {
-  static void *   pointer(const T &t) { return t.for_compact_container(); }
-  static void * & pointer(T &t)       { return t.for_compact_container(); }
-};
-
-namespace internal {
-  template < class DSC, bool Const >
-  class CC_iterator;
-
-  CGAL_GENERATE_MEMBER_DETECTOR(increment_erase_counter);
-
-  // A basic "no erase counter" strategy
-  template <bool Has_erase_counter_tag>
-  class Erase_counter_strategy {
-  public:
-    // Do nothing
-    template <typename Element>
-    static unsigned int erase_counter(const Element &) { return 0; }
-    template <typename Element>
-    static void set_erase_counter(Element &, unsigned int) {}
-    template <typename Element>
-    static void increment_erase_counter(Element &) {}
-  };
-
-
-  // A strategy managing an internal counter
-  template <>
-  class Erase_counter_strategy<true>
-  {
-  public:
-    template <typename Element>
-    static unsigned int erase_counter(const Element &e)
-    {
-      return e.erase_counter();
-    }
-
-    template <typename Element>
-    static void set_erase_counter(Element &e, unsigned int c)
-    {
-      e.set_erase_counter(c);
-    }
-
-    template <typename Element>
-    static void increment_erase_counter(Element &e)
-    {
-      e.increment_erase_counter();
-    }
-  };
-}
-
-template < class T,
-           class Allocator_ = Default,
-           class Increment_policy_ = Default,
-           class TimeStamper_ = Default >
-class Compact_container
-{
-  typedef Allocator_                                Al;
-  typedef typename Default::Get< Al, CGAL_ALLOCATOR(T) >::type Allocator;
-  typedef Increment_policy_                         Ip;
-  typedef typename Default::Get< Ip, 
-            Addition_size_policy<CGAL_INIT_COMPACT_CONTAINER_BLOCK_SIZE,
-                             CGAL_INCREMENT_COMPACT_CONTAINER_BLOCK_SIZE> 
-          >::type                                   Increment_policy;
-  typedef TimeStamper_                              Ts;
-  typedef Compact_container <T, Al, Ip, Ts>         Self;
-  typedef Compact_container_traits <T>              Traits;
-public:
-  typedef typename Default::Get< TimeStamper_,
-                                 CGAL::Time_stamper_impl<T> >::type
-                                                    Time_stamper_impl;
-
-  typedef T                                         value_type;
-  typedef Allocator                                 allocator_type;
-  typedef typename Allocator::reference             reference;
-  typedef typename Allocator::const_reference       const_reference;
-  typedef typename Allocator::pointer               pointer;
-  typedef typename Allocator::const_pointer         const_pointer;
-  typedef typename Allocator::size_type             size_type;
-  typedef typename Allocator::difference_type       difference_type;
-  typedef internal::CC_iterator<Self, false> iterator;
-  typedef internal::CC_iterator<Self, true>  const_iterator;
-  typedef std::reverse_iterator<iterator>           reverse_iterator;
-  typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
-
-  friend class internal::CC_iterator<Self, false>;
-  friend class internal::CC_iterator<Self, true>;
-
-  template<unsigned int first_block_size_, unsigned int block_size_increment>
-    friend struct Addition_size_policy;
-  template<unsigned int k> friend struct Constant_size_policy;
-
-  explicit Compact_container(const Allocator &a = Allocator())
-  : alloc(a)
-  , time_stamper(new Time_stamper_impl())
-  {
-    init ();
-  }
-
-  template < class InputIterator >
-  Compact_container(InputIterator first, InputIterator last,
-                    const Allocator & a = Allocator())
-  : alloc(a)
-  , time_stamper(new Time_stamper_impl())
-  {
-    init();
-    std::copy(first, last, CGAL::inserter(*this));
-  }
-
-  // The copy constructor and assignment operator preserve the iterator order
-  Compact_container(const Compact_container &c)
-  : alloc(c.get_allocator())
-  , time_stamper(new Time_stamper_impl())
-  {
-    init();
-    block_size = c.block_size;
-    *time_stamper = *c.time_stamper;
-    std::copy(c.begin(), c.end(), CGAL::inserter(*this));
-  }
-
-  Compact_container & operator=(const Compact_container &c)
-  {
-    if (&c != this) {
-      Self tmp(c);
-      swap(tmp);
-    }
-    return *this;
-  }
-
-  ~Compact_container()
-  {
-    clear();
-    delete time_stamper;
-  }
-
-  bool is_used(size_type i) const
-  {
-    typename Self::size_type block_number, index_in_block;
-    Increment_policy::template get_index_and_block<Self>(i,
-                                                         index_in_block,
-                                                         block_number);
-    return (type(&all_items[block_number].first[index_in_block])
-                 == USED);
-  }
-
-  const T& operator[] (size_type i) const
-  {
-    CGAL_assertion( is_used(i) );
-
-    typename Self::size_type block_number, index_in_block;
-    Increment_policy::template get_index_and_block<Self>(i,
-                                                         index_in_block,
-                                                         block_number);
-    return all_items[block_number].first[index_in_block];
-  }
-
-  T& operator[] (size_type i)
-  {
-    CGAL_assertion( is_used(i) );
-
-    typename Self::size_type block_number, index_in_block;
-    Increment_policy::template get_index_and_block<Self>(i,
-                                                         index_in_block,
-                                                         block_number);
-    return all_items[block_number].first[index_in_block];
-  }
-
-  void swap(Self &c)
-  {
-    std::swap(alloc, c.alloc);
-    std::swap(capacity_, c.capacity_);
-    std::swap(size_, c.size_);
-    std::swap(block_size, c.block_size);
-    std::swap(first_item, c.first_item);
-    std::swap(last_item, c.last_item);
-    std::swap(free_list, c.free_list);
-    all_items.swap(c.all_items);
-    std::swap(time_stamper, c.time_stamper);
-  }
-
-  iterator begin() { return iterator(first_item, 0, 0); }
-  iterator end()   { return iterator(last_item, 0); }
-
-  const_iterator begin() const { return const_iterator(first_item, 0, 0); }
-  const_iterator end()   const { return const_iterator(last_item, 0); }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  reverse_iterator rend()   { return reverse_iterator(begin()); }
-
-  const_reverse_iterator
-  rbegin() const { return const_reverse_iterator(end()); }
-  const_reverse_iterator
-  rend()   const { return const_reverse_iterator(begin()); }
-
-  // Boost.Intrusive interface
-  iterator iterator_to(reference value) const {
-    return iterator(&value, 0);
-  }
-  const_iterator iterator_to(const_reference value) const {
-    return const_iterator(&value, 0);
-  }
-  static iterator s_iterator_to(reference value) {
-    return iterator(&value, 0);
-  }
-  static const_iterator s_iterator_to(const_reference value) {
-    return const_iterator(&value, 0);
-  }
-
-  // Special insert methods that construct the objects in place
-  // (just forward the arguments to the constructor, to optimize a copy).
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template < typename... Args >
-  iterator
-  emplace(const Args&... args)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(args...);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-#else
-  // inserts a default constructed item.
-  iterator emplace()
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type();
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1 >
-  iterator
-  emplace(const T1 &t1)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3, t4);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4, typename T5 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3, t4, t5);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6, const T7 &t7)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7, typename T8 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-  iterator insert(const T &t)
-  {
-    if (free_list == NULL)
-      allocate_new_block();
-
-    pointer ret = free_list;
-    free_list = clean_pointee(ret);
-    alloc.construct(ret, t);
-    CGAL_assertion(type(ret) == USED);
-    ++size_;
-    time_stamper->set_time_stamp(ret);
-    return iterator(ret, 0);
-  }
-
-  template < class InputIterator >
-  void insert(InputIterator first, InputIterator last)
-  {
-    for (; first != last; ++first)
-      insert(*first);
-  }
-
-  template < class InputIterator >
-  void assign(InputIterator first, InputIterator last)
-  {
-    clear(); // erase(begin(), end()); // ?
-    insert(first, last);
-  }
-
-  void erase(iterator x)
-  {
-    typedef internal::Erase_counter_strategy<
-      internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
-
-    CGAL_precondition(type(&*x) == USED);
-    EraseCounterStrategy::increment_erase_counter(*x);
-    alloc.destroy(&*x);
-/*#ifndef CGAL_NO_ASSERTIONS
-    std::memset(&*x, 0, sizeof(T));
-#endif*/
-    put_on_free_list(&*x);
-    --size_;
-  }
-
-  void erase(iterator first, iterator last) {
-    while (first != last)
-      erase(first++);
-  }
-
-  void clear();
-
-  // Merge the content of d into *this.  d gets cleared.
-  // The complexity is O(size(free list = capacity-size)).
-  void merge(Self &d);
-
-  size_type size() const
-  {
-    CGAL_expensive_assertion(size_ ==
-                             (size_type) std::distance(begin(), end()));
-    return size_;
-  }
-
-  size_type max_size() const
-  {
-    return alloc.max_size();
-  }
-
-  size_type capacity() const
-  {
-    return capacity_;
-  }
-
-  // void resize(size_type sz, T c = T()); // TODO  makes sense ???
-
-  bool empty() const
-  {
-    return size_ == 0;
-  }
-
-  allocator_type get_allocator() const
-  {
-    return alloc;
-  }
-
-  // Returns whether the iterator "cit" is in the range [begin(), end()].
-  // Complexity : O(#blocks) = O(sqrt(capacity())).
-  // This function is mostly useful for purposes of efficient debugging at
-  // higher levels.
-  bool owns(const_iterator cit) const
-  {
-    // We use the block structure to provide an efficient version :
-    // we check if the address is in the range of each block,
-    // and then test whether it is valid (not a free element).
-
-    if (cit == end())
-      return true;
-
-    const_pointer c = &*cit;
-
-    for (typename All_items::const_iterator it = all_items.begin(), itend = all_items.end();
-         it != itend; ++it) {
-      const_pointer p = it->first;
-      size_type s = it->second;
-
-      // Are we in the address range of this block (excluding first and last
-      // elements) ?
-      if (c <= p || (p+s-1) <= c)
-        continue;
-
-      CGAL_assertion_msg( (c-p)+p == c, "wrong alignment of iterator");
-
-      return type(c) == USED;
-    }
-    return false;
-  }
-
-  bool owns_dereferencable(const_iterator cit) const
-  {
-    return cit != end() && owns(cit);
-  }
-
-  /** Reserve method to ensure that the capacity of the Compact_container be
-   * greater or equal than a given value n.
-   */
-  void reserve(size_type n)
-  {
-    if ( capacity_>=n ) return;
-
-    size_type lastblock = all_items.size();
-
-    while ( capacity_<n )
-    { // Pb because the order of free list is no more the order of
-      // allocate_new_block();
-      pointer new_block = alloc.allocate(block_size + 2);
-      all_items.push_back(std::make_pair(new_block, block_size + 2));
-      capacity_ += block_size;
-      // We insert this new block at the end.
-      if (last_item == NULL) // First time
-      {
-        first_item = new_block;
-        last_item  = new_block + block_size + 1;
-        set_type(first_item, NULL, START_END);
-      }
-      else
-      {
-        set_type(last_item, new_block, BLOCK_BOUNDARY);
-        set_type(new_block, last_item, BLOCK_BOUNDARY);
-        last_item = new_block + block_size + 1;
-      }
-      set_type(last_item, NULL, START_END);
-      // Increase the block_size for the next time.
-      Increment_policy::increase_size(*this);
-    }
-
-    // Now we put all the new elements on freelist, starting from the last block
-    // inserted and mark them free in reverse order, so that the insertion order
-    // will correspond to the iterator order...
-    // We don't touch the first and the last one.
-    size_type curblock=all_items.size();
-    do
-    {
-      --curblock; // We are sure we have at least create a new block
-      pointer new_block = all_items[curblock].first;
-      for (size_type i = all_items[curblock].second-2; i >= 1; --i)
-        put_on_free_list(new_block + i);
-    }
-    while ( curblock>lastblock );
-  }
-
-private:
-
-  void allocate_new_block();
-
-  void put_on_free_list(pointer x)
-  {
-    set_type(x, free_list, FREE);
-    free_list = x;
-  }
-
-  // Definition of the bit squatting :
-  // =================================
-  // ptr is composed of a pointer part and the last 2 bits.
-  // Here is the meaning of each of the 8 cases.
-  //
-  //                          value of the last 2 bits as "Type"
-  // pointer part     0              1                2              3
-  //         NULL     user elt       unused           free_list end  start/end
-  //      != NULL     user elt       block boundary   free elt       unused
-  //
-  // meaning of ptr : user stuff     next/prev block  free_list      unused
-
-  enum Type { USED = 0, BLOCK_BOUNDARY = 1, FREE = 2, START_END = 3 };
-
-  // The bit squatting is implemented by casting pointers to (char *), then
-  // subtracting to NULL, doing bit manipulations on the resulting integer,
-  // and converting back.
-
-  static char * clean_pointer(char * p)
-  {
-    return ((p - (char *) NULL) & ~ (std::ptrdiff_t) START_END) + (char *) NULL;
-  }
-
-  // Returns the pointee, cleaned up from the squatted bits.
-  static pointer clean_pointee(const_pointer ptr)
-  {
-    return (pointer) clean_pointer((char *) Traits::pointer(*ptr));
-  }
-
-  // Get the type of the pointee.
-  static Type type(const_pointer ptr)
-  {
-    char * p = (char *) Traits::pointer(*ptr);
-    return (Type) (p - clean_pointer(p));
-  }
-
-  // Sets the pointer part and the type of the pointee.
-  static void set_type(pointer ptr, void * p, Type t)
-  {
-    // This out of range compare is always true and causes lots of
-    // unnecessary warnings.
-    // CGAL_precondition(0 <= t && t < 4);
-    Traits::pointer(*ptr) = (void *) ((clean_pointer((char *) p)) + (int) t);
-  }
-
-  // We store a vector of pointers to all allocated blocks and their sizes.
-  // Knowing all pointers, we don't have to walk to the end of a block to reach
-  // the pointer to the next block.
-  // Knowing the sizes allows to deallocate() without having to compute the size
-  // by walking through the block till its end.
-  // This opens up the possibility for the compiler to optimize the clear()
-  // function considerably when has_trivial_destructor<T>.
-  typedef std::vector<std::pair<pointer, size_type> >  All_items;
-
-  void init()
-  {
-    block_size = Increment_policy::first_block_size;
-    capacity_  = 0;
-    size_      = 0;
-    free_list  = NULL;
-    first_item = NULL;
-    last_item  = NULL;
-    all_items  = All_items();
-    time_stamper->reset();
-  }
-
-  allocator_type   alloc;
-  size_type        capacity_;
-  size_type        size_;
-  size_type        block_size;
-  pointer          free_list;
-  pointer          first_item;
-  pointer          last_item;
-  All_items        all_items;
-
-  // This is a pointer, so that the definition of Compact_container does
-  // not require a complete type `T`.
-  Time_stamper_impl* time_stamper;
-};
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-void Compact_container<T, Allocator, Increment_policy, TimeStamper>::merge(Self &d)
-{
-  CGAL_precondition(&d != this);
-
-  // Allocators must be "compatible" :
-  CGAL_precondition(get_allocator() == d.get_allocator());
-
-  // Concatenate the free_lists.
-  if (free_list == NULL) {
-    free_list = d.free_list;
-  } else if (d.free_list != NULL) {
-    pointer p = free_list;
-    while (clean_pointee(p) != NULL)
-      p = clean_pointee(p);
-    set_type(p, d.free_list, FREE);
-  }
-  // Concatenate the blocks.
-  if (last_item == NULL) { // empty...
-    first_item = d.first_item;
-    last_item  = d.last_item;
-  } else if (d.last_item != NULL) {
-    set_type(last_item, d.first_item, BLOCK_BOUNDARY);
-    set_type(d.first_item, last_item, BLOCK_BOUNDARY);
-    last_item = d.last_item;
-  }
-  all_items.insert(all_items.end(), d.all_items.begin(), d.all_items.end());
-  // Add the sizes.
-  size_ += d.size_;
-  // Add the capacities.
-  capacity_ += d.capacity_;
-  // It seems reasonnable to take the max of the block sizes.
-  block_size = (std::max)(block_size, d.block_size);
-  // Clear d.
-  d.init();
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-void Compact_container<T, Allocator, Increment_policy, TimeStamper>::clear()
-{
-  for (typename All_items::iterator it = all_items.begin(), itend = all_items.end();
-       it != itend; ++it) {
-    pointer p = it->first;
-    size_type s = it->second;
-    for (pointer pp = p + 1; pp != p + s - 1; ++pp) {
-      if (type(pp) == USED)
-        alloc.destroy(pp);
-    }
-    alloc.deallocate(p, s);
-  }
-  init();
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-void Compact_container<T, Allocator, Increment_policy, TimeStamper>::allocate_new_block()
-{
-  typedef internal::Erase_counter_strategy<
-    internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
-
-  pointer new_block = alloc.allocate(block_size + 2);
-  all_items.push_back(std::make_pair(new_block, block_size + 2));
-  capacity_ += block_size;
-  // We don't touch the first and the last one.
-  // We mark them free in reverse order, so that the insertion order
-  // will correspond to the iterator order...
-  for (size_type i = block_size; i >= 1; --i)
-  {
-    EraseCounterStrategy::set_erase_counter(*(new_block + i), 0);
-    put_on_free_list(new_block + i);
-  }
-  // We insert this new block at the end.
-  if (last_item == NULL) // First time
-  {
-      first_item = new_block;
-      last_item  = new_block + block_size + 1;
-      set_type(first_item, NULL, START_END);
-  }
-  else
-  {
-      set_type(last_item, new_block, BLOCK_BOUNDARY);
-      set_type(new_block, last_item, BLOCK_BOUNDARY);
-      last_item = new_block + block_size + 1;
-  }
-  set_type(last_item, NULL, START_END);
-  // Increase the block_size for the next time.
-  Increment_policy::increase_size(*this);
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator==(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return lhs.size() == rhs.size() &&
-    std::equal(lhs.begin(), lhs.end(), rhs.begin());
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator!=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return ! (lhs == rhs);
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator< (const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return std::lexicographical_compare(lhs.begin(), lhs.end(),
-                                      rhs.begin(), rhs.end());
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator> (const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return rhs < lhs;
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator<=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return ! (lhs > rhs);
-}
-
-template < class T, class Allocator, class Increment_policy, class TimeStamper >
-inline
-bool operator>=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
-                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
-{
-  return ! (lhs < rhs);
-}
-
-namespace internal {
-
-  template < class DSC, bool Const >
-  class CC_iterator
-  {
-    typedef typename DSC::iterator                    iterator;
-    typedef CC_iterator<DSC, Const>                   Self;
-  public:
-    typedef typename DSC::value_type                  value_type;
-    typedef typename DSC::size_type                   size_type;
-    typedef typename DSC::difference_type             difference_type;
-    typedef typename boost::mpl::if_c< Const, const value_type*,
-                                       value_type*>::type pointer;
-    typedef typename boost::mpl::if_c< Const, const value_type&,
-                                       value_type&>::type reference;
-    typedef std::bidirectional_iterator_tag           iterator_category;
-
-    // the initialization with NULL is required by our Handle concept.
-    CC_iterator()
-    {
-      m_ptr.p = NULL;
-    }
-
-    // Either a harmless copy-ctor,
-    // or a conversion from iterator to const_iterator.
-    CC_iterator (const iterator &it)
-    {
-      m_ptr.p = &(*it);
-    }
-
-    // Same for assignment operator (otherwise MipsPro warns)
-    CC_iterator & operator= (const iterator &it)
-    {
-      m_ptr.p = &(*it);
-      return *this;
-    }
-
-    // Construction from NULL
-    CC_iterator (Nullptr_t CGAL_assertion_code(n))
-    {
-      CGAL_assertion (n == NULL);
-      m_ptr.p = NULL;
-    }
-
-  private:
-
-    typedef typename DSC::Time_stamper_impl           Time_stamper_impl;
-
-    union {
-      pointer      p;
-      void        *vp;
-    } m_ptr;
-
-    // Only Compact_container should access these constructors.
-    friend class Compact_container<value_type,
-                                   typename DSC::Al,
-                                   typename DSC::Ip,
-                                   typename DSC::Ts>;
-
-
-    // For begin()
-    CC_iterator(pointer ptr, int, int)
-    {
-      m_ptr.p = ptr;
-      if (m_ptr.p == NULL) // empty container.
-        return;
-
-      ++(m_ptr.p); // if not empty, p = start
-      if (DSC::type(m_ptr.p) == DSC::FREE)
-        increment();
-    }
-
-    // Construction from raw pointer and for end().
-    CC_iterator(pointer ptr, int)
-    {
-      m_ptr.p = ptr;
-    }
-
-    // NB : in case empty container, begin == end == NULL.
-    void increment()
-    {
-      // It's either pointing to end(), or valid.
-      CGAL_assertion_msg(m_ptr.p != NULL,
-         "Incrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(DSC::type(m_ptr.p) != DSC::START_END,
-         "Incrementing end() ?");
-
-      // If it's not end(), then it's valid, we can do ++.
-      do {
-        ++(m_ptr.p);
-        if (DSC::type(m_ptr.p) == DSC::USED ||
-            DSC::type(m_ptr.p) == DSC::START_END)
-          return;
-
-        if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY)
-          m_ptr.p = DSC::clean_pointee(m_ptr.p);
-      } while (true);
-    }
-
-    void decrement()
-    {
-      // It's either pointing to end(), or valid.
-      CGAL_assertion_msg(m_ptr.p != NULL,
-         "Decrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(DSC::type(m_ptr.p - 1) != DSC::START_END,
-         "Decrementing begin() ?");
-
-      // If it's not begin(), then it's valid, we can do --.
-      do {
-        --m_ptr.p;
-        if (DSC::type(m_ptr.p) == DSC::USED ||
-            DSC::type(m_ptr.p) == DSC::START_END)
-          return;
-
-        if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY)
-          m_ptr.p = DSC::clean_pointee(m_ptr.p);
-      } while (true);
-    }
-
-  public:
-
-    Self & operator++()
-    {
-      CGAL_assertion_msg(m_ptr.p != NULL,
-         "Incrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(DSC::type(m_ptr.p) == DSC::USED,
-                         "Incrementing an invalid iterator.");
-      increment();
-      return *this;
-    }
-
-    Self & operator--()
-    {
-      CGAL_assertion_msg(m_ptr.p != NULL,
-         "Decrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(DSC::type(m_ptr.p) == DSC::USED
-                      || DSC::type(m_ptr.p) == DSC::START_END,
-                         "Decrementing an invalid iterator.");
-      decrement();
-      return *this;
-    }
-
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-
-    reference operator*() const { return *(m_ptr.p); }
-
-    pointer   operator->() const { return (m_ptr.p); }
-
-    // For std::less...
-    bool operator<(const CC_iterator& other) const
-    {
-      return Time_stamper_impl::less(m_ptr.p, other.m_ptr.p);
-    }
-
-    bool operator>(const CC_iterator& other) const
-    {
-      return Time_stamper_impl::less(other.m_ptr.p, m_ptr.p);
-    }
-
-    bool operator<=(const CC_iterator& other) const
-    {
-      return Time_stamper_impl::less(m_ptr.p, other.m_ptr.p)
-          || (*this == other);
-    }
-
-    bool operator>=(const CC_iterator& other) const
-    {
-      return Time_stamper_impl::less(other.m_ptr.p, m_ptr.p)
-          || (*this == other);
-    }
-
-    // Can itself be used for bit-squatting.
-    void *   for_compact_container() const { return (m_ptr.vp); }
-    void * & for_compact_container()       { return (m_ptr.vp); }
-  };
-
-  template < class DSC, bool Const1, bool Const2 >
-  inline
-  bool operator==(const CC_iterator<DSC, Const1> &rhs,
-                  const CC_iterator<DSC, Const2> &lhs)
-  {
-    return &*rhs == &*lhs;
-  }
-
-  template < class DSC, bool Const1, bool Const2 >
-  inline
-  bool operator!=(const CC_iterator<DSC, Const1> &rhs,
-                  const CC_iterator<DSC, Const2> &lhs)
-  {
-    return &*rhs != &*lhs;
-  }
-
-  // Comparisons with NULL are part of CGAL's Handle concept...
-  template < class DSC, bool Const >
-  inline
-  bool operator==(const CC_iterator<DSC, Const> &rhs,
-                  Nullptr_t CGAL_assertion_code(n))
-  {
-    CGAL_assertion( n == NULL);
-    return &*rhs == NULL;
-  }
-
-  template < class DSC, bool Const >
-  inline
-  bool operator!=(const CC_iterator<DSC, Const> &rhs,
-                  Nullptr_t CGAL_assertion_code(n))
-  {
-    CGAL_assertion( n == NULL);
-    return &*rhs != NULL;
-  }
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_COMPACT_CONTAINER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Compact_mesh_cell_base_3.h b/3rdparty/CGAL-4.6/include/CGAL/Compact_mesh_cell_base_3.h
deleted file mode 100644
index d9a7def..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Compact_mesh_cell_base_3.h
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright (c) 2006-2007  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008,2011 GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h $
-// $Id: Compact_mesh_cell_base_3.h 70288 2012-07-05 10:09:48Z jtournoi $
-//
-//
-// Author(s)     : Laurent Rineau, Stephane Tayeb, Andreas Fabri
-
-
-#ifndef CGAL_COMPACT_MESH_CELL_BASE_3_H
-#define CGAL_COMPACT_MESH_CELL_BASE_3_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/basic.h>
-#include <CGAL/array.h>
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/internal/Dummy_tds_3.h>
-#include <CGAL/tags.h>
-#include <CGAL/Has_timestamp.h>
-
-#include <CGAL/Regular_triangulation_cell_base_3.h>
-#include <CGAL/Mesh_3/io_signature.h>
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/atomic.h>
-#endif
-
-namespace CGAL {
-
-// Class Compact_mesh_cell_base_3_base
-// Base for Compact_mesh_cell_base_3, with specializations
-// for different values of Concurrency_tag
-// Sequential
-template <typename GT, typename Concurrency_tag>
-class Compact_mesh_cell_base_3_base
-{
-  typedef typename GT::Point_3 Point;
-
-protected:
-  Compact_mesh_cell_base_3_base()
-    : bits_(0)
-    , circumcenter_(NULL)
-  {}
-
-public:
-#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
- || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
-
-  // Erase counter (cf. Compact_container)
-  unsigned int erase_counter() const
-  {
-    return this->m_erase_counter;
-  }
-  void set_erase_counter(unsigned int c)
-  {
-    this->m_erase_counter = c;
-  }
-  void increment_erase_counter()
-  {
-    ++this->m_erase_counter;
-  }
-#endif
-
-  /// Marks \c facet as visited
-  void set_facet_visited (const int facet)
-  {
-    CGAL_precondition(facet>=0 && facet <4);
-    bits_ |= (1 << facet);
-  }
-
-  /// Marks \c facet as not visited
-  void reset_visited (const int facet)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    bits_ &= (15 & ~(1 << facet));
-  }
-
-  /// Returns \c true if \c facet is marked as visited
-  bool is_facet_visited (const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return ( (bits_ & (1 << facet)) != 0 );
-  }
-
-  /// Precondition circumcenter_ == NULL
-  void try_to_set_circumcenter(Point *cc) const
-  {
-    CGAL_precondition(circumcenter_ == NULL);
-    circumcenter_ = cc;
-  }
-
-private:
-  char bits_;
-
-#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
- || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
-
-  typedef unsigned int              Erase_counter_type;
-  Erase_counter_type                m_erase_counter;
-#endif
-
-protected:
-  mutable Point * circumcenter_;
-};
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Class Compact_mesh_cell_base_3_base
-// Specialization for parallel
-template <typename GT>
-class Compact_mesh_cell_base_3_base<GT, Parallel_tag>
-{
-  typedef typename GT::Point_3 Point;
-
-protected:
-  Compact_mesh_cell_base_3_base()
-  {
-    bits_ = 0;
-    circumcenter_ = NULL;
-  }
-
-public:
-  // Erase counter (cf. Compact_container)
-  unsigned int erase_counter() const
-  {
-    return this->m_erase_counter;
-  }
-  void set_erase_counter(unsigned int c)
-  {
-    this->m_erase_counter = c;
-  }
-  void increment_erase_counter()
-  {
-    ++this->m_erase_counter;
-  }
-
-  /// Marks \c facet as visited
-  void set_facet_visited (const int facet)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    char current_bits = bits_;
-    while (bits_.compare_and_swap(current_bits | (1 << facet), current_bits) != current_bits)
-    {
-      current_bits = bits_;
-    }
-  }
-
-  /// Marks \c facet as not visited
-  void reset_visited (const int facet)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    char current_bits = bits_;
-    while (bits_.compare_and_swap(current_bits & (15 & ~(1 << facet)), current_bits) != current_bits)
-    {
-      current_bits = bits_;
-    }
-  }
-
-  /// Returns \c true if \c facet is marked as visited
-  bool is_facet_visited (const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return ( (bits_ & (1 << facet)) != 0 );
-  }
-
-  /// If the circumcenter is already set (circumcenter_ != NULL),
-  /// this function "deletes" cc
-  void try_to_set_circumcenter(Point *cc) const
-  {
-    if (circumcenter_.compare_and_swap(cc, NULL) != NULL)
-      delete cc;
-  }
-
-private:
-  typedef tbb::atomic<unsigned int> Erase_counter_type;
-  Erase_counter_type                m_erase_counter;
-  /// Stores visited facets (4 first bits)
-  tbb::atomic<char> bits_;
-
-protected:
-  mutable tbb::atomic<Point*> circumcenter_;
-};
-
-#endif // CGAL_LINKED_WITH_TBB
-
-
-// Class Compact_mesh_cell_base_3
-// Cell base class used in 3D meshing process.
-// Adds information to Cb about the cell of the input complex containing it
-template< class GT,
-          class MD,
-          class TDS = void >
-class Compact_mesh_cell_base_3
-  : public Compact_mesh_cell_base_3_base<GT, typename TDS::Concurrency_tag>
-{
-  typedef typename GT::FT FT;
-  typedef Compact_mesh_cell_base_3_base<GT,typename TDS::Concurrency_tag> Base;
-  using Base::circumcenter_;
-
-public:
-  typedef TDS                          Triangulation_data_structure;
-  typedef typename TDS::Vertex_handle  Vertex_handle;
-  typedef typename TDS::Cell_handle    Cell_handle;
-  typedef typename TDS::Vertex         Vertex;
-  typedef typename TDS::Cell           Cell;
-  typedef typename TDS::Cell_data      TDS_data;
-
-
-  template <typename TDS2>
-  struct Rebind_TDS {
-    typedef Compact_mesh_cell_base_3<GT, MD, TDS2> Other;
-  };
-
-
-  // Index Type
-  typedef typename MD::Subdomain_index      Subdomain_index;
-  typedef typename MD::Surface_patch_index  Surface_patch_index;
-  typedef typename MD::Index                Index;
-
-  typedef GT                   Geom_traits;
-  typedef typename GT::Point_3 Point;
-
-  typedef Point*           Point_container;
-  typedef Point*           Point_iterator;
-  typedef const Point*     Point_const_iterator;
-
-public:
-  void invalidate_circumcenter() const
-  {
-    if (circumcenter_) {
-      delete circumcenter_;
-      circumcenter_ = NULL;
-    }
-  }
-
-public:
-  // Constructors
-  Compact_mesh_cell_base_3()
-    : surface_index_table_()
-    , surface_center_table_()
-#ifdef CGAL_INTRUSIVE_LIST
-    , next_intrusive_()
-    , previous_intrusive_()
-#endif
-    , time_stamp_(-1)
-    , surface_center_index_table_()
-    , sliver_value_(FT(0.))
-    , subdomain_index_()  
-    , sliver_cache_validity_(false)
-  {}
-
-  Compact_mesh_cell_base_3(const Compact_mesh_cell_base_3& rhs)
-    : N(rhs.N)
-    , V(rhs.V)
-#ifdef CGAL_INTRUSIVE_LIST
-    , next_intrusive_(rhs.next_intrusive_)
-    , previous_intrusive_(rhs.previous_intrusive_)
-#endif
-    , time_stamp_(rhs.time_stamp_)
-    , sliver_value_(rhs.sliver_value_)
-    , subdomain_index_(rhs.subdomain_index_)
-    , sliver_cache_validity_(false)
-  {
-    for(int i=0; i <4; i++){
-      surface_index_table_[i] = rhs.surface_index_table_[i];
-      surface_center_table_[i]= rhs.surface_center_table_[i];
-      surface_center_index_table_[i] = rhs.surface_center_index_table_[i];
-    }
-  }
-
-  Compact_mesh_cell_base_3 (Vertex_handle v0,
-                            Vertex_handle v1,
-                            Vertex_handle v2,
-                            Vertex_handle v3)
-    : surface_index_table_()
-    , surface_center_table_()
-    , V(CGAL::make_array(v0, v1, v2, v3))
-#ifdef CGAL_INTRUSIVE_LIST
-    , next_intrusive_()
-    , previous_intrusive_()
-#endif
-    , time_stamp_(-1)
-    , surface_center_index_table_()
-    , sliver_value_(FT(0.))
-    , subdomain_index_()
-    , sliver_cache_validity_(false)
-  {
-  }
-
-
-  Compact_mesh_cell_base_3 (Vertex_handle v0,
-                            Vertex_handle v1,
-                            Vertex_handle v2,
-                            Vertex_handle v3,
-                            Cell_handle n0,
-                            Cell_handle n1,
-                            Cell_handle n2,
-                            Cell_handle n3)
-    : surface_index_table_()
-    , surface_center_table_()
-    , N(CGAL::make_array(n0, n1, n2, n3))
-    , V(CGAL::make_array(v0, v1, v2, v3))
-#ifdef CGAL_INTRUSIVE_LIST
-    , next_intrusive_()
-    , previous_intrusive_()
-#endif
-    , time_stamp_(-1)
-    , surface_center_index_table_()
-    , sliver_value_(FT(0.))
-    , subdomain_index_()
-    , sliver_cache_validity_(false)
-  {
-  }
-
-  ~Compact_mesh_cell_base_3()
-  {
-    if(circumcenter_ != NULL){
-      delete circumcenter_;
-    }
-  }
-
-  // ACCESS FUNCTIONS
-
-  Vertex_handle vertex(int i) const
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3 );
-    return V[i];
-  }
-
-  bool has_vertex(Vertex_handle v) const
-  {
-    return (V[0] == v) || (V[1] == v) || (V[2]== v) || (V[3]== v);
-  }
-
-  bool has_vertex(Vertex_handle v, int & i) const
-  {
-    if (v == V[0]) { i = 0; return true; }
-    if (v == V[1]) { i = 1; return true; }
-    if (v == V[2]) { i = 2; return true; }
-    if (v == V[3]) { i = 3; return true; }
-    return false;
-  }
-
-  int index(Vertex_handle v) const
-  {
-    if (v == V[0]) { return 0; }
-    if (v == V[1]) { return 1; }
-    if (v == V[2]) { return 2; }
-    CGAL_triangulation_assertion( v == V[3] );
-    return 3;
-  }
-
-  Cell_handle neighbor(int i) const
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    return N[i];
-  }
-
-  bool has_neighbor(Cell_handle n) const
-  {
-    return (N[0] == n) || (N[1] == n) || (N[2] == n) || (N[3] == n);
-  }
-
-  bool has_neighbor(Cell_handle n, int & i) const
-  {
-    if(n == N[0]){ i = 0; return true; }
-    if(n == N[1]){ i = 1; return true; }
-    if(n == N[2]){ i = 2; return true; }
-    if(n == N[3]){ i = 3; return true; }
-    return false;
-  }
-
-  int index(Cell_handle n) const
-  {
-    if (n == N[0]) return 0;
-    if (n == N[1]) return 1;
-    if (n == N[2]) return 2;
-    CGAL_triangulation_assertion( n == N[3] );
-    return 3;
-  }
-
-  // SETTING
-
-
-  void set_neighbor(int i, Cell_handle n)
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    CGAL_triangulation_precondition( this != &*n );
-    N[i] = n;
-  }
-
-
-  void set_neighbors()
-  {
-    N[0] = N[1] = N[2] = N[3] = Cell_handle();
-  }
-
-  void set_neighbors(Cell_handle n0, Cell_handle n1,
-                     Cell_handle n2, Cell_handle n3)
-  {
-    CGAL_triangulation_precondition( this != &*n0 );
-    CGAL_triangulation_precondition( this != &*n1 );
-    CGAL_triangulation_precondition( this != &*n2 );
-    CGAL_triangulation_precondition( this != &*n3 );
-    N[0] = n0;
-    N[1] = n1;
-    N[2] = n2;
-    N[3] = n3;
-  }
-
-  // CHECKING
-
-  // the following trivial is_valid allows
-  // the user of derived cell base classes
-  // to add their own purpose checking
-  bool is_valid(bool = false, int = 0) const
-  { return true; }
-
-  // For use by Compact_container.
-  void * for_compact_container() const { return N[0].for_compact_container(); }
-  void * & for_compact_container()     { return N[0].for_compact_container(); }
-
-  // TDS internal data access functions.
-        TDS_data& tds_data()       { return _tds_data; }
-  const TDS_data& tds_data() const { return _tds_data; }
-
-
-  Point_iterator hidden_points_begin() const { return hidden_points_end(); }
-  Point_iterator hidden_points_end() const { return NULL; }
-  void hide_point (const Point &) const { }
-
-
-  // We must override the functions that modify the vertices.
-  // And if the point inside a vertex is modified, we fail,
-  // but there's not much we can do for this now.
-  void set_vertex(int i, Vertex_handle v)
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    invalidate_circumcenter();
-    V[i] = v;
-  }
-
-  void set_vertices()
-  {
-    invalidate_circumcenter();
-    V[0] = V[1] = V[2] = V[3] = Vertex_handle();
-  }
-
-  void set_vertices(Vertex_handle v0, Vertex_handle v1,
-                    Vertex_handle v2, Vertex_handle v3)
-  {
-    invalidate_circumcenter();
-    V[0] = v0;
-    V[1] = v1;
-    V[2] = v2;
-    V[3] = v3;
-  }
-
-  const Point &
-  weighted_circumcenter(const Geom_traits& gt = Geom_traits()) const
-  {
-    if (circumcenter_ == NULL) {
-      this->try_to_set_circumcenter(
-        new Point(gt.construct_weighted_circumcenter_3_object()
-                  (this->vertex(0)->point(),
-                   this->vertex(1)->point(),
-                   this->vertex(2)->point(),
-                   this->vertex(3)->point())));
-    } else {
-      CGAL_expensive_assertion(gt.construct_weighted_circumcenter_3_object()
-                                (this->vertex(0)->point(),
-                                 this->vertex(1)->point(),
-                                 this->vertex(2)->point(),
-                                 this->vertex(3)->point()) == *circumcenter_);
-    }
-    return *circumcenter_;
-  }
-
-
-  // Returns the index of the cell of the input complex that contains the cell
-  Subdomain_index subdomain_index() const { return subdomain_index_; }
-
-  // Sets the index of the cell of the input complex that contains the cell
-  void set_subdomain_index(const Subdomain_index& index)
-  { subdomain_index_ = index; }
-
-  void set_sliver_value(const FT& value)
-  {
-    sliver_cache_validity_ = true;
-    sliver_value_ = value;
-  }
-
-  const FT& sliver_value() const
-  {
-    CGAL_assertion(is_cache_valid());
-    return sliver_value_;
-  }
-
-  bool is_cache_valid() const { return sliver_cache_validity_; }
-  void reset_cache_validity() const { sliver_cache_validity_ = false;  }
-
-  /// Set surface index of \c facet to \c index
-  void set_surface_patch_index(const int facet, const Surface_patch_index& index)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    surface_index_table_[facet] = index;
-  }
-
-  /// Returns surface index of facet \c facet
-  Surface_patch_index surface_patch_index(const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return surface_index_table_[facet];
-  }
-
-  /// Sets surface center of \c facet to \c point
-  void set_facet_surface_center(const int facet, const Point& point)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    surface_center_table_[facet] = point;
-  }
-
-  /// Returns surface center of \c facet
-  Point get_facet_surface_center(const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return surface_center_table_[facet];
-  }
-
-  /// Sets surface center index of \c facet to \c index
-  void set_facet_surface_center_index(const int facet, const Index& index)
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    surface_center_index_table_[facet] = index;
-  }
-
-  /// Returns surface center of \c facet
-  Index get_facet_surface_center_index(const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return surface_center_index_table_[facet];
-  }
-
-  /// Returns true if facet lies on a surface patch
-  bool is_facet_on_surface(const int facet) const
-  {
-    CGAL_precondition(facet>=0 && facet<4);
-    return ( Surface_patch_index() != surface_index_table_[facet]);
-  }
-
-  // -----------------------------------
-  // Backward Compatibility
-  // -----------------------------------
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index   Surface_index;
-
-  void set_surface_index(const int facet, const Surface_index& index)
-  { set_surface_patch_index(facet,index); }
-
-  /// Returns surface index of facet \c facet
-  Surface_index surface_index(const int facet) const
-  { return surface_patch_index(facet); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  // -----------------------------------
-  // End backward Compatibility
-  // -----------------------------------
-
-  static
-  std::string io_signature()
-  {
-    return
-      Get_io_signature<Subdomain_index>()() + "+" +
-      Get_io_signature<Regular_triangulation_cell_base_3<Geom_traits> >()()
-      + "+(" + Get_io_signature<Surface_patch_index>()() + ")[4]";
-  }
-
-#ifdef CGAL_INTRUSIVE_LIST
-public:
-  Cell_handle next_intrusive() const { return next_intrusive_; }
-  void set_next_intrusive(Cell_handle c)
-  { 
-    next_intrusive_ = c; 
-  }
-
-  Cell_handle previous_intrusive() const { return previous_intrusive_; }
-  void set_previous_intrusive(Cell_handle c)
-  { 
-    previous_intrusive_ = c; 
-  }
-#endif // CGAL_INTRUSIVE_LIST
-
-  /// For the determinism of Compact_container iterators
-  ///@{
-  typedef Tag_true Has_timestamp;
-
-  std::size_t time_stamp() const {
-    return time_stamp_;
-  }
-  void set_time_stamp(const std::size_t& ts) {
-    time_stamp_ = ts;
-  }
-  ///@}
-
-private:
-
-
-  /// Stores surface_index for each facet of the cell
-  CGAL::cpp11::array<Surface_patch_index, 4> surface_index_table_;
-  /// Stores surface center of each facet of the cell
-  CGAL::cpp11::array<Point, 4> surface_center_table_;
-  /// Stores surface center index of each facet of the cell
-
-  CGAL::cpp11::array<Cell_handle, 4> N;
-  CGAL::cpp11::array<Vertex_handle, 4> V;
-
-#ifdef CGAL_INTRUSIVE_LIST
-  Cell_handle next_intrusive_, previous_intrusive_;
-#endif
-  std::size_t time_stamp_;
-
-  CGAL::cpp11::array<Index, 4> surface_center_index_table_;
-  /// Stores visited facets (4 first bits)
-
-  //  Point_container _hidden;
-
-  FT sliver_value_;
-
-  // The index of the cell of the input complex that contains me
-  Subdomain_index subdomain_index_;
-
-  TDS_data      _tds_data;
-  mutable bool sliver_cache_validity_;
-
-
-};  // end class Compact_mesh_cell_base_3
-
-template < class GT, class MT, class Cb >
-std::istream&
-operator>>(std::istream &is,
-           Compact_mesh_cell_base_3<GT, MT, Cb> &c)
-{
-  typename Compact_mesh_cell_base_3<GT, MT, Cb>::Subdomain_index index;
-  if(is_ascii(is))
-    is >> index;
-  else
-    read(is, index);
-  if(is) {
-    c.set_subdomain_index(index);
-    for(int i = 0; i < 4; ++i)
-    {
-      typename Compact_mesh_cell_base_3<GT, MT, Cb>::Surface_patch_index i2;
-      if(is_ascii(is))
-        is >> i2;
-      else
-      {
-        read(is, i2);
-      }
-      c.set_surface_patch_index(i, i2);
-    }
-  }
-  return is;
-}
-
-template < class GT, class MT, class Cb >
-std::ostream&
-operator<<(std::ostream &os,
-           const Compact_mesh_cell_base_3<GT, MT, Cb> &c)
-{
-  if(is_ascii(os))
-     os << c.subdomain_index();
-  else
-    write(os, c.subdomain_index());
-  for(int i = 0; i < 4; ++i)
-  {
-    if(is_ascii(os))
-      os << ' ' << c.surface_patch_index(i);
-    else
-      write(os, c.surface_patch_index(i));
-  }
-  return os;
-}
-
-
-// Specialization for void.
-template <typename GT, typename MD>
-class Compact_mesh_cell_base_3<GT, MD, void>
-{
-public:
-  typedef internal::Dummy_tds_3                         Triangulation_data_structure;
-  typedef Triangulation_data_structure::Vertex_handle   Vertex_handle;
-  typedef Triangulation_data_structure::Cell_handle     Cell_handle;
-  template <typename TDS2>
-  struct Rebind_TDS { typedef Compact_mesh_cell_base_3<GT, MD, TDS2> Other; };
-};
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_COMPACT_MESH_CELL_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Concurrent_compact_container.h b/3rdparty/CGAL-4.6/include/CGAL/Concurrent_compact_container.h
deleted file mode 100644
index 496585e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Concurrent_compact_container.h
+++ /dev/null
@@ -1,1026 +0,0 @@
-// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL:  $
-// $Id:  $
-//
-// Author(s)     : Clement Jamin
-
-#ifdef CGAL_LINKED_WITH_TBB
-
-#ifndef CGAL_CONCURRENT_COMPACT_CONTAINER_H
-#define CGAL_CONCURRENT_COMPACT_CONTAINER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Default.h>
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-#include <cstring>
-
-#include <CGAL/memory.h>
-#include <CGAL/iterator.h>
-#include <CGAL/CC_safe_handle.h>
-
-#include <tbb/tbb.h>
-
-#include <boost/mpl/if.hpp>
-
-namespace CGAL {
-
-#define CGAL_GENERATE_MEMBER_DETECTOR(X)                                           \
-template<typename T> class has_##X {                                          \
-    struct Fallback { int X; };                                               \
-    struct Derived : T, Fallback { };                                         \
-                                                                              \
-    template<typename U, U> struct Check;                                     \
-                                                                              \
-    typedef char ArrayOfOne[1];                                               \
-    typedef char ArrayOfTwo[2];                                               \
-                                                                              \
-    template<typename U> static ArrayOfOne & func(                            \
-                                            Check<int Fallback::*, &U::X> *); \
-    template<typename U> static ArrayOfTwo & func(...);                       \
-  public:                                                                     \
-    typedef has_##X type;                                                     \
-    enum { value = sizeof(func<Derived>(0)) == 2 };                           \
-} // semicolon is after the macro call
-
-#define CGAL_INIT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE 14
-#define CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE 16
-
-// The traits class describes the way to access the pointer.
-// It can be specialized.
-template < class T >
-struct Concurrent_compact_container_traits {
-  static void *   pointer(const T &t) { return t.for_compact_container(); }
-  static void * & pointer(T &t)       { return t.for_compact_container(); }
-};
-
-namespace CCC_internal {
-  template < class CCC, bool Const >
-  class CCC_iterator;
-  
-  CGAL_GENERATE_MEMBER_DETECTOR(increment_erase_counter);
-  
-  // A basic "no erase counter" strategy
-  template <bool Has_erase_counter_tag>
-  class Erase_counter_strategy {
-  public:
-    // Do nothing
-    template <typename Element>
-    static unsigned int erase_counter(const Element &) { return 0; }
-    template <typename Element>
-    static void set_erase_counter(Element &, unsigned int) {}
-    template <typename Element>
-    static void increment_erase_counter(Element &) {}
-  };
-
-
-  // A strategy managing an internal counter
-  template <>
-  class Erase_counter_strategy<true>
-  {
-  public:
-    template <typename Element>
-    static unsigned int erase_counter(const Element &e)
-    {
-      return e.erase_counter();
-    }
-
-    template <typename Element>
-    static void set_erase_counter(Element &e, unsigned int c)
-    {
-      e.set_erase_counter(c);
-    }
-
-    template <typename Element>
-    static void increment_erase_counter(Element &e)
-    {
-      e.increment_erase_counter();
-    }
-  };
-}
-
-// Free list (head and size)
-template< typename pointer, typename size_type, typename CCC >
-class Free_list {
-public:
-  Free_list() : m_head(NULL), m_size(0) {}
-
-  void init()                { m_head = NULL; m_size = 0; }
-  pointer head() const       { return m_head; }
-  void set_head(pointer p)   { m_head = p; }
-  size_type size() const     { return m_size; }
-  void set_size(size_type s) { m_size = s; }
-  void inc_size()            { ++m_size; }
-  void dec_size()            { --m_size; }
-  bool empty()               { return size() == 0; }
-  // Warning: copy the pointer, not the data!
-  Free_list& operator= (const Free_list& other)
-  {
-    m_head = other.m_head;
-    m_size = other.m_size;
-    return *this;
-  }
-
-  void merge(Free_list &other)
-  {
-    if (m_head == NULL) {
-      *this = other;
-    }
-    else if (!other.empty())
-    {
-      pointer p = m_head;
-      while (CCC::clean_pointee(p) != NULL)
-        p = CCC::clean_pointee(p);
-      CCC::set_type(p, other.m_head, CCC::FREE);
-      m_size += other.m_size;
-    }
-    other.init(); // clear other
-  }
-
-protected:
-  pointer   m_head;  // the free list head pointer
-  size_type m_size;  // the free list size
-};
-
-// Class Concurrent_compact_container
-//
-// Safe concurrent "insert" and "erase".
-// Do not parse the container while others are modifying it.
-//
-template < class T, class Allocator_ = Default >
-class Concurrent_compact_container
-{
-  typedef Allocator_                                                Al;
-  typedef typename Default::Get<Al, CGAL_ALLOCATOR(T) >::type       Allocator;
-  typedef Concurrent_compact_container <T, Al>                      Self;
-  typedef Concurrent_compact_container_traits <T>                   Traits;
-
-public:
-  typedef T                                         value_type;
-  typedef Allocator                                 allocator_type;
-  typedef typename Allocator::reference             reference;
-  typedef typename Allocator::const_reference       const_reference;
-  typedef typename Allocator::pointer               pointer;
-  typedef typename Allocator::const_pointer         const_pointer;
-  typedef typename Allocator::size_type             size_type;
-  typedef typename Allocator::difference_type       difference_type;
-  typedef CCC_internal::CCC_iterator<Self, false>   iterator;
-  typedef CCC_internal::CCC_iterator<Self, true>    const_iterator;
-  typedef std::reverse_iterator<iterator>           reverse_iterator;
-  typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
-
-private:
-  typedef Free_list<pointer, size_type, Self>       FreeList;
-  typedef tbb::enumerable_thread_specific<FreeList> Free_lists;
-
-  // FreeList can access our private function (clean_pointee...)
-  friend class Free_list<pointer, size_type, Self>;
-
-public:
-  friend class CCC_internal::CCC_iterator<Self, false>;
-  friend class CCC_internal::CCC_iterator<Self, true>;
-
-  explicit Concurrent_compact_container(const Allocator &a = Allocator())
-  : m_alloc(a)
-  {
-    init ();
-  }
-
-  template < class InputIterator >
-  Concurrent_compact_container(InputIterator first, InputIterator last,
-                    const Allocator & a = Allocator())
-  : m_alloc(a)
-  {
-    init();
-    std::copy(first, last, CGAL::inserter(*this));
-  }
-
-  // The copy constructor and assignment operator preserve the iterator order
-  Concurrent_compact_container(const Concurrent_compact_container &c)
-  : m_alloc(c.get_allocator())
-  {
-    init();
-    m_block_size = c.m_block_size;
-    std::copy(c.begin(), c.end(), CGAL::inserter(*this));
-  }
-
-  Concurrent_compact_container & operator=(const Concurrent_compact_container &c)
-  {
-    if (&c != this) {
-      Self tmp(c);
-      swap(tmp);
-    }
-    return *this;
-  }
-
-  ~Concurrent_compact_container()
-  {
-    clear();
-  }
-
-  void swap(Self &c)
-  {
-    std::swap(m_alloc, c.m_alloc);
-    std::swap(m_capacity, c.m_capacity);
-    std::swap(m_block_size, c.m_block_size);
-    std::swap(m_first_item, c.m_first_item);
-    std::swap(m_last_item, c.m_last_item);
-    std::swap(m_free_lists, c.m_free_lists);
-    m_all_items.swap(c.m_all_items);
-  }
-
-  iterator begin() { return iterator(m_first_item, 0, 0); }
-  iterator end()   { return iterator(m_last_item, 0); }
-
-  const_iterator begin() const { return const_iterator(m_first_item, 0, 0); }
-  const_iterator end()   const { return const_iterator(m_last_item, 0); }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  reverse_iterator rend()   { return reverse_iterator(begin()); }
-
-  const_reverse_iterator
-  rbegin() const { return const_reverse_iterator(end()); }
-  const_reverse_iterator
-  rend()   const { return const_reverse_iterator(begin()); }
-
-  // Boost.Intrusive interface
-  iterator iterator_to(reference value) const {
-    return iterator(&value, 0);
-  }
-  const_iterator iterator_to(const_reference value) const {
-    return const_iterator(&value, 0);
-  }
-  static iterator s_iterator_to(reference value) {
-    return iterator(&value, 0);
-  }
-  static const_iterator s_iterator_to(const_reference value) {
-    return const_iterator(&value, 0);
-  }
-
-  // Special insert methods that construct the objects in place
-  // (just forward the arguments to the constructor, to optimize a copy).
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template < typename... Args >
-  iterator
-  emplace(const Args&... args)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(args...);
-    return finalize_insert(ret, fl);
-  }
-#else
-  // inserts a default constructed item.
-  iterator emplace()
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type();
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1 >
-  iterator
-  emplace(const T1 &t1)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3, t4);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4, typename T5 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-    const T5 &t5)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3, t4, t5);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6, const T7 &t7)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7);
-    return finalize_insert(ret, fl);
-  }
-
-  template < typename T1, typename T2, typename T3, typename T4,
-             typename T5, typename T6, typename T7, typename T8 >
-  iterator
-  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
-          const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8);
-    return finalize_insert(ret, fl);
-  }
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-  iterator insert(const T &t)
-  {
-    FreeList * fl = get_free_list();
-    pointer ret = init_insert(fl);
-    m_alloc.construct(ret, t);
-    return finalize_insert(ret, fl);
-  }
-
-  template < class InputIterator >
-  void insert(InputIterator first, InputIterator last)
-  {
-    for (; first != last; ++first)
-      insert(*first);
-  }
-
-  template < class InputIterator >
-  void assign(InputIterator first, InputIterator last)
-  {
-    clear(); // erase(begin(), end()); // ?
-    insert(first, last);
-  }
-
-private:
-  void erase(iterator x, FreeList * fl)
-  {
-    typedef CCC_internal::Erase_counter_strategy<
-      CCC_internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
-
-    CGAL_precondition(type(x) == USED);
-    EraseCounterStrategy::increment_erase_counter(*x);
-    m_alloc.destroy(&*x);
-/* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER
-#ifndef CGAL_NO_ASSERTIONS
-    std::memset(&*x, 0, sizeof(T));
-#endif*/
-    put_on_free_list(&*x, fl);
-  }
-public:
-
-  void erase(iterator x)
-  {
-    erase(x, get_free_list());
-  }
-
-  void erase(iterator first, iterator last) {
-    while (first != last)
-      erase(first++);
-  }
-
-  void clear();
-
-  // Merge the content of d into *this.  d gets cleared.
-  // The complexity is O(size(free list = capacity-size)).
-  void merge(Self &d);
-
-  // Do not call this function while others are inserting/erasing elements
-  size_type size() const
-  {
-    size_type size = m_capacity;
-    for( typename Free_lists::iterator it_free_list = m_free_lists.begin() ;
-         it_free_list != m_free_lists.end() ;
-         ++it_free_list )
-    {
-      size -= it_free_list->size();
-    }
-    return size;
-  }
-
-  size_type max_size() const
-  {
-    return m_alloc.max_size();
-  }
-
-  size_type capacity() const
-  {
-    return m_capacity;
-  }
-
-  // void resize(size_type sz, T c = T()); // TODO  makes sense ???
-
-  bool empty() const
-  {
-    return size() == 0;
-  }
-
-  allocator_type get_allocator() const
-  {
-    return m_alloc;
-  }
-
-  // Returns whether the iterator "cit" is in the range [begin(), end()].
-  // Complexity : O(#blocks) = O(sqrt(capacity())).
-  // This function is mostly useful for purposes of efficient debugging at
-  // higher levels.
-  bool owns(const_iterator cit) const
-  {
-    // We use the block structure to provide an efficient version :
-    // we check if the address is in the range of each block,
-    // and then test whether it is valid (not a free element).
-
-    if (cit == end())
-      return true;
-
-    const_pointer c = &*cit;
-
-    Mutex::scoped_lock lock(m_mutex);
-
-    for (typename All_items::const_iterator it = m_all_items.begin(), itend = m_all_items.end();
-         it != itend; ++it) {
-      const_pointer p = it->first;
-      size_type s = it->second;
-
-      // Are we in the address range of this block (excluding first and last
-      // elements) ?
-      if (c <= p || (p+s-1) <= c)
-        continue;
-
-      CGAL_assertion_msg( (c-p)+p == c, "wrong alignment of iterator");
-
-      return type(c) == USED;
-    }
-    return false;
-  }
-
-  bool owns_dereferencable(const_iterator cit) const
-  {
-    return cit != end() && owns(cit);
-  }
-
-  /** Reserve method to ensure that the capacity of the Concurrent_compact_container be
-   * greater or equal than a given value n.
-   */
-  // TODO?
-  //void reserve(size_type n)
-  //{
-    // Does it really make sense: it will reserve size for the current
-    // thread only!
-    /*Mutex::scoped_lock lock;
-    if ( m_capacity >= n ) return;
-    size_type tmp = m_block_size;
-    // TODO: use a tmpBlockSize instead of m_block_size
-    m_block_size = (std::max)( n - m_capacity, m_block_size );
-    allocate_new_block(free_list());
-    m_block_size = tmp + CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;*/
-  //}
-
-private:
-
-  FreeList*       get_free_list()       { return & m_free_lists.local(); }
-  const FreeList* get_free_list() const { return & m_free_lists.local(); }
-
-  // Two helper functions for the emplace() methods
-
-  // allocate new space if needed get the pointer from
-  // the free list and then clean it
-  pointer init_insert(FreeList * fl)
-  {
-    pointer fl2 = fl->head();
-    if (fl2 == NULL) {
-      allocate_new_block(fl);
-      fl2 = fl->head();
-    }
-    pointer ret = fl2;
-    fl->set_head(clean_pointee(ret));
-    return ret;
-  }
-
-  // get verify the return pointer increment size and
-  // return as iterator
-  iterator finalize_insert(pointer ret, FreeList * fl)
-  {
-    CGAL_assertion(type(ret) == USED);
-    fl->dec_size();
-    return iterator(ret, 0);
-  }
-
-  void allocate_new_block(FreeList *fl);
-
-  void put_on_free_list(pointer x, FreeList * fl)
-  {
-    set_type(x, fl->head(), FREE);
-    fl->set_head(x);
-    fl->inc_size();
-  }
-
-  // Definition of the bit squatting :
-  // =================================
-  // ptr is composed of a pointer part and the last 2 bits.
-  // Here is the meaning of each of the 8 cases.
-  //
-  //                          value of the last 2 bits as "Type"
-  // pointer part     0              1                2              3
-  //         NULL     user elt       unused           free_list end  start/end
-  //      != NULL     user elt       block boundary   free elt       unused
-  //
-  // meaning of ptr : user stuff     next/prev block  free_list      unused
-
-  enum Type { USED = 0, BLOCK_BOUNDARY = 1, FREE = 2, START_END = 3 };
-
-  // The bit squatting is implemented by casting pointers to (char *), then
-  // subtracting to NULL, doing bit manipulations on the resulting integer,
-  // and converting back.
-
-  static char * clean_pointer(char * p)
-  {
-    return ((p - (char *) NULL) & ~ (std::ptrdiff_t) START_END) + (char *) NULL;
-  }
-
-  // Returns the pointee, cleaned up from the squatted bits.
-  static pointer clean_pointee(const_pointer ptr)
-  {
-    return (pointer) clean_pointer((char *) Traits::pointer(*ptr));
-  }
-
-  // Get the type of the pointee.
-  static Type type(const_pointer ptr)
-  {
-    char * p = (char *) Traits::pointer(*ptr);
-    return (Type) (p - clean_pointer(p));
-  }
-
-  static Type type(const_iterator ptr)
-  {
-    return type(&*ptr);
-  }
-
-  // Sets the pointer part and the type of the pointee.
-  static void set_type(pointer p_element, void * pointer, Type t)
-  {
-    CGAL_precondition(0 <= t && t < 4);
-    Traits::pointer(*p_element) =
-      (void *) ((clean_pointer((char *) pointer)) + (int) t);
-  }
-
-  typedef tbb::queuing_mutex Mutex;
-
-  // We store a vector of pointers to all allocated blocks and their sizes.
-  // Knowing all pointers, we don't have to walk to the end of a block to reach
-  // the pointer to the next block.
-  // Knowing the sizes allows to deallocate() without having to compute the size
-  // by walking through the block till its end.
-  // This opens up the possibility for the compiler to optimize the clear()
-  // function considerably when has_trivial_destructor<T>.
-  typedef std::vector<std::pair<pointer, size_type> >  All_items;
-
-
-  void init()
-  {
-    m_block_size = CGAL_INIT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;
-    m_capacity  = 0;
-    for( typename Free_lists::iterator it_free_list = m_free_lists.begin() ;
-         it_free_list != m_free_lists.end() ;
-         ++it_free_list )
-    {
-      it_free_list->set_head(0);
-      it_free_list->set_size(0);
-    }
-    m_first_item = NULL;
-    m_last_item  = NULL;
-    m_all_items  = All_items();
-  }
-
-  allocator_type    m_alloc;
-  size_type         m_capacity;
-  size_type         m_block_size;
-  Free_lists        m_free_lists;
-  pointer           m_first_item;
-  pointer           m_last_item;
-  All_items         m_all_items;
-  mutable Mutex     m_mutex;
-};
-
-template < class T, class Allocator >
-void Concurrent_compact_container<T, Allocator>::merge(Self &d)
-{
-  CGAL_precondition(&d != this);
-
-  // Allocators must be "compatible" :
-  CGAL_precondition(get_allocator() == d.get_allocator());
-
-  // Concatenate the free_lists.
-  // Iterates over TLS free lists of "d". Note that the number of TLS freelists
-  // may be different.
-  typename Free_lists::iterator it_free_list = m_free_lists.begin();
-  if (it_free_list == m_free_lists.end())
-  {
-    // No free list at all? Create our local one... empty.
-    get_free_list()->set_head(0);
-    get_free_list()->set_size(0);
-    // Now there is one TLS free list: ours!
-    it_free_list = m_free_lists.begin();
-  }
-  for( typename Free_lists::iterator it_free_list_d = d.m_free_lists.begin() ;
-       it_free_list_d != d.m_free_lists.end() ;
-       ++it_free_list_d, ++it_free_list )
-  {
-    // If we run out of TLS free lists in *this, let's start again from "begin"
-    if (it_free_list == m_free_lists.end())
-      it_free_list = m_free_lists.begin();
-
-    it_free_list->merge(*it_free_list_d);
-  }
-  // Concatenate the blocks.
-  if (m_last_item == NULL) { // empty...
-    m_first_item = d.m_first_item;
-    m_last_item  = d.m_last_item;
-  } else if (d.m_last_item != NULL) {
-    set_type(m_last_item, d.m_first_item, BLOCK_BOUNDARY);
-    set_type(d.m_first_item, m_last_item, BLOCK_BOUNDARY);
-    m_last_item = d.m_last_item;
-  }
-  m_all_items.insert(m_all_items.end(), d.m_all_items.begin(), d.m_all_items.end());
-  // Add the capacities.
-  m_capacity += d.m_capacity;
-  // It seems reasonnable to take the max of the block sizes.
-  m_block_size = (std::max)(m_block_size, d.m_block_size);
-  // Clear d.
-  d.init();
-}
-
-template < class T, class Allocator >
-void Concurrent_compact_container<T, Allocator>::clear()
-{
-  for (typename All_items::iterator it = m_all_items.begin(), itend = m_all_items.end();
-       it != itend; ++it) {
-    pointer p = it->first;
-    size_type s = it->second;
-    for (pointer pp = p + 1; pp != p + s - 1; ++pp) {
-      if (type(pp) == USED)
-        m_alloc.destroy(pp);
-    }
-    m_alloc.deallocate(p, s);
-  }
-  init();
-}
-
-template < class T, class Allocator >
-void Concurrent_compact_container<T, Allocator>::
-  allocate_new_block(FreeList * fl)
-{
-  typedef CCC_internal::Erase_counter_strategy<
-    CCC_internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
-
-  size_type old_block_size;
-  pointer new_block;
-
-  {
-    Mutex::scoped_lock lock(m_mutex);
-    old_block_size = m_block_size;
-    new_block = m_alloc.allocate(old_block_size + 2);
-    m_all_items.push_back(std::make_pair(new_block, old_block_size + 2));
-    m_capacity += old_block_size;
-
-    // We insert this new block at the end.
-    if (m_last_item == NULL) // First time
-    {
-        m_first_item = new_block;
-        m_last_item  = new_block + old_block_size + 1;
-        set_type(m_first_item, NULL, START_END);
-    }
-    else
-    {
-        set_type(m_last_item, new_block, BLOCK_BOUNDARY);
-        set_type(new_block, m_last_item, BLOCK_BOUNDARY);
-        m_last_item = new_block + old_block_size + 1;
-    }
-    set_type(m_last_item, NULL, START_END);
-    // Increase the m_block_size for the next time.
-    m_block_size += CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;
-  }
-
-  // We don't touch the first and the last one.
-  // We mark them free in reverse order, so that the insertion order
-  // will correspond to the iterator order...
-  for (size_type i = old_block_size; i >= 1; --i)
-  {
-    EraseCounterStrategy::set_erase_counter(*(new_block + i), 0);
-    put_on_free_list(new_block + i, fl);
-  }
-}
-
-template < class T, class Allocator >
-inline
-bool operator==(const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return lhs.size() == rhs.size() &&
-    std::equal(lhs.begin(), lhs.end(), rhs.begin());
-}
-
-template < class T, class Allocator >
-inline
-bool operator!=(const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return ! (lhs == rhs);
-}
-
-template < class T, class Allocator >
-inline
-bool operator< (const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return std::lexicographical_compare(lhs.begin(), lhs.end(),
-                                      rhs.begin(), rhs.end());
-}
-
-template < class T, class Allocator >
-inline
-bool operator> (const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return rhs < lhs;
-}
-
-template < class T, class Allocator >
-inline
-bool operator<=(const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return ! (lhs > rhs);
-}
-
-template < class T, class Allocator >
-inline
-bool operator>=(const Concurrent_compact_container<T, Allocator> &lhs,
-                const Concurrent_compact_container<T, Allocator> &rhs)
-{
-  return ! (lhs < rhs);
-}
-
-namespace CCC_internal {
-
-  template < class CCC, bool Const >
-  class CCC_iterator
-  {
-    typedef typename CCC::iterator                    iterator;
-    typedef CCC_iterator<CCC, Const>                   Self;
-  public:
-    typedef typename CCC::value_type                  value_type;
-    typedef typename CCC::size_type                   size_type;
-    typedef typename CCC::difference_type             difference_type;
-    typedef typename boost::mpl::if_c< Const, const value_type*,
-                                       value_type*>::type pointer;
-    typedef typename boost::mpl::if_c< Const, const value_type&,
-                                       value_type&>::type reference;
-    typedef std::bidirectional_iterator_tag           iterator_category;
-
-    // the initialization with NULL is required by our Handle concept.
-    CCC_iterator()
-    {
-      m_ptr.p = NULL;
-    }
-
-    // Either a harmless copy-ctor,
-    // or a conversion from iterator to const_iterator.
-    CCC_iterator (const iterator &it)
-    {
-      m_ptr.p = &(*it);
-    }
-
-    // Same for assignment operator (otherwise MipsPro warns)
-    CCC_iterator & operator= (const iterator &it)
-    {
-      m_ptr.p = &(*it);
-      return *this;
-    }
-
-    // Construction from NULL
-    CCC_iterator (Nullptr_t CGAL_assertion_code(n))
-    {
-      CGAL_assertion (n == NULL);
-      m_ptr.p = NULL;
-    }
-
-  private:
-
-    union {
-      pointer      p;
-      void        *vp;
-    } m_ptr;
-
-    // Only Concurrent_compact_container should access these constructors.
-    friend class Concurrent_compact_container<value_type, typename CCC::Al>;
-
-    // For begin()
-    CCC_iterator(pointer ptr, int, int)
-    {
-      m_ptr.p = ptr;
-      if (m_ptr.p == NULL) // empty container.
-        return;
-
-      ++(m_ptr.p); // if not empty, p = start
-      if (CCC::type(m_ptr.p) == CCC::FREE)
-        increment();
-    }
-
-    // Construction from raw pointer and for end().
-    CCC_iterator(pointer ptr, int)
-    {
-      m_ptr.p = ptr;
-    }
-
-    // NB : in case empty container, begin == end == NULL.
-    void increment()
-    {
-      // It's either pointing to end(), or valid.
-      CGAL_assertion_msg(m_ptr.p != NULL,
-        "Incrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(CCC::type(m_ptr.p) != CCC::START_END,
-        "Incrementing end() ?");
-
-      // If it's not end(), then it's valid, we can do ++.
-      do {
-        ++(m_ptr.p);
-        if (CCC::type(m_ptr.p) == CCC::USED ||
-            CCC::type(m_ptr.p) == CCC::START_END)
-          return;
-
-        if (CCC::type(m_ptr.p) == CCC::BLOCK_BOUNDARY)
-          m_ptr.p = CCC::clean_pointee(m_ptr.p);
-      } while (true);
-    }
-
-    void decrement()
-    {
-      // It's either pointing to end(), or valid.
-      CGAL_assertion_msg(m_ptr.p != NULL,
-        "Decrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(CCC::type(m_ptr.p - 1) != CCC::START_END,
-        "Decrementing begin() ?");
-
-      // If it's not begin(), then it's valid, we can do --.
-      do {
-        --m_ptr.p;
-        if (CCC::type(m_ptr.p) == CCC::USED ||
-            CCC::type(m_ptr.p) == CCC::START_END)
-          return;
-
-        if (CCC::type(m_ptr.p) == CCC::BLOCK_BOUNDARY)
-          m_ptr.p = CCC::clean_pointee(m_ptr.p);
-      } while (true);
-    }
-
-  public:
-
-    Self & operator++()
-    {
-      CGAL_assertion_msg(m_ptr.p != NULL,
-   "Incrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(CCC::type(m_ptr.p) == CCC::USED,
-                         "Incrementing an invalid iterator.");
-      increment();
-      return *this;
-    }
-
-    Self & operator--()
-    {
-      CGAL_assertion_msg(m_ptr.p != NULL,
-   "Decrementing a singular iterator or an empty container iterator ?");
-      CGAL_assertion_msg(CCC::type(m_ptr.p) == CCC::USED
-          || CCC::type(m_ptr.p) == CCC::START_END,
-                         "Decrementing an invalid iterator.");
-      decrement();
-      return *this;
-    }
-
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-
-    reference operator*() const { return *(m_ptr.p); }
-
-    pointer   operator->() const { return (m_ptr.p); }
-
-    // For std::less...
-    bool operator<(const CCC_iterator& other) const
-    {
-      return (m_ptr.p < other.m_ptr.p);
-    }
-
-    bool operator>(const CCC_iterator& other) const
-    {
-      return (m_ptr.p > other.m_ptr.p);
-    }
-
-    bool operator<=(const CCC_iterator& other) const
-    {
-      return (m_ptr.p <= other.m_ptr.p);
-    }
-
-    bool operator>=(const CCC_iterator& other) const
-    {
-      return (m_ptr.p >= other.m_ptr.p);
-    }
-
-    // Can itself be used for bit-squatting.
-    void *   for_compact_container() const { return (m_ptr.vp); }
-    void * & for_compact_container()       { return (m_ptr.vp); }
-  };
-
-  template < class CCC, bool Const1, bool Const2 >
-  inline
-  bool operator==(const CCC_iterator<CCC, Const1> &rhs,
-                  const CCC_iterator<CCC, Const2> &lhs)
-  {
-    return &*rhs == &*lhs;
-  }
-
-  template < class CCC, bool Const1, bool Const2 >
-  inline
-  bool operator!=(const CCC_iterator<CCC, Const1> &rhs,
-                  const CCC_iterator<CCC, Const2> &lhs)
-  {
-    return &*rhs != &*lhs;
-  }
-
-  // Comparisons with NULL are part of CGAL's Handle concept...
-  template < class CCC, bool Const >
-  inline
-  bool operator==(const CCC_iterator<CCC, Const> &rhs,
-                  Nullptr_t CGAL_assertion_code(n))
-  {
-    CGAL_assertion( n == NULL);
-    return &*rhs == NULL;
-  }
-
-  template < class CCC, bool Const >
-  inline
-  bool operator!=(const CCC_iterator<CCC, Const> &rhs,
-      Nullptr_t CGAL_assertion_code(n))
-  {
-    CGAL_assertion( n == NULL);
-    return &*rhs != NULL;
-  }
-
-} // namespace CCC_internal
-
-} //namespace CGAL
-
-#endif // CGAL_CONCURRENT_COMPACT_CONTAINER_H
-
-#endif // CGAL_LINKED_WITH_TBB
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Constrained_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/Constrained_Delaunay_triangulation_2.h
deleted file mode 100644
index e727a02..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Constrained_Delaunay_triangulation_2.h
+++ /dev/null
@@ -1,984 +0,0 @@
-// Copyright (c) 1997  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Mariette Yvinec, Jean Daniel Boissonnat
- 
-#ifndef CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
-#define CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
-
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Constrained_triangulation_2.h>
-#include <CGAL/Triangulation_2/insert_constraints.h>
-
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-#include <CGAL/Spatial_sort_traits_adapter_2.h>
-#include <CGAL/internal/info_check.h>
-#include <CGAL/is_iterator.h>
-
-#include <boost/iterator/zip_iterator.hpp>
-#include <boost/mpl/and.hpp>
-
-namespace CGAL {
-
-namespace internal{
-
-template <class T,bool has_info=is_iterator<T>::value>
-struct Get_iterator_value_type{
- struct type{};
-};
-
-template <class T>
-struct Get_iterator_value_type<T,true>{
- typedef typename std::iterator_traits<T>::value_type type;
-};
-
-} } //namespace CGAL::internal
-#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-
-
-namespace CGAL {
-
-
-template <class Gt, 
-          class Tds = Triangulation_data_structure_2 <
-                      Triangulation_vertex_base_2<Gt>,
-		      Constrained_triangulation_face_base_2<Gt> >,
-	  class Itag = No_intersection_tag >		
-class Constrained_Delaunay_triangulation_2
-  : public  Constrained_triangulation_2<Gt, Tds, Itag> 
-{
-public:
-  typedef Constrained_triangulation_2<Gt,Tds,Itag>             Ctr;
-  typedef Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>    CDt;
-  typedef typename Ctr::Geom_traits      Geom_traits;
-  typedef typename Ctr::Intersection_tag Intersection_tag;
-
-  typedef typename Ctr::Constraint    Constraint;
-  typedef typename Ctr::Vertex_handle Vertex_handle;
-  typedef typename Ctr::Face_handle   Face_handle;
-  typedef typename Ctr::Edge          Edge;
-  typedef typename Ctr::Finite_faces_iterator Finite_faces_iterator;
-  typedef typename Ctr::Face_circulator       Face_circulator;
-  typedef typename Ctr::size_type             size_type;
-  typedef typename Ctr::Locate_type           Locate_type;
- 
-  typedef typename Ctr::List_edges List_edges;  
-  typedef typename Ctr::List_faces List_faces;
-  typedef typename Ctr::List_vertices  List_vertices;
-  typedef typename Ctr::List_constraints List_constraints;
-  typedef typename Ctr::Less_edge less_edge;
-  typedef typename Ctr::Edge_set Edge_set;
-
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
-  using Ctr::geom_traits;
-  using Ctr::number_of_vertices;
-  using Ctr::finite_faces_begin;
-  using Ctr::finite_faces_end;
-  using Ctr::dimension;
-  using Ctr::cw;
-  using Ctr::ccw;
-  using Ctr::infinite_vertex;
-  using Ctr::side_of_oriented_circle;
-  using Ctr::is_infinite;
-  using Ctr::collinear_between;
-  using Ctr::are_there_incident_constraints;
-  using Ctr::make_hole;
-  // The next using statement makes trouble for VC++ with the version
-  // of the method that is templated with PointIterator
-  // VC++ cannot disambiguate between this method and the method of the base class
-  // using Ctr::insert_constraint;
-  using Ctr::locate;
-  using Ctr::test_dim_down;
-  using Ctr::fill_hole_delaunay;
-  using Ctr::update_constraints;
-  using Ctr::delete_vertex;
-  using Ctr::push_back;
-#endif
-
-  typedef typename Geom_traits::Point_2  Point;
-
-
-  Constrained_Delaunay_triangulation_2(const Geom_traits& gt=Geom_traits()) 
-    : Ctr(gt) { }
-
-  Constrained_Delaunay_triangulation_2(const CDt& cdt)
-    : Ctr(cdt) {}
-
-  Constrained_Delaunay_triangulation_2(List_constraints& lc, 
-				       const Geom_traits& gt=Geom_traits())
-    : Ctr(gt) 
-    {   
-      typename List_constraints::iterator itc = lc.begin();
-      for( ; itc != lc.end(); ++itc) {
-	insert((*itc).first, (*itc).second);
-      }
-      CGAL_triangulation_postcondition( is_valid() );
-    }
-
-  template<class InputIterator>
-  Constrained_Delaunay_triangulation_2(InputIterator it,
-				       InputIterator last,
-				       const Geom_traits& gt=Geom_traits() )
-    : Ctr(gt) 
-    {
-      for ( ; it != last; it++) {
-      	insert((*it).first, (*it).second);
-      }
-      CGAL_triangulation_postcondition( is_valid() );
-    }
-
-  virtual ~Constrained_Delaunay_triangulation_2() {}
-  
-
-  // FLIPS
-  bool is_flipable(Face_handle f, int i, bool perturb = true) const;
-  void flip(Face_handle& f, int i);
-  void flip_around(Vertex_handle va);
-  void flip_around(List_vertices & new_vertices);
-#ifndef CGAL_CDT2_USE_RECURSIVE_PROPAGATING_FLIP
-  void non_recursive_propagating_flip(Face_handle f,int i);
-  void propagating_flip(Face_handle f,int i, int depth=0);
-#else
-  void propagating_flip(Face_handle f,int i);
-#endif
-  void propagating_flip(List_edges & edges);
-
-  // CONFLICTS
-  bool test_conflict(Face_handle fh, const Point& p) const; //deprecated
-  bool test_conflict(const Point& p, Face_handle fh) const;
-  void find_conflicts(const Point& p, std::list<Edge>& le,  //deprecated
-		      Face_handle hint= Face_handle()) const;
-  //  //template member functions, declared and defined at the end 
-  // template <class OutputItFaces, class OutputItBoundaryEdges> 
-  // std::pair<OutputItFaces,OutputItBoundaryEdges>
-  // get_conflicts_and_boundary(const Point  &p, 
-  // 		                OutputItFaces fit, 
-  // 		                OutputItBoundaryEdges eit,
-  // 		                Face_handle start) const;
-  // template <class OutputItFaces>
-  // OutputItFaces
-  // get_conflicts (const Point  &p, 
-  //                OutputItFaces fit, 
-  // 		    Face_handle start ) const;
-  // template <class OutputItBoundaryEdges>
-  // OutputItBoundaryEdges
-  // get_boundary_of_conflicts(const Point  &p, 
-  // 			       OutputItBoundaryEdges eit, 
-  // 			       Face_handle start ) const;
-   
-
-  // INSERTION-REMOVAL
-  Vertex_handle insert(const Point & a, Face_handle start = Face_handle());
-  Vertex_handle insert(const Point& p,
-		       Locate_type lt,
-		       Face_handle loc, int li );
-  Vertex_handle push_back(const Point& a);
-//   template < class InputIterator >
-//   std::ptrdiff_t insert(InputIterator first, InputIterator last);
-
-  void remove(Vertex_handle v);
-  void remove_incident_constraints(Vertex_handle v);
-  void remove_constrained_edge(Face_handle f, int i);
-//  template <class OutputItFaces>
-//  OutputItFaces
-//  remove_constrained_edge(Face_handle f, int i, OutputItFaces out)
- 
-  //for backward compatibility
-  void insert(Point a, Point b) { insert_constraint(a, b);}
-
-  void insert(Vertex_handle va, Vertex_handle  vb) {insert_constraint(va,vb);}
-
-  void insert_constraint(Vertex_handle va, Vertex_handle  vb)
-  {
-    ((Ctr*)this)->insert_constraint(va,vb);
-  }
-
-  void
-  insert_constraint(const Point& a, const Point& b)
-  {
-    ((Ctr*)this)->insert_constraint(a,b);
-  }
-
-  template <class PointIterator>
-  void insert_constraint(PointIterator first, PointIterator last, bool close=false)
-  {
-    if(first == last){
-      return;
-    }
-    const Point& p0 = *first;
-    Point p = p0;
-    Vertex_handle v0 = insert(p0), v(v0), w(v0);
-    ++first;
-    for(; first!=last; ++first){
-      const Point& q = *first;
-      if(p != q){
-        w = insert(q);
-        insert_constraint(v,w);
-        v = w;
-        p = q;
-      }
-    }
-    if(close && (p != p0)){
-      insert(w,v0);
-    }
-  }
-
-
-  void remove_constraint(Face_handle f, int i){remove_constrained_edge(f,i);}
-
-  // CHECK
-  bool is_valid(bool verbose = false, int level = 0) const;
- 
-protected:
-  virtual Vertex_handle virtual_insert(const Point & a, 
-				       Face_handle start = Face_handle());
-  virtual Vertex_handle virtual_insert(const Point& a,
-				       Locate_type lt,
-				       Face_handle loc, 
-				       int li );
-//Vertex_handle special_insert_in_edge(const Point & a, Face_handle f, int i);
-  void remove_2D(Vertex_handle v );
-  virtual void triangulate_hole(List_faces& intersected_faces,
-				List_edges& conflict_boundary_ab,
-				List_edges& conflict_boundary_ba);
-
-public:
-  // MESHING 
-  // suppressed meshing functions from here
-
-  //template member functions
-public:
-  template < class InputIterator >
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-  std::ptrdiff_t
-  insert( InputIterator first, InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-                typename internal::Get_iterator_value_type< InputIterator >::type,
-                Point
-            >
-          >::type* = NULL
-  )
-#else
-#if defined(_MSC_VER)
-  std::ptrdiff_t insert(InputIterator first, InputIterator last, int i = 0)
-#else
-    std::ptrdiff_t insert(InputIterator first, InputIterator last) 
-#endif
-#endif
-    {
-      size_type n = number_of_vertices();
-
-      std::vector<Point> points (first, last);
-      spatial_sort (points.begin(), points.end(), geom_traits());
-      Face_handle f;
-      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-              p != end; ++p)
-          f = insert (*p, f)->face();
-
-      return number_of_vertices() - n;
-    }
-
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-private:
-  //top stands for tuple-or-pair
-  template <class Info>
-  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
-  template <class Info>
-  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
-  template <class Info>
-  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
-  template <class Info>
-  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
-
-  template <class Tuple_or_pair,class InputIterator>
-  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
-  {
-    size_type n = this->number_of_vertices();
-    std::vector<std::ptrdiff_t> indices;
-    std::vector<Point> points;
-    std::vector<typename Tds::Vertex::Info> infos;
-    std::ptrdiff_t index=0;
-    for (InputIterator it=first;it!=last;++it){
-      Tuple_or_pair value=*it;
-      points.push_back( top_get_first(value)  );
-      infos.push_back ( top_get_second(value) );
-      indices.push_back(index++);
-    }
-
-    typedef Spatial_sort_traits_adapter_2<Geom_traits,Point*> Search_traits;
-
-    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
-
-    Vertex_handle v_hint;
-    Face_handle hint;
-    for (typename std::vector<std::ptrdiff_t>::const_iterator
-      it = indices.begin(), end = indices.end();
-      it != end; ++it){
-      v_hint = insert(points[*it], hint);
-      if (v_hint!=Vertex_handle()){
-        v_hint->info()=infos[*it];
-        hint=v_hint->face();
-      }
-    }
-
-    return this->number_of_vertices() - n;
-  }
-
-public:
-
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first,
-          InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-              typename internal::Get_iterator_value_type< InputIterator >::type,
-              std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type>
-            >
-          >::type* =NULL
-  )
-  {
-    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
-  }
-
-  template <class  InputIterator_1,class InputIterator_2>
-  std::ptrdiff_t
-  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
-          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
-          typename boost::enable_if<
-            boost::mpl::and_<
-              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
-              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Tds::Vertex>::type >
-            >
-          >::type* =NULL
-  )
-  {
-    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
-  }
-#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-
-  template <class PointIterator, class IndicesIterator>
-  std::size_t insert_constraints(PointIterator points_first,
-                                 PointIterator points_beyond,
-                                 IndicesIterator indices_first,
-                                 IndicesIterator indices_beyond)
-  {
-    std::vector<Point> points(points_first, points_beyond);
-    return internal::insert_constraints(*this,points, indices_first, indices_beyond);
-  }
-
-
- template <class ConstraintIterator>
-  std::size_t insert_constraints(ConstraintIterator first,
-                                 ConstraintIterator beyond)
-  {
-    return internal::insert_constraints(*this,first,beyond);
-  }
-
-
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  get_conflicts_and_boundary(const Point  &p, 
-			     OutputItFaces fit, 
-			     OutputItBoundaryEdges eit,
-			     Face_handle start = Face_handle()) const {
-    CGAL_triangulation_precondition( dimension() == 2);
-    int li;
-    Locate_type lt;
-    Face_handle fh = locate(p,lt,li, start);
-    switch(lt) {
-    case Ctr::OUTSIDE_AFFINE_HULL:
-    case Ctr::VERTEX:
-      return std::make_pair(fit,eit);
-    case Ctr::FACE:
-    case Ctr::EDGE:
-    case Ctr::OUTSIDE_CONVEX_HULL:
-      *fit++ = fh; //put fh in OutputItFaces
-      std::pair<OutputItFaces,OutputItBoundaryEdges>
-	pit = std::make_pair(fit,eit);
-      pit = propagate_conflicts(p,fh,0,pit);
-      pit = propagate_conflicts(p,fh,1,pit);
-      pit = propagate_conflicts(p,fh,2,pit);
-      return pit;
-    }
-    CGAL_triangulation_assertion(false);
-    return std::make_pair(fit,eit);
-  } 
-
-  template <class OutputItFaces>
-  OutputItFaces
-  get_conflicts (const Point  &p, 
-		 OutputItFaces fit, 
-		 Face_handle start= Face_handle()) const {
-    std::pair<OutputItFaces,Emptyset_iterator> pp = 
-      get_conflicts_and_boundary(p,fit,Emptyset_iterator(),start);
-    return pp.first;
-  }
-
-  template <class OutputItBoundaryEdges> 
-  OutputItBoundaryEdges
-  get_boundary_of_conflicts(const Point  &p, 
-			    OutputItBoundaryEdges eit, 
-			    Face_handle start= Face_handle()) const {
-    std::pair<Emptyset_iterator, OutputItBoundaryEdges> pp = 
-      get_conflicts_and_boundary(p,Emptyset_iterator(),eit,start);
-    return pp.second;
-  }
-
-
-public:
-// made  public for the need of Mesh_2
-// but not documented
-#ifdef CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  propagate_conflicts (const Point  &p,
-                      Face_handle fh, 
-                      int i,
-                      std::pair<OutputItFaces,OutputItBoundaryEdges>  pit)  const 
-  {
-     Face_handle fn = fh->neighbor(i);
-     
-     if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
-       *(pit.second)++ = Edge(fn, fn->index(fh));
-     } else {
-       *(pit.first)++ = fn;
-       int j = fn->index(fh);
-       pit = propagate_conflicts(p,fn,ccw(j),pit);
-       pit = propagate_conflicts(p,fn,cw(j), pit);
-     }
-     return pit;
-  }
-#else // NO CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  non_recursive_propagate_conflicts (const Point  &p,
-                                     Face_handle fh, 
-                                     int i,
-                                     std::pair<OutputItFaces,OutputItBoundaryEdges>  pit)  const 
-  {
-    std::stack<std::pair<Face_handle, int> > stack;
-    stack.push(std::make_pair(fh, i));
-    while(!stack.empty()) {
-      const Face_handle fh = stack.top().first;
-      const int i = stack.top().second;
-      stack.pop();
-      const Face_handle fn = fh->neighbor(i);
-      if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
-        *(pit.second)++ = Edge(fn, fn->index(fh));
-      } else {
-        *(pit.first)++ = fn;
-        int j = fn->index(fh);
-        stack.push(std::make_pair(fn, cw(j)));
-        stack.push(std::make_pair(fn,ccw(j)));
-      }
-    }
-    return pit;
-  }
-
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  propagate_conflicts (const Point  &p,
-                      Face_handle fh, 
-                      int i,
-                      std::pair<OutputItFaces,OutputItBoundaryEdges>  pit,
-                      int depth=0)  const 
-  {
-    if ( depth==100) return non_recursive_propagate_conflicts(p,fh,i,pit);
-    Face_handle fn = fh->neighbor(i);
- 
-    if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
-      *(pit.second)++ = Edge(fn, fn->index(fh));
-    } else {
-      *(pit.first)++ = fn;
-      int j = fn->index(fh);
-      pit = propagate_conflicts(p,fn,ccw(j),pit,depth+1);
-      pit = propagate_conflicts(p,fn,cw(j), pit,depth+1);
-    }
-     return pit;
-  }
-#endif // NO CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-
-
-
-
-public:
- template <class OutputItFaces>
- OutputItFaces
- propagating_flip(List_edges & edges, 
-		  OutputItFaces out = Emptyset_iterator()) {
-  // makes the triangulation Delaunay by flipping 
-  // List edges contains an initial list of edges to be flipped
-  // Precondition : the output triangulation is Delaunay if the list 
-  // edges contains all edges of the input triangulation that need to be
-  // flipped (plus possibly others)
-  int i, ii, indf, indn;
-  Face_handle ni, f,ff;
-  Edge ei,eni; 
-  typename Ctr::Edge_set edge_set;
-  typename Ctr::Less_edge less_edge;
-  Edge e[4];
-  typename List_edges::iterator itedge=edges.begin();
-
-  // initialization of the set of edges to be flip
-  while (itedge != edges.end()) {
-    f=(*itedge).first;
-    i=(*itedge).second;
-    if (is_flipable(f,i)) {
-      eni=Edge(f->neighbor(i),this->mirror_index(f,i));
-      if (less_edge(*itedge,eni)) edge_set.insert(*itedge);
-      else edge_set.insert(eni);
-    }
-    ++itedge;
-  }
-
-  // flip edges and updates the set of edges to be flipped
-  while (!(edge_set.empty())) {
-    f=(*(edge_set.begin())).first;
-    indf=(*(edge_set.begin())).second;
- 
-    // erase from edge_set the 4 edges of the wing of the edge to be
-    // flipped (edge_set.begin) , i.e. the edges of the faces f and
-    // f->neighbor(indf) that are distinct from the edge to be flipped
-
-    ni = f->neighbor(indf); 
-    indn=this->mirror_index(f,indf);
-    ei= Edge(f,indf);
-    edge_set.erase(ei);
-    e[0]= Edge(f,cw(indf));
-    e[1]= Edge(f,ccw(indf));
-    e[2]= Edge(ni,cw(indn));
-    e[3]= Edge(ni,ccw(indn));
-
-    for(i=0;i<4;i++) { 
-      ff=e[i].first;
-      ii=e[i].second;
-      eni=Edge(ff->neighbor(ii),this->mirror_index(ff,ii));
-      if (less_edge(e[i],eni)) {edge_set.erase(e[i]);}
-      else { edge_set.erase(eni);} 
-    } 
-
-    // here is the flip 
-    *out++ = f;
-    *out++ = f->neighbor(indf);
-    flip(f, indf); 
-    
-
-    //insert in edge_set the 4 edges of the wing of the edge that
-    //have been flipped 
-    e[0]= Edge(f,indf);
-    e[1]= Edge(f,cw(indf));
-    e[2]= Edge(ni,indn);
-    e[3]= Edge(ni,cw(indn));
-
-    for(i=0;i<4;i++) { 
-      ff=e[i].first;
-      ii=e[i].second;
-      if (is_flipable(ff,ii)) {
-	eni=Edge(ff->neighbor(ii),this->mirror_index(ff,ii));
-	if (less_edge(e[i],eni)) { 
-	  edge_set.insert(e[i]);}
-	else {
-	  edge_set.insert(eni);} 
-      }
-    } 
-  }
-  return out;
- }
-
- template <class OutputItFaces>
- OutputItFaces
- remove_constrained_edge(Face_handle f, int i, OutputItFaces out) {
-  Ctr::remove_constrained_edge(f,i);
-  if(dimension() == 2) {
-    List_edges le;
-    le.push_back(Edge(f,i));
-    propagating_flip(le,out);
-  }
-  return out;  
- }
- 
-};
-
-
-template < class Gt, class Tds, class Itag >
-bool 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-is_flipable(Face_handle f, int i, bool perturb /* = true */) const
-  // determines if edge (f,i) can be flipped 
-{
-  Face_handle ni = f->neighbor(i); 
-  if (is_infinite(f) || is_infinite(ni)) return false; 
-  if (f->is_constrained(i)) return false;
-  return (side_of_oriented_circle(ni, f->vertex(i)->point(), perturb) 
-                                        == ON_POSITIVE_SIDE);
-}
-
-template < class Gt, class Tds, class Itag >
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-flip (Face_handle& f, int i)
-{
-  Face_handle g = f->neighbor(i);
-  int j = this->mirror_index(f,i);
-
-  // save wings neighbors to be able to restore contraint status
-  Face_handle f1 = f->neighbor(cw(i));
-  int i1 = this->mirror_index(f,cw(i));
-  Face_handle f2 = f->neighbor(ccw(i));
-  int i2 = this->mirror_index(f,ccw(i));
-  Face_handle f3 = g->neighbor(cw(j));
-  int i3 = this->mirror_index(g,cw(j));
-  Face_handle f4 = g->neighbor(ccw(j));
-  int i4 = this->mirror_index(g,ccw(j));
-
-  // The following precondition prevents the test suit 
-  // of triangulation to work on constrained Delaunay triangulation
-  //CGAL_triangulation_precondition(is_flipable(f,i));
-  this->_tds.flip(f, i);
-   
-  // restore constraint status
-  f->set_constraint(f->index(g), false);
-  g->set_constraint(g->index(f), false);
-  f1->neighbor(i1)->set_constraint(this->mirror_index(f1,i1),
-				   f1->is_constrained(i1));
-  f2->neighbor(i2)->set_constraint(this->mirror_index(f2,i2),
-				   f2->is_constrained(i2));
-  f3->neighbor(i3)->set_constraint(this->mirror_index(f3,i3),
-				   f3->is_constrained(i3));
-  f4->neighbor(i4)->set_constraint(this->mirror_index(f4,i4),
-				   f4->is_constrained(i4));
-  return;
-}
-
-template < class Gt, class Tds, class Itag >
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-flip_around(Vertex_handle va)
-  // makes the triangles incident to vertex va Delaunay using flips
-{
-  if (dimension() <= 1) return;
-  Face_handle f=va->face();
-  Face_handle next;    
-  Face_handle start(f);
-  int i;
-  do {
-    i = f->index(va); // FRAGILE : DIM 1
-    next = f->neighbor(ccw(i));  // turns ccw around a
-    propagating_flip(f,i);
-    f=next;
-  } while(next != start);
-}
-
-template < class Gt, class Tds, class Itag >
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-flip_around(List_vertices& new_vertices)
-{
-  typename List_vertices::iterator itv=new_vertices.begin();
-  for( ; itv != new_vertices.end(); itv++) {
-    flip_around(*itv);
-  }
-  return;
-}
-
-
-#ifndef CGAL_CDT2_USE_RECURSIVE_PROPAGATING_FLIP
-template <class Gt, class Tds, class Itag >
-void
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-non_recursive_propagating_flip(Face_handle f , int i)
-{
-  std::stack<Edge> edges;
-  const Vertex_handle& vp = f->vertex(i);
-  edges.push(Edge(f,i));
-
-  while(! edges.empty()){
-    const Edge& e = edges.top();
-    f = e.first;
-    i = e.second;
-
-    Face_handle ni = f->neighbor(i);
-    flip(f,i);
-    if ( !is_flipable(f,i) ) edges.pop();
-
-    i = ni->index(vp);
-    if ( is_flipable(ni,i) ) edges.push( Edge(ni,i) );
-  }
-}
-
-template <class Gt, class Tds, class Itag >
-void
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-propagating_flip(Face_handle f,int i, int depth)
-{
-  if (!is_flipable(f,i)) return;
-#ifdef CGAL_CDT2_IMMEDIATELY_NON_RECURSIVE_PROPAGATING_FLIP
-  non_recursive_propagating_flip(f,i);
-#else
-  int max_depth = 100;
-  if(depth==max_depth){
-    non_recursive_propagating_flip(f,i);
-    return;
-  }
-
-  Face_handle ni = f->neighbor(i);
-  flip(f, i); // flip for constrained triangulations
-  propagating_flip(f,i);
-  i = ni->index(f->vertex(i));
-  propagating_flip(ni,i);
-#endif
-}
-#else 
-template < class Gt, class Tds, class Itag >
-void
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-propagating_flip(Face_handle f,int i)
-// similar to the corresponding function in Delaunay_triangulation_2.h
-{
-  if (!is_flipable(f,i)) return;
-  Face_handle ni = f->neighbor(i);
-  flip(f, i); // flip for constrained triangulations
-  propagating_flip(f,i);
-  i = ni->index(f->vertex(i));
-  propagating_flip(ni,i);
-}
-#endif
-
- template < class Gt, class Tds, class Itag > 
- void
- Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>:: 
- propagating_flip(List_edges & edges) {
-    propagating_flip(edges,Emptyset_iterator());
- }
-
-
-template < class Gt, class Tds, class Itag >
-inline bool
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-test_conflict(const Point& p, Face_handle fh) const
-  // true if point P lies inside the circle circumscribing face fh
-{
-  // return true  if P is inside the circumcircle of fh
-  // if fh is infinite, return true when p is in the positive
-  // halfspace or on the boundary and in the  finite edge of fh
-  Oriented_side os = side_of_oriented_circle(fh,p,true);
-  if (os == ON_POSITIVE_SIDE) return true;
- 
-  if (os == ON_ORIENTED_BOUNDARY && is_infinite(fh)) {
-    int i = fh->index(infinite_vertex());
-    return collinear_between(fh->vertex(cw(i))->point(), p,
-			     fh->vertex(ccw(i))->point() );
-  }
-
-  return false;
-}
-
-template < class Gt, class Tds, class Itag >
-inline bool
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-test_conflict(Face_handle fh, const Point& p) const
-  // true if point P lies inside the circle circumscribing face fh
-{
-  return test_conflict(p,fh);
-}
-
-template < class Gt, class Tds, class Itag >    
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-find_conflicts(const Point& p, std::list<Edge>& le, Face_handle hint) const
-{
-  // sets in le the counterclocwise list of the edges of the boundary of the 
-  // union of the faces in conflict with p
-  // an edge is represented by the incident face that is not in conflict with p
-  get_boundary_of_conflicts(p, std::back_inserter(le), hint);
-}
-  
-template < class Gt, class Tds, class Itag >  
-inline 
-typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-virtual_insert(const Point & a, Face_handle start)
-  // virtual version of the insertion
-{
-  return insert(a,start);
-}
-
-template < class Gt, class Tds, class Itag >  
-inline 
-typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-virtual_insert(const Point& a,
-	       Locate_type lt,
-	       Face_handle loc, 
-	       int li )
-// virtual version of insert
-{
-  return insert(a,lt,loc,li);
-}
-
-template < class Gt, class Tds, class Itag >  
-inline 
-typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-insert(const Point & a, Face_handle start)
- // inserts a in the triangulation
-// constrained edges are updated
-// Delaunay property is restored
-{
-  Vertex_handle va= Ctr::insert(a, start);
-  flip_around(va); 
-  return va;
-}
-
-template < class Gt, class Tds, class Itag >
-typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-insert(const Point& a, Locate_type lt, Face_handle loc, int li)
-// insert a point p, whose localisation is known (lt, f, i)
-// constrained edges are updated
-// Delaunay property is restored
-{
-  Vertex_handle va= Ctr::insert(a,lt,loc,li);
-  flip_around(va); 
-  return va;
-}
-
-template < class Gt, class Tds, class Itag >
-inline
-typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-push_back(const Point &p)
-{
-  return insert(p);
-}
-
-template < class Gt, class Tds, class Itag >
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-triangulate_hole(List_faces& intersected_faces,
-		 List_edges& conflict_boundary_ab,
-		 List_edges& conflict_boundary_ba)
-{
-  List_edges new_edges;
-  Ctr::triangulate_hole(intersected_faces,
-		       conflict_boundary_ab,
-		       conflict_boundary_ba,
-		       new_edges);
-  propagating_flip(new_edges);
-  return;
-}
-
-
-template < class Gt, class Tds, class Itag >  
-inline void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-remove(Vertex_handle v)
-  // remove a vertex and updates the constrained edges of the new faces
-  // precondition : there is no incident constraints
-{
-  CGAL_triangulation_precondition( v != Vertex_handle() );
-  CGAL_triangulation_precondition( ! is_infinite(v));
-  CGAL_triangulation_precondition( ! are_there_incident_constraints(v));
-  if  (dimension() <= 1)    Ctr::remove(v);
-  else  remove_2D(v);
-  return;
-}
-
-// template < class Gt, class Tds, class Itag >  
-// typename
-// Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
-// Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-// special_insert_in_edge(const Point & a, Face_handle f, int i)
-//   // insert  point p in edge(f,i)
-//   // bypass the precondition for point a to be in edge(f,i)
-//   // update constrained status
-//   // this member fonction is not robust with exact predicates 
-//   // and approximate construction. Should be removed 
-// {
-//   Vertex_handle vh=Ctr::special_insert_in_edge(a,f,i);
-//   flip_around(vh);
-//   return vh;
-// }
-
-template < class Gt, class Tds, class Itag >  
-void 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-remove_2D(Vertex_handle v)
-{
- if (test_dim_down(v)) {  this->_tds.remove_dim_down(v);  }
-  else {
-     std::list<Edge> hole;
-    make_hole(v, hole);
-    std::list<Edge> shell=hole; //because hole will be emptied by fill_hole
-    fill_hole_delaunay(hole);
-    update_constraints(shell);
-    delete_vertex(v);
-  }
-  return;
-}
-
-template < class Gt, class Tds, class Itag >
-void
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-remove_incident_constraints(Vertex_handle v)
-{
-   List_edges iconstraints;
-   if (are_there_incident_constraints(v,
-				      std::back_inserter(iconstraints))) {
-     Ctr::remove_incident_constraints(v);
-     if (dimension()==2) propagating_flip(iconstraints);
-   }
-   return;
-}
-
-template < class Gt, class Tds, class Itag >
-void
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-remove_constrained_edge(Face_handle f, int i)
-{
-  remove_constrained_edge(f,i,Emptyset_iterator());
-  return;  
-}
-
-
-template < class Gt, class Tds, class Itag >  
-bool 
-Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
-is_valid(bool verbose, int level) const
-{
-  bool result = Ctr::is_valid(verbose, level);
-  CGAL_triangulation_assertion( result );
-
-    Finite_faces_iterator fit= finite_faces_begin();
-    for (; fit != finite_faces_end(); fit++) {
-      for(int i=0;i<3;i++) {
-	result = result && !is_flipable(fit,i, false);
-	CGAL_triangulation_assertion( result );
-      }
-    }
-    return result;
-}
-
-
-
-} //namespace CGAL
-#endif // CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_plus_2.h b/3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_plus_2.h
deleted file mode 100644
index ea3c02e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_plus_2.h
+++ /dev/null
@@ -1,1198 +0,0 @@
-// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Mariette Yvinec
-
-#ifndef CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
-#define CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
-
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Polyline_constraint_hierarchy_2.h>
-#include <boost/tuple/tuple.hpp>
-
-#include <CGAL/Default.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Triangulation_2/insert_constraints.h>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4355)
-//warning C4355: 'this' : used in base member initializer list
-#endif
-
-namespace CGAL {
-
-// Comparison functor that compares two Vertex_handle.
-// Used as 'Compare' functor for the constraint hierarchy.
-template < class Tr >
-class Pct2_vertex_handle_less_xy {
-  const Tr* tr_p;
-
-public:
-  Pct2_vertex_handle_less_xy(const Tr* tr_p) : tr_p(tr_p) {}
-
-  typedef typename Tr::Vertex_handle Vertex_handle;
-
-  bool operator()(const Vertex_handle& va,
-                  const Vertex_handle& vb) const
-  {
-    return tr_p->compare_xy(va->point(), vb->point()) == SMALLER;
-  }
-}; // end class template Pct2_vertex_handle_less_xy
-
-// Tr the base triangulation class 
-// Tr has to be Constrained or Constrained_Delaunay with Constrained_triangulation_plus_vertex_base
-
-template < class Tr_ = Default >
-class Constrained_triangulation_plus_2  
-  : public  
-Default::Get< Tr_, Constrained_Delaunay_triangulation_2< 
-                      Exact_predicates_inexact_constructions_kernel
-                      , Triangulation_data_structure_2< 
-                            Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
-                          , Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
-                          >
-                      , CGAL::Exact_predicates_tag
-                      > >::type
-{
-  typedef typename 
-  Default::Get< Tr_, Constrained_Delaunay_triangulation_2< 
-                  Exact_predicates_inexact_constructions_kernel
-                  , Triangulation_data_structure_2< 
-                        Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
-                      , Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
-                      >
-                  , CGAL::Exact_predicates_tag
-                  > >::type Tr;
-
-
-  template<class CDT>
-  class Face_container
-  {
-    typedef typename CDT::Vertex_handle Vertex_handle;
-    typedef typename CDT::Face_handle Face_handle;
-  private:
-    typedef boost::tuple<Vertex_handle, Vertex_handle, Vertex_handle> TFace; 
-    std::vector<TFace> faces;
-    CDT& cdt;
-
-  public:
-    typedef Face_handle value_type;
-    typedef Face_handle& reference;
-    typedef const Face_handle& const_reference;
-
-    Face_container(CDT& cdt_ ) : cdt(cdt_) {}
-
-    void push_back(Face_handle fh)
-    {
-      faces.push_back(boost::make_tuple(fh->vertex(0),
-                                        fh->vertex(1),
-                                        fh->vertex(2)));
-    }
-
-    template <class OutputIterator>
-    void
-    write_faces(OutputIterator out)
-    {
-      for(typename std::vector<TFace>::reverse_iterator 
-            it = faces.rbegin(); it != faces.rend(); ++it) { 
-        Face_handle fh;
-        if(cdt.is_face(boost::get<0>(*it), boost::get<1>(*it), boost::get<2>(*it), fh)){
-          *out++ = fh;
-        }
-      }
-    }
-  };
-
-public:
-  typedef Tr                                   Triangulation;
-  typedef typename Tr::Intersection_tag        Intersection_tag;
-  typedef Constrained_triangulation_plus_2<Tr_> Self;
-  typedef Tr                                   Base;
-
-  typedef typename Triangulation::Edge             Edge;
-  typedef typename Triangulation::Vertex           Vertex;
-  typedef typename Triangulation::Vertex_handle    Vertex_handle;
-  typedef typename Triangulation::Face_handle      Face_handle;
-  typedef typename Triangulation::Face_circulator  Face_circulator ;
-  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
-  typedef typename Triangulation::Vertex_circulator  Vertex_circulator;
-  typedef typename Triangulation::Locate_type      Locate_type;
-  typedef typename Triangulation::Line_face_circulator Line_face_circulator;
-  typedef typename Triangulation::Geom_traits      Geom_traits;
-  typedef typename Geom_traits::Point_2            Point;
-  typedef typename Geom_traits::Segment_2          Segment;
-  typedef typename Triangulation::Constraint       Constraint;
-  typedef typename Triangulation::size_type        size_type;
-
-  typedef typename Triangulation::List_edges       List_edges;
-  typedef typename Triangulation::List_faces       List_faces;
-  typedef typename Triangulation::List_vertices    List_vertices;
-  typedef typename Triangulation::List_constraints List_constraints;
-
-  typedef Pct2_vertex_handle_less_xy<Self>         Vh_less_xy;
-  typedef Polyline_constraint_hierarchy_2<Vertex_handle, Vh_less_xy, Point>
-                                                   Constraint_hierarchy;
-public:
-  typedef Tag_true                                Constraint_hierarchy_tag;
-
-  // for user interface with the constraint hierarchy
-
-  typedef typename Constraint_hierarchy::Vertex_it 
-                                            Vertices_in_constraint_iterator;
-  
-  typedef typename Constraint_hierarchy::Point_it
-                                            Points_in_constraint_iterator;
-
-  typedef typename Constraint_hierarchy::Context      Context;
-  typedef typename Constraint_hierarchy::Context_iterator  Context_iterator;
-  typedef typename Constraint_hierarchy::C_iterator   Constraint_iterator;
-  typedef typename Constraint_hierarchy::Subconstraint_iterator  Subconstraint_iterator;
-  typedef typename Constraint_hierarchy::Constraint_id Constraint_id;   
-                                            
-  typedef std::pair<Vertex_handle, Vertex_handle> Subconstraint;
-  
-  //for backward compatibility
-  typedef Vertices_in_constraint_iterator     Vertices_in_constraint;
-
-  using Triangulation::geom_traits;
-  using Triangulation::cw;
-  using Triangulation::ccw;
-  using Triangulation::incident_faces;
-
-protected:
-  Constraint_hierarchy hierarchy;
- 
-public:
-  Constraint_hierarchy& hierarchy_ref()
-  {
-    return hierarchy;
-  }
-
-  Constrained_triangulation_plus_2(const Geom_traits& gt=Geom_traits()) 
-    : Triangulation(gt)
-    , hierarchy(Vh_less_xy(this))
-  { }
-
-  Constrained_triangulation_plus_2(const Constrained_triangulation_plus_2& ctp)
-    : Triangulation()
-    , hierarchy(Vh_less_xy(this))
-  { copy_triangulation(ctp);}
-
-  virtual ~Constrained_triangulation_plus_2() {}
-
-  Constrained_triangulation_plus_2 & operator=(const Constrained_triangulation_plus_2& ctp)
-  {
-    copy_triangulation(ctp);
-    return *this;
-  }
-
-  template<class InputIterator>
-  Constrained_triangulation_plus_2(InputIterator first,
-				   InputIterator last,
-				   const Geom_traits& gt=Geom_traits() )
-     : Triangulation(gt)
-     , hierarchy(Vh_less_xy(this))
-  {
-    insert_constraints(first, last);
-    CGAL_triangulation_postcondition( this->is_valid() );
-  }
-
-
-  Constrained_triangulation_plus_2(std::list<std::pair<Point,Point> > constraints,
-				   const Geom_traits& gt=Geom_traits() )
-    : Triangulation(gt)
-     , hierarchy(Vh_less_xy(this))
-  {
-    insert_constraints(constraints.begin(), constraints.end());
-    CGAL_triangulation_postcondition( this->is_valid() );
-  }
-  //Helping
-  void clear() { Base::clear(); hierarchy.clear(); }
-  void copy_triangulation(const Constrained_triangulation_plus_2 &ctp);
-  void swap(Constrained_triangulation_plus_2 &ctp);
-
-  // INSERTION
-  Vertex_handle insert(const Point& a, 
-		       Face_handle start = Face_handle() );
-  Vertex_handle insert(const Point& p,
-		       Locate_type lt,
-		       Face_handle loc, int li );
-  
-  Constraint_id insert_constraint(const Point& a, const Point& b)
-  {
-    Vertex_handle va= insert(a);
-    // If the segment is "short" it is a good idea to start the next insertion
-    // close to point a
-    // Otherwise, to start here is as good as elsewhere
-    Vertex_handle vb = insert(b, va->face());
-    return insert_constraint(va, vb); 
-  }
-
-  Constraint_id insert_constraint(const Constraint& c) 
-  {
-    return insert_constraint(c.first, c.second);
-  }
-  
-  Constraint_id insert_constraint(Vertex_handle va, Vertex_handle vb)
-  {
-    // protects against inserting twice the same constraint
-    Constraint_id cid = hierarchy.insert_constraint(va, vb);
-    if (va != vb && (cid != Constraint_id(NULL)) )  insert_subconstraint(va,vb); 
-
-    return cid;
-  }
-
-  template < class InputIterator>
-  Constraint_id insert_constraint(InputIterator first, InputIterator last, bool close=false)
-  {
-    return insert_constraint_seq_impl(first, last, close);
-  }
-
-  template<typename Range>
-  Constraint_id insert_constraint(const Range& r)
-  {
-    return insert_constraint_seq_impl(r.begin(), r.end(), false);
-  }
-
-  template < class PolygonTraits_2, class Container>
-  Constraint_id insert_constraint(const Polygon_2<PolygonTraits_2,Container>& polygon)
-  {
-    return insert_constraint_seq_impl(polygon.vertices_begin(), polygon.vertices_end(), true);
-  }
-  /*
-  template<typename InputIterator>
-  size_type insert_constraints(InputIterator first, InputIterator last)
-  {
-    size_type n = 0;
-
-    for(; first != last; ++first)
-    {
-      if(insert_constraint(*first))
-        ++n;
-    }
-    return n;
-  }
-  */
-  Vertex_handle push_back(const Point& p)
-  {
-    return insert(p);
-  }
-
-  Constraint_id push_back(const Constraint& c)
-  {
-    return insert_constraint(c.first, c.second);
-  }
-
-  // for backward compatibility
-  // not const Point&, because otherwise VC6/7 messes it up with 
-  // the insert that takes an iterator range
-  Constraint_id insert(Point a, Point b) { return insert_constraint(a, b); }
-  Constraint_id insert(Vertex_handle va, Vertex_handle  vb) { return insert_constraint(va,vb); }
-
-
-
-  template <class PointIterator, class IndicesIterator>
-  std::size_t insert_constraints(PointIterator points_first,
-                                 PointIterator points_beyond,
-                                 IndicesIterator indices_first,
-                                 IndicesIterator indices_beyond)
-  {
-    std::vector<Point> points(points_first, points_beyond);
-    return internal::insert_constraints(*this,points, indices_first, indices_beyond);
-  }
-
-
- template <class ConstraintIterator>
-  std::size_t insert_constraints(ConstraintIterator first,
-                                 ConstraintIterator beyond)
-  {
-    return internal::insert_constraints(*this,first,beyond);
-  }
-
-
-  Vertices_in_constraint_iterator
-  insert_vertex_in_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
-			      Vertex_handle vh)
-  {
-    return insert_vertex_in_constraint(cid, pos, vh, Emptyset_iterator());
-  }
-
-  Vertices_in_constraint_iterator
-  remove_vertex_from_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos)
-  {
-    return remove_vertex_from_constraint(cid, pos, Emptyset_iterator());
-  }
-
-
-  template <class OutputIterator>
-  Vertices_in_constraint_iterator
-  remove_vertex_from_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
-				OutputIterator out)
-  {
-    if(pos == vertices_in_constraint_begin(cid)){
-      ++pos;
-      Constraint_id aux = hierarchy.split2(cid,pos);
-      remove_constraint(aux, out);
-      return pos;
-    }
-
-    Vertices_in_constraint_iterator it = vertices_in_constraint_end(cid);
-    it--;
-    if(pos == it){
-      --pos;
-      Constraint_id aux = hierarchy.split(cid, pos);
-      remove_constraint(aux, out);
-      return vertices_in_constraint_end(cid);
-    }
-
-    Vertices_in_constraint_iterator pp = pos;
-    --pp;
-    Vertex_handle a = *pp;
-    pp = pos;
-    ++pp;
-    Vertex_handle b = *pp;
-    --it;
-    Vertices_in_constraint_iterator beg = vertices_in_constraint_begin(cid);
-    ++beg;
-    Face_container<Constrained_triangulation_plus_2> fc(*this);
-
-    Constraint_id head = 0, tail = 0;
-    if(pos != beg){
-      // split off head
-      --pos;
-      head = hierarchy.split2(cid, pos);
-      ++pos;
-    }
-    if(pos != it){
-      // split off tail
-      ++pos;
-      tail = hierarchy.split(cid,pos);
-    }
-  
-    Constraint_id aux = insert_constraint(a, b, std::back_inserter(fc));
-    pos = vertices_in_constraint_end(aux);
-    --pos;
-    --pos; // this is not necessarily == vertices_in_constraint_begin(aux);
-    hierarchy.swap(cid, aux);
-    remove_constraint(aux, std::back_inserter(fc));
-
-    if(head.vl_ptr()){
-      hierarchy.concatenate2(head, cid);
-    }
-
-    if(tail.vl_ptr()){
-      hierarchy.concatenate(cid, tail);
-    }
-    fc.write_faces(out);
-    ++pos; // we went one too far back because the last vertex gets removed by concatenate
-    return pos;
-  }
-
-  // Inserts vh before pos
-  // Returns an iterator pointing on the newly inserted vertex
-  // Writes the modified faces to out
-  template <class OutputIterator>
-  Vertices_in_constraint_iterator
-  insert_vertex_in_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
-			      Vertex_handle vh, OutputIterator out)
-  {
-    // Insertion before the first vertex
-    if(pos == vertices_in_constraint_begin(cid)){
-      //std::cout << "insertion before first vertex" << std::endl;
-      Constraint_id head = insert_constraint(vh, *pos, out);
-      hierarchy.concatenate2(head, cid);
-      return vertices_in_constraint_begin(cid);
-    } 
-
-    // Insertion after the last vertex
-    if(pos == vertices_in_constraint_end(cid)){
-      //std::cout << "insertion after last vertex" << std::endl;
-      pos--;
-      Constraint_id tail = insert_constraint(*pos, vh, out);
-      pos = vertices_in_constraint_end(tail);
-      --pos;
-      hierarchy.concatenate(cid, tail);
-      return pos;
-    }
-    Vertex_handle b = *pos;
-    --pos;    
-    Vertex_handle a = *pos;
-    ++pos;
-    Face_container<Constrained_triangulation_plus_2> fc(*this);
-    Vertices_in_constraint_iterator beg = vertices_in_constraint_begin(cid), vcit;
-    ++beg;
-    vcit = beg;
-    ++beg;
-    // If the constraint consists only of a segment, and we want to insert
-    // in the middle 
-    if((pos == vcit) && (beg == vertices_in_constraint_end(cid))){
-      //std::cout << "insertion in constraint which is a segment" << std::endl;
-      Constraint_id aux1 = insert_constraint(a, vh, std::back_inserter(fc));
-      Constraint_id aux2 = insert_constraint(vh, b, std::back_inserter(fc));
-      pos = vertices_in_constraint_begin(aux2);
-      concatenate(aux1, aux2);
-      hierarchy.swap(cid, aux1);
-      remove_constraint(aux1, std::back_inserter(fc));
-      fc.write_faces(out);
-      return pos;
-      
-    }
-    Constraint_id head = 0, tail = 0;
-    Vertices_in_constraint_iterator bit = vertices_in_constraint_begin(cid);
-    Vertices_in_constraint_iterator pred = pos;
-    --pred;
-    ++bit;
-    if(pos != bit){
-      //std::cout << "split head" << std::endl;
-      head = split(cid, pred);
-      std::swap(head,cid); // split2 does the job
-      pred = vertices_in_constraint_begin(cid);
-      pos = pred;
-      ++pos;
-    }
-    Vertices_in_constraint_iterator eit = vertices_in_constraint_end(cid);
-    --eit;
-    if(pos != eit){
-      //std::cout << "split tail" << std::endl;
-      tail = split(cid, pos);    
-    }
-    
-    // make the new constraint
-    Constraint_id aux1 = insert_constraint(a, vh, std::back_inserter(fc));
-    Constraint_id aux2 = insert_constraint(vh, b, std::back_inserter(fc));
-    pos = vertices_in_constraint_begin(aux2);
-    concatenate(aux1, aux2);
-
-    if(head.vl_ptr()){
-      //std::cout << "concatenate head" << std::endl;
-      remove_constraint(cid, std::back_inserter(fc));
-      hierarchy.concatenate(head, aux1);
-    } else {
-      hierarchy.swap(cid, aux1);
-      remove_constraint(aux1, std::back_inserter(fc));
-      head = cid;
-    }
-
-    if(tail.vl_ptr()){
-      //std::cout << "concatenate tail" << std::endl;
-      concatenate(head, tail);
-    }
-    fc.write_faces(out);
-    return pos;
-  }
-
-  template < class InputIterator, class OutputIterator>
-  Constraint_id insert_constraint(InputIterator first, InputIterator last, OutputIterator out)
-  {
-    Face_handle hint;
-    Face_container<Constrained_triangulation_plus_2> fc(*this);
-    std::vector<Vertex_handle> vertices;
-    for(;first!= last; first++){
-      Vertex_handle vh = insert(*first, hint);
-      hint = vh->face();
-      // no duplicates
-      if(vertices.empty() || (vertices.back() != vh)){
-	vertices.push_back(vh);
-      }
-    }
-    int n = vertices.size();
-    if(n == 1){
-      return NULL;
-    }
-    Constraint_id ca = hierarchy.insert_constraint(vertices[0],vertices[1]);
-    insert_subconstraint(vertices[0],vertices[1], std::back_inserter(fc)); 
-
-    if(n>2){
-      for(int j=1; j<n-1; j++){
-	hierarchy.append_constraint(ca, vertices[j], vertices[j+1]);
-	insert_subconstraint(vertices[j], vertices[j+1], std::back_inserter(fc));
-      }
-    }
-    for(Vertices_in_constraint_iterator vcit = vertices_in_constraint_begin(ca);
-	vcit != vertices_in_constraint_end(ca);
-	vcit++){
-      insert_incident_faces(vcit, out);
-    }
-    //AF    vertices_in_constraint_begin(ca)->fixed() = true;
-    // Vertices_in_constraint_iterator end = boost::prior(vertices_in_constraint_end(ca));
-    // end->fixed() = true;
-    fc.write_faces(out);
-    
-    return ca;
-  }
-
-
-private:
-  template < class InputIterator>
-  Constraint_id insert_constraint_seq_impl(InputIterator first, InputIterator last, bool is_polygon)
-  {
-    Face_handle hint;
-    std::vector<Vertex_handle> vertices;
-    for(;first!= last; first++){
-      Vertex_handle vh = insert(*first, hint);
-      hint = vh->face();
-      // no duplicates
-      if(vertices.empty() || (vertices.back() != vh)){
-	vertices.push_back(vh);
-      }
-    }
-    if(is_polygon && (vertices.size()>1) && (vertices.front() != vertices.back())){
-      vertices.push_back(vertices.front());
-    }
-
-    std::size_t n = vertices.size();
-    if(n == 1){
-      return NULL;
-    }
-    CGAL_assertion(n >= 2);
-    
-    Constraint_id ca = hierarchy.insert_constraint(vertices[0],vertices[1]);
-    insert_subconstraint(vertices[0],vertices[1]); 
-
-    if(n>2){
-      for(std::size_t j=1; j<n-1; j++){
-	hierarchy.append_constraint(ca, vertices[j], vertices[j+1]);
-	insert_subconstraint(vertices[j], vertices[j+1]);
-      }
-    }
- 
-    // fix first and last, one is redundant for is_polygon == true
-    // vertices.front()->fixed() = true;
-    // vertices.back()->fixed() = true;
-
-    return ca;
-  }
-public:
-  template <class OutputIterator>
-  typename Constrained_triangulation_plus_2<Tr>::Constraint_id
-  insert_constraint(Vertex_handle va, Vertex_handle vb, OutputIterator out)
-  {
-    // protects against inserting twice the same constraint
-    Constraint_id cid = hierarchy.insert_constraint(va, vb);
-    if (va != vb && (cid != NULL) )  insert_subconstraint(va,vb,out); 
-  
-    for(Vertices_in_constraint_iterator vcit = vertices_in_constraint_begin(cid);
-	vcit != vertices_in_constraint_end(cid);
-	vcit++){
-      insert_incident_faces(vcit, out);
-    }
-    return cid;
-  }
-
-  virtual Vertex_handle intersect(Face_handle f, int i, 
-			  Vertex_handle vaa,
-			  Vertex_handle vbb);
-  Vertex_handle intersect(Face_handle f, int i, 
-			  Vertex_handle vaa,
-			  Vertex_handle vbb,
-			  No_intersection_tag);
-  Vertex_handle intersect(Face_handle f, int i, 
-			  Vertex_handle vaa,
-			  Vertex_handle vbb,
-			  Exact_intersections_tag);
-  Vertex_handle intersect(Face_handle f, int i, 
-			  Vertex_handle vaa,
-			  Vertex_handle vbb,
-			  Exact_predicates_tag);
- 
-  // REMOVAL
-
-  template <class OutputIterator>
-  void remove_constraint(Constraint_id cid, OutputIterator out)
-  {
-    std::list<Vertex_handle> vertices(hierarchy.vertices_in_constraint_begin(cid),
-				      hierarchy.vertices_in_constraint_end(cid));
-
-    hierarchy.remove_constraint(cid);
-    for(typename std::list<Vertex_handle>::iterator it = vertices.begin(), 
-	  succ = it; 
-	++succ != vertices.end(); 
-	++it){
-      if(! is_subconstraint(*it, *succ)){ // this checks whether other constraints pass
-	Face_handle fh;
-	int i;
-        CGAL_triangulation_assertion_code(bool b =)
-          Triangulation::is_edge(*it, *succ, fh, i);
-	CGAL_triangulation_assertion(b);
-	Triangulation::remove_constrained_edge(fh,i, out); // this does also flipping if necessary.
-      }
-    }
-  }
-  void remove_constraint(Constraint_id cid)
-  {
-    remove_constraint(cid, Emptyset_iterator());
-  }
-
-  void remove_constraint(Vertex_handle va, Vertex_handle vb)
-  {
-    hierarchy.remove_constraint(va,vb);
-  }
-
-  void simplify(Vertices_in_constraint_iterator v)
-  {
-    Vertices_in_constraint_iterator u = boost::prior(v);
-    Vertices_in_constraint_iterator w = boost::next(v);
-    hierarchy.simplify(u,v,w);
-    
-    Triangulation::remove_incident_constraints(*v);
-  
-    Triangulation::remove(*v);
-  
-    Triangulation::insert_constraint(*u, *w);
-  }
-
-  std::size_t remove_points_without_corresponding_vertex(Constraint_id cid)
-  {
-    return hierarchy.remove_points_without_corresponding_vertex(cid);
-  }
-  std::size_t remove_points_without_corresponding_vertex()
-  {
-    return hierarchy.remove_points_without_corresponding_vertex();
-  }
-
-
-  // CONCATENATE AND SPLIT
-
-  // concatenates two constraints
-  Constraint_id
-  concatenate(Constraint_id first, Constraint_id second);
-
-  // split a constraint in two constraints, so that vcit becomes the first
-  // vertex of the new constraint
-  // returns the new constraint 
-  Constraint_id
-  split(Constraint_id first, Vertices_in_constraint_iterator vcit);
-  
-  // Query of the constraint hierarchy
-  Constraint_iterator constraints_begin() const;
-  Constraint_iterator constraints_end()   const;
-  Subconstraint_iterator subconstraints_begin() const;
-  Subconstraint_iterator subconstraints_end() const;
-  Context   context(Vertex_handle va, Vertex_handle vb); //AF: const; 
-
-  bool is_subconstraint(Vertex_handle va, 
-			Vertex_handle vb);
-  size_type number_of_enclosing_constraints(Vertex_handle va, 
-                                            Vertex_handle vb) const;
-  Context_iterator   contexts_begin(Vertex_handle va, 
-				    Vertex_handle vb) const;
-  Context_iterator   contexts_end(Vertex_handle va, 
-				  Vertex_handle vb) const;
-
-  Vertices_in_constraint_iterator vertices_in_constraint_begin(Constraint_id cid) const;
-  Vertices_in_constraint_iterator vertices_in_constraint_end(Constraint_id cid) const ;  
-  Vertices_in_constraint_iterator vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const;
-  Vertices_in_constraint_iterator vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const ;
-  Points_in_constraint_iterator points_in_constraint_begin(Constraint_id cid) const;
-  Points_in_constraint_iterator points_in_constraint_end(Constraint_id cid) const ;
-
-
-  size_type number_of_constraints() {
-    return static_cast<size_type> (hierarchy.number_of_constraints());}
-  size_type number_of_subconstraints(){
-    return static_cast<size_type> (hierarchy.number_of_subconstraints());}
-
-  // public member, used by Mesh_2::Refine_edges
-  void split_constraint(Vertex_handle v1, Vertex_handle v2,
-                        Vertex_handle va) {
-    hierarchy.split_constraint(v1,v2,va);
-  }
-
-protected:
-  template <class OutputItertator>
-  void insert_incident_faces(Vertices_in_constraint_iterator vcit, OutputItertator out)
-  {
-    Vertex_handle vh = *vcit;
-    Face_circulator fc = incident_faces(vh), done = fc;
-    Face_circulator null ;
-    if ( fc != null )
-    {
-      do {
-        Face_handle fh = fc;
-        out = fh;
-        out++;
-        fc++;
-      }while(fc != done);
-    }
-  }  
-
-
-void
-insert_subconstraint(Vertex_handle vaa,
-		     Vertex_handle vbb)
-  {
-    insert_subconstraint(vaa,vbb,Emptyset_iterator());
-  }
-
-
-
-
-template <class OutputItertator>
-void
-insert_subconstraint(Vertex_handle vaa,
-		     Vertex_handle vbb,
-		     OutputItertator out)
-  // insert the subconstraint [vaa vbb] 
-  // it will eventually be splitted into several subconstraints
-{
-  CGAL_triangulation_precondition( vaa != vbb);
-  Vertex_handle vi;
-
-  Face_handle fr;
-  int i;
-  if(this->includes_edge(vaa,vbb,vi,fr,i)) {
-    this->mark_constraint(fr,i);
-    if (vi != vbb)  {
-      hierarchy.split_constraint(vaa,vbb,vi);
-      insert_subconstraint(vi,vbb, out);
-    }
-    return;
-  }
-      
-  List_faces intersected_faces;
-  List_edges conflict_boundary_ab, conflict_boundary_ba;
-     
-  bool intersection  = this->find_intersected_faces( 
-    vaa, vbb,
-    intersected_faces,
-    conflict_boundary_ab,
-    conflict_boundary_ba,
-    vi);
-
-  if ( intersection) {
-    if (vi != vaa && vi != vbb) {
-      hierarchy.split_constraint(vaa,vbb,vi);
-      insert_subconstraint(vaa,vi, out); 
-      insert_subconstraint(vi,vbb, out); 
-     }
-    else insert_subconstraint(vaa,vbb,out);  
-
-    
-    return;
-  }
-
-
-  //no intersection
-
-  List_edges edges(conflict_boundary_ab);
-  std::copy(conflict_boundary_ba.begin(), conflict_boundary_ba.end(), std::back_inserter(edges));
-
-  this->triangulate_hole(intersected_faces,
-                         conflict_boundary_ab,
-                         conflict_boundary_ba);
-
-  this->get_bounded_faces(edges.begin(),
-                          edges.end(),
-                          out);
-
-  if (vi != vbb) {
-    hierarchy.split_constraint(vaa,vbb,vi);
-    insert_subconstraint(vi,vbb, out); 
-  }
-  return;
-}
-
-
-
-  //to debug
-public:
-  void print_hierarchy() { hierarchy.print(); }
-
-  //template member functions
-public:
-  template < class InputIterator >
-#if defined(_MSC_VER)
-  std::ptrdiff_t insert(InputIterator first, InputIterator last, int i = 0)
-#else
-    std::ptrdiff_t insert(InputIterator first, InputIterator last) 
-#endif
-  {
-    size_type n = this->number_of_vertices();
-
-    std::vector<Point> points (first, last);
-
-    spatial_sort (points.begin(), points.end(), geom_traits());
-
-    Face_handle hint;
-    for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-            p != end; ++p)
-        hint = insert (*p, hint)->face();
-
-    return this->number_of_vertices() - n;
-  }
-
-};
-
-template <class Tr>
-void
-Constrained_triangulation_plus_2<Tr>::
-copy_triangulation(const Constrained_triangulation_plus_2 &ctp)
-{
-  Base::copy_triangulation(ctp);
-  //the following assumes that the triangulation and its copy
-  // iterate on their vertices in the same order 
-  std::map<Vertex_handle,Vertex_handle> vmap;
-  Vertex_iterator vit = ctp.vertices_begin();
-  Vertex_iterator vvit = this->vertices_begin();
-  for( ; vit != ctp.vertices_end(); ++vit, ++vvit) {
-    CGAL_triangulation_assertion(vit->point() == vvit->point());
-    vmap[vit] = vvit;
-  }
-  hierarchy.copy(ctp.hierarchy, vmap);
-}
-
-template <class Tr>
-void
-Constrained_triangulation_plus_2<Tr>::
-swap(Constrained_triangulation_plus_2 &ctp)
-{
-  Base::swap(ctp);
-  hierarchy.swap(ctp.hierarchy);
-}
-
-template < class Tr >
-inline 
-typename Constrained_triangulation_plus_2<Tr>::Vertex_handle
-Constrained_triangulation_plus_2<Tr>::
-insert(const Point& a, Face_handle start)
-{
-  Locate_type lt;
-  int li;
-  Face_handle loc = this->locate(a, lt, li, start);
-  return insert(a,lt,loc,li);
-}
-
-template < class Tr>
-typename Constrained_triangulation_plus_2<Tr>::Vertex_handle
-Constrained_triangulation_plus_2<Tr>::
-insert(const Point& a, Locate_type lt, Face_handle loc, int li)
-{
-  Vertex_handle v1, v2;
-  bool insert_in_constrained_edge = false;
-
-  if ( lt == Triangulation::EDGE && loc->is_constrained(li) ){
-    insert_in_constrained_edge = true;
-    v1=loc->vertex(ccw(li)); //endpoint of the constraint
-    v2=loc->vertex(cw(li)); // endpoint of the constraint
-  }
-  Vertex_handle va = Triangulation::insert(a,lt,loc,li);
-  // update the hierarchy
-  if (insert_in_constrained_edge) {
-    hierarchy.split_constraint(v1,v2,va);
-  }
-  return va;
-}
-
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
-Constrained_triangulation_plus_2<Tr>::
-intersect(Face_handle f, int i, 
-	  Vertex_handle vaa,
-	  Vertex_handle vbb) 
-{
-  return intersect(f, i, vaa, vbb, Intersection_tag());
-}
-
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
-Constrained_triangulation_plus_2<Tr>::
-
-intersect(Face_handle , int , 
-	  Vertex_handle ,
-	  Vertex_handle ,
-	  No_intersection_tag)
-{
-  std::cerr << " sorry, this triangulation does not deal with" 
-	    <<    std::endl
-	    << " intersecting constraints" << std::endl;
-  CGAL_triangulation_assertion(false);
-  return Vertex_handle();
-}
-
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
-Constrained_triangulation_plus_2<Tr>::
-intersect(Face_handle f, int i, 
-	  Vertex_handle vaa,
-	  Vertex_handle vbb,
-	  Exact_intersections_tag)
-// compute the intersection of the constraint edge (f,i) 
-// with the subconstraint (vaa,vbb) being inserted
-// insert the intersection point
-// (the  constraint edge (f,i) will be split in hierarchy by insert)
-// and return the Vertex_handle of the new Vertex
-{
-  Vertex_handle  vc, vd, va, vb;
-  Vertex_handle  vcc, vdd;
-  vcc = f->vertex(cw(i));
-  vdd = f->vertex(ccw(i));
-  CGAL_triangulation_assertion_code( bool b1 = )
-  hierarchy.enclosing_constraint(vcc,vdd,vc,vd);
-  CGAL_triangulation_assertion_code( bool b2 = )
-  hierarchy.enclosing_constraint(vaa,vbb,va,vb);
-  CGAL_triangulation_assertion(b1);
-  CGAL_triangulation_assertion(b2);
-
-  const Point& pa = va->point();
-  const Point& pb = vb->point();
-  const Point& pc = vc->point();
-  const Point& pd = vd->point();
-  Point pi;
-  Intersection_tag itag = Intersection_tag();
-  CGAL_triangulation_assertion_code( bool ok = )
-  intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
-  CGAL_triangulation_assertion(ok);
-
-  Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i);
-  return vi; 
-}
-
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>::Vertex_handle 
-Constrained_triangulation_plus_2<Tr>::
-intersect(Face_handle f, int i, 
-	  Vertex_handle vaa,
-	  Vertex_handle vbb,
-	  Exact_predicates_tag)
-{
-  Vertex_handle  vcc, vdd;
-  vcc = f->vertex(cw(i));
-  vdd = f->vertex(ccw(i));
-
-  const Point& pa = vaa->point();
-  const Point& pb = vbb->point();
-  const Point& pc = vcc->point();
-  const Point& pd = vdd->point();
-
-  Point pi; //creator for point is required here
-  Intersection_tag itag = Intersection_tag();
-  bool ok  = intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
-
-  Vertex_handle vi;
-  if ( !ok) {  //intersection detected but not computed
-    int i = limit_intersection(geom_traits(), pa, pb, pc, pd, itag);
-    switch(i){
-    case 0 : vi = vaa; break;
-    case 1 : vi = vbb; break;
-    case 2 : vi = vcc; break;
-    case 3 : vi = vdd; break; 
-    }
-    if(vi == vaa || vi == vbb) {
-      Triangulation::remove_constrained_edge(f, i);
-    }
-  }
-  else{ //computed
-    Triangulation::remove_constrained_edge(f, i);
-    vi = insert(pi, f);
-  }
-
-  // vi == vc or vi == vd may happen even if intersection==true
-  // due to approximate construction of the intersection
-  if (vi != vcc && vi != vdd) { 
-    hierarchy.split_constraint(vcc,vdd,vi);
-    insert_subconstraint(vcc,vi); 
-    insert_subconstraint(vi, vdd);
-  } 
-  else {
-    insert_subconstraint(vcc,vdd);
-  }
-  return vi; 
-}
-
-  // CONCATENATE AND SPLIT
-
-  // concatenates two constraints
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>::Constraint_id
-Constrained_triangulation_plus_2<Tr>::concatenate(Constraint_id first, Constraint_id second)
-{
-  return hierarchy.concatenate(first,second);
-}
-
-  // split a constraint in two constraints, so that vcit becomes the first
-  // vertex of the new constraint
-  // returns the new constraint 
-template <class Tr>
-typename Constrained_triangulation_plus_2<Tr>::Constraint_id
-Constrained_triangulation_plus_2<Tr>::split(Constraint_id first, Vertices_in_constraint_iterator vcit)
-{
-  return hierarchy.split(first, vcit);
-}
-
-
-template <class Tr>
-std::ostream &
-operator<<(std::ostream& os, 
-	   const Constrained_triangulation_plus_2<Tr> &ct)
-{
-  ct.file_output(os);
-  return os ;
-}
-
-// Constraint Hierarchy Queries
-
-template <class Tr>
-inline
-typename
-Constrained_triangulation_plus_2<Tr>::Constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-constraints_begin() const
-{
-  return hierarchy.c_begin();
-}
-
-template <class Tr>
-inline
-typename
-Constrained_triangulation_plus_2<Tr>::Constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-constraints_end() const
-{
-  return hierarchy.c_end();
-}
-
-template <class Tr>
-inline
-typename
-Constrained_triangulation_plus_2<Tr>::Subconstraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-subconstraints_begin() const
-{
-  return hierarchy.subconstraint_begin();
-}
-
-template <class Tr>
-inline
-typename
-Constrained_triangulation_plus_2<Tr>::Subconstraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-subconstraints_end() const
-{
-  return hierarchy.subconstraint_end();
-}
-
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Context
-Constrained_triangulation_plus_2<Tr>::
-context(Vertex_handle va, Vertex_handle vb) // AF: const
-{
-  return hierarchy.context(va,vb);
-}
-
-
-template <class Tr>
-inline 
-typename Constrained_triangulation_plus_2<Tr>::size_type
-Constrained_triangulation_plus_2<Tr>::
-number_of_enclosing_constraints(Vertex_handle va, Vertex_handle vb) const
-{
- return static_cast<size_type> 
-   (hierarchy.number_of_enclosing_constraints(va,vb)); 
-}
-
-template <class Tr>
-inline bool
-Constrained_triangulation_plus_2<Tr>::
-is_subconstraint(Vertex_handle va, Vertex_handle vb)
-{
- return hierarchy.is_subconstrained_edge(va,vb); 
-}
-
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Context_iterator
-Constrained_triangulation_plus_2<Tr>::
-contexts_begin(Vertex_handle va, Vertex_handle vb) const
-{
-  return hierarchy.contexts_begin(va,vb);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Context_iterator
-Constrained_triangulation_plus_2<Tr>::
-contexts_end(Vertex_handle va, Vertex_handle vb) const
-{
-  return hierarchy.contexts_end(va,vb);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-vertices_in_constraint_begin(Constraint_id cid) const
-{
-  return  hierarchy.vertices_in_constraint_begin(cid);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-vertices_in_constraint_end(Constraint_id cid) const
-{
-  return  hierarchy.vertices_in_constraint_end(cid);
-}
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const
-{
-  return  hierarchy.vertices_in_constraint_begin(va,vb);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const
-{
-  return  hierarchy.vertices_in_constraint_end(va,vb);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Points_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-points_in_constraint_begin(Constraint_id cid) const
-{
-  return  hierarchy.points_in_constraint_begin(cid);
-}
-
-template <class Tr>
-inline
-typename Constrained_triangulation_plus_2<Tr>::Points_in_constraint_iterator
-Constrained_triangulation_plus_2<Tr>::
-points_in_constraint_end(Constraint_id cid) const
-{
-  return  hierarchy.points_in_constraint_end(cid);
-}
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-#endif //CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/SM_walls.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/SM_walls.h
deleted file mode 100644
index 9f67275..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/SM_walls.h
+++ /dev/null
@@ -1,591 +0,0 @@
-// Copyright (c) 2005-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$ 
-// $Id$
-// 
-//
-// Author(s)     :  Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-#ifndef CGAL_CD3_SM_WALLS_H
-#define CGAL_CD3_SM_WALLS_H
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 227
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-template<typename SMap>
-class SM_walls : SM_decorator<SMap> {
-
-  typedef SMap                            Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>  Base;
-  typedef Base                            SM_decorator;
-  typedef CGAL::SM_point_locator<Base>    SM_point_locator;
-  typedef typename Base::Sphere_point     Sphere_point;
-  typedef typename Base::Sphere_circle    Sphere_circle;
-  typedef typename Base::Sphere_direction Sphere_direction;
-  typedef typename Base::Sphere_segment   Sphere_segment;
-  
-  typedef typename Base::SVertex_handle   SVertex_handle;
-  typedef typename Base::SFace_handle     SFace_handle;
-  typedef typename Base::SHalfedge_handle SHalfedge_handle;
-  typedef typename Base::SHalfloop_handle SHalfloop_handle;
-  typedef typename Base::Object_handle    Object_handle;
-
-  typedef typename Sphere_point::Vector_3       Vector_3;
-  typedef typename Sphere_circle::Point_3        Point_3;
-  typedef typename Sphere_circle::Plane_3        Plane_3;
-  typedef typename Sphere_point::FT             FT;
-
-
-  typedef typename Base::SHalfedge_around_svertex_circulator 
-    SHalfedge_around_svertex_circulator ;
-  typedef typename Base::SHalfedge_around_sface_circulator 
-    SHalfedge_around_sface_circulator ;
-  typedef typename Base::SFace_cycle_iterator
-    SFace_cycle_iterator;
-  
-  using Base::new_svertex;
-  using Base::link_as_face_cycle;
-  using Base::unlink_as_face_cycle;
-  using Base::link_as_isolated_vertex;
-  using Base::unlink_as_isolated_vertex;
-  using Base::new_shalfedge_pair;
-  using Base::unlink_as_loop;
-  using Base::is_isolated;
-  using Base::is_sm_boundary_object;
-  using Base::delete_face;
-
- public:
-  SM_walls(Sphere_map* M) : Base(M) {
-//   SM_decorator SD(sphere_map());
-//   SM_io_parser<SM_decorator>::dump(SD,std::cerr);
-  }
-
-  SHalfedge_handle find_cap(SVertex_handle sv, Sphere_point sp, Sphere_circle c) {
-
-    CGAL_NEF_TRACEN( "find_cap " << sv->source()->point() << ":" << sv->point() 
-	      << " , sp : " << sp );
-    /*
-    SHalfedge_handle se = sv->out_sedge();
-    if(se != SHalfedge_handle())
-      while(CGAL::spherical_orientation(cas(se)->twin()->source()->point(),
-					sp,
-					se->twin()->source()->point()) > 0)
-	se = cas(se);    
-
-    if(se != SHalfedge_handle()) {
-      CGAL_assertion(Sphere_circle(sv->point(),sp) != 
-		     Sphere_circle(sv->point(), se->twin()->source()->point()));
-    }
-    */
-    
-    SM_decorator SD(&*sv->source());
-    if( SD.is_isolated(sv))
-      return SHalfedge_handle();    
-
-    //    Sphere_circle c(sv->point(), sp);
-    CGAL_NEF_TRACEN( "sv    " << sv->point() );
-    CGAL_NEF_TRACEN( "c     " << c.orthogonal_vector() );
-    SHalfedge_around_svertex_circulator sh(sv->out_sedge()), send(sh);
-
-    Plane_3 pl(Point_3(0,0,0),Vector_3(sv->point()-CGAL::ORIGIN));
-    Sphere_circle cc(pl);
-
-    SHalfedge_around_svertex_circulator shnext(sh);      
-    ++shnext;
-    if(sh == shnext)
-      return sh;
-
-    CGAL_For_all(sh,send) {
-      shnext =sh;
-      ++shnext;
-
-      CGAL_NEF_TRACEN( "sh     " << sh->circle().orthogonal_vector() );
-      CGAL_NEF_TRACEN( "shnext " << shnext->circle().orthogonal_vector() );
-      Sphere_segment seg(sh->circle().orthogonal_vector(), shnext->circle().orthogonal_vector(),cc);
-      CGAL_NEF_TRACEN( "seg " << seg );
-      if(seg.has_on(c.orthogonal_vector()))
-	return sh;
-    }
-    CGAL_error_msg( "should not be executed");
-    return SHalfedge_handle();
-  }
-
-  void insert_new_svertex_into_sedge(SVertex_handle sv, SHalfedge_handle se) {
-    
-    CGAL_NEF_TRACEN( "insert new svertex into sedge " << sv->point() << " | " 
-	      << se->source()->point() << "->" << se->twin()->source()->point() );
-
-    CGAL_NEF_TRACEN( "double coords " << CGAL::to_double(sv->point().x())
-	      << ", " << CGAL::to_double(sv->point().y())
-	      << ", " << CGAL::to_double(sv->point().z()) );
-
-    //    SM_decorator SD(sphere_map());
-    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
-
-    CGAL_assertion(se->circle().has_on(sv->point()));
-
-    SHalfedge_handle se_new = this->new_shalfedge_pair();
-    SHalfedge_handle se_opp = se_new->twin();
-    se_new->source() = sv;
-    se_opp->source() = se->twin()->source();
-
-    se_new->circle() = se->circle();
-    CGAL_assertion(se_new->circle().has_on(se_new->source()->point()) &&
-		   se_new->circle().has_on(se_opp->source()->point()));
-    se_opp->circle() = se->twin()->circle();
-    se->twin()->source() = sv;
-    se_new->mark() = se_opp->mark() = se->mark();
-    se_new->incident_sface() = se->incident_sface();
-    se_opp->incident_sface() = se->twin()->incident_sface();
-
-    se_new->snext() = se->snext();
-    se->snext()->sprev() = se_new;
-    se->snext() = se_new;
-    se_new->sprev() = se;
-
-    se_opp->sprev() = se->twin()->sprev();
-    se->twin()->sprev()->snext() = se_opp;
-    se->twin()->sprev() = se_opp;
-    se_opp->snext() = se->twin();
-
-#ifndef CGAL_NEF_NO_INDEXED_ITEMS
-    se_new->set_index(se->get_index());
-    se_opp->set_index(se->twin()->get_index());
-#endif
-
-    se_new->source()->out_sedge() = se_new;
-    se_opp->source()->out_sedge() = se_opp;
-  }
-
-  void insert_new_svertex_into_sloop(SVertex_handle sv, SHalfloop_handle sl) {
-
-    SHalfedge_handle se = new_shalfedge_pair(sv, sv);
-    se->circle() = sl->circle();
-    se->twin()->circle() = sl->twin()->circle();
-    se->snext() = se->sprev() = se;
-    se->twin()->snext() = se->twin()->sprev() = se->twin();
-    se->incident_sface() = sl->incident_sface();
-    se->twin()->incident_sface() = sl->twin()->incident_sface();
-    se->mark() = se->twin()->mark() = sl->mark();
-
-#ifndef CGAL_NEF_NO_INDEXED_ITEMS
-    se->set_index(sl->get_index());
-    se->twin()->set_index(sl->twin()->get_index());
-#endif
-
-    unlink_as_loop(sl);
-    unlink_as_loop(sl->twin());
-
-    link_as_face_cycle(se,se->incident_sface());
-    link_as_face_cycle(se->twin(),se->twin()->incident_sface());
-
-    this->delete_loop_only();
-  }
-
-  bool legal_direction(Sphere_segment seg, Object_handle& o, Sphere_point& ip) {
-
-    CGAL_NEF_TRACEN( "legal_direction " << seg );
-    SM_point_locator P(this->sphere_map());
-    o = P.ray_shoot(seg, ip, false, false);
-
-    SVertex_handle sv;
-    if(assign(sv, o)) {
-      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
-      return true;
-    }
-
-    SHalfedge_handle se;
-    if(assign(se, o)) {
-      CGAL_NEF_TRACEN( "  found sedge " << ip );
-      return true;
-    }
-
-    SHalfloop_handle sl;
-    if(assign(sl, o)) {
-      CGAL_NEF_TRACEN( "  found sloop " << ip );
-      return true;
-    }
-
-    SFace_handle sf;
-    if(assign(sf, o))
-      CGAL_error_msg( "wrong handle");
-
-    CGAL_NEF_TRACEN("did not find anything");
-
-    ip = seg.target();
-    o = P.locate(seg.target());
-    /*
-    if(assign(sv, o)) {
-      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
-      if(is_isolated(sv))
-	return sv->incident_sface()->mark();
-      else {
-	bool collinear;
-	Sphere_direction d(seg.sphere_circle().opposite());
-	SHalfedge_handle e_res = P.out_wedge(sv, d, collinear);
-	if(collinear) {
-	  CGAL_NEF_TRACEN(" collinear ");
-	  o = Object_handle(e_res);
-	  return false;
-	} else {
-          if ( e_res->circle().has_on_negative_side(seg.source()) )
-            e_res = e_res->sprev();
-	  o = Object_handle(e_res->incident_sface());
-	  CGAL_NEF_TRACEN("  sface " << e_res->incident_sface()->mark());
-	  return e_res->incident_sface()->mark();
-	}
-      }
-    }
-    */
-    if(assign(sf, o)) {
-      CGAL_NEF_TRACEN( "  found sface" );
-      return sf->mark();
-    } 
-
-    /*    
-    if(assign(se,o))
-      CGAL_error_msg("wrong handle");
-
-    if(assign(sl,o))
-      CGAL_error_msg("wrong handle");
-    */
-    //    CGAL_NEF_SETDTHREAD(1);
-    return true;
-  }
-
-  bool need_to_shoot(Sphere_point sp, SVertex_handle& sv) {
-    //    CGAL_NEF_SETDTHREAD(47);
-    SM_point_locator pl(this->sphere_map());
-    Object_handle o = pl.locate(sp);
-    //        CGAL_NEF_SETDTHREAD(1);
-	
-    if(assign(sv, o))
-      return false;
-    
-    SHalfedge_handle se;
-    if(assign(se, o)) {
-      sv = new_svertex(sp);
-      sv->mark() = se->mark();
-      insert_new_svertex_into_sedge(sv, se);
-      return true;
-    }
-    
-    SFace_handle sf;
-    if(assign(sf, o)) {
-      if(sf->mark() == false)
-	return false;
-      sv = new_svertex(sp);
-      sv->mark() = sf->mark();
-      link_as_isolated_vertex(sv, sf);
-      return true;
-    }
-    
-    SHalfloop_handle sl;
-    if(assign(sl, o)) {
-      sv = new_svertex(sp);
-      sv->mark() = sl->mark();
-      insert_new_svertex_into_sloop(sv, sl);
-      return true;
-    }
-    
-    CGAL_error_msg( "wrong handle");
-    return false;
-  }
-  
-  SVertex_handle add_ray_svertex(Sphere_point sp) {
-
-    CGAL_NEF_TRACEN( "add_ray_svertex " << sp );
-
-    SM_point_locator P(this->sphere_map());
-
-    //    SM_decorator SD(this->sphere_map());
-    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
-
-    Object_handle o = P.locate(sp);
-
-    return add_svertex_into_object(sp,o);
-  }
-  
-  SVertex_handle add_svertex_into_object(Sphere_point sp, Object_handle o) {
-
-    CGAL_NEF_TRACEN( "add_svertex_into_object " << sp );
-
-    //    SM_decorator SD(this->sphere_map());
-    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
-
-    SVertex_handle sv;
-    SFace_handle sf;
-    if(assign(sf, o)) {
-      CGAL_NEF_TRACEN( "  found sface with mark " << sf->mark());
-      sv = new_svertex(sp);
-      sv->mark() = sf->mark();
-      sv->incident_sface() = sf;
-      link_as_isolated_vertex(sv,sf);
-      return sv;
-    }
-    
-    if(assign(sv, o)) {
-      CGAL_NEF_TRACEN( "  found svertex" );
-      return sv;
-    }
-
-    SHalfedge_handle se;
-    if(assign(se, o)) {
-      CGAL_NEF_TRACEN( "  found sedge");
-      sv = new_svertex(sp);
-      sv->mark() = se->mark();
-      insert_new_svertex_into_sedge(sv, se);
-      return sv;
-    }
-    
-    SHalfloop_handle sl;
-    if(assign(sl, o)) {
-      CGAL_NEF_TRACEN( " found sloop" );
-      sv = new_svertex(sp);
-      sv->mark() = sl->mark();
-      insert_new_svertex_into_sloop(sv,sl);
-      return sv;
-    }
-
-    CGAL_error_msg( "wrong handle");
-    return SVertex_handle();
-  }
-
-  SVertex_handle add_lateral_svertex(Sphere_segment sphere_ray, 
-				     bool compare_to_dir = false, 
-				     const Sphere_point& dir = Sphere_point()) {
-
-    CGAL_NEF_TRACEN( "add_lateral_svertex " << sphere_ray );
-
-    //    CGAL_assertion(sphere_ray.source() != dir);
-
-    Sphere_point sp1(sphere_ray.source());
-    Sphere_point sp2(sphere_ray.target());
-    CGAL_NEF_TRACEN( "double coords " << CGAL::to_double(sp1.x())
-	      << ", " << CGAL::to_double(sp1.y())
-	      << ", " << CGAL::to_double(sp1.z())
-	      << "->" << CGAL::to_double(sp2.x())
-	      << ", " << CGAL::to_double(sp2.y())
-	      << ", " << CGAL::to_double(sp2.z()) );
-
-    Sphere_point ip;
-    SM_point_locator P(this->sphere_map());
-    Object_handle o = P.ray_shoot(sphere_ray.source(), sphere_ray.sphere_circle(), ip);
-    if(compare_to_dir && dir != sphere_ray.source() && dir != ip) {
-      Sphere_segment test_seg(sphere_ray.source(), ip, sphere_ray.sphere_circle());
-      if(test_seg.has_on(dir)) {
-	SFace_handle sf;
-	o = P.locate(dir);
-	CGAL_assertion(assign(sf,o));
-	SVertex_handle sv = new_svertex(Sphere_point(dir));
-	sv->mark() = sf->mark();
-	link_as_isolated_vertex(sv, sf);
-	return sv;
-      }
-    }
-
-    SHalfedge_handle se;
-    if(assign(se,o)) {
-      CGAL_NEF_TRACEN( "  split sedge" );
-
-      SVertex_handle sv = new_svertex(ip);
-      sv->mark() = se->mark();
-      insert_new_svertex_into_sedge(sv,se);
-      return sv;    
-    }
-    
-    SVertex_handle sv;
-    if(assign(sv,o)) {
-      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
-      return sv;
-    }
-
-    SHalfloop_handle sl;
-    if(assign(sl,o)) {
-      CGAL_NEF_TRACEN( "  found sloop " );
-      SVertex_handle sv = new_svertex(ip);
-      sv->mark() = sl->mark();
-      insert_new_svertex_into_sloop(sv,sl);
-      /*
-      se = new_shalfedge_pair(sv, sv);
-      se->circle() = sl->circle();
-      se->twin()->circle() = sl->twin()->circle();
-      se->snext() = se->sprev() = se;
-      se->twin()->snext() = se->twin()->sprev() = se->twin();
-      se->incident_sface() = sl->incident_sface();
-      se->twin()->incident_sface() = sl->twin()->incident_sface();
-      se->mark() = se->twin()->mark() = sl->mark();
-      store_sm_boundary_object(se,se->incident_sface());
-      store_sm_boundary_object(se->twin(),se->twin()->incident_sface());
-
-      unlink_as_loop(sl);
-      unlink_as_loop(sl->twin());
-      delete_loop_only();
-      */
-      return sv;
-    }
-    
-    CGAL_error_msg( "wrong handle");
-    return SVertex_handle();
-  }
-
-#ifndef CGAL_NEF_NO_INDEXED_ITEMS
-  void add_sedge_between(SVertex_handle sv1, SVertex_handle sv2, 
-			 int& index1, int& index2,
-			 Sphere_circle c) {
-
-#else
-  void add_sedge_between(SVertex_handle sv1, SVertex_handle sv2, 
-			 Sphere_circle c) { // = Sphere_circle(sv1->point(),sv2->point())) {
-#endif
-    CGAL_NEF_TRACEN( "add sedges between " << sv1->point() 
-	      << ", " << sv2->point() 
-	      << " at " << sv1->source()->point() );
-
-    bool split_sface = true;
-
-    if(is_isolated(sv1)) {
-      split_sface = false;
-      if(!is_sm_boundary_object(sv1)) {
-	CGAL_NEF_TRACEN( "error " << sv1->point() << "at " << sv1->source()->point() );
-      }
-      unlink_as_isolated_vertex(sv1);
-    }
-    if(is_isolated(sv2)) {
-      split_sface = false;
-      if(!is_sm_boundary_object(sv2)) {
-	CGAL_NEF_TRACEN( "error " << sv2->point() << "at " << sv2->source()->point() );
-      }
-      unlink_as_isolated_vertex(sv2);
-    }
-
-    SHalfedge_handle cap1 = find_cap(sv1,sv2->point(),c);
-    if(cap1 != SHalfedge_handle()) CGAL_assertion(cap1->source()==sv1);
-    SHalfedge_handle cap2 = find_cap(sv2,sv1->point(),c.opposite());
-    if(cap2 != SHalfedge_handle()) CGAL_assertion(cap2->source()==sv2);
-
-    if(split_sface && 
-       cap1->incident_sface() == cap2->incident_sface()) {
-      SHalfedge_around_sface_circulator sfc(cap1), send(sfc);
-      CGAL_For_all(sfc,send)
-	if(is_sm_boundary_object(sfc))
-	  unlink_as_face_cycle(sfc);
-    }
-
-    /*
-     bool same_sface;
-     SHalfedge_handle entry;
-
-     if(split_sface) {      
-       same_sface = 
-	 cap1->incident_sface() == cap2->incident_sface();
-
-      std::cerr << "cap1 " << cap1->source()->point()
-		 << "->" << cap1->twin()->source()->point() << std::endl;
-       std::cerr << "cap2 " << cap2->source()->point()
-		 << "->" << cap2->twin()->source()->point() << std::endl;
-
-       if(same_sface) {
-	 SHalfedge_around_sface_circulator sfc(cap1), send(sfc);
-	 CGAL_For_all(sfc,send) {
-	   std::cerr << "check " << sfc->source()->point()
-		     << "->" << sfc->twin()->source()->point() << std::endl;
-	   if(is_sm_boundary_object(sfc))
-	     entry = sfc;
-	   if(sfc == cap2)
-	     same_sface = false;
-	 }
-       }
-     }
-    */
-    SHalfedge_handle se_new;
-    if(cap1 != SHalfedge_handle()) {
-      if(cap2 != SHalfedge_handle())
-	se_new = new_shalfedge_pair(cap1, cap2, this->AFTER, this->AFTER);
-      else 
-	se_new = new_shalfedge_pair(cap1, sv2, this->AFTER);
-      se_new->incident_sface() = se_new->twin()->incident_sface() = cap1->incident_sface();
-    } else {
-      if(cap2 != SHalfedge_handle()) {
-	se_new = new_shalfedge_pair(sv1, cap2, this->AFTER);
-	se_new->incident_sface() = se_new->twin()->incident_sface() = cap2->incident_sface();
-      } else {
-	se_new = new_shalfedge_pair(sv1, sv2);
-	se_new->incident_sface() = se_new->twin()->incident_sface() = sv1->incident_sface();
-      }
-    }
-    
-    se_new->mark() = se_new->twin()->mark() = se_new->incident_sface()->mark();
-#ifndef CGAL_NEF_NO_INDEXED_ITEMS
-    CGAL_assertion(index1==0 || index1!=index2);
-    if(index1==0) {
-      se_new->set_index();
-      se_new->twin()->set_index();
-      index1 = se_new->get_index();
-      index2 = se_new->twin()->get_index();
-    } else { 
-      se_new->set_index(index1);
-      se_new->twin()->set_index(index2);
-    }
-#endif 
-    CGAL_NEF_TRACEN( sv1->point() << "->" << sv2->point() << "==" 
-	      << se_new->source()->point() << "->" << se_new->twin()->source()->point() );
-
-    CGAL_assertion(sv1 == se_new->source() && 
-		   sv2 == se_new->twin()->source());
-
-    se_new->circle() = c;
-    se_new->twin()->circle() = c.opposite();
-
-    //    SM_decorator SD(this->sphere_map());
-    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
-
-    if(split_sface) {
-      if(cap1->incident_sface() == cap2->incident_sface()) {
-	SFace_handle sf_new = this->new_sface();
-	SFace_handle sf_old = cap1->incident_sface();
-      
-	CGAL_NEF_TRACEN("sf_new->mark()=" << sf_old->mark());
-	sf_new->mark() = sf_old->mark();
-	CGAL_assertion(sf_old->mark());
-	link_as_face_cycle(se_new, sf_new);
-	link_as_face_cycle(se_new->twin(), sf_old);
-      } else {
-	/*
-	SHalfedge_handle se = cap2;
-	while(se->incident_sface() != cap1->incident_sface()) {
-	  se->incident_sface() = cap1->incident_sface();
-	  se=se->snext();
-	}
-	*/
-	SFace_handle sf1 = cap1->incident_sface();
-	delete_face(cap2->incident_sface());
-	// TODO: some relinkings are redundant
-	SHalfedge_around_sface_circulator hfc(cap1), hend(hfc);
-	CGAL_For_all(hfc,hend) hfc->incident_sface() = sf1;	
-      }
-    }
-
-    //    SM_decorator SD1(this->sphere_map());
-    //    SM_io_parser<SM_decorator>::dump(SD1,std::cerr);
-
-    // TODO: handle inner face cycles
-  }    
-};
-
-} //namespace CGAL
-#endif //CGAL_CD3_SM_WALLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_melkman_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_melkman_impl.h
deleted file mode 100644
index 6abe216..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_melkman_impl.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 1999  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-#ifndef CGAL_CH_MELKMAN_IMPL_H
-#define CGAL_CH_MELKMAN_IMPL_H
-
-#ifndef CGAL_CH_NO_POSTCONDITIONS
-#include <CGAL/convexity_check_2.h>
-#endif // CGAL_CH_NO_POSTCONDITIONS
-
-#include <CGAL/Convex_hull_2/ch_assertions.h>
-#include <queue>
-#include <iterator>
-
-namespace CGAL {
-
-template <class InputIterator, class OutputIterator, class Traits>
-OutputIterator
-ch_melkman( InputIterator first, InputIterator last,
-            OutputIterator result, const Traits& ch_traits)
-{
-  typedef typename Traits::Point_2      Point;
-  typedef typename Traits::Segment_2    Segment;
-  typedef typename Traits::Equal_2      Equal_2;   
-  
-  typename Traits::Left_turn_2 left_turn  = ch_traits.left_turn_2_object();
-  Equal_2  equal_points = ch_traits.equal_2_object();
-  
-  CGAL_ch_assertion_code( \
-  typename Traits::Less_xy_2 less       = ch_traits.less_xy_2_object(); )
-  
-  std::deque< Point> Q;
-  
-  CGAL_ch_expensive_postcondition_code( std::deque< Point> IN; )
-  if (first == last) return result;           // 0 elements
-  Point p = *first;
-  CGAL_ch_expensive_postcondition_code( IN.push_back(p); )
-  if (++first == last)
-  { *result = p; ++result; return result; }   // 1 element
-  Point q = *first;
-  CGAL_ch_expensive_postcondition_code( IN.push_back(q); )
-  if (++first == last)                        // 2 elements
-  {
-    *result = p; ++result;
-    if (! equal_points(p,q))
-    { *result = q; ++result; }
-    return result;
-  }
-  Q.push_back( p);
-  
-  Point r;
-  while (first != last)
-  {
-    r = *first;
-    CGAL_ch_expensive_postcondition_code( IN.push_back(r); )
-    // visited input sequence =  p,..., q, r
-    if ( left_turn(p,q,r)) { Q.push_back( q);  break; }
-    if ( left_turn(q,p,r)) { Q.push_front( q); break; }
-    CGAL_ch_assertion( less( p, q) ? less (p, r) : less( r, p));
-    q = r;
-    ++first;
-  }
-  
-  
-  Point current = q;
-  if (first != last)           // non-collinear point r exists
-  {
-    
-    current = r;
-    // current, Q.front(), ..., Q.back()
-    // ccw convex hull of visited points
-    Point s;
-    while ( ++first != last)
-    {
-      r = *first;
-      CGAL_ch_expensive_postcondition_code( IN.push_back(r); )
-      if (left_turn( current, r, Q.front()) || 
-          left_turn( Q.back(), r, current))
-      // r outside cone Q.front(), current, Q.back() <=>
-      // right_turn( current, Q.front(), r) || 
-      // right_turn( Q.back(), current, r)
-      {
-        s = current;
-        while (!Q.empty() && !left_turn( r, s, Q.front()))
-        //      !left_turn( r, s, Q.front())
-        { s = Q.front(); Q.pop_front(); }
-        Q.push_front(s);
-        s = current;
-        while (!Q.empty() &&  !left_turn( s, r, Q.back()))
-        //     !right_turn( r, s, Q.back())
-        { s = Q.back(); Q.pop_back(); }
-        Q.push_back(s);
-        current = r;
-      }
-      
-    }
-    
-  }
-  
-  
-  Q.push_back( current);       // add last point to Q
-  CGAL_ch_postcondition( \
-  is_ccw_strongly_convex_2( Q.begin(), Q.end(), ch_traits));
-  CGAL_ch_expensive_postcondition( \
-  ch_brute_force_check_2( IN.begin(),IN.end(), Q.begin(),Q.end(), ch_traits));
-  std::copy( Q.begin(), Q.end(), result);
-  return result;
-  
-}
-
-} //namespace CGAL
-
-#endif // CGAL_CH_MELKMAN_IMPL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h
deleted file mode 100644
index 963124f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Jocelyn Meyron
-//
-
-#ifndef CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
-#define CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
-
-#include <CGAL/Convex_hull_3/dual/predicates.h>
-#include <CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h>
-#include <CGAL/Filtered_predicate.h>
-#include <CGAL/Cartesian_converter.h>
-
-// Traits class used during the computation of the dual convex
-// hull for the intersection of halfspaces.
-
-// This traits class base on the concept ConvexHullTraits_3
-
-namespace CGAL
-{
-  namespace Convex_hull_3
-  {
-    // Base traits class for dual predicates
-    template <class R_>
-      class Convex_hull_traits_base_dual_3
-      {
-        private:
-          // Origin : point inside the halfspaces intersection
-          typedef typename R_::Point_3 Primal_point_3;
-          Primal_point_3 origin;
-
-        public:
-
-          Convex_hull_traits_base_dual_3 (Primal_point_3 o =
-                                          Primal_point_3(0, 0, 0)) : origin(o)
-          {}
-
-          // Types
-          typedef R_                                     R;
-          typedef Convex_hull_traits_base_dual_3<R>      Self;
-          typedef typename R::RT                         RT;
-
-          // Dual
-          typedef typename R::Plane_3         Point_3;
-          typedef Plane_dual<R>               Plane_3;
-          typedef Segment_dual<R>             Segment_3;
-          typedef Plane_dual<R>               Triangle_3;
-
-          // Traits used by convex_hull_2
-          typedef typename CGAL::Convex_hull_3::Traits_xy_dual<R> Traits_xy_3;
-          typedef typename CGAL::Convex_hull_3::Traits_yz_dual<R> Traits_yz_3;
-          typedef typename CGAL::Convex_hull_3::Traits_xz_dual<R> Traits_xz_3;
-
-          // Construct objects
-          // Segment_3
-          class Construct_segment_3 {
-            public:
-              Segment_3 operator ()(const Point_3& p, const Point_3& q)
-              {
-                return Segment_3(p, q);
-              }
-          };
-
-          // Triangle_3
-          class Construct_triangle_3 {
-            public:
-              Triangle_3 operator ()(const Point_3& p,
-                                     const Point_3& q,
-                                     const Point_3& r)
-              {
-                return Triangle_3(p, q, r);
-              }
-          };
-
-          // Plane_3
-          class Construct_plane_3 {
-              public:
-                  Plane_3 operator ()(const Point_3& p,
-                                      const Point_3& q,
-                                      const Point_3& r)
-                  {
-                      return Plane_3(p,q,r);
-                  }
-          };
-
-          // Predicates
-          typedef Equal_3_dual_point<R>                     Equal_3;
-          typedef Collinear_3_dual_point<R>                 Collinear_3;
-          typedef Coplanar_3_dual_point<R>                  Coplanar_3;
-          typedef Has_on_positive_side_3_dual_point<R>      Has_on_positive_side_3;
-          typedef Less_distance_to_point_3_dual_point<R>    Less_distance_to_point_3;
-          typedef Less_signed_distance_to_plane_3_dual_point<R> Less_signed_distance_to_plane_3;
-
-          Construct_segment_3
-              construct_segment_3_object() const
-              { return Construct_segment_3(); }
-
-          Construct_plane_3
-              construct_plane_3_object() const
-              { return Construct_plane_3(); }
-
-          Construct_triangle_3
-              construct_triangle_3_object() const
-              { return Construct_triangle_3(); }
-
-          Collinear_3
-              collinear_3_object() const
-              { return Collinear_3(origin); }
-
-          Coplanar_3
-              coplanar_3_object() const
-              { return Coplanar_3(origin); }
-
-          Less_distance_to_point_3
-              less_distance_to_point_3_object() const
-              { return Less_distance_to_point_3(origin); }
-
-          Has_on_positive_side_3
-              has_on_positive_side_3_object() const
-              { return Has_on_positive_side_3(origin); }
-
-          Equal_3
-              equal_3_object() const
-              { return Equal_3(origin); }
-
-          Less_signed_distance_to_plane_3
-              less_signed_distance_to_plane_3_object() const
-              { return Less_signed_distance_to_plane_3(origin); }
-
-      };
-
-    // Non-filtered traits class
-    template <class R_, bool Has_filtered_predicates = R_::Has_filtered_predicates >
-        class Convex_hull_traits_dual_3
-        : public Convex_hull_traits_base_dual_3<R_>
-        {
-            private:
-                typedef typename R_::Point_3 Primal_point_3;
-
-            public:
-                Convex_hull_traits_dual_3 (Primal_point_3 o =
-                                           Primal_point_3(0, 0, 0)) : Convex_hull_traits_base_dual_3<R_>(o)
-                {}
-        } ;
-
-    // Converter for dual planes
-    template <class K1, class K2>
-        struct Cartesian_converter_dual : public Cartesian_converter<K1, K2>
-    {
-        using CGAL::Cartesian_converter<K1, K2>::operator();
-
-        Plane_dual<K2> operator() (const Plane_dual<K1> &in) const
-        {
-            return Plane_dual<K2>(operator()(in.p1),
-                                  operator()(in.p2),
-                                  operator()(in.p3));
-        }
-    };
-
-    // Filtered traits
-    template <typename R_>
-        class Convex_hull_filtered_traits_dual_3
-        : public Convex_hull_traits_base_dual_3<R_>
-        {
-            private:
-                // Origin
-                typedef typename R_::Point_3 Primal_point_3;
-                Primal_point_3 origin;
-
-            public:
-                Convex_hull_filtered_traits_dual_3 (Primal_point_3 o =
-                                                    Primal_point_3(0, 0, 0)) : origin(o)
-                {}
-
-                // Exact traits is based on the exact kernel.
-                typedef Convex_hull_traits_dual_3<typename R_::Exact_kernel_rt>
-                    Exact_traits;
-
-                // Filtering traits is based on the filtering kernel.
-                typedef Convex_hull_traits_dual_3<typename R_::Approximate_kernel>
-                    Filtering_traits;
-
-                // Converters
-                typedef Cartesian_converter_dual<R_, typename R_::Exact_kernel_rt>
-                    Converter_exact_dual;
-                typedef Cartesian_converter_dual<R_, typename R_::Approximate_kernel>
-                    Converter_approx_dual;
-
-                // Filtered predicates
-                typedef Filtered_predicate<
-                    typename Exact_traits::Equal_3,
-                    typename Filtering_traits::Equal_3,
-                    Converter_exact_dual ,
-                    Converter_approx_dual > Equal_3;
-
-                typedef Filtered_predicate<
-                    typename Exact_traits::Collinear_3,
-                    typename Filtering_traits::Collinear_3,
-                    Converter_exact_dual,
-                    Converter_approx_dual > Collinear_3;
-
-                typedef Filtered_predicate<
-                    typename Exact_traits::Coplanar_3,
-                    typename Filtering_traits::Coplanar_3,
-                    Converter_exact_dual,
-                    Converter_approx_dual > Coplanar_3;
-
-                typedef Filtered_predicate<
-                    typename Exact_traits::Less_distance_to_point_3,
-                    typename Filtering_traits::Less_distance_to_point_3,
-                    Converter_exact_dual,
-                    Converter_approx_dual > Less_distance_to_point_3;
-
-                typedef Filtered_predicate<
-                    typename Exact_traits::Has_on_positive_side_3,
-                    typename Filtering_traits::Has_on_positive_side_3,
-                    Converter_exact_dual,
-                    Converter_approx_dual > Has_on_positive_side_3;
-
-                typedef Filtered_predicate<
-                    typename Exact_traits::Less_signed_distance_to_plane_3,
-                    typename Filtering_traits::Less_signed_distance_to_plane_3,
-                    Converter_exact_dual,
-                    Converter_approx_dual > Less_signed_distance_to_plane_3;
-
-                Collinear_3 collinear_3_object() const
-                { return Collinear_3(origin); }
-
-                Coplanar_3 coplanar_3_object() const
-                { return Coplanar_3(origin); }
-
-                Less_distance_to_point_3 less_distance_to_point_3_object() const
-                { return Less_distance_to_point_3(origin); }
-
-                Equal_3 equal_3_object() const
-                { return Equal_3(origin); }
-
-                Has_on_positive_side_3 has_on_positive_side_3_object() const
-                { return Has_on_positive_side_3(origin); }
-
-                Less_signed_distance_to_plane_3
-                less_signed_distance_to_plane_3_object() const
-                { return Less_signed_distance_to_plane_3(origin); }
-
-                // Constructions are inherited
-        };
-
-    // Traits specialization
-    template <typename R_>
-        class Convex_hull_traits_dual_3<R_, true>
-        : public Convex_hull_filtered_traits_dual_3<R_>
-        {
-            private:
-                typedef typename R_::Point_3 Primal_point_3;
-
-            public:
-                Convex_hull_traits_dual_3 (Primal_point_3 o =
-                                           Primal_point_3(0, 0, 0)) : Convex_hull_filtered_traits_dual_3<R_>(o)
-                {}
-        } ;
-  } // namespace Convex_hull_3
-} // namespace CGAL
-
-#endif // CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
deleted file mode 100644
index 8ec2514..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Jocelyn Meyron
-//
-
-#ifndef CGAL_HALFSPACE_INTERSECTION_3_H
-#define CGAL_HALFSPACE_INTERSECTION_3_H
-
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h>
-#include <CGAL/Origin.h>
-#include <CGAL/convex_hull_3.h>
-#include <CGAL/intersections.h>
-#include <CGAL/assertions.h>
-
-// For interior_polyhedron_3
-#include <CGAL/Convex_hull_3/dual/interior_polyhedron_3.h>
-#ifdef CGAL_USE_GMP
-#include <CGAL/Gmpq.h>
-#else
-#include <CGAL/MP_Float.h>
-#endif
-
-namespace CGAL
-{
-    namespace Convex_hull_3
-    {
-        namespace internal
-        {
-            // Build the primal polyhedron associated to a dual polyhedron
-            // We also need the `origin` which represents a point inside the primal polyhedron
-            template <typename K, class Polyhedron_dual, class Polyhedron>
-                class Build_primal_polyhedron :
-                    public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS> {
-                        typedef typename Polyhedron::HalfedgeDS HDS;
-                        const Polyhedron_dual & _dual;
-
-                        // Origin
-                        typedef typename K::Point_3 Primal_point_3;
-                        Primal_point_3 origin;
-
-                        public:
-                        Build_primal_polyhedron (const Polyhedron_dual & dual,
-                                                 Primal_point_3 o =
-                                                 Primal_point_3(CGAL::ORIGIN)) : _dual (dual), origin(o)
-                        {}
-
-                        void operator () (HDS &hds)
-                        {
-                            typedef typename K::RT RT;
-                            typedef typename K::Point_3 Point_3;
-
-                            // Typedefs for dual
-                            typedef typename Polyhedron_dual::Facet Facet;
-                            typedef typename Polyhedron_dual::Facet_const_handle
-                                Facet_const_handle;
-                            typedef typename Polyhedron_dual::Facet_const_iterator
-                                Facet_const_iterator;
-                            typedef typename Polyhedron_dual::Vertex_const_iterator
-                                Vertex_const_iterator;
-
-                            // Typedefs for primal
-                            typename CGAL::Polyhedron_incremental_builder_3<HDS> B(hds, true);
-
-                            // Typedefs for intersection
-                            typedef typename K::Plane_3 Plane_3;
-                            typedef typename K::Line_3 Line_3;
-                            typedef boost::optional< boost::variant< Point_3,
-                                                                     Line_3,
-                                                                     Plane_3 > > result_inter;
-
-                            B.begin_surface(_dual.size_of_facets(),
-                                            _dual.size_of_vertices(),
-                                            _dual.size_of_halfedges());
-
-                            std::map <Facet_const_handle, size_t> primal_vertices;
-                            size_t n = 0;
-
-                            // First, computing the primal vertices
-                            for (Facet_const_iterator it = _dual.facets_begin();
-                                 it != _dual.facets_end(); ++it, ++n) {
-                                typename Facet::Halfedge_const_handle h = it->halfedge();
-                                // Build the dual plane corresponding to the current facet
-                                Plane_3 p1 = h->vertex()->point();
-                                Plane_3 p2 = h->next()->vertex()->point();
-                                Plane_3 p3 = h->next()->next()->vertex()->point();
-
-                                RT dp1 = p1.d() + origin.x() * p1.a()
-                                    + origin.y() * p1.b() + origin.z() * p1.c();
-                                RT dp2 = p2.d() + origin.x() * p2.a()
-                                    + origin.y() * p2.b() + origin.z() * p2.c();
-                                RT dp3 = p3.d() + origin.x() * p3.a()
-                                    + origin.y() * p3.b() + origin.z() * p3.c();
-
-                                Plane_3 pp1(p1.a(), p1.b(), p1.c(), dp1);
-                                Plane_3 pp2(p2.a(), p2.b(), p2.c(), dp2);
-                                Plane_3 pp3(p3.a(), p3.b(), p3.c(), dp3);
-
-                                // Compute the intersection
-                                result_inter result = CGAL::intersection(pp1, pp2, pp3);
-                                CGAL_assertion_msg(bool(result),
-                                                   "halfspace_intersection_3: no intersection");
-                                CGAL_assertion_msg(boost::get<Point_3>(& *result) != NULL,
-                                                   "halfspace_intersection_3: intersection is not a point");
-
-                                const Point_3* pp = boost::get<Point_3>(& *result);
-
-                                // Primal vertex associated to the current dual plane
-                                Point_3 ppp(origin.x() + pp->x(),
-                                            origin.y() + pp->y(),
-                                            origin.z() + pp->z());
-
-                                B.add_vertex(ppp);
-                                primal_vertices[it] = n;
-                            }
-
-                            // Then, add facets to the primal polyhedron
-                            // To do this, for each dual vertex, we circulate around this vertex
-                            // and we add an edge between each facet we encounter
-                            for (Vertex_const_iterator it = _dual.vertices_begin();
-                                 it != _dual.vertices_end(); ++it) {
-                                typename Polyhedron_dual::Halfedge_around_vertex_const_circulator
-                                    h0 = it->vertex_begin(), hf = h0;
-
-                                B.begin_facet();
-                                do {
-                                    B.add_vertex_to_facet(primal_vertices[hf->facet()]);
-                                } while (++hf != h0);
-                                B.end_facet();
-                            }
-
-                            B.end_surface();
-                        }
-                    };
-
-            // Functor used during the computation of the equations
-            // of the facets of a convex polyhedron
-            template <class Facet>
-            struct Plane_equation_convex_polyhedron {
-                typename Facet::Plane_3 operator()(Facet& f) {
-                    typename Facet::Halfedge_handle h = f.halfedge();
-                    typedef typename Facet::Plane_3 Plane;
-                    return Plane(h->vertex()->point(),
-                                 h->next()->vertex()->point(),
-                                 h->next()->next()->vertex()->point());
-                }
-            };
-
-            // Test if a point is inside a convex polyhedron
-            template <class Polyhedron>
-            bool point_inside_convex_polyhedron (Polyhedron &P,
-                                                 typename Polyhedron::Traits::Point_3 const& p) {
-                // Compute the equations of the facets of the polyhedron
-                typedef typename Polyhedron::Plane_iterator Plane_iterator;
-                typedef typename Polyhedron::Facet Facet;
-
-                std::transform(P.facets_begin(), P.facets_end(), P.planes_begin(),
-                               Plane_equation_convex_polyhedron<Facet>());
-
-                // Check if the point is inside the polyhdreon
-                for (Plane_iterator pit = P.planes_begin();
-                     pit != P.planes_end();
-                     ++pit) {
-                    if (! pit->has_on_negative_side(p)) {
-                        return false;
-                    }
-                }
-
-                return true;
-            }
-
-            template <class Plane>
-            bool collinear_plane (Plane u, Plane v) {
-                typedef typename Kernel_traits<Plane>::Kernel Kernel;
-                typedef typename Kernel::Vector_3 Vector;
-
-                Vector uu = u.orthogonal_vector();
-                Vector vv = v.orthogonal_vector();
-
-                return CGAL::cross_product(uu, vv) == Vector(0, 0, 0);
-            }
-
-            template <class Plane>
-            bool coplanar_plane (Plane u, Plane v, Plane w) {
-                typedef typename Kernel_traits<Plane>::Kernel Kernel;
-                typedef typename Kernel::Vector_3 Vector;
-
-                Vector uu = u.orthogonal_vector();
-                Vector vv = v.orthogonal_vector();
-                Vector ww = w.orthogonal_vector();
-
-                return CGAL::orientation(uu, vv, ww) == CGAL::COPLANAR;
-            }
-
-            // Checks if the dimension of intersection of the planes
-            // is a polyhedron (dimension == 3)
-            template <class PlaneIterator>
-            bool is_intersection_dim_3 (PlaneIterator begin,
-                                        PlaneIterator end) {
-                typedef typename std::iterator_traits<PlaneIterator>::value_type Plane;
-
-                std::list<Plane> planes(begin, end);
-
-                // Remove same planes
-                std::size_t size = planes.size();
-
-                // At least 4 points
-                if (size < 4)
-                    return false;
-
-                // Collinear
-                PlaneIterator plane1_it = planes.begin();
-                PlaneIterator plane2_it = planes.begin();
-                plane2_it++;
-
-                PlaneIterator plane3_it = planes.end();
-                plane3_it--;
-                while (plane2_it != planes.end() &&
-                       collinear_plane(*plane1_it, *plane2_it)) {
-                    plane2_it++;
-                }
-
-                if (plane2_it == planes.end()) {
-                    return false;
-                }
-
-                // Coplanar
-                while (plane2_it != planes.end() &&
-                       coplanar_plane(*plane1_it, *plane2_it, *plane3_it)) {
-                    plane2_it++;
-                }
-
-                if (plane2_it == planes.end()) {
-                    return false;
-                }
-
-                return true;
-            }
-        } // namespace internal
-    } // namespace Convex_hull_3
-
-    // Compute the intersection of halfspaces.
-    // If the user gives an origin then the function used it, otherwise, it is
-    // computed using a linear program.
-    template <class PlaneIterator, class Polyhedron>
-    void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end,
-                                   Polyhedron &P,
-                                   boost::optional<typename Polyhedron::Vertex::Point_3> const& origin) {
-        // Checks whether the intersection if a polyhedron
-        CGAL_assertion_msg(Convex_hull_3::internal::is_intersection_dim_3(begin, end), "halfspace_intersection_3: intersection not a polyhedron");
-
-        // Types
-        typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
-        typedef Convex_hull_3::Convex_hull_traits_dual_3<K> Hull_traits_dual_3;
-        typedef Polyhedron_3<Hull_traits_dual_3> Polyhedron_dual_3;
-        typedef Convex_hull_3::internal::Build_primal_polyhedron<K, Polyhedron_dual_3, Polyhedron> Builder;
-        typedef typename Polyhedron::Vertex::Point_3 Point_3;
-
-        if (origin) {
-            Point_3 p_origin = boost::get(origin);
-            Hull_traits_dual_3 dual_traits(p_origin);
-
-            Polyhedron_dual_3 dual_convex_hull;
-            CGAL::convex_hull_3(begin, end, dual_convex_hull, dual_traits);
-            Builder build_primal(dual_convex_hull, p_origin);
-            P.delegate(build_primal);
-
-            // Posterior check if the origin is inside the computed polyhedron
-            Polyhedron Q(P);
-            CGAL_assertion_msg(!Convex_hull_3::internal::point_inside_convex_polyhedron(Q, p_origin), "halfspace_intersection_3: origin not in the polyhedron");
-        } else {
-          // choose exact integral type
-#ifdef CGAL_USE_GMP
-          typedef CGAL::Gmpq ET;
-#else
-          typedef CGAL::MP_Float ET;
-#endif
-          // find a point inside the intersection
-          typedef Interior_polyhedron_3<K, ET> Interior_polyhedron;
-          Interior_polyhedron interior;
-          CGAL_assertion_msg(interior.find(begin, end), "halfspace_intersection_3: problem when determing a point inside the intersection");
-          Point_3 origin = interior.inside_point();
-
-          Hull_traits_dual_3 dual_traits(origin);
-
-          Polyhedron_dual_3 dual_convex_hull;
-          CGAL::convex_hull_3(begin, end, dual_convex_hull, dual_traits);
-          Builder build_primal(dual_convex_hull, origin);
-          P.delegate(build_primal);
-
-          // Posterior check if the origin is inside the computed polyhedron
-          Polyhedron Q(P);
-          CGAL_assertion_msg(!Convex_hull_3::internal::point_inside_convex_polyhedron(Q, origin), "halfspace_intersection_3: origin not in the polyhedron");
-        }
-    }
-
-  // Compute the intersection of halfspaces by computing a point inside.
-  template <class PlaneIterator, class Polyhedron>
-  void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end,
-                                 Polyhedron &P) {
-    halfspace_intersection_3(begin, end , P, boost::none);
-  }
-
-  // Compute the intersection of halfspaces (an interior point is given.)
-  template <class PlaneIterator, class Polyhedron>
-  void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end,
-                                 Polyhedron &P,
-                                 typename Polyhedron::Vertex::Point_3 const& origin) {
-    halfspace_intersection_3(begin, end , P, boost::optional<typename Polyhedron::Vertex::Point_3>(origin));
-  }
-} // namespace CGAL
-
-#endif // CGAL_HALFSPACE_INTERSECTION_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h
deleted file mode 100644
index a35736a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Jocelyn Meyron
-//
-
-#ifndef CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
-#define CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
-
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Origin.h>
-#include <CGAL/convex_hull_3.h>
-
-// For interior_polyhedron_3
-#include <CGAL/Convex_hull_3/dual/interior_polyhedron_3.h>
-#ifdef CGAL_USE_GMP
-#include <CGAL/Gmpq.h>
-#else
-#include <CGAL/MP_Float.h>
-#endif
-
-namespace CGAL
-{
-    namespace internal
-    {
-        template <class Polyhedron>
-        class Build_dual_polyhedron :
-                public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS>
-        {
-            typedef typename Polyhedron::HalfedgeDS HDS;
-            typedef typename Polyhedron::Traits::Point_3 Point_3;
-            const Polyhedron &_primal;
-            Point_3 origin;
-
-            public:
-            Build_dual_polyhedron (const Polyhedron & primal,
-                                   Point_3 o = Point_3(CGAL::ORIGIN)):
-                _primal (primal), origin(o)
-            {}
-
-            void operator () (HDS &hds)
-            {
-                typedef typename Polyhedron::Facet Facet;
-                typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
-                typedef typename Polyhedron::Facet_const_iterator Facet_const_iterator;
-                typedef typename Polyhedron::Vertex_const_iterator Vertex_const_iterator;
-                typename CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
-
-                B.begin_surface(_primal.size_of_facets(),
-                                _primal.size_of_vertices(),
-                                _primal.size_of_halfedges());
-
-                // compute coordinates of extreme vertices in the dual polyhedron
-                // from primal faces
-                std::map<Facet_const_handle, size_t> extreme_points;
-                size_t n = 0;
-
-                for (Facet_const_iterator it = _primal.facets_begin();
-                     it != _primal.facets_end(); ++it, ++n)
-                {
-                    typename Facet::Halfedge_const_handle h = it->halfedge();
-                    typename Facet::Plane_3 p ( h->vertex()->point(),
-                                                h->next()->vertex()->point(),
-                                                h->next()->next()->vertex()->point());
-                    // translate extreme vertex
-                    Point_3 extreme_p = CGAL::ORIGIN + p.orthogonal_vector () / (-p.d());
-                    Point_3 translated_extreme_p(extreme_p.x() + origin.x(),
-                                                 extreme_p.y() + origin.y(),
-                                                 extreme_p.z() + origin.z());
-                    B.add_vertex(translated_extreme_p);
-                    extreme_points[it] = n;
-                }
-
-                // build faces
-                for (Vertex_const_iterator it = _primal.vertices_begin();
-                     it != _primal.vertices_end(); ++it)
-                {
-                    assert (it->is_bivalent() == false);
-
-                    typename Polyhedron::Halfedge_around_vertex_const_circulator
-                        h0 = it->vertex_begin(), hf = h0;
-
-                    B.begin_facet();
-                    do
-                    {
-                        B.add_vertex_to_facet(extreme_points[hf->facet()]);
-                    } while (++hf != h0);
-                    B.end_facet();
-                }
-
-                B.end_surface();
-            }
-        };
-    } // namespace internal
-
-    // Compute the intersection of halfspaces by constructing explicitly
-    // the dual points with the traits class for convex_hull_3 given
-    // as an argument
-    template <class PlaneIterator, class Polyhedron, class Traits>
-    void halfspace_intersection_with_constructions_3(PlaneIterator pbegin,
-                                                     PlaneIterator pend,
-                                                     Polyhedron &P,
-                                                     boost::optional<typename Polyhedron::Vertex::Point_3> const& origin,
-                                                     const Traits & ch_traits) {
-            typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
-            typedef typename K::Point_3 Point;
-            typedef typename K::Plane_3 Plane;
-            typedef typename CGAL::internal::Build_dual_polyhedron<Polyhedron> Builder;
-
-            Point p_origin;
-            
-            if (origin) {
-              p_origin = boost::get(origin);
-            } else {
-              // choose exact integral type
-#ifdef CGAL_USE_GMP
-              typedef CGAL::Gmpq ET;
-#else
-              typedef CGAL::MP_Float ET;
-#endif
-              // find a point inside the intersection
-              typedef Interior_polyhedron_3<K, ET> Interior_polyhedron;
-              Interior_polyhedron interior;
-              bool res = interior.find(pbegin, pend);
-              CGAL_assertion_msg(res, "halfspace_intersection_with_constructions_3: problem when determing a point inside");
-              p_origin = interior.inside_point();
-            }
-
-            // construct dual points to apply the convex hull
-            std::vector<Point> dual_points;
-            for (PlaneIterator p = pbegin; p != pend; ++p) {
-                // translate plane
-                Plane translated_p(p->a(),
-                                   p->b(),
-                                   p->c(),
-                                   p->d() + p_origin.x() * p->a() + p_origin.y() * p->b() + p_origin.z() * p->c());
-                dual_points.push_back(CGAL::ORIGIN + translated_p.orthogonal_vector () / (-translated_p.d()));
-            }
-
-            Polyhedron ch;
-            CGAL::convex_hull_3(dual_points.begin(), dual_points.end(), ch, ch_traits);
-
-            Builder build_dual (ch, p_origin);
-            P.delegate(build_dual);
-        }
-
-    // Compute the intersection of halfspaces by constructing explicitly
-    // the dual points with the traits class for convex_hull_3 given
-    // as an argument.
-    // An interior point is given.
-    template <class PlaneIterator, class Polyhedron, class Traits>
-    void halfspace_intersection_with_constructions_3(PlaneIterator pbegin,
-                                                     PlaneIterator pend,
-                                                     Polyhedron &P,
-                                                     typename Polyhedron::Vertex::Point_3 const& origin,
-                                                     const Traits & ch_traits) {
-      halfspace_intersection_with_constructions_3(pbegin, pend, P,
-                                                  boost::optional<typename Polyhedron::Vertex::Point_3>(origin),
-                                                  ch_traits);
-    }
-
-    // Compute the intersection of halfspaces by constructing explicitly
-    // the dual points with the default traits class for convex_hull_3.
-    template <class PlaneIterator, class Polyhedron>
-    void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin,
-                                                      PlaneIterator pend,
-                                                      Polyhedron &P,
-                                                      boost::optional<typename Polyhedron::Vertex::Point_3> const& origin) {
-        typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
-        typedef typename K::Point_3 Point_3;
-        typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
-
-        halfspace_intersection_with_constructions_3(pbegin, pend, P, origin, Traits());
-    }
-
-    // Compute the intersection of halfspaces by constructing explicitly
-    // the dual points with the default traits class for convex_hull_3.
-    // An interior point is given.
-    template <class PlaneIterator, class Polyhedron>
-    void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin,
-                                                      PlaneIterator pend,
-                                                      Polyhedron &P,
-                                                      typename Polyhedron::Vertex::Point_3 const& origin) {
-      halfspace_intersection_with_constructions_3(pbegin, pend, P,
-                                                  boost::optional<typename Polyhedron::Vertex::Point_3>(origin));
-    }
-
-    // Compute the intersection of halfspaces by constructing explicitly
-    // the dual points with the default traits class for convex_hull_3.
-    // An interior point is not given.
-    template <class PlaneIterator, class Polyhedron>
-    void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin,
-                                                      PlaneIterator pend,
-                                                      Polyhedron &P) {
-      halfspace_intersection_with_constructions_3(pbegin, pend, P, boost::none);
-    }
-} // namespace CGAL
-
-#endif // CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h
deleted file mode 100644
index d8878a3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Jocelyn Meyron
-//                 Pierre Alliez
-//
-
-#ifndef INTERIOR_POLYHEDRON_3_H
-#define INTERIOR_POLYHEDRON_3_H
-
-// LP solver to compute an interior point of a polyhedron
-#include <CGAL/QP_functions.h>
-#include <CGAL/QP_models.h>
-#include <limits>
-#include <CGAL/number_utils.h>
-
-// Taken from http://www.qhull.org/html/qhalf.htm
-
-// If you do not know an interior point for the halfspaces, use linear programming
-// to find one. Assume, n halfspaces defined by: aj*x1+bj*x2+cj*x3+dj>=0, j=1..n.
-// Perform the following linear program:
-//		max(x5) aj*x1+bj*x2+cj*x3+dj*x4-x5>=0, j=1..n
-
-// Then, if [x1,x2,x3,x4,x5] is an optimal m_solution with x4,x5>0 we get:
-//		aj*(x1/x4)+bj*(x2/x4)+cj*(x3/x4)+dj>=(x5/x4)>0, j=1..n
-// and conclude that the point [x1/x4,x2/x4,x3/x4] is in the interior of all
-// the halfspaces. Note that x5 is optimal, so this point is "way in" the
-// interior (good for precision errors).
-
-// After finding an interior point, the rest of the intersection algorithm is
-// from Preparata & Shamos ['85, p. 316, "A simple case ..."]. Translate the
-// halfspaces so that the interior point is the origin. Calculate the dual
-// polytope. The dual polytope is the convex hull of the vertices dual to the
-// original faces in regard to the unit sphere (i.e., halfspaces at distance
-// d from the origin are dual to vertices at distance 1/d). Then calculate
-// the resulting polytope, which is the dual of the dual polytope, and
-// translate the origin back to the interior point [S. Spitz and S. Teller].
-
-// NOTE here we change this to max(x4) under constraints aj*x1 + bj*x2 + cj*x3 + dj - x4 >= 0, j=1..n
-//  i.e. aj*x1 + bj*x2 + cj*x3 - x4 >= -dj, j=1..n
-// Then, if [x1,x2,x3,x4] is an optimal m_solution with x3 > 0 we pick
-// the point [x1,x2,x3] as inside point.
-
-template <class Kernel, class ET>
-class Interior_polyhedron_3 {
-        // 3D
-        typedef typename Kernel::FT FT;
-        typedef typename Kernel::Plane_3 Plane;
-        typedef typename Kernel::Point_3 Point;
-
-        // program and solution types
-        typedef CGAL::Quadratic_program<double> LP;
-        typedef typename CGAL::Quadratic_program_solution<ET> Solution;
-        typedef typename Solution::Variable_value_iterator Variable_value_iterator;
-        typedef CGAL::Real_embeddable_traits<typename Variable_value_iterator::value_type> RE_traits;
-        typename RE_traits::To_double to_double;
-        Solution m_solution;
-        Point m_inside_point;
-        Point m_optimal_point;
-
-    public:
-        Point& inside_point() { return m_inside_point; }
-        const Point& inside_point() const { return m_inside_point; }
-        Point& optimal_point() { return m_optimal_point; }
-        const Point& optimal_point() const { return m_optimal_point; }
-
-        // Determines if a value is infinite or not
-        template<typename T>
-        inline bool isinf(T value) {
-            return value == std::numeric_limits<T>::infinity();
-        }
-
-        // Find a point inside the polyhedron defined by a list of planes
-        // InputIterator::value_type = Plane
-        template < class InputIterator >
-        bool find(InputIterator begin, InputIterator end) {
-            // solve linear program
-            LP lp(CGAL::LARGER,false); // with constraints Ax >= b
-
-            // column indices
-            const int index_x1 = 0;
-            const int index_x2 = 1;
-            const int index_x3 = 2;
-            const int index_x4 = 3;
-
-            // assemble linear program
-            int j = 0; // row index
-            // iterate over segments
-            InputIterator it;
-            for(it = begin; it != end; ++it, j++) {
-                const Plane& plane = *it;
-                const FT aj = CGAL::to_double(plane.a());
-                const FT bj = CGAL::to_double(plane.b());
-                const FT cj = CGAL::to_double(plane.c());
-                const FT dj = CGAL::to_double(plane.d());
-
-                assert(!isinf(aj));
-                assert(!isinf(bj));
-                assert(!isinf(cj));
-                assert(!isinf(dj));
-
-                // plane defined the halfspace: aj * x1 + bj * x2 + cj * x3 + dj <= 0
-                // <=> - (aj * x1 + bj * x2 + cj * x3 + dj) >= 0
-                // j^th constraint: -(aj * x1 + bj * x2 + cj * x3 + x4) >= dj
-                lp.set_a(index_x1, j,   -aj);
-                lp.set_a(index_x2, j,   -bj);
-                lp.set_a(index_x3, j,   -cj);
-                lp.set_a(index_x4, j, -1.0);
-
-                // right hand side
-                lp.set_b(j, dj);
-            }
-
-            // objective function -> max x4 (negative sign set because
-            // the lp solver always minimizes an objective function)
-            lp.set_c(index_x4,-1.0);
-
-            // solve the linear program
-            m_solution = CGAL::solve_linear_program(lp, ET());
-
-            if(m_solution.is_infeasible())
-                return false;
-
-            if(!m_solution.is_optimal())
-                return false;
-
-            // get variables
-            Variable_value_iterator X = m_solution.variable_values_begin();
-
-            // solution if x4 > 0
-            double x4 = to_double(X[index_x4]);
-            if(x4 <= 0.0)
-                return false;
-
-            // define inside point as (x1;x2;x3)
-            double x1 = to_double(X[index_x1]);
-            double x2 = to_double(X[index_x2]);
-            double x3 = to_double(X[index_x3]);
-            m_inside_point = Point(x1,x2,x3);
-
-            return true;
-        }
-};
-
-#endif // INTERIOR_POLYHEDRON_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
deleted file mode 100644
index 2c90919..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
+++ /dev/null
@@ -1,3368 +0,0 @@
-// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), 
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
-//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-
-#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
-#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
-
-/*!\file include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
- *\brief Defines class \c Arc_2 that represents an arc on a curve that
- * can be analyzed.
- */
-
-#include <CGAL/config.h>
-#include <CGAL/Handle_with_policy.h>
-
-#include <iostream>
-#include <boost/optional.hpp>
-#include <boost/none.hpp>
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Arr_enums.h>
-
-#ifndef CGAL_CKvA_USE_CACHES
-#define CGAL_CKvA_USE_CACHES 1
-#endif
-
-#include <CGAL/Curved_kernel_via_analysis_2/Point_2.h>
-
-#include <CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h>
-
-namespace CGAL {
-
-namespace internal {
-
-#ifndef CKvA_CERR
-//#define CKvA_DEBUG_PRINT_CERR
-#ifdef CKvA_DEBUG_PRINT_CERR
-#define CKvA_CERR(x) std::cerr << x
-#else
-#define CKvA_CERR(x) static_cast<void>(0)
-#endif
-#endif
-
-/*!\brief
- * Default representation class for Arc_2
- */
-template < class CurvedKernelViaAnalysis_2 >
-class Arc_2_rep { 
-
-public:
-    //!\name Public types
-    //!@{
-
-    //! this instance's first template parameter
-    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-    
-    //! myself
-    typedef Arc_2_rep< Curved_kernel_via_analysis_2 > Self;
-
-    //! type of curve kernel
-    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
-    Curve_kernel_2;
-    
-    //! type of curve that can be analzed
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-    
-    //! type of a point on a point that can be analyzed
-    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
-    
-    //! type of boundary value in x-range of an arc
-    typedef typename Curve_kernel_2::Bound Bound;
-
-    //!@}
-
-public:
-    //!\name Constructors
-    //!@{
-    
-    //! default constructor
-    Arc_2_rep() : 
-        _m_arcno(-1), _m_arcno_min(-1), _m_arcno_max(-1), 
-        _m_is_vertical(false),
-        _m_left_to_right(1) {
-    }
-    
-    //! copy constructor
-    Arc_2_rep(const Self& s):
-        _m_min(s._m_min), _m_max(s._m_max),
-        _m_support(s._m_support),
-        _m_arcno(s._m_arcno), 
-        _m_arcno_min(s._m_arcno_min), 
-        _m_arcno_max(s._m_arcno_max),
-        _m_is_vertical(s._m_is_vertical),
-        _m_left_to_right(s._m_left_to_right) {
-    }
-    
-    //! standard constructor
-    Arc_2_rep(const Point_2& p, const Point_2& q, const Curve_analysis_2& c, 
-              int arcno = -1, int arcno_p = -1, int arcno_q = -1,
-              bool is_vertical = false) : 
-        _m_min(p), _m_max(q),
-        _m_support(c),
-        _m_arcno(arcno), _m_arcno_min(arcno_p), _m_arcno_max(arcno_q),
-        _m_is_vertical(is_vertical),
-        _m_left_to_right(1) {
-
-        // set end-point arcnos from segment's interior
-        if (_m_arcno_min == -1) {
-            _m_arcno_min = _m_arcno;
-        }
-        if (_m_arcno_max == -1) {
-            _m_arcno_max = _m_arcno;
-        }
-    }
-
-    //!@}
-
-public:
-    //!\name Data members
-    //!@{
-    
-    //! minimal end-points of an arc
-    mutable Point_2 _m_min;
-
-    //! maximal end-points of an arc
-    mutable Point_2 _m_max;
-    
-    //! supporting curve
-    mutable Curve_analysis_2 _m_support;
-
-    //! interior arcno
-    mutable int _m_arcno;
-
-    //! arcno at min
-    mutable int _m_arcno_min;
-
-    //! arcno at max
-    mutable int _m_arcno_max;
-    
-    //! indicates whether arc is vertical
-    mutable bool _m_is_vertical;
-    
-    //! stores a direction (left to right, right to left)
-    mutable bool _m_left_to_right;
-
-    //! stores the index of an interval this arc belongs to
-    mutable boost::optional<int> _m_interval_id;
-
-    //! stores boundary value in x-range of non-vertical interval
-    mutable boost::optional< Bound > _m_boundary_in_interval;
-
-    //! stores a bbox for an arc
-    mutable boost::optional< CGAL::Bbox_2 > _m_bbox;
-
-    //!@}
-};
-
-
-/*!\brief 
- * Class defines an arc on a curve that can be analyzed
- * 
- * An arc is either non-vertical or vertical. If it is non-vertical,
- * we can assign a constant arc number to its interior and we may can assign
- * (non-identical) arc numbers to its end-points. It depends on whether
- * the arc touches the boundary of the parameter space or not.
- * If it is vertical, no arc number is available.
- *
- * We distinguish between interior arcs, rays, and branches. An interior arc
- * lies completely in the interior of the parameter space, 
- * while a ray has one end that lies on the boundary of the parameter space, 
- * and a branch has two end that lie on the boundary.
- * 
- */
-template < class CurvedKernelViaAnalysis_2, class Rep_ >
-class Arc_2 :
-        public CGAL::Handle_with_policy< Rep_ > {
-  
-public:
-    //!\name Public types
-    //!@{
-    
-    //! this instance's first template parameter
-    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-
-    //! this instance's second template parameter
-    typedef Rep_ Rep;
-
-    //! this instance itself
-    typedef Arc_2< Curved_kernel_via_analysis_2, Rep > Self;
-    
-    //! type of curve kernel
-    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
-    Curve_kernel_2;
-    
-    //! type of an x-coordinate
-    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
-
-    //! type of an xy-coordinate
-    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
-    
-    //! type of "rational" value in x-range
-    typedef typename Curve_kernel_2::Bound Bound;
-    
-    //! type of analysis of a pair of curves
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-    
-    //! type of analysis of a pair of curves
-    typedef typename Curve_kernel_2::Curve_pair_analysis_2
-    Curve_pair_analysis_2;
-    
-    //! type of a kernel point
-    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
-    // Remark: Point_2 is already Kernel_point_2 -> no need to introduce it
-
-    //! type of kernel arc
-    typedef typename Curved_kernel_via_analysis_2::Arc_2 Kernel_arc_2;
-    
-    //! the handle superclass
-    typedef ::CGAL::Handle_with_policy< Rep > Base;
-
-    //!@}
-
-public:
-    //!\name Rebind
-    //!{
-    
-    /*!\brief
-     * An auxiliary structure for rebinding the arc with a NewCKvA_2 and a 
-     * NewRep
-     */
-    template < typename NewCKvA_2, typename NewRep >
-    class rebind
-    {
-    public:
-        //! this instance's first template parameter
-        typedef NewCKvA_2 New_curved_kernel_via_analysis_2;
-
-        //! this instance's second template parameter
-        typedef NewRep New_rep;
-
-        //! the rebound type
-        typedef Arc_2< New_curved_kernel_via_analysis_2, NewRep > Other;
-
-        //! surface point type
-        typedef typename Other::Point_2 New_point_2;
-        
-        //! type of rebound arc
-        typedef typename New_curved_kernel_via_analysis_2::Arc_2 Rebound_arc_2;
-
-        /*!\brief
-         * Constructs supporting arc of type \c Rebound_arc_2 from the 
-         * (possible unbounded) \c arc
-         * of type \c Self and replaces \c min and \c max point by the 
-         * given instances.
-         *
-         * All known items of the base class rep will be copied.
-         *
-         * \param arc Input arc
-         * \param min New endpoint at min
-         * \param max New endpoint at max
-         * \return An arc of type \c Rebound_arc_2
-         */
-        Rebound_arc_2 operator()(const Self& arc, 
-                                 const New_point_2& min,
-                                 const New_point_2& max) {
-            New_rep newrep;
-            newrep._m_min = min;
-            newrep._m_max = max;
-            
-            copy_members(arc, newrep);
-            
-            return Rebound_arc_2(newrep);
-        }
-
-        /*!\brief
-         * Gives direct access to minimal or maximal endpoint of an arc,
-         * even if it is not interior!
-         *
-         * \param arc Input arc
-         * \param ce Specifies which end is queried
-         * \return min or max point (might be not interior!)
-         */
-        Point_2 operator()(const Self& arc, CGAL::Arr_curve_end ce) {
-            if (ce == CGAL::ARR_MIN_END) {
-                return arc._minpoint();
-            }
-            // else
-            return arc._maxpoint();
-        }
-        
-        // TODO move to SfA_2l
-        /*!\brief
-         * Reverse rebind, that is extracts original arc type from a 
-         * rebound instance
-         *
-         * \param arc A rebound arc
-         * \return An arc of type \c Self extracted from \c arc
-         */
-        Self operator()(const Rebound_arc_2& arc) {
-            Rep rep;
-            
-            rep._m_min = typename New_point_2::Rebind()(arc._minpoint());
-            rep._m_max = typename New_point_2::Rebind()(arc._maxpoint());
-            
-            rep._m_support = arc.ptr()->_m_support;
-            
-            rep._m_arcno = arc.ptr()->_m_arcno;
-            rep._m_arcno_min = arc.ptr()->_m_arcno_min;
-            rep._m_arcno_max = arc.ptr()->_m_arcno_max;
-
-            rep._m_is_vertical = arc.ptr()->_m_is_vertical;
-            rep._m_left_to_right = arc.ptr()->_m_left_to_right;
-
-            rep._m_interval_id = arc.ptr()->_m_interval_id;
-
-            rep._m_boundary_in_interval = 
-                arc.ptr()->_m_boundary_in_interval;
-            
-            return Self(rep);
-        }
-
-    protected:
-        /*!\brief
-         * copies main members to a rep
-         * 
-         * \param arc Source arc
-         * \param newrep Destination representation
-         */
-        void copy_members(const Self& arc, New_rep& newrep) {
-            
-            newrep._m_support = arc.ptr()->_m_support;
-            
-            newrep._m_arcno = arc.ptr()->_m_arcno;
-            newrep._m_arcno_min = arc.ptr()->_m_arcno_min;
-            newrep._m_arcno_max = arc.ptr()->_m_arcno_max;
-
-            newrep._m_is_vertical = arc.ptr()->_m_is_vertical;
-            newrep._m_left_to_right = arc.ptr()->_m_left_to_right;
-
-            newrep._m_interval_id = arc.ptr()->_m_interval_id;
-
-            newrep._m_boundary_in_interval = 
-                arc.ptr()->_m_boundary_in_interval;
-        }
-    };
-
-    //!}
-    
-public:
-    //!\name basic constructors
-    //!@{
-
-    /*!\brief
-     * Default constructor
-     */
-    Arc_2() : 
-        Base(Rep()) {   
-    }
-
-    /*!\brief
-     * copy constructor
-     */
-    Arc_2(const Self& a) : 
-        Base(static_cast<const Base&>(a)) {  
-    }
-
-    //!@}
-    
-public:
-    //!\name Constructors for non-vertical arcs
-    //!@{
-    
-    /*!\brief 
-     * Constructs an arc with two interior end-points (segment).
-     * 
-     * \param p first endpoint
-     * \param q second endpoint
-     * \param c The supporting curve
-     * \param arcno The arcnumber wrt \c c in the interior of the arc
-     * \param arcno_p The arcnumber wrt \c c of the arc at \c p
-     * \param arcno_q The arcnumber wrt \c c of the arc at \c q
-     * \returns The constructed segment
-     * 
-     * \pre p.x() != q.x()
-     *
-     */
-    Arc_2(const Point_2& p, const Point_2& q, const Curve_analysis_2& c,
-          int arcno, int arcno_p, int arcno_q) : 
-        Base(Rep(p, q, c, arcno, arcno_p, arcno_q)) { 
-        
-        CGAL_precondition(!p.is_identical(q));
-        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
-                          compare_x_2_object()(p,q) != CGAL::EQUAL);
-        // preconditions for arc-numbers and event points (should the common
-        // parts be moved to a dedicated method ?)
-        CGAL_precondition(arcno >= 0);
-        CGAL_precondition(arcno_p >= 0);
-        CGAL_precondition(arcno_q >= 0);
-        // check end-points arcnos validity and coprimality condition
-        // for supporting curves
-        _check_pt_arcno_and_coprimality(p, arcno_p, c);
-        _check_pt_arcno_and_coprimality(q, arcno_q, c);    
-        _fix_curve_ends_order(); // lexicographical order of curve ends
-    }
-      
-   /*!\brief
-     * Constructs an arc with one interior end-point and another end
-     * at the left or right boundary of the parameter space (ray I).
-     *
-     * \param origin The interior end-point of the ray
-     * \param inf_end Defining whether the arcs emanates from the left or right
-     *        boundary
-     * \param c The supporting curve
-     * \param arcno The arcnumber wrt \c c in the interior of the arc
-     * \param arcno_o The arcnumber wrt \c c of the arc at \c origin 
-     * \return The constructed ray
-     */
-    Arc_2(const Point_2& origin, CGAL::Arr_curve_end inf_end, 
-          const Curve_analysis_2& c, int arcno, int arcno_o) :
-        Base(Rep(origin, Point_2(inf_end, c, arcno), c, arcno, arcno_o)) {
-        
-        CGAL_precondition(arcno >= 0);
-        CGAL_precondition(arcno_o >= 0);
-        // check end-points arcnos validity and coprimality condition
-        // for supporting curves
-
-        _check_pt_arcno_and_coprimality(origin, arcno_o, c);
-        _fix_curve_ends_order(); // lexicographical order of curve ends
-    }
-    
-    
-    /*!\brief
-     * Constructs a non-vertical arc with one interior end-point and whose 
-     * other end approaches a vertical asymptote (ray II)
-     *
-     * \param origin The interior end-point
-     * \param asympt_x The x-coordinate of the vertical asymptote
-     * \param inf_end Arc is approaching the bottom or top boundary
-     * \param c The supporting curve
-     * \param arcno The arcnumber wrt \c c in the interior of the arc
-     * \param arcno_o The arcnumber wrt \c c of the arc at \c origin 
-     * \return The constructed ray
-     *
-     * \pre origin.x() != asympt_x
-     */
-    Arc_2(const Point_2& origin, const Coordinate_1& asympt_x, 
-          CGAL::Arr_curve_end inf_end, const Curve_analysis_2& c, int arcno,
-          int arcno_o) :
-        Base(Rep(origin, Point_2(asympt_x, c, inf_end), c, arcno, arcno_o)) {
-        
-        CGAL_precondition(
-                Curved_kernel_via_analysis_2::instance().
-                kernel().compare_1_object()(origin.x(), asympt_x) 
-                != CGAL::EQUAL);
-        CGAL_precondition(arcno >= 0);
-        CGAL_precondition(arcno_o >= 0);
-        _check_pt_arcno_and_coprimality(origin, arcno_o, c);
-
-        _fix_curve_ends_order(); // lexicographical order of curve ends
-    }
-
-    /*!\brief
-     * Constructs a non-vertical arc with two non-interior ends at the
-     * left and right boundary (branch I)
-     *
-     * \param c The supporting curve
-     * \param arcno The arcnumber wrt to \c c in the interior of the arc
-     * \return The constructed branch
-     */
-    Arc_2(const Curve_analysis_2& c, int arcno) :
-        Base(Rep(Point_2(CGAL::ARR_MIN_END, c, arcno),
-                 Point_2(CGAL::ARR_MAX_END, c, arcno), c, arcno)) {
-
-        CGAL_precondition(arcno >= 0);
-        _fix_curve_ends_order(); 
-    }
-    
-    /*!\brief
-     * Constructs a non-vertical arc with two ends approaching vertical
-     * asymptotes (branch II).
-     *
-     * \param asympt_x1 The x-coordinate of the first asymptote
-     * \param inf_end1 Arc is approaching the bottom or top boundary at 
-     *                 \c asympt_x1
-     * \param asympt_x2 The x-coordinate of the second asymptote
-     * \param inf_end2 Arc is approaching the bottom or top boundary at 
-     *                 \c asympt_x2
-     * \return The constructed branch
-     *
-     * \pre asympt_x1 != asympt_x2
-     */
-    Arc_2(const Coordinate_1& asympt_x1, CGAL::Arr_curve_end inf_end1, 
-          const Coordinate_1& asympt_x2, CGAL::Arr_curve_end inf_end2,
-          const Curve_analysis_2& c, int arcno) :
-        Base(Rep(Point_2(asympt_x1, c, inf_end1), 
-                 Point_2(asympt_x2, c, inf_end2),
-                 c, arcno)) {
-
-        CGAL_precondition(
-                Curved_kernel_via_analysis_2::instance().
-                kernel().compare_1_object()(asympt_x1, asympt_x2) 
-                != CGAL::EQUAL);
-        CGAL_precondition(arcno >= 0);
-        _fix_curve_ends_order();
-    }
-    
-    /*!\brief
-     * Construct a non-vertical arc with one left- or right-boundary end 
-     * and one end that approaches a vertical asymptote (branch III)
-     *
-     * \param inf_endx Defining whether the arc emanates from the left or right
-     *        boundary
-     * \param asympt_x The x-coordinate of the asymptote
-     * \param inf_endy Arc is approaching the bottom or top boundary at
-     *                 asympt_x
-     * \return The constructed branch
-     */ 
-    Arc_2(CGAL::Arr_curve_end inf_endx, const Coordinate_1& asympt_x,
-          CGAL::Arr_curve_end inf_endy, const Curve_analysis_2& c, int arcno) :
-        Base(Rep(Point_2(inf_endx, c, arcno), 
-                 Point_2(asympt_x, c, inf_endy), c, arcno)) {
-        
-        CGAL_precondition(arcno >= 0); 
-        _fix_curve_ends_order();
-    }
-    
-    //!@}
-    
-public:
-    //!\name Constructors for vertical arcs
-    //!@{
-    
-    /*!\brief 
-     * Constructs a vertical arc with two interior end-points 
-     * (vertical segment)
-     *
-     * \param p The first end-point
-     * \param q The second end-point
-     * \param c The supporting curve
-     * \return The constructed arc
-     * 
-     * \pre p != q && p.x() == q.x()
-     * \pre c must have a vertical component at this x
-     */
-    Arc_2(const Point_2& p, const Point_2& q, const Curve_analysis_2& c) : 
-        Base(Rep(p, q, c, -1, -1, -1, true)) {  
-        
-        CGAL_precondition(!p.is_identical(q));
-        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
-                          compare_x_2_object()(p,q) == CGAL::EQUAL);
-        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
-                          compare_xy_2_object()(p, q, true) != CGAL::EQUAL);
-        // check coprimality condition for supporting curves
-        _check_pt_arcno_and_coprimality(p, -1, c);
-        _check_pt_arcno_and_coprimality(p, -1, c);
-        _fix_curve_ends_order();
-    }
-    
-    /*!\brief
-     * Constructs a vertical arc with one interior end-point and 
-     * one that reaches the bottom or top boundary (vertical ray)
-     *
-     * \param origin The interior end-point
-     * \param inf_end Ray emanates from bottom or top boundary
-     * \return The constructed ray
-     *
-     * \pre c must have a vertical line component at this x
-     */
-    Arc_2(const Point_2& origin, CGAL::Arr_curve_end inf_end,
-          const Curve_analysis_2& c) :
-        Base(Rep(origin, Point_2(origin.x(), c, inf_end), 
-                 c, -1, -1, -1, true)) {
-        
-        // check coprimality condition for supporting curves
-        _check_pt_arcno_and_coprimality(origin, -1, c);
-        _fix_curve_ends_order();
-    }
-    
-    /*!\brief
-     * Constructs a vertical arc that connects bottom with top boundary
-     * (vertical branch)
-     *
-     * \param x The x-coordinate of the arc
-     * \return The constructed branch
-     * 
-     * \pre c must have a vertical line component at this x
-     */
-    Arc_2(const Coordinate_1& x, const Curve_analysis_2& c) :
-        Base(Rep(Point_2(x, c, CGAL::ARR_MIN_END), 
-                 Point_2(x, c, CGAL::ARR_MAX_END), c, -1, -1, -1, true)) {
-        
-        _fix_curve_ends_order();
-    }
-   
-    //!@}
-
-protected:    
-    //!\name Constructor for replace endpoints + rebind
-    //!@{
-    
-    /*!\brief
-     * Constructs an arc from a given representation used in rebind
-     *
-     * \param rep Input representation
-     * \return The constructed arc
-     */
-    Arc_2(Rep rep) : 
-        Base(rep) { 
-    }
-    
-    //!@}
-
-public:
-    //!\name Destructors (can be many ?)
-    //!@{
-
-    /*!\brief
-     * Standard destructor
-     */
-    virtual ~Arc_2() {
-    }
-    
-    //!@}
-
-#define CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(X, Y) \
-    typename Curved_kernel_via_analysis_2::X Y = \
-         Curved_kernel_via_analysis_2::instance().Y##_object(); \
-
-
-public:
-    //!\name Parameter space
-    //!@{
-    
-    /*!\brief
-     * location of arc's end
-     *
-     * \param ce The intended end
-     * \return The location of arc's \c ce in parameterspace
-     */
-    CGAL::Arr_parameter_space location(CGAL::Arr_curve_end ce) const {
-        if (ce == CGAL::ARR_MIN_END) {
-            return _minpoint().location();
-        }
-        return _maxpoint().location();
-    }
-    
-    /*!\brief
-     *  Sets boundary type for an end of an arc
-     *
-     * It is supposed that the user thoroughly understands malicious
-     * consequences that may result from the misuse of the location
-     *
-     * \param ce The intended end
-     * \param loc The location to store
-     */
-    void set_location(CGAL::Arr_curve_end ce, 
-                      CGAL::Arr_parameter_space loc) const {
-        (ce == CGAL::ARR_MIN_END ? 
-         _minpoint().set_location(loc) : _maxpoint().set_location(loc));
-    }
-    
-    //!@}
-
-    //!\name Access functions
-    //!@{
-    
-    /*!\brief
-     * Is a curve-end finite?
-     *
-     * \param ce The intended end
-     * \return \c true, if finite, \c false, otherwise
-     */
-    bool is_finite(CGAL::Arr_curve_end ce) const {
-        const Point_2& pt = 
-            (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint());
-        return pt.is_finite();
-    }
-
-    /*!\brief 
-     * returns arc's interior curve end
-     * 
-     * \param ce The intended end
-     * \return The minimal point of the arc, or the maximal point of the arc
-     *
-     *  \pre accessed curve end has finite coordinates
-     */
-    Point_2 curve_end(CGAL::Arr_curve_end ce) const {
-        const Point_2& pt = 
-            (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint());
-#if !CGAL_ARRANGEMENT_ON_DUPIN_CYCLIDE
-        CGAL_precondition(pt.location() == CGAL::ARR_INTERIOR ||
-                          pt.is_finite());
-#endif
-        return pt;
-    }
-
-    /*!\brief 
-     * returns x-coordinate of arc's curve end
-     * 
-     * \param ce The intended end
-     * \return x-coordinate of arc's end at \c ce
-     *
-     * \pre accessed curve end has finite x-coordinate
-     */
-    inline
-    Coordinate_1 curve_end_x(CGAL::Arr_curve_end ce) const {
-        CGAL_precondition(
-                !(ce == CGAL::ARR_MIN_END ? _minpoint().is_on_left_right() :
-                  _maxpoint().is_on_left_right()));
-        return (ce == CGAL::ARR_MIN_END ? _minpoint().x() : _maxpoint().x());
-    }
-
-    /*!\brief
-     * supporting curve of the arc
-     * 
-     * \return supporting curve of the arc
-     */
-    inline
-    const Curve_analysis_2& curve() const {
-        return this->ptr()->_m_support; 
-    }
-  
-    /*!\brief arc number in interior
-     * 
-     * \return arc number 
-     * 
-     * \pre !is_vertical()
-     */
-    inline
-    int arcno() const { 
-        CGAL_precondition(!is_vertical());
-        return this->ptr()->_m_arcno; 
-    }
-
-    /*!\brief
-     * arc number of end of arc, which may be different from arc number in its 
-     * interior
-     *
-     * \param ce The intended end
-     * \return Arc number of intended end
-     * \pre !is_vertical()
-     */
-    inline
-    int arcno(CGAL::Arr_curve_end ce) const {
-        CGAL_precondition(!is_vertical());
-        return (ce == CGAL::ARR_MIN_END ? this->ptr()->_m_arcno_min :
-                this->ptr()->_m_arcno_max);
-    }
-    
-    /*!\brief 
-     * arc number at given x-coordinate
-     *
-     * If \c x0 is equal to source's or target's x-coordinate,
-     * then the arc number of that point is returned.
-     * Otherwise the arc number of the interior is returned.
-     *
-     * \param x0 queried x-coordinate
-     * \returns arcnumber at \c x0
-     * \pre !is_vertical()
-     * \pre \c x0 must be within arcs's x-range.
-     */
-    inline
-    int arcno(const Coordinate_1& x0) const {
-        CGAL_precondition(!is_vertical());
-        CGAL_precondition(is_in_x_range(x0));
-
-        if (this->ptr()->_m_arcno_min != this->ptr()->_m_arcno && 
-            is_finite(CGAL::ARR_MIN_END) &&
-            Curved_kernel_via_analysis_2::instance().
-            kernel().compare_1_object()(x0, _minpoint().x()) == 
-            CGAL::EQUAL) {
-            return this->ptr()->_m_arcno_min;
-        }
-        if (this->ptr()->_m_arcno_max != this->ptr()->_m_arcno && 
-            is_finite(CGAL::ARR_MAX_END) &&
-            Curved_kernel_via_analysis_2::instance().
-            kernel().compare_1_object()(x0, _maxpoint().x()) == 
-            CGAL::EQUAL) {
-            return this->ptr()->_m_arcno_max;
-        }
-        return this->ptr()->_m_arcno;
-    }
-
-    /*!\brief
-     * checks if the arc is vertical 
-     *
-     * \return \c true, if vertical, \c false, otherwise
-     */
-    inline
-    bool is_vertical() const {
-        return this->ptr()->_m_is_vertical;
-    }
-
-    /*!\brief
-     * returns x-coordinate of vertical arc
-     *
-     * \return x-coordinate of line that contains vertical arc
-     * \pre is_vertical
-     */
-    inline
-    const Coordinate_1& x() const {
-        CGAL_precondition(is_vertical());
-        return _minpoint().x();
-    }
-    
-    //!@}
-
-    //!\name Direction
-    //!@{
-
-    /*!\brief
-     * checks if the arc is direction left-to-right (min-to-max)
-     *
-     * \return \c true, if directed left-to-right, \c false, otherwise
-     */
-    inline
-    bool is_left_to_right() const {
-      return this->ptr()->_m_left_to_right;
-    }
-  
-    /*! Flip the arc . */
-    Arc_2 flip () const  {
-      Arc_2   opp(*this);
-      opp.copy_on_write();
-      opp.ptr()->_m_left_to_right = !this->ptr()->_m_left_to_right;
-      
-      return opp;
-    }
-
-    //!@}
-
-    //!\name Intervals
-    //!@{
-
-    /*!\brief
-     * returns the index of an open interval between two events of the 
-     * curve the arc belongs to
-     *
-     * \return interval id of supporting curve for this arc
-     * \pre !is_vertical()
-     */
-    inline
-    int interval_id() const {
-        CGAL_precondition(!is_vertical());
-        if(!this->ptr()->_m_interval_id) 
-            this->ptr()->_m_interval_id = _compute_interval_id();
-        return *(this->ptr()->_m_interval_id);
-    }
-    
-    
-    /*!\brief
-     * returns boundary value in interior of x-range of non-vertical
-     * interval
-     * 
-     * \return a rational x-coordinate in the interior of the arc's x-range 
-     * \pre !is_vertical()
-     */
-    Bound boundary_in_x_range_interior() const {
-        CGAL_precondition(!is_vertical());
-        if(!this->ptr()->_m_boundary_in_interval) {
-            this->ptr()->_m_boundary_in_interval = 
-                _compute_boundary_in_interval();
-            CGAL_postcondition_code(
-                    typename Curve_analysis_2::Status_line_1 cv_line =
-                    curve().status_line_at_exact_x(
-                            Coordinate_1(
-                                    *this->ptr()->_m_boundary_in_interval
-                            )
-                    );
-            );
-            CGAL_postcondition(cv_line.index() == interval_id());
-        }
-        return *(this->ptr()->_m_boundary_in_interval);
-    }
-
-    //!@}
-
-public:
-    //! \name Shortcuts for code readability
-    //!@{
-    
-    //! tests whether this boundary type represents +/-oo
-    inline static bool is_infinite(/*CGAL::Arr_boundary_type bnd*/) {
-        return false; //(bnd == CGAL::ARR_UNBOUNDED);
-    }
-    
-    //! tests whether this boundary type represents a singularity 
-    inline static bool is_singular(/*CGAL::Arr_boundary_type bnd*/) {
-        return false; //(bnd == CGAL::ARR_CONTRACTION);
-    }
-    
-    //! tests whether this boundary type represents lying on discontinuity
-    inline static bool is_on_disc(/*CGAL::Arr_boundary_type bnd*/) {
-        return false; //(bnd == CGAL::ARR_IDENTIFICATION);
-    }
-
-    //! returns true if a parameter encodes an entity in the interior
-    inline static bool is_interior(CGAL::Arr_parameter_space loc) {
-        return (loc == CGAL::ARR_INTERIOR);
-    }
-
-    //! returns true if a parameter encodes bottom or top boundary placement
-    inline static bool is_on_bottom_top(CGAL::Arr_parameter_space loc) {
-        return (loc == CGAL::ARR_BOTTOM_BOUNDARY || 
-                loc == CGAL::ARR_TOP_BOUNDARY);
-    }
-
-    //! returns true if a parameter encodes left or right boundary placement
-    inline static bool is_on_left_right(CGAL::Arr_parameter_space loc) {
-        return (loc == CGAL::ARR_LEFT_BOUNDARY || 
-                loc == CGAL::ARR_RIGHT_BOUNDARY);
-    }
-
-    //!@}
-
-public:    
-    //! \name Predicates
-    //!@{
-    
-      /*!
-     * Compare the relative x-limits of a vertical line at an interior point
-     * and the arc's end on a bottom or top boundary
-     * 
-     * \param p A reference point; we refer to a vertical line incident to p.
-     * \param ce ARR_MIN_END if we refer to the arc's minimal end,
-     *            ARR_MAX_END if we refer to its maximal end.
-     * \return CGAL::SMALLER if p lies to the left of the arc;
-     *         CGAL::LARGER  if p lies to the right of the arc;
-     *         CGAL::EQUAL   in case of an overlap.
-     *
-     * \pre the arc's relevant end is on bottom or top boundary
-     */
-    CGAL::Comparison_result compare_x_at_limit(
-            CGAL::Arr_curve_end ce,
-            const Point_2& p
-    ) const {
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
-                                            compare_x_at_limit_2)
-        // compare with NULL, in order to avoid a performance warning with VC++
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_x_at_limit_2(
-                p, *dynamic_cast< const Kernel_arc_2* >(this), ce
-        );
-    }
-    
-
-    /*!\brief
-     * Compare the relative x-limits of the curve end of \c *this
-     * and \c cv2
-     * \param ce1 ARR_MIN_END if we refer to this' minimal end,
-     *             ARR_MAX_END if we refer to this' maximal end.
-     * \param cv2 The second curve.
-     * \param ce2 ARR_MIN_END if we refer to its minimal end,
-     *             ARR_MAX_END if we refer to its maximal end.
-     * \return CGAL::SMALLER if \c this lies to the left of cv2;
-     *         CGAL::LARGER  if \c this lies to the right of cv2;
-     *         CGAL::EQUAL   in case of an overlap.
-     *
-     * \pre the curve ends lie on the bottom or top boundary
-     */
-    CGAL::Comparison_result compare_x_at_limit(
-            CGAL::Arr_curve_end ce1,
-            const Kernel_arc_2& cv2, CGAL::Arr_curve_end ce2) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
-                                            compare_x_at_limit_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_x_at_limit_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2
-        );
-    }   
-
-    /*!
-     * Compare the relative x-positions of an interior point
-     * and the arc's end on a bottom or top boundary
-     * 
-     * \param p A reference point; we refer to a vertical line incident to p.
-     * \param ce ARR_MIN_END if we refer to the arc's minimal end,
-     *            ARR_MAX_END if we refer to its maximal end.
-     * \return CGAL::SMALLER if p lies to the left of the arc;
-     *         CGAL::LARGER  if p lies to the right of the arc;
-     *         CGAL::EQUAL   in case of an overlap.
-     *
-     * \pre the arc's relevant end is on bottom or top boundary
-     */
-    CGAL::Comparison_result compare_x_near_limit(
-            CGAL::Arr_curve_end ce,
-            const Point_2& p
-    ) const {
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
-                                            compare_x_near_limit_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_x_near_limit_2(
-                p, *dynamic_cast< const Kernel_arc_2* >(this), ce
-        );
-    }
-    
-    /*!\brief
-     * Compare the relative x-positions of the curve end of \c *this
-     * and \c cv2
-     * \param ce1 ARR_MIN_END if we refer to this' minimal end,
-     *             ARR_MAX_END if we refer to this' maximal end.
-     * \param cv2 The second curve.
-     * \param ce2 ARR_MIN_END if we refer to its minimal end,
-     *             ARR_MAX_END if we refer to its maximal end.
-     * \return CGAL::SMALLER if \c this lies to the left of cv2;
-     *         CGAL::LARGER  if \c this lies to the right of cv2;
-     *         CGAL::EQUAL   in case of an overlap.
-     *
-     * \pre the curve ends lie on the bottom or top boundary
-     */
-    CGAL::Comparison_result compare_x_near_limit(const Kernel_arc_2& cv2, 
-                                                 CGAL::Arr_curve_end ce) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
-                                            compare_x_near_limit_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce);
-    }   
-  
-    /*!\brief
-     * Compare the relative y-positions of two arcs whose ends approach
-     * the left or right boundary from the same side
-     *
-     * \param cv2 The second arc
-     * \param ce ARR_MIN_END if we compare near left boundary
-     *            ARR_MAX_END if we compare near right boundary
-     * \return CGAL::SMALLER if this arc lies below cv2;
-     *         CGAL::LARGER if this arc lies above cv2;
-     *         CGAL::EQUAL in case of an overlap.
-     *
-     * \pre The ends are defined on left or right boundary
-     */
-    CGAL::Comparison_result compare_y_near_boundary(
-            const Kernel_arc_2& cv2, 
-            CGAL::Arr_curve_end ce
-    ) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_near_boundary_2,
-                                            compare_y_near_boundary_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_y_near_boundary_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), cv2, ce
-        );
-    }
-
-    /*!\brief
-     * Compares the relative vertical alignment of a point with this arc
-     *
-     * \param p The point.
-     * \return 
-     * CGAL::SMALLER if y(p) \< arc(x(p)), i.e. the point is below the arc;
-     * CGAL::LARGER if y(p) > arc(x(p)), i.e. the point is above the arc;
-     * CGAL::EQUAL if p lies on the arc.
-     *
-     * \pre p is in the x-range of the arc.
-     */
-    CGAL::Comparison_result compare_y_at_x(const Point_2& p) const {
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_2,
-                                            compare_y_at_x_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_y_at_x_2(p, *dynamic_cast< const Kernel_arc_2* >(this));
-    }
-
-    /*!\brief
-     * Compares the relative vertical aligment of this arc with a second 
-     * immediately to the left of one of their intersection points. 
-     * 
-     * If one of the curves is vertical (emanating downward from p), 
-     * it is always considered to be below the other curve.
-     * 
-     * \param cv2 The second arc
-     * \param p The intersection point
-     * 
-     * \return The relative vertical alignment this arc with respect to cv2
-     *         immediately to the left of p: SMALLER, LARGER or EQUAL.
-     *
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographical) to their left.
-     */
-    CGAL::Comparison_result compare_y_at_x_left(const Kernel_arc_2& cv2, 
-                                                const Point_2 &p) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_left_2,
-                                            compare_y_at_x_left_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_y_at_x_left_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), cv2, p
-        );
-    }
-    
-    /*!\brief
-     * Compares the relative vertical aligment of this arc with a second 
-     * immediately to the right of one of their intersection points. 
-     * 
-     * If one of the curves is vertical (emanating downward from p), 
-     * it is always considered to be below the other curve.
-     * 
-     * \param cv2 The second arc
-     * \param p The intersection point
-     * 
-     * \return The relative vertical alignment this arc with respect to cv2
-     *         immediately to the right of p: SMALLER, LARGER or EQUAL.
-     *
-     * \pre The point p lies on both curves, and both of them must be also be
-     *      defined (lexicographical) to their right.
-     */
-    CGAL::Comparison_result compare_y_at_x_right(const Kernel_arc_2& cv2, 
-                                                 const Point_2 &p) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_right_2,
-                                            compare_y_at_x_right_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return compare_y_at_x_right_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), cv2, p
-        );
-    }
-        
-    /*!\brief
-     * Check if the given x-value is in the x-range of the arc inclusive.
-     * 
-     * \param x The x-value.
-     * \param *eq_min Output: Is this value equal to the x-coordinate of the
-     *                       ARR_MIN_END point.
-     * \param *eq_max Output: Is this value equal to the x-coordinate of the
-     *                       ARR_MAX_END point.
-     * \return \c true, if p.x() is in x-range of arc, \c false otherwise
-     */
-    bool is_in_x_range(const Coordinate_1& x, 
-                       bool *eq_min = NULL, bool *eq_max = NULL) const {
-        
-        if (eq_min != NULL && eq_max != NULL) {
-            *eq_min = *eq_max = false;
-        }
-
-        if (is_vertical()) {
-            if (x == this->x()) {
-                if (eq_min != NULL) {
-                    *eq_min = true;
-                }
-                if (eq_max != NULL) {
-                    *eq_max = true;
-                }
-                return true;
-            }
-            // else
-            return false;
-        }
-
-        // precomputations:
-        CGAL::Comparison_result resmin = CGAL::LARGER;
-        CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
-        bool min_has_x = 
-            (is_finite(CGAL::ARR_MIN_END) || 
-             min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
-             min_loc == CGAL::ARR_TOP_BOUNDARY);
-        if (min_has_x) {
-            resmin = Curved_kernel_via_analysis_2::instance().
-                kernel().compare_1_object()(x, _minpoint().x());
-            if (eq_min != NULL) { // TODO asymptotic end in x-range?
-                *eq_min = (resmin == CGAL::EQUAL);
-            }
-        }
-
-        CGAL::Comparison_result resmax = CGAL::SMALLER;
-        CGAL::Arr_parameter_space max_loc = location(CGAL::ARR_MAX_END);
-        bool max_has_x = 
-            (is_finite(CGAL::ARR_MAX_END) || 
-             max_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
-             max_loc == CGAL::ARR_TOP_BOUNDARY);
-        
-        if (max_has_x) {
-            resmax = Curved_kernel_via_analysis_2::instance().
-                kernel().compare_1_object()(x, _maxpoint().x());
-            if (eq_max != NULL) { // TODO asymptotic end in x-range?
-                *eq_max = (resmax == CGAL::EQUAL);
-            }
-        }
-
-        bool res = 
-	    (resmin != CGAL::SMALLER && resmax != CGAL::LARGER);
-	return res;
-    } 
-    
-    /*!\brief
-     * Checks whether an x-coordinate lies in the interiors of this arc's 
-     * x-range
-     * 
-     * \param x The query coordinate
-     * \return \c true, if \c x lies in the interior of this arc's x-range,
-     * \c false otherwise
-     */
-    // TODO do we need this special method ?
-    bool is_in_x_range_interior(const Coordinate_1& x) const
-    {
-        bool eq_min, eq_max;
-        if (!is_in_x_range(x, &eq_min, &eq_max) || eq_min || eq_max) {
-            return false;
-        }
-        return true;
-    }
-    
-    /*!\brief 
-     * Checks whether a given arc is equal to this one
-     *
-     * \param cv2 The query arc
-     * \return \c true iff this arc is equal to \c cv, \c false otherwise
-     */
-    bool is_equal(const Kernel_arc_2& cv2) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Equal_2, 
-                                            equal_2)
-        
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return equal_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
-    }
-
-    /*!\brief
-     * checks whether this arcs overlaps with another
-     * 
-     * \param cv2 The query arc
-     * \return \c true, if both arcs have infinitely many intersection points,
-     *         \c false otherwise
-     */
-    bool do_overlap(const Kernel_arc_2& cv2) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Do_overlap_2, 
-                                            do_overlap_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return do_overlap_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
-    }
-
-    /*!\brief 
-     * multiplicity of intersection
-     * 
-     * The intersection multiplicity of \c *this and \c cv2 at point \c p is
-     * returned.
-     *
-     * \param cv2 The second arc
-     * \param p The intersection point
-     * \return The multiplicity of the intersection at \c p
-     * \pre \c p must be an intersection point.
-     */
-    int multiplicity_of_intersection(
-            const Kernel_arc_2& cv2, const Point_2& p) const {
-
-        // intersection point must lie in the interior of both arcs
-        CGAL_precondition_code( // because of macro stupidity one needs 
-            bool eq_min1;       // to omit commas in declaration
-            bool eq_max1;
-            bool eq_min2;
-            bool eq_max2;
-        );    
-        CGAL_precondition(is_in_x_range(p.x(), &eq_min1, &eq_max1));
-        CGAL_precondition(cv2.is_in_x_range(p.x(), &eq_min2, &eq_max2));
-        CGAL_precondition(is_vertical() || (!eq_min1 && !eq_max1));
-        CGAL_precondition(cv2.is_vertical() || (!eq_min2 && !eq_max2));
-
-        // there must be an intersection at this point (in_x_range is checked
-        // internally by compare_y_at_x() ?
-        CGAL_expensive_precondition(compare_y_at_x(p) == CGAL::EQUAL &&
-            cv2.compare_y_at_x(p) == CGAL::EQUAL);
-            
-        Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
-        CGAL_precondition(!curve().is_identical(cv2.curve()));
-        if (is_vertical() || cv2.is_vertical()) {
-            CGAL_assertion(!(is_vertical() && cv2.is_vertical()));
-            return 1;
-        }
-        
-        Curve_pair_analysis_2 cpa_2 =
-            Curved_kernel_via_analysis_2::instance().
-            kernel().construct_curve_pair_2_object()(curve(), cv2.curve());
-
-        typename Curve_pair_analysis_2::Status_line_1 cpv_line =
-                cpa_2.status_line_for_x(p.x());
-
-        CGAL_precondition(cpv_line.is_intersection());
-        int j = cpv_line.event_of_curve(arcno(p.x()), curve()),
-            mult = cpv_line.multiplicity_of_intersection(j);
-            
-        CGAL_postcondition(mult > 0);
-        return mult;
-    }
-    
-    //!@}  
-    
-    //!\name Constructing functions
-    //!@{
-
-    /*!\brief
-     * Find all intersections of this arc with another one and 
-     * insert them to the output iterator. 
-     * 
-     * Type of output iterator is \c CGAL::Object. It either contains 
-     * an \c Arc_2 object (overlap) or a 
-     * <tt>std::pair\<Point_2, unsigned int></tt> (intersection point +
-     * multiplicity). A past-the-end iterator is returned.
-     *
-     * \param cv2 The second arc
-     * \param oi The outputiterator
-     * \return A past-the-end iterator of \c oi
-     */
-    template < class OutputIterator >
-    OutputIterator intersections(const Kernel_arc_2& cv2, 
-                                 OutputIterator oi) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Intersect_2, 
-                                            intersect_2)
-        
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return intersect_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), cv2, oi
-        );
-    }
-    
-    /*!\brief
-     * Computes the next intersection of \c *this and \c cv2 right of \c p  
-     * in lexicographical order and returns it through \c intersection
-     * argument
-     *
-     * intersect_right_of_point is not called when using sweep_curves() with 
-     * intersection dictionary and without validation of internal structures 
-     * (as is standard). Hence we can be lazy here for the moment
-     * without losing performance.
-     *
-     * \param cv2 The second arc
-     * \param p The minimal bound point
-     * \param intersection The next intersection
-     * \return \c true, if there is a next intersection and 
-     *         \c intersection has been set properly, \c false otherwise
-     * \pre The arcs are not allowed to overlap
-     */
-    bool intersect_right_of_point(const Kernel_arc_2& cv2, const Point_2& p, 
-                                  Point_2& intersection) const {
-        
-        CGAL_precondition(!this->do_overlap(cv2));
-
-        // TODO rewrite intersect_right_of_point (Pavel)
-        // use static member for Intersect, Left & Right
-        // with parameters for direction and where to stop
-        typedef std::vector<std::pair<Point_2, int> > Point_container;
-        Point_container tmp;
-        _intersection_points(
-                *dynamic_cast< const Kernel_arc_2*>(this), cv2, 
-                back_inserter(tmp)
-        );
-        typename Point_container::const_iterator it;
-        for (it = tmp.begin(); it != tmp.end(); it++) {
-            if(it->first > p) {
-                intersection = it->first;
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    /*!\brief
-     * Computes the next intersection of \c *this and \c cv2 left of \c p  
-     * in lexicographical order and returns it through \c intersection
-     * argument
-     *
-     * intersect_right_of_point is not called when using sweep_curves() with 
-     * intersection dictionary and without validation of internal structures 
-     * (as is standard). Hence we can be lazy here for the moment
-     * without losing performance.
-     *
-     * \param cv2 The second arc
-     * \param p The maximal bound point
-     * \param intersection The next intersection
-     * \return \c true, if there is a next intersection 
-     *         and \c intersection has been set properly, \c false otherwise
-     * \pre The arcs are not allowed to overlap
-     */
-    bool intersect_left_of_point(const Kernel_arc_2& cv2, const Point_2& p, 
-                                 Point_2& intersection) const {
-
-        CGAL_precondition(!this->do_overlap(cv2));
-        
-        // TODO rewrite intersect_left_of_point (Pavel)
-        // use static member for Intersect, Left & Right
-        // with parameters for direction and where to stop
-        typedef std::vector<std::pair<Point_2, int> > Point_container;
-        Point_container tmp;
-        _intersection_points(
-                *dynamic_cast< const Kernel_arc_2*>(this), cv2, 
-                back_inserter(tmp)
-        );
-        typename Point_container::const_reverse_iterator it;
-        for(it = tmp.rbegin(); it != tmp.rend(); it++) {
-            if(it->first < p) {
-                intersection = it->first;
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /*!\brief
-     * Returns a trimmed version of an arc
-     * 
-     * \param p the new first endpoint
-     * \param q the new second endpoint
-     * \return The trimmed arc
-     *
-     * \pre p != q
-     * \pre both points must be interior and must lie on \c cv
-     */
-    // do we need this method separetely ??
-    Kernel_arc_2 trim(const Point_2& p, const Point_2& q) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2)
-
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return trim_2(*dynamic_cast< const Kernel_arc_2* >(this), p, q);
-    }
-
-    /*!\brief
-     * Split an arc at a given point into two sub-arcs
-     * 
-     * \param p The split point
-     * \param s1 Output: The left resulting sub-arc (p is its right endpoint)
-     * \param s2 Output: The right resulting sub-arc (p is its left endpoint)
-     * 
-     * \pre p lies on cv but is not one of its end-points.
-     */
-    void split(const Point_2& p, Kernel_arc_2& s1, Kernel_arc_2& s2) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2, 
-                                            split_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        split_2(*dynamic_cast< const Kernel_arc_2* >(this), p, s1, s2);
-    }
-
-    /*!\brief
-     * Check whether this arc can be merged with a second
-     *
-     * \param cv2 The second arc
-     * \return \c true if the two arcs are mergeable, i.e., they are supported
-     * by the same curve and share a common endpoint; \c false otherwise.
-     */
-    bool are_mergeable(const Kernel_arc_2& cv2) const {
-    
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Are_mergeable_2, 
-                                            are_mergeable_2)
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        return are_mergeable_2(
-                *dynamic_cast< const Kernel_arc_2* >(this), cv2
-        );
-    }
-
-  /*!\brief
-     * Merges this arc with a second
-     *
-     * \param cv2 The second arc
-     * \return The resulting arc
-     * 
-     * \pre The two arcs are mergeable, that is they are supported by the
-     *      same curve and share a common endpoint.
-     */  
-    Kernel_arc_2 merge(const Kernel_arc_2& cv2) const {
-        
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Merge_2, merge_2)
-        Kernel_arc_2 tmp;
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-        merge_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, tmp);
-        return tmp;
-    }
-    
-    //!@}
-    //!\name Simplification
-    //!@{ 
-
-    /*! \brief
-     *  simplifies representation of \c cv and/or \c p in case they have
-     *  non-coprime supporting curves. 
-     *
-     *  \return \c true if simplification took place, \c false otherwise
-     */
-    static bool simplify(const Kernel_arc_2& cv, const Coordinate_2& p) {
-
-        if (cv.curve().is_identical(p.curve())) {
-            return false;
-        }
-
-        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
-        
-        if (Curved_kernel_via_analysis_2::instance().
-            kernel().decompose_2_object()(
-                    cv.curve(), p.curve(), 
-                    std::back_inserter(parts_of_f), 
-                    std::back_inserter(parts_of_g),
-                    std::back_inserter(common))) {
-            
-            CGAL_assertion((parts_of_f.size() == 1 ||
-                            parts_of_g.size() == 1) && common.size() == 1);
-            if (parts_of_f.size() == 1) {
-                cv._simplify_by(
-                    Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (parts_of_f[0], common[0]));
-            } 
-            if (parts_of_g.size() == 1) {
-                p.simplify_by(Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (parts_of_g[0], common[0]));
-            }
-            return true;
-        }
-        return false;
-    }  
-    
-    /*!\brief
-     * simplifies representation of \c cv1 and/or \c cv2 in case they have
-     * non-coprime supporting curves. 
-     *
-     *  \return \c true if simplification took place, \c false otherwise
-     */
-    static bool simplify(const Kernel_arc_2& cv1, const Kernel_arc_2& cv2) {
-
-        if (cv1.curve().is_identical(cv2.curve())) {
-            return false;
-        }
-
-        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
-        
-        if (Curved_kernel_via_analysis_2::instance().
-            kernel().decompose_2_object()(
-                    cv1.curve(), cv2.curve(), 
-                    std::back_inserter(parts_of_f), 
-                    std::back_inserter(parts_of_g),
-                    std::back_inserter(common))) {
-            CGAL_assertion((parts_of_f.size() == 1 ||
-                       parts_of_g.size() == 1) && common.size() == 1);
-            if (parts_of_f.size() == 1) {
-                cv1._simplify_by(Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (parts_of_f[0], common[0]));
-            }
-            if (parts_of_g.size() == 1) {
-                cv2._simplify_by(Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (parts_of_g[0], common[0]));
-            }
-            return true;
-        }
-        return false;
-    }  
-
-protected:
-    //!\name Trimming
-    //!@{
-    
-    /*!\brief
-     * Returns a trimmed version of an arc (internal version that does not use
-     * functor)
-     * 
-     * \param p the new first endpoint
-     * \param q the new second endpoint
-     * \return The trimmed arc
-     *
-     * \pre p != q
-     * \pre both points must be interior and must lie on \c cv
-     */
-    // TODO implement in functor?
-    Kernel_arc_2 _trim(const Point_2& p, const Point_2& q) const {
-        
-        if (p.location() == CGAL::ARR_INTERIOR && 
-            q.location() == CGAL::ARR_INTERIOR) {
-            
-            return _replace_endpoints(p, q, 
-                    (is_vertical() ? -1 : arcno(p.x())),
-                    (is_vertical() ? -1 : arcno(q.x()))).first;           
-        } 
-            
-        if (p.location() != CGAL::ARR_INTERIOR &&
-            q.location() != CGAL::ARR_INTERIOR) 
-            return static_cast<const Kernel_arc_2&>(*this);
-        
-        Kernel_arc_2 left_arc, right_arc;
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2, split_2)
-
-        if (p.location() != CGAL::ARR_INTERIOR &&
-            q.location() == CGAL::ARR_INTERIOR) {
-                
-            split_2(static_cast<const Kernel_arc_2&>(*this), q, left_arc,
-                    right_arc);
-            return left_arc;
-        }
-        // if (p.location() == CGAL::ARR_INTERIOR &&
-        //   q.location() != CGAL::ARR_INTERIOR) 
-                
-        split_2(static_cast<const Kernel_arc_2&>(*this), p, left_arc,
-                    right_arc);
-        return right_arc;        
-    }
-    
-public:
-    
-    /*!\brief
-     * Trims this arc and \c cv2 to the common x-range, if it is non-trivial
-     * 
-     * \param cv2 the second arc
-     * \param trimmed1 Output: trimmed version of \c *this to joint x-range of
-     *                 \c *this and \c cv2
-     * \param trimmed1 Output: trimmed version of \c cv2 to joint x-range of
-     *                 \c *this and \c cv2
-     * \return \c true, if \c *this and \c cv2 share a non-trivial 
-     *         common x-range, \c false otherwise
-     */
-    bool trim_by_arc(const Kernel_arc_2& cv2, Kernel_arc_2& trimmed1,
-                     Kernel_arc_2& trimmed2) const {
-
-        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
-
-        const Kernel_arc_2& cv1 = static_cast< const Kernel_arc_2& >(*this);
-
-        Point_2 common_left, common_right;
-        
-        bool joint = cv1._joint_x_range(cv2, common_left, common_right);
-        
-        if (!joint) {
-            return false;
-        }
-        
-        typename Curve_kernel_2::Compare_1 compare_x(
-                Curved_kernel_via_analysis_2::instance().
-                    kernel().compare_1_object());
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Construct_point_on_arc_2,
-                                            construct_point_on_arc_2)
-
-        Point_2 left1, left2;
-        
-        if (common_left.location() != CGAL::ARR_LEFT_BOUNDARY) {
-            if ((cv1.location(CGAL::ARR_MIN_END) != 
-                 CGAL::ARR_LEFT_BOUNDARY)  &&
-                (compare_x(cv1.curve_end_x(CGAL::ARR_MIN_END),
-                           common_left.x()) == CGAL::EQUAL) ) {
-                left1 = cv1._minpoint();
-            } else {
-                left1 = construct_point_on_arc_2(common_left.x(),
-                                               cv1.curve(),
-                                               cv1.arcno(),
-                                               cv1);
-            }
-            if ((cv2.location(CGAL::ARR_MIN_END) != 
-                 CGAL::ARR_LEFT_BOUNDARY)  &&
-                (compare_x(cv2.curve_end_x(CGAL::ARR_MIN_END),
-                           common_left.x()) == CGAL::EQUAL) ) {
-                left2 = cv2._minpoint();
-            } else {
-                left2 = construct_point_on_arc_2(common_left.x(),
-                                               cv2.curve(),
-                                               cv2.arcno(),
-                                               cv2);
-            }
-        } else {
-            left1 = cv1._minpoint();
-            left2 = cv2._minpoint();
-        }
-        
-        
-        Point_2 right1, right2;
-        
-        if (common_right.location() != CGAL::ARR_RIGHT_BOUNDARY) {
-            
-            if ((cv1.location(CGAL::ARR_MAX_END) != 
-                 CGAL::ARR_RIGHT_BOUNDARY)  &&
-                (compare_x(cv1.curve_end_x(CGAL::ARR_MAX_END),
-                           common_right.x()) == CGAL::EQUAL) ) {
-                right1 = cv1._maxpoint();
-            } else {
-                right1 = construct_point_on_arc_2(common_right.x(),
-                                                cv1.curve(),
-                                                cv1.arcno(),
-                                                cv1);
-            }
-            if ((cv2.location(CGAL::ARR_MAX_END) != 
-                 CGAL::ARR_RIGHT_BOUNDARY)  &&
-                (compare_x(cv2.curve_end_x(CGAL::ARR_MAX_END),
-                           common_right.x()) == CGAL::EQUAL) ) {
-                right2 = cv2._maxpoint();
-            } else {
-                right2 = construct_point_on_arc_2(common_right.x(),
-                                                cv2.curve(),
-                                                cv2.arcno(),
-                                                cv2);
-            }
-            
-        } else {
-            right1 = cv1._maxpoint();
-            right2 = cv2._maxpoint();
-        }
-        
-        trimmed1 = cv1._trim(left1, right1);
-        trimmed2 = cv2._trim(left2, right2);   
-
-        return joint;
-    }
-   
-    //!@}
-
-protected:
-    //!\name Protected helper methods
-    //!@{
-    
-    /*!\brief 
-     * function to ensure lexicographical order of the curve ends
-     *
-     * must be called once from constructor
-     */
-    void _fix_curve_ends_order() {
-        CGAL::Comparison_result res = 
-            _same_arc_compare_xy(_minpoint(), _maxpoint());
-        // curve ends cannot be identical
-        CGAL_precondition(res != CGAL::EQUAL);
-        if(res == CGAL::LARGER) { // swap curve ends and corresponding arcnos
-            std::swap(this->ptr()->_m_min, this->ptr()->_m_max);
-            std::swap(this->ptr()->_m_arcno_min, this->ptr()->_m_arcno_max);
-        }
-        // for non-vertical arcs check arcno constancy in the arc's interior
-        // for vertical arcs check that there are no intersection points
-        // between curve ends
-        _check_arc_interior(); 
-    }
-    
-    // p.curve() <-> p.arcno()
-    // c <-> arcno_on_c
-    /*!\brief
-     * establishes preconditions that point \c pt lies on the curve 
-     * \c c with arc number \c arcno_on_c, also checks that point's supporting
-     * curve and \c c are coprime
-     *
-     * \param pt Given point
-     * \param arcno_on_c Arcno on curve
-     * \param c Supporting curve
-     */
-    void _check_pt_arcno_and_coprimality(const Point_2& pt, int arcno_on_c, 
-                                         const Curve_analysis_2& c) const {
-        
-        CGAL_precondition_code(
-        
-        if (!c.is_identical(pt.curve())) {
-            // -1 defines that no arcnos preconditions need to be established
-            if (arcno_on_c != -1) {
-                typename Curve_pair_analysis_2::Status_line_1
-                    cpv_line;
-                Curve_pair_analysis_2 cpa_2 =
-                    Curved_kernel_via_analysis_2::instance().
-                      kernel().construct_curve_pair_2_object()(pt.curve(), c);
-                   
-                cpv_line = cpa_2.status_line_for_x(pt.x());
-                CGAL_precondition(cpv_line.event_of_curve(pt.arcno(), 
-                                                          pt.curve())
-                    == cpv_line.event_of_curve(arcno_on_c, c));
-            } 
-            std::vector< Curve_analysis_2 > dummy[3]; 
-            // ensure that curves are not decomposable
-            CGAL_precondition(!Curved_kernel_via_analysis_2::instance().
-                              kernel().decompose_2_object()(
-                                      c, pt.curve(),
-                                      std::back_inserter(dummy[0]), 
-                                      std::back_inserter(dummy[1]),
-                                      std::back_inserter(dummy[2]))
-            );
-        } else if (arcno_on_c != -1) {
-            CGAL_precondition(pt.arcno() == arcno_on_c);
-        }
-        );
-    }
-    
-    /*!\brief 
-     * establishes preconditions to ensure that there are no event 
-     * points in the arc's interior (only at source and target) and its arc 
-     * number is constant
-     * 
-     * \pre before calling this method source and target must be sorted 
-     * using \c _fix_curve_ends_order()
-     */
-    void _check_arc_interior() const {
-    
-#if !(defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
-        || defined(NDEBUG))
-
-        if(is_vertical()) {
-            Coordinate_1 x0 = _minpoint().x();
-            typename Curve_analysis_2::Status_line_1 cv_line;
-            cv_line = curve().status_line_for_x(x0);
-            CGAL_precondition(cv_line.is_event());
-            CGAL_precondition(cv_line.covers_line());
-            
-            // check that there are no intersections between min and max
-            // curve ends
-            bool inf_src = 
-                (_minpoint().location() == CGAL::ARR_BOTTOM_BOUNDARY);
-            bool inf_tgt = 
-                (_maxpoint().location() == CGAL::ARR_TOP_BOUNDARY);
-            // either no events over this line or the vertical line has at
-            // least one finite end
-            CGAL_precondition(cv_line.number_of_events() == 0 ||
-                !(inf_src && inf_tgt));
-
-            typename Curve_kernel_2::Compare_xy_2 cmp_xy(
-                Curved_kernel_via_analysis_2::instance().
-                    kernel().compare_xy_2_object());
-                    
-            for(int k = 0; k < cv_line.number_of_events(); k++) {
-            // TODO: replace by _compare_arc_numbers !! (Pavel)
-          // no way since _compare_arc_numbers compares only against *this arc
-                              
-              Coordinate_2 tmp(x0, curve(), k);
-                bool res1 = true, res2 = true;
-                if(!inf_src)
-                    res1 = (cmp_xy(_minpoint().xy(), tmp, true) ==
-                         CGAL::SMALLER);
-                if(!inf_tgt)
-                    res2 = (cmp_xy(tmp, _maxpoint().xy(), true) ==
-                         CGAL::SMALLER);
-                CGAL_precondition_msg(!(res1 && res2),
-                  "Events are not allowed in the interior of a vertical arc!");
-            }
-            return;
-        }
-
-        typename Curve_analysis_2::Status_line_1 src_line, tgt_line,
-            tmp;
-        bool inf_src = (_minpoint().location() == CGAL::ARR_LEFT_BOUNDARY),
-             inf_tgt = (_maxpoint().location() == CGAL::ARR_RIGHT_BOUNDARY);
-        src_line = (inf_src ? curve().status_line_of_interval(0) :
-            curve().status_line_for_x(_minpoint().x()));
-        tgt_line = (inf_tgt ? curve().status_line_of_interval(
-            curve().number_of_status_lines_with_event()) :
-            curve().status_line_for_x(_maxpoint().x()));
-        
-        int src_idx = src_line.index(), tgt_idx = tgt_line.index(),
-            diff = tgt_idx - src_idx;
-        bool no_events_between = true;
-        // it's supposed that arcs are not degenerate but lexicographic
-        // order may not be established
-        if(src_line.is_event()) 
-            no_events_between = (tgt_line.is_event() ? (diff == 1) : 
-                (diff == 0)||(diff == 1));
-        else 
-            no_events_between = (tgt_line.is_event() ? (diff == 0)||
-                (diff == -1) : (diff == 0));
-        
-        if(!no_events_between) {
-            // iterate through all events between source and target
-            // to check that all events points lie above our arc
-            int m_src_idx = src_idx + (src_line.is_event() ? 1 : 0),
-                m_tgt_idx = tgt_idx - 1, low = m_src_idx, high = m_tgt_idx;
-            int i, j;
-            if(low > high) // do we need to check it ?
-                std::swap(low, high);
-            std::pair<int, int> ipair;
-            for(i = low; i <= high; i++) {
-                tmp = curve().status_line_at_event(i);
-                for(j = 0; j < tmp.number_of_events(); j++) {
-                    ipair = tmp.number_of_incident_branches(j);
-                    if(ipair.first != 1||ipair.second != 1)
-                        break;
-                }
-                // there must be at least one event and arcno() is not LARGER
-                // than this event index
-                CGAL_precondition(j < tmp.number_of_events() && arcno() <= j);
-            }
-        }
-        // check validity of the curve-ends arcnos
-
-        const typename Curved_kernel_via_analysis_2::
-            Curve_interval_arcno_cache& map_interval_arcno =
-            Curved_kernel_via_analysis_2::instance().interval_arcno_cache();
-
-        if (src_line.is_event()) {
-            CGAL_precondition(map_interval_arcno(src_line, 0,
-                arcno()).first == this->ptr()->_m_arcno_min);
-        } else {
-            CGAL_precondition(arcno() == this->ptr()->_m_arcno_min);
-        }
-        if (tgt_line.is_event()) {
-            CGAL_precondition(map_interval_arcno(tgt_line, 1,
-                arcno()).first == this->ptr()->_m_arcno_max);
-        } else {
-            CGAL_precondition(arcno() == this->ptr()->_m_arcno_max);
-        }
-#endif    
-    }
-    
-    /*!\brief 
-     * compares y-coordinates of two arcs over an open (or closed) 
-     * interval or at exact x-coordinate
-     *
-     * \c where specifies whether to compare at negative/positive boundary or
-     * at finite point. if \c where = ARR_INTERIOR \c perturb defines to
-     * compare slightly to the left, on, or to the right of \c x0
-     *
-     * \param cv2 the second arc
-     * \param where the location in parameter space
-     * \param x0 The x-coordinate
-     * \param perturb determines whether to pertub slightly to the left/right
-     * \return the relative vertical alignment
-     *
-     * \pre !is_on_bottom_top(where)
-     */
-    CGAL::Comparison_result _compare_arc_numbers(
-            const Kernel_arc_2& cv2, 
-            CGAL::Arr_parameter_space where, 
-            Coordinate_1 x0 = Coordinate_1(), 
-            CGAL::Sign perturb = CGAL::ZERO) const {
-
-        CGAL_precondition(!is_on_bottom_top(where));
-        CGAL_assertion(dynamic_cast< const Kernel_arc_2*>(this) != NULL);
-        Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
-        if(curve().is_identical(cv2.curve())) 
-            return CGAL::sign(arcno() - cv2.arcno());
-        return _compare_coprime(cv2, where, x0, perturb);
-    }
-
-    /*!\brief
-     * computes vertical ordering of \c *this and \c cv2 
-     * having coprime supporting curves
-     *
-     * \param cv2 the second arc
-     * \param where the location in parameter space
-     * \param x0 The x-coordinate
-     * \param perturb determines whether to pertub slightly to the left/right
-     * \return the relative vertical alignment
-     */
-     CGAL::Comparison_result _compare_coprime(
-            const Kernel_arc_2& cv2,
-            CGAL::Arr_parameter_space where, 
-            Coordinate_1 x0, 
-            CGAL::Sign perturb) const {
-        
-#ifdef CKvA_DEBUG_PRINT_CERR
-        CKvA_CERR("\n_compare_coprime; this: " 
-             << *dynamic_cast< const Kernel_arc_2*>(this) 
-             << "; g: " << cv2.curve().polynomial_2()
-             << "; arcno_on_g: " << cv2.arcno() << "; where: " << where
-        );
-        if (where == CGAL::ARR_INTERIOR) {
-            CKvA_CERR("; x = " << CGAL::to_double(x0));
-        }
-        CKvA_CERR("\n");
-#endif
-        
-        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
-        Curve_pair_analysis_2 cpa_2 = Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (curve(), cv2.curve());
-        
-        if(where == CGAL::ARR_INTERIOR) 
-            cpv_line = cpa_2.status_line_for_x(x0, perturb);
-        else
-            cpv_line = cpa_2.status_line_of_interval(
-                    // TODO don't mix up location (where) and finiteness!
-                    where == CGAL::ARR_LEFT_BOUNDARY ? 0 :
-                    cpa_2.number_of_status_lines_with_event());
-        
-        CGAL::Sign res = 
-            CGAL::sign(cpv_line.event_of_curve(arcno(), curve()) -
-                       cpv_line.event_of_curve(cv2.arcno(), cv2.curve()));
-        CKvA_CERR("result: " << res << "\n");
-        return res;
-    }
-    
-    /*\brief 
-     * internal comparison of two curve ends "lying" on the same arc
-     * 
-     * since points are supposed to lie on the same arc, converging to the
-     * boundary implies equality
-     *
-     * \param p first endpoint
-     * \param q second endpint
-     * \param equal_x \c true indicates to skip the comparison by x
-     * \param only_x \c true indicates to report only the comparison by x
-     * \returns the result of the queried comparison
-     */
-    CGAL::Comparison_result _same_arc_compare_xy(
-            const Point_2& p,
-            const Point_2& q, 
-            bool equal_x = false, 
-            bool only_x = false) const {
-
-        CKvA_CERR("\n_same_arc_compare_xy; this: " 
-             << *dynamic_cast< const Kernel_arc_2*>(this) 
-             << "; p: " << p
-             << "; q: " << q
-             << "; equal_x: " << equal_x
-             << "; only_x: " << only_x
-             << "\n"
-        );
-        
-        CGAL::Comparison_result res;
-        
-        if (p.is_identical(q)) {
-            res = CGAL::EQUAL;
-            CKvA_CERR("result1: " << res << "\n");
-            return res;
-        }
-        
-        CGAL::Arr_parameter_space locp = p.location(), locq = q.location();
-        if (!equal_x || only_x) {
-          
-            if (!p.is_on_left_right() && !q.is_on_left_right()) {
-                // both xs are finite: require x-comparisons
-                res = Curved_kernel_via_analysis_2::instance().
-                    compare_x_2_object()(p, q);
-                if (res != CGAL::EQUAL) {
-                    CKvA_CERR("result2: " << res << "\n");
-                    return res;
-                }
-            } else if(locp != locq) {
-                CGAL_assertion(p.is_on_left_right() || q.is_on_left_right());
-                // at least one of the points lies at infty: suffice to cmp
-                // boundaries
-                if (locp == CGAL::ARR_LEFT_BOUNDARY) {
-                    res = CGAL::SMALLER;
-                    CKvA_CERR("result3: " << res << "\n");
-                    return res;
-                } else if (locp == CGAL::ARR_RIGHT_BOUNDARY) {
-                    res = CGAL::LARGER;
-                    CKvA_CERR("result4: " << res << "\n");
-                    return res;
-                } else if (locq == CGAL::ARR_LEFT_BOUNDARY) {
-                    res = CGAL::LARGER;
-                    CKvA_CERR("result5: " << res << "\n");
-                    return res;
-                } else if (locq == CGAL::ARR_RIGHT_BOUNDARY) {
-                    res = CGAL::SMALLER;
-                    CKvA_CERR("result6: " << res << "\n");
-                    return res;
-                }
-            } // else: proceed to y-comparison
-        }
-        if (only_x) {
-            res = CGAL::EQUAL;
-            CKvA_CERR("result7: " << res << "\n");
-            return res;
-        }
-        if (locp == locq) {
-            if(locp != CGAL::ARR_INTERIOR) {
-                res = CGAL::EQUAL; // both points are at the same inf in y
-                CKvA_CERR("result8: " << res << "\n");
-                return res;
-            }
-            // compare only y-values; 
-            res = Curved_kernel_via_analysis_2::instance().
-                compare_xy_2_object()(p, q, true);
-            CKvA_CERR("result9: " << res << "\n");
-            return res;
-        }
-        // here: locp != locq && one of them is at inf y
-        if (locp == CGAL::ARR_INTERIOR) {
-            res = (locq == CGAL::ARR_BOTTOM_BOUNDARY ? 
-                   CGAL::LARGER : CGAL::SMALLER);
-            CKvA_CERR("result10: " << res << "\n");
-            return res;
-        }
-        // here: locp != locq && locp is at infty
-        res = (locp == CGAL::ARR_BOTTOM_BOUNDARY ? 
-               CGAL::SMALLER : CGAL::LARGER);
-        CKvA_CERR("result11: " << res << "\n");
-        return res;
-    }
-    
-    /*!\brief
-     * min end-point of this arc (provided for code readability)
-     *
-     * \return min endpoint of arc (may lie on a boundary!)
-     */
-    inline
-    const Point_2& _minpoint() const { 
-        return this->ptr()->_m_min; 
-    }
-    
-    /*!\brief
-     * max end-point of this arc (provided for code readability)
-     *
-     * \return max endpoint of arc (may lie on a boundary!)
-     */
-    inline
-    const Point_2& _maxpoint() const { 
-        return this->ptr()->_m_max; 
-    }
-    
-    /*!\brief
-     * computes this arc's interval index
-     *
-     * \pre !is_vertical()
-     */
-    int _compute_interval_id() const {
-        CGAL_precondition(!is_vertical());
-        // we are interested in interval "to the right"
-        CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
-        bool min_has_x = 
-            (is_finite(CGAL::ARR_MIN_END) || 
-             min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
-             min_loc == CGAL::ARR_TOP_BOUNDARY);
-        
-        if (!min_has_x) {
-            return 0;
-        }
-        // else
-        typename Curve_analysis_2::Status_line_1 cv_line = 
-            curve().status_line_for_x(_minpoint().x(), CGAL::POSITIVE);
-        return cv_line.index();
-    }
-
-    /*!\brief
-     * computes this rational value in the interiors of the arc's x-range
-     * 
-     * \pre !is_vertical()
-     */
-    Bound _compute_boundary_in_interval() const {
-        CGAL_precondition(!is_vertical());
-        // a curve end at negative boundary => 0th interval
-        
-        Bound res(0);
-        
-        typename Curve_kernel_2::Approximate_relative_1 approx_x;
-	
-	typename Curve_kernel_2::Bound_between_1 bound_between_x;
-        
-	CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
-	bool min_has_x = 
-	  (is_finite(CGAL::ARR_MIN_END) || 
-	   min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
-	   min_loc == CGAL::ARR_TOP_BOUNDARY);
-	
-	CGAL::Arr_parameter_space max_loc = location(CGAL::ARR_MAX_END);
-	bool max_has_x = 
-	  (is_finite(CGAL::ARR_MAX_END) || 
-	   max_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
-	   max_loc == CGAL::ARR_TOP_BOUNDARY);
-	
-	if (min_has_x) {
-	  Coordinate_1 min_x = _minpoint().x();
-	  if (max_has_x) {
-	    Coordinate_1 max_x = _maxpoint().x();
-	    res = bound_between_x(min_x, max_x);
-	  } else {
-	    std::pair<Bound,Bound> min_pair=approx_x(min_x,4);
-	    res = min_pair.second + Bound(1);
-	  }
-	} else {
-	  if (max_has_x) { 
-	    Coordinate_1 max_x = _maxpoint().x();
-	    std::pair<Bound,Bound> max_pair=approx_x(max_x,4);
-	    res = max_pair.first - Bound(1);
-	  } else {
-	    // res stays 0
-	  }
-        }
-        CGAL_postcondition(is_in_x_range_interior(Coordinate_1(res)));
-        return res;
-    }
-
-    /*!\brief 
-     * Replaces this arc's end-points by \c p1 and \c p2 with arcnos
-     * \c arcno1 and \c arcno2.
-     * 
-     * new curve ends are sorted lexicographical in case of need; 
-     * all preconditions must be checked by the caller
-     *
-     * \param p1 new first endpoint
-     * \param p2 new second endpoint
-     * \param arcno1 new first arcno (at \c p1)
-     * \param arcno1 new second arcno (at \c p2)
-     * \return pair whose first entry represent the refined arc, and whose
-     *         second entry reports the lexicographic comparison of p1 and p2
-     */
-    std::pair< Kernel_arc_2, CGAL::Comparison_result > 
-    _replace_endpoints(
-            const Point_2& p1, const Point_2& p2, 
-            int arcno1 = -1, int arcno2 = -1) const {
-        
-        CKvA_CERR("\n_replace_endpoints\n");    
-        
-        Rep rep(*(this->ptr()));
-        rep._m_min = p1;
-        rep._m_max = p2;
-        if (!is_vertical()) {
-            if (arcno1 >= 0) {
-                rep._m_arcno_min = arcno1;
-            }
-            if (arcno2 >= 0) {
-                rep._m_arcno_max = arcno2;
-            }
-        }
-        
-        CGAL::Comparison_result cmp = _same_arc_compare_xy(p1,p2);
-        if (cmp == CGAL::LARGER) {
-            std::swap(rep._m_min, rep._m_max);
-            std::swap(rep._m_arcno_min, rep._m_arcno_max);
-        }
-        /* no need to recompute location since they are set during 
-           construction of respective curve ends */
-        rep._m_is_vertical = this->ptr()->_m_is_vertical;
-	rep._m_left_to_right = this->ptr()->_m_left_to_right;
-        
-	rep._m_interval_id = boost::none;
-	rep._m_boundary_in_interval = boost::none;
-        
-        return std::make_pair(Kernel_arc_2(rep), cmp);
-    }
-   
-    /*!\brief
-     * Simplifies representation of the arc !! DEPRECATED FUNCTION !!
-     * 
-     * Given a decomposition of the arcs's supporting curve into a pair of two 
-     * curves \c cpa_2, we search for a curve this arc lies on and reset arc's
-     * supporting curve and arcnos appropriately.
-     *
-     * \param cpa_2 analysis of curve pair that should be used 
-     *              in simplification
-     * \pre \c cpa_2 must correspond to a decomposition of this arc's 
-     * supporting curve
-     */
-    void _simplify_by(const Curve_pair_analysis_2& cpa_2) const {
-
-        typedef typename Curve_analysis_2::Polynomial_2 Polynomial_2;
-        Polynomial_2 f = curve().polynomial_2();
-        CGAL_precondition_code(
-             Polynomial_2 mult = cpa_2.curve_analysis(0).polynomial_2() *
-                    cpa_2.curve_analysis(1).polynomial_2();
-             typename CGAL::Polynomial_traits_d<Polynomial_2>::Total_degree
-                deg;
-        );
-        // common parts and full parts
-        CGAL_precondition(CGAL::resultant(mult, f).degree() < 1);
-        CGAL_precondition(mult.degree() == f.degree());
-        CGAL_precondition(deg(mult) == deg(f));
-        
-        Coordinate_1 x0;
-        if(is_vertical()) {
-            // processing vertical arcs: search for supporting curve which has 
-            // vertical line at this x0 (must be exactly 1 curve)
-            x0 = _minpoint().x();
-            Curve_analysis_2 ca_2(cpa_2.curve_analysis(0));
-            if(ca_2.status_line_for_x(x0).covers_line())
-                this->ptr()->_m_support = ca_2;
-            else {
-                ca_2 = cpa_2.curve_analysis(1);
-                CGAL_assertion(ca_2.status_line_for_x(x0).covers_line());
-                this->ptr()->_m_support = ca_2;
-            }
-            return;
-        }
-        
-        // processing non-vertical arcs
-        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
-        std::pair<int, int> ipair;
-        // preserve original supporting curve
-        Curve_analysis_2 orig_curve(curve());
-        
-        // TODO do we mean location of is_finite?
-        bool inf1_x = (_minpoint().location() == CGAL::ARR_LEFT_BOUNDARY);
-        bool curve_idx;  
-        if(!inf1_x) {
-            x0 = _minpoint().x(); 
-            cpv_line = cpa_2.status_line_for_x(x0, CGAL::POSITIVE);
-        } else 
-            cpv_line = cpa_2.status_line_of_interval(0);
-        
-        CGAL_precondition_code(
-            typename Curve_analysis_2::Status_line_1
-                cv_line = (inf1_x ? orig_curve.status_line_of_interval(0) :
-                        orig_curve.status_line_for_x(x0, CGAL::POSITIVE));
-        );
-        CGAL_precondition(cpv_line.number_of_events() == 
-            cv_line.number_of_events());
-          
-        { // search for new supporting curve and new arcno
-            // since supporting curve was decomposed in two parts, arcno
-            // represents y-position here
-            ipair = cpv_line.curves_at_event(arcno());
-            // this must be 1-curve event 
-            CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
-            this->ptr()->_m_arcno = (ipair.first != -1 ? ipair.first :
-                ipair.second);
-            curve_idx = (ipair.first == -1);
-            this->ptr()->_m_support = cpa_2.curve_analysis(curve_idx);
-        }
-        // search for source arcno
-        /////////////// ATTENTION: this only holds for 2D plane topology !!
-        ///////////////////////////////////////////////////////////////////
-        // TODO do we mean location of is_finite?
-        if(_minpoint().location() == CGAL::ARR_INTERIOR)  {
-            
-            cpv_line = cpa_2.status_line_for_x(x0);
-            CGAL_precondition(cpv_line.number_of_events() == 
-                    orig_curve.status_line_for_x(x0).number_of_events());
-            ipair = cpv_line.curves_at_event(this->ptr()->_m_arcno_min);
-            if(ipair.first != -1 && ipair.second != -1) 
-                // choose simpler supporting curve
-
-              this->ptr()->_m_arcno_min = ((curve_idx) ?
-                                           ipair.second : ipair.first);
-            else {
-                CGAL_assertion(ipair.first != -1||ipair.second != -1);
-                this->ptr()->_m_arcno_min = (ipair.first != -1 ?
-                    ipair.first : ipair.second);
-            }
-        } else // for infinite curve end arcno equals to interior arcno
-            this->ptr()->_m_arcno_min = arcno();
-         
-        // search for new target arcno
-        /////////////// ATTENTION: this only holds for 2D plane topology !!
-        ///////////////////////////////////////////////////////////////////
-        // TODO do we mean location of is_finite?
-        if(_maxpoint().location() == CGAL::ARR_INTERIOR) {
-            
-            x0 = _maxpoint().x(); 
-            cpv_line = cpa_2.status_line_for_x(x0);
-            CGAL_precondition(cpv_line.number_of_events() == 
-                    orig_curve.status_line_for_x(x0).number_of_events());
-                    
-            ipair = cpv_line.curves_at_event(this->ptr()->_m_arcno_max);
-            if(ipair.first != -1 && ipair.second != -1) 
-                // choose simpler supporting curve (the one which matches
-                //  interior arcno)
-                this->ptr()->_m_arcno_max = (curve_idx ?
-                    ipair.second : ipair.first);
-            else {
-                CGAL_assertion(ipair.first != -1||ipair.second != -1);
-                this->ptr()->_m_arcno_max = (ipair.first != -1 ?
-                    ipair.first : ipair.second);
-            }
-        } else // for infinite curve end arcno equals to interior arcno
-            this->ptr()->_m_arcno_max = arcno();
-
-        // invalidate curve-specific data
-        this->ptr()->_m_interval_id = boost::none;
-        this->ptr()->_m_boundary_in_interval = boost::none;
-    }
-    //!@}
-
-protected:
-    //!\name Protected intersection methods
-    //!@{
-
-    /*!\brief 
-     * returns \c true if the two arcs \c *this and \c cv2 overlap, 
-     * overlapping part(s) are inserted to the output iterator \c oi
-     * (of type \c Kernel_arc_2 ); if no overlapping parts found - 
-     * returns \c false
-     * 
-     * \param cv2 The second arc
-     * \param oi Report overlapping parts to this output iterator
-     * \return \c true, if there was an overlap, \c false otherwise
-     */
-    template < class OutputIterator >
-    bool _trim_if_overlapped(const Kernel_arc_2& cv2, OutputIterator oi) const
-    {
-               
-        CKvA_CERR("\n_trim_if_overlapped: this: " 
-             << *dynamic_cast< const Kernel_arc_2*>(this) << "; and " 
-             << cv2 << "\n");
-        // one arc is vertical and the other one is not, or x-ranges are not
-        // overlapping => quit
-        if (is_vertical() != cv2.is_vertical()) {
-            return false;
-        }
-
-        if (is_vertical()) { // here process vertical case
-            // check for x-coordinates equality
-            if (Curved_kernel_via_analysis_2::instance().
-                compare_x_2_object()(
-                    _minpoint(),
-                    cv2._minpoint()) != CGAL::EQUAL) {
-                return false;
-            }
-            Kernel_arc_2::simplify(
-                    *dynamic_cast< const Kernel_arc_2*>(this), cv2
-            );
-            // coprime support => no overlaps
-            if(!curve().is_identical(cv2.curve())) 
-                return false;
-                
-            // LARGER source and smaller target
-            Point_2 src = (_same_arc_compare_xy(_minpoint(), cv2._minpoint(),
-                 true) == CGAL::LARGER ? _minpoint() : cv2._minpoint()),
-                    tgt = (_same_arc_compare_xy(_maxpoint(), cv2._maxpoint(), 
-                 true)  == CGAL::SMALLER ? _maxpoint() : cv2._maxpoint());
-            // vertical arcs do not overlap     
-            if(_same_arc_compare_xy(src, tgt, true) != CGAL::SMALLER)
-                return false;
-            // construct a common part
-            *oi++ = (_replace_endpoints(src, tgt, -1, -1).first);
-            return true;
-        }
-        // ask for joint x-range of two arcs 
-        // (LARGER source & smaller target curve ends)
-        Point_2 src, tgt;
-        if (!_joint_x_range(cv2, src, tgt)) {
-            return false;
-        }
-        
-        if (curve().is_identical(cv2.curve())) {
-            if(arcno() != cv2.arcno()) // arcnos are not equal => no overlaps
-                return false;
-            int a_min = (src.is_on_left_right() ? -1 : arcno(src.x())),
-                a_max = (tgt.is_on_left_right() ? -1 : arcno(tgt.x()));
-            // construct a common  part
-            *oi++ = _replace_endpoints(src, tgt, a_min, a_max).first;
-            return true;
-        }
-        
-        // we are left with two non-vertical arcs whose supporting curves
-        // are different => look for overlapping parts of the curves
-        typedef std::vector<std::pair<Curve_analysis_2, int> >
-            Curve_arcno_container;
-        typedef std::vector<Curve_analysis_2> Curve_container;
-        Curve_container parts_f, parts_g, common;
-                                
-        if (!Curved_kernel_via_analysis_2::instance().
-            kernel().decompose_2_object()(
-                    curve(), cv2.curve(), 
-                    std::back_inserter(parts_f), 
-                    std::back_inserter(parts_g),
-                    std::back_inserter(common))) {
-            return false; // supporting curves are coprime => quit
-        }
-        Coordinate_1 x0;
-        bool yes = false, inf_x = src.is_on_left_right();
-        if(!inf_x) // choose a target x-coordinate from the joint x-range
-            x0 = src.x(); 
-        std::pair<int, int> ipair;
-        Curve_pair_analysis_2 cpa_2;
-        Curve_arcno_container found, overlaps;
-        
-        CKvA_CERR("_trim_if_overlapped: non-coprime supporting curves\n");
-        
-        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
-        // iterate to find all overlapping parts
-        typename Curve_container::const_iterator it_parts, it_com;
-        for (it_com = common.begin(); it_com != common.end(); it_com++) {
-            for(it_parts = parts_f.begin(); it_parts != parts_f.end(); 
-                    it_parts++) {
-               
-                cpa_2 = Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (*it_com, *it_parts);
-                cpv_line = (inf_x ? cpa_2.status_line_of_interval(0) :
-                    cpa_2.status_line_for_x(x0, CGAL::POSITIVE));
-                // no intersections at this curve pair => skip it
-                if(arcno() >= cpv_line.number_of_events())
-                    continue; 
-                ipair = cpv_line.curves_at_event(arcno(),*it_com,*it_parts);
-                // this must be 1-curve event: is this true ???
-                CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
-                if(ipair.first != -1) // lies on a common part
-                    found.push_back(std::make_pair(*it_com, ipair.first));
-            }
-        }
-        
-        // now iterate over all "suspicious" common parts to find real overlaps
-        typename Curve_arcno_container::const_iterator it_found;
-        for (it_found = found.begin(); it_found != found.end(); it_found++) {
-            for (it_parts = parts_g.begin(); it_parts != parts_g.end();
-                 it_parts++) {
-                
-                cpa_2 = Curved_kernel_via_analysis_2::instance().
-                        kernel().construct_curve_pair_2_object()
-                            (it_found->first, *it_parts);
-                    
-                cpv_line = (inf_x ? cpa_2.status_line_of_interval(0) :
-                    cpa_2.status_line_for_x(x0, CGAL::POSITIVE));
-                // no intersections at this curve pair => skip it
-                if(cv2.arcno() >= cpv_line.number_of_events())
-                    continue; 
-                ipair = cpv_line.curves_at_event(cv2.arcno(),
-                                                 it_found->first,
-                                                 *it_parts);
-                // this must be 1-curve event: is this true ???
-                CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
-                if(ipair.first == -1 || ipair.first == it_found->second) 
-                    continue;
-                // lies on a common part and arcnos are the same: VUALA!!!
-                // here we need to "clip" [src.x(), tgt.x()] w.r.t. the
-                // defining x-range of a common part *it_found.. how ?
-                yes = true; // we've got it!                   
-                // now construct a common arc    
-                Rep rep(*(this->ptr()));
-                rep._m_min = src;
-                rep._m_max = tgt;
-                rep._m_support = it_found->first;
-                rep._m_arcno = it_found->second;
-                rep._m_arcno_min = rep._m_arcno_max = rep._m_arcno;
-                
-                if(!inf_x) {
-                    int a = arcno(src.x());
-                    if(a != arcno()) {
-                        cpv_line = cpa_2.status_line_for_x(src.x());
-                        ipair = cpv_line.curves_at_event(a,
-                                                         it_found->first,
-                                                         *it_parts);
-                        // should ultimately lie on the common curve ?
-                        CGAL_assertion(ipair.first != -1);
-                        rep._m_arcno_min = ipair.first;
-                    }
-                }
-                if(!tgt.is_on_left_right()) {
-                    int a = arcno(tgt.x());
-                    if(a != arcno()) {
-                        cpv_line = cpa_2.status_line_for_x(tgt.x());
-                        ipair = cpv_line.curves_at_event(a,
-                                                         it_found->first,
-                                                         *it_parts);
-                        // should ultimately lie on the common curve ?
-                        CGAL_assertion(ipair.first != -1);
-                        rep._m_arcno_max = ipair.first;
-                    }
-                }
-                *oi++ = Kernel_arc_2(rep);
-            }      
-        }  
-        return yes;
-    }
-    
-    /*!\brief
-     * computes zero-dimensional intersections of \c cv1 with \c cv2. 
-     * 
-     * Intersection points 
-     * are inserted to the output iterator \c oi as objects of type 
-     * <tt>std::pair<Point_2, unsigned int></tt> (intersection point +
-     * multiplicity)
-     * 
-     * \param cv1 the first arc
-     * \param cv2 the second arc
-     * \param oi reporting zero-dimensional intersections through this output
-     *        iterator
-     * \pre !cv1.do_overlap()
-     */
-    template < class OutputIterator >
-    static OutputIterator _intersection_points(
-            const Kernel_arc_2& cv1, const Kernel_arc_2& cv2, 
-            OutputIterator oi) {
-        
-        // handle a special case when two arcs are supported by the same 
-        // curve => only end-point intersections
-        
-        CKvA_CERR("\nintersection_points\n");
-        Kernel_arc_2::simplify(cv1, cv2);
-        if (cv1.curve().is_identical(cv2.curve())) {
-            return _intersect_at_endpoints(cv1, cv2, oi);
-        }
-
-        // else general case: distinct supporting curves
-        return _intersect_coprime_support(cv1, cv2, oi);
-    }
-
-    /*!\brief
-     * computes intersection of two arcs meeting only at their curve ends.
-     * 
-     * Intersection points are returned in the output interator \c oi as object
-     * of type std::pair<Point_2, int> (intersection + multiplicity)
-     * 
-     * \param cv1 the first arc
-     * \param cv2 the second arc
-     * \param oi reporting zero-dimensional intersections through this output
-     *        iterator
-     * 
-     */
-    template < class OutputIterator >
-    static OutputIterator _intersect_at_endpoints(const Kernel_arc_2& cv1,
-                                                  const Kernel_arc_2& cv2, 
-                                                  OutputIterator oi) {
-        
-        CKvA_CERR("\n_intersect_at_endpoints\n");
-
-        CGAL_precondition(!cv1.do_overlap(cv2));
-        /* Since *this and cv2 do not overlap and cannot contain singularities
-         * in the interior, the only remaining candidates for intersections are
-         * their finite endpoints (if any), for vertical arcs as well.
-         */
-        /*CGAL::Bound_type bnd_x, bnd_y, 
-            bnd1_x = cv2.boundary_in_x(CGAL::ARR_MIN_END),
-            bnd1_y = cv2.boundary_in_y(CGAL::ARR_MIN_END),
-            bnd2_x = cv2.boundary_in_x(CGAL::ARR_MAX_END),
-            bnd2_y = cv2.boundary_in_y(CGAL::ARR_MAX_END);*/
-                
-        // TODO do we mean location of is_finite?
-        bool f2_min = (cv2._minpoint().location() == CGAL::ARR_INTERIOR),
-             f2_max = (cv2._maxpoint().location() == CGAL::ARR_INTERIOR);
-        if(!(f2_min || f2_max)) // neither of curve ends is finite => 
-            return oi;          // no intersections
-            
-        Point_2 pt;
-        
-        CGAL::Arr_curve_end end = CGAL::ARR_MIN_END;
-        
-        while(1) {
-            CGAL::Arr_parameter_space loc = cv1.location(end);
-            //bnd_x = boundary_in_x(end), bnd_y = boundary_in_y(end);
-            if(loc != CGAL::ARR_INTERIOR) 
-                goto Lendloop;
-            pt = cv1.curve_end(end);
-            // easy case: intersection at singularity doesn't require to
-            // compare x/y-coordinates
-            /*if(is_singular(bnd_x)) { 
-                if(bnd1_x == bnd_x || bnd2_x == bnd_x) 
-                    *oi++ = std::make_pair(pt, 0); 
-                    
-            } else if(is_singular(bnd_y)) { 
-                if(bnd1_y == bnd_y || bnd2_y == bnd_y) 
-                    *oi++ = std::make_pair(pt, 0); 
-                    
-            } else if(is_on_disc(bnd_x)) {
-    
-    // CONFUSION: if bndx != bnd1_x should we compare ys at -oo
-    // or at +oo ? or is this true for discontinuity:
-    // 0th interval == the last interval ? (i.e. intervals are mirrored ?)
-    // what if both conditions are satisfied at a time ? duplicates ?
-                if(bnd1_x == CGAL::AFTER_DISCONTINUITY &&
-                    _compare_arc_numbers(cv2, bnd1_x) == CGAL::EQUAL)
-                    *oi++ = std::make_pair(pt, 0); 
-                    
-                if(bnd2_x == CGAL::BEFORE_DISCONTINUITY &&
-                    _compare_arc_numbers(cv2, bnd2_x) == CGAL::EQUAL)
-                    *oi++ = std::make_pair(pt, 0); 
-                    
-            } else if(is_on_disc(bnd_y)) {
-                  // disc in y: compare only x-coordinates !
-    // what if both conditions are satisfied at a time ? duplicates ?
-    
-                if(bnd1_y == CGAL::AFTER_DISCONTINUITY &&
-                    kernel_2.compare_1_object()(pt.x(), _minpoint().x()) ==
-                        CGAL::EQUAL)
-                    *oi++ = std::make_pair(pt, 0);
-                    
-                if(bnd2_y == CGAL::BEFORE_DISCONTINUITY &&
-                    kernel_2.compare_1_object()(pt.x(), _maxpoint().x()) ==
-                        CGAL::EQUAL)
-                    *oi++ = std::make_pair(pt, 0);    
-              // ordinar normal case:      
-              // selection is exclusive since arcs cannot intersect twice
-              // at the same finite end-point
-              } else*/ if((f2_min && pt == cv2._minpoint()) ||
-                          (f2_max && pt == cv2._maxpoint())) {
-                  *oi++ = std::make_pair(pt, 0); 
-              }
-        Lendloop:
-            if (end == CGAL::ARR_MAX_END) {
-                break;
-            }
-            end = CGAL::ARR_MAX_END; 
-        }
-        return oi;
-    }
-    
-    /*!\brief 
-     * computes a joint x-range of two arcs and returns \c true 
-     * if arcs' x-ranges overlap; otherwise returns \c false
-     *
-     * \param cv2 The second arc
-     * \param pt_low Output: Point indicating the lower bound of the the joint
-     *        x-range
-     * \param pt_high Output: Point indicating the upper bound of the the joint
-     *        x-range
-     * \return \c true, if arcs overlap, \c false otherwise
-     *
-     * \pre both arcs are not vertical
-     */
-    bool _joint_x_range(const Kernel_arc_2& cv2, Point_2& pt_low, 
-                        Point_2& pt_high) const {
-        
-        CKvA_CERR("\n_joint_x_range\n");
-        
-        CGAL_precondition(!is_vertical());
-        CGAL_precondition(!cv2.is_vertical());
-        
-        Point_2 pt1 = _minpoint(), pt2 = cv2._minpoint();
-        Point_2 low = pt2, high;
-        // find intersection x-range: larger source & smaller target
-        if (pt1.location() != CGAL::ARR_LEFT_BOUNDARY) {
-            if (pt2.location() != CGAL::ARR_LEFT_BOUNDARY) {
-                low = (Curved_kernel_via_analysis_2::instance().
-                       compare_x_2_object()(pt1, pt2) == 
-                       CGAL::LARGER ? pt1 : pt2); 
-            } else {
-                low = pt1;
-            }
-        } 
-        pt1 = _maxpoint(), pt2 = cv2._maxpoint(), high = pt2;
-        if (pt1.location() != CGAL::ARR_RIGHT_BOUNDARY) {
-            if(pt2.location() != CGAL::ARR_RIGHT_BOUNDARY) {
-                high = (Curved_kernel_via_analysis_2::instance().
-                        compare_x_2_object()(pt1, pt2) == 
-                        CGAL::SMALLER ? pt1 : pt2);
-            } else {
-                high = pt1;
-            }
-        } 
-        if (!low.is_on_left_right() && !high.is_on_left_right() &&
-            Curved_kernel_via_analysis_2::instance().
-            compare_x_2_object()(low, high) != 
-            CGAL::SMALLER) {// disjoint x-ranges 
-            return false;
-        }
-        pt_low = low;
-        pt_high = high;
-
-        return true;
-    }
-    
-    /*!\brief
-     * computes zero-dimensional 
-     * intersections of two arcs having coprime supporting curves
-     * 
-     * intersection points are inserted to the output iterator \c oi as objects
-     * of type <tt>std::pair<Point_2, unsigned int></tt> (intersection point + 
-     * multiplicity)
-     *
-     * \param cv1 the first arc
-     * \param cv2 the second arc
-     * \param oi reporting zero-dimensional intersections through this output
-     *        iterator
-     */
-    template <class OutputIterator>
-    static OutputIterator _intersect_coprime_support(const Kernel_arc_2& cv1, 
-                                                     const Kernel_arc_2& cv2,
-                                                     OutputIterator oi) {
-        // vertical arcs: the interesting case is when only one of the arcs is 
-        // vertical - otherwise there is no intersection (different x-coords),
-        // or they overlap (not allowed), or they touch at the end-points 
-        // (already tested)
-        
-        CKvA_CERR("\n_intersect_coprime_support: " << cv1 <<
-            " and " << cv2 << "\n");
-        
-        if (cv1.is_vertical() || cv2.is_vertical()) {
-            CGAL_assertion(cv1.is_vertical() != cv2.is_vertical());
-            // due to coprimality condition, supporting curves are different =>
-            // they have no common vertical line therefore there is no 
-            // intersection
-            const Kernel_arc_2& vert = (cv1.is_vertical() ? cv1 : cv2),
-                nonvert = (cv1.is_vertical() ? cv2 : cv1);
-            Coordinate_1 x = vert._minpoint().x();
-            // vertical arc does not lie within another arc's x-range => no
-            // intersections
-            if (!nonvert.is_in_x_range(x)) {
-                return oi;    
-            }
-            typename Curved_kernel_via_analysis_2:: Construct_point_on_arc_2
-                construct_point_on_arc = 
-                Curved_kernel_via_analysis_2::instance().
-                construct_point_on_arc_2_object();
-            
-
-            Point_2 xy = construct_point_on_arc(
-                    x, nonvert.curve(), nonvert.arcno(x), nonvert
-            );
-            if (vert.compare_y_at_x(xy) == CGAL::EQUAL) {
-                *oi++ = std::make_pair(xy, 1);
-            }
-            return oi;
-        }
-        
-        Point_2 low_x, high_x;
-        // x-ranges are disjoint => nothing to do
-        if (!cv1._joint_x_range(cv2, low_x, high_x)) {
-            return oi;
-        }
-        bool inf_low = low_x.is_on_left_right(),
-            inf_high = high_x.is_on_left_right();
-        Curve_analysis_2 f = cv1.curve(), g = cv2.curve();
-        Curve_pair_analysis_2 cpa_2 =
-            Curved_kernel_via_analysis_2::instance().
-                kernel().construct_curve_pair_2_object()(f, g);
-        int low_idx = 0,       
-            high_idx = cpa_2.number_of_status_lines_with_event()-1;
-
-	bool index_at_event_min=false;
-	bool index_at_event_max=false;
-
-        typename Curve_pair_analysis_2::Status_line_1 line;
-        if(!inf_low) {
-            line = cpa_2.status_line_for_x(low_x.x());
-            low_idx = line.index();
-	    index_at_event_min=line.is_event();
-            if(index_at_event_min) {
-                if((cv1._minpoint().is_on_bottom_top() &&
-                    low_x.x() == cv1._minpoint().x()) ||
-                   (cv2._minpoint().is_on_bottom_top() &&
-                    low_x.x() == cv2._minpoint().x())) {
-                 // hack: no intersection with asymptotic end
-		  low_idx++;
-		  index_at_event_min=false;
-		}
-            }
-        }
-                   
-        if(!inf_high) {
-            line = cpa_2.status_line_for_x(high_x.x());
-            high_idx = line.index();
-	    index_at_event_max=line.is_event();
-            if(!index_at_event_max) {
-	      high_idx--;
-	    } else if((cv1._maxpoint().is_on_bottom_top() &&
-                high_x.x() == cv1._maxpoint().x()) ||
-                (cv2._maxpoint().is_on_bottom_top() &&
-		 high_x.x() == cv2._maxpoint().x())) {
-	      // hack: no intersection with asymptotic end
-	      high_idx--;
-	      index_at_event_max=false;
-	    }
-        }
-                
-        // run over all event points within the joint x-range of two arcs 
-        // looking whether a particular event is made of both curves, i.e.,
-        // grabbing all 2-curve events
-        std::pair<int, int> ipair;
-        int arcno1, arcno2, mult;
-
-        typename CGAL::Polynomial_traits_d<
-            typename Curve_kernel_2::Polynomial_2>::Total_degree deg;
-        
-        bool which_curve = (deg(f.polynomial_2()) < deg(g.polynomial_2()));
-        for(int i = low_idx; i <= high_idx; i++) {
-            typename Curve_pair_analysis_2::Status_line_1 tmp = 
-                cpa_2.status_line_at_event(i);
-            if(!tmp.is_intersection()) 
-                continue;
-
-            Coordinate_1 x0 = tmp.x();
-            if((i == low_idx && index_at_event_min) || 
-	       (i == high_idx && index_at_event_max)) {
-                arcno1 = cv1.arcno(x0);
-                arcno2 = cv2.arcno(x0);
-                mult = 0; // intersection at end-point 
-            } else {
-                arcno1 = cv1.arcno();
-                arcno2 = cv2.arcno();
-                mult = -1; // need to compute
-            }
-            
-            int pos = tmp.event_of_curve(arcno1, f);
-            if (pos != tmp.event_of_curve(arcno2, g)) {
-                continue;
-            }
-            if (mult == -1) {
-                mult = tmp.multiplicity_of_intersection(pos);
-            }
-            
-            // pick up the curve with lower degree   
-            typename Curved_kernel_via_analysis_2::Construct_point_on_arc_2
-                construct_point_on_arc = 
-                Curved_kernel_via_analysis_2::instance().
-                construct_point_on_arc_2_object();
-            
-            if (which_curve) {
-                Point_2 p = construct_point_on_arc(
-                        x0, cv1.curve(), arcno1, cv1
-                );
-                *oi++ = std::make_pair(p, mult);
-            } else {
-                Point_2 p = construct_point_on_arc(
-                        x0, cv2.curve(), arcno2, cv2
-                );
-                *oi++ = std::make_pair(p, mult);
-            }
-        }
-        return oi;
-    }
-    
-    #undef CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC
-    //!@}
-
-  
-    //!\name Approximation
-    //!@{
-
-private:
-  
-  std::pair<double,double> y_interval_for_curve_end(
-      const Arc_2& arc,
-      CGAL::Arr_curve_end end,
-      long prec) 
-    const {
-    
-    double PINF = std::numeric_limits<double>::infinity();
-    double MINF = -PINF;
-    
-    std::pair< Bound, Bound > y_approx;
-    
-    switch (this->location(end)) {
-      
-    case (CGAL::ARR_TOP_BOUNDARY): {
-      return std::make_pair(PINF, PINF); // early exit
-    }
-    case (CGAL::ARR_BOTTOM_BOUNDARY): {
-      return std::make_pair(MINF, MINF); // early exit
-    }
-    case(CGAL::ARR_LEFT_BOUNDARY): 
-    case(CGAL::ARR_RIGHT_BOUNDARY): {
-      
-      CGAL::Object obj = this->curve().asymptotic_value_of_arc(
-          this->location(end), this->arcno()
-      );
-      
-      CGAL::Arr_parameter_space ps;
-      Coordinate_1 asym_info;
-      
-      if (CGAL::assign(ps, obj)) {
-        if (ps == CGAL::ARR_BOTTOM_BOUNDARY) {
-          return std::make_pair(MINF, MINF); // early exit
-        } else {
-          CGAL_assertion(ps == CGAL::ARR_TOP_BOUNDARY);
-          return std::make_pair(PINF, PINF); // early exit
-        }
-        
-      } else {
-        
-        CGAL_assertion_code(bool check =) 
-          CGAL::assign(asym_info, obj);
-        CGAL_assertion(check);
-
-        y_approx = Curved_kernel_via_analysis_2::instance().
-          kernel().approximate_absolute_1_object()(asym_info, prec);
-      }
-      break;
-    }
-    case (CGAL::ARR_INTERIOR): {
-      
-      y_approx = 
-        Curved_kernel_via_analysis_2::instance().
-        kernel().approximate_absolute_y_2_object()(
-            arc.curve_end(end).xy(), prec
-        );
-      
-    }
-    } // switch
-    
-    return std::make_pair(CGAL::to_double(y_approx.first),
-                          CGAL::to_double(y_approx.second));
-  }
-  
-public:
-
-    /*!\brief 
-     * bbounding box for arc
-     */
-    CGAL::Bbox_2 bbox() const {
-      if (!this->ptr()->_m_bbox) {
-        
-        double PINF = std::numeric_limits<double>::infinity();
-        double MINF = -PINF;
-        
-        double xmin;
-        double xmax;
-
-        double ymin = PINF; // correct as we modify shrink below
-        double ymax = MINF; // correct as we modify shrink below
-
-        // TODO choose precision
-        long prec = 53;
-
-        std::pair< double, double > y_dapprox;
-
-        // left end
-
-        // xmin for left
-        if (this->location(CGAL::ARR_MIN_END) == CGAL::ARR_INTERIOR ||
-            this->location(CGAL::ARR_MIN_END) == CGAL::ARR_BOTTOM_BOUNDARY ||
-            this->location(CGAL::ARR_MIN_END) == CGAL::ARR_TOP_BOUNDARY) {
-          
-          std::pair< Bound, Bound > x_approx = 
-            Curved_kernel_via_analysis_2::instance().
-            kernel().approximate_absolute_1_object()(
-                this->curve_end_x(CGAL::ARR_MIN_END), prec
-            );
-          
-          xmin = CGAL::to_double(x_approx.first);
-          
-        } else {
-        
-          // left end can only lie on LEFT BOUNDARY
-          xmin = MINF;
-          
-        }
-        
-        // ymin/ymax for left
-        y_dapprox = y_interval_for_curve_end(*this, CGAL::ARR_MIN_END, prec);
-        
-        // adapt y-interval
-        ymin = CGAL::min(ymin, y_dapprox.first);
-        ymax = CGAL::max(ymax, y_dapprox.second);
-        
-        // right end
-
-        // xmax for right
-        if (this->location(CGAL::ARR_MAX_END) == CGAL::ARR_INTERIOR ||
-            this->location(CGAL::ARR_MAX_END) == CGAL::ARR_BOTTOM_BOUNDARY ||
-            this->location(CGAL::ARR_MAX_END) == CGAL::ARR_TOP_BOUNDARY) {
-          
-          std::pair< Bound, Bound > x_approx = 
-            Curved_kernel_via_analysis_2::instance().
-            kernel().approximate_absolute_1_object()(
-                this->curve_end_x(CGAL::ARR_MAX_END), prec
-            );
-          
-          xmax = CGAL::to_double(x_approx.second);
-          
-        } else {
-        
-          // right end can only lie on RIGHT BOUNDARY
-          xmax = PINF;
-          
-        }
-        
-        // ymin/ymax for right
-        y_dapprox = y_interval_for_curve_end(*this, CGAL::ARR_MAX_END, prec);
-        
-        // adapt y-interval
-        ymin = CGAL::min(ymin, y_dapprox.first);
-        ymax = CGAL::max(ymax, y_dapprox.second);
-        
-        // search local extrema on a non-vertical arc
-        
-        if (!this->is_vertical()) {
-
-          // TODO remove algebraic notation (Mult, Solve_2)
-          
-          typedef typename Curve_kernel_2::Multiplicity_type Multiplicity_type;
-
-          std::vector< std::pair< Coordinate_2, Multiplicity_type > > pts;
-
-          // TODO can this->curve()->polynomial be not squarefree?
-          Curved_kernel_via_analysis_2::instance().
-            kernel().solve_2_object()(
-                this->curve(),
-                Curved_kernel_via_analysis_2::instance().
-                kernel().construct_curve_2_object()(
-                    CGAL::differentiate(this->curve().polynomial_2(),0)
-                    // ^^ f_x
-                ),
-                std::back_inserter(pts)
-            );
-          
-          int n = static_cast<int>(pts.size());
-          CKvA_CERR("check candidates for y-extremal points: #" << n );
-          for (int i = 0; i < n; i++) {
-            
-            const Coordinate_2& curr_xy = pts[i].first; 
-
-
-#if 0
-            // EBEB: Disabled this test as curr_xy's curve 
-            //       is not guaranteed to be wrt this->curve()
-            
-            CKvA_CERR("check if arcnos match: " << 
-                 curr_xy << "; arc = " << *this << "\n\n"); 
-            // this is the simpler test, thus we evaluate it first
-            if (this->arcno() == curr_xy.arcno()) {
-              CKvA_CERR("check if x-coordinate lies in interior: " << 
-                   curr_xy << "; arc = " << *this << "\n\n");
-              // this is the more sophisticated test, thus second
-              if (this->is_in_x_range_interior(curr_xy.x())) {
-                CKvA_CERR("update y coordinates");
-                
-                std::pair< Bound, Bound > xy_approx = 
-                  Curved_kernel_via_analysis_2::instance().
-                  kernel().approximate_absolute_y_2_object()
-                  (curr_xy, prec);
-                
-                // adapt y-interval
-                ymin = CGAL::min(ymin, 
-                                 CGAL::to_double(xy_approx.first));
-                ymax = CGAL::max(ymax, 
-                                 CGAL::to_double(xy_approx.second));
-              }
-            }
-#else
-            // this is the more sophisticated test, thus second
-            if (this->is_in_x_range_interior(curr_xy.x())) {
-              // TODO replace with is_on
-              Point_2 curr_pt = 
-                Curved_kernel_via_analysis_2::instance().
-                construct_point_2_object()(curr_xy.x(), 
-                                           curr_xy.curve(),
-                                           curr_xy.arcno());
-              if (this->compare_y_at_x(curr_pt) == CGAL::EQUAL) {
-                
-                CKvA_CERR("update y coordinates");
-                
-                std::pair< Bound, Bound > xy_approx = 
-                  Curved_kernel_via_analysis_2::instance().
-                  kernel().approximate_absolute_y_2_object()
-                  (curr_xy, prec);
-                
-                // adapt y-interval
-                ymin = CGAL::min(ymin, 
-                                 CGAL::to_double(xy_approx.first));
-                ymax = CGAL::max(ymax, 
-                                 CGAL::to_double(xy_approx.second));
-              }
-            }
-#endif
-          }
-        }
-        this->ptr()->_m_bbox = CGAL::Bbox_2(xmin, ymin, xmax, ymax);
-      }
-
-      return *(this->ptr()->_m_bbox);
-    }
-  
-    //!}
-
-
-public:
-    //!\name IO
-    //!@{
-    
-    /*!\brief
-     * output operator
-     *
-     * write arc to \c os
-     */
-    void write(std::ostream& os) const {
-
-        switch (::CGAL::get_mode(os)) {
-        case ::CGAL::IO::PRETTY:
-            os << "arc@" << this->id() << "[(sup@" << this->curve().id();
-            if (this->is_vertical()) {
-              os << ", VERTICAL at x = "
-                 << CGAL::to_double(curve_end_x(ARR_MAX_END)) ;
-            } else {
-                os << ", ARCNO=" << this->arcno(CGAL::ARR_MIN_END)
-                   << "," << this->arcno()
-                   << "," << this->arcno(CGAL::ARR_MAX_END);
-            }
-            os << "; l2r: " << this->is_left_to_right() << "); \n";
-            os <<"min: " << this->_minpoint() << ";\n";
-            os << "max: " << this->_maxpoint() << "]";
-
-            break;
-
-        case ::CGAL::IO::BINARY:
-          std::cerr << "BINARY format not yet implemented" << std::endl;
-        break;
-        default:
-          // ASCII
-          os << "Arc_2(";
-          os << this->ptr()->_m_min;
-          os << ",";
-          os << this->ptr()->_m_max;
-          os << ",";
-          os << this->ptr()->_m_support;
-          os << ",";
-          os << this->ptr()->_m_arcno;
-          os << ",";
-          os << this->ptr()->_m_arcno_min;
-          os << ",";
-          os << this->ptr()->_m_arcno_max;
-          os << ",";
-          os << this->ptr()->_m_is_vertical;
-          os << ",";
-          os << this->ptr()->_m_left_to_right;
-          os << ")";
-        }
-    }
-
-
-    /*!\brief
-     * input operator
-     *
-     * read arc from \c is
-     */
-    void read(std::istream& is) {
-      
-      CGAL_precondition(CGAL::is_ascii(is));
-      
-      Rep rep;
-      
-      // read "Arc_2("
-      swallow(is, 'A');
-      swallow(is, 'r');
-      swallow(is, 'c');
-      swallow(is, '_');
-      swallow(is, '2');
-      swallow(is, '(');
-      
-      Point_2 min, max;
-
-      // read values
-      is >> rep._m_min;
-      swallow(is, ',');
-      is >> rep._m_max;
-      swallow(is, ',');
-      is >> rep._m_support;
-      swallow(is, ',');
-      is >> rep._m_arcno;
-      swallow(is, ',');
-      is >> rep._m_arcno_min;
-      swallow(is, ',');
-      is >> rep._m_arcno_max;
-      swallow(is, ',');
-      is >> rep._m_is_vertical;
-      swallow(is, ',');
-      is >> rep._m_left_to_right;
-
-      // read the ')'
-      swallow(is, ')');
-      
-      *this = Arc_2< Curved_kernel_via_analysis_2, Rep >(rep);
-    }
-  
-    //!@}
-
-    //! equality
-    inline
-    bool operator == (const Kernel_arc_2& arc2) const { 
-        return  is_equal(arc2);
-    }
-
-#if defined(_MSC_VER) || defined(__clang__)
-    // befriending the kernel point
-    friend typename Curved_kernel_via_analysis_2::Point_2;
-
-    // befriending the kernel arc
-    friend typename Curved_kernel_via_analysis_2::Arc_2;
-
-    // befriending the functors
-#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
-    friend typename Curved_kernel_via_analysis_2::Z; \
-    friend typename Curved_kernel_via_analysis_2_Functors:: \
-        Z<Curved_kernel_via_analysis_2>
-#else // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
-    // befriending the kernel point
-    //friend class Curved_kernel_via_analysis_2::Point_2;
-
-    // befriending the kernel arc
-    //friend class Curved_kernel_via_analysis_2::Arc_2;
-
-    // befriending the functors
-#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
-    friend class Curved_kernel_via_analysis_2_Functors:: \
-        Z<Curved_kernel_via_analysis_2>
-#endif // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
-
-  
-//Curved_kernel_via_analysis_2_functors<  
-  //              Curved_kernel_via_analysis_2> >; 
-
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_arc_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_vertical_2);
-
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_min_vertex_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_max_vertex_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_left_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_right_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_in_x_range_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Equal_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Do_overlap_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Intersect_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Trim_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Split_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Are_mergeable_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Merge_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_on_2);
-
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Parameter_space_in_x_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_near_boundary_2);
-
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Parameter_space_in_y_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_at_limit_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_near_limit_2);
-
-#undef CGAL_BEFRIEND_CKvA_2_FUNCTOR
-
-private:
-    
-    // type of CurveSweepTraits model
-    typedef CGAL::Sweep_curves_adapter_2< Curved_kernel_via_analysis_2 > SCA_2;
-    // befriend segment for Self::_intersection_points
-    friend class internal::Generic_arc_2<SCA_2>;
-    
-    /*
-    // befriend all functors
-#define CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Z) \
-    friend class CGAL::Sweep_curves_functors::Z< SCA_2 >; \
-
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_xy_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Less_xy_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_y_at_x_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Equal_y_at_x_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Multiplicity_of_intersection_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_y_right_of_point_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Source_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Target_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Construct_segment_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Is_degenerate_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Do_overlap_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(New_endpoints_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(New_endpoints_opposite_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Intersect_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Intersect_right_of_point_2)
-    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Make_x_monotone_2)
-
-    #undef CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR */
-
-}; // class Arc_2
-
-/*!\relates Arc_2
- * \brief 
- * output operator
- *
- * writes \c arc to \c os
- */
-template < class CurvedKernelViaAnalysis_2, class Rep_>
-inline
-std::ostream& operator<<(
-    std::ostream& os,
-    const Arc_2<CurvedKernelViaAnalysis_2, Rep_>& arc) {
-  
-  arc.write(os);
-  return os;
-}
-
-
-//! \brief Reads the objects from stream.
-template < class CurvedKernelViaAnalysis_2, class Rep_ >
-std::istream& operator>> (
-    std::istream& is, 
-    Arc_2< CurvedKernelViaAnalysis_2, Rep_ >& arc) {
-  
-  CGAL_precondition(CGAL::is_ascii(is));
-  
-  //typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-  //typedef Rep_ Rep;
-  
-  arc.read(is);
-
-  return is;
-}
-
-
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
-// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
deleted file mode 100644
index c834197..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
+++ /dev/null
@@ -1,339 +0,0 @@
-// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), 
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
-//                 Arno Eigenwillig <arno at mpi-inf.mpg.de>
-//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de> 
-//
-// ============================================================================
-
-#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
-#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
-
-/*!\file include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
- * \brief Defines \c Make_x_monotone_2 functor
- */
-
-#include <CGAL/config.h>
-#include <CGAL/Handle_with_policy.h>
-
-// TODO remove polynomial_traits
-#include <CGAL/Polynomial_traits_d.h>
-
-namespace CGAL {
-
-namespace internal {
-
-/*!\brief 
- * Splits a curve that can be analyzed 
- * into connected x-monotone sweepable arcs and isolated points.
- *
- * Arcs are stored as CurvedKernelViaAnalysis_2::Arc_2 objects, and
- * each is either vertical or consists of an x-monotone piece 
- * of constant arc number wrt to the curve at every interior x-coordinate.
- * Isolated points are stored as \c CurvedKernelViaAnalysis_2::Point_2 objects.
- * 
- * The resulting arcs and points are written to the output iterator as
- * polymorphic \c CGAL::Object. Past-the-end value of the iterator is returned.
- */
-template < class CurvedKernelViaAnalysis_2, 
-           class ConstructArc_2 = 
-           typename CurvedKernelViaAnalysis_2::Construct_arc_2 >
-struct Make_x_monotone_2 :
-    public std::binary_function< typename CurvedKernelViaAnalysis_2::Curve_2,
-            std::iterator<std::output_iterator_tag, CGAL::Object>,
-            std::iterator<std::output_iterator_tag, CGAL::Object> > {
-            
-    //!\name Public types
-    //!@{
-    
-    //! this instance's first template parameter
-    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-    
-    //! this instance's second template parameter
-    typedef ConstructArc_2 Construct_arc_2;
-
-    //! type of curve kernel
-    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
-    Curve_kernel_2;
-    
-    //! type of x-coordinate
-    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
-    
-    //! type of xy-coordinate
-    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
-    
-    //! type of curve analysis
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-    
-    //! type of vertical line
-    typedef typename Curve_analysis_2::Status_line_1 Status_line_1;
-    
-    //! type of point on curve
-    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
-    
-    //! type of curve arc
-    typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2;
-
-    //! type of not necessarily x-monotone curve arc
-    typedef typename Curved_kernel_via_analysis_2::Non_x_monotone_arc_2
-        Non_x_monotone_arc_2;
-    
-    //!@}
-
-    //!\name Constructors
-    //!@{
-
-    /*!\brief 
-     * Standard constructor
-     *
-     * \param kernel The kernel instance to use
-     */
-    Make_x_monotone_2(Curved_kernel_via_analysis_2 *kernel) :
-        _m_curved_kernel(kernel) {
-        CGAL_assertion(kernel != NULL);
-    }
-
-    //!@}
-
-    //!\name Functor invokation
-    //!@{
-
-    // TODO add operator for non-x-monotone arc
-    
-    /*!\brief
-     * Splits a curve into x-monotone arcs and isolated points
-     *
-     * \param curve The input curve
-     * \param oi Output iterator that stores CGAL::Object, which either
-     *           encapsulates Point_2 or Arc_2
-     * \return Past-the-end iterator of \c oi
-     */
-    template <class OutputIterator>
-    OutputIterator operator()(Curve_analysis_2 curve, OutputIterator oi) {
-
-        Construct_arc_2 construct_arc_2 = 
-            _m_curved_kernel->construct_arc_2_object();
-        // use CGAL::Total_degree ?
-        if (typename CGAL::Polynomial_traits_d< 
-            typename Curve_analysis_2::Polynomial_2 >::
-            Total_degree()(curve.polynomial_2()) < 1) {
-            return oi;
-        }
-        
-        Status_line_1 evt_line1, evt_line2,
-            int_line = curve.status_line_of_interval(0);
-        int total_events = curve.number_of_status_lines_with_event();
-        // handle special case of a curve without any events
-        if(total_events == 0) {
-            for(int k = 0; k < int_line.number_of_events(); k++) 
-                *oi++ = CGAL::make_object(construct_arc_2(curve, k));
-            return oi;
-        }
-        _m_curve = curve;
-        typedef typename Curved_kernel_via_analysis_2::
-            Curve_interval_arcno_cache CIA_cache;
-        const CIA_cache& map_interval_arcno =
-            _m_curved_kernel->interval_arcno_cache();
-        
-        typename Curved_kernel_via_analysis_2::Construct_point_2 
-            construct_point =
-            _m_curved_kernel->construct_point_2_object();
-
-        typename CIA_cache::result_type info1, info2;
-        std::vector<Point_2> min_pts, max_pts;
-        Coordinate_1 min_x, max_x;
-        int i, k, n;
-        Arc_2 arc;
-        // first handle segments before first event
-        evt_line1 = curve.status_line_at_event(0);
-        max_x = evt_line1.x();
-        
-        for(k = 0; k < evt_line1.number_of_events(); k++) 
-            max_pts.push_back(construct_point(max_x, curve, k));
-                        
-        //std::cout << "handling events over the 1st interval\n";    
-        for(k = 0; k < int_line.number_of_events(); k++) {
-            
-            info1 = map_interval_arcno(evt_line1, 1, k); 
-            if (info1.second != CGAL::ARR_INTERIOR) {
-                arc = construct_arc_2(CGAL::ARR_MIN_END, max_x, 
-                                      (info1.second == 
-                                       CGAL::ARR_BOTTOM_BOUNDARY ?
-                                       CGAL::ARR_MIN_END : CGAL::ARR_MAX_END), 
-                                      curve, k);
-            } else {
-                arc = construct_arc_2(max_pts[info1.first], CGAL::ARR_MIN_END, 
-                                      curve, k, info1.first
-                );
-            }
-            *oi++ = CGAL::make_object(arc);
-        }
-        min_pts = max_pts;
-        max_pts.clear();
-        min_x = max_x;
-               
-        // next handle arcs between events, including isolated points
-        for (i = 0; i < total_events-1; i++) {
-            evt_line1 = curve.status_line_at_event(i);
-            evt_line2 = curve.status_line_at_event(i+1);
-            max_x = evt_line2.x();
-            oi = _handle_vertical_and_isolated(evt_line1, min_x, min_pts, oi);
-                                
-            n = evt_line2.number_of_events();
-            for(k = 0; k < n; k++) 
-                max_pts.push_back(construct_point(max_x, curve, k));
-            
-            n = curve.status_line_of_interval(i+1).number_of_events();
-            CGAL::Arr_curve_end inf1_end, inf2_end;
-            for (k = 0; k < n; k++) {
-                
-                info1 = map_interval_arcno(evt_line1, 0, k); 
-                info2 = map_interval_arcno(evt_line2, 1, k); 
-                inf2_end = (info2.second == CGAL::ARR_BOTTOM_BOUNDARY ? 
-                    CGAL::ARR_MIN_END : CGAL::ARR_MAX_END);
-                
-                if (info1.second != CGAL::ARR_INTERIOR) {
-                    inf1_end = (info1.second == CGAL::ARR_BOTTOM_BOUNDARY ? 
-                        CGAL::ARR_MIN_END : CGAL::ARR_MAX_END);
-                    if (info2.second != CGAL::ARR_INTERIOR) {
-                        arc = construct_arc_2(min_x, inf1_end, max_x, inf2_end,
-                                              curve, k);
-                    } else {
-                        arc = construct_arc_2(max_pts[info2.first], min_x, 
-                                              inf1_end, curve, k, info2.first);
-                    }
-                } else if (info2.second != CGAL::ARR_INTERIOR) {
-                    arc = construct_arc_2(min_pts[info1.first],  max_x,
-                                          inf2_end, curve, k, info1.first);
-                } else {
-                    arc = construct_arc_2(min_pts[info1.first], 
-                                          max_pts[info2.first],
-                                          curve, k, info1.first, info2.first);
-                }
-                *oi++ = CGAL::make_object(arc);
-            }
-            min_pts = max_pts;
-            max_pts.clear();
-            min_x = max_x;
-        }
-        
-        // here: min_x/min_pts hold information about the last event line
-        // event_line2 - points to the last event line
-        // vertical line or isolated points at last event?
-        evt_line2 = curve.status_line_at_event(total_events-1);
-        min_x = evt_line2.x();
-        oi = _handle_vertical_and_isolated(evt_line2, min_x, min_pts, oi);
-        
-        n = curve.status_line_of_interval(total_events).number_of_events();
-        for (k = 0; k < n; k++) {
-        
-            info1 = map_interval_arcno(evt_line2, 0, k); 
-            if (info1.second != CGAL::ARR_INTERIOR) {
-                arc = construct_arc_2(
-                        CGAL::ARR_MAX_END, min_x, 
-                        (info1.second == CGAL::ARR_BOTTOM_BOUNDARY ? 
-                         CGAL::ARR_MIN_END : CGAL::ARR_MAX_END), curve, k
-                );
-            } else {
-                arc = construct_arc_2(min_pts[info1.first], 
-                                      CGAL::ARR_MAX_END, curve, k,
-                                      info1.first);
-            }
-            *oi++ = CGAL::make_object(arc);
-        }
-        return oi;
-    }
-    //!@}
-
-private:
-    //!\name Private members
-    //!@{
-    
-    /*!\brief
-     * Constructs vertical arcs and isolated points at event line
-     *
-     * \param cv_line The event line in focus
-     * \param x x-coordinate of event
-     * \param pts Points at event line
-     * \param oi Output iterator that stores CGAL::Object, which either
-     *           encapsulates Point_2 or Arc_2
-     * \return Past-the-end iterator of \c oi
-     */
-    template <class OutputIterator>
-    OutputIterator _handle_vertical_and_isolated(
-            Status_line_1 cv_line,
-            Coordinate_1 x, std::vector<Point_2> pts, 
-            OutputIterator oi) const {
-        
-        Construct_arc_2 construct_arc_2 = 
-            _m_curved_kernel->construct_arc_2_object();
-        
-        int n = cv_line.number_of_events(), j;
-        if(cv_line.covers_line()) { // look for vertical arcs
-            if(n > 0) {
-                // the first vertical ray
-                *oi++ = CGAL::make_object(
-                        construct_arc_2(pts[0], CGAL::ARR_MIN_END, _m_curve)
-                );
-                for(j = 0; j < n-1; j++)  // interior bounded arcs
-                    *oi++ = CGAL::make_object(construct_arc_2(pts[j], pts[j+1],
-                                                              _m_curve));
-                    // the last vertical ray
-                    *oi++ = CGAL::make_object(construct_arc_2(pts[n-1], 
-                        CGAL::ARR_MAX_END, _m_curve));
-            } else // unbounded vertical line
-                *oi++ = CGAL::make_object(construct_arc_2(x, _m_curve));
-            return oi;
-        } 
-        // look for isolated points
-        std::pair<int, int> ipair;
-        for(j = 0; j < n; j++) {
-            ipair = cv_line.number_of_incident_branches(j);
-            if(ipair.first == 0&&ipair.second == 0) {
-                //std::cout << "isolated point found\n";
-                typename Curved_kernel_via_analysis_2::Construct_point_2 
-                    construct_point =
-                    _m_curved_kernel->construct_point_2_object();
-                
-                *oi++ = CGAL::make_object(construct_point(x, _m_curve, j));
-            }
-        }
-        return oi;
-    }
-
-    //!@}
-
-    //!\name Private data
-    //!@{
-            
-    //! pointer to \c Curved_kernel_via_analysis_2 
-    Curved_kernel_via_analysis_2 *_m_curved_kernel;
-
-    //! to avoid passing curve as a parameter
-    Curve_analysis_2 _m_curve;
-    
-    //!@}
-};  // struct Make_x_monotone
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
-//EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
deleted file mode 100644
index 6e18d96..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
+++ /dev/null
@@ -1,840 +0,0 @@
-// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), 
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
-//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-
-#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
-#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
-
-/*!\file include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
- * \brief Defines class \c Point_2 that represents a point on a curve that can
- * be analyzed.
- */
-
-#include <CGAL/config.h>
-
-#include <boost/optional.hpp>
-#include <boost/optional/optional_io.hpp>
-
-#include <CGAL/Handle_with_policy.h>
-
-#include <CGAL/Arr_enums.h>
-
-#include <CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h>
-
-namespace CGAL {
-
-namespace internal {
-
-// forward class declaration
-template < class CurvedKernelViaAnalysis_2, class Rep_ > 
-class Point_2;
-
-// forward class declaration
-template < class CurvedKernelViaAnalysis_2 >
-class Arc_2_rep;
-
-// forward class declaration for befriending
-template < class CurvedKernelViaAnalysis_2,
-      class Rep_ = Arc_2_rep<CurvedKernelViaAnalysis_2> >
-class Arc_2;
-
-/*\!brief
- * representation class for Point_2
- */
-template < class CurvedKernelViaAnalysis_2 >
-class Point_2_rep 
-{
-public:
-    //! this instance's template parameter
-    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-    
-    //! the class itself
-    typedef Point_2_rep< Curved_kernel_via_analysis_2 > Self;
-
-    //! type of curve kernel
-    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2 
-    Curve_kernel_2;
-
-    //! type of x-coordinate
-    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
-    
-    //! type of a finite point on curve
-    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
-
-    //! type of curve analysis
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-        
-    //! default constructor
-    Point_2_rep() {
-    }
-    
-    //! constructs a "finite" point on curve,
-    //! implies CGAL::NO_BOUNDARY in x/y
-    Point_2_rep(const Coordinate_2& xy) : 
-        _m_xy(xy), _m_location(CGAL::ARR_INTERIOR) {
-    }
-
-    //! constructs a point at +/-oo in x
-    Point_2_rep(CGAL::Arr_curve_end inf_end, const Curve_analysis_2& c,
-                int arcno) :
-        _m_curve(c), 
-        _m_arcno(arcno) {
-        _m_location = (inf_end == CGAL::ARR_MIN_END ?
-                       CGAL::ARR_LEFT_BOUNDARY : CGAL::ARR_RIGHT_BOUNDARY);
-    }
-    
-    //! constructs a point on curve with y-coordinate at infinity
-    Point_2_rep(const Coordinate_1& x, const Curve_analysis_2& c, 
-                CGAL::Arr_curve_end inf_end) :
-        _m_x(x),
-        _m_curve(c) {
-        _m_location = (inf_end == CGAL::ARR_MIN_END ?
-                       CGAL::ARR_BOTTOM_BOUNDARY : CGAL::ARR_TOP_BOUNDARY);
-        
-    }
-
-    //! curve point finite coordinates. They are valid only if boundary in y 
-    //! is not set (CGAL::NO_BOUNDARY), otherwise only x-coordinate is
-    //! accessible, i.e., point is in interior
-    boost::optional< Coordinate_2 > _m_xy;
-        
-    //! x-coordinate of a curve point
-    boost::optional< Coordinate_1 > _m_x;
-
-    //! curve of point at boundary
-    boost::optional< Curve_analysis_2 > _m_curve;
-
-    //! arc of point at boundary
-    boost::optional< int > _m_arcno;
-
-    //! location of a point in parameter space
-    mutable CGAL::Arr_parameter_space _m_location;
-
-    //! store a double approximation of point
-    mutable boost::optional< std::pair< double, double > > _m_doubles;
-};
-
-/*!\brief 
- * Class defines a point on a curve that can be analyzed
- * 
- * Only points with finite coordinates can be constructed explicitly 
- * (by the user). Points on the boundary use special private constructors to
- * to represent ends of curve arcs on the boundary.
- */
-template <class CurvedKernelViaAnalysis_2, 
-          class Rep_ = internal::Point_2_rep<CurvedKernelViaAnalysis_2> >
-class Point_2 : 
-        public CGAL::Handle_with_policy< Rep_ > {
-public:
-    //!\name Public types
-    //!@{
-    
-    //! this instance's first template parameter
-    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-
-    //! this instance's second template parameter
-    typedef Rep_ Rep;
-
-    //! this instance itself
-    typedef Point_2< Curved_kernel_via_analysis_2, Rep > Self;
-    
-    //! type of underlying curve kernel
-    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
-        Curve_kernel_2;
-    
-    //! type of an x-coordinate
-    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
-    
-    //! type of an xy-coordinate
-    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
-    
-    //! type that analyzes a curve
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-    
-    //! the handle superclass
-    typedef ::CGAL::Handle_with_policy< Rep > Base;
-    
-    //! type of kernel point
-    typedef typename Curved_kernel_via_analysis_2::Point_2 Kernel_point_2;
-    
-    //!@}
-    
-public:
-    //!\name Rebind
-    //!@{
-    
-    /*!\brief
-     * An auxiliary structure for rebinding the point with a new rep
-     */
-    template < typename NewCKvA_2, typename NewRep >
-    class rebind
-    {
-    public:
-        //! this instance's first template parameter
-        typedef NewCKvA_2 New_curved_kernel_via_analysis_2;
-
-        //! this instance's second template parameter
-        typedef NewRep New_rep;
-
-        //! the rebound type
-        typedef Point_2< New_curved_kernel_via_analysis_2, NewRep > Other;
-        
-        //! the rebound point
-        typedef typename New_curved_kernel_via_analysis_2::Point_2 
-        Rebound_point_2;
-        
-        /*!\brief
-         * constructs a point of type \c Rebound_point_2 from the point \c pt 
-         * of type \c Self.
-         *
-         * All known items of the base class rep will be copied.
-         */
-        Rebound_point_2 operator()(const Self& pt) {
-            New_rep newrep;
-            newrep._m_xy = pt.ptr()->_m_xy;
-            newrep._m_x = pt.ptr()->_m_x;
-            newrep._m_curve = pt.ptr()->_m_curve;
-            newrep._m_arcno = pt.ptr()->_m_arcno;
-            newrep._m_location = pt.ptr()->_m_location;
-            return Rebound_point_2(newrep);
-        }
-
-        // TODO move to SfP_2l
-        /*!\brief
-         * reverse rebind, i.e., extracts original point type from a 
-         * rebound instance
-         */
-        Self operator()(const Rebound_point_2& pt) {
-            Rep rep;
-            rep._m_xy = pt.ptr()->_m_xy;
-            rep._m_x = pt.ptr()->_m_x;
-            rep._m_curve = pt.ptr()->_m_curve;
-            rep._m_arcno = pt.ptr()->_m_arcno;
-            if (pt.is_finite()) {
-                rep._m_location = CGAL::ARR_INTERIOR;
-            } else {
-                rep._m_location = pt.ptr()->_m_location;
-            }
-            return Self(rep);
-        }
-    };
-    
-public:
-    //!\name Standard constructors
-    //!@{
-
-    /*!\brief
-     * Default constructor
-     */
-    Point_2() : 
-        Base(Rep()) {   
-    }
-
-    /*!\brief
-     * copy constructor
-     */
-    Point_2(const Self& p) : 
-            Base(static_cast<const Base&>(p)) {  
-    }
-
-    //!@}
-
-public:
-    //!\name Usual constructors
-    //!@{
-    
-    /*!\brief 
-     * Constructs an interior point
-     *
-     * \param x The x-coordinate 
-     * \param c The supporting curve
-     * \param arcno Arcno of point on \c c
-     * \return The constructed point
-     */
-    Point_2(const Coordinate_1& x, const Curve_analysis_2& c, int arcno) :
-        Base(Rep(Coordinate_2(x, c, arcno))) {
-    }
-
-    template<typename T>
-    Point_2(const T& x, const T& y) :
-      // TODO use default kernel
-         Base(Rep(Curved_kernel_via_analysis_2::instance().kernel().
-		  construct_algebraic_real_2_object()(x,y)))
-    {
-    }
-
-
-
-    // FUTURE TODO allow to construct without curve, 
-    // i.e, isolated points on toric identifications -> do it also for arcs
-    // FUTURE TODO parameter space in x/y (full set of tasks)
-    
-    //!@}
-
-public: // was protected:
-    //!\name Special constructors for points on the boundary
-    //!@{
-    
-    /*!\brief 
-     * Constructs a point with x-coordinate at the left/right boundary
-     *
-     * \param inf_end Determines whether point is on left or right boundary
-     * \param c The supporting curve
-     * \param arcno Arcno of point on \c on left/right boundary
-     * \return The constructed point
-     */
-    Point_2(CGAL::Arr_curve_end inf_end, 
-            const Curve_analysis_2& c, int arcno) :
-        Base(Rep(inf_end, c, arcno)) {
-    }
-    
-    /*!\brief 
-     * Constructs a point on bottom or top boundary
-     * 
-     * \param x The x-coordinate of point
-     * \param c The supporting curve
-     * \param inf_end Defines whether point is on bottom or top boundary
-     * \return The constructed point
-     */
-    Point_2(const Coordinate_1& x, const Curve_analysis_2& c, 
-            CGAL::Arr_curve_end inf_end) :
-        Base(Rep(x, c, inf_end)) {
-    }
-    
-    //!@}
-
-protected:
-    //!\name Constructors for rebind
-    //!@{
-    
-    /*!\brief
-     * constructs from a given represenation
-     */
-    /*!\brief
-     * Constructor for for rebind
-     *
-     * \param rep The representation
-     * \return The constructed point
-     */
-    Point_2(Rep rep) : 
-        Base(rep) {  
-    }
-    
-    //!@}
-       
-public:
-    //!\name Destructors
-    //!@{
-
-    /*!\brief
-     * Virtual destructor
-     */
-    virtual ~Point_2() {
-    }
-    
-    //!@}
-
-public:
-    //!\name Access members
-    //!@{
-
-    /*!\brief 
-     * Access to the point's x-coordinate (y-coordinate can be undefined)
-     * 
-     * \return The stored x-coordinate
-     * \pre the point's x must be finite
-     */
-    inline 
-    const Coordinate_1& x() const {
-        CGAL_precondition_msg(
-                this->ptr()->_m_xy || this->ptr()->_m_x,
-                "Denied access to x-coordinate of the curve end \
-            lying at x-infinity");
-        return (is_finite() ?
-                (*(this->ptr()->_m_xy)).x() : *(this->ptr()->_m_x));
-    }
-    
-    /*!\brief 
-     * Access to underlying \c Coordinate_2 object
-     *
-     * \return The stored xy-coordinate
-     * \pre The xy-coordinates must be finite
-     */
-    inline 
-    const Coordinate_2& xy() const {
-        CGAL_precondition_msg(bool(this->ptr()->_m_xy),
-            "Denied access to the curve end lying at x/y-infinity");
-        return *(this->ptr()->_m_xy);
-    }
-
-    inline const Coordinate_1& y() const {
-      return this->xy().y();
-    }
-
-    /*!\brief
-     * supporting curve of point
-     *
-     * \return supporting curve of point
-     */
-    inline 
-    Curve_analysis_2 curve() const {
-        CGAL_precondition_msg(
-                this->ptr()->_m_xy || this->ptr()->_m_curve,
-                "Denied access to the curve end lying at y-infinity");
-        return (is_finite() ? 
-                (*(this->ptr()->_m_xy)).curve() : *(this->ptr()->_m_curve));
-    }
-    
-    /*!\brief
-     * Arc number of point on a curve
-     *
-     * \return arcno of point
-     * \pre Is not endpoint of a vertical ray or branch 
-     */ 
-    inline int arcno() const {
-        CGAL_precondition_msg(this->ptr()->_m_xy ||
-                              this->ptr()->_m_arcno,
-            "Denied access to the curve end lying at y-infinity");
-        return (is_finite() ? 
-                (*(this->ptr()->_m_xy)).arcno() : *(this->ptr()->_m_arcno));
-    }
-    
-    //!@}
-
-public: 
-    //!\name Methods for location
-    //!@{
-    
-    /*!\brief
-     * sets location of a point in parameter space to \c loc
-     *
-     * It is supposed that the user thoroughly understands malicious
-     * consequences that may result from the misuse of the location
-     */
-    inline
-    void set_location(CGAL::Arr_parameter_space loc) const {
-        this->ptr()->_m_location = loc;
-    }
-    
-    /*!\brief
-     * location of a point in parameter space
-     *
-     * \return location in parameter space
-     */
-    inline CGAL::Arr_parameter_space location() const { 
-        return this->ptr()->_m_location; 
-    } 
-    
-    /*!\brief
-     * checks if the point lies on left/right boundary
-     *
-     * \return \c true if it lies on left/right boundary, \c false otherwise
-     */
-    inline bool is_on_left_right() const {
-        return (location() == CGAL::ARR_LEFT_BOUNDARY ||
-                location() == CGAL::ARR_RIGHT_BOUNDARY);
-    }
-    
-    /*!\brief
-     * checks if the point lies on bottom/top boundary
-     *
-     * \return \c true if it lies on bottom/top boundary, \c false otherwise
-     */
-    inline bool is_on_bottom_top() const {
-        return (location() == CGAL::ARR_BOTTOM_BOUNDARY ||
-                location() == CGAL::ARR_TOP_BOUNDARY);
-    }
-
-    /*!\brief
-     * checks whether the point is finite
-     *
-     * \return \c true, if point is finite, \c false otherwise
-     */
-    inline 
-    bool is_finite() const {
-        return bool(this->ptr()->_m_xy);
-    }
-    
-    //!@}      
-    
-    //!\name Predicates
-    //!@{
-
-#define CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(X, Y) \
-    typename Curved_kernel_via_analysis_2::X Y = \
-         Curved_kernel_via_analysis_2::instance().Y##_object(); \
-
-    /*!\brief
-     * Compares x-coordinates of this point with \c q
-     * 
-     * \param q The other point
-     * \return CGAL::LARGER if x(*this) > x(q);
-     *         CGAL::SMALLER if x(*this) \< x(q);
-     *         CGAL::EQUAL if x(*this) = x(q).
-     * \pre compared points are in the interior of parameter space
-     */
-    inline
-    CGAL::Comparison_result compare_x(const Kernel_point_2& q) const {
-        CGAL_precondition(this->ptr()->_m_xy);
-        CGAL_precondition(q.ptr()->_m_xy);
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_x_2, compare_x_2)
-        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
-        return compare_x_2(*dynamic_cast< const Kernel_point_2* >(this), q);
-    }
-
-    /*!\brief 
-     * Compares this point with \c q lexicographically
-     * 
-     * \param q The other point
-     * \return CGAL::LARGER if x(*this) > x(q), 
-     *                      or if x(*this) = x(q) and y(*this) > y(q);
-     *         CGAL::SMALLER if x(*this) \< x(q), 
-     *                       or if x(*this) = x(q) and y(*this) \< y(q);
-     *         CGAL::EQUAL if the two points are equal.
-     * \pre Compared points are in the interior of parameter space
-     */
-    inline
-    CGAL::Comparison_result compare_xy(const Kernel_point_2& q, 
-                                       bool equal_x = false) const {
-        CGAL_precondition(bool(this->ptr()->_m_xy));
-        CGAL_precondition(bool(q.ptr()->_m_xy));
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2)
-        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
-        return compare_xy_2(
-                *dynamic_cast< const Kernel_point_2* >(this), q, equal_x
-        );
-    }
-
-    /*!\brief 
-     * Checks if a point lies on on a curve
-     *
-     * \param curve The curve to check
-     * \return \c true, if *this lies on \c curve, \c false otherwise
-     */
-    inline 
-    bool is_on(
-         const typename Curved_kernel_via_analysis_2::Curve_2& curve
-    ) const {
-        CGAL_precondition(bool(this->ptr()->_m_xy));
-
-        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2)
-        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
-        return is_on_2(*dynamic_cast< const Kernel_point_2* >(this), curve);
-    }
-
-#undef CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT
-    
-    //!@}
-
-    //!\name Comparison operators for points in the interior of parameter space
-    //!@{
-
-    //! equality
-    inline
-    bool operator == (const Kernel_point_2& q) const { 
-        return this->compare_xy(q) == CGAL::EQUAL;
-    }
-    
-    //! inequality
-    inline
-    bool operator != (const Kernel_point_2& q) const {
-        return this->compare_xy(q) != CGAL::EQUAL;
-    }
-    
-    //! less than in (x,y) lexicographic order
-    inline
-    bool operator <  (const Kernel_point_2& q) const {
-        return this->compare_xy(q) == CGAL::SMALLER;
-    }
-    
-    //! less-equal in (x,y) lexicographic order
-    inline
-    bool operator <= (const Kernel_point_2& q) const {
-        return this->compare_xy(q) != CGAL::LARGER;
-    }
-
-    //! greater than in (x,y) lexicographic order
-    inline
-    bool operator >  (const Kernel_point_2& q) const {
-        return this->compare_xy(q) == CGAL::LARGER;
-    }
-
-    //! greater-equal in (x,y) lexicographic order
-    inline
-    bool operator >= (const Kernel_point_2& q) const {
-        return this->compare_xy(q) != CGAL::SMALLER;
-    }
-    
-    //!@}
-
-    //!\name Approximation
-    //!@{
-  
-    /*!\brief 
-     * pair of doubles approximating the coordinates
-     */
-    std::pair< double, double > to_double() const {
-      CGAL_precondition(this->location() == CGAL::ARR_INTERIOR);
-      if (!this->ptr()->_m_doubles) {
-        this->ptr()->_m_doubles = this->xy().to_double();
-      }
-      return *(this->ptr()->_m_doubles);
-    }
-  
-    //!}
-
-
-public:
-    //!\name IO
-    //!@{
-    
-    /*!\brief
-     * writes point to \c os
-     */
-    void write(std::ostream& os) const {
-        
-        switch(::CGAL::get_mode(os)) {
-        case ::CGAL::IO::PRETTY:
-            os << "point@" << this->id() << "(";
-            os << "sup@" << this->curve().id() << "; ";
-            os << "loc=" << this->location() << "; ";
-            os << std::flush;
-            // write x value 
-            switch (this->location()) { 
-            case CGAL::ARR_TOP_BOUNDARY: 
-            case CGAL::ARR_BOTTOM_BOUNDARY: 
-            case CGAL::ARR_INTERIOR: {
-              os << "x=" << this->x().to_double()<< "; "; 
-              break;
-            } 
-            case CGAL::ARR_LEFT_BOUNDARY: {
-              os << "x=-oo; ";
-              break;
-            }
-            case CGAL::ARR_RIGHT_BOUNDARY: {
-              os << "x=+oo; ";
-              break;
-            }
-            default:{
-              // bogus location 
-              CGAL_assertion(false);
-            }}  
-            os << std::flush;
-            
-            // write y value 
-            switch (this->location()) {
-            case CGAL::ARR_INTERIOR: {
-              os << "y=" << this->xy().to_double().second<< "; "; ; 
-              break;
-            }  
-            case CGAL::ARR_TOP_BOUNDARY: {
-              os << "y=+oo; ";
-              break;
-            }
-            case CGAL::ARR_BOTTOM_BOUNDARY: {
-              os << "y=-oo; ";
-              break;
-            }
-            case CGAL::ARR_LEFT_BOUNDARY: 
-            case CGAL::ARR_RIGHT_BOUNDARY: {
-              CGAL::Object obj = 
-                this->curve().asymptotic_value_of_arc(
-                    this->location(), this->arcno()
-                );
-              CGAL::Arr_parameter_space ps;
-              if (CGAL::assign(ps, obj)) {
-                if (ps == CGAL::ARR_BOTTOM_BOUNDARY) {
-                  os << "y=-oo(asym)"<< "; "; 
-                } else {
-                  os << "y=+oo(asym)"<< "; "; 
-                }
-              } else {
-                Coordinate_1 y;
-                CGAL_assertion_code(bool check =)
-                  CGAL::assign(y, obj);
-                CGAL_assertion(check);
-                os << "y=" << CGAL::to_double(y) << "(asym)" << "; "; 
-              }
-              break;
-              os << "y=??; ";
-              break;
-            }
-            default:{
-              // bogus location 
-              CGAL_assertion(false);
-            }}  
-            os << std::flush;
-            if (this->ptr()->_m_xy || this->ptr()->_m_arcno) {
-                os << "ARCNO=" << this->arcno();
-            } else {
-                os << "ARCNO=n/a";
-            }
-            os << ")";
-            os << std::flush;
-            break;
-        case ::CGAL::IO::BINARY:
-            std::cerr << "BINARY format not yet implemented" << std::endl;
-            break;
-        default:
-          // ASCII 
-          os << "Point_2(";
-
-          os << this->ptr()->_m_xy;
-          os << ",";
-          os << this->ptr()->_m_x;
-          os << ",";
-          os << this->ptr()->_m_curve;
-          os << ",";
-          os << this->ptr()->_m_arcno;
-          os << ",";
-          os << this->ptr()->_m_location;
-
-          os << ")";
-
-        }
-    }
-
-
-  /*!\brief
-   * reads point from \c is
-   */
-  void read(std::istream& is) {
-    
-    CGAL_precondition(CGAL::is_ascii(is));
-    
-    Rep rep;
-    
-    // read "Point_2("
-    swallow(is, 'P');
-    swallow(is, 'o');
-    swallow(is, 'i');
-    swallow(is, 'n');
-    swallow(is, 't');
-    swallow(is, '_');
-    swallow(is, '2');
-    swallow(is, '(');
-
-    // read values
-    is >> rep._m_xy;
-#if BOOST_VERSION < 104300
-    // EBEB: This fixes a bug in optional_io.hpp, reported to Fernando on
-    //       April 27, 2010, don't know whether the fix makes it into
-    //       boost 1_43.
-    if (!rep._m_xy) {
-      swallow(is, '-');
-    }
-#endif
-    swallow(is, ',');
-    is >> rep._m_x;
-#if BOOST_VERSION < 104300
-    if (!rep._m_x) {
-      swallow(is, '-');
-    }
-#endif
-    swallow(is, ',');
-    is >> rep._m_curve;
-#if BOOST_VERSION < 104300
-    if (!rep._m_curve) {
-      swallow(is, '-');
-    }
-#endif
-    swallow(is, ',');
-    is >> rep._m_arcno;
-#if BOOST_VERSION < 104300
-    if (!rep._m_arcno) {
-      swallow(is, '-');
-    }
-#endif
-    swallow(is, ',');
-    is >> rep._m_location;
-
-    // read the ')'
-    swallow(is, ')');
-    
-    *this = Point_2< Curved_kernel_via_analysis_2, Rep >(rep);
-  }
-  
-  //!@}
-  
-    // friends ////////////////////////////////////////////////////////////////
-
-    //! befriending arc classes
-    friend class Arc_2< Curved_kernel_via_analysis_2 >;
-
-    //friend class Non_x_monotone_arc_2< Curved_kernel_via_analysis_2 >;
-
-    // befriending the functors
-    
-#if defined(_MSC_VER) || defined(__clang__)
-#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
-  friend typename Curved_kernel_via_analysis_2::Z;  \
-  friend typename Curved_kernel_via_analysis_2_Functors::Z< Curved_kernel_via_analysis_2 >
-#else // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
-#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
-  friend class Curved_kernel_via_analysis_2_Functors::Z< Curved_kernel_via_analysis_2 > 
-#endif // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
-    
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_point_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_2);
-    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_xy_2);
-
-#undef CGAL_BEFRIEND_CKvA_2_FUNCTOR
-
-}; // class Point_2
-
-
-/*!\relates Point_2
- * \brief 
- * writes \c pt to \c os 
- */
-template < class CurvedKernelViaAnalysis_2, class Rep_ >
-std::ostream& operator <<(std::ostream& os,
-    const Point_2< CurvedKernelViaAnalysis_2, Rep_ >& pt) {
-    
-  pt.write(os);
-  return os;
-}
-
-
-//! \brief Reads the objects from stream.
-template < class CurvedKernelViaAnalysis_2, class Rep_ >
-std::istream& operator>> (
-    std::istream& is, 
-    Point_2< CurvedKernelViaAnalysis_2, Rep_ >& pt) {
-
-  CGAL_precondition(CGAL::is_ascii(is));
-  
-  //typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
-  //typedef Rep_ Rep;
-  
-  pt.read(is);
-  
-  return is;
-}
-
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
-// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h
deleted file mode 100644
index 8005c97..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2010,2011 Max-Planck-Institute Saarbruecken (Germany), 
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-//
-// ============================================================================
-
-/*!\file CGAL/IO/Qt_widget_Curve_renderer_2.h
- * \brief
-  * provides \c CGAL::Qt_widget interface for the curve renderer
- */
-
-#ifndef CGAL_QT_WIDGET_CURVE_RENDERER_2_H
-#define CGAL_QT_WIDGET_CURVE_RENDERER_2_H
-
-#include <qpainter.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h>
-
-namespace CGAL {
-
-#define CGAL_REND_PT_RADIUS 6 
-
-/*! \brief
- * outputs a curve arc to \c Qt_widget
- */
-template <class CKvA_2>
-Qt_widget& operator << (Qt_widget& ws, const internal::Arc_2< CKvA_2 >& arc) {
-    
-    typedef Curve_renderer_facade<CKvA_2> Facade;
-
-    typedef std::pair< int, int > Coord_2;
-    typedef std::vector< Coord_2 > Coord_vec_2;
-
-    boost::optional < Coord_2 > p1, p2;
-    std::list<Coord_vec_2> points;
-   
-    //Facade::setup(CGAL::Bbox_2(-100, -100, 10, -10),
-      //      330, 270);
-
-    Facade::setup(CGAL::Bbox_2(ws.x_min(), ws.y_min(), ws.x_max(), ws.y_max()),
-               ws.width(), ws.height());
-
-    Facade::instance().draw(arc, points, &p1, &p2);
-    if(points.empty()) 
-        return ws;
-        
-    QPainter *ppnt = &ws.get_painter();
-    int height = ws.height();
-
-   // std::cerr << ws.width() << " and " <<  ws.height() << "\n";
-    typename std::list<Coord_vec_2>::const_iterator lit = points.begin();
-    //ppnt->moveTo((*p1).first, height - (*p1).second);
-    while(lit != points.end()) {
-
-        const Coord_vec_2& vec = *lit;
-        typename Coord_vec_2::const_iterator vit = vec.begin();
-        //std::cerr << "(" << vit->first << "; " << vit->second << ")\n";
-//         if(lit == points.begin() &&*/ vit != vec.end()) {
-//             ppnt->lineTo(vit->first, height - vit->second);
-//             vit++;
-//         }
-        if(vit != vec.end()) 
-            ppnt->moveTo(vit->first, height - vit->second);
-        
-        while(vit != vec.end()) {
-            ppnt->lineTo(vit->first, height - vit->second);
-            vit++;
-            //std::cerr << "(" << vit->e0 << "; " << vit->e1 << "\n";
-        }
-        lit++;
-    }
-    //ppnt->lineTo((*p2).first, height - (*p2).second);
-        
-    QPen old_pen = ppnt->pen();
-    ppnt->setPen(QPen(Qt::NoPen)); // avoid drawing outlines
-    // draw with the current brush attributes
-
-    //std::cerr << "endpts1: (" << (*p1).first << "; " << (*p1).second << "\n";
-    //std::cerr << "endpts2: (" << (*p2).first << "; " << (*p2).second << "\n";
-
-    unsigned sz = CGAL_REND_PT_RADIUS;
-    ppnt->drawEllipse((*p1).first - sz, height-(*p1).second - sz, sz*2, sz*2);
-    ppnt->drawEllipse((*p2).first - sz, height-(*p2).second - sz, sz*2, sz*2);
-    ppnt->setPen(old_pen);
-
-    return ws;
-}
-
-/*! \brief
- *  outputs a curve point to \c Qt_widget
- */
-template <class CKvA_2>
-Qt_widget& operator << (Qt_widget& ws, const internal::Point_2< CKvA_2 >& pt) {
-    
-    typedef Curve_renderer_facade<CKvA_2> Facade;
-   
-    std::pair< int, int > coord;
-    Facade::setup(CGAL::Bbox_2(ws.x_min(), ws.y_min(), ws.x_max(), ws.y_max()),
-            ws.width(), ws.height());
-
-    if(!Facade::instance().draw(pt, coord)) {
-        return ws;
-    }
-       
-    QPainter *ppnt = &ws.get_painter();
-    QPen old_pen = ppnt->pen();
-    ppnt->setPen(QPen(Qt::NoPen));
-    
-    unsigned sz = CGAL_REND_PT_RADIUS;
-    ppnt->drawEllipse(coord.first - sz, ws.height() - coord.second - sz, 
-            sz*2, sz*2);
-    ppnt->setPen(old_pen);
-    return ws;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_QT_WIDGET_CURVE_RENDERER_2_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
deleted file mode 100644
index ddae23e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
+++ /dev/null
@@ -1,1081 +0,0 @@
-// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-//
-// ============================================================================
-
-/*!\file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
- * \brief
- * contains various low-level routines used by \c Curve_renderer_2 and
- * \c Subdivision_1 
- *
- * provide caching for polynomials and polynomial evaluations; 1D range
- * analysis using First Quadratic Affine Form (QF) and Modified Affine 
- * Arithmetic (MAA), both equipped with recursive derivative information
- */
-
-#ifndef CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
-#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H 1
-
-#include <vector>
-#include <stack>
-// #include <boost/multi_index_container.hpp>
-// #include <boost/multi_index/member.hpp>
-// #include <boost/multi_index/hashed_index.hpp>
-// #include <boost/multi_index/sequenced_index.hpp>
-
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Polynomial/Real_embeddable_traits.h>
-
-#include <CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h>
-
-// using boost::multi_index::multi_index_container;
-// using boost::multi_index::get;
-// using boost::multi_index::project;
-
-namespace CGAL {
-
-namespace internal {
-
-#define CGAL_N_CACHES    2    // maximal number of cache instances
-
-#define CGAL_X_RANGE     0       // polynomial in x-range
-
-#define CGAL_Y_RANGE     1       // polynomial in y-range
-
-// defines subdivision level beyond which univariate polynomials are not
-// cached (if 0 cache is off)
-#define CGAL_MAX_POLY_CACHE_LEVEL   8 
-
-// maximal number of entries in univariate polynomial cache containers
-#define CGAL_POLY_CACHE_SIZE 1024*1024
-
-// maximal degree of the derivative taken into account during recursive 
-// derivative range analysis
-#define CGAL_RECURSIVE_DER_MAX_DEGREE  7
-
-// 8-pixel neighbouthood directions
-static const struct { int x; int y; } directions[] = {
-    { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1},
-    {-1, 0}, {-1,-1}, { 0,-1}, { 1,-1}};
-// map from rectangle sides to pixel directions
-// 0 - left side, 1 - right side, 2 - bottom side, 3 - top side
-static const int DIR_MAP[][3] =
-    {{5, 4, 3}, {7, 0, 1}, {5, 6, 7}, {3, 2, 1}};
-// map from 8 pixel directions to "left" (0) or "right" (1) direction of motion
-// vertical directions (2 and 6) are mapped to -1
-static const int DIR_TAKEN_MAP[] =
-    {1, 1, -1, 0, 0, 0, -1, 1};
-
-template <class Integer>
-struct Pixel_2_
-{
-    int x, y;             // pixel coordinates relative to the drawing area
-    unsigned level;       // subdivision level: 0 - for pixels, 
-                          // 1 - for 1/2 pixels, and so on)
-#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
-    double xv, yv; // double approximation of curve-pixel intersection point
-#endif
-
-    Integer sub_x, sub_y; // subpixel coordinates relative to pixel's boundary
-                          // (always 0 for pixels)
-        
-    Pixel_2_& operator =(const Pixel_2_& pix) {
-#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
-        memcpy(this, &pix, sizeof(int)*3 + sizeof(double)*2);
-#else
-        memcpy(this, &pix, sizeof(int)*3);
-#endif
-        sub_x = pix.sub_x;
-        sub_y = pix.sub_y;
-        return *this;
-    }
-
-    bool operator ==(const Pixel_2_& pix) const {
-        if(memcmp(this, &pix, sizeof(int)*3))
-            return false;
-        return (sub_x == pix.sub_x && sub_y == pix.sub_y);
-    }
-};
-
-// structure describing the seed point and backward direction, support for
-// multiple seed points
-template <class Integer>
-struct Seed_point_
-{
-    Seed_point_()
-    { }
-
-    Seed_point_(const Pixel_2_<Integer>& start_, int dir_,
-            int taken_, bool coincide_) : start(start_),
-        back_dir(dir_), direction_taken(taken_), 
-        branches_coincide(coincide_)
-    { }
-
-    Pixel_2_<Integer> start; // starting pixel
-    int back_dir; // backward direction
-    int direction_taken;
-    bool branches_coincide;
-};
-
-template <class Rational, class AlgebraicReal>
-struct Clip_point_ // describes a bottom/top clip point
-{
-    Clip_point_() { }
-    Clip_point_(Rational left_, Rational right_, int arcno_=-1) :
-        left(left_), right(right_), arcno(arcno_) { } 
-    Rational left, right;       // isolating interval boundaries
-    int arcno;          // arcno of a segment this point belongs to
-    AlgebraicReal alpha;   // this clip point event line
-};
-
-template <class Integer>
-std::ostream& operator <<(std::ostream& os, const Pixel_2_<Integer>& pix) 
-{
-    os << " (" << pix.x << "/" << pix.sub_x << "; " << pix.y << "/" << 
-        pix.sub_y << ") level = " << pix.level;
-    return os;
-}
-
-/*! \brief defines class \c Curve_renderer_internals
- *  
- * provides an interface to low-level range analysis and polynomials evaluation
- * methods along with caching mechanism. \c Coeff_ defines internal polynomial
- * coefficients used by the renderer.
- * \c CurveKernel_2 specifies underlying 2D curve kernel
- */
-template <class CurveKernel_2, class Coeff_>
-class Curve_renderer_internals
-{
-public:
-    //! \name typedefs 
-    //!@{
-    
-    //! this instance's first template argument
-    typedef CurveKernel_2 Curve_kernel_2;
-
-    //! this instance's second template argument
-    typedef Coeff_ Coeff;
-
-    //! type of 1-curve analysis
-    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
-
-    //! type of supporting polynomial
-    typedef typename Curve_analysis_2::Polynomial_2 Polynomial_2;
-
-    //! underlying univariate polynomial type
-    typedef typename Polynomial_2::NT Poly_dst_1;
-
-    //! rational number type
-    typedef typename ::CGAL::Get_arithmetic_kernel<
-        typename Curve_kernel_2::Coefficient>::Arithmetic_kernel::Rational
-            Rational;
-
-    typedef Curve_renderer_traits<Coeff, Rational> Renderer_traits;
-
-    /// polynomial traits should be used whenever possible
-    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
-
-    typedef CGAL::Coercion_traits<Rational,
-        typename Curve_kernel_2::Coefficient> Coercion;
-
-    //! coercion between rational and polynomial coefficients number type
-    typedef typename Coercion::Type Rat_coercion_type;
-    
-    //! base number type for all internal computations
-    typedef typename Renderer_traits::Float NT;
-    
-    //! instance of a univariate polynomial
-    typedef CGAL::Polynomial<Coeff> Poly_1;
-    //! instance of a bivariate polynomial
-    typedef CGAL::Polynomial<Poly_1> Poly_2;
-    //! container's const iterator (random access)
-    typedef typename Poly_1::const_iterator const_iterator_1; 
-    //! container's const iterator (random access)
-    typedef typename Poly_2::const_iterator const_iterator_2; 
-    
-    //! a univariate rational polynomial    
-    typedef CGAL::Polynomial<Rat_coercion_type> Rational_poly_1;
-    //! a bivariate rational polynomial
-    typedef CGAL::Polynomial<Rational_poly_1> Rational_poly_2;
-
-    //! conversion from \c Rational type to used number type
-    typename Renderer_traits::Rat_to_float rat2float;
-    //! conversion from the basic NT to \c Rational
-    typename Renderer_traits::Float_to_rat float2rat;
-    //! makes the result exact after inexact operation (applicable only for
-    //! exact number types
-    typename Renderer_traits::Make_exact make_exact;
-
-    //!@}
-private:
-    //!\name private typedefs
-    //!@{
-        
-    //! container to store derivative coefficients
-    typedef std::vector<NT> Derivative_1;
-    //! instance of polynomial derivatives type
-    typedef std::vector<CGAL::Polynomial<NT> > Derivative_2;
-    //! const_iterator_2 for polynomial derivatives
-    typedef typename Derivative_2::const_iterator der_iterator_2;
-    //! const_iterator_1 for polynomial derivatives
-    typedef typename std::vector<NT>::const_iterator der_iterator_1;
-    
-    //! hashed container element's type for univariate polynomials
-    typedef std::pair<NT, Poly_1> Poly_entry;
-    
-    //! hash function to cache univariate polynomials
-//     struct hash_func_poly {
-//         typename Renderer_traits::Hash_function hash;
-//         std::size_t operator()(const NT& key) const {
-//             return hash(key);
-//         }
-//     };
-//     
-    //! hash function to cache function evaluations
-//     struct hash_func_eval {
-//         typename Renderer_traits::Hash_function hash;
-//         std::size_t operator()(const Eval_hash_key& key) const {
-//             std::size_t h1 = hash(key.first), h2 = hash(key.second);
-//             return (h1 - h2);
-//         }
-//     };
-       
-    //! hashed map container with LRU capabilities used to store precomputed
-    //! univariate polynomials at fixed x or y coordinates
-//     typedef boost::multi_index::multi_index_container<
-//         Poly_entry,
-//         boost::multi_index::indexed_by<
-//             boost::multi_index::sequenced<>,
-//             boost::multi_index::hashed_unique<
-//                 BOOST_MULTI_INDEX_MEMBER(Poly_entry, NT, first),
-//                 hash_func_poly > > > 
-//     Poly_cache;
-    
-    //! hashed map used to store precomputed polynomial evaluations
-//     typedef boost::multi_index::multi_index_container<
-//         Eval_entry,
-//         boost::multi_index::indexed_by<
-//             boost::multi_index::sequenced<>,
-//             boost::multi_index::hashed_unique<
-//                 BOOST_MULTI_INDEX_MEMBER(Eval_entry, Eval_hash_key, first),
-//                 hash_func_eval > > > 
-//     Eval_cache;
-    
-    //!@}
-public:
-    //!\name public interface
-    //!@{
-    
-    //! default constructor
-    Curve_renderer_internals() : window(0.0, 0.0, 0.0, 0.0), res_w(0),
-         res_h(0) {
-    }
-         
-    //! \brief checks whether interval contains zero
-    inline bool is_zero(const NT& low, const NT& up)
-    {
-        return (low*up < 0); //(low < 0&&up > 0);
-    }
-    
-    //! \brief evalutates a certain polynomial derivative at x
-    //!
-    //! \c der_coeffs is a set of derivative coefficients, 
-    //! \c poly - polynomial coefficients
-    NT evaluate_der(const CGAL::Polynomial<NT>& der_coeffs, const Poly_1& poly,
-        const NT& x)
-    {   
-        typename Renderer_traits::Extract_eval extract;
-        const_iterator_1 poly_it = poly.end() - 1;
-        der_iterator_1 der_it = der_coeffs.end() - 1;
-        NT y(extract(*poly_it--) * (*der_it));
-        while((der_it--) != der_coeffs.begin()) {
-            y = y * x + extract(*poly_it--) * (*der_it);
-        }
-        return y;
-    }
-    
-    //! \brief the same as \c evaluate but arguments are passed by value
-    //! (needed to substitute variables in bivariate polynomial)
-    inline static NT binded_eval(Poly_1 poly, NT x)
-    {
-        return evaluate(poly, x);
-    }
-    
-    //! \brief evalutates a polynomial at certain x-coordinate
-    static NT evaluate(const Poly_1& poly, const NT& x, 
-        bool *error_bounds_ = NULL)
-    {
-        typename Renderer_traits::Extract_eval extract;
-        int n = poly.degree()+1, m = (n-1)>>1, odd = n&1;
-        if(error_bounds_ != NULL)
-            *error_bounds_ = false;
-        if(n == 1)
-            return extract(poly.lcoeff(), error_bounds_);
-        Coeff cc = static_cast<Coeff>(x);
-        const_iterator_1 it1 = poly.end()-1;
-        const_iterator_1 it2 = it1 - (n>>1);
-        // const_iterator_1 beg = poly.begin()+odd;
-        Coeff y1 = *it1, y2 = *it2, mul = cc, y;
-        // unrolled loop for better instruction pairing
-        while(m-- > odd) { 
-            it1--; it2--;
-            y1 = y1*cc + (*it1);
-            y2 = y2*cc + (*it2);
-            mul = mul*cc;
-        }
-        y = y2 + y1*mul;
-        if(odd)
-            y = poly[0] + y*cc;
-        //Gfx_OUT("eval results x = " << x << " res: [" << y.lower() <<
-              //  "; " << y.upper() << "\n");
-
-        return extract(y, error_bounds_);
-    }
-
-    //! \brief evaluates polynomial at a point (x; y)
-    //!
-    //! y is the outermost variable, x is the innermost
-    static Rat_coercion_type substitute_xy(
-        const Rational_poly_2& poly, const Rational& x, const Rational& y) {
-
-        typename Rational_poly_2::const_iterator rit = poly.end()-1;
-        Rat_coercion_type r = rit->evaluate(x),
-            yc = typename Coercion::Cast()(y);
-
-        while((rit--) != poly.begin())
-            r = r * yc + rit->evaluate(x);
-        return r;
-    }
-    
-    //! destructor    
-    ~Curve_renderer_internals()
-    {
-        clear_caches();
-    }
-    
-    //!@}    
-public:
-    //!\name public data (can be accessed from hosting curve renderer)
-    //!@{
-    
-    CGAL::Bbox_2 window;            //! drawing window 
-    NT x_min, x_max, y_min, y_max;  
-    NT pixel_w, pixel_h;            //! pixel dimensions w.r.t. resolution
-      
-    Rational x_min_r, y_min_r, x_max_r, y_max_r; //! rational versions
-    Rational pixel_w_r, pixel_h_r; 
-    
-    int res_w, res_h; //! pixel resolution
-    
-    Poly_2 *coeffs_x, *coeffs_y; //! f(x(y)) / f(y(x))
-    Derivative_2 *der_x, *der_y;  //! derivative coefficients df/dx (df/dy)
-    
-    //! caches of precomputed univariate polynomials in x and y directions
-    //Poly_cache *cached_x, *cached_y;
-        
-    Rational_poly_2 *rational_x, *rational_y;   //! poly with rational coeffs
-    
-    Rational_poly_2 *rational_fx, *rational_fy; //! partial derivatives
-    
-    //! 0 - the 1st (2nd) derivative does not have zero over an 
-    //! interval; 1 - does have 0; -1 - not computed
-    int first_der, second_der;  
-    bool sign_change;  //! detected a sign change over interval    
-    
-    bool zero_bounds;  //! indicates that the result of the last range 
-                       //! evaluation has at least one zero boundary
-                       
-   // static bool show_dump;    //! for debugging
-                       
-    //!@}
-private:
-    //!\name private members for caching support
-    //!@{
-        
-    //! data structures grouped into arrays to facilitate caching
-    Poly_2 coeffs_x_[CGAL_N_CACHES], coeffs_y_[CGAL_N_CACHES];
-    Derivative_2 der_x_[CGAL_N_CACHES], der_y_[CGAL_N_CACHES];
-    //Poly_cache cached_x_[CGAL_N_CACHES], cached_y_[CGAL_N_CACHES];
-    Rational_poly_2 rational_x_[CGAL_N_CACHES], rational_y_[CGAL_N_CACHES];
-    Rational_poly_2 rational_fx_[CGAL_N_CACHES], rational_fy_[CGAL_N_CACHES];
-        
-    //!@}
-public:
-    //! \name public methods
-    //!@{
-
-// template <class CurveKernel_2, class Coeff_>
-// bool Curve_renderer_internals<CurveKernel_2, Coeff_>::show_dump = false;
-
-//! sets up drawing window and pixel resolution
-//!
-//! returns \c false if parameters are incorrect
-bool setup(const CGAL::Bbox_2& box_, int res_w_, int res_h_) 
-{ 
-    window = box_;
-    x_min = static_cast<NT>(box_.xmin());
-    y_min = static_cast<NT>(box_.ymin());
-    x_max = static_cast<NT>(box_.xmax());
-    y_max = static_cast<NT>(box_.ymax());
-
-    res_w = res_w_; 
-    res_h = res_h_;
-    
-    if (x_min >= x_max) {
-      std::cerr << "Incorrect setup parameters: "
-                << "x_min = " << x_min << " >= " << x_max << " = x_max" 
-                << std::endl;
-      return false;
-    }
-    if (y_min >= y_max) {
-      std::cerr << "Incorrect setup parameters: "
-                << "y_min = " << y_min << " >= " << y_max << " = y_max" 
-                << std::endl;
-      return false;
-    }
-    if (res_w < 4) {
-      std::cerr << "Incorrect setup parameters: "
-                << "res_w = " << res_w << " < 4" 
-                << std::endl;
-      return false;
-    }
-    if (res_h < 4) {
-      std::cerr << "Incorrect setup parameters: "
-                << "res_h = " << res_h << " < 4" 
-                << std::endl;
-      return false;
-    }
-     if (res_w > 2048) {
-      std::cerr << "Incorrect setup parameters: "
-                << "res_w = " << res_w << " > 2048" 
-                << std::endl;
-      return false;
-    }
-    if (res_h > 2048) {
-      std::cerr << "Incorrect setup parameters: "
-                << "res_h = " << res_h << " > 2048" 
-                << std::endl;
-      return false;
-    }
-    
-    pixel_w = (x_max - x_min) / res_w;
-    pixel_h = (y_max - y_min) / res_h;
-
-    //srand(time(NULL));
-    // from 0.1 to 0.5
-    double rmin = 0.1, rmax = 0.5;
-    NT sx = pixel_w * static_cast<NT>(rmin + 
-            (static_cast<double>(rand()) / RAND_MAX) * (rmax - rmin));
-    NT sy = pixel_h * static_cast<NT>(rmin + 
-            (static_cast<double>(rand()) / RAND_MAX) * (rmax - rmin));
-
-    Gfx_OUT("---------------------- sx: " << (sx / pixel_w) << "; sy: " << 
-        (sy / pixel_h) << "\n");
-    x_min += sx, x_max += sx, y_min += sy, y_max += sy;   
-
-    x_min_r = Rational(x_min), y_min_r = Rational(y_min);
-    x_max_r = Rational(x_max), y_max_r = Rational(y_max);
-        
-    pixel_w_r = (x_max_r - x_min_r) / res_w;
-    pixel_h_r = (y_max_r - y_min_r) / res_h;
-        
-    pixel_w = rat2float(pixel_w_r);
-    pixel_h = rat2float(pixel_h_r);
-    make_exact(pixel_w);
-    make_exact(pixel_h);
-    
-    //show_dump = false;
-    return true;
-}   
-
-//! \brief computes a range of polynomial values \c f([lower,upper]) using
-//! the First Affine Form (AF1) with Recursive Derivative information
-bool get_range_AF1_1(int var, 
-    const NT& l_, const NT& r_, const NT& key, const Poly_1& poly, int check)
-{
-    Derivative_2 *der = (var == CGAL_X_RANGE ? der_x : der_y);
-    NT l(l_), r(r_), l1, r1, low, up;
-    NT v1, v2;
-    int eval1, eval2;
-    der_iterator_2 der_it_2 = der->end()-1; 
-    der_iterator_1 der_it, der_begin;
-    const_iterator_1 cache_it, begin;
-        
-    first_der = false, sign_change = false;
-    if(poly.degree() == 0) {
-        zero_bounds = false;
-        return (poly.lcoeff() == NT(0.0));
-    }
-    
-    if(l_ == r_) {
-        zero_bounds = false;
-        return false;
-    }
-    if(l > r) {
-        l = r_;
-        r = l_;
-    }
-    
-    eval1 = evaluate_generic(var, l, key, poly);
-    eval2 = evaluate_generic(var, r, key, poly);
-    bool sign_change = (eval1*eval2 < 0);
-    zero_bounds = ((eval1&eval2) == 0);
-
-    if((sign_change||zero_bounds)&&check==1)
-        return true;
-    if(var == CGAL_X_RANGE) {
-        l1 = x_min + l*pixel_w;
-        r1 = x_min + r*pixel_w;
-    } else {
-        l1 = y_min + l*pixel_h;
-        r1 = y_min + r*pixel_h;
-    }
-    
-    typename Renderer_traits::Extract_eval extract;
-    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE; 
-    if(index >= der->size()) {
-        low = up = extract(poly.lcoeff()) * (*der_it_2).lcoeff();
-    } else {
-        der_it_2 = der->begin() + index;
-        low = 1;
-        up = -1;
-    }
-    
-    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2; 
-    make_exact(x0);
-    make_exact(x1);
-    NT x0_abs = CGAL_ABS(x0), x1_abs = CGAL_ABS(x1);
-
-    while((der_it_2--) != der->begin()) {
-        // iterate through derivative coefficients
-        der_it = der_it_2->end() - 1; 
-        der_begin = der_it_2->begin();
-        cache_it = poly.end() - 1; // iterate through precomputed y-values
-        // if a derivative does not straddle zero we can 
-        // calculate the exact boundaries for f(x)      
-        if(low * up >= 0) {
-            v1 = v2 = extract(*cache_it--) * (*der_it);
-            // calculate the ith derivative at xa and xb
-            while((der_it--) != der_begin) {
-                NT cc1 = extract(*cache_it--) * (*der_it);
-                v1 = v1 * l1 + cc1;
-                v2 = v2 * r1 + cc1;
-            }
-            low = v1, up = v2;  
-        } else { // use affine arithmetic to compute bounds
-
-            NT y0 = extract(*cache_it) * (*der_it), y1(0), e1(0);
-            cache_it--;
-            while((der_it--)!=der_begin) {
-                e1 = x0_abs*e1 + x1_abs*(CGAL_ABS(y1) + CGAL_ABS(e1));
-                y1 = y1*x0 + x1*y0; 
-                y0 = x0*y0 + extract(*cache_it) * (*der_it);
-                cache_it--;
-            }
-            NT spread = CGAL_ABS(y1) + CGAL_ABS(e1);
-            low = y0 - spread, up = y0 + spread;
-        }
-        if(der_it_2 == der->begin() && check == 3) {
-            first_der = //(eval1*eval2 < 0);
-                    is_zero(low, up);
-            if(sign_change||zero_bounds) 
-                return true;
-        }
-    }
-    if(low * up < 0) {
-        cache_it = poly.end()-1;
-        begin = poly.begin();
-        
-        NT y0 = extract(*cache_it), y1(0), e1(0);
-        while((cache_it--) != begin) {
-            e1 = x0_abs*e1 + x1_abs*(CGAL_ABS(y1) + CGAL_ABS(e1));
-            y1 = y1*x0 + x1*y0; 
-            y0 = x0*y0 + extract(*cache_it);
-        }
-
-        NT spread = CGAL_ABS(y1) + CGAL_ABS(e1);
-        low = y0 - spread, up = y0 + spread;
-        
-        eval1 = CGAL_SGN(low), eval2 = CGAL_SGN(up);
-    }
-    zero_bounds = ((eval1 & eval2) == 0);
-    if(eval1 * eval2 < 0) {
-        //std::cerr << "eval1 = " << low << "; eval2 = " << up << std::endl;
-        return true;
-    } 
-    return false;
-}
-
-//! \brief evaluates a univariate polynomial over an interval using
-//! First Quadratic Affine Form
-bool get_range_QF_1(int var, const NT& l_, const NT& r_, const NT& key, 
-    const Poly_1& poly, int check = 1)
-{
-    Derivative_2 *der = (var == CGAL_X_RANGE ? der_x : der_y);
-    NT l(l_), r(r_), l1, r1, low, up;
-    NT v1, v2;
-    int eval1, eval2;
-    der_iterator_2 der_it_2 = der->end()-1; 
-    der_iterator_1 der_it, der_begin;
-    const_iterator_1 cache_it, begin;
-
-    first_der = false, sign_change = false;
-    if(poly.degree()==0) {
-        zero_bounds = false;
-        return (poly.lcoeff()==NT(0.0));
-    }
-    if(l_ == r_) {
-        zero_bounds = false;
-        return false;
-    }
-    if(l > r) {
-        l = r_;
-        r = l_;
-    }
-    
-    eval1 = evaluate_generic(var, l, key, poly);
-    eval2 = evaluate_generic(var, r, key, poly);
-    sign_change = (eval1*eval2 < 0);
-    
-    zero_bounds = ((eval1 & eval2) == 0);
-    if((sign_change || zero_bounds) && check==1)
-        return true;
-        
-    if(var == CGAL_X_RANGE) {
-        l1 = x_min + l*pixel_w;
-        r1 = x_min + r*pixel_w;
-    } else {
-        l1 = y_min + l*pixel_h;
-        r1 = y_min + r*pixel_h;
-    }
-    
-    typename Renderer_traits::Extract_eval extract;
-    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE;
-    if(index >= der->size()) {
-        low = up = extract(poly.lcoeff()) * (*der_it_2).lcoeff();
-    } else {
-        der_it_2 = der->begin() + index;
-        low = 1;
-        up = -1;
-    }
-    
-    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2; 
-    make_exact(x0);
-    make_exact(x1);
-    NT x0_abs = CGAL_ABS(x0), xsum_abs = CGAL_ABS(x1) + x0_abs;
-
-    while((der_it_2--)!=der->begin()) {
-
-        // iterate through derivative coefficients
-        der_it = (*der_it_2).end()-1; 
-        der_begin = (*der_it_2).begin();
-        cache_it = poly.end()-1; // iterate through precomputed y-values
-        
-        // if a derivative does not straddle zero we can obtain exact bounds
-        // by evaluating a polynomial at end-points
-        if(low * up >= 0) {
-            v1 = v2 = extract(*cache_it--)* (*der_it);
-            // calculate the ith derivative at xa and xb
-            while((der_it--) != der_begin) {
-                NT cc1 = extract(*cache_it--)* (*der_it);
-                v1 = v1 * l1 + cc1;
-                v2 = v2 * r1 + cc1;
-            }
-            low = v1; 
-            up = v2;  
-        } else { // use Quadratic Form to compute the bounds
-
-            NT y0 = extract(*cache_it) * (*der_it), y1(0), z1(0), e1(0);
-            cache_it--;
-            while((der_it--)!=der_begin) {
-                e1 = xsum_abs * e1 + CGAL_ABS(x1 * z1);
-                z1 = x0*z1 + x1*y1;
-                y1 = y1*x0 + x1*y0; 
-                y0 = x0*y0 + extract(*cache_it)*(*der_it);
-                cache_it--;
-            }
-            NT spread = CGAL_ABS(y1) + e1;
-            low = spread;
-            up = spread;
-            if(z1 > 0)
-                up = up + z1;
-            else
-                low = low - z1;
-            low = y0 - low;
-            up = y0 + up;
-        }
-        
-        if(der_it_2 == der->begin() && check==3) {
-            first_der = //(eval1*eval2 < 0);//
-                    is_zero(low, up);
-            if(sign_change||zero_bounds) 
-                return true;
-        }
-    }
-    
-    if(low * up < 0) {
-        cache_it = poly.end()-1;
-        begin = poly.begin();
-        NT y0 = extract(*cache_it), y1(0), z1(0), e1(0);
-        while((cache_it--) != begin) {
-            e1 = xsum_abs * e1 + CGAL_ABS(x1*z1);
-            z1 = x0*z1 + x1*y1;
-            y1 = y1*x0 + x1*y0; 
-            y0 = x0*y0 + extract(*cache_it);
-        }
-        NT spread = CGAL_ABS(y1) + e1;
-        low = spread;
-        up = spread;
-        if(z1 > 0)
-            up = up + z1;
-        else
-            low = low - z1;
-        low = y0 - low;
-        up = y0 + up;
-        eval1 = CGAL_SGN(low);
-        eval2 = CGAL_SGN(up);
-    }
-    //if(eval1*eval2 < 0)
-      //  std::cerr << "eval1 = " << low << "; eval2 = " << up << std::endl;
-    zero_bounds = ((eval1 & eval2) == 0);
-    return (eval1*eval2 < 0);
-}
-
-//! \brief evaluates a univariate polynomial over an interval using
-//! Modified Affine Arithmetic 
-bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, 
-    const Poly_1& poly, int check = 1)
-{
-    Derivative_2 *der = (var == CGAL_X_RANGE) ? der_x : der_y;
-    // stores precomputed polynomial derivatives and binominal coeffs
-    Derivative_1 der_cache
-        //(der->size()+1, NT(0))
-        , binom;//(der->size()+1, NT(0));
-    NT l(l_), r(r_), l1, r1, low = NT(1), up = NT(-1);
-    NT v1, v2, v;
-    int eval1, eval2;
-
-    first_der = false, sign_change = false;
-    if(poly.degree()==0) {
-        zero_bounds = false;
-        return (poly.lcoeff()==NT(0.0));
-    }
-    if(l_ == r_) {
-        first_der = false;
-        return false;
-    }
-    if(l > r) {
-        l = r_;
-        r = l_;
-    }
-    eval1 = evaluate_generic(var, l, key, poly);
-    eval2 = evaluate_generic(var, r, key, poly);
-    
-    sign_change = (eval1*eval2 < 0);
-    zero_bounds = ((eval1&eval2) == 0);
-    
-    if((sign_change || zero_bounds) && check == 1)
-        return true;
-    
-    if(var == CGAL_X_RANGE) {
-        l1 = x_min + l*pixel_w;
-        r1 = x_min + r*pixel_w;
-    } else {
-        l1 = y_min + l*pixel_h;
-        r1 = y_min + r*pixel_h;
-    }
-    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2;
-    make_exact(x0);
-    make_exact(x1);
-    
-    int d = 0;
-    v1 = evaluate(poly, x0);
-    //der_cache[d] = v1; 
-    der_cache.push_back(v1);
-    v = x1, d++;
-    der_iterator_2 der_it_2;
-    for(der_it_2 = der->begin(); der_it_2 != der->end(); der_it_2++) {
-        v1 = evaluate_der((*der_it_2), poly, x0);
-        der_cache.push_back(v1);
-        //der_cache[d] = v1; // replace by push_backs ?
-        //binom[d] = v; 
-        binom.push_back(v);
-        d++;
-        //v *= x1/d; 
-        //make_exact(v);
-        v *= x1; // ONLY when derivative coefficients are normalized
-    }
-
-    typename Renderer_traits::Extract_eval extract;
-    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE;
-    if(index >= der->size()) {
-        low = up = extract(poly.lcoeff()) * (der->end()-1)->lcoeff();
-    } else {
-        der_it_2 = der->begin()+index;
-        low = 1;
-        up = -1;
-    }
-    // assume we have an array of derivatives: 
-    // der_cache: {f^(0); f^(1); f^(2); ...}
-    // and binominal coefficients: [h; h^2/2; h^3/6; ... h^d/d!]
-    der_iterator_1 eval_it = der_cache.end()-1, local_it, binom_it,
-                   eval_end = der_cache.end();
-    d = poly.degree();
-    der_it_2 = der->end()-1;
-    while(1) {//der_it!=end) {
-        if(low * up < 0) {
-            v2 = *eval_it;
-            local_it = eval_it + 1;
-            binom_it = binom.begin();
-            low = v2, up = v2;
-            while((local_it) != eval_end) {// calculate derivative bounds
-                v1 = (*local_it++) * (*binom_it++);
-                if(v1 >= 0) { // derivative index is odd
-                    up += v1; 
-                    low -= v1; 
-                } else {     
-                    up -= v1; 
-                    low += v1; 
-                }
-                if(local_it == eval_end) 
-                    break;
-                // derivative index is even
-                v1 = (*local_it++) * (*binom_it++);
-                (v1 > 0) ? up += v1 : low += v1;
-            }
-            eval1 = CGAL_SGN(low);
-            eval2 = CGAL_SGN(up);
-       
-        } else if(d > 0) {
-            low = evaluate_der((*der_it_2), poly, l1);
-            up = evaluate_der((*der_it_2), poly, r1);
-            eval1 = CGAL_SGN(low);
-            eval2 = CGAL_SGN(up);
-            
-        } else if(d == 0)
-            ;//Gfx_DETAILED_OUT("MAA bounds: sign change\n");
-                        
-        if(d == 1 && check == 3) {
-            first_der = (eval1*eval2 < 0);
-            if(sign_change||zero_bounds) 
-                return true;
-        } else if(d == 0) {
-            
-            zero_bounds = ((eval1&eval2) == 0);
-            return (eval1*eval2 < 0);
-        }
-        d--; der_it_2--;
-        if((eval_it--) == der_cache.begin()) 
-            break;
-    }
-    return true;
-}
-
-//! \brief fixes one coordinate of a bivariate polynomial, uses caching
-//! if appropriate 
-void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly)
-{
-    NT key1;
-    //Poly_cache *cached = cached_x;
-    Poly_2 *coeffs = coeffs_x;
-    //typename boost::multi_index::nth_index_iterator<Poly_cache,1>::type it;
-    bool not_cached = true,
-            /*(level >= CGAL_MAX_POLY_CACHE_LEVEL)*/ not_found = false;
-    
-    if(var == CGAL_Y_RANGE) {
-        //cached = cached_y; 
-        coeffs = coeffs_y; 
-        key1 = x_min + key*pixel_w;
-    } else 
-        key1 = y_min + key*pixel_h;
-        
-//     if(!not_cached) {
-//         typename boost::multi_index::nth_index<Poly_cache,1>::type& 
-//             idx = cached->get<1>();
-//         it = idx.find(key1); //*4
-//         not_found = (it == idx.end());
-//     }
-    
-    if(not_cached||not_found) {
-        poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), 
-                            std::bind2nd(std::ptr_fun(binded_eval), key1)),
-                      ::boost::make_transform_iterator(coeffs->end(),   
-                            std::bind2nd(std::ptr_fun(binded_eval), key1)));
-        if(not_cached)
-            return;
-    // all available space consumed: drop the least recently used entry
-//         if(cached->size() >= CGAL_POLY_CACHE_SIZE)
-//             cached->pop_back();
-//         cached->push_front(Poly_entry(key1,poly)); //*4
-//         return;
-    } 
-//     cached->relocate(cached->begin(), cached->project<0>(it));
-//     poly = (*it).second;
-}
-
-//! \brief computes the sign of univariate polynomial at (x; y). 
-//!
-//! if computation with the current precision is not reliable, the sign is
-//! recomputed with modular or exact rational arithmetic
-int evaluate_generic(int var, const NT& c, const NT& key, const Poly_1& poly)
-{   
-    NT x = key, y = c, c1;
-    
-    if(var == CGAL_X_RANGE) {
-        x = c;
-        y = key;
-        c1 = x_min + c*pixel_w;
-    } else
-        c1 = y_min + c*pixel_h;
-
-    bool error_bounds_;
-    int sign;
-    NT res = evaluate(poly, c1, &error_bounds_);
-
-    if(error_bounds_) 
-        sign = evaluate_rational(var, c, key);
-    else
-        sign = CGAL_SGN(res);
- 
-    return sign;
-}
-
-//! \brief evaluates a polynomial at (x, y) using exact rational arithmetic
-int evaluate_rational(int var, const NT& c, const NT& key)
-{
-    //Rational_poly_1 poly;
-    Rational c_r = float2rat(c), key_r = float2rat(key);
-    c_r = (var == CGAL_X_RANGE) ? (x_min_r + c_r*pixel_w_r) :
-        (y_min_r + c_r*pixel_h_r);
-        
-    Rational_poly_2 *rat = rational_x;
-    if(var == CGAL_Y_RANGE) {
-        rat = rational_y; 
-        key_r = x_min_r + key_r*pixel_w_r;
-    } else 
-        key_r = y_min_r + key_r*pixel_h_r;
-
-    Rat_coercion_type res = substitute_xy(*rat, key_r, c_r);
-    return CGAL_SGN(res);
-}
-
-//! precomputes polynomials and derivative coefficients
-void precompute(const Polynomial_2& in) {
-
-    typedef typename Polynomial_traits_2::Innermost_coefficient_type Coeff_src;
-    
-    Max_coeff<Coeff_src> max_coeff;
-    Coeff_src max_c = max_coeff(in);
-    /////// magic symbol ////////////
-    // somehow relates to double precision fix
-    std::cerr << ' ';
-
-    typedef Reduce_by<Rat_coercion_type, Coeff_src> Reduce_op;
-    Transform<Rational_poly_2, Polynomial_2, Reduce_op> transform;
-    Reduce_op op(max_c);
-    
-    typedef CGAL::Polynomial_traits_d<Rational_poly_2> RP_traits;
-    *rational_y = transform(in, op); // divides by maximal coefficient
-    *rational_x = typename RP_traits::Swap()(*rational_y, 0, 1);
-
-    // rational fx and fy must have y outermost var and x innermost
-    *rational_fx = typename RP_traits::Differentiate()(*rational_y, 0);
-    *rational_fy = typename RP_traits::Differentiate()(*rational_y, 1);
-
-    typename Renderer_traits::Convert_poly convert_poly;
-    ////////////////////////////////////////////////////////
-    /////// ATTENTION: need to call makeExact for bigfloats after conversion
-    ////////////////////////////////////////////////////////
-    *coeffs_y = convert_poly(*rational_y);
-    *coeffs_x = typename CGAL::Polynomial_traits_d<Poly_2>::
-            Swap()(*coeffs_y, 0, 1);
-
-    int degree_x = coeffs_x->degree(),
-        degree_y = coeffs_y->degree();
-/*    cached_x->clear(); 
-    cached_y->clear(); */
-    der_x->clear();
-    der_y->clear();
-    int i, j, maxdeg = (degree_x > degree_y ? degree_x : degree_y);
-    std::vector<NT> X(maxdeg, NT(0));
-    der_x->reserve(degree_x);
-    der_y->reserve(degree_y);
-
-    NT det(1.0);
-    for(i = 0; i < degree_x; i++) {
-        if(i != 0) 
-            det = X[0];
-        for(j = 1; j <= degree_x - i; j++) {
-            // divide by the lowest coefficient ?
-            X[j - 1] = (i == 0 ? NT(j) : X[j] * NT(j) / det);
-            make_exact(X[j-1]);
-        }
-        der_x->push_back(CGAL::Polynomial<NT>(X.begin(),
-            (X.begin() + degree_x - i)));
-    }
-
-    det = NT(1.0);
-    for(i = 0; i < degree_y; i++) {
-        if(i != 0) 
-            det = X[0];
-        for(j = 1; j <= degree_y - i; j++) {
-            // divide by the lowest coefficient ?
-            X[j - 1] = (i == 0 ? NT(j) : X[j] * NT(j) / det); 
-            make_exact(X[j-1]);
-        }
-        der_y->push_back(CGAL::Polynomial<NT>(X.begin(),
-                (X.begin() + degree_y - i)));
-    }
-}
-
-//! \brief activates the cache entry \c cache_id 
-void select_cache_entry(int cache_id)
-{
-    coeffs_x = coeffs_x_ + cache_id;
-    coeffs_y = coeffs_y_ + cache_id;
-    rational_x = rational_x_ + cache_id;
-    rational_y = rational_y_ + cache_id;
-    rational_fx = rational_fx_ + cache_id;
-    rational_fy = rational_fy_ + cache_id;
-    der_x = der_x_ + cache_id;
-    der_y = der_y_ + cache_id;
-/*    cached_x = cached_x_ + cache_id; 
-    cached_y = cached_y_ + cache_id;*/
-}
-
-//! \brief empties all cache instances
-void clear_caches() {
-
-    for(unsigned i = 0; i < CGAL_N_CACHES; i++) {
-/*        cached_x_[i].clear(); 
-        cached_y_[i].clear(); */
-        der_x_[i].clear();
-        der_y_[i].clear();
-    }
-}
-
-//!@}
-
-}; // Curve_renderer_internals
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
deleted file mode 100644
index ed7caa6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
+++ /dev/null
@@ -1,599 +0,0 @@
-// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
-//
-// ============================================================================
-
-#ifndef CGAL_CKVA_CURVE_RENDERER_TRAITS_H
-#define CGAL_CKVA_CURVE_RENDERER_TRAITS_H
-
-#include <CGAL/basic.h>
-#include <CGAL/function_objects.h>
-
-/*! \file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
- * \brief
- * defines class Curve_renderer_traits.
- * 
- * provides specialisations of Curve_renderer_traits for different number
- * types compatible with the curve renderer
-*/
- 
-namespace CGAL {
-
-// transformation routine
-namespace internal {
-
-//! this exception is thrown whenever the precision of used number
-//! type is not sufficient
-class Insufficient_rasterize_precision_exception
-{  };
-
-#ifndef CGAL_MAX_COEFF_TRANSFORM
-#define CGAL_MAX_COEFF_TRANSFORM
-
-#ifndef CGAL_ABS
-#define CGAL_ABS(x) ((x) < 0 ? -(x): (x))
-#endif
-
-#ifndef CGAL_SGN
-#define CGAL_SGN(x) ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0))
-#endif
-
-template <class NT>
-struct Max_coeff
-{
-    template <class X>
-    NT operator()(const CGAL::Polynomial<X>& p) const
-    {
-        typename CGAL::Polynomial<X>::const_iterator it = p.begin();
-        Max_coeff<NT> max_coeff;
-        NT max(max_coeff(*it));
-        while(++it != p.end()) {
-            NT tmp(max_coeff(*it));
-            if(max < CGAL_ABS(tmp))
-                max = CGAL_ABS(tmp);
-        }
-        return max;
-    }
-    NT operator()(const NT& x) const
-    { return CGAL_ABS(x); }
-};
-
-/*!\brief
- * divides an input value by a contant
- *
- * provided that there is a coercion between \c Input and \c Result types
- */
-template <class Result, class Input>
-struct Reduce_by {
-
-    typedef Input argument_type;
-    typedef Result result_type;
-
-    Reduce_by(const Input& denom_) :
-        denom(cast(denom_)) {
-    }
-    
-    Result operator()(const Input& x) {
-        return (cast(x)/denom);
-    }
-
-    typename CGAL::Coercion_traits<Input, Result>::Cast cast;
-    Result denom;
-};
-
-/*!\brief
- * transforms bivaritate polynomial of type \c InputPoly_2 to
- * \c OutputPoly_2 by recursively applying operation \c Op to all of its
- * coefficients
- *
- * <tt>Op: InputPoly_2::Inntermost_coefficient_type ->
- *             OutputPoly_2::Inntermost_coefficient_type</tt>
- */
-template <class OutputPoly_2, class InputPoly_2, class Op>
-struct Transform {
-
-    typedef InputPoly_2  first_argument_type;
-    typedef Op           second_argument_type;
-    typedef OutputPoly_2 result_type;
-
-    template <class X>
-    OutputPoly_2 operator()(const CGAL::Polynomial<X>& p, Op op = Op()) const {
-
-        Transform<typename OutputPoly_2::NT, typename InputPoly_2::NT, Op> tr;
-        return OutputPoly_2(
-            ::boost::make_transform_iterator(p.begin(), std::bind2nd(tr, op)),
-            ::boost::make_transform_iterator(p.end(), std::bind2nd(tr, op)));
-    }
-
-    OutputPoly_2 operator()(
-        const typename Innermost_coefficient_type<InputPoly_2>::Type& x, Op op)
-        const {
-        return static_cast<OutputPoly_2>(op(x));
-    }
-};
-
-#endif // CGAL_MAX_COEFF_TRANSFORM
-
-/*!\brief
- * class template \c Curve_renderer_traits
- *
- * this traits class prodives various number type conversions for the
- * curve renderer
- */              
-
-template <class Coeff_, class Integer_, class Rational_>
-struct Curve_renderer_traits_base 
-{ 
-    //! type of innermost polynomial coefficients
-    typedef Coeff_ Coeff;
-    
-    //! an integer number type
-    typedef Integer_ Integer; 
-
-    typedef Rational_ Rational;
-
-    //! conversion from rational to floating-point
-    template <class Float>
-    struct Rat_to_float {
-        typedef Float result_type;
-
-        template <class X, class Y,class ACDE_TAG,class FP_TAG>
-        Float operator()(const Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>& x) const { 
-            typename CGAL::Coercion_traits<Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>, Float>::Cast
-                cast;        
-            return cast(x); 
-        }
-
-        Float operator()(const Rational& x) const { 
-            return static_cast<Float>(x); 
-        }
-    };
-   
-    //! provided for convenience when there exists an implicit coercion
-    //! between number types
-    template <class To>
-    struct Implicit_coercion {
-        typedef To result_type;
-        
-        template <class From> 
-        To operator()(const From& x) const {
-            return static_cast<To>(x);
-        }
-    };
-   
-    struct Float_to_int {
-        typedef int result_type;
-        
-        template <class Float>
-        int operator()(const Float& x) const
-        { return static_cast<int>(std::floor(CGAL::to_double(x))); }
-            //return static_cast<int>(std::floor(x)); }
-    };
-
-    /*!\brief
-     * conversion from bivariate polynomial over extended number type to
-     * polynomial with coefficients of type \c Coeff
-     *
-     * valid instantiations of \c Extended number type are \c Rational ,
-     * \c FieldWithSqrt , etc. Provided that there is a type coercion between
-     * \c Extended and \c Coeff
-     */
-    struct Convert_poly { 
-        typedef CGAL::Polynomial<CGAL::Polynomial<Coeff> > result_type;
-        
-        template <class Extended>
-        inline result_type operator()(const 
-            CGAL::Polynomial<CGAL::Polynomial<Extended> >& poly) const {
-            
-    //!@todo: use Rat_to_float functor instead of coercion traits ?
-    //! need some sort of polymorphism..
-
-            //std::cerr << "calling transform..\n";
-            typedef typename CGAL::Coercion_traits<Extended, Coeff>::Cast
-                Cast;
-            Transform<result_type,
-                    CGAL::Polynomial<CGAL::Polynomial<Extended> >, Cast>
-                transform;
-            return transform(poly);
-        }
-    };
-    
-    //! converts polynomial coefficients to floating-point representation
-    //! \c error_bounds is set if the result is not reliable
-    struct Extract_eval {
-        typedef Coeff argument_type;
-        typedef Coeff result_type;
-        
-        Coeff operator()(const Coeff& x, 
-            bool *error_bounds = NULL) const { 
-            if(error_bounds != NULL)
-                 *error_bounds = false;
-            return x;
-        }
-    };
-    
-    //! computes a 32-bit hash value from floating-point argument
-    struct Hash_function {
-        typedef std::size_t result_type;
-        struct long_long {
-            long low, high;
-        };
-        
-        template <class Float>
-        std::size_t operator()(const Float& key) const {
-            const long_long *hk = reinterpret_cast<const long_long *>(&key);
-            return (hk->low ^ hk->high);
-        }
-    };
-    
-    //! makes result exact after inexact operation such as div, sqrt, etc.
-    //! (required for multi-precision arithmetic)
-    struct Make_exact {
-        typedef void result_type;
-        
-        template <class Float>
-        void operator()(const Float& x) const
-        { }
-    };
-    
-    //! compares a given quantity with the precision limit a floating-point
-    //! number type, returns \c true if this limit is exceeded
-    struct Precision_limit {
-        typedef bool result_type;
-        
-        template <class Float>
-        bool operator()(const Float& x) const
-        { return false;/*(CGAL_ABS(x) <= 1e-16)*/; }
-    };
-    
-    //! maximum subdivision level for the curve renderer by exceeding which
-    //! an exception of type \c Insufficient_rasterize_precision_exception
-    //! will be thrown, this is also limited by \c Integer number type, since
-    //! the integer must be able to store numbers up to 2^MAX_SUBDIVISION_LEVEL
-    static const unsigned MAX_SUBDIVISION_LEVEL = 12;   
-};
-
-template <class Float, class Rational>
-struct Curve_renderer_traits 
-{  };
-
-#ifdef CGAL_USE_CORE
-//! Specialization for \c CGAL::Interval_nt<true>
-template <>
-struct Curve_renderer_traits<CGAL::Interval_nt<true>, CORE::BigRat > :
-        public Curve_renderer_traits_base<CGAL::Interval_nt<true>, int,
-            CORE::BigRat> {
- 
-    typedef double Float;
-
-    struct Rat_to_float {
-        typedef Float result_type;
-                
-        template <class Extended>
-        Float operator()(const Extended& x) const {
-            return CGAL::to_double(x); 
-        }
-    };
-
-    typedef Implicit_coercion<double> Float_to_rat;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-
-        Integer operator()(const Rational& x) const {
-            return static_cast<int>(std::floor(CGAL::to_double(x)));
-        }
-    };
-
-    struct Extract_eval {
-        typedef Coeff argument_type;
-        typedef Float result_type;
-        
-        Float operator()(const Coeff& x, 
-                    bool *error_bounds = NULL) const { 
-            bool err_bnd;
-//             err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
-//                 ((l <= 0 && u >= 0));
-            Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
-            err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
-            if(error_bounds != NULL)
-                *error_bounds = err_bnd;
-//! ATTENTION!!! if smth is screwed up try to uncomment the line below
-//! this is very crucial for performance & stability
-            if(err_bnd)  // &&  ABS(mid) < 1E-15)
-                return 0; 
-//! ATTENTION!!!
-            return mid;
-        }
-    };
-
-    //! compares a given quantity with the precision limit a floating-point
-    //! number type, returns \c true if this limit is exceeded
-    struct Precision_limit {
-        typedef bool result_type;
-        
-        template <class Float>
-        bool operator()(const Float& x) const
-        { return (CGAL_ABS(x) <= 1e-16); }
-    };
-
-    static const unsigned MAX_SUBDIVISION_LEVEL = 12;
-};
-
-//! Specialization for \c CORE::BigFloat
-template <>
-struct Curve_renderer_traits<CORE::BigFloat, class CORE::BigRat> 
-         : public Curve_renderer_traits_base<CORE::BigFloat, CORE::BigInt,
-                CORE::BigRat> {
-
-    typedef CORE::BigFloat Float;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-        
-        Integer operator()(const Rational& x) const { 
-            return x.BigIntValue(); 
-        }
-    };
-
-    typedef Rat_to_float<Float> Rat_to_float;
-    
-    struct Float_to_rat {
-        typedef Float argument_type;
-        typedef Rational result_type;
-        
-        Rational operator()(const Float& x) const
-        { return x.BigRatValue(); }
-    };
-    
-    struct Hash_function {
-        typedef Float argument_type;
-        typedef std::size_t result_type;
-        
-        inline result_type operator()(const Float& key) const {
-            const CORE::BigFloatRep& rep = key.getRep();
-            std::size_t ret = reinterpret_cast<std::size_t>(&rep);
-            return ret;
-        }
-    };
-    
-    struct Make_exact {
-        typedef Float argument_type;
-        typedef void result_type;
-        
-        inline void operator()(Float& x) const
-        { x.makeExact(); }
-    };
-
-    static const unsigned MAX_SUBDIVISION_LEVEL = 12;
-};
-
-//! Specialization for \c CORE::BigRat
-template <>
-struct Curve_renderer_traits<CORE::BigRat, CORE::BigRat> : 
-    public Curve_renderer_traits_base<CORE::BigRat, CORE::BigInt,
-        CORE::BigRat> {
-
-    typedef CORE::BigRat Float;
-
-    typedef Rat_to_float<Float> Rat_to_float;
-
-    typedef Implicit_coercion<Float> Float_to_rat;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-        
-        Integer operator()(const Rational& x) const { 
-            return x.BigIntValue(); 
-        }
-    };
-    
-    struct Hash_function {
-        typedef Float argument_type;
-        typedef std::size_t result_type;
-        
-        inline result_type operator()(const Float& key) const {
-            const CORE::BigRatRep& rep = key.getRep();
-            std::size_t ret = reinterpret_cast<std::size_t>(&rep);
-            return ret;
-        }
-    };
-};
-#endif // CGAL_USE_CORE
-
-#ifdef CGAL_USE_LEDA
-template <>
-struct Curve_renderer_traits<CGAL::Interval_nt<true>, leda::rational > :
-        public Curve_renderer_traits_base<CGAL::Interval_nt<true>, int,
-            leda::rational> {
- 
-    typedef double Float;
-
-    struct Rat_to_float {
-        typedef Float result_type;
-                
-        template <class Extended>
-        Float operator()(const Extended& x) const {
-            return CGAL::to_double(x); 
-        }
-    };
-
-    typedef Implicit_coercion<double> Float_to_rat;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-
-        Integer operator()(const Rational& x) const {
-            return static_cast<int>(std::floor(CGAL::to_double(x)));
-            //return static_cast<int>(x.to_double());
-        }
-    };
-
-    struct Extract_eval {
-        typedef Coeff argument_type;
-        typedef Float result_type;
-        
-        Float operator()(const Coeff& x, 
-                    bool *error_bounds = NULL) const { 
-            bool err_bnd;
-//             err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
-//                 ((l <= 0 && u >= 0));
-            Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
-            err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
-            if(error_bounds != NULL)
-                *error_bounds = err_bnd;
-//! ATTENTION!!! if smth is screwed up try to uncomment the line below
-//! this is very crucial for performance & stability
-            if(err_bnd)  // &&  ABS(mid) < 1E-15)
-                return 0; 
-//! ATTENTION!!!
-            return mid;
-        }
-    };
-
-    //! compares a given quantity with the precision limit a floating-point
-    //! number type, returns \c true if this limit is exceeded
-    struct Precision_limit {
-        typedef bool result_type;
-        
-        template <class Float>
-        bool operator()(const Float& x) const
-        { return (CGAL_ABS(x) <= 1e-16); }
-    };
-};
-
-//! Specialization for \c leda::bigfloat
-template <>
-struct Curve_renderer_traits<leda::bigfloat, class leda::rational> 
-         : public Curve_renderer_traits_base<leda::bigfloat, leda::integer,
-                leda::rational> {
-
-    typedef leda::bigfloat Float;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-        
-        Integer operator()(const Rational& x) const { 
-            return leda::floor(x); 
-        }
-    };
-
-    struct Rat_to_float {
-        typedef Float result_type;
-
-        template <class X, class Y,class ACDE_TAG,class FP_TAG>
-        Float operator()(const Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>& x) const { 
-            typename CGAL::Coercion_traits<Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>, Float>::Cast
-                cast;        
-            return cast(x); 
-        }
-        // no implicit coercion between leda rational and floats, therefore
-        // decompose rational to compute the result
-        Float operator()(const Rational& x) const { 
-            return (static_cast<Float>(x.numerator()) / 
-                    static_cast<Float>(x.denominator())); 
-        }
-    };
-    
-    struct Float_to_rat {
-        typedef Float argument_type;
-        typedef Rational result_type;
-        
-        Rational operator()(const Float& x) const
-        { return x.to_rational(); }
-    };
-    
-    struct Convert_poly { 
-        typedef CGAL::Polynomial<CGAL::Polynomial<Coeff> > result_type;
-        
-        template <class Extended>
-        inline result_type operator()(const 
-            CGAL::Polynomial<CGAL::Polynomial<Extended> >& poly) const {
-            
-            Transform<result_type,
-                CGAL::Polynomial<CGAL::Polynomial<Extended> >,
-                    Rat_to_float> transform;
-            return transform(poly);
-        }
-    };
-    
-    struct Hash_function {
-        typedef Float argument_type;
-        typedef std::size_t result_type;
-        
-        inline result_type operator()(const Float& key) const {
-           return static_cast<std::size_t>(
-                    key.get_significant_length());
-        }
-    };
-};
-
-//! Specialization for \c leda::rational
-template <>
-struct Curve_renderer_traits<leda::rational, leda::rational> : 
-    public Curve_renderer_traits_base<leda::rational, leda::integer,
-        leda::rational> {
-
-    typedef leda::rational Float;
-
-    typedef Rat_to_float<Float> Rat_to_float;
-
-    typedef Implicit_coercion<Float> Float_to_rat;
-
-    struct Rat_to_integer {
-        typedef Rational argument_type;
-        typedef Integer result_type;
-        
-        Integer operator()(const Rational& x) const { 
-            return leda::floor(x);  
-        }
-    };
-    
-    struct Hash_function {
-        typedef Float argument_type;
-        typedef std::size_t result_type;
-        
-        inline result_type operator()(const Float& key) const {
-            std::size_t ret = reinterpret_cast<std::size_t>(
-                key.numerator().word_vector());
-            return ret;
-        }
-    };
-
-    struct Make_exact {
-        typedef Float argument_type;
-        typedef void result_type;
-        
-        inline void operator()(Float& x) const
-        { x.normalize(); }
-    };
-};
-
-#endif // CGAL_USE_LEDA
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_CKVA_CURVE_RENDERER_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dart.h b/3rdparty/CGAL-4.6/include/CGAL/Dart.h
deleted file mode 100644
index cbf54b4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Dart.h
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_DART_H
-#define CGAL_DART_H 1
-
-#include <CGAL/Compact_container.h>
-#include <CGAL/assertions.h>
-#include <bitset>
-
-namespace CGAL {
-
-  /** @file Dart.h
-   * Definition of nD dart.
-   */
-
-  namespace internal {
-    template <typename Map,unsigned int i>
-    struct basic_link_beta_functor;
-
-    template <typename CMap,unsigned int i>
-    struct link_beta_functor;
-  }
-
-#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
-
-  /** Definition of nD dart.
-   * The Dart class describes an nD dart (basic element of a
-   * combinatorial map). A dart is composed with handle towards its neighbors,
-   * a bitset containing Boolean marks, and handle towards enabled attributes.
-   * n is the dimension of the space (2 for 2D, 3 for 3D...)
-   * Refs the ref class
-   */
-  template <unsigned int d, typename Refs>
-  struct Dart
-  {
-    template < unsigned int, class, class, class, class >
-    friend class Combinatorial_map_base;
-
-    template<unsigned int, class, class>
-    friend class Combinatorial_map_storage_1;
-
-    template<unsigned int, class, class>
-    friend class Combinatorial_map_storage_2;
-
-    template<unsigned int, unsigned int, class, class, class>
-    friend class Linear_cell_complex_storage_1;
-
-    template<unsigned int, unsigned int, class, class, class>
-    friend class Linear_cell_complex_storage_2;
-
-    template <class, class, class, class>
-    friend class Compact_container;
-
-    template<class, unsigned int, unsigned int>
-    friend struct Remove_cell_functor;
-
-    template<class, unsigned int>
-    friend struct Contract_cell_functor;
-
-    template <typename,unsigned int>
-    friend struct internal::link_beta_functor;
-
-    template <typename, typename>
-    friend struct internal::Reverse_orientation_of_map_functor;
-
-    template <typename, typename>
-    friend struct internal::Reverse_orientation_of_connected_component_functor;
-
-  public:
-    typedef Dart<d,Refs>                     Self;
-    typedef typename Refs::Dart_handle       Dart_handle;
-    typedef typename Refs::size_type         size_type;
-    typedef typename Refs::Dart_const_handle Dart_const_handle;
-    typedef typename Refs::Helper            Helper;
-    /// Typedef for attributes
-    template<int i>
-    struct Attribute_handle: public Refs::template Attribute_handle<i>
-    {};
-    template<int i>
-    struct Attribute_const_handle:
-      public Refs::template Attribute_const_handle<i>
-    {};
-
-    /// The number of used marks.
-    static const size_type NB_MARKS = Refs::NB_MARKS;
-
-    /// The dimension of the combinatorial map.
-    static const unsigned int dimension = d;
-
-#ifdef CGAL_CMAP_DEPRECATED
-
-    /** Return if this dart is free for adimension.
-     * @param i the dimension.
-     * @return true iff the dart is linked with NULL for \em adimension.
-     */
-    template<unsigned int i>
-    bool is_free() const
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i] == Refs::null_dart_handle;
-    }
-    bool is_free(unsigned int i) const
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i] == Refs::null_dart_handle;
-    }
-
-    /** Return the highest dimension for which the dart is not free.
-     * @return the dimension d such that the dart is not d-free but k-free for
-     *         all k>d. -1 if the dart is free for all d in {0..n}
-     */
-    int highest_nonfree_dimension() const
-    {
-      for (int i=(int)dimension; i>=0; --i)
-      { if ( !is_free(i) ) return i; }
-      return -1;
-    }
-
-    /** Return a dart belonging to the same edge and to the second vertex
-     * of the current edge (NULL if such a dart does not exist).
-     * @return An handle to the opposite dart.
-     */
-    Dart_handle opposite()
-    {
-      for (unsigned int i = 2; i <= dimension; ++i)
-        if (!is_free(i)) return beta(i);
-      return NULL;
-    }
-    Dart_const_handle opposite() const
-    {
-      for (unsigned int i = 2; i <= dimension; ++i)
-        if (!is_free(i)) return beta(i);
-      return NULL;
-    }
-
-    /** Return a dart incident to the other extremity of the current edge,
-     *  but contrary to opposite, non necessary to the same edge
-     *  (NULL if such a dart does not exist).
-     * @return An handle to the opposite dart.
-     */
-    Dart_handle other_extremity()
-    {
-      for (unsigned int i = 1; i <= dimension; ++i)
-        if (!is_free(i)) return beta(i);
-      return NULL;
-    }
-    Dart_const_handle other_extremity() const
-    {
-      for (unsigned int i = 1; i <= dimension; ++i)
-        if (!is_free(i)) return beta(i);
-      return NULL;
-    }
-
-    /** Link this dart with a given dart for a given dimension.
-     * @param adart the dart to link with.
-     * @param i the dimension.
-     */
-    template<unsigned int i>
-    void basic_link_beta(Dart_handle adart)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(this!=&*Refs::null_dart_handle);
-      mbeta[i] = adart;
-    }
-    void basic_link_beta(Dart_handle adart, unsigned int i)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(this!=&*Refs::null_dart_handle);
-      mbeta[i] = adart;
-    }
-
-    /** Unlink this dart for a given dimension.
-     * @param i the dimension.
-     */
-    template<unsigned int i>
-    void unlink_beta()
-    {
-      CGAL_assertion(i <= dimension);
-      mbeta[i] = Refs::null_dart_handle;
-    }
-    void unlink_beta(unsigned int i)
-    {
-      CGAL_assertion(i <= dimension);
-      mbeta[i] = Refs::null_dart_handle;
-    }
-
-#endif // CGAL_CMAP_DEPRECATED
-
-    /** Return the beta of this dart for a given dimension.
-     * @param i the dimension.
-     * @return beta(\em i).
-     */
-    template<unsigned int i>
-    Dart_handle beta()
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i];
-    }
-    Dart_handle beta(unsigned int i)
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i];
-    }
-    template<unsigned int i>
-    Dart_const_handle beta() const
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i];
-    }
-    Dart_const_handle beta(unsigned int i) const
-    {
-      CGAL_assertion(i <= dimension);
-      return mbeta[i];
-    }
-
-    /** Return the beta inverse of this dart for a given dimension.
-     * @param i the dimension.
-     * @return beta^{-1}(\em i).
-     */
-    template<unsigned int i>
-    Dart_handle beta_inv()
-    { return beta<CGAL_BETAINV(i)>(); }
-    Dart_handle beta_inv(unsigned int i)
-    { return beta(CGAL_BETAINV(i)); }
-    template<unsigned int i>
-    Dart_const_handle beta_inv() const
-    { return beta<CGAL_BETAINV(i)>(); }
-    Dart_const_handle beta_inv(unsigned int i) const
-    { return beta(CGAL_BETAINV(i)); }
-
-    /// @return a handle on the i-attribute
-    template<int i>
-    typename Attribute_handle<i>::type attribute()
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                     "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_handles);
-    }
-    template<int i>
-    typename Attribute_const_handle<i>::type attribute() const
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                     "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-        (mattribute_handles);
-    }
-
-    /** Return the mark value of a given mark number.
-     * @param amark the mark number.
-     * @return the value for this number.
-     */
-    bool get_mark(int amark) const
-    {
-      CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
-      return mmarks[(size_type)amark];
-    }
-
-    /** Set the mark of a given mark number to a given value.
-     * @param amark the mark number.
-     * @param AValue the value.
-     */
-    void set_mark(int amark, bool avalue) const
-    {
-      CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
-      mmarks.set((size_type)amark, avalue);
-    }
-    /** Flip the mark of a given mark number.
-     * @param amark the mark number.
-     */
-    void flip_mark(int amark) const
-    {
-      CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
-      mmarks.flip((size_type)amark);
-    }
-
-    /** Return all the marks of this dart.
-     * @return the marks.
-     */
-     std::bitset<NB_MARKS> get_marks() const
-    { return mmarks; }
-
-    /** Set simultaneously all the marks of this dart to a given value.
-     * @param amarks the value of the marks.
-     */
-     void set_marks(const std::bitset<NB_MARKS>& amarks) const
-    { mmarks = amarks; }
-
-  protected:
-    /** Default constructor: no real initialisation,
-     *  because this is done in the combinatorial map class.
-     */
-    Dart()
-    {}
-
-    /** Copy constructor:
-     * @param adart a dart.
-     */
-    Dart(const Dart& adart) : mmarks(adart.mmarks),
-    mattribute_handles(adart.mattribute_handles)
-    {
-      for (unsigned int i = 0; i <= dimension; ++i)
-        mbeta[i] = adart.mbeta[i];
-    }
-
-   public:
-    void * for_compact_container() const
-    { return mbeta[0].for_compact_container(); }
-    void * & for_compact_container()
-    { return mbeta[0].for_compact_container(); }
-
-  protected:
-    /// Beta for each dimension +1 (from 0 to dimension).
-    Dart_handle mbeta[dimension+1];
-
-    /// Values of Boolean marks.
-    mutable std::bitset<NB_MARKS> mmarks;
-
-    /// Attributes enabled
-    typename Helper::Attribute_handles mattribute_handles;
-  };
-
-} // namespace CGAL
-
-#endif // CGAL_DART_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dart_const_iterators.h b/3rdparty/CGAL-4.6/include/CGAL/Dart_const_iterators.h
deleted file mode 100644
index 0f1272d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Dart_const_iterators.h
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_DART_CONST_ITERATORS_HH
-#define CGAL_DART_CONST_ITERATORS_HH 1
-
-#include <CGAL/Dart_iterators.h>
-
-namespace CGAL {
-
-  /** @file Dart_const_iterators.h
-   * Definition of dart const iterators. There are 9 iterators:
-   *  - CMap_dart_const_iterator_basic_of_orbit<Map,Beta...>
-   *  - CMap_dart_const_iterator_basic_of_cell<Map,i,d>
-   *  - CMap_dart_const_iterator_basic_of_all<Map>
-   *  - CMap_dart_const_iterator_basic_of_involution<Map,i,d>
-   *  - CMap_dart_const_iterator_of_involution_inv<Map,i,d>
-   *  - CMap_dart_const_iterator_of_orbit<Map,Beta...>
-   *  - CMap_dart_const_iterator_of_cell<Map,i,d>
-   *  - CMap_dart_const_iterator_of_involution<Map,i,d>
-   *  - CMap_dart_const_iterator_basic_of_involution_inv<Map,i,d>
-   */
-  //****************************************************************************
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template<typename Map_,unsigned int...Beta>
-  class CMap_dart_const_iterator_basic_of_orbit: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,true,Beta...>
-  {
-  public:
-    typedef CMap_dart_const_iterator_basic_of_orbit<Map_,Beta...> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,true,Beta...> Base;
-
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /// Main constructor.
-    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
-                                            Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /// Main constructor.
-    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
-                                            Dart_const_handle adart,
-                                            int amark):
-      Base(amap,adart,amark)
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_orbit
-    (const CMap_dart_iterator_basic_of_orbit<Map_,Beta...>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart(),
-           it.mmark_number)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,unsigned int...Beta>
-  class CMap_dart_const_iterator_of_orbit: 
-    public CMap_dart_iterator_of_orbit_generic<Map_,true,Beta...>
-  {
-  public:
-    typedef CMap_dart_const_iterator_of_orbit<Map_,Beta...> Self;
-    typedef CMap_dart_iterator_of_orbit_generic<Map_,true,Beta...> Base;
-
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /// Main constructor.
-    CMap_dart_const_iterator_of_orbit(const Map_& amap,
-                                      Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_of_orbit
-    (const CMap_dart_iterator_of_orbit<Map_,Beta...>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-#else
-  //****************************************************************************
-  template<typename Map_,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
-           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_const_iterator_basic_of_orbit: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,true,B1,B2,B3,B4,
-                                                     B5,B6,B7,B8,B9>
-  {
-  public:
-    typedef CMap_dart_const_iterator_basic_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
-                                                    B7,B8,B9> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,true,B1,B2,B3,B4,
-                                                      B5,B6,B7,B8,B9> Base;
-
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /// Main constructor.
-    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
-                                            Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /// Main constructor.
-    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
-                                            Dart_const_handle adart,
-                                            int amark):
-      Base(amap,adart,amark)
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_orbit
-    (const CMap_dart_iterator_basic_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
-     B7,B8,B9>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart(),
-           it.mmark_number)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
-           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_const_iterator_of_orbit: 
-    public CMap_dart_iterator_of_orbit_generic<Map_,true,B1,B2,B3,B4,
-                                               B5,B6,B7,B8,B9>
-  {
-  public:
-    typedef CMap_dart_const_iterator_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
-                                              B7,B8,B9> Self;
-    typedef CMap_dart_iterator_of_orbit_generic<Map_,true,B1,B2,B3,B4,
-                                                B5,B6,B7,B8,B9> Base;
-
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /// Main constructor.
-    CMap_dart_const_iterator_of_orbit(const Map_& amap,
-                                      Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_of_orbit
-    (const CMap_dart_iterator_of_orbit<Map_,B1,B2,B3,B4,B5,B6,B7,B8,B9>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  //****************************************************************************
-  template<typename Map_>
-  class CMap_dart_const_iterator_basic_of_all:
-    public CMap_dart_iterator_basic_of_all<Map_,true>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_all<Map_,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_all(const Map_& amap, 
-                                          Dart_const_handle adart):
-      Base(amap,adart)
-    {}                                         
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_all(const Map_& amap,
-                                          Dart_const_handle adart,
-                                          int /*amark*/):
-      Base(amap,adart)
-    {}                                                         
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_all
-    (const CMap_dart_iterator_basic_of_all<Map_,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension>
-  class CMap_dart_const_iterator_basic_of_cell:
-    public CMap_dart_iterator_basic_of_cell<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_cell(const Map_& amap, 
-                                           Dart_const_handle adart):
-      Base(amap,adart)                               
-    {}                                                         
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_cell(const Map_& amap, 
-                                           Dart_const_handle adart, int amark):
-      Base(amap,adart,amark)                               
-    {}                                                         
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_cell
-    (const CMap_dart_iterator_basic_of_cell<Map_,i,d,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_, int i, int d=Map_::dimension>
-  class CMap_dart_const_iterator_of_cell: 
-    public CMap_dart_iterator_of_cell<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_of_cell<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_of_cell(const Map_& amap, 
-                                     Dart_const_handle adart):
-      Base(amap,adart)                               
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_of_cell
-    (const CMap_dart_iterator_of_cell<Map_,i,d,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}                                       
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension>
-  class CMap_dart_const_iterator_basic_of_involution:
-    public CMap_dart_iterator_basic_of_involution<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
-                                                 Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /* Main constructor. */
-    CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
-                                                 Dart_const_handle adart,
-                                                 int amark):
-      Base(amap,adart,amark)
-    {}
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_involution
-    (const CMap_dart_iterator_basic_of_involution<Map_,i,d,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart(), it.mmark_number)
-    {}                                        
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension>
-  class CMap_dart_const_iterator_of_involution:
-    public CMap_dart_iterator_of_involution<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_of_involution<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_of_involution(const Map_& amap, 
-                                           Dart_const_handle adart):
-      Base(amap,adart)
-    {}                                                         
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_of_involution
-    (const CMap_dart_iterator_of_involution<Map_,i,d,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension>
-  class CMap_dart_const_iterator_basic_of_involution_inv:
-    public CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */
-    CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, 
-                                                     Dart_const_handle adart):
-      Base(amap,adart)
-    {}
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, 
-                                                     Dart_const_handle adart,
-                                                     int amark):
-      Base(amap,adart,amark)
-    {}                                                         
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_basic_of_involution_inv
-    (const CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,false>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart(), it.mmark_number)
-    {}                                        
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension>
-  class CMap_dart_const_iterator_of_involution_inv:
-    public CMap_dart_iterator_of_involution_inv<Map_,i,d,true>
-  {
-  public:
-    typedef CMap_dart_iterator_of_involution_inv<Map_,i,d,true> Base;
-    typedef typename Map_::Dart_const_handle Dart_const_handle;
-
-    /* Main constructor. */                                       
-    CMap_dart_const_iterator_of_involution_inv(const Map_& amap, 
-                                               Dart_const_handle adart):
-      Base(amap,adart)
-    {}                                                         
-    /// Constructor from non const version.
-    CMap_dart_const_iterator_of_involution_inv
-    (const CMap_dart_iterator_of_involution_inv<Map_,i,d>& it):
-      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
-           it.get_first_dart())
-    {}
-  };
-  //****************************************************************************
-} // namespace CGAL
-//******************************************************************************
-#endif // CGAL_DART_CONST_ITERATORS_HH
-//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dart_iterators.h b/3rdparty/CGAL-4.6/include/CGAL/Dart_iterators.h
deleted file mode 100644
index b14ea3e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Dart_iterators.h
+++ /dev/null
@@ -1,2727 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_DART_ITERATORS_HH
-#define CGAL_DART_ITERATORS_HH 1
-
-#include <CGAL/Combinatorial_map_iterators_base.h>
-
-namespace CGAL {
-
-  /** @file Dart_iterators.h
-   * Definition of dart iterators. There are 9 iterators:
-   * - CMap_dart_iterator_basic_of_orbit<Map,Beta...>
-   * - CMap_dart_iterator_basic_of_cell<Map,i,d>
-   * - CMap_dart_iterator_basic_of_all
-   * - CMap_dart_iterator_basic_of_involution<Map,i,d>
-   * - CMap_dart_iterator_basic_of_involution_inv<Map,i,d>
-   * - CMap_dart_iterator_of_orbit<Map,Beta...>
-   * - CMap_dart_iterator_of_cell<Map,i,d>
-   * - CMap_dart_iterator_of_involution<Map,i,d>
-   * - CMap_dart_iterator_of_involution_inv<Map,i,d>
-   * but many specializations to optimize specific cases.
-   *
-   */
-  //****************************************************************************
-  //**********************BASIC ITERATORS***************************************
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_orbit<Map, Beta...>: to iterate
-   * on the darts of the orbit <Beta...>
-   */
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template<typename Map,bool Const,int... Beta>
-  class CMap_dart_iterator_basic_of_orbit_generic;
-#else
-  template <typename Map,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
-            int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_iterator_basic_of_orbit_generic;
-
-  template <typename Map,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
-            int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  struct Get_CMap_dart_iterator_basic_of_orbit;
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
-           int B7,int B8,int B9>
-  struct Get_CMap_dart_iterator_basic_of_orbit
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,
-                                                      B5,B6,B7,B8,B9> type;
-  };
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
-           int B7,int B8>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,B4,B5,B6,B7,B8,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,B5,
-                                                      B6,B7,B8> type;
-  };
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
-           int B7>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,B4,B5,B6,B7,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,
-                                                      B1,B2,B3,B4,B5,
-                                                      B6,B7> type;
-  };
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,B4,B5,B6,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,
-                                                      B5,B6> type;
-  };
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,B4,B5,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,B1,B2,B3,B4,
-                                                      B5,Const> type;
-  };
-
-  template<typename Map,bool Const,int B1,int B2,int B3,int B4>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,B4,-1,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,
-                                                      B4> type;
-  };
-
-  template<typename Map, int B1,int B2,int B3,bool Const>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,B3,-1,-1,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3> type;
-  };
-
-  template<typename Map, int B1,int B2,bool Const>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,B2,-1,-1,-1,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2> type;
-  };
-
-  template<typename Map, int B1,bool Const>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               B1,-1,-1,-1,-1,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1> type;
-  };
-
-  template<typename Map,bool Const>
-  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
-                                               -1,-1,-1,-1,-1,-1,-1,-1,-1>
-  {
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const> type;
-  };
-#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  //****************************************************************************
-  // Case when Beta... is empty: iterator of self
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
-                                              int /*amark*/):
-      Base(amap, adart)
-    {}
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      this->set_current_dart(this->mmap->null_handle);
-      this->mprev_op = OP_END;
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_orbit<Map,0>: iterate onto orbit <beta0>.
-   * Begin by turning around the facet with beta0, then turn if
-   * necessary in the second direction by using beta1.
-   */
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
-                                              int /*amark*/):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Assignment operator.
-    Self& operator= (const Self & aiterator)
-    {
-      if (this != &aiterator)
-      {
-        Base::operator=(aiterator);
-        mfirst_dir = aiterator.mfirst_dir;
-      }
-      return *this;
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mfirst_dir = true;
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-
-      if (mfirst_dir && this->mmap->is_free(*this, 0))
-      {
-        this->set_current_dart(this->mfirst_dart);
-        mfirst_dir = false;
-        this->mprev_op = OP_JUMP;
-      }
-      else
-      {
-        this->mprev_op = OP_BETAI;
-      }
-
-      if (mfirst_dir)
-      {
-        CGAL_assertion(!this->mmap->is_free(*this, 0));
-        this->set_current_dart(this->mmap->beta(*this, 0));
-
-        if ((*this)==this->mfirst_dart)
-        {
-          this->set_current_dart(this->mmap->null_handle);
-          this->mprev_op = OP_END;
-        }
-      }
-      else
-      {
-        if (this->mmap->is_free(*this, 1))
-        {
-          this->set_current_dart(this->mmap->null_handle);
-          this->mprev_op = OP_END;
-        }
-        else
-        {
-          this->set_current_dart(this->mmap->beta(*this, 1));
-          this->mprev_op = OP_BETAI_INV;
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Boolean: true iff we turn in the first direction (i.e. using beta0).
-    bool mfirst_dir;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_orbit<Map,1>: iterate onto orbit <beta1>.
-   * Begin by turning around the facet with beta1, then turn if
-   * necessary in the second direction by using beta0.
-   */
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
-                                              int /*amark*/):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mfirst_dir = true;
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-
-      if (mfirst_dir && this->mmap->is_free(*this, 1))
-      {
-        this->set_current_dart(this->mfirst_dart);
-        mfirst_dir = false;
-        this->mprev_op = OP_JUMP;
-      }
-      else
-      {
-        this->mprev_op = OP_BETAI;
-      }
-
-      if (mfirst_dir)
-      {
-        CGAL_assertion(!this->mmap->is_free(*this, 1));
-        this->set_current_dart(this->mmap->beta(*this, 1));
-
-        if ((*this)==this->mfirst_dart)
-        {
-          this->set_current_dart(this->mmap->null_handle);
-          this->mprev_op = OP_END;
-        }
-      }
-      else
-      {
-        if (this->mmap->is_free(*this, 0))
-        {
-          this->set_current_dart(this->mmap->null_handle);
-          this->mprev_op = OP_END;
-        }
-        else
-        {
-          this->set_current_dart(this->mmap->beta(*this, 0));
-          this->mprev_op = OP_BETAI_INV;
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Boolean: true iff we turn in the first direction (i.e. using beta0).
-    bool mfirst_dir;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_orbit<Bi>: to iterate
-   * on the darts of the orbit <Bi> (2<=Bi<=dimension)
-   * (not for beta0 and beta1 which are special cases).
-   */
-  template <typename Map_,bool Const,int Bi>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); }
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
-                                              int /*amark*/):
-      Base(amap, adart)
-    { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Bi))
-      {
-        this->set_current_dart(this->mmap->null_handle);
-        this->mprev_op = OP_END;
-      }
-      else
-      {
-        this->set_current_dart(this->mmap->beta(*this, Bi));
-        this->mprev_op = OP_BETAI;
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * This general case if for Bi>1 and delta>1.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const,int Bi,unsigned int delta>
-  class CMap_dart_iterator_basic_of_two_beta :
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,delta> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    CGAL_static_assertion( Bi>1 && delta>1 && Bi+delta<=Map::dimension );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mcurdart(0)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
-                                         int /*amark*/):
-      Base(amap, adart),
-      mcurdart(0)
-    {}
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mcurdart=0;
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-
-      if (mcurdart==0)
-      {
-        if (!this->mmap->is_free(*this, Bi))
-        {
-          this->set_current_dart(this->mmap->beta(*this, Bi));
-          this->mprev_op = OP_BETAI;
-          mcurdart=1;
-        }
-        else
-        {
-          if (!this->mmap->is_free(*this, Bi+delta))
-          {
-            this->set_current_dart(this->mmap->beta(*this, Bi+delta));
-            this->mprev_op = OP_BETAJ;
-            mcurdart=3;
-          }
-          else
-          {
-            this->mprev_op = OP_END;
-            this->set_current_dart(this->mmap->null_handle);
-          }
-        }
-      }
-      else if (mcurdart==1)
-      {
-        if (!this->mmap->is_free(*this, Bi+delta))
-        {
-          this->set_current_dart(this->mmap->beta(*this, Bi+delta));
-          this->mprev_op = OP_BETAJ;
-          mcurdart=2;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-          this->set_current_dart(this->mmap->null_handle);
-        }
-      }
-      else if (mcurdart==2)
-      {
-        CGAL_assertion(!this->mmap->is_free(*this, Bi));
-        this->set_current_dart(this->mmap->beta(*this, Bi));
-        this->mprev_op = OP_BETAI;
-        mcurdart=1;
-      }
-      else 
-      {
-        CGAL_assertion (mcurdart==3);
-        this->mprev_op = OP_END;
-        this->set_current_dart(this->mmap->null_handle);
-      }
-
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  private:
-    /// mcurdart: number of the current dart (0,1,2 or 3).
-    char mcurdart;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * Special case for Bi==0 and delta==2.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,2> :
-    public CMap_extend_iterator
-  <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>, 2>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,2> Self;
-    typedef CMap_extend_iterator
-    <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>, 2> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    CGAL_static_assertion( 2<=Map::dimension );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
-                                         int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * Special case for Bi==1 and delta==1.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,1> :
-    public CMap_extend_iterator
-  <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>, 2>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,1> Self;
-    typedef CMap_extend_iterator
-    <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>, 2> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    CGAL_static_assertion( 2<=Map::dimension );
-    
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
-                                         int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * Special case for Bi==0 and delta>2.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const, unsigned int delta>
-  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,delta> :
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,delta> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-    
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    CGAL_static_assertion( delta>1 && delta<=Map::dimension );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mit(amap, adart),
-      mexist_betaj(false),
-      mprev_betaj(false),
-      mfirst_border(true)
-    { if (adart!=this->mmap->null_handle)
-        mexist_betaj=!this->mmap->is_free(adart, delta); }
-    
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
-                                         int /*amark*/):
-      Base(amap, adart),
-      mit(amap, adart),
-      mexist_betaj(false),
-      mprev_betaj(false),
-      mfirst_border(true)
-    { if (adart!=this->mmap->null_handle)
-        mexist_betaj=!this->mmap->is_free(adart, delta); }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      if (mexist_betaj && !mprev_betaj)
-      {
-        mprev_betaj = true;
-        mfirst_border = ! mfirst_border;
-        this->set_current_dart(this->mmap->beta(*this, delta));
-        this->mprev_op = OP_BETAJ;
-      }
-      else
-      {
-        mprev_betaj = false;
-        ++mit;
-        this->mprev_op = mit.prev_operation();
-        if ( !mit.cont() ) 
-          this->set_current_dart(this->mmap->null_handle);
-        else
-        {          
-          if ( !mfirst_border ) 
-            this->set_current_dart(mit->beta(delta));
-          else
-            this->set_current_dart(mit);
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mit.rewind();
-      mprev_betaj   = false;
-      mfirst_border = true;
-    }
-
-  private:
-    /// Iterator on beta0
-    CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> mit;
-
-    /// Boolean: true iff there are two half facets.
-    bool mexist_betaj;
-
-    /// Boolean: true iff the last ++ used betaj.
-    bool mprev_betaj;
-
-    /// Boolean: true iff the current dart is on the first border.
-    bool mfirst_border;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * Special case for Bi==1 and delta>1.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const, unsigned int delta>
-  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,delta> :
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,delta> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-    
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    CGAL_static_assertion( delta>1 && delta+1<=Map::dimension );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
-      Base(amap, adart),
-      mit(amap, adart),
-      mexist_betaj(false),
-      mprev_betaj(false),
-      mfirst_border(true)
-    { if (adart!=this->mmap->null_handle)
-        mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
-    
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
-                                         int /*amark*/):
-      Base(amap, adart),
-      mit(amap, adart),
-      mexist_betaj(false),
-      mprev_betaj(false),
-      mfirst_border(true)
-    { if (adart!=this->mmap->null_handle)
-        mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      if (mexist_betaj && !mprev_betaj)
-      {
-        mprev_betaj = true;
-        mfirst_border = ! mfirst_border;
-        this->set_current_dart(this->mmap->beta(*this, 1+delta));
-        this->mprev_op = OP_BETAJ;
-      }
-      else
-      {
-        mprev_betaj = false;
-        ++mit;
-        this->mprev_op = mit.prev_operation();
-        if ( !mit.cont() ) 
-          this->set_current_dart(this->mmap->null_handle);
-        else
-        {          
-          if ( !mfirst_border ) 
-            this->set_current_dart(this->mmap->beta(mit, 1+delta));
-          else
-            this->set_current_dart(mit);
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mit.rewind();
-      mprev_betaj   = false;
-      mfirst_border = true;
-    }
-
-  private:
-    /// Iterator on beta1
-    CMap_dart_iterator_basic_of_orbit_generic<Map_,Const, 1> mit;
-
-    /// Boolean: true iff there are two half facets.
-    bool mexist_betaj;
-
-    /// Boolean: true iff the last ++ used betaj.
-    bool mprev_betaj;
-
-    /// Boolean: true iff the current dart is on the first border.
-    bool mfirst_border;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
-   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
-   * Special case for Bi>1 and delta==1.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_two_beta.
-   */
-  template <typename Map_,bool Const, int Bi>
-  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,1> :
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,1> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-    
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):    
-      Base(amap, adart),
-      mfirst_dir(true),
-      mnext_try_betai(true)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
-                                         int /*amark*/):
-      Base(amap, adart),
-      mfirst_dir(true),
-      mnext_try_betai(true)
-    {}
-    
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mfirst_dir = true;
-      mnext_try_betai   = true;
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-      
-      if (mfirst_dir)
-      {
-        if (mnext_try_betai)
-        {
-          if (this->mmap->is_free(*this, Bi))
-          {
-            mfirst_dir = false;
-            if (this->mmap->is_free(this->mfirst_dart, Bi+1))
-            {
-              this->mprev_op = OP_END;
-              this->set_current_dart(this->mmap->null_handle);
-            }
-            else
-            {
-              this->set_current_dart(this->mmap->beta(this->mfirst_dart, Bi+1));
-              this->mprev_op = OP_JUMP;
-            }
-          }
-          else
-          {
-            this->set_current_dart(this->mmap->beta(*this, Bi));
-            mnext_try_betai = false;
-            this->mprev_op = OP_BETAI;
-          }
-        }
-        else
-        {
-          if (this->mmap->is_free(*this, Bi+1))
-          {
-            mfirst_dir = false;
-            if (this->mmap->is_free(this->mfirst_dart, Bi+1))
-            {
-              this->mprev_op = OP_END;
-              this->set_current_dart(this->mmap->null_handle);
-            }
-            else
-            {
-              this->set_current_dart(this->mmap->beta(this->mfirst_dart, Bi+1));
-              mnext_try_betai = true;
-              this->mprev_op = OP_JUMP;
-            }
-          }
-          else
-          {
-            this->set_current_dart(this->mmap->beta(*this, Bi+1));
-            if ((*this)==this->mfirst_dart)
-            {
-              this->mprev_op = OP_END;
-              this->set_current_dart(this->mmap->null_handle);
-            }
-            else
-            {
-              mnext_try_betai = true;
-              this->mprev_op = OP_BETAJ;
-            }
-          }
-        }
-      }
-      else
-      {
-        if (mnext_try_betai)
-        {
-          if (this->mmap->is_free(*this, Bi))
-          {
-            this->mprev_op = OP_END;
-            this->set_current_dart(this->mmap->null_handle);
-          }
-          else
-          {
-            this->set_current_dart(this->mmap->beta(*this, Bi));
-            mnext_try_betai = false;
-            this->mprev_op = OP_BETAI;
-          }
-        }
-        else
-        {
-          if (this->mmap->is_free(*this, Bi+1))
-          {
-            this->mprev_op = OP_END;
-            this->set_current_dart(this->mmap->null_handle);
-          }
-          else
-          {
-            this->set_current_dart(this->mmap->beta(*this, Bi+1));
-            mnext_try_betai = true;
-            this->mprev_op = OP_BETAJ;
-          }
-        }
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  private:
-    /// Boolean: true iff we turn in the first direction (i.e. using betai).
-    bool mfirst_dir;
-
-    /// Boolean: true iff the next ++ must use betai.
-    bool mnext_try_betai;
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_orbit<Bi,Bj>: to iterate
-   * on the darts of the orbit <Bi,Bj>: Bi<Bj<=dimension.
-   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
-   * the destructor, possible problem with the rewind). If you are not sure,
-   * use CMap_dart_iterator_basic_of_orbit.
-   */
-  template <typename Map_,bool Const,int Bi,int Bj>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj>: 
-    public CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,Bj-Bi>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj> Self;
-    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,Bj-Bi> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef typename Base::Use_mark Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart) :
-      Base(amap, adart)
-    {}    
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
-                                              int amark):
-      Base(amap, adart, amark)
-    {}    
-  };
-  //****************************************************************************
-  /* Generic nD version. 
-   */
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template <typename Map_,bool Const,int Bi,int Bj, int Bk, int... Beta>
-  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj,Bk,Beta...>: 
-    public CMap_extend_iterator<Map_,
-                                CMap_dart_iterator_basic_of_orbit_generic
-                                <Map_,Const,Bi,Bj,Beta...>,
-                                Bk>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit_generic
-    <Map_,Const,Bi,Bj,Bk,Beta...> Self;
-    typedef CMap_extend_iterator<Map_,
-                                 CMap_dart_iterator_basic_of_orbit_generic
-                                 <Map_,Const,Bi,Bj,Beta...>,
-                                 Bk> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
-                                              int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-#else //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template <typename Map_,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
-            int B7,int B8,int B9>
-  class CMap_dart_iterator_basic_of_orbit_generic: 
-    public CMap_extend_iterator
-  <Map_,typename Get_CMap_dart_iterator_basic_of_orbit
-   <Map_,Const,B1,B2,B4,B5,B6,B7,B8,B9>::type, B3>
-  {
-  public:
-    typedef typename Get_CMap_dart_iterator_basic_of_orbit
-    <Map_,Const,B1,B2,B3,B4,B5,B6,B7,B8,B9>::type Self;
-
-    typedef CMap_extend_iterator
-    <Map_,typename Get_CMap_dart_iterator_basic_of_orbit
-     <Map_,Const,B1,B2,B4,B5,B6,B7,B8,B9>::type, B3> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
-                                              int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  //****************************************************************************
-  // TODO? we can optimize the iterators<Bi,Bj,Bk> when
-  // 1<Bi and Bi+2<=Bj and Bj+2<=Bk but there is no real interest...
-  //****************************************************************************
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template<typename Map,int...Beta>
-  class CMap_dart_iterator_basic_of_orbit: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map,false,Beta...>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit<Map,Beta...> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,false,Beta...> Base;
-
-    typedef typename Map::Dart_handle Dart_handle;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
-      Base(amap,adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,int amark):
-      Base(amap,adart,amark)
-    {}
-  };
-#else
-  //****************************************************************************
-  template<typename Map,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
-           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_iterator_basic_of_orbit: 
-    public Get_CMap_dart_iterator_basic_of_orbit<Map,false,B1,B2,B3,B4,
-                                                 B5,B6,B7,B8,B9>::type
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_orbit<Map,B1,B2,B3,B4,B5,B6,B7,B8,B9> 
-    Self;
-    typedef typename Get_CMap_dart_iterator_basic_of_orbit
-    <Map,false,B1,B2,B3,B4,B5,B6,B7,B8,B9>::type Base;
-
-    typedef typename Map::Dart_handle Dart_handle;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
-      Base(amap,adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,int amark):
-      Base(amap,adart,amark)
-    {}
-  };
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_all: to iterate onto all the
-   * darts of the map.
-   */
-  template <typename Map_,bool Const=false>
-  class CMap_dart_iterator_basic_of_all: public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_all Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_all(Map& amap):
-      Base(amap, amap.darts().begin())
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_all(Map& amap, int /*amark*/):
-      Base(amap, amap.darts().begin())
-    {}
-
-    /// Constructor with a dart in parameter (for end iterator).
-    CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-    /// Constructor with a dart in parameter (for end iterator).
-    CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart,
-                                    int /*amark*/):
-      Base(amap, adart)
-    {}
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-
-      Base::operator++();
-      if ( (*this) != this->mmap->darts().end())
-      { this->mprev_op = OP_POP; }
-      else
-      {
-        this->set_current_dart(this->mmap->null_handle);
-        this->mprev_op = OP_END;
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-  };
-  //****************************************************************************
-  //***************************CELL*ITERATORS***********************************
-  //****************************************************************************
-  //****************************************************************************
-  // i-Cell iterator in combinatorial map of dimension d, i>1
-  // i<=Map::dimension+1 (for i==Map::dimension+1, iterate on the connected
-  // component)
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_basic_of_cell: public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    CGAL_static_assertion( i>1 && i<=Map::dimension+1 );
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    {
-      if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark_null_dart(mmark_number);
-        this->mmap->mark(adart, mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark(*this, mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-      Dart_handle nd = this->mmap->null_handle;
-      
-      for ( unsigned int k=0; k<i; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-      for ( unsigned int k=i+1; k<=d; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // i-Cell iterator in combinatorial map of dimension d, i==1.
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,1,d,Const>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,1,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    {
-      if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark((*this), mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-      
-      for ( unsigned int k=2; k<=d; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          CGAL_assertion(nd!=this->mmap->null_dart_handle);
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // 0-Cell iterator in combinatorial map of dimension d
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,0,d,Const>:
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,0,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    { if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }      
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark((*this), mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-
-      for ( unsigned int k=2; k<=d; ++k )
-      {
-        if ( this->is_unmarked2((*this), 0, k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, 0, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETA0I;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, 0, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, 0, k), mmark_number);
-        }
-        if ( this->is_unmarked2((*this), k, 1, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k, 1);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI1;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k, 1));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k, 1), mmark_number);
-        }
-        for ( unsigned int l=k+1; l<=d; ++l )
-        {
-          if ( this->is_unmarked2((*this), k, l, mmark_number) )
-          {
-            if (nd == this->mmap->null_handle)
-            {
-              nd = this->mmap->beta(*this, k, l);
-              CGAL_assertion(nd!=this->mmap->null_dart_handle);
-              this->mprev_op = OP_BETAIJ;
-            }
-            else
-            {
-              mto_treat.push(this->mmap->beta(*this, k, l));
-            }
-            this->mmap->mark(this->mmap->beta(*this, k, l), mmark_number);
-          }
-          if ( this->is_unmarked2((*this), l, k, mmark_number) )
-          {
-            if (nd == this->mmap->null_handle)
-            {
-              nd = this->mmap->beta(*this, l, k);
-              CGAL_assertion(nd!=this->mmap->null_dart_handle);
-              this->mprev_op = OP_BETAJI;
-            }
-            else
-            {
-              mto_treat.push(this->mmap->beta(*this, l, k));
-            }
-            this->mmap->mark(this->mmap->beta(*this, l, k), mmark_number);
-          }
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          CGAL_assertion(nd!=this->mmap->null_dart_handle);
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-   
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // Specialization for edge in 2D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,1,2,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,1,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart):
-      Base(amap, adart)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int /*amark*/):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for facet in 2D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,2,2,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,2,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart):
-      Base(amap, adart)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int /*amark*/):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for cc in 2D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,3,2,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,3,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for edge in 3D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,1,3,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2,3>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,1,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2,3> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart):
-      Base(amap, adart)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int /*amark*/): Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for facet in 3D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,2,3,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,3>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,2,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,3> Base;
-    
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart):
-      Base(amap, adart)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int /*amark*/): Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for volume in 3D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,3,3,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,3,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-  //****************************************************************************
-  // Specialization for cc in 3D 
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,4,3,Const>: 
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2,3>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,4,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2,3> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap,
-                                     Dart_handle adart,
-                                     int amark):
-      Base(amap, adart, amark)
-    {}
-  };
-  //****************************************************************************
-  /* Class CMap_dart_iterator_basic_of_cell<Map,0,2>: to iterate onto the
-   * darts of the orbit vertex in 2D.
-   */
-  template <typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_cell<Map_,0,2,Const>: 
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,0,2,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap, 
-                                     Dart_handle adart):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_cell(Map& amap, 
-                                     Dart_handle adart,
-                                     int /*amark*/):
-      Base(amap, adart),
-      mfirst_dir(true)
-    {}
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      Base::rewind();
-      mfirst_dir = true;
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(this->cont());
-
-      if (mfirst_dir)
-      {
-        this->set_current_dart(this->mmap->beta(*this, 0, 2));
-        if ((*this)==this->mmap->null_dart_handle)
-        {
-          mfirst_dir = false;
-          this->set_current_dart(this->mmap->beta(this->mfirst_dart, 2, 1));
-          if ((*this)==this->mmap->null_dart_handle)
-          {
-            this->mprev_op = OP_END;
-            this->set_current_dart(this->mmap->null_handle);
-          }
-          else
-          {
-            this->mprev_op = OP_BETAI1;
-          }
-        }
-        else
-        {
-          if ((*this)==this->mfirst_dart)
-          {
-            this->mprev_op = OP_END;
-            this->set_current_dart(this->mmap->null_handle);
-          }
-          else
-            this->mprev_op = OP_BETA0I;
-        }
-      }
-      else
-      {
-        this->set_current_dart(this->mmap->beta(*this, 2, 1));
-        if ((*this) == this->mmap->null_dart_handle)
-        {
-          this->mprev_op = OP_END;
-          this->set_current_dart(this->mmap->null_handle);
-        }
-        else
-          this->mprev_op = OP_BETA21;
-      }
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Boolean: true iff we turn in the first direction (i.e. using beta02).
-    bool mfirst_dir;
-  };
-  //****************************************************************************
-  //*************************ITERATORS*NON*BASIC********************************
-  //****************************************************************************
-  //****************************************************************************
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template<typename Map_,bool Const,int...Beta>
-  class CMap_dart_iterator_of_orbit_generic: 
-    public  CMap_non_basic_iterator<Map_, 
-                                    CMap_dart_iterator_basic_of_orbit_generic
-                                    <Map_,Const,Beta...> >
-  {
-  public:
-    typedef CMap_dart_iterator_of_orbit_generic<Map_,Const,Beta...> Self;
-    typedef CMap_non_basic_iterator<Map_,
-                                    CMap_dart_iterator_basic_of_orbit_generic
-                                    <Map_,Const,Beta...> > Base;
-
-    typedef typename Base::Map Map;
-    typedef typename Base::Dart_handle Dart_handle;
-
-    /// Main constructor.
-    CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1):
-      Base(amap, adart1)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,unsigned int...Beta>
-  class CMap_dart_iterator_of_orbit: 
-    public CMap_dart_iterator_of_orbit_generic<Map_,false,Beta...>
-  {
-  public:
-    typedef CMap_dart_iterator_of_orbit<Map_,Beta...> Self;
-    typedef CMap_dart_iterator_of_orbit_generic<Map_,false,Beta...> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    
-    /// Main constructor.
-    CMap_dart_iterator_of_orbit(Map_& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-#else
-  //****************************************************************************
-  template<typename Map_,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
-           int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_iterator_of_orbit_generic:
-    public CMap_non_basic_iterator<Map_,
-                                   typename 
-                                   Get_CMap_dart_iterator_basic_of_orbit
-                                   <Map_,Const,B1,B2,B3,B4,B5,
-                                    B6,B7,B8,B9>::type>
-  {
-  public:
-    typedef CMap_dart_iterator_of_orbit_generic<Map_,Const,B1,B2,B3,B4,B5,
-                                                B6,B7,B8,B9> Self;
-    typedef CMap_non_basic_iterator<Map_,
-                                    typename 
-                                    Get_CMap_dart_iterator_basic_of_orbit
-                                    <Map_,Const,B1,B2,B3,B4,B5,
-                                     B6,B7,B8,B9>::type> Base;
-
-    typedef typename Base::Map Map;
-    typedef typename Base::Dart_handle Dart_handle;
-
-    /// Main constructor.
-    CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1):
-      Base(amap, adart1)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
-           int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
-  class CMap_dart_iterator_of_orbit: 
-    public CMap_dart_iterator_of_orbit_generic<Map,false,
-                                               B1,B2,B3,B4,B5,B6,B7,B8,B9>
-  {
-  public:
-    typedef CMap_dart_iterator_of_orbit<Map,B1,B2,B3,B4,B5,B6,B7,B8,B9> Self;
-    typedef CMap_dart_iterator_of_orbit_generic<Map,false,
-                                                B1,B2,B3,B4,B5,B6,B7,B8,B9> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    
-    /// Main constructor.
-    CMap_dart_iterator_of_orbit(Map& amap, Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_of_cell: 
-    public CMap_non_basic_iterator<Map_,CMap_dart_iterator_basic_of_cell
-                                   <Map_,i,d,Const> >
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,Const> Self;
-    typedef CMap_non_basic_iterator<Map_,
-                                    CMap_dart_iterator_basic_of_cell
-                                    <Map_,i,d,Const> > Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-    
-    /// Main constructor.
-    CMap_dart_iterator_of_cell(Map& amap, Dart_handle adart1):
-      Base(amap, adart1)
-    {}
-  };
-  //****************************************************************************
-  //********************ITERATOR*INVOLUTION*************************************
-  //****************************************************************************
-  // i-involution iterator in combinatorial map of dimension d, 
-  // 2<i<=Map::dimension. Iterate by using all beta between 0 and d, 
-  // except beta(i-1), betai and beta(i+1)
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_basic_of_involution;
-
-  template<typename Map_,int i,int d,bool Const>
-  class CMap_dart_iterator_basic_of_involution: 
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,i,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-    
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    {
-      CGAL_assertion( d>=3 && d<=Map::dimension );
-      CGAL_assertion( i>=3 && i<=Map::dimension );
-      if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark((*this), mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-
-      for ( int k=0; k<2; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      for ( int k=2; k<=d; ++k )
-      {
-        if ( k!=i-1 && k!=i && k!=i+1 && 
-             this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // i-involution iterator in combinatorial map of dimension d, 
-  // 2<i<=Map::dimension. Iterate by using all beta between 0 and d, 
-  // except beta(i-1), betai and beta(i+1), by inversing order between
-  // beta0 and beta1
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_basic_of_involution_inv: 
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    {
-      CGAL_assertion( i>=3 && i<=Map::dimension );
-      if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark((*this), mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-
-      for ( int k=1; k>=0; --k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-      for ( int k=2; k<=d; ++k )
-      {
-        if ( k!=i-1 && k!=i && k!=i+1 && 
-             this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension d.
-  // Iterate by using all beta between 3 and d.
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,1,d,Const>:  
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,1,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    { if (adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark_null_dart(mmark_number);
-      this->mmap->mark((*this), mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-
-      for ( unsigned int k=3; k<=d; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension d.
-  // Iterate by using all beta between 3 and d.
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,d,Const>:  
-    public CMap_dart_iterator_basic_of_involution<Map_,1,d,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,d,Const> Self;
-    typedef CMap_dart_iterator_basic_of_involution<Map_,1,d,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int amark):
-      Base(amap, adart,amark)
-    {}
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension d.
-  // Iterate by using all beta between 4 and d.
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,2,d,Const>:  
-    public CMap_dart_iterator<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,2,d,Const> Self;
-    typedef CMap_dart_iterator<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int amark):
-      Base(amap, adart),
-      mmark_number(amark)
-    { if ( adart!=this->mmap->null_handle)
-      {
-        this->mmap->mark(adart, mmark_number);
-        this->mmap->mark_null_dart(mmark_number);
-      }
-    }
-
-    /// Rewind of the iterator to its beginning.
-    void rewind()
-    {
-      CGAL_assertion(mmark_number != -1);
-      Base::rewind();
-      mto_treat = std::queue<Dart_handle>();
-      this->mmap->mark((*this), mmark_number);
-      this->mmap->mark_null_dart(mmark_number);
-    }
-
-    /// Prefix ++ operator.
-    Self& operator++()
-    {
-      CGAL_assertion(mmark_number != -1);
-      CGAL_assertion(this->cont());
-
-      Dart_handle nd = this->mmap->null_handle;
-
-      for ( unsigned int k=4; k<=d; ++k )
-      {
-        if ( this->is_unmarked((*this), k, mmark_number) )
-        {
-          if (nd == this->mmap->null_handle)
-          {
-            nd = this->mmap->beta(*this, k);
-            CGAL_assertion(nd!=this->mmap->null_dart_handle);
-            this->mprev_op = OP_BETAI;
-          }
-          else
-          {
-            mto_treat.push(this->mmap->beta(*this, k));
-          }
-          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
-        }
-      }
-
-      if (nd == this->mmap->null_handle)
-      {
-        if (!mto_treat.empty())
-        {
-          nd = mto_treat.front();
-          mto_treat.pop();
-          this->mprev_op = OP_POP;
-        }
-        else
-        {
-          this->mprev_op = OP_END;
-        }
-      }
-      
-      this->set_current_dart(nd);
-      return *this;
-    }
-
-    /// Postfix ++ operator.
-    Self operator++(int)
-    { Self res=*this; operator ++(); return res; }
-
-  protected:
-    /// Queue of darts to process.
-    std::queue<Dart_handle> mto_treat;
-
-    /// Index of the used mark.
-    int mmark_number;
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension d.
-  // Iterate by using all beta between 4 and d.
-  template<typename Map_,int d,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,d,Const>:  
-    public CMap_dart_iterator_basic_of_involution<Map_,2,d,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,d,Const> Self;
-    typedef CMap_dart_iterator_basic_of_involution<Map_,2,d,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_true Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int amark):
-      Base(amap, adart,amark)
-    {}
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 2.
-  // Empty iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,1,2,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,1,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 2.
-  // self iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,2,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension 2.
-  // self iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,2,2,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,2,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension 2.
-  // self iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,2,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,2,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 3.
-  // Beta3 iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,1,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,1,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-    
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart):
-      Base(amap, adart)
-    {}    
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 3.
-  // Beta3 iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension 3.
-  // Self iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,2,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,2,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int /* amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 2-involution iterator in combinatorial map of dimension 3.
-  // Self iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 3.
-  // Beta1 iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution<Map_,3,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution<Map_,3,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart,
-                                           int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution(Map& amap,
-                                           Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  // 1-involution iterator in combinatorial map of dimension 3.
-  // Beta0 iterator.
-  template<typename Map_,bool Const>
-  class CMap_dart_iterator_basic_of_involution_inv<Map_,3,3,Const>:  
-    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>
-  {
-  public:
-    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,3,3,Const> Self;
-    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> Base;
-
-    typedef typename Base::Dart_handle Dart_handle;
-    typedef typename Base::Map Map;
-
-    typedef Tag_false Use_mark;
-
-    /// True iff this iterator is basic
-    typedef Tag_true Basic_iterator;
-
-  public:
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart,
-                                               int /*amark*/):
-      Base(amap, adart)
-    {}
-    /// Main constructor.
-    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
-                                               Dart_handle adart):
-      Base(amap, adart)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_of_involution:
-    public CMap_non_basic_iterator<Map_,
-                                   CMap_dart_iterator_basic_of_involution
-                                   <Map_,i,d,Const> >
-  {
-  public:
-    typedef CMap_dart_iterator_of_involution<Map_,i,d,Const> Self;
-    typedef CMap_non_basic_iterator<Map_,
-                                    CMap_dart_iterator_basic_of_involution
-                                    <Map_,i,d,Const> >  Base;
-
-    /// Main constructor.
-    CMap_dart_iterator_of_involution(typename Base::Map& amap, 
-                                     typename Base::Dart_handle adart1):
-      Base(amap, adart1)
-    {}
-  };
-  //****************************************************************************
-  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
-  class CMap_dart_iterator_of_involution_inv: 
-    public CMap_non_basic_iterator<Map_,
-                                   CMap_dart_iterator_basic_of_involution_inv
-                                   <Map_,i,d,Const> >
-  {
-  public:
-    typedef CMap_dart_iterator_of_involution_inv<Map_,i,d,Const> Self;
-    typedef CMap_non_basic_iterator<Map_,
-                                    CMap_dart_iterator_basic_of_involution_inv
-                                    <Map_,i,d,Const> >  Base;
-
-    /// Main constructor.
-    CMap_dart_iterator_of_involution_inv(typename Base::Map& amap,
-                                         typename Base::Dart_handle adart1):
-      Base(amap, adart1)
-    {}
-  };
-  //****************************************************************************
-} // namespace CGAL
-//******************************************************************************
-#endif // CGAL_DART_ITERATORS_HH
-//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Deform_mesh.h b/3rdparty/CGAL-4.6/include/CGAL/Deform_mesh.h
deleted file mode 100644
index a9b7dd1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Deform_mesh.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2014 GeometryFactory
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Yin Xu, Andreas Fabri and Ilker O. Yaz
-
-#ifndef CGAL_DEFORM_MESH_H
-#define CGAL_DEFORM_MESH_H
-
-#ifdef DOXYGEN_RUNNING
-template <
-  class HG,
-  class VIM=Default,
-  class HIM=Default,
-  Deformation_algorithm_tag TAG = SPOKES_AND_RIMS,
-  class WC = Default,
-  class ST = Default,
-  class CR = Default,
-  class VPM = Default
-  >
-class Surface_mesh_deformation;
-#endif
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-
-#define CGAL_DEPRECATED_HEADER "<CGAL/Deform_mesh.h>"
-#define CGAL_REPLACEMENT_HEADER "<CGAL/Surface_mesh_deformation.h>"
-#include <CGAL/internal/deprecation_warning.h>
-
-#include <CGAL/Surface_mesh_deformation.h>
-
-namespace CGAL {
-
- ///
- /// \ingroup PkgSurfaceModeling
- /// Class renamed to `Surface_mesh_deformation`.
- /// \deprecated This class name is deprecated and has been renamed to `Surface_mesh_deformation`.
-template <
-  class HG,
-  class VIM=Default,
-  class HIM=Default,
-  Deformation_algorithm_tag TAG = SPOKES_AND_RIMS,
-  class WC = Default,
-  class ST = Default,
-  class CR = Default,
-  class VPM = Default
-  >
-class Deform_mesh :  public Surface_mesh_deformation<HG, VIM, HIM, TAG, WC, ST, CR, VPM>
-{
-  typedef Deform_mesh<HG, VIM, HIM, TAG, WC, ST, CR, VPM> Self;
-  typedef Surface_mesh_deformation<HG, VIM, HIM, TAG, WC, ST, CR, VPM> Base;
-#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
-public:
-  Deform_mesh(const Self&) = delete; // no copy
-#else
-private:
-  Deform_mesh(const Self&); // no copy
-#endif
-
-public:
-  typedef typename Base::Halfedge_graph Halfedge_graph;
-  typedef typename Base::Vertex_index_map Vertex_index_map;
-  typedef typename Base::Hedge_index_map Hedge_index_map;
-  typedef typename Base::Weight_calculator Weight_calculator;
-  typedef typename Base::Vertex_point_map Vertex_point_map;
-
-  //vertex_point_map set by default
-  Deform_mesh(Halfedge_graph& halfedge_graph,
-              Vertex_index_map vertex_index_map,
-              Hedge_index_map hedge_index_map
-             )
-    : Base(halfedge_graph, vertex_index_map, hedge_index_map)
-  {}
-
-  //vertex_point_map and hedge_index_map set by default
-  Deform_mesh(Halfedge_graph& halfedge_graph,
-              Vertex_index_map vertex_index_map)
-    : Base(halfedge_graph, vertex_index_map)
-  {}
-  //vertex_point_map, hedge_index_map and vertex_index_map set by default
-  Deform_mesh(Halfedge_graph& halfedge_graph)
-    : Base(halfedge_graph)
-  {}
-
-  // Constructor with all the parameters provided
-  Deform_mesh(Halfedge_graph& halfedge_graph,
-              Vertex_index_map vertex_index_map,
-              Hedge_index_map hedge_index_map,
-              Vertex_point_map vertex_point_map,
-              Weight_calculator weight_calculator = Weight_calculator()
-             )
-    : Base(halfedge_graph, vertex_index_map, hedge_index_map, vertex_point_map, weight_calculator)
-  {}
-};
-} //namespace CGAL
-
-#endif //CGAL_NO_DEPRECATED_CODE
-
-#endif  // CGAL_DEFORM_MESH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h
deleted file mode 100644
index 24b3dd7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2013  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
-// Copyright (c) 2013 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Gael Guennebaud and Ilker O. Yaz
-
-
-#ifndef CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
-#define CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
-
-#include <Eigen/Eigen>
-#include <Eigen/SVD>
-
-namespace CGAL {
-/// \ingroup PkgSurfaceModeling
-/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
-/// The internal computation relies on `Eigen::JacobiSVD<>` solver.
-///
-/// \cgalModels `DeformationClosestRotationTraits_3`
-class Deformation_Eigen_closest_rotation_traits_3{
-public:
-
-  /// \cond SKIP_FROM_MANUAL
-  typedef Eigen::Matrix3d Matrix;
-  typedef Eigen::Vector3d Vector;
-
-  /// Equivalent to `result += w * (v1*v2^t)`
-  void add_scalar_t_vector_t_vector_transpose(Matrix& result, double w, const Vector& v1, const Vector& v2)
-  {
-    result += w * (v1*v2.transpose());
-  }
-
-  /// Equivalent to `result += (w1*m1 + w2*m2) * v`
-  void add__scalar_t_matrix_p_scalar_t_matrix__t_vector(Vector& result, double w1, const Matrix& m1, double w2, const Matrix& m2, const Vector& v)
-  {
-    result += (w1*m1 + w2*m2) * v;
-  }
-
-  /// Equivalent to `result += w * (m1 + m2 + m3) * v`
-  void add_scalar_t_matrix_sum_t_vector(Vector& result, double w, const Matrix& m1, const Matrix& m2, const Matrix& m3, const Vector& v)
-  {
-    result += w * (m1 + m2 + m3) * v;
-  }
-
-  /// Returns the squared norm of `v1 - m*v2`
-  double squared_norm_vector_scalar_vector_subs(const Vector& v1, const Matrix& m, const Vector& v2)
-  {
-    return (v1 - m*v2).squaredNorm();
-  }
-
-  /// Returns an identity matrix
-  Matrix identity_matrix()
-  {
-    return Matrix().setIdentity();
-  }
-
-  /// Returns a zero initialized matrix
-  Matrix zero_matrix()
-  {
-    return Matrix().setZero();
-  }
-
-  /// Returns vector initialized with parameters
-  Vector vector(double x, double y, double z)
-  {
-    return Vector(x, y, z);
-  }
-
-  /// Returns a coefficient of a vector
-  double vector_coordinate(const Vector& v, int i)
-  {
-    return v(i);
-  }
-
-  /// Computes the closest rotation to `m` and places it into `R`
-  void compute_close_rotation(const Matrix& m, Matrix& R)
-  {
-    Eigen::JacobiSVD<Eigen::Matrix3d> solver;
-    solver.compute( m, Eigen::ComputeFullU | Eigen::ComputeFullV );
-
-    const Matrix& u = solver.matrixU(); const Matrix& v = solver.matrixV();
-    R = v * u.transpose();
-
-    if( R.determinant() < 0 ) {
-      Matrix u_copy = u;
-      u_copy.col(2) *= -1;        // singular values sorted ascendingly
-      R = v * u_copy.transpose(); // re-extract rotation matrix
-    }
-  }
-
-  /// \endcond
-
-};
-
-}//namespace CGAL
-#endif // CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h
deleted file mode 100644
index 8b09ba9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2013  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
-// Copyright (c) 2013 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Gael Guennebaud Ilker O. Yaz
-
-
-#ifndef CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
-#define CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
-
-#include <CGAL/Deformation_Eigen_closest_rotation_traits_3.h>
-#include <CGAL/FPU_extension.h>
-#include <CGAL/Profile_counter.h>
-
-namespace CGAL {
-  /// \ingroup PkgSurfaceModeling
-  /// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
-  /// The internal computation relies on a hybrid system using the solvers `Eigen::SelfAdjointEigenSolver<>`
-  /// and `Eigen::JacobiSVD<>` (polar decomposition).
-  ///
-  /// \cgalModels `DeformationClosestRotationTraits_3`
-  class Deformation_Eigen_polar_closest_rotation_traits_3 :
-    public Deformation_Eigen_closest_rotation_traits_3{
-  public:
-
-    /// \cond SKIP_FROM_MANUAL
-
-    /// Computes closest rotation to `m` and places it into `R`
-    void compute_close_rotation(const Matrix& m, Matrix& R)
-    {
-      CGAL_PROFILER(" times closest rotation is computed");
-      bool solved = polar_eigen(m, R);
-
-      if(!solved) {
-        CGAL_PROFILER(" times polar_eigen failed and SVD is called");
-        Deformation_Eigen_closest_rotation_traits_3::compute_close_rotation(m, R);
-      }
-    }
-
-  private:
-    // polar decomposition using Eigen, 5 times faster than SVD
-    bool polar_eigen(const Matrix& A, Matrix& R)
-    {
-      if(A.determinant() < 0)
-      { return false; }
-
-      typedef Matrix::Scalar Scalar;
-
-      const Scalar th = std::sqrt(Eigen::NumTraits<Scalar>::dummy_precision());
-
-      Eigen::SelfAdjointEigenSolver<Matrix> eig;
-      CGAL::feclearexcept(FE_UNDERFLOW);
-      eig.computeDirect(A.transpose()*A);
-      if(CGAL::fetestexcept(FE_UNDERFLOW) || eig.eigenvalues()(0)/eig.eigenvalues()(2)<th)
-      { return false; }
-
-      Vector S = eig.eigenvalues().cwiseSqrt();
-      R = A  * eig.eigenvectors() * S.asDiagonal().inverse()
-        * eig.eigenvectors().transpose();
-
-      if(std::abs(R.squaredNorm()-3.) > th || R.determinant() < 0)
-      { return false; }
-
-      R.transposeInPlace(); // the optimal rotation matrix should be transpose of decomposition result
-      return true;
-    }
-    /// \endcond
-
-  };
-}//namespace CGAL
-#endif // CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_d.h b/3rdparty/CGAL-4.6/include/CGAL/Delaunay_d.h
deleted file mode 100644
index 47047f4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_d.h
+++ /dev/null
@@ -1,1071 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-//---------------------------------------------------------------------
-// file generated by notangle from delaunay.lw
-// please debug or modify LEDA web file
-// mails and bugs: Michael.Seel at mpi-sb.mpg.de
-// based on LEDA architecture by S. Naeher, C. Uhrig
-// coding: K. Mehlhorn, M. Seel
-// debugging and templatization: M. Seel
-//---------------------------------------------------------------------
-
-#ifndef CGAL_DELAUNAY_D_H
-#define CGAL_DELAUNAY_D_H
-#define CGAL_DEPRECATED_HEADER "<CGAL/Delaunay_d.h>"
-#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)"
-#include <CGAL/internal/deprecation_warning.h>
-
-/*{\Manpage {Delaunay_d}{R,Lifted_R}{Delaunay Triangulations}{DT}}*/
-/*{\Mdefinition 
-
-An instance |\Mvar| of type |\Mname| is the nearest and furthest
-site Delaunay triangulation of a set |S| of points in some
-$d$-dimensional space. We call |S| the underlying point set and $d$ or
-|dim| the dimension of the underlying space.  We use |dcur| to denote
-the affine dimension of |S|.  The data type supports incremental
-construction of Delaunay triangulations and various kind of query
-operations (in particular, nearest and furthest neighbor queries and
-range queries with spheres and simplices).
-
-A Delaunay triangulation is a simplicial complex. All simplices in
-the Delaunay triangulation have dimension |dcur|.  In the nearest site
-Delaunay triangulation the circumsphere of any simplex in the
-triangulation contains no point of $S$ in its interior. In the
-furthest site Delaunay triangulation the circumsphere of any simplex
-contains no point of $S$ in its exterior. If the points in $S$ are
-co-circular then any triangulation of $S$ is a nearest as well as a
-furthest site Delaunay triangulation of $S$. If the points in $S$ are
-not co-circular then no simplex can be a simplex of both
-triangulations. Accordingly, we view |\Mvar| as either one or two
-collection(s) of simplices. If the points in $S$ are co-circular there
-is just one collection: the set of simplices of some triangulation.
-If the points in $S$ are not co-circular there are two
-collections. One collection consists of the simplices of a nearest
-site Delaunay triangulation and the other collection consists of the
-simplices of a furthest site Delaunay triangulation.
-
-For each simplex of maximal dimension there is a handle of type
-|Simplex_handle| and for each vertex of the triangulation there is a
-handle of type |Vertex_handle|. Each simplex has |1 + dcur| vertices
-indexed from $0$ to |dcur|.  For any simplex $s$ and any index $i$,
-|DT.vertex_of(s,i)| returns the $i$-th vertex of $s$. There may or may
-not be a simplex $t$ opposite to the vertex of $s$ with index $i$.
-The function |DT.opposite_simplex(s,i)| returns $t$ if it exists and
-returns |Simplex_handle()| otherwise. If $t$ exists then $s$ and $t$
-share |dcur| vertices, namely all but the vertex with index $i$ of $s$
-and the vertex with index
-|DT.index_of_vertex_in_opposite_simplex(s,i)| of $t$.  Assume that $t
-= |DT.opposite_simplex(s,i)|$ exists and let $j =
-|DT.index_of_vertex_in_opposite_simplex(s,i)|$. Then |s =
-DT.opposite_simplex(t,j)| and |i =
-DT.index_of_vertex_in_opposite_simplex(t,j)|.  In general, a vertex
-belongs to many simplices.
-
-Any simplex of |\Mvar| belongs either to the nearest or to the
-furthest site Delaunay triangulation or both. The test
-|DT.simplex_of_nearest(dt_simplex s)| returns true if |s| belongs to
-the nearest site triangulation and the test
-|DT.simplex_of_furthest(dt_simplex s)| returns true if |s| belongs to
-the furthest site triangulation.
-}*/
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Convex_hull_d.h>
-
-namespace CGAL {
-
-template <typename R_, typename Lifted_R_ = R_>
-class Delaunay_d : public Convex_hull_d<Lifted_R_>
-{ 
-typedef Delaunay_d<R_,Lifted_R_> Self;
-typedef Convex_hull_d<Lifted_R_> Base;
-
-  using Base::origin_simplex_;
-
-public:
-
-  using Base::associate_vertex_with_simplex;
-  using Base::dcur;
-  using Base::hyperplane_supporting;
-  using Base::visited_mark;
-  using Base::is_bounded_simplex;
-  using Base::is_unbounded_simplex;
-  using Base::clear_visited_marks;
-  using Base::is_dimension_jump;
-  using Base::point_of_simplex;
-  using Base::point_of_facet;
-  using Base::vertex_of_facet;
-
-/*{\Mgeneralization Convex_hull_d<Lifted_R>}*/
-
-/*{\Mtypes 7}*/
-typedef R_ R;
-typedef Lifted_R_ Lifted_R;
-
-typedef typename Base::Simplex_handle Simplex_handle;
-/*{\Mtypemember handles to the simplices of the complex.}*/
-
-typedef typename Base::Vertex_handle Vertex_handle;
-/*{\Mtypemember handles to vertices of the complex.}*/
-
-typedef typename Base::Simplex_const_handle Simplex_const_handle;
-typedef typename Base::Vertex_const_handle Vertex_const_handle;
-
-class Simplex_iterator;
-class Simplex_const_iterator;
-friend class Simplex_iterator;
-friend class Simplex_const_iterator;
-
-typedef typename R::Point_d Point_d;
-/*{\Mtypemember the point type}*/
-typedef typename R::Sphere_d Sphere_d;
-/*{\Mtypemember the sphere type}*/
-typedef typename R::FT FT;
-
-typedef typename Lifted_R::Point_d Lifted_point_d;
-typedef typename Lifted_R::Vector_d Lifted_vector_d;
-typedef typename Lifted_R::Hyperplane_d Lifted_hyperplane_d;
-typedef typename Lifted_R::RT RT;
-
-enum Delaunay_voronoi_kind { NEAREST, FURTHEST };
-/*{\Menum interface flags}*/
-
-/*{\Mtext To use these types you can typedef them into the global
-scope after instantiation of the class. We use |Vertex_handle| instead
-of |\Mname::Vertex_handle| from now on. Similarly we use
-|Simplex_handle|.}*/
-private:
-  enum type_of_S { unknown, non_cocircular, cocircular };  
-  type_of_S ts;
-
-  const R& Delaunay_kernel_;
-
-  enum type_of_facet { lower_hull, upper_hull, vertical };
-
-  type_of_facet type_of(typename Base::Facet_const_handle f) const
-  /*{\Xop returns the type of the facet $f$.}*/
-  { typename Lifted_R::Orthogonal_vector_d ortho =
-      lifted_kernel().orthogonal_vector_d_object();
-    Lifted_vector_d normal = ortho(hyperplane_supporting(f));
-    typename Lifted_R::Component_accessor_d access =
-      lifted_kernel().component_accessor_d_object();
-    int d = CGAL_NTS sign( 
-      access.homogeneous(normal,access.dimension(normal)-1));
-    if (d > 0) return upper_hull;
-    if (d < 0) return lower_hull;
-    return vertical;
-  }
-
-  type_of_facet type_of(typename Base::Facet_handle f) const
-  { return type_of(static_cast<typename Base::Facet_const_handle>(f)); }
-
-
-  bool incident_simplex_search(Vertex_handle v, Simplex_handle s) const;
-
-public:
-  
-  typedef typename Base::Point_const_iterator Point_const_iterator;
-  /*{\Mtypemember the iterator for points.}*/
-
-  typedef typename Base::Vertex_iterator Vertex_iterator;
-  /*{\Mtypemember the iterator for vertices.}*/
-
-  typedef typename Base::Simplex_iterator CH_simplex_iterator;
-  typedef typename Base::Simplex_const_iterator CH_simplex_const_iterator;
-
-  class Simplex_iterator 
-  /*{\Mtypemember the iterator for simplices.}*/ 
-    : public CH_simplex_iterator 
-  {
-    typedef Delaunay_d<R,Lifted_R> Delaunay;
-    typedef CH_simplex_iterator Base_iterator;
-
-    Delaunay* DT;
-    type_of_facet tf;
-    Base_iterator base() { return Base_iterator(*this); }
-  public:
-    Simplex_iterator(Base_iterator y = Base_iterator()) : 
-      Base_iterator(y) {}
-
-    Simplex_iterator(Delaunay* x,  Base_iterator y, 
-      Delaunay_voronoi_kind z = NEAREST) : Base_iterator(y), DT(x) 
-    /* if the facet is not nil we set the current marker to
-       the facet and insert all it's neighbors into the
-       candidates stack */
-    { CGAL_assertion(base() != Base_iterator());
-      tf = (z == NEAREST ? lower_hull : upper_hull); 
-      bool cocirc = DT->is_S_cocircular();
-      // Note [Sylvain,2007-03-08] : I added some parentheses to fix a warning,
-      // I hope I got the logic right.
-      // Note: I have add a new pair of parentheses. Laurent Rineau, 2010/08/20
-      while ( base() != DT->simplices_end() &&
-              !( ( cocirc && DT->is_bounded_simplex(base()) ) ||
-                ( ( !cocirc && DT->is_unbounded_simplex(base()) ) && 
-                  DT->type_of(base()) == tf ) ) ) {
-         Base_iterator::operator++();
-      }
-    }
-
-    Simplex_iterator(const Simplex_iterator& it) : Base_iterator(it) {}
-
-    Simplex_iterator& operator++()
-    /* here we get a new candidate from the stack
-       and insert all its not-visited neighbors */
-    { 
-      bool cocirc = DT->is_S_cocircular();
-      do {
-        Base_iterator::operator++();
-      // Note [Sylvain,2007-03-08] : I added some parentheses to fix a warning,
-      // I hope I got the logic right.
-      // Note: I have add a new pair of parentheses. Laurent Rineau, 2010/08/20
-      } while ( base() != DT->simplices_end() &&
-                !( ( cocirc && DT->is_bounded_simplex(base()) ) ||
-                   ( ( !cocirc && DT->is_unbounded_simplex(base()) ) && 
-                   DT->type_of(base()) == tf ) ) );
-      return *this; 
-    }
-    Simplex_iterator  operator++(int) 
-    { Simplex_iterator tmp = *this; ++(*this); return tmp; }
-
-    // change modus:
-    typedef std::forward_iterator_tag iterator_category;
-  private:
-    Simplex_iterator  operator--(int);
-    Simplex_iterator& operator--();
-
-  }; // Simplex_iterator
-
-
-  class Simplex_const_iterator : public CH_simplex_const_iterator {
-    typedef Delaunay_d<R,Lifted_R> Delaunay;
-    typedef CH_simplex_const_iterator Base_iterator;
-
-    const Delaunay* DT;
-    type_of_facet tf;
-    Base_iterator base() { return Base_iterator(*this); }
-  public:
-    Simplex_const_iterator(Base_iterator y = Base_iterator()) : 
-      Base_iterator(y) {}
-
-    Simplex_const_iterator(const Delaunay* x,  Base_iterator y, 
-      Delaunay_voronoi_kind z = NEAREST) : Base_iterator(y), DT(x) 
-    /* if the facet is not nil we set the current marker to
-       the facet and insert all it's neighbors into the
-       candidates stack */
-    { CGAL_assertion(base() != Base_iterator());
-      tf = (z == NEAREST ? lower_hull : upper_hull); 
-      bool cocirc = const_cast<Delaunay*>(DT)->is_S_cocircular();
-      while ( (base() != DT->simplices_end()) &&
-              !( (cocirc && DT->is_bounded_simplex(base())) ||
-                 (!cocirc && DT->is_unbounded_simplex(base()) && 
-                  DT->type_of(base()) == tf ) ) ) {
-         Base_iterator::operator++();
-      }
-    }
-
-    Simplex_const_iterator(const Simplex_const_iterator& it) : 
-      Base_iterator(it) {}
-
-    Simplex_const_iterator& operator++()
-    /* here we get a new candidate from the stack
-       and insert all its not-visited neighbors */
-    { 
-      bool cocirc = const_cast<Delaunay*>(DT)->is_S_cocircular();
-      do {
-        Base_iterator::operator++();
-      } while ( (base() != DT->simplices_end()) &&
-                !( (cocirc && DT->is_bounded_simplex(base())) ||
-                   (!cocirc && DT->is_unbounded_simplex(base()) && 
-                    DT->type_of(base()) == tf ) ) ); 
-      return *this; 
-    }
-    Simplex_const_iterator  operator++(int) 
-    { Simplex_iterator tmp = *this; ++(*this); return tmp; }
-
-    // change modus:
-    typedef std::forward_iterator_tag iterator_category;
-  private:
-    Simplex_const_iterator  operator--(int);
-    Simplex_const_iterator& operator--();
-
-  }; // Simplex_iterator
-
-
-
-
-  void project(Regular_complex_d<R>& RC, int which = -1) const;
-  /*{\Xop projects the upper (|which = 1|) or lower (|which = -1|) hull
-  into regular complex |RC|. }*/
-
-    
-  bool is_S_cocircular();
-  /*{\Xop returns |true| if the points of |S| are cocircular and returns
-  |false| otherwise}*/
-
-  /*{\Mcreation 3}*/
-
-  Delaunay_d(int d, const R& k1 = R(), const Lifted_R& k2 = Lifted_R())
-  /*{\Mcreate creates an instance |\Mvar| of type |\Mtype|. The
-  dimension of the underlying space is $d$ and |S| is initialized to the
-  empty point set. The traits class |R| specifies the models of
-  all types and the implementations of all geometric primitives used by
-  the Delaunay class. The traits class |Lifted_R| specifies the models of
-  all types and the implementations of all geometric primitives used by
-  the base class of |\Mname|. The second template parameter defaults to
-  the first: |Delaunay_d<R> = Delaunay_d<R, Lifted_R = R >|.}*/
-   : Base(d+1,k2), Delaunay_kernel_(k1) { ts = unknown; }
-
-  /*{\Mtext Both template arguments have to be models that fit a
-  subset of requirements of the d-dimensional kernel. We list them at
-  the end of this manual page.}*/
-
-  const R& kernel() const { return Delaunay_kernel_; }
-  const R& lifted_kernel() const { return Base::kernel(); }
-
-  private:
-  /*{\Mtext The data type |\Mtype| offers neither copy constructor nor
-  assignment operator.}*/
-  Delaunay_d(const Self&); 
-  Self& operator=(const Self&);
-  public:
-
-
-  /*{\Moperations 3 3}*/
-  /*{\Mtext All operations below that take a point |x| as an argument
-  have the common precondition that $|x.dimension()| = |\Mvar.dimension()|$.}*/
-
-  int dimension() const 
-  /*{\Mop returns the dimension of ambient space}*/
-  { return (Base::dimension() - 1); } 
-
-  int current_dimension() const
-  /*{\Mop returns the affine dimension of the current point set, i.e.,
-  $-1$ is $S$ is empty, $0$ if $S$ consists of a single point,
-  $1$ if all points of $S$ lie on a common line, etcetera.}*/
-  { int d = Base::current_dimension();
-    if (d == -1) return d;
-    return ( const_cast<Self*>(this)->is_S_cocircular() ? d : d-1 );
-  }
-
-  bool is_simplex_of_nearest(Simplex_handle s) const
-  /*{\Mop returns true if |s| is a simplex of the nearest site 
-  triangulation.}*/
-  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
-    return ( type_of(s) == lower_hull );
-  }
-
-  bool is_simplex_of_furthest(Simplex_handle s) const
-  /*{\Mop returns true if |s| is a simplex of the furthest site 
-  triangulation.}*/
-  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
-    return (type_of(s) == upper_hull);
-  }  
-
-  bool is_simplex_of_nearest(Simplex_const_handle s) const
-  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
-    return ( type_of(s) == lower_hull );
-  }
-  bool is_simplex_of_furthest(Simplex_const_handle s) const
-  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
-    return (type_of(s) == upper_hull);
-  }  
-
-     
-  Vertex_handle vertex_of_simplex(Simplex_handle s, int i) const
-  /*{\Mop returns the vertex associated with the $i$-th node of $s$.
-  \precond $0 \leq i \leq |dcur|$. }*/
-  { if ( const_cast<Self*>(this)->is_S_cocircular() )
-      return Base::vertex_of_simplex(s,i);
-    else 
-     return Base::vertex_of_simplex(s,i+1);
-  }
-
-  Vertex_const_handle vertex_of_simplex(Simplex_const_handle s, 
-                                        int i) const
-  { if ( const_cast<Self*>(this)->is_S_cocircular() )
-      return Base::vertex_of_simplex(s,i);
-    else 
-      return Base::vertex_of_simplex(s,i+1);
-  }
-
-  Point_d associated_point(Vertex_handle v) const
-  /*{\Mop returns the point associated with vertex $v$.}*/
-  { typename Lifted_R::Project_along_d_axis_d project =
-      lifted_kernel().project_along_d_axis_d_object();
-    return project(Base::associated_point(v)); }
-
-  Point_d associated_point(Vertex_const_handle v) const
-  { typename Lifted_R::Project_along_d_axis_d project =
-      lifted_kernel().project_along_d_axis_d_object();
-    return project(Base::associated_point(v)); }
-
-  Point_d point_of_simplex(Simplex_handle s,int i) const
-  /*{\Mop returns the point associated with the $i$-th vertex of $s$.
-  \precond $0 \leq i \leq |dcur|$. }*/
-  { return associated_point(vertex_of_simplex(s,i)); }
-
-  Point_d point_of_simplex(Simplex_const_handle s,int i) const
-  { return associated_point(vertex_of_simplex(s,i)); }
-
-
-  Simplex_handle opposite_simplex(Simplex_handle s, int i) const
-  /*{\Mop returns the simplex opposite to the $i$-th vertex of $s$
-  (|Simplex_handle()| if there is no such simplex).
-  \precond $0 \leq i \leq |dcur|$. }*/
-  { 
-    if ( const_cast<Self*>(this)->is_S_cocircular() ) {
-      Simplex_handle f = Base::opposite_simplex(s,i);
-      return ( Base::is_unbounded_simplex(f) ? 
-	       Simplex_handle() : f );    
-    } else {
-      Simplex_handle f = Base::opposite_simplex(s,i+1);
-      return ( type_of(f) == type_of(s) ? f : Simplex_handle() );
-    }
-  }  
-
-  Simplex_const_handle opposite_simplex(Simplex_const_handle s, 
-                                        int i) const
-  { 
-    if ( const_cast<Self*>(this)->is_S_cocircular() ) {
-      Simplex_const_handle f = Base::opposite_simplex(s,i);
-      return ( Base::is_unbounded_simplex(f) ? 
-	       Simplex_const_handle() : f );    
-    } else {
-      Simplex_const_handle f = Base::opposite_simplex(s,i+1);
-      return ( type_of(f) == type_of(s) ? f : Simplex_const_handle() );
-    }
-  }  
-   
-  int index_of_vertex_in_opposite_simplex(Simplex_handle s,int i) const
-  /*{\Mop returns the index of the vertex opposite to the $i$-th vertex 
-  of $s$. \precond $0 \leq i \leq |dcur|$.}*/
-  { 
-    if ( const_cast<Self*>(this)->is_S_cocircular() ) 
-      return Base::index_of_vertex_in_opposite_simplex(s,i);
-    else
-      return Base::index_of_vertex_in_opposite_simplex(s,i+1) - 1; 
-  }  
-
-  int index_of_vertex_in_opposite_simplex(Simplex_const_handle s,
-                                          int i) const
-  { 
-    if ( const_cast<Self*>(this)->is_S_cocircular() ) 
-      return Base::index_of_vertex_in_opposite_simplex(s,i);
-    else
-      return Base::index_of_vertex_in_opposite_simplex(s,i+1) - 1; 
-  }  
-
-  Simplex_handle simplex(Vertex_handle v) const;
-  /*{\Mop returns a simplex of the nearest site triangulation incident 
-  to $v$.}*/
-
-  int index(Vertex_handle v) const;
-  /*{\Mop returns the index of $v$ in |\Mvar.simplex(v)|.}*/
-
-  bool  contains(Simplex_handle s, const Point_d& x) const;
-  /*{\Mop returns true if |x| is contained in the closure of simplex |s|.}*/
-
-  bool empty() const
-  /*{\Mop  decides whether |\Mvar| is empty.}*/
-  { return (current_dimension() == -1); }
-
-  void clear()
-  /*{\Mop reinitializes |\Mvar| to the empty Delaunay triangulation.}*/
-  { int d = dimension(); Base::clear(d + 1);
-    ts = unknown;
-  }
-
-
-  Vertex_handle insert(const Point_d& x)
-  /*{\Mop inserts point $x$ into |\Mvar| and returns the corresponding
-  |Vertex_handle|.  More precisely, if there is already a vertex |v| in
-  |\Mvar| positioned at $x$ (i.e., |associated_point(v)| is equal to
-  |x|) then |associated_point(v)| is changed to |x| (i.e.,
-  |associated_point(v)| is made identical to |x|) and if there is no
-  such vertex then a new vertex $v$ with |associated_point(v) = x| is
-  added to |\Mvar|.  In either case, $v$ is returned.}*/
-  { ts = unknown;
-    typename Lifted_R::Lift_to_paraboloid_d lift =
-      lifted_kernel().lift_to_paraboloid_d_object();
-    return Base::insert(lift(x));
-  }
-
-
-  Simplex_handle locate(const Point_d& x) const;
-  /*{\Mop returns a simplex of the nearest site triangulation
-  containing |x| in its closure (returns |Simplex_handle()| if |x| lies 
-  outside the convex hull of $S$).}*/
-
-
-  Vertex_handle lookup(const Point_d& x) const
-  /*{\Mop if |\Mvar| contains a vertex $v$ with |associated_point(v) = x| 
-  the result is $v$ otherwise the result is |Vertex_handle()|. }*/
-  { 
-    Simplex_handle s = locate(x);
-    if ( s == Simplex_handle() ) return Vertex_handle();
-    for (int i = 0; i <= current_dimension(); i++) {
-      Vertex_handle v = vertex_of_simplex(s,i);
-      if (v!=this->anti_origin_ && x == associated_point(v) ) return v;
-    }
-    return Vertex_handle();
-  }
-
-
-  Vertex_handle nearest_neighbor(const Point_d& x) const;
-  /*{\Mop computes a vertex $v$ of |\Mvar| that is closest to $x$,
-  i.e.,\\ $|dist(x,associated_point(v))| = \min \{ 
-  |dist(x, associated_point(u))| \mid u \in S\ \}$.}*/
-
-  /*{\Mtext \setopdims{5cm}{1cm}}*/
-  std::list<Vertex_handle> 
-  range_search(const Sphere_d& C) const;
-  /*{\Mop returns the list of all vertices contained in the closure of 
-  sphere $C$.}*/
-
-  std::list<Vertex_handle>
-  range_search(const std::vector<Point_d>& A) const;
-  /*{\Mop returns the list of all vertices contained in the closure of
-  the simplex whose corners are given by |A|.
-  \precond |A| must consist of $d+1$ affinely independent points
-  in base space.}*/
-
-
-  void all_vertices_below(const Lifted_hyperplane_d& h, 
-                          Simplex_handle s, 
-                          std::list<Vertex_handle>& result,
-                          Unique_hash_map<Vertex_handle,bool>& is_new,
-                          bool is_cocircular) const;
-
-
-  std::list<Simplex_handle> 
-  all_simplices(Delaunay_voronoi_kind k = NEAREST) const;
-  /*{\Mop returns a list of all simplices of either the nearest or the
-          furthest site Delaunay triangulation of |S|.}*/
-
-
-  std::list<Vertex_handle> 
-  all_vertices(Delaunay_voronoi_kind k = NEAREST) const;
-  /*{\Mop returns a list of all vertices of either the nearest or the
-  furthest site Delaunay triangulation of |S|.}*/
-
-  std::list<Point_d> all_points() const;
-  /*{\Mop returns $S$. }*/
-
-  Point_const_iterator points_begin() const
-  /*{\Mop returns the start iterator for points in |\Mvar|.}*/
-  { return Point_const_iterator(Base::points_begin()); }
-
-  Point_const_iterator points_end() const
-  /*{\Mop returns the past the end iterator for points in |\Mvar|.}*/
-  { return Point_const_iterator(Base::points_end()); }
-
-  Simplex_iterator simplices_begin(Delaunay_voronoi_kind k = NEAREST)
-  /*{\Mop returns the start iterator for simplices of |\Mvar|.}*/
-  { return Simplex_iterator(this,Base::simplices_begin(),k); }
-
-
-  Simplex_iterator simplices_end()
-  /*{\Mop returns the past the end iterator for simplices of |\Mvar|.}*/
-  { return Simplex_iterator(Base::simplices_end()); }
-
-
-  Simplex_const_iterator 
-  simplices_begin(Delaunay_voronoi_kind k = NEAREST) const
-  { return Simplex_const_iterator(this,Base::simplices_begin(),k); }
-
-  Simplex_const_iterator simplices_end() const
-  { return Simplex_const_iterator(Base::simplices_end()); }
-
-
-  /*{\Mimplementation The data type is derived from |Convex_hull_d| via
-  the lifting map. For a point $x$ in $d$-dimensional space let
-  |lift(x)| be its lifting to the unit paraboloid of revolution. There
-  is an intimate relationship between the Delaunay triangulation of a
-  point set $S$ and the convex hull of |lift(S)|: The nearest site
-  Delaunay triangulation is the projection of the lower hull and the
-  furthest site Delaunay triangulation is the upper hull.  For
-  implementation details we refer the reader to the implementation
-  report available from the CGAL server.
-
-  The space requirement is the same as for convex hulls. The time
-  requirement for an insert is the time to insert the lifted point
-  into the convex hull of the lifted points.}*/
-
-  /*{\Mexample 
-
-  The abstract data type |Delaunay_d| has a default instantiation by
-  means of the $d$-dimensional geometric kernel.
-
-  \begin{Mverb}
-  #include <CGAL/Homogeneous_d.h>
-  #include <CGAL/leda_integer.h>
-  #include <CGAL/Delaunay_d.h>
-
-  typedef leda_integer RT;
-  typedef CGAL::Homogeneous_d<RT> Kernel;
-  typedef CGAL::Delaunay_d<Kernel> Delaunay_d;
-  typedef Delaunay_d::Point_d Point;
-  typedef Delaunay_d::Simplex_handle Simplex_handle;
-  typedef Delaunay_d::Vertex_handle Vertex_handle;
-
-  int main()
-  {
-    Delaunay_d T(2);
-    Vertex_handle v1 = T.insert(Point_d(2,11));
-    ...
-  }
-  \end{Mverb}
-  }*/
-
-  /*{\Mtext\headerline{Traits requirements}
-
-  |\Mname| requires the following types from the kernel traits |Lifted_R|:
-  \begin{Mverb}
-    RT Point_d Vector_d Ray_d Hyperplane_d 
-  \end{Mverb}
-  and uses the following function objects from the kernel traits:
-  \begin{Mverb}
-    Construct_hyperplane_d
-    Construct_vector_d
-    Vector_to_point_d / Point_to_vector_d
-    Orientation_d
-    Orthogonal_vector_d
-    Oriented_side_d / Has_on_positive_side_d
-    Affinely_independent_d
-    Contained_in_simplex_d
-    Contained_in_affine_hull_d
-    Intersect_d
-    Lift_to_paraboloid_d / Project_along_d_axis_d
-    Component_accessor_d
-  \end{Mverb}
-  |\Mname| requires the following types from the kernel traits |R|:
-  \begin{Mverb}
-    FT Point_d Sphere_d 
-  \end{Mverb}
-  and uses the following function objects from the kernel traits |R|:
-  \begin{Mverb}
-    Construct_sphere_d
-    Squared_distance_d
-    Point_of_sphere_d
-    Affinely_independent_d
-    Contained_in_simplex_d
-  \end{Mverb}
-  }*/
-
-
-
-}; // Delaunay_d<R,Lifted_R>
-
-template <typename R, typename Lifted_R>
-void Delaunay_d<R,Lifted_R>::project(Regular_complex_d<R>& RC, int which) const
-{
-  RC.clear(dimension());
-  Delaunay_voronoi_kind k = (which == -1 ? NEAREST : FURTHEST);
-  Unique_hash_map<Simplex_const_handle, Simplex_handle > project_simps;
-  Unique_hash_map<Vertex_const_handle,  Vertex_handle >  project_verts;
-  int dc = current_dimension();
-  RC.set_current_dimension(dc);
-
-  Simplex_const_iterator f;
-  for(f =  simplices_begin(k); f != simplices_end(); ++f) {
-    Simplex_handle s = project_simps[f] = RC.new_simplex();
-    for (int i = 0; i <= dc; i++) {
-      Vertex_const_handle v = vertex_of_simplex(f,i);
-      Vertex_handle pv = project_verts[v];
-      if ( pv == Vertex_handle() ) {
-        Point_d x = associated_point(v);
-        pv = project_verts[v] = RC.new_vertex(x);
-      }
-      RC.associate_vertex_with_simplex(s,i,pv);
-    }
-  }
-
-  /* in a second pass we set up neighbor connections */
-  Simplex_iterator s,t;
-  for(f =  simplices_begin(k); f != simplices_end(); ++f) {
-    s = project_simps[f];
-    if ( s != Simplex_handle() ) {
-      for (int i = 0; i <= dc; i++) {
-        t = project_simps[opposite_simplex(f,i)];
-        if ( dc > 0 && t != Simplex_handle() ) {
-          RC.set_neighbor(s,i,t,
-                          index_of_vertex_in_opposite_simplex(f,i)); 
-        }
-      }
-    }
-  }
-}
-
-
-template <typename R, typename Lifted_R>
-bool Delaunay_d<R,Lifted_R>::is_S_cocircular() 
-{ 
-  if (ts == unknown) {
-    int d = Base::current_dimension();
-    std::vector<Lifted_point_d> A(d + 1);
-    typename Lifted_R::Project_along_d_axis_d project =
-      lifted_kernel().project_along_d_axis_d_object();
-    for (int i = 0; i <= d; i++)
-      A[i] = project( Base::point_of_simplex(origin_simplex_,i));
-
-    typename Lifted_R::Affinely_independent_d affinely_independent =
-      lifted_kernel().affinely_independent_d_object();
-    ts = ( affinely_independent(A.begin(),A.end()) ? 
-           cocircular : non_cocircular );
-    if ( d == -1 && ts != cocircular )
-      CGAL_error_msg(        "affinely independent works incorrectly for empty set");
-  }
-  return (ts == cocircular);
-}
-
-
-template <typename R, typename Lifted_R> 
-bool Delaunay_d<R,Lifted_R>::
-incident_simplex_search(Vertex_handle v, Simplex_handle s) const
-{ 
-  visited_mark(s) = true;
-  if ( const_cast<Self*>(this)->is_S_cocircular() == 
-       is_bounded_simplex(s) ) {
-    // we have found a simplex of the desired kind 
-    int low = ( is_unbounded_simplex(s) ? 1 : 0 );
-    for ( int i = low; i <= Base::current_dimension(); i++) {
-      if ( v == Base::vertex_of_simplex(s,i) ) {
-        const_cast<Self*>(this)->associate_vertex_with_simplex(s,i,v); 
-        return true;
-      }
-    }
-    CGAL_error_msg(      "Delaunay_d::incident_simplex_search: unreachable point.");
-  }
-
-  /* s does not have the desired kind; we visit all neighbors except
-     the one opposite v */
-
-  bool incident = false;
-  register int j;
-  for (j = 0; j <= dcur; j++)
-    if ( Base::vertex_of_simplex(s,j) == v ) incident = true;
-  if ( !incident ) 
-    CGAL_error_msg("reached a simplex that is not incident to v");
-
-  for (j = 0; j <= Base::current_dimension(); j++) {
-    Simplex_handle t = Base::opposite_simplex(s,j);
-    if ( Base::vertex_of_simplex(s,j) != v && !visited_mark(t)  &&
-         incident_simplex_search(v,t) ) 
-      return true;    
-  }
-  return false;
-}
-
-template <typename R, typename Lifted_R> 
-typename Delaunay_d<R,Lifted_R>::Simplex_handle 
-Delaunay_d<R,Lifted_R>::simplex(Vertex_handle v) const
-{ 
-  Simplex_handle s = Base::simplex(v);
-  if ( Base::vertex_of_simplex(s,Base::index(v)) != v )
-    CGAL_error_msg("Delaunay_d::simplex: s is not incident to v.");
-  incident_simplex_search(v,s);
-  clear_visited_marks(s);
-  return Base::simplex(v);
-}
-
-template <typename R, typename Lifted_R>
-int Delaunay_d<R,Lifted_R>::index(Vertex_handle v) const
-{ simplex(v);
-  int i = Base::index(v);
-  return ( const_cast<Self*>(this)->is_S_cocircular() ?  i : i-1);
-}
-
-template <typename R, typename Lifted_R>
-bool Delaunay_d<R,Lifted_R>::
-contains(Simplex_handle s, const Point_d& x) const
-{ int d = current_dimension();
-  if (d < 0) return false;
-  std::vector<Point_d> A;
-  A.reserve(d + 1);
-  for (int i = 0; i <= d; i++){ 
-    Vertex_handle vh = vertex_of_simplex(s,i);
-    if (vh!=this->anti_origin_)
-      A.push_back( associated_point(vh) );
-  }
-  typename R::Contained_in_simplex_d contained_in_simplex =
-    kernel().contained_in_simplex_d_object();
-  return contained_in_simplex(A.begin(),A.end(),x);
-}
-
-
-template <typename R, typename Lifted_R>
-typename Delaunay_d<R,Lifted_R>::Simplex_handle
-Delaunay_d<R,Lifted_R>::
-locate(const Point_d& x) const
-{ 
-  int d = current_dimension();
-  if (d < 0) return Simplex_handle();
-  if ( d == 0 ) {
-    if ( x == point_of_simplex(origin_simplex_,0) )
-      return origin_simplex_;
-    else
-      return Simplex_handle();
-  }
-  typename Lifted_R::Lift_to_paraboloid_d lift =
-    lifted_kernel().lift_to_paraboloid_d_object();;
-  Lifted_point_d lp = lift(x);
-  if ( is_dimension_jump(lp) ) {
-    Simplex_iterator s;
-    for (s = const_cast<Self*>(this)->simplices_begin(NEAREST); 
-         s != const_cast<Self*>(this)->simplices_end(); ++s) 
-      if ( contains(s,x) ) return s;
-    return Simplex_handle();
-  }
-  // lift(p) is not a dimension jump
-  std::list<Simplex_handle> candidates;
-  std::size_t dummy1 = 0; 
-  int loc = -1; // intialization is important
-  Simplex_handle f;
-  this -> visibility_search(origin_simplex_,lp,candidates,dummy1,loc,f);
-  this -> clear_visited_marks(origin_simplex_);
-  //f and simplices in candidates are unbounded simplices only
-  if ( f != Simplex_handle() ){
-    return f;
-  }
-  typename std::list<Simplex_handle>::iterator it;
-  for(it = candidates.begin(); it != candidates.end(); ++it)
-    if ( contains(*it,x) ) return *it;
-
-  return Simplex_handle();
-}
-
-
-
-template <typename R, typename Lifted_R>
-typename Delaunay_d<R,Lifted_R>::Vertex_handle 
-Delaunay_d<R,Lifted_R>::
-nearest_neighbor(const Point_d& x) const
-{ 
-  int d = current_dimension();
-  if (d < 0) return Vertex_handle();
-  if (d == 0) 
-    return Base::vertex_of_simplex(origin_simplex_,0);
-  
-  typename Lifted_R::Lift_to_paraboloid_d lift =
-    lifted_kernel().lift_to_paraboloid_d_object();;
-  Lifted_point_d lp = lift(x);
-  std::list<Simplex_handle> candidates;
- 
-  if ( is_dimension_jump(lp) )
-    candidates = all_simplices(NEAREST);
-  else {
-    // lift(x) is not a dimension jump
-    std::size_t dummy1 = 0; 
-    int location = -1;
-    typename Base::Facet_handle f;
-    this -> visibility_search(origin_simplex_,lp,candidates,dummy1,location,f);
-    this -> clear_visited_marks(origin_simplex_);
-    CGAL_assertion_msg( location != -1,
-      "Delaunay_d::nearest_neighbor: location cannot be -1");
-    if (location == 0) {
-      // x must be one of the corners of f
-      for (int i = 0; i < Base::current_dimension(); i++) {
-        if ( point_of_facet(f,i) == lp )  
-          return vertex_of_facet(f,i);
-      }
-      CGAL_error_msg("Delaunay_d::nearest_neighbor: \
-      if loc = 1 then lp must be corner of f");
-    }
-  }
-
-  /* search through the vertices of the candidate simplices */
-  if ( candidates.empty() ) 
-    CGAL_error_msg("Delaunay_d::nearest_neighbor: candidates is empty");
-  Vertex_handle nearest_v = 
-    vertex_of_simplex(*candidates.begin(),0);
-  typename R::Squared_distance_d sqr_dist =
-    kernel().squared_distance_d_object();
-  FT min_dist = sqr_dist(x,associated_point(nearest_v));
-
-  typename std::list<Simplex_handle>::iterator it;
-  for(it=candidates.begin(); it!=candidates.end(); ++it) {
-    for (int i = 0; i <= d ; i++) {
-      typename R::Squared_distance_d sqr_dist =
-        kernel().squared_distance_d_object();
-      FT sidist = sqr_dist(x,point_of_simplex(*it,i));
-      if ( sidist < min_dist ) {
-        min_dist = sidist ;
-        nearest_v = vertex_of_simplex(*it,i);
-      }
-    }
-  }
-  return nearest_v;
-}
-
-template <typename R, typename Lifted_R>
-void Delaunay_d<R,Lifted_R>::
-all_vertices_below(const Lifted_hyperplane_d& h, 
-                   Simplex_handle s, 
-                   std::list< Vertex_handle >& result,
-                   Unique_hash_map<Vertex_handle,bool>& is_new,
-                   bool is_cocircular) const
-{ 
-  visited_mark(s) = true;
-  bool some_vertex_on_or_below_h = false;
-  register int i;
-  int low = (is_cocircular ? 0 : 1);
-  for (i = low; i <= Base::current_dimension(); i++) {
-    Vertex_handle v = Base::vertex_of_simplex(s,i);
-    typename Lifted_R::Oriented_side_d side =
-      lifted_kernel().oriented_side_d_object();
-    if ( !(side(h, Base::associated_point(v)) == ON_POSITIVE_SIDE) ) {
-      some_vertex_on_or_below_h = true;
-      if ( is_new[v] ) {
-        result.push_back(v);
-        is_new[v] = false;
-      }
-    }
-  }
-        
-  if ( !some_vertex_on_or_below_h ) return;
-  for (i = low; i <= Base::current_dimension(); i++) {
-    Simplex_handle t = Base::opposite_simplex(s,i);
-    if ( !visited_mark(t) && 
-         (!is_cocircular || is_bounded_simplex(t)) )
-      all_vertices_below(h,t,result,is_new,is_cocircular);
-  }
-}
-
-template <typename R, typename Lifted_R>
-std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
-Delaunay_d<R,Lifted_R>::
-range_search(const Sphere_d& C) const
-{ 
-  std::list<Vertex_handle> result;
-  int dc = current_dimension();
-  if ( dc < 0 ) 
-    return result;
-  Point_d c = C.center();
-  Vertex_handle v = nearest_neighbor(c);
-  if ( dc == 0 ) {
-    if ( C.has_on_bounded_side(associated_point(v)) ) 
-      result.push_back(v); return result;
-  }
-  Simplex_handle s = simplex(v);
-  bool is_cocircular = const_cast<Self*>(this)->is_S_cocircular();
-  Unique_hash_map<Vertex_handle,bool> is_new(true);
-  int d = dimension();
-  std::vector<Lifted_point_d> P(d + 1);
-  typename Lifted_R::Lift_to_paraboloid_d lift =
-    lifted_kernel().lift_to_paraboloid_d_object();
-  typename R::Point_of_sphere_d point_of_sphere =
-    kernel().point_of_sphere_d_object();
-  for (int i = 0; i <= d; i++)  
-    P[i] = lift(point_of_sphere(C,i));
-  typedef typename Lifted_vector_d::Base_vector Base_vector;
-  Lifted_point_d o = P[0] - 
-    Lifted_vector_d(d+1,Base_vector(),d);
-  typename Lifted_R::Construct_hyperplane_d hyperplane_trough =
-    lifted_kernel().construct_hyperplane_d_object();
-  Lifted_hyperplane_d h = 
-    hyperplane_trough(P.begin(),P.end(),o,ON_NEGATIVE_SIDE);  
-  // below is negative
-  all_vertices_below(h,s,result,is_new,is_cocircular);
-  clear_visited_marks(s);
-  return result;
-}
-  
-
-template <typename R, typename Lifted_R>
-std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
-Delaunay_d<R,Lifted_R>::
-range_search(const std::vector<Point_d>& A) const
-{ 
-  typename R::Affinely_independent_d affinely_independent =
-    kernel().affinely_independent_d_object();
-  CGAL_assertion_msg( affinely_independent(A.begin(),A.end()),
-    "Delaunay_d::range_search: simplex must be affinely independent.");
-  typename R::Construct_sphere_d sphere_through =
-    kernel().construct_sphere_d_object();
-  Sphere_d C = sphere_through(dimension(),A.begin(),A.end());
-  std::list<Vertex_handle> result;
-  std::list<Vertex_handle> candidates = range_search(C);
-  typename R::Contained_in_simplex_d contained_in_simplex =
-    kernel().contained_in_simplex_d_object();
-  typename std::list<Vertex_handle>::iterator it;
-  for(it = candidates.begin(); it != candidates.end(); ++it) {
-    if ( contained_in_simplex(A.begin(),A.end(),associated_point(*it)) )
-      result.push_back(*it);
-  }
-  return result;
-}
-
-
-
-template <typename R, typename Lifted_R>
-std::list< typename Delaunay_d<R,Lifted_R>::Simplex_handle > 
-Delaunay_d<R,Lifted_R>::
-all_simplices(Delaunay_voronoi_kind k) const
-{ 
-  std::list<Simplex_handle> result;
-  if ( dcur < 0 ) return result;
-  Simplex_iterator s;
-  for (s = const_cast<Self*>(this)->simplices_begin(k); 
-       s != const_cast<Self*>(this)->simplices_end(); ++s) {
-    result.push_back(s); 
-  }
-  return result;
-}
-
-template <typename R, typename Lifted_R>
-std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
-Delaunay_d<R,Lifted_R>::
-all_vertices(Delaunay_voronoi_kind k) const
-{ 
-  Unique_hash_map<Vertex_handle,bool> is_new_vertex(true);
-  std::list<Vertex_handle> result;
-  std::list<Simplex_handle> hull_simplices = all_simplices(k);
-  typename std::list<Simplex_handle>::iterator it;
-  for (it = hull_simplices.begin(); it != hull_simplices.end(); ++it) {
-    for (int i = 0; i <= current_dimension(); i++) {
-      Vertex_handle v = vertex_of_simplex(*it,i);
-      if ( is_new_vertex[v] ) {
-        is_new_vertex[v] = false;
-        result.push_back(v);
-      }
-    }
-  }
-  return result;
-}
-
-
-template <typename R, typename Lifted_R>
-std::list< typename Delaunay_d<R,Lifted_R>::Point_d > 
-Delaunay_d<R,Lifted_R>::
-all_points() const
-{ 
-  std::list<Point_d> result;
-  std::list<Vertex_handle> all_nearest_verts = all_vertices(NEAREST);
-  typename std::list<Vertex_handle>::iterator it;
-  for(it = all_nearest_verts.begin(); 
-      it != all_nearest_verts.end();
-      ++it) 
-    result.push_back(associated_point(*it));
-  return result;
-}
-
-
-} //namespace CGAL
-#endif // CGAL_DELAUNAY_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_face_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_face_base_2.h
deleted file mode 100644
index 4f45abc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_face_base_2.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent RINEAU
-
-#ifndef CGAL_DELAUNAY_FACE_BASE_2_H
-#define CGAL_DELAUNAY_FACE_BASE_2_H
-
-#include <CGAL/Constrained_triangulation_face_base_2.h>
-
-namespace CGAL {
-
-template <class Gt,
-          class Fb = Constrained_triangulation_face_base_2<Gt> >
-class Delaunay_mesh_face_base_2 : public Fb
-{
-public:
-  typedef Gt Geom_traits;
-  typedef typename Fb::Vertex_handle Vertex_handle;
-  typedef typename Fb::Face_handle Face_handle;
-
-  template < typename TDS2 >
-  struct Rebind_TDS {
-    typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
-    typedef Delaunay_mesh_face_base_2<Gt,Fb2> Other;
-  };
-
-protected:
-  bool in_domain;
-
-public:
-  Delaunay_mesh_face_base_2(): Fb(), in_domain(false) {}
-
-  Delaunay_mesh_face_base_2(Vertex_handle v0, 
-			    Vertex_handle v1, 
-			    Vertex_handle v2)
-    : Fb(v0,v1,v2), in_domain(false) {}
-
-  Delaunay_mesh_face_base_2(Vertex_handle v0, 
-			    Vertex_handle v1, 
-			    Vertex_handle v2,
-			    Face_handle n0, 
-			    Face_handle n1, 
-			    Face_handle n2)
-    : Fb(v0,v1,v2,n0,n1,n2), in_domain(false) {}
-
-  inline
-  bool is_in_domain() const { return in_domain; }
-
-  inline
-  void set_in_domain(const bool b) { in_domain=b; }
-
-  /** compatibility with CGAL-3.2 */
-  inline
-  bool is_marked() const { return in_domain; }
-
-  /** compatibility with CGAL-3.2 */
-  inline
-  void set_marked(const bool b) { in_domain=b; }
-};
-
-} // namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_2.h
deleted file mode 100644
index 0e8f342..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_2.h
+++ /dev/null
@@ -1,2549 +0,0 @@
-// Copyright (c) 1997  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Mariette Yvinec
-//               : Olivier Devillers  (remove)
-//               : Pedro de Castro (displacement)
-
-
-
-#ifndef CGAL_DELAUNAY_TRIANGULATION_2_H
-#define CGAL_DELAUNAY_TRIANGULATION_2_H
-
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/iterator.h>
-
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-#include <CGAL/Spatial_sort_traits_adapter_2.h>
-#include <CGAL/internal/info_check.h>
-
-#include <boost/iterator/zip_iterator.hpp>
-#include <boost/mpl/and.hpp>
-#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-namespace CGAL {
-
-template < class Gt, 
-           class Tds = Triangulation_data_structure_2 <
-                           Triangulation_vertex_base_2<Gt> > >
-class Delaunay_triangulation_2 : public Triangulation_2<Gt,Tds>
-{
-public:
-  typedef Gt Geom_traits;
-  typedef typename Geom_traits::Point_2       Point;
-  typedef typename Geom_traits::Segment_2     Segment;
-  typedef typename Geom_traits::Triangle_2    Triangle;
-  
-
-  typedef typename Geom_traits::Orientation_2 Orientation_2;
-  typedef typename Geom_traits::Compare_x_2   Compare_x;
-  typedef typename Geom_traits::Compare_y_2   Compare_y;
-  typedef typename Geom_traits::Side_of_oriented_circle_2 
-                                              Side_of_oriented_circle;
-
-  
-  typedef Triangulation_2<Gt,Tds>                       Triangulation;
-  typedef typename Triangulation::size_type             size_type;
-  typedef typename Triangulation::Locate_type           Locate_type;
-  typedef typename Triangulation::Face_handle           Face_handle;
-  typedef typename Triangulation::Vertex_handle         Vertex_handle;
-  typedef typename Triangulation::Edge                  Edge;
-  typedef typename Triangulation::Edge_circulator       Edge_circulator;
-  typedef typename Triangulation::Face_circulator       Face_circulator;
-  typedef typename Triangulation::Vertex_circulator     Vertex_circulator;
-  typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;
-  typedef typename Triangulation::Finite_faces_iterator Finite_faces_iterator;
-  typedef typename Triangulation::Finite_vertices_iterator 
-                                                     Finite_vertices_iterator;
-  typedef typename Triangulation::All_faces_iterator    All_faces_iterator;
- 
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
-  using Triangulation::side_of_oriented_circle;
-  using Triangulation::circumcenter;
-  using Triangulation::collinear_between;
-  using Triangulation::test_dim_down;
-  using Triangulation::make_hole;
-  using Triangulation::fill_hole_delaunay;
-  using Triangulation::delete_vertex;
-#endif
-
-
- Delaunay_triangulation_2(const Gt& gt = Gt())
-  : Triangulation_2<Gt,Tds>(gt) {}
-  
-  Delaunay_triangulation_2(
-	       const Delaunay_triangulation_2<Gt,Tds> &tr)
-       : Triangulation_2<Gt,Tds>(tr)
-  {   CGAL_triangulation_postcondition( is_valid() );  }
-
- template <class InputIterator>
- Delaunay_triangulation_2(InputIterator first, InputIterator last,
-                          const Gt& gt = Gt())
- : Triangulation_2<Gt,Tds>(gt)
- {
-  insert(first,last);
- }
-
-// CHECK -QUERY
-  bool is_valid(bool verbose = false, int level = 0) const;
-
-  Vertex_handle
-  nearest_vertex(const Point& p, Face_handle f= Face_handle()) const;
-  
-  bool does_conflict(const Point  &p, Face_handle fh) const;// deprecated
-  bool test_conflict(const Point  &p, Face_handle fh, bool strict = true) const;
-  bool find_conflicts(const Point  &p,                //deprecated
-		      std::list<Face_handle>& conflicts,
-		      Face_handle start= Face_handle() ) const;
-  //  //template member functions, declared and defined at the end 
-  // template <class OutputItFaces, class OutputItBoundaryEdges> 
-  // std::pair<OutputItFaces,OutputItBoundaryEdges>
-  // get_conflicts_and_boundary(const Point  &p, 
-  // 		                OutputItFaces fit, 
-  // 		                OutputItBoundaryEdges eit,
-  // 		                Face_handle start) const;
-  // template <class OutputItFaces>
-  // OutputItFaces
-  // get_conflicts (const Point  &p, 
-  //                OutputItFaces fit, 
-  // 		    Face_handle start ) const;
-  // template <class OutputItBoundaryEdges>
-  // OutputItBoundaryEdges
-  // get_boundary_of_conflicts(const Point  &p, 
-  // 			       OutputItBoundaryEdges eit, 
-  // 			       Face_handle start ) const;
-   
- 
-  // DUAL
-  Point dual (Face_handle f) const;
-  Object dual(const Edge &e) const ;
-  Object dual(const Edge_circulator& ec) const;
-  Object dual(const Finite_edges_iterator& ei) const;
-  
-  //INSERTION-REMOVAL
-  Vertex_handle insert(const Point  &p, 
-		       Face_handle start = Face_handle() );
-  Vertex_handle insert(const Point& p,
-		       Locate_type lt,
-		       Face_handle loc, int li );
-  Vertex_handle push_back(const Point &p);
-
-  void  remove(Vertex_handle v );
-
-  // DISPLACEMENT
-  void restore_Delaunay(Vertex_handle v);
-
-  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
-  Vertex_handle move(Vertex_handle v, const Point &p);
-
-protected: // some internal stuffs
-
-  template <class OutputItFaces>
-  Vertex_handle insert_and_give_new_faces(const Point  &p, 
-                                          OutputItFaces fit,
-                                          Face_handle start = Face_handle() );
-  template <class OutputItFaces>
-  Vertex_handle insert_and_give_new_faces(const Point& p,
-                                          Locate_type lt,
-                                          Face_handle loc, int li, 
-                                          OutputItFaces fit);
-
-  template <class OutputItFaces>
-  Vertex_handle move_if_no_collision_and_give_new_faces(Vertex_handle v, 
-                                                        const Point &p, 
-                                                        OutputItFaces fit);
-
-  template <class OutputItFaces>
-  void remove_and_give_new_faces(Vertex_handle v, 
-                                 OutputItFaces fit);
-public:
-
-  bool is_delaunay_after_displacement(Vertex_handle v, 
-                                      const Point &p) const;
-
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2  
-  using Triangulation::cw;
-  using Triangulation::ccw;
-  using Triangulation::geom_traits;
-#endif
-
-private:
-#ifndef CGAL_DT2_USE_RECURSIVE_PROPAGATING_FLIP
-  void non_recursive_propagating_flip(Face_handle f,int i);
-  void propagating_flip(const Face_handle& f,int i, int depth=0);
-#else
-  void propagating_flip(const Face_handle& f,int i);
-#endif
-
-
-// auxilliary functions for remove
-  void remove_degree_init(Vertex_handle v, std::vector<Face_handle> &f,
-         std::vector<Vertex_handle> &w, std::vector<int> &i,int&d,int&maxd);
-  void remove_degree_triangulate(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i,int d);
-  void remove_degree_d(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i,int d);
-  void remove_degree3(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree4(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree5(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i );
-  void remove_degree5_star   (Vertex_handle &v, 
-     Face_handle & ,Face_handle & ,Face_handle & ,Face_handle & ,Face_handle & ,
-     Vertex_handle&,Vertex_handle&,Vertex_handle&,Vertex_handle&,Vertex_handle&,
-     int           ,int           ,int           ,int           ,int );
-  void remove_degree6(Vertex_handle v , std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree6_star   (Vertex_handle &v,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      int           ,int           ,int           ,
-			      int           ,int           ,int );
-  void remove_degree6_N      (Vertex_handle &v,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      int           ,int           ,int           ,
-			      int           ,int           ,int  );
-  void remove_degree6_antiN  (Vertex_handle &v,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      int           ,int           ,int           ,
-			      int           ,int           ,int  );
-  void remove_degree6_diamond(Vertex_handle &v,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Face_handle & ,Face_handle & ,Face_handle & ,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
-			      int           ,int           ,int           ,
-			      int           ,int           ,int  );
-  void remove_degree7(Vertex_handle v,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  bool incircle(int x, int j, int, int l, std::vector<Face_handle> &f,
-		std::vector<Vertex_handle> &w, std::vector<int> &i){
-    // k is supposed to be j+1 modulo degree, x is supposed to be finite
-    //test if w[x] inside circle w[j]w[k]w[l] (f[j] has vertices w[j]w[k])
-    // THE FOLLOWING LINE IS TO BE REMOVED. JUST THERE FOR STUPID PRECONDITION
-    //if (geom_traits().orientation_2_object()(w[j]->point(),w[k]->point(),w[l]->point())!=POSITIVE) return true;
-    f[j]->set_vertex( i[j], w[l]) ; // change vertex v for another one
-    return (test_conflict( w[x]->point(), f[j]) );
-  }
-  void rotate7(int j, std::vector<Vertex_handle> &w, 
-	       std::vector<Face_handle> &f, std::vector<int> &i);
-  void remove_degree7_star      (Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree7_zigzag    (Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree7_leftdelta (Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree7_rightdelta(Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree7_leftfan   (Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-  void remove_degree7_rightfan  (Vertex_handle&,int,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i);
-// end of auxilliary functions for remove
-
-
-
-  Vertex_handle nearest_vertex_2D(const Point& p, Face_handle f) const;
-  Vertex_handle nearest_vertex_1D(const Point& p) const;
-
-  void  look_nearest_neighbor(const Point& p,
-			      Face_handle f,
-			      int i,
-			      Vertex_handle& nn) const;
-
-public:
-  template < class Stream>
-  Stream& draw_dual(Stream & ps)
-    {
-      Finite_edges_iterator eit= this->finite_edges_begin();
-      for (; eit != this->finite_edges_end(); ++eit) {
-	Object o = dual(eit);
-	typename Geom_traits::Line_2  l;
-	typename Geom_traits::Ray_2   r;
-	Segment s;
-	if (CGAL::assign(s,o)) ps << s;
-	if (CGAL::assign(r,o)) ps << r;
-	if (CGAL::assign(l,o)) ps << l;
-      }
-      return ps;
-    }
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first, InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-                typename std::iterator_traits<InputIterator>::value_type,
-                Point
-            >
-          >::type* = NULL
-  )
-#else
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert(InputIterator first, InputIterator last)
-#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO 
-    {
-      size_type n = this->number_of_vertices();
-
-      std::vector<Point> points (first, last);
-      spatial_sort (points.begin(), points.end(), geom_traits());
-      Face_handle f;
-      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-              p != end; ++p)
-          f = insert (*p, f)->face();
-
-      return this->number_of_vertices() - n;
-    }
-
-#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-private:  
-  //top stands for tuple-or-pair
-  template <class Info>
-  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
-  template <class Info>
-  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
-  template <class Info>
-  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
-  template <class Info>
-  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
-
-  template <class Tuple_or_pair,class InputIterator>
-  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
-  {
-    size_type n = this->number_of_vertices();
-    std::vector<std::ptrdiff_t> indices;
-    std::vector<Point> points;
-    std::vector<typename Tds::Vertex::Info> infos;
-    std::ptrdiff_t index=0;
-    for (InputIterator it=first;it!=last;++it){
-      Tuple_or_pair value=*it;
-      points.push_back( top_get_first(value)  );
-      infos.push_back ( top_get_second(value) );
-      indices.push_back(index++);
-    }
-
-    typedef Spatial_sort_traits_adapter_2<Geom_traits,Point*> Search_traits;
-    
-    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
-
-    Vertex_handle v_hint;
-    Face_handle hint;
-    for (typename std::vector<std::ptrdiff_t>::const_iterator
-      it = indices.begin(), end = indices.end();
-      it != end; ++it){
-      v_hint = insert(points[*it], hint);
-      if (v_hint!=Vertex_handle()){
-        v_hint->info()=infos[*it];
-        hint=v_hint->face();
-      }
-    }
-    
-    return this->number_of_vertices() - n;
-  }
-  
-public:
-
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first,
-          InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-              typename std::iterator_traits<InputIterator>::value_type,
-              std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type>
-            > >::type* =NULL
-  )
-  {
-    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
-  }
-
-  template <class  InputIterator_1,class InputIterator_2>
-  std::ptrdiff_t
-  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
-          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
-          typename boost::enable_if<
-            boost::mpl::and_<
-              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
-              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Tds::Vertex>::type >
-            >
-          >::type* =NULL
-  )
-  {
-    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
-  }
-#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  get_conflicts_and_boundary(const Point  &p, 
-			     OutputItFaces fit, 
-			     OutputItBoundaryEdges eit,
-			     Face_handle start = Face_handle(),
-                             bool strict = true) const {
-    CGAL_triangulation_precondition( this->dimension() == 2);
-    int li;
-    Locate_type lt;
-    Face_handle fh = this->locate(p,lt,li, start);
-    switch(lt) {
-    case Triangulation::OUTSIDE_AFFINE_HULL:
-    case Triangulation::VERTEX:
-      return std::make_pair(fit,eit);
-    case Triangulation::FACE:
-    case Triangulation::EDGE:
-    case Triangulation::OUTSIDE_CONVEX_HULL:
-      *fit++ = fh; //put fh in OutputItFaces
-      std::pair<OutputItFaces,OutputItBoundaryEdges>
-	pit = std::make_pair(fit,eit);
-      pit = propagate_conflicts(p,fh,0,pit, strict);
-      pit = propagate_conflicts(p,fh,1,pit, strict);
-      pit = propagate_conflicts(p,fh,2,pit, strict);
-      return pit;    
-    }
-    CGAL_triangulation_assertion(false);
-    return std::make_pair(fit,eit);
-  } 
-
-  template <class OutputItFaces> 
-  OutputItFaces
-  get_conflicts (const Point  &p, 
-		 OutputItFaces fit, 
-		 Face_handle start= Face_handle(),
-                 bool strict = true) const {
-    std::pair<OutputItFaces,Emptyset_iterator> pp = 
-      get_conflicts_and_boundary(p,fit,Emptyset_iterator(),start, strict);
-    return pp.first;
-  }
-
-  template <class OutputItBoundaryEdges> 
-  OutputItBoundaryEdges
-  get_boundary_of_conflicts(const Point  &p, 
-			    OutputItBoundaryEdges eit, 
-			    Face_handle start= Face_handle(),
-                            bool strict = true) const {
-    std::pair<Emptyset_iterator, OutputItBoundaryEdges> pp = 
-      get_conflicts_and_boundary(p,Emptyset_iterator(),eit,start,strict);
-    return pp.second;
-  }
-
-private:
-  
-
-
-
-#ifdef CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  propagate_conflicts (const Point  &p,
-		       const Face_handle fh, 
-		       const int i,
-		       std::pair<OutputItFaces,OutputItBoundaryEdges>
-		       pit,
-                       bool strict = true)  const {
-    Face_handle fn = fh->neighbor(i);
-    if (! test_conflict(p,fn,strict)) {
-      *(pit.second)++ = Edge(fn, fn->index(fh));
-    } else {
-      *(pit.first)++ = fn;
-      int j = fn->index(fh);
-      pit = propagate_conflicts(p,fn,ccw(j),pit,strict);
-      pit = propagate_conflicts(p,fn,cw(j), pit,strict);
-    }
-    return pit;
-  }
-#else // NO CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  non_recursive_propagate_conflicts ( const Point  &p,
-                                      const Face_handle fh, 
-                                      const int i,
-		                      std::pair<OutputItFaces,OutputItBoundaryEdges> pit,
-                                      bool strict = true)  const 
-  {
-    std::stack<std::pair<Face_handle, int> > stack;
-    stack.push( std::make_pair(fh,i) );
-    while ( !stack.empty() )
-    {
-      const Face_handle fh=stack.top().first;
-      const int i=stack.top().second;
-      stack.pop();
-      Face_handle fn = fh->neighbor(i);
-      if (! test_conflict(p,fn,strict)) {
-        *(pit.second)++ = Edge(fn, fn->index(fh));
-      } else {
-        *(pit.first)++ = fn;
-        int j = fn->index(fh);
-        stack.push( std::make_pair(fn,ccw(j)) );
-        stack.push( std::make_pair(fn,cw(j)) );
-      }
-    }
-    return pit;
-  }
-
-  template <class OutputItFaces, class OutputItBoundaryEdges> 
-  std::pair<OutputItFaces,OutputItBoundaryEdges>
-  propagate_conflicts (const Point  &p,
-		       const Face_handle fh, 
-		       const int i,
-		       std::pair<OutputItFaces,OutputItBoundaryEdges>
-		       pit,
-                       bool strict = true,
-                       int depth=0)  const 
-  {
-    if (depth == 100)
-      return non_recursive_propagate_conflicts(p, fh, i, pit, strict);
-
-    Face_handle fn = fh->neighbor(i);
-    if (! test_conflict(p,fn,strict)) {
-      *(pit.second)++ = Edge(fn, fn->index(fh));
-    } else {
-      *(pit.first)++ = fn;
-      int j = fn->index(fh);
-      pit = propagate_conflicts(p,fn,ccw(j),pit, strict, depth+1);
-      pit = propagate_conflicts(p,fn,cw(j), pit, strict, depth+1);
-    }
-    return pit;
-  }
-#endif // NO CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
-
-protected:
-
-  void restore_edges(Vertex_handle v)
-  {
-    std::list<Edge> edges;
-    Face_circulator fc = this->incident_faces(v), done(fc);
-    int degree = 0;
-    do {
-      if((++degree) > 3) break;
-    } while(++fc != done);
-    fc = this->incident_faces(v);
-    done = fc;
-    if(degree == 3) {
-      do {
-        int i = fc->index(v);
-        edges.push_back(Edge(fc, i));
-      } while(++fc != done);
-    } else {
-      do {
-        int i = fc->index(v);
-        edges.push_back(Edge(fc, i));
-        edges.push_back(Edge(fc, this->cw(i)));
-      } while(++fc != done);
-    }
-    while(!edges.empty()) {
-      const Edge &e = edges.front();
-      Face_handle f = e.first;
-      int i = e.second;
-      edges.pop_front();
-      if(this->is_infinite(f->vertex(i))) continue;
-      Face_handle fi = f->neighbor(i);
-      int mi = this->_tds.mirror_index(f, i);
-      Vertex_handle vm = this->_tds.mirror_vertex(f, i);
-      if(this->is_infinite(vm)) continue;
-      if(this->side_of_oriented_circle(f, vm->point(),true) == ON_POSITIVE_SIDE) {
-        this->_tds.flip(f, i);
-        edges.push_back(Edge(f, i));
-        edges.push_back(Edge(f, this->cw(i)));
-        edges.push_back(Edge(fi, this->cw(mi)));
-        edges.push_back(Edge(fi, mi));
-      }
-    }
-  }
-
-  void restore_edges(Vertex_handle v, std::set<Face_handle> &faces)
-  {
-    typedef std::list<Edge> Edges_list;	
-    Edges_list edges;
-    Face_circulator fc = this->incident_faces(v), done(fc);
-    int degree = 0;
-    do {
-      if((++degree) > 3) break;
-    } while(++fc != done);
-    fc = this->incident_faces(v);
-    done = fc;
-    if(degree == 3) {
-      do {
-        int i = fc->index(v);
-        edges.push_back(Edge(fc, i));
-      } while(++fc != done);
-    } else {
-      do {
-        int i = fc->index(v);
-        edges.push_back(Edge(fc, i));
-        edges.push_back(Edge(fc, this->cw(i)));
-      } while(++fc != done);
-    }
-    while(!edges.empty()) {
-      const Edge &e = edges.front();
-      Face_handle f = e.first;
-      int i = e.second;
-      edges.pop_front();
-      faces.insert(f);
-      if(this->is_infinite(f->vertex(i))) continue;
-      Face_handle fi = f->neighbor(i);
-      int mi = this->_tds.mirror_index(f, i);
-      Vertex_handle vm = this->_tds.mirror_vertex(f, i);
-      if(this->is_infinite(vm)) continue;
-      if(this->side_of_oriented_circle(f, vm->point()) == ON_POSITIVE_SIDE) {
-        this->_tds.flip(f, i);
-        edges.push_back(Edge(f, i));
-        edges.push_back(Edge(f, this->cw(i)));
-        edges.push_back(Edge(fi, this->cw(mi)));
-        edges.push_back(Edge(fi, mi));
-      }
-    }
-  }
-
-};
-
-template < class Gt, class Tds >
-inline bool
-Delaunay_triangulation_2<Gt,Tds>::
-test_conflict(const Point  &p, Face_handle fh, bool strict) const
-{
-  if(! strict){
-    Oriented_side os = side_of_oriented_circle(fh,p,false);
-    return os == ON_POSITIVE_SIDE;
-  }
-  // return true  if P is inside the circumcircle of fh
-  // if fh is infinite, return true when p is in the positive
-  // halfspace or on the boundary and in the  finite edge of fh
-  Oriented_side os = side_of_oriented_circle(fh,p,true);
-  if (os == ON_POSITIVE_SIDE) return true;
- 
-  if (os == ON_ORIENTED_BOUNDARY && this->is_infinite(fh)) {
-    int i = fh->index(this->infinite_vertex());
-    return collinear_between(fh->vertex(cw(i))->point(), p,
-			     fh->vertex(ccw(i))->point() );
-  }
-
-  return false;
-}
-
-template < class Gt, class Tds >
-inline bool
-Delaunay_triangulation_2<Gt,Tds>::
-does_conflict(const Point  &p, Face_handle fh) const
-{
-  return test_conflict(p,fh);
-}
-
-template < class Gt, class Tds >
-inline bool
-Delaunay_triangulation_2<Gt,Tds>::
-find_conflicts(const Point  &p, 
-	       std::list<Face_handle>& conflicts,
-	       Face_handle start ) const
-{
-  get_conflicts(p, std::back_inserter(conflicts), start);
-  return (! conflicts.empty());
-}
-
-template < class Gt, class Tds >
-bool
-Delaunay_triangulation_2<Gt,Tds>::
-is_valid(bool verbose, int level) const
-{
-  bool result = Triangulation_2<Gt,Tds>::is_valid(verbose, level);
-
-  for( Finite_faces_iterator it = this->finite_faces_begin(); 
-       it != this->finite_faces_end() ; it++) {
-    for(int i=0; i<3; i++) {
-      if ( ! this->is_infinite( this->mirror_vertex(it,i))) {
-	result = result &&  ON_POSITIVE_SIDE != 
-	  side_of_oriented_circle( it, this->mirror_vertex(it,i)->point(), false);
-      }
-      CGAL_triangulation_assertion( result );
-    }
-  }
-  return result;
-}
-
-template < class Gt, class Tds >
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>:: 
-nearest_vertex(const Point  &p, Face_handle f) const
-{
-  switch (this->dimension()) {
-  case 0:
-    if (this->number_of_vertices() == 0) return Vertex_handle();
-    if (this->number_of_vertices() == 1) return this->finite_vertex();
-    //break;
-  case 1:
-    return nearest_vertex_1D(p);
-    //break;      
-  case 2:
-    return nearest_vertex_2D(p,f);
-    //break;
-  }
-  return Vertex_handle();
-}
-  
-template < class Gt, class Tds >
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>:: 
-nearest_vertex_2D(const Point& p, Face_handle f) const
-{
-  CGAL_triangulation_precondition(this->dimension() == 2);
-  f = this->locate(p,f);
-
-  typename Geom_traits::Compare_distance_2 
-    compare_distance =  this->geom_traits().compare_distance_2_object();
-  Vertex_handle nn =  !this->is_infinite(f->vertex(0)) ? f->vertex(0):f->vertex(1);
-  if ( !this->is_infinite(f->vertex(1)) && compare_distance(p,
-					    f->vertex(1)->point(),
-					    nn->point()) == SMALLER) 
-    nn=f->vertex(1);
-  if ( !this->is_infinite(f->vertex(2)) && compare_distance(p,
-					    f->vertex(2)->point(), 
-					    nn->point()) == SMALLER) 
-    nn=f->vertex(2);
-       
-  look_nearest_neighbor(p,f,0,nn);
-  look_nearest_neighbor(p,f,1,nn);
-  look_nearest_neighbor(p,f,2,nn);
-  return nn;
-}
-
-template < class Gt, class Tds >
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>:: 
-nearest_vertex_1D(const Point& p) const
-{
-  typename Geom_traits::Compare_distance_2 
-    compare_distance =  this->geom_traits().compare_distance_2_object();
-  Vertex_handle nn;
-  
-  Finite_vertices_iterator vit=this->finite_vertices_begin();
-  nn = vit;
-  for ( ; vit != this->finite_vertices_end(); ++vit){
-    if (compare_distance(p, vit->point(), nn->point()) == SMALLER) 
-      nn = vit;
-  } 
-  return nn;
-}
-  
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-look_nearest_neighbor(const Point& p,
-                      Face_handle f,
-		      int i,
-		      Vertex_handle& nn) const
-{
-  Face_handle  ni=f->neighbor(i);
-  if ( ON_POSITIVE_SIDE != side_of_oriented_circle(ni,p,true) ) return;
-
-  typename Geom_traits::Compare_distance_2 
-    compare_distance =  this->geom_traits().compare_distance_2_object();
-  i = ni->index(f);
-  if ( !this->is_infinite(ni->vertex(i)) &&
-       compare_distance(p, 
-	      ni->vertex(i)->point(),
-	      nn->point())  == SMALLER)  nn=ni->vertex(i);
-    
-  // recursive exploration of triangles whose circumcircle contains p
-  look_nearest_neighbor(p, ni, ccw(i), nn);
-  look_nearest_neighbor(p, ni, cw(i), nn);
-} 
-
-//DUALITY
-template<class Gt, class Tds>
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Point
-Delaunay_triangulation_2<Gt,Tds>::
-dual (Face_handle f) const
-{
-  CGAL_triangulation_precondition(this->_tds.is_face(f));
-  CGAL_triangulation_precondition (this->dimension()==2);
-  return circumcenter(f);
-}
-
-  
-template < class Gt, class Tds >
-Object
-Delaunay_triangulation_2<Gt,Tds>::
-dual(const Edge &e) const
-{
-  CGAL_triangulation_precondition(this->_tds.is_edge(e.first,e.second));
-  
-  typedef typename Geom_traits::Line_2        Line;
-  typedef typename Geom_traits::Ray_2         Ray;
-
-  CGAL_triangulation_precondition (!this->is_infinite(e));
-  if( this->dimension()== 1 ){
-    const Point& p = (e.first)->vertex(cw(e.second))->point();
-    const Point& q = (e.first)->vertex(ccw(e.second))->point();
-    Line l  = this->geom_traits().construct_bisector_2_object()(p,q);
-    return make_object(l);
-  }
-		    
-  // dimension==2
-  if( (!this->is_infinite(e.first)) &&
-      (!this->is_infinite(e.first->neighbor(e.second))) ) {
-    Segment s = this->geom_traits().construct_segment_2_object()
-                          (dual(e.first),dual(e.first->neighbor(e.second)));
-    return make_object(s);
-  } 
-  // one of the adjacent faces is infinite
-  Face_handle f; int i;
-  if (this->is_infinite(e.first)) {
-    f=e.first->neighbor(e.second); i=f->index(e.first);
-  }
-  else {
-    f=e.first; i=e.second;
-  }
-  const Point& p = f->vertex(cw(i))->point();
-  const Point& q = f->vertex(ccw(i))->point();
-  Line l = this->geom_traits().construct_bisector_2_object()(p,q);
-  Ray r = this->geom_traits().construct_ray_2_object()(dual(f), l);
-  return make_object(r);
-}
-  
-template < class Gt, class Tds >
-inline Object
-Delaunay_triangulation_2<Gt,Tds>::  
-dual(const Edge_circulator& ec) const
-{
-  return dual(*ec);
-}
-  
-template < class Gt, class Tds >
-inline Object
-Delaunay_triangulation_2<Gt,Tds>::
-dual(const Finite_edges_iterator& ei) const
-{
-  return dual(*ei);
-}
-  
-
-///////////////////////////////////////////////////////////////
-//  INSERT
-
-template < class Gt, class Tds >
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>::
-insert(const Point  &p,  Face_handle start)
-{
-  Locate_type lt;
-  int li;
-  Face_handle loc = this->locate (p, lt, li, start);
-  return insert(p, lt, loc, li);
-}
-  
-template < class Gt, class Tds >
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>::
-push_back(const Point &p)
-{
-  return insert(p);
-}
-  
-template < class Gt, class Tds >
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>::
-insert(const Point  &p, Locate_type lt, Face_handle loc, int li)
-{
-  Vertex_handle v = Triangulation_2<Gt,Tds>::insert(p,lt,loc,li);
-  restore_Delaunay(v);
-  return(v);
-}
-
-template < class Gt, class Tds >
-template < class OutputItFaces >
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
-Delaunay_triangulation_2<Gt,Tds>::
-insert_and_give_new_faces(const Point  &p, 
-                          OutputItFaces oif,
-                          Face_handle start)
-{
-  Vertex_handle v = insert(p, start);
-  int dimension = this->dimension();
-  if(dimension == 2)
-  {
-    Face_circulator fc = this->incident_faces(v), done(fc);
-    do {
-      *oif++ = fc;
-    } while(++fc != done);
-  }
-  else if(dimension == 1)
-  {
-    Face_handle c = v->face();
-    *oif++ = c;
-    *oif++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *oif++ = v->face(); // dimension == 0
-  return v;
-}
-		
-template < class Gt, class Tds >
-template < class OutputItFaces >
-inline
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
-Delaunay_triangulation_2<Gt,Tds>::
-insert_and_give_new_faces(const Point  &p,
-                          Locate_type lt,
-                          Face_handle loc, int li, 
-                          OutputItFaces oif)
-{
-  Vertex_handle v = insert(p, lt, loc, li);
-  int dimension = this->dimension();
-  if(dimension == 2)
-  {
-    Face_circulator fc = this->incident_faces(v), done(fc);
-    do {
-      *oif++ = fc;
-    } while(++fc != done);
-  }
-  else if(dimension == 1)
-  {
-    Face_handle c = v->face();
-    *oif++ = c;
-    *oif++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *oif++ = v->face(); // dimension == 0	
-  return v;	
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-restore_Delaunay(Vertex_handle v)
-{
-  if(this->dimension() <= 1) return;
-
-  Face_handle f=v->face();
-  Face_handle next;
-  int i;
-  Face_handle start(f);
-  do {
-    i = f->index(v);
-    next = f->neighbor(ccw(i));  // turn ccw around v
-    propagating_flip(f,i);
-    f=next;
-  } while(next != start);
-  return;
-}
-
-#ifndef CGAL_DT2_USE_RECURSIVE_PROPAGATING_FLIP
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-non_recursive_propagating_flip(Face_handle f , int i)
-{
-  std::stack<Edge> edges;
-  const Vertex_handle& vp = f->vertex(i);
-  const Point& p = vp->point();
-  edges.push(Edge(f,i));
-
-  while(! edges.empty()){
-    const Edge& e = edges.top();
-    f = e.first; 
-    i = e.second;
-    const Face_handle& n = f->neighbor(i);
-    
-    if ( ON_POSITIVE_SIDE != 
-         side_of_oriented_circle(n,  p, true) ) {
-      edges.pop();
-      continue;
-    }
-    this->flip(f, i);
-    // As we haven't popped it, we don't have to push it
-    edges.push(Edge(n,n->index(vp)));
-  }
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-propagating_flip(const Face_handle& f,int i, int depth)
-{
-#ifdef CGAL_DT2_IMMEDIATELY_NON_RECURSIVE_PROPAGATING_FLIP
-  non_recursive_propagating_flip(f,i);
-#else
-  int max_depth = 100;
-  if(depth==max_depth){
-    non_recursive_propagating_flip(f,i);
-    return;
-  }
-  Face_handle n = f->neighbor(i);
-      
-  if ( ON_POSITIVE_SIDE != 
-       side_of_oriented_circle(n,  f->vertex(i)->point(), true) ) {
-    return;
-  }
-  this->flip(f, i);
-  propagating_flip(f,i,depth+1);
-  i = n->index(f->vertex(i));
-  propagating_flip(n,i,depth+1);
-#endif
-}
-#else 
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-propagating_flip(const Face_handle& f,int i)
-{
- 
-  Face_handle n = f->neighbor(i);
-      
-  if ( ON_POSITIVE_SIDE != 
-       side_of_oriented_circle(n,  f->vertex(i)->point(), true) ) {
-    return;
-  }
-  this->flip(f, i);
-  propagating_flip(f,i);
-  i = n->index(f->vertex(i));
-  propagating_flip(n,i);
-}
-#endif
-
-///////////////////////////////////////////////////////////////
-//  REMOVE    see INRIA RResearch Report 7104
-
-template < class Gt, class Tds >
-template <class OutputItFaces>
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
-{
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !this->is_infinite(v));
-    
-  if(this->number_of_vertices() == 1) this->remove_first(v);
-  else if(this->number_of_vertices() == 2) this->remove_second(v);
-  else if( this->dimension() == 1) 
-  {
-    Point p = v->point();
-    Triangulation::remove(v);
-    *fit++ = this->locate(p);
-  }
-  else if (this->test_dim_down(v)) {  
-    this->_tds.remove_dim_down(v);  
-    for(All_faces_iterator afi = this-> all_faces_begin(); 
-        afi != this->all_faces_end(); 
-        afi++) *fit++ = afi;
-  }
-  else {
-    #ifdef CGAL_HAS_THREADS  
-    static boost::thread_specific_ptr< int > maxd_ptr;
-    static boost::thread_specific_ptr< std::vector<Face_handle> > f_ptr;
-    static boost::thread_specific_ptr< std::vector<int> > i_ptr;
-    static boost::thread_specific_ptr< std::vector<Vertex_handle> > w_ptr;
-    if (maxd_ptr.get() == NULL) {
-      maxd_ptr.reset(new int(30));
-      f_ptr.reset(new std::vector<Face_handle>(*maxd_ptr));
-      i_ptr.reset(new std::vector<int>(*maxd_ptr));
-      w_ptr.reset(new std::vector<Vertex_handle>(*maxd_ptr));
-    }
-    int& maxd=*maxd_ptr;
-    std::vector<Face_handle>& f=*f_ptr;
-    std::vector<int>& i=*i_ptr;
-    std::vector<Vertex_handle>& w=*w_ptr;
-    #else
-    static int maxd=30;
-    static std::vector<Face_handle> f(maxd);
-    static std::vector<int> i(maxd);
-    static std::vector<Vertex_handle> w(maxd);
-    #endif
-    int d;
-    remove_degree_init(v,f,w,i,d,maxd);
-    remove_degree_triangulate(v,f,w,i,d);
-    this->delete_vertex(v);
-    Face_circulator fc(v[0]),done;
-    do *fit++ = fc++; while (fc!=done);
-  }
-  return;		
-}
-
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove(Vertex_handle v)
-{
-  int d;
-
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !this->is_infinite(v));
-
-  if ( this->dimension() <= 1) { Triangulation::remove(v); return; }
-
-  #ifdef CGAL_HAS_THREADS  
-  static boost::thread_specific_ptr< int > maxd_ptr;
-  static boost::thread_specific_ptr< std::vector<Face_handle> > f_ptr;
-  static boost::thread_specific_ptr< std::vector<int> > i_ptr;
-  static boost::thread_specific_ptr< std::vector<Vertex_handle> > w_ptr;
-  if (maxd_ptr.get() == NULL) {
-    maxd_ptr.reset(new int(30));
-    f_ptr.reset(new std::vector<Face_handle>(*maxd_ptr));
-    i_ptr.reset(new std::vector<int>(*maxd_ptr));
-    w_ptr.reset(new std::vector<Vertex_handle>(*maxd_ptr));
-  }
-  int& maxd=*maxd_ptr;
-  std::vector<Face_handle>& f=*f_ptr;
-  std::vector<int>& i=*i_ptr;
-  std::vector<Vertex_handle>& w=*w_ptr;
-  #else
-  static int maxd=30;
-  static std::vector<Face_handle> f(maxd);
-  static std::vector<int> i(maxd);
-  static std::vector<Vertex_handle> w(maxd);
-  #endif
-  remove_degree_init(v,f,w,i,d,maxd);
-  if (d == 0) return; //  dim is going down
-  remove_degree_triangulate(v,f,w,i,d);
-  this->delete_vertex(v);
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree_init(Vertex_handle v, std::vector<Face_handle> &f,
-		   std::vector<Vertex_handle> &w, std::vector<int> &i,
-		   int &d, int &maxd)
-{
-  f[0] = v->face();d=0;
-  do{
-    i[d] = f[d]->index(v);
-    w[d] = f[d]->vertex( ccw(i[d]) );
-    if(this->is_infinite(w[d])) {
-      f[0] = f[d]; i[0]=i[d]; w[0]=w[d];
-      w[0]->set_face( f[0]->neighbor(i[0]));
-      f[1] = f[0]->neighbor( ccw(i[0]) );
-      i[1] = f[1]->index(v);
-      w[1] = f[1]->vertex( ccw(i[1]) );
-      if ( this->is_infinite( f[1]->neighbor( i[1] ) ) ){//otherwise dim remains 2
-	if ( this->test_dim_down(v) ) {
-	  d=0;
-	  this->tds().remove_dim_down(v);
-	  return; 
-	}
-      }
-      d=1;
-    }
-    w[d]->set_face( f[d]->neighbor(i[d]));//do no longer bother about set_face 
-    ++d;
-    if ( d==maxd) { maxd *=2; f.resize(maxd); w.resize(maxd); i.resize(maxd);}
-    f[d] = f[d-1]->neighbor( ccw(i[d-1]) );
-  } while(f[d]!=f[0]);
-  // all vertices finite but possibly w[0]
-}
-
-
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree_triangulate(Vertex_handle v,
-                          std::vector<Face_handle> &f,
-                          std::vector<Vertex_handle> &w, 
-                          std::vector<int> &i,int d)
-{
-  switch (d) {
-  case 3:
-    remove_degree3(v,f,w,i);    break;
-  case 4:
-    remove_degree4(v,f,w,i);    break;
-  case 5:
-    remove_degree5(v,f,w,i);    break;
-  case 6:
-    remove_degree6(v,f,w,i);    break;
-  case 7:
-    remove_degree7(v,f,w,i);    break;
-  default:
-    remove_degree_d(v,f,w,i,d);    break;
-  }
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree_d(Vertex_handle v, std::vector<Face_handle> &,
-                std::vector<Vertex_handle> &, 
-                std::vector<int> &,int)
-{
-  // removing a degree d vertex, (dim is not going down)
-  // this is the old removal procedure that is used now only if d > 7
-
-    std::list<Edge> hole;
-    make_hole(v, hole);
-    fill_hole_delaunay(hole);
-    return;
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree3(Vertex_handle, std::vector<Face_handle> &f,
-	       std::vector<Vertex_handle> &, std::vector<int> &i)
-{
-  // removing a degree 3 vertex
-  // only w[0] can be infinite
-
-  // modify the triangulation
-  Face_handle nn= f[1]->neighbor( i[1] );
-  this->tds().set_adjacency(f[0], ccw(i[0]) , nn , nn->index(f[1])  );
-  nn= f[2]->neighbor( i[2] );
-  this->tds().set_adjacency(f[0], cw(i[0]) , nn , nn->index(f[2])  );
-  f[0]->set_vertex  (            i[0] , f[1]->vertex( cw(i[1]) ) );
-  
-  // clean container
-  this->tds().delete_face(f[1]);
-  this->tds().delete_face(f[2]);
-  
-  return;
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree4(Vertex_handle, std::vector<Face_handle> &f,
-	       std::vector<Vertex_handle> &w, std::vector<int> &i )
-{
-  // removing a degree 4 vertex
-  // only w[0] can be infinite
-
-  Face_handle nn;
-  // modify f[0] f[1] for incircle test
-  f[0]->set_vertex( i[0], w[3] ); //w0 w1 w3
-
-  if ( !test_conflict( w[2]->point(), f[0]) )  {
-    // diagonal 1 3
-    f[1]->set_vertex( i[1], w[3] ); //w1 w2 w3
-    nn = f[3]->neighbor( i[3] );
-    this->tds().set_adjacency(f[0], cw(i[0]) , nn , nn->index(f[3])  );
-    nn = f[2]->neighbor( i[2] );
-    this->tds().set_adjacency(f[1], ccw(i[1]) , nn , nn->index(f[2]) );
-    // clean container
-    this->tds().delete_face(f[2]);
-    this->tds().delete_face(f[3]);
-  }else{
-    // diagonal 0 2
-    f[0]->set_vertex( i[0], w[2]); //w0 w1 w2
-    f[3]->set_vertex( i[3], w[2]); //w3 w0 w2
-    nn = f[1]->neighbor( i[1] );
-    this->tds().set_adjacency(f[0], ccw(i[0]) , nn , nn->index(f[1])  );
-    nn = f[2]->neighbor( i[2] );
-    this->tds().set_adjacency(f[3], cw(i[3]) , nn , nn->index(f[2])  );
-    // clean container
-    this->tds().delete_face(f[1]);
-    this->tds().delete_face(f[2]);
-  }
-
-  return;
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree5(Vertex_handle v, std::vector<Face_handle> &f,
-	       std::vector<Vertex_handle> &w, std::vector<int> &i )
-{  
-  // removing a degree 5 vertex
-  // only w[0] can be infinite
-
-  if (incircle(3,0,1,2,f,w,i)) {
-    if (incircle(4,0,1,3,f,w,i)) {
-      if (incircle(4,1,2,3,f,w,i)) {
-	// star from 4
-	remove_degree5_star(v,f[4],f[0],f[1],f[2],f[3],
-			      w[4],w[0],w[1],w[2],w[3],
-			      i[4],i[0],i[1],i[2],i[3]);
-      }else{
-	//star from 1
-	remove_degree5_star(v,f[1],f[2],f[3],f[4],f[0],
-			      w[1],w[2],w[3],w[4],w[0],
-			      i[1],i[2],i[3],i[4],i[0]);
-			      
-			      
-      }
-    }else{
-      // star from 3
-      remove_degree5_star(v,f[3],f[4],f[0],f[1],f[2],
-			    w[3],w[4],w[0],w[1],w[2],
-			    i[3],i[4],i[0],i[1],i[2]);
-    }
-  } else {
-    if (incircle(4,2,3,0,f,w,i)){
-      if (incircle(4,0,1,2,f,w,i)){
-	// star from 4
-	remove_degree5_star(v,f[4],f[0],f[1],f[2],f[3],
-			      w[4],w[0],w[1],w[2],w[3],
-			      i[4],i[0],i[1],i[2],i[3]);
-      }else{
-	//star from 2
-	remove_degree5_star(v,f[2],f[3],f[4],f[0],f[1],
-			      w[2],w[3],w[4],w[0],w[1],
-			      i[2],i[3],i[4],i[0],i[1]);
-      }
-    }else{
-      // star from 0
-      remove_degree5_star(v,f[0],f[1],f[2],f[3],f[4],
-			    w[0],w[1],w[2],w[3],w[4],
-			    i[0],i[1],i[2],i[3],i[4]);
-    }
-  }
-  
-  return;
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::remove_degree5_star
-(
- Vertex_handle &,
- Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
- Face_handle &  f3, Face_handle &  f4,
- Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
- Vertex_handle &, Vertex_handle &,
- int i0, int i1, int i2, int i3, int i4 )
-{ // removing a degree 5 vertex, staring from v0
-  Face_handle nn;
-  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
-  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
-  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
-  nn = f0->neighbor( i0 );
-  this->tds().set_adjacency(f1, cw(i1) , nn , nn->index(f0) );
-  nn = f4->neighbor( i4 );
-  this->tds().set_adjacency(f3, ccw(i3) , nn , nn->index(f4) );
-  this->tds().delete_face(f0);
-  this->tds().delete_face(f4);
-}
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree6(Vertex_handle v, std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i)
-{
-  // removing a degree 6 vertex
-  // only w[0] can be infinite
-
-  if(incircle(1,2,3,0,f,w,i)){
-    if(incircle(4,2,3,5,f,w,i)){
-      if(incircle(1,2,3,4,f,w,i)){
-	if(incircle(4,0,1,3,f,w,i)){
-	  if(incircle(5,0,1,4,f,w,i)){
-	    remove_degree6_star(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	  }else{
-	    remove_degree6_N(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	  }}else{
-	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	}}else{
-	if(incircle(5,1,2,4,f,w,i)){
-	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
-			   w[2],w[3],w[4],w[5],w[0],w[1],
-			   i[2],i[3],i[4],i[5],i[0],i[1]);
-	}else{
-	  if(incircle(5,0,1,4,f,w,i)){
-	    remove_degree6_antiN(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	  }else{
-	    remove_degree6_star(v,f[4],f[5],f[0],f[1],f[2],f[3],
-				w[4],w[5],w[0],w[1],w[2],w[3],
-				i[4],i[5],i[0],i[1],i[2],i[3]);
-	  }}}}else{
-      if(incircle(1,2,3,5,f,w,i)){
-	if(incircle(1,3,4,5,f,w,i)){
-	  if(incircle(4,0,1,3,f,w,i)){
-	    if(incircle(5,0,1,4,f,w,i)){
-	    remove_degree6_star(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	    }else{
-	    remove_degree6_N(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	    }}else{
-	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	  }}else{
-	  if(incircle(5,0,1,3,f,w,i)){
-	    remove_degree6_diamond(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	  }else{
-	    if(incircle(4,5,0,3,f,w,i)){
-	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	    }else{
-	    remove_degree6_star(v,f[3],f[4],f[5],f[0],f[1],f[2],
-				w[3],w[4],w[5],w[0],w[1],w[2],
-				i[3],i[4],i[5],i[0],i[1],i[2]);
-	    }}}}else{
-	    remove_degree6_star(v,f[5],f[0],f[1],f[2],f[3],f[4],
-				w[5],w[0],w[1],w[2],w[3],w[4],
-				i[5],i[0],i[1],i[2],i[3],i[4]);
-      }}}else{
-    if(incircle(4,2,3,5,f,w,i)){
-      if(incircle(4,2,3,0,f,w,i)){
-	if(incircle(4,0,1,2,f,w,i)){
-	  if(incircle(4,1,2,5,f,w,i)){
-	    if(incircle(4,0,1,5,f,w,i)){
-	    remove_degree6_star(v,f[4],f[5],f[0],f[1],f[2],f[3],
-				w[4],w[5],w[0],w[1],w[2],w[3],
-				i[4],i[5],i[0],i[1],i[2],i[3]);
-	    }else{
-	    remove_degree6_antiN(v,f[1],f[2],f[3],f[4],f[5],f[0],
-				w[1],w[2],w[3],w[4],w[5],w[0],
-				i[1],i[2],i[3],i[4],i[5],i[0]);
-	    }}else{
-	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
-			   w[2],w[3],w[4],w[5],w[0],w[1],
-			   i[2],i[3],i[4],i[5],i[0],i[1]);
-	  }}else{
-	  if(incircle(4,5,0,2,f,w,i)){
-	  remove_degree6_diamond(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	  }else{
-	    if(incircle(5,0,1,2,f,w,i)){
-	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
-			   w[2],w[3],w[4],w[5],w[0],w[1],
-			   i[2],i[3],i[4],i[5],i[0],i[1]);
-	    }else{
-	  remove_degree6_star(v,f[2],f[3],f[4],f[5],f[0],f[1],
-			   w[2],w[3],w[4],w[5],w[0],w[1],
-			   i[2],i[3],i[4],i[5],i[0],i[1]);
-	    }}}}else{
-	  remove_degree6_star(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-      }}else{
-      if(incircle(5,2,3,0,f,w,i)){
-	if(incircle(5,0,1,2,f,w,i)){
-	  remove_degree6_star(v,f[5],f[0],f[1],f[2],f[3],f[4],
-			       w[5],w[0],w[1],w[2],w[3],w[4],
-			      i[5],i[0],i[1],i[2],i[3],i[4]);
-	}else{
-	  remove_degree6_antiN(v,f[2],f[3],f[4],f[5],f[0],f[1],
-			   w[2],w[3],w[4],w[5],w[0],w[1],
-			   i[2],i[3],i[4],i[5],i[0],i[1]);
-	}}else{
-	  if(incircle(4,5,0,3,f,w,i)){
-	  remove_degree6_star(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	  }else{
-	  remove_degree6_N(v,f[0],f[1],f[2],f[3],f[4],f[5],
-			       w[0],w[1],w[2],w[3],w[4],w[5],
-			       i[0],i[1],i[2],i[3],i[4],i[5]);
-	  }}}}
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::remove_degree6_star
-(
- Vertex_handle &,
- Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
- Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
- Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
- Vertex_handle &, Vertex_handle &, Vertex_handle &,
- int i0, int i1, int i2, int i3, int i4, int i5 )
-{ // removing a degree 6 vertex, staring from v0
-  Face_handle nn;
-  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
-  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
-  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
-  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
-  nn = f0->neighbor( i0 );
-  this->tds().set_adjacency(f1, cw(i1), nn, nn->index(f0));
-  nn = f5->neighbor( i5 );
-  this->tds().set_adjacency(f4, ccw(i4), nn,  nn->index(f5));
-  this->tds().delete_face(f0);
-  this->tds().delete_face(f5);
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::remove_degree6_N
-(
- Vertex_handle &,
- Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
- Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
- Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
- Vertex_handle &v3, Vertex_handle &, Vertex_handle &,
- int i0, int i1, int i2, int i3, int i4, int i5 )
-{ // removing a degree 6 vertex, N configuration with diagonal v0v3
-  Face_handle nn;
-  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
-  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
-  f4->set_vertex( i4, v3) ;  // f4 = v4v5v3
-  f5->set_vertex( i5, v3) ;  // f5 = v5v0v3
-  nn = f0->neighbor( i0 );
-  this->tds().set_adjacency(f1, cw(i1) , nn , nn->index(f0)  );
-  nn = f3->neighbor( i3 );
-  this->tds().set_adjacency(f4, cw(i4) , nn, nn->index(f3) );
-  this->tds().set_adjacency(f2, ccw(i2) , f5 , ccw(i5)  );
-  this->tds().delete_face(f0);
-  this->tds().delete_face(f3);
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::remove_degree6_antiN
-(
- Vertex_handle &,
- Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
- Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
- Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
- Vertex_handle &v3, Vertex_handle &, Vertex_handle &,
- int i0, int i1, int i2, int i3, int i4, int i5 )
-{ // removing a degree 6 vertex, antiN configuration with diagonal v0v3
-  Face_handle nn;
-  f0->set_vertex( i0, v3) ;  // f0 = v0v1v3
-  f1->set_vertex( i1, v3) ;  // f1 = v1v2v3
-  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
-  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
-  nn = f2->neighbor( i2 );
-  this->tds().set_adjacency(f1, ccw(i1) , nn , nn->index(f2)  );
-  nn = f5->neighbor( i5 );
-  this->tds().set_adjacency(f4, ccw(i4) , nn , nn->index(f5) );
-  this->tds().set_adjacency(f0, cw(i0) , f3, cw(i3) );
-  this->tds().delete_face(f2);
-  this->tds().delete_face(f5);
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::remove_degree6_diamond
-(
- Vertex_handle &,
- Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
- Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
- Vertex_handle &v0, Vertex_handle &, Vertex_handle &v2,
- Vertex_handle &, Vertex_handle &v4, Vertex_handle &,
- int i0, int i1, int i2, int i3, int i4, int i5 )
-{ // removing a degree 6 vertex, with chords v0v2 v2v4 v4v0
-  Face_handle nn;
-  f0->set_vertex( i0, v2) ;  // f0 = v0v1v2
-  f2->set_vertex( i2, v4) ;  // f2 = v2v3v4
-  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
-  f1->set_vertex( i1, v4) ; 
-  f1->set_vertex( ccw(i1), v0) ;  // f1 = v0v2v4
-  nn = f1->neighbor( i1 );
-  this->tds().set_adjacency(f0, ccw(i0) , nn , nn->index(f1) );
-  nn = f3->neighbor( i3 );
-  this->tds().set_adjacency(f2, ccw(i2) , nn , nn->index(f3) );
-  nn = f5->neighbor( i5 );
-  this->tds().set_adjacency(f4, ccw(i4) , nn , nn->index(f5) );
-  this->tds().set_adjacency(f0, cw(i0) , f1 , i1  );
-  this->tds().set_adjacency(f4, cw(i4) , f1 , cw(i1) );
-
-  this->tds().delete_face(f3);
-  this->tds().delete_face(f5);
-}
-
-
-template < class Gt, class Tds >
-void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7(Vertex_handle v,std::vector<Face_handle> &f,
-		      std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ 
-  // removing a degree 7 vertex
-  // only w[0] can be infinite
-
-  if (incircle(2,0,1,3,f,w,i)) { // sweeping from above
-    if (incircle(2,3,4,0,f,w,i)) {
-      if (incircle(5,3,4,6,f,w,i)) {
-	if (incircle(5,3,4,2,f,w,i)) {
-	  if (incircle(6,2,3,5,f,w,i)) {
-	    if (incircle(6,0,1,2,f,w,i)) {
-	      remove_degree7_leftfan(v,  6  ,f,w,i);
-	    }else{
-	      remove_degree7_zigzag(v,  6  ,f,w,i);
-	    }}else{
-	    if (incircle(5,0,1,2,f,w,i)) {
-	      if (incircle(6,1,2,5,f,w,i)) {
-		remove_degree7_zigzag(v, 2   ,f,w,i);
-	      }else{
-		if (incircle(6,0,1,5,f,w,i)) {
-		  remove_degree7_rightfan(v, 5   ,f,w,i);
-		}else{
-		  remove_degree7_star(v,  5  ,f,w,i);
-		}}}else{
-	      if (incircle(2,5,6,0,f,w,i)) {
-		if (incircle(6,0,1,2,f,w,i)) {
-		  remove_degree7_zigzag(v,  2  ,f,w,i);
-		}else{
-		  remove_degree7_rightfan(v,  2  ,f,w,i);
-		}}else{
-		remove_degree7_rightdelta(v,  5  ,f,w,i);
-	      }}}}else{
-	  if (incircle(4,0,1,2,f,w,i)) {
-	    if (incircle(5,1,2,4,f,w,i)) {
-	      if (incircle(6,1,2,5,f,w,i)) {
-		remove_degree7_leftfan(v,  2  ,f,w,i);
-	      }else{
-		if (incircle(6,0,1,5,f,w,i)) {
-		  remove_degree7_zigzag(v,  5  ,f,w,i);
-		}else{
-		  remove_degree7_leftfan(v,  5  ,f,w,i);
-		}}}else{
-	      if (incircle(5,0,1,4,f,w,i)) {
-		if (incircle(6,0,1,5,f,w,i)) {
-		  remove_degree7_rightfan(v,  1  ,f,w,i);
-		}else{
-		  remove_degree7_zigzag(v,  1  ,f,w,i);
-		}}else{
-		remove_degree7_rightfan(v,  4  ,f,w,i);
-	      }}}else{
-	    if (incircle(2,4,5,0,f,w,i)) {
-	      if (incircle(5,0,1,2,f,w,i)) {
-		if (incircle(6,1,2,5,f,w,i)) {
-		  remove_degree7_leftfan(v,  2  ,f,w,i);
-		}else{
-		  if (incircle(6,0,1,5,f,w,i)) {
-		    remove_degree7_zigzag(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_leftfan(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(2,5,6,0,f,w,i)) {
-		  if (incircle(6,0,1,2,f,w,i)) {
-		    remove_degree7_leftfan(v,  2  ,f,w,i);
-		  }else{
-		    remove_degree7_star(v,  2  ,f,w,i);
-		  }}else{
-		  remove_degree7_leftdelta(v,  2  ,f,w,i);
-		}}}else{
-	      remove_degree7_rightdelta(v,  0  ,f,w,i);
-	    }}}}else{
-	if (incircle(6,3,4,2,f,w,i)) {
-	  if (incircle(6,0,1,2,f,w,i)) {
-	    remove_degree7_star(v,  6  ,f,w,i);
-	  }else{
-	    remove_degree7_rightfan(v,  6  ,f,w,i);
-	  }}else{
-	  if (incircle(4,0,1,2,f,w,i)) {
-	    if (incircle(2,4,5,6,f,w,i)) {
-	      if (incircle(5,1,2,4,f,w,i)) {
-		if (incircle(6,1,2,5,f,w,i)) {
-		  remove_degree7_leftfan(v,  2  ,f,w,i);
-		}else{
-		  if (incircle(6,0,1,5,f,w,i)) {
-		    remove_degree7_zigzag(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_leftfan(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(5,0,1,4,f,w,i)) {
-		  if (incircle(6,0,1,5,f,w,i)) {
-		    remove_degree7_rightfan(v,  1  ,f,w,i);
-		  }else{
-		    remove_degree7_zigzag(v,  1  ,f,w,i);
-		  }} else{
-		  remove_degree7_rightfan(v,  4  ,f,w,i);
-		}}} else {
-	      if (incircle(6,1,2,4,f,w,i)) {
-		remove_degree7_leftdelta(v,  6  ,f,w,i);
-	      }else{
-		if (incircle(1,4,5,6,f,w,i)) {
-		  if (incircle(1,4,5,0,f,w,i)) {
-		    if (incircle(6,0,1,5,f,w,i)) {
-		      remove_degree7_rightfan(v,  1  ,f,w,i);
-		    }else{
-		      remove_degree7_zigzag(v,  1  ,f,w,i);
-		    }}else{
-		    remove_degree7_rightfan(v,  4  ,f,w,i);
-		  }} else {
-		  if (incircle(6,0,1,4,f,w,i)) {
-		    remove_degree7_rightdelta(v,  4  ,f,w,i);
-		  }else{
-		    if (incircle(6,4,5,0,f,w,i)) {
-		      remove_degree7_star(v,  4  ,f,w,i);
-		    }else{
-		      remove_degree7_rightfan(v,  4  ,f,w,i);
-		    }}}}}}else{
-	    if (incircle(2,4,5,6,f,w,i)) {
-	      if (incircle(2,4,5,0,f,w,i)) {
-		if (incircle(5,0,1,2,f,w,i)) {
-		  if (incircle(6,1,2,5,f,w,i)) {
-		    remove_degree7_leftfan(v,  2  ,f,w,i);
-		  }else{
-		    if (incircle(6,0,1,5,f,w,i)) {
-		      remove_degree7_zigzag(v,  5  ,f,w,i);
-		    }else{
-		      remove_degree7_leftfan(v,  5  ,f,w,i);
-		    }}}else{
-		  if (incircle(2,5,6,0,f,w,i)) {
-		    if (incircle(6,0,1,2,f,w,i)) {
-		      remove_degree7_leftfan(v,  2  ,f,w,i);
-		    }else{
-		      remove_degree7_star(v,  2  ,f,w,i);
-		    }}else{
-		    remove_degree7_leftdelta(v,  2  ,f,w,i);
-		  }}}else{
-		remove_degree7_rightdelta(v,  0  ,f,w,i);
-	      }}else{
-	      if (incircle(2,6,0,4,f,w,i)) {
-		if (incircle(6,0,1,2,f,w,i)) {
-		  remove_degree7_leftdelta(v,  6  ,f,w,i);
-		}else{
-		  remove_degree7_rightdelta(v,  2  ,f,w,i);
-		}}else{
-		if (incircle(6,4,5,0,f,w,i)) {
-		  remove_degree7_leftdelta(v,  4  ,f,w,i);
-		}else{
-		  remove_degree7_rightdelta(v,  0  ,f,w,i);
-		}}}}}}} else{
-      if (incircle(5,3,4,6,f,w,i)) {
-	if (incircle(5,3,4,0,f,w,i)) {
-	  if (incircle(5,2,3,0,f,w,i)) {
-	    if (incircle(6,2,3,5,f,w,i)) {
-	      if (incircle(6,0,1,2,f,w,i)) {
-		remove_degree7_leftfan(v,  6  ,f,w,i);
-	      }else{
-		remove_degree7_zigzag(v,  6  ,f,w,i);
-	      }}else
-	      if (incircle(5,0,1,2,f,w,i)) {
-	  	if (incircle(6,1,2,5,f,w,i)) {
-		  remove_degree7_zigzag(v,  2  ,f,w,i);
-		}else{
-		  if (incircle(6,0,1,5,f,w,i)) {
-		    remove_degree7_rightfan(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_star(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(2,5,6,0,f,w,i)) {
-		  if (incircle(6,0,1,2,f,w,i)) {
-		    remove_degree7_zigzag(v,  2  ,f,w,i);
-		  }else{
-		    remove_degree7_rightfan(v,  2  ,f,w,i);
-		  }}else{
-		  remove_degree7_rightdelta(v,  5  ,f,w,i);
-		}}}else{
-	    if (incircle(3,5,6,0,f,w,i)) {
-	      if (incircle(6,2,3,0,f,w,i)) {
-		if (incircle(6,0,1,2,f,w,i)) {
-		  remove_degree7_leftfan(v,  6  ,f,w,i);
-		}else{
-		  remove_degree7_zigzag(v,  6  ,f,w,i);
-		}}else{
-		remove_degree7_leftfan(v,  3  ,f,w,i);
-	      }}else{
-	      remove_degree7_leftdelta(v,  0  ,f,w,i);
-	    }}}else{
-	  remove_degree7_star(v,  0  ,f,w,i);
-	}}else{
-	if (incircle(6,3,4,0,f,w,i)) {
-	  if (incircle(6,2,3,0,f,w,i)) {
-	    if (incircle(6,0,1,2,f,w,i)) {
-	      remove_degree7_star(v,  6  ,f,w,i);
-	    }else{
-	      remove_degree7_rightfan(v,  6  ,f,w,i);
-	    }}else{
-	    remove_degree7_zigzag(v,  3  ,f,w,i);
-	  }}else{
-	  if (incircle(6,4,5,0,f,w,i)) {
-	    remove_degree7_leftfan(v,  0  ,f,w,i);
-	  }else{
-	    remove_degree7_star(v,  0  ,f,w,i);
-	  }}}}}else{  //sweeping from below
-    if (incircle(1,6,0,3,f,w,i)) {
-      if (incircle(5,6,0,4,f,w,i)) {
-	if (incircle(5,6,0,1,f,w,i)) {
-	  if (incircle(4,0,1,5,f,w,i)) {
-	    if (incircle(4,2,3,1,f,w,i)) {
-	      remove_degree7_rightfan(v,  4  ,f,w,i);
-	    }else{
-	      remove_degree7_zigzag(v,  4  ,f,w,i);
-	    }}else{
-	    if (incircle(5,2,3,1,f,w,i)) {
-	      if (incircle(4,1,2,5,f,w,i)) {
-		remove_degree7_zigzag(v, 1   ,f,w,i);
-	      }else{
-		if (incircle(4,2,3,5,f,w,i)) {
-		  remove_degree7_leftfan(v, 5   ,f,w,i);
-		}else{
-		  remove_degree7_star(v,  5  ,f,w,i);
-		}}}else{
-	      if (incircle(1,4,5,3,f,w,i)) {
-		if (incircle(4,2,3,1,f,w,i)) {
-		  remove_degree7_zigzag(v,  1  ,f,w,i);
-		}else{
-		  remove_degree7_leftfan(v,  1  ,f,w,i);
-		}}else{
-		remove_degree7_leftdelta(v,  5  ,f,w,i);
-	      }}}}else{
-	  if (incircle(6,2,3,1,f,w,i)) {
-	    if (incircle(5,1,2,6,f,w,i)) {
-	      if (incircle(4,1,2,5,f,w,i)) {
-		remove_degree7_rightfan(v,  1  ,f,w,i);
-	      }else{
-		if (incircle(4,2,3,5,f,w,i)) {
-		  remove_degree7_zigzag(v,  5  ,f,w,i);
-		}else{
-		  remove_degree7_rightfan(v,  5  ,f,w,i);
-		}}}else{
-	      if (incircle(5,2,3,6,f,w,i)) {
-		if (incircle(4,2,3,5,f,w,i)) {
-		  remove_degree7_leftfan(v,  2  ,f,w,i);
-		}else{
-		  remove_degree7_zigzag(v,  2  ,f,w,i);
-		}}else{
-		remove_degree7_leftfan(v,  6  ,f,w,i);
-	      }}}else{
-	    if (incircle(1,5,6,3,f,w,i)) {
-	      if (incircle(5,2,3,1,f,w,i)) {
-		if (incircle(4,1,2,5,f,w,i)) {
-		  remove_degree7_rightfan(v,  1  ,f,w,i);
-		}else{
-		  if (incircle(4,2,3,5,f,w,i)) {
-		    remove_degree7_zigzag(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_rightfan(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(1,4,5,3,f,w,i)) {
-		  if (incircle(4,2,3,1,f,w,i)) {
-		    remove_degree7_rightfan(v,  1  ,f,w,i);
-		  }else{
-		    remove_degree7_star(v,  1  ,f,w,i);
-		  }}else{
-		  remove_degree7_rightdelta(v,  1  ,f,w,i);
-		}}}else{
-	      remove_degree7_leftdelta(v,  3  ,f,w,i);
-	    }}}}else{
-	if (incircle(4,6,0,1,f,w,i)) {
-	  if (incircle(4,2,3,1,f,w,i)) {
-	    remove_degree7_star(v,  4  ,f,w,i);
-	  }else{
-	    remove_degree7_leftfan(v,  4  ,f,w,i);
-	  }}else{
-	  if (incircle(6,2,3,1,f,w,i)) {
-	    if (incircle(1,5,6,4,f,w,i)) {
-	      if (incircle(5,1,2,6,f,w,i)) {
-		if (incircle(4,1,2,5,f,w,i)) {
-		  remove_degree7_rightfan(v,  1  ,f,w,i);
-		}else{
-		  if (incircle(4,2,3,5,f,w,i)) {
-		    remove_degree7_zigzag(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_rightfan(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(5,2,3,6,f,w,i)) {
-		  if (incircle(4,2,3,5,f,w,i)) {
-		    remove_degree7_leftfan(v,  2  ,f,w,i);
-		  }else{
-		    remove_degree7_zigzag(v,  2  ,f,w,i);
-		  }} else{
-		  remove_degree7_leftfan(v,  6  ,f,w,i);
-		}}} else {
-	      if (incircle(4,1,2,6,f,w,i)) {
-		remove_degree7_rightdelta(v,  4  ,f,w,i);
-	      }else{
-		if (incircle(2,5,6,4,f,w,i)) {
-		  if (incircle(2,5,6,3,f,w,i)) {
-		    if (incircle(4,2,3,5,f,w,i)) {
-		      remove_degree7_leftfan(v,  2  ,f,w,i);
-		    }else{
-		      remove_degree7_zigzag(v,  2  ,f,w,i);
-		    }}else{
-		    remove_degree7_leftfan(v,  6  ,f,w,i);
-		  }} else {
-		  if (incircle(4,2,3,6,f,w,i)) {
-		    remove_degree7_leftdelta(v,  6  ,f,w,i);
-		  }else{
-		    if (incircle(4,5,6,3,f,w,i)) {
-		      remove_degree7_star(v,  6  ,f,w,i);
-		    }else{
-		      remove_degree7_leftfan(v,  6  ,f,w,i);
-		    }}}}}}else{
-	    if (incircle(1,5,6,4,f,w,i)) {
-	      if (incircle(1,5,6,3,f,w,i)) {
-		if (incircle(5,2,3,1,f,w,i)) {
-		  if (incircle(4,1,2,5,f,w,i)) {
-		    remove_degree7_rightfan(v,  1  ,f,w,i);
-		  }else{
-		    if (incircle(4,2,3,5,f,w,i)) {
-		      remove_degree7_zigzag(v,  5  ,f,w,i);
-		    }else{
-		      remove_degree7_rightfan(v,  5  ,f,w,i);
-		    }}}else{
-		  if (incircle(1,4,5,3,f,w,i)) {
-		    if (incircle(4,2,3,1,f,w,i)) {
-		      remove_degree7_rightfan(v,  1  ,f,w,i);
-		    }else{
-		      remove_degree7_star(v,  1  ,f,w,i);
-		    }}else{
-		    remove_degree7_rightdelta(v,  1  ,f,w,i);
-		  }}}else{
-		remove_degree7_leftdelta(v,  3  ,f,w,i);
-	      }}else{
-	      if (incircle(1,3,4,6,f,w,i)) {
-		if (incircle(4,2,3,1,f,w,i)) {
-		  remove_degree7_rightdelta(v,  4  ,f,w,i);
-		}else{
-		  remove_degree7_leftdelta(v,  1  ,f,w,i);
-		}}else{
-		if (incircle(4,5,6,3,f,w,i)) {
-		  remove_degree7_rightdelta(v,  6  ,f,w,i);
-		}else{
-		  remove_degree7_leftdelta(v,  3  ,f,w,i);
-		}}}}}}} else{
-      if (incircle(5,6,0,4,f,w,i)) {
-	if (incircle(5,6,0,3,f,w,i)) {
-	  if (incircle(5,0,1,3,f,w,i)) {
-	    if (incircle(4,0,1,5,f,w,i)) {
-	      if (incircle(4,2,3,1,f,w,i)) {
-		remove_degree7_rightfan(v,  4  ,f,w,i);
-	      }else{
-		remove_degree7_zigzag(v,  4  ,f,w,i);
-	      }}else
-	      if (incircle(5,2,3,1,f,w,i)) {
-	  	if (incircle(4,1,2,5,f,w,i)) {
-		  remove_degree7_zigzag(v,  1  ,f,w,i);
-		}else{
-		  if (incircle(4,2,3,5,f,w,i)) {
-		    remove_degree7_leftfan(v,  5  ,f,w,i);
-		  }else{
-		    remove_degree7_star(v,  5  ,f,w,i);
-		  }}}else{
-		if (incircle(1,4,5,3,f,w,i)) {
-		  if (incircle(4,2,3,1,f,w,i)) {
-		    remove_degree7_zigzag(v,  1  ,f,w,i);
-		  }else{
-		    remove_degree7_leftfan(v,  1  ,f,w,i);
-		  }}else{
-		  remove_degree7_leftdelta(v,  5  ,f,w,i);
-		}}}else{
-	    if (! incircle(3,4,5,0,f,w,i)) {
-	      if (incircle(4,0,1,3,f,w,i)) {
-		if (incircle(4,2,3,1,f,w,i)) {
-		  remove_degree7_rightfan(v,  4  ,f,w,i);
-		}else{
-		  remove_degree7_zigzag(v,  4  ,f,w,i);
-		}}else{
-		remove_degree7_rightfan(v,  0  ,f,w,i);
-	      }}else{
-	      remove_degree7_rightdelta(v,  3  ,f,w,i);
-	    }}}else{
-	  remove_degree7_star(v,  3  ,f,w,i);
-	}}else{
-	if (incircle(4,6,0,3,f,w,i)) {
-	  if (incircle(4,0,1,3,f,w,i)) {
-	    if (incircle(4,2,3,1,f,w,i)) {
-	      remove_degree7_star(v,  4  ,f,w,i);
-	    }else{
-	      remove_degree7_leftfan(v,  4  ,f,w,i);
-	    }}else{
-	    remove_degree7_zigzag(v,  0  ,f,w,i);
-	  }}else{
-	  if (incircle(4,5,6,3,f,w,i)) {
-	    remove_degree7_rightfan(v,  3  ,f,w,i);
-	  }else{
-	    remove_degree7_star(v,  3  ,f,w,i);    
-	  }}}}}
-}
-
-
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-rotate7(int j,  std::vector<Vertex_handle> &w, 
-	       std::vector<Face_handle> &f, std::vector<int> &i)
-{
-  if (j==0) return;
-  Face_handle ff=f[0];
-  int ii=i[0],k=0,kk=(6*j)%7;
-  Vertex_handle ww=w[0];
-  for (int jj=0; k!=kk; jj=k) { // 7 is prime
-    k=(jj+j)%7;
-    w[jj]=w[k]; f[jj]=f[k]; i[jj]=i[k];
-  }
-  w[kk]=ww;f[kk]=ff;i[kk]=ii;
-}
-
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_star   (Vertex_handle &, int j,
-std::vector<Face_handle> &f, std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, staring from w[j]
-
-  rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[1]->set_vertex( i[1], w[0]) ;  // f1 = w1w2w0
-  f[2]->set_vertex( i[2], w[0]) ;  // f2 = w2w3w0
-  f[3]->set_vertex( i[3], w[0]) ;  // f3 = w3w4w0
-  f[4]->set_vertex( i[4], w[0]) ;  // f4 = w4w5w0
-  f[5]->set_vertex( i[5], w[0]) ;  // f5 = w5w6w0
-
-  nn = f[0]->neighbor( i[0] );
-  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0])  );
-  nn = f[6]->neighbor( i[6] );
-  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6]) );
-  this->tds().delete_face(f[0]);
-  this->tds().delete_face(f[6]);
-}
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_zigzag (Vertex_handle &, int j,
- std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, zigzag, w[j] = middle point
-
- rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[1]->set_vertex(    i[1] , w[3]) ;  // f1 = w1w2w3
-  f[2]->set_vertex(ccw(i[2]), w[1]) ;  
-  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w1w3w0
-  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
-  f[4]->set_vertex( cw(i[4]), w[6]) ;  
-  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w6w0
-  f[5]->set_vertex(    i[5] , w[4]) ;  // f5 = w5w6w4
-
-  nn = f[2]->neighbor( i[2] );
-  this->tds().set_adjacency(f[1], ccw(i[1]) , nn, nn->index(f[2]) );
-  nn = f[0]->neighbor( i[0] );
-  this->tds().set_adjacency(f[2], cw(i[2]) , nn , nn->index(f[0]) );
-  nn = f[6]->neighbor( i[6] );
-  this->tds().set_adjacency(f[4], ccw(i[4]) , nn , nn->index(f[6])  );
-  nn = f[4]->neighbor( i[4] );
-  this->tds().set_adjacency(f[5], cw(i[5]) , nn , nn->index(f[4])  );
-  this->tds().set_adjacency(f[1], cw(i[1]) , f[2] , i[2]   );
-  this->tds().set_adjacency(f[4], i[4]  , f[5] , ccw(i[5])  );
-
-  this->tds().delete_face(f[0]);
-  this->tds().delete_face(f[6]);
-}
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_leftdelta(Vertex_handle &, int j,
- std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, left delta from w[j]
- rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
-  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w2w3w0
-  f[3]->set_vertex( cw(i[3]), w[5]) ;  
-  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w5w0
-  f[4]->set_vertex(    i[4] , w[3]) ;  // f4 = w4w5w3
-  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
-
-  nn = f[0]->neighbor( i[0] );
-  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0])  );
-  nn = f[3]->neighbor( i[3] );
-  this->tds().set_adjacency(f[4], cw(i[4]) , nn , nn->index(f[3]) );
-  nn = f[6]->neighbor( i[6] );
-  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6])  );
-  this->tds().set_adjacency(f[3], i[3]  , f[4] , ccw(i[4])  );
-  this->tds().set_adjacency(f[3], ccw(i[3]) , f[5] ,  cw(i[5]) );
-
-  this->tds().delete_face(f[0]);
-  this->tds().delete_face(f[6]);
-}
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_rightdelta(Vertex_handle &, int j,
- std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, right delta from w[j]
-  rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
-  f[2]->set_vertex(    i[2] , w[4]) ;  // f2 = w2w3w4
-  f[3]->set_vertex(ccw(i[3]), w[2]) ;  
-  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w2w4w0
-  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w5w0
-  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
-
-  nn = f[0]->neighbor( i[0] );
-  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0]) );
-  nn = f[3]->neighbor( i[3] );
-  this->tds().set_adjacency(f[2], ccw(i[2]) , nn, nn->index(f[3]) );
-  nn = f[6]->neighbor( i[6] );
-  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6]) );
-  this->tds().set_adjacency(f[1], ccw(i[1]) , f[3], cw(i[3])  );
-  this->tds().set_adjacency(f[3], i[3]  , f[2], cw(i[2]) );
-
-  this->tds().delete_face(f[0]);
-  this->tds().delete_face(f[6]);
-}
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_leftfan(Vertex_handle &, int j,
- std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, left fan from w[j]
-  rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
-  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w2w3w0
-  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
-  f[4]->set_vertex(    i[4] , w[6]) ;  // f4 = w4w5w6
-  f[6]->set_vertex(    i[6] , w[4]) ;  // f6 = w6w0w4
-
-  nn = f[0]->neighbor( i[0] );
-  this->tds().set_adjacency(f[1], cw(i[1]) , nn, nn->index(f[0]) );
-  nn = f[5]->neighbor( i[5] );
-  this->tds().set_adjacency(f[4], ccw(i[4]) , nn, nn->index(f[5]) );
-  this->tds().set_adjacency(f[3], ccw(i[3]) , f[6], ccw(i[6]) );
-  this->tds().set_adjacency(f[6], cw(i[6]) , f[4], cw(i[4]) );
-
-  this->tds().delete_face(f[0]);
-  this->tds().delete_face(f[5]);
-}
-template < class Gt, class Tds >
-inline void
-Delaunay_triangulation_2<Gt,Tds>::
-remove_degree7_rightfan(Vertex_handle &, int j,
- std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
-{ // removing a degree 7 vertex, right fan from w[j]
-
-  rotate7(j,w,f,i);
-
-  Face_handle nn;
-  f[0]->set_vertex(    i[0] , w[3]) ;  // f0 = w0w1w3
-  f[2]->set_vertex(    i[2] , w[1]) ;  // f2 = w2w3w1
-  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
-  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w5w0
-  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
-
-  nn = f[1]->neighbor( i[1] );
-  this->tds().set_adjacency(f[2], cw(i[2]) , nn, nn->index(f[1]) );
-  nn = f[6]->neighbor( i[6] );
-  this->tds().set_adjacency(f[5], ccw(i[5]) , nn, nn->index(f[6]) );
-  this->tds().set_adjacency(f[2], ccw(i[2]) , f[0], ccw(i[0])  );
-  this->tds().set_adjacency(f[0], cw(i[0]) , f[3] , cw(i[3]) );
-
-  this->tds().delete_face(f[1]);
-  this->tds().delete_face(f[6]);
-}
-
-
-
-
-///////////////////////////////////////////////////////////////
-//  DISPLACEMENT
-
-template <class Gt, class Tds >
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>::
-move_if_no_collision(Vertex_handle v, const Point &p) {
-  CGAL_triangulation_precondition(!this->is_infinite(v));
-  if(v->point() == p) return v;
-  const int dim = this->dimension();
-
-  if(dim == 2) {
-    Point ant = v->point();
-    v->set_point(p);
-		// This option optimizes only when most of the
-	  // displacements would not break the orientation
-	  // of the faces.. we will consider this as an a priori,
-	  // because otherwise it is pointless to just do
-	  // not rebuild from scratch.
-    if(this->well_oriented(v)) {
-      restore_edges(v);
-      return v;
-    }
-    v->set_point(ant);
-  }
-
-  Locate_type lt;
-  int li;
-  Vertex_handle inserted;
-  Face_handle loc = this->locate(p, lt, li, v->face());
-
-  if(lt == Triangulation_2<Gt,Tds>::VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->point() = p;
-    return v;
-  }
-
-  size_type n_vertices = this->tds().number_of_vertices();
-
-  if((lt == Triangulation::OUTSIDE_AFFINE_HULL) && 
-     (dim == 1) && (n_vertices == 3)) {
-    v->point() = p;
-    return v;
-  }
-
-  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-    if(loc->has_vertex(v)) {
-      v->point() = p;
-    } else {
-      inserted = insert(p, lt, loc, li);
-      Face_handle f = v->face();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Face_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_face(f);
-      this->delete_face(g);
-      Face_handle f_ins = inserted->face();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Face_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-    	v->set_point(p);
-      v->set_face(inserted->face());
-      this->delete_vertex(inserted);
-    }
-    return v;
-  }
-
-  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && this->test_dim_down(v)) {
-    // verify if p and two static vertices are collinear in this case
-    int iinf = 0;
-    Face_circulator finf = this->incident_faces(this->infinite_vertex()), 
-      fdone(finf);
-    do { 
-      if(!finf->has_vertex(v))
-      {
-        iinf = ~(finf->index(this->infinite_vertex()));
-        break;
-      }
-    } while(++finf != fdone);
-    if(this->orientation(finf->vertex(iinf&1)->point(),
-                         finf->vertex(iinf&2)->point(),
-                         p) == COLLINEAR)
-    {
-      v->point() = p;
-      this->tds().dim_down(loc, loc->index(v));
-      return v;
-    }
-  }
-
-  inserted = insert(p, lt, loc, li);
-
-  {
-    int d;
-    #ifdef CGAL_HAS_THREADS  
-    static boost::thread_specific_ptr< int > maxd_ptr;
-    static boost::thread_specific_ptr< std::vector<Face_handle> > f_ptr;
-    static boost::thread_specific_ptr< std::vector<int> > i_ptr;
-    static boost::thread_specific_ptr< std::vector<Vertex_handle> > w_ptr;
-    if (maxd_ptr.get() == NULL) {
-      maxd_ptr.reset(new int(30));
-      f_ptr.reset(new std::vector<Face_handle>(*maxd_ptr));
-      i_ptr.reset(new std::vector<int>(*maxd_ptr));
-      w_ptr.reset(new std::vector<Vertex_handle>(*maxd_ptr));
-    }
-    int& maxd=*maxd_ptr;
-    std::vector<Face_handle>& f=*f_ptr;
-    std::vector<int>& i=*i_ptr;
-    std::vector<Vertex_handle>& w=*w_ptr;
-    #else
-    static int maxd=30;
-    static std::vector<Face_handle> f(maxd);
-    static std::vector<int> i(maxd);
-    static std::vector<Vertex_handle> w(maxd);
-    #endif
-    remove_degree_init(v,f,w,i,d,maxd);
-    remove_degree_triangulate(v,f,w,i,d);
-  }
-
-  // fixing pointer
-  Face_circulator fc = this->incident_faces(inserted), done(fc);
-  std::vector<Face_handle> faces_pt;
-  faces_pt.reserve(16);
-  do { faces_pt.push_back(fc); } while(++fc != done);
-  std::size_t ss = faces_pt.size();
-  for(std::size_t k=0; k<ss; k++)
-    {
-      Face_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-  
-  v->set_point(p);
-  v->set_face(inserted->face());
-  
-  this->delete_vertex(inserted);
-
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
-Delaunay_triangulation_2<Gt,Tds>::
-move(Vertex_handle v, const Point &p) {
-  CGAL_triangulation_precondition(!this->is_infinite(v));
-  if(v->point() == p) return v;
-  Vertex_handle w = move_if_no_collision(v,p);
-  if(w != v) {
-    remove(v);
-    return w;
-  }
-  return v;
-}
-
-template <class Gt, class Tds >
-bool 
-Delaunay_triangulation_2<Gt,Tds>::
-is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
-{
-  CGAL_triangulation_precondition(!this->is_infinite(v));		
-  CGAL_triangulation_precondition(this->dimension() == 2);	
-  CGAL_triangulation_precondition(!this->test_dim_down(v));	
-	if(v->point() == p) return true;
-  Point ant = v->point();
-  v->set_point(p);
-  if(!this->well_oriented(v))
-  {
-    v->set_point(ant);
-    return false;
-  }
-  std::list<Edge> edges;
-  Face_circulator fc = this->incident_faces(v), done(fc);
-  int degree = 0;
-  do {
-    if((++degree) > 3) break;
-  } while(++fc != done);
-  fc = this->incident_faces(v);
-  done = fc;
-  if(degree == 3) {
-    do {
-      int i = fc->index(v);
-      edges.push_back(Edge(fc, i));
-    } while(++fc != done);
-  } else {
-    do {
-      int i = fc->index(v);
-      edges.push_back(Edge(fc, i));
-      edges.push_back(Edge(fc, this->cw(i)));
-    } while(++fc != done);
-  }
-  while(!edges.empty()) {
-    const Edge &e = edges.front();
-    Face_handle f = e.first;
-    int i = e.second;
-    edges.pop_front();
-    if(this->is_infinite(f->vertex(i))) continue;
-    Vertex_handle vm = this->_tds.mirror_vertex(f, i);
-    if(this->is_infinite(vm)) continue;
-    if(this->side_of_oriented_circle(f, vm->point()) == ON_POSITIVE_SIDE) {
-      v->set_point(ant);
-      return false;
-    }
-  }
-  v->set_point(ant);
-  return true;
-}
-
-template <class Gt, class Tds >
-template <class OutputItFaces>
-typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
-Delaunay_triangulation_2<Gt,Tds>::
-move_if_no_collision_and_give_new_faces(Vertex_handle v, 
-                                        const Point &p,
-                                        OutputItFaces oif)
-{
-  CGAL_triangulation_precondition(!this->is_infinite(v));	
-  if(v->point() == p) return v;
-
-  const int dim = this->dimension();
-
-  if(dim == 2) {
-    Point ant = v->point();
-    v->set_point(p);
-    // This option optimizes only when most of the
-    // displacements would not break the orientation
-    // of the faces.. we will consider this as an a priori,
-    // because otherwise it is pointless to just do
-    // not rebuild from scratch.
-    if(well_oriented(v)) {
-      std::set<Face_handle> faces_set;
-      restore_edges(v, faces_set);
-      for(typename std::set<Face_handle>::iterator ib = faces_set.begin(),
-            iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
-      return v;
-    }
-    v->set_point(ant);
-  }
-
-  Locate_type lt;
-  int li;
-  Vertex_handle inserted;
-  Face_handle loc = this->locate(p, lt, li, v->face());
-
-  if(lt == Triangulation::VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->point() = p;
-    return v;
-  }
-
-  size_type n_vertices = this->tds().number_of_vertices();
-
-  if((lt == Triangulation::OUTSIDE_AFFINE_HULL) && 
-     (dim == 1) && (n_vertices == 3)) {
-    v->point() = p;
-    for(All_faces_iterator afi = this-> all_faces_begin(); 
-        afi != this->all_faces_end(); 
-        afi++) *oif++ = afi;	
-    return v;
-  }
-
-  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-    if(loc->has_vertex(v)) {
-      v->point() = p;
-    } else {
-      inserted = insert(p, lt, loc, li);
-      Face_handle f = v->face();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Face_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_face(f);
-      this->delete_face(g);
-      *oif++ = f;
-      Face_handle f_ins = inserted->face();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Face_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-      v->set_face(inserted->face());
-    	v->set_point(p);
-      this->delete_vertex(inserted);
-    }
-    *oif++ = v->face();
-    if(v->face()->neighbor(0)->has_vertex(v)) 
-      *oif++ = v->face()->neighbor(0);
-    if(v->face()->neighbor(1)->has_vertex(v)) 
-      *oif++ = v->face()->neighbor(1);			
-    return v;
-  }
-
-  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && this->test_dim_down(v)) {
-    // verify if p and two static vertices are collinear in this case
-    int iinf;
-    Face_circulator finf = incident_faces(this->infinite_vertex()), 
-      fdone(finf);
-    do { 
-      if(!finf->has_vertex(v))
-      {
-        iinf = ~(finf->index(this->infinite_vertex()));
-        break;
-      }
-    } while(++finf != fdone);
-    if(this->orientation(finf->vertex(iinf&1)->point(),
-                         finf->vertex(iinf&2)->point(),
-                         p) == COLLINEAR)
-    {
-      v->point() = p;
-      this->tds().dim_down(loc, loc->index(v));
-      for(All_faces_iterator afi = this-> all_faces_begin(); 
-          afi != this->all_faces_end(); 
-          afi++) *oif++ = afi;
-      return v;
-    }
-  }
-
-  std::set<Face_handle> faces_set;
-  inserted = Delaunay_triangulation_2<Gt,Tds>::insert(p, lt, loc, li);
-  Face_circulator fc = this->incident_faces(inserted), done(fc);
-  do { faces_set.insert(fc); } while(++fc != done);
-
-
-  {
-    #ifdef CGAL_HAS_THREADS  
-    static boost::thread_specific_ptr< int > maxd_ptr;
-    static boost::thread_specific_ptr< std::vector<Face_handle> > f_ptr;
-    static boost::thread_specific_ptr< std::vector<int> > i_ptr;
-    static boost::thread_specific_ptr< std::vector<Vertex_handle> > w_ptr;
-    if (maxd_ptr.get() == NULL) {
-      maxd_ptr.reset(new int(30));
-      f_ptr.reset(new std::vector<Face_handle>(*maxd_ptr));
-      i_ptr.reset(new std::vector<int>(*maxd_ptr));
-      w_ptr.reset(new std::vector<Vertex_handle>(*maxd_ptr));
-    }
-    int& maxd=*maxd_ptr;
-    std::vector<Face_handle>& f=*f_ptr;
-    std::vector<int>& i=*i_ptr;
-    std::vector<Vertex_handle>& w=*w_ptr;
-    #else
-    static int maxd=30;
-    static std::vector<Face_handle> f(maxd);
-    static std::vector<int> i(maxd);
-    static std::vector<Vertex_handle> w(maxd);
-    #endif
-    int d;
-    remove_degree_init(v,f,w,i,d,maxd);
-    remove_degree_triangulate(v,f,w,i,d);
-    this->delete_vertex(v);
-    Face_circulator fc(v[0]),done;
-    do *oif++ = fc++; while (fc!=done);    
-  }
-
-  fc = this->incident_faces(inserted), done(fc);
-  std::vector<Face_handle> faces_pt;
-  faces_pt.reserve(16);
-  do { faces_pt.push_back(fc); } while(++fc != done);
-  int ss = faces_pt.size();
-  for(int k=0; k<ss; k++)
-  {
-    Face_handle f = faces_pt[k];
-    int i = f->index(inserted);
-    f->set_vertex(i, v);
-  }
-  v->set_point(p);
-  v->set_face(inserted->face());
-  this->delete_vertex(inserted);
-
-  for(typename std::set<Face_handle>::const_iterator ib = faces_set.begin(),
-        iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
-
-  return v;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_3.h
deleted file mode 100644
index e9afaef..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_3.h
+++ /dev/null
@@ -1,1927 +0,0 @@
-// Copyright (c) 1999-2004   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion
-//                 Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
-//                 Clement Jamin
-
-#ifndef CGAL_DELAUNAY_TRIANGULATION_3_H
-#define CGAL_DELAUNAY_TRIANGULATION_3_H
-
-#include <CGAL/basic.h>
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-# define CGAL_PROFILE
-# include <CGAL/Profile_counter.h>
-#endif
-
-#include <utility>
-#include <vector>
-
-#include <CGAL/Triangulation_3.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Location_policy.h>
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-# include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-#include <CGAL/Spatial_sort_traits_adapter_3.h>
-#include <CGAL/internal/info_check.h>
-
-#include <boost/tuple/tuple.hpp>
-#include <boost/iterator/zip_iterator.hpp>
-#include <boost/mpl/and.hpp>
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <CGAL/point_generators_3.h>
-# include <tbb/parallel_for.h>
-# include <tbb/enumerable_thread_specific.h>
-# include <tbb/concurrent_vector.h>
-#endif
-
-#ifdef CGAL_DELAUNAY_3_OLD_REMOVE
-#  error "The old remove() code has been removed.  Please report any issue you may have with the current one."
-#endif
-
-namespace CGAL {
-
-// Here is the declaration of a class template with three arguments, one
-// having a default value. There is no definition of that class template.
-template < class Gt,
-           class Tds_ = Default,
-           class Location_policy = Default,
-           class Lock_data_structure_ = Default >
-class Delaunay_triangulation_3;
-
-// There is a specialization Delaunay_triangulation_3<Gt, Tds, Fast_location>
-// defined in <CGAL/internal/Delaunay_triangulation_hierarchy_3.h>.
-
-// Here is the specialization Delaunay_triangulation_3<Gt, Tds>, with two
-// arguments, that is if Location_policy being the default value 'Default'.
-template < class Gt, class Tds_,
-           class Lock_data_structure_ >
-class Delaunay_triangulation_3<Gt, Tds_, Default, Lock_data_structure_>
-  : public Triangulation_3<Gt, Tds_, Lock_data_structure_>
-{
-  typedef Delaunay_triangulation_3<Gt, Tds_, Default,
-                                   Lock_data_structure_> Self;
-  typedef Triangulation_3<Gt,Tds_,Lock_data_structure_>  Tr_Base;
-
-public:
-
-  typedef typename Tr_Base::Triangulation_data_structure
-                                     Triangulation_data_structure;
-  typedef Gt                         Geom_traits;
-  typedef Compact_location           Location_policy;
-
-  typedef typename Tr_Base::Lock_data_structure Lock_data_structure;
-
-  typedef typename Gt::Point_3       Point;
-  typedef typename Gt::Segment_3     Segment;
-  typedef typename Gt::Triangle_3    Triangle;
-  typedef typename Gt::Tetrahedron_3 Tetrahedron;
-
-  // types for dual:
-  typedef typename Gt::Line_3        Line;
-  typedef typename Gt::Ray_3         Ray;
-  //typedef typename Gt::Plane_3       Plane;
-  typedef typename Gt::Object_3      Object;
-
-  typedef typename Tr_Base::Cell_handle   Cell_handle;
-  typedef typename Tr_Base::Vertex_handle Vertex_handle;
-
-  typedef typename Tr_Base::Cell   Cell;
-  typedef typename Tr_Base::Vertex Vertex;
-  typedef typename Tr_Base::Facet  Facet;
-  typedef typename Tr_Base::Edge   Edge;
-
-  typedef typename Tr_Base::Cell_circulator  Cell_circulator;
-  typedef typename Tr_Base::Facet_circulator Facet_circulator;
-  typedef typename Tr_Base::Cell_iterator    Cell_iterator;
-  typedef typename Tr_Base::Facet_iterator   Facet_iterator;
-  typedef typename Tr_Base::Edge_iterator    Edge_iterator;
-  typedef typename Tr_Base::Vertex_iterator  Vertex_iterator;
-
-  typedef typename Tr_Base::Finite_vertices_iterator Finite_vertices_iterator;
-  typedef typename Tr_Base::Finite_cells_iterator    Finite_cells_iterator;
-  typedef typename Tr_Base::Finite_facets_iterator   Finite_facets_iterator;
-  typedef typename Tr_Base::Finite_edges_iterator    Finite_edges_iterator;
-
-  typedef typename Tr_Base::All_cells_iterator       All_cells_iterator;
-
-  typedef typename Tr_Base::size_type size_type;
-  typedef typename Tr_Base::Locate_type Locate_type;
-
-
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
-  using Tr_Base::cw;
-  using Tr_Base::ccw;
-  using Tr_Base::geom_traits;
-  using Tr_Base::number_of_vertices;
-  using Tr_Base::dimension;
-  using Tr_Base::finite_facets_begin;
-  using Tr_Base::finite_facets_end;
-  using Tr_Base::finite_vertices_begin;
-  using Tr_Base::finite_vertices_end;
-  using Tr_Base::finite_cells_begin;
-  using Tr_Base::finite_cells_end;
-  using Tr_Base::finite_edges_begin;
-  using Tr_Base::finite_edges_end;
-  using Tr_Base::tds;
-  using Tr_Base::infinite_vertex;
-  using Tr_Base::next_around_edge;
-  using Tr_Base::vertex_triple_index;
-  using Tr_Base::mirror_vertex;
-  using Tr_Base::coplanar;
-  using Tr_Base::coplanar_orientation;
-  using Tr_Base::orientation;
-  using Tr_Base::adjacent_vertices;
-  using Tr_Base::construct_segment;
-  using Tr_Base::incident_facets;
-  using Tr_Base::insert_in_conflict;
-  using Tr_Base::is_infinite;
-  using Tr_Base::is_valid_finite;
-  using Tr_Base::locate;
-  using Tr_Base::side_of_edge;
-  using Tr_Base::side_of_segment;
-  using Tr_Base::find_conflicts;
-#endif
-
-protected:
-
-  Oriented_side
-  side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
-         const Point &p3, const Point &t, bool perturb = false) const;
-
-  Bounded_side
-  coplanar_side_of_bounded_circle(const Point &p, const Point &q,
-                  const Point &r, const Point &s, bool perturb = false) const;
-
-  // for dual:
-  Point
-  construct_circumcenter(const Point &p, const Point &q, const Point &r) const
-  {
-      return geom_traits().construct_circumcenter_3_object()(p, q, r);
-  }
-
-  Line
-  construct_equidistant_line(const Point &p1, const Point &p2,
-                             const Point &p3) const
-  {
-      return geom_traits().construct_equidistant_line_3_object()(p1, p2, p3);
-  }
-
-  Ray
-  construct_ray(const Point &p, const Line &l) const
-  {
-      return geom_traits().construct_ray_3_object()(p, l);
-  }
-
-  Object
-  construct_object(const Point &p) const
-  {
-      return geom_traits().construct_object_3_object()(p);
-  }
-
-  Object
-  construct_object(const Segment &s) const
-  {
-      return geom_traits().construct_object_3_object()(s);
-  }
-
-  Object
-  construct_object(const Ray &r) const
-  {
-      return geom_traits().construct_object_3_object()(r);
-  }
-
-  bool
-  less_distance(const Point &p, const Point &q, const Point &r) const
-  {
-      return geom_traits().compare_distance_3_object()(p, q, r) == SMALLER;
-  }
-
-public:
-
-  Delaunay_triangulation_3(const Gt& gt = Gt(), Lock_data_structure *lock_ds = NULL)
-    : Tr_Base(gt, lock_ds)
-  {}
-
-  Delaunay_triangulation_3(Lock_data_structure *lock_ds, const Gt& gt = Gt())
-    : Tr_Base(lock_ds, gt)
-  {}
-
-  // Create a 3D triangulation from 4 points which must be well-oriented
-  // AND non-coplanar
-  Delaunay_triangulation_3(const Point &p0, const Point &p1,
-                           const Point &p2, const Point &p3,
-                           const Gt& gt = Gt(),
-                           Lock_data_structure *lock_ds = NULL)
-    : Tr_Base(p0, p1, p2, p3, gt, lock_ds)
-  {}
-
-
-  // copy constructor duplicates vertices and cells
-  Delaunay_triangulation_3(const Delaunay_triangulation_3 & tr)
-    : Tr_Base(tr)
-  {
-    CGAL_triangulation_postcondition( is_valid() );
-  }
-
-  template < typename InputIterator >
-  Delaunay_triangulation_3(InputIterator first, InputIterator last,
-                           const Gt& gt = Gt(), Lock_data_structure *lock_ds = NULL)
-    : Tr_Base(gt, lock_ds)
-  {
-      insert(first, last);
-  }
-
-  template < typename InputIterator >
-  Delaunay_triangulation_3(InputIterator first, InputIterator last,
-                           Lock_data_structure *lock_ds,
-                           const Gt& gt = Gt())
-    : Tr_Base(gt, lock_ds)
-  {
-      insert(first, last);
-  }
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first, InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-                typename std::iterator_traits<InputIterator>::value_type,
-                Point
-            >
-          >::type* = NULL
-  )
-#else
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first, InputIterator last)
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-  {
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-    WallClockTimer t;
-#endif
-
-    size_type n = number_of_vertices();
-    std::vector<Point> points (first, last);
-    spatial_sort (points.begin(), points.end(), geom_traits());
-
-    // Parallel
-#ifdef CGAL_LINKED_WITH_TBB
-    if (this->is_parallel())
-    {
-      size_t num_points = points.size();
-
-      Vertex_handle hint;
-      std::vector<Vertex_handle> far_sphere_vertices;
-      
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-      const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000;
-      if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
-      {
-        // Add temporary vertices on a "far sphere" to reduce contention on
-        // the infinite vertex
-
-        // Get bbox
-        const Bbox_3 &bbox = *this->get_bbox();
-        // Compute radius for far sphere
-        const double& xdelta = bbox.xmax() - bbox.xmin();
-        const double& ydelta = bbox.ymax() - bbox.ymin();
-        const double& zdelta = bbox.zmax() - bbox.zmin();
-        const double radius = 1.3 * 0.5 * std::sqrt(xdelta*xdelta +
-                                                    ydelta*ydelta +
-                                                    zdelta*zdelta);
-        // WARNING - TODO: this code has to be fixed because Vector_3 is not 
-        // required by the traits concept
-        const typename Gt::Vector_3 center(
-          bbox.xmin() + 0.5*xdelta,
-          bbox.ymin() + 0.5*ydelta,
-          bbox.zmin() + 0.5*zdelta);
-        Random_points_on_sphere_3<Point> random_point(radius);
-        const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
-          tbb::task_scheduler_init::default_num_threads() * 3.5);
-        std::vector<Point> points_on_far_sphere;
-        for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
-          points_on_far_sphere.push_back(*random_point + center);
-
-        spatial_sort(points_on_far_sphere.begin(), 
-                     points_on_far_sphere.end(), 
-                     geom_traits());
-
-        std::vector<Point>::const_iterator it_p = points_on_far_sphere.begin();
-        std::vector<Point>::const_iterator it_p_end = points_on_far_sphere.end();
-        for ( ; it_p != it_p_end ; ++it_p)
-        {
-          hint = insert(*it_p, hint);
-          far_sphere_vertices.push_back(hint);
-        }
-      }
-#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-      
-      size_t i = 0;
-      // Insert "num_points_seq" points sequentially
-      // (or more if dim < 3 after that)
-      size_t num_points_seq = (std::min)(num_points, (size_t)100);
-      while (dimension() < 3 || i < num_points_seq)
-      {
-        hint = insert(points[i], hint);
-        ++i;
-      }
-
-      tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint);
-      tbb::parallel_for(
-        tbb::blocked_range<size_t>( i, num_points ),
-        Insert_point<Self>(*this, points, tls_hint)
-      );
-      
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-      if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
-      {
-        // Remove the temporary vertices on far sphere
-        remove(far_sphere_vertices.begin(), far_sphere_vertices.end());
-      }
-#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-    }
-    // Sequential
-    else
-#endif // CGAL_LINKED_WITH_TBB
-    {
-      Vertex_handle hint;
-      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-              p != end; ++p)
-          hint = insert(*p, hint);
-    }
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-    std::cerr << "Triangulation computed in " << t.elapsed() << " seconds." << std::endl;
-#endif
-
-    return number_of_vertices() - n;
-  }
-
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-private:
-  //top stands for tuple-or-pair
-  template <class Info>
-  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
-  template <class Info>
-  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
-  template <class Info>
-  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
-  template <class Info>
-  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
-
-  template <class Tuple_or_pair,class InputIterator>
-  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
-  {
-    size_type n = number_of_vertices();
-    std::vector<std::ptrdiff_t> indices;
-    std::vector<Point> points;
-    std::vector<typename Triangulation_data_structure::Vertex::Info> infos;
-    std::ptrdiff_t index=0;
-    for (InputIterator it=first;it!=last;++it){
-      Tuple_or_pair value=*it;
-      points.push_back( top_get_first(value)  );
-      infos.push_back ( top_get_second(value) );
-      indices.push_back(index++);
-    }
-
-    typedef Spatial_sort_traits_adapter_3<Geom_traits,Point*> Search_traits;
-
-    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
-
-    Vertex_handle hint;
-    for (typename std::vector<std::ptrdiff_t>::const_iterator
-      it = indices.begin(), end = indices.end();
-      it != end; ++it){
-      hint = insert(points[*it], hint);
-      if (hint!=Vertex_handle()) hint->info()=infos[*it];
-    }
-
-    return number_of_vertices() - n;
-  }
-
-public:
-
-  template < class InputIterator >
-  std::ptrdiff_t
-  insert( InputIterator first,
-          InputIterator last,
-          typename boost::enable_if<
-            boost::is_convertible<
-              typename std::iterator_traits<InputIterator>::value_type,
-              std::pair<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type>
-            > >::type* =NULL
-  )
-  {
-    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);
-  }
-
-  template <class  InputIterator_1,class InputIterator_2>
-  std::ptrdiff_t
-  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
-          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
-          typename boost::enable_if<
-            boost::mpl::and_<
-              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
-              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type >
-            >
-          >::type* =NULL
-  )
-  {
-    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);
-  }
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-  Vertex_handle insert(const Point & p, Vertex_handle hint,
-                       bool *could_lock_zone = NULL)
-  {
-    return insert(p, hint == Vertex_handle() ? this->infinite_cell() : hint->cell(),
-                  could_lock_zone);
-  }
-
-  Vertex_handle insert(const Point & p, Cell_handle start = Cell_handle(),
-                       bool *could_lock_zone = NULL);
-
-  Vertex_handle insert(const Point & p, Locate_type lt,
-                       Cell_handle c, int li, int,
-                 bool *could_lock_zone = NULL);
-
-public: // internal methods
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point  &p,
-                                          OutputItCells fit,
-                                          Cell_handle start = Cell_handle() );
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point& p,
-                                          OutputItCells fit,
-                                          Vertex_handle hint);
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point& p,
-                                          Locate_type lt,
-                                          Cell_handle c, int li, int lj,
-                                          OutputItCells fit);
-
-public:
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-  CGAL_DEPRECATED Vertex_handle move_point(Vertex_handle v, const Point & p);
-#endif
-
-  template <class OutputIteratorBoundaryFacets,
-            class OutputIteratorCells,
-            class OutputIteratorInternalFacets>
-  Triple<OutputIteratorBoundaryFacets,
-         OutputIteratorCells,
-         OutputIteratorInternalFacets>
-  find_conflicts(const Point &p, Cell_handle c,
-                 OutputIteratorBoundaryFacets bfit,
-                 OutputIteratorCells cit,
-                 OutputIteratorInternalFacets ifit,
-                 bool *could_lock_zone = NULL) const
-  {
-      CGAL_triangulation_precondition(dimension() >= 2);
-
-      std::vector<Cell_handle> cells;
-      cells.reserve(32);
-      std::vector<Facet> facets;
-      facets.reserve(64);
-
-      if (dimension() == 2) {
-          Conflict_tester_2 tester(p, this);
-          ifit = Tr_Base::find_conflicts
-            (c, tester,
-             make_triple(std::back_inserter(facets),
-                         std::back_inserter(cells),
-                         ifit), could_lock_zone).third;
-      }
-      else {
-          Conflict_tester_3 tester(p, this);
-          ifit = Tr_Base::find_conflicts
-            (c, tester,
-             make_triple(std::back_inserter(facets),
-                         std::back_inserter(cells),
-                         ifit), could_lock_zone).third;
-      }
-
-      // Reset the conflict flag on the boundary.
-      for(typename std::vector<Facet>::iterator fit=facets.begin();
-          fit != facets.end(); ++fit) {
-        fit->first->neighbor(fit->second)->tds_data().clear();
-        *bfit++ = *fit;
-      }
-
-      // Reset the conflict flag in the conflict cells.
-      for(typename std::vector<Cell_handle>::iterator ccit=cells.begin();
-        ccit != cells.end(); ++ccit) {
-        (*ccit)->tds_data().clear();
-        *cit++ = *ccit;
-      }
-      return make_triple(bfit, cit, ifit);
-  }
-
-  template <class OutputIteratorBoundaryFacets, class OutputIteratorCells>
-  std::pair<OutputIteratorBoundaryFacets, OutputIteratorCells>
-  find_conflicts(const Point &p, Cell_handle c,
-                 OutputIteratorBoundaryFacets bfit,
-                 OutputIteratorCells cit,
-                 bool *could_lock_zone = NULL) const
-  {
-      Triple<OutputIteratorBoundaryFacets,
-             OutputIteratorCells,
-             Emptyset_iterator> t = find_conflicts(p, c, bfit, cit,
-                                                   Emptyset_iterator(),
-                                                   could_lock_zone);
-      return std::make_pair(t.first, t.second);
-  }
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-  // Returns the vertices on the boundary of the conflict hole.
-  template <class OutputIterator>
-  OutputIterator
-  vertices_in_conflict(const Point&p, Cell_handle c, OutputIterator res) const
-  {
-    return vertices_on_conflict_zone_boundary(p, c, res);
-  }
-#endif // CGAL_NO_DEPRECATED_CODE
-
-  // Returns the vertices on the boundary of the conflict hole.
-  template <class OutputIterator>
-  OutputIterator
-  vertices_on_conflict_zone_boundary(const Point&p, Cell_handle c,
-                                     OutputIterator res) const
-  {
-      CGAL_triangulation_precondition(dimension() >= 2);
-
-      // Get the facets on the boundary of the hole.
-      std::vector<Facet> facets;
-      find_conflicts(p, c, std::back_inserter(facets),
-                     Emptyset_iterator(), Emptyset_iterator());
-
-      // Then extract uniquely the vertices.
-      std::set<Vertex_handle> vertices;
-      if (dimension() == 3) {
-          for (typename std::vector<Facet>::const_iterator i = facets.begin();
-               i != facets.end(); ++i) {
-              vertices.insert(i->first->vertex((i->second+1)&3));
-              vertices.insert(i->first->vertex((i->second+2)&3));
-              vertices.insert(i->first->vertex((i->second+3)&3));
-          }
-      } else {
-          for (typename std::vector<Facet>::const_iterator i = facets.begin();
-               i != facets.end(); ++i) {
-              vertices.insert(i->first->vertex(cw(i->second)));
-              vertices.insert(i->first->vertex(ccw(i->second)));
-          }
-      }
-
-      return std::copy(vertices.begin(), vertices.end(), res);
-  }
-
-  // REMOVE
-  void remove(Vertex_handle v);
-  // Concurrency-safe
-  // See Triangulation_3::remove for more information
-  bool remove(Vertex_handle v, bool *could_lock_zone);
-
-  // return new cells (internal)
-  template <class OutputItCells>
-  void remove_and_give_new_cells(Vertex_handle v,
-                                 OutputItCells fit);
-
-  template < typename InputIterator >
-  size_type remove(InputIterator first, InputIterator beyond)
-  {
-    CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond));
-    size_type n = number_of_vertices();
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-    WallClockTimer t;
-#endif
-
-    // Parallel
-#ifdef CGAL_LINKED_WITH_TBB
-    if (this->is_parallel())
-    {
-      // TODO: avoid that by asking for random-access iterators?
-      std::vector<Vertex_handle> vertices(first, beyond);
-      tbb::concurrent_vector<Vertex_handle> vertices_to_remove_sequentially;
-
-      tbb::parallel_for(
-        tbb::blocked_range<size_t>( 0, vertices.size()),
-        Remove_point<Self>(*this, vertices, vertices_to_remove_sequentially)
-      );
-
-      // Do the rest sequentially
-      for ( typename tbb::concurrent_vector<Vertex_handle>::const_iterator
-              it = vertices_to_remove_sequentially.begin(),
-              it_end = vertices_to_remove_sequentially.end()
-          ; it != it_end
-          ; ++it)
-      {
-        remove(*it);
-      }
-    }
-    // Sequential
-    else
-#endif // CGAL_LINKED_WITH_TBB
-    {
-      while (first != beyond) {
-        remove(*first);
-        ++first;
-      }
-    }
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-    double elapsed = t.elapsed();
-    std::cerr << "Points removed in " << elapsed << " seconds." << std::endl;
-#endif
-    return n - number_of_vertices();
-  }
-
-  template < typename InputIterator >
-  size_type remove_cluster(InputIterator first, InputIterator beyond)
-  {
-    Self tmp;
-    Vertex_remover<Self> remover (tmp);
-    return Tr_Base::remove(first, beyond, remover);
-  }
-
-  // MOVE
-  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
-
-  Vertex_handle move(Vertex_handle v, const Point &p);
-
-  // return new cells (internal)
-  template <class OutputItCells>
-  Vertex_handle move_if_no_collision_and_give_new_cells(Vertex_handle v,
-                                                        const Point &p,
-                                                        OutputItCells fit);
-
-private:
-
-  Bounded_side
-  side_of_sphere(Vertex_handle v0, Vertex_handle v1,
-                 Vertex_handle v2, Vertex_handle v3,
-                 const Point &p, bool perturb) const;
-public:
-
-  // Queries
-  Bounded_side
-  side_of_sphere(Cell_handle c, const Point & p,
-                 bool perturb = false) const
-  {
-      return side_of_sphere(c->vertex(0), c->vertex(1),
-                            c->vertex(2), c->vertex(3), p, perturb);
-  }
-
-  Bounded_side
-  side_of_circle( const Facet & f, const Point & p, bool perturb = false) const
-  {
-      return side_of_circle(f.first, f.second, p, perturb);
-  }
-
-  Bounded_side
-  side_of_circle( Cell_handle c, int i, const Point & p,
-                  bool perturb = false) const;
-
-  Vertex_handle
-  nearest_vertex_in_cell(const Point& p, Cell_handle c) const;
-
-  Vertex_handle
-  nearest_vertex(const Point& p, Cell_handle c = Cell_handle()) const;
-
-  bool is_Gabriel(Cell_handle c, int i) const;
-  bool is_Gabriel(Cell_handle c, int i, int j) const;
-  bool is_Gabriel(const Facet& f)const ;
-  bool is_Gabriel(const Edge& e) const;
-
-  bool is_delaunay_after_displacement(Vertex_handle v,
-                                      const Point &p) const;
-
-// Dual functions
-  Point dual(Cell_handle c) const;
-
-  Object dual(const Facet & f) const
-  { return dual( f.first, f.second ); }
-
-  Object dual(Cell_handle c, int i) const;
-
-  Line dual_support(Cell_handle c, int i) const;
-
-  bool is_valid(bool verbose = false, int level = 0) const;
-
-  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
-
-  template < class Stream>
-  Stream& draw_dual(Stream & os)
-    {
-      for (Finite_facets_iterator fit = finite_facets_begin(),
-                                  end = finite_facets_end();
-           fit != end; ++fit) {
-        Object o = dual(*fit);
-        if      (const Segment *s = object_cast<Segment>(&o)) os << *s;
-        else if (const Ray *r     = object_cast<Ray>(&o))     os << *r;
-        else if (const Point *p   = object_cast<Point>(&o))   os << *p;
-      }
-      return os;
-    }
-
-protected:
-
-  Vertex_handle
-  nearest_vertex(const Point &p, Vertex_handle v, Vertex_handle w) const
-  {
-      // In case of equality, v is returned.
-      CGAL_triangulation_precondition(v != w);
-
-      if (is_infinite(v))
-          return w;
-      if (is_infinite(w))
-          return v;
-      return less_distance(p, w->point(), v->point()) ? w : v;
-  }
-
-  class Conflict_tester_3
-  {
-      const Point &p;
-      const Self *t;
-
-  public:
-
-    Conflict_tester_3(const Point &pt, const Self *tr)
-      : p(pt), t(tr) {}
-
-    bool operator()(const Cell_handle c) const
-    {
-      return t->side_of_sphere(c, p, true) == ON_BOUNDED_SIDE;
-    }
-    Oriented_side compare_weight(const Point &, const Point &) const
-    {
-      return ZERO;
-    }
-    bool test_initial_cell(Cell_handle) const
-    {
-      return true;
-    }
-  };
-
-  class Conflict_tester_2
-  {
-      const Point &p;
-      const Self *t;
-
-  public:
-
-    Conflict_tester_2(const Point &pt, const Self *tr)
-      : p(pt), t(tr) {}
-
-    bool operator()(const Cell_handle c) const
-    {
-      return t->side_of_circle(c, 3, p, true) == ON_BOUNDED_SIDE;
-    }
-    Oriented_side compare_weight(const Point &, const Point &) const
-    {
-      return ZERO;
-    }
-    bool test_initial_cell(Cell_handle) const
-    {
-      return true;
-    }
-  };
-  class Hidden_point_visitor
-  {
-  public:
-
-    Hidden_point_visitor() {}
-
-    template <class InputIterator>
-    void process_cells_in_conflict(InputIterator, InputIterator) const {}
-    void reinsert_vertices(Vertex_handle ) {}
-    Vertex_handle replace_vertex(Cell_handle c, int index,
-                                 const Point &) {
-      return c->vertex(index);
-    }
-    void hide_point(Cell_handle, const Point &) {}
-  };
-
-  class Perturbation_order {
-      const Self *t;
-
-  public:
-      Perturbation_order(const Self *tr)
-          : t(tr) {}
-
-      bool operator()(const Point *p, const Point *q) const {
-          return t->compare_xyz(*p, *q) == SMALLER;
-      }
-  };
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Functor for parallel insert(begin, end) function
-  template <typename DT>
-  class Insert_point
-  {
-    typedef typename DT::Point                          Point;
-    typedef typename DT::Vertex_handle                  Vertex_handle;
-
-    DT                                                  & m_dt;
-    const std::vector<Point>                            & m_points;
-    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
-
-  public:
-    // Constructor
-    Insert_point(DT & dt,
-                 const std::vector<Point> & points,
-                 tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
-    : m_dt(dt), m_points(points), m_tls_hint(tls_hint)
-    {}
-
-    // Constructor
-    Insert_point(const Insert_point &ip)
-    : m_dt(ip.m_dt), m_points(ip.m_points), m_tls_hint(ip.m_tls_hint)
-    {}
-
-    // operator()
-    void operator()( const tbb::blocked_range<size_t>& r ) const
-    {
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-      static Profile_branch_counter_3 bcounter(
-        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]");
-#endif
-
-      Vertex_handle &hint = m_tls_hint.local();
-      for( std::size_t i_point = r.begin() ; i_point != r.end() ; ++i_point)
-      {
-        bool success = false;
-        while(!success)
-        {
-          if (m_dt.try_lock_vertex(hint) && m_dt.try_lock_point(m_points[i_point]))
-          {
-            bool could_lock_zone;
-            Vertex_handle new_hint = m_dt.insert(
-              m_points[i_point], hint, &could_lock_zone);
-
-            m_dt.unlock_all_elements();
-
-            if (could_lock_zone)
-            {
-              hint = new_hint;
-              success = true;
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-              ++bcounter;
-#endif
-            }
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-            else
-            {
-              bcounter.increment_branch_1(); // THIS is a late withdrawal!
-            }
-#endif
-          }
-          else
-          {
-            m_dt.unlock_all_elements();
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-            bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-          }
-        }
-
-      }
-    }
-  };
-
-  // Functor for parallel remove(begin, end) function
-  template <typename DT>
-  class Remove_point
-  {
-    typedef typename DT::Point                          Point;
-    typedef typename DT::Vertex_handle                  Vertex_handle;
-
-    DT                                    & m_dt;
-    const std::vector<Vertex_handle>      & m_vertices;
-    tbb::concurrent_vector<Vertex_handle> & m_vertices_to_remove_sequentially;
-
-  public:
-    // Constructor
-    Remove_point(DT & dt,
-                 const std::vector<Vertex_handle> & vertices,
-                 tbb::concurrent_vector<Vertex_handle> & 
-                   vertices_to_remove_sequentially)
-    : m_dt(dt), m_vertices(vertices), 
-      m_vertices_to_remove_sequentially(vertices_to_remove_sequentially)
-    {}
-
-    // Constructor
-    Remove_point(const Remove_point &rp)
-    : m_dt(rp.m_dt), m_vertices(rp.m_vertices),
-      m_vertices_to_remove_sequentially(rp.m_vertices_to_remove_sequentially)
-    {}
-
-    // operator()
-    void operator()( const tbb::blocked_range<size_t>& r ) const
-    {
-      for( size_t i_vertex = r.begin() ; i_vertex != r.end() ; ++i_vertex)
-      {
-        Vertex_handle v = m_vertices[i_vertex];
-        bool could_lock_zone, needs_to_be_done_sequentially;
-        do
-        {
-          needs_to_be_done_sequentially =
-            !m_dt.remove(v, &could_lock_zone);
-          m_dt.unlock_all_elements();
-        } while (!could_lock_zone);
-
-        if (needs_to_be_done_sequentially)
-          m_vertices_to_remove_sequentially.push_back(v);
-      }
-    }
-  };
-#endif // CGAL_LINKED_WITH_TBB
-
-  template < class DelaunayTriangulation_3 >
-  class Vertex_remover;
-
-  template < class DelaunayTriangulation_3 >
-  class Vertex_inserter;
-
-  friend class Perturbation_order;
-  friend class Conflict_tester_3;
-  friend class Conflict_tester_2;
-
-  Hidden_point_visitor hidden_point_visitor;
-};
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-insert(const Point & p, Cell_handle start, bool *could_lock_zone)
-{
-  Locate_type lt;
-  int li, lj;
-
-  // Parallel
-  if (could_lock_zone)
-  {
-    Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone);
-    if (*could_lock_zone)
-      return insert(p, lt, c, li, lj, could_lock_zone);
-    else
-      return Vertex_handle();
-  }
-  // Sequential
-  else
-  {
-    Cell_handle c = locate(p, lt, li, lj, start);
-    return insert(p, lt, c, li, lj);
-  }
-
-}
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-insert(const Point & p, Locate_type lt, Cell_handle c, int li, int lj,
-       bool *could_lock_zone)
-{
-  switch (dimension()) {
-  case 3:
-    {
-      Conflict_tester_3 tester(p, this);
-      Vertex_handle v = insert_in_conflict(p, lt, c, li, lj,
-                                           tester, hidden_point_visitor, could_lock_zone);
-      return v;
-    }// dim 3
-  case 2:
-    {
-      Conflict_tester_2 tester(p, this);
-      return insert_in_conflict(p, lt, c, li, lj,
-                                tester, hidden_point_visitor, could_lock_zone);
-    }//dim 2
-  default :
-    // dimension <= 1
-    // Do not use the generic insert.
-    return Tr_Base::insert(p, c);
-  }
-}
-
-template < class Gt, class Tds, class Lds >
-template <class OutputItCells>
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-insert_and_give_new_cells(const Point  &p,
-                          OutputItCells fit,
-                          Cell_handle start)
-{
-  Vertex_handle v = insert(p, start);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-template < class Gt, class Tds, class Lds >
-template <class OutputItCells>
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-insert_and_give_new_cells(const Point& p,
-                          OutputItCells fit,
-                          Vertex_handle hint)
-{
-  Vertex_handle v = insert(p, hint);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-template < class Gt, class Tds, class Lds >
-template <class OutputItCells>
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-insert_and_give_new_cells(const Point& p,
-                          Locate_type lt,
-                          Cell_handle c, int li, int lj,
-                          OutputItCells fit)
-{
-  Vertex_handle v = insert(p, lt, c, li, lj);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-move_point(Vertex_handle v, const Point & p)
-{
-    CGAL_triangulation_precondition(! is_infinite(v));
-    CGAL_triangulation_expensive_precondition(is_vertex(v));
-
-    // Dummy implementation for a start.
-
-    // Remember an incident vertex to restart
-    // the point location after the removal.
-    Cell_handle c = v->cell();
-    Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0);
-    CGAL_triangulation_assertion(old_neighbor != v);
-
-    remove(v);
-
-    if (dimension() <= 0)
-        return insert(p);
-    return insert(p, old_neighbor->cell());
-}
-#endif
-
-template <class Gt, class Tds, class Lds >
-template <class DelaunayTriangulation_3>
-class Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_remover {
-  typedef DelaunayTriangulation_3 Delaunay;
-public:
-  typedef Nullptr_t Hidden_points_iterator;
-
-  Vertex_remover(Delaunay &tmp_) : tmp(tmp_) {}
-
-  Delaunay &tmp;
-
-  void add_hidden_points(Cell_handle) {}
-  Hidden_points_iterator hidden_points_begin() { return NULL; }
-  Hidden_points_iterator hidden_points_end() { return NULL; }
-
-  Bounded_side side_of_bounded_circle(const Point &p, const Point &q,
-    const Point &r, const Point &s, bool perturb = false) const {
-    return tmp.coplanar_side_of_bounded_circle(p,q,r,s,perturb);
-  }
-};
-
-template <class Gt, class Tds, class Lds >
-template <class DelaunayTriangulation_3>
-class Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_inserter {
-  typedef DelaunayTriangulation_3 Delaunay;
-public:
-  typedef Nullptr_t Hidden_points_iterator;
-
-  Vertex_inserter(Delaunay &tmp_) : tmp(tmp_) {}
-
-  Delaunay &tmp;
-
-  void add_hidden_points(Cell_handle) {}
-  Hidden_points_iterator hidden_points_begin() { return NULL; }
-  Hidden_points_iterator hidden_points_end() { return NULL; }
-
-  Vertex_handle insert(const Point& p,
-                       Locate_type lt, Cell_handle c, int li, int lj) {
-    return tmp.insert(p, lt, c, li, lj);
-  }
-
-  Vertex_handle insert(const Point& p, Cell_handle c) {
-    return tmp.insert(p, c);
-  }
-
-  Vertex_handle insert(const Point& p) {
-    return tmp.insert(p);
-  }
-};
-
-template < class Gt, class Tds, class Lds >
-void
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-remove(Vertex_handle v)
-{
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  Tr_Base::remove(v, remover);
-
-  CGAL_triangulation_expensive_postcondition(is_valid());
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-remove(Vertex_handle v, bool *could_lock_zone)
-{
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  bool ret = Tr_Base::remove(v, remover, could_lock_zone);
-
-  CGAL_triangulation_expensive_postcondition(is_valid());
-  return ret;
-}
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-move_if_no_collision(Vertex_handle v, const Point &p)
-{
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  Vertex_inserter<Self> inserter (*this);
-  Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter);
-
-  CGAL_triangulation_expensive_postcondition(is_valid());
-        return res;
-}
-
-template <class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-move(Vertex_handle v, const Point &p) {
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  Vertex_inserter<Self> inserter (*this);
-        return Tr_Base::move(v,p,remover,inserter);
-}
-
-template < class Gt, class Tds, class Lds >
-template <class OutputItCells>
-void
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-remove_and_give_new_cells(Vertex_handle v, OutputItCells fit)
-{
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  Tr_Base::remove_and_give_new_cells(v,remover,fit);
-
-  CGAL_triangulation_expensive_postcondition(is_valid());
-}
-
-template < class Gt, class Tds, class Lds >
-template <class OutputItCells>
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point &p,
-  OutputItCells fit)
-{
-  Self tmp;
-  Vertex_remover<Self> remover (tmp);
-  Vertex_inserter<Self> inserter (*this);
-  Vertex_handle res =
-    Tr_Base::move_if_no_collision_and_give_new_cells(v,p,
-      remover,inserter,fit);
-
-  CGAL_triangulation_expensive_postcondition(is_valid());
-        return res;
-}
-
-template < class Gt, class Tds, class Lds >
-Oriented_side
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
-                        const Point &p3, const Point &p, bool perturb) const
-{
-    CGAL_triangulation_precondition( orientation(p0, p1, p2, p3) == POSITIVE );
-
-    Oriented_side os =
-        geom_traits().side_of_oriented_sphere_3_object()(p0, p1, p2, p3, p);
-
-    if (os != ON_ORIENTED_BOUNDARY || !perturb)
-        return os;
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    // We sort the points lexicographically.
-    const Point * points[5] = {&p0, &p1, &p2, &p3, &p};
-    std::sort(points, points+5, Perturbation_order(this) );
-
-    // We successively look whether the leading monomial, then 2nd monomial
-    // of the determinant has non null coefficient.
-    // 2 iterations are enough (cf paper)
-    for (int i=4; i>2; --i) {
-        if (points[i] == &p)
-            return ON_NEGATIVE_SIDE; // since p0 p1 p2 p3 are non coplanar
-                                     // and positively oriented
-        Orientation o;
-        if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
-            return o;
-        if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
-            return o;
-        if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
-            return o;
-        if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
-            return o;
-    }
-
-    CGAL_triangulation_assertion(false);
-    return ON_NEGATIVE_SIDE;
-}
-
-template < class Gt, class Tds, class Lds >
-Bounded_side
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-coplanar_side_of_bounded_circle(const Point &p0, const Point &p1,
-               const Point &p2, const Point &p, bool perturb) const
-{
-    // In dim==2, we should even be able to assert orient == POSITIVE.
-    CGAL_triangulation_precondition( coplanar_orientation(p0, p1, p2)
-                                     != COLLINEAR );
-
-    Bounded_side bs =
-      geom_traits().coplanar_side_of_bounded_circle_3_object()(p0, p1, p2, p);
-
-    if (bs != ON_BOUNDARY || !perturb)
-        return bs;
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    // We sort the points lexicographically.
-    const Point * points[4] = {&p0, &p1, &p2, &p};
-    std::sort(points, points+4, Perturbation_order(this) );
-
-    Orientation local = coplanar_orientation(p0, p1, p2);
-
-    // we successively look whether the leading monomial, then 2nd monimial,
-    // then 3rd monomial, of the determinant which has non null coefficient
-    // [syl] : TODO : Probably it can be stopped earlier like the 3D version
-    for (int i=3; i>0; --i) {
-        if (points[i] == &p)
-            return Bounded_side(NEGATIVE); // since p0 p1 p2 are non collinear
-                                   // but not necessarily positively oriented
-        Orientation o;
-        if (points[i] == &p2
-                && (o = coplanar_orientation(p0,p1,p)) != COLLINEAR )
-            // [syl] : TODO : I'm not sure of the signs here (nor the rest :)
-            return Bounded_side(o*local);
-        if (points[i] == &p1
-                && (o = coplanar_orientation(p0,p,p2)) != COLLINEAR )
-            return Bounded_side(o*local);
-        if (points[i] == &p0
-                && (o = coplanar_orientation(p,p1,p2)) != COLLINEAR )
-            return Bounded_side(o*local);
-    }
-
-    // case when the first non null coefficient is the coefficient of
-    // the 4th monomial
-    // moreover, the tests (points[] == &p) were false up to here, so the
-    // monomial corresponding to p is the only monomial with non-zero
-    // coefficient, it is equal to coplanar_orient(p0,p1,p2) == positive
-    // so, no further test is required
-    return Bounded_side(-local); //ON_UNBOUNDED_SIDE;
-}
-
-template < class Gt, class Tds, class Lds >
-Bounded_side
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-side_of_sphere(Vertex_handle v0, Vertex_handle v1,
-               Vertex_handle v2, Vertex_handle v3,
-               const Point &p, bool perturb) const
-{
-    CGAL_triangulation_precondition( dimension() == 3 );
-
-    if (is_infinite(v0)) {
-        Orientation o = orientation(v2->point(), v1->point(), v3->point(), p);
-        if (o != COPLANAR)
-            return Bounded_side(o);
-        return coplanar_side_of_bounded_circle(v2->point(), v1->point(), v3->point(), p, perturb);
-    }
-
-    if (is_infinite(v1)) {
-        Orientation o = orientation(v2->point(), v3->point(), v0->point(), p);
-        if (o != COPLANAR)
-            return Bounded_side(o);
-        return coplanar_side_of_bounded_circle(v2->point(), v3->point(), v0->point(), p, perturb);
-    }
-
-    if (is_infinite(v2)) {
-        Orientation o = orientation(v1->point(), v0->point(), v3->point(), p);
-        if (o != COPLANAR)
-            return Bounded_side(o);
-        return coplanar_side_of_bounded_circle(v1->point(), v0->point(), v3->point(), p, perturb);
-    }
-
-    if (is_infinite(v3)) {
-        Orientation o = orientation(v0->point(), v1->point(), v2->point(), p);
-        if (o != COPLANAR)
-            return Bounded_side(o);
-        return coplanar_side_of_bounded_circle(v0->point(), v1->point(), v2->point(), p, perturb);
-    }
-
-    return (Bounded_side) side_of_oriented_sphere(v0->point(), v1->point(), v2->point(), v3->point(), p, perturb);
-}
-
-template < class Gt, class Tds, class Lds >
-Bounded_side
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-side_of_circle(Cell_handle c, int i,
-               const Point & p, bool perturb) const
-  // precondition : dimension >=2
-  // in dimension 3, - for a finite facet
-  // returns ON_BOUNDARY if the point lies on the circle,
-  // ON_UNBOUNDED_SIDE when exterior, ON_BOUNDED_SIDE
-  // interior
-  // for an infinite facet, considers the plane defined by the
-  // adjacent finite facet of the same cell, and does the same as in
-  // dimension 2 in this plane
-  // in dimension 2, for an infinite facet
-  // in this case, returns ON_BOUNDARY if the point lies on the
-  // finite edge (endpoints included)
-  // ON_BOUNDED_SIDE for a point in the open half-plane
-  // ON_UNBOUNDED_SIDE elsewhere
-{
-  CGAL_triangulation_precondition( dimension() >= 2 );
-  int i3 = 5;
-
-  if ( dimension() == 2 ) {
-    CGAL_triangulation_precondition( i == 3 );
-    // the triangulation is supposed to be valid, ie the facet
-    // with vertices 0 1 2 in this order is positively oriented
-    if ( ! c->has_vertex( infinite_vertex(), i3 ) )
-      return coplanar_side_of_bounded_circle( c->vertex(0)->point(),
-                                              c->vertex(1)->point(),
-                                              c->vertex(2)->point(),
-                                              p, perturb);
-    // else infinite facet
-    // v1, v2 finite vertices of the facet such that v1,v2,infinite
-    // is positively oriented
-    Vertex_handle v1 = c->vertex( ccw(i3) ),
-                  v2 = c->vertex( cw(i3) );
-    CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
-                                 mirror_vertex(c, i3)->point()) == NEGATIVE);
-    Orientation o = coplanar_orientation(v1->point(), v2->point(), p);
-    if ( o != COLLINEAR )
-        return Bounded_side( o );
-    // because p is in f iff
-    // it does not lie on the same side of v1v2 as vn
-    int i_e;
-    Locate_type lt;
-    // case when p collinear with v1v2
-    return side_of_segment( p,
-                            v1->point(), v2->point(),
-                            lt, i_e );
-  }
-
-  // else dimension == 3
-  CGAL_triangulation_precondition( i >= 0 && i < 4 );
-  if ( ( ! c->has_vertex(infinite_vertex(),i3) ) || ( i3 != i ) ) {
-    // finite facet
-    // initialization of i0 i1 i2, vertices of the facet positively
-    // oriented (if the triangulation is valid)
-    int i0 = (i>0) ? 0 : 1;
-    int i1 = (i>1) ? 1 : 2;
-    int i2 = (i>2) ? 2 : 3;
-    CGAL_triangulation_precondition( coplanar( c->vertex(i0)->point(),
-                                               c->vertex(i1)->point(),
-                                               c->vertex(i2)->point(),
-                                               p ) );
-    return coplanar_side_of_bounded_circle( c->vertex(i0)->point(),
-                                            c->vertex(i1)->point(),
-                                            c->vertex(i2)->point(),
-                                            p, perturb);
-  }
-
-  //else infinite facet
-  // v1, v2 finite vertices of the facet such that v1,v2,infinite
-  // is positively oriented
-  Vertex_handle v1 = c->vertex( next_around_edge(i3,i) ),
-                v2 = c->vertex( next_around_edge(i,i3) );
-  Orientation o = (Orientation)
-                  (coplanar_orientation( v1->point(), v2->point(),
-                                         c->vertex(i)->point()) *
-                  coplanar_orientation( v1->point(), v2->point(), p ));
-  // then the code is duplicated from 2d case
-  if ( o != COLLINEAR )
-      return Bounded_side( -o );
-  // because p is in f iff
-  // it is not on the same side of v1v2 as c->vertex(i)
-  int i_e;
-  Locate_type lt;
-  // case when p collinear with v1v2
-  return side_of_segment( p,
-                          v1->point(), v2->point(),
-                          lt, i_e );
-}
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-nearest_vertex_in_cell(const Point& p, Cell_handle c) const
-// Returns the finite vertex of the cell c which is the closest to p.
-{
-    CGAL_triangulation_precondition(dimension() >= 0);
-
-    Vertex_handle nearest = nearest_vertex(p, c->vertex(0), c->vertex(1));
-    if (dimension() >= 2) {
-        nearest = nearest_vertex(p, nearest, c->vertex(2));
-        if (dimension() == 3)
-            nearest = nearest_vertex(p, nearest, c->vertex(3));
-    }
-    return nearest;
-}
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-nearest_vertex(const Point& p, Cell_handle start) const
-{
-    if (number_of_vertices() == 0)
-        return Vertex_handle();
-
-    // Use a brute-force algorithm if dimension < 3.
-    if (dimension() < 3) {
-        Finite_vertices_iterator vit = finite_vertices_begin();
-        Vertex_handle res = vit;
-        ++vit;
-        for (Finite_vertices_iterator end = finite_vertices_end(); vit != end; ++vit)
-            res = nearest_vertex(p, res, vit);
-        return res;
-    }
-
-    Locate_type lt;
-    int li, lj;
-    Cell_handle c = locate(p, lt, li, lj, start);
-    if (lt == Tr_Base::VERTEX)
-        return c->vertex(li);
-
-    // - start with the closest vertex from the located cell.
-    // - repeatedly take the nearest of its incident vertices if any
-    // - if not, we're done.
-    Vertex_handle nearest = nearest_vertex_in_cell(p, c);
-    std::vector<Vertex_handle> vs;
-    vs.reserve(32);
-    while (true) {
-        Vertex_handle tmp = nearest;
-        adjacent_vertices(nearest, std::back_inserter(vs));
-        for (typename std::vector<Vertex_handle>::const_iterator
-                vsit = vs.begin(); vsit != vs.end(); ++vsit)
-            tmp = nearest_vertex(p, tmp, *vsit);
-        if (tmp == nearest)
-            break;
-        vs.clear();
-        nearest = tmp;
-    }
-
-    return nearest;
-}
-
-// This is not a fast version.
-// The optimized version needs an int for book-keeping in
-// tds() so as to avoiding the need to clear
-// the tds marker in each cell (which is an unsigned char)
-// Also the visitor in TDS could be more clever.
-// The Delaunay triangulation which filters displacements
-// will do these optimizations.
-template <class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
-{
-  CGAL_triangulation_precondition(!this->is_infinite(v));
-  CGAL_triangulation_precondition(this->dimension() == 2);
-  CGAL_triangulation_precondition(!this->test_dim_down(v));
-        if(v->point() == p) return true;
-  Point ant = v->point();
-  v->set_point(p);
-
-  std::size_t size;
-
-  // are incident cells well-oriented
-  std::vector<Cell_handle> cells;
-  cells.reserve(64);
-  this->incident_cells(v, std::back_inserter(cells));
-  size = cells.size();
-  for(std::size_t i=0; i<size; i++)
-  {
-    Cell_handle c = cells[i];
-    if(this->is_infinite(c)) continue;
-    if(this->orientation(c->vertex(0)->point(), c->vertex(1)->point(),
-                         c->vertex(2)->point(), c->vertex(3)->point())
-       != POSITIVE)
-    {
-      v->set_point(ant);
-      return false;
-    }
-  }
-
-  // are incident bi-cells Delaunay?
-  std::vector<Facet> facets;
-  facets.reserve(128);
-  this->incident_facets(v, std::back_inserter(facets));
-  size = facets.size();
-  for(std::size_t i=0; i<size; i++)
-  {
-    const Facet &f = facets[i];
-    Cell_handle c = f.first;
-    int j = f.second;
-    Cell_handle cj = c->neighbor(j);
-    int mj = this->mirror_index(c, j);
-    Vertex_handle h1 = c->vertex(j);
-    if(this->is_infinite(h1)) {
-      if(this->side_of_sphere(c, cj->vertex(mj)->point(), true)
-         != ON_UNBOUNDED_SIDE) {
-        v->set_point(ant);
-        return false;
-      }
-    } else {
-      if(this->side_of_sphere(cj, h1->point(), true) != ON_UNBOUNDED_SIDE) {
-        v->set_point(ant);
-        return false;
-      }
-    }
-  }
-
-  v->set_point(ant);
-  return true;
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_Gabriel(const Facet& f) const
-{
-  return is_Gabriel(f.first, f.second);
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_Gabriel(Cell_handle c, int i) const
-{
-  CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i));
-  typename Geom_traits::Side_of_bounded_sphere_3
-    side_of_bounded_sphere =
-    geom_traits().side_of_bounded_sphere_3_object();
-
-  if ((!is_infinite(c->vertex(i))) &&
-      side_of_bounded_sphere (
-        c->vertex(vertex_triple_index(i,0))->point(),
-        c->vertex(vertex_triple_index(i,1))->point(),
-        c->vertex(vertex_triple_index(i,2))->point(),
-        c->vertex(i)->point()) == ON_BOUNDED_SIDE ) return false;
-    Cell_handle neighbor = c->neighbor(i);
-  int in = neighbor->index(c);
-
-  if ((!is_infinite(neighbor->vertex(in))) &&
-      side_of_bounded_sphere(
-         c->vertex(vertex_triple_index(i,0))->point(),
-         c->vertex(vertex_triple_index(i,1))->point(),
-         c->vertex(vertex_triple_index(i,2))->point(),
-         neighbor->vertex(in)->point()) == ON_BOUNDED_SIDE ) return false;
-
-  return true;
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_Gabriel(const Edge& e) const
-{
-  return is_Gabriel(e.first, e.second, e.third);
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_Gabriel(Cell_handle c, int i, int j) const
-{
-  CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j));
-  typename Geom_traits::Side_of_bounded_sphere_3
-    side_of_bounded_sphere =
-    geom_traits().side_of_bounded_sphere_3_object();
-
-  Facet_circulator fcirc = incident_facets(c,i,j),
-                   fdone(fcirc);
-  Vertex_handle v1 = c->vertex(i);
-  Vertex_handle v2 = c->vertex(j);
-  do {
-      // test whether the vertex of cc opposite to *fcirc
-      // is inside the sphere defined by the edge e = (s, i,j)
-      Cell_handle cc = (*fcirc).first;
-      int ii = (*fcirc).second;
-      if (!is_infinite(cc->vertex(ii)) &&
-           side_of_bounded_sphere( v1->point(),
-                                   v2->point(),
-                                   cc->vertex(ii)->point())
-          == ON_BOUNDED_SIDE ) return false;
-  } while(++fcirc != fdone);
-  return true;
-}
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Point
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-dual(Cell_handle c) const
-{
-  CGAL_triangulation_precondition(dimension()==3);
-  CGAL_triangulation_precondition( ! is_infinite(c) );
-  return c->circumcenter(geom_traits());
-}
-
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Object
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-dual(Cell_handle c, int i) const
-{
-  CGAL_triangulation_precondition(dimension()>=2);
-  CGAL_triangulation_precondition( ! is_infinite(c,i) );
-
-  if ( dimension() == 2 ) {
-    CGAL_triangulation_precondition( i == 3 );
-    return construct_object( construct_circumcenter(c->vertex(0)->point(),
-                                                    c->vertex(1)->point(),
-                                                    c->vertex(2)->point()) );
-  }
-
-  // dimension() == 3
-  Cell_handle n = c->neighbor(i);
-  if ( ! is_infinite(c) && ! is_infinite(n) )
-    return construct_object(construct_segment( dual(c), dual(n) ));
-
-  // either n or c is infinite
-  int in;
-  if ( is_infinite(c) )
-    in = n->index(c);
-  else {
-    n = c;
-    in = i;
-  }
-  // n now denotes a finite cell, either c or c->neighbor(i)
-  int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
-  if ( (in&1) == 1 )
-      std::swap(ind[0], ind[1]);
-  // in=0: 1 2 3
-  // in=1: 3 2 0
-  // in=2: 3 0 1
-  // in=3: 1 0 2
-  const Point& p = n->vertex(ind[0])->point();
-  const Point& q = n->vertex(ind[1])->point();
-  const Point& r = n->vertex(ind[2])->point();
-
-  Line l = construct_equidistant_line( p, q, r );
-  return construct_object(construct_ray( dual(n), l));
-}
-
-
-
-template < class Gt, class Tds, class Lds >
-typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Line
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-dual_support(Cell_handle c, int i) const
-{
-  CGAL_triangulation_precondition(dimension()>=2);
-  CGAL_triangulation_precondition( ! is_infinite(c,i) );
-
-  if ( dimension() == 2 ) {
-    CGAL_triangulation_precondition( i == 3 );
-    return construct_equidistant_line( c->vertex(0)->point(),
-                                       c->vertex(1)->point(),
-                                       c->vertex(2)->point() );
-  }
-
-  return construct_equidistant_line( c->vertex((i+1)&3)->point(),
-                                     c->vertex((i+2)&3)->point(),
-                                     c->vertex((i+3)&3)->point() );
-}
-
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_valid(bool verbose, int level) const
-{
-  if ( ! tds().is_valid(verbose,level) ) {
-    if (verbose)
-        std::cerr << "invalid data structure" << std::endl;
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-
-  if ( infinite_vertex() == Vertex_handle() ) {
-    if (verbose)
-        std::cerr << "no infinite vertex" << std::endl;
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-
-  switch ( dimension() ) {
-  case 3:
-    {
-      for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end(); it != end; ++it) {
-        is_valid_finite(it);
-        for(int i=0; i<4; i++ ) {
-          if ( !is_infinite
-               (it->neighbor(i)->vertex(it->neighbor(i)->index(it))) ) {
-            if ( side_of_sphere
-                 (it,
-                  it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point())
-                 == ON_BOUNDED_SIDE ) {
-              if (verbose)
-                std::cerr << "non-empty sphere " << std::endl;
-              CGAL_triangulation_assertion(false);
-              return false;
-            }
-          }
-        }
-      }
-      break;
-    }
-  case 2:
-    {
-      for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end(); it != end; ++it) {
-        is_valid_finite((*it).first);
-        for(int i=0; i<3; i++ ) {
-          if( !is_infinite
-              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
-                                                 ->index((*it).first))) ) {
-            if ( side_of_circle ( (*it).first, 3,
-                                  (*it).first->neighbor(i)->
-                                  vertex( (((*it).first)->neighbor(i))
-                                          ->index((*it).first) )->point() )
-                 == ON_BOUNDED_SIDE ) {
-              if (verbose)
-                std::cerr << "non-empty circle " << std::endl;
-              CGAL_triangulation_assertion(false);
-              return false;
-            }
-          }
-        }
-      }
-      break;
-    }
-  case 1:
-    {
-      for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end(); it != end; ++it)
-        is_valid_finite((*it).first);
-      break;
-    }
-  }
-  if (verbose)
-      std::cerr << "Delaunay valid triangulation" << std::endl;
-  return true;
-}
-
-template < class Gt, class Tds, class Lds >
-bool
-Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
-is_valid(Cell_handle c, bool verbose, int level) const
-{
-  if ( ! Tr_Base::is_valid(c,verbose,level) ) {
-    if (verbose) {
-      std::cerr << "combinatorically invalid cell" ;
-      for (int i=0; i <= dimension(); i++ )
-        std::cerr << c->vertex(i)->point() << ", " ;
-      std::cerr << std::endl;
-    }
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-  switch ( dimension() ) {
-  case 3:
-    {
-      if ( ! is_infinite(c) ) {
-        is_valid_finite(c,verbose,level);
-        for (int i=0; i<4; i++ ) {
-          if (side_of_sphere(c, c->vertex((c->neighbor(i))->index(c))->point())
-              == ON_BOUNDED_SIDE ) {
-            if (verbose)
-                std::cerr << "non-empty sphere " << std::endl;
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-        }
-      }
-      break;
-    }
-  case 2:
-    {
-      if ( ! is_infinite(c,3) ) {
-        for (int i=0; i<2; i++ ) {
-          if (side_of_circle(c, 3, c->vertex(c->neighbor(i)->index(c))->point())
-               == ON_BOUNDED_SIDE ) {
-            if (verbose)
-                std::cerr << "non-empty circle " << std::endl;
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-        }
-      }
-      break;
-    }
-  }
-  if (verbose)
-      std::cerr << "Delaunay valid cell" << std::endl;
-  return true;
-}
-
-} //namespace CGAL
-
-#include <CGAL/internal/Delaunay_triangulation_hierarchy_3.h>
-
-#endif // CGAL_DELAUNAY_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Direction_2.h b/3rdparty/CGAL-4.6/include/CGAL/Direction_2.h
deleted file mode 100644
index 08b9e53..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Direction_2.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_DIRECTION_2_H
-#define CGAL_DIRECTION_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Direction_2 : public R_::Kernel_base::Direction_2
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::Vector_2              Vector_2;
-  typedef typename R_::Line_2                Line_2;
-  typedef typename R_::Ray_2                 Ray_2;
-  typedef typename R_::Segment_2             Segment_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-  typedef typename R_::Kernel_base::Direction_2      RDirection_2;
-
-  typedef Direction_2                        Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef RDirection_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Direction_2() {}
-
-  Direction_2(const RDirection_2& d)
-    : RDirection_2(d) {}
-
-  explicit Direction_2(const Vector_2& v)
-    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), v)) {}
-
-  explicit Direction_2(const Line_2& l)
-    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), l)) {}
-
-  explicit Direction_2(const Ray_2& r)
-    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), r)) {}
-
-  explicit Direction_2(const Segment_2& s)
-    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), s)) {}
-
-  Direction_2(const RT &x, const RT &y)
-    :  RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), x,y)) {}
-
-  typename R::Boolean
-  counterclockwise_in_between(const Direction_2 &d1,
-			      const Direction_2 &d2) const
-  {
-    return R().counterclockwise_in_between_2_object()(*this, d1, d2);
-  }
-
-  Direction_2 perpendicular(const Orientation &o) const
-  {
-    return R().construct_perpendicular_direction_2_object()(*this,o);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dx_2( Direction_2)>::type
-  dx() const
-  {
-    return R().compute_dx_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dy_2( Direction_2)>::type
-  dy() const
-  {
-    return R().compute_dy_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dx_2( Direction_2)>::type
-  delta(int i) const
-  {
-    CGAL_kernel_precondition( ( i == 0 ) || ( i == 1 ) );
-    return (i==0) ? dx() : dy();
-  }
-
-  typename R::Boolean
-  operator<(const Direction_2 &d) const
-  {
-    return R().compare_angle_with_x_axis_2_object()(*this, d) == SMALLER;
-  }
-
-
-  typename R::Boolean
-  operator>(const Direction_2 &d) const
-  {
-    return d < *this;
-  }
-
-
-  typename R::Boolean
-  operator>=(const Direction_2 &d) const
-  {
-    return R().compare_angle_with_x_axis_2_object()(*this, d) != SMALLER;
-  }
-
-
-  typename R::Boolean
-  operator<=(const Direction_2 &d) const
-  {
-    return R().compare_angle_with_x_axis_2_object()(*this, d) != LARGER;
-  }
-
-  Direction_2
-  operator-() const
-  {
-    return R().construct_opposite_direction_2_object()(*this);
-  }
-
-  Vector_2 vector() const
-  {
-    return R().construct_vector_2_object()(*this);
-  }
-
-  Vector_2 to_vector() const
-  {
-    return this->vector();
-  }
-
-  typename R::Boolean
-  operator==(const Direction_2& d) const
-  {
-    return R().equal_2_object()(*this, d);
-  }
-
-  typename R::Boolean
-  operator!=(const Direction_2& d) const
-  {
-    return !(*this == d);
-  }
-
-  Direction_2 transform(const Aff_transformation_2 &t) const
-  {
-    return t.transform(*this);
-  }
-
-};
-
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Direction_2<R>& d, const Cartesian_tag&)
-{
-    typename R::Vector_2 v = d.to_vector();
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << v.x() << ' ' << v.y();
-    case IO::BINARY :
-        write(os, v.x());
-        write(os, v.y());
-        return os;
-    default:
-        return os << "DirectionC2(" << v.x() << ", " << v.y() << ')';
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Direction_2<R>& d, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << d.dx() << ' ' << d.dy();
-    case IO::BINARY :
-        write(os, d.dx());
-        write(os, d.dy());
-        return os;
-    default:
-        return os << "DirectionH2(" << d.dx() << ", "
-                                    << d.dy() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Direction_2<R>& d)
-{
-  return insert(os, d, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Direction_2<R>& d, const Cartesian_tag&)
-{
-    typename R::FT x, y;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        break;
-    default:
-        std::cerr << std::endl << "Stream must be in ascii or binary mode"
-                  << std::endl;
-        break;
-    }
-    if (is)
-        d = Direction_2<R>(x, y);
-    return is;
-}
-
-template <class R >
-std::istream&
-extract(std::istream& is, Direction_2<R>& d, const Homogeneous_tag&)
-{
-  typename R::RT x, y;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  d = Direction_2<R>(x, y);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Direction_2<R>& d)
-{
-  return extract(is, d, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Direction_3.h b/3rdparty/CGAL-4.6/include/CGAL/Direction_3.h
deleted file mode 100644
index 5abeeb5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Direction_3.h
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
- 
-#ifndef CGAL_DIRECTION_3_H
-#define CGAL_DIRECTION_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Direction_3 : public R_::Kernel_base::Direction_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Line_3                Line_3;
-  typedef typename R_::Ray_3                 Ray_3;
-  typedef typename R_::Segment_3             Segment_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Direction_3                        Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Direction_3 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Direction_3() {}
-
-  Direction_3(const Rep& d)
-    : Rep(d) {}
-
-  explicit Direction_3(const Vector_3& v)
-    : Rep(typename R::Construct_direction_3()(Return_base_tag(), v)) {}
-
-  explicit Direction_3(const Line_3& l)
-    : Rep(typename R::Construct_direction_3()(Return_base_tag(), l)) {}
-
-  explicit Direction_3(const Ray_3& r)
-    : Rep(typename R::Construct_direction_3()(Return_base_tag(), r)) {}
-
-  explicit Direction_3(const Segment_3& s)
-    : Rep(typename R::Construct_direction_3()(Return_base_tag(), s)) {}
-
-  Direction_3(const RT& hx, const RT& hy, const RT& hz)
-    : Rep(typename R::Construct_direction_3()(Return_base_tag(), hx, hy, hz)) {}
-
-  Direction_3 transform(const Aff_transformation_3 &t) const
-  {
-    return t.transform(*this);
-  }
- 
-  Direction_3
-  operator-() const
-  {
-    return R().construct_opposite_direction_3_object()(*this);
-  } 
-  
-  Vector_3 to_vector() const
-  {
-    return R().construct_vector_3_object()(*this);
-  }
-
-  Vector_3 vector() const { return to_vector(); }
-
-
-  typename cpp11::result_of<typename R::Compute_dx_3(Direction_3)>::type
-  dx() const
-  {
-    return R().compute_dx_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dy_3(Direction_3)>::type
-  dy() const
-  {
-    return R().compute_dy_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dz_3(Direction_3)>::type
-  dz() const
-  {
-    return R().compute_dz_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_dx_3(Direction_3)>::type
-  delta(int i) const
-  {
-    CGAL_kernel_precondition( i >= 0 && i <= 2 );
-    if (i==0) return dx();
-    if (i==1) return dy();
-    return dz();
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Direction_3<R>& d, const Cartesian_tag&) 
-{
-  typename R::Vector_3 v = d.to_vector();
-  switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-      return os << v.x() << ' ' << v.y()  << ' ' << v.z();
-    case IO::BINARY :
-      write(os, v.x());
-      write(os, v.y());
-      write(os, v.z());
-      return os;
-    default:
-      os << "DirectionC3(" << v.x() << ", " << v.y() << ", " << v.z() << ")";
-      return os;
-  }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Direction_3<R>& d, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << d.dx() << ' ' << d.dy() << ' ' << d.dz();
-    case IO::BINARY :
-        write(os, d.dx());
-        write(os, d.dy());
-        write(os, d.dz());
-        return os;
-    default:
-        return os << "DirectionH3(" << d.dx() << ", "
-                                    << d.dy() << ", "
-                                    << d.dz() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Direction_3<R>& d)
-{
-  return insert(os, d, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Direction_3<R>& d, const Cartesian_tag&) 
-{
-  typename R::FT x, y, z;
-  switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-      is >> iformat(x) >> iformat(y) >> iformat(z);
-      break;
-    case IO::BINARY :
-      read(is, x);
-      read(is, y);
-      read(is, z);
-      break;
-    default:
-      std::cerr << "" << std::endl;
-      std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-      break;
-  }
-  if (is)
-      d = Direction_3<R>(x, y, z);
-  return is;
-}
-
-template <class R >
-std::istream&
-extract(std::istream& is, Direction_3<R>& d, const Homogeneous_tag&) 
-{
-  typename R::RT x, y, z;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y) >> iformat(z);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        read(is, z);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  if (is)
-    d = Direction_3<R>(x, y, z);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Direction_3<R>& d)
-{
-  return extract(is, d, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Discrete_authalic_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Discrete_authalic_parameterizer_3.h
deleted file mode 100644
index f007f2d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Discrete_authalic_parameterizer_3.h
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
-#define CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
-
-#include <CGAL/Fixed_border_parameterizer_3.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-/// \file Discrete_authalic_parameterizer_3.h
-
-namespace CGAL {
-
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class `Discrete_authalic_parameterizer_3`
-/// implements the *Discrete Authalic Parameterization* algorithm \cgalCite{cgal:dma-ipsm-02}.
-/// This method is sometimes called <i>DAP</i> or just <i>Authalic parameterization</i>.
-///
-/// DAP is a weak area-preserving parameterization. It is a compromise between
-/// area-preserving and angle-preserving.
-///
-/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
-///
-/// This class is a Strategy \cgalCite{cgal:ghjv-dpero-95} called by the main
-/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
-/// `Discrete_authalic_parameterizer_3`:
-/// - It provides default `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
-///   parameters that make sense.
-/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
-///   for j neighbor vertex of i based on Discrete Authalic Parameterization algorithm.
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-
-template
-<
-    class ParameterizationMesh_3,     ///< 3D surface mesh
-    class BorderParameterizer_3       ///< Strategy to parameterize the surface border
-                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-    class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system
-                = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>
->
-class Discrete_authalic_parameterizer_3
-    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                          BorderParameterizer_3,
-                                          SparseLinearAlgebraTraits_d>
-{
-// Private types
-private:
-    // Superclass
-    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                         BorderParameterizer_3,
-                                         SparseLinearAlgebraTraits_d>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    typedef BorderParameterizer_3           Border_param;
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-    /// @endcond
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-    using Base::cotangent;
-
-// Public operations
-public:
-    /// Constructor
-    Discrete_authalic_parameterizer_3(Border_param border_param = Border_param(),
-                                        ///< Object that maps the surface's border to 2D space.
-                                      Sparse_LA sparse_la = Sparse_LA())
-                                        ///< Traits object to access a sparse linear system.
-    :   Fixed_border_parameterizer_3<Adaptor,
-                                     Border_param,
-                                     Sparse_LA>(border_param, sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-// Protected operations
-protected:
-    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
-    virtual NT compute_w_ij(const Adaptor& mesh,
-                            Vertex_const_handle main_vertex_v_i,
-                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
-    {
-        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
-        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
-
-        // Compute the square norm of v_j -> v_i vector
-        Vector_3 edge = position_v_i - position_v_j;
-        double square_len = edge*edge;
-
-        // Compute cotangent of (v_k,v_j,v_i) corner (i.e. cotan of v_j corner)
-        // if v_k is the vertex before v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
-        previous_vertex_v_k --;
-        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
-        double cotg_psi_ij  = cotangent(position_v_k, position_v_j, position_v_i);
-
-        // Compute cotangent of (v_i,v_j,v_l) corner (i.e. cotan of v_j corner)
-        // if v_l is the vertex after v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
-        next_vertex_v_l ++;
-        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
-        double cotg_theta_ij = cotangent(position_v_i, position_v_j, position_v_l);
-
-        double weight = 0.0;
-        CGAL_surface_mesh_parameterization_assertion(square_len != 0.0);    // two points are identical!
-        if(square_len != 0.0)
-            weight = (cotg_psi_ij+cotg_theta_ij)/square_len;
-
-        return weight;
-    }
-};
-
-
-} //namespace CGAL
-
-#endif //CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Discrete_conformal_map_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Discrete_conformal_map_parameterizer_3.h
deleted file mode 100644
index d31f702..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Discrete_conformal_map_parameterizer_3.h
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
-#define CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
-
-#include <CGAL/Fixed_border_parameterizer_3.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-/// \file Discrete_conformal_map_parameterizer_3.h
-
-namespace CGAL {
-
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class Discrete_conformal_map_parameterizer_3
-/// implements the <i>Discrete Conformal Map (DCM)</i> parameterization \cgalCite{cgal:eddhls-maam-95}.
-/// This algorithm is also called <i>Discrete Conformal Parameterization (DCP)</i>,
-/// <i>Discrete Harmonic Map</i> or <i>Fixed Conformal Parameterization</i> by other authors.
-///
-/// This is a conformal parameterization, i.e. it attempts to preserve angles.
-///
-/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
-///
-/// This class is used by the main
-/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
-/// - It provides default `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
-///   parameters that make sense.
-/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
-///   for j neighbor vertex of i based on Discrete Conformal Map method.
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-///
-/// \param ParameterizationMesh_3       3D surface mesh.
-/// \param BorderParameterizer_3        Strategy to parameterize the surface border.
-/// \param SparseLinearAlgebraTraits_d  Traits class to solve a sparse linear system.
-///        Note: the system is *not* symmetric because `Fixed_border_parameterizer_3`
-///        does not remove (yet) border vertices from the system.
-///
-/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-
-template
-<
-    class ParameterizationMesh_3,
-    class BorderParameterizer_3
-                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-    class SparseLinearAlgebraTraits_d
-                = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>
->
-class Discrete_conformal_map_parameterizer_3
-    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-{
-// Private types
-private:
-    // Superclass
-    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    typedef BorderParameterizer_3           Border_param;
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-    /// @endcond
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-    using Base::cotangent;
-
-// Public operations
-public:
-    /// Constructor
-    Discrete_conformal_map_parameterizer_3(Border_param border_param = Border_param(),
-                                            ///< Object that maps the surface's border to 2D space.
-                                           Sparse_LA sparse_la = Sparse_LA())
-                                            ///< Traits object to access a sparse linear system.
-    :   Fixed_border_parameterizer_3<Adaptor,
-                                   Border_param,
-                                   Sparse_LA>(border_param, sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-// Protected operations
-protected:
-    /// Compute w_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
-    virtual NT compute_w_ij(const Adaptor& mesh,
-                            Vertex_const_handle main_vertex_v_i,
-                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
-    {
-        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
-        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
-
-        // Compute cotangent of (v_i,v_k,v_j) corner (i.e. cotan of v_k corner)
-        // if v_k is the vertex before v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
-        previous_vertex_v_k --;
-        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
-        double cotg_beta_ij  = cotangent(position_v_i, position_v_k, position_v_j);
-
-        // Compute cotangent of (v_j,v_l,v_i) corner (i.e. cotan of v_l corner)
-        // if v_l is the vertex after v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
-        next_vertex_v_l ++;
-        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
-        double cotg_alpha_ij = cotangent(position_v_j, position_v_l, position_v_i);
-
-        double weight = cotg_beta_ij+cotg_alpha_ij;
-        return weight;
-    }
-};
-
-
-} //namespace CGAL
-
-#endif //CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Eigen_matrix.h b/3rdparty/CGAL-4.6/include/CGAL/Eigen_matrix.h
deleted file mode 100644
index fe42466..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Eigen_matrix.h
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright (c) 2012  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Gael Guennebaud
-
-#ifndef CGAL_EIGEN_MATRIX_H
-#define CGAL_EIGEN_MATRIX_H
-
-#include <CGAL/basic.h> // include basic.h before testing #defines
-
-#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
-#include <Eigen/Sparse>
-
-namespace CGAL {
-
-
-/// The class Eigen_sparse_matrix
-/// is a C++ wrapper around Eigen' matrix type SparseMatrix<>.
-///
-/// This kind of matrix can be either symmetric or not. Symmetric
-/// matrices store only the lower triangle.
-///
-/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
-///
-/// @heading Parameters:
-/// @param T Number type.
-
-template<class T>
-struct Eigen_sparse_matrix
-{
-// Public types
-public:
-
-	typedef Eigen::SparseMatrix<T> EigenType;
-  typedef T NT;
-
-// Public operations
-public:
-
-  /// Create a square matrix initialized with zeros.
-  Eigen_sparse_matrix(std::size_t  dim,                   ///< Matrix dimension.
-                      bool is_symmetric = false)  ///< Symmetric/hermitian?
-    : m_is_already_built(false), m_matrix(static_cast<int>(dim),static_cast<int>(dim))
-  {
-    CGAL_precondition(dim > 0);
-
-    m_is_symmetric = is_symmetric;
-    // reserve memory for a regular 3D grid
-    m_triplets.reserve(dim);
-  }
-
-  /// Create a square matrix initialized with zeros.
-  Eigen_sparse_matrix(int  dim,                   ///< Matrix dimension.
-                      bool is_symmetric = false)  ///< Symmetric/hermitian?
-    : m_is_already_built(false), m_matrix(dim,dim)
-  {
-    CGAL_precondition(dim > 0);
-
-    m_is_symmetric = is_symmetric;
-    // reserve memory for a regular 3D grid
-    m_triplets.reserve(dim);
-  }
-
-  /// Create a rectangular matrix initialized with zeros.
-  ///
-  /// @commentheading Precondition: rows == columns if is_symmetric is true.
-  Eigen_sparse_matrix(std::size_t  rows,                 ///< Number of rows.
-                      std::size_t  columns,              ///< Number of columns.
-                      bool is_symmetric = false) ///< Symmetric/hermitian?
-    : m_is_already_built(false), m_matrix(static_cast<int>(rows),static_cast<int>(columns))
-  {
-    CGAL_precondition(rows > 0);
-    CGAL_precondition(columns > 0);
-    if (is_symmetric) {
-        CGAL_precondition(rows == columns);
-    }
-
-    m_is_symmetric = is_symmetric;
-    // reserve memory for a regular 3D grid
-    m_triplets.reserve(rows);
-  }
-
-  /// Delete this object and the wrapped matrix.
-  ~Eigen_sparse_matrix()
-  {
-  }
-
-  /// Create a rectangular matrix initialized with zeros.
-  ///
-  /// @commentheading Precondition: rows == columns if is_symmetric is true.
-  Eigen_sparse_matrix(int  rows,                 ///< Number of rows.
-                      int  columns,              ///< Number of columns.
-                      bool is_symmetric = false) ///< Symmetric/hermitian?
-    : m_is_already_built(false), m_matrix(rows,columns)
-  {
-    CGAL_precondition(rows > 0);
-    CGAL_precondition(columns > 0);
-    if (is_symmetric) {
-        CGAL_precondition(rows == columns);
-    }
-
-    m_is_symmetric = is_symmetric;
-    // reserve memory for a regular 3D grid
-    m_triplets.reserve(rows);
-  }
-
-  /// Return the matrix number of rows
-  int row_dimension() const    { return m_matrix.rows(); }
-  /// Return the matrix number of columns
-  int column_dimension() const { return m_matrix.cols(); }
-
-
-  /// Write access to a matrix coefficient: a_ij <- val.
-  ///
-  /// Optimizations:
-  /// - For symmetric matrices, Eigen_sparse_matrix stores only the lower triangle
-  ///   set_coef() does nothing if (i, j) belongs to the upper triangle.
-  /// - Caller can optimize this call by setting 'new_coef' to true
-  ///   if the coefficient does not already exist in the matrix.
-  ///
-  /// @commentheading Preconditions:
-  /// - 0 <= i < row_dimension().
-  /// - 0 <= j < column_dimension().
-  void set_coef(std::size_t i_, std::size_t j_, T  val, bool new_coef = false)
-  {
-    int i = static_cast<int>(i_);
-    int j = static_cast<int>(j_);
-    CGAL_precondition(i < row_dimension());
-    CGAL_precondition(j < column_dimension());
-
-    if (m_is_symmetric && (j > i))
-      return;
-
-    if (m_is_already_built)
-      m_matrix.coeffRef(i,j)=val;
-    else
-    {
-      if ( new_coef == false )
-      {
-        assemble_matrix();
-        m_matrix.coeffRef(i,j)=val;
-      }
-      else
-        m_triplets.push_back(Triplet(i,j,val));
-    }
-  }
-
-  /// Write access to a matrix coefficient: a_ij <- a_ij+val.
-  ///
-  /// Optimizations:
-  /// - For symmetric matrices, Eigen_sparse_matrix stores only the lower triangle
-  ///   add_coef() does nothing if (i, j) belongs to the upper triangle.
-  ///
-  /// @commentheading Preconditions:
-  /// - 0 <= i < row_dimension().
-  /// - 0 <= j < column_dimension().
-  void add_coef(int i, int j, T  val)
-  {
-    CGAL_precondition(i < row_dimension());
-    CGAL_precondition(j < column_dimension());
-
-    if (m_is_symmetric && (j > i))
-      return;
-
-    if (m_is_already_built)
-      m_matrix.coeffRef(i,j)+=val;
-    else
-      m_triplets.push_back(Triplet(i,j,val));
-  }
-
-  void assemble_matrix() const
-  {
-    m_matrix.setFromTriplets(m_triplets.begin(), m_triplets.end());
-    m_is_already_built = true;
-    m_triplets.clear(); //the matrix is built and will not be rebuilt
-  }
-
-  const EigenType& eigen_object() const
-  {
-    if(!m_is_already_built) assemble_matrix();
-
-    // turns the matrix into compressed mode:
-    //  -> release some memory
-    //  -> required for some external solvers
-    m_matrix.makeCompressed();
-    return m_matrix;
-  }
-
-private:
-
-
-  /// Eigen_sparse_matrix cannot be copied (yet)
-  Eigen_sparse_matrix(const Eigen_sparse_matrix& rhs);
-  Eigen_sparse_matrix& operator=(const Eigen_sparse_matrix& rhs);
-
-// Fields
-private:
-  
-  mutable bool m_is_already_built;
-  typedef Eigen::Triplet<T,int> Triplet;
-  mutable std::vector<Triplet> m_triplets;
-
-  mutable EigenType m_matrix;
-
-  // Symmetric/hermitian?
-  bool m_is_symmetric;
-
-}; // Eigen_sparse_matrix
-
-
-
-/// The class Eigen_sparse_symmetric_matrix is a C++ wrapper
-/// around a Eigen sparse matrix (type Eigen::SparseMatrix).
-///
-/// Symmetric matrices store only the lower triangle.
-///
-/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
-///
-/// @heading Parameters:
-/// @param T Number type.
-
-template<class T>
-struct Eigen_sparse_symmetric_matrix
-  : public Eigen_sparse_matrix<T>
-{
-// Public types
-  typedef T NT;
-
-// Public operations
-
-  /// Create a square *symmetric* matrix initialized with zeros.
-  Eigen_sparse_symmetric_matrix(int  dim)                  ///< Matrix dimension.
-      : Eigen_sparse_matrix<T>(dim, true /* symmetric */)
-  {
-  }
-
-  /// Create a square *symmetric* matrix initialized with zeros.
-  ///
-  /// @commentheading Precondition: rows == columns.
-  Eigen_sparse_symmetric_matrix(int  rows,                 ///< Number of rows.
-                                int  columns)              ///< Number of columns.
-    : Eigen_sparse_matrix<T>(rows, columns, true /* symmetric */)
-  {
-  }
-};
-
-template <class FT>
-struct Eigen_matrix : public ::Eigen::Matrix<FT,::Eigen::Dynamic,::Eigen::Dynamic>
-{
-  typedef ::Eigen::Matrix<FT,::Eigen::Dynamic,::Eigen::Dynamic> EigenType;
-  
-  Eigen_matrix( std::size_t n1, std::size_t n2):EigenType(n1,n2){}
-  
-  std::size_t number_of_rows () const {return this->rows();}
-  
-  std::size_t number_of_columns () const {return this->cols();}
-  
-  FT operator()( std::size_t i , std::size_t j ) const {return this->operator()(i,j);}
-  
-  void set( std::size_t i, std::size_t j,FT value){
-    this->coeffRef(i,j)=value;
-  }
-
-  const EigenType& eigen_object() const{
-    return static_cast<const EigenType&>(*this);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_EIGEN_MATRIX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Eigen_solver_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Eigen_solver_traits.h
deleted file mode 100644
index 569fad5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Eigen_solver_traits.h
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright (c) 2012  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Gael Guennebaud
-
-#ifndef CGAL_EIGEN_SOLVER_TRAITS_H
-#define CGAL_EIGEN_SOLVER_TRAITS_H
-
-#include <CGAL/config.h> // include basic.h before testing #defines
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4244)
-#endif
-#include <Eigen/Sparse>
-#if EIGEN_VERSION_AT_LEAST(3, 1, 91)
-
-#include <Eigen/SparseLU>
-#endif
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#include <CGAL/Eigen_matrix.h>
-#include <CGAL/Eigen_vector.h>
-#include <boost/shared_ptr.hpp>
-
-namespace CGAL {
-
-
-namespace internal {
-  template <class EigenSolver,class FT>
-  struct Get_eigen_matrix{
-    typedef Eigen_sparse_matrix<FT> type;
-  };
-  
-  template <class FT,class EigenMatrix>
-  struct Get_eigen_matrix< ::Eigen::ConjugateGradient<EigenMatrix>,FT>{
-    typedef Eigen_sparse_symmetric_matrix<FT> type;
-  };
-
-  template <class FT,class EigenMatrix>
-  struct Get_eigen_matrix< ::Eigen::SimplicialCholesky<EigenMatrix>,FT>{
-    typedef Eigen_sparse_symmetric_matrix<FT> type;
-  };
-#if EIGEN_VERSION_AT_LEAST(3, 1, 91)
-  template <class FT, class EigenMatrix, class EigenOrdering>
-  struct Get_eigen_matrix< ::Eigen::SparseLU<EigenMatrix, EigenOrdering >, FT> {
-    typedef Eigen_sparse_matrix<FT> type;
-  };
-#endif
-} //internal 
-  
-/// The class Eigen_solver_traits
-/// is a generic traits class for solving asymmetric or symmetric positive definite (SPD)
-/// sparse linear systems using one of the Eigen solvers.
-/// The default solver is the iterative bi-congugate gradient stabilized solver
-/// Eigen::BiCGSTAB for double.
-///
-/// \cgalModels `SparseLinearAlgebraTraitsWithFactor_d`.
-
-template<class EigenSolverT = Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> >
-class Eigen_solver_traits
-{
-  typedef typename EigenSolverT::Scalar Scalar;
-// Public types
-public:
-   typedef Scalar                                                       NT;
-   typedef typename internal::Get_eigen_matrix<EigenSolverT,NT>::type   Matrix;
-   typedef Eigen_vector<Scalar>                                         Vector;
-   
-
-// Public operations
-public:
-
-   Eigen_solver_traits():m_mat(NULL), m_solver_sptr(new EigenSolverT)
-   {
-   }
-   
-   EigenSolverT& solver() { return *m_solver_sptr; }
-
-   /// Solve the sparse linear system "A*X = B".
-   /// Return true on success. The solution is then (1/D) * X.
-   ///
-   /// @commentheading Preconditions:
-   /// - A.row_dimension()    == B.dimension().
-   /// - A.column_dimension() == X.dimension().
-   bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D)
-   {
-      D = 1;          // Eigen does not support homogeneous coordinates
-
-      m_solver_sptr->compute(A.eigen_object());
-       
-      if(m_solver_sptr->info() != Eigen::Success)
-         return false;
-         
-      X = m_solver_sptr->solve(B);
-
-      return m_solver_sptr->info() == Eigen::Success;
-   }
-
-  bool factor (const Matrix& A, NT& D)
-  {
-    D = 1;
-    
-    m_mat = &A.eigen_object();
-    solver().compute(*m_mat);
-    return solver().info() == Eigen::Success;
-  }
-	
-  bool linear_solver(const Vector& B, Vector& X)
-  {
-    CGAL_precondition(m_mat!=NULL); //factor should have been called first
-    X = solver().solve(B);
-    return solver().info() == Eigen::Success;
-  }
-protected:
-  const typename Matrix::EigenType* m_mat;
-  boost::shared_ptr<EigenSolverT> m_solver_sptr;
-
-};
-
-//specilization of the solver for BiCGSTAB as for surface parameterization, the 
-//intializer should be a vector of one's (this was the case in 3.1-alpha but not in the official 3.1).
-template<>
-class Eigen_solver_traits< Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> >
-{
-  typedef Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> EigenSolverT;
-  typedef EigenSolverT::Scalar Scalar;
-// Public types
-public:
-   typedef Scalar                                                       NT;
-   typedef internal::Get_eigen_matrix<EigenSolverT,NT>::type   Matrix;
-   typedef Eigen_vector<Scalar>                                         Vector;
-   
-
-// Public operations
-public:
-
-   Eigen_solver_traits(): m_solver_sptr(new EigenSolverT)
-   {
-   }
-   
-   EigenSolverT& solver() { return *m_solver_sptr; }
-
-   /// Solve the sparse linear system "A*X = B".
-   /// Return true on success. The solution is then (1/D) * X.
-   ///
-   /// @commentheading Preconditions:
-   /// - A.row_dimension()    == B.dimension().
-   /// - A.column_dimension() == X.dimension().
-   bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D)
-   {
-      D = 1;          // Eigen does not support homogeneous coordinates
-
-      m_solver_sptr->compute(A.eigen_object());
-       
-      if(m_solver_sptr->info() != Eigen::Success)
-         return false;
-      
-      X.setOnes(B.rows());
-      X = m_solver_sptr->solveWithGuess(B,X);
-
-      return m_solver_sptr->info() == Eigen::Success;
-   }
-protected:
-  boost::shared_ptr<EigenSolverT> m_solver_sptr;
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_EIGEN_SOLVER_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_triangle_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Env_triangle_traits_3.h
deleted file mode 100644
index 17cf063..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Env_triangle_traits_3.h
+++ /dev/null
@@ -1,1666 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Michal Meyerovitch     <gorgymic at post.tau.ac.il>
-//                 Baruch Zukerman        <baruchzu at post.tau.ac.il>
-
-/*! \file CGAL/Envelope_triangles_traits_3.h
- * \brief Model for CGAL's EnvelopeTraits_3 concept.
- * \endlink
- */
-
-#ifndef CGAL_ENV_TRIANGLE_TRAITS_3_H
-#define CGAL_ENV_TRIANGLE_TRAITS_3_H
-
-#include <CGAL/Object.h>
-#include <CGAL/enum.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Envelope_3/Envelope_base.h>
-
-#include <vector>
-
-namespace CGAL {
-
-template <class Kernel_> class Env_triangle_3;
-
-// this traits class supports both triagles and segments in 3d
-template <class Kernel_>
-class Env_triangle_traits_3 : public Arr_segment_traits_2<Kernel_>
-{
-public:
-  typedef Arr_segment_traits_2<Kernel_>             Traits_2;
-  typedef typename Traits_2::Point_2                Point_2;
-  typedef typename Traits_2::X_monotone_curve_2     X_monotone_curve_2;
-  typedef typename Traits_2::Multiplicity           Multiplicity;
-
-  typedef Kernel_                                   Kernel;
-  typedef Env_triangle_traits_3<Kernel>             Self;
-
-  typedef typename Kernel::Point_3                  Point_3;
-
-  /*!
-   * \class Representation of a 3d triangle with cached data.
-   */
-  class _Triangle_cached_3 
-  {
-  public:
-
-    typedef typename Kernel::Plane_3               Plane_3;
-    typedef typename Kernel::Triangle_3            Triangle_3;
-    typedef typename Kernel::Point_3               Point_3;
-    typedef typename Kernel::Segment_3             Segment_3;
-
-  protected:
-
-    Plane_3 pl;          // The plane that supports the triangle.
-    Point_3 vertices[3]; // The vertices of the triangle.
-    bool    is_vert;     // Is this a vertical triangle (or a segment).
-    bool    is_seg;  // Is this a segment.
-  public:
-
-    /*!
-     * Default constructor.
-     */
-    _Triangle_cached_3() :
-      is_vert(false),
-      is_seg(false)
-    {}
-
-    /*!
-     * Constructor from a non-degenerate triangle.
-     * \param tri The triangle.
-     * \pre The triangle is not degenerate.
-     */
-    _Triangle_cached_3(const Triangle_3 & tri)
-    {
-      Kernel   kernel;
-      CGAL_assertion(!kernel.is_degenerate_3_object()(tri));
-
-      typename Kernel::Construct_vertex_3
-        construct_vertex = kernel.construct_vertex_3_object();
-
-      vertices[0] = construct_vertex(tri, 0);
-      vertices[1] = construct_vertex(tri, 1);
-      vertices[2] = construct_vertex(tri, 2);
-
-      pl = kernel.construct_plane_3_object()(vertices[0],
-                                             vertices[1], vertices[2]);
-      Self self;
-      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
-                                            self.project(vertices[1]),
-                                            self.project(vertices[2]));
-      is_seg = false;
-    }
-
-    /*!
-     * Construct a triangle from three non-collinear end-points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \param p3 The third point.
-     * \pre The 3 endpoints are not the collinear.
-     */
-    _Triangle_cached_3(const Point_3 &p1, const Point_3 &p2,
-                       const Point_3 &p3)
-    {
-      Kernel   kernel;
-      CGAL_assertion(!kernel.collinear_3_object()(p1, p2, p3));
-      
-      vertices[0] = p1;
-      vertices[1] = p2;
-      vertices[2] = p3;
-
-      pl = kernel.construct_plane_3_object()(vertices[0],
-                                             vertices[1],
-                                             vertices[2]);
-      Self self;
-      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
-                                            self.project(vertices[1]),
-                                            self.project(vertices[2]));
-      is_seg = false;
-    }
-
-    /*!
-     * Construct a triangle from 3 end-points on a supporting plane.
-     * \param supp_plane The supporting plane.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \param p3 The third point.
-     * \pre The 3 endpoints are not the collinear and all lie on the given
-     *      plane.
-     */
-    _Triangle_cached_3(const Plane_3& supp_plane,
-                       const Point_3 &p1,
-                       const Point_3 &p2,
-                       const Point_3 &p3) :
-      pl(supp_plane)
-    {
-      Kernel   kernel;
-
-      CGAL_precondition(kernel.has_on_3_object() (pl, p1) &&
-                        kernel.has_on_3_object() (pl, p2) &&
-                        kernel.has_on_3_object() (pl, p3));      
-      CGAL_precondition(!kernel.collinear_3_object()(p1, p2, p3));
-
-      vertices[0] = p1;
-      vertices[1] = p2;
-      vertices[2] = p3;
-
-      Self self;
-      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
-                                            self.project(vertices[1]),
-                                            self.project(vertices[2]));
-      is_seg = false;
-    }
-
-    /*!
-     * Constructor from a segment.
-     * \param seg The segment.
-     * \pre The segment is not degenerate.
-     */
-    _Triangle_cached_3(const Segment_3 & seg)
-    {
-      Kernel   kernel;
-      CGAL_assertion(!kernel.is_degenerate_3_object()(seg));
-
-      typename Kernel::Construct_vertex_3
-        construct_vertex = kernel.construct_vertex_3_object();
-
-      vertices[0] = construct_vertex(seg, 0);
-      vertices[1] = construct_vertex(seg, 1);
-      vertices[2] = vertices[1];
-
-      is_vert = true;
-      is_seg = true;
-
-      // construct a vertical plane through the segment
-      Point_3 tmp(vertices[0].x(), vertices[0].y(), vertices[0].z()-1);
-      pl = kernel.construct_plane_3_object()(vertices[0],
-                                             vertices[1], tmp);
-
-    }
-
-    /*!
-     * Constructor from two points.
-     * \param p1 The first point.
-     * \param p2 The second point.
-     * \param seg The segment.
-     * \pre The segment between the points is not degenerate.
-     */
-    _Triangle_cached_3(const Point_3 &p1, const Point_3 &p2)
-    {
-      Kernel   kernel;
-      CGAL_assertion(!kernel.equal_3_object()(p1, p2));
-
-      vertices[0] = p1;
-      vertices[1] = p2;
-      vertices[2] = p2;
-
-      is_vert = true;
-      is_seg = true;
-
-      // construct a vertical plane through the segment
-      Point_3 tmp(vertices[0].x(), vertices[0].y(), vertices[0].z()-1);
-      pl = kernel.construct_plane_3_object()(vertices[0],
-                                             vertices[1], tmp);
-
-    }
-
-    /*!
-     * Assignment operator.
-     * \param tri the source triangle to copy from
-     */
-    const _Triangle_cached_3& operator=(const Triangle_3 &tri)
-    {
-      Kernel   kernel;
-      CGAL_assertion(!kernel.is_degenerate_3_object()(tri));
-
-      typename Kernel_::Construct_vertex_3
-        construct_vertex = kernel.construct_vertex_3_object();
-
-      vertices[0] = construct_vertex(tri, 0);
-      vertices[1] = construct_vertex(tri, 1);
-      vertices[2] = construct_vertex(tri, 2);
-
-      pl = kernel.construct_plane_3_object()(vertices[0],
-                                             vertices[1], vertices[2]);
-      Self self;
-      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
-                                            self.project(vertices[1]),
-                                            self.project(vertices[2]));
-      is_seg = false;
-      
-      return (*this);
-    }
-
-    /*!
-     * Get the ith endpoint.
-     */
-    const Point_3& vertex(unsigned int i) const
-    {
-      return vertices[i%3];
-    }
-
-    /*!
-     * Get the supporting plane.
-     */
-    const Plane_3& plane() const
-    {
-      return (pl);
-    }
-
-    /*!
-     * Check if the triangel is vertical.
-     */
-    bool is_vertical() const
-    {
-      return (is_vert);
-    }
-
-    /*!
-     * Check if the surface is a segment.
-     */
-    bool is_segment() const
-    {
-      return (is_seg);
-    }
-
-    /*!
-     * Check if the surface is xy-monotone (false, if it is a vertical
-     * triangle)
-     */
-    bool is_xy_monotone() const
-    {
-      return (!is_vertical() || is_segment());
-    }
-  };
-
-public:
-
-  // types for EnvelopeTraits_3 concept
-  //! type of xy-monotone surfaces
-  typedef Env_triangle_3<Kernel>                    Xy_monotone_surface_3;
-  //! type of surfaces
-  typedef Xy_monotone_surface_3                     Surface_3;
-
-  // we have a collision between the Kernel's Intersect_2 and the one
-  // from the segment traits
-  typedef typename Traits_2::Intersect_2            Intersect_2;
-
-protected:
-  typedef typename Kernel::FT                       FT;
-  typedef typename Kernel::Triangle_2               Triangle_2;
-  typedef typename Kernel::Segment_2                Segment_2;
-
-  typedef typename Kernel::Segment_3                Segment_3;
-  typedef typename Kernel::Triangle_3               Triangle_3;
-  typedef typename Kernel::Plane_3                  Plane_3;
-
-  typedef typename Kernel::Assign_2                 Assign_2;
-  typedef typename Kernel::Construct_vertex_2       Construct_vertex_2;
-
-  typedef typename Kernel::Assign_3                 Assign_3;
-  typedef typename Kernel::Intersect_3              Intersect_3;
-  typedef typename Kernel::Construct_vertex_3       Construct_vertex_3;
-
-
-  typedef typename Kernel::Line_2                   Line_2;
-  typedef typename Kernel::Direction_2              Direction_2;
-
-  typedef typename Kernel::Line_3                   Line_3;
-  typedef typename Kernel::Direction_3              Direction_3;
-
-  typedef std::pair<X_monotone_curve_2,
-                    Multiplicity>                   Intersection_curve;
-public:
-
-  /***************************************************************************/
-  // EnvelopeTraits_3 functors
-  /***************************************************************************/
-
-  /*!\brief
-   * Subdivide the given surface into envelope relevant xy-monotone 
-   * parts, and insert them into the output iterator.
-   * 
-   * The iterator value-type is Xy_monotone_surface_3
-   */
-  class Make_xy_monotone_3
-  {
-  protected:
-    const Self * parent;
-
-  public:
-    Make_xy_monotone_3(const Self * p) : parent(p)
-    {}
-    // create xy-monotone surfaces from a general surface
-    // return a past-the-end iterator
-    template <class OutputIterator>
-    OutputIterator operator()(const Surface_3& s,
-                              bool is_lower,
-                              OutputIterator o) const
-    {
-      m_is_lower = is_lower;
-
-      // a non-vertical triangle is already xy-monotone
-      if (!s.is_vertical())
-        *o++ = s;
-      else
-      {        
-        // split a vertical triangle into one or two segments
-        const Point_3 &a1 = s.vertex(0),
-                       a2 = s.vertex(1),
-                       a3 = s.vertex(2);
-        Point_2 b1 = parent->project(a1),
-                b2 = parent->project(a2),
-                b3 = parent->project(a3);
-        Kernel k;
-        if (k.collinear_are_ordered_along_line_2_object()(b1, b2, b3))
-        {
-          if (k.equal_2_object()(b1, b2))
-            // only one segment in the output - the vertical does not count
-            *o++ = Xy_monotone_surface_3(find_envelope_point(a1, a2), a3);
-          else if (k.equal_2_object()(b2, b3))
-            *o++ = Xy_monotone_surface_3(a1, find_envelope_point(a2, a3));
-          else
-            // check whether two or one segments appear on the envelope
-            return find_envelope_segments(a1, a2, a3, s.plane(), o);
-        }
-        else if (k.collinear_are_ordered_along_line_2_object()(b1, b3, b2))
-        {
-          if (k.equal_2_object()(b1, b3))
-            // only one segment in the output
-            *o++ = Xy_monotone_surface_3(find_envelope_point(a1, a3), a2);
-          else
-            // check whether two or one segments appear on the envelope
-            return find_envelope_segments(a1, a3, a2, s.plane(), o);
-        }
-        else
-        {
-          // check whether two or one segments appear on the envelope
-          return find_envelope_segments(a2, a1, a3, s.plane(), o);
-        }
-
-      }
-      return o;
-    }
-
-  protected:
-    // find the envelope point among the two points with same xy coordinates
-    const Point_3& find_envelope_point (const Point_3& p1,
-                                        const Point_3& p2) const
-    {
-      CGAL_precondition(p1.x() == p2.x() && p1.y() == p2.y());
-      Kernel k;
-      Comparison_result cr = k.compare_z_3_object()(p1, p2);
-      CGAL_assertion(cr != EQUAL);
-      if ((m_is_lower && cr == SMALLER) ||
-          (!m_is_lower && cr == LARGER))
-        return p1;
-      else
-        return p2;      
-    }
-
-    // get the three triangle coordinates (ordered along 2d-line) and find
-    // which segment(s) is(are) the envelope of this triangle
-    // "plane" is the vertical plane on which the triangle lies
-    template <class OutputIterator>
-    OutputIterator find_envelope_segments(const Point_3& p1,
-                                          const Point_3& p2,
-                                          const Point_3& p3,
-                                          const Plane_3& plane,
-                                          OutputIterator o) const
-    {
-      // our vertical plane is a*x + b*y + d = 0
-      FT a = plane.a(), b = plane.b();
-      CGAL_precondition(plane.c() == 0);
-
-      // if the plane was parallel to the yz-plane (i.e x = const),
-      // then it was enough to use the y,z coordinates as in the 2-dimensional
-      // case, to find whether a 2d point lies below/above/on a line
-      // this test is simply computing the sign of:
-      //    (1)    [(y3 - y1)(z2 - z1) - (z3 - z1)(y2 - y1)] * sign(y3 - y1)
-      // abd comparing to 0, where pi = (xi, yi, zi), and p2 is compared to the
-      // line formed by p1 and p3 (in the direction p1 -> p3)
-      //
-      // for general vertical plane, we change (x, y) coordinates to (v, w),
-      // (keeping the z-coordinate as is)
-      // so the plane is parallel to the wz-plane in the new coordinates
-      // (i.e v = const).
-      //
-      // ( v )  =  A ( x )    where A = (  a  b )
-      //   w           y                  -b  a
-      //
-      // so v =  a*x + b*y
-      //    w = -b*x + a*y
-      //
-      // Putting the new points coordinates in equation (1) we get:
-      //    (2)    (w3 - w1)(z2 - z1) - (z3 - z1)(w2 - w1) =
-      //           (-b*x3 + a*y3 + b*x1 - a*y1)(z2 - z1) - 
-      //                                 (z3 - z1)(-b*x2 + a*y2 + b*x1 - a*y1)
-      //
-      FT w1 = a*p1.y() - b*p1.x(),
-         w2 = a*p2.y() - b*p2.x(),
-         w3 = a*p3.y() - b*p3.x();
-      
-      Sign s1 = CGAL::sign((w3 - w1)*(p2.z() - p1.z()) - 
-                           (p3.z() - p1.z())*(w2 - w1));
-
-      // the points should not be collinear
-      CGAL_assertion(s1 != 0);
-
-      // should also take care for the original and trasformed direction of
-      // the segment
-      Sign s2 = CGAL_NTS sign(w3 - w1);
-      Sign s = CGAL_NTS sign(int(s1 * s2));
-                  
-      bool use_one_segment = true;
-      if ((m_is_lower  && s == NEGATIVE) ||
-          (!m_is_lower && s == POSITIVE))
-        use_one_segment = false;
-
-      if (use_one_segment)
-      {
-        *o++ = Xy_monotone_surface_3(p1, p3);
-      }
-      else
-      {
-        *o++ = Xy_monotone_surface_3(p1, p2);
-        *o++ = Xy_monotone_surface_3(p2, p3);
-      }
-      return o;
-    }
-
-    mutable bool m_is_lower;
-  };
-
-  /*! Get a Make_xy_monotone_3 functor object. */
-  Make_xy_monotone_3
-  make_xy_monotone_3_object() const
-  {
-    return Make_xy_monotone_3(this);
-  }
-
-  /*!\brief
-   * Insert all 2D curves, which form the boundary of the vertical
-   * projection of the surface onto the xy-plane, into the output iterator.
-   * The iterator value-type is X_monotone_curve_2.
-   */
-  class Construct_projected_boundary_2
-  {
-  protected:
-    const Self *parent;
-  public:
-
-    Construct_projected_boundary_2(const Self* p)
-      : parent(p)
-    {}
-
-    // insert into the OutputIterator all the (2d) curves of the boundary of
-    // the vertical projection of the surface on the xy-plane
-    // the OutputIterator value type is X_monotone_curve_2
-    template <class OutputIterator>
-    OutputIterator operator()(const Xy_monotone_surface_3& s,
-                              OutputIterator o) const
-    {
-      // the input xy-monotone surface should be either non-vertical or
-      // a segment
-      CGAL_assertion(s.is_xy_monotone());
-      
-      if (!s.is_vertical())
-      {
-        // the projection is a triangle
-        const Point_3 &a1 = s.vertex(0),
-                       a2 = s.vertex(1),
-                       a3 = s.vertex(2);
-        Point_2 b1 = parent->project(a1),
-                b2 = parent->project(a2),
-                b3 = parent->project(a3);
-
-        Kernel k;
-
-        X_monotone_curve_2 A(b1, b2);
-        X_monotone_curve_2 B(b2, b3);
-        X_monotone_curve_2 C(b3, b1);
-
-        const Line_2& l1 = 
-          (A.is_directed_right()) ? A.line() : A.line().opposite();
-        const Line_2& l2 = 
-          (B.is_directed_right()) ? B.line() : B.line().opposite();
-        const Line_2& l3 = 
-          (C.is_directed_right()) ? C.line() : C.line().opposite();
-
-        Oriented_side s1 = k.oriented_side_2_object()(l1, b3);
-        Oriented_side s2 = k.oriented_side_2_object()(l2, b1);
-        Oriented_side s3 = k.oriented_side_2_object()(l3, b2);
-
-        CGAL_assertion(s1 != ON_ORIENTED_BOUNDARY && 
-                       s2 != ON_ORIENTED_BOUNDARY &&
-                       s3 != ON_ORIENTED_BOUNDARY);
-        
-        *o++ = make_object(std::make_pair(A, s1));
-        *o++ = make_object(std::make_pair(B, s2));
-        *o++ = make_object(std::make_pair(C, s3));
-      }
-      else
-      {
-        // s is a segment, and so is its projection
-        // s shouldn't be a z-vertical segment
-        const Point_3 &a1 = s.vertex(0),
-                       a2 = s.vertex(1);
-        
-        Point_2 b1 = parent->project(a1),
-                b2 = parent->project(a2);
-        CGAL_assertion(b1 != b2);
-                
-        *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2), 
-                                          ON_ORIENTED_BOUNDARY));
-      }
-      return o;
-    }  
-  };  
-  
-  /*! Get a Construct_projected_boundary_curves_2 functor object. */
-  Construct_projected_boundary_2
-  construct_projected_boundary_2_object() const
-  {
-    return Construct_projected_boundary_2(this);
-  }
-
-  /*!\brief
-   * Insert all the 2D projections (onto the xy-plane) of the 
-   * intersection objects between s1 and s2 into the output iterator.
-   *
-   * The iterator value-type is Object. An Object may be:
-   * 1. A pair<X_monotone_curve_2,Intersection_type>, where the intersection 
-   * type is an enumeration that can take the values
-   * {Transversal, Tangency, Unknown}.
-   * 2. A Point_2 instance (in degenerate cases).
-   */
-  class Construct_projected_intersections_2
-  {
-  protected:
-    const Self *parent;
-  public:
-
-    Construct_projected_intersections_2(const Self* p)
-      : parent(p)
-    {}
-    
-    // insert into OutputIterator all the (2d) projections on the xy plane of
-    // the intersection objects between the 2 surfaces
-    // the data type of OutputIterator is Object
-    template <class OutputIterator>
-    OutputIterator operator()(const Xy_monotone_surface_3& s1,
-                              const Xy_monotone_surface_3& s2,
-                              OutputIterator o) const
-    {
-      CGAL_assertion(s1.is_xy_monotone() && s2.is_xy_monotone());
-      
-      Kernel k;
-      if (!parent->do_intersect(s1, s2))
-      {
-        return o;
-      }
-        
-      Object inter_obj = parent->intersection(s1,s2);
-      if (inter_obj.is_empty())
-      {
-        return o;
-      }
-
-      Point_3 point;
-      Segment_3 curve;
-      if (k.assign_3_object()(point, inter_obj))
-        *o++ = make_object(parent->project(point));
-      else
-      {
-        CGAL_assertion_code(bool b = )
-        k.assign_3_object()(curve, inter_obj);
-        CGAL_assertion(b);
-
-        Segment_2  proj_seg = parent->project(curve);
-        if (! k.is_degenerate_2_object() (proj_seg))
-        {
-          Intersection_curve inter_cv (proj_seg, 1);
-          *o++ = make_object(inter_cv);
-        }
-        else
-        {
-          const Point_2&  p = k.construct_point_on_2_object() (proj_seg, 0);
-          *o++ = make_object(p);
-        }
-      }
-
-      return o;
-    }  
-  };  
-
-  /*! Get a Construct_projected_intersections_2 functor object. */
-  Construct_projected_intersections_2
-  construct_projected_intersections_2_object() const
-  {
-    return Construct_projected_intersections_2(this);
-  }
-
-  /*!\brief
-   * Check if the surface s1 is closer/equally distanced/farther 
-   * from the envelope with respect to s2 at the xy-coordinates of p/c.
-   */
-  class Compare_z_at_xy_3
-  {
-  protected:
-    const Self *parent;
-
-  public:
-
-    Compare_z_at_xy_3(const Self* p)
-      : parent(p)
-    {}
-
-    // check which of the surfaces is closer to the envelope at the xy 
-    // coordinates of point
-    // (i.e. lower if computing the lower envelope, or upper if computing 
-    // the upper envelope)
-    // precondition: the surfaces are defined in point
-    Comparison_result operator()(const Point_2& p,
-                                 const Xy_monotone_surface_3& surf1,
-                                 const Xy_monotone_surface_3& surf2) const
-    {      
-      // we compute the points on the planes, and then compare their z 
-      // coordinates
-      const Plane_3& plane1 = surf1.plane();
-      const Plane_3& plane2 = surf2.plane();
-
-      // if the 2 triangles have the same supporting plane, and they are not 
-      // vertical, then they have the same z coordinate over this point
-      if ((plane1 == plane2 || plane1 == plane2.opposite()) &&
-          !surf1.is_vertical())
-      {
-        return EQUAL;
-      }
-
-      Kernel k;
-
-      // Compute the intersetion between the vertical line and the given 
-      // surfaces
-      Point_3 ip1 = parent->envelope_point_of_surface(p, surf1);
-      Point_3 ip2 = parent->envelope_point_of_surface(p, surf2);
-      
-      return k.compare_z_3_object()(ip1, ip2);
-    }
-
-    // check which of the surfaces is closer to the envelope at the xy 
-    // coordinates of cv
-    // (i.e. lower if computing the lower envelope, or upper if computing the
-    // upper envelope)
-    // precondition: the surfaces are defined in all points of cv, 
-    //               and the answer is the same for each of these points
-    Comparison_result operator()(const X_monotone_curve_2& cv,
-                                 const Xy_monotone_surface_3& surf1,
-                                 const Xy_monotone_surface_3& surf2) const
-    {      
-      // first try the endpoints, if cannot be sure, use the mid point
-      Comparison_result res;
-      res = parent->compare_z_at_xy_3_object()(cv.left(), surf1, surf2);
-
-      if (res == EQUAL)
-      {
-        res = parent->compare_z_at_xy_3_object()(cv.right(), surf1, surf2);
-        if (res == EQUAL)
-        {
-          Point_2 mid = parent->construct_middle_point(cv);
-          res = parent->compare_z_at_xy_3_object()(mid, surf1, surf2);
-        }
-      }
-      
-      return res;
-    }
-  
-  };
-   
-  /*! Get a Compare_z_at_xy_3 functor object. */
-  Compare_z_at_xy_3 
-  compare_z_at_xy_3_object() const
-  {
-    return Compare_z_at_xy_3(this);
-  }
-
-  /*!\brief 
-   * Check if the surface s1 is closer/equally distanced/farther 
-   * from the envelope with
-   * respect to s2 immediately above the curve c. 
-   */
-  class Compare_z_at_xy_above_3
-  {
-  protected:
-    const Self *parent;
-
-  public:
-
-    Compare_z_at_xy_above_3(const Self* p)
-      : parent(p)
-    {}
-    
-    // check which of the surfaces is closer to the envelope on the points 
-    // above the curve cv
-    // (i.e. lower if computing the lower envelope, or upper if computing the
-    // upper envelope)
-    // precondition: the surfaces are defined above cv (to the left of cv, 
-    //               if cv is directed from min point to max point)
-    //               the choise between surf1 and surf2 for the envelope is 
-    //               the same for every point in the infinitesimal region 
-    //               above cv 
-    //               the surfaces are EQUAL over the curve cv
-    Comparison_result
-    operator()(const X_monotone_curve_2& cv,
-               const Xy_monotone_surface_3& surf1,
-               const Xy_monotone_surface_3& surf2) const
-    {
-      // a vertical surface cannot be defined in the infinitesimal region above
-      // a curve
-      CGAL_precondition(!surf1.is_vertical());
-      CGAL_precondition(!surf2.is_vertical());
-
-      CGAL_precondition(parent->compare_z_at_xy_3_object()
-                              (cv, surf1, surf2) == EQUAL);
-      CGAL_precondition(parent->compare_z_at_xy_3_object()
-                              (cv.source(), surf1, surf2) == EQUAL);
-      CGAL_precondition(parent->compare_z_at_xy_3_object()
-                              (cv.target(), surf1, surf2) == EQUAL);
-
-      
-      if (parent->do_overlap(surf1, surf2))
-      {
-        return EQUAL;
-      }
-
-      // now we must have 2 different non-vertical planes:
- 	    // plane1: a1*x + b1*y + c1*z + d1 = 0  , c1 != 0
- 	    // plane2: a2*x + b2*y + c2*z + d2 = 0  , c2 != 0
-
-      const Plane_3& plane1 = surf1.plane();
-      const Plane_3& plane2 = surf2.plane();
-
-      FT a1 = plane1.a(), b1 = plane1.b(), c1 = plane1.c();
-      FT a2 = plane2.a(), b2 = plane2.b(), c2 = plane2.c();
-
- 	    // our line is a3*x + b3*y + c3 = 0
- 	    // it is assumed that the planes intersect over this line
-      const Line_2& line = cv.line(); 
-      FT a3 = line.a(), b3 = line.b(), c3 = line.c();
-
-      // if the line was parallel to the y-axis (i.e x = const),
-      // then it was enough to compare dz/dx of both planes
-      // for general line, we change coordinates to (v, w), preserving
-      // orientation, so the line is the w-axis in the new coordinates
-      // (i.e v = const).
-      //
-      // ( v )  =  A ( x )    where A = (  a3  b3 )
-      //   w           y                  -b3  a3
-      //
-      // so v =  a3*x + b3*y
-      //    w = -b3*x + a3*y
-      // preserving orientation since detA = a3^2 +b3^2 > 0
-      //
-      // We compute the planes equations in the new coordinates
-      // and compare dz/dv
-      //
-      // ( x )  =  A^(-1) ( v )    where A^(-1) = ( a3  -b3 ) * detA^(-1)
-      //   y                w                       b3   a3
-      // so x = (a3*v - b3*w)*(1/detA)
-      //    y = (b3*v + a3*w)*(1/detA)
-      // plane1 ==> (a1a3 + b1b3)v + (b1a3 - a1b3)w + (c1z + d1)*detA = 0
-      // plane2 ==> (a2a3 + b2b3)v + (b2a3 - a2b3)w + (c2z + d2)*detA = 0
-      //
-      // dz/dv(1) = (-a1a3 - b1b3) / c1*detA
-      // dz/dv(2) = (-a2a3 - b2b3) / c2*detA
-      // since detA>0 we can omit it.
-      //
-      Sign s1 = CGAL_NTS sign((a2*a3+b2*b3)/c2-(a1*a3+b1*b3)/c1);
-      
-      // We only need to make sure that w is in the correct direction
-      // (going from down to up)
-      // the original segment endpoints p1=(x1,y1) and p2=(x2,y2)
-      // are transformed to (v1,w1) and (v2,w2), so we need that w2 > w1
-      // (otherwise the result should be multiplied by -1)
-      
-      const Point_2& p1 = cv.left();
-      const Point_2& p2 = cv.right();
-      FT x1 = p1.x(), y1 = p1.y(), x2 = p2.x(), y2 = p2.y();
-
-      Sign s2 = CGAL_NTS sign(-b3*x1+a3*y1-(-b3*x2+a3*y2));
-      return s1 * s2;
-    }  
-  };
-
-
-  /*! Get a Compare_z_at_xy_above_3 functor object. */
-  Compare_z_at_xy_above_3
-  compare_z_at_xy_above_3_object() const
-  {
-    return Compare_z_at_xy_above_3(this);
-  }
-
-  /*!\brief 
-   * Check if the surface s1 is closer/equally distanced/farther 
-   * from the envelope with
-   * respect to s2 immediately below the curve c. 
-   */
-  class Compare_z_at_xy_below_3
-  {
-  protected:
-    const Self *parent;
-
-  public:
-
-    Compare_z_at_xy_below_3(const Self* p)
-      : parent(p)
-    {}
-    
-    Comparison_result
-    operator()(const X_monotone_curve_2& cv,
-               const Xy_monotone_surface_3& surf1,
-               const Xy_monotone_surface_3& surf2) const
-    {
-      Comparison_result left_res = 
-        parent->compare_z_at_xy_above_3_object()(cv, surf1, surf2);
-      return CGAL::opposite(left_res);
-
-      /*if (left_res == LARGER)
-        return SMALLER;
-      else if (left_res == SMALLER)
-        return LARGER;
-      else
-        return EQUAL;*/
-    }  
-  };
-
-  /*! Get a Compare_z_at_xy_below_3 functor object. */
-  Compare_z_at_xy_below_3
-  compare_z_at_xy_below_3_object() const
-  {
-    return Compare_z_at_xy_below_3(this);
-  }
-
-  /***************************************************************************/
-
-//  // checks if xy-monotone surface is vertical
-//  class Is_vertical_3
-//  {
-//  public:
-//
-//    bool operator()(const Xy_monotone_surface_3& s) const
-//    {
-//      return false;
-//    }
-//  };
-//
-//  /*! Get a Is_vertical_3 functor object. */
-//  Is_vertical_3 is_vertical_3_object() const
-//  {
-//    return Is_vertical_3();
-//  }
-  
-  /***************************************************************************/
-
-  // public method needed for testing
-
-  // checks if point is in the xy-range of surf
-  class Is_defined_over
-  {
-  public:
-    // checks if point is in the xy-range of surf
-    bool operator()(const Point_2& point, 
-		    const Xy_monotone_surface_3& surf) const
-
-    {
-      Kernel k;
-      Self parent;
-
-      // project the surface on the plane
-      Triangle_2 boundary = parent.project(surf);
-
-      // if surface is not vertical (i.e. boundary is not degenerate)
-      // check if the projected point is inside the projected boundary
-      if (!k.is_degenerate_2_object()(boundary))
-        return (!k.has_on_unbounded_side_2_object()(boundary, point));
-
-      // if surface is vertical, we check if the point is collinear
-      // with the projected vertices, and on one of the projected segments
-      // of the boundary
-      Point_2 v1 = k.construct_vertex_2_object()(boundary, 0);
-      Point_2 v2 = k.construct_vertex_2_object()(boundary, 1);
-      Point_2 v3 = k.construct_vertex_2_object()(boundary, 2);
-
-      if (!k.collinear_2_object()(v1, v2, point))
-        return false;
-
-      // enough to check 2 edges, because the 3rd is part of their union
-      return (k.collinear_are_ordered_along_line_2_object()(v1, point, v2) ||
-              k.collinear_are_ordered_along_line_2_object()(v2, point, v3));
-
-    }
-  };
-
-  /*! Get a Is_defined_over functor object. */
-  Is_defined_over is_defined_over_object() const
-  {
-    return Is_defined_over();
-  }
-
-  Segment_2 project (const Segment_3& seg) const
-  {
-    typedef typename Kernel::Construct_vertex_3 Construct_vertex_3;
-    
-    Kernel              k;
-    Construct_vertex_3  vertex_on = k.construct_vertex_3_object();
-
-    const Point_3      q0 = (vertex_on (seg, 0));
-    const Point_3      q1 = (vertex_on (seg, 1));
-    const Point_2      p0 (q0.x(), q0.y());
-    const Point_2      p1 (q1.x(), q1.y());
-    
-    return (k.construct_segment_2_object() (p0, p1));
-  }
-
-  Point_2 project(const Point_3& obj) const
-  {
-    return Point_2(obj.x(), obj.y());
-  }
-  
-  Triangle_2 project(const Xy_monotone_surface_3& triangle_3) const
-  {
-    const Point_3&  end1 = triangle_3.vertex(0),
-                    end2 = triangle_3.vertex(1),
-                    end3 = triangle_3.vertex(2);
-    Point_2 projected_end1(end1.x(), end1.y()),
-            projected_end2(end2.x(), end2.y()),
-
-            projected_end3(end3.x(), end3.y());
-    return Triangle_2(projected_end1, projected_end2, projected_end3);
-  }
-
-  // triangles overlap if they lie on the same plane and intersect on it.
-  // this test is only needed for non-vertical triangles
-  bool do_overlap(const Xy_monotone_surface_3& s1, 
-		              const Xy_monotone_surface_3& s2) const
-  {
-    CGAL_precondition(s1.is_xy_monotone() && !s1.is_vertical());
-    CGAL_precondition(s2.is_xy_monotone() && !s2.is_vertical());
-
-    Kernel k;
-    if (!k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
-                                   static_cast<Triangle_3>(s2)))
-      return false;
-
-    // check if they are coplanar
-    Point_3 a1 = s1.vertex(0),
-            b1 = s1.vertex(1),
-            c1 = s1.vertex(2);
-    Point_3 a2 = s2.vertex(0),
-            b2 = s2.vertex(1),
-            c2 = s2.vertex(2);
-    bool b = k.coplanar_3_object()(a1, b1, c1, a2);
-    if (!b) return false;
-
-    b = k.coplanar_3_object()(a1, b1, c1, b2);
-    if (!b) return false;
-
-    b = k.coplanar_3_object()(a1, b1, c1, c2);
-    return b;    
-  }
-
-  // check whethe two xy-monotone surfaces (3D-triangles or segments)
-  // intersect
-  bool do_intersect(const Xy_monotone_surface_3& s1,
-                    const Xy_monotone_surface_3& s2) const
-  {
-    CGAL_precondition(s1.is_xy_monotone());
-    CGAL_precondition(s2.is_xy_monotone());
-    Kernel k;
-    if (!s1.is_segment() && !s2.is_segment())
-      return k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
-                                       static_cast<Triangle_3>(s2));
-    else if (!s1.is_segment())
-      return k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
-                                       static_cast<Segment_3>(s2));
-    else if (!s2.is_segment())
-      return k.do_intersect_3_object()(static_cast<Segment_3>(s1),
-                                       static_cast<Triangle_3>(s2));
-    else
-      // in case of two segments, we don't use easy do-intersect test
-      return true;
-  }
-  
-  // intersect two xy-monotone surfaces (3D-triangles or segments)
-  // if the triangles overlap, the result is empty
-  // the result can be a segment or a point
-  Object intersection(const Xy_monotone_surface_3& s1, 
-                      const Xy_monotone_surface_3& s2) const
-  {
-    CGAL_precondition(s1.is_xy_monotone());
-    CGAL_precondition(s2.is_xy_monotone());
-    Kernel k;
-
-    // first, try to intersect the bounding boxes of the triangles,
-    // efficiently return empty object when the triangles are faraway
-    if (!CGAL::do_overlap(s1.bbox(), s2.bbox()))
-      return Object();
-
-    // if intersecting two segment - alculate the intersection
-    // as in the case of dimention 2
-    if (s1.is_segment() && s2.is_segment())
-    {
-      Object res = intersection_of_segments(s1, s2);
-      return res;
-    }
-  
-    // if both triangles lie on the same (non-vertical) plane, they overlap
-    // we don't care about overlaps, because they are not passed to the
-    // algorithm anyway, so we save the costly computation
-    Plane_3 p1 = s1.plane();
-    Plane_3 p2 = s2.plane();
-    if  (p1 == p2 || p1 == p2.opposite())
-        return Object();
-
-    // calculate intersection between a triangle and the other triangle's 
-    // supporting plane
-    // if there is no intersection - then the triangles have no intersection 
-    // between them.
-    Object inter_obj = intersection(p1, s2);
-      
-    if (inter_obj.is_empty())
-      return Object();
-
-    // otherwise, if the intersection in a point, we should check if it lies
-    // inside the first triangle
-    Assign_3 assign_obj = k.assign_3_object();
-    Point_3 inter_point;
-    if (assign_obj(inter_point, inter_obj))
-    {
-      Object res = intersection_on_plane_3(p1, s1, inter_point);
-      return res;
-    }
-    else
-    {
-      // if the intersection is a segment, we check the intersection of the
-      // other plane-triangle pair
-      Segment_3 inter_seg;
-      CGAL_assertion(assign_obj(inter_seg, inter_obj));
-      assign_obj(inter_seg, inter_obj);
-
-      inter_obj = intersection(p2, s1);
-
-      // if there is no intersection - then the triangles have no intersection 
-      // between them.
-      if (inter_obj.is_empty())
-      	return Object();
-      
-      if (assign_obj(inter_point, inter_obj))
-      {
-      	// if the intersection is a point, which lies on the segment,
-      	// than it is the result,
-      	// otherwise, empty result
-      	 if (k.has_on_3_object()(inter_seg, inter_point))
-      	   return make_object(inter_point);
-      	 else
-      	   return Object();
-      }
-      else
-      {
-      	// both plane-triangle intersections are segments, which are collinear,
-      	// and lie on the line which is the intersection of the two supporting
-      	// planes
-        Segment_3 inter_seg2;
-      	CGAL_assertion(assign_obj(inter_seg2, inter_obj));
-      	assign_obj(inter_seg2, inter_obj);
-	
-      	Point_3 min1 = k.construct_min_vertex_3_object()(inter_seg),
-      	        max1 = k.construct_max_vertex_3_object()(inter_seg);
-      	Point_3 min2 = k.construct_min_vertex_3_object()(inter_seg2),
-      	        max2 = k.construct_max_vertex_3_object()(inter_seg2); 
-
-       	CGAL_assertion((k.collinear_3_object()(min1, min2, max1) &&
-                         k.collinear_3_object()(min1, max2, max1)));
-
-       	// we need to find the overlapping part, if exists
-       	Point_3 min, max;
-       	if (k.less_xyz_3_object()(min1, min2))
-       	  min = min2;
-       	else
-       	  min = min1;
-       	if (k.less_xyz_3_object()(max1, max2))
-       	  max = max1;
-       	else
-       	  max = max2;
-
-       	Object res;
-       	Comparison_result comp_res = k.compare_xyz_3_object()(min, max);
-       	if (comp_res == EQUAL)
-       	  res = make_object(min);
-       	else if (comp_res == SMALLER)
-       	  res = make_object(Segment_3(min, max));
-       	// else - empty result
-
-       	return res;
-      }
-    }
-  }
-
-  // calculate intersection between triangle & point on the same plane plane
-  Object intersection_on_plane_3(const Plane_3& plane,
-                                 const Xy_monotone_surface_3& triangle,
-                                 const Point_3& point) const
-  {
-    Kernel k;
-    CGAL_precondition( triangle.is_xy_monotone() );
-    CGAL_precondition( !k.is_degenerate_3_object()(plane) );
-    CGAL_precondition( triangle.plane() == plane ||
-                       triangle.plane() == plane.opposite());
-    CGAL_precondition( k.has_on_3_object()(plane, point) );
-
-    // if the point is inside the triangle, then the point is the intersection
-    // otherwise there is no intersection
-    bool has_on;
-    if (triangle.is_segment())
-      has_on = k.has_on_3_object()(static_cast<Segment_3>(triangle), point);
-    else
-      has_on = k.has_on_3_object()(static_cast<Triangle_3>(triangle), point);
-    if (has_on)
-      return make_object(point);
-    else
-      return Object();
-  }
-
-  // calculate intersection between 2 segments on the same vertical plane plane
-  Object intersection_of_segments(const Xy_monotone_surface_3& s1,
-                                  const Xy_monotone_surface_3& s2) const
-  {
-    Kernel k;
-    CGAL_precondition( s1.is_xy_monotone() && s1.is_segment());
-    CGAL_precondition( s2.is_xy_monotone() && s2.is_segment());
-
-    // if the segments are not coplanar, they cannot intersect
-    if (!k.coplanar_3_object()(s1.vertex(0), s1.vertex(1),
-                               s2.vertex(0), s2.vertex(1)))
-      return Object();
-
-    const Plane_3& plane = s1.plane();
-    if (s2.plane() != plane &&
-        s2.plane() != plane.opposite())
-      // todo: this case is not needed in the algorithm,
-      // so we don't implement it
-      return Object();
-
-    CGAL_precondition( !k.is_degenerate_3_object()(plane) );
-    CGAL_precondition( s2.plane() == plane ||
-                       s2.plane() == plane.opposite());
-
-    // for simplicity, we transform the segments to the xy-plane,
-    // compute the intersection there, and transform it back to the 3d plane.
-    Point_2 v1 = plane.to_2d(s1.vertex(0)),
-            v2 = plane.to_2d(s1.vertex(1));
-    Segment_2 seg1_t(v1, v2);
-
-  	Point_2 u1 = plane.to_2d(s2.vertex(0)),
-            u2 = plane.to_2d(s2.vertex(1));
-  	Segment_2 seg2_t(u1, u2);
-
-  	Object inter_obj = k.intersect_2_object()(seg1_t, seg2_t);
-  	Assign_2 assign_2 = k.assign_2_object();
-  	if (inter_obj.is_empty())
-  		return inter_obj;
-
-  	Point_2 inter_point;
-    Segment_2 inter_segment;
-
-    if (assign_2(inter_point, inter_obj))
-  	  return make_object(plane.to_3d(inter_point));
-    else
-    {
-      CGAL_assertion_code(bool b = )
-      assign_2(inter_segment, inter_obj);
-      CGAL_assertion(b);
-      
-      return make_object 
-        (Segment_3
-         (plane.to_3d(k.construct_vertex_2_object()(inter_segment, 0)),
-          plane.to_3d(k.construct_vertex_2_object()(inter_segment, 1))));
-    }
-
-  }
-
-  // calculate the intersection between a triangle/segment
-  // and a (non degenerate) plane in 3d
-  // the result object can be empty, a point, a segment or the original
-  // triangle
-  Object intersection(const Plane_3& pl, 
-		                  const Xy_monotone_surface_3& tri) const
-  {
-    Kernel k;
-    CGAL_precondition( tri.is_xy_monotone() );
-    CGAL_precondition( !k.is_degenerate_3_object()(pl) );
-
-    if (tri.is_segment())
-      return k.intersect_3_object()(pl, static_cast<Segment_3>(tri));
-      
-    // first, check for all 3 vertices of tri on which side of pl they lie on
-    int points_on_plane[3];    // contains the indices of vertices that lie 
-                               // on pl
-    int points_on_positive[3]; // contains the indices of vertices that lie on
-                               // the positive side of pl
-    int points_on_negative[3]; // contains the indices of vertices that lie on
-                               // the negative side of pl
-
-    int n_points_on_plane = 0;
-    int n_points_on_positive = 0;
-    int n_points_on_negative = 0;
-
-    Oriented_side side;
-    for (int i=0; i<3; ++i)
-    {
-      side = pl.oriented_side(tri.vertex(i));
-      if (side == ON_NEGATIVE_SIDE)
-        points_on_negative[n_points_on_negative++] = i;
-      else if (side == ON_POSITIVE_SIDE)
-        points_on_positive[n_points_on_positive++] = i;
-      else
-        points_on_plane[n_points_on_plane++] = i;
-    }
-
-    CGAL_assertion(n_points_on_plane + 
-            n_points_on_positive + n_points_on_negative == 3);
-
-    // if all vertices of tri lie on the same size (positive/negative) of pl,
-    // there is no intersection
-    if (n_points_on_positive == 3 || n_points_on_negative == 3)
-      return Object();
-
-    // if all vertices of tri lie on pl then we return tri
-    if (n_points_on_plane == 3)
-       return make_object(tri);
-
-    // if 2 vertices lie on pl, then return the segment between them
-    if (n_points_on_plane == 2)
-    {
-      int point_idx1 = points_on_plane[0], point_idx2 = points_on_plane[1];
-      return make_object (Segment_3(tri.vertex(point_idx1),
-                                    tri.vertex(point_idx2)));
-    }
-
-    // if only 1 lie on pl, should check the segment opposite to it on tri
-    if (n_points_on_plane == 1)
-    {
-      int point_on_plane_idx = points_on_plane[0];
-
-      // if the other 2 vertices are on the same side of pl,
-      // then the answer is just this vertex
-      if (n_points_on_negative == 2 || n_points_on_positive == 2)
-        return make_object(tri.vertex(point_on_plane_idx));
-
-      // now it is known that one vertex is on pl, and the segment of tri
-      // opposite to it should intersect pl
-
-      // the segment of tri opposite of tri[point_on_plane_idx]
-      Segment_3 tri_segment(tri.vertex(point_on_plane_idx+1),
-                            tri.vertex(point_on_plane_idx+2));
-
-      Object inter_result = k.intersect_3_object()(pl, tri_segment);
-      Point_3 inter_point;
-      CGAL_assertion( k.assign_3_object()(inter_point, inter_result) );
-      k.assign_3_object()(inter_point, inter_result);
-
-      // create the resulting segment
-      // (between tri[point_on_plane_idx] and inter_point)
-      return make_object(Segment_3(tri.vertex(point_on_plane_idx), 
-                                   inter_point));
-
-    }
-
-    CGAL_assertion( n_points_on_plane == 0 );
-    CGAL_assertion( n_points_on_positive + n_points_on_negative == 3 );
-    CGAL_assertion( n_points_on_positive != 0 );
-    CGAL_assertion( n_points_on_negative != 0 );
-
-    // now it known that there is an intersection between 2 segments of tri
-    // and pl, it is also known which segments are those.
-    Point_3 inter_points[2];
-    int pos_it, neg_it, n_inter_points = 0;
-    for(pos_it = 0; pos_it < n_points_on_positive; ++pos_it)
-      for(neg_it = 0; neg_it < n_points_on_negative; ++neg_it)
-      {
-        Segment_3 seg(tri.vertex(points_on_positive[pos_it]),
-                      tri.vertex(points_on_negative[neg_it]));
-        Object inter_result = k.intersect_3_object()(pl, seg);
-        Point_3 inter_point;
-        // the result of the intersection must be a point
-        CGAL_assertion( k.assign_3_object()(inter_point, inter_result) );
-        k.assign_3_object()(inter_point, inter_result);
-        inter_points[n_inter_points++] = inter_point;
-      }
-
-    CGAL_assertion( n_inter_points == 2 );
-    return make_object(Segment_3(inter_points[0], inter_points[1]));
-  }
-
-  // compare the value of s1 in p1 to the value of s2 in p2
-  Comparison_result
-  compare_z(const Point_2& p1,
-            const Xy_monotone_surface_3& s1,
-            const Point_2& p2,
-            const Xy_monotone_surface_3& s2)
-  {
-    CGAL_precondition(is_defined_over_object()(p1, s1));
-    CGAL_precondition(is_defined_over_object()(p2, s2));
-
-    Point_3 v1 = envelope_point_of_surface(p1, s1);
-    Point_3 v2 = envelope_point_of_surface(p2, s2);
-    Kernel k;
-    return k.compare_z_3_object()(v1, v2);
-  }
-  
-  // find the envelope point of the surface over the given point
-  // precondition: the surface is defined in point
-  Point_3
-  envelope_point_of_surface(const Point_2& p,
-                            const Xy_monotone_surface_3& s) const
-  {
-    CGAL_precondition(s.is_xy_monotone());
-    CGAL_precondition(is_defined_over_object()(p, s));
-
-    Point_3 point(p.x(), p.y(), 0);
-
-    // Compute the intersetion between the vertical line and the given surfaces
-    if (s.is_segment())
-      return envelope_point_of_segment(point, s);
-    else
-    {
-      // s is a non-vertical triangle
-      CGAL_assertion(!s.is_vertical());
-
-      // Construct a vertical line passing through point
-      Kernel k;
-      Direction_3 dir (0, 0, 1);
-      Line_3      vl = k.construct_line_3_object() (point, dir);
-
-      const Plane_3& plane = s.plane();
-      Object    res = k.intersect_3_object()(plane, vl);
-      CGAL_assertion(!res.is_empty());
-      Point_3 ip;
-      CGAL_assertion(k.assign_3_object()(ip, res));
-      k.assign_3_object()(ip, res);
-
-      return ip;
-    }
-  }
-
-  // find the envelope point of the surface over the given point
-  // precondition: the surface is defined in point and is a segment
-  Point_3 envelope_point_of_segment(const Point_3& point,
-                                    const Xy_monotone_surface_3& s) const
-  {
-    Kernel k;
-    CGAL_precondition(s.is_segment());
-    CGAL_precondition(is_defined_over_object()(project(point), s));
-
-    // this is the vertical plane through the segment
-    const Plane_3& plane = s.plane();
-
-    // Construct a vertical line passing through point
-    Direction_3 dir (0, 0, 1);
-    Line_3      vl = k.construct_line_3_object() (point, dir);
-    // we need 2 points on this line, to be transformed to 2d,
-    // and preserve the direction of the envelope
-    Point_3 vl_point1 = k.construct_point_on_3_object()(vl, 0),
-            vl_point2 = k.construct_point_on_3_object()(vl, 1);
-
-    // the surface and the line are on the same plane(plane),
-    // so we transform them to the xy-plane, compute the intersecting point
-    // and transform it back to plane.
-    const Point_3& v1 = s.vertex(0);
-    const Point_3& v2 = s.vertex(1);
-    
-    Point_2 t1 = plane.to_2d(v1);
-    Point_2 t2 = plane.to_2d(v2);
-
-    Point_2 tvl_point1 = plane.to_2d(vl_point1);
-    Point_2 tvl_point2 = plane.to_2d(vl_point2);
-    Line_2 l(tvl_point1, tvl_point2);
-
-    Segment_2 seg(t1, t2);
-    Object inter_obj = k.intersect_2_object()(seg, l);
-    Point_2 inter_point;
-    CGAL_assertion_code(bool is_inter_point =)
-    k.assign_2_object()(inter_point, inter_obj);
-    CGAL_assertion(is_inter_point);
-    return plane.to_3d(inter_point);
-  }
-
-  Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const
-  {
-    Kernel k;
-    return k.construct_midpoint_2_object()(p1, p2);
-  }
-
-  Point_2 construct_middle_point(const X_monotone_curve_2& cv) const
-  {
-    Kernel k;
-    return k.construct_midpoint_2_object()(cv.source(), cv.target());
-  }
-
-  /***************************************************************************/
-  // for vertical decomposition
-  /***************************************************************************/
-  
-  class Construct_vertical_2
-  {
-  public:
-    X_monotone_curve_2 operator()(const Point_2& p1, const Point_2& p2) const
-    {
-      return X_monotone_curve_2(p1, p2);
-
-    }
-  };
-
-  /*! Get a Construct_vertical_2 functor object. */
-  Construct_vertical_2 construct_vertical_2_object() const
-  {
-    return Construct_vertical_2();
-  }
- 
-
-  Point_2 vertical_ray_shoot_2 (const Point_2& pt,
-                                const X_monotone_curve_2& cv) const
-  {
-    CGAL_precondition(!cv.is_vertical());
-
-    typename Kernel::Segment_2 seg = cv;
-    Kernel k;
-    // If the curve contains pt, return it.
-    if (k.has_on_2_object() (seg, pt))
-      return (pt);
-
-    // Construct a vertical line passing through pt.
-    typename Kernel::Direction_2  dir (0, 1);
-    typename Kernel::Line_2        vl = k.construct_line_2_object() (pt, dir);
-
-    // Compute the intersetion between the vertical line and the given curve.
-    Object    res = k.intersect_2_object()(seg, vl);
-    Point_2   ip;
-    bool      ray_shoot_successful = k.assign_2_object()(ip, res);
-
-    if (! ray_shoot_successful)
-      CGAL_assertion (ray_shoot_successful);
-
-    return (ip);
-  }
-};
-
-
-/*!
- * \class A representation of a triangle, as used by the 
- * Env_triangle_traits_3 traits-class.
- */
-template <class Kernel_>
-class Env_triangle_3 :
-    public Env_triangle_traits_3<Kernel_>::_Triangle_cached_3
-{
-  typedef Kernel_                                                  Kernel;
-  typedef typename Kernel::Triangle_3                              Triangle_3;
-  typedef typename Kernel::Point_3                                 Point_3;
-  typedef typename Kernel::Plane_3                                 Plane_3;
-  typedef typename Kernel::Segment_3                               Segment_3;
-
-  typedef typename Env_triangle_traits_3<Kernel>::_Triangle_cached_3
-                                                                   Base;
-
-public:
-
-  /*!
-   * Default constructor.
-   */
-  Env_triangle_3() :
-    Base()
-  {}
-
-  /*!
-   * Constructor from a "kernel" triangle.
-   * \param seg The segment.
-   */
-  Env_triangle_3(const Triangle_3& tri) :
-    Base(tri)
-  {}
-
-  /*!
-   * Construct a triangle from 3 end-points.
-   * \param p1 The first point.
-   * \param p2 The second point.
-   * \param p3 The third point.
-   */
-    Env_triangle_3(const Point_3 &p1, const Point_3 &p2, const Point_3 &p3) :
-      Base(p1, p2, p3)
-  {}
-
-  /*!
-   * Construct a triangle from a plane and 3 end-points.
-   * \param pl The supporting plane.
-   * \param p1 The first point.
-   * \param p2 The second point.
-   * \param p3 The third point.
-   * \pre All points must be on the supporting plane.
-   */
-  Env_triangle_3(const Plane_3& pl,
-                 const Point_3 &p1,
-                 const Point_3 &p2,
-                 const Point_3 &p3) :
-    Base(pl, p1, p2, p3)
-
-  {}
-
-  /*!
-   * Construct a segment from 2 end-points.
-   * \param p1 The first point.
-   * \param p2 The second point.
-   */
-  Env_triangle_3(const Point_3 &p1, const Point_3 &p2) :
-    Base(p1, p2)
-  {}
-
-  /*!
-   * Cast to a triangle.
-   */
-  operator Triangle_3() const
-  {
-    return (Triangle_3(this->vertex(0), this->vertex(1), this->vertex(2)));
-  }
-
-  /*!
-   * Cast to a segment (only when possible).
-   */
-  operator Segment_3() const
-  {
-    CGAL_precondition(this->is_segment());
-    return (Segment_3(this->vertex(0), this->vertex(1)));
-  }
-
-  /*!
-   * Create a bounding box for the triangle.
-   */
-  Bbox_3 bbox() const
-  {
-    Triangle_3 tri(this->vertex(0), this->vertex(1), this->vertex(2));
-    return (tri.bbox());
-  }
-};
-
-template <class Kernel>
-bool
-operator<(const Env_triangle_3<Kernel> &a,
-          const Env_triangle_3<Kernel> &b)
-{
-  if (a.vertex(0) < b.vertex(0))
-    return true;
-  if (a.vertex(0) > b.vertex(0))
-    return false;
-  if (a.vertex(1) < b.vertex(1))
-    return true;
-  if (a.vertex(1) > b.vertex(1))
-    return false;
-  if (a.vertex(2) < b.vertex(2))
-    return true;
-  if (a.vertex(2) > b.vertex(2))
-    return false;
-
-  return false;
-}
-template <class Kernel>
-bool
-operator==(const Env_triangle_3<Kernel> &a,
-           const Env_triangle_3<Kernel> &b)
-{
-  return (a.vertex(0) == b.vertex(0) &&
-          a.vertex(1) == b.vertex(1) &&
-          a.vertex(2) == b.vertex(2));
-}
-
-/*!
- * Exporter for the triangle class used by the traits-class.
- */
-template <class Kernel, class OutputStream>
-OutputStream& operator<< (OutputStream& os, const Env_triangle_3<Kernel>& tri)
-{
-  os << static_cast<typename Kernel::Triangle_3>(tri);
-  if (tri.is_segment())
-    os << " (segment)";
-  return (os);
-}
-
-/*!
- * Importer for the triangle class used by the traits-class.
- */
-template <class Kernel, class InputStream>
-InputStream& operator>> (InputStream& is, Env_triangle_3<Kernel>& tri)
-{
-  typename Kernel::Triangle_3   kernel_tri;
-  is >> kernel_tri;
-  tri = kernel_tri;
-  return (is);
-}
-
-} //namespace CGAL
-
-#endif 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h
deleted file mode 100644
index 3acb28c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h
+++ /dev/null
@@ -1,1241 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_ENVELOPE_DIVIDE_AND_CONQUER_2_IMPL_H
-#define CGAL_ENVELOPE_DIVIDE_AND_CONQUER_2_IMPL_H
-
-/*! \file
- * Definitions of the functions of the Envelope_divide_and_conquer_2 class.
- */
-
-#include <boost/optional.hpp>
-
-namespace CGAL {
-
-// ---------------------------------------------------------------------------
-// Construct the lower/upper envelope of the given list of non-vertical curves.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_construct_envelope_non_vertical(Curve_pointer_iterator begin,
-                                 Curve_pointer_iterator end,
-                                 Envelope_diagram_1& out_d)
-{
-  out_d.clear();
-  
-  if (begin == end)
-    return;
-  
-  // Check if the range contains just a single curve.
-  Curve_pointer_iterator    iter = begin;
-  ++iter;
-  
-  if (iter == end)
-  {
-    // Construct a singleton diagram, which matches a single curve.
-    _construct_singleton_diagram(*(*begin), out_d);
-  }
-  else
-  {
-    // Divide the given range of curves into two.
-    std::size_t size = std::distance(begin, end);
-    Curve_pointer_iterator  div_it = begin;
-    std::advance(div_it, size / 2);
-    
-    // Construct the diagrams (envelopes) for the two sub-ranges recursively 
-    // and then merge the two diagrams to obtain the result.
-    Envelope_diagram_1   d1;
-    Envelope_diagram_1   d2;
-    
-    _construct_envelope_non_vertical(begin, div_it, d1);
-    
-    _construct_envelope_non_vertical(div_it, end, d2);
-
-    _merge_envelopes(d1, d2, out_d);
-
-    // Print the minimization diagram.
-    /* RWRW:
-    Edge_const_handle    e = out_d.leftmost();
-    Vertex_const_handle  v;
-
-    std::cout << "The diagram: ";
-    while (e != out_d.rightmost())
-    {
-      if (! e->is_empty())
-        std::cout << e->curve() << "  ";
-      else
-        std::cout << "[empty]" << "  ";
-
-      v = e->right();
-      std::cout << "(" << v->point() << ")  ";
-      
-      e = v->right();
-    }
-    std::cout << "[empty]" << std::endl;
-    */
-  }
-  
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Construct a singleton diagram, which matches a single curve.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_construct_singleton_diagram(const X_monotone_curve_2& cv,
-                             Envelope_diagram_1& out_d)
-{
-  CGAL_assertion(out_d.leftmost() == out_d.rightmost());
-  CGAL_assertion(out_d.leftmost()->is_empty());
-  
-  // Check if the given curve is bounded from the left and from the right.
-  if (traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END) != ARR_INTERIOR)
-  {
-    if (traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END) != ARR_INTERIOR)
-    {
-      // The curve is defined over (-oo, oo), so its diagram contains
-      // only a single edge.
-      out_d.leftmost()->add_curve(cv);
-      
-      return;
-    }
-
-    // The curve is defined over (-oo, x], where x is finite.
-    // Create a vertex and associate it with the right endpoint of cv.
-    CGAL_precondition
-      (traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END) == ARR_INTERIOR);
-    
-    Vertex_handle v =
-      out_d.new_vertex(traits->construct_max_vertex_2_object()(cv));
-    Edge_handle   e_right = out_d.new_edge();
-    
-    v->add_curve(cv);
-    v->set_left(out_d.leftmost());
-    v->set_right(e_right);
-    
-    // The leftmost edge is associated with cv, and the rightmost is empty.
-    out_d.leftmost()->add_curve(cv);
-    out_d.leftmost()->set_right(v);
-    
-    e_right->set_left(v);
-    out_d.set_rightmost(e_right);
-    
-    return;
-  }
-  
-  if (traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END) != ARR_INTERIOR)
-  {
-    // The curve is defined over [x, +oo), where x is finite.
-    // Create a vertex and associate it with the left endpoint of cv.
-    CGAL_precondition
-      (traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END) == ARR_INTERIOR);
-    
-    Vertex_handle  v = 
-      out_d.new_vertex(traits->construct_min_vertex_2_object()(cv));
-    Edge_handle    e_left = out_d.new_edge();
-    
-    v->add_curve(cv);
-    v->set_left(e_left);
-    v->set_right(out_d.rightmost());
-    
-    // The rightmost edge is associated with cv, and the leftmost is empty.
-    out_d.rightmost()->add_curve(cv);
-    out_d.rightmost()->set_left(v);
-    
-    e_left->set_right(v);
-    out_d.set_leftmost(e_left);
-    
-    return;
-  }
-  
-  // If we reached here, the curve is defined over a bounded x-range.
-  // We therefore create the following diagram:
-  //
-  //             (empty)    v1     e       v2   (empty)
-  //      -oo -------------(+)============(+)------------ +oo
-  //
-  CGAL_precondition
-    (traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END) == ARR_INTERIOR);
-  CGAL_precondition
-    (traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END) == ARR_INTERIOR);
-  
-  Vertex_handle  v1 = 
-    out_d.new_vertex(traits->construct_min_vertex_2_object()(cv));
-  Vertex_handle  v2 = 
-    out_d.new_vertex(traits->construct_max_vertex_2_object()(cv));
-  Edge_handle    e_left = out_d.new_edge();
-  Edge_handle    e_right = out_d.new_edge();
-  Edge_handle    e = out_d.leftmost();
-  
-  v1->add_curve(cv);
-  v1->set_left(e_left);
-  v1->set_right(e);
-  
-  v2->add_curve(cv);
-  v2->set_left(e);
-  v2->set_right(e_right);
-  
-  e->add_curve(cv);
-  e->set_left(v1);
-  e->set_right(v2);
-  
-  e_left->set_right(v1);
-  e_right->set_left(v2);
-  
-  out_d.set_leftmost(e_left);
-  out_d.set_rightmost(e_right);
-  
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Merge two minimization (or maximization) diagrams.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_merge_envelopes(const Envelope_diagram_1& d1,
-                 const Envelope_diagram_1& d2,
-                 Envelope_diagram_1& out_d)
-{
-  Edge_const_handle    e1 = d1.leftmost();
-  bool                 is_leftmost1 = true;
-  Vertex_const_handle  v1 = Vertex_const_handle();
-  Edge_const_handle    e2 = d2.leftmost();
-  bool                 is_leftmost2 = true;
-  Vertex_const_handle  v2 = Vertex_const_handle();
-  Vertex_const_handle  next_v = Vertex_const_handle();
-  bool                 next_exists = true;
-  Comparison_result    res_v = EQUAL;
-  bool                 same_x = false;
-
-  do
-  {
-    // Locate the vertex that has smaller x-coordinate between v1 and v2.
-    // If both have the same x-ccordinate, find the one that should be in
-    // the envelope.
-    same_x = false;
-    
-    if (e1 == d1.rightmost())
-    {
-      if (e2 == d2.rightmost())
-      {
-        // Both current edges do not have a vertex to their right.
-        next_exists = false;
-      }
-      else
-      {
-        // e1 is not bounded from the right while e2 is.
-        v2 = e2->right();
-        next_v = v2;
-        res_v = LARGER;
-      }
-    }
-    else if (e2 == d2.rightmost())
-    {
-      // e2 is not bounded from the right while e1 is.
-      v1 = e1->right();
-      next_v = v1;
-      res_v = SMALLER;
-    }
-    else
-    {
-      v1 = e1->right();
-      v2 = e2->right();
-      res_v = _compare_vertices(v1, v2, same_x);
-      next_v = (res_v == SMALLER) ? v1 : v2;
-    }
-    
-    // Check if the current edges represent empty intervals or not.
-    if (! e1->is_empty() && ! e2->is_empty())
-    {
-      // Both edges are not empty, and there are curves defined on them.
-      _merge_two_intervals(e1, is_leftmost1, e2, is_leftmost2,
-                           next_v, next_exists, res_v, out_d);
-      
-    }
-    else if (! e1->is_empty() && e2->is_empty())
-    {
-      // e1 is not empty but e2 is empty:
-      _merge_single_interval(e1, e2, next_v, next_exists, res_v, out_d);
-    }
-    else if (e1->is_empty() && ! e2->is_empty())
-    {
-      // e1 is empty and e2 is not empty:
-      _merge_single_interval(e2, e1, next_v, next_exists,
-                             CGAL::opposite(res_v), out_d);
-    }
-    else
-    {
-      // Both edges are empty: append an empty edge to out_d:
-      if (next_exists)
-      {
-        Vertex_handle  new_v = _append_vertex(out_d, next_v->point(), e1);
-        switch(res_v)
-        {
-        case SMALLER:
-          new_v->add_curves(v1->curves_begin(), v1->curves_end()); break;
-        case LARGER:
-          new_v->add_curves(v2->curves_begin(), v2->curves_end()); break;
-        case EQUAL:
-          new_v->add_curves(v1->curves_begin(), v1->curves_end());
-          new_v->add_curves(v2->curves_begin(), v2->curves_end());
-          break;
-        }
-      }
-    }
-    
-    // Proceed to the next diagram edge(s), if possible.
-    if (next_exists)
-    {
-      // Check if we should proceed on d1 or on d2.
-      // \todo: we do not need 3 cases, only two.
-      if (res_v == SMALLER)
-      {
-        e1 = v1->right();
-        is_leftmost1 = false;
-
-        if (same_x)
-        {
-          e2 = v2->right();
-          is_leftmost2 = false;
-        }
-      }
-      else if (res_v == LARGER)
-      {
-        e2 = v2->right();
-        is_leftmost2 = false;
-
-        if (same_x)
-        {
-          e1 = v1->right();
-          is_leftmost1 = false;
-        }
-      }
-      else
-      {
-        e1 = v1->right();
-        is_leftmost1 = false;
-                
-        e2 = v2->right();
-        is_leftmost2 = false;
-      }
-    }
-    
-  } while (next_exists);
-  
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Compare two diagram vertices.
-//
-template <class Traits, class Diagram>
-Comparison_result Envelope_divide_and_conquer_2<Traits,Diagram>::
-_compare_vertices(Vertex_const_handle v1,
-                  Vertex_const_handle v2,
-                  bool& same_x) const
-{
-  Comparison_result res =
-    traits->compare_x_2_object()(v1->point(), v2->point());
-  
-  if (res != EQUAL)
-  {
-    same_x = false;
-    return (res);
-  }
-  else
-  {
-    same_x = true;
-  }
-
-  // In case the x-coordinates of the two vertices are equal:
-  res = traits->compare_xy_2_object()(v1->point(), v2->point());
-
-  // In case of upper envlope we take the opposite result
-  if (env_type == UPPER)
-    return CGAL::opposite(res);
-  return res;
-}
-
-// ---------------------------------------------------------------------------
-// Deal with an interval which is non-empty in one of the merged diagrams and
-// empty in the other.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_merge_single_interval(Edge_const_handle e, Edge_const_handle other_edge,
-                       Vertex_const_handle v, bool v_exists,
-                       Comparison_result origin_of_v,
-                       Envelope_diagram_1& out_d)
-{
-  if (! v_exists)
-  {
-    // The non-empty edge e is unbounded from the right, so we simply have
-    // to update the rightmost edge in out_d.
-    out_d.rightmost()->add_curves(e->curves_begin(), e->curves_end());
-    return;
-  }
-  
-  Vertex_handle      new_v;
-  
-  if (origin_of_v == SMALLER)
-  {
-    // The non-empty edge ends at v, so we simply insert it to out_d.
-    new_v = _append_vertex(out_d, v->point(), e);
-    new_v->add_curves(v->curves_begin(), v->curves_end());
-    
-    return;
-  }
-
-  if (origin_of_v == EQUAL) // the edges have vertices at the same place.
-  {
-    new_v = _append_vertex(out_d, v->point(), e);
-    new_v->add_curves(e->right()->curves_begin(), e->right()->curves_end());
-    new_v->add_curves(other_edge->right()->curves_begin(), 
-                      other_edge->right()->curves_end());
-    return;
-  }
-
-  // If v is not on e, we should insert it to the merged diagram only if it
-  // is below (or above, in case of an upper envelope) the curves of e.
-  Comparison_result res =
-    traits->compare_y_at_x_2_object()(v->point(), e->curve());
-  
-  if ((res == EQUAL) ||
-      (env_type == LOWER && res == SMALLER) ||
-      (env_type == UPPER && res == LARGER))
-  {
-    new_v = _append_vertex(out_d, v->point(), e);
-    new_v->add_curves(v->curves_begin(), v->curves_end());
-
-    if (res == EQUAL)
-      {
-        // In case of equality, append e's curves to those of the new vertex.
-        new_v->add_curves(e->curves_begin(), e->curves_end());
-      }
-  }
-}
-
-//! \brief Functions that should be on Arr_traits_adaptor.
-/*@{*/
-
-//! Compare the $y$-coordinates of two curves at their endpoints
-/*! The function compares the $y$ values of two curves with a joint 
-  range of $x$ values, at the end of the joint range.
-  \param xcv1 The first curve
-  \param xcv2 The second curve
-  \param curve_end ARR_MIN_END - compare the $y$ value of the smaller 
-  endpoint, ARR_MAX_END - compare the $y$ value of the larger endpoint.
-  \pre The two $x$-monotone curves need to have a partially overlapping 
-  $x$-ranges.
-  \return 
-  \todo Move it to Arr_traits_adaptor ?
-*/
-template <class Traits, class Diagram>
-Comparison_result Envelope_divide_and_conquer_2<Traits,Diagram>::
-compare_y_at_end(const X_monotone_curve_2& xcv1,
-                 const X_monotone_curve_2& xcv2,
-                 Arr_curve_end curve_end) const
-{
-  CGAL_precondition(traits->is_in_x_range_2_object()(xcv1, xcv2));
-
-  typedef typename Traits::Compare_xy_2               Compare_xy_2;
-  typedef typename Traits::Compare_y_at_x_2           Compare_y_at_x_2;
-  typedef typename Traits::Construct_min_vertex_2     Construct_min_vertex_2;
-  typedef typename Traits::Construct_max_vertex_2     Construct_max_vertex_2;
-
-  Compare_y_at_x_2  compare_y_at_x = traits->compare_y_at_x_2_object();
-  Construct_min_vertex_2 min_vertex =
-    traits->construct_min_vertex_2_object();
-  Construct_max_vertex_2 max_vertex =
-    traits->construct_max_vertex_2_object();
-  
-  // First check whether any of the curves is defined at x boundary.
-  const Arr_parameter_space ps_x1 =
-    traits->parameter_space_in_x_2_object()(xcv1, curve_end);
-  const Arr_parameter_space ps_x2 =
-    traits->parameter_space_in_x_2_object()(xcv2, curve_end);
-  Comparison_result         res;
-  
-  if (ps_x1 != ARR_INTERIOR) {
-    if (ps_x2 != ARR_INTERIOR) {
-      // Compare the relative position of the curves at x boundary.
-      return (traits->compare_y_near_boundary_2_object()(xcv1, xcv2,
-                                                         curve_end));
-    }
-    
-    // Check if the left end of xcv2 lies at y boundary.
-    const Arr_parameter_space ps_y2 =
-      traits->parameter_space_in_y_2_object()(xcv2, curve_end);
-    
-    if (ps_y2 == ARR_BOTTOM_BOUNDARY)
-      return (LARGER);          // xcv2 is obviously below xcv1.
-    else if (ps_y2 == ARR_TOP_BOUNDARY)
-      return (SMALLER);         // xcv2 is obviously above xcv1.
-          
-    // Compare the position of the left end of xcv2 (which is a normal
-    // point) to xcv1.
-    res = (curve_end == ARR_MIN_END) ?
-      compare_y_at_x(min_vertex(xcv2), xcv1) :
-      compare_y_at_x(max_vertex(xcv2), xcv1);
-
-    // Swap the result.
-    return CGAL::opposite(res);
-  }
-  else if (ps_x2 != ARR_INTERIOR) {
-    // Check if the left end of xcv1 lies at y boundary.
-    const Arr_parameter_space ps_y1 =  traits->parameter_space_in_y_2_object()
-      (xcv1, curve_end);
-    
-    if (ps_y1 == ARR_BOTTOM_BOUNDARY)
-      return (SMALLER);         // xcv1 is obviously below xcv2.
-    else if (ps_y1 == ARR_TOP_BOUNDARY)
-      return (LARGER);          // xcv1 is obviously above xcv2.
-    
-    // Compare the position of the left end of xcv1 (which is a normal
-    // point) to xcv2.
-    res = (curve_end == ARR_MIN_END) ?
-      compare_y_at_x(min_vertex(xcv1), xcv2) :
-      compare_y_at_x(max_vertex(xcv1), xcv2);
-    return (res);
-  }
-  
-  // Check if the left curve end lies at y = +/- oo.
-  const Arr_parameter_space ps_y1 =
-    traits->parameter_space_in_y_2_object()(xcv1, curve_end);
-  const Arr_parameter_space ps_y2 =
-    traits->parameter_space_in_y_2_object()(xcv2, curve_end);
-  Comparison_result         l_res;
-  
-  if (ps_y1 != ARR_INTERIOR) {
-    if (ps_y2 != ARR_INTERIOR) {
-      // The curve ends have boundary conditions with oposite signs in y,
-      // we readily know their relative position (recall that they do not
-      // instersect).
-      if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY))
-        return (SMALLER);
-      else if ((ps_y1 == ARR_TOP_BOUNDARY) && (ps_y2 == ARR_BOTTOM_BOUNDARY))
-        return (LARGER);
-
-      // Both curves have vertical asymptotes with the same sign in y.
-      // Check which asymptote is the rightmost. Note that in this case
-      // the vertical asymptotes cannot be equal.
-      l_res = traits->compare_x_curve_ends_2_object()(xcv1, curve_end,
-                                                      xcv2, curve_end);
-      CGAL_assertion(l_res != EQUAL);
-      
-      if (ps_y1 == ARR_TOP_BOUNDARY)
-        return (l_res);
-      else
-        return CGAL::opposite(l_res);
-    }
-
-    // xcv1 has a vertical asymptote and xcv2 has a normal left endpoint.
-    // Compare the x-positions of this endpoint and the asymptote.
-    const Point_2& left2 =
-      (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2);
-        
-    l_res =
-      traits->compare_x_point_curve_end_2_object()(left2, xcv1, curve_end);
-    
-    if (l_res == LARGER) {
-      // left2 lies in the x-range of xcv1, so it is safe to compare:
-      res = compare_y_at_x(left2, xcv1);
-      return CGAL::opposite(res);
-    }
-    else
-      // xcv1 is below or above xcv2.
-      return ((ps_y1 == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER);
-  }
-  else if (ps_y2 != ARR_INTERIOR) {
-    // xcv2 has a vertical asymptote and xcv1 has a normal left endpoint.
-    // Compare the x-positions of this endpoint and the asymptote.
-    const Point_2&  left1 = 
-      (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1);
-        
-    l_res =
-      traits->compare_x_point_curve_end_2_object()(left1, xcv2, curve_end);
-    
-    return ((l_res == LARGER) ?
-            // left1 lies in the x-range of xcv2, so it is safe to compare:
-            (compare_y_at_x(left1, xcv2)) :
-            ((ps_y2 == ARR_BOTTOM_BOUNDARY) ? LARGER : SMALLER));
-  }
-
-  // In this case we compare two normal points.
-  Compare_xy_2            compare_xy = traits->compare_xy_2_object();
-
-  // Get the left endpoints of xcv1 and xcv2.
-  const Point_2&  left1 = 
-    (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1);
-  const Point_2&  left2 = 
-    (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2);
-
-  // Locate the rightmost point of left1 and left2 and compare its position
-  // to the other curve.
-  l_res = compare_xy(left1, left2);
-  
-  return ((l_res != SMALLER) ?
-    // left1 is in the x-range of xcv2:
-          compare_y_at_x(left1, xcv2) : 
-    // left2 is in the x-range of xcv1:
-          CGAL::opposite(compare_y_at_x(left2, xcv1)));
-}
-/*@}*/
-
-// ---------------------------------------------------------------------------
-// Merge two non-empty intervals into the merged diagram.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, 
-                     Edge_const_handle e2, bool is_leftmost2,
-                     Vertex_const_handle v, bool v_exists,
-                     Comparison_result origin_of_v,
-                     Envelope_diagram_1& out_d)
-{
-  typedef std::pair<Point_2, typename Traits::Multiplicity>  Intersection_point;
-
-  Comparison_result                current_res;
-  bool                             equal_at_v = false;
- 
-  // Get the relative position of two curves associated with e1 and e2
-  // at the rightmost of the left endpoints of e1 and e2.
-  current_res = compare_y_at_end(e1->curve(), e2->curve(), ARR_MIN_END);
-  // Flip the result in case of an upper envelope.
-  if (env_type == UPPER)
-    current_res = CGAL::opposite(current_res);
-
-  // Use the current rightmost of the two left vertices as a reference point.
-  // This is the rightmost vertex in the current minimization diagram (out_d).
-  // The intersection points/curves that interest us are the ones in
-  // [v_leftmost, v].
-  boost::optional<Vertex_const_handle>  v_leftmost =
-    boost::optional<Vertex_const_handle>();
-
-  if (is_leftmost1 == true) {
-    if (is_leftmost2 == false)
-      v_leftmost = e2->left();
-  }
-  else {
-    if (is_leftmost2 == true)
-      v_leftmost = e1->left();
-    else
-    {
-      if ((traits->compare_xy_2_object()(e1->left()->point(),
-                                         e2->left()->point()) == LARGER))
-        v_leftmost = e1->left();
-      else
-        v_leftmost = e2->left();
-    }
-  }
-
-  // Find the next intersection of the envelopes to the right of the current
-  // rightmost point in the merged diagram.
-  // \todo Use the faster object_cast.
-  std::list<CGAL::Object>           objects;
-  CGAL::Object                      obj;
-  const X_monotone_curve_2*         intersection_curve;
-  const Intersection_point*         intersection_point;
-  
-  traits->intersect_2_object()(e1->curve(), e2->curve(),
-                               std::back_inserter(objects));
-  
-  while (! objects.empty()) {
-    // Pop the xy-lexicographically smallest intersection object.
-    obj = objects.front();
-    objects.pop_front();
-    
-    if ((intersection_point = CGAL::object_cast<Intersection_point>(&obj)) !=
-        NULL)
-    {
-      // We have a simple intersection point.
-      bool is_in_x_range = true; // true if the intersection point is to the 
-                                 // right of v_leftmost.
-      // check if we are before the leftmost point.
-      if (v_leftmost &&
-          traits->compare_xy_2_object() (intersection_point->first, 
-                                         (*v_leftmost)->point()) != LARGER)
-      {
-        // The point is to the left of the current rightmost vertex in out_d,
-        // so we skip it and continue examining the next intersections.
-        // However, we update the last intersection point observed.
-        is_in_x_range = false;
-      }
-      
-      // check if we arrived at the rightmost point (stop if indeed we are
-      // there).
-      if (is_in_x_range && v_exists) {
-        Comparison_result res = traits->compare_xy_2_object() 
-          (intersection_point->first, v->point());
-        
-        // v is an intersection points, so both curves are equal there:
-        if (res == EQUAL)
-          equal_at_v = true;
-        
-        // We passed the next vertex, so we can stop here.
-        if (res == LARGER)
-          break;
-      }
-      
-      // Create a new vertex in the output diagram that corrsponds to the
-      // current intersection point.
-      if (is_in_x_range) {
-        CGAL_assertion(current_res != EQUAL);
-
-        Vertex_handle new_v = (current_res == SMALLER) ?
-          _append_vertex(out_d, intersection_point->first, e1) :
-          _append_vertex(out_d, intersection_point->first, e2);
-        
-        // if we are at v, then this is a special case that is handled after
-        // the loop. We need to add the curves from the original vertices.
-        if (equal_at_v == false) {
-          // Note that the new vertex is incident to all curves in e1 and in e2.
-          new_v->add_curves(e1->curves_begin(), e1->curves_end());
-          new_v->add_curves(e2->curves_begin(), e2->curves_end());
-        }
-        
-        // Update the handle to the rightmost vertex in the output diagram.
-        v_leftmost = new_v;
-      }
-
-      // Update the relative position of the two curves, which is their
-      // order immediately to the right of their last observed intersection
-      // point.
-      
-      // Get the curve order immediately to the right of the intersection
-      // point. Note that in case of even (non-zero) multiplicity the order
-      // remains the same.
-      if ((current_res != EQUAL) && (intersection_point->second % 2 == 1)) {
-        // Odd multiplicity: flip the current comparison result.
-        current_res = CGAL::opposite(current_res);
-      }
-      // if we are at v, then we may not be able to call compare_y_at_x_right_2.
-      else if (((intersection_point->second == 0) || (current_res == EQUAL)) &&
-               (equal_at_v == false))
-      {
-        // The multiplicity is unknown, so we have to compare the curves to
-        // the right of their intersection point.
-        current_res =
-          traits->compare_y_at_x_right_2_object()(e1->curve(), e2->curve(),
-                                                  intersection_point->first);
-        // Flip the result in case of an upper envelope.
-        if (env_type == UPPER)
-          current_res = CGAL::opposite (current_res);
-      }
-    }
-    else {
-      // We have an x-monotone curve representing an overlap of the two
-      // curves.
-      intersection_curve = CGAL::object_cast<X_monotone_curve_2>(&obj);
-      
-      if (intersection_curve == NULL)
-        CGAL_error_msg("unrecognized intersection object.");
-
-      // Get the endpoints of the overlapping curves.
-      const bool  has_left = 
-        (traits->parameter_space_in_x_2_object() 
-         (*intersection_curve, ARR_MIN_END) == ARR_INTERIOR);
-      const bool  has_right = 
-        (traits->parameter_space_in_x_2_object() 
-         (*intersection_curve, ARR_MAX_END) == ARR_INTERIOR);
-      Point_2     p_left, p_right;
-      
-      if (has_left)
-        p_left = traits->construct_min_vertex_2_object()(*intersection_curve);
-      
-      if (has_right)
-        p_right = traits->construct_max_vertex_2_object()(*intersection_curve);
-
-      bool is_in_x_range = true;
-      // Check if the overlapping curve is not relevant to our range.
-      if (v_leftmost && has_right &&
-          (traits->compare_xy_2_object()(p_right, (*v_leftmost)->point()) !=
-           LARGER))
-      {
-        // The right point of the overlappinf curve is to the left of the
-        // current rightmost vertex in out_d, so we skip it and continue
-        // examining the next intersections.
-        // However, we update the last intersection point observed.
-        is_in_x_range = false;
-      }
-      
-      if (is_in_x_range && v_exists && has_left) {
-        Comparison_result res =
-          traits->compare_xy_2_object()(p_left, v->point());
-        
-        // v is an intersection points, so both curves are equal there:
-        if (res == EQUAL)
-          equal_at_v = true;
-        
-        // We passed the next vertex, so we can stop here.
-        if (res == LARGER)
-          break;
-      }
-      
-      // There is an overlap between the range [u, v] and intersection_curve.
-      if (is_in_x_range && has_left && 
-          (! v_leftmost ||
-           (traits->compare_xy_2_object()(p_left, (*v_leftmost)->point()) ==
-            LARGER)))
-      {
-        // Create an output edge that represent the portion of [u, v] to the
-        // left of the overlapping curve.
-        CGAL_assertion(current_res != EQUAL);
-
-        Vertex_handle new_v = (current_res == SMALLER) ?
-          _append_vertex(out_d, p_left, e1) :
-          _append_vertex(out_d, p_left, e2);
-        
-        // if we are at v, then this is a special case that is handled after
-        // the loop. We need to add the curves from the original vertices.
-        if (equal_at_v == false) {
-          // Note that the new vertex is incident to all curves in e1 and
-          // in e2.
-          new_v->add_curves(e1->curves_begin(), e1->curves_end());
-          new_v->add_curves(e2->curves_begin(), e2->curves_end());
-        }
-        
-        // Update the handle to the rightmost vertex in the output diagram.
-        v_leftmost = new_v;
-      }
-      
-      if (is_in_x_range && has_right &&
-          (! v_exists ||
-           (traits->compare_xy_2_object()(p_right, v->point()) == SMALLER)))
-      {
-        // Create an edge that represents the overlapping curve.
-        Vertex_handle new_v = _append_vertex(out_d, p_right, e1);
-        new_v->left()->add_curves(e2->curves_begin(), e2->curves_end());
-        
-        // We are not at v becuase p_right is smaller than v.
-        // The special case that we are at v is handled in the next
-        // condition.
-        // If we were at v, then this was a special case that is handled
-        // later.
-        CGAL_assertion(equal_at_v == false);
-        new_v->add_curves(e1->curves_begin(), e1->curves_end());
-        new_v->add_curves(e2->curves_begin(), e2->curves_end());
-        
-        // Update the handle to the rightmost vertex in the output diagram.
-        v_leftmost = new_v;
-      }
-      
-      if (has_right == false || 
-          (v_exists && traits->compare_xy_2_object()(p_right, v->point()) !=
-           SMALLER))
-      {
-        // The overlapping curves reaches v.
-        if (v_exists) {
-          Vertex_handle new_v = _append_vertex(out_d, v->point(), e1);
-          new_v->left()->add_curves(e2->curves_begin(), e2->curves_end());
-        }
-        
-        equal_at_v = true;
-        current_res = EQUAL;
-        break;
-      }
-
-      // We arrive here only if we are not at v and the overlap has a right
-      // endpoint.
-      // Compare the curves to the right of p_right.
-      current_res =
-        traits->compare_y_at_x_right_2_object()(e1->curve(), e2->curve(),
-                                                p_right);
-      // Flip the result in case of an upper envelope.
-      if (env_type == UPPER)
-        current_res = CGAL::opposite (current_res);
-      
-    }
-  } // End of the traversal over the intersection objects.
-
-
-  // Handle the portion after the intersection objects.
-  if (equal_at_v) {
-    CGAL_assertion (v_exists);
-
-    // v_leftmost should be our vertex at v.
-    // In this case the two curves intersect (or overlap) at v.
-    // We need to add the correct curves to v_leftmost.
-
-    Vertex_handle v_to_be_updated = out_d.rightmost()->left();
-
-    if (origin_of_v == EQUAL) {
-      // If the vertices of the edge are the same, we have to get the 
-      // curves from there:
-      v_to_be_updated->add_curves(e1->right()->curves_begin(), 
-                                  e1->right()->curves_end());
-      v_to_be_updated->add_curves(e2->right()->curves_begin(), 
-                                  e2->right()->curves_end());
-    }
-    else {
-      // We add the curves from the original vertex and from the edge of the
-      // other diagram.
-      Edge_const_handle e = (origin_of_v == SMALLER) ? e2 : e1;
-
-      v_to_be_updated->add_curves (v->curves_begin(), v->curves_end());
-      v_to_be_updated->add_curves (e->curves_begin(), e->curves_end());
-    }
-    
-    return;
-  }
-  
-  if (! v_exists) {
-    // Both edges are unbounded from the right, so we simply have
-    // to update the rightmost edge in out_d.
-    switch (current_res)
-    {
-    case SMALLER:
-      out_d.rightmost()->add_curves(e1->curves_begin(), e1->curves_end());
-      return;
-    case LARGER:
-      out_d.rightmost()->add_curves(e2->curves_begin(), e2->curves_end());
-      return;
-    case EQUAL:
-      out_d.rightmost()->add_curves(e1->curves_begin(), e1->curves_end());
-      out_d.rightmost()->add_curves(e2->curves_begin(), e2->curves_end());
-      return;
-    default:
-      CGAL_error_msg("should not reach here.");
-      return;
-    }
-  }
-
-  // origin_of_v could be EQUAL but the curves do not intersect.
-  // This is because of the fact that v could be the endpoint of the NEXT
-  // curve (which is lower than the currrent curve. The second diagram, however,
-  // has a curve that ends at v.
-  // For example:
-  // First diagram is the segment: [(0, -1), (1, 0)]
-  // Second diagram of the two segments: [(0, 0), (1, 1)], [(1, 0), (2, 1)]
-  
-  // Check if we need to insert v into the diagram.
-  if (current_res == SMALLER) {    
-    // The final part of the interval is taken from e1.
-    Vertex_handle        new_v;
-
-    if (origin_of_v == SMALLER) {
-      // In case v is also from e1, append it to the merged diagram.
-      new_v = _append_vertex(out_d, v->point(), e1);
-      new_v->add_curves(v->curves_begin(), v->curves_end());
-    }
-    else {
-      // if origin_of_v is EQUAL then the two diagram have a vertex at
-      // exact same place.
-      if (origin_of_v == EQUAL) {
-        new_v = _append_vertex(out_d, v->point(), e1);
-        new_v->add_curves(v->curves_begin(), v->curves_end());
-        
-        // adding the curves of the vertex of the first diagram (vertices are
-        // equal...)
-        new_v->add_curves(e1->right()->curves_begin(), 
-                          e1->right()->curves_end());
-      }
-      else {
-        // If v is from e2, check if it below (or above, in case of an upper
-        // envelope) cv1 to insert it.
-        const Comparison_result  res = 
-          traits->compare_y_at_x_2_object()(v->point(), e1->curve());
-        
-        if (res == EQUAL ||
-            ((env_type == LOWER) && (res == SMALLER)) ||
-            ((env_type == UPPER) && (res == LARGER)))
-          {
-            new_v = _append_vertex(out_d, v->point(), e1);
-            new_v->add_curves(v->curves_begin(), v->curves_end());
-            
-            if (res == EQUAL)
-              new_v->add_curves(e1->curves_begin(), e1->curves_end());
-          }
-      }
-    }
-  }
-  else {
-    // The final part of the interval is taken from e2.
-    Vertex_handle        new_v;
-
-    if (origin_of_v != SMALLER) {
-      // In case v is also from e2, append it to the merged diagram.
-      new_v = _append_vertex(out_d, v->point(), e2);
-      new_v->add_curves(v->curves_begin(), v->curves_end());
-      
-      // if origin_of_v is EQUAL then the two diagram have a vertex at
-      // exact same place.
-      if (origin_of_v == EQUAL) {
-        // adding the curves of the vertex of the first diagram (vertices are
-        // equal...)
-        new_v->add_curves(e1->right()->curves_begin(),
-                          e1->right()->curves_end());
-      }
-    }
-    else {
-      // If v is from e1, check if it below (or above, in case of an upper
-      // envelope) cv2 to insert it.
-      const Comparison_result  res = 
-        traits->compare_y_at_x_2_object()(v->point(), e2->curve());
-      
-      if (res == EQUAL ||
-          ((env_type == LOWER) && (res == SMALLER)) ||
-          ((env_type == UPPER) && (res == LARGER)))
-      {
-        new_v = _append_vertex(out_d, v->point(), e2);
-        new_v->add_curves(v->curves_begin(), v->curves_end());
-        
-        if (res == EQUAL)
-          new_v->add_curves(e2->curves_begin(), e2->curves_end());
-      }
-    }
-  }
-
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Append a vertex to the given diagram.
-//
-template <class Traits, class Diagram>
-typename Envelope_divide_and_conquer_2<Traits,Diagram>::Vertex_handle
-Envelope_divide_and_conquer_2<Traits,Diagram>::
-_append_vertex(Envelope_diagram_1& diag,
-               const Point_2& p, Edge_const_handle e)
-{
-  // Create the new vertex and the new edge.
-  Vertex_handle   new_v = diag.new_vertex(p);
-  Edge_handle     new_e = diag.new_edge();
-  
-  if (! e->is_empty())
-    new_e->add_curves(e->curves_begin(), e->curves_end());
-  
-  // Connect the new vertex.
-  new_v->set_left(new_e);
-  new_v->set_right(diag.rightmost());
-  
-  if (diag.leftmost() != diag.rightmost()) {
-    // The diagram is not empty. Connect the new edge to the left of the
-    // rightmost edge of the diagram.
-    new_e->set_right(new_v);
-    new_e->set_left(diag.rightmost()->left());
-    diag.rightmost()->left()->set_right(new_e);
-    diag.rightmost()->set_left(new_v);
-  }
-  else {
-    // The diagram is empty: Make the new edge the leftmost.
-    new_e->set_right(new_v);
-    diag.set_leftmost(new_e);
-    diag.rightmost()->set_left(new_v);      
-  }
-  
-  return (new_v);
-}    
-
-// ---------------------------------------------------------------------------
-// Merge the vertical segments into the envelope given as a minimization
-// (or maximization) diagram.
-//
-template <class Traits, class Diagram>
-void Envelope_divide_and_conquer_2<Traits,Diagram>::
-_merge_vertical_segments(Curve_pointer_vector& vert_vec,
-                         Envelope_diagram_1& out_d)
-{
-  // Sort the vertical segments by their increasing x-coordinate.
-  Less_vertical_segment  les_vert(traits);
-
-  std::sort(vert_vec.begin(), vert_vec.end(), les_vert);
-
-  // Proceed on the diagram and on the sorted sequence of vertical segments
-  // and merge them into the diagram.
-  typename Traits_adaptor_2::Compare_x_2             comp_x =
-    traits->compare_x_2_object();
-  typename Traits_adaptor_2::Compare_xy_2            comp_xy =
-    traits->compare_xy_2_object();
-  typename Traits_adaptor_2::Compare_y_at_x_2        comp_y_at_x =
-    traits->compare_y_at_x_2_object();
-  typename Traits_adaptor_2::Construct_min_vertex_2  min_vertex =
-    traits->construct_min_vertex_2_object();
-  typename Traits_adaptor_2::Construct_max_vertex_2  max_vertex =
-    traits->construct_max_vertex_2_object();
-
-  Edge_handle             e = out_d.leftmost();
-  Vertex_handle           v = Vertex_handle();
-  Curve_pointer_iterator  iter = vert_vec.begin();
-  Curve_pointer_iterator  next;
-  Comparison_result       res;
-  bool                    in_e_range;
-  bool                    on_v;
-  Point_2                 p;
-
-  while (iter != vert_vec.end()) {
-    // Check if the current vertical segment is on the x-range of the current
-    // edge.
-    if (e != out_d.rightmost()) {
-      // The current edge is not the rightmost one: we compare the x-coordinate
-      // of the vertical segment to its right vertex.
-      v = e->right();
-
-      res = comp_x(min_vertex(**iter), v->point());
-      in_e_range = (res != LARGER);
-      on_v = (res == EQUAL);
-    }
-    else {
-      // This is the rightmost edge, so the vertical segment must lie on its
-      // x-range.
-      in_e_range = true;
-      on_v = false;
-    }
-    
-    // If the current vertical segment is not in the x-range of the current
-    // edge, we proceed to the next edge.
-    if (! in_e_range) {
-      e = v->right();
-      continue;
-    }
-
-    // Go over all vertical segments that share the same x-coordinate and
-    // find the one(s) with the smallest endpoint (or largest endpoint, if
-    // we construct an upper envelope). 
-    std::list<X_monotone_curve_2>    env_cvs;
-
-    env_cvs.push_back(**iter);
-    next = iter;
-    ++next;
-    while ((next != vert_vec.end()) &&
-           (comp_x(min_vertex(**iter), min_vertex(**next)) == EQUAL))
-    {
-      if (env_type == LOWER) {
-        // Compare the lower endpoints of both curves.
-        res = comp_xy(min_vertex(env_cvs.front()), min_vertex(**next));
-
-        // Update the list of vertical segments with minimal endpoints as
-        // necessary.
-        if (res == EQUAL) {
-          env_cvs.push_back(**next);
-        }
-        if (res == LARGER) {
-          env_cvs.clear();
-          env_cvs.push_back(**next);
-        }
-      }
-      else {
-        // Compare the upper endpoints of both curves.
-        res = comp_xy(max_vertex(env_cvs.front()), max_vertex(**next));
-
-        // Update the list of vertical segments with maximal endpoints as
-        // necessary.
-        if (res == EQUAL) {
-          env_cvs.push_back(**next);
-        }
-        if (res == SMALLER) {
-          env_cvs.clear();
-          env_cvs.push_back(**next);
-        }
-      }
-
-      ++next;
-    }
-
-    // Compare the endpoint to the diagram feature.
-    p = (env_type == LOWER) ?
-      min_vertex(env_cvs.front()) : max_vertex(env_cvs.front());
-
-    if (on_v) {
-      // Compare p to the current vertex.
-      res = comp_xy(p, v->point());
-
-      if (res == EQUAL) {
-        // Add curves to the current vertex.
-        v->add_curves(env_cvs.begin(), env_cvs.end());
-      }
-      else if ((env_type == LOWER && res == SMALLER) ||
-               (env_type == UPPER && res == LARGER))
-      {
-        // Replace the list of curves associated with the vertex.
-        v->clear_curves();
-        v->add_curves(env_cvs.begin(), env_cvs.end());
-      }
-    }
-    else
-    {
-      // p lies in the interior of the current edge.
-      Vertex_handle   new_v;
-
-      if (e->is_empty()) {
-        // Split the empty edge and associate the new vertex with the
-        // vertical segments.
-        new_v = _split_edge(out_d, p, e);
-        new_v->add_curves(env_cvs.begin(), env_cvs.end());
-      }
-      else {
-        // Compare p with the current curve.
-        res = comp_y_at_x(p, e->curve());
-        
-        if (((env_type == LOWER) && (res != LARGER)) ||
-            ((env_type == UPPER) && (res != SMALLER)))
-        {
-          new_v = _split_edge(out_d, p, e);
-          new_v->add_curves(env_cvs.begin(), env_cvs.end());
-
-          if (res == EQUAL)
-            new_v->add_curve(e->curve());
-        }
-      }
-    }
-
-    // Proceed to the next vertical segment with larger x-coordinate.
-    iter = next;
-  }
-
-  return;
-}
-
-// ---------------------------------------------------------------------------
-// Split a given diagram edge by inserting a vertex in its interior.
-//
-template <class Traits, class Diagram>
-typename Envelope_divide_and_conquer_2<Traits,Diagram>::Vertex_handle
-Envelope_divide_and_conquer_2<Traits,Diagram>::
-_split_edge(Envelope_diagram_1& diag, const Point_2& p, Edge_handle e)
-{
-  // Create the new vertex and the new edge.
-  Vertex_handle   new_v = diag.new_vertex(p);
-  Edge_handle     new_e = diag.new_edge();
-  
-  // Duplicate the curves container associated with e.
-  if (! e->is_empty())
-    new_e->add_curves(e->curves_begin(), e->curves_end());
-  
-  // Connect the new vertex between e and new_e.
-  new_v->set_left(e);
-  new_v->set_right(new_e);
-  
-  new_e->set_left(new_v);
-  if (e != diag.rightmost())
-    new_e->set_right(e->right());
-  else
-    diag.set_rightmost(new_e);
-
-  e->set_right(new_v);
-
-  // Return the new vertex.
-  return (new_v);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_element_visitor_3.h
deleted file mode 100644
index 6de1dfd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_element_visitor_3.h
+++ /dev/null
@@ -1,3220 +0,0 @@
-// Copyright (c) 2005  Tel-viv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Michal Meyerovitch     <gorgymic at post.tau.ac.il>
-//                 Baruch Zukerman        <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_ENVELOPE_ELEMENT_VISITOR_3_H
-#define CGAL_ENVELOPE_ELEMENT_VISITOR_3_H
-
-#include <CGAL/Object.h>
-#include <CGAL/enum.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Arr_tags.h>
-#include <CGAL/Arr_observer.h>
-#include <CGAL/Arr_accessor.h>
-#include <CGAL/Arr_walk_along_line_point_location.h>
-#include <CGAL/Arr_naive_point_location.h>
-#include <CGAL/utility.h>
-#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
-
-#include <vector>
-#include <algorithm>
-#include <iostream>
-#include <deque>
-
-namespace CGAL {
-
-// Return the comparison result of the halfedge's source and target vertices.
-#ifndef HE_COMP_RES
-#define HE_COMP_RES(he) (((he)->direction() == ARR_LEFT_TO_RIGHT) ? SMALLER : LARGER)
-#endif
-
-// this class does the resolving of edge and face in the divide & conquer
-// algorithm it should handle all faces (it supports holes in the face)
-
-template <class EnvelopeTraits_3, class MinimizationDiagram_2>
-class Envelope_element_visitor_3
-{
-public:
-  typedef EnvelopeTraits_3                             Traits;
-  typedef typename Traits::Multiplicity                Multiplicity;
-  typedef typename Traits::Surface_3                   Surface_3;
-  typedef typename Traits::Xy_monotone_surface_3       Xy_monotone_surface_3;
-  typedef typename Traits::Equal_2                     Equal_2;
-
-  typedef MinimizationDiagram_2                        Minimization_diagram_2;
-  typedef typename Traits::Point_2                     Point_2;
-  typedef typename Traits::X_monotone_curve_2          X_monotone_curve_2;
-  typedef typename Minimization_diagram_2::Are_all_sides_oblivious_category
-    Are_all_sides_oblivious_category;
-
-protected:
-  class Copied_face_zone_visitor;
-
-  typedef Envelope_element_visitor_3<Traits, Minimization_diagram_2> Self;
-  typedef typename Minimization_diagram_2::Halfedge_const_handle
-                                                        Halfedge_const_handle;
-  typedef typename Minimization_diagram_2::Halfedge_const_iterator
-                                                        Halfedge_const_iterator;
-  typedef typename Minimization_diagram_2::Halfedge_handle
-                                                        Halfedge_handle;
-  typedef typename Minimization_diagram_2::Halfedge_iterator
-                                                        Halfedge_iterator;
-  typedef typename Minimization_diagram_2::Face_const_handle
-                                                        Face_const_handle;
-  typedef typename Minimization_diagram_2::Face_handle
-                                                        Face_handle;
-  typedef typename Minimization_diagram_2::Face_iterator
-                                                        Face_iterator;
-  typedef typename Minimization_diagram_2::Vertex_const_handle
-                                                        Vertex_const_handle;
-  typedef typename Minimization_diagram_2::Vertex_handle
-                                                        Vertex_handle;
-  typedef typename Minimization_diagram_2::Vertex_iterator
-                                                        Vertex_iterator;
-  typedef typename Minimization_diagram_2::Ccb_halfedge_circulator
-    Ccb_halfedge_circulator;
-  typedef typename Minimization_diagram_2::Inner_ccb_iterator
-                                                        Inner_ccb_iterator;
-  typedef typename Minimization_diagram_2::Outer_ccb_iterator
-                                                        Outer_ccb_iterator;
-  typedef typename Minimization_diagram_2::Isolated_vertex_iterator
-    Isolated_vertex_iterator;
-  typedef typename Minimization_diagram_2::Topology_traits
-                                                        Topology_traits;
-  typedef typename Minimization_diagram_2::Dcel         Dcel;
-  typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
-                                                        Envelope_data_iterator;
-
-  typedef Arr_observer<Minimization_diagram_2>          Md_observer;
-  typedef Arr_accessor<Minimization_diagram_2>          Md_accessor;
-  
-  typedef typename Topology_traits::Default_point_location_strategy 
-    Md_point_location;
-  typedef typename Topology_traits::Zone_insertion_visitor
-    Md_insert_zone_visitor;
-  
-  typedef std::list<Halfedge_handle>                    Halfedges_list;
-  typedef typename std::list<Halfedge_handle>::iterator Halfedges_list_iterator;
-
-  typedef std::pair<Halfedge_handle, Multiplicity>      Halfedge_w_type;
-  typedef std::list<Halfedge_w_type>                    Halfedges_w_type_list;
-
-  typedef std::list<Vertex_handle>                      Vertices_list;
-  typedef typename std::list<Vertex_handle>::iterator   Vertices_list_iterator;
-
-  typedef std::list<Face_handle>                        Faces_list;
-  typedef typename std::list<Face_handle>::iterator     Faces_list_iterator;
-
-  typedef Unique_hash_map<Vertex_handle, bool>          Vertices_hash;
-  typedef Unique_hash_map<Halfedge_handle, bool>        Halfedges_hash;
-  typedef Unique_hash_map<Halfedge_handle, Multiplicity>
-                                                        Halfedges_hash_w_type;
-  typedef Unique_hash_map<Face_handle, bool>            Faces_hash;
-
-  typedef Unique_hash_map<Vertex_handle, Vertex_handle> Vertices_map;
-  typedef Unique_hash_map<Halfedge_handle, Halfedge_handle>
-                                                        Halfedges_map;
-  typedef Unique_hash_map<Face_handle, Face_handle>     Faces_map;
-
-  typedef Unique_hash_map<Vertex_handle, Halfedge_handle>
-                                                        Vertices_to_edges_map;
-  
-  typedef std::pair<X_monotone_curve_2, Multiplicity>   Intersection_curve;
-  typedef std::list<Object>                             Intersections_list;
-
-  // this is used in the resolve edge process
-  typedef Triple<Point_2, bool, bool>                   Point_2_with_info;
-  struct Points_compare
-  {
-  protected:
-    const Traits* p_traits;
-
-  public:
-    // Constructor
-    Points_compare(const Traits& geom_traits) : p_traits(&geom_traits) {}
-
-    bool operator()(const Point_2_with_info& p1,
-                     const Point_2_with_info& p2) const
-    {
-      // The original code seemed to presume that two Points are never equal
-      // This is not true, there are various counter examples. 
-      // e.g the intersection of surf1 and surf2 may have ending edge and 
-      // a starting edge on the to be resolved edge 
-      return 
-        p_traits->compare_xy_2_object()(p1.first, p2.first) == SMALLER;  
-    }
-  };
-  
-public:
-  // c'tor
-  Envelope_element_visitor_3(Envelope_type t = ENVELOPE_LOWER)
-  {
-    // Allocate the traits.
-    m_traits = new Traits;
-    own_traits = true;
-    type  = t;
-  }
-
-  Envelope_element_visitor_3(const Traits* tr,
-                             Envelope_type t = ENVELOPE_LOWER)
-  {
-    // Set the traits.
-    m_traits = tr;
-    own_traits = false;
-    type  = t;
-  }
-
-  // virtual destructor.
-  virtual ~Envelope_element_visitor_3()
-  {
-    // Free the traits object, if necessary.
-    if (own_traits)
-      delete m_traits;
-  }
-
-  // get a face with 2 surfaces defined over it, and compute the arrangement
-  // of the/ envelope of these surfaces over the face
-  void resolve(Face_handle face, Minimization_diagram_2& result)
-  {
-    CGAL_assertion(face->get_aux_is_set(0));
-    CGAL_assertion(face->get_aux_is_set(1));
-    
-    // we are interested with the envelope's shape over the current face,
-    // so we only need to check the first surface from each group, since
-    // all the surfaces in a group overlap over the current face.
-    const Xy_monotone_surface_3& surf1 = get_aux_surface(face, 0);
-    const Xy_monotone_surface_3& surf2 = get_aux_surface(face, 1);
-
-    // find the projected intersections of the surfaces. if none - we have
-    // a simple case:
-    // need only resolve non-intersecting and return
-    std::list<Object> inter_objs;
-    get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs));
-
-    if (inter_objs.size() == 0)
-    {
-      // here for resolve we can compare the surfaces over the edges only
-      // (no need for left/right versions)
-      Comparison_result cur_res = resolve_minimal_face(face);
-      copy_data_by_comparison_result(face, face, cur_res);
-      // check face boundary for "data from face" features
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      copy_data_to_face_boundary(face);
-#endif
-      return;
-    }
-    
-    // we insert all projected intersections into a temporary arrangement,
-    // with only the current face's curves, to find the arrangement of the
-    // lower envelope of the 2 surfaces over the current face
-    Minimization_diagram_2 copied_face_arr(m_traits);
-
-    // here we maintain a mapping between edges in the copied arrangement and
-    // their original generating edge from result
-    Halfedges_map map_copied_to_orig_halfedges;
-    // here we maintain a mapping between vertices in the copied arrangement
-    // and their original generating vertex from result
-    Vertices_map  map_copied_to_orig_vertices;
-    // here we maintain a mapping between faces in the copied arrangement and
-    // their corresponding face from result
-    Faces_map     map_copied_to_orig_faces;
-
-    // now, insert the face's boundary into the temporary minimization diagram
-    // the face is assumed to have outer boundary, and may also have holes,
-    // and isolated vertices
-    // we need to keep track of the original halfedges in the inserted halfedges
-    // we also need to have the face handle of the copied face in
-    // copied_face_arr
-    Face_handle copied_face = copy_face(face, result, copied_face_arr,
-                                        map_copied_to_orig_halfedges,
-                                        map_copied_to_orig_vertices);
-    CGAL_assertion(copied_face_arr.is_valid());
-    map_copied_to_orig_faces[copied_face] = face;
-    
-    
-    // insert the projected intersections into the temporary minimization diagram
-    Point_2 point;
-    Intersection_curve curve;
-    Object cur_obj;
-    
-    // we use our zone visitor, which only inserts into the arrangement the
-    // points and curves which are inside the copied face
-    // it updates the result arrangement at the same time (action after action
-    // using observer to the copied arrangement and accessor to result)
-    // the visitor is responsible for updating:
-    // 1. the collection of special edges. (these are (parts of) edges of the
-
-    //    original face's boundary that overlap with projected intersections
-    Halfedges_list result_special_edges;
-    // 2. the collection of newly added edges, each with the type of the
-    //    projected intersection that created it.
-    Halfedges_w_type_list result_new_edges;
-    // 3. the collection of faces that form the face before any insertion
-    Faces_list     result_face_parts;
-    // 4. the collection of special vertices, which contains:
-    //    - new vertices that were created inside the original face
-    //      (both isolated and not isolated)
-    //    - new vertices created by a split of a boundary edge which has
-    //      the property "data from face"
-    //    - original vertices of the boundary that consolidate with projected
-    //      intersections, and have common aux data with the face
-    //    all these vertices should have their data set as "EQUAL"
-    Vertices_list  result_special_vertices;
-
-    New_faces_observer new_faces_obs(result);    
-    Copied_face_zone_visitor zone_visitor(result,
-                                          copied_face_arr,
-                                          face,
-                                          copied_face,
-                                          map_copied_to_orig_halfedges,
-                                          map_copied_to_orig_vertices,
-                                          map_copied_to_orig_faces,
-                                          result_special_edges,
-                                          result_new_edges,
-                                          result_face_parts,
-                                          result_special_vertices,
-                                          this);
-
-    Md_point_location pl(copied_face_arr);
-    std::list<Object>::iterator inter_objs_it = inter_objs.begin();
-    for (; inter_objs_it != inter_objs.end(); ++inter_objs_it)
-    {
-      cur_obj = *inter_objs_it;
-      CGAL_assertion(!cur_obj.is_empty());
-      if (assign(point, cur_obj))
-      {
-        // intersection can be a point when the surfaces only touch each other.
-        // we are only interested in the points that are inside the face or
-        // on its boundary.
-        // we insert the point into the planar map as a vertex, with both
-        // surfaces over it.
-        // should use observer for split_edge
-        // if not in a sub-face of "face", shouldn't insert it
-        // the above information is available in zone_visitor
-        insert_point(copied_face_arr, point, pl, zone_visitor);
-      }
-      else if (assign(curve, cur_obj))
-      {
-        zone_visitor.set_current_intersection_type(curve.second);
-        insert(copied_face_arr, curve.first, pl, zone_visitor);
-        CGAL_assertion(copied_face_arr.is_valid());
-        CGAL_assertion(result.is_valid());
-      }
-      else
-        CGAL_error_msg( "wrong projected intersection type");
-    }
-
-    zone_visitor.finish();
-
-    // now determine the envelope data in result over the new faces
-    
-    // in order to use resolve_minimal_face with intersection halfedge, we
-    // go over the new edges, and set data over their faces
-    typename Halfedges_w_type_list::iterator new_edge_it;
-    for (new_edge_it = result_new_edges.begin();
-         new_edge_it != result_new_edges.end(); ++new_edge_it)
-    {
-      Halfedge_handle new_he = (*new_edge_it).first;
-      Halfedge_handle new_he_twin = new_he->twin();
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      Multiplicity itype = (*new_edge_it).second;
-#endif
-      // set sources of the new edge
-      new_he->set_aux_source(0, face->get_aux_source(0));
-      new_he->set_aux_source(1, face->get_aux_source(1));
-      new_he_twin->set_aux_source(0, face->get_aux_source(0));
-      new_he_twin->set_aux_source(1, face->get_aux_source(1));
-
-      // set data on new edges
-      new_he->set_decision(EQUAL);
-      new_he_twin->set_decision(EQUAL);
-      
-      // set data on the faces
-      // could be that the data is set for f2, and can use itype to conclude
-      // to f1, not only the opposite
-      Face_handle f1 = new_he->face(), f2 = new_he_twin->face();
-      Comparison_result res;
-      if (!f1->is_decision_set() && !f2->is_decision_set())
-      {
-        res = resolve_minimal_face(f1, &new_he);
-        copy_data_by_comparison_result(face, f1, res);
-      }
-
-      // now at least one of the faces f1,f2 has its decision set.      
-
-      // if the other face doesn't have its data, we resolve it using
-      // the former result and the intersection type (if exists)
-      if (!f2->is_decision_set())
-      {
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-        if (itype != 0)
-        {
-          res = convert_decision_to_comparison_result(f1->get_decision());
-          res = resolve_by_intersection_type(res, itype);
-          CGAL_expensive_assertion_code
-            (Comparison_result tmp_res =
-             resolve_minimal_face(f2, &new_he_twin););
-          CGAL_expensive_assertion(tmp_res == res);
-        }
-        else
-          res = resolve_minimal_face(f2, &new_he_twin);
-#else
-        res = resolve_minimal_face(f2, &new_he_twin);
-#endif
-        copy_data_by_comparison_result(face, f2, res);
-      }
-      if (!f1->is_decision_set())
-      {
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-        if (itype != 0)
-        {
-          res = convert_decision_to_comparison_result(f2->get_decision());
-          res = resolve_by_intersection_type(res, itype);
-          CGAL_expensive_assertion_code
-            (Comparison_result tmp_res = resolve_minimal_face(f1, &new_he));
-          CGAL_expensive_assertion(tmp_res == res);
-        }
-        else
-          res = resolve_minimal_face(f1, &new_he);
-#else
-        res = resolve_minimal_face(f1, &new_he);
-#endif
-        copy_data_by_comparison_result(face, f1, res);
-      }
-    }
-    
-    // we also need to check the faces incident to the halfedges in
-    // special_edges since the envelope data over them should be computed
-    // using compare_left/right versions
-    Halfedges_list_iterator special_edge_it;
-    for (special_edge_it = result_special_edges.begin();
-         special_edge_it != result_special_edges.end(); ++special_edge_it)
-    {
-      // we assume that the halfedge given points to the correct face
-      // (which is inside the original face)
-      Halfedge_handle special_he = *special_edge_it;
-      Face_handle f = special_he->face();
-      if (!f->is_decision_set())
-      {
-        Comparison_result res = resolve_minimal_face(f, &special_he);
-        copy_data_by_comparison_result(face, f, res);      
-      }
-
-      // take care for the edge, if necessary
-      if (!special_he->is_decision_set() &&
-          can_copy_decision_from_face_to_edge(special_he))
-      {
-        // if (!special_he->get_aux_is_set(0) || !special_he->get_aux_is_set(1))
-        // {
-        // // this can only happen when the edge is fake, since the edge is on 
-        //// the face's boundary
-        //      CGAL_assertion(special_he->get_is_fake());
-        //      special_he->set_aux_source(0, face->get_aux_source(0));
-        //      special_he->set_aux_source(1, face->get_aux_source(1));
-        //      special_he->twin()->set_aux_source(0, face->get_aux_source(0));
-        //      special_he->twin()->set_aux_source(1, face->get_aux_source(1));
-        //   }
-      	//if (special_he->get_is_fake())
-      	//{
-      	//  // this edge is not fake anymore, as it coincides with a projected
-      	//  // intersection
-      	//  special_he->set_is_fake(false);
-      	//  special_he->twin()->set_is_fake(false);
-        // }
-        special_he->set_decision(EQUAL);
-        special_he->twin()->set_decision(EQUAL);
-      }
-    }
-
-    // update data on special vertices
-    Vertices_list_iterator special_vertex_it;
-    for (special_vertex_it = result_special_vertices.begin();
-         special_vertex_it != result_special_vertices.end(); ++special_vertex_it)
-    {
-      Vertex_handle special_v = *special_vertex_it;
-      if (!special_v->is_decision_set())
-      {
-      
-        if (special_v->get_aux_is_set(0) && special_v->get_aux_is_set(1))
-          set_data_by_comparison_result(special_v, EQUAL);
-        else
-          // this is a new vertex inside the face, so we need to update its
-          // aux source information from face also (done in method)
-          copy_all_data_to_vertex(face, special_v);
-      } else
-        CGAL_assertion(special_v->get_aux_is_set(0) &&  \
-                       special_v->get_aux_is_set(1));
-    }
-    
-    // assert all new faces got data set, if not, then maybe no curve cuts
-    // the face, and should use regular resolve_minimal_face
-    typename std::list<Face_handle>::iterator new_face_it;
-    for (new_face_it = result_face_parts.begin();
-         new_face_it != result_face_parts.end(); ++new_face_it)
-    {
-      Face_handle new_face = *new_face_it;
-      if (!new_face->is_decision_set())
-      {
-        Comparison_result res = resolve_minimal_face(new_face);
-        copy_data_by_comparison_result(face, new_face, res);
-      }
-
-      // check face boundary for "data from face" features
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      copy_data_to_face_boundary(new_face);
-#endif
-    }
-  }    
-
-  // get an edge with 2 surfaces defined over it, and split it to get the shape
-  // of the envelope of these surfaces over the edge
-  void resolve(Halfedge_handle edge, Minimization_diagram_2& result)
-  {
-    const Xy_monotone_surface_3& surf1 = get_aux_surface(edge, 0);
-    const Xy_monotone_surface_3& surf2 = get_aux_surface(edge, 1);
-
-    // find the projected intersections
-    std::list<Object> inter_objs;
-    get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs));
-
-    if (inter_objs.size() == 0)
-    {
-      resolve_minimal_edge(edge, edge);
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      copy_data_to_edge_endpoints(edge);
-#endif
-      return;
-    }
-
-    const X_monotone_curve_2& original_cv = edge->curve();
-    
-    // we want to work on the halfedge going from left to right
-    // we use HE_COMP_RES so this code can compile both with Arr_2
-    // and with Aos_2.
-    if (HE_COMP_RES(edge) != SMALLER)
-      edge = edge->twin();
-      
-    Vertex_handle original_src = edge->source();
-    Vertex_handle original_trg = edge->target();
-    
-    // we should have a list of points where we should split the edge's curve
-    // we then will sort the list, and split the curve
-
-    // we should pay a special attension for overlaps, since we can get special
-    // edges
-
-    // we associate with every point 2 flags:
-    // 1. is the point a left endpoint of an overlapping segment
-    // 2. is the point a right endpoint of an overlapping segment
-    typedef std::vector<Point_2_with_info>      Points_vec;
-    Points_vec                                  split_points;
-    bool is_min_end_at_inf = false;
-    bool is_max_end_at_inf = false;
-
-    Point_2 point;
-    Intersection_curve icurve;
-    Object cur_obj;
-
-    std::list<Object>::iterator inter_objs_it = inter_objs.begin();
-    for (; inter_objs_it != inter_objs.end(); ++inter_objs_it)
-    {
-      cur_obj = *inter_objs_it; 
-      CGAL_assertion(!cur_obj.is_empty());
-      if (assign(point, cur_obj))
-      {
-        // if the point is on the curve, should add it the the split points
-        // list, otherwise, it is irrelevant and should be ignored
-        if (is_point_on_curve(point, original_cv))
-          split_points.push_back(Point_2_with_info(point, false, false));
-      }
-      else if (assign(icurve, cur_obj))
-      {
-        const X_monotone_curve_2& x_curve = icurve.first;
-
-        // find the intersection points and overlapping segments with the
-        // original curve and insert them to the list of split points
-        // intersect the x-monotone curve with the edge's curve
-        typedef std::pair<Point_2, unsigned int> Intersect_point_2;
-        std::list<Object> intersections_list;
-        const Intersect_point_2* ip;
-        const X_monotone_curve_2* icv;
-        
-        m_traits->intersect_2_object()(x_curve, original_cv,
-                                       std::back_inserter(intersections_list));
-
-        std::list<Object>::iterator inter_it = intersections_list.begin();
-        for (; inter_it != intersections_list.end(); ++inter_it)
-        {
-          ip = object_cast<Intersect_point_2>(&(*inter_it));
-          if (ip != NULL)
-          {
-            split_points.push_back(Point_2_with_info(ip->first, false, false));
-          }
-          else
-          {
-            icv = object_cast<X_monotone_curve_2>(&(*inter_it));
-            CGAL_assertion(icv != NULL);
-
-            // we will add the *icv end points to the split_points, unless
-            // but we should be carefull with infinite curves.
-            Arr_traits_adaptor_2<Traits> tr_adaptor(*m_traits);
-            if (tr_adaptor.parameter_space_in_y_2_object()
-                (*icv, ARR_MIN_END) == ARR_INTERIOR &&
-                tr_adaptor.parameter_space_in_x_2_object()
-                (*icv, ARR_MIN_END) == ARR_INTERIOR)
-              split_points.push_back
-                (Point_2_with_info
-                 (m_traits->construct_min_vertex_2_object()(*icv),
-                  true, false));
-            else
-              is_min_end_at_inf = true;
-
-            if (tr_adaptor.parameter_space_in_y_2_object()
-                (*icv, ARR_MAX_END) == ARR_INTERIOR &&
-                tr_adaptor.parameter_space_in_x_2_object()
-                (*icv, ARR_MAX_END) == ARR_INTERIOR)
-              split_points.push_back
-                (Point_2_with_info(m_traits->construct_max_vertex_2_object()
-                                   (*icv),
-                                   false, true));
-            else
-              is_max_end_at_inf = true;
-          }
-        }       
-      }
-     
-      else
-        CGAL_error_msg( "wrong projected intersection type");
-    }
-    
-    // if there aren't any split points, we can finish
-    if (split_points.empty())
-    {
-      resolve_minimal_edge(edge, edge);
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      copy_data_to_edge_endpoints(edge);
-#endif
-      return;
-    }
-   
-    // sort the split points from left to right
-    // and split the original edge in these points
-    Points_compare comp(*m_traits);
-    std::sort(split_points.begin(), split_points.end(), comp);
- 
-    // if overlaps > 0 it will indicate that we are inside an overlapping
-    // segment meaning, we have a special edge
-    int overlaps = 0;    
-
-    // check if source is a special vertex (i.e. also a projected intersection)
-    // by checking the first point in the list
-    bool source_is_special = false;
-    CGAL_assertion(split_points.size() >= 1);
-    if ((!original_src->is_at_open_boundary() && 
-         m_traits->equal_2_object()(split_points[0].first,
-                                    original_src->point())) ||
-        (original_src->is_at_open_boundary() && is_min_end_at_inf))
-    {
-      source_is_special = true;
-      if (split_points.front().third == true)
-        overlaps++;
-    }
-    
-    // check if target is a special vertex, by checking the last point in
-    // the list
-    bool target_is_special = false;
-    if ((!original_trg->is_at_open_boundary() && 
-         m_traits->equal_2_object()(split_points[split_points.size()-1].first, 
-                                    original_trg->point())) ||
-        (original_trg->is_at_open_boundary() && is_max_end_at_inf))
-      target_is_special = true;
-
-    
-
-    // remember the envelope decision over the first & last parts, to
-    // be able to copy it to the original endpoints
-    // TODO: the initial value is only needed to shut up the compiler
-    // TODO: is this realy needed, or we can use the decision made on "edge"
-    // (is "edge" always the first part? )
-    Comparison_result first_part_res = EQUAL;
-    
-    // cur_part is the part of the original edge that might be split
-    Halfedge_handle cur_part = edge;
-
-    for (unsigned int i = 0; i < split_points.size(); ++i)
-    {
-      Point_2_with_info cur_p = split_points[i];
-      // if we get to the target vertex, we end the loop, since no more splits
-
-      // are needed
-      if (!original_trg->is_at_open_boundary() && 
-          m_traits->equal_2_object()(cur_p.first, original_trg->point()))
-        break;
-        
-      Vertex_handle cur_src_vertex = cur_part->source();
-
-      // check that the current split point is not already a vertex
-      if ((!cur_src_vertex->is_at_open_boundary() && 
-           !m_traits->equal_2_object()(cur_p.first, cur_src_vertex->point())) ||
-          cur_src_vertex->is_at_open_boundary())
-
-      {
-        // split the edge in this point
-        X_monotone_curve_2 a,b;
-
-        m_traits->split_2_object()(cur_part->curve(), cur_p.first, a, b);
-        // todo: can we use the internal split?
-        Halfedge_handle split_he = result.split_edge(cur_part, a, b);
-        // split always returns the halfedge with source = cur_part.source
-        CGAL_assertion(split_he->source() == cur_src_vertex);
-
-        // the new vertex is split_he->target(), we set envelope data on it
-        copy_all_data_to_vertex(edge, split_he->target());
-
-        // identify the part of the split edge that we are finished with
-        // (this is the one with cur_src_vertex),
-        // and the part that might be split again
-        Halfedge_handle finished_part = split_he;
-        cur_part = split_he->next();
-
-        // set the envelope data over the finished part
-        // if the finished part is a special edge, and no verticals are
-        // involved we can set both aux data on it. otherwise we should use
-        // the traits compare method.
-        Comparison_result finished_part_res;
-        if (overlaps > 0)
-          finished_part_res = EQUAL;
-        else
-          finished_part_res = resolve_minimal_edge(edge, finished_part);
-
-        finished_part->set_decision(finished_part_res);
-        finished_part->twin()->set_decision(finished_part_res);
-
-        if (finished_part == edge)
-          first_part_res = finished_part_res;
-      }
-
-      // check the overlaps indications
-      if (cur_p.second == true)
-        ++overlaps; // we start a new overlapping segment at this point
-      if (cur_p.third == true)
-        --overlaps; // we end an overlapping segment at this point
-              
-    }
-
-    // set envelope data on the last part (cur_part)
-    // if the last part is a special edge, and no verticals are involved
-    // we can set both aux data on it. otherwise we should use the traits
-    // compare method.
-
-    Comparison_result cur_part_res =
-      (overlaps > 0) ? EQUAL : resolve_minimal_edge(edge, cur_part);
-
-    cur_part->set_decision(cur_part_res);
-    cur_part->twin()->set_decision(cur_part_res);
-
-    if (cur_part == edge)
-      first_part_res = cur_part_res;
-      
-    // if the original source and target have same aux data as the edge
-    // we can set envelope data over them also
-    // if they are special vertices, we set both aux data. otherwise we copy
-    // from the incident edge part.
-
-
-    // the incident edge part to source should be edge (the first part)
-    CGAL_assertion(original_src == edge->source());
-    if (!original_src->is_decision_set() &&
-        can_copy_decision_from_edge_to_vertex(edge->twin()))
-    {
-      if (source_is_special)
-        set_data_by_comparison_result(original_src, EQUAL);
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      else
-        set_data_by_comparison_result(original_src, first_part_res);
-#endif
-
-    }
-    // the incident edge part to target should be cur_part (the last part)
-    CGAL_assertion(original_trg == cur_part->target());
-    if (!original_trg->is_decision_set() &&
-        can_copy_decision_from_edge_to_vertex(cur_part))
-    {
-      if (target_is_special)
-        set_data_by_comparison_result(original_trg, EQUAL);
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-      else
-        set_data_by_comparison_result(original_trg, cur_part_res);
-#endif
-    }
-
-  }
-  
-  // get a vertex with 2 surfaces defined over it and decide the envelope data
-  // on it between them
-  void resolve(Vertex_handle vertex)
-  {
-    // it is enough to compare only one surface from each group (because they
-    // all overlap over the vertex), but set all the group
-    const Xy_monotone_surface_3& surf1 = get_aux_surface(vertex, 0);
-    const Xy_monotone_surface_3& surf2 = get_aux_surface(vertex, 1);
-    const Point_2& point_2 = vertex->point();
-    Comparison_result cur_res =
-      compare_distance_to_envelope(point_2, surf1, surf2);
-    vertex->set_decision(cur_res);
-  }
-
-  /*! Access the traits object (const version). */
-  const Traits* traits() const { return (m_traits); }
-
-protected:
-
-  // The function locate p in arr, and calls the appropriate function in
-  // visitor.
-  Vertex_handle insert_point(Minimization_diagram_2& arr, const Point_2& p,
-                             const Md_point_location& pl, 
-                             Copied_face_zone_visitor& visitor)
-  {
-    const Face_const_handle* fh;
-    const Halfedge_const_handle* hh;
-    const Vertex_const_handle* vh;
-    Vertex_handle vh_for_p;
-
-    CGAL::Object obj = pl.locate(p);
-    visitor.init(&arr);
-  
-    if ((fh = object_cast<Face_const_handle>(&obj))
-        != NULL)
-    {
-      vh_for_p = visitor.found_point_in_face(p, arr.non_const_handle(*fh));
-    }
-    else if ((hh = object_cast<Halfedge_const_handle>(&obj)) != NULL)
-    {
-      vh_for_p = visitor.found_point_on_edge(p , arr.non_const_handle(*hh));
-    }
-    else
-    {
-      // In this case p lies on an existing vertex, so we just update this
-      // vertex.
-      vh = object_cast<Vertex_const_handle>(&obj);
-      CGAL_assertion(vh != NULL);
-      vh_for_p = visitor.found_point_on_vertex(p, arr.non_const_handle(*vh));
-    }
-
-    // Return a handle for the vertex associated with p.
-    return (vh_for_p);
-
-  }
-
-
-  // compute Comparison_result of surfaces over the face, assuming they get 
-  // the same answer for all points in face
-  // if we get a halfedge, it is assumed to be on the outer boundary of the 
-  // face, and its curve is assumed to be a projected intersection curve, 
-  // and we compare the surfaces to the left/right of it
-  // otherwise we compare the surfaces over an (arbitrary) edge of the face,
-  // assuming this is the correct answer for the face since the surfaces are 
-  // continous
-  // In either case, we try to copy decision from an incident face, is possible
-  // before asking the geometric question
-  Comparison_result resolve_minimal_face(Face_handle face, 
-                                         Halfedge_handle* he = NULL)
-  {
-    CGAL_precondition(he == NULL || (*he)->face() == face);
-    Comparison_result res = EQUAL;
-
-    bool success = false;
-#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
-    success = can_copy_decision_from_boundary_edge(face, res);
-#endif
-    
-    if (success)
-      return res;
-      
-    const Xy_monotone_surface_3& surf1 = get_aux_surface(face, 0);
-    const Xy_monotone_surface_3& surf2 = get_aux_surface(face, 1);
-
-    Ccb_halfedge_circulator hec;
-    if (he == NULL)
-    {
-      // compare the surfaces over arbitrary edge
-      bool found_edge = false;
-      Outer_ccb_iterator outer_ccb = face->outer_ccbs_begin();
-      for (; outer_ccb != face->outer_ccbs_end() && !found_edge; ++outer_ccb)
-      {
-        hec = *outer_ccb;
-        Ccb_halfedge_circulator curr = hec;
-        do
-        {
-          Halfedge_handle he = hec;
-          if(he->is_fictitious())
-            ++hec;
-          else
-          {
-            found_edge = true;
-            const X_monotone_curve_2& cv = hec->curve();
-            res = compare_distance_to_envelope(cv,surf1,surf2);
-
-            break;
-          }
-        }
-        while(curr != hec);
-      }
-
-      if(!found_edge)
-      {
-        // all edges are fictitous, we have two infinite surfaces.
-        // but still, there can be holes.
-        if(face->inner_ccbs_begin() != face->inner_ccbs_end())
-        {
-          Inner_ccb_iterator hit = face->inner_ccbs_begin();
-          hec = *hit;
-          CGAL_assertion(!hec->is_fictitious());
-          const X_monotone_curve_2& cv = hec->curve();
-          res = compare_distance_to_envelope(cv, surf1, surf2);
-        }
-        else
-        {
-          //two infinite surfaces, no outer boundary or holes. 
-          res =
-            compare_distance_to_envelope(surf1, surf2, 
-                                         Are_all_sides_oblivious_category());
-        }
-      }
-      
-      //assertion code begin
-      // check that result is equal on all edges
-      CGAL_assertion_code(Ccb_halfedge_circulator hec_begin = hec;
-                          ++hec;
-                          while (hec != hec_begin) {
-                            if(hec->is_fictitious()) {
-                              ++hec;
-                              continue;
-                            }
-                            Comparison_result tmp =
-                              compare_distance_to_envelope(hec->curve(),
-                                                           surf1, surf2);
-                            );
-      CGAL_assertion_msg(tmp == res, 
-                         "compare over curve returns non-consistent results");
-      CGAL_assertion_code(   ++hec;
-                          }
-                          );
-      //assertion code end
-      return res;
-    }
-    else
-    {
-      // compare the surfaces over the halfedge's curve
-      const X_monotone_curve_2& cv = (*he)->curve();
-
-      // a face is always to the left of its halfedge
-      // we use HE_COMP_RES so this code can compile both with Arr_2
-      // and with Aos_2.
-      if (HE_COMP_RES(*he) == SMALLER)
-      {
-        res = m_traits->compare_z_at_xy_above_3_object()(cv,surf1,surf2);
-        if(type == ENVELOPE_UPPER)
-          res = CGAL::opposite(res);
-      }
-      else
-      {
-        res = m_traits->compare_z_at_xy_below_3_object()(cv,surf1,surf2);
-        if(type == ENVELOPE_UPPER)
-          res = CGAL::opposite(res);
-
-      }
-    }
-    return res;
-  }
-
-  // use the Intersection type (Transversal/Tangent) and return the appropriate
-  // comparison result of the other side of the intersection curve, 
-  // if the first side has result "res"
-  Comparison_result resolve_by_intersection_type(Comparison_result res,
-                                                 Multiplicity itype)
-  {
-    itype %= 2;
-    if (itype == 1)
-    {
-      if (res == LARGER)
-        return SMALLER;
-      else if (res == SMALLER)
-        return LARGER;
-      else
-        return res;
-    }
-    else
-    {
-      CGAL_assertion(itype == 0);
-      return res;
-    }
-
-  }
-  
-  // find intersections between 2 xy-monotone surfaces
-  // use caching for repeating questions of same pair of surfaces
-  template <typename OutputIterator>
-  OutputIterator get_projected_intersections(const Xy_monotone_surface_3& s1,
-                                             const Xy_monotone_surface_3& s2,
-                                             OutputIterator o)
-  {
-    return m_traits->construct_projected_intersections_2_object()(s1, s2, o);
-  }
-
-  // Geometry can be a Point_2 or a X_monotone_curve_2
-  template <typename Geometry>
-  Comparison_result
-  compare_distance_to_envelope(Geometry& g,
-                               const Xy_monotone_surface_3& s1,
-                               const Xy_monotone_surface_3& s2)
-  {
-    Comparison_result res = m_traits->compare_z_at_xy_3_object()(g, s1, s2);
-    return ((type == ENVELOPE_LOWER) ? res : CGAL::opposite(res));
-  }
-  
-
-  // compare two infinite surfaces with no boundary or holes
-  Comparison_result
-  compare_distance_to_envelope(const Xy_monotone_surface_3& s1,
-                               const Xy_monotone_surface_3& s2,
-                               Arr_not_all_sides_oblivious_tag)
-  {
-    Comparison_result res = m_traits->compare_z_at_xy_3_object()(s1, s2);
-    return ((type == ENVELOPE_LOWER) ? res : CGAL::opposite(res));
-  }
-
-  // compare two infinite surfaces with no boundary or holes
-  Comparison_result compare_distance_to_envelope(const Xy_monotone_surface_3&,
-                                                 const Xy_monotone_surface_3&,
-                                                 Arr_all_sides_oblivious_tag)
-  {
-    CGAL_error(); // doesnt' suppose to reach here at all!!!
-    return SMALLER;
-  }
-
-  // helper method to get the surfaces we need to work on
-  template <typename FeatureHandle>
-  const Xy_monotone_surface_3& get_aux_surface(FeatureHandle fh,
-                                               unsigned int id)
-  {
-    const Object& o = fh->get_aux_source(id);
-    CGAL_assertion(!o.is_empty());
-    
-    // aux source of a face must be a face!
-    // aux source of a halfedge can be face or halfedge
-    // aux source of a vertex can be face, halfedge or vertex
-    // this is why we start with a check for a face, then halfedge
-    // and last vertex
-    Face_handle f;
-    if (assign(f, o)) 
-      return f->get_data();
-    
-    Halfedge_handle h;
-    if (assign(h, o))
-      return h->get_data();
-  	
-    Vertex_handle v;
-    CGAL_assertion_code(bool b =)
-      assign(v, o);
-    CGAL_assertion(b);
-    return v->get_data();
-  }
-                                  
-  bool can_copy_decision_from_face_to_edge(Halfedge_handle h)
-  {
-    // can copy decision from face to its incident edge if the aux
-    // envelopes are continous over the face and edge
-    return (h->get_has_equal_aux_data_in_face(0) &&
-            h->get_has_equal_aux_data_in_face(1));
-  }
-
-  bool can_copy_decision_from_edge_to_vertex(Halfedge_handle h)
-  {
-    // can copy decision from face to its incident edge if the aux
-    // envelopes are continous over the face and edge
-    return (h->get_has_equal_aux_data_in_target(0) &&
-            h->get_has_equal_aux_data_in_target(1));
-  }
-
-
-  // check the aux data on the edges & vertices of the boundary of the face,
-  // and if it equals the aux data on the face, copy it, to save calculations
-  // these features later
-  // also consider isolated vertices
-  // "res" is the decision made on the face
-  void copy_data_to_face_boundary(Face_handle face)
-  {
-    Ccb_halfedge_circulator ccb;
-
-    Outer_ccb_iterator outer_iter = face->outer_ccbs_begin();
-    for (; outer_iter != face->outer_ccbs_end(); ++outer_iter)
-    {
-      ccb = *outer_iter;
-      copy_data_to_face_boundary(face, ccb);
-    }
-
-    Inner_ccb_iterator inner_iter = face->inner_ccbs_begin();
-    for (; inner_iter != face->inner_ccbs_end(); ++inner_iter)
-    {
-      ccb = (*inner_iter);
-      copy_data_to_face_boundary(face, ccb);
-    }
-
-    Isolated_vertex_iterator iso_iter = face->isolated_vertices_begin();
-    for (; iso_iter != face->isolated_vertices_end(); ++iso_iter)
-    {
-      Vertex_handle vh = iso_iter;
-      if (!vh->is_decision_set() && has_equal_aux_data_with_face(vh))
-        // can copy the data from the face, since we already took care of
-        // the vertices of projected intersections
-        vh->set_decision(face->get_decision());
-    }
-  }
-
-  void copy_data_to_face_boundary(Face_handle face,
-                                  Ccb_halfedge_circulator hec)
-  {
-    Ccb_halfedge_circulator hec_begin = hec;
-    do {
-      Halfedge_handle hh = hec;
-      if(hh->is_fictitious())
-      {
-        ++hec;
-        continue;
-      }
-      CGAL_assertion(face == hh->face());
-      // if it is a vertical decomposition edge, copy data from face
-      /*if (!hh->is_decision_set() && hh->get_is_fake())
-        {
-        hh->set_decision(face->get_decision());
-        hh->twin()->set_decision(face->get_decision());
-        }*/
-      if (!hh->is_decision_set() && can_copy_decision_from_face_to_edge(hh))
-      {
-        // copy the decision from face to the edge
-        hh->set_decision(face->get_decision());
-        hh->twin()->set_decision(hh->get_decision());
-      }
-      // TODO: is this correct? shouldn't we split the edge first?
-      // I think it is correct, because there is no intersection (of
-      // the edges aux sources) over the edge, as if there was such
-      // intersection, there would also be intersection between the surfaces
-      // over the face, and we know now that there isn't.
-      
-      // if the first map is continous, but the second isn't (i.e. when we move
-      // from the face to the edge, the envelope goes closer), then if the
-      // second map wins on the face, it wins on the edge also
-      else if (!hh->is_decision_set() &&
-               face->get_decision() == DAC_DECISION_SECOND &&
-               hh->get_has_equal_aux_data_in_face(0) &&
-               !hh->get_has_equal_aux_data_in_face(1))
-      {
-        hh->set_decision(DAC_DECISION_SECOND);
-        hh->twin()->set_decision(DAC_DECISION_SECOND);
-
-      }
-      // if the second map is continous, but the first isn't, then if the
-      // first map wins on the face, it wins on the edge also
-      else if (!hh->is_decision_set() &&
-               face->get_decision() == DAC_DECISION_FIRST &&
-               !hh->get_has_equal_aux_data_in_face(0) &&
-               hh->get_has_equal_aux_data_in_face(1))
-      {
-        hh->set_decision(DAC_DECISION_FIRST);
-        hh->twin()->set_decision(DAC_DECISION_FIRST);
-      }
-
-      // conclude to the vertices
-      // we check both endpoints, since it can be possible that we cannot
-      // conclude from one edge, bt can conclude from the other
-      conclude_decision_to_vertex(hh->source(), hh->twin(), face, false);
-      conclude_decision_to_vertex(hh->target(), hh, face, true);
-                      
-      hec++;
-    } while(hec != hec_begin); 
-  }
-
-  // try to conclude the decision from the halfedge or the face to the vertex
-  // the method assumes that the vertex is an endpoint of the edge represented
-  // by "hh", which lies on the boundary of "fh"
-  // the last bool indicates whether to check if possible to conclude from
-  // face to vertex. it is only possible when hh->face == fh
-  void conclude_decision_to_vertex(Vertex_handle vh, Halfedge_handle hh,
-                                   Face_handle fh, bool try_vertex_face)
-  {
-    if (vh->is_decision_set())
-      return;
-
-
-    // first, we try to copy decision from edge, then from face
-    if (hh->is_decision_set() &&
-        can_copy_decision_from_edge_to_vertex(hh))
-    {
-      vh->set_decision(hh->get_decision());
-    }
-    // if the first map is continous, but the second isn't (i.e. when we move
-    // from the edge to the vertex, the envelope goes closer), then if the
-    // second map wins on the edge, it wins on the vertex also
-    else if (hh->get_decision() == DAC_DECISION_SECOND &&
-             hh->get_has_equal_aux_data_in_target(0) &&
-             !hh->get_has_equal_aux_data_in_target(1))
-    {
-      vh->set_decision(DAC_DECISION_SECOND);
-    }
-    // if the second map is continous, but the first isn't, then if the
-    // first map wins on the edge, it wins on the vertex also
-    else if (hh->get_decision() == DAC_DECISION_FIRST &&
-             !hh->get_has_equal_aux_data_in_target(0) &&
-             hh->get_has_equal_aux_data_in_target(1))
-    {
-      vh->set_decision(DAC_DECISION_FIRST);
-    }
-    // check if we can copy from the face
-    // todo: what if has_equal has 3 possible values? (and projected
-    // ersection vertices have unknown flags)
-    else if (try_vertex_face)
-    {
-      /*CGAL_assertion(has_equal_aux_data_in_target_and_face(hh) == 
-        has_equal_aux_data(vh, fh));*/
-      if (has_equal_aux_data_in_target_and_face(hh))
-      {
-
-        // can copy the data from the face, since we already took care of
-        // the vertices of projected intersections
-        vh->set_decision(fh->get_decision());
-      }
-    }
-  }
-  
-  // todo: this is for checking
-  template <typename InputIterator>
-  bool has_equal_data(const InputIterator& begin1,
-                      const InputIterator& end1,
-                      const InputIterator& begin2,
-                      const InputIterator& end2)
-  {
-    // insert the input data objects into a set
-    std::set<Xy_monotone_surface_3> first(begin1, end1);
-    std::set<Xy_monotone_surface_3> second(begin2, end2);
-    std::list<Xy_monotone_surface_3> intersection;
-    std::set_intersection(first.begin(), first.end(),
-                          second.begin(), second.end(),
-                          std::back_inserter(intersection));
-
-    return (intersection.size() > 0);
-  }
-  // todo: this is for checking
-  template <typename FeatureHandle>
-  void get_aux_data_iterators(unsigned int id, FeatureHandle fh,
-                              Envelope_data_iterator& begin,
-                              Envelope_data_iterator& end)
-  {
-    Halfedge_handle h;
-    Vertex_handle v;
-    Face_handle f;
-
-    const Object& o = fh->get_aux_source(id);
-    CGAL_assertion(!o.is_empty());
-
-    if (assign(v, o))
-    {
-      begin = v->begin_data();
-      end = v->end_data();
-    }
-    else if (assign(h, o))
-    {
-      begin = h->begin_data();
-      end = h->end_data();
-    }
-    else
-    {
-      CGAL_assertion(assign(f, o));
-      assign(f, o);
-      begin = f->begin_data();
-      end = f->end_data();
-    }
-  }
-
-  // todo: this is for checking
-  template <typename FeatureHandle1, typename FeatureHandle2>
-  bool has_equal_aux_data(unsigned int id, FeatureHandle1 fh1,
-                          FeatureHandle2 fh2)
-  {
-    Envelope_data_iterator begin1, end1, begin2, end2;
-    get_aux_data_iterators(id, fh1, begin1, end1);
-    get_aux_data_iterators(id, fh2, begin2, end2);
-    bool has_eq = has_equal_data(begin1, end1, begin2, end2);
-    return has_eq;
-  }
-
-  // todo: this is for checking
-  template <typename FeatureHandle1, typename FeatureHandle2>
-  bool has_equal_aux_data(FeatureHandle1 fh1, FeatureHandle2 fh2)
-  {
-    return (has_equal_aux_data(0, fh1, fh2) &&
-            has_equal_aux_data(1, fh1, fh2));
-  }
-
-
-  // check if we can copy the decision made on a boundary edge to the face
-  // if so, res will contain this decision's comparison result
-  bool can_copy_decision_from_boundary_edge(Face_handle face, 
-                                            Comparison_result& res)
-  {
-    bool result = false;
-    // check outer boundary
-    Ccb_halfedge_circulator hec, hec_begin;
-
-    // check outer boundary
-    Outer_ccb_iterator outer_ccb = face->outer_ccbs_begin();
-    for (; outer_ccb != face->outer_ccbs_end(); ++outer_ccb)
-    {
-      hec = *outer_ccb;
-      hec_begin = hec;
-      do 
-      {
-        Halfedge_handle hh = hec;
-        if(hh->is_fictitious())
-        {
-          ++hec;
-          continue;
-        }
-        if (can_copy_decision_from_face_to_edge(hh) &&
-            
-            hh->is_decision_set() &&
-            hh->get_decision() != DAC_DECISION_BOTH)
-        {
-          res = convert_decision_to_comparison_result(hh->get_decision());
-          result = true;
-        }
-        // if the first map is continous, but the second isn't (i.e. when we
-        // move from the edge to the face, the envelope goes farther), then
-        // if the first map wins on the edge, it wins on the face also
-        else if (hh->is_decision_set() &&
-                 hh->get_decision() == DAC_DECISION_FIRST &&
-                 hh->get_has_equal_aux_data_in_face(0) &&
-                 !hh->get_has_equal_aux_data_in_face(1))
-        {
-          res = convert_decision_to_comparison_result(DAC_DECISION_FIRST);
-          result = true;
-        } 
-        // if the second map is continous, but the first isn't, then if the
-        // second map wins on the edge, it wins on the face also
-        else if (hh->is_decision_set() &&
-                 hh->get_decision() == DAC_DECISION_SECOND &&
-                 !hh->get_has_equal_aux_data_in_face(0) &&
-                 hh->get_has_equal_aux_data_in_face(1))
-        {
-          res = convert_decision_to_comparison_result(DAC_DECISION_SECOND);
-          result = true;
-        }           
-        hec++;
-      } while(hec != hec_begin && !result);
-      if (result) 
-        return true;
-    }
-
-    // check inner boundaries
-    Inner_ccb_iterator hole_iter = face->inner_ccbs_begin();
-    for (; hole_iter != face->inner_ccbs_end(); ++hole_iter)
-    {
-      hec = (*hole_iter);
-      hec_begin = hec;
-
-      do {
-        Halfedge_handle hh = hec;
-        if (can_copy_decision_from_face_to_edge(hh) &&
-            hh->is_decision_set() &&
-            hh->get_decision() != DAC_DECISION_BOTH)
-        {
-          res = convert_decision_to_comparison_result(hh->get_decision());
-          result = true;
-        }
-        // if the first map is continous, but the second isn't (i.e. when we
-        // move from the edge to the face, the envelope goes farther), then
-        // if the first map wins on the edge, it wins on the face also
-        else if (hh->is_decision_set() &&
-                 hh->get_decision() == DAC_DECISION_FIRST &&
-                 hh->get_has_equal_aux_data_in_face(0) &&
-                 !hh->get_has_equal_aux_data_in_face(1))
-        {
-          res = convert_decision_to_comparison_result(DAC_DECISION_FIRST);
-
-          result = true;
-        }
-        // if the second map is continous, but the first isn't, then if the
-        // second map wins on the edge, it wins on the face also
-        else if (hh->is_decision_set() &&
-                 hh->get_decision() == DAC_DECISION_SECOND &&
-                 !hh->get_has_equal_aux_data_in_face(0) &&
-                 hh->get_has_equal_aux_data_in_face(1))
-        {
-          res = convert_decision_to_comparison_result(DAC_DECISION_SECOND);
-          result = true;
-        }
-  
-        hec++;
-      } while(hec != hec_begin && !result);
-      if (result) return true;
-    }
-
-    return result;
-  }
-
-  Comparison_result convert_decision_to_comparison_result(CGAL::Dac_decision d)
-  {
-    return enum_cast<Comparison_result>(d);
-    /*if (d == DAC_DECISION_FIRST)
-      return SMALLER;
-      else if (d == DAC_DECISION_SECOND)
-      return LARGER;
-      else
-      return EQUAL;*/
-  }
-  
-  bool has_equal_aux_data_with_face(Vertex_handle v)
-  {
-    CGAL_assertion(v->is_isolated());
-    return (v->get_has_equal_aux_data_in_face(0) &&
-            v->get_has_equal_aux_data_in_face(1));
-  }
-
-  bool has_equal_aux_data_in_target_and_face(Halfedge_handle h)
-  {
-    return (h->get_has_equal_aux_data_in_target_and_face(0) &&
-            h->get_has_equal_aux_data_in_target_and_face(1));
-  }
-
-  // check the aux data on the endpoint vertices of the edge
-  // and if it equals the aux data on the edge, copy it, to save calculations
-  // for these features later
-  void copy_data_to_edge_endpoints(Halfedge_handle edge)
-  {
-    // take care for source
-    if (!edge->source()->is_decision_set() &&
-        can_copy_decision_from_edge_to_vertex(edge->twin()))
-      // can copy the data from the edge, since we already took care of
-      // the vertices of projected intersections
-      edge->source()->set_decision(edge->get_decision());
-    // if the first map is continous, but the second isn't (i.e. when we move
-    // from the edge to the vertex, the envelope goes closer), then if the
-    // second map wins on the edge, it wins on the vertex also
-    else if (edge->get_decision() == DAC_DECISION_SECOND &&
-             edge->twin()->get_has_equal_aux_data_in_target(0) &&
-             !edge->twin()->get_has_equal_aux_data_in_target(1))
-    {
-      edge->source()->set_decision(DAC_DECISION_SECOND);
-    }
-    // if the second map is continous, but the first isn't, then if the
-    // first map wins on the edge, it wins on the vertex also
-    else if (edge->get_decision() == DAC_DECISION_FIRST &&
-             !edge->twin()->get_has_equal_aux_data_in_target(0) &&
-             edge->twin()->get_has_equal_aux_data_in_target(1))
-    {
-      edge->source()->set_decision(DAC_DECISION_FIRST);
-    }
-
-    // take care for target
-    if (!edge->target()->is_decision_set() &&
-        can_copy_decision_from_edge_to_vertex(edge))
-      // can copy the data from the edge, since we already took care of
-      // the vertices of projected intersections
-      edge->target()->set_decision(edge->get_decision());
-    // if the first map is continous, but the second isn't (i.e. when we move
-    // from the edge to the vertex, the envelope goes closer), then if the
-    // second map wins on the edge, it wins on the vertex also
-    else if (edge->get_decision() == DAC_DECISION_SECOND &&
-             edge->get_has_equal_aux_data_in_target(0) &&
-             !edge->get_has_equal_aux_data_in_target(1))
-    {
-      edge->target()->set_decision(DAC_DECISION_SECOND);
-    }
-    // if the second map is continous, but the first isn't, then if the
-    // first map wins on the edge, it wins on the vertex also
-    else if (edge->get_decision() == DAC_DECISION_FIRST &&
-             !edge->get_has_equal_aux_data_in_target(0) &&
-             edge->get_has_equal_aux_data_in_target(1))
-    {
-      edge->target()->set_decision(DAC_DECISION_FIRST);
-    }
-  }
-
-  // create vertices that correspond to the Halfedge vertices in case of 
-  // bounded traits.
-  template <typename Halfedge_handle>
-  Vertex_handle create_copied_vertex(Halfedge_handle hh, 
-                                     Md_accessor &to_accessor, 
-                                     bool source,
-                                     Arr_all_sides_oblivious_tag)
-  {
-    // create the 2 vertices and connect them with the edge
-    // copied_prev_he should be directed from copied_source to copied_target
-    Point_2* p_p =
-      (source) ? &(hh->source()->point()) : &(hh->target()->point());
-    
-    Point_2& p = *p_p;
-    return to_accessor.create_vertex(p);
-  }
-  
-  // create vertices that correspond to the Halfedge vertices in case of 
-  // bounded traits.
-  template <typename Halfedge_handle>
-  Vertex_handle create_copied_vertex(Halfedge_handle hh, 
-                                     Md_accessor& to_accessor, 
-                                     bool source,
-                                     Arr_not_all_sides_oblivious_tag)
-  {
-    typename Traits::Parameter_space_in_x_2 ps_x_op = 
-      this->m_traits->parameter_space_in_x_2_object ();
-    typename Traits::Parameter_space_in_y_2 ps_y_op = 
-      this->m_traits->parameter_space_in_y_2_object ();
-    
-    bool is_directed_right = hh->direction() == ARR_LEFT_TO_RIGHT;
-
-    Arr_curve_end ind =
-      ((is_directed_right && source) || (!is_directed_right && !source)) ?
-      ARR_MIN_END : ARR_MAX_END;
-
-    Arr_parameter_space ps_x = ps_x_op(hh->curve(), ind);
-    Arr_parameter_space ps_y = ps_y_op(hh->curve(), ind);
-    
-    if (ps_x != ARR_INTERIOR || ps_y != ARR_INTERIOR)
-      return to_accessor.create_boundary_vertex(hh->curve(), ind, ps_x, ps_y, 
-                                                true);
-    else
-    {
-      // create the 2 vertices and connect them with the edge
-      // copied_prev_he should be directed from copied_source to copied_target
-      Point_2* p_p =
-        (source) ? &(hh->source()->point()) : &(hh->target()->point());
-      
-      Point_2& p = *p_p;
-      return to_accessor.create_vertex(p);
-    }
-  }
-  
-  // copy the halfedges of a ccb (in from) to the md "to" inside the face
-  // inside_face
-  void copy_ccb(Ccb_halfedge_circulator hec, // the circulator to insert
-                Minimization_diagram_2&,     // the original arrangement
-                Face_handle inside_face,     // the face in which we insert it
-                Minimization_diagram_2& to,  // the target arrangement
-                Halfedges_map& map_copied_to_orig_halfedges,
-                Vertices_map&  map_copied_to_orig_vertices,
-                Halfedges_map& map_orig_to_copied_halfedges,
-                Vertices_map&  map_orig_to_copied_vertices,
-                bool is_outer_ccb) // do we copy an outer (or inner) ccb
-               
-  {
-    Md_accessor to_accessor(to);
-    // count the number of faces that are closed by this ccb
-    // (it can be more than 1 in degenerate cases, when closed area hangs
-    // on a boundary vertex)
-    int n_faces_closed = 0;
-    
-    Ccb_halfedge_circulator hec_begin = hec;
-    bool first_he = true;
-    Halfedge_handle copied_prev_he;
-    do 
-    {
-      Halfedge_handle hh = hec;
-
-      if (hh->twin()->face() == hh->face() &&
-          map_orig_to_copied_halfedges.is_defined(hh))
-      {
-        // this can happen in the case of antennas, when we get to the same
-        // antena halfedge from the other side
-        copied_prev_he = map_orig_to_copied_halfedges[hh];
-      }
-      else
-      {
-        const X_monotone_curve_2& current_cv = hh->curve();
-        if (first_he)
-        {
-          first_he = false;
-
-          // create the 2 vertices and connect them with the edge
-          // copied_prev_he should be directed from copied_source to
-          // copied_target
-          Vertex_handle copied_source = 
-            create_copied_vertex(hh, to_accessor, true, 
-                                 Are_all_sides_oblivious_category());
-          //to_accessor.create_vertex(hh->source()->point());
-          Vertex_handle copied_target = 
-            create_copied_vertex(hh, to_accessor, false, 
-                                 Are_all_sides_oblivious_category());
-          //to_accessor.create_vertex(hh->target()->point());
-          copied_prev_he =
-            to_accessor.insert_in_face_interior_ex(inside_face,
-                                                   current_cv, (HE_COMP_RES(hh) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                   copied_source,
-                                                   copied_target);
-
-          map_copied_to_orig_halfedges[copied_prev_he] = hh;
-          map_orig_to_copied_halfedges[hh] = copied_prev_he;
-          map_copied_to_orig_halfedges[copied_prev_he->twin()] = hh->twin();
-          map_orig_to_copied_halfedges[hh->twin()] = copied_prev_he->twin();
-
-          map_copied_to_orig_vertices[copied_prev_he->source()] = hh->source();
-          map_orig_to_copied_vertices[hh->source()] = copied_prev_he->source();
-          map_copied_to_orig_vertices[copied_prev_he->target()] = hh->target();
-          map_orig_to_copied_vertices[hh->target()] = copied_prev_he->target();
-        }          
-        else
-        {
-          CGAL_assertion(map_copied_to_orig_halfedges[copied_prev_he]->target()
-                         == hh->source());
-
-          // insert from vertex: prev_he->target()
-          // should check if hh->target is already a vertex in the copied face
-          // in which case we should use insert at vertices
-          bool use_2_vertices = false;
-          Vertex_handle copied_v2;
-          if (map_orig_to_copied_vertices.is_defined(hh->target()))
-          {
-            use_2_vertices = true;
-            copied_v2 = map_orig_to_copied_vertices[hh->target()];
-          }
-
-          Halfedge_handle copied_new_he;
-          if (!use_2_vertices)
-          {
-            // create vertex for the new target, and insert the new edge
-            Vertex_handle copied_target = 
-              create_copied_vertex(hh, to_accessor, false, 
-                                   Are_all_sides_oblivious_category());
-            //to_accessor.create_vertex(hh->target()->point());
-            copied_new_he = to_accessor.insert_from_vertex_ex
-              (copied_prev_he,
-               current_cv,
-               (HE_COMP_RES(hh) == CGAL::SMALLER ?
-                ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-               copied_target);
-
-            
-            // the target of copied_new_he is the new vertex, so it is directed
-            // the same way as hh in "from"
-
-            // update the vertices maps:
-            map_copied_to_orig_vertices[copied_new_he->target()] = hh->target();
-            map_orig_to_copied_vertices[hh->target()] = copied_new_he->target();
-          }
-          else
-          {
-            ++n_faces_closed;
-            
-            // in order to insert the new edge we should determine the prev
-            // halfedge of copied_v2 - this is done be going backwards on the
-            // ccb (in the copied arrangement) until finding the first halfedge
-            // with target copied_v2
-            // (note that going on twin()->next() is problematic in case that
-            // the inner boundary we traverse is made of several faces)
-            Halfedge_handle copied_prev_v2 = copied_prev_he;
-            while(copied_prev_v2->source() != copied_v2)
-              copied_prev_v2 = copied_prev_v2->prev();
-            copied_prev_v2 = copied_prev_v2->twin();
-
-            CGAL_assertion_code(Halfedge_handle tmp =
-                                to_accessor.locate_around_vertex(copied_v2,
-                                                                 current_cv);
-                                );
-            CGAL_assertion(tmp == copied_prev_v2);
-
-            bool new_face;
-            if (is_outer_ccb)
-            {
-              // if it is the first face created, and the last halfedge to
-              // insert, this is a regular outer ccb, with no special
-              // degeneracies (around the current vertices, at least)
-              // so we can use the accessor method
-              if (n_faces_closed == 1 &&
-                  map_orig_to_copied_halfedges.is_defined(hh->next()))
-              {
-                bool dummy_swapped_predecessors = false;
-                copied_new_he = to_accessor.insert_at_vertices_ex
-                  (copied_prev_he,
-                   current_cv, (HE_COMP_RES(hh) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                   copied_prev_v2->next(),
-                   new_face,
-                   dummy_swapped_predecessors);
-                // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
-                // or do we have to disallow swapping?
-
-                CGAL_assertion(new_face);
-              }
-              else
-              {
-                // TODO:can we use accessor method?
-                copied_new_he = to.insert_at_vertices(current_cv,
-                                                      copied_prev_he,
-                                                      copied_prev_v2);
-              }
-              // in order to use the accessor version, we need to identify
-              // the order in which to pass the halfedges
-              // (we should be careful in cases where more than one face is
-              // created by the outer ccb
-            }
-            else // copy inner boundary
-            {
-              // should always flip the side of the edge, because the face
-              // that we close is never the copied face, even in strane
-              // situations like this: (two faces touch in a vertex)
-              //     ------         |\  /|
-              //     | |\ |         | \/ |
-              //     | | \|         | /\ |
-              //     ---            |/  \|
-              //
-              //
-              bool dummy_swapped_predecessors = false;
-              copied_new_he =
-                to_accessor.insert_at_vertices_ex(copied_prev_v2,
-                                                  current_cv, (HE_COMP_RES(hh->twin()) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                  copied_prev_he->next(),
-                                                  new_face,
-                                                  dummy_swapped_predecessors);
-              // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
-              // or do we have to disallow swapping?
-              
-              CGAL_assertion(new_face);
-              copied_new_he = copied_new_he->twin();
-            }
-
-            CGAL_assertion(copied_new_he->target() == copied_v2);
-          }
-          // update the halfedges maps:
-          map_copied_to_orig_halfedges[copied_new_he] = hh;
-          map_copied_to_orig_halfedges[copied_new_he->twin()] = hh->twin();
-          map_orig_to_copied_halfedges[hh] = copied_new_he;
-          map_orig_to_copied_halfedges[hh->twin()] = copied_new_he->twin();
-
-          // update the previous he
-          copied_prev_he = copied_new_he;
-        }
-      }
-      hec++;
-    } while(hec != hec_begin);
-
-  }
-
-  void copy_ccb_unbounded(Ccb_halfedge_circulator hec,
-                          Minimization_diagram_2& from,
-                          Minimization_diagram_2& to,
-                          Halfedges_map& map_copied_to_orig_halfedges,
-                          Vertices_map&  map_copied_to_orig_vertices,
-                          Halfedges_map& map_orig_to_copied_halfedges,
-                          Vertices_map&  map_orig_to_copied_vertices)
-  {
-    // Find a non-fictitous edge (if there is such one) on the CCB.
-    Ccb_halfedge_circulator  hec_end = hec;
-    Halfedge_handle          non_fict;
-
-    do
-    {
-      if(!hec->is_fictitious())
-      {
-        non_fict = hec;
-        break;
-      }
-      ++hec;
-    } while(hec != hec_end);
-
-    // Find an anchor halfedge he_from along the original CCB and locate
-    // its image he_to in the target CCB.
-    Md_accessor      from_accessor (from);
-    Md_accessor      to_accessor (to);
-    Halfedge_handle  he_from;
-    Halfedge_handle  he_to;
-
-    if (non_fict == Halfedge_handle())
-    {
-      // In case all edges along the CCB are fictitious, this outer CCB
-      // belongs to the single unbounded face in the arrangement (as it
-      // contains no unbounded curves at current). In this case, we go
-      // over the outer CCB of the single unbounded face in the target
-      // arrangement (which is currently empty, thus contain a single
-      // unbounded face), and find a halfedge that matches hec.
-      CGAL_assertion_msg
-        ((to.number_of_faces() != 0),
-         "if all halfedges are fictitious then there should be only one face");
-      Face_handle              to_uf = to.faces_begin();
-      Ccb_halfedge_circulator  to_uf_hec = to_uf->outer_ccb();
-
-      he_from = hec;
-
-      he_to = to_uf_hec;
-      while (he_to->direction() != he_from->direction() ||
-             he_to->next()->direction() != he_from->next()->direction())
-      {
-        he_to = he_to->next();
-        CGAL_assertion (he_to != to_uf_hec);
-      }
-    }
-    else
-    {
-      // Use the non-fictitious halfedge as an "anchor": Insert its associated
-      // curve into the target arrangement, and keep track of the halfedge we
-      // obtained.
-      he_from = non_fict;
-
-      he_to = insert_non_intersecting_curve (to, he_from->curve());
-      if (he_to->direction() != he_from->direction())
-        he_to = he_to->twin();
-
-      // Go over all other halfedges along the copied CCB, and store all
-      // curves associated with non-fictitious halfedges.
-      Halfedge_handle                 he;
-      std::list<X_monotone_curve_2>   xcvs;
-
-      for (he = he_from->next(); he != he_from; he = he->next())
-      {
-        if (! he->is_fictitious())
-          xcvs.push_back (he->curve());
-      }
-
-      // Insert all curves into the target arrangement. By doing this, we
-      // obtain an unbounded face with the same structure as the copied face
-      // in the target arrangement.
-      insert_non_intersecting_curves (to, xcvs.begin(), xcvs.end());
-    }
-
-    // Map the halfedges and vertices along the two CCBs.
-    // Note that we make sure that the two CCBs are of the same size.
-    const Halfedge_handle   he_from_end = he_from;
-    CGAL_assertion_code(const Halfedge_handle   he_to_end = he_to;);
-
-    do
-    {
-      map_copied_to_orig_vertices[he_to->source()] = he_from->source();
-      map_orig_to_copied_vertices[he_from->source()] = he_to->source();
-
-      map_copied_to_orig_halfedges[he_to] = he_from;
-      map_copied_to_orig_halfedges[he_to->twin()] = he_from->twin();
-      map_orig_to_copied_halfedges[he_from] = he_to;
-      map_orig_to_copied_halfedges[he_from->twin()] = he_to->twin();
-
-      he_from = he_from->next();
-      he_to = he_to->next();
-
-    } while (he_from != he_from_end);
-
-    CGAL_assertion(he_to == he_to_end);
-    return;
-  }
-
-  // Copy the halfedges of the boundary of face (in from) to the md "to"
-  // return a handle to the copied face in "to".
-  Face_handle copy_face(Face_handle face, Minimization_diagram_2& from,
-                        Minimization_diagram_2& to,
-                        Halfedges_map& map_copied_to_orig_halfedges,
-                        Vertices_map&  map_copied_to_orig_vertices)
-  {
-    CGAL_precondition(from.is_valid());
-    CGAL_precondition(to.is_empty());
-    CGAL_assertion_msg(to.number_of_faces() == 1,
-                       "There should be one face in an empty arrangement");
-
-    // Initialize a mapping from the original vertices and halfedges to the
-    // ones in the copied arrangement. Also keep track of the unbounded face
-    // of the copied arrangement: Note that if the face we copy is bounded,
-    // then it forms a hole in the unbounded face.
-    Vertices_map  map_orig_to_copied_vertices;
-    Halfedges_map map_orig_to_copied_halfedges;
-    Face_handle   to_uf = to.faces_begin();
-
-    // Copy outer CCB of the face, if it has one.
-    Face_handle     copied_face;
-
-    if (face->number_of_outer_ccbs() > 0)
-    {
-      Ccb_halfedge_circulator  hec = face->outer_ccb();
-
-      if (face->is_unbounded())
-      {
-        copy_ccb_unbounded(hec, from, to,
-                           map_copied_to_orig_halfedges,
-                           map_copied_to_orig_vertices,
-                           map_orig_to_copied_halfedges,
-                           map_orig_to_copied_vertices);
-      }
-      else
-      {
-        copy_ccb(hec, from, to_uf, to,
-                 map_copied_to_orig_halfedges,
-                 map_copied_to_orig_vertices,
-                 map_orig_to_copied_halfedges,
-                 map_orig_to_copied_vertices,
-                 true);
-      }
-      CGAL_assertion(to.is_valid());
-
-      // Get a handle to the copied face, which is the incident face
-      // of the copy we created for hec.
-      CGAL_assertion (map_orig_to_copied_halfedges.is_defined(hec));
-      Halfedge_handle  hec_to = map_orig_to_copied_halfedges[hec];
-
-      copied_face = hec_to->face();
-    }
-    else
-    {
-      // In case the copied face has no outer CCB, then it must be the
-      // single unbounded face of the arrangement.
-      copied_face = to_uf;
-    }
-
-    // Copy the inner CCB (the holes inside the face).
-    Inner_ccb_iterator  iccb_it = face->inner_ccbs_begin();
-    for (; iccb_it != face->inner_ccbs_end(); ++iccb_it)
-    {
-      Ccb_halfedge_circulator  he = *iccb_it;
-
-      copy_ccb(he, from, copied_face, to,
-               map_copied_to_orig_halfedges,
-               map_copied_to_orig_vertices,
-               map_orig_to_copied_halfedges,
-               map_orig_to_copied_vertices,
-               false);
-      CGAL_assertion(to.is_valid());
-    }
-
-    // Copy the isolated vertices inside the given face.
-    Isolated_vertex_iterator    iv_it = face->isolated_vertices_begin();
-    for (; iv_it != face->isolated_vertices_end(); ++iv_it)
-    {
-      Vertex_handle     iso_v = iv_it;
-      Vertex_handle     copied_iso = 
-        to.insert_in_face_interior (iso_v->point(), copied_face);
-
-      map_copied_to_orig_vertices[copied_iso] = iso_v;
-      map_orig_to_copied_vertices[iso_v] = copied_iso;
-    }
-
-    // Return a handle to the copied face.
-    return (copied_face);
-  }
-    
-  // set envelope data in face "to" according to the comparison result of the
-  // aux data of face "from"
-  void copy_data_by_comparison_result(Face_handle from, Face_handle to,
-                                      Comparison_result res)
-  {
-    CGAL_assertion_msg(from->get_aux_is_set(0), "aux_data(0) is not set");
-    CGAL_assertion_msg(from->get_aux_is_set(1), "aux_data(1) is not set");
-    to->set_aux_source(0, from->get_aux_source(0));
-    to->set_aux_source(1, from->get_aux_source(1));
-    to->set_decision(res);
-  }
-
-  // set envelope data in vertex "v" according to the comparison result of the
-  // aux data of "v"
-  void set_data_by_comparison_result(Vertex_handle v, Comparison_result res)
-  {
-    CGAL_assertion_msg(v->get_aux_is_set(0), "aux_data(0) is not set");
-    CGAL_assertion_msg(v->get_aux_is_set(1), "aux_data(1) is not set");
-    v->set_decision(res);
-  }
-
-  // set envelope data in halfedge "h" according to the comparison result of
-  // the aux data of "h"
-  void set_data_by_comparison_result(Halfedge_handle h, Comparison_result res)
-  {
-    CGAL_assertion_msg(h->get_aux_is_set(0), "aux_data(0) is not set");
-    CGAL_assertion_msg(h->get_aux_is_set(1), "aux_data(1) is not set");
-    h->set_decision(res);
-  }
-
-  // set envelope data in vertex "to" according to the union of both
-  // aux data of the feature "from"
-  // FeatureHabdle should be a Face_handle, Halfedge_handle or 
-  // Vertex_handle
-  template <typename FeatureHabdle>
-  void copy_all_data_to_vertex(FeatureHabdle from, Vertex_handle to)
-  {
-    CGAL_assertion_msg(from->get_aux_is_set(0), "aux_data(0) is not set");
-    CGAL_assertion_msg(from->get_aux_is_set(1), "aux_data(1) is not set");
-    CGAL_assertion_msg(!to->is_decision_set(), "data is set in new vertex");
-    to->set_aux_source(0, from->get_aux_source(0));
-    to->set_aux_source(1, from->get_aux_source(1));
-    to->set_decision(EQUAL);
-  }
-
-  //   void deal_with_new_vertex(Halfedge_handle orig_he, Vertex_handle new_v)
-  //   {
-  //     const Xy_monotone_surface_3& surf1 = get_aux_surface(orig_he, 0);
-  //     const Xy_monotone_surface_3& surf2 = get_aux_surface(orig_he, 1);
-
-  //     const Point_2& p = new_v->point();
-  //     Comparison_result res = compare_distance_to_envelope(p, surf1, surf2);
-  //     new_v->set_aux_source(0, orig_he->get_aux_source(0));
-  //     new_v->set_aux_source(1, orig_he->get_aux_source(1));
-  //     new_v->set_decision(res);
-  //   }
-    
-  Comparison_result resolve_minimal_edge(Halfedge_handle orig_he, 
-                                         Halfedge_handle new_he)
-  {
-    // find and set the envelope data on the new edge
-    const Xy_monotone_surface_3& surf1 = get_aux_surface(orig_he, 0);
-    const Xy_monotone_surface_3& surf2 = get_aux_surface(orig_he, 1);
-    Comparison_result res = 
-      compare_distance_to_envelope(new_he->curve(), surf1, surf2);
-
-    // the observer keeps this information when splitting an edge
-    CGAL_assertion(new_he->get_aux_is_set(0) && new_he->get_aux_is_set(1));
-    CGAL_assertion(new_he->twin()->get_aux_is_set(0) && \
-                   new_he->twin()->get_aux_is_set(1));
-
-    new_he->set_decision(res);
-    new_he->twin()->set_decision(res);
-    return res;
-  }
-
-  // check if the point is on the curve.
-  // we use the traits adaptor since cv can be an infinite curve
-  bool is_point_on_curve(const Point_2& p, const X_monotone_curve_2& cv)
-  {
-    Arr_traits_adaptor_2<Traits> tr_adaptor(*m_traits);
-    return (tr_adaptor.is_in_x_range_2_object()(cv, p) && 
-            m_traits->compare_y_at_x_2_object()(p, cv) == EQUAL);
-  }
-  
-  // this observer is used in the process of resolving a face
-  // this observer should copy the faces' indication when a face is split
-  // so we can later identify all the faces that form the original given face
-  // it also should remember the edges of the face, that are also projected
-  // intersections
-  class Copied_face_observer : public Md_observer
-
-  {
-  public:
-    typedef typename Minimization_diagram_2::Face_handle     Face_handle;
-    typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
-    typedef typename Minimization_diagram_2::X_monotone_curve_2
-      X_monotone_curve_2;
-
-    Copied_face_observer(Halfedges_map& map_h) : map_halfedges(map_h) {}
-    
-    virtual ~Copied_face_observer() {}
-
-    void set_elements_collections(Halfedges_hash& boundary,
-                                  Halfedges_hash& specialh,
-                                  Halfedges_hash_w_type& newh,
-                                  Faces_hash& parts,
-                                  Vertices_hash& boundaryv,
-                                  Vertices_hash& specialv,
-                                  Vertices_to_edges_map& v_to_h)
-    {
-      boundary_halfedges = &boundary;
-      special_edges = &specialh;
-      new_edges = &newh;
-      face_parts = &parts;
-      boundary_vertices = &boundaryv;
-      special_vertices = &specialv;
-      vertices_to_halfedges = &v_to_h;
-    }
-  
-    virtual void after_split_face(Face_handle org_f,
-                                  Face_handle new_f, bool)
-    {
-      // keep track of the face parts
-      if (face_parts->is_defined(org_f))
-        (*face_parts)[new_f] = face_parts->default_value();
-    }
-
-    virtual void after_split_edge(Halfedge_handle org_he,
-                                  Halfedge_handle new_he)
-    {
-      // take care of special edges that were split
-      if (special_edges->is_defined(org_he))
-
-      {
-        // if original edge was in the set, then now both split parts should
-        // be in the set
-        (*special_edges)[new_he] = special_edges->default_value();
-        (*special_edges)[new_he->twin()] = special_edges->default_value();
-      }
-
-      // take care of new edges that were split
-      if (new_edges->is_defined(org_he))
-      {
-        (*new_edges)[new_he] = (*new_edges)[org_he];
-        (*new_edges)[new_he->twin()] = (*new_edges)[org_he];
-      }
-
-      // take care for boundary edges
-      if (boundary_halfedges->is_defined(org_he))
-      {
-        (*boundary_halfedges)[new_he] = boundary_halfedges->default_value();
-        (*boundary_halfedges)[new_he->twin()] =
-          boundary_halfedges->default_value();
-
-        // the new created vertex is a special vertex since it lies on the
-        // boundary of the face, and it is of a projected intersection
-        // we are interested in it only if the split halfedge is "data from
-        // face"
-        CGAL_assertion(map_halfedges.is_defined(org_he));
-        CGAL_assertion(org_he->target() == new_he->source());
-
-        if ((map_halfedges[org_he])->get_has_equal_aux_data_in_face(0) &&
-            (map_halfedges[org_he])->get_has_equal_aux_data_in_face(1))
-          (*special_vertices)[org_he->target()] =
-            special_vertices->default_value();
-
-
-        // update the boundary vertices collection
-        (*boundary_vertices)[org_he->target()] =
-          boundary_vertices->default_value();
-
-
-        // update the vertices to halfedges collection
-        Halfedge_handle correct_side_he;
-        if (face_parts->is_defined(org_he->face()))
-          correct_side_he = org_he;
-        else
-        {
-          CGAL_assertion(face_parts->is_defined(new_he->twin()->face()));
-          // new_he->twin() is directed as org_he, so on the boundary pointing
-          // inside the face, and has the new vertex as target
-          CGAL_assertion(org_he->target() == new_he->twin()->target());
-          correct_side_he = new_he->twin();
-        }
-        // set the new vertex
-        (*vertices_to_halfedges)[org_he->target()] = correct_side_he;
-
-        //BZBZ
-        /* CGAL_assertion(vertices_to_halfedges->is_defined(correct_side_he->source()) &&
-           vertices_to_halfedges->is_defined(correct_side_he->next()->target()));*/
-        (*vertices_to_halfedges)[correct_side_he->next()->target()] = correct_side_he->next();
-        
-        if (correct_side_he == org_he && 
-            face_parts->is_defined(org_he->twin()->face()))
-          (*vertices_to_halfedges)[org_he->source()] = org_he->twin();
-      }
-    }
-
-  protected:
-    Halfedges_hash* boundary_halfedges;
-    Halfedges_hash* special_edges;
-    Halfedges_hash_w_type* new_edges;
-    Faces_hash* face_parts;
-    Vertices_hash* boundary_vertices;
-    Vertices_hash* special_vertices;
-    Vertices_to_edges_map* vertices_to_halfedges;
-
-    Halfedges_map& map_halfedges;
-  };
-
-
-  // this observer is used in the process of resolving a face
-  // it listens to what happpens in the copied arrangement, and copies back
-  // the actions to result arrangements very efficiently
-  class Copy_observer : public Md_observer
-  {
-  public:
-    typedef typename Minimization_diagram_2::Face_handle       Face_handle;
-    typedef typename Minimization_diagram_2::Halfedge_handle   Halfedge_handle;
-    typedef typename Minimization_diagram_2::Vertex_handle     Vertex_handle;
-    typedef typename Minimization_diagram_2::Point_2           Point_2;
-    typedef typename Minimization_diagram_2::X_monotone_curve_2
-      X_monotone_curve_2;
-    typedef typename Minimization_diagram_2::Ccb_halfedge_circulator
-     Ccb_halfedge_circulator;
-
-    typedef typename Traits::Left_side_category             Left_side_category;
-    typedef typename Traits::Right_side_category            Right_side_category;
-    typedef typename Traits::Top_side_category              Top_side_category;
-    typedef typename Traits::Bottom_side_category           Bottom_side_category;
-    
-    Copy_observer(Minimization_diagram_2& small_,
-                  Minimization_diagram_2& big,
-                  Halfedges_map& map_h,
-                  Vertices_map&  map_v,
-                  Faces_map&     map_f)
-      : small_arr(small_), big_arr(big),
-        big_arr_accessor(big_arr),
-        map_halfedges(map_h),
-        map_vertices(map_v),
-        map_faces(map_f)
-    {}
-    
-    virtual ~Copy_observer() {}
-
-    virtual void before_create_vertex (const Point_2& /* p */)
-    {}
-
-    virtual void after_create_vertex (Vertex_handle v)
-    {      
-      // should create a new vertex with v->point() inside
-      Vertex_handle new_v = big_arr_accessor.create_vertex(v->point());
-
-      // save a mapping between the 2 vertices
-      map_vertices[v] = new_v;
-      // add indication of a new vertex (that is not connected to anything,
-      // and is also no isolated)
-      new_vertices.push_back(v);
-    }
-
-    void before_create_boundary_vertex (const X_monotone_curve_2& cv,
-                                        Arr_curve_end ind,
-                                        Arr_parameter_space in_ps_x,
-                                        Arr_parameter_space in_ps_y)
-    {
-      boundary_vertex_cv = cv;
-      boundary_vertex_ind = ind;
-      ps_x = in_ps_x;
-      ps_y = in_ps_y;
-    }
-
-    bool is_bounded_impl(Arr_open_side_tag) { return false; }
-    bool is_bounded_impl(Arr_boundary_side_tag) { return true; }
-    
-    bool is_bounded()
-    {
-      // This is the case of create boundary vertex.
-      CGAL_assertion((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
-      
-      if (ps_x == ARR_LEFT_BOUNDARY && !is_bounded_impl(Left_side_category()))
-        return false;
-      
-      if (ps_x == ARR_RIGHT_BOUNDARY && !is_bounded_impl(Right_side_category()))
-        return false;
-
-      if (ps_y == ARR_TOP_BOUNDARY && !is_bounded_impl(Top_side_category()))
-        return false;
-      
-      if (ps_y == ARR_BOTTOM_BOUNDARY && 
-          !is_bounded_impl(Bottom_side_category()))
-        return false;
-      
-      return true;
-    }
-
-    void after_create_boundary_vertex(Vertex_handle v)
-    {
-      CGAL_assertion(big_arr.is_valid());
-      Vertex_handle new_v = 
-        big_arr_accessor.create_boundary_vertex(boundary_vertex_cv,
-                                                boundary_vertex_ind,
-                                                ps_x, ps_y, true);
-      // add indication of a new vertex (that is not connected to anything,
-      // and is also not isolated)
-      if (is_bounded())
-        new_vertices.push_back(v);
-
-      map_vertices[v] = new_v;
-    }
-
-    void before_split_fictitious_edge(Halfedge_handle e,
-                                      Vertex_handle v)
-    {
-      split_fict_v = v;
-      split_fict_e = e;
-    }
-
-    void after_split_fictitious_edge(Halfedge_handle e1,
-                                     Halfedge_handle e2)
-    {
-      // find the corresponding split vertex in big_arr
-      CGAL_assertion(map_vertices.is_defined(split_fict_v));
-      Vertex_handle big_v = map_vertices[split_fict_v];
-
-      // find the edge to split in big_arr
-      CGAL_assertion(map_halfedges.is_defined(split_fict_e));
-      Halfedge_handle big_e = map_halfedges[split_fict_e];
-
-      // use the O(1) operation _split_edge      
-      Halfedge_handle big_e1 =
-        big_arr_accessor.split_fictitious_edge(big_e, big_v);
-
-      Halfedge_handle big_e2 = big_e1->next();
-      
-      // update mapping of new halfedges
-      // big_e1 is directed at big_v, as e1 is directed at split_v -
-      // these are supposed to be mapped
-      CGAL_assertion(map_halfedges.is_defined(e1) &&
-                     map_halfedges[e1] == big_e1);
-      // should update the mapping of the second halfedge     
-      map_halfedges[e2] = big_e2;
-      map_halfedges[e2->twin()] = big_e2->twin();
-    }
-
-    virtual void before_create_edge(const X_monotone_curve_2& /* c */,
-                                    Vertex_handle v1,
-                                    Vertex_handle v2)
-    {
-      // save state for after_create_edge event
-      create_edge_v1 = v1;
-      create_edge_v2 = v2;
-
-      is_in_relocate = false;
-    }
-      
-    virtual void after_create_edge(Halfedge_handle e)
-
-    {
-      // a new edge e was created in small_arr, we should create a corresponing
-      // edge in big_arr
-      CGAL_assertion(map_vertices.is_defined(create_edge_v1));
-      CGAL_assertion(map_vertices.is_defined(create_edge_v2));
-      CGAL_assertion(new_vertices.size() <= 2);
-
-      Vertex_handle big_v1 = map_vertices[create_edge_v1];
-      Vertex_handle big_v2 = map_vertices[create_edge_v2];
-      
-      // should check if v1 and v2 are new or old
-      // if we have 2 new vertices, they must be new.
-      // if we have only one, we should check which is new
-      bool v1_is_new = false, v2_is_new = false;
-      if (new_vertices.size() == 1)
-      {
-        if (new_vertices.back() == create_edge_v1)
-          v1_is_new = true;
-        else
-        {
-          CGAL_assertion(new_vertices.back() == create_edge_v2);
-          v2_is_new = true;
-        }          
-      }
-      if (new_vertices.size() == 2)
-      {
-        v1_is_new = true;
-        v2_is_new = true;
-      }
-      new_vertices.clear();
-
-      // just to make sure we have the halfedge in the same direction as
-      // we got in the before event
-      CGAL_assertion(e->source() == create_edge_v1);
-      Halfedge_handle he = 
-        ((e->source() == create_edge_v1) ? e : e->twin());
-
-      // if an endpoint is not new, but is isolated, we should remove it from
-      // its face's isolated vertices list, and treat it as new
-      if (!v1_is_new && big_v1->is_isolated())
-      {
-        //Face_handle f = big_v1->face(); //big_arr.incident_face(big_v1);
-        //big_arr_accessor.find_and_erase_isolated_vertex(f, big_v1);
-        big_arr_accessor.remove_isolated_vertex_ex(big_v1);
-        v1_is_new = true;
-      }
-      if (!v2_is_new && big_v2->is_isolated())
-      {
-        //Face_handle f = big_v2->face(); //big_arr.incident_face(big_v2);
-        //big_arr_accessor.find_and_erase_isolated_vertex(f, big_v2);
-        big_arr_accessor.remove_isolated_vertex_ex(big_v2);
-        v2_is_new = true;
-      }
-
-      // now use the approppriate method to insert the new edge
-      if (v1_is_new && v2_is_new)
-      {
-        // if both vertices are new - use the O(1) operation
-        // _insert_in_face_interior (in the face mapped to by he->face())
-        CGAL_assertion(map_faces.is_defined(he->face()));
-
-        Face_handle big_face = map_faces[he->face()];
-        Halfedge_handle new_he =
-          big_arr_accessor.insert_in_face_interior_ex(big_face,
-                                                      he->curve(), (HE_COMP_RES(he) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                      big_v1, big_v2);
-
-        // update mapping of new edge
-        // new_he is directed from big_v1 to big_v2, and he is directed from
-        // create_edge_v1 to create_edge_v2, so he is mapped to new_he
-        map_halfedges[he] = new_he;
-        map_halfedges[he->twin()] = new_he->twin();
-      }
-      else if (!v1_is_new && !v2_is_new)
-      {
-        // if both vertices are old - use _insert_at_vertices
-        // this is a linear action by the size of the faces involved
-        // we can get relevant prev halfedges from he
-        Halfedge_handle prev1 = he->prev();
-        Halfedge_handle prev2 = he->twin()->prev();
-
-        CGAL_assertion(map_halfedges.is_defined(prev1));
-        CGAL_assertion(map_halfedges.is_defined(prev2));
-
-        Halfedge_handle big_prev1 = map_halfedges[prev1];
-        Halfedge_handle big_prev2 = map_halfedges[prev2];
-
-        bool new_face;
-        bool dummy_swapped_predecessors = false;
-        Halfedge_handle new_he =
-          big_arr_accessor.insert_at_vertices_ex(big_prev1, 
-                                                 he->curve(), (HE_COMP_RES(he) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                 big_prev2->next(),
-                                                 new_face,
-                                                 dummy_swapped_predecessors);
-        // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
-        // or do we have to disallow swapping?
-
-        // new_he should be directed as he
-        CGAL_assertion(map_vertices.is_defined(he->source()) &&
-                       map_vertices[he->source()] == new_he->source() &&
-                       map_vertices.is_defined(he->target()) &&
-                       map_vertices[he->target()] == new_he->target());
-
-        // update mapping of new edge
-        map_halfedges[he] = new_he;
-        map_halfedges[he->twin()] = new_he->twin();
-
-        // make sure that the old face is mapped already
-        CGAL_assertion(map_faces.is_defined(he->twin()->face()) &&
-                       map_faces[he->twin()->face()] == new_he->twin()->face());
-
-        // if a new face was created update its mapping too
-        // the new face is the incident face of he
-        if (new_face)
-        {
-          map_faces[he->face()] = new_he->face();
-          // save state for move_hole/move_isolated_vertex events
-          is_in_relocate = true;
-        }
-
-
-        // make sure the face is correctly mapped
-        CGAL_assertion(map_faces.is_defined(he->face()) &&
-                       map_faces[he->face()] == new_he->face());
-      }
-      else
-      {
-        // only one vertex is new - use the O(1) operation _insert_from_vertex
-        // we can get the relevant prev halfedge from e
-        Halfedge_handle prev = he->prev();
-        CGAL_assertion(map_halfedges.is_defined(prev));
-        Halfedge_handle big_prev = map_halfedges[prev];
-        Halfedge_handle new_he;
-        if (!v1_is_new)
-        {
-          new_he = big_arr_accessor.insert_from_vertex_ex(big_prev, 
-                                                          he->curve(), (HE_COMP_RES(he) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                          big_v2);
-
-          // update mapping of new edge
-          // new_he is directed from big_v1 to big_v2 as he
-          map_halfedges[he] = new_he;
-          map_halfedges[he->twin()] = new_he->twin();          
-        }
-        else
-        {
-          new_he =
-            big_arr_accessor.insert_from_vertex_ex(big_prev,
-                                                   he->curve(), (HE_COMP_RES(he->twin()) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
-                                                   big_v1);
-
-          // update mapping of new edge
-          // new_he is directed from big_v2 to big_v1 opposite of he
-          map_halfedges[he] = new_he->twin();
-          map_halfedges[he->twin()] = new_he;
-        }
-      }
-    }
-
-    virtual void before_split_edge(Halfedge_handle e,
-                                   Vertex_handle v,
-                                   const X_monotone_curve_2& /* c1 */,
-                                   const X_monotone_curve_2& /* c2 */)
-    {
-      // save state info for using _split_edge in after event
-      split_v = v;
-      split_e = e;
-    }
-    virtual void after_split_edge (Halfedge_handle e1,
-                                   Halfedge_handle e2)
-    {
-      // find the corresponding split vertex in big_arr
-      CGAL_assertion(map_vertices.is_defined(split_v));
-      Vertex_handle big_v = map_vertices[split_v];
-
-      // make sure it is the only new vertex right now
-      CGAL_assertion(new_vertices.size() == 1 &&
-                     new_vertices.back() == split_v);
-      new_vertices.pop_back();
-
-      // find the edge to split in big_arr
-      CGAL_assertion(map_halfedges.is_defined(split_e));
-      Halfedge_handle big_e = map_halfedges[split_e];
-
-      // use the O(1) operation _split_edge      
-      Halfedge_handle big_e1 =
-        big_arr_accessor.split_edge_ex(big_e, big_v, e1->curve(), e2->curve());
-
-      Halfedge_handle big_e2 = big_e1->next();
-      
-      // update mapping of new halfedges
-      // big_e1 is directed at big_v, as e1 is directed at split_v -
-      // these are supposed to be mapped
-      CGAL_assertion(map_halfedges.is_defined(e1) &&
-                     map_halfedges[e1] == big_e1);
-      // should update the mapping of the second halfedge     
-      map_halfedges[e2] = big_e2;
-      map_halfedges[e2->twin()] = big_e2->twin();
-    }
-
-    virtual void before_add_isolated_vertex(Face_handle f,
-                                            Vertex_handle /* v */)
-    {
-      saved_face = f;
-    }
-    virtual void after_add_isolated_vertex(Vertex_handle v)
-    {
-      // make sure it is the only new vertex right now
-      CGAL_assertion(new_vertices.size() == 1 &&
-                     new_vertices.back() == v);
-      new_vertices.pop_back();
-
-
-      CGAL_assertion(map_vertices.is_defined(v));
-      CGAL_assertion(map_faces.is_defined(saved_face));
-      
-      // find features in big_arr
-      Vertex_handle big_v = map_vertices[v];
-
-      Face_handle   big_face = map_faces[saved_face];
-      
-
-      // can use O(1) operation _insert_isolated_vertex
-      big_arr_accessor.insert_isolated_vertex(big_face, big_v);
-    }
-
-    virtual void before_move_inner_ccb(Face_handle from_f,
-                                       Face_handle to_f,
-                                       Ccb_halfedge_circulator )
-    {
-      // should be used after insert_at_vertices which creates a new face
-      CGAL_assertion(is_in_relocate);
-      move_from = from_f;
-      move_to = to_f;
-    }
-    virtual void after_move_inner_ccb(Ccb_halfedge_circulator h)
-    {
-      CGAL_assertion(map_faces.is_defined(move_from));
-      CGAL_assertion(map_faces.is_defined(move_to));
-      CGAL_assertion(map_halfedges.is_defined(h));
-
-      Face_handle big_from_f  = map_faces[move_from];
-      Face_handle big_to_f = map_faces[move_to];
-      Ccb_halfedge_circulator big_h = (map_halfedges[h])->ccb();
-
-      Ccb_halfedge_circulator big_ccb = big_h;
-      
-      big_arr_accessor.move_inner_ccb(big_from_f, big_to_f, big_ccb);
-
-    }
-
-    virtual void before_move_isolated_vertex(Face_handle from_f,
-                                             Face_handle to_f,
-                                             Vertex_handle )
-    {
-      // should be used after insert_at_vertices which creates a new face
-
-      CGAL_assertion(is_in_relocate);
-      move_from = from_f;
-      move_to = to_f;
-    }
-    virtual void after_move_isolated_vertex(Vertex_handle v)
-    {
-      CGAL_assertion(map_faces.is_defined(move_from));
-      CGAL_assertion(map_faces.is_defined(move_to));
-      CGAL_assertion(map_vertices.is_defined(v));
-
-      Face_handle big_from_f  = map_faces[move_from];
-      Face_handle big_to_f = map_faces[move_to];
-      Vertex_handle big_v = map_vertices[v];
-
-      big_arr_accessor.move_isolated_vertex(big_from_f, big_to_f, big_v);
-    }
-
-  protected:
-    Minimization_diagram_2& small_arr;
-    Minimization_diagram_2& big_arr;
-    Md_accessor             big_arr_accessor;
-
-    // mappings between small_arr features to big_arr features
-    Halfedges_map& map_halfedges;
-    Vertices_map&  map_vertices;
-    Faces_map&     map_faces;
-    std::deque<Vertex_handle> new_vertices;
-    
-    // state for actions
-    Vertex_handle create_edge_v1;
-    Vertex_handle create_edge_v2;
-    Vertex_handle split_v, split_fict_v;
-    Halfedge_handle split_e, split_fict_e;
-    Face_handle   saved_face;
-    Face_handle   move_from;
-    Face_handle   move_to;    
-
-    // for the create_vertex call-back
-    X_monotone_curve_2  boundary_vertex_cv;
-    Arr_curve_end           boundary_vertex_ind;
-    Arr_parameter_space ps_x;
-    Arr_parameter_space ps_y;
-    bool is_in_relocate;
-    
-  };
-
-  // A zone visitor for the Minimization Diagram which only inserts
-  // parts of the curve which are inside a given face
-  // it also remembers those parts which overlap the boundary of the original
-  // face
-  class Copied_face_zone_visitor
-  {
-  public:
-    typedef typename Minimization_diagram_2::Vertex_handle     Vertex_handle;
-    typedef typename Minimization_diagram_2::Halfedge_handle   Halfedge_handle;
-    typedef typename Minimization_diagram_2::Face_handle       Face_handle;
-
-    typedef typename Minimization_diagram_2::Point_2           Point_2;
-    typedef typename Minimization_diagram_2::X_monotone_curve_2
-      X_monotone_curve_2;
-
-    typedef std::pair<Halfedge_handle, bool>                   Result;
-
-    Copied_face_zone_visitor(Minimization_diagram_2& result,
-                             Minimization_diagram_2& copied,
-                             Face_handle orig_face,
-                             Face_handle copied_face,
-                             Halfedges_map& map_h,
-                             Vertices_map& map_v,
-                             Faces_map& map_f,
-                             Halfedges_list& se, // special edges
-                             Halfedges_w_type_list& new_edges,
-                             Faces_list& face_parts,
-                             Vertices_list& sv, // special vertices
-                             Self* p)
-      : copied_arr(copied),
-        result_arr(result),
-        result_original_face(orig_face),
-        map_halfedges(map_h),
-        map_vertices(map_v),
-        map_faces(map_f),
-        result_special_edges(se),
-        result_new_edges(new_edges),
-        result_face_parts(face_parts),
-        result_special_vertices(sv),
-        md_copy_observer(copied, result, map_h, map_v, map_f),
-        md_observer(map_h),
-        parent(p)
-    {
-      // init maps
-      copied_face_parts[copied_face] = copied_face_parts.default_value();
-
-      Halfedge_iterator hi = copied_arr.halfedges_begin();
-      for (; hi != copied_arr.halfedges_end(); ++hi)
-      {
-        copied_arr_boundary_halfedges[hi] =
-          copied_arr_boundary_halfedges.default_value();
-        if (hi->face() == copied_face && 
-            !hi->target()->is_at_open_boundary()) //BZBZ
-          copied_vertices_to_halfedges[hi->target()] = hi;
-      }
-                   
-      Vertex_iterator vi = copied_arr.vertices_begin();
-      for (; vi != copied_arr.vertices_end(); ++vi)
-      {
-        copied_arr_orig_vertices[vi] =
-          copied_arr_orig_vertices.default_value();
-        
-        if (vi->is_isolated())
-        {
-          CGAL_assertion(vi->face() == copied_face);
-          copied_vertices_to_halfedges[vi] = Halfedge_handle(NULL);
-        }
-        else
-          CGAL_assertion(copied_vertices_to_halfedges.is_defined(vi));
-      }
-
-      // init observers
-      md_copy_observer.attach(copied_arr);
-      
-      md_observer.set_elements_collections(copied_arr_boundary_halfedges,
-                                           copied_arr_special_edges,
-                                           copied_arr_new_edges,
-                                           copied_face_parts,
-                                           copied_arr_new_boundary_vertices,
-                                           copied_arr_special_vertices,
-                                           copied_vertices_to_halfedges);
-      md_observer.attach(copied_arr);
-    }
-
-    virtual ~Copied_face_zone_visitor() {}
-
-    // the zone visitor functions
-
-    /*! Initialize the visitor with an arrangement object. */
-    void init (Minimization_diagram_2* arr)
-    {
-      CGAL_assertion(&copied_arr == arr);
-      insert_visitor.init(arr);
-    }
-
-    /*!
-     * Handle the a subcurve located in the interior of a given face.
-     * \param cv The subcurve.
-     * \param face The face containing cv's interior.
-     * \param left_v The vertex that corresponds to the left endpoint of cv
-     *               (or an invalid handle if no such arrangement vertex
-     *               exists).
-     * \param left_he The halfedge that contains the left endpoint of cv
-     *               (or an invalid handle if no such halfedge exists).
-     * \param right_v The vertex that corresponds to the right endpoint of cv
-     *               (or an invalid handle if no such arrangement vertex
-     *               exists).
-     * \param right_he The halfedge that contains the right endpoint of cv
-     *                 (or an invalid handle if no such halfedge exists).
-     * \return A handle to the halfedge obtained from the insertion of the
-     *         subcurve into the arrangement.
-     */
-    Result found_subcurve(const X_monotone_curve_2& cv,
-                          Face_handle face,
-                          Vertex_handle left_v, Halfedge_handle left_he,
-                          Vertex_handle right_v, Halfedge_handle right_he)
-    {
-      // insert the curve only if the face is ok
-      if (is_face_ok(face))
-      {
-        CGAL_assertion(copied_arr.is_valid());
-        Result base_result = insert_visitor.found_subcurve(cv, face,
-                                                           left_v, left_he,
-                                                           right_v, right_he);
-        // update the collection of newly added edges
-        Halfedge_handle new_he = base_result.first;
-        copied_arr_new_edges[new_he] = itype;
-        copied_arr_new_edges[new_he->twin()] = itype;
-        
-        // take care for special vertices. the split vertices are always
-        // special, and this is taken care of in the after_split event.
-
-        // here we should update the original vertices that consolidate with
-        // the new subcurve
-        if (copied_arr_orig_vertices.is_defined(new_he->source()))
-          copied_arr_special_vertices[new_he->source()] =
-            copied_arr_special_vertices.default_value();
-
-        if (copied_arr_orig_vertices.is_defined(new_he->target()))
-          copied_arr_special_vertices[new_he->target()] =
-            copied_arr_special_vertices.default_value();
-
-        // we should set the halfedge-face, halfedge-target 
-        // and target-face aux flags on the new edge (of result)
-        Halfedge_handle result_new_he = map_halfedges[new_he];
-        // it is clear that the halfedge-face are all true
-        result_new_he->set_is_equal_aux_data_in_face(0, true);
-        result_new_he->set_is_equal_aux_data_in_face(1, true);
-
-        result_new_he->twin()->set_is_equal_aux_data_in_face(0, true);
-        result_new_he->twin()->set_is_equal_aux_data_in_face(1, true);
-        result_new_he->set_has_equal_aux_data_in_face(0, true);
-        result_new_he->set_has_equal_aux_data_in_face(1, true);
-        result_new_he->twin()->set_has_equal_aux_data_in_face(0, true);
-        result_new_he->twin()->set_has_equal_aux_data_in_face(1, true);
-        // for the halfedge-target flags, if the vertex is a boundary vertex
-        // we should use its boundary halfedge as intermediary between the face
-        // and the vertex (or the vertex info if it was isolated)
-        // otherwise, we set flags to true since it is a new vertex inside the
-        // original face, and have same aux data as all face parts
-        if (is_boundary_vertex(new_he->target()))
-        {
-          Vertex_handle cur_t = new_he->target();
-          CGAL_assertion(copied_vertices_to_halfedges.is_defined(cur_t));
-          Halfedge_handle copied_b_he = copied_vertices_to_halfedges[cur_t];
-          if (copied_b_he == Halfedge_handle(NULL))
-          {
-            // this was an isolated vertex, which we touch
-            // since we have in the new edge aux sources as in the face,
-            // we can copy the vertex-face flags from the vertex
-            result_new_he->set_is_equal_aux_data_in_target
-              (0, cur_t->get_is_equal_aux_data_in_face(0));
-            result_new_he->set_is_equal_aux_data_in_target
-              (1, cur_t->get_is_equal_aux_data_in_face(1));
-            result_new_he->set_has_equal_aux_data_in_target
-              (0, cur_t->get_has_equal_aux_data_in_face(0));
-            result_new_he->set_has_equal_aux_data_in_target
-              (1, cur_t->get_has_equal_aux_data_in_face(1));
-            result_new_he->set_has_equal_aux_data_in_target_and_face
-              (0, cur_t->get_has_equal_aux_data_in_face(0));
-            result_new_he->set_has_equal_aux_data_in_target_and_face
-              (1, cur_t->get_has_equal_aux_data_in_face(1));
-          }
-          else
-          {
-            CGAL_assertion(copied_b_he->target() == cur_t);
-            CGAL_assertion(is_boundary_edge(copied_b_he));
-            Halfedge_handle b_he = map_halfedges[copied_b_he];
-
-
-            bool flag;
-            flag = (b_he->get_is_equal_aux_data_in_face(0) &&
-                    b_he->get_is_equal_aux_data_in_target(0));
-            result_new_he->set_is_equal_aux_data_in_target(0, flag);
-            
-            flag = (b_he->get_is_equal_aux_data_in_face(1) &&
-                    b_he->get_is_equal_aux_data_in_target(1));
-            result_new_he->set_is_equal_aux_data_in_target(1, flag);
-
-            flag = b_he->get_has_equal_aux_data_in_target_and_face(0);
-            //CGAL_assertion(flag == parent->has_equal_aux_data(0, b_he->face(), b_he->target()));
-            result_new_he->set_has_equal_aux_data_in_target(0, flag);
-            result_new_he->set_has_equal_aux_data_in_target_and_face(0, flag);
-
-            flag = b_he->get_has_equal_aux_data_in_target_and_face(1);
-            //CGAL_assertion(flag == parent->has_equal_aux_data(1, b_he->face(), b_he->target()));
-            result_new_he->set_has_equal_aux_data_in_target(1, flag);
-            result_new_he->set_has_equal_aux_data_in_target_and_face(1, flag);
-
-          }
-        }
-        else // not a boundary vertex
-        {
-          result_new_he->set_is_equal_aux_data_in_target(0, true);
-          result_new_he->set_is_equal_aux_data_in_target(1, true);
-          // the face's data is not empty - so it is ok to set "true" here
-          result_new_he->set_has_equal_aux_data_in_target(0, true);
-          result_new_he->set_has_equal_aux_data_in_target(1, true);
-          result_new_he->set_has_equal_aux_data_in_target_and_face(0, true);
-          result_new_he->set_has_equal_aux_data_in_target_and_face(1, true);
-        }
-        
-        if (is_boundary_vertex(new_he->source()))
-        {
-          Vertex_handle cur_t = new_he->source();
-          CGAL_assertion(copied_vertices_to_halfedges.is_defined(cur_t));
-          Halfedge_handle copied_b_he = copied_vertices_to_halfedges[cur_t];
-          if (copied_b_he == Halfedge_handle(NULL))
-          {
-            // this was an isolated vertex, which we touch
-            // since we have in the new edge aux sources as in the face,
-            // we can copy the vertex-face flags from the vertex
-            result_new_he->twin()->set_is_equal_aux_data_in_target
-              (0, cur_t->get_is_equal_aux_data_in_face(0));
-            result_new_he->twin()->set_is_equal_aux_data_in_target
-              (1, cur_t->get_is_equal_aux_data_in_face(1));
-            result_new_he->twin()->set_has_equal_aux_data_in_target
-              (0, cur_t->get_has_equal_aux_data_in_face(0));
-            result_new_he->twin()->set_has_equal_aux_data_in_target
-              (1, cur_t->get_has_equal_aux_data_in_face(1));
-            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face
-              (0, cur_t->get_has_equal_aux_data_in_face(0));
-            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face
-              (1, cur_t->get_has_equal_aux_data_in_face(1));
-          }
-          else
-          {
-            CGAL_assertion(copied_b_he->target() == cur_t);
-            CGAL_assertion(is_boundary_edge(copied_b_he));
-            Halfedge_handle b_he = map_halfedges[copied_b_he];
-
-            bool flag;
-            flag = (b_he->get_is_equal_aux_data_in_face(0) &&
-                    b_he->get_is_equal_aux_data_in_target(0));
-            result_new_he->twin()->set_is_equal_aux_data_in_target(0, flag);
-            
-            flag = (b_he->get_is_equal_aux_data_in_face(1) &&
-                    b_he->get_is_equal_aux_data_in_target(1));
-            result_new_he->twin()->set_is_equal_aux_data_in_target(1, flag);
-
-            flag = b_he->get_has_equal_aux_data_in_target_and_face(0);
-            //CGAL_assertion(flag == parent->has_equal_aux_data(0, b_he->face(), b_he->target()));
-            result_new_he->twin()->set_has_equal_aux_data_in_target(0, flag);
-            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(0, flag);
-
-            flag = b_he->get_has_equal_aux_data_in_target_and_face(1);
-            //CGAL_assertion(flag == parent->has_equal_aux_data(1, b_he->face(), b_he->target()));
-            result_new_he->twin()->set_has_equal_aux_data_in_target(1, flag);
-            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, flag);
-          }
-        }
-        else
-        {
-          result_new_he->twin()->set_is_equal_aux_data_in_target(0, true);
-          result_new_he->twin()->set_is_equal_aux_data_in_target(1, true);
-          result_new_he->twin()->set_has_equal_aux_data_in_target(0, true);
-          result_new_he->twin()->set_has_equal_aux_data_in_target(1, true);
-          result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(0, true);
-          result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, true);
-        }
-
-        return base_result;
-      }
-      else
-      {
-        // we don't insert the subcurve, but it might touch a vertex of the
-        // face's boundary - we need to check it and identify special vertices
-        if (left_v != Vertex_handle(NULL) &&
-            copied_arr_orig_vertices.is_defined(left_v))
-          copied_arr_special_vertices[left_v] =
-            copied_arr_special_vertices.default_value();
-
-        if (right_v != Vertex_handle(NULL) &&
-            copied_arr_orig_vertices.is_defined(right_v))
-          copied_arr_special_vertices[right_v] =
-            copied_arr_special_vertices.default_value();
-        
-        Halfedge_handle invalid_hh;
-        return Result (invalid_hh, false);
-      }
-    }
-
-    /*!
-     * Handle the a subcurve that overlaps a given edge.
-     * \param cv The overlapping subcurve.
-     * \param he The overlapped halfedge (directed from left to right).
-     * \param left_v The vertex that corresponds to the left endpoint of cv
-     *               (or an invalid handle if no such arrangement vertex
-     *               exists).
-     * \param right_v The vertex that corresponds to the right endpoint of cv
-     *               (or an invalid handle if no such arrangement vertex
-     *               exists).
-     * \return A handle to the halfedge obtained from the insertion of the
-     *         overlapping subcurve into the arrangement.
-     */
-    Result found_overlap(const X_monotone_curve_2& cv,
-                         Halfedge_handle he,
-                         Vertex_handle left_v, Vertex_handle right_v)
-    {
-      // check if the halfedge is the boundary of the original face
-      // (here we assume that this indication is dealt with in an observer
-      //  attached to the md, and implements split_edge)
-      bool is_boundary = is_boundary_edge(he);
-
-      // use insert_visitor to get the halfedge with the overlap
-      Result base_res = insert_visitor.found_overlap(cv, he, left_v, right_v);
-
-      Halfedge_handle overlap_he = base_res.first;
-
-      // take care for special vertices. the split vertices are always special,
-      // and this is taken care of in the after_split event.
-      // here we should update the original vertices that consolidate with the
-      // new subcurve
-      if (copied_arr_orig_vertices.is_defined(overlap_he->source()))
-        copied_arr_special_vertices[overlap_he->source()] =
-          copied_arr_special_vertices.default_value();
-
-      if (copied_arr_orig_vertices.is_defined(overlap_he->target()))
-        copied_arr_special_vertices[overlap_he->target()] =
-          copied_arr_special_vertices.default_value();
-
-      if (!is_boundary)
-        return base_res;
-
-      // if he is a boundary edge, it is a special edge
-      if (is_boundary)
-      {
-        copied_arr_special_edges[overlap_he] =
-          copied_arr_special_edges.default_value();
-        copied_arr_special_edges[overlap_he->twin()] =
-          copied_arr_special_edges.default_value();
-      }
-      return base_res;
-    }
-
-    /*!                                                   
-
-     * Handle point that lies inside a given face.
-     * \param p The point.
-     * \param face The face inside which the point lies.
-     * \return A handle to the new vertex obtained from the insertion of the
-     *         point into the face, or invalid handle if the point wasn't
-     *         inserted to the arrangement.
-     */
-    Vertex_handle found_point_in_face(const Point_2& p, Face_handle face)
-    {
-      // p lies inside a face: Insert it as an isolated vertex it the interior
-      // of this face.
-      Vertex_handle vh_for_p;
-      if (is_face_ok(face))
-      {
-        Arr_accessor<Minimization_diagram_2> arr_access (copied_arr);
-        arr_access.notify_before_global_change();
-        vh_for_p = copied_arr.insert_in_face_interior(p, face);
-        arr_access.notify_after_global_change();
-
-      	// now should set the is_equal and has_equal flags
-      	CGAL_assertion(map_vertices.is_defined(vh_for_p));
-      	Vertex_handle result_new_v = map_vertices[vh_for_p];
-      	result_new_v->set_is_equal_aux_data_in_face(0, true);
-      	result_new_v->set_is_equal_aux_data_in_face(1, true);
-        result_new_v->set_has_equal_aux_data_in_face(0, true);
-      	result_new_v->set_has_equal_aux_data_in_face(1, true);
-      }
-      return vh_for_p;
-    }
-
-    /*!
-     * Handle point that lies on a given edge.
-     * \param p The point.
-     * \param he The edge on which the point lies.
-     * \return A handle to the new vertex obtained from the insertion of the
-     *         point into the edge, or invalid handle if the point wasn't
-     *         inserted to the arrangement.
-     */
-    Vertex_handle found_point_on_edge(const Point_2& p, Halfedge_handle he)
-    {
-      // p lies in the interior of an edge: Split this edge to create a new
-      // vertex associated with p.
-      X_monotone_curve_2  sub_cv1, sub_cv2;
-      Halfedge_handle     split_he;
-      copied_arr.geometry_traits()->
-        split_2_object() (he->curve(), p, sub_cv1, sub_cv2);
-
-      Arr_accessor<Minimization_diagram_2> arr_access (copied_arr);
-      arr_access.notify_before_global_change();
-      split_he = copied_arr.split_edge (he, sub_cv1, sub_cv2);
-      arr_access.notify_after_global_change();
-
-      // if the edge is a boundary edge, then the new vertex is a special
-      // vertex and this is taken care of in the after_split event
-
-      // TODO: should we update some is_equal / has_equal flags? 
-      // I think that no, because it is handled in the after_split event
-
-      // The new vertex is the target of the returned halfedge.
-
-      return split_he->target();
-    }
-
-    /*!
-     * Handle point that lies on a given vertex.
-     * \param p The point.
-     * \param v The vertex on which the point lies.
-     * \return A handle to the new vertex obtained from the modifying
-     *         the existing vertex.
-     */
-    Vertex_handle found_point_on_vertex(const Point_2& p, Vertex_handle v)
-    {
-      // if the vertex is a boundary vertex, then it is a special vertex
-      // if it was created by split of a boundary edge, then it is already
-      // marked as special. we need to mark it as special if it is an original
-      // vertex
-      if (copied_arr_orig_vertices.is_defined(v))
-        copied_arr_special_vertices[v] =
-          copied_arr_special_vertices.default_value();
-
-      return copied_arr.modify_vertex (v, p);
-    }
-
-    /*!
-     * Update all the output collections using the internal data saved during
-     * the previous inserts.
-     * Should be called after all inserts have finished.
-     */
-    void finish()
-    {
-      // result_special_edges
-      // result_new_edges
-      Halfedge_iterator hi = copied_arr.halfedges_begin();
-      for (; hi != copied_arr.halfedges_end(); ++hi, ++hi)
-      {
-        Halfedge_handle h = hi;
-        CGAL_assertion(map_halfedges.is_defined(h) &&
-                       map_halfedges.is_defined(h->twin()));
-
-
-        // we need only one of the twin halfedges to represent the new edge
-        if (copied_arr_new_edges.is_defined(h))
-          result_new_edges.push_back(std::make_pair(map_halfedges[h],
-                                                    copied_arr_new_edges[h]));
-
-        if (copied_arr_special_edges.is_defined(h))
-        {
-          // we need the halfedge that its incident face is inside the original
-          // face
-          Face_handle f1 = h->face();
-          if (copied_face_parts.is_defined(f1))
-            result_special_edges.push_back(map_halfedges[h]);
-          else
-          {
-            CGAL_assertion_code(Face_handle f2 = h->twin()->face());
-            CGAL_assertion(copied_face_parts.is_defined(f2));
-            result_special_edges.push_back(map_halfedges[h->twin()]);
-          }
-        }
-      }
-
-      // result_face_parts
-      Face_iterator fi = copied_arr.faces_begin();
-      for (; fi != copied_arr.faces_end(); ++fi)
-      {
-        Face_handle f = fi;
-        if (copied_face_parts.is_defined(f))
-        {
-          CGAL_assertion(map_faces.is_defined(f));
-          result_face_parts.push_back(map_faces[f]);
-        }
-      }
-      
-      // result_special_vertices
-      Vertex_iterator vi = copied_arr.vertices_begin();
-      for (; vi != copied_arr.vertices_end(); ++vi)
-
-      {
-        Vertex_handle v = vi;
-        CGAL_assertion(map_vertices.is_defined(v));
-        Vertex_handle result_v = map_vertices[v];
-        
-        if (copied_arr_orig_vertices.is_defined(v))
-        {
-          // original vertex should be mapped to a boundary halfedge whose
-          // target is the vertex
-          CGAL_assertion(copied_vertices_to_halfedges.is_defined(v));
-          Halfedge_handle inc_he = copied_vertices_to_halfedges[v];
-          CGAL_assertion(copied_face_parts.is_defined(inc_he->face()));
-
-          Halfedge_handle result_inc_he = map_halfedges[inc_he];
-          CGAL_assertion(result_inc_he->target() == result_v);
-          CGAL_assertion(map_faces[inc_he->face()] == result_inc_he->face());
-
-          // original vertex is special if it appears in the special collection
-          // and its aux data share equal surfaces with the faces aux data
-          if (copied_arr_special_vertices.is_defined(v) &&
-              ((result_v->is_isolated() && 
-                parent->has_equal_aux_data_with_face(result_v)) ||
-               (!result_v->is_isolated() && 
-                parent->has_equal_aux_data_in_target_and_face(result_inc_he)))) 
-          {
-            //CGAL_assertion(parent->has_equal_aux_data(result_v, result_original_face));
-            result_special_vertices.push_back(result_v); 
-          }  
-        }
-        else
-        {
-          if (!copied_arr_new_boundary_vertices.is_defined(v))
-            // new vertex inside the face
-            result_special_vertices.push_back(result_v);
-          else if (copied_arr_special_vertices.is_defined(v))
-            result_special_vertices.push_back(result_v);
-        }
-      }
-    }
-
-    void set_current_intersection_type(Multiplicity t)
-    {
-      itype = t;
-    }
-  protected:
-
-    bool is_face_ok(Face_handle face)
-    {
-      // is this face a part of the original face?
-      // check in the copied_face_parts map
-      return (copied_face_parts.is_defined(face));
-    }
-
-    bool is_boundary_edge(Halfedge_handle he)
-    {
-      return (copied_arr_boundary_halfedges.is_defined(he));
-    }
-
-    bool is_original_boundary_vertex(Vertex_handle v)
-    {
-      return (copied_arr_orig_vertices.is_defined(v));
-    }
-    bool is_boundary_vertex(Vertex_handle v)
-    {
-      return (copied_arr_orig_vertices.is_defined(v) ||
-              copied_arr_new_boundary_vertices.is_defined(v));
-    }
-
-  protected:
-    // this zone visitor knows how to insert the given subcurves into the
-    // minimization diagram. we use it to insert the subcurves we want (which
-    // are in the given original face)
-    Md_insert_zone_visitor insert_visitor;
-
-    Minimization_diagram_2& copied_arr;
-    Minimization_diagram_2& result_arr;
-    Face_handle result_original_face;
-    
-    // mappings between features in the 2 arrangements
-    Halfedges_map& map_halfedges;
-    Vertices_map& map_vertices;
-    Faces_map& map_faces;
-
-    // output lists
-    Halfedges_list& result_special_edges;
-    Halfedges_w_type_list& result_new_edges;
-    Faces_list& result_face_parts;
-    Vertices_list& result_special_vertices;
-
-    // helper collections (for copied_arr features)
-    Halfedges_hash        copied_arr_boundary_halfedges;
-    Vertices_hash         copied_arr_orig_vertices;
-    Vertices_hash         copied_arr_new_boundary_vertices;
-    Vertices_to_edges_map copied_vertices_to_halfedges;    
-
-    Halfedges_hash        copied_arr_special_edges;
-    Halfedges_hash_w_type copied_arr_new_edges;
-    Faces_hash            copied_face_parts;
-    Vertices_hash         copied_arr_special_vertices;
-
-    // this observer will take care of the result arrangegment
-    Copy_observer        md_copy_observer;
-
-    // this observer will keep all our information in the helper collections
-    // during the insert process
-    // (the special features info, boundary info, new_edges)
-    Copied_face_observer md_observer;
-    
-    // for using its methods
-    Self* parent;
-
-    // current type of interection curve that is inserted
-    Multiplicity itype;
-  };
-
-  // this minimization diagram observer updates data in new faces created
-  class New_faces_observer : public Md_observer
-  {
-  public:
-    typedef typename Minimization_diagram_2::Face_handle Face_handle;
-
-    New_faces_observer(Minimization_diagram_2& arr) : Md_observer(arr) {}
-    
-    virtual ~New_faces_observer() {}
-
-    virtual void after_split_face(Face_handle org_f,
-                                  Face_handle new_f,
-                                  bool)
-    {
-      // update the new face's aux_data from original face
-      if (org_f->get_aux_is_set(0))
-        new_f->set_aux_source(0, org_f->get_aux_source(0));
-      if (org_f->get_aux_is_set(1))
-        new_f->set_aux_source(1, org_f->get_aux_source(1));
-    }
-
-  };
-
-  //! The geometry traits object.
-  const Traits* m_traits;
-
-  //! Indicates whether the geometry traits object should be freed up.
-  bool own_traits;
-
-  //! The type of envelope (ENVELOPE_LOWER or ENVELOPE_UPPER).
-  Envelope_type type; 
-};
-
-#undef HE_COMP_RES
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_exact_constructions_kernel.h b/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_exact_constructions_kernel.h
deleted file mode 100644
index 213d706..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_exact_constructions_kernel.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas, Sylvain Pion
-
-#ifndef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
-#define CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Filtered_kernel.h>
-#include <CGAL/Lazy_exact_nt.h>
-
-#include <CGAL/internal/Exact_type_selector.h>
-
-#ifndef CGAL_DONT_USE_LAZY_KERNEL
-#  include <CGAL/Lazy_kernel.h>
-#endif
-
-namespace CGAL {
-
-// Epeck_ft is either Gmpq, or leda_rational, or Quotient<MP_float>
-typedef internal::Exact_field_selector<double>::Type Epeck_ft;
-
-// The following are redefined kernels instead of simple typedefs in order to shorten
-// template name length (for error messages, mangling...).
-
-#ifdef CGAL_DONT_USE_LAZY_KERNEL
-
-// Equivalent to Filtered_kernel<Simple_cartesian<Lazy_exact_nt<Epeck_ft> > >
-class Epeck
-  : public Filtered_kernel_adaptor<
-               Type_equality_wrapper< Simple_cartesian<Lazy_exact_nt<Epeck_ft> >::Base<Epeck>::Type, Epeck >,
-#ifdef CGAL_NO_STATIC_FILTERS
-               false >
-#else
-               true >
-#endif
-{}; // end class Epeck
-
-#else // no CGAL_DONT_USE_LAZY_KERNEL
-
-// Equivalent to Lazy_kernel<Simple_cartesian<Epeck_ft> >
-#ifdef CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
-class Epeck
-  : public internal::Static_filters<
-      Type_equality_wrapper<
-             Lazy_kernel_base< Simple_cartesian<Epeck_ft>,
-                               Simple_cartesian<Interval_nt_advanced>,
-	                       Cartesian_converter< Simple_cartesian<Epeck_ft>,
-                                                    Simple_cartesian<Interval_nt_advanced> >,
-                               Epeck>,
-             Epeck >, false>
-{};
-
-#else // no CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
-
-class Epeck
-  : public Type_equality_wrapper<
-             Lazy_kernel_base< Simple_cartesian<Epeck_ft>,
-                               Simple_cartesian<Interval_nt_advanced>,
-	                       Cartesian_converter< Simple_cartesian<Epeck_ft>,
-                                                    Simple_cartesian<Interval_nt_advanced> >,
-                               Epeck>,
-             Epeck >
-{};
-#endif // no CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
-
-#endif // no CGAL_DONT_USE_LAZY_KERNEL
-
-typedef Epeck Exact_predicates_exact_constructions_kernel;
-
-} //namespace CGAL
-
-#endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_inexact_constructions_kernel.h b/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_inexact_constructions_kernel.h
deleted file mode 100644
index 2c5b522..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_inexact_constructions_kernel.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas, Sylvain Pion
-
-#ifndef CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
-#define CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Filtered_kernel.h>
-
-namespace CGAL {
-
-// The following is equivalent to Filtered_kernel< Simple_cartesian<double> >,
-// but it's shorter in terms of template name length (for error messages, mangling...).
-
-class Epick
-  : public Filtered_kernel_adaptor<
-               Type_equality_wrapper< Simple_cartesian<double>::Base<Epick>::Type, Epick >,
-#ifdef CGAL_NO_STATIC_FILTERS
-               false >
-#else
-               true >
-#endif
-{};
-
-typedef Epick Exact_predicates_inexact_constructions_kernel;
-
-} //namespace CGAL
-
-#endif // CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/FPU.h b/3rdparty/CGAL-4.6/include/CGAL/FPU.h
deleted file mode 100644
index 1880d51..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/FPU.h
+++ /dev/null
@@ -1,511 +0,0 @@
-// Copyright (c) 1998-2008  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_FPU_H
-#define CGAL_FPU_H
-
-#include <CGAL/assertions.h>
-
-#ifndef __INTEL_COMPILER
-#include <cmath> // for HUGE_VAL
-#endif
-
-// This file specifies some platform dependant functions, regarding the FPU
-// directed rounding modes.  There is only support for double precision.
-//
-// It also contains the definition of the Protect_FPU_rounding<> class,
-// which helps to protect blocks of code needing a particular rounding mode.
-
-#if defined __alpha__  && defined __linux__
-extern "C" {
-#  include <fenv.h>
-}
-#elif defined __SUNPRO_CC && defined __sun
-#  include <ieeefp.h>
-#elif defined __osf || defined __osf__
-#  ifdef __GNUG__
-     // GCC seems to remove (fixincludes) read_rnd/write_rnd...
-#    include "/usr/include/float.h"
-#  else
-#    include <cfloat>
-#  endif
-#elif defined _MSC_VER || defined __sparc__ || \
-     (defined __i386__ && !defined __PGI && !defined __SUNPRO_CC \
-      && !defined __SSE2__)
-   // Nothing to include.
-#else
-   // By default we use the ISO C99 version.
-#  include <fenv.h>
-#endif
-
-
-// Some useful constants
-
-#if defined CGAL_CFG_NO_LIMITS
-#  if defined CGAL_CFG_DENORMALS_COMPILE_BUG
-     // For compilers crashing when dealing with denormalized values.
-     // So we have to generate it at run time instead.
-#    define CGAL_IA_MIN_DOUBLE (CGAL::internal::minimin)
-#  else
-#    define CGAL_IA_MIN_DOUBLE (5e-324)
-#  endif
-#  define CGAL_IA_MAX_DOUBLE (1.7976931348623157081e+308)
-#else
-#  include <limits>
-#  define CGAL_IA_MIN_DOUBLE std::numeric_limits<double>::denorm_min()
-#  define CGAL_IA_MAX_DOUBLE (std::numeric_limits<double>::max)()
-#endif
-
-
-// Pure and safe SSE2 mode (g++ -mfpmath=sse && (-msse2 || -march=pentium4))
-// can be detected by :
-// TODO : see what Intel and VC++ have to say about this.
-#if defined __FLT_EVAL_METHOD__ && defined __SSE2_MATH__ && \
-      (__FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 1)
-#  define CGAL_SAFE_SSE2
-#  include <xmmintrin.h>
-#endif
-
-// The CGAL_FPU_HAS_EXCESS_PRECISION macro is defined if some computations with
-// double can use more than the 53bits of precision of IEEE754, and/or if the
-// exponent has a wider range.  This can produce double rounding effects and
-// other bad things that we need to protect against.
-// The typical offender is the traditional FPU of x86 (SSE2-only mode is not affected).
-// Are there others, besides itanium and m68k?
-#if !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT && \
-  (((defined __i386__ || defined __x86_64__) && !defined CGAL_SAFE_SSE2) \
-   || defined __ia64__ \
-   || defined _M_IX86 || defined _M_X64 || defined _M_IA64 \
-   || (defined FLT_EVAL_METHOD && FLT_EVAL_METHOD != 0 && FLT_EVAL_METHOD != 1))
-#  define CGAL_FPU_HAS_EXCESS_PRECISION
-#endif
-
-// Presence of SSE2 (for explicit use)
-#if  defined(__SSE2__) \
-  || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) \
-  || defined(_M_X64)
-#  include <emmintrin.h>
-#  define CGAL_HAS_SSE2 1
-#endif
-
-// Only define CGAL_USE_SSE2 for 64 bits where malloc has a suitable
-// alignment, 32 bits is too dangerous.
-#if defined(CGAL_HAS_SSE2) && (defined(__x86_64__) || defined(_M_X64))
-#  define CGAL_USE_SSE2 1
-#endif
-
-namespace CGAL {
-
-namespace internal {
-
-#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG
-CGAL_EXPORT extern double minimin;
-#endif
-
-#ifdef __INTEL_COMPILER
-const double infinity = std::numeric_limits<double>::infinity();
-#else
-const double infinity = HUGE_VAL;
-#endif
-
-} // namespace internal
-
-// Inline function to stop compiler optimizations that shouldn't happen with
-// pragma fenv on.
-// - constant propagation
-// - migration of fesetround across floating point operations
-// - (-a)-b -> -(a+b)
-// - (-a)*b -> -(a*b)
-// etc
-inline double IA_opacify(double x)
-{
-#ifdef __llvm__
-  // LLVM's support for inline asm is completely messed up:
-  // http://llvm.org/bugs/show_bug.cgi?id=17958
-  // http://llvm.org/bugs/show_bug.cgi?id=17959
-  // etc.
-  // This seems to produce code that is ok (not optimal but better than
-  // volatile). In case of trouble, use volatile instead.
-# ifdef CGAL_HAS_SSE2
-  asm volatile ("" : "+x"(x) );
-# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__
-  // ARM
-  asm volatile ("" : "+w"(x) );
-# else
-  asm volatile ("" : "+m"(x) );
-# endif
-  return x;
-#elif defined __xlC__
-  // PowerPC - XL C++ (the z/OS version supposedly does not define this macro)
-  // If we give it an alternative "+fm", it gets confused and generates worse code.
-  asm volatile ("" : "+f"(x) );
-  return x;
-#elif defined __GNUG__
-  // Intel used not to emulate this perfectly, we'll see.
-  // If we create a version of IA_opacify for vectors, note that gcc < 4.8
-  // fails with "+g" and we need to use "+mx" instead.
-  // "+X" ICEs ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and
-  // may not be safe?
-  // The constraint 'g' doesn't include floating point registers ???
-  // Intel has a bug where -mno-sse still defines __SSE__ and __SSE2__
-  // (-mno-sse2 works though), no work-around for now.
-# if defined __SSE2_MATH__ || (defined __INTEL_COMPILER && defined __SSE2__)
-#  if __GNUC__ * 100 + __GNUC_MINOR__ >= 409
-  // ICEs in reload/LRA with older versions.
-  asm volatile ("" : "+gx"(x) );
-#  else
-  asm volatile ("" : "+mx"(x) );
-#  endif
-# elif (defined __i386__ || defined __x86_64__)
-  // "+f" doesn't compile on x86(_64)
-  // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 )
-  // Don't mix "t" with "g": http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180
-  // We can't put "t" with "x" either, prefer "x" for -mfpmath=sse,387.
-  // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 )
-  asm volatile ("" : "+mt"(x) );
-# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__
-  // ARM
-  asm volatile ("" : "+gw"(x) );
-# elif defined __powerpc__ || defined __POWERPC__
-  // PowerPC
-  asm volatile ("" : "+gd"(x) );
-# elif defined __sparc
-  // Sparc
-  asm volatile ("" : "+ge"(x) );
-# elif defined __ia64
-  // Itanium
-  asm volatile ("" : "+gf"(x) );
-# else
-  asm volatile ("" : "+g"(x) );
-# endif
-  return x;
-#else
-  volatile double e = x;
-  return e;
-#endif
-}
-
-// Inline function to drop excess precision before we forget the rounding mode,
-// and stop compiler optimizations at the same time.
-inline double IA_force_to_double(double x)
-{
-#ifndef CGAL_FPU_HAS_EXCESS_PRECISION
-  return IA_opacify (x);
-#else
-#if defined __GNUG__
-#  ifdef CGAL_HAS_SSE2
-  // For an explanation of volatile:
-  // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027
-  asm volatile ("" : "+mx"(x) );
-#  else
-  // Similar to writing to a volatile and reading back, except that calling
-  // it k times in a row only goes through memory once.
-  asm volatile ("" : "+m"(x) );
-#  endif
-  return x;
-#else
-  volatile double e = x;
-  return e;
-#endif
-#endif
-}
-
-// Interval arithmetic needs to protect against double-rounding effects
-// caused by excess FPU precision, even if it forces the 53bit mantissa
-// precision, because there is no way to fix the problem for the exponent
-// which has the same problem.  This affects underflow and overflow cases.
-// In case one does not care about such "extreme" situations, one can
-// set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT to pretend there is no excess
-// precision.
-#if defined CGAL_FPU_HAS_EXCESS_PRECISION
-#  define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_force_to_double(x)
-#elif 1
-// LLVM doesn't have -frounding-math so needs extra protection.
-// GCC also migrates fesetround calls over FP instructions, so protect
-// everyone.
-#  define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_opacify(x)
-#else
-// Unused, reserved to compilers without excess precision and pragma fenv on.
-// ??? Should we trust Visual Studio not to optimize too much and let it use
-// this when CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT?
-#  define CGAL_IA_FORCE_TO_DOUBLE(x) (x)
-#endif
-
-// We sometimes need to stop constant propagation,
-// because operations are done with a wrong rounding mode at compile time.
-#ifndef CGAL_IA_DONT_STOP_CONSTANT_PROPAGATION
-#  define CGAL_IA_STOP_CPROP(x)    CGAL::IA_opacify(x)
-#else
-#  define CGAL_IA_STOP_CPROP(x)    (x)
-#endif
-
-// std::sqrt(double) on VC++ and CygWin is buggy when not optimizing.
-#if defined ( _MSC_VER ) && ! defined ( _WIN64 )
-inline double IA_bug_sqrt(double d)
-{
-  _asm
-  {
-    fld d
-    fsqrt
-    fstp d
-  }
-  return d;
-}
-
-#  define CGAL_BUG_SQRT(d) IA_bug_sqrt(d)
-
-
-#elif defined __SSE2_MATH__
-// For SSE2, we need to call __builtin_sqrt() instead of libc's sqrt().
-#  define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
-#elif defined __CYGWIN__
-inline double IA_bug_sqrt(double d)
-{
-  double r;
-  asm volatile ("fsqrt" : "=t"(r) : "0"(d));
-  return r;
-}
-#  define CGAL_BUG_SQRT(d) IA_bug_sqrt(d)
-#else
-#  define CGAL_BUG_SQRT(d) std::sqrt(d)
-#endif
-
-// Here are the operator macros that make use of the above.
-// With GCC, we can do slightly better : test with __builtin_constant_p()
-// that both arguments are constant before stopping one of them.
-// Use inline functions instead ?
-#define CGAL_IA_ADD(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)+CGAL_IA_STOP_CPROP(b))
-#define CGAL_IA_SUB(a,b) CGAL_IA_FORCE_TO_DOUBLE(CGAL_IA_STOP_CPROP(a)-(b))
-#define CGAL_IA_MUL(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)*CGAL_IA_STOP_CPROP(b))
-#define CGAL_IA_DIV(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)/CGAL_IA_STOP_CPROP(b))
-#define CGAL_IA_SQUARE(a) CGAL_IA_MUL(a,a)
-#define CGAL_IA_SQRT(a) \
-        CGAL_IA_FORCE_TO_DOUBLE(CGAL_BUG_SQRT(CGAL_IA_STOP_CPROP(a)))
-
-
-#if defined CGAL_SAFE_SSE2
-
-#define CGAL_IA_SETFPCW(CW) _MM_SET_ROUNDING_MODE(CW)
-#define CGAL_IA_GETFPCW(CW) CW = _MM_GET_ROUNDING_MODE()
-typedef unsigned int FPU_CW_t;
-#define CGAL_FE_TONEAREST    _MM_ROUND_NEAREST
-#define CGAL_FE_TOWARDZERO   _MM_ROUND_TOWARD_ZERO
-#define CGAL_FE_UPWARD       _MM_ROUND_UP
-#define CGAL_FE_DOWNWARD     _MM_ROUND_DOWN
-
-#elif defined __i386__ && !defined __PGI && !defined __SUNPRO_CC \
-      && !defined CGAL_HAS_SSE2
-// If we use both 387 and sse2, be safe and drop to fe[gs]etround.
-// Can we test CGAL_USE_SSE2 instead?
-
-// The GNU libc version (cf powerpc) is nicer, but doesn't work on libc 5 :(
-// This one also works with CygWin.
-// Note that the ISO C99 version may not be enough because of the extended
-// mantissa issue on x86 (may be required by some kinds of computation, but
-// as far as CGAL::Interval_nt<> is concerned, the double-rounding issues
-// are taking care of there).
-#define CGAL_IA_SETFPCW(CW) asm volatile ("fldcw %0" : :"m" (CW))
-#define CGAL_IA_GETFPCW(CW) asm volatile ("fnstcw %0" : "=m" (CW))
-typedef unsigned short FPU_CW_t;
-#define CGAL_FE_TONEAREST    (0x000 | 0x127f)
-#define CGAL_FE_TOWARDZERO   (0xc00 | 0x127f)
-#define CGAL_FE_UPWARD       (0x800 | 0x127f)
-#define CGAL_FE_DOWNWARD     (0x400 | 0x127f)
-
-#elif defined __SUNPRO_CC && defined __sun
-#define CGAL_IA_SETFPCW(CW) fpsetround(fp_rnd(CW))
-#define CGAL_IA_GETFPCW(CW) CW = fpgetround()
-typedef unsigned int FPU_CW_t;
-#define CGAL_FE_TONEAREST    FP_RN
-#define CGAL_FE_TOWARDZERO   FP_RZ
-#define CGAL_FE_UPWARD       FP_RP
-#define CGAL_FE_DOWNWARD     FP_RM
-
-#elif defined __sparc__
-#define CGAL_IA_SETFPCW(CW) asm volatile ("ld %0,%%fsr" : :"m" (CW))
-#define CGAL_IA_GETFPCW(CW) asm volatile ("st %%fsr,%0" : "=m" (CW))
-typedef unsigned int FPU_CW_t;
-#define CGAL_FE_TONEAREST    (0x0        | 0x20000000 | 0x1f)
-#define CGAL_FE_TOWARDZERO   (0x40000000 | 0x20000000 | 0x1f)
-#define CGAL_FE_UPWARD       (0x80000000 | 0x20000000 | 0x1f)
-#define CGAL_FE_DOWNWARD     (0xc0000000 | 0x20000000 | 0x1f)
-
-#elif defined __mips__
-#define CGAL_IA_SETFPCW(CW) asm volatile ("ctc1 %0,$31" : :"r" (CW))
-#define CGAL_IA_GETFPCW(CW) asm volatile ("cfc1 %0,$31" : "=r" (CW))
-typedef unsigned int FPU_CW_t;
-#define CGAL_FE_TONEAREST    (0x0)
-#define CGAL_FE_TOWARDZERO   (0x1)
-#define CGAL_FE_UPWARD       (0x2)
-#define CGAL_FE_DOWNWARD     (0x3)
-
-#elif defined __osf || defined __osf__  // Not yet supported.
-#define CGAL_IA_SETFPCW(CW) write_rnd(CW)
-#define CGAL_IA_GETFPCW(CW) CW = read_rnd()
-typedef unsigned int FPU_CW_t;
-#define CGAL_FE_TONEAREST    FP_RND_RN
-#define CGAL_FE_TOWARDZERO   FP_RND_RZ
-#define CGAL_FE_UPWARD       FP_RND_RP
-#define CGAL_FE_DOWNWARD     FP_RND_RM
-
-#elif defined ( _MSC_VER )
-#if ( _MSC_VER < 1400)
-#define CGAL_IA_SETFPCW(CW) _controlfp (CW, _MCW_RC )
-#define CGAL_IA_GETFPCW(CW) CW = _controlfp (0, 0 ) &  _MCW_RC
-typedef unsigned short FPU_CW_t;
-#else
-#define CGAL_IA_SETFPCW(CW) unsigned int dummy; _controlfp_s (&dummy, CW, _MCW_RC )
-#define CGAL_IA_GETFPCW(CW)_controlfp_s (&CW, 0, 0 ); CW  &=  _MCW_RC
-typedef unsigned int FPU_CW_t;
-#endif
-
-#define CGAL_FE_TONEAREST    _RC_NEAR
-#define CGAL_FE_TOWARDZERO   _RC_CHOP
-#define CGAL_FE_UPWARD       _RC_UP
-#define CGAL_FE_DOWNWARD     _RC_DOWN
-
-#else
-// This is a version following the ISO C99 standard, which aims at portability.
-// The drawbacks are speed on one hand, and also, on x86, it doesn't fix the
-// extended mantissa issue (this is not a problem for IA, but it is one for
-// some future modular computations).
-#define CGAL_IA_SETFPCW(CW)  fesetround(CW)
-#define CGAL_IA_GETFPCW(CW)  CW = fegetround()
-typedef int FPU_CW_t;
-#define CGAL_FE_TONEAREST    FE_TONEAREST
-#define CGAL_FE_TOWARDZERO   FE_TOWARDZERO
-#define CGAL_FE_UPWARD       FE_UPWARD
-#define CGAL_FE_DOWNWARD     FE_DOWNWARD
-#endif
-
-// User interface:
-
-inline
-FPU_CW_t
-FPU_get_cw (void)
-{
-    FPU_CW_t cw;
-    CGAL_IA_GETFPCW(cw);
-    return cw;
-}
-
-inline
-void
-FPU_set_cw (FPU_CW_t cw)
-{
-    CGAL_IA_SETFPCW(cw);
-}
-
-inline
-FPU_CW_t
-FPU_get_and_set_cw (FPU_CW_t cw)
-{
-    FPU_CW_t old = FPU_get_cw();
-    FPU_set_cw(cw);
-    return old;
-}
-
-
-// A class whose constructor sets the FPU mode to +inf, saves a backup of it,
-// and whose destructor resets it back to the saved state.
-
-template <bool Protected = true> struct Protect_FPU_rounding;
-
-template <>
-struct Protect_FPU_rounding<true>
-{
-  Protect_FPU_rounding(FPU_CW_t r = CGAL_FE_UPWARD)
-    : backup( FPU_get_and_set_cw(r) ) {}
-
-  ~Protect_FPU_rounding()
-  {
-     FPU_set_cw(backup);
-  }
-
-private:
-  FPU_CW_t backup;
-};
-
-template <>
-struct Protect_FPU_rounding<false>
-{
-  Protect_FPU_rounding() {}
-  Protect_FPU_rounding(FPU_CW_t /*= CGAL_FE_UPWARD*/) {}
-};
-
-
-// A wrapper on top of the Protect_FPU_rounding to add "expensive" checks
-// of the rounding mode.  It is used internally, to benefit from the
-// protector declarations to add checks in non-protected mode.
-
-template <bool Protected = true>
-struct Checked_protect_FPU_rounding
-  : Protect_FPU_rounding<Protected>
-{
-  Checked_protect_FPU_rounding()
-  {
-    CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_UPWARD);
-  }
-
-  Checked_protect_FPU_rounding(FPU_CW_t r)
-    : Protect_FPU_rounding<Protected>(r)
-  {
-    CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_UPWARD);
-  }
-};
-
-
-// The class Set_ieee_double_precision forces the double precision (53bit mantissa),
-// to protect from double rounding effects on x86 FPU.
-// ( Note that it also sets the rounding mode to nearest. )
-// Its destructor restores the FPU state as it was previously.
-// Note that this affects "long double" as well, and other potential side effects.
-// And note that it does not (cannot) "fix" the same problem for the exponent.
-
-struct Set_ieee_double_precision
-#ifdef CGAL_FPU_HAS_EXCESS_PRECISION
-  : public Protect_FPU_rounding<>
-{
-  Set_ieee_double_precision()
-    : Protect_FPU_rounding<>(CGAL_FE_TONEAREST) {}
-};
-#else
-{
-  Set_ieee_double_precision() {} // only to kill compiler warnings.
-};
-#endif
-
-
-// The following function serves the same goal as Set_ieee_double_precision but
-// does the change globally (no destructor resets the previous behavior).
-inline void force_ieee_double_precision()
-{
-#ifdef CGAL_FPU_HAS_EXCESS_PRECISION
-    FPU_set_cw(CGAL_FE_TONEAREST);
-#endif
-}
-
-} //namespace CGAL
-
-#endif // CGAL_FPU_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_d.h b/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_d.h
deleted file mode 100644
index 13f4716..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_d.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)    : Samuel Hornus, Olivier Devillers
-
-#ifndef CGAL_FILTERED_KERNEL_D_H
-#define CGAL_FILTERED_KERNEL_D_H
-
-#include <CGAL/Filtered_predicate.h>
-#include <CGAL/internal/Exact_type_selector.h>
-#include <CGAL/Kernel_d/Cartesian_converter_d.h>
-
-#include<boost/pool/pool_alloc.hpp>
-
-namespace CGAL {
-
-template<typename Kernel> // a dD kernel we want to filter
-struct Filtered_kernel_d : public Cartesian_d<typename Kernel::FT>
-{
-    typedef typename Kernel::LA			LA;
-    typedef typename Kernel::RT			RT; // Ring type
-    typedef typename Kernel::FT			FT; // Field type
-
-    typedef Cartesian_d<FT>			Base;
-    typedef Filtered_kernel_d<Kernel>		Self;
-
-    // an exact number type
-    typedef typename internal::Exact_type_selector<RT>::Type	Exact_nt;
-    
-    // the corresponding exact kernel
-    //typedef Linear_algebraCd< Exact_nt, boost::pool_allocator<Exact_nt> > Exact_linalg;
-    typedef Linear_algebraCd< Exact_nt > Exact_linalg;
-    typedef Cartesian_d<Exact_nt, Exact_linalg>		Exact_kernel;
-    
-    // the kernel used for filtered predicates
-    typedef Interval_nt<false> IA;
-    //typedef Linear_algebraCd<IA, boost::pool_allocator<IA> > Interval_linalg;
-    typedef Linear_algebraCd<IA> Interval_linalg;
-    typedef Cartesian_d<IA, Interval_linalg >	Approximate_kernel;
-    
-    // the converter
-    typedef Cartesian_converter_d<Base, Exact_kernel>	C2E;
-    typedef Cartesian_converter_d<Base, Approximate_kernel>	C2F;
-
-    // we change the predicates.
-#define CGAL_Kernel_pred(P, Pf) \
-    typedef Filtered_predicate<typename Exact_kernel::P, typename Approximate_kernel::P, C2E, C2F> P; \
-    P Pf() const { return P(); }
-
-    // we don't touch the constructions.
-#define CGAL_Kernel_cons(Y,Z)
-
-#include <CGAL/Kernel_d/interface_macros_d.h>
-};
-
-} //namespace CGAL
-
-#endif // CGAL_FILTERED_KERNEL_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_predicate.h b/3rdparty/CGAL-4.6/include/CGAL/Filtered_predicate.h
deleted file mode 100644
index 5cd67f3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Filtered_predicate.h
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright (c) 2001-2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_FILTERED_PREDICATE_H
-#define CGAL_FILTERED_PREDICATE_H
-
-#include <string>
-#include <CGAL/config.h>
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Uncertain.h>
-#include <CGAL/Profile_counter.h>
-
-namespace CGAL {
-
-// This template class is a wrapper that implements the filtering for any
-// predicate (dynamic filters with IA).
-
-// TODO :
-// - each predicate in the default kernel should define a tag that says if it
-//   wants to be filtered or not (=> all homogeneous predicate define this
-//   tag).  We could even test-suite that automatically.  It makes a strong
-//   new requirement on the kernel though...
-//   Could be done with a traits mechanism ?
-//   A default template could use the current IA, but other tags or whatever
-//   could specify no filtering at all, or static filtering...
-// - same thing for constructions => virtual operator() ?
-// - similarly, constructions should have a tag saying if they can throw or
-//   not, or we let all this up to the compiler optimizer to figure out ?
-// - Some caching could be done at the Point_2 level.
-
-
-template <class EP, class AP, class C2E, class C2A, bool Protection = true>
-class Filtered_predicate
-{
-  EP  ep;
-  AP  ap;
-  C2E c2e;
-  C2A c2a;
-
-  typedef typename AP::result_type  Ares;
-
-public:
-
-  typedef AP    Approximate_predicate;
-  typedef EP    Exact_predicate;
-  typedef C2E   To_exact_converter;
-  typedef C2A   To_approximate_converter;
-
-  typedef typename EP::result_type  result_type;
-  // AP::result_type must be convertible to EP::result_type.
-
-  Filtered_predicate()
-  {}
-
-  // These constructors are used for constructive predicates.
-  // You should try to avoid constructive predicates, as they will construct
-  // the exact values systematically (in the ctor), rather than lazily.
-  template <class O>
-  Filtered_predicate(const O &o1)
-    : ep(c2e(o1)), ap(c2a(o1))
-  {}
-
-  template <class O1, class O2>
-  Filtered_predicate(const O1 &o1, const O2 &o2)
-    : ep(c2e(o1), c2e(o2)), ap(c2a(o1), c2a(o2))
-  {}
-
-  explicit Filtered_predicate(const EP&  e, const AP&  a)
-    : ep(e), ap(a)
-  {}
-
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template <typename... Args>
-  result_type
-  operator()(const Args&... args) const;
-#else
-
-  template <class A1>
-  result_type
-  operator()(const A1 &a1) const;
-
-  template <class A1, class A2>
-  result_type
-  operator()(const A1 &a1, const A2 &a2) const;
-
-  template <class A1, class A2, class A3>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3) const;
-
-  template <class A1, class A2, class A3, class A4>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const;
-
-  template <class A1, class A2, class A3, class A4, class A5>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5) const;
-
-  template <class A1, class A2, class A3, class A4, class A5, class A6>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6) const;
-
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6, const A7 &a7) const;
-
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const;
-
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8, class A9>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
-             const A9 &a9) const;
-
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8, class A9, class A10>
-  result_type
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
-             const A9 &a9, const A10 &a10) const;
-
-  // Idem for more than 10 arguments.  Do it on demand.
-
-#endif
-};
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <typename... Args>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const Args&... args) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(args)...);
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(args)...);
-}
-
-#else
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  
-	  Ares res = ap(c2a(a1));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5, class A6>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6, const A7 &a7) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
-			c2a(a7));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
-			c2a(a7), c2a(a8));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
-              c2e(a8));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8, class A9>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
-             const A9 &a9) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
-			c2a(a7), c2a(a8), c2a(a9));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
-              c2e(a8), c2e(a9));
-}
-
-template <class EP, class AP, class C2E, class C2A, bool Protection>
-  template <class A1, class A2, class A3, class A4, class A5, class A6,
-            class A7, class A8, class A9, class A10>
-typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
-Filtered_predicate<EP,AP,C2E,C2A,Protection>::
-  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
-             const A9 &a9, const A10 &a10) const
-{
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    {
-      Protect_FPU_rounding<Protection> p;
-      try
-	{
-	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
-			c2a(a7), c2a(a8), c2a(a9), c2a(a10));
-	  if (is_certain(res))
-	    return get_certain(res);
-	}
-      catch (Uncertain_conversion_exception) {}
-    }
-    CGAL_BRANCH_PROFILER_BRANCH(tmp);
-    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
-    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
-              c2e(a8), c2e(a9), c2e(a10));
-}
-
-#endif
-
-} //namespace CGAL
-
-#endif // CGAL_FILTERED_PREDICATE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fixed_border_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Fixed_border_parameterizer_3.h
deleted file mode 100644
index d9a020f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Fixed_border_parameterizer_3.h
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_FIXED_BORDER_PARAMETERIZER_3_H
-#define CGAL_FIXED_BORDER_PARAMETERIZER_3_H
-
-#include <CGAL/circulator.h>
-#include <CGAL/Timer.h>
-#include <CGAL/OpenNL/linear_solver.h>
-
-#include <CGAL/Parameterizer_traits_3.h>
-#include <CGAL/Circular_border_parameterizer_3.h>
-#include <CGAL/Parameterization_mesh_feature_extractor.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-#include <iostream>
-
-/// \file Fixed_border_parameterizer_3.h
-
-namespace CGAL {
-
-
-// ------------------------------------------------------------------------------------
-// Declaration
-// ------------------------------------------------------------------------------------
-
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class `Fixed_border_parameterizer_3`
-/// is the base class of fixed border parameterization methods (Tutte, Floater, ...).
-///
-/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
-///
-/// This class is a pure virtual class, thus cannot be instantiated.
-/// Anyway, it implements most of the parameterization algorithm `parameterize()`.
-/// Subclasses are Strategies that modify the behavior of this algorithm:
-/// - They provide `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
-///   parameters.
-/// - They implement `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
-///   for j neighbor vertex of i.
-/// - They may implement an optimized version of `is_one_to_one_mapping()`.
-///
-// @todo `Fixed_border_parameterizer_3` should remove border vertices
-/// from the linear systems in order to have a symmetric positive definite
-/// matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-///
-///
-/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-
-template
-<
-    class ParameterizationMesh_3,       ///< 3D surface mesh
-    class BorderParameterizer_3         ///< Strategy to parameterize the surface border
-                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-    class SparseLinearAlgebraTraits_d   ///< Traits class to solve a sparse linear system
-                = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>
->
-class Fixed_border_parameterizer_3
-    : public Parameterizer_traits_3<ParameterizationMesh_3>
-{
-// Private types
-private:
-    // Superclass
-    typedef Parameterizer_traits_3<ParameterizationMesh_3>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    /// @endcond
-
-    /// Export BorderParameterizer_3 template parameter.
-    typedef BorderParameterizer_3           Border_param;
-    /// Export SparseLinearAlgebraTraits_d template parameter.
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-protected:
-    // Using statements needed for derived class
-    using Base::compute_angle_rad;
-    using Base::cotangent;
-
-// Public operations
-public:
-    /// Constructor
-    Fixed_border_parameterizer_3(Border_param border_param = Border_param(),
-                                    ///< Object that maps the surface's border to 2D space
-                               Sparse_LA sparse_la = Sparse_LA())
-                                    ///< Traits object to access a sparse linear system
-        : m_borderParameterizer(border_param), m_linearAlgebra(sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-    /// Compute a one-to-one mapping from a triangular 3D surface mesh
-    /// to a piece of the 2D space.
-    /// The mapping is linear by pieces (linear in each triangle).
-    /// The result is the (u,v) pair image of each vertex of the 3D surface.
-    ///
-    /// \pre `mesh` must be a surface with one connected component.
-    /// \pre `mesh` must be a triangular mesh.
-    /// \pre The mesh border must be mapped onto a convex polygon.
-    virtual Error_code  parameterize(Adaptor& mesh);
-
-// Protected operations
-protected:
-    /// Check parameterize() preconditions:
-    /// - `mesh` must be a surface with one connected component.
-    /// - `mesh` must be a triangular mesh.
-    /// - The mesh border must be mapped onto a convex polygon.
-    virtual Error_code  check_parameterize_preconditions(Adaptor& mesh);
-
-    /// Initialize A, Bu and Bv after border parameterization.
-    /// Fill the border vertices' lines in both linear systems:
-    /// "u = constant" and "v = constant".
-    ///
-    /// \pre Vertices must be indexed.
-    /// \pre A, Bu and Bv must be allocated.
-    /// \pre Border vertices must be parameterized.
-    void  initialize_system_from_mesh_border (Matrix& A, Vector& Bu, Vector& Bv,
-                                              const Adaptor& mesh);
-
-    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
-    /// Implementation note: Subclasses must at least implement compute_w_ij().
-    virtual NT compute_w_ij(const Adaptor& mesh,
-                            Vertex_const_handle main_vertex_v_i,
-                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
-    = 0;
-
-    /// Compute the line i of matrix A for i inner vertex:
-    /// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
-    /// - compute w_ii = - sum of w_ijs.
-    ///
-    /// \pre Vertices must be indexed.
-    /// \pre Vertex i musn't be already parameterized.
-    /// \pre Line i of A must contain only zeros.
-    virtual Error_code setup_inner_vertex_relations(Matrix& A,
-                                                    Vector& Bu,
-                                                    Vector& Bv,
-                                                    const Adaptor& mesh,
-                                                    Vertex_const_handle vertex);
-
-    /// Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
-    void  set_mesh_uv_from_system (Adaptor& mesh,
-                                   const Vector& Xu, const Vector& Xv);
-
-    /// Check parameterize() postconditions:
-    /// - 3D -> 2D mapping is one-to-one.
-    virtual Error_code check_parameterize_postconditions(const Adaptor& mesh,
-                                                         const Matrix& A,
-                                                         const Vector& Bu,
-                                                         const Vector& Bv);
-
-    /// Check if 3D -> 2D mapping is one-to-one.
-    /// The default implementation checks each normal.
-    virtual bool  is_one_to_one_mapping(const Adaptor& mesh,
-                                        const Matrix& A,
-                                        const Vector& Bu,
-                                        const Vector& Bv);
-
-// Protected accessors
-protected:
-    /// Get the object that maps the surface's border onto a 2D space.
-    Border_param&   get_border_parameterizer()    { return m_borderParameterizer; }
-
-    /// Get the sparse linear algebra (traits object to access the linear system).
-    Sparse_LA&      get_linear_algebra_traits() { return m_linearAlgebra; }
-
-// Fields
-private:
-    /// Object that maps the surface's border onto a 2D space.
-    Border_param    m_borderParameterizer;
-
-    /// Traits object to solve a sparse linear system
-    Sparse_LA       m_linearAlgebra;
-};
-
-
-// ------------------------------------------------------------------------------------
-// Implementation
-// ------------------------------------------------------------------------------------
-
-// Compute a one-to-one mapping from a triangular 3D surface mesh
-// to a piece of the 2D space.
-// The mapping is linear by pieces (linear in each triangle).
-// The result is the (u,v) pair image of each vertex of the 3D surface.
-//
-// Preconditions:
-// - `mesh` must be a surface with one connected component.
-// - `mesh` must be a triangular mesh.
-// - The mesh border must be mapped onto a convex polygon.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-parameterize(Adaptor& mesh)
-{
-#ifdef DEBUG_TRACE
-    // Create timer for traces
-    CGAL::Timer timer;
-    timer.start();
-#endif
-
-    // Check preconditions
-    Error_code status = check_parameterize_preconditions(mesh);
-#ifdef DEBUG_TRACE
-    std::cerr << "  parameterization preconditions: " << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // Count vertices
-    int nbVertices = mesh.count_mesh_vertices();
-
-    // Index vertices from 0 to nbVertices-1
-    mesh.index_mesh_vertices();
-
-    // Mark all vertices as *not* "parameterized"
-    Vertex_iterator vertexIt;
-    for (vertexIt = mesh.mesh_vertices_begin();
-        vertexIt != mesh.mesh_vertices_end();
-        vertexIt++)
-    {
-        mesh.set_vertex_parameterized(vertexIt, false);
-    }
-
-    // Compute (u,v) for border vertices
-    // and mark them as "parameterized"
-    status = get_border_parameterizer().parameterize_border(mesh);
-#ifdef DEBUG_TRACE
-    std::cerr << "  border vertices parameterization: " << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // Create two sparse linear systems "A*Xu = Bu" and "A*Xv = Bv" (one line/column per vertex)
-    Matrix A(nbVertices, nbVertices);
-    Vector Xu(nbVertices), Xv(nbVertices), Bu(nbVertices), Bv(nbVertices);
-
-    // Initialize A, Xu, Xv, Bu and Bv after border parameterization
-    // Fill the border vertices' lines in both linear systems:
-    // "u = constant" and "v = constant"
-    //
-    // @todo Fixed_border_parameterizer_3 should remove border vertices
-    // from the linear systems in order to have a symmetric positive definite
-    // matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
-    initialize_system_from_mesh_border (A, Bu, Bv, mesh);
-
-    // Fill the matrix for the inner vertices v_i: compute A's coefficient
-    // w_ij for each neighbor j; then w_ii = - sum of w_ijs
-    for (vertexIt = mesh.mesh_vertices_begin();
-         vertexIt != mesh.mesh_vertices_end();
-         vertexIt++)
-    {
-        CGAL_surface_mesh_parameterization_assertion(mesh.is_vertex_on_main_border(vertexIt)
-                                     == mesh.is_vertex_parameterized(vertexIt));
-
-        // inner vertices only
-        if( ! mesh.is_vertex_on_main_border(vertexIt) )
-        {
-            // Compute the line i of matrix A for i inner vertex
-            status = setup_inner_vertex_relations(A, Bu, Bv,
-                                                  mesh,
-                                                  vertexIt);
-            if (status != Base::OK)
-                return status;
-        }
-    }
-#ifdef DEBUG_TRACE
-    std::cerr << "  matrix filling (" << nbVertices << " x " << nbVertices << "): "
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-
-    // Solve "A*Xu = Bu". On success, solution is (1/Du) * Xu.
-    // Solve "A*Xv = Bv". On success, solution is (1/Dv) * Xv.
-    NT Du, Dv;
-    if ( !get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) ||
-         !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv) )
-    {
-        status = Base::ERROR_CANNOT_SOLVE_LINEAR_SYSTEM;
-    }
-#ifdef DEBUG_TRACE
-    std::cerr << "  solving two linear systems: "
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // WARNING: this package does not support homogeneous coordinates!
-    CGAL_surface_mesh_parameterization_assertion(Du == 1.0);
-    CGAL_surface_mesh_parameterization_assertion(Dv == 1.0);
-
-    // Copy Xu and Xv coordinates into the (u,v) pair of each vertex
-    set_mesh_uv_from_system (mesh, Xu, Xv);
-#ifdef DEBUG_TRACE
-    std::cerr << "  copy computed UVs to mesh :"
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-
-    // Check postconditions
-    status = check_parameterize_postconditions(mesh, A, Bu, Bv);
-#ifdef DEBUG_TRACE
-    std::cerr << "  parameterization postconditions: " << timer.time() << " seconds." << std::endl;
-#endif
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-
-// Check parameterize() preconditions:
-// - `mesh` must be a surface with one connected component.
-// - `mesh` must be a triangular mesh.
-// - The mesh border must be mapped onto a convex polygon.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-check_parameterize_preconditions(Adaptor& mesh)
-{
-    Error_code status = Base::OK;	    // returned value
-
-    // Helper class to compute genus or count borders, vertices, ...
-    typedef Parameterization_mesh_feature_extractor<Adaptor>
-                                            Mesh_feature_extractor;
-    Mesh_feature_extractor feature_extractor(mesh);
-
-    // Check that mesh is not empty
-    if (mesh.mesh_vertices_begin() == mesh.mesh_vertices_end())
-        status = Base::ERROR_EMPTY_MESH;
-    if (status != Base::OK)
-        return status;
-
-    // The whole surface parameterization package is restricted to triangular meshes
-    status = mesh.is_mesh_triangular() ? Base::OK
-                                       : Base::ERROR_NON_TRIANGULAR_MESH;
-    if (status != Base::OK)
-        return status;
-
-    // The whole package is restricted to surfaces: genus = 0,
-    // one connected component and at least one border
-    int genus = feature_extractor.get_genus();
-    int nb_borders = feature_extractor.get_nb_borders();
-    int nb_components = feature_extractor.get_nb_connex_components();
-    status = (genus == 0 && nb_borders >= 1 && nb_components == 1)
-           ? Base::OK
-           : Base::ERROR_NO_TOPOLOGICAL_DISC;
-    if (status != Base::OK)
-        return status;
-
-    // One-to-one mapping is guaranteed if all w_ij coefficients are > 0 (for j vertex neighbor of i)
-    // and if the surface border is mapped onto a 2D convex polygon
-    status = get_border_parameterizer().is_border_convex()
-           ? Base::OK
-           : Base::ERROR_NON_CONVEX_BORDER;
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-// Initialize A, Bu and Bv after border parameterization.
-// Fill the border vertices' lines in both linear systems: "u = constant" and "v = constant".
-//
-// Preconditions:
-// - Vertices must be indexed.
-// - A, Bu and Bv must be allocated.
-// - Border vertices must be parameterized.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-void Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-initialize_system_from_mesh_border (Matrix& A, Vector& Bu, Vector& Bv,
-                                    const Adaptor& mesh)
-{
-    for (Border_vertex_const_iterator it = mesh.mesh_main_border_vertices_begin();
-         it != mesh.mesh_main_border_vertices_end();
-         it++)
-    {
-        CGAL_surface_mesh_parameterization_assertion(mesh.is_vertex_parameterized(it));
-
-        // Get vertex index in sparse linear system
-        int index = mesh.get_vertex_index(it);
-
-        // Write a diagonal coefficient of A
-        A.set_coef(index, index, 1, true /*new*/);
-
-        // Write constant in Bu and Bv
-        Point_2 uv = mesh.get_vertex_uv(it);
-        Bu[index] = uv.x();
-        Bv[index] = uv.y();
-    }
-}
-
-// Compute the line i of matrix A for i inner vertex:
-// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
-// - compute w_ii = - sum of w_ijs.
-//
-// Preconditions:
-// - Vertices must be indexed.
-// - Vertex i musn't be already parameterized.
-// - Line i of A must contain only zeros.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-setup_inner_vertex_relations(Matrix& A,
-                             Vector& ,
-                             Vector& ,
-                             const Adaptor& mesh,
-                             Vertex_const_handle vertex)
-{
-    CGAL_surface_mesh_parameterization_assertion( ! mesh.is_vertex_on_main_border(vertex) );
-    CGAL_surface_mesh_parameterization_assertion( ! mesh.is_vertex_parameterized(vertex) );
-
-    int i = mesh.get_vertex_index(vertex);
-
-    // circulate over vertices around 'vertex' to compute w_ii and w_ijs
-    NT w_ii = 0;
-    int vertexIndex = 0;
-    Vertex_around_vertex_const_circulator v_j = mesh.vertices_around_vertex_begin(vertex);
-    Vertex_around_vertex_const_circulator end = v_j;
-    CGAL_For_all(v_j, end)
-    {
-        // Call to virtual method to do the actual coefficient computation
-        NT w_ij = -1.0 * compute_w_ij(mesh, vertex, v_j);
-
-        // w_ii = - sum of w_ijs
-        w_ii -= w_ij;
-
-        // Get j index
-        int j = mesh.get_vertex_index(v_j);
-
-        // Set w_ij in matrix
-        A.set_coef(i,j, w_ij, true /*new*/);
-
-        vertexIndex++;
-    }
-    if (vertexIndex < 2)
-        return Base::ERROR_NON_TRIANGULAR_MESH;
-
-    // Set w_ii in matrix
-    A.set_coef(i,i, w_ii, true /*new*/);
-
-    return Base::OK;
-}
-
-// Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-void Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-set_mesh_uv_from_system(Adaptor& mesh,
-                        const Vector& Xu, const Vector& Xv)
-{
-    Vertex_iterator vertexIt;
-    for (vertexIt = mesh.mesh_vertices_begin();
-        vertexIt != mesh.mesh_vertices_end();
-        vertexIt++)
-    {
-        int index = mesh.get_vertex_index(vertexIt);
-
-        NT u = Xu[index];
-        NT v = Xv[index];
-
-        // Fill vertex (u,v) and mark it as "parameterized"
-        mesh.set_vertex_uv(vertexIt, Point_2(u,v));
-        mesh.set_vertex_parameterized(vertexIt, true);
-    }
-}
-
-// Check parameterize() postconditions:
-// - 3D -> 2D mapping is one-to-one.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-check_parameterize_postconditions(const Adaptor& mesh,
-                                  const Matrix& A,
-                                  const Vector& Bu,
-                                  const Vector& Bv)
-{
-    Error_code status = Base::OK;
-
-    // Check if 3D -> 2D mapping is one-to-one
-    status = is_one_to_one_mapping(mesh, A, Bu, Bv)
-           ? Base::OK
-           : Base::ERROR_NO_1_TO_1_MAPPING;
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-// Check if 3D -> 2D mapping is one-to-one.
-// The default implementation checks each normal.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-bool Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-is_one_to_one_mapping(const Adaptor& mesh,
-                      const Matrix& ,
-                      const Vector& ,
-                      const Vector& )
-{
-    Vector_3 first_triangle_normal = NULL_VECTOR; // initialize to avoid warning
-
-    for (Facet_const_iterator facetIt = mesh.mesh_facets_begin();
-         facetIt != mesh.mesh_facets_end();
-         facetIt++)
-    {
-        // Get 3 vertices of the facet
-        Vertex_const_handle v0, v1, v2;
-        int vertexIndex = 0;
-        Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facetIt),
-                                             end = cir;
-        CGAL_For_all(cir, end)
-        {
-            if (vertexIndex == 0)
-                v0 = cir;
-            else if (vertexIndex == 1)
-                v1 = cir;
-            else if (vertexIndex == 2)
-                v2 = cir;
-
-            vertexIndex++;
-        }
-        CGAL_surface_mesh_parameterization_assertion(vertexIndex >= 3);
-
-        // Get the 3 vertices position IN 2D
-        Point_2 p0 = mesh.get_vertex_uv(v0) ;
-        Point_2 p1 = mesh.get_vertex_uv(v1) ;
-        Point_2 p2 = mesh.get_vertex_uv(v2) ;
-
-        // Compute the facet normal
-        Point_3 p0_3D(p0.x(), p0.y(), 0);
-        Point_3 p1_3D(p1.x(), p1.y(), 0);
-        Point_3 p2_3D(p2.x(), p2.y(), 0);
-        Vector_3 v01_3D = p1_3D - p0_3D;
-        Vector_3 v02_3D = p2_3D - p0_3D;
-        Vector_3 normal = CGAL::cross_product(v01_3D, v02_3D);
-
-        // Check that all normals are oriented the same way
-        // => no 2D triangle is flipped
-        if (cir == mesh.facet_vertices_begin(facetIt))
-        {
-            first_triangle_normal = normal;
-        }
-        else
-        {
-            if (first_triangle_normal * normal < 0)
-                return false;
-        }
-    }
-
-    return true;            // OK if we reach this point
-}
-
-
-} //namespace CGAL
-
-#endif //CGAL_FIXED_BORDER_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fuzzy_sphere.h b/3rdparty/CGAL-4.6/include/CGAL/Fuzzy_sphere.h
deleted file mode 100644
index a767d7f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Fuzzy_sphere.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
-
-
-#ifndef CGAL_FUZZY_SPHERE_H
-#define CGAL_FUZZY_SPHERE_H
-#include <CGAL/Kd_tree_rectangle.h>
-#include <CGAL/Search_traits_adapter.h>
-
-namespace CGAL {
-
-  namespace internal{
-    
-  template <class SearchTraits,class Point_d>
-  class Fuzzy_sphere_impl{
-    SearchTraits traits;
-    public:
-
-    typedef typename SearchTraits::FT FT;
-    typedef typename SearchTraits::Dimension Dimension;
-    private:
-
-    Point_d c;
-    FT r;
-    FT eps;
-
-    public:
-
-
-    	// default constructor
-    	Fuzzy_sphere_impl(const SearchTraits& traits_=SearchTraits()):traits(traits_) {}
-		
-
-	// constructor
-	Fuzzy_sphere_impl(const Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
-	traits(traits_),c(center), r(radius), eps(epsilon) 
-	{ 	// avoid problems if eps > r
-		if (eps>r) eps=r; 
-	}
-        	
-        bool contains(const typename SearchTraits::Point_d& p) const {
-		// test whether the squared distance 
-		// between P and c 
-		// is at most the squared_radius
-		FT squared_radius = r*r;
-		FT distance=FT(0);
-		typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
-                  traits.construct_cartesian_const_iterator_d_object();
-                typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
-		                                                  pit = construct_it(p),
-                                                                  end = construct_it(c, 0);
-		for (; cit != end
-                       && (distance <= squared_radius); ++cit, ++pit) {
-		  distance += 
-			((*cit)-(*pit))*((*cit)-(*pit));
-		}
-		
-		return (distance <= squared_radius); 
-        }
-
-        
-	bool inner_range_intersects(const Kd_tree_rectangle<FT,Dimension>& rectangle) const {                          
-                // test whether the interior of a sphere
-		// with radius (r-eps) intersects r, i.e.
-                // if the minimal distance of r to c is less than r-eps
-		FT distance = FT(0);
-		FT squared_radius = (r-eps)*(r-eps);
-		typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
-                  traits.construct_cartesian_const_iterator_d_object();
-                typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
-                                                                  end = construct_it(c, 0);
-		for (int i = 0; cit != end && (distance < squared_radius); ++cit, ++i) {
-			if ((*cit) < rectangle.min_coord(i))
-				distance += 
-				(rectangle.min_coord(i)-(*cit))*(rectangle.min_coord(i)-(*cit));
-			if ((*cit) > rectangle.max_coord(i))
-				distance += 
-				((*cit)-rectangle.max_coord(i))*((*cit)-rectangle.max_coord(i));
-		}
-		
-		return (distance <= squared_radius);
-	}
-
-
-	bool outer_range_contains(const Kd_tree_rectangle<FT,Dimension>& rectangle) const { 
-        // test whether the interior of a sphere
-	// with radius (r+eps) is contained by r, i.e.
-        // if the minimal distance of the boundary of r 
-        // to c is less than r+eps                         
-	FT distance=FT(0);
-	FT squared_radius = (r+eps)*(r+eps);	
-	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
-          traits.construct_cartesian_const_iterator_d_object();
-	typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
-                                                          end = construct_it(c, 0);
-        for (int i = 0; cit != end && (distance < squared_radius) ; ++cit,++i) {
-		if ((*cit) <= (rectangle.min_coord(i)+rectangle.max_coord(i))/FT(2))
-			distance += 
-			(rectangle.max_coord(i)-(*cit))*(rectangle.max_coord(i)-(*cit));
-		else
-			distance += ((*cit)-rectangle.min_coord(i))*((*cit)-rectangle.min_coord(i));
-		}
-		
-		return (distance <= squared_radius);
-	}
-  }; // class Fuzzy_sphere_impl
-
-  }
-  
-  template <class SearchTraits>
-  class Fuzzy_sphere:
-    public internal::Fuzzy_sphere_impl<SearchTraits,typename SearchTraits::Point_d>
-  {
-    typedef internal::Fuzzy_sphere_impl<SearchTraits,typename SearchTraits::Point_d> Base;
-    typedef typename Base::FT FT;
-  public:
-    // constructors
-    Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):Base(traits_){};
-    Fuzzy_sphere(const typename SearchTraits::Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
-      Base(center,radius,epsilon,traits_) {}
-  };
-  
-  //specialization for Search_traits_adapter
-  template <class K,class PM,class Base_traits>
-  class Fuzzy_sphere< Search_traits_adapter<K,PM,Base_traits> > :
-    public internal::Fuzzy_sphere_impl<Search_traits_adapter<K,PM,Base_traits>,typename Base_traits::Point_d>
-  {
-    typedef Search_traits_adapter<K,PM,Base_traits> SearchTraits;
-    typedef internal::Fuzzy_sphere_impl<SearchTraits,typename Base_traits::Point_d> Base;
-    typedef typename Base_traits::FT FT;
-  public:
-    // constructors
-    Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):Base(traits_){};
-    Fuzzy_sphere(const typename Base_traits::Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
-      Base(center,radius,epsilon,traits_) {}
-    Fuzzy_sphere(const typename SearchTraits::Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
-      Base(get(traits_.point_property_map(),center),radius,epsilon,traits_) {}
-  };
-  
-} // namespace CGAL
-#endif // FUZZY_SPHERE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type.h b/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type.h
deleted file mode 100644
index bb23d9b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type.h
+++ /dev/null
@@ -1,1100 +0,0 @@
-// Copyright (c) 2007-2010 Inria Lorraine (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author: Luis Peñaranda <luis.penaranda at gmx.com>
-
-#ifndef CGAL_GMPFI_TYPE_H
-#define CGAL_GMPFI_TYPE_H
-
-#include <CGAL/config.h>
-#include <CGAL/gmp.h>
-#include <mpfr.h>
-#include <CGAL/GMP/Gmpfr_type.h>
-#include <mpfi.h>
-#include <boost/operators.hpp>
-#include <CGAL/Uncertain.h>
-#ifdef CGAL_HAS_THREADS
-#  include <boost/thread/tss.hpp>
-#endif
-#include <limits>
-#include <algorithm>
-
-namespace CGAL{
-
-class Gmpfi;
-
-Uncertain<bool> operator<(const Gmpfi&,const Gmpfi&);
-Uncertain<bool> operator==(const Gmpfi&,const Gmpfi&);
-
-Uncertain<bool> operator<(const Gmpfi&,const Gmpfr&);
-Uncertain<bool> operator>(const Gmpfi&,const Gmpfr&);
-Uncertain<bool> operator==(const Gmpfi&,const Gmpfr&);
-
-Uncertain<bool> operator<(const Gmpfi&,long);
-Uncertain<bool> operator>(const Gmpfi&,long);
-Uncertain<bool> operator==(const Gmpfi&,long);
-
-Uncertain<bool> operator<(const Gmpfi&,unsigned long);
-Uncertain<bool> operator>(const Gmpfi&,unsigned long);
-Uncertain<bool> operator==(const Gmpfi&,unsigned long);
-
-Uncertain<bool> operator<(const Gmpfi&,int);
-Uncertain<bool> operator>(const Gmpfi&,int);
-Uncertain<bool> operator==(const Gmpfi&,int);
-
-Uncertain<bool> operator<(const Gmpfi&,double);
-Uncertain<bool> operator>(const Gmpfi&,double);
-Uncertain<bool> operator==(const Gmpfi&,double);
-
-Uncertain<bool> operator<(const Gmpfi&,long double);
-Uncertain<bool> operator>(const Gmpfi&,long double);
-Uncertain<bool> operator==(const Gmpfi&,long double);
-
-Uncertain<bool> operator<(const Gmpfi&,const Gmpz&);
-Uncertain<bool> operator>(const Gmpfi&,const Gmpz&);
-Uncertain<bool> operator==(const Gmpfi&,const Gmpz&);
-
-Uncertain<bool> operator<(const Gmpfi&,const Gmpq&);
-Uncertain<bool> operator>(const Gmpfi&,const Gmpq&);
-Uncertain<bool> operator==(const Gmpfi&,const Gmpq&);
-
-// the default precision of Gmpfi is the size of a double's mantissa
-#ifdef IEEE_DBL_MANT_DIG
-#  define CGAL_GMPFI_DEFAULT_PRECISION IEEE_DBL_MANT_DIG
-#else
-#  define CGAL_GMPFI_DEFAULT_PRECISION 53
-#endif
-
-// the default precision is a variable local to each thread in multithreaded
-// environments, or a global variable otherwise
-#ifdef CGAL_HAS_THREADS
-        static boost::thread_specific_ptr<mp_prec_t> Gmpfi_default_precision_;
-#else
-        static mp_prec_t Gmpfi_default_precision=CGAL_GMPFI_DEFAULT_PRECISION;
-#endif
-
-class Gmpfi:
-        boost::ordered_euclidian_ring_operators1<Gmpfi,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpfr,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,long,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,unsigned long,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,int,
-        boost::totally_ordered2<Gmpfi,double,
-        boost::totally_ordered2<Gmpfi,long double,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpz,
-        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpq
-        > > > > > > > > >
-{
-        private:
-
-        // The endpoints of the interval are represented by two objects of
-        // type Gmpfr. To apply MPFI functions to this interval, the
-        // pointers to the data in _left and _right are copied to the
-        // _interval structure using the function mpfi(). After the
-        // operation, the function gather_bounds should be called to put
-        // back the result of the operation in _left and _right.
-        Gmpfr _left,_right;
-        mutable __mpfi_struct _interval;
-
-        bool is_unique(){
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-                return true;
-#else
-                return(_left.is_unique()&&_right.is_unique());
-#endif
-        }
-
-        // swaps the contents of this object and another one
-        void swap(Gmpfi &fi){
-                std::swap(*this,fi);
-        }
-
-        // after calling a library function that modifies the data in the
-        // structure _interval, this function has to be called in order to
-        // copy the data in _interval to _left and _right
-        void gather_bounds(){
-                mpfr_custom_init_set(
-                        _left.fr(),
-                        mpfr_custom_get_kind(&_interval.left),
-                        mpfr_custom_get_exp(&_interval.left),
-                        mpfr_get_prec(&_interval.left),
-                        mpfr_custom_get_mantissa(&_interval.left));
-                mpfr_custom_init_set(
-                        _right.fr(),
-                        mpfr_custom_get_kind(&_interval.right),
-                        mpfr_custom_get_exp(&_interval.right),
-                        mpfr_get_prec(&_interval.right),
-                        mpfr_custom_get_mantissa(&_interval.right));
-        }
-
-        public:
-
-        typedef Gmpfr::Precision_type   Precision_type;
-
-        // access
-
-        mpfi_srcptr mpfi()const{
-                _interval.left=*_left.fr();
-                _interval.right=*_right.fr();
-                CGAL_assertion(mpfr_equal_p(_left.fr(),&_interval.left)!=0 &&
-                               mpfr_equal_p(_right.fr(),&_interval.right)!=0);
-                return &_interval;
-        }
-
-        mpfi_ptr mpfi(){
-                _interval.left=*_left.fr();
-                _interval.right=*_right.fr();
-                CGAL_assertion(mpfr_equal_p(_left.fr(),&_interval.left)!=0 &&
-                               mpfr_equal_p(_right.fr(),&_interval.right)!=0);
-                return &_interval;
-        }
-
-        mpfr_srcptr left_mpfr()const{
-                return _left.fr();
-        }
-
-        mpfr_srcptr right_mpfr()const{
-                return _right.fr();
-        }
-
-        Gmpfr inf()const{
-                return _left;
-        }
-
-        Gmpfr sup()const{
-                return _right;
-        }
-
-        // construction
-
-        Gmpfi(){}
-        ~Gmpfi(){}
-
-#define CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(_type) \
-        Gmpfi(const _type &t, \
-              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                _left=Gmpfr(t,std::round_toward_neg_infinity,p); \
-                _right=Gmpfr(t,std::round_toward_infinity,p); \
-                CGAL_assertion(_left<=t&&_right>=t); \
-        }
-
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(long);
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(unsigned long);
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(int);
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(double);
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(long double);
-CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz);
-
-#undef CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR
-
-        Gmpfi(const Gmpq &q,
-              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(0,p);
-                _right=Gmpfr(0,p);
-                mpfr_set_q(_left.fr(),q.mpq(),GMP_RNDD);
-                mpfr_set_q(_right.fr(),q.mpq(),GMP_RNDU);
-                CGAL_assertion(_left<=q&&_right>=q);
-        }
-
-        Gmpfi(mpfi_srcptr i){
-                _left=Gmpfr(&(i->left));
-                _right=Gmpfr(&(i->right));
-        }
-
-        Gmpfi(mpfi_srcptr i,Gmpfi::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(&(i->left),std::round_toward_neg_infinity,p);
-                _right=Gmpfr(&(i->right),std::round_toward_infinity,p);
-                CGAL_assertion(mpfr_cmp(_left.fr(),&(i->left))<=0 &&
-                               mpfr_cmp(_right.fr(),&(i->right))>=0);
-        }
-
-        Gmpfi(const Gmpfr &f,
-              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(f,std::round_toward_neg_infinity,p);
-                _right=Gmpfr(f,std::round_toward_infinity,p);
-                CGAL_assertion(_left<=f&&_right>=f);
-        }
-
-        Gmpfi(const Gmpfr &l,
-              const Gmpfr &r,
-              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(l,std::round_toward_neg_infinity,p);
-                _right=Gmpfr(r,std::round_toward_infinity,p);
-                CGAL_assertion(_left<=l||(_left.is_nan()&&l.is_nan()));
-                CGAL_assertion(_right>=l||(_right.is_nan()&&r.is_nan()));
-        }
-
-        Gmpfi(const std::pair<Gmpfr,Gmpfr> &bounds,
-              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
-                _right=Gmpfr(bounds.second,std::round_toward_infinity,p);
-                CGAL_assertion(_left<=bounds.first||
-                               (_left.is_nan()&&bounds.first.is_nan()));
-                CGAL_assertion(_right>=bounds.second||
-                               (_right.is_nan()&&bounds.second.is_nan()));
-        }
-
-        template<class L,class R>
-        Gmpfi(const std::pair<L,R> &bounds,
-              Gmpfi::Precision_type p=get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
-                _right=Gmpfr(bounds.second,std::round_toward_infinity,p);
-                CGAL_assertion(_left<=bounds.first&&_right>=bounds.second);
-        }
-
-        // copy assignment operator
-        Gmpfi& operator=(const Gmpfi &a){
-                _left=a.inf();
-                _right=a.sup();
-                CGAL_assertion(_left==a.inf()||
-                               (_left.is_nan()&&a.inf().is_nan()));
-                CGAL_assertion(_right==a.sup()||
-                               (_right.is_nan()&&a.sup().is_nan()));
-                return *this;
-        }
-
-        // copy constructor without precision
-        Gmpfi(const Gmpfi &a){
-                _left=a.inf();
-                _right=a.sup();
-                CGAL_assertion(_left==a.inf()||
-                               (_left.is_nan()&&a.inf().is_nan()));
-                CGAL_assertion(_right==a.sup()||
-                               (_right.is_nan()&&a.sup().is_nan()));
-        }
-
-        // copy constructor with precision
-        Gmpfi(const Gmpfi &a,Gmpfi::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                _left=Gmpfr(a.inf(),std::round_toward_neg_infinity,p);
-                _right=Gmpfr(a.sup(),std::round_toward_infinity,p);
-                CGAL_assertion(_left<=a.inf()||
-                               (_left.is_nan()&&a.inf().is_nan()));
-                CGAL_assertion(_right>=a.sup()||
-                               (_right.is_nan()&&a.sup().is_nan()));
-        }
-
-        // default precision
-
-#ifdef CGAL_HAS_THREADS
-        static void init_precision_for_thread();
-#endif
-        static Gmpfi::Precision_type get_default_precision();
-        static Gmpfi::Precision_type set_default_precision(
-                                                Gmpfi::Precision_type prec);
-
-        // precision of a single Gmpfi object
-
-        Gmpfi::Precision_type get_precision()const;
-        Gmpfi round(Gmpfi::Precision_type)const;
-
-        // arithmetics
-
-        Gmpfi operator+()const;
-        Gmpfi operator-()const;
-
-#define CGAL_GMPFI_DECLARE_OPERATORS(_type) \
-        Gmpfi& operator+=(_type); \
-        Gmpfi& operator-=(_type); \
-        Gmpfi& operator*=(_type); \
-        Gmpfi& operator/=(_type);
-
-        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpfi&)
-        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpfr&)
-        CGAL_GMPFI_DECLARE_OPERATORS(long)
-        CGAL_GMPFI_DECLARE_OPERATORS(unsigned long)
-        CGAL_GMPFI_DECLARE_OPERATORS(int)
-        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpz&)
-        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpq&)
-
-#undef CGAL_GMPFI_DECLARE_OPERATORS
-
-#define CGAL_GMPFI_DECLARE_STATIC_FUNCTION(_f,_t1,_t2) \
-        static Gmpfi _f (_t1,_t2,Gmpfi::Precision_type=0);
-
-#define CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(_t1,_t2) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(add,_t1,_t2) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(sub,_t1,_t2) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(mul,_t1,_t2) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(div,_t1,_t2)
-
-#define CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(_t) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(const Gmpfi&,_t) \
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(_t,const Gmpfi&)
-
-        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(const Gmpfi&,const Gmpfi&)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpfr&)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(long)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(unsigned long)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(int)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpz&)
-        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpq&)
-
-#undef CGAL_GMPFI_DECLARE_STATIC_FUNCTION
-#undef CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS
-#undef CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS
-
-        Gmpfi abs(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
-        Gmpfi sqrt(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
-        Gmpfi cbrt(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
-        Gmpfi kthroot(int,
-                      Gmpfi::Precision_type=Gmpfi::get_default_precision()
-                     )const;
-        Gmpfi square(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
-
-        // comparison and query functions
-
-        bool is_point()const;
-        bool is_same(const Gmpfi&)const;
-        bool do_overlap(const Gmpfi&)const;
-        Uncertain<bool> is_zero()const;
-        Uncertain<bool> is_one()const;
-        bool is_nan()const;
-        bool is_inf()const;
-        bool is_number()const;
-        Uncertain<Sign> sign()const;
-        Uncertain<bool> is_positive()const;
-        Uncertain<bool> is_negative()const;
-        Uncertain<bool> is_square()const;
-        Uncertain<bool> is_square(Gmpfi&)const;
-        Uncertain<bool> divides(const Gmpfi&,
-                                Gmpfi&,
-                                Gmpfi::Precision_type=
-                                        Gmpfi::get_default_precision()
-                               )const;
-        Uncertain<Comparison_result> compare(const Gmpfi&)const;
-
-        // conversion functions
-
-        double to_double()const;
-        std::pair<double,double> to_interval()const;
-        std::pair<double,long> to_double_exp()const;
-        std::pair<std::pair<double,double>,long> to_interval_exp()const;
-};
-
-
-
-
-// --------------
-// implementation
-// --------------
-
-// default precision
-#ifdef CGAL_HAS_THREADS
-inline
-void Gmpfi::init_precision_for_thread(){
-        CGAL_precondition(Gmpfi_default_precision_.get()==NULL);
-        Gmpfi_default_precision_.reset(
-                new mp_prec_t(CGAL_GMPFI_DEFAULT_PRECISION));
-}
-#endif
-
-inline
-Gmpfi::Precision_type Gmpfi::get_default_precision(){
-#ifdef CGAL_HAS_THREADS
-        if(Gmpfi_default_precision_.get()==NULL)
-                Gmpfi::init_precision_for_thread();
-        return *Gmpfi_default_precision_.get();
-#else
-        return Gmpfi_default_precision;
-#endif
-}
-
-inline
-Gmpfi::Precision_type Gmpfi::set_default_precision(Gmpfi::Precision_type prec){
-        Gmpfi::Precision_type old_prec=Gmpfi::get_default_precision();
-        CGAL_assertion(prec>=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX);
-#ifdef CGAL_HAS_THREADS
-        *Gmpfi_default_precision_.get()=prec;
-#else
-        Gmpfi_default_precision=prec;
-#endif
-        return old_prec;
-}
-
-// precision of a single Gmpfi object
-
-inline
-Gmpfi::Precision_type Gmpfi::get_precision()const{
-        return (_left.get_precision()>_right.get_precision()?
-                (Gmpfi::Precision_type)_left.get_precision():
-                (Gmpfi::Precision_type)_right.get_precision());
-}
-
-inline
-Gmpfi Gmpfi::round(Gmpfi::Precision_type p)const{
-        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-        return Gmpfi(*this,p);
-}
-
-// arithmetics
-
-inline
-Gmpfi Gmpfi::operator+()const{
-        return(*this);
-}
-
-inline
-Gmpfi Gmpfi::operator-()const{
-        Gmpfi result (0, this->get_precision());
-        mpfi_neg (result.mpfi(), this->mpfi());
-        *(result._left.fr()) = result._interval.left;
-        *(result._right.fr()) = result._interval.right;
-        return result;
-}
-
-// CGAL_GMPFI_BALANCE_ENDPOINTS checks if both bounds of the interval have
-// the same precision. If not, it rounds the one with the smallest
-// precision.
-#define CGAL_GMPFI_BALANCE_ENDPOINTS \
-        if(_left.get_precision()<_right.get_precision()){ \
-                _left=Gmpfr(_left,_right.get_precision()); \
-        }else{ \
-                if(_right.get_precision()<_left.get_precision()){ \
-                        _right=Gmpfr(_right,_left.get_precision()); \
-                } \
-        }; \
-        CGAL_assertion_msg(_left.get_precision()==_right.get_precision(), \
-                           "error balancing bounds precision");
-
-// CGAL_GMPFI_OBJECT_BINARY_OPERATOR defines an overloaded binary operator
-// of the Gmpfi class, where the operated object belongs to another class,
-// which represents a point (as opposition to an interval). The operation
-// will be performed using the biggest precision of the bounds of this
-// Gmpfi object. That means that if bounds have different precision, one
-// of them (the one with the smallest precision) will be rounded. This is
-// not a problem when the object is not unique, since a new Gmpfi object
-// will be created with the bounds having the correct precision.
-#define CGAL_GMPFI_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
-        inline \
-        Gmpfi& Gmpfi::_op(const _class &b){ \
-                if(is_unique()){ \
-                        CGAL_GMPFI_BALANCE_ENDPOINTS \
-                        _fun(mpfi(),mpfi(),b._member); \
-                        gather_bounds(); \
-                }else{ \
-                        Gmpfi result (0, this->get_precision()); \
-                        _fun (result.mpfi(), this->mpfi(), b._member); \
-                        *(result._left.fr()) = result._interval.left; \
-                        *(result._right.fr()) = result._interval.right; \
-                        this->swap (result); \
-                } \
-                return(*this); \
-        }
-
-// CGAL_GMPFI_GMPFI_BINARY_OPERATOR defines an overloaded binary operator
-// of the Gmpfi class, where both operands are Gmpfi objects.  The
-// operation will be performed using the biggest precision of the bounds
-// of both intervals. The bounds of target object will be rounded
-// accordingly before the operation.
-#define CGAL_GMPFI_GMPFI_BINARY_OPERATOR(_op,_fun) \
-        inline \
-        Gmpfi& Gmpfi::_op(const Gmpfi &fi){ \
-                if(is_unique()){ \
-                        if(get_precision()<fi.get_precision()){ \
-                                Gmpfi result (0, fi.get_precision()); \
-                                _fun(result.mpfi(), this->mpfi(), fi.mpfi()); \
-                                *(result._left.fr()) = result._interval.left; \
-                                *(result._right.fr())= result._interval.right;\
-                                this->swap (result); \
-                        }else{ \
-                                CGAL_GMPFI_BALANCE_ENDPOINTS \
-                                _fun(mpfi(),mpfi(),fi.mpfi()); \
-                                gather_bounds(); \
-                        } \
-                }else{ \
-                        Gmpfi result(0, \
-                                     this->get_precision()<fi.get_precision()?\
-                                     fi.get_precision(): \
-                                     this->get_precision()); \
-                        _fun (result.mpfi(), this->mpfi(), fi.mpfi()); \
-                        *(result._left.fr()) = result._interval.left; \
-                        *(result._right.fr()) = result._interval.right; \
-                        this->swap (result); \
-                } \
-                return(*this); \
-  }
-
-// CGAL_GMPFI_TYPE_BINARY_OPERATOR defines an overloaded binary operator of
-// the Gmpfi class, where the operated number belongs to a c++ type.
-// Precision of the operation is defined in the same manner that in
-// CGAL_GMPFI_OBJECT_BINARY_OPERATOR.
-#define CGAL_GMPFI_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
-        inline \
-        Gmpfi& Gmpfi::_op(_type x){ \
-                if(is_unique()){ \
-                        CGAL_GMPFI_BALANCE_ENDPOINTS \
-                        _fun(mpfi(),mpfi(),x); \
-                        gather_bounds(); \
-                }else{ \
-                        Gmpfi result (0, this->get_precision()); \
-                        _fun (result.mpfi(), this->mpfi(), x); \
-                        *(result._left.fr()) = result._interval.left; \
-                        *(result._right.fr()) = result._interval.right; \
-                        this->swap (result); \
-                } \
-                return *this; \
-        }
-
-CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator+=,mpfi_add)
-CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator-=,mpfi_sub)
-CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator*=,mpfi_mul)
-CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator/=,mpfi_div)
-
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpfr,fr(),mpfi_add_fr)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpfr,fr(),mpfi_sub_fr)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpfr,fr(),mpfi_mul_fr)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpfr,fr(),mpfi_div_fr)
-
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,long,mpfi_add_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,long,mpfi_sub_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,long,mpfi_mul_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,long,mpfi_div_si)
-
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,unsigned long,mpfi_add_ui)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,unsigned long,mpfi_sub_ui)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,unsigned long,mpfi_mul_ui)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,unsigned long,mpfi_div_ui)
-
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,int,mpfi_add_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,int,mpfi_sub_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,int,mpfi_mul_si)
-CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,int,mpfi_div_si)
-
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpz,mpz(),mpfi_add_z)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpz,mpz(),mpfi_sub_z)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpz,mpz(),mpfi_mul_z)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpz,mpz(),mpfi_div_z)
-
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpq,mpq(),mpfi_add_q)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpq,mpq(),mpfi_sub_q)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpq,mpq(),mpfi_mul_q)
-CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpq,mpq(),mpfi_div_q)
-
-#undef CGAL_GMPFI_BALANCE_ENDPOINTS
-#undef CGAL_GMPFI_GMPFI_BINARY_OPERATOR
-#undef CGAL_GMPFI_OBJECT_BINARY_OPERATOR
-#undef CGAL_GMPFI_TYPE_BINARY_OPERATOR
-
-// the static arithmetic functions are defined in a separate file
-#include <CGAL/GMP/Gmpfi_type_static.h>
-
-#define CGAL_GMPFI_ARITHMETIC_FUNCTION(_name,_fun) \
-        inline \
-        Gmpfi Gmpfi::_name (Gmpfi::Precision_type p)const{ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                Gmpfi result (0, p); \
-                _fun (result.mpfi(), this->mpfi()); \
-                *(result._left.fr()) = result._interval.left; \
-                *(result._right.fr()) = result._interval.right; \
-                return result; \
-        }
-
-CGAL_GMPFI_ARITHMETIC_FUNCTION(abs,mpfi_abs)
-CGAL_GMPFI_ARITHMETIC_FUNCTION(sqrt,mpfi_sqrt)
-
-inline
-Gmpfi Gmpfi::cbrt(Gmpfi::Precision_type p)const{
-        // MPFI does not provide a cubic root function
-        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-        Gmpfi result (0, p);
-        mpfr_cbrt(&(result.mpfi())->left, left_mpfr(), GMP_RNDD);
-        mpfr_cbrt(&(result.mpfi())->right,right_mpfr(),GMP_RNDU);
-        *(result._left.fr()) = result._interval.left;
-        *(result._right.fr()) = result._interval.right;
-        return result;
-}
-
-inline
-Gmpfi Gmpfi::kthroot(int k,Gmpfi::Precision_type p)const{
-        // MPFI does not provide k-th root functions
-        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-        Gmpfi result (0, p);
-        mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD);
-        mpfr_root(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU);
-        *(result._left.fr()) = result._interval.left;
-        *(result._right.fr()) = result._interval.right;
-        return result;
-}
-
-CGAL_GMPFI_ARITHMETIC_FUNCTION(square,mpfi_sqr)
-
-#undef CGAL_GMPFI_ARITHMETIC_FUNCTION
-
-// comparison and query functions
-
-inline
-bool Gmpfi::is_point()const{
-        return mpfr_equal_p(left_mpfr(),right_mpfr())!=0;
-}
-
-inline
-bool Gmpfi::is_same(const Gmpfi &b)const{
-        return(mpfr_equal_p(left_mpfr(),b.left_mpfr())!=0 &&
-                mpfr_equal_p(right_mpfr(),b.right_mpfr())!=0);
-}
-
-inline
-bool Gmpfi::do_overlap(const Gmpfi &b)const{
-        if(mpfr_lessequal_p(left_mpfr(),b.left_mpfr())!=0)
-                return mpfr_lessequal_p(b.left_mpfr(),right_mpfr())!=0;
-        else
-                return mpfr_lessequal_p(left_mpfr(),b.right_mpfr())!=0;
-}
-
-inline
-Uncertain<bool> Gmpfi::is_zero()const{
-        if(mpfr_zero_p(&mpfi()->left)!=0 && mpfr_zero_p(&mpfi()->right)!=0)
-                return true;
-        if(mpfi_has_zero(mpfi())!=0)
-                return Uncertain<bool>::indeterminate();
-        return false;
-}
-
-inline
-Uncertain<bool> Gmpfi::is_one()const{
-        if(mpfr_cmp_ui(left_mpfr(),1)==0 && mpfr_cmp_ui(right_mpfr(),1)==0)
-                return true;
-        if(mpfi_is_inside_ui(1,mpfi())!=0)
-                return Uncertain<bool>::indeterminate();
-        return false;
-}
-
-inline
-bool Gmpfi::is_nan()const{
-        return mpfi_nan_p(mpfi())!=0;
-}
-
-inline
-bool Gmpfi::is_inf()const{
-        return mpfi_inf_p(mpfi())!=0;
-}
-
-inline
-bool Gmpfi::is_number()const{
-        return mpfi_bounded_p(mpfi())!=0;
-}
-
-inline
-Uncertain<Sign> Gmpfi::sign()const{
-        int leftsign=mpfr_sgn(left_mpfr());
-        if(leftsign>0)
-                return POSITIVE;
-        if(leftsign==0){
-                if(mpfr_zero_p(right_mpfr())!=0)
-                        return ZERO;
-                else
-                        return Uncertain<Sign>::indeterminate();
-        }
-        if(mpfr_sgn(right_mpfr())<0)
-                return NEGATIVE;
-        return Uncertain<Sign>::indeterminate();
-}
-
-inline
-Uncertain<bool> Gmpfi::is_positive()const{
-        if(mpfr_sgn(left_mpfr())>0)
-                return true;
-        if(mpfr_sgn(right_mpfr())<=0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> Gmpfi::is_negative()const{
-        if(mpfr_sgn(right_mpfr())<0)
-                return true;
-        if(mpfr_sgn(left_mpfr())>=0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> Gmpfi::is_square()const{
-        if(mpfr_sgn(left_mpfr())>=0)
-                return true;
-        if(mpfr_sgn(right_mpfr())<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> Gmpfi::is_square(Gmpfi &y)const{
-        if(mpfr_sgn(left_mpfr())>=0){
-                y=sqrt();
-                return true;
-        }
-        if(mpfr_sgn(right_mpfr())<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> Gmpfi::divides(const Gmpfi &n,Gmpfi &c,Gmpfi::Precision_type p
-                              )const{
-        if(mpfr_zero_p(left_mpfr())!=0 && mpfr_zero_p(right_mpfr())!=0)
-                return false;
-        if(mpfi_has_zero(mpfi())!=0)
-                return Uncertain<bool>::indeterminate();
-        c=Gmpfi::div(n,*this,p);
-        return true;
-}
-
-inline
-Uncertain<Comparison_result> Gmpfi::compare(const Gmpfi& b)const{
-        if(mpfr_greater_p(left_mpfr(),b.right_mpfr())!=0)
-                return LARGER;
-        if(mpfr_greater_p(b.left_mpfr(),right_mpfr())!=0)
-                return SMALLER;
-        if(mpfr_equal_p(left_mpfr(),b.right_mpfr())!=0 &&
-                        mpfr_equal_p(b.left_mpfr(),right_mpfr())!=0)
-                return EQUAL;
-        return Uncertain<Comparison_result>::indeterminate();
-}
-
-// conversion functions
-
-inline
-double Gmpfi::to_double()const{
-        return mpfi_get_d(mpfi());
-}
-
-inline
-std::pair<double,double> Gmpfi::to_interval()const{
-        double d_low=mpfr_get_d(left_mpfr(),GMP_RNDD);
-        double d_upp=mpfr_get_d(right_mpfr(),GMP_RNDU);
-        CGAL_assertion(std::numeric_limits<double>::has_infinity);
-        // if a bound is finite and its double is infinity, we overflow
-        if(mpfr_inf_p(left_mpfr())==0&&
-                        d_low==std::numeric_limits<double>::infinity())
-                mpfr_set_underflow();
-        if(mpfr_inf_p(right_mpfr())==0&&
-                        d_upp==std::numeric_limits<double>::infinity())
-                mpfr_set_overflow();
-        return std::make_pair(d_low,d_upp);
-}
-
-inline
-std::pair<double,long> Gmpfi::to_double_exp()const{
-        mpfr_t middle;
-        long *e=NULL;
-        mpfr_init2(middle,53);
-        mpfi_get_fr(middle,mpfi());
-        double d=mpfr_get_d_2exp(e,middle,mpfr_get_default_rounding_mode());
-        mpfr_clear(middle);
-        return std::make_pair(d,*e);
-}
-
-inline
-std::pair<std::pair<double,double>,long> Gmpfi::to_interval_exp()const{
-        long *e1=NULL,*e2=NULL;
-        double d_low=mpfr_get_d_2exp(e1,left_mpfr(),GMP_RNDD);
-        double d_upp=mpfr_get_d_2exp(e2,right_mpfr(),GMP_RNDU);
-        if(e1<e2)
-                d_upp=d_upp/pow(2.,(double)((*e2)-(*e1)));
-        else if(e1>e2){
-                d_low=d_low/pow(2.,(double)((*e1)-(*e2)));
-                *e1=*e2;
-        }
-        return std::make_pair(std::make_pair(d_low,d_upp),*e1);
-}
-
-// input/output
-
-// This function reads an interval from the istream. It has the form
-// [inf,sup], where each one of inf and sup is read as a Gmpfr. Then, they
-// are rounded accordingly. The input may contain spaces between the
-// brackets and the numbers and the numbers and the comma. The result is
-// undefined when the input is malformed.
-inline
-std::istream& operator>>(std::istream& is,Gmpfi &f){
-        Gmpfr left,right;
-        std::istream::int_type c;
-        std::ios::fmtflags old_flags = is.flags();
-        is.unsetf(std::ios::skipws);
-        gmpz_eat_white_space(is);
-        c=is.get();
-        if(c!='['){
-                invalid_number:
-                is.setstate(std::ios_base::failbit);
-                is.flags(old_flags);
-                return is;
-        }
-        gmpz_eat_white_space(is);
-        is>>left;
-        c=is.get();
-        if(c!=',')
-                goto invalid_number;
-        is>>right;
-        gmpz_eat_white_space(is);
-        c=is.get();
-        if(c!=']')
-                goto invalid_number;
-        // Why is this done the following way? Because left and right can
-        // have different precision. Doing this with a constructor would
-        // force to create a Gmpfi where both endpoints have the same
-        // precision, what can give a wrong reconstruction of a previously
-        // outputted number. (This function will give a good reconstruction
-        // iff Gmpfr gives a good reconstruction.)
-        Gmpfi temp(0,(Gmpfi::Precision_type)MPFR_PREC_MIN);
-        mpfr_swap(left.fr(), temp.inf().fr());
-        mpfr_swap(right.fr(),temp.sup().fr());
-        f=temp;
-        return is;
-}
-
-inline
-std::ostream& operator<<(std::ostream& os,const Gmpfi &a){
-        return(os<<"["<<a.inf()<<","<<a.sup()<<"]");
-}
-
-// comparisons
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,const Gmpfi &b){
-        int c=mpfi_cmp(a.mpfi(),b.mpfi());
-        if(c<0)
-                return true;
-        if(c>0 || (a.is_point() && b.is_point()))
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,const Gmpfi &b){
-        if(mpfr_less_p(a.right_mpfr(),b.left_mpfr()) ||
-                        mpfr_less_p(b.right_mpfr(),a.left_mpfr()))
-                return false;
-        if(mpfr_equal_p(a.left_mpfr(),b.right_mpfr()) &&
-                        mpfr_equal_p(b.left_mpfr(),a.right_mpfr()))
-                return true;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,const Gmpfr &b){
-        if(mpfr_cmp(a.right_mpfr(),b.fr())<0)
-                return true;
-        if(mpfr_cmp(a.left_mpfr(),b.fr())>0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,const Gmpfr &b){
-        if(mpfr_cmp(a.left_mpfr(),b.fr())>0)
-                return true;
-        if(mpfr_cmp(a.right_mpfr(),b.fr())<0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,const Gmpfr &b){
-        if(a.is_point())
-                return(mpfr_cmp(a.left_mpfr(),b.fr())?false:true);
-        if(mpfr_cmp(a.left_mpfr(),b.fr())>0 ||
-                        mpfr_cmp(a.right_mpfr(),b.fr())<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,long b){
-        if(mpfr_cmp_si(a.right_mpfr(),b)<0)
-                return true;
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,long b){
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0)
-                return true;
-        if(mpfr_cmp_si(a.right_mpfr(),b)<0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,long b){
-        if(a.is_point())
-                return(mpfr_cmp_si(a.left_mpfr(),b)?false:true);
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || mpfr_cmp_si(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,unsigned long b){
-        if(mpfr_cmp_ui(a.right_mpfr(),b)<0)
-                return true;
-        if(mpfr_cmp_ui(a.left_mpfr(),b)>0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,unsigned long b){
-        if(mpfr_cmp_ui(a.left_mpfr(),b)>0)
-                return true;
-        if(mpfr_cmp_ui(a.right_mpfr(),b)<0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,unsigned long b){
-        if(a.is_point())
-                return(mpfr_cmp_ui(a.left_mpfr(),b)?false:true);
-        if(mpfr_cmp_ui(a.left_mpfr(),b)>0 || mpfr_cmp_ui(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,int b){
-        if(mpfr_cmp_si(a.right_mpfr(),b)<0)
-                return true;
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,int b){
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0)
-                return true;
-        if(mpfr_cmp_si(a.right_mpfr(),b)<0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,int b){
-        if(a.is_point())
-                return(mpfr_cmp_si(a.left_mpfr(),b)?false:true);
-        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || mpfr_cmp_si(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,long double b){
-        if(mpfr_cmp_ld(a.right_mpfr(),b)<0)
-                return true;
-        if(mpfr_cmp_ld(a.left_mpfr(),b)>0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,long double b){
-        if(mpfr_cmp_ld(a.left_mpfr(),b)>0)
-                return true;
-        if(mpfr_cmp_ld(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,long double b){
-        if(a.is_point())
-                return(mpfr_cmp_ld(a.left_mpfr(),b)?false:true);
-        if(mpfr_cmp_ld(a.left_mpfr(),b)>0 || mpfr_cmp_ld(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,double b){
-        if(mpfr_cmp_d(a.right_mpfr(),b)<0)
-                return true;
-        if(mpfr_cmp_d(a.left_mpfr(),b)>0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,double b){
-        if(mpfr_cmp_d(a.left_mpfr(),b)>0)
-                return true;
-        if(mpfr_cmp_d(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,double b){
-        if(a.is_point())
-                return(mpfr_cmp_d(a.left_mpfr(),b)?false:true);
-        if(mpfr_cmp_d(a.left_mpfr(),b)>0 || mpfr_cmp_d(a.right_mpfr(),b)<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator<(const Gmpfi &a,const Gmpz &b){
-        if(mpfr_cmp_z(a.right_mpfr(),b.mpz())<0)
-                return true;
-        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator>(const Gmpfi &a,const Gmpz &b){
-        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0)
-                return true;
-        if(mpfr_cmp_z(a.right_mpfr(),b.mpz())<0 || a.is_point())
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<bool> operator==(const Gmpfi &a,const Gmpz &b){
-        if(a.is_point())
-                return(mpfr_cmp_z(a.left_mpfr(),b.mpz())?false:true);
-        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0 ||
-                        mpfr_cmp_z(a.right_mpfr(),b.mpz())<0)
-                return false;
-        return Uncertain<bool>::indeterminate();
-}
-
-inline
-Uncertain<Gmpfi> min BOOST_PREVENT_MACRO_SUBSTITUTION
-                (const Gmpfi &x,const Gmpfi &y){
-        return (x<=y)?x:y;
-}
-
-inline
-Uncertain<Gmpfi> max BOOST_PREVENT_MACRO_SUBSTITUTION
-                (const Gmpfi &x,const Gmpfi &y){
-        return (x>=y)?x:y;
-}
-
-} // namespace CGAL
-
-
-#endif  // CGAL_GMPFI_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type.h b/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type.h
deleted file mode 100644
index 9812771..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type.h
+++ /dev/null
@@ -1,1340 +0,0 @@
-// Copyright (c) 2007-2010 Inria Lorraine (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author: Luis Peñaranda <luis.penaranda at gmx.com>
-
-#ifndef CGAL_GMPFR_TYPE_H
-#define CGAL_GMPFR_TYPE_H
-
-#include <CGAL/gmp.h>
-#include <mpfr.h>
-#include <boost/operators.hpp>
-#include <CGAL/Handle_for.h>
-#include <CGAL/GMP/Gmpz_type.h>
-#include <CGAL/GMP/Gmpzf_type.h>
-#include <limits>
-#include <CGAL/Uncertain.h>
-#include <CGAL/ipower.h>
-
-#if MPFR_VERSION_MAJOR < 3
-        typedef mp_rnd_t mpfr_rnd_t;
-        typedef mp_prec_t mpfr_prec_t;
-        typedef mp_exp_t mpfr_exp_t;
-        #define MPFR_RNDN GMP_RNDN
-        #define MPFR_RNDZ GMP_RNDZ
-        #define MPFR_RNDU GMP_RNDU
-        #define MPFR_RNDD GMP_RNDD
-        #define CGAL_GMPFR_GET_Z_2EXP mpfr_get_z_exp
-#else
-        #define CGAL_GMPFR_GET_Z_2EXP mpfr_get_z_2exp
-#endif
-
-namespace CGAL{
-
-class Gmpfr;
-
-bool operator<(const Gmpfr&,const Gmpfr&);
-bool operator==(const Gmpfr&,const Gmpfr&);
-
-bool operator<(const Gmpfr&,long);
-bool operator>(const Gmpfr&,long);
-bool operator==(const Gmpfr&,long);
-
-bool operator<(const Gmpfr&,unsigned long);
-bool operator>(const Gmpfr&,unsigned long);
-bool operator==(const Gmpfr&,unsigned long);
-
-bool operator<(const Gmpfr&,int);
-bool operator>(const Gmpfr&,int);
-bool operator==(const Gmpfr&,int);
-
-bool operator<(const Gmpfr&,double);
-bool operator>(const Gmpfr&,double);
-bool operator==(const Gmpfr&,double);
-
-bool operator<(const Gmpfr&,long double);
-bool operator>(const Gmpfr&,long double);
-bool operator==(const Gmpfr&,long double);
-
-bool operator<(const Gmpfr&,const Gmpz&);
-bool operator>(const Gmpfr&,const Gmpz&);
-bool operator==(const Gmpfr&,const Gmpz&);
-
-struct Gmpfr_rep{
-        mpfr_t floating_point_number;
-        bool clear_on_destruction;
-        Gmpfr_rep():clear_on_destruction(true){}
-        ~Gmpfr_rep(){
-                if(clear_on_destruction)
-                        mpfr_clear(floating_point_number);
-        }
-};
-
-namespace internal{
-        template <>
-        struct Minmax_traits<mpfr_rnd_t>{
-                static const mpfr_rnd_t min=MPFR_RNDN;
-        #if MPFR_VERSION_MAJOR < 3
-                static const mpfr_rnd_t max=GMP_RND_MAX;
-        #else
-                static const mpfr_rnd_t max=MPFR_RNDF;
-        #endif
-        };
-} // namespace internal
-
-// The class Gmpfr is reference-counted using CGAL's handle mechanism. This
-// behavior may be changed, setting the flag CGAL_GMPFR_NO_REFCOUNT. A
-// non-reference-counted class is slightly more efficient in case the
-// implementation does not need to copy numbers (this is not usually the
-// case). Nevertheless, setting the flag may be useful for debugging
-// purposes.
-
-class Gmpfr:
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-        Gmpfr_rep,
-#else
-        Handle_for<Gmpfr_rep>,
-#endif
-        boost::ordered_euclidian_ring_operators1<Gmpfr,
-        boost::ordered_euclidian_ring_operators2<Gmpfr,long,
-        boost::ordered_euclidian_ring_operators2<Gmpfr,unsigned long,
-        boost::ordered_euclidian_ring_operators2<Gmpfr,int,
-        boost::totally_ordered2<Gmpfr,double,
-        boost::totally_ordered2<Gmpfr,long double,
-        boost::ordered_euclidian_ring_operators2<Gmpfr,Gmpz
-        > > > > > > >
-{
-        private:
-
-#ifndef CGAL_GMPFR_NO_REFCOUNT
-        typedef Handle_for<Gmpfr_rep>   Base;
-#endif
-
-        static Uncertain<mpfr_rnd_t> _gmp_rnd(std::float_round_style r){
-                switch(r){
-                        case std::round_toward_infinity: return MPFR_RNDU;
-                        case std::round_toward_neg_infinity: return MPFR_RNDD;
-                        case std::round_toward_zero: return MPFR_RNDZ;
-                        case std::round_to_nearest: return MPFR_RNDN;
-                        default: return Uncertain<mpfr_rnd_t>::indeterminate();
-                }
-        };
-
-        static std::float_round_style _cgal_rnd(mpfr_rnd_t r){
-                switch(r){
-                        case MPFR_RNDU: return std::round_toward_infinity;
-                        case MPFR_RNDD: return std::round_toward_neg_infinity;
-                        case MPFR_RNDZ: return std::round_toward_zero;
-                        case MPFR_RNDN: return std::round_to_nearest;
-                        default: return std::round_indeterminate;
-                }
-        };
-
-        public:
-
-        typedef mpfr_prec_t             Precision_type;
-
-        // access
-
-        mpfr_srcptr fr()const{
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-                return floating_point_number;
-#else
-                return Ptr()->floating_point_number;
-#endif
-        }
-
-        mpfr_ptr fr(){
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-                return floating_point_number;
-#else
-                return ptr()->floating_point_number;
-#endif
-        }
-
-        // The function dont_clear_on_destruction() is used to tell the
-        // object that the mpfr_t must not be cleared at object destruction
-        // (the destructor contrasts with that of the GMP types, where the
-        // structure is always cleared). The reason to do this is that,
-        // sometimes, the object is constructed from a mpfr_t structure and
-        // we know that the structure will be cleared somewhere else. The
-        // mpfr_t will not need to be cleared in case the object A is
-        // constructed from another Gmpfr object B, specifying the
-        // precision, and it happens that this precision is the same as the
-        // precision of A. In this case, a shallow copy is constructed.
-
-        void dont_clear_on_destruction(){
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-                clear_on_destruction=false;
-#else
-                ptr()->clear_on_destruction=false;
-#endif
-        }
-
-        bool is_unique(){
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-                return true;
-#else
-                return unique();
-#endif
-        }
-
-        // construction
-
-        Gmpfr(){
-                mpfr_init(fr());
-        }
-
-        Gmpfr(mpfr_srcptr f){
-                mpfr_custom_init_set(
-                        fr(),
-                        mpfr_custom_get_kind(f),
-                        mpfr_custom_get_exp(f),
-                        mpfr_get_prec(f),
-                        mpfr_custom_get_mantissa(f));
-                dont_clear_on_destruction();
-                CGAL_assertion((mpfr_nan_p(f)!=0 && mpfr_nan_p(fr())!=0) ||
-                               (mpfr_unordered_p(f,fr())==0 &&
-                                mpfr_equal_p(f,fr())!=0));
-        }
-
-        Gmpfr(mpfr_srcptr f,
-              std::float_round_style r,
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                if(p==mpfr_get_prec(f)){
-                        mpfr_custom_init_set(
-                                fr(),
-                                mpfr_custom_get_kind(f),
-                                mpfr_custom_get_exp(f),
-                                mpfr_get_prec(f),
-                                mpfr_custom_get_mantissa(f));
-                        dont_clear_on_destruction();
-                        CGAL_assertion((mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)||
-                                       (mpfr_unordered_p(f,fr())==0&&
-                                        mpfr_equal_p(f,fr())!=0));
-                }else{
-                        mpfr_init2(fr(),p);
-                        mpfr_set(fr(),f,_gmp_rnd(r));
-                        CGAL_assertion(mpfr_get_prec(fr())<mpfr_get_prec(f)||
-                                       mpfr_equal_p(fr(),f)!=0);
-                }
-        }
-
-        Gmpfr(mpfr_srcptr f,Gmpfr::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                if(p==mpfr_get_prec(f)){
-                        mpfr_custom_init_set(
-                                fr(),
-                                mpfr_custom_get_kind(f),
-                                mpfr_custom_get_exp(f),
-                                mpfr_get_prec(f),
-                                mpfr_custom_get_mantissa(f));
-                        dont_clear_on_destruction();
-                        CGAL_assertion((mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)||
-                                       (mpfr_unordered_p(f,fr())==0&&
-                                        mpfr_equal_p(f,fr())!=0));
-                }else{
-                        mpfr_init2(fr(),p);
-                        mpfr_set(fr(),f,mpfr_get_default_rounding_mode());
-                        CGAL_assertion(p<mpfr_get_prec(f)||
-                                       mpfr_equal_p(fr(),f)!=0);
-                }
-        }
-
-        Gmpfr(const Gmpzf &f,
-              std::float_round_style r,
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                mpfr_init2(fr(),p);
-                mpfr_set_z(fr(),f.man(),_gmp_rnd(r));
-                mpfr_mul_2si(fr(),fr(),f.exp(),_gmp_rnd(r));
-        }
-
-        Gmpfr(const Gmpzf &f,Gmpfr::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                mpfr_init2(fr(),p);
-                mpfr_set_z(fr(),f.man(),mpfr_get_default_rounding_mode());
-                mpfr_mul_2si(fr(),
-                             fr(),
-                             f.exp(),
-                             mpfr_get_default_rounding_mode());
-        }
-
-        Gmpfr(const Gmpzf &f){
-                mpfr_init2(fr(),
-                           static_cast<Gmpfr::Precision_type>(
-                                   mpz_sizeinbase(f.man(),2)<MPFR_PREC_MIN?
-                                   MPFR_PREC_MIN:
-                                   mpz_sizeinbase(f.man(),2)));
-                mpfr_set_z(fr(),f.man(),MPFR_RNDN);
-                CGAL_assertion_msg(mpfr_cmp_z(fr(),f.man())==0,
-                                   "inexact conversion of a Gmpzf mantissa");
-                CGAL_assertion_code(int inexact=)
-                mpfr_mul_2si(fr(),fr(),f.exp(),MPFR_RNDN);
-                CGAL_assertion_msg(inexact==0,"inexact conversion from Gmpzf");
-        }
-
-        Gmpfr(const std::pair<Gmpz,long> &intexp,
-              std::float_round_style r=Gmpfr::get_default_rndmode(),
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                mpfr_init2(fr(),p);
-                mpfr_set_z(fr(),intexp.first.mpz(),_gmp_rnd(r));
-                mpfr_mul_2si(fr(),fr(),intexp.second,_gmp_rnd(r));
-        }
-
-        Gmpfr(const std::pair<Gmpz,long> &intexp,Gmpfr::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-                mpfr_init2(fr(),p);
-                mpfr_set_z(fr(),
-                           intexp.first.mpz(),
-                           mpfr_get_default_rounding_mode());
-                mpfr_mul_2si(fr(),
-                             fr(),
-                             intexp.second,
-                             mpfr_get_default_rounding_mode());
-        }
-
-#define CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(_type,_fun) \
-        Gmpfr(_type x, \
-              std::float_round_style r, \
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                mpfr_init2(fr(),p); \
-                _fun(fr(),x,_gmp_rnd(r)); \
-        } \
-        Gmpfr(_type x,Gmpfr::Precision_type p){ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                mpfr_init2(fr(),p); \
-                _fun(fr(),x,mpfr_get_default_rounding_mode()); \
-        } \
-        Gmpfr(_type x){ \
-                mpfr_init2(fr(),mp_bits_per_limb*sizeof(_type)); \
-                _fun(fr(),x,mpfr_get_default_rounding_mode()); \
-        }
-
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(int,mpfr_set_si);
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long,mpfr_set_si);
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(unsigned,mpfr_set_ui);
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(unsigned long,mpfr_set_ui);
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(double,mpfr_set_d);
-
-        // With the MSVC compiler, 'long double' and 'double' are two
-        // different types, but with the same size: sizeof(long double)==8.
-        // For that reason, the cast of a long double to a double is
-        // exact.
-        // What is more, if one compile the mpfr library with mingw(32|64),
-        // on Windows, this compiler has sizeof(long double)==16, as
-        // gcc/g++ on Linux, and the produces libmpfr-1.dll has a symbol
-        // mpfr_set_ld which is binary incompatible with a call from MSVC.
-        // For those two reason, the constructor from 'long
-        // double' calls 'mpfr_set_l' on MSVC, instead of 'mpfr_set_ld'.
-        // That should not modify the semantic of a CGAL program, but
-        // only avoid the binary incompatibility of a CGAL program compiled
-        // with MSVC with the libmpfr-1.dll compiled with mingw.
-#ifdef _MSC_VER
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_d);
-#else
-        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_ld);
-#endif
-#undef CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE
-
-#define CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT(_class,_member,_fun,_preccode) \
-        Gmpfr(const _class &x, \
-              std::float_round_style r, \
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                mpfr_init2(fr(),p); \
-                _fun(fr(),x._member,_gmp_rnd(r)); \
-        } \
-        Gmpfr(const _class &x,Gmpfr::Precision_type p){ \
-                CGAL_assertion(p<=MPFR_PREC_MAX); \
-                mpfr_init2(fr(),MPFR_PREC_MIN<p?p:MPFR_PREC_MIN); \
-                _fun(fr(),x._member,mpfr_get_default_rounding_mode()); \
-        } \
-        Gmpfr(const _class &x){ \
-                Gmpfr::Precision_type p=(_preccode); \
-                mpfr_init2(fr(),MPFR_PREC_MIN<p?p:MPFR_PREC_MIN); \
-                _fun(fr(),x._member,MPFR_RNDN); \
-        }
-
-        CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT(Gmpz,
-                                           mpz(),
-                                           mpfr_set_z,
-                                           static_cast<Gmpfr::Precision_type>(
-                                                x.bit_size()));
-
-#undef CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT
-
-        // When Gmpfr is refence counted, we inherit the assignment
-        // operator and the copy constructor from Handle_for.
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-        Gmpfr& operator=(const Gmpfr &a){
-                mpfr_set_prec(fr(),a.get_precision());
-                mpfr_set(fr(),a.fr(),mpfr_get_default_rounding_mode());
-                return *this;
-        }
-
-        Gmpfr(const Gmpfr &a){
-                mpfr_init2(fr(),a.get_precision());
-                mpfr_set(fr(),a.fr(),MPFR_RNDN);
-        }
-#endif
-
-        Gmpfr(const Gmpfr &a,
-              std::float_round_style r,
-              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-#ifndef CGAL_GMPFR_NO_REFCOUNT
-                if(p==a.get_precision()){
-                        Gmpfr temp(a);
-                        // we use dont_clear_on_destruction because the
-                        // mpfr_t pointed to by fr() was never initialized
-                        dont_clear_on_destruction();
-                        swap(temp);
-                }else
-#endif
-                {
-                        mpfr_init2(fr(),p);
-                        mpfr_set(fr(),a.fr(),_gmp_rnd(r));
-                }
-        }
-
-        Gmpfr(const Gmpfr &a,Gmpfr::Precision_type p){
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-#ifndef CGAL_GMPFR_NO_REFCOUNT
-                if(p==a.get_precision()){
-                        Gmpfr temp(a);
-                        // we use dont_clear_on_destruction because the
-                        // mpfr_t pointed to by fr() was never initialized
-                        dont_clear_on_destruction();
-                        swap(temp);
-                }else
-#endif
-                {
-                        mpfr_init2(fr(),p);
-                        mpfr_set(fr(),a.fr(),mpfr_get_default_rounding_mode());
-                }
-        }
-
-        // default rounding mode
-
-        static std::float_round_style get_default_rndmode();
-        static std::float_round_style
-                set_default_rndmode(std::float_round_style);
-
-        // default precision
-
-        static Gmpfr::Precision_type get_default_precision();
-        static Gmpfr::Precision_type
-                set_default_precision(Gmpfr::Precision_type);
-
-        // precision of a single Gmpfr object
-
-        Gmpfr::Precision_type get_precision()const;
-        Gmpfr round(Gmpfr::Precision_type,std::float_round_style)const;
-
-        // mpfr global inexact flags
-
-        static void clear_flags();
-        static bool underflow_flag();
-        static bool overflow_flag();
-        static bool nan_flag();
-        static bool inex_flag();
-        static bool erange_flag();
-
-        // arithmetics
-
-        Gmpfr operator+()const;
-        Gmpfr operator-()const;
-
-#define CGAL_GMPFR_DECLARE_OPERATORS(_type) \
-        Gmpfr& operator+=(_type); \
-        Gmpfr& operator-=(_type); \
-        Gmpfr& operator*=(_type); \
-        Gmpfr& operator/=(_type);
-
-        CGAL_GMPFR_DECLARE_OPERATORS(const Gmpfr&)
-        Gmpfr& operator%=(const Gmpfr&);
-        CGAL_GMPFR_DECLARE_OPERATORS(long)
-        CGAL_GMPFR_DECLARE_OPERATORS(unsigned long)
-        CGAL_GMPFR_DECLARE_OPERATORS(int)
-        CGAL_GMPFR_DECLARE_OPERATORS(const Gmpz&)
-
-#undef CGAL_GMPFR_DECLARE_OPERATORS
-
-#define CGAL_GMPFR_DECLARE_STATIC_FUNCTION(_f,_t1,_t2) \
-        static Gmpfr _f (_t1, \
-                         _t2, \
-                         std::float_round_style=Gmpfr::get_default_rndmode()); \
-        static Gmpfr _f (_t1, \
-                         _t2, \
-                         Gmpfr::Precision_type, \
-                         std::float_round_style=Gmpfr::get_default_rndmode());
-
-#define CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(_t2) \
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(add,const Gmpfr&,_t2) \
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(sub,const Gmpfr&,_t2) \
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(mul,const Gmpfr&,_t2) \
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(div,const Gmpfr&,_t2)
-
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(const Gmpfr&)
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(long)
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(unsigned long)
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(int)
-        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(const Gmpz&)
-
-#undef CGAL_GMPFR_DECLARE_STATIC_FUNCTION
-#undef CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS
-
-#define CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(_f) \
-        Gmpfr _f (std::float_round_style=Gmpfr::get_default_rndmode()) const; \
-        Gmpfr _f (Gmpfr::Precision_type,\
-                  std::float_round_style=Gmpfr::get_default_rndmode()) const;
-
-        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(abs)
-        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(sqrt)
-        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(cbrt)
-        Gmpfr kthroot
-                (int,std::float_round_style=Gmpfr::get_default_rndmode()) const;
-        Gmpfr kthroot
-                (int,
-                 Gmpfr::Precision_type,
-                 std::float_round_style=Gmpfr::get_default_rndmode()) const;
-        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(square)
-
-#undef CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION
-
-        // comparison and query functions
-
-        bool is_zero()const;
-        bool is_one()const;
-        bool is_nan()const;
-        bool is_inf()const;
-        bool is_number()const;
-        Sign sign()const;
-        bool is_square()const;
-        bool is_square(Gmpfr&)const;
-        Comparison_result compare(const Gmpfr&)const;
-
-        // conversion functions
-
-        double to_double(std::float_round_style=Gmpfr::get_default_rndmode())
-                const;
-        std::pair<double,double> to_interval()const;
-        std::pair<double,long> to_double_exp(std::float_round_style=
-                                             Gmpfr::get_default_rndmode())const;
-        std::pair<std::pair<double,double>,long> to_interval_exp()const;
-        std::pair<Gmpz,long> to_integer_exp()const;
-};
-
-
-
-
-// --------------
-// implementation
-// --------------
-
-// default rounding mode, handled by mpfr
-inline
-std::float_round_style Gmpfr::get_default_rndmode(){
-        return _cgal_rnd(mpfr_get_default_rounding_mode());
-}
-
-inline
-std::float_round_style
-Gmpfr::set_default_rndmode(std::float_round_style rnd_mode){
-        std::float_round_style old_rnd_mode=Gmpfr::get_default_rndmode();
-        mpfr_set_default_rounding_mode(_gmp_rnd(rnd_mode));
-        return old_rnd_mode;
-}
-
-// default precision, handled by mpfr
-inline
-Gmpfr::Precision_type Gmpfr::get_default_precision(){
-        return static_cast<Gmpfr::Precision_type>(mpfr_get_default_prec());
-}
-
-inline
-Gmpfr::Precision_type Gmpfr::set_default_precision(Gmpfr::Precision_type prec){
-        Gmpfr::Precision_type old_prec=Gmpfr::get_default_precision();
-        CGAL_assertion(prec>=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX);
-        mpfr_set_default_prec(prec);
-        return old_prec;
-}
-
-// precision of a single Gmpfr object
-
-inline
-Gmpfr::Precision_type Gmpfr::get_precision()const{
-        return mpfr_get_prec(fr());
-}
-
-inline
-Gmpfr Gmpfr::round(Gmpfr::Precision_type p,std::float_round_style r)const{
-        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-        return Gmpfr(*this,r,p);
-}
-
-// mpfr global inexact flags
-
-inline
-void Gmpfr::clear_flags(){
-        mpfr_clear_flags();
-}
-
-inline
-bool Gmpfr::underflow_flag(){
-        return mpfr_underflow_p()!=0;
-}
-
-inline
-bool Gmpfr::overflow_flag(){
-        return mpfr_overflow_p()!=0;
-}
-
-inline
-bool Gmpfr::nan_flag(){
-        return mpfr_nanflag_p()!=0;
-}
-
-inline
-bool Gmpfr::inex_flag(){
-        return mpfr_inexflag_p()!=0;
-}
-
-inline
-bool Gmpfr::erange_flag(){
-        return mpfr_erangeflag_p()!=0;
-}
-
-// arithmetics
-
-inline
-Gmpfr Gmpfr::operator+()const{
-        return(*this);
-}
-
-inline
-Gmpfr Gmpfr::operator-()const{
-        Gmpfr result(0,get_precision());
-        mpfr_neg(result.fr(),fr(),MPFR_RNDN);
-        return result;
-}
-
-// CGAL_GMPFR_MEMBER_PREC returns the precision to be used to operate between
-// *this and a number of another type or class. Currently, the maximum of
-// *this' precision and the default precision is returned.
-#define CGAL_GMPFR_MEMBER_PREC() \
-        (get_precision()>Gmpfr::get_default_precision()? \
-         get_precision(): \
-         Gmpfr::get_default_precision())
-
-// CGAL_GMPFR_MEMBER_PREC_2 returns the precision for the operation between Gmpfr
-// objects *this and _b. Currently, it is the maximum of the precisions of
-// *this and _b and the default precision.
-// TODO: maybe we can rewrite this define optimally, maybe with an inline
-#define CGAL_GMPFR_MEMBER_PREC_2(_b) \
-        ( get_precision() >= mpfr_get_prec(_b.fr()) ? \
-                ( get_precision()>(Gmpfr::get_default_precision())? \
-                        get_precision():(Gmpfr::get_default_precision())): \
-                ( mpfr_get_prec(_b.fr())>(Gmpfr::get_default_precision())? \
-                        mpfr_get_prec(_b.fr()): \
-                        (Gmpfr::get_default_precision())) \
-        )
-
-// CGAL_GMPFR_OBJECT_BINARY_OPERATOR defines an overloaded binary operator of
-// the Gmpfr class, where the second parameter of the operator is an
-// object. It behaves differently when the Gmpfr class is reference-counted
-// or not.
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-#define CGAL_GMPFR_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(const _class &b){ \
-                if(get_precision()>=Gmpfr::get_default_precision()) { \
-                        _fun(fr(), \
-                             fr(), \
-                             b._member, \
-                             mpfr_get_default_rounding_mode()); \
-                }else{ \
-                        Gmpfr _temp(0,Gmpfr::get_default_precision()); \
-                        _fun(_temp.fr(), \
-                             fr(), \
-                             b._member, \
-                             mpfr_get_default_rounding_mode()); \
-                        mpfr_swap(_temp.fr(),fr()); \
-                } \
-                return *this; \
-        }
-#else
-#define CGAL_GMPFR_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(const _class &b){ \
-                if(unique()){ \
-                        if(get_precision()>Gmpfr::get_default_precision()) { \
-                                _fun(fr(), \
-                                     fr(), \
-                                     b._member, \
-                                     mpfr_get_default_rounding_mode()); \
-                        }else{ \
-                                Gmpfr _temp(0,Gmpfr::get_default_precision()); \
-                                _fun(_temp.fr(), \
-                                     fr(), \
-                                     b._member, \
-                                     mpfr_get_default_rounding_mode()); \
-                                swap(_temp); \
-                        } \
-                }else{ \
-                        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
-                        _fun(result.fr(), \
-                             fr(), \
-                             b._member, \
-                             mpfr_get_default_rounding_mode()); \
-                        swap(result); \
-                } \
-                return *this; \
-        }
-#endif
-
-// CGAL_GMPFR_GMPFR_BINARY_OPERATOR is analogous to
-// CGAL_GMPFR_OBJECT_BINARY_OPERATOR, and it is used when the second operand is
-// another Gmpfr. The difference is the computation of the operation
-// precision.
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-#define CGAL_GMPFR_GMPFR_BINARY_OPERATOR(_op,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(const Gmpfr &b){ \
-                Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b); \
-                if(_p==get_precision()) { \
-                        _fun(fr(), \
-                             fr(), \
-                             b.fr(), \
-                             mpfr_get_default_rounding_mode()); \
-                }else{ \
-                        Gmpfr _temp(0,_p); \
-                        _fun(_temp.fr(), \
-                             fr(), \
-                             b.fr(), \
-                             mpfr_get_default_rounding_mode()); \
-                        mpfr_swap(_temp.fr(),fr()); \
-                } \
-                return *this; \
-        }
-#else
-#define CGAL_GMPFR_GMPFR_BINARY_OPERATOR(_op,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(const Gmpfr &b){ \
-                Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b); \
-                if(unique()&&(_p==get_precision())){ \
-                        _fun(fr(), \
-                             fr(), \
-                             b.fr(), \
-                             mpfr_get_default_rounding_mode()); \
-                }else{ \
-                        Gmpfr result(0,_p); \
-                        _fun(result.fr(), \
-                             fr(), \
-                             b.fr(), \
-                             mpfr_get_default_rounding_mode()); \
-                        swap(result); \
-                } \
-                return *this; \
-        }
-#endif
-
-// CGAL_GMPFR_TYPE_BINARY_OPERATOR is analogous to the
-// CGAL_GMPFR_OBJECT_BINARY_OPERATOR, where the second parameter is a type
-// instead of an object.
-#ifdef CGAL_GMPFR_NO_REFCOUNT
-#define CGAL_GMPFR_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(_type x){ \
-                if(get_precision()>=Gmpfr::get_default_precision()) { \
-                        _fun(fr(),fr(),x,mpfr_get_default_rounding_mode()); \
-                }else{ \
-                        Gmpfr _temp(0,Gmpfr::get_default_precision()); \
-                        _fun(_temp.fr(), \
-                             fr(), \
-                             x, \
-                             mpfr_get_default_rounding_mode()); \
-                        mpfr_swap(_temp.fr(),fr()); \
-                } \
-                return *this; \
-        }
-#else
-#define CGAL_GMPFR_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
-        inline \
-        Gmpfr& Gmpfr::_op(_type x){ \
-                if(unique()){ \
-                        if(get_precision()>Gmpfr::get_default_precision()) { \
-                                _fun(fr(), \
-                                     fr(), \
-                                     x, \
-                                     mpfr_get_default_rounding_mode()); \
-                        }else{ \
-                                Gmpfr _temp(0,Gmpfr::get_default_precision()); \
-                                _fun(_temp.fr(), \
-                                     fr(), \
-                                     x, \
-                                     mpfr_get_default_rounding_mode()); \
-                                swap(_temp); \
-                        } \
-                }else{ \
-                        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
-                        _fun(result.fr(), \
-                             fr(), \
-                             x, \
-                             mpfr_get_default_rounding_mode()); \
-                        swap(result); \
-                } \
-                return *this; \
-        }
-#endif
-
-CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator+=,mpfr_add)
-CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator-=,mpfr_sub)
-CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator*=,mpfr_mul)
-CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator/=,mpfr_div)
-#if(defined(MPFR_VERSION)&&(MPFR_VERSION>=MPFR_VERSION_NUM(2,3,0)))
-CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator%=,mpfr_remainder)
-#else
-//#  warning "Gmpfr::operator%= is optimized in MPFR 2.3.0."
-inline
-Gmpfr& Gmpfr::operator%=(const Gmpfr &b){
-        Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b);
-        Gmpfr result(*this,_p);
-        result/=b;
-        mpfr_trunc(result.fr(),result.fr());
-        result*=b;
-        result-=*this;
-        mpfr_neg(result.fr(),result.fr(),MPFR_RNDN);
-#  ifdef CGAL_GMPFR_NO_REFCOUNT
-        mpfr_swap(result.fr(),fr());
-#  else
-        if(unique())
-                mpfr_swap(result.fr(),fr());
-        else
-                swap(result);
-#  endif
-        return *this;
-}
-#endif
-
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,long,mpfr_add_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,long,mpfr_sub_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,long,mpfr_mul_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,long,mpfr_div_si)
-
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,unsigned long,mpfr_add_ui)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,unsigned long,mpfr_sub_ui)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,unsigned long,mpfr_mul_ui)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,unsigned long,mpfr_div_ui)
-
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,int,mpfr_add_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,int,mpfr_sub_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,int,mpfr_mul_si)
-CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,int,mpfr_div_si)
-
-CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator+=,Gmpz,mpz(),mpfr_add_z)
-CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator-=,Gmpz,mpz(),mpfr_sub_z)
-CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator*=,Gmpz,mpz(),mpfr_mul_z)
-CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator/=,Gmpz,mpz(),mpfr_div_z)
-
-#undef CGAL_GMPFR_OBJECT_BINARY_OPERATOR
-#undef CGAL_GMPFR_GMPFR_BINARY_OPERATOR
-#undef CGAL_GMPFR_TYPE_BINARY_OPERATOR
-
-// the static arithmetic functions are defined in a separate file
-#include <CGAL/GMP/Gmpfr_type_static.h>
-
-#define CGAL_GMPFR_ARITHMETIC_FUNCTION(_name,_fun) \
-        inline \
-        Gmpfr Gmpfr::_name (std::float_round_style r)const{ \
-                Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
-                _fun(result.fr(),fr(),_gmp_rnd(r)); \
-                return result; \
-        } \
-        inline \
-        Gmpfr Gmpfr::_name (Gmpfr::Precision_type p, \
-                            std::float_round_style r)const{ \
-                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
-                Gmpfr result(0,p); \
-                _fun(result.fr(),fr(),_gmp_rnd(r)); \
-                return result; \
-        }
-
-CGAL_GMPFR_ARITHMETIC_FUNCTION(abs,mpfr_abs)
-CGAL_GMPFR_ARITHMETIC_FUNCTION(sqrt,mpfr_sqrt)
-CGAL_GMPFR_ARITHMETIC_FUNCTION(cbrt,mpfr_cbrt)
-
-inline
-Gmpfr Gmpfr::kthroot(int k,std::float_round_style r)const{
-        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC());
-        mpfr_root(result.fr(),fr(),k,_gmp_rnd(r));
-        return result;
-}
-
-inline
-Gmpfr Gmpfr::kthroot(int k,
-                     Gmpfr::Precision_type p,
-                     std::float_round_style r)const{
-        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
-        Gmpfr result(0,p);
-        mpfr_root(result.fr(),fr(),k,_gmp_rnd(r));
-        return result;
-}
-
-CGAL_GMPFR_ARITHMETIC_FUNCTION(square,mpfr_sqr)
-
-#undef CGAL_GMPFR_ARITHMETIC_FUNCTION
-#undef CGAL_GMPFR_MEMBER_PREC
-#undef CGAL_GMPFR_MEMBER_PREC_2
-
-// comparison and query functions
-
-inline
-bool Gmpfr::is_zero()const{
-        return mpfr_zero_p(fr())!=0;
-}
-
-inline
-bool Gmpfr::is_one()const{
-        return mpfr_cmp_ui(fr(),1)==0;
-}
-
-inline
-bool Gmpfr::is_nan()const{
-        return mpfr_nan_p(fr())!=0;
-}
-
-inline
-bool Gmpfr::is_inf()const{
-        return mpfr_inf_p(fr())!=0;
-}
-
-inline
-bool Gmpfr::is_number()const{
-        return mpfr_number_p(fr())!=0;
-}
-
-inline
-Sign Gmpfr::sign()const{
-        int s=mpfr_sgn(fr());
-        return(s==0?ZERO:(s>0?POSITIVE:NEGATIVE));
-}
-
-inline
-bool Gmpfr::is_square()const{
-        Sign s=sign();
-        if(s==NEGATIVE)
-                return false;
-        if(s==ZERO)
-                return true;
-        std::pair<Gmpz,long> r=Gmpfr::to_integer_exp();
-        if(r.second%2)
-                r.first=r.first*2;
-        return mpz_perfect_square_p(r.first.mpz())!=0;
-}
-
-inline
-bool Gmpfr::is_square(Gmpfr &y)const{
-        bool ret=is_square();
-        if(ret)
-                y=sqrt();
-        return ret;
-}
-
-inline
-Comparison_result Gmpfr::compare(const Gmpfr& b)const{
-        int c=mpfr_cmp(fr(),b.fr());
-        return(c?(c>0?LARGER:SMALLER):EQUAL);
-}
-
-// conversion functions
-
-inline
-double Gmpfr::to_double(std::float_round_style r)const{
-        return mpfr_get_d(fr(),_gmp_rnd(r));
-}
-
-inline
-std::pair<double,double>Gmpfr::to_interval()const{
-        return std::make_pair(
-                        mpfr_get_d(fr(),MPFR_RNDD),
-                        mpfr_get_d(fr(),MPFR_RNDU));
-}
-
-inline
-std::pair<double,long> Gmpfr::to_double_exp(std::float_round_style r)const{
-        long e;
-        double d=mpfr_get_d_2exp(&e,fr(),_gmp_rnd(r));
-        return std::make_pair(d,e);
-}
-
-inline
-std::pair<std::pair<double,double>,long> Gmpfr::to_interval_exp()const{
-        long e1,e2;
-        double d_low=mpfr_get_d_2exp(&e1,fr(),MPFR_RNDD);
-        double d_upp=mpfr_get_d_2exp(&e2,fr(),MPFR_RNDU);
-        CGAL_assertion(e1==e2);
-        return std::make_pair(std::make_pair(d_low,d_upp),e1);
-}
-
-inline
-std::pair<Gmpz,long> Gmpfr::to_integer_exp()const{
-        if(this->is_zero())
-                return std::make_pair(Gmpz(0),long(0));
-
-        Gmpz z;
-        long e=CGAL_GMPFR_GET_Z_2EXP(z.mpz(),this->fr());
-
-        long zeros=mpz_scan1(z.mpz(),0);
-        CGAL_assertion(z==(z>>zeros)<<zeros);
-        z>>=zeros;
-        CGAL_assertion(z%2!=0);
-        e+=zeros;
-
-        CGAL_postcondition_code(if(e>=0))
-        CGAL_postcondition(
-              (*this)==(Gmpfr(z,(mpfr_prec_t)z.bit_size())*CGAL::ipower(Gmpfr(2),e)));
-        CGAL_postcondition_code(else)
-        CGAL_postcondition(((*this)*(Gmpz(1)<<(-e)))==z);
-
-        return std::make_pair(z,e);
-}
-
-
-// input/output
-
-// This function was based on the Gmpq's one. It reads a number in the form
-// MeE, where M and E are integers. The read number is M.2^E. The number
-// may contain spaces between integers and the 'e', but not in the middle
-// of the numbers.
-inline
-std::istream& operator>>(std::istream& is,Gmpfr &f){
-        std::istream::int_type c;
-        std::ios::fmtflags old_flags = is.flags();
-
-        is.unsetf(std::ios::skipws);
-        gmpz_eat_white_space(is);
-
-        // 1. read the mantissa, it starts in +, - or a digit and ends in e
-        Gmpz mant(0);           // the mantissa of the number
-        Gmpz exp(0);            // the exponent of the number
-        bool neg_mant=false;    // true iff the mantissa is negative
-        bool neg_exp=false;     // true iff the exponent is negative
-        c=is.peek();
-        switch(c){
-                case '-':
-                        neg_mant=true;
-                        is.get();
-                        gmpz_eat_white_space(is);
-                        break;
-                case '+':
-                        is.get();
-                        gmpz_eat_white_space(is);
-                        break;
-                case 'n':       // this is NaN
-                        is.get();
-                        if(is.get()=='a'&&is.get()=='n'){
-                                f=Gmpfr();
-                                return is;
-                        }
-                        else
-                                goto invalid_number;
-                default:
-                        if(c!='i'&&(c<'0'||c>'9')){     // invalid number
-                                invalid_number:
-                                is.setstate(std::ios_base::failbit);
-                                is.flags(old_flags);
-                                return is;
-                        }
-        }
-
-        // at this point, we have the sign of the number and we are ready
-        // to read the mantissa
-        c=is.get();
-        if(c=='i'){     // infinity comes
-                if(is.get()=='n'&&is.get()=='f'){
-                        f=Gmpfr();
-                        mpfr_set_inf(f.fr(),neg_mant?-1:1);
-                        return is;
-                }
-                else
-                        goto invalid_number;
-        }
-
-        while(c>='0'&&c<='9'){
-                mant=10*mant+(c-'0');
-                c=is.get();
-        }
-
-        // set the correct sign of the mantissa
-        if(neg_mant)
-                mant=-mant;
-
-        is.putback(c);
-        gmpz_eat_white_space(is);
-
-        switch(c=is.get()){
-                case 'e':
-                        break;
-                default:
-                        is.setstate(std::ios_base::failbit);
-                        is.flags(old_flags);
-                        return is;
-        }
-        c=is.peek();
-        switch(c){
-                case '-':
-                        neg_exp=true;
-                        is.get();
-                        gmpz_eat_white_space(is);
-                        break;
-                case '+':
-                        is.get();
-                        gmpz_eat_white_space(is);
-                        break;
-                default:
-                        if(c<'0'||c>'9')
-                                goto invalid_number;
-        }
-        gmpz_eat_white_space(is);
-        while((c=is.get())>='0'&&c<='9')
-                exp=10*exp+(c-'0');
-        is.putback(c);
-        if(exp.bit_size()>8*sizeof(mpfr_exp_t))
-                mpfr_set_erangeflag();
-
-        // we have now both exponent and mantissa
-        f=Gmpfr(mant,
-                static_cast<Gmpfr::Precision_type>(
-                        mant.bit_size()>MPFR_PREC_MIN?
-                        mant.bit_size():
-                        MPFR_PREC_MIN));
-        if(neg_exp)
-                mpfr_div_2ui(f.fr(),f.fr(),mpz_get_ui(exp.mpz()),MPFR_RNDN);
-        else
-                mpfr_mul_2ui(f.fr(),f.fr(),mpz_get_ui(exp.mpz()),MPFR_RNDN);
-
-        // this expensive assertion checks that we didn't lose bits when
-        // multiplying or dividing by 2^exp
-        CGAL_expensive_assertion_code( \
-                Gmpfr g(0,static_cast<Gmpfr::Precision_type>( \
-                                MPFR_PREC_MIN<mant.bit_size()? \
-                                mant.bit_size(): \
-                                MPFR_PREC_MIN)); \
-                if(neg_exp) \
-                        mpfr_div_2ui(g.fr(), \
-                                     f.fr(), \
-                                     mpz_get_ui(exp.mpz()), \
-                                     MPFR_RNDN); \
-                else \
-                        mpfr_mul_2ui(g.fr(), \
-                                     f.fr(), \
-                                     mpz_get_ui(exp.mpz()), \
-                                     MPFR_RNDN); \
-        )
-        CGAL_expensive_assertion(g==mant);
-
-        return is;
-}
-
-inline
-std::ostream& operator<<(std::ostream& os,const Gmpfr &a){
-        if(a.is_nan())
-                return os<<"nan";
-        if(a.is_inf())
-                return os<<(a<0?"-inf":"+inf");
-        // The rest of the function was written by George Tzoumas.
-        if (!is_pretty(os)) {
-                std::pair<Gmpz,long> ie=a.to_integer_exp();
-                os << ie.first << 'e' << ie.second;
-                return os;
-        } else {
-                // human-readable format
-                mpfr_exp_t expptr;
-                char *str = mpfr_get_str(NULL, &expptr, 10, 0, a.fr(),
-                                mpfr_get_default_rounding_mode());
-                if (str == NULL) return os << "@err@";
-                std::string s(str);
-                mpfr_free_str(str);
-                int i = 0;
-                size_t n = s.length();
-                size_t k = 0;
-                while (k < n && s[n-k-1] == '0') k++; // count trailing zeros
-                if (k == n) return os << "0";
-                else if (k) {
-                        s.erase(n-k, k);  // remove trailing zeros
-                        n = s.length();
-                }
-                bool exp = false;
-                if(s[0] == '-') { os << "-"; i++; n--; } // sign
-                if (expptr < -5) {              // .125e-99
-                        s.insert(i, 1, '.'); exp = true;
-                } else if (expptr < 0) {
-                        s.insert(i, -expptr, '0');  // .00000125 -- .0125
-                        s.insert(i, 1, '.');
-                // The following cast of expptr is done for avoiding some
-                // compiler warnings. The cast is exact, because we know
-                // expptr is not negative here.
-                } else if ((size_t)expptr < n) {        // .125 -- 12.5
-                        s.insert(i+expptr, 1, '.');
-                } else if (expptr - n <= 5) {   // 125 -- 12500000
-                        s.append(expptr - n, '0');
-                } else {                        // .125e99
-                        s.insert(i, 1, '.'); exp = true;
-                }
-                os << s.substr(i);
-                if (exp) os << "e" << expptr;
-                return os;
-        }
-}
-
-// comparisons
-
-inline
-bool operator<(const Gmpfr &a,const Gmpfr &b){
-        return mpfr_less_p(a.fr(),b.fr())!=0;
-}
-
-inline
-bool operator==(const Gmpfr &a,const Gmpfr &b){
-        return mpfr_equal_p(a.fr(),b.fr())!=0;
-}
-
-inline
-bool operator<(const Gmpfr &a,long b){
-        return(mpfr_cmp_si(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,long b){
-        return(mpfr_cmp_si(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,long b){
-        return !mpfr_cmp_si(a.fr(),b);
-}
-
-inline
-bool operator<(const Gmpfr &a,unsigned long b){
-        return(mpfr_cmp_ui(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,unsigned long b){
-        return(mpfr_cmp_ui(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,unsigned long b){
-        return !mpfr_cmp_ui(a.fr(),b);
-}
-
-inline
-bool operator<(const Gmpfr &a,int b){
-        return(mpfr_cmp_si(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,int b){
-        return(mpfr_cmp_si(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,int b){
-        return !mpfr_cmp_si(a.fr(),b);
-}
-
-inline
-bool operator<(const Gmpfr &a,double b){
-        return(mpfr_cmp_d(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,double b){
-        return(mpfr_cmp_d(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,double b){
-        return !mpfr_cmp_d(a.fr(),b);
-}
-
-// See the comment about mpfr_set_ld and MSVC++, above.
-#ifdef _MSC_VER
-inline
-bool operator<(const Gmpfr &a,long double b){
-        return(mpfr_cmp_d(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,long double b){
-        return(mpfr_cmp_d(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,long double b){
-        return !mpfr_cmp_d(a.fr(),b);
-}
-#else
-inline
-bool operator<(const Gmpfr &a,long double b){
-        return(mpfr_cmp_ld(a.fr(),b)<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,long double b){
-        return(mpfr_cmp_ld(a.fr(),b)>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,long double b){
-        return !mpfr_cmp_ld(a.fr(),b);
-}
-#endif
-
-inline
-bool operator<(const Gmpfr &a,const Gmpz &b){
-        return(mpfr_cmp_z(a.fr(),b.mpz())<0);
-}
-
-inline
-bool operator>(const Gmpfr &a,const Gmpz &b){
-        return(mpfr_cmp_z(a.fr(),b.mpz())>0);
-}
-
-inline
-bool operator==(const Gmpfr &a,const Gmpz &b){
-        return !mpfr_cmp_z(a.fr(),b.mpz());
-}
-
-inline
-Gmpfr min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpfr& x,const Gmpfr& y){
-        return (x<=y)?x:y;
-}
-
-inline
-Gmpfr max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpfr& x,const Gmpfr& y){
-        return (x>=y)?x:y;
-}
-
-} // namespace CGAL
-
-#endif  // CGAL_GMPFR_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpq_type.h b/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpq_type.h
deleted file mode 100644
index 30cf5e6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpq_type.h
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright (c) 2002,2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Sylvain Pion
-
-
-#ifndef CGAL_GMPQ_TYPE_H
-#define CGAL_GMPQ_TYPE_H
-
-#include <CGAL/basic.h>
-#include <CGAL/GMP/Gmpz_type.h>
-#include <CGAL/GMP/Gmpfr_type.h>
-
-#include <CGAL/gmp.h>
-#include <mpfr.h>
-#include <utility>
-#include <string>
-
-#include <boost/operators.hpp>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Profile_counter.h>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4146)
-     // warning on - applied on unsigned number
-#endif
-
-namespace CGAL {
-
-// Wrapper around mpq_t to get the destructor call mpq_clear.
-// Contrary to mpz_t, there are no mpq_init_set_* functions,
-// so we simply call mpq_init() here.
-struct Gmpq_rep
-{
-  mpq_t mpQ;
-
-  Gmpq_rep()  { mpq_init(mpQ); }
-  ~Gmpq_rep() { mpq_clear(mpQ); }
-
-private:
-  // Make sure it does not get accidentally copied.
-  Gmpq_rep(const Gmpq_rep &);
-  Gmpq_rep & operator= (const Gmpq_rep &);
-};
-
-
-class Gmpq
-  : Handle_for<Gmpq_rep>,
-    boost::totally_ordered1< Gmpq
-  , boost::ordered_field_operators2< Gmpq, int
-  , boost::ordered_field_operators2< Gmpq, long
-  , boost::ordered_field_operators2< Gmpq, long long
-  , boost::ordered_field_operators2< Gmpq, double
-  , boost::ordered_field_operators2< Gmpq, Gmpz
-  , boost::ordered_field_operators2< Gmpq, Gmpfr
-    > > > > > > >
-{
-  typedef Handle_for<Gmpq_rep> Base;
-public:
-  typedef Tag_false  Has_gcd;
-  typedef Tag_true   Has_division;
-  typedef Tag_false  Has_sqrt;
-
-  typedef Tag_true   Has_exact_ring_operations;
-  typedef Tag_true   Has_exact_division;
-  typedef Tag_false  Has_exact_sqrt;
-
-  Gmpq() {}
-
-  Gmpq(const mpq_t q)
-  { mpq_set(mpq(), q); }
-
-  Gmpq(int n)
-  { mpq_set_si(mpq(), n, 1); }
-
-  Gmpq(unsigned int n)
-  { mpq_set_ui(mpq(), n, 1); }
-
-  Gmpq(long n)
-  { mpq_set_si(mpq(), n, 1); }
-
-  Gmpq(unsigned long n)
-  { mpq_set_ui(mpq(), n, 1); }
-
-private:
-  void init_ull(unsigned long long n){
-      CGAL_assertion(sizeof(long)==4 && sizeof(long long)==8);
-      mpq_set_ui(mpq(), (unsigned long)(n>>32), 1);
-      mpz_ptr z = mpq_numref(mpq());
-      mpz_mul_2exp (z, z, 32);
-      mpz_add_ui (z, z, (unsigned long)n);
-  }
-public:
-  Gmpq(unsigned long long n)
-  {
-    if (n <= std::numeric_limits<unsigned long>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
-      mpq_set_ui(mpq(), (unsigned long)n, 1);
-    else
-      init_ull(n);
-  }
-
-  Gmpq(long long n)
-  {
-    if (sizeof(long)==sizeof(long long))
-      mpq_set_si(mpq(), (long)n, 1);
-    else if (n>=0)
-      init_ull(n);
-    else {
-      init_ull(-(unsigned long long)n);
-      mpq_neg(mpq(), mpq());
-    }
-  }
-
-  Gmpq(const Gmpz& n)
-  { mpq_set_z(mpq(), n.mpz()); }
-
-  Gmpq(int n, int d)
-  {
-    if (d < 0) {
-      n = -n;
-      d = -d;
-    }
-    mpq_set_si(mpq(), n, d);
-    mpq_canonicalize(mpq());
-  }
-
-  Gmpq(signed long n, unsigned long d)
-  {
-    mpq_set_si(mpq(), n, d);
-    mpq_canonicalize(mpq());
-  }
-
-  Gmpq(unsigned long n, unsigned long d)
-  {
-    mpq_set_ui(mpq(), n, d);
-    mpq_canonicalize(mpq());
-  }
-
-  Gmpq(const Gmpz& n, const Gmpz& d)
-  {
-    mpz_set(mpq_numref(mpq()), n.mpz());
-    mpz_set(mpq_denref(mpq()), d.mpz());
-    mpq_canonicalize(mpq());
-  }
-
-  Gmpq(double d)
-  {
-    CGAL_assertion(is_finite(d));
-    mpq_set_d(mpq(), d);
-  }
-
-  Gmpq(const Gmpfr &f)
-  {
-    std::pair<Gmpz,long> intexp=f.to_integer_exp();
-    if(intexp.second<0){
-            mpz_set(mpq_numref(mpq()),intexp.first.mpz());
-            mpz_ui_pow_ui(mpq_denref(mpq()),2,-intexp.second);
-    }else{
-            mpz_mul_2exp(mpq_numref(mpq()),
-                         intexp.first.mpz(),
-                         (unsigned long)intexp.second);
-            mpz_set_ui(mpq_denref(mpq()),1);
-    }
-    // mpq_canonicalize is needed only when the numerator is odd and not zero
-    if(mpz_tstbit(intexp.first.mpz(),0)==0 && mpz_sgn(intexp.first.mpz())!=0)
-        mpq_canonicalize(mpq());
-    CGAL_assertion_msg(mpfr_cmp_q(f.fr(),mpq())==0,
-                       "error in conversion Gmpfr->Gmpq");
-  }
-
-  Gmpq(const std::string& str, int base = 10)
-  {
-    mpq_set_str(mpq(), str.c_str(), base);
-    mpq_canonicalize(mpq());
-  }
-
-#ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
-  int tam() const { return 0; }  // put here a code
-                                 // measuring the number of digits
-                                 // of the Gmpq
-// a possible code is:
-//  int tam() const { return std::max(numerator().tam(),
-//                                      denominator().tam()); }
-// the same as Quotient<MP_Float>
-#endif
-
-  // Gives the memory size in bytes. (not documented yet)
-  std::size_t size() const
-  {
-    std::size_t s_num = mpz_size(mpq_numref(mpq())) * (mp_bits_per_limb/8);
-    std::size_t s_den = mpz_size(mpq_denref(mpq())) * (mp_bits_per_limb/8);
-    return s_num + s_den;
-  }
-
-  Gmpz numerator() const
-  { return Gmpz(mpq_numref(mpq())); }
-
-  Gmpz denominator() const
-  { return Gmpz(mpq_denref(mpq())); }
-
-  Gmpq operator+() const;
-  Gmpq operator-() const;
-
-  Gmpq& operator+=(const Gmpq &q);
-  Gmpq& operator-=(const Gmpq &q);
-  Gmpq& operator*=(const Gmpq &q);
-  Gmpq& operator/=(const Gmpq &q);
-
-  bool operator==(const Gmpq &q) const { return mpq_equal(this->mpq(), q.mpq()) != 0;}
-  bool operator< (const Gmpq &q) const { return mpq_cmp(this->mpq(), q.mpq()) < 0; }
-
-  double to_double() const;
-  Sign sign() const;
-
-  const mpq_t & mpq() const { return Ptr()->mpQ; }
-  mpq_t & mpq() { return ptr()->mpQ; }
-
-  ~Gmpq()
-  {
-     CGAL_HISTOGRAM_PROFILER("[Gmpq sizes in log2 scale]",
-                             (unsigned) ( ::log(double(size())) / ::log(double(2)) )  );
-  }
-
-  // Interoperability with int
-  Gmpq& operator+=(int z){return (*this)+= Gmpq(z);}
-  Gmpq& operator-=(int z){return (*this)-= Gmpq(z);}
-  Gmpq& operator*=(int z){return (*this)*= Gmpq(z);}
-  Gmpq& operator/=(int z){return (*this)/= Gmpq(z);}
-  bool  operator==(int z) const {return mpq_cmp_si(mpq(),z,1)==0;}
-  bool  operator< (int z) const {return mpq_cmp_si(mpq(),z,1)<0;}
-  bool  operator> (int z) const {return mpq_cmp_si(mpq(),z,1)>0;}
-
-  // Interoperability with long
-  Gmpq& operator+=(long z){return (*this)+= Gmpq(z);}
-  Gmpq& operator-=(long z){return (*this)-= Gmpq(z);}
-  Gmpq& operator*=(long z){return (*this)*= Gmpq(z);}
-  Gmpq& operator/=(long z){return (*this)/= Gmpq(z);}
-  bool  operator==(long z) const {return mpq_cmp_si(mpq(),z,1)==0;}
-  bool  operator< (long z) const {return mpq_cmp_si(mpq(),z,1)<0;}
-  bool  operator> (long z) const {return mpq_cmp_si(mpq(),z,1)>0;}
-
-  // Interoperability with long long
-  Gmpq& operator+=(long long z){return (*this)+= Gmpq(z);}
-  Gmpq& operator-=(long long z){return (*this)-= Gmpq(z);}
-  Gmpq& operator*=(long long z){return (*this)*= Gmpq(z);}
-  Gmpq& operator/=(long long z){return (*this)/= Gmpq(z);}
-  bool  operator==(long long z) const {return (*this)== Gmpq(z);}
-  bool  operator< (long long z) const {return (*this)<  Gmpq(z);}
-  bool  operator> (long long z) const {return (*this)>  Gmpq(z);}
-
-  // Interoperability with double
-  Gmpq& operator+=(double d){return (*this)+= Gmpq(d);}
-  Gmpq& operator-=(double d){return (*this)-= Gmpq(d);}
-  Gmpq& operator*=(double d){return (*this)*= Gmpq(d);}
-  Gmpq& operator/=(double d){return (*this)/= Gmpq(d);}
-  bool  operator==(double d) const {return (*this)== Gmpq(d);}
-  bool  operator< (double d) const {return (*this)<  Gmpq(d);}
-  bool  operator> (double d) const {return (*this)>  Gmpq(d);}
-
-  // Interoperability with Gmpz
-  Gmpq& operator+=(const Gmpz&);
-  Gmpq& operator-=(const Gmpz&);
-  Gmpq& operator*=(const Gmpz&);
-  Gmpq& operator/=(const Gmpz&);
-  bool  operator==(const Gmpz &z) const {return (*this)== Gmpq(z);}
-  bool  operator< (const Gmpz &z) const {return (*this)<  Gmpq(z);}
-  bool  operator> (const Gmpz &z) const {return (*this)>  Gmpq(z);}
-
-  // Interoperability with Gmpfr
-  Gmpq& operator+=(const Gmpfr &f){return (*this)+= Gmpq(f);}
-  Gmpq& operator-=(const Gmpfr &f){return (*this)-= Gmpq(f);}
-  Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);}
-  Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);}
-  bool  operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;}
-  bool  operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;}
-  bool  operator> (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())<0;}
-};
-
-
-inline
-Gmpq
-Gmpq::operator-() const
-{
-    Gmpq Res;
-    mpq_neg(Res.mpq(), mpq());
-    return Res;
-}
-
-inline
-Gmpq
-Gmpq::operator+() const
-{
-  return Gmpq(mpq());
-}
-
-inline
-Gmpq
-operator+(const Gmpq &x, const Gmpq &y)
-{
-    Gmpq Res;
-    mpq_add(Res.mpq(), x.mpq(), y.mpq());
-    return Res;
-}
-
-inline
-Gmpq&
-Gmpq::operator+=(const Gmpq &z)
-{
-    (*this + z).swap(*this);
-    return *this;
-}
-
-inline
-Gmpq
-operator-(const Gmpq &x, const Gmpq &y)
-{
-    Gmpq Res;
-    mpq_sub(Res.mpq(), x.mpq(), y.mpq());
-    return Res;
-}
-
-inline
-Gmpq&
-Gmpq::operator-=(const Gmpq &z)
-{
-    (*this - z).swap(*this);
-    return *this;
-}
-
-inline
-Gmpq
-operator*(const Gmpq &x, const Gmpq &y)
-{
-    Gmpq Res;
-    mpq_mul(Res.mpq(), x.mpq(), y.mpq());
-    return Res;
-}
-
-inline
-Gmpq&
-Gmpq::operator*=(const Gmpq &z)
-{
-    (*this * z).swap(*this);
-    return *this;
-}
-
-inline
-Gmpq
-operator/(const Gmpq &x, const Gmpq &y)
-{
-    CGAL_precondition(y != 0);
-    Gmpq Res;
-    mpq_div(Res.mpq(), x.mpq(), y.mpq());
-    return Res;
-}
-
-inline
-Gmpq&
-Gmpq::operator/=(const Gmpq &z)
-{
-    (*this / z).swap(*this);
-    return *this;
-}
-
-inline
-Gmpq& Gmpq::operator+=(const Gmpz &z){
-  if(unique()){
-    mpz_addmul(mpq_numref(mpq()),mpq_denref(mpq()),z.mpz());
-  }else{
-    Gmpq result;
-    mpz_mul(mpq_numref(result.mpq()),
-            mpq_denref(mpq()),
-            z.mpz());
-    mpz_add(mpq_numref(result.mpq()),
-            mpq_numref(mpq()),
-            mpq_numref(result.mpq()));
-    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
-    swap(result);
-  }
-  return *this;
-}
-
-inline
-Gmpq& Gmpq::operator-=(const Gmpz &z){
-  if(unique()){
-    mpz_submul(mpq_numref(mpq()),mpq_denref(mpq()),z.mpz());
-  }else{
-    Gmpq result;
-    mpz_mul(mpq_numref(result.mpq()),
-            mpq_denref(mpq()),
-            z.mpz());
-    mpz_sub(mpq_numref(result.mpq()),
-            mpq_numref(mpq()),
-            mpq_numref(result.mpq()));
-    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
-    swap(result);
-  }
-  return *this;
-}
-
-inline
-Gmpq& Gmpq::operator*=(const Gmpz &z){
-  if(unique()){
-    mpz_mul(mpq_numref(mpq()),mpq_numref(mpq()),z.mpz());
-    mpq_canonicalize(mpq());
-  }else{
-    Gmpq result;
-    mpz_mul(mpq_numref(result.mpq()),mpq_numref(mpq()),z.mpz());
-    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
-    mpq_canonicalize(result.mpq());
-    swap(result);
-  }
-  return *this;
-}
-
-inline
-Gmpq& Gmpq::operator/=(const Gmpz &z){
-  if(unique()){
-    mpz_mul(mpq_denref(mpq()),mpq_denref(mpq()),z.mpz());
-    mpq_canonicalize(mpq());
-  }else{
-    Gmpq result;
-    mpz_mul(mpq_denref(result.mpq()),mpq_denref(mpq()),z.mpz());
-    mpz_set(mpq_numref(result.mpq()),mpq_numref(mpq()));
-    mpq_canonicalize(result.mpq());
-    swap(result);
-  }
-  return *this;
-}
-
-inline
-double
-Gmpq::to_double() const
-{ return mpq_get_d(mpq()); }
-
-inline
-Sign
-Gmpq::sign() const
-{ return static_cast<Sign>(mpq_sgn(mpq())); }
-
-inline
-std::ostream&
-operator<<(std::ostream& os, const Gmpq &z)
-{
-  os << z.numerator() << "/" << z.denominator();
-  return os;
-}
-
-// inline
-// std::istream&
-// operator>>(std::istream& is, Gmpq &z)
-// {
-//   char c;
-//   Gmpz n, d;
-//   is >> n;
-//   is >> c;
-//   //CGAL_assertion(!is || c == '/');
-//   if (c != '/'){
-//     is.setstate(std::ios_base::failbit);
-//     return is;
-//   }
-//   is >> d;
-//   if (!is.fail()) {
-//     z = Gmpq(n,d);
-//   }
-//   return is;
-// }
-
-namespace Gmpq_detail {
-  inline
-  bool is_space (const std::istream& /*is*/, std::istream::int_type c)
-  {
-    std::istream::char_type cc= c;
-    return (c == std::istream::traits_type::eof()) ||
-           std::isspace(cc, std::locale::classic() );
-  }
-
-  inline
-  bool is_eof (const std::istream& /*is*/, std::istream::int_type c)
-  {
-    return c == std::istream::traits_type::eof();
-  }
-
-  inline
-  bool is_digit (const std::istream& /*is*/, std::istream::int_type c)
-  {
-    std::istream::char_type cc= c;
-    return std::isdigit(cc, std::locale::classic() );
-  }
-
-  inline std::istream::int_type peek(std::istream& is)
-  {
-    // Workaround for a bug in the version of libc++ that is shipped with
-    // Apple-clang-3.2. See the long comment in the function
-    // gmpz_new_read() in <CGAL/GMP/Gmpz_type.h>.
-
-    if(is.eof())
-      return std::istream::traits_type::eof();
-    else
-      return is.peek();
-  }
-}
-
-inline
-std::istream&
-operator>>(std::istream& is, Gmpq &z)
-{
-  // reads rational and floating point literals.
-  const std::istream::char_type zero = '0';
-  std::istream::int_type c;
-  std::ios::fmtflags old_flags = is.flags();
-
-  is.unsetf(std::ios::skipws);
-  gmpz_eat_white_space(is);
-
-  Gmpz n(0);             // unsigned number before '/' or '.'
-  Gmpz d(1);             // number after '/', or denominator (fp-case)
-  bool negative = false; // do we have a leading '-'?
-  bool digits = false;   // for fp-case: are there any digits at all?
-
-  c = Gmpq_detail::peek(is);
-  if (c != '.') {
-    // is there a sign?
-    if (c == '-' || c == '+') {
-      is.get();
-      negative = (c == '-');
-      gmpz_eat_white_space(is);
-      c=Gmpq_detail::peek(is);
-    }
-    // read n (could be empty)
-    while (!Gmpq_detail::is_eof(is, c) && Gmpq_detail::is_digit(is, c)) {
-      digits = true;
-      n = n*10 + (c-zero);
-      is.get();
-      c = Gmpq_detail::peek(is);
-    }
-    // are we done?
-    if (Gmpq_detail::is_eof(is, c) || Gmpq_detail::is_space(is, c)) {
-      is.flags(old_flags);
-      if (digits && !is.fail())
-        z = negative? Gmpq(-n,1): Gmpq(n,1);
-      return is;
-    }
-  } else
-    n = 0;
-
-  // now we have read n, we are not done, and c is the next character
-  // in the stream
-  if (c == '/' || c == '.') {
-    is.get();
-    if (c == '/') {
-      // rational case
-      is >> d;
-      is.flags(old_flags);
-      if (!is.fail())
-        z = negative? Gmpq(-n,d): Gmpq(n,d);
-      return is;
-    }
-
-    // floating point case; read number after '.' (may be empty)
-    while (true) {
-      c = Gmpq_detail::peek(is);
-      if (Gmpq_detail::is_eof(is, c) || !Gmpq_detail::is_digit(is, c))
-        break;
-      // now we have a digit
-      is.get();
-      digits = true;
-      d *= 10;
-      n = n*10 + (c-zero);
-    }
-  }
-
-  // now we have read all digits after '.', and c is the next character;
-  // read the exponential part (optional)
-  int e = 0;
-  if (c == 'e' || c == 'E') {
-    is.get();
-    is >> e;
-  }
-
-  // now construct the Gmpq
-  if (!digits) {
-    // illegal floating-point number
-    is.setstate(std::ios_base::failbit);
-    is.flags(old_flags);
-    return is;
-  }
-
-  // handle e
-  if (e > 0)
-    while (e--) n *= 10;
-  else
-    while (e++) d *= 10;
-  is.flags(old_flags);
-  if (!is.fail())
-    z = (negative ? Gmpq(-n,d) : Gmpq(n,d));
-  return is;
-}
-
-inline Gmpq min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){
-  return (x<=y)?x:y;
-}
-inline Gmpq max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){
-  return (x>=y)?x:y;
-}
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_GMPQ_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpz_type.h b/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpz_type.h
deleted file mode 100644
index bb409e5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpz_type.h
+++ /dev/null
@@ -1,457 +0,0 @@
-// Copyright (c) 1999,2003,2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra, Sylvain Pion, Michael Hemmer
-
-
-#ifndef CGAL_GMPZ_TYPE_H
-#define CGAL_GMPZ_TYPE_H
-
-#include <CGAL/basic.h>
-#include <CGAL/gmp.h>
-#include <mpfr.h>
-
-#include <boost/operators.hpp>
-#include <CGAL/Handle_for.h>
-
-#include <string>
-#include <locale>
-
-namespace CGAL {
-
-// TODO : benchmark without ref-counting, and maybe give the possibility
-// to select ref-counting or not, then... => template class.
-
-// Wrapper around mpz_t to get the destructor call mpz_clear.
-struct Gmpz_rep
-{
-// FIXME : bug if ~() is called before an mpz_init*() is called.
-// not a problem in practice, but not nice.
-// maybe the mpz_init_set* functions should move back to Gmpz_rep.
-// But then we should use the Storage_traits::construct/get...
-
-  mpz_t mpZ;
-
-  Gmpz_rep() {}
-  ~Gmpz_rep() { mpz_clear(mpZ); }
-
-private:
-  // Make sure it does not get accidentally copied.
-  Gmpz_rep(const Gmpz_rep &);
-  Gmpz_rep & operator= (const Gmpz_rep &);
-};
-
-
-class Gmpz
-  : Handle_for<Gmpz_rep>,
-    boost::ordered_euclidian_ring_operators1< Gmpz
-  , boost::ordered_euclidian_ring_operators2< Gmpz, int
-  , boost::ordered_euclidian_ring_operators2< Gmpz, long
-  , boost::ordered_euclidian_ring_operators2< Gmpz, unsigned long
-  , boost::shiftable< Gmpz , long
-  , boost::unit_steppable<Gmpz
-  , boost::bitwise<Gmpz
-> > > > > > >
-{
-  typedef Handle_for<Gmpz_rep> Base;
-public:
-  typedef Tag_true  Has_gcd;
-  typedef Tag_true  Has_division;
-  typedef Tag_true  Has_sqrt;
-
-  typedef Tag_true  Has_exact_ring_operations;
-  typedef Tag_true  Has_exact_division;
-  typedef Tag_false Has_exact_sqrt;
-
-  Gmpz()
-  { mpz_init(mpz()); }
-
-  Gmpz(const mpz_t z)
-  { mpz_init_set(mpz(), z); }
-
-  Gmpz(int i)
-  { mpz_init_set_si(mpz(), i); }
-
-  Gmpz(long l)
-  { mpz_init_set_si(mpz(), l); }
-
-  Gmpz(unsigned long l)
-  { mpz_init_set_ui(mpz(), l); }
-
-  Gmpz(double d)
-  {
-     CGAL_warning_msg(is_integer(d), "Gmpz constructed from non-integer double value");
-     CGAL_assertion(is_finite(d));
-     mpz_init_set_d(mpz(), d);
-   }
-
-  Gmpz(const std::string& str, int base = 10)
-  { mpz_init_set_str(mpz(), str.c_str(), base); }
-
-  // returns the number of bits used to represent this number
-  size_t bit_size() const { return mpz_sizeinbase(mpz(),2); }
-
-  // returns the memory size in bytes
-  size_t size() const { return mpz_size(mpz()) / (mp_bits_per_limb/8); }
-
-  // returns the number of decimal digits needed to represent this number
-  size_t approximate_decimal_length() const { return mpz_sizeinbase(mpz(),10); }
-
-  double to_double() const {return mpz_get_d(mpz());}
-  Sign sign() const { return static_cast<Sign>(mpz_sgn(mpz()));}
-
-  const mpz_t & mpz() const { return Ptr()->mpZ; }
-  mpz_t & mpz() { return ptr()->mpZ; }
-
-  #ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
-  int tam() const { return 0; }  // put here a code
-                                 // measuring the number of digits
-                                 // of the Gmpz
-#endif
-
-#define CGAL_GMPZ_OBJECT_OPERATOR(_op,_class,_fun)    \
-  Gmpz& _op(const _class& z){                        \
-    Gmpz Res;                                         \
-    _fun(Res.mpz(), mpz(), z.mpz());                  \
-    swap(Res);                                        \
-    return *this;                                     \
-  }
-
-  CGAL_GMPZ_OBJECT_OPERATOR(operator+=,Gmpz,mpz_add);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator-=,Gmpz,mpz_sub);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator*=,Gmpz,mpz_mul);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator/=,Gmpz,mpz_tdiv_q);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator%=,Gmpz,mpz_tdiv_r);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator&=,Gmpz,mpz_and);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator|=,Gmpz,mpz_ior);
-  CGAL_GMPZ_OBJECT_OPERATOR(operator^=,Gmpz,mpz_xor);
-#undef CGAL_GMPZ_OBJECT_OPERATOR
-
-  bool operator<(const Gmpz &b) const
-  { return mpz_cmp(this->mpz(), b.mpz()) < 0; }
-  bool operator==(const Gmpz &b) const
-  { return mpz_cmp(this->mpz(), b.mpz()) == 0; }
-
-
-  Gmpz operator+() const {return Gmpz( mpz() );}
-  Gmpz operator-() const {
-    Gmpz Res;
-    mpz_neg(Res.mpz(), mpz());
-    return Res;
-  }
-
-  Gmpz& operator <<= (const unsigned long& i){
-    Gmpz Res;
-    mpz_mul_2exp(Res.mpz(),this->mpz(), i);
-    swap(Res);
-    return *this;
-  }
-  Gmpz& operator >>= (const unsigned long& i){
-    Gmpz Res;
-    mpz_tdiv_q_2exp(Res.mpz(),this->mpz(), i);
-    swap(Res);
-    return *this;
-  }
-
-  Gmpz& operator++(){return *this+=1;}
-  Gmpz& operator--(){return *this-=1;}
-
-
-  // interoperability with int
-  Gmpz& operator+=(int i);
-  Gmpz& operator-=(int i);
-  Gmpz& operator*=(int i);
-  Gmpz& operator/=(int i);
-  bool  operator==(int i) const {return mpz_cmp_si(this->mpz(), i) == 0;};
-  bool  operator< (int i) const {return mpz_cmp_si(this->mpz(), i) < 0;};
-  bool  operator> (int i) const {return mpz_cmp_si(this->mpz(), i) > 0;};
-
-  // interoperability with long
-  Gmpz& operator+=(long i);
-  Gmpz& operator-=(long i);
-  Gmpz& operator*=(long i);
-  Gmpz& operator/=(long i);
-  bool  operator==(long i) const {return mpz_cmp_si(this->mpz(), i) == 0;};
-  bool  operator< (long i) const {return mpz_cmp_si(this->mpz(), i) < 0;};
-  bool  operator> (long i) const {return mpz_cmp_si(this->mpz(), i) > 0;};
-
-  // interoperability with unsigned long
-  Gmpz& operator+=(unsigned long i);
-  Gmpz& operator-=(unsigned long i);
-  Gmpz& operator*=(unsigned long i);
-  Gmpz& operator/=(unsigned long i);
-  bool  operator==(unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) == 0;};
-  bool  operator< (unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) < 0;};
-  bool  operator> (unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) > 0;};
-};
-
-
-
-#define CGAL_GMPZ_SCALAR_OPERATOR(_op,_type,_fun)   \
-  inline Gmpz& Gmpz::_op(_type z) {                 \
-    Gmpz Res;                                       \
-    _fun(Res.mpz(), mpz(), z);                      \
-    swap(Res);                                      \
-    return *this;                                   \
-  }
-
-CGAL_GMPZ_SCALAR_OPERATOR(operator*=,int,mpz_mul_si)
-CGAL_GMPZ_SCALAR_OPERATOR(operator*=,long,mpz_mul_si)
-
-CGAL_GMPZ_SCALAR_OPERATOR(operator+=,unsigned long,mpz_add_ui)
-CGAL_GMPZ_SCALAR_OPERATOR(operator-=,unsigned long,mpz_sub_ui)
-CGAL_GMPZ_SCALAR_OPERATOR(operator*=,unsigned long,mpz_mul_ui)
-CGAL_GMPZ_SCALAR_OPERATOR(operator/=,unsigned long,mpz_tdiv_q_ui)
-#undef CGAL_GMPZ_SCALAR_OPERATOR
-
-
-inline Gmpz& Gmpz::operator+=(int i)
-{
-  Gmpz Res;
-  if (i >= 0)
-    mpz_add_ui(Res.mpz(), mpz(), i);
-  else
-    mpz_sub_ui(Res.mpz(), mpz(), -i);
-  swap(Res);
-  return *this;
-}
-
-inline Gmpz& Gmpz::operator+=(long i)
-{
-  Gmpz Res;
-  if (i >= 0)
-    mpz_add_ui(Res.mpz(), mpz(), i);
-  else
-    mpz_sub_ui(Res.mpz(), mpz(), -i);
-  swap(Res);
-  return *this;
-}
-
-
-
-inline Gmpz& Gmpz::operator-=(int  i){return *this+=-i;}
-inline Gmpz& Gmpz::operator-=(long i){return *this+=-i;}
-
-inline Gmpz& Gmpz::operator/=(int b) {
-  if (b>0) {
-    Gmpz Res;
-    mpz_tdiv_q_ui(Res.mpz(), mpz(), b);
-    swap(Res);
-    return *this;
-  }
-  return *this /= Gmpz(b);
-}
-
-inline Gmpz& Gmpz::operator/=(long b) {
-  if (b>0) {
-    Gmpz Res;
-    mpz_tdiv_q_ui(Res.mpz(), mpz(), b);
-    swap(Res);
-    return *this;
-  }
-  return *this /= Gmpz(b);
-}
-
-inline
-std::ostream&
-operator<<(std::ostream& os, const Gmpz &z)
-{
-  char *str = new char [mpz_sizeinbase(z.mpz(),10) + 2];
-  str = mpz_get_str(str, 10, z.mpz());
-  os << str ;
-  delete[] str;
-  return os;
-}
-
-inline
-void gmpz_eat_white_space(std::istream &is)
-{
-  std::istream::int_type c;
-  do {
-    c= is.peek();
-    if (c== std::istream::traits_type::eof())
-      return;
-    else {
-      std::istream::char_type cc= c;
-      if ( std::isspace(cc, std::locale::classic()) ) {
-        is.get();
-        // since peek succeeded, this should too
-        CGAL_assertion(!is.fail());
-      } else {
-        return;
-      }
-    }
-  } while (true);
-}
-
-
-inline
-std::istream &
-gmpz_new_read(std::istream &is, Gmpz &z)
-{
-  bool negative = false;
-  const std::istream::char_type zero = '0';
-  std::istream::int_type c;
-  Gmpz r;
-  std::ios::fmtflags old_flags = is.flags();
-
-  is.unsetf(std::ios::skipws);
-  gmpz_eat_white_space(is);
-
-  c=is.peek();
-  if (c=='-' || c=='+'){
-      is.get();
-      CGAL_assertion(!is.fail());
-      negative=(c=='-');
-      gmpz_eat_white_space(is);
-      c=is.peek();
-  }
-
-  std::istream::char_type cc= c;
-
-  if (c== std::istream::traits_type::eof() ||
-      !std::isdigit(cc, std::locale::classic() ) ){
-    is.setstate(std::ios_base::failbit);
-  } else {
-    CGAL_assertion(cc==c);
-    r= cc-zero;
-    is.get();
-    CGAL_assertion(!is.fail());
-
-    // The following loop was supposed to be an infinite loop with:
-    //   while (true)
-    // where the break condition is that is.peek() returns and EOF or a
-    // non-digit character.
-    //
-    // Unfortunately, the wording of the C++03 and C++11 standard was not
-    // well understood by the authors of libc++ (the STL of clang++) and,
-    // in the version of libc++ shipped with Apple-clang-3.2,
-    // istream::peek() set the flag eofbit when it reads the last character
-    // of the stream *instead* of setting it only when it *tries to read
-    // past the last character*. For that reason, to avoid that the next
-    // peek() sets also the failbit, one has to check for EOL twice.
-    //
-    // See the LWG C++ Issue 2036, classified as Not-A-Defect:
-    //   http://lwg.github.com/issues/lwg-closed.html#2036
-    // and a StackOverflow related question:
-    //   http://stackoverflow.com/a/9020292/1728537
-    // --
-    // Laurent Rineau, 2013/10/10
-    while (!is.eof()) {
-      c=is.peek();
-      if (c== std::istream::traits_type::eof()) {
-        break;
-      }
-      cc=c;
-      if  ( !std::isdigit(cc, std::locale::classic() )) {
-        break;
-      }
-      is.get();
-      CGAL_assertion(!is.fail());
-      CGAL_assertion(cc==c);
-      r= r*10+(cc-zero);
-    }
-  }
-
-  is.flags(old_flags);
-  if (!is.fail()) {
-    if (negative) {
-      z=-r;
-    } else {
-      z=r;
-    }
-  }
-  return is;
-}
-
-/*inline
-std::istream&
-read_gmpz(std::istream& is, Gmpz &z) {
-  bool negative = false;
-  bool good = false;
-  const int null = '0';
-  char c;
-  Gmpz tmp;
-  std::ios::fmtflags old_flags = is.flags();
-
-  is.unsetf(std::ios::skipws);
-  while (is.get(c) && std::isspace(c, std::locale::classic() ))
-  {}
-
-  if (c == '-')
-  {
-        negative = true;
-        while (is.get(c) && std::isspace(c, std::locale::classic() ))
-        {}
-  }
-  if (std::isdigit(c, std::locale::classic() ))
-  {
-        good = true;
-        tmp = c - null;
-        while (is.get(c) && std::isdigit(c, std::locale::classic() ))
-        {
-            tmp = 10*tmp + (c-null);
-        }
-  }
-  if (is)
-        is.putback(c);
-  if (sign(tmp) != ZERO && negative)
-      tmp = -tmp;
-  if (good){
-      z = tmp;
-      }
-   else
-    is.clear(is.rdstate() | std::ios::failbit);
-
-  is.flags(old_flags);
-  return is;
-  }*/
-
-inline
-std::istream&
-operator>>(std::istream& is, Gmpz &z)
-{
-  return gmpz_new_read(is, z);
-}
-
-template <>
-struct Split_double<Gmpz>
-{
-  void operator()(double d, Gmpz &num, Gmpz &den) const
-  {
-    std::pair<double, double> p = split_numerator_denominator(d);
-    num = Gmpz(p.first);
-    den = Gmpz(p.second);
-  }
-};
-
-inline Gmpz min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpz& x,const Gmpz& y){
-  return (x<=y)?x:y;
-}
-inline Gmpz max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpz& x,const Gmpz& y){
-  return (x>=y)?x:y;
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_GMPZ_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_2.h b/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_2.h
deleted file mode 100644
index 05b82c8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_2.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$ $Date$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_GENERAL_POLYGON_SET_2_H
-#define CGAL_GENERAL_POLYGON_SET_2_H
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Boolean_set_operations_2/Gps_default_dcel.h>
-#include <CGAL/General_polygon_set_on_surface_2.h>
-#include <CGAL/Arrangement_2/Arr_default_planar_topology.h>
-#include <CGAL/Arrangement_2.h>
-
-namespace CGAL {
-
-// General_polygon_set_2
-template <class Traits_, class Dcel_ = Gps_default_dcel<Traits_> >
-class General_polygon_set_2 : public General_polygon_set_on_surface_2
-  <Traits_, typename Default_planar_topology<Traits_, Dcel_>::Traits>
-{
-protected:
-  typedef General_polygon_set_2<Traits_, Dcel_>           Self;
-  
-public:
-  typedef Traits_                                         Traits_2;
-  typedef Dcel_                                           Dcel;
-
-  typedef General_polygon_set_on_surface_2 <Traits_2,
-    typename Default_planar_topology<Traits_2, Dcel >::Traits>
-                                                          Base;
-
-  typedef CGAL::Arrangement_2<Traits_2, Dcel>             Arrangement_2;
-
-  typedef typename Base::Polygon_2                        Polygon_2;
-  typedef typename Base::Polygon_with_holes_2             Polygon_with_holes_2;
-
-  // default costructor
-  General_polygon_set_2() : Base()
-  {}
-
-
-  // constructor with traits object
-  General_polygon_set_2(Traits_2& tr) : Base(tr)
-  {}
-
-  explicit General_polygon_set_2(const Polygon_2& pgn) : Base(pgn)
-  { }
-
-  explicit General_polygon_set_2(const Polygon_with_holes_2& pgn_with_holes): 
-   Base(pgn_with_holes) 
-  { }
-
-  // For some reason the below functions (the ones that we call "using" for)
-  // are hidden by the function in this class and are not found in the parent's
-  // class (General_polygon_set_on_surface_2) when they are called on an 
-  // object of type General_polygon_set_2.
-  // Check in the Vandervoorde / Stroustrup books what is the exact reason.
-  // (There may be a better and more correct solution.)
-  using Base::intersection;
-  using Base::join;
-  using Base::symmetric_difference;
-
-  inline void intersection(const Self& ps1, const Self& ps2)
-  {
-    Base::intersection(static_cast<const Base&>(ps1),
-                       static_cast<const Base&>(ps2));
-  }
-
-  inline void join(const Self& ps1, const Self& ps2)
-  {
-    Base::join(static_cast<const Base&>(ps1), static_cast<const Base&>(ps2));
-  }
-
-  inline void symmetric_difference(const Self& ps1, const Self& ps2)
-  {
-    Base::symmetric_difference(static_cast<const Base&>(ps1),
-                               static_cast<const Base&>(ps2));
-  }
-
-  //@{
-  
-  /*! Obtain a const reference to the underlying arrangement
-   * \return the underlying arrangement.
-   */
-  const Arrangement_2& arrangement() const
-  {
-    return *(static_cast<const Arrangement_2*>(this->m_arr));
-  }
-
-  /*! Obtain a reference to the underlying arrangement
-   * \return the underlying arrangement.
-   */
-  Arrangement_2& arrangement()
-  {
-    return *(static_cast<Arrangement_2*>(this->m_arr));
-  }
-
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_on_surface_2.h b/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_on_surface_2.h
deleted file mode 100644
index 3bd8ba1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_set_on_surface_2.h
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$ $Date$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
-
-#ifndef CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
-#define CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
-
-#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h>
-#include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
-
-namespace CGAL {
-
-
-namespace Boolean_set_operation_2_internal
-{
-  struct PreconditionValidationPolicy
-  {
-   /*! is_valid - Checks if a Traits::Polygon_2 OR 
-       Traits::Polygon_with_holes_2 are valid.
-       This validation policy checks that polygons are valid in a 
-       CGAL_precondition macro. We inherit from Gps_on_surface_base_2
-       and use preconditions to validate the input polygons.
-   */ 
-    template <class Polygon, class Traits>
-    inline static void is_valid(const Polygon& p, Traits& t)
-    {
-      CGAL_precondition(is_valid_unknown_polygon(p, t));
-    }
-  };
-}
-
-
-// General_polygon_set_on_surface_2
-/*
-  This class is derived from Gps_on_surface_base_2.
-  It enforces the validation conditions for general polygons, and is therefore
-  the basic implementation that should be used by the user
-*/
-template <class Traits_, class TopTraits_>
-  class General_polygon_set_on_surface_2 : 
-  public Gps_on_surface_base_2<Traits_, TopTraits_, 
-                 Boolean_set_operation_2_internal::PreconditionValidationPolicy>
-{
-protected:
-  typedef Traits_                                                   Traits_2;
-  typedef General_polygon_set_on_surface_2<Traits_2, TopTraits_>    Self;
-  typedef Gps_on_surface_base_2<Traits_2, TopTraits_, 
-   Boolean_set_operation_2_internal::PreconditionValidationPolicy>  Base;
-
-public:
-  typedef typename Base::Polygon_2                                  Polygon_2;
-  typedef typename Base::Polygon_with_holes_2                       
-    Polygon_with_holes_2;
-  typedef typename Base::Arrangement_on_surface_2                   
-    Arrangement_on_surface_2;
-
-public:
-
-  // default costructor
-  General_polygon_set_on_surface_2() : Base()
-  {}
-
-
-  // constructor with traits object
-  General_polygon_set_on_surface_2(Traits_2& tr) : Base(tr)
-  {}
-
-
-  General_polygon_set_on_surface_2(const Self& ps) : Base(ps)
-    {}
-
-  
-  General_polygon_set_on_surface_2& operator=(const Self& ps)
-    {
-      Base::operator=(ps);
-      return (*this);
-    }
-
-
-  explicit General_polygon_set_on_surface_2(const Polygon_2& pgn) : Base(pgn)
-  { }
-
-  explicit General_polygon_set_on_surface_2(
-    const Polygon_with_holes_2& pgn_with_holes) : Base(pgn_with_holes)
-  { }
-
-protected:
-  General_polygon_set_on_surface_2(Arrangement_on_surface_2* arr) : Base(arr)
-    {}
-
-public:
-  //destructor
-  virtual ~General_polygon_set_on_surface_2()
-  { }
-
-  void intersection(const Self& gps1, const Self& gps2)
-  {
-    Base::intersection(gps1.base(), gps2.base());
-  }
-
-  void join(const Self& gps1, const Self& gps2)
-  {
-    Base::join(gps1.base(), gps2.base());
-  }
-
-  void symmetric_difference(const Self& gps1, const Self& gps2)
-  {
-    Base::symmetric_difference(gps1.base(), gps2.base());
-  }
-
-
-  // For some reason the below functions (the ones that we call "using" for)
-  // are hidden by the function in this class and are not found in the parent's
-  // class (General_polygon_set_on_surface_2) when they are called on an 
-  // object of type General_polygon_set_2.
-  // Check in the Vandervoorde / Stroustrup books what is the exact reason.
-  // (There may be a better and more correct solution.)
-  using Base::intersection;
-  using Base::join;
-  using Base::symmetric_difference;
-
-private:
-  const Base& base() const
-    {
-      return static_cast<const Base&> (*this);
-    }
-
-  Base& base()
-    {
-      return static_cast<Base&> (*this);
-    }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gps_circle_segment_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Gps_circle_segment_traits_2.h
deleted file mode 100644
index 60ac981..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Gps_circle_segment_traits_2.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_GPS_CIRCLE_SEGMENT_TRAITS_2_H
-#define CGAL_GPS_CIRCLE_SEGMENT_TRAITS_2_H
-
-#include <CGAL/Gps_traits_2.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-
-namespace CGAL {
-
-template <class Kernel_, bool Filer_ = true>
-class Gps_circle_segment_traits_2 : 
-  public Gps_traits_2<Arr_circle_segment_traits_2<Kernel_, Filer_> >
-{
-public:
-  Gps_circle_segment_traits_2<Kernel_, Filer_>(bool use_cache = false): 
-      Gps_traits_2<Arr_circle_segment_traits_2<Kernel_, Filer_> >()
-  {
-    this->m_use_cache = use_cache;
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gps_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Gps_traits_2.h
deleted file mode 100644
index 66d3d5e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Gps_traits_2.h
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) 2005  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
-
-#ifndef CGAL_GPS_TRAITS_2_H
-#define CGAL_GPS_TRAITS_2_H
-
-#include <CGAL/General_polygon_2.h>
-#include <CGAL/General_polygon_with_holes_2.h>
-#include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
-#include <CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h>
-
-namespace CGAL {
-
-template <typename Arr_traits,
-          typename General_polygon_t = General_polygon_2<Arr_traits> >
-class Gps_traits_2 : public Arr_traits
-{
-  typedef Arr_traits                                    Base;
-  typedef Gps_traits_2<Arr_traits,General_polygon_t>    Self;
-  
-public:
-
-  typedef typename Base::Point_2                        Point_2;
-  typedef typename Base::X_monotone_curve_2             X_monotone_curve_2;
-  //Polygon_2 type is required by GeneralPolygonSetTraits Concept    
-  typedef General_polygon_t                             Polygon_2;
-  //Polygon_2 is a model of the GeneralPolygon2 concept
-  typedef Polygon_2                                     General_polygon_2;
-  
-  //Polygon_with_holes_2 type required by GeneralPolygonSetTraits Concept.
-  typedef CGAL::General_polygon_with_holes_2<General_polygon_2>
-                                                        Polygon_with_holes_2;
-  //Polygon_with_Holes_2 is a model of the GeneralPolygonWithHoles2 concept.
-  typedef Polygon_with_holes_2
-    General_polygon_with_holes_2;
-  
-  typedef typename General_polygon_2::Curve_const_iterator
-                                                        Curve_const_iterator;
-  
-  typedef typename General_polygon_with_holes_2::Hole_const_iterator
-                                                        Hole_const_iterator;
-                                           
-  typedef typename Base::Equal_2                        Equal_2;
-  typedef typename Base::Compare_endpoints_xy_2         Compare_endpoints_xy_2;
-  typedef typename Base::Construct_min_vertex_2         Construct_min_vertex_2;
-  typedef typename Base::Construct_max_vertex_2         Construct_max_vertex_2;
-
-
-  /*!
-   * A functor for constructing a polygon from a range of x-monotone curves.
-   */
-  class Construct_polygon_2 {
-  public:
-    template<class XCurveIterator>
-    void operator()(XCurveIterator begin, XCurveIterator end,
-                    General_polygon_2& pgn)
-    { pgn.init(begin, end); }
-  };
-
-  Construct_polygon_2 construct_polygon_2_object() const
-  { return Construct_polygon_2(); }
-
-  /*!
-   * A functor for scanning all x-monotone curves that form a polygon boundary.
-   */
-  class Construct_curves_2
-  {
-  public:
-
-    std::pair<Curve_const_iterator, Curve_const_iterator>
-    operator()(const General_polygon_2& pgn)
-    { return std::make_pair(pgn.curves_begin(), pgn.curves_end()); }
-  };
-
-  Construct_curves_2 construct_curves_2_object()
-  { return Construct_curves_2(); }
-
-  /*!
-   * An auxiliary functor used for validity checks.
-   */
-  typedef Gps_traits_adaptor<Base>                      Traits_adaptor;
- 
-  /*typedef CGAL::Is_valid_2<Self, Traits_adaptor>           Is_valid_2;
-    Is_valid_2 is_valid_2_object()
-    {
-    Traits_adaptor   tr_adp;
- 
-    return (Is_valid_2 (*this, tr_adp));
-    }*/  
-  
-  //Added Functionality from GeneralPolygonWithHoles Concept to the traits. 
-  
-  /*A functor for constructing the outer boundary of a polygon with holes*/   
-  class Construct_outer_boundary {
-  public:
-    General_polygon_2 operator()(const  General_polygon_with_holes_2& pol_wh) 
-    { return pol_wh.outer_boundary(); }
-  };
-  
-  Construct_outer_boundary construct_outer_boundary_object() const
-  { return Construct_outer_boundary(); }
-  
-  /* typedef from General_polygon_with_holes_2. Hole_const_iterator nested type
-   * is required by GeneralPolygonWithHoles2 concept
-   */
-  /*A functor for constructing the container of holes of a polygon with holes*/  
-  class Construct_holes {
-  public:
-    std::pair<Hole_const_iterator, Hole_const_iterator>
-    operator()(const General_polygon_with_holes_2& pol_wh) 
-    { return std::make_pair(pol_wh.holes_begin(), pol_wh.holes_end()); }
-  };
-  
-  Construct_holes construct_holes_object() const
-  { return Construct_holes(); }
-    
-  /* A functor for constructing a General_polygon_with_holes from a
-   * General_Polygon (and possibly a range of holes).
-   *
-   * constructs a general polygon with holes using a given general polygon
-   * outer as the outer boundary and a given range of holes. If outer is an
-   * empty general polygon, then an unbounded polygon with holes will be
-   * created. The holes must be contained inside the outer boundary, and the
-   * polygons representing the holes must be strictly simple and pairwise
-   * disjoint, except perhaps at the vertices.
-   */
-  class Construct_general_polygon_with_holes_2 {
-  public:     
-    General_polygon_with_holes_2
-    operator()(const General_polygon_2& pgn_boundary) 
-    { return General_polygon_with_holes_2(pgn_boundary); }
-
-    template <class HolesInputIterator>
-    General_polygon_with_holes_2
-    operator()(const General_polygon_2& pgn_boundary,
-               HolesInputIterator h_begin,
-               HolesInputIterator h_end)
-    { return General_polygon_with_holes_2(pgn_boundary, h_begin,h_end); }
-  };
-
-  Construct_general_polygon_with_holes_2 construct_polygon_with_holes_2_object()
-    const
-  { return Construct_general_polygon_with_holes_2(); }
-  
-  // Return true if the outer boundary is empty, and false otherwise.
-  class Is_unbounded {
-  public:
-    bool operator()(const  General_polygon_with_holes_2& pol_wh) 
-    { return pol_wh.is_unbounded(); }  
-  };
-  
-  Is_unbounded construct_is_unbounded_object() { return Is_unbounded(); }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Handle_for.h b/3rdparty/CGAL-4.6/include/CGAL/Handle_for.h
deleted file mode 100644
index 202bde3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Handle_for.h
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright (c) 1999,2001,2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra, Sylvain Pion
- 
-#ifndef CGAL_HANDLE_FOR_H
-#define CGAL_HANDLE_FOR_H
-
-#include <CGAL/config.h>
-
-#include <boost/config.hpp>
-#include <CGAL/memory.h>
-#include <algorithm>
-#include <cstddef>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4345) // Avoid warning  http://msdn.microsoft.com/en-us/library/wewb47ee(VS.80).aspx
-#endif
-namespace CGAL {
-
-template <class T, class Alloc = CGAL_ALLOCATOR(T) >
-class Handle_for
-{
-    // Wrapper that adds the reference counter.
-    struct RefCounted {
-        T t;
-        unsigned int count;
-    };
-
-    typedef typename Alloc::template rebind<RefCounted>::other  Allocator;
-    typedef typename Allocator::pointer                         pointer;
-
-    static Allocator   allocator;
-    pointer            ptr_;
-
-public:
-
-    typedef T element_type;
-    
-    typedef std::ptrdiff_t Id_type ;
-
-    Handle_for()
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(); // we get the warning here
-        p->count = 1;
-        ptr_ = p;
-    }
-
-    Handle_for(const element_type& t)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(t);
-        p->count = 1;
-        ptr_ = p;
-    }
-
-#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
-    Handle_for(element_type && t)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(std::move(t));
-        p->count = 1;
-        ptr_ = p;
-    }
-#endif
-
-/* I comment this one for now, since it's preventing the automatic conversions
-   to take place.  We'll see if it's a problem later.
-    template < typename T1 >
-    Handle_for(const T1& t1)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) T(t1);
-        p->count = 1;
-        ptr_ = p;
-    }
-*/
-
-#if !defined CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES && !defined CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
-    template < typename T1, typename T2, typename... Args >
-    Handle_for(T1 && t1, T2 && t2, Args && ... args)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(std::forward<T1>(t1), std::forward<T2>(t2), std::forward<Args>(args)...);
-        p->count = 1;
-        ptr_ = p;
-    }
-#else
-    template < typename T1, typename T2 >
-    Handle_for(const T1& t1, const T2& t2)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(t1, t2);
-        p->count = 1;
-        ptr_ = p;
-    }
-
-    template < typename T1, typename T2, typename T3 >
-    Handle_for(const T1& t1, const T2& t2, const T3& t3)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(t1, t2, t3);
-        p->count = 1;
-        ptr_ = p;
-    }
-
-    template < typename T1, typename T2, typename T3, typename T4 >
-    Handle_for(const T1& t1, const T2& t2, const T3& t3, const T4& t4)
-    {
-        pointer p = allocator.allocate(1);
-        new (&(p->t)) element_type(t1, t2, t3, t4);
-        p->count = 1;
-        ptr_ = p;
-    }
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-    Handle_for(const Handle_for& h)
-      : ptr_(h.ptr_)
-    {
-	CGAL_assume (ptr_->count > 0);
-        ++(ptr_->count);
-    }
-
-    Handle_for&
-    operator=(const Handle_for& h)
-    {
-        Handle_for tmp = h;
-        swap(tmp);
-        return *this;
-    }
-
-    Handle_for&
-    operator=(const element_type &t)
-    {
-        if (is_shared())
-            *this = Handle_for(t);
-        else
-            ptr_->t = t;
-
-        return *this;
-    }
-
-#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
-    // Note : I don't see a way to make a useful move constructor, apart
-    //        from e.g. using NULL as a ptr value, but this is drastic.
-
-    Handle_for&
-    operator=(Handle_for && h)
-    {
-        swap(h);
-        return *this;
-    }
-
-    Handle_for&
-    operator=(element_type && t)
-    {
-        if (is_shared())
-            *this = Handle_for(std::move(t));
-        else
-            ptr_->t = std::move(t);
-
-        return *this;
-    }
-#endif
-
-    ~Handle_for()
-    {
-      if (--(ptr_->count) == 0) {
-          allocator.destroy( ptr_);
-          allocator.deallocate( ptr_, 1);
-      }
-    }
-
-    void
-    initialize_with(const element_type& t)
-    {
-        // kept for backward compatibility.  Use operator=(t) instead.
-        *this = t;
-    }
-
-    Id_type id() const { return Ptr() - static_cast<T const*>(0); }
-    
-    bool identical(const Handle_for& h) const { return Ptr() == h.Ptr(); }
-
-
-    // Ptr() is the "public" access to the pointer to the object.
-    // The non-const version asserts that the instance is not shared.
-    const element_type *
-    Ptr() const
-    {
-       return &(ptr_->t);
-    }
-
-    /*
-    // The assertion triggers in a couple of places, so I comment it for now.
-    T *
-    Ptr()
-    {
-      CGAL_assertion(!is_shared());
-      return &(ptr_->t);
-    }
-    */
-
-    bool
-    is_shared() const
-    {
-	return ptr_->count > 1;
-    }
-
-    bool
-    unique() const
-    {
-	return !is_shared();
-    }
-
-    long
-    use_count() const
-    {
-	return ptr_->count;
-    }
-
-    void
-    swap(Handle_for& h)
-    {
-      std::swap(ptr_, h.ptr_);
-    }
-
-protected:
-
-    void
-    copy_on_write()
-    {
-      if ( is_shared() ) Handle_for(ptr_->t).swap(*this);
-    }
-
-    // ptr() is the protected access to the pointer.  Both const and non-const.
-    // Redundant with Ptr().
-    element_type *
-    ptr()
-    { return &(ptr_->t); }
-
-    const element_type *
-    ptr() const
-    { return &(ptr_->t); }
-};
-
-
-template <class T, class Allocator>
-typename Handle_for<T, Allocator>::Allocator
-Handle_for<T, Allocator>::allocator;
-
-template <class T, class Allocator>
-inline
-void
-swap(Handle_for<T, Allocator> &h1, Handle_for<T, Allocator> &h2)
-{
-    h1.swap(h2);
-}
-
-template <class T, class Allocator>
-inline
-bool
-identical(const Handle_for<T, Allocator> &h1,
-          const Handle_for<T, Allocator> &h2)
-{
-    return h1.identical(h2);
-}
-
-template <class T> inline bool identical(const T &t1, const T &t2) { return &t1 == &t2; }
-
-template <class T, class Allocator>
-inline
-const T&
-get(const Handle_for<T, Allocator> &h)
-{
-    return *(h.Ptr());
-}
-
-template <class T>
-inline
-const T&
-get(const T &t)
-{
-    return t;
-}
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_HANDLE_FOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_2.h
deleted file mode 100644
index dd44202..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_2.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) 2011  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     :  Olivier Devillers
-
-#ifndef CGAL_HILBERT_SORT_MIDDLE_2_H
-#define CGAL_HILBERT_SORT_MIDDLE_2_H
-
-#include <CGAL/basic.h>
-#include <functional>
-#include <cstddef>
-#include <CGAL/Hilbert_sort_middle_base.h>
-#include <CGAL/Polygon_2_algorithms.h> 
-
-namespace CGAL {
-
-namespace internal {
-    template <class K, int x, bool up> struct Fixed_hilbert_cmp_2;
-
-    template <class K, int x>
-    struct Fixed_hilbert_cmp_2<K,x,true>
-        : public std::binary_function<typename K::Point_2,
-                                      typename K::Point_2, bool>
-    {
-        typedef typename K::Point_2 Point;
-        K k;
-	double value;
-        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
-        bool operator() (const Point &p) const
-        { 
-	  return ! Fixed_hilbert_cmp_2<K,x,false> (value, k) (p);
-        }
-    };
-    
-    template <class K>
-    struct Fixed_hilbert_cmp_2<K,0,false>
-        : public std::binary_function<typename K::Point_2,
-                                      typename K::Point_2, bool>
-    {
-        typedef typename K::Point_2 Point;
-        K k;
-	double value;
-        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
-        bool operator() (const Point &p) const
-        { 
-	  return to_double(k.compute_x_2_object()(p)) < value;
-        }
-    };
-    
-    template <class K>
-    struct Fixed_hilbert_cmp_2<K,1,false>
-        : public std::binary_function<typename K::Point_2,
-                                      typename K::Point_2, bool>
-    {
-        typedef typename K::Point_2 Point;
-        K k;
-	double value;
-        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
-        bool operator() (const Point &p) const
-        { 
-	  return to_double(k.compute_y_2_object()(p)) < value;
-        }
-    };
-}
-
-
-template <class K>
-class Hilbert_sort_middle_2
-{
-public:
-    typedef K Kernel;
-    typedef typename Kernel::Point_2 Point;
-    
-private:
-    Kernel _k;
-    std::ptrdiff_t _limit;
-
-    template <int x, bool up> struct Cmp : public internal::Fixed_hilbert_cmp_2<Kernel,x,up>
-      { Cmp (double v, const Kernel &k) : internal::Fixed_hilbert_cmp_2<Kernel,x,up> (v, k) {} };
-
-public:
-    Hilbert_sort_middle_2 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1)
-        : _k(k), _limit (limit)
-    {}
-
-    template <int x, bool upx, bool upy, class RandomAccessIterator>
-    void sort (RandomAccessIterator begin, RandomAccessIterator end,
-	       double xmin, double ymin, double xmax, double ymax) const
-    {
-        const int y = (x + 1) % 2;
-        if (end - begin <= _limit) return;
-
-	double xmed= (xmin+xmax)/2;
-	double ymed= (ymin+ymax)/2;
-
-        RandomAccessIterator m0 = begin, m4 = end;
-
-        RandomAccessIterator m2 = 
-	  internal::fixed_hilbert_split (m0, m4, Cmp< x,  upx> (xmed,_k));
-        RandomAccessIterator m1 = 
-	  internal::fixed_hilbert_split (m0, m2, Cmp< y,  upy> (ymed,_k));
-        RandomAccessIterator m3 = 
-	  internal::fixed_hilbert_split (m2, m4, Cmp< y, !upy> (ymed,_k));
-
-        sort<y, upy, upx> (m0, m1, ymin, xmin, ymed, xmed);
-        sort<x, upx, upy> (m1, m2, xmin, ymed, xmed, ymax);
-        sort<x, upx, upy> (m2, m3, xmed, ymed, xmax, ymax);
-        sort<y,!upy,!upx> (m3, m4, ymed, xmax, ymin, xmed);
-    }
-
-    template <class RandomAccessIterator>
-    void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
-    {
-      Bbox_2 box=bbox_2(begin, end);
-      sort <0, false, false> (begin, end, 
-			      box.xmin(), box.ymin(), box.xmax(), box.ymax());
-    }
-};
-
-
-} // namespace CGAL
-
-#endif//CGAL_HILBERT_SORT_MIDDLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Aff_transformationH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Aff_transformationH3.h
deleted file mode 100644
index 25d5589..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Aff_transformationH3.h
+++ /dev/null
@@ -1,899 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_AFF_TRANSFORMATIONH3_H
-#define CGAL_AFF_TRANSFORMATIONH3_H
-
-#include <CGAL/Handle_for_virtual.h>
-#include <CGAL/determinant.h>
-#include <CGAL/aff_transformation_tags.h>
-#include <ostream>
-
-namespace CGAL {
-
-// forward declaration
-template < class R >
-class Aff_transformationH3;
-
-template < class R >
-class Aff_transformation_repH3;
-
-template < class R >
-std::ostream &
-operator<< ( std::ostream & out,
-             const Aff_transformationH3<R>& t);
-
-template < class R >
-Aff_transformationH3<R>
-_general_transformation_composition (
-                           Aff_transformation_repH3<R> l,
-                           Aff_transformation_repH3<R> r);
-
-template <class R_ >
-class Aff_transformation_rep_baseH3 : public Ref_counted_virtual
-// abstract base class of aff transformation representations
-{
-public:
-  typedef R_                         R;
-  typedef typename R::FT             FT;
-  typedef typename R::RT             RT;
-  typedef typename R::Point_3        Point_3;
-  typedef typename R::Vector_3       Vector_3;
-  typedef typename R::Direction_3    Direction_3;
-  typedef typename R::Plane_3        Plane_3;
-  typedef typename R::Aff_transformation_3 Aff_transformation_3;
-
-  virtual  ~Aff_transformation_rep_baseH3(){}
-
-  virtual  Point_3
-           transform(const Point_3&) const = 0;
-
-  virtual  Vector_3
-           transform(const Vector_3&) const = 0;
-
-  virtual  Direction_3
-           transform(const Direction_3&) const = 0;
-
-  virtual  Plane_3
-           transform(const Plane_3&) const = 0;
-
-  virtual  Aff_transformation_3
-           inverse() const = 0;
-
-  virtual  Aff_transformation_3
-           transpose() const = 0;
-
-  virtual  Aff_transformation_repH3<R>
-           general_form() const = 0;
-
-  virtual  bool
-           is_even() const = 0;
-
-  virtual  RT
-           homogeneous(int i, int j) const = 0;
-
-  virtual  FT
-           cartesian(int i, int j) const = 0;
-};
-
-template < class R_ >
-class Aff_transformation_repH3 : public Aff_transformation_rep_baseH3<R_>
-{
-  typedef typename R_::FT           FT;
-  typedef typename R_::RT           RT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-public:
-  typedef R_                       R;
-
-  Aff_transformation_repH3() {}
-
-  Aff_transformation_repH3(
-                 const RT& m00, const RT& m01, const RT& m02, const RT& m03,
-                 const RT& m10, const RT& m11, const RT& m12, const RT& m13,
-                 const RT& m20, const RT& m21, const RT& m22, const RT& m23,
-                                                              const RT& m33);
-  virtual  ~Aff_transformation_repH3() {}
-
-  virtual  Point_3
-           transform(const Point_3& p) const;
-
-  virtual  Vector_3
-           transform(const Vector_3& v) const;
-
-  virtual  Direction_3
-           transform(const Direction_3& dir) const;
-
-  virtual  Plane_3
-           transform(const Plane_3& pl) const;
-
-  virtual  Aff_transformation_3
-           inverse() const;
-
-  virtual  Aff_transformation_repH3<R>
-           general_form() const;
-
-  virtual  Aff_transformation_3
-           transpose() const;
-
-  virtual  bool
-           is_even() const;
-
-  virtual  RT
-           homogeneous(int i, int j) const ;
-
-  virtual  FT
-           cartesian(int i, int j) const ;
-
-  friend class Aff_transformationH3<R>;
-
-  friend
-  Aff_transformationH3<R>
-  _general_transformation_composition <> (
-                           Aff_transformation_repH3<R> l,
-                           Aff_transformation_repH3<R> r);
-
-  friend
-  std::ostream &
-  operator<< <> (std::ostream & out, const Aff_transformationH3<R>& t);
-
-private:
-    RT   t00, t01, t02, t03;
-    RT   t10, t11, t12, t13;
-    RT   t20, t21, t22, t23;
-    RT                  t33;
-};
-
-template < class R_ >
-class Identity_repH3 : public Aff_transformation_rep_baseH3<R_>
-{
-  typedef typename R_::RT    RT;
-  typedef typename R_::FT    FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-public:
-  typedef R_                R;
-
-           Identity_repH3()
-           {}
-
-  virtual  ~Identity_repH3()
-           {}
-
-  virtual  Point_3
-           transform(const Point_3& p) const
-           { return p; }
-
-  virtual  Vector_3
-           transform(const Vector_3& v) const
-           { return v; }
-
-  virtual  Direction_3
-           transform(const Direction_3& dir) const
-           { return dir; }
-
-  virtual  Plane_3
-           transform(const Plane_3& pl) const
-           { return pl; }
-
-  virtual  Aff_transformation_3
-           inverse() const
-           { return Aff_transformation_3( IDENTITY); }
-
-  virtual  Aff_transformation_repH3<R>
-           general_form() const;
-
-  virtual  Aff_transformation_3
-           transpose() const
-           { return Aff_transformation_3( IDENTITY); }
-
-  virtual  bool
-           is_even() const
-           { return true; }
-
-  virtual  RT
-           homogeneous(int i, int j) const
-           { return (i==j) ? RT(1) : RT(0); }
-
-  virtual  FT
-           cartesian(int i, int j) const
-           { return (i==j) ? FT(1) : FT(0); }
-};
-
-template < class R_ >
-class Translation_repH3 : public Aff_transformation_rep_baseH3<R_>
-{
-  typedef typename R_::FT       FT;
-  typedef typename R_::RT       RT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-public:
-  typedef R_                    R;
-
-           Translation_repH3( const Vector_3& v);
-
-  virtual  ~Translation_repH3() {}
-
-
-  virtual  Point_3
-           transform(const Point_3& p) const;
-
-  virtual  Vector_3
-           transform(const Vector_3& v) const;
-
-  virtual  Direction_3
-           transform(const Direction_3& dir) const;
-
-  virtual  Plane_3
-           transform(const Plane_3& pl) const;
-
-  virtual  Aff_transformation_3
-           inverse() const;
-
-  virtual  Aff_transformation_repH3<R>
-           general_form() const;
-
-  virtual  Aff_transformation_3
-           transpose() const;
-
-  virtual  bool
-           is_even() const;
-
-  virtual  RT
-           homogeneous(int i, int j) const ;
-
-  virtual  FT
-           cartesian(int i, int j) const ;
-
-friend class Aff_transformationH3<R>;
-
-private:
-  Vector_3  tv;
-};
-
-template < class R_ >
-class Aff_transformationH3
-  : public Handle_for_virtual< Aff_transformation_rep_baseH3<R_> >
-{
-  typedef typename R_::RT                   RT;
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Direction_3          Direction_3;
-  typedef typename R_::Plane_3              Plane_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-  typedef  Handle_for_virtual< Aff_transformation_rep_baseH3<R_> > Base;
-  using Base::initialize_with;
-public:
-  typedef R_                R;
-
-  Aff_transformationH3();
-
-  // Identity
-  Aff_transformationH3(const Identity_transformation&);
-
-  // Translation
-  Aff_transformationH3(const Translation& , const Vector_3& v);
-
-  //  Scaling
-  Aff_transformationH3(const Scaling&, const RT& num, const RT& den);
-
-  //  General form
-  Aff_transformationH3(
-                  const RT& m00, const RT& m01, const RT& m02, const RT& m03,
-                  const RT& m10, const RT& m11, const RT& m12, const RT& m13,
-                  const RT& m20, const RT& m21, const RT& m22, const RT& m23,
-                                                               const RT& m33);
-  Aff_transformationH3(
-                  const RT& m00, const RT& m01, const RT& m02,
-                  const RT& m10, const RT& m11, const RT& m12,
-                  const RT& m20, const RT& m21, const RT& m22,
-                                                               const RT& m33);
-
-  Point_3
-  transform(const Point_3& p) const;
-
-  Vector_3
-  transform(const Vector_3& v) const;
-
-  Direction_3
-  transform(const Direction_3& d) const;
-
-  Plane_3
-  transform(const Plane_3& pl) const;
-
-  Aff_transformation_3
-  inverse()   const;
-
-  Aff_transformationH3<R>
-  transpose() const;
-
-  bool
-  is_even()   const;
-
-  bool
-  is_odd()    const;
-
-  FT
-  cartesian(int i, int j) const
-  { return this->Ptr()->cartesian(i,j); }
-
-  RT
-  homogeneous(int i, int j) const
-  { return this->Ptr()->homogeneous(i,j); }
-
-  FT
-  m(int i, int j) const
-  { return this->Ptr()->cartesian(i,j); }
-
-  RT
-  hm(int i, int j) const
-  { return this->Ptr()->homogeneous(i,j); }
-};
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformation_repH3<R>::Aff_transformation_repH3(
-                   const RT& m00, const RT& m01, const RT& m02, const RT& m03,
-                   const RT& m10, const RT& m11, const RT& m12, const RT& m13,
-                   const RT& m20, const RT& m21, const RT& m22, const RT& m23,
-                                                                const RT& m33)
-  :  t00(m00), t01(m01), t02(m02), t03(m03),
-     t10(m10), t11(m11), t12(m12), t13(m13),
-     t20(m20), t21(m21), t22(m22), t23(m23),
-                                   t33(m33)
-{}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Point_3
-Aff_transformation_repH3<R>::
-transform(const typename Aff_transformation_repH3<R>::Point_3& p) const
-{
-  return Point_3(t00 * p.hx() + t01 * p.hy() + t02 * p.hz() + t03 * p.hw(),
-                 t10 * p.hx() + t11 * p.hy() + t12 * p.hz() + t13 * p.hw(),
-                 t20 * p.hx() + t21 * p.hy() + t22 * p.hz() + t23 * p.hw(),
-                 t33 * p.hw());
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Vector_3
-Aff_transformation_repH3<R>::
-transform(const typename Aff_transformation_repH3<R>::Vector_3& v) const
-{
-  return Vector_3(t00 * v.hx() + t01 * v.hy() + t02 * v.hz(),
-                  t10 * v.hx() + t11 * v.hy() + t12 * v.hz(),
-                  t20 * v.hx() + t21 * v.hy() + t22 * v.hz(),
-                  t33 * v.hw() );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Direction_3
-Aff_transformation_repH3<R>::
-transform(const typename Aff_transformation_repH3<R>::Direction_3& d) const
-{
-    if (t33 > RT(0))
-        return Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
-                           t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
-                           t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
-    else
-        return - Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
-                             t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
-                             t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Plane_3
-Aff_transformation_repH3<R>::
-transform(const typename Aff_transformation_repH3<R>::Plane_3& pl) const
-{
-  if ( is_even() )
-  {
-      return Plane_3(
-               transform(pl.point() ),
-               transpose().inverse().transform(pl.orthogonal_direction() ));
-  }
-  else
-  {
-     return Plane_3(
-               transform(pl.point() ),
-               -(transpose().inverse().transform(pl.orthogonal_direction() )));
-  }
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Aff_transformation_3
-Aff_transformation_repH3<R>::inverse() const
-{
-  typedef typename R::RT RT;
-  const RT  RT0(0);
-  return Aff_transformation_3(
-                           determinant( t11, t12, t13,
-                                                   t21, t22, t23,     // i 00
-                                                   RT0, RT0, t33 ),
-
-                        -  determinant( t01, t02, t03,
-                                                   t21, t22, t23,     // i 01
-                                                   RT0, RT0, t33 ),
-
-                           determinant( t01, t02, t03,
-                                                   t11, t12, t13,     // i 02
-                                                   RT0, RT0, t33 ),
-
-                        -  determinant( t01, t02, t03,
-                                                   t11, t12, t13,     // i 03
-                                                   t21, t22, t23 ),
-
-
-                        -  determinant( t10, t12, t13,
-                                                   t20, t22, t23,     // i 10
-                                                   RT0, RT0, t33 ),
-
-                           determinant( t00, t02, t03,
-                                                   t20, t22, t23,     // i 11
-                                                   RT0, RT0, t33 ),
-
-                        -  determinant( t00, t02, t03,
-                                                   t10, t12, t13,     // i 12
-                                                   RT0, RT0, t33 ),
-
-                           determinant( t00, t02, t03,
-                                                   t10, t12, t13,     // i 13
-                                                   t20, t22, t23 ),
-
-
-                           determinant( t10, t11, t13,
-                                                   t20, t21, t23,     // i 20
-                                                   RT0, RT0, t33 ),
-
-                        -  determinant( t00, t01, t03,
-                                                   t20, t21, t23,     // i 21
-                                                   RT0, RT0, t33 ),
-
-                           determinant( t00, t01, t03,
-                                                   t10, t11, t13,     // i 22
-                                                   RT0, RT0, t33 ),
-
-                        -  determinant( t00, t01, t03,
-                                                   t10, t11, t13,     // i 23
-                                                   t20, t21, t23 ),
-
-
-                           determinant( t00, t01, t02,
-                                                   t10, t11, t12,     // i 33
-                                                   t20, t21, t22 )
-                                                       ) ;
-}
-
-template < class R >
-inline
-Aff_transformation_repH3<R>
-Aff_transformation_repH3<R>::general_form() const
-{ return *this; }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Aff_transformation_repH3<R>::Aff_transformation_3
-Aff_transformation_repH3<R>::transpose() const
-{
-  typedef typename R::RT RT;
-  const RT  RT0(0);
-  return Aff_transformation_3( t00,    t10,    t20,    RT0,
-                               t01,    t11,    t21,    RT0,
-                               t02,    t12,    t22,    RT0,
-                                                              t33);
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-Aff_transformation_repH3<R>::is_even() const
-{
-  return (CGAL_NTS sign<RT>( t33 *
-	                    determinant(t00, t01, t02,
-                                              t10, t11, t12,
-                                              t20, t21, t22 ) ) == POSITIVE );
-}
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-typename Aff_transformation_repH3<R>::RT
-Aff_transformation_repH3<R>::
-homogeneous(int i, int j) const
-{
-  typedef typename R::RT RT;
-  CGAL_kernel_precondition( (i >= 0) && (i <= 3) && (j >= 0) && (j <= 3) );
-  const RT  RT0(0);
-  switch (i)
-  {
-    case 0: switch (j)
-            {
-              case 0: return t00;
-              case 1: return t01;
-              case 2: return t02;
-              case 3: return t03;
-            }
-    case 1: switch (j)
-            {
-              case 0: return t10;
-              case 1: return t11;
-              case 2: return t12;
-              case 3: return t13;
-            }
-    case 2: switch (j)
-            {
-              case 0: return t20;
-              case 1: return t21;
-              case 2: return t22;
-              case 3: return t23;
-            }
-    case 3: switch (j)
-            {
-              case 0: return RT0;
-              case 1: return RT0;
-              case 2: return RT0;
-              case 3: return t33;
-            }
-  }
-  return RT0;
-}
-
-template < class R >
-inline
-typename Aff_transformation_repH3<R>::FT
-Aff_transformation_repH3<R>::
-cartesian(int i, int j) const
-{
-  typedef typename R::FT FT;
-  return  FT(homogeneous(i,j)) / FT(t33);
-}
-
-template <class R>
-Aff_transformation_repH3<R>
-Identity_repH3<R>::general_form() const
-{
-  typedef typename R::RT RT;
-  const RT  RT0(0);
-  const RT  RT1(1);
-  return Aff_transformation_repH3<R>(RT1, RT0, RT0, RT0,
-                                         RT0, RT1, RT0, RT0,
-                                         RT0, RT0, RT1, RT0,
-                                                        RT1 );
-}
-
-template < class R >
-inline
-Translation_repH3<R>::
-Translation_repH3( const typename Translation_repH3<R>::Vector_3& v)
- : tv(v)
-{}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Translation_repH3<R>::Point_3
-Translation_repH3<R>::
-transform(const typename Translation_repH3<R>::Point_3& p) const
-{
-  return Point_3( tv.hw() * p.hx() + tv.hx() * p.hw(),
-                  tv.hw() * p.hy() + tv.hy() * p.hw(),
-                  tv.hw() * p.hz() + tv.hz() * p.hw(),
-                  tv.hw() * p.hw() );
-}
-
-template < class R >
-inline
-typename Translation_repH3<R>::Vector_3
-Translation_repH3<R>::
-transform(const typename Translation_repH3<R>::Vector_3& v) const
-{ return v; }
-
-template < class R >
-inline
-typename Translation_repH3<R>::Direction_3
-Translation_repH3<R>::
-transform(const typename Translation_repH3<R>::Direction_3& dir) const
-{ return dir; }
-
-template < class R >
-inline
-typename Translation_repH3<R>::Plane_3
-Translation_repH3<R>::
-transform(const typename Translation_repH3<R>::Plane_3& pl) const
-{
-  return Plane_3( transform( pl.point() ), pl.orthogonal_vector() );
-}
-
-template < class R >
-inline
-typename Translation_repH3<R>::Aff_transformation_3
-Translation_repH3<R>::inverse() const
-{ return Aff_transformation_3(TRANSLATION, - tv ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformation_repH3<R>
-Translation_repH3<R>::general_form() const
-{
-  const RT  RT0(0);
-  return Aff_transformation_repH3<R>(tv.hw(), RT0,  RT0,  tv.hx(),
-                                         RT0,  tv.hw(), RT0,  tv.hy(),
-                                         RT0,  RT0,  tv.hw(), tv.hz(),
-                                                              tv.hw() );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename Translation_repH3<R>::Aff_transformation_3
-Translation_repH3<R>::transpose() const
-{
-  typedef typename R::RT RT;
-  const RT  RT0(0);
-  const RT  RT1(1);
-  return Aff_transformation_3( RT1,  RT0,  RT0,  RT0,
-                               RT0,  RT1,  RT0,  RT0,
-                               RT0,  RT0,  RT1,  RT0,
-                               RT1 );
-}
-
-template < class R >
-inline
-bool
-Translation_repH3<R>::is_even() const
-{ return true; }
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-typename Translation_repH3<R>::RT
-Translation_repH3<R>::homogeneous(int i, int j) const
-{
-  CGAL_kernel_precondition( (i >= 0) && (i <= 3) && (j >= 0) && (j <= 3) );
-  const RT  RT0(0);
-  switch (i)
-  {
-    case 0: switch (j)
-            {
-              case 0: return tv.hw();
-              case 1: return RT0;
-              case 2: return RT0;
-              case 3: return tv.hx();
-            }
-    case 1: switch (j)
-            {
-              case 0: return RT0;
-              case 1: return tv.hw();
-              case 2: return RT0;
-              case 3: return tv.hy();
-            }
-    case 2: switch (j)
-            {
-              case 0: return RT0;
-              case 1: return RT0;
-              case 2: return tv.hw();
-              case 3: return tv.hz();
-            }
-    case 3: switch (j)
-            {
-              case 0: return RT0;
-              case 1: return RT0;
-              case 2: return RT0;
-              case 3: return tv.hw();
-            }
-  }
-  return RT0;
-}
-
-template < class R >
-inline
-typename Translation_repH3<R>::FT
-Translation_repH3<R>::
-cartesian(int i, int j) const
-{
-  return FT(homogeneous(i,j)) / FT(tv.hw());
-}
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>
-_general_transformation_composition(
-    Aff_transformation_repH3<R> l,
-    Aff_transformation_repH3<R> r )
-{
-  return Aff_transformationH3<R>(
-            l.t00*r.t00 + l.t01*r.t10 + l.t02*r.t20,
-            l.t00*r.t01 + l.t01*r.t11 + l.t02*r.t21,
-            l.t00*r.t02 + l.t01*r.t12 + l.t02*r.t22,
-            l.t00*r.t03 + l.t01*r.t13 + l.t02*r.t23 + l.t03*r.t33,
-
-            l.t10*r.t00 + l.t11*r.t10 + l.t12*r.t20,
-            l.t10*r.t01 + l.t11*r.t11 + l.t12*r.t21,
-            l.t10*r.t02 + l.t11*r.t12 + l.t12*r.t22,
-            l.t10*r.t03 + l.t11*r.t13 + l.t12*r.t23 + l.t13*r.t33,
-
-            l.t20*r.t00 + l.t21*r.t10 + l.t22*r.t20,
-            l.t20*r.t01 + l.t21*r.t11 + l.t22*r.t21,
-            l.t20*r.t02 + l.t21*r.t12 + l.t22*r.t22,
-            l.t20*r.t03 + l.t21*r.t13 + l.t22*r.t23 + l.t23*r.t33,
-
-            l.t33*r.t33 );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::Aff_transformationH3()
-{ initialize_with(Aff_transformation_repH3<R>()); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::
-Aff_transformationH3(const Identity_transformation&)
-{ initialize_with(Identity_repH3<R>()); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::
-Aff_transformationH3(const Translation&,
-	             const typename Aff_transformationH3<R>::Vector_3& v)
-{ initialize_with(Translation_repH3<R>( v )); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::
-Aff_transformationH3(const Scaling&, const RT& num, const RT& den)
-{
-  const RT RT0(0);
-  initialize_with(Aff_transformation_repH3<R>(num, RT0, RT0, RT0,
-                                            RT0, num, RT0, RT0,
-                                            RT0, RT0, num, RT0,
-                                                           den ));
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::
-Aff_transformationH3(
-                  const RT& m00, const RT& m01, const RT& m02, const RT& m03,
-                  const RT& m10, const RT& m11, const RT& m12, const RT& m13,
-                  const RT& m20, const RT& m21, const RT& m22, const RT& m23,
-                                                               const RT& m33)
-{
-  initialize_with(Aff_transformation_repH3<R>(m00, m01, m02, m03,
-                                            m10, m11, m12, m13,
-                                            m20, m21, m22, m23,
-                                                           m33 ));
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>::
-Aff_transformationH3(
-                  const RT& m00, const RT& m01, const RT& m02,
-                  const RT& m10, const RT& m11, const RT& m12,
-                  const RT& m20, const RT& m21, const RT& m22,
-                                                               const RT& m33)
-{
-  const RT RT0 = RT(0);
-  initialize_with(Aff_transformation_repH3<R>(m00, m01, m02, RT0,
-                                            m10, m11, m12, RT0,
-                                            m20, m21, m22, RT0,
-                                                           m33 ));
-}
-
-template < class R >
-inline
-typename Aff_transformationH3<R>::Point_3
-Aff_transformationH3<R>::
-transform(const typename Aff_transformationH3<R>::Point_3& p) const
-{ return this->Ptr()->transform(p); }
-
-template < class R >
-inline
-typename Aff_transformationH3<R>::Vector_3
-Aff_transformationH3<R>::
-transform(const typename Aff_transformationH3<R>::Vector_3& v) const
-{ return this->Ptr()->transform(v); }
-
-template < class R >
-inline
-typename Aff_transformationH3<R>::Direction_3
-Aff_transformationH3<R>::
-transform(const typename Aff_transformationH3<R>::Direction_3& d) const
-{ return this->Ptr()->transform(d); }
-
-template < class R >
-inline
-typename Aff_transformationH3<R>::Plane_3
-Aff_transformationH3<R>::
-transform(const typename Aff_transformationH3<R>::Plane_3& pl) const
-{ return this->Ptr()->transform(pl); }
-
-template < class R >
-inline
-typename Aff_transformationH3<R>::Aff_transformation_3
-Aff_transformationH3<R>::inverse() const
-{ return this->Ptr()->inverse(); }
-
-template < class R >
-inline
-Aff_transformationH3<R>
-Aff_transformationH3<R>::transpose() const
-{ return this->Ptr()->transpose(); }
-
-template < class R >
-inline
-bool
-Aff_transformationH3<R>::is_even() const
-{ return this->Ptr()->is_even(); }
-
-template < class R >
-inline
-bool
-Aff_transformationH3<R>::is_odd() const
-{ return ( ! (this->Ptr()->is_even() )); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Aff_transformationH3<R>
-operator*(const Aff_transformationH3<R>& left_argument,
-          const Aff_transformationH3<R>& right_argument )
-{
- return _general_transformation_composition(
-              left_argument.Ptr() ->general_form(),
-              right_argument.Ptr()->general_form() );
-}
-
-template < class R >
-std::ostream &
-operator<< ( std::ostream & out,
-             const Aff_transformationH3<R>& t)
-{
- typename R::RT RT0(0);
- Aff_transformation_repH3<R> r = t.Ptr()->general_form();
- return  out
- << "| "<< r.t00 <<' '<< r.t01 <<' '<< r.t02 <<' '<< r.t03 << " |\n"
- << "| "<< r.t10 <<' '<< r.t11 <<' '<< r.t12 <<' '<< r.t13 << " |\n"
- << "| "<< r.t20 <<' '<< r.t21 <<' '<< r.t22 <<' '<< r.t23 << " |\n"
- << "| "<< RT0   <<' '<< RT0   <<' '<< RT0   <<' '<< r.t33 << " |\n";
-}
-
-} //namespace CGAL
-
-#endif // CGAL_AFF_TRANSFORMATIONH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/CircleH2.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/CircleH2.h
deleted file mode 100644
index c5ce9c1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/CircleH2.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sven Schoenherr
-//                 Stefan Schirra
-
-#ifndef CGAL_CIRCLEH2_H
-#define CGAL_CIRCLEH2_H
-
-#include <CGAL/Interval_nt.h>
-#include <boost/tuple/tuple.hpp>
-
-namespace CGAL {
-
-template <class R_>
-class CircleH2
-{
-    typedef typename R_::FT                   FT;
-    typedef typename R_::RT                   RT;
-    typedef typename R_::Point_2              Point_2;
-
-    typedef boost::tuple<Point_2, FT, Orientation>   Rep;
-    typedef typename R_::template Handle<Rep>::type  Base;
-
-    Base base;
-
-public:
-    typedef R_                                    R;
-
-    CircleH2() {}
-
-    CircleH2(const Point_2& p, const Point_2& q, const Point_2& r)
-    {
-      Orientation o = CGAL::orientation( p, q, r);
-      CGAL_kernel_precondition( o != COLLINEAR);
-
-      Point_2    cp   = circumcenter( p, q, r);
-      FT         sq_r = squared_distance( p, cp);
-
-      base = Rep(cp, sq_r, o);
-    }
-
-    CircleH2(const Point_2& p, const Point_2& q, const Orientation& o)
-    {
-      CGAL_kernel_precondition( o != COLLINEAR);
-
-      if ( p != q)
-      {
-         Point_2    cp   = midpoint( p, q);
-         FT         sq_r = squared_distance( cp, p);
-         base = Rep(cp, sq_r, o);
-      }
-      else
-         base = Rep(p, FT( 0), o);
-    }
-
-    CircleH2(const Point_2& cp, const FT& squared_radius,
-             const Orientation& o)
-    {
-      CGAL_precondition( ( ! CGAL_NTS is_negative( squared_radius)) &&
-                         ( o != COLLINEAR ) );
-      base = Rep(cp, squared_radius, o);
-    }
-
-    const Point_2 &
-    center() const;
-
-    Orientation
-    orientation() const;
-
-    const FT &
-    squared_radius() const;
-
-    CircleH2<R>
-    opposite() const;
-
-    Oriented_side
-    oriented_side(const Point_2& ) const;
-
-    Bounded_side
-    bounded_side(const Point_2& ) const;
-
-    bool  operator==( const CircleH2<R>& ) const;
-    bool  operator!=( const CircleH2<R>& ) const;
-    bool  has_on_positive_side(const Point_2& ) const;
-    bool  has_on_negative_side(const Point_2& ) const;
-    bool  has_on_boundary( const Point_2& ) const;
-    bool  has_on_bounded_side( const Point_2& ) const;
-    bool  has_on_unbounded_side(const Point_2&) const;
-    bool  is_degenerate() const;
-
-    // bool  oriented_equal( const CircleH2<R>& ) const;
-    // bool  unoriented_equal( const CircleH2<R>& ) const;
-};
-
-template <class R>
-inline
-const typename CircleH2<R>::Point_2 &
-CircleH2<R>::center() const
-{ return get(base).template get<0>(); }
-
-template <class R>
-inline
-const typename CircleH2<R>::FT &
-CircleH2<R>::squared_radius() const
-{ return get(base).template get<1>(); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-CircleH2<R>
-CircleH2<R>::opposite() const
-{
-  return CircleH2<R>( center(),
-                          squared_radius(),
-                          CGAL::opposite( orientation() ) );
-}
-
-template <class R>
-inline
-Orientation
-CircleH2<R>::orientation() const
-{ return get(base).template get<2>(); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-Oriented_side
-CircleH2<R>::oriented_side( const typename CircleH2<R>::Point_2& p) const
-{
-  FT sq_dist = squared_distance( p, center() );
-  FT sq_rad  = squared_radius();
-  Comparison_result vgl = CGAL_NTS compare( sq_dist, sq_rad );
-  Oriented_side rel_pos = (vgl == LARGER ) ?
-                                   ON_NEGATIVE_SIDE :
-                                   ( (vgl == SMALLER ) ?
-                                          ON_POSITIVE_SIDE :
-                                          ON_ORIENTED_BOUNDARY);
-  if (orientation() == POSITIVE)
-  { return rel_pos; }
-  else       // NEGATIVE
-  { return CGAL::opposite( rel_pos ); }
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::has_on_positive_side(const typename CircleH2<R>::Point_2& p) const
-{
-  if ( orientation() == POSITIVE )
-  { return (has_on_bounded_side(p) ); }
-  else
-  { return (has_on_unbounded_side(p) ); }
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::has_on_boundary(const typename CircleH2<R>::Point_2& p) const
-{
-  FT sq_dist = squared_distance( p, center() );
-  FT sq_rad  = squared_radius();
-  return ( sq_dist == sq_rad );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::has_on_negative_side( const typename CircleH2<R>::Point_2&p) const
-{
-  if ( orientation() == NEGATIVE )
-  {
-      return (has_on_bounded_side(p) );
-  }
-  else
-  {
-      return (has_on_unbounded_side(p) );
-  }
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-Bounded_side
-CircleH2<R>::bounded_side(const typename CircleH2<R>::Point_2& p) const
-{
-  FT sq_dist = squared_distance( p, center() );
-  FT sq_rad  = squared_radius();
-  Comparison_result vgl = CGAL_NTS compare( sq_dist, sq_rad );
-  return  (vgl == LARGER ) ? ON_UNBOUNDED_SIDE :
-                                   ( (vgl == SMALLER ) ?
-                                          ON_BOUNDED_SIDE :
-                                          ON_BOUNDARY);
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::has_on_bounded_side(const typename CircleH2<R>::Point_2& p) const
-{
-  FT sq_dist = squared_distance( p, center() );
-  FT sq_rad  = squared_radius();
-  return ( sq_dist < sq_rad );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::has_on_unbounded_side(const typename CircleH2<R>::Point_2&p) const
-{
-  FT sq_dist = squared_distance( p, center() );
-  FT sq_rad  = squared_radius();
-  return ( sq_rad < sq_dist );
-}
-
-template <class R>
-inline
-bool
-CircleH2<R>::is_degenerate() const
-{ return ( squared_radius() == FT(0) ); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-CircleH2<R>::operator==(const CircleH2<R>& c) const
-{
-  return  ( center() == c.center() )
-        &&( squared_radius() == c.squared_radius() )
-        &&( orientation() == c.orientation() );
-}
-
-template <class R>
-inline
-bool
-CircleH2<R>::operator!=(const CircleH2<R>& c) const
-{ return !(*this == c); }
-
-} //namespace CGAL
-
-#endif // CGAL_CIRCLEH2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH2.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH2.h
deleted file mode 100644
index 4ccd961..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH2.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-#ifndef CGAL_HOMOGENEOUS_DIRECTION_2_H
-#define CGAL_HOMOGENEOUS_DIRECTION_2_H
-
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/kernel_config.h>
-#include <CGAL/number_type_basic.h>
-
-namespace CGAL {
-
-template < class R_ >
-class DirectionH2
-{
-  typedef DirectionH2<R_>                   Self;
-  typedef typename R_::FT                   FT;
-  typedef typename R_::RT                   RT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Vector_2             Vector_2;
-  typedef typename R_::Line_2               Line_2;
-  typedef typename R_::Ray_2                Ray_2;
-  typedef typename R_::Segment_2            Segment_2;
-
-  typedef cpp11::array<RT, 3>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-
-  typedef R_                                    R;
-
-  typedef const RT& Homogeneous_coordinate_type;
-
-  const Self&
-  rep() const
-  {
-    return static_cast<const Self& >(*this);
-  }
-  
-   DirectionH2() {}
-
-   DirectionH2(const RT& x, const RT& y)
-      : base(CGAL::make_array(x, y, RT(1))) {}
-
-   // TODO Not documented : should not exist, not used.
-   // we should also change array<RT, 3> -> array<RT, 2>
-   DirectionH2(const RT& x, const RT& y, const RT& w )
-     : base( w > RT(0) ? CGAL::make_array(x, y, w)
-                       : CGAL::make_array<RT>(-x, -y, -w) ) {}
-
-    bool    operator==( const DirectionH2<R>& d) const;
-    bool    operator!=( const DirectionH2<R>& d) const;
-
-
-    Vector_2       to_vector() const;
-
-    const RT & x() const { return CGAL::get(base)[0]; }
-    const RT & y() const { return CGAL::get(base)[1]; }
-
-    const RT & delta(int i) const;
-    const RT & dx() const { return CGAL::get(base)[0]; }
-    const RT & dy() const { return CGAL::get(base)[1]; }
-
-};
-
-template <class R >
-CGAL_KERNEL_INLINE
-bool
-DirectionH2<R>::operator==( const DirectionH2<R>& d) const
-{
-  return (  ( x() * d.y() == y() * d.x() )
-          &&( CGAL_NTS sign( x() ) == CGAL_NTS sign( d.x() ) )
-          &&( CGAL_NTS sign( y() ) == CGAL_NTS sign( d.y() ) ) );
-}
-
-template <class R >
-inline
-bool
-DirectionH2<R>::operator!=( const DirectionH2<R>& d) const
-{ return !(*this == d); }
-
-} //namespace CGAL
-
-#include <CGAL/Homogeneous/predicates_on_directionsH2.h>
-
-namespace CGAL {
-
-template <class R >
-CGAL_KERNEL_INLINE
-typename DirectionH2<R>::Vector_2
-DirectionH2<R>::to_vector() const
-{ return Vector_2(dx(), dy()); }
-
-} //namespace CGAL
-
-#endif // CGAL_HOMOGENEOUS_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH3.h
deleted file mode 100644
index 142449e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/DirectionH3.h
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-#ifndef CGAL_HOMOGENEOUS_DIRECTION_3_H
-#define CGAL_HOMOGENEOUS_DIRECTION_3_H
-
-#include <CGAL/kernel_config.h>
-#include <CGAL/array.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/number_utils.h>
-namespace CGAL {
-
-template < class R_ >
-class DirectionH3
-{
-   typedef typename R_::RT                   RT;
-   typedef typename R_::FT                   FT;
-   typedef typename R_::Point_3              Point_3;
-   typedef typename R_::Vector_3             Vector_3;
-   typedef typename R_::Segment_3            Segment_3;
-   typedef typename R_::Line_3               Line_3;
-   typedef typename R_::Ray_3                Ray_3;
-
-    typedef cpp11::array<RT, 4>              Rep;
-    typedef typename R_::template Handle<Rep>::type  Base;
- 
-    Base base;
-
-public:
-
-    typedef R_                 R;
-
-  DirectionH3() {}
-
-  //DirectionH3(const Point_3 & p )
-    //: base(p) {}
-
-  DirectionH3(const Vector_3 & v )
-  { *this = v.direction(); }
-
-  DirectionH3(const Line_3 & l )
-  { *this = l.rep().direction(); }
-
-  DirectionH3(const Ray_3 & r )
-  { *this = r.direction(); }
-
-  DirectionH3(const Segment_3 & s )
-  { *this = s.direction(); }
-
-  // the fourth argument is not documented.  Should go away ?
-  DirectionH3(const RT& x, const RT& y,
-              const RT& z, const RT& w = RT(1) )
-    : base( w >= RT(0) ? CGAL::make_array(x, y, z, w)
-                       : CGAL::make_array<RT>(-x, -y, -z, -w) ) {}
-
-  bool  is_degenerate() const;
-
-  bool  operator==( const DirectionH3<R>& d) const;
-  bool  operator!=( const DirectionH3<R>& d) const;
-
-  Vector_3    to_vector() const;
-  Vector_3    vector() const { return to_vector(); }
-
-  const RT & dx() const { return get(base)[0]; }
-  const RT & dy() const { return get(base)[1]; }
-  const RT & dz() const { return get(base)[2]; }
-  const RT & x()  const { return get(base)[0]; }
-  const RT & y()  const { return get(base)[1]; }
-  const RT & z()  const { return get(base)[2]; }
-  const RT & hx() const { return get(base)[0]; }
-  const RT & hy() const { return get(base)[1]; }
-  const RT & hz() const { return get(base)[2]; }
-};
-
-template <class R >
-CGAL_KERNEL_INLINE
-bool
-DirectionH3<R>::operator==( const DirectionH3<R>& d) const
-{
-  return ( ( hx()*d.hy() == hy()*d.hx() )
-        &&( hx()*d.hz() == hz()*d.hx() )
-        &&( hy()*d.hz() == hz()*d.hy() )
-        &&( CGAL_NTS sign( hx() ) == CGAL_NTS sign( d.hx() ) )
-        &&( CGAL_NTS sign( hy() ) == CGAL_NTS sign( d.hy() ) )
-        &&( CGAL_NTS sign( hz() ) == CGAL_NTS sign( d.hz() ) ) );
-}
-
-template <class R >
-inline
-bool
-DirectionH3<R>::operator!=( const DirectionH3<R>& d) const
-{ return !operator==(d); }
-
-template <class R >
-CGAL_KERNEL_INLINE
-bool
-DirectionH3<R>::is_degenerate() const
-{ return ((hx() == RT(0)) && (hy() == RT(0)) && (hz() == RT(0))); }
-
-template <class R >
-inline
-typename DirectionH3<R>::Vector_3
-DirectionH3<R>::to_vector() const
-{ return Vector_3(dx(), dy(), dz(), RT(1)); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-DirectionH3<R>
-cross_product( const DirectionH3<R>& d1,
-               const DirectionH3<R>& d2)
-{ return cross_product(d1.to_vector(),d2.to_vector()).direction(); }
-
-} //namespace CGAL
-
-#endif // CGAL_HOMOGENEOUS_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_cuboidH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_cuboidH3.h
deleted file mode 100644
index bec9cb1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_cuboidH3.h
+++ /dev/null
@@ -1,398 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_ISO_CUBOIDH3_H
-#define CGAL_ISO_CUBOIDH3_H
-
-#include <CGAL/array.h>
-#include <CGAL/enum.h>
-#include <CGAL/kernel_config.h>
-#include <CGAL/kernel_assertions.h>
-
-namespace CGAL {
-
-template <class R_>
-class Iso_cuboidH3
-{
-  typedef typename R_::RT                   RT;
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-  typedef cpp11::array<Point_3, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                 R;
-
-  Iso_cuboidH3() {}
-
-  Iso_cuboidH3(const Point_3& p, const Point_3& q, int)
-    : base(CGAL::make_array(p, q))
-  {
-    CGAL_kernel_assertion(p.x()<=q.x());
-    CGAL_kernel_assertion(p.y()<=q.y());
-    CGAL_kernel_assertion(p.z()<=q.z());
-  }
-
-  Iso_cuboidH3(const Point_3& p, const Point_3& q);
-
-  Iso_cuboidH3(const Point_3& left,   const Point_3& right,
-               const Point_3& bottom, const Point_3& top,
-               const Point_3& far_,   const Point_3& close);
-
-  Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-               const RT& max_hx, const RT& max_hy, const RT& max_hz, 
-               const RT& hw);
-
-  Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-               const RT& max_hx, const RT& max_hy, const RT& max_hz);
-
-  bool      operator==(const Iso_cuboidH3<R>& s) const;
-  bool      operator!=(const Iso_cuboidH3<R>& s) const;
-
-  const Point_3 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-  const Point_3 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-  Point_3  vertex(int i) const;
-  Point_3  operator[](int i) const;
-
-  Iso_cuboidH3<R>
-            transform(const Aff_transformation_3& t) const;
-  Bounded_side
-            bounded_side(const Point_3& p) const;
-  bool      has_on(const Point_3& p) const;
-  bool      has_on_boundary(const Point_3& p) const;
-  bool      has_on_bounded_side(const Point_3& p) const;
-  bool      has_on_unbounded_side(const Point_3& p) const;
-  bool      is_degenerate() const;
-  FT        xmin() const;
-  FT        ymin() const;
-  FT        zmin() const;
-  FT        xmax() const;
-  FT        ymax() const;
-  FT        zmax() const;
-  FT        min_coord(int i) const;
-  FT        max_coord(int i) const;
-
-  FT        volume() const;
-
-};
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-Iso_cuboidH3<R>::
-Iso_cuboidH3(const typename Iso_cuboidH3<R>::Point_3& p,
-	     const typename Iso_cuboidH3<R>::Point_3& q)
-{
-  bool px_k_qx = ( p.hx()*q.hw() < q.hx()*p.hw() );
-  bool py_k_qy = ( p.hy()*q.hw() < q.hy()*p.hw() );
-  bool pz_k_qz = ( p.hz()*q.hw() < q.hz()*p.hw() );
-
-  RT minx;
-  RT miny;
-  RT minz;
-  RT maxx;
-  RT maxy;
-  RT maxz;
-  RT minw = p.hw()*q.hw();
-  RT maxw = p.hw()*q.hw();
-  if ( px_k_qx )
-  {
-      minx = p.hx()*q.hw();
-      maxx = q.hx()*p.hw();
-  }
-  else
-  {
-      minx = q.hx()*p.hw();
-      maxx = p.hx()*q.hw();
-  }
-  if ( py_k_qy )
-  {
-      miny = p.hy()*q.hw();
-      maxy = q.hy()*p.hw();
-  }
-  else
-  {
-      miny = q.hy()*p.hw();
-      maxy = p.hy()*q.hw();
-  }
-  if ( pz_k_qz )
-  {
-      minz = p.hz()*q.hw();
-      maxz = q.hz()*p.hw();
-  }
-  else
-  {
-      minz = q.hz()*p.hw();
-      maxz = p.hz()*q.hw();
-  }
-  base = Rep(CGAL::make_array(Point_3(minx, miny, minz, minw),
-                               Point_3(maxx, maxy, maxz, maxw)));
-}
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-Iso_cuboidH3<R>::
-Iso_cuboidH3(const typename Iso_cuboidH3<R>::Point_3& left,
-             const typename Iso_cuboidH3<R>::Point_3& right,
-             const typename Iso_cuboidH3<R>::Point_3& bottom,
-             const typename Iso_cuboidH3<R>::Point_3& top,
-             const typename Iso_cuboidH3<R>::Point_3& far_,
-             const typename Iso_cuboidH3<R>::Point_3& close)
-  : base(CGAL::make_array(Point_3(left.hx()   * bottom.hw() * far_.hw(),
-                                   bottom.hy() * left.hw()   * far_.hw(),
-                                   far_.hz()   * left.hw()   * bottom.hw(),
-                                   left.hw()   * bottom.hw() * far_.hw()),
-                           Point_3(right.hx()  * top.hw()    * close.hw(),
-                                   top.hy()    * right.hw()  * close.hw(),
-                                   close.hz()  * right.hw()  * top.hw(),
-                                   right.hw()  * top.hw()    * close.hw())))
-{
-  CGAL_kernel_precondition(!less_x(right, left));
-  CGAL_kernel_precondition(!less_y(top, bottom));
-  CGAL_kernel_precondition(!less_z(close, far_));
-}
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-Iso_cuboidH3<R>::
-Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-             const RT& max_hx, const RT& max_hy, const RT& max_hz)
-  : base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, RT(1)),
-                           Point_3(max_hx, max_hy, max_hz, RT(1))))
-{}
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-Iso_cuboidH3<R>::
-Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-             const RT& max_hx, const RT& max_hy, const RT& max_hz, 
-             const RT& hw)
-  : base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, hw),
-                           Point_3(max_hx, max_hy, max_hz, hw)))
-{}
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-Iso_cuboidH3<R>::
-operator==(const Iso_cuboidH3<R>& r) const
-{ return  ((this->min)() == (r.min)()) && ((this->max)() == (r.max)()); }
-
-template < class R >
-inline
-bool
-Iso_cuboidH3<R>::
-operator!=(const Iso_cuboidH3<R>& r) const
-{ return !(*this == r); }
-
-template < class R >
-inline
-const typename Iso_cuboidH3<R>::Point_3 &
-Iso_cuboidH3<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{ return get(base)[0]; }
-
-template < class R >
-inline
-const typename Iso_cuboidH3<R>::Point_3 &
-Iso_cuboidH3<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{ return get(base)[1]; }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::xmin() const
-{ return  FT( (this->min)().hx() ) / FT( (this->min)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::ymin() const
-{ return  FT( (this->min)().hy() ) / FT( (this->min)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::zmin() const
-{ return  FT( (this->min)().hz() ) / FT( (this->min)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::xmax() const
-{ return  FT( (this->max)().hx() ) / FT( (this->max)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::ymax() const
-{ return  FT( (this->max)().hy() ) / FT( (this->max)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::zmax() const
-{ return  FT( (this->max)().hz() ) / FT( (this->max)().hw() ); }
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::min_coord(int i) const
-{ 
-   CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
-   if ( i == 0 )
-       return xmin();
-   else if (i == 1)
-       return ymin();
-   return zmin();
-}
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::max_coord(int i) const
-{ 
-   CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
-   if ( i == 0 )
-      return xmax();
-   else if ( i == 1 )
-      return ymax();
-   return zmax();
-}
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::FT
-Iso_cuboidH3<R>::volume() const
-{ return  (xmax() - xmin()) * (ymax() - ymin()) * (zmax() - zmin()); }
-
-template < class R >
-CGAL_KERNEL_LARGE_INLINE
-typename Iso_cuboidH3<R>::Point_3
-Iso_cuboidH3<R>::vertex(int i) const
-{
-  switch (i%8)
-  {
-    case 0: return (this->min)();
-    case 1: return Point_3( (this->max)().hx(), (this->min)().hy(),
-		                   (this->min)().hz(), (this->min)().hw() );
-    case 2: return Point_3( (this->max)().hx(), (this->max)().hy(),
-		                   (this->min)().hz(), (this->min)().hw() );
-    case 3: return Point_3( (this->min)().hx(), (this->max)().hy(),
-		                   (this->min)().hz(), (this->min)().hw() );
-    case 4: return Point_3( (this->min)().hx(), (this->max)().hy(),
-		                   (this->max)().hz(), (this->min)().hw() );
-    case 5: return Point_3( (this->min)().hx(), (this->min)().hy(),
-		                   (this->max)().hz(), (this->min)().hw() );
-    case 6: return Point_3( (this->max)().hx(), (this->min)().hy(),
-		                   (this->max)().hz(), (this->min)().hw() );
-    default: /*case 7:*/ return (this->max)();
-  }
-}
-
-template < class R >
-inline
-typename Iso_cuboidH3<R>::Point_3
-Iso_cuboidH3<R>::operator[](int i) const
-{ return vertex(i); }
-
-template < class R >
-CGAL_KERNEL_MEDIUM_INLINE
-Bounded_side
-Iso_cuboidH3<R>::
-bounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
-{
-  if (    (p.hx()*(this->min)().hw() < (this->min)().hx()*p.hw() )
-        ||(p.hy()*(this->min)().hw() < (this->min)().hy()*p.hw() )
-        ||(p.hz()*(this->min)().hw() < (this->min)().hz()*p.hw() )
-        ||(p.hx()*(this->max)().hw() > (this->max)().hx()*p.hw() )
-        ||(p.hy()*(this->max)().hw() > (this->max)().hy()*p.hw() )
-        ||(p.hz()*(this->max)().hw() > (this->max)().hz()*p.hw() )  )
-  { return ON_UNBOUNDED_SIDE; }
-  if (    (p.hx()*(this->min)().hw() == (this->min)().hx()*p.hw() )
-        ||(p.hy()*(this->min)().hw() == (this->min)().hy()*p.hw() )
-        ||(p.hz()*(this->min)().hw() == (this->min)().hz()*p.hw() )
-        ||(p.hx()*(this->max)().hw() == (this->max)().hx()*p.hw() )
-        ||(p.hy()*(this->max)().hw() == (this->max)().hy()*p.hw() )
-        ||(p.hz()*(this->max)().hw() == (this->max)().hz()*p.hw() )  )
-  { return ON_BOUNDARY; }
-  else
-  { return ON_BOUNDED_SIDE; }
-}
-
-template < class R >
-inline
-bool
-Iso_cuboidH3<R>::
-has_on_boundary(const typename Iso_cuboidH3<R>::Point_3& p) const
-{ return ( bounded_side(p) == ON_BOUNDARY ); }
-
-template < class R >
-inline
-bool
-Iso_cuboidH3<R>::has_on(const typename Iso_cuboidH3<R>::Point_3& p) const
-{ return ( bounded_side(p) == ON_BOUNDARY ); }
-
-template < class R >
-inline
-bool
-Iso_cuboidH3<R>::
-has_on_bounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
-{ return ( bounded_side(p) == ON_BOUNDED_SIDE ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-Iso_cuboidH3<R>::
-has_on_unbounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
-{
-  return (   ( lexicographically_xyz_smaller(p,(this->min)() ))
-           ||( lexicographically_xyz_smaller((this->max)(),p ))  );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-Iso_cuboidH3<R>::is_degenerate() const
-{
-  return (  ( (this->min)().hx() == (this->max)().hx() )
-         || ( (this->min)().hy() == (this->max)().hy() )
-         || ( (this->min)().hz() == (this->max)().hz() ) );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-Iso_cuboidH3<R>
-Iso_cuboidH3<R>::
-transform(const typename Iso_cuboidH3<R>::Aff_transformation_3&t) const
-{
-  return Iso_cuboidH3<R>(t.transform((this->min)() ),
-                             t.transform((this->max)() ) );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_ISO_CUBOIDH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_rectangleH2.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_rectangleH2.h
deleted file mode 100644
index 5ca7ce7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Iso_rectangleH2.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_ISO_RECTANGLEH2_H
-#define CGAL_ISO_RECTANGLEH2_H
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template <class R_>
-class Iso_rectangleH2
-{
-  typedef typename R_::FT                   FT;
-  typedef typename R_::RT                   RT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Iso_rectangle_2      Iso_rectangle_2;
-
-  typedef cpp11::array<Point_2, 2>          Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  Base base;
-
-public:
-  typedef R_                                    R;
-  typedef typename Point_2::Rep::Cartesian_coordinate_type Cartesian_coordinate_type;
-  typedef typename Point_2::Rep::Homogeneous_coordinate_type Homogeneous_coordinate_type;
-
-  Iso_rectangleH2() {}
-
-  Iso_rectangleH2(const Point_2& p, const Point_2& q, int)
-    : base(CGAL::make_array(p, q))
-  {
-    // I have to remove the assertions, because of Homogeneous_converter.
-    // CGAL_kernel_assertion(p.x()<=q.x());
-    // CGAL_kernel_assertion(p.y()<=q.y());
-  }
-
-  const Point_2 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-  const Point_2 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-
-  Bounded_side bounded_side(const Point_2& p) const;
-};
-
-
-
-template < class R >
-inline
-const typename Iso_rectangleH2<R>::Point_2 &
-Iso_rectangleH2<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{ return get(base)[0]; }
-
-template < class R >
-inline
-const typename Iso_rectangleH2<R>::Point_2 &
-Iso_rectangleH2<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{ return get(base)[1]; }
-
-template < class R >
-CGAL_KERNEL_INLINE
-Bounded_side
-Iso_rectangleH2<R>::
-bounded_side(const typename Iso_rectangleH2<R>::Point_2& p) const
-{
-  Oriented_side wrt_min = _where_wrt_L_wedge((this->min)(),p);
-  Oriented_side wrt_max = _where_wrt_L_wedge(p,(this->max)());
-  if (( wrt_min == ON_NEGATIVE_SIDE )||( wrt_max == ON_NEGATIVE_SIDE))
-  {
-      return ON_UNBOUNDED_SIDE;
-  }
-  if (  ( wrt_min == ON_ORIENTED_BOUNDARY )
-      ||( wrt_max == ON_ORIENTED_BOUNDARY ) )
-  {
-      return ON_BOUNDARY;
-  }
-  return ON_BOUNDED_SIDE;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_ISO_RECTANGLEH2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/LineH2.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/LineH2.h
deleted file mode 100644
index 90536b4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/LineH2.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_LINEH2_H
-#define CGAL_LINEH2_H
-
-#include <CGAL/kernel_config.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template < class R_ >
-class LineH2
-{
-    typedef typename R_::FT                   FT;
-    typedef typename R_::RT                   RT;
-    typedef typename R_::Point_2              Point_2;
-    typedef typename R_::Vector_2             Vector_2;
-    typedef typename R_::Direction_2          Direction_2;
-    typedef typename R_::Segment_2            Segment_2;
-    typedef typename R_::Ray_2                Ray_2;
-    typedef typename R_::Line_2               Line_2;
-
-    typedef cpp11::array<RT, 3>               Rep;
-    typedef typename R_::template Handle<Rep>::type  Base;
-
-    Base base;
-
-public:
-
-    typedef R_                                    R;
-
-    LineH2() {}
-    LineH2(const RT& a, const RT& b, const RT& c)
-      : base(CGAL::make_array(a, b, c)) {}
-
-    bool           operator==(const LineH2<R>& l) const;
-    bool           operator!=(const LineH2<R>& l) const;
-
-    const RT &     a() const { return get(base)[0]; }
-    const RT &     b() const { return get(base)[1]; }
-    const RT &     c() const { return get(base)[2]; }
-
-};
-
-template < class R >
-CGAL_KERNEL_MEDIUM_INLINE
-bool
-LineH2<R>::operator==(const LineH2<R>& l) const
-{
-  if (  (a() * l.c() != l.a() * c() )
-      ||(b() * l.c() != l.b() * c() ) )
-  {
-      return false;
-  }
-  int sc  = static_cast<int>(CGAL_NTS sign(c()));
-  int slc = static_cast<int>(CGAL_NTS sign(l.c()));
-  if ( sc == slc )
-  {
-      if (sc == 0)
-          return (  (a()*l.b() == b()*l.a() )
-                  &&(CGAL_NTS sign(a() )== CGAL_NTS sign( l.a() ))
-                  &&(CGAL_NTS sign(b() )== CGAL_NTS sign( l.b() )) );
-      else
-          return true;
-  }
-  else
-      return false;
-}
-
-template < class R >
-inline
-bool
-LineH2<R>::operator!=(const LineH2<R>& l) const
-{ return !(*this == l); }
-
-} //namespace CGAL
-
-#endif // CGAL_LINEH2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PlaneH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PlaneH3.h
deleted file mode 100644
index c768e5e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PlaneH3.h
+++ /dev/null
@@ -1,545 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_PLANEH3_H
-#define CGAL_PLANEH3_H
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template < class R_ >
-class PlaneH3
-{
-   typedef typename R_::RT                   RT;
-   typedef typename R_::FT                   FT;
-   typedef typename R_::Point_2              Point_2;
-   typedef typename R_::Point_3              Point_3;
-   typedef typename R_::Vector_3             Vector_3;
-   typedef typename R_::Line_3               Line_3;
-   typedef typename R_::Segment_3            Segment_3;
-   typedef typename R_::Ray_3                Ray_3;
-   typedef typename R_::Direction_3          Direction_3;
-   typedef typename R_::Plane_3              Plane_3;
-   typedef typename R_::Aff_transformation_3 Aff_transformation_3;
-
-   typedef cpp11::array<RT, 4>               Rep;
-   typedef typename R_::template Handle<Rep>::type  Base;
-
-   Base base;
-
-public:
-
-   typedef R_                 R;
-
-    PlaneH3() {}
-
-    PlaneH3(const Point_3&, const Point_3&, const Point_3& );
-    PlaneH3(const RT& a, const RT& b,
-            const RT& c, const RT& d );
-    PlaneH3(const Point_3&, const Ray_3& );
-    PlaneH3(const Point_3&, const Line_3& );
-    PlaneH3(const Point_3&, const Segment_3& );
-    PlaneH3(const Line_3&, const Point_3& );
-    PlaneH3(const Segment_3&, const Point_3& );
-    PlaneH3(const Ray_3&, const Point_3& );
-    PlaneH3(const Point_3&, const Direction_3& );
-    PlaneH3(const Point_3&, const Vector_3& );
-    PlaneH3(const Point_3&, const Direction_3&, const Direction_3& );
-
-    const RT & a() const;
-    const RT & b() const;
-    const RT & c() const;
-    const RT & d() const;
-
-    bool       operator==( const PlaneH3<R>& ) const;
-    bool       operator!=( const PlaneH3<R>& ) const;
-
-    Line_3  perpendicular_line(const Point_3& ) const;
-    Plane_3 opposite() const;  // plane with opposite orientation
-    Point_3 projection(const Point_3& ) const;
-
-    Point_3 point() const;     // same point on the plane
-    Direction_3    orthogonal_direction() const;
-    Vector_3       orthogonal_vector() const;
-
-    Oriented_side  oriented_side(const Point_3 &p) const;
-    bool           has_on(const Point_3 &p) const;
-    bool           has_on(const Line_3 &p) const;
-    bool           has_on_positive_side(const Point_3&l) const;
-    bool           has_on_negative_side(const Point_3&l) const;
-
-    bool           is_degenerate() const;
-
-    Aff_transformation_3 transform_to_2d() const;
-    Point_2   to_2d(const Point_3& )  const;
-    Point_3   to_3d(const Point_2& )  const;
-    Vector_3  base1() const;
-    Vector_3  base2() const;
-
-protected:
-    Point_3   point1() const;   // same point different from point()
-    Point_3   point2() const;   // same point different from point()
-                                       // and point1()
-
-    void             new_rep(const Point_3 &p,
-                             const Point_3 &q,
-                             const Point_3 &r);
-
-    void             new_rep(const RT &a, const RT &b,
-                             const RT &c, const RT &d);
-};
-
-//
-//  a() * X + b() * Y + c() * Z() + d() * W() == 0
-//
-//      |    X        Y       Z       W     |
-//      |  p.hx()   p.hy()  p.hz()  p.hw()  |
-//      |  q.hx()   q.hy()  q.hz()  q.hw()  |
-//      |  r.hx()   r.hy()  r.hz()  r.hw()  |
-//
-//  cpp11::array<RT, 4> ( a(), b(), c(), d() )
-
-template < class R >
-inline
-void
-PlaneH3<R>::new_rep(const typename PlaneH3<R>::Point_3 &p,
-                    const typename PlaneH3<R>::Point_3 &q,
-                    const typename PlaneH3<R>::Point_3 &r)
-{
-  RT phx = p.hx();
-  RT phy = p.hy();
-  RT phz = p.hz();
-  RT phw = p.hw();
-
-  RT qhx = q.hx();
-  RT qhy = q.hy();
-  RT qhz = q.hz();
-  RT qhw = q.hw();
-
-  RT rhx = r.hx();
-  RT rhy = r.hy();
-  RT rhz = r.hz();
-  RT rhw = r.hw();
-
-  base = CGAL::make_array<RT>(
-              phy*( qhz*rhw - qhw*rhz )
-            - qhy*( phz*rhw - phw*rhz )     // * X
-            + rhy*( phz*qhw - phw*qhz ),
-
-            - phx*( qhz*rhw - qhw*rhz )
-            + qhx*( phz*rhw - phw*rhz )     // * Y
-            - rhx*( phz*qhw - phw*qhz ),
-
-              phx*( qhy*rhw - qhw*rhy )
-            - qhx*( phy*rhw - phw*rhy )     // * Z
-            + rhx*( phy*qhw - phw*qhy ),
-
-            - phx*( qhy*rhz - qhz*rhy )
-            + qhx*( phy*rhz - phz*rhy )     // * W
-            - rhx*( phy*qhz - phz*qhy ));
-}
-
-template < class R >
-inline
-void
-PlaneH3<R>::new_rep(const RT &a, const RT &b, const RT &c, const RT &d)
-{ base = CGAL::make_array(a, b, c, d); }
-
-template < class R >
-inline
-bool
-PlaneH3<R>::operator!=(const PlaneH3<R>& l) const
-{
- return !(*this == l);
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
-                    const typename PlaneH3<R>::Point_3& q,
-                    const typename PlaneH3<R>::Point_3& r)
-{ new_rep(p,q,r); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const RT& a, const RT& b,
-                    const RT& c, const RT& d)
-{ new_rep(a,b,c,d); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
-                    const typename PlaneH3<R>::Line_3&  l)
-{ new_rep(p, l.point(0), l.point(1) ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
-                        const typename PlaneH3<R>::Segment_3& s)
-{ new_rep(p, s.source(), s.target() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
-                        const typename PlaneH3<R>::Ray_3&  r)
-{ new_rep(p, r.start(), r.start() + r.direction().to_vector() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Line_3& l ,
-                        const typename PlaneH3<R>::Point_3& p)
-{ new_rep(l.point(0), p, l.point(1) ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Segment_3& s,
-                        const typename PlaneH3<R>::Point_3& p)
-{ new_rep(s.source(), p, s.target() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Ray_3&  r,
-                        const typename PlaneH3<R>::Point_3& p)
-{ new_rep(r.start(), p, r.start() + r.direction().to_vector() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
-                        const typename PlaneH3<R>::Direction_3& d)
-{
-  Vector_3 ov = d.to_vector();
-  new_rep( ov.hx()*p.hw(),
-           ov.hy()*p.hw(),
-           ov.hz()*p.hw(),
-          -(ov.hx()*p.hx() + ov.hy()*p.hy() + ov.hz()*p.hz() ) );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
-                        const typename PlaneH3<R>::Vector_3& ov)
-{
-  new_rep( ov.hx()*p.hw(),
-           ov.hy()*p.hw(),
-           ov.hz()*p.hw(),
-          -(ov.hx()*p.hx() + ov.hy()*p.hy() + ov.hz()*p.hz() ) );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
-                        const typename PlaneH3<R>::Direction_3& d1,
-                        const typename PlaneH3<R>::Direction_3& d2)
-{ new_rep( p, p + d1.to_vector(), p + d2.to_vector() ); }
-
-template < class R >
-inline
-const typename PlaneH3<R>::RT &
-PlaneH3<R>::a() const
-{ return get(base)[0]; }
-
-template < class R >
-inline
-const typename PlaneH3<R>::RT &
-PlaneH3<R>::b() const
-{ return get(base)[1]; }
-
-template < class R >
-inline
-const typename PlaneH3<R>::RT &
-PlaneH3<R>::c() const
-{ return get(base)[2]; }
-
-template < class R >
-inline
-const typename PlaneH3<R>::RT &
-PlaneH3<R>::d() const
-{ return get(base)[3]; }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Line_3
-PlaneH3<R>::perpendicular_line(const typename PlaneH3<R>::Point_3& p) const
-{ return Line_3( p, orthogonal_direction() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Plane_3
-PlaneH3<R>::opposite() const
-{ return PlaneH3<R>(-a(), -b(), -c(), -d() ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Point_3
-PlaneH3<R>::projection(const typename PlaneH3<R>::Point_3& p) const
-{ return _projection( p, *this ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Point_3
-PlaneH3<R>::point() const
-{
-  const RT RT0(0);
-  if ( a() != RT0 )
-  {
-      return Point_3( -d(), RT0, RT0, a() );
-  }
-  if ( b() != RT0 )
-  {
-      return Point_3( RT0, -d(), RT0, b() );
-  }
-  CGAL_kernel_assertion ( c() != RT0);
-  return Point_3( RT0, RT0, -d(), c() );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Vector_3
-PlaneH3<R>::base1() const
-{
- // point():
- // a() != RT0 : Point_3( -d(), RT0, RT0, a() );
- // b() != RT0 : Point_3( RT0, -d(), RT0, b() );
- //            : Point_3( RT0, RT0, -d(), c() );
- // point1():
- // a() != RT0 : Point_3( -b()-d(), a(), RT0, a() );
- // b() != RT0 : Point_3( RT0, -c()-d(), b(), b() );
- //            : Point_3( c(), RT0, -a()-d(), c() );
-
-  const RT RT0(0);
-  if ( a() != RT0 )
-  {
-      return Vector_3( -b(), a(), RT0, a() );
-  }
-  if ( b() != RT0 )
-  {
-      return Vector_3( RT0, -c(), b(), b() );
-  }
-  CGAL_kernel_assertion ( c() != RT(0) );
-  return Vector_3( c(), RT0, -a(), c() );
-}
-
-template < class R >
-inline
-typename PlaneH3<R>::Vector_3
-PlaneH3<R>::base2() const
-{
-  Vector_3 a = orthogonal_vector();
-  Vector_3 b = base1();
-  return Vector_3(a.hy()*b.hz() - a.hz()*b.hy(),
-                         a.hz()*b.hx() - a.hx()*b.hz(),
-                         a.hx()*b.hy() - a.hy()*b.hx(),
-                         a.hw()*b.hw() );
-}
-// Actually, the following should work, but bcc doesn't like it:
-// { return cross_product( orthogonal_vector(), base1() ); }
-
-
-template < class R >
-inline
-typename PlaneH3<R>::Point_3
-PlaneH3<R>::point1() const
-{ return point() + base1(); }
-
-template < class R >
-inline
-typename PlaneH3<R>::Point_3
-PlaneH3<R>::point2() const
-{ return point() + base2(); }
-
-template < class R >
-inline
-typename PlaneH3<R>::Direction_3
-PlaneH3<R>::orthogonal_direction() const
-{ return Direction_3(a(), b(), c() ); }
-
-template < class R >
-inline
-typename PlaneH3<R>::Vector_3
-PlaneH3<R>::orthogonal_vector() const
-{ return Vector_3(a(), b(), c() ); }
-
-template < class R >
-bool
-PlaneH3<R>::is_degenerate() const
-{
- const RT RT0(0);
- return ( (a() == RT0 ) && (b() == RT0 ) && (c() == RT0 ) );
-}
-
-template < class R >
-bool
-PlaneH3<R>::has_on_positive_side( const typename PlaneH3<R>::Point_3& p) const
-{
- return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() > RT(0) );
-}
-
-template < class R >
-bool
-PlaneH3<R>::has_on_negative_side( const typename PlaneH3<R>::Point_3& p) const
-{
- return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() < RT(0) );
-}
-
-
-template < class R >
-bool
-PlaneH3<R>::has_on( const typename PlaneH3<R>::Point_3& p) const
-{
- return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() == RT(0) );
-}
-
-template < class R >
-bool
-PlaneH3<R>::has_on( const typename PlaneH3<R>::Line_3& l) const
-{
- Point_3   p   = l.point();
- Vector_3  ld  = l.direction().to_vector();
- Vector_3  ov  = orthogonal_vector();
-
- return (  ( a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw()   == RT(0) )
-         &&( ld.hx()*ov.hx() + ld.hy()*ov.hy() + ld.hz()*ov.hz() == RT(0) ) );
-}
-
-template < class R >
-Oriented_side
-PlaneH3<R>::oriented_side( const typename PlaneH3<R>::Point_3& p) const
-{
- return CGAL_NTS sign( a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() );
-}
-
-
-template < class R >
-bool
-PlaneH3<R>::operator==(const PlaneH3<R>& l) const
-{
- if (  (a() * l.d() != l.a() * d() )
-     ||(b() * l.d() != l.b() * d() )
-     ||(c() * l.d() != l.c() * d() ) )
- {
-    return false;
- }
- int sd  = static_cast<int>(CGAL_NTS sign(d()));
- int sld = static_cast<int>(CGAL_NTS sign(l.d()));
- if ( sd == sld )
- {
-    if (sd == 0)
-    {
-        return (  (a()*l.b() == b()*l.a() )
-                &&(a()*l.c() == c()*l.a() )
-                &&(b()*l.c() == c()*l.b() )
-                &&(CGAL_NTS sign(a() )== CGAL_NTS sign( l.a() ))
-                &&(CGAL_NTS sign(b() )== CGAL_NTS sign( l.b() ))
-                &&(CGAL_NTS sign(c() )== CGAL_NTS sign( l.c() )) );
-    }
-    else
-    {
-        return true;
-    }
- }
- else
- {
-    return false;
- }
-}
-
-template < class R >
-typename PlaneH3<R>::Aff_transformation_3
-PlaneH3<R>::transform_to_2d() const
-{
-  const RT  RT0(0);
-  const RT  RT1(1);
-  Vector_3 nov = orthogonal_vector();
-  Vector_3 e1v = point1()-point() ;
-  Vector_3 e2v = point2()-point() ;
-  RT orthohx = nov.hx();
-  RT orthohy = nov.hy();
-  RT orthohz = nov.hz();
-  RT e1phx   = e1v.hx();
-  RT e1phy   = e1v.hy();
-  RT e1phz   = e1v.hz();
-  RT e2phx   = e2v.hx();
-  RT e2phy   = e2v.hy();
-  RT e2phz   = e2v.hz();
-
-  RT t11 =  -( orthohy*e2phz - orthohz*e2phy );
-  RT t12 =   ( orthohx*e2phz - orthohz*e2phx );
-  RT t13 =  -( orthohx*e2phy - orthohy*e2phx );
-
-  RT t21 =   ( orthohy*e1phz - orthohz*e1phy );
-  RT t22 =  -( orthohx*e1phz - orthohz*e1phx );
-  RT t23 =   ( orthohx*e1phy - orthohy*e1phx );
-
-  RT t31 =   ( e1phy*e2phz - e1phz*e2phy );
-  RT t32 =  -( e1phx*e2phz - e1phz*e2phx );
-  RT t33 =   ( e1phx*e2phy - e1phy*e2phx );
-
-  RT scale = determinant( orthohx, orthohy, orthohz,
-                                     e1phx,   e1phy,   e1phz,
-                                     e2phx,   e2phy,   e2phz );
-
-  Aff_transformation_3
-     point_to_origin(TRANSLATION,  - ( point() - ORIGIN ) );
-  Aff_transformation_3
-     rotate_and_more( t11,    t12,   t13,   RT0,
-                      t21,    t22,   t23,   RT0,
-                      t31,    t32,   t33,   RT0,
-                                            scale);
-
-  Point_3 ortho( orthohx, orthohy, orthohz );
-  Point_3 e1p( e1phx, e1phy, e1phz );
-  Point_3 e2p( e2phx, e2phy, e2phz );
-  CGAL_kernel_assertion((   ortho.transform(rotate_and_more)
-        == Point_3( RT(0), RT(0), RT(1)) ));
-  CGAL_kernel_assertion((   e1p.transform(rotate_and_more)
-        == Point_3( RT(1), RT(0), RT(0)) ));
-  CGAL_kernel_assertion((   e2p.transform(rotate_and_more)
-        == Point_3( RT(0), RT(1), RT(0)) ));
-
-  return  rotate_and_more * point_to_origin;
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Point_2
-PlaneH3<R>::to_2d(const typename PlaneH3<R>::Point_3& p) const
-{
-  Point_3 tp = p.transform( transform_to_2d() );
-  return Point_2( tp.hx(), tp.hy(), tp.hw());
-}
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename PlaneH3<R>::Point_3
-PlaneH3<R>::to_3d(const typename PlaneH3<R>::Point_2& p)  const
-{
-  Point_3 hp( p.hx(), p.hy(), RT(0.0), p.hw());
-  return hp.transform( transform_to_2d().inverse() );
-}
-
-} //namespace CGAL
-
-#endif  // CGAL_PLANEH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/RayH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/RayH3.h
deleted file mode 100644
index 44b191a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/RayH3.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-#ifndef CGAL_RAYH3_H
-#define CGAL_RAYH3_H
-
-#include <utility>
-#include <CGAL/kernel_config.h>
-#include <CGAL/assertions.h>
-#include <CGAL/Origin.h>
-
-namespace CGAL {
-
-template < class R_ >
-class RayH3
-{
-   typedef typename R_::RT                   RT;
-   typedef typename R_::FT                   FT;
-   typedef typename R_::Point_3              Point_3;
-   typedef typename R_::Line_3               Line_3;
-   typedef typename R_::Direction_3          Direction_3;
-   typedef typename R_::Vector_3             Vector_3;
-
-   typedef std::pair<Point_3, Vector_3>             Rep;
-   typedef typename R_::template Handle<Rep>::type  Base;
-
-   Base base;
-
-public:
-   typedef R_                R;
-
-    RayH3() {}
-
-    RayH3( const Point_3& sp, const Point_3& secondp)
-      : base(sp, secondp-sp) {}
-
-    RayH3( const Point_3& sp, const Vector_3& v)
-      : base(sp, v) {}
-
-    RayH3( const Point_3& sp, const Direction_3& d)
-      : base(sp, d.to_vector()) {}
-
-    RayH3( const Point_3& sp, const Line_3& l)
-      : base(sp, l.to_vector()) {}
-
-    const Point_3 & start() const;
-    const Point_3 & source() const;
-    Point_3 second_point() const;
-    Point_3 point(int i) const;
-    Direction_3 direction() const;
-    const Vector_3 & to_vector() const;
-    Line_3  supporting_line() const;
-    RayH3<R>   opposite() const;
-    bool           has_on(const Point_3& p) const;
-    bool           collinear_has_on(const Point_3 &p) const;
-    bool           is_degenerate() const;
-
-    bool           operator==(const RayH3<R>& r) const;
-    bool           operator!=(const RayH3<R>& r) const;
-};
-
-template < class R >
-inline
-const typename RayH3<R>::Point_3 &
-RayH3<R>::source() const
-{ return get(base).first; }
-
-template < class R >
-inline
-const typename RayH3<R>::Point_3 &
-RayH3<R>::start() const
-{ return get(base).first; }
-
-template < class R >
-inline
-const typename RayH3<R>::Vector_3 &
-RayH3<R>::to_vector() const
-{
-  return get(base).second;
-}
-
-template < class R >
-inline
-typename RayH3<R>::Direction_3
-RayH3<R>::direction() const
-{
-  return to_vector().direction();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename RayH3<R>::Point_3
-RayH3<R>::second_point() const
-{ return start() + to_vector(); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename RayH3<R>::Point_3
-RayH3<R>::point(int i) const
-{
-  CGAL_kernel_precondition( i >= 0 );
-  return start() + RT(i)*to_vector();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename RayH3<R>::Line_3
-RayH3<R>::supporting_line() const
-{
-  CGAL_kernel_precondition( !is_degenerate() );
-  return Line_3(start(), second_point() );
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-RayH3<R>
-RayH3<R>::opposite() const
-{ return RayH3<R>( start(), - direction() ); }
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-RayH3<R>::has_on(const typename RayH3<R>::Point_3 &p) const
-{
-  return ( (  p == start() )
-         ||(  Direction_3(p - start()) == direction() ) );
-}
-
-template < class R >
-inline                                      /* XXX */
-bool
-RayH3<R>::collinear_has_on(const typename RayH3<R>::Point_3 &p) const
-{ return has_on(p); }
-
-template < class R >
-inline
-bool
-RayH3<R>::is_degenerate() const
-{ return to_vector() == NULL_VECTOR; }
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-RayH3<R>::operator==(const RayH3<R>& r) const
-{ return ( (start() == r.start() )&&( direction() == r.direction() ) ); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-RayH3<R>::operator!=( const RayH3<R>& r) const
-{ return !operator==(r); }
-
-} //namespace CGAL
-
-#endif // CGAL_RAYH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/SphereH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/SphereH3.h
deleted file mode 100644
index 57f3424..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/SphereH3.h
+++ /dev/null
@@ -1,231 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_SPHEREH3_H
-#define CGAL_SPHEREH3_H
-
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Homogeneous/predicates_on_pointsH3.h>
-#include <boost/tuple/tuple.hpp>
-#include <CGAL/Kernel/global_functions_3.h>
-
-namespace CGAL {
-
-template <class R_>
-class SphereH3
-{
-   typedef typename R_::RT                   RT;
-   typedef typename R_::FT                   FT;
-   typedef typename R_::Point_3              Point_3;
-
-   typedef boost::tuple<Point_3, FT, Orientation>   Rep;
-   typedef typename R_::template Handle<Rep>::type  Base;
-
-   Base base;
-
-public:
-   typedef R_                R;
-
-      SphereH3() {}
-
-      SphereH3(const Point_3& p, const FT& sq_rad,
-               const Orientation& o = COUNTERCLOCKWISE);
-
-      SphereH3(const Point_3& p, const Point_3& q,
-               const Point_3& r, const Point_3& u);
-
-      SphereH3(const Point_3& p, const Point_3& q,
-               const Point_3& r,
-               const Orientation& o = COUNTERCLOCKWISE);
-
-      SphereH3(const Point_3&  p, const Point_3&  q,
-               const Orientation& o = COUNTERCLOCKWISE);
-
-      SphereH3(const Point_3&  p,
-               const Orientation& o = COUNTERCLOCKWISE);
-
-      bool
-      operator==(const SphereH3<R>&) const;
-
-      bool
-      operator!=(const SphereH3<R>& s) const
-      { return !(*this == s); }
-
-      const Point_3 & center() const;
-
-      const FT & squared_radius() const;
-
-      Orientation orientation() const;
-
-      bool is_degenerate() const;
-
-      SphereH3<R> opposite() const;
-
-      Oriented_side oriented_side(const Point_3& p) const;
-
-      bool
-      has_on_boundary(const Point_3& p) const
-      { return oriented_side(p)==ON_ORIENTED_BOUNDARY; }
-
-      bool
-      has_on_positive_side(const Point_3& p) const
-      { return oriented_side(p)==ON_POSITIVE_SIDE; }
-
-      bool
-      has_on_negative_side(const Point_3& p) const
-      { return oriented_side(p)==ON_NEGATIVE_SIDE; }
-
-      Bounded_side
-      bounded_side(const Point_3& p) const;
-
-      bool
-      has_on_bounded_side(const Point_3& p) const
-      { return bounded_side(p)==ON_BOUNDED_SIDE; }
-
-      bool
-      has_on_unbounded_side(const Point_3& p) const
-      { return bounded_side(p)==ON_UNBOUNDED_SIDE; }
-};
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& center,
-                      const FT& squared_radius,
-                      const Orientation& o)
-{
-  CGAL_kernel_precondition( !( squared_radius < FT(0))
-                          &&( o != COLLINEAR) );
-  base = Rep(center, squared_radius, o);
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& center,
-                      const Orientation& o)
-{
-  CGAL_kernel_precondition( ( o != COLLINEAR) );
-  base = Rep(center, FT(0), o);
-}
-
-template <class R>
-CGAL_KERNEL_MEDIUM_INLINE
-SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
-                      const typename SphereH3<R>::Point_3& q,
-                      const Orientation& o)
-{
-  CGAL_kernel_precondition( o != COLLINEAR);
-  Point_3 center = midpoint(p,q);
-  FT     squared_radius = squared_distance(p,center);
-  base = Rep(center, squared_radius, o);
-}
-
-template <class R>
-CGAL_KERNEL_MEDIUM_INLINE
-SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
-                      const typename SphereH3<R>::Point_3& q,
-                      const typename SphereH3<R>::Point_3& r,
-                      const Orientation& o)
-{
-  CGAL_kernel_precondition( o != COLLINEAR);
-  Point_3 center = circumcenter(p,q,r);
-  FT     squared_radius = squared_distance(p,center);
-  base = Rep(center, squared_radius, o);
-}
-
-template <class R>
-CGAL_KERNEL_MEDIUM_INLINE
-SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
-                      const typename SphereH3<R>::Point_3& q,
-                      const typename SphereH3<R>::Point_3& r,
-                      const typename SphereH3<R>::Point_3& s)
-{
-  Orientation o = CGAL::orientation(p,q,r,s);
-  CGAL_kernel_precondition( o != COLLINEAR);
-  Point_3 center = circumcenter(p,q,r,s);
-  FT     squared_radius = squared_distance(p,center);
-  base = Rep(center, squared_radius, o);
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-bool
-SphereH3<R>::operator==(const SphereH3<R>& s) const
-{
-   return    ( orientation() == s.orientation())
-          && ( center() == s.center())
-          && ( squared_radius() == s.squared_radius());
-}
-
-template <class R>
-inline
-const typename SphereH3<R>::Point_3 &
-SphereH3<R>::center() const
-{ return get(base).template get<0>(); }
-
-template <class R>
-inline
-const typename SphereH3<R>::FT &
-SphereH3<R>::squared_radius() const
-{ return get(base).template get<1>(); }
-
-template <class R>
-inline
-Orientation
-SphereH3<R>::orientation() const
-{ return get(base).template get<2>(); }
-
-template <class R>
-inline
-bool
-SphereH3<R>::is_degenerate() const
-{ return squared_radius() <= FT(0) ; }
-
-template <class R>
-CGAL_KERNEL_MEDIUM_INLINE
-Oriented_side
-SphereH3<R>::oriented_side(const typename SphereH3<R>::Point_3& p) const
-{ return Oriented_side(bounded_side(p) * orientation()); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-Bounded_side
-SphereH3<R>::bounded_side(const typename SphereH3<R>::Point_3& p) const
-{
-  return Bounded_side(CGAL_NTS compare(squared_radius(),
-                                       squared_distance(center(),p)));
-}
-
-template <class R>
-inline
-SphereH3<R>
-SphereH3<R>::opposite() const
-{
-  return SphereH3<R>(center(), squared_radius(),
-                         CGAL::opposite(orientation()) );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_SPHEREH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH2.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH2.h
deleted file mode 100644
index 28ccb8d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH2.h
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-
-#ifndef CGAL_HOMOGENEOUS_VECTOR_2_h
-#define CGAL_HOMOGENEOUS_VECTOR_2_h
-
-#include <CGAL/Origin.h>
-#include <CGAL/array.h>
-#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
-#include <CGAL/Handle_for.h>
-
-#include <boost/next_prior.hpp>
-
-namespace CGAL {
-
-template < class R_ >
-class VectorH2
-{
-  typedef VectorH2<R_>                      Self;
-  typedef typename R_::FT                   FT;
-  typedef typename R_::RT                   RT;
-  typedef typename R_::Point_2              Point_2;
-  typedef typename R_::Segment_2            Segment_2;
-  typedef typename R_::Ray_2                Ray_2;
-  typedef typename R_::Line_2               Line_2;
-  typedef typename R_::Direction_2          Direction_2;
-  typedef typename R_::Vector_2             Vector_2;
-
-  typedef cpp11::array<RT, 3>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  typedef Rational_traits<FT>               Rat_traits;
-
-  Base base;
-
-public:
-
-  typedef const FT Cartesian_coordinate_type;
-  typedef const RT& Homogeneous_coordinate_type;
-  typedef Cartesian_const_iterator_d<typename Rep::const_iterator> Cartesian_const_iterator;
-
-  typedef R_                                    R;
-
-   VectorH2() {}
-
-   template < typename Tx, typename Ty >
-   VectorH2(const Tx & x, const Ty & y,
-            typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, RT>,
-                                                        boost::is_convertible<Ty, RT> > >::type* = 0)
-      : base(CGAL::make_array<RT>(x, y, RT(1))) {}
-
-   VectorH2(const FT& x, const FT& y)
-      : base(CGAL::make_array<RT>(
-             Rat_traits().numerator(x) * Rat_traits().denominator(y),
-             Rat_traits().numerator(y) * Rat_traits().denominator(x),
-             Rat_traits().denominator(x) * Rat_traits().denominator(y)))
-   {
-     CGAL_kernel_assertion(hw() > 0);
-   }
-
-   VectorH2(const RT& x, const RT& y, const RT& w )
-     : base( w >= RT(0) ? CGAL::make_array( x,  y,  w)
-                        : CGAL::make_array<RT>(-x, -y, -w) ) {}
-
-  const Self&
-  rep() const
-  {
-    return static_cast<const Self& >(*this);
-  }
-  
-   bool    operator==( const VectorH2<R>& v) const;
-   bool    operator!=( const VectorH2<R>& v) const;
-   bool    operator==( const Null_vector&) const;
-   bool    operator!=( const Null_vector& v) const;
-
-   const RT & hx() const { return CGAL::get(base)[0]; };
-   const RT & hy() const { return CGAL::get(base)[1]; };
-   const RT & hw() const { return CGAL::get(base)[2]; };
-
-   FT      x()  const { return FT(hx()) / FT(hw()); };
-   FT      y()  const { return FT(hy()) / FT(hw()); };
-
-   FT      cartesian(int i)   const;
-   const RT & homogeneous(int i) const;
-   FT      operator[](int i)  const;
-
-   Cartesian_const_iterator cartesian_begin() const
-   {
-     return make_cartesian_const_iterator_begin(CGAL::get(base).begin(),
-                                                boost::prior(CGAL::get(base).end()));
-   }
-
-   Cartesian_const_iterator cartesian_end() const
-   {
-     return make_cartesian_const_iterator_end(boost::prior(CGAL::get(base).end()));
-   }
-
-   int     dimension() const;
-   Direction_2 direction() const;
-   Vector_2 perpendicular(const Orientation& o ) const;
-
-  //   Vector_2 operator+(const VectorH2 &v) const;
-   Vector_2 operator-(const VectorH2 &v) const;
-   Vector_2 operator-() const;
-   Vector_2 opposite() const;
-   FT squared_length() const;
-  //   Vector_2 operator/(const RT &f) const;
-  //Vector_2 operator/(const FT &f) const;
-
-// undocumented:
-   VectorH2(const Direction_2 & dir)
-      : base ( dir) {}
-
-  VectorH2(const Point_2 & p)
-     : base ( p) {}
-};
-
-template < class R >
-inline
-bool
-VectorH2<R>::operator==( const Null_vector&) const
-{ return (hx() == RT(0)) && (hy() == RT(0)); }
-
-template < class R >
-inline
-bool
-VectorH2<R>::operator!=( const Null_vector& v) const
-{ return !(*this == v); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-VectorH2<R>::operator==( const VectorH2<R>& v) const
-{
-  return (  (hx() * v.hw() == v.hx() * hw() )
-          &&(hy() * v.hw() == v.hy() * hw() ) );
-}
-
-template < class R >
-inline
-bool
-VectorH2<R>::operator!=( const VectorH2<R>& v) const
-{ return !(*this == v); }  /* XXX */
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename VectorH2<R>::FT
-VectorH2<R>::cartesian(int i) const
-{
-  CGAL_kernel_precondition( (i==0 || i==1) );
-  if (i==0)
-      return x();
-  return y();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-const typename VectorH2<R>::RT &
-VectorH2<R>::homogeneous(int i) const
-{
-  CGAL_kernel_precondition( (i>=0) && (i<=2) );
-  return CGAL::get(base)[i];
-}
-
-template < class R >
-inline
-typename VectorH2<R>::FT
-VectorH2<R>::operator[](int i) const
-{ return cartesian(i); }
-
-template < class R >
-inline
-int
-VectorH2<R>::dimension() const
-{ return 2; }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename VectorH2<R>::Direction_2
-VectorH2<R>::direction() const
-{ return Direction_2(hx(), hy()); }
-
-template < class R >
-inline
-typename VectorH2<R>::Vector_2
-VectorH2<R>::operator-() const
-{ return VectorH2<R>(- hx(), - hy(), hw() ); }
-
-template < class R >
-inline
-typename VectorH2<R>::Vector_2
-VectorH2<R>::opposite() const
-{ return VectorH2<R>(- hx(), - hy(), hw() ); }
-
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename VectorH2<R>::Vector_2
-VectorH2<R>::operator-(const VectorH2<R>& v) const
-{
-  return VectorH2<R>( hx()*v.hw() - v.hx()*hw(),
-                      hy()*v.hw() - v.hy()*hw(),
-                      hw()*v.hw() );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename VectorH2<R>::FT
-VectorH2<R>::squared_length() const
-{
-  typedef typename R::FT FT;
-  return 
-    FT( CGAL_NTS square(hx()) + CGAL_NTS square(hy()) ) / 
-    FT( CGAL_NTS square(hw()) );
-}
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename R::Vector_2
-VectorH2<R>::perpendicular(const Orientation& o) const
-{
-  CGAL_kernel_precondition(o != COLLINEAR);
-  if (o == COUNTERCLOCKWISE)
-      return typename R::Vector_2(-hy(), hx(), hw());
-  else
-      return typename R::Vector_2(hy(), -hx(), hw());
-}
-
-} //namespace CGAL
-
-#endif // CGAL_HOMOGENEOUS_VECTOR_2_h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH3.h b/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH3.h
deleted file mode 100644
index d504087..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/VectorH3.h
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Stefan Schirra
- 
-#ifndef CGAL_HOMOGENEOUS_VECTOR_3_H
-#define CGAL_HOMOGENEOUS_VECTOR_3_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/array.h>
-#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
-
-#include <boost/next_prior.hpp>
-
-namespace CGAL {
-
-template < class R_ >
-class VectorH3
-{
-  typedef typename R_::RT                   RT;
-  typedef typename R_::FT                   FT;
-  typedef typename R_::Point_3              Point_3;
-  typedef typename R_::Vector_3             Vector_3;
-  typedef typename R_::Segment_3            Segment_3;
-  typedef typename R_::Ray_3                Ray_3;
-  typedef typename R_::Line_3               Line_3;
-  typedef typename R_::Direction_3          Direction_3;
-
-  typedef cpp11::array<RT, 4>               Rep;
-  typedef typename R_::template Handle<Rep>::type  Base;
-
-  typedef Rational_traits<FT>               Rat_traits;
-
-  Base base;
-
-public:
-
-  typedef Cartesian_const_iterator_d<typename Rep::const_iterator> Cartesian_const_iterator;
-
-  typedef R_                 R;
-
-  VectorH3() {}
-
-  VectorH3(const Point_3& a, const Point_3& b)
-  { *this = R().construct_vector_3_object()(a, b); }
-
-  VectorH3(const Segment_3& s)
-  { *this = R().construct_vector_3_object()(s); }
-
-  VectorH3(const Ray_3& r)
-  { *this = R().construct_vector_3_object()(r); }
-
-  VectorH3(const Line_3& l)
-  { *this = R().construct_vector_3_object()(l); }
-
-  VectorH3(const Null_vector&)
-    : base(CGAL::make_array(RT(0), RT(0), RT(0), RT(1))) {}
-
-  template < typename Tx, typename Ty, typename Tz >
-  VectorH3(const Tx & x, const Ty & y, const Tz & z,
-           typename boost::enable_if< boost::mpl::and_< boost::mpl::and_< boost::is_convertible<Tx, RT>,
-                                                                          boost::is_convertible<Ty, RT> >,
-                                                        boost::is_convertible<Tz, RT> > >::type* = 0)
-    : base(CGAL::make_array<RT>(x, y, z, RT(1))) {}
-
-  VectorH3(const FT& x, const FT& y, const FT& z)
-    : base(CGAL::make_array<RT>(
-           Rat_traits().numerator(x) * Rat_traits().denominator(y)
-                                     * Rat_traits().denominator(z),
-           Rat_traits().numerator(y) * Rat_traits().denominator(x)
-                                     * Rat_traits().denominator(z),
-           Rat_traits().numerator(z) * Rat_traits().denominator(x)
-                                     * Rat_traits().denominator(y),
-           Rat_traits().denominator(x) * Rat_traits().denominator(y)
-                                       * Rat_traits().denominator(z)))
-  {
-    CGAL_kernel_assertion(hw() > 0);
-  }
-
-  VectorH3(const RT& x, const RT& y, const RT& z, const RT& w)
-    : base( w >= RT(0) ? CGAL::make_array(x, y, z, w)
-                       : CGAL::make_array<RT>(-x, -y, -z, -w) ) {}
-
-  const RT & hx() const { return get(base)[0]; }
-  const RT & hy() const { return get(base)[1]; }
-  const RT & hz() const { return get(base)[2]; }
-  const RT & hw() const { return get(base)[3]; }
-  FT    x()  const { return FT(hx())/FT(hw()); }
-  FT    y()  const { return FT(hy())/FT(hw()); }
-  FT    z()  const { return FT(hz())/FT(hw()); }
-  const RT & homogeneous(int i) const;
-  FT    cartesian(int i) const;
-  FT    operator[](int i) const;
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return make_cartesian_const_iterator_begin(get(base).begin(),
-                                               boost::prior(get(base).end()));
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return make_cartesian_const_iterator_end(boost::prior(get(base).end()));
-  }
-
-  int   dimension() const { return 3; };
-
-  Direction_3 direction() const;
-
-  Vector_3 operator-() const;
-
-  bool  operator==( const VectorH3<R>& v) const;
-  bool  operator!=( const VectorH3<R>& v) const;
-
-  Vector_3 operator+( const VectorH3 &v) const;
-  Vector_3 operator-( const VectorH3 &v) const;
-  FT squared_length() const;
-  Vector_3 operator/( const RT &f) const;
-  Vector_3 operator/( const FT &f) const;
-};
-
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename VectorH3<R>::FT
-VectorH3<R>::cartesian(int i) const
-{
-  CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
-  switch (i)
-  {
-      case 0:   return x();
-      case 1:   return y();
-  }
-  return z();
-}
-
-template < class R >
-CGAL_KERNEL_INLINE
-const typename VectorH3<R>::RT &
-VectorH3<R>::homogeneous(int i) const
-{
-  CGAL_kernel_precondition(i == 0 || i == 1 || i == 2 || i == 3);
-  return get(base)[i];
-}
-
-template < class R >
-inline
-typename VectorH3<R>::Direction_3
-VectorH3<R>::direction() const
-{ return Direction_3(hx(), hy(), hz()); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-bool
-VectorH3<R>::operator==( const VectorH3<R>& v) const
-{
- return ( (hx() * v.hw() == v.hx() * hw() )
-        &&(hy() * v.hw() == v.hy() * hw() )
-        &&(hz() * v.hw() == v.hz() * hw() ) );
-}
-
-template < class R >
-inline
-bool
-VectorH3<R>::operator!=( const VectorH3<R>& v) const
-{ return !(*this == v); }
-
-template < class R >
-inline
-typename VectorH3<R>::FT
-VectorH3<R>::operator[](int i) const
-{ return cartesian(i); }
-
-template < class R >
-CGAL_KERNEL_INLINE
-typename VectorH3<R>::Vector_3
-VectorH3<R>::operator-() const
-{ return Vector_3( - hx(), - hy(), -hz(), hw() ); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename R::Vector_3
-VectorH3<R>::operator+(const VectorH3<R>& v) const
-{
-  return typename R::Vector_3(hx()*v.hw() + v.hx()*hw(),
-                              hy()*v.hw() + v.hy()*hw(),
-                              hz()*v.hw() + v.hz()*hw(),
-                              hw()*v.hw() );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename R::Vector_3
-VectorH3<R>::operator-(const VectorH3<R>& v) const
-{
-  return typename R::Vector_3(hx()*v.hw() - v.hx()*hw(),
-                              hy()*v.hw() - v.hy()*hw(),
-                              hz()*v.hw() - v.hz()*hw(),
-                              hw()*v.hw() );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename VectorH3<R>::FT
-VectorH3<R>::squared_length() const
-{
-  typedef typename R::FT FT;
-  return 
-    FT( CGAL_NTS square(hx()) + 
-	CGAL_NTS square(hy()) + 
-	CGAL_NTS square(hz()) ) / 
-    FT( CGAL_NTS square(hw()) );
-}
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename R::Vector_3
-VectorH3<R>::operator/(const typename VectorH3<R>::RT& f) const
-{ return typename R::Vector_3( hx(), hy(), hz(), hw()*f ); }
-
-template <class R>
-CGAL_KERNEL_INLINE
-typename R::Vector_3
-VectorH3<R>::operator/(const typename VectorH3<R>::FT& f) const
-{ return typename R::Vector_3(hx()*f.denominator(), hy()*f.denominator(),
-		              hz()*f.denominator(), hw()*f.numerator() ); }
-
-} //namespace CGAL
-
-#endif // CGAL_HOMOGENEOUS_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_iostream.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_iostream.h
deleted file mode 100644
index 820a085..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_iostream.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein           <wein at post.tau.ac.il>
-//                 (based on old version by Michal Meyerovitch and Ester Ezra)
-
-#ifndef CGAL_ARR_IOSTREAM_H
-#define CGAL_ARR_IOSTREAM_H
-
-/*! \file
- * Definition of the I/O operators for the class-template
- * Arrangement_on_surface_2<GeomTraits,TopTraits>.
- */
-
-#include <CGAL/Arrangement_on_surface_2.h>
-#include <CGAL/IO/Arr_text_formatter.h>
-#include <CGAL/IO/Arrangement_2_writer.h>
-#include <CGAL/IO/Arrangement_2_reader.h>
-#include <iostream>
-
-namespace CGAL {
-
-/*!
- * Write an arrangement to an output stream using a given formatter.
- * \param arr The arrangement.
- * \param os The output stream.
- * \param format The formatter.
- */
-template <class GeomTraits, class TopTraits, class Formatter>
-std::ostream&
-    write (const Arrangement_on_surface_2<GeomTraits,TopTraits>& arr,
-           std::ostream& os, 
-           Formatter& format)
-{
-  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
-  typedef Arrangement_2_writer<Arrangement_2>             Arr_writer;
-
-  Arr_writer      writer (arr);
-
-  format.set_out (os);
-  writer (format);
-  return (os);
-}
-
-/*!
- * Output operator (importer).
- * \param os The output stream.
- * \param arr The arrangement.
- */
-template <class GeomTraits, class TopTraits>
-std::ostream&
-    operator<< (std::ostream& os, 
-                const Arrangement_on_surface_2<GeomTraits,TopTraits>& arr)
-{
-  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
-  typedef Arrangement_2_writer<Arrangement_2>             Arr_writer;
-  typedef Arr_text_formatter<Arrangement_2>               Text_formatter;
-
-  Text_formatter text_format (os);
-  Arr_writer      writer (arr);
-
-  writer (text_format);
-  return (os);
-}
-
-/*!
- * Read an arrangement from an input stream using a given formatter.
- * \param arr The arrangement.
- * \param os The output stream.
- * \param format The formatter.
- */
-template <class GeomTraits, class TopTraits, class Formatter>
-std::istream&
-    read (Arrangement_on_surface_2<GeomTraits,TopTraits>& arr,
-          std::istream& is, 
-          Formatter& format)
-{
-  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
-  typedef Arrangement_2_reader<Arrangement_2>             Arr_reader;
-
-  Arr_reader      reader(arr);
-
-  format.set_in (is);
-  reader (format);
-  return (is);
-}
-
-/*!
- * Output operator (exporter).
- * \param is The input stream.
- * \param arr The arrangement.
- */
-template <class GeomTraits, class TopTraits>
-std::istream&
-    operator>> (std::istream& is, 
-                Arrangement_on_surface_2<GeomTraits,TopTraits>& arr)
-{
-  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
-  typedef Arrangement_2_reader<Arrangement_2>             Arr_reader;
-  typedef Arr_text_formatter<Arrangement_2>               Text_formatter;
-
-  Text_formatter text_format (is);
-  Arr_reader      reader(arr);
-  
-  reader (text_format);
-  return (is);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arrangement_2_writer.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Arrangement_2_writer.h
deleted file mode 100644
index e0a34db..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Arrangement_2_writer.h
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein           <wein at post.tau.ac.il>
-//                 (based on old version by Michal Meyerovitch and Ester Ezra)
-//
-#ifndef CGAL_IO_ARRANGEMENT_2_WRITER_H
-#define CGAL_IO_ARRANGEMENT_2_WRITER_H
-
-/*! \file
- * The header file for the Arrangement_2_writer<Arrangement> class.
- */
-
-#include <CGAL/Arr_accessor.h>
-#include <map>
-
-namespace CGAL {
-
-  /*! \class
-   * An auxiliary class for writing an arrangement to an output stream.
-   */
-  template <class Arrangement_>
-  class Arrangement_2_writer
-  {
-  public:
-
-    typedef Arrangement_                                  Arrangement_2;
-    typedef Arrangement_2_writer<Arrangement_2>           Self;
-
-  protected:
-
-    typedef typename Arrangement_2::Size                  Size;
-    typedef typename Arrangement_2::Dcel                  Dcel;
-
-    typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
-    typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
-    typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
-
-    typedef CGAL::Arr_accessor<Arrangement_2>             Arr_accessor;
-    typedef typename Arr_accessor::Dcel_vertex_iterator   Vertex_const_iterator;
-    typedef typename Arr_accessor::Dcel_edge_iterator     Edge_const_iterator;
-    typedef typename Arr_accessor::Dcel_face_iterator     Face_const_iterator;
-
-    typedef typename Arr_accessor::Dcel_outer_ccb_iterator
-      Outer_ccb_iterator;
-    typedef typename Arr_accessor::Dcel_inner_ccb_iterator
-      Inner_ccb_iterator;
-    typedef typename Arr_accessor::Dcel_iso_vertex_iterator
-      Isolated_vertex_iterator;
-
-    typedef typename Arr_accessor::Dcel_vertex            DVertex;
-    typedef typename Arr_accessor::Dcel_halfedge          DHalfedge;
-    typedef typename Arr_accessor::Dcel_face              DFace;
-    typedef std::map<const DVertex*, int>                 Vertex_index_map;
-    typedef std::map<const DHalfedge*, int>               Halfedge_index_map;
-
-    // Data memebrs:
-    const Arrangement_2&   m_arr;
-    const Dcel*            m_dcel;
-    int                    m_curr_v;
-    Vertex_index_map       m_v_index;
-    int                    m_curr_he;
-    Halfedge_index_map     m_he_index;
-
-  private:
-
-    // Copy constructor and assignment operator - not supported.
-    Arrangement_2_writer(const Self&);
-    Self& operator= (const Self&);
-
-  public:
-
-    /*! Constructor. */
-    Arrangement_2_writer(const Arrangement_2& arr) :
-      m_arr(arr),
-      m_dcel(NULL),
-      m_curr_v(0),
-      m_curr_he(0)
-    {
-      const Arr_accessor     arr_access(const_cast<Arrangement_2&>(arr));
-      m_dcel = &(arr_access.dcel());
-    }
-
-    /*! Destructor. */
-    virtual ~Arrangement_2_writer()
-    {}
-
-    /*! Write the arrangement. */
-    template <class Formatter>
-    void operator()(Formatter& formatter)
-    {
-      formatter.write_arrangement_begin();
-      formatter.write_size("number_of_vertices",
-                           m_dcel->size_of_vertices());
-      formatter.write_size("number_of_edges",
-                           m_dcel->size_of_halfedges() / 2);
-      formatter.write_size("number_of_faces",
-                           m_dcel->size_of_faces());
-
-      // Reset indices.
-      m_curr_v = 0;
-      m_curr_he = 0;
-
-      // Write the vertices.
-      formatter.write_vertices_begin();
-      Vertex_const_iterator  vit;
-      for (vit = m_dcel->vertices_begin(); vit != m_dcel->vertices_end(); ++vit)
-      {
-        _write_vertex(formatter, vit);
-      }
-      formatter.write_vertices_end();
-
-      // Write the edges.
-      formatter.write_edges_begin();
-      Edge_const_iterator    eit;
-      for (eit = m_dcel->edges_begin(); eit != m_dcel->edges_end(); ++eit)
-      {
-        _write_edge(formatter, eit);
-      }
-      formatter.write_edges_end();
-
-      // Write the faces (the fictitious face first).
-      formatter.write_faces_begin();
-
-      Face_const_iterator    fit;
-      for (fit = m_dcel->faces_begin(); fit != m_dcel->faces_end(); ++fit)
-        _write_face(formatter, fit);
-      formatter.write_faces_end();
-
-      formatter.write_arrangement_end();
-    }
-
-  protected:
-
-    /*! Write a vertex. */
-    template <class Formatter>
-    void _write_vertex(Formatter& formatter, Vertex_const_iterator vit)
-    {
-      // Map the current vertex to its index.
-      const DVertex* v = &(*vit);
-
-      m_v_index[v] = m_curr_v;
-      ++m_curr_v;
-
-      // Write the vertex.
-      formatter.write_vertex_begin();
-      formatter.write_vertex_index(static_cast<int>(v->parameter_space_in_x()));
-      formatter.write_vertex_index(static_cast<int>(v->parameter_space_in_y()));
-
-      if (! v->has_null_point())
-      {
-        // Write the associated point.
-        formatter.write_vertex_index(1);
-        formatter.write_point(v->point());
-
-        // Write additional user-defined data.
-        formatter.write_vertex_data(Vertex_const_handle(v));
-      }
-      else
-      {
-        // Mark that the vertex is not associated with a point.
-        formatter.write_vertex_index(0);
-      }
-
-      formatter.write_vertex_end();
-    }
-
-    /*! Write an edge (a pair of halfedges). */
-    template <class Formatter>
-    void _write_edge(Formatter& formatter, Edge_const_iterator hit)
-    {
-      // Map the halfedge and its twin to their indices.
-      const DHalfedge* he = &(*hit);
-      const DHalfedge* he_t = he->opposite();
-
-      m_he_index[&(*he)] = m_curr_he;
-      ++m_curr_he;
-      m_he_index[&(*he_t)] = m_curr_he;
-      ++m_curr_he;
-
-      // Write the edge.
-      formatter.write_edge_begin();
-      formatter.write_vertex_index(_index(he_t->vertex()));
-      formatter.write_vertex_index(_index(he->vertex()));
-    
-      if (he->direction() == ARR_LEFT_TO_RIGHT)
-        formatter.write_vertex_index(0);
-      else
-        formatter.write_vertex_index(1);
-      
-      if (! he->has_null_curve())
-      {
-        // Write the associated curve.
-        formatter.write_vertex_index(1);
-        formatter.write_x_monotone_curve(he->curve()); 
-
-        // Write additional user-defined data.
-        formatter.write_halfedge_data(Halfedge_const_handle(he));
-        formatter.write_halfedge_data(Halfedge_const_handle(he_t));
-      }
-      else
-      {
-        // Mark that the edge is fictitious.
-        formatter.write_vertex_index(0);
-      }
-      formatter.write_edge_end();
-    }
-
-    /*! Write a face. */
-    template <class Formatter>
-    void _write_face(Formatter& formatter, Face_const_iterator fit) const
-    {
-      const DFace* f = &(*fit);
-
-      formatter.write_face_begin();
-
-      // Write whether the face is unbounded and whether it is valid
-      // (non-fictitious).
-      if (f->is_unbounded())
-        formatter.write_vertex_index(1);
-      else
-        formatter.write_vertex_index(0);
-
-      if (! f->is_fictitious())
-        formatter.write_vertex_index(1);
-      else
-        formatter.write_vertex_index(0);
-
-      // Write the outer CCBs of the face.
-      const std::size_t    n_occbs = f->number_of_outer_ccbs();
-      Outer_ccb_iterator   oc_it;
-
-      formatter.write_outer_ccbs_begin();
-      formatter.write_size("number_of_outer_ccbs", n_occbs);
-      for (oc_it = f->outer_ccbs_begin();
-           oc_it != f->outer_ccbs_end(); ++oc_it)
-      {
-        const std::size_t              n = _circulator_size(*oc_it);
-
-        formatter.write_size("halfedges_on_outer_ccb", n);
-        _write_ccb(formatter, *oc_it);      
-      }
-      formatter.write_inner_ccbs_end();
-
-      // Write the inner CCBs of the face.
-      const std::size_t    n_iccbs = f->number_of_inner_ccbs();
-      Inner_ccb_iterator   ic_it;
-
-      formatter.write_inner_ccbs_begin();
-      formatter.write_size("number_of_inner_ccbs", n_iccbs);
-      for (ic_it = f->inner_ccbs_begin(); ic_it != f->inner_ccbs_end(); ++ic_it)
-      {
-        const std::size_t n = _circulator_size(*ic_it);
-        formatter.write_size("halfedges_on_inner_ccb", n);
-        _write_ccb(formatter, *ic_it);      
-      }
-      formatter.write_inner_ccbs_end();
-
-      // Write the isolated vertices inside the face.
-      std::size_t n_isolated = f->number_of_isolated_vertices();
-      formatter.write_size("number_of_isolated_vertices", n_isolated);
-      if (n_isolated) {
-        formatter.write_isolated_vertices_begin();
-        Isolated_vertex_iterator iso_vit;
-        for (iso_vit = f->isolated_vertices_begin();
-             iso_vit != f->isolated_vertices_end(); ++iso_vit)
-          formatter.write_vertex_index(_index(&(*iso_vit)));
-        formatter.write_isolated_vertices_end();
-      }
-    
-      // Write additional user-defined data associated with the face.
-      if (! f->is_fictitious())
-        formatter.write_face_data(Face_const_handle(f));
-
-      formatter.write_face_end();
-    }
-
-    /*! Write the edges along a given CCB. */
-    template <class Formatter>   
-    void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const      
-    {
-      const DHalfedge* curr = ccb;
-
-      formatter.write_ccb_halfedges_begin();
-      do {
-        formatter.write_halfedge_index(_index(curr));
-        curr = curr->next();
-      } while (curr != ccb);
-      formatter.write_ccb_halfedges_end();
-    }
-  
-    /*! Get the mapped index of a given vertex. */
-    int _index(const DVertex* v) const
-    {
-      typename Vertex_index_map::const_iterator   pos = m_v_index.find(v);
-
-      CGAL_assertion(pos != m_v_index.end());
-      return (pos->second);
-    }
-
-    /*! Get the mapped index of a given halfegde. */
-    int _index(const DHalfedge* he) const
-    {
-      typename Halfedge_index_map::const_iterator  pos = m_he_index.find(he);
-
-      CGAL_assertion(pos != m_he_index.end());
-      return (pos->second);
-    }
-
-    /*! Get the number of edges along a given CCB. */
-    std::size_t _circulator_size(const DHalfedge* ccb) const
-    {
-      CGAL_assertion(ccb != NULL);
-
-      std::size_t       n = 0;
-      const DHalfedge*  curr = ccb;
-
-      do {
-        ++n;
-        curr = curr->next();
-      } while (curr != ccb);
-
-      return (n);
-    }  
-  };
-
-} //namespace CGAL
-
-#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Color.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Color.h
deleted file mode 100644
index 9a8e02b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Color.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#include <CGAL/config.h>
-
-#ifndef CGAL_COLOR_H
-#define CGAL_COLOR_H
-
-namespace CGAL {
-
-class Color {
-public:
-  Color() {}
-  Color(unsigned char red, 
-	unsigned char green, 
-	unsigned char blue, 
-	unsigned char alpha = 120)
-    : _red(red), _green(green), _blue(blue), _alpha(alpha)
-  {}
-
-  unsigned char r() const {return _red;}
-  unsigned char g() const {return _green;}
-  unsigned char b() const {return _blue;}
-
-  unsigned char red() const {return _red;}
-  unsigned char green() const {return _green;}
-  unsigned char blue() const {return _blue;}
-  unsigned char alpha() const {return _alpha;}
-  void set_alpha(unsigned char a) {_alpha=a;}
-  bool operator==(const Color &c) const
-  {
-    return ( (red() == c.red()) &&
-             (green() == c.green()) &&
-             (blue() == c.blue()) );
-  }
-
-  bool operator!=(const Color &c) const
-  {
-    return !( (*this) == c);
-  }
-
-  Color& operator=(const Color &c)
-  {
-    _red = c.red();
-    _green = c.green();
-    _blue = c.blue();
-    _alpha = c.alpha();
-    return *this;
-  }
-
-private:
-  unsigned char _red;
-  unsigned char _green;
-  unsigned char _blue;
-  unsigned char _alpha;
-};
-
-
-CGAL_EXPORT extern const Color BLACK  ;
-CGAL_EXPORT extern const Color WHITE  ;
-CGAL_EXPORT extern const Color GRAY  ;
-
-CGAL_EXPORT extern const Color RED    ;
-CGAL_EXPORT extern const Color GREEN  ;
-
-CGAL_EXPORT extern const Color DEEPBLUE  ;
-CGAL_EXPORT extern const Color BLUE   ;
-CGAL_EXPORT extern const Color PURPLE ;
-CGAL_EXPORT extern const Color VIOLET ;
-
-CGAL_EXPORT extern const Color ORANGE ;
-CGAL_EXPORT extern const Color YELLOW ;
-
-
-} //namespace CGAL
-
-#endif  // CGAL_COLOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h
deleted file mode 100644
index 678a3e8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008       GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
-#define CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
-
-#include <CGAL/Modifier_base.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-
-namespace CGAL {
-
-template <class C2T3, class Polyhedron_>
-class Complex_2_in_triangulation_3_polyhedron_builder
-  : public CGAL::Modifier_base<typename Polyhedron_::HalfedgeDS>
-{
-public:
-  typedef C2T3 C2t3;
-  typedef Polyhedron_ Polyhedron;
-  typedef typename Polyhedron::HalfedgeDS HDS;
-
-private:
-  typedef typename C2T3::Triangulation Tr;
-
-  const C2t3& c2t3;
-  typedef CGAL::Modifier_base<typename Polyhedron::HalfedgeDS> Base;
-
-  template <class IBuilder, class Vertex_handle>
-  int get_vertex_index(IBuilder& builder, Vertex_handle vh, std::map<Vertex_handle, int>& V, int& inum)
-  {
-    typedef typename std::map<Vertex_handle, int>::iterator map_iterator;
-    std::pair<map_iterator,bool> insert_res = V.insert( std::make_pair(vh,inum) );
-    if ( insert_res.second ){
-      typename Tr::Point p = static_cast<typename Tr::Point>(vh->point());
-      builder.add_vertex(p);
-      ++inum;
-    }
-    return insert_res.first->second;
-  }
-
-public:
-  Complex_2_in_triangulation_3_polyhedron_builder(const C2t3& c2t3)
-    : Base(), c2t3(c2t3)
-  {
-  }
-
-  void operator()(HDS& hds) {
-    typedef typename Tr::Vertex_handle Vertex_handle;
-    typedef typename Tr::Geom_traits::Vector_3 Vector;
-    typedef typename Tr::Edge Edge;
-    typedef typename Tr::Facet Facet;
-    typedef typename Tr::Finite_facets_iterator Finite_facets_iterator;
-
-    const Tr& tr = c2t3.triangulation();
-    CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds, true);
-    const typename Tr::size_type number_of_facets = c2t3.number_of_facets();
-    builder.begin_surface(tr.number_of_vertices(),
-			  number_of_facets);
-    {
-      // Finite vertices coordinates.
-      Finite_facets_iterator fit = tr.finite_facets_begin();
-      std::set<Facet> oriented_set;
-      std::stack<Facet> stack;
-
-      CGAL_assertion_code(typename Tr::size_type nb_facets = 0; )
-
-      while (oriented_set.size() != number_of_facets) {
-        while ( fit->first->is_facet_on_surface(fit->second) == false ||
-                oriented_set.find(*fit) != oriented_set.end() ||
-
-                oriented_set.find(c2t3.opposite_facet(*fit)) !=
-                oriented_set.end() ) {
-          ++fit;
-        }
-        oriented_set.insert(*fit);
-        stack.push(*fit);
-        while(! stack.empty() ) {
-          Facet f = stack.top();
-          stack.pop();
-          for(int ih = 0 ; ih < 3 ; ++ih) {
-            const int i1  = tr.vertex_triple_index(f.second, tr. cw(ih));
-            const int i2  = tr.vertex_triple_index(f.second, tr.ccw(ih));
-            if( c2t3.face_status(Edge(f.first, i1, i2)) == C2t3::REGULAR ) {
-              Facet fn = c2t3.neighbor(f, ih);
-              if (oriented_set.find(fn) == oriented_set.end() &&
-                  oriented_set.find(c2t3.opposite_facet(fn)) == oriented_set.end())
-              {
-                oriented_set.insert(fn);
-                stack.push(fn);
-              }
-            } // end "if the edge is regular"
-          } // end "for each neighbor of f"
-        } // end "stack non empty"
-      } // end "oriented_set not full"
-
-      // Orients the whole mesh towards outside:
-      // - find the facet with max z
-      typename std::set<Facet>::const_iterator top_facet = oriented_set.begin();
-      for(typename std::set<Facet>::const_iterator fit = oriented_set.begin();
-	  fit != oriented_set.end();
-	  ++fit)
-      {
-	double top_z = 
-	  (top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0))->point().z()
-	 + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1))->point().z()
-	 + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2))->point().z())/3.;
-	double z = 
-	  (fit->first->vertex(tr.vertex_triple_index(fit->second, 0))->point().z()
-	 + fit->first->vertex(tr.vertex_triple_index(fit->second, 1))->point().z()
-	 + fit->first->vertex(tr.vertex_triple_index(fit->second, 2))->point().z())/3.;
-        if (top_z < z)
-          top_facet = fit;
-      }
-      // - orient the facet with max z towards +Z axis
-      Vertex_handle v0 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0));
-      Vertex_handle v1 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1));
-      Vertex_handle v2 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2));
-      Vector normal = cross_product(v1->point()-v0->point(), v2->point()-v1->point());
-      const Vector Z(0, 0, 1);
-      bool regular_orientation = (Z * normal >= 0);
-
-      //used to set indices of vertices
-      std::map<Vertex_handle, int> V;
-      int inum = 0;
-      
-      for(typename std::set<Facet>::const_iterator fit =
-	    oriented_set.begin();
-	  fit != oriented_set.end();
-	  ++fit)
-      {
-	int indices[3];
-	int index = 0;
-	for (int i=0; i<3; i++)
-	  indices[index++] = get_vertex_index(
-            builder, fit->first->vertex(tr.vertex_triple_index(fit->second, i)), V, inum
-          );
-	builder.begin_facet();
-	  builder.add_vertex_to_facet(indices[0]);
-	  builder.add_vertex_to_facet(regular_orientation ? indices[1] : indices[2]);
-	  builder.add_vertex_to_facet(regular_orientation ? indices[2] : indices[1]);
-	builder.end_facet();
-	CGAL_assertion_code(++nb_facets);
-      }
-      CGAL_assertion(nb_facets == number_of_facets);
-      // 	for( Finite_facets_iterator fit = tr.finite_facets_begin();
-      // 	     fit != tr.finite_facets_end(); ++fit)
-      // 	  if ((*fit).first->is_facet_on_surface((*fit).second)==true)
-      // 	  {
-      // 	    int indices[3];
-      // 	    int index = 0;
-      // 	    for (int i=0; i<3; i++)
-      // 	      std::cerr << ( indices[index++] = V[(*fit).first->vertex(tr.vertex_triple_index(fit->second, i))] ) << ", ";
-      // 	    std::cerr << "\n";
-      // 	    if( builder.test_facet(indices+0, indices+3) )
-      // 	      builder.add_facet(indices+0, indices+3);
-      // 	    else
-      // 	    {
-      // 	      builder.begin_facet();
-      // 	      builder.add_vertex_to_facet(indices[2]);
-      // 	      builder.add_vertex_to_facet(indices[1]);
-      // 	      builder.add_vertex_to_facet(indices[0]);
-      // 	      builder.end_facet();
-      // 	    }
-      // 	    CGAL_assertion_code(++nb_facets);
-      // 	  }
-    }
-    builder.end_surface();
-  } // end operator()
-}; // end Complex_2_in_triangulation_3_polyhedron_builder
-
-} // end namespace CGAL
-
-#endif  // CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h
deleted file mode 100644
index 3d6b9f8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2008  GeometryFactory, Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
-#define CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
-
-#include <map>
-
-#include <vtkPoints.h>
-#include <vtkPolyData.h>
-#include <vtkCellArray.h>
-#include <vtkType.h>
-
-namespace CGAL {
-
-template <typename C2T3>
-vtkPolyData* output_c2t3_to_vtk_polydata(const C2T3& c2t3, 
-                                         vtkPolyData* polydata = 0)
-{
-  typedef typename C2T3::Triangulation Triangulation;
-  typedef typename Triangulation::Vertex_handle Vertex_handle;
-
-  const Triangulation& tr = c2t3.triangulation();
-
-  vtkPoints* const vtk_points = vtkPoints::New();
-  vtkCellArray* const vtk_cells = vtkCellArray::New();
-
-  vtk_points->Allocate(c2t3.triangulation().number_of_vertices());
-  vtk_cells->Allocate(c2t3.number_of_facets());
-
-  std::map<Vertex_handle, vtkIdType> V;
-  vtkIdType inum = 0;
-
-  for(typename Triangulation::Finite_vertices_iterator 
-        vit = tr.finite_vertices_begin(),
-        end = tr.finite_vertices_end();
-      vit != end;
-      ++vit)
-  {
-    typedef typename Triangulation::Point Point;
-    const Point& p = vit->point();
-    double pts[3];
-    vtk_points->InsertNextPoint(CGAL::to_double(p.x()),
-                                CGAL::to_double(p.y()),
-                                CGAL::to_double(p.z()));
-    V[vit] = inum++;
-  }
-  for(typename C2T3::Facet_iterator 
-        fit = c2t3.facets_begin(),
-        end = c2t3.facets_end();
-      fit != end; ++fit) 
-  {
-    vtkIdType cell[3];
-    int j=0;
-    for (int i = 0; i < 4; ++i)
-      if (i != fit->second)
-        cell[j++] =  V[(*fit).first->vertex(i)];
-    CGAL_assertion(j==3);
-    vtk_cells->InsertNextCell(3, cell);
-  }
-  if(!polydata) {
-    polydata = vtkPolyData::New();
-  }
-
-  polydata->SetPoints(vtk_points);
-  vtk_points->Delete();
-
-  polydata->SetPolys(vtk_cells);
-  vtk_cells->Delete();
-  return polydata;
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Custom_zoom_layer.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Custom_zoom_layer.h
deleted file mode 100644
index 17ebb30..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Custom_zoom_layer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_CUSTOM_ZOOM_LAYER_H
-#define CGAL_CUSTOM_ZOOM_LAYER_H
-
-#include <CGAL/IO/Qt_widget_zoomrect.h>
-
-class Custom_zoom_layer : public CGAL::Qt_widget_zoomrect{
-public:
-  Custom_zoom_layer(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_zoomrect(parent, name){}
-  
-protected:
-  void keyPressEvent(QKeyEvent *e){
-    if ( e->key() == Qt::Key_Plus ){
-      widget->zoom(2);
-    } else if ( e->key() == Qt::Key_Minus){
-      widget->zoom(0.5);
-    }
-  }
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton 
-      && (e->state() & Qt::ControlButton))
-    {
-      if (!on_first){
-        first_x = e->x();
-        first_y = e->y();
-        on_first = true;
-      }
-    }
-  }
-  void mouseReleaseEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton
-      && (e->state() & Qt::ControlButton))
-    {
-      if((e->x() != first_x) && (e->y() != first_y)) {
-        double x, y, xfirst2, yfirst2;
-        widget->x_real(e->x(), x); widget->y_real(e->y(), y);
-        widget->x_real(first_x, xfirst2); widget->y_real(first_y, yfirst2);
-        double	xmin, xmax, ymin, ymax;
-        if(x < xfirst2) {xmin = x; xmax = xfirst2;}
-        else {xmin = xfirst2; xmax = x;};
-        if(y < yfirst2) {ymin = y; ymax = yfirst2;}
-        else {ymin = yfirst2; ymax = y;};
-        widget->set_window(xmin, xmax, ymin, ymax);        
-        on_first = false;
-      }
-    }
-  }
-  void activating(){
-    widget->setFocusPolicy(QWidget::ClickFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(crossCursor);
-  }
-  QCursor oldcursor;
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_OFF.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_OFF.h
deleted file mode 100644
index 726e3aa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_OFF.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-
-#ifndef CGAL_IO_FILE_HEADER_OFF_H
-#define CGAL_IO_FILE_HEADER_OFF_H 1
-
-#include <CGAL/IO/File_header_extended_OFF.h>
-#include <iostream>
-
-namespace CGAL {
-
-// Info structure for OFF file headers
-// ===================================
-class CGAL_EXPORT File_header_OFF : public File_header_extended_OFF {
-private:
-    // Publicly accessible file informations.
-    std::size_t  n_vertices;
-  std::size_t n_facets;
-    bool m_skel;        // SKEL format instead of OFF.
-    bool m_binary;      // OFF in binary format.
-    bool m_no_comments; // no comments in output.
-  std::size_t  m_offset;      // index offset for vertices, usually 0.
-
-    // Publicly accessible but not that well supported file informations.
-    bool m_colors;      // COFF detected.
-    bool m_normals;     // NOFF format stores also normals at vertices.
-
-    // More privately used file informations to scan the file.
-    bool m_tag4;        // 4OFF detected.
-    bool m_tagDim;      // nOFF detected (will not be supported).
-    int  m_dim;         // dimension for nOFF (will not be supported).
-public:
-    typedef  File_header_OFF           Self;
-    typedef  File_header_extended_OFF  Base;
-
-    explicit File_header_OFF( bool verbose = false);
-    File_header_OFF( bool binary, bool noc, bool skel,
-                     bool verbose = false);
-    //File_header_OFF( int v, int h, int f, bool verbose = false);
-    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
-                     bool binary, bool noc, bool skel,
-                     bool verbose = false);
-    File_header_OFF( const File_header_extended_OFF& ext_header);
-    File_header_OFF( const File_header_extended_OFF& ext_header,
-                     bool binary, bool noc, bool skel);
-    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
-                     const File_header_extended_OFF& ext_header);
-    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
-                     const File_header_extended_OFF& ext_header,
-                     bool binary, bool noc, bool skel);
-
-    Self& operator= ( const Base& base) { (Base&)(*this) = base;
-                                          return *this;
-                                        }
-    std::size_t  size_of_vertices()   const { return n_vertices; }
-    std::size_t  size_of_facets()     const { return n_facets; }
-
-    bool skel()               const { return m_skel; }   // SKEL format.
-    bool off()                const { return ! m_skel; } // OFF format.
-    bool binary()             const { return m_binary; } // binary format.
-    bool ascii()              const { return ! m_binary; } // ASCII format.
-    bool no_comments()        const { return m_no_comments; }
-    bool comments()           const { return ! m_no_comments; }
-
-    std::size_t  index_offset()       const { return m_offset; }
-    bool has_colors()         const { return m_colors; } // COFF detected.
-    bool has_normals()        const { return m_normals;} // NOFF format.
-    bool is_homogeneous()     const { return m_tag4; }   // 4OFF detected.
-                           // nOFF detected. (will not be supported).
-    bool n_dimensional()      const { return m_tagDim; }
-                           // dimension for nOFF (will not be supported).
-    int  dimension()          const { return m_dim; }
-
-    void set_vertices( std::size_t n)       { n_vertices = n; }
-    void set_facets( std::size_t n)         { n_facets   = n; }
-
-    void set_skel( bool b)          { m_skel        = b; }
-    void set_binary( bool b)        { m_binary      = b; }
-    void set_no_comments( bool b)   { m_no_comments = b; }
-    void set_index_offset( std::size_t i)   { m_offset      = i; }
-
-    void set_colors( bool b)        { m_colors      = b; }
-    void set_normals( bool b)       { m_normals     = b;}
-    void set_homogeneous( bool b)   { m_tag4        = b; }
-    void set_dimensional( bool b)   { m_tagDim      = b; }
-    void set_dimension( int i)      { m_dim         = i; }
-    Self& operator+=( const Self& header);
-};
-
-// Write header.
-CGAL_EXPORT std::ostream& operator<<( std::ostream& out, const File_header_OFF& h);
-
-// Scan header. Marks streams badbit if not in SKEL format nor in OFF.
-CGAL_EXPORT std::istream& operator>>( std::istream& in, File_header_OFF& h);
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_HEADER_OFF_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_extended_OFF.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_extended_OFF.h
deleted file mode 100644
index 75679a4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_header_extended_OFF.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-
-#ifndef CGAL_IO_FILE_HEADER_EXTENDED_OFF_H
-#define CGAL_IO_FILE_HEADER_EXTENDED_OFF_H 1
-#include <CGAL/basic.h>
-
-#include <iostream>
-#include <string>
-
-
-namespace CGAL {
-
-class  CGAL_EXPORT File_header_extended_OFF {
-    bool     m_verbose;     // Print error messages if true.
-    bool     m_polyhedral_surface;
-  std::size_t      m_halfedges;
-    bool     m_triangulated;
-    bool     m_non_empty_facets;
-    bool     m_terrain;
-    bool     m_normalized_to_sphere;
-    double   m_radius;
-    bool     m_rounded;
-    int      m_rounded_bits;
-    bool     m_off_header;
-public:
-    typedef  File_header_extended_OFF  Self;
-    File_header_extended_OFF( bool verbose = false)
-    :   m_verbose               ( verbose),
-        m_polyhedral_surface    ( false),
-        m_halfedges             ( 0),
-        m_triangulated          ( false),
-        m_non_empty_facets      ( false),
-        m_terrain               ( false),
-        m_normalized_to_sphere  ( false),
-        m_radius                ( 0.0),
-        m_rounded               ( false),
-        m_rounded_bits          ( 0),
-        m_off_header            ( true)
-    {}
-    // Access:
-    bool   verbose()              const { return m_verbose; }
-    bool   polyhedral_surface()   const { return m_polyhedral_surface; }
-  std::size_t    halfedges()            const { return m_halfedges; }
-  std::size_t    size_of_halfedges()    const { return m_halfedges; }
-    bool   triangulated()         const { return m_triangulated; }
-    bool   non_empty_facets()     const { return m_non_empty_facets; }
-    bool   terrain()              const { return m_terrain; }
-    bool   normalized_to_sphere() const { return m_normalized_to_sphere; }
-    double radius()               const { return m_radius; }
-    bool   rounded()              const { return m_rounded; }
-    int    rounded_bits()         const { return m_rounded_bits; }
-    bool   off_header()           const { return m_off_header; }
-    // Derived predicates about the file format.
-    bool   is_OFF()               const { return m_off_header; }
-    bool   is_POL()               const;
-    bool   is_CBP()               const;
-    bool   is_TRN()               const;
-    int    is_CBPn()              const;
-    int    is_TRNn()              const;
-    // The proper file suffix with respect to file format.
-    std::string suffix() const;
-    // The proper format name.
-    std::string format_name() const;
-    // Set values:
-    void   set_verbose( bool b)              { m_verbose            = b; }
-    void   set_polyhedral_surface( bool b)   { m_polyhedral_surface = b; }
-  void   set_halfedges( std::size_t h)       { m_halfedges          = h; }
-    void   set_triangulated( bool b)         { m_triangulated       = b; }
-    void   set_non_empty_facets( bool b)     { m_non_empty_facets   = b; }
-    void   set_terrain( bool b)              { m_terrain            = b; }
-    void   set_normalized_to_sphere( bool b) { m_normalized_to_sphere = b;}
-    void   set_radius( double d)             { m_radius             = d; }
-    void   set_rounded( bool b)              { m_rounded            = b; }
-    void   set_rounded_bits( int i)          { m_rounded_bits       = i; }
-    void   set_off_header( bool b)           { m_off_header         = b; }
-    Self&  operator+=( const Self& header); // union of two headers
-};
-
-// Write extended header incl. CGAL/ENDCBP keywords.
-std::ostream& operator<<( std::ostream& out,
-                          const File_header_extended_OFF& h);
-
-// Scan extended header. The CBP keyword must be read already.
-std::istream& operator>>( std::istream& in, File_header_extended_OFF& h);
-
-// istream modifier skips chars until end of line.
-inline std::istream& skip_until_EOL( std::istream& in) {
-    char c;
-    while ( in.get(c) && c != '\n')
-        ;
-    return in;
-}
-
-// istream modifier that checks for OFF comments and removes them.
-inline std::istream& skip_comment_OFF( std::istream& in) {
-    char c;
-    while( (in >> c) && c == '#')
-        in >> skip_until_EOL;
-    in.putback(c);
-    return in;
-}
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_HEADER_EXTENDED_OFF_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_medit.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_medit.h
deleted file mode 100644
index 754b1fa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_medit.h
+++ /dev/null
@@ -1,908 +0,0 @@
-// Copyright (c) 2004-2006  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent RINEAU, Stephane Tayeb
-
-#ifndef CGAL_IO_FILE_MEDIT_H
-#define CGAL_IO_FILE_MEDIT_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <iostream>
-#include <map>
-#include <set>
-#include <vector>
-#include <string>
-#include <CGAL/utility.h>
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-
-//-------------------------------------------------------
-// Needed in verbose mode
-//-------------------------------------------------------
-#ifdef CGAL_MESH_3_IO_VERBOSE
-template<class T>
-inline
-std::ostream&
-operator<<(std::ostream &os, const std::pair<T,T>& pair)
-{
-  return os << "<" << pair.first << "," << pair.second << ">";
-}
-#endif
-
-// -----------------------------------
-// Rebin_cell_pmap
-// -----------------------------------
-template <typename C3T3>
-class Rebind_cell_pmap
-{
-  typedef typename C3T3::Subdomain_index Subdomain_index;
-  typedef std::map<Subdomain_index,int> Subdomain_map;
-  typedef typename C3T3::Cell_handle Cell_handle;
-  typedef unsigned int size_type;
-
-public:
-  Rebind_cell_pmap(const C3T3& c3t3)
-    : r_c3t3_(c3t3)
-  {
-    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
-
-    int first_index = 0;
-    int index_counter = first_index + 1;
-
-    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
-         cell_it != r_c3t3_.cells_in_complex_end();
-         ++cell_it)
-    {
-      // Add subdomain index in internal map if needed
-      if ( subdomain_map_.end() ==
-              subdomain_map_.find(r_c3t3_.subdomain_index(cell_it)) )
-      {
-        subdomain_map_.insert(std::make_pair(r_c3t3_.subdomain_index(cell_it),
-                                             index_counter));
-        ++index_counter;
-      }
-    }
-    
-    // Rebind indices in alphanumeric order
-    index_counter = first_index + 1;
-    for ( typename Subdomain_map::iterator mit = subdomain_map_.begin() ;
-          mit != subdomain_map_.end() ;
-          ++mit )
-    {
-      mit->second = index_counter++;
-    }
-
-#ifdef CGAL_MESH_3_IO_VERBOSE
-    std::cerr << "Nb of subdomains: " << subdomain_map_.size() << "\n";
-    std::cerr << "Subdomain mapping:\n\t" ;
-
-    typedef typename Subdomain_map::iterator Subdomain_map_iterator;
-    for ( Subdomain_map_iterator sub_it = subdomain_map_.begin() ;
-          sub_it != subdomain_map_.end() ;
-          ++sub_it )
-    {
-      std::cerr << "[" << (*sub_it).first << ":" << (*sub_it).second << "] ";
-    }
-    std::cerr << "\n";
-#endif
-  }
-
-  int subdomain_index(const Cell_handle& ch) const
-  {
-    return subdomain_index(r_c3t3_.subdomain_index(ch));
-  }
-
-  size_type subdomain_number() const
-  {
-    return subdomain_map_.size();
-  }
-
-private:
-  int subdomain_index(const Subdomain_index& index) const
-  {
-    typedef typename Subdomain_map::const_iterator Smi;
-    Smi elt_it = subdomain_map_.find(index);
-    if ( elt_it != subdomain_map_.end() )
-      return elt_it->second;
-    else
-      return -1;
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-  Subdomain_map subdomain_map_;
-};
-  
-// Accessor  
-template <typename C3T3>
-int
-get(const Rebind_cell_pmap<C3T3>& cmap,
-    const typename C3T3::Cell_handle& ch)
-{
-  return cmap.subdomain_index(ch);
-}
-
-template <typename C3T3>
-unsigned int get_size(const Rebind_cell_pmap<C3T3>& cmap)
-{
-  return cmap.subdomain_number();
-}
-  
-
-// -----------------------------------
-// No_rebind_cell_pmap
-// -----------------------------------
-template <typename C3T3>
-class No_rebind_cell_pmap
-{
-  typedef typename C3T3::Subdomain_index Subdomain_index;
-  typedef typename C3T3::Cell_handle Cell_handle;
-  typedef unsigned int size_type;
-  
-public:
-  No_rebind_cell_pmap(const C3T3& c3t3)
-    : r_c3t3_(c3t3) {}
-  
-  int subdomain_index(const Cell_handle& ch) const
-  {
-    return static_cast<int>(r_c3t3_.subdomain_index(ch));
-  }
-  
-  size_type subdomain_number() const
-  {
-    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
-    std::set<Subdomain_index> subdomain_set;
-    
-    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
-        cell_it != r_c3t3_.cells_in_complex_end();
-        ++cell_it)
-    {
-      // Add subdomain index in set if new
-      if ( subdomain_set.end() == subdomain_set.find(subdomain_index(cell_it)) )
-      {
-        subdomain_set.insert(subdomain_index(cell_it));
-      }
-    }
-    
-    return subdomain_set.size();
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-};
-  
-// Accessor  
-template <typename C3T3>
-int
-get(const No_rebind_cell_pmap<C3T3>& cmap,
-    const typename C3T3::Cell_handle& ch)
-{
-  return cmap.subdomain_index(ch);
-}
-  
-  
-// -----------------------------------
-// Rebind_facet_pmap
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class Rebind_facet_pmap
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef std::map<Surface_patch_index,int> Surface_map;
-  typedef typename C3T3::Facet Facet;
-  typedef unsigned int size_type;
-  
-public:
-  Rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& cell_pmap)
-    : r_c3t3_(c3t3)
-    , cell_pmap_(cell_pmap)
-  {
-    typedef typename C3T3::Facets_in_complex_iterator Facet_iterator;
-    
-    int first_index = 1;
-    int index_counter = first_index;
-    
-    for( Facet_iterator facet_it = r_c3t3_.facets_in_complex_begin();
-        facet_it != r_c3t3_.facets_in_complex_end();
-        ++facet_it)
-    {
-      // Add surface index in internal map if needed
-      if ( surface_map_.end() ==
-          surface_map_.find(c3t3.surface_patch_index((*facet_it).first,
-                                                     (*facet_it).second)) )
-      {
-        surface_map_.insert(std::make_pair(r_c3t3_.surface_patch_index(*facet_it),
-                                           index_counter));
-        ++index_counter;
-      }
-    }
-    
-    // Find cell_pmap_ unused indices
-    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
-    std::set<int> cell_label_set;
-    
-    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
-        cell_it != r_c3t3_.cells_in_complex_end();
-        ++cell_it)
-    {
-      // Add subdomain index in set if new
-      if ( cell_label_set.end()
-          == cell_label_set.find(get(cell_pmap_,cell_it)) )
-      {
-        cell_label_set.insert(get(cell_pmap_,cell_it));
-      }
-    }
-    
-    // Rebind indices
-    index_counter = get_first_unused_label(cell_label_set,first_index);
-    for ( typename Surface_map::iterator mit = surface_map_.begin() ;
-         mit != surface_map_.end() ;
-         ++mit )
-    {
-      mit->second = index_counter++;
-      index_counter = get_first_unused_label(cell_label_set,index_counter);
-    }
-    
-#ifdef CGAL_MESH_3_IO_VERBOSE
-    std::cerr << "Nb of surface patches: " << surface_map_.size() << "\n";
-    std::cerr << "Surface mapping:\n\t" ;
-    
-    typedef typename Surface_map::iterator Surface_map_iterator;
-    for ( Surface_map_iterator surf_it = surface_map_.begin() ;
-         surf_it != surface_map_.end() ;
-         ++surf_it )
-    {
-      std::cerr << "[" << (*surf_it).first
-      << ":" << (*surf_it).second << "] ";
-    }
-    std::cerr << "\n";
-#endif
-  }
-  
-  int surface_index(const Facet& f) const
-  {
-    return surface_index(r_c3t3_.surface_patch_index(f));
-  }
-  
-  size_type surface_number() const
-  {
-    return surface_map_.size();
-  }
-  
-private:
-  int surface_index(const Surface_patch_index& index) const
-  {
-    typedef typename Surface_map::const_iterator Smi;
-    Smi elt_it = surface_map_.find(index);
-    if ( elt_it != surface_map_.end() )
-      return elt_it->second;
-    else
-      return -1;
-  }
-  
-  int get_first_unused_label(const std::set<int>& label_set,
-                             int search_start) const
-  {
-    while ( label_set.end() != label_set.find(search_start) )
-      ++search_start;
-    
-    return search_start;
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-  const Cell_pmap& cell_pmap_;
-  Surface_map surface_map_;
-};
-
-  
-// Accessors
-template <typename C3T3, typename Cell_pmap>
-int
-get(const Rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
-    const typename C3T3::Facet& f)
-{
-  return fmap.surface_index(f);
-}
-  
-template <typename C3T3, typename Cell_pmap>
-unsigned int
-get_size(const Rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
-         const typename C3T3::Facet& f)
-{
-  return fmap.surface_number(f);
-}
-
-  
-// -----------------------------------
-// No_rebind_facet_pmap
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class No_rebind_facet_pmap
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Facet Facet;
-  typedef unsigned int size_type;
-  
-public:
-  No_rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
-    : r_c3t3_(c3t3) {}
-
-  int surface_index(const Facet& f) const
-  {
-    return static_cast<int>(r_c3t3_.surface_patch_index(f));
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-};
-
-
-// Accessors
-template <typename C3T3, typename Cell_pmap>
-int
-get(const No_rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
-    const typename C3T3::Facet& f)
-{
-return fmap.surface_index(f);
-}
-
-// -----------------------------------
-// No_rebind_facet_pmap_first
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class No_rebind_facet_pmap_first
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Facet Facet;
-  typedef unsigned int size_type;
-  
-public:
-  No_rebind_facet_pmap_first(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
-    : r_c3t3_(c3t3) {}
-  
-  int surface_index(const Facet& f) const
-  {
-    return static_cast<int>(r_c3t3_.surface_patch_index(f).first);
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-};
-
-
-// Accessors
-template <typename C3T3, typename Cell_pmap>
-int
-get(const No_rebind_facet_pmap_first<C3T3,Cell_pmap>& fmap,
-  const typename C3T3::Facet& f)
-{
-  return fmap.surface_index(f);
-}
-  
-  
-// -----------------------------------
-// No_rebind_facet_pmap_second
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class No_rebind_facet_pmap_second
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Facet Facet;
-  typedef unsigned int size_type;
-  
-public:
-  No_rebind_facet_pmap_second(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
-  : r_c3t3_(c3t3) {}
-  
-  int surface_index(const Facet& f) const
-  {
-    return static_cast<int>(r_c3t3_.surface_patch_index(f).second);
-  }
-  
-private:
-  const C3T3& r_c3t3_;
-};
-
-
-// Accessors
-template <typename C3T3, typename Cell_pmap>
-int
-get(const No_rebind_facet_pmap_second<C3T3,Cell_pmap>& fmap,
-    const typename C3T3::Facet& f)
-{
-  return fmap.surface_index(f);
-}
-  
-  
-  
-// -----------------------------------
-// No_patch_facet_pmap_first
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class No_patch_facet_pmap_first
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Facet Facet;
-  typedef typename C3T3::Cell_handle Cell_handle;
-  
-public:
-  No_patch_facet_pmap_first(const C3T3&, const Cell_pmap& cell_pmap)
-    : cell_pmap_(cell_pmap) { }
-  
-  int surface_index(const Facet& f) const
-  {
-    Cell_handle c1 = f.first;
-    Cell_handle c2 = c1->neighbor(f.second);
-    
-    int label1 = get(cell_pmap_,c1);
-    int label2 = get(cell_pmap_,c2);
-    
-    if ( 0 == label1 || -1 == label1 )
-      label1 = label2;
-    if ( 0 == label2 || -1 == label2 )
-      label2 = label1;
-    
-    return (std::min)(label1,label2);
-  }
-  
-private:
-  const Cell_pmap& cell_pmap_;
-};
-
-// Accessors 
-template <typename C3T3, typename Cell_pmap>
-int
-get(const No_patch_facet_pmap_first<C3T3,Cell_pmap>& fmap,
-    const typename C3T3::Facet& f)
-{
-  return fmap.surface_index(f);
-}
-
-// -----------------------------------
-// No_patch_facet_pmap_second
-// -----------------------------------
-template <typename C3T3, typename Cell_pmap>
-class No_patch_facet_pmap_second
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Facet Facet;
-  typedef typename C3T3::Cell_handle Cell_handle;
-  
-public:
-  No_patch_facet_pmap_second(const C3T3&, const Cell_pmap& cell_pmap)
-    : cell_pmap_(cell_pmap) { }
-  
-  int surface_index(const Facet& f) const
-  {
-    Cell_handle c1 = f.first;
-    Cell_handle c2 = c1->neighbor(f.second);
-    
-    int label1 = get(cell_pmap_,c1);
-    int label2 = get(cell_pmap_,c2);
-    
-    if ( 0 == label1 || -1 == label1 )
-      label1 = label2;
-    if ( 0 == label2 || -1 == label2 )
-      label2 = label1;
-    
-    return (std::max)(label1,label2);
-  }
-  
-private:
-  const Cell_pmap& cell_pmap_;
-};
-
-// Accessors 
-template <typename C3T3, typename Cell_pmap>
-int
-get(const No_patch_facet_pmap_second<C3T3,Cell_pmap>& fmap,
-    const typename C3T3::Facet& f)
-{
-  return fmap.surface_index(f);
-}
-  
-  
-// -----------------------------------
-// Default_vertex_index_pmap
-// ----------------------------------- 
-template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
-class Default_vertex_pmap
-{
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Subdomain_index Subdomain_index;
-  typedef typename C3T3::Index Index;
-  typedef typename C3T3::Vertex_handle Vertex_handle;
-  typedef typename C3T3::Cell_handle Cell_handle;
-  typedef typename C3T3::Facet Facet;
-
-public:
-  Default_vertex_pmap(const C3T3& c3t3,
-                      const Cell_pmap& c_pmap,
-                      const Facet_pmap& f_pmap)
-    : c_pmap_(c_pmap)
-    , f_pmap_(f_pmap)
-    , r_c3t3_(c3t3)
-    , edge_index_(0) {}
-
-  int index(const Vertex_handle& vh) const
-  {
-    switch ( r_c3t3_.in_dimension(vh) )
-    {
-    case 2:
-      {
-        // Check if each incident surface facet of vh has the same surface index
-        typename std::vector<Facet> facets;
-        r_c3t3_.triangulation().finite_incident_facets(
-            vh, std::back_inserter(facets));
-
-        if ( facets.begin() == facets.end() )
-          return -1;
-
-        // Look for the first surface facet
-        typename std::vector<Facet>::iterator it_facet = facets.begin();
-        while ( ! r_c3t3_.is_in_complex(*it_facet) )
-        {
-          if ( ++it_facet == facets.end() )
-            return -1;
-        }
-
-        Surface_patch_index facet_index = r_c3t3_.surface_patch_index(*it_facet);
-        Facet facet = *it_facet;
-        ++it_facet;
-
-        for( ; it_facet != facets.end() ; ++it_facet)
-        {
-          // If another index is found, return value for edge vertice
-          if (   r_c3t3_.is_in_complex(*it_facet)
-              && facet_index != r_c3t3_.surface_patch_index(*it_facet) )
-            return edge_index_;
-        }
-
-        return get(f_pmap_,facet);
-      }
-      break;
-
-    case 3:
-      {
-        // Returns value of any incident cell
-        typename std::vector<Cell_handle> cells;
-        r_c3t3_.triangulation().finite_incident_cells(
-            vh,std::back_inserter(cells));
-
-        if ( cells.begin() != cells.end() )
-          return get(c_pmap_, *cells.begin());
-        else
-          return -1;
-      }
-      break;
-
-    default:
-      // should not happen
-      return -1;
-      break;
-    }
-  }
-
-private:
-  const Cell_pmap& c_pmap_;
-  const Facet_pmap& f_pmap_;
-  const C3T3& r_c3t3_;
-  const unsigned int edge_index_;
-};
-
-template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
-int
-get(const Default_vertex_pmap<C3T3,Cell_pmap,Facet_pmap>& vmap,
-    const typename C3T3::Vertex_handle& vh)
-{
-  return vmap.index(vh);
-}
-
-
-// -----------------------------------
-// Null pmap
-// -----------------------------------  
-template <typename C3T3, typename Cell_pmap>
-struct Null_facet_pmap
-{
-  Null_facet_pmap(const C3T3&, const Cell_pmap&) {}
-};
-  
-template <typename C3T3, typename Cell_pmap>
-int get(const Null_facet_pmap<C3T3,Cell_pmap>&,
-        const typename C3T3::Facet&)
-{
-  return 0;
-}
-  
-template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
-struct Null_vertex_pmap
-{
-  Null_vertex_pmap(const C3T3&, const Cell_pmap&, const Facet_pmap&) {}
-};
-  
-template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
-int get(const Null_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>&,
-        const typename C3T3::Vertex_handle&)
-{
-  return 0;
-}
-
-
-// -----------------------------------
-// Generator
-// -----------------------------------
-template <typename C3T3, bool rebind, bool no_patch>
-struct Medit_pmap_generator{};
-
-  
-template <typename C3T3>
-struct Medit_pmap_generator<C3T3, true, false>
-{
-  typedef Rebind_cell_pmap<C3T3>                            Cell_pmap;
-  typedef Rebind_facet_pmap<C3T3, Cell_pmap>                Facet_pmap;
-  typedef Null_facet_pmap<C3T3, Cell_pmap>                  Facet_pmap_twice;
-  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
-  
-  bool print_twice() { return false; }
-};
-  
-  
-template <typename C3T3>
-struct Medit_pmap_generator<C3T3, true, true>
-{
-  typedef Rebind_cell_pmap<C3T3>                            Cell_pmap;
-  typedef No_patch_facet_pmap_first<C3T3,Cell_pmap>         Facet_pmap;
-  typedef No_patch_facet_pmap_second<C3T3,Cell_pmap>        Facet_pmap_twice;
-  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
-  
-  bool print_twice() { return true; }
-};
-
-
-template <typename C3T3>
-struct Medit_pmap_generator<C3T3, false, true>
-{
-  typedef No_rebind_cell_pmap<C3T3>                         Cell_pmap;
-  typedef No_patch_facet_pmap_first<C3T3,Cell_pmap>         Facet_pmap;
-  typedef No_patch_facet_pmap_second<C3T3,Cell_pmap>        Facet_pmap_twice;
-  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
-  
-  bool print_twice() { return true; }
-};
-  
-template <typename C3T3>
-struct Medit_pmap_generator<C3T3, false, false>
-{
-  typedef No_rebind_cell_pmap<C3T3>                         Cell_pmap;
-  typedef Rebind_facet_pmap<C3T3,Cell_pmap>                 Facet_pmap;
-  typedef Null_facet_pmap<C3T3, Cell_pmap>                  Facet_pmap_twice;
-  typedef Null_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>     Vertex_pmap;
-  
-  bool print_twice() { return false; }
-};
-
-  
-//-------------------------------------------------------
-// IO functions
-//-------------------------------------------------------
-
-
-  
-template <class C3T3, bool rebind, bool no_patch>
-void
-output_to_medit(std::ostream& os,
-                const C3T3& c3t3)
-{
-#ifdef CGAL_MESH_3_IO_VERBOSE
-  std::cerr << "Output to medit:\n";
-#endif
-  
-  typedef Medit_pmap_generator<C3T3,rebind,no_patch> Generator;
-  typedef typename Generator::Cell_pmap Cell_pmap;
-  typedef typename Generator::Facet_pmap Facet_pmap;
-  typedef typename Generator::Facet_pmap_twice Facet_pmap_twice;
-  typedef typename Generator::Vertex_pmap Vertex_pmap;
-  
-  Cell_pmap cell_pmap(c3t3);
-  Facet_pmap facet_pmap(c3t3,cell_pmap);
-  Facet_pmap_twice facet_pmap_twice(c3t3,cell_pmap);
-  Vertex_pmap vertex_pmap(c3t3,cell_pmap,facet_pmap);
-  
-  output_to_medit(os,
-                  c3t3,
-                  vertex_pmap,
-                  facet_pmap,
-                  cell_pmap,
-                  facet_pmap_twice,
-                  Generator().print_twice());
-  
-#ifdef CGAL_MESH_3_IO_VERBOSE
-  std::cerr << "done.\n";
-#endif
-}
-
-
-  
-template <class C3T3,
-          class Vertex_index_property_map,
-          class Facet_index_property_map,
-          class Facet_index_property_map_twice,
-          class Cell_index_property_map>
-void
-output_to_medit(std::ostream& os,
-                const C3T3& c3t3,
-                const Vertex_index_property_map& vertex_pmap,
-                const Facet_index_property_map& facet_pmap,
-                const Cell_index_property_map& cell_pmap,
-                const Facet_index_property_map_twice& facet_twice_pmap = Facet_index_property_map_twice(),
-                const bool print_each_facet_twice = false)
-{
-  typedef typename C3T3::Triangulation Tr;
-  typedef typename C3T3::Facets_in_complex_iterator Facet_iterator;
-  typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
-
-  typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
-  typedef typename Tr::Vertex_handle Vertex_handle;
-  typedef typename Tr::Point Point_3;
-
-  const Tr& tr = c3t3.triangulation();
-
-  //-------------------------------------------------------
-  // File output
-  //-------------------------------------------------------
-
-  //-------------------------------------------------------
-  // Header
-  //-------------------------------------------------------
-  os << std::setprecision(17);
-
-  os << "MeshVersionFormatted 1" << std::endl
-     << "Dimension 3" << std::endl;
-
-
-  //-------------------------------------------------------
-  // Vertices
-  //-------------------------------------------------------
-  os << "Vertices" << std::endl
-     << tr.number_of_vertices() << std::endl;
-
-  std::map<Vertex_handle, int> V;
-  int inum = 1;
-  for( Finite_vertices_iterator vit = tr.finite_vertices_begin();
-       vit != tr.finite_vertices_end();
-       ++vit)
-  {
-    V[vit] = inum++;
-    Point_3 p = vit->point();
-    os << CGAL::to_double(p.x()) << " "
-       << CGAL::to_double(p.y()) << " "
-       << CGAL::to_double(p.z()) << " "
-       << get(vertex_pmap, vit)
-       << std::endl;
-  }
-
-  //-------------------------------------------------------
-  // Facets
-  //-------------------------------------------------------
-  typename C3T3::size_type number_of_triangles = c3t3.number_of_facets_in_complex();
-  
-  if ( print_each_facet_twice )
-    number_of_triangles += number_of_triangles;
-  
-  os << "Triangles" << std::endl
-     << number_of_triangles << std::endl;
-
-  for( Facet_iterator fit = c3t3.facets_in_complex_begin();
-       fit != c3t3.facets_in_complex_end();
-       ++fit)
-  {
-    for (int i=0; i<4; i++)
-    {
-      if (i != fit->second)
-      {
-        const Vertex_handle& vh = (*fit).first->vertex(i);
-        os << V[vh] << " ";
-      }
-    }
-    os << get(facet_pmap, *fit) << std::endl;
-    
-    // Print triangle again if needed
-    if ( print_each_facet_twice )
-    {
-      for (int i=0; i<4; i++)
-      {
-        if (i != fit->second)
-        {
-          const Vertex_handle& vh = (*fit).first->vertex(i);
-          os << V[vh] << " ";
-        }
-      }
-      os << get(facet_twice_pmap, *fit) << std::endl;
-    }
-  }
-
-  //-------------------------------------------------------
-  // Tetrahedra
-  //-------------------------------------------------------
-  os << "Tetrahedra" << std::endl
-     << c3t3.number_of_cells_in_complex() << std::endl;
-
-  for( Cell_iterator cit = c3t3.cells_in_complex_begin() ;
-       cit != c3t3.cells_in_complex_end() ;
-       ++cit )
-  {
-    for (int i=0; i<4; i++)
-      os << V[cit->vertex(i)] << " ";
-
-    os << get(cell_pmap, cit) << std::endl;
-  }
-
-  //-------------------------------------------------------
-  // End
-  //-------------------------------------------------------
-  os << "End" << std::endl;
-
-} // end output_to_medit(...)
-
-} // end namespace Mesh_3
-
-  
-
-  
-/**
- * @brief outputs mesh to medit format
- * @param os the stream
- * @param c3t3 the mesh
- * @param rebind if true, labels of cells are rebinded into [1..nb_of_labels]
- * @param show_patches if true, patches are labeled with different labels than
- * cells. If false, each surface facet is written twice, using label of
- * each adjacent cell.
- */
-template <class C3T3>
-void
-output_to_medit(std::ostream& os,
-                const C3T3& c3t3,
-                bool rebind = false,
-                bool show_patches = false) 
-{
-  if ( rebind )
-  {
-    if ( show_patches )
-      Mesh_3::output_to_medit<C3T3,true,false>(os,c3t3);
-    else
-      Mesh_3::output_to_medit<C3T3,true,true>(os,c3t3);
-  }
-  else
-  {
-    if ( show_patches )
-      Mesh_3::output_to_medit<C3T3,false,false>(os,c3t3);
-    else
-      Mesh_3::output_to_medit<C3T3,false,true>(os,c3t3);
-  }
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_IO_FILE_MEDIT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_scanner_OFF.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_scanner_OFF.h
deleted file mode 100644
index 00227a0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_scanner_OFF.h
+++ /dev/null
@@ -1,466 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_IO_FILE_SCANNER_OFF_H
-#define CGAL_IO_FILE_SCANNER_OFF_H 1
-
-#include <CGAL/basic.h>
-#include <cstddef>
-#include <CGAL/IO/binary_file_io.h>
-#include <CGAL/IO/File_header_OFF.h>
-#include <iostream>
-#include <boost/cstdint.hpp>
-
-#include <CGAL/Point_3.h>
-#include <CGAL/Vector_3.h>
-
-namespace CGAL {
-
-class CGAL_EXPORT File_scanner_OFF : public File_header_OFF {
-    std::istream&  m_in;
-    bool           normals_read;
-    void skip_comment() { m_in >> skip_comment_OFF; }
-public:
-    File_scanner_OFF( std::istream& in, bool verbose = false)
-      : File_header_OFF(verbose), m_in(in), normals_read(false) {
-        in >> static_cast<File_header_OFF&>( *this);
-    }
-    File_scanner_OFF( std::istream& in, const File_header_OFF& header)
-      : File_header_OFF(header), m_in(in), normals_read(false) {}
-
-    std::istream& in() { return m_in; }
-
-    // The scan_vertex() routine is provided for multiple
-    // coordinate types to support parameterized polytopes.
-    void scan_vertex( float&  x, float&  y, float&  z) {
-        if ( binary()) {
-            I_Binary_read_big_endian_float32( m_in, x);
-            I_Binary_read_big_endian_float32( m_in, y);
-            I_Binary_read_big_endian_float32( m_in, z);
-            if ( is_homogeneous()) {
-                float w;
-                I_Binary_read_big_endian_float32( m_in, w);
-                x /= w;
-                y /= w;
-                z /= w;
-            }
-        } else {
-            skip_comment();
-            m_in >> iformat(x) >> iformat(y) >> iformat(z);
-            if ( is_homogeneous()) {
-                float w;
-                m_in >> iformat(w);
-                x /= w;
-                y /= w;
-                z /= w;
-            }
-        }
-    }
-    void scan_vertex( double& x, double& y, double& z) {
-        if ( binary()) {
-            float f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            x = f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            y = f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            z = f;
-            if ( is_homogeneous()) {
-                I_Binary_read_big_endian_float32( m_in, f);
-                x /= f;
-                y /= f;
-                z /= f;
-            }
-        } else {
-            skip_comment();
-            m_in >> iformat(x) >> iformat(y) >> iformat(z);
-            if ( is_homogeneous()) {
-                double w;
-                m_in >> iformat(w);
-                x /= w;
-                y /= w;
-                z /= w;
-            }
-        }
-    }
-    void scan_vertex( int& x, int& y, int& z) {
-        if ( binary()) {
-            float fx, fy, fz;
-            I_Binary_read_big_endian_float32( m_in, fx);
-            I_Binary_read_big_endian_float32( m_in, fy);
-            I_Binary_read_big_endian_float32( m_in, fz);
-            if ( is_homogeneous()) {
-                float fw;
-                I_Binary_read_big_endian_float32( m_in, fw);
-                x = int( fx / fw);
-                y = int( fy / fw);
-                z = int( fz / fw);
-            } else {
-                x = int(fx);
-                y = int(fy);
-                z = int(fz);
-            }
-        } else {
-            skip_comment();
-            if ( is_homogeneous()) {
-                double fx, fy, fz, fw;
-                m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
-                x = int( fx / fw);
-                y = int( fy / fw);
-                z = int( fz / fw);
-            } else {
-                double d;
-                m_in >> iformat(d);
-                x = int(d);
-                m_in >> iformat(d);
-                y = int(d);
-                m_in >> iformat(d);
-                z = int(d);
-            }
-        }
-    }
-
-    void scan_vertex( float&  x, float&  y, float&  z, float&  w) {
-        w = 1;
-        if ( binary()) {
-            I_Binary_read_big_endian_float32( m_in, x);
-            I_Binary_read_big_endian_float32( m_in, y);
-            I_Binary_read_big_endian_float32( m_in, z);
-            if ( is_homogeneous())
-                I_Binary_read_big_endian_float32( m_in, w);
-        } else {
-            skip_comment();
-            m_in >> iformat(x) >> iformat(y) >> iformat(z);
-            if ( is_homogeneous())
-              m_in >> iformat(w);
-        }
-    }
-    void scan_vertex( double& x, double& y, double& z, double& w) {
-        w = 1;
-        if ( binary()) {
-            float f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            x = f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            y = f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            z = f;
-            if ( is_homogeneous()) {
-                I_Binary_read_big_endian_float32( m_in, f);
-                w = f;
-            }
-        } else {
-            skip_comment();
-            m_in >> iformat(x);
-            m_in >> iformat(y);
-            m_in >> iformat(z);
-            if ( is_homogeneous())
-              m_in >> iformat(w);
-        }
-    }
-    void scan_vertex( int& x, int& y, int& z, int& w) {
-        w = 1;
-        if ( binary()) {
-            float f;
-            I_Binary_read_big_endian_float32( m_in, f);
-            x = int(f);
-            I_Binary_read_big_endian_float32( m_in, f);
-            y = int(f);
-            I_Binary_read_big_endian_float32( m_in, f);
-            z = int(f);
-            if ( is_homogeneous()) {
-                I_Binary_read_big_endian_float32( m_in, f);
-                w = int(f);
-            }
-        } else {
-            skip_comment();
-            double d;
-            m_in >> iformat(d);
-            x = int(d);
-            m_in >> iformat(d);
-            y = int(d);
-            m_in >> iformat(d);
-            z = int(d);
-            if ( is_homogeneous()) {
-                m_in >> iformat(d);
-                w = int(d);
-            }
-        }
-    }
-
-    void scan_normal( float&  x, float&  y, float&  z) {
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                I_Binary_read_big_endian_float32( m_in, x);
-                I_Binary_read_big_endian_float32( m_in, y);
-                I_Binary_read_big_endian_float32( m_in, z);
-                if ( is_homogeneous()) {
-                    float w;
-                    I_Binary_read_big_endian_float32( m_in, w);
-                    x /= w;
-                    y /= w;
-                    z /= w;
-                }
-            } else {
-                m_in >> iformat(x) >> iformat(y) >> iformat(z);
-                if ( is_homogeneous()) {
-                    float w;
-                    m_in >> iformat(w);
-                    x /= w;
-                    y /= w;
-                    z /= w;
-                }
-            }
-        }
-    }
-    void scan_normal( double& x, double& y, double& z) {
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                float fx, fy, fz;
-                I_Binary_read_big_endian_float32( m_in, fx);
-                I_Binary_read_big_endian_float32( m_in, fy);
-                I_Binary_read_big_endian_float32( m_in, fz);
-                if ( is_homogeneous()) {
-                    float fw;
-                    I_Binary_read_big_endian_float32( m_in, fw);
-                    x = fx / fw;
-                    y = fy / fw;
-                    z = fz / fw;
-                } else {
-                    x = fx;
-                    y = fy;
-                    z = fz;
-                }
-            } else {
-                if ( is_homogeneous()) {
-                    float fx, fy, fz, fw;
-                    m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
-                    x = fx / fw;
-                    y = fy / fw;
-                    z = fz / fw;
-                } else
-                    m_in >> iformat(x) >> iformat(y) >> iformat(z);
-            }
-        }
-    }
-    void scan_normal( int& x, int& y, int& z) {
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                float fx, fy, fz;
-                I_Binary_read_big_endian_float32( m_in, fx);
-                I_Binary_read_big_endian_float32( m_in, fy);
-                I_Binary_read_big_endian_float32( m_in, fz);
-                if ( is_homogeneous()) {
-                    float fw;
-                    I_Binary_read_big_endian_float32( m_in, fw);
-                    x = int( fx / fw);
-                    y = int( fy / fw);
-                    z = int( fz / fw);
-                } else {
-                    x = int(fx);
-                    y = int(fy);
-                    z = int(fz);
-                }
-            } else {
-                if ( is_homogeneous()) {
-                    float fx, fy, fz, fw;
-                    m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
-                    x = int( fx / fw);
-                    y = int( fy / fw);
-                    z = int( fz / fw);
-                } else {
-                    double d;
-                    m_in >> iformat(d);
-                    x = int(d);
-                    m_in >> iformat(d);
-                    y = int(d);
-                    m_in >> iformat(d);
-                    z = int(d);
-                }
-            }
-        }
-    }
-
-    void scan_normal( float&  x, float&  y, float&  z, float&  w) {
-        w = 1;
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                I_Binary_read_big_endian_float32( m_in, x);
-                I_Binary_read_big_endian_float32( m_in, y);
-                I_Binary_read_big_endian_float32( m_in, z);
-                if ( is_homogeneous())
-                    I_Binary_read_big_endian_float32( m_in, w);
-            } else {
-                m_in >> iformat(x) >> iformat(y) >> iformat(z);
-                if ( is_homogeneous())
-                    m_in >> iformat(w);
-            }
-        }
-    }
-    void scan_normal( double& x, double& y, double& z, double& w) {
-        w = 1;
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                float f;
-                I_Binary_read_big_endian_float32( m_in, f);
-                x = f;
-                I_Binary_read_big_endian_float32( m_in, f);
-                y = f;
-                I_Binary_read_big_endian_float32( m_in, f);
-                z = f;
-                if ( is_homogeneous()) {
-                    I_Binary_read_big_endian_float32( m_in, f);
-                    w = f;
-                }
-            } else {
-                m_in >> iformat(x) >> iformat(y) >> iformat(z);
-                if ( is_homogeneous())
-                    m_in >> iformat(w);
-            }
-        }
-    }
-    void scan_normal( int& x, int& y, int& z, int& w) {
-        w = 1;
-        if ( has_normals()) {
-            normals_read = true;
-            if ( binary()) {
-                float f;
-                I_Binary_read_big_endian_float32( m_in, f);
-                x = int(f);
-                I_Binary_read_big_endian_float32( m_in, f);
-                y = int(f);
-                I_Binary_read_big_endian_float32( m_in, f);
-                z = int(f);
-                if ( is_homogeneous()) {
-                    I_Binary_read_big_endian_float32( m_in, f);
-                    w = int(f);
-                }
-            } else {
-                double d;
-                m_in >> iformat(d);
-                x = int(d);
-                m_in >> iformat(d);
-                y = int(d);
-                m_in >> iformat(d);
-                z = int(d);
-                if ( is_homogeneous()) {
-                    m_in >> iformat(d);
-                    w = int(d);
-                }
-            }
-        }
-    }
-
-  void skip_to_next_vertex( std::size_t current_vertex);
-
-  void scan_facet( std::size_t& size, std::size_t CGAL_assertion_code(current_facet)) {
-        CGAL_assertion( current_facet < size_of_facets());
-        if ( binary()){
-            boost::int32_t i32;
-            I_Binary_read_big_endian_integer32( m_in, i32);
-            size = i32;
-        } else {
-            skip_comment();
-            m_in >> size;
-        }
-    }
-
-  void scan_facet_vertex_index( std::size_t& index,
-                                std::size_t current_facet) {
-    if ( binary()){
-      boost::int32_t i32;
-      I_Binary_read_big_endian_integer32( m_in, i32);
-      index = i32;
-    } else
-      m_in >> index;
-
-    if( m_in.fail()) {
-      if ( verbose()) {
-        std::cerr << " " << std::endl;
-        std::cerr << "File_scanner_OFF::" << std::endl;
-        std::cerr << "scan_facet_vertex_index(): input error:  "
-          "cannot read OFF file beyond facet "
-                  << current_facet << "." << std::endl;
-      }
-      set_off_header( false);
-      return;
-    }
-    bool error  = index < index_offset();
-    index -= index_offset();
-
-    if(error || (index >= size_of_vertices())) {
-      m_in.clear( std::ios::failbit);
-      if ( verbose()) {
-        std::cerr << " " << std::endl;
-        std::cerr << "File_scanner_OFF::" << std::endl;
-        std::cerr << "scan_facet_vertex_index(): input error: "
-          "facet " << current_facet << ": vertex index "
-                  << index + index_offset() << ": is out of range."
-                  << std::endl;
-      }
-      set_off_header( false);
-      return;
-    }
-  }
-
-  void skip_to_next_facet( std::size_t current_facet);
-};
-
-template < class Point> inline
-Point&
-file_scan_vertex( File_scanner_OFF& scanner, Point& p) {
-    typedef typename Point::R R;
-    typedef typename R::RT    RT;
-    double x, y, z, w;
-    scanner.scan_vertex( x, y, z, w);
-    if ( w == 1)
-        p = Point( RT(x), RT(y), RT(z));
-    else
-        p = Point( RT(x), RT(y), RT(z), RT(w));
-    return p;
-}
-
-template < class Vector> inline
-Vector&
-file_scan_normal( File_scanner_OFF& scanner, Vector& v) {
-    typedef typename Vector::R R;
-    typedef typename R::RT     RT;
-    double x, y, z, w;
-    scanner.scan_normal( x, y, z, w);
-    if ( w == 1)
-        v = Vector( RT(x), RT(y), RT(z));
-    else
-        v = Vector( RT(x), RT(y), RT(z), RT(w));
-    return v;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_IO_FILE_SCANNER_OFF_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_OFF.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_OFF.h
deleted file mode 100644
index ae1d35b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_OFF.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_IO_FILE_WRITER_OFF_H
-#define CGAL_IO_FILE_WRITER_OFF_H 1
-
-#include <CGAL/IO/binary_file_io.h>
-#include <CGAL/IO/File_header_OFF.h>
-#include <iostream>
-#include <cstddef>
-
-namespace CGAL {
-
-class CGAL_EXPORT File_writer_OFF {
-    std::ostream*           m_out;
-    File_header_OFF         m_header;
-public:
-    File_writer_OFF( bool verbose = false) : m_header( verbose) {}
-    File_writer_OFF( const File_header_OFF& h) : m_header( h) {}
-
-    std::ostream&           out()          { return *m_out;   }
-    File_header_OFF&        header()       { return m_header; }
-    const File_header_OFF&  header() const { return m_header; }
-
-    void write_header( std::ostream& out,
-                       std::size_t   vertices,
-                       std::size_t   halfedges,
-                       std::size_t   facets,
-                       bool          normals = false);
-    void write_footer() {
-        if ( m_header.ascii() && m_header.comments())
-            out() << "\n\n# End of OFF #";
-        out() << std::endl;
-    }
-    void write_vertex( const double& x, const double& y, const double& z) {
-        if ( m_header.binary()) {
-            I_Binary_write_big_endian_float32( out(), float(x));
-            I_Binary_write_big_endian_float32( out(), float(y));
-            I_Binary_write_big_endian_float32( out(), float(z));
-        } else {
-            out() << '\n' << x << ' ' << y << ' ' << z;
-        }
-    }
-    void write_normal( const double& x, const double& y, const double& z) {
-        if ( m_header.binary()) {
-            I_Binary_write_big_endian_float32( out(), float(x));
-            I_Binary_write_big_endian_float32( out(), float(y));
-            I_Binary_write_big_endian_float32( out(), float(z));
-        } else {
-            out() << ' ' << ' ' << x << ' ' << y << ' ' << z;
-        }
-    }
-    void write_facet_header() {
-        if ( m_header.ascii()) {
-            if ( m_header.no_comments())
-                out() << '\n';
-            else {
-                out() << "\n\n# " << m_header.size_of_facets()
-                       << " facets\n";
-                out() << "# ------------------------------------------"
-                          "\n\n";
-            }
-        }
-    }
-    void write_facet_begin( std::size_t no) {
-        if ( m_header.binary())
-          I_Binary_write_big_endian_integer32( out(), static_cast<boost::int32_t>(no));
-        else
-            out() << no << ' ';
-    }
-    void write_facet_vertex_index( std::size_t index) {
-        if ( m_header.binary())
-          I_Binary_write_big_endian_integer32( out(), static_cast<boost::int32_t>(index));
-        else
-            out() << ' ' << index;
-    }
-    void write_facet_end() {
-        if ( m_header.binary())
-            I_Binary_write_big_endian_integer32( out(), 0);
-        else
-            out() << '\n';
-    }
-};
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_WRITER_OFF_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_VRML_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_VRML_2.h
deleted file mode 100644
index 174f8ad..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_VRML_2.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_IO_FILE_WRITER_VRML_2_H
-#define CGAL_IO_FILE_WRITER_VRML_2_H 1
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <cstddef>
-
-namespace CGAL {
-
-class CGAL_EXPORT File_writer_VRML_2 {
-    std::ostream*      m_out;
-    std::size_t        m_facets;
-public:
-    File_writer_VRML_2() {}
-    std::ostream& out() const { return *m_out; }
-    void write_header( std::ostream& o,
-                       std::size_t vertices,
-                       std::size_t halfedges,
-                       std::size_t facets);
-    void write_footer() const;
-    void write_vertex( const double& x, const double& y, const double& z) {
-        out() << "                                "
-              << x << ' ' << y << ' ' << z << ',' << '\n';
-    }
-    void write_facet_header() const;
-    void write_facet_begin( std::size_t) {
-        out() << "                            ";
-    }
-    void write_facet_vertex_index( std::size_t idx) { out() << idx << ',';}
-    void write_facet_end() { out() << "-1,\n"; }
-};
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_WRITER_VRML_2_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_inventor.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_inventor.h
deleted file mode 100644
index b6948d0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_inventor.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_IO_FILE_WRITER_INVENTOR_H
-#define CGAL_IO_FILE_WRITER_INVENTOR_H 1
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <cstddef>
-
-namespace CGAL {
-
-class CGAL_EXPORT File_writer_inventor {
-    std::ostream*      m_out;
-    std::size_t        m_facets;
-public:
-    File_writer_inventor() {}
-    std::ostream& out() const { return *m_out; }
-    void write_header( std::ostream& o,
-                       std::size_t vertices,
-                       std::size_t halfedges,
-                       std::size_t facets);
-    void write_footer() const;
-    void write_vertex( const double& x, const double& y, const double& z) {
-        out() << "            " << x << ' ' << y << ' ' << z << ',' <<'\n';
-    }
-    void write_facet_header() const;
-    void write_facet_begin( std::size_t) { out() << "            "; }
-    void write_facet_vertex_index( std::size_t idx) { out() << idx << ',';}
-    void write_facet_end() { out() << "-1,\n"; }
-};
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_WRITER_INVENTOR_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_wavefront.h b/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_wavefront.h
deleted file mode 100644
index d3ee8cb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/File_writer_wavefront.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_IO_FILE_WRITER_WAVEFRONT_H
-#define CGAL_IO_FILE_WRITER_WAVEFRONT_H 1
-
-#include <CGAL/IO/binary_file_io.h>
-#include <iostream>
-#include <cstddef>
-
-namespace CGAL {
-
-class CGAL_EXPORT File_writer_wavefront {
-    std::ostream*  m_out;
-    std::size_t    m_facets;
-public:
-    std::ostream& out() const { return *m_out; }
-    void write_header( std::ostream& out,
-                       std::size_t vertices,
-                       std::size_t halfedges,
-                       std::size_t facets);
-    void write_footer() const {
-        out() << "\n# End of Wavefront obj format #" << std::endl;
-    }
-    void write_vertex( const double& x, const double& y, const double& z) {
-        out() << "v " << x << ' ' << y << ' ' << z << '\n';
-    }
-    void write_facet_header() {
-        out() << "\n# " << m_facets << " facets\n";
-        out() << "# ------------------------------------------\n\n";
-    }
-    void write_facet_begin( std::size_t)            { out() << "f "; }
-    void write_facet_vertex_index( std::size_t idx) { out() << ' ' << idx+1; }
-    void write_facet_end()                          { out() << '\n'; }
-};
-
-} //namespace CGAL
-#endif // CGAL_IO_FILE_WRITER_WAVEFRONT_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Geomview_stream.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Geomview_stream.h
deleted file mode 100644
index e3b3f22..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Geomview_stream.h
+++ /dev/null
@@ -1,596 +0,0 @@
-// Copyright (c) 1997,1998,1999,2000,2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Sylvain Pion
-
-#ifndef CGAL_GEOMVIEW_STREAM_H
-#define CGAL_GEOMVIEW_STREAM_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/IO/Color.h>
-#include <CGAL/IO/Ostream_iterator.h>
-
-#include <CGAL/export/CGAL.h>
-
-#include <map>
-#include <vector>
-#include <utility>
-#include <string>
-#include <iterator>
-#include <algorithm>
-
-namespace CGAL {
-
-class CGAL_EXPORT Geomview_stream {
-public:
-    Geomview_stream(const Bbox_3 &bbox = Bbox_3(0,0,0, 1,1,1),
-		    const char *machine = NULL,
-		    const char *login = NULL);
-
-    ~Geomview_stream();
-
-    Geomview_stream &operator<<(const Color &c);
-    Geomview_stream &operator<<(const std::string & s);
-    Geomview_stream &operator<<(int i);
-    Geomview_stream &operator<<(unsigned int i);
-    Geomview_stream &operator<<(long i);
-    Geomview_stream &operator<<(unsigned long i);
-    Geomview_stream &operator<<(double d);
-
-    template < class InputIterator >
-    void
-    draw_triangles(InputIterator begin, InputIterator end);
-
-    Geomview_stream &operator>>(char *expr);
-
-    void clear();
-    void look_recenter();
-
-    void set_bg_color(const Color &c);
-
-    Color get_vertex_color() const;
-    Color get_edge_color() const;
-    Color get_face_color() const;
-
-    Color set_vertex_color(const Color&);
-    Color set_edge_color(const Color&);
-    Color set_face_color(const Color&);
-
-    double vcr() const;
-    double vcg() const;
-    double vcb() const;
-
-    double ecr() const;
-    double ecg() const;
-    double ecb() const;
-
-    double fcr() const;
-    double fcg() const;
-    double fcb() const;
-
-    double get_vertex_radius() const
-    {
-	return radius;
-    }
-    double set_vertex_radius(double r)
-    {
-	std::swap(r, radius);
-	return r;
-    }
-
-    int get_line_width() const
-    {
-	return line_width;
-    }
-    int set_line_width(int w)
-    {
-	std::swap(w, line_width);
-        return w;
-    }
-
-    bool set_wired(bool b)
-    {
-	std::swap(b, wired_flag);
-	return b;
-    }
-    bool get_wired() const
-    {
-	return wired_flag;
-    }
-
-    bool set_echo(bool b)
-    {
-	std::swap(b, echo_flag);
-	return b;
-    }
-    bool get_echo() const
-    {
-	return echo_flag;
-    }
-
-    bool set_raw(bool b)
-    {
-	std::swap(b, raw_flag);
-	return b;
-    }
-    bool get_raw() const
-    {
-	return raw_flag;
-    }
-
-    bool set_trace(bool b)
-    {
-	std::swap(b, trace_flag);
-	return b;
-    }
-    bool get_trace() const
-    {
-	return trace_flag;
-    }
-
-    void trace(const std::string s) const
-    {
-        if (get_trace())
-            std::cerr << s;
-    }
-    void trace(double d) const
-    {
-        if (get_trace())
-            std::cerr << d << ' ';
-    }
-    void trace(int i) const
-    {
-        if (get_trace())
-            std::cerr << i << ' ';
-    }
-    void trace(unsigned int i) const
-    {
-        if (get_trace())
-            std::cerr << i << ' ';
-    }
-
-    bool set_binary_mode(bool b = true)
-    {
-	std::swap(b, binary_flag);
-	return b;
-    }
-    bool set_ascii_mode(bool b = true)
-    {
-	return !set_binary_mode(!b);
-    }
-    bool get_binary_mode() const
-    {
-	return binary_flag;
-    }
-    bool get_ascii_mode() const
-    {
-	return !binary_flag;
-    }
-
-    std::string get_new_id(const std::string & s);
-
-    const Bbox_3 & get_bbox()
-    {
-	return bb;
-    }
-
-    void pickplane()
-    {
-        pickplane(get_bbox());
-    }
-
-    static char* nth(char* s, int count);
-    static void parse_point(const char* pickpoint,
-		     double &x, double &y, double &z, double &w);
-private:
-    void setup_geomview(const char *machine, const char *login);
-    void frame(const Bbox_3 &bbox);
-    void pickplane(const Bbox_3 &bbox);
-
-    Bbox_3 bb;
-    Color vertex_color, edge_color, face_color;
-    bool wired_flag;  // decides if we draw surfaces or edges.
-    bool echo_flag;   // decides if we echo the point we get back to Geomview.
-    bool raw_flag;    // decides if we output footers and headers.
-    bool trace_flag;  // makes operator<<() write a trace on cerr.
-    bool binary_flag; // makes operator<<() write binary format
-    int line_width;   // width of edges
-    double radius;    // radius of vertices
-    int in, out;      // file descriptors for input and output pipes
-    int pid;          // the geomview process identification
-    std::map<std::string, int> id; // used to get a unique ID per type.
-};
-
-// Factorize code for Point_2 and Point_3.
-template < class FT >
-void
-output_point(Geomview_stream &gv, const FT &x, const FT &y, const FT &z)
-{
-    bool ascii_bak = true; // the initialization value shuts up the compiler.
-    if (!gv.get_raw()) {
-    	ascii_bak = gv.set_ascii_mode();
-    	gv << "(geometry " << gv.get_new_id("P")
-       	   << " {appearance {linewidth 5 material {edgecolor "
-           << gv.vcr() << gv.vcg() << gv.vcb() << "}}{SKEL 1 1 ";
-    }
-
-    gv << CGAL::to_double(x) << CGAL::to_double(y) << CGAL::to_double(z);
-
-    if (!gv.get_raw()) {
-        gv << "1 0\n}})";
-    	gv.set_ascii_mode(ascii_bak);
-    }
-}
-
-#if defined CGAL_POINT_2_H && \
-   !defined CGAL_GV_OUT_POINT_2_H
-#define CGAL_GV_OUT_POINT_2_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Point_2<R> &p)
-{
-    typename R::FT zero(0);
-    output_point(gv, p.x(), p.y(), zero);
-    return gv;
-}
-#endif
-
-#if defined CGAL_POINT_3_H && \
-   !defined CGAL_GV_OUT_POINT_3_H
-#define CGAL_GV_OUT_POINT_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Point_3<R> &p)
-{
-    output_point(gv, p.x(), p.y(), p.z());
-    return gv;
-}
-#endif
-
-// The following code is the same for Segment_2 and Segment_3.
-template < class Segment >
-void
-output_segment(Geomview_stream &gv, const Segment &segment)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Seg")
-       << " {appearance {linewidth "
-       << gv.get_line_width() << "}{VECT "
-       << 1 <<  2 << 1    // 1 polyline, two vertices, 1 color
-       << 2               // the first polyline contains 2 vertices
-       << 1;              // and it has 1 color
-
-    // here are start and end points
-    bool raw_bak = gv.set_raw(true);
-    gv << segment.source() << segment.target();
-    gv.set_raw(raw_bak);
-
-    // and the color of the segment and its opaqueness
-    gv << gv.ecr() << gv.ecg() << gv.ecb() << 1.0 << "}})";
-    gv.set_ascii_mode(ascii_bak);
-}
-
-#if defined CGAL_SEGMENT_2_H && \
-   !defined CGAL_GV_OUT_SEGMENT_2_H
-#define CGAL_GV_OUT_SEGMENT_2_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Segment_2<R> &segment)
-{
-    output_segment(gv, segment);
-    return gv;
-}
-#endif
-
-#if defined CGAL_SEGMENT_3_H && \
-   !defined CGAL_GV_OUT_SEGMENT_3_H
-#define CGAL_GV_OUT_SEGMENT_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Segment_3<R> &segment)
-{
-    output_segment(gv, segment);
-    return gv;
-}
-#endif
-
-// The following code is the same for Triangle_2 and Triangle_3.
-template < class Triangle >
-void
-output_triangle(Geomview_stream &gv, const Triangle &triangle)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Tr")
-       << " {appearance {+edge material {edgecolor "
-       << gv.ecr()  << gv.ecg()  << gv.ecb() <<  " } shading constant}{ ";
-    gv.set_binary_mode();
-    // it's a planar polygon
-    gv << "OFF BINARY\n"
-
-    // it has 3 vertices, 1 face and 3 edges
-       << 3 << 1 << 3;
-
-    bool raw_bak = gv.set_raw(true);
-    for(int i=0; i<3; i++)
-        gv << triangle[i];
-    gv.set_raw(raw_bak);
-
-    // the face
-    gv << 3 << 0 << 1 << 2 << 4 << gv.fcr() << gv.fcg() << gv.fcb() << 1.0
-       << "}})";
-    gv.set_ascii_mode(ascii_bak);
-}
-
-// Draws a set of triangles as OFF format (it's faster than one by one).
-template < class InputIterator >
-void
-Geomview_stream::draw_triangles(InputIterator begin, InputIterator end)
-{
-    typedef typename std::iterator_traits<InputIterator>::value_type  Triangle;
-    typedef typename Kernel_traits<Triangle>::Kernel                  Kernel;
-    typedef typename Kernel::Point_3                                  Point;
-    typedef typename Kernel::Less_xyz_3                               Comp;
-
-    // We first copy everything in a vector to only require an InputIterator.
-    std::vector<Triangle> triangles(begin, end);
-    typedef typename std::vector<Triangle>::const_iterator            Tit;
-
-    // Put the points in a map and a vector.
-    // The index of a point in the vector is the value associated
-    // to it in the map.
-    typedef std::map<Point, int, Comp>  Point_map;
-    Point_map           point_map(Kernel().less_xyz_3_object());
-    std::vector<Point>  points;
-    for (Tit i = triangles.begin(); i != triangles.end(); ++i)
-        for (int j = 0; j < 3; ++j)
-	    if (point_map.insert(typename Point_map::value_type(i->vertex(j),
-					        points.size())).second)
-                points.push_back(i->vertex(j));
-
-    bool ascii_bak = get_ascii_mode();
-    bool raw_bak = set_raw(true);
-
-    // Header.
-    set_binary_mode();
-    (*this) << "(geometry " << get_new_id("triangles")
-            << " {appearance {}{ OFF BINARY\n"
-            << points.size() << triangles.size() << 0;
-
-    // Points coordinates.
-    std::copy(points.begin(), points.end(),
-              Ostream_iterator<Point, Geomview_stream>(*this));
-
-    // Triangles vertices indices.
-    for (Tit tit = triangles.begin(); tit != triangles.end(); ++tit) {
-        (*this) << 3;
-	for (int j = 0; j < 3; ++j)
-	    (*this) << point_map[tit->vertex(j)];
-        (*this) << 0; // without color.
-    }
-    // Footer.
-    (*this) << "}})";
-
-    set_raw(raw_bak);
-    set_ascii_mode(ascii_bak);
-}
-
-#if defined CGAL_TRIANGLE_2_H && \
-   !defined CGAL_GV_OUT_TRIANGLE_2_H
-#define CGAL_GV_OUT_TRIANGLE_2_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Triangle_2<R> &triangle)
-{
-    output_triangle(gv, triangle);
-    return gv;
-}
-#endif
-
-#if defined CGAL_TRIANGLE_3_H && \
-   !defined CGAL_GV_OUT_TRIANGLE_3_H
-#define CGAL_GV_OUT_TRIANGLE_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Triangle_3<R> &triangle)
-{
-    output_triangle(gv, triangle);
-    return gv;
-}
-#endif
-
-#if defined CGAL_TETRAHEDRON_3_H && \
-   !defined CGAL_GV_OUT_TETRAHEDRON_3_H
-#define CGAL_GV_OUT_TETRAHEDRON_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Tetrahedron_3<R> &t)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Tetra")
-       << " {appearance {}{ ";
-    gv.set_binary_mode();
-    gv << "OFF BINARY\n"
-
-    // it has 4 vertices, 4 face and 6 edges
-       << 4 << 4 << 6 ;
-
-    // the vertices
-    bool raw_bak = gv.set_raw(true);
-    for(int i=0; i<4; i++)
-        gv << t[i];
-    gv.set_raw(raw_bak);
-
-    // the faces
-    double r = gv.fcr(),
-           g = gv.fcg(),
-           b = gv.fcb();
-    gv << 3 << 0 << 1 << 2 << 4 << r << g << b << 1.0
-       << 3 << 3 << 0 << 1 << 4 << r << g << b << 1.0
-       << 3 << 3 << 1 << 2 << 4 << r << g << b << 1.0
-       << 3 << 3 << 0 << 2 << 4 << r << g << b << 1.0
-       << "}})";
-    gv.set_ascii_mode(ascii_bak);
-    return gv;
-}
-#endif
-
-#if defined CGAL_SPHERE_3_H && \
-   !defined CGAL_GV_OUT_SPHERE_3_H
-#define CGAL_GV_OUT_SPHERE_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Sphere_3<R> &S)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Sph")
-       << " {appearance {+edge material {edgecolor "
-       << gv.ecr()  << gv.ecg()  << gv.ecb() <<  "} shading constant}{ "
-       << "SPHERE\n"
-       << std::sqrt(CGAL::to_double(S.squared_radius())) << "\n";
-
-    bool raw_bak = gv.set_raw(true);
-    gv << Point_3<R>(S.center()) << "}})";
-    gv.set_raw(raw_bak);
-    gv.set_ascii_mode(ascii_bak);
-
-    return gv;
-}
-#endif
-
-#if defined CGAL_RAY_2_H && \
-   !defined CGAL_GV_OUT_RAY_2_H
-#define CGAL_GV_OUT_RAY_2_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Ray_2<R> &r)
-{
-    // Note: it won't work if double is not convertible to an RT...
-    const Bbox_3 & bb = gv.get_bbox();
-    Object result = intersection(Iso_rectangle_2<R>(
-		                    Point_2<R>(bb.xmin(), bb.ymin()),
-		                    Point_2<R>(bb.xmax(), bb.ymax())), r);
-    Point_2<R> ipoint;
-    Segment_2<R> iseg;
-    if (assign(ipoint, result))
-	gv << ipoint;
-    else if (assign(iseg, result))
-	gv << iseg;
-    return gv;
-}
-#endif
-
-#if defined CGAL_LINE_2_H && \
-   !defined CGAL_GV_OUT_LINE_2_H
-#define CGAL_GV_OUT_LINE_2_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Line_2<R> &r)
-{
-    // Note: it won't work if double is not convertible to an RT...
-    const Bbox_3 & bb = gv.get_bbox();
-    Object result = intersection(Iso_rectangle_2<R>(
-		                    Point_2<R>(bb.xmin(), bb.ymin()),
-		                    Point_2<R>(bb.xmax(), bb.ymax())), r);
-    Point_2<R> ipoint;
-    Segment_2<R> iseg;
-    if (assign(ipoint, result))
-	gv << ipoint;
-    else if (assign(iseg, result))
-	gv << iseg;
-    return gv;
-}
-#endif
-
-// Ray and Line drawing should be done by intersecting them with the BBox
-// of the Geomview_stream.  But for now we take the easy approach.
-
-#if defined CGAL_RAY_3_H && \
-   !defined CGAL_GV_OUT_RAY_3_H
-#define CGAL_GV_OUT_RAY_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Ray_3<R> &r)
-{
-    typename R::Segment_3 s(r.source(), r.point(1));
-    gv << s;
-    return gv;
-}
-#endif
-
-#if defined CGAL_LINE_3_H && \
-   !defined CGAL_GV_OUT_LINE_3_H
-#define CGAL_GV_OUT_LINE_3_H
-template < class R >
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Line_3<R> &r)
-{
-    typename R::Segment_3 s(r.point(-1), r.point(1));
-    gv << s;
-    return gv;
-}
-#endif
-
-CGAL_EXPORT Geomview_stream&
-operator<<(Geomview_stream &gv, const Bbox_2 &bbox);
-
-CGAL_EXPORT Geomview_stream&
-operator<<(Geomview_stream &gv, const Bbox_3 &bbox);
-
-#if defined CGAL_POINT_3_H && !defined CGAL_GV_IN_POINT_3_H
-#define CGAL_GV_IN_POINT_3_H
-template < class R >
-Geomview_stream&
-operator>>(Geomview_stream &gv, Point_3<R> &point)
-{
-    const char *gclpick =
-	"(pick world pickplane * nil nil nil nil nil nil nil)";
-
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(pickable pickplane yes) (ui-target pickplane yes)"
-       << "(interest " << gclpick << ")";
-
-    char sexpr[1024];
-    gv >> sexpr;  // this reads a gcl expression
-
-    const char* pickpoint = Geomview_stream::nth(sexpr, 3);
-    // this gives something as: (0.0607123 0.0607125 4.76837e-07 0.529628)
-    double x, y, z, w;
-    Geomview_stream::parse_point(pickpoint, x, y, z, w);
-    point = Point_3<R>(x, y, z, w);
-
-    // we echo the input
-    if (gv.get_echo())
-	gv << point;
-
-    // we are done and tell geomview to stop sending pick events
-    gv << "(uninterest " << gclpick << ") (pickable pickplane no)";
-    gv.set_ascii_mode(ascii_bak);
-
-    return gv;
-}
-#endif
-
-} //namespace CGAL
-
-#endif // CGAL_GEOMVIEW_STREAM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Navigation_layer.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Navigation_layer.h
deleted file mode 100644
index 1287121..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Navigation_layer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_NAVIGATION_LAYER_H
-#define CGAL_NAVIGATION_LAYER_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-
-class Navigation_layer : public CGAL::Qt_widget_layer {
-public:
-  Navigation_layer(QObject *parent=0, const char* name=0)
-    : Qt_widget_layer(parent, name){}
-  void draw(){};
-protected:
-  void keyPressEvent(QKeyEvent *e){
-    const double dx = widget->x_real(10) - widget->x_real(0);
-    const double dy = widget->y_real(10) - widget->y_real(0);
-    const double ypage = widget->y_max() - widget->y_min();
-    if ( e->key() == Qt::Key_Left ){
-      widget->move_center(dx, 0);
-    } else if ( e->key() == Qt::Key_Right ){
-      widget->move_center(-dx, 0);
-    } else if ( e->key() == Qt::Key_Down ){
-      widget->move_center(0, -dy);
-    } else if ( e->key() == Qt::Key_Up ){
-      widget->move_center(0, dy);
-    } else if ( e->key() == Qt::Key_Prior ){ //PageUp
-      widget->move_center(0, -ypage/2);
-    } else if ( e->key() == Qt::Key_Next ){ //PageDown
-      widget->move_center(0, ypage/2);
-    } 
-  }
-  void activating(){
-    widget->setFocusPolicy(QWidget::ClickFocus);
-  }
-};
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/OFF_reader.h b/3rdparty/CGAL-4.6/include/CGAL/IO/OFF_reader.h
deleted file mode 100644
index ce3c71a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/OFF_reader.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2015 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Rineau and Sebastien Loriot
-
-#ifndef CGAL_IO_OFF_READER_H
-#define CGAL_IO_OFF_READER_H
-
-#include <CGAL/IO/File_scanner_OFF.h>
-
-#include <vector>
-#include <iostream>
-
-namespace CGAL{
-
-  template <class Point_3, class Polygon_3>
-  bool
-  read_OFF( std::istream& in,
-            std::vector< Point_3 >& points,
-            std::vector< Polygon_3 >& polygons,
-            bool /* verbose */ = false)
-  {
-    CGAL::File_scanner_OFF scanner(in);
-
-    points.resize(scanner.size_of_vertices());
-    polygons.resize(scanner.size_of_facets());
-    for (std::size_t i = 0; i < scanner.size_of_vertices(); ++i) {
-      double x, y, z, w;
-      scanner.scan_vertex( x, y, z, w);
-      CGAL_assertion(w!=0);
-      points[i] = Point_3(x/w, y/w, z/w);
-      scanner.skip_to_next_vertex( i);
-    }
-    if(!in)
-      return false;
-
-    for (std::size_t i = 0; i < scanner.size_of_facets(); ++i) {
-      std::size_t no;
-
-      scanner.scan_facet( no, i);
-      polygons[i].resize(no);
-      for(std::size_t j = 0; j < no; ++j) {
-        std::size_t id;
-        scanner.scan_facet_vertex_index(id, i);
-        if(id < scanner.size_of_vertices())
-        {
-          polygons[i][j] = id;
-        }
-        else
-          return false;
-      }
-    }
-    return (bool) in;
-  }
-
-} // namespace CGAL
-
-#endif // CGAL_IO_OFF_READER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_help_window.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_help_window.h
deleted file mode 100644
index c490f28..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_help_window.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_HELP_WINDOW_H
-#define CGAL_QT_HELP_WINDOW_H
-
-#include <qmainwindow.h>
-#include <qtextbrowser.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qdir.h>
-#include <qstatusbar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qiconset.h>
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qdatastream.h>
-#include <qprinter.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-
-
-class QComboBox;
-class QPopupMenu;
-
-namespace CGAL{
-
-class Qt_help_window : public QMainWindow
-{
-    Q_OBJECT
-public:
-    Qt_help_window( const QString& home_,  const QString& path, 
-                QWidget* parent = 0, const char *name=0 );
-    ~Qt_help_window();
-public slots:
-    void print();
-
-private slots:
-    void setBackwardAvailable( bool );
-    void setForwardAvailable( bool );
-    void pathSelected( const QString & );
-    void histChosen( int );
-
-private:
-    void readHistory();
-
-    QTextBrowser* browser;
-    QComboBox *pathCombo;
-    int backwardId, forwardId;
-    QStringList history;
-    QMap<int, QString> mHistory;
-};
-
-} //end CGAL namespace
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget.h
deleted file mode 100644
index c1f0cb4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget.h
+++ /dev/null
@@ -1,772 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_WIDGET_H
-#define CGAL_QT_WIDGET_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/intersections.h>
-//temporary, should remove next line!!
-#include <CGAL/Triangle_2_Iso_rectangle_2_intersection.h>
-#include <CGAL/IO/Color.h>
-
-#include <vector>
-#include <list>
-#include <map>
-#include <cmath>
-
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qprinter.h>
-
-#include <CGAL/auto_link/CGALQt3.h>
-
-namespace CGAL {
-
-class Qt_widget_layer;
-enum PointStyle { PIXEL, CROSS, PLUS, CIRCLE, DISC, RECT, BOX };
-
-class Qt_widget : public QWidget {
-  Q_OBJECT
-public:
-  // constructor
-  Qt_widget(QWidget *parent = 0, const char *name = 0);
-  // destructor
-  ~Qt_widget() {};
-
-  // initialization of coordinates system
-  void set_window(const double x_min,
-		  const double x_max, 
-		  const double y_min, 
-		  const double y_max,
-		  bool const_ranges = false);
-  void zoom(double ratio);
-  void zoom(double ratio, double xc, double yc);
-  void set_x_scale(const double xscale){ xscal = xscale; }
-  void set_y_scale(const double yscale){ yscal = yscale; }
-
-  void move_center(const double distx, const double disty);
-  void set_center(const double x, const double y);
-
-  // painting system
-  inline QPainter& get_painter() { return (*painter); };
-  inline QPixmap& get_pixmap() { return (*pixmap); };
-  inline QWMatrix& get_matrix() { return (*matrix); };
-  void lock() { ++Locked; };
-  void unlock() { if (Locked>0) --Locked; do_paint(); };
-  void do_paint() { if (Locked==0) repaint(FALSE); };
-
-  virtual QSize sizeHint() const {return QSize(geometry().width(),
-					geometry().height());} 
-  
-  // properties
-  // ~~~~~~~~~~
-  // color
-  QColor color() const;
-  void setColor(const QColor c);
-  // backGroundColor
-  QColor backgroundColor() const;
-  void setBackgroundColor(const QColor& c);
-  // fillColor
-  QColor fillColor() const;
-  void setFillColor(const QColor c);
-  // isFilled
-  bool isFilled() const;
-  void setFilled(const bool f);
-  // lineWidth
-  uint lineWidth() const;
-  void setLineWidth(const uint i);
-  // pointSize
-  uint pointSize() const;
-  void setPointSize(const uint i);
-  // pointStyle
-  typedef CGAL::PointStyle PointStyle;
-  PointStyle pointStyle() const;
-  void setPointStyle(const PointStyle s);
-  // rasterOp
-  RasterOp rasterOp() {return painter->rasterOp();}
-  void setRasterOp(const RasterOp r) {painter->setRasterOp(r);}
-
-  // CGAL version of setFooColor
-  // used by the manipulators system
-  // DO NOT USE THESE THREE UNDOCUMENTED FUNCTIONS !!
-  inline void setColor(const Color c)
-    { setColor(CGAL2Qt_Color(c)); };
-  inline void setBackgroundColor(const Color c)
-    { setBackgroundColor(CGAL2Qt_Color(c)); };
-  inline void setFillColor(const Color c)
-    { setFillColor(CGAL2Qt_Color(c)); };
-
-  // set pen() color to c, cf. manipulators below for setting
-  // backgroundColor and fillColor
-  Qt_widget& operator<<(const Color& c);
-  // set point style
-  Qt_widget& operator<<(const PointStyle& ps);
-  // clear the Widget, fill it with backgroundColor()
-  void clear();
-
-  // coordinates system
-  // ~~~~~~~~~~~~~~~~~~
-  // real world coordinates
-  double x_real(int x) const;
-  double y_real(int y) const;
-  template <class FT>
-  void x_real(int, FT&) const;
-  template <class FT>
-  void y_real(int y, FT&) const;
-
-
-  double x_real_dist(double d) const;
-  double y_real_dist(double d) const;
-
-
-  // pixel coordinates
-  int x_pixel(double x) const;
-  int y_pixel(double y) const;
-  int x_pixel_dist(double d) const;
-  int y_pixel_dist(double d) const;
-
-  inline double x_min() const { return xmin; };
-  inline double y_min() const { return ymin; };
-  inline double x_max() const { return xmax; };
-  inline double y_max() const { return ymax; };
-
-  inline double x_scal() { return xscal; }
-  inline double y_scal() { return yscal; }
-
-  void new_object(CGAL::Object obj) { emit(new_cgal_object(obj)); };
-  
-  //layers
-  
-  void attach(Qt_widget_layer *layer);
-  
-  
-  // remove a layer from the list of displayable scenes
-  void detach(Qt_widget_layer* s);
-
-signals:
-  void s_mousePressEvent(QMouseEvent *e);
-  void s_mouseReleaseEvent(QMouseEvent *e);
-  void s_mouseMoveEvent(QMouseEvent *e);
-  void s_paintEvent(QPaintEvent *e);
-  void s_resizeEvent(QResizeEvent *e);
-  void s_wheelEvent(QWheelEvent *e);
-  void s_mouseDoubleClickEvent(QMouseEvent *e);
-  void s_keyPressEvent(QKeyEvent *e);
-  void s_keyReleaseEvent(QKeyEvent *e);
-  void s_enterEvent(QEvent *e);
-  void s_leaveEvent(QEvent *e);
-  void s_event(QEvent *e);
-  
-  void custom_redraw(); //deprecated:  if user want to draw something
-                        //after layers replaced by redraw_on_front
-  void redraw_on_front(); //called by redraw at the end
-  void redraw_on_back();  //called by redraw at the beginning
-
-
-  void new_cgal_object(CGAL::Object);	//this signal is emited every time an
-					//attached tool constructed an object
-
-  void rangesChanged(); 
-  // triggered when ranges (xmin, xmax, ymin,...) are changed
-
-public slots:
-  void print_to_ps();
-  virtual void redraw();
-
-// backward-compatibility with CGAL-2.4, back() and forth() are
-// deprecated, as well as add_to_history() or clear_history().
-signals:
-  void internal_back();
-  void internal_forth();
-  void internal_add_to_history();
-  void internal_clear_history();
-public slots:
-  bool back() { emit(internal_back()); return true; }
-  bool forth() { emit(internal_forth()); return true; }
-public:
-  void add_to_history() { emit(internal_add_to_history()); }
-  void clear_history() { emit(internal_clear_history()); }
-
-protected:
-  void paintEvent(QPaintEvent *e);
-  void resizeEvent(QResizeEvent *e);
-  void showEvent(QShowEvent *e);
-  void mousePressEvent(QMouseEvent *e);
-  void mouseReleaseEvent(QMouseEvent *e);
-  void mouseMoveEvent(QMouseEvent *e);
-  void wheelEvent(QWheelEvent *e);
-  void mouseDoubleClickEvent(QMouseEvent *e);
-  void keyPressEvent(QKeyEvent *e);
-  void keyReleaseEvent(QKeyEvent *e);
-  void enterEvent(QEvent *e);
-  void leaveEvent(QEvent *e);
-  bool event(QEvent *e);
-
-
-private:
-  // private functions
-  // ~~~~~~~~~~~~~~~~~
-
-  void resize_pixmap();
-  // resize properly the pixmap size, saving then restoring the
-  // painter properties
-
-  void	  set_scales(); 
-  // set xscal and yscal. Update ranges if const_ranges is false.
-
-  // color types convertors
-  static QColor CGAL2Qt_Color(Color c);
-  static Color Qt2CGAL_color(QColor c);
-
-  void attach_standard(Qt_widget_layer *layer);
-  bool is_standard_active();
-  bool does_standard_eat_events();
-  friend class Qt_widget_standard_toolbar;
-
-
-  // private member datas
-  // ~~~~~~~~~~~~~~~~~~~~
-  bool    set_scales_to_be_done;
-  // this flag is set when the widget is not visible and should
-  // postpone the set_scales() call.
-
-  unsigned int Locked;
-  // point style and size
-  uint	      _pointSize;
-  PointStyle  _pointStyle;
-
-  QPixmap     *pixmap;	// the pixmap on which paints the painter
-  QPainter    *painter;	// the painter
-  QPrinter    *printer;	// the printer
-  QWMatrix    *matrix;  // the world matrix
-
-  QBrush      savedBrush; // saved brush, to be able to restore it on
-  // setFilled(true)
-
-  double    xmin, xmax, ymin, ymax; // real dimensions
-  double    xmin_old, xmax_old, ymin_old, ymax_old;
-            //backup ranges for resize
-  double    xscal, yscal; // scales int/double
-  bool      constranges; // tell if the ranges should be const
-
-  //for layers
-  std::list<Qt_widget_layer*>	qt_layers;
-  std::list<Qt_widget_layer*> qt_standard_layers;
-};//end Qt_widget class
-
-// manipulators
-// ~~~~~~~~~~~~
-// single manipulators
-inline
-Qt_widget& operator<<(Qt_widget& w, Qt_widget& (*m)(Qt_widget&))
-{
-  return m(w);
-}
-
-// w << noFill << ... stop the filling of geometrical object
-inline
-Qt_widget& noFill(Qt_widget& w)
-{
-  w.setFilled(false);
-  return w;
-}
-
-// manipulators with one argument
-template <class Param>
-struct Qt_widgetManip {
-  Qt_widget& (*f)(Qt_widget&, Param);
-  Param p;
-  Qt_widgetManip(Qt_widget& (*ff)(Qt_widget&, Param),
-		 Param pp) : f(ff), p(pp) {}
-};
-
-// usage: w << manip(Param) f ...
-template <class Param>
-Qt_widget& operator<<(Qt_widget& w, Qt_widgetManip<Param> m)
-{
-  return m.f(w, m.p);
-}
-
-#define CGAL_QTWIDGET_MANIP(param,function) \
-inline \
-Qt_widget& __Qt_widgetManip##function##Aux (Qt_widget& w, param p) \
-{ w.set##function(p); return w; } \
-inline \
-Qt_widgetManip<param> function(param p) \
-{ return Qt_widgetManip<param>( __Qt_widgetManip##function##Aux, p); }
-
-// w << BackgroundColor(c) << ... sets the background color
-CGAL_QTWIDGET_MANIP( Color, BackgroundColor )
-
-// w << FillColor(c) << ... sets the fill color
-CGAL_QTWIDGET_MANIP( Color, FillColor )
-
-// w << LineWidth(i) << ... sets lines width
-CGAL_QTWIDGET_MANIP( unsigned int, LineWidth )
-
-// w << PointSize(i) << ... sets points size
-CGAL_QTWIDGET_MANIP( unsigned int, PointSize )
-
-// color types convertors
-// ~~~~~~~~~~~~~~~~~~~~~~
-inline
-QColor Qt_widget::CGAL2Qt_Color(Color c)
-{
-  return QColor(c.red(), c.green(), c.blue());
-}
-
-inline
-Color Qt_widget::Qt2CGAL_color(QColor c)
-{
-  return Color(c.red(),c.green(),c.blue());
-}
-
-// properties
-// ~~~~~~~~~~
-inline
-QColor Qt_widget::color() const
-{
-  return painter->pen().color();
-}
-
-
-inline
-void Qt_widget::setColor(const QColor c)
-{
-  QPen p=get_painter().pen();
-  p.setColor(c);
-  get_painter().setPen(p);
-}
-
-inline
-QColor Qt_widget::backgroundColor() const
-{
-  return painter->backgroundColor();
-}
-
-inline
-void Qt_widget::setBackgroundColor(const QColor& c)
-{
-  QWidget::setPaletteBackgroundColor(c);
-  get_painter().setBackgroundColor(c);
-  clear();
-}
-
-inline
-QColor Qt_widget::fillColor() const
-{
-  return painter->brush().color();
-}
-
-inline
-void Qt_widget::setFillColor(const QColor c)
-{
-  setFilled(true);
-  get_painter().setBrush(c);
-}
-
-inline
-bool Qt_widget::isFilled() const
-{
-  return( painter->brush().style()==Qt::NoBrush );
-}
-
-inline
-void Qt_widget::setFilled(const bool f)
-{
-  if (f)
-    painter->setBrush(savedBrush);
-  else
-    {
-      savedBrush=painter->brush();
-      painter->setBrush(QBrush());
-    };
-}
-
-inline
-uint Qt_widget::lineWidth() const
-{
-  return( painter->pen().width());
-}
-
-inline
-void Qt_widget::setLineWidth(const unsigned int i)
-{
-  QPen p=get_painter().pen();
-  p.setWidth(i);
-  get_painter().setPen(p);
-}
-
-inline
-uint Qt_widget::pointSize() const
-{
-  return _pointSize;
-}
-
-inline
-void Qt_widget::setPointSize(const unsigned int i)
-{
-  _pointSize=i;
-}
-
-inline
-PointStyle Qt_widget::pointStyle() const
-{
-  return _pointStyle;
-}
-
-inline
-void Qt_widget::setPointStyle(const PointStyle ps)
-{
-  _pointStyle=ps;
-}
-
-// drawing methods
-// ~~~~~~~~~~~~~~~
-
-template <class R>
-Qt_widget& operator<<(Qt_widget& w, const Point_2<R>& p)
-{
-  int x = w.x_pixel(CGAL::to_double(p.x()));
-  int y = w.y_pixel(CGAL::to_double(p.y()));
-
-  uint size=w.pointSize();
-  PointStyle ps=w.pointStyle();
-
-  switch (ps)
-  {
-    case PIXEL:
-    {
-       w.get_painter().drawPoint(x,y);
-       break;
-    }
-    case CROSS:
-    {
-       w.get_painter().drawLine(x-size/2, y-size/2, x+size/2, y+size/2);
-       w.get_painter().drawLine(x-size/2, y+size/2, x+size/2, y-size/2);
-       break;
-    }
-    case PLUS:
-    {
-       w.get_painter().drawLine(x, y-size/2, x, y+size/2);
-       w.get_painter().drawLine(x-size/2, y, x+size/2, y);
-       break;
-    }
-    case CIRCLE:
-    {
-       QBrush old_brush=w.get_painter().brush();
-       w.get_painter().setBrush(QBrush());
-       w.get_painter().drawEllipse(x-size/2, y-size/2, size, size);
-       w.get_painter().setBrush(old_brush);
-       break;
-    }
-    case DISC:
-    {
-       QBrush old_brush=w.get_painter().brush();
-       w.get_painter().setBrush(w.get_painter().pen().color());
-       w.get_painter().drawEllipse(x-size/2, y-size/2, size, size);
-       w.get_painter().setBrush(old_brush);
-       break;
-    }
-    case RECT:
-    {
-      QBrush old_brush=w.get_painter().brush();
-      w.get_painter().setBrush(QBrush());
-      w.get_painter().drawRect(x-size/2, y-size/2, size, size);
-      w.get_painter().setBrush(old_brush);
-      break;
-    }
-    case BOX:
-    {
-      QBrush old_brush=w.get_painter().brush();
-      w.get_painter().setBrush(w.get_painter().pen().color());
-      w.get_painter().drawRect(x-size/2, y-size/2, size, size);
-      w.get_painter().setBrush(old_brush);
-      break;
-    }
-  };
-  w.do_paint();
-  return w;
-}
-
-#ifdef CGAL_SEGMENT_2_H
-template <class R>
-Qt_widget& operator<<(Qt_widget& w, const Segment_2<R>& s)
-{
-  typedef Simple_cartesian<double> RT;
-
-  double xr1, yr1, xr2, yr2;
-  double scs_x, scs_y, sct_x, sct_y;
-  scs_x = CGAL::to_double(s.source().x());
-  scs_y = CGAL::to_double(s.source().y());
-  sct_x = CGAL::to_double(s.target().x());
-  sct_y = CGAL::to_double(s.target().y());
-
-  xr1 = w.x_real(0); xr2 = w.x_real(w.geometry().width());
-  //next condition true if is outside on the X axes
-  if((scs_x < xr1 && sct_x < xr1) ||
-     (scs_x > xr2 && sct_x > xr2))
-    return w;
-  else{
-    yr2 = w.y_real(0); yr1 = w.y_real(w.geometry().height());
-    //next condition true if is outside on the Y axes
-    if((scs_y < yr1 && sct_y < yr1) ||
-       (scs_y > yr2 && sct_y > yr2))
-      return w;
-  }
-  
-  //if is here, the segment intersect the screen boundaries or is inside
-  int x1, y1, x2, y2;
-  Segment_2<RT>  sr;
-  sr = Segment_2<RT>(Point_2<RT>(scs_x, scs_y), Point_2<RT>(sct_x, sct_y));
-  //next condition true if the segment is inside
-  if(!(scs_x >= xr1 && scs_x <= xr2 &&
-     sct_x >= xr1 && sct_x <= xr2 && 
-     scs_y >= yr1 && scs_y <= yr2 &&
-     sct_y >= yr1 && sct_y <= yr2))
-    {
-    Iso_rectangle_2<RT> r = Iso_rectangle_2<RT>(Point_2<RT>(xr1, yr1),
-                                              Point_2<RT>(xr2, yr2));
-    CGAL::Object obj = CGAL::intersection(r, sr);  
-    if (const Point_2<RT> *p = object_cast<Point_2<RT> >(&obj)){
-      return w << *p;
-    }
-    else if (const Segment_2<RT> *s = object_cast<Segment_2<RT> >(&obj)) {
-      sr = *s;
-    }
-    else {
-      CGAL_assertion(obj.is_empty());
-      return w;
-    }
-  }
-  x1 = w.x_pixel(CGAL::to_double(sr.source().x()));
-  x2 = w.x_pixel(CGAL::to_double(sr.target().x()));
-  y1 = w.y_pixel(CGAL::to_double(sr.source().y()));
-  y2 = w.y_pixel(CGAL::to_double(sr.target().y()));
-  w.get_painter().drawLine(x1, y1, x2, y2);
-  w.do_paint();
-  return w;
-}
-#endif // CGAL_SEGMENT_2_H
-
-#ifdef CGAL_LINE_2_H
-
-template <class R>
-Qt_widget& operator<<(Qt_widget& w, const Line_2<R>& l)
-{
-  typedef Simple_cartesian<double> Rep;
-  typedef Point_2<Rep> Point;
-
-  const Point_2<R>
-    p1=l.point(),
-    p2=p1+l.direction().vector();
-
-  const Point
-    p1d=Point(CGAL::to_double(p1.x()),CGAL::to_double(p1.y())),
-    p2d=Point(CGAL::to_double(p2.x()),CGAL::to_double(p2.y()));
-
-  double
-    x1=w.x_min(),
-    y1=w.y_min(),
-    x2=w.x_max(),
-    y2=w.y_max();
-
-  const double
-    dx=p1d.x()-p2d.x(),
-    dy=p1d.y()-p2d.y();
-
-  if (dx==0 && dy==0) return w;
-
-  if (CGAL::abs(dx)>CGAL::abs(dy))
-    {
-      y1=p1d.y()+(x1-p1d.x())*dy/dx;
-      y2=p1d.y()+(x2-p1d.x())*dy/dx;
-    }
-  else
-    {
-      x1=p1d.x()+(y1-p1d.y())*dx/dy;
-      x2=p1d.x()+(y2-p1d.y())*dx/dy;
-    }
-
-  w.get_painter().drawLine(w.x_pixel(x1),w.y_pixel(y1),
-		       w.x_pixel(x2),w.y_pixel(y2));
-  return w;
-}
-
-#endif // CGAL_LINE_2_H
-
-#ifdef CGAL_RAY_2_H
-template <class R>
-Qt_widget& operator<<(Qt_widget& w, const Ray_2<R>& r)
-{
-  typedef Simple_cartesian<double> Rep;
-  typedef Point_2<Rep> Point;
-
-  const Point_2<R>
-    p1=r.point(0),
-    p2=r.point(1);
-
-  const Point
-    p1d=Point(CGAL::to_double(p1.x()),CGAL::to_double(p1.y())),
-    p2d=Point(CGAL::to_double(p2.x()),CGAL::to_double(p2.y()));
-
-
-  const double
-    dx=p1d.x()-p2d.x(),
-    dy=p1d.y()-p2d.y();
-
-  if (dx==0 && dy==0) return w;
-
-  double x,y;
-
-  if (CGAL::abs(dx)>CGAL::abs(dy))
-    {
-      if (p1d.x()<p2d.x())
-	x = w.x_max();
-      else
-	x = w.x_min();
-      y=p1d.y()+(x-p1d.x())*dy/dx;
-    }
-  else
-    {
-      if (p1d.y()<p2d.y())
-	y = w.y_max();
-      else
-	y = w.y_min();
-      x=p1d.x()+(y-p1d.y())*dx/dy;
-    }
-  w.get_painter().drawLine(w.x_pixel(p1d.x()),w.y_pixel(p1d.y()),
-		       w.x_pixel(x),w.y_pixel(y));
-  return w;
-
-}
-#endif //CGAL_RAY_2_H
-
-#ifdef CGAL_TRIANGLE_2_H
-template< class R >
-Qt_widget&
-operator<<(Qt_widget& w, const Triangle_2<R>& t)
-{
-  CGAL::Iso_rectangle_2<R> r( Point_2<R>(w.x_real(0), w.y_real(0)), 
-                              Point_2<R>(w.x_real(w.geometry().width()), 
-                              w.y_real(w.geometry().height())));
-  CGAL::Object obj = CGAL::intersection(t, r);
-  Point_2<R> pi;
-  Segment_2<R> si;
-  Triangle_2<R> ti;
-  typedef Point_2<R> Point;
-  std::vector<Point> vi;
-  if(CGAL::assign(pi, obj))
-    w << pi;
-  if(CGAL::assign(si, obj))
-    w << si;
-  if(CGAL::assign(ti, obj))
-  {
-    QPointArray array(3);
-    array[0] = QPoint(w.x_pixel(CGAL::to_double(t.vertex(0).x())), 
-                                w.y_pixel(CGAL::to_double(t.vertex(0).y())));
-    array[1] = QPoint(w.x_pixel(CGAL::to_double(t.vertex(1).x())), 
-                                w.y_pixel(CGAL::to_double(t.vertex(1).y())));
-    array[2] = QPoint(w.x_pixel(CGAL::to_double(t.vertex(2).x())), 
-                                w.y_pixel(CGAL::to_double(t.vertex(2).y())));
-    w.get_painter().drawPolygon(array);
-  }   
-  if(CGAL::assign(vi, obj)){
-    QPointArray array(int(vi.size()));
-    typename std::vector<Point>::const_iterator it = vi.begin();
-    int pos = 0;
-    while(it != vi.end()){
-      array[pos] = QPoint(w.x_pixel(CGAL::to_double((*it).x())), 
-                          w.y_pixel(CGAL::to_double((*it).y())));
-      pos++;
-      it++;
-    }  
-  w.get_painter().drawPolygon(array);
-  }
-  w.do_paint();
-
-  return w;}
-#endif
-
-#ifdef CGAL_CIRCLE_2_H
-template < class R>
-Qt_widget& operator<<(Qt_widget& w, const Circle_2<R>& c)
-{
-  int 
-    cx=w.x_pixel(CGAL::to_double(c.center().x())),
-    cy=w.y_pixel(CGAL::to_double(c.center().y())),
-    rx=w.x_pixel_dist((std::sqrt(CGAL::to_double(c.squared_radius())))),
-    ry=w.y_pixel_dist((std::sqrt(CGAL::to_double(c.squared_radius()))));
-
-  w.get_painter().drawEllipse(cx-rx,cy-ry,2*rx,2*ry);
-  w.do_paint();
-  return w;
-}
-#endif // CGAL_CIRCLE_2_H
-
-#ifdef CGAL_ISO_RECTANGLE_2_H
-template< class R >
-Qt_widget&
-operator<<(Qt_widget& w, const Iso_rectangle_2<R>& r)
-{
-  int xmin = w.x_pixel(CGAL::to_double(r.xmin()));
-  int ymin = w.y_pixel(CGAL::to_double(r.ymin()));
-  int xmax = w.x_pixel(CGAL::to_double(r.xmax()));
-  int ymax = w.y_pixel(CGAL::to_double(r.ymax()));
-  w.get_painter().drawRect(xmin,ymin,xmax-xmin,ymax-ymin);
-  w.do_paint();
-  return w;
-}
-#endif // CGAL_ISO_RECTANGLE_2_H
-
-#ifdef CGAL_BBOX_2_H
-Qt_widget& operator<<(Qt_widget& w, const Bbox_2& r);
-// see Qt_widget for the implementation of this non-template function
-#endif // CGAL_BBOX_2_H
-
-// templated x_real and y_real
-
-template <class FT>
-void Qt_widget::x_real(int x, FT& return_t) const
-{
-  if(xscal<1)
-    return_t = static_cast<FT>(xmin+(int)(x/xscal));
-  else{
-    return_t = static_cast<FT>(xmin+x/xscal);
-  }
-}
-
-template <class FT>
-void Qt_widget::y_real(int y, FT& return_t) const
-{
-    if(yscal<1)
-      return_t = static_cast<FT>(ymax-(int)(y/yscal));
-    else{
-      return_t = static_cast<FT>(ymax-y/yscal);
-  }  
-}
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Alpha_shape_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Alpha_shape_2.h
deleted file mode 100644
index a2ee375..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Alpha_shape_2.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-
-#ifndef CGAL_QT_WIDGET_ALPHA_SHAPE_2_H
-#define CGAL_QT_WIDGET_ALPHA_SHAPE_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Alpha_shape_2.h>
-namespace CGAL{
-
-template< class Dt >
-Qt_widget&
-operator << ( Qt_widget& ws, const CGAL::Alpha_shape_2<Dt>& As)
-{
-  //return As.op_window(ws);
-  typedef typename Alpha_shape_2<Dt>::Alpha_shape_edges_iterator 
-                    Edges_iterator;
-  typedef typename Alpha_shape_2<Dt>::Segment Segment_2;
-  if (As.get_mode() == Alpha_shape_2<Dt>::REGULARIZED) 
-  { 
-    for (Edges_iterator edge_alpha_it = As.alpha_shape_edges_begin();
-         edge_alpha_it != As.alpha_shape_edges_end(); edge_alpha_it++)
-    {
-      ws << As.segment(*edge_alpha_it);
-    }//endfor
-
-  } else {
-    for (Edges_iterator edge_alpha_it = As.alpha_shape_edges_begin();
-         edge_alpha_it != As.alpha_shape_edges_end(); edge_alpha_it++)
-    {
-      ws << As.segment(*edge_alpha_it);
-    }//endfor
-  }
-      return ws;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Apollonius_site_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Apollonius_site_2.h
deleted file mode 100644
index 2277935..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Apollonius_site_2.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-#ifndef CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H
-#define CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H
-
-#include <CGAL/Apollonius_site_2.h>
-#include <CGAL/IO/Qt_widget.h>
-
-namespace CGAL {
-
-template <class K>
-Qt_widget&
-operator<<(Qt_widget &qt_w, const Apollonius_site_2<K>& wp)
-{
-  typedef typename K::Circle_2    Circle_2;
-  typedef typename K::Point_2     Point_2;
-
-  Point_2 p(wp.point());
-  Circle_2 c(p, CGAL::square(wp.weight()));
-  return qt_w << p << c;
-}
-
-} //namespace CGAL
-
-
-#include <CGAL/IO/Qt_widget_Hyperbola_2.h>
-
-#endif // CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_2.h
deleted file mode 100644
index 5bb6a6c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_2.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-
-#ifndef CGAL_QT_WIDGET_CONIC_2_H
-#define CGAL_QT_WIDGET_CONIC_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Conic_2.h>
-#include <CGAL/Simple_cartesian.h>
-
-namespace CGAL{
-
-template< class R >
-Qt_widget&
-operator << ( Qt_widget& ws, const CGAL::Conic_2<R>& c)
-{
-  // pixel dimensions of window
-  int dim = (std::max)( ws.width(), ws.height());
-  // length of a pixel in window-coordinates
-  double pixel_x = (ws.x_max() - ws.x_min())/dim;
-  double pixel_y = (ws.y_max() - ws.y_min())/dim;
-  // pixel coordinates, stored for faster output
-  typedef CGAL::Simple_cartesian<double>::Point_2 Point;
-  std::vector<Point> vcoordinates;
-  // conic coordinates
-  double r = CGAL::to_double (c.r()),
-         s = CGAL::to_double (c.s()),
-         t = CGAL::to_double (c.t()),
-         u = CGAL::to_double (c.u()),
-         v = CGAL::to_double (c.v()),
-         w = CGAL::to_double (c.w());
-
-  // Phase I (drawing in x-direction)
-  // solve conic equation for y
-  if (s != 0.0)
-      for (double x = ws.x_min(); x <= ws.x_max(); x+=pixel_x) {
-          double discr = (t*t-4.0*r*s)*(x*x) + (2.0*t*v-4.0*s*u)*x +
-                            v*v - 4.0*s*w;
-          if (discr >= 0.0) {
-              double y1 = (-t*x - v - CGAL::sqrt(discr))/(2.0*s);
-              double y2 = (-t*x - v + CGAL::sqrt(discr))/(2.0*s);
-              vcoordinates.push_back(Point(x, y1));
-              vcoordinates.push_back(Point(x, y2));} }
-  else
-      for (double x = ws.x_min(); x <= ws.x_max(); x+=pixel_x) {
-          double denom = t*x + v;
-          if (denom != 0.0) {
-              double y = -(r*x*x + u*x + w)/denom;
-              vcoordinates.push_back(Point(x, y)); } }
-
-  // Phase II (drawing in y-direction)
-  // solve conic equation for x
-  if (r != 0.0)
-      for (double y = ws.y_min(); y <= ws.y_max(); y+=pixel_y) {
-          double discr = (t*t-4.0*r*s)*(y*y) + (2.0*t*u-4.0*r*v)*y +
-                            u*u - 4.0*r*w;
-          if (discr >= 0.0) {
-              double x1 = (-t*y - u - CGAL::sqrt(discr))/(2.0*r);
-              double x2 = (-t*y - u + CGAL::sqrt(discr))/(2.0*r);
-              vcoordinates.push_back(Point(x1, y));
-              vcoordinates.push_back(Point(x2, y));} }
-  else
-      for (double y = ws.y_min(); y <= ws.y_max(); y+=pixel_y) {
-          double denom = t*y + u;
-          if (denom != 0.0) {
-              double x = -(s*y*y + v*y + w)/denom;
-              vcoordinates.push_back(Point(x, y));} }
-
-  typedef typename std::vector<Point>::const_iterator CIT;
-  for(CIT it1 = vcoordinates.begin(); it1!= vcoordinates.end(); ++it1)
-    ws << *it1;
-
-  return ws;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_arc_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_arc_2.h
deleted file mode 100644
index 24263c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Conic_arc_2.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein  <wein at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_CONIC_ARC_2_H
-#define CGAL_QT_WIDGET_CONIC_ARC_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <list>
-
-namespace CGAL {
-
-/*!
- * Draw an x-monotone conic arc.
- */
-template <class ConicArc>
-Qt_widget& operator<< (Qt_widget& ws,
-                       const _Conic_x_monotone_arc_2<ConicArc>& cv)
-{
-  // Get the co-ordinates of the curve's source and target.
-  const double  sx = CGAL::to_double(cv.source().x());
-  const double  sy = CGAL::to_double(cv.source().y());
-  const double  tx = CGAL::to_double(cv.target().x());
-  const double  ty = CGAL::to_double(cv.target().y());
-
-  if (cv.orientation() == COLLINEAR)
-  {
-    // The curve is a segment - simply draw it.
-    ws.get_painter().drawLine(ws.x_pixel(sx), ws.y_pixel(sy),
-                              ws.x_pixel(tx), ws.y_pixel(ty));
-    return (ws); 
-  }
-
-  // Draw a curves conic arc: As the arc is x-monotone, its source and its 
-  // target has the extreme x-coordinates.
-  const bool    is_source_left = (sx < tx);
-  const int     x_min = is_source_left ? ws.x_pixel(sx) : ws.x_pixel(tx);
-  const int     x_max = is_source_left ? ws.x_pixel(tx) : ws.x_pixel(sx);
-  const int     n = x_max - x_min + 1;
-
-  if (n <= 0)
-    return (ws);
-  
-  typedef std::pair<double, double>    App_point_2;
-  int                                  i;
-  
-  App_point_2  *pts = new App_point_2 [n + 1];
-  cv.polyline_approximation (n, pts);
-
-  ws.get_painter().moveTo (ws.x_pixel(pts[0].first),
-                           ws.y_pixel(pts[0].second));
-  for (i = 1; i <= n; i++)
-  {
-    ws.get_painter().lineTo (ws.x_pixel(pts[i].first),
-                             ws.y_pixel(pts[i].second));
-  }
-  delete[] pts;
-  
-  return (ws);
-}
-
-/*!
- * Draw a conic arc.
- */
-template <class Rat_kernel, class Alg_kernel, class Nt_traits>
-Qt_widget& operator<< 
-  (Qt_widget& ws, 
-   const typename Arr_conic_traits_2<Rat_kernel,
-                                     Alg_kernel,
-                                     Nt_traits>::Curve_2& cv)
-{
-  typedef Arr_conic_traits_2<Rat_kernel,
-                             Alg_kernel,
-                             Nt_traits>                Conic_traits_2;
-  typedef typename Conic_traits_2::X_monotone_curve_2  X_monotone_conic_arc_2;
-
-
-  // Break the arc into x-monotone sub-curves and draw each one separately.
-  Conic_traits_2                                              traits;
-  std::list<X_monotone_conic_arc_2>                           x_arcs;
-  typename std::list<X_monotone_conic_arc_2>::const_iterator  x_iter;
-
-  traits.curve_make_x_monotone (cv,
-				std::back_inserter (x_arcs));
-
-  for (x_iter = x_arcs.begin(); x_iter != x_arcs.end(); ++x_iter)
-    ws << *x_iter;
-
-  return (ws); 
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h
deleted file mode 100644
index 7b129ca..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-
-#ifndef CGAL_QT_WIDGET_CONSTRAINED_TRIANGULATION_2_H
-#define CGAL_QT_WIDGET_CONSTRAINED_TRIANGULATION_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Constrained_triangulation_2.h>
-
-namespace CGAL{
-
-template < class Gt, class Tds, class Itag>
-Qt_widget&
-operator<<(Qt_widget& w,  const Constrained_triangulation_2<Gt,Tds,Itag> &t)
-{
-  w.lock();
-  t.draw_triangulation(w);
-  w.unlock();
-  return w;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h
deleted file mode 100644
index 8dd2254..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_DELAUNAY_TRIANGULATION_2_H
-#define CGAL_QT_WIDGET_DELAUNAY_TRIANGULATION_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-
-namespace CGAL{
-
-template < class Gt, class Tds >
-Qt_widget&
-operator<<(Qt_widget& w,  const Delaunay_triangulation_2<Gt,Tds> &dt)
-{
-  w.lock();
-  dt.draw_triangulation(w);
-  w.unlock();
-  return w;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Hyperbola_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Hyperbola_2.h
deleted file mode 100644
index 1ff3505..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Hyperbola_2.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-#ifndef CGAL_QT_WIDGET_HYPERBOLA_2_H
-#define CGAL_QT_WIDGET_HYPERBOLA_2_H
-
-#include <CGAL/Hyperbola_2.h>
-#include <CGAL/Hyperbola_ray_2.h>
-#include <CGAL/IO/Qt_widget.h>
-
-namespace CGAL {
-
-template< class Gt >
-inline
-Qt_widget& operator<<(Qt_widget& s, const Hyperbola_2< Gt > &H)
-{
-  H.draw_qt(s);
-  return s;
-}
-
-template< class Gt >
-inline
-Qt_widget& operator<<(Qt_widget &s, Hyperbola_ray_2<Gt> &H)
-{
-  H.draw_qt(s);
-  return s;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_QT_WIDGET_HYPERBOLA_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Linear_object_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Linear_object_2.h
deleted file mode 100644
index bda5c41..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Linear_object_2.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// $Date$
-// 
-//
-// Author(s)     : Ron Wein  <wein at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_LINEAR_OBJECT_2_H
-#define CGAL_QT_WIDGET_LINEAR_OBJECT_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Arr_linear_traits_2.h>
-
-namespace CGAL {
-
-/*!
- * Export a polyline to a window stream 
- */
-template <class K>
-Qt_widget & operator<<(Qt_widget & ws, const Arr_linear_object_2<K> & o)
-{
-  if(o.is_segment())
-  {
-    ws << o.segment();
-    return ws;
-  }
-  if(o.is_ray())
-  {
-    ws << o.ray();
-    return ws;
-  }
-
-  CGAL_assertion(o.is_line());
-  ws << o.line();
-  return ws;
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Min_ellipse_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Min_ellipse_2.h
deleted file mode 100644
index a54edb6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Min_ellipse_2.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_MIN_ELLIPSE_2_H
-#define CGAL_QT_WIDGET_MIN_ELLIPSE_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Min_ellipse_2.h>
-
-namespace CGAL{
-
-template< class Traits_ >
-Qt_widget&
-operator<<(Qt_widget &ws,
-              const CGAL::Min_ellipse_2<Traits_>& min_ellipse)
-{
-    typedef CGAL::Min_ellipse_2<Traits_>::Point_iterator  Point_iterator;
-
-    Point_iterator  first( min_ellipse.points_begin());
-    Point_iterator  last ( min_ellipse.points_end());
-    for ( ; first != last; ++first)
-        ws << *first;
-    return ws;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_2.h
deleted file mode 100644
index 0530101..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_2.h
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_NEF_2_H
-#define CGAL_QT_WIDGET_NEF_2_H
-
-#include <CGAL/Nef_polyhedron_2.h>
-#include <CGAL/basic.h>
-#include <CGAL/Cartesian.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Quotient.h>
-
-namespace CGAL{
-
-template <class NT>
-CGAL::Quotient<NT>
-d_to_q(double x)
-{ 
-    NT num = 0; 
-    NT den = 1;
-
-    if (x != 0.0)
-    { int neg = (x < 0);
-      if (neg) x = -x;
-
-      const unsigned shift = 15;   // a safe shift per step
-      const unsigned int shift_pow = 32768; // = 2^shift
-      const double width = 32768;  // = 2^shift
-      const int maxiter = 20;      // ought not be necessary, but just in case,
-                                   // max 300 bits of precision
-      int expt;
-      double mantissa = std::frexp(x, &expt);
-      long exponent = expt;
-      double intpart;
-      int k = 0;
-      
-      while (mantissa != 0.0 && k++ < maxiter)
-
-      { mantissa *= width; // shift double mantissa
-        mantissa = std::modf(mantissa, &intpart);
-        num *= (long)shift_pow;
-        num += (long)intpart;
-        exponent -= shift;
-      }
-      int expsign = (exponent>0 ? +1 : (exponent<0 ? -1 : 0));
-      exponent *= expsign;
-      NT twopot(2);
-      NT exppot(1);
-      while (exponent!=0) {
-        if (exponent & 1)
-          exppot *= twopot;
-        exponent >>= 1;
-        twopot *= twopot;
-      }
-
-      if (expsign > 0)
-        num *= exppot;
-      else if (expsign < 0)
-        den *= exppot;
-      if (neg)
-        num = -num;
-    }
-    CGAL::Quotient<NT> q(num,den);
-    q.normalize();
-    return q;
-}
-
-
-template <typename T>
-CGAL::Qt_widget& operator<<(CGAL::Qt_widget& ws, const Nef_polyhedron_2<T>& P)
-{
-    typedef Nef_polyhedron_2<T> Polyhedron;
-    typedef typename T::Standard_RT Standard_RT;
-    typedef typename T::Standard_segment_2
-      Standard_segment_2;
-    typedef typename T::Standard_point_2
-      Standard_point_2;
-    typedef typename Polyhedron::Explorer TExplorer;
-    typedef typename TExplorer::Halfedge_around_face_const_circulator 
-      Halfedge_around_face_const_circulator;
-
-    typedef typename TExplorer::Point Point;
-
-    typedef typename TExplorer::Vertex_const_iterator
-      Vertex_const_iterator;
-    typedef typename TExplorer::Halfedge_const_iterator
-      Halfedge_const_iterator;
-    typedef typename TExplorer::Face_const_iterator
-      Face_const_iterator;
-
-    //get the background color, fill color, and the object color
-    QColor bgcolor = ws.backgroundColor();
-	  QColor fillcolor = ws.fillColor();
-	  QColor color = ws.color();
-
-    //QPixmap
-    //QPainter painter
-    QPixmap &widget_pixmap = ws.get_pixmap();
-    QPixmap copy_of_pixmap = (QPixmap)widget_pixmap;
-    widget_pixmap.fill(bgcolor);
-
-
-    //Get the screen rectangle to intersect with the current Nef
-    CGAL::Quotient<Standard_RT> wsxq = d_to_q<Standard_RT>(ws.x_min()-1);
-    CGAL::Quotient<Standard_RT> wsyq = d_to_q<Standard_RT>(ws.y_min()-1);
-    Standard_RT wsx = wsxq.numerator() * wsyq.denominator(); 
-    Standard_RT wsy = wsyq.numerator() * wsxq.denominator(); 
-    Standard_RT wsh  = wsxq.denominator() * wsyq.denominator(); 
-    Standard_point_2 p1(wsx, wsy, wsh);
-    
-    wsxq = d_to_q<Standard_RT>(ws.x_min()-1);
-    wsyq = d_to_q<Standard_RT>(ws.y_max()+1);
-    wsx = wsxq.numerator() * wsyq.denominator(); 
-    wsy = wsyq.numerator() * wsxq.denominator(); 
-    wsh  = wsxq.denominator() * wsyq.denominator(); 
-    Standard_point_2 p2(wsx, wsy, wsh);
-
-    wsxq = d_to_q<Standard_RT>(ws.x_max()+1);
-    wsyq = d_to_q<Standard_RT>(ws.y_max()+1);
-    wsx = wsxq.numerator() * wsyq.denominator(); 
-    wsy = wsyq.numerator() * wsxq.denominator(); 
-    wsh  = wsxq.denominator() * wsyq.denominator(); 
-    Standard_point_2 p3(wsx, wsy, wsh);
-
-    wsxq = d_to_q<Standard_RT>(ws.x_max()+1);
-    wsyq = d_to_q<Standard_RT>(ws.y_min()-1);
-    wsx = wsxq.numerator() * wsyq.denominator(); 
-    wsy = wsyq.numerator() * wsxq.denominator(); 
-    wsh  = wsxq.denominator() * wsyq.denominator(); 
-    Standard_point_2 p4(wsx, wsy, wsh);
-
-    Standard_point_2 rect1[4] = {p4, p3, p2, p1};
-    Nef_polyhedron_2<T> N1(rect1, rect1+4);
-    Nef_polyhedron_2<T> N2 = P.intersection(N1);
-    TExplorer D = N2.explorer();
-
-	  //TExplorer D = P.explorer();
-    
-    //The faces
-    Face_const_iterator 
-      fit = D.faces_begin(), fend = D.faces_end();
-    // we don't draw the first face outside the box:
-    for ( ++fit; fit != fend; ++fit) {
-      Qt::RasterOp old_raster = ws.rasterOp();
-      ws.setRasterOp(Qt::CopyROP);
-      //save the initial raster mode
-      if(D.mark(fit))
-      	ws.setFillColor(fillcolor);      
-      else
-        ws.setFillColor(bgcolor);        
-
-      std::list<Point> l;
-      Halfedge_around_face_const_circulator fcirc(D.halfedge(fit)), 
-                                            fend(fcirc);
-      CGAL_For_all(fcirc, fend){
-        if(D.is_standard(D.target(fcirc)))
-        l.push_back(D.point(D.target(fcirc)));
-      }
-      QPointArray array(l.size());int i=0;
-      typename std::list<Point>::const_iterator it = l.begin();
-      while(it!=l.end()){
-        array.setPoint(i++, ws.x_pixel(to_double((*it).x())),
-		      ws.y_pixel(to_double((*it).y())));
-      it++;
-      }
-      ws.get_painter().drawPolygon(array);
-      ws.setRasterOp(old_raster);
-/*
-      typedef typename TExplorer::Isolated_vertex_const_iterator
-      Isolated_vertex_const_iterator;
-      Isolated_vertex_const_iterator iv_it;
-      for (iv_it = D.isolated_vertices_begin(fit); 
-        iv_it != D.isolated_vertices_end(fit); ++iv_it) {
-        if(D.mark(iv_it))
-          ws.setColor(color);
-        else
-       	  ws.setColor(bgcolor);
-        if(D.is_standard(iv_it))
-          ws << D.point(iv_it);
-      }
-*/
-    }//endfor Face_const_iterator
-    
-    //save the initial raster mode
-    Qt::RasterOp old_raster = ws.rasterOp();
-    ws.setRasterOp(Qt::CopyROP);
-
-
-    // draw segments underlying halfedges: 
-    Halfedge_const_iterator hit, hend = D.halfedges_end();
-    for (hit = D.halfedges_begin(); hit != hend; ++(++hit)) {
-      if(D.mark(hit))
-        ws.setColor(color);
-      else
-        ws.setColor(bgcolor);
-      if(D.is_standard(D.source(hit)) 
-        && D.is_standard(D.target(hit)))
-          ws << Standard_segment_2(D.point(D.source(hit)),
-                                   D.point(D.target(hit)));
-    }
-    
-    // draw points underlying vertices:
-    Vertex_const_iterator vit, vend = D.vertices_end();
-    for (vit = D.vertices_begin(); vit != vend; ++vit){
-      if(D.mark(vit))
-        ws.setColor(color);
-      else
-       	ws.setColor(bgcolor);
-      if(D.is_standard(vit))
-        ws << D.point(vit);
-    }
-    
-    ws.setRasterOp(old_raster);
-    bitBlt(&widget_pixmap, 0, 0, &copy_of_pixmap, 
-      0, 0, ws.width(), ws.height(), Qt::XorROP, true);
-    return ws;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_3.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_3.h
deleted file mode 100644
index d27d2fa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_3.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef CGAL_QT_WIDGET_NEF_3_H
-#define CGAL_QT_WIDGET_NEF_3_H
-
-#include <CGAL/IO/Qt_widget_OpenGL.h>
-#include <CGAL/Nef_3/OGL_helper.h>
-
-namespace CGAL {
-
-template <typename Nef_polyhedron>
-class Qt_widget_Nef_3 : public Qt_widget_OpenGL {
-
-public:
-  Qt_widget_Nef_3(const Nef_polyhedron& N) : 
-    Qt_widget_OpenGL(600,600,0.5) {
-
-    object_ = new CGAL::OGL::Polyhedron();
-    CGAL::OGL::Nef3_Converter<Nef_polyhedron>::convert_to_OGLPolyhedron(N,
-                                   static_cast<CGAL::OGL::Polyhedron*>(object_));
-    resize(window_width,window_height);
-    
-    main = new QPopupMenu;
-    sub1 = new QPopupMenu;
-    sub2 = new QPopupMenu;
-    sub3 = new QPopupMenu;
-
-    sub1->insertItem("Reset", RESET_CONTROL);
-    sub1->insertItem("Rotate", ROTATE);
-    sub1->insertItem("Scale", SCALE);
-    sub1->insertItem("Translate in XY", TRANSLATE);
-    //    sub1->insertItem("Translate in Z", TRANS_Z);
-    QObject::connect(sub1, SIGNAL(activated(int)), this, SLOT(slotControlMenu(int)));
-
-    sub2->insertItem("Boundary", CGAL::OGL::SNC_BOUNDARY);
-    sub2->insertItem("Skeleton", CGAL::OGL::SNC_SKELETON);
-    QObject::connect(sub2, SIGNAL(activated(int)), this, SLOT(slotRenderMenu(int)));
-    
-    sub3->insertItem("Toggle Axes", CGAL::OGL::SNC_AXES);
-    QObject::connect(sub3, SIGNAL(activated(int)), this, SLOT(slotOptionsMenu(int)));
-
-    main->insertItem("&Control", sub1);
-    main->insertItem("&Render", sub2);
-    main->insertItem("&Options", sub3);
-    //    main->insertItem("&Persp/Ortho", this, SLOT(slotPerspective()));
-    main->insertItem("&Toggle Fullscreen", this, SLOT(slotFullscreen()));
-    main->insertItem("&Quit", qApp, SLOT(quit()));
-  }
-
-  ~Qt_widget_Nef_3() {
-    delete object_;
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_QT_WIDGET_NEF_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_S2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_S2.h
deleted file mode 100644
index bb9fc90..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Nef_S2.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef CGAL_QT_WIDGET_NEF_S2_H
-#define CGAL_QT_WIDGET_NEF_S2_H
-
-#include <CGAL/IO/Qt_widget_OpenGL.h>
-#include <CGAL/Nef_S2/Sphere_geometry_OGL.h>
-
-namespace CGAL {
-
-template <typename Nef_polyhedron>
-class Qt_widget_Nef_S2 : public Qt_widget_OpenGL {
-
- public:
-  Qt_widget_Nef_S2(const typename Nef_polyhedron::Const_decorator& N) : 
-    Qt_widget_OpenGL(300,300,1.5) {
-    
-    object_ = new CGAL::OGL::Unit_sphere(CGAL::OGL::NefS2_to_UnitSphere<Nef_polyhedron>::convert(N));
-    resize(window_width, window_height);
-  
-    main = new QPopupMenu;
-    sub1 = new QPopupMenu;
-    sub2 = new QPopupMenu;
-    sub3 = new QPopupMenu;
-    
-    sub1->insertItem("Reset", RESET_CONTROL);
-    sub1->insertItem("Rotate", ROTATE);
-    sub1->insertItem("Scale", SCALE);
-    sub1->insertItem("Translate in XY", TRANSLATE);
-    //    sub1->insertItem("Translate in Z", TRANS_Z);
-    QObject::connect(sub1, SIGNAL(activated(int)), this, SLOT(slotControlMenu(int)));
-    
-    sub2->insertItem("Faces", CGAL::OGL::SM_FACES);
-    sub2->insertItem("Skeleton", CGAL::OGL::SM_SKELETON);
-    sub2->insertItem("Triangulation",CGAL::OGL::SM_TRIANGULATION);
-    QObject::connect(sub2, SIGNAL(activated(int)), this, SLOT(slotRenderMenu(int)));
-    
-    sub3->insertItem("Toggle Axes", CGAL::OGL::SM_AXES);
-    sub3->insertItem("Toggle Unity Cube", CGAL::OGL::SM_CUBE);
-    QObject::connect(sub3, SIGNAL(activated(int)), this, SLOT(slotOptionsMenu(int)));
-    
-    main->insertItem("&Control", sub1);
-    main->insertItem("&Render", sub2);
-    main->insertItem("&Options", sub3);
-    //    main->insertItem("&Persp/Ortho", this, SLOT(slotPerspective()));
-    main->insertItem("&Toggle Fullscreen", this, SLOT(slotFullscreen()));
-    main->insertItem("&Quit", qApp, SLOT(quit()));
-  }
-
-  ~Qt_widget_Nef_S2() {
-    delete object_;
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_QT_WIDGET_NEF_S2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_OpenGL.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_OpenGL.h
deleted file mode 100644
index a7a392b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_OpenGL.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef CGAL_QT_WIDGET_OPENGL_H
-#define CGAL_QT_WIDGET_OPENGL_H
-
-// #include <CGAL/Nef_3/OGL_helper.h>
-// #include <CGAL/Nef_S2/Sphere_geometry_OGL.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Nef_S2/OGL_base_object.h>
-
-#include <qapplication.h>
-#include <qgl.h>
-#include <qwidget.h>
-#include <qevent.h>
-#include <qpopupmenu.h>
-#include <qpoint.h>
-
-#include <CGAL/auto_link/CGALQt3.h>
-
-namespace CGAL {
-
-class Qt_widget_OpenGL : public QGLWidget {
-  Q_OBJECT
-
-    typedef CGAL::OGL::OGL_base_object::Affine_3       Affine_3;
-    typedef CGAL::OGL::OGL_base_object::Double_vector  Double_vector;
-    //    typedef CGAL::Simple_cartesian<double>::Aff_transformation_3  Affine_3;
-
-protected:
- enum MenuEntriesS2 { ROTATE, SCALE, TRANSLATE, TRANS_Z, RESET_CONTROL, 
-		      PERSP, FULLSCREEN, QUIT };
-
-  CGAL::OGL::OGL_base_object* object_;
-
-  int window_width;          // Breite und
-  int window_height;         // Hoehe des Fensters
-  int window_radius;           // min(width,height) / 2
-
-  bool perspective;
-  bool fullscreen;
-
-  int mouse_x, mouse_y;      // Mauskoordinaten linker button
-  int interaction;                   // type of interaction in motion fct.
-  int motion_mode;           // Bewegen der Maus bei Mouse1 gedrueckt
-  int submenu1, submenu2;
-  long double dx;                // Translation
-  long double dy;                // Translation
-  long double dz;                     // Translation in Z
-  long double s;                 // Skalierung
-  long double init_s;
-
-  Affine_3 rotation;   // Rotation
-
-  long double factor_s;              // Umrechnungsfaktor fuer Skalierung
-  long double factor_w;
-  long double factor_d;
-
-  QPopupMenu* main;
-  QPopupMenu* sub1;
-  QPopupMenu* sub2;
-  QPopupMenu* sub3;
-
-protected:
-  Affine_3 virtual_sphere_transformation( double old_x, double old_y, 
-					  double new_x, double new_y);
-
-protected slots:
-  void slotControlMenu(int index);
-  void slotRenderMenu(int index);
-  void slotOptionsMenu(int index);
-  void slotFullscreen();
-  void slotPerspective();
-
-protected:
-  virtual void mouseMoveEvent( QMouseEvent* event);
-  virtual void mousePressEvent( QMouseEvent* event);
-  virtual void mouseReleaseEvent( QMouseEvent* event);
-
-public:
-  Qt_widget_OpenGL(int width, int height, double scale);
-  virtual void paintGL();
-  virtual void initializeGL();
-  virtual void resizeGL(int w, int h);
-};
-
-} // namespace CGAL
-#endif // CGAL_QT_WIDGET_OPENGL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h
deleted file mode 100644
index 0d0f284..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_OPTIMISATION_CIRCLE_2_H
-#define CGAL_QT_WIDGET_OPTIMISATION_CIRCLE_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-
-namespace CGAL{
-template<class Traits>
-Qt_widget&
-operator << (Qt_widget &ws,
-	     const CGAL::Optimisation_circle_2<Traits>& oc){
-  typedef typename Traits::Point_2  Point_2;
-  typedef typename Traits::Circle_2 Circle_2;
-
-  double cx( CGAL::to_double( oc.center().x()));
-  double cy( CGAL::to_double( oc.center().y()));
-  double sr( CGAL::to_double( oc.squared_radius()));
-
-  if( ! CGAL_NTS is_negative(sr))
-    ws << Circle_2( Point_2(cx, cy), sr);
-  return ws;
-}
-
-}//end namespace
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h
deleted file mode 100644
index 788ff8f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_OPTIMISATION_ELLIPSE_2_H
-#define CGAL_QT_WIDGET_OPTIMISATION_ELLIPSE_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_Conic_2.h>
-
-namespace CGAL{
-
-template< class Traits_ >
-Qt_widget&
-operator << ( Qt_widget &ws,
-              const CGAL::Optimisation_ellipse_2<Traits_>& oe)
-{
-
-  typedef Cartesian<double> Rep;
-  typedef Point_2<Rep>	    Point;
-  typedef Segment_2<Rep>    Segment;
-  
-  switch ( oe.n_boundary_points) {
-      case 0:
-        break;
-      case 1:
-        ws << oe.boundary_point1;
-        break;
-      case 2: {
-	      double  px1( CGAL::to_double( oe.boundary_point1.x()));
-        double  py1( CGAL::to_double( oe.boundary_point1.y()));
-        double  px2( CGAL::to_double( oe.boundary_point2.x()));
-        double  py2( CGAL::to_double( oe.boundary_point2.y()));
-        ws << Segment( Point(px1, py1), Point(px2, py2)); 
-	      }
-        break;
-      case 3:
-      case 4:
-      case 5:
-	{
-	  typedef CGAL::Conic_2<CGAL::Cartesian<double> >
-	    DoubleConic_2;
-	  DoubleConic_2 dc2;
-	  oe.double_conic(dc2);
-	  ws << dc2;
-	}
-        break;
-      default:
-        CGAL_optimisation_assertion( ( oe.n_boundary_points >= 0) &&
-                                     ( oe.n_boundary_points <= 5) ); }
-    return( ws);
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polygon_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polygon_2.h
deleted file mode 100644
index a99cc14..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polygon_2.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_POLYGON_2_H
-#define CGAL_QT_WIDGET_POLYGON_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Polygon_2.h>
-
-namespace CGAL{
-
-template <class Tr,class Co>
-Qt_widget& operator<<(Qt_widget& w, const Polygon_2<Tr,Co>& pol)
-{
-  typedef typename Polygon_2<Tr,Co>::Vertex_const_iterator VI;
-  QPointArray array;
-
-  array.resize(pol.size());
-
-  unsigned int n=0;
-  for(VI i=pol.vertices_begin();i!=pol.vertices_end();i++)
-    {
-      array.setPoint(n++,w.x_pixel(to_double(i->x())),
-		     w.y_pixel(to_double(i->y())));
-    }
-  w.get_painter().drawPolygon(array);
-  w.do_paint();
-  return w;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polyline_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polyline_2.h
deleted file mode 100644
index 62ce484..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Polyline_2.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// $Date$
-// 
-//
-// Author(s)     : Ron Wein  <wein at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_QT_WIDGET_POLYLINE_2_H
-#define CGAL_QT_WIDGET_POLYLINE_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Arr_traits_2/Polyline_2.h>
-
-namespace CGAL {
-
-/*!
- * Export a polyline to a window stream 
- */
-template <class T_SegmentTraits>
-Qt_widget & operator<<(Qt_widget & ws, const _Polyline_2<T_SegmentTraits> & cv)
-{
-  for (unsigned int i = 0; i < cv.size(); ++i) ws << cv[i];
-  return ws;
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h
deleted file mode 100644
index 0713a22..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_REGULAR_TRIANGULATION_2_H
-#define CGAL_QT_WIDGET_REGULAR_TRIANGULATION_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Regular_triangulation_2.h>
-
-namespace CGAL{
-
-template < class Gt, class Tds >
-Qt_widget&
-operator<<(Qt_widget& w, Regular_triangulation_2<Gt,Tds> &t)
-{
-  w.lock();
-  t.draw_triangulation(w);
-  w.unlock();
-  return w;
-}
-
-}//end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Triangulation_2.h
deleted file mode 100644
index 3287e96..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_Triangulation_2.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_TRIANGULATION_2_H
-#define CGAL_QT_WIDGET_TRIANGULATION_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/apply_to_range.h>
-
-
-namespace CGAL {
-
-template <class Gt, class Tds>
-class Draw_triangulation {
-private:
-  const Triangulation_2<Gt, Tds>& t;
-  Qt_widget& w;
-public:
-  Draw_triangulation(const Triangulation_2<Gt, Tds>& _t, Qt_widget& _w)
-    : t(_t), w(_w)
-  {}
-  void operator()(typename Triangulation_2<Gt, Tds>::Face_handle fh)
-  {
-    for (int i=0; i<3; i++)
-      if (fh < fh->neighbor(i) || t.is_infinite(fh->neighbor(i)))
-        w << t.segment(fh,i);
-  }
-};
-
-
-template < class Gt, class Tds>
-Qt_widget&
-operator<<(Qt_widget& w,  const Triangulation_2<Gt, Tds> &t)
-{
-  if (t.dimension()<2) {
-    t.draw_triangulation(w);
-    return w;
-  }
-  typedef typename Triangulation_2<Gt, Tds>::Point OpPoint;
-  w.lock();
-  Draw_triangulation<Gt, Tds> draw(t, w);
-  apply_to_range(t, OpPoint(w.x_min(), w.y_max()), 
-                 OpPoint(w.x_max(), w.y_min()), draw);
-  w.unlock();
-  return w;
-}
-
-
-}// end namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_2.h
deleted file mode 100644
index 752002d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_2.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2003-2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud, Sylvain Pion, Radu Ursu
-
-// Partially supported by the IST Programme of the EU as a Shared-cost
-// RTD (FET Open) Project under Contract No  IST-2000-26473 
-// (ECG - Effective Computational Geometry for Curves and Surfaces) 
-// and a STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
-#define CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Circular_arc_2.h>
-#include <cmath>
-
-namespace CGAL {
-
-template < typename CK >
-CGAL::Qt_widget &
-operator<<(CGAL::Qt_widget & widget, const CGAL::Circular_arc_2<CK> &arc)
-{
-    const typename CK::Circle_2 & circ = arc.supporting_circle();
-    //typename CK::Circle_2 circ = arc.supporting_circle();
-    const typename CK::Point_2 & center = circ.center();
-    const typename CK::Circular_arc_point_2 & source = arc.source();
-    const typename CK::Circular_arc_point_2 & target = arc.target();
-    double rad = std::sqrt(CGAL::to_double(circ.squared_radius()));
-
-    int x_screen   = widget.x_pixel(CGAL::to_double(center.x()));
-    int y_screen   = widget.y_pixel(CGAL::to_double(center.y()));
-    int x_screen_b = widget.x_pixel(CGAL::to_double(center.x()) + rad);
-    int radius     = x_screen_b - x_screen;
-
-    double a   = std::atan2( to_double(source.y() - center.y()),
-		             to_double(source.x() - center.x())); 
-    double a2p = std::atan2( to_double(target.y() - center.y()),
-		             to_double(target.x() - center.x()));
-
-    if (a2p <= a)
-        a2p += 2 * CGAL_PI;
-
-    double alen2 = a2p - a;
-
-    double diff = 180/CGAL_PI*16;
-
-    widget.get_painter().drawArc(x_screen - radius, 
-				 y_screen - radius, 
-				 2 * radius, 2 * radius, 
-				 (int)(a * diff), 
-				 (int)(alen2 * diff));
-    return widget;
-}
-
-} // namespace CGAL
-
-#endif // CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h
deleted file mode 100644
index 2e3f384..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2003-2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud, Sylvain Pion
-
-// Partially supported by the IST Programme of the EU as a Shared-cost
-// RTD (FET Open) Project under Contract No  IST-2000-26473 
-// (ECG - Effective Computational Geometry for Curves and Surfaces) 
-// and a STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_IO_QT_WIDGET_CIRCULAR_ARC_ENDPOINT_2_H
-#define CGAL_IO_QT_WIDGET_CIRCULAR_ARC_ENDPOINT_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Circular_arc_point_2.h>
-
-namespace CGAL {
-
-template < typename CK >
-CGAL::Qt_widget &
-operator<<(CGAL::Qt_widget & widget, const CGAL::Circular_arc_point_2<CK> &p)
-{
-  typedef typename CK::Point_2   Point_2;
-  return widget << Point_2(to_double(p.x()), to_double(p.y()));
-}
-
-} // namespace CGAL
-
-#endif // CGAL_IO_QT_WIDGET_CIRCULAR_ARC_ENDPOINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_focus.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_focus.h
deleted file mode 100644
index 1689377..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_focus.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_FOCUS_H
-#define CGAL_QT_WIDGET_FOCUS_H
-
-#include <CGAL/IO/pixmaps/focus1.xpm>
-#include <CGAL/IO/pixmaps/focus1_mask.xpm>
-#include <CGAL/IO/pixmaps/focus2.xpm>
-#include <CGAL/IO/pixmaps/focus2_mask.xpm>
-#include <CGAL/IO/pixmaps/focus3.xpm>
-#include <CGAL/IO/pixmaps/focus3_mask.xpm>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-
-
-namespace CGAL {
-
-class Qt_widget_focus : public Qt_widget_layer
-{
-private:
-  QPixmap *mouse_ico1,
-          *mouse_ico2,
-          *mouse_ico3;
-  QCursor *cursor1,
-          *cursor2,
-          *cursor3;
-  QBitmap cb, cm;
-  int	  cycle;
-  QCursor oldcursor;
-
-public:
-  Qt_widget_focus(QObject* parent = 0, const char* name = 0) 
-    : Qt_widget_layer(parent, name), cycle(0)
-  {
-	mouse_ico1 = new QPixmap( (const char**)focus1_xpm);
-	mouse_ico2 = new QPixmap( (const char**)focus2_xpm);
-	mouse_ico3 = new QPixmap( (const char**)focus3_xpm);
-	
-	QPixmap *mouse_ico_mask1 = new QPixmap((const char**)focus1_mask_xpm);	
-	QPixmap *mouse_ico_mask2 = new QPixmap((const char**)focus2_mask_xpm);
-	QPixmap *mouse_ico_mask3 = new QPixmap((const char**)focus3_mask_xpm);
-
-	cb = *mouse_ico1; cm = *mouse_ico_mask1;
-	mouse_ico1->setMask(cm);
-	cursor1 = new QCursor(*mouse_ico1);
-
-	cb = *mouse_ico2; cm = *mouse_ico_mask2;
-	mouse_ico2->setMask(cm);
-	cursor2 = new QCursor(*mouse_ico2);
-
-	cb = *mouse_ico3; cm = *mouse_ico_mask3;
-	mouse_ico3->setMask(cm);
-	cursor3 = new QCursor(*mouse_ico3);
-  };
-
-  void timerEvent( QTimerEvent *)
-  {
-	switch(cycle){
-	case 1:
-		widget->setCursor(*cursor1);
-		cycle++;
-		break;
-	case 2:
-		widget->setCursor(*cursor2);
-		cycle++;
-		break;
-	case 3:
-		widget->setCursor(*cursor3);
-		cycle=1;
-		break;
-	}
-  }
-private:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton
-       && is_pure(e->state()))
-    {
-      double x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);	
-      widget->set_center(x, y);
-    }
-  };
-  void deactivating()
-  {    
-    widget->setCursor(oldcursor);
-	  killTimers();
-  };
-
-  void activating()
-  {
-    oldcursor = widget->cursor();
-	  startTimer( 200 );
-	  cycle = 1;
-
-  };
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_FOCUS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_circle.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_circle.h
deleted file mode 100644
index 212dded..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_circle.h
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_GET_CIRCLE_H
-#define CGAL_QT_WIDGET_GET_CIRCLE_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/squared_distance_2.h> 
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON
-#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-
-template <class R>
-class Qt_widget_get_circle : public Qt_widget_layer
-{
-public:
-  typedef typename R::Point_2   Point;
-  typedef typename R::Circle_2  Circle;
-  typedef typename R::FT        FT;
-
-  Qt_widget_get_circle(const QCursor c=QCursor(Qt::crossCursor),
-		       QObject* parent = 0, const char* name = 0)
-     : Qt_widget_layer(parent, name), cursor(c), firstpoint(false),
-       firsttime(true){};
-
-  void draw(){
-    firsttime = true;
-  }
-
-protected:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON 
-       && !firstpoint
-       && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      x1 = x;
-      y1 = y;
-      x2 = x;
-      y2 = y;
-      firstpoint = true;
-    } else if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON){
-      FT x, y; 
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      widget->new_object(make_object(Circle(Point(x1,y1),
-	      squared_distance(Point(x1, y1), Point(x,y)))));
-      firstpoint = false;
-      firsttime = true;
-    }
-  };
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-         if(firstpoint)
-         {
-           firstpoint = false;
-           RasterOp old_raster = widget->rasterOp();
-           QColor old_color = widget->color();
-           widget->lock();
-           widget->setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-           *widget << Circle(Point(x1,y1),
-                      squared_distance(Point(x1, y1), Point(x2,y2)));
-           widget->setRasterOp(old_raster);
-           widget->setColor(old_color);
-           widget->unlock();
-           firsttime = true;
-         }
-         break;
-    }//endswitch
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    if(firstpoint)
-    {
-      QColor old_color = widget->color();
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode
-      
-      widget->lock();
-        widget->setRasterOp(XorROP);
-        *widget << CGAL::GREEN;
-        *widget << Circle(Point(x1,y1),
-        squared_distance(Point(x1, y1), Point(x2,y2)));
-      widget->unlock();
-      widget->setRasterOp(old_raster);
-      widget->setColor(old_color);
-      firsttime = true;
-    }
-  }
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(firstpoint==TRUE)
-    {		
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      QColor old_color = widget->color();
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode		
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      *widget << CGAL::GREEN;
-      if(!firsttime)
-        *widget << Circle(Point(x1,y1),
-		  squared_distance(Point(x1, y1), Point(x2,y2)));
-      *widget << Circle(Point(x1,y1),
-		  squared_distance(Point(x1, y1), Point(x,y)));
-      widget->unlock();
-      widget->setRasterOp(old_raster);
-      widget->setColor(old_color);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;	
-      firsttime = false;
-    }
-  };
-  void activating()
-  {
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-  };
-  
-  void deactivating()
-  {
-    widget->setFocusPolicy(oldpolicy);
-    widget->setCursor(oldcursor);
-    firstpoint = false;
-  };
-
-  QCursor cursor;
-  QCursor oldcursor;
-  
-
-  FT    x1, //the X of the first point
-        y1; //the Y of the first point
-  FT    x2, //the old second point's X
-        y2; //the old second point's Y
-  bool	firstpoint, //true if the user left clicked once
-	firsttime;  //true if the line is not drawn
-  QWidget::FocusPolicy	oldpolicy;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_SEGMENT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_iso_rectangle.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_iso_rectangle.h
deleted file mode 100644
index 79f24c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_iso_rectangle.h
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_GET_ISO_RECTANGLE_H
-#define CGAL_QT_WIDGET_GET_ISO_RECTANGLE_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qrect.h>
-#include <qcursor.h>
-
-#ifndef CGAL_QT_LEFT_BUTTON
-#define CGAL_QT_LEFT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-template <class T>
-class Qt_widget_get_iso_rectangle : public Qt_widget_layer
-{
-private:
-  QCursor cursor;
-  QCursor oldcursor;
-
-public:
-  int                                 first_x, first_y, x2, y2;
-  bool                                widgetrepainted;
-  bool                                on_first;
-  QWidget::FocusPolicy                oldpolicy;
-  typedef typename T::Iso_rectangle_2 Iso_rectangle_2;
-  typedef typename T::RT              RT;
-
-  Qt_widget_get_iso_rectangle(const QCursor
-			      c=QCursor(Qt::crossCursor),
-			      QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name),  cursor(c), widgetrepainted(true),
-      on_first(false) {};
-  void draw(){
-    widgetrepainted = true;
-  };
-
-protected:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_LEFT_BUTTON
-       && is_pure(e->state()))
-    {
-      if (!on_first)
-      {
-        first_x = e->x();
-        first_y = e->y();
-        on_first = true;
-      } else {
-          if((e->x() != first_x) && (e->y() != first_y)) {
-          RT x, y, xfirst2, yfirst2;
-          widget->x_real(e->x(), x);
-          widget->y_real(e->y(), y);
-          widget->x_real(first_x, xfirst2);
-          widget->y_real(first_y, yfirst2);
-          RT xmin, xmax, ymin, ymax;
-          if(x < xfirst2) {xmin = x; xmax = xfirst2;}
-          else {xmin = xfirst2; xmax = x;};
-          if(y < yfirst2) {ymin = y; ymax = yfirst2;}
-          else {ymin = yfirst2; ymax = y;};
-
-          widget->new_object(
-                     make_object(Iso_rectangle_2(xmin, ymin, 
-                                                 xmax, ymax)));
-          on_first = false;
-          widgetrepainted = true;
-        }
-      }
-    }
-  };
-
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(on_first)
-    {
-      int x = e->x();
-      int y = e->y();
-      *widget << noFill;
-      RasterOp old = widget->rasterOp();	//save the initial raster mode
-      QColor old_color=widget->color();
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      widget->setColor(Qt::green);
-      if(!widgetrepainted)
-        widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-      widget->get_painter().drawRect(first_x, first_y, x - first_x,
-                                     y - first_y);
-      widget->unlock();
-      widget->setColor(old_color);
-      widget->setRasterOp(old);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      widgetrepainted = false;
-    }
-  };
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-         if (on_first)
-         {
-           widget->lock();
-           *widget << noFill;
-           RasterOp old = widget->rasterOp();	//save the initial raster mode
-           QColor old_color=widget->color();
-           widget->setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-           if(!widgetrepainted)
-             widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-           widget->setColor(old_color);
-           widget->setRasterOp(old);
-           widgetrepainted = true;
-
-           widget->unlock();
-	   on_first = false;
-         }
-         break;
-    }//endswitch
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    if (on_first)
-    {
-      widget->lock();
-      *widget << noFill;
-      RasterOp old = widget->rasterOp();	//save the initial raster mode
-      QColor old_color=widget->color();
-      widget->setRasterOp(XorROP);
-      *widget << CGAL::GREEN;
-      if(!widgetrepainted)
-        widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-      widget->setColor(old_color);
-      widget->setRasterOp(old);
-      widgetrepainted = true;
-
-      widget->unlock();
-    }
-  }
-
-  void activating()
-  {
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-    widgetrepainted = true;
-  };
-
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-    widget->setFocusPolicy(oldpolicy);
-    on_first = false;
-  };
-};//end class 
-
-} // namespace CGAL
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_line.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_line.h
deleted file mode 100644
index d224cae..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_line.h
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_GET_LINE_H
-#define CGAL_QT_WIDGET_GET_LINE_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qcursor.h>
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON
-#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-
-template <class R>
-class Qt_widget_get_line : public Qt_widget_layer
-{
-public:
-  typedef typename R::Point_2  Point;
-  typedef typename R::Line_2   Line;
-  typedef typename R::FT       FT;
-
-  Qt_widget_get_line(const QCursor c = QCursor(Qt::crossCursor),
-		     QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), cursor(c), firstpoint(false),
-      firsttime(true){};
-  void draw(){
-    firsttime = true;
-  }
-protected:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON 
-       && !firstpoint
-       && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      x1 = x;
-      y1 = y;
-      x2 = x;
-      y2 = y;
-      firstpoint = TRUE;
-    } else if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON
-       && is_pure(e->state())){
-      FT x, y;
-      widget->x_real(e->x(), x),
-      widget->y_real(e->y(), y);
-      if(x1!=x || y1!=y) {
-        widget->new_object(make_object(Line(Point(x1,y1),Point(x,y))));
-        firstpoint = FALSE;
-      }    
-    }
-  }
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-         if(firstpoint)
-         {
-           firstpoint = false;
-           RasterOp old_raster = widget->rasterOp();
-           QColor old_color = widget->color();
-           widget->lock();
-           widget->setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-           *widget << Line(Point(x1,y1),Point(x2,y2));
-           widget->setRasterOp(old_raster);
-           widget->setColor(old_color);
-           widget->unlock();
-           firsttime = true;
-         }
-         break;
-    }//endswitch
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    if(firstpoint)
-    {
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode
-      QColor old_color = widget->color();
-      widget->lock();
-        widget->setRasterOp(XorROP);
-        *widget << CGAL::GREEN;
-        *widget << Line(Point(x1,y1),Point(x2,y2));
-        widget->setRasterOp(old_raster);
-        widget->setColor(old_color);
-      widget->unlock();
-      firsttime = true;
-    }
-  }
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(firstpoint)
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode
-      QColor old_color = widget->color();
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      *widget << CGAL::GREEN;
-      if(!firsttime)
-        *widget << Line(Point(x1,y1),Point(x2,y2));
-      *widget << Line(Point(x1,y1),Point(x,y));
-      widget->unlock();
-      widget->setRasterOp(old_raster);
-      widget->setColor(old_color);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      firsttime = false;
-    }
-  };
-  void activating()
-  {
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-  };
-
-  void deactivating()
-  {
-    widget->setFocusPolicy(oldpolicy);
-    widget->setCursor(oldcursor);
-    firstpoint = false;
-  };
-
-  QCursor oldcursor;
-  QCursor cursor;
-
-  FT	x1, //the X of the first point
-	y1; //the Y of the first point
-  FT	x2, //the old second point's X
-	y2; //the old second point's Y
-  bool	firstpoint, //true if the user left clicked once
-	firsttime;  //true if the line is not drawn
-  QWidget::FocusPolicy	oldpolicy;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_LINE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_point.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_point.h
deleted file mode 100644
index e87be9f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_point.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_H
-#define CGAL_QT_WIDGET_GET_POINT_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qcursor.h>
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON
-#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton
-#endif
-
-namespace CGAL {
-
-template <class R>
-class Qt_widget_get_point : public Qt_widget_layer
-{
-public:
-  typedef typename R::Point_2	Point;
-  typedef typename R::FT	FT;
-  
-  Qt_widget_get_point(const QCursor c=QCursor(Qt::crossCursor),
-		      QObject* parent = 0, const char* name = 0) :
-    Qt_widget_layer(parent, name), cursor(c) {};
-  
-protected:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON
-       && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      widget->new_object(make_object(Point(x, y)));
-    }
-  };
-  void activating()
-  {
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-  };
-  
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-  };
-
-  QCursor cursor;
-  QCursor oldcursor;
-};
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_POINT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_polygon.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_polygon.h
deleted file mode 100644
index 274b352..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_polygon.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT_WIDGET_GET_POLYGON_H
-#define CGAL_QT_WIDGET_GET_POLYGON_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qcursor.h>
-#include <list>
-
-namespace CGAL {
-
-template <class Polygon>
-class Qt_widget_get_polygon : public Qt_widget_layer
-{
-public:
-  typedef typename Polygon::Point_2     Point_2;
-  typedef typename Polygon::Segment_2   Segment_2;
-  typedef typename Polygon::Edge_const_iterator
-                                        ECI;
-  typedef typename Polygon::Vertex_iterator
-                                        VI;
-  typedef typename Polygon::FT          FT;
-  
-  Qt_widget_get_polygon(const QCursor c=QCursor(Qt::crossCursor),
-			QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), active(false),
-      first_time(true), cursor(c) {}
-
-  void draw()
-  {
-    if(poly.size() > 1)
-    {
-      widget->lock();
-      RasterOp old_rasterop=widget->rasterOp();
-      widget->get_painter().setRasterOp(XorROP);
-      *widget << CGAL::GREEN;
-      ECI before_end = poly.edges_end();
-      --before_end; // --poly.edges_end() doesn't work on g++-2.95
-		    // with std::vector as the container for the polygon
-      for(ECI it = poly.edges_begin(); it != before_end; it++)
-        *widget << *it;
-      widget->setRasterOp(old_rasterop);
-      widget->unlock();
-    }
-    return;
-  };
-protected:
-
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-
-      if(!active)
-      {
-        active=true;
-        last_of_poly = Point_2(x, y);
-        poly.push_back(Point_2(x, y));	
-      } else{
-        if (last_of_poly == Point_2(x,y)) return;
-        rubber_old = Point_2(x, y);
-        if(is_simple()){
-          poly.push_back(Point_2(x,y));	
-          //show the last rubber as edge of the polygon
-          widget->lock();
-            RasterOp old_rasterop=widget->rasterOp();
-            widget->get_painter().setRasterOp(XorROP);
-            *widget << CGAL::WHITE;
-            *widget << Segment_2(rubber, last_of_poly);
-            *widget << CGAL::GREEN;
-            *widget << Segment_2(rubber, last_of_poly);
-            widget->setRasterOp(old_rasterop);
-          widget->unlock();
-          last_of_poly = Point_2(x, y);
-        }
-      }
-      return;
-    };
-    if(e->button() == Qt::RightButton && is_pure(e->state()))
-    {
-      if (active) {
-        widget->new_object(make_object(poly));
-        active = false;
-        first_time = true;
-        poly.erase(poly.vertices_begin(), poly.vertices_end());
-      }
-    };
-  };//end mousePressEvent
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-          if(poly.size() > 1){
-            widget->lock();
-              RasterOp old_rasterop=widget->rasterOp();
-              widget->get_painter().setRasterOp(XorROP);
-              *widget << CGAL::GREEN;
-
-	      // g++-2.95 doesn't like --poly.vertices_end() if the
-	      // container of the polygon is std::vector
-	      VI last_of_poly_it = poly.vertices_end();
-	      --last_of_poly_it;
-	      VI before_last_of_poly_it = last_of_poly_it;
-	      --before_last_of_poly_it;
-
-              *widget << Segment_2(*before_last_of_poly_it, last_of_poly);
-              *widget << CGAL::WHITE;
-              *widget << Segment_2(rubber, last_of_poly);
-              *widget << Segment_2(rubber, *before_last_of_poly_it);
-              widget->setRasterOp(old_rasterop);
-            widget->unlock();
-            last_of_poly = *before_last_of_poly_it; 
-            poly.erase(last_of_poly_it);
-          }
-          break;
-    }//endswitch
-  }
-
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(active) {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      rubber = Point_2(x, y);
-      if(e->state() == Qt::ShiftButton){
-        FT dx, dy;
-        dx = last_of_poly.x() > x ? last_of_poly.x() - x : x - last_of_poly.x();
-        dy = last_of_poly.y() > y ? last_of_poly.y() - y : y - last_of_poly.y();
-        widget->lock();
-        RasterOp old_rasterop=widget->rasterOp();
-        widget->get_painter().setRasterOp(XorROP);
-        *widget << CGAL::WHITE;
-        if(!first_time)
-          *widget << Segment_2(rubber_old, last_of_poly);
-        if(dx < dy)
-          rubber = Point_2(last_of_poly.x(), y);
-        else
-          rubber = Point_2(x, last_of_poly.y());
-        *widget << Segment_2(rubber, last_of_poly);
-        widget->unlock();
-        first_time = false;
-        rubber_old = rubber;
-        widget->cursor().setPos(widget->mapToGlobal(
-          QPoint(widget->x_pixel(CGAL::to_double(rubber.x())), 
-          widget->y_pixel(CGAL::to_double(rubber.y())))));
-        widget->setRasterOp(old_rasterop);    
-      } else { 
-        widget->lock();
-        RasterOp old_rasterop=widget->rasterOp();
-        widget->get_painter().setRasterOp(XorROP);
-        *widget << CGAL::WHITE;      	
-        if(!first_time)
-          *widget << Segment_2(rubber_old, last_of_poly);
-        *widget << Segment_2(rubber, last_of_poly);
-        first_time = false;
-        rubber_old = rubber;
-        widget->setRasterOp(old_rasterop);
-        widget->unlock();
-      }
-    }
-  };
-  void activating()
-  {
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-  };
-  
-  void deactivating()
-  {
-    poly.erase(poly.vertices_begin(), poly.vertices_end());
-    active = false;
-    first_time = true;
-    widget->setCursor(oldcursor);
-    widget->setFocusPolicy(oldpolicy);
-    widget->redraw();
-  };
-  void leaveEvent(QEvent *)
-  {
-    if (active)
-    {
-      widget->lock();
-        RasterOp old_rasterop=widget->rasterOp();
-        widget->get_painter().setRasterOp(XorROP);
-        *widget << CGAL::WHITE;
-        *widget << Segment_2(rubber_old, last_of_poly);
-        widget->setRasterOp(old_rasterop);
-      widget->unlock();
-      first_time = true;
-    }
-  }
-private:
-  virtual bool is_simple()
-  {
-    return true;
-  }
-  
-protected:
-  bool	active,     //true if the first point was inserted
-        first_time; //true if it is the first time when 
-                    //draw the rubber band
-  Point_2 rubber,   //the new point of the rubber band
-          last_of_poly, //the last point of the polygon
-          rubber_old; //the old point of the rubber band
-  Polygon poly;       //the polygon
-  QWidget::FocusPolicy  oldpolicy;
-  QCursor oldcursor;
-  QCursor cursor;
-
-};
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_POLYGON_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_segment.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_segment.h
deleted file mode 100644
index 8f73007..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_segment.h
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_GET_SEGMENT_H
-#define CGAL_QT_WIDGET_GET_SEGMENT_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON
-#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-
-template <class R>
-class Qt_widget_get_segment : public Qt_widget_layer
-{
-public:
-  typedef typename R::Point_2		Point;
-  typedef typename R::Segment_2		Segment;
-  typedef typename R::FT	FT;
-
-  Qt_widget_get_segment(const QCursor c=QCursor(Qt::crossCursor),
-			QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), cursor(c), firstpoint(false),
-      firsttime(true){};
-
-protected:
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON 
-       && !firstpoint
-       && is_pure(e->state()))
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      x1 = x;
-      y1 = y;
-      x2 = x;
-      y2 = y;
-      firstpoint = TRUE;
-    } else if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON 
-              && is_pure(e->state())){
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      if(x1!=x || y1!=y) {
-        widget->new_object(
-          make_object(Segment(Point(x1,y1),Point(x,y))));
-        firstpoint = FALSE;
-      }    
-    }
-  }
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-         if(firstpoint)
-         {
-	   firstpoint = false;
-           RasterOp old_raster = widget->rasterOp();
-           QColor old_color = widget->color();
-           widget->lock();
-           widget->setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-           *widget << Segment(Point(x1,y1), Point(x2,y2));
-           widget->setRasterOp(old_raster);
-           widget->setColor(old_color);
-           widget->unlock();
-	   firsttime = true;
-         }
-         break;
-    }//endswitch
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    if(firstpoint)
-    {
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode
-      QColor old_color = widget->color();
-      widget->lock();
-        widget->setRasterOp(XorROP);
-        *widget << CGAL::GREEN;
-        *widget << Segment(Point(x1,y1), Point(x2,y2));
-        widget->setRasterOp(old_raster);
-        widget->setColor(old_color);
-      widget->unlock();
-      firsttime = true;
-    }
-  }
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(firstpoint)
-    {
-      FT x, y;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      RasterOp old_raster = widget->rasterOp();//save the initial raster mode
-      QColor old_color = widget->color();
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      *widget << CGAL::GREEN;
-      if(!firsttime)
-      *widget << Segment(Point(x1,y1),Point(x2,y2));
-      *widget << Segment(Point(x1,y1),Point(x,y));
-      widget->unlock();
-      widget->setRasterOp(old_raster);
-      widget->setColor(old_color);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      firsttime = false;
-    }
-  };
-  void activating()
-  {
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(cursor);
-  };
-
-  void deactivating()
-  {
-    widget->setFocusPolicy(oldpolicy);
-    widget->setCursor(oldcursor);
-    firstpoint = false;
-  };
-
-  QCursor oldcursor;
-  QCursor cursor;
-
-  FT  x1, //the X of the first point
-      y1; //the Y of the first point
-  FT  x2, //the old second point's X
-      y2; //the old second point's Y
-  bool	firstpoint, //true if the user left clicked once
-        firsttime;  //true if the line is not drawn
-  QWidget::FocusPolicy	oldpolicy;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_SEGMENT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_simple_polygon.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_simple_polygon.h
deleted file mode 100644
index 2598cc4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_get_simple_polygon.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau and Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
-#define CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
-
-#include <CGAL/IO/Qt_widget_get_polygon.h>
-#include <CGAL/Segment_2_Segment_2_intersection.h>  
-#include <list>
-
-#include <qcursor.h>
-
-namespace CGAL {
-template <class Polygon>
-class Qt_widget_get_simple_polygon : public Qt_widget_get_polygon<Polygon>
-{
-public:
-  typedef Qt_widget_get_polygon<Polygon>  Get_polygon;
-  typedef typename Polygon::Point_2       Point_2;
-  typedef typename Polygon::Segment_2     Segment_2;
-  typedef typename Polygon::Edge_const_iterator  ECI;
-
-  Qt_widget_get_simple_polygon(const QCursor
-                               c=QCursor(Qt::crossCursor),QObject*
-                               parent = 0, const char* name = 0)
-    : Qt_widget_get_polygon<Polygon>(c, parent, name){}
-  
-protected:
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::RightButton && this->is_pure(e->state()))
-    {
-      if (this->active) {
-        if(!this->poly.is_simple()) return;
-        if(this->poly.is_clockwise_oriented())
-          this->poly.reverse_orientation ();
-        CGAL_assertion( ! this->poly.is_clockwise_oriented());
-      }
-    }
-    Get_polygon::mousePressEvent(e);
-  }; 
-
-private:
-  bool is_simple()
-  {
-    Segment_2 rubber_segment(this->rubber, this->last_of_poly);
-    if(this->poly.size() > 1)
-    {
-      ECI before_last_it = this->poly.edges_end();
-      --before_last_it;
-      --before_last_it;
-      ECI it;
-      for(it = this->poly.edges_begin(); it != before_last_it; it++)
-      {
-        if(do_intersect(*it, rubber_segment))
-        return false;
-      }
-      //if I'm out of this means that all the edges, 
-      //didn't intersect the last one
-      ++it;
-      Object o = intersection(*it, rubber_segment);
-      Point_2 p;
-      if(assign(p, o))
-        return true;
-      else
-        return false;
-    }
-    else
-      return true;
-  }
-};
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_handtool.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_handtool.h
deleted file mode 100644
index 1a28e29..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_handtool.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_HANDTOOL_H
-#define CGAL_QT_WIDGET_HANDTOOL_H
-
-#include <cstdio>
-#include <CGAL/IO/pixmaps/hand.xpm>
-#include <CGAL/IO/pixmaps/holddown.xpm>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qrect.h>
-#include <qcursor.h>
-
-#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON
-#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-
-class Qt_widget_handtool : public Qt_widget_layer
-{
-public:
-  Qt_widget_handtool(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), wasrepainted(TRUE), on_first(FALSE){};
-
-private:
-  QCursor oldcursor;
-
-  void draw(){
-    wasrepainted = TRUE;
-  };
-
-  void timerEvent( QTimerEvent *)
-  {
-    if(on_first)
-      widget->setCursor(QCursor( 
-              QPixmap( (const char**)holddown_xpm)));
-    else
-      widget->setCursor(QCursor( 
-              QPixmap( (const char**)hand_xpm)));
-  }
-
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON 
-       && is_pure(e->state()))
-    {
-      widget->setCursor(QCursor( QPixmap( (const char**)holddown_xpm)));
-      if (!on_first){
-	      first_x = e->x();
-	      first_y = e->y();
-	      on_first = TRUE;
-      }	
-    }
-  };
-
-  void mouseReleaseEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON
-       && is_pure(e->state()))
-    {
-      widget->setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-      double x, y, xfirst2, yfirst2;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      widget->x_real(first_x, xfirst2);
-      widget->y_real(first_y, yfirst2);
-			
-      double distx, disty;
-      distx = xfirst2 - x;
-      disty = yfirst2 - y;
-      widget->move_center(distx, disty);
-      on_first = FALSE;
-    }
-  }
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    char tempc1[130], tempc2[40];
-    double xcoord, ycoord;
-    if(on_first)
-    {
-      int x = e->x();
-      int y = e->y();
-      //save the initial raster mode
-      RasterOp old = widget->rasterOp();	
-      widget->setRasterOp(XorROP);
-      widget->lock();
-        *widget << CGAL::GRAY;
-      if(!wasrepainted) {
-        widget->x_real(x2 - first_x, xcoord);
-        widget->x_real(y2 - first_y, ycoord);
-        std::sprintf(tempc1, " dx=%20.6f", xcoord);
-        std::sprintf(tempc2, ", dy=%20.6f", ycoord);
-        strcat(tempc1, tempc2);
-        widget->get_painter().drawLine(first_x, first_y, x2, y2);
-        *widget << CGAL::GREEN;
-        widget->get_painter().drawText(x2, y2, tempc1, 49);
-        *widget << CGAL::GRAY;
-      }
-      widget->x_real(x - first_x, xcoord);
-      widget->x_real(y - first_y, ycoord);
-      std::sprintf(tempc1, " dx=%20.6f", xcoord);
-      std::sprintf(tempc2, ", dy=%20.6f", ycoord);
-      strcat(tempc1, tempc2);
-      widget->get_painter().drawLine(first_x, first_y, x, y);
-      *widget << CGAL::GREEN;
-      widget->get_painter().drawText(x, y, tempc1, 49);
-      widget->unlock();
-      widget->setRasterOp(old);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      wasrepainted = FALSE;
-    }
-  };
-
-  void activating()
-  {
-    oldcursor = widget->cursor();
-    widget->setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-    wasrepainted = TRUE;
-	  startTimer( 100 );
-  };
-
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-    killTimers();
-  };
-
-  int   first_x, first_y;
-  int   x2, y2;
-  bool	wasrepainted;
-  bool	on_first;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_HANDTOOL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_history.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_history.h
deleted file mode 100644
index d920597..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_history.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-#ifndef CGAL_QT_WIDGET_HISTORY_H
-#define CGAL_QT_WIDGET_HISTORY_H
-
-#include <list>
-#include <algorithm>
-#include <CGAL/IO/Qt_widget.h>
-
-namespace CGAL {
-
-  class History_atom {
-  public:
-    History_atom() {};
-    virtual ~History_atom() {};
-
-    void save(const Qt_widget& widget){
-      xmin = widget.x_min();
-      ymin = widget.y_min();
-      xmax = widget.x_max();
-      ymax = widget.y_max();
-    }
-    
-    void restore(Qt_widget& widget) const {
-      widget.set_window(xmin, xmax, ymin, ymax);
-    }
-  private:
-    double xmin, xmax, ymin, ymax;
-  };
-
-  class Qt_widget_history : public QObject {
-    Q_OBJECT
-  public:
-    Qt_widget_history(Qt_widget* parent, const char* name = 0 );
-
-  signals:
-    void backwardAvaillable(bool);
-    void forwardAvaillable(bool);
-
-  public slots:
-    void backward();
-    void forward();
-    
-  private:
-    struct Free {
-      void operator()(History_atom* atom) const
-      {
-        delete atom;
-      }
-    };    
-    
-  public slots:
-    void save();
-    void clear() {
-      std::for_each(history_list.begin(), history_list.end(), Free());
-      history_list.clear();
-      it = history_list.begin();
-      emit backwardAvaillable(false);
-      emit forwardAvaillable(false);
-    }
-
-  private:
-    void restore(){
-      disconnect( widget, SIGNAL(rangesChanged()), 
-        this, SLOT(save()));
-      (*it)->restore(*widget);
-      connect(widget, SIGNAL(rangesChanged()), 
-        this, SLOT(save()));
-      widget->redraw();
-    }
-
-  private:
-    std::list<History_atom*> history_list;
-    std::list<History_atom*>::iterator it;
-    Qt_widget* widget;
-  };
-
-} // namespace CGAL end
-
-#endif // CGAL_QT_WIDGET_HISTORY_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_layer.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_layer.h
deleted file mode 100644
index 9bf86ae..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_layer.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau and Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_LAYER_H
-#define CGAL_QT_WIDGET_LAYER_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <qobject.h>
-#include <qcursor.h>
-#include <list>
-
-
-namespace CGAL {
-
-class Qt_widget_layer : public QObject {
-  Q_OBJECT
-public:
-  Qt_widget_layer(QObject* parent = 0, const char* name = 0) 
-    : QObject(parent, name), does_eat_events(false), active(false){};
-
-  // Event handlers
-  virtual void mousePressEvent(QMouseEvent *) {} ;
-  virtual void mouseReleaseEvent(QMouseEvent *) {};
-  virtual void wheelEvent(QWheelEvent *) {};
-  virtual void mouseDoubleClickEvent(QMouseEvent *) {};
-  virtual void mouseMoveEvent(QMouseEvent *) {};
-  virtual void keyPressEvent(QKeyEvent *) {};
-  virtual void keyReleaseEvent(QKeyEvent *) {};
-  virtual void enterEvent(QEvent *) {};
-  virtual void leaveEvent(QEvent *) {};
-  virtual bool event(QEvent *e) {QObject::event(e); return true;};
-
-  bool    is_active(){return active;};	//return true if this layer is active
-  bool    does_eat_events;
-public slots:
-  virtual void draw(){};
-  void    stateChanged(int);
-  void    toggle(bool);
-  bool    activate(); //activate and return true if it was not active
-  bool    deactivate();//deactivate and return true if it was active
-signals:
-  void    activated(Qt_widget_layer*);
-  void    deactivated(Qt_widget_layer*);
-private:
-  void    attach(Qt_widget *w);//attach Qt_widget to the tool
-  bool    active;	//true if this layers is active
-  friend class Qt_widget;
-protected:
-  Qt_widget  *widget;//the pointer to the widget
-  virtual void activating(){};
-  virtual void deactivating(){};
-};
-
-} // namespace CGAL end
-
-#endif // CGAL_QT_WIDGET_LAYER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_rotation_layer.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_rotation_layer.h
deleted file mode 100644
index 1ce1ecd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_rotation_layer.h
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_ROTATION_LAYER_H
-#define CGAL_QT_WIDGET_ROTATION_LAYER_H
-
-#include <cstdio>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/IO/pixmaps/hand.xpm>
-#include <CGAL/IO/pixmaps/holddown.xpm>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qrect.h>
-#include <qcursor.h>
-
-typedef CGAL::Simple_cartesian<double>    SCD;
-typedef CGAL::Point_2<SCD>                Point;
-typedef CGAL::Vector_2<SCD>               Vector;
-typedef CGAL::Direction_2<SCD>            Direction;
-typedef CGAL::Aff_transformation_2<SCD>   Transformation;
-
-namespace CGAL {
-
-class Qt_widget_rotation_layer : public Qt_widget_layer
-{
-public:
-  Qt_widget_rotation_layer(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), wasrepainted(true), on_first(false){};
-
-private:
-  QCursor oldcursor;
-
-  void draw(){
-    wasrepainted = true;
-  };
-/*
-  void timerEvent( QTimerEvent *)
-  {
-    if(on_first)
-      widget->setCursor(QCursor( 
-              QPixmap( (const char**)holddown_xpm)));
-    else
-      widget->setCursor(QCursor( 
-              QPixmap( (const char**)hand_xpm)));
-  }
-*/
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton 
-       && is_pure(e->state()))
-    {
-      widget->setCursor(QCursor( QPixmap( (const char**)holddown_xpm)));
-      if (!on_first){
-	      first_x = e->x();
-	      first_y = e->y();
-	      on_first = true;
-      }
-      
-      Point end_point[4] = {Point(11, 25), Point(11, 25), 
-        Point(11, 25), Point(11, 25)};
-      for(int i=0; i<4; i++)
-        end_point[i] = (*t)(end_point[i]);
-      //Point_2 first_line_end1(11, 25), first_line_end2(11, 0);
-      //Point_2 second_line_end1(25, 0), second_line_end2(25, 13);
-      //first_line_end1 = (*t)(first_arrow_end);
-      //second_arrow_end = (*t)(second_arrow_end);
-      
-      //save the initial raster mode
-      RasterOp old = widget->rasterOp();	
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      *widget << CGAL::WHITE;
-      widget->get_painter().drawLine(11, 0, 11, 25);
-      widget->get_painter().drawLine(0, 13, 25, 13);
-      widget->get_painter().drawLine(11, 0, 9, 5);
-      widget->get_painter().drawLine(11, 0, 13, 5);
-      widget->get_painter().drawLine(25, 13, 20, 11);
-      widget->get_painter().drawLine(25, 13, 20, 15);
-      *widget << CGAL::RED;
-
-      widget->unlock();
-      widget->setRasterOp(old);
-
-    }
-  };
-
-  void mouseReleaseEvent(QMouseEvent *e)
-  {
-    if(e->button() == Qt::LeftButton
-       && is_pure(e->state()))
-    {
-      /*
-      double x, y, xfirst2, yfirst2;
-      widget->x_real(e->x(), x);
-      widget->y_real(e->y(), y);
-      widget->x_real(first_x, xfirst2);
-      widget->y_real(first_y, yfirst2);
-			
-      double	xmin, xmax, ymin, ymax, distx, disty;
-      if(x < xfirst2) {xmin = x; xmax = xfirst2;}
-      else {xmin = xfirst2; xmax = x;};
-      if(y < yfirst2) {ymin = y; ymax = yfirst2;}
-      else {ymin = yfirst2; ymax = y;};
-      distx = xfirst2 - x;
-      disty = yfirst2 - y;
-      widget->move_center(distx, disty);
-      
-      */
-      /*
-      //(*t) = tprim * (*t);
-      on_first = false;
-
-
-      */
-      double xc = widget->x_min() + (widget->x_max() - widget->x_min())/2;
-      double yc = widget->y_min() + (widget->y_max() - widget->y_min())/2;
-      Transformation tprim(CGAL::ROTATION, Direction(xc+0.0001, yc+0.0001), 1, 100);
-      //Transformation tprim(CGAL::TRANSLATION, Vector(-0.5, 0));
-      //Transformation tprim(CGAL::SCALING, 1.2);
-      (*t) = (*t) * tprim;
-      on_first = false;
-      widget->setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-      widget->redraw();
-    }
-  }
-  /*
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    char tempc1[130], tempc2[40];
-    double xcoord, ycoord;
-    if(on_first)
-    {
-      int x = e->x();
-      int y = e->y();
-      //save the initial raster mode
-      RasterOp old = widget->rasterOp();	
-      widget->setRasterOp(XorROP);
-      widget->lock();
-        *widget << CGAL::GRAY;
-      if(!wasrepainted) {
-        widget->x_real(x2 - first_x, xcoord);
-        widget->x_real(y2 - first_y, ycoord);
-        std::sprintf(tempc1, " dx=%20.6f", xcoord);
-        std::sprintf(tempc2, ", dy=%20.6f", ycoord);
-        strcat(tempc1, tempc2);
-        widget->get_painter().drawLine(first_x, first_y, x2, y2);
-        *widget << CGAL::GREEN;
-        widget->get_painter().drawText(x2, y2, tempc1, 49);
-        *widget << CGAL::GRAY;
-      }
-      widget->x_real(x - first_x, xcoord);
-      widget->x_real(y - first_y, ycoord);
-      std::sprintf(tempc1, " dx=%20.6f", xcoord);
-      std::sprintf(tempc2, ", dy=%20.6f", ycoord);
-      strcat(tempc1, tempc2);
-      widget->get_painter().drawLine(first_x, first_y, x, y);
-      *widget << CGAL::GREEN;
-      widget->get_painter().drawText(x, y, tempc1, 49);
-      widget->unlock();
-      widget->setRasterOp(old);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      wasrepainted = false;
-    }
-  };
-*/
-  void activating()
-  {
-    t = widget->get_transformation();
-    oldcursor = widget->cursor();
-    widget->setCursor(QCursor( QPixmap( (const char**)hand_xpm)));
-    wasrepainted = true;
-//	  startTimer( 100 );
-  };
-
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-//    killTimers();
-  };
-
-  int             first_x, first_y;
-  int             x2, y2;
-  bool            wasrepainted;
-  bool            on_first;
-  Transformation  *t;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_ROTATION_LAYER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h
deleted file mode 100644
index 2f2d346..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_SHOW_MOUSE_COORDINATES_H
-#define CGAL_QT_WIDGET_SHOW_MOUSE_COORDINATES_H
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qobject.h>
-#include <qmainwindow.h>
-#include <qstatusbar.h>
-#include <qstring.h>
-
-namespace CGAL {
-
-class Qt_widget_show_mouse_coordinates : public Qt_widget_layer
-{
-public:
-	
-  Qt_widget_show_mouse_coordinates(QMainWindow &mw, 
-				   QObject* parent = 0,
-				   const char* name = 0) 
-    : Qt_widget_layer(parent, name), qmw(mw)
-    {};
-
-  void draw(){};
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    QString s("x=%1 y=%2");
-    double xcoord, ycoord;
-    widget->x_real(e->x(), xcoord);
-    widget->y_real(e->y(), ycoord);
-    qmw.statusBar()->message(s.arg(xcoord, -20, 'g', 15).
-			     arg(ycoord, -20,'g', 15));
-
-  };
-private:
-  void deactivating(){
-    qmw.statusBar()->clear();
-  }
-  QMainWindow	&qmw;
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_GET_SEGMENT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_standard_toolbar.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_standard_toolbar.h
deleted file mode 100644
index 0746711..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_standard_toolbar.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_STANDARD_TOOLBAR_H
-#define CGAL_QT_WIDGET_STANDARD_TOOLBAR_H
-
-#include <CGAL/basic.h>
-
-#include <qtoolbar.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
-
-namespace CGAL {
-
-class Qt_widget;
-class Qt_widget_history;
-
-class Qt_widget_standard_toolbar : public QToolBar
-{
-	Q_OBJECT
-public:
-  Qt_widget_standard_toolbar(Qt_widget *w,
-			     QMainWindow *parent = 0,
-			     const char* name = 0);
-
-  Qt_widget_standard_toolbar(Qt_widget *w,
-			     QMainWindow *mw,
-			     QWidget* parent,
-			     bool newLine = true,
-			     const char* name = 0);
-
-  ~Qt_widget_standard_toolbar() { delete button_group; }
-
-  // CGAL-2.4 compatibility
-  QToolBar*	toolbar(){return this;}
-
-public slots:
-  void back();
-  void forward();
-  void clear_history();
-
-private slots:
-  void zoomin();
-  void zoomout();
-  void group_clicked(int i);
-
-private:
-  void fill_toolbar(QMainWindow *mw);
-
-private:
-  Qt_widget          *widget;
-  Qt_widget_history  *history;
-  QButtonGroup*      button_group;
-  // this group has no parent and is destroyed manually in the
-  // destructor
-
-  QToolButton* nolayerBt;
-};//end class
-
-} //end namespace
-
-#endif //CGAL_QT_WIDGET_STANDARD_TOOLBAR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_zoomrect.h b/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_zoomrect.h
deleted file mode 100644
index ba4a828..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/Qt_widget_zoomrect.h
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_QT_WIDGET_ZOOMRECT_H
-#define CGAL_QT_WIDGET_ZOOMRECT_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <qrect.h>
-#include <qcursor.h>
-
-
-#ifndef CGAL_QT_WIDGET_ZOOMRECT_BUTTON
-#define CGAL_QT_WIDGET_ZOOMRECT_BUTTON Qt::LeftButton
-#endif
-
-
-namespace CGAL {
-
-class Qt_widget_zoomrect : public Qt_widget_layer
-{
-public:
-  int   first_x, first_y, x2, y2;
-  bool  widgetrepainted;
-  bool  on_first;
-  QWidget::FocusPolicy	oldpolicy;
-  Qt_widget_zoomrect(QObject* parent = 0, const char* name = 0)
-    : Qt_widget_layer(parent, name), widgetrepainted(TRUE),
-      on_first(FALSE) {};
-
-private:
-  QCursor oldcursor;
-
-  bool is_pure(Qt::ButtonState s){
-    if((s & Qt::ControlButton) ||
-       (s & Qt::ShiftButton) ||
-       (s & Qt::AltButton))
-      return 0;
-    else
-      return 1;
-  }
-
-  void draw(){
-    widgetrepainted = TRUE;
-  };
-  void mousePressEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_ZOOMRECT_BUTTON
-       && is_pure(e->state()))
-    {
-      if (!on_first)
-      {
-        first_x = e->x();
-        first_y = e->y();
-        on_first = true;
-      }
-    }
-  };
-
-  void mouseReleaseEvent(QMouseEvent *e)
-  {
-    if(e->button() == CGAL_QT_WIDGET_ZOOMRECT_BUTTON
-       && is_pure(e->state()))
-    {
-      if((e->x() != first_x) && (e->y() != first_y)) {
-        double x, y, xfirst2, yfirst2;
-        widget->x_real(e->x(), x);
-        widget->y_real(e->y(), y);
-        widget->x_real(first_x, xfirst2);
-        widget->y_real(first_y, yfirst2);
-  			
-        double	xmin, xmax, ymin, ymax;
-        if(x < xfirst2) {xmin = x; xmax = xfirst2;}
-        else {xmin = xfirst2; xmax = x;};
-        if(y < yfirst2) {ymin = y; ymax = yfirst2;}
-        else {ymin = yfirst2; ymax = y;};
-
-        widget->set_window(xmin, xmax, ymin, ymax);        
-        on_first = FALSE;
-      }
-    }
-  }
-  void mouseMoveEvent(QMouseEvent *e)
-  {
-    if(on_first)
-    {
-      int x = e->x();
-      int y = e->y();
-      *widget << noFill;
-      RasterOp old = widget->rasterOp();	//save the initial raster mode
-      QColor old_color=widget->color();
-      widget->setRasterOp(XorROP);
-      widget->lock();
-      widget->setColor(Qt::green);
-      if(!widgetrepainted)
-        widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-      widget->get_painter().drawRect(first_x, first_y, x - first_x,
-                                     y - first_y);
-      widget->unlock();
-      widget->setColor(old_color);
-      widget->setRasterOp(old);
-
-      //save the last coordinates to redraw the screen
-      x2 = x;
-      y2 = y;
-      widgetrepainted = false;
-    }
-  };
-
-  void keyPressEvent(QKeyEvent *e)
-  {
-    switch ( e->key() ) {
-      case Key_Escape:			// key_escape
-         if (on_first)
-         {
-           widget->lock();
-           *widget << noFill;
-           RasterOp old = widget->rasterOp();	//save the initial raster mode
-           QColor old_color=widget->color();
-           widget->setRasterOp(XorROP);
-           *widget << CGAL::GREEN;
-           if(!widgetrepainted)
-             widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-           widget->setColor(old_color);
-           widget->setRasterOp(old);
-           widgetrepainted = true;
-
-           widget->unlock();
-	   on_first = false;
-         }
-         break;
-    }//endswitch
-  }
-
-  void leaveEvent(QEvent *)
-  {
-    if (on_first)
-    {
-      widget->lock();
-      *widget << noFill;
-      RasterOp old = widget->rasterOp();	//save the initial raster mode
-      QColor old_color=widget->color();
-      widget->setRasterOp(XorROP);
-      *widget << CGAL::GREEN;
-      if(!widgetrepainted)
-        widget->get_painter().drawRect(first_x, first_y, 
-                                       x2 - first_x, y2 - first_y);
-      widget->setColor(old_color);
-      widget->setRasterOp(old);
-      widgetrepainted = true;
-
-      widget->unlock();
-    }
-  }
-
-  void activating()
-  {
-    oldpolicy = widget->focusPolicy();
-    widget->setFocusPolicy(QWidget::StrongFocus);
-    oldcursor = widget->cursor();
-    widget->setCursor(crossCursor);
-    widgetrepainted = true;
-  };
-
-  void deactivating()
-  {
-    widget->setCursor(oldcursor);
-    widget->setFocusPolicy(oldpolicy);
-    on_first = false;
-    widget->redraw();
-  };
-};//end class 
-
-} // namespace CGAL
-
-#endif // CGAL_QT_WIDGET_ZOOMRECT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/STL_reader.h b/3rdparty/CGAL-4.6/include/CGAL/IO/STL_reader.h
deleted file mode 100644
index e0e6457..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/STL_reader.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2015 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_IO_STL_READER_H
-#define CGAL_IO_STL_READER_H
-
-#include <CGAL/array.h>
-
-#include <vector>
-#include <map>
-#include <iostream>
-
-namespace CGAL{
-
-  bool
-  read_STL( std::istream& input,
-            std::vector< cpp11::array<double,3> >& points,
-            std::vector< cpp11::array<int,3> >& facets,
-            bool verbose = false)
-  {
-    std::string s,
-                solid("solid"),
-                facet("facet"),
-                outer("outer"),
-                loop("loop"),
-                vertex("vertex"),
-                endloop("endloop"),
-                endsolid("endsolid");
-
-    std::map<cpp11::array<double,3>, int> vertex_index;
-    int index = 0;
-    cpp11::array<int,3> ijk;
-    cpp11::array<double,3> p;
-
-    input >> s;
-    if(s == solid){
-      std::getline(input, s);
-    } else {
-      if (verbose)
-        std::cerr << "We expect keyword 'solid'" << std::endl;
-      return false;
-    }
-
-    while(input >> s){
-      if(s == endsolid){
-        //std::cerr << "found endsolid" << std::endl;
-      } else if(s == facet){
-        //std::cerr << "found facet" << std::endl;
-        std::getline(input, s); // ignore the normal
-        input >> s;
-        if(s != outer){
-          if (verbose)
-            std::cerr << "Expect 'outer' and got " << s << std::endl;
-          return false;
-        }
-        input >> s;
-        if(s != loop){
-          if (verbose)
-            std::cerr << "Expect 'loop' and got " << s << std::endl;
-          return false;
-       }
-        int count = 0;
-        do {
-          input >> s;
-          if(s == vertex){
-            //      std::cerr << "found vertex" << std::endl;
-            if(count < 3){
-              input >> p[0] >> p[1] >> p[2];
-              std::map<cpp11::array<double,3>, int>::iterator iti=
-                vertex_index.insert(std::make_pair(p,-1)).first;
-              if(iti->second==-1){
-                ijk[count] = index;
-                iti->second = index++;
-                points.push_back(p);
-              } else {
-                ijk[count] = iti->second;
-              }
-              ++count;
-            } else {
-              if (verbose)
-                std::cerr << "We can only read triangulated surfaces" << std::endl;
-              return false;
-            }
-          }
-        }while(s != endloop);
-
-        facets.push_back(ijk);
-      }
-    }
-    return true;
-  }
-
-} // namespace CGAL
-
-#endif // CGAL_IO_STL_READER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/io.h b/3rdparty/CGAL-4.6/include/CGAL/IO/io.h
deleted file mode 100644
index 3e16c8d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/io.h
+++ /dev/null
@@ -1,358 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-
-
-#ifndef CGAL_IO_H
-#define CGAL_IO_H
-
-
-#include <cstdio>
-#include <cctype>
-#include <string>
-#include <iostream>
-#include <CGAL/tags.h>
-#include <CGAL/IO/io_tags.h>
-#include <CGAL/IO/Color.h>
-
-
-namespace CGAL {
-
-class IO {
-public:
-    CGAL_EXPORT static int mode;
-    enum Mode {ASCII = 0, PRETTY, BINARY};
-};
-
-template <class T, class F = ::CGAL::Null_tag >
-class Output_rep {
-    const T& t;
-public:
-    //! initialize with a const reference to \a t.
-    Output_rep( const T& tt) : t(tt) {}
-    //! perform the output, calls \c operator\<\< by default.
-    std::ostream& operator()( std::ostream& out) const { return (out << t); }
-};
-
-/*! \relates Output_rep
-    \brief stream output of the \c Output_rep calls its \c operator().
-*/
-template <class T, class F>
-std::ostream&
-operator<<( std::ostream& out, Output_rep<T,F> rep) {
-    return rep( out);
-}
-
-//! generic IO output format manipulator.
-template <class T>
-Output_rep<T>
-oformat( const T& t) { return Output_rep<T>(t); }
-
-//! generic IO output format manipulator with formatting tag.
-template <class T, class F>
-Output_rep<T,F>
-oformat( const T& t, F) { return Output_rep<T,F>(t); }
-
-
-
-/*!\brief
- * input functor class created by the generic IO input manipulator.
- *
- * It holds a reference to the input object. Default implementation
- * calls the stream input operator. Specializations can be written
- * for external types not supporting our stream IO format.
- */
-template <class T>
-class Input_rep {
-    T& t;
-public:
-    //! initialize with a reference to \a t.
-    Input_rep( T& tt) : t(tt) {}
-    //! perform the input, calls \c operator\>\> by default.
-    std::istream& operator()( std::istream& in) const { return (in >> t); }
-};
-
-
-#if CGAL_FORCE_IFORMAT_DOUBLE || \
-  ( ( _MSC_VER > 1600 ) && (! defined( CGAL_NO_IFORMAT_DOUBLE )) )
-template <>
-class Input_rep<double> {
-    double& t;
-public:
-  //! initialize with a reference to \a t.
-  Input_rep( double& tt) : t(tt) {}
-
-  std::istream& operator()( std::istream& is) const 
-  {
-    typedef std::istream istream;
-    typedef istream::char_type char_type;
-    typedef istream::int_type int_type;
-    typedef istream::traits_type traits_type;
-
-    std::string buffer;
-    buffer.reserve(32);
-
-    char_type c;
-    do {
-      const int_type i = is.get();
-      if(i == traits_type::eof()) {
-	return is;
-      }
-      c = static_cast<char_type>(i);
-    }while (std::isspace(c));
-    if(c == '-'){
-      buffer += '-';
-    } else if(c != '+'){
-      is.unget();
-    }
-    do {
-      const int_type i = is.get();
-      if(i == traits_type::eof()) {
-	is.clear(is.rdstate() & ~std::ios_base::failbit);
-	break;
-      }
-      c = static_cast<char_type>(i);
-      if(std::isdigit(c) || (c =='.') || (c =='E') || (c =='e') || (c =='-')){
-        buffer += c;
-      }else{
-	is.unget();
-	break;
-      }
-    }while(true);
-
-    if(sscanf(buffer.c_str(), "%lf", &t) != 1) {
-      // if a 'buffer' does not contain a double, set the fail bit.
-      is.setstate(std::ios_base::failbit);
-    }
-    return is; 
-  }
-};
-#endif
-
-/*! \relates Input_rep
-    \brief stream input to the \c Input_rep calls its \c operator().
-*/
-template <class T>
-std::istream&
-operator>>( std::istream& in, Input_rep<T> rep) {
-    return rep( in);
-}
-
-//! generic IO input format manipulator.
-template <class T>
-Input_rep<T>
-iformat( T& t) { return Input_rep<T>(t); }
-
-
-template <class T, class F = Null_tag >
-class Benchmark_rep {
-    const T& t;
-public:
-    //! initialize with a const reference to \a t.
-    Benchmark_rep( const T& tt) : t(tt) {}
-    //! perform the output, calls \c operator\<\< by default.
-    std::ostream& operator()( std::ostream& out) const {
-        return out << t;
-    }
-    
-    // static function to get the benchmark name
-    static std::string get_benchmark_name() {
-        return "";
-    }
-};
-
-template <class T, class F>
-std::ostream& operator<<( std::ostream& out, Benchmark_rep<T,F> rep) {
-    return rep( out);
-}
-
-template <class T>
-Benchmark_rep<T> bmformat( const T& t) { return Benchmark_rep<T>(t); }
-
-template <class T, class F>
-Benchmark_rep<T,F> bmformat( const T& t, F) { return Benchmark_rep<T,F>(t); }
-
-
-CGAL_EXPORT
-IO::Mode
-get_mode(std::ios& i);
-
-CGAL_EXPORT
-IO::Mode
-set_ascii_mode(std::ios& i);
-
-CGAL_EXPORT
-IO::Mode
-set_binary_mode(std::ios& i);
-
-CGAL_EXPORT
-IO::Mode
-set_pretty_mode(std::ios& i);
-
-CGAL_EXPORT
-IO::Mode
-set_mode(std::ios& i, IO::Mode m);
-
-CGAL_EXPORT
-bool
-is_pretty(std::ios& i);
-
-CGAL_EXPORT
-bool
-is_ascii(std::ios& i);
-
-CGAL_EXPORT
-bool
-is_binary(std::ios& i);
-
-
-
-template < class T >
-inline
-void
-write(std::ostream& os, const T& t, const io_Read_write&)
-{
-    os.write(reinterpret_cast<const char*>(&t), sizeof(t));
-}
-
-
-template < class T >
-inline
-void
-write(std::ostream& os, const T& t, const io_Operator&)
-{
-    os << oformat(t);
-}
-
-
-template < class T >
-inline
-void
-write(std::ostream& os, const T& t, const io_Extract_insert&)
-{
-    insert(os, t);
-}
-
-
-template < class T >
-inline
-void
-write(std::ostream& os, const T& t)
-{
-    write(os, t, typename Io_traits<T>::Io_tag());
-}
-
-
-template < class T >
-inline
-void
-read(std::istream& is, T& t, const io_Read_write&)
-{
-    is.read(reinterpret_cast<char*>(&t), sizeof(t));
-}
-
-
-template < class T >
-inline
-void
-read(std::istream& is, T& t, const io_Operator&)
-{
-    is >> iformat(t);
-}
-
-
-template < class T >
-inline
-void
-read(std::istream& is, T& t, const io_Extract_insert&)
-{
-    extract(is, t);
-}
-
-
-template < class T >
-inline
-void
-read(std::istream& is, T& t)
-{
-    read(is, t, typename Io_traits<T>::Io_tag());
-}
-
-
-inline
-std::ostream& operator<<( std::ostream& out, const Color& col)
-{
-    switch(out.iword(IO::mode)) {
-    case IO::ASCII :
-        return out << static_cast<int>(col.red())   << ' '
-		   << static_cast<int>(col.green()) << ' '
-		   << static_cast<int>(col.blue());
-    case IO::BINARY :
-        write(out, static_cast<int>(col.red()));
-        write(out, static_cast<int>(col.green()));
-        write(out, static_cast<int>(col.blue()));
-        return out;
-    default:
-        return out << "Color(" << static_cast<int>(col.red()) << ", "
-		   << static_cast<int>(col.green()) << ", "
-                   << static_cast<int>(col.blue()) << ')';
-    }
-}
-
-inline
-std::istream &operator>>(std::istream &is, Color& col)
-{
-    int r = 0, g = 0, b = 0;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> r >> g >> b;
-        break;
-    case IO::BINARY :
-        read(is, r);
-        read(is, g);
-        read(is, b);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    col = Color((unsigned char)r,(unsigned char)g,(unsigned char)b);
-    return is;
-}
-
-CGAL_EXPORT
-const char* mode_name( IO::Mode m );
-
-// From polynomial.h TODO: Where to put this?
-CGAL_EXPORT
-void swallow(std::istream &is, char d);
-
-CGAL_EXPORT
-void swallow(std::istream &is, const std::string& s );
-
-
-
-} //namespace CGAL
-
-#endif // CGAL_IO_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/alpha_shape.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/alpha_shape.xpm
deleted file mode 100644
index d9625c4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/alpha_shape.xpm
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * alpha_shape_xpm[];
-
-/* XPM */
-extern const char * alpha_shape_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/arrow.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/arrow.xpm
deleted file mode 100644
index 24d09de..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/arrow.xpm
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Rada Ursu
-//                 Laurent Rineau
-
-/* XPM */
-extern const char * arrow_xpm[];
-/* XPM */
-extern const char * arrow_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/back.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/back.xpm
deleted file mode 100644
index a678aed..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/back.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * back_xpm[];
-/* XPM */
-extern const char * back_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/circle.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/circle.xpm
deleted file mode 100644
index 104f4bc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/circle.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * circle_xpm[];
-/* XPM */
-extern const char * circle_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/constrained.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/constrained.xpm
deleted file mode 100644
index a9759af..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/constrained.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * constrained_xpm[];
-/* XPM */
-extern const char * constrained_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/demoicon.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/demoicon.xpm
deleted file mode 100644
index 9e344d6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/demoicon.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * demoicon_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus.xpm
deleted file mode 100644
index 9f63195..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1.xpm
deleted file mode 100644
index be53ba3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus1_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1_mask.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1_mask.xpm
deleted file mode 100644
index 6593655..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus1_mask.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus1_mask_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2.xpm
deleted file mode 100644
index bfb5cbb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus2_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2_mask.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2_mask.xpm
deleted file mode 100644
index be97ed2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus2_mask.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus2_mask_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3.xpm
deleted file mode 100644
index b39d2af..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus3_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3_mask.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3_mask.xpm
deleted file mode 100644
index e287951..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/focus3_mask.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * focus3_mask_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/forward.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/forward.xpm
deleted file mode 100644
index afda49f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/forward.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * forward_xpm[];
-/* XPM */
-extern const char * forward_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/greene_approx.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/greene_approx.xpm
deleted file mode 100644
index 49afcf7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/greene_approx.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * greene_approx_xpm[];
-/* XPM */
-extern const char * greene_approx_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/hand.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/hand.xpm
deleted file mode 100644
index 959482a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/hand.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * hand_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/handtool.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/handtool.xpm
deleted file mode 100644
index 6c74330..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/handtool.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * handtool_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/holddown.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/holddown.xpm
deleted file mode 100644
index 20f9689..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/holddown.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * holddown_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/iso_rectangle.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/iso_rectangle.xpm
deleted file mode 100644
index 52d8cc4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/iso_rectangle.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * iso_rectangle_small_xpm[];
-/* XPM */
-extern const char * iso_rectangle_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/line.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/line.xpm
deleted file mode 100644
index d1a97b8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/line.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * line_xpm[];
-/* XPM */
-extern const char * line_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_parallelogram.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_parallelogram.xpm
deleted file mode 100644
index e6a5d41..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_parallelogram.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * min_parallelogram_xpm[];
-/* XPM */
-extern const char * min_parallelogram_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_rectangle.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_rectangle.xpm
deleted file mode 100644
index ed928ff..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/min_rectangle.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * min_rectangle_xpm[];
-/* XPM */
-extern const char * min_rectangle_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/mouse_coord.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/mouse_coord.xpm
deleted file mode 100644
index 0905cd8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/mouse_coord.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * mouse_coord_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/movepoint.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/movepoint.xpm
deleted file mode 100644
index ffb3c52..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/movepoint.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * movepoint_xpm[];
-/* XPM */
-extern const char * movepoint_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/nearest_vertex.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/nearest_vertex.xpm
deleted file mode 100644
index f2777ce..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/nearest_vertex.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * nearest_vertex_xpm[];
-/* XPM */
-extern const char * nearest_vertex_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/notool.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/notool.xpm
deleted file mode 100644
index 539538a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/notool.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * notool_xpm[];
-/* XPM */
-extern const char * notool_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/optimal_convex.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/optimal_convex.xpm
deleted file mode 100644
index 1f8d15c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/optimal_convex.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * optimal_convex_xpm[];
-/* XPM */
-extern const char * optimal_convex_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/point.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/point.xpm
deleted file mode 100644
index 13b8335..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/point.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * point_xpm[];
-/* XPM */
-extern const char * point_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/points.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/points.xpm
deleted file mode 100644
index a3d8915..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/points.xpm
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * points_xpm[];
-
-/* XPM */
-extern const char * points_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/polygon.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/polygon.xpm
deleted file mode 100644
index 4d55274..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/polygon.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * polygon_xpm[];
-/* XPM */
-extern const char * polygon_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/rotation.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/rotation.xpm
deleted file mode 100644
index 1141d05..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/rotation.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char *rotation_xpm[];
-extern const char *rotation_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/show_polygon.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/show_polygon.xpm
deleted file mode 100644
index 5d49a5a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/show_polygon.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * show_polygon_xpm[];
-/* XPM */
-extern const char * show_polygon_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/triangulation.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/triangulation.xpm
deleted file mode 100644
index e4f4181..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/triangulation.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * triangulation_xpm[];
-/* XPM */
-extern const char * triangulation_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/voronoi.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/voronoi.xpm
deleted file mode 100644
index e24d3c7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/voronoi.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * voronoi_xpm[];
-/* XPM */
-extern const char * voronoi_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/ymonotone.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/ymonotone.xpm
deleted file mode 100644
index ca700c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/ymonotone.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * ymonotone_xpm[];
-/* XPM */
-extern const char * ymonotone_small_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in.xpm
deleted file mode 100644
index 6f9cf26..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * zoomin_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in_rect.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in_rect.xpm
deleted file mode 100644
index 4655afd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_in_rect.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * zoomin_rect_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_out.xpm b/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_out.xpm
deleted file mode 100644
index 0fee8a5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/pixmaps/zoom_out.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2001,2002,2003,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-/* XPM */
-extern const char * zoomout_xpm[];
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/read_off_points.h b/3rdparty/CGAL-4.6/include/CGAL/IO/read_off_points.h
deleted file mode 100644
index 8261d6e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/read_off_points.h
+++ /dev/null
@@ -1,431 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret
-
-#ifndef CGAL_READ_OFF_POINTS_H
-#define CGAL_READ_OFF_POINTS_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/value_type_traits.h>
-#include <CGAL/point_set_processing_assertions.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-  #include <boost/property_map/property_map.hpp>
-#else
-  #include <boost/property_map.hpp>
-#endif
-
-#include <iostream>
-#include <sstream>
-#include <string>
-
-namespace CGAL {
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Reads points (positions + normals, if available) from a .off ASCII stream.
-/// The function expects for each point a line with the x y z position,
-/// optionally followed by the nx ny nz normal.
-/// Faces are ignored.
-///
-/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
-///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
-/// @tparam OutputIterator iterator over output points.
-/// @tparam PointPMap is a model of `WritablePropertyMap` with  value type `Point_3<Kernel>`.
-///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return true on success.
-
-// This variant requires all parameters.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-bool
-read_off_points_and_normals(
-    std::istream& stream, ///< input stream.
-    OutputIterator output, ///< output iterator over points.
-    PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-    NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
-    const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // value_type_traits is a workaround as back_insert_iterator's value_type is void
-  // typedef typename value_type_traits<OutputIterator>::type Enriched_point;
-  typedef OutputIteratorValueType Enriched_point;
-
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-
-  if(!stream)
-  {
-    std::cerr << "Error: cannot open file" << std::endl;
-    return false;
-  }
-
-  // scan points
-  long pointsCount = 0, facesCount = 0, edgesCount = 0; // number of items in file
-  int pointsRead = 0; // current number of points read
-  int lineNumber = 0; // current line number
-  std::string line;
-  std::istringstream iss;
-  while(getline(stream,line))
-  {
-    iss.clear();
-    iss.str(line);
-    lineNumber++;
-
-    // Reads file signature on first line
-    if (lineNumber == 1)
-    {
-      std::string signature;
-      if ( !(iss >> signature)
-        || (signature != "OFF" && signature != "NOFF") )
-      {
-        // if wrong file format
-        std::cerr << "Incorrect file format line " << lineNumber << " of file" << std::endl;
-        return false;
-      }
-    }
-
-    // Reads number of points on 2nd line
-    else if (lineNumber == 2)
-    {
-      if ( !(iss >> pointsCount >> facesCount >> edgesCount) )
-      {
-        std::cerr << "Error line " << lineNumber << " of file" << std::endl;
-        return false;
-      }
-    }
-
-    // Reads 3D points on next lines
-    else if (pointsRead < pointsCount)
-    {
-      // Reads position + normal...
-      double x,y,z;
-      double nx,ny,nz;
-      if (iss >> iformat(x) >> iformat(y) >> iformat(z))
-      {
-        Point point(x,y,z);
-        Vector normal = CGAL::NULL_VECTOR;
-        // ... + normal...
-        if (iss >> iformat(nx))
-        {
-          // In case we could read one number, we expect that there are two more
-          if(iss  >> iformat(ny) >> iformat(nz)){
-            normal = Vector(nx,ny,nz);
-          } else {
-            std::cerr << "Error line " << lineNumber << " of file" << std::endl;
-            return false;
-          }
-        }
-        Enriched_point pwn;
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        put(point_pmap,  &pwn, point);  // point_pmap[&pwn] = point
-        put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal
-#else
-        put(point_pmap,  pwn, point);  // point_pmap[&pwn] = point
-        put(normal_pmap, pwn, normal); // normal_pmap[&pwn] = normal
-#endif
-        *output++ = pwn;
-        pointsRead++;
-      }
-      // ...or skip comment line
-    }
-    // Skip remaining lines
-  }
-
-  return true;
-}
-
-/// @cond SKIP_IN_MANUAL
-template <typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-bool
-read_off_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap,
-    kernel);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-bool
-read_off_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return read_off_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap,
-    Kernel());
-}
-
-template <typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-bool
-read_off_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename NormalPMap
->
-bool
-read_off_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  return read_off_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output),
-#else
-    make_identity_property_map(OutputIteratorValueType()),
-#endif
-    normal_pmap);
-}
-
-template <typename OutputIterator,
-          typename NormalPMap
->
-bool
-read_off_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    normal_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Reads points (position only) from a .off ASCII stream.
-/// The function expects for each point a line with the x y z position.
-/// If the position is followed by the nx ny nz normal, then the normal will be ignored.
-/// Faces are ignored.
-///
-/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
-///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
-/// @tparam OutputIterator iterator over output points.
-/// @tparam PointPMap is a model of `WritablePropertyMap` with  value_type `Point_3<Kernel>`.
-///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from  the value type of `PointPMap`.
-///
-/// @return `true` on success.
-
-// This variant requires all parameters.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename Kernel
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // Calls read_off_points_and_normals() with a normal property map = boost::dummy_property_map
-  return read_off_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    boost::dummy_property_map(),
-    kernel);
-}
-
-/// @cond SKIP_IN_MANUAL
-template <typename OutputIterator,
-          typename PointPMap,
-          typename Kernel
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    kernel);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return read_off_points
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    Kernel());
-}
-
-template <typename OutputIterator,
-          typename PointPMap
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output) ///< output iterator over points.
-{
-  return read_off_points
-    <OutputIteratorValueType>(
-    stream,
-    output,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output)
-#else
-    make_identity_property_map(OutputIteratorValueType())
-#endif
-    );
-}
-
-template <typename OutputIterator
->
-bool
-read_off_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output) ///< output iterator over points.
-{
-  // just deduce value_type of OutputIterator
-  return read_off_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output);
-}
-//-----------------------------------------------------------------------------------
-
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_READ_OFF_POINTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/read_xyz_points.h b/3rdparty/CGAL-4.6/include/CGAL/IO/read_xyz_points.h
deleted file mode 100644
index c266fd7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/read_xyz_points.h
+++ /dev/null
@@ -1,427 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret
-
-#ifndef CGAL_READ_XYZ_POINTS_H
-#define CGAL_READ_XYZ_POINTS_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/value_type_traits.h>
-#include <CGAL/point_set_processing_assertions.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-  #include <boost/property_map/property_map.hpp>
-#else
-  #include <boost/property_map.hpp>
-#endif
-
-#include <iostream>
-#include <sstream>
-#include <string>
-
-namespace CGAL {
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Reads points (positions + normals, if available) from a .xyz ASCII stream.
-/// The function expects for each point a line with the x y z position,
-/// optionally followed by the nx ny nz normal.
-/// The first line may contain the number of points in the file.
-/// Empty lines and comments starting by # character are allowed.
-///
-/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
-///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
-/// @tparam OutputIterator iterator over output points.
-/// @tparam PointPMap is a model of `WritablePropertyMap` with  value type `Point_3<Kernel>`.
-///        It can be omitted if the value type of OutputIterator value_type is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type  `Vector_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return true on success.
-
-// This variant requires all parameters.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap,  ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // value_type_traits is a workaround as back_insert_iterator's value_type is void
-  //typedef typename value_type_traits<OutputIterator>::type Enriched_point;
-  typedef OutputIteratorValueType Enriched_point;
-
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-
-  if(!stream)
-  {
-    std::cerr << "Error: cannot open file" << std::endl;
-    return false;
-  }
-
-  // scan points
-  long pointsCount; // number of points in file
-  int lineNumber = 0; // line counter
-  std::string line; // line buffer
-  std::istringstream iss;
-
-  while(getline(stream,line))
-  {
-    // position + normal
-    double x,y,z;
-    double nx,ny,nz;
-
-    lineNumber++;
-
-    // Trims line buffer
-    line.erase(line.find_last_not_of (" ")+1);
-    line.erase(0, line.find_first_not_of (" "));
-
-    // Skips comment or empty line...
-    if (line.length() == 0 || line[0] == '#')
-    {
-      continue;
-    }
-    // ...or reads position...
-    else {
-      iss.clear();
-      iss.str(line);
-      if (iss >> iformat(x) >> iformat(y) >> iformat(z))
-        {
-          Point point(x,y,z);
-          Vector normal = CGAL::NULL_VECTOR;
-          // ... + normal...
-          if (iss >> iformat(nx))
-            {
-              // In case we could read one number, we expect that there are two more
-              if(iss  >> iformat(ny) >> iformat(nz)){
-                normal = Vector(nx,ny,nz);
-              } else {
-                std::cerr << "Error line " << lineNumber << " of file" << std::endl;
-                return false;
-              }
-            }
-          Enriched_point pwn;
-        #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-          put(point_pmap,  &pwn, point);  // point_pmap[&pwn] = point
-          put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal
-        #else
-          put(point_pmap,  pwn, point);  // point_pmap[pwn] = point
-          put(normal_pmap, pwn, normal); // normal_pmap[pwn] = normal
-        #endif
-          *output++ = pwn;
-          continue;
-        } 
-      
-    }
-    // ...or skips number of points on first line (optional)
-    if (lineNumber == 1 && std::istringstream(line) >> pointsCount)
-    {
-      continue;
-    }
-    else // if wrong file format
-    {
-      std::cerr << "Error line " << lineNumber << " of file" << std::endl;
-      return false;
-    }
-  }
-
-  return true;
-}
-
-/// @cond SKIP_IN_MANUAL
-template <typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap,
-    kernel);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return read_xyz_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap,
-    Kernel());
-}
-
-template <typename OutputIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    normal_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename NormalPMap
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  return read_xyz_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output),
-#else
-    make_identity_property_map(OutputIteratorValueType()),
-#endif
-    normal_pmap);
-}
-
-template <typename OutputIterator,
-          typename NormalPMap
->
-bool
-read_xyz_points_and_normals(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points_and_normals
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    normal_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Reads points (positions only) from a .xyz ASCII stream.
-/// The function expects for each point a line with the x y z position.
-/// If the position is followed by the nx ny nz normal, then the normal will be ignored.
-/// The first line may contain the number of points in the file.
-/// Empty lines and comments starting by # character are allowed.
-///
-/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
-///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
-/// @tparam OutputIterator iterator over output points.
-/// @tparam PointPMap is a model of `WritablePropertyMap` with value type  `Point_3<Kernel>`.
-///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return true on success.
-
-// This variant requires all parameters.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap,
-          typename Kernel
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // Calls read_xyz_points_and_normals() with a normal property map = boost::dummy_property_map
-  return read_xyz_points_and_normals
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    boost::dummy_property_map(),
-    kernel);
-}
-
-/// @cond SKIP_IN_MANUAL
-template <typename OutputIterator,
-          typename PointPMap,
-          typename Kernel
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  const Kernel& kernel) ///< geometric traits.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap,
-    kernel);
-}
-/// @endcond
-//-----------------------------------------------------------------------------------
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator,
-          typename PointPMap
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return read_xyz_points
-    <OutputIteratorValueType>(
-    stream,
-    output,
-    point_pmap,
-    Kernel());
-}
-
-template <typename OutputIterator,
-          typename PointPMap
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output,
-    point_pmap);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-//-----------------------------------------------------------------------------------
-template <typename OutputIteratorValueType,
-          typename OutputIterator
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output) ///< output iterator over points.
-{
-  return read_xyz_points
-    <OutputIteratorValueType>(
-    stream,
-    output,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output)
-#else
-    make_identity_property_map(OutputIteratorValueType())
-#endif
-    );
-}
-
-template <typename OutputIterator
->
-bool
-read_xyz_points(
-  std::istream& stream, ///< input stream.
-  OutputIterator output) ///< output iterator over points.
-{
-  // just deduce value_type of OutputIterator
-  return read_xyz_points
-    <typename value_type_traits<OutputIterator>::type>(
-    stream,
-    output);
-}
-//-----------------------------------------------------------------------------------
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_READ_XYZ_POINTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/write_xyz_points.h b/3rdparty/CGAL-4.6/include/CGAL/IO/write_xyz_points.h
deleted file mode 100644
index b3bd3c8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/IO/write_xyz_points.h
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret
-
-#ifndef CGAL_WRITE_XYZ_POINTS_H
-#define CGAL_WRITE_XYZ_POINTS_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-  #include <boost/property_map/property_map.hpp>
-#else
-  #include <boost/property_map.hpp>
-#endif
-
-#include <iostream>
-#include <iterator>
-
-namespace CGAL {
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Saves the [first, beyond) range of points (positions + normals) to a .xyz ASCII stream.
-/// The function writes for each point a line with the x y z position
-/// followed by the nx ny nz normal.
-///
-/// \pre normals must be unit vectors
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value type = `Point_3<Kernel>`.
-///        It can be omitted if the value type of `ForwardIterator value_type is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `ReadablePropertyMap` with a value type  `Vector_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return true on success.
-
-// This variant requires all parameters.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-bool
-write_xyz_points_and_normals(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  if(!stream)
-  {
-    std::cerr << "Error: cannot open file" << std::endl;
-    return false;
-  }
-
-  // Write positions + normals
-  for(ForwardIterator it = first; it != beyond; it++)
-  {
-  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    Point p = get(point_pmap, it);
-    Vector n = get(normal_pmap, it);
-  #else
-    Point p = get(point_pmap, *it);
-    Vector n = get(normal_pmap, *it);
-  #endif
-    stream << p << " " << n << std::endl;
-  }
-
-  return ! stream.fail();
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-bool
-write_xyz_points_and_normals(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first, ///< first input point.
-  ForwardIterator beyond, ///< past-the-end input point.
-  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
-  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return write_xyz_points_and_normals(
-    stream,
-    first, beyond,
-    point_pmap,
-    normal_pmap,
-    Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename ForwardIterator,
-          typename NormalPMap
->
-bool
-write_xyz_points_and_normals(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first, ///< first input point.
-  ForwardIterator beyond, ///< past-the-end input point.
-  NormalPMap normal_pmap) ///< property map: value_type of ForwardIterator -> Vector_3.
-{
-  return write_xyz_points_and_normals(
-    stream,
-    first, beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output),
-#else
-    make_identity_property_map(
-      typename std::iterator_traits<ForwardIterator>::value_type()),
-#endif
-    normal_pmap);
-}
-/// @endcond
-
-
-//===================================================================================
-/// \ingroup PkgPointSetProcessing
-/// Saves the [first, beyond) range of points (positions only) to a .xyz ASCII stream.
-/// The function writes for each point a line with the x y z position.
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type  `Point_3<Kernel>`.
-///        It can be omitted if the value type of `ForwardIterator value_type is convertible to `Point_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return true on success.
-
-// This variant requires all parameters.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename Kernel
->
-bool
-write_xyz_points(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  if(!stream)
-  {
-    std::cerr << "Error: cannot open file" << std::endl;
-    return false;
-  }
-
-  // Write positions
-  for(ForwardIterator it = first; it != beyond; it++)
-  {
-  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    Point p = get(point_pmap, it);
-  #else
-    Point p = get(point_pmap, *it);
-  #endif
-    
-    stream << p << std::endl;
-  }
-
-  return ! stream.fail();
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename ForwardIterator,
-          typename PointPMap
->
-bool
-write_xyz_points(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first, ///< first input point.
-  ForwardIterator beyond, ///< past-the-end input point.
-  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return write_xyz_points(
-    stream,
-    first, beyond,
-    point_pmap,
-    Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename ForwardIterator
->
-bool
-write_xyz_points(
-  std::ostream& stream, ///< output stream.
-  ForwardIterator first, ///< first input point.
-  ForwardIterator beyond) ///< past-the-end input point.
-{
-  return write_xyz_points(
-    stream,
-    first, beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(output)
-#else
-    make_identity_property_map(
-      typename std::iterator_traits<ForwardIterator>::value_type())
-#endif
-    );
-}
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_WRITE_XYZ_POINTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ImageIO.h b/3rdparty/CGAL-4.6/include/CGAL/ImageIO.h
deleted file mode 100644
index 29978fd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/ImageIO.h
+++ /dev/null
@@ -1,704 +0,0 @@
-// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) 
-// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) 
-// All rights reserved.
-//
-// The files in this directory are part of the ImageIO Library.
-// You can redistribute them and/or  modify them under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-// $URL$
-// $Id$
-//
-
-#ifndef IMAGEIO_H
-#define IMAGEIO_H
-
-#include <CGAL/config.h>
-#include <CGAL/export/ImageIO.h>
-
-#include <CGAL/auto_link/ImageIO.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <boost/cstdint.hpp> // for uint32_t, etc.
-
-#ifdef CGAL_USE_ZLIB
-#include <zlib.h>
-/* see http://www.gzip.org/zlib/
-   for details and documentation
-*/
-#endif
-
-
-
-#if (defined(_LINUX_) || defined(_SOLARIS_))
-
-/* should be declared in stdio.h
- */
-extern int fileno( FILE *stream);
-extern FILE *fdopen (int fildes, const char *mode);
-/* should be declared in string.h
- */
-#ifndef __cplusplus
-extern char *strdup(const char *s);
-extern int strncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-
-#endif
-
-
-
-
-
-#ifndef LONGINT
-
-#if (defined _ALPHA_ || (defined _SGI_ && (defined _64_ || defined _64_M4_ || defined _64_M3_)))
-/* the 64-bits type on 64-bits platform (long int) */
-#define LONGINT long  int
-#else
-#ifdef __GNUC__
-/* the 64-bits type on 32-bits platform (long long int) */
-#define LONGINT long long int
-#else
-/*#define LONGINT __int64 */
-#define LONGINT long int
-#endif
-#endif
-
-#endif
-
-
-
-
-
-
-
-
-/** file open mode */
-typedef enum {
-  /** no file open */
-  OM_CLOSE,
-  /** file is stdin or stdout */
-  OM_STD,
-  /** file is gzipped */
-#ifdef CGAL_USE_ZLIB
-  OM_GZ,
-#endif
-  /** normal file */
-  OM_FILE
-} OPEN_MODE;
-
-
-/** data mode */
-typedef enum {
-  /** data are binary */
-  DM_BINARY,
-  /** data are ascii */
-  DM_ASCII
-} DATA_MODE;
-
-
-/** kind of image word */
-typedef enum {
-  /** fixed type */
-  WK_FIXED,
-  /** floating point */
-  WK_FLOAT,
-  /** unknown (uninitialized) */
-  WK_UNKNOWN
-} WORD_KIND;
-
-
-/** image word sign */
-typedef enum {
-  /** signed */
-  SGN_SIGNED,
-  /** unsigned */
-  SGN_UNSIGNED,
-  /** unknown (uninitialized or floating point words) */
-  SGN_UNKNOWN
-} SIGN;
-
-
-/** endianness */
-typedef enum {
-  /** Little endian processor */
-  END_LITTLE,
-  /** Big endian processor */
-  END_BIG,
-  /** Unknown endianness (unopenned file) */
-  END_UNKNOWN
-} ENDIANNESS;
-
-
-/** inrimage vectorial storage mode */
-typedef enum {
-  /** interlaced vectors (i.e. x1, y1, z1, x2, y2, z2, x3, y3, z3, ...) */
-  VM_INTERLACED,
-  /** non interlaced vectors (i.e. x1, x2, x3, ..., y1, y2, y3, ..., z1, z2, z3...) */
-  VM_NON_INTERLACED,
-  /** scalar inrimage */
-  VM_SCALAR
-} VECTORIAL_MODE;
-
-
-
-#ifdef CGAL_USE_ZLIB
-typedef gzFile _ImageIO_file;
-#else
-typedef FILE*  _ImageIO_file;
-#endif
-
-#define IMAGE_FORMAT_NAME_LENGTH 100
-
-
-struct point_image;
-
-/** defines the type of function called to test if an image is of a given
-    format. The first parameter is an array of char of size 5 (ends with
-    character 0) that describes the first file character (magic string). The
-    second parameter is the filename. The output value is >=0 if the image is
-    of that given format and <0 otherwise */
-typedef int (*TEST_IMAGE_FORMAT)(char *,const char *);
-/** defines the type of function called to read an image or an image header
-    from a file corresponding to a given format. The first parameter is the
-    file name whereas the second parameter is an _image structure. Note that 
-    the file has been already opened (the file descriptor fd is valid). 
-    The output value is >0  if  the whole image has been read, it is 0 if 
-    only the header has been read and it is  <0 otherwise */
-typedef int (*READ_IMAGE_HEADER)(const char *, struct point_image *);
-/** defines the type of function called to write an image to a file
-    corresponding to a given format.  
-    The first parameter is the full file name whereas the second parameter
-    is an _image structure. 
-    Note that the file has to be opened and closed in the function.
-    The output value is >=0 if the whole image has been written
-    correctly and it is <0 otherwise */
-typedef int (*WRITE_IMAGE)(char *,struct point_image *);
-
-
-/** Image Format descriptor */
-typedef struct imformat {
-
-  /** a pointer on a function that tests if an image is of a given format */
-  TEST_IMAGE_FORMAT testImageFormat;
-
-  /** a pointer on a function that reads the header of an image file */
-  READ_IMAGE_HEADER readImageHeader;
-
-  /** a pointer on a function that writes  image of a given
-      format */
-  WRITE_IMAGE writeImage;
-
-  /* the file extension of format (including a dot ".": if several 
-     extensions may be used, they should be separed with a 
-     comma ".inr,.inr.gz" */
-  char fileExtension[IMAGE_FORMAT_NAME_LENGTH];
-  
-  /** the usual name given to a format : for instance "inrimage", "gif" */
-  char realName[IMAGE_FORMAT_NAME_LENGTH];
-  /* pointer towards the next image format*/
-  struct imformat *next;
-} IMAGE_FORMAT, *PTRIMAGE_FORMAT;
-
-/** Image descriptor */
-typedef struct point_image {
-  /** Image x dimension (number of columns) */
-  std::size_t xdim;
-  /** Image y dimension (number of rows) */
-  std::size_t ydim;
-  /** Image z dimension (number of planes) */
-  std::size_t zdim;
-  /** Image vectorial dimension */
-  std::size_t vdim;
-
-  /** Image voxel size in x dimension */
-  double vx;
-  /** Image voxel size in y dimension */
-  double vy;
-  /** Image voxel size in z dimension */
-  double vz;
-
-  /** Image offset in x dimension */
-  float tx;
-  /** Image offset in y dimension */
-  float ty;
-  /** Image offset in z dimension */
-  float tz;
-
-  /** Image rotation vector in x dimension */
-  float rx;
-  /** Image rotation vector in y dimension */
-  float ry;
-  /** Image rotation vector in z dimension */
-  float rz;
-
-  /** Image center in x dimension */
-  int cx;
-  /** Image center in y dimension */
-  int cy;
-  /** Image center in z dimension */
-  int cz;
-
-  /** spm */
-  float spm_offset;
-  float spm_scale;
-
-  /** Image data buffer */
-  void *data;
-
-  /** Image word size (in bytes) */
-  std::size_t wdim;
-  /** Image format to use for I/0. Should not be set by user */
-  PTRIMAGE_FORMAT imageFormat;
-  /** Data buffer vectors are interlaced or non interlaced */
-  VECTORIAL_MODE vectMode;
-  /** Image words kind */
-  WORD_KIND wordKind;
-  /** Image words sign */
-  SIGN sign;
-
-  /** User defined strings array. The user can use any internal purpose string.
-      Each string is written at then end of header after a '#' character. */
-  char **user;
-  /** Number of user defined strings */
-  unsigned int nuser;
-
-  /** Image file descriptor */
-  _ImageIO_file fd;
-
-
-  /** Kind of image file descriptor */
-  OPEN_MODE openMode;
-  /** Written words endianness */
-  ENDIANNESS endianness;
-  /** Kind of image data encoding */
-  DATA_MODE dataMode;
-
-} _image;
-
-
-
-/** Error codes */
-#define ImageIO_NO_ERROR 0
-#define ImageIO_UNKNOWN_TYPE -1
-#define ImageIO_OPENING -2
-#define ImageIO_READING_HEADER -3
-#define ImageIO_READING_IMAGE -4
-#define ImageIO_WRITING_HEADER -3
-#define ImageIO_WRITING_IMAGE -4
-#define ImageIO_WRITING_DATA  -5
-
-
-
-
-
-/** Allocates and initializes an image descriptor */
-CGAL_IMAGEIO_EXPORT _image *_initImage();
-
-/** Free an image descriptor
-    @param im image descriptor */
-CGAL_IMAGEIO_EXPORT void _freeImage(_image *im);
-
-/** creates an image descriptor from the given header information
-    @param x image x dimension (number of columns)
-    @param y image y dimension (number of rows)
-    @param z image z dimension (number of planes)
-    @param v image vectorial dimension
-    @param vx image voxel size in x dimension
-    @param vy image voxel size in y dimension
-    @param vz image voxel size in z dimension
-    @param w image word size in bytes
-    @param wk image word kind
-    @param sgn image word sign */
-CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v,
-                                         float vx, float vy, float vz, int w,
-                                         WORD_KIND wk, SIGN sgn);
-
-
-/** Reads an image from a file and returns an image descriptor or NULL if<br>
-    reading failed.<br>
-    Reads from stdin if image name is NULL.
-    The image data field points to a xdim * ydim * zdim * vdim buffer
-    containing voxels in order:
-    (Z1, Y1, X1, V1) (Z1, Y1, X1, V2), ... , (Z1, Y1, X1, Vt),
-    (Z1, Y1, X2, V1) ...         ...       , (Z1, Y1, X2, Vt),
-    ...
-    (Z1, Y1, Xn, V1) ...         ...       , (Z1, Y1, Xn, Vt),
-    (Z1, Y2, X1, V1) ...         ...       , (Z1, Y2, X1, Vt),
-    ...
-    (Z2, Y1, X1, V1) ...         ...       , (Z2, Y1, X1, Vt),
-    ...
-                     ...         ...       , (Zl, Ym, Xn, Vt)
-
-    Read the following format:
-    Inrimage,
-    GIF,
-    IRIS,
-    ANALYSE,
-    PGM,
-    PPM,
-    BMP,
-    GIS (CEA, IRISA, ENST 3D image format).
-    
-    See also:
-    http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html and
-    http://www.gzip.org/zlib/
-    
-
-   @param name image file name or NULL for stdin */
-CGAL_IMAGEIO_EXPORT _image* _readImage(const char *name);
-
-/** Reads an image from a file and returns an image descriptor or NULL if<br>
-    reading failed.<br>
-    Reads from stdin if image name is NULL.
-    If the image is vectorial, it is uninterlaced, i.e. the image data
-    field points to a xdim * ydim * zdim * vdim buffer containing voxels
-    in order:
-     (V1, Z1, Y1, X1) (V1, Z1, Y1, X2), ... , (V1, Z1, Y1, Xn),
-     (V1, Z1, Y2, X1) ...         ...       , (V1, Z1, Y2, Xn),
-     ...
-     (V1, Z1, Ym, X1) ...         ...       , (V1, Z1, Ym, Xn),
-     (V1, Z2, Y1, X1) ...         ...       , (V1, Z2, Y1, Xn),
-     ...
-     (V2, Z1, Y1, X1) ...         ...       , (V2, Z1, Y1, Xn),
-     ...
-                      ...         ...       , (Vt, Zl, Ym, Xn)
-   @param name image file name or NULL */
-CGAL_IMAGEIO_EXPORT _image* _readNonInterlacedImage(const char *name);
-
-/** Read an image from a file. The word type is supposed to be unsigned
-    char, and the dimensions are (rx, ry, rz). */
-CGAL_IMAGEIO_EXPORT _image* _readImage_raw(const char *name,
-                                           const unsigned int rx,
-                                           const unsigned int ry,
-                                           const unsigned int rz,
-                                           const double vx = 1.,
-                                           const double vy = 1.,
-                                           const double vz = 1.,
-                                           const unsigned int offset = 0);
-
-
-/** Writes given image in file 'name'.<br>
-    If name ends with '.gz', file is gzipped.<br>
-    If name is NULL, image is sent to stdout.
-    @param im image descriptor 
-    @param name file name to store image or NULL */
-CGAL_IMAGEIO_EXPORT int _writeImage(_image *im, const char *name);
-
-/** Read one slice of given image whose header has already been read.<br>
-    File descriptor is let at the beginning of next slice and closed<br>
-    when end of file is encountered.<br>
-    If data buffer is NULL, it is allocated for one slice only.<br>
-    This funtion is dedicated to read huge inrimages.
-    @param im image descriptor */
-CGAL_IMAGEIO_EXPORT void _getNextSlice(_image *im);
-
-
-/** adds a format in the list of image format. Test if all mandatory
-    fields have been filled 
-    @param format : an image format 
-    @return -1 if it failed (missing information) and 0 if it succeeded */
-CGAL_IMAGEIO_EXPORT int addImageFormat( PTRIMAGE_FORMAT format);
-
-
-/** returns the first available image format */
-CGAL_IMAGEIO_EXPORT PTRIMAGE_FORMAT firstImageFormat();
-
-/** Reads header from an image file<br>
-    If file is an inrimage, only header is read. Otherwise, whole image<br>
-    is read and image file descriptor is closed.<br>
-    If name is NULL, header is read from STDIN
-    @param name image file name or NULL */
-CGAL_IMAGEIO_EXPORT _image* _readImageHeader(const char *name);
-CGAL_IMAGEIO_EXPORT _image *_readImageHeaderAndGetError( const char *name, int *error );
-
-/** Reads body from an inrmage whose header has been read by
-    _readImageHeader
-    @param im image to read */
-CGAL_IMAGEIO_EXPORT int _readImageData(_image *im);
-
-/** Reads body from a vectorial inrimage whose header has been read by
-    _readImageHeader. The image is uninterlaced
-    (see _readNonInterlacedImage for details).
-    @param im image descriptor*/
-CGAL_IMAGEIO_EXPORT int _readNonInterlacedImageData(_image *im);
-
-/** Reads body from a non-interlaced vectorial inrimage whose header has
-    been read by _readImageHeader. The image buffer is interlaced.
-    @param im image descriptor */
-CGAL_IMAGEIO_EXPORT int _readNonInterlacedFileData(_image *im);
-
-
-
-
-/** given an initialized file descriptor and a file name, open file
-   from stdout (if name == NULL), a gziped pipe (if file is gziped)
-   or a standard file otherwise.
-   @param im initialized image descriptor
-   @param name image file name */
-CGAL_IMAGEIO_EXPORT void _openWriteImage(_image* im, const char *name) ;
-   
-/** open an image file from stdin (if name == NULL), from a pipe
-   (piped with gzip if image was compressed) or from a standard file
-   @param im initialized image descriptor
-   @param name image file name */
-CGAL_IMAGEIO_EXPORT void _openReadImage(_image *im, const char *name);
-
-/** close an image file descriptor that was opened using _openImage
-    @param im opened image descriptor */
-
-
-/** return the bounding box of the image
-    @param im opened image descriptor */
-CGAL_IMAGEIO_EXPORT void _get_image_bounding_box(_image* im,
-                                                 double* x_min, double* y_min, double* z_min,
-                                                 double* x_max, double* y_max, double* z_max);
-
-/** returns the endianness of the hardware architecture */
-CGAL_IMAGEIO_EXPORT ENDIANNESS  _getEndianness(); 
-/** initializes the list of  supported image formats */
-CGAL_IMAGEIO_EXPORT void initSupportedFileFormat();
-/** prints supported image formats */
-CGAL_IMAGEIO_EXPORT void printSupportedFileFormat();
-/** free the list of  supported image formats */
-CGAL_IMAGEIO_EXPORT void removeSupportedFileFormat();
-
-
-/** return image type in given file
-    @param fileName image file name */
-CGAL_IMAGEIO_EXPORT PTRIMAGE_FORMAT imageType(const char *fileName);
-
-extern "C" {
-/** function prototype to allocate memory */
-typedef void *(*ALLOCATION_FUNCTION)(size_t);
-
-/** function prototype to free memory */
-typedef void (*DEALLOCATION_FUNCTION)(void *);
-}
-
-/** set allocation and deallocation routines
-    @param alloc new allocation routine
-    @param del new deallocation routine */
-CGAL_IMAGEIO_EXPORT void setImageIOAllocationRoutines(ALLOCATION_FUNCTION alloc,
-                                                      DEALLOCATION_FUNCTION del);
-
-
-
-/** call allocation routine */
-CGAL_IMAGEIO_EXPORT void *ImageIO_alloc(size_t);
-/** call deallocation routine */
-CGAL_IMAGEIO_EXPORT void ImageIO_free(void *);
-
-/** replaces fwrite function
-    @param im image to write
-    @param buf data buffer to write
-    @param len buffer length */
-CGAL_IMAGEIO_EXPORT size_t ImageIO_write(const _image *im, const void *buf, size_t len);
-
-
-/** replaces fread function
-    @param im image to read
-    @param buf data buffer to read
-    @param len buffer length */
-CGAL_IMAGEIO_EXPORT size_t ImageIO_read(const _image *im, void *buf, size_t len);
-
-/** replaces fgets function
- */
-CGAL_IMAGEIO_EXPORT char *ImageIO_gets( const _image *im, char *str, int size );
-
-/** replaces fseek function
- */
-CGAL_IMAGEIO_EXPORT int ImageIO_seek( const _image *im, long offset, int whence );
-
-/** replaces ferror function
- */
-CGAL_IMAGEIO_EXPORT int ImageIO_error( const _image *im );
-
-/** replaces fclose function
- */
-CGAL_IMAGEIO_EXPORT int ImageIO_close( _image *im );
-
-/** trilinear interpolation in an _image. The returned type is float (cast
-    are made if the image word type is different).
- */
-CGAL_IMAGEIO_EXPORT float triLinInterp(const _image* image, float posx, float posy, float posz,
-                                       const float value_outside = 0.);
-
-/** Alias for triLinInterp */
-CGAL_IMAGEIO_EXPORT inline float trilinear_interpolation(const _image* image,
-                                                         float posx, float posy, float posz)
-{
-  return triLinInterp(image, posx, posy, posz);
-}
-
-namespace CGAL {
-namespace IMAGEIO {
-
-//
-// The following definition are for the evaluate function.
-// 
-template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
-struct Word_type_generator
-{
-};
-
-template <SIGN sign>
-struct Word_type_generator<WK_FLOAT, sign, 4>
-{
-  typedef float type;
-};
-
-template <SIGN sign>
-struct Word_type_generator<WK_FLOAT, sign, 8>
-{
-  typedef double type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_SIGNED, 1>
-{
-//   typedef boost::int8_t type;
-  typedef char type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>
-{
-  typedef boost::uint8_t type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_SIGNED, 2>
-{
-  typedef boost::int16_t type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>
-{
-  typedef boost::uint16_t type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_SIGNED, 4>
-{
-  typedef boost::int32_t type;
-};
-
-template <>
-struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>
-{
-  typedef boost::uint32_t type;
-};
-
-template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
-inline
-typename Word_type_generator<wordKind, sign, wdim>::type
-static_evaluate(const _image* image,
-                const std::size_t i,
-                const std::size_t j,
-                const std::size_t k)
-{
-  typedef typename Word_type_generator<wordKind, sign, wdim>::type Word;
-
-  return static_evaluate<Word>(image, i, j, k);
-}
-
-template <typename Word>
-inline
-Word
-static_evaluate(const _image* image,
-                const std::size_t i,
-                const std::size_t j,
-                const std::size_t k)
-{
-  return ((Word*)image->data)[(k * image->ydim + j) * image->xdim + i];
-}
-
-} // end namespace IMAGEIO
-} // end namespace CGAL
-
-#define CGAL_IMAGE_IO_CASE(image_ptr,code)                                                 \
-  switch(image_ptr->wordKind)                                                              \
-  {                                                                                        \
-  case WK_FLOAT:                                                                           \
-    switch(image_ptr->wdim)                                                                \
-    {                                                                                      \
-    case 4: {                                                                              \
-      typedef CGAL::IMAGEIO::Word_type_generator<WK_FLOAT, SGN_UNKNOWN, 4>::type Word;     \
-      code;                                                                                \
-      break;                                                                               \
-    }                                                                                      \
-    case 8: {                                                                              \
-      typedef CGAL::IMAGEIO::Word_type_generator<WK_FLOAT, SGN_UNKNOWN, 8>::type Word;     \
-      code;                                                                                \
-      break;                                                                               \
-    }                                                                                      \
-    default:                                                                               \
-      break;                                                                               \
-    }                                                                                      \
-    break;                                                                                 \
-  case WK_FIXED:                                                                           \
-    switch(image_ptr->wdim)                                                                \
-    {                                                                                      \
-    case 2: {                                                                              \
-      if(image_ptr->sign == SGN_SIGNED) {                                                  \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 2>::type Word;    \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-      else {                                                                               \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>::type Word;  \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-    }                                                                                      \
-    case 1: {                                                                              \
-      if(image_ptr->sign == SGN_SIGNED) {                                                  \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 1>::type Word;    \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-      else {                                                                               \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>::type Word;  \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-    }                                                                                      \
-    case 4: {                                                                              \
-      if(image_ptr->sign == SGN_SIGNED) {                                                  \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 4>::type Word;    \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-      else {                                                                               \
-        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>::type Word;  \
-        code;                                                                              \
-        break;                                                                             \
-      }                                                                                    \
-    }                                                                                      \
-    default:                                                                               \
-      break;                                                                               \
-    }                                                                                      \
-    break;                                                                                 \
-  default:                                                                                 \
-    break;                                                                                 \
-  }
-
-CGAL_IMAGEIO_EXPORT float evaluate(const _image* image,const std::size_t i,const std::size_t j,const std::size_t k);
-
-
-/** convert the data of the image to float 
-*/
-CGAL_IMAGEIO_EXPORT void convertImageTypeToFloat(_image* image);
-
-
-#endif // end IMAGEIO_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Image_3.h b/3rdparty/CGAL-4.6/include/CGAL/Image_3.h
deleted file mode 100644
index 3ae3164..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Image_3.h
+++ /dev/null
@@ -1,499 +0,0 @@
-// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
-//               2008 GeometryFactory
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau, Pierre Alliez
-
-#ifndef CGAL_IMAGE_3_H
-#define CGAL_IMAGE_3_H
-
-#include <CGAL/basic.h>
-
-#include <boost/shared_ptr.hpp>
-
-#include <boost/format.hpp>
-#include <CGAL/ImageIO.h>
-#include <CGAL/function_objects.h>
-
-#include <limits>
-#include <set>
-#include <cstdlib>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4244 4251) // double float conversion loss of data and dll linkage
-#endif
-
-class vtkImageData;
-
-namespace CGAL {
-
-namespace ImageIO {
-
-template <typename T>
-class Indicator : public std::unary_function<T, double>
-{
-  const T label;
-public:
-  Indicator(T i) : label(i) {};
-  
-  double operator()(T x) const 
-  {
-    return (x == label) ? 1. : 0.;
-  }
-};
-
-} // end namespace CGAL::ImageIO
-
-class CGAL_IMAGEIO_EXPORT Image_3
-{
-  struct Image_deleter {
-    void operator()(_image* image)
-    {
-      ::_freeImage(image);
-    }
-  };
-public:
-  typedef boost::shared_ptr<_image> Image_shared_ptr;
-  typedef Image_shared_ptr Pointer;
-
-protected:
-  Image_shared_ptr image_ptr;
-
-   // implementation in src/CGAL_ImageIO/Image_3.cpp
-  bool private_read(_image* im);
-
-public:
-  Image_3()
-    : image_ptr()
-  {
-  }
-
-  Image_3(const Image_3& bi)
-    : image_ptr(bi.image_ptr)
-  {
-//     std::cerr << "Image_3::copy_constructor\n";
-  }
-
-  Image_3(_image* im) 
-  {
-    private_read(im);
-  }
-
-  ~Image_3()
-  {
-  }
-
-  const _image* image() const
-  {
-    return image_ptr.get();
-  }
-
-  _image* image()
-  {
-    return image_ptr.get();
-  }
-
-  const void* data() const
-  {
-    return image()->data;
-  }
-
-  void* data()
-  {
-    return image()->data;
-  }
-
-  void set_data(void* d)
-  {
-    image()->data = d;
-  }
-
-  std::size_t xdim() const { return image_ptr->xdim; }
-  std::size_t ydim() const { return image_ptr->ydim; }
-  std::size_t zdim() const { return image_ptr->zdim; }
-
-  std::size_t size() const { return xdim() * ydim() * zdim(); }
-
-  double vx() const { return image_ptr->vx; }
-  double vy() const { return image_ptr->vy; }
-  double vz() const { return image_ptr->vz; }
-
-  float value(const std::size_t i,
-              const std::size_t j,
-              const std::size_t k) const
-  {
-    return ::evaluate(image(),i,j,k);
-  }
-
-public:
-
-  bool read(const char* file)
-  {
-    return private_read(::_readImage(file));
-  }
-
-  bool read_raw(const char* file,
-                const unsigned int rx,
-                const unsigned int ry,
-                const unsigned int rz,
-                const double vx = 1,
-                const double vy = 1,
-                const double vz = 1,
-		const unsigned int offset = 0)
-  {
-    return private_read(::_readImage_raw(file,
-                                         rx,ry,rz,
-                                         vx,vy,vz,offset));
-  }
-
-#ifdef CGAL_USE_VTK
-  bool read_vtk_image_data(vtkImageData*);
-#endif // CGAL_USE_VTK
-
-  // implementation in src/CGAL_ImageIO/Image_3.cpp
-  void gl_draw(const float point_size,
-               const unsigned char r,
-               const unsigned char g,
-               const unsigned char b);
-
-  // implementation in src/CGAL_ImageIO/Image_3.cpp
-  void gl_draw_bbox(const float line_width,
-                    const unsigned char red,
-                    const unsigned char green,
-                    const unsigned char blue);
-
-public:
-  template <typename Image_word_type,
-	    typename Target_word_type,
-	    typename Coord_type,
-	    class Image_transform>
-  Target_word_type 
-  trilinear_interpolation(const Coord_type&x, 
-			  const Coord_type&y, 
-			  const Coord_type&z,
-			  const Image_word_type& value_outside = 
-			    Image_word_type(),
-			  Image_transform transform = 
-			    Image_transform() ) const;
-
-  // default Image_transform = CGAL::Identity
-  template <typename Image_word_type,
-	    typename Target_word_type,
-	    typename Coord_type>
-  Target_word_type 
-  trilinear_interpolation(const Coord_type&x, 
-			  const Coord_type&y, 
-			  const Coord_type&z,
-			  const Image_word_type& value_outside = 
-			  Image_word_type()) const 
-  {
-    return trilinear_interpolation<
-      Image_word_type,
-      Target_word_type>(x, y, z, value_outside,
-			  CGAL::Identity<Image_word_type>());
-  }
-
-  template <typename Image_word_type,
-	    typename Coord_type>
-  Image_word_type 
-  labellized_trilinear_interpolation(const Coord_type&x, 
-				     const Coord_type&y, 
-				     const Coord_type&z,
-				     const Image_word_type& value_outside = 
-  				       Image_word_type()) const;
-
-}; // end Image_3
-
-template <typename Image_word_type,
-	  typename Target_word_type,
-	  typename Coord_type,
-	  class Image_transform>
-Target_word_type 
-Image_3::trilinear_interpolation(const Coord_type& x, 
-				 const Coord_type& y, 
-				 const Coord_type& z,
-				 const Image_word_type& value_outside,
-				 Image_transform transform) const 
-{
-  // Check on double/float coordinates, because (int)-0.1 gives 0
-  if ( x < 0 || y < 0 || z < 0 ) return value_outside;
-  
-  const Coord_type lx = x / image()->vx;
-  const Coord_type ly = y / image()->vy;
-  const Coord_type lz = z / image()->vz;
-  const std::size_t dimx = xdim();
-  const std::size_t dimy = ydim();
-  const std::size_t dimz = zdim();
-  const std::size_t dimxy = dimx*dimy;
-  
-  if(lx < 0 ||
-     ly < 0 ||
-     lz < 0 ||
-     lz >= dimz-1 ||
-     ly >= dimy-1 ||
-     lx >= dimx-1)
-  {
-    return transform(value_outside);
-  }  
-
-  // images are indexed by (z,y,x)
-  const int i1 = (int)(lz); 
-  const int j1 = (int)(ly);
-  const int k1 = (int)(lx);
-  const int i2 = i1 + 1;
-  const int j2 = j1 + 1;
-  const int k2 = k1 + 1;
-
-  /*   We assume (x,y,z) lies in the following cube.
-   *   a, b, c, d, e, f, g, h are the value of the image at the corresponding
-   *   voxels:
-   *
-   *
-   *     x        z
-   *     |       /
-   *        f___ __ g
-   *       /|      /|
-   *     e/_|____h/ |
-   *     |  |    |  |
-   *     |  |b___|_c|
-   *     | /     | /
-   *    a|/_____d|/  _y
-   *    
-   *
-   * a = val(i1, j1, k1)
-   * b = val(i2, j1, k1)
-   * c = val(i2, j2, k1)
-   * d = val(i1, j2, k1)
-   * e = val(i1, j1, k2)
-   * f = val(i2, j1, k2)
-   * g = val(i2, j2, k2)
-   * h = val(i1, j2, k2)
-   */
-
-  Image_word_type* ptr = (Image_word_type*)image()->data;
-  ptr += i1 * dimxy + j1 * dimx + k1;
-  const Target_word_type a = transform(*ptr);
-  const Target_word_type e = transform(*(ptr+1));
-  ptr += dimxy; // i2 * dimxy + j1 * dimx + k1;
-  const Target_word_type b = transform(*ptr);
-  const Target_word_type f = transform(*(ptr+1));
-  ptr += dimx; // i2 * dimxy + j2 * dimx + k1
-  const Target_word_type c = transform(*ptr);
-  const Target_word_type g = transform(*(ptr+1));
-  ptr -= dimxy; // i1 * dimxy + j2 * dimx + k1
-  const Target_word_type d = transform(*ptr);
-  const Target_word_type h = transform(*(ptr+1));
-  
-
-//   const Target_word_type a = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k1];
-//   const Target_word_type b = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k1];
-//   const Target_word_type c = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k1];
-//   const Target_word_type d = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k1];
-//   const Target_word_type e = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k2];
-//   const Target_word_type f = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k2];
-//   const Target_word_type g = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k2];
-//   const Target_word_type h = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k2];
-
-//   const Target_word_type outside = transform(value_outside);
-
-//   if(x < 0.f ||
-//      y < 0.f ||
-//      z < 0.f ||
-//      i1 >= dimz ||
-//      j1 >= dimy ||
-//      k1 >= dimx)
-//   {
-//     return outside;
-//   }
-
-//   Target_word_type a, b, c, d, e, f, g, h; 
-
-//   if(k1 < 0) {
-//     a = b = c = d = outside;
-//   }
-//   else {
-//     if(j1 < 0) {
-//       a = b = outside;
-//     }
-//     else {
-//       if(i1 < 0)
-// 	a = outside;
-//       else
-// 	a = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k1];
-
-//       if(i2 >= dimz)
-// 	b = outside;
-//       else 
-// 	b = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k1];
-//     }
-
-//     if(j2 >= dimy) {
-//       c = d = outside;
-//     }
-//     else {
-//       if(i1 < 0)
-// 	d = outside;
-//       else
-// 	d = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k1];
-
-//       if(i2 >= dimz)
-// 	c = outside;
-//       else
-// 	c = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k1];
-//     }
-//   }
-
-//   if(k2 >= dimx) {
-//     e = f = g = h = outside;
-//   }
-//   else {
-//     if(j1 < 0) {
-//       e = f = outside;
-//     }
-//     else {
-//       if(i1 < 0)
-// 	e = outside;
-//       else
-// 	e = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k2];
-
-//       if(i2 >= dimz)
-// 	f = outside;
-//       else 
-// 	f = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k2];
-//     }
-
-//     if(j2 >= dimy) {
-//       g = h = outside;
-//     }
-//     else {
-//       if(i1 < 0)
-// 	h = outside;
-//       else
-// 	h = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k2];
-
-//       if(i2 >= dimz)
-// 	g = outside;
-//       else
-// 	g = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k2];
-//     }
-//   }
-
-  const Target_word_type di2 = i2 - lz;
-  const Target_word_type di1 = lz - i1;
-  const Target_word_type dj2 = j2 - ly;
-  const Target_word_type dj1 = ly - j1;
-  const Target_word_type dk2 = k2 - lx;
-  const Target_word_type dk1 = lx - k1;
-//   std::cerr << di2 << " " << di1 << "\n";
-//   std::cerr << dj2 << " " << dj1 << "\n";
-//   std::cerr << dk2 << " " << dk1 << "\n";
-
-  return ( (  ( a * di2 + b * di1 ) * dj2 + 
-	      ( d * di2 + c * di1 ) * dj1   ) * dk2 +
-	   (  ( e * di2 + f * di1 ) * dj2 + 
-	      ( h * di2 + g * di1 ) * dj1   ) * dk1 );
-} // end trilinear_interpolation
-
-
-template <typename Image_word_type,
-	  typename Coord_type>
-Image_word_type 
-Image_3::labellized_trilinear_interpolation(const Coord_type& x, 
-					    const Coord_type& y, 
-					    const Coord_type& z,
-					    const Image_word_type& value_outside) const 
-{
-  // Check on double/float coordinates, because (int)-0.1 gives 0
-  if ( x < 0 || y < 0 || z < 0 ) return value_outside;
-  
-  Coord_type lx = x / image()->vx;
-  Coord_type ly = y / image()->vy;
-  Coord_type lz = z / image()->vz;
-  const std::size_t dimx = xdim();
-  const std::size_t dimy = ydim();
-  const std::size_t dimz = zdim();
-  
-  if( lx < 0 ||
-      ly < 0 ||
-      lz < 0 ||
-     lz >= dimz-1 ||
-     ly >= dimy-1 ||
-     lx >= dimx-1)
-  {
-    return value_outside;
-  }  
-
-  // images are indexed by (z,y,x)
-  const int i1 = (int)(lz); 
-  const int j1 = (int)(ly);
-  const int k1 = (int)(lx);
-  const int i2 = i1 + 1;
-  const int j2 = j1 + 1;
-  const int k2 = k1 + 1;
-
-  std::set<Image_word_type> labels;
-  labels.insert(((Image_word_type*)image()->data)[(i1 * dimy + j1) * dimx + k1]);
-  labels.insert(((Image_word_type*)image()->data)[(i1 * dimy + j1) * dimx + k2]);
-  labels.insert(((Image_word_type*)image()->data)[(i1 * dimy + j2) * dimx + k1]);
-  labels.insert(((Image_word_type*)image()->data)[(i1 * dimy + j2) * dimx + k2]);
-  labels.insert(((Image_word_type*)image()->data)[(i2 * dimy + j1) * dimx + k1]);
-  labels.insert(((Image_word_type*)image()->data)[(i2 * dimy + j1) * dimx + k2]);
-  labels.insert(((Image_word_type*)image()->data)[(i2 * dimy + j2) * dimx + k1]);
-  labels.insert(((Image_word_type*)image()->data)[(i2 * dimy + j2) * dimx + k2]);
-
-  CGAL_HISTOGRAM_PROFILER(
-    "Number of labels around a vertex, Image_3::labellized_trilinear_interpolation()", 
-    static_cast<unsigned int>(labels.size()));
-
-  if(labels.size() == 1) {
-    return *(labels.begin());
-  }
-
-  typedef ImageIO::Indicator<Image_word_type> Indicator;
-  double best_value = 0.;
-  Image_word_type best = 0;
-  for(typename std::set<Image_word_type>::const_iterator 
-	label_it = labels.begin(),
-	end = labels.end();
-      label_it != end; ++label_it)
-  {
-    const double r = 
-      trilinear_interpolation<Image_word_type,double,Coord_type, Indicator>(
-        x, y, z, value_outside, Indicator(*label_it));
-    CGAL_assertion(r >= 0.);
-    CGAL_assertion(r <= 1.);
-
-    if(r > best_value) {
-      best = *label_it;
-      best_value = r;
-    }
-  }
-//   CGAL_assertion(best_value > 0.5);
-  return best;
-}
-
-} // end namespace CGAL
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
- 
-#endif // CGAL_IMAGE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Image_3_vtk_interface.h b/3rdparty/CGAL-4.6/include/CGAL/Image_3_vtk_interface.h
deleted file mode 100644
index 9f8501f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Image_3_vtk_interface.h
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s)     : Laurent Rineau
-
-
-#ifndef CGAL_IMAGE_3_VTK_INTERFACE_H
-#define CGAL_IMAGE_3_VTK_INTERFACE_H
-
-#include <CGAL/config.h>
-
-#ifdef CGAL_USE_VTK
-#include <CGAL/Image_3.h>
-#include <vtkImageData.h>
-#include <vtkPointData.h>
-#include <vtkDataArray.h>
-#include <vtkFloatArray.h>
-#include <vtkDoubleArray.h>
-#include <vtkCharArray.h>
-#include <vtkUnsignedCharArray.h>
-#include <vtkShortArray.h>
-#include <vtkUnsignedShortArray.h>
-#include <vtkIntArray.h>
-#include <vtkUnsignedIntArray.h>
-
-#include <boost/cstdint.hpp> // for uint32_t, etc.
-
-namespace CGAL {
-
-template <typename Word>
-struct VTK_type_generator {
-};
-
-template <>
-struct VTK_type_generator<double> {
-  static const vtkIdType type = VTK_DOUBLE;
-  typedef vtkDoubleArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<float> {
-  static const vtkIdType type = VTK_FLOAT;
-  typedef vtkFloatArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<char> {
-  static const vtkIdType type = VTK_CHAR;
-  typedef vtkCharArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<boost::uint8_t> {
-  static const vtkIdType type = VTK_UNSIGNED_CHAR;
-  typedef vtkUnsignedCharArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<boost::int16_t> {
-  static const vtkIdType type = VTK_SHORT;
-  typedef vtkShortArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<boost::uint16_t> {
-  static const vtkIdType type = VTK_UNSIGNED_SHORT;
-  typedef vtkUnsignedShortArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<boost::int32_t> {
-  static const vtkIdType type = VTK_INT;
-  typedef vtkIntArray ArrayType;
-};
-
-template <>
-struct VTK_type_generator<boost::uint32_t> {
-  static const vtkIdType type = VTK_UNSIGNED_INT;
-  typedef vtkUnsignedIntArray ArrayType;
-};
-
-::vtkImageData* vtk_image_sharing_same_data_pointer(Image_3& image)
-{
-  vtkImageData* vtk_image = vtkImageData::New();
-  vtkDataArray* data_array = 0;
-  vtkIdType type = 0;
-
-  _image* image_ptr = image.image();
-
-  CGAL_IMAGE_IO_CASE
-    (image_ptr,
-     type = VTK_type_generator<Word>::type;
-     typedef VTK_type_generator<Word>::ArrayType VTKArray;
-     VTKArray* array = VTKArray::New();
-     array->SetArray(static_cast<Word*>(image.data()), image.size(), 1);
-     data_array = array;
-     );
-
-  vtk_image->SetDimensions(image.xdim(),
-                           image.ydim(),
-                           image.zdim());
-  vtk_image->SetWholeExtent(0, image.xdim(),
-                            0, image.ydim(),
-                            0, image.zdim());
-  vtk_image->SetSpacing(image.vx(),
-                        image.vy(),
-                        image.vz());
-  vtk_image->SetScalarType(type);
-  vtk_image->GetPointData()->SetScalars(data_array);
-  return vtk_image;
-} // end vtk_image_sharing_same_data_pointer
-
-} //end namespace CGAL
-
-#endif // CGAL_USE_VTK
-
-
-#endif // CGAL_IMAGE_3_VTK_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Implicit_mesh_domain_3.h b/3rdparty/CGAL-4.6/include/CGAL/Implicit_mesh_domain_3.h
deleted file mode 100644
index 5adbe5b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Implicit_mesh_domain_3.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-// class Implicit_mesh_domain_3. See class description.
-//******************************************************************************
-
-#ifndef CGAL_IMPLICIT_MESH_DOMAIN_3_H
-#define CGAL_IMPLICIT_MESH_DOMAIN_3_H
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored
-#endif
-
-#include <CGAL/Labeled_mesh_domain_3.h>
-#include <CGAL/Implicit_to_labeling_function_wrapper.h>
-#include <CGAL/Random.h>
-
-namespace CGAL {
-
-
-/**
- * @class Implicit_mesh_domain_3
- *
- * Implements mesh_traits for a domain defined as the negative values of
- * an implicit function.
- */
-template<class Function,
-  class BGT,
-  class Wrapper = Implicit_to_labeling_function_wrapper<Function,BGT> >
-class Implicit_mesh_domain_3
- : public Labeled_mesh_domain_3<Wrapper, BGT >
-{
-public:
-  /// Base type
-  typedef Labeled_mesh_domain_3<Wrapper, BGT> Base;
-
-  /// Public types
-  typedef typename Base::Sphere_3 Sphere_3;
-  typedef typename Base::FT FT;
-  typedef BGT Geom_traits;
-
-  /**
-   * Constructor
-   * @param f the function which negative values defines the domain
-   * @param bounding_sphere a bounding sphere of the domain
-   * @param error_bound the error bound relative to the sphere radius
-   */
-  Implicit_mesh_domain_3(const Function& f,
-                         const Sphere_3& bounding_sphere,
-                         const FT& error_bound = FT(1e-6),
-                         CGAL::Random* p_rng = NULL)
-    : Base(Wrapper(f), bounding_sphere, error_bound, p_rng)  {}
-
-  /// Destructor
-  virtual ~Implicit_mesh_domain_3() {}
-
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Implicit_mesh_domain_3<Function,BGT> Self;
-  Implicit_mesh_domain_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Implicit_mesh_domain_3
-
-
-}  // end namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_IMPLICIT_MESH_DOMAIN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Implicit_to_labeling_function_wrapper.h b/3rdparty/CGAL-4.6/include/CGAL/Implicit_to_labeling_function_wrapper.h
deleted file mode 100644
index fe93dde..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Implicit_to_labeling_function_wrapper.h
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb, Aymeric PELLE
-//
-//******************************************************************************
-// File Description :
-// Implicit_to_labeling_function_wrapper and
-// Implicit_vector_to_labeling_function_wrapper class declaration
-// and implementation.
-//
-// See classes description to have more information.
-//******************************************************************************
-
-#ifndef CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
-#define CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored
-#endif
-
-#include <boost/dynamic_bitset.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-
-#include <CGAL/config.h>
-#include <CGAL/assertions.h>
-
-namespace CGAL {
-
-/**
- * @class Implicit_to_labeling_function_wrapper
- *
- * This class is designed to wrap an implicit function which describes a domain
- * by [p is inside if f(p)<0] to a function which takes its values into {0,1}.
- * f(p)=0 means that p is outside the domain.
- */
-template<class Function_, class BGT>
-class Implicit_to_labeling_function_wrapper
-{
-public:
-  // Types
-  typedef int                     return_type;
-  typedef typename BGT::Point_3   Point_3;
-
-  /// Constructor
-  Implicit_to_labeling_function_wrapper(const Function_& f)
-    : r_f_(f) {}
-
-  // Default copy constructor and assignment operator are ok
-
-  /// Destructor
-  ~Implicit_to_labeling_function_wrapper() {}
-
-  /// Operator ()
-  return_type operator()(const Point_3& p, const bool = true) const
-  {
-    return ( (r_f_(p)<0) ? 1 : 0 );
-  }
-
-private:
-  /// Function to wrap
-  const Function_& r_f_;
-
-};  // end class Implicit_to_labeling_function_wrapper
-
-
-
-/**
- * \deprecated
- *
- * @class Implicit_vector_to_labeling_function_wrapper
- *
- * Wraps a set of implicit function [f1,f2,...] to one function F which
- * takes its values into N.
- *
- * Let p be a point.
- * F(p) = 0b000000(f2(p)<0)(f1(p)<0)
- *
- * It can handle at most 8 functions.
- */
-template<class Function_, class BGT>
-class Implicit_vector_to_labeling_function_wrapper
-{
-public:
-  // Types
-  typedef int                       return_type;
-  typedef std::vector<Function_*>   Function_vector;
-  typedef typename BGT::Point_3     Point_3;
-
-  /// Constructor
-  Implicit_vector_to_labeling_function_wrapper(const std::vector<Function_*>& v)
-    : function_vector_(v) {}
-
-  // Default copy constructor and assignment operator are ok
-
-  /// Destructor
-  ~Implicit_vector_to_labeling_function_wrapper() {}
-
-  /// Operator ()
-  return_type operator()(const Point_3& p, const bool = true) const
-  {
-    int nb_func = function_vector_.size();
-    if ( nb_func > 8 )
-    {
-      CGAL_error_msg("We support at most 8 functions !");
-    }
-
-    char bits = 0;
-    for ( int i = 0 ; i < nb_func ; ++i )
-    {
-      // Insert value into bits : we compute fi(p) and insert result at
-      // bit i of bits
-      bits |= ( ((*function_vector_[i])(p) < 0) << i );
-    }
-
-    return ( static_cast<return_type>(bits) );
-  }
-
-private:
-  /// Functions to wrap
-  const Function_vector function_vector_;
-
-};  // end class Implicit_to_labeling_function_wrapper
-
-template <class ImplicitFunction>
-class Implicit_multi_domain_to_labeling_function_wrapper
-{
-  template <class T_>
-  class Implicit_function_traits
-  {
-  public:
-    typedef typename T_::Point Point;
-  };
-
-  template <class RT_, class Point_>
-  class Implicit_function_traits<RT_ (*)(Point_)>
-  {
-  public:
-    typedef typename boost::remove_reference<
-            typename boost::remove_cv< Point_ >::type>::type Point;
-  };
-
-public:
-  typedef int                     return_type;
-  typedef ImplicitFunction        Function;
-  typedef typename Implicit_function_traits<ImplicitFunction>::Point   Point_3;
-  typedef std::vector<Function>   Function_vector;
-
-private:
-  std::vector<Function> funcs;
-  typedef boost::dynamic_bitset<std::size_t> Bmask;
-  std::vector<Bmask> bmasks;
-
-public:
-  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::vector<Sign> >& vps)
-  : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
-  {
-    assert(funcs.size());
-
-    std::size_t mask_index = 0;
-    for (std::vector<std::vector<Sign> >::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end();
-         mask_iter != mask_end_iter;
-         ++mask_iter)
-    {
-      const std::vector<Sign>& mask = *mask_iter;
-      assert(funcs.size() == mask.size());
-      Bmask& bmask = bmasks[mask_index++];
-
-      typename Bmask::size_type bit_index = 0;
-      for (std::vector<Sign>::const_iterator iter = mask.begin(), endIter = mask.end(); iter != endIter; ++iter)
-      {
-        std::string::value_type character = *iter;
-        assert(character == POSITIVE || character == NEGATIVE);
-
-        bmask[bit_index] = (character == POSITIVE);
-        ++bit_index;
-        bmask[bit_index] = (character == NEGATIVE);
-        ++bit_index;
-      }
-    }
-    std::sort(bmasks.begin(), bmasks.end());
-  }
-
-  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf)
-  : funcs(vf)
-  {
-    assert(funcs.size());
-
-    bmasks.reserve((1 << funcs.size()) - 1);
-    bmasks.push_back(Bmask(std::string("10")));
-    bmasks.push_back(Bmask(std::string("01")));
-
-    for (std::size_t i = 0; i < funcs.size()-1; ++i)
-    {
-      std::size_t c_size = bmasks.size();
-      for (std::size_t index = 0; index < c_size; ++index)
-      {
-        Bmask aux = bmasks[index];
-        aux.push_back(true);
-        aux.push_back(false);
-        bmasks.push_back(aux);
-        bmasks[index].push_back(false);
-        bmasks[index].push_back(true);
-      }
-    }
-    bmasks.pop_back();
-    std::sort(bmasks.begin(), bmasks.end());
-  }
-
-  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::string>& vps)
-  : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
-  {
-    assert(funcs.size());
-
-    std::size_t mask_index = 0;
-    for (std::vector<std::string>::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end();
-         mask_iter != mask_end_iter;
-         ++mask_iter)
-    {
-      const std::string& mask_str = *mask_iter;
-      assert(funcs.size() == mask_str.length());
-      Bmask& bmask = bmasks[mask_index++];
-
-      typename Bmask::size_type bit_index = 0;
-      for (std::string::const_iterator iter = mask_str.begin(), endIter = mask_str.end(); iter != endIter; ++iter)
-      {
-        std::string::value_type character = *iter;
-        assert(character == '+' || character == '-');
-
-        bmask[bit_index] = (character == '+');
-        ++bit_index;
-        bmask[bit_index] = (character == '-');
-        ++bit_index;
-      }
-    }
-    std::sort(bmasks.begin(), bmasks.end());
-  }
-
-  return_type operator() (const Point_3& p, const bool = true) const
-  {
-    Bmask bmask(funcs.size() * 2, false);
-
-    std::size_t i = 0;
-    for (typename std::vector<Function>::const_iterator iter = funcs.begin(), endIter = funcs.end();
-         iter != endIter;
-         ++iter)
-    {
-      const Function& function = *iter;
-
-      double fres = function(p);
-      bmask[i] = fres > 0;
-      ++i;
-      bmask[i] = fres < 0;
-      ++i;
-    }
-
-    std::vector<Bmask>::const_iterator iter = std::lower_bound(bmasks.begin(), bmasks.end(), bmask);
-    if (iter != bmasks.end() && *iter == bmask)
-      return static_cast<return_type>(1 + (iter - bmasks.begin()));
-    return 0;
-  }
-};
-
-}  // end namespace CGAL
-
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/In_place_list.h b/3rdparty/CGAL-4.6/include/CGAL/In_place_list.h
deleted file mode 100644
index e0e5458..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/In_place_list.h
+++ /dev/null
@@ -1,755 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-//                 Sylvain Pion
-
-#ifndef CGAL_IN_PLACE_LIST_H
-#define CGAL_IN_PLACE_LIST_H 1
-
-#include <CGAL/basic.h>
-#include <cstddef>
-#include <iterator>
-#include <functional>
-#include <algorithm>
-#include <CGAL/memory.h>
-
-namespace CGAL {
-
-// Forward declarations
-namespace internal {
-  template <class T, class Alloc> class In_place_list_iterator;
-  template <class T, class Alloc> class In_place_list_const_iterator;
-}
-
-template <class T, bool managed, class Alloc = CGAL_ALLOCATOR(T)>
-class In_place_list;
-
-template < class T >
-class In_place_sl_list_base {
-public:
-  T* next_link;        // forward pointer
-};
-
-template < class T >
-class In_place_list_base {
-public:
-  T* next_link;        // forward pointer
-  T* prev_link;        // backwards pointer
-  //friend  class internal::In_place_list_iterator<T, Alloc>;
-  //friend  class internal::In_place_list_const_iterator<T, Alloc>;
-  //friend  class In_place_list<T,false, Alloc>;
-  //friend  class In_place_list<T,true, Alloc>;
-};
-
-
-namespace internal {
-  template <class T, class Alloc>
-  class In_place_list_iterator {
-  protected:
-    T* node;
-  public:
-    friend  class In_place_list<T,false, Alloc>;
-    friend  class In_place_list<T,true, Alloc>;
-
-    typedef In_place_list_iterator<T, Alloc>  Self;
-    typedef In_place_list_base<T>      Base;
-
-    typedef T               value_type;
-    typedef T*              pointer;
-    typedef T&              reference;
-    typedef std::size_t     size_type;
-    typedef std::ptrdiff_t  difference_type;
-    typedef std::bidirectional_iterator_tag   iterator_category;
-
-    In_place_list_iterator() : node(0) {}
-    In_place_list_iterator(T* x) : node(x) {}
-
-    bool  operator==( const Self& x) const { return node == x.node; }
-    bool  operator!=( const Self& x) const { return node != x.node; }
-    bool  operator< ( const Self& x) const { return node< x.node;   }
-    bool  operator<=( const Self& x) const { return node<= x.node;  }
-    bool  operator> ( const Self& x) const { return node> x.node;   }
-    bool  operator>=( const Self& x) const { return node>= x.node;  }
-    T&    operator*()  const { return *node; }
-    T*    operator->() const { return  node; }
-    Self& operator++() {
-      node = ((Base*)(node))->next_link;
-      return *this;
-    }
-    Self  operator++(int) {
-      Self tmp = *this;
-      ++*this;
-      return tmp;
-    }
-    Self& operator--() {
-      node = ((Base*)(node))->prev_link;
-      return *this;
-    }
-    Self  operator--(int) {
-      Self tmp = *this;
-      --*this;
-      return tmp;
-    }
-  };
-}
-
-namespace internal {
-  template <class T, class Alloc>
-  class In_place_list_const_iterator {
-  protected:
-    const T* node;  // It's not Ptr. Otherwise traversal won't work.
-  public:
-    friend  class In_place_list<T,false, Alloc>;
-    friend  class In_place_list<T,true, Alloc>;
-
-    typedef In_place_list_const_iterator<T, Alloc> Self;
-    typedef In_place_list_iterator<T, Alloc>       Iterator;
-    typedef In_place_list_base<T>           Base;
-
-    typedef T               value_type;
-    typedef const T*        pointer;
-    typedef const T&        reference;
-    typedef std::size_t     size_type;
-    typedef std::ptrdiff_t  difference_type;
-    typedef std::bidirectional_iterator_tag   iterator_category;
-
-    In_place_list_const_iterator() : node(0) {}
-    In_place_list_const_iterator( Iterator i) : node(&*i) {}
-    In_place_list_const_iterator(const T* x) : node(x) {}
-
-    bool     operator==( const Self& x) const { return node == x.node; }
-    bool     operator!=( const Self& x) const { return node != x.node; }
-    bool     operator< ( const Self& x) const { return node< x.node;   }
-    bool     operator<=( const Self& x) const { return node<= x.node;  }
-    bool     operator> ( const Self& x) const { return node> x.node;   }
-    bool     operator>=( const Self& x) const { return node>= x.node;  }
-    const T& operator*()  const { return *node; }
-    const T* operator->() const { return  node; }
-    Self& operator++() {
-      node = ((const Base*)(node))->next_link;
-      return *this;
-    }
-    Self  operator++(int) {
-      Self tmp = *this;
-      ++*this;
-      return tmp;
-    }
-    Self& operator--() {
-      node = ((const Base*)(node))->prev_link;
-      return *this;
-    }
-    Self  operator--(int) {
-      Self tmp = *this;
-      --*this;
-      return tmp;
-    }
-    In_place_list_iterator<T,Alloc>
-    remove_const() const
-    {
-      return In_place_list_iterator<T,Alloc>(const_cast<T*>(node));
-    }
-  };
-}
-
-
-template <class T, bool managed, class Alloc>
-class In_place_list {
-
-  // Bidirectional List Managing Objects in Place
-  // --------------------------------------------
-  //
-  // DEFINITION An object of the class In_place_list<T,bool> is a
-  // sequence that supports bidirectional iterators and allows constant time
-  // insert and erase operations anywhere within the sequence. The
-  // functionality is similar to the `list<T>' in the STL.
-  //
-  // The In_place_list<T,bool> manages element items in place. Two
-  // pointers `T*' are expected in the class. For example the base class
-  // `In_place_list_base<T>' can be used.
-  //
-  // The In_place_list<T,bool> does not copy element items during
-  // insertion (unless otherwise stated for a function). On removal or
-  // destruction of the list the element items are not deleted by default.
-  // The second template parameter `bool' has to be set to `false' in this
-  // case. If the In_place_list<T,bool> should take the responsibility
-  // for the stored objects the `bool' parameter could be set to `true', in
-  // which case the list will delete removed items and will delete all
-  // remaining items on destruction. In any case, the `destroy()' member
-  // function deletes all elements.
-  //
-  // On purpose, these two possible versions of In_place_list<T,bool>
-  // are not assignment compatible to avoid confusions between the different
-  // storage responsibilities.
-  //
-  // PARAMETERS
-  //
-  // The full classname is `In_place_list<T,bool managed = false, Alloc
-  // = CGAL_ALLOCATOR(T)>'.
-  //
-  // TYPES
-
-public:
-  typedef Alloc           Allocator;
-  typedef Alloc           allocator_type; // STL compliant
-
-  // Note: the standard requires the following types to be equivalent
-  // to T, T*, const T*, T&, const T&, size_t, and ptrdiff_t, respectively.
-  // So we don't pass these types to the iterators explicitly.
-  typedef typename Allocator::value_type          value_type;
-  typedef typename Allocator::pointer             pointer;
-  typedef typename Allocator::const_pointer       const_pointer;
-  typedef typename Allocator::reference           reference;
-  typedef typename Allocator::const_reference     const_reference;
-  typedef typename Allocator::size_type           size_type;
-  typedef typename Allocator::difference_type     difference_type;
-
-  typedef internal::In_place_list_iterator<T, Alloc> iterator;
-  typedef internal::In_place_list_const_iterator<T, Alloc> const_iterator;
-
-  typedef std::reverse_iterator<iterator>         reverse_iterator;
-  typedef std::reverse_iterator<const_iterator>   const_reverse_iterator;
-
-  typedef In_place_list<T,managed,Alloc>          Self;
-
-protected:
-  Allocator allocator;
-
-  pointer      node;
-  size_type    length;
-
-  // These are the only places where the allocator gets called.
-  pointer get_node() {
-    pointer p = allocator.allocate(1);
-#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
-    allocator.construct(p, value_type());
-#else
-    new (p) value_type;
-#endif
-    return p;
-  }
-  pointer get_node( const T& t) {
-    pointer p = allocator.allocate(1);
-#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
-    allocator.construct(p, t);
-#else
-    new (p) value_type(t);
-#endif
-    return p;
-  }
-  void put_node( pointer p) {
-#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY  
-    allocator.destroy( p);
-#else 
-   p->~value_type();
-#endif
-    allocator.deallocate( p, 1);
-  }
-
-public:
-  // CREATION
-  //
-  // New creation variable is: `l'
-
-  explicit In_place_list() : length(0) {
-    // introduces an empty list.
-    node = get_node();
-    (*node).next_link = node;
-    (*node).prev_link = node;
-  }
-  void swap(Self& x) {
-    std::swap(node, x.node);
-    std::swap(length, x.length);
-  }
-
-  // ACCESS MEMBER FUNCTIONS
-
-  allocator_type get_allocator() const { return allocator; }
-
-  iterator       begin() { return (*node).next_link; }
-  const_iterator begin() const { return (*node).next_link; }
-  iterator       end() { return node; }
-  const_iterator end() const { return node; }
-
-  reverse_iterator       rbegin() { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const {
-    return const_reverse_iterator(end());
-  }
-  reverse_iterator       rend() { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const {
-    return const_reverse_iterator(begin());
-  }
-
-  bool            empty() const    { return length == 0; }
-  size_type       size() const     { return length; }
-  size_type       max_size() const { return size_type(-1); }
-
-  reference       front()          { return *begin(); }
-  const_reference front() const    { return *begin(); }
-  reference       back()           { return *(--end()); }
-  const_reference back() const     { return *(--end()); }
-
-  // INSERTION
-
-  iterator insert(iterator position, T& x) {
-    // inserts `t' in front of iterator `pos'. The return value points
-    // to the inserted item.
-    x.next_link = position.node;
-    x.prev_link = (*position.node).prev_link;
-    (*((*position.node).prev_link)).next_link = &x;
-    (*position.node).prev_link = &x;
-    ++length;
-    return &x;
-  }
-  iterator insert(T* pos, T& x) {
-    return insert( iterator(pos), x);
-  }
-  void push_front(T& x) { insert(begin(), x); }
-  // inserts an item in front of list `l'.
-
-  void push_back(T& x)  { insert(end(), x); }
-  // inserts an item at the back of list `l'.
-
-  void insert(iterator position, size_type n);
-  // inserts n copies of `T()' in front of iterator `pos'.
-
-  void insert(iterator position, size_type n, const T& x);
-  // inserts n copies of `t' in front of iterator `pos'.
-
-  void insert( T* pos, size_type n) { insert( iterator(pos), n); }
-  void insert( T* pos, size_type n, const T& x) {
-    insert( iterator(pos), n, x);
-  }
-
-  template <class InputIterator>
-  void insert(iterator pos, InputIterator first, InputIterator last) {
-    // inserts the range [`first, last') in front of iterator `pos'.
-    while (first != last)
-      insert(pos, *get_node(*first++));
-  }
-
-  template <class InputIterator>
-  void insert(T* pos, InputIterator first, InputIterator last) {
-    // inserts the range [`first, last') in front of iterator `pos'.
-    while (first != last)
-      insert(pos, *get_node(*first++));
-  }
-
-  void insert(T* pos, const T* first, const T* last) {
-    insert( iterator(pos), const_iterator(first),
-            const_iterator(last));
-  }
-
-
-  // REMOVAL
-
-  void erase(iterator i) {
-    // removes the item from list `l', where `pos' refers to.
-    CGAL_assertion( length > 0);
-    (*((*i.node).prev_link)).next_link = (*i.node).next_link;
-    (*((*i.node).next_link)).prev_link = (*i.node).prev_link;
-    if (managed)
-      put_node(i.node);
-    --length;
-  }
-  void erase(T* pos)  { erase( iterator( pos)); }
-
-  void pop_front() { erase(begin()); }
-  // removes the first item from list `l'.
-
-  void pop_back() {
-    // removes the last item from list `l'.
-    iterator tmp = end();
-    erase(--tmp);
-  }
-
-  void erase(iterator first, iterator last);
-  // removes the items in the range [`first, last') from list `l'.
-
-  void erase(T* first, T* last) {
-    erase( iterator(first), iterator(last));
-  }
-
-  void clear() { erase( begin(), end()); }
-
-  // CREATION (Continued)
-
-  explicit In_place_list(size_type n, const T& value = T()) : length(0) {
-    // introduces a list with n items, all initialized with copies of
-    // value.
-    node = get_node();
-    (*node).next_link = node;
-    (*node).prev_link = node;
-    insert(begin(), n, value);
-  }
-
-  template <class InputIterator>
-  In_place_list( InputIterator first, InputIterator last) : length(0) {
-    // a list with copies from the range [`first,last').
-    node = get_node();
-    (*node).next_link = node;
-    (*node).prev_link = node;
-    insert( begin(), first, last);
-  }
-
-  In_place_list(const T* first, const T* last) : length(0) {
-    // a list with copies from the range [`first,last').
-    node = get_node();
-    (*node).next_link = node;
-    (*node).prev_link = node;
-    insert(begin(), first, last);
-  }
-  In_place_list(const Self& x) : length(0) {
-    // copy constructor. Each item in `l1' is copied.
-    node = get_node();
-    (*node).next_link = node;
-    (*node).prev_link = node;
-    insert(begin(), x.begin(), x.end());
-  }
-  ~In_place_list() {
-    erase(begin(), end());
-    put_node(node);
-  }
-
-  Self& operator=(const Self& x);
-
-  void destroy();
-
-  template <class InputIterator>
-  void assign( InputIterator first, InputIterator last) {
-    erase( begin(), end());
-    insert( begin(), first, last);
-  }
-
-  void assign( size_type n, const T& t) {
-    erase( begin(), end());
-    insert( begin(), n, t);
-  }
-
-  void resize( size_type sz, const T& c = T()) {
-    if ( sz > size())
-      insert( end(), sz - size(), c);
-    else if ( sz < size()) {
-      iterator i = begin();
-      while ( sz-- > 0)
-        ++i;
-      erase( i, end());
-    }  // else do nothing
-  }
-
-  // COMPARISON OPERATIONS
-
-  bool operator==( const Self& y) const {
-    return size() == y.size() && std::equal(begin(), end(), y.begin());
-  }
-
-  bool operator!=( const Self& y) const {
-    return size() != y.size() || ! std::equal(begin(),end(),y.begin());
-  }
-
-  bool operator<(const Self& y) const {
-    return std::lexicographical_compare( begin(),end(),
-                                         y.begin(),y.end());
-  }
-  bool operator> ( const Self& i) const { return i < *this; }
-  bool operator<=( const Self& i) const { return !(i < *this); }
-  bool operator>=( const Self& i) const { return !(*this < i); }
-
-  // SPECIAL LIST OPERATIONS
-
-protected:
-  void transfer(iterator position, iterator first, iterator last) {
-    // move the range [`first, last') before the position.
-    (*((*last.node).prev_link)).next_link = position.node;
-    (*((*first.node).prev_link)).next_link = last.node;
-    (*((*position.node).prev_link)).next_link = first.node;
-    T* tmp = (*position.node).prev_link;
-    (*position.node).prev_link = (*last.node).prev_link;
-    (*last.node).prev_link = (*first.node).prev_link;
-    (*first.node).prev_link = tmp;
-  }
-
-public:
-  void splice(iterator position, Self& x) {
-    // inserts the list x before position `pos' and x becomes empty.
-    // It takes constant time. Precondition: `&l != &x'.
-    if (!x.empty()) {
-      transfer(position, x.begin(), x.end());
-      length += x.length;
-      x.length = 0;
-    }
-  }
-  void splice(T* position, Self& x) {
-    splice( iterator(position), x);
-  }
-  void splice( iterator position, Self& x, iterator i) {
-    // inserts an element pointed to by i from list x before position
-    // `pos' and removes the element from x. It takes constant time. i
-    // is a valid dereferenceable iterator of x. The result is
-    // unchanged if `pos == i' or `pos == ++i'.
-    iterator j = i;
-    if (position == i || position == ++j) return;
-    transfer(position, i, j);
-    ++length;
-    --x.length;
-  }
-  void splice(T* position, Self& x, T* i) {
-    splice( iterator(position), x, iterator(i));
-  }
-  void splice(iterator pos, Self& x, iterator first, iterator last) {
-    // inserts elements in the range [`first, last') before position
-    // `pos' and removes the elements from x. It takes constant time
-    // if `&x == $l'; otherwise, it takes linear time. [`first,
-    // last') is a valid range in x. Precondition: `pos' is not in the
-    // range [`first, last').
-    if (first != last) {
-      if (&x != this) {
-        difference_type n = std::distance(first, last);
-        x.length -= n;
-        length += n;
-      }
-      transfer(pos, first, last);
-    }
-  }
-  void splice(T* p, Self& x, T* first, T* last) {
-    splice( iterator(p), x, iterator(first), iterator(last));
-  }
-
-  void remove(const T& value);
-  // erases all elements e in the list l for which `e == value'.
-  // It is stable. Precondition: a suitable `operator==' for the
-  // type T.
-
-  void reverse();
-  // reverses the order of the elements in `l' in linear time.
-
-  void unique();
-  // erases all but the first element from every consecutive group
-  // of equal elements in the list `l'. Precondition: a suitable
-  // `operator==' for the type T.
-
-  void merge(Self& x);
-  // merges the list x into the list `l' and x becomes empty. It is
-  // stable. Precondition: Both lists are increasingly sorted. A
-  // suitable `operator<' for the type T.
-
-  template < class StrictWeakOrdering >
-  void merge(Self& x, StrictWeakOrdering ord)
-  // merges the list x into the list `l' and x becomes empty.
-  // It is stable.
-  // Precondition: Both lists are increasingly sorted wrt. ord.
-  {
-    iterator first1 = begin();
-    iterator last1 = end();
-    iterator first2 = x.begin();
-    iterator last2 = x.end();
-    while (first1 != last1 && first2 != last2)
-      if (ord(*first2, *first1)) {
-        iterator next = first2;
-        transfer(first1, first2, ++next);
-        first2 = next;
-      } else
-        ++first1;
-    if (first2 != last2)
-      transfer(last1, first2, last2);
-    length += x.length;
-    x.length= 0;
-  }
-
-  void sort();
-  // sorts the list `l' according to the `operator<' in time O(n
-  // log n) where `n = size()'. It is stable. Precondition: a
-  // suitable `operator<' for the type T.
-
-  template < class StrictWeakOrdering >
-  void sort(StrictWeakOrdering ord)
-  // sorts the list `l' according to ord in time O(n log n)
-  // where `n = size()'. It is stable.
-  {
-    if (size() < 2) return;
-    In_place_list<T,managed,Alloc> carry;
-    In_place_list<T,managed,Alloc> counter[64];
-    int fill = 0;
-    while (!empty()) {
-      carry.splice(carry.begin(), *this, begin());
-      int i = 0;
-      while(i < fill && !counter[i].empty()) {
-        counter[i].merge(carry, ord);
-        carry.swap(counter[i++]);
-      }
-      carry.swap(counter[i]);
-      if (i == fill)
-        ++fill;
-    }
-    for (int i = 1; i < fill; ++i)
-      counter[i].merge(counter[i-1], ord);
-    swap(counter[fill-1]);
-  }
-
-};
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::
-insert(internal::In_place_list_iterator<T, Alloc> position, size_type n) {
-  while (n--)
-    insert(position, *get_node());
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::
-insert(internal::In_place_list_iterator<T, Alloc> position, size_type n, const T& x) {
-  while (n--)
-    insert(position, *get_node(x));
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::
-erase(internal::In_place_list_iterator<T, Alloc> first,
-      internal::In_place_list_iterator<T, Alloc> last)
-{
-  while (first != last)
-    erase(first++);
-}
-
-template <class T, bool managed, class Alloc>
-In_place_list<T,managed,Alloc>&
-In_place_list<T,managed,Alloc>::
-operator=(const In_place_list<T,managed,Alloc>& x) {
-  if (this != &x) {
-    iterator first1 = begin();
-    iterator last1  = end();
-    const_iterator first2 = x.begin();
-    const_iterator last2  = x.end();
-    while (first1 != last1 && first2 != last2) {
-      // Save the pointer values before assignment.
-      // Assignment avoids unneccassary delete's and new's.
-      T* tmp1 = (*first1).next_link;
-      T* tmp2 = (*first1).prev_link;
-      *first1 = *first2++;
-      (*first1).next_link = tmp1;
-      (*first1).prev_link = tmp2;
-      ++first1;
-    }
-    if (first2 == last2)
-      erase(first1, last1);
-    else
-      insert(last1, first2, last2);
-  }
-  return *this;
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::
-destroy() {
-  iterator first = begin();
-  iterator last  = end();
-  while( first != last) {
-    iterator i = first++;
-    put_node(i.node);
-  }
-  length = 0;
-  (*node).next_link = node;
-  (*node).prev_link = node;
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::remove(const T& value) {
-  iterator first = begin();
-  iterator last = end();
-  while (first != last) {
-    iterator next = first;
-    ++next;
-    if (*first == value)
-      erase(first);
-    first = next;
-  }
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::reverse() {
-  if (size() < 2) return;
-  for (iterator first = ++begin(); first != end();) {
-    iterator old = first++;
-    transfer(begin(), old, first);
-  }
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::unique() {
-  iterator first = begin();
-  iterator last = end();
-  if (first == last) return;
-  iterator next = first;
-  while (++next != last) {
-    if (*first == *next)
-      erase(next);
-    else
-      first = next;
-    next = first;
-  }
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::merge(In_place_list<T,managed,Alloc>& x) {
-  iterator first1 = begin();
-  iterator last1 = end();
-  iterator first2 = x.begin();
-  iterator last2 = x.end();
-  while (first1 != last1 && first2 != last2)
-    if (*first2 < *first1) {
-      iterator next = first2;
-      transfer(first1, first2, ++next);
-      first2 = next;
-    } else
-      ++first1;
-  if (first2 != last2)
-    transfer(last1, first2, last2);
-  length += x.length;
-  x.length= 0;
-}
-
-template <class T, bool managed, class Alloc>
-void In_place_list<T,managed,Alloc>::sort() {
-  if (size() < 2) return;
-  In_place_list<T,managed,Alloc> carry;
-  In_place_list<T,managed,Alloc> counter[64];
-  int fill = 0;
-  while (!empty()) {
-    carry.splice(carry.begin(), *this, begin());
-    int i = 0;
-    while(i < fill && !counter[i].empty()) {
-      counter[i].merge(carry);
-      carry.swap(counter[i++]);
-    }
-    carry.swap(counter[i]);
-    if (i == fill)
-      ++fill;
-  }
-  for (int i = 1; i < fill; ++i)
-    counter[i].merge(counter[i-1]);
-  swap(counter[fill-1]);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_IN_PLACE_LIST_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Incremental_neighbor_search.h b/3rdparty/CGAL-4.6/include/CGAL/Incremental_neighbor_search.h
deleted file mode 100644
index 18deaec..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Incremental_neighbor_search.h
+++ /dev/null
@@ -1,547 +0,0 @@
-// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
-
-#ifndef CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
-#define CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
-
-#include <cstring>
-#include <list>
-#include <queue>
-#include <memory>
-#include <CGAL/Kd_tree_node.h>
-#include <CGAL/Kd_tree_rectangle.h>
-#include <CGAL/Euclidean_distance.h>
-
-namespace CGAL {
-
-  template <class SearchTraits, 
-            class Distance_=typename internal::Spatial_searching_default_distance<SearchTraits>::type,
-            class Splitter_ = Sliding_midpoint<SearchTraits>,
-            class Tree_=Kd_tree<SearchTraits, Splitter_, Tag_false> >
-  class Incremental_neighbor_search { 
-
-  public:
-
-    typedef Distance_ Distance;
-    typedef Tree_     Tree;
-    typedef typename SearchTraits::Point_d Point_d;
-    typedef typename SearchTraits::FT FT;
-    typedef typename SearchTraits::Dimension Dimension;
-    typedef typename Tree::Point_d_iterator Point_d_iterator;
-    typedef typename Tree::Node_const_handle Node_const_handle;
-    typedef typename Tree::Splitter Splitter;
-    typedef Kd_tree_rectangle<FT,Dimension> Node_box;
-    typedef typename Distance::Query_item Query_item;
-
-    class Cell {
-
-    private:
-
-      Node_box* the_box;
-      Node_const_handle the_node;
-
-    public:
-
-      // constructor
-      Cell (Node_box* Nb, Node_const_handle N)
-      :the_box(Nb), the_node(N)
-      {}
-
-      Node_box* 
-      box() 
-      {
-	return the_box;
-      }
-
-      Node_const_handle    
-      node() 
-      {
-	return the_node;
-      }
-    };
-    
-    
-
-    typedef std::pair<Point_d,FT> Point_with_transformed_distance;
-    typedef std::pair<Cell*,FT> Cell_with_distance;
-
-    class iterator;
-
-    typedef std::vector<Cell_with_distance*> Cell_with_distance_vector;
-    typedef std::vector<Point_with_transformed_distance*> Point_with_distance_vector;
-    typedef std::vector<FT> Distance_vector;
-
-    //data members
-    const Tree& m_tree;
-    Query_item m_query;
-    Distance m_dist;
-    FT m_Eps; 
-    bool m_search_nearest;    
-
-  public:
-
-    // constructor
-    Incremental_neighbor_search(const Tree& tree, const Query_item& q,
-				FT Eps=FT(0.0), bool search_nearest=true, 
-				const Distance& tr=Distance()): 
-          m_tree(tree),m_query(q),m_dist(tr),m_Eps(Eps),m_search_nearest(search_nearest)
-    {}
-
-    iterator 
-    begin() const
-    {
-      return iterator(m_tree,m_query,m_dist,m_Eps,m_search_nearest);
-    }
-
-    iterator 
-    end() const
-    {
-      return iterator();
-    }
-
-    std::ostream&  
-    statistics(std::ostream& s) 
-    {
-      begin()->statistics(s);
-      return s;
-    }
-
-
-    template<class T>
-    struct Object_wrapper
-    {
-      T object;
-      Object_wrapper(const T& t):object(t){}
-      const T& operator* () const { return object; }
-      const T* operator-> () const { return &object; }
-    };    
-
-
-    class iterator {
-
-    public:
-
-      typedef std::input_iterator_tag iterator_category;
-      typedef Point_with_transformed_distance       value_type;
-      typedef Point_with_transformed_distance*      pointer;
-      typedef const Point_with_transformed_distance&      reference;
-      typedef std::size_t               size_type;
-      typedef std::ptrdiff_t            difference_type;
-      typedef int distance_type;
-    
-    
-      class Iterator_implementation;
-      Iterator_implementation *ptr;
-
-
-      // default constructor
-      iterator() 
-	: ptr(0)
-      {}
-
-      int 
-      the_number_of_items_visited() 
-      {
-        return ptr->number_of_items_visited;
-      }
-
-      // constructor
-      iterator(const Tree& tree, const Query_item& q, const Distance& tr, FT eps, 
-	       bool search_nearest)
-        : ptr(new Iterator_implementation(tree, q, tr, eps, search_nearest))
-      {}
-      
-      // copy constructor
-      iterator(const iterator& Iter)
-	: ptr(Iter.ptr)
-      {
-	if (ptr != 0) ptr->reference_count++;
-      }
-      
-      iterator& operator=(const iterator& Iter)
-      {
-        if (ptr!=Iter.ptr){
-          if (ptr != 0 && --(ptr->reference_count)==0) {
-              delete ptr;
-          }
-          ptr = Iter.ptr;
-          if (ptr != 0) ptr->reference_count++;
-        }
-        return *this;
-      }      
-      
-      const Point_with_transformed_distance& 
-      operator* () const
-      {
-	return *(*ptr);
-      }
-
-      // -> operator
-      const Point_with_transformed_distance*
-      operator-> () const 
-      {
-	return &*(*ptr);
-      }      
-      
-      // prefix operator
-      iterator& operator++() 
-      {
-        ++(*ptr);
-        return *this;
-      }
-
-      // postfix operator
-      Object_wrapper<Point_with_transformed_distance>
-      operator++(int) 
-      {
-	return (*ptr)++;
-      }
-
-      bool 
-      operator==(const iterator& It) const 
-      {
-        if ( ((ptr == 0) || 
-	      ptr->Item_PriorityQueue.empty()) &&
-	     ((It.ptr == 0) ||  
-	      It.ptr->Item_PriorityQueue.empty())
-	     )
-	  return true;
-        // else
-        return (ptr == It.ptr);
-      }
-
-      bool 
-      operator!=(const iterator& It) const
-      {
-        return !(*this == It);
-      }
-
-      std::ostream& 
-      statistics (std::ostream& s) 
-      {
-    	ptr->statistics(s);
-        return s;
-      }
-
-      ~iterator() 
-      {
-        if (ptr != 0) {
-	  ptr->reference_count--;
-	  if (ptr->reference_count==0) {
-	    delete ptr;
-	    ptr = 0;
-	  }
-        }
-      }
-      
-
-      class Iterator_implementation {
-
-      private:
-
-	FT multiplication_factor;
-
-	Query_item query_point;
-
-	FT distance_to_root;
-
-	bool search_nearest_neighbour;
-
-	FT rd;
-
-
-	class Priority_higher {
-	
-	public:
-
-	  bool search_nearest;
-
-	  Priority_higher(bool search_the_nearest_neighbour)
-	    : search_nearest(search_the_nearest_neighbour) 
-	  {}
-
-	  //highest priority is smallest distance
-	  bool operator() (Cell_with_distance* n1, Cell_with_distance* n2) const 
-	  {
-	    return (search_nearest)? (n1->second > n2->second) : (n2->second > n1->second);
-	  }
-	};
-
-
-	class Distance_smaller {
-
-	public:
-
-	  bool search_nearest;
-
-	  Distance_smaller(bool search_the_nearest_neighbour)
-	    :search_nearest(search_the_nearest_neighbour)
-	  {}
-
-	  //highest priority is smallest distance
-	  bool 
-	  operator() (Point_with_transformed_distance* p1, Point_with_transformed_distance* p2) const 
-	  {
-	    return (search_nearest) ? (p1->second > p2->second) : (p2->second > p1->second);
-	  }
-	};
-
-
-	std::priority_queue<Cell_with_distance*, Cell_with_distance_vector,
-	                    Priority_higher> PriorityQueue;
-      public:
-	std::priority_queue<Point_with_transformed_distance*, Point_with_distance_vector,
-	                    Distance_smaller> Item_PriorityQueue;
-    
-
-	Distance distance;
-
-      public:
-
-	int reference_count;
-
-	int number_of_internal_nodes_visited;
-	int number_of_leaf_nodes_visited;
-	int number_of_items_visited;
-	int number_of_neighbours_computed;
-
-	// constructor
-	Iterator_implementation(const Tree& tree, const Query_item& q,const Distance& tr,
-				FT Eps, bool search_nearest)
-	  : query_point(q), search_nearest_neighbour(search_nearest), 
-	  PriorityQueue(Priority_higher(search_nearest)),
-	  Item_PriorityQueue(Distance_smaller(search_nearest)),
-	  distance(tr), reference_count(1), number_of_internal_nodes_visited(0), 
-	  number_of_leaf_nodes_visited(0), number_of_items_visited(0),
-	  number_of_neighbours_computed(0)
-	{
-          if (tree.empty()) return;
-            
-	  multiplication_factor= distance.transformed_distance(FT(1)+Eps);
-
-	  Node_box *bounding_box = new Node_box((tree.bounding_box()));
-
-	  if (search_nearest) distance_to_root=
-				distance.min_distance_to_rectangle(q,*bounding_box);
-	  else distance_to_root=
-		 distance.max_distance_to_rectangle(q,*bounding_box);
-
-        
-
-	  Cell *Root_Cell = new Cell(bounding_box,tree.root());
-	  Cell_with_distance  *The_Root = 
-	    new Cell_with_distance(Root_Cell,distance_to_root);
-
-	  PriorityQueue.push(The_Root);
-
-	  // rd is the distance of the top of the priority queue to q
-	  rd=The_Root->second;
-	  Compute_the_next_nearest_neighbour();
-	}
-
-	// * operator
-	const Point_with_transformed_distance& 
-	operator* () const
-	{    
-	  return *(Item_PriorityQueue.top());
-	}
-
-	// prefix operator
-	Iterator_implementation& 
-	operator++() 
-	{
-	  Delete_the_current_item_top();
-	  Compute_the_next_nearest_neighbour();
-	  return *this;
-	}
-
-        // postfix operator
-        Object_wrapper<Point_with_transformed_distance>
-        operator++(int) 
-        {
-          Object_wrapper<Point_with_transformed_distance> result( *(Item_PriorityQueue.top()) );
-          ++*this;
-          return result;
-        }	
-
-	// Print statistics of the general priority search process.
-	std::ostream& 
-	statistics (std::ostream& s) const
-	{
-	  s << "General priority search statistics:" << std::endl;
-	  s << "Number of internal nodes visited:" << 
-	    number_of_internal_nodes_visited << std::endl;
-	  s << "Number of leaf nodes visited:" << 
-	    number_of_leaf_nodes_visited << std::endl;
-	  s << "Number of points visited:" << 
-	    number_of_items_visited << std::endl;
-	  s << "Number of neighbours computed:" << 
-	    number_of_neighbours_computed << std::endl;
-	  return s;
-	}
-
-	//destructor
-	~Iterator_implementation() 
-	{
-	  while (! PriorityQueue.empty()) {
-	    Cell_with_distance* The_top=PriorityQueue.top();
-	    PriorityQueue.pop();
-	    delete The_top->first->box();
-	    delete The_top->first;
-	    delete The_top;
-	  }
-	  while (! Item_PriorityQueue.empty()) {
-	    Point_with_transformed_distance* The_top=Item_PriorityQueue.top();
-	    Item_PriorityQueue.pop();
-	    delete The_top;
-	  }
-	}
-
-      private:
-
-	void 
-	Delete_the_current_item_top() 
-	{
-	  Point_with_transformed_distance* The_item_top=Item_PriorityQueue.top();
-	  Item_PriorityQueue.pop();
-	  delete The_item_top;
-	}
-
-	void 
-	Compute_the_next_nearest_neighbour() 
-	{
-	  // compute the next item
-	  bool next_neighbour_found=false;
-	  if (!(Item_PriorityQueue.empty())) {
-	    if (search_nearest_neighbour)
-	      next_neighbour_found =
-		(multiplication_factor*rd > Item_PriorityQueue.top()->second);
-	    else
-	      next_neighbour_found =
-		(rd < multiplication_factor*Item_PriorityQueue.top()->second);
-	  }
-	  while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
-                
-	    Cell_with_distance* The_node_top = PriorityQueue.top();
-	    Node_const_handle N = The_node_top->first->node();
-	    Node_box* B = The_node_top->first->box();
-	    PriorityQueue.pop();
-	    delete The_node_top->first;
-	    delete The_node_top;
-
-	    while (!(N->is_leaf())) {
-              typename Tree::Internal_node_const_handle node =
-                static_cast<typename Tree::Internal_node_const_handle>(N);
-	      number_of_internal_nodes_visited++;
-	      int new_cut_dim = node->cutting_dimension();
-	      FT  new_cut_val = node->cutting_value();
-                        
-	      Node_box* lower_box = new Node_box(*B);
-	      Node_box* upper_box = new Node_box(*B); 
-		lower_box->split(*upper_box,new_cut_dim, new_cut_val);
-	      delete B;
-	      if (search_nearest_neighbour) {
-		FT distance_to_box_lower =
-		  distance.min_distance_to_rectangle(query_point, *lower_box);
-		FT distance_to_box_upper =
-		  distance.min_distance_to_rectangle(query_point, *upper_box);
-		if (distance_to_box_lower <= distance_to_box_upper) {
-
-		  Cell* C_upper = new Cell(upper_box, node->upper());
-		  Cell_with_distance *Upper_Child =
-		    new Cell_with_distance(C_upper,distance_to_box_upper);
-		  PriorityQueue.push(Upper_Child);
-		  N=node->lower();
-		  B=lower_box;
-		} else {
-		  Cell* C_lower = new Cell(lower_box, node->lower());
-		  Cell_with_distance *Lower_Child =
-		    new Cell_with_distance(C_lower,distance_to_box_lower);
-		  PriorityQueue.push(Lower_Child);
-		  N=node->upper();
-		  B=upper_box;
-		}
-	      }
-	      else { // search furthest
-		FT distance_to_box_lower =
-		  distance.max_distance_to_rectangle(query_point, *lower_box);
-		FT distance_to_box_upper =
-		  distance.max_distance_to_rectangle(query_point, *upper_box);
-		if (distance_to_box_lower >= distance_to_box_upper) {
-		  Cell* C_upper = new Cell(upper_box, node->upper());
-		  Cell_with_distance *Upper_Child =
-		    new Cell_with_distance(C_upper,distance_to_box_upper);
-		  PriorityQueue.push(Upper_Child);
-		  N=node->lower();
-		  B=lower_box;
-		}
-		else {
-		  Cell* C_lower = new Cell(lower_box, node->lower());
-		  Cell_with_distance *Lower_Child =
-		    new Cell_with_distance(C_lower,distance_to_box_lower);
-		  PriorityQueue.push(Lower_Child);
-		  N=node->upper();
-		  B=upper_box;
-		}
-	      }
-	    }
-	    delete B;
-             typename Tree::Leaf_node_const_handle node =
-              static_cast<typename Tree::Leaf_node_const_handle>(N);
-	    number_of_leaf_nodes_visited++;
-	    if (node->size() > 0) {
-	      for (typename Tree::iterator it = node->begin(); it != node->end(); it++) {
-		number_of_items_visited++;
-		FT distance_to_query_point=
-		  distance.transformed_distance(query_point,*it);
-		Point_with_transformed_distance *NN_Candidate=
-		  new Point_with_transformed_distance(*it,distance_to_query_point);
-		Item_PriorityQueue.push(NN_Candidate);
-	      }
-	      // old top of PriorityQueue has been processed,
-	      // hence update rd
-	      if (!PriorityQueue.empty()) {
-		rd = PriorityQueue.top()->second;
-		if (search_nearest_neighbour)
-		  next_neighbour_found =
-		    (multiplication_factor*rd > 
-		     Item_PriorityQueue.top()->second);
-		else
-		  next_neighbour_found =
-		    (multiplication_factor*rd < 
-		     Item_PriorityQueue.top()->second);
-	      }
-	      else // priority queue empty => last neighbour found
-		{
-		  next_neighbour_found=true;
-		};
-	      number_of_neighbours_computed++;
-	    }
-	  }   // next_neighbour_found or priority queue is empty
-	  // in the latter case also the item priority queue is empty
-        
-	}
-      }; // class Iterator_implementation
-    }; // class iterator
-  }; // class 
-
-} // namespace CGAL
-
-#endif  // CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Intersection_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Intersection_traits.h
deleted file mode 100644
index 677f39a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Intersection_traits.h
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Philipp Möller
-
-#ifndef CGAL_INTERSECTION_TRAITS_H
-#define CGAL_INTERSECTION_TRAITS_H
-
-#include <CGAL/Kernel_traits.h>
-#include <CGAL/Object.h>
-#include <CGAL/assertions.h>
-#include <CGAL/Dimension.h>
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/variant.hpp>
-
-// The macro CGAL_INTERSECTION_VERSION controls which version of the
-// intersection is used.
-// Currently two values are supported:
-// - 1, which means intersections with CGAL::Object
-// - 2, which means intersections with Intersection_traits and the 
-//      corresponding APIs in other modules
-// The default value is 2.
-
-#if !defined(CGAL_INTERSECTION_VERSION)
-#define CGAL_INTERSECTION_VERSION 2
-#endif
-
-#if CGAL_INTERSECTION_VERSION < 2
-
-#define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2)
-#define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3)
-
-#else
-
-#define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2)                \
-  template<typename K>     \
-  struct Intersection_traits<K, typename K::A, typename K::B>  { \
-    typedef typename boost::variant<typename K::R1, typename K::R2 >    \
-                     variant_type;                                      \
-    typedef typename boost::optional< variant_type > result_type;       \
-  };  
-
-#define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3)            \
-  template<typename K>     \
-  struct Intersection_traits<K, typename K::A, typename K::B>  { \
-    typedef typename boost::variant<typename K::R1, typename K::R2,     \
-                                    typename K::R3> variant_type;       \
-    typedef typename boost::optional< variant_type > result_type;       \
-  };                                                                    
-
-#endif
-
-#define CGAL_INTERSECTION_FUNCTION(A, B, DIM)                           \
-  template<typename K>                                                  \
-  inline                                                                \
-  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::B)>::type \
-  intersection(const A<K>& a, const B<K>& b) {                          \
-    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }                                                                     \
-  template<typename K>                                                  \
-  inline                                                                \
-  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::B)>::type \
-  intersection(const B<K>& a, const A<K>& b) {                          \
-    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }
-
-#define CGAL_INTERSECTION_FUNCTION_SELF(A, DIM)                         \
-  template<typename K>                                                  \
-  inline                                                                \
-  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::A)>::type \
-  intersection(const A<K> & a, const A<K> & b) {                          \
-    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }
-
-#define CGAL_DO_INTERSECT_FUNCTION(A, B, DIM)              \
-  template<typename K>                                     \
-  inline bool                                              \
-  do_intersect(const A<K>& a, const B<K>& b) {             \
-    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }                                                        \
-  template<typename K>                                     \
-  inline bool                                              \
-  do_intersect(const B<K>& a, const A<K>& b) {             \
-    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }
-
-#define CGAL_DO_INTERSECT_FUNCTION_SELF(A, DIM)                         \
-  template<typename K>                                                  \
-  inline bool                                                           \
-  do_intersect(const A<K> & a, const A<K> & b) {                          \
-    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
-  }
-
-namespace CGAL {
-
-// only declarationn
-template<typename, typename, typename>
-struct Intersection_traits {
-  // This defaults to Object, if we use VERSION < 2 and do nothing
-  // otherwise.
-  #if CGAL_INTERSECTION_VERSION < 2
-  typedef CGAL::Object result_type;
-  #endif
-};
-
-
-// Alias that gets the Kernel automatically and does some error checking.
-// Including corresponding specialization for Bbox, as it has no Kernel.
-template<typename A, typename B>
-class IT : public Intersection_traits< typename Kernel_traits<A>::Kernel, A, B > {
-  typedef typename Kernel_traits<A>::Kernel A_Kernel;
-  typedef typename Kernel_traits<B>::Kernel B_Kernel;
-  // CGAL_static_assertion_msg( (boost::is_same< A_Kernel, B_Kernel>::value),
-  //                            "IT instantiated with objects from two different Kernels");
-};
-
-class Bbox_2;
-class Bbox_3;
-
-template<typename B>
-class IT<Bbox_2, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_2, B >
-{ };
-
-template<typename B>
-class IT<Bbox_3, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_3, B >
-{ };
-
-namespace internal {
-
-// this function is used to call either make_object or a
-// Intersection_traits::result_type constructor to create return
-// values. The Object version takes some dummy template arguments
-// that are needed for the return of the Intersection_traits. In
-// theory a one parameter variant could be returned, but this
-// _could_ come with conversion overhead and so we rather go for
-// the real type.
-// Overloads for empty returns are also provided.
-#if CGAL_INTERSECTION_VERSION < 2
-  #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-    template<typename, typename, typename, typename T>
-    inline
-    CGAL::Object intersection_return(const T& t) { return CGAL::make_object(t); }
-  #else
-    template<typename, typename, typename, typename T>
-    inline
-    CGAL::Object intersection_return(T&& t) { return CGAL::make_object(std::forward<T>(t)); }
-  #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
-  template<typename, typename, typename>
-  inline
-  CGAL::Object intersection_return() { return CGAL::Object(); }
-#else
-  #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
-    template<typename F, typename A, typename B, typename T>
-    inline typename cpp11::result_of<F(A, B)>::type
-    intersection_return(const T& t) { return typename cpp11::result_of<F(A, B)>::type(t); }
-  #else
-    template<typename F, typename A, typename B, typename T>
-    inline typename cpp11::result_of<F(A, B)>::type
-    intersection_return(T&& t) { return typename cpp11::result_of<F(A, B)>::type(std::forward<T>(t)); }
-  #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
-  template<typename F, typename A, typename B>
-  inline typename cpp11::result_of<F(A, B)>::type
-  intersection_return() { return typename cpp11::result_of<F(A, B)>::type(); }
-#endif // CGAL_INTERSECTION_VERSION < 2
-
-// Something similar to wrap around boost::get and object_cast to
-// prevent ifdefing too much. Another way could be to introduce an
-// overload of boost::get for Object.  We only provide the pointer
-// casts here. But use references to const as parameters. This makes
-// it somewhat nicer.
-template<typename T>
-inline
-const T* intersect_get(const CGAL::Object& o) { 
-  return CGAL::object_cast<T>(&o);
-}
-
-template<typename T, BOOST_VARIANT_ENUM_PARAMS(typename U)>
-inline
-const T* intersect_get(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)> >& v) {
-  return boost::get<T>(&*v);
-}
-
-template<typename T, BOOST_VARIANT_ENUM_PARAMS(typename U)>
-inline
-const T* intersect_get(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)> & v) {
-  return boost::get<T>(&v);
-}
-
-template<typename A, typename B>
-typename cpp11::result_of<typename CGAL::Kernel_traits<A>::Kernel::Intersect_2(A, B)>::type
-intersection_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().intersect_2_object()(a, b);
-}
-
-template<typename A, typename B>
-typename cpp11::result_of<typename CGAL::Kernel_traits<A>::Kernel::Intersect_3(A, B)>::type
-intersection_impl(const A& a, const B& b, Dimension_tag<3>) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().intersect_3_object()(a, b);
-}
-
-template<typename A, typename B>
-typename Intersection_traits< typename CGAL::Kernel_traits<A>::Kernel, A, B>::result_type
-intersection_impl(const A& a, const B& b, Dynamic_dimension_tag) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().intersect_d_object()(a, b);
-}
-
-template<typename A, typename B>
-inline bool
-do_intersect_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().do_intersect_2_object()(a, b);
-}
-
-template<typename A, typename B>
-inline bool
-do_intersect_impl(const A& a, const B& b, Dimension_tag<3>) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().do_intersect_3_object()(a, b);
-}
-
-template<typename A, typename B>
-inline bool
-do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) {
-  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
-  return Kernel().do_intersect_d_object()(a, b);
-}
-
-} // internal
-
-// See overloads in the respective header files
-
-// template<typename A, typename B>
-// inline
-// typename Intersection_traits< typename Kernel_traits<A>::Kernel, A, B>::result_type >::type
-// intersection(const A& a, const B& b) {
-//   CGAL_static_assertion_msg( (boost::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value),
-//                               "intersection with objects of different dimensions not supported");
-//   return internal::intersection_impl(a, b, typename A::Ambient_dimension());
-// }
-
-// template<typename A, typename B>
-// inline
-// bool
-// do_intersect(const A& a, const B& b) {
-//   CGAL_static_assertion_msg((boost::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value), 
-//                         "do_intersect with objects of different dimensions not supported");
-//   return internal::do_intersect_impl(a, b, typename A::Ambient_dimension());
-// }
-
-} // CGAL
-
-#endif /* CGAL_INTERSECTION_TRAITS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Intersections_3/intersection_3_1_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Intersections_3/intersection_3_1_impl.h
deleted file mode 100644
index 22bdfc5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Intersections_3/intersection_3_1_impl.h
+++ /dev/null
@@ -1,1721 +0,0 @@
-// Copyright (c) 1997-2010
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman <geert at cs.uu.nl>
-//                 Sebastien Loriot <Sebastien.Loriot at geometryfactory.com>
-
-
-#include <CGAL/wmult.h>
-#include <boost/next_prior.hpp>
-#include <CGAL/Intersection_traits_3.h>
-
-namespace CGAL {
-
-  template <class K>
-  class Plane_3;
-
-  template <class K>
-  class Line_3;
-
-  template <class K>
-  class Segment_3;
-
-  template <class K>
-  class Ray_3;
-
-  template <class K>
-  class Sphere_3;
-
-  template <class K>
-  class Triangle_3;
-
-  template <class K>
-  class Iso_cuboid_3;
-
-// the special plane_3 function
-template <class K>
-inline 
-#if CGAL_INTERSECTION_VERSION < 2
-CGAL::Object
-#else
-typename cpp11::result_of<typename K::Intersect_3(typename K::Plane_3, typename K::Plane_3, typename K::Plane_3)>::type
-#endif
-intersection(const Plane_3<K> &plane1, const Plane_3<K> &plane2,
-             const Plane_3<K> &plane3)
-{
-  return K().intersect_3_object()(plane1, plane2, plane3);
-}
-
-CGAL_INTERSECTION_FUNCTION(Plane_3, Line_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Plane_3, Line_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Plane_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Line_3, 3)
-CGAL_DO_INTERSECT_FUNCTION_SELF(Line_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Segment_3, 3)
-CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Line_3, Segment_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Line_3, Segment_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Line_3, Ray_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Line_3, Ray_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Segment_3, Ray_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Segment_3, Ray_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Ray_3, 3)
-CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Plane_3, Sphere_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Plane_3, Sphere_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Sphere_3, 3)
-CGAL_DO_INTERSECT_FUNCTION_SELF(Sphere_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Plane_3, Ray_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Plane_3, Ray_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Plane_3, Segment_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Plane_3, Segment_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Plane_3, Triangle_3, 3)
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Line_3, Bbox_3)>::type
-intersection(const Line_3<K> &a,
-	     const Bbox_3 &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Line_3, Bbox_3)>::type
-intersection(const Bbox_3 &a,
-             const Line_3<K> &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Ray_3, Bbox_3)>::type
-intersection(const Ray_3<K> &a,
-	     const Bbox_3 &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Ray_3, Bbox_3)>::type
-intersection(const Bbox_3 &a,
-             const Ray_3<K> &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Segment_3, Bbox_3)>::type
-intersection(const Segment_3<K> &a,
-	     const Bbox_3 &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-template <class K>
-inline typename
-cpp11::result_of<typename K::Intersect_3(typename K::Segment_3, Bbox_3)>::type
-intersection(const Bbox_3 &a,
-             const Segment_3<K> &b) {
-  return K().intersect_3_object()(a, b);
-}
-
-CGAL_INTERSECTION_FUNCTION(Line_3, Iso_cuboid_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Ray_3, Iso_cuboid_3, 3)
-
-CGAL_INTERSECTION_FUNCTION(Segment_3, Iso_cuboid_3, 3)
-
-CGAL_INTERSECTION_FUNCTION_SELF(Iso_cuboid_3, 3)
-
-CGAL_DO_INTERSECT_FUNCTION_SELF(Plane_3, 3)
-
-template <class R>
-inline bool
-do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
-             const Plane_3<R> &plane3) {
-  return R().do_intersect_3_object()(plane1, plane2, plane3);
-}
-
-CGAL_DO_INTERSECT_FUNCTION_SELF(Iso_cuboid_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Line_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Ray_3, 3)
-CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Segment_3, 3)
-
-namespace internal {
-
-template <class K>
-typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
-intersection(const typename K::Plane_3  &plane, 
-	     const typename K::Line_3 &line, 
-	     const K& /*k*/)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Direction_3 Direction_3;
-    typedef typename K::RT RT;
-
-    const Point_3 &line_pt = line.point();
-    const Direction_3 &line_dir = line.direction();
-
-    RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy()
-           + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt);
-    RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy()
-           + plane.c()*line_dir.dz();
-    if (den == 0) {
-        if (num == 0) {
-            // all line
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>(line);
-        } else {
-            // no intersection
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>();
-        }
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>(Point_3(
-        den*line_pt.hx()-num*line_dir.dx(),
-        den*line_pt.hy()-num*line_dir.dy(),
-        den*line_pt.hz()-num*line_dir.dz(),
-        wmult_hw((K*)0, den, line_pt)));
-}
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
-intersection(const typename K::Line_3 &line, 
-	     const typename K::Plane_3  &plane, 
-	     const K& k)
-{
-  return intersection(plane, line, k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Plane_3, typename K::Plane_3>::result_type
-intersection(const typename K::Plane_3 &plane1, 
-	     const typename K::Plane_3 &plane2, 
-	     const K&)
-{
-  typedef typename K::Point_3 Point_3;
-  typedef typename K::Direction_3 Direction_3;
-  typedef typename K::Line_3 Line_3;
-
-    typedef typename K::RT RT;
-    const RT &a = plane1.a();
-    const RT &b = plane1.b();
-    const RT &c = plane1.c();
-    const RT &d = plane1.d();
-    const RT &p = plane2.a();
-    const RT &q = plane2.b();
-    const RT &r = plane2.c();
-    const RT &s = plane2.d();
-
-    RT det = a*q-p*b;
-    if (det != 0) {
-        Point_3 is_pt = Point_3(b*s-d*q, p*d-a*s, 0, det);
-        Direction_3 is_dir = Direction_3(b*r-c*q, p*c-a*r, det);
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
-    }
-    det = a*r-p*c;
-    if (det != 0) {
-        Point_3 is_pt = Point_3(c*s-d*r, 0, p*d-a*s, det);
-        Direction_3 is_dir = Direction_3(c*q-b*r, det, p*b-a*q);
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
-    }
-    det = b*r-c*q;
-    if (det != 0) {
-        Point_3 is_pt = Point_3(0, c*s-d*r, d*q-b*s, det);
-        Direction_3 is_dir = Direction_3(det, c*p-a*r, a*q-b*p);
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
-    }
-// degenerate case
-    if (a!=0 || p!=0) {
-        if (a*s == p*d)
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
-        else
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
-    }
-    if (b!=0 || q!=0) {
-        if (b*s == q*d)
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
-        else
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
-    }
-    if (c!=0 || r!=0) {
-        if (c*s == r*d)
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
-        else
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
-}
-
-template <class K>
-#if CGAL_INTERSECTION_VERSION < 2
-CGAL::Object
-#else
-boost::optional< boost::variant<typename K::Point_3,
-                                typename K::Line_3,
-                                typename K::Plane_3> >
-#endif
-intersection(const typename K::Plane_3 &plane1,
-	     const typename K::Plane_3 &plane2,
-	     const typename K::Plane_3 &plane3,
-	     const K& k)
-{
-    #if CGAL_INTERSECTION_VERSION > 1
-    typedef 
-      typename boost::optional< 
-      boost::variant<typename K::Point_3,
-                     typename K::Line_3,
-                     typename K::Plane_3> > 
-    result_type;
-    #endif
-
-
-    typedef typename K::Point_3      Point_3;
-    typedef typename K::Line_3       Line_3;
-    typedef typename K::Plane_3      Plane_3;
-
-    // Intersection between plane1 and plane2 can either be
-    // a line, a plane, or empty.
-    typename Intersection_traits<K, Plane_3, Plane_3>::result_type
-      o12 = internal::intersection(plane1, plane2, k);
-    
-    if(o12) {
-      if(const Line_3* l = intersect_get<Line_3>(o12)) {
-        // either point or line
-        typename Intersection_traits<K, Plane_3, Line_3>::result_type 
-          v = internal::intersection(plane3, *l, k);
-        if(v) {
-          if(const Point_3* p = intersect_get<Point_3>(v))
-            #if CGAL_INTERSECTION_VERSION < 2
-            return make_object(*p);
-            #else
-            return result_type(*p);
-            #endif
-          else if(const Line_3* l = intersect_get<Line_3>(v))
-            #if CGAL_INTERSECTION_VERSION < 2
-            return make_object(*l);
-            #else
-            return result_type(*l);
-            #endif
-        }
-      } else if(const Plane_3 *pl = intersect_get<Plane_3>(o12)) {
-        // either line or plane
-        typename Intersection_traits<K, Plane_3, Plane_3>::result_type 
-          v = internal::intersection(plane3, *pl, k);
-        if(v) {
-          if(const Plane_3* p = intersect_get<Plane_3>(v))
-            #if CGAL_INTERSECTION_VERSION < 2
-            return make_object(*p);
-            #else
-            return result_type(*p);
-            #endif
-          else if(const Line_3* l = intersect_get<Line_3>(v))
-            #if CGAL_INTERSECTION_VERSION < 2
-            return make_object(*l);
-            #else
-            return result_type(*l);
-            #endif
-        }
-      }
-    }
-    
-    #if CGAL_INTERSECTION_VERSION < 2
-    return Object();
-    #else
-    return result_type();
-    #endif
-}
-
-
-template <class K>
-bool
-do_intersect(const typename K::Plane_3 &plane, 
-	     const typename K::Line_3 &line,
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Direction_3 Direction_3;
-    typedef typename K::RT RT;
-    const Point_3 &line_pt = line.point();
-    const Direction_3 &line_dir = line.direction();
-
-    RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy()
-           + plane.c()*line_dir.dz();
-    if (den != 0)
-        return true;
-    RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy()
-           + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt);
-    if (num == 0) {
-        // all line
-        return true;
-    } else {
-        // no intersection
-        return false;
-    }
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Line_3 &line, 
-	     const typename K::Plane_3 &plane, 
-	     const K& k)
-{
-  return do_intersect(plane, line, k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type
-intersection(const typename K::Line_3 &l1,
-	     const typename K::Line_3 &l2,
-	     const K&)
-{
-  typedef typename K::FT           FT;
-  typedef typename K::Point_3      Point_3;
-  typedef typename K::Vector_3     Vector_3;
-
-  if(K().has_on_3_object()(l1, l2.point())) {
-    const Vector_3& v1 = l1.to_vector();
-    const Vector_3& v2 = l2.to_vector();
-    if((v1.x() * v2.y() == v1.y() * v2.x()) &&
-       (v1.x() * v2.z() == v1.z() * v2.x()) &&
-       (v1.y() * v2.z() == v1.z() * v2.y()))
-      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>(l1);
-  }
-  
-  if(K().are_parallel_3_object()(l1,l2)) return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>();
-  const Point_3 &p1 = l1.point();
-  const Point_3 &p3 = l2.point();
-  const Vector_3 &v1 = l1.to_vector();
-  const Vector_3 &v2 = l2.to_vector();
-  const Point_3 p2 = p1 + v1;
-  const Point_3 p4 = p2 + v2;
-  if(!K().coplanar_3_object()(p1,p2,p3,p4)) return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>();
-  const Vector_3 v3 = p3 - p1;
- const Vector_3 v3v2 = cross_product(v3,v2);
-  const Vector_3 v1v2 = cross_product(v1,v2);
-  const FT t = ((v3v2.x()*v1v2.x()) + (v3v2.y()*v1v2.y()) + (v3v2.z()*v1v2.z())) /
-               (v1v2.squared_length());
-  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>(p1 + (v1 * t));
-}
-
-template <class K>
-bool
-do_intersect(const typename K::Line_3 &l1,
-	     const typename K::Line_3 &l2,
-	     const K&)
-{
-  typedef typename K::Point_3      Point_3;
-  typedef typename K::Vector_3     Vector_3;
-
-  if(K().has_on_3_object()(l1, l2.point())) return true;
-  if(K().are_parallel_3_object()(l1,l2)) return false;
-  const Point_3 &p1 = l1.point();
-  const Point_3 &p3 = l2.point();
-  const Vector_3 &v1 = l1.to_vector();
-  const Vector_3 &v2 = l2.to_vector();
-  const Point_3 p2 = p1 + v1;
-  const Point_3 p4 = p2 + v2;
-  return K().coplanar_3_object()(p1,p2,p3,p4);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
-intersection_collinear_segments(const typename K::Segment_3 &s1,
-                                const typename K::Segment_3 &s2,
-                                const K& k)
-{
-  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
-
-  const typename K::Point_3& p=s1[0],q=s1[1],r=s2[0],s=s2[1];
-  typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
-  
-  if ( cln_order(p,r,q) ){
-    if ( cln_order(p,s,q) )
-      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s2);
-    if ( cln_order(r,p,s) ){
-      if (r!=p) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(r,p) );
-      if ( cln_order(r,q,s) ) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1);
-      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
-    }
-    return r!=q ? intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(r,q) ) 
-      : intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(q);
-  }
-
-  if ( cln_order(p,s,q) ){
-    if ( cln_order(r,p,s) ){
-      if (s!=p) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(s,p) );
-      if (cln_order(r,q,s)) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1);  
-      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
-    }
-   return s!=q ? intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(s,q) ) 
-     : intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(q);
-  }
-  
-  if ( cln_order(r,p,s) )
-    return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1); 
-  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
-}
-
-template<class K>
-struct L_p_visitor : public boost::static_visitor< 
-  typename Intersection_traits<K, typename K::Segment_3, 
-                               typename K::Segment_3>::result_type
-  > 
-{
-
-  typedef typename Intersection_traits<K, typename K::Segment_3, 
-                                         typename K::Segment_3>::result_type result_type;
-  L_p_visitor(const typename K::Segment_3& s1, const typename K::Segment_3& s2) :
-    s1(s1), s2(s2) { }
-  const typename K::Segment_3& s1;
-  const typename K::Segment_3& s2;
-
-  result_type
-  operator()(const typename K::Point_3& p) const {
-    typename K::Collinear_are_ordered_along_line_3 cln_order=K().collinear_are_ordered_along_line_3_object();
-    if ( cln_order(s1[0],p,s1[1]) && cln_order(s2[0],p,s2[1]) )
-      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
-    else
-      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
-}
-
-  result_type
-  operator()(const typename K::Line_3&) const {
-    return intersection_collinear_segments(s1,s2,K());
-  }
-};
-
-template <class K>
-typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
-intersection(const typename K::Segment_3 &s1,
-	     const typename K::Segment_3 &s2,
-	     const K&)
-{
-  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
-
-  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
-    v = internal::intersection(s1.supporting_line(),s2.supporting_line(), K());
-
-  if(v) {
-    #if CGAL_INTERSECTION_VERSION < 2
-    // abuse the visitor to do the visitation manually
-    L_p_visitor<K> visitor(s1, s2);
-    if(const typename K::Point_3* p = object_cast<typename K::Point_3>(&v))
-      return visitor(*p);
-    if(const typename K::Line_3* l = object_cast<typename K::Line_3>(&v))
-      return visitor(*l);
-    #else
-    return apply_visitor(L_p_visitor<K>(s1, s2) , *v);
-    #endif
-  }
-  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Segment_3  &s1,
-             const typename K::Segment_3  &s2,
-             const K & k)
-{
-  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
-  bool b=do_intersect(s1.supporting_line(),s2.supporting_line(),k);
-  if (b)
-  {
-    //supporting_line intersects: points are coplanar
-    typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object();
-    ::CGAL::Orientation or1 =  cpl_orient(s1[0],s1[1],s2[0]);
-    ::CGAL::Orientation or2 =  cpl_orient(s1[0],s1[1],s2[1]);
-    
-    if ( or1 == COLLINEAR && or2 ==COLLINEAR )
-    {
-      //segments are collinear
-      typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
-      return cln_order(s1[0],s2[0],s1[1]) || 
-             cln_order(s1[0],s2[1],s1[1]) ||
-             cln_order(s2[0],s1[0],s2[1]) ;
-    }
-    
-    if ( or1 != or2 ){
-      or1=cpl_orient(s2[0],s2[1],s1[0]);
-      return (or1 == COLLINEAR || or1 != cpl_orient(s2[0],s2[1],s1[1]));
-    }
-  }
-  return false;
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
-intersection(const typename K::Line_3 &l,
-	     const typename K::Segment_3 &s,
-	     const K& k)
-{
-  CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
-  
-  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
-    v = internal::intersection(l,s.supporting_line(), K());
-
-  if(v) {
-    if(const typename K::Point_3* p = intersect_get<typename K::Point_3> (v)) {
-    typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
-      if(cln_order(s[0],*p,s[1])) 
-        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>(*p);
-    } else {
-      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>(s);
-  }
-  }
-  
-  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>();
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
-intersection(const typename K::Segment_3 &s,
-	     const typename K::Line_3 &l,
-	     const K& k)
-{
-  return intersection(l,s,k);
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Line_3  &l,
-             const typename K::Segment_3  &s,
-             const K & k)
-{
-  CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
-  bool b=do_intersect(l,s.supporting_line(),k);
-  if (b)
-  {
-    //supporting_line intersects: points are coplanar
-    typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object();
-    typename K::Point_3 p1=l.point(0);
-    typename K::Point_3 p2=l.point(1);
-    ::CGAL::Orientation or1 =  cpl_orient(p1,p2,s[0]);
-       
-    if ( or1 == COLLINEAR ) return true;
-    
-    ::CGAL::Orientation or2 =  cpl_orient(p1,p2,s[1]);
-    return or1!=or2;
-  }
-  return false;
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Segment_3  &s,
-             const typename K::Line_3  &l,
-             const K & k)
-{
-  return do_intersect(l,s,k);
-}
-
-template <class K>
-bool
-Ray_3_has_on_collinear_Point_3(
-            const typename K::Ray_3 &r,
-	    const typename K::Point_3 &p,
-	    const K& k)
-{
-  return
-      k.equal_3_object()(r.source(),p)
-    ||
-      k.equal_3_object() (
-        k.construct_direction_3_object()( k.construct_vector_3_object() (r.source(),p) ),
-        r.direction()
-      );
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type
-intersection(const typename K::Line_3 &l,
-	     const typename K::Ray_3 &r,
-	     const K& k)
-{
-  CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
-
-  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
-    v = internal::intersection(l,r.supporting_line(), k);
-  
-  if(v) {
-    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
-      if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) 
-        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>(*p);
-    } else if(intersect_get<typename K::Line_3>(v)) {
-      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>(r);
-  }
-  }
-  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>();
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Ray_3, typename K::Line_3>::result_type
-intersection(const typename K::Ray_3 &r,
-	     const typename K::Line_3 &l,
-	     const K& k)
-{
-  return intersection(l,r,k);
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Line_3  &l,
-             const typename K::Ray_3  &r,
-             const K & k)
-{
-  CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
-  if ( !do_intersect(l,r.supporting_line()) ) return false;
-  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
-  Orientation p0p1s=pred(l.point(0),l.point(1),r.source());
-  if ( p0p1s == COLLINEAR) return true;
-  Orientation stp0 =pred(r.source(),r.second_point(),l.point(0));
-  if ( stp0 == COLLINEAR )
-    return Ray_3_has_on_collinear_Point_3(r,l.point(0),k);
-  return p0p1s!=stp0;
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Ray_3  &r,
-             const typename K::Line_3  &l,
-             const K & k)
-{
-  return do_intersect(l,r,k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Segment_3, typename K::Ray_3>::result_type
-intersection(const typename K::Segment_3 &s,
-	     const typename K::Ray_3 &r,
-	     const K& k)
-{
-  CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
-
-  typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type 
-    v = internal::intersection(r.supporting_line(),s, K());
-
-  if(v) {
-    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
-      if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) 
-        return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(*p);
-    } else if(const typename K::Segment_3* s2 = intersect_get<typename K::Segment_3>(v)) {
-      bool has_source=Ray_3_has_on_collinear_Point_3(r,s.source(),k);
-      bool has_target=Ray_3_has_on_collinear_Point_3(r,s.target(),k);
-      if (has_source){
-        if (has_target)
-          return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(*s2);
-        else
-        {
-          if (k.equal_3_object() (r.source(),s.source()))
-            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(r.source());
-          else
-            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(
-              k.construct_segment_3_object()(r.source(),s.source()));
-        }
-      }
-      else{
-        if (has_target){
-          if (k.equal_3_object() (r.source(),s.target()))
-            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(r.source());          
-          else
-            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(
-              k.construct_segment_3_object()(r.source(),s.target()));
-        }
-      }
-    }
-  }
-
-  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>();
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Ray_3, typename K::Segment_3>::result_type
-intersection(const typename K::Ray_3 &r,
-	     const typename K::Segment_3 &s,
-	     const K& k)
-{
-  return intersection(s,r,k);
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Segment_3  &s,
-             const typename K::Ray_3  &r,
-             const K & k)
-{
-  CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
-  if ( !do_intersect(s,r.supporting_line()) ) return false;
-  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
-  Orientation p0p1s=pred(s.point(0),s.point(1),r.source());
-  Orientation stp0 =pred(r.source(),r.second_point(),s.point(0));
-  if ( p0p1s == COLLINEAR) //s belongs to the supporting line of p0p1
-  {
-    if ( stp0 == COLLINEAR )//st and p0p1 have the same supporting line
-      return Ray_3_has_on_collinear_Point_3(r,s.point(0),k) || Ray_3_has_on_collinear_Point_3(r,s.point(1),k);
-    else
-      return true;
-  }
-  if ( stp0 == COLLINEAR )
-    return Ray_3_has_on_collinear_Point_3(r,s.point(0),k);
-  return p0p1s!=stp0;
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Ray_3  &r,
-             const typename K::Segment_3  &s,
-             const K & k)
-{
-  return do_intersect(s,r,k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Ray_3, typename K::Ray_3>::result_type
-intersection(const typename K::Ray_3 &r1,
-	     const typename K::Ray_3 &r2,
-	     const K& k)
-{
-  CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
-
-  typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type 
-    v = internal::intersection(r1.supporting_line(),r2, k);
-
-  if(v) {
-    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
-      if(Ray_3_has_on_collinear_Point_3(r1,*p,k)) 
-        return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(*p);
-    } else if(const typename K::Ray_3* r = intersect_get<typename K::Ray_3>(v)) {
-      bool r1_has_s2=Ray_3_has_on_collinear_Point_3(r1,r2.source(),k);
-      bool r2_has_s1=Ray_3_has_on_collinear_Point_3(r2,r1.source(),k);
-      if (r1_has_s2){
-        if (r2_has_s1)
-        {
-          if (k.equal_3_object()(r1.source(),r2.source()))
-            return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(r1.source());
-          else {
-            return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(
-              k.construct_segment_3_object()(r1.source(),r2.source()));          
-          }
-        }
-        else
-          return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(*r);
-      }
-      else{
-        if (r2_has_s1)
-          return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(r1);
-      }
-    }
-  }
-  return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>();
-
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Ray_3  &r1,
-             const typename K::Ray_3  &r2,
-             const K & k)
-{
-  CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
-  if ( !do_intersect(r1,r2.supporting_line()) ) return false;
-  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
-  Orientation p0p1s=pred(r1.point(0),r1.point(1),r2.source());
-  Orientation stp0 =pred(r2.source(),r2.second_point(),r1.point(0));
-  
-  if ( p0p1s == COLLINEAR){
-    if(stp0 == COLLINEAR ) 
-      return  Ray_3_has_on_collinear_Point_3(r2,r1.source(),k) ||
-              Ray_3_has_on_collinear_Point_3(r1,r2.source(),k);
-    else
-      return true;
-  }
-  if(stp0 == COLLINEAR )
-    return Ray_3_has_on_collinear_Point_3(r2,r1.point(0),k);
-  return p0p1s!=stp0;
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Plane_3, typename K::Sphere_3>::result_type
-intersection(const typename K::Plane_3 &p,
-             const typename K::Sphere_3 &s,
-             const K&)
-{
-  typedef typename K::Circle_3 Circle_3;
-  typedef typename K::Point_3 Point_3;
-  typedef typename K::FT FT;
-  const FT d2 = CGAL::square(p.a()*s.center().x() + 
-                             p.b()*s.center().y() + 
-                             p.c()*s.center().z() + p.d()) /
-      (square(p.a()) + square(p.b()) + square(p.c()));
-  const FT cmp = d2 - s.squared_radius();
-  if(CGAL_NTS is_zero(cmp)) { // tangent
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>(p.projection(s.center()));
-  } else if(CGAL_NTS is_negative(cmp)) { // intersect
-    Point_3 center = p.projection(s.center());
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>(Circle_3(center,s.squared_radius() - d2,p));
-  } // do not intersect
-  return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>();
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Plane_3 &p,
-             const typename K::Sphere_3 &s,
-             const K&)
-{
-  typedef typename K::FT FT;
-  const FT d2 = CGAL::square(p.a()*s.center().x() + 
-                             p.b()*s.center().y() + 
-                             p.c()*s.center().z() + p.d()) /
-      (square(p.a()) + square(p.b()) + square(p.c()));
-  return d2 <= s.squared_radius();
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Sphere_3 &s,
-             const typename K::Plane_3 &p,
-             const K&)
-{
-  return do_intersect(p,s);
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Sphere_3, typename K::Plane_3>::result_type
-intersection(const typename K::Sphere_3 &s,
-             const typename K::Plane_3 &p,
-             const K& k)
-{
-  return intersection(p, s, k);
-}
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Sphere_3, typename K::Sphere_3>::result_type
-intersection(const typename K::Sphere_3 &s1,
-             const typename K::Sphere_3 &s2,
-             const K& k)
-{
-  typedef typename K::Plane_3 Plane_3;
-  if(s1.center() == s2.center()) {
-    if(s1.squared_radius() == s2.squared_radius()) {
-      if(is_zero(s1.squared_radius())) return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(s1.center());
-      else return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(s1);
-    } else return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>();  // cocentrics
-  }
-  Plane_3 p = K().construct_radical_plane_3_object()(s1,s2);
-  
-  
-  typename Intersection_traits<K, typename K::Sphere_3, typename K::Plane_3>::result_type 
-    v = intersection(p, s1, k);
-
-
-  if(v) {
-    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
-      return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(*p);
-    else if(const typename K::Circle_3* c = intersect_get<typename K::Circle_3>(v))
-      return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(*c);
-  }
-
-  return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>();
-}
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Sphere_3 &s1,
-             const typename K::Sphere_3 &s2,
-             const K& k)
-{
-  typedef typename K::Plane_3 Plane_3;
-  if(s1.center() == s2.center()) {
-    return s1.squared_radius() == s2.squared_radius();
-  }
-  Plane_3 p = K().construct_radical_plane_3_object()(s1,s2);
-  return do_intersect(p, s1, k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Plane_3, typename K::Ray_3>::result_type
-intersection(const typename K::Plane_3 &plane, 
-	     const typename K::Ray_3 &ray, 
-	     const K& k)
-{
-    typedef typename K::Point_3 Point_3;
-
-    typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type 
-      v = internal::intersection(plane, ray.supporting_line(), k);
-
-    if(v) {
-      if(const Point_3* p = intersect_get<Point_3>(v)) {
-        if (ray.collinear_has_on(*p))
-          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>(*p);
-        else
-          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>();
-    }
-    } else {
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>();
-    }
-
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>(ray);
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Ray_3, typename K::Plane_3>::result_type
-intersection(const typename K::Ray_3 &ray, 
-	     const typename K::Plane_3 &plane, 
-	     const K& k)
-{
-  return intersection(plane, ray, k);
-}
-
-
-
-template <class K>
-bool
-do_intersect(const typename K::Plane_3 &plane, 
-	     const typename K::Ray_3 &ray, 
-	     const K& k)
-{
-    typedef typename K::Point_3 Point_3;
-    
-    typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>
-      ::result_type 
-      line_intersection = internal::intersection(plane, ray.supporting_line(), k);
-
-    if(!line_intersection)
-        return false;
-    if(const Point_3 *isp = intersect_get<Point_3>(line_intersection))
-        return ray.collinear_has_on(*isp);
-    
-    return true;
-}
-
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Ray_3 &ray, 
-	     const typename K::Plane_3 &plane, 
-	     const K& k)
-{
-  return do_intersect(plane, ray, k);
-}
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Plane_3, typename K::Segment_3>::result_type
-intersection(const typename K::Plane_3 &plane, 
-	     const typename K::Segment_3 &seg, 
-	     const K& k)
-{
-    typedef typename K::Point_3 Point_3;
-    const Point_3 &source = seg.source();
-    const Point_3 &target = seg.target();
-
-    Oriented_side source_side = plane.oriented_side(source);
-    Oriented_side target_side = plane.oriented_side(target);
-
-    switch (source_side) {
-    case ON_ORIENTED_BOUNDARY:
-        if (target_side == ON_ORIENTED_BOUNDARY)
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
-        else
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(source);
-    case ON_POSITIVE_SIDE:
-        switch (target_side) {
-        case ON_ORIENTED_BOUNDARY:
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(target);
-        case ON_POSITIVE_SIDE:
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
-        case ON_NEGATIVE_SIDE:
-          { 
-            // intersection object should be a point, but rounding errors 
-            // could lead to a line. In such case, return seg.
-            typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
-              v = internal::intersection(plane, seg.supporting_line(), k);
-            if(v) {
-              if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
-                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(*p);
-            else
-                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
-            }
-          }
-        }
-    case ON_NEGATIVE_SIDE:
-        switch (target_side) {
-        case ON_ORIENTED_BOUNDARY:
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(target);
-        case ON_POSITIVE_SIDE:
-          { 
-            // intersection object should be a point, but rounding errors 
-            // could lead to a line. In such case, return seg.
-            typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
-              v = internal::intersection(plane, seg.supporting_line(), k);
-            if(v) {
-              if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
-                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(*p);
-            else 
-                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
-            }
-          }
-        case ON_NEGATIVE_SIDE:
-            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
-        }
-    }
-    CGAL_kernel_assertion_msg(false, "Supposedly unreachable code.");
-    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Segment_3, typename K::Plane_3>::result_type
-intersection(const typename K::Segment_3 &seg, 
-	     const typename K::Plane_3 &plane, 
-	     const K& k)
-{
-  return intersection(plane, seg, k);
-}
-
-
-template <class K>
-bool
-do_intersect(const typename K::Plane_3  &plane, 
-	     const typename K::Segment_3 &seg, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    const Point_3 &source = seg.source();
-    const Point_3 &target = seg.target();
-
-    Oriented_side source_side = plane.oriented_side(source);
-    Oriented_side target_side = plane.oriented_side(target);
-
-    if ( source_side == target_side
-       && target_side != ON_ORIENTED_BOUNDARY) {
-        return false;
-    }
-    return true;
-}
-
-
-template <class K>
-inline
-bool
-do_intersect(const typename K::Segment_3 &seg, 
-	     const typename K::Plane_3  &plane, 
-	     const K& k)
-{
-  return do_intersect(plane, seg, k);
-}
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Plane_3, typename K::Triangle_3>::result_type
-intersection(const typename K::Plane_3 &plane, 
-	     const typename K::Triangle_3 &tri, 
-	     const K& k)
-{
-  typedef 
-  typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type 
-  pl_res;
-
-  typename K::Construct_vertex_3 vertex_on =
-    k.construct_vertex_3_object();
-  
-  Oriented_side or0=plane.oriented_side(vertex_on(tri,0));
-  Oriented_side or1=plane.oriented_side(vertex_on(tri,1));
-  Oriented_side or2=plane.oriented_side(vertex_on(tri,2));
-  
-  if (or0==ON_ORIENTED_BOUNDARY){
-    if (or1==ON_ORIENTED_BOUNDARY){
-      if (or2==ON_ORIENTED_BOUNDARY) 
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri);
-      else 
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                   (tri.vertex(0),tri.vertex(1)));
-    }
-    else{
-      if (or2==ON_ORIENTED_BOUNDARY)
-        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                   (tri.vertex(0),tri.vertex(2)));
-      else{
-        if (or1==or2)
-          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(0));
-        else{
-          pl_res v = internal::intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k);
-          const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
-          CGAL_kernel_assertion(p!=NULL);
-          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                     (*p,tri.vertex(0)));
-        }
-      }
-    }
-  }
-
-  if (or1==ON_ORIENTED_BOUNDARY){
-    if (or2==ON_ORIENTED_BOUNDARY)
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                 (tri.vertex(1),tri.vertex(2)));
-    if (or2==or0)
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(1));
-    else{
-      pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k);
-      const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
-      CGAL_kernel_assertion(p!=NULL);
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                 (*p,tri.vertex(1)));      
-    }
-  }
-  
-  if (or2==ON_ORIENTED_BOUNDARY){
-    if (or1==or0)
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(2));
-    else{
-      pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k);
-      const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
-      CGAL_kernel_assertion(p!=NULL);
-      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
-                                                                                 (*p,tri.vertex(2)));      
-    }
-  }
-  
-  //triangle vertices are not in the plane
-  std::vector<typename K::Point_3> pts;
-  pts.reserve(2);
-  if (or0!=or1){
-    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k);
-    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
-    CGAL_kernel_assertion( pt_ptr!=NULL );    
-    pts.push_back( *pt_ptr );
-  }
-  if (or0!=or2){
-    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k);
-    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
-    CGAL_kernel_assertion( pt_ptr!=NULL );    
-    pts.push_back( *pt_ptr );    
-  }
-  if (or1!=or2){
-    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k);
-    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
-    CGAL_kernel_assertion( pt_ptr!=NULL );    
-    pts.push_back( *pt_ptr );
-  }
-  
-  if (pts.empty()) return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>();
-  
-  CGAL_kernel_assertion(pts.size()==2);
-  
-  return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>( k.construct_segment_3_object()
-                                                                              (*pts.begin(),*boost::prior(pts.end())) );
-}
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Triangle_3, typename K::Plane_3>::result_type
-intersection(const typename K::Triangle_3 &triangle,
-	     const typename K::Plane_3  &plane,
-	     const K& k)
-{
-  return intersection(plane, triangle, k);
-}
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
-intersection(const typename K::Line_3 &line,
-	     const Bbox_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Direction_3 Direction_3;
-    const Point_3 &linepoint = line.point();
-    const Direction_3 &linedir = line.direction();
-    return intersection_bl<K>(box,
-        CGAL::to_double(linepoint.x()),
-        CGAL::to_double(linepoint.y()),
-        CGAL::to_double(linepoint.z()),
-        CGAL::to_double(linedir.dx()),
-        CGAL::to_double(linedir.dy()),
-        CGAL::to_double(linedir.dz()),
-        true, true
-        );
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, Bbox_3, typename K::Line_3>::result_type
-intersection(const Bbox_3 &box, 
-	     const typename K::Line_3 &line, 
-	     const K& k)
-{
-  return intersection(line, box, k);
-}
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
-intersection(const typename K::Ray_3 &ray,
-	     const Bbox_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Direction_3 Direction_3;
-    const Point_3 &linepoint = ray.source();
-    const Direction_3 &linedir = ray.direction();
-    return intersection_bl<K>(box,
-        CGAL::to_double(linepoint.x()),
-        CGAL::to_double(linepoint.y()),
-        CGAL::to_double(linepoint.z()),
-        CGAL::to_double(linedir.dx()),
-        CGAL::to_double(linedir.dy()),
-        CGAL::to_double(linedir.dz()),
-        false, true
-        );
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, Bbox_3, typename K::Ray_3>::result_type
-intersection(const Bbox_3 &box, 
-	     const typename K::Ray_3 &ray, 
-	     const K& k)
-{
-  return intersection(ray, box, k);
-}
-
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
-intersection(const typename K::Segment_3 &seg, 
-	     const Bbox_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Vector_3 Vector_3;
-    const Point_3 &linepoint = seg.source();
-    const Vector_3 &diffvec = seg.target()-linepoint;
-    return intersection_bl<K>(box,
-        CGAL::to_double(linepoint.x()),
-        CGAL::to_double(linepoint.y()),
-        CGAL::to_double(linepoint.z()),
-        CGAL::to_double(diffvec.x()),
-        CGAL::to_double(diffvec.y()),
-        CGAL::to_double(diffvec.z()),
-        false, false
-        );
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, Bbox_3, typename K::Segment_3>::result_type
-intersection(const Bbox_3 &box, 
-	     const typename K::Segment_3 &seg, 
-	     const K& k)
-{
-  return intersection(seg, box, k);
-}
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Line_3, typename K::Iso_cuboid_3>::result_type
-intersection(const typename K::Line_3 &line,
-	     const typename K::Iso_cuboid_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Vector_3 Vector_3;
-    typedef typename K::Segment_3 Segment_3;
-    typedef typename K::FT FT;
-    bool all_values = true;
-    FT _min = 0, _max = 0; // initialization to stop compiler warning
-    Point_3 const & _ref_point=line.point();
-    Vector_3 const & _dir=line.direction().vector();
-    Point_3 const & _iso_min=(box.min)();
-    Point_3 const & _iso_max=(box.max)();
-    for (int i=0; i< _ref_point.dimension(); i++) {
-        if (_dir.homogeneous(i) == 0) {
-            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
-            }
-            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
-            }
-        } else {
-            FT newmin, newmax;
-            if (_dir.homogeneous(i) > 0) {
-                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            } else {
-                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            }
-            if (all_values) {
-                _min = newmin;
-                _max = newmax;
-            } else {
-                if (newmin > _min)
-                    _min = newmin;
-                if (newmax < _max)
-                    _max = newmax;
-                if (_max < _min) {
-                    return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
-                }
-            }
-            all_values = false;
-        }
-    }
-    CGAL_kernel_assertion(!all_values);
-    if (_max == _min) {
-        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>(
-        Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Line_3>::result_type
-intersection(const typename K::Iso_cuboid_3 &box, 
-	     const typename K::Line_3 &line, 
-	     const K& k)
-{
-  return intersection(line, box, k);
-}
-
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Ray_3, typename K::Iso_cuboid_3>::result_type
-intersection(const typename K::Ray_3 &ray,
-	     const typename K::Iso_cuboid_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Vector_3 Vector_3;
-    typedef typename K::Segment_3 Segment_3;
-    typedef typename K::FT FT;
-    bool all_values = true;
-    FT _min = 0, _max = 0; // initialization to prevent compiler warning
-    Point_3 const & _ref_point=ray.source();
-    Vector_3 const & _dir=ray.direction().vector();
-    Point_3 const & _iso_min=(box.min)();
-    Point_3 const & _iso_max=(box.max)();
-
-    for (int i=0; i< _ref_point.dimension(); i++) {
-        if (_dir.homogeneous(i) == 0) {
-            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
-            }
-            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
-            }
-        } else {
-            FT newmin, newmax;
-            if (_dir.homogeneous(i) > 0) {
-                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            } else {
-                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            }
-            if (all_values) {
-                _max = newmax;
-            } else {
-                if (newmax < _max)
-                    _max = newmax;
-            }
-            if (newmin > _min)
-                 _min = newmin;
-            if (_max < _min)
-                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
-            all_values = false;
-        }
-    }
-    CGAL_kernel_assertion(!all_values);
-    if (_max == _min) {
-        return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>(
-        Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Ray_3>::result_type
-intersection(const typename K::Iso_cuboid_3 &box, 
-	     const typename K::Ray_3 &ray,
-	     const K& k)
-{
-  return intersection(ray, box, k);
-}
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Segment_3, typename K::Iso_cuboid_3>::result_type
-intersection(const typename K::Segment_3 &seg,
-	     const typename K::Iso_cuboid_3 &box, 
-	     const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Vector_3 Vector_3;
-    typedef typename K::Segment_3 Segment_3;
-    typedef typename K::FT FT;
-    FT _min = 0, _max;
-
-    Point_3 const & _ref_point=seg.source();
-    Vector_3 const & _dir=seg.direction().vector();
-    Point_3 const & _iso_min=(box.min)();
-    Point_3 const & _iso_max=(box.max)();
-    int main_dir =
-        (CGAL_NTS abs(_dir.x()) > CGAL_NTS abs(_dir.y()) )
-            ? (CGAL_NTS abs(_dir.x()) > CGAL_NTS abs(_dir.z()) ? 0 : 2)
-            : (CGAL_NTS abs(_dir.y()) > CGAL_NTS abs(_dir.z()) ? 1 : 2);
-    _max = (seg.target().cartesian(main_dir)-_ref_point.cartesian(main_dir)) /
-            _dir.cartesian(main_dir);
-
-    for (int i=0; i< _ref_point.dimension(); i++) {
-        if (_dir.homogeneous(i) == 0) {
-            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
-            }
-            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
-                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
-            }
-        } else {
-            FT newmin, newmax;
-            if (_dir.homogeneous(i) > 0) {
-                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            } else {
-                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
-                    _dir.cartesian(i);
-            }
-            if (newmax < _max)
-                _max = newmax;
-            if (newmin > _min)
-                 _min = newmin;
-            if (_max < _min)
-                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
-        }
-    }
-    if (_max == _min) {
-        return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>(
-        Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
-}
-
-
-template <class K>
-inline
-typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Segment_3>::result_type
-intersection(const typename K::Iso_cuboid_3 &box, 
-	     const typename K::Segment_3 &seg,
-	     const K& k)
-{
-  return intersection(seg, box, k);
-}
-
-
-template <class K>
-typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>::result_type
-intersection(
-    const typename K::Iso_cuboid_3 &icub1,
-    const typename K::Iso_cuboid_3 &icub2, 
-    const K&)
-{
-    typedef typename K::Point_3 Point_3;
-    typedef typename K::Iso_cuboid_3 Iso_cuboid_3;
-
-    Point_3 min_points[2];
-    Point_3 max_points[2];
-    min_points[0] = (icub1.min)();
-    min_points[1] = (icub2.min)();
-    max_points[0] = (icub1.max)();
-    max_points[1] = (icub2.max)();
-    const int DIM = 3;
-    int min_idx[DIM];
-    int max_idx[DIM];
-    Point_3 newmin;
-    Point_3 newmax;
-    for (int dim = 0; dim < DIM; ++dim) {
-        min_idx[dim] =
-          min_points[0].cartesian(dim) >= min_points[1].cartesian(dim) ? 0 : 1;
-        max_idx[dim] =
-          max_points[0].cartesian(dim) <= max_points[1].cartesian(dim) ? 0 : 1;
-        if (min_idx[dim] != max_idx[dim]
-                && max_points[max_idx[dim]].cartesian(dim)
-                   < min_points[min_idx[dim]].cartesian(dim))
-            return intersection_return<typename K::Intersect_3, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>();
-    }
-    if (min_idx[0] == min_idx[1] && min_idx[0] == min_idx[2]) {
-        newmin = min_points[min_idx[0]];
-    } else {
-        newmin = Point_3(
-            min_idx[0] == 0
-                ? wmult_hw((K*)0, min_points[0].hx(), min_points[1])
-                : wmult_hw((K*)0, min_points[1].hx(), min_points[0])
-            ,
-            min_idx[1] == 0
-                ? wmult_hw((K*)0, min_points[0].hy(), min_points[1])
-                : wmult_hw((K*)0, min_points[1].hy(), min_points[0])
-            ,
-            min_idx[2] == 0
-                ? wmult_hw((K*)0, min_points[0].hz(), min_points[1])
-                : wmult_hw((K*)0, min_points[1].hz(), min_points[0])
-            ,
-            wmult_hw((K*)0, min_points[0].hw(), min_points[1]) );
-    }
-    if (max_idx[0] == max_idx[1] && max_idx[0] == max_idx[2]) {
-        newmax = max_points[max_idx[0]];
-    } else {
-        newmax = Point_3(
-            max_idx[0] == 0
-                ? wmult_hw((K*)0, max_points[0].hx(), max_points[1])
-                : wmult_hw((K*)0, max_points[1].hx(), max_points[0])
-            ,
-            max_idx[1] == 0
-                ? wmult_hw((K*)0, max_points[0].hy(), max_points[1])
-                : wmult_hw((K*)0, max_points[1].hy(), max_points[0])
-            ,
-            max_idx[2] == 0
-                ? wmult_hw((K*)0, max_points[0].hz(), max_points[1])
-                : wmult_hw((K*)0, max_points[1].hz(), max_points[0])
-            ,
-            wmult_hw((K*)0, max_points[0].hw(), max_points[1]) );
-    }
-    return intersection_return<typename K::Intersect_3, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>(Iso_cuboid_3(newmin, newmax));
-}
-
-template <class R>
-inline bool
-do_intersect(const Plane_3<R>& plane1, const Plane_3<R>& plane2, const R&)
-{
-  return bool(intersection(plane1, plane2));
-}
-
-
-template <class R>
-inline bool
-do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
-             const Plane_3<R> &plane3, const R&)
-{
-  return bool(intersection(plane1, plane2, plane3));
-}
-
-
-template <class R>
-inline bool
-do_intersect(const Iso_cuboid_3<R> &i, const Iso_cuboid_3<R> &j, const R&)
-{
-  return bool(CGAL::intersection(i, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Line_3<R> &l, const Iso_cuboid_3<R> &j, const R&)
-{
-  return bool(CGAL::intersection(l, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Iso_cuboid_3<R> &j, const Line_3<R> &l, const R&)
-{
-  return bool(CGAL::intersection(l, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Ray_3<R> &r, const Iso_cuboid_3<R> &j, const R&)
-{
-  return bool(CGAL::intersection(r, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Iso_cuboid_3<R> &j, const Ray_3<R> &r, const R&)
-{
-  return bool(CGAL::intersection(r, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Segment_3<R> &s, const Iso_cuboid_3<R> &j, const R&)
-{
-  return bool(CGAL::intersection(s, j));
-}
-
-template <class R>
-inline bool
-do_intersect(const Iso_cuboid_3<R> &j, const Segment_3<R> &s, const R&)
-{
-  return bool(CGAL::intersection(s, j));
-}
-
-} // namespace internal
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_cuboid_3.h b/3rdparty/CGAL-4.6/include/CGAL/Iso_cuboid_3.h
deleted file mode 100644
index 72706ef..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Iso_cuboid_3.h
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_ISO_CUBOID_3_H
-#define CGAL_ISO_CUBOID_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3
-{
-  typedef typename R_::RT                 RT;
-  typedef typename R_::Point_3            Point_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Iso_cuboid_3                    Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_cuboid_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<3>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Iso_cuboid_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                    R;
-
-  Iso_cuboid_3() {}
-
-  Iso_cuboid_3(const Rep&  r)
-      : Rep(r) {}
-
-  Iso_cuboid_3(const Point_3& p, const Point_3& q)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p,q)) {}
-
-  Iso_cuboid_3(const Point_3& p, const Point_3& q, int)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p, q, 0)) {}
-
-  Iso_cuboid_3(const Point_3 &left,   const Point_3 &right,
-               const Point_3 &bottom, const Point_3 &top,
-               const Point_3 &far_,   const Point_3 &close)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), left, right, bottom,
-                                                    top, far_, close)) {}
-
-  Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-               const RT& max_hx, const RT& max_hy, const RT& max_hz,
-               const RT& hw)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
-				     max_hx, max_hy, max_hz, hw)) {}
-
-  Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
-               const RT& max_hx, const RT& max_hy, const RT& max_hz)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
-					     max_hx, max_hy, max_hz)) {}
-
-  Iso_cuboid_3(const Bbox_3& bbox)
-   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.zmin(),
-				                                 bbox.xmax(), bbox.ymax(), bbox.zmax())) {}
-
-  typename cpp11::result_of<typename R::Construct_min_vertex_3( Iso_cuboid_3 )>::type
-  min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-    return R().construct_min_vertex_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_max_vertex_3( Iso_cuboid_3 )>::type
-  max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-    return R().construct_max_vertex_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Iso_cuboid_3, int )>::type
-  vertex(int i) const
-  {
-    return R().construct_vertex_3_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Iso_cuboid_3, int )>::type
-  operator[](int i) const
-  {
-    return R().construct_vertex_3_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
-  xmin() const
-  {
-    return R().compute_xmin_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
-  xmax() const
-  {
-    return R().compute_xmax_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_ymin_3( Iso_cuboid_3 )>::type
-  ymin() const
-  {
-    return R().compute_ymin_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_ymax_3( Iso_cuboid_3 )>::type
-  ymax() const
-  {
-    return R().compute_ymax_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_zmin_3( Iso_cuboid_3 )>::type
-  zmin() const
-  {
-    return R().compute_zmin_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_zmax_3( Iso_cuboid_3 )>::type
-  zmax() const
-  {
-    return R().compute_zmax_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
-  min_coord(int i) const
-  {
-    CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
-    if (i == 0)
-       return xmin();
-    else if (i == 1)
-       return ymin();
-    else
-       return zmin();
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
-  max_coord(int i) const
-  {
-    CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
-    if (i == 0)
-       return xmax();
-    else if (i == 1)
-       return ymax();
-    else
-       return zmax();
-  }
-
-  bool
-  has_on_bounded_side(const Point_3 &p) const
-  {
-    return R().has_on_bounded_side_3_object()(*this,p);
-  }
-
-  bool
-  has_on_unbounded_side(const Point_3 &p) const
-  {
-    return R().has_on_unbounded_side_3_object()(*this,p);
-  }
-
-  bool
-  has_on_boundary(const Point_3 &p) const
-  {
-    return R().has_on_boundary_3_object()(*this,p);
-  }
-
-  bool
-  has_on(const Point_3 &p) const
-  {
-    return has_on_boundary(p);
-  }
-
-  Bounded_side
-  bounded_side(const Point_3 &p) const
-  {
-    return R().bounded_side_3_object()(*this,p);
-  }
-
-  bool
-  is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_volume_3( Iso_cuboid_3 )>::type
-  volume() const
-  {
-    return R().compute_volume_3_object()(*this);
-  }
-
-  Bbox_3
-  bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-  Iso_cuboid_3
-  transform(const Aff_transformation_3 &t) const
-  {
-    return Iso_cuboid_3(t.transform((this->min)()), t.transform((this->max)()));
-  }
-
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream& os, const Iso_cuboid_3<R>& r)
-{
-  switch(os.iword(IO::mode)) {
-  case IO::ASCII :
-    return os << (r.min)() << ' ' << (r.max)();
-  case IO::BINARY :
-    return os << (r.min)() << (r.max)();
-  default:
-    return os << "Iso_cuboid_3(" << (r.min)() << ", " << (r.max)() << ")";
-  }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream& is, Iso_cuboid_3<R>& r)
-{
-  typename R::Point_3 p, q;
-  is >> p >> q;
-  if (is)
-      r = Iso_cuboid_3<R>(p, q);
-  return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_ISO_CUBOID_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2.h
deleted file mode 100644
index e18c132..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2.h
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_ISO_RECTANGLE_2_H
-#define CGAL_ISO_RECTANGLE_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_2               Point_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-
-  typedef Iso_rectangle_2                    Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_rectangle_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Iso_rectangle_2  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Iso_rectangle_2() {}
-
-  Iso_rectangle_2(const Rep& r)
-    : Rep(r) {}
-
-  Iso_rectangle_2(const Point_2 &p, const Point_2 &q, int)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q, 0)) {}
-
-  Iso_rectangle_2(const Point_2 &p, const Point_2 &q)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q)) {}
-
-  Iso_rectangle_2(const Point_2 &left, const Point_2 &right,
-                  const Point_2 &bottom, const Point_2 &top)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), left, right, bottom, top)) {}
-
-  Iso_rectangle_2(const RT& min_hx, const RT& min_hy,
-                  const RT& max_hx, const RT& max_hy)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy)) {}
-
-  Iso_rectangle_2(const RT& min_hx, const RT& min_hy,
-                  const RT& max_hx, const RT& max_hy, const RT& hw)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {}
-
-  Iso_rectangle_2(const Bbox_2& bbox)
-    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.xmax(), bbox.ymax())) {}
-
-  typename cpp11::result_of<typename R::Construct_min_vertex_2( Iso_rectangle_2 )>::type
-  min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-    return R().construct_min_vertex_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_max_vertex_2( Iso_rectangle_2 )>::type
-  max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-  {
-    return R().construct_max_vertex_2_object()(*this);
-  }
-
-  bool
-  operator==(const Iso_rectangle_2 &i) const
-  {
-    return R().equal_2_object()(*this, i);
-  }
-
-  bool
-  operator!=(const Iso_rectangle_2 &i) const
-  {
-    return ! (*this == i);
-  }
-
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
-  vertex(int i) const
-  {
-    return R().construct_vertex_2_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
-  operator[](int i) const
-  {
-    return R().construct_vertex_2_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
-  xmin() const
-  {
-    return R().compute_xmin_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmax_2( Iso_rectangle_2 )>::type
-  xmax() const
-  {
-    return R().compute_xmax_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_ymin_2( Iso_rectangle_2 )>::type
-  ymin() const
-  {
-    return R().compute_ymin_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_ymax_2( Iso_rectangle_2 )>::type
-  ymax() const
-  {
-    return R().compute_ymax_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
-  min_coord(int i) const
-  {
-    CGAL_kernel_precondition( i == 0 || i == 1 );
-    if (i == 0)
-      return xmin();
-    else
-      return ymin();
-  }
-
-  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
-  max_coord(int i) const
-  {
-    CGAL_kernel_precondition( i == 0 || i == 1 );
-    if (i == 0)
-      return xmax();
-    else
-      return ymax();
-  }
-
-  FT
-  area() const
-  {
-    return R().compute_area_2_object()(*this);
-  }
-
-
-  bool
-  has_on_boundary(const Point_2 &p) const
-  {
-    return R().has_on_boundary_2_object()(*this,p);
-  }
-
-
-  bool
-  has_on_bounded_side(const Point_2 &p) const
-  {
-    return R().has_on_bounded_side_2_object()(*this,p);
-  }
-
-
-  bool
-  has_on_unbounded_side(const Point_2 &p) const
-  {
-    return R().has_on_unbounded_side_2_object()(*this,p);
-  }
-
-  Bounded_side
-  bounded_side(const Point_2 &p) const
-  {
-    return R().bounded_side_2_object()(*this,p);
-  }
-
-
-  bool
-  is_degenerate() const
-  {
-    return R().is_degenerate_2_object()(*this);
-  }
-
-  Bbox_2
-  bbox() const
-  {
-    return R().construct_bbox_2_object()(*this);
-  }
-
-  Iso_rectangle_2 transform(const Aff_transformation_2 &t) const
-  {
-    // FIXME : We need a precondition like this!!!
-    // CGAL_kernel_precondition(t.is_axis_preserving());
-    return Iso_rectangle_2(t.transform(min  BOOST_PREVENT_MACRO_SUBSTITUTION ()), 
-			   t.transform(max  BOOST_PREVENT_MACRO_SUBSTITUTION ()));
-  }
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Iso_rectangle_2<R> &r)
-{
-  switch(os.iword(IO::mode)) {
-  case IO::ASCII :
-    return os << (r.min)() << ' ' << (r.max)();
-  case IO::BINARY :
-    return os << (r.min)() << (r.max)();
-  default:
-    return os << "Iso_rectangle_2(" << (r.min)() << ", " << (r.max)() << ")";
-  }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Iso_rectangle_2<R> &r)
-{
-  typename R::Point_2 p, q;
-
-  is >> p >> q;
-
-  if (is)
-    r = Iso_rectangle_2<R>(p, q);
-  return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_ISO_RECTANGLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iterator_range.h b/3rdparty/CGAL-4.6/include/CGAL/Iterator_range.h
deleted file mode 100644
index 01ba498..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Iterator_range.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_ITERATOR_RANGE_H
-#define CGAL_ITERATOR_RANGE_H
-
-#include <CGAL/tuple.h>
-#include <utility>
-
-
-namespace CGAL {
-
-  /*!
-\ingroup PkgStlExtension
-  /// `CGAL::Iterator_range` is a...
-  */
-  template <typename I>
-  class Iterator_range
-    : public std::pair<I,I>{
-    
-    typedef std::pair<I,I> Base;
-
-  public:
-
-    typedef I iterator;
-    typedef I const_iterator;
-
-    Iterator_range(I b, I e)
-      : Base(b,e)
-    {}
-
-    Iterator_range(const std::pair<I,I>& ip)
-      : Base(ip)
-    {}
-
-  I begin() const
-  {
-    return this->first;
-  }
-
-  I end() const
-  {
-    return this->second;
-  }
-};
-
-  template <typename T>
-  Iterator_range<T>
-  make_range(const T& b, const T&e)
-  {
-    return Iterator_range<T>(b,e);
-  }
-
-  template<typename T>
-  inline T range_begin( Iterator_range<T> & x )
-  {
-    return x.first;
-  }
-  
-  template<typename T>
-  inline T range_end( Iterator_range<T> & x )
-  {
-    return x.second;
-  }
-  
-  template<typename T>
-  inline T range_begin(const Iterator_range<T>& x )
-  {
-    return x.first;
-  }
-  
-  template<typename T>
-  inline T range_end(const Iterator_range<T>& x )
-  {
-    return x.second;
-  }  
-} // namespace CGAL
-
-#endif // CGAL_ITERATOR_RANGE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kd_tree.h b/3rdparty/CGAL-4.6/include/CGAL/Kd_tree.h
deleted file mode 100644
index 81cc922..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kd_tree.h
+++ /dev/null
@@ -1,446 +0,0 @@
-// Copyright (c) 2002,2011,2014 Utrecht University (The Netherlands), Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>),
-//               : Waqar Khan <wkhan at mpi-inf.mpg.de>
-
-#ifndef CGAL_KD_TREE_H
-#define CGAL_KD_TREE_H
-
-#include <CGAL/basic.h>
-#include <CGAL/assertions.h>
-#include <vector>
-
-#include <CGAL/algorithm.h>
-#include <CGAL/Kd_tree_node.h>
-#include <CGAL/Splitters.h>
-#include <CGAL/internal/Get_dimension_tag.h>
-
-#include <deque>
-#include <boost/container/deque.hpp>
-
-#ifdef CGAL_HAS_THREADS
-#include <boost/thread/mutex.hpp>
-#endif
-
-namespace CGAL {
-
-//template <class SearchTraits, class Splitter_=Median_of_rectangle<SearchTraits>, class UseExtendedNode = Tag_true >
-template <class SearchTraits, class Splitter_=Sliding_midpoint<SearchTraits>, class UseExtendedNode = Tag_true >
-class Kd_tree {
-
-public:
-  typedef SearchTraits Traits;
-  typedef Splitter_ Splitter;
-  typedef typename SearchTraits::Point_d Point_d;
-  typedef typename Splitter::Container Point_container;
-
-  typedef typename SearchTraits::FT FT;
-  typedef Kd_tree_node<SearchTraits, Splitter, UseExtendedNode > Node;
-  typedef Kd_tree_leaf_node<SearchTraits, Splitter, UseExtendedNode > Leaf_node;
-  typedef Kd_tree_internal_node<SearchTraits, Splitter, UseExtendedNode > Internal_node;
-  typedef Kd_tree<SearchTraits, Splitter> Tree;
-  typedef Kd_tree<SearchTraits, Splitter,UseExtendedNode> Self;
-
-  typedef Node* Node_handle;
-  typedef const Node* Node_const_handle;
-  typedef Leaf_node* Leaf_node_handle;
-  typedef const Leaf_node* Leaf_node_const_handle;
-  typedef Internal_node* Internal_node_handle;
-  typedef const Internal_node* Internal_node_const_handle;
-  typedef typename std::vector<const Point_d*>::const_iterator Point_d_iterator;
-  typedef typename std::vector<const Point_d*>::const_iterator Point_d_const_iterator;
-  typedef typename Splitter::Separator Separator;
-  typedef typename std::vector<Point_d>::const_iterator iterator;
-  typedef typename std::vector<Point_d>::const_iterator const_iterator;
-
-  typedef typename std::vector<Point_d>::size_type size_type;
-
-  typedef typename internal::Get_dimension_tag<SearchTraits>::Dimension D;
-
-private:
-  SearchTraits traits_;
-  Splitter split;
-
-
-  // wokaround for https://svn.boost.org/trac/boost/ticket/9332
-#if   (_MSC_VER == 1800) && (BOOST_VERSION == 105500)
-  std::deque<Internal_node> internal_nodes;
-  std::deque<Leaf_node> leaf_nodes;
-#else
-  boost::container::deque<Internal_node> internal_nodes;
-  boost::container::deque<Leaf_node> leaf_nodes;
-#endif
-
-  Node_handle tree_root;
-
-  Kd_tree_rectangle<FT,D>* bbox;
-  std::vector<Point_d> pts;
-
-  // Instead of storing the points in arrays in the Kd_tree_node
-  // we put all the data in a vector in the Kd_tree.
-  // and we only store an iterator range in the Kd_tree_node.
-  //
-  std::vector<const Point_d*> data;
-
-
-  #ifdef CGAL_HAS_THREADS
-  mutable boost::mutex building_mutex;//mutex used to protect const calls inducing build()
-  #endif
-  bool built_;
-
-  // protected copy constructor
-  Kd_tree(const Tree& tree)
-    : traits_(tree.traits_),built_(tree.built_)
-  {};
-
-
-  // Instead of the recursive construction of the tree in the class Kd_tree_node
-  // we do this in the tree class. The advantage is that we then can optimize
-  // the allocation of the nodes.
-
-  // The leaf node
-  Node_handle
-  create_leaf_node(Point_container& c)
-  {
-    Leaf_node node(true , static_cast<unsigned int>(c.size()));
-    std::ptrdiff_t tmp = c.begin() - data.begin();
-    node.data = pts.begin() + tmp;
-
-    leaf_nodes.push_back(node);
-    Leaf_node_handle nh = &leaf_nodes.back();
-
-   
-    return nh;
-  }
-
-
-  // The internal node
-
-  Node_handle
-  create_internal_node(Point_container& c, const Tag_true&)
-  {
-    return create_internal_node_use_extension(c);
-  }
-
-  Node_handle
-  create_internal_node(Point_container& c, const Tag_false&)
-  {
-    return create_internal_node(c);
-  }
-
-
-
-  // TODO: Similiar to the leaf_init function above, a part of the code should be
-  //       moved to a the class Kd_tree_node.
-  //       It is not proper yet, but the goal was to see if there is
-  //       a potential performance gain through the Compact_container
-  Node_handle
-  create_internal_node_use_extension(Point_container& c)
-  {
-    Internal_node node(false);
-    internal_nodes.push_back(node);
-    Internal_node_handle nh = &internal_nodes.back();
-
-    Separator sep;
-    Point_container c_low(c.dimension(),traits_);
-    split(sep, c, c_low);
-    nh->set_separator(sep);
-
-    int cd  = nh->cutting_dimension();
-    if(!c_low.empty())
-      nh->low_val = c_low.tight_bounding_box().max_coord(cd);
-    else
-      nh->low_val = c_low.bounding_box().min_coord(cd);
-    if(!c.empty())
-      nh->high_val = c.tight_bounding_box().min_coord(cd);
-    else
-      nh->high_val = c.bounding_box().max_coord(cd);
-
-    CGAL_assertion(nh->cutting_value() >= nh->low_val);
-    CGAL_assertion(nh->cutting_value() <= nh->high_val);
-
-    if (c_low.size() > split.bucket_size()){
-      nh->lower_ch = create_internal_node_use_extension(c_low);
-    }else{
-      nh->lower_ch = create_leaf_node(c_low);
-    }
-    if (c.size() > split.bucket_size()){
-      nh->upper_ch = create_internal_node_use_extension(c);
-    }else{
-      nh->upper_ch = create_leaf_node(c);
-    }
-
-    
-    
-
-    return nh;
-  }
-
-
-  // Note also that I duplicated the code to get rid if the if's for
-  // the boolean use_extension which was constant over the construction
-  Node_handle
-  create_internal_node(Point_container& c)
-  {
-    Internal_node node(false);
-    internal_nodes.push_back(node);
-    Internal_node_handle nh = &internal_nodes.back();
-    Separator sep;
-
-    Point_container c_low(c.dimension(),traits_);
-    split(sep, c, c_low);
-    nh->set_separator(sep);
-
-    if (c_low.size() > split.bucket_size()){
-      nh->lower_ch = create_internal_node(c_low);
-    }else{
-      nh->lower_ch = create_leaf_node(c_low);
-    }
-    if (c.size() > split.bucket_size()){
-      nh->upper_ch = create_internal_node(c);
-    }else{
-      nh->upper_ch = create_leaf_node(c);
-    }
-
-   
-
-    return nh;
-  }
-
-
-
-public:
-
-  Kd_tree(Splitter s = Splitter(),const SearchTraits traits=SearchTraits())
-    : traits_(traits),split(s), built_(false)
-  {}
-
-  template <class InputIterator>
-  Kd_tree(InputIterator first, InputIterator beyond,
-	  Splitter s = Splitter(),const SearchTraits traits=SearchTraits())
-    : traits_(traits),split(s), built_(false)
-  {
-    pts.insert(pts.end(), first, beyond);
-  }
-
-  bool empty() const {
-    return pts.empty();
-  }
-
-  void
-  build()
-  {
-    const Point_d& p = *pts.begin();
-    typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits_.construct_cartesian_const_iterator_d_object();
-    int dim = static_cast<int>(std::distance(ccci(p), ccci(p,0)));
-
-    data.reserve(pts.size());
-    for(unsigned int i = 0; i < pts.size(); i++){
-      data.push_back(&pts[i]);
-    }
-    Point_container c(dim, data.begin(), data.end(),traits_);
-    bbox = new Kd_tree_rectangle<FT,D>(c.bounding_box());
-    if (c.size() <= split.bucket_size()){
-      tree_root = create_leaf_node(c);
-    }else {
-      tree_root = create_internal_node(c, UseExtendedNode());
-    }
-
-    //Reorder vector for spatial locality
-    std::vector<Point_d> ptstmp;
-    ptstmp.resize(pts.size());
-    for (std::size_t i = 0; i < pts.size(); ++i){
-      ptstmp[i] = *data[i];
-    }
-    for(std::size_t i = 0; i < leaf_nodes.size(); ++i){
-      std::ptrdiff_t tmp = leaf_nodes[i].begin() - pts.begin();
-      leaf_nodes[i].data = ptstmp.begin() + tmp;
-    }
-    pts.swap(ptstmp);
-
-    data.clear();
-
-    built_ = true;
-  }
-
-private:
-  //any call to this function is for the moment not threadsafe
-  void const_build() const {
-    #ifdef CGAL_HAS_THREADS
-    //this ensure that build() will be called once
-    boost::mutex::scoped_lock scoped_lock(building_mutex);
-    if(!is_built())
-    #endif
-      const_cast<Self*>(this)->build(); //THIS IS NOT THREADSAFE
-  }
-public:
-
-  bool is_built() const
-  {
-    return built_;
-  }
-
-  void invalidate_built()
-  {
-    if(is_built()){
-      internal_nodes.clear();
-      leaf_nodes.clear();
-      data.clear();
-      delete bbox;
-      built_ = false;
-    }
-  }
-
-  void clear()
-  {
-    invalidate_built();
-    pts.clear();
-  }
-
-  void
-  insert(const Point_d& p)
-  {
-    invalidate_built();
-    pts.push_back(p);
-  }
-
-  template <class InputIterator>
-  void
-  insert(InputIterator first, InputIterator beyond)
-  {
-    invalidate_built();
-    pts.insert(pts.end(),first, beyond);
-  }
-
-  //For efficiency; reserve the size of the points vectors in advance (if the number of points is already known).
-  void reserve(size_t size)
-  {
-    pts.reserve(size);
-  }
-
-  //Get the capacity of the underlying points vector.
-  size_t capacity()
-  {
-    return pts.capacity();
-  }
-
-
-  template <class OutputIterator, class FuzzyQueryItem>
-  OutputIterator
-  search(OutputIterator it, const FuzzyQueryItem& q) const
-  {
-    if(! pts.empty()){
-
-      if(! is_built()){
-	const_build();
-      }
-      Kd_tree_rectangle<FT,D> b(*bbox);
-      return tree_root->search(it,q,b);
-    }
-    return it;
-  }
-
-  ~Kd_tree() {
-    if(is_built()){
-      delete bbox;
-    }
-  }
-
-
-  const SearchTraits&
-  traits() const
-  {
-    return traits_;
-  }
-
-  Node_const_handle
-  root() const
-  {
-    if(! is_built()){
-      const_build();
-    }
-    return tree_root;
-  }
-
-  Node_handle
-  root()
-  {
-    if(! is_built()){
-      build();
-    }
-    return tree_root;
-  }
-
-  void
-  print() const
-  {
-    if(! is_built()){
-      const_build();
-    }
-    root()->print();
-  }
-
-  const Kd_tree_rectangle<FT,D>&
-  bounding_box() const
-  {
-    if(! is_built()){
-      const_build();
-    }
-    return *bbox;
-  }
-
-  const_iterator
-  begin() const
-  {
-    return pts.begin();
-  }
-
-  const_iterator
-  end() const
-  {
-    return pts.end();
-  }
-
-  size_type
-  size() const
-  {
-    return pts.size();
-  }
-
-  // Print statistics of the tree.
-  std::ostream&
-  statistics(std::ostream& s) const
-  {
-    if(! is_built()){
-      const_build();
-    }
-    s << "Tree statistics:" << std::endl;
-    s << "Number of items stored: "
-      << root()->num_items() << std::endl;
-    s << "Number of nodes: "
-      << root()->num_nodes() << std::endl;
-    s << " Tree depth: " << root()->depth() << std::endl;
-    return s;
-  }
-
-
-};
-
-} // namespace CGAL
-
-#endif // CGAL_KD_TREE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kd_tree_node.h b/3rdparty/CGAL-4.6/include/CGAL/Kd_tree_node.h
deleted file mode 100644
index c855494..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kd_tree_node.h
+++ /dev/null
@@ -1,483 +0,0 @@
-// Copyright (c) 2002,2011  Utrecht University (The Netherlands).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Authors       : Hans Tangelder (<hanst at cs.uu.nl>)
-
-#ifndef CGAL_KD_TREE_NODE_H
-#define CGAL_KD_TREE_NODE_H
-
-
-#include <CGAL/Splitters.h>
-#include <CGAL/Compact_container.h>
-#include <boost/cstdint.hpp>
-
-namespace CGAL {
-
-  template <class SearchTraits, class Splitter, class UseExtendedNode> 
-  class Kd_tree;
-
-  template < class TreeTraits, class Splitter, class UseExtendedNode > 
-  class Kd_tree_node {
-
-     friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
-
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_handle Node_handle;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_const_handle Node_const_handle;
-     typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Internal_node_handle Internal_node_handle;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Internal_node_const_handle Internal_node_const_handle;
-     typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Leaf_node_handle Leaf_node_handle;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Leaf_node_const_handle Leaf_node_const_handle;
-    typedef typename TreeTraits::Point_d Point_d;
-
-    typedef typename TreeTraits::FT FT;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Separator Separator;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Point_d_iterator Point_d_iterator;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::iterator iterator;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::D D;
-
-    bool leaf;
-
-  public : 
-    Kd_tree_node(bool leaf_)
-      :leaf(leaf_){}
-
-    bool is_leaf() const{
-      return leaf;
-    }
-
-    std::size_t 
-    num_items() const
-    {
-      if (is_leaf()){
-        Leaf_node_const_handle node = 
-          static_cast<Leaf_node_const_handle>(this);
-        return node->size();
-      }
-      else {
-        Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-	return node->lower()->num_items() + node->upper()->num_items();
-      }
-    }
-
-    std::size_t
-    num_nodes() const
-    {
-      if (is_leaf()) return 1;
-      else {
-        Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-	return node->lower()->num_nodes() + node->upper()->num_nodes();
-      }
-    }
-
-    int 
-    depth(const int current_max_depth) const
-    {
-      if (is_leaf()){
-	return current_max_depth;
-      }
-      else {
-        Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-        return 
-	     (std::max)( node->lower()->depth(current_max_depth + 1),
-			 node->upper()->depth(current_max_depth + 1));
-      }
-    }
-
-    int 
-    depth() const
-    {
-      return depth(1); 
-    }
-
-    template <class OutputIterator>
-    OutputIterator 
-    tree_items(OutputIterator it) const {
-      if (is_leaf()) {
-         Leaf_node_const_handle node = 
-          static_cast<Leaf_node_const_handle>(this);
-	 if (node->size()>0) 
-	    for (iterator i=node->begin(); i != node->end(); i++) 
-	      {*it=*i; ++it;} 
-	}
-      else {
-         Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-	it=node->lower()->tree_items(it);  
-	it=node->upper()->tree_items(it); 
-      }
-      return it;
-    }
-
-     void 
-    indent(int d) const
-    {
-      for(int i = 0; i < d; i++){
-	std::cout << " ";
-      }
-    }
-
-
-    void 
-    print(int d = 0) const 
-    {
-      if (is_leaf()) {
-        Leaf_node_const_handle node = 
-          static_cast<Leaf_node_const_handle>(this);
-	indent(d);
-	std::cout << "leaf" << std::endl;
-	if (node->size()>0)
-	  for (iterator i=node->begin(); i != node->end(); i++)
-	  {indent(d);std::cout << *i << std::endl;}
-      }
-      else {
-        Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-	indent(d);
-	std::cout << "lower tree" << std::endl;
-	node->lower()->print(d+1);
-	indent(d);
-	std::cout << "separator: dim = " << node->cutting_dimension() << "  val = " << node->cutting_value() << std::endl;
-	indent(d);
-	std::cout << "upper tree" << std::endl;
-	node->upper()->print(d+1); 
-      }
-    }
-
-
-    template <class OutputIterator, class FuzzyQueryItem>
-    OutputIterator 
-    search(OutputIterator it, const FuzzyQueryItem& q,
-	   Kd_tree_rectangle<FT,D>& b) const
-    {
-      if (is_leaf()) { 
-        Leaf_node_const_handle node = 
-          static_cast<Leaf_node_const_handle>(this);
-	if (node->size()>0) 
-	  for (iterator i=node->begin(); i != node->end(); i++) 
-	    if (q.contains(*i)) 
-	      {*it=*i; ++it;}
-      }
-      else {
-         Internal_node_const_handle node = 
-          static_cast<Internal_node_const_handle>(this);
-	// after splitting b denotes the lower part of b
-	Kd_tree_rectangle<FT,D> b_upper(b);
-	b.split(b_upper, node->cutting_dimension(),
-		node->cutting_value());
-                             
-	if (q.outer_range_contains(b)) 	
-	  it=node->lower()->tree_items(it);
-	else
-	  if (q.inner_range_intersects(b)) 
-	    it=node->lower()->search(it,q,b);
-	if  (q.outer_range_contains(b_upper))     
-	  it=node->upper()->tree_items(it);
-	else
-	  if (q.inner_range_intersects(b_upper)) 
-	    it=node->upper()->search(it,q,b_upper);
-      };
-      return it;				
-    }
-  };
-
-  template < class TreeTraits, class Splitter, class UseExtendedNode > 
-  class Kd_tree_leaf_node : public Kd_tree_node< TreeTraits, Splitter, UseExtendedNode >{
-
-    friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
-    
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::iterator iterator;
-    typedef Kd_tree_node< TreeTraits, Splitter, UseExtendedNode> Base;
-    typedef typename TreeTraits::Point_d Point_d;
-
-  private:
-    
-    // private variables for leaf nodes
-    boost::int32_t n; // denotes number of items in a leaf node
-    iterator data; // iterator to data in leaf node
-
-                    
-  public:
-		
-    // default constructor
-    Kd_tree_leaf_node() 
-    {}
-
-    Kd_tree_leaf_node(bool leaf_ ) 
-      : Base(leaf_)
-    {}
-
-    Kd_tree_leaf_node(bool leaf_,unsigned int n_ ) 
-      : Base(leaf_), n(n_)
-    {}
-
-    // members for all nodes
-   
-    // members for leaf nodes only
-    inline 
-    unsigned int 
-    size() const 
-    { 
-      return n;
-    }
-  
-    inline 
-    iterator
-    begin() const  
-    {
-      return data;
-    }
-
-    inline 
-    iterator 
-    end() const 
-    {
-      return data + n;
-    }
- 
-  }; //leaf node
-
-
-
-  template < class TreeTraits, class Splitter, class UseExtendedNode> 
-  class Kd_tree_internal_node : public Kd_tree_node< TreeTraits, Splitter, UseExtendedNode >{
-
-    friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
-
-    typedef Kd_tree_node< TreeTraits, Splitter, UseExtendedNode> Base;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_handle Node_handle;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_const_handle Node_const_handle;
-
-    typedef typename TreeTraits::FT FT;
-    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Separator Separator;
-
-  private:
-    
-       // private variables for internal nodes
-    boost::int32_t cut_dim;
-    FT cut_val;
-    Node_handle lower_ch, upper_ch;
-
-
-    // private variables for extended internal nodes
-    FT low_val;
-    FT high_val;
-                
-  public:
-
-    // default constructor
-    Kd_tree_internal_node() 
-    {}
-
-    Kd_tree_internal_node(bool leaf_) 
-      : Base(leaf_)
-    {}
-    
-    
-    // members for internal node and extended internal node
-
-    inline 
-    Node_const_handle 
-    lower() const 
-    {
-      return lower_ch; 
-    }
-
-    inline 
-    Node_const_handle 
-    upper() const 
-    {
-      return upper_ch; 
-    }
-
-    inline 
-    Node_handle 
-    lower()
-    {
-      return lower_ch; 
-    }
-
-    inline 
-    Node_handle 
-    upper()
-    {
-      return upper_ch; 
-    }
-  	
-    // inline Separator& separator() {return sep; }
-    // use instead
-    inline
-    void set_separator(Separator& sep){
-      cut_dim = sep.cutting_dimension();
-      cut_val = sep.cutting_value();
-    }
-  	
-    inline 
-    FT 
-    cutting_value() const 
-    {
-      return cut_val;
-    }
-  	
-    inline 
-    int 
-    cutting_dimension() const 
-    {
-      return cut_dim;
-    }
-
-    // members for extended internal node only
-    inline 
-    FT
-    low_value() const 
-    { 
-      return low_val; 
-    }
-    
-    inline 
-    FT
-    high_value() const 
-    {
-      return high_val; 
-    }
-       
-
-    /*Separator& 
-    separator() 
-    {
-      return Separator(cutting_dimension,cutting_value);
-    }*/
-	
-
-  };//internal node
-
- template < class TreeTraits, class Splitter> 
- class Kd_tree_internal_node<TreeTraits,Splitter,Tag_false> : public Kd_tree_node< TreeTraits, Splitter, Tag_false >{
-
-    friend class Kd_tree<TreeTraits,Splitter,Tag_false>;
-
-    typedef Kd_tree_node< TreeTraits, Splitter, Tag_false> Base;
-    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Node_handle Node_handle;
-    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Node_const_handle Node_const_handle;
-
-    typedef typename TreeTraits::FT FT;
-    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Separator Separator;
-
-  private:
-    
-       // private variables for internal nodes
-    boost::uint8_t cut_dim;
-    FT cut_val;
-
-    Node_handle lower_ch, upper_ch;
-                
-  public:
-
-    // default constructor
-    Kd_tree_internal_node() 
-    {}
-
-    Kd_tree_internal_node(bool leaf_) 
-      : Base(leaf_)
-    {}
-    
-    
-    // members for internal node and extended internal node
-
-    inline 
-    Node_const_handle 
-    lower() const 
-    {
-      return lower_ch; 
-    }
-
-    inline 
-    Node_const_handle 
-    upper() const 
-    {
-      return upper_ch; 
-    }
-
-    inline 
-    Node_handle 
-    lower()
-    {
-      return lower_ch; 
-    }
-
-    inline 
-    Node_handle 
-    upper()
-    {
-      return upper_ch; 
-    }
-  	
-    // inline Separator& separator() {return sep; }
-    // use instead
-
-    inline
-    void set_separator(Separator& sep){
-      cut_dim = sep.cutting_dimension();
-      cut_val = sep.cutting_value();
-    }
-  	
-    inline 
-    FT 
-    cutting_value() const 
-    {
-      return cut_val;
-    }
-  	
-    inline 
-    int 
-    cutting_dimension() const 
-    {
-      return cut_dim;
-    }
-
-    // members for extended internal node only
-    inline 
-    FT
-    low_value() const 
-    { 
-      return this->low_val;
-    }
-    
-    inline 
-    FT
-    high_value() const 
-    {
-      return this->high_val;
-    }
-       
-
-   /* Separator& 
-    separator() 
-    {
-      return Separator(cutting_dimension,cutting_value);
-    }*/
-	
-
-  };//internal node
-
-
-
-} // namespace CGAL
-#endif // CGAL_KDTREE_NODE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_checker.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_checker.h
deleted file mode 100644
index 5b1f2d0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_checker.h
+++ /dev/null
@@ -1,323 +0,0 @@
-// Copyright (c) 2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_KERNEL_CHECKER_H
-#define CGAL_KERNEL_CHECKER_H
-
-// This file contains the definition of a kernel traits checker.
-//
-// TODO:
-// - At the moment, only predicates are checked.  To handle constructions as
-//   well, the best approach is probably to have objects be pairs, and do
-//   everything in parallel (cf Curved_kernel's traits checker for an example).
-//   So the template parameter will be a comparator, not a converter.
-
-#include <CGAL/basic.h>
-#include <utility>
-#include <typeinfo>
-
-namespace CGAL {
-
-// Small utility to manipulate pairs for kernel objects, and
-// simple things for bool, Sign...  Object is yet another case...
-template < typename T1, typename T2 >
-struct Pairify {
-  typedef std::pair<T1, T2>  result_type;
-  result_type operator()(const T1 &t1, const T2 &t2) const
-  { return std::make_pair(t1, t2); }
-};
-
-template <>
-struct Pairify <bool, bool> {
-  typedef bool   result_type;
-  result_type operator()(const bool &t1, const bool &t2) const
-  { CGAL_kernel_assertion(t1 == t2); return t1; }
-};
-
-template <>
-struct Pairify <Sign, Sign> {
-  typedef Sign   result_type;
-  result_type operator()(const Sign &t1, const Sign &t2) const
-  { CGAL_kernel_assertion(t1 == t2); return t1; }
-};
-
-template <>
-struct Pairify <Bounded_side, Bounded_side> {
-  typedef Bounded_side   result_type;
-  result_type operator()(const Bounded_side &t1, const Bounded_side &t2) const
-  { CGAL_kernel_assertion(t1 == t2); return t1; }
-};
-
-template <>
-struct Pairify <Angle, Angle> {
-  typedef Angle   result_type;
-  result_type operator()(const Angle &t1, const Angle &t2) const
-  { CGAL_kernel_assertion(t1 == t2); return t1; }
-};
-
-
-// Class used by Kernel_checker.
-template <class P1, class P2, class Cmp>
-class Primitive_checker
-{
-    P1  p1;
-    P2  p2;
-    Cmp cmp;
-    typedef Pairify<typename P1::result_type,
-		    typename P2::result_type>  Pair_maker;
-    Pair_maker  pair_maker;
-
-public:
-
-    typedef typename Pair_maker::result_type   result_type;
-
-    Primitive_checker(const P1 &pp1 = P1(), const P2 &pp2 = P2(),
-                      const Cmp &c = Cmp())
-	: p1(pp1), p2(pp2), cmp(c) {}
-
-    template <class A1>
-    result_type
-    operator()(const A1 &a1) const
-    {
-	typename P1::result_type res1 = p1(a1.first);
-	typename P2::result_type res2 = p2(a1.second);
-	if (! cmp(res1, res2))
-	{
-	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
-		      << " for the inputs : " << std::endl;
-	    std::cerr << a1.first << std::endl;
-	    std::cerr << a1.second << std::endl;
-            std::cerr << "functor first kernel : "
-		      << typeid(p1).name() << std::endl;
-            std::cerr << "functor second kernel: "
-		      << typeid(p2).name() << std::endl;
-	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
-	    CGAL_kernel_assertion(false);
-	}
-	return pair_maker(res1, res2);
-    }
-
-    template <class A1, class A2>
-    result_type
-    operator()(const A1 &a1, const A2 &a2) const
-    {
-	typename P1::result_type res1 = p1(a1.first, a2.first);
-	typename P2::result_type res2 = p2(a1.second, a2.second);
-	if (! cmp(res1, res2))
-	{
-	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
-		      << " for the inputs : " << std::endl;
-	    std::cerr << a1.first << std::endl;
-	    std::cerr << a1.second << std::endl;
-	    std::cerr << a2.first << std::endl;
-	    std::cerr << a2.second << std::endl;
-            std::cerr << "functor first kernel : "
-		      << typeid(p1).name() << std::endl;
-            std::cerr << "functor second kernel: "
-		      << typeid(p2).name() << std::endl;
-	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
-	    CGAL_kernel_assertion(false);
-	}
-	return pair_maker(res1, res2);
-    }
-
-    template <class A1, class A2, class A3>
-    result_type
-    operator()(const A1 &a1, const A2 &a2, const A3 &a3) const
-    {
-	typename P1::result_type res1 = p1(a1.first, a2.first, a3.first);
-	typename P2::result_type res2 = p2(a1.second, a2.second, a3.second);
-	if (! cmp(res1, res2))
-	{
-	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
-		      << " for the inputs : " << std::endl;
-	    std::cerr << a1.first << std::endl;
-	    std::cerr << a1.second << std::endl;
-	    std::cerr << a2.first << std::endl;
-	    std::cerr << a2.second << std::endl;
-	    std::cerr << a3.first << std::endl;
-	    std::cerr << a3.second << std::endl;
-            std::cerr << "functor first kernel : "
-		      << typeid(p1).name() << std::endl;
-            std::cerr << "functor second kernel: "
-		      << typeid(p2).name() << std::endl;
-	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
-	    CGAL_kernel_assertion(false);
-	}
-	return pair_maker(res1, res2);
-    }
-
-    template <class A1, class A2, class A3, class A4>
-    result_type
-    operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
-    {
-	typename P1::result_type res1 = p1(a1.first, a2.first,
-                                           a3.first, a4.first);
-	typename P2::result_type res2 = p2(a1.second, a2.second,
-                                           a3.second, a4.second);
-	if (! cmp(res1, res2))
-	{
-	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
-		      << " for the inputs : " << std::endl;
-	    std::cerr << a1.first << std::endl;
-	    std::cerr << a1.second << std::endl;
-	    std::cerr << a2.first << std::endl;
-	    std::cerr << a2.second << std::endl;
-	    std::cerr << a3.first << std::endl;
-	    std::cerr << a3.second << std::endl;
-	    std::cerr << a4.first << std::endl;
-	    std::cerr << a4.second << std::endl;
-            std::cerr << "functor first kernel : "
-		      << typeid(p1).name() << std::endl;
-            std::cerr << "functor second kernel: "
-		      << typeid(p2).name() << std::endl;
-	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
-	    CGAL_kernel_assertion(false);
-	}
-	return pair_maker(res1, res2);
-    }
-
-    template <class A1, class A2, class A3, class A4, class A5>
-    result_type
-    operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
-               const A5 &a5) const
-    {
-	typename P1::result_type res1 = p1(a1.first, a2.first,
-                                           a3.first, a4.first, a5.first);
-	typename P2::result_type res2 = p2(a1.second, a2.second,
-                                           a3.second, a4.second, a5.second);
-	if (! cmp(res1, res2))
-	{
-	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
-		      << " for the inputs : " << std::endl;
-	    std::cerr << a1.first << std::endl;
-	    std::cerr << a1.second << std::endl;
-	    std::cerr << a2.first << std::endl;
-	    std::cerr << a2.second << std::endl;
-	    std::cerr << a3.first << std::endl;
-	    std::cerr << a3.second << std::endl;
-	    std::cerr << a4.first << std::endl;
-	    std::cerr << a4.second << std::endl;
-	    std::cerr << a5.first << std::endl;
-	    std::cerr << a5.second << std::endl;
-            std::cerr << "functor first kernel : "
-		      << typeid(p1).name() << std::endl;
-            std::cerr << "functor second kernel: "
-		      << typeid(p2).name() << std::endl;
-	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
-	    CGAL_kernel_assertion(false);
-	}
-	return pair_maker(res1, res2);
-    }
-
-    // Same thing with more arguments...
-};
-
-struct dont_check_equal {
-  template < typename T1, typename T2 >
-  bool operator()(const T1 & /* t1 */, const T2 &/*t2*/) const
-  { return true; }
-  template < typename T >
-  bool operator()(const T &t1, const T &t2) const
-  { return t1 == t2; }
-};
-
-template < class K1, class K2, class Cmp = dont_check_equal >
-class Kernel_checker
-{
-protected:
-    K1 k1;
-    K2 k2;
-    Cmp cmp;
-
-public:
-
-    typedef bool                      Boolean;
-    typedef CGAL::Sign                Sign;
-    typedef CGAL::Comparison_result   Comparison_result;
-    typedef CGAL::Orientation         Orientation;
-    typedef CGAL::Oriented_side       Oriented_side;
-    typedef CGAL::Bounded_side        Bounded_side;
-    typedef CGAL::Angle               Angle;
-
-    typedef K1     Kernel1;
-    typedef K2     Kernel2;
-    typedef Cmp    Comparator;
-
-    // Kernel objects are defined as pairs, with primitives run in parallel.
-#define CGAL_kc_pair(X) typedef std::pair<typename K1::X, typename K2::X> X;
-
-    CGAL_kc_pair(RT)
-    CGAL_kc_pair(FT)
-
-    // TODO : Object_[23] are subtil : should probably be Object(pair<...>).
-    // Or should Assign_[23] be used, and that's it ?
-    // In any case, Assign will have to be treated separately because it
-    // takes its first argument by non-const reference.
-    // Maybe Primitive_checker should provide a variant with non-const ref...
-
-    CGAL_kc_pair(Object_2)
-    CGAL_kc_pair(Object_3)
-
-    CGAL_kc_pair(Point_2)
-    CGAL_kc_pair(Vector_2)
-    CGAL_kc_pair(Direction_2)
-    CGAL_kc_pair(Line_2)
-    CGAL_kc_pair(Ray_2)
-    CGAL_kc_pair(Segment_2)
-    CGAL_kc_pair(Triangle_2)
-    CGAL_kc_pair(Iso_rectangle_2)
-    CGAL_kc_pair(Circle_2)
-    CGAL_kc_pair(Conic_2)
-    CGAL_kc_pair(Aff_transformation_2)
-
-    CGAL_kc_pair(Point_3)
-    CGAL_kc_pair(Plane_3)
-    CGAL_kc_pair(Vector_3)
-    CGAL_kc_pair(Direction_3)
-    CGAL_kc_pair(Line_3)
-    CGAL_kc_pair(Ray_3)
-    CGAL_kc_pair(Segment_3)
-    CGAL_kc_pair(Triangle_3)
-    CGAL_kc_pair(Tetrahedron_3)
-    CGAL_kc_pair(Iso_cuboid_3)
-    CGAL_kc_pair(Sphere_3)
-    CGAL_kc_pair(Aff_transformation_3)
-
-#undef CGAL_kc_pair
-
-#define CGAL_Kernel_pred(X, Y) \
-    typedef Primitive_checker<typename K1::X, typename K2::X, Cmp> X; \
-    X Y() const { return X(k1.Y(), k2.Y(), cmp); }
-
-#define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z)
-
-public:
-
-#include <CGAL/Kernel/interface_macros.h>
-};
-
-} //namespace CGAL
-
-#endif // CGAL_KERNEL_CHECKER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Matrix__.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Matrix__.h
deleted file mode 100644
index 978ecf8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Matrix__.h
+++ /dev/null
@@ -1,829 +0,0 @@
-// Copyright (c) 1997-2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_MATRIX___H
-#define CGAL_MATRIX___H
-
-#include <CGAL/Kernel_d/Vector__.h>
-#include <new>
-#include <cstddef>                 // for std::size_t, std::ptrdiff_t
-
-namespace CGAL {
-namespace Linear_Algebra {
-
-template <typename ROW_, typename V_, typename R_, typename P_> 
-class column_iterator_ {
-  ROW_ row_; unsigned i_;
-public:
-  typedef column_iterator_ Self;
-  typedef V_  value_type;
-  typedef R_  reference;
-  typedef P_  pointer;
-  typedef std::size_t     size_type;
-  typedef std::ptrdiff_t  difference_type;
-  typedef std::random_access_iterator_tag iterator_category;
-
-  column_iterator_() : row_(),i_() {}
-  column_iterator_(ROW_ row, unsigned i) : row_(row),i_(i) {}
-
-  bool  operator==( const Self& x) const 
-  { return row_ == x.row_ && i_ == x.i_; }
-  bool  operator!=( const Self& x) const 
-  { return !(*this == x); }
-
-  R_ operator*()  const { return (**row_)[i_]; }
-  P_ operator->() const { return (**row_)+i_; }
-
-  Self& operator++() { ++row_; return *this; }
-  Self  operator++(int) 
-  { Self tmp = *this; ++*this; return tmp; }
-
-  Self& operator--() { --row_; return *this; }
-  Self  operator--(int) 
-  { Self tmp = *this; --*this; return tmp; }
-
-  Self operator+(difference_type i) const
-  { return Self(row_+i,i_); }
-  Self operator-(difference_type i) const
-  { return Self(row_-i,i_); }
-  difference_type operator-(const Self& x) const
-  { return (row_ - x.row_); }
-      
-};
-
-template <typename ROW_, typename V_, typename R_, typename P_> 
-class component_iterator_ {
-  ROW_ row_;  // pointer to row
-  int i_, n_; // offset and limit
-public:
-  typedef component_iterator_ Self;
-  typedef V_  value_type;
-  typedef R_  reference;
-  typedef P_  pointer;
-  typedef std::size_t     size_type;
-  typedef std::ptrdiff_t  difference_type;
-  typedef std::bidirectional_iterator_tag iterator_category;
-
-  component_iterator_() : row_(),i_(),n_() {}
-  component_iterator_(ROW_ row, int i, int n) 
-    : row_(row),i_(i),n_(n) {}
-
-  bool  operator==( const Self& x) const 
-  { return row_==x.row_ && i_==x.i_; }
-  bool  operator!=( const Self& x) const   
-  { return !(*this == x); }
-
-  R_    operator*()  const { return (**row_)[i_]; }
-  P_    operator->() const { return (**row_)+i_; }
-
-  Self& operator++() { ++i_; if (i_==n_) { ++row_; i_=0; } return *this; }
-  Self  operator++(int) { Self tmp = *this; ++*this; return tmp; }
-  Self& operator--() { --i_; if (i_<0) { --row_; i_=n_-1; } return *this; }
-  Self  operator--(int) { Self tmp = *this; --*this; return tmp; }
-     
-};
-
-
-/*{\Msubst
-<NT_,AL_>#
-<NT,AL>#
-Vector_#Vector
-Matrix_#Matrix
-}*/
-/*{\Moptions print_title=yes}*/
-/*{\Moptions outfile=Matrix.man}*/
-/*{\Manpage {Matrix}{}{Matrices with NT Entries}{M}}*/
-
-template <class NT_, class AL_>
-class Matrix_ 
-{ 
-/*{\Mdefinition An instance of data type |\Mname| is a matrix of
-variables of number type |NT|. The types |\Mname| and |Vector_|
-together realize many functions of basic linear algebra.}*/
-
-public:
-
-/*{\Mtypes 6}*/
-
-typedef Vector_<NT_,AL_>* vector_pointer;
-typedef const Vector_<NT_,AL_>* const_vector_pointer;
-
-typedef NT_ NT;
-/*{\Mtypemember the ring type of the components.}*/ 
-
-typedef component_iterator_<vector_pointer*,NT,NT&,NT*> iterator;
-/*{\Mtypemember bidirectional iterator for accessing all components
-row-wise.}*/
-typedef component_iterator_<vector_pointer*,NT,const NT&,const NT*> 
-  const_iterator;
-
-typedef NT* row_iterator;
-/*{\Mtypemember random access iterator for accessing row
-  entries.}*/
-typedef const NT* row_const_iterator;
-
-typedef column_iterator_<vector_pointer*,NT,NT&,NT*> column_iterator;
-/*{\Mtypemember random access iterator for accessing column entries.}*/ 
-typedef column_iterator_<vector_pointer*,NT,const NT&, const NT*> 
-  column_const_iterator;
-
-/*{\Mtext There also constant versions of the above iterators:
-|const_iterator|, |row_const_iterator|, and |column_const_iterator|.}*/
-
-class Identity {};
-/*{\Mtypemember a tag class for identity initialization}*/
-
-typedef Vector_<NT_,AL_> Vector;
-/*{\Mtypemember the vector type used.}*/ 
-
-protected:
-vector_pointer* v_; int dm_,dn_; 
-
-NT& elem(int i, int j) const { return v_[i]->v_[j]; }
-
-typedef typename AL_::template rebind<vector_pointer>::other 
-        allocator_type;
-static allocator_type MM;
-
-inline void allocate_mat_space(vector_pointer*& vi, int d)
-{
-  /* We use this procedure to allocate memory. We use our allocator
-     memory allocation scheme. There we first get an appropriate piece
-     of memory and then initialize each cell by an inplace new. */
-
-  vi = MM.allocate(d); 
-  vector_pointer* p = vi + d - 1; 
-  while (p >= vi) { 
-    new (p) vector_pointer*(0); p--;
-  }
-}
-
-inline void deallocate_mat_space(vector_pointer*& vi, int d)
-{
-  /* deallocate memory via our AL_ object. */
-
-  MM.deallocate(vi,d);
-  vi = (vector_pointer*)0;
-}
-
-inline void check_dimensions(const Matrix_<NT_,AL_>& mat) const
-{ 
-  CGAL_assertion_msg((dm_ == mat.dm_ && dn_ == mat.dn_), 
-    "Matrix::check_dimensions: incompatible matrix dimensions.") ;
-}
-
-public:
-
-/*{\Mcreation 5}*/
-
-Matrix_() : dm_(0),dn_(0) { v_ = (Vector**)0; }
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|.}*/
-Matrix_(int n); 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of
-dimension $n \times n$ initialized to the zero matrix.}*/
-Matrix_(int m, int n); 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of 
-dimension $m \times n$ initialized to the zero matrix.}*/
-Matrix_(std::pair<int,int> p);
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of dimension
-|p.first|$\times$|p.second| initialized to the zero matrix.}*/
-Matrix_(int n , const Identity&, const NT& x = NT(1) ); 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of
-dimension $n \times n$ initialized to the identity matrix
-(times |x|).}*/
-Matrix_(int m, int n, const NT& x);
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of 
-dimension $m \times n$ initialized to the matrix with |x|
-entries.}*/
-
-template <class RAIterator>
-void range_initialize(RAIterator first, RAIterator last,  
-                      std::random_access_iterator_tag) 
-{ typedef typename std::iterator_traits<RAIterator>::value_type value_type;
-  typedef typename value_type::const_iterator const_iterator;
-  dn_ = static_cast<int>(last-first);
-  if (dn_ == 0) { dm_=0; v_=0; return; }
-  dm_ = first->dimension(); 
-  if (dm_ > 0) { 
-    int i,j;
-    allocate_mat_space(v_,dm_);
-    for (i=0; i<dm_; i++) {
-      v_[i] = new Vector(dn_);
-      // for (int j = 0; j < dn_; j++) elem(i,j) = (*(first+j))[i];
-    }
-    const_iterator it;
-    for (j=0; first != last; ++j, ++first) // column wise
-      for (i=0, it=first->begin(); it != first->end(); ++i, ++it) // row wise
-        elem(i,j) = *it;
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class InputIterator>
-void range_initialize(InputIterator first, InputIterator last, 
-                 std::forward_iterator_tag) 
-{ typedef typename std::iterator_traits<InputIterator>::value_type 
-    value_type;
-  std::vector<value_type> V(first,last);
-  range_initialize(V.begin(),V.end(),std::random_access_iterator_tag());
-}
-
-template <class Forward_iterator>
-Matrix_(Forward_iterator first, Forward_iterator last)
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. Let $S$ be
-the ordered set of $n$ column-vectors of common dimension $m$ as given
-by the iterator range |[first,last)|.  |\Mvar| is initialized to an $m
-\times n$ matrix with the columns as specified by $S$.  \precond
-|Forward_iterator| has a value type |V| from which we require to
-provide a iterator type |V::const_iterator|, to have |V::value_type ==
-NT|.\\ Note that |Vector_| or |std::vector<NT>| fulfill these
-requirements.}*/
-{ typedef typename std::iterator_traits<Forward_iterator>::iterator_category 
-    iterator_category;
-  range_initialize(first,last,iterator_category()); }
-
-Matrix_(const std::vector< Vector >& A) 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. Let $A$ be
-an array of $n$ column-vectors of common dimension $m$.  |\Mvar| is
-initialized to an $m \times n$ matrix with the columns as specified by
-$A$. }*/
-{ range_initialize(A.begin(),A.end(),
-    std::random_access_iterator_tag()); }
-
-Matrix_(const Matrix_<NT_,AL_>&); 
-
-Matrix_(const Vector&); 
-/* creates a $d \times 1$ matrix */
-
-Matrix_(int, int, NT**); 
-
-Matrix_<NT_,AL_>& operator=(const Matrix_<NT_,AL_>&);
-
-~Matrix_(); 
-
-/*{\Moperations 3 4}*/
-
-int row_dimension()  const {  return dm_; }
-/*{\Mop returns $n$, the number of rows of |\Mvar|.}*/
-
-int column_dimension()  const { return dn_; }
-/*{\Mop returns $m$, the number of columns of |\Mvar|.}*/
-
-std::pair<int,int> dimension() const 
-/*{\Mop returns $(m,n)$, the dimension pair of |\Mvar|.}*/
-{ return std::pair<int,int>(dm_,dn_); }
-
-Vector& row(int i) const
-/*{\Mop returns the $i$-th row of |\Mvar| (an $m$ - vector).\\
-\precond  $0 \le i \le m - 1$. }*/
-{ CGAL_assertion_msg((0<=i && i<dm_),"Matrix_: row index out of range.");
-  return *v_[i]; 
-}
-
-Vector column(int i) const 
-/*{\Mop returns the $i$-th column of |\Mvar| (an $n$ - vector).\\
-\precond  $0 \le i \le n - 1$. }*/
-{ return Vector(column_begin(i),column_end(i)); }
-
-Vector to_vector() const 
-{ 
-  CGAL_assertion_msg((dn_==1), 
-    "Matrix_::to_vector: cannot make vector from matrix.");
-  return column(0); 
-}
-
-Vector_<NT_,AL_>& operator[](int i) const  
-{ 
-  CGAL_assertion_msg((0<=i && i<dm_), 
-    "Matrix_::operator[]: index out of range.");
-  return row(i); 
-}
-
-NT& operator()(int i, int j)
-/*{\Mfunop returns $M_{ i,j }$. \\
-\precond $0\le i\le m-1$ and $0\le j\le n-1$. }*/
-{ CGAL_assertion_msg((0<=i && i<dm_), 
-    "Matrix_::operator(): row index out of range.");
-  CGAL_assertion_msg((0<=j && j<dn_), 
-    "Matrix_::operator(): column index out of range.");
-  return elem(i,j); 
-}
-
-NT operator()(int i, int j) const
-{ 
-  CGAL_assertion_msg((0<=i && i<dm_), 
-    "Matrix_::operator(): row index out of range.");
-  CGAL_assertion_msg((0<=j && j<dn_), 
-    "Matrix_::operator(): column index out of range.");
-  return elem(i,j); 
-}
-
-void swap_rows(int i, int j)
-/*{\Mop swaps rows $i$ and $j$.
-\precond $0\le i\le m-1$ and $0\le j\le m-1$.}*/
-{ CGAL_assertion(0<=i && i<dm_ && 0<=j && j<dm_);
-  std::swap(v_[i],v_[j]); 
-}
-
-void swap_columns(int i, int j) 
-/*{\Mop swaps columns $i$ and $j$.
-\precond $0\le i\le n-1$ and $0\le j\le n-1$.}*/
-{ CGAL_assertion(0<=i && i<dn_ && 0<=j && j<dn_);
-  for(int l = 0; l < dm_; l++) std::swap(elem(l,i),elem(l,j)); 
-}
-
-row_iterator row_begin(int i) 
-/*{\Mop an iterator pointing to the first entry of the $i$th row.
-\precond $0\le i\le m-1$.}*/
-{ CGAL_assertion_msg((0<=i&&i<dm_),"Matrix: row index out of range.");
-  return v_[i]->begin(); }
-
-row_iterator row_end(int i)   
-/*{\Mop an iterator pointing beyond the last entry of the $i$th row.
-\precond $0\le i\le m-1$.}*/
-{ CGAL_assertion_msg((0<=i&&i<dm_),"Matrix: row index out of range.");
-  return v_[i]->end(); }
-
-row_const_iterator row_begin(int i) const 
-{ CGAL_assertion_msg(0<=i&&i<dm_,"Matrix: row index out of range.");
-  return v_[i]->begin(); }
-row_const_iterator row_end(int i) const  
-{ CGAL_assertion_msg(0<=i&&i<dm_,"Matrix: row index out of range.");
-  return v_[i]->end(); }
-
-column_iterator column_begin(int i) 
-/*{\Mop an iterator pointing to the first entry of the $i$th column.
-\precond $0\le i\le n-1$.}*/
-{ CGAL_assertion_msg(0<=i&&i<dn_,"Matrix: column index out of range.");
-  return column_iterator(v_,i); }
-
-column_iterator column_end(int i)   
-/*{\Mop an iterator pointing beyond the last entry of the $i$th column.
-\precond $0\le i\le n-1$.}*/
-{ return column_begin(i)+dm_; }
-
-column_const_iterator column_begin(int i) const 
-{ CGAL_assertion_msg(0<=i&&i<dn_,"Matrix: column index out of range.");
-  return column_const_iterator(v_,i); }
-column_const_iterator column_end(int i)   const 
-{ return column_begin(i)+dm_; }
-
-iterator begin() { return iterator(v_,0,dn_); }
-/*{\Mop an iterator pointing to the first entry of |\Mvar|.}*/
-iterator end() { return iterator(v_+dm_,0,dn_); }
-/*{\Mop an iterator pointing beyond the last entry of |\Mvar|.}*/
-
-const_iterator begin() const { return const_iterator(v_,0,dn_); }
-const_iterator end() const { return const_iterator(v_+dm_,0,dn_); }
-
-/*{\Mtext The same operations exist for |row_const_iterator| and
-|column_const_iterator|.}*/
-
-bool  operator==(const Matrix_<NT_,AL_>& M1)  const; 
-/*{\Mbinop Test for equality. }*/
-
-bool  operator!=(const Matrix_<NT_,AL_>& M1)  const 
-/*{\Mbinop Test for inequality. }*/
-{ return !(*this == M1); }
-
-/*{\Mtext \headerline{Arithmetic Operators}}*/
-/*{\Mtext
-\settowidth{\typewidth}{|Matrix_<NT,LA>m|}
-\addtolength{\typewidth}{\colsep}
-\callwidth2cm
-\computewidths
-\newcommand{\dimeq}[2]{ 
-\\|M.row_dimension() == M1.row_dimension()| and
-\\|M.column_dimension() == M1.column_dimension()|
-}
-}*/
-
-Matrix_<NT_,AL_> operator+ (const Matrix_<NT_,AL_>& M1); 
-/*{\Mbinop Addition. \precond \dimeq.}*/
-
-Matrix_<NT_,AL_> operator- (const Matrix_<NT_,AL_>& M1); 
-/*{\Mbinop Subtraction. \precond \dimeq.}*/
-
-Matrix_<NT_,AL_> operator-(); // unary
-/*{\Munop Negation.}*/
-
-Matrix_<NT_,AL_>& operator-=(const Matrix_<NT_,AL_>&); 
-
-Matrix_<NT_,AL_>& operator+=(const Matrix_<NT_,AL_>&); 
-
-Matrix_<NT_,AL_> operator*(const Matrix_<NT_,AL_>& M1) const; 
-/*{\Mbinop Multiplication. \precond \\ |\Mvar.column_dimension() = M1.row_dimension()|. }*/
-
-Vector_<NT_,AL_> 
-operator*(const Vector_<NT_,AL_>& vec) const
-{  return ((*this) * Matrix_<NT_,AL_>(vec)).to_vector(); }
-/*{\Mbinop  Multiplication with vector. \precond \\
-|\Mvar.column_dimension() = vec.dimension()|.}*/
-
-Matrix_<NT_,AL_> compmul(const NT& x) const; 
-
-static int compare(const Matrix_<NT_,AL_>& M1, 
-                   const Matrix_<NT_,AL_>& M2);
-
-}; // end of class
-
-/*{\Xtext \headerline{Input and Output}}*/
-
-template <class NT_, class AL_> 
-std::ostream&  operator<<(std::ostream& os, const Matrix_<NT_,AL_>& M);
-/*{\Xbinopfunc writes matrix |\Mvar| row by row to the output stream |os|.}*/
-
-template <class NT_, class AL_> 
-std::istream&  operator>>(std::istream& is, Matrix_<NT_,AL_>& M);
-/*{\Xbinopfunc reads matrix |\Mvar| row by row from the input stream |is|.}*/
-
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(int dim) : dm_(dim),dn_(dim)
-{ 
-  CGAL_assertion_msg((dim >= 0), 
-    "Matrix_::constructor: negative dimension.");
-  if (dm_ > 0) { 
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; i++) 
-      v_[i] = new Vector(dn_);
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(int dim1, int dim2) : dm_(dim1),dn_(dim2)
-{ 
-  CGAL_assertion_msg((dim1>=0 && dim2>=0), 
-    "Matrix_::constructor: negative dimension.");
-
-  if (dm_ > 0) { 
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; i++) 
-      v_[i] = new Vector(dn_); 
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(std::pair<int,int> p) : dm_(p.first),dn_(p.second)
-{ 
-  CGAL_assertion_msg((dm_>=0 && dn_>=0), 
-    "Matrix_::constructor: negative dimension.");
-  if (dm_ > 0) { 
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; i++) 
-      v_[i] = new Vector(dn_); 
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(int dim, const Identity&, const NT& x) : dm_(dim),dn_(dim)
-{ CGAL_assertion_msg((dim >= 0),
-    "matrix::constructor: negative dimension.");
-  if (dm_ > 0) { 
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; i++) 
-      v_[i] = new Vector(dn_); 
-    if (x!=NT(0)) for (int i=0; i<dm_; ++i) elem(i,i)=x;
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(int dim1, int dim2, const NT& x) : dm_(dim1),dn_(dim2)
-{ CGAL_assertion_msg((dim1>=0 && dim2>=0), 
-    "Matrix_::constructor: negative dimension.");
-  if (dm_ > 0) { 
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; ++i) v_[i] = new Vector(dn_,x);
-  } else 
-    v_ = (Vector**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(const Matrix_<NT_,AL_>& p) : dm_(p.dm_),dn_(p.dn_)
-{ if (dm_ > 0) {  
-    allocate_mat_space(v_,dm_);
-    for (int i=0; i<dm_; i++) 
-      v_[i] = new Vector(*p.v_[i]); 
-  }
-  else 
-    v_ = (Vector_<NT_,AL_>**)0; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(const Vector& v) : dm_(v.d_),dn_(1)
-{ if (dm_>0) allocate_mat_space(v_,dm_);
-  else v_ = (Vector_<NT_,AL_>**)0; 
-  for(int i = 0; i < dm_; i++) { 
-    v_[i] = new Vector(1); 
-    elem(i,0) = v[i]; 
-  }
-}
-
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-Matrix_(int dim1, int dim2, NT** p) : dm_(dim1),dn_(dim2)
-{ 
-  CGAL_assertion_msg((dim1 >= 0 && dim2 >= 0), 
-    "Matrix_::constructor: negative dimension.");
-  if (dm_ > 0) {
-    allocate_mat_space(v_,dm_);
-    for(int i=0; i<dm_; i++) { 
-      v_[i] = new Vector_<NT_,AL_>(dn_); 
-      for(int j=0; j<dn_; j++) 
-        elem(i,j) = p[i][j]; 
-    }
-  } else 
-    v_ = (Vector_<NT_,AL_>**)0; 
-}
-
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
-operator=(const Matrix_<NT_,AL_>& mat)
-{ 
-  if (&mat == this)
-    return *this;
-
-  int i,j; 
-  if (dm_ != mat.dm_ || dn_ != mat.dn_) { 
-    for(i=0; i<dm_; i++) delete v_[i]; 
-    if (v_) deallocate_mat_space(v_,dm_);
-
-    dm_ = mat.dm_; dn_ = mat.dn_; 
-    if (dm_>0)
-      allocate_mat_space(v_,dm_);
-    for(i = 0; i < dm_; i++) 
-      v_[i] = new Vector(dn_); 
-  }
-
-  for(i = 0; i < dm_; i++)
-    for(j = 0; j < dn_; j++) 
-      elem(i,j) = mat.elem(i,j); 
-  return *this; 
-}
-
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>::
-~Matrix_()  
-{ 
-  if (v_) {
-    for (int i=0; i<dm_; i++) 
-      delete v_[i];  
-    deallocate_mat_space(v_,dm_);
-  }
-}
-
-
-template <class NT_, class AL_>
-inline bool Matrix_<NT_,AL_>::
-operator==(const Matrix_<NT_,AL_>& x) const
-{ 
-  int i,j; 
-  if (dm_ != x.dm_ || dn_ != x.dn_) 
-    return false; 
-
-  for(i = 0; i < dm_; i++)
-    for(j = 0; j < dn_; j++)
-      if (elem(i,j) != x.elem(i,j)) 
-        return false; 
-  return true; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
-operator+ (const Matrix_<NT_,AL_>& mat)
-{ 
-  int i,j; 
-  check_dimensions(mat); 
-  Matrix_<NT_,AL_> result(dm_,dn_); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      result.elem(i,j) = elem(i,j) + mat.elem(i,j); 
-  return result; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
-operator- (const Matrix_<NT_,AL_>& mat)
-{ 
-  int i,j; 
-  check_dimensions(mat); 
-  Matrix_<NT_,AL_> result(dm_,dn_); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      result.elem(i,j) = elem(i,j) - mat.elem(i,j); 
-  return result; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
-operator- ()  // unary
-{ 
-  int i,j; 
-  Matrix_<NT_,AL_> result(dm_,dn_); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      result.elem(i,j) = -elem(i,j); 
-  return result; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
-operator-= (const Matrix_<NT_,AL_>& mat) 
-{ 
-  int i,j; 
-  check_dimensions(mat); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      elem(i,j) -= mat.elem(i,j); 
-  return *this; 
-}
-
-template <class NT_, class AL_>
-Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
-operator+= (const Matrix_<NT_,AL_>& mat) 
-{ 
-  int i,j; 
-  check_dimensions(mat); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      elem(i,j) += mat.elem(i,j); 
-  return *this; 
-}
-
-template <class NT_, class AL_>
-inline Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
-operator*(const Matrix_<NT_,AL_>& M1) const
-{ CGAL_assertion_msg((dn_==M1.dm_), 
-    "Matrix_::operator*: incompatible matrix types."); 
-  Matrix_<NT_,AL_> result(dm_,M1.dn_); 
-  int i,j,l;
-  for (i=0; i<dm_; ++i)
-    for (j=0; j<M1.dn_; ++j)
-      for (l=0; l<dn_; ++l)
-        result.elem(i,j) += elem(i,l)*M1.elem(l,j);
-  return result;
-}
-
-template <class NT_, class AL_>
-inline Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
-compmul(const NT& f) const
-{ 
-  int i,j; 
-  Matrix_<NT_,AL_> result(dm_,dn_); 
-  for(i=0; i<dm_; i++)
-    for(j=0; j<dn_; j++)
-      result.elem(i,j) = elem(i,j) *f; 
-  return result; 
-}
-
-
-template <class NT, class AL>
-
-Matrix_<NT,AL>  operator*(const NT& x, const Matrix_<NT,AL>& M)
-/*{\Mbinopfunc Multiplication of every entry with |x|. }*/
-{ return M.compmul(x); }
-
-template <class NT, class AL>
-
-Matrix_<NT,AL>  operator*(const Matrix_<NT,AL>& M, const NT& x)
-/*{\Mbinopfunc Multiplication of every entry with |x|. }*/
-{ return M.compmul(x); }
-
-
-
-template <class NT_, class AL_> 
-int Matrix_<NT_,AL_>::
-compare(const Matrix_<NT_,AL_>& M1, const Matrix_<NT_,AL_>& M2) 
-{ int i; int res;
-  M1.check_dimensions(M2);
-  for(i=0; i < M1.row_dimension() && 
-      (res = compare(M1.row(i),M2.row(i))) != 0; i++) {}
-  return res;
-}
-
-
-template <class NT_, class AL_> 
-std::ostream&  operator<<(std::ostream& os, const Matrix_<NT_,AL_>& M)
-{ 
-  /* syntax: d1 d2 
-             x_0,0    ... x_0,d1-1
-                  d2-times
-             x_d2-1,0 ... x_d2-1,d1-1 */
-
-    int d = M.row_dimension();
-    int k = M.column_dimension();
-    switch (os.iword(CGAL::IO::mode)) {
-    case CGAL::IO::BINARY:
-        CGAL::write( os, d);
-        CGAL::write( os, k);
-        for ( int i = 0; i < d; ++i) {
-            for ( int j = 0; j < k; ++j) {
-                CGAL::write( os, M[i][j]);
-            }
-        }
-        break;
-    case CGAL::IO::ASCII:
-        os << d << ' ' << k;
-        for ( int i = 0; i < d; ++i) {
-            for ( int j = 0; j < k; ++j) {
-                os << ' ' << M[i][j];
-            }
-        }
-        break;
-    case CGAL::IO::PRETTY:
-        os << "LA::Matrix((" << d << ", " << k << " [";
-        for ( int i = 0; i < d; ++i) {
-            for ( int j = 0; j < k; ++j) {
-                if ( j != 0)
-                    os << ',' << ' ';
-                os << M[i][j];
-            }
-            if ( i != d)
-                os << ",\n";
-        }
-        os << "])";
-        break;
-    }
-    return os;
-}
-
-template <class NT_, class AL_> 
-std::istream&  operator>>(std::istream& is, Matrix_<NT_,AL_>& M) 
-{ 
-  /* syntax: d1 d2 
-             x_0,0  ... x_0,d1-1
-                  d2-times
-             x_d2,0 ... x_d2,d1-1 */
-
-  int cdim, rdim, i;
-  switch(is.iword(CGAL::IO::mode)) {
-    case CGAL::IO::BINARY : 
-      CGAL::read(is,rdim);
-      CGAL::read(is,cdim);
-      for (i=0; i<rdim*cdim; ++i)
-        CGAL::read(is,M(i/rdim,i%cdim));
-      break;
-    case CGAL::IO::ASCII :
-      is >> rdim >> cdim;
-      M = Matrix_<NT_,AL_>(rdim,cdim);
-      for (i=0; i<rdim*cdim; ++i)
-        is >> M(i/rdim,i%cdim);
-      break; 
-    default:
-      std::cerr<<"\nStream must be in ascii or binary mode"<<std::endl;
-      break;
-  }
-  return is;
-}
-
-template <class NT_, class AL_>
-typename Matrix_<NT_,AL_>::allocator_type Matrix_<NT_,AL_>::MM;
-
-
-/*{\Ximplementation 
-The data type |\Mname| is implemented by two-dimensional arrays of
-variables of type |NT|. The memory layout is row oriented. Operation
-|column| takes time $O(n)$, |row|, |dim1|, |dim2| take constant time,
-and all other operations take time $O(nm)$.  The space requirement is
-$O(nm)$.}*/
-
-
-} // Linear_Algebra
-} // CGAL
-
-#endif // CGAL_MATRIX___H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Pair_d.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Pair_d.h
deleted file mode 100644
index 564e143..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Pair_d.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 1997-2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-#ifndef CGAL_PAIR_D_H
-#define CGAL_PAIR_D_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle_for.h>
-
-namespace CGAL {
-
-template <class R> class Segment_d;
-template <class R> class Ray_d;
-template <class R> class Line_d;
-
-template <class R> 
-class Pair_d 
-{
-  typedef Pair_d<R> Self;
-  typedef typename R::Point_d Point_d;
-  typedef typename R::Vector_d Vector_d;
-  typedef typename R::Direction_d Direction_d;
-  Point_d _p[2];
-
-  friend class Line_d<R>; 
-  friend class Ray_d<R>; 
-  friend class Segment_d<R>; 
-   
-/* Any line object in $d$ - space is defined by two points |_p1| and |_p2|
-respectively. There exists an orientation from _p1 to _p2. */
-
-public: 
-Pair_d(int d = 0) { _p[0]=_p[1]=Point_d(d); }
-
-Pair_d(const Point_d& p, const Point_d& q)
-{ CGAL_assertion_msg((p.dimension() == q.dimension()), 
-  "Pair_d::constructor: source and target must have the same dimension."); 
-  _p[0]=p; _p[1]=q;
-}
-
-bool is_degenerate() const
-{ return (_p[0] == _p[1]); }
-
-Vector_d vector() const 
-{ return (_p[1] - _p[0]); }
-
-Direction_d direction() const
-{ return vector().direction(); }
-
-void read(std::istream& is)
-{ 
-  switch( is.iword(CGAL::IO::mode) ) {
-    case CGAL::IO::ASCII :
-      is >> _p[0] >> _p[1]; break;
-    case CGAL::IO::BINARY :
-      CGAL::read(is, _p[0]); CGAL::read(is, _p[1]); break;
-    default:
-    CGAL_error_msg("\nStream must be in ascii or binary mode\n"); 
-  }
-}
-
-void print(std::ostream& os, const char* _name) const
-{ 
-  switch( os.iword(CGAL::IO::mode) ) {
-    case CGAL::IO::ASCII :
-      os << _p[0] << " " <<  _p[1]; break;
-    case CGAL::IO::BINARY :
-      CGAL::write(os, _p[0]); CGAL::write(os, _p[1]); break;
-    default :
-      os << _name << "(" << _p[0] << ", " << _p[1] << ")"; break;
-  }
-}
-
-}; // Pair_d<R>
-
-} //namespace CGAL
-#endif //CGAL_PAIR_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Sphere_d.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Sphere_d.h
deleted file mode 100644
index 5756fcc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Sphere_d.h
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright (c) 2000,2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel
-
-#ifndef CGAL_SPHERE_D_H
-#define CGAL_SPHERE_D_H
-
-#include <CGAL/basic.h>
-#include <vector>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R> class Sphere_d;
-template <class R> bool equal_as_sets(const Sphere_d<R>&, const Sphere_d<R>&);
-
-template <class R>
-class  Sphere_d_rep  {
-
-  typedef typename R::Point_d Point_d;
-
-  friend class Sphere_d<R>;
-  friend bool equal_as_sets <>
-    (const Sphere_d<R>&, const Sphere_d<R>&);
-
-  std::vector< Point_d > P; // d+1 defining points, index range 0-d
-  Orientation orient;       // orientation(P)
-  Point_d* cp;              // pointer to center (lazy calculated)
-  
-public:
-  Sphere_d_rep() : cp(0) {}
-  Sphere_d_rep(int d)  : P(d), cp(0) {}
-
-  template <class ForwardIterator>
-  Sphere_d_rep(int d, ForwardIterator first, ForwardIterator last) : 
-     P(first,last), cp(0)
-  { TUPLE_DIM_CHECK(P.begin(),P.end(),Sphere_d);
-    CGAL_assertion(d+1==int(P.size()));
-    typename R::Orientation_d orientation_;
-    orient = orientation_(P.begin(),P.end()); }
-
-  ~Sphere_d_rep() { if (cp) delete cp; }
-
-};  // Sphere_d_rep<R>
-
-/*{\Manpage {Sphere_d}{R}{Simple Spheres}{S}}*/ 
-
-template <class R_>
-class Sphere_d : public Handle_for< Sphere_d_rep<R_> > {
-
-/*{\Mdefinition 
-An instance $S$ of the data type |Sphere_d| is an oriented sphere in
-some $d$-dimensional space. A sphere is defined by $d+1$ points with
-rational coordinates (class |Point_d<R>|). We use $A$ to denote the
-array of the defining points.  A set $A$ of defining points is
-\emph{legal} if either the points are affinely independent or if the
-points are all equal. Only a legal set of points defines a sphere in
-the geometric sense and hence many operations on spheres require the
-set of defining points to be legal.  The orientation of $S$ is equal
-to the orientation of the defining points, i.e., |orientation(A)|. }*/
-
-public: 
-  typedef CGAL::Dynamic_dimension_tag Ambient_dimension;
-  typedef CGAL::Dynamic_dimension_tag Feature_dimension;
-
-/*{\Mtypes 4}*/
-
-typedef Sphere_d_rep<R_>  Rep;
-typedef Handle_for<Rep>   Base;
-typedef Sphere_d<R_>      Self;
-typedef typename R_::Point_d Point_d;
-
-using Base::ptr;
-
-Sphere_d(const Base& b) : Base(b) {}
-
-typedef R_ R;
-/*{\Mtypemember the representation type.}*/
-
-typedef typename R::RT RT;
-/*{\Mtypemember the ring type.}*/
-
-typedef typename R::FT FT;
-/*{\Mtypemember the field type.}*/
-
-typedef typename R::LA LA;
-/*{\Mtypemember the linear algebra layer.}*/
-
-typedef typename std::vector< Point_d >::const_iterator point_iterator;
-/*{\Mtypemember a read-only iterator for points defining the sphere.}*/
-
-/*{\Mcreation 4}*/ 
-
-Sphere_d(int d = 0) : Base( Rep(d+1) ) 
-/*{\Mcreate introduces a variable |\Mvar| of type |\Mname|. |\Mvar|
-is initialized to the empty sphere centered at the origin of
-$d$-dimensional space. }*/
-{ 
-  Point_d p(d);
-  for (int i = 0; i <= d; i++) ptr()->P[i] = p;
-  ptr()->orient = ZERO;
-  ptr()->cp = new Point_d(p); 
-}
-
-template <class ForwardIterator>
-Sphere_d(int d, ForwardIterator first, ForwardIterator last) :
-/*{\Mcreate introduces a variable |\Mvar| of type |\Mname|. |\Mvar| is
-initialized to the sphere through the points in |A = set [first,last)|. 
-\precond $A$ consists of $d+1$ $d$-dimensional points.}*/
-  Base( Rep(d,first,last) ) {}
-
-Sphere_d(const Self& c) : Base(c) {}
-~Sphere_d() {}
-
-/*{\Moperations 4 3}*/
-
-int dimension() const 
-/*{\Mop returns the dimension of |\Mvar|.}*/
-  { return static_cast<int>(ptr()->P.size()) - 1; }
-
-Point_d point(int i) const
-/*{\Mop returns the $i$-th defining point. \precond $0 \le i \le |dim|$.}*/
-{ CGAL_assertion_msg((0<=i && i<=dimension()), 
-    "Sphere_d::point(): index out of range.");
-  return ptr()->P[i]; 
-}
-
-point_iterator points_begin() const { return ptr()->P.begin(); }
-/*{\Mop returns an iterator pointing to the first defining point.}*/
-
-point_iterator points_end() const { return ptr()->P.end(); }
-/*{\Mop returns an iterator pointing beyond the last defining point.}*/
-
-bool is_degenerate() const { return (ptr()->orient == CGAL::ZERO); }
-/*{\Mop returns true iff the defining points are not full dimenional.}*/
-
-bool is_legal() const
-/*{\Mop returns true iff the set of defining points is legal.
-A set of defining points is legal iff their orientation is
-non-zero or if they are all equal.}*/
-{ if (ptr()->orient != ZERO ) return true;
-  const std::vector< Point_d >& A = ptr()->P;
-  Point_d po = A[0];
-  for (int i = 1; i < int(A.size()); ++i) 
-    if (A[i] != po) return false;
-  return true;
-}
-
-Point_d center() const
-/*{\Mop  returns the center of |\Mvar|. \precond The orientation 
-of |\Mvar| is non-zero. }*/
-{ 
-  if (ptr()->cp == 0) {
-    if (ptr()->orient == 0) {
-      const std::vector< Point_d >& A = ptr()->P;
-      Point_d po = A[0];
-      for (int i = 1; i < int(A.size()); ++i) 
-        if (A[i] != po)
-          CGAL_error_msg("Sphere_d::center(): points are illegal.");
-      const_cast<Self&>(*this).ptr()->cp = new Point_d(A[0]);
-      return *(ptr()->cp);
-    }
-    typename R::Center_of_sphere_d center_of_sphere_;
-    const_cast<Self&>(*this).ptr()->cp = 
-      new Point_d(center_of_sphere_(points_begin(),points_end()));
-  }
-  return *(ptr()->cp);
-}
-
-
-
-FT squared_radius() const
-/*{\Mop returns the squared radius of the sphere.}*/
-{ if (is_degenerate()) return 0;
-  return (point(0)-center()).squared_length();
-}
-
-Orientation orientation()  const { return ptr()->orient; }
-/*{\Mop returns the orientation of |\Mvar|.}*/
-
-Oriented_side oriented_side(const Point_d& p) const
-/*{\Mop returns either the constant |ON_ORIENTED_BOUNDARY|,
-|ON_POSITIVE_SIDE|, or |ON_NEGATIVE_SIDE|, iff p lies on the boundary,
-properly on the positive side, or properly on the negative side of
-circle, resp.}*/ 
-{ typename R::Side_of_oriented_sphere_d side; 
-  return side(points_begin(),points_end(),p); }
-
-Bounded_side bounded_side(const Point_d& p) const
-/*{\Mop returns |ON_BOUNDED_SIDE|, |ON_BOUNDARY|, or
-|ON_UNBOUNDED_SIDE| iff p lies properly inside, on
- the boundary, or properly outside of circle, resp.}*/
-{ typename R::Side_of_bounded_sphere_d side;
-  return side(points_begin(),points_end(),p); }
-
-bool has_on_positive_side (const Point_d& p) const
-/*{\Mop returns |\Mvar.oriented_side(p)==ON_POSITIVE_SIDE|.}*/
-{ return oriented_side(p) == ON_POSITIVE_SIDE; }
-
-bool has_on_negative_side (const Point_d& p) const
-/*{\Mop returns |\Mvar.oriented_side(p)==ON_NEGATIVE_SIDE|.}*/
-{ return oriented_side(p) == ON_NEGATIVE_SIDE; }
-
-bool has_on_boundary (const Point_d& p) const
-/*{\Mop returns |\Mvar.oriented_side(p)==ON_ORIENTED_BOUNDARY|,
-which is the same as |\Mvar.bounded_side(p)==ON_BOUNDARY|.}*/
-{ return oriented_side(p) == ON_ORIENTED_BOUNDARY; }
-
-bool has_on_bounded_side (const Point_d& p) const
-/*{\Mop returns |\Mvar.bounded_side(p)==ON_BOUNDED_SIDE|.}*/
-{ return (int(ptr()->orient) * int(oriented_side(p))) > 0 ; }
-
-bool has_on_unbounded_side (const Point_d& p) const
-/*{\Mop returns |\Mvar.bounded_side(p)==ON_UNBOUNDED_SIDE|.}*/
-{ return (int(ptr()->orient) * int(oriented_side(p))) < 0; }
-
-Sphere_d<R> opposite() const
-/*{\Mop returns the sphere with the same center and squared
-  radius as |\Mvar| but with opposite orientation.}*/
-{ CGAL_assertion(dimension()>1);
-  if (is_degenerate()) return *this;
-  std::vector< Point_d > V(points_begin(),points_end());
-  std::swap(V[0],V[1]);
-  return Sphere_d<R>(dimension(),V.begin(),V.end());
-}
-
-Sphere_d<R> transform(const Aff_transformation_d<R>& t) const
-/*{\Mopl returns $t(s)$. }*/ 
-{ std::vector< Point_d > B(points_begin(),points_end());
-  typename std::vector< Point_d >::iterator it;
-  for (it = B.begin(); it != B.end(); ++it)
-    *it = it->transform(t);
-  return Sphere_d<R>(dimension(),B.begin(),B.end());
-}
-
-Sphere_d<R> operator+(const Vector_d<R>& v) const
-/*{\Mbinop returns the sphere translated by |v|. }*/ 
-{ std::vector< Point_d > B(points_begin(),points_end());
-  typename std::vector< Point_d >::iterator it;
-  for (it = B.begin(); it != B.end(); ++it) it->operator+=(v);
-  return Sphere_d<R>(dimension(),B.begin(),B.end());
-}
-
-bool operator==(const Sphere_d<R>& D) const
-{ if (this->identical(D)) return true;
-  if (dimension() != D.dimension()) return false;
-  return (center()==D.center() &&
-          squared_radius() == D.squared_radius() &&
-          orientation() == D.orientation());
-}
-
-bool operator!=(const Sphere_d<R>& D) const 
-{ return !operator==(D); }
-
-
-}; // end of class Sphere_d
-
-/*{\Mtext \headerline{Non-Member Functions} }*/
-template <class R>
-bool weak_equality(const Sphere_d<R>& s1, const Sphere_d<R>& s2)
-/*{\Mfunc Test for equality as unoriented spheres.}*/
-{ if (s1.identical(s2)) return true;
-  if (s1.dimension() != s2.dimension()) return false;
-  return (s1.center()==s2.center() &&
-          s1.squared_radius() == s2.squared_radius());
-}
-
-/*{\Mimplementation Spheres are implemented by a vector of points as
-an item type.  All operations like creation, initialization, tests,
-input and output of a sphere $s$ take time
-$O(|s.dimension()|)$. |dimension()|, point access take constant time.
-The space requirement for spheres is $O(|s.dimension()|)$ 
-neglecting the storage room of the points.}*/
-
-template <class R>
-std::ostream& operator<<(std::ostream& os, const CGAL::Sphere_d<R>& s) 
-{ typedef typename Sphere_d<R>::point_iterator iterator;
-  os << s.dimension()+1 << " ";
-  for (iterator it=s.points_begin(); it!=s.points_end(); ++it)
-    os << *it << " ";
-  return os;
-} 
-
-template <class R> std::istream&  
-operator>>(std::istream& is, CGAL::Sphere_d<R>& s) 
-{ int d; is >> d;
-  std::vector< Point_d<R> > V(d);
-  Point_d<R> p;
-  while ( d-- ) { 
-    if (!(is >> p)) return is;
-    V[d] = p; 
-  }
-  s = Sphere_d<R>(static_cast<int>(V.size())-1, V.begin(), V.end() );
-  return is;
-}
-
-
-/*
-The center is only defined if the set of defining points are
-legal. If the defining points are all equal the sphere is trivial. So
-assume otherwise. Then the center $c$ is the unique point with equal
-distance to all the defining points. A point $c$ has equal distance to
-point $p_0$ and $p_i$ if it lies on the perpendicual bisector of $p_d$
-and $p_i$, i.e., if it satiesfies the plane equation $(p_i - p_d)^T c
-= (p_i - p_d) (p_i + p_d)/2$. Note that $p_i - p_d$ is the normal
-vector of the bisector hyperplane and $(p_i + p_d)/2$ is the midpoint
-of $p_d$ and $p_i$. The equation above translates into the equation \[
-\sum_{0 \le j < d} 2*p_{dd}p_{id}(p_{ij}p_{dd} - p_{dj}p_{id})c_j/c_d
-= \sum_{0 \le j < d} (p_{ij}p_{dd} - p_{dj}p_{id})(p_{ij}p_{dd} +
-p_{dj}p_{id}) \] for the homogeneous coordinates of the points and the
-center. We may tentatively assume that $c_d = 1$, solve the
-corresponding linear system, and then define the center.
-*/
-
-} //namespace CGAL
-
-#endif // CGAL_SPHERE_D_H
-//----------------------- end of file ----------------------------------
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Tuple_d.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Tuple_d.h
deleted file mode 100644
index 425a82a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Tuple_d.h
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 2000,2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Michael Seel
-
-#ifndef CGAL_TUPLE_D_H
-#define CGAL_TUPLE_D_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Quotient.h>
-#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
-#include <sstream>
-
-namespace CGAL {
-#define PointCd PointCd2
-#define PointHd PointHd2
-
-template <typename NT, typename LA> class PointHd;
-template <typename NT, typename LA> class VectorHd;
-template <typename NT, typename LA> class DirectionHd;
-template <typename NT, typename LA> class HyperplaneHd;
-template <typename NT, typename LA> class Aff_transformationHd;
-template <typename FT, typename LA> class PointCd;
-template <typename NT, typename LA> class VectorCd;
-template <typename FT, typename LA> class DirectionCd;
-template <typename FT, typename LA> class HyperplaneCd;
-template <typename NT, typename LA> class Aff_transformationCd;
-
-
-class MatchHelper {};
-
-template <typename NT, typename LA>
-class Tuple_d  {
-  typedef Tuple_d<NT,LA> Self;
-  typedef typename LA::Vector Vector;
-  Vector v;
-public:
-  typedef typename Vector::const_iterator const_iterator;
-
-  typedef Cartesian_const_iterator_d<const_iterator> Cartesian_const_iterator;
-
-  struct Homogeneous_const_iterator {
-    typedef Homogeneous_const_iterator self;
-    typedef std::random_access_iterator_tag iterator_category;
-    typedef NT                              value_type;
-    typedef std::ptrdiff_t                  difference_type;
-    typedef const value_type*               pointer;
-    typedef const value_type&               reference;
-
-  Homogeneous_const_iterator() : _it(0), _w(0) {}
-  Homogeneous_const_iterator(const_iterator it, const_iterator w = 0) 
-    : _it(it), _w(w) {}
-    
-  value_type operator*() const 
-  { if (_it == _w) return value_type(1); else return *_it; }
-
-  self& operator++() { ++_it; return *this; }
-  self  operator++(int) { self tmp = *this; ++_it; return tmp; }
-  self& operator--() { --_it; return *this; }
-  self  operator--(int) { self tmp = *this; --_it; return tmp; }
-
-  self& operator+=(difference_type i) { _it+=i; return *this; }
-  self& operator-=(difference_type i) { _it-=i; return *this; }
-  self operator+(difference_type i) const 
-  { self tmp=*this; return tmp += i; }
-  self operator-(difference_type i) const 
-  { self tmp=*this; return tmp -= i; }
-
-  difference_type operator-(self x) const { return _it-x._it; }
-  value_type operator[](difference_type i) const { return *(*this + i); }
-
-  bool operator==(const self& x) const { return _it==x._it; }
-  bool operator!=(const self& x) const { return ! (*this==x); }
-  bool operator<(self x) const { return (x - *this) > 0; }
-
-  private:
-    const_iterator _it, _w;  
-  }; // Homogeneous_const_iterator
-
-
-  Tuple_d(int d) : v(d) {}
-  Tuple_d(const NT& a, const NT& b) : v(2)
-  { v[0]=a; v[1]=b; }
-  Tuple_d(const NT& a, const NT& b, const NT& c, const MatchHelper&) : v(3)
-  { v[0]=a; v[1]=b; v[2]=c; }
-  Tuple_d(const NT& a, const NT& b, const NT& c, const NT& d) : v(4)
-  { v[0]=a; v[1]=b; v[2]=c; v[3]=d; }
-
-  template <typename I>
-  Tuple_d(int d, I& start, I end) : v(d) 
-  { int i(0); 
-    while ( i < d && start != end ) v[i++] = *start++; 
-  } 
-  /* this constructor returns the final position of start 
-     to offer access to a possible common denominator as
-     part of the tuple range */
-
-  template <typename I>
-  Tuple_d(int d, I start, I end, NT D) : v(d) 
-  { int i(0); 
-    while ( i < d && start != end ) v[i++] = *start++; 
-    v[d-1] = D; 
-  }
-
-  int size() const { return v.dimension(); }
-  const_iterator begin() const { return v.begin(); }
-  const_iterator last() const { return v.end()-1; }
-  const_iterator end() const { return v.end(); }
-  const_iterator beyondend() const { return v.end()+1; }
-
-
-  void invert()
-  { for (int i=0; i<size(); ++i) v[i]=-v[i]; }
-  void invert(int d)
-  { for (int i=0; i<d; ++i) v[i]=-v[i]; }
-
-  void print(std::ostream& out, const char*) const;
-  void read(std::istream& in);
-  void homogeneous_add(const Self* a, const Self* b)
-  { int d = a->size()-1;
-    if ( d < 0 ) return;
-    CGAL_assertion_msg((d == b->size()-1),"dimensions disagree."); 
-    CGAL_assertion_msg((d == size()-1),"dimensions disagree."); 
-    NT aw = a->v[d], bw = b->v[d]; 
-    for (int i = 0; i < d; ++i) { 
-      v[i] = a->v[i]*bw + b->v[i]*aw; 
-    }
-    v[d] = aw*bw; 
-  }
-
-  void homogeneous_sub(const Self* a, const Self* b)
-  { int d = a->size()-1; 
-    if ( d < 0 ) return;
-    CGAL_assertion_msg((d == b->size()-1),"dimensions disagree."); 
-    CGAL_assertion_msg((d == size()-1),"dimensions disagree."); 
-    NT aw = a->v[d], bw = b->v[d]; 
-    for (int i = 0; i < d; ++i) { 
-      v[i] = a->v[i]*bw - b->v[i]*aw; 
-    }
-    v[d] = aw*bw; 
-  }
-
-  void cartesian_add(const Self* a, const Self* b)
-  { v = a->v + b->v; }
-  void cartesian_sub(const Self* a, const Self* b)
-  { v = a->v - b->v; }
-
-  friend class PointHd<NT,LA>;
-  friend class VectorHd<NT,LA>;
-  friend class DirectionHd<NT,LA>;
-  friend class HyperplaneHd<NT,LA>;
-  friend class PointCd<NT,LA>;
-  friend class VectorCd<NT,LA>;
-  friend class DirectionCd<NT,LA>;
-  friend class HyperplaneCd<NT,LA>;
-  
-}; // Tuple_d
-
-
-template <class NT, class LA> 
-class Compare_homogeneously
-{ 
-public:
-Comparison_result operator()(
-  const typename LA::Vector& v1, const typename LA::Vector& v2)
-{ 
-  CGAL_assertion_msg((v1.dimension() == v2.dimension()),
-    "Compare_homogeneously: dimensions disagree.");
-  NT aw = v1[v1.dimension()-1]; 
-  NT bw = v2[v2.dimension()-1]; 
-  CGAL_assertion(aw>0 && bw>0);
-  for (int i = 0; i < v1.dimension()-1; i++ ) { 
-    NT aibw = v1[i]*bw; 
-    NT biaw = v2[i]*aw; 
-    Comparison_result S = (aibw<biaw ? SMALLER : 
-                          (biaw<aibw ? LARGER : EQUAL));
-    if (S != EQUAL) return S;
-  }
-  return EQUAL; 
-}
-}; // Compare_homogeneously
-
-template <class NT, class LA> 
-class Compare_componentwise
-{ public:
-Comparison_result operator()(
-  const typename LA::Vector& v1, const typename LA::Vector& v2)
-{ 
-  CGAL_assertion_msg((v1.dimension() == v2.dimension()),
-  "Compare_coefficientwise: dimensions disagree.");
-  for (int i = 0; i < v1.dimension(); i++ ) { 
-    Comparison_result S = (v1[i]<v2[i] ? SMALLER : 
-                          (v2[i]<v1[i] ? LARGER : EQUAL));
-    if (S != EQUAL) return S;
-  }
-  return EQUAL;
-}
-}; // Compare_coefficientwise
-
-
-template <typename NT, typename LA>
-void Tuple_d<NT,LA>::print(std::ostream& os, const char* l) const
-{ int i;
-  switch( os.iword(CGAL::IO::mode) ) {
-    case CGAL::IO::ASCII :
-      os << size() << " ";
-      for (i = 0; i < size(); ++i) 
-        os << v[i] << " "; break;
-    case CGAL::IO::BINARY :
-      CGAL::write(os, size()); 
-      for (i = 0; i < size(); ++i) 
-        CGAL::write(os, v[i]); break;
-    default :
-      os << l << "(" << size() << ", ";
-      for (i = 0; i < size(); ++i) {
-        os << v[i]; if (i!=size()-1) os<<", "; else os<<")";
-      }
-  }
-}
-
-
-template <typename NT, typename LA>
-void Tuple_d<NT,LA>::read(std::istream& is)
-{ int i = 0, d;
-  switch( is.iword(CGAL::IO::mode) ) {
-    case CGAL::IO::ASCII :
-      is >> d; v = Vector(d);
-      while (i < d && is >> v[i] ) ++i; 
-      break;
-    case CGAL::IO::BINARY :
-      CGAL::read(is, d); v = Vector(d);
-      while (i < d) { CGAL::read(is, v[i]); ++i; } break;
-    default:
-    CGAL_error_msg("\nStream must be in ascii or binary mode\n"); 
-  }
-}
-
-template <class ForwardIterator>
-void tuple_dim_check(ForwardIterator first, ForwardIterator last, 
-                     const char* file, int line, const char* op)
-{ if (first==last) return;
-  int d = first->dimension(); ++first;
-  for (; first!=last; ++first) 
-    if (first->dimension() != d) {
-      std::ostringstream os;
-      os << "Tuple Dimension Error " << 
-            "File " << file << "Line " << line << "Operation " << op << '\0';
-      CGAL_error_msg(os.str().c_str()); 
-    }
-}
-
-#define TUPLE_DIM_CHECK(i1,i2,op) tuple_dim_check(i1,i2,__FILE__,__LINE__,#op)
-
-template <class InputIterator, class OutputIterator>
-int copy_and_count(InputIterator first, InputIterator last,
-                   OutputIterator result) 
-{ int n=0;
-  while (first != last) { ++n; *result++ = *first++; }
-  return n;
-}
-
-#undef PointCd
-#undef PointHd
-} //namespace CGAL
-#endif //CGAL_TUPLE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector__.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector__.h
deleted file mode 100644
index b731d0e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector__.h
+++ /dev/null
@@ -1,464 +0,0 @@
-// Copyright (c) 1997-2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_VECTOR___H
-#define CGAL_VECTOR___H
-
-#include <CGAL/basic.h>
-#include <CGAL/memory.h>
-#include <CGAL/Kernel_d/debug.h>
-
-#include <cmath>
-#include <memory>
-#include <new>
-#include <iostream>
-#include <vector>
-#include <iterator>
-
-namespace CGAL {
-namespace Linear_Algebra {
-
-template <class NT_, class AL_> class Vector_;
-template <class NT_, class AL_> class Matrix_;
-
-/*{\Msubst
-<NT_,AL_>#
-<NT,AL>#
-Vector_#Vector
-Matrix_#Matrix
-}*/
-/*{\Moptions print_title=yes}*/
-/*{\Moptions outfile=Vector.man}*/
-
-/*{\Xtext \headerline{Common Notation}
-The following data types use the concept of iterator ranges as an
-abstraction of tuples and sets. For an iterator range |[first,last)|
-we define |S = set [first,last)| as the ordered tuple $(|S[0]|,|S[1]|,
-\ldots |S[d-1]|)$ where $|S[i]| = |*| |++|^{(i)}|first|$ (the element
-obtained by forwarding the iterator by operator |++| $i$ times and
-then dereferencing it to get the value to which it points). We write
-|d = size [first,last)|.  This extends the syntax of random access
-iterators to input iterators.  If we index the tuple as above then we
-require that $|++|^{(d)}|first == last|$ (note that |last| points
-beyond the last element to be accepted).}*/
-
-/*{\Manpage {Vector}{}{Vectors with NT Entries}{v}}*/
-
-template <class NT_, class AL_> 
-class Vector_
-{
-/*{\Mdefinition An instance of data type |Vector_| is a vector of
-variables of number type |NT|.  Together with the type |Matrix_| it
-realizes the basic operations of linear algebra.}*/
-
-public:
-
-/*{\Mtypes 5.5}*/
-typedef NT_*       pointer;
-typedef const NT_* const_pointer;
-
-typedef NT_    NT;
-/*{\Mtypemember the ring type of the components.}*/ 
-typedef pointer iterator;
-/*{\Mtypemember the iterator type for accessing components.}*/ 
-typedef const_pointer const_iterator;
-/*{\Mtypemember the const iterator type for accessing components.}*/ 
-
-typedef AL_ allocator_type;
-/*{\Xtypemember the allocator type.}*/ 
-
-protected:
-  friend class Matrix_<NT_,AL_>;
-  NT* v_; int d_;
-  static allocator_type MM;
-
-  inline void allocate_vec_space(NT*& vi, int di)
-  {
-  /* We use this procedure to allocate memory. We first get an appropriate 
-     piece of memory from the allocator and then initialize each cell 
-     by an inplace new. */
-
-    vi = MM.allocate(di);
-    NT* p = vi + di - 1;
-    while (p >= vi) { new (p) NT(0);  p--; }   
-  }
-
-  inline void deallocate_vec_space(NT*& vi, int di)
-  {
-  /* We use this procedure to deallocate memory. We have to free it by
-     the allocator scheme. We first call the destructor for type NT for each
-     cell of the array and then return the piece of memory to the memory
-     manager. */
-
-    NT* p = vi + di - 1;
-    while (p >= vi)  { MM.destroy(p); p--; }  //af:  as proposed by sylvain
-    MM.deallocate(vi, di);
-    vi = (NT*)0;
-  }
-
-inline void 
-check_dimensions(const Vector_<NT_,AL_>& vec) const
-{ 
-  CGAL_assertion_msg((d_ == vec.d_), 
-    "Vector_::check_dimensions: object dimensions disagree.");
-}
-
-public:
-
-/*{\Mcreation v 3}*/
-
-Vector_() : v_(0),d_(0) {}
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|.}*/ 
-
-Vector_(int d) 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. 
-|\Mvar| is initialized to a vector of dimension $d$.}*/ 
-{ CGAL_assertion_msg( d >= 0 , 
-    "Vector_::constructor: negative dimension.");
-  d_ = d; 
-  v_ = (NT*)0;
-  if (d_ > 0){ 
-    allocate_vec_space(v_,d_);
-    while (d--) v_[d] = NT(0);
-  }
-}
-
-Vector_(int d, const NT& x) 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. 
-|\Mvar| is initialized to a vector of dimension $d$ with entries |x|.}*/ 
-{ 
-  CGAL_assertion_msg( d >= 0 , 
-    "Vector_::constructor: negative dimension.");
-  d_ = d; v_ = (NT*)0;
-  if (d_ > 0){ 
-    allocate_vec_space(v_,d_);
-    while (d--) v_[d] = x;
-  }
-}
-
-template <class Forward_iterator>
-Vector_(Forward_iterator first, Forward_iterator last)
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|; 
-|\Mvar| is initialized to the vector with entries
-|set [first,last)|. \require |Forward_iterator| has value type |NT|.}*/
-{ 
-#if defined _MSC_VER && _MSC_VER == 1300
-  d_ = 0;
-  Forward_iterator fit = first;
-  while(fit++!=last) d_++;
-#else
-  d_ = static_cast<int>(std::distance(first, last));
-#endif
-  allocate_vec_space(v_,d_);
-  iterator it = begin();
-  while (first != last) { *it = *first; ++it; ++first; }
-}
-
-Vector_(const Vector_<NT_,AL_>& p)
-{ d_ = p.d_;
-  if (d_ > 0) allocate_vec_space(v_,d_);
-  else v_ = (NT*)0;
-  for(int i=0; i<d_; i++) { v_[i] = p.v_[i]; }
-}
-
-
-Vector_<NT_,AL_>& operator=(const Vector_<NT_,AL_>& vec)
-{ 
-  if (&vec == this)
-    return *this;
-
-  int n = vec.d_;
-  if (n != d_) {
-    if (d_ > 0) deallocate_vec_space(v_,d_);
-    d_=n;
-    if (n > 0) allocate_vec_space(v_,n);
-    else v_ = (NT*)0;
-  }
-
-  while (n--) v_[n] = vec.v_[n];
-  return *this;
-}
-
-~Vector_() 
-{ if (d_ > 0) deallocate_vec_space(v_,d_); }
-
-/*{\Moperations 3 4}*/
-
-int  dimension() const { return d_; }
-/*{\Mop returns the dimension of |\Mvar|.}*/ 
-
-bool is_zero() const 
-/*{\Mop returns true iff |\Mvar| is the zero vector.}*/ 
-{ for(int i=0; i<d_; ++i) if (v_[i]!=NT(0)) return false; 
-  return true; }
-  
-NT& operator[](int i)
-/*{\Marrop returns $i$-th component of |\Mvar|.\\
-           \precond $0\le i \le |v.dimension()-1|$. }*/
-{ CGAL_assertion_msg((0<=i && i<d_), 
-    "Vector_::operator[]: index out of range.");
-  return v_[i];
-}
-  
-const NT& operator[](int i) const
-{ CGAL_assertion_msg((0<=i && i<d_), 
-    "Vector_::operator[]: index out of range.");
-  return v_[i];
-}
-
-iterator begin() { return v_; }
-/*{\Mop iterator to the first component.}*/
-iterator end() { return v_+d_; }
-/*{\Mop iterator beyond the last component.}*/
-
-/*{\Mtext The same operations |begin()|, |end()| exist for 
-|const_iterator|.}*/
-
-const_iterator begin() const { return v_; }
-const_iterator end() const { return v_+d_; }
-
-Vector_<NT_,AL_>  operator+(const Vector_<NT_,AL_>& v1) const;
-/*{\Mbinop Addition. \precond\\ |v.dimension() == v1.dimension()|.}*/
-
-Vector_<NT_,AL_>  operator-(const Vector_<NT_,AL_>& v1) const;
-/*{\Mbinop Subtraction. \precond\\ |v.dimension() = v1.dimension()|.}*/
-
-NT operator*(const Vector_<NT_,AL_>& v1) const;
-/*{\Mbinop Inner Product. \precond\\ |v.dimension() = v1.dimension()|.}*/
-
-Vector_<NT_,AL_> compmul(const NT& r) const;
-
-Vector_<NT_,AL_>  operator-() const;
-/*{\Munop Negation.}*/
-
-Vector_<NT_,AL_>& operator+=(const Vector_<NT_,AL_>& v1);
-/*{\Mbinop Addition plus assignment. \precond\\
-|v.dimension() == v1.dimension()|.}*/
-
-Vector_<NT_,AL_>& operator-=(const Vector_<NT_,AL_>& v1);
-/*{\Mbinop Subtraction plus assignment. \precond\\ |v.dimension() == v1.dimension()|.}*/
-
-Vector_<NT_,AL_>& operator*=(const NT& s);
-/*{\Mbinop Scalar multiplication plus assignment.}*/
-
-Vector_<NT_,AL_>& operator/=(const NT& s);
-/*{\Mbinop Scalar division plus assignment.}*/
- 
-
-bool     operator==(const Vector_<NT_,AL_>& w) const;
-bool     operator!=(const Vector_<NT_,AL_>& w) const 
-{ return !(*this == w); }
-
-static int  compare(const Vector_<NT_,AL_>&, 
-                    const Vector_<NT_,AL_>&);
-
-};
-
-
-template <class NT, class AL> 
-
-inline Vector_<NT,AL> operator*(const NT& r, const Vector_<NT,AL>& v)
-/*{\Mbinopfunc Componentwise multiplication with number $r$.}*/
-{ return v.compmul(r); }
-
-template <class NT, class AL> 
-
-inline Vector_<NT,AL> operator*(const Vector_<NT,AL>& v, const NT& r)
-/*{\Mbinopfunc Componentwise multiplication with number $r$.}*/
-{ return v.compmul(r); }
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
-operator+=(const Vector_<NT_,AL_>& vec)
-{ 
-  check_dimensions(vec);
-  int n = d_;
-  while (n--) v_[n] += vec.v_[n];
-  return *this;
-}
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
-operator-=(const Vector_<NT_,AL_>& vec)
-{ 
-  check_dimensions(vec);
-  int n = d_;
-  while (n--) v_[n] -= vec.v_[n];
-  return *this;
-}
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
-operator*=(const NT& s)
-{ int n = d_;
-  while (n--) v_[n] *= s;
-  return *this;
-}
-
-template <class NT_, class AL_>
-inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
-operator/=(const NT& s)
-{ int n = d_;
-  while (n--) v_[n] /= s;
-  return *this;
-}
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
-operator+(const Vector_<NT_,AL_>& vec) const
-{ 
-  check_dimensions(vec);
-  int n = d_;
-  Vector_<NT_,AL_> result(n);
-  while (n--) result.v_[n] = v_[n]+vec.v_[n];
-  return result;
-}
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
-operator-(const Vector_<NT_,AL_>& vec) const
-{ 
-  check_dimensions(vec);
-  int n = d_;
-  Vector_<NT_,AL_> result(n);
-  while (n--) result.v_[n] = v_[n]-vec.v_[n];
-  return result;
-}
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
-operator-() const  // unary minus
-{ 
-  int n = d_;
-  Vector_<NT_,AL_> result(n);
-  while (n--) result.v_[n] = -v_[n];
-  return result;
-}
-
-
-template <class NT_, class AL_> 
-inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
-compmul(const NT& x) const
-{ 
-  int n = d_;
-  Vector_<NT_,AL_> result(n);
-  while (n--) result.v_[n] = v_[n] * x;
-  return result;
-}
-
-
-template <class NT_, class AL_> 
-inline NT_ Vector_<NT_,AL_>::
-operator*(const Vector_<NT_,AL_>& vec) const
-{ 
-  check_dimensions(vec);
-  NT_ result=0;
-  int n = d_;
-  while (n--) result = result+v_[n]*vec.v_[n];
-  return result;
-}
-
-template <class NT_, class AL_> 
-inline bool Vector_<NT_,AL_>::
-operator==(const Vector_<NT_,AL_>& vec)  const
-{ if (vec.d_ != d_) return false;
-  int i = 0;
-  while ((i<d_) && (v_[i]==vec.v_[i])) i++;
-  return (i==d_);
-}
-
-template <class NT_, class AL_> 
-int Vector_<NT_,AL_>::
-compare(const Vector_<NT_,AL_>& v1, const Vector_<NT_,AL_>& v2)
-{ int i;
-  v1.check_dimensions(v2);
-  for(i=0; i < v1.dimension() && v1[i]==v2[i]; i++) {}
-  if (i == v1.dimension()) return 0;
-  return (v1[i] < v2[i]) ?  -1 : 1;
-}
-
-template <class NT_, class AL_> 
-std::ostream& operator<<(std::ostream& os, const Vector_<NT_,AL_>& v)
-/*{\Xbinopfunc  writes |\Mvar| componentwise to the output stream $O$.}*/
-{ /* syntax: d x_0 x_1 ... x_d-1 */
-    int d = v.dimension();
-    switch (os.iword(CGAL::IO::mode)) {
-    case CGAL::IO::BINARY:
-        CGAL::write( os, d);
-        for ( int i = 0; i < d; ++i)
-            CGAL::write( os, v[i]);
-        break;
-    case CGAL::IO::ASCII:
-        os << d;
-        for ( int i = 0; i < d; ++i)
-            os << ' ' << v[i];
-        break;
-    case CGAL::IO::PRETTY:
-        os << "LA::Vector(" << d << " [";
-        for ( int i = 0; i < d; ++i) {
-            if ( i > 0)
-                os << ',' << ' ';
-            os << v[i];
-        }
-        os << "])";
-        break;
-    }
-    return os;
-}
-
-template <class NT_, class AL_> 
-std::istream& operator>>(std::istream& is, Vector_<NT_,AL_>& v)
-/*{\Xbinopfunc  reads |\Mvar| componentwise from the input stream $I$.}*/
-{ /* syntax: d x_0 x_1 ... x_d-1 */
-  int d;
-  switch (is.iword(CGAL::IO::mode)) {
-    case CGAL::IO::ASCII :
-    case CGAL::IO::BINARY :
-      is >> d; 
-      v = Vector_<NT_,AL_>(d);
-      for ( int i = 0; i < d; ++i) {
-          is >> v[i];
-      }
-      break;
-    default:
-      std::cerr<<"\nStream must be in ascii or binary mode"<<std::endl;
-      break;
-  }
-  return is;
-}
-
-
-template <class NT_, class AL_>
-typename Vector_<NT_,AL_>::allocator_type Vector_<NT_,AL_>::MM;
-
-/*{\Ximplementation Vectors are implemented by arrays of type
-|NT|. All operations on a vector |v| take time $O(|v.dimension()|)$,
-except for |dimension()| and $[\ ]$ which take constant time. The space
-requirement is $O(|v.dimension()|)$. }*/
-
-
-} // Linear_Algebra
-} // CGAL
-
-#endif // CGAL__VECTOR___H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsCd.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsCd.h
deleted file mode 100644
index 90a6808..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsCd.h
+++ /dev/null
@@ -1,812 +0,0 @@
-// Copyright (c) 2000,2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel, Kurt Mehlhorn
-
-#ifndef CGAL_FUNCTION_OBJECTSCD_H
-#define CGAL_FUNCTION_OBJECTSCD_H
-
-#include <CGAL/basic.h>
-#include <CGAL/enum.h>
-#include <CGAL/Referenced_argument.h>
-
-#undef CGAL_KD_TRACE
-#undef CGAL_KD_TRACEN
-#undef CGAL_KD_TRACEV
-#define CGAL_KD_TRACE(t)  std::cerr << t
-#define CGAL_KD_TRACEN(t) std::cerr << t << std::endl
-#define CGAL_KD_TRACEV(t) std::cerr << #t << " = " << (t) << std::endl
- 
-namespace CGAL {
-
-template <typename K>
-class Compute_coordinateCd {
-  typedef typename K::FT             FT;
-  typedef typename K::Point_d        Point_d;
-  public:
-  typedef FT                         result_type;
-  result_type 
-    operator()(const Point_d& p, int i) const
-  {
-    return p.cartesian(i);
-  }
-};
-
-template <typename K>
-class Point_dimensionCd {
-  typedef typename K::FT             FT;
-  typedef typename K::Point_d        Point_d;
-  public:
-  typedef int                       result_type;
-  result_type 
-    operator()(const Point_d& p) const
-  {
-    return p.dimension();
-  }
-};
-
-template <typename K>
-class Less_coordinateCd {
-  typedef typename K::FT             FT;
-  typedef typename K::Point_d        Point_d;
-  public:
-  typedef bool                       result_type;
-  result_type 
-  operator()(const Point_d& p, const Point_d& q, int i) const
-  {
-    return p.cartesian(i)<q.cartesian(i);
-  }
-};
-
-template <class R>
-class Lift_to_paraboloidCd
-{
-    typedef typename R::Point_d Point;
-    typedef typename R::FT FT;
-    typedef typename R::LA LA;
-public:
-    typedef Point result_type;
-
-    result_type operator()(const Point & p) const
-    { 
-        int d = p.dimension();
-        typename LA::Vector h(d+1);
-        FT sum = 0;
-        for (int i = 0; i<d; i++) {
-            h[i] = p.cartesian(i);
-            sum += h[i]*h[i];
-        }
-        h[d] = sum;
-        return Point(d+1,h.begin(),h.end());
-    }
-};
-
-template <class R>
-class Project_along_d_axisCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::FT FT;
-public:
-    typedef Point_d result_type;
-
-    result_type operator()(const Point_d & p) const
-    {
-        return Point_d(p.dimension()-1,
-               p.cartesian_begin(), p.cartesian_end()-1);
-    }
-};
-
-template <class R>
-class MidpointCd
-{
-    typedef typename R::Point_d Point_d;
-public:
-    typedef Point_d result_type;
-
-    result_type operator()(const Point_d & p, const Point_d & q) const
-    {
-        return Point_d(p + (q-p)/2);
-    }
-};
-
-template <class R>
-class Center_of_sphereCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::FT FT;
-    typedef typename R::LA LA;
-    typedef typename LA::Vector Vector;
-    typedef typename LA::Matrix Matrix;
-public:
-    typedef Point_d result_type;
-
-    template <class Forward_iterator>
-    result_type operator()(Forward_iterator start, Forward_iterator end) const
-    {
-        CGAL_assertion(start!=end);
-        int d = start->dimension();
-        Matrix M(d);
-        Vector b(d);
-        Point_d pd = *start++;
-        for (int i = 0; i < d; ++i) { 
-            // we set up the equation for p_i
-            Point_d pi = *start++;
-            b[i] = 0;
-            for (int j = 0; j < d; ++j) {
-                M(i,j) = FT(2)*(pi.cartesian(j) - pd.cartesian(j));
-                b[i] += (pi.cartesian(j) - pd.cartesian(j)) *
-                    (pi.cartesian(j) + pd.cartesian(j));
-            }
-        }
-        FT D;
-        Vector x;
-        LA::linear_solver(M,b,x,D);
-        return Point_d(d, x.begin(), x.end());
-    }
-}; // Center_of_sphereCd
-
-template <class R>
-class Squared_distanceCd
-{
-    typedef typename R::Point_d     Point;
-    typedef typename R::Vector_d    Vector;
-    typedef typename R::FT          FT;
-public:
-    typedef FT result_type;
-
-    result_type operator()(const Point & p, const Point & q) const
-    {
-        Vector v = p - q;
-        return v.squared_length();
-    }
-};
-
-template <class R>
-class Position_on_lineCd
-{
-    typedef typename R::Point_d Point;
-    typedef typename R::LA LA;
-    typedef typename R::FT FT;
-public:
-    typedef typename R::Boolean result_type;
-
-    result_type operator()(const Point & p, const Point & s, const Point & t, 
-        FT & l) const
-    {
-        int d = p.dimension(); 
-        CGAL_assertion_msg((d==s.dimension())&&(d==t.dimension()&& d>0), 
-                "position_along_line: argument dimensions disagree.");
-        CGAL_assertion_msg((s!=t), 
-                "Position_on_line_d: line defining points are equal.");
-        FT lnum = (p.cartesian(0) - s.cartesian(0)); 
-        FT lden = (t.cartesian(0) - s.cartesian(0)); 
-        FT num(lnum), den(lden), lnum_i, lden_i;
-        for (int i = 1; i < d; i++) {  
-            lnum_i = (p.cartesian(i) - s.cartesian(i)); 
-            lden_i = (t.cartesian(i) - s.cartesian(i)); 
-            if (lnum*lden_i != lnum_i*lden)
-                return false; 
-            if (lden_i != FT(0)) {
-                den = lden_i;
-                num = lnum_i;
-            }
-        }
-        l = num / den; return true; 
-    }
-};
-
-template <class R>
-class Barycentric_coordinatesCd
-{
-    typedef typename R::Point_d Point;
-    typedef typename R::LA LA;
-    typedef typename R::FT FT;
-public:
-
-    template <class ForwardIterator, class OutputIterator>
-    OutputIterator operator()(ForwardIterator first, ForwardIterator last, 
-        const Point & p, OutputIterator result)
-    {
-        TUPLE_DIM_CHECK(first,last,Barycentric_coordinates_d);
-        //int n = std::distance(first,last); //unused variable
-        int d = p.dimension();
-        typename R::Affine_rank_d affine_rank;
-        CGAL_assertion(affine_rank(first,last)==d);
-        std::vector< Point > V(first,last);
-        typename LA::Matrix M(d+1,V.size());
-        typename LA::Vector b(d+1), x;
-        int i;
-        for (i=0; i<d; ++i) {
-            for (int j=0; j<V.size(); ++j) 
-                M(i,j)=V[j].cartesian(i);
-            b[i] = p.cartesian(i);
-        }
-        for (int j=0; j<V.size(); ++j) 
-            M(d,j) = 1;
-        b[d] = 1;
-        FT D;
-        LA::linear_solver(M,b,x,D);
-        for (i=0; i < x.dimension(); ++result, ++i) {
-            *result = x[i];
-        }
-        return result;
-    }
-};
-
-template <class R>
-class OrientationCd
-{
-    typedef typename R::Point_d     Point;
-    typedef typename R::LA          LA;
-    typedef typename R::Orientation Orientation;
-public:
-    typedef Orientation result_type;
-
-    template <class ForwardIterator>
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        TUPLE_DIM_CHECK(first, last, Orientation_d);
-        int d = static_cast<int>(std::distance(first,last)) - 1;
-        // range contains d+1 points of dimension d
-        CGAL_assertion_msg(first->dimension() == d,
-                "Orientation_d: needs first->dimension() + 1 many points.");
-        typename LA::Matrix M(d);
-        ForwardIterator s = first;
-        ++s;
-        for( int j = 0; j < d; ++s, ++j )
-            for( int i = 0; i < d; ++i )
-                M(i,j) = s->cartesian(i) - first->cartesian(i);
-        return result_type(LA::sign_of_determinant(M));
-    }
-};
-
-/* This predicates tests the orientation of (k+1) points that span a
- * k-dimensional affine subspace of the ambiant d-dimensional space. We
- * greedily search for an orthogonal projection on a k-dim axis aligned
- * subspace on which the (full k-dim) predicates answers POSITIVE or NEGATIVE.
- * If no such subspace is found, return COPLANAR.
- * IMPORTANT TODO: Current implementation is VERY bad with filters: if one
- * determinant fails in the filtering step, then all the subsequent ones wil be
- * in exact arithmetic :-(
- * TODO: store the axis-aligned subspace that was found in order to avoid
- * re-searching for it for subsequent calls to operator()
- */
-template <class R>
-class Coaffine_orientationCd
-{ 
-    typedef typename R::Point_d     Point_d;
-    typedef typename R::LA          LA;
-    typedef typename R::Orientation Orientation;
-public:
-    typedef Orientation result_type;
-
-    // typedef internal::stateful_predicate_tag predicate_category;
-    typedef std::vector<int>	Axes;
-    struct State
-    {
-        Axes axes_;
-        bool axes_found_;
-        State(bool b) : axes_(), axes_found_(b) {}
-    };
-    mutable State state_;
-
-    Coaffine_orientationCd() : state_(false) {}
-
-    State & state()    {        return state_;    }
-    const State & state() const   {        return state_;    }
-
-    template < class ForwardIterator >
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        TUPLE_DIM_CHECK(first,last,Coaffine_orientation_d);
-        // |k| is the dimension of the affine subspace
-        const int k = std::distance(first,last) - 1;
-        // |d| is the dimension of the ambiant space
-        const int d = first->dimension();
-        CGAL_assertion_msg(k <= d, "Coaffine_orientation_d: needs less that (first->dimension() + 1) points.");
-        if( false == state_.axes_found_ )
-        {
-			state_.axes_.resize(d + 1);
-			// We start by choosing the first |k| axes to define a plane of projection
-            int i = 0;
-            for(; i < k;     ++i) state_.axes_[i] = i;
-            for(; i < d + 1; ++i) state_.axes_[i] = -1;
-        }
-        const typename ForwardIterator::value_type & l(*first);
-        typename LA::Matrix M(k); // quadratic
-        while( true )
-        {
-            ForwardIterator s = first;
-            ++s;
-            int j(0);
-            while( s != last )
-            {
-                const typename ForwardIterator::value_type & point(*s);
-                for( int i = 0; i < k; ++i )
-                    M(i,j) = point.cartesian(state_.axes_[i]) - l.cartesian(state_.axes_[i]);
-                ++s;
-                ++j;
-            }
-            Orientation o = Orientation(LA::sign_of_determinant(M));
-            if( ( o != COPLANAR ) || state_.axes_found_ )
-            {
-                state_.axes_found_ = true;
-                return o;
-            }
-            // for generating all possible unordered k-uple in the range
-            // [0 .. d-1]... we go to the next unordered k-uple:
-            int index = k - 1;
-            while( (index >= 0) && (state_.axes_[index] == d - k + index) )
-                --index;
-            if( index < 0 )
-                break;
-            ++state_.axes_[index];
-            for( int i = 1; i < k - index; ++i )
-                state_.axes_[index + i] = state_.axes_[index] + i;
-        }
-        return COPLANAR;
-    }
-};
-
-template <class R>
-class Side_of_oriented_sphereCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::LA LA;
-    typedef typename R::FT FT;
-    typedef typename R::Oriented_side Oriented_side;
-public:
-    typedef Oriented_side result_type;
-
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last, 
-         const Point_d& x) const
-    { 
-        TUPLE_DIM_CHECK(first,last,Side_of_oriented_sphere_d);
-        int d = static_cast<int>(std::distance(first,last)); // |A| contains |d| points
-        CGAL_assertion_msg((d-1 == first->dimension()), 
-                "Side_of_oriented_sphere_d: needs first->dimension()+1 many input points.");
-        typename LA::Matrix M(d + 1); 
-        for (int i = 0; i < d; ++first, ++i) { 
-            FT Sum = 0;
-            M(i,0) = 1;
-            for (int j = 0; j < d-1; j++) { 
-                FT cj = first->cartesian(j);
-                M(i,j + 1) = cj; Sum += cj*cj; 
-            }
-            M(i,d) = Sum; 
-        }
-        FT Sum = 0; 
-        M(d,0) = 1; 
-        for (int j = 0; j < d-1; j++) { 
-            FT hj = x.cartesian(j);
-            M(d,j + 1) = hj; Sum += hj*hj; 
-        }
-        M(d,d) = Sum;
-        return result_type( - LA::sign_of_determinant(M));
-    }
-};
-
-
-/* This predicates takes k+1 points defining a k-sphere in d-dim space, and a
- * point |x| (assumed to lie in the same affine subspace spanned by the
- * k-sphere). It tests wether the point |x| lies in the positive or negative
- * side of the k-sphere.
- * The parameter |axis| contains the indices of k axis of the canonical base of
- * R^d, on which the affine subspace projects homeomorphically. We can thus
- * "complete" the k+1 points with d-k other points along the "non-used" axes
- * and then call the usual Side_of_oriented_sphereCd predicate.
- */
-template < class R >
-class Side_of_oriented_subsphereCd
-{
-	typedef typename R::Point_d			Point;
-	typedef typename R::LA				LA;
-	typedef typename R::FT				FT;
-	typedef typename R::Orientation     Orientation;
-	typedef typename R::Oriented_side   Oriented_side;
-	typedef typename R::Side_of_oriented_sphere_d	Side_of_oriented_sphere;
-	typedef typename R::Coaffine_orientation_d		Coaffine_orientation;
-	typedef typename LA::Matrix	        Matrix;	
-	typedef typename Coaffine_orientation::Axes		Axes;
-	// DATA MEMBERS
-	mutable Coaffine_orientation ori_;
-	mutable unsigned int adjust_sign_;
-    // a square matrix of size (D+1)x(D+1) where D is the ambient dimension 
-	mutable typename LA::Matrix M;
-public:
-	typedef Oriented_side   result_type;
-    // typedef internal::stateless_predicate_tag predicate_category;
-
-    // constructor
-	Side_of_oriented_subsphereCd(const R & r = R())
-	: ori_(r.coaffine_orientation_d_object()), M(), adjust_sign_(0) { }
-
-	template < class ForwardIterator >
-	result_type operator()(ForwardIterator first, ForwardIterator last, const Point & q) const
-	{
-		const int d = first->dimension();
-		const int k = std::distance(first, last) - 1; // dimension of affine subspace
-		CGAL_assertion_msg( k <= d, "too much points in range.");
-		if( k == d )
-		{
-			Side_of_oriented_sphere sos;
-			return sos(first, last, q); // perhaps slap user on the back of the head here?
-		}
-        if( M.row_dimension() < d+1 )
-            M = Matrix(d+1);
-		if( ! ori_.state().axes_found_ )
-		{
-            // the call to ori_(...) will compute a set of axes to complement our base.
-			Orientation o = ori_(first, last);
-			if( COPLANAR == o )
-            {
-                std::cerr << "\nAffine base is flat (it should have positive orientation) !!";
-                //return ON_ORIENTED_BOUNDARY;
-            }
-			CGAL_assertion( o == POSITIVE );
-			// Now we can setup the fixed part of the matrix:
-			int a(0);
-			int j(k);
-			typename Axes::iterator axis = ori_.state().axes_.begin();
-			while( j < d )
-			{
-				while( a  == *axis )
-				{
-					++a; ++axis;
-				}
-	            adjust_sign_ = ( adjust_sign_ + j + a ) % 2;
-				int i(0);
-				for( ; i < a; ++i )
-					M(i, j) = FT(0);
-				M(i++, j) = FT(1);  // i.e.: M(a, j) = 1
-				for( ; i < d; ++i )
-					M(i, j) = FT(0);
-				++j;
-				++a;
-			}
-		}
-		typename ForwardIterator::value_type p1 = *first;
-		FT SumFirst(0); // squared length of first subsphere point, seen as vector.
-		for( int i = 0; i < d; ++i )
-		{
-			FT ci = p1.cartesian(i);
-			SumFirst += ci * ci;
-		}
-		int j(0); // iterates overs columns/subsphere points
-		++first;
-		while( first != last )
-		{
-			typename ForwardIterator::value_type v = *first;
-			FT Sum = FT(0);
-			for( int i = 0; i < d; ++i )
-			{
-				FT ci = v.cartesian(i);
-				M(i, j) = ci - p1.cartesian(i);
-				Sum += ci * ci;
-			}
-			M(d, j) = Sum - SumFirst;
-			++first;
-			++j;
-		}
-		int a(0);
-		typename Axes::iterator axis = ori_.state().axes_.begin();
-		while( j < d )
-		{
-			while( a  == *axis )
-			{
-				++a; ++axis;
-			}
-			M(d, j) = FT(1) + FT(2) * p1.cartesian(a);
-			++j;
-			++a;
-		}
-		FT Sum = FT(0);
-		for( int i = 0; i < d; ++i )
-		{
-			FT ci = q.cartesian(i);
-			M(i, d) = ci - p1.cartesian(i);
-			Sum += ci * ci;
-		}
-		M(d, d) = Sum - SumFirst;
-		if( 0 == ( adjust_sign_ % 2 ) )
-			return result_type( - LA::sign_of_determinant( M ) );
-		else
-			return result_type(   LA::sign_of_determinant( M ) );
-	}
-};
-
-template <class R>
-class Side_of_bounded_sphereCd
-{
-    typedef typename R::Point_d         Point_d;
-    typedef typename R::Orientation_d   Orientation_d;
-    typedef typename R::Side_of_oriented_sphere_d Side_of_oriented_sphere_d;
-    typedef typename R::Orientation     Orientation;
-    typedef typename R::Oriented_side   Oriented_side;
-    typedef typename R::Bounded_side    Bounded_side;
-public:
-    typedef Bounded_side    result_type;
-
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last, 
-            const Point_d& p) const
-    {
-        TUPLE_DIM_CHECK(first,last,region_of_sphere);
-        Orientation_d _orientation;
-        Orientation o = _orientation(first,last);
-        CGAL_assertion_msg((o != 0), "Side_of_bounded_sphere_d: \
-                A must be full dimensional.");
-        Side_of_oriented_sphere_d _side_of_oriented_sphere;
-        Oriented_side oside = _side_of_oriented_sphere(first,last,p);
-        if (o == POSITIVE) {
-            switch (oside) {
-                case ON_POSITIVE_SIDE    :   return ON_BOUNDED_SIDE;
-                case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
-                case ON_NEGATIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
-            }       
-        } else {
-            switch (oside) {
-                case ON_POSITIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
-                case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
-                case ON_NEGATIVE_SIDE    :   return ON_BOUNDED_SIDE;
-            }     
-        }
-        return ON_BOUNDARY; // never reached
-    }
-};
-
-
-template <class R>
-class Contained_in_simplexCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::FT FT;
-    typedef typename R::LA LA;
-    typedef typename LA::Vector Vector;
-    typedef typename LA::Matrix Matrix;
-public:
-    typedef typename R::Boolean result_type;
-
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last,
-            const Point_d& p) const
-    {
-        TUPLE_DIM_CHECK(first,last,Contained_in_simplex_d);
-        int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-        int d = first->dimension(); 
-        CGAL_assertion_code( typename R::Affinely_independent_d check_independence; )
-        CGAL_assertion_msg(check_independence(first,last),
-                "Contained_in_simplex_d: A not affinely independent.");
-        CGAL_assertion(d==p.dimension());
-
-        Matrix M(d + 1,k); 
-        Vector b(d +1);
-        for (int j = 0; j < k; ++first, ++j) {
-            for (int i = 0; i < d; ++i) 
-                M(i,j) = first->cartesian(i);
-            M(d,j) = 1;
-        }
-        for (int i = 0; i < d; ++i) 
-            b[i] = p.cartesian(i);
-        b[d] = 1;
-
-        FT D; 
-        Vector lambda; 
-        if ( LA::linear_solver(M,b,lambda,D) ) {
-            for (int j = 0; j < k; j++) { 
-                if (lambda[j] < FT(0)) return false;
-            }
-            return true;
-        }
-        return false; 
-    }
-};
-
-template <class R>
-class Contained_in_affine_hullCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::LA LA;
-    typedef typename R::Boolean Boolean;
-public:
-    typedef Boolean result_type;
-
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last,
-                const Point_d& p) const
-    {
-         TUPLE_DIM_CHECK(first,last,Contained_in_affine_hullCd);
-         int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-         int d = first->dimension(); 
-         typename LA::Matrix M(d + 1,k); 
-         typename LA::Vector b(d + 1); 
-         for (int j = 0; j < k; ++first, ++j) {
-             for (int i = 0; i < d; ++i) 
-                 M(i,j) = first->cartesian(i);
-             M(d,j) = 1;
-         }
-         for (int i = 0; i < d; ++i)
-             b[i] = p.cartesian(i);
-         b[d] = 1;
-         return LA::is_solvable(M,b);
-    }
-};
-
-
-template <class R>
-class Affine_rankCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::Vector_d Vector_d;
-    typedef typename R::LA LA;
-public:
-    typedef int result_type;
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        TUPLE_DIM_CHECK(first,last,Affine_rank_d);
-        int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-        if (k == 0) return -1;
-        if (k == 1) return 0; 
-        int d = first->dimension();
-        typename LA::Matrix M(d,--k);
-        Point_d p0 = *first; ++first; // first points to second
-        for (int j = 0; j < k; ++first, ++j) {
-            Vector_d v = *first - p0;
-            for (int i = 0; i < d; i++) 
-                M(i,j) = v.cartesian(i); 
-        }
-        return LA::rank(M);
-    }
-};
-
-template <class R>
-class Affinely_independentCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::LA LA;
-    typedef typename R::Affine_rank_d Affine_rank_d;
-public:
-    typedef typename R::Boolean result_type;
-
-    template <class ForwardIterator> 
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        Affine_rank_d rank;
-        int n = static_cast<int>(std::distance(first,last));
-        return rank(first,last) == n-1;
-    }
-};
-
-
-template <class R>
-class Compare_lexicographicallyCd
-{
-    typedef typename R::Point_d Point_d;
-    typedef typename R::Point_d PointD; //MSVC hack
-    typedef typename R::Comparison_result Comparison_result;
-public:
-    typedef Comparison_result result_type;
-
-    result_type operator()(const Point_d & p1, const Point_d & p2) const
-    {
-        return PointD::cmp(p1,p2);
-    }
-};
-
-template <class R>
-class Contained_in_linear_hullCd
-{
-    typedef typename R::LA LA;
-    typedef typename R::FT FT;
-    typedef typename R::Vector_d Vector_d;
-public:
-    typedef typename R::Boolean result_type;
-
-    template<class ForwardIterator>
-    result_type operator()(
-        ForwardIterator first, ForwardIterator last, const Vector_d& x) const
-    {
-        TUPLE_DIM_CHECK(first,last,Contained_in_linear_hull_d);
-        int k = static_cast<int>(std::distance(first,last));
-        // |A| contains |k| vectors
-        int d = first->dimension();
-        typename LA::Matrix M(d,k);
-        typename LA::Vector b(d); 
-        for (int i = 0; i < d; i++) { 
-            b[i] = x.cartesian(i); 
-            for (int j = 0; j < k; j++) 
-                M(i,j) = (first+j)->cartesian(i); 
-        }
-        return LA::is_solvable(M,b); 
-    }
-};
-
-template <class R>
-class Linear_rankCd
-{
-    typedef typename R::LA LA;
-public:
-    typedef int result_type;
-
-    template <class ForwardIterator>
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        TUPLE_DIM_CHECK(first,last,linear_rank);
-        int k = static_cast<int>(std::distance(first,last)); // k vectors
-        int d = first->dimension(); 
-        typename LA::Matrix M(d,k);
-        for (int i = 0; i < d  ; i++)
-            for (int j = 0; j < k; j++)  
-                M(i,j) = (first + j)->cartesian(i);
-        return LA::rank(M);
-    }
-};
-
-template <class R>
-class Linearly_independentCd
-{
-    typedef typename R::LA LA;
-public:
-    typedef typename R::Boolean result_type;
-
-    template <class ForwardIterator>
-    result_type operator()(ForwardIterator first, ForwardIterator last) const
-    {
-        typename R::Linear_rank_d rank;
-        return rank(first,last) == static_cast<int>(std::distance(first,last));
-    }
-};
-
-template <class R>
-class Linear_baseCd
-{
-    typedef typename R::LA LA;
-    typedef typename R::FT FT;
-    typedef typename R::Vector_d Vector_d;
-public:
-    template <class ForwardIterator, class OutputIterator>
-    OutputIterator operator()(ForwardIterator first, ForwardIterator last,
-        OutputIterator result) const
-    {
-        TUPLE_DIM_CHECK(first,last,linear_base);
-        int k = static_cast<int>(std::distance(first,last)); // k vectors
-        int d = first->dimension();
-        typename LA::Matrix M(d,k); 
-        for (int j = 0; j < k; ++first, ++j)
-            for (int i = 0; i < d; i++)
-                M(i,j) = first->cartesian(i);
-
-        std::vector<int> indcols;
-        int r = LA::independent_columns(M,indcols);
-
-        for (int l=0; l < r; l++) {
-            typename LA::Vector v = M.column(indcols[l]);
-            *result++ = Vector_d(d,v.begin(),v.end());
-        }
-        return result;
-    }
-};
-
-} //namespace CGAL
-#endif //CGAL_FUNCTION_OBJECTSCD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsHd.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsHd.h
deleted file mode 100644
index 0a5d8ba..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objectsHd.h
+++ /dev/null
@@ -1,513 +0,0 @@
-// Copyright (c) 2000,2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel
-
-//---------------------------------------------------------------------
-// file generated by notangle from noweb/function_objectsHd.lw
-// please debug or modify noweb file
-// coding: K. Mehlhorn, M. Seel
-//---------------------------------------------------------------------
-
-#ifndef CGAL_FUNCTION_OBJECTSHD_H
-#define CGAL_FUNCTION_OBJECTSHD_H
-
-#include <CGAL/basic.h>
-#include <CGAL/enum.h>
-
-namespace CGAL {
-
-template <typename K>
-class Compute_coordinateHd {
-  typedef typename K::FT             FT;
-  typedef typename K::Point_d        Point_d;
- public:
-  typedef FT                         result_type;  
-  result_type 
-    operator()(const Point_d& p, int i) const
-  {
-    return p.cartesian(i);
-  }
-};
-
-template <typename K>
-class Point_dimensionHd {
-  typedef typename K::RT             RT;
-  typedef typename K::Point_d        Point_d;
-  public:
-  typedef int                       result_type;
-  result_type 
-    operator()(const Point_d& p) const
-  {
-    return p.dimension();
-  }
-};
-
-template <typename K>
-class Less_coordinateHd {
-  typedef typename K::RT             RT;
-  typedef typename K::Point_d        Point_d;
-  public:
-  typedef bool                       result_type;
-  result_type 
-    operator()(const Point_d& p, const Point_d& q, int i) const
-  {
-    int d = p.dimension();
-    return p.cartesian(i)*q.homogeneous(d)<q.cartesian(i)*p.homogeneous(d);
-  }
-};
-
-
-template <class R>
-struct Lift_to_paraboloidHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::RT RT;
-typedef typename R::LA LA;
-
-Point_d operator()(const Point_d& p) const
-{ 
-  int d = p.dimension();
-  typename LA::Vector h(d+2);
-  RT D = p.homogeneous(d);
-  RT sum = 0;
-  for (int i = 0; i<d; i++) {
-    RT hi = p.homogeneous(i);
-    h[i] = hi*D;
-    sum += hi*hi;
-  }
-  h[d] = sum;
-  h[d+1] = D*D;
-  return Point_d(d+1,h.begin(),h.end());
-}
-};
-
-template <class R>
-struct Project_along_d_axisHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::RT RT;
-typedef typename R::LA LA;
-
-Point_d operator()(const Point_d& p) const
-{ int d = p.dimension();
-  return Point_d(d-1, p.homogeneous_begin(),p.homogeneous_end()-2,
-                 p.homogeneous(d));
-}
-};
-
-template <class R>
-struct MidpointHd {
-typedef typename R::Point_d Point_d;
-Point_d operator()(const Point_d& p, const Point_d& q) const
-{ return Point_d(p + (q-p)/2); }
-};
-
-template <class R>
-struct Center_of_sphereHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::RT RT;
-typedef typename R::LA LA;
-template <class Forward_iterator>
-Point_d operator()(Forward_iterator start, Forward_iterator end) const
-{ CGAL_assertion(start!=end);
-  int d = start->dimension();
-  typename LA::Matrix M(d);
-  typename LA::Vector b(d);
-  Point_d pd = *start++;
-  RT pdd  = pd.homogeneous(d);
-  for (int i = 0; i < d; i++) { 
-    // we set up the equation for p_i
-    Point_d pi = *start++; 
-    RT pid = pi.homogeneous(d);
-    b[i] = 0;
-    for (int j = 0; j < d; j++) {
-      M(i,j) = RT(2) * pdd * pid * 
-               (pi.homogeneous(j)*pdd - pd.homogeneous(j)*pid);
-      b[i] += (pi.homogeneous(j)*pdd - pd.homogeneous(j)*pid) *
-              (pi.homogeneous(j)*pdd + pd.homogeneous(j)*pid);
-    }
-  }
-  RT D;
-  typename LA::Vector x;
-  LA::linear_solver(M,b,x,D);
-  return Point_d(d,x.begin(),x.end(),D);
-}
-
-}; // Center_of_sphereHd
-
-
-template <class R>
-struct Squared_distanceHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::Vector_d Vector_d;
-typedef typename R::FT FT;
-FT operator()(const Point_d& p, const Point_d& q) const
-{ Vector_d v = p-q; return v.squared_length(); }
-};
-
-template <class R>
-struct Position_on_lineHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::FT FT;
-typedef typename R::RT RT;
-
-bool operator()(const Point_d& p, const Point_d& s, const Point_d& t, 
-     FT& l) const
-{ int d = p.dimension(); 
-  CGAL_assertion_msg((d==s.dimension())&&(d==t.dimension()&& d>0), 
-  "position_along_line: argument dimensions disagree.");
-  CGAL_assertion_msg((s!=t), 
-  "Position_on_line_d: line defining points are equal.");
-  RT lnum = (p.homogeneous(0)*s.homogeneous(d) - 
-             s.homogeneous(0)*p.homogeneous(d)) * t.homogeneous(d); 
-  RT lden = (t.homogeneous(0)*s.homogeneous(d) - 
-             s.homogeneous(0)*t.homogeneous(d)) * p.homogeneous(d); 
-  RT num(lnum), den(lden), lnum_i, lden_i; 
-  for (int i = 1; i < d; i++) {  
-    lnum_i = (p.homogeneous(i)*s.homogeneous(d) - 
-              s.homogeneous(i)*p.homogeneous(d)) * t.homogeneous(d); 
-    lden_i = (t.homogeneous(i)*s.homogeneous(d) - 
-              s.homogeneous(i)*t.homogeneous(d)) * p.homogeneous(d); 
-    if (lnum*lden_i != lnum_i*lden) return false; 
-    if (lden_i != 0) { den = lden_i; num = lnum_i; }
-  }
-  l = R::make_FT(num,den);
-  return true; 
-}
-};
-
-template <class R>
-struct Barycentric_coordinatesHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator, class OutputIterator>
-OutputIterator operator()(ForwardIterator first, ForwardIterator last, 
-  const Point_d& p, OutputIterator result)
-{ TUPLE_DIM_CHECK(first,last,Barycentric_coordinates_d);
-  int d = p.dimension();
-  typename R::Affine_rank_d affine_rank;
-  CGAL_assertion(affine_rank(first,last)==d);
-  typename LA::Matrix M(first,last);
-  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()), x;
-  RT D;
-  LA::linear_solver(M,b,x,D);  
-  for (int i=0; i< x.dimension(); ++result, ++i) {
-    *result= R::make_FT(x[i],D); 
-  }
-  return result;
-}
-};
-
-
-template <class R>
-struct OrientationHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-
-template <class ForwardIterator>
-Orientation operator()(ForwardIterator first, ForwardIterator last)
-{ TUPLE_DIM_CHECK(first,last,Orientation_d);
-  int d = static_cast<int>(std::distance(first,last)); 
-  // range contains d points of dimension d-1
-  CGAL_assertion_msg(first->dimension() == d-1,
-  "Orientation_d: needs first->dimension() + 1 many points.");
-  typename LA::Matrix M(d); // quadratic
-  for (int i = 0; i < d; ++first,++i) {
-    for (int j = 0; j < d; ++j) 
-      M(i,j) = first->homogeneous(j); 
-  }
-  int row_correction = ( (d % 2 == 0) ? -1 : +1 );
-  // we invert the sign if the row number is even i.e. d is odd
-  return Orientation(row_correction * LA::sign_of_determinant(M));
-}
-};
-
-template <class R>
-struct Side_of_oriented_sphereHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-Oriented_side operator()(ForwardIterator first, ForwardIterator last, 
-                         const Point_d& x)
-{ 
-  TUPLE_DIM_CHECK(first,last,Side_of_oriented_sphere_d);
-  int d = static_cast<int>(std::distance(first,last)); // |A| contains |d| points
-  CGAL_assertion_msg((d-1 == first->dimension()), 
-  "Side_of_oriented_sphere_d: needs first->dimension()+1 many input points.");
-  typename LA::Matrix M(d + 1); 
-  for (int i = 0; i < d; ++first, ++i) { 
-    RT Sum = 0;
-    RT hd = first->homogeneous(d-1); 
-    M(i,0) = hd*hd; 
-    for (int j = 0; j < d; j++) { 
-      RT hj = first->homogeneous(j); 
-      M(i,j + 1) = hj * hd; 
-      Sum += hj*hj; 
-    }
-    M(i,d) = Sum; 
-  }
-  RT Sum = 0; 
-  RT hd = x.homogeneous(d-1); 
-  M(d,0) = hd*hd; 
-  for (int j = 0; j < d; j++) { 
-    RT hj = x.homogeneous(j); 
-    M(d,j + 1) = hj * hd; 
-    Sum += hj*hj; 
-  }
-  M(d,d) = Sum; 
-  return CGAL::Sign(- LA::sign_of_determinant(M));
-}
-};
-
-template <class R>
-struct Side_of_bounded_sphereHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-Bounded_side operator()(ForwardIterator first, ForwardIterator last, 
-                        const Point_d& p)
-{
-  TUPLE_DIM_CHECK(first,last,region_of_sphere);
-  typename R::Orientation_d _orientation;
-  Orientation o = _orientation(first,last);
-  CGAL_assertion_msg((o != 0), "Side_of_bounded_sphere_d: \
-  A must be full dimensional.");
-  typename R::Side_of_oriented_sphere_d _side_of_oriented_sphere;
-  Oriented_side oside = _side_of_oriented_sphere(first,last,p);
-  if (o == POSITIVE) {
-    switch (oside) {
-        case ON_POSITIVE_SIDE    :   return ON_BOUNDED_SIDE;
-        case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
-        case ON_NEGATIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
-    }       
-  } else {
-    switch (oside) {
-        case ON_POSITIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
-        case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
-        case ON_NEGATIVE_SIDE    :   return ON_BOUNDED_SIDE;
-    }     
-  }
-  return ON_BOUNDARY; // never reached
-}
-};
-
-
-template <class R>
-struct Contained_in_simplexHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-bool operator()(ForwardIterator first, ForwardIterator last,
-                const Point_d& p) 
-{
-  TUPLE_DIM_CHECK(first,last,Contained_in_simplex_d);
-  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-  int d = first->dimension(); 
-  CGAL_assertion_code(
-    typename R::Affinely_independent_d check_independence; )
-  CGAL_assertion_msg(check_independence(first,last),
-    "Contained_in_simplex_d: A not affinely independent.");
-  CGAL_assertion(d==p.dimension());
-
-  typename LA::Matrix M(d + 1,k); 
-  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()); 
-  for (int j = 0; j < k; ++first, ++j) {
-    for (int i = 0; i <= d; ++i)  
-      M(i,j) = first->homogeneous(i); 
-  }
-
-  RT D; 
-  typename LA::Vector lambda; 
-  if ( LA::linear_solver(M,b,lambda,D) ) { 
-    int s = CGAL_NTS sign(D); 
-    for (int j = 0; j < k; j++) { 
-      int t = CGAL_NTS sign(lambda[j]); 
-      if (s * t < 0) return false; 
-    }
-    return true;
-  }
-  return false; 
-}
-};
-
-template <class R>
-struct Contained_in_affine_hullHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-bool operator()(ForwardIterator first, ForwardIterator last,
-                const Point_d& p) 
-{
-  TUPLE_DIM_CHECK(first,last,Contained_in_affine_hull_d);
-  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-  int d = first->dimension(); 
-  typename LA::Matrix M(d + 1,k); 
-  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()); 
-  for (int j = 0; j < k; ++first, ++j) 
-    for (int i = 0; i <= d; ++i) 
-      M(i,j) = first->homogeneous(i); 
-  return LA::is_solvable(M,b); 
-}
-};
-
-
-template <class R>
-struct Affine_rankHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::Vector_d Vector_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-int operator()(ForwardIterator first, ForwardIterator last) 
-{
-  TUPLE_DIM_CHECK(first,last,Affine_rank_d);
-  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
-  if (k == 0) return -1; 
-  if (k == 1) return 0; 
-  int d = first->dimension(); 
-  typename LA::Matrix M(d,--k);
-  Point_d p0 = *first; ++first; // first points to second
-  for (int j = 0; j < k; ++first, ++j) {
-    Vector_d v = *first - p0;
-    for (int i = 0; i < d; i++) 
-      M(i,j) = v.homogeneous(i); 
-  }
-  return LA::rank(M); 
-}
-};
-
-template <class R>
-struct Affinely_independentHd { 
-typedef typename R::Point_d Point_d;
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-
-template <class ForwardIterator> 
-bool operator()(ForwardIterator first, ForwardIterator last) 
-{ typename R::Affine_rank_d rank; 
-  int n = static_cast<int>(std::distance(first,last));
-  return rank(first,last) == n-1;
-}
-};
-
-
-template <class R>
-struct Compare_lexicographicallyHd {
-typedef typename R::Point_d Point_d;
-typedef typename R::Point_d PointD; //MSVC hack
-Comparison_result operator()(const Point_d& p1, const Point_d& p2)
-{ return PointD::cmp(p1,p2); }
-};
-
-template <class R>
-struct Contained_in_linear_hullHd {
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-typedef typename R::Vector_d Vector_d;
-
-template<class ForwardIterator>
-bool operator()(
-  ForwardIterator first, ForwardIterator last, const Vector_d& x) 
-{ TUPLE_DIM_CHECK(first,last,Contained_in_linear_hull_d);
-  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| vectors
-  int d = first->dimension(); 
-  typename LA::Matrix M(d,k); 
-  typename LA::Vector b(d); 
-  for (int i = 0; i < d; i++) { 
-     b[i] = x.homogeneous(i); 
-     for (int j = 0; j < k; j++) 
-       M(i,j) = (first+j)->homogeneous(i); 
-  }
-  return LA::is_solvable(M,b); 
-}
-};
-
-template <class R>
-struct Linear_rankHd {
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-template <class ForwardIterator>
-int operator()(ForwardIterator first, ForwardIterator last)
-{ TUPLE_DIM_CHECK(first,last,linear_rank);
-  int k = static_cast<int>(std::distance(first,last)); // k vectors
-  int d = first->dimension(); 
-  typename LA::Matrix M(d,k); 
-  for (int i = 0; i < d  ; i++)
-     for (int j = 0; j < k; j++)  
-       M(i,j) = (first + j)->homogeneous(i); 
-  return LA::rank(M); 
-}
-};
-
-template <class R>
-struct Linearly_independentHd {
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-template <class ForwardIterator>
-bool operator()(ForwardIterator first, ForwardIterator last)
-{ typename R::Linear_rank_d rank;
-  return rank(first,last) == static_cast<int>(std::distance(first,last));
-}
-};
-
-
-template <class R>
-struct Linear_baseHd {
-typedef typename R::LA LA;
-typedef typename R::RT RT;
-typedef typename R::Vector_d Vector_d;
-template <class ForwardIterator, class OutputIterator>
-OutputIterator operator()(ForwardIterator first, ForwardIterator last,
-  OutputIterator result)
-{ TUPLE_DIM_CHECK(first,last,linear_base);
-  int k = static_cast<int>(std::distance(first,last)); // k vectors
-  int d = first->dimension(); 
-  typename LA::Matrix M(d,k); 
-  for (int j = 0; j < k; j++) 
-    for (int i = 0; i < d; i++)
-      M(i,j) = (first+j)->homogeneous(i); 
-
-  std::vector<int> indcols; 
-  int r = LA::independent_columns(M,indcols); 
-
-  for (int l=0; l < r; l++) {
-    typename LA::Vector v = M.column(indcols[l]);
-    *result++ = Vector_d(d,v.begin(),v.end(),1);
-  }
-  return result; 
-}
-};
-
-} //namespace CGAL
-
-#endif // CGAL_FUNCTION_OBJECTSHD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Kernel_traits.h
deleted file mode 100644
index 2ab73d5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kernel_traits.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_KERNEL_TRAITS_H
-#define CGAL_KERNEL_TRAITS_H
-
-namespace CGAL {
-
-template <class T>
-struct Kernel_traits
-{
-  typedef typename T::R Kernel;
-  typedef Kernel type;
-};
-
-} // end namespace CGAL
-
-#endif // CGAL_KERNEL_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Active_objects_vector.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Active_objects_vector.h
deleted file mode 100644
index 22de44f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Active_objects_vector.h
+++ /dev/null
@@ -1,378 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
-#define CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Tools/Label.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Tools/Counter.h>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-#include <iostream>
-#include <CGAL/Kinetic/Multi_listener.h>
-#include <set>
-#include <map>
-#include <vector>
-#include <sstream>
-//#include <boost/iterator/filter_iterator.hpp>
-#include <CGAL/iterator.h>
-#include <boost/iterator/transform_iterator.hpp>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4267) // warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
-#endif
-
-namespace CGAL { namespace Kinetic {
-
-//! Holds a set of moving points and creates notifications when changes occur.
-/*!  This container holds a set of objects of a particular type. It
-  creates notifications using the standard CGAL::Multi_listener
-  interface when a primitive changes or is added or deleted. Objects
-  which are listening for events can then ask which primitives
-  changed.
-
-  There is one type of notification
-  Moving_object_table::Listener_core::IS_EDITING which occurs when the
-  editing mode is set to false.
-
-  As an optimization, the change methods can be called without setting
-  the editing state to true, this acts as if it were set to true for
-  that one function call.
-
-  Objects are stored in a vector. This means that access is constant
-  time, but storage is not generally freed. The only way to be sure is
-  to remove all reference counts for the table or to call clear().
-*/
-template <class Value_t >
-class Active_objects_vector:
-  public Ref_counted<Active_objects_vector<Value_t > >
-{
-public:
-  typedef typename CGAL::Label<Value_t> Key;
-  typedef Value_t Data;
-protected:
-  //! Convenience
-  typedef Active_objects_vector<Value_t> This;
-  typedef std::pair<Key, Value_t> Storage_item;
-  typedef std::vector<Storage_item > Storage;
-  CGAL_KINETIC_MULTILISTENER1(IS_EDITING)
-  
-public:
-
-  //! default constructor
-  Active_objects_vector():editing_(false), num_valid_(false){}
-
-  ~Active_objects_vector(){CGAL_KINETIC_MULTILISTENER_DESTRUCTOR;}
-
-  //! access a point
-  const Data &operator[](Key key) const
-  {
-    CGAL_precondition(key.is_valid());
-    CGAL_precondition(storage_[key.index()].first == key);
-    CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
-    //if (static_cast<unsigned int>(key.index()) >= storage_.size()) return null_object();
-    /*else*/
-    return storage_[key.index()].second;
-  }
-
-  //! non operator based method to access a point.
-  const Data& at(Key key) const
-  {
-    return operator[](key);
-  }
-
-  //! Set the editing state of the object.
-  /*!  A notification is sent when the editing state is set to false
-    after it has been true, i.e. the editing session is finished. This
-    allows changes to be batched together.
-  */
-  void set_is_editing(bool is_e) {
-    if (is_e== editing_) return;
-    editing_=is_e;
-    if (!editing_) {
-      finish_editing();
-    }
-  }
-
-  //! return the editing state
-  bool is_editing() const
-  {
-    return editing_;
-  }
-
-  //! change one point.
-  /*!  The position at the current time should not be different from
-    the previous current position. However, at the moment I do not
-    check this as there is no reference to time in the
-    Data_table.
-
-    If Data_table::editing() is not true, then it is as if the calls
-    - set_editing(true)
-    - set_object(key, value)
-    - set_editing(false)
-    Were made. If it is true, then no notifications are created.
-
-    \todo check continuity.
-  */
-  void set(Key key, const Data &new_value) {
-    CGAL_precondition(key.is_valid());
-    CGAL_precondition(storage_[key.index()].first == key);
-    //CGAL_precondition(editing_);
-        //CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
-    if (storage_.size() <= static_cast<unsigned int>(key.index())) {
-      storage_.resize(key.index()+1);
-    }
-    storage_[key.index()].first=key;
-    storage_[key.index()].second=new_value;
-    changed_objects_.push_back(key);
-    CGAL_expensive_assertion_code(for (unsigned int i=0; i< storage_.size(); ++i) ) {
-      CGAL_expensive_assertion_code(if (key.index() != i && storage_[i].second == storage_[key.index()].second) CGAL_LOG(Log::SOME, "WARNING Objects " << Key(i) << " and " << key << " have equal trajectories.\n"));
-    }
-				  
-    if (!editing_) finish_editing();
-  }
-
-  //! Insert a new object into the table.
-  /*!
-    See Data_table::set_object() for an explainating of how the editing modes are used.
-  */
-  Key insert(const Data &ob) {
-    //CGAL_precondition(editing_);
-    storage_.push_back(Storage_item(Key(storage_.size()), ob));
-    new_objects_.push_back(storage_.back().first);
-
-    CGAL_expensive_assertion_code(for (unsigned int i=0; i< storage_.size()-1; ++i) ) {
-      
-CGAL_expensive_assertion_code(if ( storage_[i].second == storage_.back().second) CGAL_LOG(Log::SOME, "WARNING Objects " << Key(i) << " and " << storage_.back().first << " have equal trajectories.\n"));
-    }
-    if (!editing_) finish_editing();
-    return storage_.back().first;
-  }
-
-  //! Delete an object from the table.
-  /*!
-    The object with Key key must already be in the table.
-
-    This does not necessarily decrease the amount of storage used at
-    all. In fact, it is unlikely to do so.
-
-    See Data_table::set_object() for an explainating of how the editing modes are used.
-  */
-  void erase(Key key) {
-    CGAL_precondition(key.is_valid());
-    CGAL_precondition(storage_[key.index()].first == key);
-    //CGAL_precondition(editing_);
-    CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
-    CGAL_expensive_precondition_code(for (Inserted_iterator dit= inserted_begin(); dit != inserted_end(); ++dit))
-      {CGAL_expensive_precondition(*dit != key);}
-    CGAL_expensive_precondition_code(for (Changed_iterator dit= changed_begin(); dit != changed_end(); ++dit))
-      {CGAL_expensive_precondition(*dit != key);}
-    deleted_objects_.push_back(key);
-    if (!editing_) finish_editing();
-  }
-
-  //! Clear all points.
-  void clear() {
-    deleted_objects_.insert(deleted_objects_.end(), keys_begin(), keys_end());
-    //storage_.clear();
-    if (!editing_) finish_editing();
-  }
-
-  struct Get_key {
-    typedef Key result_type;
-    Key operator()(const Storage_item &o) const {
-      return o.first;
-    }
-  };
-
-  struct Is_ok {
-    typedef bool result_type;
-    //typedef const Storage_item& argument_type;
-    template <class T>
-    bool operator()(const T& p) const {
-      return !p->first.is_valid();
-    }
-  };
-
-  //! An iterator to iterate through all the keys
-  typedef CGAL::Filter_iterator<typename Storage::const_iterator, Is_ok>  Fiterator;
-  typedef boost::transform_iterator<Get_key,  Fiterator> Key_iterator;
-  
-
-  //! Begin iterating through the keys
-  Key_iterator keys_begin() const
-  {
-    return Key_iterator(Fiterator(storage_.end(), Is_ok(), storage_.begin()), Get_key());
-  }
-  //! End iterating through the keys.
-  Key_iterator keys_end() const
-  {
-    return Key_iterator(Fiterator(storage_.end(),  Is_ok()), Get_key());
-  }
-
-  //! An iterator for iterating through changed objects.
-  /*!  The list of objects accessed through this iterator is only
-    those changed in the last session.
-  */
-  typedef typename std::vector<Key>::const_iterator Changed_iterator;
-  Changed_iterator changed_begin() const
-  {
-    return changed_objects_.begin();
-  }
-  Changed_iterator changed_end() const
-  {
-    return changed_objects_.end();
-  }
-  //! An iterator for iterating through added objects.
-  /*!  The list of objects accessed through this iterator is only
-    those added in the last session.
-  */
-  typedef typename std::vector<Key>::const_iterator Inserted_iterator;
-  //! The begin iterator for new objects
-  Inserted_iterator inserted_begin() const
-  {
-    return new_objects_.begin();
-  }
-  //! The past-end iterator for new objects.
-  Inserted_iterator inserted_end() const
-  {
-    return new_objects_.end();
-  }
-  //! An iterator for iterating through deleted objects.
-  /*!  The list of objects accessed through this iterator is only
-    those deleted in the last session.
-  */
-  typedef typename std::vector<Key>::const_iterator Erased_iterator;
-  //! The begin iterator for deleted objects.
-  Erased_iterator erased_begin() const
-  {
-    return deleted_objects_.begin();
-  }
-  //! The past end iterator for deleted objects.
-  Erased_iterator erased_end() const
-  {
-    return deleted_objects_.end();
-  }
-  //! The number of objects in the table
-  /*!  The objects are stored in a vector, so this could be large than
-    (additions- deletions) as non-consecutive blank objects not at the
-    back are still counted. In general, deleting an object doesn't do
-    much for storage, just provides notifications.
-  */
-  unsigned int size() const
-  {
-    return num_valid_;
-  }
-
-  std::ostream &write(std::ostream &out) const {
-    for (unsigned int i=0; i< storage_.size(); ++i){
-      out << storage_[i].second << std::endl;
-    }
-    return out;
-  }
-  
-  std::istream &read(std::istream &in) {
-    if (!storage_.empty()) {
-      set_is_editing(true);
-      for (Key_iterator kit= keys_begin(); kit != keys_end(); ++kit){
-	erase(*kit);
-      }
-      set_is_editing(false);
-      storage_.clear();
-    }
-    set_is_editing(true);
-    do {
-      char buf[10000];
-      in.getline(buf, 10000);
-      if (!in || buf[0]=='\0' || buf[0]=='#') {
-        if(!in.bad()) {
-          in.clear(in.rdstate() & ~std::ios_base::failbit);
-        }
-        break;
-      }
-      std::istringstream iss(buf);
-      Data d; 
-      iss >> d;
-      if (!iss) {
-	CGAL_ERROR("ERROR reading object from line " << buf);
-	++internal::io_errors__;
-      } else {
-	//CGAL_LOG(Log::LOTS, "Read " << d << std::endl);
-	insert(d);
-      }
-    } while (true);
-    set_is_editing(false);
-    return in;
-  }
-
-private:
-
-  void finish_editing() {
-    CGAL_KINETIC_MULTINOTIFY(IS_EDITING);
-
-    num_valid_+= new_objects_.size();
-    num_valid_-= deleted_objects_.size();
-    CGAL_assertion(num_valid_ >=0);
-    for (Erased_iterator it= erased_begin(); it != erased_end(); ++it) {
-      storage_[it->index()].second=Data();
-      storage_[it->index()].first=Key();
-    }
-
-    changed_objects_.clear();
-    deleted_objects_.clear();
-    new_objects_.clear();
-  }
-
-
-protected:
-
-  Storage storage_;
-  std::vector<bool> valid_;
-  std::vector<Key> changed_objects_;
-  std::vector<Key> deleted_objects_;
-  std::vector<Key> new_objects_;
-  bool editing_;
-  int num_valid_;
-
-  /*static const Data &null_object() {
-    static Data o;
-    return o;
-    }*/
-};
-
-template <class V >
-inline std::ostream &operator<<(std::ostream &out, const Active_objects_vector<V> &v) {
-  return v.write(out);
-}
-
-
-template <class V >
-inline std::istream &operator>>(std::istream &in, Active_objects_vector<V> &v) {
-  return v.read(in);
-}
-
-} } //namespace CGAL::Kinetic
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h
deleted file mode 100644
index 3e1dc8d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_ROOT_DEGEN_FK_H
-#define CGAL_KINETIC_ROOT_DEGEN_FK_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-
-namespace CGAL { namespace Kinetic {
-
-
-template <class Traits_t, bool SLOPPY>
-class HDRS{
-  private:
-    typedef typename Traits_t::Root_stack Wrapped_solver;
-    typedef typename Traits_t::Function Function;
-
-  public:
-    typedef typename Wrapped_solver::Root Root;
-    typedef Traits_t Traits;
-    //! Construct and check preconditions
-    /*!
-
-    */
-    HDRS(const Function &uf, const Root& lb,
-	 const Root& ub, const Traits_t& k): solver_(k.root_stack_object(uf, lb, ub)) {
-      CGAL_LOG(Log::LOTS, "Function= " << uf << std::endl);
-      CGAL_expensive_precondition(solver_.empty() || solver_.top() >= lb);
-      if (uf.degree() == -1) {
-	CGAL_LOG(Log::SOME, "Zero function found at time " << lb << std::endl);	
-	++ internal::zero_certificates__;
-      }
-#ifndef NDEBUG
-      if (!SLOPPY && k.sign_at_object()(uf, lb) == CGAL::NEGATIVE) {
-	CGAL_ERROR( "Invalid certificate constructed for function " << uf << " between " << lb 
-			    << " and " << ub << " will fail immediately." << std::endl);
-	CGAL_exactness_precondition(k.sign_at_object()(uf, lb) != CGAL::NEGATIVE);
-      }
-#endif
-      if (solver_.empty()) {
-	CGAL_LOG(Log::LOTS, "No failure" << std::endl);
-	 //sn = k.sign_between_roots_object()(uf, lb, ub);
-      } else if (solver_.top() == lb) {
-	CGAL_LOG(Log::LOTS, "Degeneracy at " << solver_.top() << std::endl);
-	CGAL::Sign sn = k.sign_after_object()(uf, lb);
-	if (sn == CGAL::NEGATIVE) {
-	  ++internal::function_degeneracies__;
-	  CGAL_LOG(Log::LOTS, "Extra root at lower bound of " << lb << std::endl);
-	} else {
-	  CGAL_LOG(Log::LOTS, "Popping extra root at lower bound of " << lb << std::endl);
-	  solver_.pop();
-	}
-      } 
-    }
-
-    HDRS(){}
-
-    //! Drop even roots
-    const Root& top() const
-    {
-      return solver_.top();
-    }
-
-    void pop() {
-      solver_.pop();
-    }
-
-    bool empty() const
-    {
-      return solver_.empty();
-    }
-  /*double estimate() const {
-      return solver_.estimate();
-      }*/
-
-    std::ostream &write(std::ostream& out) const {
-      out << solver_;
-      return out;
-    }
-
-  protected:
-    Wrapped_solver solver_;
-  };
-
-template <class Traits_t, bool SLOPPY>
-struct Handle_degeneracy_function_kernel: public Traits_t
-{
-
-  typedef HDRS<Traits_t, SLOPPY> Root_stack;
-
-  Root_stack root_stack_object(const typename Traits_t::Function &f,
-			       const typename Traits_t::Root &lb,
-			       const typename Traits_t::Root &ub) const {
-    return Root_stack(f, lb, ub, *this);
-  }
-};
-
-template <class T, bool SLOPPY>
-std::ostream &operator<<(std::ostream &out, const HDRS<T, SLOPPY> &k) {
-  return k.write(out);
-}
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_moving_points_2.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_moving_points_2.h
deleted file mode 100644
index c7946ff..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_moving_points_2.h
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_MOVING_POINT_SET_2_H
-#define CGAL_KINETIC_IO_MOVING_POINT_SET_2_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/Simulator_objects_listener.h>
-#include <CGAL/Kinetic/Listener.h>
-#include <sstream>
-
-namespace CGAL { namespace Kinetic {
-
-//! A graphical moving point set
-/*!  This allows a set of moving points to be used in a
-  CGAL::Kinetic::Qt_gui_2 GUI. It listens for PICTURE_IS_VALID
-  notifications from the CGAL::Kinetic::Qt_gui_2 and DIRECTION_OF_TIME
-  notifcations from the CGAL::Kinetic::Simulator and handles them
-  accordingly.
-
-*/
-template <class TraitsC, class GUI>
-class Qt_moving_points_2: public Ref_counted<Qt_moving_points_2<TraitsC, GUI> >
-{
-protected:
-  typedef TraitsC Traits;
-  //typedef Moving_object_set<Moving_point_t> Parent;
-  typedef Qt_moving_points_2<Traits, GUI> This;
-
-  typedef typename Traits::Simulator Simulator;
-  // typedef typename GUI::Listener Gui_listener;
-  //typedef typename Simulator::Listener Simulator_listener;
-  //typedef CGAL::Kinetic::Simulator_objects_listener<Simulator_listener, This> Siml;
-  //  friend class CGAL::Kinetic::Simulator_objects_listener<Simulator_listener, This>;
-  typedef typename Traits::Static_kernel::FT NT;
-  //class Guil;
-  CGAL_KINETIC_LISTEN1(Simulator, DIRECTION_OF_TIME, reverse_time())
-public:
-  //typedef typename CGAL::Ref_counted_pointer<This> Pointer;
-  //typedef typename CGAL::Const_ref_counted_pointer<This> Const_handle;
-
-  //! Only outline drawing is currently supported
-  typedef enum Draw_mode {FILLED, POINT, OUTLINE}
-    Draw_mode;
-
-  //! Defaults to outline drawing
-  Qt_moving_points_2(typename GUI::Handle sim,
-		     Traits tr): traits_(tr),
-				 ik_(tr.instantaneous_kernel_object()),
-				 cc_(ik_.current_coordinates_object()),
-				 _mode(POINT), _radius(.2),
-				 direction_of_time_(CGAL::POSITIVE),
-				 //guil_(sim, const_cast<This*>(this)),
-				 //siml_(tr.simulator_handle(),const_cast<This*>( this)),
-				 rt_(tr.kinetic_kernel_object().reverse_time_object()) {
-    CGAL_KINETIC_INIT_LISTEN(GUI, sim);
-    CGAL_KINETIC_INIT_LISTEN(Simulator, tr.simulator_handle());
-    ptsz_=10;
-  };
-
-  virtual ~Qt_moving_points_2(){}
-
-  int point_size() const {
-    return ptsz_;
-  }
-  
-  void set_point_size(int p) {
-    ptsz_ = p;
-  }
-
-  //! Change how things are drawn
-  void set_draw_mode(Draw_mode mode) {
-    _mode=mode;
-  }
-
-  //! change how big things are drawn
-  void set_radius(double radius) {
-    _radius=radius;
-  }
-
-  //! Set the CGAL::Sign field corresponding to the direction of time.
-  /*!
-    This can have the effect of reversing the motions of the points.
-  */
-  CGAL::Sign direction_of_time() const
-  {
-    return direction_of_time_;
-  }
-
-
-  unsigned int number_visible(NT xmin, NT xmax, NT ymin, NT ymax) const {
-    typename Traits::Instantaneous_kernel::NT ntt(CGAL_KINETIC_NOTIFIER(GUI)->current_time());
-    ik_.set_time(ntt);
-    unsigned int ret=0;
-    for (typename Traits::Active_points_2_table::Key_iterator
-	   it= traits_.active_points_2_table_handle()->keys_begin();
-	 it != traits_.active_points_2_table_handle()->keys_end(); ++it) {
-      //std::cout << "drawing point " << *it  << "= " << ik_.to_static(*it) << std::endl;
-      
-      typename Traits::Static_kernel::Point_2 pt= cc_(*it);
-      if (pt.x() >= xmin && pt.x() <= xmax
-	  && pt.y() >= ymin && pt.y() <= ymax) {
-	++ ret;
-      }
-    }
-    return ret;
-  }
-
-  /*virtual void write(std::ostream &out) const {
-    ik_.set_time(sim_->current_time_nt());
-    for (typename Moving_point_table::key_iterator it= Moving_point_table::begin_keys(); it != Moving_point_table::end_keys(); ++it){
-    out << *it;
-    out << ": " << ik_.to_static(*it) << std::endl;
-    }
-    }*/
-
-protected:
-  CGAL_KINETIC_LISTEN1(GUI,PICTURE_IS_VALID, draw())
-  /*class Guil: public Gui_listener
-  {
-    typedef Gui_listener P;
-    typedef Qt_moving_points_2<Traits, GUI> QtMP;
-  public:
-    Guil(typename GUI::Handle &h, QtMP *t): Gui_listener(h), t_(t){}
-    void new_notification(typename Gui_listener::Notification_type nt) {
-      if (nt== Gui_listener::PICTURE_IS_VALID) {
-	t_->draw();
-      }
-    }
-  protected:
-    QtMP *t_;
-  };
-  friend class Guil;*/
-
-  void draw() const;
-
-  void reverse_time();
-
-  Traits traits_;
-  typename Traits::Instantaneous_kernel ik_;
-  typename Traits::Instantaneous_kernel::Current_coordinates cc_;
-  Draw_mode _mode;
-  double _radius;
-  CGAL::Sign direction_of_time_;
-  //Guil guil_;
-  //Siml siml_;
-  int ptsz_;
-  typename Traits::Kinetic_kernel::Reverse_time rt_;
-};
-
-template <class T, class G>
-void Qt_moving_points_2<T,G>::draw() const
-{
-  //std::cout << "Drawing mpt MPT\n";
-  typedef typename Traits::Static_kernel::Circle_2 C;
-  typedef typename Traits::Kinetic_kernel::Is_constant IC;
-  IC ic = traits_.kinetic_kernel_object().is_constant_object();
-  typename Traits::Simulator::NT ntt(CGAL_KINETIC_NOTIFIER(GUI)->current_time());
-  ik_.set_time(ntt);
-
-  CGAL::Qt_widget &w= CGAL_KINETIC_NOTIFIER(GUI)->widget();
-
-
-  unsigned int numv= number_visible(w.x_min(), w.x_max(),
-				    w.y_min(), w.y_max());
-  if (numv < 200) {
-    w << CGAL::PointSize(ptsz_) << CGAL::LineWidth(1);
-  } else if (numv < 800) {
-    w << CGAL::PointSize(std::max BOOST_PREVENT_MACRO_SUBSTITUTION(1,ptsz_/2)) << CGAL::LineWidth(1);
-  } else if (numv < 2000) {
-    w << CGAL::PointSize(std::max BOOST_PREVENT_MACRO_SUBSTITUTION(1,ptsz_/4)) << CGAL::LineWidth(1);
-  } else {
-    w << CGAL::PointSize(std::max BOOST_PREVENT_MACRO_SUBSTITUTION(ptsz_/8, 1)) << CGAL::LineWidth(1);
-  }
-  // typedef typename Traits::Static_kernel::Point_2 P2;
-  //out << C(P2(0,0), 2) << C(P2(0,0), 1);
-  //out << CGAL::BackgroundColor(CGAL::Color(125,125,125));
-  
-  for (typename Traits::Active_points_2_table::Key_iterator
-	 it= traits_.active_points_2_table_handle()->keys_begin();
-       it != traits_.active_points_2_table_handle()->keys_end(); ++it) {
-    //std::cout << "drawing point " << *it  << "= " << ik_.to_static(*it) << std::endl;
-    if (ic(traits_.active_points_2_table_handle()->at(*it))) {
-      w << CGAL::FillColor(CGAL::Color(150,150,150));
-      //out.setFillColor(CGAL::Color(0,255,0));
-      w << CGAL::Color(150,150,150);
-    } else {
-      w << CGAL::FillColor(CGAL::Color(0,0,0));
-      //out.setFillColor(CGAL::Color(0,255,0));
-      w << CGAL::Color(0,0,0);
-    }
-    typename Traits::Static_kernel::Point_2 pt= cc_(*it);
-    if (_mode== OUTLINE) {
-      w << C(pt, _radius);
-    }
-    else if (_mode == POINT) {
-      w << pt;
-    }
-    if (numv < 150) {
-      std::ostringstream oss;
-      oss << *it;
-      w.get_painter().drawText(w.x_pixel(CGAL::to_double(pt.x()))+3,
-				w.y_pixel(CGAL::to_double(pt.y()))-3,
-				QString(oss.str().c_str()));
-    }
-  }
-}
-
-
-template <class T, class G>
-void Qt_moving_points_2<T,G>::reverse_time()
-{
-  if (direction_of_time_ == CGAL::POSITIVE) direction_of_time_=CGAL::NEGATIVE;
-  else direction_of_time_= CGAL::POSITIVE;
-
-  traits_.active_points_2_table_handle()->set_is_editing(true);
-  for (typename Traits::Active_points_2_table::Key_iterator kit
-	 = traits_.active_points_2_table_handle()->keys_begin();
-       kit != traits_.active_points_2_table_handle()->keys_end(); ++kit) {
-    traits_.active_points_2_table_handle()->
-      set(*kit, rt_(traits_.active_points_2_table_handle()->at(*kit)));
-  }
-  traits_.active_points_2_table_handle()->set_is_editing(false);
-}
-
-
-} } //namespace CGAL::Kinetic
-#endif                                            // guard
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_triangulation_2.h
deleted file mode 100644
index bba7dae..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_triangulation_2.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_QT_TRIANGULATION_2_H
-#define CGAL_KINETIC_IO_QT_TRIANGULATION_2_H
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/internal/tds_2_helpers.h>
-#include <CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h>
-
-namespace CGAL { namespace Kinetic {
-
-//! This class draws a Kinetic_Delaunay_2 triangulation to a Qt_gui_2.
-/*!  The most recently created edges are colored green and the other
-  edges are colored black. See kinetic_Delaunay_2.cc for a useage
-  example. There are no public methods other than the constructor.
-*/
-template <class KDel, class IK, class Qt_gui>
-class Qt_triangulation_2: public Ref_counted<Qt_triangulation_2<KDel, IK, Qt_gui> >
-{
-  typedef Qt_triangulation_2<KDel, IK, Qt_gui> This;
-  // in icc Qt_gui::Listener::This captures This so I need to change the name
-  //typedef This Qt_tri;;
-  typedef typename KDel::Triangulation Triangulation;
-  typedef internal::Triangulation_data_structure_helper_2<typename Triangulation::Triangulation_data_structure> TDS_helper;
-
-  typedef typename Triangulation::Edge Edge;
-
-  // maybe icl wants the class definition before the useage. 
-  CGAL_KINETIC_LISTEN1(Qt_gui, PICTURE_IS_VALID, draw())
-
-
-public:
-  //typedef Kinetic_Delaunay Kinetic_Delaunay;
-  //typedef CGAL::Ref_counted_pointer<This> Pointer;
-
-  Qt_triangulation_2(typename KDel::Handle kdel,
-		     IK ik,
-		     typename Qt_gui::Handle gui): 
-						   ik_(ik),
-						   kdel_(kdel) {
-    CGAL_KINETIC_INIT_LISTEN(Qt_gui, gui);
-  }
-
-protected:
-
-  //! This class listens for redraw requests (PICTURE_IS_VALID becoming false)
-  /*!
-    It calls the draw method when it recieves a notification.
-  */
-
-  template <class V>
-  void set_color(const Triangulation  &, 
-                 const Edge &e, CGAL::Qt_widget &w, const V &) const {
-    if (!kdel_->has_event(e)) {
-      w << CGAL::Color(125,125,125);
-    } else if (kdel_->has_finite_event(e)){
-      w << CGAL::Color(255,0,0);
-    } else {
-      w << CGAL::Color(0,0,0);
-    }
-  }
-
-  typedef Delaunay_triangulation_recent_edges_visitor_2<typename KDel::Triangulation> REV;
-
-  void set_color(const Triangulation  &tri, 
-                 const Edge &e, CGAL::Qt_widget &w,
-                 const REV& ) const {
-    w << CGAL::LineWidth(2);
-    if (!kdel_->has_event(e)) {
-      w << CGAL::Color(125,125,125);
-    } else if (kdel_->visitor().contains(e) || kdel_->visitor().contains(tri.mirror_edge(e))) {
-      w<< CGAL::Color(0,255,0);
-    } else if (kdel_->has_finite_event(e)){
-      w << CGAL::Color(125,125,125);
-    } else {
-      w << CGAL::Color(0,0,0);
-    }
-  }
-  void draw() const {
-    draw(CGAL_KINETIC_NOTIFIER(Qt_gui)->widget(), CGAL_KINETIC_NOTIFIER(Qt_gui)->current_time());
-  }
-  //! Draw the triangulation.
-  void draw( CGAL::Qt_widget &w, double t) const
-  {
-   
-    
-    const Triangulation  &tri= kdel_->triangulation();
-    ik_.set_time(typename IK::Time(t));
-    typedef typename IK::Static_kernel::Point_2 Static_point;
-    typedef typename IK::Static_kernel::Segment_2 Static_segment;
-    w << CGAL::LineWidth(1);
-    // << CGAL::FillColor(CGAL::Color(0,0,0));
-    if (tri.dimension() != 2) return;
-    ik_.set_time(typename IK::NT(t));
-    typename IK::Current_coordinates cc= ik_.current_coordinates_object();
-    for (typename Triangulation::Finite_edges_iterator fit = tri.finite_edges_begin();
-	 fit != tri.finite_edges_end(); ++fit) {
-      Static_point p0= cc(fit->first->vertex((fit->second+1)%3)->point());
-      Static_point p1= cc(fit->first->vertex((fit->second+2)%3)->point());
-      Static_segment ss(p0, p1);
-      set_color(tri, *fit, w, kdel_->visitor());
-      w << ss;
-    }
-  }
-
-  IK ik_;
-  typename KDel::Handle kdel_;
-};
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_widget_2.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_widget_2.h
deleted file mode 100644
index 689799d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/Qt_widget_2.h
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_QT_SIMULATOR_2_H_
-#define CGAL_KINETIC_QT_SIMULATOR_2_H_
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/IO/internal/GUI_base.h>
-#include <CGAL/Kinetic/IO/internal/Qt_window_2.h>
-#include <CGAL/Kinetic/IO/internal/Qt_widget_2_core.h>
-#include <CGAL/Kinetic/IO/internal/Qt_timer.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/Multi_listener.h>
-#include <set>
-#include <qapplication.h>
-
-namespace CGAL { namespace Kinetic {
-
-//! A GUI for a kinetic simulation in 2D.
-/*!
-  In order to draw graphics, extend Qt_gui_2::Listener. There is
-  one notification type PICTURE_IS_VALID which is created
-  whenever the validity of the picture changes, for example if
-  the time has changed or the picture needs to be redrawn for
-  some other reason. To redraw, use Qt_gui_2::Listener::widget()
-  to get a CGAL::Qt_widget and use this widget to draw the
-  desired geometry.
-
-  As you might guess, Qt is required.
-
-  An example using this and Qt_moving_points_2 can be found in
-  \example 2d_gui.cc.
-*/
-template <class Simulator_t >
-class Qt_widget_2: public Ref_counted<Qt_widget_2<Simulator_t> >
-{
-public:
-  // VC is complaningx
-  typedef Qt_widget_2<Simulator_t> This;
-  typedef Gui_base<Simulator_t, internal::Qt_timer> Graphical_base;
-  typedef typename Simulator_t::Time Time;
-  typedef typename internal::Qt_core_listener<Graphical_base> Window_listener;
-  typedef internal::Qt_widget_2_core Qt_widget;
-  typedef internal::Qt_window_2 Qt_window;
- 
-  //class Base_listener;
-
-  /* struct Listener_core
-  {
-    typedef Qt_widget_2<Simulator_t> Container;
-    typedef enum {PICTURE_IS_VALID}
-      Notification_type;
-    typedef typename Container::Handle Notifier_handle;
-    Qt_widget* widget() const {return widget_;}
-  private:
-    friend class Qt_widget_2<Simulator_t>;
-    void set_widget(Qt_widget *w){ widget_=w;}
-  protected:
-    Qt_widget *widget_;
-  };
-
-  //! The base class for listeners for events.
-  typedef Multi_listener<Listener_core> Listener;
-  friend class  Multi_listener<Listener_core>;*/
-  CGAL_KINETIC_LISTEN1(Qt_widget, PICTURE_IS_CURRENT, draw())
-  CGAL_KINETIC_LISTEN1(Graphical_base, CURRENT_TIME, widget().set_picture_is_current(false))
-
-  CGAL_KINETIC_MULTILISTENER1(PICTURE_IS_VALID)
-public:
-  typedef Simulator_t Simulator;
-  //typedef Const_ref_counted_pointer<This> Const_point;
-
-  //! construct things
-  Qt_widget_2(int argc, char *argv[],
-	      typename  Simulator::Handle sh,
-	      double xmin=-10,double xmax=10, double ymin=-10, double ymax=10): app_(new QApplication(argc, argv)),
-										base_(new Graphical_base(sh)),
-										window_l_(base_){
-
-    app_->setMainWidget(new Qt_window(static_cast<int>(std::floor(xmin)),
-				      static_cast<int>(std::ceil(xmax)),
-				      static_cast<int>(std::floor(ymin)),
-				      static_cast<int>(std::ceil(ymax))));
-    window()->setCaption("KDS");
-    window()->show();
-    CGAL_KINETIC_INIT_LISTEN(Qt_widget, &widget());
-    CGAL_KINETIC_INIT_LISTEN(Graphical_base, base_);
-    //CGAL_KINETIC_INIT_LISTENER(Graphical_base, window()->button_handler()
-    window_l_.set_notifier(window()->button_handler());
-    //window_l_ = std::auto_ptr<Window_listener>(new Window_listener(window()->button_handler(), base_));
-    //widget_l_ = std::auto_ptr<Widget_listener>(new Widget_listener(widget(), this));
-  }
-
-  //! start the gui
-  int begin_event_loop() {
-    widget().set_picture_is_current(false);
-    return app_->exec();
-  }
-
-  //! Access a reference counted pointer to the simulator.
-  /*!
-    I am not sure that I need this method.
-    \todo check if these methods are needed.
-  */
-  const typename Simulator::Const_handle simulator_handle() const
-  {
-    return base_->simulator();
-  }
-
-  //! Access a reference counted pointer to the simulator.
-  typename Simulator::Handle simulator_handle() {
-    return base_->simulator();
-  }
-  //! Return true if the current image of the scene is valid.
-  /*!
-    If this is false, then things need to redraw themselves.
-  */
-  bool picture_is_valid() const
-  {
-    return widget().picture_is_current();
-  }
-  //! Return the current time as a double.
-  double current_time() const
-  {
-    return base_->current_time();
-  }
-  //! Return the current speed of the simulation.
-  double speed() const
-  {
-    return base_->speed();
-  }
-  //! Set the current speed of the simulation.
-  void set_speed(double s) const
-  {
-    base_->set_speed(s);
-  }
-
-  // these should be protected, but vc seems to have problems
-
-  /*typedef typename Graphical_base::Listener GBL;
-  class Base_listener: public GBL
-  {
-    typedef Qt_widget_2<Simulator_t> Container;
-  public:
-    Base_listener(typename Graphical_base::Handle &b, Container *t): GBL(b), t_(t){}
-
-    virtual void new_notification(typename GBL::Notification_type nt) {
-      if (nt== GBL::CURRENT_TIME) {
-	t_->
-      }
-    }
-  protected:
-    Container *t_;
-    };*/
-
-  /*typedef typename Qt_widget::Listener QTL;
-  class Widget_listener: public QTL
-  {
-    typedef Qt_widget_2<Simulator_t> Container;
-  public:
-    Widget_listener(Qt_widget *w, Container *t): QTL(w),  t_(t) {
-    }
-    virtual void new_notification(typename QTL::Notification_type nt) {
-      if (nt == QTL::PICTURE_IS_CURRENT) {
-	if (!widget()->picture_is_current()) {
-	  t_->draw();
-	} else {
-	  //std::cout << "Not drawing...\n";
-	}
-      }
-    }
-    virtual ~Widget_listener() {
-    }
-  protected:
-    Container *t_;
-    };*/
-
-  //! Gui will call output_drawing
-  void draw() {
-    //std::cout << "GUI: Starting drawing.\n";
-    //CGAL_LOG(Log::LOTS, "GUI: Drawing in gui.\n");
-    CGAL_KINETIC_MULTINOTIFY(PICTURE_IS_VALID);
-    /*for (typename std::set<Listener*>::iterator dit= drawables_.begin();
-	 dit != drawables_.end(); ++dit) {
-      //std::cout << "GUI: Drawing something " << *dit << ".\n";
-      (*dit)->new_notification(Listener::PICTURE_IS_VALID);
-      }*/
-  }
-
-        
-  /*Qt_widget* widget() {
-    return window()->widget();
-    }*/
-
-   Qt_widget& widget() const
-  {
-    return *window()->widget();
-  }
-private:
-  /*void new_listener(Listener* d) {
-    CGAL_LOG(Log::SOME, "GUI: Registered a drawable.\n");
-    drawables_.insert(d);
-    d->set_widget(widget());
-    //
-    //d->new_notification(PICTURE_IS_VALID);
-  }
-  void delete_listener(Listener* d) {
-    CGAL_LOG(Log::SOME,"GUI: Unregistered a drawable.\n");
-    drawables_.erase(d);
-    }*/
-
-  friend class Widget_listener; friend class Base_listener;
-
-  /*Qt_window *window() {
-    return reinterpret_cast<Qt_window*>(app_->mainWidget());
-    }*/
-
-  Qt_window *window() const
-  {
-    return reinterpret_cast< Qt_window*>(app_->mainWidget());
-  }
-
- 
-  This operator=(const This &o) {
-    return *this;
-  }
-  Qt_widget_2(const This &o){}
-protected:
-  std::auto_ptr<QApplication> app_;
-  typename Graphical_base::Handle base_;
-  //std::set<Listener*> drawables_;
-  //Base_listener base_l_;
-  Window_listener window_l_;
-  //std::auto_ptr<Widget_listener> widget_l_;
-};
-
-} } //namespace CGAL::Kinetic
-#endif                                            // guard
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/GUI_base.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/GUI_base.h
deleted file mode 100644
index 01387fc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/GUI_base.h
+++ /dev/null
@@ -1,332 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_CGAL_GRAPHICAL_SIMULATOR_BASE_H
-#define CGAL_KINETIC_CGAL_GRAPHICAL_SIMULATOR_BASE_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/Listener.h>
-
-namespace CGAL { namespace Kinetic {
-//! This is a base class for implementing GUIs for kinetic simulations
-/*!  Use this if you need to implement your on GUI. See Qt_gui_2 for a
-  simple example of using it.
-*/
-template <class Simulator_t, class Timer>
-class Gui_base: public CGAL::Kinetic::Ref_counted<Gui_base<Simulator_t, Timer> >
-{
-protected:
-  typedef Simulator_t Simulator;
-  typedef Gui_base<Simulator, Timer> This;
-
-  typedef typename Simulator::Time TT;
-
-public:
-  //typedef CGAL::Ref_counted_pointer<This> Pointer;
-
-  //! The current mode of the simulation.
-  /*!
-    The modes are:
-    - RUNNING
-    - RUNNING_TO_EVENT: run until just before the next event
-    - RUNNING_THROUGH_EVENT: run until just after the next event
-    - PAUSED: suspend whatever was being done before
-    - STOPPED: there really is no function to this other than conventionality
-
-    This creates notifications whenever the current time changes to
-    allow the layer which interacts with the graphics to draw things.
-  */
-  typedef enum Mode {RUNNING, RUNNING_TO_EVENT, RUNNING_THROUGH_EVENT, PAUSED, STOPPED}
-    Mode;
-
-  //! Initialize with a pointer to the simulator.
-  Gui_base(typename Simulator::Handle sh): mode_(STOPPED), paused_mode_(STOPPED),
-					    fps_(60), speed_log_(0),
-					    dir_of_time_(1), timer_(new Timer()),
-					   //timer_callback_(timer_,const_cast<This*>(this)),
-					   /*drawable_(NULL),*/ processing_(false) {
-    sim_= sh;
-    target_cur_time_= CGAL::to_interval(sim_->current_time()).first;
-    CGAL_KINETIC_INIT_LISTEN(Timer, timer_.get());
-  }
-
-  virtual ~Gui_base() {
-   
-  }
-
-  //! Return the current mode.
-  Mode mode() {
-    return mode_;
-  }
-
-  //! Set the current mode and update things accordingly.
-  void set_mode(Mode mode) {
-    if (mode== PAUSED) {
-      if (mode_ == PAUSED) {
-	unpause();
-      }
-      else {
-	pause();
-      }
-    } else if ((mode==RUNNING_TO_EVENT || mode==RUNNING_THROUGH_EVENT)
-	       && sim_->empty()) {
-      std::cout << "No more events.\n";
-      return;
-    }
-    else {
-      mode_= mode;
-    }
-
-    CGAL_LOG(Log::SOME, "Mode changed to " << mode_string(this->mode()) << std::endl);
-    timer_->clear();
-    switch(this->mode()) {
-    case RUNNING_TO_EVENT:
-    case RUNNING_THROUGH_EVENT:
-    case RUNNING:
-      //std::cout << "Starting timer with time " << Parent::step_length_real_time() << std::endl;
-      timer_->run(step_length_real_time());
-      break;
-    case STOPPED:
-    case PAUSED:
-      break;
-    default:
-      std::cerr << "Invalid case: " << this->mode() << std::endl;
-      CGAL_error();
-    }
-  }
-
-  CGAL_KINETIC_LISTENER1(CURRENT_TIME)
-public:
-  //! get the simulator
-  typename Simulator::Handle& simulator() {
-    return sim_;
-  }
-
-  //! get the simulator
-  typename Simulator::Const_handle simulator()const
-  {
-    return sim_;
-  }
-
-  //! The current time as a double.
-  double current_time() const
-  {
-    return target_cur_time_;
-  }
-
-  //! The speed in logrithmic units.
-  double speed() const
-  {
-    return speed_log_;
-  }
-  //! Set the speed of the simulation
-  void set_speed(double s) {
-    speed_log_=s;
-  }
-
-protected:
-
-  const char * mode_string(Mode m) const
-  {
-    switch (m) {
-    case RUNNING:
-      return "<Run>";
-      break;
-    case RUNNING_TO_EVENT:
-      return  "<Run to>";
-      break;
-    case RUNNING_THROUGH_EVENT:
-      return "<Run through>";
-      break;
-    case PAUSED:
-      return "<Pause>";
-      break;
-    case STOPPED:
-      return "<Stop>";
-      break;
-    default:
-      return "<Unknown>";
-    }
-  }
-
-  
-
-  CGAL_KINETIC_LISTEN1(Timer, TICKS, timer_rang())
-  /*class Timer_listener: public Timer::Listener
-  {
-  public:
-    Timer_listener(Timer *tm, This *t):Timer::Listener(tm),  t_(t) {
-    }
-    void new_notification(typename Timer::Listener::Notification_type) {
-      t_->timer_rang();
-    }
-  protected:
-    This *t_;
-  };
-
-  friend class Timer_listener;*/
-
-  void timer_rang() {
-    // do something here
-    if (increment_time()) {
-      timer_->run(step_length_real_time());
-    }
-  }
-
-  bool increment_target_time() {
-    double nt= target_cur_time_+ step_length_kds_time();
-    if (CGAL::compare(nt, target_cur_time_) == CGAL::EQUAL) {
-      std::cerr << "Time failed to advance due to roundoff. This is bad.\n";
-    }
-    target_cur_time_= nt;
-    if (CGAL::compare(TT(nt), sim_->next_event_time()) == CGAL::LARGER) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  /*TT compute_next_timestep() const
-  {
-    return compute_next_timestep(sim_->end_time());
-    }*/
-
-  double step_length_real_time() const
-  {
-    return 1/fps_;
-  }
-
-  double step_length_kds_time() const
-  {
-    return  std::exp(speed_log_)/fps_;
-  }
-
-  bool increment_time() {
-    CGAL_precondition(!is_processing());
-    set_is_processing(true);
-    //typename Parent::Time t= do_timestep(Parent::_end_time);
-    bool ret(true);                       // to satisfy compiler
-    switch (mode_) {
-    case RUNNING:
-      {
-	increment_target_time();
-	TT tt(target_cur_time_);
-	CGAL::Comparison_result cmp=CGAL::compare(tt, sim_->end_time());
-	if (cmp == CGAL::LARGER) {
-	  target_cur_time_ = CGAL::to_interval(sim_->end_time()).second;
-	  ret=false;
-	} else if (cmp== CGAL::EQUAL) {
-	  ret= false;
-	}
-	
-	if (!ret) {
-	  sim_->set_current_time(sim_->end_time());
-	  std::cout << "Simulation reached end of time. "
-		    << "Press \"step over\" to process the next final event (if any)." << std::endl;
-	  set_mode(STOPPED);
-	} else {
-	  sim_->set_current_time(tt);
-	}
-	break;
-      }
-    case RUNNING_TO_EVENT:
-      {
-	TT ct(target_cur_time_);
-	if (CGAL::compare(ct, sim_->next_event_time())== CGAL::SMALLER) {
-	  increment_target_time();
-	  TT tt(target_cur_time_);
-	  CGAL::Comparison_result cmp=CGAL::compare(tt, sim_->next_event_time());
-	  if (cmp != CGAL::SMALLER) {
-	    //target_cur_time_ = CGAL::to_interval(sim_->next_event_time()).second;
-	    ret=false;
-	  } 
-	  
-	  if (!ret) {
-	    sim_->set_current_time(sim_->next_event_time());
-	    set_mode(STOPPED);
-	  }
-	} else {
-	  ret=false;
-	}
-	break;
-      }
-    case RUNNING_THROUGH_EVENT:
-      {
-	TT ct(target_cur_time_);
-	if (CGAL::compare(ct, sim_->next_event_time())== CGAL::SMALLER) {
-	  increment_target_time();
-	  TT tt(target_cur_time_);
-	  CGAL::Comparison_result cmp=CGAL::compare(tt, sim_->next_event_time());
-	  if (cmp != CGAL::SMALLER) {
-	    //target_cur_time_ = CGAL::to_interval(sim_->next_event_time()).second;
-	    ret=false;
-	  } 
-	} else {
-	  ret=false;
-	}
-	  
-	if (!ret) {
-	  //sim_->set_current_time(sim_->next_event_time());
-	  sim_->set_current_event_number(sim_->current_event_number()+1);
-	  set_mode(STOPPED);
-	}
-	break;
-      }
-    default:
-      std::cerr << "Run callback in invalid mode." << std::endl;
-    }
-    CGAL_KINETIC_NOTIFY(CURRENT_TIME);
-    //if (drawable_ != NULL) drawable_->new_notification(Listener::CURRENT_TIME);
-
-    set_is_processing(false);
-
-    return ret;
-  }
-
-  void pause() {
-    paused_mode_= mode_;
-    mode_=PAUSED;
-  }
-  void unpause() {
-    mode_=paused_mode_;
-  }
-
-  bool is_processing() const
-  {
-    return processing_;
-  }
-  void set_is_processing(bool tf) {
-    processing_=tf;
-  }
-
-  Mode mode_;
-  Mode paused_mode_;
-  double fps_;
-  double speed_log_;
-  double target_cur_time_;
-  int dir_of_time_;
-  typename Simulator::Handle sim_;
-  std::auto_ptr<Timer> timer_;
-  //Timer_listener timer_callback_;
-  //Listener *drawable_;
-  bool processing_;
-};
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_core.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_core.h
deleted file mode 100644
index 1855091..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_core.h
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_CORE_H
-#define CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_CORE_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/IO/internal/GUI_base.h>
-#include <CGAL/Kinetic/Multi_listener.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <vector>
-#include <qobject.h>
-
-namespace CGAL
-{
-  namespace Kinetic
-  {
-    namespace internal
-    {
-      class Qt_core: public QObject, public Non_ref_counted<Qt_core>
-      {
-	typedef Qt_core This;
-	Q_OBJECT
-	public:
-	//typedef int Timer_id;
-
-	Qt_core();
-
-	CGAL_KINETIC_LISTENERNT1(LAST_BUTTON_PRESSED)
-      public:
-      
-	/*class Listener
-	  {
-	  public:
-	  typedef Qt_core* Notifier_handle;
-	  Listener(Qt_core *c): h_(c) {
-	  c->set_listener(this);
-	  }
-	  virtual ~Listener() {
-	  h_->set_listener(NULL);
-	  }
-	  typedef enum {LAST_BUTTON_PRESSED}
-	  Notification_type;
-	  virtual void new_notification(Notification_type tp)=0;
-	  Qt_core *notifier() {
-	  return h_;
-	  }
-	  protected:
-	  Qt_core *h_;
-	  };*/
-
-	enum Button {RUN, STOP, RUN_TO, RUN_THROUGH, REVERSE, PAUSE, FASTER, SLOWER};
-	typedef enum Button Button;
-
-	Button last_button_pressed() const
-	{
-	  return mode_;
-	}
-      protected:
-	//Listener *playable_;
-	Button mode_;
-      private:
-	//friend class Listener;
-	/*void set_listener(Listener *p) {
-	  playable_= p;
-	  }
-	  const Listener *listener() const
-	  {
-	  return playable_;
-	  }*/
-      public slots:                     //functions
-	
-	void play_button();
-	void pause_button();
-	void stop_button();
-	void play_to_button();
-	void play_through_button();
-	void reverse_button();
-	void faster_button();
-	void slower_button();
-      };
-
-      template <class Base>
-      class Qt_core_listener: public Qt_core::Listener
-      {
-	typedef typename Qt_core::Listener IF;
-	typedef Qt_core BH;
-      public:
-	Qt_core_listener(typename Base::Handle &t): t_(t) {
-	}
-	virtual void new_notification(typename IF::Notification_type nt) {
-	  if (nt == IF::LAST_BUTTON_PRESSED) {
-	    if (notifier()->last_button_pressed() == BH::RUN) {
-	      t_->set_mode(Base::RUNNING);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::PAUSE) {
-	      t_->set_mode(Base::PAUSED);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::STOP) {
-	      t_->set_mode(Base::STOPPED);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::RUN_TO) {
-	      t_->set_mode(Base::RUNNING_TO_EVENT);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::RUN_THROUGH) {
-	      t_->set_mode(Base::RUNNING_THROUGH_EVENT);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::REVERSE) {
-	      if (t_->simulator()->direction_of_time()==CGAL::POSITIVE) {
-		t_->simulator()->set_direction_of_time(CGAL::NEGATIVE);
-	      }
-	      else {
-		t_->simulator()->set_direction_of_time(CGAL::POSITIVE);
-	      }
-	    }
-	    else if (notifier()->last_button_pressed() == BH::FASTER) {
-	      t_->set_speed(t_->speed()+.25);
-	    }
-	    else if (notifier()->last_button_pressed() == BH::SLOWER) {
-	      t_->set_speed(t_->speed()-.25);
-	    }
-	  }
-	}
-	virtual ~Qt_core_listener() {
-	}
-      protected:
-	typename Base::Handle t_;
-      };
-
-    }
-  }
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_timer.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_timer.h
deleted file mode 100644
index b4bc714..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_timer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_INTERNAL_QT_TIMER_H
-#define CGAL_KINETIC_IO_INTERNAL_QT_TIMER_H
-#include <map>
-#include <qtimer.h>
-#include <CGAL/Kinetic/Listener.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-namespace CGAL
-{
-  namespace Kinetic
-  {
-    namespace internal
-    {
-      class Qt_timer: public QObject, public Non_ref_counted<Qt_timer>
-      {
-	Q_OBJECT
-    	CGAL_KINETIC_LISTENERNT1(TICKS)
-     
-      public:
-	Qt_timer();
-	
-	int ticks() const
-	{
-	  return tick_;
-	}
-	void clear() {
-	  //CGAL_precondition(id_!=-1);
-	  if (id_!= -1) timer_.killTimer(id_);
-	  id_=-1;
-	}
-	void run(double time_in_seconds);
-      protected:
-	QTimer timer_;
-	int tick_;
-	int id_;
-	
-	
-	 private slots:
-	 void timerDone();
-      };
-    }
-  }
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h
deleted file mode 100644
index f04f56c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_INTERNAL_QT_WIDGET_2_CORE_H
-#define CGAL_KINETIC_IO_INTERNAL_QT_WIDGET_2_CORE_H
-
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/IO/Qt_widget.h>
-#include <qmainwindow.h>
-#include <CGAL/Kinetic/Listener.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-
-namespace CGAL
-{
-  namespace Kinetic
-  {
-    namespace internal
-    {
-      class Qt_widget_2_core: public ::CGAL::Qt_widget, public Non_ref_counted<Qt_widget_2_core>
-      {
-	Q_OBJECT
-      private:			
-	struct Listener_core{						
-	  typedef  This Notifier;		
-	  typedef enum {PICTURE_IS_CURRENT} Notification_type;		
-	};								
-      public:							
-	typedef CGAL::Kinetic::Listener_base<Listener_core> Listener;	
-	friend class CGAL::Kinetic::Listener_base<Listener_core>;	
-      private:							
-	void set_listener(Listener *sk) {				
-	  listener_=sk;						
-	}								
-	Listener* listener() {return listener_.get();}		
-	Listener::Handle listener_;
-      public:
-
-	/*class Listener
-	{
-	public:
-	  Listener(Qt_widget_2_core *widget): widget_(widget) {
-	    CGAL_precondition(widget!= NULL);
-	    widget_->set_listener(this);
-	  }
-	  virtual ~Listener() {
-	    // could check first
-	    widget_->set_listener(NULL);
-	  }
-	  typedef enum {PICTURE_IS_CURRENT}
-	  Notification_type;
-	  virtual void new_notification(Notification_type) {
-	    //CGAL_ERROR( "draw not implemented.\n");
-	    std::cerr << "Drawing but nothing is to be drawn.\n";
-	  }
-	  Qt_widget_2_core *widget(){return widget_;}
-	protected:
-	  Qt_widget_2_core *widget_;
-	  };*/
-
-	Qt_widget_2_core(QMainWindow *parent);
-
-	//! do not call, this is for Qt use.
-	void redraw() ;
-
-	bool picture_is_current() const
-	{
-	  return is_drawn_;
-	}
-	void set_picture_is_current(bool tf) {
-	  if (tf==false) redraw();
-	}
-      protected:
-	bool is_drawn_;
-
-      };
-    }
-  }
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_window_2.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_window_2.h
deleted file mode 100644
index 4fd60fe..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/Qt_window_2.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_2_GUI_H
-#define CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_2_GUI_H
-//#include <qtimer.h>
-#include <CGAL/Kinetic/basic.h>
-
-#include <CGAL/IO/Qt_widget_layer.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-#include <CGAL/Kinetic/IO/internal/Qt_core.h>
-#include <CGAL/Kinetic/IO/internal/pixmaps.h>
-#include <CGAL/Kinetic/IO/internal/Qt_widget_2_core.h>
-#include <map>
-#include <qmainwindow.h>
-#include <set>
-
-// I think I need these here explicitly for MOC to work
-namespace CGAL
-{
-  namespace Kinetic
-  {
-    namespace internal
-    {
-      /*
-	Usage
-	Qt_simulator_window win(-10,10, -10,10);
-	QApplication app(argc, argv);
-	app.setMainWidget( &_win );
-	win.show();
-	win.setCaption("KDS");
-	app.exec();
-      */
-      class Qt_window_2 : public ::QMainWindow
-      {
-	Q_OBJECT
-      public:
-
-	~Qt_window_2(){}
-
-	Qt_window_2(int xmin, int xmax, int ymin, int ymax);
-
-	typedef Qt_core Button_handler;
-
-	Button_handler* button_handler() {
-	  return &core_;
-	}
-
-	Qt_widget_2_core *widget() {
-	  return widget_;
-	}
-
-	Qt_widget_2_core *widget() const
-	{
-	  return widget_;
-	}
-
-	/*void redraw() // not redraw_win
-	  {
-	  //std::cout << "External redraw.\n";
-	  _widget->redraw();
-	  }*/
-
-      private:                          //members
-	CGAL::Qt_widget_standard_toolbar *_std_toolbar;
-	Qt_widget_2_core *widget_;
-	Qt_core core_;
-      };
-    }
-  }
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/pixmaps.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/pixmaps.h
deleted file mode 100644
index 6cafaa1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/IO/internal/pixmaps.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_IO_PIXMAPS_PIXMAPS_H
-#define CGAL_KINETIC_IO_PIXMAPS_PIXMAPS_H
-namespace CGAL
-{
-    namespace Kinetic
-    {
-        namespace internal
-        {
-            extern const char ** play_xpm;
-            extern const char ** faster_xpm;
-            extern const char ** play_through_xpm;
-            extern const char ** slower_xpm;
-            extern const char ** pause_xpm;
-            extern const char ** play_to_xpm;
-            extern const char ** reverse_xpm;
-            extern const char ** stop_xpm;
-	    extern const char ** print_xpm;
-        }
-    }
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Ref_counted.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Ref_counted.h
deleted file mode 100644
index efe97a3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Ref_counted.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_REF_COUNTED_H
-#define CGAL_REF_COUNTED_H
-#include <CGAL/Kinetic/basic.h>
-#include <boost/intrusive_ptr.hpp>
-#include <boost/utility.hpp>
-
-//#define NEW_REF_COUNTED
-
-namespace CGAL { namespace Kinetic { namespace internal {
-
-class Ref_counted_base;
-
-void intrusive_ptr_add_ref(const Ref_counted_base *t);
-
-void intrusive_ptr_release(const Ref_counted_base *t);
-
-
-class Ref_counted_base: boost::noncopyable
-{
-  typedef Ref_counted_base This;
-
-public:
-  Ref_counted_base() : reference_count_(0) {}
-
-  void write(std::ostream &out) const
-  {
-    out << "(" << reference_count_ << ")";
-  }
-  bool is_referenced() const
-  {
-    return reference_count_ != 0;
-  }
-
-  virtual ~Ref_counted_base() {
-    CGAL_assertion(reference_count_==0);
-  }
-
-  friend void intrusive_ptr_release(const This *t);
-  friend void intrusive_ptr_add_ref(const This *t);
-
-  unsigned int reference_count() const {return reference_count_;}
-
-  void  new_ref() const { ++reference_count_; }
-  void  delete_ref() const
-  {
-    CGAL_precondition(reference_count_!=0);
-    --reference_count_;
-  }
-
-  mutable unsigned int reference_count_;
-};
-
-inline void intrusive_ptr_add_ref(const Ref_counted_base *t)
-{
-  t->new_ref();
-}
-
-
-inline void intrusive_ptr_release(const Ref_counted_base *t)
-{
-  t->delete_ref();
-  if (t->reference_count() == 0) {
-    delete t;
-  }
-}
-
-
-
-struct Non_ref_counted_base{};
-
-inline void intrusive_ptr_add_ref(const Non_ref_counted_base *)
-{
-}
-
-
-inline void intrusive_ptr_release(const Non_ref_counted_base *)
-{
-}
-
-
-
-} } } //namespace CGAL::Kinetic::internal
-
-namespace CGAL { namespace Kinetic {
-
-template <class T>
-class Ref_counted: public internal::Ref_counted_base
-
-{
-  typedef internal::Ref_counted_base P;
- public:
-  typedef T This;
-  typedef typename boost::intrusive_ptr<T> Handle;
-
-  typedef typename boost::intrusive_ptr<const T> Const_handle;
-};
-
-template <class T>
-struct Non_ref_counted: public internal::Non_ref_counted_base
-{
-  typedef T This;
-  typedef typename boost::intrusive_ptr<T> Handle;
-  typedef typename boost::intrusive_ptr<const T> Const_handle;
-};
-
-
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_3.h
deleted file mode 100644
index 57315c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_3.h
+++ /dev/null
@@ -1,1217 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
-#define CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
-#include <CGAL/basic.h>
-
-#include <CGAL/Regular_triangulation_3.h>
-#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
-#include <CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h>
-#include <CGAL/Kinetic/Regular_triangulation_vertex_base_3.h>
-#include <CGAL/Kinetic/Regular_triangulation_cell_base_3.h>
-#include <CGAL/Kinetic/Regular_triangulation_visitor_base_3.h>
-#include <CGAL/Kinetic/Listener.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-
-#include <CGAL/Kinetic/listeners.h>
-
-#include <CGAL/use.h>
-#include <CGAL/assertions.h>
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4355) // complaint about using 'this' to
-#endif                          // initialize a member
-
-
-namespace CGAL { namespace Kinetic { namespace internal {
-
-template <class KD>
-class Regular_3_pop_event: public Delaunay_event_base_3<KD, typename KD::Root_stack>
-{
-  typedef Delaunay_event_base_3<KD, typename KD::Root_stack>  P;
-public:
-  Regular_3_pop_event(const typename KD::Root_stack &s,
-		      const typename KD::Vertex_handle &vh,
-		      KD *kd): P(s, kd), vh_(vh) {
-  }
-
-  void process() {
-    P::kdel()->pop(vh_, P::root_stack());
-  }
-
-  typename KD::Vertex_handle vertex() const
-  {
-    return vh_;
-  }
-
-  std::ostream& write(std::ostream &out) const
-  {
-    out << "Pop " << vh_->point();
-    return out;
-  }
-
-  void audit(typename KD::Event_key k) const {
-    P::kdel()->audit_pop(k, vh_);
-  }
-  /*virtual bool is_of_type(int tp) const {
-    return (tp &type())!=0 || P::is_of_type(tp);
-    }
-    static int type() {
-    return 2;
-    }*/
-
-  virtual ~Regular_3_pop_event(){};
-
-protected:
-  const typename KD::Vertex_handle vh_;
-};
-
-/*template <class K, class S, class VH>
-  std::ostream& operator<<(std::ostream &out, const Regular_3_pop_event<K,S,VH> &e)
-  {
-  e.write(out);
-  return out;
-  }*/
-
-
-template <class KD>
-class Regular_3_non_vertex_event: public Delaunay_event_base_3<KD, typename KD::Root_stack>
-{
-  typedef Delaunay_event_base_3<KD, typename KD::Root_stack>  P;
-public:
-
-  Regular_3_non_vertex_event(const typename KD::Root_stack &s,
-			     const typename KD::Point_key &k,
-			     const typename KD::Cell_handle &c,
-			     KD *kd): P(s,kd), k_(k), cell_(c) {
-  }
-
-  Regular_3_non_vertex_event(){}
-
-  std::ostream& write(std::ostream &out) const
-  {
-    out << "Nothing ";
-    return out;
-  }
-
-  /* virtual bool is_of_type(int tp) const {
-     return (tp &type())!=0 || P::is_of_type(tp);
-     }
-     static int type() {
-     return 4;
-     }*/
-
-  typename KD::Point_key point() const {return k_;}
-
-  typename KD::Cell_handle cell_handle() const {return cell_;}
-
-  virtual ~Regular_3_non_vertex_event(){};
-
-protected:
-  const typename KD::Point_key k_;
-  const typename KD::Cell_handle cell_;
-};
-
-template <class KD>
-class Regular_3_move_event: public Regular_3_non_vertex_event<KD>
-{
-  typedef Regular_3_non_vertex_event<KD>  P;
-public:
-  Regular_3_move_event(const typename KD::Root_stack &s,
-		       const typename KD::Point_key &k,
-		       const typename KD::Cell_handle &c,
-		       int dir,
-		       KD *kd): P(s,k, c, kd), dir_(dir) {
-  }
-
-  void process() {
-    P::kdel()->move(P::k_, P::cell_, dir_, P::root_stack());
-  }
-
-  std::ostream& write(std::ostream &out) const
-  {
-    out << "Move " << P::point() << " from ";
-    internal::write_cell(P::cell_handle() , out);
-    return out;
-  }
-
-  void audit(typename KD::Event_key k) const{
-    P::kdel()->audit_move(k, P::point(), P::cell_, dir_);
-  }
-  /*virtual bool is_of_type(int tp) const {
-    return (tp &type())!=0 || P::is_of_type(tp);
-    }
-    static int type() {
-    return 8;
-    }*/
-
-  virtual ~Regular_3_move_event(){};
-
-protected:
-  int dir_;
-};
-
-/*template <class K,  class S, class KK, class C>
-  std::ostream& operator<<(std::ostream &out, const Regular_3_move_event<K,S,KK,C> &e)
-  {
-  e.write(out);
-  return out;
-  }*/
-
-
-template <class KD>
-class Regular_3_push_event: public Regular_3_non_vertex_event<KD>
-{
-  typedef Regular_3_non_vertex_event<KD>  P;
-public:
-
-  Regular_3_push_event(const typename KD::Root_stack &s,
-		       const typename KD::Point_key &k,
-		       const typename KD::Cell_handle &c,
-		       KD *kd): P(s,k, c, kd) {
-  }
-
-  void process() {
-    P::kdel()->push(P::k_, P::cell_, P::root_stack());
-  }
-
-  std::ostream& write(std::ostream &out) const
-  {
-    out << "Push " << P::point() << " into ";
-    internal::write_cell(P::cell_handle() , out);
-    return out;
-  }
-  
-  void audit(typename KD::Event_key k) const {
-    P::kdel()->audit_push(k, P::point(), P::cell_);
-  }
-  /*virtual bool is_of_type(int tp) const {
-    return (tp &type())!=0 || P::is_of_type(tp);
-    }
-    static int type() {
-    return 16;
-    }*/
-
-  virtual ~Regular_3_push_event(){};
-};
-
-/*template <class K, class S, class KK, class C>
-  std::ostream& operator<<(std::ostream &out, const Regular_3_push_event<K,S,KK,C> &e)
-  {
-  e.write(out);
-  return out;
-  }*/
-
-
-template <class Traits>
-struct Regular_triangulation_3_types
-{
-  typedef typename Traits::Active_points_3_table MPT; // here
-  typedef typename Traits::Kinetic_kernel KK;
-  // typedef CGAL::Triangulation_cell_base_3<typename Traits::Instantaneous_kernel> CFB;
-
-  /*typedef CGAL::Triangulation_cell_base_with_info_3<Delaunay_cache_3<MPT, KK>,
-    typename Traits::Instantaneous_kernel, CFB> CFBI;*/
-
-  //typedef Triangulation_labeled_edge_cell_base_3<CFBI, typename Traits::Simulator::Event_key> TFB;
-  //typedef Triangulation_labeled_facet_cell_base_3<TFB, typename Traits::Simulator::Event_key> FB;
-  /*typedef CGAL::Triangulation_vertex_base_3<typename Traits::Instantaneous_kernel> CVB;
-    typedef CGAL::Triangulation_vertex_base_with_info_3<typename Traits::Simulator::Event_key,
-    typename Traits::Instantaneous_kernel,
-    CVB> LVB;*/
-  typedef CGAL::Kinetic::Regular_triangulation_cell_base_3<Traits> FB;
-  typedef CGAL::Kinetic::Regular_triangulation_vertex_base_3<Traits> LVB;
-
-  typedef CGAL::Triangulation_data_structure_3<LVB, FB> TDS;
-
-  typedef CGAL::Regular_triangulation_3<typename Traits::Instantaneous_kernel, TDS> Default_triangulation;
-
- 
-
-  //friend class CGAL::Delaunay_triangulation_3<typename P::Instantaneous_kernel, TDS>;
-
-};
-
-} } } //namespace CGAL::Kinetic::internal
-
-namespace CGAL { namespace Kinetic {
-
-/*!
-  redundant_cells_ maps each cell with redundant points to the ids of the points in that cell
-
-  redundant_points_ maps each redundant point to a certificate
-*/
-template <class TraitsT,
-	  class VisitorT= Regular_triangulation_visitor_base_3,
-	  class TriangulationT= typename internal::Regular_triangulation_3_types<TraitsT>::Default_triangulation>
-class Regular_triangulation_3:
-  public Ref_counted<Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> >
-{
-private:
-  typedef Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> This;
-  typedef typename TraitsT::Instantaneous_kernel Instantaneous_kernel;
-public:
-  typedef Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> This_RT3;
-  typedef TraitsT Traits;
-  typedef typename Traits::Active_points_3_table::Key Point_key; //here
-  typedef typename Traits::Kinetic_kernel::Certificate Root_stack;
-protected:
-  typedef typename Traits::Active_points_3_table MPT; // here
-  typedef typename Traits::Simulator Simulator;
-  typedef typename Traits::Simulator::Event_key Event_key;
-  typedef typename Traits::Simulator::Time Time;
-
-  
-  typedef TriangulationT Delaunay;
-
-  typedef internal::Regular_triangulation_3_types<TraitsT> Types;
-
-  struct Delaunay_visitor {
-    template <class Point_key, class Cell_handle>
-    void pre_insert_vertex(Point_key v, Cell_handle h) {
-      v_.pre_insert_vertex(v, h);
-    }
-
-    template <class Vertex_handle>
-    void post_insert_vertex(Vertex_handle v) {
-      v_.post_insert_vertex(v);
-    }
-
-    template <class Vertex_handle>
-    void pre_remove_vertex(Vertex_handle v) {
-      v_.pre_remove_vertex(v);
-    }
-
-
-    template <class Point_key>
-    void post_remove_vertex(Point_key v) {
-      v_.post_remove_vertex(v);
-    }
-
-    template <class Vertex_handle>
-    void change_vertex(Vertex_handle v) {
-      v_.change_vertex(v);
-    }
-
-    template <class Cell_handle> 
-    void create_cell(Cell_handle h) {
-      krt_->create_cell(h);
-      v_.create_cell(h);
-    }
-
-    template <class Cell_handle>
-    void destroy_cell(Cell_handle h) {
-      krt_->destroy_cell(h);
-      v_.destroy_cell(h);
-    }
-
-    template <class Edge>
-    void pre_edge_flip(const Edge &e) {
-      v_.pre_edge_flip(e);
-    }
-    template <class Edge>
-    void post_facet_flip(const Edge& e) {
-      v_.post_facet_flip(e);
-    }
-
-    template <class Facet>
-    void pre_facet_flip(const Facet &f) {
-      v_.pre_facet_flip(f);
-    }
-
-    template <class Facet>
-    void post_edge_flip(const Facet& f) {
-      v_.post_edge_flip(f);
-    }
-
-    template <class Key, class Cell>
-    void pre_move(Key k, Cell h){
-      v_.pre_move(k,h);
-    }
-
-    template <class Key, class Cell>
-    void post_move(Key k, Cell h){
-      v_.post_move(k,h);
-    }
-
-    Delaunay_visitor(This* krt, VisitorT v): krt_(krt), v_(v){}
-
-    This* krt_;
-    VisitorT v_;
-  };
-
-  friend struct Delaunay_visitor;
-
-  typedef typename Delaunay::Facet Facet;
-  typedef typename Delaunay::Edge Edge;
-
-public:
-  typedef typename Delaunay::Cell_handle Cell_handle;
-  typedef typename Delaunay::Vertex_handle Vertex_handle;
-  typedef VisitorT Visitor;
-
-
-  friend class internal::Delaunay_event_base_3<This, Root_stack>;
-  typedef internal::Delaunay_3_edge_flip_event<This, Root_stack> Edge_flip;
-  friend class internal::Delaunay_3_edge_flip_event<This, Root_stack>;
-  typedef internal::Delaunay_3_facet_flip_event<This, Root_stack> Facet_flip;
-  friend class internal::Delaunay_3_facet_flip_event<This, Root_stack>;
-
-  typedef internal::Regular_3_pop_event<This> Pop_event;
-  friend class internal::Regular_3_pop_event<This>;
-
-  typedef internal::Regular_3_non_vertex_event<This> Non_vertex_event;
-  friend class internal::Regular_3_non_vertex_event<This>;
-
-  typedef internal::Regular_3_move_event<This> Move_event;
-  friend class internal::Regular_3_move_event<This> ;
-
-  typedef internal::Regular_3_push_event<This> Push_event;
-  friend class internal::Regular_3_push_event<This> ;
-
-protected:
-  typedef std::multimap<typename Delaunay::Cell_handle,
-			Point_key> RCMap;
-  typedef std::map<Point_key, Event_key> RPMap;
-
-  struct Base_traits;
-  friend struct Base_traits;
-
-  struct Base_traits: public TraitsT
-  {
-    
-    typedef TriangulationT Triangulation;
-    typedef typename This_RT3::Edge_flip Edge_flip;
-    typedef typename This_RT3::Facet_flip Facet_flip;
-    typedef typename TraitsT::Kinetic_kernel::Power_test_3 Side_of_oriented_sphere_3;
-    typedef typename TraitsT::Kinetic_kernel::Weighted_orientation_3 Orientation_3;
-    typedef typename TraitsT::Active_points_3_table Active_points_3_table; // here
-
-    Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const
-    {
-      //std::cout << "Getting power test" << std::endl;
-      return TraitsT::kinetic_kernel_object().power_test_3_object();
-    }
-
-    Orientation_3 orientation_3_object() const
-    {
-      return TraitsT::kinetic_kernel_object().weighted_orientation_3_object();
-    }
-
-    Base_traits(This_RT3 *t, const TraitsT &tr): TraitsT(tr), wr_(t) {}
-
-    This_RT3* wrapper_handle() {
-      return wr_;
-    }
-    const This_RT3* wrapper_handle() const
-    {
-      return wr_;
-    }
-
-    Active_points_3_table* active_points_3_table_handle() const {
-      return TraitsT::active_points_3_table_handle(); // here
-    }
-
-    This_RT3 *wr_;
-  };
-
-  typedef internal::Delaunay_triangulation_base_3<Base_traits, Delaunay_visitor> KDel;
-
-  CGAL_KINETIC_DECLARE_LISTENERS(typename TraitsT::Simulator,
-				 typename Traits::Active_points_3_table)
-
-public:
-  
-
-  Regular_triangulation_3(Traits tr, Visitor v= Visitor()): kdel_(Base_traits(this, tr), Delaunay_visitor(this, v)) {
-    CGAL_KINETIC_INITIALIZE_LISTENERS(tr.simulator_handle(),
-				      tr.active_points_3_table_handle());
-  }
-
-
-  const Visitor &visitor() const
-  {
-    return kdel_.visitor().v_;
-  }
-
-  typedef TriangulationT Triangulation;
-  const Triangulation& triangulation() const
-  {
-    return kdel_.triangulation();
-  }
-
-  CGAL_KINETIC_LISTENER1(TRIANGULATION)
-  public:
-
-  void audit_move(Event_key k, Point_key pk, Cell_handle h, int) const {
-    CGAL_assertion(kdel_.vertex_handle(pk) == Vertex_handle());
-    CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
-    CGAL_assertion(redundant_points_.find(pk)->second == k);
-    audit_redundant(pk, h);
-  }
-  
-  void audit_push(Event_key k, Point_key pk, Cell_handle h) const {
-    CGAL_assertion(kdel_.vertex_handle(pk) == Vertex_handle());
-    CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
-    CGAL_assertion(redundant_points_.find(pk)->second == k);
-    audit_redundant(pk, h);
-  }
-  void audit_pop(Event_key k, Vertex_handle vh) const {
-    CGAL_assertion_code(if (vh->info() != k) std::cerr << vh->info() << std::endl << k << std::endl);
-    CGAL_assertion(vh->info() == k);
-  }
-
-
-  void audit_redundant(Point_key pk, Cell_handle h) const {
-    CGAL_LOG(Log::LOTS, "Auditing redundant of " << pk << std::endl);
-    CGAL_assertion_code(bool found=false);
-    for (typename RCMap::const_iterator cur= redundant_cells_.begin();
-	 cur != redundant_cells_.end(); ++cur){
-      if (cur->first == h && cur->second == pk) {
-	CGAL_assertion_code(found=true);
-      } else {
-	CGAL_assertion(cur->second != pk);
-      }
-    }
-    CGAL_assertion(found);
-  }
-  void audit() const
-  {
-    CGAL_LOG(Log::LOTS, "Verifying regular.\n");
-    //if (!has_certificates()) return;
-    CGAL_LOG(Log::LOTS, *this << std::endl);
-    //P::instantaneous_kernel().set_time(P::simulator()->audit_time());
-    kdel_.audit();
-    audit_structure();
-    //  RPMap redundant_points_;
-    // RCMap redundant_cells_;
-
-   
-    Triangulation tri= triangulation();
-    for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end(); ++it) {
-      //Vertex_handle vh= tri.insert(it->first);
-      //if (vh != Vertex_handle()) 
-      CGAL_assertion_code(Vertex_handle rvh= tri.insert(it->first));
-      CGAL_assertion(rvh == Vertex_handle() || rvh->point() != it->first);
-      //if (has_certificates()) {
-      CGAL_assertion_code(Cell_handle ch= get_cell_handle(it->first));
-      CGAL_assertion_code( typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object());
-      CGAL_assertion_code(Cell_handle lh= triangulation().locate(it->first));
-      CGAL_assertion(lh == ch
-		     || cco(it->first).point() == cco(lh->vertex(0)->point()).point()
-		     || cco(it->first).point() == cco(lh->vertex(1)->point()).point()
-		     || cco(it->first).point() == cco(lh->vertex(2)->point()).point()
-		     || cco(it->first).point() == cco(lh->vertex(3)->point()).point());
-	//}
-    }
-  
-  }
-
-  void write(std::ostream &out) const {
-    if (triangulation().dimension() != 3) return;
-    kdel_.write(out);
-    for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
-	 vit != triangulation().finite_vertices_end(); ++vit) {
-      if (kdel_.is_degree_4(vit)) {
-	out << vit->point() << ": " << vit->info() << std::endl;
-      } else if (!kdel_.is_degree_4(vit) && vit->info() != Event_key()) {
-	out << vit->point() << "******: " << vit->info() << std::endl;
-      }
-    }
-    out << "Redundant points: ";
-    for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end();
-	 ++it) {
-      out << it->first << " ";
-    }
-    out << std::endl;
-    typename Delaunay::Cell_handle last;
-    out << "Redundant cells: \n";
-    for (typename RCMap::const_iterator it= redundant_cells_.begin(); it != redundant_cells_.end();
-	 ++it) {
-      if (it->first != last) {
-	last= it->first;
-	internal::write_cell(last, out);
-	out << ": ";
-      }
-      out << it->second << std::endl;
-    }
-    out << std::endl;
-    
-  }
-
-
-
-  void push(Point_key k, typename Triangulation::Cell_handle h, Root_stack rs) {
-    CGAL_LOG(Log::LOTS, "Pushing " << k << " into cell ");
-    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h, LOG_STREAM));
-    CGAL_LOG(Log::LOTS, std::endl);
-    
-    //redundant_points_.erase(k);
-
-    remove_redundant(h,k);
-    
-    //typename Triangulation::Vertex_handle vh= kdel_.push_vertex(k, h);
-    kdel_.clean_cell(h);
-    kdel_.visitor().pre_insert_vertex(k, h);
-    // into max dim simplex?
-    Vertex_handle vh=kdel_.triangulation().tds().insert_in_cell( h);
-    vh->set_point(k);
-    kdel_.set_vertex_handle(k, vh);
-    handle_vertex(vh, rs);
-
-    std::vector<Cell_handle> ics;
-    triangulation().incident_cells(vh, std::back_insert_iterator<std::vector<Cell_handle> >(ics));
-    CGAL_postcondition(ics.size() == 4);
-    for (unsigned int j=0; j< ics.size(); ++j) {
-      Cell_handle cc= ics[j];
-      kdel_.handle_new_cell(cc);
-    }
-    kdel_.visitor().post_insert_vertex(vh);
- 
-    on_geometry_changed();
-  }
-
-  void pop(typename Triangulation::Vertex_handle vh, const Root_stack &rs) {
-    CGAL_LOG(Log::LOTS, "Popping " << vh->point() << std::endl);
-   
-    Point_key k= vh->point();
-    vh->info()= Event_key();
-    typename Triangulation::Cell_handle h= kdel_.pop_vertex(vh);
-    CGAL_precondition(redundant_points_[k]==Event_key());
-    redundant_cells_.insert(typename RCMap::value_type(h,k));
-    handle_redundant(k, h, rs);
-    /*if (!success) {
-      std::cerr << "dropped a vertex when popped.\n";
-      redundant_points_[k]=kdel_.simulator()->null_event();
-      }*/
-    //CGAL_postcondition(success);
-    on_geometry_changed();
-  }
-
-  void move(Point_key k, typename Triangulation::Cell_handle h, int dir, const Root_stack &rs) {
-    kdel_.visitor().pre_move(k,h);
-    CGAL_LOG(Log::LOTS, "Moving " << k << " from ");
-    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h, LOG_STREAM));
-    CGAL_LOG(Log::LOTS, " to ");
-    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h->neighbor(dir), LOG_STREAM ));
-    CGAL_LOG(Log::LOTS, std::endl);
-    typename Triangulation::Cell_handle neighbor = h->neighbor(dir);
-    
-    bool hinf=false;
-    for (unsigned int i=0; i<4; ++i) {
-      if (neighbor->vertex(i)== triangulation().infinite_vertex()) {
-	hinf=true;
-	break;
-      }
-    }
-    if (hinf) {
-      //insert(k, neighbor);
-      push(k, h, rs);
-    } else {
-      remove_redundant(h, k);
-      CGAL_precondition(redundant_points_[k]==Event_key());
-      redundant_cells_.insert(typename RCMap::value_type(neighbor, k));
-      handle_redundant(k, neighbor);
-    }
-    kdel_.visitor().post_move(k,neighbor);
-  }
-
-  //! remove an object
-  /*!
-    See if it is redundant. If so, remove it from the list and delete its certificate.
-    Otherwise, pass it along.
-  */
-  void erase(Point_key ) {
-    CGAL_error();
-    on_geometry_changed();
-  }
-
-  void set(Point_key k) {
-    if (!kdel_.has_certificates()) return;
-    if (kdel_.vertex_handle(k) != NULL) {
-      kdel_.change_vertex(k);
-      if (kdel_.is_degree_4(kdel_.vertex_handle(k))) {
-	handle_vertex(kdel_.vertex_handle(k));
-      }
-    } else {
-      //kdel_.simulator()->template event<Non_vertex_event>(redundant_points_[k]);
-      typename Triangulation::Cell_handle h= get_cell_handle(k);
-      kdel_.simulator()->delete_event(redundant_points_[k]);
-      redundant_points_.erase(k);
-      CGAL_precondition(redundant_points_[k]==Event_key());
-      handle_redundant(k, h);
-    }
-  }
-
-  void insert(Point_key k, Cell_handle h) {
-    // almost the same as push
-    // if insertion fails, then handle redundant
-    CGAL_LOG(Log::LOTS, "Inserth " << k << std::endl);
-    kdel_.set_instantaneous_time();
-    typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object();
-    typename Triangulation::Vertex_handle vh;
-    if (h!= Cell_handle()) {
-      for (unsigned int i=0; i<4; ++i) {
-	if (h->vertex(i) != Vertex_handle()
-	    && h->vertex(i)->point() != Point_key() 
-	    && cco(h->vertex(i)->point()).point() == cco(k).point()) {
-	  CGAL_LOG(Log::SOME, "Point " << k << " is on point " 
-			   << h->vertex(i)->point() << "\n");
-	  vh= h->vertex(i);
-	  break;
-	}
-      }
-      if (vh== Vertex_handle()) {
-	vh=kdel_.insert(k, h);
-      } 
-    } else {
-      vh= kdel_.insert(k);
-    }
-   
-    
-    post_insert(k,vh, h);
-  }
-
-  void insert(Point_key k) {
-    // almost the same as push
-    // if insertion fails, then handle redundant
-    CGAL_LOG(Log::LOTS, "Insert " << k << std::endl);
-
-    kdel_.set_instantaneous_time();
-    Cell_handle h= triangulation().locate(k);
-
-    return insert(k, h);
-  }
-
-  void post_insert(Point_key k, Vertex_handle vh, Cell_handle h) {
-    if (vh != Vertex_handle() && vh->point() != k) {
-      if (!has_certificates()) {
-	unhandled_keys_.push_back(k);
-	return;
-      } else {
-	typename Instantaneous_kernel::Current_coordinates 
-	  cco= triangulation().geom_traits().current_coordinates_object();
-	if (cco(vh->point()).weight() < cco(k).weight()) {
-	  // swap them
-	  Point_key rp = kdel_.replace_vertex(vh, k);
-	  degen_handle_redundant(rp,vh);
-	  if (kdel_.has_certificates() && kdel_.is_degree_4(vh)) {
-	    handle_vertex(vh);
-	  }
-	} else {
-	  vh= Vertex_handle();
-	  degen_handle_redundant(k, vh);
-	  // need to try various cells, not just one
-	}
-      }
-    } else if (vh == Vertex_handle()) {
-      CGAL_precondition(triangulation().geom_traits().time() 
-			==kdel_.simulator()->current_time());
-     
-      if (h== Cell_handle()) {
-	h = triangulation().locate(k);
-      }
-      CGAL_precondition(redundant_points_[k]==Event_key());
-      redundant_cells_.insert(typename RCMap::value_type(h, k));
-      handle_redundant(k,h);
-    } else if (kdel_.has_certificates() && kdel_.is_degree_4(vh)){
-      handle_vertex(vh); 
-    }
-
-    on_geometry_changed();
-  }
-
-  void degen_handle_redundant(Point_key k, Vertex_handle vh) {
-    std::vector<Cell_handle> ics;
-    triangulation().incident_cells(vh, std::back_inserter(ics));
-    kdel_.set_instantaneous_time(true);
-    for (unsigned int i=0; i< ics.size(); ++i) {
-      if (try_handle_redundant(k, ics[i])) return;
-    }
-    CGAL_error();
-  }
-
-public:
-  void set_has_certificates(bool tf) {
-    if (tf == has_certificates()) return;
-    if (tf==false) {
-      for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
-	   vit != triangulation().finite_vertices_end(); ++vit) {
-	if (vit->info() != Event_key()) {
-	  kdel_.simulator()->delete_event(vit->info());
-	  vit->info()=  Event_key();
-	}
-      }
-      for (typename RPMap::iterator it = redundant_points_.begin(); it != redundant_points_.end(); ++it) {
-	kdel_.simulator()->delete_event(it->second);
-	it->second= Event_key();
-      }
-      kdel_.set_has_certificates(false);
-    }
-    else {
-      kdel_.set_has_certificates(true);
-      if (kdel_.triangulation().dimension()==3) {
-	// must be first so the vertex handles are set
-	CGAL_LOG(Log::LOTS, "Setting up certificates.\n");
-	for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
-	     vit != triangulation().finite_vertices_end(); ++vit) {
-	  /*if (kdel_.is_degree_4( vit)) {
-	    handle_vertex(vit);
-	    }*/
-	  CGAL_assertion(!kdel_.is_degree_4(vit) || vit->info() != Event_key());
-	}
-	for (typename RCMap::iterator it= redundant_cells_.begin();
-	     it != redundant_cells_.end(); ++it) {
-	  CGAL_LOG(Log::LOTS, "On init " << it->second 
-			   << " is redundant" << std::endl);
-	  CGAL_precondition(redundant_points_[it->second]==Event_key());
-	  handle_redundant(it->second, it->first);
-	}
-	CGAL_assertion(unhandled_keys_.empty());
-      } else {
-	CGAL_LOG(Log::LOTS, "Triangulation does not have dimension 3.\n");
-      }
-    }
-
-  }
-
-  bool has_certificates() const
-  {
-    return kdel_.has_certificates();
-  }
-
-
-
-protected:
-
-  Cell_handle get_cell_handle(Point_key k) const {
-    CGAL_precondition(redundant_points_.find(k) != redundant_points_.end());
-    if (redundant_points_.find(k)->second == kdel_.simulator()->null_event()
-	|| !has_certificates()) {
-      for (typename RCMap::const_iterator it = redundant_cells_.begin();
-	   it != redundant_cells_.end(); ++it){
-	if (it->second == k) return it->first;
-      }
-      CGAL_error();
-      return Cell_handle();
-    } else {
-      return kdel_.simulator()->template event<Non_vertex_event>(redundant_points_.find(k)->second).cell_handle();
-    }
-  }
-
-  
-  void audit_structure() const
-  {
-    if (!has_certificates()) {
-      for (typename RPMap::const_iterator it= redundant_points_.begin(); 
-	   it != redundant_points_.end(); ++it) {
-	CGAL_assertion(it->second==Event_key());
-      }
-
-      for (typename RCMap::const_iterator it= redundant_cells_.begin(); 
-	   it != redundant_cells_.end(); ++it) {
-	Cell_handle h= it->first;
-	Point_key k=it->second;
-	Cell_handle lh= triangulation().locate(k);
-	if (lh != h) {
-	  typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object();
-	  bool found=false;
-	  for (unsigned int i=0; i<4; ++i) {
-	    if (lh->vertex(i)->point() != Point_key() && cco(lh->vertex(i)->point()).point() 
-		== cco(k).point()) {
-	      found=true;
-	    }
-	  }
-	  CGAL_assertion(found);
-          CGAL_USE(found);
-	}
-
-	
-      }
-    } else {
-      for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
-	   vit != triangulation().finite_vertices_end(); ++vit) {
-	if (triangulation().degree(vit) == 4) {
-	  CGAL_assertion_code(Point_key k= vit->point());
-	  // it could be infinite
-	  // !! for VC
-	  CGAL_assertion(vit->info() != Event_key() || !k.is_valid());
-	}
-	else {
-	  CGAL_assertion(vit->info() == Event_key());
-	}
-	CGAL_assertion(redundant_points_.find(vit->point())== redundant_points_.end());
-      }
-      CGAL_assertion(triangulation().infinite_vertex()->info() == Event_key());
-      for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end(); ++it) {
-	CGAL_assertion(kdel_.vertex_handle(it->first) == Vertex_handle());
-	Cell_handle ch= get_cell_handle(it->first);
-	typename RCMap::const_iterator beg= redundant_cells_.lower_bound(ch);
-	typename RCMap::const_iterator end= redundant_cells_.upper_bound(ch);
-	bool found=false;
-	for (; beg != end; ++beg) {
-	  if (beg->second == it->first) {
-	    found=true;
-	    break;
-	  }
-	}
-	CGAL_assertion(found);
-        CGAL_USE(found);
-      } 
-
-      for (typename RCMap::const_iterator it= redundant_cells_.begin(); 
-	   it != redundant_cells_.end(); ++it) {
-	Point_key pk= it->second;
-	Cell_handle ch= it->first;
-	CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
-	Event_key k= redundant_points_.find(pk)->second;
-
-	Cell_handle ech= get_cell_handle(pk);
-	CGAL_assertion(ch== ech);
-      }
-    }
-  }
-protected:
-  //! also much check for vertex_events
-  void flip(const typename Triangulation::Edge &edge) {
-    kdel_.flip(edge);
-
-    on_geometry_changed();
-  }
-
-  void flip(const typename KDel::Facet &flip_facet) {
-    kdel_.flip(flip_facet);
-
-    on_geometry_changed();
-  }
-
-  CGAL::Sign orientation(Point_key k, Cell_handle h) const {
-    kdel_.set_instantaneous_time();
-    int hinf=-1;
-    for (int i=0; i< 4; ++i) {
-      if (h->vertex(i)->point() == Point_key()) {
-	hinf=i;
-      }
-    }
-    CGAL::Sign ret=CGAL::POSITIVE;
-    for (int i=0; i< 4; ++i) {
-      if (hinf == -1 ||  hinf == i) {
-	typename Triangulation::Facet f(h, i);
-	typename Traits::Instantaneous_kernel::Orientation_3 o3= triangulation().geom_traits().orientation_3_object();
-	
-	CGAL::Sign sn= o3((internal::vertex_of_facet(f,0)->point()),
-			  (internal::vertex_of_facet(f,1)->point()),
-			  (internal::vertex_of_facet(f,2)->point()),
-			  (k));
-	if (sn ==CGAL::ZERO) {
-	  CGAL_LOG(Log::SOME, "Point " << k << " lies on face ") ;
-	  CGAL_LOG_WRITE(Log::SOME, internal::write_facet( f, LOG_STREAM));
-	  CGAL_LOG(Log::SOME, "\nPoint trajectory is  " << point(k)  << std::endl) ;
-	  CGAL_LOG(Log::SOME, "Triangle 0  " << point(internal::vertex_of_facet(f,0)->point())  << std::endl) ;
-	  CGAL_LOG(Log::SOME, "Triangle 1  " << point(internal::vertex_of_facet(f,1)->point())  << std::endl) ;
-	  CGAL_LOG(Log::SOME, "Triangle 2  " << point(internal::vertex_of_facet(f,2)->point())  << std::endl) ;
-	  ret=CGAL::ZERO;
-	} else if (sn==CGAL::NEGATIVE) {
-	  ret=CGAL::NEGATIVE;
-	  return ret;
-	}
-      }
-    }
-    return ret;
-  }
-
-  void handle_redundant(Point_key k, Cell_handle h, Root_stack s) {
-    CGAL_LOG(Log::LOTS, "Handle redundant " << k << " ") ;
-    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell( h, LOG_STREAM));
-    CGAL_LOG(Log::LOTS, std::endl);
-    CGAL_precondition(orientation(k,h) != CGAL::NEGATIVE);
-    CGAL_precondition(redundant_points_[k]==Event_key());
-    CGAL_assertion_code(bool found=false);
-    for( typename RCMap::iterator it = redundant_cells_.begin();  it != redundant_cells_.end(); ++it) {
-      CGAL_assertion_code(if(it->second==k) found=true);
-      CGAL_assertion(h== it->first || it->second != k);
-    }
-    CGAL_assertion(found);
-    redundant_points_[k]= Event_key();
-    if (!kdel_.has_certificates()) return;
- 
-    Time pst;
-    /*if (!ps.empty()) pst = ps.top();
-      else pst= std::numeric_limits<Time>::infinity();*/
-    if (s.will_fail()) {
-      pst=s.failure_time();
-    } else {
-      pst= kdel_.simulator()->end_time();
-    }
-    int hinf=-1;
-    for (int i=0; i< 4; ++i) {
-      if (h->vertex(i)->point() == Point_key()) {
-	hinf=i;
-      }
-    }
-    int first=0;
-    for (int i=0; i< 4; ++i) {
-      if (hinf == -1 || hinf ==i) {
-	typename Triangulation::Facet f(h, i);
-	// order matters
-	Root_stack cs
-	  = kdel_.orientation_object()(point(internal::vertex_of_facet(f,0)->point()),
-				       point(internal::vertex_of_facet(f,1)->point()),
-				       point(internal::vertex_of_facet(f,2)->point()),
-				       point(k),
-				       kdel_.simulator()->current_time(),
-				       kdel_.simulator()->end_time());
-	if (cs.will_fail() && cs.failure_time() < pst) {
-	  pst= cs.failure_time();
-	  s=cs;
-	  first= i+1;
-	}
-      }
-    }
-    if (pst < kdel_.simulator()->end_time()) {
-      s.pop_failure_time();
-      if (first==0 ) {
-	CGAL_LOG(Log::LOTS, "Making push certificate for " << k << std::endl);
-	redundant_points_[k]= kdel_.simulator()->new_event(pst, Push_event(s, k, h, this));
-	CGAL_assertion_code(kdel_.simulator()->audit_event(redundant_points_[k]));
-	CGAL_assertion_code(kdel_.simulator()->audit_events());
-      } else {
-	CGAL_LOG(Log::LOTS, "Making move certificate for " << k << std::endl);
-	redundant_points_[k]= kdel_.simulator()->new_event(pst, Move_event(s, k, h, first-1, this));
-	CGAL_assertion_code(kdel_.simulator()->audit_event(redundant_points_[k]));
-	CGAL_assertion_code(kdel_.simulator()->audit_events());
-      }
-    } else {
-      redundant_points_[k]= kdel_.simulator()->null_event();
-    }
-
-   
-  }
-
-  /*
-    if (s.will_fail()) {
-    Time t= s.failure_time();
-    s.pop_failure_time();
-    redundant_points_[k]= kdel_.simulator()->new_event(t, Push_event(s, vh, this));
-    } else {
-    return kdel_.simulator()->null_event();
-    }
-  */
-
-  void handle_redundant(Point_key k, typename Triangulation::Cell_handle h) {
-    int hinf=-1;
-    for (int i=0; i< 4; ++i) {
-      if (h->vertex(i)->point() == Point_key()) {
-	hinf=i;
-      }
-    }
-    Root_stack ps;
-    if (hinf ==-1 ) {
-      ps
-	= kdel_.power_test_object()(point(h->vertex(0)->point()),
-				    point(h->vertex(1)->point()),
-				    point(h->vertex(2)->point()),
-				    point(h->vertex(3)->point()),
-				    point(k),
-				    kdel_.simulator()->current_time(),
-				    kdel_.simulator()->end_time());
-    }
-    handle_redundant(k,h,ps);
-  }
-
-
-  bool try_handle_redundant(Point_key k, typename Triangulation::Cell_handle h) {
-    CGAL_LOG(Log::LOTS, "Trying handle redundant " << k << " ") ;
-    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell( h, LOG_STREAM));
-    CGAL_LOG(Log::LOTS, std::endl);
-    if (orientation(k,h) != CGAL::NEGATIVE) {
-      CGAL_precondition(redundant_points_[k]==Event_key());
-      redundant_cells_.insert(typename RCMap::value_type(h, k));
-      handle_redundant(k,h);
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  void handle_vertex(typename Triangulation::Vertex_handle vh, Root_stack &s) {
-    CGAL_LOG(Log::LOTS, "Updating vertex " << vh->point() << std::endl);
-    CGAL_precondition(vh->info() == Event_key());
-    if (s.will_fail()) {
-      Time t= s.failure_time();
-      s.pop_failure_time();
-      vh->info()= kdel_.simulator()->new_event(t, Pop_event(s, vh, this));
-      CGAL_assertion_code(kdel_.simulator()->audit_event(vh->info()));
-      CGAL_assertion_code(kdel_.simulator()->audit_events());
-      CGAL_assertion_code(kdel_.simulator()->template event<Pop_event>(vh->info()).audit(vh->info()));
-    } else {
-      vh->info()= kdel_.simulator()->null_event();
-    }
-  }
-
-  void handle_vertex(typename Triangulation::Vertex_handle vh) {
-    CGAL_LOG(Log::LOTS, "Handling vertex " << vh->point() << std::endl);
-    if (vh== triangulation().infinite_vertex()) return;
-    CGAL_precondition( internal::has_degree_4(triangulation(), vh));
-    CGAL_precondition( vh->info() == Event_key());
-
-    typename Triangulation::Cell_handle ch= vh->cell();
-    typename Triangulation::Facet f(ch, ch->index(vh));
-    std::vector<typename Triangulation::Vertex_handle> n(4);
-   
-    for (int i=0; i<3; ++i) {
-      n[i]= internal::vertex_of_facet(f,i);
-      if (n[i]== triangulation().infinite_vertex()) {
-	vh->info() = kdel_.simulator()->null_event();
-	return;
-      }
-    }
-    int ind= (f.second+1)%4;
-    // some vertex on facet
-    n[3] = triangulation().mirror_vertex(ch, ind);
-    if (n[3]== triangulation().infinite_vertex()) {
-      vh->info() = kdel_.simulator()->null_event();
-      return;
-    }
-
-    CGAL_LOG(Log::LOTS, "Making D4 certificate for " << n[0]->point() << n[1]->point()
-		     << n[2]->point() << n[3]->point() << " around " << vh->point() << std::endl);
-
-   
-    //! The order is switched to invert the predicate since we want it to fail when it goes outside
-    Root_stack s
-      = kdel_.power_test_object()(point(n[1]->point()),
-				  point(n[0]->point()),
-				  point(n[2]->point()),
-				  point(n[3]->point()),
-				  point(vh->point()),
-				  kdel_.simulator()->current_time(),
-				  kdel_.simulator()->end_time());
-    return handle_vertex(vh, s);
-  }
-
-
-  void on_geometry_changed() {
-    CGAL_KINETIC_NOTIFY(TRIANGULATION);
-    CGAL_LOG(Log::LOTS, *this);
-    audit_structure();
-  }
-
-  typename MPT::Data point(Point_key k) const {
-    return kdel_.moving_object_table()->at(k);
-  }
-
-  // clean vertex events, gather redundant points
-
-  // create vertex events, try to insert redundant points
-
-
-  void destroy_cell(typename Triangulation::Cell_handle h) {
-    CGAL_LOG(Log::LOTS, "Cleaning cell " << h->vertex(0)->point()
-		     << " " << h->vertex(1)->point() << " " << h->vertex(2)->point()
-		     << " " << h->vertex(3)->point() << std::endl);
-    for (unsigned int i=0; i<4; ++i) {
-      if (h->vertex(i)->info() != Event_key()) {
-	CGAL_LOG(Log::LOTS, "Cleaning vertex " << h->vertex(i)->point() << std::endl);
-	kdel_.simulator()->delete_event(h->vertex(i)->info());
-	h->vertex(i)->info() = Event_key();
-      }
-    }
-    typename RCMap::iterator beg= redundant_cells_.lower_bound(h);
-    typename RCMap::iterator end= redundant_cells_.upper_bound(h);
-    for (; beg != end; ++beg) {
-      unhandled_keys_.push_back(beg->second);
-      kdel_.simulator()->delete_event(redundant_points_[beg->second]);
-      redundant_points_.erase(beg->second);
-    }
-    redundant_cells_.erase(redundant_cells_.lower_bound(h),
-			   redundant_cells_.upper_bound(h));
-  }
-
-  void create_cell(typename Triangulation::Cell_handle h) {
-    CGAL_LOG(Log::LOTS, "Creating cell " << h->vertex(0)->point()
-		     << " " << h->vertex(1)->point() << " " << h->vertex(2)->point()
-		     << " " << h->vertex(3)->point() << std::endl);
-    for (unsigned int i=0; i< 4; ++i){
-      if (h->vertex(i)->info() == Event_key() && kdel_.is_degree_4(h->vertex(i))){
-	handle_vertex(h->vertex(i));
-      }
-    }
-    for ( int i=0; i< static_cast<int>(unhandled_keys_.size()); ++i) {
-      kdel_.set_instantaneous_time(true);
-      if (try_handle_redundant(unhandled_keys_[i], h)) {
-	unhandled_keys_.erase(unhandled_keys_.begin()+i);
-	--i;
-      }
-    }
-  }
-
-  void remove_redundant(typename Triangulation::Cell_handle h, Point_key k) {
-    redundant_points_.erase(k);
-    typename RCMap::iterator beg = redundant_cells_.lower_bound(h);
-    typename RCMap::iterator end = redundant_cells_.upper_bound(h);
-    for (; beg != end; ++beg) {
-      if (beg->second == k) {
-	redundant_cells_.erase(beg);
-	return;
-      }
-    }
-    
-    for (typename RCMap::iterator cur= redundant_cells_.begin();
-	 cur != redundant_cells_.end(); ++cur){
-      CGAL_ERROR_WRITE( internal::write_cell( cur->first, LOG_STREAM));
-      CGAL_ERROR(": " << cur->second);
-      if (cur->second == k) {
-	CGAL_assertion_code(Cell_handle ch= cur->first);
-	CGAL_assertion(ch==h);
-	CGAL_error();
-      }
-    }
-    CGAL_error();
-  }
-
- 
-
-  KDel kdel_;
-  RPMap redundant_points_;
-  RCMap redundant_cells_;
-  std::vector<Point_key> unhandled_keys_;
-  //typename P::Instantaneous_kernel::Orientation_3 po_;
-  // typename P::Kinetic_kernel::Weighted_orientation_3 por_;
-};
-
-template <class Traits, class Triang, class Visit>
-std::ostream &operator<<(std::ostream &out, const Regular_triangulation_3<Traits, Triang, Visit> &rt)
-{
-  rt.write(out);
-  return out;
-}
-
-
-} } //namespace CGAL::Kinetic
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort.h
deleted file mode 100644
index d5e0a34..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort.h
+++ /dev/null
@@ -1,471 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_TESTING_SORT_H
-#define CGAL_KINETIC_TESTING_SORT_H
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/listeners.h>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-#include <CGAL/Kinetic/Sort_visitor_base.h>
-#include <CGAL/Kinetic/Event_base.h>
-#include <algorithm>
-#include <iostream>
-#include <iterator>
-#include <list>
-#include <map>
-#include <set>
-
-namespace CGAL { namespace Kinetic {
-
-template <class KDS, class It, class RE>
-class Swap_event;
-
-struct Empty_data {};
-
-//! A simple KDS which maintains objects sorted by their x coordinate
-/*!  This does not use Simple_kds_base for now irrelevant
-  reasons. Ditto for the lack of protection of any of the fields. The
-  code is designed to be read, so read it if you want to figure out
-  what is going on.
-*/
-template <class Traits, class Visitor=Sort_visitor_base> class Sort:
-// for ref counted pointers
-  public Ref_counted<Sort< Traits, Visitor> >
-{
-  // for later, please ignore
-  typedef typename Traits::Active_points_1_table TTable;
-  typedef typename Traits::Kinetic_kernel::Compare_x_1 KLess;
-  typedef typename Traits::Instantaneous_kernel::Compare_x_1 IComp;
-
-  //typedef typename Traits::Instantaneous_kernel::Compare_x_1 ILess;
-
-  typedef Sort<Traits, Visitor> This;
-  // The way the Simulator represents time.
-  typedef typename Traits::Simulator::Time Time;
-  // The way the Simulator represents time.
-  typedef typename Traits::Simulator::NT NT;
-  // A label for a moving primitive in the MovingObjectTable
-  typedef typename TTable::Key Object_key;
-
-
-  // STL algorithms want less rather than compare. So we need to convert.
-  struct ILess {
-    ILess(IComp ic): ic_(ic){}
-
-    bool operator()(Object_key a, Object_key b) const {
-      bool ret=( ic_(a,b) == CGAL::SMALLER);
-      return ret;
-    }
-    IComp ic_;
-  };
-
-  // A label for a certificate so it can be descheduled.
-  typedef typename Traits::Simulator::Event_key Event_key;
-  // To shorten the names. Use the default choice for the static kernel.
-  typedef typename Traits::Instantaneous_kernel Instantaneous_kernel;
-  // The table containing the points
-  typedef TTable Active_objects_table;
-  // the comparators, one for static and one for instantaneous
-  typedef KLess Kinetic_less;
-  typedef ILess Instantaneous_less;
-  struct OD {
-    OD(Object_key k): key_(k){}
-    Object_key object() const {return key_;}
-    Event_key event() const {return event_;}
-    void set_event(Event_key k) {
-      event_= k;
-    }
-    operator Object_key() const {
-      return key_;
-    }
-    void swap(OD &o) {
-      std::swap(key_, o.key_);
-    }
-    Object_key key_;
-    Event_key event_;
-  };
-  // this is used to identify pairs of objects in the list
-  typedef typename std::list<OD>::iterator iterator;
-  // The certificate generator
-  /*struct Less {
-    typedef typename Traits::Kinetic_kernel::Is_less_x_1 Less_x;
-    Less(Less_x x): less_(x){}
-    bool operator()(const OD &a, const OD &b) const {
-      return less_(a.key(), b.key());
-    }
-    Less less_;
-    }*/
-
-  typedef Swap_event<This,iterator, typename KLess::result_type> Event;
-  friend class Swap_event<This,iterator, typename KLess::result_type>;
-  // Redirects the Simulator notifications to function calls
-  CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator,
-				 typename Active_objects_table)
-public:
-
-  // Register this KDS with the MovingObjectTable and the Simulator
-  Sort(Traits tr, Visitor v=Visitor()/*,
-       typedef Active_objects_table::Handle aot,
-       Kinetic_less kless=tr.kinetic_kernel_object().is_less_x_1_object(),
-       Instantaneous_less iless*/): compare_(tr.kinetic_kernel_object().compare_x_1_object()),
-				    ik_(tr.instantaneous_kernel_object()),
-				    iless_(ik_.compare_x_1_object()), v_(v),
-				    aot_(tr.active_points_1_table_handle()),
-				    simulator_(tr.simulator_handle()){
-    CGAL_KINETIC_INITIALIZE_LISTENERS(simulator_, aot_);
-    wrote_objects_= false;
-  }
-
-  const Visitor& visitor() const {
-    return v_;
-  }
-  Visitor& visitor() {
-    return v_;
-  }
-
-  /*Traits &traits() {
-    return tr_;
-  }
-  const Traits &traits() const {
-    return tr_;
-    }*/
-
-  typedef iterator Vertex_handle;
-
-  /* Insert k and update the affected certificates. std::upper_bound
-     returns the first place where an item can be inserted in a sorted
-     list. Called by the MOT_listener.*/
-  iterator insert(Object_key k) {
-    NT nt= simulator_->next_time_representable_as_nt();
-    simulator_->set_current_time(nt);
-    ik_.set_time(nt);
-    iterator it = std::upper_bound(sorted_.begin(), sorted_.end(),
-				   k, iless_);
-    CGAL_LOG(Log::LOTS, "\nInserting " << k);
-    if (it != sorted_.end()) {
-      CGAL_LOG(Log::LOTS, " before " << it->object() <<std::endl);
-    } else {
-      CGAL_LOG(Log::LOTS, " before end" <<std::endl);
-    }
-    /*if (it != sorted_.end()) {
-      v_.remove_edge(prior(it), it);
-      }*/
-    v_.pre_insert_vertex(k);
-    sorted_.insert(it, OD(k));
-
-
-    rebuild_certificate(prior(it));
-    //v_.create_edge(prior(it), it);
-    if (prior(it) != sorted_.begin()) {
-      rebuild_certificate(prior(prior(it)));
-      //v_.create_edge(prior(prior(it)), prior(it));
-    }
-
-    v_.post_insert_vertex(prior(it));
-    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
-    CGAL_LOG(Log::LOTS, std::endl);
-    return it;
-    //write(std::cout);
-  }
-
-  /* Rebuild the certificate for the pair of points *it and *(++it).
-     If there is a previous certificate there, deschedule it.*/
-  void rebuild_certificate(const iterator it) {
-    CGAL_LOG(Log::LOTS, "Building certifiate for " << it->object() << " and " << next(it)->object()<< std::endl);
-    CGAL_precondition(it != sorted_.end());
-    if (it->event() != Event_key()) {
-      simulator_->delete_event(it->event());
-      it->set_event(Event_key());
-    }
-    if (next(it) == sorted_.end()) return;
-    //Less less=kk_.less_x_1_object();
-    typename KLess::result_type s
-      = compare_( aot_->at(next(it)->object()), aot_->at(it->object()), simulator_->current_time(),
-		 simulator_->end_time());
-    // the Simulator will detect if the failure time is at infinity
-    if (s.will_fail()) {
-      Time t= s.failure_time();
-      s.pop_failure_time();
-      Event e(it, this,s);
-      it->set_event( simulator_->new_event(t, e));
-    } else {
-      it->set_event( simulator_->null_event());
-    }
-    //} else events_[*it]= simulator_->null_event();
-  }
-
-
-
-  /* Swap the pair of objects with *it as the first element.  The old
-     solver is used to compute the next root between the two points
-     being swapped. This method is called by an Event object.*/
-  void swap(iterator it, typename KLess::result_type &s) {
-    CGAL_LOG(Log::LOTS, "Swapping " << it->object() << " and " << next(it)->object() << std::endl);
-    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
-    v_.pre_swap(it, next(it));
-    it->set_event(Event_key());
-    iterator n= next(it);
-    if (n->event() != Event_key()) {
-      simulator_->delete_event(n->event());
-      n->set_event(Event_key());
-    }
-
-    it->swap(*n);
-
-    CGAL_LOG(Log::LOTS, "Updating next certificate " << std::endl);
-    if (n != sorted_.end()) {
-      rebuild_certificate(n);
-    }
-    CGAL_LOG(Log::LOTS, "Updating middle certificate " << std::endl);
-    if (s.will_fail()) {
-      Time t= s.failure_time(); s.pop_failure_time();
-      it->set_event(simulator_->new_event(t, Event(it, this,s)));
-    } else {
-      it->set_event(simulator_->null_event());
-    }
-
-
-    CGAL_LOG(Log::LOTS, "Updating prev certificate " << std::endl);
-    if (it != sorted_.begin()) {
-      rebuild_certificate(prior(it));
-    }
-    v_.post_swap(it, n);
-
-    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
-  }
-
-  void audit_order() const {
-    //std::cout << "Auditing order at time " << ik_.time() << std::endl;
-    for (typename std::list<OD>::const_iterator it
-	   = sorted_.begin(); it->object() != sorted_.back().object(); ++it) {
-      if (iless_(*next(it), *it)) {
-#ifdef CGAL_KINETIC_CHECK_EXACTNESS
-	std::cerr << "ERROR: objects " << it->object() << " and "
-		  << next(it)->object() << " are out of order.\n";
-	std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl;
-	std::cerr << "Time is " << ik_.time() << std::endl;
-	/*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and "
-	  << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/
-	std::cerr << "ERROR: order is ";
-#else
-	if (warned_.find(*it) == warned_.end() ||
-	    warned_[*it].find(*next(it)) == warned_[*it].end()) {
-	  std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and "
-		    << next(it)->object() << " are out of order.\n";
-	  std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl;
-	  std::cerr << "Time is " << ik_.time() << std::endl;
-	  std::cerr << "NUMERIC ISSUE: order is ";
-	}
-#endif
-	write(std::cerr);
-	std::cerr << std::endl;
-	++internal::audit_failures__;
-
-	if (!wrote_objects_) {
-	  wrote_objects_=true;
-	  std::cerr << "Objects are: ";
-	  for (typename Active_objects_table::Key_iterator kit= aot_->keys_begin();
-	       kit != aot_->keys_end(); ++kit){
-	    std::cerr <<  aot_->at(*kit) << std::endl;
-	  }
-	}
-      }
-      if (compare_.sign_at(  aot_->at(it->object()),
-                             aot_->at(next(it)->object()),
-                             simulator_->current_time()) == CGAL::LARGER) {
-#ifdef CGAL_KINETIC_CHECK_EXACTNESS
-	std::cerr << "ERROR: kinetic objects " << it->object() << " and "
-		  << next(it)->object() << " are out of order.\n";
-	std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl;
-	std::cerr << "Time is " <<ik_.time() << std::endl;
-	/*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and "
-	  << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/
-	std::cerr << "ERROR: order is ";
-#else
-	if (warned_.find(*it) == warned_.end() ||
-	    warned_[*it].find(*next(it)) == warned_[*it].end()) {
-	  std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and "
-		    << next(it)->object() << " are out of order.\n";
-	  std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl;
-	  std::cerr << "Time is " <<ik_.time() << std::endl;
-	  std::cerr << "NUMERIC ISSUE: order is ";
-	}
-#endif
-	write(std::cerr);
-	std::cerr << std::endl;
-	++internal::audit_failures__;
-
-	if (!wrote_objects_) {
-	  wrote_objects_=true;
-	  std::cerr << "Objects are: ";
-	  for (typename Active_objects_table::Key_iterator kit= aot_->keys_begin();
-	       kit != aot_->keys_end(); ++kit){
-	    std::cerr << aot_->at(*kit) << std::endl;
-	  }
-	}
-      }
-    }
-  }
-
-  /* Verify the structure by checking that the current coordinates are
-     properly sorted for time t. This function is called by the Sim_listener.*/
-  void audit() const
-  {
-
-    if (sorted_.size() <2) return;
-
-    ik_.set_time(simulator_->audit_time());
-    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
-    CGAL_LOG(Log::LOTS, std::endl);
-
-
-    //typename Instantaneous_kernel::Less_x_1 less= ik_.less_x_1_object();
-    for (typename std::list<OD>::const_iterator it
-	   = sorted_.begin(); it->object() != sorted_.back().object(); ++it) {
-      CGAL_assertion(it->event() != Event_key());
-    }
-    CGAL_assertion(sorted_.back().event()==Event_key());
-
-    audit_order();
-  }
-
-  /* Update the certificates adjacent to object k. This method is called by
-     the MOT_listener. std::equal_range finds all items equal
-     to a key in a sorted list (there can only be one).*/
-  void set(Object_key k) {
-    typename std::list<OD>::iterator it;
-    for (it = sorted_.begin(); it != sorted_.end(); ++it){
-      if (it->object()==k) break;
-    }
-    CGAL_assertion(it != sorted_.end());
-    v_.change_vertex(it);
-    rebuild_certificate(it);
-    if (it != sorted_.begin()) rebuild_certificate(--it);
-  }
-
-  /* Remove object k and destroy 2 certificates and create one new one.
-     This function is called by the MOT_listener.*/
-  void erase(Object_key k) {
-    iterator it;
-    for (it = sorted_.begin(); it != sorted_.end(); ++it){
-      if (it->object()==k) break;
-    }
-    //iterator it =  std::equal_range(sorted_.begin(), sorted_.end(),k).first;
-    CGAL_precondition(it != sorted_.end());
-    CGAL_precondition(it->object() == k);
-
-    v_.pre_remove_vertex(it);
-    if (next(it) != Iterator(end())) {
-      simulator_->delete_event(it->event());
-      it->set_event(Event_key());
-    }
-    if (it != sorted_.begin()) {
-      iterator p= prior(it);
-      sorted_.erase(it);
-      rebuild_certificate(p);
-    } else {
-      sorted_.erase(it);
-    }
-    v_.post_remove_vertex(k);
-  }
-  template <class It> static It next(It it){ return ++it;}
-  template <class It> static It prior(It it){ return --it;}
-
-  void write(std::ostream &out) const {
-    out << "Sort:\n";
-    for (typename std::list<OD>::const_iterator it
-	   = sorted_.begin(); it != sorted_.end(); ++it) {
-      out << it->object() << " with event (";
-      if (it->event() != Event_key()) {
-        out << it->event();
-      } else {
-        out << "NULL";
-      }
-      out << ")\n";
-    }
-    out << std::endl << std::endl;;
-  }
-
-  typedef typename std::list<OD>::const_iterator Iterator;
-  Iterator begin() const
-  {
-    return sorted_.begin();
-  }
-  Iterator end() const
-  {
-    return sorted_.end();
-  }
-
-  // The points in sorted order
-  std::list<OD > sorted_;
-  // events_[k] is the certificates between k and the object after it
-  //std::map<Object_key, Event_key > events_;
-  Kinetic_less compare_;
-  Instantaneous_kernel ik_;
-  Instantaneous_less iless_;
-  //#ifndef NDEBUG
-  mutable bool wrote_objects_;
-  mutable std::map<Object_key, std::set<Object_key> > warned_;
-  Visitor v_;
-  typename Active_objects_table::Handle aot_;
-  typename Traits::Simulator::Handle simulator_;
-  //#endif
-};
-
-template <class Traits, class Visitor>
-std::ostream &operator<<(std::ostream &out, const Sort<Traits, Visitor> &s) {
-  s.write(out);
-  return out;
-}
-
-/* It needs to implement the time() and process() functions and
-   operator<< */
-template <class Sort, class Id, class Solver>
-class Swap_event: public Event_base<Sort*>
-{
-public:
-  Swap_event(Id o, Sort* sorter,
-	     const Solver &s): Event_base<Sort*>(sorter),
-			       left_object_(o), s_(s){}
-  void process() {
-    Event_base<Sort*>::kds()->swap(left_object_, s_);
-  }
-  void write(std::ostream &out) const {
-    out << left_object_->object() << "X" << Sort::next(left_object_)->object();
-    if (s_.will_fail()) out <<  " next is " << s_.failure_time();
-    else out << " out of failures";
-  }
-  void audit(typename Sort::Event_key
-#ifndef NDEBUG
-	     tk
-#endif
-) const {
-    //std::cout << "Auditing event ";
-    //write(std::cout);
-    //std::cout << std::endl;
-    CGAL_assertion(left_object_->event() == tk);
-  }
-  Id left_object_; Solver s_;
-};
-
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Two_list_pointer_event_queue.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Two_list_pointer_event_queue.h
deleted file mode 100644
index 7b49224..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Two_list_pointer_event_queue.h
+++ /dev/null
@@ -1,1039 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_KINETIC_BIN_QUEUE_H
-#define CGAL_KINETIC_BIN_QUEUE_H
-#include <CGAL/Kinetic/basic.h>
-#include <iostream>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-#include <CGAL/In_place_list.h>
-#include <functional>
-#include <CGAL/assertions.h>
-#include <CGAL/use.h>
-#include <iostream>
-#include <CGAL/Kinetic/Ref_counted.h>
-#include <CGAL/Kinetic/internal/infinity_or_max.h>
-#include <algorithm>
-#include <boost/utility.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-
-//int two_list_remaining=0;
-
-//int growth__=0;
-//int shrink__=0;
-//int queue_insertions__=0;
-//int queue_front_insertions__=0;
-
-namespace CGAL { namespace Kinetic { namespace internal {
-
-
-template <class Item>
-struct Two_list_pointer_event_queue_key: public Item::Handle
-{
-  typedef Two_list_pointer_event_queue_key<Item> This;
-  typedef typename Item::Handle P;
-  Two_list_pointer_event_queue_key(){};
-  Two_list_pointer_event_queue_key(Item  *p): Item::Handle(p){}
-  std::ostream& write(std::ostream &out) {
-    if (Item::Handle::get()) {
-      out << "(" << Item::Handle::get() << ": " << *Item::Handle::get() << ")";
-    }
-    else {
-      out << "null";
-    }
-    return out;
-  }
-  /*operator bool() const
-    {
-    return Item::Handle::get() != NULL;
-    }*/
-  bool is_valid() const {
-    return  Item::Handle::get() != NULL;
-  }
-  /*bool operator!() const
-    {
-    return Item::Handle::operator!();
-    }*/
-  bool operator==(const This &o) const
-  {
-    return Item::Handle::get() == o.get();
-  }
-  bool operator!=(const This &o) const
-  {
-    return Item::Handle::get() != o.get();
-  }
-  //using P::operator<;
-  bool operator<(const This& o) const
-  {
-    return P::get() < o.get();
-  }
-
-  Item* pointer() {
-    return Item::Handle::get();
-  }
-  const Item* pointer() const
-  {
-    return Item::Handle::get();
-  }
- 
-  //using P::operator>;
-};
-
-template  <class I>
-std::ostream &operator<<(std::ostream &out, Two_list_pointer_event_queue_key<I> k)
-{
-  k.write(out);
-  return out;
-}
-
-
-
-
-// The interface for an item stored in the ::Pointer_event_queue
-template <class Priority>
-class Two_list_event_queue_item:
-  public CGAL::In_place_list_base<Two_list_event_queue_item<Priority> >,
-  public Ref_counted<Two_list_event_queue_item<Priority> >
-{
-
-  typedef Two_list_event_queue_item<Priority> This;
-
-  Two_list_event_queue_item(const Two_list_event_queue_item &) {}
-  void operator=(const Two_list_event_queue_item &) {}
-public:
-  typedef Two_list_pointer_event_queue_key<This> Key;
-  Two_list_event_queue_item() { /*++two_list_remaining;*/}
-  Two_list_event_queue_item(const Priority &t): time_(t){/*++two_list_remaining;*/}
-  virtual ~Two_list_event_queue_item(){/*--two_list_remaining;*/
-  }
-
-  enum List {FRONT, BACK, INF};
-
-  const Priority& time() const {return time_;};
-
-  List in_list() const
-  {
-    return front_list_;
-  }
-  void set_in_list(List lt) {
-    front_list_=lt;
-  }
-
-  
-
-  bool operator<(const This &o) const {
-    CGAL::Comparison_result c= CGAL::compare(time(), o.time());
-    if (c != CGAL::EQUAL) return c== CGAL::SMALLER;
-    else {
-      if (kds() < o.kds()) return true;
-      else if (kds() > o.kds()) return false;
-      else {
-	CGAL::Comparison_result c= compare_concurrent(Key((This*) this),Key((This*) &o));
-	return c==CGAL::SMALLER;
-      }
-    }
-  }
-
-  virtual std::ostream& write(std::ostream &out) const{
-    out << "Dummy event." << std::endl;
-    return out;
-  }
-  virtual void process() {
-    CGAL_error();
-    CGAL_ERROR("Writing dummy queue element.");
-  }
-  virtual CGAL::Comparison_result compare_concurrent(Key , Key ) const {
-    CGAL_error();
-    return CGAL::EQUAL;
-  };
-  virtual bool merge_concurrent(Key , Key ) {
-    CGAL_error();
-    return false;
-  }
-  virtual void *kds() const{return NULL;}
-  virtual void audit(Key) const{};
-private:
-  Priority time_;
-  List front_list_;
-};
-
-template <class Priority>
-inline std::ostream& operator<<(std::ostream &out, const Two_list_event_queue_item<Priority> &i)
-{
-  i.write(out);
-  return out;
-}
-
-
-// The how a dummy item is stored in the ::Two_list_event_queue
-/*
-  One dummy item is used to represent events which will never happen.
-*/
-/*template <class Priority>
-class Two_list_event_queue_dummy_item: public Two_list_event_queue_item<Priority>
-{
-  typedef Two_list_event_queue_item<Priority> P;
-public:
-  Two_list_event_queue_dummy_item(){}
-  Two_list_event_queue_dummy_item(const Two_list_event_queue_dummy_item &):
-    Two_list_event_queue_item<Priority>(){}
-  virtual void process() {
-    std::cerr << "Trying to process a NULL event.\n";
-    CGAL_error();
-  }
-  virtual CGAL::Comparison_result compare_concurrent(typename P::Key , typename P::Key ) const{return CGAL::EQUAL;}
-  virtual bool merge_concurrent(typename P::Key, typename P::Key){
-    return false;
-  }
-  virtual std::ostream& write(std::ostream &out) const
-  {
-    out << "Never";
-    return out;
-  }
-  virtual ~Two_list_event_queue_dummy_item(){}
-  };*/
-
-// The how a real item is stored in the ::Two_list_event_queue
-/*
-  This just stores an object of type Event and passes the virtual calls on to it.
-
-  The object is reference counted so you don't have to worry about the
-  queue deleting it or not.
-*/
-template <class Priority, class Event>
-class Two_list_event_queue_item_rep: public internal::Two_list_event_queue_item<Priority>
-{
-  typedef  Two_list_event_queue_item<Priority> P;
-public:
-  Two_list_event_queue_item_rep(): internal::Two_list_event_queue_item<Priority>(){}
-  Two_list_event_queue_item_rep(const Priority &t, const Event &e): 
-    Two_list_event_queue_item<Priority>(t),
-    event_(e){}
-
-  virtual std::ostream& write(std::ostream &out) const
-  {
-    event_.write(out);
-    out << " at " << P::time();
-    return out;
-  }
-  virtual void process() {
-    event_.process();
-  }
-  virtual void audit(typename P::Key k) const {
-    event_.audit(k);
-  }
-  virtual CGAL::Comparison_result compare_concurrent(typename P::Key a, typename P::Key b) const{
-    return event_.compare_concurrent(a,b);
-  }
-  virtual bool merge_concurrent(typename P::Key a, typename P::Key b){
-    return event_.merge_concurrent(a,b);;
-  }
-  virtual void *kds() const{return event_.kds();}
-
-  // Access the actual event
-  const Event &event() const
-  {
-    return event_;
-  }
-
- // Access the actual event
-  Event &event()
-  {
-    return event_;
-  }
-  
-  virtual ~Two_list_event_queue_item_rep(){}
-
-protected:
-  Event event_;
-};
-
-
-/* This is needed since the list cannot allocate an element of the abstract base class. I could just make it non-abstract. Why not?*/
-/*template <class T>
-struct Two_list_event_queue_item_allocator
-{
-  typedef Two_list_event_queue_dummy_item<T> dummy_value_type;
-
-  typedef Two_list_event_queue_item<T>* pointer;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef const pointer const_pointer;
-  typedef Two_list_event_queue_item<T>& reference;
-  typedef const Two_list_event_queue_item<T>& const_reference;
-  typedef dummy_value_type value_type;
-
-  Two_list_event_queue_item_allocator(){}
-  pointer allocate(size_t sz, void* =0) const
-  {
-    return static_cast<pointer>(::operator new(sz*sizeof(dummy_value_type)));
-  }
-  void deallocate(pointer p, size_type ) {
-    ::operator delete(static_cast<void*>(p));
-  }
-  size_type max_size() const throw() {
-    return (std::numeric_limits<size_type>::max)()/sizeof(dummy_value_type);
-  }
-  template <class TT>
-  void construct(pointer p, const TT &) {
-    new(static_cast<void*>(p)) dummy_value_type();
-  }
-  void destroy(pointer p) {
-    p->~Two_list_event_queue_item<T>();
-  }
-  };*/
-
-} } } //namespace CGAL::Kinetic::internal
-
-namespace CGAL { namespace Kinetic {
-
-
-
-
-//! The priority queue for holding many different types of events.
-/*!  This queue allows the priorities to be updated and for elements
-  to be removed. The events are stored behind an interface and
-  accessed through virtual functions allowing many different types of
-  events to be stored in the queue at once, as long as they all share
-  the same Priority.
-
-  Currently the items in the queue are refence counted. This imposes
-  some overhead, but makes accessing them much simpler since you don't
-  have to worry about them being processed (and deleted or not). I am
-  not sure which is better.
-*/
-template <class FK, bool INF=false, unsigned int TARGET=8>
-class Two_list_pointer_event_queue
-{
-  typedef typename FK::Root PriorityT;
-  typedef typename FK::FT NT;
-  typedef Two_list_pointer_event_queue<FK, INF, TARGET> This;
-  typedef typename internal::Two_list_event_queue_item<PriorityT> Item;
-
-  typedef typename CGAL::In_place_list<Item, false/*,
-						    internal::Two_list_event_queue_item_allocator<PriorityT>*/ > Queue;
-  typedef typename Queue::iterator Iterator;
-
-
-
-
-public:
-  typedef PriorityT Priority;
-
-  typedef internal::Two_list_pointer_event_queue_key<Item> Key;
-
-
-
-
-  //! Construct it with a suggested size of sz.
-  Two_list_pointer_event_queue(Priority start_time,
-			       Priority end_time, 
-			       FK, int =0):
-    null_event_(new internal::Two_list_event_queue_item<Priority>()){
-    CGAL_precondition(!INF);
-    initialize(start_time, end_time);
-  }
-
- //! Construct it with a suggested size of sz.
-  Two_list_pointer_event_queue(Priority start_time,
-			       FK, int =0): 
-    null_event_(new internal::Two_list_event_queue_item<Priority>()){
-    CGAL_precondition(INF);
-    initialize(start_time);
-  }
-
-  ~Two_list_pointer_event_queue() {
-    // release pointers
-    std::vector<Key> all;
-    all.reserve(front_.size()+back_.size());
-    for (typename Queue::iterator it = front_.begin(); 
-	 it != front_.end(); ++it) {
-      all.push_back(Key(&*it));
-    }
-    for (typename Queue::iterator it = back_.begin(); 
-	 it != back_.end(); ++it) {
-      all.push_back(Key(&*it));
-    }
-    front_.clear();
-    back_.clear();
-    for (unsigned int i=0; i< all.size(); ++i) {
-      unmake_event(all[i].get());
-    }
-  }
-
-  
-  /*template <class E>
-  Key insert_at_end(const E & e) {
-
-  }*/
-  
-
-  bool is_after_end(const Priority &t) const {
-    if (INF) return false; 
-    else return  CGAL::compare(t,end_priority()) == CGAL::LARGER;
-  }
-
-  //! insert value_type into the queue and return a reference to it
-  /*!
-    The reference can be used to update or erase it.
-  */
-  template <class E>
-  Key insert(const Priority &t, const E & e) {
-    CGAL_expensive_precondition(audit());
- 
-
-    Item *ni = make_event(t, e);
-
-    //CGAL_exactness_assertion(t >= lbs_);
-    //lb_=(std::min)(t, lb_);
-    if ( is_after_end(ni->time())){
-      return end_key();
-    } 
-
-
-    if (leq_ub(ni->time())) {
-      ni->set_in_list(Item::FRONT);
-      typename Queue::iterator iit=std::upper_bound(front_.begin(), front_.end(), *ni);
-   
-      front_.insert(iit, *ni);
-      CGAL_expensive_assertion(audit());
-      if (front_.size() > 2*max_front_size()) {
-	shrink_front();
-      }
-      //++queue_front_insertions__;
-    }  else if (front_.empty()) {
-      CGAL_assertion(back_.empty());
-      CGAL_assertion(INF || CGAL::compare(t, end_priority()) != CGAL::LARGER);
-      //CGAL_assertion(INF || CGAL::compare(end_priority(), std::numeric_limits<Priority>::infinity()) == CGAL::SMALLER);
-      if (true){
-	//++queue_front_insertions__;
-	front_.push_back(*ni);
-	ub_= CGAL::to_interval(t).second;
-	ni->set_in_list(Item::FRONT);
-      } 
-    } else {
-      ni->set_in_list(Item::BACK);
-      back_.push_back(*ni);
-    }
-    CGAL_expensive_postcondition(audit());
-    CGAL_expensive_postcondition(contains(Key(ni)));
-    //std::cout << "Made event " << ni << std::endl;
-    return Key(ni);
-  }
-
-
-  //! remove the event referenced by item from the queue
-  /*!
-    \todo Add check that item is actually in the list
-  */
-  void erase(const Key &item) {
-    //std::cout << "Erase event " << item.pointer() << std::endl;
-    if (item== end_key()) return;
-#ifndef NDEBUG
-    if (!contains(item)) {
-      std::cerr << "Erasing event not in queue ";
-      item->write(std::cerr);
-      std::cerr << std::endl;
-    }
-#endif
-    CGAL_expensive_precondition(contains(item));
-    CGAL_expensive_precondition(audit());
-    Item *i=item.get();
-    if (item->in_list() == Item::FRONT) {
-      front_.erase(i);
-      if (front_.empty() && !back_.empty()) grow_front();
-    }
-    else if (item->in_list() == Item::BACK) {
-      back_.erase(i);
-    }
-    if (item->in_list() == Item::FRONT || item->in_list() == Item::BACK) {
-      unmake_event(i);
-    }
-
-    CGAL_expensive_postcondition(audit());
-  }
-
-  template <class E>
-  const E& get(const Key &item) const
-  {
-    return reinterpret_cast<internal::Two_list_event_queue_item_rep<Priority, E>*>( item.get())->event();
-  }
-
-  template <class E>
-  E& get(const Key &item)  {
-    return reinterpret_cast<internal::Two_list_event_queue_item_rep<Priority, E>*>( item.get())->event();
-  }
-
-  //! Replace the event referenced by item with a new event referenced by ne
-  /*!  They must have exactly the same times associated with
-    them. This is checked when expensive checks are turned on.
-  */
-  template <class NE>
-  Key set(const Key &item, const NE &ne) {
-    CGAL_expensive_precondition(contains(item));
-    CGAL_precondition(item != end_key());
-    Item *oi= item.get();
-    typename Item::List front= item->in_list();
-    Item *ni= make_event(item->time(), ne);
-    ni->set_in_list(front);
-    if (front != Item::INF) {
-      if (front== Item::FRONT) {
-	front_.insert(oi, *ni);
-	front_.erase(oi);
-      }
-      else {
-	back_.insert(oi, *ni);
-	back_.erase(oi);
-      }
-      unmake_event(oi);
-      return Key(ni);
-    }
-    else {
-#ifndef NDEBUG
-      bool found=false;
-      for (unsigned int i=0; i< inf_.size(); ++i) {
-	if (inf_[i].get() == oi) {
-	  inf_[i]=ni;
-	  found=true;
-	  break;
-	}
-      }
-      CGAL_postcondition(found);
-      CGAL_USE(found);
-#endif
-      unmake_event(oi);
-      return Key(ni);
-    }
-    // unreachable
-
-  }
-
-  //! Get the time of the next event to be processed.
-  /*!  It is OK to call this if the queue is empty. In that case it
-    will just return infinity.
-  */
-  const Priority& front_priority() const
-  {
-    CGAL_precondition(!front_.empty());
-    return front_.front().time();
-  }
-
-
-  Key front() const
-  {
-    CGAL_precondition(!front_.empty());
-    return Key(const_cast<Item*>(&front_.front()));
-  }
-
-  //! Access the time of a particular event
-  const Priority& priority(const Key &item) const
-  {
-    return item->time();
-  }
-
-  //! empty
-  bool empty() const
-  {
-    CGAL_precondition(!front_.empty() || back_.empty());
-    return front_.empty() 
-      || CGAL::compare(front_.front().time(), end_priority()) == CGAL::LARGER;
-  }
-
-  //! Remove the next event from the queue and process it.
-  /*!
-    Processing means that the process() method of the event object is called.
-  */
-  void process_front() {
-    CGAL_precondition(!empty());
-    CGAL_expensive_precondition(audit());
-    if (!front_.empty()) {
-      Item *i= &front_.front();
-      CGAL_LOG(Log::SOME, "Processing event " << *i << std::endl);
-      front_.pop_front();
-      CGAL_expensive_postcondition(audit());
-      if (front_.empty() && !back_.empty()) grow_front();
-      i->process();
-
-      /*if (!front_.empty() && i->time() == front_.front().time()) {
-	CGAL_LOG(Log::SOME, "Degeneracy at time "
-	<< i->time() << " the events are: "
-	<< *i << " and " << front_.front() << std::endl);
-	}*/
-
-      unmake_event(i);
-    }
-    else {
-      CGAL_assertion(back_.empty());
-    }
-  }
-
-  //! debugging
-  bool print() const
-  {
-    write(std::cout);
-    return true;
-  }
-
-  void write(const Queue &q, std::ostream& out) const {
-    for (typename Queue::const_iterator it = q.begin(); it != q.end(); ++it) {
-      out << "(" << &*it << ": " << *it << ")";
-      out << std::endl;
-    }
-  }
-
-  bool write(std::ostream &out) const
-  {
-    write(front_, std::cout);
-    out << "--" << ub_ << "--" << std::endl;
-    write(back_, std::cout);
-    out << std::endl;
-    return true;
-  }
-
-  Key end_key() const
-  {
-    return null_event_;
-  }
-
-  
-
-  const Priority& end_priority() const
-  {
-    return end_time_;
-  }
-
-
-  void set_interval(const Priority &start_time, const Priority &end_time) {
-    CGAL_precondition(!INF);
-    initialize(start_time, end_time);
-  }
-  
-  void audit_events() const {
-    for (typename Queue::const_iterator it= front_.begin(); it != front_.end(); ++it) {
-      it->audit(Key(const_cast<Item*>(&*it)));
-    }
-    for (typename Queue::const_iterator it= back_.begin(); it != back_.end(); ++it) {
-      it->audit(Key(const_cast<Item*>(&*it)));
-    }
-  }
-
-  void audit_event(Key k) const {
-    k->audit(k);
-  }
-
-  void clear() {
-    front_.clear();
-    back_.clear();
-    //all_in_front_=false;
-  }
-
-protected:
-  void initialize(const Priority &start_time, const Priority &end_time) {
-    ub_=CGAL::to_interval(start_time).second;
-    // should be nextafter
-    step_=1;
-    //all_in_front_= false;
-    end_time_=end_time;
-  }
-
- void initialize(const Priority &start_time) {
-   CGAL_precondition(INF);
-   ub_=CGAL::to_interval(start_time).second;
-    // should be nextafter
-   step_=1;
-    //all_in_front_= false;
-  }
-  bool leq_ub(const Priority &t) const {
-    //if (all_in_front_) return true;
-    //else 
-    // pretty much anything fast will have a fast to_interval, so use it
-    std::pair<double,double> iv= CGAL::to_interval(t);
-    if (iv.first > ub_) {
-      return false;
-    } else if (iv.second <= ub_) {
-      return true;
-    } else {
-      return CGAL::compare(t, Priority(ub_)) != CGAL::LARGER;
-    }
-  }
-
- 
-  template <class E>
-  Item *make_event(const Priority &t, E &e) {
-    typedef typename boost::remove_const<E>::type NCE;
-    Item *ni
-      = new internal::Two_list_event_queue_item_rep<Priority, NCE>(t, e);
-    intrusive_ptr_add_ref(ni);
-    return ni;
-  }
-
-  void unmake_event(Item *i) {
-    intrusive_ptr_release(i);
-  }
-
-  bool audit() {
-    for (typename Queue::const_iterator it = front_.begin(); it != front_.end(); ++it) {
-      Priority t= it->time();
-      CGAL_assertion(leq_ub(t));
-      CGAL_assertion(it->in_list()== Item::FRONT);
-      //CGAL_exactness_assertion(t >= lb_);
-    }
-    for (typename Queue::const_iterator it = back_.begin(); it != back_.end(); ++it) {
-      Priority t= it->time();
-      CGAL_assertion(!leq_ub(t));
-      CGAL_assertion(it->in_list()== Item::BACK);
-    }
-#ifndef NDEBUG
-    for (unsigned int i=0; i< inf_.size(); ++i) {
-      Priority t= inf_[i]->time();
-      CGAL_assertion(INF || CGAL::compare(t, end_priority())== CGAL::LARGER);
-      CGAL_assertion(inf_[i]->in_list() == Item::INF);
-    }
-#endif
-    {
-      typename Queue::const_iterator it = front_.begin();
-      ++it;
-      for (; it != front_.end(); ++it) {
-	Priority tc= it->time();
-	Priority tp= boost::prior(it)->time();
-#ifndef NDEBUG
-	if (CGAL::compare(tc, tp) == CGAL::SMALLER) {
-	  std::cout << "ERROR: Out of order " << tc << std::endl << tp << std::endl << std::endl;
-	  ++internal::audit_failures__;
-	}
-#endif
-	//CGAL_assertion(tc >= tp);
-      }
-    }
-    return true;
-  }
-public:
-  bool contains(const Key k) const
-  {
-    //if (k.pointer()->time() == std::numeric_limits<Priority>::infinity()) return true;
-    for (typename Queue::const_iterator it = front_.begin(); it != front_.end(); ++it) {
-      if (&*it == k.pointer()) return true;
-    }
-    for (typename Queue::const_iterator it = back_.begin(); it != back_.end(); ++it) {
-      if (&*it == k.pointer()) return true;
-    }
-#ifndef NDEBUG
-    for (unsigned int i=0; i< inf_.size(); ++i) {
-      const Key j=inf_[i];
-      const Key ki= k;
-      if (j==ki) return true;
-    }
-#else
-    if (k.pointer()->in_list() == Item::INF) return true;
-#endif
-    return false;
-  }
-protected:
-  unsigned int select(Queue &source, Queue &target/*, bool binf*/) {
-    CGAL_assertion_code(unsigned int sz= source.size() + target.size();)
-    int count=0;
-    Iterator it= source.begin();
-    while (it != source.end()) {
-      // CGAL_assertion(it->time() >= a);
-    
-      if (leq_ub(it->time())) {
-	Item *i= &*it;
-	Iterator t= boost::next(it);
-	source.erase(it);
-	it=t;
-	target.push_back(*i);
-	++count;
-      }
-      else {
-	++it;
-      }
-    }
-    CGAL_assertion(sz==source.size() + target.size());
-    return count;
-  }
-
-  /*NT step() const{
-    return (std::max)(ub_-lb_, NT(1));
-    }*/
-
-  NT av(NT a, NT b) const
-  {
-    return .5*(a+b);
-  }
-
-  template <class It>
-  void set_front(It b, It e, typename Item::List val) {
-    for (; b!= e; ++b) {
-      b->set_in_list(val);
-    }
-  }
-  template <class C, class It>
-  void make_inf(C &c, It b, It e) {
-    for (It cit = b; cit != e; ++cit) {
-      CGAL_assertion(INF || CGAL::compare(cit->time(), end_priority()) == CGAL::LARGER);
-      //std::cout << "Dropping inf event " << &*cit << std::endl;
-#ifndef NDEBUG
-      inf_.push_back(&*cit);
-#endif
-      cit->set_in_list(Item::INF);
-      It p= boost::prior(cit);
-      c.erase(cit);
-      unmake_event(&*cit);
-      cit=p;
-    }
-    //c.erase(b, e);
-  }
-
-  void grow_front(Queue &cand, int recursive_count=0) {
-    const bool dprint=false;
-    CGAL_assertion(front_.empty());
-    CGAL_assertion(!cand.empty());
-    //CGAL_assertion(!all_in_front_);
-    CGAL_assertion(step_ != 0);
-    if (dprint) std::cout << "Growing front from " << ub_ << " with step " 
-			  << step_ << "(" << recursive_count << ") ";
-
-    //CGAL_assertion(ub_<end_split());
-    if (cand.size() + front_.size() < max_front_size()) {
-      if (dprint) std::cout << "Setting ub to end of " << end_time_ << std::endl;
-      front_.splice(front_.end(), cand);
-      return;
-    }
-
-    //CGAL_assertion(!too_big(ub_));
-
-    /*if ( CGAL::compare(end_priority(), Priority(ub_)) == CGAL::SMALLER) {
-      all_in_front_=true;
-      //ub_=end_split();
-      }*/
-
-    CGAL_assertion_code(unsigned int num=)
-      select(cand, front_/*, all_in_front_*/);
-    CGAL_assertion(front_.size() >= num);
-    /*if (all_in_front_) {
-      make_inf(cand, cand.begin(), cand.end());
-      } else*/
-    if (front_.empty()) {
-      if (recursive_count > 10) {
-	// do something
-	std::cerr << "Too many recursions " << std::endl;
-	//all_in_front_=true;
-	ub_=CGAL::to_interval(end_time_).second; //CGAL::to_interval(end_time_).second*2;// std::numeric_limits<double>::infinity();
-	/*unsigned int num=*/ select(cand, front_/*, all_in_front_*/);
-	select(back_, front_);
-	make_inf(cand, cand.begin(), cand.end());
-	make_inf(back_, back_.begin(), back_.end());
-	//grow_front(cand, recursive_count+1);
-      } else {
-	if (dprint) {
-	  std::cout << "undershot." << std::endl;
-	  write(front_, std::cout);
-	  std::cout << "-- " << ub_ << "--\n";
-	  write(cand, std::cout);
-	  std::cout << "--\n";
-	  write(back_, std::cout);
-	}
-	ub_+= step_;
-       	step_*=2.0;
-	CGAL_assertion(step_!=0);
-	cand.splice(cand.end(), back_);
-	grow_front(cand, recursive_count+1);
-      }
-    } else {
-      //      unsigned int ncand= cand.size();
-      back_.splice(back_.begin(), cand);
-      if (front_.size() >  max_front_size()) {
-	if (recursive_count > 10) {
-	  //std::cerr << "Gave up on isolating front. Let with size " << front_.size() << " ub=" << ub_ << "step=" << step_ <<  "\n";
-	  return;
-	} else {
-	  // keep the bit length shortish
-	  double frac= .75+.25*max_front_size()/static_cast<double>(front_.size()+1);
-	  double ostep= step_;
-	  CGAL_assertion(frac < 1.1);
-	  CGAL_assertion(frac >= 0.0);
-	  //double rfrac= std::ceil(frac*256.0)/256.0;
-	  step_*=frac;
-	  //else nstep = step_*.6;
-	  //CGAL_assertion(nstep >0);
-	  cand.swap(front_);
-	  //ub_=lb_;
-	  if (step_ == 0) {
-	    CGAL_ERROR( "underflow in queue ");
-	    CGAL_ERROR_WRITE(write(LOG_STREAM));
-	    CGAL_assertion(cand.empty());
-	    step_=.0000001;
-	    return;
-	  } else {
-	    //CGAL_assertion(!all_in_front_);
-	    
-	    if (dprint) {
-	      std::cout << "...overshot" << std::endl;
-	      write(front_, std::cout);
-	      std::cout << "-- " << ub_ << "(" <<step_ << ")" << "--\n";
-	      write(cand, std::cout);
-	      std::cout << "--\n";
-	      write(back_, std::cout);
-	    }
-	    ub_=ub_-ostep+step_;  
-	    grow_front(cand, recursive_count+1);
-	  }
-	}
-      }
-      else {
-	if (dprint) std::cout << std::endl;
-      }
-    }
-    CGAL_postcondition(cand.empty());
-  }
-
-  void grow_front() {
-    //++growth__;
-    //std::cout << "Growing front from " << ub_ << std::endl;
-    //CGAL_assertion(is_valid());
-    CGAL_precondition(!back_.empty());
-    CGAL_precondition(front_.empty());
-    CGAL_assertion_code(unsigned int sz= front_.size()+back_.size()+ inf_.size());
-    Queue cand;
-    cand.splice(cand.begin(), back_);
-    ub_ += step_;
-    grow_front(cand);
-    set_front(front_.begin(), front_.end(), Item::FRONT);
-    front_.sort();
-    ub_= CGAL::to_interval(front_.back().time()).second;
-    // hmmmm, now I should make a second pass to merge. Ick.
-
-    CGAL_assertion(sz==front_.size()+back_.size() + inf_.size());
-    CGAL_assertion(audit());
-    //std::cout << "to " << ub_ << std::endl;
-  }
-
-  void shrink_front() {
-    //++shrink__;
-    //std::cout << "Shrinking front from " << ub_ << std::endl;
-    typename Queue::iterator it=front_.begin();
-    unsigned int mf= max_front_size();
-    for (unsigned int i=0; i < mf; ++i) {
-      ++it;
-    }
-
-    // use tii_ so that it does not subdivide
-
-    double split =  CGAL::to_interval(it->time()).second;
-    if (!INF && (CGAL::compare(end_priority(), it->time())==CGAL::SMALLER
-		 || CGAL::compare(end_priority(), Priority(split))==CGAL::SMALLER)) {
-      std::cout << "Past end in Queue " << end_priority() << ", "
-		<< it->time() << ", " << Priority(split) << std::endl;
-      //all_in_front_=true;
-      ub_= CGAL::to_interval(end_time_).second;
-      set_front(back_.begin(), back_.end(), Item::FRONT);
-      front_.splice(front_.end(), back_);
-
-      while (it != front_.end()) {
-	if (CGAL::compare(it->time(), end_priority())==CGAL::LARGER) break;
-      }
-      set_front(it, front_.end(), Item::INF);
-      std::vector<Item*> temp;
-      for (typename Queue::iterator c= it; c != front_.end(); ++c) {
-	temp.push_back(&*c);
-#ifndef NDEBUG
-	inf_.push_back(&*c);
-#endif
-	//std::cout << "Dropping inf event " << &*c << std::endl;
-      }
-      front_.erase(it, front_.end());
-
-   
-    
-      for (unsigned int i=0; i< temp.size(); ++i) {
-	unmake_event(temp[i]);
-      }
-    } else {
-      while (CGAL::compare(it->time(), Priority(split)) != CGAL::LARGER
-	     && it != front_.end()) ++it;
-      
-      if (it != front_.end()) {
-	
-	set_front(it, front_.end(), Item::BACK);
-	back_.splice(back_.begin(), front_, it, front_.end());
-	double oub=ub_;
-	//all_in_front_=false;
-	ub_ = split;
-	//CGAL_assertion(!too_big(ub_));
-	//CGAL_assertion(ub_ <= end_split());
-	step_= std::abs(ub_-oub);
-	if (step_<=0) {
-	  /*if (dprint) std::cout << "fixing step since " << oub 
-	    << " equals new bound" << std::endl;*/
-	  CGAL_ERROR("Roundoff error in split " << split << " " << ub_ << " "
-			     <<  oub);
-	  step_=.00001;
-	}
-	//CGAL_assertion(!all_in_front_);
-	/*CGAL_postcondition_code(if (step_<0) std::cerr << step_ << std::endl;);
-	CGAL_postcondition_code(if (step_<0) std::cerr << ub_ << std::endl;);
-	CGAL_postcondition_code(if (step_<0) std::cerr << oub << std::endl;);
-	CGAL_postcondition_code(if (step_<0) std::cerr << front_.back().time() << std::endl;);
-	CGAL_postcondition_code(if (step_==0) for (typename Queue::const_iterator it=front_.begin(); it != front_.end(); ++it) std::cout << *it << std::endl);
-	CGAL_postcondition(step_>=0);*/
-      }
-    }
-  }
-
-  /*NT end_split() const
-    {
-    return end_split_;
-    }*/
-
-  /*const Priority& end_time() const
-    {
-    return end_time_;
-    }*/
-
-  unsigned int max_front_size() const
-  {
-    return TARGET;
-    //return (std::max)(4U, static_cast<unsigned int>(std::sqrt(static_cast<double>(front_.size()+back_.size()))));
-  }
-
-  //typename FK::To_isolating_interval tii_;
-  Queue front_, back_;
-#ifndef NDEBUG
-  std::vector<Key> inf_;
-#endif
-  double ub_;
-  double step_;
-  //bool all_in_front_;
-  Priority end_time_;
-  Key null_event_;
-  //NT end_split_;
-};
-
-template <class D, unsigned int T, bool INF>
-std::ostream &operator<<(std::ostream &out, const Two_list_pointer_event_queue<D, INF, T> &q)
-{
-  q.write(out);
-  return out;
-}
-
-
-} } //namespace CGAL::Kinetic
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/debug_counters.h b/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/debug_counters.h
deleted file mode 100644
index d03f1e0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/debug_counters.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/Kinetic/basic.h>
-
-namespace CGAL { namespace Kinetic {
-namespace internal {
-  CGAL_EXPORT extern unsigned int zero_certificates__;
-  CGAL_EXPORT extern unsigned int function_degeneracies__;
-  CGAL_EXPORT extern unsigned int io_errors__;
-  CGAL_EXPORT extern unsigned int audit_failures__;
-
-  CGAL_EXPORT void write_debug_counters(std::ostream &out);
-}
-} } //namespace CGAL::Kinetic
diff --git a/3rdparty/CGAL-4.6/include/CGAL/LSCM_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/LSCM_parameterizer_3.h
deleted file mode 100644
index ef820d9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/LSCM_parameterizer_3.h
+++ /dev/null
@@ -1,670 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_LSCM_PARAMETERIZER_3_H
-#define CGAL_LSCM_PARAMETERIZER_3_H
-
-#include <CGAL/circulator.h>
-#include <CGAL/Timer.h>
-#include <CGAL/OpenNL/linear_solver.h>
-
-#include <CGAL/Parameterizer_traits_3.h>
-#include <CGAL/Two_vertices_parameterizer_3.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-#include <CGAL/Parameterization_mesh_feature_extractor.h>
-#include <iostream>
-
-/// \file LSCM_parameterizer_3.h
-
-namespace CGAL {
-
-
-// ------------------------------------------------------------------------------------
-// Declaration
-// ------------------------------------------------------------------------------------
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class LSCM_parameterizer_3 implements the
-/// *Least Squares Conformal Maps (LSCM)* parameterization  \cgalCite{cgal:lprm-lscm-02}.
-///
-/// This is a conformal parameterization, i.e. it attempts to preserve angles.
-///
-/// This is a free border parameterization. No need to map the surface's border
-/// onto a convex polygon (only two pinned vertices are needed to ensure a
-/// unique solution), but one-to-one mapping is *not* guaranteed.
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-///
-/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-
-template
-<
-    class ParameterizationMesh_3,     ///< 3D surface mesh.
-    class BorderParameterizer_3
-                = Two_vertices_parameterizer_3<ParameterizationMesh_3>,
-                                      ///< Strategy to parameterize the surface border.
-                                      ///< The minimum is to parameterize two vertices.
-    class SparseLinearAlgebraTraits_d
-                = OpenNL::SymmetricLinearSolverTraits<typename ParameterizationMesh_3::NT>
-                                      ///< Traits class to solve a sparse linear system.
-                                      ///< We may use a symmetric definite positive solver because LSCM
-                                      ///< solves the system in the least squares sense.
->
-class LSCM_parameterizer_3
-    : public Parameterizer_traits_3<ParameterizationMesh_3>
-{
-// Private types
-private:
-    // Superclass
-    typedef Parameterizer_traits_3<ParameterizationMesh_3>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    /// @endcond
-
-    /// Export BorderParameterizer_3 template parameter.
-    typedef BorderParameterizer_3           Border_param;
-    /// Export SparseLinearAlgebraTraits_d template parameter.
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-    typedef typename OpenNL::LinearSolver<Sparse_LA>
-                                            LeastSquaresSolver ;
-
-// Public operations
-public:
-    /// Constructor
-    LSCM_parameterizer_3(Border_param border_param = Border_param(),
-                            ///< Object that maps the surface's border to 2D space
-                       Sparse_LA sparse_la = Sparse_LA())
-                            ///< Traits object to access a sparse linear system
-        : m_borderParameterizer(border_param), m_linearAlgebra(sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-    /// Compute a one-to-one mapping from a triangular 3D surface mesh
-    /// to a piece of the 2D space.
-    /// The mapping is linear by pieces (linear in each triangle).
-    /// The result is the (u,v) pair image of each vertex of the 3D surface.
-    ///
-    /// \pre `mesh` must be a surface with one connected component.
-    /// \pre `mesh` must be a triangular mesh.
-    virtual Error_code  parameterize(Adaptor& mesh);
-
-// Private operations
-private:
-    /// Check parameterize() preconditions:
-    /// - `mesh` must be a surface with one connected component.
-    /// - `mesh` must be a triangular mesh.
-    virtual Error_code  check_parameterize_preconditions(Adaptor& mesh);
-
-    /// Initialize "A*X = B" linear system after
-    /// (at least two) border vertices are parameterized.
-    ///
-    /// \pre Vertices must be indexed.
-    /// \pre X and B must be allocated and empty.
-    /// \pre At least 2 border vertices must be parameterized.
-    void initialize_system_from_mesh_border(LeastSquaresSolver& solver,
-                                            const Adaptor& mesh) ;
-
-    /// Utility for setup_triangle_relations():
-    /// Computes the coordinates of the vertices of a triangle
-    /// in a local 2D orthonormal basis of the triangle's plane.
-    void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2,  // in
-                          Point_2& z0, Point_2& z1, Point_2& z2);                   // out
-
-    /// Create two lines in the linear system per triangle (one for u, one for v).
-    ///
-    /// \pre vertices must be indexed.
-    Error_code setup_triangle_relations(LeastSquaresSolver& solver,
-                                        const Adaptor& mesh,
-                                        Facet_const_handle facet) ;
-
-    /// Copy X coordinates into the (u,v) pair of each vertex
-    void set_mesh_uv_from_system(Adaptor& mesh,
-                                 const LeastSquaresSolver& solver) ;
-
-    /// Check parameterize() postconditions:
-    /// - 3D -> 2D mapping is one-to-one.
-    virtual Error_code check_parameterize_postconditions(const Adaptor& mesh,
-                                                         const LeastSquaresSolver& solver);
-
-    /// Check if 3D -> 2D mapping is one-to-one
-    bool  is_one_to_one_mapping(const Adaptor& mesh,
-                                 const LeastSquaresSolver& solver);
-
-// Private accessors
-private:
-    /// Get the object that maps the surface's border onto a 2D space.
-    Border_param&   get_border_parameterizer()    { return m_borderParameterizer; }
-
-    /// Get the sparse linear algebra (traits object to access the linear system).
-    Sparse_LA&      get_linear_algebra_traits() { return m_linearAlgebra; }
-
-// Fields
-private:
-    /// Object that maps (at least two) border vertices onto a 2D space
-    Border_param    m_borderParameterizer;
-
-    /// Traits object to solve a sparse linear system
-    Sparse_LA       m_linearAlgebra;
-};
-
-
-// ------------------------------------------------------------------------------------
-// Implementation
-// ------------------------------------------------------------------------------------
-
-// Compute a one-to-one mapping from a triangular 3D surface mesh
-// to a piece of the 2D space.
-// The mapping is linear by pieces (linear in each triangle).
-// The result is the (u,v) pair image of each vertex of the 3D surface.
-//
-// Preconditions:
-// - `mesh` must be a surface with one connected component.
-// - `mesh` must be a triangular mesh.
-//
-// Implementation note: Outline of the algorithm:
-// 1) Find an initial solution by projecting on a plane.
-// 2) Lock two vertices of the mesh.
-// 3) Copy the initial u,v coordinates to OpenNL.
-// 3) Construct the LSCM equation with OpenNL.
-// 4) Solve the equation with OpenNL.
-// 5) Copy OpenNL solution to the u,v coordinates.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-parameterize(Adaptor& mesh)
-{
-#ifdef DEBUG_TRACE
-    // Create timer for traces
-    CGAL::Timer timer;
-    timer.start();
-#endif
-
-    // Check preconditions
-    Error_code status = check_parameterize_preconditions(mesh);
-#ifdef DEBUG_TRACE
-    std::cerr << "  parameterization preconditions: " << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // Count vertices
-    int nbVertices = mesh.count_mesh_vertices();
-
-    // Index vertices from 0 to nbVertices-1
-    mesh.index_mesh_vertices();
-
-    // Mark all vertices as *not* "parameterized"
-    Vertex_iterator vertexIt;
-    for (vertexIt = mesh.mesh_vertices_begin();
-        vertexIt != mesh.mesh_vertices_end();
-        vertexIt++)
-    {
-        mesh.set_vertex_parameterized(vertexIt, false);
-    }
-
-    // Compute (u,v) for (at least two) border vertices
-    // and mark them as "parameterized"
-    status = get_border_parameterizer().parameterize_border(mesh);
-#ifdef DEBUG_TRACE
-    std::cerr << "  border vertices parameterization: " << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // Create sparse linear system "A*X = B" of size 2*nbVertices x 2*nbVertices
-    // (in fact, we need only 2 lines per triangle x 1 column per vertex)
-    LeastSquaresSolver solver(2*nbVertices);
-    solver.set_least_squares(true) ;
-
-    // Initialize the "A*X = B" linear system after
-    // (at least two) border vertices parameterization
-    initialize_system_from_mesh_border(solver, mesh);
-
-    // Fill the matrix for the other vertices
-    solver.begin_system() ;
-    for (Facet_iterator facetIt = mesh.mesh_facets_begin();
-         facetIt != mesh.mesh_facets_end();
-         facetIt++)
-    {
-        // Create two lines in the linear system per triangle (one for u, one for v)
-        status = setup_triangle_relations(solver, mesh, facetIt);
-            if (status != Base::OK)
-            return status;
-    }
-    solver.end_system() ;
-#ifdef DEBUG_TRACE
-    std::cerr << "  matrix filling (" << 2*mesh.count_mesh_facets() << " x " << nbVertices << "): "
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-
-    // Solve the "A*X = B" linear system in the least squares sense
-    if ( ! solver.solve() )
-        status = Base::ERROR_CANNOT_SOLVE_LINEAR_SYSTEM;
-#ifdef DEBUG_TRACE
-    std::cerr << "  solving linear system: "
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-    if (status != Base::OK)
-        return status;
-
-    // Copy X coordinates into the (u,v) pair of each vertex
-    set_mesh_uv_from_system(mesh, solver);
-#ifdef DEBUG_TRACE
-    std::cerr << "  copy computed UVs to mesh :"
-              << timer.time() << " seconds." << std::endl;
-    timer.reset();
-#endif
-
-    // Check postconditions
-    status = check_parameterize_postconditions(mesh, solver);
-#ifdef DEBUG_TRACE
-    std::cerr << "  parameterization postconditions: " << timer.time() << " seconds." << std::endl;
-#endif
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-
-// Check parameterize() preconditions:
-// - `mesh` must be a surface with one connected component
-// - `mesh` must be a triangular mesh
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-check_parameterize_preconditions(Adaptor& mesh)
-{
-    Error_code status = Base::OK;	    // returned value
-
-    // Helper class to compute genus or count borders, vertices, ...
-    typedef Parameterization_mesh_feature_extractor<Adaptor>
-                                            Mesh_feature_extractor;
-    Mesh_feature_extractor feature_extractor(mesh);
-
-    // Check that mesh is not empty
-    if (mesh.mesh_vertices_begin() == mesh.mesh_vertices_end())
-        status = Base::ERROR_EMPTY_MESH;
-    if (status != Base::OK)
-        return status;
-
-    // The whole surface parameterization package is restricted to triangular meshes
-    status = mesh.is_mesh_triangular() ? Base::OK
-                                       : Base::ERROR_NON_TRIANGULAR_MESH;
-    if (status != Base::OK)
-        return status;
-
-    // The whole package is restricted to surfaces: genus = 0,
-    // one connected component and at least one border
-    int genus = feature_extractor.get_genus();
-    int nb_borders = feature_extractor.get_nb_borders();
-    int nb_components = feature_extractor.get_nb_connex_components();
-    status = (genus == 0 && nb_borders >= 1 && nb_components == 1)
-           ? Base::OK
-           : Base::ERROR_NO_TOPOLOGICAL_DISC;
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-// Initialize "A*X = B" linear system after
-// (at least two) border vertices are parameterized
-//
-// Preconditions:
-// - Vertices must be indexed
-// - X and B must be allocated and empty
-// - At least 2 border vertices must be parameterized
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-void LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-initialize_system_from_mesh_border(LeastSquaresSolver& solver,
-                                   const Adaptor& mesh)
-{
-    for (Vertex_const_iterator it = mesh.mesh_vertices_begin();
-        it != mesh.mesh_vertices_end();
-        it++)
-    {
-        // Get vertex index in sparse linear system
-        int index = mesh.get_vertex_index(it);
-
-        // Get vertex (u,v) (meaningless if vertex is not parameterized)
-        Point_2 uv = mesh.get_vertex_uv(it);
-
-        // Write (u,v) in X (meaningless if vertex is not parameterized)
-        // Note  : 2*index     --> u
-        //         2*index + 1 --> v
-        solver.variable(2*index    ).set_value(uv.x()) ;
-        solver.variable(2*index + 1).set_value(uv.y()) ;
-
-        // Copy (u,v) in B if vertex is parameterized
-        if (mesh.is_vertex_parameterized(it)) {
-            solver.variable(2*index    ).lock() ;
-            solver.variable(2*index + 1).lock() ;
-        }
-    }
-}
-
-// Utility for setup_triangle_relations():
-// Computes the coordinates of the vertices of a triangle
-// in a local 2D orthonormal basis of the triangle's plane.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-void
-LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2,   // in
-                 Point_2& z0, Point_2& z1, Point_2& z2)                     // out
-{
-    Vector_3 X = p1 - p0 ;
-    NT X_norm = std::sqrt(X*X);
-    if (X_norm != 0.0)
-        X = X / X_norm;
-
-    Vector_3 Z = CGAL::cross_product(X, p2 - p0) ;
-    NT Z_norm = std::sqrt(Z*Z);
-    if (Z_norm != 0.0)
-        Z = Z / Z_norm;
-
-    Vector_3 Y = CGAL::cross_product(Z, X) ;
-
-    const Point_3& O = p0 ;
-
-    NT x0 = 0 ;
-    NT y0 = 0 ;
-    NT x1 = std::sqrt( (p1 - O)*(p1 - O) ) ;
-    NT y1 = 0 ;
-    NT x2 = (p2 - O) * X ;
-    NT y2 = (p2 - O) * Y ;
-
-    z0 = Point_2(x0,y0) ;
-    z1 = Point_2(x1,y1) ;
-    z2 = Point_2(x2,y2) ;
-}
-
-
-// Create two lines in the linear system per triangle (one for u, one for v)
-//
-// Precondition: vertices must be indexed
-//
-// Implementation note: LSCM equation is:
-//       (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
-// where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
-//       Zk = xk + i.yk is the complex number corresponding to local (x,y) coords
-// cool: no divide with this expression; makes it more numerically stable
-// in presence of degenerate triangles
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-setup_triangle_relations(LeastSquaresSolver& solver,
-                         const Adaptor& mesh,
-                         Facet_const_handle facet)
-{
-    // Get the 3 vertices of the triangle
-    Vertex_const_handle v0, v1, v2;
-    int vertexIndex = 0;
-    Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facet),
-                                         end = cir;
-    CGAL_For_all(cir, end)
-    {
-        if (vertexIndex == 0)
-            v0 = cir;
-        else if (vertexIndex == 1)
-            v1 = cir;
-        else if (vertexIndex == 2)
-            v2 = cir;
-
-        vertexIndex++;
-    }
-    if (vertexIndex != 3)
-        return Base::ERROR_NON_TRIANGULAR_MESH;
-
-    // Get the vertices index
-    int id0 = mesh.get_vertex_index(v0) ;
-    int id1 = mesh.get_vertex_index(v1) ;
-    int id2 = mesh.get_vertex_index(v2) ;
-
-    // Get the vertices position
-    const Point_3& p0 = mesh.get_vertex_position(v0) ;
-    const Point_3& p1 = mesh.get_vertex_position(v1) ;
-    const Point_3& p2 = mesh.get_vertex_position(v2) ;
-
-    // Computes the coordinates of the vertices of a triangle
-    // in a local 2D orthonormal basis of the triangle's plane.
-    Point_2 z0,z1,z2 ;
-    project_triangle(p0,p1,p2,  //in
-                     z0,z1,z2); // out
-    Vector_2 z01 = z1 - z0 ;
-    Vector_2 z02 = z2 - z0 ;
-    NT a = z01.x() ;
-    NT b = z01.y() ;
-    NT c = z02.x() ;
-    NT d = z02.y() ;
-    CGAL_surface_mesh_parameterization_assertion(b == 0.0) ;
-
-    // Create two lines in the linear system per triangle (one for u, one for v)
-    // LSCM equation is:
-    //       (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
-    // where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
-    //       Zk = xk + i.yk is the complex number corresponding to local (x,y) coords
-    //
-    // Note  : 2*index     --> u
-    //         2*index + 1 --> v
-    int u0_id = 2*id0     ;
-    int v0_id = 2*id0 + 1 ;
-    int u1_id = 2*id1     ;
-    int v1_id = 2*id1 + 1 ;
-    int u2_id = 2*id2     ;
-    int v2_id = 2*id2 + 1 ;
-    //
-    // Real part
-    // Note: b = 0
-    solver.begin_row() ;
-    solver.add_coefficient(u0_id, -a+c)  ;
-    solver.add_coefficient(v0_id,  b-d)  ;
-    solver.add_coefficient(u1_id,   -c)  ;
-    solver.add_coefficient(v1_id,    d)  ;
-    solver.add_coefficient(u2_id,    a) ;
-    solver.end_row() ;
-    //
-    // Imaginary part
-    // Note: b = 0
-    solver.begin_row() ;
-    solver.add_coefficient(u0_id, -b+d) ;
-    solver.add_coefficient(v0_id, -a+c) ;
-    solver.add_coefficient(u1_id,   -d) ;
-    solver.add_coefficient(v1_id,   -c) ;
-    solver.add_coefficient(v2_id,    a) ;
-    solver.end_row() ;
-
-    return Base::OK;
-}
-
-// Copy X coordinates into the (u,v) pair of each vertex
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-void LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-set_mesh_uv_from_system(Adaptor& mesh,
-                        const LeastSquaresSolver& solver)
-{
-    Vertex_iterator vertexIt;
-    for (vertexIt = mesh.mesh_vertices_begin();
-         vertexIt != mesh.mesh_vertices_end();
-         vertexIt++)
-    {
-        int index = mesh.get_vertex_index(vertexIt);
-
-        // Note  : 2*index     --> u
-        //         2*index + 1 --> v
-        NT u = solver.variable(2*index    ).value() ;
-        NT v = solver.variable(2*index + 1).value() ;
-
-        // Fill vertex (u,v) and mark it as "parameterized"
-        mesh.set_vertex_uv(vertexIt, Point_2(u,v));
-        mesh.set_vertex_parameterized(vertexIt, true);
-    }
-}
-
-// Check parameterize() postconditions:
-// - 3D -> 2D mapping is one-to-one.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
-LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-check_parameterize_postconditions(const Adaptor& mesh,
-                                  const LeastSquaresSolver& solver)
-{
-    Error_code status = Base::OK;
-
-    // Check if 3D -> 2D mapping is one-to-one
-    status = is_one_to_one_mapping(mesh, solver)
-           ? Base::OK
-           : Base::ERROR_NO_1_TO_1_MAPPING;
-    if (status != Base::OK)
-        return status;
-
-    return status;
-}
-
-// Check if 3D -> 2D mapping is one-to-one.
-template<class Adaptor, class Border_param, class Sparse_LA>
-inline
-bool LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
-is_one_to_one_mapping(const Adaptor& mesh,
-                      const LeastSquaresSolver& )
-{
-    Vector_3    first_triangle_normal;
-
-    for (Facet_const_iterator facetIt = mesh.mesh_facets_begin();
-         facetIt != mesh.mesh_facets_end();
-         facetIt++)
-    {
-        // Get 3 vertices of the facet
-        Vertex_const_handle v0, v1, v2;
-        int vertexIndex = 0;
-        Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facetIt),
-                                             end = cir;
-        CGAL_For_all(cir, end)
-        {
-            if (vertexIndex == 0)
-                v0 = cir;
-            else if (vertexIndex == 1)
-                v1 = cir;
-            else if (vertexIndex == 2)
-                v2 = cir;
-
-            vertexIndex++;
-        }
-        CGAL_surface_mesh_parameterization_assertion(vertexIndex >= 3);
-
-        // Get the 3 vertices position IN 2D
-        Point_2 p0 = mesh.get_vertex_uv(v0) ;
-        Point_2 p1 = mesh.get_vertex_uv(v1) ;
-        Point_2 p2 = mesh.get_vertex_uv(v2) ;
-
-        // Compute the facet normal
-        Point_3 p0_3D(p0.x(), p0.y(), 0);
-        Point_3 p1_3D(p1.x(), p1.y(), 0);
-        Point_3 p2_3D(p2.x(), p2.y(), 0);
-        Vector_3 v01_3D = p1_3D - p0_3D;
-        Vector_3 v02_3D = p2_3D - p0_3D;
-        Vector_3 normal = CGAL::cross_product(v01_3D, v02_3D);
-
-        // Check that all normals are oriented the same way
-        // => no 2D triangle is flipped
-        if (cir == mesh.facet_vertices_begin(facetIt))
-        {
-            first_triangle_normal = normal;
-        }
-        else
-        {
-            if (first_triangle_normal * normal < 0)
-                return false;
-        }
-    }
-
-    return true;            // OK if we reach this point
-}
-
-
-} //namespace CGAL
-
-#endif //CGAL_LSCM_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Labeled_image_mesh_domain_3.h b/3rdparty/CGAL-4.6/include/CGAL/Labeled_image_mesh_domain_3.h
deleted file mode 100644
index b95f47a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Labeled_image_mesh_domain_3.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description :
-//
-//
-//******************************************************************************
-
-#ifndef CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
-#define CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
-
-
-#include <CGAL/Random.h>
-#include <CGAL/Labeled_mesh_domain_3.h>
-#include <CGAL/Mesh_3/Image_to_labeled_function_wrapper.h>
-
-
-namespace CGAL {
-
-/**
- * @class Labeled_image_mesh_domain_3
- *
- *
- */
-template<class Image,
-         class BGT,
-         class Wrapper = Mesh_3::Image_to_labeled_function_wrapper<Image, BGT> >
-class Labeled_image_mesh_domain_3
-: public Labeled_mesh_domain_3<Wrapper, BGT>
-{
-public:
-  typedef Labeled_mesh_domain_3<Wrapper, BGT> Base;
-
-  typedef typename Base::Sphere_3 Sphere_3;
-  typedef typename Base::FT FT;
-  typedef BGT Geom_traits;
-  typedef CGAL::Bbox_3 Bbox_3;
-
-  /// Constructor
-  Labeled_image_mesh_domain_3(const Image& image,
-                              const FT& error_bound = FT(1e-3),
-                              CGAL::Random* p_rng = NULL)
-    : Base(Wrapper(image),
-           compute_bounding_box(image),
-           error_bound,
-           p_rng)
-  {}
-
-  /// Destructor
-  virtual ~Labeled_image_mesh_domain_3() {}
-
-
-private:
-  /// Returns a box enclosing image \c im
-  Bbox_3 compute_bounding_box(const Image& im) const
-  {
-    return Bbox_3(-1,-1,-1,
-                  im.xdim()*im.vx()+1, im.ydim()*im.vy()+1, im.zdim()*im.vz()+1);
-  }
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Labeled_image_mesh_domain_3<Image, BGT> Self;
-  Labeled_image_mesh_domain_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Labeled_image_mesh_domain_3
-
-
-
-}  // end namespace CGAL
-
-
-
-#endif // CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Labeled_mesh_domain_3.h b/3rdparty/CGAL-4.6/include/CGAL/Labeled_mesh_domain_3.h
deleted file mode 100644
index 8b05175..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Labeled_mesh_domain_3.h
+++ /dev/null
@@ -1,641 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb, Aymeric PELLE
-//
-//******************************************************************************
-// File Description :
-// class Labeled_mesh_domain_3. See class description.
-//******************************************************************************
-
-#ifndef CGAL_LABELED_MESH_DOMAIN_3_H
-#define CGAL_LABELED_MESH_DOMAIN_3_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Bbox_3.h>
-
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
-
-#include <boost/variant.hpp>
-#include <boost/format.hpp>
-#include <boost/optional.hpp>
-#include <CGAL/tuple.h>
-#include <CGAL/Origin.h>
-
-namespace CGAL {
-
-/**
- * \class Labeled_mesh_domain_3
- *
- * Function f must take his values into N.
- * Let p be a Point.
- *  - f(p)=0 means that p is outside domain.
- *  - f(p)=a, a!=0 means that p is inside subdomain a.
- *
- *  Any boundary facet is labelled <a,b>, a<b, where a and b are the
- *  tags of it's incident subdomain.
- *  Thus, a boundary facet of the domain is labelled <0,b>, where b!=0.
- */
-template<class Function, class BGT>
-class Labeled_mesh_domain_3
-{
-public:
-  /// Geometric object types
-  typedef typename BGT::Point_3    Point_3;
-  typedef typename BGT::Segment_3  Segment_3;
-  typedef typename BGT::Ray_3      Ray_3;
-  typedef typename BGT::Line_3     Line_3;
-  typedef typename BGT::Vector_3   Vector_3;
-  typedef typename BGT::Sphere_3   Sphere_3;
-  typedef CGAL::Bbox_3             Bbox_3;
-
-protected:
-  typedef typename BGT::Iso_cuboid_3 Iso_cuboid_3;
-
-public:
-  // Kernel_traits compatibility
-  typedef BGT R;
-
-  //-------------------------------------------------------
-  // Index Types
-  //-------------------------------------------------------
-  /// Type of indexes for cells of the input complex
-  typedef typename Function::return_type Subdomain_index;
-  typedef boost::optional<Subdomain_index> Subdomain;
-  /// Type of indexes for surface patch of the input complex
-  typedef std::pair<Subdomain_index, Subdomain_index> Surface_patch_index;
-  typedef boost::optional<Surface_patch_index> Surface_patch;
-  /// Type of indexes to characterize the lowest dimensional face of the input
-  /// complex on which a vertex lie
-  typedef boost::variant<Subdomain_index, Surface_patch_index> Index;
-  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
-
-
-  typedef typename BGT::FT FT;
-  typedef BGT Geom_traits;
-
-  /**
-   * @brief Constructor
-   */
-  Labeled_mesh_domain_3(const Function& f,
-                         const Sphere_3& bounding_sphere,
-                         const FT& error_bound = FT(1e-3),
-                         CGAL::Random* p_rng = NULL);
-
-  Labeled_mesh_domain_3(const Function& f,
-                         const Bbox_3& bbox,
-                         const FT& error_bound = FT(1e-3),
-                         CGAL::Random* p_rng = NULL);
-
-  Labeled_mesh_domain_3(const Function& f,
-                         const Iso_cuboid_3& bbox,
-                         const FT& error_bound = FT(1e-3),
-                         CGAL::Random* p_rng = NULL);
-
-  /// Destructor
-  virtual ~Labeled_mesh_domain_3()
-  {
-    if(delete_rng_)
-      delete p_rng_;
-  }
-
-
-  /**
-   * Constructs  a set of \ccc{n} points on the surface, and output them to
-   *  the output iterator \ccc{pts} whose value type is required to be
-   *  \ccc{std::pair<Points_3, Index>}.
-   */
-  struct Construct_initial_points
-  {
-    Construct_initial_points(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    template<class OutputIterator>
-    OutputIterator operator()(OutputIterator pts, const int n = 12) const;
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Construct_initial_points object
-  Construct_initial_points construct_initial_points_object() const
-  {
-    return Construct_initial_points(*this);
-  }
-
-  /**
-   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
-   *  domain, the parameter index is set to the index of the subdomain
-   *  including $p$. It is set to the default value otherwise.
-   */
-  struct Is_in_domain
-  {
-    Is_in_domain(const Labeled_mesh_domain_3& domain) : r_domain_(domain) {}
-
-    Subdomain operator()(const Point_3& p) const
-    {
-      // f(p)==0 means p is outside the domain
-      Subdomain_index index = (r_domain_.function_)(p);
-      if ( Subdomain_index() == index )
-        return Subdomain();
-      else
-        return Subdomain(index);
-    }
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Is_in_domain object
-  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
-
-  /**
-   * Returns true is the element \ccc{type} intersect properly any of the
-   * surface patches describing the either the domain boundary or some
-   * subdomain boundary.
-   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * Parameter index is set to the index of the intersected surface patch
-   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
-   * value otherwise.
-   */
-  struct Do_intersect_surface
-  {
-    Do_intersect_surface(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    Surface_patch operator()(const Segment_3& s) const
-    {
-      return this->operator()(s.source(), s.target());
-    }
-
-    Surface_patch operator()(const Ray_3& r) const
-    {
-      return clip_to_segment(r);
-    }
-
-    Surface_patch operator()(const Line_3& l) const
-    {
-      return clip_to_segment(l);
-    }
-
-  private:
-    /// Returns true if points \c a & \c b do not belong to the same subdomain
-    /// \c index is set to the surface index of subdomains f(a), f(b)
-    Surface_patch operator()(const Point_3& a, const Point_3& b) const
-    {
-      // If f(a) != f(b), then [a,b] intersects some surface. Here we consider
-      // [a,b] intersects surface_patch labelled <f(a),f(b)> (or <f(b),f(a)>).
-      // It may be false, further rafinement will improve precision
-      const Subdomain_index value_a = r_domain_.function_(a);
-      const Subdomain_index value_b = r_domain_.function_(b);
-
-      if ( value_a != value_b )
-        return Surface_patch(r_domain_.make_surface_index(value_a, value_b));
-      else
-        return Surface_patch();
-    }
-
-    /**
-     * Clips \c query to a segment \c s, and call operator()(s)
-     */
-    template<typename Query>
-    Surface_patch clip_to_segment(const Query& query) const
-    {
-      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
-        clipped = CGAL::intersection(query, r_domain_.bbox_);
-
-      if(clipped)
-#if CGAL_INTERSECTION_VERSION > 1
-        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
-          return this->operator()(*s);
-#else
-        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
-          return this->operator()(*s);
-#endif
-        
-      return Surface_patch();
-    }
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Do_intersect_surface object
-  Do_intersect_surface do_intersect_surface_object() const
-  {
-    return Do_intersect_surface(*this);
-  }
-
-  /**
-   * Returns a point in the intersection of the primitive \ccc{type}
-   * with some boundary surface.
-   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * The integer \ccc{dimension} is set to the dimension of the lowest
-   * dimensional face in the input complex containing the returned point, and
-   * \ccc{index} is set to the index to be stored at a mesh vertex lying
-   * on this face.
-   */
-  struct Construct_intersection
-  {
-    Construct_intersection(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    Intersection operator()(const Segment_3& s) const
-    {
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      CGAL_precondition(r_domain_.do_intersect_surface_object()(s));
-#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      return this->operator()(s.source(),s.target());
-    }
-
-    Intersection operator()(const Ray_3& r) const
-    {
-      return clip_to_segment(r);
-    }
-
-    Intersection operator()(const Line_3& l) const
-    {
-      return clip_to_segment(l);
-    }
-
-  private:
-    /**
-     * Returns a point in the intersection of [a,b] with the surface
-     * \c a must be the source point, and \c b the out point. It's important
-     * because it drives bisection cuts.
-     * Indeed, the returned point is the first intersection from \c [a,b]
-     * with a subdomain surface.
-     */
-    Intersection operator()(const Point_3& a, const Point_3& b) const
-    {
-      // Functors
-      typename BGT::Compute_squared_distance_3 squared_distance =
-                                      BGT().compute_squared_distance_3_object();
-      typename BGT::Construct_midpoint_3 midpoint =
-                                      BGT().construct_midpoint_3_object();
-
-      // Non const points
-      Point_3 p1 = a;
-      Point_3 p2 = b;
-      Point_3 mid = midpoint(p1, p2);
-
-      // Cannot be const: those values are modified below.
-      Subdomain_index value_at_p1 = r_domain_.function_(p1);
-      Subdomain_index value_at_p2 = r_domain_.function_(p2);
-      Subdomain_index value_at_mid = r_domain_.function_(mid,true);
-
-      // If both extremities are in the same subdomain,
-      // there is no intersection.
-      // This should not happen...
-      if( value_at_p1 == value_at_p2 )
-      {
-        return Intersection();
-      }
-
-      // Construct the surface patch index and index from the values at 'a'
-      // and 'b'. Even if the bissection find out a different pair of
-      // values, the reported index will be constructed from the initial
-      // values.
-      const Surface_patch_index sp_index =
-        r_domain_.make_surface_index(value_at_p1, value_at_p2);
-      const Index index = r_domain_.index_from_surface_patch_index(sp_index);
-
-      // Else lets find a point (by bisection)
-      // Bisection ends when the point is near than error bound from surface
-      while(true)
-      {
-        // If the two points are enough close, then we return midpoint
-        if ( squared_distance(p1, p2) < r_domain_.squared_error_bound_ )
-        {
-          CGAL_assertion(value_at_p1 != value_at_p2);
-          return Intersection(mid, index, 2);
-        }
-
-        // Else we must go on
-        // Here we consider that p1(a) is the source point. Thus, we keep p1 and
-        // change p2 if f(p1)!=f(p2).
-        // That allows us to find the first intersection from a of [a,b] with
-        // a surface.
-        if ( value_at_p1 != value_at_mid )
-        {
-          p2 = mid;
-          value_at_p2 = value_at_mid;
-        }
-        else
-        {
-          p1 = mid;
-          value_at_p1 = value_at_mid;
-        }
-
-        mid = midpoint(p1, p2);
-        value_at_mid = r_domain_.function_(mid,true);
-      }
-    }
-
-    /// Clips \c query to a segment \c s, and call operator()(s)
-    template<typename Query>
-    Intersection clip_to_segment(const Query& query) const
-    {
-      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
-        clipped = CGAL::intersection(query, r_domain_.bbox_);
-
-      if(clipped)
-#if CGAL_INTERSECTION_VERSION > 1
-        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
-          return this->operator()(*s);
-#else
-        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
-          return this->operator()(*s);
-#endif
-      
-      return Intersection();
-    }
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Construct_intersection object
-  Construct_intersection construct_intersection_object() const
-  {
-    return Construct_intersection(*this);
-  }
-
-  /**
-   * Returns the index to be stored in a vertex lying on the surface identified
-   * by \c index.
-   */
-  Index index_from_surface_patch_index(const Surface_patch_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the index to be stored in a vertex lying in the subdomain
-   * identified by \c index.
-   */
-  Index index_from_subdomain_index(const Subdomain_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the \c Surface_patch_index of the surface patch
-   * where lies a vertex with dimension 2 and index \c index.
-   */
-  Surface_patch_index surface_patch_index(const Index& index) const
-  { return boost::get<Surface_patch_index>(index); }
-
-  /**
-   * Returns the index of the subdomain containing a vertex
-   *  with dimension 3 and index \c index.
-   */
-  Subdomain_index subdomain_index(const Index& index) const
-  { return boost::get<Subdomain_index>(index); }
-  
-  // -----------------------------------
-  // Backward Compatibility
-  // -----------------------------------
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index   Surface_index;
-  
-  Index index_from_surface_index(const Surface_index& index) const
-  { return index_from_surface_patch_index(index); }
-  
-  Surface_index surface_index(const Index& index) const
-  { return surface_patch_index(index); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  // -----------------------------------
-  // End backward Compatibility
-  // -----------------------------------
-
-
-private:
-  /// Returns Surface_patch_index from \c i and \c j
-  Surface_patch_index make_surface_index(const Subdomain_index i,
-                                   const Subdomain_index j) const
-  {
-    if ( i < j ) return Surface_patch_index(i,j);
-    else return Surface_patch_index(j,i);
-  }
-
-  /// Returns squared error bound from \c bbox and \c error
-  FT squared_error_bound(const Iso_cuboid_3& bbox, const FT& error) const
-  {
-    typename BGT::Compute_squared_distance_3 squared_distance =
-                                    BGT().compute_squared_distance_3_object();
-    return squared_distance((bbox.min)(), (bbox.max)())*error*error/4;
-  }
-
-  /// Returns squared error bound from \c sphere and \c error
-  FT squared_error_bound(const Sphere_3& sphere, const FT& error) const
-  {
-    typename BGT::Compute_squared_radius_3 squared_radius =
-                                    BGT().compute_squared_radius_3_object();
-    return squared_radius(sphere)*error*error;
-  }
-
-  /// Returns the bounding sphere of an Iso_cuboid_3
-  Sphere_3 bounding_sphere(const Iso_cuboid_3& bbox) const
-  {
-    typename BGT::Construct_sphere_3 sphere = BGT().construct_sphere_3_object();
-    return sphere((bbox.min)(), (bbox.max)());
-  }
-
-  /// Returns and Iso_cuboid_3 from a Bbox_3
-  Iso_cuboid_3 iso_cuboid(const Bbox_3& bbox)
-  {
-    const Point_3 p_min(bbox.xmin(), bbox.ymin(), bbox.zmin());
-    const Point_3 p_max(bbox.xmax(), bbox.ymax(), bbox.zmax());
-
-    return Iso_cuboid_3(p_min,p_max);
-  }
-
-protected:
-  /// Returns bounding box
-  const Iso_cuboid_3& bounding_box() const { return bbox_; }
-
-private:
-  /// The function which answers subdomain queries
-  const Function function_;
-  /// The bounding box
-  const Iso_cuboid_3 bbox_;
-  /// The random number generator used by Construct_initial_points
-  CGAL::Random* p_rng_;
-  bool delete_rng_;
-  /// Error bound relative to sphere radius
-  FT squared_error_bound_;
-
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Labeled_mesh_domain_3<Function,BGT> Self;
-  Labeled_mesh_domain_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Labeled_mesh_domain_3
-
-
-
-
-//-------------------------------------------------------
-// Method implementation
-//-------------------------------------------------------
-template<class F, class BGT>
-Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
-                       const F& f,
-                       const Sphere_3& bounding_sphere,
-                       const FT& error_bound,
-                       CGAL::Random* p_rng)
-: function_(f)
-, bbox_(iso_cuboid(bounding_sphere.bbox()))
-, p_rng_(p_rng)
-, delete_rng_(false)
-, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
-{
-  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
-  if(!p_rng_)
-  {
-    p_rng_ = new CGAL::Random(0);
-    delete_rng_ = true;
-  }
-}
-
-template<class F, class BGT>
-Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
-                       const F& f,
-                       const Bbox_3& bbox,
-                       const FT& error_bound,
-                       CGAL::Random* p_rng)
-: function_(f)
-, bbox_(iso_cuboid(bbox))
-, p_rng_(p_rng)
-, delete_rng_(false)
-, squared_error_bound_(squared_error_bound(bbox_,error_bound))
-{
-  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
-  if(!p_rng_)
-  {
-    p_rng_ = new CGAL::Random(0);
-    delete_rng_ = true;
-  }
-}
-
-template<class F, class BGT>
-Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
-                       const F& f,
-                       const Iso_cuboid_3& bbox,
-                       const FT& error_bound,
-                       CGAL::Random* p_rng)
-: function_(f)
-, bbox_(bbox)
-, p_rng_(p_rng)
-, delete_rng_(false)
-, squared_error_bound_(squared_error_bound(bbox_,error_bound))
-{
-  // TODO : CGAL_ASSERT(0 < f( bbox.get_center()) ) ?
-  if(!p_rng_)
-  {
-    p_rng_ = new CGAL::Random(0);
-    delete_rng_ = true;
-  }
-}
-
-
-
-template<class F, class BGT>
-template<class OutputIterator>
-OutputIterator
-Labeled_mesh_domain_3<F,BGT>::Construct_initial_points::operator()(
-                                                    OutputIterator pts,
-                                                    const int nb_points) const
-{
-  // Create point_iterator on and in bounding_sphere
-  typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
-  typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
-
-
-  const FT squared_radius = BGT().compute_squared_radius_3_object()(
-      r_domain_.bounding_sphere(r_domain_.bbox_));
-
-  const double radius = std::sqrt(CGAL::to_double(squared_radius));
-
-  CGAL::Random& rng = *(r_domain_.p_rng_);
-  Random_points_on_sphere_3 random_point_on_sphere(radius, rng);
-  Random_points_in_sphere_3 random_point_in_sphere(radius, rng);
-
-  // Get some functors
-  typename BGT::Construct_segment_3 segment_3 =
-                              BGT().construct_segment_3_object();
-  typename BGT::Construct_vector_3 vector_3 =
-                              BGT().construct_vector_3_object();
-  typename BGT::Construct_translated_point_3 translate =
-                              BGT().construct_translated_point_3_object();
-  typename BGT::Construct_center_3 center = BGT().construct_center_3_object();
-
-  // Get translation from origin to sphere center
-  Point_3 center_pt = center(r_domain_.bounding_sphere(r_domain_.bbox_));
-  const Vector_3 sphere_translation = vector_3(CGAL::ORIGIN, center_pt);
-
-  // Create nb_point points
-  int n = nb_points;
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "construct initial points:\n";
-#endif
-  while ( 0 != n )
-  {
-    // Get a random segment
-    const Point_3 random_point = translate(*random_point_on_sphere,
-                                           sphere_translation);
-    const Segment_3 random_seg = segment_3(center_pt, random_point);
-
-    // Add the intersection to the output if it exists
-    Surface_patch surface = r_domain_.do_intersect_surface_object()(random_seg);
-    if ( surface )
-    {
-      const Point_3 intersect_pt = CGAL::cpp11::get<0>(
-          r_domain_.construct_intersection_object()(random_seg));
-      *pts++ = std::make_pair(intersect_pt,
-                              r_domain_.index_from_surface_patch_index(*surface));
-      --n;
-
-#ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << boost::format("\r             \r"
-                                 "%1%/%2% initial point(s) found...")
-                   % (nb_points - n)
-                   % nb_points;
-#endif
-    }
-    else
-    {
-      // Get a new random point into sphere as center of object
-      // It may be necessary if the center of the domain is empty, e.g. torus
-      // In general case, it is good for input point dispersion
-      ++random_point_in_sphere;
-      center_pt = translate(*random_point_in_sphere, sphere_translation);
-    }
-    ++random_point_on_sphere;
-  }
-
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "\n";
-#endif
-  return pts;
-}
-
-
-}  // end namespace CGAL
-
-#endif // LABELLED_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Lapack/Linear_algebra_lapack.h b/3rdparty/CGAL-4.6/include/CGAL/Lapack/Linear_algebra_lapack.h
deleted file mode 100644
index 3312236..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Lapack/Linear_algebra_lapack.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Pouget and Frédéric Cazals
-#ifndef CGAL_LAPACK_H
-#define CGAL_LAPACK_H
-
-#include <cstdlib>
-#include <CGAL/auto_link/LAPACK.h>
-
-extern "C" {
-  // taken from acml.h
-void dgelss(int m, int n, int nrhs, 
-            double *a, int lda, double *b, int ldb, double *sing, 
-            double rcond, int *irank, int *info);
-
-void dgelss_(int *m, int *n, int *nrhs,
-                    double *a, int *lda, double *b, int *ldb, double *
-                    s, double *rcond, int *rank, double *work, int *lwork,
-                    int *info);
-}
-
-namespace CGAL { namespace LAPACK {
-
-inline
-void dgelss(int *m, int *n, int *nrhs,
-       double *a, int *lda, double *b, int *ldb, double *
-       s, double *rcond, int *rank, double *work, int *lwork,
-       int *info)
-{
-#ifdef CGAL_USE_F2C
-  ::dgelss_(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info);
-#else
-  ::dgelss(*m, *n, *nrhs, a, *lda, b, *ldb, s, *rcond, rank,  info);
-#endif
-}
-
-} }
-
-
-namespace CGAL {
-  
-////////////////////////class Lapack_vector/////////////////////
-class Lapack_vector{
-  typedef double FT;
- protected:
-  FT* m_vector;
-  size_t nb_elts;
- public:
-  // constructor
-  // initializes all the elements of the vector to zero.
-  Lapack_vector(size_t n) { 
-    m_vector = (FT*) std::calloc (n, sizeof(FT)); 
-    nb_elts = n;
-  }
-  
-  ~Lapack_vector() { 
-    free(m_vector);
-  }
-  
-  size_t size() {return nb_elts;}
-  //data access
-  const FT* vector() const { return m_vector;}
-  FT* vector() { return m_vector; }
-
-  FT operator()(size_t i) {return m_vector[i];}
-  void set(size_t i, const FT value) { m_vector[i] = value; }
-private:
-  /// Copy constructor and operator =() are not implemented.
-  Lapack_vector(const Lapack_vector& toCopy);
-  Lapack_vector& operator =(const Lapack_vector& toCopy);
-}; 
-
-
-////////////////////////class Lapack_matrix/////////////////////
-//in clapack, matrices are one-dimensional arrays and elements are
-//column-major ordered. This class is a wrapper defining set and get
-//in the usual way with line and column indices.
-class Lapack_matrix{
-  typedef double FT;
-protected:
-  FT* m_matrix;
-  size_t nb_rows;
-  size_t nb_columns;
-public:
-  // constructor
-  // initializes all the elements of the matrix to zero.
-  Lapack_matrix(size_t n1, size_t n2) { 
-    m_matrix = (FT*) std::calloc (n1*n2, sizeof(FT)); 
-    nb_rows = n1;
-    nb_columns = n2;
-  }
-  
-  ~Lapack_matrix() { 
-    free(m_matrix);
-  }
-  
-  size_t number_of_rows() {return nb_rows;}
-  size_t number_of_columns() {return nb_columns;}
-
-  //access
-  const FT* matrix() const { return m_matrix; }
-  FT* matrix() { return m_matrix; }
-
-  void set(size_t i, size_t j, const FT value) { m_matrix[j*nb_rows+i] = value; }
-  FT operator()(size_t i, size_t j) { return m_matrix[j*nb_rows+i]; }
-private:
-  /// Copy constructor and operator =() are not implemented.
-  Lapack_matrix(const Lapack_matrix& toCopy);
-  Lapack_matrix& operator =(const Lapack_matrix& toCopy);
-}; 
-
-////////////////////////class Lapack_svd/////////////////////
-class Lapack_svd{
-public:
-  typedef double FT;
-  typedef Lapack_vector Vector;
-  typedef Lapack_matrix Matrix;
-  //solve MX=B using SVD and return the condition number of M
-  //The solution is stored in B
-  static
-    FT solve(Matrix& M, Vector& B);
-};
-
-inline
-Lapack_svd::FT Lapack_svd::solve(Matrix& M, Vector& B)
-{
-  int m = static_cast<int>(M.number_of_rows()),
-    n = static_cast<int>(M.number_of_columns()),
-    nrhs = 1,
-    lda = m,
-    ldb = m,
-    rank,
-    lwork = 5*m,
-    info;
-  //c style
-  FT* sing_values = (FT*) std::malloc(n*sizeof(FT));
-  FT* work = (FT*) std::malloc(lwork*sizeof(FT));
-
-  FT rcond = -1;
-
-  LAPACK::dgelss(&m, &n, &nrhs, M.matrix(), &lda, B.vector(), &ldb, sing_values, 
-	  &rcond, &rank, work, &lwork, &info);
-  CGAL_assertion(info==0);
-
-  FT cond_nb = sing_values[0]/sing_values[n-1];
-  
-  //clean up 
-  free(sing_values);
-  free(work);
-
-  return cond_nb;
-}
-
-} // namespace CGAL
-
-#endif // CGAL_LAPACK_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Lazy.h b/3rdparty/CGAL-4.6/include/CGAL/Lazy.h
deleted file mode 100644
index 8bcd623..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Lazy.h
+++ /dev/null
@@ -1,1769 +0,0 @@
-// Copyright (c) 2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Sylvain Pion
-
-#ifndef CGAL_LAZY_H
-#define CGAL_LAZY_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle.h>
-#include <CGAL/Object.h>
-#include <CGAL/Kernel/Type_mapper.h>
-#include <CGAL/Profile_counter.h>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/min_max_n.h>
-#include <CGAL/Origin.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Bbox_3.h>
-#include <vector>
-#include <CGAL/Default.h>
-
-#ifdef CGAL_HAS_THREADS
-#  include <boost/thread/tss.hpp>
-#endif
-
-#include <boost/optional.hpp>
-#include <boost/variant.hpp>
-
-#include <boost/mpl/has_xxx.hpp>
-
-#include <boost/preprocessor/facilities/expand.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-
-namespace CGAL {
-
-template <typename AT, typename ET, typename EFT, typename E2A> class Lazy;
-
-template <typename ET_>
-class Lazy_exact_nt;
-
-template <typename AT, typename ET, typename EFT, typename E2A>
-inline
-const AT&
-approx(const Lazy<AT,ET, EFT, E2A>& l)
-{
-  return l.approx();
-}
-
-// Where is this one (non-const) needed ?  Is it ?
-template <typename AT, typename ET, typename EFT, typename E2A>
-inline
-AT&
-approx(Lazy<AT,ET, EFT, E2A>& l)
-{
-  return l.approx();
-}
-
-
-template <typename AT, typename ET, typename EFT, typename E2A>
-inline
-const ET&
-exact(const Lazy<AT,ET,EFT,E2A>& l)
-{
-  return l.exact();
-}
-
-
-template <typename AT, typename ET, typename EFT, typename E2A>
-inline
-unsigned
-depth(const Lazy<AT,ET,EFT,E2A>& l)
-{
-  return l.depth();
-}
-
-
-#define CGAL_LAZY_FORWARD(T) \
-  inline const T & approx(const T& d) { return d; } \
-  inline const T & exact (const T& d) { return d; } \
-  inline unsigned  depth (const T&  ) { return 0; }
-
-
-CGAL_LAZY_FORWARD(long double)
-CGAL_LAZY_FORWARD(double)
-CGAL_LAZY_FORWARD(float)
-CGAL_LAZY_FORWARD(int)
-CGAL_LAZY_FORWARD(unsigned int)
-CGAL_LAZY_FORWARD(long)
-CGAL_LAZY_FORWARD(unsigned long)
-#ifdef CGAL_USE_LONG_LONG
-CGAL_LAZY_FORWARD(long long)
-CGAL_LAZY_FORWARD(unsigned long long)
-#endif
-CGAL_LAZY_FORWARD(Return_base_tag)
-CGAL_LAZY_FORWARD(Null_vector)
-CGAL_LAZY_FORWARD(Origin)
-CGAL_LAZY_FORWARD(Orientation)
-CGAL_LAZY_FORWARD(Bbox_2)
-CGAL_LAZY_FORWARD(Bbox_3)
-
-#undef CGAL_LAZY_FORWARD
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-template <class T>
-void
-print_at(std::ostream& os, const T& at)
-{
-  os << at;
-}
-
-template <class T>
-void
-print_at(std::ostream& os, const std::vector<T>& at)
-{
-  os << "std::vector";
-}
-
-template <>
-void
-print_at(std::ostream& os, const Object& o)
-{
-  os << "Object";
-}
-
-template <class T1, class T2>
-void
-print_at(std::ostream& os, const std::pair<T1,T2> & at)
-{
-  os << "[ " << at.first << " | " << at.second << " ]" << std::endl ;
-}
-
-
-template <typename AT, typename ET, typename EFT, typename E2A>
-inline
-void
-print_dag(const Lazy<AT,ET,EFT,E2A>& l, std::ostream& os, int level = 0)
-{
-  l.print_dag(os, level);
-}
-
-inline
-void
-print_dag(double d, std::ostream& os, int level)
-{
-  for(int i = 0; i < level; i++)
-    os << "    ";
-  os << d << std::endl;
-}
-
-inline
-void
-msg(std::ostream& os, int level, const char* s)
-{
-    for(int i = 0; i < level; i++)
-      os << "    ";
-    os << s << std::endl;
-}
-
-inline
-void
-print_dag(const Null_vector&, std::ostream& os, int level)
-{
-  for(int i = 0; i < level; i++)
-    os << "    ";
-  os << "Null_vector" << std::endl;
-}
-
-inline
-void
-print_dag(const Origin&, std::ostream& os, int level)
-{
-  for(int i = 0; i < level; i++)
-    os << "    ";
-  os << "Origin" << std::endl;
-}
-
-inline
-void
-print_dag(const Return_base_tag&, std::ostream& os, int level)
-{
-  for(int i = 0; i < level; i++)
-    os << "    ";
-  os << "Return_base_tag" << std::endl;
-}
-#endif
-
-
-struct Depth_base {
-#ifdef CGAL_PROFILE
-  unsigned depth_;
-  Depth_base() { set_depth(0); }
-  unsigned depth() const { return depth_; }
-  void set_depth(unsigned i)
-  {
-    depth_ = i;
-    CGAL_HISTOGRAM_PROFILER(std::string("[Lazy_kernel DAG depths]"), i);
-                            //(unsigned) ::log2(double(i)));
-  }
-#else
-  unsigned depth() const { return 0; }
-  void set_depth(unsigned) {}
-#endif
-};
-
-
-// Abstract base class for lazy numbers and lazy objects
-template <typename AT_, typename ET, typename E2A>
-class Lazy_rep : public Rep, public Depth_base
-{
-  Lazy_rep (const Lazy_rep&); // cannot be copied.
-
-public:
-
-  typedef AT_ AT;
-
-  mutable AT at;
-  mutable ET *et;
-
-  Lazy_rep ()
-    : at(), et(NULL){}
-
-  Lazy_rep (const AT& a)
-      : at(a), et(NULL){}
-
-  Lazy_rep (const AT& a, const ET& e)
-      : at(a), et(new ET(e)) {}
-
-  const AT& approx() const
-  {
-      return at;
-  }
-
-  AT& approx()
-  {
-      return at;
-  }
-
-  const ET & exact() const
-  {
-    if (et==NULL)
-      update_exact();
-    return *et;
-  }
-
-  ET & exact()
-  {
-    if (et==NULL)
-      update_exact();
-    return *et;
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void print_at_et(std::ostream& os, int level) const
-  {
-    for(int i = 0; i < level; i++){
-      os << "    ";
-    }
-    os << "Approximation: ";
-    print_at(os, at);
-    os << std::endl;
-    if(! is_lazy()){
-      for(int i = 0; i < level; i++){
-	os << "    ";
-      }
-      os << "Exact: ";
-      print_at(os, *et);
-      os << std::endl;
-#ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
-      for(int i = 0; i < level; i++){
-	os << "    ";
-      }
-      os << "  (type: " << typeid(*et).name() << ")" << std::endl;
-#endif // CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
-    }
-  }
-
-  virtual void print_dag(std::ostream& os, int level) const {}
-#endif
-
-  bool is_lazy() const { return et == NULL; }
-  virtual void update_exact() const = 0;
-  virtual ~Lazy_rep() { delete et; }
-};
-
-
-//____________________________________________________________
-// The rep for the leaf node
-
-template <typename AT, typename ET, typename E2A>
-class Lazy_rep_0 : public Lazy_rep<AT, ET, E2A>
-{
-
-  typedef Lazy_rep<AT, ET, E2A> Base;
-public:
-
-  void
-  update_exact() const
-  {
-    this->et = new ET();
-  }
-
-  Lazy_rep_0()
-    : Lazy_rep<AT,ET, E2A>() {}
-
-  Lazy_rep_0(const AT& a, const ET& e)
-    : Lazy_rep<AT,ET,E2A>(a, e) {}
-
-  Lazy_rep_0(const AT& a, void*)
-    : Lazy_rep<AT,ET,E2A>(a) {}
-
-  Lazy_rep_0(const ET& e)
-    : Lazy_rep<AT,ET,E2A>(E2A()(e), e) {}
-
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-  }
-};
-
-// Macro helpers to build the kernel objects
-#define CGAL_TYPEMAP_AC(z, n, t) typedef typename Type_mapper< t##n, LK, AK >::type A##n;
-#define CGAL_TYPEMAP_EC(z, n, t) typedef typename Type_mapper< t##n, LK, EK >::type E##n;
-#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n )
-#define CGAL_LARGS(z, n, t) L##n const& l##n
-
-#define CGAL_TMAP(z, n, d) typename Type_mapper< L##n, d##K, LK >::type
-#define CGAL_PRUNE_TREE(z, n, d) l##n = L##n ();
-#define CGAL_LINIT(z, n, d) l##n(l##n)
-#define CGAL_LN(z, n, d) d(l##n)
-#define CGAL_MLIST(z, n, d) mutable L##n l##n;
-
-//____________________________________________________________
-
-template <typename AT, typename ET, typename AC, typename EC, typename E2A, typename L1>
-class Lazy_rep_1
-  : public Lazy_rep<AT, ET, E2A>
-  , private EC
-{
-  typedef Lazy_rep<AT, ET, E2A> Base;
-
-  mutable L1 l1_;
-
-  const EC& ec() const { return *this; }
-
-public:
-
-  void
-  update_exact() const
-  {
-    this->et = new ET(ec()(CGAL::exact(l1_)));
-    this->at = E2A()(*(this->et));
-    // Prune lazy tree
-    l1_ = L1();
-  }
-
-  Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1)
-    : Lazy_rep<AT,ET, E2A>(ac(CGAL::approx(l1))), EC(ec), l1_(l1)
-  {
-    this->set_depth(CGAL::depth(l1_) + 1);
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
-#  define CGAL_LAZY_PRINT_TYPEID CGAL::msg(os, level, typeid(AC).name());
-#else  // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
-#  define CGAL_LAZY_PRINT_TYPEID
-#endif // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    if(this->is_lazy()){
-      CGAL_LAZY_PRINT_TYPEID
-      CGAL::msg(os, level, "DAG with one child node:");
-      CGAL::print_dag(l1_, os, level+1);
-    }
-  }
-#endif
-};
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-#  define CGAL_PRINT_DAG_LN(z, n, d) \
-  CGAL::print_dag(l##n, os, level+1);
-#  define CGAL_LAZY_REP_PRINT_DAG(n)                            \
-  void print_dag(std::ostream& os, int level) const {           \
-    this->print_at_et(os, level);                               \
-    if(this->is_lazy()){                                        \
-      CGAL_LAZY_PRINT_TYPEID                                    \
-      CGAL::msg(os, level, "DAG with " #n " child nodes:");     \
-      BOOST_PP_REPEAT(n, CGAL_PRINT_DAG_LN, _)                  \
-    }                                                           \
-  }
-#else // not CGAL_LAZY_KERNEL_DEBUG
-#  define CGAL_LAZY_REP_PRINT_DAG(n)
-#endif // not CGAL_LAZY_KERNEL_DEBUG
-
-#define CGAL_LAZY_REP(z, n, d)                                               \
-  template< typename AT, typename ET, typename AC, typename EC, typename E2A, BOOST_PP_ENUM_PARAMS(n, typename L)> \
-class Lazy_rep_##n :public Lazy_rep< AT, \
-                                     ET, \
-                                     E2A >,                             \
-                    private EC                                          \
-{                                                                       \
-  BOOST_PP_REPEAT(n, CGAL_MLIST, _)                                          \
-  const EC& ec() const { return *this; } \
-public: \
-  void update_exact() const { \
-    this->et = new ET(ec()( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ) ); \
-    this->at = E2A()(*(this->et));                           \
-    BOOST_PP_REPEAT(n, CGAL_PRUNE_TREE, _) \
-  } \
-  Lazy_rep_##n(const AC& ac, const EC&, BOOST_PP_ENUM(n, CGAL_LARGS, _)) \
-    : Lazy_rep<AT, ET, E2A>(ac( BOOST_PP_ENUM(n, CGAL_LN, CGAL::approx) )), BOOST_PP_ENUM(n, CGAL_LINIT, _) \
-  { this->set_depth(max_n( BOOST_PP_ENUM(n, CGAL_LN, CGAL::depth) ) + 1); }  \
-                                                                        \
-  CGAL_LAZY_REP_PRINT_DAG(n)                                          \
-};
-
-BOOST_PP_REPEAT_FROM_TO(2, 9, CGAL_LAZY_REP, _)
-
-#undef CGAL_TMAP
-#undef CGAL_PRUNE_TREE
-#undef CGAL_LINIT
-#undef CGAL_LAZY_REP
-#undef CGAL_LN
-#undef CGAL_MLIST
-#undef CGAL_PRINT_DAG_LN
-#undef CGAL_LAZY_REP_PRINT_DAG
-#undef CGAL_LAZY_PRINT_TYPEID
-
-template < typename K1, typename K2 >
-struct Approx_converter
-{
-  typedef K1         Source_kernel;
-  typedef K2         Target_kernel;
-  //typedef Converter  Number_type_converter;
-
-  template < typename T >
-  const typename T::AT&
-  operator()(const T&t) const
-  { return t.approx(); }
-
-  const Null_vector&
-  operator()(const Null_vector& n) const
-  { return n; }
-  
-  const Bbox_2&
-  operator()(const Bbox_2& b) const
-  { return b; }
-  
-  const Bbox_3&
-  operator()(const Bbox_3& b) const
-  { return b; }
-};
-
-template < typename K1, typename K2 >
-struct Exact_converter
-{
-  typedef K1         Source_kernel;
-  typedef K2         Target_kernel;
-  //typedef Converter  Number_type_converter;
-
-  template < typename T >
-  const typename T::ET&
-  operator()(const T&t) const
-  { return t.exact(); }
-
-  const Null_vector&
-  operator()(const Null_vector& n) const
-  { return n; }
-  
-  const Bbox_2&
-  operator()(const Bbox_2& b) const
-  { return b; }
-  
-  const Bbox_3&
-  operator()(const Bbox_3& b) const
-  { return b; }
-};
-
-//____________________________________________________________
-
-
-
-template <typename AC, typename EC, typename E2A, typename L1>
-class Lazy_rep_with_vector_1
-  : public Lazy_rep<std::vector<Object>, std::vector<Object>, E2A>
-  , private EC
-{
-  typedef std::vector<Object> AT;
-  typedef std::vector<Object> ET;
-  typedef Lazy_rep<AT, ET, E2A> Base;
-
-  mutable L1 l1_;
-
-  const EC& ec() const { return *this; }
-
-public:
-
-  void
-  update_exact() const 
-  {
-// TODO : This looks really unfinished...
-    std::vector<Object> vec;
-    this->et = new ET();
-    //this->et->reserve(this->at.size());
-    ec()(CGAL::exact(l1_), std::back_inserter(*(this->et)));
-    if(this->et==NULL)
-    E2A()(*(this->et));
-    this->at = E2A()(*(this->et));
-    // Prune lazy tree
-    l1_ = L1();
-  }
-
-  Lazy_rep_with_vector_1(const AC& ac, const EC& /*ec*/, const L1& l1)
-    : l1_(l1)
-  {
-    ac(CGAL::approx(l1), std::back_inserter(this->at));
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    os << "A Lazy_rep_with_vector_1 of size " <<  this->at.size() << std::endl;
-    if(this->is_lazy()){
-      CGAL::msg(os, level, "DAG with one child node:");
-      CGAL::print_dag(l1_, os, level+1);
-
-    }
-  }
-#endif
-};
-
-
-template <typename AC, typename EC, typename E2A, typename L1, typename L2>
-class Lazy_rep_with_vector_2
-  : public Lazy_rep<std::vector<Object>, std::vector<Object>, E2A>
-  , private EC
-{
-  typedef std::vector<Object> AT;
-  typedef std::vector<Object> ET;
-  typedef Lazy_rep<AT, ET, E2A> Base;
-
-  mutable L1 l1_;
-  mutable L2 l2_;
-
-  const EC& ec() const { return *this; }
-
-public:
-
-  void
-  update_exact() const
-  {
-    this->et = new ET();
-    this->et->reserve(this->at.size());
-    ec()(CGAL::exact(l1_), CGAL::exact(l2_), std::back_inserter(*(this->et)));
-    this->at = E2A()(*(this->et));
-    // Prune lazy tree
-    l1_ = L1();
-    l2_ = L2();
-  }
-
-  Lazy_rep_with_vector_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
-    : l1_(l1), l2_(l2)
-  {
-    ac(CGAL::approx(l1), CGAL::approx(l2), std::back_inserter(this->at));
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    os << "A Lazy_rep_with_vector_2 of size " <<  this->at.size() << std::endl;
-    if(this->is_lazy()){
-      CGAL::msg(os, level, "DAG with two child nodes:");
-      CGAL::print_dag(l1_, os, level+1);
-      CGAL::print_dag(l2_, os, level+1);
-    }
-  }
-#endif
-};
-
-
-template <typename AC, typename EC, typename E2A, typename L1, typename L2, typename R1>
-class Lazy_rep_2_1
-  : public Lazy_rep<typename R1::AT, typename R1::ET, E2A>
-  , private EC
-{
-  typedef typename R1::AT AT;
-  typedef typename R1::ET ET;
-  typedef Lazy_rep<AT, ET, E2A> Base;
-
-  mutable L1 l1_;
-  mutable L2 l2_;
-
-  const EC& ec() const { return *this; }
-
-public:
-
-  void
-  update_exact() const
-  {
-    this->et = new ET();
-    ec()(CGAL::exact(l1_), CGAL::exact(l2_), *(this->et));
-    this->at = E2A()(*(this->et));
-    // Prune lazy tree
-    l1_ = L1();
-    l2_ = L2();
-  }
-
-  Lazy_rep_2_1(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
-    : Lazy_rep<AT,ET,E2A>(), l1_(l1), l2_(l2)
-  {
-    ac(CGAL::approx(l1), CGAL::approx(l2), this->at);
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    os << "A Lazy_rep_2_1" << std::endl;
-    if(this->is_lazy()){
-      CGAL::msg(os, level, "DAG with two child nodes:");
-      CGAL::print_dag(l1_, os, level+1);
-      CGAL::print_dag(l2_, os, level+1);
-    }
-  }
-#endif
-};
-
-
-//____________________________________________________________________________________
-// The following rep class stores two non-const reference parameters of type R1 and R2
-
-template <typename AC, typename EC, typename E2A, typename L1, typename L2, typename R1, typename R2>
-class Lazy_rep_2_2
-  : public Lazy_rep<std::pair<typename R1::AT,typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, E2A>
-  , private EC
-{
-  typedef std::pair<typename R1::AT, typename R2::AT> AT;
-  typedef std::pair<typename R1::ET, typename R2::ET> ET;
-  typedef Lazy_rep<AT, ET, E2A> Base;
-
-  mutable L1 l1_;
-  mutable L2 l2_;
-
-  const EC& ec() const { return *this; }
-
-public:
-
-  void
-  update_exact() const
-  {
-    this->et = new ET();
-    ec()(CGAL::exact(l1_), CGAL::exact(l2_), this->et->first, this->et->second );
-    this->at = E2A()(*(this->et));
-    // Prune lazy tree
-    l1_ = L1();
-    l2_ = L2();
-  }
-
-  Lazy_rep_2_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
-    : Lazy_rep<AT,ET,E2A>(), l1_(l1), l2_(l2)
-  {
-    ac(CGAL::approx(l1), CGAL::approx(l2), this->at.first, this->at.second);
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    os << "A Lazy_rep_2_2"  << std::endl;
-    if(this->is_lazy()){
-      CGAL::msg(os, level, "DAG with two child nodes:");
-      CGAL::print_dag(l1_, os, level+1);
-      CGAL::print_dag(l2_, os, level+1);
-    }
-  }
-#endif
-};
-
-
-//____________________________________________________________
-// The handle class
-template <typename AT_, typename ET_, typename EFT, typename E2A>
-class Lazy : public Handle
-{
-public :
-
-  typedef Lazy<AT_, ET_, EFT, E2A>  Self;
-  typedef Lazy_rep<AT_, ET_, E2A>   Self_rep;
-
-  typedef AT_ AT; // undocumented
-  typedef ET_ ET; // undocumented
-
-  typedef AT  Approximate_type;
-  typedef ET  Exact_type;
-
-/*
-  typedef Self Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-*/
-
-  Lazy()
-    : Handle(zero()) {}
-
-  // Before Lazy::zero() used Boost.Thread, the definition of Lazy() was:
-  //   Lazy()
-  //   #ifndef CGAL_HAS_THREAD
-  //     : Handle(zero()) {}
-  //   #else
-  //   {
-  //     PTR = new Lazy_rep_0<AT, ET, E2A>();
-  //   }
-  //   #endif
-
-  Lazy(Self_rep *r)
-  {
-    PTR = r;
-  }
-
-  Lazy(const ET& e)
-  {
-    PTR = new Lazy_rep_0<AT,ET,E2A>(e);
-  }
-
-  const AT& approx() const
-  { return ptr()->approx(); }
-
-  const ET& exact() const
-  { return ptr()->exact(); }
-
-  AT& approx()
-  { return ptr()->approx(); }
-
-  ET& exact()
-  { return ptr()->exact(); }
-
-  unsigned depth() const
-  {
-    return ptr()->depth();
-  }
-
-  void print_dag(std::ostream& os, int level) const
-  {
-    ptr()->print_dag(os, level);
-  }
-
-private:
-
-  // We have a static variable for optimizing the default constructor,
-  // which is in particular heavily used for pruning DAGs.
-  static const Self & zero()
-  {
-#ifdef CGAL_HAS_THREADS
-    static boost::thread_specific_ptr<Self> z;
-    if (z.get() == NULL) {
-        z.reset(new Self(new Lazy_rep_0<AT, ET, E2A>()));
-    }
-    return * z.get();
-#else
-    static const Self z = new Lazy_rep_0<AT, ET, E2A>();
-    return z;
-#endif
-  }
-
-  Self_rep * ptr() const { return (Self_rep*) PTR; }
-};
-
-// The magic functor for Construct_bbox_[2,3], as there is no Lazy<Bbox>
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_construction_bbox
-{
-  static const bool Protection = true;
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename AC::result_type result_type;
-
-  AC ac;
-  EC ec;
-
-  template <typename L1>
-  result_type operator()(const L1& l1) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
-    Protect_FPU_rounding<Protection> P;
-    try {
-      return ac(CGAL::approx(l1));
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      return ec(CGAL::exact(l1));
-    }
-  }
-};
-
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_construction_nt {
-
-  static const bool Protection = true;
-
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename LK::E2A E2A;
-
-  AC ac;
-  EC ec;
-
-  template<typename>
-  struct result { };
-
-#define CGAL_RESULT_NT(z, n, d)                                              \
-  template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) >              \
-  struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> {                      \
-    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, T)                                   \
-    typedef Lazy_exact_nt<                                              \
-      typename boost::remove_cv< typename boost::remove_reference <     \
-      typename cpp11::result_of<EC( BOOST_PP_ENUM_PARAMS(n, E) )>::type >::type >::type > type; \
-  };
-
-  BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_RESULT_NT, _)
-
-#define CGAL_NT_OPERATOR(z, n, d)                                            \
-  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
-  typename cpp11::result_of<Lazy_construction_nt(BOOST_PP_ENUM_PARAMS(n, L))>::type \
-  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const {                      \
-    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L)                                     \
-    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L)                                     \
-    typedef typename boost::remove_cv< typename boost::remove_reference < \
-                                        typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
-    typedef typename boost::remove_cv< typename boost::remove_reference < \
-                                        typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
-    Protect_FPU_rounding<Protection> P;                                 \
-    try {                                                               \
-      return new Lazy_rep_##n<AT, ET, AC, EC, To_interval<ET>, BOOST_PP_ENUM_PARAMS(n, L) >(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)); \
-    } catch (Uncertain_conversion_exception) {                          \
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
-      return new Lazy_rep_0<AT,ET,To_interval<ET> >(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) )); \
-    }                                                                   \
-  }                                                                     \
-
-  BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_NT_OPERATOR, _)
-
-#undef INTERVAL_OPERATOR
-#undef CGAL_RESULT_NT
-};
-
-
-template <typename LK>
-Object
-make_lazy(const Object& eto)
-{
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename LK::E2A E2A;
-
-  if (eto.is_empty())
-    return Object();
-
-#define CGAL_Kernel_obj(X) \
-  if (const typename EK::X* ptr = object_cast<typename EK::X>(&eto)) \
-    return make_object(typename LK::X(new Lazy_rep_0<typename AK::X, typename EK::X, E2A>(*ptr)));
-
-#include <CGAL/Kernel/interface_macros.h>
-
-//now handle vector
-#define CGAL_Kernel_obj(X) \
-      {  \
-        const std::vector<typename EK::X>* v_ptr;\
-        if ( (v_ptr = object_cast<std::vector<typename EK::X> >(&eto)) ) { \
-          std::vector<typename LK::X> V;\
-          V.resize(v_ptr->size());                           \
-          for (unsigned int i = 0; i < v_ptr->size(); ++i)                \
-            V[i] = typename LK::X( new Lazy_rep_0<typename AK::X,typename EK::X,E2A>((*v_ptr)[i])); \
-          return make_object(V);                                      \
-        }\
-      }
-
-CGAL_Kernel_obj(Point_2)
-CGAL_Kernel_obj(Point_3)  
-#undef CGAL_Kernel_obj
-
-  
-  std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#2)" << std::endl;
-  std::cerr << "dynamic type of the Object : " << eto.type().name() << std::endl;
-
-  return Object();
-}
-
-
-// This functor selects the i'th element in a vector of Object's
-// and casts it to what is in the Object
-
-template <typename T2>
-struct Ith {
-  typedef T2 result_type;
-
-  // We keep a Sign member object
-  // for future utilisation, in case
-  // we have pairs of 2 T2 objects e.g.
-  // for a numeric_point vector returned
-  // from a construction of a possible
-  // lazy algebraic kernel
-
-  int i;
-  Sign sgn;
-
-  Ith(int i_)
-    : i(i_)
-  {sgn=NEGATIVE;}
-
-  Ith(int i_, bool b_)
-    : i(i_)
-  { sgn= (b_) ? POSITIVE : ZERO;}
-
-  const T2&
-  operator()(const std::vector<Object>& v) const
-  {
-    if(sgn==NEGATIVE)
-    return *object_cast<T2>(&v[i]);
-
-    typedef std::pair<T2,unsigned int >         Pair_type_1;
-    typedef std::pair<T2,std::pair<bool,bool> > Pair_type_2;
-
-    if(const Pair_type_1 *p1 = object_cast<Pair_type_1>(&v[i]))
-    	return p1->first;
-    else if(const Pair_type_2 *p2 = object_cast<Pair_type_2>(&v[i]))
-        return p2->first;
-
-    CGAL_error_msg( " Unexpected encapsulated type ");
-  }
-};
-
-// This functor selects the i'th element in a vector of T2's
-template <typename T2>
-struct Ith_for_intersection {
-  typedef T2 result_type;
-  int i;
-
-  Ith_for_intersection(int i_)
-    : i(i_)
-  {}
-
-  const T2&
-  operator()(const Object& o) const
-  {
-    const std::vector<T2>* ptr = object_cast<std::vector<T2> >(&o);
-    return (*ptr)[i];
-  }
-};
-
-// This functor selects the i'th element in a vector of T2's
-template <typename T2>
-struct Ith_for_intersection_with_variant {
-  typedef T2 result_type;
-  int i;
-
-  Ith_for_intersection_with_variant(int i_)
-    : i(i_)
-  {}
-
-  template< BOOST_VARIANT_ENUM_PARAMS(typename U) >
-  const T2&
-  operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const
-  {
-    const std::vector<T2>* ptr = (boost::get<std::vector<T2> >(&(*o)));
-    return (*ptr)[i];
-  }
-
-  template< BOOST_VARIANT_ENUM_PARAMS(typename U) >
-  const T2&
-  operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >& o) const
-  {
-    const std::vector<T2>* ptr = (boost::get<std::vector<T2> >(&o));
-    return (*ptr)[i];
-  }
-};
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_cartesian_const_iterator_2
-{
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename LK::Cartesian_const_iterator_2 result_type;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  template < typename L1>
-  result_type
-  operator()(const L1& l1) const
-  {
-    return result_type(&l1);
-  }
-
-  template < typename L1>
-  result_type
-  operator()(const L1& l1, int) const
-  {
-    return result_type(&l1,2);
-  }
-
-};
-
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_cartesian_const_iterator_3
-{
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename LK::Cartesian_const_iterator_3 result_type;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  template < typename L1>
-  result_type
-  operator()(const L1& l1) const
-  {
-    return result_type(&l1);
-  }
-
-  template < typename L1>
-  result_type
-  operator()(const L1& l1, int) const
-  {
-    return result_type(&l1,3);
-  }
-
-};
-
-
-// This is the magic functor for functors that write their result in a  reference argument
-// In a first version we assume that the references are of type Lazy<Something>,
-// and that the result type is void
-
-template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
-struct Lazy_functor_2_1
-{
-  static const bool Protection = true;
-  typedef void result_type;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  template <typename L1, typename L2, typename R1>
-  void
-  operator()(const L1& l1, const L2& l2, R1& r1) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      // we suppose that R1 is a Lazy<Something>
-      r1 = R1(new Lazy_rep_2_1<AC, EC, E2A, L1, L2, R1>(ac, ec, l1, l2));
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      typename R1::ET et;
-      ec(CGAL::exact(l1), CGAL::exact(l2), et);
-      r1 = R1(new Lazy_rep_0<typename R1::AT,typename R1::ET,E2A>(et));
-    }
-  }
-};
-
-
-template <typename T>
-struct First
-{
-   typedef typename T::first_type result_type;
-
-   const typename T::first_type&
-   operator()(const T& p) const
-   {
-     return p.first;
-   }
- };
-
-template <typename T>
-struct Second
-{
-  typedef typename T::second_type result_type;
-
-  const typename T::second_type&
-  operator()(const T& p) const
-  {
-    return p.second;
-  }
-};
-
-// This is the magic functor for functors that write their result in a reference argument
-// In a first version we assume that the references are of type Lazy<Something>,
-// and that the result type is void
-
-//template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
-template <typename LK, typename AC, typename EC>
-struct Lazy_functor_2_2
-{
-  static const bool Protection = true;
-
-  typedef void result_type;
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename EK::FT EFT;
-  typedef typename LK::E2A E2A;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  template <typename L1, typename L2, typename R1, typename R2>
-  void
-  operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const
-  {
-    typedef Lazy<typename R1::AT, typename R1::ET, EFT, E2A> Handle_1;
-    typedef Lazy<typename R2::AT, typename R2::ET, EFT, E2A> Handle_2;
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      typedef Lazy<std::pair<typename R1::AT, typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, EFT, E2A> Lazy_pair;
-      Lazy_pair lv(new Lazy_rep_2_2<AC, EC, E2A, L1, L2, R1, R2>(ac, ec, l1, l2));
-      // lv->approx() is a std::pair<R1::AT, R2::AT>;
-      r1 = R1(Handle_1(new Lazy_rep_1<void, void, First<std::pair<typename R1::AT, typename R2::AT> >, First<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(First<std::pair<typename R1::AT, typename R2::AT> >(), First<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
-      r2 = R2(Handle_2(new Lazy_rep_1<void, void, Second<std::pair<typename R1::AT, typename R2::AT> >, Second<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(Second<std::pair<typename R1::AT, typename R2::AT> >(), Second<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      typename R1::ET et1, et2;
-      ec(CGAL::exact(l1), CGAL::exact(l2), et1, et2);
-      r1 = R1(Handle_1(new Lazy_rep_0<typename R1::AT,typename R1::ET,E2A>(et1)));
-      r2 = R2(Handle_2(new Lazy_rep_0<typename R2::AT,typename R2::ET,E2A>(et2)));
-    }
-  }
-};
-
-
-// This is the magic functor for functors that write their result as Objects into an output iterator
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_intersect_with_iterators
-{
-  static const bool Protection = true;
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename EK::FT EFT;
-  typedef typename LK::E2A E2A;
-  typedef void result_type;
-  typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
-  typedef Lazy<std::vector<Object>, std::vector<Object>, EFT, E2A> Lazy_vector;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  // In the example we intersect two Lazy<Segment>s
-  // and write into a back_inserter(list<Object([Lazy<Point>,Lazy<Segment>]) >)
-  template <typename L1, typename L2, typename OutputIterator>
-  OutputIterator
-  operator()(const L1& l1, const L2& l2, OutputIterator it) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      Lazy_vector lv(new Lazy_rep_with_vector_2<AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
-      // lv.approx() is a std::vector<Object([AK::Point_2,AK::Segment_2])>
-      // that is, when we get here we have constructed all approximate results
-      for (unsigned int i = 0; i < lv.approx().size(); i++) {
-// FIXME : I'm not sure how this work...
-#define CGAL_Kernel_obj(X) if (object_cast<typename AK::X>(& (lv.approx()[i]))) { \
-	  *it++ = make_object(typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith<typename AK::X>, \
-                                                                      Ith<typename EK::X>, E2A, Lazy_vector> \
-                                                 (Ith<typename AK::X>(i), Ith<typename EK::X>(i), lv))); \
-          continue; \
-	}
-
-#include <CGAL/Kernel/interface_macros.h>
-
-        std::cerr << "we need  more casts" << std::endl;
-      }
-
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      // TODO: Instead of using a vector, write an iterator adapter
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      std::vector<Object> exact_objects;
-      ec(CGAL::exact(l1), CGAL::exact(l2), std::back_inserter(exact_objects));
-      for (std::vector<Object>::const_iterator oit = exact_objects.begin();
-	   oit != exact_objects.end();
-	   ++oit){
-	*it++ = make_lazy<LK>(*oit);
-      }
-    }
-    return it;
-  }
-};
-
-
-template <typename T>
-struct Object_cast
-{
-  typedef T result_type;
-
-  const T&
-  operator()(const Object& o) const
-  {
-    return *object_cast<T>(&o);
-  }
-};
-
-// The following functor returns an Object with a Lazy<Something> inside
-// As the nested kernels return Objects of AK::Something and EK::Something
-// we have to unwrap them from the Object, and wrap them in a Lazy<Something>
-//
-// TODO: write operators for other than two arguments. For the current kernel we only need two for Intersect_2
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_construction_object
-{
-  static const bool Protection = true;
-
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename EK::FT EFT;
-  typedef typename LK::E2A E2A;
-  typedef typename AC::result_type AT;
-  typedef typename EC::result_type ET;
-  typedef Object result_type;
-
-  typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
-
-  AC ac;
-  EC ec;
-
-public:
-
-  template <typename L1>
-  result_type
-  operator()(const L1& l1) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      Lazy_object lo(new Lazy_rep_1<result_type, result_type, AC, EC, E2A, L1>(ac, ec, l1));
-
-      if(lo.approx().is_empty())
-        return Object();
-
-#define CGAL_Kernel_obj(X) \
-      if (object_cast<typename AK::X>(& (lo.approx()))) { \
-	typedef Lazy_rep_1< typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
-	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
-	return make_object(typename LK::X(lcr)); \
-      }
-
-#include <CGAL/Kernel/interface_macros.h>
-
-      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
-      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
-
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      ET eto = ec(CGAL::exact(l1));
-      return make_lazy<LK>(eto);
-    }
-    return Object();
-  }
-
-  template <typename L1, typename L2>
-  result_type
-  operator()(const L1& l1, const L2& l2) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      Lazy_object lo(new Lazy_rep_2<result_type, result_type, AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
-
-      if(lo.approx().is_empty())
-        return Object();
-
-#define CGAL_Kernel_obj(X) \
-      if (object_cast<typename AK::X>(& (lo.approx()))) { \
-	typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
-	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
-	return make_object(typename LK::X(lcr)); \
-      }
-
-#include <CGAL/Kernel/interface_macros.h>
-
-    // We now check vector<X>
-  
-#define CGAL_Kernel_obj(X) \
-      {  \
-        const std::vector<typename AK::X>* v_ptr;\
-        if ( (v_ptr = object_cast<std::vector<typename AK::X> >(& (lo.approx()))) ) { \
-          std::vector<typename LK::X> V;\
-          V.resize(v_ptr->size());                           \
-          for (unsigned int i = 0; i < v_ptr->size(); i++) {               \
-            V[i] = typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith_for_intersection<typename AK::X>, \
-                                                 Ith_for_intersection<typename EK::X>, E2A, Lazy_object> \
-                                  (Ith_for_intersection<typename AK::X>(i), Ith_for_intersection<typename EK::X>(i), lo)); \
-          }                                                           \
-          return make_object(V);                                      \
-        }\
-      }
-
-CGAL_Kernel_obj(Point_2)
-CGAL_Kernel_obj(Point_3)  
-#undef CGAL_Kernel_obj
-
-      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
-      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
-
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      ET eto = ec(CGAL::exact(l1), CGAL::exact(l2));
-      return make_lazy<LK>(eto);
-    }
-    return Object();
-  }
-
-  template <typename L1, typename L2, typename L3>
-  result_type
-  operator()(const L1& l1, const L2& l2, const L3& l3) const
-  {
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      Lazy_object lo(new Lazy_rep_3<result_type, result_type, AC, EC, E2A, L1, L2, L3>(ac, ec, l1, l2, l3));
-
-      if(lo.approx().is_empty())
-        return Object();
-
-#define CGAL_Kernel_obj(X) \
-      if (object_cast<typename AK::X>(& (lo.approx()))) { \
-	typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
-	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
-	return make_object(typename LK::X(lcr)); \
-      }
-
-#include <CGAL/Kernel/interface_macros.h>
-
-      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
-      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
-
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-      ET eto = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3));
-      return make_lazy<LK>(eto);
-    }
-    return Object();
-  }
-
-};
-
-
-
-//____________________________________________________________
-// The magic functor that has Lazy<Something> as result type.
-// Two versions are distinguished: one that needs to fiddle 
-// with result_of and another that can forward the result types.
-
-namespace internal {
-BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
-
-// lift boost::get into a functor with a result_type member name and
-// extend it to operate on optionals
-
-// TODO there is a mismatch between the result_type typedef and the
-// actual return type of operator()
-template<typename T>
-struct Variant_cast {
-  typedef T result_type;
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename U)>
-  const T&
-  operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const {
-    // can throw but should never because we always build it inside
-    // a static visitor with the right type
-    return boost::get<T>(*o);
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename U)>
-  T&
-  operator()(boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const {
-    // can throw but should never because we always build it inside
-    // a static visitor with the right type, if it throws bad_get 
-    return boost::get<T>(*o);
-  }
-};
-
-
-template<typename Result, typename AK, typename LK, typename EK, typename Origin>
-struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> {
-  Fill_lazy_variant_visitor_2(Result& r, Origin& o) : r(&r), o(&o) {}
-  Result* r;
-  Origin* o;
-    
-  template<typename T>
-  void operator()(const T&) {
-    // the equivalent type we are currently matching in the lazy kernel
-    typedef T AKT;
-    typedef typename Type_mapper<AKT, AK, EK>::type EKT;
-    typedef typename Type_mapper<AKT, AK, LK>::type LKT;
-
-    typedef Lazy_rep_1<AKT, EKT, Variant_cast<AKT>, Variant_cast<EKT>, typename LK::E2A, Origin> Lcr;
-    Lcr * lcr = new Lcr(Variant_cast<AKT>(), Variant_cast<EKT>(), *o);
-      
-    *r = LKT(lcr);
-  }
-    
-  template<typename T>
-  void operator()(const std::vector<T>& t) {
-    typedef T AKT;
-    typedef typename Type_mapper<AKT, AK, EK>::type EKT;
-    typedef typename Type_mapper<AKT, AK, LK>::type LKT; 
-
-    std::vector<LKT> V;
-    V.resize(t.size()); 
-    for (unsigned int i = 0; i < t.size(); i++) {
-      V[i] = LKT(new Lazy_rep_1<AKT, EKT, Ith_for_intersection<AKT>,
-                 Ith_for_intersection<EKT>, typename LK::E2A, Origin>
-                 (Ith_for_intersection<AKT>(i), Ith_for_intersection<EKT>(i), *o));
-    }
-      
-    *r = V;
-  }
-};
-
-template<typename Result, typename AK, typename LK, typename EK>
-struct Fill_lazy_variant_visitor_0 : boost::static_visitor<> {
-  Fill_lazy_variant_visitor_0(Result& r) : r(&r) {}
-  Result* r;
-    
-  template<typename T>
-  void operator()(const T& t) {
-    // the equivalent type we are currently matching in the lazy kernel
-    typedef T EKT;
-    typedef typename Type_mapper<EKT, EK, AK>::type AKT;
-    typedef typename Type_mapper<EKT, EK, LK>::type LKT;
-      
-    *r = LKT(new Lazy_rep_0<AKT, EKT, typename LK::E2A>(t));
-  }
-
-  template<typename T>
-  void operator()(const std::vector<T>& t) {
-    typedef T EKT;
-    typedef typename Type_mapper<EKT, EK, AK>::type AKT;
-    typedef typename Type_mapper<EKT, EK, LK>::type LKT;
-
-    std::vector<LKT> V;
-    V.resize(t.size()); 
-    for (unsigned int i = 0; i < t.size(); i++) {
-      V[i] = LKT(new Lazy_rep_0<AKT, EKT, typename LK::E2A>(t[i]));
-    }
-      
-    *r = V;
-  }
-};
-
-} // internal
-
-template <typename LK, typename AC, typename EC>
-struct Lazy_construction_variant {
-  static const bool Protection = true;
-
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename EK::FT EFT;
-  typedef typename LK::E2A E2A;
-
-
-  template<typename>
-  struct result {
-    // this does not default, if you want to make a lazy lazy-kernel,
-    // you are on your own
-  };
-
-  #define CGAL_RESULT(z, n, d) \
-    template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) >            \
-    struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> {                    \
-      BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T)                            \
-      typedef typename Type_mapper<                                     \
-        typename cpp11::result_of<AC( BOOST_PP_ENUM_PARAMS(n, A) )>::type, AK, LK>::type type; \
-    };
-
-  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
-
-  template <typename L1, typename L2>
-  typename result<Lazy_construction_variant(L1, L2)>::type
-  operator()(const L1& l1, const L2& l2) const {
-    typedef typename cpp11::result_of<Lazy_construction_variant(L1, L2)>::type result_type;
-    
-    typedef typename cpp11::result_of<AC(typename Type_mapper<L1, LK, AK>::type, 
-                                         typename Type_mapper<L2, LK, AK>::type)>::type AT;
-    typedef typename cpp11::result_of<EC(typename Type_mapper<L1, LK, EK>::type, 
-                                         typename Type_mapper<L2, LK, EK>::type)>::type ET;
-    
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-
-    try {
-      Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_2<AT, ET, AC, EC, E2A, L1, L2>(AC(), EC(), l1, l2));
-
-      // the approximate result requires the trait with types from the AK 
-      AT approx_v = lazy.approx();
-      // the result we build
-      result_type res;
-
-      if(!approx_v) {
-        // empty
-        return res;
-      }
-
-      // the static visitor fills the result_type with the correct unwrapped type
-      internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
-      boost::apply_visitor(visitor, *approx_v);
-      
-      return res;
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-
-      ET exact_v = EC()(CGAL::exact(l1), CGAL::exact(l2));
-      result_type res;
-
-      if(!exact_v) {
-        return res;
-      }
-
-      internal::Fill_lazy_variant_visitor_0<result_type, AK, LK, EK> visitor(res);
-      boost::apply_visitor(visitor, *exact_v);
-      return res;
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  typename result<Lazy_construction_variant(L1, L2, L3)>::type
-  operator()(const L1& l1, const L2& l2, const L3& l3) const {
-    typedef typename result<Lazy_construction_variant(L1, L2, L3)>::type result_type;
-    
-    typedef typename cpp11::result_of<AC(typename Type_mapper<L1, LK, AK>::type, 
-                                         typename Type_mapper<L2, LK, AK>::type,
-                                         typename Type_mapper<L3, LK, AK>::type)>::type AT;
-    typedef typename cpp11::result_of<EC(typename Type_mapper<L1, LK, EK>::type, 
-                                         typename Type_mapper<L2, LK, EK>::type,
-                                         typename Type_mapper<L3, LK, EK>::type)>::type ET;
-
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-    Protect_FPU_rounding<Protection> P;
-    try {
-      Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_3<AT, ET, AC, EC, E2A, L1, L2, L3>(AC(), EC(), l1, l2, l3));
-
-      // the approximate result requires the trait with types from the AK 
-      AT approx_v = lazy.approx();
-      // the result we build
-      result_type res;
-
-      if(!approx_v) {
-        // empty
-        return res;
-      }
-
-      // the static visitor fills the result_type with the correct unwrapped type
-      internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
-      boost::apply_visitor(visitor, *approx_v);
-      
-      return res;
-    } catch (Uncertain_conversion_exception) {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
-
-      ET exact_v = EC()(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3));
-      result_type res;
-
-      if(!exact_v) {
-        return res;
-      }
-
-      internal::Fill_lazy_variant_visitor_0< result_type, AK, LK, EK> visitor(res);
-      boost::apply_visitor(visitor, *exact_v);
-      return res;
-    }
-  }
-};
-
-template<typename LK, typename AC, typename EC, typename E2A = Default, 
-         bool has_result_type = internal::has_result_type<AC>::value && internal::has_result_type<EC>::value >
-struct Lazy_construction;
-
-
-// we have a result type, low effort
-template<typename LK, typename AC, typename EC, typename E2A_>
-struct Lazy_construction<LK, AC, EC, E2A_, true> {
-  static const bool Protection = true;
-
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename boost::remove_cv< 
-    typename boost::remove_reference < typename AC::result_type >::type >::type AT;
-  typedef typename boost::remove_cv< 
-    typename boost::remove_reference < typename EC::result_type >::type >::type  ET;
-
-  typedef typename EK::FT EFT;
-  typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
-  
-  typedef typename Type_mapper<AT, AK, LK>::type result_type;
-
-  AC ac;
-  EC ec;
-
-#define CGAL_CONSTRUCTION_OPERATOR(z, n, d  )                           \
-  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
-  result_type                                                           \
-  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const {                 \
-    typedef Lazy< AT, ET, EFT, E2A> Handle;                             \
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
-    Protect_FPU_rounding<Protection> P;                                 \
-    try {                                                               \
-      return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
-    } catch (Uncertain_conversion_exception) {                          \
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
-      return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
-    }                                                                   \
-  }        
-
-  // arity 1-8 
-  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
-
-  // nullary
-  result_type
-  operator()() const
-  {
-    typedef Lazy<AT, ET, EFT, E2A> Handle;
-    return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
-  }
-
-#undef CGAL_CONSTRUCTION_OPERATOR
-  
-};
-
-
-template <typename LK, typename AC, typename EC, typename E2A_>
-struct Lazy_construction<LK, AC, EC, E2A_, false>
-{
-  static const bool Protection = true;
-
-  typedef typename LK::Approximate_kernel AK;
-  typedef typename LK::Exact_kernel EK;
-  typedef typename EK::FT EFT;
-  typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
-
-  template<typename>
-  struct result {
-    // this does not default, if you want to make a lazy lazy-kernel,
-    // you are on your own
-  };
-
-  AC ac;
-  EC ec;
-
-  // acquire the result_type of the approximate kernel, map it back to the lazy kernel object
-#define CGAL_RESULT(z, n, d) \
-template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) > \
-struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
-  BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T)                                     \
-  typedef typename Type_mapper< typename cpp11::result_of<AC( BOOST_PP_ENUM_PARAMS(n, A) )>::type, AK, LK>::type type; \
-};
-
-  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
-
-#define CGAL_CONSTRUCTION_OPERATOR(z, n, d)                                      \
-  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
-  typename cpp11::result_of<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type \
-  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) {                            \
-    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L)                                     \
-    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L)                                     \
-    typedef typename boost::remove_cv< typename boost::remove_reference < \
-                                        typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
-    typedef typename boost::remove_cv< typename boost::remove_reference < \
-                                        typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
-    typedef Lazy< AT, ET, EFT, E2A> Handle; \
-    typedef typename cpp11::result_of<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type result_type; \
-    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
-    Protect_FPU_rounding<Protection> P;                                   \
-    try {                                                                 \
-      return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
-    } catch (Uncertain_conversion_exception) {                          \
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
-      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
-      return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
-    }                                                                   \
-  }        
-
-  // arity 1-8 
-  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
-
-  // nullary
-  typename Type_mapper< typename cpp11::result_of<AC()>::type ,AK, LK>::type
-  operator()() const
-  {
-    typedef typename cpp11::result_of<AC()>::type AT;
-    typedef typename cpp11::result_of<EC()>::type ET;
-    typedef Lazy<AT, ET, EFT, E2A> Handle;
-    typedef typename Type_mapper< typename cpp11::result_of<AC()>::type ,AK, LK>::type result_type;
-
-    return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
-  }
-};
-
-} //namespace CGAL
-
-#undef CGAL_TYPEMAP_AC
-#undef CGAL_TYPEMAP_EC
-#undef CGAL_LEXACT
-#undef CGAL_LARGS
-
-
-#endif // CGAL_LAZY_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Lazy_exact_nt.h b/3rdparty/CGAL-4.6/include/CGAL/Lazy_exact_nt.h
deleted file mode 100644
index 32346b0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Lazy_exact_nt.h
+++ /dev/null
@@ -1,1444 +0,0 @@
-// Copyright (c) 1999-2007  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_LAZY_EXACT_NT_H
-#define CGAL_LAZY_EXACT_NT_H
-
-#define CGAL_int(T)    typename First_if_different<int,    T>::Type
-#define CGAL_double(T) typename First_if_different<double, T>::Type
-#define CGAL_To_interval(T) To_interval<T>
-
-
-#include <CGAL/number_type_basic.h>
-#include <CGAL/assertions.h>
-
-#include <boost/iterator/transform_iterator.hpp> // for Root_of functor
-#include <boost/operators.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/logical.hpp>
-
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Handle.h>
-#include <CGAL/NT_converter.h>
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/Lazy.h>
-
-#include <CGAL/Sqrt_extension_fwd.h>
-#include <CGAL/Kernel/mpl.h>
-
-/*
- * This file contains the definition of the number type Lazy_exact_nt<ET>,
- * where ET is an exact number type (must provide the exact operations needed).
- *
- * Lazy_exact_nt<ET> provides a DAG-based lazy evaluation, like LEDA's real,
- * Core's Expr, LEA's lazy rationals...
- *
- * The values are first approximated using Interval_base.
- * The exactness is provided when needed by ET.
- *
- * Lazy_exact_nt<ET> is just a handle to the abstract base class
- * Lazy_exact_nt_rep which has pure virtual methods .approx() and .exact().
- * From this class derives one class per operation, with one constructor.
- *
- * The DAG is managed by :
- * - Handle and Rep.
- * - virtual functions to denote the various operators (instead of an enum).
- *
- * Other packages with vaguely similar design : APU, MetaCGAL, LOOK.
- */
-
-/*
- * TODO :
- * - Generalize it for constructions at the kernel level.
- * - Add mixed operations with ET too ?
- * - Interval refinement functionnality ?
- * - Separate the handle and the representation(s) in 2 files (?)
- *   maybe not a good idea, better if everything related to one operation is
- *   close together.
- * - Add a CT template parameter ?
- * - Add a string constant to provide an expression string (a la MetaCGAL) ?
- *   // virtual ostream operator<<() const = 0; // or string, like Core ?
- * - Have a template-expression (?) thing that evaluates a temporary element,
- *   and allocates stuff in memory only when really needs to convert to the
- *   NT.  (cf gmp++, and maybe other things, Blitz++, Synaps...)
- */
-
-/*
- * Interface of the rep classes:
- * - .approx()      returns Interval_nt<> (assumes rounding=nearest).
- *                  [ only called from the handle, and declared in the base ]
- * - .exact()       returns ET, if not already done, computes recursively
- *
- * - .rafine_approx()   ??
- */
-
-namespace CGAL {
-
-template <class NT> class Lazy_exact_nt;
-
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-template <typename ET>
-inline
-void
-print_dag(const Lazy_exact_nt<ET>& l, std::ostream& os, int level=0)
-{
-  l.print_dag(os, level);
-}
-#endif
-
-// Abstract base representation class for lazy numbers
-template <typename ET>
-struct Lazy_exact_nt_rep : public Lazy_exact_nt<ET>::Self_rep
-{
-  typedef typename Lazy_exact_nt<ET>::Self_rep  Base;
-
-  Lazy_exact_nt_rep (const Interval_nt<false> & i)
-      : Base(i) {}
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-  }
-#endif
-};
-
-// int constant
-template <typename ET>
-struct Lazy_exact_Int_Cst : public Lazy_exact_nt_rep<ET>
-{
-  Lazy_exact_Int_Cst (int i)
-      : Lazy_exact_nt_rep<ET>(double(i)) {}
-
-  void update_exact() const { this->et = new ET((int)this->approx().inf()); }
-};
-
-// double constant
-template <typename ET, typename X>
-struct Lazy_exact_Cst : public Lazy_exact_nt_rep<ET>
-{
-  Lazy_exact_Cst (X x)
-      : Lazy_exact_nt_rep<ET>(x), cste(x) {}
-
-  void update_exact() const { this->et = new ET(cste); }
-
-  private:
-  X cste;
-};
-
-// Exact constant
-template <typename ET>
-struct Lazy_exact_Ex_Cst : public Lazy_exact_nt_rep<ET>
-{
-  Lazy_exact_Ex_Cst (const ET & e)
-      : Lazy_exact_nt_rep<ET>(CGAL_NTS to_interval(e))
-  {
-    this->et = new ET(e);
-  }
-
-  void update_exact() const { CGAL_error(); }
-};
-
-// Construction from a Lazy_exact_nt<ET1> (which keeps the lazyness).
-template <typename ET, typename ET1>
-class Lazy_lazy_exact_Cst : public Lazy_exact_nt_rep<ET>
-{
-  mutable Lazy_exact_nt<ET1> l;
-
-public:
-
-  Lazy_lazy_exact_Cst (const Lazy_exact_nt<ET1> &x)
-      : Lazy_exact_nt_rep<ET>(x.approx()), l(x)
-  {
-    this->set_depth(l.depth() + 1);
-  }
-
-  void update_exact() const
-  {
-    this->et = new ET(l.exact());
-    this->at = l.approx();
-    prune_dag();
-  }
-
-  void prune_dag() const { l = Lazy_exact_nt<ET1>(); }
-};
-
-
-// Unary  operations: abs, sqrt, square.
-// Binary operations: +, -, *, /, min, max.
-
-// Base unary operation
-template <typename ET>
-struct Lazy_exact_unary : public Lazy_exact_nt_rep<ET>
-{
-  mutable Lazy_exact_nt<ET> op1;
-
-  Lazy_exact_unary (const Interval_nt<false> &i, const Lazy_exact_nt<ET> &a)
-      : Lazy_exact_nt_rep<ET>(i), op1(a)
-  {
-    this->set_depth(op1.depth() + 1);
-  }
-
-  void prune_dag() const { op1 = Lazy_exact_nt<ET>(); }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    if(this->is_lazy()){
-      msg(os, level, "Unary number operator:");
-      CGAL::print_dag(op1, os, level+1);
-    }
-  }
-#endif
-};
-
-// Base binary operation
-template <typename ET, typename ET1 = ET, typename ET2 = ET>
-struct Lazy_exact_binary : public Lazy_exact_nt_rep<ET>
-{
-  mutable Lazy_exact_nt<ET1> op1;
-  mutable Lazy_exact_nt<ET2> op2;
-
-  Lazy_exact_binary (const Interval_nt<false> &i,
-		     const Lazy_exact_nt<ET1> &a, const Lazy_exact_nt<ET2> &b)
-      : Lazy_exact_nt_rep<ET>(i), op1(a), op2(b)
-  {
-    this->set_depth((std::max)(op1.depth(), op2.depth()) + 1);
-  }
-
-  void prune_dag() const
-  {
-    op1 = Lazy_exact_nt<ET1>();
-    op2 = Lazy_exact_nt<ET2>();
-  }
-
-#ifdef CGAL_LAZY_KERNEL_DEBUG
-  void
-  print_dag(std::ostream& os, int level) const
-  {
-    this->print_at_et(os, level);
-    if(this->is_lazy()){
-      msg(os, level, "Binary number operator:");
-      CGAL::print_dag(op1, os, level+1);
-      CGAL::print_dag(op2, os, level+1);
-    }
-  }
-#endif
-};
-
-// Here we could use a template class for all operations (STL provides
-// function objects plus, minus, multiplies, divides...).  But it would require
-// a template template parameter, and GCC 2.95 seems to crash easily with them.
-
-// Macro for unary operations
-#define CGAL_LAZY_UNARY_OP(OP, NAME)                                     \
-template <typename ET>                                                   \
-struct NAME : public Lazy_exact_unary<ET>                                \
-{                                                                        \
-  typedef typename Lazy_exact_unary<ET>::AT::Protector P;                \
-  NAME (const Lazy_exact_nt<ET> &a)                                      \
-      : Lazy_exact_unary<ET>((P(), OP(a.approx())), a) {}                \
-                                                                         \
-  void update_exact() const                                              \
-  {                                                                      \
-    this->et = new ET(OP(this->op1.exact()));                            \
-    if (!this->approx().is_point())                                      \
-      this->at = CGAL_NTS to_interval(*(this->et));                      \
-    this->prune_dag();                                                   \
-   }                                                                     \
-};
-
-CGAL_LAZY_UNARY_OP(opposite,  Lazy_exact_Opp)
-CGAL_LAZY_UNARY_OP(CGAL_NTS abs,    Lazy_exact_Abs)
-CGAL_LAZY_UNARY_OP(CGAL_NTS square, Lazy_exact_Square)
-CGAL_LAZY_UNARY_OP(CGAL_NTS sqrt,   Lazy_exact_Sqrt)
-
-// A macro for +, -, * and /
-#define CGAL_LAZY_BINARY_OP(OP, NAME)                                    \
-template <typename ET, typename ET1 = ET, typename ET2 = ET>             \
-struct NAME : public Lazy_exact_binary<ET, ET1, ET2>                     \
-{                                                                        \
-  typedef typename Lazy_exact_binary<ET,ET1,ET2>::AT::Protector P;	 \
-  NAME (const Lazy_exact_nt<ET1> &a, const Lazy_exact_nt<ET2> &b)        \
-    : Lazy_exact_binary<ET, ET1, ET2>((P(), a.approx() OP b.approx()), a, b) {} \
-                                                                         \
-  void update_exact() const                                              \
-  {                                                                      \
-    this->et = new ET(this->op1.exact() OP this->op2.exact());           \
-    if (!this->approx().is_point())                                      \
-      this->at = CGAL_NTS to_interval(*(this->et));                      \
-    this->prune_dag();                                                   \
-   }                                                                     \
-};
-
-CGAL_LAZY_BINARY_OP(+, Lazy_exact_Add)
-CGAL_LAZY_BINARY_OP(-, Lazy_exact_Sub)
-CGAL_LAZY_BINARY_OP(*, Lazy_exact_Mul)
-CGAL_LAZY_BINARY_OP(/, Lazy_exact_Div)
-
-// Minimum
-template <typename ET>
-struct Lazy_exact_Min : public Lazy_exact_binary<ET>
-{
-  Lazy_exact_Min (const Lazy_exact_nt<ET> &a, const Lazy_exact_nt<ET> &b)
-    : Lazy_exact_binary<ET>((CGAL::min)(a.approx(), b.approx()), a, b) {}
-
-  void update_exact() const
-  {
-    this->et = new ET((CGAL::min)(this->op1.exact(), this->op2.exact()));
-    if (!this->approx().is_point()) 
-      this->at = CGAL_NTS to_interval(*(this->et));
-    this->prune_dag();
-  }
-};
-
-// Maximum
-template <typename ET>
-struct Lazy_exact_Max : public Lazy_exact_binary<ET>
-{
-  Lazy_exact_Max (const Lazy_exact_nt<ET> &a, const Lazy_exact_nt<ET> &b)
-    : Lazy_exact_binary<ET>((CGAL::max)(a.approx(), b.approx()), a, b) {}
-
-  void update_exact() const
-  {
-    this->et = new ET((CGAL::max)(this->op1.exact(), this->op2.exact()));
-    if (!this->approx().is_point()) 
-      this->at = CGAL_NTS to_interval(*(this->et));
-    this->prune_dag();
-  }
-};
-
-
-// The real number type, handle class
-template <typename ET_>
-class Lazy_exact_nt
-  : public Lazy<Interval_nt<false>, ET_, Lazy_exact_nt<ET_>, To_interval<ET_> >
-  , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt<ET_>, int >
-  , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt<ET_>, double >
-{
-public:
-
-  typedef Lazy_exact_nt<ET_> Self;
-  typedef Lazy<Interval_nt<false>, ET_, Self, To_interval<ET_> > Base;
-  typedef typename Base::Self_rep  Self_rep;
-
-  typedef typename Base::ET ET; // undocumented
-  typedef typename Base::AT AT; // undocumented
-
-  typedef typename Base::Exact_type        Exact_type;
-  typedef typename Base::Approximate_type  Approximate_type;
-
-public :
-
-  Lazy_exact_nt () {}
-
-  Lazy_exact_nt (Self_rep *r)
-    : Base(r) {}
-
-  // Also check that ET and AT are constructible from T?
-  template<class T>
-  Lazy_exact_nt (T i, typename boost::enable_if<boost::mpl::and_<
-      boost::mpl::or_<boost::is_arithmetic<T>, boost::is_enum<T> >,
-      boost::mpl::not_<boost::is_same<T,ET> > >,void*>::type=0)
-    : Base(new Lazy_exact_Cst<ET,T>(i)) {}
-
-  Lazy_exact_nt (const ET & e)
-    : Base(new Lazy_exact_Ex_Cst<ET>(e)){}
-
-  template <class ET1>
-  Lazy_exact_nt (const Lazy_exact_nt<ET1> &x,
-      typename boost::enable_if<is_implicit_convertible<ET1,ET>,int>::type=0)
-    : Base(new Lazy_lazy_exact_Cst<ET, ET1>(x)){}
-
-  template <class ET1>
-  explicit Lazy_exact_nt (const Lazy_exact_nt<ET1> &x,
-  typename boost::disable_if<is_implicit_convertible<ET1,ET>,int>::type=0)
-    : Base(new Lazy_lazy_exact_Cst<ET, ET1>(x)){}
-
-  Self operator+ () const
-  { return *this; }
-
-  Self operator- () const
-  { return new Lazy_exact_Opp<ET>(*this); }
-
-  Self & operator+=(const Self& b)
-  { return *this = new Lazy_exact_Add<ET>(*this, b); }
-
-  Self & operator-=(const Self& b)
-  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
-
-  Self & operator*=(const Self& b)
-  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
-
-  Self & operator/=(const Self& b)
-  {
-    CGAL_precondition(b != 0);
-    return *this = new Lazy_exact_Div<ET>(*this, b);
-  }
-
-  // Mixed operators. (could be optimized ?)
-  Self & operator+=(CGAL_int(ET) b)
-  { return *this = new Lazy_exact_Add<ET>(*this, b); }
-
-  Self & operator-=(CGAL_int(ET) b)
-  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
-
-  Self & operator*=(CGAL_int(ET) b)
-  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
-
-  Self & operator/=(CGAL_int(ET) b)
-  {
-    CGAL_precondition(b != 0);
-    return *this = new Lazy_exact_Div<ET>(*this, b);
-  }
-
-  Self & operator+=(CGAL_double(ET) b)
-  { return *this = new Lazy_exact_Add<ET>(*this, b); }
-
-  Self & operator-=(CGAL_double(ET) b)
-  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
-
-  Self & operator*=(CGAL_double(ET) b)
-  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
-
-  Self & operator/=(CGAL_double(ET) b)
-  {
-    CGAL_precondition(b != 0);
-    return *this = new Lazy_exact_Div<ET>(*this, b);
-  }
-
-  // % kills filtering
-  Self & operator%=(const Self& b)
-  {
-    CGAL_precondition(b != 0);
-    ET res = this->exact();
-    res %= b.exact();
-    return *this = Lazy_exact_nt<ET>(res);
-  }
-
-  Self & operator%=(int b)
-  {
-    CGAL_precondition(b != 0);
-    ET res = this->exact();
-    res %= b;
-    return *this = Lazy_exact_nt<ET>(res);
-  }
-
-  Interval_nt<true> interval() const
-  {
-    const Interval_nt<false>& i = this->approx();
-    return Interval_nt<true>(i.inf(), i.sup());
-  }
-
-  Interval_nt_advanced approx_adv() const
-  { return this->ptr()->approx(); }
-
-  static const double & get_relative_precision_of_to_double()
-  {
-      return relative_precision_of_to_double;
-  }
-
-  static void set_relative_precision_of_to_double(const double & d)
-  {
-      CGAL_assertion((0 < d) & (d < 1));
-      relative_precision_of_to_double = d;
-  }
-
-  bool identical(const Self& b) const
-  {
-      return ::CGAL::identical(
-              static_cast<const Handle &>(*this),
-              static_cast<const Handle &>(b));
-  }
-
-  template < typename T >
-  bool identical(const T&) const
-  { return false; }
-
-private:
-  static double relative_precision_of_to_double;
-};
-
-
-template <typename ET>
-double Lazy_exact_nt<ET>::relative_precision_of_to_double = 0.00001;
-
-
-template <typename ET1, typename ET2>
-bool
-operator<(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  if (a.identical(b))
-    return false;
-  Uncertain<bool> res = a.approx() < b.approx();
-  if (is_certain(res))
-    return get_certain(res);
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return a.exact() < b.exact();
-}
-
-template <typename ET1, typename ET2>
-bool
-operator==(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  if (a.identical(b))
-    return true;
-  Uncertain<bool> res = a.approx() == b.approx();
-  if (is_certain(res))
-    return get_certain(res);
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return a.exact() == b.exact();
-}
-
-template <typename ET1, typename ET2>
-inline
-bool
-operator>(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{ return b < a; }
-
-template <typename ET1, typename ET2>
-inline
-bool
-operator>=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{ return ! (a < b); }
-
-template <typename ET1, typename ET2>
-inline
-bool
-operator<=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{ return b >= a; }
-
-template <typename ET1, typename ET2>
-inline
-bool
-operator!=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{ return ! (a == b); }
-
-
-template <typename ET>
-inline
-Lazy_exact_nt<ET>
-operator%(const Lazy_exact_nt<ET>& a, const Lazy_exact_nt<ET>& b)
-{
-  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-  CGAL_precondition(b != 0);
-  return Lazy_exact_nt<ET>(a) %= b;
-}
-
-
-
-// Mixed operators with int.
-template <typename ET>
-bool
-operator<(const Lazy_exact_nt<ET>& a, int b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = a.approx() < b;
-  if (is_certain(res))
-    return res;
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return a.exact() < b;
-}
-
-template <typename ET>
-bool
-operator>(const Lazy_exact_nt<ET>& a, int b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = b < a.approx();
-  if (is_certain(res))
-    return get_certain(res);
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return b < a.exact();
-}
-
-template <typename ET>
-bool
-operator==(const Lazy_exact_nt<ET>& a, int b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = b == a.approx();
-  if (is_certain(res))
-    return get_certain(res);
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return b == a.exact();
-}
-
-
-// Mixed operators with double.
-template <typename ET>
-bool
-operator<(const Lazy_exact_nt<ET>& a, double b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = a.approx() < b;
-  if (is_certain(res))
-    return res;
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return a.exact() < b;
-}
-
-template <typename ET>
-bool
-operator>(const Lazy_exact_nt<ET>& a, double b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = b < a.approx();
-  if (is_certain(res))
-    return res;
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return b < a.exact();
-}
-
-template <typename ET>
-bool
-operator==(const Lazy_exact_nt<ET>& a, double b)
-{
-  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-  Uncertain<bool> res = b == a.approx();
-  if (is_certain(res))
-    return res;
-  CGAL_BRANCH_PROFILER_BRANCH(tmp);
-  return b == a.exact();
-}
-
-
-
-template <typename ET1, typename ET2>
-Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
-operator+(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-  return new Lazy_exact_Add<typename Coercion_traits<ET1, ET2>::Type,
-                            ET1, ET2>(a, b);
-}
-
-template <typename ET1, typename ET2>
-Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
-operator-(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-  return new Lazy_exact_Sub<typename Coercion_traits<ET1, ET2>::Type,
-                            ET1, ET2>(a, b);
-}
-
-template <typename ET1, typename ET2>
-Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
-operator*(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-  return new Lazy_exact_Mul<typename Coercion_traits<ET1, ET2>::Type,
-                            ET1, ET2>(a, b);
-}
-
-template <typename ET1, typename ET2>
-Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
-operator/(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
-{
-  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-  CGAL_precondition(b != 0);
-  return new Lazy_exact_Div<typename Coercion_traits<ET1, ET2>::Type,
-                            ET1, ET2>(a, b);
-}
-
-//
-// Algebraic structure traits
-//
-
-namespace INTERN_LAZY_EXACT_NT {
-
-template< class NT, class Functor >
-struct Simplify_selector {
-  struct Simplify : public std::unary_function<NT&, void> {
-    void operator()( NT& ) const {
-      // TODO: In the old implementation the Simplify-functor was the default
-      //       (which does nothing). But this cannot be the correct way!?
-    }
-  };
-};
-
-template< class NT >
-struct Simplify_selector< NT, Null_functor > {
-  typedef Null_functor Simplify;
-};
-
-template< class NT, class Functor >
-struct Unit_part_selector {
-  struct Unit_part : public std::unary_function<NT, NT > {
-    NT operator()( const NT& x ) const {
-      return NT( CGAL_NTS unit_part( x.exact() ) );
-    }
-  };
-};
-
-template< class NT >
-struct Unit_part_selector< NT, Null_functor > {
-  typedef Null_functor Unit_part;
-};
-
-template< class NT, class Functor >
-struct Is_zero_selector {
-  struct Is_zero : public std::unary_function<NT, bool > {
-    bool operator()( const NT& x ) const {
-      return CGAL_NTS is_zero( x.exact() );
-    }
-  };
-};
-
-template< class NT >
-struct Is_zero_selector< NT, Null_functor > {
-  typedef Null_functor Is_zero;
-};
-
-template< class NT, class Functor >
-struct Is_one_selector {
-  struct Is_one : public std::unary_function<NT, bool > {
-    bool operator()( const NT& x ) const {
-      return CGAL_NTS is_one( x.exact() );
-    }
-  };
-};
-
-template< class NT >
-struct Is_one_selector< NT, Null_functor > {
-  typedef Null_functor Is_one;
-};
-
-template< class NT, class Functor >
-struct Square_selector {
-  struct Square : public std::unary_function<NT, NT > {
-    NT operator()( const NT& x ) const {
-      CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-      return new Lazy_exact_Square<typename NT::ET>(x);
-    }
-  };
-};
-
-template< class NT >
-struct Square_selector< NT, Null_functor > {
-  typedef Null_functor Square;
-};
-
-template< class NT, class Functor >
-struct Integral_division_selector {
-  struct Integral_division : public std::binary_function<NT, NT, NT > {
-    NT operator()( const NT& x, const NT& y ) const {
-      return NT( CGAL_NTS integral_division( x.exact(), y.exact() ) );
-    }
-
-    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
-  };
-};
-
-template< class NT >
-struct Integral_division_selector< NT, Null_functor > {
-  typedef Null_functor Integral_division;
-};
-
-template< class NT, class Functor >
-struct Is_square_selector {
-  struct Is_square : public std::binary_function<NT, NT&, bool > {
-      bool operator()( const NT& x, NT& y ) const {
-          typename NT::ET y_et;
-          bool result = CGAL_NTS is_square( x.exact(), y_et );
-          y = NT(y_et);
-          return result;
-      }
-      bool operator()( const NT& x) const {
-          typename NT::ET y_et;
-          return CGAL_NTS is_square( x.exact(), y_et );
-      }
-  };
-};
-
-template< class NT >
-struct Is_square_selector< NT, Null_functor > {
-  typedef Null_functor Is_square;
-};
-
-
-template <class NT, class AlgebraicStructureTag>
-struct Sqrt_selector{
-    struct Sqrt : public std::unary_function<NT, NT > {
-        NT operator ()(const NT& x) const {
-          CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-          CGAL_precondition(x >= 0);
-          return new Lazy_exact_Sqrt<typename NT::ET>(x);
-        }
-    };
-};
-template <class NT>
-struct Sqrt_selector<NT,Null_functor> {
-    typedef Null_functor Sqrt;
-};
-
-template< class NT, class Functor >
-struct Kth_root_selector {
-  struct Kth_root : public std::binary_function<int, NT, NT > {
-    NT operator()( int k, const NT& x ) const {
-      return NT( CGAL_NTS kth_root( k, x.exact() ) );
-    }
-  };
-};
-
-template< class NT >
-struct Kth_root_selector< NT, Null_functor > {
-  typedef Null_functor Kth_root;
-};
-
-template< class NT, class Functor >
-struct Root_of_selector {
-  private:
-      struct Cast{
-        typedef typename NT::ET result_type;
-        result_type operator()(const NT& lazy_exact) const {
-          return lazy_exact.exact();
-        }
-      };
-
-  public:
-    struct Root_of {
-//      typedef typename Functor::Boundary Boundary;
-      typedef NT result_type;
-      template< class Input_iterator >
-      NT operator()( int k, Input_iterator begin, Input_iterator end ) const {
-       Cast cast;
-       return NT( typename Algebraic_structure_traits<typename NT::ET>::
-                                 Root_of()( k,
-                              ::boost::make_transform_iterator( begin, cast ),
-                              ::boost::make_transform_iterator( end, cast ) ) );
-      }
-
-    };
-};
-
-template< class NT >
-struct Root_of_selector< NT, Null_functor > {
-  typedef Null_functor Root_of;
-};
-
-template< class NT, class Functor >
-struct Gcd_selector {
-  struct Gcd : public std::binary_function<NT, NT, NT > {
-    NT operator()( const NT& x, const NT& y ) const {
-     CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-     return NT( CGAL_NTS gcd( x.exact(), y.exact() ) );
-    }
-
-    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
-  };
-};
-
-template< class NT >
-struct Gcd_selector< NT, Null_functor > {
-  typedef Null_functor Gcd;
-};
-
-template< class NT, class Functor >
-struct Div_selector {
-  struct Div : public std::binary_function<NT, NT, NT > {
-    NT operator()( const NT& x, const NT& y ) const {
-      return NT( CGAL_NTS div( x.exact(), y.exact() ) );
-    }
-
-    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
-
-  };
-};
-
-template< class NT >
-struct Div_selector< NT, Null_functor > {
-  typedef Null_functor Div;
-};
-
-template< class NT, class Functor >
-struct Inverse_selector {
-  struct Inverse  {
-    typedef NT result_type;
-    NT operator()( const NT& x ) const {
-      return NT( 1 ) / x ;
-    }
-  };
-};
-
-template< class NT >
-struct Inverse_selector< NT, Null_functor > {
-  typedef Null_functor Inverse;
-};
-
-template< class NT, class Functor >
-struct Mod_selector {
-  struct Mod : public std::binary_function<NT, NT, NT > {
-    NT operator()( const NT& x, const NT& y ) const {
-      return NT( CGAL_NTS mod( x.exact(), y.exact() ) );
-    }
-
-    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
-
-  };
-};
-
-template< class NT >
-struct Mod_selector< NT, Null_functor > {
-  typedef Null_functor Mod;
-};
-
-template< class NT, class Functor >
-struct Div_mod_selector {
-  struct Div_mod {
-    typedef void result_type;
-    typedef NT   first_argument_type;
-    typedef NT   second_argument_type;
-    typedef NT&  third_argument_type;
-    typedef NT&  fourth_argument_type;
-
-    void operator()( const NT& x, const NT& y, NT& q, NT& r ) const {
-      typename NT::ET q_et;
-      typename NT::ET r_et;
-      CGAL_NTS div_mod( x.exact(), y.exact(), q_et, r_et );
-      q = NT( q_et );
-      r = NT( r_et );
-    }
-
-    template< class NT1, class NT2 >
-    void operator()( const NT1& x, const NT2& y,
-                     NT& q,
-                     NT& r ) const {
-      CGAL_static_assertion((::boost::is_same<
-        typename Coercion_traits< NT1, NT2 >::Type, NT
-                                              >::value));
-
-      typename Coercion_traits< NT1, NT2 >::Cast cast;
-      operator()( cast(x), cast(y), q, r );
-    }
-  };
-};
-
-template< class NT >
-struct Div_mod_selector< NT, Null_functor >{
-  typedef Null_functor Div_mod;
-};
-} // namespace INTERN_LAZY_EXACT_NT
-
-template <class ET>
-class Algebraic_structure_traits< Lazy_exact_nt<ET> >
-    :public Algebraic_structure_traits_base
-      < Lazy_exact_nt<ET>,
-       typename Algebraic_structure_traits<ET>::Algebraic_category >
-{
-private:
-    typedef Algebraic_structure_traits<ET> AST_ET;
-    typedef typename AST_ET::Algebraic_category ET_as_tag;
-public:
-    typedef typename AST_ET::Is_exact               Is_exact;
-    typedef typename AST_ET::Is_numerical_sensitive Is_numerical_sensitive;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Simplify_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Simplify > ::Simplify Simplify;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Unit_part_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Unit_part > ::Unit_part Unit_part;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Is_zero_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Is_zero > ::Is_zero Is_zero;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Is_one_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Is_one > ::Is_one Is_one;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Square_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Square > ::Square Square;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Integral_division_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Integral_division> ::Integral_division Integral_division;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Is_square_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Is_square > ::Is_square Is_square;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Sqrt_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Sqrt> ::Sqrt Sqrt;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Kth_root_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Kth_root > ::Kth_root Kth_root;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Root_of_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Root_of > ::Root_of Root_of;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Gcd_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Gcd > ::Gcd Gcd;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Div_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Div > ::Div Div;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Mod_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Mod > ::Mod Mod;
-
-    typedef typename INTERN_LAZY_EXACT_NT::Div_mod_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Div_mod > ::Div_mod Div_mod;
-    
-    typedef typename INTERN_LAZY_EXACT_NT::Inverse_selector
-    <Lazy_exact_nt<ET>, typename AST_ET::Inverse > ::Inverse Inverse;    
-};
-
-
-
-//
-// Real embeddalbe traits
-//
-
-template < typename ET > class Real_embeddable_traits< Lazy_exact_nt<ET> >
-  : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt<ET> , CGAL::Tag_true > {
-
-  // Every type ET of Lazy_exact_nt<ET> has to be real embeddable.
-  CGAL_static_assertion((::boost::is_same< typename Real_embeddable_traits< ET >
-                                ::Is_real_embeddable, Tag_true >::value));
-
-  public:
-    typedef Lazy_exact_nt<ET> Type;
-
-    class Abs
-      : public std::unary_function< Type, Type > {
-      public:
-        Type operator()( const Type& a ) const {
-            CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-            return new Lazy_exact_Abs<ET>(a);
-        }
-    };
-
-    class Sgn
-      : public std::unary_function< Type, ::CGAL::Sign > {
-      public:
-        ::CGAL::Sign operator()( const Type& a ) const {
-            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-            Uncertain< ::CGAL::Sign> res = CGAL_NTS sign(a.approx());
-            if (is_certain(res))
-                return get_certain(res);
-            CGAL_BRANCH_PROFILER_BRANCH(tmp);
-            return CGAL_NTS sign(a.exact());
-        }
-    };
-
-    class Compare
-      : public std::binary_function< Type, Type,
-                                Comparison_result > {
-      public:
-        Comparison_result operator()( const Type& a,
-                                            const Type& b ) const {
-            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-            if (a.identical(b))
-                return EQUAL;
-            Uncertain<Comparison_result> res = CGAL_NTS compare(a.approx(), b.approx());
-            if (is_certain(res))
-                return get_certain(res);
-            CGAL_BRANCH_PROFILER_BRANCH(tmp);
-            return CGAL_NTS compare(a.exact(), b.exact());
-        }
-
-        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type,
-                                                      Comparison_result )
-
-    };
-
-    class To_double
-      : public std::unary_function< Type, double > {
-      public:
-        double operator()( const Type& a ) const {
-            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
-
-            const Interval_nt<false>& app = a.approx();
-            double r;
-            if (fit_in_double(app, r))
-                return r;
-
-            // If it's precise enough, then OK.
-            if (has_smaller_relative_precision(app,
-                 Lazy_exact_nt<ET>::get_relative_precision_of_to_double()))
-                return CGAL_NTS to_double(app);
-
-            CGAL_BRANCH_PROFILER_BRANCH(tmp);
-
-            // Otherwise we trigger exact computation first,
-            // which will refine the approximation.
-            a.exact();
-            return CGAL_NTS to_double(a.approx());
-        }
-    };
-
-    class To_interval
-      : public std::unary_function< Type, std::pair< double, double > > {
-      public:
-        std::pair<double, double> operator()( const Type& a ) const {
-            CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-            return a.approx().pair();
-        }
-    };
-
-    class Is_finite
-      : public std::unary_function< Type, bool > {
-      public:
-        bool operator()( const Type& x ) const {
-          return CGAL_NTS is_finite(x.approx()) || CGAL_NTS is_finite(x.exact());
-        }
-    };
-
-};
-
-template <class ET1, class ET2, class F>
-class Lazy_exact_nt_coercion_traits_base {
-public:
-    typedef Tag_false Are_explicit_interoperable;
-    typedef Tag_false Are_implicit_interoperable;
-    //typedef Null_type    Type
-    typedef Null_functor Cast;
-};
-
-template <class ET1, class ET2>
-class Lazy_exact_nt_coercion_traits_base < Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2>, Tag_true >
-{
-    typedef Coercion_traits<ET1,ET2> CT;
-    typedef Lazy_exact_nt<ET1> A;
-    typedef Lazy_exact_nt<ET2> B;
-public:
-    typedef Lazy_exact_nt<typename CT::Type> Type;
-    typedef typename CT::Are_implicit_interoperable Are_explicit_interoperable;
-    typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
-
-    class Cast{
-    private:
-        template <class T>
-        Type cast(const T& x) const{ return Type(x); }
-        Type cast(const Type& x) const{ return x; }
-    public:
-        typedef Type result_type;
-        Type operator()(const A& x) const { return cast(x);}
-        Type operator()(const B& x) const { return cast(x);}
-    };
-};
-
-
-CGAL_DEFINE_COERCION_TRAITS_FOR_SELF_TEM(Lazy_exact_nt<ET>, class ET)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO_TEM(ET,Lazy_exact_nt<ET>,class ET)
-
-template<class ET1, class ET2 >
-struct Coercion_traits< Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2> >
-    :public Lazy_exact_nt_coercion_traits_base
-           <Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2>,
-            typename Coercion_traits<ET1,ET2>::Are_implicit_interoperable>{};
-
-
-#define CGAL_COERCION_TRAITS_LAZY_EXACT(NTX)                            \
-    template<class ET>                                                  \
-    struct Coercion_traits< NTX, Lazy_exact_nt<ET> >{                   \
-    private:                                                            \
-        typedef Coercion_traits<NTX,ET> CT;                             \
-        typedef Lazy_exact_nt<ET> NT;                                   \
-    public:                                                             \
-        typedef typename CT::Are_explicit_interoperable                 \
-        Are_explicit_interoperable;                                     \
-        typedef typename CT::Are_implicit_interoperable                 \
-        Are_implicit_interoperable;                                     \
-    private:                                                            \
-        static const  bool interoperable                                \
-        =boost::is_same< Are_implicit_interoperable, Tag_false>::value; \
-    public:                                                             \
-        typedef typename boost::mpl::if_c <interoperable,Null_tag,NT>   \
-        ::type  Type;                                          \
-        typedef typename boost::mpl::if_c <interoperable, Null_functor, \
-    INTERN_CT::Cast_from_to<NTX,NT> >::type Cast;                       \
-    };                                                                  \
-                                                                        \
-    template<class ET>                                                  \
-    struct Coercion_traits< Lazy_exact_nt<ET>, NTX >                    \
-        :public Coercion_traits<NTX, Lazy_exact_nt<ET> >{};             \
-
-
-CGAL_COERCION_TRAITS_LAZY_EXACT(int)
-CGAL_COERCION_TRAITS_LAZY_EXACT(short)
-CGAL_COERCION_TRAITS_LAZY_EXACT(double)
-CGAL_COERCION_TRAITS_LAZY_EXACT(float)
-#undef CGAL_COERCION_TRAITS_LAZY_EXACT
-
-namespace INTERN_LAZY_EXACT_NT {
-
-template < typename NT, typename TAG  > class Fraction_traits_base;
-
-template < class ET >
-class Fraction_traits_base <Lazy_exact_nt<ET> , CGAL::Tag_false>
-    : public Fraction_traits<ET> {
-public:
-    typedef Lazy_exact_nt<ET>  Type;
-};
-
-template < class ET >
-class Fraction_traits_base <Lazy_exact_nt<ET> , CGAL::Tag_true>{
-    typedef Fraction_traits<ET> ETT;
-    typedef typename ETT::Numerator_type ET_numerator;
-    typedef typename ETT::Denominator_type ET_denominator;
-public:
-    typedef Lazy_exact_nt<ET>  Type;
-    typedef Tag_true Is_fraction;
-    typedef Lazy_exact_nt<ET_numerator> Numerator_type;
-    typedef Lazy_exact_nt<ET_denominator> Denominator_type;
-
-    struct Common_factor : std::binary_function<Denominator_type,Denominator_type,Denominator_type>{
-        Denominator_type operator()(const Denominator_type& a, const Denominator_type& b) const {
-            typename ETT::Common_factor common_factor;
-            return Denominator_type(common_factor(a.exact(),b.exact()));
-        }
-    };
-    struct Compose : std::binary_function<Type,Numerator_type,Denominator_type>{
-        Type operator()(const Numerator_type& n, const Denominator_type& d) const {
-            typename ETT::Compose compose;
-            return Type(compose(n.exact(),d.exact()));
-        }
-    };
-    struct Decompose {
-        typedef void result_type;
-        typedef Type first_argument_type;
-        typedef Numerator_type second_argument_type;
-        typedef Denominator_type third_argument_type;
-        void operator()(const Type& f, Numerator_type& n, Denominator_type& d) const {
-            typename ETT::Decompose decompose;
-            ET_numerator nn;
-            ET_denominator dd;
-            decompose(f.exact(),nn,dd);
-            n = Numerator_type(nn);
-            d = Denominator_type(dd);
-        }
-    };
-};
-} // namespace INTERN_LAZY_EXACT_NT
-
-
-template < class ET >
-class Fraction_traits< Lazy_exact_nt< ET > >
-    :public INTERN_LAZY_EXACT_NT::Fraction_traits_base<Lazy_exact_nt<ET>,
-            typename Fraction_traits<ET>::Is_fraction>
-{};
-
-template < class ET >
-struct Min <Lazy_exact_nt<ET> >
-    : public std::binary_function<Lazy_exact_nt<ET>,Lazy_exact_nt<ET>,Lazy_exact_nt<ET> > {
-
-    Lazy_exact_nt<ET> operator()( const Lazy_exact_nt<ET>& x, const Lazy_exact_nt<ET>& y) const
-    {
-      if (x.identical(y)){
-        return x;
-      }
-      Uncertain<bool> res = x.approx() < y.approx();
-      if(is_certain(res)){
-        return res.make_certain() ? x : y;
-      }
-      CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-      return new Lazy_exact_Min<ET>(x, y);
-    }
-};
-
-template < class ET >
-struct Max <Lazy_exact_nt<ET> >
-    : public std::binary_function<Lazy_exact_nt<ET>,Lazy_exact_nt<ET>,Lazy_exact_nt<ET> > {
-
-    Lazy_exact_nt<ET> operator()( const Lazy_exact_nt<ET>& x, const Lazy_exact_nt<ET>& y) const
-    {
-      if (x.identical(y)){
-        return x;
-      }
-      Uncertain<bool> res = x.approx() > y.approx();
-      if(is_certain(res)){
-        return  res.make_certain() ? x : y;
-      }
-        CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
-        return new Lazy_exact_Max<ET>(x, y);
-    }
-};
-
-template<typename ET> inline 
-Lazy_exact_nt<ET> min BOOST_PREVENT_MACRO_SUBSTITUTION(
-const Lazy_exact_nt<ET> & x,
-const Lazy_exact_nt<ET> & y){
-  return CGAL::Min<Lazy_exact_nt<ET> > ()(x,y);
-}
-template<typename ET> inline 
-Lazy_exact_nt<ET> max BOOST_PREVENT_MACRO_SUBSTITUTION(
-const Lazy_exact_nt<ET> & x,
-const Lazy_exact_nt<ET> & y){
-  return CGAL::Max<Lazy_exact_nt<ET> > ()(x,y);
-}
-
-template <typename ET>
-std::ostream &
-operator<< (std::ostream & os, const Lazy_exact_nt<ET> & a)
-{ return os << CGAL_NTS to_double(a); }
-
-template <typename ET>
-std::istream &
-operator>> (std::istream & is, Lazy_exact_nt<ET> & a)
-{
-  ET e;
-  is >> e;
-  if (is)
-    a = e;
-  return is;
-}
-
-template< class ET >
-class Is_valid< Lazy_exact_nt<ET> >
-  : public std::unary_function< Lazy_exact_nt<ET>, bool > {
-  public :
-    bool operator()( const Lazy_exact_nt<ET>& x ) const {
-      return is_valid(x.approx());
-    }
-};
-
-template < typename ET >
-struct NT_converter < Lazy_exact_nt<ET>, ET >
-{
-  const ET& operator()(const Lazy_exact_nt<ET> &a) const
-  { return a.exact(); }
-};
-
-// Forward declaration to break inclusion cycle
-namespace internal {
-template<class>struct Exact_field_selector;
-template<class>struct Exact_ring_selector;
-}
-// Compiler can deduce ET from the first argument.
-template < typename ET >
-struct NT_converter < Lazy_exact_nt<ET>,
-  typename First_if_different<
-    typename internal::Exact_field_selector<ET>::Type,
-    ET>::Type>
-{
-  typename internal::Exact_field_selector<ET>::Type
-    operator()(const Lazy_exact_nt<ET> &a) const
-  { return NT_converter<ET,typename internal::Exact_field_selector<ET>::Type>()(a.exact()); }
-};
-
-template < typename ET >
-struct NT_converter < Lazy_exact_nt<ET>,
-  typename First_if_different<
-   typename First_if_different<
-    typename internal::Exact_ring_selector<ET>::Type,
-    ET>::Type,
-   typename internal::Exact_field_selector<ET>::Type>::Type>
-{
-  typename internal::Exact_ring_selector<ET>::Type operator()(const Lazy_exact_nt<ET> &a) const
-  { return NT_converter<ET,typename internal::Exact_ring_selector<ET>::Type>()(a.exact()); }
-};
-
-namespace internal {
-// Returns true if the value is representable by a double and to_double()
-// would return it.  False means "don't know" (the exact number type is not
-// queried).
-template < typename ET >
-inline bool
-fit_in_double(const Lazy_exact_nt<ET>& l, double& r)
-{ return fit_in_double(l.approx(), r); }
-
-} // namespace internal
-
-template <class NT_,class ROOT_, class ACDE_TAG_, class FP_TAG>
-void
-print(std::ostream &os, const CGAL::Lazy_exact_nt< Sqrt_extension<NT_,ROOT_,ACDE_TAG_,FP_TAG> > &r)
-{
-  print(os,r.exact());
-}
-
-namespace INTERN_LAZY_EXACT_NT {
-template< typename ET , typename Tag>
-class Modular_traits_base{
-public:
-  typedef Lazy_exact_nt<ET> NT;
-  typedef ::CGAL::Tag_false Is_modularizable;
-  typedef ::CGAL::Null_functor Residue_type;
-  typedef ::CGAL::Null_functor Modular_image;  
-  typedef ::CGAL::Null_functor Modular_image_representative;    
-};
-
-template< typename ET >
-class Modular_traits_base<ET, Tag_true>{
-  typedef Modular_traits<ET> MT_ET;
-public:
-  typedef Lazy_exact_nt<ET> NT;
-  typedef CGAL::Tag_true Is_modularizable;
-  typedef typename MT_ET::Residue_type Residue_type;
-
-  struct Modular_image{
-    Residue_type operator()(const NT& a){
-      typename MT_ET::Modular_image modular_image;
-      return modular_image(a.exact());
-    }
-  };
-  struct Modular_image_representative{
-    NT operator()(const Residue_type& x){
-      typename MT_ET::Modular_image_representative modular_image_representative;
-      return NT(modular_image_representative(x));
-    }
-  };    
-};
-} // namespace INTERN_LAZY_EXACT_NT
-
-template < typename ET > 
-class Modular_traits<Lazy_exact_nt<ET> >
-  :public INTERN_LAZY_EXACT_NT::Modular_traits_base
-<ET,typename Modular_traits<ET>::Is_modularizable>{};
-
-
-#undef CGAL_double
-#undef CGAL_int
-#undef CGAL_To_interval
-
-} //namespace CGAL
-
-namespace Eigen {
-  template<class> struct NumTraits;
-  template<typename ET> struct NumTraits<CGAL::Lazy_exact_nt<ET> >
-  {
-    typedef CGAL::Lazy_exact_nt<ET> Real;
-    // typedef CGAL::Lazy_exact_nt<ET> NonInteger;
-    typedef CGAL::Lazy_exact_nt<typename NumTraits<ET>::NonInteger> NonInteger;
-    typedef CGAL::Lazy_exact_nt<ET> Nested;
-
-    static inline Real epsilon() { return 0; }
-    static inline Real dummy_precision() { return 0; }
-
-    enum {
-      IsInteger = NumTraits<ET>::IsInteger,
-      IsSigned = NumTraits<ET>::IsSigned,
-      IsComplex = NumTraits<ET>::IsComplex,
-      RequireInitialization = 1,
-      ReadCost = 8,
-      AddCost = 30,
-      MulCost = 30
-    };
-  };
-}
-
-#endif // CGAL_LAZY_EXACT_NT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2.h b/3rdparty/CGAL-4.6/include/CGAL/Line_2.h
deleted file mode 100644
index 239dfd6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Line_2.h
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_LINE_2_H
-#define CGAL_LINE_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Line_2 : public R_::Kernel_base::Line_2
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_2               Point_2;
-  typedef typename R_::Segment_2             Segment_2;
-  typedef typename R_::Ray_2                 Ray_2;
-  typedef typename R_::Vector_2              Vector_2;
-  typedef typename R_::Direction_2           Direction_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-  typedef typename R_::Kernel_base::Line_2   RLine_2;
-
-  typedef Line_2                             Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Line_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef RLine_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Line_2() {}
-
-  Line_2(const RLine_2& l)  // conversion impl -> interface class
-    : RLine_2(l) {}
-
-  Line_2(const Point_2 &p, const Point_2 &q)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,q)) {}
-
-  Line_2(const RT &a, const RT &b, const RT &c)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), a,b,c)) {}
-
-  explicit Line_2(const Segment_2& s)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), s)) {}
-
-  explicit Line_2(const Ray_2& r)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), r)) {}
-
-  Line_2(const Point_2 &p, const Direction_2 &d)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,d)) {}
-
-  Line_2(const Point_2 &p, const Vector_2 &v)
-    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,v)) {}
-
-
-  // FIXME : Use Qrt<> here.
-  RT a() const
-  {
-    return R().compute_a_2_object()(*this);
-  }
-
-  RT b() const
-  {
-    return R().compute_b_2_object()(*this);
-  }
-
-  RT c() const
-  {
-    return R().compute_c_2_object()(*this);
-  }
-
-  Line_2
-  transform(const Aff_transformation_2 &t) const
-  {
-    return Line_2(t.transform(point(0)),
-		  t.transform(direction()));
-  }
-
-  Line_2
-  opposite() const
-  {
-    return R().construct_opposite_line_2_object()(*this);
-  }
-
-  Direction_2
-  direction() const
-  {
-    return R().construct_direction_2_object()(*this);
-  }
-
-  Vector_2
-  to_vector() const
-  {
-    return R().construct_vector_2_object()(*this);
-  }
-
-  Line_2
-  perpendicular(const Point_2 &p) const
-  {
-    return R().construct_perpendicular_line_2_object()(*this,p);
-  }
-
-  Point_2
-  projection(const Point_2& p) const
-  {
-    return R().construct_projected_point_2_object()(*this,p);
-  }
-
-  typename R::Boolean
-  is_horizontal() const
-  {
-    return R().is_horizontal_2_object()(*this);
-  }
-
-  typename R::Boolean
-  is_vertical() const
-  {
-    return R().is_vertical_2_object()(*this);
-  }
-
-  typename R::Boolean
-  is_degenerate() const
-  { return R().is_degenerate_2_object()(*this); }
-
-  typename R::Oriented_side
-  oriented_side(const Point_2 &p) const
-  {
-    return R().oriented_side_2_object()(*this,p);
-  }
-
-  typename R::Boolean
-  has_on_boundary(const Point_2 &p) const
-  {
-    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
-  }
-
-  typename R::Boolean
-  has_on_positive_side(const Point_2 &p) const
-  {
-    return oriented_side(p) == ON_POSITIVE_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_negative_side(const Point_2 &p) const
-  {
-    return oriented_side(p) == ON_NEGATIVE_SIDE;
-  }
-
-  typename R::Boolean
-  has_on(const Point_2 &p) const
-  {
-    return has_on_boundary(p);
-  }
-
-  FT
-  x_at_y(const FT &y) const
-  {
-    return R().compute_x_at_y_2_object()(*this, y);
-  }
-
-  FT
-  y_at_x(const FT &y) const
-  {
-    return R().compute_y_at_x_2_object()(*this, y);
-  }
-
-  Point_2
-  point() const
-  {
-    return R().construct_point_2_object()(*this);
-  }
-
-  Point_2
-  point(int i) const
-  {
-    return R().construct_point_2_object()(*this,i);
-  }
-
-  typename R::Boolean
-  operator==(const Line_2 &l) const
-  {
-    return R().equal_2_object()(*this, l);
-  }
-
-  typename R::Boolean
-  operator!=(const Line_2 &l) const
-  {
-    return !(*this == l);
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Line_2<R>& l)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << l.a() << ' ' << l.b() << ' ' << l.c();
-    case IO::BINARY :
-        write(os, l.a());
-        write(os, l.b());
-        write(os, l.c());
-        return os;
-    default:
-        return os << "Line_2(" << l.a()
-		  << ", " << l.b() << ", " << l.c() <<')';
-    }
-}
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Line_2<R> &l)
-{
-  return insert(os, l);
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Line_2<R>& l)
-{
-    typename R::RT a, b, c;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(a) >> iformat(b) >> iformat(c);
-        break;
-    case IO::BINARY :
-        read(is, a);
-        read(is, b);
-        read(is, c);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-	l = Line_2<R>(a, b, c);
-    return is;
-}
-
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Line_2<R> &l)
-{
-  return extract(is, l);
-}
-
-} //namespace CGAL
-
-#endif  // CGAL_LINE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_3.h b/3rdparty/CGAL-4.6/include/CGAL/Line_3.h
deleted file mode 100644
index 4429b11..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Line_3.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-//                 Stefan Schirra
-
-#ifndef CGAL_LINE_3_H
-#define CGAL_LINE_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Line_3 : public R_::Kernel_base::Line_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Ray_3                 Ray_3;
-  typedef typename R_::Segment_3             Segment_3;
-  typedef typename R_::Direction_3           Direction_3;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Plane_3               Plane_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Line_3                             Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Line_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Line_3   Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Line_3() {}
-
-  // conversion impl -> interface class
-  Line_3(const Rep& l)
-      : Rep(l) {}
-
-  Line_3(const Point_3 & p, const Point_3 & q)
-      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, q)) {}
-
-  explicit Line_3(const Segment_3 & s)
-      : Rep(typename R::Construct_line_3()(Return_base_tag(), s)) {}
-
-  explicit Line_3(const Ray_3 & r)
-      : Rep(typename R::Construct_line_3()(Return_base_tag(), r)) {}
-
-  Line_3(const Point_3 & p, const Direction_3 & d)
-      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, d)) {}
-
-  Line_3(const Point_3 & p, const Vector_3 & v)
-      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, v)) {}
-
-  Line_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Line_3(t.transform(this->point()), t.transform(this->direction()));
-  }
-
-  Vector_3 to_vector() const
-  {
-    return R().construct_vector_3_object()(*this);
-  }
-
-  Direction_3 direction() const
-  {
-    return R().construct_direction_3_object()(*this);
-  }
-
-  bool has_on(const Point_3 &p) const 
-  { 
-    return R().has_on_3_object()(*this, p);
-    //return has_on_boundary(p); 
-  }
-
-  Point_3 point() const
-  { 
-    return R().construct_point_on_3_object()(*this, 0);
-  }
-
-  Point_3 point(int i) const
-  { 
-    return R().construct_point_on_3_object()(*this, i);
-  }
-
-  Line_3 opposite() const
-  {
-    return R().construct_opposite_line_3_object()(*this);
-  }
-
-  Plane_3 perpendicular_plane(const Point_3 &p) const
-  {
-    return R().construct_perpendicular_plane_3_object()(*this, p);
-  }
-
-  Point_3 projection(const Point_3 &p) const
-  {
-    return R().construct_projected_point_3_object()(*this, p);
-  }
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-  
-};
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Line_3<R> &l)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << l.point(0) << ' ' << l.point(1);
-    case IO::BINARY :
-        return os << l.point(0) <<  l.point(1);
-    default:
-        return  os << "Line_3(" << l.point(0) << ", " << l.point(1) << ")";
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Line_3<R> &l)
-{
-    typename R::Point_3 p, q;
-    is >> p >> q;
-    if (is)
-        l = Line_3<R>(p, q);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex.h b/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex.h
deleted file mode 100644
index d32aab6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex.h
+++ /dev/null
@@ -1,933 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_LINEAR_CELL_COMPLEX_H
-#define CGAL_LINEAR_CELL_COMPLEX_H 1
-
-#include <CGAL/Combinatorial_map.h>
-#include <CGAL/Combinatorial_map_constructors.h>
-#include <CGAL/Linear_cell_complex_operations.h>
-#include <CGAL/Linear_cell_complex_min_items.h>
-#include <CGAL/Linear_cell_complex_traits.h>
-#include <CGAL/Linear_cell_complex_storages.h>
-
-namespace CGAL {
-
-  /** @file Linear_cell_complex.h
-   * Definition of a linear cell complex, i.e. a combinatorial map with points
-   * associated to all vertices.
-   */
-
-  /**  Linear_cell_complex class.
-   * The Linear_cell_complex a nD object with linear geometry, ie
-   * an nD combinatorial map with point associated to each vertex.
-   */
-  template < unsigned int d_, unsigned int ambient_dim,
-             class Traits_,
-             class Items_,
-             class Alloc_,
-             template<unsigned int,class,class,class,class>
-             class CMap,
-             class Refs,
-             class Storage_>
-  class Linear_cell_complex_base:
-    public CMap<d_, Refs, Items_, Alloc_, Storage_>
-  {
-  public:
-    typedef Linear_cell_complex_base<d_, ambient_dim,
-                                Traits_, Items_, Alloc_, CMap,
-                                Refs, Storage_>  Self;
-    typedef CMap<d_, Refs, Items_, Alloc_, Storage_> Base;
-
-    typedef Traits_ Traits;
-    typedef Items_  Items;
-    typedef Alloc_  Alloc;
-    typedef Storage_ Storage;
-
-    static const unsigned int ambient_dimension = ambient_dim;
-    static const unsigned int dimension = Base::dimension;
-
-    typedef typename Storage::Dart_handle       Dart_handle;
-    typedef typename Storage::Dart_const_handle Dart_const_handle;
-    typedef typename Storage::Helper            Helper;
-
-    typedef typename Storage::Point  Point;
-    typedef typename Storage::Vector Vector;
-    typedef typename Storage::FT     FT;
-
-    typedef typename Base::Dart_range Dart_range;
-
-    /// Typedef for attributes
-    template<int i>
-    struct Attribute_type: public Base::template Attribute_type<i>
-    {};
-    template<int i>
-    struct Attribute_handle: public Base::template Attribute_handle<i>
-    {};
-    template<int i>
-    struct Attribute_const_handle:
-      public Base::template Attribute_const_handle<i>
-    {};
-    template<int i>
-    struct Attribute_range: public Base::template Attribute_range<i>
-    {};
-    template<int i>
-    struct Attribute_const_range:
-      public Base::template Attribute_const_range<i>
-    {};
-
-    typedef typename Base::template Attribute_type<0>::type Vertex_attribute;
-    typedef typename Base::template Attribute_handle<0>::type
-    Vertex_attribute_handle;
-    typedef typename Base::template Attribute_const_handle<0>::type
-    Vertex_attribute_const_handle;
-
-    typedef typename Base::template Attribute_range<0>::type
-    Vertex_attribute_range;
-    typedef typename Base::template Attribute_const_range<0>::type
-    Vertex_attribute_const_range;
-
-    typedef typename Base::size_type size_type;
-    typedef typename Base::Use_index Use_index;
-
-    /// To use previous definition of create_dart methods.
-    using Base::create_dart;
-    using Base::beta;
-    using Base::is_free;
-    using Base::attribute;
-    using Base::null_handle;
-    using Base::point_of_vertex_attribute;
-
-    using Base::are_attributes_automatically_managed;
-    using Base::mark;
-    using Base::unmark;
-    using Base::free_mark;
-    using Base::get_new_mark;
-
-    Linear_cell_complex_base() : Base()
-    {}
-
-    /** Copy the given linear cell complex into *this.
-     *  Note that both LCC can have different dimensions and/or non void attributes.
-     *  @param alcc the linear cell complex to copy.
-     *  @post *this is valid.
-     */
-    Linear_cell_complex_base(const Self & alcc)
-    { Base::template copy<Self>(alcc); }
-
-    template < class LCC2 >
-    Linear_cell_complex_base(const LCC2& alcc)
-    { Base::template copy<LCC2>(alcc);}
-
-    template < class LCC2, typename Converters >
-    Linear_cell_complex_base(const LCC2& alcc, Converters& converters)
-    { Base::template copy<LCC2, Converters>(alcc, converters);}
-
-    template < class LCC2, typename Converters, typename Pointconverter >
-    Linear_cell_complex_base(const LCC2& alcc, Converters& converters,
-                        const Pointconverter& pointconverter)
-    { Base::template copy<LCC2, Converters, Pointconverter>
-          (alcc, converters, pointconverter);}
-
-    /** Create a vertex attribute.
-     * @return an handle on the new attribute.
-     */
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-    template<typename ...Args>
-    Vertex_attribute_handle create_vertex_attribute(const Args&... args)
-    { return Base::template create_attribute<0>(args...); }
-#else
-    Vertex_attribute_handle create_vertex_attribute()
-    { return Base::template create_attribute<0>(); }
-
-    template<typename T1>
-    Vertex_attribute_handle create_vertex_attribute(const T1& t1)
-    { return Base::template create_attribute<0>(t1); }
-
-    template<typename T1, typename T2>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2)
-    { return Base::template create_attribute<0>(t1, t2); }
-
-    template<typename T1, typename T2, typename T3>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3)
-    { return Base::template create_attribute<0>(t1, t2, t3); }
-
-    template<typename T1, typename T2, typename T3, typename T4>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4); }
-
-    template<typename T1, typename T2, typename T3, typename T4, typename T5>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
-     const T5 &t5)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5); }
-
-    template<typename T1, typename T2, typename T3, typename T4, typename T5,
-             typename T6>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
-     const T5 &t5, const T6 &t6)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6); }
-
-    template<typename T1, typename T2, typename T3, typename T4, typename T5,
-             typename T6, typename T7>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
-     const T5 &t5, const T6 &t6, const T7 &t7)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7); }
-
-  template<typename T1, typename T2, typename T3, typename T4, typename T5,
-             typename T6, typename T7, typename T8>
-    Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
-     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7,
-                                                t8); }
-
-  template<typename T1, typename T2, typename T3, typename T4, typename T5,
-           typename T6, typename T7, typename T8, typename T9>
-  Vertex_attribute_handle create_vertex_attribute
-    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
-     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9)
-    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7,
-                                                t8, t9); }
-#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-    /**
-     * Create a new dart associated with an handle through an attribute.
-     * @param ahandle the point handle to associated with the dart.
-     * @return a Dart_handle on the new dart.
-     */
-    Dart_handle create_dart(Vertex_attribute_handle ahandle)
-    {
-      Dart_handle res = create_dart();
-      set_vertex_attribute_of_dart(res,ahandle);
-      return res;
-    }
-
-    /** Create a new dart associated with a point.
-     * @param apoint the point to associated with the dart.
-     * @return a Dart_handle on the new dart.
-     */
-    Dart_handle create_dart(const Point& apoint)
-    { return create_dart(create_vertex_attribute(apoint)); }
-
-    /** Erase a given vertex attribute.
-     * @param ahandle the handle to the vertex attribute to erase.
-     */
-    void erase_vertex_attribute(Vertex_attribute_handle ahandle)
-    { Base::template erase_attribute<0>(ahandle); }
-
-    /** Set the vertex attribute of the given dart.
-     * @param adart a dart.
-     * @param ah the attribute to set.
-     */
-    void set_vertex_attribute_of_dart(Dart_handle adart,
-                                      Vertex_attribute_handle ah)
-    {
-      return CGAL::internal::Set_i_attribute_of_dart_functor<Self, 0>::
-          run(this, adart,ah);
-    }
-
-    /** Set the vertex attribute of all the darts of the vertex.
-     * @param adart a dart of the vertex.
-     * @param ah the attribute to set.
-     */
-    void set_vertex_attribute(Dart_handle adart,
-                              Vertex_attribute_handle ah)
-    { return CGAL::Set_i_attribute_functor<Self, 0>::run(this, adart,ah); }
-
-    /// @return the Vertex_attribute_range for all vertex_attributes.
-    Vertex_attribute_range& vertex_attributes()
-    { return this->template attributes<0>(); }
-
-    /// @return the Vertex_attribute_const_range for all vertex_attributes.
-    Vertex_attribute_const_range& vertex_attributes() const
-    { return this->template attributes<0>(); }
-
-    /// @return the size of the vertex_attribute container.
-    typename Base::size_type number_of_vertex_attributes() const
-    { return Base::template number_of_attributes<0>(); }
-
-#ifdef CGAL_CMAP_DEPRECATED
-    static Vertex_attribute_handle vertex_attribute(Dart_handle adart)
-    {
-      CGAL_assertion(adart!=NULL);
-      return adart->template attribute<0>();
-    }
-   static Vertex_attribute_const_handle vertex_attribute(Dart_const_handle
-                                                          adart)
-    {
-      CGAL_assertion(adart!=NULL);
-      return adart->template attribute<0>();
-    }
-    static Point& point(Dart_handle adart)
-    {
-      CGAL_assertion(adart!=NULL && adart->template attribute<0>()!=NULL );
-      return adart->template attribute<0>()->point();
-    }
-    static const Point& point(Dart_const_handle adart)
-    {
-      CGAL_assertion(adart!=NULL && adart->template attribute<0>()!=NULL );
-      return adart->template attribute<0>()->point();
-    }
-#else
-    /// Get the vertex_attribute associated with a dart.
-    /// @param a dart
-    /// @return the vertex_attribute.
-    Vertex_attribute_handle vertex_attribute(Dart_handle adart)
-    { return this->template attribute<0>(adart); }
-
-    /// Get the vertex_attribute associated with a const dart.
-    /// @param a dart
-    /// @return the vertex_const_attribute.
-    Vertex_attribute_const_handle
-    vertex_attribute(Dart_const_handle adart) const
-    { return this->template attribute<0>(adart); }
-
-    /// Get the point associated with a dart.
-    /// @param a dart
-    /// @return the point.
-    Point& point(Dart_handle adart)
-    {
-      CGAL_assertion(this->template attribute<0>(adart)!=null_handle );
-      return point_of_vertex_attribute(this->template attribute<0>(adart));
-    }
-
-    /// Get the point associated with a const dart.
-    /// @param a dart
-    /// @return the point.
-    const Point& point(Dart_const_handle adart) const
-    {
-      CGAL_assertion(this->template attribute<0>(adart)!=null_handle );
-      return point_of_vertex_attribute(this->template attribute<0>(adart));
-    }
-#endif // CGAL_CMAP_DEPRECATED
-
-    // Temporary methods to allow to write lcc->temp_vertex_attribute
-    // even with the old method. Depending if CGAL_CMAP_DEPRECATED is defined or not
-    // call the static method or the new method. To remove when we remove the
-    // old code.
-    Vertex_attribute_handle temp_vertex_attribute(Dart_handle adart)
-    {return vertex_attribute(adart); }
-    Vertex_attribute_const_handle
-    temp_vertex_attribute(Dart_const_handle adart) const
-    {return vertex_attribute(adart); }
-
-    /** Test if the lcc is valid.
-     * A Linear_cell_complex is valid if it is a valid Combinatorial_map with
-     * an attribute associated to each dart.
-     * @return true iff the map is valid.
-     */
-    bool is_valid() const
-    {
-      bool valid = Base::is_valid();
-      for (typename Dart_range::const_iterator it(this->darts().begin()),
-             itend(this->darts().end()); valid && it != itend; ++it)
-      {
-        if ( vertex_attribute(it)==null_handle )
-        {
-          std::cerr << "Map not valid: dart "<<&(*it)
-                    <<" does not have a vertex."<< std::endl;
-          valid = false;
-        }
-      }
-      return valid;
-    }
-
-    /** validate the lcc
-     */
-    void correct_invalid_attributes()
-    {
-      // Copy of the code in CMap::correct_invalid_attributes() to avoid
-      // 2 iterations through the darts of the map.
-
-      std::vector<int> marks(dimension+1);
-      for ( unsigned int i=0; i<=dimension; ++i)
-        marks[i] = -1;
-
-      Helper::template
-        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
-          run(this,&marks);
-
-      for ( typename Dart_range::iterator it(this->darts().begin()),
-             itend(this->darts().end()); it!=itend; ++it)
-      {
-        Helper::template Foreach_enabled_attributes
-          <internal::Correct_invalid_attributes_functor<Self> >::
-          run(this,it,&marks);
-
-        if ( vertex_attribute(it)==null_handle )
-        {
-          // If a dart don't have a 0-attribute, we create a Point at the origin
-          set_vertex_attribute(it, create_vertex_attribute(CGAL::ORIGIN));
-        }
-      }
-
-      for ( unsigned int i=0; i<=dimension; ++i)
-        if ( marks[i]!=-1 )
-        {
-          CGAL_assertion( this->is_whole_map_marked(marks[i]) );
-          free_mark(marks[i]);
-        }
-    }
-
-    /** test if the two given facets have the same geometry
-     * @return true iff the two facets have the same geometry.
-     */
-    bool are_facets_same_geometry(Dart_const_handle d1,
-                                  Dart_const_handle d2) const
-    {
-      typename Base::template Dart_of_orbit_range<1>::const_iterator
-        it1(*this,d1);
-      typename Base::template Dart_of_orbit_range<0>::const_iterator
-        it2(*this,d2);
-      bool samegeometry = true;
-      for ( ; samegeometry && it1.cont() && it2.cont(); ++it1, ++it2)
-      {
-        if ( this->other_extremity(it2)!=null_handle &&
-             point(it1)!=point(this->other_extremity(it2)) )
-          samegeometry = false;
-      }
-      if ( it1.cont() != it2.cont() ) samegeometry = false;
-      return samegeometry;
-    }
-
-    /// Sew3 the marked facets having same geometry
-    /// (a facet is considered marked if one of its dart is marked).
-    unsigned int sew3_same_facets(int AMark)
-    {
-      unsigned int res = 0;
-
-      std::map<Point, std::vector<Dart_handle> > one_dart_per_facet;
-      int mymark = this->get_new_mark();
-      CGAL_assertion( mymark!=-1 );
-
-      // First we fill the std::map by one dart per facet, and by using
-      // the minimal point as index.
-      for (typename Dart_range::iterator it(this->darts().begin()),
-             itend(this->darts().end()); it!=itend; ++it )
-      {
-        if ( !this->is_marked(it, mymark) && this->is_marked(it, AMark) )
-        {
-          Point min_point=point(it);
-          Dart_handle min_dart = it;
-          this->mark(it, mymark);
-          typename Base::template
-            Dart_of_orbit_range<1>::iterator it2(*this,it);
-          ++it2;
-          for ( ; it2.cont(); ++it2 )
-          {
-            Point cur_point=point(it2);
-            this->mark(it2, mymark);
-            if ( cur_point < min_point )
-            {
-              min_point = cur_point;
-              min_dart = it2;
-            }
-          }
-          one_dart_per_facet[min_point].push_back(min_dart);
-        }
-        else
-          this->mark(it, mymark);
-      }
-
-      // Second we run through the map: candidates for sew3 have necessary the
-      // same minimal point.
-      typename std::map<Point, std::vector<Dart_handle> >::iterator
-        itmap=one_dart_per_facet.begin(),
-        itmapend=one_dart_per_facet.end();
-
-      for ( ; itmap!=itmapend; ++itmap )
-      {
-        for ( typename std::vector<Dart_handle>::iterator
-                it1=(itmap->second).begin(),
-                it1end=(itmap->second).end(); it1!=it1end; ++it1 )
-        {
-          typename std::vector<Dart_handle>::iterator it2=it1;
-          for ( ++it2; it2!= it1end; ++it2 )
-          {
-            if ( *it1!=*it2 && is_free(*it1, 3) &&
-                 is_free(*it2, 3) &&
-                 are_facets_same_geometry(*it1,beta(*it2, 0)) )
-            {
-              ++res;
-              this->template sew<3>(*it1,beta(*it2, 0));
-            }
-          }
-        }
-      }
-
-      CGAL_assertion( this->is_whole_map_marked(mymark) );
-      this->free_mark(mymark);
-      return res;
-    }
-
-    /// Sew3 the facets having same geometry
-    /// (all the facets of the map are considered)
-    unsigned int sew3_same_facets()
-    {
-      int mark = this->get_new_mark();
-      this->negate_mark(mark);
-      unsigned int res=sew3_same_facets(mark);
-      this->free_mark(mark);
-      return res;
-    }
-
-    /** Create an edge given 2 Vertex_attribute_handle.
-     * @param h0 the first vertex handle.
-     * @param h1 the second vertex handle.
-     * @return the dart of the new edge incident to h0.
-     */
-    Dart_handle make_segment(Vertex_attribute_handle h0,
-                             Vertex_attribute_handle h1)
-    {
-      Dart_handle d1 = make_edge(*this);
-      set_vertex_attribute_of_dart(d1,h0);
-      set_vertex_attribute_of_dart(beta(d1, 2),h1);
-
-      return d1;
-    }
-
-    /** Create a segment given 2 points.
-     * @param p0 the first point.
-     * @param p1 the second point.
-     * @return the dart of the new segment incident to p0.
-     */
-    Dart_handle make_segment(const Point& p0,const Point& p1)
-    {
-      return make_segment(create_vertex_attribute(p0),
-                          create_vertex_attribute(p1));
-    }
-
-    /** Create a triangle given 3 Vertex_attribute_handle.
-     * @param h0 the first vertex handle.
-     * @param h1 the second vertex handle.
-     * @param h2 the third vertex handle.
-     * @return the dart of the new triangle incident to h0.
-     */
-    Dart_handle make_triangle(Vertex_attribute_handle h0,
-                              Vertex_attribute_handle h1,
-                              Vertex_attribute_handle h2)
-    {
-      Dart_handle d1 = make_combinatorial_polygon(*this,3);
-
-      set_vertex_attribute_of_dart(d1,h0);
-      set_vertex_attribute_of_dart(beta(d1, 1),h1);
-      set_vertex_attribute_of_dart(beta(d1, 0),h2);
-
-      return d1;
-    }
-
-    /** Create a triangle given 3 points.
-     * @param p0 the first point.
-     * @param p1 the second point.
-     * @param p2 the third point.
-     * @return the dart of the new triangle incident to p0.
-     */
-    Dart_handle make_triangle(const Point& p0,
-                              const Point& p1,
-                              const Point& p2)
-    {
-      return make_triangle(create_vertex_attribute(p0),
-                           create_vertex_attribute(p1),
-                           create_vertex_attribute(p2));
-    }
-
-    /** Create a quadrangle given 4 Vertex_attribute_handle.
-     * @param h0 the first vertex handle.
-     * @param h1 the second vertex handle.
-     * @param h2 the third vertex handle.
-     * @param h3 the fourth vertex handle.
-     * @return the dart of the new quadrilateral incident to h0.
-     */
-    Dart_handle make_quadrangle(Vertex_attribute_handle h0,
-                                Vertex_attribute_handle h1,
-                                Vertex_attribute_handle h2,
-                                Vertex_attribute_handle h3)
-    {
-      Dart_handle d1 = make_combinatorial_polygon(*this,4);
-
-      set_vertex_attribute_of_dart(d1,h0);
-      set_vertex_attribute_of_dart(beta(d1, 1),h1);
-      set_vertex_attribute_of_dart(beta(d1, 1, 1),h2);
-      set_vertex_attribute_of_dart(beta(d1, 0),h3);
-
-      return d1;
-    }
-
-    /** Create a quadrangle given 4 points.
-     * @param p0 the first point.
-     * @param p1 the second point.
-     * @param p2 the third point.
-     * @param p3 the fourth point.
-     * @return the dart of the new quadrangle incident to p0.
-     */
-    Dart_handle make_quadrangle(const Point& p0,
-                                const Point& p1,
-                                const Point& p2,
-                                const Point& p3)
-    {
-      return make_quadrangle(create_vertex_attribute(p0),
-                             create_vertex_attribute(p1),
-                             create_vertex_attribute(p2),
-                             create_vertex_attribute(p3));
-    }
-
-
-    /** Create a tetrahedron given 4 Vertex_attribute_handle.
-     * @param h0 the first vertex handle.
-     * @param h1 the second vertex handle.
-     * @param h2 the third vertex handle.
-     * @param h3 the fourth vertex handle.
-     * @return the dart of the new tetrahedron incident to h0 and to
-     *         facet h0,h1,h2.
-     */
-    Dart_handle make_tetrahedron(Vertex_attribute_handle h0,
-                                 Vertex_attribute_handle h1,
-                                 Vertex_attribute_handle h2,
-                                 Vertex_attribute_handle h3)
-    {
-      Dart_handle d1 = make_triangle(h0, h1, h2);
-      Dart_handle d2 = make_triangle(h1, h0, h3);
-      Dart_handle d3 = make_triangle(h1, h3, h2);
-      Dart_handle d4 = make_triangle(h3, h0, h2);
-
-      return make_combinatorial_tetrahedron(*this, d1, d2, d3, d4);
-    }
-
-    /** Create a tetrahedron given 4 points.
-     * @param p0 the first point.
-     * @param p1 the second point.
-     * @param p2 the third point.
-     * @param p3 the fourth point.
-     * @return the dart of the new tetrahedron incident to p0 and to
-     *         facet p0,p1,p2.
-     */
-    Dart_handle make_tetrahedron(const Point& p0,
-                                 const Point& p1,
-                                 const Point& p2,
-                                 const Point& p3)
-    {
-      return make_tetrahedron(create_vertex_attribute(p0),
-                              create_vertex_attribute(p1),
-                              create_vertex_attribute(p2),
-                              create_vertex_attribute(p3));
-    }
-
-    /** Create an hexahedron given 8 Vertex_attribute_handle.
-     *    (8 vertices, 12 edges and 6 facets)
-     * \verbatim
-     *       4----7
-     *      /|   /|
-     *     5----6 |
-     *     | 3--|-2
-     *     |/   |/
-     *     0----1
-     * \endverbatim
-     * @param h0 the first vertex handle.
-     * @param h1 the second vertex handle.
-     * @param h2 the third vertex handle.
-     * @param h3 the fourth vertex handle.
-     * @param h4 the fifth vertex handle.
-     * @param h5 the sixth vertex handle.
-     * @param h6 the seventh vertex handle.
-     * @param h7 the height vertex handle.
-     * @return the dart of the new hexahedron incident to h0 and to
-     *         the facet (h0,h5,h6,h1).
-     */
-    Dart_handle make_hexahedron(Vertex_attribute_handle h0,
-                                Vertex_attribute_handle h1,
-                                Vertex_attribute_handle h2,
-                                Vertex_attribute_handle h3,
-                                Vertex_attribute_handle h4,
-                                Vertex_attribute_handle h5,
-                                Vertex_attribute_handle h6,
-                                Vertex_attribute_handle h7)
-    {
-      Dart_handle d1 = make_quadrangle(h0, h5, h6, h1);
-      Dart_handle d2 = make_quadrangle(h1, h6, h7, h2);
-      Dart_handle d3 = make_quadrangle(h2, h7, h4, h3);
-      Dart_handle d4 = make_quadrangle(h3, h4, h5, h0);
-      Dart_handle d5 = make_quadrangle(h0, h1, h2, h3);
-      Dart_handle d6 = make_quadrangle(h5, h4, h7, h6);
-
-      return make_combinatorial_hexahedron(*this, d1, d2, d3, d4, d5, d6);
-    }
-
-    /** Create an hexahedron given 8 points.
-     * \verbatim
-     *       4----7
-     *      /|   /|
-     *     5----6 |
-     *     | 3--|-2
-     *     |/   |/
-     *     0----1
-     * \endverbatim
-     * @param p0 the first point.
-     * @param p1 the second point.
-     * @param p2 the third point.
-     * @param p3 the fourth point.
-     * @param p4 the fifth point.
-     * @param p5 the sixth point.
-     * @param p6 the seventh point.
-     * @param p7 the height point.
-     * @return the dart of the new hexahedron incident to p0
-     *         and to the facet (p0,p5,p6,p1).
-     */
-    Dart_handle make_hexahedron(const Point& p0,
-                                const Point& p1,
-                                const Point& p2,
-                                const Point& p3,
-                                const Point& p4,
-                                const Point& p5,
-                                const Point& p6,
-                                const Point& p7)
-    {
-      return make_hexahedron(create_vertex_attribute(p0),
-                             create_vertex_attribute(p1),
-                             create_vertex_attribute(p2),
-                             create_vertex_attribute(p3),
-                             create_vertex_attribute(p4),
-                             create_vertex_attribute(p5),
-                             create_vertex_attribute(p6),
-                             create_vertex_attribute(p7));
-    }
-
-    /** Compute the barycenter of a given cell.
-     * @param adart a dart incident to the cell.
-     * @param adim the dimension of the cell.
-     * @return the barycenter of the cell.
-     */
-    template<unsigned int i>
-    Point barycenter(Dart_const_handle adart) const
-    {
-      return CGAL::Barycenter_functor<Self, i>::run(*this, adart);
-    }
-
-    /** Insert a point in a given 1-cell.
-     * @param dh a dart handle to the 1-cell
-     * @param p the point to insert
-     * @param update_attributes a boolean to update the enabled attributes
-     * @return a dart handle to the new vertex containing p.
-     */
-    Dart_handle insert_point_in_cell_1(Dart_handle dh, const Point& p, bool update_attributes)
-    {
-      return CGAL::insert_cell_0_in_cell_1(*this, dh,
-                                           create_vertex_attribute(p),
-                                           update_attributes);
-    }
-
-    /** Insert a point in a given 2-cell.
-     * @param dh a dart handle to the 2-cell
-     * @param p the point to insert
-     * @param update_attributes a boolean to update the enabled attributes
-     * @return a dart handle to the new vertex containing p.
-     */
-    Dart_handle insert_point_in_cell_2(Dart_handle dh, const Point& p, bool update_attributes)
-    {
-      Vertex_attribute_handle v = create_vertex_attribute(p);
-
-      Dart_handle first = CGAL::insert_cell_0_in_cell_2(*this, dh, v, update_attributes);
-
-      if ( first==null_handle ) // If the triangulated facet was made of one dart
-        erase_vertex_attribute(v);
-
-#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
-      CGAL_assertion( is_valid() );
-#endif
-
-      return first;
-    }
-
-    /** Insert a point in a given i-cell.
-     * @param dh a dart handle to the i-cell
-     * @param p the point to insert
-     * @param update_attributes a boolean to update the enabled attributes
-     * @return a dart handle to the new vertex containing p.
-     */
-    template <unsigned int i>
-    Dart_handle insert_point_in_cell(Dart_handle dh, const Point& p, bool update_attributes = true)
-    {
-      CGAL_static_assertion(1<=i && i<=2);
-      if (i==1) return insert_point_in_cell_1(dh, p, update_attributes);
-      return insert_point_in_cell_2(dh, p, update_attributes);
-    }
-
-    /** Insert a dangling edge in a given facet.
-     * @param dh a dart of the facet (!=NULL).
-     * @param p the coordinates of the new vertex.
-     * @param update_attributes a boolean to update the enabled attributes
-     * @return a dart of the new edge, incident to the new vertex.
-     */
-    Dart_handle insert_dangling_cell_1_in_cell_2(Dart_handle dh,
-                                                 const Point& p,
-                                                 bool update_attributes = true)
-    {
-      return CGAL::insert_dangling_cell_1_in_cell_2
-          (*this, dh, create_vertex_attribute(p), update_attributes);
-    }
-
-    /** Insert a point in a given i-cell.
-     * @param dh a dart handle to the i-cell
-     * @param p the point to insert
-     * @param update_attributes a boolean to update the enabled attributes
-     * @return a dart handle to the new vertex containing p.
-     */
-    template <unsigned int i>
-    Dart_handle insert_barycenter_in_cell(Dart_handle dh, bool update_attributes = true)
-    { return insert_point_in_cell<i>(dh, barycenter<i>(dh), update_attributes); }
-
-    /** Compute the dual of a Linear_cell_complex.
-     * @param alcc the lcc in which we build the dual of this lcc.
-     * @param adart a dart of the initial lcc, NULL by default.
-     * @return adart of the dual lcc, the dual of adart if adart!=NULL,
-     *         any dart otherwise.
-     * As soon as we don't modify this lcc and alcc lcc, we can iterate
-     * simultaneously through all the darts of the two lcc and we have
-     * each time of the iteration two "dual" darts.
-     */
-    Dart_handle dual_points_at_barycenter(Self & alcc, Dart_handle adart=null_handle)
-    {
-      Dart_handle res = Base::dual(alcc, adart);
-
-      // Now the lcc alcc is topologically correct, we just need to add
-      // its geometry to each vertex (the barycenter of the corresponding
-      // dim-cell in the initial map).
-      typename Dart_range::iterator it2 = alcc.darts().begin();
-      for (typename Dart_range::iterator it(this->darts().begin());
-           it!=this->darts().end(); ++it, ++it2)
-      {
-        if (vertex_attribute(it2)==null_handle)
-        {
-          alcc.set_vertex_attribute(it2, alcc.create_vertex_attribute
-                                    (barycenter<dimension>(it)));
-        }
-      }
-
-      return res;
-    }
-
-    /** Set the status of the managment of the attributes of the CMap
-     */
-    void set_update_attributes(bool newval)
-    {
-      if (this->automatic_attributes_management == false && newval == true)
-      {
-        // We need to recode this function because correct_invalid_attributes
-        // is not a virtual function.
-        correct_invalid_attributes();
-      }
-
-      this->automatic_attributes_management = newval;
-    }
-  };
-
-  // Linear_cell_complex using compact container with handle.
-  // No difference with class Linear_cell_complex_base except the default
-  // template parameters for Refs class.
-  template < unsigned int d_, unsigned int ambient_dim = d_,
-             class Traits_ = Linear_cell_complex_traits<ambient_dim>,
-             class Items_ = Linear_cell_complex_min_items<d_>,
-             class Alloc_ = CGAL_ALLOCATOR(int),
-             template<unsigned int,class,class,class,class>
-             class CMap = Combinatorial_map_base,
-             class Storage_ = Linear_cell_complex_storage_1<d_, ambient_dim,
-                                                            Traits_, Items_,
-                                                            Alloc_> >
-    class Linear_cell_complex: public Linear_cell_complex_base<d_,
-        ambient_dim, Traits_, Items_, Alloc_, CMap,
-        Linear_cell_complex<d_, ambient_dim,
-               Traits_, Items_, Alloc_, CMap, Storage_>,
-        Storage_>
-    {
-    public:
-      typedef Linear_cell_complex<d_, ambient_dim,
-                          Traits_, Items_, Alloc_, CMap, Storage_>  Self;
-
-      typedef Linear_cell_complex_base<d_, ambient_dim,
-                          Traits_, Items_, Alloc_, CMap, Self, Storage_> Base;
-
-      typedef Traits_ Traits;
-      typedef Items_  Items;
-      typedef Alloc_  Alloc;
-
-      static const unsigned int ambient_dimension = Base::ambient_dimension;
-      static const unsigned int dimension = Base::dimension;
-
-      typedef typename Base::Dart_handle       Dart_handle;
-      typedef typename Base::Dart_const_handle Dart_const_handle;
-      typedef typename Base::Helper            Helper;
-
-      typedef typename Base::Point  Point;
-      typedef typename Base::Vector Vector;
-      typedef typename Base::FT     FT;
-
-      typedef typename Base::Dart_range Dart_range;
-
-      typedef typename Base::template Attribute_type<0>::type Vertex_attribute;
-      typedef typename Base::template Attribute_handle<0>::type
-      Vertex_attribute_handle;
-      typedef typename Base::template Attribute_const_handle<0>::type
-      Vertex_attribute_const_handle;
-
-      typedef typename Base::template Attribute_range<0>::type
-      Vertex_attribute_range;
-      typedef typename Base::template Attribute_const_range<0>::type
-      Vertex_attribute_const_range;
-
-      typedef typename Base::size_type size_type;
-
-      typedef typename Base::Use_index Use_index;
-      typedef typename Base::Storage Storage;
-
-      Linear_cell_complex() : Base()
-      {}
-
-      /** Copy the given linear cell complex into *this.
-       *  Note that both LCC can have different dimensions and/or non void attributes.
-       *  @param alcc the linear cell complex to copy.
-       *  @post *this is valid.
-       */
-      Linear_cell_complex(const Self & alcc)
-      { Base::template copy<Self>(alcc); }
-
-      template < class LCC2 >
-      Linear_cell_complex(const LCC2& alcc)
-      { Base::template copy<LCC2>(alcc);}
-
-      template < class LCC2, typename Converters >
-      Linear_cell_complex(const LCC2& alcc, Converters& converters)
-      { Base::template copy<LCC2, Converters>(alcc, converters);}
-
-      template < class LCC2, typename Converters, typename Pointconverter >
-      Linear_cell_complex(const LCC2& alcc, Converters& converters,
-                                    const Pointconverter& pointconverter)
-      { Base::template copy<LCC2, Converters, Pointconverter>
-            (alcc, converters, pointconverter);}
-
-    };
-
-} // namespace CGAL
-
-#endif // CGAL_LINEAR_CELL_COMPLEX_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_constructors.h b/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_constructors.h
deleted file mode 100644
index d87f88e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_constructors.h
+++ /dev/null
@@ -1,622 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H
-#define CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H 1
-
-#include <CGAL/Combinatorial_map_constructors.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Triangulation_3.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-#include <CGAL/IO/File_header_OFF.h>
-#include <CGAL/IO/File_scanner_OFF.h>
-#include <CGAL/Linear_cell_complex_incremental_builder.h>
-#include <iostream>
-#include <map>
-#include <vector>
-#include <list>
-
-namespace CGAL {
-
-  /** @file Linear_cell_complex_constructors.h
-   * Some construction operations for a linear cell complex from other
-   * CGAL data structures.
-   */
-
-  /** Import an embedded plane graph read into a flux into a
-   *  linear cell complex.
-   * @param alcc the linear cell complex where the graph will be imported.
-   * @param ais the istream where read the graph.
-   * @return A dart created during the convertion.
-   */
-  template< class LCC >
-  typename LCC::Dart_handle import_from_plane_graph(LCC& alcc,
-                                                    std::istream& ais)
-  {
-    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
-  
-    typedef typename LCC::Dart_handle Dart_handle;
-    typedef typename LCC::Traits::Direction_2 Direction;
-    typedef typename std::list<Dart_handle>::iterator List_iterator;
-    typedef typename std::map<Direction, Dart_handle>::iterator LCC_iterator;
-  
-    // Arrays of vertices
-    std::vector< typename LCC::Vertex_attribute_handle > initVertices;
-    std::vector< std::list<Dart_handle> > testVertices;
-
-    std::string txt;
-    typename LCC::FT x, y;
-    Dart_handle d1 = alcc.null_handle, d2 = alcc.null_handle;
-    unsigned int v1, v2;
-  
-    unsigned int nbSommets = 0;
-    unsigned int nbAretes = 0;
-  
-    ais >> nbSommets >> nbAretes;
-    while (nbSommets > 0)
-    {
-      if (!ais.good())
-      {
-        std::cout << "Problem: file does not contain enough vertices."
-                  << std::endl;
-        return alcc.null_handle;
-      }
-
-      ais >> iformat(x) >> iformat(y);
-      initVertices.push_back(alcc.create_vertex_attribute
-                             (typename LCC::Point(x, y)));
-      testVertices.push_back(std::list<Dart_handle>());
-      --nbSommets;
-    }
-
-    while (nbAretes > 0)
-    {
-      if (!ais.good())
-      {
-        std::cout << "Problem: file does not contain enough edges."
-                  << std::endl;
-        return alcc.null_handle;
-      }
-
-      // We read an egde (given by the number of its two vertices).
-      ais >> v1 >> v2;
-      --nbAretes;
-
-      CGAL_assertion(v1 < initVertices.size());
-      CGAL_assertion(v2 < initVertices.size());
-
-      d1 = alcc.create_dart(initVertices[v1]);
-      d2 = alcc.create_dart(initVertices[v2]);
-      alcc.template link_beta<2>(d1, d2);
-
-      testVertices[v1].push_back(d1);
-      testVertices[v2].push_back(d2);
-    }
-
-    // LCC associating directions and darts.
-    std::map<Direction, Dart_handle> tabDart;
-    List_iterator it;
-    LCC_iterator  it2;
-
-    Dart_handle first = alcc.null_handle;
-    Dart_handle prec = alcc.null_handle;
-    typename LCC::Point sommet1, sommet2;
-  
-    for (unsigned int i = 0; i < initVertices.size(); ++i)
-    {
-      it = testVertices[i].begin();
-      if (it != testVertices[i].end()) // Si la liste n'est pas vide.
-      {
-        // 1. We insert all the darts and sort them depending on the direction
-        tabDart.clear();
-      
-        sommet1 = alcc.point(*it);
-        sommet2 = alcc.point(alcc.beta(*it,2));
-      
-        tabDart.insert(std::pair<Direction, Dart_handle>
-                       (typename LCC::Traits::Construct_direction_2()
-                        (typename LCC::Traits::Construct_vector()
-                         (sommet1,sommet2)), *it));
-      
-        ++it;
-        while (it != testVertices[i].end())
-        {
-          sommet2 = alcc.point(alcc.beta(*it,2));
-          tabDart.insert(std::pair<Direction, Dart_handle>
-                         (typename LCC::Traits::Construct_direction_2()
-                          (typename LCC::Traits::Construct_vector()
-                           (sommet1,sommet2)), *it));
-          ++it;
-        }
-      
-        // 2. We run through the array of darts and 1 links darts.
-        it2 = tabDart.begin();
-        first = it2->second;
-        prec = first;
-        ++it2;
-
-        while (it2 != tabDart.end())
-        {
-          alcc.template link_beta<0>(prec, alcc.beta(it2->second,2));
-          prec = it2->second;
-          ++it2;
-        }
-        alcc.template link_beta<0>(prec, alcc.beta(first,2));
-      }
-    }
-
-    // We return a dart from the imported object.
-    return first;
-  }
-
-  /** Convert a given Triangulation_2 into a 2D linear cell complex.
-   * @param alcc the used linear cell complex.
-   * @param atr the Triangulation_2.
-   * @param aface_to_dart a pointer to a std::map associating to each
-   *        triangle of atr a corresponding dart in alcc. Not used if NULL.
-   * @return A dart incident to the infinite vertex.
-   */
-  template < class LCC, class Triangulation >
-  typename LCC::Dart_handle import_from_triangulation_2
-  (LCC& alcc, const Triangulation &atr,
-   std::map<typename Triangulation::Face_handle,
-            typename LCC::Dart_handle >* aface_to_dart=NULL)
-  {
-    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
-    
-    // Case of empty triangulations.
-    if (atr.number_of_vertices() == 0) return LCC::null_handle;
-
-    // Check the dimension.
-    if (atr.dimension() != 2) return LCC::null_handle;
-    CGAL_assertion(atr.is_valid());
-
-    typedef typename Triangulation::Vertex_handle         TVertex_handle;
-    typedef typename Triangulation::All_vertices_iterator TVertex_iterator;
-    typedef typename Triangulation::All_faces_iterator    TFace_iterator;
-    typedef typename std::map
-      < TFace_iterator, typename LCC::Dart_handle >::iterator itmap_tcell;
-
-    // Create vertices in the map and associate in a map
-    // TVertex_handle and vertices in the map.
-    std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV;
-    for (TVertex_iterator itv = atr.all_vertices_begin();
-         itv != atr.all_vertices_end(); ++itv)
-    {
-      TV[itv] = alcc.create_vertex_attribute(itv->point());
-    }
-
-    // Create the triangles and create a map to link Cell_iterator
-    // and triangles.
-    TFace_iterator it;
-
-    std::map<typename Triangulation::Face_handle, typename LCC::Dart_handle> TC;
-    std::map<typename Triangulation::Face_handle, typename LCC::Dart_handle>*
-      mytc = (aface_to_dart==NULL?&TC:aface_to_dart);
-    
-    itmap_tcell maptcell_it;
-
-    typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
-    typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
-
-    for (it = atr.all_faces_begin(); it != atr.all_faces_end(); ++it)
-    {
-      /*     if (it->vertex(0) != atr.infinite_vertex() &&
-             it->vertex(1) != atr.infinite_vertex() &&
-             it->vertex(2) != atr.infinite_vertex() &&
-             it->vertex(3) != atr.infinite_vertex())
-      */
-      {
-        res = alcc.make_triangle(TV[it->vertex(0)],
-                                 TV[it->vertex(1)],
-                                 TV[it->vertex(2)]);
-
-        if ( dart==LCC::null_handle )
-        {
-          if ( it->vertex(0) == atr.infinite_vertex() )
-            dart = res;
-          else if ( it->vertex(1) == atr.infinite_vertex() )
-            dart = alcc.beta(res,1);
-          else if ( it->vertex(2) == atr.infinite_vertex() )
-            dart = alcc.beta(res,0);
-        }
-        
-        for (unsigned int i=0; i<3; ++i)
-        {
-          switch (i)
-          {
-          case 0: cur = alcc.beta(res,1); break;
-          case 1: cur = alcc.beta(res,0); break;
-          case 2: cur = res; break;
-          }
-
-          maptcell_it = mytc->find(it->neighbor(i));
-          if (maptcell_it != mytc->end())
-          {
-            switch (atr.mirror_index(it,i) )
-            {
-            case 0: neighbor = alcc.beta(maptcell_it->second,1);
-              break;
-            case 1: neighbor = alcc.beta(maptcell_it->second,0);
-              break;
-            case 2: neighbor = maptcell_it->second; break;
-            }
-            alcc.template topo_sew<2>(cur, neighbor);
-          }
-        }
-        (*mytc)[it] = res;
-      }
-    }
-
-    CGAL_assertion(dart!=LCC::null_handle);
-    return dart;
-  }
-  
-  /** Convert a given Triangulation_3 into a 3D linear cell complex.
-   * @param alcc the used linear cell complex.
-   * @param atr the Triangulation_3.
-   * @param avol_to_dart a pointer to a std::map associating to each
-   *        tetrahedron of atr a corresponding dart in alcc. Not used if NULL.
-   * @return A dart incident to the infinite vertex.
-   */
-  template < class LCC, class Triangulation >
-  typename LCC::Dart_handle import_from_triangulation_3
-  (LCC& alcc, const Triangulation &atr,
-   std::map<typename Triangulation::Cell_handle,
-            typename LCC::Dart_handle >* avol_to_dart=NULL)
-  {
-    CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 );
-    
-    // Case of empty triangulations.
-    if (atr.number_of_vertices() == 0) return LCC::null_handle;
-
-    // Check the dimension.
-    if (atr.dimension() != 3) return LCC::null_handle;
-    CGAL_assertion(atr.is_valid());
-
-    typedef typename Triangulation::Vertex_handle    TVertex_handle;
-    typedef typename Triangulation::Vertex_iterator  TVertex_iterator;
-    typedef typename Triangulation::Cell_iterator    TCell_iterator;
-    typedef typename std::map
-      < TCell_iterator, typename LCC::Dart_handle >::iterator itmap_tcell;
-
-    // Create vertices in the map and associate in a map
-    // TVertex_handle and vertices in the map.
-    std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV;
-    for (TVertex_iterator itv = atr.vertices_begin();
-         itv != atr.vertices_end(); ++itv)
-    {
-      TV[itv] = alcc.create_vertex_attribute(itv->point());
-    }
-
-    // Create the tetrahedron and create a map to link Cell_iterator
-    // and tetrahedron.
-    TCell_iterator it;
-
-    std::map<typename Triangulation::Cell_handle, typename LCC::Dart_handle> TC;
-    std::map<typename Triangulation::Cell_handle, typename LCC::Dart_handle>*
-      mytc = (avol_to_dart==NULL?&TC:avol_to_dart);
-    
-    itmap_tcell maptcell_it;
-
-    typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
-    typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
-
-    for (it = atr.cells_begin(); it != atr.cells_end(); ++it)
-    {
-      /*     if (it->vertex(0) != atr.infinite_vertex() &&
-             it->vertex(1) != atr.infinite_vertex() &&
-             it->vertex(2) != atr.infinite_vertex() &&
-             it->vertex(3) != atr.infinite_vertex())
-      */
-      {
-        res = alcc.make_tetrahedron(TV[it->vertex(0)],
-                                    TV[it->vertex(1)],
-                                    TV[it->vertex(2)],
-                                    TV[it->vertex(3)]);
-
-        if ( dart==LCC::null_handle )
-        {
-          if ( it->vertex(0) == atr.infinite_vertex() )
-            dart = res;
-          else if ( it->vertex(1) == atr.infinite_vertex() )
-            dart = alcc.beta(res, 1);
-          else if ( it->vertex(2) == atr.infinite_vertex() )
-            dart = alcc.beta(res, 1, 1);
-          else if ( it->vertex(3) == atr.infinite_vertex() )
-            dart = alcc.beta(res, 2, 0);
-        }
-        
-        for (unsigned int i = 0; i < 4; ++i)
-        {
-          switch (i)
-          {
-          case 0: cur = alcc.beta(res, 1, 2); break;
-          case 1: cur = alcc.beta(res, 0, 2); break;
-          case 2: cur = alcc.beta(res, 2); break;
-          case 3: cur = res; break;
-          }
-
-          maptcell_it = mytc->find(it->neighbor(i));
-          if (maptcell_it != mytc->end())
-          {
-            switch (atr.mirror_index(it,i) )
-            {
-            case 0: neighbor = alcc.beta(maptcell_it->second, 1, 2);
-              break;
-            case 1: neighbor = alcc.beta(maptcell_it->second, 0, 2);
-              break;
-            case 2: neighbor = alcc.beta(maptcell_it->second, 2); break;
-            case 3: neighbor = maptcell_it->second; break;
-            }
-            while (alcc.temp_vertex_attribute(neighbor) !=
-                   alcc.temp_vertex_attribute(alcc.other_extremity(cur)) )
-              neighbor = alcc.beta(neighbor,1);
-            alcc.template topo_sew<3>(cur, neighbor);
-          }
-        }
-        (*mytc)[it] = res;
-      }
-    }
-    CGAL_assertion(dart!=LCC::null_handle);
-    return dart;
-  }
-
-  /** Import a given Polyhedron_3 into a Linear_cell_complex.
-   * @param alcc the linear cell complex where Polyhedron_3 will be converted.
-   * @param apoly the Polyhedron.
-   * @return A dart created during the convertion.
-   */
-  template< class LCC, class Polyhedron >
-  typename LCC::Dart_handle import_from_polyhedron_3(LCC& alcc, 
-                                                     const Polyhedron &apoly)
-  {
-    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==3 );
-
-    typedef typename Polyhedron::Halfedge_const_handle  Halfedge_handle;
-    typedef typename Polyhedron::Facet_const_iterator   Facet_iterator;
-    typedef typename Polyhedron::Halfedge_around_facet_const_circulator
-      HF_circulator;
-
-    typedef std::map < Halfedge_handle, typename LCC::Dart_handle> 
-      Halfedge_handle_map;
-    typedef typename Halfedge_handle_map::iterator itmap_hds;
-    Halfedge_handle_map TC;
-
-    itmap_hds it;
-    typename LCC::Dart_handle d = LCC::null_handle, prev = LCC::null_handle;
-    typename LCC::Dart_handle firstFacet = LCC::null_handle, firstAll = LCC::null_handle;
-
-    // First traversal to build the darts and link them.
-    for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
-    {
-      HF_circulator j = i->facet_begin();
-      prev = LCC::null_handle;
-      do
-      {
-        d = alcc.create_dart();
-        TC[j] = d;
-      
-        if (prev != LCC::null_handle) alcc.template link_beta<1>(prev, d);
-        else firstFacet = d;
-        it = TC.find(j->opposite());
-        if (it != TC.end())
-          alcc.template link_beta<2>(d, it->second);
-        prev = d;
-      }
-      while (++j != i->facet_begin());
-      alcc.template link_beta<1>(prev, firstFacet);
-      if (firstAll == LCC::null_handle) firstAll = firstFacet;
-    }
-
-    // Second traversal to update the geometry.
-    // We run one again through the facets of the HDS.
-    for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
-    {
-      HF_circulator j = i->facet_begin();
-      do
-      {
-        d = TC[j]; // Get the dart associated to the Halfedge
-        if (alcc.temp_vertex_attribute(d) == LCC::null_handle)
-        {
-          alcc.set_vertex_attribute
-            (d, alcc.create_vertex_attribute(j->opposite()->vertex()->point()));
-        }
-      }
-      while (++j != i->facet_begin());
-    }
-    return firstAll;
-  }
-
-  template < class LCC >
-  void load_off(LCC& alcc, std::istream& in)
-  {
-    File_header_OFF  m_file_header;
-    File_scanner_OFF scanner( in, m_file_header.verbose());
-    if ( ! in) return;
-    m_file_header = scanner;  // Remember file header after return.
-
-    Linear_cell_complex_incremental_builder_3<LCC> B( alcc);
-    B.begin_surface( scanner.size_of_vertices(),
-                     scanner.size_of_facets(),
-                     scanner.size_of_halfedges());
-
-    typedef typename LCC::Point Point;
-
-    // read in all vertices
-    std::size_t  i;
-    for ( i = 0; i < scanner.size_of_vertices(); i++) {
-      Point p;
-      file_scan_vertex( scanner, p);
-      B.add_vertex( p);
-      scanner.skip_to_next_vertex( i);
-    }
-    /* TODO rollback
-       if ( ! in  || B.error()) {
-       B.rollback();
-       in.clear( std::ios::badbit);
-       return;
-       }
-    */
-
-    // read in all facets
-    for ( i = 0; i < scanner.size_of_facets(); i++)
-    {
-      B.begin_facet();
-      std::size_t no;
-      scanner.scan_facet( no, i);
-      /* TODO manage errors
-         if( ! in || B.error() || no < 3) {
-         if ( scanner.verbose()) {
-         std::cerr << " " << std::endl;
-         std::cerr << "Polyhedron_scan_OFF<Traits>::" << std::endl;
-         std::cerr << "operator()(): input error: facet " << i
-         << " has less than 3 vertices." << std::endl;
-         }
-         B.rollback();
-         in.clear( std::ios::badbit);
-         return;
-         } */
-      for ( std::size_t j = 0; j < no; j++) {
-        std::size_t index;
-        scanner.scan_facet_vertex_index( index, i);
-        B.add_vertex_to_facet( index);
-      }
-      B.end_facet();
-      scanner.skip_to_next_facet( i);
-    }
-    /* TODO manage errors
-       if ( ! in  || B.error()) {
-       B.rollback();
-       in.clear( std::ios::badbit);
-       return;
-       }
-       if ( B.check_unconnected_vertices()) {
-       if ( ! B.remove_unconnected_vertices()) {
-       if ( scanner.verbose()) {
-       std::cerr << " " << std::endl;
-       std::cerr << "Polyhedron_scan_OFF<Traits>::" << std::endl;
-       std::cerr << "operator()(): input error: cannot "
-       "succesfully remove isolated vertices."
-       << std::endl;
-       }
-       B.rollback();
-       in.clear( std::ios::badbit);
-       return;
-       }
-       }*/
-    B.end_surface();
-  }
-
-  /** Convert a Polyhedron_3 read into a flux into 3D linear cell complex.
-   * @param alcc the linear cell complex where Polyhedron_3 will be converted.
-   * @param ais the istream where read the Polyhedron_3.
-   * @return A dart created during the convertion.
-   */
-  template < class LCC >
-  typename LCC::Dart_handle
-  import_from_polyhedron_3_flux(LCC& alcc, std::istream& ais)
-  {
-    if (!ais.good())
-    {
-      std::cout << "Error reading flux." << std::endl;
-      return LCC::null_handle;
-    }
-    CGAL::Polyhedron_3<typename LCC::Traits> P;
-    ais >> P;
-    return import_from_polyhedron_3<LCC, CGAL::Polyhedron_3
-                                    <typename LCC::Traits> > (alcc, P);
-  }
-
-  /** Export the alcc in off file format. If dimension>2, export all faces but only once.
-   */
-  template < class LCC >
-  void write_off(LCC& alcc, std::ostream& out)
-  {
-    File_header_OFF header(false);
-    header.set_binary(is_binary( out));
-    header.set_no_comments(!is_pretty( out));
-    File_writer_OFF writer( header);
-    writer.header().set_polyhedral_surface(true);
-    writer.header().set_halfedges( alcc.number_of_darts());
-
-    // Print header.
-    writer.write_header( out,
-                         alcc.number_of_vertex_attributes(),
-                         alcc.number_of_darts(),
-                         alcc.template one_dart_per_cell<2>().size() );
-
-    typedef typename LCC::Vertex_attribute_range::iterator VCI;
-    VCI vit, vend = alcc.vertex_attributes().end();
-    for ( vit = alcc.vertex_attributes().begin(); vit!=vend; ++vit )
-    {
-      writer.write_vertex( ::CGAL::to_double( vit->point().x()),
-                           ::CGAL::to_double( vit->point().y()),
-                           ::CGAL::to_double( vit->point().z()));
-    }
-
-    typedef Inverse_index< VCI > Index;
-    Index index( alcc.vertex_attributes().begin(),
-                 alcc.vertex_attributes().end());
-    writer.write_facet_header();
-
-    int m = alcc.get_new_mark();
-
-    for ( typename LCC::Dart_range::iterator itall = alcc.darts().begin(),
-            itallend = alcc.darts().end(); itall!=itallend; ++itall )
-    {
-      if ( !alcc.is_marked(itall, m) )
-      {
-        std::size_t n = 0;
-        // First we count the number of vertices of the face.
-        for ( typename LCC::template Dart_of_orbit_range<1>::iterator
-                itf=alcc.template darts_of_orbit<1>(itall).begin(),
-                itfend=alcc.template darts_of_orbit<1>(itall).end();
-              itf!=itfend; ++itf, ++n );
-
-        CGAL_assertion( n>=3 );
-        writer.write_facet_begin(n);
-
-        // Second we write the indices of vertices.
-        for ( typename LCC::template Dart_of_orbit_range<1>::iterator
-                itf=alcc.template darts_of_orbit<1>(itall).begin(),
-                itfend=alcc.template darts_of_orbit<1>(itall).end();
-              itf!=itfend; ++itf )
-        {
-          // TODO case with index
-          writer.write_facet_vertex_index(index[VCI(alcc.vertex_attribute(itf))]);
-
-          for ( typename LCC::template Dart_of_involution_basic_range<1>::iterator
-                  itinv=alcc.template darts_of_involution_basic<1>(itf, m).begin(),
-                  itinvend=alcc.template darts_of_involution_basic<1>(itf, m).end();
-                itinv!=itinvend; ++itinv )
-            alcc.mark(itinv, m);
-        }
-        writer.write_facet_end();
-      }
-    }
-    writer.write_footer();
-    alcc.free_mark(m);
-  }
-
-} // namespace CGAL
-
-#endif // CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_incremental_builder.h b/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_incremental_builder.h
deleted file mode 100644
index 937cf3e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_incremental_builder.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H
-#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H 1
-
-#include <CGAL/Linear_cell_complex.h>
-#include <vector>
-#include <cstddef>
-
-namespace CGAL {
-  template < class LCC_ >
-  class Linear_cell_complex_incremental_builder_3
-  {
-  public:
-    typedef LCC_ LCC;
-    typedef typename LCC::Dart_handle             Dart_handle;
-    typedef typename LCC::Vertex_attribute_handle Vertex_attribute_handle;
-    typedef typename LCC::Point                   Point_3;
-    typedef typename LCC::size_type               size_type;
-
-    Linear_cell_complex_incremental_builder_3(LCC & alcc) :
-      lcc(alcc)
-    {}
-
-    Vertex_attribute_handle add_vertex (const Point_3& p)
-    {
-      Vertex_attribute_handle res = lcc.create_vertex_attribute(p);
-      vertex_map.push_back(res);
-      vertex_to_dart_map.push_back(std::vector<Dart_handle>());
-      ++new_vertices;
-      return res;
-    }
-    
-    void begin_facet()
-    {
-      CGAL_assertion( first_dart==lcc.null_handle && prev_dart==lcc.null_handle );
-      // std::cout<<"Begin facet: "<<std::flush;
-    }
-
-    void add_vertex_to_facet(size_type i)
-    {
-      CGAL_assertion( i<new_vertices );
-      // std::cout<<i<<"  "<<std::flush;
-      Dart_handle cur = lcc.create_dart(vertex_map[i]);
-
-      if ( prev_dart!=lcc.null_handle )
-      {
-        lcc.template link_beta<1>(prev_dart, cur);
-
-        Dart_handle opposite=find_dart_between(i,lcc.temp_vertex_attribute(prev_dart));
-        if ( opposite!=lcc.null_handle )
-        {
-          CGAL_assertion( lcc.template is_free<2>(opposite) );
-          lcc.template link_beta<2>(prev_dart, opposite);
-        }
-
-        add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
-      }
-      else
-      {
-        first_dart   = cur;
-        first_vertex = i;
-      }
-
-      prev_dart   = cur;
-      prev_vertex = i;
-    }
-
-    void end_facet()
-    {
-      CGAL_assertion( first_dart!=lcc.null_handle && prev_dart!=lcc.null_handle );
-      lcc.template link_beta<1>(prev_dart, first_dart);
-
-      Dart_handle opposite =
-        find_dart_between(first_vertex,lcc.temp_vertex_attribute(prev_dart));
-      if ( opposite!=lcc.null_handle )
-      {
-        CGAL_assertion( lcc.template is_free<2>(opposite) );
-        lcc.template link_beta<2>(prev_dart, opposite);
-      }
-
-      add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
-
-      first_dart = lcc.null_handle;
-      prev_dart = lcc.null_handle;
-      // std::cout<<"  end facet."<<std::endl;
-    }
-
-    void begin_surface( std::size_t v, std::size_t /*f*/, std::size_t /*h*/)
-    {
-      new_vertices  = 0;
-      first_dart    = lcc.null_handle;
-      prev_dart     = lcc.null_handle;
-      vertex_map.clear();
-      vertex_to_dart_map.clear();
-      vertex_map.reserve(v);
-      vertex_to_dart_map.reserve(v);
-      // lcc.reserve(v,h);
-    }
-
-    void end_surface()
-    {}
-
-  protected:
-
-    Dart_handle find_dart_between(size_type i, Vertex_attribute_handle vh)
-    {
-      typename std::vector<Dart_handle>::reverse_iterator
-        it(vertex_to_dart_map[i].rbegin());
-      typename std::vector<Dart_handle>::reverse_iterator
-        itend(vertex_to_dart_map[i].rend());
-
-      for ( ; it!=itend; ++it )
-      {
-        if ( lcc.temp_vertex_attribute(lcc.template beta<1>(*it))==vh ) return (*it);
-      }
-      return lcc.null_handle;
-    }
-
-    void add_dart_in_vertex_to_dart_map( Dart_handle adart, size_type i )
-    {
-      CGAL_assertion( adart!=lcc.null_handle );
-      CGAL_assertion( !lcc.template is_free<1>(adart) );
-      vertex_to_dart_map[i].push_back(adart);
-    }
-
-  private:
-    std::vector<Vertex_attribute_handle> vertex_map;
-    std::vector<std::vector<Dart_handle> > vertex_to_dart_map;
-
-    LCC&                      lcc;
-    Dart_handle               first_dart;
-    Dart_handle               prev_dart;
-    size_type                 first_vertex;
-    size_type                 prev_vertex;
-    size_type                 new_vertices;
-  };
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_storages.h b/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_storages.h
deleted file mode 100644
index 29243b4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_storages.h
+++ /dev/null
@@ -1,441 +0,0 @@
-// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_LINEAR_CELL_COMPLEX_STORAGES_H
-#define CGAL_LINEAR_CELL_COMPLEX_STORAGES_H 1
-
-#include <CGAL/Combinatorial_map_storages.h>
-
-namespace CGAL {
-
-  /** @file Linear_cell_complex_storages.h
-   * Definition of storages for dD Linear cell complex.
-   */
-
-  // Storage of darts with compact container, beta with handles
-  // Copy of Combinatorial_map_storage_1 and add new types related
-  // to geometry (not possible to inherith because we use Self type
-  // as template parameter of Dart_wrapper. If we inherit, Self is not
-  // the correct type.)
-  template<unsigned int d_, unsigned int ambient_dim,
-           class Traits_, class Items_, class Alloc_ >
-  class Linear_cell_complex_storage_1
-  {
-  public:
-    typedef typename Traits_::Point  Point;
-    typedef typename Traits_::Vector Vector;
-    typedef typename Traits_::FT     FT;
-
-    typedef Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-    Items_, Alloc_> Self;
-    typedef CGAL::Tag_false Use_index;
-
-    typedef internal::Combinatorial_map_helper<Self> Helper;
-
-    typedef typename Items_::template Dart_wrapper<Self>  Dart_wrapper;
-    typedef typename Dart_wrapper::Dart                   Dart;
-    typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
-
-    typedef Compact_container<Dart,Dart_allocator>  Dart_container;
-
-    typedef typename Dart_container::iterator       Dart_handle;
-    typedef typename Dart_container::const_iterator Dart_const_handle;
-    typedef typename Dart_container::size_type      size_type;
-
-    typedef CGAL::Void* Null_handle_type;
-    static Null_handle_type null_handle;
-
-    typedef Items_ Items;
-    typedef Alloc_ Alloc;
-
-    template <typename T>
-    struct Container_for_attributes :
-        public Compact_container<T, typename Alloc_::template rebind<T>::other>
-    {};
-
-    /// Typedef for attributes
-    typedef typename Dart_wrapper::Attributes Attributes;
-
-    template<int i>
-    struct Attribute_type: public Helper::template Attribute_type<i>
-    {};
-    template<int i>
-    struct Attribute_handle: public Helper::template Attribute_handle<i>
-    {};
-    template<int i>
-    struct Attribute_const_handle:
-        public Helper::template Attribute_const_handle<i>
-    {};
-    template<int i>
-    struct Attribute_range: public Helper::template Attribute_range<i>
-    {};
-    template<int i>
-    struct Attribute_const_range:
-        public Helper::template Attribute_const_range<i>
-    {};
-
-    typedef typename Attribute_type<0>::type Vertex_attribute;
-    typedef typename Attribute_handle<0>::type Vertex_attribute_handle;
-    typedef typename Attribute_const_handle<0>::type
-    Vertex_attribute_const_handle;
-
-    typedef typename Attribute_range<0>::type Vertex_attribute_range;
-    typedef typename Attribute_const_range<0>::type
-    Vertex_attribute_const_range;
-
-    /// Number of marks
-    static const size_type NB_MARKS = 32;
-
-    /// The dimension of the combinatorial map.
-    static const unsigned int dimension = d_;
-
-    typedef Handle_hash_function Hash_function;
-
-    // Init
-    void init_storage()
-    {
-#ifdef CGAL_CMAP_DEPRECATED
-      // We must do this ony once, but problem because null_dart_handle
-      // is static !
-      if ( mnull_dart_container.empty() )
-#endif // CGAL_CMAP_DEPRECATED
-      { // emplace null_dart; initialized in Combinatorial_map class
-        null_dart_handle = mnull_dart_container.emplace();
-      }
-    }
-
-    /** Return if this dart is free for adimension.
-       * @param dh a dart handle
-       * @param i the dimension.
-       * @return true iff dh is linked with NULL for \em adimension.
-       */
-    template<unsigned int i>
-    bool is_free(Dart_const_handle dh) const
-    {
-      CGAL_assertion( dh!=NULL );
-      CGAL_assertion(i <= dimension);
-      return dh->mbeta[i]==null_dart_handle;
-    }
-    bool is_free(Dart_const_handle dh, unsigned int i) const
-    {
-      CGAL_assertion( dh!=NULL );
-      CGAL_assertion(i <= dimension);
-      return dh->mbeta[i]==null_dart_handle;
-    }
-
-    /// Set simultaneously all the marks of this dart to a given value.
-    void set_dart_marks(Dart_const_handle ADart,
-                        const std::bitset<NB_MARKS>& amarks) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->set_marks(amarks);
-    }
-    /// Return all the marks of a dart.
-    std::bitset<NB_MARKS> get_dart_marks(Dart_const_handle ADart) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      return ADart->get_marks();
-    }
-    /// Return the mark value of dart a given mark number.
-    bool get_dart_mark(Dart_const_handle ADart, int amark) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      return ADart->get_mark(amark);
-    }
-
-    /// Set the mark of a given mark number to a given value.
-    void set_dart_mark(Dart_const_handle ADart, int amark, bool avalue) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->set_mark(amark, avalue);
-    }
-
-    /// Flip the mark of a given mark number to a given value.
-    void flip_dart_mark(Dart_const_handle ADart, int amark) const
-    {
-      CGAL_assertion( ADart!=NULL );
-      ADart->flip_mark(amark);
-    }
-
-    // Access to beta maps
-    Dart_handle get_beta(Dart_handle ADart, int B1)
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return ADart->mbeta[B1];
-    }
-    Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-    template<int B1>
-    Dart_handle get_beta(Dart_handle ADart)
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-    template<int B1>
-    Dart_const_handle get_beta(Dart_const_handle ADart) const
-    {
-      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
-      return  ADart->mbeta[B1];
-    }
-
-    // return a handle on the i-attribute
-    template<unsigned int i>
-    typename Attribute_handle<i>::type attribute(Dart_handle ADart)
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                       "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-          (ADart->mattribute_handles);
-    }
-    template<unsigned int i>
-    typename Attribute_const_handle<i>::type
-    attribute(Dart_const_handle ADart) const
-    {
-      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
-                       "attribute<i> called but i-attributes are disabled.");
-      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-          (ADart->mattribute_handles);
-    }
-
-    // get the attribute given its handle
-    template<unsigned int i>
-    typename Attribute_type<i>::type& get_attribute
-    (typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type&
-    get_attribute(typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-
-    Dart & get_dart(Dart_handle ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-    const Dart & get_dart(Dart_const_handle ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return *ah;
-    }
-
-    // Get the dart of the given attribute
-    template<unsigned int i>
-    Dart_handle dart_of_attribute(typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->dart();
-    }
-    template<unsigned int i>
-    Dart_const_handle dart_of_attribute
-    (typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->dart();
-    }
-
-    // Set the dart of the given attribute
-    template<unsigned int i>
-    void set_dart_of_attribute(typename Attribute_handle<i>::type ah,
-                               Dart_handle adart)
-    {
-      CGAL_assertion( ah!=NULL );
-      ah->set_dart(adart);
-    }
-
-    // Get the info of the given attribute
-    template<unsigned int i>
-    typename Attribute_type<i>::type::Info &
-    info_of_attribute(typename Attribute_handle<i>::type ah)
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->info();
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type::Info &
-    info_of_attribute(typename Attribute_const_handle<i>::type ah) const
-    {
-      CGAL_assertion( ah!=NULL );
-      return ah->info();
-    }
-
-    // Get the info of the given dart
-    template<unsigned int i>
-    typename Attribute_type<i>::type::Info & info(Dart_handle adart)
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return info_of_attribute<i>(attribute<i>(adart));
-    }
-    template<unsigned int i>
-    const typename Attribute_type<i>::type::Info &
-    info(Dart_const_handle adart) const
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return info_of_attribute<i>(attribute<i>(adart));
-    }
-
-    // Get the dart of the i-cell attribute associated with the given dart
-    template<unsigned int i>
-    Dart_handle & dart(Dart_handle adart)
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return dart_of_attribute<i>(attribute<i>(adart));
-    }
-    template<unsigned int i>
-    Dart_const_handle dart(Dart_const_handle adart) const
-    {
-      CGAL_assertion( adart!=NULL );
-      CGAL_assertion( attribute<i>(adart)!=NULL );
-      return dart_of_attribute<i>(attribute<i>(adart));
-    }
-
-    // Get the dart of the given 0-attribute
-    Point & point_of_vertex_attribute(typename Attribute_handle<0>::type vh)
-    {
-      CGAL_assertion( vh!=NULL );
-      return get_attribute<0>(vh).point();
-    }
-
-    const Point & point_of_vertex_attribute
-    (typename Attribute_const_handle<0>::type vh) const
-    {
-      CGAL_assertion( vh!=NULL );
-      return get_attribute<0>(vh).point();
-    }
-
-    void display_dart(Dart_const_handle ADart) const
-    { std::cout<<&*ADart; }
-
-    template<unsigned int i>
-    void display_attribute(typename Attribute_const_handle<i>::type ah) const
-    { std::cout<<&*ah; }
-
-  protected:
-    // Set the handle on the i th attribute
-    template<unsigned int i>
-    void basic_set_dart_attribute(Dart_handle dh,
-                                  typename Attribute_handle<i>::type ah)
-    {
-      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
-          (dh->mattribute_handles) = ah;
-    }
-
-    /** Link a dart with a given dart for a given dimension.
-       * @param adart the dart to link.
-       * @param adart2 the dart to link with.
-       * @param i the dimension.
-       */
-    template<unsigned int i>
-    void dart_link_beta(Dart_handle adart, Dart_handle adart2)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(adart!=NULL && adart2!=NULL);
-      CGAL_assertion(adart!=null_dart_handle);
-      adart->mbeta[i] = adart2;
-    }
-    void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i)
-    {
-      CGAL_assertion(i <= dimension);
-      CGAL_assertion(adart!=NULL && adart2!=NULL);
-      CGAL_assertion(adart!=null_dart_handle);
-      adart->mbeta[i] = adart2;
-    }
-
-    /** Unlink a dart for a given dimension.
-       * @param adart a dart.
-       * @param i the dimension.
-       */
-    template<unsigned int i>
-    void dart_unlink_beta(Dart_handle adart)
-    {
-      CGAL_assertion(adart!=NULL && i <= dimension);
-      adart->mbeta[i] = null_dart_handle;
-    }
-    void dart_unlink_beta(Dart_handle adart, unsigned int i)
-    {
-      CGAL_assertion(adart!=NULL && i <= dimension);
-      adart->mbeta[i] = null_dart_handle;
-    }
-
-  public:
-    /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle.
-#ifdef CGAL_CMAP_DEPRECATED
-    static
-#endif // CGAL_CMAP_DEPRECATED
-    Dart_handle null_dart_handle; // Todo Dart_const_handle ??
-
-  protected:
-    /// Dart container.
-    Dart_container mdarts;
-
-    /// Container for the null_dart_handle, static data member.
-#ifdef CGAL_CMAP_DEPRECATED
-    static
-#endif // CGAL_CMAP_DEPRECATED
-    Dart_container mnull_dart_container;
-
-    /// Tuple of attributes containers
-    typename Helper::Attribute_containers mattribute_containers;
-  };
-
-  /// null_handle
-  template <unsigned int d_, unsigned int ambient_dim,
-           class Traits_, class Items_, class Alloc_ >
-  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                         Items_, Alloc_>::Null_handle_type
-  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                Items_, Alloc_>::null_handle = NULL;
-
-#ifdef CGAL_CMAP_DEPRECATED
-  /// Allocation of static data members
-  /// mnull_dart_container
-  template <unsigned int d_, unsigned int ambient_dim,
-           class Traits_, class Items_, class Alloc_ >
-  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                         Items_, Alloc_>::Dart_container
-  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                         Items_, Alloc_>::mnull_dart_container;
-
-  /// null_dart_handle
-  template <unsigned int d_, unsigned int ambient_dim,
-           class Traits_, class Items_, class Alloc_ >
-  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                         Items_, Alloc_>::Dart_handle
-  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
-                                         Items_, Alloc_>::null_dart_handle;
-  // =  mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
-  // Does not work on windows => segfault
-  // Thus we initialize null_dart_handle in the Combinatorial_map constructor
-#endif // CGAL_CMAP_DEPRECATED
-
-} // namespace CGAL
-
-#endif // CGAL_LINEAR_CELL_COMPLEX_STORAGES_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/MP_Float.h b/3rdparty/CGAL-4.6/include/CGAL/MP_Float.h
deleted file mode 100644
index ce26c05..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/MP_Float.h
+++ /dev/null
@@ -1,909 +0,0 @@
-// Copyright (c) 2001-2007  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_MP_FLOAT_H
-#define CGAL_MP_FLOAT_H
-
-#include <CGAL/number_type_basic.h>
-#include <CGAL/Algebraic_structure_traits.h>
-#include <CGAL/Real_embeddable_traits.h>
-#include <CGAL/Coercion_traits.h>
-#include <CGAL/Quotient.h>
-#include <CGAL/Sqrt_extension.h>
-
-#include <CGAL/utils.h>
-
-#include <CGAL/Interval_nt.h>
-#include <iostream>
-#include <vector>
-#include <algorithm>
-
-// MP_Float : multiprecision scaled integers.
-
-// Some invariants on the internal representation :
-// - zero is represented by an empty vector, and whatever exp.
-// - no leading or trailing zero in the vector => unique
-
-// The main algorithms are :
-// - Addition/Subtraction
-// - Multiplication
-// - Integral division div(), gcd(), operator%().
-// - Comparison
-// - to_double() / to_interval()
-// - Construction from a double.
-// - IOs
-
-// TODO :
-// - The exponent really overflows sometimes -> make it multiprecision.
-// - Write a generic wrapper that adds an exponent to be used by MP integers.
-// - Karatsuba (or other) ?  Would be fun to implement at least.
-// - Division, sqrt... : different options :
-//   - nothing
-//   - convert to double, take approximation, compute over double, reconstruct
-
-namespace CGAL {
-
-class MP_Float;
-
-template < typename > class Quotient; // Needed for overloaded To_double
-
-namespace INTERN_MP_FLOAT {
-
-Comparison_result compare(const MP_Float&, const MP_Float&);
-
-MP_Float square(const MP_Float&);
-
-// to_double() returns, not the closest double, but a one bit error is allowed.
-// We guarantee : to_double(MP_Float(double d)) == d.
-
-double to_double(const MP_Float&);
-
-double to_double(const Quotient<MP_Float>&);
-
-std::pair<double,double> to_interval(const MP_Float &);
-
-std::pair<double,double> to_interval(const Quotient<MP_Float>&);
-
-MP_Float div(const MP_Float& n1, const MP_Float& n2);
-
-MP_Float gcd(const MP_Float& a, const MP_Float& b);
-  
-} //namespace INTERN_MP_FLOAT
-
-std::pair<double, int>
-to_double_exp(const MP_Float &b);
-
-// Returns (first * 2^second), an interval surrounding b.
-std::pair<std::pair<double, double>, int>
-to_interval_exp(const MP_Float &b);
-
-std::ostream &
-operator<< (std::ostream & os, const MP_Float &b);
-
-// This one is for debug.
-std::ostream &
-print (std::ostream & os, const MP_Float &b);
-
-std::istream &
-operator>> (std::istream & is, MP_Float &b);
-
-MP_Float operator+(const MP_Float &a, const MP_Float &b);
-
-MP_Float operator-(const MP_Float &a, const MP_Float &b);
-
-MP_Float operator*(const MP_Float &a, const MP_Float &b);
-
-MP_Float operator%(const MP_Float &a, const MP_Float &b);
-
-
-class MP_Float
-{
-public:
-  typedef short      limb;
-  typedef int        limb2;
-  typedef double     exponent_type;
-
-  typedef std::vector<limb>  V;
-  typedef V::const_iterator  const_iterator;
-  typedef V::iterator        iterator;
-
-private:
-
-  void remove_leading_zeros()
-  {
-    while (!v.empty() && v.back() == 0)
-      v.pop_back();
-  }
-
-  void remove_trailing_zeros()
-  {
-    if (v.empty() || v.front() != 0)
-      return;
-
-    iterator i = v.begin();
-    for (++i; *i == 0; ++i)
-      ;
-    exp += i-v.begin();
-    v.erase(v.begin(), i);
-  }
-
-  // The constructors from float/double/long_double are factorized in the
-  // following template :
-  template < typename T >
-  void construct_from_builtin_fp_type(T d);
-
-public:
-#ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
-    int tam() const { return v.size(); }
-#endif
-
-  // Splits a limb2 into 2 limbs (high and low).
-  static
-  void split(limb2 l, limb & high, limb & low)
-  {
-    const unsigned int sizeof_limb=8*sizeof(limb);
-    const limb2 mask= ~( static_cast<limb2>(-1) << sizeof_limb ); //0000ffff
-    //Note: For Integer type, if the destination type is signed, the value is unchanged 
-    //if it can be represented in the destination type)
-    low=static_cast<limb>(l & mask); //extract low bits from l 
-    high = (l - low) >> sizeof_limb; //extract high bits from l
-    
-    CGAL_postcondition ( l == low + ( static_cast<limb2>(high) << sizeof_limb ) );
-  }
-
-  // Given a limb2, returns the higher limb.
-  static
-  limb higher_limb(limb2 l)
-  {
-      limb high, low;
-      split(l, high, low);
-      return high;
-  }
-
-  void canonicalize()
-  {
-    remove_leading_zeros();
-    remove_trailing_zeros();
-  }
-
-  MP_Float()
-      : exp(0)
-  {
-    CGAL_assertion(sizeof(limb2) == 2*sizeof(limb));
-    CGAL_assertion(v.empty());
-    // Creates zero.
-  }
-
-#if 0
-  // Causes ambiguities
-  MP_Float(limb i)
-  : v(1,i), exp(0)
-  {
-    remove_leading_zeros();
-  }
-#endif
-
-  MP_Float(limb2 i)
-  : v(2), exp(0)
-  {
-    split(i, v[1], v[0]);
-    canonicalize();
-  }
-
-  MP_Float(float d);
-
-  MP_Float(double d);
-
-  MP_Float(long double d);
-
-  MP_Float operator+() const {
-    return *this;
-  }
-
-  MP_Float operator-() const
-  {
-    return MP_Float() - *this;
-  }
-
-  MP_Float& operator+=(const MP_Float &a) { return *this = *this + a; }
-  MP_Float& operator-=(const MP_Float &a) { return *this = *this - a; }
-  MP_Float& operator*=(const MP_Float &a) { return *this = *this * a; }
-  MP_Float& operator%=(const MP_Float &a) { return *this = *this % a; }
-
-  exponent_type max_exp() const
-  {
-    return v.size() + exp;
-  }
-
-  exponent_type min_exp() const
-  {
-    return exp;
-  }
-
-  limb of_exp(exponent_type i) const
-  {
-    if (i < exp || i >= max_exp())
-      return 0;
-    return v[static_cast<int>(i-exp)];
-  }
-
-  bool is_zero() const
-  {
-    return v.empty();
-  }
-
-  Sign sign() const
-  {
-    if (v.empty())
-      return ZERO;
-    if (v.back()>0)
-      return POSITIVE;
-    CGAL_assertion(v.back()<0);
-    return NEGATIVE;
-  }
-
-  void clear()
-  {
-    v.clear();
-    exp = 0;
-  }
-
-  void swap(MP_Float &m)
-  {
-    std::swap(v, m.v);
-    std::swap(exp, m.exp);
-  }
-
-  // Converts to a rational type (e.g. Gmpq).
-  template < typename T >
-  T to_rational() const
-  {
-    const unsigned log_limb = 8 * sizeof(MP_Float::limb);
-
-    if (is_zero())
-      return 0;
-
-    MP_Float::const_iterator i;
-    exponent_type exp2 = min_exp() * log_limb;
-    T res = 0;
-
-    for (i = v.begin(); i != v.end(); ++i)
-    {
-      res += T(std::ldexp(static_cast<double>(*i),static_cast<int>(exp2)));
-      exp2 += log_limb;
-    }
-
-    return res;
-  }
-
-  std::size_t size() const
-  {
-    return v.size();
-  }
-
-  // Returns a scaling factor (in limbs) which would be good to extract to get
-  // a value with an exponent close to 0.
-  exponent_type find_scale() const
-  {
-    return exp + v.size();
-  }
-
-  // Rescale the value by some factor (in limbs).  (substract the exponent)
-  void rescale(exponent_type scale)
-  {
-    if (v.size() != 0)
-      exp -= scale;
-  }
-
-  // Accessory function that finds the least significant bit set (its position).
-  static unsigned short 
-  lsb(limb l)
-  {
-    unsigned short nb = 0;
-    for (; (l&1)==0; ++nb, l>>=1)
-      ;
-    return nb;
-  }
-
-  // This one is needed for normalizing gcd so that the mantissa is odd
-  // and non-negative, and the exponent is 0.
-  void gcd_normalize()
-  {
-    const unsigned log_limb = 8 * sizeof(MP_Float::limb);
-    if (is_zero())
-      return;
-    // First find how many least significant bits are 0 in the last digit.
-    unsigned short nb = lsb(v[0]);
-    if (nb != 0)
-      *this = *this * (1<<(log_limb-nb));
-    CGAL_assertion((v[0]&1) != 0);
-    exp=0;
-    if (sign() == NEGATIVE)
-      *this = - *this;
-  }
-
-  MP_Float unit_part() const
-  {
-    if (is_zero())
-      return 1;
-    MP_Float r = (sign() > 0) ? *this : - *this;
-    CGAL_assertion(r.v.begin() != r.v.end());
-    unsigned short nb = lsb(r.v[0]);
-    r.v.clear();
-    r.v.push_back(1<<nb);
-    return (sign() > 0) ? r : -r;
-  }
-
-  bool is_integer() const
-  {
-    return is_zero() || (exp >= 0);
-  }
-
-  V v;
-  exponent_type exp;
-};
-
-namespace internal{
-std::pair<MP_Float, MP_Float> // <quotient, remainder>
-division(const MP_Float & n, const MP_Float & d);
-} // namespace internal
-
-inline
-void swap(MP_Float &m, MP_Float &n)
-{ m.swap(n); }
-
-inline
-bool operator<(const MP_Float &a, const MP_Float &b)
-{ return INTERN_MP_FLOAT::compare(a, b) == SMALLER; }
-
-inline
-bool operator>(const MP_Float &a, const MP_Float &b)
-{ return b < a; }
-
-inline
-bool operator>=(const MP_Float &a, const MP_Float &b)
-{ return ! (a < b); }
-
-inline
-bool operator<=(const MP_Float &a, const MP_Float &b)
-{ return ! (a > b); }
-
-inline
-bool operator==(const MP_Float &a, const MP_Float &b)
-{ return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); }
-
-inline
-bool operator!=(const MP_Float &a, const MP_Float &b)
-{ return ! (a == b); }
-
-MP_Float
-approximate_sqrt(const MP_Float &d);
-
-MP_Float
-approximate_division(const MP_Float &n, const MP_Float &d);
-
-
-
-// Algebraic structure traits specialization
-template <> class Algebraic_structure_traits< MP_Float >
-  : public Algebraic_structure_traits_base< MP_Float,
-                                            Unique_factorization_domain_tag
-	    // with some work on mod/div it could be Euclidean_ring_tag
-                                          >  {
-  public:
-
-    typedef Tag_true            Is_exact;
-    typedef Tag_true            Is_numerical_sensitive;
-
-    struct Unit_part
-      : public std::unary_function< Type , Type >
-    {
-      Type operator()(const Type &x) const {
-        return x.unit_part();
-      }
-    };
-
-    struct Integral_division
-        : public std::binary_function< Type,
-                                 Type,
-                                 Type > {
-    public:
-        Type operator()(
-                const Type& x,
-                const Type& y ) const {
-            std::pair<MP_Float, MP_Float> res = internal::division(x, y);
-            CGAL_assertion_msg(res.second == 0,
-                "exact_division() called with operands which do not divide");
-            return res.first;
-        }
-    };
-
-
-    class Square
-      : public std::unary_function< Type, Type > {
-      public:
-        Type operator()( const Type& x ) const {
-          return INTERN_MP_FLOAT::square(x);
-        }
-    };
-
-    class Gcd
-      : public std::binary_function< Type, Type,
-                                Type > {
-      public:
-        Type operator()( const Type& x,
-                                        const Type& y ) const {
-          return INTERN_MP_FLOAT::gcd( x, y );
-        }
-    };
-
-    class Div
-      : public std::binary_function< Type, Type,
-                                Type > {
-      public:
-        Type operator()( const Type& x,
-                                        const Type& y ) const {
-          return INTERN_MP_FLOAT::div( x, y );
-        }
-    };
-
-  typedef INTERN_AST::Mod_per_operator< Type > Mod;
-// Default implementation of Divides functor for unique factorization domains
-  // x divides y if gcd(y,x) equals x up to inverses 
-  class Divides 
-    : public std::binary_function<Type,Type,bool>{ 
-  public:
-    bool operator()( const Type& x,  const Type& y) const {  
-      return internal::division(y,x).second == 0 ;
-    }
-    // second operator computing q = x/y 
-    bool operator()( const Type& x,  const Type& y, Type& q) const {    
-      std::pair<Type,Type> qr = internal::division(y,x);
-      q=qr.first;
-      return qr.second == 0;
-      
-    }
-    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type , bool)
-  };
-};
-
-// Real embeddable traits
-template <> class Real_embeddable_traits< MP_Float >
-  : public INTERN_RET::Real_embeddable_traits_base< MP_Float , CGAL::Tag_true > {
-  public:
-
-    class Sgn
-      : public std::unary_function< Type, ::CGAL::Sign > {
-      public:
-        ::CGAL::Sign operator()( const Type& x ) const {
-          return x.sign();
-        }
-    };
-
-    class Compare
-      : public std::binary_function< Type, Type,
-                                Comparison_result > {
-      public:
-        Comparison_result operator()( const Type& x,
-                                            const Type& y ) const {
-          return INTERN_MP_FLOAT::compare( x, y );
-        }
-    };
-
-    class To_double
-      : public std::unary_function< Type, double > {
-      public:
-        double operator()( const Type& x ) const {
-          return INTERN_MP_FLOAT::to_double( x );
-        }
-    };
-
-    class To_interval
-      : public std::unary_function< Type, std::pair< double, double > > {
-      public:
-        std::pair<double, double> operator()( const Type& x ) const {
-          return INTERN_MP_FLOAT::to_interval( x );
-        }
-    };
-};
-
-
-
-namespace INTERN_MP_FLOAT{
-
-//Sqrt_extension internally uses Algebraic_structure_traits
-template <class ACDE_TAG_, class FP_TAG>  
-double
-to_double(const Sqrt_extension<MP_Float,MP_Float,ACDE_TAG_,FP_TAG> &x)
-{
-  typedef MP_Float RT;
-  typedef Quotient<RT> FT;
-  typedef CGAL::Rational_traits< FT > Rational;
-  Rational r;
-  const RT r1 = r.numerator(x.a0());
-  const RT d1 = r.denominator(x.a0());
-
-  if(x.is_rational()) {
-    std::pair<double, int> n = to_double_exp(r1);
-    std::pair<double, int> d = to_double_exp(d1);
-    double scale = std::ldexp(1.0, n.second - d.second);
-    return (n.first / d.first) * scale;
-  }
-
-  const RT r2 = r.numerator(x.a1());
-  const RT d2 = r.denominator(x.a1());
-  const RT r3 = r.numerator(x.root());
-  const RT d3 = r.denominator(x.root());
-
-  std::pair<double, int> n1 = to_double_exp(r1);
-  std::pair<double, int> v1 = to_double_exp(d1);
-  double scale1 = std::ldexp(1.0, n1.second - v1.second);
-
-  std::pair<double, int> n2 = to_double_exp(r2);
-  std::pair<double, int> v2 = to_double_exp(d2);
-  double scale2 = std::ldexp(1.0, n2.second - v2.second);
-
-  std::pair<double, int> n3 = to_double_exp(r3);
-  std::pair<double, int> v3 = to_double_exp(d3);
-  double scale3 = std::ldexp(1.0, n3.second - v3.second);
-
-  return ((n1.first / v1.first) * scale1) + 
-         ((n2.first / v2.first) * scale2) *
-         std::sqrt((n3.first / v3.first) * scale3);
-}
-
-} //namespace INTERN_MP_FLOAT
-
-
-namespace internal {
-// This compares the absolute values of the odd-mantissa.
-// (take the mantissas, get rid of all powers of 2, compare
-// the absolute values)
-inline
-Sign
-compare_bitlength(const MP_Float &a, const MP_Float &b)
-{
-  if (a.is_zero())
-    return b.is_zero() ? EQUAL : SMALLER;
-  if (b.is_zero())
-    return LARGER;
-
-  //Real_embeddable_traits<MP_Float>::Abs abs;
-
-  MP_Float aa = CGAL_NTS abs(a);
-  MP_Float bb = CGAL_NTS abs(b);
-
-  if (aa.size() > (bb.size() + 2)) return LARGER;
-  if (bb.size() > (aa.size() + 2)) return SMALLER;
-
-  // multiply by 2 till last bit is 1.
-  while (((aa.v[0]) & 1) == 0) // last bit is zero
-    aa = aa + aa;
-
-  while (((bb.v[0]) & 1) == 0) // last bit is zero
-    bb = bb + bb;
-
-  // sizes might have changed
-  if (aa.size() > bb.size()) return LARGER;
-  if (aa.size() < bb.size()) return SMALLER;
-
-  for (std::size_t i = aa.size(); i > 0; --i)
-  {
-    if (aa.v[i-1] > bb.v[i-1]) return LARGER;
-    if (aa.v[i-1] < bb.v[i-1]) return SMALLER;
-  }
-  return EQUAL;
-}
-
-inline // Move it to libCGAL once it's stable.
-std::pair<MP_Float, MP_Float> // <quotient, remainder>
-division(const MP_Float & n, const MP_Float & d)
-{
-  typedef MP_Float::exponent_type  exponent_type;
-
-  MP_Float remainder = n, divisor = d;
-
-  CGAL_precondition(divisor != 0);
-
-  // Rescale d to have a to_double() value with reasonnable exponent.
-  exponent_type scale_d = divisor.find_scale();
-  divisor.rescale(scale_d);
-  const double dd = INTERN_MP_FLOAT::to_double(divisor);
-
-  MP_Float res = 0;
-  exponent_type scale_remainder = 0;
-
-  bool first_time_smaller_than_divisor = true;
-
-  // School division algorithm.
-
-  while ( remainder != 0 )
-  {
-    // We have to rescale, since remainder can diminish towards 0.
-    exponent_type tmp_scale = remainder.find_scale();
-    remainder.rescale(tmp_scale);
-    res.rescale(tmp_scale);
-    scale_remainder += tmp_scale;
-
-    // Compute a double approximation of the quotient
-    // (imagine school division with base ~2^53).
-    double approx = INTERN_MP_FLOAT::to_double(remainder) / dd;
-    CGAL_assertion(approx != 0);
-    res += approx;
-    remainder -= approx * divisor;
-
-    if (remainder == 0)
-      break;
-
-    // Then we need to fix it up by checking if neighboring double values
-    // are closer to the exact result.
-    // There should not be too many iterations, because approx is only a few ulps
-    // away from the optimal.
-    // If we don't do the fixup, then spurious bits can be introduced, which
-    // will require an unbounded amount of additional iterations to be eliminated.
-
-    // The direction towards which we need to try to move from "approx".
-    double direction = (CGAL_NTS sign(remainder) == CGAL_NTS sign(dd))
-                     ?  std::numeric_limits<double>::infinity()
-                     : -std::numeric_limits<double>::infinity();
-
-    while (true)
-    {
-      const double approx2 = nextafter(approx, direction);
-      const double delta = approx2 - approx;
-      MP_Float new_remainder = remainder - delta * divisor;
-      if (CGAL_NTS abs(new_remainder) < CGAL_NTS abs(remainder)) {
-        remainder = new_remainder;
-        res += delta;
-        approx = approx2;
-      }
-      else {
-        break;
-      }
-    }
-
-    if (remainder == 0)
-      break;
-
-    // Test condition for non-exact division (with remainder).
-    if (compare_bitlength(remainder, divisor) == SMALLER)
-    {
-      if (! first_time_smaller_than_divisor)
-      {
-        // Scale back.
-        res.rescale(scale_d - scale_remainder);
-        remainder.rescale(- scale_remainder);
-        CGAL_postcondition(res * d  + remainder == n);
-        return std::make_pair(res, remainder);
-      }
-      first_time_smaller_than_divisor = false;
-    }
-  }
-
-  // Scale back the result.
-  res.rescale(scale_d - scale_remainder);
-  CGAL_postcondition(res * d == n);
-  return std::make_pair(res, MP_Float(0));
-}
-
-inline // Move it to libCGAL once it's stable.
-bool
-divides(const MP_Float & d, const MP_Float & n)
-{
-  return internal::division(n, d).second == 0;
-}
-
-} // namespace internal
-
-inline
-bool
-is_integer(const MP_Float &m)
-{
-  return m.is_integer();
-}
-
-
-
-inline
-MP_Float
-operator%(const MP_Float& n1, const MP_Float& n2)
-{
-  return internal::division(n1, n2).second;
-}
-
-
-// The namespace INTERN_MP_FLOAT contains global functions like square or sqrt
-// which collide with the global functor adapting functions provided by the new
-// AST/RET concept.
-//
-// TODO: IMHO, a better solution would be to put the INTERN_MP_FLOAT-functions
-//       into the MP_Float-class... But there is surely a reason why this is not
-//       the case..?
-
-
-namespace INTERN_MP_FLOAT {
-  inline
-  MP_Float
-  div(const MP_Float& n1, const MP_Float& n2)
-  {
-    return internal::division(n1, n2).first;
-  }
-
-  inline
-  MP_Float
-  gcd( const MP_Float& a, const MP_Float& b)
-  {
-    if (a == 0) {
-      if (b == 0)
-        return 0;
-      MP_Float tmp=b;
-      tmp.gcd_normalize();
-      return tmp;
-    }
-    if (b == 0) {
-      MP_Float tmp=a;
-      tmp.gcd_normalize();
-      return tmp;
-    }
-
-    MP_Float x = a, y = b;
-    while (true) {
-      x = x % y;
-      if (x == 0) {
-        CGAL_postcondition(internal::divides(y, a) & internal::divides(y, b));
-        y.gcd_normalize();
-        return y;
-      }
-      swap(x, y);
-    }
-  }
-
-} // INTERN_MP_FLOAT
-
-
-inline
-void
-simplify_quotient(MP_Float & numerator, MP_Float & denominator)
-{
-  // Currently only simplifies the two exponents.
-#if 0
-  // This better version causes problems as the I/O is changed for
-  // Quotient<MP_Float>, which then does not appear as rational 123/345,
-  // 1.23/3.45, this causes problems in the T2 test-suite (to be investigated).
-  numerator.exp -= denominator.exp
-                    + (MP_Float::exponent_type) denominator.v.size();
-  denominator.exp = - (MP_Float::exponent_type) denominator.v.size();
-#elif 1
-  numerator.exp -= denominator.exp;
-  denominator.exp = 0;
-#else
-  if (numerator != 0 && denominator != 0) {
-    numerator.exp -= denominator.exp;
-    denominator.exp = 0;
-    const MP_Float g = gcd(numerator, denominator);
-    numerator = integral_division(numerator, g);
-    denominator = integral_division(denominator, g);
-  }
-  numerator.exp -= denominator.exp;
-  denominator.exp = 0;
-#endif
-}
-
-inline void simplify_root_of_2(MP_Float &/*a*/, MP_Float &/*b*/, MP_Float&/*c*/) {
-#if 0
-  if(is_zero(a)) {
-  	simplify_quotient(b,c); return;
-  } else if(is_zero(b)) {
-  	simplify_quotient(a,c); return;
-  } else if(is_zero(c)) {
-  	simplify_quotient(a,b); return;
-  }
-  MP_Float::exponent_type va = a.exp +
-    (MP_Float::exponent_type) a.v.size();
-  MP_Float::exponent_type vb = b.exp +
-    (MP_Float::exponent_type) b.v.size();
-  MP_Float::exponent_type vc = c.exp +
-    (MP_Float::exponent_type) c.v.size();
-  MP_Float::exponent_type min = (std::min)((std::min)(va,vb),vc);
-  MP_Float::exponent_type max = (std::max)((std::max)(va,vb),vc);
-  MP_Float::exponent_type med = (min+max)/2.0;
-  a.exp -= med;
-  b.exp -= med;
-  c.exp -= med;
-#endif
-}
-
-namespace internal {
-  inline void simplify_3_exp(int &a, int &b, int &c) {
-    int min = (std::min)((std::min)(a,b),c);
-    int max = (std::max)((std::max)(a,b),c);
-    int med = (min+max)/2;
-    a -= med;
-    b -= med;
-    c -= med;
-  }
-}
-
-
-// specialization of to double functor
-template<>
-class Real_embeddable_traits< Quotient<MP_Float> >
-    : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base<
-Quotient<MP_Float> >{
-public:
-    struct To_double: public std::unary_function<Quotient<MP_Float>, double>{
-         inline
-         double operator()(const Quotient<MP_Float>& q) const {
-            return INTERN_MP_FLOAT::to_double(q);
-        }
-    };
-    struct To_interval
-        : public std::unary_function<Quotient<MP_Float>, std::pair<double,double> > {
-        inline
-        std::pair<double,double> operator()(const Quotient<MP_Float>& q) const {
-            return INTERN_MP_FLOAT::to_interval(q);
-        }
-    };
-};
-
-inline MP_Float min BOOST_PREVENT_MACRO_SUBSTITUTION(const MP_Float& x,const MP_Float& y){
-  return (x<=y)?x:y; 
-}
-inline MP_Float max BOOST_PREVENT_MACRO_SUBSTITUTION(const MP_Float& x,const MP_Float& y){
-  return (x>=y)?x:y; 
-}
-
-
-// Coercion_traits
-CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(MP_Float)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int, MP_Float)
-
-
-} //namespace CGAL
-
-namespace Eigen {
-  template<class> struct NumTraits;
-  template<> struct NumTraits<CGAL::MP_Float>
-  {
-    typedef CGAL::MP_Float Real;
-    typedef CGAL::Quotient<CGAL::MP_Float> NonInteger;
-    typedef CGAL::MP_Float Nested;
-
-    static inline Real epsilon() { return 0; }
-    static inline Real dummy_precision() { return 0; }
-
-    enum {
-      IsInteger = 1, // Is this lie right?
-      IsSigned = 1,
-      IsComplex = 0,
-      RequireInitialization = 1,
-      ReadCost = 6,
-      AddCost = 40,
-      MulCost = 40
-    };
-  };
-}
-
-#include <CGAL/MP_Float_impl.h>
-
-//specialization for Get_arithmetic_kernel
-#include <CGAL/MP_Float_arithmetic_kernel.h>
-
-#endif // CGAL_MP_FLOAT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mean_value_coordinates_parameterizer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mean_value_coordinates_parameterizer_3.h
deleted file mode 100644
index bbb8246..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mean_value_coordinates_parameterizer_3.h
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
-#define CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
-
-#include <CGAL/Fixed_border_parameterizer_3.h>
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-/// \file Mean_value_coordinates_parameterizer_3.h
-
-namespace CGAL {
-
-
-/// \ingroup  PkgSurfaceParameterizationMethods
-///
-/// The class Mean_value_coordinates_parameterizer_3
-/// implements *Floater Mean Value Coordinates* parameterization  \cgalCite{cgal:f-mvc-03}.
-/// This method is sometimes called simply *Floater parameterization*.
-///
-/// This is a conformal parameterization, i.e. it attempts to preserve angles.
-///
-/// One-to-one mapping is guaranteed if the surface's border is mapped to a convex polygon.
-///
-/// This class is used by the main
-/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
-/// - It provides default` BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
-///   parameters that make sense.
-/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
-///   for j neighbor vertex of i based on Floater Mean Value Coordinates parameterization.
-/// - It implements an optimized version of `is_one_to_one_mapping()`.
-///
-/// \cgalModels `ParameterizerTraits_3`
-///
-///
-/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
-/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
-
-template
-<
-    class ParameterizationMesh_3,     ///< 3D surface mesh
-    class BorderParameterizer_3       ///< Strategy to parameterize the surface border
-                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
-    class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system
-                = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>
->
-class Mean_value_coordinates_parameterizer_3
-    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-{
-// Private types
-private:
-    // Superclass
-    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
-                                        BorderParameterizer_3,
-                                        SparseLinearAlgebraTraits_d>
-                                            Base;
-
-// Public types
-public:
-    // We have to repeat the types exported by superclass
-    /// @cond SKIP_IN_MANUAL
-    typedef typename Base::Error_code       Error_code;
-    typedef ParameterizationMesh_3          Adaptor;
-    typedef BorderParameterizer_3           Border_param;
-    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
-    /// @endcond
-
-// Private types
-private:
-    // Mesh_Adaptor_3 subtypes:
-    typedef typename Adaptor::NT            NT;
-    typedef typename Adaptor::Point_2       Point_2;
-    typedef typename Adaptor::Point_3       Point_3;
-    typedef typename Adaptor::Vector_2      Vector_2;
-    typedef typename Adaptor::Vector_3      Vector_3;
-    typedef typename Adaptor::Facet         Facet;
-    typedef typename Adaptor::Facet_handle  Facet_handle;
-    typedef typename Adaptor::Facet_const_handle
-                                            Facet_const_handle;
-    typedef typename Adaptor::Facet_iterator Facet_iterator;
-    typedef typename Adaptor::Facet_const_iterator
-                                            Facet_const_iterator;
-    typedef typename Adaptor::Vertex        Vertex;
-    typedef typename Adaptor::Vertex_handle Vertex_handle;
-    typedef typename Adaptor::Vertex_const_handle
-                                            Vertex_const_handle;
-    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
-    typedef typename Adaptor::Vertex_const_iterator
-                                            Vertex_const_iterator;
-    typedef typename Adaptor::Border_vertex_iterator
-                                            Border_vertex_iterator;
-    typedef typename Adaptor::Border_vertex_const_iterator
-                                            Border_vertex_const_iterator;
-    typedef typename Adaptor::Vertex_around_facet_circulator
-                                            Vertex_around_facet_circulator;
-    typedef typename Adaptor::Vertex_around_facet_const_circulator
-                                            Vertex_around_facet_const_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_circulator
-                                            Vertex_around_vertex_circulator;
-    typedef typename Adaptor::Vertex_around_vertex_const_circulator
-                                            Vertex_around_vertex_const_circulator;
-
-    // SparseLinearAlgebraTraits_d subtypes:
-    typedef typename Sparse_LA::Vector      Vector;
-    typedef typename Sparse_LA::Matrix      Matrix;
-
-    using Base::compute_angle_rad;
-
-// Public operations
-public:
-    /// Constructor
-    Mean_value_coordinates_parameterizer_3(Border_param border_param = Border_param(),
-                                            ///< Object that maps the surface's border to 2D space.
-                                          Sparse_LA sparse_la = Sparse_LA())
-                                            ///< Traits object to access a sparse linear system.
-    :   Fixed_border_parameterizer_3<Adaptor,
-                                   Border_param,
-                                   Sparse_LA>(border_param, sparse_la)
-    {}
-
-    // Default copy constructor and operator =() are fine
-
-// Protected operations
-protected:
-    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
-    virtual NT compute_w_ij(const Adaptor& mesh,
-                            Vertex_const_handle main_vertex_v_i,
-                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
-    {
-        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
-        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
-
-        // Compute the norm of v_j -> v_i vector
-        Vector_3 edge = position_v_i - position_v_j;
-        double len = std::sqrt(edge*edge);
-
-        // Compute angle of (v_j,v_i,v_k) corner (i.e. angle of v_i corner)
-        // if v_k is the vertex before v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
-        previous_vertex_v_k --;
-        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
-        double gamma_ij  = compute_angle_rad(position_v_j, position_v_i, position_v_k);
-
-        // Compute angle of (v_l,v_i,v_j) corner (i.e. angle of v_i corner)
-        // if v_l is the vertex after v_j when circulating around v_i
-        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
-        next_vertex_v_l ++;
-        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
-        double delta_ij = compute_angle_rad(position_v_l, position_v_i, position_v_j);
-
-        double weight = 0.0;
-        CGAL_surface_mesh_parameterization_assertion(len != 0.0);    // two points are identical!
-        if(len != 0.0)
-            weight = (std::tan(0.5*gamma_ij) + std::tan(0.5*delta_ij)) / len;
-        CGAL_surface_mesh_parameterization_assertion(weight > 0);
-
-        return weight;
-    }
-
-    /// Check if 3D -> 2D mapping is one-to-one.
-    virtual bool  is_one_to_one_mapping (const Adaptor& ,
-                                         const Matrix& ,
-                                         const Vector& ,
-                                         const Vector& )
-    {
-        /// Theorem: one-to-one mapping is guaranteed if all w_ij coefficients
-        ///          are > 0 (for j vertex neighbor of i) and if the surface
-        ///          border is mapped onto a 2D convex polygon.
-        /// Floater formula above implies that w_ij > 0 (for j vertex neighbor
-        /// of i), thus mapping is guaranteed if the surface border is mapped
-        /// onto a 2D convex polygon.
-        return Base::get_border_parameterizer().is_border_convex ();
-    }
-};
-
-
-} //namespace CGAL
-
-#endif //CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Memory_sizer.h b/3rdparty/CGAL-4.6/include/CGAL/Memory_sizer.h
deleted file mode 100644
index b4d64ec..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Memory_sizer.h
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright (c) 2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s)     : Sylvain Pion, Andreas Fabri
-
-#ifndef CGAL_MEMORY_SIZER_H
-#define CGAL_MEMORY_SIZER_H
-
-#include <CGAL/basic.h>
-
-// This has only been implemented for MacOSX/Darwin, Linux and VC++ for now.
-#if !defined _MSC_VER && !defined __linux__ && !defined __APPLE__
-
-#include <iostream>
-
-namespace CGAL {
-
-struct Memory_sizer
-{
-    typedef std::size_t   size_type;
-    size_type virtual_size()  const { return 0; }
-    size_type resident_size() const { return 0; }
-};
-
-} //namespace CGAL
-
-#else // defined _MSC_VER ||  defined __linux__ || defined __APPLE__
-
-#if defined _MSC_VER
-#  include <windows.h>
-#  include "psapi.h"
-
-// auto-link with psapi.lib
-#  define CGAL_LIB_NAME psapi
-#  define CGAL_AUTO_LINK_NOMANGLE
-#  include <CGAL/auto_link/auto_link.h>
-
-#elif defined __linux__ 
-#  include <fstream>
-#  include <cstddef>
-#  include <unistd.h>
-#elif defined __APPLE__
-#include <mach/task.h>
-#include <mach/mach_init.h>
-#endif
-
-namespace CGAL {
-
-// A class giving access to the memory currently used by the process.
-// Both the virtual memory size and the resident size.
-// I put it in a class instead of free functions for similarity with Timer,
-// and in case we want to store some state.
-
-struct Memory_sizer
-{
-    typedef std::size_t   size_type;
-
-    size_type virtual_size()  const { return get(true); }
-    size_type resident_size() const { return get(false); }
-
-private:
-
-  size_type get (bool virtual_size)  const 
-  { 
-#ifdef _MSC_VER
-    DWORD pid = GetCurrentProcessId();
-    size_type result;
-    HANDLE hProcess;
-    PROCESS_MEMORY_COUNTERS pmc;
-    hProcess = OpenProcess(  PROCESS_QUERY_INFORMATION |
-                                    PROCESS_VM_READ,
-                                    FALSE, pid );
-    if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )
-    {
-      // PagefileUsage seems not very precise, thus check it against WorkingSetSize:
-      size_t approximate_virtual_size = (std::max)(pmc.PagefileUsage, pmc.WorkingSetSize);
-      
-      result = (virtual_size)? approximate_virtual_size : pmc.WorkingSetSize;
-    }
-
-    CloseHandle( hProcess );
-    return result;
-
-#elif defined __linux__
-    // Extract of "man proc" under Linux :
-    //
-    //            vsize %u Virtual memory size
-    //
-    //            rss %u Resident Set Size: number of pages
-    //                   the process has in real memory,
-    //                   minus 3 for administrative purposes.
-    //                   This is just the pages which count
-    //                   towards text, data, or stack space.
-    //                   This does not include pages which
-    //                   have not been demand-loaded in, or
-    //                   which are swapped out.
-    //
-    // Note : the following may be buggy in case of space in the executable name...
-
-    int pid;
-    char name[1024];
-    char state;
-    int ppid, pgrp, session, tty, tpgid;
-    unsigned flags, minflt, cminflt, majflt, cmajflt;
-    int utime, stime, cutime, cstime, counter, priority, timeout;
-    unsigned itrealvalue, starttime;
-    size_type vsize = 0, rss = 0;
-
-    std::ifstream f("/proc/self/stat");
-    CGAL_assertion(f);
-
-    f >> pid >> name >> state >> ppid >> pgrp >> session >> tty >> tpgid >> flags;
-    f >> minflt >> cminflt >> majflt >> cmajflt >> utime >> stime >> cutime;
-    f >> cstime >> counter >> priority >> timeout >> itrealvalue >> starttime;
-    f >> vsize >> rss;
-
-    return virtual_size ? vsize : rss * getpagesize();
-
-#else // __APPLE__ is defined
-
-    // http://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html
-		// This is highly experimental. But still better than returning 0.
-		// It appears that we might need certain 'rights' to get access to the kernel
-		// task... It works if you have admin rights apparently
-		// (though non-root of course!). I haven't tested with non-admin user.
-    // -- Samuel Hornus
-
-    task_t task = MACH_PORT_NULL;
-		// The task_for_pid() seems to be time consuming (looking at the source
-		// in xnu-source/bsd/vm/vm_unix.c
-		// TODO: so it may be a good idea to cache the resulting 'task'
-    if (task_for_pid(current_task(), getpid(), &task) != KERN_SUCCESS)
-        return 0;
-		// It seems to me that after calling :
-		// task_for_pid(current_task(), getpid(), &task)
-		// we should have (task == current_task())
-		// ==> TODO: Check if this is indeed the case
-      
-    struct task_basic_info t_info;
-    mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
-      
-    task_info(task, TASK_BASIC_INFO, (task_info_t)&t_info, &t_info_count);
-		// TODO: test if the following line works...
-    //task_info(current_task(), TASK_BASIC_INFO, (task_info_t)&t_info, &t_info_count);
-#if 0
-    std::cerr << "PAGE SIZE IS " << getpagesize() << std::endl
-    << " RESIDENT SIZE IS " << t_info.resident_size << std::endl
-    << " VIRTUAL SIZE IS " << t_info.virtual_size << std::endl;
-#endif
-    return virtual_size ? t_info.virtual_size : t_info.resident_size;
-#endif
-  }
-};
-
-} //namespace CGAL
-
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/C3T3_helpers.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/C3T3_helpers.h
deleted file mode 100644
index eafa1a4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/C3T3_helpers.h
+++ /dev/null
@@ -1,3902 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-//
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_C3T3_HELPERS_H
-#define CGAL_MESH_3_C3T3_HELPERS_H
-
-#include <CGAL/Mesh_3/config.h>
-#include <CGAL/use.h>
-
-#include <CGAL/linear_least_squares_fitting_3.h>
-#include <CGAL/Mesh_3/Triangulation_helpers.h>
-#include <CGAL/tuple.h>
-#include <CGAL/iterator.h>
-#include <CGAL/array.h>
-#include <CGAL/Handle_hash_function.h>
-
-#ifdef CGAL_MESH_3_PROFILING
-  #include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#include <boost/foreach.hpp>
-#include <boost/range.hpp>
-#include <boost/optional.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/function_output_iterator.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/unordered_set.hpp>
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/parallel_do.h>
-#endif
-
-#include <functional>
-#include <vector>
-#include <set>
-
-namespace CGAL {
-namespace Mesh_3 {
-
-#ifdef CGAL_INTRUSIVE_LIST
-template <typename Type>
-class Intrusive_list {
-public:
-
-  typedef Type Type_handle;
-  typedef Type_handle& reference;
-  typedef const Type_handle& const_reference;
-  typedef Type_handle value_type;
-
-  Intrusive_list()
-    : f(), b(), n(0)
-  {}
-
-  ~Intrusive_list()
-  {
-    clear();
-  }
-
-
-  Intrusive_list(const Intrusive_list& )
-  {
-    CGAL_assertion(false);
-  }
-
-#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
-  template <typename IT>
-  Intrusive_list(IT first, IT last)
-  : f(), b(), n(0)
-  {
-    if(first == last){
-      return;
-    }
-
-    f = *first;
-    Type_handle ch = f;
-    ++n;
-    ++first;
-    while(first != last){
-      if((ch != Type(*first)) && ((*first)->next_intrusive()==Type_handle())){
-        // not yet inserted
-        ch->set_next_intrusive(*first);
-        (*first)->set_previous_intrusive(ch);
-        ch = *first;
-        ++n;
-      }
-      ++first;
-    }
-    b = ch;
-    b->set_next_intrusive(f);
-    f->set_previous_intrusive(b);
-  }
-#endif
-
-  bool
-  is_valid() const
-  {
-    if(n < 0){
-      std::cerr << "n < 0" << std::endl;
-      return false;
-    }
-    if(n == 0){
-      if (f != Type_handle()){
-        std::cerr << "n==0, but f!= Type_handle()" << std::endl;
-        return false;
-      }
-      if (b != Type_handle()){
-        std::cerr << "n==0, but b!= Type_handle()" << std::endl;
-        return false;
-      }
-    }else{
-      if(f->previous_intrusive() != b){
-        std::cerr << "f->previous_intrusive() != b" << std::endl;
-        return false;
-      }
-      if(b->next_intrusive() != f){
-        std::cerr << "b->next_intrusive() != f" << std::endl;
-      return false;
-      }
-
-
-      Type_handle ch = f;
-      for(std::size_t i = 1; i < n; i++){
-        if(ch->next_intrusive()->previous_intrusive() != ch){
-          std::cerr << "ch->next_intrusive()->previous_intrusive() != ch" << std::endl;
-          return false;
-        }
-        ch = ch->next_intrusive();
-      }
-      if(ch != b){
-        std::cerr << "ch!= b)" << std::endl;
-        return false;
-      }
-    }
-    return true;
-  }
-
-
-  void clear()
-  {
-    if(!empty()){
-      while( f!= b ){
-        Type_handle h = f;
-        f=f->next_intrusive();
-        h->set_previous_intrusive(Type_handle());
-        h->set_next_intrusive(Type_handle());
-      }
-      b->set_previous_intrusive(Type_handle());
-      b->set_next_intrusive(Type_handle());
-      f = b = Type_handle();
-    }
-    n = 0;
-  }
-
-  std::size_t size() const
-  {
-    return n;
-  }
-
-
-  struct iterator {
-    Type_handle pos, b;
-
-    typedef Type_handle                      value_type;
-    typedef const Type_handle*                     pointer;
-    typedef const Type_handle&                     reference;
-    typedef std::size_t                      size_type;
-    typedef std::ptrdiff_t                   difference_type;
-    typedef std::forward_iterator_tag  iterator_category;
-
-    iterator(Type_handle f, Type_handle b)
-      : pos(f), b(b)
-    {}
-
-    iterator()
-      : pos()
-    {}
-
-    iterator& operator++()
-    {
-      if(pos != Type_handle()){
-        if(pos == b){
-          pos = Type_handle(); // past the end
-        }else {
-          pos = pos->next_intrusive();
-        }
-      }
-      return *this;
-    }
-
-    iterator operator++(int)
-    {
-      iterator tmp(*this);
-      ++(*this);
-      return tmp;
-    }
-
-    bool operator==(const iterator& i) const
-    {
-      return pos == i.pos;
-    }
-
-    bool operator!=(const iterator& i) const
-    {
-      return !(*this == i);
-    }
-
-    reference operator*() const
-    {
-      return pos;
-    }
-
-    pointer operator->() const
-    {
-      return pos;
-    }
-  }; // struct iterator
-
-
-  iterator begin()
-  {
-    return iterator(f,b);
-  }
-
-  iterator end()
-  {
-    return iterator();
-  }
-
-
-  Type_handle front() const
-  {
-    return f;
-  }
-
-  Type_handle& front()
-  {
-    return f;
-  }
-
-
-  Type_handle back() const
-  {
-    return b;
-  }
-
-  Type_handle& back()
-  {
-    return b;
-  }
-
-  iterator insert(iterator /* position */,
-                  const Type_handle& ch)
-  {
-    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
-            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
-    CGAL_expensive_assertion(is_valid());
-
-    if(ch->next_intrusive() != Type_handle()){
-      return iterator(ch->next_intrusive()/*first*/, ch/*last*/);
-    }
-    else{
-      insert(ch);
-      return iterator(ch->next_intrusive()/*first*/, ch/*last*/);
-    }
-  }
-
-  void insert(Type_handle ch)
-  {
-    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
-            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
-    CGAL_expensive_assertion(is_valid());
-
-    if(ch->next_intrusive() != Type_handle()){
-      return;
-    }
-    if(empty()){
-      f = b = ch;
-      ch->set_next_intrusive(ch);
-      ch->set_previous_intrusive(ch);
-    } else {
-      ch->set_next_intrusive(f);
-      ch->set_previous_intrusive(b);
-      f->set_previous_intrusive(ch);
-      b->set_next_intrusive(ch);
-      b = ch;
-    }
-    n++;
-  }
-
-  void erase(Type_handle ch)
-  {
-    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
-            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
-    CGAL_expensive_assertion(is_valid());
-    if(ch->next_intrusive() == Type_handle()){
-      return;
-    }
-    if(f == b){ // only 1 element in the list
-      CGAL_assertion(f == ch);
-      CGAL_assertion(n == 1);
-
-      f = b = Type_handle();
-    } else {
-      if(f == ch){
-        f = f->next_intrusive();
-      }
-      if(b == ch){
-        b = b->previous_intrusive();
-      }
-      Type_handle p = ch->previous_intrusive(), n = ch->next_intrusive();
-      p->set_next_intrusive(n);
-      n->set_previous_intrusive(p);
-    }
-    ch->set_next_intrusive(Type_handle());
-    ch->set_previous_intrusive(Type_handle());
-    CGAL_assertion(ch->next_intrusive() == Type_handle());
-    CGAL_assertion(ch->previous_intrusive() == Type_handle());
-    n--;
-  }
-
-  bool empty() const
-  {
-    if(f == Type_handle()){
-      CGAL_assertion(b == Type_handle());
-      CGAL_assertion(n == 0);
-    }
-    return f == Type_handle();
-  }
-
-  bool contains(Type_handle th) const
-  {
-    if(th->next_intrusive() == Type_handle())
-    {
-      CGAL_assertion(th->previous_intrusive() == Type_handle());
-      return true;
-    }
-    else return false;
-  }
-
-  void push_back(Type_handle ch)
-  {
-    insert(ch);
-  }
-
-private:
-  Type_handle f,b;
-  std::size_t n;
-};
-#endif // #ifdef CGAL_INTRUSIVE_LIST
-
-
-/************************************************
-// Class C3T3_helpers_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Tr, typename Concurrency_tag>
-class C3T3_helpers_base
-{
-protected:
-  typedef typename Tr::Geom_traits          Gt;
-  typedef typename Gt::Point_3              Point_3;
-  typedef typename Tr::Vertex_handle        Vertex_handle;
-  typedef typename Tr::Cell_handle          Cell_handle;
-  typedef typename Tr::Facet                Facet;
-  typedef typename Tr::Lock_data_structure  Lock_data_structure;
-
-  C3T3_helpers_base(Lock_data_structure *) {}
-
-  Lock_data_structure *get_lock_data_structure() const
-  {
-    return 0;
-  }
-
-public:
-  // Dummy locks/unlocks
-  bool try_lock_point(const Point_3 &, int = 0) const
-  {
-    return true;
-  }
-
-  bool try_lock_vertex(Vertex_handle, int = 0) const
-  {
-    return true;
-  }
-
-  bool try_lock_point_no_spin(const Point_3 &, int = 0) const
-  {
-    return true;
-  }
-
-  bool try_lock_vertex_no_spin(Vertex_handle, int = 0) const
-  {
-    return true;
-  }
-
-  bool try_lock_element(Cell_handle, int = 0) const
-  {
-    return true;
-  }
-
-  bool try_lock_element(const Facet &, int = 0) const
-  {
-    return true;
-  }
-
-
-  bool is_point_locked_by_this_thread(const Point_3 &) const
-  { return false; }
-
-  bool is_cell_locked_by_this_thread(const Cell_handle &) const
-  { return false; }
-
-  void unlock_all_elements() const {}
-
-  // Dummy locks/unlocks
-  void lock_outdated_cells() const {}
-  void unlock_outdated_cells() const {}
-  void lock_moving_vertices() const {}
-  void unlock_moving_vertices() const {}
-  void lock_vertex_to_proj() const {}
-  void unlock_vertex_to_proj() const {}
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Tr>
-class C3T3_helpers_base<Tr, Parallel_tag>
-{
-protected:
-  typedef typename Tr::Geom_traits          Gt;
-  typedef typename Gt::Point_3              Point_3;
-  typedef typename Tr::Vertex_handle        Vertex_handle;
-  typedef typename Tr::Cell_handle          Cell_handle;
-  typedef typename Tr::Facet                Facet;
-  typedef typename Tr::Lock_data_structure  Lock_data_structure;
-
-  C3T3_helpers_base(Lock_data_structure *lock_ds)
-    : m_lock_ds(lock_ds) {}
-
-
-public:
-  // LOCKS (CONCURRENCY)
-
-  /*Lock_data_structure *get_lock_data_structure() const
-  {
-    return m_lock_ds;
-  }*/
-
-  bool try_lock_point(const Point_3 &p, int lock_radius = 0) const
-  {
-    if (m_lock_ds)
-    {
-      return m_lock_ds->try_lock(p, lock_radius);
-    }
-    return true;
-  }
-
-  bool try_lock_vertex(Vertex_handle vh, int lock_radius = 0) const
-  {
-    if (m_lock_ds)
-    {
-      return m_lock_ds->try_lock(vh->point(), lock_radius);
-    }
-    return true;
-  }
-
-  bool try_lock_point_no_spin(const Point_3 &p, int lock_radius = 0) const
-  {
-    if (m_lock_ds)
-    {
-      return m_lock_ds->template try_lock<true>(p, lock_radius);
-    }
-    return true;
-  }
-
-  bool try_lock_vertex_no_spin(Vertex_handle vh, int lock_radius = 0) const
-  {
-    return try_lock_point_no_spin(vh->point(), lock_radius);
-  }
-
-  bool try_lock_element(Cell_handle cell_handle, int lock_radius = 0) const
-  {
-    bool success = true;
-
-    // Lock the element area on the grid
-    for (int iVertex = 0 ; success && iVertex < 4 ; ++iVertex)
-    {
-      Vertex_handle vh = cell_handle->vertex(iVertex);
-      success = try_lock_vertex(vh, lock_radius);
-    }
-
-    return success;
-  }
-
-  bool try_lock_element(const Facet &facet, int lock_radius = 0) const
-  {
-    bool success = true;
-
-    // Lock the element area on the grid
-    Cell_handle cell = facet.first;
-    for (int iVertex = (facet.second+1)&3 ;
-          success && iVertex != facet.second ; iVertex = (iVertex+1)&3)
-    {
-      Vertex_handle vh = cell->vertex(iVertex);
-      success = try_lock_vertex(vh, lock_radius);
-    }
-
-    return success;
-  }
-
-  bool is_point_locked_by_this_thread(const Point_3 &p) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      locked = m_lock_ds->is_locked_by_this_thread(p);
-    }
-    return locked;
-  }
-
-  bool is_cell_locked_by_this_thread(const Cell_handle &cell_handle) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
-      {
-        locked = m_lock_ds->is_locked_by_this_thread(
-          cell_handle->vertex(iVertex)->point());
-      }
-    }
-    return locked;
-  }
-
-  void unlock_all_elements() const
-  {
-    if (m_lock_ds)
-    {
-      m_lock_ds->unlock_all_points_locked_by_this_thread();
-    }
-  }
-
-  void lock_outdated_cells() const
-  {
-    m_mut_outdated_cells.lock();
-  }
-  void unlock_outdated_cells() const
-  {
-    m_mut_outdated_cells.unlock();
-  }
-
-  void lock_moving_vertices() const
-  {
-    m_mut_moving_vertices.lock();
-  }
-  void unlock_moving_vertices() const
-  {
-    m_mut_moving_vertices.unlock();
-  }
-
-  void lock_vertex_to_proj() const
-  {
-    m_mut_vertex_to_proj.lock();
-  }
-  void unlock_vertex_to_proj() const
-  {
-    m_mut_vertex_to_proj.unlock();
-  }
-
-protected:
-  Lock_data_structure *m_lock_ds;
-
-  typedef tbb::mutex  Mutex_type;
-  mutable Mutex_type  m_mut_outdated_cells;
-  mutable Mutex_type  m_mut_moving_vertices;
-  mutable Mutex_type  m_mut_vertex_to_proj;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-
-/************************************************
- *
- * C3T3_helpers class
- *
- ************************************************/
-
-template <typename C3T3,
-          typename MeshDomain>
-class C3T3_helpers
-: public C3T3_helpers_base<typename C3T3::Triangulation,
-                           typename C3T3::Concurrency_tag>
-{
-  // -----------------------------------
-  // Private types
-  // -----------------------------------
-  typedef C3T3_helpers<C3T3, MeshDomain> Self;
-  typedef C3T3_helpers_base<typename C3T3::Triangulation,
-                            typename C3T3::Concurrency_tag> Base;
-  typedef typename C3T3::Concurrency_tag Concurrency_tag;
-
-  typedef typename Base::Lock_data_structure  Lock_data_structure;
-  typedef typename C3T3::Triangulation        Tr;
-  typedef Tr                                  Triangulation;
-  typedef typename Tr::Geom_traits            Gt;
-
-  typedef typename Gt::Vector_3         Vector_3;
-  typedef typename Gt::Point_3          Point_3;
-  typedef typename Gt::Plane_3          Plane_3;
-  typedef typename Gt::FT               FT;
-  typedef typename Gt::Tetrahedron_3    Tetrahedron;
-
-  typedef typename Tr::Vertex_handle    Vertex_handle;
-  typedef typename Tr::Cell_handle      Cell_handle;
-  typedef typename Tr::Cell             Cell;
-  typedef typename Tr::Facet            Facet;
-
-  typedef typename C3T3::Surface_patch_index  Surface_patch_index;
-  typedef typename C3T3::Subdomain_index      Subdomain_index;
-  typedef typename C3T3::Index                Index;
-
-  typedef boost::optional<Surface_patch_index>  Surface_patch;
-  typedef boost::optional<Subdomain_index>      Subdomain;
-
-  typedef std::vector<Cell_handle>      Cell_vector;
-  typedef std::set<Cell_handle>         Cell_set;
-  typedef std::vector<Tetrahedron>      Tet_vector;
-
-  typedef std::vector<Facet>            Facet_vector;
-  typedef std::vector<Vertex_handle>    Vertex_vector;
-  typedef std::set<Vertex_handle>       Vertex_set;
-
-#ifdef CGAL_INTRUSIVE_LIST
-  typedef Intrusive_list<Cell_handle>   Outdated_cell_set;
-#else
-  typedef Cell_set  Outdated_cell_set;
-#endif //CGAL_INTRUSIVE_LIST
-
-#ifdef CGAL_INTRUSIVE_LIST
-  typedef Intrusive_list<Vertex_handle>  Moving_vertices_set;
-#else
-  typedef Vertex_set Moving_vertices_set;
-#endif //CGAL_INTRUSIVE_LIST
-
-private:
-  // Facet_boundary stores the edges, of the boundary of surface facets,
-  // with meta-data.
-  typedef std::pair<Vertex_handle,Vertex_handle> Ordered_edge;
-  typedef std::pair<int, Index> Vertex_data;
-  // Vertex_data is the dimension and Index of the third vertex of the
-  // facet.
-  typedef std::pair<Surface_patch_index, Vertex_data>  Facet_topology_description;
-  typedef std::map<Ordered_edge,Facet_topology_description>  Facet_boundary;
-
-  typedef Triangulation_helpers<Tr> Th;
-
-public:
-  // -----------------------------------
-  // Public interface
-  // -----------------------------------
-  typedef boost::optional<Vertex_handle> Update_mesh;
-
-  using Base::try_lock_point;
-  using Base::try_lock_vertex;
-  using Base::try_lock_point_no_spin;
-  using Base::try_lock_vertex_no_spin;
-  using Base::try_lock_element;
-  using Base::is_point_locked_by_this_thread;
-  using Base::is_cell_locked_by_this_thread;
-  using Base::unlock_all_elements;
-  using Base::lock_outdated_cells;
-  using Base::unlock_outdated_cells;
-  using Base::lock_moving_vertices;
-  using Base::unlock_moving_vertices;
-  using Base::lock_vertex_to_proj;
-  using Base::unlock_vertex_to_proj;
-
-  /**
-   * Constructor
-   */
-  C3T3_helpers(C3T3& c3t3, const MeshDomain& domain,
-               Lock_data_structure *lock_ds = NULL)
-    : Base(lock_ds)
-    , c3t3_(c3t3)
-    , tr_(c3t3.triangulation())
-    , domain_(domain) { }
-
-  /**
-   * @brief tries to move \c old_vertex to \c new_position in the mesh
-   * @param new_position the new position of \c old_vertex
-   * @param old_vertex the old vertex
-   * @param criterion the criterion which will be used to verify the new
-   *    position is ok. c3t3 minimal value of new criterion shall not decrease.
-   * @param modified_vertices contains the vertices incident to cells which
-   *    may have been impacted by relocation
-   * @return a pair which contains:
-   *    - a bool which is \c true if the move has been done.
-   *    - a Vertex_handle which is always filled and may be the new vertex (if
-   *      the move is a success), or the vertex which lies at \c v's position in
-   *      the updated c3t3.
-   */
-  template <typename SliverCriterion, typename OutputIterator>
-  std::pair<bool,Vertex_handle>
-  update_mesh(const Point_3& new_position,
-              const Vertex_handle& old_vertex,
-              const SliverCriterion& criterion,
-              OutputIterator modified_vertices,
-              bool *could_lock_zone = NULL);
-
-  /** @brief tries to move \c old_vertex to \c new_position in the mesh
-   *
-   * Same as update_mesh, but with the precondition that
-   * Th().no_topological_change(tr_, old_vertex, new_position,
-   * incident_cells_) return false.
-   */
-  template <typename SliverCriterion, typename OutputIterator>
-  std::pair<bool,Vertex_handle>
-  update_mesh_topo_change(const Point_3& new_position,
-                          const Vertex_handle& old_vertex,
-                          const SliverCriterion& criterion,
-                          OutputIterator modified_vertices,
-                          bool *could_lock_zone = NULL);
-
-  /**
-   * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the
-   * new vertex of the triangulation.
-   *
-   * Insert into modified vertices the vertices which are impacted by to move.
-   */
-  template <typename OutputIterator>
-  Vertex_handle update_mesh(const Point_3& new_position,
-                            const Vertex_handle& old_vertex,
-                            OutputIterator modified_vertices,
-                            bool fill_modified_vertices = true);
-
-  /**
-   * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the
-   * new vertex of the triangulation.
-   */
-  Vertex_handle update_mesh(const Point_3& new_position,
-                            const Vertex_handle& old_vertex)
-  {
-    return update_mesh(new_position, old_vertex, Emptyset_iterator(), false);
-  }
-
-  /**
-   * Rebuilds restricted Delaunay
-   */
-  template <typename ForwardIterator>
-  void rebuild_restricted_delaunay(ForwardIterator first_cell,
-                                   ForwardIterator last_cell,
-                                   Moving_vertices_set& moving_vertices);
-
-#ifdef CGAL_INTRUSIVE_LIST
-  template <typename OutdatedCells>
-  void rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
-                                   Moving_vertices_set& moving_vertices);
-#endif
-
-  /**
-   * @brief Project \c p on surface, using incident facets of \c v
-   * @param p The point to project
-   * @param v The vertex from which p was moved
-   * @param index The index of the surface patch where v lies, if known.
-   * @return the projected point
-   *
-   * \c p is projected as follows using normal of least square fitting plane
-   * on \c v incident surface points. If \c index is specified, only
-   * surface points that are on the same surface patch are used to compute
-   * the fitting plane.
-   */
-  Point_3
-  project_on_surface(const Point_3& p, const Vertex_handle& v,
-                     Surface_patch_index index = Surface_patch_index()) const;
-
-  /**
-   * Returns the minimum value for criterion for incident cells of \c vh
-   */
-  template <typename SliverCriterion>
-  FT min_incident_value(const Vertex_handle& vh,
-                        const SliverCriterion& criterion) const;
-
-  /**
-   * Moves \c old_vertex to \c new_position
-   * Stores the cells which have to be updated in \c outdated_cells
-   * Updates the Vertex_handle old_vertex to its new value in \c moving_vertices
-   * The second one (with the could_lock_zone param) is for the parallel version
-   */
-  Vertex_handle move_point(const Vertex_handle& old_vertex,
-                           const Point_3& new_position,
-                           Outdated_cell_set& outdated_cells_set,
-                           Moving_vertices_set& moving_vertices) const;
-  Vertex_handle move_point(const Vertex_handle& old_vertex,
-                           const Point_3& new_position,
-                           Outdated_cell_set& outdated_cells_set,
-                           Moving_vertices_set& moving_vertices,
-                           bool *could_lock_zone) const;
-
-  /**
-   * Try to lock the incident cells and return them in \c cells
-   * Return value:
-   * - false: everything is unlocked and \c cells is empty
-   * - true: incident cells are locked and \c cells contains all of them
-   */
-  bool
-  try_lock_and_get_incident_cells(const Vertex_handle& v,
-                                  Cell_vector &cells) const;
-
-  /**
-   * Try to lock ALL the incident cells and return in \c cells the ones
-   * whose \c filter says "true".
-   * Return value:
-   * - false: everything is unlocked and \c cells is empty
-   * - true: ALL incident cells are locked and \c cells is filled
-   */
-  template <typename Filter>
-  bool
-  try_lock_and_get_incident_cells(const Vertex_handle& v,
-                                  Cell_vector &cells,
-                                  const Filter &filter) const;
-
-  /**
-   * Try to lock ALL the incident cells and return in \c cells the slivers
-   * Return value:
-   * - false: everything is unlocked and \c cells is empty
-   * - true: incident cells are locked and \c cells contains all slivers
-   */
-  template <typename SliverCriterion>
-  bool
-  try_lock_and_get_incident_slivers(const Vertex_handle& v,
-                                    const SliverCriterion& criterion,
-                                    const FT& sliver_bound,
-                                    Cell_vector &cells) const;
-
-  template <typename SliverCriterion>
-  void
-  get_incident_slivers_without_using_tds_data(const Vertex_handle& v,
-                                              const SliverCriterion& criterion,
-                                              const FT& sliver_bound,
-                                              Cell_vector &slivers) const;
-
-  /**
-   * Outputs to out the sliver (wrt \c criterion and \c sliver_bound) incident
-   * to \c v
-   */
-  template <typename SliverCriterion, typename OutputIterator>
-  OutputIterator
-  incident_slivers(const Vertex_handle& v,
-                   const SliverCriterion& criterion,
-                   const FT& sliver_bound,
-                   OutputIterator out) const;
-
-
-  template <typename SliverCriterion, typename OutputIterator>
-  OutputIterator
-  new_incident_slivers(const Vertex_handle& v,
-                   const SliverCriterion& criterion,
-                   const FT& sliver_bound,
-                   OutputIterator out) const;
-
-  /**
-   * Returns the sliver (wrt \c criterion and \c sliver_bound) incident to \c v
-   */
-  template <typename SliverCriterion>
-  Cell_vector
-  incident_slivers(const Vertex_handle& v,
-                   const SliverCriterion& criterion,
-                   const FT& sliver_bound) const
-  {
-    Cell_vector slivers;
-    incident_slivers(v, criterion, sliver_bound, std::back_inserter(slivers));
-    return slivers;
-  }
-
-  template <typename SliverCriterion>
-  Cell_vector
-  new_incident_slivers(const Vertex_handle& v,
-                   const SliverCriterion& criterion,
-                   const FT& sliver_bound) const
-  {
-    Cell_vector slivers;
-    new_incident_slivers(v, criterion, sliver_bound, std::back_inserter(slivers));
-    return slivers;
-  }
-
-
-  /**
-   * Returns the number of slivers incident to \c v
-   */
-  template <typename SliverCriterion>
-  std::size_t
-  number_of_incident_slivers(const Vertex_handle& v,
-                             const SliverCriterion& criterion,
-                             const FT& sliver_bound) const;
-
-  template <typename SliverCriterion>
-  bool
-  is_sliver(const Cell_handle& ch,
-            const SliverCriterion& criterion,
-            const FT& sliver_bound) const;
-
-  /**
-   * Returns the minimum criterion value of cells contained in \c cells
-   * Precondition: cells of \c cells must not be infinite.
-   * Warning: Here we don't check if cells are in c3t3
-   */
-  template <typename SliverCriterion>
-  FT min_sliver_value(const Cell_vector& cells,
-                      const SliverCriterion& criterion,
-                      const bool use_cache = true) const;
-
-  /**
-   * Reset cache validity of all cells of c3t3_
-   */
-  void reset_cache() const
-  {
-    namespace bl = boost::lambda;
-    std::for_each(c3t3_.cells_in_complex_begin(),c3t3_.cells_in_complex_end(),
-                  bl::bind(&Cell::reset_cache_validity, bl::_1) );
-  }
-
-private:
-  // -----------------------------------
-  // Usefull Functors
-  // -----------------------------------
-  /**
-   * @class Get_all_facets
-   *
-   * A functor which adds to an output iterator canonical facets of a cell
-   */
-  template <typename OutputIterator>
-  class Get_all_facets
-  {
-  public:
-    Get_all_facets(const Triangulation& tr, OutputIterator out)
-      : tr_(tr)
-      , out_(out) {}
-
-    void operator()(const Cell_handle& cell)
-    {
-#ifndef CGAL_MESH_3_NEW_GET_FACETS
-      for ( int i=0 ; i<4 ; ++i )
-        if ( !tr_.is_infinite(cell,i) )
-          *out_++ = canonical_facet(cell,i);
-#else
-      // Instead of iterating over the facets we iterate over the vertices
-      // If a vertex is infinite we report only the facet opposite to it and return
-      // If all vertices are finite we report all facets
-      // This approach makes less tests if vertices are infinite
-      int i=0;
-      for ( ; i<4 ; ++i ){
-        if ( tr_.is_infinite(cell->vertex(i)) ){
-          *out_++ = canonical_facet(cell,i);
-          return;
-        }
-      }
-      for ( i=0 ; i<4 ; ++i ){
-        *out_++ = canonical_facet(cell,i);
-      }
-#endif
-    }
-
-  private:
-    Facet canonical_facet(const Cell_handle& c, const int i) const
-    {
-#ifndef CGAL_MESH_3_NEW_GET_FACETS
-      Facet facet(c,i);
-      Facet mirror = tr_.mirror_facet(facet);
-      return ( (mirror<facet)?mirror:facet );
-#else
-      Cell_handle n = c->neighbor(i);
-      if(c < n){
-        return Facet(c,i);
-      }else{
-        return Facet(n,n->index(c));
-      }
-#endif
-    }
-
-  private:
-    const Triangulation& tr_;
-    OutputIterator out_;
-  };
-
-
-  /**
-   * @class Is_in_c3t3
-   *
-   * A functor which returns true if a given handle is in c3t3
-   */
-  template <typename Handle>
-  class Is_in_c3t3 : public std::unary_function<Handle, bool>
-  {
-  public:
-    Is_in_c3t3(const C3T3& c3t3) : c3t3_(c3t3) { }
-    bool operator()(const Handle& h) const { return c3t3_.is_in_complex(h); }
-
-  private:
-    const C3T3& c3t3_;
-  };
-
-
-  /**
-   * @class Is_sliver
-   *
-   * A functor which answers true if a Cell_handle is a sliver
-   */
-  template <typename SliverCriterion>
-  struct Is_sliver : public std::unary_function<Cell_handle,bool>
-  {
-    Is_sliver(const C3T3& c3t3,
-              const SliverCriterion& criterion,
-              const FT& bound = 0)
-      : c3t3_(c3t3)
-      , criterion_(criterion)
-      , bound_(bound) { }
-
-    bool operator()(const Cell_handle& c) const
-    {
-      if ( c3t3_.is_in_complex(c) )
-      {
-        CGAL_assertion(!c3t3_.triangulation().is_infinite(c));
-
-        if ( ! c->is_cache_valid() )
-        {
-          Sliver_criterion_value<SliverCriterion> sc_value(c3t3_.triangulation(),
-                                                           criterion_);
-          (void) sc_value(c); // 'sc_value::operator()' updates the cache of 'c'
-        }
-        else
-        {
-          CGAL_expensive_assertion(c->sliver_value() == criterion_(c));
-        }
-        if(bound_ > 0)
-          return ( c->sliver_value() <= bound_ );
-        else
-          return ( c->sliver_value() <= criterion_.sliver_bound() );
-      }
-      else
-        return false;
-    }
-
-  private:
-    const C3T3& c3t3_;
-    const SliverCriterion& criterion_;
-    const FT bound_;
-  };
-
-
-  /**
-   * @class Update_c3t3
-   *
-   * A functor which updates c3t3 w.r.t the domain.
-   */
-  class Update_c3t3
-  {
-  public:
-    Update_c3t3(const MeshDomain& domain, C3T3& c3t3)
-      : domain_(domain)
-      , c3t3_(c3t3) {}
-
-    /**
-     * @brief Updates facet \c facet in c3t3
-     * @param facet the facet to update
-     * @param update if set to \c false, checking only is done
-     * @return true if \c facet is in c3t3
-     */
-    Surface_patch operator()(const Facet& facet, const bool update = true) const
-    {
-      return this->operator()(facet, update, update);
-    }
-
-    /**
-     * @brief Updates facet \c facet in c3t3
-     * @param facet the facet to update
-     * @param update_c3t3 if set to \c false, checking only is done
-     * @param update_surface_center if set to \c true, the facet surface
-     * center is updated.
-     * @return true if \c facet is in c3t3
-     *
-     * By default, \c update_c3t3 is \c true, and \c update_surface_center
-     * is equal to \c update_c3t3.
-     */
-    Surface_patch operator()(const Facet& facet,
-                             const bool update_c3t3,
-                             const bool update_surface_center) const
-    {
-      typedef typename C3T3::Triangulation::Geom_traits Gt;
-      typedef typename Gt::Segment_3 Segment_3;
-      typedef typename Gt::Ray_3 Ray_3;
-      typedef typename Gt::Line_3 Line_3;
-
-      // Nothing to do for infinite facets
-      if ( c3t3_.triangulation().is_infinite(facet) )
-        return Surface_patch();
-
-      // Functors
-      typename Gt::Is_degenerate_3 is_degenerate =
-        Gt().is_degenerate_3_object();
-
-      // Get dual of facet
-      Object dual = c3t3_.triangulation().dual(facet);
-
-      // The dual is a segment, a ray or a line
-      if ( const Segment_3* p_segment = object_cast<Segment_3>(&dual) )
-      {
-        if (is_degenerate(*p_segment))
-          return Surface_patch();
-
-        return dual_intersect(*p_segment,facet,
-                              update_c3t3,
-                              update_surface_center);
-      }
-      else if ( const Ray_3* p_ray = object_cast<Ray_3>(&dual) )
-      {
-        if (is_degenerate(*p_ray))
-          return Surface_patch();
-
-        return dual_intersect(*p_ray,facet,update_c3t3,
-                              update_surface_center);
-      }
-      else if ( const Line_3* p_line = object_cast<Line_3>(&dual) )
-      {
-        return dual_intersect(*p_line,facet,update_c3t3,
-                              update_surface_center);
-      }
-
-      CGAL_error_msg("This should not happen");
-      return Surface_patch();
-    }
-
-    /**
-     * @brief Updates cell \c ch in c3t3
-     * @param ch the cell to update
-     * @param update if set to \c false, checking only is done
-     * @return true if \c ch is in c3t3
-     */
-    Subdomain operator()(const Cell_handle& ch, const bool update = true) const
-    {
-      if ( c3t3_.triangulation().is_infinite(ch) )
-        return false;
-
-      // treat cell
-      const Subdomain subdomain =
-        domain_.is_in_domain_object()(c3t3_.triangulation().dual(ch));
-        // function dual(cell) updates the circumcenter cache if there is one
-
-      if ( subdomain && update )
-      {
-        c3t3_.add_to_complex(ch,*subdomain);
-      }
-      else if(update)
-      {
-        c3t3_.remove_from_complex(ch);
-      }
-
-      return subdomain;
-    }
-
-  private:
-
-    // Returns true if query intersects the surface.
-    template <typename Query>
-    Surface_patch dual_intersect(const Query& dual,
-                                 const Facet& facet,
-                                 const bool update_c3t3,
-                                 const bool update_surface_center) const
-    {
-      typedef typename MeshDomain::Intersection Intersection;
-
-      typename MeshDomain::Construct_intersection construct_intersection =
-        domain_.construct_intersection_object();
-
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-      typename MeshDomain::Do_intersect_surface do_intersect_surface =
-        domain_.do_intersect_surface_object();
-      Surface_patch surface = do_intersect_surface(dual);
-
-#else // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-      Intersection intersection = construct_intersection(dual);
-      Surface_patch surface =
-        (CGAL::cpp0x::get<2>(intersection) == 0) ? Surface_patch() :
-        domain_.surface_patch_index(CGAL::cpp0x::get<1>(intersection));
-
-#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-      // Update if needed
-      if(update_c3t3)
-      {
-        // Update status in c3t3
-        if(surface)
-          c3t3_.add_to_complex(facet,*surface);
-        else
-          c3t3_.remove_from_complex(facet);
-      }
-
-      if(update_surface_center)
-      {
-        Facet facet_m = c3t3_.triangulation().mirror_facet(facet);
-        if(surface)
-        {
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-          Intersection intersection = construct_intersection(dual);
-#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-          // Update facet surface center
-          Point_3 surface_center = CGAL::cpp0x::get<0>(intersection);
-          facet.first->set_facet_surface_center(facet.second,surface_center);
-          facet_m.first->set_facet_surface_center(facet_m.second,surface_center);
-        }
-        else
-        {
-          facet.first->set_facet_surface_center(facet.second,Point_3());
-          facet_m.first->set_facet_surface_center(facet_m.second,Point_3());
-        }
-      }
-
-      return surface;
-    }
-
-
-  private:
-    const MeshDomain& domain_;
-    C3T3& c3t3_;
-  }; //end class Update_c3t3
-
-  class Facet_updater {
-
-    std::set<Vertex_handle>& vertex_to_proj;
-    C3T3& c3t3_;
-    Update_c3t3& c3t3_updater_;
-
-  public:
-    typedef Facet& reference;
-    typedef const Facet& const_reference;
-
-    Facet_updater(C3T3& c3t3,
-      std::set<Vertex_handle>& vertex_to_proj,
-      Update_c3t3& c3t3_updater_)
-      : vertex_to_proj(vertex_to_proj), c3t3_(c3t3), c3t3_updater_(c3t3_updater_)
-    {}
-
-    void
-      operator()(const Facet& f)
-    {
-      // Update facet
-      c3t3_.remove_from_complex(f);
-      c3t3_updater_(f);
-
-      // Update vertex_to_proj
-      if ( c3t3_.is_in_complex(f) )
-      {
-        // Iterate on vertices
-        int k = f.second;
-        for ( int i=1 ; i<4 ; ++i )
-        {
-          const Vertex_handle& v = f.first->vertex((k+i)&3);
-          if ( c3t3_.in_dimension(v) > 2 )
-          {
-            //lock_vertex_to_proj();
-            vertex_to_proj.insert(v);
-            //unlock_vertex_to_proj();
-          }
-        }
-      }
-    }
-
-  }; // end class Facet_updater
-
-
-  /**
-   * @class Sliver_criterion_value
-   *
-   * A functor which returns sliver criterion value for a Cell_handle
-   * and updates its cache value
-   */
-  template <typename SliverCriterion>
-  class Sliver_criterion_value
-    : public std::unary_function<Cell_handle, double>
-  {
-  public:
-    Sliver_criterion_value(const Tr& tr,
-                           const SliverCriterion& criterion)
-      : p_tr_(&tr)
-      , criterion_(criterion) {}
-
-    FT operator()(const Cell_handle& ch) const
-    {
-      CGAL_precondition(!p_tr_->is_infinite(ch));
-
-      if ( ! ch->is_cache_valid() )
-      {
-        double sliver_value = criterion_(ch);
-        ch->set_sliver_value(sliver_value);
-      }
-      else
-      {
-        CGAL_expensive_assertion(ch->sliver_value() == criterion_(ch));
-      }
-      return ch->sliver_value();
-    }
-
-  private:
-    // '=' is used, so p_tr_ must be a pointer ...
-    const Tr* p_tr_;
-    SliverCriterion criterion_;
-  };
-
-  /**
-  * to be used by the perturber
-  */
-  class Cell_from_ids
-  {
-  public:
-    Cell_from_ids(const C3T3& c3t3, const Cell_handle& c)
-      : infinite_(c3t3.triangulation().is_infinite(c))
-      , vertices_()
-      , sorted_vertices_()
-    {
-      for(int i = 0; i < 4; ++i)
-      {
-        if (c3t3.triangulation().is_infinite(c->vertex(i)))
-          continue;
-        //the Id is set with an int by Sliver_perturber,
-        // in initialize_vertices_id
-        int id = static_cast<int>(c->vertex(i)->meshing_info());
-        vertices_.push_back(id);
-      }
-      sorted_vertices_ = vertices_;//makes a copy of each element
-      std::sort(sorted_vertices_.begin(), sorted_vertices_.end());
-      CGAL_assertion((infinite_ && vertices_.size() == 3)
-                   || vertices_.size() == 4);
-    }
-
-    std::size_t vertex_id(const std::size_t& i) const
-    {
-      CGAL_precondition(i >= 0);
-      CGAL_precondition((infinite_ && i < 3) || i < 4);
-      return vertices_[i];
-    }
-
-    bool operator<(const Cell_from_ids& c) const
-    {
-      //std::array operator< compares lhs and rhs lexicographically
-      return sorted_vertices_ < c.sorted_vertices_;
-    }
-
-  private:
-    bool infinite_;
-    // vertices IDs, not sorted, to keep the ordering of the Cell_handle id's
-    std::vector<int> vertices_;
-    // vertices IDs, sorted, to be found in a std::set<Cell_from_ids>
-    std::vector<int> sorted_vertices_;
-  };
-
-  class Cell_data_backup
-  {
-  public:
-    Cell_data_backup(const C3T3& c3t3,
-                     const Cell_handle& c,
-                     const bool do_backup = true)
-      : cell_ids_(c3t3, c)
-    {
-      //backup is not done when constructor is called to
-      //convert a newly created cell (has nothing to backup)
-      //to a Cell_data_backup
-      if(do_backup)
-      {
-        if (!c3t3.triangulation().is_infinite(c))
-          backup_finite_cell(c);
-        else
-          backup_infinite_cell(c, c3t3);
-      }
-    }
-
-  private:
-    void backup_finite_cell(const Cell_handle& c)
-    {
-      if(c->is_cache_valid())
-        sliver_value_ = c->sliver_value();
-      else
-        sliver_value_ = 0.;
-
-      subdomain_index_ = c->subdomain_index();
-      for(std::size_t i = 0; i < 4; ++i)
-      {
-        const int ii = static_cast<const int>(i);//avoid warnings
-        surface_index_table_[i] = c->surface_patch_index(ii);
-        facet_surface_center_[i] = c->get_facet_surface_center(ii);
-        surface_center_index_table_[i] = c->get_facet_surface_center_index(ii);
-      }
-      //note c->next_intrusive() and c->previous_intrusive()
-      //are lost by 'backup' and 'restore',
-      //because all cells are changing during the move
-      //they are not used in update_mesh functions involving a Sliver_criterion
-    }
-
-    void backup_infinite_cell(const Cell_handle& c,
-                              const C3T3& c3t3)
-    {
-      for (int ii = 0; ii < 4; ++ii)
-      {
-        if (c3t3.triangulation().is_infinite(c->vertex(ii)))
-        {
-          surface_index_table_[0] = c->surface_patch_index(ii);
-          facet_surface_center_[0] = c->get_facet_surface_center(ii);
-          surface_center_index_table_[0] = c->get_facet_surface_center_index(ii);
-          break;
-        }
-      }
-    }
-
-  public:
-    bool operator<(const Cell_data_backup& cb) const
-    {
-      return cell_ids_ < cb.cell_ids_;
-    }
-
-    /**
-    * new_cell has the same vertices as cell_ids_
-    *       (checked before function is called)
-    *       resets new_cell's meta-data to its back-uped values
-    */
-    void restore(Cell_handle new_cell, C3T3& c3t3)
-    {
-      if (c3t3.triangulation().is_infinite(new_cell))
-        return restore_infinite_cell(new_cell, c3t3);
-
-      IndexMap new_to_old_indices;
-      CGAL_assertion_code(unsigned int nbv_found = 0);
-      for(int i = 0; i < 4; ++i)
-      {
-        std::size_t new_vi_index =
-          static_cast<std::size_t>(new_cell->vertex(i)->meshing_info());
-        for(std::size_t j = 0; j < 4; ++j)
-        {
-          if(new_vi_index == cell_ids_.vertex_id(j))
-          {
-            new_to_old_indices[static_cast<std::size_t>(i)] = j;
-            CGAL_assertion_code(++nbv_found);
-            break;//loop on j
-          }
-        }//end loop j
-      }//end loop i
-      CGAL_assertion(nbv_found == 4);
-
-      restore(new_cell, new_to_old_indices, c3t3);
-    }
-
-  private:
-    typedef CGAL::cpp11::array<std::size_t, 4> IndexMap;
-
-    void restore(Cell_handle c,
-                 const IndexMap& index_map,//new_to_old_indices
-                 C3T3& c3t3)
-    {
-      if(sliver_value_ > 0.)
-        c->set_sliver_value(sliver_value_);
-
-      for(int i = 0; i < 4; ++i)
-        c->reset_visited(i);
-        //we don't need to store 'visited' information because it is
-        //reset and used locally where it is needed
-
-      //add_to_complex sets the index, and updates the cell counter
-      //if c should be in the c3t3, add_to_complex has to be used
-      //to increment the nb of cells and facets in c3t3
-      if(Subdomain_index() != subdomain_index_)
-        c3t3.add_to_complex(c, subdomain_index_);
-      else
-        c3t3.remove_from_complex(c);
-
-      for(int i = 0; i < 4; ++i)
-      {
-        std::size_t old_i = index_map.at(static_cast<std::size_t>(i));
-        Surface_patch_index index = surface_index_table_[old_i];
-        //add_to_complex sets the index, and updates the facet counter
-        if(Surface_patch_index() != index)
-          c3t3.add_to_complex(Facet(c, i), index);
-        else
-          c3t3.remove_from_complex(Facet(c,i));
-
-        c->set_facet_surface_center(i, facet_surface_center_[old_i]);
-        c->set_facet_surface_center_index(i, surface_center_index_table_[old_i]);
-      }
-    }
-
-    void restore_infinite_cell(Cell_handle c,
-                               C3T3& c3t3)
-    {
-      c3t3.remove_from_complex(c);//infinite
-      for (unsigned int i = 0; i < 4; ++i)
-      {
-        if (!c3t3.triangulation().is_infinite(Facet(c,i)))
-        {
-          Surface_patch_index index = surface_index_table_[0];
-          if (Surface_patch_index() != index)
-            c3t3.add_to_complex(Facet(c, i), index);
-          else
-            c3t3.remove_from_complex(Facet(c, i));
-
-          c->set_facet_surface_center(i, facet_surface_center_[0]);
-          c->set_facet_surface_center_index(i, surface_center_index_table_[0]);
-          return;
-        }
-      }
-    }
-
-  private:
-    typedef typename Tr::Cell::Subdomain_index Subdomain_index;
-    typedef typename Tr::Cell::Surface_patch_index Surface_patch_index;
-    typedef typename Tr::Cell::Index Index;
-
-    Cell_from_ids cell_ids_;
-    FT sliver_value_;
-    Subdomain_index subdomain_index_;
-    CGAL::cpp11::array<Surface_patch_index, 4> surface_index_table_;
-    CGAL::cpp11::array<Point_3, 4> facet_surface_center_;
-    CGAL::cpp11::array<Index, 4> surface_center_index_table_;
-  };
-
-private:
-  // -----------------------------------
-  // Private methods
-  // -----------------------------------
-  /**
-   * Returns the minimum criterion value of c3t3 cells contained in \c cells.
-   */
-  template <typename SliverCriterion>
-  FT min_sliver_in_c3t3_value(const Cell_vector& cells,
-                              const SliverCriterion& criterion,
-                              const bool use_cache = true) const
-  {
-    // Get complex cells only
-    Cell_vector c3t3_cells_ = c3t3_cells(cells);
-    return min_sliver_value(c3t3_cells_, criterion, use_cache);
-  }
-
-  Cell_vector c3t3_cells(const Cell_vector& cells) const
-  {
-    Cell_vector c3t3_cells;
-    std::remove_copy_if(cells.begin(),
-                        cells.end(),
-                        std::back_inserter(c3t3_cells),
-                        std::not1(Is_in_c3t3<Cell_handle>(c3t3_)) );
-    return c3t3_cells;
-  }
-
-  /**
-   * Removes objects of [begin,end[ range from \c c3t3_
-   */
-  template<typename ForwardIterator>
-  void remove_from_c3t3(ForwardIterator begin, ForwardIterator end) const
-  {
-    while ( begin != end )
-      c3t3_.remove_from_complex(*begin++);
-  }
-
-  /**
-   * Remove cells and facets of \c cells from c3t3
-   */
-  template < typename ForwardIterator >
-  void remove_cells_and_facets_from_c3t3(ForwardIterator cells_begin,
-                                         ForwardIterator cells_end) const
-  {
-    Facet_vector facets = get_facets_not_inplace(cells_begin,cells_end);
-    remove_from_c3t3(facets.begin(), facets.end());
-    remove_from_c3t3(cells_begin, cells_end);
-  }
-
-  /**
-   * Insert into \c out the vertices of range [cells_begin,cells_end[
-   */
-  template <typename InputIterator, typename OutputIterator>
-  void fill_modified_vertices(InputIterator cells_begin,
-                              InputIterator cells_end,
-                              const Vertex_handle& vertex,
-                              OutputIterator out) const;
-
-  /**
-   * Backup cells meta-data to a vector of Cell_data_backup
-   */
-  template <typename CellsVector, typename CellDataSet>
-  void fill_cells_backup(const CellsVector& cells,
-                         CellDataSet& cells_backup) const;
-
-  template <typename CellsVector, typename CellDataSet>
-  void restore_from_cells_backup(const CellsVector& cells,
-                                 CellDataSet& cells_backup) const;
-
-
-  /**
-   * Update mesh iff sliver criterion value does not decrease.
-   */
-  template <typename SliverCriterion, typename OutputIterator>
-  std::pair<bool,Vertex_handle>
-  update_mesh_no_topo_change(const Point_3& new_position,
-                             const Vertex_handle& old_vertex,
-                             const SliverCriterion& criterion,
-                             OutputIterator modified_vertices,
-                             const Cell_vector& conflict_cells);
-
-  /**
-   * Move point and returns the set of cells that are not valid anymore, and
-   * the set of cells which have been deleted by the move process.
-   */
-  template < typename OutdatedCellsOutputIterator,
-             typename DeletedCellsOutputIterator >
-  Vertex_handle move_point(const Vertex_handle& old_vertex,
-                           const Point_3& new_position,
-                           OutdatedCellsOutputIterator outdated_cells,
-                           DeletedCellsOutputIterator deleted_cells) const;
-
-  Vertex_handle
-  move_point_topo_change(const Vertex_handle& old_vertex,
-                         const Point_3& new_position,
-                         Outdated_cell_set& outdated_cells_set,
-                         bool *could_lock_zone = NULL) const;
-
-  template < typename OutdatedCellsOutputIterator,
-             typename DeletedCellsOutputIterator >
-  Vertex_handle
-  move_point_topo_change(const Vertex_handle& old_vertex,
-                         const Point_3& new_position,
-                         OutdatedCellsOutputIterator outdated_cells,
-                         DeletedCellsOutputIterator deleted_cells) const;
-
-  Vertex_handle move_point_topo_change(const Vertex_handle& old_vertex,
-                                       const Point_3& new_position) const;
-
-  template < typename OutdatedCellsOutputIterator >
-  Vertex_handle
-  move_point_no_topo_change(const Vertex_handle& old_vertex,
-                            const Point_3& new_position,
-                            OutdatedCellsOutputIterator outdated_cells) const;
-
-  Vertex_handle
-  move_point_no_topo_change(const Vertex_handle& old_vertex,
-                            const Point_3& new_position) const;
-
-  /**
-   * Returns the least square plane from v, using adjacent surface points
-   */
-  Plane_3 get_least_square_surface_plane(const Vertex_handle& v,
-                                         Point_3& ref_point,
-                                         Surface_patch_index index = Surface_patch_index()) const;
-
-  /**
-   * @brief Returns the projection of \c p, using direction of
-   * \c projection_vector
-   */
-  Point_3
-  project_on_surface_aux(const Point_3& p,
-                         const Point_3& ref_point,
-                         const Vector_3& projection_vector) const;
-
-  /**
-   * Reverts the move from \c old_point to \c new_vertex. Returns the inserted
-   * vertex located at \c old_point
-   * and an output iterator on outdated cells
-   */
-  template<typename OutputIterator>
-  Vertex_handle revert_move(const Vertex_handle& new_vertex,
-                            const Point_3& old_point,
-                            OutputIterator outdated_cells)
-  {
-    // Move vertex
-    Vertex_handle revert_vertex =
-      move_point_topo_change(new_vertex,
-                             old_point,
-                             outdated_cells,
-                             CGAL::Emptyset_iterator()); //deleted cells
-    CGAL_assertion(Vertex_handle() != revert_vertex);
-
-    return revert_vertex;
-  }
-
-  /**
-   * Returns the boundary of restricted facets of \c facets,
-     and the list of vertices of all restricted facets,
-     which should not contain the vertex that is moving
-   */
-  Facet_boundary
-  get_surface_boundary(const Vertex_handle& moving_vertex,
-                       const Facet_vector& facets,
-                       Vertex_set& incident_surface_vertices) const;
-
-  /**
-   * Returns the boundary of restricted facets of \c cells
-     and the list of vertices of all restricted facets.
-   */
-  Facet_boundary
-  get_surface_boundary(const Vertex_handle& moving_vertex,
-                       const Cell_vector& cells,
-                       Vertex_set& incident_surface_vertices) const
-  {
-    return get_surface_boundary(moving_vertex,
-                                get_facets(cells),
-                                incident_surface_vertices);
-  }
-
-  /**
-   * Returns false if there is a vertex belonging to one facet of \c facets
-   * which has not his dimension < 3
-   */
-  bool check_no_inside_vertices(const Facet_vector& facets) const;
-
-  /**
-   * Returns the impacted cells when moving \c vertex to \c conflict_point
-   */
-  template <typename OutputIterator>
-  OutputIterator
-  get_conflict_zone_no_topo_change(const Vertex_handle& vertex,
-                                   OutputIterator conflict_cells) const;
-
-  template <typename OutputIterator>
-  OutputIterator
-  get_conflict_zone_topo_change(const Vertex_handle& vertex,
-                                const Point_3& conflict_point,
-                                OutputIterator conflict_cells) const;
-
-  template <typename CellsOutputIterator,
-            typename FacetsOutputIterator>
-  void
-  get_conflict_zone_topo_change(const Vertex_handle& v,
-                                const Point_3& conflict_point,
-                                CellsOutputIterator insertion_conflict_cells,
-                                FacetsOutputIterator insertion_conflict_boundary,
-                                CellsOutputIterator removal_conflict_cells,
-                                bool *could_lock_zone = NULL) const;
-
-
-  template < typename ConflictCellsInputIterator,
-             typename OutdatedCellsOutputIterator,
-             typename DeletedCellsOutputIterator >
-  Vertex_handle
-  move_point_topo_change_conflict_zone_known(const Vertex_handle& old_vertex,
-                                             const Point_3& new_position,
-                                             const Facet& insertion_boundary_facet,
-                                             ConflictCellsInputIterator insertion_conflict_cells_begin,
-                                             ConflictCellsInputIterator insertion_conflict_cells_end,
-                                             ConflictCellsInputIterator removal_conflict_cells_begin,
-                                             ConflictCellsInputIterator removal_conflict_cells_end,
-                                             OutdatedCellsOutputIterator outdated_cells,
-                                             DeletedCellsOutputIterator deleted_cells) const;
-
-  /**
-   * Updates \c boundary wrt \c edge: if edge is already in boundary we remove
-   * it, else we add it.
-   */
-  void update_boundary(Facet_boundary& boundary,
-                       const Ordered_edge& edge,
-                       const Vertex_handle third_vertex,
-                       const Surface_patch_index& surface_index) const
-  {
-    const typename Facet_boundary::value_type x =
-      std::make_pair(edge,
-                     std::make_pair(surface_index,
-                                    std::make_pair(c3t3_.in_dimension(third_vertex),
-                                                   c3t3_.index(third_vertex)
-                                                   )
-                                    )
-                     );
-    typename Facet_boundary::iterator boundary_it =
-      boundary.find(edge);
-
-    if ( boundary_it != boundary.end() )
-      boundary.erase(boundary_it);
-    else
-      boundary.insert(x);
-  }
-
-  /**
-   * Returns the facets of \c cells (returns each facet only once i.e. use
-   * canonical facet)
-   */
-  Facet_vector get_facets(const Cell_vector& cells) const
-  {
-    return get_facets(cells.begin(),cells.end());
-  }
-
-  //  TODO: write get_facets so that it uses update_facets with a FacetUpdater that calls push_back
-
-#if defined(CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST) && defined(CGAL_INTRUSIVE_LIST)
-  template <typename ForwardIterator>
-  Facet_vector get_facets(ForwardIterator first_cell,
-                          ForwardIterator last_cell) const
-  {
-    Facet_vector result; // AF: todo: resize?
-#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
-    Intrusive_list<Cell_handle> outdated_cells(first_cell, last_cell);
-#else
-    Intrusive_list<Cell_handle> outdated_cells;
-    for( ;first_cell!= last_cell; ++first_cell){
-      outdated_cells.insert(*first_cell);
-    }
-#endif
-
-    for(typename Intrusive_list<Cell_handle>::iterator it = outdated_cells.begin();
-        it != outdated_cells.end();
-        ++it){
-      Cell_handle cell = *it;
-      int i=0;
-      bool inf = false;
-      for ( ; i<4 && (!inf) ; ++i ){
-        if ( tr_.is_infinite(cell->vertex(i)) ){
-          inf = true;
-          Cell_handle n = cell->neighbor(i);
-          if(n->next_intrusive() != Cell_handle()){// the neighbor is also outdated
-            if(cell < n){ // otherwise n will report it later
-              result.push_back(Facet(cell,i));
-            }
-          } else { // report it now or never
-            if(cell < n){
-              result.push_back(Facet(cell,i));
-            }else {
-              result.push_back(Facet(n,n->index(cell)));
-            }
-          }
-        }
-      }
-      if(! inf){
-        for ( i=0 ; i<4 ; ++i ){
-          Cell_handle n = cell->neighbor(i);
-          if(n->next_intrusive() != Cell_handle()){// the neighbor is also outdated
-            if(cell < n){ // otherwise n will report it later
-              result.push_back(Facet(cell,i));
-            }
-          } else { // report it now or never
-            if(cell < n){
-              result.push_back(Facet(cell,i));
-            }else {
-              result.push_back(Facet(n,n->index(cell)));
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-#else
-  /**
-   * Returns the facets of \c cells (returns each facet only once i.e. use
-   * canonical facet)
-   */
-  template <typename ForwardIterator>
-  Facet_vector get_facets(ForwardIterator first_cell,
-                          ForwardIterator last_cell) const
-  {
-    // Get all facets
-    typedef Get_all_facets<std::back_insert_iterator<Facet_vector> > Get_facets;
-
-    Facet_vector all_facets;
-    all_facets.reserve(64);
-    std::for_each(first_cell,
-                  last_cell,
-                  Get_facets(tr_,std::back_inserter(all_facets)));
-
-    std::sort(all_facets.begin(), all_facets.end());
-
-    // Keep one copy of each facet (maybe copy could be avoided)
-    //    typename Facet_vector::iterator all_facets_end =
-    //      std::unique(all_facets.begin(), all_facets.end());
-    Facet_vector facets;
-    facets.reserve(64);
-    std::unique_copy(all_facets.begin(),
-                     all_facets.end(),
-                     std::back_inserter(facets));
-
-    return facets;
-  }
-#endif
-
-#ifdef CGAL_INTRUSIVE_LIST
-  template <typename FacetUpdater>
-  void update_facets(Intrusive_list<Cell_handle>& outdated_cells, FacetUpdater updater)
-  {
-# ifdef CGAL_LINKED_WITH_TBB
-    // Parallel
-    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-    {
-      tbb::parallel_do(
-        outdated_cells.begin(), outdated_cells.end(),
-        Update_cell_facets<Self, FacetUpdater>(tr_, updater));
-    }
-    // Sequential
-    else
-# endif // CGAL_LINKED_WITH_TBB
-    {
-      typename Intrusive_list<Cell_handle>::iterator it;
-      for(it = outdated_cells.begin();
-          it != outdated_cells.end();
-          ++it)
-      {
-        Update_cell_facets<Self, FacetUpdater> ucf(tr_, updater);
-        ucf(*it);
-      }
-    }
-  }
-#endif //CGAL_INTRUSIVE_LIST
-
-  // Used by the parallel version
-  template <typename FacetUpdater>
-  void update_facets(std::vector<Cell_handle>& outdated_cells_vector, FacetUpdater updater)
-  {
-# ifdef CGAL_LINKED_WITH_TBB
-    // Parallel
-    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-    {
-      tbb::parallel_for
-      (
-        tbb::blocked_range<size_t>(0, outdated_cells_vector.size()),
-        Update_cell_facets_for_parallel_for<Self, FacetUpdater>(
-          tr_, updater, outdated_cells_vector)
-      );
-    }
-    // Sequential
-    else
-# endif // CGAL_LINKED_WITH_TBB
-    {
-      typename std::vector<Cell_handle>::iterator it;
-      for(it = outdated_cells_vector.begin();
-          it != outdated_cells_vector.end();
-          ++it)
-      {
-        Update_cell_facets<Self, FacetUpdater> ucf(tr_, updater);
-        ucf(*it);
-      }
-    }
-  }
-
-
-  /**
-   * Returns the facets of \c cells (returns each facet only once i.e. use
-   * canonical facet)
-   */
-  template <typename ForwardIterator>
-  Facet_vector get_facets_not_inplace(ForwardIterator first_cell,
-                                      ForwardIterator last_cell) const
-  {
-    typedef Get_all_facets<std::back_insert_iterator<Facet_vector> > Get_facets;
-
-    Facet_vector all_facets;
-    all_facets.reserve(64);
-    std::for_each(first_cell,
-                  last_cell,
-                  Get_facets(tr_,std::back_inserter(all_facets)));
-
-    std::sort(all_facets.begin(), all_facets.end());
-
-    // Keep one copy of each facet (maybe copy could be avoided)
-    //    typename Facet_vector::iterator all_facets_end =
-    //      std::unique(all_facets.begin(), all_facets.end());
-    Facet_vector facets;
-    facets.reserve(64);
-    std::unique_copy(all_facets.begin(),
-                     all_facets.end(),
-                     std::back_inserter(facets));
-    CGAL_HISTOGRAM_PROFILER("|facets|", 
-                            static_cast<unsigned int>(facets.size()));
-    return facets;
-  }
-
-
-  /**
-   * Returns false iff a surface facet of `cells` has entered or left the
-   * restricted Delaunay, or if its surface patch index has changed
-   *
-   * That function does not modify the c3t3, but it does update the facet
-   * surface centers. The function is only called by
-   * `update_mesh_no_topo_change()`.
-   */
-  bool verify_surface(const Cell_vector& cells) const
-  {
-    // Naive implementation.
-    // Todo: improve this (maybe we don't have to check if no facet is on surface)
-    Facet_vector facets = get_facets(cells);
-    Facet_vector surface_facets;
-
-    // Check that nothing changed
-    Update_c3t3 checker(domain_,c3t3_);
-    for ( typename Facet_vector::iterator fit = facets.begin() ;
-          fit != facets.end() ;
-          ++fit )
-    {
-      if ( c3t3_.is_in_complex(*fit) )
-      {
-        surface_facets.push_back(*fit);
-      }
-      const Surface_patch sp = checker(*fit,
-                                       false, /* do not update c3t3 */
-                                       true); /* update surface centers */
-      // false means "do not update the c3t3"
-      if ( c3t3_.is_in_complex(*fit) != (bool)sp ||
-           ((bool)sp && c3t3_.surface_patch_index(*fit) != sp.get()) )
-        return false;
-    }
-
-    return true;
-  }
-
-  /**
-   * Restore mesh for cells and facets of \c cells, using domain_
-   */
-  template <typename ForwardIterator>
-  void restore_mesh(ForwardIterator first_cell, ForwardIterator last_cell)
-  {
-    Facet_vector facets = get_facets(first_cell, last_cell);
-    restore_mesh(first_cell, last_cell, facets.begin(), facets.end());
-  }
-
-  /**
-   * Restore mesh for cells of \c cells and facets of \c facets, using domain_
-   */
-  template <typename CellForwardIterator, typename FacetForwardIterator>
-  void restore_mesh(CellForwardIterator first_cell,
-                    CellForwardIterator last_cell,
-                    FacetForwardIterator first_facet,
-                    FacetForwardIterator last_facet)
-  {
-    // Update mesh
-    Update_c3t3 updater(domain_,c3t3_);
-    std::for_each(first_facet, last_facet, updater);
-    std::for_each(first_cell, last_cell, updater);
-  }
-
-  /**
-   * Returns true if facets of \c facets have the same boundary as
-   * \c old_boundary, and if the list of vertices has not changed.
-   */
-  bool check_surface_mesh(const Vertex_handle& moving_vertex,
-                          const Facet_vector& facets,
-                          const Facet_boundary& old_boundary,
-                          const Vertex_set& old_incident_surface_vertices) const
-  {
-    Vertex_set incident_surface_vertices;
-    Facet_boundary new_boundary = get_surface_boundary(moving_vertex,
-                                                       facets,
-                                                       incident_surface_vertices);
-    return ( old_boundary.size() == new_boundary.size() &&
-             old_incident_surface_vertices == incident_surface_vertices &&
-             std::equal(new_boundary.begin(),
-                        new_boundary.end(),
-                        old_boundary.begin()) );
-  }
-
-
-  void set_facet_visited(const Facet& facet)
-  {
-    facet.first->set_facet_visited(facet.second);
-    const Facet mirror_facet = tr_.mirror_facet(facet);
-    mirror_facet.first->set_facet_visited(mirror_facet.second);
-  }
-
-  /**
-   * Orders handles \c h1, \c h2 & \c h3
-   */
-  template <typename Handle>
-  void order_handles(Handle& h1, Handle& h2, Handle& h3) const
-  {
-    // Function used in get_surface_boundary
-
-    if ( h2 < h1 )
-      std::swap(h1,h2);
-
-    if ( h3 < h2 )
-    {
-      std::swap(h2,h3);
-
-      if ( h2 < h1 ) // don't need to compare h2 & h1 if h2 didn't change
-        std::swap(h1,h2);
-    }
-  }
-
-  template <typename CellRange>
-  void reset_sliver_cache(CellRange& cell_range) const
-  {
-    reset_sliver_cache(boost::begin(cell_range),
-                       boost::end(cell_range));
-  }
-
-  template <typename CellForwardIterator>
-  void reset_sliver_cache(CellForwardIterator cells_begin,
-                            CellForwardIterator cells_end) const
-  {
-    // std::cerr << "reset_sliver_cache\n";
-    namespace bl = boost::lambda;
-    std::for_each(cells_begin, cells_end,
-                  bl::bind(&Cell::reset_cache_validity, *bl::_1) );
-  }
-
-  template <typename CellRange>
-  void reset_circumcenter_cache(CellRange& cell_range) const
-  {
-    reset_circumcenter_cache(boost::begin(cell_range),
-                             boost::end(cell_range));
-  }
-
-  template <typename CellForwardIterator>
-  void reset_circumcenter_cache(CellForwardIterator cells_begin,
-                            CellForwardIterator cells_end) const
-  {
-    namespace bl = boost::lambda;
-    std::for_each(cells_begin, cells_end,
-                  bl::bind(&Cell::invalidate_circumcenter, *bl::_1) );
-  }
-
-
-private:
-
-  // Functor for update_facets function (base)
-  template <typename C3T3_helpers_, typename FacetUpdater_>
-  class Update_cell_facets
-  {
-    Tr                        & m_tr;
-    FacetUpdater_             & m_facet_updater;
-
-  protected:
-
-    void update(const Cell_handle& cell) const
-    {
-      Cell_handle null_cell;
-      bool inf = false;
-      for (int i=0 ; i<4 && (!inf) ; ++i ){
-        if ( m_tr.is_infinite(cell->vertex(i)) ){
-          inf = true;
-          Cell_handle n = cell->neighbor(i);
-          if(n->next_intrusive() != null_cell){// the neighbor is also outdated
-            if(cell < n){ // otherwise n will report it later
-              Facet f(cell,i);
-              m_facet_updater(f);
-            }
-          } else { // report it now or never
-            if(cell < n){
-              Facet f(cell,i);
-              m_facet_updater(f);
-            }else {
-              Facet f(n,n->index(cell));
-              m_facet_updater(f);
-            }
-          }
-        }
-      }
-      if(! inf){
-        for ( int i=0 ; i<4 ; ++i ){
-          Cell_handle n = cell->neighbor(i);
-          if(n->next_intrusive() != null_cell){// the neighbor is also outdated
-            if(cell < n){ // otherwise n will report it later
-              Facet f(cell,i);
-              m_facet_updater(f);
-            }
-          } else { // report it now or never
-            if(cell < n){
-              Facet f(cell,i);
-              m_facet_updater(f);
-            }else {
-              Facet f(n,n->index(cell));
-              m_facet_updater(f);
-            }
-          }
-        }
-      }
-    }
-
-  public:
-    // Constructor
-    Update_cell_facets(Tr &tr,
-                  FacetUpdater_& fu)
-    : m_tr(tr), m_facet_updater(fu)
-    {}
-
-    // Constructor
-    Update_cell_facets(const Update_cell_facets &uf)
-    : m_tr(uf.m_tr), m_facet_updater(uf.m_facet_updater)
-    {}
-
-    // operator()
-    void operator()(const Cell_handle& cell) const
-    {
-      update(cell);
-    }
-  };
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Same functor: special version for tbb:parallel_for
-  template <typename C3T3_helpers_, typename FacetUpdater_>
-  class Update_cell_facets_for_parallel_for
-  : Update_cell_facets<C3T3_helpers, FacetUpdater_>
-  {
-    typedef Update_cell_facets<C3T3_helpers, FacetUpdater_> Base;
-    using Base::update;
-
-    const std::vector<Cell_handle>  & m_outdated_cells;
-
-  public:
-    // Constructor
-    Update_cell_facets_for_parallel_for(
-      Tr &tr,
-      FacetUpdater_& fu,
-      const std::vector<Cell_handle> &oc)
-    : Base(tr, fu), m_outdated_cells(oc)
-    {}
-
-    // Constructor
-    Update_cell_facets_for_parallel_for(
-      const Update_cell_facets_for_parallel_for &uf)
-    : Base(uf), m_outdated_cells(uf.m_outdated_cells)
-    {}
-
-    // operator()
-    void operator()(const tbb::blocked_range<size_t>& r) const
-    {
-      for( size_t i = r.begin() ; i != r.end() ; ++i)
-        update(m_outdated_cells[i]);
-    }
-  };
-#endif //CGAL_LINKED_WITH_TBB
-
-  // -----------------------------------
-  // -----------------------------------
-  // -----------------------------------
-
-  // Functor for rebuild_restricted_delaunay function
-  template <typename C3T3_, typename Update_c3t3_>
-  class Update_cell
-  {
-    C3T3                      & m_c3t3;
-    Update_c3t3_              & m_updater;
-
-  protected:
-    typedef typename C3T3_::Cell_handle Cell_handle;
-
-    void update(const Cell_handle& cell) const
-    {
-      m_c3t3.remove_from_complex(cell);
-      m_updater(cell);
-    }
-
-  public:
-    // Constructor
-    Update_cell(C3T3_ &c3t3, Update_c3t3_& updater)
-    : m_c3t3(c3t3), m_updater(updater)
-    {}
-
-    // Constructor
-    Update_cell(const Update_cell &uc)
-    : m_c3t3(uc.m_c3t3), m_updater(uc.m_updater)
-    {}
-
-    // operator()
-    void operator()(const Cell_handle& cell) const
-    {
-      update(cell);
-    }
-  };
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Same functor: special version for tbb:parallel_for
-  template <typename C3T3_, typename Update_c3t3_>
-  class Update_cell_for_parallel_for
-  : Update_cell<C3T3_, Update_c3t3_>
-  {
-    typedef Update_cell<C3T3_, Update_c3t3_> Base;
-    using Base::update;
-
-    const std::vector<Cell_handle>  & m_outdated_cells;
-
-  public:
-    // Constructor
-    Update_cell_for_parallel_for(
-      C3T3_ &c3t3,
-      Update_c3t3_& updater,
-      const std::vector<Cell_handle> &oc)
-    : Base(c3t3, updater), m_outdated_cells(oc)
-    {}
-
-    // Constructor
-    Update_cell_for_parallel_for(
-      const Update_cell_for_parallel_for &uc)
-    : Base(uc), m_outdated_cells(uc.m_outdated_cells)
-    {}
-
-    // operator()
-    void operator()(const tbb::blocked_range<size_t>& r) const
-    {
-      for( size_t i = r.begin() ; i != r.end() ; ++i)
-        update(m_outdated_cells[i]);
-    }
-  };
-#endif //CGAL_LINKED_WITH_TBB
-
-  // -----------------------------------
-  // -----------------------------------
-  // -----------------------------------
-
-  // Functor for rebuild_restricted_delaunay function
-#ifdef CGAL_LINKED_WITH_TBB
-  template <typename C3T3_helpers_, typename C3T3_, typename Update_c3t3_,
-            typename Vertex_to_proj_set_>
-  class Update_facet
-  {
-    const C3T3_helpers_       & m_c3t3_helpers;
-    C3T3_                     & m_c3t3;
-    Update_c3t3_              & m_updater;
-    Vertex_to_proj_set_       & m_vertex_to_proj;
-
-    typedef typename C3T3_::Vertex_handle       Vertex_handle;
-    typedef typename C3T3_::Cell_handle         Cell_handle;
-    typedef typename C3T3_::Facet               Facet;
-    typedef typename C3T3::Surface_patch_index  Surface_patch_index;
-
-  public:
-    // Constructor
-    Update_facet(const C3T3_helpers_ & c3t3_helpers,
-                 C3T3_ &c3t3, Update_c3t3_& updater,
-                 Vertex_to_proj_set_ &vertex_to_proj)
-    : m_c3t3_helpers(c3t3_helpers), m_c3t3(c3t3), m_updater(updater),
-      m_vertex_to_proj(vertex_to_proj)
-    {}
-
-    // Constructor
-    Update_facet(const Update_facet &uc)
-    : m_c3t3_helpers(uc.m_c3t3_helpers), m_c3t3(uc.m_c3t3),
-      m_updater(uc.m_updater), m_vertex_to_proj(uc.m_vertex_to_proj)
-    {}
-
-    // operator()
-    void operator()( const Facet& facet ) const
-    {
-      // Update facet
-      m_c3t3.remove_from_complex(facet);
-      m_updater(facet);
-
-      // Update m_vertex_to_proj
-      if ( m_c3t3.is_in_complex(facet) )
-      {
-        // Iterate on vertices
-        int k = facet.second;
-        for ( int i=1 ; i<4 ; ++i )
-        {
-          const Vertex_handle& v = facet.first->vertex((k+i)&3);
-          if ( m_c3t3.in_dimension(v) > 2 )
-          {
-            std::pair<Vertex_handle, Surface_patch_index> p
-              = std::make_pair(v, m_c3t3.surface_patch_index(facet));
-            m_c3t3_helpers.lock_vertex_to_proj();
-            m_vertex_to_proj.insert(p);
-            m_c3t3_helpers.unlock_vertex_to_proj();
-          }
-        }
-      }
-    }
-  };
-#endif
-
-  // -----------------------------------
-  // Private data
-  // -----------------------------------
-  C3T3& c3t3_;
-  Tr& tr_;
-  const MeshDomain& domain_;
-}; // class C3T3_helpers
-
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion, typename OutputIterator>
-std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
-C3T3_helpers<C3T3,MD>::
-update_mesh(const Point_3& new_position,
-            const Vertex_handle& old_vertex,
-            const SliverCriterion& criterion,
-            OutputIterator modified_vertices,
-            bool *could_lock_zone)
-{
-  // std::cerr << "\nupdate_mesh[v1](" << new_position << ",\n"
-  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
-  //           << ")\n";
-
-  if (could_lock_zone)
-    *could_lock_zone = true;
-
-  Cell_vector incident_cells_;
-  incident_cells_.reserve(64);
-  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
-  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
-  {
-
-    return update_mesh_no_topo_change(new_position,
-                                      old_vertex,
-                                      criterion,
-                                      modified_vertices,
-                                      incident_cells_);
-  }
-  else
-  {
-    return update_mesh_topo_change(new_position,
-                                   old_vertex,
-                                   criterion,
-                                   modified_vertices,
-                                   could_lock_zone);
-  }
-}
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion, typename OutputIterator>
-std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
-C3T3_helpers<C3T3,MD>::
-update_mesh_no_topo_change(const Point_3& new_position,
-                           const Vertex_handle& old_vertex,
-                           const SliverCriterion& criterion,
-                           OutputIterator modified_vertices,
-                           const Cell_vector& conflict_cells )
-{
-  // std::cerr << "update_mesh_no_topo_change(\n"
-  //           << new_position << ",\n"
-  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
-  //           << ")\n";
-
-    //backup metadata
-  std::set<Cell_data_backup> cells_backup;
-  fill_cells_backup(conflict_cells, cells_backup);
-
-  // Get old values
-  criterion.before_move(c3t3_cells(conflict_cells));
-  // std::cerr << "old_sliver_value=" << old_sliver_value << std::endl;
-  Point_3 old_position = old_vertex->point();
-
-  // Move point
-  reset_circumcenter_cache(conflict_cells);
-  reset_sliver_cache(conflict_cells);
-  move_point_no_topo_change(old_vertex,new_position);
-
-  // Check that surface mesh is still valid
-  // and Get new criterion value (conflict_zone did not change)
-    // warnings : valid_move updates caches
-    //     verify_surface does not change c3t3 when returns false,
-    //     but it does change circumcenters
-  if( verify_surface(conflict_cells)
-    && criterion.valid_move(c3t3_cells(conflict_cells)))
-  {
-    fill_modified_vertices(conflict_cells.begin(), conflict_cells.end(),
-                           old_vertex, modified_vertices);
-    return std::make_pair(true,old_vertex);
-  }
-  else // revert move
-  {
-    // std::cerr << "update_mesh_no_topo_change: revert move to "
-    //           << old_position << "\n";
-    reset_circumcenter_cache(conflict_cells);
-    //sliver caches have been updated by valid_move
-    reset_sliver_cache(conflict_cells);
-    move_point_no_topo_change(old_vertex,old_position);
-
-    //restore meta-data (cells should have same connectivity as before move)
-    // cells_backup does not contain infinite cells so they can be fewer
-    CGAL_assertion(conflict_cells.size() >= cells_backup.size());
-    restore_from_cells_backup(conflict_cells, cells_backup);
-
-    return std::make_pair(false,old_vertex);
-  }
-}
-
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion, typename OutputIterator>
-std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
-C3T3_helpers<C3T3,MD>::
-update_mesh_topo_change(const Point_3& new_position,
-                        const Vertex_handle& old_vertex,
-                        const SliverCriterion& criterion,
-                        OutputIterator modified_vertices,
-                        bool *could_lock_zone)
-{
-  // std::cerr << "update_mesh_topo_change(\n"
-  //           << new_position << ",\n"
-  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
-  //           << ")\n";
-  // check_c3t3(c3t3_);
-  Cell_set insertion_conflict_cells;
-  Cell_set removal_conflict_cells;
-  Facet_vector insertion_conflict_boundary;
-  insertion_conflict_boundary.reserve(64);
-  get_conflict_zone_topo_change(old_vertex, new_position,
-                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
-                                std::back_inserter(insertion_conflict_boundary),
-                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()),
-                                could_lock_zone);
-
-  if (could_lock_zone && *could_lock_zone == false)
-    return std::make_pair(false, Vertex_handle());
-
-  if(insertion_conflict_boundary.empty())
-    return std::make_pair(false,old_vertex); //new_location is a vertex already
-
-  Cell_vector conflict_cells;
-  conflict_cells.reserve(insertion_conflict_cells.size()+removal_conflict_cells.size());
-  std::set_union(insertion_conflict_cells.begin(), insertion_conflict_cells.end(),
-                 removal_conflict_cells.begin(), removal_conflict_cells.end(),
-                 std::back_inserter(conflict_cells));
-
-    //backup metadata
-  std::set<Cell_data_backup> cells_backup;
-  fill_cells_backup(conflict_cells, cells_backup);
-  CGAL_assertion(conflict_cells.size() == cells_backup.size());
-
-  criterion.before_move(c3t3_cells(conflict_cells));
-  // std::cerr << "old_sliver_value=" << old_sliver_value << std::endl;
-  Point_3 old_position = old_vertex->point();
-
-  // Keep old boundary
-  Vertex_set old_incident_surface_vertices;
-  Facet_boundary old_surface_boundary =
-    get_surface_boundary(old_vertex, conflict_cells, old_incident_surface_vertices);
-
-  reset_circumcenter_cache(conflict_cells);
-  reset_sliver_cache(conflict_cells);
-
-  Cell_vector outdated_cells;
-  outdated_cells.reserve(64);
-    Vertex_handle new_vertex =
-        move_point_topo_change_conflict_zone_known(old_vertex, new_position,
-                                                    insertion_conflict_boundary[0],
-                                                    insertion_conflict_cells.begin(),
-                                                    insertion_conflict_cells.end(),
-                                                    removal_conflict_cells.begin(),
-                                                    removal_conflict_cells.end(),
-                                                    std::back_inserter(outdated_cells),
-                                                    CGAL::Emptyset_iterator());
-
-  // If nothing changed, return
-  if ( old_position == new_vertex->point() )
-  {
-    // std::cerr << "update_mesh_topo_change: no move!\n";
-    // check_c3t3(c3t3_);
-    return std::make_pair(false,old_vertex);
-  }
-
-  restore_mesh(outdated_cells.begin(),outdated_cells.end());
-  // std::cerr << "new_sliver_value=" << new_sliver_value << std::endl;
-
-  // Check that surface boundary does not change.
-  // This check ensures that vertices which are inside c3t3 stay inside.
-  if (criterion.valid_move(c3t3_cells(outdated_cells))
-      && check_surface_mesh(new_vertex,
-                            get_facets(outdated_cells),
-                            old_surface_boundary,
-                            old_incident_surface_vertices) )
-  {
-    fill_modified_vertices(outdated_cells.begin(), outdated_cells.end(),
-                           new_vertex, modified_vertices);
-    // check_c3t3(c3t3_);
-    return std::make_pair(true,new_vertex);
-  }
-  else
-  {
-    // Removing from c3t3 cells which will be destroyed by revert_move
-    // is done by move_point_topo_change_conflict_zone_known, called by revert_move
-
-    // std::cerr << "update_mesh_topo_change: revert move to "
-    //           << old_position << "\n";
-    //reset caches in case cells are re-used by the compact container
-    reset_circumcenter_cache(outdated_cells);
-    reset_sliver_cache(outdated_cells);
-    outdated_cells.clear();
-
-    // Revert move
-    Vertex_handle revert_vertex = revert_move(new_vertex, old_position,
-                          std::inserter(outdated_cells, outdated_cells.end()));
-
-    //restore meta-data (cells should have same connectivity as before move)
-    //cells should be the same (connectivity-wise) as before initial move
-    CGAL_assertion(outdated_cells.size() == cells_backup.size());
-    restore_from_cells_backup(outdated_cells, cells_backup);
-
-    // check_c3t3(c3t3_);
-    return std::make_pair(false,revert_vertex);
-  }
-}
-
-template <typename C3T3, typename MD>
-template <typename OutputIterator>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-update_mesh(const Point_3& new_position,
-            const Vertex_handle& old_vertex,
-            OutputIterator modified_vertices,
-            bool fill_vertices)
-{
-  // std::cerr << "\nupdate_mesh[v2](" << new_position << ",\n"
-  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
-  //           << ")\n";
-  Cell_vector outdated_cells;
-  Vertex_handle new_vertex = move_point(old_vertex,
-                                        new_position,
-                                        std::back_inserter(outdated_cells),
-                                        CGAL::Emptyset_iterator());
-  // move_point has invalidated caches
-
-  restore_mesh(outdated_cells.begin(),outdated_cells.end());
-
-  // Fill modified vertices
-  if ( fill_vertices
-        && !(boost::is_same<OutputIterator,CGAL::Emptyset_iterator>::value))
-  {
-    fill_modified_vertices(outdated_cells.begin(), outdated_cells.end(),
-                           new_vertex, modified_vertices);
-  }
-
-  return new_vertex;
-}
-
-#ifdef CGAL_INTRUSIVE_LIST
-template <typename C3T3, typename MD>
-template <typename OutdatedCells>
-void
-C3T3_helpers<C3T3,MD>::
-rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
-                            Moving_vertices_set& moving_vertices)
-{
-  typename OutdatedCells::iterator first_cell = outdated_cells.begin();
-  typename OutdatedCells::iterator last_cell = outdated_cells.end();
-  Update_c3t3 updater(domain_,c3t3_);
-
-# ifdef CGAL_MESH_3_PROFILING
-  std::cerr << std::endl << "  Updating cells...";
-  WallClockTimer t;
-  size_t num_cells = c3t3_.number_of_cells_in_complex();
-# endif
-
-  // Updates cells
-  // Note: ~58% of rebuild_restricted_delaunay time
-
-  std::set<Vertex_handle> vertex_to_proj;
-
-# ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    std::vector<Cell_handle> outdated_cells_vector;
-    outdated_cells_vector.reserve(outdated_cells.size());
-    for ( ; first_cell != last_cell ; ++first_cell)
-    {
-      outdated_cells_vector.push_back(*first_cell);
-    }
-
-    tbb::parallel_for(
-      tbb::blocked_range<size_t>(0, outdated_cells_vector.size()),
-      Update_cell_for_parallel_for<C3T3, Update_c3t3>(
-        c3t3_, updater, outdated_cells_vector));
-
-#   ifdef CGAL_MESH_3_PROFILING
-    std::cerr << " done in " << t.elapsed() << " seconds (#cells from "
-      << num_cells << " to " << c3t3_.number_of_cells_in_complex() << ")."
-      << std::endl;
-    std::cerr << "  Updating facets...";
-    t.reset();
-#   endif
-
-    // Get facets (returns each canonical facet only once)
-    // Note: ~42% of rebuild_restricted_delaunay time
-    //  Facet_vector facets;
-    lock_vertex_to_proj();
-    Facet_updater facet_updater(c3t3_,vertex_to_proj, updater);
-    unlock_vertex_to_proj();
-    update_facets(outdated_cells_vector, facet_updater);
-
-    // now we can clear
-    outdated_cells.clear();
-  }
-  // Sequential
-  else
-# endif // CGAL_LINKED_WITH_TBB
-  {
-    while ( first_cell != last_cell )
-    {
-      Cell_handle cell = *first_cell++;
-      c3t3_.remove_from_complex(cell);
-      updater(cell);
-    }
-
-# ifdef CGAL_MESH_3_PROFILING
-    std::cerr << " done in " << t.elapsed() << " seconds (#cells from "
-      << num_cells << " to " << c3t3_.number_of_cells_in_complex() << ")."
-      << std::endl;
-    std::cerr << "  Updating facets...";
-    t.reset();
-# endif
-
-    // Get facets (returns each canonical facet only once)
-    // Note: ~42% of rebuild_restricted_delaunay time
-    //  Facet_vector facets;
-    Facet_updater facet_updater(c3t3_,vertex_to_proj, updater);
-    update_facets(outdated_cells, facet_updater);
-
-    // now we can clear
-    outdated_cells.clear();
-  }
-
-# ifdef CGAL_MESH_3_PROFILING
-  std::cerr << " done in " << t.elapsed() << " seconds ("
-            << vertex_to_proj.size() << " vertices to project)." << std::endl;
-  std::cerr << "  Projecting interior vertices...";
-  t.reset();
-# endif
-
-    CGAL_HISTOGRAM_PROFILER("|vertex_to_proj|=", 
-                            static_cast<unsigned int>(vertex_to_proj.size()));
-  // Project interior vertices
-  // Note: ~0% of rebuild_restricted_delaunay time
-  // TODO : iterate to be sure no interior vertice become on the surface
-  // because of move ?
-  for ( typename std::set<Vertex_handle>::iterator it = vertex_to_proj.begin() ;
-       it != vertex_to_proj.end() ;
-       ++it )
-  {
-    Point_3 new_pos = project_on_surface((*it)->point(),*it);
-
-    if ( new_pos != Point_3() )
-    {
-      //freezing needs 'erase' to be done before the vertex is actually destroyed
-      // Update moving vertices (it becomes new_vertex)
-      moving_vertices.erase(*it);
-
-      Vertex_handle new_vertex = update_mesh(new_pos,*it);
-      c3t3_.set_dimension(new_vertex,2);
-
-      moving_vertices.insert(new_vertex);
-    }
-  }
-
-# ifdef CGAL_MESH_3_PROFILING
-  std::cerr << " done in " << t.elapsed() << " seconds." << std::endl;
-# endif
-}
-#endif //CGAL_INTRUSIVE_LIST
-
-template <typename C3T3, typename MD>
-template <typename ForwardIterator>
-void
-C3T3_helpers<C3T3,MD>::
-rebuild_restricted_delaunay(ForwardIterator first_cell,
-                            ForwardIterator last_cell,
-                            Moving_vertices_set& moving_vertices)
-{
-  Update_c3t3 updater(domain_,c3t3_);
-
-  // Get facets (returns each canonical facet only once)
-  Facet_vector facets = get_facets(first_cell, last_cell);
-
-  // Updates cells
-  // Note: ~58% of rebuild_restricted_delaunay time
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tbb::parallel_do(first_cell, last_cell,
-      Update_cell<C3T3, Update_c3t3>(c3t3_, updater));
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-    while ( first_cell != last_cell )
-    {
-      Update_cell<C3T3, Update_c3t3> uc(c3t3_, updater);
-      uc(*first_cell++);
-    }
-  }
-
-  // Updates facets
-  typedef std::set<std::pair<Vertex_handle, Surface_patch_index> >
-    Vertex_to_proj_set;
-  Vertex_to_proj_set vertex_to_proj;
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tbb::parallel_do(
-      facets.begin(), facets.end(),
-      Update_facet<Self, C3T3, Update_c3t3, Vertex_to_proj_set>(
-        *this, c3t3_, updater, vertex_to_proj)
-    );
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-    for ( typename Facet_vector::iterator fit = facets.begin() ;
-         fit != facets.end() ;
-         ++fit )
-    {
-      // Update facet
-      c3t3_.remove_from_complex(*fit);
-      updater(*fit);
-
-      // Update vertex_to_proj
-      if ( c3t3_.is_in_complex(*fit) )
-      {
-        // Iterate on vertices
-        int k = fit->second;
-        for ( int i=1 ; i<4 ; ++i )
-        {
-          const Vertex_handle& v = fit->first->vertex((k+i)&3);
-          if ( c3t3_.in_dimension(v) > 2 )
-          {
-            vertex_to_proj.insert
-              (std::make_pair(v, c3t3_.surface_patch_index(*fit)));
-          }
-        }
-      }
-    }
-  }
-
-  // Project interior vertices
-  // TODO : iterate to be sure no interior vertice become on the surface
-  // because of move ?
-  for ( typename std::set<std::pair<Vertex_handle, Surface_patch_index> >
-          ::iterator it = vertex_to_proj.begin() ;
-        it != vertex_to_proj.end() ;
-        ++it )
-  {
-    Point_3 new_pos = project_on_surface((it->first)->point(),it->first,it->second);
-
-    if ( new_pos != Point_3() )
-    {
-      //freezing needs 'erase' to be done before the vertex is actually destroyed
-      // Update moving vertices (it becomes new_vertex)
-      moving_vertices.erase(it->first);
-
-      Vertex_handle new_vertex = update_mesh(new_pos,it->first);
-      c3t3_.set_dimension(new_vertex,2);
-
-      moving_vertices.insert(new_vertex);
-    }
-  }
-}
-
-
-template <typename C3T3, typename MD>
-template <typename OutdatedCellsOutputIterator,
-          typename DeletedCellsOutputIterator>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point(const Vertex_handle& old_vertex,
-           const Point_3& new_position,
-           OutdatedCellsOutputIterator outdated_cells,
-           DeletedCellsOutputIterator deleted_cells) const
-{
-  // std::cerr << "C3T3_helpers::move_point[v2]("
-  //           << (void*)(&*old_vertex) << " = " << old_vertex->point()
-  //           << " , " << new_position << ")\n";
-  Cell_vector incident_cells_;
-  incident_cells_.reserve(64);
-  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
-  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
-  {
-    reset_circumcenter_cache(incident_cells_);
-    reset_sliver_cache(incident_cells_);
-    std::copy(incident_cells_.begin(),incident_cells_.end(), outdated_cells);
-    return move_point_no_topo_change(old_vertex,
-                                     new_position);
-  }
-  else
-  {
-    return move_point_topo_change(old_vertex,
-                                  new_position,
-                                  outdated_cells,
-                                  deleted_cells);
-  }
-}
-
-// Sequential
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point(const Vertex_handle& old_vertex,
-           const Point_3& new_position,
-           Outdated_cell_set& outdated_cells_set,
-           Moving_vertices_set& moving_vertices) const
-{
-  Cell_vector incident_cells_;
-  incident_cells_.reserve(64);
-  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
-  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
-  {
-    reset_circumcenter_cache(incident_cells_);
-    reset_sliver_cache(incident_cells_);
-    std::copy(incident_cells_.begin(),incident_cells_.end(),
-      std::inserter(outdated_cells_set, outdated_cells_set.end()));
-    return move_point_no_topo_change(old_vertex, new_position);
-  }
-  else
-  {
-    moving_vertices.erase(old_vertex);
-
-    Vertex_handle new_vertex = move_point_topo_change(old_vertex, new_position, outdated_cells_set);
-
-    moving_vertices.insert(new_vertex);
-    return new_vertex;
-  }
-}
-
-// Parallel
-// In case of success (could_lock_zone = true), the zone is locked after the call
-// ==> the caller needs to call "unlock_all_elements" by itself
-// In case of failure (could_lock_zone = false), the zone is unlocked by this function
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point(const Vertex_handle& old_vertex,
-           const Point_3& new_position,
-           Outdated_cell_set& outdated_cells_set,
-           Moving_vertices_set& moving_vertices,
-           bool *could_lock_zone) const
-{
-  CGAL_assertion(could_lock_zone != NULL);
-  *could_lock_zone = true;
-
-  if (!try_lock_vertex(old_vertex)) // LOCK
-  {
-    *could_lock_zone = false;
-    unlock_all_elements();
-    return Vertex_handle();
-  }
-
-  //======= Get incident cells ==========
-  Cell_vector incident_cells_;
-  incident_cells_.reserve(64);
-  if (try_lock_and_get_incident_cells(old_vertex, incident_cells_) == false)
-  {
-    *could_lock_zone = false;
-    return Vertex_handle();
-  }
-  //======= /Get incident cells ==========
-
-  if (!try_lock_point(new_position)) // LOCK
-  {
-    *could_lock_zone = false;
-    unlock_all_elements();
-    return Vertex_handle();
-  }
-  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
-  {
-    reset_circumcenter_cache(incident_cells_);
-    reset_sliver_cache(incident_cells_);
-
-    lock_outdated_cells();
-    std::copy(incident_cells_.begin(),incident_cells_.end(),
-      std::inserter(outdated_cells_set, outdated_cells_set.end()));
-    unlock_outdated_cells();
-
-    Vertex_handle new_vertex =
-      move_point_no_topo_change(old_vertex, new_position);
-
-    // Don't "unlock_all_elements" here, the caller may need it to do it himself
-    return new_vertex;
-  }
-  else
-  {
-    //moving_vertices.erase(old_vertex); MOVED BELOW
-
-    Vertex_handle new_vertex =
-      move_point_topo_change(old_vertex, new_position, outdated_cells_set,
-                             could_lock_zone);
-
-    if (*could_lock_zone == false)
-    {
-      unlock_all_elements();
-      return Vertex_handle();
-    }
-
-
-    lock_moving_vertices();
-    moving_vertices.erase(old_vertex);
-    moving_vertices.insert(new_vertex);
-    unlock_moving_vertices();
-
-    // Don't "unlock_all_elements" here, the caller may need it to do it himself
-    return new_vertex;
-  }
-}
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_topo_change(const Vertex_handle& old_vertex,
-                       const Point_3& new_position,
-                       Outdated_cell_set& outdated_cells_set,
-                       bool *could_lock_zone) const
-{
-  Cell_set insertion_conflict_cells;
-  Cell_set removal_conflict_cells;
-  Facet_vector insertion_conflict_boundary;
-  insertion_conflict_boundary.reserve(64);
-
-  get_conflict_zone_topo_change(old_vertex, new_position,
-                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
-                                std::back_inserter(insertion_conflict_boundary),
-                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()),
-                                could_lock_zone);
-  reset_circumcenter_cache(removal_conflict_cells);
-  reset_sliver_cache(removal_conflict_cells);
-  reset_circumcenter_cache(insertion_conflict_cells);
-  reset_sliver_cache(insertion_conflict_cells);
-
-  if (could_lock_zone && *could_lock_zone == false)
-    return Vertex_handle();
-
-  lock_outdated_cells();
-  for(typename Cell_set::iterator it = insertion_conflict_cells.begin();
-      it != insertion_conflict_cells.end(); ++it)
-      outdated_cells_set.erase(*it);
-  for(typename Cell_set::iterator it = removal_conflict_cells.begin();
-      it != removal_conflict_cells.end(); ++it)
-      outdated_cells_set.erase(*it);
-  unlock_outdated_cells();
-
-  Cell_vector outdated_cells;
-  Vertex_handle nv = move_point_topo_change_conflict_zone_known(old_vertex, new_position,
-                                insertion_conflict_boundary[0],
-                                insertion_conflict_cells.begin(),
-                                insertion_conflict_cells.end(),
-                                removal_conflict_cells.begin(),
-                                removal_conflict_cells.end(),
-                                std::back_inserter(outdated_cells),
-                                CGAL::Emptyset_iterator()); // deleted_cells
-
-  lock_outdated_cells();
-  for(typename Cell_vector::iterator it = outdated_cells.begin();
-      it != outdated_cells.end(); ++it)
-      outdated_cells_set.insert(*it);
-  unlock_outdated_cells();
-
-  return nv;
-}
-
-template <typename C3T3, typename MD>
-template <typename OutdatedCellsOutputIterator,
-          typename DeletedCellsOutputIterator>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_topo_change(const Vertex_handle& old_vertex,
-                       const Point_3& new_position,
-                       OutdatedCellsOutputIterator outdated_cells,
-                       DeletedCellsOutputIterator deleted_cells) const
-{
-  Cell_set insertion_conflict_cells;
-  Cell_set removal_conflict_cells;
-  Facet_vector insertion_conflict_boundary;
-  insertion_conflict_boundary.reserve(64);
-
-  get_conflict_zone_topo_change(old_vertex, new_position,
-                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
-                                std::back_inserter(insertion_conflict_boundary),
-                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()));
-  reset_circumcenter_cache(removal_conflict_cells);
-  reset_sliver_cache(removal_conflict_cells);
-  reset_circumcenter_cache(insertion_conflict_cells);
-  reset_sliver_cache(insertion_conflict_cells);
-
-  Vertex_handle nv = move_point_topo_change_conflict_zone_known(old_vertex, new_position,
-                                insertion_conflict_boundary[0],
-                                insertion_conflict_cells.begin(),
-                                insertion_conflict_cells.end(),
-                                removal_conflict_cells.begin(),
-                                removal_conflict_cells.end(),
-                                outdated_cells,
-                                deleted_cells);
-
-  return nv;
-}
-
-
-template <typename C3T3, typename MD>
-template < typename ConflictCellsInputIterator,
-           typename OutdatedCellsOutputIterator,
-           typename DeletedCellsOutputIterator >
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_topo_change_conflict_zone_known(
-    const Vertex_handle& old_vertex,
-    const Point_3& new_position,
-    const Facet& insertion_boundary_facet,
-    ConflictCellsInputIterator insertion_conflict_cells_begin,//ordered
-    ConflictCellsInputIterator insertion_conflict_cells_end,
-    ConflictCellsInputIterator removal_conflict_cells_begin,//ordered
-    ConflictCellsInputIterator removal_conflict_cells_end,
-    OutdatedCellsOutputIterator outdated_cells,
-    DeletedCellsOutputIterator deleted_cells)//warning : this should not be an iterator to Intrusive_list
-                                             //o.w. deleted_cells will point to null pointer or so and crash
-                                             const
-{
-  Point_3 old_position = old_vertex->point();
-  // make one set with conflict zone
-  Cell_set conflict_zone;
-  std::set_union(insertion_conflict_cells_begin, insertion_conflict_cells_end,
-                 removal_conflict_cells_begin, removal_conflict_cells_end,
-                 std::inserter(conflict_zone, conflict_zone.end()));
-
-  // Remove conflict zone cells from c3t3 (they will be deleted by insert/remove)
-  remove_cells_and_facets_from_c3t3(conflict_zone.begin(), conflict_zone.end());
-
-// Start Move point // Insert new_vertex, remove old_vertex
-  int dimension = c3t3_.in_dimension(old_vertex);
-  Index vertex_index = c3t3_.index(old_vertex);
-  FT meshing_info = old_vertex->meshing_info();
-
-  // insert new point
-  Vertex_handle new_vertex = tr_.insert_in_hole(new_position,
-                                                insertion_conflict_cells_begin,
-                                                insertion_conflict_cells_end,
-                                                insertion_boundary_facet.first,
-                                                insertion_boundary_facet.second);
-
-  // If new_position is hidden, update what should be and return default constructed handle
-  if ( Vertex_handle() == new_vertex )
-  {
-    std::copy(conflict_zone.begin(), conflict_zone.end(), outdated_cells);
-    return old_vertex;
-  }
-  // remove old point
-  tr_.remove(old_vertex);
-
-  c3t3_.set_dimension(new_vertex,dimension);
-  c3t3_.set_index(new_vertex,vertex_index);
-  new_vertex->set_meshing_info(meshing_info);
-  // End Move point
-
-  //// Fill outdated_cells
-  // Get conflict zone in new triangulation and set cells outdated
-  Cell_vector new_conflict_cells;
-  new_conflict_cells.reserve(64);
-  get_conflict_zone_topo_change(new_vertex, old_position,
-                                std::back_inserter(new_conflict_cells));
-  std::copy(new_conflict_cells.begin(),new_conflict_cells.end(),outdated_cells);
-
-  // Fill deleted_cells
-  if(! boost::is_same<DeletedCellsOutputIterator,CGAL::Emptyset_iterator>::value)
-    std::copy(conflict_zone.begin(), conflict_zone.end(), deleted_cells);
-
-  return new_vertex;
-}
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_topo_change(const Vertex_handle& old_vertex,
-                       const Point_3& new_position) const
-{
-  // Insert new_vertex, remove old_vertex
-  int dimension = c3t3_.in_dimension(old_vertex);
-  Index vertex_index = c3t3_.index(old_vertex);
-  FT meshing_info = old_vertex->meshing_info();
-
-  // insert new point
-  Vertex_handle new_vertex = tr_.insert(new_position,old_vertex->cell());
-  // If new_position is hidden, return default constructed handle
-  if ( Vertex_handle() == new_vertex ) { return Vertex_handle(); }
-  // remove old point
-  tr_.remove(old_vertex);
-
-  c3t3_.set_dimension(new_vertex,dimension);
-  c3t3_.set_index(new_vertex,vertex_index);
-  new_vertex->set_meshing_info(meshing_info);
-
-  return new_vertex;
-}
-
-
-template <typename C3T3, typename MD>
-template <typename OutdatedCellsOutputIterator>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_no_topo_change(const Vertex_handle& old_vertex,
-                          const Point_3& new_position,
-                          OutdatedCellsOutputIterator outdated_cells) const
-{
-
-  lock_outdated_cells();
-  get_conflict_zone_no_topo_change(old_vertex, outdated_cells);
-  unlock_outdated_cells();
-
-  return move_point_no_topo_change(old_vertex, new_position);
-}
-
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Vertex_handle
-C3T3_helpers<C3T3,MD>::
-move_point_no_topo_change(const Vertex_handle& old_vertex,
-                          const Point_3& new_position) const
-{
-  // Change vertex position
-  old_vertex->set_point(new_position);
-  return old_vertex;
-}
-
-
-/**
- * @brief Returns the projection of \c p, using direction of
- * \c projection_vector
- */
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Point_3
-C3T3_helpers<C3T3,MD>::
-project_on_surface_aux(const Point_3& p,
-                       const Point_3& ref_point,
-                       const Vector_3& projection_vector) const
-{
-  typedef typename Gt::Segment_3 Segment_3;
-
-  // Build a segment directed as projection_direction,
-  typename Gt::Compute_squared_distance_3 sq_distance =
-    Gt().compute_squared_distance_3_object();
-
-  typename Gt::Compute_squared_length_3 sq_length =
-    Gt().compute_squared_length_3_object();
-
-  typename Gt::Construct_scaled_vector_3 scale =
-    Gt().construct_scaled_vector_3_object();
-
-  typename Gt::Is_degenerate_3 is_degenerate =
-    Gt().is_degenerate_3_object();
-
-  typename MD::Construct_intersection construct_intersection =
-    domain_.construct_intersection_object();
-
-  const FT sq_dist = sq_distance(p,ref_point);
-  const FT sq_proj_length = sq_length(projection_vector);
-
-  if ( CGAL_NTS is_zero(sq_proj_length) )
-    return ref_point;
-
-  const Vector_3 projection_scaled_vector =
-    scale(projection_vector, CGAL::sqrt(sq_dist/sq_proj_length));
-
-  const Point_3 source = p + projection_scaled_vector;
-  const Point_3 target = p - projection_scaled_vector;
-
-  const Segment_3 proj_segment(source,target);
-
-  if ( is_degenerate(proj_segment) )
-    return ref_point;
-
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-  typename MD::Do_intersect_surface do_intersect =
-    domain_.do_intersect_surface_object();
-
-  if ( do_intersect(proj_segment) )
-    return CGAL::cpp0x::get<0>(construct_intersection(proj_segment));
-  else
-    return ref_point;
-
-#else // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-  typedef typename MD::Intersection Intersection;
-  Intersection intersection = construct_intersection(proj_segment);
-  if(CGAL::cpp0x::get<2>(intersection) == 2)
-    return CGAL::cpp0x::get<0>(intersection);
-  else
-    return ref_point;
-
-#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-}
-
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Plane_3
-C3T3_helpers<C3T3,MD>::
-get_least_square_surface_plane(const Vertex_handle& v,
-                               Point_3& reference_point,
-                               Surface_patch_index patch_index) const
-{
-  // Get incident facets
-  Facet_vector facets;
-# ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tr_.finite_incident_facets_threadsafe(v, std::back_inserter(facets));
-  }
-  // Sequential
-  else
-# endif // CGAL_LINKED_WITH_TBB
-  {
-    tr_.finite_incident_facets(v,std::back_inserter(facets));
-  }
-
-  // Get adjacent surface points
-  std::vector<Point_3> surface_point_vector;
-  for ( typename Facet_vector::iterator fit = facets.begin() ;
-       fit != facets.end() ;
-       ++fit )
-  {
-    if ( c3t3_.is_in_complex(*fit) &&
-         (patch_index == Surface_patch_index() ||
-          c3t3_.surface_patch_index(*fit) == patch_index) )
-    {
-      const Cell_handle& cell = fit->first;
-      const int& i = fit->second;
-
-      surface_point_vector.push_back(cell->get_facet_surface_center(i));
-    }
-  }
-
-  // In some cases point is not a real surface point
-  if ( surface_point_vector.empty() )
-    return Plane_3();
-
-  // Compute least square fitting plane
-  Plane_3 plane;
-  CGAL::linear_least_squares_fitting_3(surface_point_vector.begin(),
-                                       surface_point_vector.end(),
-                                       plane,
-                                       Dimension_tag<0>());
-
-  reference_point = surface_point_vector.front();
-
-  return plane;
-}
-
-
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Point_3
-C3T3_helpers<C3T3,MD>::
-project_on_surface(const Point_3& p,
-                   const Vertex_handle& v,
-                   Surface_patch_index index) const
-{
-  // return domain_.project_on_surface(p);
-  // Get plane
-  Point_3 reference_point(CGAL::ORIGIN);
-  Plane_3 plane = get_least_square_surface_plane(v,reference_point, index);
-
-  if ( reference_point == CGAL::ORIGIN )
-    return p;
-
-  // Project
-  if ( p != v->point() )
-    return project_on_surface_aux(p,
-                                  v->point(),
-                                  plane.orthogonal_vector());
-  else
-    return project_on_surface_aux(p,
-                                  reference_point,
-                                  plane.orthogonal_vector());
-}
-
-
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-typename C3T3_helpers<C3T3,MD>::FT
-C3T3_helpers<C3T3,MD>::
-min_incident_value(const Vertex_handle& vh,
-                   const SliverCriterion& criterion) const
-{
-  Cell_vector incident_cells_;
-  tr_.finite_incident_cells(vh,std::back_inserter(incident_cells_));
-
-  return min_sliver_in_c3t3_value(incident_cells_, criterion);
-}
-
-template <typename OutputIterator, typename CH, typename Fct>
-struct Filter {
-
-  mutable OutputIterator out;
-  const Fct& fct;
-
-  Filter(OutputIterator out, const Fct& fct)
-    : out(out), fct(fct)
-  {}
-
-  void operator()(CH cell_handle) const
-  {
-    if(fct(cell_handle)){
-      *out++ = cell_handle;
-    }
-  }
-
-};
-
-template <typename CH, typename Fct>
-struct Counter {
-
-  const Fct& fct;
-  std::size_t& count;
-
-  Counter(const Fct& fct, std::size_t& count)
-    : fct(fct), count(count)
-  {}
-
-  void operator()(CH cell_handle)
-  {
-    if(fct(cell_handle)){
-      ++count;
-    }
-  }
-
-};
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-void
-C3T3_helpers<C3T3,MD>::
-get_incident_slivers_without_using_tds_data(const Vertex_handle& v,
-                                            const SliverCriterion& criterion,
-                                            const FT& sliver_bound,
-                                            Cell_vector &slivers) const
-{
-  typedef SliverCriterion Sc;
-  typedef std::back_insert_iterator<Cell_vector> OutputIt;
-  typedef Filter<OutputIt, Cell_handle, Is_sliver<Sc> > F;
-  OutputIt slivers_it = std::back_inserter(slivers);
-  Is_sliver<Sc> i_s(c3t3_, criterion, sliver_bound);
-  F f(slivers_it, i_s);
-  tr_.incident_cells_threadsafe(v, boost::make_function_output_iterator(f));
-}
-
-// CJTODO: call tr_.try_lock_and_get_incident_cells instead?
-template <typename C3T3, typename MD>
-bool
-C3T3_helpers<C3T3,MD>::
-try_lock_and_get_incident_cells(const Vertex_handle& v,
-                                Cell_vector &cells) const
-  {
-    // We need to lock v individually first, to be sure v->cell() is valid
-    if (!try_lock_vertex(v))
-      return false;
-
-    Cell_handle d = v->cell();
-    if (!try_lock_element(d)) // LOCK
-    {
-      unlock_all_elements();
-      return false;
-    }
-    cells.push_back(d);
-    d->tds_data().mark_in_conflict();
-    int head=0;
-    int tail=1;
-    do {
-      Cell_handle c = cells[head];
-
-      for (int i=0; i<4; ++i) {
-        if (c->vertex(i) == v)
-          continue;
-        Cell_handle next = c->neighbor(i);
-
-        if (!try_lock_element(next)) // LOCK
-        {
-          BOOST_FOREACH(Cell_handle& ch,
-            std::make_pair(cells.begin(), cells.end()))
-          {
-            ch->tds_data().clear();
-          }
-          cells.clear();
-          unlock_all_elements();
-          return false;
-        }
-        if (! next->tds_data().is_clear())
-          continue;
-        cells.push_back(next);
-        ++tail;
-        next->tds_data().mark_in_conflict();
-      }
-      ++head;
-    } while(head != tail);
-    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
-    {
-      ch->tds_data().clear();
-    }
-    return true;
-  }
-
-template <typename C3T3, typename MD>
-template <typename Filter>
-bool
-C3T3_helpers<C3T3,MD>::
-try_lock_and_get_incident_cells(const Vertex_handle& v,
-                                Cell_vector &cells,
-                                const Filter &filter) const
-{
-  std::vector<Cell_handle> tmp_cells;
-  tmp_cells.reserve(64);
-  bool ret = try_lock_and_get_incident_cells(v, tmp_cells);
-  if (ret)
-  {
-    BOOST_FOREACH(Cell_handle& ch,
-                  std::make_pair(tmp_cells.begin(), tmp_cells.end()))
-    {
-      if (filter(ch))
-        cells.push_back(ch);
-    }
-  }
-  return ret;
-}
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-bool
-C3T3_helpers<C3T3,MD>::
-try_lock_and_get_incident_slivers(const Vertex_handle& v,
-                                  const SliverCriterion& criterion,
-                                  const FT& sliver_bound,
-                                  Cell_vector &slivers) const
-{
-  Is_sliver<SliverCriterion> i_s(c3t3_, criterion, sliver_bound);
-  return try_lock_and_get_incident_cells(v, slivers, i_s);
-}
-
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion, typename OutputIterator>
-OutputIterator
-C3T3_helpers<C3T3,MD>::
-incident_slivers(const Vertex_handle& v,
-                 const SliverCriterion& criterion,
-                 const FT& sliver_bound,
-                 OutputIterator out) const
-{
-  typedef SliverCriterion Sc;
-
-  std::vector<Cell_handle> incident_cells_;
-  tr_.incident_cells(v, std::back_inserter(incident_cells_));
-
-  std::remove_copy_if(incident_cells_.begin(),
-                      incident_cells_.end(),
-                      out,
-                      std::not1(Is_sliver<Sc>(c3t3_,criterion,sliver_bound)));
-
-  return out;
-}
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion, typename OutputIterator>
-OutputIterator
-C3T3_helpers<C3T3,MD>::
-new_incident_slivers(const Vertex_handle& v,
-                     const SliverCriterion& criterion,
-                     const FT& sliver_bound,
-                     OutputIterator out) const
-{
-  typedef SliverCriterion Sc;
-  typedef Filter<OutputIterator,Cell_handle,Is_sliver<Sc> > F;
-
-  Is_sliver<Sc> i_s(c3t3_, criterion, sliver_bound);
-  F f(out, i_s);
-  tr_.incident_cells(v,boost::make_function_output_iterator(f));
-
-  return f.out;
-}
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-bool
-C3T3_helpers<C3T3,MD>::
-is_sliver(const Cell_handle& ch,
-          const SliverCriterion& criterion,
-          const FT& sliver_bound) const
-{
-  Is_sliver<SliverCriterion> iss(c3t3_,criterion,sliver_bound);
-  return iss(ch);
-}
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-std::size_t
-C3T3_helpers<C3T3,MD>::
-number_of_incident_slivers(const Vertex_handle& v,
-                           const SliverCriterion& criterion,
-                           const FT& sliver_bound) const
-{
-  typedef SliverCriterion Sc;
-  typedef Counter<Cell_handle,Is_sliver<Sc> > C;
-
-  std::size_t count = 0;
-  Is_sliver<Sc> is_sliver(c3t3_,criterion,sliver_bound);
-  C c(is_sliver, count);
-  tr_.incident_cells(v, boost::make_function_output_iterator(c));
-
-  return count;
-}
-
-
-template <typename C3T3, typename MD>
-template <typename SliverCriterion>
-typename C3T3_helpers<C3T3,MD>::FT
-C3T3_helpers<C3T3,MD>::
-min_sliver_value(const Cell_vector& cells,
-                 const SliverCriterion& criterion,
-                 const bool use_cache) const
-{
-  using boost::make_transform_iterator;
-
-  if ( cells.empty() )
-    return criterion.get_max_value();
-
-  if ( ! use_cache )
-  {
-    reset_sliver_cache(cells.begin(),cells.end());
-  }
-
-  // Return min dihedral angle
-  //Sliver_criterion_value<SliverCriterion> sc_value(tr_,criterion);
-  //
-  //return *(std::min_element(make_transform_iterator(cells.begin(),sc_value),
-  //                          make_transform_iterator(cells.end(),sc_value)));
-  FT min_value = criterion.get_max_value();
-  for(typename Cell_vector::const_iterator it = cells.begin();
-      it != cells.end();
-      ++it)
-  {
-    min_value = (std::min)(criterion(*it), min_value);
-  }
-  return min_value;
-}
-
-
-template <typename C3T3, typename MD>
-template <typename InputIterator, typename OutputIterator>
-void
-C3T3_helpers<C3T3,MD>::
-fill_modified_vertices(InputIterator cells_begin,
-                       InputIterator cells_end,
-                       const Vertex_handle& vertex,
-                       OutputIterator out) const
-{
-  std::set<Vertex_handle> already_inserted_vertices;
-  // Dont insert vertex in out
-  already_inserted_vertices.insert(vertex);
-
-  for ( InputIterator it = cells_begin ; it != cells_end ; ++it )
-  {
-    for ( int i=0 ; i<4 ; ++i )
-    {
-      // Insert vertices if not already inserted
-      const Vertex_handle& current_vertex = (*it)->vertex(i);
-      if ( !tr_.is_infinite(current_vertex)
-          && already_inserted_vertices.insert(current_vertex).second )
-      {
-        *out++ = current_vertex;
-      }
-    }
-  }
-}
-
-
-template <typename C3T3, typename MD>
-template <typename CellsVector, typename CellDataSet>
-void
-C3T3_helpers<C3T3,MD>::
-fill_cells_backup(const CellsVector& cells,
-                  CellDataSet& cells_backup) const
-{
-  typedef typename CellDataSet::value_type Cell_data;
-  typename CellsVector::const_iterator cit;
-  for(cit = cells.begin(); cit != cells.end(); ++cit)
-  {
-    cells_backup.insert(Cell_data(c3t3_,*cit));
-  }
-}
-
-template <typename C3T3, typename MD>
-template <typename CellsVector, typename CellDataSet>
-void
-C3T3_helpers<C3T3,MD>::
-restore_from_cells_backup(const CellsVector& cells,
-                          CellDataSet& cells_backup) const
-{
-  for(typename CellsVector::const_iterator cit = cells.begin();
-      cit != cells.end();
-      ++cit)
-  {
-    typename CellDataSet::const_iterator cd_it
-      = cells_backup.find(Cell_data_backup(c3t3_, *cit, false/*don't backup*/));
-    if(cd_it != cells_backup.end())
-    {
-      typename CellDataSet::value_type cell_data = *cd_it;
-      cell_data.restore(*cit, c3t3_);
-      cells_backup.erase(cd_it);
-    }
-    else CGAL_error();
-  }
-  CGAL_assertion(cells_backup.empty());
-}
-
-template <typename C3T3, typename MD>
-template <typename OutputIterator>
-OutputIterator
-C3T3_helpers<C3T3,MD>::
-get_conflict_zone_no_topo_change(const Vertex_handle& vertex,
-                                 OutputIterator conflict_cells) const
-{
-  return tr_.incident_cells(vertex,conflict_cells);
-}
-
-template <typename C3T3, typename MD>
-template <typename CellsOutputIterator,
-          typename FacetsOutputIterator>
-void
-C3T3_helpers<C3T3,MD>::
-get_conflict_zone_topo_change(const Vertex_handle& v,
-                              const Point_3& conflict_point,
-                              CellsOutputIterator insertion_conflict_cells,
-                              FacetsOutputIterator insertion_conflict_boundary,
-                              CellsOutputIterator removal_conflict_cells,
-                              bool *could_lock_zone) const
-{
-  // Get triangulation_vertex incident cells : removal conflict zone
-  // TODO: hasn't it already been computed in "perturb_vertex" (when getting the slivers)?
-  // We don't try to lock the incident cells since they've already been locked
-  tr_.incident_cells(v, removal_conflict_cells);
-
-  // Get conflict_point conflict zone
-  int li=0;
-  int lj=0;
-  typename Tr::Locate_type lt;
-  Cell_handle cell = tr_.locate(
-    conflict_point, lt, li, lj, v->cell(), could_lock_zone);
-
-  if (could_lock_zone && *could_lock_zone == false)
-    return;
-
-  if ( lt == Tr::VERTEX ) // Vertex removal is forbidden
-    return;
-
-  // Find conflict zone
-  tr_.find_conflicts(conflict_point,
-                     cell,
-                     insertion_conflict_boundary,
-                     insertion_conflict_cells,
-                     could_lock_zone);
-}
-
-template <typename C3T3, typename MD>
-template <typename OutputIterator>
-OutputIterator
-C3T3_helpers<C3T3,MD>::
-get_conflict_zone_topo_change(const Vertex_handle& vertex,
-                              const Point_3& conflict_point,
-                              OutputIterator conflict_cells) const
-{
-  // Get triangulation_vertex incident cells
-  Cell_vector incident_cells_;
-  incident_cells_.reserve(64);
-  tr_.incident_cells(vertex, std::back_inserter(incident_cells_));
-
-  // Get conflict_point conflict zone
-  Cell_vector deleted_cells;
-  deleted_cells.reserve(64);
-
-  // Vertex removal is forbidden
-  int li=0;
-  int lj=0;
-  typename Tr::Locate_type locate_type;
-  Cell_handle cell = tr_.locate(conflict_point,
-                                locate_type,
-                                li,
-                                lj,
-                                vertex->cell());
-
-  if ( Tr::VERTEX == locate_type )
-    return conflict_cells;
-
-  // Find conflict zone
-  tr_.find_conflicts(conflict_point,
-                     cell,
-                     CGAL::Emptyset_iterator(),
-                     std::back_inserter(deleted_cells),
-                     CGAL::Emptyset_iterator());
-
-  // Compute union of conflict_point conflict zone and triangulation_vertex
-  // incident cells
-  std::sort(deleted_cells.begin(),deleted_cells.end());
-  std::sort(incident_cells_.begin(),incident_cells_.end());
-
-  std::set_union(deleted_cells.begin(), deleted_cells.end(),
-                 incident_cells_.begin(), incident_cells_.end(),
-                 conflict_cells);
-
-  return conflict_cells;
-}
-
-
-template <typename C3T3, typename MD>
-typename C3T3_helpers<C3T3,MD>::Facet_boundary
-C3T3_helpers<C3T3,MD>::
-get_surface_boundary(const Vertex_handle& moving_vertex,
-                     const Facet_vector& facets,
-                     Vertex_set& incident_surface_vertices) const
-{
-  Facet_boundary boundary;
-  typename Facet_vector::const_iterator fit = facets.begin();
-  for ( ; fit != facets.end() ; ++fit )
-  {
-    if ( c3t3_.is_in_complex(*fit) )
-    {
-      const Surface_patch_index surface_index = c3t3_.surface_patch_index(*fit);
-      const int k = fit->second;
-      Vertex_handle v1 = fit->first->vertex((k+1)&3);
-      Vertex_handle v2 = fit->first->vertex((k+2)&3);
-      Vertex_handle v3 = fit->first->vertex((k+3)&3);
-      incident_surface_vertices.insert(v1);
-      incident_surface_vertices.insert(v2);
-      incident_surface_vertices.insert(v3);
-
-      // Check that each vertex is a surface one
-      // This is a trick to ensure that in_domain vertices stay inside
-      if ( c3t3_.in_dimension(v1) > 2
-          || c3t3_.in_dimension(v2) > 2
-          || c3t3_.in_dimension(v3) > 2 )
-      {
-        boundary.clear();
-        return boundary; // return an empty boundary, that cannot be equal
-                         // to a real boundary
-      }
-
-      order_handles(v1,v2,v3);
-
-      CGAL_assertion(v1<v2);
-      CGAL_assertion(v2<v3);
-
-      update_boundary(boundary, Ordered_edge(v1,v2), v3, surface_index);
-      update_boundary(boundary, Ordered_edge(v1,v3), v2, surface_index);
-      update_boundary(boundary, Ordered_edge(v2,v3), v1, surface_index);
-    }
-
-    incident_surface_vertices.erase(moving_vertex);
-  }
-
-  // std::cerr.precision(17);
-  // std::cerr << "boundary { ";
-  // BOOST_FOREACH(const typename Facet_boundary::value_type& v,
-  //               boundary)
-  // {
-  //   std::cerr << "(" << v.first.first->point() << ", " << v.first.second->point() << ", " << v.second.first << ") ";
-  // }
-  // std::cerr << "}\n";
-  return boundary;
-}
-
-template <typename C3T3, typename MD>
-bool
-C3T3_helpers<C3T3,MD>::
-check_no_inside_vertices(const Facet_vector& facets) const
-{
-  typename Facet_vector::const_iterator fit = facets.begin();
-  for ( ; fit != facets.end() ; ++fit )
-  {
-    if ( c3t3_.is_in_complex(*fit) )
-    {
-      const int k = fit->second;
-      const Vertex_handle& v1 = fit->first->vertex((k+1)&3);
-      const Vertex_handle& v2 = fit->first->vertex((k+2)&3);
-      const Vertex_handle& v3 = fit->first->vertex((k+3)&3);
-
-      // Check that each vertex is a surface one
-      if ( c3t3_.in_dimension(v1) > 2
-          || c3t3_.in_dimension(v2) > 2
-          || c3t3_.in_dimension(v3) > 2 )
-      {
-        return false;
-      }
-    }
-  }
-
-  return true;
-}
-
-} // end namespace Mesh_3
-} // end namespace CGAL
-
-#endif // CGAL_MESH_3_C3T3_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Dump_c3t3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Dump_c3t3.h
deleted file mode 100644
index 00ab4c4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Dump_c3t3.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2012  GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_MESH_3_DUMP_C3T3_H
-#define CGAL_MESH_3_DUMP_C3T3_H
-
-#include <string>
-#include <CGAL/Mesh_3/io_signature.h>
-#include <CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h>
-#include <CGAL/is_streamable.h>
-#include <fstream>
-
-namespace CGAL {
-
-template <typename C3t3, 
-          bool is_streamable = 
-            is_streamable<typename C3t3::Triangulation::Vertex>::value &&
-            is_streamable<typename C3t3::Triangulation::Cell>::value &&
-            is_streamable<typename C3t3::Surface_patch_index>::value &&
-            is_streamable<typename C3t3::Subdomain_index>::value 
-          >
-struct Dump_c3t3 {
-  void dump_c3t3(const C3t3& c3t3, std::string prefix) const {
-    std::clog<<"======dump c3t3===== to: " << prefix << std::endl;
-    std::ofstream medit_file((prefix+".mesh").c_str());
-    medit_file.precision(17);
-    CGAL::output_to_medit(medit_file, c3t3, false, true);
-    medit_file.close();
-
-    std::string bin_filename = prefix;
-    bin_filename += ".binary.cgal";
-    std::ofstream bin_file(bin_filename.c_str(),
-                           std::ios_base::binary | std::ios_base::out);
-    bin_file << "binary CGAL c3t3 " << CGAL::Get_io_signature<C3t3>()() << "\n";
-    CGAL::set_binary_mode(bin_file);
-    bin_file << c3t3;
-  }
-}; // end struct template Dump_c3t3<C3t3, bool>
-
-template <typename C3t3>
-struct Dump_c3t3<C3t3, false> {
-  void dump_c3t3(const C3t3&, std::string) {
-    std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n"
-              << "  the c3t3 object cannot be dumped because some types are"
-              << " not streamable:\n";
-    if(!is_streamable<typename C3t3::Triangulation::Vertex>::value)
-      std::cerr << "     - C3t3::Triangulation::Vertex is not streamble\n";
-
-    if(!is_streamable<typename C3t3::Triangulation::Cell>::value)
-      std::cerr << "     - C3t3::Triangulation::Cell is not streamble\n";
-
-    if(!is_streamable<typename C3t3::Surface_patch_index>::value)
-      std::cerr << "     - C3t3::Surface_patch_index is not streamable\n";
-      
-    if(!is_streamable<typename C3t3::Subdomain_index>::value)
-      std::cerr << "     - C3t3::Subdomain_index is not streamable\n";      
-  }
-}; // end struct template specialization Dump_c3t3<C3t3, false>
-
-template <typename C3t3>
-void dump_c3t3(const C3t3& c3t3, std::string prefix) {
-  if(!prefix.empty()) {
-    Dump_c3t3<C3t3> dump;
-    dump.dump_c3t3(c3t3, prefix);
-  }
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_MESH_3_DUMP_C3T3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h
deleted file mode 100644
index c200376..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-// Image_to_labeled_function_wrapper declaration and implementation. See
-// class description.
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
-#define CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
-
-
-
-#include <CGAL/Image_3.h>
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-/**
- * @class Image_to_labeled_function_wrapper
- *
- * Wraps a labeled image into a labeled function which takes his values into
- * N. Uses trilinear interpolation.
- * Note: Image has to be labeled with unsigned char
- */
-template<class Image_,
-         class BGT,
-         typename Image_word_type = unsigned char,
-         typename Return_type = int,
-         bool use_trilinear_interpolation=true>
-class Image_to_labeled_function_wrapper
-{
-public:
-  // Types
-  typedef Return_type return_type;
-  typedef Image_word_type word_type;
-  typedef typename BGT::Point_3   Point_3;
-
-  /// Constructor
-  Image_to_labeled_function_wrapper(const Image_& image)
-    : r_im_(image) {}
-
-  // Default copy constructor and assignment operator are ok
-
-  /// Destructor
-  ~Image_to_labeled_function_wrapper() {}
-
-  /**
-   * Returns an int corresponding to the label at point \c p
-   * @param p the input point
-   * @return the label at point \c p
-   */
-  return_type operator()(const Point_3& p, const bool = true) const
-  {
-    if ( use_trilinear_interpolation )
-    {
-      return static_cast<return_type>(
-          r_im_.labellized_trilinear_interpolation(
-              CGAL::to_double(p.x()),
-              CGAL::to_double(p.y()),
-              CGAL::to_double(p.z()),
-              word_type(0)));
-    }
-    else
-    {
-      const std::ptrdiff_t px = static_cast<std::ptrdiff_t>(p.x()/r_im_.vx());
-      const std::ptrdiff_t py = static_cast<std::ptrdiff_t>(p.y()/r_im_.vy());
-      const std::ptrdiff_t pz = static_cast<std::ptrdiff_t>(p.z()/r_im_.vz());
-
-      const std::ptrdiff_t dimx = static_cast<std::ptrdiff_t>(r_im_.xdim());
-      const std::ptrdiff_t dimy = static_cast<std::ptrdiff_t>(r_im_.ydim());
-      const std::ptrdiff_t dimz = static_cast<std::ptrdiff_t>(r_im_.zdim());
-
-      if(px < 0 ||
-         py < 0 ||
-         pz < 0 ||
-         px+1 >= dimx ||
-         py+1 >= dimy ||
-         pz+1 >= dimz)
-      {
-        return 0;
-      }
-
-      const word_type* data = static_cast<const word_type*>(r_im_.data());
-      return data[ pz*dimy*dimx + py*dimx + px ];
-    }
-  }
-
-private:
-  /// Labeled image to wrap
-  const Image_& r_im_;
-
-};  // end class Image_to_labeled_function_wrapper
-
-
-}  // end namespace Mesh_3
-
-}  // end namespace CGAL
-
-#endif // CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h
deleted file mode 100644
index 39713d9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-// class Labeled_mesh_domain_3. See class description.
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_LABELED_MESH_DOMAIN_3_H
-#define CGAL_MESH_3_LABELED_MESH_DOMAIN_3_H
-
-#define CGAL_DEPRECATED_HEADER "<CGAL/Mesh_3/Labeled_mesh_domain_3.h>"
-#define CGAL_REPLACEMENT_HEADER "<CGAL/Labeled_mesh_domain_3.h>"
-#include <CGAL/internal/deprecation_warning.h>
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Bbox_3.h>
-
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
-
-#include <boost/variant.hpp>
-#include <boost/format.hpp>
-#include <boost/optional.hpp>
-#include <CGAL/tuple.h>
-#include <CGAL/Origin.h>
-#include <CGAL/Random.h>
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-/**
- * \class Labeled_mesh_domain_3
- *
- * Function f must take his values into N.
- * Let p be a Point.
- *  - f(p)=0 means that p is outside domain.
- *  - f(p)=a, a!=0 means that p is inside subdomain a.
- *
- *  Any boundary facet is labelled <a,b>, a<b, where a and b are the
- *  tags of it's incident subdomain.
- *  Thus, a boundary facet of the domain is labelled <0,b>, where b!=0.
- */
-template<class Function,
-         class BGT>
-class Labeled_mesh_domain_3
-{
-public:
-  /// Geometric object types
-  typedef typename BGT::Point_3    Point_3;
-  typedef typename BGT::Segment_3  Segment_3;
-  typedef typename BGT::Ray_3      Ray_3;
-  typedef typename BGT::Line_3     Line_3;
-  typedef typename BGT::Vector_3   Vector_3;
-  typedef typename BGT::Sphere_3   Sphere_3;
-  typedef CGAL::Bbox_3             Bbox_3;
-
-  typedef typename BGT::Iso_cuboid_3 Iso_cuboid_3;
-
-public:
-  // Kernel_traits compatibility
-  typedef BGT R;
-
-  //-------------------------------------------------------
-  // Index Types
-  //-------------------------------------------------------
-  /// Type of indexes for cells of the input complex
-  typedef typename Function::return_type Subdomain_index;
-  typedef boost::optional<Subdomain_index> Subdomain;
-  /// Type of indexes for surface patch of the input complex
-  typedef std::pair<Subdomain_index, Subdomain_index> Surface_patch_index;
-  typedef boost::optional<Surface_patch_index> Surface_patch;
-  /// Type of indexes to characterize the lowest dimensional face of the input
-  /// complex on which a vertex lie
-  typedef boost::variant<Subdomain_index, Surface_patch_index> Index;
-  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
-
-
-  typedef typename BGT::FT FT;
-  typedef BGT Geom_traits;
-
-  /**
-   * @brief Constructor
-   */
-  Labeled_mesh_domain_3(const Function& f,
-                         const Sphere_3& bounding_sphere,
-                         const FT& error_bound = FT(1e-3),
-                         CGAL::Random* p_rng = NULL);
-
-  Labeled_mesh_domain_3(const Function& f,
-                         const Bbox_3& bbox,
-                         const FT& error_bound = FT(1e-3),
-                         CGAL::Random* p_rng = NULL);
-
-  /// Destructor
-  virtual ~Labeled_mesh_domain_3()
-  {
-    if(delete_rng_)
-      delete p_rng_;
-  }
-
-  /**
-   * Constructs  a set of \ccc{n} points on the surface, and output them to
-   *  the output iterator \ccc{pts} whose value type is required to be
-   *  \ccc{std::pair<Points_3, Index>}.
-   */
-  struct Construct_initial_points
-  {
-    Construct_initial_points(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    template<class OutputIterator>
-    OutputIterator operator()(OutputIterator pts, const int n = 12) const;
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Construct_initial_points object
-  Construct_initial_points construct_initial_points_object() const
-  {
-    return Construct_initial_points(*this);
-  }
-
-  /**
-   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
-   *  domain, the parameter index is set to the index of the subdomain
-   *  including $p$. It is set to the default value otherwise.
-   */
-  struct Is_in_domain
-  {
-    Is_in_domain(const Labeled_mesh_domain_3& domain) : r_domain_(domain) {}
-
-    Subdomain operator()(const Point_3& p) const
-    {
-      // f(p)==0 means p is outside the domain
-      Subdomain_index index = (r_domain_.function_)(p);
-      if ( Subdomain_index() == index )
-        return Subdomain();
-      else
-        return Subdomain(index);
-    }
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Is_in_domain object
-  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
-
-  /**
-   * Returns true is the element \ccc{type} intersect properly any of the
-   * surface patches describing the either the domain boundary or some
-   * subdomain boundary.
-   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * Parameter index is set to the index of the intersected surface patch
-   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
-   * value otherwise.
-   */
-  struct Do_intersect_surface
-  {
-    Do_intersect_surface(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    Surface_patch operator()(const Segment_3& s) const
-    {
-      return this->operator()(s.source(), s.target());
-    }
-
-    Surface_patch operator()(const Ray_3& r) const
-    {
-      return clip_to_segment(r);
-    }
-
-    Surface_patch operator()(const Line_3& l) const
-    {
-      return clip_to_segment(l);
-    }
-
-  private:
-    /// Returns true if points \c a & \c b do not belong to the same subdomain
-    /// \c index is set to the surface index of subdomains f(a), f(b)
-    Surface_patch operator()(const Point_3& a, const Point_3& b) const
-    {
-      // If f(a) != f(b), then [a,b] intersects some surface. Here we consider
-      // [a,b] intersects surface_patch labelled <f(a),f(b)> (or <f(b),f(a)>).
-      // It may be false, further rafinement will improve precision
-      const Subdomain_index value_a = r_domain_.function_(a);
-      const Subdomain_index value_b = r_domain_.function_(b);
-
-      if ( value_a != value_b )
-        return Surface_patch(r_domain_.make_surface_index(value_a, value_b));
-      else
-        return Surface_patch();
-    }
-
-    /**
-     * Clips \c query to a segment \c s, and call operator()(s)
-     */
-    template<typename Query>
-    Surface_patch clip_to_segment(const Query& query) const
-    {
-      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
-        clipped = CGAL::intersection(query, r_domain_.bbox_);
-
-      if(clipped)
-#if CGAL_INTERSECTION_VERSION > 1
-        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
-          return this->operator()(*s);
-#else
-        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
-          return this->operator()(*s);
-#endif
-        
-      return Surface_patch();
-    }
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Do_intersect_surface object
-  Do_intersect_surface do_intersect_surface_object() const
-  {
-    return Do_intersect_surface(*this);
-  }
-
-  /**
-   * Returns a point in the intersection of the primitive \ccc{type}
-   * with some boundary surface.
-   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * The integer \ccc{dimension} is set to the dimension of the lowest
-   * dimensional face in the input complex containing the returned point, and
-   * \ccc{index} is set to the index to be stored at a mesh vertex lying
-   * on this face.
-   */
-  struct Construct_intersection
-  {
-    Construct_intersection(const Labeled_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    Intersection operator()(const Segment_3& s) const
-    {
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      CGAL_precondition(r_domain_.do_intersect_surface_object()(s));
-#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      return this->operator()(s.source(),s.target());
-    }
-
-    Intersection operator()(const Ray_3& r) const
-    {
-      return clip_to_segment(r);
-    }
-
-    Intersection operator()(const Line_3& l) const
-    {
-      return clip_to_segment(l);
-    }
-
-  private:
-    /**
-     * Returns a point in the intersection of [a,b] with the surface
-     * \c a must be the source point, and \c b the out point. It's important
-     * because it drives bisection cuts.
-     * Indeed, the returned point is the first intersection from \c [a,b]
-     * with a subdomain surface.
-     */
-    Intersection operator()(const Point_3& a, const Point_3& b) const
-    {
-      // Functors
-      typename BGT::Compute_squared_distance_3 squared_distance =
-                                      BGT().compute_squared_distance_3_object();
-      typename BGT::Construct_midpoint_3 midpoint =
-                                      BGT().construct_midpoint_3_object();
-
-      // Non const points
-      Point_3 p1 = a;
-      Point_3 p2 = b;
-      Point_3 mid = midpoint(p1, p2);
-
-      // Cannot be const: those values are modified below.
-      Subdomain_index value_at_p1 = r_domain_.function_(p1);
-      Subdomain_index value_at_p2 = r_domain_.function_(p2);
-      Subdomain_index value_at_mid = r_domain_.function_(mid,true);
-
-      // If both extremities are in the same subdomain,
-      // there is no intersection.
-      // This should not happen...
-      if( value_at_p1 == value_at_p2 )
-      {
-        return Intersection();
-      }
-
-      // Construct the surface patch index and index from the values at 'a'
-      // and 'b'. Even if the bissection find out a different pair of
-      // values, the reported index will be constructed from the initial
-      // values.
-      const Surface_patch_index sp_index =
-        r_domain_.make_surface_index(value_at_p1, value_at_p2);
-      const Index index = r_domain_.index_from_surface_patch_index(sp_index);
-
-      // Else lets find a point (by bisection)
-      // Bisection ends when the point is near than error bound from surface
-      while(true)
-      {
-        // If the two points are enough close, then we return midpoint
-        if ( squared_distance(p1, p2) < r_domain_.squared_error_bound_ )
-        {
-          CGAL_assertion(value_at_p1 != value_at_p2);
-          return Intersection(mid, index, 2);
-        }
-
-        // Else we must go on
-        // Here we consider that p1(a) is the source point. Thus, we keep p1 and
-        // change p2 if f(p1)!=f(p2).
-        // That allows us to find the first intersection from a of [a,b] with
-        // a surface.
-        if ( value_at_p1 != value_at_mid )
-        {
-          p2 = mid;
-          value_at_p2 = value_at_mid;
-        }
-        else
-        {
-          p1 = mid;
-          value_at_p1 = value_at_mid;
-        }
-
-        mid = midpoint(p1, p2);
-        value_at_mid = r_domain_.function_(mid,true);
-      }
-    }
-
-    /// Clips \c query to a segment \c s, and call operator()(s)
-    template<typename Query>
-    Intersection clip_to_segment(const Query& query) const
-    {
-      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
-        clipped = CGAL::intersection(query, r_domain_.bbox_);
-
-      if(clipped)
-#if CGAL_INTERSECTION_VERSION > 1
-        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
-          return this->operator()(*s);
-#else
-        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
-          return this->operator()(*s);
-#endif
-      
-      return Intersection();
-    }
-
-  private:
-    const Labeled_mesh_domain_3& r_domain_;
-  };
-
-  /// Returns Construct_intersection object
-  Construct_intersection construct_intersection_object() const
-  {
-    return Construct_intersection(*this);
-  }
-
-  /**
-   * Returns the index to be stored in a vertex lying on the surface identified
-   * by \c index.
-   */
-  Index index_from_surface_patch_index(const Surface_patch_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the index to be stored in a vertex lying in the subdomain
-   * identified by \c index.
-   */
-  Index index_from_subdomain_index(const Subdomain_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the \c Surface_patch_index of the surface patch
-   * where lies a vertex with dimension 2 and index \c index.
-   */
-  Surface_patch_index surface_patch_index(const Index& index) const
-  { return boost::get<Surface_patch_index>(index); }
-
-  /**
-   * Returns the index of the subdomain containing a vertex
-   *  with dimension 3 and index \c index.
-   */
-  Subdomain_index subdomain_index(const Index& index) const
-  { return boost::get<Subdomain_index>(index); }
-  
-  // -----------------------------------
-  // Backward Compatibility
-  // -----------------------------------
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index   Surface_index;
-  
-  Index index_from_surface_index(const Surface_index& index) const
-  { return index_from_surface_patch_index(index); }
-  
-  Surface_index surface_index(const Index& index) const
-  { return surface_patch_index(index); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  // -----------------------------------
-  // End backward Compatibility
-  // -----------------------------------
-
-
-private:
-  /// Returns Surface_patch_index from \c i and \c j
-  Surface_patch_index make_surface_index(const Subdomain_index i,
-                                   const Subdomain_index j) const
-  {
-    if ( i < j ) return Surface_patch_index(i,j);
-    else return Surface_patch_index(j,i);
-  }
-
-  /// Returns squared error bound from \c bbox and \c error
-  FT squared_error_bound(const Iso_cuboid_3& bbox, const FT& error) const
-  {
-    typename BGT::Compute_squared_distance_3 squared_distance =
-                                    BGT().compute_squared_distance_3_object();
-    return squared_distance((bbox.min)(), (bbox.max)())*error*error/4;
-  }
-
-  /// Returns squared error bound from \c sphere and \c error
-  FT squared_error_bound(const Sphere_3& sphere, const FT& error) const
-  {
-    typename BGT::Compute_squared_radius_3 squared_radius =
-                                    BGT().compute_squared_radius_3_object();
-    return squared_radius(sphere)*error*error;
-  }
-
-  /// Returns the bounding sphere of an Iso_cuboid_3
-  Sphere_3 bounding_sphere(const Iso_cuboid_3& bbox) const
-  {
-    typename BGT::Construct_sphere_3 sphere = BGT().construct_sphere_3_object();
-    return sphere((bbox.min)(), (bbox.max)());
-  }
-
-  /// Returns and Iso_cuboid_3 from a Bbox_3
-  Iso_cuboid_3 iso_cuboid(const Bbox_3& bbox)
-  {
-    const Point_3 p_min(bbox.xmin(), bbox.ymin(), bbox.zmin());
-    const Point_3 p_max(bbox.xmax(), bbox.ymax(), bbox.zmax());
-
-    return Iso_cuboid_3(p_min,p_max);
-  }
-  
-protected:
-  /// Returns bounding box
-  const Iso_cuboid_3& bounding_box() const { return bbox_; }
-
-private:
-  /// The function which answers subdomain queries
-  const Function function_;
-  /// The bounding box
-  const Iso_cuboid_3 bbox_;
-  /// The random number generator used by Construct_initial_points
-  CGAL::Random* p_rng_;
-  bool delete_rng_;
-  /// Error bound relative to sphere radius
-  FT squared_error_bound_;
-
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Labeled_mesh_domain_3<Function,BGT> Self;
-  Labeled_mesh_domain_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Labeled_mesh_domain_3
-
-
-
-
-//-------------------------------------------------------
-// Method implementation
-//-------------------------------------------------------
-template<class F, class BGT>
-Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
-                       const F& f,
-                       const Sphere_3& bounding_sphere,
-                       const FT& error_bound,
-                       CGAL::Random* p_rng)
-: function_(f)
-, bbox_(iso_cuboid(bounding_sphere.bbox()))
-, p_rng_(p_rng)
-, delete_rng_(false)
-, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
-{
-  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
-  if(!p_rng_)
-  {
-    p_rng_ = new CGAL::Random(0);
-    delete_rng_ = true;
-  }
-}
-
-template<class F, class BGT>
-Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
-                       const F& f,
-                       const Bbox_3& bbox,
-                       const FT& error_bound,
-                       CGAL::Random* p_rng)
-: function_(f)
-, bbox_(iso_cuboid(bbox))
-, p_rng_(p_rng)
-, delete_rng_(false)
-, squared_error_bound_(squared_error_bound(bbox_,error_bound))
-{
-  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
-  if(!p_rng_)
-  {
-    p_rng_ = new CGAL::Random(0);
-    delete_rng_ = true;
-  }
-}
-
-
-template<class F, class BGT>
-template<class OutputIterator>
-OutputIterator
-Labeled_mesh_domain_3<F,BGT>::Construct_initial_points::operator()(
-                                                    OutputIterator pts,
-                                                    const int nb_points) const
-{
-  // Create point_iterator on and in bounding_sphere
-  typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
-  typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
-
-
-  const FT squared_radius = BGT().compute_squared_radius_3_object()(
-      r_domain_.bounding_sphere(r_domain_.bbox_));
-
-  const double radius = std::sqrt(CGAL::to_double(squared_radius));
-
-  CGAL::Random& rng = *(r_domain_.p_rng_);
-  Random_points_on_sphere_3 random_point_on_sphere(radius, rng);
-  Random_points_in_sphere_3 random_point_in_sphere(radius, rng);
-
-  // Get some functors
-  typename BGT::Construct_segment_3 segment_3 =
-                              BGT().construct_segment_3_object();
-  typename BGT::Construct_vector_3 vector_3 =
-                              BGT().construct_vector_3_object();
-  typename BGT::Construct_translated_point_3 translate =
-                              BGT().construct_translated_point_3_object();
-  typename BGT::Construct_center_3 center = BGT().construct_center_3_object();
-
-  // Get translation from origin to sphere center
-  Point_3 center_pt = center(r_domain_.bounding_sphere(r_domain_.bbox_));
-  const Vector_3 sphere_translation = vector_3(CGAL::ORIGIN, center_pt);
-
-  // Create nb_point points
-  int n = nb_points;
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "construct initial points:\n";
-#endif
-  while ( 0 != n )
-  {
-    // Get a random segment
-    const Point_3 random_point = translate(*random_point_on_sphere,
-                                           sphere_translation);
-    const Segment_3 random_seg = segment_3(center_pt, random_point);
-
-    // Add the intersection to the output if it exists
-    Surface_patch surface = r_domain_.do_intersect_surface_object()(random_seg);
-    if ( surface )
-    {
-      const Point_3 intersect_pt = CGAL::cpp11::get<0>(
-          r_domain_.construct_intersection_object()(random_seg));
-      *pts++ = std::make_pair(intersect_pt,
-                              r_domain_.index_from_surface_patch_index(*surface));
-      --n;
-
-#ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << boost::format("\r             \r"
-                                 "%1%/%2% initial point(s) found...")
-                   % (nb_points - n)
-                   % nb_points;
-#endif
-    }
-    else
-    {
-      // Get a new random point into sphere as center of object
-      // It may be necessary if the center of the domain is empty, e.g. torus
-      // In general case, it is good for input point dispersion
-      ++random_point_in_sphere;
-      center_pt = translate(*random_point_in_sphere, sphere_translation);
-    }
-    ++random_point_on_sphere;
-  }
-
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "\n";
-#endif
-  return pts;
-}
-
-
-}  // end namespace Mesh_3
-
-}  // end namespace CGAL
-
-#endif // LABELLED_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
deleted file mode 100644
index 04d31f4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
+++ /dev/null
@@ -1,639 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description : Implements class Mesh_complex_3_in_triangulation_3.
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
-#define CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Mesh_3/utilities.h>
-#include <CGAL/iterator.h>
-#include <CGAL/IO/File_medit.h>
-#include <CGAL/IO/File_maya.h>
-#include <CGAL/Bbox_3.h>
-#include <iostream>
-#include <fstream>
-#include <CGAL/Mesh_3/io_signature.h>
-
-#ifdef CGAL_LINKED_WITH_TBB
-  #include <tbb/atomic.h>
-#endif
-
-namespace CGAL {
-namespace Mesh_3 {
-
-/**
- * @class Mesh_complex_3_in_triangulation_3_base
- * @brief A data-structure to represent and maintain a 3D complex embedded
- * in a 3D triangulation.
- */
-template<typename Tr, typename Concurrency_tag>
-class Mesh_complex_3_in_triangulation_3_base
-{
-  typedef Mesh_complex_3_in_triangulation_3_base<Tr, Concurrency_tag> Self;
-
-public:
-  // Triangulation types
-  typedef Tr                            Triangulation;
-  typedef typename Tr::Vertex_handle    Vertex_handle;
-  typedef typename Tr::Cell_handle      Cell_handle;
-  typedef typename Tr::Facet            Facet;
-  typedef typename Tr::Edge             Edge;
-  typedef typename Tr::size_type        size_type;
-
-  // Indices types
-  typedef typename Tr::Cell::Subdomain_index      Subdomain_index;
-  typedef typename Tr::Cell::Surface_patch_index  Surface_patch_index;
-  typedef typename Tr::Vertex::Index              Index;
-
-  //-------------------------------------------------------
-  // Constructors / Destructors
-  //-------------------------------------------------------
-  /**
-   * @brief Constructor
-   * Builds an empty 3D complex.
-   */
-  Mesh_complex_3_in_triangulation_3_base()
-    : tr_()
-  {
-    // We don't put it in the initialization list because
-    // tbb::atomic has no contructors
-    number_of_facets_ = 0;
-    number_of_cells_ = 0;
-  }
-
-  /// Copy constructor
-  Mesh_complex_3_in_triangulation_3_base(const Self& rhs)
-    : tr_(rhs.tr_)
-  {
-    number_of_facets_ = rhs.number_of_facets_;
-    number_of_cells_ = rhs.number_of_cells_;
-  }
-
-  /// Destructor
-  ~Mesh_complex_3_in_triangulation_3_base() {}
-
-  void clear() {
-    number_of_cells_ = 0;
-    number_of_facets_ = 0;
-    tr_.clear();
-  }
-
-  /// Assignment operator
-  Self& operator=(Self rhs)
-  {
-    swap(rhs);
-    return *this;
-  }
-
-  /// Returns the reference to the triangulation
-  Triangulation& triangulation() { return tr_; }
-  /// Returns a const reference to the triangulation
-  const Triangulation& triangulation() const { return tr_; }
-
-
-  /// Adds facet \c facet to the 2D complex, with surface index \c index
-  void add_to_complex(const Facet& facet, const Surface_patch_index& index)
-  {
-    add_to_complex(facet.first, facet.second, index);
-  }
-
-  /// Adds facet(\c cell, \c i) to the 2D complex, with surface index \c index
-  void add_to_complex(const Cell_handle& cell,
-                      const int i,
-                      const Surface_patch_index& index);
-
-  /// Removes facet \c facet from 2D complex
-  void remove_from_complex(const Facet& facet);
-
-  /// Removes facet(\c cell, \c i) from 2D complex
-  void remove_from_complex(const Cell_handle& c, const int i) {
-    remove_from_complex(Facet(c, i));
-  }
-
-  /// Sets surface index of facet \c facet to \c index
-  void set_surface_patch_index(const Facet& f, const Surface_patch_index& index)
-  {
-    set_surface_patch_index(f.first, f.second, index);
-  }
-
-  /// Sets surface index of facet(\c cell, \c i) to \c index
-  void set_surface_patch_index(const Cell_handle& cell,
-                         const int i,
-                         const Surface_patch_index& index) const
-  {
-    cell->set_surface_patch_index(i, index);
-  }
-
-  /// Returns true if facet \c facet is in complex
-  bool is_in_complex(const Facet& facet) const
-  {
-    return is_in_complex(facet.first, facet.second);
-  }
-
-  /// Returns true if facet (\c cell, \c i) is in 2D complex
-  bool is_in_complex(const Cell_handle& cell, const int i) const
-  {
-    return ( cell->is_facet_on_surface(i) );
-  }
-
-  /// Returns surface index of facet \c f
-  Surface_patch_index surface_patch_index(const Facet& f) const
-  {
-    return surface_patch_index(f.first,f.second);
-  }
-
-  /// Returns surface index of facet(\c cell, \c i)
-  Surface_patch_index surface_patch_index(const Cell_handle& cell,
-                                          const int i) const
-  {
-    return cell->surface_patch_index(i);
-  }
-
-  /// Returns the number of surface facets of the mesh
-  size_type number_of_facets_in_complex() const { return number_of_facets_; }
-
-  /// Adds cell \c cell to the 3D complex, with subdomain index \c index
-  void add_to_complex(const Cell_handle& cell, const Subdomain_index& index)
-  {
-    CGAL_precondition(index != Subdomain_index());
-
-    if ( ! is_in_complex(cell) )
-    {
-      set_subdomain_index(cell, index);
-      ++number_of_cells_;
-    }
-  }
-
-  /// Removes cell \c cell from the 3D complex
-  void remove_from_complex(const Cell_handle& cell)
-  {
-    if ( is_in_complex(cell) )
-    {
-      set_subdomain_index(cell, Subdomain_index());
-      --number_of_cells_;
-    }
-  }
-
-
-  /// Sets subdomain index of cell \c cell to \c index
-  void set_subdomain_index(const Cell_handle& cell,
-                           const Subdomain_index& index) const
-  {
-    cell->set_subdomain_index(index);
-  }
-
-  /// Sets index of vertex \c vertex to \c index
-  void set_index(const Vertex_handle& vertex, const Index& index) const
-  {
-    vertex->set_index(index);
-  }
-
-  /// Sets dimension of vertex \c vertex to \c dimension
-  void set_dimension(const Vertex_handle& vertex, int dimension) const
-  {
-    vertex->set_dimension(dimension);
-  }
-
-  /// Returns the number of cells which belongs to the 3D complex
-  size_type number_of_cells_in_complex() const
-  {
-    return number_of_cells_;
-  }
-
-  /// Returns \c true if cell \c cell belongs to the 3D complex
-  bool is_in_complex(const Cell_handle& cell) const
-  {
-    return ( subdomain_index(cell) != Subdomain_index() );
-  }
-
-  /// Returns the subdomain index of cell \c cell
-  Subdomain_index subdomain_index(const Cell_handle& cell) const
-  {
-    return cell->subdomain_index();
-  }
-
-  /// Returns the dimension of the lowest dimensional face of the input 3D
-  /// complex that contains the vertex
-  int in_dimension(const Vertex_handle& v) const { return v->in_dimension(); }
-
-  /// Returns the index of vertex \c v
-  Index index(const Vertex_handle& v) const { return v->index(); }
-
-  /// Outputs the mesh to medit
-  void output_to_medit(std::ostream& os,
-                       bool rebind = true,
-                       bool show_patches = false) const
-  {
-    // Call global function
-    CGAL::output_to_medit(os,*this,rebind,show_patches);
-  }
-  
-  /// Outputs the mesh to medit
-  void output_to_maya(std::ofstream& os,
-                      bool surfaceOnly = true) const
-  {
-    // Call global function
-    CGAL::output_to_maya(os,*this,surfaceOnly);
-  }
-
-  //-------------------------------------------------------
-  // Undocumented features
-  //-------------------------------------------------------
-  /**
-   * @brief insert \c [first,last[ in the triangulation (with dimension 2)
-   * @param first the iterator on the first point to insert
-   * @param last the iterator past the last point to insert
-   *
-   * InputIterator value type must be \c std::pair<Tr::Point,Index>
-   */
-  template <typename InputIterator>
-  void insert_surface_points(InputIterator first, InputIterator last)
-  {
-    while ( first != last )
-    {
-      Vertex_handle vertex = tr_.insert((*first).first);
-      vertex->set_index((*first).second);
-      vertex->set_dimension(2);
-      ++first;
-    }
-  }
-
-  /**
-   * @brief insert \c [first,last[ in the triangulation (with dimension 2 and
-   * index \c default_index)
-   * @param first the iterator on the first point to insert
-   * @param last the iterator past the last point to insert
-   * @param default_index the index to be used to insert points
-   *
-   * InputIterator value type must be \c Tr::Point
-   */
-  template <typename InputIterator>
-  void insert_surface_points(InputIterator first,
-                             InputIterator last,
-                             const Index& default_index)
-  {
-    while ( first != last )
-    {
-      Vertex_handle vertex = tr_.insert(*first);
-      vertex->set_index(default_index);
-      vertex->set_dimension(2);
-      ++first;
-    }
-  }
-
-  /// Swaps this & rhs
-  void swap(Self& rhs)
-  {
-    std::swap(rhs.number_of_facets_, number_of_facets_);
-    tr_.swap(rhs.tr_);
-    std::swap(rhs.number_of_cells_, number_of_cells_);
-  }
-
-  /// Returns bbox
-  Bbox_3 bbox() const;
-
-  //-------------------------------------------------------
-  // Traversal
-  //-------------------------------------------------------
-private:
-  typedef Mesh_3::internal::Iterator_not_in_complex<Self> Iterator_not_in_complex;
-
-  class Facet_iterator_not_in_complex
-  {
-    const Self* c3t3_;
-    Surface_patch_index index_; //need by SWIG: should be const Surface_patch_index
-  public:
-    Facet_iterator_not_in_complex(){} //need by SWIG
-    Facet_iterator_not_in_complex(const Self& c3t3,
-                                  const Surface_patch_index& index = Surface_patch_index())
-      : c3t3_(&c3t3)
-      , index_(index) { }
-
-    template <typename Iterator>
-    bool operator()(Iterator it) const
-    {
-      if ( index_ == Surface_patch_index() ) { return ! c3t3_->is_in_complex(*it); }
-      else { return c3t3_->surface_patch_index(*it) != index_;  }
-    }
-  };
-
-  /**
-   * @class Cell_not_in_complex
-   * @brief A class to filter cells which do not belong to the complex
-   */
-  class Cell_not_in_complex
-  {
-    const Self* r_self_;
-    Subdomain_index index_;//needed by SWIG, should be const Subdomain_index
-  public:
-    Cell_not_in_complex(){}//needed by SWIG
-    Cell_not_in_complex(const Self& self,
-                        const Subdomain_index& index = Subdomain_index())
-      : r_self_(&self)
-      , index_(index) { }
-
-    bool operator()(Cell_handle ch) const
-    {
-      if ( index_ == Subdomain_index() ) { return !r_self_->is_in_complex(ch); }
-      else { return r_self_->subdomain_index(ch) != index_; }
-    }
-  }; // end class Cell_not_in_complex
-
-public:
-  /// Iterator type to visit the facets of the 2D complex.
-  typedef Filter_iterator<
-    typename Triangulation::Finite_facets_iterator,
-    Facet_iterator_not_in_complex >               Facets_in_complex_iterator;
-
-  /// Returns a Facets_in_complex_iterator to the first facet of the 2D complex
-  Facets_in_complex_iterator facets_in_complex_begin() const
-  {
-    return CGAL::filter_iterator(tr_.finite_facets_end(),
-                                 Facet_iterator_not_in_complex(*this),
-                                 tr_.finite_facets_begin());
-  }
-
-  /// Returns a Facets_in_complex_iterator to the first facet of the 2D complex
-  Facets_in_complex_iterator
-  facets_in_complex_begin(const Surface_patch_index& index) const
-  {
-    return CGAL::filter_iterator(tr_.finite_facets_end(),
-                                 Facet_iterator_not_in_complex(*this,index),
-                                 tr_.finite_facets_begin());
-  }
-
-  /// Returns past-the-end iterator on facet of the 2D complex
-  Facets_in_complex_iterator facets_in_complex_end(const Surface_patch_index = Surface_patch_index()) const
-  {
-    return CGAL::filter_iterator(tr_.finite_facets_end(),
-                                 Facet_iterator_not_in_complex(*this));
-  }
-
-  /**
-   * @class Cells_in_complex_iterator
-   * @brief Iterator type to visit the cells of triangulation belonging
-   * to the 3D complex
-   *
-   * This class is usefull to ensure that Cells_in_complex_iterator is convertible
-   * to Cell_handle
-   */
-  class Cells_in_complex_iterator :
-    public Filter_iterator<typename Triangulation::Finite_cells_iterator,
-                           Cell_not_in_complex>
-  {
-  private:
-    typedef typename Triangulation::Finite_cells_iterator Tr_iterator;
-    typedef Filter_iterator<typename Triangulation::Finite_cells_iterator,
-                            Cell_not_in_complex> Base;
-    typedef Cells_in_complex_iterator Self;
-
-  public:
-    Cells_in_complex_iterator() : Base() { }
-    Cells_in_complex_iterator(Base i) : Base(i) { }
-
-    Self& operator++() { Base::operator++(); return *this; }
-    Self& operator--() { Base::operator--(); return *this; }
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-
-    operator Cell_handle() const { return Cell_handle(this->base()); }
-  }; // end class Cells_in_complex_iterator
-
-
-  /// Returns a \c Cells_in_complex_iterator to the first cell of the 3D complex
-  Cells_in_complex_iterator cells_in_complex_begin() const
-  {
-    return CGAL::filter_iterator(tr_.finite_cells_end(),
-                                 Cell_not_in_complex(*this),
-                                 tr_.finite_cells_begin());
-  }
-
-  /// Returns a \c Cells_in_complex_iterator to the first cell of the 3D complex
-  Cells_in_complex_iterator
-  cells_in_complex_begin(const Subdomain_index& index) const
-  {
-    return CGAL::filter_iterator(tr_.finite_cells_end(),
-                                 Cell_not_in_complex(*this,index),
-                                 tr_.finite_cells_begin());
-  }
-
-  /// Returns the past-the-end iterator for the cells of the 3D complex
-  Cells_in_complex_iterator cells_in_complex_end() const
-  {
-    return CGAL::filter_iterator(tr_.finite_cells_end(),
-                                 Cell_not_in_complex(*this));
-  }
-
-  // -----------------------------------
-  // Backward Compatibility
-  // -----------------------------------
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index   Surface_index;
-
-  void set_surface_index(const Facet& f, const Surface_index& index)
-  { set_surface_patch_index(f, index); }
-
-  void set_surface_index(const Cell_handle& c, const int i, const Surface_index& index)
-  { set_surface_patch_index(c,i,index); }
-
-  Surface_index surface_index(const Facet& f) const
-  { return surface_patch_index(f); }
-
-  Surface_index surface_index(const Cell_handle& c, const int i) const
-  { return surface_patch_index(c,i); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-
-#ifndef CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS
-  typedef Facets_in_complex_iterator  Facet_iterator;
-  typedef Cells_in_complex_iterator   Cell_iterator;
-
-  Facet_iterator facets_begin() const
-  { return facets_in_complex_begin(); }
-
-  Facet_iterator facets_end() const
-  { return facets_in_complex_end(); }
-
-  Cell_iterator cells_begin() const
-  { return cells_in_complex_begin(); }
-
-  Cell_iterator cells_end() const
-  { return cells_in_complex_end(); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS
-  // -----------------------------------
-  // End backward Compatibility
-  // -----------------------------------
-
-  size_type number_of_facets() const
-  { return number_of_facets_in_complex(); }
-
-  size_type number_of_cells() const
-  { return number_of_cells_in_complex(); }
-
-public:
-  template <typename Tr2, typename Ct2>
-  friend
-  std::istream &
-  operator>> (std::istream& is,
-              Mesh_complex_3_in_triangulation_3_base<Tr2,Ct2> &c3t3);
-
-  static
-  std::string io_signature()
-  {
-    return
-      Get_io_signature<Tr>()();
-  }
-private:
-
-  // Sequential: non-atomic
-  // "dummy" is here to allow the specialization (see below)
-  // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6
-  template<typename Concurrency_tag2, typename dummy = void>
-  struct Number_of_elements
-  {
-    typedef size_type type;
-  };
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel: atomic
-  template<typename dummy>
-  struct Number_of_elements<Parallel_tag, dummy>
-  {
-    typedef tbb::atomic<size_type> type;
-  };
-#endif // CGAL_LINKED_WITH_TBB
-
-  // Private date members
-  Triangulation tr_;
-  typename Number_of_elements<Concurrency_tag>::type number_of_facets_;
-  typename Number_of_elements<Concurrency_tag>::type number_of_cells_;
-};  // end class Mesh_complex_3_in_triangulation_3_base
-
-
-template <typename Tr, typename Ct>
-void
-Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::add_to_complex(
-    const Cell_handle& cell,
-    const int i,
-    const Surface_patch_index& index)
-{
-  CGAL_precondition(index != Surface_patch_index());
-
-  if ( ! is_in_complex(cell,i) )
-  {
-    Facet mirror = tr_.mirror_facet(std::make_pair(cell,i));
-    set_surface_patch_index(cell, i, index);
-    set_surface_patch_index(mirror.first, mirror.second, index);
-    ++number_of_facets_;
-  }
-}
-
-
-template <typename Tr, typename Ct>
-void
-Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::remove_from_complex(const Facet& facet)
-{
-  if ( is_in_complex(facet) )
-  {
-    Facet mirror = tr_.mirror_facet(facet);
-    set_surface_patch_index(facet.first, facet.second, Surface_patch_index());
-    set_surface_patch_index(mirror.first, mirror.second, Surface_patch_index());
-    --number_of_facets_;
-  }
-}
-
-
-// -----------------------------------
-// Undocumented
-// -----------------------------------
-template <typename Tr, typename Ct>
-Bbox_3
-Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::
-bbox() const
-{
-  if ( 0 == triangulation().number_of_vertices() )
-  {
-    return Bbox_3();
-  }
-
-  typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
-  Bbox_3 result = (vit++)->point().bbox();
-
-  for(typename Tr::Finite_vertices_iterator end = tr_.finite_vertices_end();
-      vit != end ; ++vit)
-  {
-    result = result + vit->point().bbox();
-  }
-
-  return result;
-}
-
-template <typename Tr, typename Ct>
-std::ostream &
-operator<< (std::ostream& os,
-            const Mesh_complex_3_in_triangulation_3_base<Tr,Ct> &c3t3)
-{
-  return os << c3t3.triangulation();
-}
-
-
-template <typename Tr, typename Ct>
-std::istream &
-operator>> (std::istream& is,
-            Mesh_complex_3_in_triangulation_3_base<Tr,Ct> &c3t3)
-{
-  c3t3.clear();
-  is >> c3t3.triangulation();
-
-  if(!is) {
-    c3t3.clear();
-    return is;
-  }
-
-  for(typename Tr::Finite_facets_iterator
-        fit = c3t3.triangulation().finite_facets_begin(),
-        end = c3t3.triangulation().finite_facets_end();
-      fit != end; ++fit)
-  {
-    if ( c3t3.is_in_complex(*fit) ) {
-      ++c3t3.number_of_facets_;
-    }
-  }
-
-  for(typename Tr::Finite_cells_iterator
-        cit = c3t3.triangulation().finite_cells_begin(),
-        end = c3t3.triangulation().finite_cells_end();
-      cit != end; ++cit)
-  {
-    if ( c3t3.is_in_complex(cit) ) {
-      ++c3t3.number_of_cells_;
-    }
-  }
-
-  return is;
-}
-
-}  // end namespace Mesh_3
-}  // end namespace CGAL
-
-#endif // CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_global_optimizer.h
deleted file mode 100644
index 80f52a3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_global_optimizer.h
+++ /dev/null
@@ -1,1159 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description :
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
-#define CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Timer.h>
-#include <CGAL/Mesh_3/C3T3_helpers.h>
-#include <CGAL/Mesh_3/Triangulation_helpers.h>
-#include <CGAL/Origin.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/Null_global_optimizer_visitor.h>
-#include <CGAL/Prevent_deref.h>
-#include <CGAL/tuple.h>
-
-#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
-
-#ifdef CGAL_MESH_3_PROFILING
-  #include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#include <vector>
-#include <list>
-#include <limits>
-
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/atomic.h>
-# include <tbb/parallel_do.h>
-# include <tbb/concurrent_vector.h>
-#endif
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-
-/************************************************
-// Class Mesh_global_optimizer_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Tr, typename Concurrency_tag>
-class Mesh_global_optimizer_base
-{
-protected:
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-
-  typedef std::vector<cpp11::tuple<
-    typename Tr::Vertex_handle, typename Tr::Point, FT> >   Moves_vector;
-  typedef unsigned int                                      Nb_frozen_points_type ;
-
-  Mesh_global_optimizer_base(const Bbox_3 &, int)
-    : big_moves_size_(0) {}
-
-  void update_big_moves(const FT& new_sq_move)
-  {
-    if (big_moves_.size() < big_moves_size_ )
-      big_moves_.insert(new_sq_move);
-    else
-    {
-      FT smallest = *(big_moves_.begin());
-      if( new_sq_move > smallest )
-      {
-        big_moves_.erase(big_moves_.begin());
-        big_moves_.insert(new_sq_move);
-      }
-    }
-  }
-
-  void clear_big_moves()
-  {
-    big_moves_.clear();
-  }
-
-  Lock_data_structure *get_lock_data_structure() { return 0; }
-  void unlock_all_elements() {}
-
-protected:
-  std::size_t big_moves_size_;
-  std::multiset<FT> big_moves_;
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Tr>
-class Mesh_global_optimizer_base<Tr, Parallel_tag>
-{
-protected:
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-  typedef tbb::concurrent_vector<cpp11::tuple<
-    typename Tr::Vertex_handle, typename Tr::Point, FT> >   Moves_vector;
-  typedef tbb::atomic<unsigned int>                         Nb_frozen_points_type ;
-
-  Mesh_global_optimizer_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
-    : big_moves_size_(0)
-    , m_lock_ds(bbox, num_grid_cells_per_axis)
-  {
-    big_moves_current_size_ = 0;
-    big_moves_smallest_ = std::numeric_limits<FT>::max();
-  }
-
-  void update_big_moves(const FT& new_sq_move)
-  {
-    if (++big_moves_current_size_ <= big_moves_size_ )
-    {
-      tbb::mutex::scoped_lock lock(m_big_moves_mutex);
-      typename std::multiset<FT>::const_iterator it = big_moves_.insert(new_sq_move);
-
-      // New smallest move of all big moves?
-      if (it == big_moves_.begin())
-        big_moves_smallest_ = new_sq_move;
-    }
-    else
-    {
-      --big_moves_current_size_;
-
-      if( new_sq_move > big_moves_smallest_ )
-      {
-        tbb::mutex::scoped_lock lock(m_big_moves_mutex);
-        // Test it again since it may have been modified by another
-        // thread in the meantime
-        if( new_sq_move > big_moves_smallest_ )
-        {
-          big_moves_.erase(big_moves_.begin());
-          typename std::multiset<FT>::const_iterator it = big_moves_.insert(new_sq_move);
-
-          // New smallest move of all big moves?
-          if (it == big_moves_.begin())
-            big_moves_smallest_ = new_sq_move;
-        }
-      }
-    }
-  }
-
-  void clear_big_moves()
-  {
-    big_moves_current_size_ = 0;
-    big_moves_smallest_ = std::numeric_limits<FT>::max();
-    big_moves_.clear();
-  }
-
-  Lock_data_structure *get_lock_data_structure()
-  {
-    return &m_lock_ds;
-  }
-
-  void unlock_all_elements()
-  {
-    m_lock_ds.unlock_all_points_locked_by_this_thread();
-  }
-
-public:
-
-protected:
-  tbb::atomic<std::size_t>  big_moves_current_size_;
-  tbb::atomic<FT>           big_moves_smallest_;
-  std::size_t               big_moves_size_;
-  std::multiset<FT>         big_moves_;
-  tbb::mutex                m_big_moves_mutex;
-
-  /// Lock data structure
-  Lock_data_structure m_lock_ds;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-
-
-
-/************************************************
-// Class Mesh_global_optimizer
-************************************************/
-
-template <typename C3T3,
-          typename MeshDomain,
-          typename MoveFunction,
-          typename Visitor_ = Null_global_optimizer_visitor<C3T3> >
-class Mesh_global_optimizer
-: public Mesh_global_optimizer_base<typename C3T3::Triangulation, typename C3T3::Concurrency_tag>
-{
-  // Types
-  typedef typename C3T3::Concurrency_tag Concurrency_tag;
-
-  typedef Mesh_global_optimizer<C3T3, MeshDomain, MoveFunction, Visitor_> Self;
-  typedef Mesh_global_optimizer_base<
-    typename C3T3::Triangulation, typename C3T3::Concurrency_tag>         Base;
-
-  using Base::get_lock_data_structure;
-  using Base::big_moves_;
-  using Base::big_moves_size_;
-
-  typedef typename C3T3::Triangulation  Tr;
-  typedef typename Tr::Geom_traits      Gt;
-
-  typedef typename Tr::Point            Point_3;
-  typedef typename Tr::Cell_handle      Cell_handle;
-  typedef typename Tr::Vertex_handle    Vertex_handle;
-  typedef typename Tr::Edge             Edge;
-  typedef typename Tr::Vertex           Vertex;
-
-  typedef typename Gt::FT               FT;
-  typedef typename Gt::Vector_3         Vector_3;
-
-  typedef typename std::vector<Cell_handle>                 Cell_vector;
-  typedef typename std::vector<Vertex_handle>               Vertex_vector;
-  typedef typename std::set<Vertex_handle>                  Vertex_set;
-  typedef typename Base::Moves_vector                       Moves_vector;
-  typedef typename Base::Nb_frozen_points_type              Nb_frozen_points_type;
-
-#ifdef CGAL_INTRUSIVE_LIST
-  typedef Intrusive_list<Cell_handle>   Outdated_cell_set;
-#else
-  typedef std::set<Cell_handle>         Outdated_cell_set;
-#endif //CGAL_INTRUSIVE_LIST
-
-#ifdef CGAL_INTRUSIVE_LIST
-  typedef Intrusive_list<Vertex_handle>  Moving_vertices_set;
-#else
-  typedef Vertex_set Moving_vertices_set;
-#endif
-
-  typedef typename MoveFunction::Sizing_field Sizing_field;
-
-  typedef class C3T3_helpers<C3T3,MeshDomain> C3T3_helpers;
-
-  // Visitor class
-  // Should define:
-  //  - after_compute_moves()
-  //  - after_move_points()
-  //  - after_rebuild_restricted_delaunay()
-  //  - end_of_iteration(int iteration_number)
-  typedef Visitor_ Visitor;
-
-public:
-  /**
-   * Constructor
-   */
-  Mesh_global_optimizer(C3T3& c3t3,
-                        const MeshDomain& domain,
-                        const FT& freeze_ratio,
-                        const bool do_freeze,
-                        const FT& convergence_ratio,
-                        const MoveFunction move_function = MoveFunction());
-
-  /**
-   * Launch optimization process
-   *
-   * @param nb_interations maximum number of iterations
-   */
-  Mesh_optimization_return_code operator()(int nb_iterations,
-                                           Visitor v = Visitor());
-
-  /**
-  * collects all vertices of the triangulation in moving_vertices
-  * (even the frozen ones)
-  */
-  void collect_all_vertices(Moving_vertices_set& moving_vertices);
-
-  /// Time accessors
-  void set_time_limit(double time) { time_limit_ = time; }
-  double time_limit() const { return time_limit_; }
-
-private:
-  /**
-   * Returns moves for vertices of set \c moving_vertices
-   */
-  Moves_vector compute_moves(Moving_vertices_set& moving_vertices)
-{
-  typename Gt::Construct_translated_point_3 translate =
-    Gt().construct_translated_point_3_object();
-
-  // Store new position of points which have to move
-  Moves_vector moves;
-
-
-  moves.reserve(moving_vertices.size());
-
-  // reset worst_move list
-  this->clear_big_moves();
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Computing moves...";
-  WallClockTimer t;
-#endif
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tbb::concurrent_vector<Vertex_handle> vertices_not_moving_any_more;
-
-    // Get move for each moving vertex
-    tbb::parallel_do(
-      moving_vertices.begin(), moving_vertices.end(),
-      Compute_move<Self, Sizing_field, Moves_vector,
-                   typename Gt::Construct_translated_point_3>(
-        *this, sizing_field_, moves, do_freeze_, vertices_not_moving_any_more,
-        translate)
-    );
-
-    typename tbb::concurrent_vector<Vertex_handle>::const_iterator it
-      = vertices_not_moving_any_more.begin();
-    typename tbb::concurrent_vector<Vertex_handle>::const_iterator it_end
-      = vertices_not_moving_any_more.end();
-    for ( ; it != it_end ; ++it)
-    {
-      moving_vertices.erase(*it);
-    }
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-    // Get move for each moving vertex
-    typename Moving_vertices_set::iterator vit = moving_vertices.begin();
-    for ( ; vit != moving_vertices.end() ; )
-    {
-      Vertex_handle oldv = *vit;
-      ++vit;
-      Vector_3 move = compute_move(oldv);
-
-      if ( CGAL::NULL_VECTOR != move )
-      {
-        Point_3 new_position = translate(oldv->point(),move);
-        FT size = (Sizing_field::is_vertex_update_needed ?
-          sizing_field_(new_position, oldv) : 0);
-        moves.push_back(cpp11::make_tuple(oldv,new_position,size));
-      }
-      else // CGAL::NULL_VECTOR == move
-      {
-        if(do_freeze_)
-          moving_vertices.erase(oldv); // TODO: if non-intrusive,
-                                       // we can optimize since we have the iterator,
-                                       // don't forget to do "vit = mv.erase(vit)" instead ++vit
-      }
-
-      // Stop if time_limit_ is reached
-      if ( is_time_limit_reached() )
-        break;
-    }
-  }
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "done in " << t.elapsed() << " seconds." << std::endl;
-#endif
-
-  return moves;
-}
-
-
-  /**
-   * Returns the move for vertex \c v
-   * warning : this function should be called only on moving vertices
-   *           even for frozen vertices, it could return a non-zero vector
-   */
-  Vector_3 compute_move(const Vertex_handle& v);
-
-  /**
-   * Updates mesh using moves of \c moves vector. Updates moving_vertices with
-   * the new set of moving vertices after the move.
-   */
-  void update_mesh(const Moves_vector& moves,
-                   Moving_vertices_set& moving_vertices,
-                   Visitor& visitor);
-
-  /**
-   * Fill sizing field using sizes (avg circumradius) contained in tr_
-   */
-  void fill_sizing_field();
-
-  /**
-   * Returns true if convergence is reached
-   */
-  bool check_convergence() const;
-
-  /**
-   * Returns the average circumradius length of cells incident to \c v
-   */
-  FT average_circumradius_length(const Vertex_handle& v) const;
-
-  /**
-   * Returns the minimum cicumradius length of cells incident to \c v
-   */
-  FT min_circumradius_sq_length(const Vertex_handle& v, const Cell_vector& incident_cells) const;
-
-  /**
-   * Returns the squared circumradius length of cell \c cell
-   */
-  FT sq_circumradius_length(const Cell_handle& cell,
-                            const Vertex_handle& v) const;
-
-  /**
-   * Returns true if time_limit is reached
-   */
-  bool is_time_limit_reached() const
-  {
-    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
-  }
-
-private:
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Functor for compute_moves function
-  template <typename MGO, typename Sizing_field_, typename Moves_vector_,
-            typename CTOP3>
-  class Compute_move
-  {
-    typedef tbb::concurrent_vector<Vertex_handle> Vertex_conc_vector;
-
-    MGO                  & m_mgo;
-    const Sizing_field_  & m_sizing_field;
-    Moves_vector_        & m_moves;
-    bool                   m_do_freeze;
-    Vertex_conc_vector   & m_vertices_not_moving_any_more;
-    const CTOP3          & m_translate;
-
-  public:
-    // Constructor
-    Compute_move(MGO &mgo, 
-                 const Sizing_field_ &sizing_field,
-                 Moves_vector_ &moves,
-                 bool do_freeze,
-                 Vertex_conc_vector & vertices_not_moving_any_more,
-                 const CTOP3 & translate)
-    : m_mgo(mgo),
-      m_sizing_field(sizing_field),
-      m_moves(moves),
-      m_do_freeze(do_freeze),
-      m_vertices_not_moving_any_more(vertices_not_moving_any_more),
-      m_translate(translate)
-    {}
-
-    // Constructor
-    Compute_move(const Compute_move &cm)
-    : m_mgo(cm.m_mgo), 
-      m_sizing_field(cm.m_sizing_field), 
-      m_moves(cm.m_moves),
-      m_do_freeze(cm.m_do_freeze),
-      m_vertices_not_moving_any_more(cm.m_vertices_not_moving_any_more),
-      m_translate(cm.m_translate)
-    {}
-
-    // operator()
-    void operator()(const Vertex_handle& oldv) const
-    {
-      Vector_3 move = m_mgo.compute_move(oldv);
-
-      if ( CGAL::NULL_VECTOR != move )
-      {
-        Point_3 new_position = m_translate(oldv->point(), move);
-        FT size = (MGO::Sizing_field::is_vertex_update_needed ?
-          m_sizing_field(new_position, oldv) : 0);
-        // typedef Triangulation_helpers<typename C3T3::Triangulation> Th;
-        //if( !Th().inside_protecting_balls(tr_, oldv, new_position))
-        //note : this is not happening for Lloyd and ODT so it's commented
-        //       maybe for a new global optimizer it should be de-commented
-        m_moves.push_back(cpp11::make_tuple(oldv, new_position, size));
-      }
-      else // CGAL::NULL_VECTOR == move
-      {
-        if(m_do_freeze)
-        {
-          m_vertices_not_moving_any_more.push_back(oldv);
-        }
-      }
-
-      if ( m_mgo.is_time_limit_reached() )
-        tbb::task::self().cancel_group_execution();
-    }
-  };
-
-  // Functor for fill_sizing_field function
-  template <typename MGO, typename Tr_, typename Local_list_>
-  class Compute_sizing_field_value
-  {
-    MGO                  & m_mgo;
-    Local_list_          & m_local_lists;
-
-  public:
-    // Constructor
-    Compute_sizing_field_value(MGO &mgo, 
-                               Local_list_ & local_lists)
-    : m_mgo(mgo),
-      m_local_lists(local_lists)
-    {}
-
-    // Constructor
-    Compute_sizing_field_value(const Compute_sizing_field_value &csfv)
-    : m_mgo(csfv.m_mgo), 
-      m_local_lists(csfv.m_local_lists)
-    {}
-
-    // operator()
-    void operator()(Vertex& v) const
-    {
-      Vertex_handle vh 
-        = Tr_::Triangulation_data_structure::Vertex_range::s_iterator_to(v);
-      m_local_lists.local().push_back(
-        std::make_pair(v.point(), m_mgo.average_circumradius_length(vh)));
-    }
-  };
-
-  // Functor for update_mesh function
-  template <typename MGO, typename Helper, typename Tr_, typename Moves_vector_,
-            typename Moving_vertices_set_, typename Outdated_cell_set_>
-  class Move_vertex
-  {
-    MGO                                  & m_mgo;
-    const Helper                         & m_helper;
-    const Moves_vector_                  & m_moves;
-    Moving_vertices_set_                 & m_moving_vertices;
-    Outdated_cell_set_                   & m_outdated_cells;
-  
-    typedef typename Tr_::Point            Point_3;
-    typedef typename Tr_::Vertex_handle    Vertex_handle;
-
-  public:
-    // Constructor
-    Move_vertex(MGO &mgo, const Helper &helper, const Moves_vector_ &moves,
-                Moving_vertices_set_ &moving_vertices,
-                Outdated_cell_set_ &outdated_cells)
-    : m_mgo(mgo), m_helper(helper), m_moves(moves), 
-      m_moving_vertices(moving_vertices), m_outdated_cells(outdated_cells)
-    {}
-
-    // Constructor
-    Move_vertex(const Move_vertex &mv)
-    : m_mgo(mv.m_mgo), m_helper(mv.m_helper), m_moves(mv.m_moves),
-      m_moving_vertices(mv.m_moving_vertices),
-      m_outdated_cells(mv.m_outdated_cells)
-    {}
-
-    // operator()
-    void operator()( const tbb::blocked_range<size_t>& r ) const
-    {
-      for( size_t i = r.begin() ; i != r.end() ; ++i)
-      {
-        const Vertex_handle& v = cpp11::get<0>(m_moves[i]);
-        const Point_3& new_position = cpp11::get<1>(m_moves[i]);
-        // Get size at new position
-        if ( MGO::Sizing_field::is_vertex_update_needed )
-        {
-          //FT size = sizing_field_(new_position,v);
-          FT size = cpp11::get<2>(m_moves[i]);
-
-          // Move point
-          bool could_lock_zone;
-          Vertex_handle new_v = m_helper.move_point(
-            v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
-          while (could_lock_zone == false)
-          {
-            new_v = m_helper.move_point(
-              v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
-          }
-
-          // Restore size in meshing_info data
-          new_v->set_meshing_info(size);
-        }
-        else // Move point
-        {
-          bool could_lock_zone;
-          do {
-            m_helper.move_point(
-              v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
-          } while (!could_lock_zone);
-        }
-
-        m_mgo.unlock_all_elements();
-
-        // Stop if time_limit_ is reached, here we can't return without rebuilding
-        // restricted delaunay
-        if ( m_mgo.is_time_limit_reached() )
-        {
-          tbb::task::self().cancel_group_execution();
-          break;
-        }
-      }
-    }
-  };
-#endif // CGAL_LINKED_WITH_TBB
-
-  // -----------------------------------
-  // Private data
-  // -----------------------------------
-  C3T3& c3t3_;
-  Tr& tr_;
-  const MeshDomain& domain_;
-  FT sq_freeze_ratio_;
-  FT convergence_ratio_;
-  C3T3_helpers helper_;
-  MoveFunction move_function_;
-  Sizing_field sizing_field_;
-  double time_limit_;
-  CGAL::Timer running_time_;
-
-  bool do_freeze_;
-  mutable Nb_frozen_points_type nb_frozen_points_;
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  mutable FT sum_moves_;
-#endif
-};
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-Mesh_global_optimizer(C3T3& c3t3,
-                      const Md& domain,
-                      const FT& freeze_ratio,
-                      const bool do_freeze,
-                      const FT& convergence_ratio,
-                      const Mf move_function)
-: Base(c3t3.bbox(),
-       Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
-, c3t3_(c3t3)
-, tr_(c3t3_.triangulation())
-, domain_(domain)
-, sq_freeze_ratio_(freeze_ratio*freeze_ratio)
-, convergence_ratio_(convergence_ratio)
-, helper_(c3t3_,domain_, get_lock_data_structure())
-, move_function_(move_function)
-, sizing_field_(c3t3.triangulation())
-, time_limit_(-1)
-, running_time_()
-
-, do_freeze_(do_freeze)
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-, sum_moves_(0)
-#endif // CGAL_MESH_3_OPTIMIZER_VERBOSE
-{
-  nb_frozen_points_ = 0; // We put it here in case it's an "atomic"
-
-  // If we're multi-thread
-  tr_.set_lock_data_structure(get_lock_data_structure());
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  std::cerr << "Fill sizing field...";
-  CGAL::Timer timer;
-  timer.start();
-#endif
-
-  fill_sizing_field();
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  std::cerr << "done (" << timer.time() << "s)\n";
-#endif
-}
-
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-Mesh_optimization_return_code
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-operator()(int nb_iterations, Visitor visitor)
-{
-  running_time_.reset();
-  running_time_.start();
-
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-  // Fill set containing moving vertices
-  // first, take them all
-#ifdef  CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
-  typedef CGAL::Prevent_deref<typename Tr::Finite_vertices_iterator> It;
-  Moving_vertices_set moving_vertices(It(tr_.finite_vertices_begin()),
-                                      It(tr_.finite_vertices_end()));
-#else
-  Moving_vertices_set moving_vertices;
-  collect_all_vertices(moving_vertices);
-#endif
-
-  std::size_t initial_vertices_nb = moving_vertices.size();
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  double step_begin = running_time_.time();
-  std::cerr << "Running " << Mf::name() << "-smoothing ("
-    << initial_vertices_nb << " vertices)" << std::endl;
-#endif //CGAL_MESH_3_OPTIMIZER_VERBOSE
-
-  // Initialize big moves (stores the largest moves)
-  this->clear_big_moves();
-  big_moves_size_ =
-    (std::max)(std::size_t(1), std::size_t(moving_vertices.size()/500));
-
-  std::size_t nb_vertices_moved = -1;
-  bool convergence_stop = false;
-
-  // Iterate
-  int i = -1;
-  while ( ++i < nb_iterations && ! is_time_limit_reached() )
-  {
-    if(!do_freeze_)
-      nb_frozen_points_ = 0;
-    else
-      nb_vertices_moved = moving_vertices.size();
-
-    // Compute move for each vertex
-    Moves_vector moves = compute_moves(moving_vertices);
-    visitor.after_compute_moves();
-
-    //Pb with Freeze : sometimes a few vertices continue moving indefinitely
-    //if the nb of moving vertices is < 1% of total nb AND does not decrease
-    if(do_freeze_
-      && nb_vertices_moved < 0.005 * initial_vertices_nb
-      && nb_vertices_moved == moving_vertices.size())
-    {
-      // we should stop because we are
-      // probably entering an infinite instable loop
-      convergence_stop = true;
-      break;
-    }
-
-    // Stop if time_limit is reached
-    if ( is_time_limit_reached() )
-      break;
-
-    // Update mesh with those moves
-    update_mesh(moves, moving_vertices, visitor);
-    visitor.end_of_iteration(i);
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-    std::size_t moving_vertices_size = moving_vertices.size();
-    std::cerr << boost::format("\r             \r"
-      "end iter.%1%, %2% / %3%, last step:%4$.2fs, step avg:%5$.2fs, avg big moves:%6$.3f ")
-    % (i+1)
-    % moving_vertices_size
-    % initial_vertices_nb
-    % (running_time_.time() - step_begin)
-    % (running_time_.time() / (i+1))
-    % sum_moves_
-    << std::endl;
-    step_begin = running_time_.time();
-#endif
-
-    if (do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
-      break;
-
-    if(check_convergence())
-      break;
-  }
-  running_time_.stop();
-
-#ifdef CGAL_MESH_3_PROFILING
-  double optim_time = t.elapsed();
-# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
-  CGAL_MESH_3_SET_PERFORMANCE_DATA(std::string(Mf::name()) + "_optim_time", optim_time);
-# endif
-#endif
-
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  if ( do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
-    std::cerr << "All vertices frozen" << std::endl;
-  else if ( do_freeze_ && convergence_stop )
-    std::cerr << "Can't improve anymore" << std::endl;
-  else if ( is_time_limit_reached() )
-    std::cerr << "Time limit reached" << std::endl;
-  else if ( check_convergence() )
-    std::cerr << "Convergence reached" << std::endl;
-  else if( i >= nb_iterations )
-    std::cerr << "Max iteration number reached" << std::endl;
-
-  std::cerr << "Total optimization time: " << running_time_.time()
-            << "s" << std::endl << std::endl;
-#endif
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << std::endl << "Total optimization 'wall-clock' time: "
-            << optim_time << "s" << std::endl;
-#endif
-
-  if ( do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
-    return ALL_VERTICES_FROZEN;
-
-  else if ( do_freeze_ && convergence_stop )
-    return CANT_IMPROVE_ANYMORE;
-
-  else if ( is_time_limit_reached() )
-    return TIME_LIMIT_REACHED;
-
-  else if ( check_convergence() )
-    return CONVERGENCE_REACHED;
-
-  return MAX_ITERATION_NUMBER_REACHED;
-}
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-void
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-collect_all_vertices(Moving_vertices_set& moving_vertices)
-{
-  typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
-  for(; vit != tr_.finite_vertices_end(); ++vit )
-    moving_vertices.insert(vit);
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::Vector_3
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-compute_move(const Vertex_handle& v)
-{
-  typename Gt::Compute_squared_length_3 sq_length =
-    Gt().compute_squared_length_3_object();
-
-  typename Gt::Construct_vector_3 vector =
-    Gt().construct_vector_3_object();
-
-  typename Gt::Construct_translated_point_3 translate =
-    Gt().construct_translated_point_3_object();
-
-  Cell_vector incident_cells;
-  incident_cells.reserve(64);
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells));
-  }
-  else
-#endif //CGAL_LINKED_WITH_TBB
-  {
-    tr_.incident_cells(v, std::back_inserter(incident_cells));
-  }
-
-  // Get move from move function
-  Vector_3 move = move_function_(v, incident_cells, c3t3_, sizing_field_);
-
-  // Project surface vertex
-  if ( c3t3_.in_dimension(v) == 2 )
-  {
-    Point_3 new_position = translate(v->point(),move);
-    move = vector(v->point(), helper_.project_on_surface(new_position,v));
-  }
-
-  FT local_sq_size = min_circumradius_sq_length(v, incident_cells);
-  if ( FT(0) == local_sq_size )
-    return CGAL::NULL_VECTOR;
-
-  FT local_move_sq_ratio = sq_length(move) / local_sq_size;
-
-  // Move point only if displacement is big enough w.r.t local size
-  if ( local_move_sq_ratio < sq_freeze_ratio_ )
-  {
-    nb_frozen_points_++;
-    return CGAL::NULL_VECTOR;
-  }
-
-  // Update big moves
-  this->update_big_moves(local_move_sq_ratio);
-
-  return move;
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-void
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-update_mesh(const Moves_vector& moves,
-            Moving_vertices_set& moving_vertices,
-            Visitor& visitor)
-{
-  // Cells which have to be updated
-  Outdated_cell_set outdated_cells;
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Moving vertices...";
-  WallClockTimer t;
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    // Apply moves in triangulation
-    tbb::parallel_for(tbb::blocked_range<size_t>(0, moves.size()),
-      Move_vertex<
-        Self, C3T3_helpers, Tr, Moves_vector,
-        Moving_vertices_set, Outdated_cell_set>(
-          *this, helper_, moves, moving_vertices, outdated_cells)
-    );
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-    // Apply moves in triangulation
-    for ( typename Moves_vector::const_iterator it = moves.begin() ;
-         it != moves.end() ;
-         ++it )
-    {
-      const Vertex_handle& v = cpp11::get<0>(*it);
-      const Point_3& new_position = cpp11::get<1>(*it);
-      // Get size at new position
-      if ( Sizing_field::is_vertex_update_needed )
-      {
-        //FT size = sizing_field_(new_position,v);
-        FT size = cpp11::get<2>(*it);
-
-        // Move point
-        Vertex_handle new_v = helper_.move_point(v, new_position, outdated_cells, moving_vertices);
-
-        // Restore size in meshing_info data
-        new_v->set_meshing_info(size);
-      }
-      else // Move point
-      {
-        helper_.move_point(v, new_position, outdated_cells, moving_vertices);
-      }
-
-      // Stop if time_limit_ is reached, here we can't return without rebuilding
-      // restricted delaunay
-      if ( is_time_limit_reached() )
-        break;
-    }
-  }
-
-
-  visitor.after_move_points();
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "done in " << t.elapsed() << " seconds." << std::endl;
-#endif
-
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Updating C3T3 (rebuilding restricted Delaunay)...";
-  t.reset();
-#endif
-
-  // Update c3t3
-#ifdef CGAL_INTRUSIVE_LIST
-  // AF:  rebuild_restricted_delaunay does more cell insertion/removal
-  //      which clashes with our inplace list
-  //      That's why we hand it in, and call clear() when we no longer need it
-  helper_.rebuild_restricted_delaunay(outdated_cells,
-                                      moving_vertices);
-#else
-  helper_.rebuild_restricted_delaunay(outdated_cells.begin(),
-                                      outdated_cells.end(),
-                                      moving_vertices);
-#endif
-
-  visitor.after_rebuild_restricted_delaunay();
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Updating C3T3 done in " << t.elapsed() << " seconds." << std::endl;
-#endif
-
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-void
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-fill_sizing_field()
-{
-  std::map<Point_3,FT> value_map;
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    typedef tbb::enumerable_thread_specific<
-      std::vector< std::pair<Point_3, FT> > > Local_list;
-    Local_list local_lists;
-
-    tbb::parallel_do(
-      tr_.finite_vertices_begin(), tr_.finite_vertices_end(),
-      Compute_sizing_field_value<Self, Tr, Local_list>(*this, local_lists)
-    );
-
-    for(typename Local_list::iterator it_list = local_lists.begin() ;
-          it_list != local_lists.end() ;
-          ++it_list )
-    {
-      value_map.insert(it_list->begin(), it_list->end());
-    }
-  }
-  else
-#endif //CGAL_LINKED_WITH_TBB
-  {
-    // Fill map with local size
-    for(typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
-        vit != tr_.finite_vertices_end();
-        ++vit)
-    {
-      value_map.insert(std::make_pair(vit->point(),
-                                      average_circumradius_length(vit)));
-    }
-  }
-
-  // fill sizing field
-  sizing_field_.fill(value_map);
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-bool
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-check_convergence() const
-{
-  namespace bl = boost::lambda;
-
-  FT sum(0);
-  for( typename std::multiset<FT>::const_iterator
-       it = big_moves_.begin(), end = big_moves_.end() ; it != end ; ++it )
-  {
-    sum += CGAL::sqrt(*it);
-  }
-
-  FT average_move = sum/big_moves_size_;/*even if set is not full, divide*/
-       /*by max size so that if only 1 point moves, it goes to 0*/
-#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
-  sum_moves_ = average_move;
-#endif
-
-  return ( average_move < convergence_ratio_ );
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-average_circumradius_length(const Vertex_handle& v) const
-{
-  Cell_vector incident_cells;
-  incident_cells.reserve(64);
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells));
-  }
-  else
-#endif //CGAL_LINKED_WITH_TBB
-  {
-    tr_.incident_cells(v, std::back_inserter(incident_cells));
-  }
-
-  FT sum_len (0);
-  unsigned int nb = 0;
-
-  for ( typename Cell_vector::iterator cit = incident_cells.begin() ;
-       cit != incident_cells.end() ;
-       ++cit)
-  {
-    if ( c3t3_.is_in_complex(*cit) )
-    {
-      sum_len += CGAL::sqrt(sq_circumradius_length(*cit,v));
-      ++nb;
-    }
-  }
-
-  // nb == 0 could happen if there is an isolated point.
-  if ( 0 != nb )
-  {
-    return sum_len/nb;
-  }
-  else
-  {
-    // Use outside cells to compute size of point
-    for ( typename Cell_vector::iterator cit = incident_cells.begin() ;
-         cit != incident_cells.end() ;
-         ++cit)
-    {
-      if ( !tr_.is_infinite(*cit) )
-      {
-        sum_len += CGAL::sqrt(sq_circumradius_length(*cit,v));
-        ++nb;
-      }
-    }
-
-    CGAL_assertion(nb!=0);
-    CGAL_assertion(sum_len!=0);
-    return sum_len/nb;
-  }
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-min_circumradius_sq_length(const Vertex_handle& v, const Cell_vector& incident_cells) const
-{
-  // Get first cell sq_circumradius_length
-  typename Cell_vector::const_iterator cit = incident_cells.begin();
-  while ( incident_cells.end() != cit && !c3t3_.is_in_complex(*cit) ) { ++cit; }
-
-  // if vertex is isolated ...
-  if ( incident_cells.end() == cit )
-    return FT(0);
-
-  // Initialize min
-  FT min_sq_len = sq_circumradius_length(*cit++,v);
-
-  // Find the minimum value
-  for ( ; cit != incident_cells.end() ; ++cit )
-  {
-    if ( !c3t3_.is_in_complex(*cit) )
-      continue;
-
-    min_sq_len = (std::min)(min_sq_len,sq_circumradius_length(*cit,v));
-  }
-
-  return min_sq_len;
-}
-
-
-template <typename C3T3, typename Md, typename Mf, typename V_>
-typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
-Mesh_global_optimizer<C3T3,Md,Mf,V_>::
-sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const
-{
-  typename Gt::Compute_squared_distance_3 sq_distance =
-    Gt().compute_squared_distance_3_object();
-
-  const Point_3 circumcenter = tr_.dual(cell);
-  return ( sq_distance(v->point(), circumcenter) );
-}
-
-} // end namespace Mesh_3
-
-} //namespace CGAL
-
-#endif // CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_3.h
deleted file mode 100644
index cea06d3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_3.h
+++ /dev/null
@@ -1,711 +0,0 @@
-// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau, Stephane Tayeb, Clement Jamin
-//
-//******************************************************************************
-// File Description :
-// Implements a mesher_3 with two mesher levels : one for facets and one for
-// tets.
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_MESHER_3_H
-#define CGAL_MESH_3_MESHER_3_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Mesh_3/Dump_c3t3.h>
-
-#include<CGAL/Mesh_3/Refine_facets_3.h>
-#include<CGAL/Mesh_3/Refine_cells_3.h>
-#include <CGAL/Mesh_3/Refine_tets_visitor.h>
-#include <CGAL/Mesher_level_visitors.h>
-#include <CGAL/Kernel_traits.h>
-
-#ifdef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
-#include <CGAL/Surface_mesher/Surface_mesher_visitor.h>
-#endif
-
-#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
-#include <CGAL/Timer.h>
-
-#ifdef CGAL_MESH_3_PROFILING
-  #include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-#  if TBB_IMPLEMENT_CPP0X
-#   include <tbb/compat/thread>
-#  else
-#   include <thread>
-#  endif
-#endif
-
-#include <boost/format.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <string>
-
-namespace CGAL {
-namespace Mesh_3 {
-
-/************************************************
-// Class Mesher_3_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Tr, typename Concurrency_tag>
-class Mesher_3_base
-{
-protected:
-  typedef typename Tr::Lock_data_structure Lock_data_structure;
-
-  Mesher_3_base(const Bbox_3 &, int) {}
-
-  Lock_data_structure *get_lock_data_structure() { return 0; }
-  WorksharingDataStructureType *get_worksharing_data_structure() { return 0; }
-  void set_bbox(const Bbox_3 &) {}
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Tr>
-class Mesher_3_base<Tr, Parallel_tag>
-{
-protected:
-  typedef typename Tr::Lock_data_structure Lock_data_structure;
-
-  Mesher_3_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
-  : m_lock_ds(bbox, num_grid_cells_per_axis),
-    m_worksharing_ds(bbox)
-  {}
-
-  Lock_data_structure *get_lock_data_structure()
-  {
-    return &m_lock_ds;
-  }
-  WorksharingDataStructureType *get_worksharing_data_structure()
-  {
-    return &m_worksharing_ds;
-  }
-
-  void set_bbox(const Bbox_3 &bbox)
-  {
-    m_lock_ds.set_bbox(bbox);
-    m_worksharing_ds.set_bbox(bbox);
-  }
-
-  /// Lock data structure
-  Lock_data_structure m_lock_ds;
-  /// Worksharing data structure
-  WorksharingDataStructureType m_worksharing_ds;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-
-/************************************************
- *
- * Mesher_3 class
- *
- ************************************************/
-
-template<class C3T3, class MeshCriteria, class MeshDomain>
-class Mesher_3
-: public Mesher_3_base<
-    typename C3T3::Triangulation,
-#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
-    Sequential_tag
-#else
-    typename C3T3::Concurrency_tag
-#endif
-  >
-{
-public:
-#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
-  typedef Sequential_tag                            Concurrency_tag;
-#else
-  typedef typename C3T3::Concurrency_tag            Concurrency_tag;
-#endif
-  typedef typename C3T3::Triangulation              Triangulation;
-  typedef typename Triangulation::Point             Point;
-  typedef typename Kernel_traits<Point>::Kernel     Kernel;
-  typedef typename Kernel::Vector_3                 Vector;
-  typedef typename MeshDomain::Index                Index;
-
-  // Self
-  typedef Mesher_3<C3T3, MeshCriteria, MeshDomain>      Self;
-#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
-  typedef Mesher_3_base<Triangulation, Sequential_tag> Base;
-#else
-  typedef Mesher_3_base<Triangulation, typename C3T3::Concurrency_tag> Base;
-#endif
-
-  using Base::get_lock_data_structure;
-
-  //-------------------------------------------------------
-  // Mesher_levels
-  //-------------------------------------------------------
-  /// Facets mesher level
-  typedef Refine_facets_3<
-      Triangulation,
-      typename MeshCriteria::Facet_criteria,
-      MeshDomain,
-      C3T3,
-      Null_mesher_level,
-      Concurrency_tag>                              Facets_level;
-
-  /// Cells mesher level
-  typedef Refine_cells_3<
-      Triangulation,
-      typename MeshCriteria::Cell_criteria,
-      MeshDomain,
-      C3T3,
-      Facets_level,
-      Concurrency_tag>                              Cells_level;
-
-  //-------------------------------------------------------
-  // Visitors
-  //-------------------------------------------------------
-  /// Facets visitor : to update cells when refining surface
-  typedef tets::Refine_facets_visitor<
-      Triangulation,
-      Cells_level,
-      Null_mesh_visitor>                            Facets_visitor;
-
-#ifndef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
-  /// Cells visitor : it just need to know previous level
-  typedef Null_mesh_visitor_level<Facets_visitor>   Cells_visitor;
-#else
-  /// Cells visitor : to update surface (restore restricted Delaunay)
-  /// when refining cells
-  typedef Surface_mesher::Visitor<
-      Triangulation,
-      Facets_level,
-      Facets_visitor>                               Cells_visitor;
-#endif
-
-  /// Constructor
-  Mesher_3(C3T3&               c3t3,
-           const MeshDomain&   domain,
-           const MeshCriteria& criteria);
-
-  /// Destructor
-  ~Mesher_3() 
-  {
-    // The lock data structure is going to be destroyed
-    r_c3t3_.triangulation().set_lock_data_structure(NULL);
-  }
-
-  /// Launch mesh refinement
-  double refine_mesh(std::string dump_after_refine_surface_prefix = "");
-
-  /// Debug
-  std::string debug_info() const;
-  std::string debug_info_header() const;
-
-  // Step-by-step methods
-  void initialize();
-  void fix_c3t3();
-  void display_number_of_bad_elements();
-  void one_step();
-  bool is_algorithm_done();
-
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-  struct Mesher_status
-  {
-    std::size_t vertices, facet_queue, cells_queue;
-
-    Mesher_status(std::size_t v, std::size_t f, std::size_t c)
-     : vertices(v), facet_queue(f), cells_queue(c) {}
-  };
-
-  Mesher_status status() const;
-#endif
-
-private:
-  void remove_cells_from_c3t3();
-
-private:
-  /// The oracle
-  const MeshDomain& r_oracle_;
-
-  /// Meshers
-  Null_mesher_level null_mesher_;
-  Facets_level facets_mesher_;
-  Cells_level cells_mesher_;
-
-  /// Visitors
-  Null_mesh_visitor null_visitor_;
-  Facets_visitor facets_visitor_;
-  Cells_visitor cells_visitor_;
-
-  /// The container of the resulting mesh
-  C3T3& r_c3t3_;
-
-private:
-  // Disabled copy constructor
-  Mesher_3(const Self& src);
-  // Disabled assignment operator
-  Self& operator=(const Self& src);
-
-};  // end class Mesher_3
-
-
-
-template<class C3T3, class MC, class MD>
-Mesher_3<C3T3,MC,MD>::Mesher_3(C3T3& c3t3,
-                               const MD& domain,
-                               const MC& criteria)
-: Base(c3t3.bbox(),
-       Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
-, r_oracle_(domain)
-, null_mesher_()
-, facets_mesher_(c3t3.triangulation(),
-                 criteria.facet_criteria_object(),
-                 domain,
-                 null_mesher_,
-                 c3t3)
-, cells_mesher_(c3t3.triangulation(),
-                criteria.cell_criteria_object(),
-                domain,
-                facets_mesher_,
-                c3t3)
-, null_visitor_()
-, facets_visitor_(&cells_mesher_, &null_visitor_)
-#ifndef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
-, cells_visitor_(facets_visitor_)
-#else
-, cells_visitor_(&facets_mesher_, &facets_visitor_)
-#endif
-, r_c3t3_(c3t3)
-{
-  facets_mesher_.set_lock_ds(this->get_lock_data_structure());
-  facets_mesher_.set_worksharing_ds(this->get_worksharing_data_structure());
-  cells_mesher_.set_lock_ds(this->get_lock_data_structure());
-  cells_mesher_.set_worksharing_ds(this->get_worksharing_data_structure());
-}
-
-
-
-template<class C3T3, class MC, class MD>
-double
-Mesher_3<C3T3,MC,MD>::refine_mesh(std::string dump_after_refine_surface_prefix)
-{
-  CGAL::Timer timer;
-  timer.start();
-  double elapsed_time = 0.;
-
-  // First surface mesh could modify c3t3 without notifying cells_mesher
-  // So we have to ensure that no old cell will be left in c3t3
-  remove_cells_from_c3t3();
-
-#ifndef CGAL_MESH_3_VERBOSE
-  // Scan surface and refine it
-  initialize();
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Refining facets..." << std::endl;
-  WallClockTimer t;
-#endif
-  facets_mesher_.refine(facets_visitor_);
-#ifdef CGAL_MESH_3_PROFILING
-  double facet_ref_time = t.elapsed();
-  std::cerr << "==== Facet refinement: " << facet_ref_time << " seconds ===="
-            << std::endl << std::endl;
-# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
-    // If it's parallel but the refinement is forced to sequential, we don't
-    // output the value
-#   ifndef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
-  CGAL_MESH_3_SET_PERFORMANCE_DATA("Facets_time", facet_ref_time);
-#   endif
-# endif
-#endif
-
-#if defined(CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END)
-  std::cerr << std::endl
-    << "===============================================================" << std::endl
-    << "=== CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END ===" << std::endl;
-  display_number_of_bad_elements();
-  std::cerr
-    << "==============================================================="
-    << std::endl << std::endl;
-#endif
-
-  // Then activate facet to surface visitor (surface could be
-  // refined again if it is encroached)
-  facets_visitor_.activate();
-
-  dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix);
-
-  // Then scan volume and refine it
-  cells_mesher_.scan_triangulation();
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Refining cells..." << std::endl;
-  t.reset();
-#endif
-  cells_mesher_.refine(cells_visitor_);
-#ifdef CGAL_MESH_3_PROFILING
-  double cell_ref_time = t.elapsed();
-  std::cerr << "==== Cell refinement: " << cell_ref_time << " seconds ===="
-            << std::endl << std::endl;
-# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
-    // If it's parallel but the refinement is forced to sequential, we don't
-    // output the value
-#   ifndef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
-  CGAL_MESH_3_SET_PERFORMANCE_DATA("Cells_refin_time", cell_ref_time);
-#   endif
-# endif
-#endif
-
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-  std::cerr
-    << "Vertices: " << r_c3t3_.triangulation().number_of_vertices() << std::endl
-    << "Facets  : " << r_c3t3_.number_of_facets_in_complex() << std::endl
-    << "Tets    : " << r_c3t3_.number_of_cells_in_complex() << std::endl;
-#endif
-
-#else // ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "Start surface scan...";
-  initialize();
-  std::cerr << "end scan. [Bad facets:" << facets_mesher_.size() << "]";
-  std::cerr << std::endl << std::endl;
-  elapsed_time += timer.time();
-  timer.stop(); timer.reset(); timer.start();
-
-  const Triangulation& r_tr = r_c3t3_.triangulation();
-  int nbsteps = 0;
-
-  std::cerr << "Refining Surface...\n";
-  std::cerr << "Legend of the following line: "
-            << "(#vertices,#steps," << cells_mesher_.debug_info_header()
-            << ")\n";
-
-  std::cerr << "(" << r_tr.number_of_vertices() << ","
-            << nbsteps << "," << cells_mesher_.debug_info() << ")";
-
-  while ( ! facets_mesher_.is_algorithm_done() )
-  {
-    facets_mesher_.one_step(facets_visitor_);
-    std::cerr
-    << boost::format("\r             \r"
-                     "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
-    % r_tr.number_of_vertices()
-    % nbsteps % cells_mesher_.debug_info()
-    % (nbsteps / timer.time());
-    ++nbsteps;
-  }
-  std::cerr << std::endl;
-  std::cerr << "Total refining surface time: " << timer.time() << "s" << std::endl;
-  std::cerr << std::endl;
-
-  elapsed_time += timer.time();
-  timer.stop(); timer.reset(); timer.start();
-  nbsteps = 0;
-
-  facets_visitor_.activate();
-  dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix);
-  std::cerr << "Start volume scan...";
-  cells_mesher_.scan_triangulation();
-  std::cerr << "end scan. [Bad tets:" << cells_mesher_.size() << "]";
-  std::cerr << std::endl << std::endl;
-  elapsed_time += timer.time();
-  timer.stop(); timer.reset(); timer.start();
-
-  std::cerr << "Refining...\n";
-  std::cerr << "Legend of the following line: "
-            << "(#vertices,#steps," << cells_mesher_.debug_info_header()
-            << ")\n";
-  std::cerr << "(" << r_tr.number_of_vertices() << ","
-            << nbsteps << "," << cells_mesher_.debug_info() << ")";
-
-  while ( ! cells_mesher_.is_algorithm_done() )
-  {
-    cells_mesher_.one_step(cells_visitor_);
-    std::cerr
-        << boost::format("\r             \r"
-                     "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
-        % r_tr.number_of_vertices()
-        % nbsteps % cells_mesher_.debug_info()
-        % (nbsteps / timer.time());
-    ++nbsteps;
-  }
-  std::cerr << std::endl;
-
-  std::cerr << "Total refining volume time: " << timer.time() << "s" << std::endl;
-  std::cerr << "Total refining time: " << timer.time()+elapsed_time << "s" << std::endl;
-  std::cerr << std::endl;
-#endif
-
-  timer.stop();
-  elapsed_time += timer.time();
-
-#if defined(CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END) \
- || defined(SHOW_REMAINING_BAD_ELEMENT_IN_RED)
-  std::cerr << std::endl
-    << "===============================================================" << std::endl
-    << "=== CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END ===" << std::endl;
-  display_number_of_bad_elements();
-  std::cerr
-    << "==============================================================="
-    << std::endl << std::endl;
-#endif
-
-  return elapsed_time;
-}
-
-
-template<class C3T3, class MC, class MD>
-void
-Mesher_3<C3T3,MC,MD>::
-initialize()
-{
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Initializing... ";
-  WallClockTimer t;
-#endif
-  //=====================================
-  // Bounding box estimation
-  //=====================================
-  typedef std::vector<std::pair<Point, Index> > Points_vector;
-  Points_vector random_points_on_surface;
-  r_oracle_.construct_initial_points_object()(
-    std::back_inserter(random_points_on_surface), 1000);
-  typename Points_vector::const_iterator
-    it = random_points_on_surface.begin(),
-    it_end = random_points_on_surface.end();
-  Bbox_3 estimated_bbox = it->first.bbox();
-  ++it;
-  for( ; it != it_end ; ++it)
-    estimated_bbox = estimated_bbox + it->first.bbox();
-
-  Base::set_bbox(estimated_bbox);
-
-  //========================================
-  // Initialization: parallel or sequential
-  //========================================
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    // we're not multi-thread, yet
-    r_c3t3_.triangulation().set_lock_data_structure(0);
-
-# ifndef CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-
-    if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0)
-    {
-      const Bbox_3 &bbox = estimated_bbox;
-
-      // Compute radius for far sphere
-      const double xdelta = bbox.xmax()-bbox.xmin();
-      const double ydelta = bbox.ymax()-bbox.ymin();
-      const double zdelta = bbox.zmax()-bbox.zmin();
-      const double radius = 5. * std::sqrt(xdelta*xdelta +
-                                           ydelta*ydelta +
-                                           zdelta*zdelta);
-      const Vector center(
-        bbox.xmin() + 0.5*xdelta,
-        bbox.ymin() + 0.5*ydelta,
-        bbox.zmin() + 0.5*zdelta);
-#  ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
-      std::cerr << "Adding points on a far sphere (radius = " << radius <<")...";
-#  endif
-      Random_points_on_sphere_3<Point> random_point(radius);
-      const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
-        tbb::task_scheduler_init::default_num_threads()
-        * Concurrent_mesher_config::get().num_pseudo_infinite_vertices_per_core);
-      for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
-        r_c3t3_.add_far_point(*random_point + center);
-    
-#  ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
-      std::cerr << "done." << std::endl;
-#  endif
-    }
-# endif // CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-
-#ifdef CGAL_MESH_3_PROFILING
-    double init_time = t.elapsed();
-    std::cerr << "done in " << init_time << " seconds." << std::endl;
-#endif
-
-    // Scan triangulation
-    facets_mesher_.scan_triangulation();
-
-    // From now on, we're multi-thread
-    r_c3t3_.triangulation().set_lock_data_structure(get_lock_data_structure());
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-#ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-    if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0)
-    {
-      /*std::cerr << "A little bit of refinement... ";
-
-      // Start by a little bit of refinement to get a coarse mesh
-      // => Good approx of bounding box
-      const int NUM_VERTICES_OF_COARSE_MESH = 40;
-      facets_mesher_.refine_sequentially_up_to_N_vertices(
-        facets_visitor_, NUM_VERTICES_OF_COARSE_MESH);
-
-      std::cerr << "done." << std::endl;
-      std::cerr
-        << "Vertices: " << r_c3t3_.triangulation().number_of_vertices() << std::endl
-        << "Facets  : " << r_c3t3_.number_of_facets_in_complex() << std::endl
-        << "Tets    : " << r_c3t3_.number_of_cells_in_complex() << std::endl;*/
-
-      // Compute radius for far sphere
-      //const Bbox_3 &bbox = r_c3t3_.bbox();
-      const Bbox_3 &bbox = estimated_bbox;
-      const double xdelta = bbox.xmax()-bbox.xmin();
-      const double ydelta = bbox.ymax()-bbox.ymin();
-      const double zdelta = bbox.zmax()-bbox.zmin();
-      const double radius = 5. * std::sqrt(xdelta*xdelta +
-                                           ydelta*ydelta +
-                                           zdelta*zdelta);
-      const Vector center(
-        bbox.xmin() + 0.5*xdelta,
-        bbox.ymin() + 0.5*ydelta,
-        bbox.zmin() + 0.5*zdelta);
-# ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << "Adding points on a far sphere (radius = " << radius << ")...";
-# endif
-      Random_points_on_sphere_3<Point> random_point(radius);
-      const int NUM_PSEUDO_INFINITE_VERTICES = 12*2;
-      for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
-        r_c3t3_.add_far_point(*random_point + center);
-# ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << "done." << std::endl;
-# endif
-    }
-#endif // CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-
-#ifdef CGAL_MESH_3_PROFILING
-    double init_time = t.elapsed();
-    std::cerr << "done in " << init_time << " seconds." << std::endl;
-#endif
-
-    // Scan triangulation
-    facets_mesher_.scan_triangulation();
-
-  }
-}
-
-
-template<class C3T3, class MC, class MD>
-void
-Mesher_3<C3T3,MC,MD>::
-fix_c3t3()
-{
-  if ( ! facets_visitor_.is_active() )
-  {
-    cells_mesher_.scan_triangulation();
-  }
-}
-
-
-template<class C3T3, class MC, class MD>
-void
-Mesher_3<C3T3,MC,MD>::
-display_number_of_bad_elements()
-{
-  int nf = facets_mesher_.number_of_bad_elements();
-  int nc = cells_mesher_.number_of_bad_elements();
-  std::cerr << "Bad facets: " << nf << " - Bad cells: " << nc << std::endl;
-}
-
-template<class C3T3, class MC, class MD>
-void
-Mesher_3<C3T3,MC,MD>::
-one_step()
-{
-  if ( ! facets_visitor_.is_active() )
-  {
-    facets_mesher_.one_step(facets_visitor_);
-
-    if ( facets_mesher_.is_algorithm_done() )
-    {
-      facets_visitor_.activate();
-      cells_mesher_.scan_triangulation();
-    }
-  }
-  else
-  {
-    cells_mesher_.one_step(cells_visitor_);
-  }
-}
-
-template<class C3T3, class MC, class MD>
-bool
-Mesher_3<C3T3,MC,MD>::
-is_algorithm_done()
-{
-  return cells_mesher_.is_algorithm_done();
-}
-
-
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-template<class C3T3, class MC, class MD>
-typename Mesher_3<C3T3,MC,MD>::Mesher_status
-Mesher_3<C3T3,MC,MD>::
-status() const
-{
-  return Mesher_status(r_c3t3_.triangulation().number_of_vertices(),
-                       facets_mesher_.queue_size(),
-                       cells_mesher_.queue_size());
-}
-#endif
-
-
-template<class C3T3, class MC, class MD>
-void
-Mesher_3<C3T3,MC,MD>::
-remove_cells_from_c3t3()
-{
-  for ( typename C3T3::Triangulation::Finite_cells_iterator
-    cit = r_c3t3_.triangulation().finite_cells_begin(),
-    end = r_c3t3_.triangulation().finite_cells_end() ; cit != end ; ++cit )
-  {
-    r_c3t3_.remove_from_complex(cit);
-  }
-}
-
-template<class C3T3, class MC, class MD>
-inline
-std::string
-Mesher_3<C3T3,MC,MD>::debug_info() const
-{
-  return cells_mesher_.debug_info();
-}
-
-template<class C3T3, class MC, class MD>
-inline
-std::string
-Mesher_3<C3T3,MC,MD>::debug_info_header() const
-{
-  return cells_mesher_.debug_info_header();
-}
-
-}  // end namespace Mesh_3
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_MESH_3_MESHER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_level.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_level.h
deleted file mode 100644
index 509be7a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_level.h
+++ /dev/null
@@ -1,1214 +0,0 @@
-// Copyright (c) 2004-2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent RINEAU, Clement JAMIN
-
-#ifndef CGAL_MESH_3_MESHER_LEVEL_H
-#define CGAL_MESH_3_MESHER_LEVEL_H
-
-#include <string>
-
-#ifdef CGAL_MESH_3_PROFILING
-  #include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#include <CGAL/Mesh_3/Worksharing_data_structures.h>
-
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-# define CGAL_PROFILE
-# include <CGAL/Profile_counter.h>
-#endif
-
-#include <algorithm>
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/task.h>
-# include <tbb/tbb.h>
-#endif
-
-#include <string>
-
-namespace CGAL { namespace Mesh_3 {
-
-enum Mesher_level_conflict_status {
-  NO_CONFLICT = 0
-  , CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
-  , CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
-  , THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE
-  , ELEMENT_WAS_A_ZOMBIE
-  , COULD_NOT_LOCK_ZONE
-  , COULD_NOT_LOCK_ELEMENT
-};
-
-/************************************************
- *
- * Null_mesher_level class
- *
- ************************************************/
-
-struct Null_mesher_level {
-
-  template <typename Visitor>
-  void refine(Visitor) {}
-
-  // For sequential version
-  template <typename P, typename Z>
-  Mesher_level_conflict_status test_point_conflict_from_superior(P, Z)
-  {
-    return NO_CONFLICT;
-  }
-  // For parallel version
-  template <typename P, typename Z, typename MV>
-  Mesher_level_conflict_status test_point_conflict_from_superior(P, Z, MV &)
-  {
-    return NO_CONFLICT;
-  }
-
-  bool is_algorithm_done() const
-  {
-    return true;
-  }
-
-  template <typename Visitor>
-  bool try_to_insert_one_point(Visitor)
-  {
-    return false;
-  }
-
-  template <typename Visitor>
-  bool one_step(Visitor)
-  {
-    return false;
-  }
-
-  //==============================================
-  // For parallel version
-  void add_to_TLS_lists(bool) {}
-  void splice_local_lists() {}
-  template <typename Mesh_visitor>
-  void before_next_element_refinement_in_superior(Mesh_visitor) {}
-  void before_next_element_refinement() {}
-  //==============================================
-
-  std::string debug_info_class_name_impl() const
-  {
-    return "Null_mesher_level";
-  }
-
-  std::string debug_info() const
-  {
-    return "";
-  }
-  std::string debug_info_header() const
-  {
-    return "";
-  }
-
-}; // end Null_mesher_level
-
-
-/************************************************
- *
- * Mesher_level_base class
- *
- ************************************************/
-
-template <
-  class Tr, /**< The triangulation type. */
-  class Derived, /**< Derived class, that implements methods. */
-  class Element, /**< Type of elements that this level refines. */
-  class Previous, /* = Null_mesher_level, */
-  /**< Previous level type, defaults to
-     \c Null_mesher_level. */
-  class Triangulation_traits /** Traits class that defines types for the
-         triangulation. */
->
-class Mesher_level_base
-{
-public:
-  /** Type of triangulation that is meshed. */
-  typedef Tr Triangulation;
-  /** Type of point that are inserted into the triangulation. */
-  typedef typename Triangulation::Point Point;
-  /** Type of vertex handles that are returns by insertions into the
-      triangulation. */
-  typedef typename Triangulation::Vertex_handle Vertex_handle;
-  /** Type of lock data structure for concurrency */
-  typedef typename Triangulation::Lock_data_structure Lock_data_structure;
-  /** Type of facet & cell handles */
-  typedef typename Triangulation::Cell_handle Cell_handle;
-  typedef typename Cell_handle::value_type Cell;
-  typedef typename Triangulation::Facet Facet;
-  /** Type of the conflict zone for a point that can be inserted. */
-  typedef typename Triangulation_traits::Zone Zone;
-
-  typedef Element Element_type;
-  typedef Previous Previous_level;
-
-protected:
-  /** \name Private member functions */
-
-  /** Curiously recurring template pattern. */
-  //@{
-  Derived& derived()
-  {
-    return static_cast<Derived&>(*this);
-  }
-
-  const Derived& derived() const
-  {
-    return static_cast<const Derived&>(*this);
-  }
-  //@}
-
-  /// debug info: class name
-  std::string debug_info_class_name() const
-  {
-    return derived().debug_info_class_name_impl();
-  }
-
-  std::string debug_info_element(const Element &e) const
-  {
-    return derived().debug_info_element_impl(e);
-  }
-
-  /** \name Private member datas */
-
-  Previous_level& previous_level; /**< The previous level of the refinement
-                                    process. */
-
-#ifdef CGAL_MESH_3_PROFILING
-protected:
-  WallClockTimer m_timer;
-#endif
-
-public:
-  typedef Mesher_level_base<Tr,
-                       Derived,
-                       Element,
-                       Previous_level,
-                       Triangulation_traits> Self;
-
-  /** \name CONSTRUCTORS */
-  Mesher_level_base(Previous_level& previous)
-    : previous_level(previous)
-  {
-  }
-
-  /** \name FUNCTIONS IMPLEMENTED IN THE CLASS \c Derived */
-
-  /**  Access to the triangulation */
-  Triangulation& triangulation()
-  {
-    return derived().triangulation_ref_impl();
-  }
-
-  /**  Access to the triangulation */
-  const Triangulation& triangulation() const
-  {
-    return derived().triangulation_ref_impl();
-  }
-
-  const Previous_level& previous() const
-  {
-    return previous_level;
-  }
-
-  Vertex_handle insert(Point p, Zone& z)
-  {
-    return derived().insert_impl(p, z);
-  }
-
-  void clear_refinement_queue()
-  {
-    derived().clear(); // Clear refinement queue
-  }
-
-  /** Called before the first refinement, to initialized the queue of
-      elements that should be refined. */
-  void scan_triangulation()
-  {
-    //derived().clear(); // Clear refinement queue
-    derived().scan_triangulation_impl();
-
-#if defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)\
- && defined(CGAL_MESH_3_IF_UNSORTED_QUEUE_JUST_SORT_AFTER_SCAN)
-    std::cerr << "Sorting...";
-    derived().sort();
-    std::cerr << " done." << std::endl;
-#endif
-  }
-
-  /** For diagnostics. */
-  int number_of_bad_elements()
-  {
-    return derived().number_of_bad_elements_impl();
-  }
-
-  /** Tells if, as regards the elements of type \c Element, the refinement is
-      done. */
-  bool no_longer_element_to_refine()
-  {
-    return derived().no_longer_element_to_refine_impl();
-  }
-
-  /** It includes zombie elements */
-  int number_of_elements_in_queue()
-  {
-    return derived().size();
-  }
-
-  /** Retrieves the next element that could be refined. */
-  Element get_next_element()
-  {
-    return derived().get_next_element_impl();
-  }
-
-  /** Remove from the list the next element that could be refined. */
-  void pop_next_element()
-  {
-    derived().pop_next_element_impl();
-  }
-
-  Point circumcenter_of_element(const Element& e)
-  {
-    return derived().circumcenter_impl(e);
-  }
-
-  template <typename Mesh_visitor>
-  void before_next_element_refinement_in_superior(Mesh_visitor visitor)
-  {
-    derived().before_next_element_refinement_in_superior_impl(visitor);
-  }
-
-  template <typename Mesh_visitor>
-  void before_next_element_refinement(Mesh_visitor visitor)
-  {
-    derived().before_next_element_refinement_impl();
-    previous_level.before_next_element_refinement_in_superior(
-                                        visitor.previous_level());
-  }
-
-  /** Gives the point that should be inserted to refine the element \c e */
-  Point refinement_point(const Element& e)
-  {
-    return derived().refinement_point_impl(e);
-  }
-
-  /** Actions before testing conflicts for point \c p and element \c e */
-  template <typename Mesh_visitor>
-  void before_conflicts(const Element& e, const Point& p,
-      Mesh_visitor visitor)
-  {
-    visitor.before_conflicts(e, p);
-    derived().before_conflicts_impl(e, p);
-  }
-
-  /** Tells if, as regards this level of the refinement process, if the
-      point conflicts with something, and do what is needed. The return
-      type is made of two booleans:
-        - the first one tells if the point can be inserted,
-        - in case of, the first one is \c false, the second one tells if
-        the tested element should be reconsidered latter.
-  */
-  Mesher_level_conflict_status private_test_point_conflict(const Point& p,
-                 Zone& zone)
-  {
-    return derived().private_test_point_conflict_impl(p, zone);
-  }
-
-  /**
-   * Actions before inserting the point \c p in order to refine the
-   * element \c e. The zone of conflicts is \c zone.
-   */
-  template <class Mesh_visitor>
-  void before_insertion(Element& e, const Point& p, Zone& zone,
-                        Mesh_visitor visitor)
-  {
-    visitor.before_insertion(e, p, zone);
-    derived().before_insertion_impl(e, p, zone);
-  }
-
-  /** Actions after having inserted the point.
-   *  \param vh is the vertex handle of the inserted point,
-   *  \param visitor is the visitor.
-   */
-  template <class Mesh_visitor>
-  void after_insertion(Vertex_handle vh, Mesh_visitor visitor)
-  {
-    derived().after_insertion_impl(vh);
-    visitor.after_insertion(vh);
-  }
-
-  /** Actions after testing conflicts for point \c p and element \c e
-   *  if no point is inserted. */
-  template <class Mesh_visitor>
-  void after_no_insertion(const Element& e, const Point& p, Zone& zone,
-        Mesh_visitor visitor)
-  {
-    derived().after_no_insertion_impl(e, p, zone);
-    visitor.after_no_insertion(e, p, zone);
-  }
-
-  /** \name MESHING PROCESS
-   *
-   * The following functions use the functions that are implemented in the
-   * derived classes.
-   *
-   */
-
-  /**
-   * Tells it the algorithm is done, regarding elements of type \c Element
-   * or elements of previous levels.
-   */
-  bool is_algorithm_done()
-  {
-#ifdef CGAL_MESH_3_PROFILING
-    bool done = ( previous_level.is_algorithm_done() &&
-                  no_longer_element_to_refine() );
-    /*if (done)
-    {
-      std::cerr << "done in " << m_timer.elapsed() << " seconds." << std::endl;
-      m_timer.reset();
-    }*/
-    return done;
-#else
-    return ( previous_level.is_algorithm_done() &&
-             no_longer_element_to_refine() );
-#endif
-  }
-
-  /**
-   * This function takes one element from the queue, and try to refine
-   * it. It returns \c true if one point has been inserted.
-   * @todo Merge with try_to_refine_element().
-   */
-  template <class Mesh_visitor>
-  bool process_one_element(Mesh_visitor visitor)
-  {
-    Element e = get_next_element();
-
-    const Mesher_level_conflict_status result
-      = derived().try_to_refine_element(e, visitor);
-
-    if(result == CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED)
-    {
-      pop_next_element();
-    }
-
-    return result == NO_CONFLICT;
-  }
-
-  void get_valid_vertices_of_element(const Cell_handle &e, Vertex_handle vertices[4]) const
-  {
-    for (int i = 0 ; i < 4 ; ++i)
-      vertices[i] = e->vertex(i);
-  }
-  // Among the 4 values, one of them will be Vertex_handle() (~= NULL)
-  void get_valid_vertices_of_element(const Facet &e, Vertex_handle vertices[4]) const
-  {
-    for (int i = 0 ; i < 4 ; ++i)
-      vertices[i] = (i != e.second ? e.first->vertex(i) : Vertex_handle());
-  }
-
-  Cell_handle get_cell_from_element(const Cell_handle &e) const
-  {
-    return e;
-  }
-  Cell_handle get_cell_from_element(const Facet &e) const
-  {
-    return e.first;
-  }
-
-  /** \name STEP BY STEP FUNCTIONS */
-
-  /**
-   * Inserts exactly one point, if possible, and returns \c false if no
-   * point has been inserted because the algorithm is done.
-   */
-  template <class Mesh_visitor>
-  bool try_to_insert_one_point(Mesh_visitor visitor)
-  {
-    while(! is_algorithm_done() )
-    {
-      if( previous_level.try_to_insert_one_point(visitor.previous_level()) )
-        return true;
-      if(! no_longer_element_to_refine() )
-        if( process_one_element(visitor) )
-          return true;
-    }
-    return false;
-  }
-
-}; // end Mesher_level_base
-
-
-/************************************************
-// Class Mesher_level
-// Two versions: sequential / parallel
-************************************************/
-// Sequential
-template <
-  class Tr, /**< The triangulation type. */
-  class Derived, /**< Derived class, that implements methods. */
-  class Element, /**< Type of elements that this level refines. */
-  class Previous, /* = Null_mesher_level, */
-  /**< Previous level type, defaults to
-     \c Null_mesher_level. */
-  class Triangulation_traits, /** Traits class that defines types for the
-         triangulation. */
-  typename Concurrency_tag>
-class Mesher_level
-  : public Mesher_level_base<Tr, Derived, Element, Previous,
-                             Triangulation_traits>
-{
-public:
-
-  typedef Mesher_level<Tr,
-                       Derived,
-                       Element,
-                       Previous,
-                       Triangulation_traits,
-                       Concurrency_tag> Self;
-
-  typedef Mesher_level_base<Tr,
-                            Derived,
-                            Element,
-                            Previous,
-                            Triangulation_traits> Base;
-
-  typedef typename Base::Lock_data_structure Lock_data_structure;
-  typedef typename Base::Zone                Zone;
-  typedef typename Base::Point               Point;
-  typedef typename Base::Vertex_handle       Vertex_handle;
-  using Base::derived;
-  using Base::is_algorithm_done;
-  using Base::triangulation;
-  using Base::insert;
-  using Base::before_conflicts;
-  using Base::previous_level;
-  using Base::no_longer_element_to_refine;
-  using Base::pop_next_element;
-  using Base::debug_info_class_name;
-  using Base::debug_info_element;
-
-  /** \name CONSTRUCTORS */
-
-  Mesher_level(Previous& previous)
-    : Base(previous)
-  {
-  }
-
-  void add_to_TLS_lists(bool) {}
-  void splice_local_lists() {}
-  bool no_longer_local_element_to_refine() { return true; }
-  Element get_next_local_element() {return Element(); }
-  void pop_next_local_element() {}
-
-  Zone conflicts_zone(const Point& p
-                      , Element e
-                      , bool &facet_is_in_its_cz)
-  {
-    return derived().conflicts_zone_impl(p, e, facet_is_in_its_cz);
-  }
-
-  /** Tells if, as regards this level of the refinement process, if the
-      point conflicts with something, and do what is needed. The return
-      type is made of two booleans:
-        - the first one tells if the point can be inserted,
-        - in case of, the first one is \c false, the second one tells if
-        the tested element should be reconsidered latter.
-      This function is called by the superior level, if any.
-  */
-  Mesher_level_conflict_status
-  test_point_conflict_from_superior(const Point& p, Zone& zone)
-  {
-    return derived().test_point_conflict_from_superior_impl(p, zone);
-  }
-
-  /** Refines elements of this level and previous levels (SEQUENTIAL VERSION). */
-  template <class Mesh_visitor>
-  void refine(Mesh_visitor visitor)
-  {
-    while(! is_algorithm_done() )
-    {
-      previous_level.refine(visitor.previous_level());
-      if(! no_longer_element_to_refine() )
-      {
-        this->process_one_element(visitor);
-      }
-    }
-  }
-
-  template <class Mesh_visitor>
-  Mesher_level_conflict_status
-  try_to_refine_element(Element e, Mesh_visitor visitor)
-  {
-    const Point& p = this->refinement_point(e);
-
-#ifdef CGAL_MESH_3_VERY_VERBOSE
-    std::cerr << "Trying to insert point: " << p <<
-      " inside element " << debug_info_element(e) << std::endl;
-#endif
-
-    Mesher_level_conflict_status result;
-    Zone zone;
-
-    before_conflicts(e, p, visitor);
-
-    bool facet_is_in_its_cz = true;
-    zone = conflicts_zone(p, e, facet_is_in_its_cz);
-    if (!facet_is_in_its_cz)
-      result = THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE;
-    else
-      result = test_point_conflict(p, zone);
-
-#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
-    std::cerr << "(" << p << ") ";
-    switch( result )
-    {
-    case NO_CONFLICT:
-      std::cerr << "accepted\n";
-      break;
-    case CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED:
-      std::cerr << "rejected (temporarily)\n";
-      break;
-    case CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED:
-      std::cerr << "rejected (permanent)\n";
-      break;
-    case THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE:
-      std::cerr << "the facet to refine was not in the conflict zone "
-        "(switching to exact)\n";
-      break;
-    case ELEMENT_WAS_A_ZOMBIE:
-      std::cerr << "element was a zombie\n";
-      break;
-    case   COULD_NOT_LOCK_ELEMENT:
-      std::cerr << "could not lock element\n";
-      break;
-    case COULD_NOT_LOCK_ZONE:
-      std::cerr << "could not lock zone\n";
-      break;
-    }
-#endif
-
-    if(result == NO_CONFLICT)
-    {
-      this->before_insertion(e, p, zone, visitor);
-
-      Vertex_handle vh = insert(p, zone);
-
-      this->after_insertion(vh, visitor);
-    }
-    else
-    {
-      this->after_no_insertion(e, p, zone, visitor);
-    }
-
-    return result;
-  }
-
-  /** Refines elements of this level and previous levels.
-  *   Stops when algorithm is done
-  *   or when num vertices > approx_max_num_mesh_vertices
-  */
-  template <class Mesh_visitor>
-  void
-  refine_sequentially_up_to_N_vertices(Mesh_visitor visitor,
-                                            int approx_max_num_mesh_vertices)
-  {
-    while(! is_algorithm_done()
-      && triangulation().number_of_vertices() < approx_max_num_mesh_vertices)
-    {
-      previous_level.refine(visitor.previous_level());
-      if(! no_longer_element_to_refine() )
-      {
-        this->process_one_element(visitor);
-      }
-    }
-  }
-
-  /** Return (can_split_the_element, drop_element). */
-  Mesher_level_conflict_status
-  test_point_conflict(const Point& p, Zone& zone)
-  {
-    const Mesher_level_conflict_status result =
-      previous_level.test_point_conflict_from_superior(p, zone);
-
-    if( result != NO_CONFLICT )
-      return result;
-
-    return this->private_test_point_conflict(p, zone);
-  }
-
-  /**
-   * Applies one step of the algorithm: tries to refine one element of
-   * previous level or one element of this level. Return \c false iff
-   * <tt> is_algorithm_done()==true </tt>.
-   */
-  template <class Mesh_visitor>
-  bool one_step(Mesh_visitor visitor)
-  {
-    if( ! previous_level.is_algorithm_done() )
-      previous_level.one_step(visitor.previous_level());
-    else if( ! no_longer_element_to_refine() )
-    {
-      this->process_one_element(visitor);
-    }
-    return ! is_algorithm_done();
-  }
-
-  // Useless here
-  void set_lock_ds(Lock_data_structure *) {}
-  void set_worksharing_ds(WorksharingDataStructureType *) {}
-
-protected:
-};
-
-// Parallel
-#ifdef CGAL_LINKED_WITH_TBB
-template <
-  class Tr, /**< The triangulation type. */
-  class Derived, /**< Derived class, that implements methods. */
-  class Element, /**< Type of elements that this level refines. */
-  class Previous, /* = Null_mesher_level, */
-  /**< Previous level type, defaults to
-     \c Null_mesher_level. */
-  class Triangulation_traits> /** Traits class that defines types for the
-                                  triangulation. */
-class Mesher_level<Tr, Derived, Element, Previous,
-                   Triangulation_traits, Parallel_tag>
-  : public Mesher_level_base<Tr, Derived, Element, Previous,
-                             Triangulation_traits>
-{
-private:
-  typedef Derived Derived_;
-  template <typename ML, typename Container_element, 
-            typename Quality, typename Mesh_visitor> class Enqueue_element;
-public:
-
-  typedef Mesher_level<Tr,
-                       Derived,
-                       Element,
-                       Previous,
-                       Triangulation_traits,
-                       Parallel_tag> Self;
-
-  typedef Mesher_level_base<Tr,
-                            Derived,
-                            Element,
-                            Previous,
-                            Triangulation_traits> Base;
-
-
-  typedef typename Base::Lock_data_structure  Lock_data_structure;
-  typedef typename Base::Zone                 Zone;
-  typedef typename Base::Point                Point;
-  typedef typename Base::Vertex_handle        Vertex_handle;
-  using Base::derived;
-  using Base::is_algorithm_done;
-  using Base::triangulation;
-  using Base::insert;
-  using Base::before_conflicts;
-  using Base::before_insertion;
-  using Base::after_insertion;
-  using Base::previous_level;
-  using Base::no_longer_element_to_refine;
-  using Base::pop_next_element;
-  using Base::debug_info_class_name;
-  using Base::debug_info_element;
-
-  /** \name CONSTRUCTORS */
-
-  Mesher_level(Previous& previous)
-  : Base(previous),
-    FIRST_GRID_LOCK_RADIUS(
-    Concurrent_mesher_config::get().first_grid_lock_radius)
-    , MESH_3_REFINEMENT_GRAINSIZE(
-    Concurrent_mesher_config::get().first_grid_lock_radius)
-    , REFINEMENT_BATCH_SIZE(
-    Concurrent_mesher_config::get().refinement_batch_size)
-    , m_lock_ds(0)
-    , m_worksharing_ds(0)
-    , m_empty_root_task(0)
-  {
-  }
-
-  void add_to_TLS_lists(bool add)
-  {
-    derived().add_to_TLS_lists_impl(add);
-  }
-  void splice_local_lists()
-  {
-    derived().splice_local_lists_impl();
-  }
-
-  bool no_longer_local_element_to_refine()
-  {
-    return derived().no_longer_local_element_to_refine_impl();
-  }
-
-  Element get_next_local_element()
-  {
-    return derived().get_next_local_element_impl();
-  }
-
-  void pop_next_local_element()
-  {
-    derived().pop_next_local_element_impl();
-  }
-
-  Zone conflicts_zone(const Point& p
-                      , Element e
-                      , bool &facet_is_in_its_cz
-                      , bool &could_lock_zone)
-  {
-    return derived().conflicts_zone_impl(p, e, facet_is_in_its_cz,
-                                         could_lock_zone);
-  }
-
-  template <typename Mesh_visitor>
-  void treat_local_refinement_queue(Mesh_visitor visitor)
-  {
-    // We treat the elements of the local (TLS) refinement queue
-    while (no_longer_local_element_to_refine() == false)
-    {
-      typedef typename Derived::Container::Element Container_element;
-      Container_element ce = derived().get_next_local_raw_element_impl().second;
-
-      Mesher_level_conflict_status status;
-      do
-      {
-        status = try_lock_and_refine_element(ce, visitor);
-      }
-      while (status != NO_CONFLICT
-        && status != CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
-        && status != ELEMENT_WAS_A_ZOMBIE);
-
-      pop_next_local_element();
-    }
-  }
-
-  /** Tells if, as regards this level of the refinement process, if the
-      point conflicts with something, and do what is needed. The return
-      type is made of two booleans:
-        - the first one tells if the point can be inserted,
-        - in case of, the first one is \c false, the second one tells if
-        the tested element should be reconsidered latter.
-      This function is called by the superior level, if any.
-  */
-  template <class Mesh_visitor>
-  Mesher_level_conflict_status test_point_conflict_from_superior(
-    const Point& p, Zone& zone, Mesh_visitor &visitor)
-  {
-    return derived().test_point_conflict_from_superior_impl(p, zone, visitor);
-  }
-
-  /** Refines elements of this level and previous levels (SEQUENTIAL VERSION). */
-  template <class Mesh_visitor>
-  void refine(Mesh_visitor visitor)
-  {
-    while(! is_algorithm_done() )
-    {
-      previous_level.refine(visitor.previous_level());
-      if(! no_longer_element_to_refine() )
-      {
-        process_a_batch_of_elements(visitor);
-      }
-    }
-  }
-
-  /** Refines elements of this level and previous levels.
-  *   Stops when algorithm is done
-  *   or when num vertices > approx_max_num_mesh_vertices
-  */
-  template <class Mesh_visitor>
-  void
-  refine_sequentially_up_to_N_vertices(Mesh_visitor visitor,
-                                            int approx_max_num_mesh_vertices)
-  {
-
-    CGAL_assertion_msg(triangulation().get_lock_data_structure() == 0,
-      "In refine_sequentially_up_to_N_vertices, the triangulation's locking data structure should be NULL");
-
-    while(! is_algorithm_done()
-      && triangulation().number_of_vertices() < approx_max_num_mesh_vertices)
-    {
-      previous_level.refine(visitor.previous_level());
-      if(! no_longer_element_to_refine() )
-      {
-        this->process_one_element(visitor);
-      }
-    }
-  }
-
-  void unlock_all_thread_local_elements()
-  {
-    if (m_lock_ds)
-    {
-      m_lock_ds->unlock_all_points_locked_by_this_thread();
-    }
-  }
-
-  template <typename Container_element, typename Quality, typename Mesh_visitor>
-  void enqueue_task(
-    const Container_element &ce, const Quality &quality, Mesh_visitor visitor)
-  {
-    CGAL_assertion(m_empty_root_task != 0);
-
-    m_worksharing_ds->enqueue_work(
-      Enqueue_element<Self, Container_element, Quality, Mesh_visitor>(
-        *this, ce, quality, visitor),
-      quality,
-      *m_empty_root_task
-      // NOTE: if you uncomment this line (Load_based_worksharing_ds), the element may
-      // be a zombie at this point => thus, it may be "infinite" and cause an assertion error
-      // in debug mode when computing the circumcenter
-      //, circumcenter_of_element(derived().extract_element_from_container_value(ce))
-    );
-  }
-
-  /**
-    * This function takes N elements from the queue, and try to refine
-    * it in parallel.
-    */
-  template <class Mesh_visitor>
-  void process_a_batch_of_elements(Mesh_visitor visitor)
-  {
-    typedef typename Derived::Container::value_type Container_quality_and_element;
-
-#ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
-    std::cerr << "Refining elements...";
-#endif
-
-    previous_level.add_to_TLS_lists(true);
-    add_to_TLS_lists(true);
-
-    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
-    m_empty_root_task->set_ref_count(1);
-
-    while (!no_longer_element_to_refine())
-    {
-      Container_quality_and_element qe = derived().get_next_raw_element_impl();
-      pop_next_element();
-      enqueue_task(qe.second, qe.first, visitor);
-    }
-
-    m_empty_root_task->wait_for_all();
-
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << " Flushing";
-#endif
-    bool keep_flushing = true;
-    while (keep_flushing)
-    {
-      m_empty_root_task->set_ref_count(1);
-      keep_flushing = m_worksharing_ds->flush_work_buffers(*m_empty_root_task);
-      m_empty_root_task->wait_for_all();
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-      std::cerr << ".";
-#endif
-    }
-
-    tbb::task::destroy(*m_empty_root_task);
-    m_empty_root_task = 0;
-
-    splice_local_lists();
-    //previous_level.splice_local_lists(); // useless
-    previous_level.add_to_TLS_lists(false);
-    add_to_TLS_lists(false);
-
-#ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
-    std::cerr << " done." << std::endl;
-#endif
-
-  }
-
-  template <class Mesh_visitor>
-  Mesher_level_conflict_status
-  try_to_refine_element(Element e, Mesh_visitor visitor)
-  {
-    const Point& p = this->refinement_point(e);
-
-#ifdef CGAL_MESH_3_VERY_VERBOSE
-    std::cerr << "Trying to insert point: " << p <<
-      " inside element " << debug_info_element(e) << std::endl;
-#endif
-
-    before_conflicts(e, p, visitor);
-
-    bool could_lock_zone;
-    bool facet_is_in_its_cz = true;
-    Zone zone = conflicts_zone(p, e, facet_is_in_its_cz, could_lock_zone);
-    Mesher_level_conflict_status result;
-    if (!could_lock_zone)
-      result = COULD_NOT_LOCK_ZONE;
-    else if (!facet_is_in_its_cz)
-      result = THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE;
-    else
-      result = test_point_conflict(p, zone, visitor);
-
-#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
-    std::cerr << "(" << p << ") ";
-    switch( result )
-    {
-    case NO_CONFLICT:
-      std::cerr << "accepted\n";
-      break;
-    case CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED:
-      std::cerr << "rejected (temporarily)\n";
-      break;
-    case CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED:
-      std::cerr << "rejected (permanent)\n";
-      break;
-    case THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE:
-      std::cerr << "the facet to refine was not in the conflict zone "
-        "(switching to exact)\n";
-      break;
-    case ELEMENT_WAS_A_ZOMBIE:
-      std::cerr << "element was a zombie\n";
-      break;
-    case   COULD_NOT_LOCK_ELEMENT:
-      std::cerr << "could not lock element\n";
-      break;
-    case COULD_NOT_LOCK_ZONE:
-      std::cerr << "could not lock zone\n";
-      break;
-    }
-#endif
-
-    if(result == NO_CONFLICT)
-    {
-      this->before_insertion(e, p, zone, visitor);
-
-      Vertex_handle vh = insert(p, zone);
-
-      if (vh == Vertex_handle())
-      {
-        this->after_no_insertion(e, p, zone, visitor);
-        result = COULD_NOT_LOCK_ZONE;
-      }
-      else
-      {
-        this->after_insertion(vh, visitor);
-      }
-    }
-    else
-    {
-      this->after_no_insertion(e, p, zone, visitor);
-    }
-
-    return result;
-  }
-
-  template <typename Container_element, typename Mesh_visitor>
-  Mesher_level_conflict_status
-  try_lock_and_refine_element(const Container_element &ce, Mesh_visitor visitor)
-  {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-    static Profile_branch_counter_3 bcounter(
-      std::string("early withdrawals / late withdrawals / successes [") + debug_info_class_name() + "]");
-#endif
-
-    Mesher_level_conflict_status result;
-    Derived &derivd = derived();
-    if( !derivd.is_zombie(ce) )
-    {
-      // Lock the element area on the grid
-      Element element = derivd.extract_element_from_container_value(ce);
-      bool locked = derivd.try_lock_element(element, FIRST_GRID_LOCK_RADIUS);
-
-      if( locked )
-      {
-        // Test it again as it may have changed in the meantime
-        if( !derivd.is_zombie(ce) )
-        {
-          result = try_to_refine_element(element, visitor);
-
-          //lock.release();
-
-          if (result == CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
-            || result == THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE)
-          {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-            ++bcounter; // It's not a withdrawal
-#endif
-          }
-          else if (result == COULD_NOT_LOCK_ZONE)
-          {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-            bcounter.increment_branch_1(); // THIS is a late withdrawal!
-#endif
-          }
-          else
-          {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-            ++bcounter;
-#endif
-          }
-        }
-        else
-        {
-          result = ELEMENT_WAS_A_ZOMBIE;
-        }
-
-        // Unlock
-        unlock_all_thread_local_elements();
-      }
-      // else, we will try it again
-      else
-      {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-        bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-        // Unlock
-        unlock_all_thread_local_elements();
-
-        std::this_thread::yield();
-        result = COULD_NOT_LOCK_ELEMENT;
-      }
-    }
-    else
-    {
-      result = ELEMENT_WAS_A_ZOMBIE;
-    }
-
-    return result;
-  }
-
-  /** Return (can_split_the_element, drop_element). */
-  template <class Mesh_visitor>
-  Mesher_level_conflict_status
-  test_point_conflict(const Point& p, Zone& zone, Mesh_visitor &visitor)
-  {
-    const Mesher_level_conflict_status result =
-      previous_level.test_point_conflict_from_superior(
-        p, zone, visitor.previous_level());
-
-    if( result != NO_CONFLICT )
-      return result;
-
-    return this->private_test_point_conflict(p, zone);
-  }
-
-  /**
-   * Applies one step of the algorithm: tries to refine one element of
-   * previous level or one element of this level. Return \c false iff
-   * <tt> is_algorithm_done()==true </tt>.
-   */
-  template <class Mesh_visitor>
-  bool one_step(Mesh_visitor visitor)
-  {
-    if( ! previous_level.is_algorithm_done() )
-      previous_level.one_step(visitor.previous_level());
-    else if( ! no_longer_element_to_refine() )
-    {
-      process_a_batch_of_elements(visitor);
-    }
-    return ! is_algorithm_done();
-  }
-
-  void set_lock_ds(Lock_data_structure *p)
-  {
-    m_lock_ds = p;
-  }
-
-  void set_worksharing_ds(WorksharingDataStructureType *p)
-  {
-    m_worksharing_ds = p;
-  }
-
-protected:
-
-  // Member variables
-  const int FIRST_GRID_LOCK_RADIUS;
-  const int MESH_3_REFINEMENT_GRAINSIZE;
-  const int REFINEMENT_BATCH_SIZE;
-  Lock_data_structure *m_lock_ds;
-  WorksharingDataStructureType *m_worksharing_ds;
-
-  tbb::task *m_empty_root_task;
-
-private:
-
-  // Functor for enqueue_task function
-  template <typename ML, typename Container_element, typename Quality, typename Mesh_visitor>
-  class Enqueue_element
-  {
-    ML                & m_mesher_level;
-    Container_element   m_container_element;
-    Quality             m_quality;
-    Mesh_visitor        m_visitor;
-
-  public:
-    // Constructor
-    Enqueue_element(ML &ml,
-                    const Container_element &ce, 
-                    const Quality &quality, 
-                    Mesh_visitor visitor)
-    : m_mesher_level(ml), 
-      m_container_element(ce), 
-      m_quality(quality), 
-      m_visitor(visitor)
-    {
-    }
-
-    // operator()
-    void operator()() const
-    {
-      typedef typename ML::Derived_::Container::value_type 
-                                                 Container_quality_and_element;
-
-      Mesher_level_conflict_status status;
-      do
-      {
-        status = m_mesher_level.try_lock_and_refine_element(m_container_element, 
-                                                            m_visitor);
-      }
-      while (status != NO_CONFLICT
-        && status != CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
-        && status != CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
-        && status != ELEMENT_WAS_A_ZOMBIE);
-
-      // Refine the new bad facets
-      m_mesher_level.before_next_element_refinement(m_visitor);
-
-      // We can now reconsider the element if requested
-      if (status == CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED)
-        m_mesher_level.enqueue_task(m_container_element, m_quality, m_visitor);
-
-      // Finally we add the new local bad_elements to the feeder
-      while (m_mesher_level.no_longer_local_element_to_refine() == false)
-      {
-        Container_quality_and_element qe = 
-          m_mesher_level.derived().get_next_local_raw_element_impl();
-        m_mesher_level.pop_next_local_element();
-        m_mesher_level.enqueue_task(qe.second, qe.first, m_visitor);
-      }
-    }
-  };
-
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-} }  // end namespace CGAL::Mesh_3
-
-#include <CGAL/Mesher_level_visitors.h>
-#include <CGAL/Mesh_3/Mesher_level_default_implementations.h>
-
-#endif // CGAL_MESH_3_MESHER_LEVEL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
deleted file mode 100644
index 500153c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
+++ /dev/null
@@ -1,1705 +0,0 @@
-// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
-// Copyright (c) 2010-2013 GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb, Laurent Rineau
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
-#define CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Delaunay_triangulation_3.h>
-#include <CGAL/Mesh_3/io_signature.h>
-#ifndef CGAL_NO_ASSERTIONS
-#  include <boost/math/special_functions/next.hpp> // for float_prior
-#endif
-#include <boost/function_output_iterator.hpp>
-
-namespace CGAL {
-namespace Mesh_3 {
-namespace internal {
-  const double min_intersection_factor = .4; // (1-alpha)
-  const double weight_modifier = .81; //0.9025;//0.81;
-  const double distance_divisor = 2.1;
-  const int max_nb_vertices_to_reevaluate_size = 10;
-} // end namespace internal
-} // end namespace Mesh_3
-} // end namespace CGAL
-
-#include <cmath>
-#include <algorithm>
-#include <set>
-#include <list>
-#include <vector>
-#include <stack>
-
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/optional.hpp>
-
-#include <CGAL/Mesh_3/utilities.h>
-#include <CGAL/enum.h>
-#include <CGAL/iterator.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/squared_distance_3.h>
-
-#include <fstream>
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-template <typename C3t3>
-void debug_dump_c3t3(const std::string filename, const C3t3& c3t3)
-{
-  std::cerr << "Dump current mesh to " << filename << std::endl;
-  std::ofstream out(filename.c_str(), 
-                    std::ios_base::out|std::ios_base::binary);
-  out << "binary CGAL c3t3 " << CGAL::Get_io_signature<C3t3>()() << "\n";
-  CGAL::set_binary_mode(out);
-  out << c3t3;
-}
-
-
-template <typename C3T3, typename MeshDomain, typename SizingFunction>
-class Protect_edges_sizing_field
-{
-  typedef Protect_edges_sizing_field          Self;
-  
-public:
-  typedef typename C3T3::Triangulation        Tr;
-  typedef typename Tr::Geom_traits            Gt;
-  typedef typename Gt::FT                     FT;
-  typedef typename Gt::Point_3                Weighted_point;
-  typedef typename Weighted_point::Point      Bare_point;
-  typedef typename Weighted_point::Weight     Weight;
-  
-  typedef typename C3T3::Cell_handle          Cell_handle;
-  typedef typename C3T3::Vertex_handle        Vertex_handle;
-  typedef typename C3T3::Triangulation        Triangulation;
-  typedef typename C3T3::Edge                 Edge;
-  
-  typedef typename MeshDomain::Curve_segment_index  Curve_segment_index;
-  typedef typename MeshDomain::Corner_index         Corner_index;
-  typedef typename MeshDomain::Index                Index;
-  
-public:
-  Protect_edges_sizing_field(C3T3& c3t3,
-                             const MeshDomain& domain,
-                             SizingFunction size=SizingFunction(),
-                             const FT minimal_size = FT());
-  
-  void operator()(const bool refine=true);
-  
-private:
-  typedef std::vector<std::pair<Curve_segment_index,Bare_point> >    Incident_edges;
-  typedef std::vector<Vertex_handle>                                 Vertex_vector;
-  typedef std::vector<std::pair<Vertex_handle,Curve_segment_index> > Incident_vertices;
-  
-private:
-  /// Insert corners of the mesh
-  void insert_corners();
-  
-  /// Insert balls on every edge
-  void insert_balls_on_edges();
-  
-  /// Refine balls
-  void refine_balls();
-
-  /// Returns vertex which corresponds to corner located at point p
-  Vertex_handle get_vertex_corner_from_point(const Bare_point& p,
-                                             const Index& p_index) const;
-  
-  /// Insert point(p,w) into triangulation and set its dimension to \c dim and
-  /// it's index to \c index.
-  /// The handle of the newly created vertex is returned.
-  Vertex_handle insert_point(const Bare_point& p,
-                             const Weight& w,
-                             int dim,
-                             const Index& index,
-                             const bool special_ball = false);
-
-  /**
-   * Insert point(p,w) into triangulation and set its dimension to \c dim and
-   * it's index to \c index.
-   * The handle of the newly created vertex is returned.
-   * 
-   * This function also ensures that point(p,w) will not be inside a
-   * sphere, by decreasing the radius of any sphere that contains it.
-   * It also ensures that no point of the triangulation will be inside its
-   * sphere, by decreasing w.
-   */
-  template <typename ErasedVeOutIt>
-  std::pair<Vertex_handle, ErasedVeOutIt>
-  smart_insert_point(const Bare_point& p,
-		     Weight w,
-		     int dim,
-		     const Index& index,
-		     ErasedVeOutIt out);
-  
-  
-  /// Insert balls between points which are pointed by handles \c vp and \c vq
-  /// on curve identified by \c curve_index
-  template <typename ErasedVeOutIt>
-  ErasedVeOutIt insert_balls(const Vertex_handle& vp,
-			     const Vertex_handle& vq,
-			     const Curve_segment_index& curve_index,
-			     ErasedVeOutIt out);
-
-  /**
-   * Insert balls
-   * Preconditions:
-   *  - size_p < size_q
-   *  - pq_geodesic > 0
-   */
-  template <typename ErasedVeOutIt>
-  ErasedVeOutIt insert_balls(const Vertex_handle& vp,
-			     const Vertex_handle& vq,
-			     const FT size_p,
-			     const FT size_q,
-			     const FT pq_geodesic,
-			     const CGAL::Sign distance_sign,
-			     const Curve_segment_index& curve_index,
-			     ErasedVeOutIt out);
-  
-  /// Returns true if balls of \c va and \c vb intersect, and (va,vb) is not
-  /// an edge of the complex
-  bool non_adjacent_but_intersect(const Vertex_handle& va,
-                                  const Vertex_handle& vb) const;
-  
-  /// Returns true if balls of \c va and \c vb intersect
-  bool do_balls_intersect(const Vertex_handle& va,
-                          const Vertex_handle& vb) const;
-  
-  /// Change size of the ball of vertex \c v.
-  Vertex_handle change_ball_size(const Vertex_handle& v, const FT size,
-                                 const bool special_ball = false);
-  
-  
-  /// Returns true if balls of v1 and v2 intersect "enough"
-  bool is_sampling_dense_enough(const Vertex_handle& v1,
-                                const Vertex_handle& v2) const;
-  
-  /// Takes an iterator on Vertex_handle as input and check if the sampling
-  /// of those vertices is ok. If not, fix it.
-  void check_and_repopulate_edges();
-
-  /// Checks if vertex \c v is well sampled, and if its not the case, fix it.
-  /// Fills out with deleted vertices during this process. out value type
-  /// is Vertex_handle.
-  template <typename ErasedVeOutIt>
-  ErasedVeOutIt
-  check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out);
-  
-  /// Walk along edge from \c start, following the direction \c start to 
-  /// \c next, and fills \c out with the vertices which do not fullfill 
-  /// the sampling conditions
-  template <typename ErasedVeOutIt>
-  ErasedVeOutIt
-  walk_along_edge(const Vertex_handle& start,
-                  const Vertex_handle& next,
-                  const bool test_sampling,
-                  ErasedVeOutIt out) const;
-  
-  /// Returns next vertex along edge, i.e vertex after \c start, following
-  /// the direction from \c previous to \c start
-  /// \pre (previous,start) is in c3t3
-  Vertex_handle next_vertex_along_edge(const Vertex_handle& start,
-                                       const Vertex_handle& previous) const;
-  
-  /// Replace vertices between ]begin,last[ by new vertices, along curve
-  /// identified by \c curve_index
-  /// The value type of InputIterator is Vertex_handle.
-  template <typename InputIterator, typename ErasedVeOutIt>
-  ErasedVeOutIt repopulate(InputIterator begin,
-			   InputIterator last,
-			   const Curve_segment_index& index,
-			   ErasedVeOutIt out);
-
-  template <typename InputIterator, typename ErasedVeOutIt>
-  ErasedVeOutIt
-  analyze_and_repopulate(InputIterator begin,
-                         InputIterator last,
-                         const Curve_segment_index& index,
-			 ErasedVeOutIt out);
-  
-  /// Checks if \c v2 size is compatible (i.e. greater) with the linear
-  /// interpolation of sizes of \c v1 and \c v3 
-  bool is_sizing_field_correct(const Vertex_handle& v1,
-                               const Vertex_handle& v2,
-                               const Vertex_handle& v3) const;
-  
-  /// Repopulate all incident curve around corner \c v
-  /// \pre \c v is a corner of c3t3 
-  template <typename ErasedVeOutIt>
-  ErasedVeOutIt
-  repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out);
-  
-  /// Returns true if edge with index \c curve_index is already treated
-  bool is_treated(const Curve_segment_index& curve_index) const
-  {
-    return ( treated_edges_.find(curve_index) != treated_edges_.end() );
-  }
-  
-  /// Set edge with index \c curve_index as treated
-  void set_treated(const Curve_segment_index& curve_index)
-  {
-    treated_edges_.insert(curve_index);
-  }
-  
-  /// Compute euclidean distance between bare points of \c va and \c vb
-  FT compute_distance(const Vertex_handle& va, const Vertex_handle& vb) const
-  {
-    return compute_distance(va->point().point(), vb->point().point());
-  }
-  
-  /// Compute euclidean distance between bare points \c and \c q
-  FT compute_distance(const Bare_point& p, const Bare_point& q) const
-  {
-    return CGAL::sqrt(Gt().compute_squared_distance_3_object()(p,q));
-  }
-  
-  /// Returns the radius of the ball of vertex \c v
-  FT get_size(const Vertex_handle& v) const
-  {
-    return CGAL::sqrt(v->point().weight());
-  }
-
-  /// Test if a given vertex is a special protecting ball
-  /// A special ball is a protecting ball whose radius is set to the
-  /// minimal radius. Such a ball can exceptionally intersect a ball that
-  /// is on a different curve. Special balls are marked with special values
-  /// of 'in_dimension'.
-  bool is_special(const Vertex_handle&v) const
-  {
-    return v->is_special();
-  }
-
-  /// Set to a negative dimension to mark this ball as a special one.
-  void set_special(const Vertex_handle&v) const
-  {
-    v->set_special();
-  }
-
-  /// Returns the real dimension of the vertex
-  int get_dimension(const Vertex_handle& v) const
-  {
-    return c3t3_.in_dimension(v);
-  }
-
-  /// Query the sizing field and returns its value at the point p, or
-  /// minimal_size if the later is greater.
-  FT query_size(const Bare_point& p, int dim, const Index& index) const
-  {
-    if(dim < 0) dim = -1 - dim; // Convert the dimension if it was set to a
-                                // negative value (marker for special balls).
-    const FT s = size_(p, dim, index);
-    // if(minimal_size_ != FT() && s < minimal_size_) 
-    //   return minimal_size_;
-    // else
-      return s;
-  }
-
-private:
-  C3T3& c3t3_;
-  const MeshDomain& domain_;
-  SizingFunction size_;
-  FT minimal_size_;
-  Weight minimal_weight_;
-  std::set<Curve_segment_index> treated_edges_;
-  std::set<Vertex_handle> unchecked_vertices_;
-};
-
-
-template <typename C3T3, typename MD, typename Sf>
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-Protect_edges_sizing_field(C3T3& c3t3, const MD& domain, 
-                           Sf size, const FT minimal_size)
-  : c3t3_(c3t3)
-  , domain_(domain)
-  , size_(size)
-  , minimal_size_(minimal_size)
-  , minimal_weight_(CGAL::square(minimal_size))
-{
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-void
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-operator()(const bool refine)
-{
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "Inserting protection balls..." << std::endl
-            << "  refine_balls = " << std::boolalpha << refine << std::endl
-            << "  min_balls_radius = " << minimal_size_ << std::endl
-            << "  min_balls_weight = " << minimal_weight_ << std::endl;
-#endif
-  
-  // Insert 0-dimensional features
-  insert_corners();
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "insert_corners() done. Nb of points in triangulation: "
-            << c3t3_.triangulation().number_of_vertices() << std::endl;
-#endif
-  
-  // Insert 1-dimensional features
-  insert_balls_on_edges();
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "insert_balls_on_edges() done. Nb of points in triangulation: "
-            << c3t3_.triangulation().number_of_vertices() << std::endl;
-#endif
-  
-  // Solve problems
-  if ( refine )
-  { 
-    refine_balls();
-#ifdef CGAL_MESH_3_VERBOSE
-    std::cerr << "refine_balls() done. Nb of points in triangulation: "
-              << c3t3_.triangulation().number_of_vertices() << std::endl;
-#endif
-    CGAL_assertion(minimal_size_ > 0 || c3t3_.is_valid());
- }
-  
-  // debug_dump_c3t3("dump-mesh-after-protect_edges.binary.cgal", c3t3_);
-
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << std::endl;
-#endif
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-void
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-insert_corners()
-{
-  // Gt is a traits class for regular triangulations, and Gt::Kernel is its
-  // CGAL kernel.
-  typedef CGAL::Delaunay_triangulation_3<typename Gt::Kernel> Dt;
-
-  // Iterate on domain corners
-  typedef std::vector< std::pair<Corner_index, Bare_point> > Initial_corners;
-  Initial_corners corners;
-  domain_.get_corners(std::back_inserter(corners));
-  
-  Dt dt;
-  for ( typename Initial_corners::iterator it = corners.begin(),
-       end = corners.end() ; it != end ; ++it )
-  {
-    const Bare_point& p = it->second;
-    dt.insert(p);
-  }
-
-  for ( typename Initial_corners::iterator cit = corners.begin(),
-          end = corners.end() ; cit != end ; ++cit )
-  {
-    const Bare_point& p = cit->second;
-    Index p_index = domain_.index_from_corner_index(cit->first);
-    
-    // Get weight (ball radius is given by size_ function)
-    FT w = CGAL::square(query_size(p, 0, p_index));
-
-    // the following lines ensure that the weight w is small enough so that
-    // corners balls do not intersect
-    if(dt.number_of_vertices() >= 2)
-    {
-
-      typename Dt::Vertex_handle vh;
-      CGAL_assertion_code( bool p_found= )
-        dt.is_vertex(p, vh);
-      CGAL_assertion(p_found);
-      std::vector<typename Dt::Vertex_handle> vs;
-      vs.reserve(32);
-      dt.finite_adjacent_vertices(vh, std::back_inserter(vs));
-      CGAL_assertion(!vs.empty());
-      typename Dt::Point nearest = vs[0]->point();
-      typename Gt::Compare_distance_3 compare_dist = 
-        c3t3_.triangulation().geom_traits().compare_distance_3_object();
-      for (typename std::vector<typename Dt::Vertex_handle>::const_iterator
-             it = vs.begin(); it != vs.end(); ++it) 
-      {
-        if(compare_dist(p, (*it)->point(), nearest) == CGAL::SMALLER) {
-          // 	    std::cerr << "  nearest!\n";
-          nearest =  (*it)->point();
-        }
-      }
-      typename Gt::Compute_squared_distance_3 squared_distance = 
-        c3t3_.triangulation().geom_traits().compute_squared_distance_3_object();
-      const FT nearest_sq_dist = squared_distance( nearest, p);
-      
-      w = (std::min)(w, nearest_sq_dist / FT(9));
-    }
-    
-    // Insert corner with ball (dim is zero because p is a corner)
-    Vertex_handle v = smart_insert_point(p, w, 0, p_index,
-					 CGAL::Emptyset_iterator()).first;
-    CGAL_assertion(v != Vertex_handle());
-
-    // As C3t3::add_to_complex modifies the 'in_dimension' of the vertex,
-    // we need to backup and re-set the 'is_special' marker after.
-    const bool special_ball = is_special(v);
-    c3t3_.add_to_complex(v,cit->first);
-    if(special_ball) {
-      set_special(v);
-    }
-  }
-} //end insert_corners()
-
-
-template <typename C3T3, typename MD, typename Sf>
-typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index,
-             const bool special_ball /* = false */)
-{
-  using CGAL::Mesh_3::internal::weight_modifier;
-
-  if(dim < 0) dim = -1 - dim; // Convert the dimension if it was set to a
-                              // negative value (marker for special balls).
-
-  typedef typename Tr::size_type size_type;
-  CGAL_USE_TYPE(size_type);
-  
-  // Insert point
-  CGAL_assertion_code(size_type nb_vertices_before = c3t3_.triangulation().number_of_vertices());
-
-  typename Tr::Locate_type lt;
-  int li, lj;
-  const typename Tr::Cell_handle ch = c3t3_.triangulation().locate(p, lt, li, lj);
-  Vertex_handle v = c3t3_.triangulation().insert(Weighted_point(p,w*weight_modifier),
-                                                 lt, ch, li, lj);
-  
-  // If point insertion created an hidden ball, fail
-  CGAL_assertion ( Vertex_handle() != v );
-  CGAL_assertion ( lt == Tr::VERTEX ||
-                   c3t3_.triangulation().number_of_vertices() == (nb_vertices_before+1) );
-
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "Insertion of ";
-  if(special_ball) std::cerr << "SPECIAL ";
-  std::cerr << "protecting ball "
-            << Weighted_point(p,w*weight_modifier);
-  switch(dim) {
-  case 0:
-    std::cerr << " on corner #";
-    break;
-  case 1:
-    std::cerr << " on curve #";
-    break;
-  default:
-    std::cerr << " ERROR dim=" << dim << " index=";
-  }
-  std::cerr  << index << std::endl;
-  if(v == Vertex_handle()) std::cerr << "  HIDDEN!\n";
-  std::cerr << "The weight was " << w << std::endl;
-#endif // CGAL_MESH_3_PROTECTION_DEBUG
-
-  c3t3_.set_dimension(v, dim);
-  if(special_ball)
-    set_special(v);
-  c3t3_.set_index(v,index);
-  
-  unchecked_vertices_.insert(v);
-  
-  return v;
-}
-
-  
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-std::pair<typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle,
-	  ErasedVeOutIt>
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index,
-		   ErasedVeOutIt out)
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "smart_insert_point( (" << p 
-            << "), w=" << w
-            << ", dim=" << dim
-            << ", index=" << index << ")\n";
-#endif
-  const Tr& tr = c3t3_.triangulation();
-  typename Gt::Compute_squared_distance_3 sq_distance =
-    tr.geom_traits().compute_squared_distance_3_object();
-  
-  bool add_handle_to_unchecked = false; /// add or not the new vertex to
-                                        /// the set 'unchecked_vertices'
-  bool insert_a_special_ball = false; /// will be passed to the function
-                                      /// this->insert_point
-  
-  if ( tr.dimension() > 2 ) 
-  {
-    // Check that new point will not be inside a power sphere
-
-    typename Tr::Locate_type lt;
-    int li, lj;
-    Cell_handle ch = tr.locate(p, lt, li, lj);
-    Vertex_handle nearest_vh = tr.nearest_power_vertex(p, ch);
-    FT sq_d = sq_distance(p, nearest_vh->point().point());
-    while ( nearest_vh->point().weight() > sq_d &&
-            ! is_special(nearest_vh) )
-    {
-      CGAL_assertion( minimal_size_ >0 || sq_d > 0 );
-
-      bool special_ball = false;
-      if(minimal_weight_ != Weight() && sq_d < minimal_weight_) {
-        sq_d = minimal_weight_;
-        w = minimal_weight_;
-        special_ball = true;
-        insert_a_special_ball = true;
-      }
-
-      // Adapt size
-      *out++ = nearest_vh;
-      Vertex_handle new_vh = change_ball_size(nearest_vh, CGAL::sqrt(sq_d),
-                                              special_ball);
-      ch = tr.locate(p, lt, li, lj, new_vh);
-      
-      // Iterate
-      nearest_vh = tr.nearest_power_vertex(p, ch);
-      sq_d = sq_distance(p, nearest_vh->point().point());
-    }
-
-    if( is_special(nearest_vh) && nearest_vh->point().weight() > sq_d )
-    {
-      w = minimal_weight_;
-      insert_a_special_ball = true;
-    }
-
-    // Change w in order to be sure that no existing point will be included
-    // in (p,w)
-    std::vector<Vertex_handle> vertices_in_conflict_zone;
-    { // fill vertices_in_conflict_zone
-      std::set<Vertex_handle> vertices_in_conflict_zone_set;
-      std::vector<Cell_handle> cells_in_conflicts;
-      tr.find_conflicts(Weighted_point(p, w), ch,
-                        CGAL::Emptyset_iterator(),
-                        std::back_inserter(cells_in_conflicts),
-                        CGAL::Emptyset_iterator());
-
-      for(typename std::vector<Cell_handle>::const_iterator 
-            it = cells_in_conflicts.begin(),
-            end = cells_in_conflicts.end(); it != end; ++it) 
-      {
-        for(int i = 0, d = tr.dimension(); i <= d; ++i) {
-          const Vertex_handle v = (*it)->vertex(i);
-          if( ! c3t3_.triangulation().is_infinite(v) ) {
-            vertices_in_conflict_zone_set.insert(v);
-          }
-        }
-      }
-      vertices_in_conflict_zone.insert(vertices_in_conflict_zone.end(),
-				       vertices_in_conflict_zone_set.begin(),
-				       vertices_in_conflict_zone_set.end());
-    }
-    FT min_sq_d = w;
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    typename Tr::Point nearest_point;
-#endif
-    for(typename std::vector<Vertex_handle>::const_iterator
-          it = vertices_in_conflict_zone.begin(),
-          end = vertices_in_conflict_zone.end(); it != end ; ++it )
-    {
-      const FT sq_d = sq_distance(p, (*it)->point().point());
-      if(minimal_weight_ != Weight() && sq_d < minimal_weight_) {
-        insert_a_special_ball = true;
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-        nearest_point = (*it)->point();
-#endif
-        min_sq_d = minimal_weight_;
-        if( ! is_special(*it) ) {
-	  *out++ = *it;
-          ch = change_ball_size(*it, minimal_size_, true)->cell(); // special ball
-        }
-      } else {
-        if(sq_d < min_sq_d) {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-          nearest_point = (*it)->point();
-#endif
-          min_sq_d = sq_d;
-        }
-      }
-    }
-
-    if ( w > min_sq_d )
-    { 
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-      std::cerr << "smart_insert_point: weight " << w
-                << " reduced to " << min_sq_d
-                << "\n (near existing point: " << nearest_point << " )\n";
-#endif
-      w = min_sq_d;
-      add_handle_to_unchecked = true;
-    }
-
-    if(lt != Tr::VERTEX) {
-      using CGAL::Mesh_3::internal::weight_modifier;
-      CGAL_assertion_code(std::vector<Vertex_handle> hidden_vertices;);
-      CGAL_assertion_code(ch = tr.locate(p, lt, li, lj, ch););
-      CGAL_assertion_code(tr.vertices_inside_conflict_zone(Weighted_point(p, w*weight_modifier),
-                                                           ch,
-                                                           std::back_inserter(hidden_vertices)));
-
-      CGAL_assertion(hidden_vertices.empty());
-    }
-  }
-  else // tr.dimension() <= 2
-  {
-    // change size of existing balls which include p
-    bool restart = true;
-    while ( restart )
-    {
-      restart = false;
-      for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(),
-           end = tr.finite_vertices_end() ; it != end ; ++it )
-      {
-        FT sq_d = sq_distance(p, it->point().point());
-        if ( it->point().weight() > sq_d )
-        { 
-          bool special_ball = false;
-          if(minimal_weight_ != Weight() && sq_d > minimal_weight_) {
-            sq_d = minimal_weight_;
-            w = minimal_weight_;
-            special_ball = true;
-            insert_a_special_ball = true;
-          }
-          if( ! is_special(it) ) { 
-	    *out++ = it;
-            change_ball_size(it, CGAL::sqrt(sq_d), special_ball);
-            restart = true;
-          }
-          break;
-        }
-      }
-    }
-    
-    FT min_sq_d = w;
-    typename Tr::Point nearest_point;
-    // Change w in order to be sure that no existing point will be included
-    // in (p,w)
-    for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(),
-         end = tr.finite_vertices_end() ; it != end ; ++it )
-    {
-      FT sq_d = sq_distance(p, it->point().point());
-      if(sq_d < min_sq_d) {
-        min_sq_d = sq_d;
-        nearest_point = it->point();
-      }
-    }    
-    if ( w > min_sq_d )
-    { 
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-      std::cerr << "smart_insert_point: weight " << w
-                << " reduced to " << min_sq_d
-                << "\n (near existing point: " << nearest_point << " )\n";
-#endif
-      w = min_sq_d;
-      add_handle_to_unchecked = true;
-    }
-  }
-
-  const FT w_max = CGAL::square(query_size(p, dim, index));
-
-  if(w > w_max) {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr << "smart_insert_point: weight " << w
-              << " reduced to " << w_max << " (sizing field)\n";
-#endif
-    w = w_max;
-    add_handle_to_unchecked = true;
-  }
-  if( w < minimal_weight_) {
-    w = minimal_weight_;
-    insert_a_special_ball = true;
-  }
-  Vertex_handle v = insert_point(p,w,dim,index, insert_a_special_ball);
-  /// @TODO `insert_point` does insert in unchecked_vertices anyway!
-  if ( add_handle_to_unchecked ) { unchecked_vertices_.insert(v); }
-  
-  return std::pair<Vertex_handle, ErasedVeOutIt>(v, out);
-}
-
-  
-template <typename C3T3, typename MD, typename Sf>
-void
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-insert_balls_on_edges()
-{
-  // Get features
-  typedef CGAL::cpp11::tuple<Curve_segment_index,
-                             std::pair<Bare_point,Index>,
-                             std::pair<Bare_point,Index> >    Feature_tuple;
-  typedef std::vector<Feature_tuple>                          Input_features;
-  
-  Input_features input_features;
-  domain_.get_curve_segments(std::back_inserter(input_features));
-  
-  // Interate on edges
-  for ( typename Input_features::iterator fit = input_features.begin(),
-       end = input_features.end() ; fit != end ; ++fit )
-  {
-    const Curve_segment_index& curve_index = CGAL::cpp11::get<0>(*fit);
-    if ( ! is_treated(curve_index) )
-    {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-      std::cerr << "** treat curve #" << curve_index << std::endl;
-#endif
-      const Bare_point& p = CGAL::cpp11::get<1>(*fit).first;
-      const Bare_point& q = CGAL::cpp11::get<2>(*fit).first; 
-      
-      const Index& p_index = CGAL::cpp11::get<1>(*fit).second;
-      const Index& q_index = CGAL::cpp11::get<2>(*fit).second;
-      
-      Vertex_handle vp,vq;
-      if ( ! domain_.is_cycle(p, curve_index) )
-      {
-        vp = get_vertex_corner_from_point(p,p_index);
-        vq = get_vertex_corner_from_point(q,q_index);
-      }
-      else
-      {
-        // Even if the curve is a cycle, it can intersect other curves at
-        // its first point (here 'p'). In that case, 'p' is a corner, even
-        // if the curve is a cycle.
-        if(!c3t3_.triangulation().is_vertex(Weighted_point(p), vp))
-        {
-          // if 'p' is not a corner, find out a second point 'q' on the
-          // curve, "far" from 'p', and limit the radius of the ball of 'p'
-          // with the third of the distance from 'p' to 'q'.
-          FT p_size = query_size(p, 1, p_index);
-
-          FT curve_lenght = domain_.geodesic_distance(p, p, curve_index);
-
-          Bare_point other_point =
-            domain_.construct_point_on_curve_segment(p,
-                                                     curve_index,
-                                                     curve_lenght / 2);
-          p_size = (std::min)(p_size,
-                              compute_distance(p, other_point) / 3);
-          vp = smart_insert_point(p,
-                                  CGAL::square(p_size),
-                                  1,
-                                  p_index,
-				  CGAL::Emptyset_iterator()).first;
-        }
-        // No 'else' because in that case 'is_vertex(..)' already filled
-        // the variable 'vp'.
-        vq = vp;
-      }
-      
-      // Insert balls and set treated
-      // if(do_balls_intersect(vp, vq)) {
-      //   CGAL_assertion(is_special(vp) || is_special(vq));
-      // }
-      // else
-      {
-        insert_balls(vp, vq, curve_index, Emptyset_iterator());
-      }
-      set_treated(curve_index);
-    }
-    // std::stringstream s;
-    // s << "dump-mesh-curve-" << curve_index << ".binary.cgal";
-    // debug_dump_c3t3(s.str(), c3t3_);
-  }
-} //end insert_balls_on_edges()
-
-
-template <typename C3T3, typename MD, typename Sf>
-typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-get_vertex_corner_from_point(const Bare_point& p, const Index&) const
-{
-  // Get vertex_handle associated to corner (dim=0) point
-  Vertex_handle v;
-  CGAL_assertion_code( bool q_finded = )
-  c3t3_.triangulation().is_vertex(Weighted_point(p), v);
-  // Let the weight be 0, because is_vertex only locates the point, and
-  // check that the location type is VERTEX.
-  CGAL_assertion( q_finded );
-  return v;
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-insert_balls(const Vertex_handle& vp,
-             const Vertex_handle& vq,
-             const Curve_segment_index& curve_index,
-	     ErasedVeOutIt out)
-{
-  // Get size of p & q
-  const Bare_point& p = vp->point().point();
-  const Bare_point& q = vq->point().point();
-  
-  const FT sp = get_size(vp);
-  const FT sq = get_size(vq);
-  
-  // Compute geodesic distance
-  const FT pq_geo_signed = domain_.geodesic_distance(p, q, curve_index);
-  const CGAL::Sign d_sign = CGAL::sign(pq_geo_signed);
-  const FT pq_geo = CGAL::abs(pq_geo_signed);
-
-  // Insert balls
-  return
-    (sp <= sq) ?
-    insert_balls(vp, vq, sp, sq, pq_geo, d_sign, curve_index, out) :
-    insert_balls(vq, vp, sq, sp, pq_geo, -d_sign, curve_index, out);
-}
-
-
-
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-insert_balls(const Vertex_handle& vp,
-             const Vertex_handle& vq,
-             const FT sp,
-             const FT sq,
-             const FT d,
-             const CGAL::Sign d_sign,
-             const Curve_segment_index& curve_index,
-	     ErasedVeOutIt out)
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "insert_balls(vp=" << (void*)(&*vp) << " (" << vp->point() << "),\n"
-            << "             vq=" << (void*)(&*vq) << " (" << vq->point() << "),\n"
-            << "             sp=" << sp << ",\n"
-            << "             sq=" << sq << ",\n"
-            << "              d=" << d << ",\n"
-            << "             d_sign=" << d_sign << ",\n"
-            << "             curve_index=" << curve_index << ")\n";
-#endif
-  CGAL_precondition(d > 0);
-  CGAL_precondition(sp <= sq);
-  CGAL_precondition(sp > 0);
-
-  // Notations:
-  // sp = size_p,   sq = size_q,   d = pq_geodesic
-  // n = nb_points,   r = delta_step_size
-  // 
-  // Hypothesis:
-  // sp <= sq
-  //
-  // Let's define
-  // P0 = p, Pn+1 = q, d(Pi,Pi+1) = ai
-  //
-  // The following constraints should be verified:
-  // a0 = sp + r, an = sq,
-  // ai+1 = ai + r
-  // d = Sum(ai)
-  //
-  // The following could be obtained:
-  // r = (sq - sp) / (n+1)
-  // n = 2(d-sq) / (sp+sq)
-  //
-  // =======================
-  // Calculus details:
-  // ai+1 = ai + r
-  // ai+1 = a0 + r*(i+1)
-  //   an = a0 + r*n
-  //   sq = sp + r + r*n
-  //    r = (sq-sp) / (n+1)
-  //
-  //   d = Sum(ai)
-  //   d = Sum(sp + (i+1)*r)
-  //   d = (n+1)*sp + (n+1)(n+2)/2 * r
-  //   d = (n+1)*sp + (n+1)(n+2)/2 * (sq-sp) / (n+1)
-  // 2*d = 2(n+1)*sp + (n+2)*sq - (n+2)*sp
-  // 2*d = n*sp + (n+2)*sq
-  //   n = 2(d-sq) / (sp+sq)
-  // =======================
-  
-  int n = static_cast<int>(std::floor(FT(2)*(d-sq) / (sp+sq))+.5);
-  // if( minimal_weight_ != 0 && n == 0 ) return;
-
-#ifndef CGAL_MESH_3_NO_PROTECTION_NON_LINEAR
-  // This block tries not to apply the general rule that the size of
-  // protecting balls is a linear interpolation of the size of protecting
-  // balls at corner. When the curve segment is long enough, pick a point
-  // at the middle and choose a new size.
-  if(n >= internal::max_nb_vertices_to_reevaluate_size && 
-     d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight_)) {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr << "Number of to-be-inserted balls is: " 
-              << n << "\n  between points ("
-              << vp->point() << ") and (" << vq->point()
-              << ") (geodesic distance: "
-              << domain_.geodesic_distance(vp->point(), vq->point(),
-                                           curve_index)
-              << ")\n";
-#endif
-    const Bare_point new_point =
-      domain_.construct_point_on_curve_segment(vp->point().point(),
-                                               curve_index,
-                                               d_sign * d / 2);
-    const int dim = 1; // new_point is on edge
-    const Index index = domain_.index_from_curve_segment_index(curve_index);
-    const FT point_weight = CGAL::square(size_(new_point, dim, index));
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr << "  middle point: " << new_point << std::endl;
-    std::cerr << "  new weight: " << point_weight << std::endl;
-#endif
-    std::pair<Vertex_handle, ErasedVeOutIt> pair =
-      smart_insert_point(new_point,
-			 point_weight,
-			 dim,
-			 index,
-			 out);
-    const Vertex_handle new_vertex = pair.first;
-    out = pair.second;
-    const FT sn = get_size(new_vertex);
-    if(sp <= sn) {
-      out=insert_balls(vp, new_vertex, sp, sn, d/2, d_sign, curve_index, out);
-    } else {
-      out=insert_balls(new_vertex, vp, sn, sp, d/2, -d_sign, curve_index, out);
-    }
-    if(sn <= sq) {
-      out=insert_balls(new_vertex, vq, sn, sq, d/2, d_sign, curve_index, out);
-    } else {
-      out=insert_balls(vq, new_vertex, sq, sn, d/2, -d_sign, curve_index, out);
-    }
-    return out;
-  }
-#endif // not CGAL_MESH_3_NO_PROTECTION_NON_LINEAR
-
-  FT r = (sq - sp) / FT(n+1);
-
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "  n=" << n
-            << "\n  r=" << r << std::endl;
-#endif
-
-
-  // Adjust size of steps, D = covered distance
-  FT D = sp*FT(n+1) + FT((n+1)*(n+2)) / FT(2) * r ;
-  
-  FT dleft_frac = d / D;
-
-  // Initialize step sizes
-  FT step_size = sp + r;
-  FT norm_step_size = dleft_frac * step_size;
-  
-  // Initial distance
-  FT d_signF = static_cast<FT>(d_sign);
-  FT pt_dist = d_signF * norm_step_size;
-  Vertex_handle prev = vp;
-  const Bare_point& p = vp->point().point();
-
-  // if ( (0 == n) && 
-  //      ( (d >= sp+sq) || !is_sampling_dense_enough(vp, vq) ) )
-
-  // If there is some place to insert one point, insert it
-  if ( (0 == n) && (d >= sp+sq) )
-  {
-    n = 1;
-    step_size = sp + (d-sp-sq) / FT(2);
-    pt_dist = d_signF * step_size;
-    norm_step_size = step_size;
-  } else {
-    CGAL_assertion_code(using boost::math::float_prior);
-    CGAL_assertion(n==0 ||
-                   dleft_frac >= float_prior(float_prior(1.)));
-  }
-  
-  // Launch balls
-  for ( int i = 1 ; i <= n ; ++i )
-  {
-    // New point position
-    Bare_point new_point =
-      domain_.construct_point_on_curve_segment(p, curve_index, pt_dist);
-    
-    // Weight (use as size the min between norm_step_size and linear interpolation)
-    FT current_size = (std::min)(norm_step_size, sp + CGAL::abs(pt_dist)/d*(sq-sp));
-    FT point_weight = current_size * current_size;
-    
-    // Index and dimension
-    Index index = domain_.index_from_curve_segment_index(curve_index);
-    int dim = 1; // new_point is on edge
-    
-    // Insert point into c3t3
-    std::pair<Vertex_handle, ErasedVeOutIt> pair =
-      smart_insert_point(new_point, point_weight, dim, index, out);
-    Vertex_handle new_vertex = pair.first;
-    out = pair.second;
-    
-    // Add edge to c3t3
-    if(!c3t3_.is_in_complex(prev, new_vertex)) {
-      c3t3_.add_to_complex(prev, new_vertex, curve_index);
-    }
-    prev = new_vertex;
-    
-    // Step size
-    step_size += r;
-    norm_step_size = dleft_frac * step_size;
-    
-    // Increment distance
-    pt_dist += d_signF * norm_step_size;
-  }
-  
-  // Insert last edge into c3t3
-  // Warning: if vp==vq (cycle) and if only 1 point was inserted,
-  // then (prev,vp) == (prev,vq)
-  if ( vp != vq || n > 1 )
-  {
-    if(!c3t3_.is_in_complex(prev, vq)) {
-      c3t3_.add_to_complex(prev, vq, curve_index);
-    }
-  }
-  return out;
-}
-  
-  
-template <typename C3T3, typename MD, typename Sf>
-void
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-refine_balls()
-{
-  Triangulation& tr = c3t3_.triangulation();
-  
-  // Loop
-  bool restart = true;
-  int nb=0;
-  while ( (!unchecked_vertices_.empty() || restart) && nb<29)
-  {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr << "RESTART REFINE LOOP (" << nb << ")\n"
-              << "\t unchecked_vertices size: " << unchecked_vertices_.size() <<"\n";
-#endif
-    ++nb;
-    restart = false;
-    std::map<Vertex_handle, FT> new_sizes;
-    
-    for(typename Tr::Finite_edges_iterator eit = tr.finite_edges_begin(), 
-        end = tr.finite_edges_end(); eit != end; ++eit)
-    {
-      const Vertex_handle& va = eit->first->vertex(eit->second);
-      const Vertex_handle& vb = eit->first->vertex(eit->third);
-      
-      // If those vertices are not adjacent 
-      if( non_adjacent_but_intersect(va, vb) )
-      {
-        using CGAL::Mesh_3::internal::distance_divisor;
-
-        // Compute correct size of balls
-        const FT ab = compute_distance(va,vb);
-	/// @TOTO pb: get_size(va) is called several times
-        FT sa_new = (std::min)(ab/distance_divisor, get_size(va));
-        FT sb_new = (std::min)(ab/distance_divisor, get_size(vb));
-        
-        // In case of va or vb have already been in conflict, keep minimal size
-        if ( new_sizes.find(va) != new_sizes.end() )
-        { sa_new = (std::min)(sa_new, new_sizes[va]); }
-        
-        if ( new_sizes.find(vb) != new_sizes.end() )
-        { sb_new = (std::min)(sb_new, new_sizes[vb]); }
-        
-        // Store new_sizes for va and vb
-        if ( sa_new != get_size(va) )
-        { new_sizes[va] = sa_new; }
-        
-        if ( sb_new != get_size(vb) )
-        { new_sizes[vb] = sb_new; }
-      }
-    }
-
-    // The std::map with Vertex_handle as the key is not robust, because
-    // the time stamp of vertices can change during the following loop. The
-    // solution is to copy it in a vector.
-    std::vector<std::pair<Vertex_handle, FT> >
-      new_sizes_copy(new_sizes.begin(), new_sizes.end());
-    new_sizes.clear();
-    
-    // Update size of balls
-    for ( typename std::vector<std::pair<Vertex_handle,FT> >::iterator
-	    it = new_sizes_copy.begin(),
-	    end = new_sizes_copy.end();
-	  it != end ; ++it )
-    {
-      const Vertex_handle v = it->first;
-      const FT new_size = it->second;
-      // Set size of the ball to new value
-      if(minimal_size_ != FT() && new_size < minimal_size_) {
-        if(!is_special(v)) {
-          change_ball_size(v,minimal_size_,true); // special ball
-                  
-          // Loop will have to be run again
-          restart = true;
-        }
-      } else {
-        change_ball_size(v,new_size);
-                
-        // Loop will have to be run again
-        restart = true;
-      }
-    }
-    
-    // Check edges
-    check_and_repopulate_edges();
-  }
-} // end refine_balls()
-
-
-template <typename C3T3, typename MD, typename Sf>
-bool
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-non_adjacent_but_intersect(const Vertex_handle& va, const Vertex_handle& vb) const
-{
-  if ( ! c3t3_.is_in_complex(va,vb) )
-  {
-    return do_balls_intersect(va, vb);
-  }
-  
-  return false;
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-bool
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const
-{
-  typename Gt::Construct_sphere_3 sphere = 
-    c3t3_.triangulation().geom_traits().construct_sphere_3_object();
-    
-  typename Gt::Do_intersect_3 do_intersect = 
-    c3t3_.triangulation().geom_traits().do_intersect_3_object();
-    
-  const Bare_point& a = va->point().point();
-  const Bare_point& b = vb->point().point();
-    
-  const FT& sq_ra = va->point().weight();
-  const FT& sq_rb = vb->point().weight();
-    
-  return do_intersect(sphere(a, sq_ra), sphere(b, sq_rb));
-}
-
-template <typename C3T3, typename MD, typename Sf>
-typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-change_ball_size(const Vertex_handle& v, const FT size, const bool special_ball)
-{
-  // Check if there is something to do
-  Weight w = CGAL::square(size);
-  // if(v->point().weight() == w)
-  // { return v; }
-
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "change_ball_size(v=" << (void*)(&*v) 
-            << " (" << v->point()
-            << ") dim=" << c3t3_.in_dimension(v) 
-            << " index=" << c3t3_.index(v)
-            << " ,\n"
-            << "                 size=" << size 
-            << ", special_ball=" << std::boolalpha << special_ball << std::endl;
-#endif
-  
-  // Get incident vertices along c3t3 edge
-  Incident_vertices incident_vertices;
-  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
-  
-  // Remove incident edges from complex
-  for ( typename Incident_vertices::iterator vit = incident_vertices.begin(),
-       vend = incident_vertices.end() ; vit != vend ; ++vit )
-  {
-    c3t3_.remove_from_complex(v,vit->first);
-  }
-  
-  
-  
-  // Store point data
-  Index index = c3t3_.index(v);
-  int dim = get_dimension(v);
-  Bare_point p = v->point().point();  
-
-  // Remove v from corners
-  boost::optional<Corner_index> corner_index =
-    boost::make_optional(false, Corner_index());
-  if ( c3t3_.is_in_complex(v) )
-  {
-    corner_index = c3t3_.corner_index(v);
-    c3t3_.remove_from_complex(v);
-  }
-
-  unchecked_vertices_.erase(v);
-  // Change v size
-  c3t3_.triangulation().remove(v);
- 
-  CGAL_assertion_code(Tr& tr = c3t3_.triangulation());
-  CGAL_assertion_code(Cell_handle ch = tr.locate(p));
-  CGAL_assertion_code(std::vector<Vertex_handle> hidden_vertices);
-  CGAL_assertion_code(if(tr.dimension() > 1)
-                      tr.vertices_inside_conflict_zone(Weighted_point(p, w),
-                                                       ch,
-                                                       std::back_inserter(hidden_vertices)));
-
-  Vertex_handle new_v = insert_point(p, w , dim, index, special_ball);
-  CGAL_assertion(hidden_vertices.empty());
-
-  CGAL_assertion( (! special_ball) || is_special(new_v) ); 
-  
-  // TODO: ensure that this condition is always satisfied (Pedro's code ?)
-  CGAL_assertion(v==new_v);
-  //new_v->set_meshing_info(size*size);
-
-  // Restore v in corners
-  if ( corner_index )
-  {
-    // As C3t3::add_to_complex modifies the 'in_dimension' of the vertex,
-    // we need to backup and re-set the 'is_special' marker after.
-    const bool special_ball = is_special(new_v);
-    c3t3_.add_to_complex(new_v,*corner_index);
-    if(special_ball) {
-        set_special(new_v);
-    }
-  }
-  
-  // Restore c3t3 edges
-  for ( typename Incident_vertices::iterator it = incident_vertices.begin(),
-       end = incident_vertices.end() ; it != end ; ++it )
-  {
-    // Restore connectivity in c3t3
-    c3t3_.add_to_complex(new_v, it->first, it->second);
-  }
-
-  // Update unchecked vertices
-  unchecked_vertices_.insert(new_v);
-  return new_v;
-}
-namespace details {
-
-  // Functor used by Protect_edges_sizing_field::check_and_repopulate_edges, below
-  template <typename Set>
-  class Erase_element_from_set {
-    Set* set_ptr;
-  public:
-    Erase_element_from_set(Set& set) : set_ptr(&set) {}
-
-    void operator()(const typename Set::key_type& x)
-    {
-      set_ptr->erase(x);
-    }
-  }; // end class Erase_element_from_set
-
-} // end namespace details
-
-template <typename C3T3, typename MD, typename Sf>
-void
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-check_and_repopulate_edges()
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "check_and_repopulate_edges()\n";
-#endif
-  typedef std::set<Vertex_handle> Vertices;
-  Vertices vertices;
-  std::copy( unchecked_vertices_.begin(), unchecked_vertices_.end(),
-             std::inserter(vertices,vertices.begin()) );
-  
-  unchecked_vertices_.clear();
-  
-  // Fix edges
-  while ( !vertices.empty() )
-  {
-    Vertex_handle v = *vertices.begin();
-    vertices.erase(vertices.begin());
-
-    details::Erase_element_from_set<Vertices> erase_from_vertices(vertices);
-
-    check_and_fix_vertex_along_edge(v,
-      boost::make_function_output_iterator(erase_from_vertices));
-  }
-}
-
-  
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out)
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "check_and_fix_vertex_along_edge(" 
-            << (void*)(&*v) << "= (" << v->point() 
-            << ") dim=" << get_dimension(v)
-            << " index=" << c3t3_.index(v)
-            << " special=" << std::boolalpha << is_special(v)
-            << ")\n";
-#endif
-  // If v is a corner, then all incident edges have to be checked
-  if ( c3t3_.is_in_complex(v) )
-  {
-    return repopulate_edges_around_corner(v, out);
-  }
-  
-  // Get incident vertices along c3t3 edge
-  Incident_vertices incident_vertices;
-  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
-  CGAL_assertion(v->is_special()
-                 || incident_vertices.size() == 0
-                 || incident_vertices.size() == 1
-                 || incident_vertices.size() == 2);
-  if(incident_vertices.size() == 0) return out;
-  // The size of 'incident_vertices' can be 0 if v is a ball that covers
-  // entirely a closed curve. 
-  // The size can also be 1 if the curve is a cycle, and the temporary
-  // mesh is only two balls on the cycle: then each ball has only one
-  // neighbor.
-
-  // Walk along edge to find the edge piece which is not correctly sampled
-  typedef std::list<Vertex_handle> Vertex_list;
-  Vertex_list to_repopulate;
-  to_repopulate.push_front(v);
-  
-  const Vertex_handle& previous = incident_vertices.front().first;
-  const Vertex_handle& next = incident_vertices.back().first;
-
-  // Walk following direction (v,previous)
-  walk_along_edge(v, previous, true, std::front_inserter(to_repopulate));
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr <<  "to_repopulate.size()=" << to_repopulate.size() << "\n";
-#endif // CGAL_MESH_3_PROTECTION_DEBUG  
-
-  // Check whether a complete circle has been discovered or not
-  if (   to_repopulate.size() == 1
-      || to_repopulate.front() != to_repopulate.back() )
-  {
-    // Walk in other direction (v,next)
-    walk_along_edge(v, next, true, std::back_inserter(to_repopulate));    
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr <<  "to_repopulate.size()=" << to_repopulate.size() << "\n";
-#endif // CGAL_MESH_3_PROTECTION_DEBUG  
-  }
-  
-  // If only v is in to_repopulate, there is nothing to do
-  if ( to_repopulate.size() == 1 )
-  {
-    *out++ = *to_repopulate.begin();
-    return out;
-  }
-  
-  // Store erased vertices
-  // out = std::copy(to_repopulate.begin(), to_repopulate.end(), out);
-
-  // Repopulate edge
-  const Curve_segment_index& curve_index = incident_vertices.front().second;
-  
-  out = analyze_and_repopulate(to_repopulate.begin(),
-			       --to_repopulate.end(),
-			       curve_index,
-			       out);
-  
-  return out;
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-bool
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2) const
-{
-  using CGAL::Mesh_3::internal::min_intersection_factor;
-  CGAL_precondition(c3t3_.is_in_complex(v1,v2));
-
-  // Get sizes
-  FT size_v1 = get_size(v1);
-  FT size_v2 = get_size(v2);
-  FT distance_v1v2 = compute_distance(v1,v2);
-  
-  // Ensure size_v1 > size_v2
-  if ( size_v1 < size_v2 ) { std::swap(size_v1, size_v2); }
-  
-  // Check if balls intersect
-  return distance_v1v2 < (FT(min_intersection_factor) * size_v2 + size_v1);  
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-walk_along_edge(const Vertex_handle& start, const Vertex_handle& next,
-                bool /*test_sampling*/,
-                ErasedVeOutIt out) const
-{
-  CGAL_precondition( c3t3_.is_in_complex(start, next) );
-  
-  Vertex_handle previous = start;
-  Vertex_handle current = next;
-  
-  // Walk along edge since a corner is encountered or the balls of previous
-  // and current intersects enough
-  while ( ! is_sampling_dense_enough(previous, current) )
-  {
-    *out++ = current;
-    
-    // Don't go through corners
-    if ( c3t3_.is_in_complex(current) || current == start )
-    {
-      break;
-    }
-    
-    // Get next vertex along edge
-    Vertex_handle next = next_vertex_along_edge(current,previous);
-    previous = current;
-    current = next;
-  }
-  
-  return out;
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-next_vertex_along_edge(const Vertex_handle& start,
-                       const Vertex_handle& previous) const
-{
-  CGAL_precondition( c3t3_.is_in_complex(start, previous) );
-  CGAL_precondition( ! c3t3_.is_in_complex(start) );
-  
-  Incident_vertices incident_vertices;
-  c3t3_.adjacent_vertices_in_complex(start,
-                                  std::back_inserter(incident_vertices));
-  CGAL_assertion(incident_vertices.size() == 2);
-  
-  if ( incident_vertices.front().first == previous )
-  { 
-    return incident_vertices.back().first;
-  }
-  else
-  { 
-    return incident_vertices.front().first;
-  }
-}
-
-  
-template <typename C3T3, typename MD, typename Sf>
-template <typename InputIterator, typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-repopulate(InputIterator begin, InputIterator last,
-	   const Curve_segment_index& index, ErasedVeOutIt out)
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "repopulate(begin=" << (void*)(&**begin) 
-            << " (" << (*begin)->point() << "),\n"
-            << "            last=" << (void*)(&**last)
-            << " (" << (*last)->point() << ")\n"
-            << "                  distance(begin, last)=" 
-            << std::distance(begin, last) << ",\n"
-            << "           index=" << index << ")\n";
-#endif
-  CGAL_assertion( std::distance(begin,last) >= 0 );
-  
-  // May happen
-  if ( begin == last ) { return out; }
-  
-  // Valid because begin < last
-  InputIterator current = begin;
-  InputIterator previous = current++;
-  
-  // Remove edges from c3t3.
-  while ( current != last )
-  {
-    c3t3_.remove_from_complex(*previous++, *current++);
-  }
-  // Keep a point between current and last
-  Bare_point point_through = (*previous)->point().point();
-  // Remove last edge
-  c3t3_.remove_from_complex(*previous, *current);
-  
-  // Remove vertices (don't remove the first one and the last one)
-  current = begin;
-  while ( ++current != last )
-  {
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    std::cerr << "Removal of ";
-    if(is_special(*current)) std::cerr << "SPECIAL ";
-    std::cerr << "protecting ball "
-              << (*current)->point();
-    switch(get_dimension(*current)) {
-    case 0:
-      std::cerr << " on corner #";
-      break;
-    case 1:
-      std::cerr << " on curve #";
-      break;
-    default:
-      std::cerr << " ERROR dim=" << get_dimension(*current)  << " index=";
-    }
-    std::cerr  << c3t3_.index(*current) << std::endl;
-#endif // CGAL_MESH_3_PROTECTION_DEBUG
-    *out++ = *current;
-    c3t3_.triangulation().remove(*current);
-  }
-  
-  // If edge is a cycle, order the iterators according to the orientation of
-  // the cycle
-  if (  domain_.is_cycle((*begin)->point().point(), index) 
-      && domain_.distance_sign_along_cycle((*begin)->point().point(),
-                                           point_through,
-                                           (*last)->point().point(),
-                                           index ) != CGAL::POSITIVE )
-  {
-    std::swap(begin,last);
-  }
-  
-  // Repopulate edge
-  return insert_balls(*begin, *last, index, out);
-}
-
-
-template <typename C3T3, typename MD, typename Sf>
-template <typename InputIterator, typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-analyze_and_repopulate(InputIterator begin, InputIterator last,
-		       const Curve_segment_index& index, ErasedVeOutIt out)
-{
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-  std::cerr << "analyze_and_repopulate(begin=" << (void*)(&**begin)
-            << " (" << (*begin)->point() << "),\n"
-            << "                       last=" << (void*)(&**last)
-            << " (" << (*last)->point() << ")\n"
-            << "                              distance(begin, last)=" 
-            << std::distance(begin, last) << ",\n"
-            << "                       index=" << index << ")\n";
-#endif
-  CGAL_assertion( std::distance(begin,last) >= 0 );
-  
-  // May happen
-  if ( begin == last ) { return out; }
-  if ( std::distance(begin,last) == 1 )
-  {
-    out = repopulate(begin, last, index, out);
-    return out;
-  }
-  
-  // Here std::distance(begin,last) > 1
-  
-  // ch_stack is the stack filled with the convex hull of element size.
-  // The goal is to ensure that no ball will have its size increased
-  std::stack<InputIterator> ch_stack;
-  InputIterator current = begin;
-  ch_stack.push(current);
-  ch_stack.push(++current);
-
-  // Compute the convex hull of the size of elements
-  while ( ++current != last )
-  {
-    // Get last element of the stack
-    InputIterator previous = ch_stack.top();
-    ch_stack.pop();
-    
-    // If (prevprev, prev, current) is ok, then go one step forward, i.e. check
-    // (prevprevprev, prevprev, current)
-    while (   !ch_stack.empty() 
-           && is_sizing_field_correct(*ch_stack.top(),*previous,*current) )
-    {
-      previous = ch_stack.top();
-      ch_stack.pop();
-    }
-    
-    // Push in the stack the furthest good element (previous)
-    // and current element
-    ch_stack.push(previous);   
-    ch_stack.push(current);
-  }
-  
-  // Insert last element
-  ch_stack.push(last);
-  
-  // Repopulate edge segments
-  current = ch_stack.top();
-  ch_stack.pop();
-  while ( !ch_stack.empty() )
-  {
-    InputIterator next = ch_stack.top();
-    ch_stack.pop();
-    // Iterators are on the reverse order in the stack, thus use [next,current]
-    out = repopulate(next, current, index, out);
-    current = next;
-  }
-  return out;
-}
-  
-template <typename C3T3, typename MD, typename Sf>
-bool
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-is_sizing_field_correct(const Vertex_handle& v1,
-                        const Vertex_handle& v2,
-                        const Vertex_handle& v3) const
-{
-  FT s1 = get_size(v1);
-  FT s2 = get_size(v2);
-  FT s3 = get_size(v3);
-  FT D = compute_distance(v1,v3);
-  FT d = compute_distance(v1,v2);
-  
-  return ( s2 >= (s1 + d/D*(s3-s1)) );
-}
-
-  
-template <typename C3T3, typename MD, typename Sf>
-template <typename ErasedVeOutIt>
-ErasedVeOutIt
-Protect_edges_sizing_field<C3T3, MD, Sf>::
-repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out)
-{
-  CGAL_precondition(c3t3_.is_in_complex(v));
-  
-  Incident_vertices incident_vertices;
-  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
-  
-  for ( typename Incident_vertices::iterator vit = incident_vertices.begin(),
-       vend = incident_vertices.end() ; vit != vend ; ++vit )
-  {
-    const Vertex_handle& next = vit->first;
-    const Curve_segment_index& curve_index = vit->second;
-    
-    // Walk along each incident edge of the corner
-    Vertex_vector to_repopulate;
-    to_repopulate.push_back(v);
-    walk_along_edge(v, next, true, std::back_inserter(to_repopulate));
-
-    // Return erased vertices
-    std::copy(to_repopulate.begin(), to_repopulate.end(), out);
-
-    // Repopulate
-    out = analyze_and_repopulate(to_repopulate.begin(), --to_repopulate.end(),
-				 curve_index, out);
-  }
-  
-  return out;
-}
-  
-} // end namespace Mesh_3
-
-
-} //namespace CGAL
-
-#endif // CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_facets_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_facets_3.h
deleted file mode 100644
index 1bdcc3b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_facets_3.h
+++ /dev/null
@@ -1,1886 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau, Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-// Implements a mesher level for facets.
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_REFINE_FACETS_3_H
-#define CGAL_MESH_3_REFINE_FACETS_3_H
-
-#include <CGAL/Mesh_3/Mesher_level.h>
-#include <CGAL/Mesh_3/Mesher_level_default_implementations.h>
-#ifdef CGAL_LINKED_WITH_TBB
-  #include <tbb/tbb.h>
-#endif
-
-#include <CGAL/Meshes/Filtered_deque_container.h>
-#include <CGAL/Meshes/Filtered_multimap_container.h>
-#include <CGAL/Meshes/Double_map_container.h>
-
-#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
-
-#ifdef CGAL_MESH_3_PROFILING
-  #include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#include <CGAL/Object.h>
-
-#include <boost/format.hpp>
-#include <boost/optional.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/if.hpp>
-#include <CGAL/tuple.h>
-#include <boost/type_traits/is_convertible.hpp>
-#include <sstream>
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-// Helper meta-programming functions, to allow backward compatibility.
-//
-//   - Has_Is_facet_bad and Had_Facet_badness are used to detect if a model
-//     of the MeshFacetCriteria_3 concept follows the specifications of
-//     CGAL-3.7 (with Facet_badness) or later (with Is_facet_bad).
-//
-//   - Then the meta-function Get_Is_facet_bad is used to get the actual
-//     type, either Facet_criteria::Facet_badness or
-//      Facet_criteria::Is_facet_bad.
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_Is_facet_bad, Is_facet_bad, true)
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_Facet_badness, Facet_badness, false)
-
-// template class, used when use_facet_badness = false
-template <typename Facet_criteria,
-          bool use_facet_badness = (!Has_Is_facet_bad<Facet_criteria>::value) &&
-                                    Has_Facet_badness<Facet_criteria>::value >
-struct Get_Is_facet_bad {
-  typedef typename Facet_criteria::Is_facet_bad Type;
-  typedef Type type; // compatibility with Boost
-};
-
-// partial specialization when use_facet_badness == true
-template <typename Facet_criteria>
-struct Get_Is_facet_bad<Facet_criteria, true> {
-  typedef typename Facet_criteria::Facet_badness Type;
-  typedef Type type;
-};
-
-  // Predicate to know if a facet in a refinement queue is a zombie
-  // A facet is a pair <cell, index of the opposite vertex>.
-  // A facet is a "zombie" if at least one of its two adjacent cells
-  // has been erased. We test it thanks to the "erase counter" which
-  // is inside each cell (incremented by the compact container).
-  // In the refinement queue, we store a tuple
-  // <facet1, facet1_erase counter, facet2, facet2_erase_counter>
-  // where facet2 = mirror_facet(facet1) and facetx_erase_counter is
-  // the erase_counter of facetx's cell when added to the queue>
-  template<typename Facet>
-  class Facet_to_refine_is_not_zombie
-  {
-  public:
-    Facet_to_refine_is_not_zombie() {}
-
-    bool operator()(const CGAL::cpp11::tuple<
-      Facet, unsigned int, Facet, unsigned int> &f) const
-    {
-#ifdef _DEBUG
-      int f1_current_erase_counter = CGAL::cpp11::get<0>(f).first->erase_counter();
-      int f1_saved_erase_counter = CGAL::cpp11::get<1>(f);
-      int f2_current_erase_counter = CGAL::cpp11::get<2>(f).first->erase_counter();
-      int f2_saved_erase_counter = CGAL::cpp11::get<3>(f);
-      //f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1
-
-      /*if (f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1)
-      {
-#ifdef CGAL_LINKED_WITH_TBB
-        tbb::queuing_mutex mut;
-        tbb::queuing_mutex::scoped_lock l(mut);
-#endif
-
-        std::stringstream sstr;
-        Facet facet = CGAL::cpp11::get<0>(f);
-        sstr << "Facet 1 { " << std::endl
-        << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
-        << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-        << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
-        << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
-        << "}" << std::endl;
-
-        facet = CGAL::cpp11::get<2>(f);
-        sstr << "Facet 2 { " << std::endl
-        << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
-        << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-        << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
-        << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
-        << "}" << std::endl;
-
-        std::string s = sstr.str();
-        //std::cerr << s << std::endl;
-      }*/
-#endif
-      return (CGAL::cpp11::get<0>(f).first->erase_counter() == CGAL::cpp11::get<1>(f)
-        && CGAL::cpp11::get<2>(f).first->erase_counter() == CGAL::cpp11::get<3>(f) );
-    }
-  };
-
-/************************************************
-// Class Refine_facets_3_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Index, typename Facet, typename Concurrency_tag>
-class Refine_facets_3_base
-{
-protected:
-  Refine_facets_3_base() : m_last_vertex_index() {}
-
-  Index get_last_vertex_index() const
-  {
-    return m_last_vertex_index;
-  }
-
-  void set_last_vertex_index(Index i) const
-  {
-    m_last_vertex_index = i;
-  }
-
-#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
- || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
-
-  CGAL::cpp11::tuple<Facet, unsigned int, Facet, unsigned int>
-  from_facet_to_refinement_queue_element(const Facet &facet,
-                                         const Facet &mirror) const
-  {
-    return CGAL::cpp11::make_tuple(
-      facet, facet.first->erase_counter(),
-      mirror, mirror.first->erase_counter());
-  }
-
-public:
-  template<typename Container_element>
-  Facet extract_element_from_container_value(const Container_element &e) const
-  {
-    // We get the first Facet inside the tuple
-    return CGAL::cpp11::get<0>(e);
-  }
-
-#else
-
-  Facet
-  from_facet_to_refinement_queue_element(const Facet &facet,
-                                         const Facet &mirror) const
-  {
-    // Returns canonical facet
-    return (facet < mirror) ? facet : mirror;
-  }
-
-public:
-  template<typename Container_element>
-  Facet extract_element_from_container_value(const Container_element &e) const
-  {
-    return e;
-  }
-
-#endif
-
-protected:
-  /// Stores index of vertex that may be inserted into triangulation
-  mutable Index m_last_vertex_index;
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Index, typename Facet>
-class Refine_facets_3_base<Index, Facet, Parallel_tag>
-{
-protected:
-  Refine_facets_3_base() : m_last_vertex_index(Index()) {}
-
-  Index get_last_vertex_index() const
-  {
-    return m_last_vertex_index.local();
-  }
-
-  void set_last_vertex_index(Index i) const
-  {
-    m_last_vertex_index.local() = i;
-  }
-
-  CGAL::cpp11::tuple<Facet, unsigned int, Facet, unsigned int>
-  from_facet_to_refinement_queue_element(const Facet &facet,
-                                         const Facet &mirror) const
-  {
-    return CGAL::cpp11::make_tuple(
-      facet, facet.first->erase_counter(),
-      mirror, mirror.first->erase_counter());
-  }
-
-public:
-  template<typename Container_element>
-  Facet extract_element_from_container_value(const Container_element &e) const
-  {
-    // We get the first Facet inside the tuple
-    return CGAL::cpp11::get<0>(e);
-  }
-
-protected:
-  /// Stores index of vertex that may be inserted into triangulation
-  mutable tbb::enumerable_thread_specific<Index> m_last_vertex_index;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-/************************************************
-// Class Refine_facets_3
-//
-// Template parameters should be models of
-// Tr         : MeshTriangulation_3
-// Criteria   : SurfaceMeshFacetsCriteria_3
-// MeshDomain : MeshTraits_3
-//
-// Implements a Mesher_level for facets
-************************************************/
-
-// TODO document Container_ requirements
-template<class Tr,
-         class Criteria,
-         class MeshDomain,
-         class Complex3InTriangulation3,
-         class Previous_level_,
-         class Concurrency_tag,
-#ifdef CGAL_LINKED_WITH_TBB
-         class Container_ = typename boost::mpl::if_c // (parallel/sequential?)
-         <
-          boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
-          // Parallel
-# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
-          Meshes::Filtered_deque_container
-# else
-          Meshes::Filtered_multimap_container
-# endif
-          <
-            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
-                               typename Tr::Facet, unsigned int>,
-            typename Criteria::Facet_quality,
-            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
-            Concurrency_tag
-          >,
-          // Sequential
-# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
-          Meshes::Filtered_deque_container
-          <
-            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
-                               typename Tr::Facet, unsigned int>,
-            typename Criteria::Facet_quality,
-            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
-            Concurrency_tag
-          >
-# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE)
-          Meshes::Filtered_multimap_container
-          <
-            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
-                               typename Tr::Facet, unsigned int>,
-            typename Criteria::Facet_quality,
-            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
-            Concurrency_tag
-          >
-# else
-          Meshes::Double_map_container<typename Tr::Facet,
-                                       typename Criteria::Facet_quality>
-# endif
-         >::type // boost::if (parallel/sequential)
-
-#else // !CGAL_LINKED_WITH_TBB
-
-         // Sequential
-         class Container_ =
-# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
-          Meshes::Filtered_deque_container
-          <
-            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
-                               typename Tr::Facet, unsigned int>,
-            typename Criteria::Facet_quality,
-            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
-            Concurrency_tag
-          >
-# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE)
-          Meshes::Filtered_multimap_container
-          <
-            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
-                               typename Tr::Facet, unsigned int>,
-            typename Criteria::Facet_quality,
-            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
-            Concurrency_tag
-          >
-# else
-          Meshes::Double_map_container<typename Tr::Facet,
-                                       typename Criteria::Facet_quality>
-# endif
-#endif // CGAL_LINKED_WITH_TBB
->
-class Refine_facets_3
-: public Refine_facets_3_base<typename MeshDomain::Index, typename Tr::Facet,
-                              Concurrency_tag>
-, public Mesh_3::Mesher_level<Tr,
-                      Refine_facets_3<Tr,
-                                      Criteria,
-                                      MeshDomain,
-                                      Complex3InTriangulation3,
-                                      Previous_level_,
-                                      Concurrency_tag,
-                                      Container_>,
-                      typename Tr::Facet,
-                      Previous_level_,
-                      Triangulation_mesher_level_traits_3<Tr>,
-                      Concurrency_tag >
-, public Container_
-, public No_after_no_insertion
-, public No_before_conflicts
-{
-  // Self
-  typedef Refine_facets_3<Tr,
-                          Criteria,
-                          MeshDomain,
-                          Complex3InTriangulation3,
-                          Previous_level_,
-                          Concurrency_tag,
-                          Container_>                  Self;
-
-  typedef Refine_facets_3_base<typename MeshDomain::Index,
-                               typename Tr::Facet,
-                               Concurrency_tag>        Base;
-
-  typedef Mesher_level<Tr,
-                      Refine_facets_3<Tr,
-                                      Criteria,
-                                      MeshDomain,
-                                      Complex3InTriangulation3,
-                                      Previous_level_,
-                                      Concurrency_tag,
-                                      Container_>,
-                      typename Tr::Facet,
-                      Previous_level_,
-                      Triangulation_mesher_level_traits_3<Tr>,
-                      Concurrency_tag >               Base_ML;
-
-  typedef typename Tr::Lock_data_structure Lock_data_structure;
-
-public:
-  using Base_ML::add_to_TLS_lists;
-  using Base_ML::splice_local_lists;
-
-  typedef Container_ Container; // Because we need it in Mesher_level
-  typedef typename Container::Element Container_element;
-  typedef typename Tr::Point Point;
-  typedef typename Tr::Facet Facet;
-  typedef typename Tr::Vertex_handle Vertex_handle;
-  typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
-  typedef Complex3InTriangulation3 C3T3;
-
-  /// Constructor
-  // For sequential
-  Refine_facets_3(Tr& triangulation,
-                  const Criteria& criteria,
-                  const MeshDomain& oracle,
-                  Previous_level_& previous,
-                  C3T3& c3t3);
-  // For parallel
-  Refine_facets_3(Tr& triangulation,
-                  const Criteria& criteria,
-                  const MeshDomain& oracle,
-                  Previous_level_& previous,
-                  C3T3& c3t3,
-                  Lock_data_structure *lock_ds,
-                  WorksharingDataStructureType *worksharing_ds);
-
-  /// Destructor
-  virtual ~Refine_facets_3() { }
-
-  /// Get a reference on triangulation
-  Tr& triangulation_ref_impl() { return r_tr_; }
-  const Tr& triangulation_ref_impl() const { return r_tr_; }
-
-  /// Initialization function
-  void scan_triangulation_impl();
-
-  int number_of_bad_elements_impl();
-
-  Point circumcenter_impl(const Facet& facet) const
-  {
-    return get_facet_surface_center(facet);
-  }
-
-  template <typename Mesh_visitor>
-  void before_next_element_refinement_in_superior_impl(Mesh_visitor visitor)
-  {
-    // Before refining any cell, we refine the facets in the local refinement
-    // queue
-    this->treat_local_refinement_queue(visitor);
-  }
-
-  void before_next_element_refinement_impl()
-  {
-  }
-
-  Facet get_next_element_impl()
-  {
-    return this->extract_element_from_container_value(
-      Container_::get_next_element_impl());
-  }
-
-  Facet get_next_local_element_impl()
-  {
-    return extract_element_from_container_value(
-      Container_::get_next_local_element_impl());
-  }
-
-  /// Gets the point to insert from the element to refine
-  Point refinement_point_impl(const Facet& facet) const
-  {
-#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
-    const Cell_handle c = facet.first;
-    const int i = facet.second;
-    std::cerr << "Facet ("
-              << c->vertex((i+1)&3)->point() << " , "
-              << c->vertex((i+2)&3)->point() << " , "
-              << c->vertex((i+3)&3)->point() << ") : refinement point is "
-              << get_facet_surface_center(facet) << std::endl;
-#endif
-    CGAL_assertion (is_facet_on_surface(facet));
-    this->set_last_vertex_index(get_facet_surface_center_index(facet));
-    return get_facet_surface_center(facet);
-  };
-
-  /// Tests if p encroaches facet from zone
-  // For sequential
-  Mesher_level_conflict_status
-  test_point_conflict_from_superior_impl(const Point& p, Zone& zone);
-
-  /// Tests if p encroaches facet from zone
-  // For parallel
-  template <typename Mesh_visitor>
-  Mesher_level_conflict_status
-  test_point_conflict_from_superior_impl(const Point& p, Zone& zone,
-                                         Mesh_visitor &visitor);
-
-  /// Useless here
-  Mesher_level_conflict_status private_test_point_conflict_impl(
-      const Point& p,
-      Zone& zone)
-  {
-    if( zone.locate_type == Tr::VERTEX )
-    {
-      std::stringstream sstr;
-      sstr << "(" << p << ") is already inserted on surface.\n";
-      CGAL_error_msg(sstr.str().c_str());
-      return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
-    }
-    else
-      return NO_CONFLICT;
-  }
-
-  /// Returns the conflicts zone
-  Zone conflicts_zone_impl(const Point& point
-                           , const Facet& facet
-                           , bool &facet_is_in_its_cz);
-  Zone conflicts_zone_impl(const Point& point
-                           , const Facet& facet
-                           , bool &facet_is_in_its_cz
-                           , bool &could_lock_zone);
-
-  /// Job to do before insertion
-  void before_insertion_impl(const Facet& facet,
-                             const Point& point,
-                             Zone& zone);
-
-  /// Job to do after insertion
-  void after_insertion_impl(const Vertex_handle& v)
-  {
-    restore_restricted_Delaunay(v);
-  }
-
-  /// Insert p into triangulation
-  Vertex_handle insert_impl(const Point& p, const Zone& zone);
-
-  /// Restore restricted Delaunay ; may be call by Cells_mesher visitor
-  void restore_restricted_Delaunay(const Vertex_handle& v);
-
-  bool try_lock_element(const Facet &f, int lock_radius = 0) const
-  {
-    return this->triangulation().try_lock_facet(f, lock_radius);
-  }
-
-  /// debug info: class name
-  std::string debug_info_class_name_impl() const
-  {
-    return "Refine_facets_3";
-  }
-
-  /// debug info
-  std::string debug_info() const
-  {
-    std::stringstream s;
-    s << Container_::size();
-    return s.str();
-  }
-
-  /// debug_info_header
-  std::string debug_info_header() const
-  {
-    return "#facets to refine";
-  }
-
-  std::string debug_info_element_impl(const Facet &facet) const
-  {
-    std::stringstream sstr;
-    sstr << "Facet { " << std::endl
-    << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
-    << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-    << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
-    << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
-    << "}" << std::endl;
-
-    return sstr.str();
-  }
-
-  /// for debugging
-  std::string display_dual(Facet f) const
-  {
-    std::stringstream stream;
-    stream.precision(17);
-    Object dual = r_tr_.dual(f);
-
-    if ( const Segment_3* p_segment = object_cast<Segment_3>(&dual) ) {
-      stream << "Segment(" << p_segment->source()
-             << " , " << p_segment->target() << ")";
-    }
-    else if ( const Ray_3* p_ray = object_cast<Ray_3>(&dual) ) {
-      stream << "Ray(" << p_ray->point(0)
-             << " , " << p_ray->point(1)
-             << "), with vector (" << p_ray->to_vector() << ")";
-    }
-    else if ( const Line_3* p_line = object_cast<Line_3>(&dual) ) {
-      stream << "Line(point=" << p_line->point(0)
-             << " , vector=" << p_line->to_vector() << ")";
-    }
-    return stream.str();
-  }
-
-#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
-  std::size_t queue_size() const { return this->size(); }
-#endif
-
-
-private:
-
-  // Functor for scan_triangulation_impl function
-  template <typename Refine_facets_>
-  class Scan_facet
-  {
-    Refine_facets_ & m_refine_facets;
-
-    typedef typename Refine_facets_::Facet Facet;
-
-  public:
-    // Constructor
-    Scan_facet(Refine_facets_ & rf)
-    : m_refine_facets(rf)
-    {}
-
-    // Constructor
-    Scan_facet(const Scan_facet &sf)
-    : m_refine_facets(sf.m_refine_facets)
-    {}
-
-    // operator()
-    // f cannot be const, see treat_new_facet signature
-    void operator()( Facet f ) const
-    {
-      m_refine_facets.treat_new_facet(f);
-    }
-  };
-
-
-  //-------------------------------------------------------
-  // Private types
-  //-------------------------------------------------------
-  typedef typename Tr::Geom_traits Gt;
-  typedef typename Tr::Cell_handle Cell_handle;
-  typedef typename Criteria::Facet_quality Quality;
-  typedef typename Get_Is_facet_bad<Criteria>::Type Is_facet_bad;
-  typedef typename MeshDomain::Surface_patch_index Surface_patch_index;
-  typedef typename MeshDomain::Index Index;
-  typedef typename Gt::Segment_3 Segment_3;
-  typedef typename Gt::Ray_3 Ray_3;
-  typedef typename Gt::Line_3 Line_3;
-
-  typedef typename boost::optional<
-    CGAL::cpp11::tuple<Surface_patch_index, Index, Point> >
-                                                      Facet_properties;
-
-private:
-  /// Get mirror facet
-  Facet mirror_facet(const Facet& f) const { return r_tr_.mirror_facet(f); };
-
-  /// Returns canonical facet of facet
-  Facet canonical_facet(const Facet& facet) const
-  {
-    const Facet mirror = mirror_facet(facet);
-    return ( (facet < mirror)?facet:mirror );
-  }
-
-  /// Returns true if f has already been visited
-  bool is_facet_visited(const Facet& f) const
-  {
-    return f.first->is_facet_visited(f.second);
-  }
-
-  /// Sets facet f to visited
-  void set_facet_visited(Facet& f) const
-  {
-    f.first->set_facet_visited(f.second);
-  }
-
-  /// Sets facet f to not visited
-  void reset_facet_visited(Facet& f) const
-  {
-    f.first->reset_visited(f.second);
-  }
-
-  /// Sets facet f and it's mirror one surface center to point p
-  void set_facet_surface_center(const Facet& f,
-                                const Point& p,
-                                const Index& index) const
-  {
-    const Facet mirror = mirror_facet(f);
-
-    f.first->set_facet_surface_center(f.second, p);
-    mirror.first->set_facet_surface_center(mirror.second, p);
-
-    f.first->set_facet_surface_center_index(f.second,index);
-    mirror.first->set_facet_surface_center_index(mirror.second,index);
-  }
-
-  /// Returns facet surface center of \c f
-  Point get_facet_surface_center(const Facet& f) const
-  {
-    return f.first->get_facet_surface_center(f.second);
-  }
-
-  /// Returns index of surface center of facet \c f
-  Index get_facet_surface_center_index(const Facet& f) const
-  {
-    return f.first->get_facet_surface_center_index(f.second);
-  }
-
-  /// Sets \c f to surface facets, with index \c index
-  void set_facet_on_surface(const Facet& f,
-                            const Surface_patch_index& index)
-  {
-    r_c3t3_.add_to_complex(f, index);
-  }
-
-  /// Returns index of facet \c f
-  Surface_patch_index get_facet_surface_index(const Facet& f) const
-  {
-    return r_c3t3_.surface_patch_index(f.first, f.second);
-  }
-
-  /// Removes \c f from surface facets
-  void remove_facet_from_surface(const Facet& f)
-  {
-    r_c3t3_.remove_from_complex(f);
-  }
-
-  /// Returns to if f is on surface
-  bool is_facet_on_surface(const Facet& f) const
-  {
-    return r_c3t3_.is_in_complex(f) ;
-  }
-
-  /// Sets index and dimension of vertex \v
-  void set_vertex_properties(Vertex_handle& v, const Index& index)
-  {
-    r_c3t3_.set_index(v, index);
-    // Set dimension of v: v is on surface by construction, so dimension=2
-    v->set_dimension(2);
-  }
-
-  /// Computes facet properties and add facet to the refinement queue if needed
-  void treat_new_facet(Facet& facet);
-
-  /// Compute the exact dual of a facet
-  Object dual_exact(const Facet & f) const;
-
-  /**
-   * Computes at once is_facet_on_surface and facet_surface_center.
-   * @param facet The input facet
-   * @return \c true if \c facet is on surface, \c false otherwise
-   */
-  void compute_facet_properties(const Facet& facet, Facet_properties& fp,
-                                bool force_exact = false ) const;
-
-  /// Returns true if point encroaches facet
-  bool is_facet_encroached(const Facet& facet, const Point& point) const;
-
-  /// Returns whethere an encroached facet is refinable or not
-  bool is_encroached_facet_refinable(Facet& facet) const;
-
-  /// Insert facet into refinement queue
-  void insert_bad_facet(Facet& facet, const Quality& quality)
-  {
-    // Insert the facet and its mirror
-    this->add_bad_element(
-      this->from_facet_to_refinement_queue_element(facet, mirror_facet(facet)),
-      quality);
-  }
-
-  /// Insert encroached facet into refinement queue
-  void insert_encroached_facet_in_queue(Facet& facet)
-  {
-    insert_bad_facet(facet,Quality());
-  }
-
-  /// Removes facet from refinement queue
-  // Sequential
-  void remove_bad_facet(Facet& facet, Sequential_tag)
-  {
-    // If sequential AND NOT lazy, remove cell from refinement queue
-#if !defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
- && !defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
-    // Remove canonical facet
-    Facet canonical_facet = this->canonical_facet(facet);
-    this->remove_element(canonical_facet);
-#endif
-  }
-#ifdef CGAL_LINKED_WITH_TBB
-  /// Removes facet from refinement queue
-  // Parallel: it's always lazy, so do nothing
-  void remove_bad_facet(Facet&, Parallel_tag) {}
-#endif // CGAL_LINKED_WITH_TBB
-
-  /**
-   * Action to perform on a facet inside the conflict zone before insertion
-   * @return true if source_facet is the same as facet or mirror(facet)
-   */
-  bool before_insertion_handle_facet_in_conflict_zone(Facet& facet,
-                                                     const Facet& source_facet);
-
-  /**
-   * Action to perform on a facet on the boundary of the conflict zone
-   * before insertion
-   * @return true if source_facet is the same as facet or mirror(facet)
-   */
-  bool before_insertion_handle_facet_on_conflict_zone(Facet& facet,
-                                                      const Facet& source_facet)
-  {
-    // perform the same operations as for an internal facet
-    return before_insertion_handle_facet_in_conflict_zone(facet, source_facet);
-  }
-
-  /// Action to perform on a facet incident to the new vertex
-  void after_insertion_handle_incident_facet(Facet& facet);
-
-  /// Action to perform on a facet opposite to the new vertex
-  void after_insertion_handle_opposite_facet(Facet& facet)
-  {
-    // perform the same operations as for a facet incident to the new vertex
-    after_insertion_handle_incident_facet(facet);
-  }
-
-private:
-  /// The triangulation
-  Tr& r_tr_;
-  /// The facet criteria
-  const Criteria& r_criteria_;
-  /// The oracle
-  const MeshDomain& r_oracle_;
-  /// The mesh result
-  C3T3& r_c3t3_;
-
-private:
-  // Disabled copy constructor
-  Refine_facets_3(const Self& src);
-  // Disabled assignment operator
-  Self& operator=(const Self& src);
-};  // end class Refine_facets_3
-
-
-
-
-// For sequential
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-Refine_facets_3(Tr& triangulation,
-                const Cr& criteria,
-                const MD& oracle,
-                P_& previous,
-                C3T3& c3t3)
-  : Mesher_level<Tr, Self, Facet, P_,
-      Triangulation_mesher_level_traits_3<Tr>, Ct>(previous)
-  , C_()
-  , No_after_no_insertion()
-  , No_before_conflicts()
-  , r_tr_(triangulation)
-  , r_criteria_(criteria)
-  , r_oracle_(oracle)
-  , r_c3t3_(c3t3)
-{
-
-}
-
-// For parallel
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-Refine_facets_3(Tr& triangulation,
-                const Cr& criteria,
-                const MD& oracle,
-                P_& previous,
-                C3T3& c3t3,
-                Lock_data_structure *lock_ds,
-                WorksharingDataStructureType *worksharing_ds)
-  : Mesher_level<Tr, Self, Facet, P_,
-      Triangulation_mesher_level_traits_3<Tr>, Ct>(previous)
-  , C_()
-  , No_after_no_insertion()
-  , No_before_conflicts()
-  , r_tr_(triangulation)
-  , r_criteria_(criteria)
-  , r_oracle_(oracle)
-  , r_c3t3_(c3t3)
-{
-  Base::set_lock_ds(lock_ds);
-  Base::set_worksharing_ds(worksharing_ds);
-}
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-scan_triangulation_impl()
-{
-  typedef typename Tr::Finite_facets_iterator Finite_facet_iterator;
-
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-#ifdef CGAL_MESH_3_VERY_VERBOSE
-  std::cerr
-    << "Vertices: " << r_c3t3_.triangulation().number_of_vertices() << std::endl
-    << "Facets  : " << r_c3t3_.number_of_facets_in_complex() << std::endl
-    << "Tets    : " << r_c3t3_.number_of_cells_in_complex() << std::endl;
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Ct, Parallel_tag>::value)
-  {
-# if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << "Scanning triangulation for bad facets (in parallel) - "
-      "number of finite facets = "
-      << r_c3t3_.triangulation().number_of_finite_facets() << "..."
-      << std::endl;
-# endif
-    add_to_TLS_lists(true);
-
-    // PARALLEL_DO
-    tbb::parallel_do(
-      r_tr_.finite_facets_begin(), r_tr_.finite_facets_end(),
-      Scan_facet<Self>(*this) 
-    );
-
-    splice_local_lists();
-    add_to_TLS_lists(false);
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << "Scanning triangulation for bad facets (sequential) - "
-      "number of finite facets = "
-      << r_c3t3_.triangulation().number_of_finite_facets() << "..."
-      << std::endl;
-#endif
-    for(Finite_facet_iterator facet_it = r_tr_.finite_facets_begin();
-        facet_it != r_tr_.finite_facets_end();
-        ++facet_it)
-    {
-      // Cannot be const, see treat_new_facet signature
-      Facet facet = *facet_it;
-      /*std::cerr << "*" << *facet.first->vertex((facet.second+1)%4)  << std::endl
-          << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-          << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl;*/
-      treat_new_facet(facet);
-    }
-  }
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "==== Facet scan: " << t.elapsed() << " seconds ===="
-            << std::endl << std::endl;
-#endif
-
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-  std::cerr << "Number of bad facets: " << C_::size() << std::endl;
-#endif
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << "Refining... ";
-  Base_ML::m_timer.reset();
-#endif
-}
-
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-int
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-number_of_bad_elements_impl()
-{
-  typedef typename Tr::Finite_facets_iterator Finite_facet_iterator;
-
-  int count = 0, count_num_bad_surface_facets = 0;
-  int num_internal_facets_that_should_be_on_surface = 0;
-#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-  std::cerr << "Scanning triangulation for bad facets - "
-    "number of finite facets = "
-    << r_c3t3_.triangulation().number_of_finite_facets() << "...";
-#endif
-  int num_tested_facets = 0;
-  for(Finite_facet_iterator facet_it = r_tr_.finite_facets_begin();
-      facet_it != r_tr_.finite_facets_end();
-      ++facet_it)
-  {
-    Facet facet = *facet_it;
-    Facet_properties properties;
-    compute_facet_properties(facet, properties);
-
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-    //facet.first->mark = 0;
-#endif
-
-    // On surface?
-    if ( properties )
-    {
-      // This facet should be on surface...
-      if (!is_facet_on_surface(facet))
-      {
-        std::cerr << "\n\n*** The facet f is on surface but is NOT MARKED ON SURFACE. " << std::endl;
-
-        Cell_handle c = facet.first;
-        int ind = facet.second;
-        Cell_handle mc = mirror_facet(facet).first;
-        int mind = mirror_facet(facet).second;
-
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-        c->mark2 = ind;
-#endif
-
-        // c and mc are the cells adjacent to f
-        // browse each facet ff of c and mc, and mark it if it is "on surface"
-        int num_erroneous_surface_facets_in_c = 0;
-        int num_erroneous_surface_facets_in_mc = 0;
-        int num_real_surface_facets_in_c = 0;
-        int num_real_surface_facets_in_mc = 0;
-        for (int i = 0 ; i < 4 ; ++i)
-        {
-          if (i != ind)
-          {
-            const Facet f1(c, i);
-            if (is_facet_on_surface(f1))
-            {
-              std::cerr << "*** f1 is " << (r_criteria_(f1) ? "bad" : "good") << std::endl;
-
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-              c->mark = i;
-#endif
-              Facet_properties properties;
-              compute_facet_properties(f1, properties);
-              if (properties)
-                ++num_real_surface_facets_in_c;
-              else
-                ++num_erroneous_surface_facets_in_c;
-            }
-          }
-          if (i != mind)
-          {
-            const Facet f2(c, i);
-            if (is_facet_on_surface(f2))
-            {
-              std::cerr << "*** f2 is " << (r_criteria_(f2) ? "bad" : "good") << std::endl;
-
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-              mc->mark = i;
-#endif
-              Facet_properties properties;
-              compute_facet_properties(f2, properties);
-              if (properties)
-                ++num_real_surface_facets_in_mc;
-              else
-                ++num_erroneous_surface_facets_in_mc;
-            }
-          }
-        }
-
-        std::cerr
-          << "*** Num of erroneous surface facets in c: " << num_erroneous_surface_facets_in_c << std::endl
-          << "*** Num of erroneous surface facets in mc: " << num_erroneous_surface_facets_in_mc << std::endl
-          << "*** Num of real surface facets in c: " << num_real_surface_facets_in_c << std::endl
-          << "*** Num of real surface facets in mc: " << num_real_surface_facets_in_mc << std::endl;
-
-        const bool is_c_in_domain = r_oracle_.is_in_domain_object()(r_tr_.dual(c));
-        const bool is_mc_in_domain = r_oracle_.is_in_domain_object()(r_tr_.dual(mc));
-
-        std::cerr << "*** Is in complex? c is marked in domain: " << r_c3t3_.is_in_complex(c)
-          << " / c is really in domain: " << is_c_in_domain
-          << " / mc is marked in domain: " << r_c3t3_.is_in_complex(mc)
-          << " / mc is really in domain: " << is_mc_in_domain
-          << std::endl;
-
-
-        // ... if it's not, count it
-        ++num_internal_facets_that_should_be_on_surface;
-
-      }
-
-      const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
-      const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
-      const Point& surface_center = CGAL::cpp11::get<2>(*properties);
-
-      // Facet is on surface: set facet properties
-      //set_facet_surface_center(facet, surface_center, surface_center_index);
-      //set_facet_on_surface(facet, surface_index);
-
-      const Is_facet_bad is_facet_bad = r_criteria_(facet);
-      if ( is_facet_bad )
-      {
-        ++count;
-        if (is_facet_on_surface(facet))
-          ++count_num_bad_surface_facets;
-
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-        //facet.first->mark = facet.second;
-#endif
-      }
-      ++ num_tested_facets;
-    }
-    // Not on surface?
-    else
-    {
-      // Facet is not on surface
-      //remove_facet_from_surface(facet);
-
-      // Marked on surface?
-      if (is_facet_on_surface(facet))
-      {
-        std::cerr << "************** The facet is marked on surface whereas it's not! **************" << std::endl;
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-        facet.first->mark = facet.second;
-#endif
-      }
-    }
-  }
-
-  /*std::cerr << "done (" << num_internal_facets_that_should_be_on_surface
-    << " facets which were internal facets were added to the surface)." << std::endl;*/
-  std::cerr << "done (" << num_internal_facets_that_should_be_on_surface
-    << " facets that should be on surface are actually internal facets)." << std::endl;
-  std::cerr << std::endl << "Num_tested_facets = " << num_tested_facets << std::endl;
-  std::cerr << std::endl << "Num bad surface-marked facets = " << count_num_bad_surface_facets << std::endl;
-
-  return count;
-}
-
-// For sequential
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-Mesher_level_conflict_status
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-test_point_conflict_from_superior_impl(const Point& point, Zone& zone)
-{
-  typedef typename Zone::Facets_iterator Facet_iterator;
-
-  for (Facet_iterator facet_it = zone.internal_facets.begin();
-       facet_it != zone.internal_facets.end();
-       ++facet_it)
-  {
-    // surface facets which are internal facets of the conflict zone are
-    // encroached
-    if( is_facet_on_surface(*facet_it) )
-    {
-      if ( is_encroached_facet_refinable(*facet_it) )
-      {
-        insert_encroached_facet_in_queue(*facet_it);
-        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
-      }
-      else
-        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
-    }
-  }
-
-  for (Facet_iterator facet_it = zone.boundary_facets.begin();
-       facet_it != zone.boundary_facets.end();
-       ++facet_it)
-  {
-    if( is_facet_encroached(*facet_it, point) )
-    {
-      // Insert already existing surface facet into refinement queue
-      if ( is_encroached_facet_refinable(*facet_it) )
-      {
-        insert_encroached_facet_in_queue(*facet_it);
-        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
-      }
-      else
-        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
-    }
-  }
-
-  return NO_CONFLICT;
-}
-
-// For parallel
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-template <typename Mesh_visitor>
-Mesher_level_conflict_status
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-test_point_conflict_from_superior_impl(const Point& point, Zone& zone,
-                                       Mesh_visitor &visitor)
-{
-  typedef typename Zone::Facets_iterator Facet_iterator;
-
-  for (Facet_iterator facet_it = zone.internal_facets.begin();
-       facet_it != zone.internal_facets.end();
-       ++facet_it)
-  {
-    // surface facets which are internal facets of the conflict zone are
-    // encroached
-    if( is_facet_on_surface(*facet_it) )
-    {
-      if ( is_encroached_facet_refinable(*facet_it) )
-      {
-        // Even if it doesn't succeed, it will be tried again
-        this->try_to_refine_element(*facet_it, visitor);
-        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
-      }
-      else
-        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
-    }
-  }
-
-  for (Facet_iterator facet_it = zone.boundary_facets.begin();
-       facet_it != zone.boundary_facets.end();
-       ++facet_it)
-  {
-    if( is_facet_encroached(*facet_it, point) )
-    {
-      // Insert already existing surface facet into refinement queue
-      if ( is_encroached_facet_refinable(*facet_it) )
-      {
-        // Even if it doesn't succeed, it will be tried again
-        this->try_to_refine_element(*facet_it, visitor);
-        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
-      }
-      else
-        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
-    }
-  }
-
-  return NO_CONFLICT;
-}
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::Zone
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-conflicts_zone_impl(const Point& point
-                    , const Facet& facet
-                    , bool &facet_is_in_its_cz)
-{
-  Zone zone;
-
-  // TODO may be avoid the locate here
-  zone.cell = r_tr_.locate(point,
-                           zone.locate_type,
-                           zone.i,
-                           zone.j,
-                           facet.first);
-
-  if(zone.locate_type != Tr::VERTEX)
-  {
-    const Facet *p_facet = (facet == Facet() ? 0 : &facet);
-
-    r_tr_.find_conflicts(point,
-                         zone.cell,
-                         std::back_inserter(zone.boundary_facets),
-                         std::back_inserter(zone.cells),
-                         std::back_inserter(zone.internal_facets)
-                         , 0
-                         , p_facet
-                         , &facet_is_in_its_cz);
-
-    if (p_facet != 0 && !facet_is_in_its_cz)
-    {
-# ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << "Info: the facet is not in its conflict zone. "
-        "Switching to exact computation." << std::endl;
-# endif
-      
-      Facet_properties properties;
-      compute_facet_properties(facet, properties, /*force_exact=*/true);
-      if ( properties )
-      {
-        const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
-        const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
-        const Point& surface_center = CGAL::cpp11::get<2>(*properties);
-
-        // Facet is on surface: set facet properties
-        set_facet_surface_center(facet, surface_center, surface_center_index);
-        set_facet_on_surface(facet, surface_index);
-      }
-      else
-      {
-        // Facet is not on surface
-        remove_facet_from_surface(facet);
-      }
-    }
-  }
-
-  return zone;
-}
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::Zone
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-conflicts_zone_impl(const Point& point
-                    , const Facet& facet
-                    , bool &facet_is_in_its_cz
-                    , bool &could_lock_zone)
-{
-  Zone zone;
-
-  // TODO may be avoid the locate here
-  zone.cell = r_tr_.locate(point,
-                           zone.locate_type,
-                           zone.i,
-                           zone.j,
-                           facet.first,
-                           &could_lock_zone);
-
-  if(could_lock_zone && zone.locate_type != Tr::VERTEX)
-  {
-    const Facet *p_facet = (facet == Facet() ? 0 : &facet);
-
-    r_tr_.find_conflicts(point,
-                         zone.cell,
-                         std::back_inserter(zone.boundary_facets),
-                         std::back_inserter(zone.cells),
-                         std::back_inserter(zone.internal_facets)
-                         , &could_lock_zone
-                         , p_facet
-                         , &facet_is_in_its_cz);
-
-    if (could_lock_zone && p_facet != 0 && !facet_is_in_its_cz)
-    {
-#ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << "Info: the facet is not in its conflict zone. "
-        "Switching to exact computation." << std::endl;
-#endif
-
-      Facet_properties properties;
-      compute_facet_properties(facet, properties, /*force_exact=*/true);
-      if ( properties )
-      {
-        const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
-        const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
-        const Point& surface_center = CGAL::cpp11::get<2>(*properties);
-
-        // Facet is on surface: set facet properties
-        set_facet_surface_center(facet, surface_center, surface_center_index);
-        set_facet_on_surface(facet, surface_index);
-      }
-      else
-      {
-        // Facet is not on surface
-        remove_facet_from_surface(facet);
-      }
-    }
-  }
-
-  return zone;
-}
-
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-before_insertion_impl(const Facet& facet,
-                      const Point& point,
-                      Zone& zone)
-{
-  typedef typename Zone::Facets_iterator Facets_iterator;
-
-  bool source_facet_is_in_conflict = false;
-
-  /*std::cerr << "before_insertion_impl:" << std::endl
-    << "* " << *facet.first->vertex((facet.second+1)%4)  << std::endl
-    << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-    << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl;*/
-
-  // Iterate on conflict zone facets
-  for (Facets_iterator facet_it = zone.internal_facets.begin();
-       facet_it != zone.internal_facets.end();
-       ++facet_it)
-  {
-    if (before_insertion_handle_facet_in_conflict_zone(*facet_it, facet) )
-    {
-      source_facet_is_in_conflict = true;
-    }
-  }
-
-  for (Facets_iterator facet_it = zone.boundary_facets.begin() ;
-       facet_it != zone.boundary_facets.end() ;
-       ++facet_it)
-  {
-    if (before_insertion_handle_facet_on_conflict_zone(*facet_it, facet))
-    {
-      source_facet_is_in_conflict = true;
-    }
-  }
-
-  // source_facet == Facet() when this->before_insertion_impl is
-  // called from a Mesh_3 visitor.
-  if ( !source_facet_is_in_conflict && facet != Facet()  )
-  {
-    const Facet source_other_side = mirror_facet(facet);
-
-    using boost::io::group;
-    using std::setprecision;
-
-    std::stringstream error_msg;
-    error_msg <<
-      boost::format("Mesh_3 ERROR: "
-                    "A facet is not in conflict with its refinement point!\n"
-                    "Debugging informations:\n"
-                    "  Facet: (%1%, %2%) = (%6%, %7%, %8%)\n"
-                    "  Dual: %3%\n"
-                    "  Refinement point: %5%\n"
-                    "  Cells adjacent to facet:\n"
-                    "    ( %9% , %10% , %11% , %12% )\n"
-                    "    ( %13% , %14% , %15% , %16% )\n")
-      % group(setprecision(17), (&*facet.first))
-      % group(setprecision(17), facet.second)
-      % display_dual(facet)
-      % 0 // dummy: %4% no longer used
-      % group(setprecision(17), point)
-      % group(setprecision(17), facet.first->vertex((facet.second + 1)&3)->point())
-      % group(setprecision(17), facet.first->vertex((facet.second + 2)&3)->point())
-      % group(setprecision(17), facet.first->vertex((facet.second + 3)&3)->point())
-      % facet.first->vertex(0)->point()
-      % facet.first->vertex(1)->point()
-      % facet.first->vertex(2)->point()
-      % facet.first->vertex(3)->point()
-      % source_other_side.first->vertex(0)->point()
-      % source_other_side.first->vertex(1)->point()
-      % source_other_side.first->vertex(2)->point()
-      % source_other_side.first->vertex(3)->point();
-
-    CGAL_error_msg(error_msg.str().c_str());
-  }
-}
-
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::Vertex_handle
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-insert_impl(const Point& point,
-            const Zone& zone)
-{
-  if( zone.locate_type == Tr::VERTEX )
-  {
-    // TODO look at this
-    std::cerr<<"VERTEX\n";
-    return zone.cell->vertex(zone.i);
-  }
-
-  const Facet& facet = *(zone.boundary_facets.begin());
-
-  Vertex_handle v = r_tr_.insert_in_hole(point,
-                                         zone.cells.begin(),
-                                         zone.cells.end(),
-                                         facet.first,
-                                         facet.second);
-
-  // Set index and dimension of v
-  set_vertex_properties(v, Base::get_last_vertex_index());
-
-  return v;
-}
-
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-restore_restricted_Delaunay(const Vertex_handle& vertex)
-{
-  typedef std::vector<Cell_handle> Cell_handle_vector;
-  typedef typename Cell_handle_vector::iterator Cell_handle_vector_iterator;
-
-  // Update incident facets
-  Cell_handle_vector cells;
-  r_tr_.incident_cells(vertex, std::back_inserter(cells));
-
-  for(Cell_handle_vector_iterator cell_it = cells.begin();
-      cell_it != cells.end();
-      ++cell_it)
-  {
-    // Look at all four facets of the cell, starting with the
-    // facet opposite to the new vertex
-    int index = (*cell_it)->index(vertex);
-
-    Facet opposite_facet(*cell_it, index);
-    after_insertion_handle_opposite_facet(opposite_facet);
-
-    for (int i = 1; i <= 3; ++i)
-    {
-      Facet incident_facet(*cell_it, (index+i)&3);
-      after_insertion_handle_incident_facet(incident_facet);
-    }
-  }
-}
-
-//-------------------------------------------------------
-// Private methods
-//-------------------------------------------------------
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-treat_new_facet(Facet& facet)
-{
-  // Treat facet
-  Facet_properties properties;
-  compute_facet_properties(facet, properties);
-  if ( properties )
-  {
-    const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
-    const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
-    const Point& surface_center = CGAL::cpp11::get<2>(*properties);
-
-    // Facet is on surface: set facet properties
-    set_facet_surface_center(facet, surface_center, surface_center_index);
-    set_facet_on_surface(facet, surface_index);
-
-    // Insert facet into refinement queue if needed
-    const Is_facet_bad is_facet_bad = r_criteria_(facet);
-
-    if ( is_facet_bad )
-    {
-      insert_bad_facet(facet, *is_facet_bad);
-
-      /*std::cerr << "INSERT BAD FACET : " << std::endl
-        << "* " << *facet.first->vertex((facet.second+1)%4)  << std::endl
-        << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
-        << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl
-        << "  Quality=" << is_facet_bad->second << std::endl;*/
-    }
-  }
-  else
-  {
-    // Facet is not on surface
-    remove_facet_from_surface(facet);
-  }
-
-  // Set facet visited
-  Facet mirror = mirror_facet(facet);
-  set_facet_visited(facet);
-  set_facet_visited(mirror);
-}
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-Object
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-dual_exact(const Facet& facet) const
-{
-  typedef typename Gt::Bare_point Bare_point;
-
-  Cell_handle c = facet.first;
-  int i = facet.second;
-  Cell_handle n = c->neighbor(i);
-  if ( ! r_tr_.is_infinite(c) && ! r_tr_.is_infinite(n) )
-  {
-    Bare_point p1 = Gt().construct_weighted_circumcenter_3_object()(
-      c->vertex(0)->point(),
-      c->vertex(1)->point(),
-      c->vertex(2)->point(),
-      c->vertex(3)->point(),
-      true);
-    Bare_point p2 = Gt().construct_weighted_circumcenter_3_object()(
-      n->vertex(0)->point(),
-      n->vertex(1)->point(),
-      n->vertex(2)->point(),
-      n->vertex(3)->point(),
-      true);
-    return Gt().construct_object_3_object()(
-      Gt().construct_segment_3_object()(p1, p2));
-  }
-
-  // either n or c is infinite
-  int in;
-  if ( r_tr_.is_infinite(c) )
-    in = n->index(c);
-  else {
-    n = c;
-    in = i;
-  }
-  // n now denotes a finite cell, either c or c->neighbor(i)
-  int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
-  if ( (in&1) == 1 )
-    std::swap(ind[0], ind[1]);
-  const Point& p = n->vertex(ind[0])->point();
-  const Point& q = n->vertex(ind[1])->point();
-  const Point& r = n->vertex(ind[2])->point();
-
-  typename Gt::Line_3 l = Gt().construct_perpendicular_line_3_object()
-    ( Gt().construct_plane_3_object()(p,q,r),
-      Gt().construct_weighted_circumcenter_3_object()(p,q,r) );
-  return Gt().construct_object_3_object()(
-    Gt().construct_ray_3_object()(
-      Gt().construct_weighted_circumcenter_3_object()(
-        n->vertex(0)->point(),
-        n->vertex(1)->point(),
-        n->vertex(2)->point(),
-        n->vertex(3)->point(),
-        true),
-      l));
-}
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-compute_facet_properties(const Facet& facet,
-                         Facet_properties& fp,
-                         bool force_exact) const
-{
-  //-------------------------------------------------------
-  // Facet must be finite
-  //-------------------------------------------------------
-  CGAL_assertion( ! r_tr_.is_infinite(facet) );
-
-  // types
-  typedef boost::optional<typename MD::Surface_patch_index> Surface_patch;
-  typedef typename MD::Intersection Intersection;
-
-  // Functor
-  typename Gt::Is_degenerate_3 is_degenerate = Gt().is_degenerate_3_object();
-  typename Gt::Compare_xyz_3 compare_xyz = Gt().compare_xyz_3_object();
-  typename MD::Do_intersect_surface do_intersect_surface =
-      r_oracle_.do_intersect_surface_object();
-
-
-  // Get dual of facet
-  Object dual = (force_exact ? dual_exact(facet) : r_tr_.dual(facet));
-
-  // If the dual is a segment
-  if ( const Segment_3* p_segment = object_cast<Segment_3>(&dual) )
-  {
-    if (is_degenerate(*p_segment)) { fp = Facet_properties(); return; }
-
-    // If facet is on surface, compute intersection point and return true
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-    Surface_patch surface = do_intersect_surface(*p_segment);
-    if ( surface )
-#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-    {
-      typename MD::Construct_intersection construct_intersection =
-          r_oracle_.construct_intersection_object();
-
-      // Trick to have canonical vector : thus, we compute alwais the same
-      // intersection
-      Segment_3 segment = *p_segment;
-      if ( compare_xyz(p_segment->source(),p_segment->target())
-              == CGAL::LARGER )
-      {
-        typename Gt::Construct_opposite_segment_3 opposite =
-            Gt().construct_opposite_segment_3_object();
-
-        segment = opposite(*p_segment);
-      }
-
-      Intersection intersect = construct_intersection(segment);
-#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      // In the following, CGAL::cpp11::get<2>(intersect) == 0 is a way to
-      // test "intersect == Intersection()" (aka empty intersection), but
-      // the later does not work.
-      Surface_patch surface =
-        (CGAL::cpp11::get<2>(intersect) == 0) ? Surface_patch() :
-        r_oracle_.surface_patch_index(CGAL::cpp11::get<1>(intersect));
-      if(surface)
-#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      fp =  Facet_properties(CGAL::cpp11::make_tuple(*surface,
-                                               CGAL::cpp11::get<1>(intersect),
-                                               CGAL::cpp11::get<0>(intersect)));
-      return;
-    }
-  }
-  // If the dual is a ray
-  else if ( const Ray_3* p_ray = object_cast<Ray_3>(&dual) )
-  {
-    // If a facet is on the convex hull, and if its finite incident
-    // cell has a very big Delaunay ball, then the dual of the facet is
-    // a ray constructed with a point with very big coordinates, and a
-    // vector with small coordinates. Its can happen than the
-    // constructed ray is degenerate (the point(1) of the ray is
-    // point(0) plus a vector whose coordinates are epsilon).
-    if (is_degenerate(*p_ray)) { fp = Facet_properties(); return; }
-
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-    Surface_patch surface = do_intersect_surface(*p_ray);
-    if ( surface )
-#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-    {
-      typename MD::Construct_intersection construct_intersection =
-          r_oracle_.construct_intersection_object();
-
-      Intersection intersect = construct_intersection(*p_ray);
-#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      Surface_patch surface =
-        (CGAL::cpp11::get<2>(intersect) == 0) ? Surface_patch() :
-        r_oracle_.surface_patch_index(CGAL::cpp11::get<1>(intersect));
-      if(surface)
-#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-        {
-          fp = Facet_properties(CGAL::cpp11::make_tuple(*surface,
-                                              CGAL::cpp11::get<1>(intersect),
-                                              CGAL::cpp11::get<0>(intersect)));
-          return;
-        }
-      
-    }
-  }
-  // If the dual is a line
-  else if ( const Line_3* p_line = object_cast<Line_3>(&dual) )
-  {
-    Surface_patch surface = do_intersect_surface(*p_line);
-    if ( surface )
-    {
-      typename MD::Construct_intersection construct_intersection =
-          r_oracle_.construct_intersection_object();
-
-      // Trick to have canonical vector : thus, we compute alwais the same
-      // intersection
-      Line_3 line = *p_line;
-      typename Gt::Compare_xyz_3 compare_xyz = Gt().compare_xyz_3_object();
-      if ( compare_xyz(p_line->point(0),p_line->point(1))
-              == CGAL::LARGER )
-      {
-        typename Gt::Construct_opposite_line_3 opposite =
-            Gt().construct_opposite_line_3_object();
-
-        line = opposite(*p_line);
-      }
-
-      Intersection intersect = construct_intersection(line);
-      fp = Facet_properties(CGAL::cpp11::make_tuple(*surface,
-                                              CGAL::cpp11::get<1>(intersect),
-                                              CGAL::cpp11::get<0>(intersect)));
-      return;
-    }
-  }
-  else
-  {
-    // Else there is a problem with the dual
-    std::cerr << "In is_facet_on_surface(const Facet& f, Point& center)\n"
-    << "file " << __FILE__ << ", line " << __LINE__ << "\n";
-    std::cerr << "Incorrect object type: " << dual.type().name() << "\n";
-    CGAL_error();
-  }
-
-  fp = Facet_properties();
-}
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-bool
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-is_facet_encroached(const Facet& facet,
-                    const Point& point) const
-{
-  if ( r_tr_.is_infinite(facet) || ! is_facet_on_surface(facet) )
-  {
-    return false;
-  }
-
-  typename Gt::Compare_power_distance_3 compare_distance =
-    r_tr_.geom_traits().compare_power_distance_3_object();
-
-  const Cell_handle& cell = facet.first;
-  const int& facet_index = facet.second;
-  const Point& center = get_facet_surface_center(facet);
-  const Point& reference_point = cell->vertex((facet_index+1)&3)->point();
-
-  // facet is encroached if the new point is near from center than
-  // one vertex of the facet
-  return ( compare_distance(center, reference_point, point) != CGAL::SMALLER );
-}
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-bool
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-is_encroached_facet_refinable(Facet& facet) const
-{
-  typedef typename Gt::Point_3 Point_3;
-  typedef typename Gt::FT      FT;
-
-  typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius =
-    Gt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
-
-  typename Gt::Compare_weighted_squared_radius_3 compare =
-    Gt().compare_weighted_squared_radius_3_object();
-
-  const Cell_handle& c = facet.first;
-  const int& k = facet.second;
-
-  int k1 = (k+1)&3;
-  int k2 = (k+2)&3;
-  int k3 = (k+3)&3;
-
-  // Get number of weighted points, and ensure that they will be accessible
-  // using k1...ki, if i is the number of weighted points.
-  int wp_nb = 0;
-  if(c->vertex(k1)->point().weight() > FT(0))
-  {
-    ++wp_nb;
-  }
-
-  if(c->vertex(k2)->point().weight() > FT(0))
-  {
-    if ( 0 == wp_nb ) { std::swap(k1,k2); }
-    ++wp_nb;
-  }
-
-  if(c->vertex(k3)->point().weight() > FT(0))
-  {
-    if ( 0 == wp_nb ) { std::swap(k1,k3); }
-    if ( 1 == wp_nb ) { std::swap(k2,k3); }
-    ++wp_nb;
-  }
-
-  const Point_3& p1 = c->vertex(k1)->point();
-  const Point_3& p2 = c->vertex(k2)->point();
-  const Point_3& p3 = c->vertex(k3)->point();
-
-  const FT min_ratio (0.16); // (0.2*2)^2
-
-  // Check ratio
-  switch ( wp_nb )
-  {
-    case 1:
-    {
-      FT r = (std::max)(sq_radius(p1,p2),sq_radius(p1,p3));
-      if ( r < min_ratio*p1.weight() ) { return false; }
-      break;
-    }
-
-    case 2:
-    {
-      bool do_spheres_intersect = (compare(p1,p2,FT(0)) != CGAL::LARGER);
-      if ( do_spheres_intersect )
-      {
-        FT r13 = sq_radius(p1,p3) / p1.weight();
-        FT r23 = sq_radius(p2,p3) / p2.weight();
-        FT r = (std::max)(r13,r23);
-
-        if ( r < min_ratio ) { return false; }
-      }
-      break;
-    }
-
-    case 3:
-    {
-      bool do_spheres_intersect = (compare(p1,p2,p3,FT(0)) != CGAL::LARGER);
-      if ( do_spheres_intersect ) { return false; }
-      break;
-    }
-
-    default: break;
-  }
-
-  return true;
-}
-
-/**
-  * \c facet is an internal facet we are going to remove
-  * \c source_facet is the facet we want to refine by inserting a new point
-  */
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-bool
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-before_insertion_handle_facet_in_conflict_zone(Facet& facet,
-                                               const Facet& source_facet)
-{
-  Facet other_side = mirror_facet(facet);
-
-  // Is the facet on the surface of the complex
-  if ( is_facet_on_surface(facet) )
-  {
-    // Remove element (if needed - see remove_bad_facet implementation)
-    remove_bad_facet(facet, Ct());
-
-    // Remove facet from complex
-    remove_facet_from_surface(facet);
-
-    // Reset visited
-    reset_facet_visited(facet);
-    reset_facet_visited(other_side);
-  }
-
-  return ( (facet == source_facet) || (other_side == source_facet) );
-}
-
-
-
-template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, class C_>
-void
-Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
-after_insertion_handle_incident_facet(Facet& facet)
-{
-  // If the facet is infinite or has been already visited,
-  // then there is nothing to do as for it or its edges
-  // Facet other_side = mirror_facet(facet);
-  if ( r_tr_.is_infinite(facet) || (is_facet_visited(facet)) ) // && is_facet_visited(other_side)) )
-  {
-    return;
-  }
-
-  treat_new_facet(facet);
-}
-
-
-}  // end namespace Mesh_3
-
-
-}  // end namespace CGAL
-
-#endif // CGAL_MESH_3_REFINE_FACETS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h
deleted file mode 100644
index 539fec5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h
+++ /dev/null
@@ -1,415 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-//
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
-#define CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
-
-
-#include <CGAL/number_utils_classes.h>
-#include <CGAL/Cartesian_converter.h>
-#include <CGAL/Robust_construction.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
-#include <CGAL/constructions/constructions_on_weighted_points_cartesian_3.h>
-
-namespace CGAL {
-
-template < typename K >
-class Robust_filtered_compute_squared_radius_3
-  : public K::Compute_squared_radius_3
-{
-public:
-  typedef Exact_predicates_exact_constructions_kernel         EK;
-  typedef Weighted_converter_3<Cartesian_converter<K, EK> >   To_exact;
-  typedef Weighted_converter_3<Cartesian_converter<EK,K> >    Back_from_exact;
-  
-  typedef typename K::Point_3                         Point_3;
-  typedef typename K::FT                              FT;
-  typedef FT                                          result_type;
-
-#ifndef  CGAL_CFG_MATCHING_BUG_6 
-  using K::Compute_squared_radius_3::operator();
-#else // CGAL_CFG_MATCHING_BUG_6
-  typedef typename K::Sphere_3                        Sphere_3;
-  typedef typename K::Circle_3                        Circle_3;
-
-  result_type
-  operator()( const Sphere_3& s) const
-  { return K::Compute_squared_radius_3::operator()(s); }
-
-  result_type
-  operator()( const Circle_3& c) const
-  { return K::Compute_squared_radius_3::operator()(c); }
-
-  FT operator() ( const Point_3 & p,
-                  const Point_3 & q,
-                  const Point_3 & r) const
-  {
-    return K::Compute_squared_radius_3::operator()(p,q,r);
-  }
-
-  FT operator() ( const Point_3 & p,
-                  const Point_3 & q) const
-  {
-    return K::Compute_squared_radius_3::operator()(p,q);
-  }
-
-  FT operator() ( const Point_3 & p) const
-  {
-    return K::Compute_squared_radius_3::operator()(p);
-  }
-#endif // CGAL_CFG_MATCHING_BUG_6
-  
-  FT operator() ( const Point_3 & p,
-                  const Point_3 & q,
-                  const Point_3 & r,
-                  const Point_3 & s ) const
-  {
-    typename K::Compute_squared_radius_3 sq_radius =
-      K().compute_squared_radius_3_object();
-    
-    // Compute denominator to swith to exact if it is 0
-    const FT denom = compute_denom(p,q,r,s);
-    if ( ! CGAL_NTS is_zero(denom) )
-    {
-      return sq_radius(p,q,r,s);
-    }
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    EK::Compute_squared_radius_3 exact_sq_radius =
-      EK().compute_squared_radius_3_object();
-    
-    return back_from_exact(exact_sq_radius(to_exact(p),
-                                           to_exact(q),
-                                           to_exact(r),
-                                           to_exact(s)));
-  }
-
-private:
-  FT compute_denom(const Point_3 & p,
-                   const Point_3 & q,
-                   const Point_3 & r,
-                   const Point_3 & s) const
-  {
-    return compute_denom(p.x(),p.y(),p.z(),
-                         q.x(),q.y(),q.z(),
-                         r.x(),r.y(),r.z(),
-                         s.x(),s.y(),s.z());
-  }
-
-  FT compute_denom(const FT &px, const FT &py, const FT &pz,
-                   const FT &qx, const FT &qy, const FT &qz,
-                   const FT &rx, const FT &ry, const FT &rz,
-                   const FT &sx, const FT &sy, const FT &sz) const
-  {
-    const FT qpx = qx-px;
-    const FT qpy = qy-py;
-    const FT qpz = qz-pz;
-
-    const FT rpx = rx-px;
-    const FT rpy = ry-py;
-    const FT rpz = rz-pz;
-
-    const FT spx = sx-px;
-    const FT spy = sy-py;
-    const FT spz = sz-pz;
-
-    return determinant(qpx,qpy,qpz,
-                       rpx,rpy,rpz,
-                       spx,spy,spz);
-  }
-};
-
-template < typename K_ >
-class Robust_filtered_construct_weighted_circumcenter_3
-{
-public:
-  typedef Exact_predicates_exact_constructions_kernel          EK;
-  typedef Weighted_converter_3<Cartesian_converter<K_, EK> >   To_exact;
-  typedef Weighted_converter_3<Cartesian_converter<EK,K_> >    Back_from_exact;
-  
-  typedef CGAL::Regular_triangulation_euclidean_traits_3<K_> Rt;
-  typedef CGAL::Regular_triangulation_euclidean_traits_3<EK> Exact_Rt;
-  
-  typedef typename Rt::Weighted_point_3               Weighted_point_3;
-  typedef typename Rt::Bare_point                     Bare_point;
-  typedef typename Rt::FT                             FT;
-  typedef typename Rt::Sphere_3                       Sphere_3;
-  
-  typedef Bare_point                                  result_type;
-  
-  Bare_point operator() ( const Weighted_point_3 & p,
-                          const Weighted_point_3 & q,
-                          const Weighted_point_3 & r,
-                          const Weighted_point_3 & s,
-                          bool force_exact = false) const
-  {
-    CGAL_precondition(Rt().orientation_3_object()(p,q,r,s) == CGAL::POSITIVE);
-    
-    // We use Power_test_3: it is static filtered and
-    // we know that p,q,r,s are positive oriented
-    typename Rt::Power_test_3 power_test = Rt().power_test_3_object();
-
-    // Compute denominator to swith to exact if it is 0
-    FT num_x, num_y, num_z, den;
-    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
-                                             q.x(), q.y(), q.z(), q.weight(),
-                                             r.x(), r.y(), r.z(), r.weight(),
-                                             s.x(), s.y(), s.z(), s.weight(),
-                                             num_x,  num_y, num_z, den);
-    
-    if ( ! force_exact && ! CGAL_NTS is_zero(den) )
-    {
-      FT inv = FT(1)/(FT(2) * den);
-      Bare_point res(p.x() + num_x*inv, p.y() - num_y*inv, p.z() + num_z*inv);
-      
-      // Fast output
-      if ( power_test(p,q,r,s,res) == CGAL::ON_POSITIVE_SIDE )
-        return res;
-    }
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
-      Exact_Rt().construct_weighted_circumcenter_3_object();
-    
-    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
-                                                       to_exact(q),
-                                                       to_exact(r),
-                                                       to_exact(s)));
-  }
-  
-  Bare_point operator() ( const Weighted_point_3 & p,
-                          const Weighted_point_3 & q,
-                          const Weighted_point_3 & r ) const
-  {
-    CGAL_precondition(! Rt().collinear_3_object()(p,q,r) );
-        
-    typename Rt::Side_of_bounded_sphere_3 side_of_bounded_sphere =
-      Rt().side_of_bounded_sphere_3_object();
-    
-    // Compute denominator to swith to exact if it is 0
-    FT num_x, num_y, num_z, den;
-    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
-                                             q.x(), q.y(), q.z(), q.weight(),
-                                             r.x(), r.y(), r.z(), r.weight(),
-                                             num_x,  num_y, num_z, den);
-    
-    if ( ! CGAL_NTS is_zero(den) )
-    {
-      FT inv = FT(1)/(FT(2) * den);
-      Bare_point res(p.x() + num_x*inv, p.y() - num_y*inv, p.z() + num_z*inv);
-      
-      // Fast output
-      if ( side_of_bounded_sphere(p,q,r,res) == CGAL::ON_BOUNDED_SIDE )
-        return res;
-    }
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
-      Exact_Rt().construct_weighted_circumcenter_3_object();
-    
-    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
-                                                       to_exact(q),
-                                                       to_exact(r)));
-  }
-  
-  Bare_point operator() ( const Weighted_point_3 & p,
-                          const Weighted_point_3 & q ) const
-  {
-    typename Rt::Construct_weighted_circumcenter_3 weighted_circumcenter =
-      Rt().construct_weighted_circumcenter_3_object();
-    
-    typename Rt::Side_of_bounded_sphere_3 side_of_bounded_sphere =
-      Rt().side_of_bounded_sphere_3_object();
-    
-    // No division here
-    result_type point = weighted_circumcenter(p,q);
-    
-    // Fast output
-    if ( side_of_bounded_sphere(p,q,point) == CGAL::ON_BOUNDED_SIDE )
-      return point;
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
-      Exact_Rt().construct_weighted_circumcenter_3_object();
-    
-    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
-                                                       to_exact(q)));
-  }
-};
-  
-  
-  
-template < typename K_ >
-class Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3
-{
-public:
-  typedef Exact_predicates_exact_constructions_kernel          EK;
-  typedef Weighted_converter_3<Cartesian_converter<K_, EK> >   To_exact;
-  typedef Weighted_converter_3<Cartesian_converter<EK,K_> >    Back_from_exact;
-  
-  typedef CGAL::Regular_triangulation_euclidean_traits_3<K_> Rt;
-  typedef CGAL::Regular_triangulation_euclidean_traits_3<EK> Exact_Rt;
-  
-  typedef typename Rt::Weighted_point_3               Weighted_point_3;
-  typedef typename Rt::FT                             FT;
-  
-  FT operator() ( const Weighted_point_3& p,
-                  const Weighted_point_3& q,
-                  const Weighted_point_3& r,
-                  const Weighted_point_3& s ) const
-  {
-    // Compute denominator to swith to exact if it is 0
-    FT num_x, num_y, num_z, den;
-    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
-                                             q.x(), q.y(), q.z(), q.weight(),
-                                             r.x(), r.y(), r.z(), r.weight(),
-                                             s.x(), s.y(), s.z(), s.weight(),
-                                             num_x,  num_y, num_z, den);
-    if ( ! CGAL_NTS is_zero(den) )
-    {
-      FT inv = FT(1)/(FT(2) * den);
-      
-      return (  CGAL_NTS square(num_x) 
-              + CGAL_NTS square(num_y)
-              + CGAL_NTS square(num_z) ) * CGAL_NTS square(inv) - p.weight();
-    }
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
-      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
-    
-    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q),
-                                                to_exact(r),to_exact(s)));
-  }
-  
-  
-  FT operator() (const Weighted_point_3& p,
-                 const Weighted_point_3& q,
-                 const Weighted_point_3& r) const
-  {
-    // Compute denominator to swith to exact if it is 0
-    FT num_x, num_y, num_z, den;
-    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
-                                             q.x(), q.y(), q.z(), q.weight(),
-                                             r.x(), r.y(), r.z(), r.weight(),
-                                             num_x,  num_y, num_z, den);
-    
-    if ( ! CGAL_NTS is_zero(den) )
-    {
-      FT inv = FT(1)/(FT(2) * den);
-      
-      return (  CGAL_NTS square(num_x) 
-              + CGAL_NTS square(num_y)
-              + CGAL_NTS square(num_z) ) * CGAL_NTS square(inv) - p.weight();
-    }
-
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
-      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
-    
-    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q),to_exact(r)));
-  }
-  
-  
-  FT operator() (const Weighted_point_3& p,
-                 const Weighted_point_3& q) const
-  {
-    // Compute denominator to swith to exact if it is 0
-    FT qpx = q.x() - p.x();
-    FT qpy = q.y() - p.y();
-    FT qpz = q.z() - p.z();
-    FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) + CGAL_NTS square(qpz);
-    
-    if ( ! CGAL_NTS is_zero(qp2) )
-    {
-      FT inv = FT(1)/(FT(2)*qp2);
-      FT alpha = 1/FT(2) + (p.weight()-q.weight())*inv;
-      
-      return  CGAL_NTS square(alpha)*qp2 - p.weight();      
-    }
-    
-    // Switch to exact
-    To_exact to_exact;
-    Back_from_exact back_from_exact;
-    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
-      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
-    
-    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q)));
-  }
-  
-  
-  FT operator() (const Weighted_point_3& p) const
-  {
-    return -p.weight();
-  }  
-};
-  
-
-/**
- * @class Robust_weighted_circumcenter_filtered_traits_3
- */
-template<class K_>
-struct Robust_weighted_circumcenter_filtered_traits_3
-: public CGAL::Regular_triangulation_euclidean_traits_3<K_>
-{
-  typedef CGAL::Robust_filtered_construct_weighted_circumcenter_3<K_>
-    Construct_weighted_circumcenter_3;
-  
-  typedef CGAL::Robust_filtered_compute_squared_radius_3<K_> Compute_squared_radius_3;
-  
-  typedef CGAL::Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3<K_>
-    Compute_squared_radius_smallest_orthogonal_sphere_3;
-
-  Construct_weighted_circumcenter_3
-  construct_weighted_circumcenter_3_object() const
-  { return Construct_weighted_circumcenter_3(); }
-
-  Compute_squared_radius_3
-  compute_squared_radius_3_object() const
-  { return Compute_squared_radius_3(); }
-  
-  Compute_squared_radius_smallest_orthogonal_sphere_3
-  compute_squared_radius_smallest_orthogonal_sphere_3_object() const
-  { return Compute_squared_radius_smallest_orthogonal_sphere_3(); }
-  
-};  // end class Robust_weighted_circumcenter_filtered_traits_3
-
-
-}  // end namespace CGAL
-
-#endif // CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Sliver_perturber.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Sliver_perturber.h
deleted file mode 100644
index fd3847f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Sliver_perturber.h
+++ /dev/null
@@ -1,1663 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description :
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_SLIVER_PERTURBER_H
-#define CGAL_MESH_3_SLIVER_PERTURBER_H
-
-#include <CGAL/Mesh_3/config.h>
-
-
-#ifdef CGAL_MESH_3_VERBOSE
-  #define CGAL_MESH_3_PERTURBER_VERBOSE
-#endif
-
-#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
-  #ifndef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-    #define CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
-  #else
-    #undef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
-  #endif
-#endif
-
-#include <CGAL/Mesh_3/vertex_perturbation.h>
-#include <CGAL/Mesh_3/C3T3_helpers.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Mesh_3/Null_perturber_visitor.h>
-#include <CGAL/Mesh_3/sliver_criteria.h>
-#include <CGAL/Has_timestamp.h>
-
-#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
-#include <CGAL/Mesh_3/Worksharing_data_structures.h>
-
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-# define CGAL_PROFILE
-# include <CGAL/Profile_counter.h>
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/task.h>
-#endif
-
-#include <boost/format.hpp>
-#ifdef CGAL_MESH_3_USE_RELAXED_HEAP
-#include <boost/pending/relaxed_heap.hpp>
-#else
-#include <CGAL/Modifiable_priority_queue.h>
-#endif //CGAL_MESH_3_USE_RELAXED_HEAP
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-#include <boost/unordered_map.hpp>
-
-#include <memory>
-
-namespace CGAL {
-
-namespace internal { namespace Mesh_3 {
-
-  // Hash function for boost::unordered_map<Vertex_handle,...>
-  template <typename Tr, bool HasTimestamp>
-  struct VHash
-  {
-    typedef typename Tr::Vertex_handle Vertex_handle;
-    std::size_t operator()(Vertex_handle vh) const
-    {
-      return vh->time_stamp();
-    }
-  };
-  template <typename Tr>
-  struct VHash<Tr, false>
-  {
-    typedef typename Tr::Vertex_handle Vertex_handle;
-    std::size_t operator()(Vertex_handle vh) const
-    {
-      return boost::hash_value(&*vh);
-    }
-  };
-}} // end internal::Mesh_3
-
-namespace Mesh_3 {
-
-
-/**
-* @class PVertex
-* Vertex with associated perturbation datas
-*/
-// Sequential
-template< typename FT
-        , typename Vertex_handle
-        , typename Point_3
-        , typename SliverCriterion
-        , typename Perturbation
-        , typename Concurrency_tag>
-class PVertex_
-{
-public:
-typedef PVertex_<FT,
-                 Vertex_handle,
-                 Point_3,
-                 SliverCriterion,
-                 Perturbation,
-                 Concurrency_tag> Self;
-typedef std::size_t id_type;
-
-/// Constructor
-PVertex_()
-: vertex_handle_()
-, incident_sliver_nb_(0)
-, min_value_((std::numeric_limits<double>::max)())
-, try_nb_(0)
-, p_perturbation_(NULL)
-, id_()
-{ }
-
-PVertex_(const Vertex_handle& vh, id_type id)
-: vertex_handle_(vh)
-, incident_sliver_nb_(0)
-, min_value_((std::numeric_limits<double>::max)())
-, try_nb_(0)
-, p_perturbation_(NULL)
-, id_(id)
-{ }
-
-/// Associated vertex
-const Vertex_handle& vertex() const { return vertex_handle_; }
-void set_vertex(const Vertex_handle& vh) { vertex_handle_ = vh; }
-
-/// Incident slivers number
-unsigned int sliver_nb() const { return incident_sliver_nb_; }
-void set_sliver_nb(const unsigned int n) { incident_sliver_nb_ = n; }
-
-/// Current perturbation
-const Perturbation* perturbation() const { return p_perturbation_; }
-void set_perturbation(const Perturbation* p) { p_perturbation_ = p; }
-
-/// Is perturbable
-bool is_perturbable() const
-{
-  return (   (vertex_handle_->in_dimension() > 1)
-          && (NULL != perturbation())
-          && (sliver_nb() != 0) );
-}
-
-/// Min sliver value
-const FT& min_value() const { return min_value_; }
-void set_min_value(const FT& min_value){ min_value_ = min_value; }
-
-/// Try nb
-const unsigned int& try_nb() const { return try_nb_; }
-void set_try_nb(const unsigned int& try_nb) { try_nb_ = try_nb; }
-void increment_try_nb() { ++try_nb_; }
-
-/// Id
-void set_id(const id_type& id) { id_ = id; }
-id_type id() const { return id_; }
-
-/// Operators
-bool operator==(const Self& pv) const { return ( id() == pv.id() ); }
-
-bool operator<(const Self& pv) const
-{
-  // vertex type (smallest-interior first)
-  if ( vertex()->in_dimension() != pv.vertex()->in_dimension() )
-    return vertex()->in_dimension() > pv.vertex()->in_dimension();
-  // nb incident slivers (smallest first)
-  else if ( sliver_nb() != pv.sliver_nb() )
-    return sliver_nb() < pv.sliver_nb();
-  // min angle (smallest first)
-  else if ( min_value() != pv.min_value() )
-    return min_value() < pv.min_value();
-  // try nb (smallest first)
-  else if ( try_nb() != pv.try_nb() )
-    return try_nb() < pv.try_nb();
-  // perturbation type (smallest first)
-  else if ( perturbation() != pv.perturbation() )
-    return *perturbation() < *pv.perturbation();
-  return ( id() < pv.id() ); // all characteristics are the same!
-}
-
-/// Dummy functions
-void update_saved_erase_counter() {}
-bool is_zombie() { return false; }
-
-private:
-/// Private datas
-Vertex_handle vertex_handle_;
-unsigned int incident_sliver_nb_;
-FT min_value_;
-unsigned int try_nb_;
-const Perturbation* p_perturbation_;
-id_type id_;
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template< typename FT
-        , typename Vertex_handle
-        , typename Point_3
-        , typename SliverCriterion
-        , typename Perturbation>
-class PVertex_<FT, Vertex_handle, Point_3,
-               SliverCriterion, Perturbation, Parallel_tag>
-{
-public:
-typedef PVertex_<FT,
-                 Vertex_handle,
-                 Point_3,
-                 SliverCriterion,
-                 Perturbation,
-                 Parallel_tag> Self;
-typedef std::size_t id_type;
-
-/// Constructor
-PVertex_()
-: vertex_handle_()
-, in_dimension_(-1)
-, incident_sliver_nb_(0)
-, min_value_((std::numeric_limits<double>::max)())
-, try_nb_(0)
-, p_perturbation_(NULL)
-, id_()
-{ }
-
-PVertex_(const Vertex_handle& vh, id_type id)
-: vertex_handle_(vh)
-, vh_erase_counter_when_added_(vh->erase_counter())
-, in_dimension_(vh->in_dimension())
-, incident_sliver_nb_(0)
-, min_value_((std::numeric_limits<double>::max)())
-, try_nb_(0)
-, p_perturbation_(NULL)
-, id_(id)
-{ }
-
-/// Associated vertex
-const Vertex_handle& vertex() const { return vertex_handle_; }
-void set_vertex(const Vertex_handle& vh)
-{
-  vertex_handle_ = vh;
-  update_saved_erase_counter();
-}
-void update_saved_erase_counter()
-{
-  vh_erase_counter_when_added_ = vertex_handle_->erase_counter();
-}
-
-int in_dimension() const { return in_dimension_; }
-
-/// Incident slivers number
-unsigned int sliver_nb() const { return incident_sliver_nb_; }
-void set_sliver_nb(const unsigned int n) { incident_sliver_nb_ = n; }
-
-/// Current perturbation
-const Perturbation* perturbation() const { return p_perturbation_; }
-void set_perturbation(const Perturbation* p) { p_perturbation_ = p; }
-
-/// Is perturbable
-bool is_perturbable() const
-{
-  return (   (vertex_handle_->in_dimension() > 1)
-          && (NULL != perturbation())
-          && (sliver_nb() != 0) );
-}
-
-/// Min sliver value
-const FT& min_value() const { return min_value_; }
-void set_min_value(const FT& min_value){ min_value_ = min_value; }
-
-/// Try nb
-const unsigned int& try_nb() const { return try_nb_; }
-void set_try_nb(const unsigned int& try_nb) { try_nb_ = try_nb; }
-void increment_try_nb() { ++try_nb_; }
-
-/// Id
-void set_id(const id_type& id) { id_ = id; }
-id_type id() const { return id_; }
-
-/// Zombie
-bool is_zombie() const
-{
-  return vertex_handle_->erase_counter() != vh_erase_counter_when_added_;
-}
-
-/// Operators
-bool operator==(const Self& pv) const { return ( id() == pv.id() ); }
-
-bool operator<(const Self& pv) const
-{
-  // vertex type (smallest-interior first)
-  if ( in_dimension() != pv.in_dimension() )
-    return in_dimension() > pv.in_dimension();
-  // nb incident slivers (smallest first)
-  else if ( sliver_nb() != pv.sliver_nb() )
-    return sliver_nb() < pv.sliver_nb();
-  // min angle (smallest first)
-  else if ( min_value() != pv.min_value() )
-    return min_value() < pv.min_value();
-  // try nb (smallest first)
-  else if ( try_nb() != pv.try_nb() )
-    return try_nb() < pv.try_nb();
-  // perturbation type (smallest first)
-  else if ( perturbation() != pv.perturbation() )
-    return *perturbation() < *pv.perturbation();
-  return ( id() < pv.id() ); // all characteristics are the same!
-}
-
-private:
-/// Private datas
-Vertex_handle vertex_handle_;
-unsigned int vh_erase_counter_when_added_;
-int in_dimension_;
-unsigned int incident_sliver_nb_;
-FT min_value_;
-unsigned int try_nb_;
-const Perturbation* p_perturbation_;
-id_type id_;
-};
-#endif
-
-/************************************************
-// Class Sliver_perturber_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Tr, typename Concurrency_tag>
-class Sliver_perturber_base
-{
-protected:
-  typedef typename Tr::Vertex_handle                        Vertex_handle;
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename std::vector<Vertex_handle>               Bad_vertices_vector;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-
-
-  Sliver_perturber_base(const Bbox_3 &, int) {}
-
-  Lock_data_structure *
-    get_lock_data_structure()                       const { return 0; }
-  void unlock_all_elements()                        const {}
-  void create_root_task()                           const {}
-  bool flush_work_buffers()                         const { return true; }
-  void wait_for_all()                               const {}
-  void destroy_root_task()                          const {}
-  template <typename Func, typename PVertex>
-  void enqueue_work(Func, const PVertex &)          const {}
-
-  void increment_erase_counter(const Vertex_handle &) const {}
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Tr>
-class Sliver_perturber_base<Tr, Parallel_tag>
-{
-protected:
-  typedef typename Tr::Vertex_handle                        Vertex_handle;
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename tbb::concurrent_vector<Vertex_handle>    Bad_vertices_vector;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-
-  Sliver_perturber_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
-    : m_lock_ds(bbox, num_grid_cells_per_axis)
-    , m_worksharing_ds(bbox)
-  {
-  }
-
-  Lock_data_structure *get_lock_data_structure() const
-  {
-    return &m_lock_ds;
-  }
-
-  void unlock_all_elements() const
-  {
-    m_lock_ds.unlock_all_points_locked_by_this_thread();
-  }
-
-  void create_root_task() const
-  {
-    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
-    m_empty_root_task->set_ref_count(1);
-  }
-
-  bool flush_work_buffers() const
-  {
-    m_empty_root_task->set_ref_count(1);
-    bool keep_flushing = m_worksharing_ds.flush_work_buffers(*m_empty_root_task);
-    wait_for_all();
-    return keep_flushing;
-  }
-
-  void wait_for_all() const
-  {
-    m_empty_root_task->wait_for_all();
-  }
-
-  void destroy_root_task() const
-  {
-    tbb::task::destroy(*m_empty_root_task);
-    m_empty_root_task = 0;
-  }
-
-  template <typename Func, typename PVertex>
-  void enqueue_work(Func f, const PVertex &pv) const
-  {
-    CGAL_assertion(m_empty_root_task != 0);
-    m_worksharing_ds.enqueue_work(f, pv, *m_empty_root_task);
-  }
-
-  void increment_erase_counter(const Vertex_handle &vh) const
-  {
-    vh->increment_erase_counter();
-  }
-
-public:
-
-protected:
-  mutable Lock_data_structure           m_lock_ds;
-  mutable Mesh_3::Auto_worksharing_ds   m_worksharing_ds;
-  mutable tbb::task                    *m_empty_root_task;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-
-
-/************************************************
-// Class Sliver_perturber
-************************************************/
-
-template < typename C3T3,
-           typename MeshDomain,
-           typename SliverCriterion = Mesh_3::Min_dihedral_angle_criterion
-                                  <typename C3T3::Triangulation::Geom_traits>,
-           typename Visitor_ = Null_perturber_visitor<C3T3> >
-class Sliver_perturber
-: public Sliver_perturber_base<typename C3T3::Triangulation,
-                               typename C3T3::Concurrency_tag>
-{
-  // Types
-  typedef typename C3T3::Concurrency_tag Concurrency_tag;
-
-  typedef Sliver_perturber<C3T3, MeshDomain, SliverCriterion, Visitor_> Self;
-  typedef Sliver_perturber_base<
-    typename C3T3::Triangulation, Concurrency_tag>                      Base;
-
-  typedef typename C3T3::Triangulation  Tr;
-  typedef typename Tr::Geom_traits      Gt;
-
-  typedef typename Tr::Cell_handle              Cell_handle;
-  typedef typename Base::Vertex_handle          Vertex_handle;
-  typedef typename Tr::Vertex                   Vertex;
-  typedef typename MeshDomain::Point_3          Point_3;
-
-  typedef typename std::vector<Cell_handle>     Cell_vector;
-  typedef typename std::vector<Vertex_handle>   Vertex_vector;
-  typedef typename Base::Bad_vertices_vector    Bad_vertices_vector;
-
-  typedef typename Gt::FT                       FT;
-
-  // Helper
-  typedef class C3T3_helpers<C3T3,MeshDomain> C3T3_helpers;
-
-  using Base::get_lock_data_structure;
-
-  // Visitor
-  // Should define
-  //  - bound_reached(FT bound)
-  //  - end_of_perturbation_iteration(std::size_t vertices_left)
-  typedef Visitor_ Visitor;
-
-  // perturbations
-public:
-  typedef Abstract_perturbation<C3T3,MeshDomain,SliverCriterion> Perturbation;
-  typedef boost::ptr_vector<Perturbation>                 Perturbation_vector;
-
-private:
-  // Relaxed heap
-
-  typedef PVertex_<FT,
-                   Vertex_handle,
-                   Point_3,
-                   SliverCriterion,
-                   Perturbation,
-                   Concurrency_tag> PVertex;
-
-  /**
-   * @class PVertex_id
-   * relaxed heap
-   */
-  class PVertex_id :
-  public boost::put_get_helper<typename PVertex::id_type, PVertex_id>
-  {
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef typename PVertex::id_type value_type;
-    typedef typename PVertex::id_type reference;
-    typedef PVertex key_type;
-
-    value_type operator[] (const key_type& pv) const { return pv.id(); }
-  };
-
-  typedef std::less<PVertex> less_PVertex;
-  #ifdef CGAL_MESH_3_USE_RELAXED_HEAP
-  typedef boost::relaxed_heap<PVertex, less_PVertex, PVertex_id> PQueue;
-  #else
-  typedef ::CGAL::internal::mutable_queue_with_remove<PVertex,std::vector<PVertex>, less_PVertex, PVertex_id> PQueue;
-  #endif //CGAL_MESH_3_USE_RELAXED_HEAP
-
-public:
-  /**
-   * Constructor
-   */
-  Sliver_perturber(C3T3& c3t3,
-                   const MeshDomain& domain,
-                   const SliverCriterion& criterion);
-
-  /**
-   * @brief Launch perturbation
-   * @param sliver_bound the bound the perturber will try to achieve
-   * @param delta the size of the step used by the perturber
-   *
-   * Runs explicit perturbation. The goal is that for each tet of the mesh,
-   * SliverCriterion(tet) > sliver_bound.
-   * The perturber runs step by step, using delta as step size.
-   */
-  Mesh_optimization_return_code
-  operator()(Visitor visitor = Visitor());
-
-  /**
-   * Adds a perturbation at the end of the perturbation queue
-   */
-  void add_perturbation(Perturbation* perturbation);
-
-  /// Time accessors
-  void set_time_limit(double time) { time_limit_ = time; }
-  double time_limit() const { return time_limit_; }
-
-private:
-
-  // -----------------------------------
-  // Private methods
-  // -----------------------------------
-
-  /**
-   * One step perturbation: tries to achieve sliver_bound quality in the mesh
-   */
-  bool perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& v) const;
-
-  /**
-   * Builds priority queue. It will contain all vertices that have quality below
-   * sliver_bound.
-   * Returns priority queue size.
-   *
-   * precondition: pqueue.empty()
-   */
-  int build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const;
-
-  /**
-   * Updates priority queue for all vertices of \c vertices
-   */
-  // Sequential
-  int update_priority_queue(const Vertex_vector& vertices,
-                            const FT& sliver_bound,
-                            PQueue& pqueue) const;
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  int update_priority_queue( const Vertex_vector& vertices
-                           , const FT& sliver_bound
-                           , Visitor& visitor
-                           , Bad_vertices_vector &bad_vertices) const;
-#endif
-
-  /**
-   * Updates \c pv in priority queue
-   */
-  int update_priority_queue(const PVertex& pv, PQueue& pqueue) const;
-
-  // For parallel version
-  void
-  perturb_vertex( PVertex pv
-                , const FT& sliver_bound
-                , Visitor& visitor
-                , Bad_vertices_vector &bad_vertices
-                , bool *could_lock_zone
-                ) const;
-
-  /**
-   * Returns a pvertex from a vertex handle \c vh, using id \c pv_id
-   */
-  PVertex
-  make_pvertex(const Vertex_handle& vh,
-               const FT& sliver_bound,
-               const typename PVertex::id_type& pv_id) const;
-  PVertex
-  make_pvertex__concurrent(
-               const Vertex_handle& vh,
-               const FT& sliver_bound,
-               const typename PVertex::id_type& pv_id) const;
-
-  /**
-   * Updates a pvertex \c pv
-   */
-  void update_pvertex(PVertex& pv, const FT& sliver_bound) const;
-  void update_pvertex__concurrent(PVertex& pv, const FT& sliver_bound) const;
-
-  /**
-   * Returns \c vh pvertex id
-   */
-  typename PVertex::id_type get_pvertex_id(const Vertex_handle& vh) const
-  {
-    return static_cast<typename PVertex::id_type>(vh->meshing_info());
-  }
-
-  /**
-   * Update bad vertices vector, wrt \c sliver_bound
-   */
-  // Sequential
-  void update_bad_vertices(std::vector<Vertex_handle> &bad_vertices,
-                           const FT& sliver_bound) const;
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  void update_bad_vertices(tbb::concurrent_vector<Vertex_handle> &bad_vertices,
-                           const FT& sliver_bound) const;
-#endif
-
-  /**
-   * Initializes vertices ids
-   */
-  void initialize_vertices_id() const;
-
-  /**
-   * Returns true if time_limit is reached
-   */
-  bool is_time_limit_reached() const
-  {
-    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
-  }
-
-
-#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
-  /// Verbose mode methods
-  void print_perturbations_statistics() const;
-  void print_final_perturbations_statistics() const;
-  void reset_perturbation_counters();
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // For parallel version
-  void
-  enqueue_task(const PVertex &pv,
-               const FT& sliver_bound,
-               Visitor& visitor,
-               Bad_vertices_vector &bad_vertices
-               ) const;
-#endif
-
-private:
-
-#ifdef CGAL_LINKED_WITH_TBB
-
-  // Functor for enqueue_task function
-  template <typename SP, typename Bad_vertices_vector_>
-  class Perturb_vertex
-  {
-    const SP              & m_sliver_perturber;
-    PVertex                 m_pv;
-    FT                      m_sliver_bound;
-    Visitor               & m_visitor;
-    Bad_vertices_vector_  & m_bad_vertices;
-
-  public:
-    // Constructor
-    Perturb_vertex(const SP &sp,
-                   const PVertex &pv,
-                   FT sliver_bound,
-                   Visitor& visitor,
-                   Bad_vertices_vector_ &bad_vertices)
-    : m_sliver_perturber(sp),
-      m_pv(pv),
-      m_sliver_bound(sliver_bound),
-      m_visitor(visitor),
-      m_bad_vertices(bad_vertices)
-    {
-    }
-
-    // Constructor
-    Perturb_vertex(const Perturb_vertex &pvx)
-    : m_sliver_perturber(pvx.m_sliver_perturber),
-      m_pv(pvx.m_pv),
-      m_sliver_bound(pvx.m_sliver_bound),
-      m_visitor(pvx.m_visitor),
-      m_bad_vertices(pvx.m_bad_vertices)
-    {}
-
-    // operator()
-    void operator()() const
-    {
-      bool could_lock_zone;
-      do
-      {
-        m_sliver_perturber.perturb_vertex(
-          m_pv, m_sliver_bound, m_visitor, m_bad_vertices, &could_lock_zone);
-        m_sliver_perturber.unlock_all_elements();
-      } while (!could_lock_zone);
-
-      if ( m_sliver_perturber.is_time_limit_reached() )
-        tbb::task::self().cancel_group_execution();
-    }
-  };
-#endif
-
-  // -----------------------------------
-  // Private data
-  // -----------------------------------
-  C3T3& c3t3_;
-  Tr& tr_;
-  const MeshDomain& domain_;
-  SliverCriterion sliver_criterion_;
-  Perturbation_vector perturbation_vector_;
-  C3T3_helpers helper_;
-
-  // Internal perturbation ordering
-  int next_perturbation_order_;
-
-  // Timer
-  double time_limit_;
-  CGAL::Timer running_time_;
-};
-
-
-
-
-
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-Sliver_perturber<C3T3,Md,Sc,V_>::
-Sliver_perturber(C3T3& c3t3,
-                 const Md& domain,
-                 const Sc& criterion)
-  : Base(c3t3.bbox(),
-         Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
-  , c3t3_(c3t3)
-  , tr_(c3t3_.triangulation())
-  , domain_(domain)
-  , sliver_criterion_(criterion)
-  , helper_(c3t3_,domain_,get_lock_data_structure())
-  , next_perturbation_order_(0)
-  , time_limit_(-1)
-  , running_time_()
-{
-  // If we're multi-thread
-  tr_.set_lock_data_structure(get_lock_data_structure());
-}
-
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-Mesh_optimization_return_code
-Sliver_perturber<C3T3,Md,Sc,V_>::
-operator()(Visitor visitor)
-{
-  //check criterion bound
-  if ( sliver_criterion_.sliver_bound() == 0 )
-    sliver_criterion_.set_sliver_bound(Sc::default_value);
-
-  // Reset sliver value cache
-  helper_.reset_cache();
-
-  // Init time counter
-  if (running_time_.is_running())
-    running_time_.stop();
-  running_time_.reset();
-  running_time_.start();
-
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-  // Build priority queue (we use one queue for all steps)
-  PQueue pqueue(tr_.number_of_vertices());
-
-  // Initialize vertices ids
-  initialize_vertices_id();
-
-
-#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) \
- || defined(CGAL_MESH_3_PROFILING)
-  std::cerr << "Running sliver perturbation..." << std::endl;
-#endif
-
-#ifdef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
-  std::cerr << "Legend of the following line: "
-            << "(#vertices in pqueue, #iterations, #fails)" << std::endl;
-#endif
-
-  const FT& delta = sliver_criterion_.get_perturbation_unit();
-  FT current_bound = delta;
-  bool perturbation_ok = true;
-  while(current_bound <= sliver_criterion_.sliver_bound() && perturbation_ok)
-  {
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-    // reset_perturbation_counters is not const
-    reset_perturbation_counters();
-#endif
-    perturbation_ok = perturb(current_bound, pqueue, visitor);
-
-    visitor.bound_reached(current_bound);
-
-    current_bound += delta;
-    if ( (current_bound >= sliver_criterion_.sliver_bound())
-        && (current_bound < sliver_criterion_.sliver_bound() + delta) )
-    {
-      current_bound = sliver_criterion_.sliver_bound();
-    }
-  }
-
-#ifdef CGAL_MESH_3_PROFILING
-  double perturbation_time = t.elapsed();
-#endif
-
-  running_time_.stop();
-  helper_.reset_cache();//in case we re-use caches in another operation
-                               // after this perturbation
-
-#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
-  std::cerr << std::endl
-            << "Total perturbation time: " << running_time_.time() << "s";
-  std::cerr << std::endl << "Perturbation statistics:" << std::endl;
-  print_final_perturbations_statistics();
-#endif
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << std::endl << "Total perturbation 'wall-clock' time: "
-            << perturbation_time << "s" << std::endl;
-#endif
-
-  Mesh_optimization_return_code ret;
-
-  if ( is_time_limit_reached() ) {
-#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << "Perturbation return code: TIME_LIMIT_REACHED\n\n";
-#endif // CGAL_MESH_3_PERTURBER_VERBOSE
-    ret = TIME_LIMIT_REACHED;
-  }
-  else if ( !perturbation_ok ) {
-#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << "Perturbation return code: CANT_IMPROVE_ANYMORE\n\n";
-#endif // CGAL_MESH_3_PERTURBER_VERBOSE
-    ret = CANT_IMPROVE_ANYMORE;
-  }
-  else
-  {
-#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << "Perturbation return code: BOUND_REACHED\n\n";
-#endif // CGAL_MESH_3_PERTURBER_VERBOSE
-    ret = BOUND_REACHED;
-  }
-
-#if defined(CGAL_MESH_3_EXPORT_PERFORMANCE_DATA) \
- && defined(CGAL_MESH_3_PROFILING)
-  if (ret == BOUND_REACHED)
-  {
-    CGAL_MESH_3_SET_PERFORMANCE_DATA("Perturber_optim_time", perturbation_time);
-  }
-  else
-  {
-    CGAL_MESH_3_SET_PERFORMANCE_DATA("Perturber_optim_time",
-      (ret == CANT_IMPROVE_ANYMORE ?
-      "CANT_IMPROVE_ANYMORE" : "TIME_LIMIT_REACHED"));
-  }
-#endif
-
-  return ret;
-}
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-add_perturbation(Perturbation* perturbation)
-{
-  if ( !perturbation_vector_.empty() )
-    perturbation_vector_.back().set_next(perturbation);
-
-  if ( NULL != perturbation )
-  {
-    // Set order
-    perturbation->set_order(next_perturbation_order_++);
-
-    // Add perturbation
-    perturbation_vector_.push_back(perturbation);
-  }
-}
-
-
-
-
-// -----------------------------------
-// Private methods
-// -----------------------------------
-template <typename C3T3, typename Md, typename Sc, typename V_>
-bool
-Sliver_perturber<C3T3,Md,Sc,V_>::
-perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const
-{
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  CGAL::Timer timer;
-  timer.start();
-  std::streamsize prec = std::cerr.precision(4);
-  std::cerr << "Perturb sliver vertices (bound: " << sliver_bound
-            << ") ..." << std::endl;
-  std::cerr.precision(prec);
-#endif
-
-  // build priority queue
-  int pqueue_size = build_priority_queue(sliver_bound, pqueue);
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  std::cerr << "Legend of the following line: "
-            << "(#vertices in pqueue, #iterations, #fails)" << std::endl;
-
-  // Store construction time
-  timer.stop();
-  double construction_time = timer.time();
-  timer.reset();
-  timer.start();
-#endif
-
-  // Stores the vertices for which perturbation has failed
-  Bad_vertices_vector bad_vertices;
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    this->create_root_task();
-
-    while (pqueue.size() > 0)
-    {
-      PVertex pv = pqueue.top();
-      pqueue.pop();
-      enqueue_task(pv, sliver_bound,
-                   visitor, bad_vertices);
-    }
-
-    this->wait_for_all();
-
-# if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << " Flushing";
-# endif
-    bool keep_flushing = true;
-    while (keep_flushing)
-    {
-      keep_flushing = this->flush_work_buffers();
-# if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-      std::cerr << ".";
-# endif
-    }
-
-    this->destroy_root_task();
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-# ifdef CGAL_MESH_3_PERTURBER_VERBOSE
-    int iteration_nb = 0;
-# endif
-
-    while ( !is_time_limit_reached() && !pqueue.empty() )
-    {
-      // Get pqueue head
-      PVertex pv = pqueue.top();
-      pqueue.pop();
-      --pqueue_size;
-
-      CGAL_assertion(pv.is_perturbable());
-
-      // Get pvertex slivers list
-# ifdef CGAL_NEW_INCIDENT_SLIVERS
-      Cell_vector slivers;
-      helper_.new_incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound,
-                                 std::back_inserter(slivers));
-# else
-      Cell_vector slivers =
-        helper_.incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound);
-# endif
-
-      CGAL_assertion(slivers.size() == pv.sliver_nb());
-
-      // Perturb vertex
-      Vertex_vector modified_vertices;
-
-      // pv.perturbation() should not be NULL if pv is in pqueue
-      CGAL_assertion(pv.perturbation() != NULL);
-
-      std::pair<bool,Vertex_handle> perturbation_ok =
-        pv.perturbation()->operator()(pv.vertex(),
-                                      slivers,
-                                      c3t3_,
-                                      domain_,
-                                      sliver_criterion_,
-                                      sliver_bound,
-                                      modified_vertices);
-
-      // If vertex has changed - may happen in two cases: vertex has been moved
-      // or vertex has been reverted to the same location -
-      if ( perturbation_ok.second != pv.vertex() )
-      {
-        // Update pvertex vertex
-        pv.set_vertex(perturbation_ok.second);
-      }
-
-      // If v has been moved
-      if ( perturbation_ok.first )
-      {
-        // Update pvertex
-        update_pvertex(pv,sliver_bound);
-
-        // If pv needs to be modified again, try first perturbation
-        pv.set_perturbation(&perturbation_vector_.front());
-        pv.increment_try_nb();
-
-        // update modified vertices
-        pqueue_size += update_priority_queue(modified_vertices,
-                                             sliver_bound,
-                                             pqueue);
-      }
-      else
-      {
-        // If perturbation fails, try next one
-        pv.set_perturbation(pv.perturbation()->next());
-
-        if ( NULL == pv.perturbation() )
-        {
-          bad_vertices.push_back(pv.vertex());
-        }
-      }
-
-      // Update pqueue in every cases, because pv was poped
-      pqueue_size += update_priority_queue(pv, pqueue);
-      visitor.end_of_perturbation_iteration(pqueue_size);
-
-# ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-      ++iteration_nb;
-      std::cerr << boost::format("\r             \r"
-                                 "(%1%,%2%,%4%) (%|3$.1f| iteration/s)")
-      % pqueue_size
-      % iteration_nb
-      % (iteration_nb / timer.time())
-      % bad_vertices.size();
-# endif
-
-# ifdef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
-      ++iteration_nb;
-      std::cerr << boost::format("\r             \r"
-                                 "bound %5%: (%1%,%2%,%4%) (%|3$.1f| iteration/s)")
-      % pqueue_size
-      % iteration_nb
-      % (iteration_nb / running_time_.time())
-      % bad_vertices.size()
-      % sliver_bound;
-# endif
-    }
-  }
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  std::cerr << std::endl;
-  print_perturbations_statistics();
-  std::cerr << "Step perturbation time: " << timer.time() + construction_time
-            << "s" << std::endl << std::endl;
-#endif
-
-  if ( is_time_limit_reached() )
-    return false;
-
-  // update bad vertices list (remove those which are not bad anymore)
-  update_bad_vertices(bad_vertices,sliver_bound);
-  return bad_vertices.empty();
-}
-
-
-#ifdef CGAL_FASTER_BUILD_QUEUE
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-int
-Sliver_perturber<C3T3,Md,Sc,V_>::
-build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const
-{
-  CGAL_precondition(pqueue.empty());
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  CGAL::Timer timer;
-  timer.start();
-  std::cerr << "Build pqueue...";
-#endif
-
-  int pqueue_size = 0;
-
-  typedef typename std::iterator_traits<Vertex_handle>::value_type Vertex;
-  typedef CGAL::internal::Has_timestamp<Vertex> Vertex_has_timestamp;
-  using CGAL::internal::Mesh_3::VHash;
-  typedef VHash<Tr, Vertex_has_timestamp::value> Hash_fct;
-  typedef boost::unordered_map<Vertex_handle,PVertex,Hash_fct> M;
-
-  M vpm;
-  for ( typename Tr::Finite_cells_iterator cit = tr_.finite_cells_begin();
-       cit != tr_.finite_cells_end() ;
-       ++cit )
-  {
-    if(helper_.is_sliver(cit, sliver_criterion_, sliver_bound))
-    {
-      double d = cit->sliver_value();
-      for(int i=0; i< 4; i++){
-        Vertex_handle vh = cit->vertex(i);
-        PVertex& pv = vpm[vh];
-        if(pv.sliver_nb() ==0)
-        {
-          pv.set_vertex(vh);
-          pv.set_id( get_pvertex_id(vh));
-          pv.set_sliver_nb(1);
-          pv.set_min_value(d);
-          pv.set_perturbation(&perturbation_vector_.front());
-        }
-        else
-        {
-          pv.set_sliver_nb(pv.sliver_nb()+1);
-          if(d < pv.min_value())
-            pv.set_min_value(d);
-        }
-      }
-    }
-  }
-
-  for( typename M::iterator vit = vpm.begin();
-       vit != vpm.end() ;
-       ++vit )
-    pqueue_size += update_priority_queue(vit->second, pqueue);
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  std::cerr << "done (" << pqueue_size << " vertices inserted in "
-            << timer.time() << "s)\n";
-#endif
-
-  return pqueue_size;
-}
-
-#else // not CGAL_FASTER_BUILD_QUEUE
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-int
-Sliver_perturber<C3T3,Md,Sc,V_>::
-build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const
-{
-  CGAL_precondition(pqueue.empty());
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  CGAL::Timer timer;
-  timer.start();
-  std::cerr << "Build pqueue...";
-#endif
-
-  int pqueue_size = 0;
-
-  for ( typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
-       vit != tr_.finite_vertices_end() ;
-       ++vit )
-  {
-    PVertex pv = make_pvertex(vit, sliver_bound, get_pvertex_id(vit));
-    pqueue_size += update_priority_queue(pv, pqueue);
-  }
-
-#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
-  std::cerr << "done (" << pqueue_size << " vertices inserted in "
-            << timer.time() << "s)\n";
-#endif
-
-  return pqueue_size;
-}
-#endif // not CGAL_FASTER_BUILD_QUEUE
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-int
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_priority_queue(const Vertex_vector& vertices,
-                      const FT& sliver_bound,
-                      PQueue& pqueue) const
-{
-  int modified_pv_nb = 0;
-  for ( typename Vertex_vector::const_iterator vit = vertices.begin() ;
-       vit != vertices.end() ;
-       ++vit )
-  {
-    PVertex pv = make_pvertex(*vit,sliver_bound,get_pvertex_id(*vit));
-    modified_pv_nb += update_priority_queue(pv, pqueue);
-  }
-
-  return modified_pv_nb;
-}
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-// For parallel version
-template <typename C3T3, typename Md, typename Sc, typename V_>
-int
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_priority_queue( const Vertex_vector& vertices
-                     , const FT& sliver_bound
-                     , Visitor& visitor
-                     , Bad_vertices_vector &bad_vertices) const
-{
-  int modified_pv_nb = 0;
-  for ( typename Vertex_vector::const_iterator vit = vertices.begin() ;
-       vit != vertices.end() ;
-       ++vit )
-  {
-    PVertex pv = make_pvertex__concurrent(*vit,sliver_bound,get_pvertex_id(*vit));
-    if (pv.is_perturbable())
-    {
-      enqueue_task(pv, sliver_bound, visitor, bad_vertices);
-      ++modified_pv_nb;
-    }
-  }
-
-  return modified_pv_nb;
-}
-#endif
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-int
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_priority_queue(const PVertex& pv, PQueue& pqueue) const
-{
-  if ( pqueue.contains(pv) )
-  {
-    if ( pv.is_perturbable() )
-    {
-      pqueue.update(pv);
-      return 0;
-    }
-    else
-    {
-      pqueue.remove(pv);
-      return -1;
-    }
-  }
-  else
-  {
-    if ( pv.is_perturbable() )
-    {
-      pqueue.push(pv);
-      return 1;
-    }
-  }
-
-  return 0;
-}
-
-#ifdef CGAL_LINKED_WITH_TBB
-// For parallel version
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-perturb_vertex( PVertex pv
-              , const FT& sliver_bound
-              , Visitor& visitor
-              , Bad_vertices_vector &bad_vertices
-              , bool *could_lock_zone
-              ) const
-{
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-  static Profile_branch_counter_3 bcounter(
-    "early withdrawals / late withdrawals / successes [Perturber]");
-#endif
-
-  *could_lock_zone = true;
-
-  // Zombie?
-  if (pv.is_zombie())
-  {
-    return;
-  }
-
-  Point_3 p = pv.vertex()->point();
-  if (!helper_.try_lock_point_no_spin(p) || p != pv.vertex()->point())
-  {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-    bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-    *could_lock_zone = false;
-    return;
-  }
-
-  // Zombie? (in case the vertex has changed in the meantime)
-  if (pv.is_zombie())
-  {
-    return;
-  }
-
-  CGAL_assertion(pv.is_perturbable());
-
-  int num_new_vertices_to_treat = 0;
-
-  Cell_vector slivers;
-  slivers.reserve(8);
-  if (!helper_.try_lock_and_get_incident_slivers(
-    pv.vertex(), sliver_criterion_, sliver_bound, slivers))
-  {
-    *could_lock_zone = false;
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-    bcounter.increment_branch_1(); // THIS is a late withdrawal!
-#endif
-  }
-  else
-  {
-    // Slivers may be empty if the vertex has been modified by another thread in the meatime
-    if (slivers.empty())
-    {
-      return;
-    }
-
-    // Perturb vertex
-    Vertex_vector modified_vertices;
-
-    // pv.perturbation() should not be NULL if pv is in pqueue
-    CGAL_assertion(pv.perturbation() != NULL);
-
-    std::pair<bool,Vertex_handle> perturbation_ok =
-      pv.perturbation()->operator()(pv.vertex(),
-                                    slivers,
-                                    c3t3_,
-                                    domain_,
-                                    sliver_criterion_,
-                                    sliver_bound,
-                                    modified_vertices,
-                                    could_lock_zone);
-
-    if (*could_lock_zone)
-    {
-      // If vertex has changed - may happen in two cases: vertex has been moved
-      // or vertex has been reverted to the same location -
-      if ( perturbation_ok.second != pv.vertex() )
-      {
-        // Update pvertex vertex
-        pv.set_vertex(perturbation_ok.second);
-      }
-      // If the vertex hasn't changed, we still need to "virtually" increment
-      // the erase counter, because we need to invalidate the PVertex that
-      // may be in other threads' queues
-      else
-      {
-        this->increment_erase_counter(pv.vertex());
-      }
-
-      // If v has been moved
-      if ( perturbation_ok.first )
-      {
-        // Update pvertex
-        update_pvertex__concurrent(pv,sliver_bound);
-
-        // If pv needs to be modified again, try first perturbation
-        pv.set_perturbation(&perturbation_vector_.front());
-        pv.increment_try_nb();
-
-        // update modified vertices
-        num_new_vertices_to_treat +=
-          update_priority_queue(modified_vertices, sliver_bound, visitor, bad_vertices);
-      }
-      else
-      {
-        // If perturbation fails, try next one
-        pv.set_perturbation(pv.perturbation()->next());
-        pv.update_saved_erase_counter();
-
-        if ( NULL == pv.perturbation() )
-        {
-          bad_vertices.push_back(pv.vertex());
-        }
-      }
-
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-      ++bcounter;
-#endif
-
-      // Update pqueue in every cases, because pv was poped
-      if (pv.is_perturbable())
-      {
-        enqueue_task(pv, sliver_bound, visitor, bad_vertices);
-        ++num_new_vertices_to_treat;
-      }
-    }
-    else
-    {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-      bcounter.increment_branch_1();   // THIS is a late withdrawal!
-#endif
-    }
-  }
-
-  visitor.end_of_perturbation_iteration(0);
-}
-#endif
-
-
-// Sequential
-template <typename C3T3, typename Md, typename Sc, typename V_>
-typename Sliver_perturber<C3T3,Md,Sc,V_>::PVertex
-Sliver_perturber<C3T3,Md,Sc,V_>::
-make_pvertex(const Vertex_handle& vh,
-             const FT& sliver_bound,
-             const typename PVertex::id_type& pv_id) const
-{
-  CGAL_assertion(!tr_.is_infinite(vh));
-
-  // Make pvertex in all cases
-  PVertex pv(vh,pv_id);
-  pv.set_perturbation(&perturbation_vector_.front());
-  update_pvertex(pv, sliver_bound);
-
-  return pv;
-}
-
-// Parallel
-template <typename C3T3, typename Md, typename Sc, typename V_>
-typename Sliver_perturber<C3T3,Md,Sc,V_>::PVertex
-Sliver_perturber<C3T3,Md,Sc,V_>::
-make_pvertex__concurrent(
-             const Vertex_handle& vh,
-             const FT& sliver_bound,
-             const typename PVertex::id_type& pv_id) const
-{
-  // Make pvertex in all cases
-  PVertex pv(vh,pv_id);
-  pv.set_perturbation(&perturbation_vector_.front());
-  update_pvertex__concurrent(pv, sliver_bound);
-
-  return pv;
-}
-
-
-// Sequential
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_pvertex(PVertex& pv, const FT& sliver_bound) const
-{
-#ifdef CGAL_NEW_INCIDENT_SLIVERS
-  Cell_vector slivers;
-  helper_.new_incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound, std::back_inserter(slivers));
-#else
-  Cell_vector slivers =
-    helper_.incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound);
-#endif
-
-  pv.set_sliver_nb(static_cast<unsigned int>(slivers.size()));
-  pv.set_min_value(helper_.min_sliver_value(slivers, sliver_criterion_));
-}
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_pvertex__concurrent(PVertex& pv, const FT& sliver_bound) const
-{
-  Cell_vector slivers;
-  helper_.get_incident_slivers_without_using_tds_data(
-    pv.vertex(), sliver_criterion_, sliver_bound, slivers);
-
-  pv.set_sliver_nb(static_cast<unsigned int>(slivers.size()));
-  pv.set_min_value(helper_.min_sliver_value(slivers, sliver_criterion_));
-}
-#endif
-
-// Sequential
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_bad_vertices(std::vector<Vertex_handle> &bad_vertices,
-                    const FT& sliver_bound) const
-{
-  typename std::vector<Vertex_handle>::iterator vit = bad_vertices.begin();
-  while ( vit != bad_vertices.end() )
-  {
-    if ( tr_.is_vertex(*vit)
-        && helper_.min_incident_value(*vit,sliver_criterion_) <= sliver_bound )
-    {
-      ++vit;
-    }
-    else
-    {
-      vit = bad_vertices.erase(vit);
-    }
-  }
-}
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-update_bad_vertices(tbb::concurrent_vector<Vertex_handle> &bad_vertices,
-                    const FT& sliver_bound) const
-{
-  tbb::concurrent_vector<Vertex_handle> tmpv;
-
-  typename tbb::concurrent_vector<Vertex_handle>::iterator vit
-    = bad_vertices.begin();
-  while ( vit != bad_vertices.end() )
-  {
-    if ( tr_.is_vertex(*vit)
-        && helper_.min_incident_value(*vit,sliver_criterion_) <= sliver_bound )
-    {
-      tmpv.push_back(*vit);
-    }
-    ++vit;
-  }
-  bad_vertices.swap(tmpv);
-}
-#endif // CGAL_LINKED_WITH_TBB
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-initialize_vertices_id() const
-{
-  namespace bl = boost::lambda;
-  int cur_id = 0;
-
-  std::for_each(tr_.finite_vertices_begin(), tr_.finite_vertices_end(),
-                bl::bind(&Vertex::set_meshing_info, &bl::_1, bl::var(cur_id)++));
-}
-
-
-#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-print_perturbations_statistics() const
-{
-  int total_perturbation_nb = 0;
-  typename Perturbation_vector::const_iterator it = perturbation_vector_.begin();
-  for ( ; it != perturbation_vector_.end() ; ++it )
-  {
-    total_perturbation_nb += it->counter();
-  }
-
-  if ( 0 == total_perturbation_nb )
-  {
-    std::cerr << "No perturbation done at this step" << std::endl;
-    return;
-  }
-
-  for ( it = perturbation_vector_.begin() ;
-       it != perturbation_vector_.end() ;
-       ++it )
-  {
-    std::cerr << it->perturbation_name() << ": "
-              << (double)it->counter() / (double)total_perturbation_nb * 100.
-              << "% (" << it->counter() << " in " << it->time() << "s)"
-              << std::endl;
-  }
-}
-
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-print_final_perturbations_statistics() const
-{
-  int total_perturbation_nb = 0;
-  typename Perturbation_vector::const_iterator it = perturbation_vector_.begin();
-  for ( ; it != perturbation_vector_.end() ; ++it )
-  {
-    total_perturbation_nb += it->total_counter();
-  }
-
-  if ( 0 == total_perturbation_nb )
-  {
-    std::cerr << "No perturbation done" << std::endl;
-    return;
-  }
-
-  for ( it = perturbation_vector_.begin() ;
-       it != perturbation_vector_.end() ;
-       ++it )
-  {
-    std::cerr << it->perturbation_name() << ": "
-              << (double)it->total_counter() / (double)total_perturbation_nb * 100.
-              << "% (" << it->total_counter() << " in " << it->total_time() << "ms)"
-              << std::endl;
-  }
-}
-
-
-
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-reset_perturbation_counters()
-{
-  typename Perturbation_vector::iterator it = perturbation_vector_.begin();
-  for ( ; it != perturbation_vector_.end() ; ++it )
-  {
-    it->reset_counter();
-    it->reset_timer();
-  }
-}
-#endif
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-// For parallel version
-template <typename C3T3, typename Md, typename Sc, typename V_>
-void
-Sliver_perturber<C3T3,Md,Sc,V_>::
-enqueue_task(const PVertex &pv,
-             const FT& sliver_bound,
-             Visitor& visitor,
-             Bad_vertices_vector &bad_vertices
-             ) const
-{
-  this->enqueue_work(
-    Perturb_vertex<Self, Bad_vertices_vector>(
-      *this, pv, sliver_bound, visitor, bad_vertices),
-    pv);
-}
-#endif
-
-} // end namespace Mesh_3
-
-
-} //namespace CGAL
-
-#endif // CGAL_MESH_3_SLIVERS_PERTURBER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder.h
deleted file mode 100644
index bf5cf89..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder.h
+++ /dev/null
@@ -1,1869 +0,0 @@
-// Copyright (c) 2004-2007  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau, Stephane Tayeb
-
-#ifndef CGAL_MESH_3_SLIVERS_EXUDER_H
-#define CGAL_MESH_3_SLIVERS_EXUDER_H
-
-#include <CGAL/Mesh_3/config.h>
-#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
-#include <CGAL/Bbox_3.h>
-
-#include <CGAL/Double_map.h>
-#include <CGAL/iterator.h>
-#include <map>
-#include <vector>
-#include <set>
-#include <algorithm>
-#include <iomanip> // std::setprecision
-#include <iostream> // std::cerr/cout
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/function_output_iterator.hpp>
-#include <boost/bind.hpp>
-#include <boost/format.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/optional.hpp>
-
-#include <CGAL/Timer.h>
-
-#include <CGAL/Mesh_3/sliver_criteria.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/Null_exuder_visitor.h>
-
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-# define CGAL_PROFILE
-# include <CGAL/Profile_counter.h>
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/task.h>
-#endif
-
-
-#ifdef CGAL_MESH_3_VERBOSE
-  #define CGAL_MESH_3_EXUDER_VERBOSE
-#endif
-
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-  namespace details { // various function objects
-
-    // That functor Second_of takes a pair as input (the value type of a
-    // map), and returns the ".second" member of that pair. It is used in
-    // Slivers_exuder, to constructor a transform iterator.
-
-    // It should be doable using STL bind operators, but i am not sure how
-    // to use them. -- Laurent Rineau, 2007/07/27
-    template <typename Map>
-    struct Second_of :
-    public std::unary_function<typename Map::value_type,
-    const typename Map::mapped_type&>
-    {
-      typedef std::unary_function<typename Map::value_type,
-        const typename Map::mapped_type&> Base;
-      typedef typename Base::result_type result_type;
-      typedef typename Base::argument_type argument_type;
-
-      const typename Map::mapped_type&
-      operator()(const typename Map::value_type& p) const
-      {
-        return p.second;
-      }
-    }; // end class Second_of
-
-    // That function is constructed with a vertex handle v1.
-    // Then, its operator() takes an other vertex handle v2 as input, and
-    // returns the distance d(v1, v2).
-    // It is used in Slivers_exuder, to constructor a transform iterator.
-    template <typename Gt, typename Vertex_handle>
-    class Min_distance_from_v :
-    public std::unary_function<Vertex_handle, void>
-    {
-      const Vertex_handle * v;
-      Gt gt;
-      double & dist;
-
-    public:
-      Min_distance_from_v(const Vertex_handle& vh,
-                          double& dist,
-                          Gt geom_traits = Gt())
-        : v(&vh), gt(geom_traits), dist(dist)
-      {
-      }
-
-      void
-      operator()(const Vertex_handle& vh) const
-      {
-        typedef typename Gt::Compute_squared_distance_3
-        Compute_squared_distance_3;
-        Compute_squared_distance_3 distance =
-        gt.compute_squared_distance_3_object();
-
-        const double d = CGAL::to_double(distance((*v)->point(), vh->point()));
-        if(d < dist){
-          dist = d;
-        }
-      }
-    }; // end class Min_distance_from_v
-
-  } // end namespace details
-
-
-
-/************************************************
-// Class Slivers_exuder_base
-// Two versions: sequential / parallel
-************************************************/
-
-// Sequential
-template <typename Tr, typename Concurrency_tag>
-class Slivers_exuder_base
-{
-protected:
-  typedef typename Tr::Vertex_handle                        Vertex_handle;
-  typedef typename Tr::Cell_handle                          Cell_handle;
-  typedef std::vector<Cell_handle>                          Cell_vector;
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename std::vector<Vertex_handle>               Bad_vertices_vector;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-
-  // A priority queue ordered on Tet quality (SliverCriteria)
-  typedef CGAL::Double_map<Cell_handle, double>             Tet_priority_queue;
-  typedef typename Tet_priority_queue::reverse_iterator     Queue_iterator;
-  typedef typename Tet_priority_queue::Reverse_entry        Queue_value_type;
-
-  Slivers_exuder_base(const Bbox_3 &, int) {}
-
-  Lock_data_structure * get_lock_data_structure()   const { return 0; }
-  void unlock_all_elements()                        const {}
-  void create_root_task()                           const {}
-  bool flush_work_buffers()                         const { return true; }
-  void wait_for_all()                               const {}
-  void destroy_root_task()                          const {}
-  template <typename Func>
-  void enqueue_work(Func, double)                   const {}
-
-protected:
-  Cell_handle extract_cell_handle_from_queue_value(const Queue_value_type &qv) const
-  {
-    return qv.second;
-  }
-  double extract_cell_quality_from_queue_value(const Queue_value_type &qv) const
-  {
-    return qv.first;
-  }
-  unsigned int extract_erase_counter_from_queue_value(const Queue_value_type &) const
-  {
-    return 0;
-  }
-
-  // Dummy
-  unsigned int erase_counter(const Cell_handle &) const { return 0;}
-
-  std::size_t cells_queue_size() const { return cells_queue_.size(); }
-  bool cells_queue_empty()       const { return cells_queue_.empty(); }
-  Queue_iterator
-    cells_queue_front()                { return cells_queue_.front(); }
-  void cells_queue_pop_front()         { cells_queue_.pop_front(); }
-  void cells_queue_clear()             { cells_queue_.clear(); }
-  void cells_queue_insert(const Cell_handle &ch, double quality_value)
-  {
-    cells_queue_.insert(ch, quality_value);
-  }
-
-  /**
-   * A functor to remove one \c Cell_handle from a priority queue
-   */
-  class Erase_from_queue
-  {
-  public:
-    Erase_from_queue(Tet_priority_queue& queue)
-    : r_queue_(queue) { }
-
-    void operator()(const Cell_handle& cell)
-    { r_queue_.erase(cell); }
-
-  private:
-    Tet_priority_queue& r_queue_;
-  };
-
-  /**
-   * Delete cells of \c cells from \c cells_queue
-   */
-  void delete_cells_from_queue(const Cell_vector& cells)
-  {
-    std::for_each(cells.begin(), cells.end(),
-                  Erase_from_queue(cells_queue_));
-  }
-
-private:
-
-  Tet_priority_queue cells_queue_;
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel
-template <typename Tr>
-class Slivers_exuder_base<Tr, Parallel_tag>
-{
-protected:
-  typedef typename Tr::Vertex_handle                        Vertex_handle;
-  typedef typename Tr::Cell_handle                          Cell_handle;
-  typedef std::vector<Cell_handle>                          Cell_vector;
-  typedef typename Tr::Geom_traits                          Gt;
-  typedef typename Gt::FT                                   FT;
-  typedef typename tbb::concurrent_vector<Vertex_handle>    Bad_vertices_vector;
-  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
-
-  // A priority queue ordered on Tet quality (SliverCriteria)
-  typedef std::multimap<
-    double, std::pair<Cell_handle, unsigned int> >          Tet_priority_queue;
-  typedef typename Tet_priority_queue::iterator             Queue_iterator;
-  typedef typename Tet_priority_queue::value_type           Queue_value_type;
-
-  Slivers_exuder_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
-    : m_lock_ds(bbox, num_grid_cells_per_axis)
-    , m_worksharing_ds(bbox)
-  {
-  }
-
-  Lock_data_structure *get_lock_data_structure() const
-  {
-    return &m_lock_ds;
-  }
-
-  void unlock_all_elements() const
-  {
-    m_lock_ds.unlock_all_points_locked_by_this_thread();
-  }
-
-  void create_root_task() const
-  {
-    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
-    m_empty_root_task->set_ref_count(1);
-  }
-
-  bool flush_work_buffers() const
-  {
-    m_empty_root_task->set_ref_count(1);
-    bool keep_flushing = m_worksharing_ds.flush_work_buffers(*m_empty_root_task);
-    wait_for_all();
-    return keep_flushing;
-  }
-
-  void wait_for_all() const
-  {
-    m_empty_root_task->wait_for_all();
-  }
-
-  void destroy_root_task() const
-  {
-    tbb::task::destroy(*m_empty_root_task);
-    m_empty_root_task = 0;
-  }
-
-  template <typename Func>
-  void enqueue_work(Func f, double value) const
-  {
-    CGAL_assertion(m_empty_root_task != 0);
-    m_worksharing_ds.enqueue_work(f, value, *m_empty_root_task);
-  }
-
-public:
-
-protected:
-  Cell_handle extract_cell_handle_from_queue_value(const Queue_value_type &qv) const
-  {
-    return qv.second.first;
-  }
-  double extract_cell_quality_from_queue_value(const Queue_value_type &qv) const
-  {
-    return qv.first;
-  }
-  unsigned int extract_erase_counter_from_queue_value(const Queue_value_type &qv) const
-  {
-    return qv.second.second;
-  }
-
-  unsigned int erase_counter(const Cell_handle &ch) const
-  {
-    return ch->erase_counter();
-  }
-
-  std::size_t cells_queue_size() const { return cells_queue_.size(); }
-  bool cells_queue_empty()       const { return cells_queue_.empty(); }
-  Queue_iterator
-    cells_queue_front()                { return cells_queue_.begin(); }
-  void cells_queue_pop_front()         { cells_queue_.erase(cells_queue_front()); }
-  void cells_queue_clear()             { cells_queue_.clear(); }
-  void cells_queue_insert(const Cell_handle &ch, double quality_value)
-  {
-    cells_queue_.insert(std::make_pair(
-      quality_value,
-      std::make_pair(ch, ch->erase_counter())));
-  }
-
-  /**
-   * A functor to remove one \c Cell_handle from a priority queue
-   */
-  class Erase_from_queue
-  {
-  public:
-    Erase_from_queue(Tet_priority_queue&) {}
-
-    void operator()(const Cell_handle& cell)
-    { cell->increment_erase_counter(); }
-  };
-
-  /**
-   * Delete cells of \c cells from \c cells_queue
-   */
-  void delete_cells_from_queue(const Cell_vector& cells)
-  {
-    std::for_each(cells.begin(), cells.end(),
-                  Erase_from_queue(cells_queue_));
-  }
-
-  mutable Lock_data_structure                 m_lock_ds;
-  mutable Mesh_3::Auto_worksharing_ds         m_worksharing_ds;
-  mutable tbb::task                          *m_empty_root_task;
-
-private:
-
-  Tet_priority_queue cells_queue_;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-
-/************************************************
-// Class Slivers_exuder
-************************************************/
-
-template <
-  typename C3T3,
-  typename SliverCriteria,
-  typename Visitor_ = Null_exuder_visitor<C3T3>,
-  typename FT = typename C3T3::Triangulation::Geom_traits::FT
-  >
-class Slivers_exuder
-: public Slivers_exuder_base<typename C3T3::Triangulation,
-                             typename C3T3::Concurrency_tag>
-{
-
-public: // Types
-
-  typedef typename C3T3::Concurrency_tag Concurrency_tag;
-  typedef Slivers_exuder_base<
-    typename C3T3::Triangulation, Concurrency_tag> Base;
-
-private: // Types
-
-  typedef Slivers_exuder<C3T3, SliverCriteria, Visitor_, FT> Self;
-
-  typedef typename C3T3::Triangulation Tr;
-  typedef typename Tr::Weighted_point Weighted_point;
-  typedef typename Tr::Bare_point Bare_point;
-  typedef typename Tr::Cell_handle Cell_handle;
-  typedef typename Tr::Facet Facet;
-  typedef typename Tr::Vertex_handle Vertex_handle;
-  typedef typename Weighted_point::Weight Weight;
-  typedef typename Base::Queue_value_type Queue_value_type;
-  typedef typename Base::Cell_vector Cell_vector;
-
-  typedef typename Tr::Geom_traits Geom_traits;
-  typedef typename Geom_traits::Tetrahedron_3 Tetrahedron_3;
-
-  typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
-  typedef std::vector<Facet> Facet_vector;
-
-  typedef typename C3T3::Surface_patch_index Surface_patch_index;
-  typedef typename C3T3::Subdomain_index Subdomain_index;
-  typedef typename C3T3::Index Index;
-
-  // Umbrella will store the surface_index of internal facets of a new
-  // weighted point conflict zone. Such facets are represented by their edge
-  // which do not contain the pumped vertex
-  typedef std::pair<Vertex_handle,Vertex_handle> Ordered_edge;
-  typedef std::pair<Surface_patch_index, std::size_t> Patch_and_counter;
-  typedef std::map<Ordered_edge, Patch_and_counter> Umbrella;
-
-  // Boundary_facets_from_outside represents the facet of the conflict zone
-  // seen from outside of it. It stores Surface_patch_index of the facet, and
-  // Subdomain_index of the cell which is inside the conflict zone.
-  typedef std::map<Facet, std::pair<Surface_patch_index,Subdomain_index> >
-    Boundary_facets_from_outside;
-
-  /** Pre_star will represent the pre-star of a point. It is a (double)-map
-   *  of Facet (viewed from cells inside the star), ordered by the
-   *  critial_radius of the point with the cell that lies on the facet, at
-   *  the exterior of the pre-star. */
-  typedef CGAL::Double_map<Facet, double> Pre_star;
-
-  // Stores the value of facet for the sliver criterion functor
-  typedef std::map<Facet, double> Sliver_values;
-
-  // Visitor class
-  // Should define
-  //  - after_cell_pumped(std::size_t cells_left_number)
-  typedef Visitor_ Visitor;
-  
-  using Base::get_lock_data_structure;
-
-public: // methods
-
-  /**
-   * @brief Constructor
-   * @param c3t3 The mesh to exude
-   * @param criteria The criterion which will be used to evaluate tet quality
-   * @param d defines the maximal weight we will try:
-   * max_weight(v) < d*dist(v,nearest_vertice(v))
-   */
-  Slivers_exuder(C3T3& c3t3,
-                 const SliverCriteria& criterion,
-                 double d = 0.45);
-
-  /**
-   * @brief pumps vertices
-   * @param criterion_value_limit All vertices of tetrahedra that have a
-   * quality below this bound will be pumped
-   */
-  Mesh_optimization_return_code
-  operator()(Visitor visitor = Visitor())
-  {
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-    Mesh_optimization_return_code ret =
-      pump_vertices<true>(sliver_criteria_.sliver_bound(), visitor);
-
-#ifdef CGAL_MESH_3_PROFILING
-    double exudation_time = t.elapsed();
-    std::cerr << std::endl << "==== Total exudation 'wall-clock' time: "
-              << exudation_time << "s ====" << std::endl;
-#endif
-
-#ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
-    if (ret == BOUND_REACHED)
-    {
-      CGAL_MESH_3_SET_PERFORMANCE_DATA("Exuder_optim_time", exudation_time);
-    }
-    else
-    {
-      CGAL_MESH_3_SET_PERFORMANCE_DATA("Exuder_optim_time",
-        (ret == CANT_IMPROVE_ANYMORE ?
-        "CANT_IMPROVE_ANYMORE" : "TIME_LIMIT_REACHED"));
-    }
-#endif
-
-    return ret;
-  }
-
-  /// Time accessors
-  void set_time_limit(double time) { time_limit_ = time; }
-  double time_limit() const { return time_limit_; }
-
-private:
-  // -----------------------------------
-  // Private Methods
-  // -----------------------------------
-  /**
-   * Pumps vertices
-   */
-  template <bool pump_vertices_on_surfaces>
-  Mesh_optimization_return_code
-  pump_vertices(double criterion_value_limit, Visitor& v);
-
-  /**
-   * Pump one vertex
-   */
-  template <bool pump_vertices_on_surfaces>
-  bool pump_vertex(const Vertex_handle& v,
-                   bool *could_lock_zone = NULL);
-
-  /**
-   * Returns the best_weight of v
-   */
-  double get_best_weight(const Vertex_handle& v,
-                         bool *could_lock_zone = NULL) const;
-
-  /**
-   * Initializes pre_star and criterion_values
-   */
-  void
-  initialize_prestar_and_criterion_values(const Vertex_handle& v,
-                                          Pre_star& pre_star,
-                                          Sliver_values& criterion_values,
-                                          bool *could_lock_zone = NULL) const;
-
-  /**
-   * Expand pre_star with cell_to_add
-   */
-  bool expand_prestar(const Cell_handle& cell_to_add,
-                      const Vertex_handle& pumped_vertex,
-                      Pre_star& pre_star,
-                      Sliver_values& criterion_values) const;
-
-  /**
-   * Returns Ordered_edge of facet which do not contains vertex
-   */
-  Ordered_edge get_opposite_ordered_edge(const Facet& facet,
-                                         const Vertex_handle& vertex) const;
-
-  /**
-   * Returns the umbrella of internal_facets vector
-   */
-  boost::optional<Umbrella>
-  get_umbrella(const Facet_vector& internal_facets,
-               const Vertex_handle& v) const;
-
-  /**
-   * Updates the mesh with new_point
-   */
-  template <bool pump_vertices_on_surfaces>
-  bool update_mesh(const Weighted_point& new_point,
-                   const Vertex_handle& old_vertex,
-                   bool *could_lock_zone = NULL);
-
-  /**
-   * Restores cells and boundary facets of conflict zone of new_vertex in c3t3_
-   */
-  template <bool pump_vertices_on_surfaces>
-  void restore_cells_and_boundary_facets(
-    const Boundary_facets_from_outside& boundary_facets_from_outside,
-    const Vertex_handle& new_vertex);
-
-  /**
-   * Restore internal facets of conflict zone of new_vertex in c3t3_
-   */
-  void restore_internal_facets(const Umbrella& umbrella,
-                               const Vertex_handle& new_vertex);
-
-  /**
-   * Orders handles \c h1 & \c h2
-   */
-  template <typename Handle>
-  static
-  void order_two_handles(Handle& h1, Handle& h2)
-  {
-    if( h2 < h1 )
-      std::swap(h1, h2);
-  }
-
-  template <typename Handle>
-  static
-  void order_three_handles(Handle& h1, Handle& h2, Handle& h3)
-  {
-    if(h1 > h2) std::swap(h1, h2);
-    if(h2 > h3) std::swap(h2, h3);
-    if(h1 > h2) std::swap(h1, h2);
-  }
-
-  /**
-   * Initialization
-   */
-  void init(double limit_value)
-  {
-    if ( 0 < limit_value )
-      sliver_criteria_.set_sliver_bound(limit_value);
-    else
-      sliver_criteria_.set_sliver_bound(SliverCriteria::max_value);
-
-    this->cells_queue_clear();
-    initialize_cells_priority_queue();
-    initialized_ = true;
-  }
-
-  /**
-   * Initialize cells_queue w.r.t sliver_bound_
-   */
-  void initialize_cells_priority_queue()
-  {
-    for( Cell_iterator cit = c3t3_.cells_in_complex_begin() ;
-        cit != c3t3_.cells_in_complex_end() ;
-        ++cit)
-    {
-      const double value
-        = sliver_criteria_(cit);
-
-      if( value < sliver_criteria_.sliver_bound() )
-        this->cells_queue_insert(cit, value);
-    }
-  }
-
-  /**
-   * Returns critical radius of (v,c)
-   */
-  double compute_critical_radius(const Vertex_handle& v,
-                                 const Cell_handle& c) const
-  {
-    typedef typename Geom_traits::Compute_critical_squared_radius_3
-      Critical_radius;
-
-    Critical_radius critical_radius =
-      tr_.geom_traits().compute_critical_squared_radius_3_object();
-
-    return CGAL::to_double(critical_radius(c->vertex(0)->point(),
-                                           c->vertex(1)->point(),
-                                           c->vertex(2)->point(),
-                                           c->vertex(3)->point(),
-                                           v->point()));
-  }
-
-  /**
-   * Returns the squared distance from vh to its closest vertice
-   */
-  double get_closest_vertice_squared_distance(const Vertex_handle& vh) const
-  {
-
-    double dist = (std::numeric_limits<double>::max)();
-    details::Min_distance_from_v<Geom_traits, Vertex_handle>
-      min_distance_from_v(vh, dist);
-
-    tr_.adjacent_vertices(vh, boost::make_function_output_iterator(min_distance_from_v));
-
-    return dist;
-  }
-
-  /**
-   * Returns the min value of second element of Ratio
-   */
-  double get_min_value(const Sliver_values& criterion_values) const
-  {
-    using boost::make_transform_iterator;
-    typedef details::Second_of<Sliver_values> Second_of;
-
-    return *(std::min_element(
-      make_transform_iterator(criterion_values.begin(), Second_of()),
-      make_transform_iterator(criterion_values.end(), Second_of())));
-  }
-
-  /**
-   * Returns the \c Boundary_facets_from_outside object containing mirror facets
-   * of \c facets
-   */
-  Boundary_facets_from_outside
-  get_boundary_facets_from_outside(const Facet_vector& facets) const
-  {
-    Boundary_facets_from_outside boundary_facets_from_outside;
-
-    for(typename Facet_vector::const_iterator fit = facets.begin();
-        fit != facets.end();
-        ++fit)
-    {
-      boundary_facets_from_outside.insert(std::make_pair(
-        tr_.mirror_facet(*fit),
-        std::make_pair(c3t3_.surface_patch_index(*fit),
-                       c3t3_.subdomain_index(fit->first))));
-    }
-
-    return boundary_facets_from_outside;
-  }
-
-  /**
-   * Add a cell \c ch to \c cells_queue
-   */
-  template <bool pump_vertices_on_surfaces>
-  void add_cell_to_queue(Cell_handle ch, double criterion_value)
-  {
-#ifdef CGAL_LINKED_WITH_TBB
-    // Parallel
-    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-      enqueue_task<pump_vertices_on_surfaces>(
-        ch, this->erase_counter(ch), criterion_value);
-    // Sequential
-    else
-#endif
-      this->cells_queue_insert(ch, criterion_value);
-
-  }
-
-  /**
-   * A functor to remove one handle (Cell_handle/Facet_handle) from complex
-   */
-  class Remove_from_complex
-  {
-  public:
-    Remove_from_complex(C3T3& c3t3)
-    : c3t3_(c3t3) { }
-
-    template <typename Handle_>
-    void operator()(const Handle_& handle)
-    { c3t3_.remove_from_complex(handle); }
-
-  private:
-    C3T3& c3t3_;
-  };
-
-  /**
-   * Removes objects of [begin,end[ range from \c c3t3_
-   */
-  template<typename ForwardIterator>
-  void remove_from_c3t3(ForwardIterator begin, ForwardIterator end)
-  {
-    std::for_each(begin, end, Remove_from_complex(c3t3_));
-  }
-
-  /**
-   * Returns true if time_limit is reached
-   */
-  bool is_time_limit_reached() const
-  {
-    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
-  }
-
-  /**
-   * Returns true if all cells of mesh have a sliver_criteria_ value greater
-   * than sliver_bound_
-   */
-  bool check_sliver_bound() const
-  {
-    for( Cell_iterator cit = c3t3_.cells_in_complex_begin() ;
-        cit != c3t3_.cells_in_complex_end() ;
-        ++cit)
-    {
-      const double value =
-        sliver_criteria_(cit);
-
-      if( value < sliver_criteria_.sliver_bound() )
-        return false;
-    }
-
-    return true;
-  }
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // For parallel version
-  template <bool pump_vertices_on_surfaces>
-  void
-  enqueue_task(Cell_handle ch, unsigned int erase_counter, double value);
-#endif
-
-private:
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-
-  // Functor for enqueue_task function
-  template <typename SE, bool pump_vertices_on_surfaces>
-  class Pump_vertex
-  {
-    SE                    & m_sliver_exuder;
-    const C3T3            & m_c3t3;
-    Cell_handle             m_cell_handle;
-    unsigned int            m_erase_counter;
-
-
-  public:
-    // Constructor
-    Pump_vertex(SE &sliver_exuder,
-                const C3T3 &c3t3,
-                Cell_handle cell_handle,
-                unsigned int erase_counter)
-    : m_sliver_exuder(sliver_exuder),
-      m_c3t3(c3t3),
-      m_cell_handle(cell_handle),
-      m_erase_counter(erase_counter)
-    {
-    }
-
-    // Constructor
-    Pump_vertex(const Pump_vertex &pvx)
-    : m_sliver_exuder(pvx.m_sliver_exuder),
-      m_c3t3(pvx.m_c3t3),
-      m_cell_handle(pvx.m_cell_handle),
-      m_erase_counter(pvx.m_erase_counter)
-    {}
-
-    // operator()
-    void operator()() const
-    {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-      static Profile_branch_counter_3 bcounter(
-        "early withdrawals / late withdrawals / successes [Exuder]");
-#endif
-
-      for( int i = 0; i < 4; ++i )
-      {
-        bool could_lock_zone;
-        do
-        {
-          could_lock_zone = true;
-
-          if (m_sliver_exuder.erase_counter(m_cell_handle) != m_erase_counter)
-            break;
-
-          if (!m_c3t3.triangulation().try_lock_cell(m_cell_handle))
-          {
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-            bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-            could_lock_zone = false;
-            m_sliver_exuder.unlock_all_elements();
-            continue;
-          }
-
-          if (m_sliver_exuder.erase_counter(m_cell_handle) != m_erase_counter)
-          {
-            m_sliver_exuder.unlock_all_elements();
-            break;
-          }
-
-          // pump_vertices_on_surfaces is a boolean template parameter.  The
-          // following condition is pruned at compiled time, if
-          // pump_vertices_on_surfaces==false.
-          if (pump_vertices_on_surfaces
-           || m_c3t3.in_dimension(m_cell_handle->vertex(i)) > 2)
-          {
-            m_sliver_exuder.template pump_vertex<pump_vertices_on_surfaces>(
-              m_cell_handle->vertex(i), &could_lock_zone);
-
-#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
-            if (!could_lock_zone)
-              bcounter.increment_branch_1(); // THIS is a late withdrawal!
-            else
-              ++bcounter; // Success!
-#endif
-          }
-
-          m_sliver_exuder.unlock_all_elements();
-        } while (!could_lock_zone);
-      }
-
-      if ( m_sliver_exuder.is_time_limit_reached() )
-        tbb::task::self().cancel_group_execution();
-    }
-  };
-#endif
-
-  // -----------------------------------
-  // Private data
-  // -----------------------------------
-  C3T3& c3t3_;
-  Tr& tr_;
-  double sq_delta_;
-
-  int num_of_pumped_vertices_;
-  int num_of_ignored_vertices_;
-  int num_of_treated_vertices_;
-
-  bool initialized_;
-  SliverCriteria sliver_criteria_;
-
-  // Timer
-  double time_limit_;
-  CGAL::Timer running_time_;
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-  // -----------------------------------
-  // Debug Helpers
-  // -----------------------------------
-private:
-  /**
-   * Verifies that two doubles are near equal
-   */
-  static bool near_equal(const double& d1, const double& d2)
-  {
-    const double epsilon = 1e-8;
-    return ( ((d1-d2) >= -1*epsilon) && ((d1-d2) <= epsilon) );
-  }
-
-  /**
-   * Prints a double
-   */
-  static void print_double(const double& d)
-  {
-    std::cerr << d << " ; ";
-  }
-
-  /** This function verifies that the pre_star contains exactly the set of
-   facets given by the sequence [begin, end[.
-
-   If v!=0, it also fills another Pre_star object, from the sequence [begin,
-   end[, and checks that is in the same order as pre_star.
-   */
-  template <class Input_facet_it>
-  bool check_pre_star(const Pre_star& pre_star,
-                      Input_facet_it begin,
-                      Input_facet_it end,
-                      const Vertex_handle v = Vertex_handle()) const;
-
-  /** This function verifies that the pre_star contains exactly the set of
-   facets on the boundary of the conflict zone of the weighted point wp.
-   The vertex handle vh is an hint for the location of wp.
-
-   It also fills another Pre_star object, and checks that is in the same
-   order as pre_star.
-   */
-  bool check_pre_star(const Pre_star& pre_star,
-                      const Weighted_point& wp,
-                      const Vertex_handle& vh) const;
-
-  /**
-   * Checks if the sliver criterion values from \c criterion_values are the same as
-   * those that will be found if wp is inserted in the triangulation
-   */
-  bool check_ratios(const Sliver_values& criterion_values,
-                    const Weighted_point& wp,
-                    const Vertex_handle& vh) const;
-
-#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-
-}; // end class Slivers_exuder
-
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-Slivers_exuder<C3T3,SC,V_,FT>::
-Slivers_exuder(C3T3& c3t3, const SC& criteria, double d)
-  : Base(c3t3.bbox(),
-         Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
-  , c3t3_(c3t3)
-  , tr_(c3t3_.triangulation())
-  , sq_delta_(d*d)
-  , num_of_pumped_vertices_(0)
-  , num_of_ignored_vertices_(0)
-  , num_of_treated_vertices_(0)
-  , initialized_(false)
-  , sliver_criteria_(criteria)
-  , time_limit_(-1)
-  , running_time_()
-{
-  // If we're multi-thread
-  tr_.set_lock_data_structure(get_lock_data_structure());
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <bool pump_vertices_on_surfaces>
-Mesh_optimization_return_code
-Slivers_exuder<C3T3,SC,V_,FT>::
-pump_vertices(double sliver_criterion_limit,
-              Visitor& visitor)
-{
-#ifdef CGAL_MESH_3_PROFILING
-  WallClockTimer t;
-#endif
-
-  init(sliver_criterion_limit);
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << std::endl << "==== Init time: "
-            << t.elapsed() << "s ====" << std::endl;
-#endif
-
-#ifdef CGAL_MESH_3_EXUDER_VERBOSE
-  std::cerr << "Exuding...\n";
-  std::cerr << "Legend of the following line: "
-            << "(#cells left,#vertices pumped,#vertices ignored)" << std::endl;
-
-  std::cerr << "(" << this->cells_queue_size() << ",0,0)";
-#endif // CGAL_MESH_3_EXUDER_VERBOSE
-
-  running_time_.reset();
-  running_time_.start();
-
-#ifdef CGAL_MESH_3_PROFILING
-  t.reset();
-#endif
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-  // Parallel
-  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-  {
-    this->create_root_task();
-
-    while (!this->cells_queue_empty())
-    {
-      Queue_value_type front = *(this->cells_queue_front());
-      this->cells_queue_pop_front();
-      Cell_handle c = this->extract_cell_handle_from_queue_value(front);
-      double q = this->extract_cell_quality_from_queue_value(front);
-      unsigned int ec = this->extract_erase_counter_from_queue_value(front);
-      // Low quality first (i.e. low value of q)
-      enqueue_task<pump_vertices_on_surfaces>(c, ec, q);
-    }
-
-    this->wait_for_all();
-
-# if defined(CGAL_MESH_3_EXUDER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-    std::cerr << " Flushing";
-# endif
-    bool keep_flushing = true;
-    while (keep_flushing)
-    {
-      keep_flushing = this->flush_work_buffers();
-# if defined(CGAL_MESH_3_EXUDER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
-      std::cerr << ".";
-# endif
-    }
-
-    this->destroy_root_task();
-  }
-  // Sequential
-  else
-#endif // CGAL_LINKED_WITH_TBB
-  {
-    while( !this->cells_queue_empty() && !is_time_limit_reached() )
-    {
-      Queue_value_type front = *(this->cells_queue_front());
-      Cell_handle c = this->extract_cell_handle_from_queue_value(front);
-
-      // Low quality first (i.e. low value of cell quality)
-      bool vertex_pumped = false;
-      for( int i = 0; i < 4; ++i )
-      {
-        // pump_vertices_on_surfaces is a boolean template parameter.  The
-        // following condition is pruned at compiled time, if
-        // pump_vertices_on_surfaces==false.
-        if( pump_vertices_on_surfaces || c3t3_.in_dimension(c->vertex(i)) > 2 )
-        {
-          if( pump_vertex<pump_vertices_on_surfaces>(c->vertex(i)) )
-          {
-            vertex_pumped = true;
-            ++num_of_pumped_vertices_;
-            break;
-          }
-          else
-            ++num_of_ignored_vertices_;
-
-          ++num_of_treated_vertices_;
-        }
-      }
-
-      // if the tet could not be deleted
-      if ( ! vertex_pumped )
-        this->cells_queue_pop_front();
-
-      visitor.after_cell_pumped(this->cells_queue_size());
-  #ifdef CGAL_MESH_3_EXUDER_VERBOSE
-      std::cerr << boost::format("\r             \r"
-                                 "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
-        % this->cells_queue_size()
-        % num_of_pumped_vertices_
-        % num_of_ignored_vertices_
-        % (num_of_treated_vertices_ / running_time_.time());
-  #endif // CGAL_MESH_3_EXUDER_VERBOSE
-    }
-  }
-
-  running_time_.stop();
-
-#ifdef CGAL_MESH_3_PROFILING
-  std::cerr << std::endl << "==== Iterations time: "
-            << t.elapsed() << "s ====" << std::endl;
-#endif
-
-
-#ifdef CGAL_MESH_3_EXUDER_VERBOSE
-  std::cerr << std::endl;
-  std::cerr << "Total exuding time: " << running_time_.time() << "s";
-  std::cerr << std::endl;
-#endif // CGAL_MESH_3_EXUDER_VERBOSE
-
-  if ( is_time_limit_reached() ) {
-#ifdef CGAL_MESH_3_EXUDER_VERBOSE
-    std::cerr << "Exuding return code: TIME_LIMIT_REACHED\n\n";
-#endif // CGAL_MESH_3_EXUDER_VERBOSE
-    return TIME_LIMIT_REACHED;
-  }
-
-  if ( check_sliver_bound() ) {
-#ifdef CGAL_MESH_3_EXUDER_VERBOSE
-    std::cerr << "Exuding return code: BOUND_REACHED\n\n";
-#endif // CGAL_MESH_3_EXUDER_VERBOSE
-    return BOUND_REACHED;
-  }
-
-#ifdef CGAL_MESH_3_EXUDER_VERBOSE
-    std::cerr << "Exuding return code: CANT_IMPROVE_ANYMORE\n\n";
-#endif // CGAL_MESH_3_EXUDER_VERBOSE
-  return CANT_IMPROVE_ANYMORE;
-
-} // end function pump_vertices
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <bool pump_vertices_on_surfaces>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-pump_vertex(const Vertex_handle& pumped_vertex,
-            bool *could_lock_zone)
-{
-  // Get best_weight
-  double best_weight = get_best_weight(pumped_vertex, could_lock_zone);
-  if (could_lock_zone && *could_lock_zone == false)
-    return false;
-
-  // If best_weight < pumped_vertex weight, nothing to do
-  if ( best_weight > pumped_vertex->point().weight() )
-  {
-    Weighted_point wp(pumped_vertex->point(), best_weight);
-
-    // Insert weighted point into mesh
-    // note it can fail if the mesh is non-manifold at pumped_vertex
-    return update_mesh<pump_vertices_on_surfaces>(wp,
-                                                  pumped_vertex,
-                                                  could_lock_zone);
-  }
-
-  return false;
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-void
-Slivers_exuder<C3T3,SC,V_,FT>::
-initialize_prestar_and_criterion_values(const Vertex_handle& v,
-                                        Pre_star& pre_star,
-                                        Sliver_values& criterion_values,
-                                        bool *could_lock_zone) const
-{
-  std::vector<Cell_handle> incident_cells;
-  incident_cells.reserve(64);
-  // Parallel
-  if (could_lock_zone)
-  {
-    if (!tr_.try_lock_and_get_incident_cells(v, incident_cells))
-    {
-      this->unlock_all_elements();
-      *could_lock_zone = false;
-      return;
-    }
-  }
-  // Sequential
-  else
-  {
-    tr_.incident_cells(v, std::back_inserter(incident_cells));
-  }
-
-  for ( typename Cell_vector::const_iterator cit = incident_cells.begin() ;
-       cit != incident_cells.end() ;
-       ++cit )
-  {
-    const int index = (*cit)->index(v);
-    const Facet f = Facet(*cit, index);
-    const Facet opposite_facet = tr_.mirror_facet(f);
-
-    // Sliver criterion values initialization
-    if( c3t3_.is_in_complex(*cit) )
-    {
-      criterion_values[f] = sliver_criteria_(*cit);
-    }
-
-
-    // Pre_star initialization
-    // If facet is adjacent to and infinite cell, no need to put it in prestar
-    // (infinite critical radius)
-    if ( tr_.is_infinite(opposite_facet.first) )
-      continue;
-
-    // Insert facet in prestar (even if it is not in complex)
-    double critical_radius = compute_critical_radius(v, opposite_facet.first);
-    pre_star.insert(f, critical_radius);
-  }
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-expand_prestar(const Cell_handle& cell_to_add,
-               const Vertex_handle& pumped_vertex,
-               Pre_star& pre_star,
-               Sliver_values& criterion_values) const
-{
-  // Delete first facet of pre_star
-  Facet start_facet = pre_star.front()->second;
-  CGAL_assertion(tr_.mirror_facet(start_facet).first == cell_to_add);
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-  double critical_radius = pre_star.front()->first;
-#endif
-  pre_star.pop_front();
-  if ( c3t3_.is_in_complex(cell_to_add) )
-  {
-    criterion_values.erase(start_facet);
-  }
-
-  int start_mirror_facet_index = tr_.mirror_facet(start_facet).second;
-
-  // For each facet of cell_to_add
-  for(int i = 0; i<4 ; ++i)
-  {
-    // We have already treated start_facet
-    if ( i == start_mirror_facet_index )
-      continue;
-
-    const Facet current_facet(cell_to_add, i);
-    const Facet current_mirror_facet(tr_.mirror_facet(current_facet));
-
-    // If current_facet_mirror is in prestar, delete it
-    // (it may happen than pre_star contains two facets of the same cell)
-    if ( pre_star.erase(current_mirror_facet) )
-    {
-      // If it is a boundary facet, stop pre_star expansion
-      if ( c3t3_.is_in_complex(current_mirror_facet) )
-      {
-        return false;
-      }
-
-      // Update criterion_values
-      if ( c3t3_.is_in_complex(cell_to_add) )
-      {
-        criterion_values.erase(current_mirror_facet);
-      }
-    }
-    // If current_mirror_facet is not in prestar:
-    // expand prestar & update criterion_values
-    else
-    {
-      const Cell_handle& current_mirror_cell = current_mirror_facet.first;
-
-      CGAL_assertion(current_mirror_cell != start_facet.first);
-      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(0));
-      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(1));
-      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(2));
-      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(3));
-
-      // Update pre_star (we do not insert facets with infinite critical radius)
-      // We do insert facet of cells which are outside the complex (we just
-      // don't use their sliver criterion value to get best weight)
-      if ( ! tr_.is_infinite(current_mirror_cell) )
-      {
-        double new_critical_radius =
-          compute_critical_radius(pumped_vertex, current_mirror_cell);
-
-        pre_star.insert(current_facet, new_critical_radius);
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-        if ( new_critical_radius < critical_radius )
-          std::cerr << "new critical radius:" << new_critical_radius
-                    << " / current critical radius:" << critical_radius
-                    << std::endl;
-#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-      }
-
-      // Update ratio (ratio is needed for cells of complex only)
-      if ( c3t3_.is_in_complex(cell_to_add) )
-      {
-        Tetrahedron_3 tet(pumped_vertex->point(),
-                          cell_to_add->vertex((i+1)&3)->point(),
-                          cell_to_add->vertex((i+2)&3)->point(),
-                          cell_to_add->vertex((i+3)&3)->point());
-
-        double new_value = sliver_criteria_(tet);
-        criterion_values.insert(std::make_pair(current_facet,new_value));
-      }
-    }
-  }
-
-  return true;
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-double
-Slivers_exuder<C3T3,SC,V_,FT>::
-get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const
-{
-  // Get pre_star and criterion_values
-  Pre_star pre_star;
-  Sliver_values criterion_values;
-  initialize_prestar_and_criterion_values(
-    v, pre_star, criterion_values, could_lock_zone);
-
-  if (could_lock_zone && *could_lock_zone == false)
-    return 0.;
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-  Pre_star pre_star_copy;
-  Sliver_values ratios_copy;
-#endif
-
-  double worst_criterion_value = get_min_value(criterion_values);
-  double best_weight = 0;
-  // TODO: it seems that this computes the incident cells again
-  double sq_d_v = get_closest_vertice_squared_distance(v);
-
-  // If that boolean is set to false, it means that a facet in the complex
-  // is about to be flipped. In that case, the pumping is stopped.
-  bool can_flip = true;
-
-  // Main loop: find the weight which maximizes the minimum value of ratio
-  while(   can_flip
-        && ! pre_star.empty()
-        && pre_star.front()->first < (sq_delta_ * sq_d_v)
-        && ! c3t3_.is_in_complex(pre_star.front()->second) )
-  {
-    // Store critial radius (pre_star will be modified in expand_prestar)
-    double critical_r = pre_star.front()->first;
-
-    // expand prestar (insert opposite_cell facets in pre_star)
-    Facet link = pre_star.front()->second;
-    const Cell_handle& opposite_cell = tr_.mirror_facet(link).first;
-
-    if (could_lock_zone && !tr_.try_lock_cell(opposite_cell))
-    {
-      *could_lock_zone = false;
-      return 0.;
-    }
-    can_flip = expand_prestar(opposite_cell, v, pre_star, criterion_values);
-
-    // Update best_weight if needed
-    if(can_flip)
-    {
-      double min_of_pre_star = get_min_value(criterion_values);
-
-      if( min_of_pre_star > worst_criterion_value )
-      {
-        // Update worst_criterion_value
-        worst_criterion_value = min_of_pre_star;
-
-        // Update best_weight
-        CGAL_assertion(!pre_star.empty());
-        double next_r = pre_star.front()->first;
-        best_weight = (critical_r + next_r) / 2;
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-        pre_star_copy = pre_star;
-        ratios_copy = criterion_values;
-#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-      }
-    }
-  } // end while(... can pump...)
-
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-  if ( best_weight > v->point().weight() )
-  {
-    Weighted_point wp(v->point(), best_weight);
-    check_pre_star(pre_star_copy, wp, v);
-    check_ratios(ratios_copy, wp, v);
-  }
-#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-
-  return best_weight;
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-boost::optional<typename Slivers_exuder<C3T3,SC,V_,FT>::Umbrella >
-Slivers_exuder<C3T3,SC,V_,FT>::
-get_umbrella(const Facet_vector& facets,//internal_facets of conflict zone
-
-             const Vertex_handle& /* v no longer used */) const
-{
-  Umbrella umbrella; //std::map<Ordered_edge, Patch_and_counter>
-
-  // Insert into umbrella surface_index of facets which are on the surface
-  typename Facet_vector::const_iterator fit = facets.begin();
-  for ( ; fit != facets.end() ; ++fit )
-  {
-    if ( c3t3_.is_in_complex(*fit) )
-    {
-      Facet f = *fit;
-      Vertex_handle v1 = f.first->vertex((f.second+1)%4);
-      Vertex_handle v2 = f.first->vertex((f.second+2)%4);
-      Vertex_handle v3 = f.first->vertex((f.second+3)%4);
-      order_three_handles(v1, v2, v3);
-      std::vector<Ordered_edge> edges;
-      edges.push_back(Ordered_edge(v1, v2));
-      edges.push_back(Ordered_edge(v2, v3));
-      edges.push_back(Ordered_edge(v1, v3));
-
-      for(std::size_t i = 0; i < 3; ++i)
-      {
-        Ordered_edge oe = edges[i];
-        typename Umbrella::iterator uit = umbrella.find(oe);
-        if(uit == umbrella.end()) //umbrella does not contain oe yet
-        {
-          umbrella.insert(std::make_pair(oe,
-            std::make_pair(c3t3_.surface_patch_index(f), 1)));
-        }
-        else //umbrella already contains oe. Increment counter or return
-        {
-          std::size_t count = (*uit).second.second;
-          if(count == 2) //there will be more than 3 after insertion
-            return boost::none; //non-manifold configuration
-
-          umbrella.insert(uit,
-            std::make_pair(oe,
-              std::make_pair(c3t3_.surface_patch_index(f), count + 1)));
-        }
-      }
-    }
-  }
-
-  // erase edges that have been counted twice
-  //each Oriented_edge should appear only once
-  // twice means it belongs to two internal facets that are restricted
-  // three or more corresponds to a non-manifold geometry
-  typename Umbrella::iterator uit = umbrella.begin();
-  while(uit != umbrella.end())
-  {
-    if((*uit).second.second == 2)
-    {
-      typename Umbrella::iterator to_be_erased = uit++;
-      umbrella.erase(to_be_erased);
-    }
-    else
-      ++uit;
-  }
-
-  return umbrella;
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <bool pump_vertices_on_surfaces>
-void
-Slivers_exuder<C3T3,SC,V_,FT>::
-restore_cells_and_boundary_facets(
-  const Boundary_facets_from_outside& boundary_facets_from_outside,
-  const Vertex_handle& new_vertex)
-{
-  Cell_vector new_cells;
-  new_cells.reserve(64);
-  tr_.incident_cells(new_vertex, std::back_inserter(new_cells));
-
-  // Each cell must have a facet on the boundary of the conflict zone
-  CGAL_assertion(boundary_facets_from_outside.size() == new_cells.size());
-
-  // Restore attributes of each cell
-  for(typename Cell_vector::iterator cit = new_cells.begin();
-      cit != new_cells.end();
-      ++cit)
-  {
-    (*cit)->invalidate_circumcenter();
-    const int index = (*cit)->index(new_vertex);
-    const Facet new_facet = std::make_pair(*cit, index);
-    const Facet new_facet_from_outside = tr_.mirror_facet(new_facet);
-
-    // Search new_facet_from_outside in boundary_facets_from_outside.
-    // That search cannot fail.
-    typename Boundary_facets_from_outside::const_iterator it =
-      boundary_facets_from_outside.find(new_facet_from_outside);
-
-    CGAL_assertion(it != boundary_facets_from_outside.end());
-
-    // Restore facet attributes
-    if ( it->second.first != Surface_patch_index() )
-      c3t3_.add_to_complex(new_facet, it->second.first);
-
-    // Restore cell attributes
-    if ( it->second.second != Subdomain_index() )
-      c3t3_.add_to_complex(*cit, it->second.second);
-
-    // if the new cell is in the domain, and it criterion value is less that
-    // the maximum, push it in the cells queue.
-    if( c3t3_.is_in_complex(*cit) )
-    {
-      double criterion_value
-        = sliver_criteria_(*cit);
-
-      if( criterion_value < sliver_criteria_.sliver_bound() )
-        add_cell_to_queue<pump_vertices_on_surfaces>(*cit, criterion_value);
-    }
-  }
-}
-
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-typename Slivers_exuder<C3T3,SC,V_,FT>::Ordered_edge
-Slivers_exuder<C3T3,SC,V_,FT>::get_opposite_ordered_edge(
-  const Facet& facet,
-  const Vertex_handle& vertex) const
-{
-  CGAL_assertion(tr_.has_vertex(facet, vertex));
-
-  Vertex_handle v1;
-  Vertex_handle v2;
-
-  // Get the two vertex of *fit which are not new_vertex
-  for ( int i = 0 ; i < 4 ; ++i )
-  {
-    const Vertex_handle current_vertex = facet.first->vertex(i);
-
-    if ( current_vertex != vertex && tr_.has_vertex(facet, current_vertex) )
-    {
-      if ( v1 == Vertex_handle() )
-        v1 = current_vertex;
-      else
-        v2 = current_vertex;
-    }
-  }
-
-  CGAL_assertion(v1 != Vertex_handle() && v2 != Vertex_handle());
-
-  order_two_handles(v1,v2);
-  return Ordered_edge(v1,v2);
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-void
-Slivers_exuder<C3T3,SC,V_,FT>::
-restore_internal_facets(const Umbrella& umbrella,
-                        const Vertex_handle& new_vertex)
-{
-  Facet_vector new_internal_facets;
-  new_internal_facets.reserve(64);
-  tr_.incident_facets(new_vertex, std::back_inserter(new_internal_facets));
-
-  // Restore attributes of each facet
-  for(typename Facet_vector::iterator fit = new_internal_facets.begin();
-      fit != new_internal_facets.end();
-      ++fit)
-  {
-    Ordered_edge edge = get_opposite_ordered_edge(*fit, new_vertex);
-
-    // Search edge in umbrella.
-    // If it is found, restore facet surface index from umbrella
-    const typename Umbrella::const_iterator um_it = umbrella.find(edge);
-    if( um_it != umbrella.end() )
-    {
-      c3t3_.add_to_complex(*fit, um_it->second.first);
-    }
-  }
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <bool pump_vertices_on_surfaces>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-update_mesh(const Weighted_point& new_point,
-            const Vertex_handle& old_vertex,
-            bool *could_lock_zone)
-{
-  CGAL_assertion_code(std::size_t nb_vert =
-                      tr_.number_of_vertices());
-  Cell_vector deleted_cells;
-  Facet_vector internal_facets;
-  Facet_vector boundary_facets;
-
-  deleted_cells.reserve(64);
-  internal_facets.reserve(64);
-  boundary_facets.reserve(64);
-
-  tr_.find_conflicts(new_point,
-                     old_vertex->cell(),
-                     std::back_inserter(boundary_facets),
-                     std::back_inserter(deleted_cells),
-                     std::back_inserter(internal_facets),
-                     could_lock_zone);
-
-  if (could_lock_zone && *could_lock_zone == false)
-    return false;
-
-  // Get some datas to restore mesh
-  Boundary_facets_from_outside boundary_facets_from_outside =
-    get_boundary_facets_from_outside(boundary_facets);
-
-  boost::optional<Umbrella> umbrella
-    = get_umbrella(internal_facets, old_vertex);
-  if(umbrella == boost::none)
-    return false; //abort pumping this vertex
-
-  // Delete old cells from queue (they aren't in the triangulation anymore)
-  this->delete_cells_from_queue(deleted_cells);
-
-  // Delete old cells & facets from c3t3
-  remove_from_c3t3(deleted_cells.begin(),deleted_cells.end());
-  remove_from_c3t3(boundary_facets.begin(),boundary_facets.end());
-  remove_from_c3t3(internal_facets.begin(),internal_facets.end());
-
-  // Insert new point (v will be updated using a wp)
-  int dimension = c3t3_.in_dimension(old_vertex);
-  Index vertice_index = c3t3_.index(old_vertex);
-
-  Vertex_handle new_vertex = tr_.insert(new_point, old_vertex->cell());
-  c3t3_.set_dimension(new_vertex,dimension);
-  c3t3_.set_index(new_vertex,vertice_index);
-
-  // Only true for sequential version
-  CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices());
-
-  // Restore mesh
-  restore_cells_and_boundary_facets<pump_vertices_on_surfaces>(
-    boundary_facets_from_outside, new_vertex);
-  restore_internal_facets(*umbrella, new_vertex);
-
-  // Only true for sequential version
-  CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices());
-
-  return true;//pump was done successfully
-}
-
-
-#ifdef CGAL_LINKED_WITH_TBB
-// For parallel version
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <bool pump_vertices_on_surfaces>
-void
-Slivers_exuder<C3T3,SC,V_,FT>::
-enqueue_task(Cell_handle ch, unsigned int erase_counter, double value)
-{
-  this->enqueue_work(
-    Pump_vertex<Self, pump_vertices_on_surfaces>(
-      *this, c3t3_, ch, erase_counter),
-    value);
-}
-#endif
-
-
-#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-template <typename C3T3, typename SC, typename V_, typename FT>
-template <class Input_facet_it>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-check_pre_star(const Pre_star& pre_star,
-               Input_facet_it begin,
-               Input_facet_it end,
-               const Vertex_handle v) const
-{
-  Pre_star pre_star_copy = pre_star;
-  if(v != Vertex_handle())
-  {
-    Pre_star pre_star2;
-
-    // fill pre_star2
-    for(Input_facet_it fit = begin;
-        fit != end;
-        ++fit)
-    {
-      const Facet opposite_facet = tr_.mirror_facet(*fit);
-      if(! tr_.is_infinite(opposite_facet.first) )
-      {
-        pre_star2.insert(*fit, compute_critical_radius(v,
-                                                       opposite_facet.first));
-      }
-    }
-
-    while(!pre_star_copy.empty() && !pre_star2.empty())
-    {
-      if(pre_star_copy.front()->first != pre_star2.front()->first) {
-        std::cerr << "bad order\n";
-        std::cerr << boost::format("pre_star.front()->first=%1%, should be %2%\n")
-        % pre_star_copy.front()->first % pre_star2.front()->first;
-        return false;
-      }
-      if ( pre_star_copy.front()->second != pre_star2.front()->second )
-      {
-        Facet f1 = pre_star_copy.front()->second;
-        Facet f2 = pre_star2.front()->second;
-        pre_star2.pop_front();
-        pre_star_copy.pop_front();
-        if ( pre_star_copy.front()->second == f2 && pre_star2.front()->second == f1 )
-        {
-          // It's ok
-          pre_star2.pop_front();
-          pre_star_copy.pop_front();
-        }
-        else
-        {
-          Facet f1 = tr_.mirror_facet(pre_star_copy.front()->second);
-          Facet f2 = tr_.mirror_facet(pre_star2.front()->second);
-          std::cerr << "Bad facet:" << f1.second << "/" << f2.second
-          << " - " << &*f1.first << "/" << &*f2.first << std::endl;
-        }
-      }
-      else
-      {
-        pre_star2.pop_front();
-        pre_star_copy.pop_front();
-      }
-    }
-
-    if(pre_star2.empty() && ! pre_star_copy.empty()) {
-      std::cerr << "pre_star is too big!\n";
-      while(!pre_star_copy.empty())
-      {
-        const Facet f = pre_star_copy.front()->second;
-        const double r = pre_star_copy.front()->first;
-        pre_star_copy.pop_front();
-        std::cerr << boost::format("extra facet (%1%,%2%) (infinite: %3%, opposite infinite: %4%), critical radius: %5%\n")
-        % &*f.first % f.second % tr_.is_infinite(f.first) % tr_.is_infinite(f.first->neighbor(f.second))
-        % r;
-      }
-      return false;
-    }
-
-    if( pre_star_copy.empty() && ! pre_star2.empty() ) {
-      std::cerr << "pre_star is too small!\n";
-      while(!pre_star2.empty())
-      {
-        const Facet f = pre_star2.front()->second;
-        pre_star2.pop_front();
-        std::cerr << boost::format("missing facet (%1%,%2%) (infinite: %3%, opposite infinite: %4%)\n")
-        % &*f.first % f.second % tr_.is_infinite(f.first) % tr_.is_infinite(f.first->neighbor(f.second));
-      }
-      return false;
-    }
-  }
-
-  pre_star_copy = pre_star;
-
-  for(Input_facet_it fit = begin;
-      fit != end;
-      ++fit)
-  {
-    const Facet opposite_facet = tr_.mirror_facet(*fit);
-    if(!tr_.is_infinite(opposite_facet.first) && !pre_star_copy.erase(*fit))
-      return false;
-  }
-  if( !pre_star_copy.empty() )
-    return false;
-
-  return true;
-}
-
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-check_pre_star(const Pre_star& pre_star,
-               const Weighted_point& wp,
-               const Vertex_handle& vh) const
-{
-  std::vector<Facet> boundary_facets;
-  boundary_facets.reserve(64);
-
-  tr_.find_conflicts(wp,
-                     vh->cell(),
-                     std::back_inserter(boundary_facets),
-                     CGAL::Emptyset_iterator(),
-                     CGAL::Emptyset_iterator());
-
-  const bool result =  check_pre_star(pre_star,
-                                      boundary_facets.begin(),
-                                      boundary_facets.end(),
-                                      vh);
-  if( ! result )
-    std::cerr << "boundary_facets.size()=" << boundary_facets.size()
-    << "\npre_star.size()=" << pre_star.size()
-    << "\ntested wp=" << wp
-    << "\n";
-  return result;
-}
-
-
-template <typename C3T3, typename SC, typename V_, typename FT>
-bool
-Slivers_exuder<C3T3,SC,V_,FT>::
-check_ratios(const Sliver_values& criterion_values,
-                  const Weighted_point& wp,
-                  const Vertex_handle& vh) const
-{
-  Cell_vector deleted_cells;
-  Facet_vector internal_facets;
-  Facet_vector boundary_facets;
-
-  tr_.find_conflicts(wp,
-                     vh->cell(),
-                     std::back_inserter(boundary_facets),
-                     std::back_inserter(deleted_cells),
-                     std::back_inserter(internal_facets));
-
-  bool result = true;
-  std::vector<double> expected_ratios;
-  std::vector<double> ratio_vector;
-
-  for ( typename Sliver_values::const_iterator rit = criterion_values.begin() ;
-       rit != criterion_values.end() ;
-       ++rit )
-  {
-    ratio_vector.push_back(rit->second);
-  }
-
-  for ( typename Facet_vector::const_iterator it = boundary_facets.begin() ;
-       it != boundary_facets.end() ;
-       ++ it )
-  {
-    if ( !c3t3_.is_in_complex((it->first)) )
-      continue;
-
-    int k = it->second;
-    Tetrahedron_3 tet(vh->point(),
-                      it->first->vertex((k+1)&3)->point(),
-                      it->first->vertex((k+2)&3)->point(),
-                      it->first->vertex((k+3)&3)->point());
-
-    double ratio = sliver_criteria_(tet);
-    expected_ratios.push_back(ratio);
-
-    bool found = false;
-    for ( typename Sliver_values::const_iterator rit = criterion_values.begin() ;
-         rit != criterion_values.end() ;
-         ++rit )
-    {
-      if ( near_equal(rit->second,ratio) )
-      {
-        found = true;
-        break;
-      }
-    }
-    if ( ! found )
-    {
-      result = false;
-    }
-  }
-
-  if (expected_ratios.size() != criterion_values.size())
-    result = false;
-
-  if ( !result )
-  {
-    std::sort(expected_ratios.begin(),expected_ratios.end());
-    std::sort(ratio_vector.begin(),ratio_vector.end());
-    std::vector<double> diff;
-    std::set_difference(expected_ratios.begin(),expected_ratios.end(),
-                        ratio_vector.begin(),ratio_vector.end(),
-                        std::back_inserter(diff));
-
-
-    std::cerr << "\nExpected criterion_values:[";
-    std::for_each(expected_ratios.begin(), expected_ratios.end(), print_double);
-    std::cerr << "]\nRatios:[";
-    std::for_each(ratio_vector.begin(), ratio_vector.end(), print_double);
-    std::cerr << "]\nDiff:[";
-    std::for_each(diff.begin(),diff.end(), print_double);
-    std::cerr << "]\n";
-  }
-
-  return result;
-}
-#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
-
-
-} // end namespace Mesh_3
-
-} // end namespace CGAL
-
-
-#endif // end CGAL_MESH_3_SLIVERS_EXUDER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/config.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/config.h
deleted file mode 100644
index 870d0d9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/config.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2011 GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Mesh_3/config.h $
-// $Id: config.h 70893 2012-07-31 10:43:20Z jtournoi $
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_MESH_3_CONFIG_H
-#define CGAL_MESH_3_CONFIG_H 1
-
-#include <CGAL/config.h>
-
-//#define CGAL_MESH_3_VERBOSE 1
-
-// Use optimisations of Mesh_3
-#  define CGAL_INTRUSIVE_LIST 1
-#  define CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR 1
-#  define CGAL_MESH_3_NEW_GET_FACETS 1
-#  define CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST 1
-#  define CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE 1
-#  define FORCE_STRUCTURAL_FILTERING 1
-#  define CGAL_NEW_INCIDENT_SLIVERS 1
-
-//experimental
-#  define CGAL_FASTER_BUILD_QUEUE 1
-//#  define CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-//#  define CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE // slower / not recommended
-
-//should not be used
-//#define CGAL_MESH_3_OLD_MINIMUM_DIHEDRAL_ANGLE 1
-
-//experimental
-#define CGAL_MESH_3_NO_PROTECTION_NON_LINEAR 1
-#define CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS 1
-
-
-// CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-// implies CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-#ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-#  ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-#    ifndef CGAL_MESH_3_DEACTIVATE_NO_LONGER_CALLS_DO_INTERSECT_3
-#      define CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 1
-#    endif
-#  endif
-#endif // CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-
-// CGAL_MESH_3_VERBOSE implies CGAL_MESH_3_OPTIMIZER_VERBOSE
-#ifdef CGAL_MESH_3_VERBOSE
-#  ifndef CGAL_MESH_3_OPTIMIZER_VERBOSE
-#    define CGAL_MESH_3_OPTIMIZER_VERBOSE 1
-#  endif
-#endif
-
-#if defined(__clang__) || (BOOST_GCC >= 40600)
-#  define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES \
-    _Pragma("GCC diagnostic ignored \"-Wunused-variable\"")
-#else
-#  define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES
-#endif
-#if __has_warning("-Wunneeded-internal-declaration")
-#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION \
-     _Pragma("clang diagnostic ignored \"-Wunneeded-internal-declaration\"")
-#else
-#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION
-#endif
-
-#define CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS \
-  CGAL_MESH_3_IGNORE_UNUSED_VARIABLES                    \
-  CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION
-
-#endif // CGAL_MESH_3_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/global_parameters.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/global_parameters.h
deleted file mode 100644
index 80a4738..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/global_parameters.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_MESH_3_GLOBAL_PARAMETERS_H
-#define CGAL_MESH_3_GLOBAL_PARAMETERS_H
-
-#include <CGAL/config.h>
-#include <CGAL/Mesh_3/config.h>
-
-#define BOOST_PARAMETER_MAX_ARITY 12
-#include <boost/parameter.hpp>
-
-
-namespace CGAL {
-
-namespace parameters {
-
-template <typename T>
-struct Base
-{
-  Base(T t) : t_(t) {}
-  T operator()() const { return t_; }
-private:
-  T t_;
-};
-  
-#define CGAL_MESH_BOOLEAN_PARAMETER(Class, function_true, function_false)     \
-  struct Class : public Base<bool> { Class(bool b) : Base<bool>(b){} };       \
-  inline Class function_true() { return Class(true); }                        \
-  inline Class function_false() { return Class(false); }
-
-#define CGAL_MESH_DOUBLE_PARAMETER(Class, function, precondition)             \
-  struct Class : public Base<double>                                          \
-  { Class(double d) : Base<double>(d) { precondition(d); } };                 \
-  inline Class function(double d) { return Class(d); }
-
-// see <CGAL/config.h>
-CGAL_PRAGMA_DIAG_PUSH
-// see <CGAL/Mesh_3/config.h>
-CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
-
-BOOST_PARAMETER_NAME( c3t3 )
-BOOST_PARAMETER_NAME( domain )
-BOOST_PARAMETER_NAME( criteria )
-  
-BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ )
-BOOST_PARAMETER_NAME( (sliver_bound, tag) sliver_bound_)
-BOOST_PARAMETER_NAME( (sliver_criterion, tag) sliver_criterion_)
-BOOST_PARAMETER_NAME( (perturbation_vector, tag) perturbation_vector_) 
-BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_)
-BOOST_PARAMETER_NAME( (do_freeze, tag) do_freeze_)
-BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ )
-BOOST_PARAMETER_NAME( (convergence, tag) convergence_)
-
-BOOST_PARAMETER_NAME( (dump_after_init_prefix, tag ) dump_after_init_prefix_)
-BOOST_PARAMETER_NAME( (dump_after_refine_surface_prefix, tag ) dump_after_refine_surface_prefix_)
-BOOST_PARAMETER_NAME( (dump_after_refine_prefix, tag ) dump_after_refine_prefix_)
-BOOST_PARAMETER_NAME( (dump_after_glob_opt_prefix, tag ) dump_after_glob_opt_prefix_)
-BOOST_PARAMETER_NAME( (dump_after_perturb_prefix, tag ) dump_after_perturb_prefix_)
-BOOST_PARAMETER_NAME( (dump_after_exude_prefix, tag ) dump_after_exude_prefix_)
-
-CGAL_PRAGMA_DIAG_POP
-} // end namespace parameters
-
-
-
-
-
-} //namespace CGAL
-
-#endif // CGAL_MESH_3_GLOBAL_PARAMETERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_domain_with_polyline_features_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_domain_with_polyline_features_3.h
deleted file mode 100644
index ff796c1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_domain_with_polyline_features_3.h
+++ /dev/null
@@ -1,1086 +0,0 @@
-// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb, Laurent Rineau
-//
-//******************************************************************************
-// File Description :
-//
-//******************************************************************************
-
-#ifndef CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
-#define CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
-
-#include <CGAL/iterator.h>
-#include <CGAL/enum.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/is_streamable.h>
-
-#include <vector>
-#include <set>
-#include <map>
-#include <boost/next_prior.hpp> // for boost::prior and boost::next
-#include <boost/variant.hpp>
-#include <boost/foreach.hpp>
-
-namespace CGAL {
-
-
-namespace internal {
-namespace Mesh_3 {
-
-template <typename Kernel>
-class Polyline
-{
-  typedef typename Kernel::Point_3  Point_3;
-  typedef typename Kernel::Segment_3 Segment_3;
-  typedef typename Kernel::FT       FT;
-
-  typedef std::vector<Point_3>      Data;
-
-public:
-  typedef typename Data::const_iterator const_iterator;
-
-  Polyline() {}
-  ~Polyline() {}
-
-  /// Add a point at the end of the polyline
-  void add_point(const Point_3& p)
-  {
-    if( points_.empty() || p != end_point() ) {
-      points_.push_back(p);
-    }
-  }
-
-  /// Returns the starting point of the polyline
-  const Point_3& start_point() const
-  {
-    CGAL_assertion( ! points_.empty() );
-    return points_.front();
-  }
-
-  /// Returns the ending point of the polyline
-  const Point_3& end_point() const
-  {
-    CGAL_assertion( ! points_.empty() );
-    return points_.back();
-  }
-
-  /// Returns true if the polyline is not degenerated
-  bool is_valid() const
-  {
-    return points_.size() > 1;
-  }
-
-  /// Returns true if polyline is a cycle
-  bool is_cycle() const
-  {
-    return start_point() == end_point();
-  }
-
-  /// Returns the length of the polyline
-  FT length() const
-  {
-    //TODO: cache result
-    FT result (0);
-    const_iterator it = points_.begin();
-    const_iterator previous = it++;
-
-    for ( const_iterator end = points_.end() ; it != end ; ++it, ++previous )
-    {
-      result += distance(*previous,*it);
-    }
-
-    return result;
-  }
-
-  /// Returns signed geodesic distance between \c p and \c q
-  FT geodesic_distance(const Point_3& p, const Point_3& q,
-                       bool /*treat_cycle*/=true) const
-  {
-    CGAL_precondition(is_valid());
-
-    // Locate p & q on polyline
-    const_iterator pit = locate(p);
-    const_iterator qit = locate(q,false);
-
-    // Compute geodesic distance
-    FT result = (pit <= qit) ? geodesic_distance(p,q,pit,qit)
-                             : -geodesic_distance(q,p,qit,pit);
-
-    // Treat cycles: return a positive value
-    if ( is_cycle() && (p==q || result < FT(0)) )
-    {
-      result = length() + result;
-    }
-
-    return result;
-  }
-
-
-  /// Returns a point at geodesic distance \c distance from p along the
-  /// polyline. The polyline is oriented from starting point to end point.
-  /// The distance could be negative.
-  Point_3 point_at(const Point_3& p, FT distance) const
-  {
-    // use first point of the polyline instead of p
-    distance += geodesic_distance(start_point(),p,false);
-
-    // If polyline is a cycle, ensure that distance is given from start_point()
-    if ( is_cycle() )
-    {
-      if ( distance < FT(0) ) { distance += length(); }
-      else if ( distance > length() ) { distance -= length(); }
-    }
-
-    CGAL_assertion( distance >= FT(0) );
-    CGAL_assertion( distance <= length() );
-
-    // Initialize iterators
-    const_iterator pit = points_.begin();
-    const_iterator previous = pit++;
-
-    // Iterate to find which segment contains the point we want to construct
-    FT segment_length = this->distance(*previous,*pit);
-    while ( distance > segment_length )
-    {
-      distance -= segment_length;
-
-      // Increment iterators and update length
-      ++previous;
-      ++pit;
-      CGAL_assertion(pit != points_.end());
-
-      segment_length = this->distance(*previous,*pit);
-    }
-
-    // return point at distance from current segment source
-    typedef typename Kernel::Vector_3 Vector_3;
-    Vector_3 v (*previous, *pit);
-
-    return (*previous) + (distance / CGAL::sqrt(v.squared_length())) * v;
-  }
-
-  bool are_ordered_along(const Point_3& p, const Point_3& q) const
-  {
-    CGAL_precondition(!is_cycle());
-
-    // Locate p & q on polyline
-    const_iterator pit = locate(p);
-    const_iterator qit = locate(q,true);
-
-    // Points are not located on the same segment
-    if ( pit != qit ) { return (pit <= qit); }
-
-    // pit == qit, then we have to sort p&q along (pit,pit+1)
-    return ( compare_distance(*pit,p,q) != CGAL::LARGER );
-  }
-
-private:
-  const_iterator first_segment_source() const
-  {
-    CGAL_precondition(is_valid());
-    return points_.begin();
-  }
-
-  const_iterator last_segment_source() const
-  {
-    CGAL_precondition(is_valid());
-    return (points_.end() - 2);
-  }
-
-  FT geodesic_distance(const Point_3& p, const Point_3& q,
-                       const_iterator pit, const_iterator qit) const
-  {
-    CGAL_precondition(std::distance(pit,qit) >= 0);
-
-    // If p and q are in the same segment of the polyline
-    if ( pit == qit )
-    {
-      FT result = distance(p,q);
-
-      // Find the closest point to *pit
-      if ( compare_distance(*pit,p,q) != CGAL::LARGER )
-      { return result; }
-      else
-      { return -result; }
-    }
-
-    // p is inside [pit,pit+1], pit+1 != qit, q is inside [qit,qit+1]
-    FT result = distance(p,*(pit+1));
-    result += distance(*qit,q);
-
-    // Add segments between pit+1 and qit to result
-    for ( const_iterator it = (pit+1) ; it != qit ; ++it )
-    {
-      result += distance(*it,*(it+1));
-    }
-
-    return result;
-  }
-
-  /// Returns an iterator on the starting point of the segment of the
-  /// polyline which contains p
-  /// if end_point_first is true, then --end is returned instead of begin
-  /// if p is the starting point of a cycle.
-  const_iterator locate(const Point_3& p, bool end_point_first=false) const
-  {
-    CGAL_precondition(is_valid());
-
-    // First look if p is one of the points of the polyline
-    const_iterator result = std::find(points_.begin(), points_.end(), p);
-    if ( result != points_.end() )
-    {
-      if ( result != points_.begin() )
-      { return --result; }
-      else
-      {
-        // Treat cycles
-        if ( end_point_first && p == end_point() )
-        { return last_segment_source(); }
-        else
-        { return result; }
-      }
-    }
-
-    CGAL_assertion(result == points_.end());
-
-    // Get result by projecting p on the polyline
-    const_iterator it = points_.begin();
-    const_iterator previous = it;
-    Segment_3 nearest_segment;
-    const_iterator nearest_vertex = it;
-    result = nearest_vertex;
-    bool nearest_is_a_segment = false;
-
-    while ( ++it != points_.end() )
-    {
-      Segment_3 seg (*previous, *it);
-
-      if(nearest_is_a_segment)
-      {
-        if(compare_distance(p, seg, nearest_segment) == CGAL::SMALLER)
-        {
-          nearest_segment = seg;
-          result = previous;
-        }
-        if(compare_distance(p, *it, nearest_segment) == CGAL::SMALLER)
-        {
-          nearest_vertex = it;
-          nearest_is_a_segment = false;
-          result = it;
-        }
-      }
-      else {
-        if(compare_distance(p, *it, *nearest_vertex) == CGAL::SMALLER)
-        {
-          nearest_vertex = it;
-          result = it;
-        }
-        if(compare_distance(p, seg, *nearest_vertex) == CGAL::SMALLER)
-        {
-          nearest_segment = seg;
-          nearest_is_a_segment = true;
-          result = previous;
-        }
-      }
-      previous = it;
-    } // end the while loop on the vertices of the polyline
-
-
-    if(result == points_.begin()) {
-      return (end_point_first && !nearest_is_a_segment) ? last_segment_source() : points_.begin();
-    } else {
-      return result;
-    }
-  }
-
-  // FT squared_distance(const Point_3& p, const Point_3& q) const
-  // {
-  //   typename Kernel::Compute_squared_distance_3 sq_distance =
-  //     Kernel().compute_squared_distance_3_object();
-  //   return sq_distance(p,q);
-  // }
-
-  FT distance(const Point_3& p, const Point_3& q) const
-  {
-    return CGAL::sqrt(squared_distance(p, q));
-  }
-
-  Angle angle(const Point_3& p,
-              const Point_3& angle_vertex_point,
-              const Point_3& q) const
-  {
-    typename Kernel::Angle_3 compute_angle =  Kernel().angle_3_object();
-    return compute_angle(p,angle_vertex_point,q);
-  }
-
-  template <typename T1, typename T2>
-  CGAL::Sign compare_distance(const Point_3& p,
-                              const T1& obj1,
-                              const T2& obj2) const
-  {
-    typename Kernel::Compare_distance_3 compare_distance =
-      Kernel().compare_distance_3_object();
-    return compare_distance(p,obj1,obj2);
-  }
-
-public:
-  Data points_;
-}; // end class Polyline
-
-
-template <typename Gt, typename MapIterator>
-struct Mesh_domain_segment_of_curve_primitive{
-  typedef typename std::iterator_traits<MapIterator>::value_type Map_value_type;
-  typedef typename Map_value_type::first_type Curve_id;
-  typedef typename Map_value_type::second_type Polyline;
-
-  typedef std::pair<MapIterator,
-                    typename Polyline::const_iterator> Id;
-
-  typedef typename std::iterator_traits<
-    typename Polyline::const_iterator>::value_type Point;
-
-  typedef typename Gt::Segment_3 Datum;
-
-  Id id_;
-
-  Mesh_domain_segment_of_curve_primitive(Id id) : id_(id) {}
-
-  const Id& id() const { return id_; }
-
-  const Point& reference_point() const {
-    return *(id_.second);
-  }
-
-  Datum datum() const {
-    return Datum(*id_.second, *(id_.second+1));
-  }
-}; // end Mesh_domain_segment_of_curve_primitive
-
-template <typename MDwPF, bool patch_id_is_streamable>
-struct Display_incidences_to_patches_aux {
-  template <typename Container>
-  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
-                  const Container&) const;
-};
-
-template <typename MDwPF> //specialization when patch_id_is_streamable == false
-struct Display_incidences_to_patches_aux<MDwPF, false> {
-  template <typename Container>
-  void operator()(std::ostream& os,
-                  typename MDwPF::Curve_segment_index id,
-                  const Container&) const;
-};
-
-template <typename MDwPF, bool curve_id_is_streamable>
-struct Display_incidences_to_curves_aux {
-  template <typename Container>
-  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
-                  const Container&) const;
-};
-
-template <typename MDwPF> //specialization when curve_id_is_streamable == false
-struct Display_incidences_to_curves_aux<MDwPF, false> {
-  template <typename Container>
-  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
-                  const Container&) const;
-};
-
-} // end of namespace CGAL::internal::Mesh_3
-} // end of namespace CGAL::internal
-
-
-
-
-
-/**
- * @class Mesh_domain_with_polyline_features_3
- *
- *
- */
-template < typename MeshDomain >
-class Mesh_domain_with_polyline_features_3
-  : public MeshDomain
-{
-  typedef MeshDomain Base;
-
-public:
-  // Index types
-  typedef typename Base::Index    Index;
-
-  typedef typename Base::Surface_patch_index
-                                  Surface_patch_index;
-
-  typedef int                     Curve_segment_index;
-  typedef int                     Corner_index;
-
-  typedef typename Base::R         Gt;
-  typedef Gt                       R;
-  typedef typename Base::Point_3   Point_3;
-  typedef typename Gt::FT          FT;
-
-  typedef CGAL::Tag_true           Has_features;
-
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-  template <typename ... T>
-  Mesh_domain_with_polyline_features_3(const T& ...t)
-    : Base(t...)
-    , current_corner_index_(1)
-    , current_curve_index_(1)
-    , curves_aabb_tree_is_built(false) {}
-#else
-  /// Constructors
-  /// Call the base class constructor
-  Mesh_domain_with_polyline_features_3()
-    : Base()
-    , current_corner_index_(1)
-    , current_curve_index_(1)
-    , curves_aabb_tree_is_built(false) {}
-
-  template <typename T1>
-  Mesh_domain_with_polyline_features_3(const T1& o1)
-    : Base(o1)
-    , current_corner_index_(1)
-    , current_curve_index_(1)
-    , curves_aabb_tree_is_built(false) {}
-
-  template <typename T1, typename T2>
-  Mesh_domain_with_polyline_features_3(const T1& o1, const T2& o2)
-    : Base(o1, o2)
-    , current_corner_index_(1)
-    , current_curve_index_(1)
-    , curves_aabb_tree_is_built(false) {}
-
-  template <typename T1, typename T2, typename T3>
-  Mesh_domain_with_polyline_features_3(const T1& o1, const T2& o2,
-                                       const T3& o3)
-    : Base(o1, o2, o3)
-    , current_corner_index_(1)
-    , current_curve_index_(1)
-    , curves_aabb_tree_is_built(false) {}
-#endif
-
-  /// Destructor
-  ~Mesh_domain_with_polyline_features_3() {}
-
-  /// OutputIterator value type is std::pair<Corner_index, Point_3>
-  template <typename OutputIterator>
-  OutputIterator get_corners(OutputIterator out) const;
-
-  /// OutputIterator value type is CGAL::cpp11::tuple<Curve_segment_index,
-  /// std::pair<Point_3,Index>, std::pair<Point_3,Index> >
-  template <typename OutputIterator>
-  OutputIterator get_curve_segments(OutputIterator out) const;
-
-  /// Returns the geodesic distance between points p and q of curve
-  /// \c curve_index
-  FT geodesic_distance(const Point_3& p, const Point_3& q,
-                       const Curve_segment_index& curve_index) const;
-
-  /// Construct a point on curve \c curve_index at geodesic distance \c distance
-  /// of \c starting_point
-  Point_3
-  construct_point_on_curve_segment(const Point_3& starting_point,
-                                   const Curve_segment_index& curve_index,
-                                   FT distance) const;
-
-  /// Returns the sign of the orientation of p,q,r along curve segment
-  /// of index \c index
-  CGAL::Sign distance_sign_along_cycle(const Point_3& p,
-                                       const Point_3& q,
-                                       const Point_3& r,
-                                       const Curve_segment_index& index) const;
-
-  /// Returns true if curve \c curve_index is a cycle
-  bool is_cycle(const Point_3&, const Curve_segment_index& index) const;
-
-  /// Returns an Index from a Curve_segment_index
-  Index index_from_curve_segment_index(const Curve_segment_index& index) const
-  { return Index(index); }
-
-  /// Returns an Curve_segment_index from an Index
-  Curve_segment_index curve_segment_index(const Index& index) const
-  { return boost::get<Curve_segment_index>(index); }
-
-  /// Returns an Index from a Corner_index
-  Index index_from_corner_index(const Corner_index& index) const
-  { return Index(index); }
-
-  /// Returns an Corner_index from an Index
-  Corner_index corner_index(const Index& index) const
-  { return boost::get<Corner_index>(index); }
-
-  /// Insert a bunch of edges into domain
-  ///   + InputIterator type should have begin() and end() function
-  ///   + InputIterator::iterator value type must be Point_3
-  //    + IndicesOutputIterator is an output iterator of value_type equal
-  ///   to Curve_segment_index
-  template <typename InputIterator, typename IndicesOutputIterator>
-  IndicesOutputIterator
-  add_features(InputIterator first, InputIterator last,
-               IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/);
-
-  template <typename InputIterator, typename IndicesOutputIterator>
-  IndicesOutputIterator
-  add_features_with_context(InputIterator first, InputIterator last,
-                            IndicesOutputIterator out /*=
-                                                        CGAL::Emptyset_iterator()*/);
-
-  template <typename IndicesOutputIterator>
-  IndicesOutputIterator
-  get_incidences(Curve_segment_index id, IndicesOutputIterator out) const;
-
-  template <typename IndicesOutputIterator>
-  IndicesOutputIterator
-  get_corner_incidences(Curve_segment_index id, IndicesOutputIterator out) const;
-
-  typedef std::set<Surface_patch_index> Surface_patch_index_set;
-
-  const Surface_patch_index_set&
-  get_incidences(Curve_segment_index id) const;
-
-  void display_corner_incidences(std::ostream& os, Corner_index id);
-
-  template <typename InputIterator>
-  void
-  add_features(InputIterator first, InputIterator last)
-  { add_features(first, last, CGAL::Emptyset_iterator()); }
-
-  /// Insert one edge into domain
-  /// InputIterator value type is Point_3
-  template <typename InputIterator>
-  Curve_segment_index insert_edge(InputIterator first, InputIterator last);
-
-private:
-  void register_corner(const Point_3& p, const Curve_segment_index& index);
-  void compute_corners_incidences();
-
-  /// Returns the sign of the geodesic distance between \c p and \c q
-  /// Precondition: index is not a cycle
-  CGAL::Sign distance_sign(const Point_3& p, const Point_3& q,
-                           const Curve_segment_index& index) const;
-
-  /// Returns Index associated to p (p must be the coordinates of a corner
-  /// point)
-  Index point_corner_index(const Point_3& p) const;
-
-private:
-  typedef std::map<Point_3,Corner_index> Corners;
-
-  typedef internal::Mesh_3::Polyline<Gt> Polyline;
-  typedef std::map<Curve_segment_index, Polyline> Edges;
-  typedef std::map<Curve_segment_index, Surface_patch_index_set > Edges_incidences;
-  typedef std::map<Corner_index, std::set<Curve_segment_index> > Corners_tmp_incidences;
-  typedef std::map<Corner_index, Surface_patch_index_set > Corners_incidences;
-
-  typedef internal::Mesh_3::Mesh_domain_segment_of_curve_primitive<
-    Gt,
-    typename Edges::const_iterator> Curves_primitives;
-
-  typedef CGAL::AABB_traits<Gt,
-                            Curves_primitives> AABB_curves_traits;
-
-  Corners corners_;
-  Corners_tmp_incidences corners_tmp_incidences_;
-  Corner_index current_corner_index_;
-  Corners_incidences corners_incidences_;
-
-  Edges edges_;
-  Curve_segment_index current_curve_index_;
-  Edges_incidences edges_incidences_;
-
-public:
-  typedef CGAL::AABB_tree<AABB_curves_traits> Curves_AABB_tree;
-
-private:
-  mutable Curves_AABB_tree curves_aabb_tree_;
-  mutable bool curves_aabb_tree_is_built;
-
-public:
-  const Curves_AABB_tree& curves_aabb_tree() const {
-    if(!curves_aabb_tree_is_built) build_curves_aabb_tree();
-    return curves_aabb_tree_;
-  }
-
-  void build_curves_aabb_tree() const {
-    std::cerr << "Building curves AABB tree...\n";
-    curves_aabb_tree_.clear();
-    for(typename Edges::const_iterator
-          edges_it = edges_.begin(),
-          edges_end = edges_.end();
-        edges_it != edges_end; ++edges_it)
-    {
-      const Polyline& polyline = edges_it->second;
-      for(typename Polyline::const_iterator
-            pit = polyline.points_.begin(),
-            end = polyline.points_.end() - 1;
-          pit != end; ++pit)
-      {
-        curves_aabb_tree_.insert(std::make_pair(edges_it, pit));
-      }
-    }
-    curves_aabb_tree_.build();
-    curves_aabb_tree_is_built = true;
-  } // end build_curves_aabb_tree()
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Mesh_domain_with_polyline_features_3 Self;
-  Mesh_domain_with_polyline_features_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Mesh_domain_with_polyline_features_3
-
-
-
-template <class MD_>
-template <typename OutputIterator>
-OutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-get_corners(OutputIterator out) const
-{
-  for ( typename Corners::const_iterator
-       cit = corners_.begin(), end = corners_.end() ; cit != end ; ++cit )
-  {
-    *out++ = std::make_pair(cit->second,cit->first);
-  }
-
-  return out;
-}
-
-template <class MD_>
-template <typename OutputIterator>
-OutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-get_curve_segments(OutputIterator out) const
-{
-  for ( typename Edges::const_iterator
-       eit = edges_.begin(), end = edges_.end() ; eit != end ; ++eit )
-  {
-    CGAL_assertion( eit->second.is_valid() );
-
-    const Point_3& p = eit->second.start_point();
-    const Point_3& q = eit->second.end_point();
-
-    Index p_index, q_index;
-    if ( ! eit->second.is_cycle() )
-    {
-      p_index = point_corner_index(p);
-      q_index = point_corner_index(q);
-    }
-    else
-    {
-      p_index = index_from_curve_segment_index(eit->first);
-      q_index = p_index;
-    }
-
-    *out++ = CGAL::cpp11::make_tuple(eit->first,
-                                     std::make_pair(p,p_index),
-                                     std::make_pair(q,q_index));
-  }
-
-  return out;
-}
-
-
-template <class MD_>
-typename Mesh_domain_with_polyline_features_3<MD_>::Index
-Mesh_domain_with_polyline_features_3<MD_>::
-point_corner_index(const Point_3& p) const
-{
-  typename Corners::const_iterator p_index_it = corners_.find(p);
-  if ( p_index_it == corners_.end() )
-  {
-    CGAL_assertion(false);
-    return Index();
-  }
-
-  return p_index_it->second;
-}
-
-
-template <class MD_>
-typename Mesh_domain_with_polyline_features_3<MD_>::FT
-Mesh_domain_with_polyline_features_3<MD_>::
-geodesic_distance(const Point_3& p, const Point_3& q,
-                  const Curve_segment_index& curve_index) const
-{
-  // Get corresponding polyline
-  typename Edges::const_iterator eit = edges_.find(curve_index);
-  CGAL_assertion(eit != edges_.end());
-
-  // Compute geodesic_distance
-  return eit->second.geodesic_distance(p,q);
-}
-
-
-template <class MD_>
-typename Mesh_domain_with_polyline_features_3<MD_>::Point_3
-Mesh_domain_with_polyline_features_3<MD_>::
-construct_point_on_curve_segment(const Point_3& starting_point,
-                                 const Curve_segment_index& curve_index,
-                                 FT distance) const
-{
-  // Get corresponding polyline
-  typename Edges::const_iterator eit = edges_.find(curve_index);
-  CGAL_assertion(eit != edges_.end());
-
-  // Return point at geodesic_distance distance from starting_point
-  return eit->second.point_at(starting_point,distance);
-}
-
-
-
-template <class MD_>
-template <typename InputIterator, typename IndicesOutputIterator>
-IndicesOutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-add_features(InputIterator first, InputIterator last,
-             IndicesOutputIterator indices_out)
-{
-  // Insert one edge for each element
-  while ( first != last )
-  {
-    *indices_out++ = insert_edge(first->begin(), first->end());
-    ++first;
-  }
-  compute_corners_incidences();
-  return indices_out;
-}
-
-template <class MD_>
-template <typename InputIterator, typename IndicesOutputIterator>
-IndicesOutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-add_features_with_context(InputIterator first, InputIterator last,
-                          IndicesOutputIterator indices_out)
-{
-  // Insert one edge for each element
-  for( ; first != last ; ++first )
-  {
-    Curve_segment_index curve_id =
-      insert_edge(first->polyline_content.begin(), first->polyline_content.end());
-    edges_incidences_[curve_id] = first->context.adjacent_patches_ids;
-    *indices_out++ = curve_id;
-  }
-  compute_corners_incidences();
-  return indices_out;
-}
-
-template <class MD_>
-template <typename IndicesOutputIterator>
-IndicesOutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-get_incidences(Curve_segment_index id,
-               IndicesOutputIterator indices_out) const
-{
-  typename Edges_incidences::const_iterator it = edges_incidences_.find(id);
-
-  if(it == edges_incidences_.end()) return indices_out;
-
-  const Surface_patch_index_set& incidences = it->second;
-
-  return std::copy(incidences.begin(), incidences.end(), indices_out);
-}
-
-template <class MD_>
-template <typename IndicesOutputIterator>
-IndicesOutputIterator
-Mesh_domain_with_polyline_features_3<MD_>::
-get_corner_incidences(Corner_index id,
-                      IndicesOutputIterator indices_out) const
-{
-  typename Corners_incidences::const_iterator it = corners_incidences_.find(id);
-  const Surface_patch_index_set& incidences = it->second;
-  return std::copy(incidences.begin(), incidences.end(), indices_out);
-}
-
-namespace internal { namespace Mesh_3 {
-
-template <typename MDwPF_, bool curve_id_is_streamable>
-// here 'curve_id_is_streamable' is true
-template <typename Container2>
-void
-Display_incidences_to_curves_aux<MDwPF_,curve_id_is_streamable>::
-operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
-           const Container2& corners_tmp_incidences_of_id) const
-{
-  os << "Corner #" << id << " is incident to the following curves: {";
-  BOOST_FOREACH(typename MDwPF_::Curve_segment_index curve_index,
-                corners_tmp_incidences_of_id)
-  {
-    os << " " << curve_index;
-  }
-  os << " }\n";
-}
-
-template <class MDwPF_>
-// here 'curve_id_is_streamable' is false
-template <typename Container2>
-void
-Display_incidences_to_curves_aux<MDwPF_,false>::
-operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
-           const Container2& corners_tmp_incidences_of_id) const
-{
-  os << "Corner #" << id << " is incident to "
-     << corners_tmp_incidences_of_id .size()
-     << " curve(s).\n";
-}
-
-template <typename MDwPF_, bool patch_id_is_streamable>
-// here 'patch_id_is_streamable' is true
-template <typename Container>
-void
-Display_incidences_to_patches_aux<MDwPF_,patch_id_is_streamable>::
-operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
-           const Container& corners_incidences_of_id) const
-{
-  os << "Corner #" << id << " is incident to the following patches: {";
-  BOOST_FOREACH(typename MDwPF_::Surface_patch_index i,
-                corners_incidences_of_id)
-  {
-    os << " " << i;
-  }
-  os << " }\n";
-}
-
-template <class MDwPF_>
-// here 'patch_id_is_streamable' is false
-template <typename Container>
-void
-Display_incidences_to_patches_aux<MDwPF_,false>::
-operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
-           const Container& corners_incidences_id) const
-{
-  os << "Corner #" << id << " is incident to "
-     << corners_incidences_id.size()
-     << " surface patch(es).\n";
-}
-
-}} // end namespaces internal::Mesh_3:: and internal::
-
-template <class MD_>
-void
-Mesh_domain_with_polyline_features_3<MD_>::
-display_corner_incidences(std::ostream& os, Corner_index id)
-{
-  typedef Mesh_domain_with_polyline_features_3<MD_> Mdwpf;
-  typedef is_streamable<Surface_patch_index> i_s_spi;
-  typedef is_streamable<Curve_segment_index> i_s_csi;
-
-  using namespace internal::Mesh_3;
-  typedef Display_incidences_to_curves_aux<Mdwpf,i_s_csi::value> D_i_t_c;
-  typedef Display_incidences_to_patches_aux<Mdwpf,i_s_spi::value> D_i_t_p;
-  D_i_t_c()(os, id, corners_tmp_incidences_[id]);
-  D_i_t_p()(os, id, corners_incidences_[id]);
-}
-
-template <class MD_>
-void
-Mesh_domain_with_polyline_features_3<MD_>::
-compute_corners_incidences()
-{
-  for(typename Corners::iterator
-        cit = corners_.begin(), end = corners_.end();
-      cit != end; /* the loop variable is incremented in the  body */)
-  {
-    const Corner_index id = cit->second;
-
-    const typename Corners_tmp_incidences::mapped_type&
-      corner_tmp_incidences = corners_tmp_incidences_[id];
-
-    // If the corner is incident to only one curve, and that curve is a
-    // cycle, then remove the corner from the set.
-    if(corner_tmp_incidences.size() == 1 &&
-       is_cycle(Point_3(), *corner_tmp_incidences.begin()))
-    {
-      typename Corners::iterator to_erase = cit;
-      ++cit;
-      corners_.erase(to_erase);
-      continue;
-    }
-
-    Surface_patch_index_set& incidences = corners_incidences_[id];
-    // That should be an empty set.
-
-    BOOST_FOREACH(Curve_segment_index curve_index, corner_tmp_incidences)
-    {
-      get_incidences(curve_index,
-                     std::inserter(incidences,
-                                   incidences.begin()));
-    }
-#ifdef CGAL_MESH_3_PROTECTION_DEBUG
-    display_corner_incidences(std::cerr, id);
-#endif // CGAL_MESH_3_PROTECTION_DEBUG
-
-    // increment the loop variable
-    ++cit;
-  }
-}
-
-template <class MD_>
-const typename Mesh_domain_with_polyline_features_3<MD_>::Surface_patch_index_set&
-Mesh_domain_with_polyline_features_3<MD_>::
-get_incidences(Curve_segment_index id) const
-{
-  typename Edges_incidences::const_iterator it = edges_incidences_.find(id);
-  return it->second;
-}
-
-template <class MD_>
-void
-Mesh_domain_with_polyline_features_3<MD_>::
-register_corner(const Point_3& p, const Curve_segment_index& curve_index)
-{
-
-  typename Corners::iterator cit = corners_.lower_bound(p);
-
-  // If the corner already exists, returns...
-  if(cit != corners_.end() && !(corners_.key_comp()(p, cit->first))) {
-    corners_tmp_incidences_[cit->second].insert(curve_index);
-    return;
-  }
-
-  // ...else insert it!
-
-  const Corner_index index = current_corner_index_;
-  ++current_corner_index_;
-
-  corners_.insert(cit, std::make_pair(p, index));
-  corners_tmp_incidences_[index].insert(curve_index);
-}
-
-template <class MD_>
-template <typename InputIterator>
-typename Mesh_domain_with_polyline_features_3<MD_>::Curve_segment_index
-Mesh_domain_with_polyline_features_3<MD_>::
-insert_edge(InputIterator first, InputIterator last)
-{
-  CGAL_assertion(std::distance(first,last) > 1);
-
-  const Curve_segment_index curve_index = current_curve_index_++;
-
-  // Fill corners
-  //
-  // For a cycle, the "first" point of the cycle is registered as a
-  // corner. If at the end, during the call to
-  // 'compute_corners_incidences()', that corner is incident only to a
-  // cycle, then it will be removed from the set of corners.
-  register_corner(*first, curve_index);
-  if ( *first != *boost::prior(last) )
-  {
-    register_corner(*boost::prior(last), curve_index);
-  }
-
-  // Create a new polyline
-  std::pair<typename Edges::iterator,bool> insertion =
-    edges_.insert(std::make_pair(curve_index,Polyline()));
-
-  // Fill polyline with data
-  while ( first != last )
-  {
-    insertion.first->second.add_point(*first++);
-  }
-  return curve_index;
-}
-
-
-template <class MD_>
-CGAL::Sign
-Mesh_domain_with_polyline_features_3<MD_>::
-distance_sign(const Point_3& p, const Point_3& q,
-              const Curve_segment_index& index) const
-{
-  typename Edges::const_iterator eit = edges_.find(index);
-  CGAL_assertion(eit != edges_.end());
-  CGAL_precondition( ! eit->second.is_cycle() );
-
-  if ( p == q )
-    return CGAL::ZERO;
-  else if ( eit->second.are_ordered_along(p,q) )
-    return CGAL::POSITIVE;
-  else
-    return CGAL::NEGATIVE;
-}
-
-template <class MD_>
-CGAL::Sign
-Mesh_domain_with_polyline_features_3<MD_>::
-distance_sign_along_cycle(const Point_3& p,
-                          const Point_3& q,
-                          const Point_3& r,
-                          const Curve_segment_index& index) const
-{
-  // Find edge
-  typename Edges::const_iterator eit = edges_.find(index);
-  CGAL_assertion(eit != edges_.end());
-
-  // If eit is not a cycle, then the orientation corresponds to the sign
-  // of the distance
-  if ( ! eit->second.is_cycle() )
-  {
-    return distance_sign(p,r,index);
-  }
-
-  // If p and r are the same point, it correspond to a complete loop on a cycle
-  if ( p == r ) { return CGAL::POSITIVE; }
-
-  // We are on a cycle without any clue (p==q). Return the shortest path as
-  // orientation.
-  if ( p == q )
-  {
-    FT pr = eit->second.geodesic_distance(p,r);
-    FT rp = eit->second.geodesic_distance(r,p);
-    if ( pr < rp ) { return CGAL::POSITIVE; }
-    else { return CGAL::NEGATIVE; }
-  }
-
-  // If pq or pr is negative, edge is not a cycle, thus geodesic_distance
-  // gives the answer.
-  FT pq = eit->second.geodesic_distance(p,q);
-  FT pr = eit->second.geodesic_distance(p,r);
-  CGAL_assertion(pq > FT(0));
-  CGAL_assertion(pr > FT(0));
-
-  // Compare pq and pr
-  if ( pq <= pr ) { return CGAL::POSITIVE; }
-  else { return CGAL::NEGATIVE; }
-}
-
-template <class MD_>
-bool
-Mesh_domain_with_polyline_features_3<MD_>::
-is_cycle(const Point_3&, const Curve_segment_index& index) const
-{
-  // Find edge
-  typename Edges::const_iterator eit = edges_.find(index);
-  CGAL_assertion(eit != edges_.end());
-
-  return eit->second.is_cycle();
-}
-
-
-} //namespace CGAL
-
-
-#endif // CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_criteria_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_criteria_3.h
deleted file mode 100644
index 6905708..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_criteria_3.h
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-// Mesh_facet_criteria_3 class.
-//******************************************************************************
-
-#ifndef CGAL_MESH_FACET_CRITERIA_3_H
-#define CGAL_MESH_FACET_CRITERIA_3_H
-
-#include <CGAL/Mesh_3/mesh_standard_facet_criteria.h>
-#include <CGAL/Mesh_facet_topology.h>
-
-namespace CGAL {
-  
-template<typename Tr,
-         typename Visitor_ = Mesh_3::Facet_criterion_visitor_with_features<Tr> >
-class Mesh_facet_criteria_3
-{
-public:
-  typedef Visitor_ Visitor;
-  typedef typename Visitor::Facet_quality Facet_quality;
-  typedef typename Visitor::Facet_badness Facet_badness;
-  
-private:
-  typedef Mesh_3::Criteria<Tr,Visitor> Criteria;
-  typedef Mesh_3::Abstract_criterion<Tr,Visitor> Abstract_criterion;
-
-  typedef typename Tr::Facet Facet;
-  typedef typename Tr::Geom_traits::FT FT;
-
-  typedef Mesh_facet_criteria_3<Tr> Self;
-
-public:
-  /**
-   * @brief Constructor
-   */
-  Mesh_facet_criteria_3(const FT& angle_bound,
-                        const FT& radius_bound,
-                        const FT& distance_bound,
-                        const Mesh_facet_topology topology =
-                          FACET_VERTICES_ON_SURFACE)
-  {
-    if ( FT(0) != angle_bound )
-      init_aspect(angle_bound);
-    
-    if ( FT(0) != radius_bound )
-      init_radius(radius_bound);
-    
-    if ( FT(0) != distance_bound )
-      init_distance(distance_bound);
-    
-    init_topo(topology);
-  }
-
-  // Nb: SFINAE (dummy) to avoid wrong matches with built-in numerical types
-  // as int.
-  template < typename Sizing_field >
-  Mesh_facet_criteria_3(const FT& angle_bound,
-                        const Sizing_field& radius_bound,
-                        const FT& distance_bound,
-                        const Mesh_facet_topology topology = 
-                          FACET_VERTICES_ON_SURFACE,
-                        typename Sizing_field::FT /*dummy*/ = 0)
-  {
-    if ( FT(0) != angle_bound )
-      init_aspect(angle_bound);
-    
-    init_radius(radius_bound);
-    
-    if ( FT(0) != distance_bound )
-      init_distance(distance_bound);
-    
-    init_topo(topology);  
-  }
-  
-  /// Destructor
-  ~Mesh_facet_criteria_3() { }
-
-   /**
-   * @brief returns the badness of facet \c facet
-   * @param facet the facet
-   * @return the badness of \c facet
-   */
-  Facet_badness operator()(const Facet& facet) const
-  {
-    return criteria_(facet);
-  }
-  
-  void add(Abstract_criterion* criterion)
-  {
-    criteria_.add(criterion);
-  }
-
-private:
-  void init_aspect(const FT& angle_bound)
-  {
-    typedef Mesh_3::Aspect_ratio_criterion<Tr,Visitor> Aspect_criterion;
-    criteria_.add(new Aspect_criterion(angle_bound));
-  }
-  
-  void init_radius(const FT& radius_bound)
-  {
-    typedef Mesh_3::Uniform_size_criterion<Tr,Visitor> Uniform_size_criterion;
-    criteria_.add(new Uniform_size_criterion(radius_bound));
-  }
-  
-  template <typename Sizing_field>
-  void init_radius(const Sizing_field& radius_bound)
-  {
-    typedef Mesh_3::Variable_size_criterion<Tr,Visitor,Sizing_field> Variable_size_criterion;
-    criteria_.add(new Variable_size_criterion(radius_bound));
-  }
-  
-  void init_distance(const FT& distance_bound)
-  {
-    typedef Mesh_3::Curvature_size_criterion<Tr,Visitor> Curvature_criterion;
-    criteria_.add(new Curvature_criterion(distance_bound));
-  }
-  
-  void init_topo(const Mesh_facet_topology topology)
-  {
-    switch ( topology )
-    {
-      case FACET_VERTICES_ON_SURFACE:
-      {
-        typedef Mesh_3::Facet_on_surface_criterion<Tr,Visitor> On_surface_criterion;
-        criteria_.add(new On_surface_criterion());
-        break;
-      }
-        
-      case FACET_VERTICES_ON_SAME_SURFACE_PATCH:
-      {
-        typedef Mesh_3::Facet_on_same_surface_criterion<Tr,Visitor> Same_surface_criterion;
-        criteria_.add(new Same_surface_criterion());
-        break;
-      }
-      
-      case FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK:
-      {
-        // @TODO: Implement adjacency check !
-        typedef Mesh_3::Facet_on_same_surface_criterion<Tr,Visitor> Same_surface_criterion;
-        criteria_.add(new Same_surface_criterion());
-        break;
-      }
-    }
-  }
-  
-private:
-  Criteria criteria_;
-};  // end class Mesh_facet_criteria_3
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_MESH_FACET_CRITERIA_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_topology.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_topology.h
deleted file mode 100644
index d15e9c5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_facet_topology.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : 
-//******************************************************************************
-
-#ifndef CGAL_MESH_FACET_TOPOLOGY_H
-#define CGAL_MESH_FACET_TOPOLOGY_H
-
-namespace CGAL {
-
-enum Mesh_facet_topology {
-  FACET_VERTICES_ON_SURFACE = 1,
-  FACET_VERTICES_ON_SAME_SURFACE_PATCH,
-  FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK
-};  
-  
-} // end namespace CGAL
-
-#endif // CGAL_MESH_FACET_TOPOLOGY_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_vertex_base_3.h b/3rdparty/CGAL-4.6/include/CGAL/Mesh_vertex_base_3.h
deleted file mode 100644
index 410fd65..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mesh_vertex_base_3.h
+++ /dev/null
@@ -1,310 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// Copyright (c) 2011 GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Mesh_vertex_base_3.h $
-// $Id: Mesh_vertex_base_3.h 69674 2012-06-18 09:34:06Z jtournoi $
-//
-//
-// Author(s)     : Stéphane Tayeb, Andreas Fabri
-//
-//******************************************************************************
-// File Description :
-//
-//
-//******************************************************************************
-
-
-#ifndef CGAL_COMPACT_MESH_VERTEX_BASE_3_H
-#define CGAL_COMPACT_MESH_VERTEX_BASE_3_H
-
-#include <CGAL/Triangulation_vertex_base_3.h>
-#include <CGAL/internal/Mesh_3/get_index.h>
-#include <CGAL/Mesh_3/io_signature.h>
-#include <CGAL/Has_timestamp.h>
-#include <CGAL/tags.h>
-
-namespace CGAL {
-  
-// Without erase counter
-template <typename Concurrency_tag>
-class Mesh_vertex_base_3_base
-{
-#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
- || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
-
-public:
-  // Erase counter (cf. Compact_container)
-  unsigned int erase_counter() const
-  {
-    return this->m_erase_counter;
-  }
-  void set_erase_counter(unsigned int c)
-  {
-    this->m_erase_counter = c;
-  }
-  void increment_erase_counter()
-  {
-    ++this->m_erase_counter;
-  }
-  
-protected:
-  typedef unsigned int              Erase_counter_type;
-  Erase_counter_type                m_erase_counter;
-#endif
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Specialized version (parallel)
-template <>
-class Mesh_vertex_base_3_base<Parallel_tag>
-{
-public:
-  
-  // Erase counter (cf. Compact_container)
-  unsigned int erase_counter() const
-  {
-    return this->m_erase_counter;
-  }
-  void set_erase_counter(unsigned int c)
-  {
-    this->m_erase_counter = c;
-  }
-  void increment_erase_counter()
-  {
-    ++this->m_erase_counter;
-  }
-  
-protected:
-  typedef tbb::atomic<unsigned int> Erase_counter_type;
-  Erase_counter_type                m_erase_counter;
-
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-// Class Mesh_vertex_base_3
-// Vertex base class used in 3D meshing process.
-// Adds information to Vb about the localization of the vertex in regards
-// to the 3D input complex.
-template<class GT,
-         class MD,
-         class Vb = Triangulation_vertex_base_3<GT> >
-class Mesh_vertex_base_3
-: public Vb,
-  public Mesh_vertex_base_3_base<
-    typename Vb::Triangulation_data_structure::Concurrency_tag>
-{
-public:
-  typedef Vb Cmvb3_base;
-  typedef typename Vb::Vertex_handle  Vertex_handle;
-
-  // To get correct vertex type in TDS
-  template < class TDS3 >
-  struct Rebind_TDS {
-    typedef typename Vb::template Rebind_TDS<TDS3>::Other Vb3;
-    typedef Mesh_vertex_base_3 <GT, MD, Vb3> Other;
-  };
-
-  // Types
-  typedef typename MD::Index                      Index;
-  typedef typename GT::FT                         FT;
-
-  // Constructor
-  Mesh_vertex_base_3()
-    : Vb()
-    , number_of_incident_facets_(0)
-    , number_of_components_(0)
-    , index_()
-    , meshing_info_(0)
-    , dimension_(-1)
-    , cache_validity(false)
-#ifdef CGAL_INTRUSIVE_LIST
-    , next_intrusive_()
-    , previous_intrusive_()
-#endif //CGAL_INTRUSIVE_LIST
-    , time_stamp_(-1)
-  {}
-
-  // Default copy constructor and assignment operator are ok
-
-  // Returns the dimension of the lowest dimensional face of the input 3D
-  // complex that contains the vertex
-  int in_dimension() const {
-    if(dimension_ < -1) return -2-dimension_;
-    else return dimension_; 
-  }
-
-  // Sets the dimension of the lowest dimensional face of the input 3D complex
-  // that contains the vertex
-  void set_dimension(const int dimension) { dimension_ = dimension; }
-
-  // Tells if the vertex is marked as a special protecting ball
-  bool is_special() const { return dimension_ < -1; }
-
-  // Marks or unmarks the vertex as a special protecting ball
-  void set_special(bool special = true) {
-    if(special != (dimension_ < -1) )
-      dimension_ = -2-dimension_;
-  }
-
-  // Returns the index of the lowest dimensional face of the input 3D complex
-  // that contains the vertex
-  Index index() const { return index_; }
-
-  // Sets the index of the lowest dimensional face of the input 3D complex
-  // that contains the vertex
-  void set_index(const Index& index) { index_ = index; }
-
-  // Accessors to meshing_info private data
-  const FT& meshing_info() const { return meshing_info_; }
-  void set_meshing_info(const FT& value) { meshing_info_ = value; }
-
-#ifdef CGAL_INTRUSIVE_LIST
-  Vertex_handle next_intrusive() const { return next_intrusive_; }
-  void set_next_intrusive(Vertex_handle v)
-  { 
-    next_intrusive_ = v;
-  }
-
-  Vertex_handle previous_intrusive() const { return previous_intrusive_; }
-  void set_previous_intrusive(Vertex_handle v)
-  {
-    previous_intrusive_ = v; 
-  }
-#endif
-
-  /// For the determinism of Compact_container iterators
-  ///@{
-  typedef Tag_true Has_timestamp;
-
-  std::size_t time_stamp() const {
-    return time_stamp_;
-  }
-  void set_time_stamp(const std::size_t& ts) {
-    time_stamp_ = ts;
-  }
-  ///@}
-
-  bool is_c2t3_cache_valid() const {
-    return cache_validity;
-  }
-
-  void invalidate_c2t3_cache()
-  {
-    cache_validity = false;
-  }
-
-  void set_c2t3_cache(const int i, const int j)
-  {
-    number_of_incident_facets_ = i;
-    number_of_components_ = j;
-    cache_validity = true;
-  }
-
-  int cached_number_of_incident_facets() const
-  {
-    return number_of_incident_facets_;
-  }
-    
-  int cached_number_of_components() const
-  {
-    return number_of_components_;
-  }
-
-  static
-  std::string io_signature()
-  {
-    return 
-      Get_io_signature<Vb>()() + "+" +
-      Get_io_signature<int>()() + "+" +
-      Get_io_signature<Index>()();
-  }
-private:
-
-  int number_of_incident_facets_;
-  int number_of_components_; // number of components in the adjacency
-  // graph of incident facets (in complex)
-
-
-  // Index of the lowest dimensional face of the input 3D complex
-  // that contains me
-  Index index_;
-  // Stores info needed by optimizers
-  FT meshing_info_;
-
-  // Dimension of the lowest dimensional face of the input 3D complex
-  // that contains me. Negative values are a marker for special vertices.
-  short dimension_;
-  bool cache_validity;
-#ifdef CGAL_INTRUSIVE_LIST
-  Vertex_handle next_intrusive_;
-  Vertex_handle previous_intrusive_;
-#endif
-  std::size_t time_stamp_;
-
-};  // end class Mesh_vertex_base_3
-
-template<class GT,
-         class MD,
-         class Vb>
-inline
-std::istream&
-operator>>(std::istream &is, Mesh_vertex_base_3<GT,MD,Vb>& v)
-{
-  typedef Mesh_vertex_base_3<GT,MD,Vb> Vertex;
-  typedef typename Vertex::Cmvb3_base Cmvb3_base;
-  is >> static_cast<Cmvb3_base&>(v);
-  int dimension;
-  if(is_ascii(is)) {
-    is >> dimension;
-
-  } else {
-    CGAL::read(is, dimension);
-  }
-  CGAL_assertion(dimension >= 0);
-  CGAL_assertion(dimension < 4);
-  typename Vertex::Index index = 
-    internal::Mesh_3::Read_mesh_domain_index<MD>()(dimension, is);
-  v.set_dimension(dimension);
-  v.set_index(index);
-  return is;
-}
-
-template<class GT,
-         class MD,
-         class Vb>
-inline
-std::ostream&
-operator<<(std::ostream &os, const Mesh_vertex_base_3<GT,MD,Vb>& v)
-{
-  typedef Mesh_vertex_base_3<GT,MD,Vb> Vertex;
-  typedef typename Vertex::Cmvb3_base Cmvb3_base;
-  os << static_cast<const Cmvb3_base&>(v);
-  if(is_ascii(os)) {
-    os << " " << v.in_dimension()
-       << " ";
-  } else {
-    CGAL::write(os, v.in_dimension());
-  }
-  internal::Mesh_3::Write_mesh_domain_index<MD>()(os, 
-                                                  v.in_dimension(),
-                                                  v.index());
-  return os;
-}
-
-}  // end namespace CGAL
-
-
-
-#endif // CGAL_COMPACT_MESH_VERTEX_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Double_map_container.h b/3rdparty/CGAL-4.6/include/CGAL/Meshes/Double_map_container.h
deleted file mode 100644
index 2841217..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Double_map_container.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2004-2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent RINEAU
-
-#ifndef CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
-#define CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
-
-#include <set>
-#include <iostream>
-#include <CGAL/Double_map.h>
-
-// backward compatibility
-#ifdef CGAL_MESH_3_DEBUG_DOUBLE_MAP
-#  define CGAL_MESHES_DEBUG_DOUBLE_MAP CGAL_MESH_3_DEBUG_DOUBLE_MAP
-#endif
-
-namespace CGAL {
-
-  namespace Meshes {
-
-    template <typename Elt, class Quality>
-    class Double_map_container 
-    {
-    public:
-      typedef Elt Element;
-
-    protected:
-      // --- protected datas ---
-      Double_map<Element, Quality> m;
-
-    public:
-      bool no_longer_element_to_refine_impl() const
-      {
-        return m.empty();
-      }
-
-      Element get_next_element_impl()
-      {
-        CGAL_assertion(!m.empty());
-#if CGAL_MESHES_DEBUG_DOUBLE_MAP
-	std::cerr << "get_next_element_impl(" << &*(m.front()->second)
-		  << ")\n";
-#endif
-        return m.front()->second;
-
-      }
-
-      void add_bad_element(const Element& e, const Quality& q)
-      {
-#if CGAL_MESHES_DEBUG_DOUBLE_MAP
-	std::cerr << "add_bad_element(" << &*e << ")\n";
-#endif
-        m.insert(e, q);
-      }
-
-      void pop_next_element_impl()
-      {
-        m.pop_front();
-      }
-
-      void remove_element(Element& e)
-      {
-#if CGAL_MESHES_DEBUG_DOUBLE_MAP
-	std::cerr << "remove_element(" << &*e << ")\n";
-#endif
-        m.erase(e);
-      }
-
-      typename Double_map<Element, Quality>::size_type
-      size() const
-      {
-	return m.size();
-      }
-    }; // end Double_map_container
-    
-  } // end namespace Meshes
-} // end namespace CGAL
-
-#endif // CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_annulus_d.h b/3rdparty/CGAL-4.6/include/CGAL/Min_annulus_d.h
deleted file mode 100644
index 6bd19bd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Min_annulus_d.h
+++ /dev/null
@@ -1,873 +0,0 @@
-// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>
-
-#ifndef CGAL_MIN_ANNULUS_D_H
-#define CGAL_MIN_ANNULUS_D_H
-
-// includes
-// --------
-#include <CGAL/Optimisation/basic.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/QP_options.h>
-#include <CGAL/QP_solver/QP_solver.h>
-#include <CGAL/QP_solver/functors.h>
-#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
-#include <CGAL/QP_solver/QP_full_exact_pricing.h>
-#include <CGAL/boost/iterator/counting_iterator.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-
-// here is how it works. We have d+2 variables: 
-// R (big radius), r (small radius), c (center). The problem is
-//
-// min R^2 - r^2 
-// s.t. ||p - c||^2 >= r^2   for all p
-//      ||p - c||^2 <= R^2   for all p
-//
-// This looks nonlinear, but we can in fact make the substitutions
-// u = R^2 - c^Tc, v = r^2 - c^Tc and get the following equivalent
-// linear program:
-//
-// min u - v
-// s.t. p^Tp - 2p^Tc >= v  for all p
-//      p^Tp - 2p^Tc <= u  for all p
-// 
-// or 
-//
-// max  v - u
-// s.t. v     + 2p_1c_1 + 2p_2c_2 + ...  + 2p_dc_d <=  p^Tp for all p
-//        - u - 2p_1c_1 - 2p_2c_2 - ...  - 2p_dc_d <= -p^Tp for all p
-//
-// When we introduce a dual variable x_p for every constraint in the first
-// set and a dual variable y_p for every constraint in the second set,
-// we obtain the following dual program:
-//
-// min \sum_p x_p p^Tp -  \sum_p y_p p^Tp
-// s.t.
-//    2\sum_p x_p p    - 2\sum_p y_p p     =  0
-//     \sum_p x_p                          =  1  (constraint for v)
-//                     -  \sum_p y_p       = -1  (constraint for u)
-//                                               x_p >= 0  for all p        
-//                                               y_p >= 0  for all p 
-//
-// in the following functors, the ordering of the constraints is as above; 
-// the indices of the variables are: x_p_j <-> 2 * j, y_p_j <-> 2 * j + 1 
-// we also make the substitutions x'_p = x_p / h_p^2, y'_p = y_p / h_p^2
-// where h_p is the homogenizing coordinate of p, in order to allow
-// homogeneous points. This, however, means that the computed annulus is
-// not necessarily correct. If P is a set of homogeneous points, 
-//     P = { (p_0,...,p_{d-1}, h_p) }, 
-// then we always get a *feasible* annulus for the point set 
-//     P' = { (p_0*h_p,...,p_{d-1}*h_p, h_p*h_p) }. 
-// If the type NT is inexact, this annulus might not even be optimal, since
-// the objective function involves terms p^Tp that might not be exactly
-// computed -> document all this!!!
-
-namespace CGAL {
-
-namespace MA_detail {
-
-  // functor for a fixed column of A
-  template <class NT, class Iterator>
-  class A_column : public std::unary_function <int, NT>
-  {
-  public:
-    typedef NT result_type;
-    A_column()
-    {}
-  
-    A_column (int j, int d, Iterator it)
-      : j_ (j), d_ (d), it_ (it), h_p (*(it+d)), nt_0_ (0), nt_2_ (2)
-    {}
-
-    result_type operator() (int i) const
-    {
-      if (j_ % 2 == 0) {
-	// column for x_p
-	if (i < d_) return  *(it_ + i) * h_p * nt_2_;  
-	if (i == d_) return h_p * h_p;  
-	return nt_0_;
-      } else {
-	// column for y_p
-	if (i < d_) return  -(*(it_ + i)) * h_p * nt_2_;
-	if (i == d_+1) return -h_p * h_p;
-	return nt_0_;
-      }
-    }
-    
-  private:
-    int j_;                  // column number
-    int d_;                  // dimension
-    Iterator it_;            // the iterator through the column's point
-    NT h_p;                  // the homogenizing coordinate of p
-    NT nt_0_;
-    NT nt_2_; 
-  };
-  
-  // functor for matrix A
-  template <class NT, class Access_coordinate_begin_d,
-	    class Point_iterator >
-  class A_matrix : public std::unary_function
-  <int, boost::transform_iterator <A_column
-    <NT, typename Access_coordinate_begin_d::Coordinate_iterator>, 
-				   boost::counting_iterator<int> > >
-  { 
-    typedef typename MA_detail::A_column
-    <NT, typename Access_coordinate_begin_d::Coordinate_iterator> A_column;
-  public:
-    typedef boost::transform_iterator
-    <A_column, boost::counting_iterator<int> > result_type;
-    
-    A_matrix ()
-    {}
-
-    A_matrix (int d, 
-	      const Access_coordinate_begin_d& da_coord,
-	      Point_iterator P) 
-      : d_ (d), da_coord_ (da_coord), P_ (P)
-    {}
-
-    result_type operator () (int j) const
-    { 
-      return result_type
-	(0, A_column (j, d_, da_coord_ (*(P_+j/2)))); 
-    }
-
-  private:
-    int d_;                  // dimension
-    Access_coordinate_begin_d da_coord_; // data accessor
-    Point_iterator P_;       // point set P
-  };
-
-  // The functor necessary to realize access to b
-  template <class NT>
-  class B_vector : public std::unary_function<int, NT>
-  {
-  public:
-    typedef NT result_type;
-    B_vector()
-    {}
-
-    B_vector (int d)
-      : d_ (d), nt_0_ (0), nt_1_ (1)
-    {}
-
-    result_type operator() (int i) const
-    {
-      if (i == d_) return nt_1_;
-      if (i == d_+1) return -nt_1_;
-      return nt_0_;
-    }
-
-  private:
-    int d_;
-    NT nt_0_;
-    NT nt_1_;
-  };
-
-}
-
-// Class interfaces
-// ================
-template < class Traits_ >
-class Min_annulus_d {
-public:
-  // self
-  typedef  Traits_                    Traits;
-  typedef  Min_annulus_d<Traits>      Self;
-
-  // types from the traits class
-  typedef  typename Traits::Point_d   Point;
-
-  typedef  typename Traits::Rep_tag   Rep_tag;
-
-  typedef  typename Traits::RT        RT;
-  typedef  typename Traits::FT        FT;
-
-  typedef  typename Traits::Access_dimension_d
-  Access_dimension_d;
-  typedef  typename Traits::Access_coordinates_begin_d
-  Access_coordinates_begin_d;
-
-  typedef  typename Traits::Construct_point_d
-  Construct_point_d;
-
-  typedef  typename Traits::ET        ET;
-  typedef  typename Traits::NT        NT;
-
-  // public types 
-  typedef  std::vector<Point>         Point_vector;
-  typedef  typename Point_vector::const_iterator
-  Point_iterator;
-
-private:  
-  // QP solver iterator types
-  typedef MA_detail::A_matrix <NT, Access_coordinates_begin_d,
-			       Point_iterator> A_matrix;
-  typedef boost::transform_iterator
-  <A_matrix,  
-   boost::counting_iterator<int> >   A_iterator;
-
-  typedef MA_detail::B_vector <NT> B_vector;
-  typedef  boost::transform_iterator
-  <B_vector,
-    boost::counting_iterator<int> >  B_iterator;
-
-  typedef CGAL::Const_oneset_iterator<CGAL::Comparison_result> R_iterator;  
- 
-  typedef  std::vector<NT>                                     C_vector; 
-  typedef  typename C_vector::const_iterator                   C_iterator; 
-
-  // Program type
-  typedef CGAL::Nonnegative_linear_program_from_iterators
-  <A_iterator, B_iterator, R_iterator, C_iterator> LP;
-
-  // Tags
-  typedef QP_solver_impl::QP_tags <Tag_true, Tag_true> QP_tags;
-
-  // Solver types
-  typedef  CGAL::QP_solver <LP, ET, QP_tags > Solver;
-
-  typedef  typename Solver::Pricing_strategy Pricing_strategy;
-
-  // types from the QP solver
-  typedef  typename Solver::Basic_variable_index_iterator
-  Basic_variable_index_iterator;
-    
-  // private types
-  typedef  std::vector<ET>            ET_vector;
-    
-  typedef  QP_access_by_index
-  <typename std::vector<Point>::const_iterator, int> Point_by_index;
-    
-  typedef  std::binder2nd< std::divides<int> >
-  Divide;
-    
-  typedef  std::vector<int>           Index_vector;
-    
-  typedef  std::vector<NT>            NT_vector;
-  typedef  std::vector<NT_vector>     NT_matrix;
-    
-
-public:
-  // public types
-    
-  typedef  CGAL::Join_input_iterator_1<
-    Basic_variable_index_iterator,
-    CGAL::Unary_compose_1<Point_by_index,Divide> >
-  Support_point_iterator;
-    
-    
-  typedef  typename Index_vector::const_iterator IVCI;
-  typedef  CGAL::Join_input_iterator_1<
-    IVCI, Point_by_index >
-  Inner_support_point_iterator;
-  typedef  CGAL::Join_input_iterator_1<
-    IVCI, Point_by_index >
-  Outer_support_point_iterator;
-
-  typedef IVCI Inner_support_point_index_iterator;
-  typedef IVCI Outer_support_point_index_iterator;
-    
-  typedef  typename ET_vector::const_iterator
-  Coordinate_iterator;
-    
-
-  // creation
-  Min_annulus_d( const Traits&  traits  = Traits())
-    : tco( traits), da_coord(tco.access_coordinates_begin_d_object()),
-      d( -1), solver(0){}
-    
-  template < class InputIterator >
-  Min_annulus_d( InputIterator  first,
-		 InputIterator  last,
-		 const Traits&  traits = Traits())
-    : tco( traits), da_coord(tco.access_coordinates_begin_d_object()), 
-      solver(0) {
-    set( first, last);
-  }
-
-  ~Min_annulus_d() {
-    if (solver)
-      delete solver;
-  }
-    
-  // access to point set
-  int  ambient_dimension( ) const { return d; }
-    
-  int  number_of_points( ) const { return static_cast<int>(points.size()); }
-    
-  Point_iterator  points_begin( ) const { return points.begin(); }
-  Point_iterator  points_end  ( ) const { return points.end  (); }
-    
-  // access to support points
-  int
-  number_of_support_points( ) const
-  { return number_of_points() < 2 ?
-      number_of_points() :
-    solver->number_of_basic_variables(); }
-    
-  Support_point_iterator
-  support_points_begin() const {
-    CGAL_optimisation_assertion_msg(number_of_points() >= 2,
-				    "support_points_begin: not enough points");
-    return Support_point_iterator(
-				  solver->basic_original_variable_indices_begin(),
-				  CGAL::compose1_1(
-						   Point_by_index( points.begin()),
-						   std::bind2nd( std::divides<int>(), 2)));
-  }
-    
-  Support_point_iterator
-  support_points_end() const {
-    CGAL_optimisation_assertion_msg(number_of_points() >= 2,
-				    "support_points_begin: not enough points");
-    return Support_point_iterator(
-				  solver->basic_original_variable_indices_end(),
-				  CGAL::compose1_1(
-						   Point_by_index( points.begin()),
-						   std::bind2nd( std::divides<int>(), 2)));
-  }
-    
-  int  number_of_inner_support_points() const { return static_cast<int>(inner_indices.size());}
-  int  number_of_outer_support_points() const { return static_cast<int>(outer_indices.size());}
-    
-  Inner_support_point_iterator
-  inner_support_points_begin() const
-  { return Inner_support_point_iterator(
-					inner_indices.begin(),
-					Point_by_index( points.begin())); }
-    
-  Inner_support_point_iterator
-  inner_support_points_end() const
-  { return Inner_support_point_iterator(
-					inner_indices.end(),
-					Point_by_index( points.begin())); }
-    
-  Outer_support_point_iterator
-  outer_support_points_begin() const
-  { return Outer_support_point_iterator(
-					outer_indices.begin(),
-					Point_by_index( points.begin())); }
-    
-  Outer_support_point_iterator
-  outer_support_points_end() const
-  { return Outer_support_point_iterator(
-					outer_indices.end(),
-					Point_by_index( points.begin())); }
-
-  Inner_support_point_index_iterator
-  inner_support_points_indices_begin() const
-  { return inner_indices.begin(); }
-    
-  Inner_support_point_index_iterator
-  inner_support_points_indices_end() const
-  { return inner_indices.end(); }
-
-  Outer_support_point_index_iterator
-  outer_support_points_indices_begin() const
-  { return outer_indices.begin(); }
-
-  Outer_support_point_index_iterator
-  outer_support_points_indices_end() const
-  { return outer_indices.end(); }
-
-
-  // access to center (rational representation)
-  Coordinate_iterator
-  center_coordinates_begin( ) const { return center_coords.begin(); }
-    
-  Coordinate_iterator
-  center_coordinates_end  ( ) const { return center_coords.end  (); }
-    
-  // access to squared radii (rational representation)
-  ET  squared_inner_radius_numerator( ) const { return sqr_i_rad_numer; }
-  ET  squared_outer_radius_numerator( ) const { return sqr_o_rad_numer; }
-  ET  squared_radii_denominator     ( ) const { return sqr_rad_denom; }
-    
-  // access to center and squared radii
-  // NOTE: an implicit conversion from ET to RT must be available!
-  Point
-  center( ) const
-  { CGAL_optimisation_precondition( ! is_empty());
-  return tco.construct_point_d_object()( ambient_dimension(),
-					 center_coordinates_begin(),
-					 center_coordinates_end()); }
-    
-  FT
-  squared_inner_radius( ) const
-  { CGAL_optimisation_precondition( ! is_empty());
-  return FT( squared_inner_radius_numerator()) /
-    FT( squared_radii_denominator()); }
-    
-  FT
-  squared_outer_radius( ) const
-  { CGAL_optimisation_precondition( ! is_empty());
-  return FT( squared_outer_radius_numerator()) /
-    FT( squared_radii_denominator()); }
-    
-  // predicates
-  CGAL::Bounded_side
-  bounded_side( const Point& p) const
-  { CGAL_optimisation_precondition(
-				   is_empty() || tco.access_dimension_d_object()( p) == d);
-  ET sqr_d = sqr_dist( p);
-  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
-  return CGAL::Bounded_side
-    (CGAL_NTS sign( sqr_d - h_p_sqr * sqr_i_rad_numer)
-     * CGAL_NTS sign( h_p_sqr * sqr_o_rad_numer - sqr_d)); }
-    
-  bool
-  has_on_bounded_side( const Point& p) const
-  { CGAL_optimisation_precondition(
-				   is_empty() || tco.access_dimension_d_object()( p) == d);
-  ET sqr_d = sqr_dist( p);
-  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
-  return ( ( h_p_sqr * sqr_i_rad_numer < sqr_d) && 
-	   ( sqr_d < h_p_sqr * sqr_o_rad_numer)); }
-    
-  bool
-  has_on_boundary( const Point& p) const
-  { CGAL_optimisation_precondition(
-				   is_empty() || tco.access_dimension_d_object()( p) == d);
-  ET sqr_d = sqr_dist( p);
-  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
-  return (( sqr_d == h_p_sqr * sqr_i_rad_numer) || 
-	  ( sqr_d == h_p_sqr * sqr_o_rad_numer));}
-    
-  bool
-  has_on_unbounded_side( const Point& p) const
-  { CGAL_optimisation_precondition(
-				   is_empty() || tco.access_dimension_d_object()( p) == d);
-  ET sqr_d = sqr_dist( p);
-  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
-  return ( ( sqr_d < h_p_sqr * sqr_i_rad_numer) || 
-	   ( h_p_sqr * sqr_o_rad_numer < sqr_d)); }
-    
-  bool  is_empty     ( ) const { return number_of_points() == 0; }
-  bool  is_degenerate( ) const
-  { return ! CGAL_NTS is_positive( sqr_o_rad_numer); }
-    
-  // modifiers
-  template < class InputIterator >
-  void
-  set( InputIterator first, InputIterator last)
-  { if ( points.size() > 0) points.erase( points.begin(), points.end());
-  std::copy( first, last, std::back_inserter( points));
-  set_dimension();
-  CGAL_optimisation_precondition_msg( check_dimension(),
-				      "Not all points have the same dimension.");
-  compute_min_annulus(); }
-    
-  void
-  insert( const Point& p)
-  { if ( is_empty()) d = tco.access_dimension_d_object()( p);
-  CGAL_optimisation_precondition(
-				 tco.access_dimension_d_object()( p) == d);
-  points.push_back( p);
-  compute_min_annulus(); }
-    
-  template < class InputIterator >
-  void
-  insert( InputIterator first, InputIterator last)
-  { CGAL_optimisation_precondition_code( std::size_t old_n = points.size());
-  points.insert( points.end(), first, last);
-  set_dimension();
-  CGAL_optimisation_precondition_msg( check_dimension( old_n),
-				      "Not all points have the same dimension.");
-  compute_min_annulus(); }
-    
-  void
-  clear( )
-  { points.erase( points.begin(), points.end());
-  compute_min_annulus(); }
-    
-  // validity check
-  bool  is_valid( bool verbose = false, int level = 0) const;
-    
-  // traits class access
-  const Traits&  traits( ) const { return tco; }
-    
-
-private:
-    
-  Traits                   tco;       // traits class object
-  Access_coordinates_begin_d da_coord; // data accessor
-    
-  Point_vector             points;    // input points
-  int                      d;         // dimension of input points
-    
-  ET_vector                center_coords;     // center of small.encl.annulus
-    
-  ET                       sqr_i_rad_numer;   // squared inner radius of
-  ET                       sqr_o_rad_numer;   // ---"--- outer ----"----
-  ET                       sqr_rad_denom;     // smallest enclosing annulus
-    
-  Solver                   *solver;    // linear programming solver
-     
-  Index_vector             inner_indices;
-  Index_vector             outer_indices;
-    
-  NT_matrix                a_matrix;  // matrix `A' of dual LP
-  NT_vector                b_vector;  // vector `b' of dual LP
-  NT_vector                c_vector;  // vector `c' of dual LP
-    
-private:
-  // squared distance to center * h_p^2 * c_d^2 
-  ET sqr_dist_exact( const Point& p) const
-  {
-    ET result(0);
-    typename Access_coordinates_begin_d::Coordinate_iterator 
-      p_it (da_coord ( p));     // this is p * h_p
-    ET c_d = center_coords[d];
-    ET h_p = p_it[d];
-    for (int i=0; i<d; ++i) {
-      ET x = 
-	c_d * ET(p_it[i]) -      /* this is c_d *    p_i * h_p */
-	h_p * center_coords[i]   /* this is h_p *    c_i * c_d */ ;
-      result += x * x;
-    }
-    return result;
-  }
-
-  // the function above computes sqr_dist as ||p-c||^2 
-  // (endowed with a factor of c_d^2 * h_p^2)
-  // but we know that c was computed from (possibly slightly wrong)
-  // data if NT is inexact; in order to compensate for this, let
-  // us instead compute sqr_dist as p^Tp - 2c^Tp + c^Tc, where we use
-  // the (potentially wrong) values of p^Tp and p that went into the
-  // linear program; this will give us correct containment / on_boundary 
-  // checks also in the inexact-NT case.
-  ET sqr_dist( const Point& p) const
-  {
-    ET result(0), two(2);
-    NT pTp(0); // computed over input type, possibly slightly wrong
-    ET cTc(0); 
-    ET two_pTc(0);
-    typename Access_coordinates_begin_d::Coordinate_iterator 
-      p_it (da_coord ( p));     // this is p * h_p
-    NT h_p = p_it[d]; // input type!
-    for (int i=0; i<d; ++i) {
-      NT p_i (p_it[i]);  // input type!
-      pTp += p_i * p_i;  // p_i^2 * h_p^2 
-      cTc += center_coords[i] * center_coords[i]; // c_i^2 * c_d^2
-      two_pTc += 
-	// 2 * c_i * c_d * p_i * h_p^2  
-	2 * center_coords[i] * ET(h_p * p_i); 
-    } 
-    ET c_d = center_coords[d];
-    result = 
-      ET(pTp) * c_d * c_d +      
-      cTc * ET (h_p * h_p) +
-      - two_pTc * c_d;
-    return result;
-  }
-    
-  // set dimension of input points
-  void
-  set_dimension( )
-  { d = ( points.size() == 0 ? -1 :
-	  tco.access_dimension_d_object()( points[ 0])); }
-    
-  // check dimension of input points
-  bool
-  check_dimension( std::size_t  offset = 0)
-  { return ( std::find_if( points.begin()+offset, points.end(),
-			   CGAL::compose1_1( std::bind2nd(
-							  std::not_equal_to<int>(), d),
-					     tco.access_dimension_d_object()))
-	     == points.end()); }
-    
-  // compute smallest enclosing annulus
-  void
-  compute_min_annulus( )
-  {
-    // clear inner and outer support points
-    inner_indices.erase( inner_indices.begin(), inner_indices.end());
-    outer_indices.erase( outer_indices.begin(), outer_indices.end());
-    
-    if ( is_empty()) {
-      center_coords.resize( 1);
-      sqr_i_rad_numer = -ET( 1);
-      sqr_o_rad_numer = -ET( 1);
-      return;
-    }
-    
-    if ( number_of_points() == 1) {
-      inner_indices.push_back( 0);
-      outer_indices.push_back( 0);
-      center_coords.resize( d+1);
-      std::copy( da_coord( points[ 0]),
-		 da_coord( points[ 0])+d+1,
-		 center_coords.begin());
-      sqr_i_rad_numer = ET( 0);
-      sqr_o_rad_numer = ET( 0);
-      sqr_rad_denom   = ET( 1);
-      return;
-    }
-    
-    // set up vector c and solve dual LP
-    // the ordering of the constraints is as above; the ordering
-    // of the variables is: z_p_j <-> 2 * j, y_p_j <-> 2 * j + 1 
-    c_vector.resize( 2*points.size());
-    for ( int j = 0; j < number_of_points(); ++j) {
-      typename Traits::Access_coordinates_begin_d::Coordinate_iterator
-	coord_it = da_coord( points[j]);
-      NT  sum = 0;
-      for ( int i = 0; i < d; ++i) {
-	sum += NT( coord_it[ i])*NT( coord_it[ i]);
-      }
-      c_vector[ 2*j  ] =  sum;
-      c_vector[ 2*j+1] = -sum;
-    }
-        
-    LP lp (2*static_cast<int>(points.size()), d+2, 
-	   A_iterator ( boost::counting_iterator<int>(0), 
-			A_matrix (d, da_coord, points.begin())),
-	   B_iterator ( boost::counting_iterator<int>(0), 
-			B_vector (d)), 
-	   R_iterator (CGAL::EQUAL), 
-	   c_vector.begin());
-    
-    Quadratic_program_options options;
-    options.set_pricing_strategy(pricing_strategy(NT()));
-    delete solver;
-    solver = new Solver(lp, options);
-    CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL);
- 
-    // compute center and squared radius
-    ET sqr_sum = 0;
-    center_coords.resize( ambient_dimension()+1);
-    for ( int i = 0; i < d; ++i) {
-      center_coords[ i] = -solver->dual_variable( i);
-      sqr_sum += center_coords[ i] * center_coords[ i];
-    }
-    center_coords[ d] = solver->variables_common_denominator();
-    sqr_i_rad_numer = sqr_sum
-      - solver->dual_variable( d  )*center_coords[ d];
-    sqr_o_rad_numer = sqr_sum
-      - solver->dual_variable( d+1)*center_coords[ d];
-    sqr_rad_denom   = center_coords[ d] * center_coords[ d];
-        
-    // split up support points
-    for ( int i = 0; i < solver->number_of_basic_original_variables(); ++i) {
-      int index = solver->basic_original_variable_indices_begin()[ i];
-      if ( index % 2 == 0) {
-	inner_indices.push_back( index/2);
-      } else {
-	outer_indices.push_back( index/2);
-      }
-    }
-  }
-  
-  template < class NT >
-  Quadratic_program_pricing_strategy pricing_strategy( NT) {
-    return QP_PARTIAL_FILTERED_DANTZIG;
-  }
-  
-  Quadratic_program_pricing_strategy pricing_strategy( ET) {
-    return QP_PARTIAL_DANTZIG;
-  }
- 
-    
-};
-
-// Function declarations
-// =====================
-// I/O operators
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os, const Min_annulus_d<Traits_>& min_annulus);
-
-template < class Traits_ >
-std::istream&
-operator >> ( std::istream& is,       Min_annulus_d<Traits_>& min_annulus);
-
-// ============================================================================
-
-// Class implementation
-// ====================
-
-// validity check
-template < class Traits_ >
-bool
-Min_annulus_d<Traits_>::
-is_valid( bool verbose, int level) const
-{
-  using namespace std;
-
-  CGAL::Verbose_ostream verr( verbose);
-  verr << "CGAL::Min_annulus_d<Traits>::" << endl;
-  verr << "is_valid( true, " << level << "):" << endl;
-  verr << "  |P| = " << number_of_points()
-       << ", |S| = " << number_of_support_points() << endl;
-
-  // containment check (a)
-  // ---------------------
-  verr << "  (a) containment check..." << flush;
-    
-  Point_iterator  point_it = points_begin();
-  for ( ; point_it != points_end(); ++point_it) {
-    if ( has_on_unbounded_side( *point_it))
-      return CGAL::_optimisation_is_valid_fail( verr,
-						"annulus does not contain all points");
-  }
-    
-  verr << "passed." << endl;
-
-  // support set check (b)
-  // ---------------------
-  verr << "  (b) support set check..." << flush;
-    
-  // all inner support points on inner boundary?
-  Inner_support_point_iterator  i_pt_it = inner_support_points_begin();
-  for ( ; i_pt_it != inner_support_points_end(); ++i_pt_it) {
-    ET h_p_sqr = da_coord (*i_pt_it)[d] * da_coord (*i_pt_it)[d];
-    if ( sqr_dist( *i_pt_it) != h_p_sqr * sqr_i_rad_numer)
-      return CGAL::_optimisation_is_valid_fail( verr,
-						"annulus does not have all inner support points on its inner boundary");
-  }
-    
-  // all outer support points on outer boundary?
-  Outer_support_point_iterator  o_pt_it = outer_support_points_begin();
-  for ( ; o_pt_it != outer_support_points_end(); ++o_pt_it) {
-    ET h_p_sqr = da_coord (*o_pt_it)[d] * da_coord (*o_pt_it)[d];
-    if ( sqr_dist( *o_pt_it) != h_p_sqr * sqr_o_rad_numer)
-      return CGAL::_optimisation_is_valid_fail( verr,
-						"annulus does not have all outer support points on its outer boundary");
-  }
-  /*
-  // center strictly in convex hull of support points?
-  typename Solver::Basic_variable_numerator_iterator
-  num_it = solver.basic_variables_numerator_begin();
-  for ( ; num_it != solver.basic_variables_numerator_end(); ++num_it) {
-  if ( ! (    CGAL_NTS is_positive( *num_it)
-  && *num_it <= solver.variables_common_denominator()))
-  return CGAL::_optimisation_is_valid_fail( verr,
-  "center does not lie strictly in convex hull of support points");
-  }
-  */
-    
-  verr << "passed." << endl;
-
-  verr << "  object is valid!" << endl;
-  return( true);
-}
-
-// output operator
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os,
-              const Min_annulus_d<Traits_>& min_annulus)
-{
-  using namespace std;
-
-  typedef  typename Min_annulus_d<Traits_>::Point  Point;
-  typedef  ostream_iterator<Point>       Os_it;
-  typedef  typename Traits_::ET          ET;
-  typedef  ostream_iterator<ET>          Et_it;
-
-  switch ( CGAL::get_mode( os)) {
-
-  case CGAL::IO::PRETTY:
-    os << "CGAL::Min_annulus_d( |P| = "
-       << min_annulus.number_of_points() << ", |S| = "
-       << min_annulus.number_of_inner_support_points() << '+'
-       << min_annulus.number_of_outer_support_points() << endl;
-    os << "  P = {" << endl;
-    os << "    ";
-    copy( min_annulus.points_begin(), min_annulus.points_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  S_i = {" << endl;
-    os << "    ";
-    copy( min_annulus.inner_support_points_begin(),
-	  min_annulus.inner_support_points_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  S_o = {" << endl;
-    os << "    ";
-    copy( min_annulus.outer_support_points_begin(),
-	  min_annulus.outer_support_points_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  center = ( ";
-    copy( min_annulus.center_coordinates_begin(),
-	  min_annulus.center_coordinates_end(),
-	  Et_it( os, " "));
-    os << ")" << endl;
-    os << "  squared inner radius = "
-       << min_annulus.squared_inner_radius_numerator() << " / "
-       << min_annulus.squared_radii_denominator() << endl;
-    os << "  squared outer radius = "
-       << min_annulus.squared_outer_radius_numerator() << " / "
-       << min_annulus.squared_radii_denominator() << endl;
-    break;
-
-  case CGAL::IO::ASCII:
-    copy( min_annulus.points_begin(), min_annulus.points_end(),
-	  Os_it( os, "\n"));
-    break;
-
-  case CGAL::IO::BINARY:
-    copy( min_annulus.points_begin(), min_annulus.points_end(),
-	  Os_it( os));
-    break;
-
-  default:
-    CGAL_optimisation_assertion_msg( false,
-				     "CGAL::get_mode( os) invalid!");
-    break; }
-
-  return( os);
-}
-
-// input operator
-template < class Traits_ >
-std::istream&
-operator >> ( std::istream& is, CGAL::Min_annulus_d<Traits_>& min_annulus)
-{
-  using namespace std;
-
-  switch ( CGAL::get_mode( is)) {
-
-  case CGAL::IO::PRETTY:
-    cerr << endl;
-    cerr << "Stream must be in ascii or binary mode" << endl;
-    break;
-
-  case CGAL::IO::ASCII:
-  case CGAL::IO::BINARY:
-    typedef  typename CGAL::Min_annulus_d<Traits_>::Point  Point;
-    typedef  istream_iterator<Point>             Is_it;
-    min_annulus.set( Is_it( is), Is_it());
-    break;
-
-  default:
-    CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!");
-    break; }
-
-  return( is);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_MIN_ANNULUS_D_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2.h
deleted file mode 100644
index 8563179..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2.h
+++ /dev/null
@@ -1,589 +0,0 @@
-// Copyright (c) 1997-2001  
-// ETH Zurich (Switzerland).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
-
-#ifndef CGAL_MIN_CIRCLE_2_H
-#define CGAL_MIN_CIRCLE_2_H
-
-// includes
-#  include <CGAL/Optimisation/basic.h>
-#  include <CGAL/Random.h>
-#  include <list>
-#  include <vector>
-#  include <algorithm>
-#  include <iostream>
-
-namespace CGAL {
-
-// Class declaration
-// =================
-template < class Traits_ >
-class Min_circle_2;
-
-// Class interface
-// ===============
-template < class Traits_ >
-class Min_circle_2 {
-  public:
-    // types
-    typedef           Traits_                           Traits;
-    typedef typename  Traits_::Point                    Point;
-    typedef typename  Traits_::Circle                   Circle;
-    typedef typename  std::list<Point>::const_iterator  Point_iterator;
-    typedef           const Point *                     Support_point_iterator;
-    
-    /**************************************************************************
-    WORKAROUND: Some compilers are unable to match member functions defined
-    outside the class template. Therefore, all member functions are implemented
-    in the class interface.
-    
-    // creation
-    template < class InputIterator >
-    Min_circle_2( InputIterator first,
-                  InputIterator last,
-                  bool          randomize = false,
-                  Random&       random    = default_random,
-                  const Traits& traits    = Traits());
-    
-    Min_circle_2( const Traits& traits = Traits());
-    Min_circle_2( const Point&  p,
-                  const Traits& traits = Traits());
-    Min_circle_2( Point  p, Point  q,
-                  const Traits& traits = Traits());
-    Min_circle_2( const Point&  p1, const Point&  p2, const Point&  p3,
-                  const Traits& traits = Traits());
-    ~Min_circle_2( );
-    
-    // access functions
-    int  number_of_points        ( ) const;
-    int  number_of_support_points( ) const;
-    
-    Point_iterator  points_begin( ) const;
-    Point_iterator  points_end  ( ) const;
-    
-    Support_point_iterator  support_points_begin( ) const;
-    Support_point_iterator  support_points_end  ( ) const;
-    
-    const Point&  support_point( int i) const;
-    
-    const Circle&  circle( ) const;
-    
-    // predicates
-    Bounded_side  bounded_side( const Point& p) const;
-    bool  has_on_bounded_side      ( const Point& p) const;
-    bool  has_on_boundary          ( const Point& p) const;
-    bool  has_on_unbounded_side    ( const Point& p) const;
-    
-    bool  is_empty     ( ) const;
-    bool  is_degenerate( ) const;
-    
-    // modifiers
-    void  insert( const Point& p);
-    void  insert( const Point* first,
-                  const Point* last );
-    void  insert( std::list<Point>::const_iterator first,
-                  std::list<Point>::const_iterator last );
-    void  insert( std::istream_iterator<Point,std::ptrdiff_t> first,
-                  std::istream_iterator<Point,std::ptrdiff_t> last );
-    void  clear( );
-    
-    // validity check
-    bool  is_valid( bool verbose = false, int level = 0) const;
-    
-    // miscellaneous
-    const Traits&  traits( ) const;
-    **************************************************************************/
-
-  private:
-    // private data members
-    Traits       tco;                           // traits class object
-    std::list<Point>  points;                   // doubly linked list of points
-  std::size_t         n_support_points;              // number of support points
-    Point*       support_points;                // array of support points
-    
-
-    // copying and assignment not allowed!
-    Min_circle_2( const Min_circle_2<Traits_>&);
-    Min_circle_2<Traits_>&
-        operator = ( const Min_circle_2<Traits_>&);
-
-// ============================================================================
-
-// Class implementation
-// ====================
-
-  public:
-    // Access functions and predicates
-    // -------------------------------
-    // #points and #support points
-    inline
-    std::size_t
-    number_of_points( ) const
-    {
-        return( points.size());
-    }
-    
-    inline
-    std::size_t
-    number_of_support_points( ) const
-    {
-        return( n_support_points);
-    }
-
-    // is_... predicates
-    inline
-    bool
-    is_empty( ) const
-    {
-        return( number_of_support_points() == 0);
-    }
-    
-    inline
-    bool
-    is_degenerate( ) const
-    {
-        return( number_of_support_points() <  2);
-    }
-
-    // access to points and support points
-    inline
-    Point_iterator
-    points_begin( ) const
-    {
-        return( points.begin());
-    }
-    
-    inline
-    Point_iterator
-    points_end( ) const
-    {
-        return( points.end());
-    }
-    
-    inline
-    Support_point_iterator
-    support_points_begin( ) const
-    {
-        return( support_points);
-    }
-    
-    inline
-    Support_point_iterator
-    support_points_end( ) const
-    {
-        return( support_points+n_support_points);
-    }
-    
-    // random access for support points
-    inline
-    const Point&
-    support_point( std::size_t i) const
-    {
-        CGAL_optimisation_precondition(i <  number_of_support_points());
-        return( support_points[ i]);
-    }
-    // circle
-    inline
-    const Circle&
-    circle( ) const
-    {
-        return( tco.circle);
-    }
-    
-
-    // in-circle test predicates
-    inline
-    CGAL::Bounded_side
-    bounded_side( const Point& p) const
-    {
-        return( tco.circle.bounded_side( p));
-    }
-    
-    inline
-    bool
-    has_on_bounded_side( const Point& p) const
-    {
-        return( tco.circle.has_on_bounded_side( p));
-    }
-    
-    inline
-    bool
-    has_on_boundary( const Point& p) const
-    {
-        return( tco.circle.has_on_boundary( p));
-    }
-    
-    inline
-    bool
-    has_on_unbounded_side( const Point& p) const
-    {
-        return( tco.circle.has_on_unbounded_side( p));
-    }
-
-  private:
-    // Private member functions
-    // ------------------------
-    // compute_circle
-    inline
-    void
-    compute_circle( )
-    {
-        switch ( n_support_points) {
-          case 3:
-            tco.circle.set( support_points[ 0],
-                            support_points[ 1],
-                            support_points[ 2]);
-            break;
-          case 2:
-            tco.circle.set( support_points[ 0], support_points[ 1]);
-            break;
-          case 1:
-            tco.circle.set( support_points[ 0]);
-            break;
-          case 0:
-            tco.circle.set( );
-            break;
-          default:
-            CGAL_optimisation_assertion( n_support_points <= 3 ); }
-    }
-
-    void
-    mc( const Point_iterator& last, std::size_t n_sp)
-    {
-        // compute circle through support points
-        n_support_points = n_sp;
-        compute_circle();
-        if ( n_sp == 3) return;
-    
-        // test first n points
-        typename std::list<Point>::iterator  point_iter = points.begin();
-        for ( ; last != point_iter; ) {
-            const Point& p = *point_iter;
-    
-            // p not in current circle?
-            if ( has_on_unbounded_side( p)) {
-    
-                // recursive call with p as additional support point
-                support_points[ n_sp] = p;
-                mc( point_iter, n_sp+1);
-    
-                // move current point to front
-                points.splice( points.begin(), points, point_iter++); }
-    
-            else
-                ++point_iter; }
-    }
-
-  public:
-    // Constructors
-    // ------------
-    // STL-like constructor (member template)
-    template < class InputIterator >
-    Min_circle_2( InputIterator first,
-                  InputIterator last,
-                  bool          randomize
-    #if !defined(_MSC_VER) || _MSC_VER > 1300
-                                              = false
-    #endif
-                                                     ,
-                      Random&       random    = default_random,
-                      const Traits& traits    = Traits())
-            : tco( traits)
-        {
-            // allocate support points' array
-            support_points = new Point[ 3];
-    
-            // range of points not empty?
-            if ( first != last) {
-    
-                // store points
-                if ( randomize) {
-    
-                    // shuffle points at random
-                    std::vector<Point> v( first, last);
-                    std::random_shuffle( v.begin(), v.end(), random);
-                    std::copy( v.begin(), v.end(),
-                               std::back_inserter( points)); }
-                else
-                    std::copy( first, last, std::back_inserter( points)); }
-    
-            // compute mc
-            mc( points.end(), 0);
-        }
-    
-    // default constructor
-    inline
-    Min_circle_2( const Traits& traits = Traits())
-        : tco( traits), n_support_points( 0)
-    {
-        // allocate support points' array
-        support_points = new Point[ 3];
-    
-        // initialize circle
-        tco.circle.set();
-    
-        CGAL_optimisation_postcondition( is_empty());
-    }
-    
-    // constructor for one point
-    inline
-    Min_circle_2( const Point& p, const Traits& traits = Traits())
-        : tco( traits), points( 1, p), n_support_points( 1)
-    {
-        // allocate support points' array
-        support_points = new Point[ 3];
-    
-        // initialize circle
-        support_points[ 0] = p;
-        tco.circle.set( p);
-    
-        CGAL_optimisation_postcondition( is_degenerate());
-    }
-    
-    // constructor for two points
-    // This was const Point& but then Intel 7.0/.net2003 messes it up 
-    // with the constructor taking an iterator range
-    inline
-    Min_circle_2( Point p1, Point p2,
-                  const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 3];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-    
-        // compute mc
-        mc( points.end(), 0);
-    }
-    
-    // constructor for three points
-    inline
-    Min_circle_2( const Point& p1, const Point& p2, const Point& p3,
-                  const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 3];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-        points.push_back( p3);
-    
-        // compute mc
-        mc( points.end(), 0);
-    }
-    
-
-    // Destructor
-    // ----------
-    inline
-    ~Min_circle_2( )
-    {
-        // free support points' array
-        delete[] support_points;
-    }
-
-    // Modifiers
-    // ---------
-    void
-    insert( const Point& p)
-    {
-        // p not in current circle?
-        if ( has_on_unbounded_side( p)) {
-    
-            // p new support point
-            support_points[ 0] = p;
-    
-            // recompute mc
-            mc( points.end(), 1);
-    
-            // store p as the first point in list
-            points.push_front( p); }
-        else
-    
-            // append p to the end of the list
-            points.push_back( p);
-    }
-    
-        template < class InputIterator >
-        void
-        insert( InputIterator first, InputIterator last)
-        {
-            for ( ; first != last; ++first)
-                insert( *first);
-        }
-    
-    void
-    clear( )
-    {
-        points.erase( points.begin(), points.end());
-        n_support_points = 0;
-        tco.circle.set();
-    }
-    
-
-    // Validity check
-    // --------------
-    bool
-    is_valid( bool verbose = false, int level = 0) const
-    {
-        using namespace std;
-    
-        CGAL::Verbose_ostream verr( verbose);
-        verr << endl;
-        verr << "CGAL::Min_circle_2<Traits>::" << endl;
-        verr << "is_valid( true, " << level << "):" << endl;
-        verr << "  |P| = " << number_of_points()
-             << ", |S| = " << number_of_support_points() << endl;
-    
-        // containment check (a)
-        verr << "  a) containment check..." << flush;
-        Point_iterator point_iter;
-        for ( point_iter  = points_begin();
-              point_iter != points_end();
-              ++point_iter)
-            if ( has_on_unbounded_side( *point_iter))
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "circle does not contain all points"));
-        verr << "passed." << endl;
-    
-        // support set checks (b)+(c)
-        verr << "  b)+c) support set checks..." << flush;
-        switch( number_of_support_points()) {
-        
-          case 0:
-            if ( ! is_empty())
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "P is nonempty, \
-                             but there are no support points."));
-            break;
-        
-          case 1:
-            if ( ( circle().center() != support_point( 0)    ) ||
-                 ( ! CGAL_NTS is_zero( circle().squared_radius())) )
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "circle differs from the circle \
-                             spanned by its single support point."));
-            break;
-        
-          case 2: {
-            const Point& p = support_point( 0),
-                         q = support_point( 1);
-            
-            // p equals q?
-            if ( p == q)
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "the two support points are equal."));
-            
-            // segment(p,q) is not diameter?
-            if ( ( ! has_on_boundary( p)                                ) ||
-                 ( ! has_on_boundary( q)                                ) ||
-                 ( tco.orientation( p, q,
-                                    circle().center()) != CGAL::COLLINEAR) )
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "circle does not have its \
-                             two support points as diameter.")); }
-            break;
-        
-          case 3: {
-            const Point& p = support_point( 0),
-                         q = support_point( 1),
-                         r = support_point( 2);
-            
-            // p, q, r not pairwise distinct?
-            if ( ( p == q) || ( q == r) || ( r == p))
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "at least two of the three \
-                             support points are equal."));
-            
-            // p, q, r collinear?
-            if ( tco.orientation( p, q, r) == CGAL::COLLINEAR)
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "the three support points are collinear."));
-            
-            // current circle not equal the unique circle through p,q,r ?
-            Circle c = circle();
-            c.set( p, q, r);
-            if ( circle() != c)
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "circle is not the unique circle \
-                             through its three support points."));
-            
-            // circle's center on boundary of triangle(p,q,r)?
-            const Point& center = circle().center();
-            CGAL::Orientation o_pqz = tco.orientation( p, q, center);
-            CGAL::Orientation o_qrz = tco.orientation( q, r, center);
-            CGAL::Orientation o_rpz = tco.orientation( r, p, center);
-            if ( ( o_pqz == CGAL::COLLINEAR) ||
-                 ( o_qrz == CGAL::COLLINEAR) ||
-                 ( o_rpz == CGAL::COLLINEAR) )
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "one of the three support points is redundant."));
-            
-            // circle's center not inside triangle(p,q,r)?
-            if ( ( o_pqz != o_qrz) || ( o_qrz != o_rpz) || ( o_rpz != o_pqz))
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "circle's center is not in the \
-                             convex hull of its three support points.")); }
-            break;
-        
-          default:
-            return( CGAL::_optimisation_is_valid_fail( verr,
-                        "illegal number of support points, \
-                         not between 0 and 3."));
-        };
-        verr << "passed." << endl;
-    
-        verr << "  object is valid!" << endl;
-        return( true);
-    }
-
-    // Miscellaneous
-    // -------------
-    inline
-    const Traits&
-    traits( ) const
-    {
-        return( tco);
-    }
-};
-
-// Function declarations
-// =====================
-// I/O
-// ---
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os, const Min_circle_2<Traits_>& mc);
-
-template < class Traits_ >
-std::istream&
-operator >> ( std::istream& is,       Min_circle_2<Traits_>& mc);
-
-} //namespace CGAL
-
-#include <CGAL/Min_circle_2/Min_circle_2_impl.h>
-
-#endif // CGAL_MIN_CIRCLE_2_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2.h b/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2.h
deleted file mode 100644
index 274ab47..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2.h
+++ /dev/null
@@ -1,584 +0,0 @@
-// Copyright (c) 1997-2001  
-// ETH Zurich (Switzerland).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
-
-#ifndef CGAL_MIN_ELLIPSE_2_H
-#define CGAL_MIN_ELLIPSE_2_H
-
-#include <CGAL/Optimisation/basic.h>
-#include <CGAL/Random.h>
-#include <list>
-#include <vector>
-#include <algorithm>
-#include <iostream>
-
-namespace CGAL {
-
-// Class declaration
-// =================
-template < class Traits_ >
-class Min_ellipse_2;
-
-// Class interface
-// ===============
-template < class Traits_ >
-class Min_ellipse_2 {
-  public:
-    // types
-    typedef           Traits_                           Traits;
-    typedef typename  Traits_::Point                    Point;
-    typedef typename  Traits_::Ellipse                  Ellipse;
-    typedef typename  std::list<Point>::const_iterator  Point_iterator;
-    typedef           const Point *                     Support_point_iterator;
-    
-    /**************************************************************************
-    WORKAROUND: Some compilers are unable to match member functions defined
-    outside the class template. Therefore, all member functions are implemented
-    in the class interface.
-    
-    // creation
-    template < class InputIterator >
-    Min_ellipse_2( InputIterator first,
-                   InputIterator last,
-                   bool          randomize = false,
-                   Random&       random    = default_random,
-                   const Traits& traits    = Traits());
-    
-    Min_ellipse_2( const Traits& traits = Traits());
-    Min_ellipse_2( const Point&  p,
-                   const Traits& traits = Traits());
-    Min_ellipse_2( Point  p,
-                   Point  q,
-                   const Traits& traits = Traits());
-    Min_ellipse_2( const Point&  p1,
-                   const Point&  p2,
-                   const Point&  p3,
-                   const Traits& traits = Traits());
-    Min_ellipse_2( const Point&  p1,
-                   const Point&  p2,
-                   const Point&  p3,
-                   const Point&  p4,
-                   const Traits& traits = Traits());
-    Min_ellipse_2( const Point&  p1,
-                   const Point&  p2,
-                   const Point&  p3,
-                   const Point&  p4,
-                   const Point&  p5,
-                   const Traits& traits = Traits());
-    ~Min_ellipse_2( );
-    
-    // access functions
-    int  number_of_points        ( ) const;
-    int  number_of_support_points( ) const;
-    
-    Point_iterator  points_begin( ) const;
-    Point_iterator  points_end  ( ) const;
-    
-    Support_point_iterator  support_points_begin( ) const;
-    Support_point_iterator  support_points_end  ( ) const;
-    
-    const Point&  support_point( int i) const;
-    
-    const Ellipse&  ellipse( ) const;
-    
-    // predicates
-    CGAL::Bounded_side  bounded_side( const Point& p) const;
-    bool  has_on_bounded_side      ( const Point& p) const;
-    bool  has_on_boundary          ( const Point& p) const;
-    bool  has_on_unbounded_side    ( const Point& p) const;
-    
-    bool  is_empty     ( ) const;
-    bool  is_degenerate( ) const;
-    
-    // modifiers
-    void  insert( const Point& p);
-    void  insert( const Point* first,
-                  const Point* last );
-    void  insert( std::list<Point>::const_iterator first,
-                  std::list<Point>::const_iterator last );
-    void  insert( std::istream_iterator<Point,std::ptrdiff_t> first,
-                  std::istream_iterator<Point,std::ptrdiff_t> last );
-    void  clear( );
-    
-    // validity check
-    bool  is_valid( bool verbose = false, int level = 0) const;
-    
-    // miscellaneous
-    const Traits&  traits( ) const;
-    **************************************************************************/
-
-  private:
-    // private data members
-    Traits       tco;                           // traits class object
-    std::list<Point>  points;                   // doubly linked list of points
-    int          n_support_points;              // number of support points
-    Point*       support_points;                // array of support points
-    
-
-    // copying and assignment not allowed!
-    Min_ellipse_2( const Min_ellipse_2<Traits_>&);
-    Min_ellipse_2<Traits_>& operator = ( const Min_ellipse_2<Traits_>&);
-
-// ============================================================================
-
-// Class implementation
-// ====================
-
-  public:
-    // Access functions and predicates
-    // -------------------------------
-    // #points and #support points
-    inline
-    std::size_t
-    number_of_points( ) const
-    {
-        return( points.size());
-    }
-    
-    inline
-    std::size_t
-    number_of_support_points( ) const
-    {
-        return( n_support_points);
-    }
-
-    // is_... predicates
-    inline
-    bool
-    is_empty( ) const
-    {
-        return( number_of_support_points() == 0);
-    }
-    
-    inline
-    bool
-    is_degenerate( ) const
-    {
-        return( number_of_support_points() <  3);
-    }
-
-    // access to points and support points
-    inline
-    Point_iterator
-    points_begin( ) const
-    {
-        return( points.begin());
-    }
-    
-    inline
-    Point_iterator
-    points_end( ) const
-    {
-        return( points.end());
-    }
-    
-    inline
-    Support_point_iterator
-    support_points_begin( ) const
-    {
-        return( support_points);
-    }
-    
-    inline
-    Support_point_iterator
-    support_points_end( ) const
-    {
-        return( support_points+n_support_points);
-    }
-    
-    // random access for support points
-    inline
-    const Point&
-    support_point( std::size_t i) const
-    {
-        CGAL_optimisation_precondition(i <  number_of_support_points());
-        return( support_points[ i]);
-    }
-    // ellipse
-    inline
-    const Ellipse&
-    ellipse( ) const
-    {
-        return( tco.ellipse);
-    }
-    
-
-    // in-ellipse test predicates
-    inline
-    CGAL::Bounded_side
-    bounded_side( const Point& p) const
-    {
-        return( tco.ellipse.bounded_side( p));
-    }
-    
-    inline
-    bool
-    has_on_bounded_side( const Point& p) const
-    {
-        return( tco.ellipse.has_on_bounded_side( p));
-    }
-    
-    inline
-    bool
-    has_on_boundary( const Point& p) const
-    {
-        return( tco.ellipse.has_on_boundary( p));
-    }
-    
-    inline
-    bool
-    has_on_unbounded_side( const Point& p) const
-    {
-        return( tco.ellipse.has_on_unbounded_side( p));
-    }
-
-  private:
-    // Private member functions
-    // ------------------------
-    // compute_ellipse
-    inline
-    void
-    compute_ellipse( )
-    {
-        switch ( n_support_points) {
-          case 5:
-            tco.ellipse.set( support_points[ 0],
-                             support_points[ 1],
-                             support_points[ 2],
-                             support_points[ 3],
-                             support_points[ 4]);
-            break;
-          case 4:
-            tco.ellipse.set( support_points[ 0],
-                             support_points[ 1],
-                             support_points[ 2],
-                             support_points[ 3]);
-            break;
-          case 3:
-            tco.ellipse.set( support_points[ 0],
-                             support_points[ 1],
-                             support_points[ 2]);
-            break;
-          case 2:
-            tco.ellipse.set( support_points[ 0], support_points[ 1]);
-            break;
-          case 1:
-            tco.ellipse.set( support_points[ 0]);
-            break;
-          case 0:
-            tco.ellipse.set( );
-            break;
-          default:
-            CGAL_optimisation_assertion( ( n_support_points >= 0) &&
-                                         ( n_support_points <= 5) ); }
-    }
-
-    void
-    me( const Point_iterator& last, int n_sp)
-    {
-        // compute ellipse through support points
-        n_support_points = n_sp;
-        compute_ellipse();
-        if ( n_sp == 5) return;
-    
-        // test first n points
-        typename std::list<Point>::iterator  point_iter = points.begin();
-        for ( ; last != point_iter; ) {
-            const Point& p = *point_iter;
-    
-            // p not in current ellipse?
-            if ( has_on_unbounded_side( p)) {
-    
-                // recursive call with p as additional support point
-                support_points[ n_sp] = p;
-                me( point_iter, n_sp+1);
-    
-                // move current point to front
-                points.splice( points.begin(), points, point_iter++); }
-    
-            else
-                ++point_iter; }
-    }
-
-  public:
-    // Constructors
-    // ------------
-    // STL-like constructor (member template)
-    template < class InputIterator >
-    Min_ellipse_2( InputIterator first,
-                   InputIterator last,
-                   bool          randomize
-    #if !defined(_MSC_VER) || _MSC_VER > 1300
-                                               = false
-    #endif
-                                                      ,
-                       Random&       random    = default_random,
-                       const Traits& traits    = Traits())
-            : tco( traits)
-        {
-            // allocate support points' array
-            support_points = new Point[ 5];
-    
-            // range of points not empty?
-            if ( first != last) {
-    
-                // store points
-                if ( randomize) {
-    
-                    // shuffle points at random
-                    std::vector<Point> v( first, last);
-                    std::random_shuffle( v.begin(), v.end(), random);
-                    std::copy( v.begin(), v.end(),
-                               std::back_inserter( points)); }
-                else
-                    std::copy( first, last, std::back_inserter( points)); }
-    
-            // compute me
-            me( points.end(), 0);
-        }
-    
-    // default constructor
-    inline
-    Min_ellipse_2( const Traits& traits = Traits())
-        : tco( traits), n_support_points( 0)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // initialize ellipse
-        tco.ellipse.set();
-    
-        CGAL_optimisation_postcondition( is_empty());
-    }
-    
-    // constructor for one point
-    inline
-    Min_ellipse_2( const Point& p, const Traits& traits = Traits())
-        : tco( traits), points( 1, p), n_support_points( 1)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // initialize ellipse
-        support_points[ 0] = p;
-        tco.ellipse.set( p);
-    
-        CGAL_optimisation_postcondition( is_degenerate());
-    }
-    
-    // constructor for two points
-    // This was const Point& but then Intel 7.0/.net2003 messes it up 
-    // with the constructor taking an iterator range
-    inline
-    Min_ellipse_2( Point p1, Point p2,
-                   const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-    
-        // compute me
-        me( points.end(), 0);
-    
-        CGAL_optimisation_postcondition( is_degenerate());
-    }
-    
-    // constructor for three points
-    inline
-    Min_ellipse_2( const Point& p1, const Point& p2, const Point& p3,
-                   const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-        points.push_back( p3);
-    
-        // compute me
-        me( points.end(), 0);
-    }
-    
-    // constructor for four points
-    inline
-    Min_ellipse_2( const Point& p1, const Point& p2,
-                   const Point& p3, const Point& p4,
-                   const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-        points.push_back( p3);
-        points.push_back( p4);
-    
-        // compute me
-        me( points.end(), 0);
-    }
-    
-    // constructor for five points
-    inline
-    Min_ellipse_2( const Point& p1, const Point& p2, const Point& p3,
-                   const Point& p4, const Point& p5,
-                   const Traits& traits = Traits())
-        : tco( traits)
-    {
-        // allocate support points' array
-        support_points = new Point[ 5];
-    
-        // store points
-        points.push_back( p1);
-        points.push_back( p2);
-        points.push_back( p3);
-        points.push_back( p4);
-        points.push_back( p5);
-    
-        // compute me
-        me( points.end(), 0);
-    }
-    
-
-    // Destructor
-    // ----------
-    inline
-    ~Min_ellipse_2( )
-    {
-        // free support points' array
-        delete[] support_points;
-    }
-
-    // Modifiers
-    // ---------
-    void
-    insert( const Point& p)
-    {
-        // p not in current ellipse?
-        if ( has_on_unbounded_side( p)) {
-    
-            // p new support point
-            support_points[ 0] = p;
-    
-            // recompute me
-            me( points.end(), 1);
-    
-            // store p as the first point in list
-            points.push_front( p); }
-        else
-    
-            // append p to the end of the list
-            points.push_back( p);
-    }
-        template < class InputIterator >
-        void
-        insert( InputIterator first, InputIterator last)
-        {
-            for ( ; first != last; ++first)
-                insert( *first);
-        }
-
-    void
-    clear( )
-    {
-        points.erase( points.begin(), points.end());
-        n_support_points = 0;
-        tco.ellipse.set();
-    }
-    
-
-    // Validity check
-    // --------------
-    bool
-    is_valid( bool verbose = false, int level = 0) const
-    {
-        using namespace std;
-    
-        CGAL::Verbose_ostream verr( verbose);
-        verr << endl;
-        verr << "CGAL::Min_ellipse_2<Traits>::" << endl;
-        verr << "is_valid( true, " << level << "):" << endl;
-        verr << "  |P| = " << number_of_points()
-             << ", |S| = " << number_of_support_points() << endl;
-    
-        // containment check (a)
-        verr << "  a) containment check..." << flush;
-        Point_iterator point_iter;
-        for ( point_iter  = points_begin();
-              point_iter != points_end();
-              ++point_iter)
-            if ( has_on_unbounded_side( *point_iter))
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "ellipse does not contain all points"));
-        verr << "passed." << endl;
-    
-        // support set checks (b)+(c) (not yet implemented)
-        
-        // alternative support set check
-        verr << "  +) support set check..." << flush;
-        Support_point_iterator support_point_iter;
-        for ( support_point_iter  = support_points_begin();
-              support_point_iter != support_points_end();
-              ++support_point_iter)
-            if ( ! has_on_boundary( *support_point_iter))
-                return( CGAL::_optimisation_is_valid_fail( verr,
-                            "ellipse does not have all \
-                             support points on the boundary"));
-        verr << "passed." << endl;
-    
-        verr << "  object is valid!" << endl;
-        return( true);
-    }
-
-    // Miscellaneous
-    // -------------
-    inline
-    const Traits&
-    traits( ) const
-    {
-        return( tco);
-    }
-};
-
-// Function declarations
-// =====================
-// I/O
-// ---
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os, const Min_ellipse_2<Traits_>& me);
-
-template < class Traits_ >
-std::istream&
-operator >> ( std::istream& is,       Min_ellipse_2<Traits_>& me);
-
-} //namespace CGAL
-
-#include <CGAL/Min_ellipse_2/Min_ellipse_2_impl.h>
-
-#endif // CGAL_MIN_ELLIPSE_2_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h b/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h
deleted file mode 100644
index 4dee149..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h
+++ /dev/null
@@ -1,448 +0,0 @@
-// Copyright (c) 1997-2001  
-// ETH Zurich (Switzerland).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
-
-#ifndef CGAL_OPTIMISATION_ELLIPSE_2_H
-#define CGAL_OPTIMISATION_ELLIPSE_2_H
-
-#include <CGAL/Conic_2.h>
-#include <CGAL/Optimisation/assertions.h>
-#include <CGAL/Kernel/global_functions_2.h>
-
-
-namespace CGAL {
-
-// Class interface
-// ===============
-template < class K_ >
-class Optimisation_ellipse_2 {
-    /*
-    friend  std::ostream&  operator << <> (
-        std::ostream&, const Optimisation_ellipse_2<K_>&);
-    friend  std::istream&  operator >> <> (
-        std::istream&, Optimisation_ellipse_2<K_> &);
-    */
-  public:
-    // types
-    typedef           K_                K;
-    typedef  typename K_::RT            RT;
-    typedef  typename K_::FT            FT;
-    typedef  typename K::Point_2        Point;
-    typedef  typename K::Conic_2        Conic;
-    
-    /**************************************************************************
-    WORKAROUND: Some compilers are unable to match member functions defined
-    outside the class template. Therefore, all member functions are implemented
-    in the class interface.
-    
-    // creation
-    Optimisation_ellipse_2( );
-    
-    void  set( );
-    void  set( const Point& p);
-    void  set( const Point& p,  const Point& q);
-    void  set( const Point& p1, const Point& p2, const Point& p3);
-    void  set( const Point& p1, const Point& p2,
-               const Point& p3, const Point& p4);
-    void  set( const Point& p1, const Point& p2,
-               const Point& p3, const Point& p4, const Point& p5);
-    
-    // access functions
-    int  number_of_boundary_points()
-    
-    // equality tests
-    bool  operator == ( const Optimisation_ellipse_2<K>& e) const;
-    bool  operator != ( const Optimisation_ellipse_2<K>& e) const;
-    
-    // predicates
-    CGAL::Bounded_side  bounded_side( const Point& p) const;
-    bool  has_on_bounded_side      ( const Point& p) const;
-    bool  has_on_boundary          ( const Point& p) const;
-    bool  has_on_unbounded_side    ( const Point& p) const;
-    
-    bool  is_empty     ( ) const;
-    bool  is_degenerate( ) const;
-    **************************************************************************/
-
-  /* private: */
-    // private data members
-    int    n_boundary_points;                   // number of boundary points
-    Point  boundary_point1, 
-           boundary_point2,
-           boundary_point3,
-           boundary_point4,
-           boundary_point5;                     // <= 5 support point 
-    Conic  conic1, conic2;                      // two conics 
-
-    // this gradient vector has dr=0 and is used in testing the
-    // position of a point relative to an ellipse through 4 points
-    mutable RT     dr, ds, dt, du, dv, dw;  
-    mutable bool   d_values_set; 
-    
-    // this gradient vector is just conic2 - conic1 and is used in
-    // obtaining an explicit conic representing an ellipse through 4 poinnts
-    mutable RT     er, es, et, eu, ev, ew;
-    mutable bool e_values_set;
-
-    // needed in bounded-side predicate over ellipse with 4 support points
-    mutable Conic helper_ellipse; // needed in bounded-side predicate over 
-    mutable bool helper_ellipse_set;
-
-    mutable Conic helper_conic; // also needed in bounded-side test
-
-// ============================================================================
-
-// Class implementation
-// ====================
-
-  public:
-    // Constructor
-    // -----------
-    inline
-    Optimisation_ellipse_2( ) { }
-
-    // Set functions
-    // -------------
-    void
-    set( )
-    {
-        n_boundary_points = 0;
-    }
-    
-    void
-    set( const Point& p)
-    {
-        n_boundary_points = 1;
-        boundary_point1   = p;
-    }
-    
-    void
-    set( const Point& p, const Point& q)
-    {
-        n_boundary_points = 2;
-        CGAL_optimisation_precondition(boundary_point1 == p);
-        boundary_point2 = q;
-    }
-    
-    void
-    set( const Point& p1, const Point& p2, const Point& p3)
-    {       
-        n_boundary_points = 3;        
-	CGAL_optimisation_precondition(boundary_point1 == p1);
-        CGAL_optimisation_precondition(boundary_point2 == p2);
-	boundary_point3 = p3;
-        helper_conic.set_ellipse( p1, p2, p3);
-	CGAL_optimisation_assertion(helper_conic.is_ellipse());
-    }
-    
-    void
-    set( const Point& p1, const Point& p2, const Point& p3, const Point& p4)
-    {
-        n_boundary_points = 4;	
-	CGAL_optimisation_precondition(boundary_point1 == p1);
-        CGAL_optimisation_precondition(boundary_point2 == p2);
-	CGAL_optimisation_precondition(boundary_point3 == p3);
-        boundary_point4 = p4;
-        Conic::set_two_linepairs( p1, p2, p3, p4, conic1, conic2);
-
-	d_values_set = false;
-	e_values_set = false;
-	helper_ellipse_set = false;	
-    }
-
-    void
-    set_d_values() const
-    {
-      if (!d_values_set) {
-        dr = RT( 0);
-        ds = conic1.r() * conic2.s() - conic2.r() * conic1.s(),
-        dt = conic1.r() * conic2.t() - conic2.r() * conic1.t(),
-        du = conic1.r() * conic2.u() - conic2.r() * conic1.u(),
-        dv = conic1.r() * conic2.v() - conic2.r() * conic1.v(),
-        dw = conic1.r() * conic2.w() - conic2.r() * conic1.w();
-	d_values_set = true;
-      }
-    }
-
-    void
-    set_e_values() const
-    {
-      if (!e_values_set) {
-       	er = conic2.r() - conic1.r();
-	es = conic2.s() - conic1.s();
-	et = conic2.t() - conic1.t();
-	eu = conic2.u() - conic1.u();
-	ev = conic2.v() - conic1.v();
-	ew = conic2.w() - conic1.w();
-	e_values_set = true;
-      }
-    }
-
-    void
-    set_helper_ellipse () const
-    {
-      if (!helper_ellipse_set) {
-        helper_ellipse.set_ellipse( conic1, conic2);
-        helper_ellipse.analyse();
-	CGAL_optimisation_assertion (helper_ellipse.is_ellipse());
-	helper_ellipse_set= true;
-      }
-    }
-
-    void
-    set( const Point& p1, const Point& p2,
-         const Point& p3, const Point& p4, const Point& p5)
-    { 
-        helper_conic.set(conic1, conic2, p5);
-	helper_conic.analyse();
-	// an optimization is possible if this set-call arose from
-	// a successful violation test of ME(p1,p2,p3,p4) and p5.
-	// In that case, helper_conic is already correct, 
-	// but in general, this optimization is NOT valid.
-	n_boundary_points = 5;
-	CGAL_optimisation_assertion(helper_conic.is_ellipse());	
-	// the following assertion is too strict if we run under
-	// double (which is sometimes the case, e.g. in demos)
-	// CGAL_optimisation_assertion(helper_conic.has_on_boundary(p5));
-	CGAL_optimisation_precondition(boundary_point1 == p1);
-        CGAL_optimisation_precondition(boundary_point2 == p2);
-	CGAL_optimisation_precondition(boundary_point3 == p3);
-        CGAL_optimisation_precondition(boundary_point4 == p4);
-	boundary_point5 = p5;
-    }
-
-    // Access functions
-    // ----------------
-    inline
-    int
-    number_of_boundary_points( ) const
-    {
-        return( n_boundary_points);
-    }
-    
-    template <typename DoubleConic_2>
-    void
-    double_conic(DoubleConic_2& e) const
-    {
-        double r,s,t,u,v,w;
-	double_coefficients(r,s,t,u,v,w);
-        e.set(r,s,t,u,v,w);
-	// NOTE: the set method calls analyze, so the conic is clean
-    }
-
-    void 
-    double_coefficients (double &r, double &s,double &t,
-                         double &u, double &v, double &w) const
-    {
-      // just like double_conic, but we only get the coefficients
-      CGAL_optimisation_precondition( ! is_degenerate());
-    
-      if ( n_boundary_points == 4) {
-        set_e_values();
-        double tau = conic1.vol_minimum( er, es, et, eu, ev, ew);
-	r = CGAL::to_double( conic1.r()) + tau*CGAL::to_double( er);
-	s = CGAL::to_double( conic1.s()) + tau*CGAL::to_double( es);
-	t = CGAL::to_double( conic1.t()) + tau*CGAL::to_double( et);
-	u = CGAL::to_double( conic1.u()) + tau*CGAL::to_double( eu);
-	v = CGAL::to_double( conic1.v()) + tau*CGAL::to_double( ev);
-	w = CGAL::to_double( conic1.w()) + tau*CGAL::to_double( ew);
-      } else {
-	// it's the helper_conic
-	r = CGAL::to_double(helper_conic.r());
-	s = CGAL::to_double(helper_conic.s());
-	t = CGAL::to_double(helper_conic.t());
-	u = CGAL::to_double(helper_conic.u());
-	v = CGAL::to_double(helper_conic.v());
-        w = CGAL::to_double(helper_conic.w());
-      }
-    }
-
-
-    // Equality tests
-    // --------------
-    bool
-    operator == ( const Optimisation_ellipse_2<K>& e) const
-    {
-        if ( n_boundary_points != e.n_boundary_points)
-            return( false);
-    
-        switch ( n_boundary_points) {
-          case 0:
-            return( true);
-          case 1:
-            return( boundary_point1 == e.boundary_point1);
-          case 2:
-            return(    (    ( boundary_point1 == e.boundary_point1)
-                         && ( boundary_point2 == e.boundary_point2))
-                    || (    ( boundary_point1 == e.boundary_point2)
-                         && ( boundary_point2 == e.boundary_point1)));
-          case 3:
-          case 5:
-            return( helper_conic == e.helper_conic);
-          case 4:
-            return(    (    ( conic1 == e.conic1)
-                         && ( conic2 == e.conic2))
-                    || (    ( conic1 == e.conic2)
-                         && ( conic2 == e.conic1)));
-          default:
-            CGAL_optimisation_assertion(    ( n_boundary_points >= 0)
-                                         && ( n_boundary_points <= 5)); }
-        // keeps g++ happy
-        return( false);
-    }
-    
-    inline
-    bool
-    operator != ( const Optimisation_ellipse_2<K>& e) const
-    {
-        return( ! operator == ( e));
-    }
-
-    // Predicates
-    // ----------
-    inline
-    CGAL::Bounded_side
-    bounded_side( const Point& p) const
-    {
-        switch ( n_boundary_points) {
-          case 0:
-            return( CGAL::ON_UNBOUNDED_SIDE);
-          case 1:
-            return( ( p == boundary_point1) ?
-                           CGAL::ON_BOUNDARY : CGAL::ON_UNBOUNDED_SIDE);
-          case 2:
-            return(    ( p == boundary_point1)
-                    || ( p == boundary_point2)
-                    || ( CGAL::are_ordered_along_line(
-                             boundary_point1, p, boundary_point2)) ?
-                         CGAL::ON_BOUNDARY : CGAL::ON_UNBOUNDED_SIDE);
-          case 3:
-          case 5:
-            return(helper_conic.convex_side( p));
-          case 4: {
-            helper_conic.set( conic1, conic2, p);
-            helper_conic.analyse();
-            if ( !helper_conic.is_ellipse()) {
-	        set_helper_ellipse();
-                return( helper_ellipse.convex_side( p)); }
-            else {
-	        set_d_values();
-                int tau_star = 
-                  helper_conic.vol_derivative( dr, ds, dt, du, dv, dw);
-                return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } }
-          default:
-            CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
-                                         ( n_boundary_points <= 5) ); }
-        // keeps g++ happy
-        return( CGAL::Bounded_side( 0));
-    }
-    
-    inline
-    bool
-    has_on_bounded_side( const Point& p) const
-    {
-        return( bounded_side( p) == CGAL::ON_BOUNDED_SIDE);
-    }
-    
-    inline
-    bool
-    has_on_boundary( const Point& p) const
-    {
-        return( bounded_side( p) == CGAL::ON_BOUNDARY);
-    }
-    
-    inline
-    bool
-    has_on_unbounded_side( const Point& p) const
-    {
-        return( bounded_side( p) == CGAL::ON_UNBOUNDED_SIDE);
-    }
-    
-    inline
-    bool
-    is_empty( ) const
-    {
-        return( n_boundary_points == 0);
-    }
-    
-    inline
-    bool
-    is_degenerate( ) const
-    {
-        return( n_boundary_points < 3);
-    }
-
-    bool
-    is_circle( ) const
-    {
-       switch ( n_boundary_points) {
-       case 0: 
-	 return false; // the empty set is not a circle
-       case 1:
-	 return true;  
-       case 2:
-	 return false; // a segment is not a circle
-       case 3:
-       case 5:
-	 return helper_conic.is_circle();
-       case 4:
-	 // the smallest ellipse through four points is
-	 // a circle only if the four points are cocircular;
-	 // if so, compute this circle (as a conic) and check
-	 // its volume derivative
-	 if (CGAL::ON_BOUNDARY !=  CGAL::side_of_bounded_circle
-	           (boundary_point1, 
-                    boundary_point2,
-                    boundary_point3,
-                    boundary_point4)) {
-	   return false;
-	 } else {
-	   // ok, they are cocircular, now get the circle and check it
-	   Conic c;
-	   c.set_circle(boundary_point1, boundary_point2, boundary_point3);
-           set_d_values();
-	   return (CGAL::ZERO ==  (c.vol_derivative(dr, ds, dt, du, dv, dw)));
-	 }
-       default:
-	 CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
-                                      ( n_boundary_points <= 5) ); 
-	 return false;
-       }
-    }
-};
-
-// Function declarations
-// =====================
-// I/O
-// ---
-template < class K_ >
-std::ostream&
-operator << ( std::ostream&, const CGAL::Optimisation_ellipse_2<K_>&);
-
-template < class K_ >
-std::istream&
-operator >> ( std::istream&, CGAL::Optimisation_ellipse_2<K_>&);
-
-} //namespace CGAL
-
-#include <CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h>
-
-#endif // CGAL_OPTIMISATION_ELLIPSE_2_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d.h b/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d.h
deleted file mode 100644
index 8f4d870..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d.h
+++ /dev/null
@@ -1,462 +0,0 @@
-// Copyright (c) 1997  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.fu-berlin.de>
-//                 Bernd Gaertner
-
-#ifndef CGAL_MIN_SPHERE_D_H
-#define CGAL_MIN_SPHERE_D_H
-
-// Class declarations
-// ==================
-
-// Class interface and implementation
-// ==================================
-// includes
-
-#  include <CGAL/basic.h>
-
-#  include <CGAL/Optimisation/assertions.h>
-
-#  include <CGAL/Optimisation/basic.h>
-
-#  include <CGAL/Min_sphere_d/Optimisation_sphere_d.h>
-
-
-#include <list>
-
-#include <iostream>
-
-namespace CGAL {
-
-
-template <class Traits>
-class Min_sphere_d
-{
-    
-    
-    public:
-        typedef typename Traits::Rep_tag        Rep_tag;
-        typedef typename Traits::RT             RT;
-        typedef typename Traits::FT             FT;
-        typedef typename Traits::Point_d        Point; // Point type
-    
-        typedef  typename Traits::Access_dimension_d
-          Access_dimension_d;
-        typedef  typename Traits::Access_coordinates_begin_d
-          Access_coordinates_begin_d;
-        typedef  typename Traits::Construct_point_d
-          Construct_point_d;
-    
-        typedef typename std::list<Point>::const_iterator
-                Point_iterator;
-        typedef typename std::list<Point>::const_iterator
-                Support_point_iterator;
-    
-    private:
-        typedef typename std::list<Point>::iterator             It;
-    
-    
-    private:
-        int                                     d;            // ambient dim
-        std::list<Point>                        points;       // keeps P = Q_n
-        Traits                                  tco;          // traits object
-        Optimisation_sphere_d<Rep_tag, FT, RT, Point,Traits>
-                                                ms_basis; // keeps  miniball
-        It                                      support_end;  // delimites S
-    
-public:
-    Min_sphere_d ()
-    : d(-1), tco( Traits()), ms_basis (tco),
-      support_end(points.begin())
-        {}
-    
-    
-    Min_sphere_d (const Traits& traits)
-    : d(-1), tco( traits), ms_basis (tco),
-      support_end(points.begin())
-        {}
-    
-    
-
- 
-    // STL-like constructor (member template)
-    template <class InputIterator>
-    Min_sphere_d( InputIterator first,
-                       InputIterator last)
-      : d(-1), 
-#if ( _MSC_VER != 1300)
-      points( first, last), 
-#endif
-      tco( Traits()), 
-      ms_basis (tco) 
-#if ( _MSC_VER != 1300)
-      ,support_end(points.begin())
-#endif
-    {
-#if ( _MSC_VER == 1300)
-      std::copy(first,last,std::back_inserter(points));
-      support_end = points.begin();
-#endif
-        if (points.size()>0) {
-            d = tco.access_dimension_d_object() (points.front());
-            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d));
-            ms_basis.get_sphere(Rep_tag()).set_size (d);
-            pivot_ms();
-        }
-    }
-    
-    template <class InputIterator>
-    Min_sphere_d( InputIterator first,
-                       InputIterator last,
-                       const Traits& traits)
-      : d(-1),
-#if ( _MSC_VER != 1300)
-      points( first, last), 
-#endif
-      tco( traits), 
-      ms_basis (tco)
-#if ( _MSC_VER != 1300)
-      ,support_end(points.begin())
-#endif
-
-    {
-#if ( _MSC_VER == 1300)
-      std::copy(first,last,std::back_inserter(points));
-      support_end = points.begin();
-#endif
-        if (points.size()>0) {
-            d = tco.access_dimension_d_object() (points.front());
-            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d));
-            ms_basis.get_sphere(Rep_tag()).set_size (d);
-            pivot_ms();
-        }
-    }
-    
-    Min_sphere_d (const Min_sphere_d& msph)
-    : d(msph.ambient_dimension()),
-      points (msph.points_begin(), msph.points_end()), tco (msph.tco),
-          ms_basis (tco), support_end (points.begin())
-    
-    {
-        if (d != -1) {
-            ms_basis.get_sphere(Rep_tag()).set_size (d);
-            pivot_ms();
-        }
-    }
-    
-    Min_sphere_d& operator=(const Min_sphere_d& msph)
-    {
-        if (this != &msph) {
-            points.erase (points.begin(), points.end());
-            d = msph.ambient_dimension();
-            points.insert
-              (points.begin(), msph.points_begin(), msph.points_end());
-              ms_basis.get_sphere(Rep_tag()).set_tco(msph.tco);
-            support_end = points.begin();
-            tco = msph.tco;
-            if (d != -1) {
-                ms_basis.get_sphere(Rep_tag()).set_size (d);
-                pivot_ms();
-            }
-        }
-        return *this;
-    }
-    
-    
-    int number_of_points() const
-    {
-        return static_cast<int>(points.size());
-    }
-    
-    int number_of_support_points() const
-    {
-        return ms_basis.get_sphere(Rep_tag()).number_of_support_points();
-    }
-    
-    Point_iterator points_begin () const
-    {
-        return points.begin();
-    }
-    
-    Point_iterator points_end () const
-    {
-        return points.end();
-    }
-    
-    Support_point_iterator support_points_begin () const
-    {
-        return points.begin();
-    }
-    
-    Support_point_iterator support_points_end () const
-    {
-        return support_end;
-    }
-    
-    int ambient_dimension () const
-    {
-        return d;
-    }
-    
-    Point center () const
-    {
-        CGAL_optimisation_precondition (!is_empty());
-        return ms_basis.get_sphere(Rep_tag()).center();
-    }
-    
-    FT squared_radius () const
-    {
-        CGAL_optimisation_precondition (!is_empty());
-        return ms_basis.get_sphere(Rep_tag()).squared_radius();
-    }
-    
-    
-    Bounded_side bounded_side (const Point& p) const
-    {
-        if (d == -1)
-           return ON_UNBOUNDED_SIDE;
-        else {
-          CGAL_optimisation_precondition
-           (d == tco.access_dimension_d_object()(p));
-           return (Bounded_side
-               (-CGAL::sign (ms_basis.get_sphere(Rep_tag()).excess (p))));
-        }
-    }
-    
-    bool has_on_bounded_side (const Point& p) const
-    {
-        if (d == -1)
-           return false;
-        else {
-          CGAL_optimisation_precondition
-           (d == tco.access_dimension_d_object()(p));
-           return (CGAL_NTS is_negative (ms_basis.get_sphere(Rep_tag()).excess (p)));
-        }
-    }
-    
-    bool has_on_unbounded_side (const Point& p) const
-    {
-        if (d == -1)
-           return true;
-        else {
-          CGAL_optimisation_precondition
-          (d == tco.access_dimension_d_object()(p));
-           return (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess (p)));
-        }
-    }
-    
-    bool has_on_boundary (const Point& p) const
-    {
-        if (d == -1)
-           return false;
-        else {
-          CGAL_optimisation_precondition
-          (d == tco.access_dimension_d_object()(p));
-           return (CGAL_NTS is_zero (ms_basis.get_sphere(Rep_tag()).excess (p)));
-        }
-    }
-    
-    bool is_empty () const
-    {
-        return (d == -1);
-    }
-    
-    bool is_degenerate () const
-    {
-        return (ms_basis.get_sphere(Rep_tag()).number_of_support_points() < 2);
-    }
-    
-    
-    void clear ()
-    {
-         d = -1;
-         points.erase (points.begin(), points.end());
-         ms_basis.get_sphere(Rep_tag()).set_size (-1);
-         support_end = points.begin();
-    }
-    
-    // STL-like set(member template)
-    template <class InputIterator>
-    void set ( InputIterator first,
-               InputIterator last)
-    {
-        points.erase (points.begin(), points.end());
-        points.insert (points.begin(), first, last);
-        support_end = points.begin();
-        if (points.size()>0) {
-            d = tco.access_dimension_d_object() (points.front());
-            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim (d));
-            ms_basis.get_sphere(Rep_tag()).set_size (d);
-            pivot_ms();
-        } else {
-            d = -1;
-            ms_basis.get_sphere(Rep_tag()).set_size (-1);
-        }
-    }
-    
-    void insert (const Point& p)
-    {
-        if (has_on_unbounded_side (p)) {
-            if (is_empty()) {
-                d = tco.access_dimension_d_object() (p);
-                CGAL_optimisation_precondition (d>=0);
-                ms_basis.get_sphere(Rep_tag()).set_size (d);
-            }
-            // ensure precondition of pivot_ms
-            ms_basis.get_sphere(Rep_tag()).push (p);
-            pivot_ms ();
-            ms_basis.get_sphere(Rep_tag()).pop ();
-            points.push_front (p);  // ensure postcondition of insert
-        } else
-            points.push_back (p);   // just append p
-            if (support_end == points.end()) --support_end;
-    }
-    
-    template <class InputIterator>
-    void insert (InputIterator first, InputIterator last)
-    {
-        for (InputIterator i=first; i!=last; ++i)
-            insert (*i);
-    }
-    
-    
-  bool is_valid (bool verbose = false, int /* level */ = 0) const
-    {
-        Verbose_ostream verr (verbose);
-    
-        // sphere verification
-        verr << "  (a) sphere verification..." << std::flush;
-        if (ms_basis.get_sphere(Rep_tag()).is_valid (verbose))
-            verr << "passed." << std::endl;
-        else
-            return false;
-    
-        // containment check
-        verr << "  (b) containment check..." << std::flush;
-    
-        // non-support-points
-        Point_iterator i;
-        for (i=support_end; i!=points.end(); ++i)
-            if (has_on_unbounded_side (*i))
-                return (_optimisation_is_valid_fail (verr,
-                  "sphere does not contain all points"));
-    
-        // support points
-        for (i=points.begin(); i!=support_end; ++i)
-            if (!has_on_boundary (*i))
-                return (_optimisation_is_valid_fail (verr,
-                  "sphere does not have all support points on boundary"));
-    
-        verr << "passed." << std::endl;
-        verr << "object is valid!" << std::endl;
-        return true;
-    }
-    
-    
-    const Traits& traits() const
-    {
-         return tco;
-    }
-    
-    
-private:
-    void mtf_ms (It k)
-    {
-        support_end = points.begin();
-        if (ms_basis.get_sphere(Rep_tag()).size_of_basis()==d+1) return;
-        for (It i = points.begin(); i!=k;) {
-            It j = i++;
-            if (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess(*j))) {
-                ms_basis.get_sphere(Rep_tag()).push (*j);
-                mtf_ms (j);
-                ms_basis.get_sphere(Rep_tag()).pop();
-                move_to_front (j);
-            }
-        }
-    }
-    
-    
-    void pivot_ms ()
-    {
-        It t = points.begin();
-        std::advance (t, (std::min) (d+1, (int)points.size()));
-        mtf_ms (t);
-    
-        RT excess, e;
-        do {
-            excess = RT(0);
-            It pivot;
-            for (It i=t; i!=points.end(); ++i) {
-                e = ms_basis.get_sphere(Rep_tag()).excess(*i);
-                if (e > excess) {
-                   excess = e;
-                   pivot = i;
-                }
-            }
-            if (CGAL_NTS is_positive (excess)) {
-                t = support_end;
-                if (t==pivot) ++t; //  inserted from the esa code
-                ms_basis.get_sphere(Rep_tag()).push (*pivot);
-                mtf_ms (support_end);
-                ms_basis.get_sphere(Rep_tag()).pop();
-                move_to_front (pivot);
-            }
-        } while (CGAL_NTS is_positive (excess));
-    }
-    
-    
-    void move_to_front (It j)
-    {
-        if (support_end == j)
-           ++support_end;
-        points.splice (points.begin(), points, j);
-    }
-    
-    
-    bool all_points_have_dim (int dim) const
-    {
-        for (Point_iterator i=points.begin(); i!=points.end(); ++i)
-            if (tco.access_dimension_d_object()(*i) != dim)
-                return false;
-        return true;
-    }
-    
-    
-};
-
-// Function declarations
-// =====================
-// I/O
-// ---
-
-template < class Traits >
-std::ostream&
-operator << ( std::ostream& os, const Min_sphere_d<Traits>& ms);
-
-template < class Traits >
-std::istream&
-operator >> ( std::istream& is, Min_sphere_d<Traits> & ms);
-
-} //namespace CGAL
-
-#include <CGAL/Min_sphere_d/Min_sphere_d_impl.h>
-
-#endif // CGAL_MIN_SPHERE_D_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h
deleted file mode 100644
index ac65016..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h
+++ /dev/null
@@ -1,601 +0,0 @@
-// Copyright (c) 2006-2008  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein       <wein at post.tau.ac.il>
-//                 Andreas Fabri  <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-//                 Efi Fogel      <efif at post.tau.ac.il>
-
-#ifndef CGAL_APPROXIMATED_OFFSET_BASE_H
-#define CGAL_APPROXIMATED_OFFSET_BASE_H
-
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-#include <CGAL/Gps_circle_segment_traits_2.h>
-#include <CGAL/Minkowski_sum_2/Labels.h>
-#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
-#include <CGAL/use.h>
-
-namespace CGAL {
-
-/*! \class
- * A base class for approximating the offset of a given polygon by a given
- * radius.
- */
-template <class Kernel_, class Container_>
-class Approx_offset_base_2
-{
-private:
-
-  typedef Kernel_                                        Kernel;
-  typedef typename Kernel::FT                            NT;
-
-protected:
-
-  typedef Kernel                                         Basic_kernel;
-  typedef NT                                             Basic_NT;
-  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
-  typedef CGAL::Polygon_with_holes_2<Kernel, Container_> Polygon_with_holes_2;
-
-private:
-  
-  // Kernel types:
-  typedef typename Kernel::Point_2                       Point_2;
-  typedef typename Kernel::Line_2                        Line_2;
-
-  // Polygon-related types:
-  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
-
-  // Traits-class types:
-  typedef Gps_circle_segment_traits_2<Kernel>            Traits_2;
-  typedef typename Traits_2::CoordNT                     CoordNT;
-  typedef typename Traits_2::Point_2                     Tr_point_2;
-  typedef typename Traits_2::Curve_2                     Curve_2;
-  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
-
-protected:
-
-  typedef typename Traits_2::Polygon_2                   Offset_polygon_2;
-  
-  typedef Arr_labeled_traits_2<Traits_2>                 Labeled_traits_2; 
-  typedef typename Labeled_traits_2::X_monotone_curve_2  Labeled_curve_2;
-
-  // Data members:
-  double        _eps;            // An upper bound on the approximation error.
-  int           _inv_sqrt_eps;   // The inverse squared root of _eps.
-
-public:
-
-  /*!
-   * Constructor.
-   * \param eps An upper bound on the approximation error.
-   */
-  Approx_offset_base_2 (const double& eps) :
-    _eps (eps)
-  {
-    CGAL_precondition (CGAL::sign (eps) == POSITIVE);
-
-    _inv_sqrt_eps = static_cast<int> (1.0 / CGAL::sqrt (_eps));
-    if (_inv_sqrt_eps <= 0)
-      _inv_sqrt_eps = 1;
-  }    
-
-protected:
-
-  /*!
-   * Compute curves that constitute the offset of a simple polygon by a given
-   * radius, with a given approximation error.
-   * \param pgn The polygon.
-   * \param orient The orientation to traverse the vertices.
-   * \param r The offset radius.
-   * \param cycle_id The index of the cycle.
-   * \param oi An output iterator for the offset curves.
-   * \pre The value type of the output iterator is Labeled_curve_2.
-   * \return A past-the-end iterator for the holes container.
-   */
-  template <class OutputIterator>
-  OutputIterator _offset_polygon (const Polygon_2& pgn,
-                                  CGAL::Orientation orient,
-                                  const Basic_NT& r,
-                                  unsigned int cycle_id,
-                                  OutputIterator oi) const
-  {
-    // Prepare circulators over the polygon vertices.
-    const bool            forward = (pgn.orientation() == orient);
-    Vertex_circulator     first, curr, next, prev;
-
-    first = pgn.vertices_circulator();
-    curr = first; 
-    next = first;
-    prev = first;
-
-    if (forward)
-      --prev;
-    else
-      ++prev;
-
-    // Traverse the polygon vertices and edges and approximate the arcs that
-    // constitute the single convolution cycle.
-    NT              x1, y1;              // The source of the current edge.
-    NT              x2, y2;              // The target of the current edge.
-    NT              delta_x, delta_y;    // (x2 - x1) and (y2 - y1), resp.
-    NT              abs_delta_x;
-    NT              abs_delta_y;
-    CGAL::Sign      sign_delta_x;        // The sign of (x2 - x1).
-    CGAL::Sign      sign_delta_y;        // The sign of (y2 - y1).
-    NT              sqr_d;               // The squared length of the edge.
-    NT              err_bound;           // An approximation bound for d.
-    NT              app_d;               // The apporximated edge length.
-    NT              app_err;             // The approximation error.
-    CGAL::Sign      sign_app_err;        // Its sign.
-    NT              lower_tan_half_phi;
-    NT              upper_tan_half_phi;
-    NT              sqr_tan_half_phi;
-    NT              sin_phi, cos_phi;
-    Point_2         op1;                 // The approximated offset point
-                                         // corresponding to (x1, y1).
-    Point_2         op2;                 // The approximated offset point
-                                         // corresponding to (x2, y2).
-    Line_2          l1, l2;              // Lines tangent at op1 and op2.
-    Object          obj;
-    bool            assign_success;
-    Point_2         mid_p;               // The intersection of l1 and l2.
-    Point_2         first_op;            // op1 for the first edge visited.
-    Point_2         prev_op;             // op2 for the previous edge.
-
-    unsigned int                    curve_index = 0;
-    X_monotone_curve_2              seg1, seg2;
-    bool                            dir_right1 = false, dir_right2 = false;
-    X_monotone_curve_2              seg_short;
-    bool                            dir_right_short;
-    int                             n_segments;
-
-    Kernel                            ker;
-    typename Kernel::Intersect_2      f_intersect = ker.intersect_2_object();
-    typename Kernel::Construct_line_2 f_line = ker.construct_line_2_object();
-    typename Kernel::Construct_perpendicular_line_2
-                     f_perp_line = ker.construct_perpendicular_line_2_object();
-    typename Kernel::Compare_xy_2     f_comp_xy = ker.compare_xy_2_object();
-    typename Kernel::Orientation_2    f_orient = ker.orientation_2_object();
-
-    Traits_2                        traits;
-    std::list<Object>               xobjs;
-    std::list<Object>::iterator     xobj_it;
-    typename Traits_2::Make_x_monotone_2
-                       f_make_x_monotone = traits.make_x_monotone_2_object();
-    Curve_2                         arc;
-    X_monotone_curve_2              xarc;
-
-    do
-    {
-      // Get a circulator for the next vertex (in the proper orientation).
-      if (forward)
-        ++next;
-      else
-        --next;
-
-      // Compute the vector v = (delta_x, delta_y) of the current edge,
-      // and compute the squared edge length.
-      x1 = curr->x();
-      y1 = curr->y();
-      x2 = next->x();
-      y2 = next->y();
-
-      delta_x = x2 - x1;
-      delta_y = y2 - y1;
-      sqr_d = CGAL::square (delta_x) + CGAL::square (delta_y);
-
-      sign_delta_x = CGAL::sign (delta_x);
-      sign_delta_y = CGAL::sign (delta_y);
-
-      if (sign_delta_x == CGAL::ZERO)
-      {
-        CGAL_assertion (sign_delta_y != CGAL::ZERO);
-
-        // The edge [(x1, y1) -> (x2, y2)] is vertical. The offset edge lies
-        // at a distance r to the right if y2 > y1, and to the left if y2 < y1.
-        if (sign_delta_y == CGAL::POSITIVE)
-        {
-          op1 = Point_2 (x1 + r, y1);
-          op2 = Point_2 (x2 + r, y2);
-        }
-        else
-        {
-          op1 = Point_2 (x1 - r, y1);
-          op2 = Point_2 (x2 - r, y2);
-        }
-
-        // Create the offset segment [op1 -> op2].
-        seg1 = X_monotone_curve_2 (op1, op2);
-        dir_right1 = (sign_delta_y == CGAL::POSITIVE);
-
-        n_segments = 1;
-      }
-      else if (sign_delta_y == CGAL::ZERO)
-      {
-        // The edge [(x1, y1) -> (x2, y2)] is horizontal. The offset edge lies
-        // at a distance r to the bottom if x2 > x1, and to the top if x2 < x1.
-        if (sign_delta_x == CGAL::POSITIVE)
-        {
-          op1 = Point_2 (x1, y1 - r);
-          op2 = Point_2 (x2, y2 - r);
-        }
-        else
-        {
-          op1 = Point_2 (x1, y1 + r);
-          op2 = Point_2 (x2, y2 + r);
-        }
-
-        // Create the offset segment [op1 -> op2].
-        seg1 = X_monotone_curve_2 (op1, op2);
-        dir_right1 = (sign_delta_x == CGAL::POSITIVE);
-
-        n_segments = 1;
-      }
-      else
-      {
-        abs_delta_x = (sign_delta_x == POSITIVE) ? delta_x : -delta_x;
-        abs_delta_y = (sign_delta_y == POSITIVE) ? delta_y : -delta_y;
-
-        // In this general case, the length d of the current edge is usually
-        // an irrational number.
-        // Compute the upper bound for the approximation error for d.
-        // This bound is given by:
-        //
-        //                            d - |delta_y|
-        //     bound = 2 * d * eps * ---------------
-        //                              |delta_x|
-        //
-        // As we use floating-point arithmetic, if |delta_x| is small, then
-        // it might be that to_double(|delta_y|) == to_double(d), hence we
-        // have a 0 tolerance in the approximation bound. Luckily, because
-        // of symmetry, we can rotate the scene by pi/2, and swap roles of
-        // x and y. In fact, we do that in order to get a larger approximation
-        // bound if possible.
-        const double    dd = CGAL::sqrt (CGAL::to_double (sqr_d));
-        const double    dabs_dx = CGAL::to_double (abs_delta_x);
-        const double    dabs_dy = CGAL::to_double (abs_delta_y);
-        double          derr_bound;
-
-        if (dabs_dy < dabs_dx)
-        {
-          derr_bound = 2 * dd * _eps * (dd - dabs_dy) / dabs_dx;
-        }
-        else
-        {
-          derr_bound = 2 * dd * _eps * (dd - dabs_dx) / dabs_dy;
-        }
-
-        CGAL_assertion (derr_bound > 0);
-        err_bound = NT (derr_bound);
-
-        // Compute an approximation for d (the squared root of sqr_d).
-        int             numer;
-        int             denom = _inv_sqrt_eps;
-        const int       max_int = (1 << (8*sizeof(int) - 2));
-
-        numer = static_cast<int> (dd * denom + 0.5);
-        if (numer > 0)
-        {
-            while (static_cast<double>(max_int) / denom < dd &&
-                   numer > 0)
-            {
-              denom >>= 1;
-              numer = static_cast<int> (dd * denom + 0.5);
-            }
-        }
-        else if (numer == 0)
-        {
-            while (numer == 0)
-            {
-              denom <<= 1;
-              if (denom > 0)
-              {
-                numer = static_cast<int> (dd * denom + 0.5);
-              }
-              else
-              {
-		// In case of overflow of denom
-                numer = 1;
-                denom = max_int;
-              } 
-            }
-        }
-        else {// if numer < 0 (overflow)  
-          numer = max_int;
-          denom = 1;
-        }
-
-
-        app_d = NT (numer) / NT (denom);
-        app_err = sqr_d - CGAL::square (app_d); 
-
-        while (CGAL::compare (CGAL::abs (app_err), 
-                              err_bound) == CGAL::LARGER ||
-               CGAL::compare (app_d, abs_delta_x) != LARGER ||
-               CGAL::compare (app_d, abs_delta_y) != LARGER)
-        {
-          app_d = (app_d + sqr_d/app_d) / 2;
-          app_err = sqr_d - CGAL::square (app_d);
-        }
-
-        sign_app_err = CGAL::sign (app_err);
-
-        if (sign_app_err == CGAL::ZERO)
-        {
-          // In this case d is a rational number, and we should shift the
-          // both edge endpoints by (r * delta_y / d, -r * delta_x / d) to
-          // obtain the offset points op1 and op2.
-          const NT   trans_x = r * delta_y / app_d;
-          const NT   trans_y = r * (-delta_x) / app_d;
-
-          op1 = Point_2 (x1 + trans_x, y1 + trans_y);
-          op2 = Point_2 (x2 + trans_x, y2 + trans_y);
-
-          seg1 = X_monotone_curve_2 (op1, op2);
-          dir_right1 = (sign_delta_x == CGAL::POSITIVE);
-
-          n_segments = 1;
-        }
-        else
-        {
-          // In case |x2 - x1| < |y2 - y1| (and phi is small) it is possible
-          // that the approximation t' of t = tan(phi/2) is of opposite sign.
-          // To avoid this problem, we symbolically rotate the scene by pi/2,
-          // swapping roles between x and y. Thus, t is not close to zero, and
-          // we are guaranteed to have: phi- < phi < phi+ .
-          bool rotate_pi2 = false;
-
-          if (CGAL::compare (CGAL::abs(delta_x),
-                             CGAL::abs(delta_y)) == SMALLER)
-          {
-            rotate_pi2 = true;
-
-            // We use the rotation matrix by pi/2:
-            //
-            //   +-       -+
-            //   |  0  -1  |
-            //   |  1   0  |
-            //   +-       -+
-            //
-            // Thus, the point (x, y) is converted to (-y, x):
-            NT tmp = x1;
-
-            x1 = -y1;
-            y1 = tmp;
-
-            tmp = x2;
-            x2 = -y2;
-            y2 = tmp;
-
-            // Swap the delta_x and delta_y values.
-            tmp = delta_x;
-            delta_x = -delta_y;
-            delta_y = tmp;
-
-            CGAL::Sign  tmp_sign = sign_delta_x;
-            sign_delta_x = CGAL::opposite (sign_delta_y);
-            sign_delta_y = tmp_sign;
-          }
-
-          // Act according to the sign of delta_x.
-          if (sign_delta_x == CGAL::NEGATIVE)
-          {
-            // x1 > x2, so we take a lower approximation for the squared root.
-            if (sign_app_err == CGAL::NEGATIVE)
-              app_d = sqr_d / app_d;
-          }
-          else
-          {
-            // x1 < x2, so we take an upper approximation for the squared root.
-            if (sign_app_err == CGAL::POSITIVE)
-              app_d = sqr_d / app_d;
-          }
-
-          // If theta is the angle that the vector (delta_x, delta_y) forms
-          // with the x-axis, the perpendicular vector forms an angle of
-          // phi = theta - PI/2, and we can approximate tan(phi/2) from below
-          // and from above using:
-          lower_tan_half_phi = (app_d - delta_y) / (-delta_x);
-          upper_tan_half_phi = (-delta_x) / (app_d + delta_y);
-
-          // Translate (x1, y1) by (r*cos(phi-), r*sin(phi-)) and create the
-          // first offset point.
-          // If tan(phi/2) = t is rational, then sin(phi) = 2t/(1 + t^2)
-          // and cos(phi) = (1 - t^2)/(1 + t^2) are also rational.
-          sqr_tan_half_phi = CGAL::square (lower_tan_half_phi);
-          sin_phi = 2 * lower_tan_half_phi / (1 + sqr_tan_half_phi);
-          cos_phi = (1 - sqr_tan_half_phi) / (1 + sqr_tan_half_phi);
-
-          if (! rotate_pi2)
-          {
-            op1 = Point_2 (x1 + r*cos_phi, y1 + r*sin_phi);
-          }
-          else
-          {
-            // In case of symbolic rotation by pi/2, we have to rotate the
-            // translated point by -(pi/2), transforming (x, y) to (y, -x).
-            op1 = Point_2 (y1 + r*sin_phi, -(x1 + r*cos_phi));
-          }
-
-          // Translate (x2, y2) by (r*cos(phi+), r*sin(phi+)) and create the
-          // second offset point.
-          sqr_tan_half_phi = CGAL::square (upper_tan_half_phi);
-          sin_phi = 2 * upper_tan_half_phi / (1 + sqr_tan_half_phi);
-          cos_phi = (1 - sqr_tan_half_phi) / (1 + sqr_tan_half_phi);
-
-          if (! rotate_pi2)
-          {
-            op2 = Point_2 (x2 + r*cos_phi, y2 + r*sin_phi);
-          }
-          else
-          {
-            // In case of symbolic rotation by pi/2, we have to rotate the
-            // translated point by -(pi/2), transforming (x, y) to (y, -x).
-            op2 = Point_2 (y2 + r*sin_phi, -(x2 + r*cos_phi));
-          }
-
-          // Compute the line l1 tangent to the circle centered at (x1, y1)
-          // with radius r at the approximated point op1.
-          l1 = f_perp_line (f_line (*curr, op1), op1);
-        
-          // Compute the line l2 tangent to the circle centered at (x2, y2)
-          // with radius r at the approximated point op2.
-          l2 = f_perp_line (f_line (*next, op2), op2);
-
-          // Intersect the two lines. The intersection point serves as a common
-          // end point for the two line segments we are about to introduce.
-          obj = f_intersect (l1, l2);
-        
-          assign_success = CGAL::assign (mid_p, obj);
-          CGAL_assertion (assign_success);
-          CGAL_USE(assign_success);
-
-          // Andreas's assertions:
-          CGAL_assertion( right_turn(*curr, *next, op2) );
-          CGAL_assertion( angle(*curr, *next, op2) != ACUTE);
-          CGAL_assertion( angle(op1, *curr, *next) != ACUTE);
-          CGAL_assertion( right_turn(op1, *curr, *next) );
-
-          // Create the two segments [op1 -> p_mid] and [p_min -> op2].
-          seg1 = X_monotone_curve_2 (op1, mid_p);
-          dir_right1 = (f_comp_xy (op1, mid_p) == CGAL::SMALLER);
-
-          seg2 = X_monotone_curve_2 (mid_p, op2);
-          dir_right2 = (f_comp_xy (mid_p, op2) == CGAL::SMALLER);
-
-          n_segments = 2;
-        }
-      }
-
-      if (curr == first) {
-        // This is the first edge we visit -- store op1 for future use.
-        first_op = op1;
-      }
-      else {
-        CGAL::Orientation orient = f_orient (*prev, *curr, *next);
-        if (orient == CGAL::COLLINEAR) {
-          /* If the orientation is collinear, figure out whether it's a 180
-           * turn. If so, assume that it is an antena that generates
-           * a positive spike, and treat it as a left turn.
-           * A complete solution would need to distinguish between positive
-           * and negative spikes, and treat them as left and right turns,
-           * respectively.
-           */
-          typename Kernel::Compare_x_2 f_comp_x = ker.compare_x_2_object();
-          Comparison_result res1, res2;
-          res1 = f_comp_x(*prev, *curr);
-          if (res1 != CGAL::EQUAL)
-            res2 = f_comp_x(*curr, *next);
-          else {
-            typename Kernel::Compare_y_2 f_comp_y = ker.compare_y_2_object();
-            res1 = f_comp_y(*prev, *curr);
-            res2 = f_comp_y(*curr, *next);
-          }
-          if (res1 != res2) orient = CGAL::LEFT_TURN;
-        }
-        
-        // Connect the offset target point of the previous edge to the
-        // offset source of the current edge.
-        if (orient == CGAL::LEFT_TURN) {
-          // Connect prev_op and op1 with a circular arc, whose supporting
-          // circle is (x1, x2) with radius r.
-          arc = Curve_2 (*curr, r, CGAL::COUNTERCLOCKWISE,
-                         Tr_point_2 (prev_op.x(), prev_op.y()),
-                         Tr_point_2 (op1.x(), op1.y()));
-
-          // Subdivide the arc into x-monotone subarcs and insert them into the
-          // convolution cycle.
-          xobjs.clear();
-          f_make_x_monotone (arc, std::back_inserter(xobjs));
-          for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) {
-            assign_success = CGAL::assign (xarc, *xobj_it);
-            CGAL_assertion (assign_success);
-            CGAL_USE(assign_success);
-            *oi++ = Labeled_curve_2 (xarc,
-                                     X_curve_label (xarc.is_directed_right(),
-                                                    cycle_id, curve_index++));
-          }
-        }
-        else if (orient == CGAL::RIGHT_TURN) {
-          // In case the current angle between the previous and the current
-          // edge is larger than pi/2, it not necessary to connect prev_op
-          // and op1 by a circular arc (as the case above): it is sufficient
-          // to shortcut the circular arc using a segment, whose sole purpose
-          // is to guarantee the continuity of the convolution cycle (we know
-          // this segment will not be part of the output offset or inset).
-          seg_short = X_monotone_curve_2(prev_op, op1);
-
-          dir_right_short = (f_comp_xy (prev_op, op1) == CGAL::SMALLER);
-          *oi++ = Labeled_curve_2 (seg_short,
-                                   X_curve_label (dir_right_short,
-                                                  cycle_id, curve_index++));
-        }
-      }
-
-      // Append the offset segment(s) to the convolution cycle.
-      CGAL_assertion (n_segments == 1 || n_segments == 2);
-      *oi++ = Labeled_curve_2 (seg1, X_curve_label (dir_right1,
-                                                    cycle_id, curve_index++));
-
-      if (n_segments == 2)
-      {
-        *oi++ = Labeled_curve_2 (seg2, X_curve_label (dir_right2,
-                                                      cycle_id, curve_index++));
-      }
-    
-      // Proceed to the next polygon vertex.
-      prev_op = op2;
-      prev = curr;
-      curr = next;
-    
-    } while (curr != first);
-
-    // Close the convolution cycle by creating the final circular arc,
-    // centered at the first vertex.
-    arc = Curve_2 (*first, r, CGAL::COUNTERCLOCKWISE,
-                   Tr_point_2 (op2.x(), op2.y()),
-                   Tr_point_2 (first_op.x(), first_op.y()));
-
-    // Subdivide the arc into x-monotone subarcs and insert them to the
-    // convolution cycle.
-    xobjs.clear();
-    f_make_x_monotone (arc, std::back_inserter(xobjs));
-
-    xobj_it = xobjs.begin();
-    while (xobj_it != xobjs.end())
-    {
-      assign_success = CGAL::assign (xarc, *xobj_it);
-      CGAL_assertion (assign_success);
-      CGAL_USE(assign_success);
-      
-      ++xobj_it;
-      bool is_last = (xobj_it == xobjs.end());
-
-      *oi++ = Labeled_curve_2 (xarc,
-                               X_curve_label (xarc.is_directed_right(),
-                                              cycle_id, curve_index++, is_last));
-    }
-
-    return (oi);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h
deleted file mode 100644
index 27c8afe..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h
+++ /dev/null
@@ -1,421 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_ARR_LABELED_TRAITS_2_H
-#define CGAL_ARR_LABELED_TRAITS_2_H
-
-#include <CGAL/Minkowski_sum_2/Labels.h>
-#include <list>
-
-namespace CGAL {
-
-/*! \class
- * A meta-traits class that adds lables to points and to x-monotone curves,
- * such that the comparison of two points, as well as the computation of the
- * intersections between two segments can be easily filtered.
- */ 
-template <class Traits_>
-class Arr_labeled_traits_2 : public Traits_
-{
-private:
-
-  typedef Traits_                                      Base_traits_2;
-  typedef typename Base_traits_2::Point_2              Base_point_2;
-  typedef typename Base_traits_2::X_monotone_curve_2   Base_x_monotone_curve_2;
-
-public:
-
-  /*! \class
-   * A point extended by a label.
-   */
-  class Point_2 : public Base_point_2
-  {
-  private:
-
-    Point_label         _label;
-
-  public:
-
-    /*! Default constructor. */
-    Point_2 ()
-    {}
-
-    /*! Constructor from a base point. */
-    Point_2 (const Base_point_2& p) :
-      Base_point_2 (p),
-      _label()
-    {}
-
-    /*! Constructor from a point an a label. */
-    Point_2 (const Base_point_2& p, const Point_label& label) :
-      Base_point_2 (p),
-      _label (label)
-    {}
-
-    /*! Get the label. */
-    const Point_label& label () const
-    {
-      return (_label);
-    }
-  };
-
-  /*! \class
-   * An x-monotone curve extended by a label.
-   */
-  class X_monotone_curve_2 : public Base_x_monotone_curve_2
-  {
-  private:
-
-    X_curve_label         _label;
-
-  public:
-
-    /*! Default constructor. */
-    X_monotone_curve_2 ()
-    {}
-
-    /*! Constructor from a base x-monotone curve. */
-    X_monotone_curve_2 (const Base_x_monotone_curve_2& p) :
-      Base_x_monotone_curve_2 (p),
-      _label()
-    {}
-
-    /*! Constructor from an x-monotone curve an a label. */
-    X_monotone_curve_2 (const Base_x_monotone_curve_2& p, 
-                        const X_curve_label& label) :
-      Base_x_monotone_curve_2 (p),
-      _label (label)
-    {}
-
-    /*! Get the label (const version). */
-    const X_curve_label& label () const
-    {
-      return (_label);
-    }
-
-    /*! Get the label (non-const version). */
-    X_curve_label& label ()
-    {
-      return (_label);
-    }
-
-    /*! Set the label. */
-    void set_label (const X_curve_label& label)
-    {
-      _label = label;
-      return;
-    }
-  };
-
-  typedef typename Base_traits_2::Has_left_category      Has_left_category;
-  typedef Tag_false                                      Has_merge_category;
-
-  /*! Default constructor. */
-  Arr_labeled_traits_2 ()
-  {}
-
-  // Inherited functors:
-  typedef typename Base_traits_2::Is_vertical_2         Is_vertical_2;
-  typedef typename Base_traits_2::Compare_y_at_x_2      Compare_y_at_x_2;
-  typedef typename Base_traits_2::Compare_y_at_x_right_2 
-                                                        Compare_y_at_x_right_2;
-  typedef typename Base_traits_2::Equal_2               Equal_2;
-
-  /// \name Overriden functors.
-  //@{
-  class Compare_x_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Compare_x_2 (const Base_traits_2 * _base) :
-      base (_base)
-    {}
-
-    /*!
-     * Compare the x-coordinates of two points.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      // If two points have the same label, they are equal.
-      if (p1.label() == p2.label())
-        return (EQUAL);
-
-      return (base->compare_x_2_object()(p1, p2));
-    }
-  };
-
-  /*! Get a Compare_x_2 functor object. */
-  Compare_x_2 compare_x_2_object () const
-  {
-    return (Compare_x_2 (this));
-  }
-
-
-  class Compare_xy_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Compare_xy_2 (const Base_traits_2 *_base) :
-      base (_base)
-    {}
-
-    /*!
-     * Compare two points lexigoraphically: by x, then by y.
-     */
-    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
-    {
-      // If two points have the same label, they are equal.
-      if (p1.label() == p2.label())
-        return (EQUAL);
-
-      return (base->compare_xy_2_object()(p1, p2));
-    }
-  };
-
-  /*! Get a Compare_xy_2 functor object. */
-  Compare_xy_2 compare_xy_2_object () const
-  {
-    return (Compare_xy_2 (this));
-  }
-
-
-  class Construct_min_vertex_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Construct_min_vertex_2 (const Base_traits_2 *_base) :
-      base (_base)
-    {}
-
-    /*!
-     * Get the left endpoint of the x-monotone curve.
-     */
-    Point_2 operator() (const X_monotone_curve_2& cv) const
-    {
-      const Base_point_2&  pt = base->construct_min_vertex_2_object() (cv);
-
-      if (cv.label().right_count() == 1 && cv.label().left_count() == 0)
-      {
-        // A curve directed from left to right:
-        Point_label   label (cv.label().component(), cv.label().index());
-
-        return (Point_2 (pt, label));
-      }
-      else if (cv.label().right_count() == 0 && cv.label().left_count() == 1)
-      {
-        // A curve directed from right to left:
-        Point_label   label (cv.label().component(), 
-                             cv.label().is_last() ? 0 : cv.label().index()+1);
-
-        return (Point_2 (pt, label));
-      }
-
-      // Assign an invalid label to the point.
-      return (Point_2 (pt));
-    }
-  };
-
-  /*! Get a Construct_min_vertex_2 functor object. */
-  Construct_min_vertex_2 construct_min_vertex_2_object () const
-  {
-    return (Construct_min_vertex_2 (this));
-  }
-
-
-  class Construct_max_vertex_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Construct_max_vertex_2 (const Base_traits_2 *_base) :
-      base (_base)
-    {}
-
-    /*!
-     * Get the right endpoint of the x-monotone curve.
-     */
-    Point_2 operator() (const X_monotone_curve_2& cv) const
-    {
-      const Base_point_2&  pt = base->construct_max_vertex_2_object() (cv);
-
-      if (cv.label().right_count() == 1 && cv.label().left_count() == 0)
-      {
-        // A curve directed from left to right:
-        Point_label   label (cv.label().component(),
-                             cv.label().is_last() ? 0 : cv.label().index()+1);
-
-        return (Point_2 (pt, label));
-      }
-      else if (cv.label().right_count() == 0 && cv.label().left_count() == 1)
-      {
-        // A curve directed from right to left:
-        Point_label   label (cv.label().component(), cv.label().index());
-
-        return (Point_2 (pt, label));
-      }
-
-      // Assign an invalid label to the point.
-      return (Point_2 (pt));
-    }
-  };
-
-  /*! Get a Construct_max_vertex_2 functor object. */
-  Construct_max_vertex_2 construct_max_vertex_2_object () const
-  {
-    return (Construct_max_vertex_2 (this));
-  }
-
-
-  class Split_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Split_2 (const Base_traits_2 * _base) :
-      base (_base)
-    {}
-
-    /*!
-     * Split a given x-monotone curve at a given point into two sub-curves.
-     */
-    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
-                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
-    {
-      // Split the base curve into two.
-      base->split_2_object() (cv, p, c1, c2);
-
-      // Duplicate the label to both subcurves.
-      c1.set_label (cv.label());
-      c2.set_label (cv.label());
-
-      return;
-    }
-  };
-
-  /*! Get a Split_2 functor object. */
-  Split_2 split_2_object () const
-  {
-    return (Split_2 (this));
-  }
-
-
-  class Intersect_2
-  {
-  private:
-
-    const Base_traits_2 * base;
-
-  public:
-
-    /*! Constructor. */
-    Intersect_2 (const Base_traits_2 * _base) :
-      base (_base)
-    {}
-
-    /*!
-     * Find the intersections of the two given curves and insert them to the
-     * given output iterator.
-     */
-    template<class OutputIterator>
-    OutputIterator operator() (const X_monotone_curve_2& cv1,
-                               const X_monotone_curve_2& cv2,
-                               OutputIterator oi) const
-    {
-      // In case the curves are adjacent in their curve sequence, we do
-      // not have to compute their intersection (we already know that they
-      // have just one common endpoint).
-      if (cv1.label().is_adjacent (cv2.label()))
-        return (oi);
-
-      // Compute the intersection.
-      std::list<CGAL::Object>            base_objs;
-
-      base->intersect_2_object() (cv1, cv2, std::back_inserter (base_objs));
-      
-      if (base_objs.empty())
-        return (oi);
-
-      // Attach labels to the intersection objects.
-      std::list<CGAL::Object>::iterator             obj_it;
-      const std::pair<Base_point_2, unsigned int>  *base_pt;
-      const Base_x_monotone_curve_2                *base_xcv;
-
-      for (obj_it = base_objs.begin(); obj_it != base_objs.end(); ++obj_it)
-      {
-        base_pt =
-          object_cast<std::pair<Base_point_2, unsigned int> > (&(*obj_it));
-
-        if (base_pt != NULL)
-        {
-          // Attach an invalid label to an itersection point.
-          *oi = CGAL::make_object 
-            (std::make_pair (Point_2 (base_pt->first), base_pt->second));
-          ++oi;
-        }
-        else
-        {
-          base_xcv = object_cast<Base_x_monotone_curve_2> (&(*obj_it));
-          CGAL_assertion (base_xcv != NULL);
-
-          // Attach a merged label to the overlapping curve.
-          *oi = CGAL::make_object 
-            (X_monotone_curve_2 (*base_xcv, 
-                                 X_curve_label (cv1.label(), cv2.label())));
-          ++oi;
-        }
-      }
-
-      return (oi);
-    }
-  };
-
-  /*! Get an Intersect_2 functor object. */
-  Intersect_2 intersect_2_object () const
-  {
-    return (Intersect_2 (this));
-  }
-  //@}
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h
deleted file mode 100644
index 3413d9f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_POLYGON_DECOMPOSITION_STRATEGY_ADAPTER_H
-#define CGAL_POLYGON_DECOMPOSITION_STRATEGY_ADAPTER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Partition_traits_2.h>
-#include <CGAL/partition_2.h>
-
-namespace CGAL {
-
-struct Tag_optimal_convex_parition
-{
-  bool    dummy;
-};
-
-struct Tag_approx_convex_parition
-{
-  bool    dummy;
-};
-
-struct Tag_Greene_convex_parition
-{
-  bool    dummy;
-};
-
-/*!
- * \class
- * An adapter of the global planar polygonal partitioning functions
- * to a decomposition strategy-class.
- */
-template <class Kernel_, class Container_, class StrategyTag_>
-class Polygon_decomposition_strategy_adapter
-{
-public:
-        
-  typedef Kernel_                                  Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
-  typedef typename Kernel::Point_2                 Point_2;
-  typedef StrategyTag_                             Strategy_tag;
-
-protected:
-
-  typedef Partition_traits_2<Kernel>               Traits_2;
-  typedef typename Traits_2::Polygon_2             Traits_polygon_2;
-
-  // Data members:
-  Traits_2           traits;
-
-public:
-
-  /*! Default constructor. */
-  Polygon_decomposition_strategy_adapter () :
-    traits()
-  {}
-  
-  /*!
-   * Decompose a simple polygon to convex sub-polygons.
-   * \param pgn The input polygon.
-   * \param oi An output iterator of convex polygons.
-   * \return A past-the-end iterator for the sub-polygons.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_2& pgn,
-                             OutputIterator oi) const
-  {
-    std::list<Traits_polygon_2>                           pgns;
-    typename std::list<Traits_polygon_2>::const_iterator  pgn_it;
-
-    if (pgn.orientation() == CLOCKWISE)
-    {
-      // Make a local copy of the polygon, and reverse the order of its
-      // vertices to make it counterclockwise oriented.
-      Polygon_2        my_pgn = pgn;
-
-      my_pgn.reverse_orientation();
-
-      // Perform the decomposition.
-      _decompose (my_pgn, Strategy_tag(), std::back_inserter (pgns));
-    }
-    else
-    {
-      // Perform the decomposition on the original polygon.
-      _decompose (pgn, Strategy_tag(), std::back_inserter (pgns));
-    }
-
-    // Copy the polygons to the output iterator.
-    for (pgn_it = pgns.begin(); pgn_it != pgns.end(); ++pgn_it)
-    {
-      *oi = Polygon_2 (pgn_it->vertices_begin(), pgn_it->vertices_end());
-      ++oi;
-    }
-
-    return (oi);
-  }
-
-private:
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using the optimal
-   * convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_optimal_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (optimal_convex_partition_2 (pgn.vertices_begin(),
-                                        pgn.vertices_end(),
-                                        oi,
-                                        traits));
-  }
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using the
-   * approximated convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_approx_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (approx_convex_partition_2 (pgn.vertices_begin(),
-                                       pgn.vertices_end(),
-                                       oi,
-                                       traits));
-  }
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using Greene's
-   * approximated convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_Greene_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (greene_approx_convex_partition_2 (pgn.vertices_begin(),
-                                              pgn.vertices_end(),
-                                              oi,
-                                              traits));
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h
deleted file mode 100644
index 4db2034..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_EXACT_OFFSET_BASE_H
-#define CGAL_EXACT_OFFSET_BASE_H
-
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-#include <CGAL/Gps_traits_2.h>
-#include <CGAL/Minkowski_sum_2/Labels.h>
-#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
-#include <CGAL/use.h>
-
-namespace CGAL {
-
-/*! \class
- * A base class for computing the offset of a given polygon by a given
- * radius in an exact manner.
- */
-template <class Traits_, class Container_>
-class Exact_offset_base_2
-{
-private:
-  
-  typedef Traits_                                        Traits_2;
-  
-  // Rational kernel types:
-  typedef typename Traits_2::Rat_kernel                  Rat_kernel;
-  typedef typename Rat_kernel::FT                        Rational;
-  typedef typename Rat_kernel::Point_2                   Rat_point_2;
-  typedef typename Rat_kernel::Line_2                    Rat_line_2;
-  typedef typename Rat_kernel::Circle_2                  Rat_circle_2;
-
-protected:
-
-  typedef Rat_kernel                                     Basic_kernel;
-  typedef Rational                                       Basic_NT;
-
-private:
-
-  // Algebraic kernel types:
-  typedef typename Traits_2::Alg_kernel                  Alg_kernel;
-  typedef typename Alg_kernel::FT                        Algebraic;
-  typedef typename Alg_kernel::Point_2                   Alg_point_2;
-
-  typedef typename Traits_2::Nt_traits                   Nt_traits;
-
-  // Traits-class types:
-  typedef typename Traits_2::Curve_2                     Curve_2;
-  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
-
-  typedef CGAL::Gps_traits_2<Traits_2>                   Gps_traits_2;
- 
-protected:
-
-  typedef CGAL::Polygon_2<Rat_kernel, Container_>        Polygon_2;
-  typedef CGAL::Polygon_with_holes_2<Rat_kernel,
-                                     Container_>         Polygon_with_holes_2;
-  typedef typename Gps_traits_2::Polygon_2               Offset_polygon_2;
-  
-private:
-
-  // Polygon-related types:
-  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
-
-protected:
-
-  typedef Arr_labeled_traits_2<Traits_2>                 Labeled_traits_2; 
-
-  typedef typename Labeled_traits_2::X_monotone_curve_2  Labeled_curve_2;
-
-public:
-
-  /*! Default constructor. */
-  Exact_offset_base_2 ()
-  {}    
-
-protected:
-
-  /*!
-   * Compute the curves that constitute the offset of a simple polygon by a
-   * given radius.
-   * \param pgn The polygon.
-   * \param orient The orientation to traverse the vertices.
-   * \param r The offset radius.
-   * \param cycle_id The index of the cycle.
-   * \param oi An output iterator for the offset curves.
-   * \pre The value type of the output iterator is Labeled_curve_2.
-   * \return A past-the-end iterator for the holes container.
-   */
-  template <class OutputIterator>
-  OutputIterator _offset_polygon (const Polygon_2& pgn,
-                                  CGAL::Orientation orient,
-                                  const Rational& r,
-                                  unsigned int cycle_id,
-                                  OutputIterator oi) const
-  {
-    // Prepare circulators over the polygon vertices.
-    const bool            forward = (pgn.orientation() == orient);
-    Vertex_circulator     first, curr, next;
-    
-    first = pgn.vertices_circulator();
-    curr = first; 
-    next = first;
-
-    // Traverse the polygon vertices and edges and construct the arcs that
-    // constitute the single convolution cycle.
-    Alg_kernel                    alg_ker;
-    typename Alg_kernel::Equal_2  f_equal = alg_ker.equal_2_object();
-
-    Nt_traits       nt_traits;
-    const Rational  sqr_r = CGAL::square (r);
-    const Algebraic alg_r = nt_traits.convert (r);
-    Rational        x1, y1;              // The source of the current edge.
-    Rational        x2, y2;              // The target of the current edge.
-    Rational        delta_x, delta_y;    // (x2 - x1) and (y2 - y1), resp.
-    Algebraic       len;                 // The length of the current edge.
-    Algebraic       trans_x, trans_y;    // The translation vector.
-    Alg_point_2     op1, op2;            // The edge points of the offset edge.
-    Alg_point_2     first_op;            // The first offset point.
-    Algebraic       a, b, c;
-
-    unsigned int                    curve_index = 0;
-    Traits_2                        traits;
-    std::list<Object>               xobjs;
-    std::list<Object>::iterator     xobj_it;
-    typename Traits_2::Make_x_monotone_2
-                       f_make_x_monotone = traits.make_x_monotone_2_object();
-    Curve_2                         arc;
-    X_monotone_curve_2              xarc;
-    bool                            assign_success;
-
-    do
-    {
-      // Get a circulator for the next vertex (in the proper orientation).
-      if (forward)
-        ++next;
-      else
-        --next;
-
-      // Compute the vector v = (delta_x, delta_y) of the current edge,
-      // and compute the edge length ||v||.
-      x1 = curr->x();
-      y1 = curr->y();
-      x2 = next->x();
-      y2 = next->y();
-
-      delta_x = x2 - x1;
-      delta_y = y2 - y1;
-      len = nt_traits.sqrt (nt_traits.convert (CGAL::square (delta_x) + 
-                                               CGAL::square (delta_y)));
-
-      // The angle theta between the vector v and the x-axis is given by:
-      //
-      //                 y2 - y1                        x2 - x1
-      //   sin(alpha) = ---------         cos(alpha) = ---------
-      //                  ||v||                          ||v||
-      //
-      // To offset the endpoints of the current edge we compute a vector
-      // (trans_x, trans_y) perpendicular to v. Since we traverse the polygon
-      // in a counterclockwise manner, the angle this vector forms with the
-      // x-axis is (alpha - PI/2), and we have:
-      //
-      //   trans_x = r*cos(alpha - PI/2) = r*sin(alpha)
-      //   trans_y = r*sin(alpha - PI/2) = -r*cos(alpha)
-      trans_x = nt_traits.convert (r * delta_y) / len;
-      trans_y = nt_traits.convert (-r * delta_x) / len;
-
-      // Construct the first offset vertex, which corresponds to the
-      // source vertex of the current polygon edge.
-      op1 = Alg_point_2 (nt_traits.convert (x1) + trans_x, 
-                         nt_traits.convert (y1) + trans_y);
-
-      if (curr == first)
-      {
-        // This is the first edge we visit -- store op1 for future use.
-        first_op = op1;
-      }
-      else
-      {
-        if (! f_equal (op2, op1))
-        {
-          // Connect op2 (from the previous iteration) and op1 with a circular
-          // arc, whose supporting circle is (x1, x2) with radius r.
-          arc = Curve_2 (Rat_circle_2 (*curr, sqr_r),
-                         CGAL::COUNTERCLOCKWISE,
-                         op2, op1);
-          
-          // Subdivide the arc into x-monotone subarcs and append them to the
-          // convolution cycle.
-          xobjs.clear();
-          f_make_x_monotone (arc, std::back_inserter(xobjs));
-          
-          for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it)
-          {
-            assign_success = CGAL::assign (xarc, *xobj_it);
-            CGAL_assertion (assign_success);
-            CGAL_USE(assign_success);
-
-            *oi = Labeled_curve_2 (xarc,
-                                   X_curve_label (xarc.is_directed_right(),
-                                                  cycle_id,
-                                                  curve_index));
-            ++oi;
-            curve_index++;
-          }
-        }
-      }
-
-      // Construct the second offset vertex, which corresponds to the
-      // target vertex of the current polygon edge.
-      op2 = Alg_point_2 (nt_traits.convert (x2) + trans_x, 
-                         nt_traits.convert (y2) + trans_y);
-
-      // The equation of the line connecting op1 and op2 is given by:
-      //
-      //   (y1 - y2)*x + (x2 - x1)*y + (r*len - y1*x2 - x1*y2) = 0
-      //
-      a = nt_traits.convert (-delta_y);
-      b = nt_traits.convert (delta_x);
-      c = alg_r*len - nt_traits.convert (y1*x2 - x1*y2);
-
-      xarc = X_monotone_curve_2 (a, b, c,
-                                 op1, op2);
-
-      *oi = Labeled_curve_2 (xarc,
-                             X_curve_label (xarc.is_directed_right(),
-                                            cycle_id,
-                                            curve_index));
-      ++oi;
-      curve_index++;
-
-      // Proceed to the next polygon vertex.
-      curr = next;
-    
-    } while (curr != first);
-
-    if (! f_equal (op2, first_op))
-    {
-      // Close the convolution cycle by creating the final circular arc,
-      // centered at the first vertex.
-      arc = Curve_2 (Rat_circle_2 (*first, sqr_r),
-                     CGAL::COUNTERCLOCKWISE,
-                     op2, first_op);
-      
-      // Subdivide the arc into x-monotone subarcs and append them to the
-      // convolution cycle.
-      bool           is_last;
-      
-      xobjs.clear();
-      f_make_x_monotone (arc, std::back_inserter(xobjs));
-      
-      xobj_it = xobjs.begin();
-      while (xobj_it != xobjs.end())
-      {
-        assign_success = CGAL::assign (xarc, *xobj_it);
-        CGAL_assertion (assign_success);
-        CGAL_USE(assign_success);
-        
-        ++xobj_it;
-        is_last = (xobj_it == xobjs.end());
-
-        *oi = Labeled_curve_2 (xarc,
-                               X_curve_label (xarc.is_directed_right(),
-                                              cycle_id,
-                                              curve_index,
-                                              is_last));
-        ++oi;
-        curve_index++;
-      }
-    }
-
-    return (oi);
-  }
-
-};
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Labels.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Labels.h
deleted file mode 100644
index 2d30204..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Labels.h
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_MINKOWSKI_SUM_LABELS_H
-#define CGAL_MINKOWSKI_SUM_LABELS_H
-
-namespace CGAL {
-
-/*! \class
- * A label for endpoints of Minkowski-sum curves.
- */
-class Point_label
-{
-private:
-
-  unsigned int  _component;   // The index of the component this point
-                              // belongs to.
-  unsigned int  _index;       // Index of the point in the component.
-
-public:
-
-  /*! Default constructor. */
-  Point_label () :
-    _component (0),
-    _index (0)
-  {}
-
-  /*!
-   * Constructor.
-   * \param component The index of the component.
-   * \param index Index of the point within the component.
-   */
-  Point_label (unsigned int component, 
-               unsigned int index) :
-    _component (component),
-    _index (index)
-  {
-    CGAL_precondition (component != 0);
-  }
-
-  /*! Check whether the label is valid. */
-  bool is_valid () const
-  {
-    return (_component != 0);
-  }
-
-  /*! Check two labels for equality. */
-  bool operator== (const Point_label& label) const
-  {
-    if (_component == 0 || label._component == 0)
-      return (false);
-
-    return (_component == label._component &&
-	    _index == label._index);
-  }
-
-  /*! Get the component. */
-  unsigned int component () const
-  {
-    return (_component);
-  }
-
-  /*! Get the index within the component. */
-  unsigned int index () const
-  {
-    return (_index);
-  }
-
-  /*! Set the component. */
-  void set_component (unsigned int component)
-  {
-    CGAL_precondition (component != 0);
-    
-    _component = component;
-    return;
-  }
-
-  /*! Set the index. */
-  void set_index (unsigned int index)
-  {
-    _index = index;
-    return;
-  }
-};
-
-/*! \class
- * A label for Minkowski-sum x-monotone curves.
- */
-class X_curve_label
-{
-private:
-
-  unsigned int  _component;   // The index of the component the x-monotone
-                              // curve belongs to.
-  unsigned int  _index;       // Index of the curve in the component.
-  bool          _is_last;     // Is the curve the last one in its component.
-  int           _right;       // The number of curves directed from left to
-                              // right that are associated with the curve.
-  int           _left;        // The number of curves directed from right to
-                              // left that are associated with the curve.
-
-public:
-
-  /*! Default constructor. */
-  X_curve_label () :
-    _component (0),
-    _index (0),
-    _is_last (false),
-    _right (0),
-    _left (0)
-  {}
-
-  /*!
-   * Constructor.
-   * \param is_directed_right Is the curve directed from left to right.
-   * \param component The index of the component.
-   * \param index Index of the curve in the component.
-   * \param is_last Is this the last curve of the component.
-   */
-  X_curve_label (bool is_directed_right,
-                 unsigned int component, 
-                 unsigned int index,
-                 bool is_last = false) :
-    _component (component),
-    _index (index),
-    _is_last (is_last),
-    _right (is_directed_right ? 1 : 0),
-    _left (is_directed_right ? 0 : 1)
-  {
-    CGAL_precondition (component != 0);
-  }
-
-  /*!
-   * Construct a merged curve label.
-   * \param label1 The first label.
-   * \param label2 The second label.
-   */
-  X_curve_label (const X_curve_label& label1,
-                 const X_curve_label& label2) :
-    _component (0),
-    _index (0),
-    _is_last (false),
-    _right (label1._right + label2._right),
-    _left (label1._left + label2._left)
-  {}
-
-  /*! Check whether the label is valid. */
-  bool is_valid () const
-  {
-    return (_component != 0);
-  }
-
-  /*! Check two labels for equality. */
-  bool operator== (const X_curve_label& label) const
-  {
-    if (_component == 0)
-      return (false);
-
-    return (_component == label._component &&
-	    _index == label._index);
-  }
-
-  /*! Check whether the given label is the predecessor of this label. */
-  bool is_prev (const X_curve_label& label) const
-  {
-    if (_component == 0)
-      return (false);
-
-    return (_component == label._component &&
-	    (label._index + 1 == _index ||
-	     (label._is_last && _index == 0)));
-  }
-
-  /*! Check whether the given label is the succcessor of this label. */
-  bool is_next (const X_curve_label& label) const
-  {
-    if (_component == 0)
-      return (false);
-
-    return (_component == label._component &&
-	    (_index + 1 == label._index ||
-	     (_is_last && label._index == 0)));
-  }
-
-  /*!
-   * Check if the given label is the successor of this label
-   * (or vice-versa).
-   */
-  bool is_adjacent (const X_curve_label& label) const
-  {
-    if (_component == 0)
-      return (false);
-
-    // Two curves can be adjacent only if they belong to the same component.
-    if (_component != label._component)
-      return (false);
-
-    // Check if one label is adjacent to the next.
-    return ((_index + 1 == label._index) ||
-            (label._index + 1 == _index) ||
-            (_is_last && label._index == 0) ||
-            (label._is_last && _index == 0));
-  }
-
-  /*! Get the number of curves directed from left to right. */
-  int right_count () const
-  {
-    return (_right);
-  }
-
-  /*! Get the number of curves directed from right to left. */
-  int left_count () const
-  {
-    return (_left);
-  }
-
-  /*! Get the component. */
-  unsigned int component () const
-  {
-    return (_component);
-  }
-
-  /*! Get the index within the component. */
-  unsigned int index () const
-  {
-    return (_index);
-  }
-
-  /*! Check whether this is the last curve in the component. */
-  bool is_last () const
-  {
-    return (_is_last);
-  }
-
-  /*! Set the component. */
-  void set_component (unsigned int component)
-  {
-    CGAL_precondition (component != 0);
-    
-    _component = component;
-    return;
-  }
-
-  /*!
-   * Set the curve index within the component. 
-   * \param index The index in the component.
-   * \param is_last Is this the last curve of the component.
-   */
-  void set_index (unsigned int index, bool is_last = false)
-  {
-    _index = index;
-    _is_last = is_last;
-    return;
-  }
-
-  /*! Get the flag value. */
-  bool get_flag () const
-  {
-    return (_is_last);
-  }
-
-  /*! Set the flag value. */
-  void set_flag (bool flag)
-  {
-    _is_last = flag;
-    return;
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h
deleted file mode 100644
index 6780f5c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h
+++ /dev/null
@@ -1,684 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_MINKOWSKI_SUM_CONV_H
-#define CGAL_MINKOWSKI_SUM_CONV_H
-
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Minkowski_sum_2/Labels.h>
-#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
-#include <CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h>
-
-namespace CGAL {
-
-/*! \class
- * A class for computing the Minkowski sum of two simple polygons based on the
- * convolution of their boundaries.
- */
-template <class Kernel_, class Container_>
-class Minkowski_sum_by_convolution_2
-{
-public:
-
-  typedef Kernel_                                        Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
-
-private:
-
-  // Kernel types:
-  typedef typename Kernel::Point_2                       Point_2;
-  typedef typename Kernel::Vector_2                      Vector_2;
-  typedef typename Kernel::Direction_2                   Direction_2;
-  
-  // Kernel functors:
-  typedef typename Kernel::Equal_2                       Equal_2;
-  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
-  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
-  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
-  typedef typename Kernel::Construct_opposite_line_2     Opposite_line_2;
-  typedef typename Kernel::Orientation_2                 Compute_orientation_2;
-  typedef typename Kernel::Compare_xy_2                  Compare_xy_2;
-  typedef typename Kernel::Counterclockwise_in_between_2 Ccw_in_between_2;
-
-  // Polygon-related types:
-  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
-  typedef std::pair<Vertex_circulator, unsigned int>     Vertex_ref;
-  typedef std::pair<Vertex_ref, Vertex_ref>              Anchor;
-  typedef std::list<Anchor>                              Anchors_queue;
-
-  /*! \class
-   * An auxiliary class for representing labels of convolved vertex pairs.
-   */
-  class Convolution_label
-  {
-  private:
-    
-    unsigned int      index1;       // Vertex index of the first polygon.
-    unsigned int      index2;       // Vertex index of the second polygon.
-    unsigned int      move_on;      // On which polygon do we move.
-
-  public:
-
-    /*! Default constructor. */
-    Convolution_label () :
-      move_on (0)
-    {}
-
-    /*! Constructor with parameters. */
-    Convolution_label (unsigned int ind1, unsigned int ind2, 
-                       unsigned int move) :
-      index1 (ind1),
-      index2 (ind2),
-      move_on (move)
-    {
-      CGAL_precondition (move_on == 1 || move_on == 2);
-    }
-
-    /*! Less-then operator (for the usage of std::set). */
-    bool operator< (const Convolution_label& label) const
-    {
-      if (index1 < label.index1)
-        return (true);
-      else if (index1 > label.index1)
-        return (false);
-
-      if (index2 < label.index2)
-        return (true);
-      else if (index2 > label.index2)
-        return (false);
-
-      return (move_on < label.move_on);
-    }
-  };
-
-  typedef std::set<Convolution_label>                     Labels_set;
-
-  // Traits-related types:
-  typedef Arr_segment_traits_2<Kernel>                    Segment_traits_2;
-  typedef Arr_labeled_traits_2<Segment_traits_2>          Traits_2;
-
-  typedef typename Segment_traits_2::X_monotone_curve_2   Segment_2;
-  typedef typename Traits_2::X_monotone_curve_2           Labeled_segment_2;
-  typedef std::list<Labeled_segment_2>                    Segments_list;
-
-  typedef Union_of_segment_cycles_2<Traits_2, Polygon_2>  Union_2;
-
-  // Data members:
-  Equal_2                 f_equal;
-  Translate_point_2       f_add;
-  Construct_vector_2      f_vector;
-  Construct_direction_2   f_direction;
-  Opposite_line_2         f_opp_line;
-  Compute_orientation_2   f_orientation;
-  Compare_xy_2            f_compare_xy;
-  Ccw_in_between_2        f_ccw_in_between;
-
-public:
-
-  /*! Default constructor. */
-  Minkowski_sum_by_convolution_2 ()
-  {
-    // Obtain kernel functors.
-    Kernel                ker;
-
-    f_equal = ker.equal_2_object();
-    f_add = ker.construct_translated_point_2_object(); 
-    f_vector = ker.construct_vector_2_object();
-    f_direction = ker.construct_direction_2_object();
-    f_opp_line = ker.construct_opposite_line_2_object();
-    f_orientation = ker.orientation_2_object();
-    f_compare_xy = ker.compare_xy_2_object();
-    f_ccw_in_between = ker.counterclockwise_in_between_2_object();
-  }    
-
-  /*!
-   * Compute the Minkowski sum of two simple polygons.
-   * Note that as the input polygons may not be convex, the Minkowski sum may
-   * not be a simple polygon. The result is therefore represented as
-   * the outer boundary of the Minkowski sum (which is always a simple polygon)
-   * and a container of simple polygons, representing the holes inside this
-   * polygon.
-   * \param pgn1 The first polygon.
-   * \param pgn2 The second polygon.
-   * \param sum_bound Output: A polygon respresenting the outer boundary
-   *                          of the Minkowski sum.
-   * \param sum_holes Output: An output iterator for the holes in the sum,
-   *                          represented as simple polygons.
-   * \pre Both input polygons are simple.
-   * \return A past-the-end iterator for the holes in the sum.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_2& pgn1,
-                             const Polygon_2& pgn2,
-                             Polygon_2& sum_bound,
-                             OutputIterator sum_holes) const
-  {
-    CGAL_precondition (pgn1.is_simple());
-    CGAL_precondition (pgn2.is_simple());
-
-    // Prepare the vector of directions for the first polygon.
-    const unsigned int    n1 = static_cast<unsigned int>(pgn1.size());
-    const bool            forward1 = (pgn1.orientation() == COUNTERCLOCKWISE);
-    std::vector<Direction_2>  dirs1 (n1);
-    Vertex_circulator         curr1, next1;
-    unsigned int              k1;
-
-    next1 = curr1 = pgn1.vertices_circulator();
-    for (k1 = 0; k1 < n1; k1++)
-    {
-      if (forward1)
-        ++next1;
-      else
-        --next1;
-
-      dirs1[k1] = f_direction (f_vector (*curr1, *next1));
-      curr1 = next1;
-    }
-
-    // Prepare the vector of directions for the second polygon.
-    // Also prepare a list containing all reflex vertices of this polygon.
-    const unsigned int    n2 = static_cast<unsigned int>(pgn2.size());
-    const bool            forward2 = (pgn2.orientation() == COUNTERCLOCKWISE);
-    std::vector<Direction_2>  dirs2 (n2);
-    Vertex_circulator         prev2, curr2, next2;
-    Vertex_ref                bottom_left;
-    // bool                      is_convex2 = true;
-    std::list<Vertex_ref>     reflex_vertices;
-    unsigned int              k2;
-    
-    prev2 = next2 = curr2 = pgn2.vertices_circulator();
-    
-    if (forward2)
-      --prev2;
-    else
-      ++prev2;
-
-    for (k2 = 0; k2 < n2; k2++)
-    {
-      if (forward2)
-        ++next2;
-      else
-        --next2;
-
-      if (k2 == 0)
-        bottom_left = Vertex_ref (curr2, 0);
-      else if (f_compare_xy (*curr2, *(bottom_left.first)) == SMALLER)
-        bottom_left = Vertex_ref (curr2, k2);
-
-      if (f_orientation (*prev2, *curr2, *next2) == RIGHT_TURN)
-      {
-        // We found a reflex vertex.
-        // is_convex2 = false;
-        reflex_vertices.push_back (Vertex_ref (curr2, k2));
-      }
-
-      dirs2[k2] = f_direction (f_vector (*curr2, *next2));
-      prev2 = curr2;
-      curr2 = next2;
-    }
-
-    // Add the bottom-left vertex of the second polygon to the reflex vertices.
-    typename std::list<Vertex_ref>::iterator  reflex_it;
-
-    reflex_vertices.push_front (bottom_left);
-
-    // Construct the segments of the convolution cycles.
-    unsigned int                  curr_id = 0;
-    unsigned int                  cycles = 0;
-    Segments_list                 conv_segments;
-    Segments_list                 cycle;
-    Labels_set                    used_labels;
-    Anchor                        anchor;
-    Anchors_queue                 queue;
-    unsigned int                  loops;
-
-    for (reflex_it = reflex_vertices.begin();
-         reflex_it != reflex_vertices.end(); ++reflex_it)
-    {
-      // Get the current reflex vertex (or the bottom-left vertex).
-      next2 = curr2 = reflex_it->first;
-      k2 = reflex_it->second;
-
-      if (forward2)
-        ++next2;
-      else
-        --next2;
-
-      // Search the first polygon for a vertex that contains (k1, k2, 1) in
-      // a convolution cycle.
-      next1 = curr1 = pgn1.vertices_circulator();
-      for (k1 = 0; k1 < n1; k1++)
-      {
-        if (forward1)
-          ++next1;
-        else
-          --next1;
-        
-        if ((used_labels.count (Convolution_label (k1, k2, 1)) == 0 &&
-             (f_ccw_in_between (dirs1[k1],
-                                dirs2[(n2 + k2 - 1) % n2],
-                                dirs2[k2]) ||
-              f_equal (dirs1[k1], dirs2[k2]))) ||
-            (used_labels.count (Convolution_label (k1, k2, 2)) == 0 &&
-             f_ccw_in_between (dirs2[k2],
-                               dirs1[(n1 + k1 - 1) % n1],
-                               dirs1[k1])))
-        {
-          // Construct the current convolution cycle.
-          queue.clear();
-          queue.push_back (Anchor (Vertex_ref (curr1, k1),
-                                   Vertex_ref (curr2, k2)));
-          loops = 0;
-
-          while (! queue.empty())
-          {
-            // Pop the first pair of anchor vertices from the queue.
-            anchor = queue.front();
-            queue.pop_front();
-            loops++;
-
-            const Vertex_ref&    vert1 = anchor.first;
-            const Vertex_ref&    vert2 = anchor.second;
-
-            if (loops > 0 &&
-                used_labels.count (Convolution_label (vert1.second, 
-                                                      vert2.second, 2)) != 0)
-            {
-              loops--;
-              continue;
-            }
-
-            // Add a loop to the current convolution cycle.
-            curr_id++;
-            _convolution_cycle (curr_id,
-                                n1, forward1, dirs1, vert1.first, vert1.second,
-                                n2, forward2, dirs2, vert2.first, vert2.second,
-                                used_labels, queue,
-                                cycle);
-
-            // Catenate the segments of the current loop to the convolution
-            // list.
-            if (cycle.empty())
-            {
-              loops--;
-            }
-            else
-            {
-              conv_segments.splice (conv_segments.end(), cycle);
-              CGAL_assertion (cycle.empty());
-            }
-          }
-          cycles++;
-        }
-
-        curr1 = next1;
-      }
-    }
-
-    // Compute the union of the cycles that represent the Minkowski sum.
-    Union_2     unite;
-
-    sum_holes = unite (conv_segments.begin(), conv_segments.end(),
-                       sum_bound, sum_holes);
-
-    return (sum_holes);
-  }
-
-private:
-
-  /*!
-   * Compute a convolution cycle starting from tow given vertices.
-   * \param cycle_id The index of the current cycle.
-   * \param n1 The size of the first polygon.
-   * \param forward1 Whether we move forward or backward on this polygon.
-   * \param dirs1 The directions of the edges in the first polygon.
-   * \param curr1 Points to the current vertex in the first polygon.
-   * \param k1 The index of this vertex (between 0 and n1 - 1).
-   * \param n2 The size of the second polygon.
-   * \param forward2 Whether we move forward or backward on this polygon.
-   * \param dirs2 The directions of the edges in the second polygon.
-   * \param curr2 Points to the current vertex in the second polygon.
-   * \param k2 The index of this vertex (between 0 and n2 - 1).
-   * \param used_labels Input/output: The segment labels used so far.
-   * \param queue A queue of anchor vertices for loops in the cycle.
-   * \param cycle Output: An list of labeled segments that constitute the
-   *                      convolution cycle.
-   * \return A past-the-end iterator for the output segments.
-   */
-  void _convolution_cycle (unsigned int cycle_id,
-                           unsigned int n1, bool forward1, 
-                           const std::vector<Direction_2>& dirs1, 
-                           Vertex_circulator curr1, unsigned int k1,
-                           unsigned int n2, bool forward2, 
-                           const std::vector<Direction_2>& dirs2, 
-                           Vertex_circulator curr2, unsigned int k2,
-                           Labels_set& used_labels,
-                           Anchors_queue& queue,
-                           Segments_list& cycle) const
-
-  {
-    // Update the circulator pointing to the next vertices in both polygons.
-    unsigned int          seg_index = 0;
-    const unsigned int    first1 = k1;
-    const unsigned int    first2 = k2;
-    Vertex_circulator     next1 = curr1;
-    Vertex_circulator     next2 = curr2;
-    Convolution_label     label;
-    Point_2               first_pt, curr_pt, next_pt;
-    bool                  inc1, inc2;
-    Comparison_result     res;
-    const bool            MOVE_ON_1 = true, MOVE_ON_2 = false;
-
-    if (forward1)
-      ++next1;
-    else
-      --next1;
-
-    if (forward2)
-      ++next2;
-    else
-      --next2;
-    
-    // Start constructing the convolution cycle from *curr1 and *curr2.
-    curr_pt = first_pt = f_add (*curr1, f_vector(CGAL::ORIGIN, *curr2));
-    do
-    {
-      // Determine on which polygons we should move.
-      inc1 = false;
-      inc2 = false;
-
-      if (f_ccw_in_between (dirs1[k1],
-                            dirs2[(n2 + k2 - 1) % n2],
-                            dirs2[k2]))
-      {
-        inc1 = true;
-
-        label = Convolution_label (k1, k2, 1);
-        if (used_labels.count (label) != 0)
-          inc1 = false;
-      }
-
-      if (f_ccw_in_between (dirs2[k2],
-                            dirs1[(n1 + k1 - 1) % n1],
-                            dirs1[k1]))
-      {
-        if (inc1)
-        {
-          // If we are about to increment the first polygon, add an anchor
-          // to the queue. Next time we reach here we will increment the
-          // second polygon (and proceed until reaching this point again and
-          // closing the loop).
-          label = Convolution_label (k1, k2, 2);
-          if (used_labels.count (label) == 0)
-          {
-            queue.push_back (Anchor (Vertex_ref (curr1, k1),
-                                     Vertex_ref (curr2, k2)));
-          }
-        }
-        else
-        {
-          inc2 = true;
-
-          label = Convolution_label (k1, k2, 2);
-          if (used_labels.count (label) != 0)
-            inc2 = false;
-        }
-      }
-
-      if (! inc1 && ! inc2 &&
-          f_equal (dirs1[k1], dirs2[k2]))
-      {
-        inc1 = true;
-        inc2 = true;
-
-        label = Convolution_label (k1, k2, 1);
-        if (used_labels.count (label) != 0)
-          inc1 = false;
-
-        if (inc1)
-          label = Convolution_label ((k1 + 1) % n1, k2, 2); 
-        else
-          label = Convolution_label (k1, k2, 2);
-
-        if (used_labels.count (label) != 0)
-          inc2 = false;
-      }
-
-      CGAL_assertion (inc1 || inc2);
-
-      // Act according to the increment flags.
-      if (inc1)
-      {
-        // Translate the current edge of the first polygon to *curr2.
-        next_pt = f_add (*next1, f_vector(CGAL::ORIGIN, *curr2));
-
-        res = f_compare_xy (curr_pt, next_pt);
-        CGAL_assertion (res != EQUAL);
-
-        cycle.push_back (Labeled_segment_2 (Segment_2 (curr_pt, next_pt),
-                                            X_curve_label ((res == SMALLER),
-                                                           cycle_id,
-                                                           seg_index,
-                                                           MOVE_ON_1)));
-        used_labels.insert (Convolution_label (k1, k2, 1));
-        seg_index++;
-
-        // Proceed to the next vertex of the first polygon.
-        curr1 = next1;
-        k1 = (k1 + 1) % n1;
-
-        if (forward1)
-          ++next1;
-        else
-          --next1;
-
-        curr_pt = next_pt;
-      }
-
-      if (inc2)
-      {
-        // Translate the current edge of the second polygon to *curr1.
-        next_pt = f_add (*next2, f_vector(CGAL::ORIGIN, *curr1));
-
-        res = f_compare_xy (curr_pt, next_pt);
-        CGAL_assertion (res != EQUAL);
-
-        cycle.push_back (Labeled_segment_2 (Segment_2 (curr_pt, next_pt),
-                                            X_curve_label ((res == SMALLER),
-                                                           cycle_id,
-                                                           seg_index,
-                                                           MOVE_ON_2)));
-        used_labels.insert (Convolution_label (k1, k2, 2));
-        seg_index++;
-
-        // Proceed to the next vertex of the second polygon.
-        curr2 = next2;
-        k2 = (k2 + 1) % n2;
-
-        if (forward2)
-          ++next2;
-        else
-          --next2;
-
-        curr_pt = next_pt;
-      }
-
-    } while (k1 != first1 || k2 != first2); 
-
-    CGAL_assertion (f_equal (curr_pt, first_pt));
-    
-    // Before moving un-necessary sub-cycles from the segment list, make sure
-    // the list contains no "cyclic" sub-cylces. We do that by making sure that
-    // the first and last segments of the list correspond to traversals of
-    // different polygons.
-    int     steps = static_cast<int>(cycle.size());
-
-    while (steps > 0 &&
-           cycle.front().label().get_flag() == 
-           cycle.back().label().get_flag())
-    {
-      cycle.push_back (cycle.front());
-      cycle.pop_front();
-      steps--;
-    }
-
-    if (steps == 0)
-    {
-      cycle.clear();
-      return;
-    }
-
-    // Reduce un-necessary sub-cycles. This is done by scanning the segments
-    // list for subsequences sharing a common move_on indicator. When we
-    // encounter such a subsequence that equals the size of the corresponding
-    // polygon, we can safely remove it from the convolution cycle.
-    typename std::list<Labeled_segment_2>::iterator  first, curr;
-    bool                                             move_on;
-    unsigned int                                     count = 1;
-    bool                                             reduced_cycle = false;
-
-    curr = first = cycle.begin();
-    move_on = first->label().get_flag();
-
-    curr->label().set_flag (false);
-    ++curr;
-    while (curr != cycle.end())
-    {
-      if ((move_on == MOVE_ON_1 && count == n1) ||
-          (move_on == MOVE_ON_2 && count == n2))
-      {
-        // We have discovered a sequence of moves on one of the polygon that
-        // equals the polygon size, so we can remove this sequence.
-        cycle.erase (first, curr);
-        reduced_cycle = true;
-        first = curr;
-        move_on = first->label().get_flag();
-        count = 1;
-      }
-      else
-      {
-        if (move_on == curr->label().get_flag())
-        {
-          count++;
-        }
-        else
-        {
-          first = curr;
-          move_on = first->label().get_flag();
-          count = 1;
-        }
-      }
-
-      curr->label().set_flag (false);
-      ++curr;
-    }
-
-    if ((move_on == MOVE_ON_1 && count == n1) ||
-        (move_on == MOVE_ON_2 && count == n2))
-    {
-      cycle.erase (first, curr);
-      reduced_cycle = true;
-    }
-
-    // Eliminate "antenna"s that occur in the cycle.
-    typename std::list<Labeled_segment_2>::iterator  next, after_next;
-    bool                                             is_last = false;
-
-    next = curr = cycle.begin();
-    ++next;
-
-    do
-    {
-      // If the current segment is the last one in the cycle, its next segment
-      // (in cyclic order) is the first one.
-      if (next == cycle.end())
-      {
-        is_last = true;
-        next = cycle.begin();
-        after_next = cycle.end();
-      }
-      else
-      {
-        after_next = next;
-        ++after_next;
-      }
-
-      // Check whether the current segment and the next segment form an
-      // "antenna". This can happen only if their supporting lines are
-      // opposite (as we know curr's target equals next's source):
-      if (f_equal (curr->line(), f_opp_line (next->line())))
-      {
-        // In case curr's source equals next's target, then the two segments
-        // are opposite and cancel one another. We can therefore remove them
-        // both. Otherwise, we replace them with the segment directed from
-        // curr's source to next's target.
-        curr_pt = curr->source();
-        next_pt = next->target();
-
-        res = f_compare_xy (curr_pt, next_pt);
-
-        if (res != EQUAL)
-        {
-          cycle.insert (curr,
-                        Labeled_segment_2 (Segment_2 (curr_pt, next_pt),
-                                           X_curve_label ((res == SMALLER),
-                                                          cycle_id,
-                                                          curr->label().index(),
-                                                          false)));
-        }
-
-        cycle.erase (curr);
-        cycle.erase (next);
-        curr = after_next;
-
-        if (after_next != cycle.end())
-        {
-          next = curr;
-          ++next;
-        }
-
-        // Mark that we have reduced the cycle.
-        reduced_cycle = true;
-      }
-      else
-      {
-        curr = next;
-        if (next != cycle.end())
-        {
-          ++next;
-        }
-      }
-
-    } while (! is_last);
-
-    // In case we have reduced the cycle, re-number the segments in it.
-    if (reduced_cycle)
-    {
-      seg_index = 0;
-      for (curr = cycle.begin(); curr != cycle.end(); ++curr)
-        curr->label().set_index (seg_index++);
-    }
-    cycle.back().label().set_flag (true);
-    return;
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h
deleted file mode 100644
index c78a4e6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_MINKOWSKI_SUM_DECOMP_2_H
-#define CGAL_MINKOWSKI_SUM_DECOMP_2_H
-
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-
-#include <CGAL/Boolean_set_operations_2.h>
-#include <CGAL/General_polygon_set_2.h>
-#include <CGAL/Gps_segment_traits_2.h>
-#include <list>
-
-namespace CGAL {
-
-/*! \class
- * A class for computing the Minkowski sum of two simple polygons based on
- * their decomposition two convex sub-polygons, taking the pairwise sums and
- * computing the union of the sub-sums.
- */
-
-template <class DecompStrategy_, class Container_>
-class Minkowski_sum_by_decomposition_2
-{
-public:
-  
-  typedef DecompStrategy_                             Decomposition_strategy;
-  typedef Container_                                  Container;
-  typedef typename Decomposition_strategy::Polygon_2  Polygon_2;
-
-private:
-
-  // Kernel types:
-  typedef typename Decomposition_strategy::Kernel        Kernel;
-  typedef typename Kernel::Point_2                       Point_2;
-  typedef typename Kernel::Vector_2                      Vector_2;
-  typedef typename Kernel::Direction_2                   Direction_2;
- 
-  // Kernel functors:
-  typedef typename Kernel::Equal_2                       Equal_2;
-  typedef typename Kernel::Compare_angle_with_x_axis_2   Compare_angle_2;
-  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
-  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
-  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
-  typedef typename Kernel::Orientation_2                 Compute_orientation_2;
-  typedef typename Kernel::Compare_x_2                   Compare_x_2;
-  typedef typename Kernel::Compare_y_2                   Compare_y_2;
-  typedef typename Kernel::Compare_xy_2                  Compare_xy_2;
-
-  // Polygon-related types:
-  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
-  typedef std::list<Polygon_2>                           Polygons_list;
-  typedef typename Polygons_list::iterator               Polygons_iterator;
-
-  typedef CGAL::Arr_segment_traits_2<Kernel>             Arr_segment_traits;
-  typedef CGAL::Gps_segment_traits_2<Kernel,Container,Arr_segment_traits>  Traits_2;
-  typedef CGAL::General_polygon_set_2<Traits_2>          General_polygon_set_2;
-  typedef CGAL::Polygon_with_holes_2<Kernel,Container>   Polygon_with_holes_2;
-  typedef std::list<Polygon_with_holes_2>                Polygon_with_holes_list;
-
-  // Data members:
-  Equal_2                 f_equal;
-  Compare_angle_2         f_compare_angle;
-  Translate_point_2       f_add;
-  Construct_vector_2      f_vector;
-  Construct_direction_2   f_direction;
-  Compute_orientation_2   f_orientation;
-  Compare_x_2             f_compare_x;
-  Compare_y_2             f_compare_y;
-  Compare_xy_2            f_compare_xy;
-
-public:
-
-  /*! Default constructor. */
-  Minkowski_sum_by_decomposition_2 ()
-  {
-    // Obtain kernel functors.
-    Kernel                ker;
-
-    f_equal = ker.equal_2_object();
-    f_compare_angle = ker.compare_angle_with_x_axis_2_object();
-    f_add = ker.construct_translated_point_2_object(); 
-    f_vector = ker.construct_vector_2_object();
-    f_direction = ker.construct_direction_2_object();
-    f_orientation = ker.orientation_2_object();
-    f_compare_x = ker.compare_x_2_object();
-    f_compare_y = ker.compare_y_2_object();
-    f_compare_xy = ker.compare_xy_2_object();
-  }
-
-  /*!
-   * Compute the Minkowski sum of two simple polygons.
-   * \param pgn1 The first polygon.
-   * \param pgn2 The second polygon.
-   * \pre Both input polygons are simple.
-   * \return The resulting polygon with holes, representing the sum.
-   */
-  Polygon_with_holes_2
-  operator() (const Polygon_2& pgn1,
-              const Polygon_2& pgn2) const
-  {
-    CGAL_precondition (pgn1.is_simple());
-    CGAL_precondition (pgn2.is_simple());
-
-    // Decompose both input polygons to convex sub-polygons.
-    Decomposition_strategy  decomp_strat;
-    Polygons_list           sub_pgns1;
-    Polygons_list           sub_pgns2;
-    Polygons_list           sub_sum_polygons;
-
-    decomp_strat (pgn1, std::back_inserter(sub_pgns1));
-    decomp_strat (pgn2, std::back_inserter(sub_pgns2));
-
-    // Compute the sub-sums of all pairs of sub-polygons.
-    Polygons_iterator       end1 = sub_pgns1.end();
-    Polygons_iterator       end2 = sub_pgns2.end();
-    Polygons_iterator       curr1, curr2;
-
-    for (curr1 = sub_pgns1.begin(); curr1 != end1; ++curr1)
-    {
-      for (curr2 = sub_pgns2.begin(); curr2 != end2; ++curr2)
-      {
-        // Compute the sum of the current pair of convex sub-polygons.
-        Polygon_2               sub_sum;
-        _compute_sum_of_convex (*curr1, *curr2, sub_sum);
-
-        sub_sum_polygons.push_back(sub_sum);
-            
-      }
-    }
-    
-    General_polygon_set_2 gps;
-  
-    gps.join(sub_sum_polygons.begin(),sub_sum_polygons.end());
-  
-    Polygon_with_holes_list sum;
-
-    gps.polygons_with_holes(std::back_inserter(sum));
- 
-    return (*(sum.begin()));
-  }
-
-private:
-
-  /*!
-   * Compute the Minkowski sum of two convex polygons.
-   * \param pgn1 The first convex polygon.
-   * \param pgn2 The second convex polygon.
-   * \param sub_sum Output: Polygon which is the sub sum of the two convex polygons
-   */
-  void _compute_sum_of_convex (const Polygon_2& pgn1,
-                               const Polygon_2& pgn2,
-                               Polygon_2& sub_sum) const
-  {
-    // Find the bottom-left vertex in both polygons.
-    Vertex_circulator         first1, curr1, next1;
-    Vertex_circulator         bottom_left1;
-    Comparison_result         res;
-    bottom_left1 = curr1 = first1 = pgn1.vertices_circulator();
-    ++curr1;
-    while (curr1 != first1)
-    {
-      res = f_compare_y (*curr1, *bottom_left1);
-      if (res == SMALLER ||
-          (res == EQUAL && f_compare_x (*curr1, *bottom_left1) == SMALLER))
-      {
-        bottom_left1 = curr1;
-      }
-      ++curr1;
-    }
-
-    // Find the bottom-left vertex in both polygons.
-    Vertex_circulator         first2, curr2, next2;
-    Vertex_circulator         bottom_left2;
-    
-    bottom_left2 = curr2 = first2 = pgn2.vertices_circulator();
-    ++curr2;
-    while (curr2 != first2)
-    {
-      res = f_compare_y (*curr2, *bottom_left2);
-      if (res == SMALLER ||
-          (res == EQUAL && f_compare_x (*curr2, *bottom_left2) == SMALLER))
-      {
-        bottom_left2 = curr2;
-      }
-      ++curr2;
-    }
-
-    // Start from the bottom-left vertices.
-    next1 = curr1 = bottom_left1;
-    ++next1;
-    next2 = curr2 = bottom_left2;
-    ++next2;
- 
-    // Compute the Minkowski sum.
-    Point_2                   first_pt;
-    Point_2                   curr_pt;
-    Point_2                   prev_pt;
-    bool                      is_first = true;
-    bool                      inc1, inc2;
-    bool                      moved_on1 = false;
-    bool                      moved_on2 = false;
-
-    do
-    {
-      // Compute the sum of the two current vertices (we actually translate
-      // the point curr1 by a vector equivalent to the point curr2).
-      curr_pt = f_add (*curr1, f_vector(CGAL::ORIGIN, *curr2));
-
-      if (is_first)
-      {
-        // This is the first point we have computed.
-        first_pt = prev_pt = curr_pt;
-        is_first = false;
-        sub_sum.push_back(first_pt);
-      }
-      else
-      {
-        // Add a segment from the previously summed point to the current one.
-        res = f_compare_xy (prev_pt, curr_pt);
-        CGAL_assertion (res != EQUAL);
-        prev_pt = curr_pt;
-        sub_sum.push_back(curr_pt);
-      }
-
-      // Compare the angles the current edges form with the x-axis.
-      res = f_compare_angle (f_direction (f_vector (*curr1, *next1)), 
-                             f_direction (f_vector (*curr2, *next2)));
-
-      // Proceed to the next vertex according to the result.
-      inc1 = (res != LARGER);
-      inc2 = (res != SMALLER);
-
-      if (inc1 && moved_on1 && curr1 == bottom_left1)
-      {
-        inc1 = false;
-        inc2 = true;
-      }
-
-      if (inc2 && moved_on2 && curr2 == bottom_left2)
-      {
-        inc1 = true;
-        inc2 = false;
-      }
-
-      if (inc1)
-      {
-        curr1 = next1;
-        ++next1;
-        moved_on1 = true;
-      }      
-      
-      if (inc2)
-      {
-        curr2 = next2;
-        ++next2;
-         moved_on2 = true;
-     }
-
-    } while (curr1 != bottom_left1 || curr2 != bottom_left2);
-
-    return;
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_conv_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_conv_2.h
deleted file mode 100644
index aba5cb5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_conv_2.h
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_OFFSET_CONV_H
-#define CGAL_OFFSET_CONV_H
-
-#include <CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h>
-#include <list>
-
-namespace CGAL {
-
-/*! \class
- * A class for computing the offset of a given polygon by a given radius
- * by constructing a single convolution cycle and computing its interior.
- */
-template <class Base_>
-class Offset_by_convolution_2 : private Base_
-{
-private:
-
-  typedef Base_                                          Base;
-
-public:
-
-  typedef typename Base::Basic_kernel                    Kernel;
-  typedef typename Base::Basic_NT                        NT;
-  typedef typename Base::Polygon_2                       Polygon_2;
-  typedef typename Base::Polygon_with_holes_2            Polygon_with_holes_2;
-  typedef typename Base::Offset_polygon_2                Offset_polygon_2;
-  
-private:
-
-  typedef typename Base::Labeled_traits_2                Labeled_traits_2; 
-  typedef typename Base::Labeled_curve_2                 Labeled_curve_2;
-  typedef std::list<Labeled_curve_2>                     Curves_list;
-
-  typedef Union_of_curve_cycles_2<Labeled_traits_2,
-                                  Offset_polygon_2>      Union_2;
-
-  using Base::_offset_polygon;
-public:
-
-  /*! Constructor. */
-  Offset_by_convolution_2 (const Base_& base) :
-    Base (base)
-  {}    
-
-  /*!
-   * Compute the offset of a simple polygon by a given radius.
-   * Note that as the input polygon may not be convex, its offset may not be 
-   * simply connected. The result is therefore represented as the outer
-   * boundary of the Minkowski sum (which is always a simple offset polygon)
-   * and a container of offset polygons, representing the holes in this "outer"
-   * polygon.
-   * \param pgn The polygon.
-   * \param r The offset radius.
-   * \param off_bound Output: The outer boundary of the offset polygon.
-   * \param off_holes Output: An output iterator for the holes in the offset.
-   * \pre The polygon is simple.
-   * \return A past-the-end iterator for the holes container.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_2& pgn,
-                             const NT& r,
-                             Offset_polygon_2& off_bound,
-                             OutputIterator off_holes) const
-  {
-    CGAL_precondition (pgn.is_simple());
-
-    // Compute the curves that form the single convolution cycle for the
-    // given polygon.
-    Curves_list                     cycle;
-
-    _offset_polygon (pgn,
-                     CGAL::COUNTERCLOCKWISE,
-                     r,
-                     1,                       // The ID of the single cycle.
-                     std::back_inserter (cycle));
-
-    // Compute the union of the cycles that represent the offset polygon.
-    Union_2     unite;
-
-    off_holes = unite (cycle.begin(), cycle.end(),
-                       off_bound, off_holes);
-
-    return (off_holes);
-  }
-
-  /*!
-   * Compute the offset of a polygon with holes by a given radius.
-   * The result is represented as the outer boundary of the Minkowski sum
-   * (which is always a simple offset polygon) and a container of offset
-   * polygons, representing the holes in this "outer" polygon.
-   * \param pwh The polygon with holes.
-   * \param r The offset radius.
-   * \param off_bound Output: The outer boundary of the offset polygon.
-   * \param off_holes Output: An output iterator for the holes in the offset.
-   * \pre The polygon is bounded (has an outer boundary).
-   * \return A past-the-end iterator for the holes container.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_with_holes_2& pwh,
-                             const NT& r,
-                             Offset_polygon_2& off_bound,
-                             OutputIterator off_holes) const
-  {
-    CGAL_precondition (! pwh.is_unbounded());
-
-    // Compute the curves that form the convolution cycle for the polygon
-    // that forms the outer boundary.
-    Curves_list                     cycle;
-    unsigned int                    cycle_id = 1;
-    
-    _offset_polygon (pwh.outer_boundary(),
-                     CGAL::COUNTERCLOCKWISE,
-                     r,
-                     cycle_id,
-                     std::back_inserter (cycle));
-
-    // Go over the polygon holes and compute the convolution cycle for each
-    // hole. Note that in this case we traverse the holes in clockwise
-    // orientation.
-    typename Polygon_with_holes_2::Hole_const_iterator  hoit;
-
-    for (hoit = pwh.holes_begin(); hoit != pwh.holes_end(); ++hoit)
-    {
-      cycle_id++;
-      _offset_polygon (*hoit,
-                       CGAL::CLOCKWISE,
-                       r,
-                       cycle_id,
-                       std::back_inserter (cycle));
-    }
-
-    // Compute the union of the cycles that represent the offset polygon.
-    Union_2     unite;
-
-    off_holes = unite (cycle.begin(), cycle.end(),
-                       off_bound, off_holes);
-
-    return (off_holes);
-  }
-
-  /*!
-   * Compute the inset of a simple polygon by a given radius.
-   * Note that as the input polygon may not be convex, its offset may not be 
-   * simply connected. The result is therefore represented as a sequence of
-   * polygons (which may also be empty).
-   * \param pgn The polygon.
-   * \param r The inset radius.
-   * \param oi Output: An output iterator for the inset polygons.
-   * \pre The polygon is simple.
-   * \return A past-the-end iterator for the polygons container.
-   */
-  template <class OutputIterator>
-  OutputIterator inset (const Polygon_2& pgn,
-                        const NT& r,
-                        OutputIterator oi) const
-  {
-    CGAL_precondition (pgn.is_simple());
-
-    // Compute the curves that form the single convolution cycle for the
-    // given polygon. Note that we traverse the polygon in clockwise direction,
-    // as we treat it as a hole in the unbounded plane.
-    Curves_list                     cycle;
-
-    _offset_polygon (pgn,
-                     CGAL::CLOCKWISE,
-                     r,
-                     1,                       // The ID of the single cycle.
-                     std::back_inserter (cycle));
-
-    // Compute the union of the cycles that represent the offset polygon.
-    Union_2             unite;
-
-    oi = unite.inverse (cycle.begin(), cycle.end(),
-                        oi);
-
-    return (oi);
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h
deleted file mode 100644
index a1b9fc4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_OFFSET_DECOMP_H
-#define CGAL_OFFSET_DECOMP_H
-
-#include <CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h>
-#include <list>
-
-namespace CGAL {
-
-/*! \class
- * A class for computing the offset of a given polygon by a given radius,
- * by decomposing the polygon into convex sub-polygons and computing the union
- * off their offsets.
- */
-template <class Base_, class DecompStrategy_>
-class Offset_by_decomposition_2 : private Base_
-{
-private:
-
-  typedef Base_                                        Base;
-
-  using Base::_offset_polygon;
-
-public:
-
-  typedef typename Base::Basic_kernel                  Kernel;
-  typedef typename Base::Basic_NT                      NT;
-  typedef typename Base::Polygon_2                     Polygon_2;  
-  typedef typename Base::Offset_polygon_2              Offset_polygon_2;
-  typedef DecompStrategy_                              Decomposition_strategy;
-  
-private:
-
-  typedef std::list<Polygon_2>                         Polygons_list;
-  typedef typename Polygons_list::iterator             Polygons_iterator;
-
-  typedef typename Base::Labeled_traits_2              Labeled_traits_2; 
-  typedef typename Base::Labeled_curve_2               Labeled_curve_2;
-  typedef std::list<Labeled_curve_2>                   Curves_list;
-
-  typedef Union_of_curve_cycles_2<Labeled_traits_2,
-                                  Offset_polygon_2>    Union_2;
-
-public:
-
-  /*! Constructor. */
-  Offset_by_decomposition_2 (const Base_& base) :
-    Base (base)
-  {}    
-
-  /*!
-   * Compute the offset of a simple polygon by a given radius.
-   * Note that as the input polygon may not be convex, its offset may not be 
-   * simply connected. The result is therefore represented as the outer
-   * boundary of the Minkowski sum (which is always a simple offset polygon)
-   * and a container of offset polygons, representing the holes in this "outer"
-   * polygon.
-   * \param traits Arrangement traits that can deal with line segments and 
-   *               circular arcs.
-   * \param pgn The polygon.
-   * \param r The offset radius.
-   * \param off_bound Output: The outer boundary of the offset polygon.
-   * \param off_holes Output: An output iterator for the holes in the offset.
-   * \pre The polygon is simple.
-   * \return A past-the-end iterator for the holes container.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_2& pgn,
-                             const NT& r,
-                             Offset_polygon_2& off_bound,
-                             OutputIterator off_holes) const
-  {
-    CGAL_precondition (pgn.is_simple());
-
-    // Decompose the input polygon into convex sub-polygons.
-    Decomposition_strategy  decomp_strat;
-    Polygons_list           sub_pgns;
-    Polygons_iterator       iter;
-
-    decomp_strat (pgn, std::back_inserter(sub_pgns));
-
-    // Compute the offset of each polygon separately.
-    Curves_list                     boundary_curves;
-    unsigned int                    pgn_id = 1;
-
-    for (iter = sub_pgns.begin(); iter != sub_pgns.end(); ++iter)
-    {
-      _offset_polygon (*iter,
-                       CGAL::COUNTERCLOCKWISE,
-                       r,
-                       pgn_id,
-                       std::back_inserter(boundary_curves));
-      pgn_id++;
-    }
-
-    // Compute the union of the cycles that represent the offset polygon.
-    Union_2     unite;
-
-    off_holes = unite (boundary_curves.begin(), boundary_curves.end(),
-                       off_bound, off_holes);
-
-    return (off_holes);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h
deleted file mode 100644
index a468448..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 2006 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s)     : Ron Wein           <wein at post.tau.ac.il>
-
-#ifndef CGAL_DECOMPOSITION_STRATEGY_ADAPTER_H
-#define CGAL_DECOMPOSITION_STRATEGY_ADAPTER_H
-
-#include <CGAL/partition_2.h>
-
-namespace CGAL {
-
-struct Tag_optimal_convex_parition
-{
-  bool    dummy;
-};
-
-struct Tag_approx_convex_parition
-{
-  bool    dummy;
-};
-
-struct Tag_Greene_convex_parition
-{
-  bool    dummy;
-};
-
-/*!
- * \class
- * An adapter of the global planar polygonal partitioning functions
- * to a decomposition strategy-class.
- */
-template <class Kernel_, class Container_, class StrategyTag_>
-class Decomposition_strategy_adapter
-{
-public:
-        
-  typedef Kernel_                                  Kernel;
-  typedef Polygon_2<Kernel, Container_>            Polygon_2;
-  typedef StrategyTag_                             Strategy_tag;
-
-  /*! Default constructor. */
-  Decomposition_strategy_adapter ()
-  {}
-
-  /*!
-   * Decompose a simple polygon to convex sub-polygons.
-   * \param pgn The input polygon.
-   * \param oi An output iterator of convex polygons.
-   * \return A past-the-end iterator for the sub-polygons.
-   */
-  template <class OutputIterator>
-  OutputIterator decompose (const Polygon_2& pgn,
-                            OutputIterator oi) const
-  {
-    // Make a local copy of the polygon, and if it is not counterclockwise
-    // oriented, reverse the order of its vertices.
-    Polygon_2        my_pgn = pgn;
-
-    if (my_pgn.orientation() == CLOCKWISE)
-      my_pgn.reverse_orientation();
-
-    // Perform the decomposition.
-    return (_decompose (pgn, Strategy_tag(), oi));
-  }
-
-private:
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using the optimal
-   * convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_optimal_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (optimal_convex_partition_2 (pgn.vertices_begin(),
-                                        pgn.vertices_end(),
-                                        oi,
-                                        Kernel()));
-  }
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using the
-   * approximated convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_approx_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (approx_convex_partition_2 (pgn.vertices_begin(),
-                                       pgn.vertices_end(),
-                                       oi,
-                                       Kernel()));
-  }
-
-  /*!
-   * Decompose the given counter clockwise-oriented polygon using Greene's
-   * approximated convex-partition method.
-   */
-  template <class OutputIterator>
-  OutputIterator _decompose (const Polygon_2& pgn,
-                             Tag_Greene_convex_parition ,
-                             OutputIterator oi) const
-  {
-    return (greene_approx_convex_partition_2 (pgn.vertices_begin(),
-                                              pgn.vertices_end(),
-                                              oi,
-                                              Kernel()));
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h
deleted file mode 100644
index cdb0e61..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_UNION_OF_CURVE_CYCLES_2_H
-#define CGAL_UNION_OF_CURVE_CYCLES_2_H
-
-#include <CGAL/Minkowski_sum_2/Union_of_cycles_2.h>
-
-namespace CGAL {
-
-/*! \class
- * An auxiliary class for computing the union of the interiors of curve
- * cycles (convolution cycles).
- */
-template <class Traits_, class GeneralPolygon_>
-class Union_of_curve_cycles_2 : private Union_of_cycles_2<Traits_>
-{
-public:
-
-  typedef Traits_                                 Traits_2;
-  typedef GeneralPolygon_                         General_polygon_2;
-
-private:
-
-  // Base-class types:
-  typedef Union_of_cycles_2<Traits_2>             Base;
-  typedef typename Base::Point_2                  Point_2;
-  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
-
-  typedef typename Base::Arrangement_2            Arrangement_2;
-  typedef typename Base::Vertex_handle            Vertex_handle;
-  typedef typename Base::Halfedge_handle          Halfedge_handle;
-  typedef typename Base::Face_handle              Face_handle;
-  typedef typename Base::Vertex_iterator          Vertex_iterator;
-  typedef typename Base::Edge_iterator            Edge_iterator;
-  typedef typename Base::Halfedge_iterator        Halfedge_iterator;
-  typedef typename Base::Face_iterator            Face_iterator;
-  typedef typename Base::Inner_ccb_iterator       Inner_ccb_iterator;
-  typedef typename Base::Halfedge_around_vertex_circulator
-                                             Halfedge_around_vertex_circulator;
-  typedef typename Base::Ccb_halfedge_circulator  Ccb_halfedge_circulator;
-
-public:
-
-  /*! \class
-   * A circulator adapter that iterates over all curves in a CCB.
-   */
-  class Ccb_curve_iterator
-  {
-  public:
-
-    typedef Ccb_curve_iterator                      Self;
-    typedef typename Union_of_cycles_2<Traits_>::Ccb_halfedge_circulator
-                                                    Ccb_halfedge_circulator;
-    typedef typename Union_of_cycles_2<Traits_>::X_monotone_curve_2
-                                                    value_type;
-    typedef std::forward_iterator_tag               iterator_category;
-    typedef const value_type&                       reference;
-    typedef const value_type*                       pointer;
-    typedef int                                     difference_type;
-
-  private:
-
-    Ccb_halfedge_circulator    _first;    // The first halfedge.
-    Ccb_halfedge_circulator    _circ;     // The current circulator.
-    bool                       _done;     // Indicates whether we completed
-                                          // a full traversal of the CCB.
-
-  public:
-
-    /*! Default constructor. */
-    Ccb_curve_iterator () :
-      _done (true)
-    {}
-
-    /*!
-     * Constructor from a circulator.
-     * \param circ A circulator for the first halfedge in the CCB.
-     * \param done (true) in order to create a past-the-end iterator.
-     */
-    Ccb_curve_iterator (Ccb_halfedge_circulator circ,
-                        bool done = false) :
-      _first (circ),
-      _circ (circ),
-      _done (done)
-    {}
-
-    /*! Dereference operators. */
-    reference operator* () const
-    {
-      return (_circ->curve());
-    }
-
-    pointer operator-> () const
-    {
-      return (&(_circ->curve()));
-    }
-
-    /*! Equality operators.*/
-    bool operator== (const Self& it) const
-    {
-      return (_done == it._done && _circ == it._circ);
-    }
-
-    bool operator!= (const Self& it) const
-    {
-      return (_done != it._done || _circ != it._circ);
-    }
-
-    /*! Increment operators. */
-    Self& operator++ ()
-    {
-      if (! _done)
-      {
-        --_circ;
-
-        if (_circ == _first)
-          _done = true;
-      }
-
-      return (*this);
-    }
-
-    Self operator++ (int )
-    {
-      Self   temp = *this;
-
-      if (! _done)
-      {
-        --_circ;
-
-        if (_circ == _first)
-          _done = true;
-      }
-
-      return (temp);
-    }
-      
-  };
-
-  /*! Default constructor. */
-  Union_of_curve_cycles_2 () :
-    Base()
-  {}
-
-  /*!
-   * Compute the union of the interiors of the curve cycles.
-   * \param begin An iterator for the first curve in the range.
-   * \param end A past-the-end iterator for the curve range.
-   * \param out_bound Output: A generalized polygon representing the outer
-   *                          boundary of the union.
-   * \param holes Output: An output iterator of the holes in the union.
-   * \return A past-the-end iterator for the holes.
-   */
-  template <class InputIterator, class OutputIterator>
-  OutputIterator operator() (InputIterator begin, InputIterator end,
-                             General_polygon_2& out_bound,
-                             OutputIterator holes) const
-  {
-    // Construct the arrangement of all segments.
-    Arrangement_2                    arr;
-
-    this->_construct_arrangement (begin, end, arr);
-
-    // Produce the result. First set the outer boundary of the union, given
-    // as the inner boundary of the single hole in the unbounded face. 
-    Face_iterator                    fit;
-    const Face_handle                uf = arr.unbounded_face();
-    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
-    Ccb_halfedge_circulator          circ;
-
-    circ = *iccb_it;
-    out_bound = General_polygon_2 (Ccb_curve_iterator (circ),
-                                   Ccb_curve_iterator (circ, true));
-
-    // Locate the holes in the union: Go over all arrangement faces.
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-    {
-      CGAL_assertion (fit->data() != this->UNVISITED);
-      
-      // If a bounded face has an inside count that equals 0, it forms a hole
-      // in the union.
-      if (! fit->is_unbounded() && fit->data() == 0)
-      {
-        circ = fit->outer_ccb();
-        *holes = General_polygon_2 (Ccb_curve_iterator (circ),
-                                    Ccb_curve_iterator (circ, true));
-        ++holes;
-      }
-    }
-
-    return (holes);
-  }
-
-
-  /*!
-   * Compute the inverse of the union of the interiors of the curve cycles,
-   * and return the result as a sequence of polygons.
-   * \param begin An iterator for the first curve in the range.
-   * \param end A past-the-end iterator for the curve range.
-   * \param oi Output: An output iterator of the polygons.
-   * \return A past-the-end iterator for the polygons.
-   */
-  template <class InputIterator, class OutputIterator>
-  OutputIterator inverse (InputIterator begin, InputIterator end,
-                          OutputIterator oi) const
-  {
-    // Construct the arrangement of all segments.
-    Arrangement_2                    arr;
-
-    this->_construct_arrangement (begin, end, arr);
-
-    // Go over all arrangement faces, and output each face whose data is
-    // negative.
-    Face_iterator                    fit;
-    Ccb_halfedge_circulator          circ;
-
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-    {
-      CGAL_assertion (fit->data() != this->UNVISITED);
-
-      if (fit->data() < 0)
-      {
-        circ = fit->outer_ccb();
-        *oi = General_polygon_2 (Ccb_curve_iterator (circ),
-                                 Ccb_curve_iterator (circ, true));
-        ++oi;
-      }
-    }
-
-    return (oi);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h
deleted file mode 100644
index bf26cfa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_UNION_OF_CYCLES_2_H
-#define CGAL_UNION_OF_CYCLES_2_H
-
-#include <CGAL/Arr_extended_dcel.h>
-#include <CGAL/Arrangement_2.h>
-
-namespace CGAL {
-
-/*! \class
- * An auxiliary base class for computing the union of the interiors of cycles
- * of x-monotone curves.
- */
-template <class Traits_>
-class Union_of_cycles_2
-{
-public:
-
-  typedef Traits_                                        Traits_2;
-
-protected:
-
-  // Traits types:
-  typedef typename Traits_2::Point_2                     Point_2;
-  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
-
-  // Arrangement-related types:
-  typedef Arr_face_extended_dcel<Traits_2, int>          Dcel;
-  typedef CGAL::Arrangement_2<Traits_2, Dcel>            Arrangement_2;
-  typedef typename Arrangement_2::Vertex_handle          Vertex_handle;
-  typedef typename Arrangement_2::Halfedge_handle        Halfedge_handle;
-  typedef typename Arrangement_2::Face_handle            Face_handle;
-  typedef typename Arrangement_2::Vertex_iterator        Vertex_iterator;
-  typedef typename Arrangement_2::Edge_iterator          Edge_iterator;
-  typedef typename Arrangement_2::Halfedge_iterator      Halfedge_iterator;
-  typedef typename Arrangement_2::Face_iterator          Face_iterator;
-  typedef typename Arrangement_2::Inner_ccb_iterator     Inner_ccb_iterator;
-  typedef typename Arrangement_2::Halfedge_around_vertex_circulator
-                                             Halfedge_around_vertex_circulator;
-  typedef typename Arrangement_2::Ccb_halfedge_circulator
-                                                       Ccb_halfedge_circulator;
-  // Data members:
-  int                    UNVISITED;    // A code marking unvisited faces.
-
-public:
-
-  /*! Default constructor. */
-  Union_of_cycles_2 () :
-    UNVISITED (-1000000)
-  {}
-
-protected:
-
-  /*!
-   * Construct the arrnagement representing the union of the curve cycles,
-   * such that every arrangement face is associated with its winding number
-   * with respect to the cycles.
-   * \param begin An iterator for the first curve in the range.
-   * \param end A past-the-end iterator for the curve range.
-   * \param arr Output: The arrangement of the curve cycles, where each face
-   *                    is associated with its winding number.
-   */
-  template <class InputIterator>
-  void _construct_arrangement (InputIterator begin, InputIterator end,
-                               Arrangement_2& arr) const
-  {
-    CGAL_precondition (arr.is_empty());
-
-    // Construct the arrangement of the curves.
-    CGAL::insert (arr, begin, end);
-
-    // Go over all faces and mark them as unvisited, by setting their inside
-    // count to UNVISITED.
-    Face_iterator                    fit;
-
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-      fit->set_data (UNVISITED);
-
-    // Mark the inside count of the unbounded face as 0, and start a
-    // breadth-first search from this face, going over the inner boundary of
-    // the single hole (inner CCB) in the unbounded face.
-    const Face_handle                uf = arr.unbounded_face();
-    Face_handle                      f_next;
-    int                              next_count;
-    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
-    Ccb_halfedge_circulator          first, circ;
-    Halfedge_handle                  he;
-    std::list<Face_handle>           queue;
-
-    uf->set_data (0);
-    circ = first = *iccb_it;
-    do
-    {
-      he = circ;
-      f_next = he->twin()->face();
-      
-      if (f_next->data() == UNVISITED)
-      {
-        next_count = _boundary_count (he->twin());
-        f_next->set_data (next_count);
-        queue.push_back (f_next);
-      }
-      else
-      {
-        CGAL_assertion (f_next->data() == _boundary_count (he->twin()));
-      }
-
-      ++circ;
-      
-    } while (circ != first);
-    
-    ++iccb_it;
-
-    // Make sure that there is a single hole in the unbounded face.
-    CGAL_assertion (iccb_it == uf->inner_ccbs_end());
-
-    // The main breadth-first search loop.
-    Face_handle                      f_curr;
-    int                              curr_count;
-
-    while (! queue.empty())
-    {
-      f_curr = queue.front();
-      curr_count = f_curr->data();
-      queue.pop_front();
-
-      // Go over the outer boundary of the current face to visit its edjacent
-      // faces.
-      circ = first = f_curr->outer_ccb();
-      do
-      {
-        he = circ;
-        f_next = he->twin()->face();
-
-        if (f_next->data() == UNVISITED)
-        {
-          next_count = curr_count + _boundary_count (he->twin());
-          f_next->set_data (next_count);
-          queue.push_back (f_next);
-        }
-        else if (f_curr != f_next)
-        {
-          CGAL_assertion (f_next->data() == 
-                          curr_count + _boundary_count (he->twin()));
-        }
-        ++circ;
-      
-      } while (circ != first);
-
-      // Go over the holes (inner CCBs) of the current face.
-      for (iccb_it = f_curr->inner_ccbs_begin();
-           iccb_it != f_curr->inner_ccbs_end();
-           ++iccb_it)
-      {
-        circ = first = *iccb_it;
-        do
-        {
-          he = circ;
-          f_next = he->twin()->face();
-
-          if (f_next->data() == UNVISITED)
-          {
-            next_count = curr_count + _boundary_count (he->twin());
-            f_next->set_data (next_count);
-            queue.push_back (f_next);
-          }
-          else if (f_curr != f_next)
-          {
-            CGAL_assertion (f_next->data() == 
-                            curr_count + _boundary_count (he->twin()));
-          }
-          ++circ;
-
-        } while (circ != first);
-      }
-    }
-    
-    return;
-  }
-
-private:
-
-  /*!
-   * Compute the boundary count of the given halfedge, namely the number of
-   * curves going in the halfedges direction minus the number of associated
-   * curves going in the opposite direction.
-   */
-  int _boundary_count (Halfedge_handle he) const
-  {
-    if ((Arr_halfedge_direction) he->direction() == ARR_LEFT_TO_RIGHT)
-    {
-      // Halfedge is directed from left to right:
-      return (he->curve().label().right_count() - 
-              he->curve().label().left_count());
-    }
-    else
-    {
-      // Halfedge is directed from right to left:
-      return (he->curve().label().left_count() - 
-              he->curve().label().right_count());
-    }
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h
deleted file mode 100644
index 8ca4903..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_UNION_OF_SEGMENT_CYCLES_2_H
-#define CGAL_UNION_OF_SEGMENT_CYCLES_2_H
-
-#include <CGAL/Minkowski_sum_2/Union_of_cycles_2.h>
-
-namespace CGAL {
-
-/*! \class
- * An auxiliary class for computing the union of the interiors of segment
- * cycles (polygon boundaries or convolution cycles).
- */
-template <class Traits_, class Polygon_>
-class Union_of_segment_cycles_2 : private Union_of_cycles_2<Traits_>
-{
-public:
-
-  typedef Traits_                                 Traits_2;
-  typedef Polygon_                                Polygon_2;
-
-private:
-
-  // Base-class types:
-  typedef Union_of_cycles_2<Traits_2>             Base;
-  typedef typename Base::Point_2                  Point_2;
-  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
-
-  typedef typename Base::Arrangement_2            Arrangement_2;
-  typedef typename Base::Vertex_handle            Vertex_handle;
-  typedef typename Base::Halfedge_handle          Halfedge_handle;
-  typedef typename Base::Face_handle              Face_handle;
-  typedef typename Base::Vertex_iterator          Vertex_iterator;
-  typedef typename Base::Edge_iterator            Edge_iterator;
-  typedef typename Base::Halfedge_iterator        Halfedge_iterator;
-  typedef typename Base::Face_iterator            Face_iterator;
-  typedef typename Base::Inner_ccb_iterator       Inner_ccb_iterator;
-  typedef typename Base::Halfedge_around_vertex_circulator
-                                             Halfedge_around_vertex_circulator;
-  typedef typename Base::Ccb_halfedge_circulator  Ccb_halfedge_circulator;
-
-public:
-
-  /*! Default constructor. */
-  Union_of_segment_cycles_2 () :
-    Base()
-  {}
-
-  /*!
-   * Compute the union of the interiors of the segment cycles.
-   * \param begin An iterator for the first segment in the range.
-   * \param end A past-the-end iterator for the segment range.
-   * \param out_bound Output: A polygon representing the union boundary.
-   * \param holes Output: An output iterator of the holes in the union.
-   * \return A past-the-end iterator for the holes.
-   */
-  template <class InputIterator, class OutputIterator>
-  OutputIterator operator() (InputIterator begin, InputIterator end,
-                             Polygon_2& out_bound,
-                             OutputIterator holes) const
-  {
-    // Construct the arrangement of all segments.
-    Arrangement_2                    arr;
-
-    this->_construct_arrangement (begin, end, arr);
-
-    // Produce the result. First set the outer boundary of the union, given
-    // as the inner boundary of the single hole in the unbounded face. 
-    Face_iterator                    fit;
-    const Face_handle                uf = arr.unbounded_face();
-    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
-    Ccb_halfedge_circulator          first, circ;
-    Halfedge_handle                  he;
-   
-    out_bound.erase (out_bound.vertices_begin(), out_bound.vertices_end());
-
-    circ = first = *iccb_it;
-    do
-    {
-      out_bound.push_back (circ->source()->point());
-      --circ;
-      
-    } while (circ != first);
-    ++iccb_it;
-
-    // Locate the holes in the union: Go over all arrangement faces.
-    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
-    {
-      CGAL_assertion (fit->data() != this->UNVISITED);
-      
-      // If a bounded face has an inside count that equals 0, it forms a hole
-      // in the union.
-      if (! fit->is_unbounded() && fit->data() == 0)
-      {
-        Polygon_2   pgn_hole;
-          
-        circ = first = fit->outer_ccb();
-        do
-        {
-          pgn_hole.push_back (circ->source()->point());
-          --circ;
-          
-        } while (circ != first);
-
-        // Insert it to the containers of holes in the Minkowski sum.
-        *holes = pgn_hole;
-        ++holes;
-      }
-    }
-
-    return (holes);
-  }
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/Gaussian_map.h b/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/Gaussian_map.h
deleted file mode 100644
index a3da591..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/Gaussian_map.h
+++ /dev/null
@@ -1,1231 +0,0 @@
-// Copyright (c) 2005-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$ 
-// 
-//
-// Author(s)     :  Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-#ifndef CGAL_MS3_GAUSSIAN_MAP
-#define CGAL_MS3_GAUSSIAN_MAP
-
-#include <CGAL/Nef_S2/SM_items.h>
-#include <CGAL/Nef_S2/Sphere_map.h>
-#include <CGAL/Nef_S2/Sphere_geometry.h>
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_S2/SM_io_parser.h>
-#include <CGAL/Nef_polyhedron_S2.h>
-#include <CGAL/Minkowski_sum_3/PointMark.h>
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 223
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-
-template <class K, class Nef, class Mark_ = PointMark<K> >
-class Gaussian_map :
-  public CGAL::SM_decorator<CGAL::Sphere_map<CGAL::Sphere_geometry<K>, 
-					     CGAL::SM_items, Mark_> > {
-
-  typedef K                                               Kernel;
-  typedef CGAL::Sphere_geometry<K>                        Sphere_kernel;
-  typedef typename Kernel::Point_3                        Point_3;
-  typedef typename Kernel::Vector_3                       Vector_3;
-  typedef Mark_                                           Mark;
-  typedef CGAL::Sphere_map<Sphere_kernel, 
-                           CGAL::SM_items, Mark>          Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>                  SM_decorator;
-  typedef SM_decorator                                    Base;
-  typedef CGAL::SM_overlayer<SM_decorator>                SM_overlayer;
-  typedef typename Sphere_kernel::Sphere_circle           Sphere_circle;
- public:
-  typedef typename Sphere_map::SVertex_handle             SVertex_handle;
-  typedef typename Sphere_map::SHalfedge_handle           SHalfedge_handle;
-  typedef typename Sphere_map::SHalfloop_handle           SHalfloop_handle;
-  typedef typename Sphere_map::SFace_handle               SFace_handle;
-  typedef typename Sphere_map::SFace_iterator             SFace_iterator;
-  typedef typename Sphere_map::SHalfedge_iterator         SHalfedge_iterator;
-  typedef typename Sphere_map::SVertex_iterator           SVertex_iterator;
-  typedef typename Sphere_map::SVertex_const_iterator     SVertex_const_iterator;
-  typedef typename Sphere_map::SVertex_const_handle       SVertex_const_handle;
-  typedef typename Sphere_map::SFace_cycle_iterator       SFace_cycle_iterator;
-  typedef typename Sphere_map::SHalfedge_around_svertex_circulator
-    SHalfedge_around_svertex_circulator;
-  typedef typename Sphere_map::SHalfedge_around_sface_circulator
-    SHalfedge_around_sface_circulator;
-  typedef typename Sphere_map::SHalfedge_around_sface_const_circulator
-    SHalfedge_around_sface_const_circulator;
-
-  typedef typename Sphere_map::Object_handle              Object_handle;
-
-  using Base::clear_face_cycle_entries;
-  using Base::is_closed_at_source;
-  using Base::delete_edge_pair;
-  using Base::delete_vertex_only;
-  using Base::delete_face_only;
-  using Base::set_face;
-  using Base::store_sm_boundary_object;
-  using Base::is_isolated;
-  using Base::has_outdeg_two;
-  using Base::first_out_edge;
-  using Base::merge_edge_pairs_at_target;
-  
-  template<typename Nef_polyhedron_3>
-  class SVertex_creator2 {
-
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
-
-    SM_decorator SM;
-    Facet2SVertex_hash& Facet2SVertex;
-
-  public:
-    SVertex_creator2(Sphere_map* smap, Facet2SVertex_hash& F2SV)
-      : SM(smap), Facet2SVertex(F2SV) {}
-
-    void visit(Vertex_const_handle) {}
-    void visit(Halfedge_const_handle) {}
-    void visit(SHalfedge_const_handle) {}
-    void visit(SHalfloop_const_handle) {}
-    void visit(SFace_const_handle) {}
-    void visit(Halffacet_const_handle f) {
-
-      CGAL_NEF_TRACEN( "SVertex_creator2 " << f->twin()->plane() );
-      SVertex_handle sv
-	(SM.new_svertex(normalized(f->twin()->plane().orthogonal_vector())));
-      sv->mark() = Mark(Point_3(0,0,0), f->mark());
-      Facet2SVertex[f] = sv;
-    }
-
-  };
-
-  template<typename Nef_polyhedron_3>
-  class SVertex_creator {     
-
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-
-    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
-      Halffacet_cycle_const_iterator;
-    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
-      SHalfedge_around_facet_const_circulator;
-
-    typedef typename Nef_polyhedron_3::Point_3                  Point_3;
-    typedef typename Nef_polyhedron_3::Sphere_point             Sphere_point;
-
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, bool> Facet2bool_hash;
-    typedef CGAL::Unique_hash_map<Vertex_const_handle, bool> Vertex2bool_hash;
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, bool> Edge2bool_hash;
-    typedef CGAL::Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge_hash;
-    typedef CGAL::Unique_hash_map<SFace_const_handle, bool> SFace2bool_hash;
-
-    SM_decorator SM;
-    Facet2SVertex_hash& Facet2SVertex;
-    Facet2bool_hash& omit_facet;
-    SEdge2SEdge_hash& next;
-    Vertex2bool_hash& omit_vertex;
-    Edge2bool_hash& omit_edge;
-    SFace2bool_hash& Shell;
-
-  public:
-    SVertex_creator(Sphere_map* smap, Facet2SVertex_hash& F2SV, Facet2bool_hash& F2b, SEdge2SEdge_hash& SE2SE, Vertex2bool_hash& V2b, Edge2bool_hash& E2b, SFace2bool_hash& SHELL)
-      : SM(smap), Facet2SVertex(F2SV), omit_facet(F2b), next(SE2SE), omit_vertex(V2b), omit_edge(E2b), Shell(SHELL) {}
-
-  private:
-    bool svertex_exists(Sphere_point sp, SVertex_handle& sv) {
-      SVertex_iterator svi;
-      sp = normalized(sp);
-      CGAL_forall_svertices(svi, SM) {
-	if(svi->point() == sp) {
-	  sv = svi;
-	  return true;
-	}
-      }
-      return false;
-    }
-
-  public:
-      void visit(Vertex_const_handle v) {	CGAL_NEF_TRACEN( "Vertices " << v->point() );}
-      void visit(Halfedge_const_handle ) {}
-      void visit(SHalfedge_const_handle ) {}
-      void visit(SHalfloop_const_handle ) {}
-      void visit(SFace_const_handle sf) {
-	
-	typename Nef_polyhedron_3::SHalfedge_const_handle sec = sf->sface_cycles_begin();
-	
-	int circles = 1;
-	Sphere_circle first, current;
-	first = current = sec->circle();
-	CGAL_NEF_TRACEN( "first+current:" << first << "+" << current );
-	typename Nef_polyhedron_3::SHalfedge_around_sface_const_circulator sfc(sec), send(sfc);
-	CGAL_For_all(sfc, send) {
-	  CGAL_NEF_TRACEN( "sedge->cirlce() " << sfc->circle() );
-	  if(sfc->circle() != current) {
-	    if(sfc->circle() != first)
-	      ++circles;
-	    current = sfc->circle();
-	  }
-	}
-	
-	CGAL_NEF_TRACEN( "first+current:" << first << "+" << current );
-	CGAL_NEF_TRACEN( "circles " << circles );
-
-	if(circles < 3)
-	  omit_vertex[sf->center_vertex()] = true;
-      }
-  
-      void visit(Halffacet_const_handle f) {
-
-	CGAL_NEF_TRACEN( "SVertex_creator " << f->twin()->plane() );
-
-	Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
-	SHalfedge_const_handle se(fc);
-	SHalfedge_around_facet_const_circulator hc(se), hend(hc);
-
-	bool verge_found(false);
-	CGAL_For_all(hc,hend) {
-	  Point_3 p(hc->source()->source()->point());
-	  CGAL_NEF_TRACEN(" hc " << CGAL::to_double(p.hx()) << 
-			  " " << CGAL::to_double(p.hy()) <<
-			  " " << CGAL::to_double(p.hz()));
-	  CGAL_NEF_TRACEN(" hc->snext()->circle() " << normalized(hc->snext()->circle()));
-	  if(normalized(hc->snext()->circle()) == normalized(hc->circle())) {
-	    next[hc] = hc->snext();
-	    CGAL_NEF_TRACEN( "set next " << hc->source()->source()->point() << ":"
-		      << hc->source()->point() << "->" << hc->twin()->source()->point() << " | " 
-		      << hc->snext()->source()->point() << "->" << hc->snext()->twin()->source()->point() );
- 	    omit_edge[hc->twin()->source()] = omit_edge[hc->twin()->source()->twin()] = true;
-	  } else
-	    verge_found = true;
-	}
-
-	if(!verge_found) {
-	  omit_facet[f] = true;
-	  return;
-	}
-
-	SVertex_handle sv;
-	if(!svertex_exists(f->twin()->plane().orthogonal_vector(), sv)) {
-	  sv = SM.new_svertex(f->twin()->plane().orthogonal_vector());
-	  sv->point() = normalized(sv->point());
-	  sv->mark() = Mark(Point_3(0,0,0), f->mark());
-	} else {
-	  omit_facet[f] = true;
-	  if(sv->mark().boolean() && !f->mark())
-	    sv->mark().set_boolean(false);
-          CGAL_NEF_TRACEN("omit facet " << f->plane());
-	}
-	Facet2SVertex[f] = sv;
-      }
-  };
-
-  template<typename Nef_polyhedron_3>
-    class SEdge_creator2 {
-
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-
-    typedef typename SM_decorator::SHalfedge_around_svertex_circulator
-      SHalfedge_around_svertex_circulator;
-
-    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
-      Halffacet_cycle_const_iterator;
-    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
-      SHalfedge_around_facet_const_circulator;
-
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
-
-    SM_decorator SM;
-    Edge2SEdge_hash& Edge2SEdge;
-    Facet2SVertex_hash& Facet2SVertex;
-
-  public:
-    SEdge_creator2(Sphere_map* smap, Edge2SEdge_hash& E2SE, Facet2SVertex_hash& F2SV)
-      : SM(smap), Edge2SEdge(E2SE), Facet2SVertex(F2SV) {}
-      
-  public:
-    void visit(Vertex_const_handle) {}
-    void visit(Halfedge_const_handle) {}
-    void visit(SHalfedge_const_handle) {}
-    void visit(SHalfloop_const_handle) {}
-    void visit(SFace_const_handle) {}
-    
-    void visit(Halffacet_const_handle f) {
-      
-      CGAL_NEF_TRACEN( "SEdge_creator2 " << f->twin()->plane() );
-      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
-      SHalfedge_const_handle sef(fc);
-      SHalfedge_around_facet_const_circulator hc(sef), hend(hc);
-      
-      CGAL_For_all(hc, hend) {
-	if(hc->sprev()->facet()->plane() == 
-	   hc->facet()->plane())
-	  continue;
-	SHalfedge_handle thetwin;
-	Halfedge_const_handle e(hc->source()->twin());
-	SHalfedge_handle set = Edge2SEdge[e];
-	if(set == SHalfedge_handle()) {
-	  thetwin = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
-	  CGAL_NEF_TRACEN("add stub " << Facet2SVertex[f]->point()
-			  << "->" << hc->twin()->snext()->facet()->plane().orthogonal_vector());
-	} else {	
-	  SM.link_as_target_and_append(Facet2SVertex[f], set);
-	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
-	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
-	  set->twin()->circle() = set->circle().opposite();
-	  thetwin = set->twin();
-	  CGAL_NEF_TRACEN("complete edge " << set->source()->point()
-			  << "->" << set->twin()->source()->point());
-	}
-	Edge2SEdge[hc->source()] = thetwin;
-      }
-    }
-  };
-
-  template<typename Nef_polyhedron_3>
-    class SEdge_creator {
-
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-
-    typedef typename SM_decorator::SHalfedge_around_svertex_circulator
-      SHalfedge_around_svertex_circulator;
-
-    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
-      Halffacet_cycle_const_iterator;
-    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
-      SHalfedge_around_facet_const_circulator;
-
-    typedef typename Nef_polyhedron_3::Sphere_point Sphere_point;
-
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
-    typedef CGAL::Unique_hash_map<Halffacet_const_handle, bool> Facet2bool_hash;
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, bool> Edge2bool_hash;
-    typedef CGAL::Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge_hash;
-
-    SM_decorator SM;
-    Edge2SEdge_hash& Edge2SEdge;
-    Facet2SVertex_hash& Facet2SVertex;
-    SEdge2SEdge_hash& next;
-    Facet2bool_hash& omit_facet;
-    Edge2bool_hash& omit_edge;
-
-  public:
-    SEdge_creator(Sphere_map* smap, Edge2SEdge_hash& E2SE, Facet2SVertex_hash& F2SV, SEdge2SEdge_hash& SE2SE, Facet2bool_hash&  F2b, Edge2bool_hash& E2b)
-      : SM(smap), Edge2SEdge(E2SE), Facet2SVertex(F2SV), next(SE2SE), omit_facet(F2b), omit_edge(E2b) {}
-      
-  public:
-    void visit(Vertex_const_handle ) {}
-    void visit(Halfedge_const_handle ) {}
-    void visit(SHalfedge_const_handle ) {}
-    void visit(SHalfloop_const_handle ) {}
-    void visit(SFace_const_handle ) {}
-    
-    void visit(Halffacet_const_handle f) {
-
-      if(omit_facet[f]) {
-	CGAL_NEF_TRACEN( "omit facet " << 
-			 normalized(Sphere_point(f->twin()->plane().orthogonal_vector())));
-	return;
-      }
-
-      CGAL_NEF_TRACEN( "SEdge_creator " << 
-		       normalized(Sphere_point(f->twin()->plane().orthogonal_vector())));
-      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
-      SHalfedge_const_handle se(fc);
-      SHalfedge_around_facet_const_circulator hc(se), hend(hc);
-      
-      
-      while(hc->snext()->circle() == hc->circle()) ++hc;
-      CGAL_NEF_TRACEN("verge " << hc->circle() << 
-		      " " << hc->snext()->circle());
-      // Found first edge such that next is not defined
-      Halfedge_const_handle last = hc->twin()->source();      
-      do {
-	++hc;
-	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
-      } while(normalized(hc->twin()->source()->point()) == 
-	      normalized(last->point()));
-      last = hc->twin()->source();
-      // now last has a good value
-      Halfedge_const_handle etwin;
-      do {
-	++hc;
-	etwin = hc->source();
-	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
-      } while(normalized(hc->twin()->source()->point()) == 
-	      normalized(last->point()));      
-      // hc is now one interesting corner further than last
-      hend = hc;
-      
-
-      SHalfedge_handle thetwin;
-      do {
-	Halfedge_const_handle e = hc->twin()->source();
-	CGAL_NEF_TRACEN(" check next " << &*next[hc]);
-	CGAL_NEF_TRACEN(" check plane " << hc->facet()->plane());
-	if(normalized(e->point()) != normalized(last->point())) {
-	  Edge2SEdge[etwin] = thetwin;
-	  SHalfedge_handle set = Edge2SEdge[e];
-	  if(set == SHalfedge_handle()) {
-	    thetwin = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
-            CGAL_NEF_TRACEN("add stub " << Facet2SVertex[f]->point()
-                            << "->" << 
-			    normalized(Sphere_point(hc->snext()->facet()->plane().orthogonal_vector())));
-	  } else {	
-	    SM.link_as_target_and_append(Facet2SVertex[f], set);
-	    set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
-	    set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
-	    set->twin()->circle() = set->circle().opposite();
-	    thetwin = set->twin();
-            CGAL_NEF_TRACEN("complete edge " << set->source()->point()
-                            << "->" << set->twin()->source()->point());
-	  } 
-	  last = hc->twin()->source();
-	} else { CGAL_NEF_TRACEN( "omit " ); }
-
-	++hc;
-	etwin = hc->source();
-	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
-      } while(hc!=hend);
-      Edge2SEdge[etwin] = thetwin;
-
-
-      /*
-      do {
-	if(!omit_edge[hc->source()]) {
-	  CGAL_NEF_TRACEN( "edge " << hc->source()->source()->point() 
-		    << ":" << hc->source()->point() );
-
-	  Halfedge_const_handle e = hc->source();
-	  SHalfedge_handle set = Edge2SEdge[e->twin()];
-	  if(set == SHalfedge_handle())
-	    Edge2SEdge[e] = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
-	  else {
-	    SM.link_as_target_and_append(Facet2SVertex[f], set);
-	    set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0));
-	    set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
-	    set->twin()->circle() = set->circle().opposite();
-	    Edge2SEdge[e] = set->twin();
-	  }
-	} else {
-	  CGAL_NEF_TRACEN( "omit edge " << hc->source()->source()->point() 
-		    << ":" << hc->source()->point() );
-	}
-	++hc;
-      } while(hc != hend);
-      */
-
-    }
-  };
-  
-  template<typename Nef_polyhedron_3>
-    class SFace_creator2 {     
-  
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-    
-    typedef typename Nef_polyhedron_3::SFace_cycle_const_iterator SFace_cycle_const_iterator;
-
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
-
-    SM_decorator SM;
-    Edge2SEdge_hash& Edge2SEdge;
-
-  public:
-    SFace_creator2(Sphere_map* smap, Edge2SEdge_hash& E2SE) : 
-      SM(smap), Edge2SEdge(E2SE) {}
-
-      void visit(Halfedge_const_handle ) {}
-      void visit(SHalfedge_const_handle ) {}
-      void visit(SHalfloop_const_handle ) {}
-      void visit(Halffacet_const_handle ) {}
-      void visit(Vertex_const_handle ) {}
-
-      void visit(SFace_const_handle sf) {
-	CGAL_NEF_TRACEN( "SFace_creator2 " << sf->center_vertex()->point() );
-
-	SFace_cycle_const_iterator sfc(sf->sface_cycles_begin());
-	CGAL_assertion(sfc.is_shalfedge());
-   	SHalfedge_const_handle sef(sfc);
-	Halfedge_const_handle e(sef->source());
-	SHalfedge_around_sface_circulator 
-	  sec(Edge2SEdge[e]), send(sec);
-	CGAL_For_all(sec, send)
-	  if(sec->source()->point() == 
-	     sec->twin()->source()->point())
-	    return;
-	SFace_handle sf_new = SM.new_sface();
-	sf_new->mark() = Mark(sf->center_vertex()->point(),
-			      sf->center_vertex()->mark());
-	SM.link_as_face_cycle(sec,sf_new);
-      }
-  };
-
-  template<typename Nef_polyhedron_3>
-    class SFace_creator {     
-  
-    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
-
-    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
-    typedef CGAL::Unique_hash_map<Vertex_const_handle, bool> Vertex2bool_hash;
-    typedef CGAL::Unique_hash_map<SFace_const_handle, bool> SFace2bool_hash;
-
-    const Nef_polyhedron_3& N3;
-    SM_decorator SM;
-    Edge2SEdge_hash& Edge2SEdge;
-    Vertex2bool_hash& omit_vertex;
-    /* SFace2bool_hash& Shell; */
-
-  public:
-    SFace_creator(const Nef_polyhedron_3& N, Sphere_map* smap, Edge2SEdge_hash& E2SE, Vertex2bool_hash& V2b /*, SFace2bool_hash& SHELL*/) : 
-      N3(N), SM(smap), Edge2SEdge(E2SE), omit_vertex(V2b)/* , Shell(SHELL)*/ {}
-
-      void visit(Halfedge_const_handle ) {}
-      void visit(SHalfedge_const_handle ) {}
-      void visit(SHalfloop_const_handle ) {}
-      void visit(SFace_const_handle ) {}
-      void visit(Halffacet_const_handle ) {}
-
-      void visit(Vertex_const_handle v) {
-
-	CGAL_NEF_TRACEN( "SFace_creator " << v->point() );
-
-	if(omit_vertex[v]) {
-	  CGAL_NEF_TRACEN("omit " << v->point() );
-	  return;
-	}
-
-        typename Nef_polyhedron_3::Nef_polyhedron_S2 SD(N3.get_sphere_map(v));
-   
-        /*
-	typename Nef_polyhedron_3::SFace_const_iterator sf = SD.sfaces_begin();
-	while(sf != SD.sfaces_end() && !Shell[sf]) ++sf;
-        CGAL_assertion(sf != SD.sfaces_end());
-        */
-
-	typename Nef_polyhedron_3::Halfedge_const_iterator ei(SD.svertices_begin());
-	SHalfedge_handle se = Edge2SEdge[ei];
-	while(se == SHalfedge_handle()) {
-	  ++ei;
-	  se = Edge2SEdge[ei];
-	}
-
-	CGAL_assertion(ei != SD.svertices_end());
-
-	SFace_handle sf_new = SM.new_sface();
-	sf_new->mark() = Mark(v->point(), v->mark());
-	SM.link_as_face_cycle(se,sf_new);
-      }
-  };
-
-  struct VECTOR_ADDITION {
-    Mark operator()(const Mark& b1, const Mark& b2) const {
-      return b1+b2;
-    }
-  };
-
-  Object_handle top;
-  Object_handle bottom;
-
-  void locate_top_and_bottom() {
-    std::vector<SFace_iterator> topSF;
-    std::vector<SFace_iterator> bottomSF;
-    SFace_iterator sfi = this->sfaces_begin();
-    topSF.push_back(sfi);
-    bottomSF.push_back(sfi);
-
-    Comparison_result cr;
-    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
-      cr = compare_z(sfi->mark(), (*topSF.begin())->mark());
-      if(cr != CGAL::SMALLER) {
-	if(cr == CGAL::LARGER)
-	  topSF.clear();
-	topSF.push_back(sfi);	
-      }
-      cr = compare_z(sfi->mark(), (*bottomSF.begin())->mark());
-      if(cr != CGAL::LARGER) {
-	if(cr == CGAL::SMALLER)
-	  bottomSF.clear();
-	bottomSF.push_back(sfi);	
-      }    
-    }
-
-    SFace_handle sf(topSF.front());
-    if(topSF.size()==1)
-      top = Object_handle(SFace_const_handle(sf));
-    else {
-      SHalfedge_handle se(sf->sface_cycles_begin());
-      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
-      
-      if(topSF.size()==2) {
-	while(sfc->circle().c()!=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	top = Object_handle(SHalfedge_const_handle(sfc));
-      } else {
-	CGAL_assertion(topSF.size() > 0);
-	while(sfc->source()->point().hx()!=0 || 
-	      sfc->source()->point().hy()!=0 ||
-	      sfc->source()->point().hz()<=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	top = Object_handle(SVertex_const_handle(sfc->source()));      
-      }
-    }
-
-    sf = bottomSF.front();
-    if(bottomSF.size()==1)
-      bottom = Object_handle(SFace_const_handle(sf));
-    else {
-      SHalfedge_handle se(sf->sface_cycles_begin());
-      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
-      
-      if(bottomSF.size()==2) {
-	while(sfc->circle().c()!=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	bottom = Object_handle(SHalfedge_const_handle(sfc));
-      } else {
-	CGAL_assertion(bottomSF.size() > 0);
-	while(sfc->source()->point().hx()!=0 || 
-	      sfc->source()->point().hy()!=0 || 
-	      sfc->source()->point().hz()>=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	bottom = Object_handle(SVertex_const_handle(sfc->source()));      
-      }
-    }
-  }
-
-  void erase_redundant_vertices() {
-
-    std::cerr << "erase redundant vertices " << std::endl;
-
-    /*
-    SVertex_iterator svi;
-    CGAL_forall_svertices(svi, *this) {
-      bool erase(true);
-      SHalfedge_around_svertex_circulator 
-	svc(svi->out_sedge()), send(svc);
-      CGAL_For_all(svc, send) {
-	if(svc->incident_sface() != SFace_handle() ||
-	   svc->twin()->incident_sface() != SFace_handle()) {
-	  erase = false;
-	  break;
-	}
-      }
-      if(!erase) continue;
-      SHalfedge_handle se(svi->out_sedge());
-      while(se->twin()->snext() != se) {
-	SHalfedge_handle se_next(se->twin()->snext());
-	delete_edge_pair(se);
-	se = se_next;
-      }
-      delete_edge_pair(se);
-      delete_vertex_only(svi);
-    }
-    */
-
-    std::list<SHalfedge_handle> redundant;
-    SHalfedge_iterator sei;
-    CGAL_forall_sedges(sei, *this) {
-      if(sei->source()->point() ==
-	 sei->twin()->source()->point()) {
-	redundant.push_back(sei);
-      }
-    }
-
-    CGAL::Unique_hash_map<SHalfedge_handle, bool> erased(false);
-    typename std::list<SHalfedge_handle>::iterator ri;
-    for(ri = redundant.begin(); ri != redundant.end(); ++ri) {
-      if(erased[(*ri)]) continue;
-
-      SVertex_handle src((*ri)->source());
-      SVertex_handle tgt((*ri)->twin()->source());
-
-      std::cerr << "erase " << src->point() << std::endl;
-      std::cerr << &*src << " " << &*tgt << std::endl;
-
-      SHalfedge_handle prev((*ri)->sprev());
-      SHalfedge_handle next((*ri)->snext());
-
-      std::cerr << "prev " << &*prev->source()
-		<< "->" << &*prev->twin()->source() << std::endl;      
-      std::cerr << "next " << &*next->source()
-		<< "->" << &*next->twin()->source() << std::endl;
- 
-      if(prev->source() ==
-	 next->twin()->source()) {
-	std::cerr << "delete before" << std::endl;
-	SHalfedge_handle sein;
-	SHalfedge_handle se_cas(next->twin()->snext());
-	SFace_handle sf(next->twin()->incident_sface());
-	if(sf != SFace_handle()) {
-	  std::cerr << "not null " << std::endl;
-	  SFace_cycle_iterator sfci(sf->sface_cycles_begin());
-	  CGAL_assertion(sfci.is_shalfedge());
-	  sein = sfci;
-	  undo_sm_boundary_object(sein, sf);
-	  sein = next->twin()->sprev();
-	  std::cerr << "sein " << sein->source()->point()
-		    << "->" << sein->twin()->source()->point()
-		    << std::endl;
-	}
-	erased[next] = erased[next->twin()] = true;
-	delete_edge_pair(next);
-	next = se_cas;
-	if(sf != SFace_handle()) {
-	  link_as_face_cycle(sein, sf);
-	}
-      }
- 
-      prev->snext() = next;
-      next->sprev() = prev;
-
-      SHalfedge_handle tprev((*ri)->twin()->sprev());
-      SHalfedge_handle tnext((*ri)->twin()->snext());
-      if(tprev->source() ==
-	 tnext->twin()->source()) {
-	std::cerr << "delete twin" << std::endl;
-	SHalfedge_handle sein;
-	SHalfedge_handle se_cap(tprev->twin()->sprev());
-	SFace_handle sf(tprev->twin()->incident_sface());
-	if(sf != SFace_handle()) {
-	  SFace_cycle_iterator sfci(sf->sface_cycles_begin());
-	  CGAL_assertion(sfci.is_shalfedge());
-	  sein=sfci;
-	  undo_sm_boundary_object(sein, sf);
-	  sein = tprev->twin()->snext();
-	}
-	erased[tprev] = erased[tprev->twin()] = true;
-	delete_edge_pair(tprev);
-	tprev = se_cap;
-	if(sf != SFace_handle())
-	  link_as_face_cycle(sein, sf);
-      }
-      tprev->snext() = tnext;
-      tnext->sprev() = tprev;
-
-      std::cerr << "tprev " << &*tprev->source()
-		<< "->" << &*tprev->twin()->source() << std::endl;      
-      std::cerr << "tnext " << &*tnext->source()
-		<< "->" << &*tnext->twin()->source() << std::endl;
-
-      while(next != tnext) {
-      std::cerr << "next " << &*next->source()
-		<< "->" << &*next->twin()->source() << std::endl;
-	SHalfedge_handle se_cas(next->twin()->snext());
-	next->source() = src;
-	next = se_cas;
-      }
-      delete_edge_pair_only(*ri);
-      delete_vertex_only(tgt);
-    }
-  }
-
- public:
-  Gaussian_map() : Base(new Sphere_map) {}
-
-  template<typename NK, typename Items> 
-  Gaussian_map(const CGAL::Nef_polyhedron_3<NK, Items>& N3,
-	      typename CGAL::Nef_polyhedron_3<NK, Items>::Volume_const_iterator c) : Base(new Sphere_map) {
-
-    typedef CGAL::Nef_polyhedron_3<NK, Items> Nef_polyhedron_3;
-
-    typedef typename Nef_polyhedron_3::Vertex_const_handle
-      Vertex_const_handle;   
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle
-      Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle
-      Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle
-      SHalfedge_const_handle;
-    typedef typename Nef_polyhedron_3::SFace_const_handle
-      SFace_const_handle;
-
-    Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex;
-    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
-    Unique_hash_map<Halffacet_const_handle, bool> Facet2bool;
-    Unique_hash_map<Vertex_const_handle, bool> Vertex2bool(false);
-    Unique_hash_map<Halfedge_const_handle, bool> Edge2bool(false);
-    Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge;
-    Unique_hash_map<SFace_const_handle, bool> Shell(false);
-
-    SFace_const_handle sf = c->shells_begin();
-
-    SVertex_creator<Nef_polyhedron_3> create_svertices(this->sphere_map(), Facet2SVertex, Facet2bool, SEdge2SEdge, Vertex2bool, Edge2bool, Shell);
-    SEdge_creator<Nef_polyhedron_3>   create_sedges(this->sphere_map(), Edge2SEdge, Facet2SVertex, SEdge2SEdge, Facet2bool, Edge2bool);
-    SFace_creator<Nef_polyhedron_3>   create_sfaces(N3, this->sphere_map(), Edge2SEdge, Vertex2bool /*, Shell */);
-
-    N3.visit_shell_objects(sf, create_svertices);
-    N3.visit_shell_objects(sf, create_sedges);
-    N3.visit_shell_objects(sf, create_sfaces);
-  }
-
-  template<typename NK> 
-    Gaussian_map(const CGAL::Nef_polyhedron_3<NK>& N3) : Base(new Sphere_map) {
-
-    typedef CGAL::Nef_polyhedron_3<NK> Nef_polyhedron_3;
-    typedef typename Nef_polyhedron_3::Vertex_const_iterator 
-      Vertex_const_iterator;
-    typedef typename Nef_polyhedron_3::Halffacet_const_iterator
-      Halffacet_const_iterator;
-    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator
-      Halffacet_cycle_const_iterator;
-    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
-      SHalfedge_around_facet_const_circulator;
-    typedef typename Nef_polyhedron_3::Volume_const_handle
-      Volume_const_handle;
-    typedef typename Nef_polyhedron_3::Halfedge_const_handle
-      Halfedge_const_handle;
-    typedef typename Nef_polyhedron_3::Halffacet_const_handle
-      Halffacet_const_handle;
-    typedef typename Nef_polyhedron_3::SHalfedge_const_handle
-      SHalfedge_const_handle;
-    
-    Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex;
-    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
-
-    Volume_const_handle c(--N3.volumes_end());
-
-    Halffacet_const_iterator f;
-    CGAL_forall_halffacets(f,N3) {
-      if(f->incident_volume() != c) continue;
-      SVertex_handle sv = new_svertex(f->twin()->plane().orthogonal_vector());
-      sv->mark() = Mark(Point_3(0,0,0), f->mark());
-      Facet2SVertex[f] = sv;
-    }
-    
-    CGAL_forall_halffacets(f,N3) {
-      if(f->incident_volume() != c) continue;
-      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
-      SHalfedge_const_handle se(fc);
-      SHalfedge_around_facet_const_circulator hc(se), hend(hc);
-      do {
-	Halfedge_const_handle e = hc->source();
-	SHalfedge_handle set = Edge2SEdge[e->twin()];
-	if(set == SHalfedge_handle())
-	  Edge2SEdge[e] = new_shalfedge_pair_at_source(Facet2SVertex[f],1);
-	else {
-	  link_as_target_and_append(Facet2SVertex[f], set);
-	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
-	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
-	  set->twin()->circle() = set->circle().opposite();
-	  Edge2SEdge[e] = set->twin();
-	}
-	++hc;
-      } while(hc != hend);
-    }
-    
-    Vertex_const_iterator v;
-    CGAL_forall_vertices(v,N3) {
-
-      typename Nef_polyhedron_3::Nef_polyhedron_S2 SD(N3.get_sphere_map(v));
-      Halfedge_const_handle e(SD.svertices_begin());
-      SHalfedge_handle se = Edge2SEdge[e];
-      SFace_handle sf = this->new_sface();
-      sf->mark() = Mark(v->point(), v->mark());
-      link_as_face_cycle(se,sf);
-    }
-  }
-  
-  template<typename PK> 
-  Gaussian_map(const CGAL::Polyhedron_3<PK>& P, bool closed = true) 
-    : Base(new Sphere_map) {
-    
-    typedef CGAL::Polyhedron_3<PK> Polyhedron_3;
-    typedef typename Polyhedron_3::Vertex_const_iterator 
-      Vertex_const_iterator;
-    typedef typename Polyhedron_3::Facet_const_iterator
-      Facet_const_iterator;
-    typedef typename Polyhedron_3::Halfedge_around_facet_const_circulator
-      Halfedge_around_facet_const_circulator;
-    typedef typename Polyhedron_3::Halfedge_const_handle
-      Halfedge_const_handle;
-    typedef typename Polyhedron_3::Facet_const_handle
-      Facet_const_handle;
-    
-    Unique_hash_map<Facet_const_handle, SVertex_handle> Facet2SVertex;
-    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
-
-    Facet_const_iterator f;
-    for(f = P.facets_begin(); f != P.facets_end(); ++f) {
-      SVertex_handle sv = new_svertex(f->plane().orthogonal_vector());
-      sv->mark() = Mark(Point_3(0,0,0), closed);
-      Facet2SVertex[f] = sv;
-    }
-
-    for(f = P.facets_begin(); f != P.facets_end(); ++f) {
-      Halfedge_around_facet_const_circulator hc(f->facet_begin()),hend(hc);
-      do {
-	Halfedge_const_handle e = hc;
-	SHalfedge_handle set = Edge2SEdge[e->opposite()];
-	if(set == SHalfedge_handle())
-	  Edge2SEdge[e] = new_shalfedge_pair_at_source(Facet2SVertex[f],1);
-	else {
-	  link_as_target_and_append(Facet2SVertex[f], set,1);
-	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), closed);
-	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
-	  set->twin()->circle() = set->circle().opposite();
-	  Edge2SEdge[e] = set->twin();
-	}
-	++hc;
-      } while(hc != hend);
-    }
-   
-    Vertex_const_iterator v;
-    for(v = P.vertices_begin(); v != P.vertices_end(); ++v) {
-      Halfedge_const_handle e(v->halfedge());
-      SHalfedge_handle se = Edge2SEdge[e];
-      SFace_handle sf = this->new_sface();
-      sf->mark() = Mark(v->point(), closed);
-      link_as_face_cycle(se,sf);
-    }
-  }
-
-  Gaussian_map(typename Nef::Halffacet_const_handle f) 
-    : Base(new Sphere_map) 
-  {
-    SVertex_handle 
-      sv1(this->new_svertex(CGAL::ORIGIN + 
-			    f->plane().orthogonal_vector())),
-      sv2(this->new_svertex(CGAL::ORIGIN-sv1->point()));
-	  
-    sv1->mark() = sv1->mark() = 
-      Mark(Point_3(0,0,0), f->mark());
-
-    typename Nef::SHalfedge_around_facet_const_circulator 
-      sfc(f->facet_cycles_begin()), send(sfc);
-
-    SHalfedge_handle se1 = this->new_shalfedge_pair(sv1, sv2);
-    Point_3 orth(sfc->twin()->source()->point());
-    se1->circle() = Sphere_circle(orth.hx(), 
-				  orth.hy(),
-				  orth.hz());
-    se1->twin()->circle() = se1->circle().opposite();
-    se1->mark() = se1->twin()->mark() = 
-      Mark(Point_3(0,0,0), sfc->twin()->source()->mark());
-    
-    SHalfedge_handle se_prev(se1);
-
-    ++sfc;
-    CGAL_For_all(sfc, send) {
-      SHalfedge_handle 
-	se(this->new_shalfedge_pair(se_prev, se_prev->twin(),
-				    SM_decorator::AFTER, SM_decorator::BEFORE));
-      Point_3 orth(sfc->twin()->source()->point());
-      se->circle() = Sphere_circle(orth.hx(), 
-				   orth.hy(),
-				   orth.hz());
-      se->twin()->circle() = se->circle().opposite();
-      se->mark() = se->twin()->mark() = 
-	Mark(Point_3(0,0,0), sfc->twin()->source()->mark());      
-      se_prev = se;
-    }
-
-    typename Sphere_map::SHalfedge_around_svertex_circulator 
-      svc(sv1->out_sedge());
-    CGAL_For_all(sfc, send) {
-      SFace_handle sf = this->new_sface();
-      sf->mark() = 
-	Mark(sfc->source()->source()->point(), sfc->source()->source()->mark());
-      this->link_as_face_cycle(svc->twin(), sf);
-      ++svc;
-    } 
-  }
-
-  Gaussian_map(typename Nef::Halfedge_const_handle e) 
-    : Base(new Sphere_map) 
-  {
-    SHalfloop_handle sl = this->new_shalfloop_pair();
-    Point_3 p = e->twin()->point();
-    sl->circle() = Sphere_circle(p.hx(), p.hy(), p.hz());
-    sl->twin()->circle() = sl->circle().opposite();
-    sl->mark() = sl->twin()->mark() = 
-      Mark(Point_3(0,0,0), e->mark());
-    
-    SFace_handle sf1 = this->new_sface();
-    SFace_handle sf2 = this->new_sface();
-    sf1->mark() = Mark(e->source()->point(), 
-		       e->source()->mark());
-    sf2->mark() = Mark(e->twin()->source()->point(),
-		       e->twin()->source()->mark());
-
-    this->link_as_loop(sl, sf1);
-    this->link_as_loop(sl->twin(), sf2);
-  }
-
-  Gaussian_map(typename Nef::Vertex_const_handle v) 
-    : Base(new Sphere_map) 
-  {
-    SFace_handle sf = this->new_sface();
-    sf->mark() = Mark(v->point(), v->mark());
-  }
-
-
-  void simplify() 
-  {
-	  CGAL_NEF_TRACEN("simplify");
-    
-	  typedef typename CGAL::Union_find<SFace_handle>::handle Union_find_handle;
-	  CGAL::Unique_hash_map< SFace_handle, Union_find_handle> Pitem(NULL);
-	  CGAL::Union_find< SFace_handle> UF;
-    
-	  SFace_iterator f;
-	  CGAL_forall_sfaces(f,*this) {
-		  Pitem[f] = UF.make_set(f);
-		  clear_face_cycle_entries(f);
-	  }
-    
-	  SHalfedge_iterator e, en;
-	  for(e = this->shalfedges_begin(); e != this->shalfedges_end(); e = en) 
-	  { 
-		  en = e; ++en; if ( en==e->twin() ) ++en;
-		  CGAL_NEF_TRACEN("can simplify ? " << PH(e));
-		  CGAL_NEF_TRACEN(e->mark() << " " << e->incident_sface()->mark() 
-						  << " " << e->twin()->incident_sface()->mark());
-		  if (e->incident_sface()->mark() == 
-			  e->twin()->incident_sface()->mark()) {
-			  CGAL_NEF_TRACEN("deleting "<<PH(e));
-			  if ( !UF.same_set(Pitem[e->incident_sface()],
-								Pitem[e->twin()->incident_sface()]) ) {
-	  
-				  UF.unify_sets( Pitem[e->incident_sface()],
-								 Pitem[e->twin()->incident_sface()] );
-				  CGAL_NEF_TRACEN("unioning disjoint faces");
-			  }
-	
-			  CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) << 
-							  " " << is_closed_at_source(e->twin()));
-			  delete_edge_pair(e);
-		  }
-	  }
-    
-	  CGAL::Unique_hash_map<SHalfedge_handle,bool> linked(false);
-	  for (e = this->shalfedges_begin(); e != this->shalfedges_end(); ++e) {
-		  if ( linked[e] ) continue;
-		  SHalfedge_around_sface_circulator hfc(e),hend(hfc);
-		  SFace_handle f = *(UF.find( Pitem[e->incident_sface()]));
-		  CGAL_For_all(hfc,hend) {  set_face(hfc,f); linked[hfc]=true; }
-		  store_sm_boundary_object(e,f);
-	  }
-    
-	  SVertex_iterator v,vn;
-	  for(v = this->svertices_begin(); v != this->svertices_end(); v=vn) 
-	  {
-		  vn=v; ++vn;
-		  if ( is_isolated(v) ) {
-			  delete_vertex_only(v);
-			  continue;
-		  }
-		  if ( has_outdeg_two(v)) {
-			  merge_edge_pairs_at_target(first_out_edge(v)->sprev()); 
-		  } 
-	  }
-    
-	  SFace_iterator fn;
-	  for (f = fn = this->sfaces_begin(); f != this->sfaces_end(); f=fn) 
-	  { 
-		  ++fn;
-		  Union_find_handle pit = Pitem[f];
-		  if ( UF.find(pit) != pit ) {
-			  CGAL_NEF_TRACEN("delete face " << &*f);
-			  delete_face_only(f);
-		  }
-	  }
-  }      
-  
-  void minkowski_sum(const Gaussian_map& G1, const Gaussian_map& G2) {
-    SM_overlayer O(this->sphere_map());
-#ifdef CGAL_NEF3_TIMER_OVERLAY
-    CGAL::Timer t;
-    t.start();
-#endif // CGAL_NEF3_TIMER_OVERLAY
-    O.subdivide(G1.sphere_map(), G2.sphere_map(), true);
-#ifdef CGAL_NEF3_TIMER_OVERLAY
-    t.stop();
-    std::cout << "Runtime_overlay " << t.time() << std::endl;
-#endif // CGAL_NEF3_TIMER_OVERLAY
-    VECTOR_ADDITION va;
-    O.select(va);
-    simplify();
-  }
-  
-  Object_handle get_top() {
-    return top;
-  }
-  Object_handle get_bottom() {
-    return bottom;
-  }
-  
-  Object_handle locate_top() {
-    std::vector<SFace_iterator> topSF;
-    SFace_iterator sfi = this->sfaces_begin();
-    topSF.push_back(sfi);
-    
-    Comparison_result cr;
-    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
-      cr = compare_z(sfi->mark(), (*topSF.begin())->mark());
-      if(cr != CGAL::SMALLER) {
-	if(cr == CGAL::LARGER)
-	  topSF.clear();
-	topSF.push_back(sfi);	
-      }
-    }
-    
-    SFace_handle sf(topSF.front());
-    if(topSF.size()==1)
-    return Object_handle(SFace_const_handle(sf));
-    else {
-      SHalfedge_handle se(sf->sface_cycles_begin());
-      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
-      
-      if(topSF.size()==2) {
-	while(sfc->circle().c()!=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	return Object_handle(SHalfedge_const_handle(sfc));
-      } else {
-	CGAL_assertion(topSF.size() > 0);
-	while(sfc->source()->point().hx()!=0 || 
-	      sfc->source()->point().hy()!=0 ||
-	      sfc->source()->point().hz()<=0) {
-	  ++sfc;
-	  CGAL_assertion(sfc != sfend);
-	}
-	return Object_handle(SVertex_const_handle(sfc->source()));      
-      }
-    }
-    CGAL_error_msg("line should not be executed");
-    return Object_handle();
-  }
-  
-  Object_handle locate_bottom() {
-    std::vector<SFace_iterator> bottomSF;
-    SFace_iterator sfi = this->sfaces_begin();
-    bottomSF.push_back(sfi);
-    
-    Comparison_result cr;
-    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
-      cr = compare_z(sfi->mark(), (*bottomSF.begin())->mark());
-      if(cr != CGAL::LARGER) {
-	if(cr == CGAL::SMALLER)
-	  bottomSF.clear();
-	bottomSF.push_back(sfi);	
-      }
-    }
-    
-    SFace_handle sf(bottomSF.front());
-    if(bottomSF.size()==1)
-    return Object_handle(SFace_const_handle(sf));
-    else {
-      SHalfedge_handle se(sf->sface_cycles_begin());
-      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
-      
-	if(bottomSF.size()==2) {
-	  while(sfc->circle().c()!=0) {
-	    ++sfc;
-	    CGAL_assertion(sfc != sfend);
-	  }
-	  return Object_handle(SHalfedge_const_handle(sfc));
-	} else {
-	  CGAL_assertion(bottomSF.size() > 0);
-	  while(sfc->source()->point().hx()!=0 || 
-		sfc->source()->point().hy()!=0 ||
-		sfc->source()->point().hz()>=0) {
-	    ++sfc;
-	    CGAL_assertion(sfc != sfend);
-	  }
-	  return Object_handle(SVertex_const_handle(sfc->source()));      
-	}
-    }
-    CGAL_error_msg("line should not be executed");
-    return Object_handle();
-  }
-  
-};
-
-template<typename Kernel, typename Nef, typename Mark>
-std::ostream& operator<<(std::ostream& out, const CGAL::Gaussian_map<Kernel, Nef, Mark>& G) {
-  out << "OFF" << std::endl;
-  out << G.number_of_sfaces() << " " << G.number_of_svertices() << " 0" << std::endl;
-  
-  typedef typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SFace_const_iterator 
-    SFace_const_iterator;
-  CGAL::Unique_hash_map<SFace_const_iterator, int> SFace2int;
-  
-  int i=0;
-  SFace_const_iterator sf;
-  CGAL_forall_sfaces(sf, G) {
-    SFace2int[sf] = i++;
-    out << CGAL::to_double(sf->mark().x()) << " " 
-	<< CGAL::to_double(sf->mark().y()) << " " 
-	<< CGAL::to_double(sf->mark().z()) << std::endl;
-  }
-
-  typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SVertex_const_iterator sv;
-  CGAL_forall_svertices(sv,G) {
-    typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SHalfedge_around_svertex_const_circulator 
-      svc(G.first_out_edge(sv)),
-      svc1(svc),
-      svend(svc);
-    out << std::distance(++svc1,svend)+1;
-    CGAL_For_all(svc,svend)
-      out << " " << SFace2int[svc->incident_sface()];
-    out << std::endl;
-  }
-
-  return out;
-}
-
-} //namespace CGAL
-#endif // CGAL_MS3_GAUSSIAN_MAP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Modular_arithmetic/Residue_type.h b/3rdparty/CGAL-4.6/include/CGAL/Modular_arithmetic/Residue_type.h
deleted file mode 100644
index 18f05e7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Modular_arithmetic/Residue_type.h
+++ /dev/null
@@ -1,328 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), Max-Planck-Institute
-// Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sylvain Pion, Michael Hemmer, Alexander Kobel
-
-#ifndef CGAL_RESIDUE_TYPE_H
-#define CGAL_RESIDUE_TYPE_H
-
-#include <CGAL/basic.h>
-
-#include <cfloat>
-#include <boost/operators.hpp>
-
-#ifdef CGAL_HAS_THREADS
-#  include <boost/thread/tss.hpp>
-#endif
-
-namespace CGAL {
-
-class Residue;
-    
-Residue operator + (const Residue&);
-Residue operator - (const Residue&);
-
-std::ostream& operator << (std::ostream& os, const Residue& p);
-std::istream& operator >> (std::istream& is, Residue& p);
-
-/*! \ingroup CGAL_Modular_traits
- * \brief This class represents the Field Z mod p. 
- *  
- * This class uses the type double for representation. 
- * Therefore the value of p is restricted to primes less than 2^26.
- * By default p is set to 67108859.
- *
- * It provides the standard operators +,-,*,/ as well as in&output.
- * 
- * \see Modular_traits
- */
-class Residue:
-    boost::ordered_field_operators1< Residue,
-    boost::ordered_field_operators2< Residue, int > >{
-    
-public:
-  typedef Residue Self;
-  typedef Residue NT;
-  
-private:
-  CGAL_EXPORT static const double  CST_CUT; 
-  
-#ifdef CGAL_HAS_THREADS
-  CGAL_EXPORT static boost::thread_specific_ptr<int>    prime_int_;
-  CGAL_EXPORT static boost::thread_specific_ptr<double> prime_;
-  CGAL_EXPORT static boost::thread_specific_ptr<double> prime_inv_;
-  
-  static void init_class_for_thread(){
-    CGAL_precondition(prime_int_.get() == NULL); 
-    CGAL_precondition(prime_.get()     == NULL); 
-    CGAL_precondition(prime_inv_.get() == NULL); 
-    prime_int_.reset(new int(67111067));
-    prime_.reset(new double(67111067.0));
-    prime_inv_.reset(new double(1.0/67111067.0));
-  }
-  
-  static inline int get_prime_int(){
-    if (prime_int_.get() == NULL)
-      init_class_for_thread();
-    return *prime_int_.get();
-  }
-  
-  static inline double get_prime(){
-    if (prime_.get() == NULL)
-      init_class_for_thread();
-    return *prime_.get();
-  }
-  
-  static inline double get_prime_inv(){
-    if (prime_inv_.get() == NULL)
-      init_class_for_thread();
-    return *prime_inv_.get();
-  }
-#else
-  CGAL_EXPORT  static int prime_int;
-  CGAL_EXPORT  static double prime;
-  CGAL_EXPORT  static double prime_inv;
-  static int get_prime_int(){ return prime_int;}
-  static double get_prime()    { return prime;}
-  static double get_prime_inv(){ return prime_inv;}  
-#endif
-
-    /* Quick integer rounding, valid if a<2^51. for double */ 
-    static inline 
-    double RES_round (double a){
-      // call CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_TONEAREST)
-      // before using modular arithmetic 
-      CGAL_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
-      return ( (a + CST_CUT)  - CST_CUT);      
-    }
-
-    /* Big modular reduction (e.g. after multiplication) */
-    static inline 
-    double RES_reduce (double a){
-      double result = a - get_prime() * RES_round(a * get_prime_inv());
-      CGAL_postcondition(2*result <  get_prime());
-      CGAL_postcondition(2*result > -get_prime());
-      return result;
-    }
-
-    /* Little modular reduction (e.g. after a simple addition). */
-    static inline 
-    double RES_soft_reduce (double a){
-      double p = get_prime();
-        double b = 2*a;
-        return (b>p) ? a-p :
-            ((b<-p) ? a+p : a);
-    }
-
-    
-    /* -a */
-    static inline 
-    double RES_negate(double a){
-        return RES_soft_reduce(-a);
-    }
-
-
-    /* a*b */
-    static inline 
-    double RES_mul (double a, double b){
-        double c = a*b;
-        return RES_reduce(c);
-    }
-
-
-    /* a+b */
-    static inline 
-    double RES_add (double a, double b){
-        double c = a+b;
-        return RES_soft_reduce(c);
-    }
-
-    
-    /* a^-1, using Bezout (extended Euclidian algorithm). */
-    static inline 
-    double RES_inv (double ri1){
-        CGAL_precondition (ri1 != 0.0);
-
-        double bi = 0.0;
-        double bi1 = 1.0;
-        double ri = get_prime();
-        double p, tmp, tmp2;
-    
-        Real_embeddable_traits<double>::Abs double_abs;
-        while (double_abs(ri1) != 1.0)
-        {
-            p = RES_round(ri/ri1);
-            tmp = bi - p * bi1;
-            tmp2 = ri - p * ri1;
-            bi = bi1;
-            ri = ri1;
-            bi1 = tmp;
-            ri1 = tmp2;
-        };
-
-        return ri1 * RES_soft_reduce(bi1);	/* Quicker !!!! */
-    }
-    
-    /* a/b */
-    static inline 
-    double RES_div (double a, double b){
-        return RES_mul(a, RES_inv(b));
-    }    
-
-public:
-    /*! \brief sets the current prime. 
-     *  
-     *  Note that you are going to change a static member!
-     *  \pre p is prime, but we abstained from such a test.
-     *  \pre 0 < p < 2^26
-     *  
-     */
-    static int 
-    set_current_prime(int p){   
-      int old_prime = get_prime_int();  
-#ifdef CGAL_HAS_THREADS
-      *prime_int_.get() = p;
-      *prime_.get() = double(p);
-      *prime_inv_.get() = 1.0/double(p);
-#else
-      prime_int = p;
-      prime = double(p);
-      prime_inv = 1.0 / prime;
-#endif
-      return old_prime; 
-    }
- 
-  /*! \brief return the current prime.  */
-    static int get_current_prime(){
-      return get_prime_int();
-    }
-  
-  int  get_value() const{
-    CGAL_precondition(2*x_ <  get_prime());
-    CGAL_precondition(2*x_ > -get_prime());
-    return int(x_);
-  }
-    
-private:
-    double x_;
-
-public: 
-
-    //! constructor of Residue, from int 
-    Residue(int n = 0){
-        x_= RES_reduce(n);
-    }
-
-    //! constructor of Residue, from long 
-    Residue (long n) {
-        x_= RES_soft_reduce (static_cast< double > (n % get_prime_int()));
-    }
-
-    //! constructor of Residue, from long long
-    Residue (long long n) {
-        x_= RES_soft_reduce (static_cast< double > (n % get_prime_int()));
-    }
-   
-    //! Access operator for x, \c const 
-    const double& x() const { return x_; }
-    //! Access operator for x
-    double&       x()       { return x_; }                     
-
-    Self& operator += (const Self& p2) { 
-        x() = RES_add(x(),p2.x()); 
-        return (*this); 
-    }
-    Self& operator -= (const Self& p2){ 
-        x() = RES_add(x(),RES_negate(p2.x())); 
-        return (*this); 
-    }
-    Self& operator *= (const Self& p2){ 
-        x() = RES_mul(x(),p2.x()); 
-        return (*this); 
-    }
-    Self& operator /= (const Self& p2) { 
-        x() = RES_div(x(),p2.x()); 
-        return (*this); 
-    }
-    // 
-    Self& operator += (int p2) { 
-        x() = RES_add(x(),Residue(p2).x()); 
-        return (*this); 
-    }
-    Self& operator -= (int p2){ 
-        x() = RES_add(x(),Residue(-p2).x()); 
-        return (*this); 
-    }
-
-    Self& operator *= (int p2){ 
-        x() = RES_mul(x(),Residue(p2).x()); 
-        return (*this); 
-    }
-
-    Self& operator /= (int p2) { 
-        x() = RES_div(x(),Residue(p2).x()); 
-        return (*this); 
-    }
-  
-    friend Self operator + (const Self&);
-    friend Self operator - (const Self&);                
-};
-
-inline Residue operator + (const Residue& p1)
-{ return p1; }
-
-inline Residue operator - (const Residue& p1){ 
-    typedef Residue RES;
-    Residue r; 
-    r.x() = RES::RES_negate(p1.x());
-    return r; 
-}
-
-inline bool operator == (const Residue& p1, const Residue& p2)
-{ return ( p1.x()==p2.x() ); }   
-inline bool operator == (const Residue& p1, int p2)
-{ return ( p1 == Residue(p2) ); }   
-
-
-inline bool operator < (const Residue& p1, const Residue& p2)
-{ return ( p1.x() < p2.x() ); }   
-inline bool operator < (const Residue& p1, int p2)
-{ return ( p1.x() < Residue(p2).x() ); }   
-
-
-// I/O 
-inline std::ostream& operator << (std::ostream& os, const Residue& p) {   
-    typedef Residue RES;
-    os <<"("<< int(p.x())<<"%"<<RES::get_current_prime()<<")";
-    return os;
-}
-
-inline std::istream& operator >> (std::istream& is, Residue& p) {
-    char ch;
-    int prime;
-
-    is >> p.x();
-    is >> ch;    // read the %
-    is >> prime; // read the prime
-    CGAL_precondition(prime==Residue::get_current_prime());
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_RESIDUE_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Monge_via_jet_fitting.h b/3rdparty/CGAL-4.6/include/CGAL/Monge_via_jet_fitting.h
deleted file mode 100644
index da1502f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Monge_via_jet_fitting.h
+++ /dev/null
@@ -1,784 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Pouget and Frédéric Cazals
-#ifndef CGAL_MONGE_VIA_JET_FITTING_H_
-#define CGAL_MONGE_VIA_JET_FITTING_H_
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/circulator.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/eigen.h>
-#include <CGAL/Cartesian_converter.h>
-#include <math.h>
-#include <utility>
-#ifdef CGAL_EIGEN3_ENABLED
-#include <CGAL/Eigen_svd.h>
-#else
-#ifdef CGAL_LAPACK_ENABLED
-#include <CGAL/Lapack/Linear_algebra_lapack.h>
-#endif
-#endif
-
-namespace CGAL {
-
-inline
-unsigned int fact(unsigned int n){
-  unsigned int i, p=1;
-  for(i=2; i<=n; i++) p *= i;
-  return p;
-}
-
-////////////////////// CLASS Monge_via_jet_fitting ////////////////////////
-#ifdef CGAL_EIGEN3_ENABLED
-template < class DataKernel, class LocalKernel = Simple_cartesian<double>, class SvdTraits = Eigen_svd >
-#else
-#ifdef CGAL_LAPACK_ENABLED
-template < class DataKernel, class LocalKernel = Simple_cartesian<double>, class SvdTraits = Lapack_svd>  
-#else
-template < class DataKernel, class LocalKernel, class SvdTraits >  
-#endif
-#endif
-  class Monge_via_jet_fitting {
- public:
-//////////////////////begin nested CLASS Monge_form ///////////////////
-class Monge_form {
- public: 
-  typedef typename DataKernel::FT        FT;
-  typedef typename DataKernel::Point_3   Point_3;
-  typedef typename DataKernel::Vector_3  Vector_3;
- protected:
-  //point on the fitted surface where diff quantities are computed
-  Point_3 m_origin_pt;
-  //the monge trihedron (d1,d2,n) is orthonormal direct
-  Vector_3 m_d1;   //maximal ppal dir
-  Vector_3 m_d2;   //minimal ppal dir
-  Vector_3 m_n;    //normal direction
-  //coeff = (k1, k2, //ppal curv
-  //         b0, b1, b2, b3, //third order
-  //         c0, c1, c2, c3, c4) //fourth order
-  //     if (degree==1) no coeff needed
-  std::vector<FT> m_coefficients;
-  
-public:
-  //constructor
-  Monge_form() {
-    m_origin_pt  = Point_3(0.,0.,0.); 
-    m_d1 = Vector_3(0.,0.,0.);
-    m_d2 = Vector_3(0.,0.,0.);
-    m_n = Vector_3(0.,0.,0.);
-    m_coefficients = std::vector<FT>();
-  }
-  ~Monge_form() {}
-  //access
-  const Point_3 origin() const { return m_origin_pt; }
-  Point_3& origin() { return m_origin_pt; }
-  const Vector_3 maximal_principal_direction() const { return m_d1; }
-  Vector_3& maximal_principal_direction() { return m_d1; }
-  const Vector_3 minimal_principal_direction() const { return m_d2; }
-  Vector_3& minimal_principal_direction() { return m_d2; }
-  const Vector_3 normal_direction() const { return m_n; }
-  Vector_3& normal_direction() { return m_n; }
-  const std::vector<FT> coefficients() const { return m_coefficients; }
-  std::vector<FT>& coefficients() { return m_coefficients; }
-
-  const FT principal_curvatures(size_t i) const {
-    CGAL_precondition( (i == 0 || i == 1) && coefficients().size() >=2 );
-    return coefficients()[i]; }
-  const FT third_order_coefficients(size_t i) const {
-    CGAL_precondition( i <= 3 && coefficients().size() >=6 );
-    return coefficients()[i+2]; }
-  const FT fourth_order_coefficients(size_t i) const {
-    CGAL_precondition( i <= 4 && coefficients().size() >=11 );
-    return coefficients()[i+6]; }
- 
-  //if d>=2, number of coeffs = (d+1)(d+2)/2 -4. 
-  //we remove cst, linear and the xy coeff which vanish
-  void set_up(std::size_t degree);
-  //switch min-max ppal curv/dir wrt a given normal orientation.
-  // if given_normal.monge_normal < 0 then change the orientation
-  // if z=g(x,y) in the basis (d1,d2,n) then in the basis (d2,d1,-n)
-  // z=h(x,y)=-g(y,x)
-  void comply_wrt_given_normal(const Vector_3& given_normal);
-  void dump_verbose(std::ostream& out_stream) const;
-  void dump_4ogl(std::ostream& out_stream, const FT scale);
-};
-//////////////////////end nested CLASS Monge_form /////////////////////
-
-//continue main class Monge_via_jet_fitting ////////
- public:
- typedef  DataKernel   Data_kernel;
- typedef  LocalKernel  Local_kernel;
- 
- //used to convert number types, points and vectors back and forth
- typedef NT_converter<typename Local_kernel::FT, typename  Data_kernel::FT> L2D_NTconverter;
- Cartesian_converter<Data_kernel, Local_kernel> D2L_converter; 
- Cartesian_converter<Local_kernel, Data_kernel> L2D_converter; 
-  
- typedef typename Local_kernel::FT       FT;
- typedef typename Local_kernel::Point_3  Point_3;
- typedef typename Local_kernel::Vector_3 Vector_3;
- typedef CGAL::Aff_transformation_3<Local_kernel> Aff_transformation;
-
- typedef typename Data_kernel::FT       DFT;
-
- typedef typename SvdTraits::Vector LAVector;
- typedef typename SvdTraits::Matrix LAMatrix;
- 
-
- public:
- Monge_via_jet_fitting(); 
- template <class InputIterator>
- Monge_form operator()(InputIterator begin, InputIterator end,  
-		       size_t d, size_t dprime);
- const FT condition_number() const {return condition_nb;}
- const std::pair<FT, Vector_3> pca_basis(size_t i) const {
-   CGAL_precondition( i<3 );
-   return m_pca_basis[i];}
- 
- protected:
- int deg;
- int deg_monge;
-  int nb_d_jet_coeff;
-  int nb_input_pts;
-  FT preconditionning;
-  CGAL::Sqrt<FT> Lsqrt;
-  FT condition_nb;
-  
-  std::vector< std::pair<FT, Vector_3> > m_pca_basis;
-
-  //translate_p0 changes the origin of the world to p0 the first point 
-  //  of the input data points
-  //change_world2fitting (coord of a vector in world) = coord of this 
-  //  vector in fitting. The matrix tranform has as lines the coord of
-  //  the basis vectors of fitting in the world coord. 
-  //idem for change_fitting2monge
-  Aff_transformation translate_p0, change_world2fitting,
-    change_fitting2monge;
-
-  //eigen val and vect stored in m_pca_basis
-  // change_world2fitting is computed 
- template <class InputIterator>
-  void compute_PCA(InputIterator begin, InputIterator end); 
-
-  //Coordinates of input points are computed in the fitting basis with 
-  //  p0 as origin.
-  //Preconditionning is computed, M and Z are filled
- template <class InputIterator>
-  void fill_matrix(InputIterator begin, InputIterator end,
-		   std::size_t d, LAMatrix& M, LAVector& Z);
-  //A is computed, solving MA=Z in the ls sense, the solution A is stored in Z
-  //Preconditionning is needed
-  void solve_linear_system(LAMatrix &M, LAVector& Z);
-  
-  //Classical differential geometric calculus
-  //change_fitting2monge is computed
-  //if deg_monge =1 only 1st order info
-  //if deg_monge >= 2 2nd order info are computed
-  void compute_Monge_basis(const FT* A, Monge_form& monge_form);
-
-  //if deg_monge >=3 then 3rd (and 4th) order info are computed
-  void compute_Monge_coefficients(FT* A, std::size_t dprime, 
-				  Monge_form& monge_form);
-
-  //for a trihedron (v1,v2,v3) switches v1 to -v1 if det(v1,v2,v3) < 0
-  void switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
-				   const Vector_3& v3);
-
-    friend
-    std::ostream&
-    operator<<(std::ostream& out_stream, 
-	       const typename Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form& monge){
-      monge.dump_verbose(out_stream);
-      return out_stream;
-    }
-};
-
-//-------------------------------------------------------------------
-// Implementation
-//------------------------------------------------------------------
-
-// Implementation nested Monge_form //////////////////////////////
-//template <class DataKernel>
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-  void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-  Monge_form::
-set_up(std::size_t degree) {
-  if ( degree >= 2 ) std::fill_n(back_inserter(m_coefficients),
-				 (degree+1)*(degree+2)/2-4, 0.);
-}
-
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
-comply_wrt_given_normal(const Vector_3& given_normal)
-{
-  if ( given_normal*this->normal_direction() < 0 )
-    {
-      normal_direction() = -normal_direction();
-      std::swap(maximal_principal_direction(), minimal_principal_direction());
-      if ( coefficients().size() >= 2) 
-	std::swap(coefficients()[0],coefficients()[1]);
-      if ( coefficients().size() >= 6) {
-	std::swap(coefficients()[2],coefficients()[5]);
-	std::swap(coefficients()[3],coefficients()[4]);}
-      if ( coefficients().size() >= 11) {
-	std::swap(coefficients()[6],coefficients()[10]);
-	std::swap(coefficients()[7],coefficients()[9]);}
-      typename std::vector<FT>::iterator itb = coefficients().begin(),
-	ite = coefficients().end();
-      for (;itb!=ite;itb++) { *itb = -(*itb); }
-    }
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
-dump_verbose(std::ostream& out_stream) const
-{
-  out_stream << "origin : " << origin() << std::endl
-	     << "n : " << normal_direction() << std::endl;
-  if ( coefficients().size() >= 2) 
-    out_stream << "d1 : " << maximal_principal_direction() << std::endl 
-	       << "d2 : " << minimal_principal_direction() << std::endl
-	       << "k1 : " << coefficients()[0] << std::endl 
-	       << "k2 : " << coefficients()[1] << std::endl;	      
-  if ( coefficients().size() >= 6) 
-    out_stream << "b0 : " << coefficients()[2] << std::endl 
-	       << "b1 : " << coefficients()[3] << std::endl
- 	       << "b2 : " << coefficients()[4] << std::endl
- 	       << "b3 : " << coefficients()[5] << std::endl;
-  if ( coefficients().size() >= 11) 
-    out_stream << "c0 : " << coefficients()[6] << std::endl 
-	       << "c1 : " << coefficients()[7] << std::endl
- 	       << "c2 : " << coefficients()[8] << std::endl
- 	       << "c3 : " << coefficients()[9] << std::endl 
- 	       << "c4 : " << coefficients()[10] << std::endl
-	       << std::endl; 
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
-dump_4ogl(std::ostream& out_stream, const FT scale)
-{
-  CGAL_precondition( coefficients().size() >= 2 );
-  out_stream << origin()  << " "
-	     << maximal_principal_direction() * scale << " "
-	     << minimal_principal_direction() * scale << " "
-	     << coefficients()[0] << " "
-	     << coefficients()[1] << " "
-	     << std::endl;
-}
-//////////////////////////////////////////////////////////////
-// Implementation main Monge_via_jet_fiting
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-  Monge_via_jet_fitting()
-{
-  m_pca_basis = std::vector< std::pair<FT, Vector_3> >(3);
-} 
-
-template < class DataKernel, class LocalKernel, class SvdTraits> 
-template <class InputIterator>
-  typename  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form
-  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-  operator()(InputIterator begin, InputIterator end, 
-	     size_t d, size_t dprime)
-{
-  // precondition: on the degrees, jet and monge
-  CGAL_precondition( (d >=1) && (dprime >= 1) 
-		     && (dprime <= 4) && (dprime <= d) );
-  this->deg = static_cast<int>(d);
-  this->deg_monge = static_cast<int>(dprime);
-  this->nb_d_jet_coeff = static_cast<int>((d+1)*(d+2)/2);
-  this->nb_input_pts = static_cast<int>(end - begin);
-  // precondition: solvable ls system
-  CGAL_precondition( nb_input_pts >= nb_d_jet_coeff );
-
-  //Initialize
-  Monge_form monge_form;
-  monge_form.set_up(dprime);
-  //for the system MA=Z
-  LAMatrix M(nb_input_pts, nb_d_jet_coeff);
-  LAVector Z(nb_input_pts);
-
-  compute_PCA(begin, end);
-  fill_matrix(begin, end, d, M, Z);//with precond
-  solve_linear_system(M, Z);  //correct with precond
-  compute_Monge_basis(Z.vector(), monge_form);
-  if ( dprime >= 3) compute_Monge_coefficients(Z.vector(), dprime, monge_form);
-  return monge_form;
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-template <class InputIterator>
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-compute_PCA(InputIterator begin, InputIterator end)
-{
-  int n = this->nb_input_pts;
-  FT x, y, z,
-    sumX = 0., sumY = 0., sumZ = 0.,
-    sumX2 = 0., sumY2 = 0., sumZ2 = 0.,
-    sumXY = 0., sumXZ = 0., sumYZ = 0., 
-    xx, yy, zz, xy, xz, yz;
-  
-  for (; begin != end; begin++)
-    {
-      Point_3 lp = D2L_converter(*begin);
-      x = lp.x();
-      y = lp.y();
-      z = lp.z();   
-      sumX += x / n;
-      sumY += y / n;
-      sumZ += z / n;
-      sumX2 += x * x / n;
-      sumY2 += y * y / n;
-      sumZ2 += z * z / n;
-      sumXY += x * y / n;
-      sumXZ += x * z / n;
-      sumYZ += y * z / n;
-    }
-  xx = sumX2 - sumX * sumX;
-  yy = sumY2 - sumY * sumY;
-  zz = sumZ2 - sumZ * sumZ;
-  xy = sumXY - sumX * sumY;
-  xz = sumXZ - sumX * sumZ;
-  yz = sumYZ - sumY * sumZ;
-
-  // assemble covariance matrix as a
-  // semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  // 3 4 5
-  FT covariance[6] = {xx,xy,yy,xz,yz,zz};
-  FT eigen_values[3];
-  FT eigen_vectors[9];
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  CGAL::internal::eigen_symmetric<FT>(covariance,3,eigen_vectors,eigen_values);
-  //store in m_pca_basis
-  for (int i=0; i<3; i++)
-    {
-      m_pca_basis[i].first =  eigen_values[i];
-    }
-  Vector_3 v1(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]);
-  m_pca_basis[0].second = v1;
-  Vector_3 v2(eigen_vectors[3],eigen_vectors[4],eigen_vectors[5]);
-  m_pca_basis[1].second = v2;
-  Vector_3 v3(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]);
-  m_pca_basis[2].second = v3;
-  switch_to_direct_orientation(m_pca_basis[0].second,
-			       m_pca_basis[1].second,
-			       m_pca_basis[2].second);
- 
-  //Store the change of basis W->F
-  Aff_transformation 
-    change_basis (m_pca_basis[0].second[0], m_pca_basis[0].second[1], m_pca_basis[0].second[2], 
-		  m_pca_basis[1].second[0], m_pca_basis[1].second[1], m_pca_basis[1].second[2],
-		  m_pca_basis[2].second[0], m_pca_basis[2].second[1], m_pca_basis[2].second[2]);
-
-   this->change_world2fitting = change_basis; 
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-template <class InputIterator>
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-fill_matrix(InputIterator begin, InputIterator end,
-	    std::size_t d, LAMatrix &M, LAVector& Z)
-{
-  //origin of fitting coord system = first input data point
-  Point_3 point0 = D2L_converter(*begin);
-  //transform coordinates of sample points with a
-  //translation ($-p$) and multiplication by $ P_{W\rightarrow F}$.
-  Point_3 orig(0.,0.,0.);
-  Vector_3 v_point0_orig(orig - point0);
-  Aff_transformation transl(CGAL::TRANSLATION, v_point0_orig);
-  this->translate_p0 = transl;
-  Aff_transformation transf_points = this->change_world2fitting *
-    this->translate_p0;
-  
-  //compute and store transformed points
-  std::vector<Point_3> pts_in_fitting_basis;
-  CGAL_For_all(begin,end){
-    Point_3 cur_pt = transf_points(D2L_converter(*begin));
-    pts_in_fitting_basis.push_back(cur_pt);
-  }
-  
-  //Compute preconditionning
-  FT precond = 0.;
-  typename std::vector<Point_3>::iterator itb = pts_in_fitting_basis.begin(),
-    ite = pts_in_fitting_basis.end();
-  CGAL_For_all(itb,ite) precond += CGAL::abs(itb->x()) + CGAL::abs(itb->y());
-  precond /= 2*this->nb_input_pts;
-  this->preconditionning = precond;
-  //fill matrices M and Z
-  itb = pts_in_fitting_basis.begin();
-  int line_count = 0;
-  FT x, y;
-  CGAL_For_all(itb,ite) {
-    x = itb->x();
-    y = itb->y();
-    //  Z[line_count] = itb->z();
-    Z.set(line_count,itb->z());
-    for (std::size_t k=0; k <= d; k++) {
-      for (std::size_t i=0; i<=k; i++) {
-        M.set(line_count, k*(k+1)/2+i,
-              std::pow(x,static_cast<double>(k-i))
-              * std::pow(y,static_cast<double>(i))
-              /( fact(static_cast<unsigned int>(i)) *
-                 fact(static_cast<unsigned int>(k-i))
-                 *std::pow(this->preconditionning,static_cast<double>(k))));
-      }
-    }
-    line_count++;
-  }
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-solve_linear_system(LAMatrix &M, LAVector& Z)
-{
-  condition_nb = SvdTraits::solve(M, Z); 
-  for (int k=0; k <= this->deg; k++) for (int i=0; i<=k; i++)
-    // Z[k*(k+1)/2+i] /= std::pow(this->preconditionning,k);
-    Z.set( k*(k+1)/2+i, Z(k*(k+1)/2+i) / std::pow(this->preconditionning,k) );
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>   
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-compute_Monge_basis(const FT* A, Monge_form& monge_form)
-{
-  // only 1st order info.
-  if ( this->deg_monge == 1 ) {  
-    Point_3 orig_monge(0., 0., A[0]);
-    Vector_3  normal(-A[1], -A[2], 1.);
-    FT norm2 = normal * normal;
-    normal = normal / Lsqrt(norm2);
-    monge_form.origin() = L2D_converter(
-      (this->translate_p0.inverse() * 
-       this->change_world2fitting.inverse()) (orig_monge) );
-    monge_form.normal_direction() = L2D_converter(this->change_world2fitting.inverse()(normal));
-  }
-  // else (deg_monge >= 2) then 2nd order info are computed
-  else {
-  //bi-index to uni-index conversion : A(i,j)=A[(i+j)(i+j+1)/2+j]
-  Point_3 orig_monge(0., 0., A[0]);
-  //normal = Xu crossprod Xv
-  Vector_3 Xu(1.,0.,A[1]), Xv(0.,1.,A[2]), normal(-A[1], -A[2], 1.);
-  FT norm2 = normal * normal;
-  normal = normal / Lsqrt(norm2);
-
-  //Surface in fitting_basis : X(u,v)=(u,v,J_A(u,v))
-  //in the basis Xu=(1,0,A[1]), Xv=(0,1,A[2]), Weingarten=-I^{-1}II
-  //first fond form I=(e,f,f,g)
-  //                 =(Xu.Xu, Xu.Xv, Xu.Xv, Xv.Xv)
-  //second fond form II=(l,m,m,n)/norm2^(1/2)
-  //                   =(n.Xuu, n.Xuv, n.Xuv, n.Xvv)
-  //ppal curv are the opposite of the eigenvalues of Weingarten or the
-  //  eigenvalues of weingarten = -Weingarten = I^{-1}II
-  typedef typename CGAL::Linear_algebraCd<FT>::Matrix Matrix;
-
-  FT e = 1+A[1]*A[1], f = A[1]*A[2], g = 1+A[2]*A[2],
-    l = A[3], m = A[4], n = A[5];
-  Matrix  weingarten(2,2,0.);
-  weingarten(0,0) = (g*l-f*m)/ (Lsqrt(norm2)*norm2);
-  weingarten(0,1) = (g*m-f*n)/ (Lsqrt(norm2)*norm2);
-  weingarten(1,0) = (e*m-f*l)/ (Lsqrt(norm2)*norm2);
-  weingarten(1,1) = (e*n-f*m)/ (Lsqrt(norm2)*norm2);
-  // Y, Z are normalized GramSchmidt of Xu, Xv
-  // Xu->Y=Xu/||Xu||;
-  // Xv->Z=Xv-(Xu.Xv)Xu/||Xu||^2;
-  // Z-> Z/||Z||
-  Vector_3 Y, Z;
-  FT normXu = Lsqrt( Xu*Xu );
-  Y = Xu / normXu;
-  FT XudotXv = Xu * Xv;
-  Z = Xv - XudotXv * Xu / (normXu*normXu);
-  FT normZ = Lsqrt( Z*Z );
-  Z = Z / normZ;
-  Matrix change_XuXv2YZ(2,2,0.);
-  change_XuXv2YZ(0,0) = 1 / normXu;
-  change_XuXv2YZ(0,1) = -XudotXv / (normXu * normXu * normZ);
-  change_XuXv2YZ(1,0) = 0;
-  change_XuXv2YZ(1,1) = 1 / normZ;
-  FT det = 0.;
-  Matrix inv = CGAL::Linear_algebraCd<FT>::inverse ( change_XuXv2YZ, det );
-  //in the new orthonormal basis (Y,Z) of the tangent plane :
-  weingarten = inv *(1/det) * weingarten * change_XuXv2YZ;
-  
-  //switch to eigen_symmetric algo for diagonalization of weingarten
-  FT W[3] = {weingarten(0,0), weingarten(1,0), weingarten(1,1)};
-  FT eval[2];
-  FT evec[4];
-  //eval in decreasing order
-  CGAL::internal::eigen_symmetric<FT>(W,2,evec,eval);
-
-  Vector_3 d_max = evec[0]*Y + evec[1]*Z,
-    d_min = evec[2]*Y + evec[3]*Z;
-
-  switch_to_direct_orientation(d_max, d_min, normal);
-  Aff_transformation change_basis (d_max[0], d_max[1], d_max[2], 
-				   d_min[0], d_min[1], d_min[2],
-				   normal[0], normal[1], normal[2]);
-  this->change_fitting2monge = change_basis;
-
-  //store the monge basis origin and vectors with their world coord
-  //store ppal curv
-  monge_form.origin() = L2D_converter(
-    (this->translate_p0.inverse() * 
-     this->change_world2fitting.inverse()) (orig_monge ));
-  monge_form.maximal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_max));
-  monge_form.minimal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_min));
-  monge_form.normal_direction()  = L2D_converter(this->change_world2fitting.inverse()(normal));
-  monge_form.coefficients()[0] = L2D_NTconverter()(eval[0]);
-  monge_form.coefficients()[1] = L2D_NTconverter()(eval[1]);
-  }
-  //end else
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-compute_Monge_coefficients(FT* A, std::size_t dprime, 
-			   Monge_form& monge_form)
-{
-  //One has the equation w=J_A(u,v) of the fitted surface S 
-  // in the fitting_basis
-  //Substituing (u,v,w)=change_fitting2monge^{-1}(x,y,z)
-  //One has the equation f(x,y,z)=0 on this surface S in the monge
-  //  basis
-  //The monge form of the surface at the origin is the bivariate fct
-  //   g(x,y) s.t. f(x,y,g(x,y))=0
-  //voir les calculs Maple dans monge.mws
-  //Notations are f123= d^3f/dxdydz
-  //              g(x,y)=sum (gij x^i y^j/ i!j!) with 
-  //              g00=g10=g01=g11=0, g20=kmax, g02=kmin
-  //
-  //g(x,y)= 1/2*(k1x^2 +k2y^2) 
-  //       +1/6*(b0x^3 +3b1x^2y +3b2xy^2 +b3y^3) 
-  //       +1/24*(c0x^4 +4c1x^3y +6c2x^2y^2 +4c3xy^3 +c4y^4)
-  //       +...
-  // p stores change_fitting2monge^{-1}=change_fitting2monge^{T}
-  FT p[3][3];
-  p[0][0] = this->change_fitting2monge.m(0,0);
-  p[1][0] = this->change_fitting2monge.m(0,1);
-  p[2][0] = this->change_fitting2monge.m(0,2);
-  p[0][1] = this->change_fitting2monge.m(1,0);
-  p[1][1] = this->change_fitting2monge.m(1,1);
-  p[2][1] = this->change_fitting2monge.m(1,2);
-  p[0][2] = this->change_fitting2monge.m(2,0);
-  p[1][2] = this->change_fitting2monge.m(2,1);
-  p[2][2] = this->change_fitting2monge.m(2,2);
-
-  // formula are designed for w=sum( Aij ui vj), but we have J_A = sum( Aij/i!j! ui vj)
-  for (int k=0; k <= this->deg; k++) for (int i=0; i<=k; i++)
-    A[k*(k+1)/2+i] /= fact(k-i)*fact(i);//this is A(k-i;i)
-
-/*   //debug */
-/*   std::cout << "coeff of A" << std::endl */
-/* 	    << A[0] << " "<< A[1] << " "<< A[2] << std::endl */
-/* 	    << A[3] << " "<< A[4] << " "<< A[5] << std::endl */
-/* 	    << A[6] << " "<< A[7] << " "<< A[8] << " "<< A[9]<< std::endl */
-/* 	    << A[10] << " "<< A[11] << " "<< A[12] << " "<< A[13]<< " " << A[14] << std::endl; */
-
-
-
-  //     note f1 = f2 = f12 = 0 
-  //     FT f1 = A[1] * p[0][0] + A[2] * p[1][0] - p[2][0];
-  //     FT f2 = A[2] * p[1][1] + A[1] * p[0][1] - p[2][1];
-  //     FT f12 = 
-  //     2 * A[3] * p[0][0] * p[0][1]
-  //     + 2 * A[5] * p[1][0] * p[1][1]
-  //     + A[4] * p[0][1] * p[1][0] 
-  //     + A[4] * p[0][0] * p[1][1];
-  //         -f11 / f3 = kmax
-  //         -f22 / f3 = kmin 
- 
-  FT f3 = A[1] * p[0][2] + A[2] * p[1][2] - p[2][2];
-  FT f11 =
-    2 * A[4] * p[0][0] * p[1][0]
-    + 2 * A[5] * p[1][0] * p[1][0]
-    + 2 * A[3] * p[0][0] * p[0][0];
-  FT f13 =
-    A[4] * p[0][0] * p[1][2]
-    + A[4] * p[0][2] * p[1][0]
-    + 2 * A[5] * p[1][0] * p[1][2]
-    + 2 * A[3] * p[0][0] * p[0][2];
-  FT f22 =
-    2 * A[4] * p[0][1] * p[1][1]
-    + 2 * A[5] * p[1][1] * p[1][1]
-    + 2 * A[3] * p[0][1] * p[0][1];
-  FT f23 =
-    A[4] * p[0][1] * p[1][2]
-    + 2 * A[5] * p[1][1] * p[1][2]
-    + A[4] * p[0][2] * p[1][1]
-    + 2 * A[3] * p[0][1] * p[0][2];
-  FT f33 =
-    2 * A[5] * p[1][2] * p[1][2]
-    + 2 * A[3] * p[0][2] * p[0][2]
-    + 2 * A[4] * p[0][2] * p[1][2];
-  FT f111 =
-    6 * A[8] * p[0][0] * p[1][0] * p[1][0]
-    + 6 * A[7] * p[0][0] * p[0][0] * p[1][0]
-    + 6 * A[6] * p[0][0] * p[0][0] * p[0][0]
-    + 6 * A[9] * p[1][0] * p[1][0] * p[1][0];
-  FT f222 =
-    6 * A[7] * p[0][1] * p[0][1] * p[1][1]
-    + 6 * A[8] * p[0][1] * p[1][1] * p[1][1]
-    + 6 * A[9] * p[1][1] * p[1][1] * p[1][1]
-    + 6 * A[6] * p[0][1] * p[0][1] * p[0][1];
-  FT f112 =
-    2 * A[7] * p[0][0] * p[0][0] * p[1][1]
-    + 6 * A[6] * p[0][0] * p[0][0] * p[0][1]
-    + 2 * A[8] * p[0][1] * p[1][0] * p[1][0]
-    + 4 * A[8] * p[0][0] * p[1][0] * p[1][1]
-    + 6 * A[9] * p[1][0] * p[1][0] * p[1][1]
-    + 4 * A[7] * p[0][0] * p[0][1] * p[1][0];
-  FT f122 =
-    4 * A[8] * p[0][1] * p[1][0] * p[1][1]
-    + 2 * A[8] * p[0][0] * p[1][1] * p[1][1]
-    + 6 * A[6] * p[0][0] * p[0][1] * p[0][1]
-    + 2 * A[7] * p[0][1] * p[0][1] * p[1][0]
-    + 4 * A[7] * p[0][0] * p[0][1] * p[1][1]
-    + 6 * A[9] * p[1][0] * p[1][1] * p[1][1];
-  FT f113 = 
-    6*A[6]*p[0][0]*p[0][0]*p[0][2]
-    +6*A[9]*p[1][0]*p[1][0]*p[1][2]
-    +2*A[7]*p[0][0]*p[0][0]*p[1][2]
-    +2*A[8]*p[0][2]*p[1][0]*p[1][0]
-    +4*A[7]*p[0][0]*p[0][2]*p[1][0]
-    +4*A[8]*p[0][0]*p[1][0]*p[1][2];
-  FT f223 = 
-    2*A[8]*p[0][2]*p[1][1]*p[1][1]
-    +6*A[6]*p[0][1]*p[0][1]*p[0][2]
-    +6*A[9]*p[1][1]*p[1][1]*p[1][2]
-    +2*A[7]*p[0][1]*p[0][1]*p[1][2]
-    +4*A[7]*p[0][1]*p[0][2]*p[1][1]
-    +4*A[8]*p[0][1]*p[1][1]*p[1][2];
-  FT f123 = 
-    2*A[8]*p[0][2]*p[1][0]*p[1][1]
-    +2*A[7]*p[0][0]*p[0][1]*p[1][2]
-    +2*A[7]*p[0][0]*p[0][2]*p[1][1]
-    +6*A[9]*p[1][0]*p[1][1]*p[1][2]
-    +2*A[7]*p[0][1]*p[0][2]*p[1][0]
-    +6*A[6]*p[0][0]*p[0][1]*p[0][2]
-    +2*A[8]*p[0][0]*p[1][1]*p[1][2]
-    +2*A[8]*p[0][1]*p[1][0]*p[1][2];
-
-  FT b0 = 1/(f3*f3)*(-f111*f3+3*f13*f11);
-  FT b1 = 1/(f3*f3)*(-f112*f3+f23*f11);
-  FT b2 = 1/(f3*f3)*(-f122*f3+f13*f22);
-  FT b3 = -1/(f3*f3)*(f222*f3-3*f23*f22);
-  
-  monge_form.coefficients()[2] = L2D_NTconverter()(b0);
-  monge_form.coefficients()[3] = L2D_NTconverter()(b1);
-  monge_form.coefficients()[4] = L2D_NTconverter()(b2);
-  monge_form.coefficients()[5] = L2D_NTconverter()(b3);
-
-  if ( dprime == 4 )
-    {
-      FT f1111 = 
-	24*A[13]*p[0][0]*p[1][0]*p[1][0]*p[1][0]
-	+24*A[12]*p[0][0]*p[0][0]*p[1][0]*p[1][0]
-	+24*A[11]*p[0][0]*p[0][0]*p[0][0]*p[1][0]
-	+24*A[14]*p[1][0]*p[1][0]*p[1][0]*p[1][0]
-	+24*A[10]*p[0][0]*p[0][0]*p[0][0]*p[0][0];
-      FT f1112 = 
-	6*A[13]*p[0][1]*p[1][0]*p[1][0]*p[1][0]
-	+18*A[13]*p[0][0]*p[1][0]*p[1][0]*p[1][1]
-	+24*A[10]*p[0][0]*p[0][0]*p[0][0]*p[0][1]
-	+12*A[12]*p[0][0]*p[0][1]*p[1][0]*p[1][0]
-	+18*A[11]*p[0][0]*p[0][0]*p[0][1]*p[1][0]
-	+24*A[14]*p[1][0]*p[1][0]*p[1][0]*p[1][1]
-	+6*A[11]*p[0][0]*p[0][0]*p[0][0]*p[1][1]
-	+12*A[12]*p[0][0]*p[0][0]*p[1][0]*p[1][1];
-      FT f1122 = 
-	12*A[11]*p[0][0]*p[0][0]*p[0][1]*p[1][1]
-	+12*A[13]*p[0][0]*p[1][0]*p[1][1]*p[1][1]
-	+12*A[13]*p[0][1]*p[1][0]*p[1][0]*p[1][1]
-	+16*A[12]*p[0][0]*p[0][1]*p[1][0]*p[1][1]
-	+12*A[11]*p[0][0]*p[0][1]*p[0][1]*p[1][0]
-	+24*A[10]*p[0][0]*p[0][0]*p[0][1]*p[0][1]
-	+4*A[12]*p[0][1]*p[0][1]*p[1][0]*p[1][0]
-	+4*A[12]*p[0][0]*p[0][0]*p[1][1]*p[1][1]
-	+24*A[14]*p[1][0]*p[1][0]*p[1][1]*p[1][1];
-      FT f1222 = 
-	6*A[13]*p[0][0]*p[1][1]*p[1][1]*p[1][1]
-	+24*A[10]*p[0][0]*p[0][1]*p[0][1]*p[0][1]
-	+24*A[14]*p[1][0]*p[1][1]*p[1][1]*p[1][1]
-	+6*A[11]*p[0][1]*p[0][1]*p[0][1]*p[1][0]
-	+18*A[11]*p[0][0]*p[0][1]*p[0][1]*p[1][1]
-	+12*A[12]*p[0][0]*p[0][1]*p[1][1]*p[1][1]
-	+12*A[12]*p[0][1]*p[0][1]*p[1][0]*p[1][1]
-	+18*A[13]*p[0][1]*p[1][0]*p[1][1]*p[1][1];
-      FT f2222 =
-	24*A[13]*p[0][1]*p[1][1]*p[1][1]*p[1][1]
-	+24*A[11]*p[0][1]*p[0][1]*p[0][1]*p[1][1]
-	+24*A[12]*p[0][1]*p[0][1]*p[1][1]*p[1][1]
-	+24*A[10]*p[0][1]*p[0][1]*p[0][1]*p[0][1]
-	+24*A[14]*p[1][1]*p[1][1]*p[1][1]*p[1][1];
-
-      FT c0 =
-	-1/(f3*f3*f3)*(f1111*(f3*f3)-4*f13*f3*f111+12*f13*f13*f11-6*f113*f3*f11+3*f33*f11*f11);
-      FT c1 =
-	1/(f3*f3*f3)*(f23*f3*f111+3*f3*f123*f11+3*f13*f3*f112-f1112*(f3*f3)-6*f13*f23*f11); 
-      FT c2 =
-	1/(f3*f3*f3)*(-f33*f22*f11+f113*f3*f22+2*f13*f3*f122-2*f13*f13*f22+f223*f3*f11+2*f23*f3*f112-2*f23*f23*f11-f1122*(f3*f3)); 
-      FT c3 =
-	1/(f3*f3*f3)*(-f1222*(f3*f3)-6*f13*f23*f22+3*f123*f3*f22+f13*f3*f222+3*f23*f3*f122); 
-      FT c4 =
-	-1/(f3*f3*f3)*(f2222*(f3*f3)+3*f33*f22*f22-6*f223*f3*f22-4*f23*f3*f222+12*f23*f23*f22) ; 
-      
-      monge_form.coefficients()[6] = L2D_NTconverter()(c0);
-      monge_form.coefficients()[7] = L2D_NTconverter()(c1);
-      monge_form.coefficients()[8] = L2D_NTconverter()(c2);
-      monge_form.coefficients()[9] = L2D_NTconverter()(c3);
-      monge_form.coefficients()[10] = L2D_NTconverter()(c4);
-    }
-}
-
-template < class DataKernel, class LocalKernel, class SvdTraits>  
-void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
-switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
-			    const Vector_3& v3) 
-{
-  typedef typename CGAL::Linear_algebraCd<FT>::Matrix Matrix;
-  Matrix M(3,3);
-  for (int i=0; i<3; i++) M(i,0) = v1[i];
-  for (int i=0; i<3; i++) M(i,1) = v2[i];
-  for (int i=0; i<3; i++) M(i,2) = v3[i];
-
-  CGAL::Sign orientation = CGAL::Linear_algebraCd<FT>::sign_of_determinant(M);
-  if (orientation == CGAL::NEGATIVE) v1 = -v1;
-}
-
-
-// template < class DataKernel, class LocalKernel, class SvdTraits>  
-// inline
-// std::ostream&
-// operator<<(std::ostream& out_stream, 
-// 	  const typename Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form& monge)
-// {
-//   monge.dump_verbose(out_stream);
-//   return out_stream;
-// }
-
-} //namespace CGAL
-
-#endif //CGAL_MONGE_VIA_JET_FITTING_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mpzf.h b/3rdparty/CGAL-4.6/include/CGAL/Mpzf.h
deleted file mode 100644
index dc5502d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Mpzf.h
+++ /dev/null
@@ -1,1127 +0,0 @@
-// Copyright (c) 2013
-// INRIA Saclay - Ile de France (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Author(s)	:  Marc Glisse
-
-#ifndef CGAL_MPZF_H
-#define CGAL_MPZF_H
-#include <cstdlib>
-#include <algorithm>
-#include <climits>
-#include <vector>
-#include <math.h>
-#include <cmath>
-#include <iostream>
-#include <stdexcept>
-#ifdef CGAL_USE_GMPXX
-# include <CGAL/gmpxx.h>
-#else
-# include <CGAL/gmp.h>
-#endif
-#include <CGAL/enum.h>
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Gmpz.h>
-#include <CGAL/Gmpq.h>
-//#include <CGAL/Gmpzf.h>
-
-#include <CGAL/Coercion_traits.h>
-
-// The following is currently assumed in several places. I hope I am not
-// making too many other assumptions.
-// * limbs are 64 bits
-// * if using gcc, sizeof(long long)==8
-// * mpn_neg(_n) exists
-// * IEEE double
-// * not too fancy endianness
-#if !defined(CGAL_DO_NOT_USE_MPZF) \
-    && __GNU_MP_VERSION * 10 + __GNU_MP_VERSION_MINOR >= 43 \
-    && GMP_NUMB_BITS == 64
-#define CGAL_HAS_MPZF 1
-
-// GMP-4.3.* has a different name for mpn_neg.
-#ifndef mpn_neg
-#define mpn_neg mpn_neg_n
-#endif
-// GMP before 5.0 doesn't provide mpn_copyi.
-#ifndef mpn_copyi
-#define mpn_copyi(dst, src, siz) std::copy((src), (src)+(siz), (dst))
-#endif
-
-#include <boost/cstdint.hpp>
-
-#ifdef _MSC_VER
-#include <intrin.h>
-#pragma intrinsic(_BitScanForward64)
-#pragma intrinsic(_BitScanReverse64)
-#endif
-
-#ifdef __xlC__
-#include <builtins.h>
-#endif
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4146 4244 4267 4800)
-     // warning on - applied on unsigned number
-     // conversion with loss of data
-     // conversion with loss of data
-     // int to bool performance
-#endif
-
-#if defined(__GNUC__) && defined(__GNUC_MINOR__) \
-    && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 \
-    && __cplusplus >= 201103L
-#define CGAL_CAN_USE_CXX11_THREAD_LOCAL
-#endif
-
-/*
-#ifdef CGAL_MPZF_NO_USE_CACHE
-# ifdef CGAL_MPZF_USE_CACHE
-#  undef CGAL_MPZF_USE_CACHE
-# endif
-#else
-# if !defined(CGAL_MPZF_USE_CACHE) \
-     && defined(CGAL_HAS_THREADS) \
-     && !defined(CGAL_I_PROMISE_I_WONT_USE_MANY_THREADS)
-#  define CGAL_MPZF_USE_CACHE 1
-# endif
-#endif
-*/
-#define CGAL_MPZF_USE_CACHE 1
-
-// On a dataset provided by Andreas, replacing Gmpq with this type in
-// Epick reduced the running time of the construction of a Delaunay
-// triangulation by a factor larger than 6
-
-#if !defined(CGAL_HAS_THREADS)
-#define CGAL_MPZF_THREAD_LOCAL
-#define CGAL_MPZF_TLS
-#elif defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
-#define CGAL_MPZF_THREAD_LOCAL thread_local
-#define CGAL_MPZF_TLS thread_local
-#elif defined(_MSC_VER)
-#define CGAL_MPZF_THREAD_LOCAL __declspec(thread)
-#define CGAL_MPZF_TLS
-#else
-#define CGAL_MPZF_THREAD_LOCAL __thread
-#define CGAL_MPZF_TLS
-// Too bad for the others
-#endif
-namespace CGAL {
-namespace Mpzf_impl {
-// Warning: these pools aren't generic at all!
-
-// Not thread-safe
-template <class T, class = void> struct pool1 {
-  static T pop() { T ret = data.back(); data.pop_back(); return ret; }
-  static void push(T t) { data.push_back(t); }
-  static bool empty() { return data.empty(); }
-  static const int extra = 0;
-  private:
-  // thread_local would be fine, but not __declspec(thread) and for most
-  // compilers not __thread, since data is not POD.
-  static std::vector<T> data;
-};
-template <class T, class D> std::vector<T> pool1<T,D>::data;
-
-// Use an intrusive single-linked list instead (allocate one more limb and use
-// it to store the pointer to next), the difference isn't that noticable (still
-// the list wins).  Neither is thread-safe (both can be with threadlocal, and
-// the list can be with an atomic compare-exchange (never tried)).  With gcc,
-// TLS has a large effect on classes with constructor/destructor, but is free
-// for a simple pointer.  The slowdown is because of PR55812.
-
-// Leaks at thread destruction
-template <class T, class = void> struct pool2 {
-  static T pop() { T ret = data(); data() = ptr(data()); return ret; }
-  static void push(T t) { ptr(t) = data(); data() = t; }
-  static bool empty() { return data() == 0; }
-  static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t
-  private:
-  BOOST_STATIC_ASSERT(sizeof(T) >= sizeof(T*));
-  static T& data () {
-    static CGAL_MPZF_TLS T data_ = 0;
-    return data_;
-  }
-  static T& ptr(T t) { t -= extra+1; return *reinterpret_cast<T*>(t); }
-};
-
-#if defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
-template <class T, class = void> struct pool3 {
-  static T pop() { T ret = data(); data() = ptr(data()); return ret; }
-  static void push(T t) { ptr(t) = data(); data() = t; }
-  static bool empty() { return data() == 0; }
-  static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t
-  private:
-  BOOST_STATIC_ASSERT(sizeof(T) >= sizeof(T*));
-  struct cleaner {
-    T data_ = 0;
-    ~cleaner(){
-      // Deallocate everything. As an alternative, we could store it in a
-      // global location, for re-use by a later thread.
-      while (!empty())
-	delete[] (pop() - (extra + 1));
-    }
-  };
-  static T& data () {
-    static thread_local cleaner obj;
-    return obj.data_;
-  }
-  static T& ptr(T t) { t -= extra+1; return *reinterpret_cast<T*>(t); }
-};
-#endif
-
-// No caching
-template <class T, class = void> struct no_pool {
-  static T pop() { throw "Shouldn't be here!"; }
-  static void push(T t) { delete [] (t - (extra+1)); }
-  static bool empty() { return true; }
-  static const int extra = 0;
-};
-
-// Only used with an argument known not to be 0.
-inline int ctz (boost::uint64_t x) {
-#if defined(_MSC_VER)
-  unsigned long ret;
-  _BitScanForward64(&ret, x);
-  return (int)ret;
-#elif defined(__xlC__)
-  return __cnttz8 (x);
-#else
-  // Assume long long is 64 bits
-  return __builtin_ctzll (x);
-#endif
-}
-inline int clz (boost::uint64_t x) {
-#if defined(_MSC_VER)
-  unsigned long ret;
-  _BitScanReverse64(&ret, x);
-  return 63 - (int)ret;
-#elif defined(__xlC__)
-  // Macro supposedly not defined on z/OS.
-  return __cntlz8 (x);
-#else
-  return __builtin_clzll (x);
-#endif
-}
-
-// In C++11, std::fill_n returns a pointer to the end, but in C++03,
-// it returns void.
-inline mp_limb_t* fill_n_ptr(mp_limb_t* p, int n, int c) {
-#if __cplusplus >= 201103L
-  return std::fill_n (p, n, c);
-#else
-  mp_limb_t* q = p + n;
-  std::fill (p, q, c);
-  //std::fill_n (p, n, c);
-  //memset (p, sizeof(mp_limb_t)*n, c);
-  return q;
-#endif
-}
-} // namespace Mpzf_impl
-
-#undef CGAL_MPZF_THREAD_LOCAL
-#undef CGAL_MPZF_TLS
-
-// TODO:
-// * make data==0 a valid state for number 0. Incompatible with the cache. I
-//   tried, and it doesn't seem to help (may even hurt a bit).
-struct Mpzf {
-  private:
-#ifdef CGAL_MPZF_USE_CACHE
-  // More experiments to determine the best value would be good. It likely
-  // depends on the usage. Note that pool2 is fast enough that a conditional
-  // cache slows it down. A purely static cache (crash if it isn't large
-  // enough) still wins by about 11% on the Delaunay_3 construction, but is
-  // more complicated to handle.
-  // Evaluating a polynomial in double will never require more than roughly
-  // (2100*degree) bits, or (33*degree) mp_limb_t, which is very small. I
-  // checked by including an array of 150 limbs in every Mpzf (that's where
-  // the 11% number comes from).
-  // BONUS: doing that is thread-safe!
-  static const unsigned int cache_size = 8;
-#endif
-//#if !defined(CGAL_HAS_THREADS) || defined(CGAL_I_PROMISE_I_WONT_USE_MANY_THREADS)
-//  typedef Mpzf_impl::pool2<mp_limb_t*,Mpzf> pool;
-//#elif defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
-//  typedef Mpzf_impl::pool3<mp_limb_t*,Mpzf> pool;
-//#else
-  typedef Mpzf_impl::no_pool<mp_limb_t*,Mpzf> pool;
-//#endif
-
-  mp_limb_t* data_; /* data_[0] is never 0 (except possibly for 0). */
-  inline mp_limb_t*& data() { return data_; };
-  inline mp_limb_t const* data() const { return data_; };
-
-#ifdef CGAL_MPZF_USE_CACHE
-  mp_limb_t cache[cache_size + 1];
-#endif
-  int size; /* Number of relevant limbs in data_. */
-  int exp; /* The number is data_ (an integer) * 2 ^ (64 * exp). */
-
-  struct allocate{};
-  struct noalloc{};
-
-  void init(unsigned mini=2){
-#ifdef CGAL_MPZF_USE_CACHE
-    if (mini <= cache_size) {
-      cache[0] = cache_size;
-      data() = cache + 1;
-      return;
-    }
-#endif
-    if(!pool::empty()){
-      data() = pool::pop();
-      if(data()[-1] >= mini) return; // TODO: when mini==2, no need to check
-      delete[] (data() - (pool::extra+1)); // too small, useless
-    }
-    if(mini<2) mini=2;
-    data() = (new mp_limb_t[mini+(pool::extra+1)]) + (pool::extra+1);
-    data()[-1] = mini;
-  }
-  void clear(){
-    while(*--data()==0); // in case we skipped final zeroes
-#ifdef CGAL_MPZF_USE_CACHE
-    if (data() == cache) return;
-#endif
-    ++data();
-    pool::push(data());
-  }
-
-  Mpzf(noalloc){}
-  Mpzf(allocate,int i) { init(i); }
-
-  public:
-
-  static void clear_pool () {
-    while (!pool::empty())
-      delete[] (pool::pop() - (pool::extra + 1));
-  }
-
-  ~Mpzf(){
-    clear();
-  }
-  Mpzf(): size(0), exp(0) {
-    init();
-  }
-  Mpzf& operator=(Mpzf const& x){
-    unsigned asize=std::abs(x.size);
-    if(asize==0) { exp=0; size=0; return *this; }
-    if(this==&x) return *this;
-    while(*--data()==0); // factor that code somewhere?
-    if(*data()<asize){
-#ifdef CGAL_MPZF_USE_CACHE
-      if (data() != cache)
-#endif
-	delete[] (data() - pool::extra);
-      init(asize);
-    } else ++data();
-    size=x.size;
-    exp=x.exp;
-    mpn_copyi(data(),x.data(),asize);
-    return *this;
-  }
-  Mpzf(Mpzf const& x){
-    int asize=std::abs(x.size);
-    init(asize);
-    size=x.size;
-    exp=x.exp;
-    if(size!=0) mpn_copyi(data(),x.data(),asize);
-  }
-#if !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) \
-    && !defined(CGAL_MPZF_USE_CACHE)
-  Mpzf(Mpzf&& x):data_(x.data()),size(x.size),exp(x.exp){
-    x.init(); // yes, that's a shame...
-    x.size = 0;
-    x.exp = 0;
-  }
-  Mpzf& operator=(Mpzf&& x){
-    std::swap(size,x.size);
-    exp = x.exp;
-    std::swap(data(),x.data());
-    return *this;
-  }
-  friend Mpzf operator-(Mpzf&& x){
-    Mpzf ret = std::move(x);
-    ret.size = -ret.size;
-    return ret;
-  }
-#endif
-  Mpzf(int i) : exp(0) {
-    // assume that int is smaller than mp_limb_t
-    init();
-    if      (i == 0)    { size = 0; }
-    else if (i >  0)    { size = 1; data()[0] = i; }
-    else /* (i <  0) */ { size =-1; data()[0] = -(mp_limb_t)i; }
-    // cast to mp_limb_t because -INT_MIN is undefined
-  }
-  Mpzf(unsigned int i) : exp(0) {
-    // assume that int is smaller than mp_limb_t
-    init();
-    if      (i == 0)    { size = 0; }
-    else /* (i >  0) */ { size = 1; data()[0] = i; }
-  }
-  Mpzf(long i) : exp(0) {
-    // assume that long is smaller than mp_limb_t
-    init();
-    if      (i == 0)    { size = 0; }
-    else if (i >  0)    { size = 1; data()[0] = i; }
-    else /* (i <  0) */ { size =-1; data()[0] = -(mp_limb_t)i; }
-    // cast to mp_limb_t because -LONG_MIN is undefined
-  }
-  Mpzf(unsigned long i) : exp(0) {
-    // assume that long is smaller than mp_limb_t
-    init();
-    if      (i == 0)    { size = 0; }
-    else /* (i >  0) */ { size = 1; data()[0] = i; }
-  }
-  Mpzf(double d){
-    init();
-    using boost::uint64_t;
-    union {
-#ifdef CGAL_LITTLE_ENDIAN
-      struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s;
-#else /* CGAL_BIG_ENDIAN */
-      //WARNING: untested!
-      struct { uint64_t sig:1; uint64_t exp:11; uint64_t man:52; } s;
-#endif
-      double d;
-    } u;
-    u.d = d;
-    uint64_t m;
-    uint64_t dexp = u.s.exp;
-    CGAL_assertion_msg(dexp != 2047, "Creating an Mpzf from infinity or NaN.");
-    if (dexp == 0) {
-      if (d == 0) { size=0; exp=0; return; }
-      else { // denormal number
-	m = u.s.man;
-	++dexp;
-      }
-    } else {
-      m = (1LL<<52) | u.s.man;
-    }
-    int e1 = (int)dexp+13;
-    // FIXME: make it more general! But not slower...
-    BOOST_STATIC_ASSERT(GMP_NUMB_BITS == 64);
-    int e2 = e1 % 64;
-    exp = e1 / 64 - 17;
-    // 52+1023+13==17*64 ?
-#if 0
-    // This seems very slightly faster
-    if(Mpzf_impl::ctz(m)+e2>=64){
-      data()[0] = m >> (64-e2);
-      size = 1;
-      ++exp;
-    }else{
-      data()[0] = m << e2;
-      if(e2>11){ // Wrong test for denormals
-	data()[1] = m >> (64-e2);
-	size = 2;
-      } else {
-	size = 1;
-      }
-    }
-#else
-    mp_limb_t d0 = (m << e2) & GMP_NUMB_MASK;
-    mp_limb_t d1 = 0;
-    if (e2 != 0) // shifting by 64 is UB
-      d1 = m >> (GMP_NUMB_BITS - e2);
-    if (d0 == 0) {
-      data()[0] = d1;
-      size = 1;
-      ++exp;
-    }
-    else {
-      data()[0] = d0;
-      if (d1 == 0) {
-	size = 1;
-      }
-      else {
-	data()[1] = d1;
-	size = 2;
-      }
-    }
-#endif
-    if(u.s.sig) size=-size;
-    //assert(to_double()==IA_force_to_double(d));
-  }
-
-#ifdef CGAL_USE_GMPXX
-  Mpzf(mpz_class const&z){
-    init_from_mpz_t(z.get_mpz_t());
-  }
-#endif
-  Mpzf(Gmpz const&z){
-    init_from_mpz_t(z.mpz());
-  }
-  void init_from_mpz_t(mpz_t const z){
-    exp=mpz_scan1(z,0)/GMP_NUMB_BITS;
-    size=mpz_size(z)-exp;
-    init(size);
-    mpn_copyi(data(),z->_mp_d+exp,size);
-  }
-
-#if 0
-  // For debug purposes only
-  void print()const{
-    //std::cout << "size: " << size << std::endl;
-    if(size==0) { std::cout << "zero\n"; return; }
-    if(size<0) std::cout << "- ";
-    int asize = std::abs(size);
-    std::cout << std::hex;
-    while(--asize>=0) { std::cout << data()[asize] << ' '; }
-    std::cout << std::dec << "exp " << exp << ' ';
-    std::cout << std::dec << "size " << size << ' ';
-    asize = std::abs(size);
-    std::cout << "double: " << std::ldexp((double)data()[asize-1],64*(exp+asize-1))*((size<0)?-1:1) << '\n';
-  }
-#endif
-
-  friend int Mpzf_abscmp(Mpzf const&a, Mpzf const&b){
-    int asize=std::abs(a.size);
-    int bsize=std::abs(b.size);
-    // size==0 should mean exp==-infinity, like with double.
-    // Since it doesn't, test for it explicitly.
-    if (bsize == 0) return asize;
-    if (asize == 0) return -1;
-    int ah=asize+a.exp;
-    int bh=bsize+b.exp;
-    if(ah!=bh) return ah-bh;
-    int minsize=(std::min)(asize,bsize);
-    const mp_limb_t* adata=a.data()+(asize-1);
-    const mp_limb_t* bdata=b.data()+(bsize-1);
-    for(int i=0;i<minsize;++i,--adata,--bdata){
-      const mp_limb_t aa=*adata;
-      const mp_limb_t bb=*bdata;
-      if(aa!=bb) return (aa<bb)?-1:1;
-    }
-    return asize-bsize; // this assumes that we get rid of trailing zeros...
-  }
-  friend int Mpzf_cmp (Mpzf const&a, Mpzf const&b){
-    if ((a.size ^ b.size) < 0) return (a.size < 0) ? -1 : 1;
-    int res = Mpzf_abscmp(a, b);
-    return (a.size < 0) ? -res : res;
-  }
-  friend bool operator<(Mpzf const&a, Mpzf const&b){
-    if((a.size ^ b.size) < 0) return a.size < 0;
-    return ((a.size < 0) ? Mpzf_abscmp(b, a) : Mpzf_abscmp(a, b)) < 0;
-  }
-  friend bool operator>(Mpzf const&a, Mpzf const&b){
-    return b<a;
-  }
-  friend bool operator>=(Mpzf const&a, Mpzf const&b){
-    return !(a<b);
-  }
-  friend bool operator<=(Mpzf const&a, Mpzf const&b){
-    return !(a>b);
-  }
-  friend bool operator==(Mpzf const&a, Mpzf const&b){
-    if (a.exp != b.exp || a.size != b.size) return false;
-    if (a.size == 0) return true;
-    return mpn_cmp(a.data(), b.data(), std::abs(a.size)) == 0;
-  }
-  friend bool operator!=(Mpzf const&a, Mpzf const&b){
-    return !(a==b);
-  }
-  private:
-  static Mpzf aors(Mpzf const&a, Mpzf const&b, int bsize){
-    Mpzf res=noalloc();
-    if(bsize==0){
-      int size=std::abs(a.size);
-      res.init(size);
-      res.exp=a.exp;
-      res.size=a.size;
-      if(size!=0) mpn_copyi(res.data(),a.data(),size);
-      return res;
-    }
-    int asize=a.size;
-    if(asize==0){
-      int size=std::abs(bsize);
-      res.init(size);
-      res.exp=b.exp;
-      res.size=bsize;
-      mpn_copyi(res.data(),b.data(),size);
-      return res;
-    }
-    if((asize^bsize)>=0){
-      // Addition
-      int absasize=std::abs(asize);
-      int absbsize=std::abs(bsize);
-      const mp_limb_t* adata=a.data();
-      const mp_limb_t* bdata=b.data();
-      int aexp=a.exp;
-      int bexp=b.exp;
-      if(aexp<bexp){ res.exp=a.exp; aexp=0; bexp=b.exp-a.exp; }
-      else { res.exp=b.exp; aexp=a.exp-b.exp; bexp=0; }
-      res.init((std::max)(absasize+aexp,absbsize+bexp)+1);
-      mp_limb_t* rdata=res.data();
-      res.size=0;
-      // TODO: if aexp>0, swap a and b so we don't repeat the code.
-      if(0<bexp){
-	if(absasize<=bexp){ // no overlap
-	  mpn_copyi(rdata, adata, absasize);
-	  rdata+=absasize;
-	  rdata=Mpzf_impl::fill_n_ptr(rdata,bexp-absasize,0);
-	  mpn_copyi(rdata, bdata, absbsize);
-	  res.size=absbsize+bexp;
-	  if(bsize<0) res.size=-res.size;
-	  return res;
-	} else {
-	  mpn_copyi(rdata, adata, bexp);
-	  adata+=bexp;
-	  absasize-=bexp;
-	  rdata+=bexp;
-	  res.size=bexp;
-	}
-      }
-      else if(0<aexp){
-	if(absbsize<=aexp){ // no overlap
-	  mpn_copyi(rdata, bdata, absbsize);
-	  rdata+=absbsize;
-	  rdata=Mpzf_impl::fill_n_ptr(rdata,aexp-absbsize,0);
-	  mpn_copyi(rdata, adata, absasize);
-	  res.size=absasize+aexp;
-	  if(asize<0) res.size=-res.size;
-	  return res;
-	} else {
-	  mpn_copyi(rdata, bdata, aexp);
-	  bdata+=aexp;
-	  absbsize-=aexp;
-	  rdata+=aexp;
-	  res.size=aexp;
-	}
-      }
-      if(absasize>=absbsize){
-	mp_limb_t carry=mpn_add(rdata,adata,absasize,bdata,absbsize);
-	res.size+=absasize;
-	if(carry!=0){
-	  res.size++;
-	  rdata[absasize]=carry;
-	}
-      } else {
-	mp_limb_t carry=mpn_add(rdata,bdata,absbsize,adata,absasize);
-	res.size+=absbsize;
-	if(carry!=0){
-	  res.size++;
-	  rdata[absbsize]=carry;
-	}
-      }
-      // unnecessary if a.exp != b.exp
-      while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
-      if(bsize<0) res.size=-res.size;
-    } else {
-      // Subtraction
-      const Mpzf *x, *y;
-      int xsize=a.size;
-      int ysize=bsize;
-      int cmp=Mpzf_abscmp(a,b);
-      if(cmp==0){ res.init(); res.size=0; res.exp=0; return res; }
-      if(cmp<0) { x=&b; y=&a; std::swap(xsize, ysize); }
-      else { x=&a; y=&b; }
-      int absxsize=std::abs(xsize);
-      int absysize=std::abs(ysize);
-      const mp_limb_t* xdata=x->data();
-      const mp_limb_t* ydata=y->data();
-      int xexp=x->exp;
-      int yexp=y->exp;
-      if(xexp<yexp){ res.exp=xexp; yexp-=xexp; xexp=0; }
-      else { res.exp=yexp; xexp-=yexp; yexp=0; }
-      res.init((std::max)(absxsize+xexp,absysize+yexp)+1);
-      mp_limb_t* rdata=res.data();
-      res.size=0;
-      bool carry1=false;
-      if(0<yexp){ // must have overlap since x is larger
-	mpn_copyi(rdata, xdata, yexp);
-	xdata+=yexp;
-	absxsize-=yexp;
-	rdata+=yexp;
-	res.size=yexp;
-      }
-      else if(0<xexp){
-	if(absysize<=xexp){ // no overlap
-	  mpn_neg(rdata, ydata, absysize); // assert that it returns 1
-	  rdata+=absysize;
-	  rdata=Mpzf_impl::fill_n_ptr(rdata,xexp-absysize,-1);
-	  mpn_sub_1(rdata, xdata, absxsize, 1);
-	  res.size=absxsize+xexp;
-	  if(res.data()[res.size-1]==0) --res.size;
-	  if(xsize<0) res.size=-res.size;
-	  return res;
-	} else {
-	  mpn_neg(rdata, ydata, xexp); // assert that it returns 1
-	  ydata+=xexp;
-	  absysize-=xexp;
-	  rdata+=xexp;
-	  res.size=xexp;
-	  carry1=true; // assumes no trailing zeros
-	}
-      }
-      CGAL_assertion_code( mp_limb_t carry= )
-	mpn_sub(rdata, xdata, absxsize, ydata, absysize);
-      if(carry1)
-	CGAL_assertion_code( carry+= )
-	  mpn_sub_1(rdata, rdata, absxsize, 1);
-      CGAL_assertion(carry==0);
-      res.size+=absxsize;
-      while(/*res.size>0&&*/res.data()[res.size-1]==0) --res.size;
-      while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
-      if(xsize<0) res.size=-res.size;
-    }
-    return res;
-  }
-
-  public:
-  friend Mpzf operator+(Mpzf const&a, Mpzf const&b){
-    return aors(a,b,b.size);
-  }
-
-  friend Mpzf operator-(Mpzf const&a, Mpzf const&b){
-    return aors(a,b,-b.size);
-  }
-
-  friend Mpzf operator*(Mpzf const&a, Mpzf const&b){
-    int asize=std::abs(a.size);
-    int bsize=std::abs(b.size);
-    int siz=asize+bsize;
-    Mpzf res(allocate(),siz);
-    if(asize==0||bsize==0){res.exp=0;res.size=0;return res;}
-    res.exp=a.exp+b.exp;
-    mp_limb_t high;
-    if(asize>=bsize)
-      high = mpn_mul(res.data(),a.data(),asize,b.data(),bsize);
-    else
-      high = mpn_mul(res.data(),b.data(),bsize,a.data(),asize);
-    if(high==0) --siz;
-    if(res.data()[0]==0) { ++res.data(); ++res.exp; --siz; }
-    res.size=((a.size^b.size)>=0)?siz:-siz;
-    return res;
-  }
-
-  friend Mpzf Mpzf_square(Mpzf const&a){
-    int asize=std::abs(a.size);
-    int siz=2*asize;
-    Mpzf res(allocate(),siz);
-    res.exp=2*a.exp;
-    if(asize==0){res.size=0;return res;}
-    mpn_sqr(res.data(),a.data(),asize);
-    mp_limb_t high = res.data()[siz-1];
-    if(high==0) --siz;
-    if(res.data()[0]==0) { ++res.data(); ++res.exp; --siz; }
-    res.size=siz;
-    return res;
-  }
-
-  friend Mpzf operator/(Mpzf const&a, Mpzf const&b){
-    // FIXME: Untested
-    int asize=std::abs(a.size);
-    int bsize=std::abs(b.size);
-    int siz=asize+2-bsize;
-    Mpzf res(allocate(),asize+2);
-    if(bsize==0){throw std::range_error("Division by zero");}
-    if(asize==0){res.exp=0;res.size=0;return res;}
-    res.size=siz;
-    res.exp=a.exp-b.exp;
-    const mp_limb_t *adata = a.data();
-    const mp_limb_t *bdata = b.data();
-    mp_limb_t *qp = res.data();
-    mp_limb_t *rp = qp + siz;
-    if(Mpzf_impl::ctz(adata[0]) >= Mpzf_impl::ctz(bdata[0])){ // Easy case
-      --res.size;
-      mpn_tdiv_qr(qp, rp, 0, adata, asize, bdata, bsize);
-      CGAL_assertion_code(
-	  for (int i=0; i<bsize; ++i)
-	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
-      )
-    }
-    else if(adata[-1]==0){ // We are lucky
-      --adata; ++asize; --res.exp;
-      mpn_tdiv_qr(qp, rp, 0, adata, asize, bdata, bsize);
-      CGAL_assertion_code(
-	  for (int i=0; i<bsize; ++i)
-	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
-      )
-    }
-    else{
-      --res.exp;
-      Mpzf a2(allocate(),asize+1);
-      a2.data()[0]=0;
-      mpn_copyi(a2.data()+1,a.data(),asize);
-      // No need to complete a2, we just want the buffer.
-      //a2.size=(a.size<0)?(a.size-1):(a.size+1);
-      //a2.exp = a.exp-1;
-      mpn_tdiv_qr(qp, rp, 0, a2.data(), asize+1, bdata, bsize);
-      CGAL_assertion_code(
-	  for (int i=0; i<bsize; ++i)
-	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
-      )
-    }
-    while(/*res.size>0&&*/res.data()[res.size-1]==0) --res.size;
-    //while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
-    if((a.size^b.size)<0) res.size=-res.size;
-    return res;
-  }
-
-  friend Mpzf Mpzf_gcd(Mpzf const&a, Mpzf const&b){
-    // FIXME: Untested
-    if (a.size == 0) return b;
-    if (b.size == 0) return a;
-    int asize=std::abs(a.size);
-    int bsize=std::abs(b.size);
-    int atz=Mpzf_impl::ctz(a.data()[0]);
-    int btz=Mpzf_impl::ctz(b.data()[0]);
-    int rtz=(std::min)(atz,btz);
-    Mpzf tmp(allocate(), asize);
-    Mpzf res(allocate(), bsize);
-    if (atz != 0) {
-      mpn_rshift(tmp.data(), a.data(), asize, atz);
-      if(tmp.data()[asize-1]==0) --asize;
-    }
-    else { mpn_copyi(tmp.data(), a.data(), asize); }
-    if (btz != 0) {
-      mpn_rshift(res.data(), b.data(), bsize, btz);
-      if(res.data()[bsize-1]==0) --bsize;
-    }
-    else { mpn_copyi(res.data(), b.data(), bsize); }
-    res.exp = 0; // Pick b.exp? or the average? 0 helps return 1 more often.
-    if (asize < bsize)
-      res.size = mpn_gcd(res.data(), res.data(), bsize, tmp.data(), asize);
-    else
-      res.size = mpn_gcd(res.data(), tmp.data(), asize, res.data(), bsize);
-    if(rtz!=0) {
-      mp_limb_t c = mpn_lshift(res.data(), res.data(), res.size, rtz);
-      if(c) { res.data()[res.size]=c; ++res.size; }
-    }
-    return res;
-  }
-
-  friend bool Mpzf_is_square(Mpzf const&x){
-    if (x.size < 0) return false;
-    if (x.size == 0) return true;
-    // Assume that GMP_NUMB_BITS is even.
-    return mpn_perfect_square_p (x.data(), x.size);
-  }
-
-  friend Mpzf Mpzf_sqrt(Mpzf const&x){
-    // FIXME: Untested
-    if (x.size < 0) throw std::range_error("Sqrt of negative number");
-    if (x.size == 0) return 0;
-    if (x.exp % 2 == 0) {
-      Mpzf res(allocate(), (x.size + 1) / 2);
-      res.exp = x.exp / 2;
-      res.size = (x.size + 1) / 2;
-      CGAL_assertion_code(mp_size_t rem=)
-      mpn_sqrtrem(res.data(), 0, x.data(), x.size);
-      CGAL_assertion(rem==0);
-      return res;
-    }
-    else if (x.data()[-1] == 0) {
-      Mpzf res(allocate(), (x.size + 2) / 2);
-      res.exp = (x.exp - 1) / 2;
-      res.size = (x.size + 2) / 2;
-      CGAL_assertion_code(mp_size_t rem=)
-      mpn_sqrtrem(res.data(), 0, x.data()-1, x.size+1);
-      CGAL_assertion(rem==0);
-      return res;
-    }
-    else {
-      Mpzf res(allocate(), (x.size + 2) / 2);
-      res.exp = (x.exp - 1) / 2;
-      res.size = (x.size + 2) / 2;
-      CGAL_assertion_code(mp_size_t rem=)
-      mpn_sqrtrem(res.data(), 0, x.data(), x.size);
-      CGAL_assertion(rem==0);
-      mpn_lshift(res.data(), res.data(), res.size, GMP_NUMB_BITS / 2);
-      return res;
-    }
-  }
-
-  friend Mpzf operator-(Mpzf const&x){
-    Mpzf ret = x;
-    ret.size = -ret.size;
-    return ret;
-  }
-  Mpzf& operator+=(Mpzf const&x){ *this=*this+x; return *this; }
-  Mpzf& operator-=(Mpzf const&x){ *this=*this-x; return *this; }
-  Mpzf& operator*=(Mpzf const&x){ *this=*this*x; return *this; }
-
-  bool is_canonical () const {
-    if (size == 0) return true;
-    if (data()[0] == 0) return false;
-    if (data()[std::abs(size)-1] == 0) return false;
-    return true;
-  }
-
-  bool is_zero () const {
-    return size==0;
-  }
-
-  bool is_one () const {
-    return exp==0 && size==1 && data()[0]==1;
-  }
-
-  CGAL::Sign sign () const { return CGAL::sign(size); }
-
-  double to_double () const {
-    // Assumes GMP_NUMB_BITS == 64
-    using std::ldexp;
-    if(size==0) return 0;
-    int asize = std::abs(size);
-    mp_limb_t top = data()[asize-1];
-    double dtop = top;
-    if(top >= (1LL<<53) || asize == 1) /* ok */ ;
-    else { dtop += (double)data()[asize-2] * ldexp(1.,-GMP_NUMB_BITS); }
-    return ldexp( (size<0) ? -dtop : dtop, (asize-1+exp) * GMP_NUMB_BITS);
-  }
-
-  std::pair<double, double> to_interval () const {
-    // Assumes GMP_NUMB_BITS == 64
-    if (size == 0) return std::make_pair(0., 0.);
-    double dl, dh;
-    int asize = std::abs(size);
-    int e = 64 * (asize - 1 + exp);
-    mp_limb_t x = data()[asize-1];
-    int lz = Mpzf_impl::clz(x);
-    if (lz <= 11) {
-      if (lz != 11) {
-	e += (11 - lz);
-	x >>= (11 - lz);
-      }
-      dl = x;
-      dh = x + 1;
-      // Check for the few cases where dh=x works (asize==1 and the evicted
-      // bits from x were 0s)
-    }
-    else if (asize == 1) {
-      dl = dh = x; // conversion is exact
-    }
-    else {
-      mp_limb_t y = data()[asize-2];
-      e -= (lz - 11);
-      x <<= (lz - 11);
-      y >>= (75 - lz);
-      x |= y;
-      dl = x;
-      dh = x + 1;
-      // Check for the few cases where dh=x works (asize==2 and the evicted
-      // bits from y were 0s)
-    }
-    typedef Interval_nt<> IA;
-    IA res (dl, dh);
-    res = ldexp (res, e);
-    if (size < 0) res = -res;
-    return CGAL::to_interval(res);
-    // Use ldexp(Interval_nt,int) to delegate the hard thinking
-    // about over/underflow.
-  }
-
-#ifdef CGAL_USE_GMPXX
-#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
-  explicit
-#endif
-  operator mpq_class () const {
-    mpq_class q;
-    export_to_mpq_t(q.get_mpq_t());
-    return q;
-  }
-#endif
-
-#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
-  explicit
-#endif
-  operator Gmpq () const {
-    Gmpq q;
-    export_to_mpq_t(q.mpq());
-    return q;
-  }
-  void export_to_mpq_t(mpq_t q) const {
-    /* q must be 0/1 before this call */
-    CGAL_precondition(mpq_cmp_ui(q,0,1)==0);
-    if (size != 0) {
-      mpz_import (mpq_numref (q),
-		  std::abs(size),
-		  -1, // data()[0] is the least significant part
-		  sizeof(mp_limb_t),
-		  0, // native endianness inside mp_limb_t
-		  GMP_NAIL_BITS, // should be 0
-		  data());
-      if (exp > 0)
-	mpq_mul_2exp(q, q, (sizeof(mp_limb_t) * CHAR_BIT *  exp));
-      else if (exp < 0)
-	mpq_div_2exp(q, q, (sizeof(mp_limb_t) * CHAR_BIT * -exp));
-
-      if (size < 0)
-	mpq_neg(q,q);
-    }
-  }
-#if 0
-#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
-  explicit
-#endif
-// This makes Mpzf==int ambiguous
-  operator Gmpzf () const {
-    mpz_t z;
-    z->_mp_d=const_cast<mp_limb_t*>(data());
-    z->_mp_size=size;
-    Gmpzf m(z);
-// Only works for a very limited range of exponents
-    Gmpzf e(std::ldexp(1.,GMP_NUMB_BITS*exp));
-    return m*e;
-  }
-#endif
-
-  friend void simplify_quotient(Mpzf& a, Mpzf& b){
-    // Avoid quotient(2^huge_a/2^huge_b)
-    a.exp -= b.exp;
-    b.exp = 0;
-    // Simplify with gcd?
-  }
-};
-
-// Copied from Gmpzf, not sure that's the best thing to do.
-inline
-std::ostream& operator<< (std::ostream& os, const Mpzf& a)
-{
-    return os << a.to_double();
-}
-
-inline
-std::istream& operator>> (std::istream& is, Mpzf& a)
-{
-  double d;
-  is >> d;
-  if (is)
-    a = d;
-  return is;
-}
-
-
-  template <> struct Algebraic_structure_traits< Mpzf >
-    : public Algebraic_structure_traits_base< Mpzf, Integral_domain_without_division_tag >  {
-      typedef Tag_true            Is_exact;
-      typedef Tag_false            Is_numerical_sensitive;
-
-      struct Is_zero
-	: public std::unary_function< Type, bool > {
-	  bool operator()( const Type& x ) const {
-	    return x.is_zero();
-	  }
-	};
-
-      struct Is_one
-	: public std::unary_function< Type, bool > {
-	  bool operator()( const Type& x ) const {
-	    return x.is_one();
-	  }
-	};
-
-      struct Gcd
-	: public std::binary_function< Type, Type, Type > {
-	  Type operator()(
-	      const Type& x,
-	      const Type& y ) const {
-	    return Mpzf_gcd(x, y);
-	  }
-	};
-
-      struct Square
-	: public std::unary_function< Type, Type > {
-	  Type operator()( const Type& x ) const {
-	    return Mpzf_square(x);
-	  }
-	};
-
-      struct Integral_division
-	: public std::binary_function< Type, Type, Type > {
-	  Type operator()(
-	      const Type& x,
-	      const Type& y ) const {
-	    return x / y;
-	  }
-	};
-
-      struct Sqrt
-	: public std::unary_function< Type, Type > {
-	  Type operator()( const Type& x) const {
-	    return Mpzf_sqrt(x);
-	  }
-	};
-
-      struct Is_square
-	: public std::binary_function< Type, Type&, bool > {
-	  bool operator()( const Type& x, Type& y ) const {
-	    // TODO: avoid doing 2 calls.
-	    if (!Mpzf_is_square(x)) return false;
-	    y = Mpzf_sqrt(x);
-	    return true;
-	  }
-	  bool operator()( const Type& x) const {
-	    return Mpzf_is_square(x);
-	  }
-	};
-
-    };
-  template <> struct Real_embeddable_traits< Mpzf >
-    : public INTERN_RET::Real_embeddable_traits_base< Mpzf , CGAL::Tag_true > {
-      struct Sgn
-	: public std::unary_function< Type, ::CGAL::Sign > {
-	  ::CGAL::Sign operator()( const Type& x ) const {
-	    return x.sign();
-	  }
-	};
-
-      struct To_double
-	: public std::unary_function< Type, double > {
-	    double operator()( const Type& x ) const {
-	      return x.to_double();
-	    }
-	};
-
-      struct Compare
-	: public std::binary_function< Type, Type, Comparison_result > {
-	    Comparison_result operator()(
-		const Type& x,
-		const Type& y ) const {
-	      return CGAL::sign(Mpzf_cmp(x,y));
-	    }
-	};
-
-      struct To_interval
-	: public std::unary_function< Type, std::pair< double, double > > {
-	    std::pair<double, double> operator()( const Type& x ) const {
-	      return x.to_interval();
-	    }
-	};
-
-    };
-
-CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float    ,Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double   ,Mpzf)
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(Gmpz     ,Mpzf)
-#ifdef CGAL_USE_GMPXX
-CGAL_DEFINE_COERCION_TRAITS_FROM_TO(mpz_class,Mpzf)
-#endif
-
-}
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // GMP_NUMB_BITS == 64
-#endif // CGAL_MPZF_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_point_locator.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_point_locator.h
deleted file mode 100644
index 45b8710..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_point_locator.h
+++ /dev/null
@@ -1,1058 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-#ifndef CGAL_PM_POINT_LOCATOR_H
-#define CGAL_PM_POINT_LOCATOR_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Nef_2/Constrained_triang_traits.h>
-#include <CGAL/Nef_2/Object_handle.h>
-#include <CGAL/Circulator_project.h>
-#include <CGAL/Polygon_2_algorithms.h>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 17
-#include <CGAL/Nef_2/debug.h>
-#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <CGAL/Nef_2/geninfo.h>
-#else
-#include <boost/any.hpp>
-#endif
-
-#ifdef CGAL_USE_LEDA_LIBRARY
-#include <CGAL/LEDA_basic.h>
-# if __LEDA__ > 410 && __LEDA__ < 441
-#  define CGAL_USING_PPL
-#  include <CGAL/Nef_2/PM_persistent_PL.h>
-# endif
-#endif
-
-namespace CGAL {
-
-enum object_kind { VERTEX, EDGE_CROSSING, EDGE_COLLINEAR };
-
-template < class Node, class Object>
-struct Project_halfedge_point {
-  typedef Node         argument_type;
-  typedef Object       result_type;
-  Object& operator()( Node& x) const   {
-    return x.vertex()->point();
-  }
-  const Object& operator()( const Node& x) const   {
-    return x.vertex()->point();
-  }
-};
-
-/*{\Moptions print_title=yes }*/
-/*{\Msubst
-PM_decorator_#PMD
-Geometry_#GEO
-}*/
-/*{\Manpage {PM_naive_point_locator}{PMD,GEO}
-{Naive point location in plane maps}{PL}}*/
-/*{\Mdefinition An instance |\Mvar| of data type |\Mname|
-encapsulates naive point location queries within a plane map |P|.  The
-two template parameters are specified via concepts. |PM_decorator_|
-must be a model of the concept |PMDecorator| as described in the
-appendix.  |Geometry_| must be a model of the concept
-|AffineGeometryTraits_2| as described in the appendix. For a
-specification of plane maps see also the concept of
-|PMConstDecorator|.}*/
-
-/*{\Mgeneralization PMD}*/
-
-template <typename PM_decorator_, typename Geometry_>
-class PM_naive_point_locator : public PM_decorator_ {
-protected:
-  typedef PM_decorator_ Base;
-  typedef PM_naive_point_locator<PM_decorator_,Geometry_> Self;
-
-  const Geometry_& K;
-public:
-  /*{\Mtypes 5}*/
-  typedef PM_decorator_                 Decorator;
-  /*{\Mtypemember equals |PM_decorator_|.}*/
-  typedef typename Decorator::Plane_map Plane_map;
-  /*{\Mtypemember the plane map type decorated by |Decorator|.}*/
-  typedef typename Decorator::Mark      Mark;
-  /*{\Mtypemember the attribute of all objects (vertices, edges,
-  faces).}*/
-
-  typedef Geometry_                       Geometry;
-  /*{\Mtypemember equals |Geometry_|.}*/
-  typedef typename Geometry_::Point_2     Point;
-  /*{\Mtypemember the point type of the geometry kernel.\\
-  \require |Geometry::Point_2| equals |Plane_map::Point|.}*/
-  typedef typename Geometry_::Segment_2   Segment;
-  /*{\Mtypemember the segment type of the geometry kernel.}*/
-  typedef typename Geometry_::Direction_2 Direction;
-
-  /*{\Mtext Local types are handles, iterators and circulators of the
-  following kind: |Vertex_const_handle|, |Vertex_const_iterator|,
-  |Halfedge_const_handle|, |Halfedge_const_iterator|, |Face_const_handle|,
-  |Face_const_iterator|.}*/
-
-  typedef CGAL::Object_handle Object_handle;
-  /*{\Mtypemember a generic handle to an object of the underlying plane
-  map. The kind of the object |(vertex, halfedge,face)| can be determined and
-  the object assigned by the three functions:\\
-  |bool assign(Vertex_const_handle& h, Object_handle o)|\\
-  |bool assign(Halfedge_const_handle& h, Object_handle o)|\\
-  |bool assign(Face_const_handle& h, Object_handle o)|\\ where each
-  function returns |true| iff the assignment of |o| to |h| was valid.}*/
-
-   typedef typename PM_decorator_::Vertex_handle Vertex_handle;
-   typedef typename PM_decorator_::Halfedge_handle Halfedge_handle;
-   typedef typename PM_decorator_::Face_handle Face_handle;
-   typedef typename PM_decorator_::Vertex_const_handle Vertex_const_handle;
-   typedef typename PM_decorator_::Halfedge_const_handle Halfedge_const_handle;
-   typedef typename PM_decorator_::Face_const_handle Face_const_handle;
-   typedef typename PM_decorator_::Vertex_iterator Vertex_iterator;
-   typedef typename PM_decorator_::Halfedge_iterator Halfedge_iterator;
-   typedef typename PM_decorator_::Face_iterator Face_iterator;
-   typedef typename PM_decorator_::Vertex_const_iterator Vertex_const_iterator;
-   typedef typename PM_decorator_::Halfedge_const_iterator Halfedge_const_iterator;
-   typedef typename PM_decorator_::Face_const_iterator Face_const_iterator;
-   typedef typename PM_decorator_::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
-   typedef typename PM_decorator_::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator;
-   typedef typename PM_decorator_::Halfedge_around_face_circulator Halfedge_around_face_circulator;
-   typedef typename PM_decorator_::Halfedge_around_face_const_circulator Halfedge_around_face_const_circulator;
-
-  using Base::clear;
-  using Base::vertices_begin;
-  using Base::vertices_end;
-  using Base::halfedges_begin;
-  using Base::halfedges_end;
-  using Base::faces_begin;
-  using Base::faces_end;
-  using Base::number_of_vertices;
-  using Base::number_of_halfedges;
-  using Base::number_of_faces;
-  using Base::info;
-  using Base::is_closed_at_source;
-  using Base::source;
-  using Base::target;
-  using Base::cyclic_adj_succ;
-  using Base::mark;
-  using Base::twin;
-  using Base::flip_diagonal;
-  using Base::is_isolated;
-  using Base::first_out_edge;
-  using Base::next;
-  using Base::previous;
-  using Base::face;
-  using Base::point;
-
-  Halfedge_const_handle out_wedge(Vertex_const_handle v,
-    const Direction& d, bool& collinear) const
-  /*{\Xop returns a halfedge |e| bounding a wedge in between two
-  neighbored edges in the adjacency list of |v| which contains |d|.
-  If |d| extends along a edge then |e| is this edge. If |d| extends
-  into the interior of such a wedge then |e| is the first edge hit
-  when |d| is rotated clockwise. \precond |v| is not isolated.}*/
-  { CGAL_NEF_TRACEN("out_wedge "<<PV(v));
-    CGAL_assertion(!is_isolated(v));
-    collinear=false;
-    Point p = point(v);
-    Halfedge_const_handle e_res = first_out_edge(v);
-    Direction d_res = direction(e_res);
-    Halfedge_around_vertex_const_circulator el(e_res),ee(el);
-    CGAL_For_all(el,ee) {
-      if ( K.strictly_ordered_ccw(d_res, direction(el), d) )
-        e_res = el; d_res = direction(e_res);
-    }
-    CGAL_NEF_TRACEN("  determined "<<PE(e_res)<<" "<<d_res);
-    if ( direction(cyclic_adj_succ(e_res)) == d ) {
-      e_res = cyclic_adj_succ(e_res);
-      collinear=true;
-    }
-    CGAL_NEF_TRACEN("  wedge = "<<PE(e_res)<<" "<<collinear);
-    return e_res;
-  }
-
-  Segment segment(Halfedge_const_handle e) const
-  { return K.construct_segment(point(source(e)), point(target(e))); }
-
-  Direction direction(Halfedge_const_handle e) const
-  { return K.construct_direction(point(source(e)),point(target(e))); }
-
-  /*{\Mcreation 3}*/
-
-  /*{\Moptions constref=yes}*/
-  PM_naive_point_locator(const Plane_map& P, const Geometry& k = Geometry()) :
-    Base(const_cast<Plane_map&>(P)), K(k) {}
-  /*{\Mcreate constructs a point locator working on |P|.}*/
-  /*{\Moptions constref=no}*/
-  /*{\Moperations 2.5 0.5}*/
-
-  const Mark& mark(Object_handle h) const
-  /*{\Mop returns the mark associated to the object |h|.}*/
-  { Vertex_const_handle v;
-    Halfedge_const_handle e;
-    Face_const_handle f;
-    if ( assign(v,h) ) return mark(v);
-    if ( assign(e,h) ) return mark(e);
-    if ( assign(f,h) ) return mark(f);
-    CGAL_error_msg("PM_point_locator::mark: Object_handle holds no object.");
-    return mark(v); // never reached
-  }
-
-
-  Object_handle locate(const Segment& s) const
-  /*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
-  face) of the underlying plane map |P| which contains the point |p =
-  s.source()| in its relative interior. |s.target()| must be a point
-  such that |s| intersects the $1$-skeleton of |P|.}*/
-  { CGAL_NEF_TRACEN("locate naivly "<<s);
-    if (this->number_of_vertices() == 0)
-      CGAL_error_msg("PM_naive_point_locator: plane map is empty.");
-    Point p = K.source(s);
-    Vertex_const_iterator vit;
-    for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
-      if ( p == point(vit) ) return make_object(vit);
-    }
-    Halfedge_const_iterator eit;
-    for(eit = this->halfedges_begin(); eit != this->halfedges_end(); ++(++eit)) {
-      // we only have to check each second halfedge
-      if ( K.contains(segment(eit),p) )
-        return make_object(eit);
-    }
-    Vertex_const_handle v_res;
-    Halfedge_const_handle e_res;
-    Segment ss = s; // we shorten the segment iteratively
-    Direction dso = K.construct_direction(K.target(s),p), d_res;
-    CGAL::Unique_hash_map<Halfedge_const_handle,bool> visited(false);
-    for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
-      Point p_res, vp = point(vit);
-      if ( K.contains(ss,vp) ) {
-        CGAL_NEF_TRACEN(" location via vertex at "<<vp);
-        ss = K.construct_segment(p,vp); // we shrink the segment
-        if ( is_isolated(vit) ) {
-          v_res = vit; e_res = Halfedge_const_handle();
-        } else { // not isolated
-          bool dummy;
-          e_res = out_wedge(vit,dso,dummy);
-          Halfedge_around_vertex_const_circulator el(e_res),ee(el);
-          CGAL_For_all(el,ee)
-            visited[el] = visited[twin(el)] = true;
-          /* e_res is now the counterclockwise maximal halfedge out
-             of v just before s */
-          if ( K.orientation(p,vp,point(target(e_res))) < 0 ) // right turn
-            e_res = previous(e_res);
-          // correction to make e_res visible from p
-          CGAL_NEF_TRACEN("  determined "<<PE(e_res));
-        }
-      }
-    }
-
-    for (eit = this->halfedges_begin(); eit != this->halfedges_end(); ++eit) {
-      if ( visited[eit] ) continue;
-      Point se = point(source(eit)),
-            te = point(target(eit));
-      int o1 = K.orientation(ss,se);
-      int o2 = K.orientation(ss,te);
-      if ( o1 == -o2 && // internal intersection
-           K.orientation(se,te,K.source(ss)) !=
-           K.orientation(se,te,K.target(ss)) ) {
-          CGAL_NEF_TRACEN(" location via halfedge "<<segment(eit));
-        Point p_res = K.intersection(s,segment(eit));
-        ss = K.construct_segment(p,p_res);
-        e_res = (o2 > 0 ? eit : twin(eit));
-        // o2>0 => te left of s and se right of s => p left of e
-        visited[eit] = visited[twin(eit)] = true;
-        CGAL_NEF_TRACEN("  determined "<<PE(e_res)<<" "<<mark(e_res));
-        CGAL_NEF_TRACEN("             "<<mark(face(e_res)));
-      }
-    }
-
-    if ( e_res != Halfedge_const_handle() )
-      return make_object((Face_const_handle)(face(e_res)));
-    else
-      return make_object((Face_const_handle)(face(v_res)));
-  }
-
-
-  template <typename Object_predicate>
-  Object_handle ray_shoot(const Segment& s, const Object_predicate& M) const
-  /*{\Mop returns an |Object_handle o| which can be converted to a
-  |Vertex_const_handle|, |Halfedge_const_handle|, |Face_const_handle|
-  |h| as described above.  The object predicate |M| has to have function
-  operators \\
-  |bool operator() (const Vertex_/Halfedge_/Face_const_handle&)|.\\
-  The object returned is intersected by the segment |s| and has
-  minimal distance to |s.source()| and |M(h)| holds on the converted
-  object. The operation returns the null handle |NULL| if the ray shoot
-  along |s| does not hit any object |h| of |P| with |M(h)|.}*/
-  { CGAL_NEF_TRACEN("naive ray_shoot "<<s);
-    CGAL_assertion( !K.is_degenerate(s) );
-    Point p = K.source(s);
-    Segment ss(s);
-    Direction d = K.construct_direction(K.source(s),K.target(s));
-    Object_handle h = locate(s);
-    Vertex_const_handle v;
-    Halfedge_const_handle e;
-    Face_const_handle f;
-    if ( ( assign(v,h) && M(v) ) ||
-         ( assign(e,h) && M(e) ) ||
-         ( assign(f,h) && M(f) ) ) return h;
-    h = Object_handle();
-    CGAL_NEF_TRACEN("not contained");
-    for (v = this->vertices_begin(); v != this->vertices_end(); ++v) {
-      Point pv = point(v);
-      if ( !K.contains(ss,pv) ) continue;
-      CGAL_NEF_TRACEN("candidate "<<pv);
-      if ( M(v) ) {
-        h = make_object(v);     // store vertex
-        ss = K.construct_segment(p,pv); // shorten
-        continue;
-      }
-      // now we know that v is not marked but on s
-      bool collinear;
-      Halfedge_const_handle e = out_wedge(v,d,collinear);
-      if ( collinear ) {
-        if ( M(e) ) {
-          h = make_object(e);
-          ss = K.construct_segment(p,pv);
-        }
-        continue;
-      }
-      if ( M(face(e)) ) {
-        h = make_object(face(e));
-        ss = K.construct_segment(p,pv);
-      }
-    } // all vertices
-
-    Halfedge_const_iterator e_res;
-    for(e = this->halfedges_begin(); e != this->halfedges_end(); ++(++e)) {
-      Segment es = segment(e);
-      int o1 = K.orientation(ss,K.source(es));
-      int o2 = K.orientation(ss,K.target(es));
-      if ( o1 == -o2 && o1 != 0 &&
-           K.orientation(es, K.source(ss)) ==
-           - K.orientation(es, K.target(ss)) ) {
-        // internal intersection
-        CGAL_NEF_TRACEN("candidate "<<es);
-        Point p_res = K.intersection(s,es);
-        e_res = (o2 > 0 ? e : twin(e));
-        // o2 > 0 => te left of s and se right of s => p left of e
-        if ( M(e_res) ) {
-          h = make_object(e_res);
-          ss = K.construct_segment(p,p_res);
-        } else if ( M(face(twin(e_res))) ) {
-          h = make_object(face(twin(e_res)));
-          ss = K.construct_segment(p,p_res);
-        }
-      }
-    }
-
-    return h;
-  }
-
-
-  // C++ is really friendly:
-  #define USECMARK(t) const Mark& mark(t h) const { return Base::mark(h); }
-  #define USEMARK(t)  Mark& mark(t h) const { return Base::mark(h); }
-  USEMARK(Vertex_handle)
-  USEMARK(Halfedge_handle)
-  USEMARK(Face_handle)
-  USECMARK(Vertex_const_handle)
-  USECMARK(Halfedge_const_handle)
-  USECMARK(Face_const_handle)
-  #undef USEMARK
-  #undef USECMARK
-  /*{\Mimplementation Naive query operations are realized by checking
-  the intersection points of the $1$-skeleton of the plane map |P| with
-  the query segments $s$. This method takes time linear in the size $n$
-  of the underlying plane map without any preprocessing.}*/
-}; // PM_naive_point_locator<PM_decorator_,Geometry_>
-
-
-/*{\Moptions print_title=yes }*/
-/*{\Msubst
-PM_decorator_#PMD
-Geometry_#GEO
-}*/
-/*{\Manpage {PM_point_locator}{PMD,GEO}
-{Point location in plane maps via LMWT}{PL}}*/
-/*{\Mdefinition An instance |\Mvar| of data type |\Mname|
-encapsulates point location queries within a plane map |P|. The two
-template parameters are specified via concepts. |PMD| must be a model
-of the concept |PMDecorator| as described in the appendix.  |GEO| must
-be a model of the concept |AffineGeometryTraits_2| as described in the
-appendix. For a specification of plane maps see also the concept of
-|PMConstDecorator|.}*/
-
-/*{\Mgeneralization PMD^#PM_naive_point_locator<PMD,GEO>}*/
-
-template <typename PM_decorator_, typename Geometry_>
-class PM_point_locator : public
-  PM_naive_point_locator<PM_decorator_,Geometry_> {
-protected:
-  typedef PM_naive_point_locator<PM_decorator_,Geometry_> Base;
-  typedef PM_point_locator<PM_decorator_,Geometry_> Self;
-  Base CT;
-  #ifdef CGAL_USING_PPL
-  typedef PM_persistent_PL_traits<Base>  PMPPLT;
-  typedef PointLocator<PMPPLT>           PMPP_locator;
-  PMPP_locator* pPPL;
-  #define LOCATE_IN_TRIANGULATION pPPL->locate_down
-  #else
-  #define LOCATE_IN_TRIANGULATION walk_in_triangulation
-  #endif
-
-public:
-
-  typedef typename Base::Decorator Decorator;
-  typedef typename Base::Plane_map Plane_map;
-  typedef typename Base::Mark Mark;
-  typedef typename Base::Geometry Geometry;
-  typedef typename Base::Point Point;
-  typedef typename Base::Segment Segment;
-  typedef typename Base::Direction Direction;
-  typedef typename Base::Object_handle Object_handle;
-  typedef typename Base::Vertex_handle Vertex_handle;
-  typedef typename Base::Halfedge_handle Halfedge_handle;
-  typedef typename Base::Face_handle Face_handle;
-  typedef typename Base::Vertex_const_handle Vertex_const_handle;
-  typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
-  typedef typename Base::Face_const_handle Face_const_handle;
-  typedef typename Base::Vertex_iterator Vertex_iterator;
-  typedef typename Base::Halfedge_iterator Halfedge_iterator;
-  typedef typename Base::Face_iterator Face_iterator;
-  typedef typename Base::Vertex_const_iterator Vertex_const_iterator;
-  typedef typename Base::Halfedge_const_iterator Halfedge_const_iterator;
-  typedef typename Base::Face_const_iterator Face_const_iterator;
-  typedef typename Base::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
-  typedef typename Base::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator;
-  typedef typename Base::Halfedge_around_face_circulator Halfedge_around_face_circulator;
-  typedef typename Base::Halfedge_around_face_const_circulator Halfedge_around_face_const_circulator;
-
-  using Base::K;
-  using Base::number_of_vertices;
-  using Base::faces_begin;
-  using Base::info;
-  using Base::flip_diagonal;
-  using Base::twin; 
-  using Base::next; 
-  using Base::previous; 
-  using Base::source; 
-  using Base::target; 
-  using Base::point; 
-  using Base::segment; 
-  using Base::face;
-
-  /*{\Mtypes 2}*/
-  /*{\Mtext All local types of |PM_naive_point_locator| are inherited.}*/
-  typedef std::pair<Vertex_const_handle,Face_const_handle>   VF_pair;
-  typedef std::pair<Halfedge_const_handle,Face_const_handle> EF_pair;
-
-  struct CT_link_to_original : Decorator { // CT decorator
-    const Decorator& Po;
-    using Decorator::info;
-
-    CT_link_to_original(const Decorator& P, const Decorator& Poi)
-      : Decorator(P), Po(Poi) {}
-
-    void operator()(Vertex_handle vn, Vertex_const_handle vo) const
-    { Face_const_handle f;
-      if ( Po.is_isolated(vo) ) f = Po.face(vo);
-      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      geninfo<VF_pair>::create(info(vn));
-      geninfo<VF_pair>::access(info(vn)) = VF_pair(vo,f);
-      #else
-      info(vn) = VF_pair(vo,f);      
-      #endif
-      CGAL_NEF_TRACEN("linking to org "<<PV(vn));
-    }
-
-    void operator()(Halfedge_handle hn, Halfedge_const_handle ho) const
-    { 
-      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      geninfo<EF_pair>::create(info(hn));
-      geninfo<EF_pair>::access(info(hn)) = EF_pair(ho,Po.face(ho));
-      #else
-      info(hn) = EF_pair(ho,Po.face(ho));      
-      #endif
-      CGAL_NEF_TRACEN("linking to org "<<PE(hn));
-    }
-  };
-
-protected:
-  Vertex_const_handle input_vertex(Vertex_const_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<VF_pair>::const_access(CT.info(v)).first; 
-    #else
-    return 
-      boost::any_cast<VF_pair>(CT.info(v)).first; 
-    #endif
-  }
-
-  Halfedge_const_handle input_halfedge(Halfedge_const_handle e) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<EF_pair>::const_access(CT.info(e)).first; 
-    #else
-    return 
-      boost::any_cast<EF_pair>(CT.info(e)).first; 
-    #endif
-  }
-
-  Face_const_handle input_face(Halfedge_const_handle e) const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<EF_pair>::const_access(CT.info(e)).second;
-    #else
-    return 
-      boost::any_cast<EF_pair>(CT.info(e)).second;
-    #endif
-  }
-
-
-  Object_handle input_object(Vertex_const_handle v) const
-  { return make_object(input_vertex(v)); }
-
-  Object_handle input_object(Halfedge_const_handle e) const
-  { Halfedge_const_handle e_org = input_halfedge(e);
-    if ( e_org != Halfedge_const_handle() )
-      return make_object( e_org );
-    // now e_org is not existing
-    return make_object( input_face(e) );
-  }
-
-  /*{\Mimplementation
-  The efficiency of this point location module is mostly based on
-  heuristics. Therefore worst case bounds are not very expressive. The
-  query operations take up to linear time for subsequent query
-  operations though they are better in practise. They trigger a one-time
-  initialization which needs worst case $O(n^2)$ time though runtime
-  tests often show subquadratic results. The necessary space for the
-  query structure is subsumed in the storage space $O(n)$ of the input
-  plane map. The query times are configuration dependent. If LEDA is
-  present then point location is done via the slap method based on
-  persistent dictionaries.  Then $T_{pl}(n) = O( \log(n) )$. If CGAL is
-  not configured to use LEDA then point location is done via a segment
-  walk in the underlying convex subdivision of $P$. In this case
-  $T_{pl}(n)$ is the number of triangles crossed by a walk from the
-  boundary of the structure to the query point. The time for the ray
-  shooting operation $T_{rs}(n)$ is the time for the point location
-  $T_{pl}(n)$ plus the time for the walk in the triangulation that is
-  superimposed to the plane map. Let's consider the plane map edges as
-  obstacles and the additional triangulation edges as non-obstacle
-  edges. Let's call the sum of the lengths of all edges of the
-  triangulation its weight. If the calculated triangulation
-  approximates\cgalFootnote{The calculation of general
-  minimum-weight-triangulations is conjectured to be NP-complete and
-  locally-minimum-weight-triangulations that we use are considered good
-  approximations.} the minimum weight triangulation of the obstacle set
-  then the stepping quotient\cgalFootnote {The number of non-obstacle edges
-  crossed until an obstacle edge is hit.} for a random direction of the
-  ray shot is expected to be $O( \sqrt{n} )$.}*/
-
-
-  struct CT_new_edge : Decorator {
-    const Decorator& _DP;
-    using Decorator::mark;
-    using Decorator::previous;
-    using Decorator::is_closed_at_source;
-    using Decorator::info;
-    using Decorator::source;
-    using Decorator::twin;
-
-    CT_new_edge(const Decorator& CT, const Decorator& DP) :
-      Decorator(CT), _DP(DP) {}
-    void operator()(Halfedge_handle& e) const
-    { Halfedge_handle e_from = previous(e);
-      Face_const_handle f;
-      if ( is_closed_at_source(e) ) // source(e) was isolated before
-        #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-        f = geninfo<VF_pair>::access(info(source(e))).second;
-      else
-        f = geninfo<EF_pair>::access(info(e_from)).second;      
-        #else
-        f = 
-          boost::any_cast<VF_pair>(info(source(e))).second;
-      else
-        f = 
-          boost::any_cast<EF_pair>(info(e_from)).second;              
-        #endif
-      mark(e) = _DP.mark(f);
-      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      geninfo<EF_pair>::create(info(e));
-      geninfo<EF_pair>::create(info(twin(e)));
-
-      geninfo<EF_pair>::access(info(e)).first =
-      geninfo<EF_pair>::access(info(twin(e))).first =
-        Halfedge_const_handle();
-
-      geninfo<EF_pair>::access(info(e)).second =
-      geninfo<EF_pair>::access(info(twin(e))).second = f;
-      #else
-      info(e)=EF_pair(Halfedge_const_handle(),f);
-      info(twin(e))=EF_pair(Halfedge_const_handle(),f);
-      #endif
-      CGAL_NEF_TRACEN("CT_new_edge "<<PE(e));
-    }
-  };
-
-  void triangulate_CT() const
-  {
-    CGAL_NEF_TRACEN("triangulate_CT");
-    typedef CGAL::Constrained_triang_traits<
-      Decorator,Geometry,CT_new_edge> NCTT;
-    typedef CGAL::generic_sweep<NCTT> Constrained_triang_sweep;
-    CT_new_edge NE(CT,*this);
-    Constrained_triang_sweep T(NE,CT.plane_map(),this->K); T.sweep();
-  }
-
-  void minimize_weight_CT() const
-  { CGAL_NEF_TRACEN("minimize_weight_CT");
-    if ( this->number_of_vertices() < 2 ) return;
-    std::list<Halfedge_handle> S;
-    /* We maintain a stack |S| of edges containing diagonals
-       which might have to be flipped. */
-    int flip_count = 0;
-    Halfedge_iterator e;
-    for (e = CT.halfedges_begin(); e != CT.halfedges_end(); ++(++e)) {
-      Halfedge_const_handle e_org = input_halfedge(e);
-      if ( e_org != Halfedge_const_handle() )
-        continue;
-      S.push_back(e);
-    }
-
-    while ( !S.empty() ) {
-      Halfedge_handle e = S.front(); S.pop_front();
-      Halfedge_handle r = twin(e);
-      Halfedge_const_handle e_org = input_halfedge(e);
-      if ( e_org != Halfedge_const_handle() )
-        continue;
-      Halfedge_handle e1 = next(r);
-      Halfedge_handle e3 = next(e);
-      // e1,e3: edges of quadrilateral with diagonal e
-
-      Point a = point(source(e1));
-      Point b = point(target(e1));
-      Point c = point(source(e3));
-      Point d = point(target(e3));
-
-      if (! (this->K.orientation(b,d,a) > 0 && // left_turn
-             this->K.orientation(b,d,c) < 0) ) // right_turn
-        continue;
-
-      if ( this->K.first_pair_closer_than_second(b,d,a,c) ) { // flip
-        CGAL_NEF_TRACEN("flipping diagonal of quadilateral"<<a<<b<<c<<d);
-        Halfedge_handle e2 = next(e1);
-        Halfedge_handle e4 = next(e3);
-        S.push_back(e1);
-        S.push_back(e2);
-        S.push_back(e3);
-        S.push_back(e4);
-        flip_diagonal(e);
-        flip_count++;
-      }
-
-
-    }
-    CGAL_NEF_TRACEN("  flipped "<<flip_count);
-  }
-
-public:
-  /*{\Mcreation 3}*/
-
-  PM_point_locator() {
-    #ifdef CGAL_USING_PPL
-    pPPL = 0;
-    #endif
-
-  }
-
-  /*{\Moptions constref=yes}*/
-  PM_point_locator(const Plane_map& P, const Geometry& k = Geometry());
-  /*{\Mcreate constructs a point locator working on |P|.}*/
-
-  ~PM_point_locator();
-
-  /*{\Moperations 2.5 0.5}*/
-
-  const Decorator& triangulation() const { return CT; }
-  /*{\Mop access to the constrained triangulation structure that
-  is superimposed to |P|.}*/
-  /*{\Moptions constref=no}*/
-
-
-  Object_handle locate(const Point& p) const
-  /*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
-  face) of |P| which contains the point |p| in its relative
-  interior.}*/
-  {
-    Object_handle h = LOCATE_IN_TRIANGULATION(p);
-    Vertex_const_handle v_triang;
-    if ( assign(v_triang,h) ) {
-      return input_object(v_triang);
-    }
-    Halfedge_const_handle e_triang;
-    if ( assign(e_triang,h) ) {
-      Halfedge_const_handle e = input_halfedge(e_triang);
-      if ( e == Halfedge_const_handle() ) // inserted during triangulation
-        return make_object(input_face(e_triang));
-      int orientation_ = this->K.orientation(segment(e),p);
-      if ( orientation_ == 0 ) return make_object(e);
-      if ( orientation_ < 0 )  return make_object(face(twin(e)));
-      if ( orientation_ > 0 )  return make_object(face(e));
-    }
-    CGAL_assertion(!check_tag(typename Is_extended_kernel<Geometry>::value_type()));
-    return make_object(Face_const_handle(faces_begin()));
-    //    CGAL_error(); return h; // compiler warning
-  }
-
-  bool ray_shoot_from_outer_facet(Segment& , object_kind& ,
-				  Vertex_const_handle &,
-				  Halfedge_const_handle& ,
-				  const Tag_true& ) const {
-    return false;
-  }
-
-  bool ray_shoot_from_outer_facet(Segment& s, object_kind& current,
-				  Vertex_const_handle &v,
-				  Halfedge_const_handle& e,
-				  const Tag_false& ) const {
-    CGAL_NEF_TRACEN("target on outer facet");
-    Point p = this->K.source(s);
-    Vertex_const_handle v1 = CT.vertices_begin();
-    Halfedge_const_handle e1 = CT.twin(CT.first_out_edge(v1));
-    Halfedge_around_face_const_circulator circ(e1), end(circ);
-    Point i;
-    Segment seg;
-    bool found = false;
-    CGAL_For_all(circ, end) {
-      //	std::cerr << s << std::endl;
-      //	std::cerr << point(source(circ)) << "->" << point(target(circ)) << std::endl;
-      Object o = intersection(s, Segment(point(source(circ)),
-					 point(target(circ))));
-
-      if(assign(i,o)) {
-	CGAL_NEF_TRACEN("intersection in point " << i);
-	found = true;
-	s = Segment(p,i);
-	if(i == point(source(circ))) {
-	  current = VERTEX;
-	  v = source(circ);
-	} else if(i == point(target(circ))) {
-	  current = VERTEX;
-	  v = target(circ);
-	} else {
-	  current = EDGE_CROSSING;
-	  e = circ;
-	}
-      } else if(assign(seg,o)) {
-	found = true;
-	CGAL_NEF_TRACEN("overlap of segments");
-	current = EDGE_COLLINEAR;
-	e = circ;
-      }
-    }
-    return found;
-  }
-
-  template <typename Object_predicate>
-  Object_handle ray_shoot(const Segment& ss, const Object_predicate& M) const
-  /*{\Mop returns an |Object_handle o| which can be converted to a
-  |Vertex_const_handle|, |Halfedge_const_handle|, |Face_const_handle|
-  |h| as described above.  The object predicate |M| has to have
-  function operators\\
-  |bool operator() (const Vertex_/ Halfedge_/Face_const_handle&) const|.\\
-  The object returned is intersected by the segment |s| and has minimal
-  distance to |s.source()| and |M(h)| holds on the converted object. The
-  operation returns the null handle |NULL| if the ray shoot along |s|
-  does not hit any object |h| of |P| with |M(h)|.}*/
-  { Segment s(ss);
-    CGAL_NEF_TRACEN("ray_shoot "<<s);
-    CGAL_assertion( !this->K.is_degenerate(s) );
-    Point p = this->K.source(s);
-    Direction d = this->K.construct_direction(p,s.target());
-    Vertex_const_handle v;
-    Halfedge_const_handle e;
-    object_kind current;
-    Object_handle h = LOCATE_IN_TRIANGULATION(p);
-    if ( assign(v,h) ) {
-      CGAL_NEF_TRACEN("located vertex "<<PV(v));
-      current = VERTEX;
-    } else if ( assign(e,h) ) {
-      CGAL_NEF_TRACEN("located edge "<<PE(e));
-      int orientation_ = this->K.orientation( segment(e), p);
-      if ( orientation_ == 0 ) { // p on segment
-        CGAL_NEF_TRACEN("on edge "<<PE(e));
-        if ( d == CT.direction(e) )
-        { current = EDGE_COLLINEAR; }
-        else if ( d == CT.direction(CT.twin(e)) )
-        { e = CT.twin(e); current = EDGE_COLLINEAR; }
-        else { // crossing
-          current = EDGE_CROSSING;
-          if ( !(this->K.orientation(CT.segment(e),s.target())>0) ) // not left_turn
-            e = CT.twin(e);
-        }
-
-      } else { // p not on segment, thus in triangle
-        if ( orientation_ < 0  ) e = CT.twin(e);
-        // now p left of e
-        CGAL_NEF_TRACEN("in face at "<<PE(e));
-        if ( M(input_face(e)) ) // face mark
-          return make_object(input_face(e));
-
-        Point p1 = CT.point(CT.source(e)),
-              p2 = CT.point(CT.target(e)),
-              p3 = CT.point(CT.target(next(e)));
-        int or1 = this->K.orientation(p,s.target(),p1);
-        int or2 = this->K.orientation(p,s.target(),p2);
-        int or3 = this->K.orientation(p,s.target(),p3);
-        if ( or1 == 0 && !this->K.left_turn(p1,p2,s.target()) )
-        { v = CT.source(e); current = VERTEX; }
-        else if ( or2 == 0 && !this->K.left_turn(p2,p3,s.target()) )
-        { v = CT.target(e); current = VERTEX; }
-        else if ( or3 == 0 && !this->K.left_turn(p3,p1,s.target()) )
-        { v = CT.target(CT.next(e)); current = VERTEX; }
-        else if ( or2 > 0 && or1 < 0 && !this->K.left_turn(p1,p2,s.target()) )
-        { e = CT.twin(e); current = EDGE_CROSSING; }
-        else if ( or3 > 0 && or2 < 0 && !this->K.left_turn(p2,p3,s.target()) )
-        { e = CT.twin(CT.next(e)); current = EDGE_CROSSING; }
-        else if ( or1 > 0 && or3 < 0 && !this->K.left_turn(p3,p1,s.target()) )
-        { e = CT.twin(CT.previous(e)); current = EDGE_CROSSING; }
-        else return Object_handle();
-
-      }
-    } else {
-
-      if(check_tag(typename Is_extended_kernel<Geometry>::value_type())) {
-	CGAL_error_msg( "code is only for Bounded_kernel");
-      }
-      if(!ray_shoot_from_outer_facet(s,current,v,e,typename Is_extended_kernel<Geometry>::value_type()))
-	return Object_handle();
-    }
-
-    CGAL_NEF_TRACEN("current = " << current);
-    if(current == VERTEX){
-      CGAL_NEF_TRACEN(point(v));
-    }
-    while (true) switch ( current ) {
-      case VERTEX:
-        { CGAL_NEF_TRACEN("vertex "<<CT.point(v));
-          Vertex_const_handle v_org = input_vertex(v);
-          if ( M(v_org) ) return make_object(v_org);
-          if ( CT.point(v) == s.target() ) return Object_handle();
-          // stop walking at s.target(), or determine next object on s:
-          bool collinear;
-          Halfedge_const_handle e_out = CT.out_wedge(v,d,collinear);
-          if (collinear) // ray shoot via e_out
-          { e = e_out; current = EDGE_COLLINEAR; }
-          else { // ray shoot in wedge left of e_out
-            if ( M(input_face(e_out)) )
-              return make_object(input_face(e_out));
-            e = CT.twin(CT.next(e_out)); current = EDGE_CROSSING;
-          }
-        }
-
-        break;
-      case EDGE_CROSSING:
-        { CGAL_NEF_TRACEN("crossing edge "<<segment(e));
-          if ( this->K.orientation(CT.segment(e),s.target()) == 0 )
-            return Object_handle();
-          Halfedge_const_handle e_org = input_halfedge(e);
-          if ( e_org != Halfedge_const_handle() ) { // not a CT edge
-            if ( M(e_org) ) return make_object(e_org);
-            if ( M(face(e_org)) ) return make_object(face(e_org));
-          }
-          Vertex_const_handle v_cand = CT.target(CT.next(e));
-          CGAL_NEF_TRACEN("v_cand "<<PV(v_cand));
-          int orientation_ = this->K.orientation(p,s.target(),CT.point(v_cand));
-          switch( orientation_ ) {
-            case 0:
-              v = v_cand; current = VERTEX; break;
-            case +1:
-              e = CT.twin(CT.next(e)); current = EDGE_CROSSING; break;
-            case -1:
-              e = CT.twin(CT.previous(e)); current = EDGE_CROSSING; break;
-          }
-        }
-
-        break;
-      case EDGE_COLLINEAR:
-        { CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
-          Halfedge_const_handle e_org = input_halfedge(e);
-          if ( e_org == Halfedge_const_handle() ) { // a CT edge
-            if ( M(input_face(e)) )
-              return make_object(input_face(e));
-          } else { // e_org is not a CT edge
-            if ( M(e_org) )
-              return make_object(e_org);
-          }
-          if ( this->K.strictly_ordered_along_line(
-                 CT.point(CT.source(e)),s.target(),CT.point(CT.target(e))) )
-            return Object_handle();
-          v = CT.target(e); current = VERTEX;
-        }
-
-        break;
-    }
-    // CGAL_error(); return h; // compiler warning
-  }
-
-  bool within_outer_cycle(Vertex_const_handle ,
-			  const Point& , const Tag_true& ) const {
-    return true;
-  }
-
-  bool within_outer_cycle(Vertex_const_handle v,
-			  const Point& q, const Tag_false& ) const {
-    typedef Project_halfedge_point<typename Decorator::Halfedge, Point> Project;
-    typedef Circulator_project<Halfedge_around_face_const_circulator,
-      Project, const Point&, const Point*> Circulator;
-    typedef Container_from_circulator<Circulator> Container;
-
-    Halfedge_const_handle e_min = CT.twin(CT.first_out_edge(v));
-    Halfedge_around_face_const_circulator circ(e_min);
-    Circulator c(circ);
-    Container ct(c);
-    if(is_empty_range(ct.begin(), ct.end()) ||
-       bounded_side_2(ct.begin(), ct.end(),q) == CGAL::ON_UNBOUNDED_SIDE)
-      return false;
-
-    return true;
-  }
-
-  Object_handle walk_in_triangulation(const Point& p) const;
-
-}; // PM_point_locator<PM_decorator_,Geometry_>
-
-
-#ifdef CGAL_USING_PPL
-static const char* const pointlocationversion ="point location via pers dicts";
-#else
-static const char* const pointlocationversion ="point location via seg walks";
-#endif
-
-template <typename PMD, typename GEO>
-PM_point_locator<PMD,GEO>::
-PM_point_locator(const Plane_map& P, const Geometry& k) :
-  Base(P,k), CT(*(new Plane_map),k)
-
-{ CGAL_NEF_TRACEN("PM_point_locator construction");
-  CT.clone_skeleton(P,CT_link_to_original(CT,*this));
-  triangulate_CT();
-  minimize_weight_CT();
-  #ifdef CGAL_USING_PPL
-  pPPL = new PMPP_locator(CT,PMPPLT(K));
-  #endif
-
-}
-
-template <typename PMD, typename GEO>
-PM_point_locator<PMD,GEO>::
-~PM_point_locator()
-{ CGAL_NEF_TRACEN("clear_static_point_locator");
-  Vertex_iterator vit, vend = CT.vertices_end();
-  for (vit = CT.vertices_begin(); vit != vend; ++vit) {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<VF_pair>::clear(CT.info(vit));
-    #else
-    CT.info(vit)=boost::any();
-    #endif
-  }
-  Halfedge_iterator eit, eend = CT.halfedges_end();
-  for (eit = CT.halfedges_begin(); eit != eend; ++eit) {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<EF_pair>::clear(CT.info(eit));
-    #else
-    CT.info(eit)=boost::any();
-    #endif
-  }
-  CT.clear();
-  delete &(CT.plane_map());
-  #ifdef CGAL_USING_PPL
-  delete pPPL; pPPL=0;
-  #endif
-}
-
-template <typename PMD, typename GEO>
-typename PM_point_locator<PMD,GEO>::Object_handle
-PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
-{
-  CGAL_NEF_TRACEN("walk in triangulation "<<q);
-
-  Vertex_const_handle v = CT.vertices_begin();
-
-  if(!check_tag(typename Is_extended_kernel<GEO>::value_type()))
-    if(!within_outer_cycle(v,q,typename Is_extended_kernel<Geometry>::value_type()))
-      return Object_handle();
-
-  Halfedge_const_handle e;
-  Point p = CT.point(v);
-  if ( p == q ) return make_object(v);
-  //  Segment s = this->K.construct_segment(p,q);
-  Direction dir = this->K.construct_direction(p,q);
-  object_kind current = VERTEX;
-  while (true) switch ( current ) {
-    case VERTEX:
-      {
-        CGAL_NEF_TRACEN("vertex "<<CT.point(v));
-        if ( CT.point(v) == q )
-          return make_object(v); // stop walking at q
-        bool collinear;
-        Halfedge_const_handle e_out = CT.out_wedge(v,dir,collinear);
-        if (collinear) // ray shoot via e_out
-        { e = e_out; current = EDGE_COLLINEAR; }
-        else  // ray shoot in wedge left of e_out
-        { e = CT.twin(CT.next(e_out)); current = EDGE_CROSSING; }
-      }
-
-      break;
-    case EDGE_CROSSING:
-      { CGAL_NEF_TRACEN("crossing edge "<<CT.segment(e));
-        if ( !(this->K.orientation(CT.segment(e),q) > 0) ) // q not left of e
-          return make_object(e);
-        Vertex_const_handle v_cand = CT.target(CT.next(e));
-        int orientation_ = this->K.orientation(p,q,CT.point(v_cand));
-        switch( orientation_ ) {
-          case 0:  // collinear
-            if ( this->K.strictly_ordered_along_line(p,q,CT.point(v_cand)) )
-              return make_object(e);
-            v = v_cand; current = VERTEX; break;
-          case +1: // left_turn
-            e = twin(next(e)); current = EDGE_CROSSING; break;
-          case -1:
-            e = twin(previous(e)); current = EDGE_CROSSING; break;
-        }
-      }
-
-      break;
-    case EDGE_COLLINEAR:
-      { CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
-        if ( this->K.strictly_ordered_along_line(
-               CT.point(CT.source(e)),q,CT.point(CT.target(e))) )
-          return make_object(e);
-        v = CT.target(e); current = VERTEX;
-      }
-
-      break;
-  }
-  return Object_handle(); // never reached warning acceptable
-}
-
-} //namespace CGAL
-
-#endif // CGAL_PM_POINT_LOCATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Polynomial.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Polynomial.h
deleted file mode 100644
index a5e805b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Polynomial.h
+++ /dev/null
@@ -1,1984 +0,0 @@
-// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-//                 Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-
-#ifndef CGAL_NEF_2_POLYNOMIAL_H
-#define CGAL_NEF_2_POLYNOMIAL_H
-
-#include <CGAL/basic.h>
-#include <CGAL/kernel_assertions.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/number_type_basic.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/IO/io.h>
-#include <cstddef>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 3
-#include <CGAL/Nef_2/debug.h>
-#include <vector>
-
-
-
-namespace CGAL {
-
-namespace Nef {
-
-template <class NT> class Polynomial_rep;
-
-// SPECIALIZE_CLASS(NT,int double) START
-// CLASS TEMPLATE NT: 
-template <class NT> class Polynomial;
-// CLASS TEMPLATE int: 
-template <> class Polynomial<int> ;
-// CLASS TEMPLATE double: 
-template <> class Polynomial<double> ;
-// SPECIALIZE_CLASS(NT,int double) END
-
-
-
-/*{\Mtext \headerline{Range template}}*/
-
-
-template <class Forward_iterator>
-typename std::iterator_traits<Forward_iterator>::value_type 
-gcd_of_range(Forward_iterator its, Forward_iterator ite, Unique_factorization_domain_tag)
-/*{\Mfunc calculates the greates common divisor of the
-set of numbers $\{ |*its|, |*++its|, \ldots, |*it| \}$ of type |NT|,
-where |++it == ite| and |NT| is the value type of |Forward_iterator|. 
-\precond there exists a pairwise gcd operation |NT gcd(NT,NT)| and 
-|its!=ite|.}*/
-{ CGAL_assertion(its!=ite);
-  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
-  NT res = *its++;
-  for(; its!=ite; ++its) res = 
-    (*its==0 ? res : CGAL_NTS gcd(res, *its));
-  if (res==0) res = 1;
-  return res;
-}
-
-template <class Forward_iterator>
-typename std::iterator_traits<Forward_iterator>::value_type 
-gcd_of_range(Forward_iterator its, Forward_iterator ite, Integral_domain_without_division_tag)
-/*{\Mfunc calculates the greates common divisor of the
-set of numbers $\{ |*its|, |*++its|, \ldots, |*it| \}$ of type |NT|,
-where |++it == ite| and |NT| is the value type of |Forward_iterator|. 
-\precond |its!=ite|.}*/
-{ CGAL_assertion(its!=ite);
-  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
-  NT res = *its++;
-  for(; its!=ite; ++its) res = 
-    (*its==0 ? res : 1);
-  if (res==0) res = 1;
-  return res;
-}
-
-template <class Forward_iterator>
-typename std::iterator_traits<Forward_iterator>::value_type 
-gcd_of_range(Forward_iterator its, Forward_iterator ite)
-{
-    
-  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
-  typedef CGAL::Algebraic_structure_traits<NT> AST;
-  return gcd_of_range(its,ite,typename AST::Algebraic_category());
-}
-
-
-template <class NT>  inline Polynomial<NT>
-  operator - (const Polynomial<NT>&);
-template <class NT>  Polynomial<NT>
-  operator + (const Polynomial<NT>&, const Polynomial<NT>&);
-template <class NT>  Polynomial<NT>
-  operator - (const Polynomial<NT>&, const Polynomial<NT>&);
-template <class NT>  Polynomial<NT>
-  operator * (const Polynomial<NT>&, const Polynomial<NT>&);
-template <class NT> inline Polynomial<NT>
-  operator / (const Polynomial<NT>&, const Polynomial<NT>&);
-template <class NT> inline Polynomial<NT>
-  operator % (const Polynomial<NT>&, const Polynomial<NT>&);
-
-template<class NT> CGAL::Sign 
-  sign(const Polynomial<NT>& p);
-
-template <class NT> double 
-  to_double(const Polynomial<NT>& p) ;
-template <class NT> bool 
-  is_valid(const Polynomial<NT>& p) ;
-template <class NT> bool 
-  is_finite(const Polynomial<NT>& p) ;
-
-template<class NT>  
-  std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p);
-template <class NT>  
-  std::istream& operator >> (std::istream& is, Polynomial<NT>& p);
-
-
-  // lefthand side
-template<class NT> inline Polynomial<NT> operator + 
-  (const NT& num, const Polynomial<NT>& p2);
-template<class NT> inline Polynomial<NT> operator - 
-  (const NT& num, const Polynomial<NT>& p2);
-template<class NT> inline Polynomial<NT> operator * 
-  (const NT& num, const Polynomial<NT>& p2);
-template<class NT> inline Polynomial<NT> operator / 
-  (const NT& num, const Polynomial<NT>& p2);
-template<class NT> inline Polynomial<NT> operator % 
-  (const NT& num, const Polynomial<NT>& p2);
-
-  // righthand side
-template<class NT> inline Polynomial<NT> operator + 
-  (const Polynomial<NT>& p1, const NT& num);
-template<class NT> inline Polynomial<NT> operator - 
-  (const Polynomial<NT>& p1, const NT& num);
-template<class NT> inline Polynomial<NT> operator * 
-  (const Polynomial<NT>& p1, const NT& num);
-template<class NT> inline Polynomial<NT> operator / 
-  (const Polynomial<NT>& p1, const NT& num);
-template<class NT> inline Polynomial<NT> operator % 
-  (const Polynomial<NT>& p1, const NT& num);
-
-
-  // lefthand side
-template<class NT> inline bool operator ==  
-  (const NT& num, const Polynomial<NT>& p);
-template<class NT> inline bool operator != 
-  (const NT& num, const Polynomial<NT>& p);
-template<class NT> inline bool operator <  
-  (const NT& num, const Polynomial<NT>& p);
-template<class NT> inline bool operator <=  
-  (const NT& num, const Polynomial<NT>& p);
-template<class NT> inline bool operator >  
-  (const NT& num, const Polynomial<NT>& p);
-template<class NT> inline bool operator >=  
-  (const NT& num, const Polynomial<NT>& p);
-
-  // righthand side
-template<class NT> inline bool operator ==
-  (const Polynomial<NT>& p, const NT& num);
-template<class NT> inline bool operator !=
-  (const Polynomial<NT>& p, const NT& num);
-template<class NT> inline bool operator < 
-  (const Polynomial<NT>& p, const NT& num);
-template<class NT> inline bool operator <= 
-  (const Polynomial<NT>& p, const NT& num);
-template<class NT> inline bool operator > 
-  (const Polynomial<NT>& p, const NT& num);
-template<class NT> inline bool operator >=
-  (const Polynomial<NT>& p, const NT& num);
-
-
-
-template <class pNT> class Polynomial_rep { 
-  typedef pNT NT;
-
-  typedef std::vector<NT> Vector;
-
-
-  typedef typename Vector::size_type      size_type;
-  typedef typename Vector::iterator       iterator;
-  typedef typename Vector::const_iterator const_iterator;
-  Vector coeff;
-
-  Polynomial_rep() : coeff(0) {}
-  Polynomial_rep(const NT& n) : coeff(1) { coeff[0]=n; }
-  Polynomial_rep(const NT& n, const NT& m) : coeff(2)
-    { coeff[0]=n; coeff[1]=m; }
-  Polynomial_rep(const NT& a, const NT& b, const NT& c) : coeff(3)
-    { coeff[0]=a; coeff[1]=b; coeff[2]=c; }
-  Polynomial_rep(size_type s) : coeff(s,NT(0)) {}
-
-
-  template <class Forward_iterator>
-  Polynomial_rep(std::pair<Forward_iterator,Forward_iterator> poly) 
-    : coeff(poly.first,poly.second) {}
-
-
-  void reduce() 
-  { while ( coeff.size()>1 && coeff.back()==NT(0) ) coeff.pop_back(); }
-
-  friend class Polynomial<pNT>;
-  friend class Polynomial<int>;
-  friend class Polynomial<double>;
-  friend std::istream& operator >> <> (std::istream&, Polynomial<NT>&);
-
-};
-
-// SPECIALIZE_CLASS(NT,int double) START
-// CLASS TEMPLATE NT: 
-/*{\Msubst 
-typename iterator_traits<Forward_iterator>::value_type#NT
-<>#
-}*/
-
-/*{\Manpage{Polynomial}{NT}{Polynomials in one variable}{p}}*/
-
-template <class pNT> class Polynomial : 
-  public Handle_for< Polynomial_rep<pNT> >
-{
-/*  {\Mdefinition An instance |\Mvar| of the data type |\Mname| represents
-  a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |NT[x]|. 
-  The data type offers standard ring operations and a sign operation which 
-  determines the sign for the limit process $x \rightarrow \infty$. 
-
-  |NT[x]| becomes a unique factorization domain, if the number type
-  |NT| is either a field type (1) or a unique factorization domain
-  (2). In both cases there's a polynomial division operation defined.}
-*/
-
-  /*{\Mtypes 5}*/
-  public:
-  typedef pNT NT;
-  
-  typedef Handle_for< Polynomial_rep<NT> > Base;
-  typedef Polynomial_rep<NT> Rep;
-  typedef typename Rep::Vector    Vector;
-  typedef typename Rep::size_type size_type;
-  typedef typename Rep::iterator  iterator;
-
-  typedef typename Rep::const_iterator const_iterator;
-  /*{\Mtypemember a random access iterator for read-only access to the
-  coefficient vector.}*/
-
-  //protected:
-  void reduce() { this->ptr()->reduce(); }
-  Vector& coeffs() { return this->ptr()->coeff; }
-  const Vector& coeffs() const { return this->ptr()->coeff; }
-  Polynomial(size_type s) : Base( Polynomial_rep<NT>(s) ) {}
-  // creates a polynomial of degree s-1
-
-
-  /*{\Mcreation 3}*/
-  public:
-
-  Polynomial()
-  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| of undefined
-  value. }*/
-    : Base( Polynomial_rep<NT>() ) {}
-   
-  Polynomial(const NT& a0)
-  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the constant polynomial $a_0$.}*/
-    : Base(Polynomial_rep<NT>(a0)) { reduce(); }
-
-  Polynomial(NT a0, NT a1) 
-  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x$. }*/
-    : Base(Polynomial_rep<NT>(a0,a1)) { reduce(); }
-
-  Polynomial(const NT& a0, const NT& a1,const NT& a2)
-  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
-    : Base(Polynomial_rep<NT>(a0,a1,a2)) { reduce(); }
-
-  template <class Forward_iterator>
-  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
-  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial whose coefficients are determined by the iterator range,
-  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
-  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
-  \ldots a_d x^d$.}*/
-    : Base(Polynomial_rep<NT>(poly)) { reduce(); }
-
-
-  // KILL double START
-  Polynomial(double n) : Base(Polynomial_rep<NT>(NT(n))) { reduce(); }
-  Polynomial(double n1, double n2) 
-    : Base(Polynomial_rep<NT>(NT(n1),NT(n2))) { reduce(); }
-  // KILL double END
-
-  // KILL int START
-  Polynomial(int n) : Base(Polynomial_rep<NT>(NT(n))) { reduce(); }
-  Polynomial(int n1, int n2)
-    : Base(Polynomial_rep<NT>(NT(n1),NT(n2))) { reduce(); }
-  // KILL int END
-
-  Polynomial(const Polynomial<NT>& p) : Base(p) {}
-
-  //protected: // accessing coefficients internally:
-  NT& coeff(unsigned int i) 
-  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
-    return this->ptr()->coeff[i]; 
-  }
-  public:
-
-  /*{\Moperations 3 3 }*/
-  const_iterator begin() const { return this->ptr()->coeff.begin(); }
-  /*{\Mop a random access iterator pointing to $a_0$.}*/
-  const_iterator end()   const { return this->ptr()->coeff.end(); }
-  /*{\Mop a random access iterator pointing beyond $a_d$.}*/
-
-  int degree() const 
-  { return  static_cast<int>(this->ptr()->coeff.size())-1; } 
-  /*{\Mop the degree of the polynomial.}*/
-
-  const NT& operator[](unsigned int i) const 
-  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
-    return this->ptr()->coeff[i]; }
-  //{\Marrop the coefficient $a_i$ of the polynomial.}
-
-  NT operator()(unsigned int i) const
-  { 
-    if(i<(this->ptr()->coeff.size()))
-      return this->ptr()->coeff[i];
-    return 0;
-  }
-
-  NT eval_at(const NT& r) const
-  /*{\Mop evaluates the polynomial at |r|.}*/
-  { CGAL_assertion( degree()>=0 );
-    NT res = this->ptr()->coeff[0], x = r;
-    for(int i=1; i<=degree(); ++i) 
-    { res += this->ptr()->coeff[i]*x; x*=r; }
-    return res; 
-  }
-
-  CGAL::Sign sign() const
-  /*{\Mop returns the sign of the limit process for $x \rightarrow \infty$
-  (the sign of the leading coefficient).}*/
-  { const NT& leading_coeff = this->ptr()->coeff.back();
-    if (degree() < 0) return CGAL::ZERO;
-    if (leading_coeff < NT(0)) return (CGAL::NEGATIVE);
-    if (leading_coeff > NT(0)) return (CGAL::POSITIVE);
-    return CGAL::ZERO;
-  }
-
-  bool is_zero() const
-  /*{\Mop returns true iff |\Mvar| is the zero polynomial.}*/
-  { return degree()==0 && this->ptr()->coeff[0]==NT(0); }
-
-  Polynomial<NT> abs() const
-  /*{\Mop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
-  otherwise.}*/
-  { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; }
-
-
-  NT content() const
-  /*{\Mop returns the content of |\Mvar| (the gcd of its coefficients).}*/
-  { CGAL_assertion( degree()>=0 );
-    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
-  }
-
-
-  /*{\Mtext Additionally |\Mname| offers standard arithmetic ring
-  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
-  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
-  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
-  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
-  
-   friend Polynomial<NT>
-   operator - <>  (const Polynomial<NT>&);
-                          
-  friend Polynomial<NT>
-    operator + <> (const Polynomial<NT>&, const Polynomial<NT>&);
-
-  friend Polynomial<NT>
-    operator - <> (const Polynomial<NT>&, const Polynomial<NT>&);
-
-  friend Polynomial<NT>
-    operator * <> (const Polynomial<NT>&, const Polynomial<NT>&);
-
-  friend 
-  Polynomial<NT>  operator / <> 
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2);
-  
-  /*{\Mbinopfunc implements polynomial division of |p1| and |p2|. if
-  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
-  does not exist in |NT[x]|.  The correct division algorithm is chosen
-  according to a number type traits class.
-  If |Number_type_traits<NT>::Has_gcd == Tag_true| then the division is
-  done by \emph{pseudo division} based on a |gcd| operation of |NT|.  If
-  |Number_type_traits<NT>::Has_gcd == Tag_false| then the division is done
-  by \emph{euclidean division} based on the division operation of the
-  field |NT|.
-
-  \textbf{Note} that |NT=int| quickly leads to overflow
-  errors when using this operation.}*/
-
-  /*{\Mtext \headerline{Static member functions}}*/
-
-  static Polynomial<NT> gcd
-    (const Polynomial<NT>& p1, const Polynomial<NT>& p2);
-  /*{\Mstatic returns the greatest common divisor of |p1| and |p2|.
-  \textbf{Note} that |NT=int| quickly leads to overflow errors when
-  using this operation.  \precond Requires |NT| to be a unique
-  factorization domain, i.e. to provide a |gcd| operation.}*/
-
-  static void pseudo_div
-    (const Polynomial<NT>& f, const Polynomial<NT>& g, 
-     Polynomial<NT>& q, Polynomial<NT>& r, NT& D);
-  /*{\Mstatic implements division with remainder on polynomials of 
-  the ring |NT[x]|: $D*f = g*q + r$.  \precond |NT| is a unique
-  factorization domain, i.e., there exists a |gcd| operation and an
-  integral division operation on |NT|.}*/
-
-  static void euclidean_div 
-    (const Polynomial<NT>& f, const Polynomial<NT>& g, 
-     Polynomial<NT>& q, Polynomial<NT>& r);
-  /*{\Mstatic implements division with remainder on polynomials of 
-  the ring |NT[x]|: $f = g*q + r$.  \precond |NT| is a field, i.e.,
-  there exists a division operation on |NT|.  }*/
-
-  friend double to_double <> (const Polynomial<NT>& p);
-
-
-  Polynomial<NT>& operator += (const Polynomial<NT>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) += p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<NT>& operator -= (const Polynomial<NT>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<NT>& operator *= (const Polynomial<NT>& p1)
-  { (*this)=(*this)*p1; return (*this); }
-
-  Polynomial<NT>& operator /= (const Polynomial<NT>& p1)
-  { (*this)=(*this)/p1; return (*this); }
-
-  Polynomial<NT>& operator %= (const Polynomial<NT>& p1)
-  { (*this)=(*this)%p1; return (*this); }
-
-
-  //------------------------------------------------------------------
-  // SPECIALIZE_MEMBERS(int double) START
-    
-  Polynomial<NT>& operator += (const NT& num)
-  { this->copy_on_write();
-    coeff(0) += (NT)num; return *this; }
-
-  Polynomial<NT>& operator -= (const NT& num)
-  { this->copy_on_write();
-    coeff(0) -= (NT)num; return *this; }
-
-  Polynomial<NT>& operator *= (const NT& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator /= (const NT& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator %= (const NT& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
-    reduce(); return *this; }
-
-// SPECIALIZING_MEMBERS FOR const int& 
-    
-  Polynomial<NT>& operator += (const int& num)
-  { this->copy_on_write();
-    coeff(0) += (NT)num; return *this; }
-
-  Polynomial<NT>& operator -= (const int& num)
-  { this->copy_on_write();
-    coeff(0) -= (NT)num; return *this; }
-
-  Polynomial<NT>& operator *= (const int& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator /= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator %= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
-    reduce(); return *this; }
-
-// SPECIALIZING_MEMBERS FOR const double& 
-    
-  Polynomial<NT>& operator += (const double& num)
-  { this->copy_on_write();
-    coeff(0) += (NT)num; return *this; }
-
-  Polynomial<NT>& operator -= (const double& num)
-  { this->copy_on_write();
-    coeff(0) -= (NT)num; return *this; }
-
-  Polynomial<NT>& operator *= (const double& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator /= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
-    reduce(); return *this; }
-
-  Polynomial<NT>& operator %= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
-    reduce(); return *this; }
-
-  // SPECIALIZE_MEMBERS(int double) END
-  //------------------------------------------------------------------
-
-  void minus_offsetmult(const Polynomial<NT>& p, const NT& b, int k)
-  { CGAL_assertion(!this->is_shared());
-    Polynomial<NT> s(size_type(p.degree()+k+1)); // zero entries
-    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
-    operator-=(s);
-  }
-
-};
-
-/*{\Mimplementation This data type is implemented as an item type
-via a smart pointer scheme. The coefficients are stored in a vector of
-|NT| entries.  The simple arithmetic operations $+,-$ take time
-$O(d*T(NT))$, multiplication is quadratic in the maximal degree of the
-arguments times $T(NT)$, where $T(NT)$ is the time for a corresponding
-operation on two instances of the ring type.}*/
-
-//############ POLYNOMIAL< INT > ###################################
-// CLASS TEMPLATE int: 
-/*{\Xsubst 
- iterator_traits<Forward_iterator>::value_type#int
-<>#
-}*/
-
-/*{\Xanpage{Polynomial}{int}{Polynomials in one variable}{p}}*/
-
-template <>
-class Polynomial<int> : 
-  public Handle_for< Polynomial_rep<int> >
-{
-/*{\Xdefinition An instance |\Mvar| of the data type |\Mname| represents
- a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |int[x]|. 
- The data type offers standard ring operations and a sign operation which 
- determines the sign for the limit process $x \rightarrow \infty$. 
-
- |int[x]| becomes a unique factorization domain, if the number type
- |int| is either a field type (1) or a unique factorization domain
- (2). In both cases there's a polynomial division operation defined.}*/
-
-  /*{\Xtypes 5}*/
-  public:
-  typedef int NT;
-  /*{\Xtypemember the component type representing the coefficients.}*/
-
-  typedef Handle_for< Polynomial_rep<int> > Base;
-  typedef Polynomial_rep<int> Rep;
-  typedef  Rep::Vector    Vector;
-  typedef  Rep::size_type size_type;
-  typedef  Rep::iterator  iterator;
-
-  typedef  Rep::const_iterator const_iterator;
-  /*{\Xtypemember a random access iterator for read-only access to the
-  coefficient vector.}*/
-
-  //protected:
-  void reduce() { this->ptr()->reduce(); }
-  Vector& coeffs() { return this->ptr()->coeff; }
-  const Vector& coeffs() const { return this->ptr()->coeff; }
-  Polynomial(size_type s) : Base( Polynomial_rep<int>(s) ) {}
-  // creates a polynomial of degree s-1
-
-
-  /*{\Xcreation 3}*/
-  public:
-
-  Polynomial()
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| of undefined
-  value. }*/
-    : Base( Polynomial_rep<int>() ) {}
-   
-  Polynomial(const int& a0)
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the constant polynomial $a_0$.}*/
-    : Base(Polynomial_rep<int>(a0)) { reduce(); }
-
-
-  Polynomial(int a0, int a1) 
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x$. }*/
-    : Base(Polynomial_rep<int>(a0,a1)) { reduce(); }
-
-  Polynomial(const int& a0, const int& a1,const int& a2)
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
-    : Base(Polynomial_rep<int>(a0,a1,a2)) { reduce(); }
-
-
-  template <class Forward_iterator>
-  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial whose coefficients are determined by the iterator range,
-  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
-  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
-  \ldots a_d x^d$.}*/
-    : Base(Polynomial_rep<int>(poly)) { reduce(); }
-
-
-
-  // KILL double START
-  Polynomial(double n) : Base(Polynomial_rep<int>(int(n))) { reduce(); }
-  Polynomial(double n1, double n2) 
-    : Base(Polynomial_rep<int>(int(n1),int(n2))) { reduce(); }
-  // KILL double END
-
-  Polynomial(const Polynomial<int>& p) : Base(p) {}
-
-  //protected: // accessing coefficients internally:
-  int& coeff(unsigned int i) 
-  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
-    return this->ptr()->coeff[i]; 
-  }
-  public:
-
-  /*{\Xoperations 3 3 }*/
-  const_iterator begin() const { return this->ptr()->coeff.begin(); }
-  /*{\Xop a random access iterator pointing to $a_0$.}*/
-  const_iterator end()   const { return this->ptr()->coeff.end(); }
-  /*{\Xop a random access iterator pointing beyond $a_d$.}*/
-
-  int degree() const 
-  { return static_cast<int>(this->ptr()->coeff.size())-1; } 
-  /*{\Xop the degree of the polynomial.}*/
-
-  const int& operator[](unsigned int i) const 
-  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
-    return this->ptr()->coeff[i]; }
-  /*{\Xarrop the coefficient $a_i$ of the polynomial.}*/
-
-  int eval_at(const int& r) const
-  /*{\Xop evaluates the polynomial at |r|.}*/
-  { CGAL_assertion( degree()>=0 );
-    int res = this->ptr()->coeff[0], x = r;
-    for(int i=1; i<=degree(); ++i) 
-    { res += this->ptr()->coeff[i]*x; x*=r; }
-    return res; 
-  }
-
-  CGAL::Sign sign() const
-  /*{\Xop returns the sign of the limit process for $x \rightarrow \infty$
-  (the sign of the leading coefficient).}*/
-  { const int& leading_coeff = this->ptr()->coeff.back();
-    if (leading_coeff < int(0)) return (CGAL::NEGATIVE);
-    if (leading_coeff > int(0)) return (CGAL::POSITIVE);
-    return CGAL::ZERO;
-  }
-
-  bool is_zero() const
-  /*{\Xop returns true iff |\Mvar| is the zero polynomial.}*/
-  { return degree()==0 && this->ptr()->coeff[0]==int(0); }
-
-  Polynomial<int> abs() const
-  /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
-  otherwise.}*/
-  { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; }
-
-  int content() const
-  /*{\Xop returns the content of |\Mvar| (the gcd of its coefficients).
-  \precond Requires |int| to provide a |gcd| operation.}*/
-  { CGAL_assertion( degree()>=0 );
-    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
-  }
-
-  /*{\Xtext Additionally |\Mname| offers standard arithmetic ring
-  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
-  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
-  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
-  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
-
-                          
-  friend Polynomial<int>
-    operator + <> (const Polynomial<int>&, const Polynomial<int>&);
-
-  friend Polynomial<int>
-    operator - <> (const Polynomial<int>&, const Polynomial<int>&);
-
-  friend Polynomial<int>
-    operator * <> (const Polynomial<int>&, const Polynomial<int>&);
-
-  friend 
-  Polynomial<int>  operator / <> 
-  (const Polynomial<int>& p1, const Polynomial<int>& p2);
-  /*{\Xbinopfunc implements polynomial division of |p1| and |p2|. if
-  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
-  does not exist in |int[x]|.  The correct division algorithm is chosen
-  according to a number type traits class.
-  If |Number_type_traits<int>::Has_gcd == Tag_true| then the division is
-  done by \emph{pseudo division} based on a |gcd| operation of |int|.  If
-  |Number_type_traits<int>::Has_gcd == Tag_false| then the division is done
-  by \emph{euclidean division} based on the division operation of the
-  field |int|.
-
-  \textbf{Note} that |int=int| quickly leads to overflow
-  errors when using this operation.}*/
-
-  /*{\Xtext \headerline{Static member functions}}*/
-
-  CGAL_EXPORT static Polynomial<int> gcd
-    (const Polynomial<int>& p1, const Polynomial<int>& p2);
-  /*{\Xstatic returns the greatest common divisor of |p1| and |p2|.
-  \textbf{Note} that |int=int| quickly leads to overflow errors when
-  using this operation.  \precond Requires |int| to be a unique
-  factorization domain, i.e. to provide a |gcd| operation.}*/
-
-  CGAL_EXPORT static void pseudo_div
-    (const Polynomial<int>& f, const Polynomial<int>& g, 
-     Polynomial<int>& q, Polynomial<int>& r, int& D);
-  /*{\Xstatic implements division with remainder on polynomials of 
-  the ring |int[x]|: $D*f = g*q + r$.  \precond |int| is a unique
-  factorization domain, i.e., there exists a |gcd| operation and an
-  integral division operation on |int|.}*/
-
-  CGAL_EXPORT static void euclidean_div 
-    (const Polynomial<int>& f, const Polynomial<int>& g, 
-     Polynomial<int>& q, Polynomial<int>& r);
-  /*{\Xstatic implements division with remainder on polynomials of 
-  the ring |int[x]|: $f = g*q + r$.  \precond |int| is a field, i.e.,
-  there exists a division operation on |int|.  }*/
-
-  friend double to_double <> (const Polynomial<int>& p);
-
-
-  Polynomial<int>& operator += (const Polynomial<int>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) += p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<int>& operator -= (const Polynomial<int>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<int>& operator *= (const Polynomial<int>& p1)
-  { (*this)=(*this)*p1; return (*this); }
-
-  Polynomial<int>& operator /= (const Polynomial<int>& p1)
-  { (*this)=(*this)/p1; return (*this); }
-
-  Polynomial<int>& operator %= (const Polynomial<int>& p1)
-  { (*this)=(*this)%p1; return (*this); }
-
-
-  //------------------------------------------------------------------
-  // SPECIALIZE_MEMBERS(int double) START
-    
-  Polynomial<int>& operator += (const int& num)
-  { this->copy_on_write();
-    coeff(0) += (int)num; return *this; }
-
-  Polynomial<int>& operator -= (const int& num)
-  { this->copy_on_write();
-    coeff(0) -= (int)num; return *this; }
-
-  Polynomial<int>& operator *= (const int& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (int)num; 
-    reduce(); return *this; }
-
-  Polynomial<int>& operator /= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (int)num; 
-    reduce(); return *this; }
-
-  Polynomial<int>& operator %= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (int)num; 
-    reduce(); return *this; }
-
-// SPECIALIZING_MEMBERS FOR const double& 
-    
-  Polynomial<int>& operator += (const double& num)
-  { this->copy_on_write();
-    coeff(0) += (int)num; return *this; }
-
-  Polynomial<int>& operator -= (const double& num)
-  { this->copy_on_write();
-    coeff(0) -= (int)num; return *this; }
-
-  Polynomial<int>& operator *= (const double& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (int)num; 
-    reduce(); return *this; }
-
-  Polynomial<int>& operator /= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (int)num; 
-    reduce(); return *this; }
-
-  Polynomial<int>& operator %= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (int)num; 
-    reduce(); return *this; }
-
-  // SPECIALIZE_MEMBERS(int double) END
-  //------------------------------------------------------------------
-
-  void minus_offsetmult(const Polynomial<int>& p, const int& b, int k)
-  { CGAL_assertion(!is_shared());
-    Polynomial<int> s(size_type(p.degree()+k+1)); // zero entries
-    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
-    operator-=(s);
-  }
-
-};
-
-/*{\Ximplementation This data type is implemented as an item type
-via a smart pointer scheme. The coefficients are stored in a vector of
-|int| entries.  The simple arithmetic operations $+,-$ take time
-$O(d*T(int))$, multiplication is quadratic in the maximal degree of the
-arguments times $T(int)$, where $T(int)$ is the time for a corresponding
-operation on two instances of the ring type.}*/
-
-
-//############ POLYNOMIAL< INT > ###################################
-
-//############ POLYNOMIAL< DOUBLE > ################################
-
-
-// CLASS TEMPLATE double: 
-/*{\Xsubst 
- iterator_traits<Forward_iterator>::value_type#double
-<>#
-}*/
-
-/*{\Xanpage{Polynomial}{double}{Polynomials in one variable}{p}}*/
-
-template <>
-class Polynomial<double> : 
-  public Handle_for< Polynomial_rep<double> >
-{
-/*{\Xdefinition An instance |\Mvar| of the data type |\Mname| represents
-a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |double[x]|. 
-The data type offers standard ring operations and a sign operation which 
-determines the sign for the limit process $x \rightarrow \infty$. 
-
-|double[x]| becomes a unique factorization domain, if the number type
-|double| is either a field type (1) or a unique factorization domain
-(2). In both cases there's a polynomial division operation defined.}*/
-
-  /*{\Xtypes 5}*/
-  public:
-  typedef double NT;
-  /*{\Xtypemember the component type representing the coefficients.}*/
-
-  typedef Handle_for< Polynomial_rep<double> > Base;
-  typedef Polynomial_rep<double> Rep;
-  typedef  Rep::Vector    Vector;
-  typedef  Rep::size_type size_type;
-  typedef  Rep::iterator  iterator;
-
-  typedef  Rep::const_iterator const_iterator;
-  /*{\Xtypemember a random access iterator for read-only access to the
-  coefficient vector.}*/
-
-  //protected:
-  void reduce() { this->ptr()->reduce(); }
-  Vector& coeffs() { return this->ptr()->coeff; }
-  const Vector& coeffs() const { return this->ptr()->coeff; }
-  Polynomial(size_type s) : Base( Polynomial_rep<double>(s) ) {}
-  // creates a polynomial of degree s-1
-
-
-  /*{\Xcreation 3}*/
-  public:
-
-  Polynomial()
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| of undefined
-  value. }*/
-    : Base( Polynomial_rep<double>() ) {}
-   
-  Polynomial(const double& a0)
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the constant polynomial $a_0$.}*/
-    : Base(Polynomial_rep<double>(a0)) { reduce(); }
-
-  Polynomial(const double a0, const double a1)
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x$. }*/
-    : Base(Polynomial_rep<double>(a0,a1)) { reduce(); }
-
-  Polynomial(const double& a0, const double& a1,const double& a2)
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
-    : Base(Polynomial_rep<double>(a0,a1,a2)) { reduce(); }
-
-  template <class Forward_iterator>
-  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
-  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
-  the polynomial whose coefficients are determined by the iterator range,
-  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
-  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
-  \ldots a_d x^d$.}*/
-    : Base(Polynomial_rep<double>(poly)) { reduce(); }
-
-
-
-  // KILL int START
-  Polynomial(int n) : Base(Polynomial_rep<double>(double(n))) { reduce(); }
-  Polynomial(int n1, int n2)
-    : Base(Polynomial_rep<double>(double(n1),double(n2))) { reduce(); }
-  // KILL int END
-
-  Polynomial(const Polynomial<double>& p) : Base(p) {}
-
-  //protected: // accessing coefficients internally:
-  double& coeff(unsigned int i) 
-  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
-    return this->ptr()->coeff[i]; 
-  }
-  public:
-
-  /*{\Xoperations 3 3 }*/
-  const_iterator begin() const { return this->ptr()->coeff.begin(); }
-  /*{\Xop a random access iterator pointing to $a_0$.}*/
-  const_iterator end()   const { return this->ptr()->coeff.end(); }
-  /*{\Xop a random access iterator pointing beyond $a_d$.}*/
-
-  int degree() const 
-  { return static_cast<int>(this->ptr()->coeff.size())-1; } 
-  /*{\Xop the degree of the polynomial.}*/
-
-  const double& operator[](unsigned int i) const 
-  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
-    return this->ptr()->coeff[i]; }
-  /*{\Xarrop the coefficient $a_i$ of the polynomial.}*/
-
-  double eval_at(const double& r) const
-  /*{\Xop evaluates the polynomial at |r|.}*/
-  { CGAL_assertion( degree()>=0 );
-    double res = this->ptr()->coeff[0], x = r;
-    for(int i=1; i<=degree(); ++i) 
-    { res += this->ptr()->coeff[i]*x; x*=r; }
-    return res; 
-  }
-
-  CGAL::Sign sign() const
-  /*{\Xop returns the sign of the limit process for $x \rightarrow \infty$
-  (the sign of the leading coefficient).}*/
-  { const double& leading_coeff = this->ptr()->coeff.back();
-    if (leading_coeff < double(0)) return (CGAL::NEGATIVE);
-    if (leading_coeff > double(0)) return (CGAL::POSITIVE);
-    return CGAL::ZERO;
-  }
-
-  bool is_zero() const
-  /*{\Xop returns true iff |\Mvar| is the zero polynomial.}*/
-  { return degree()==0 && this->ptr()->coeff[0]==double(0); }
-
-  Polynomial<double> abs() const
-  /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
-  otherwise.}*/
-  { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; }
-
-
-  double content() const
-  /*{\Xop returns the content of |\Mvar| (the gcd of its coefficients).
-  \precond Requires |double| to provide a |gdc| operation.}*/
-  { CGAL_assertion( degree()>=0 );
-    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
-  }
- 
-
-  /*{\Xtext Additionally |\Mname| offers standard arithmetic ring
-  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
-  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
-  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
-  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
-                     
-  friend Polynomial<double>
-    operator + <> (const Polynomial<double>&, const Polynomial<double>&);
-
-  friend Polynomial<double>
-    operator - <> (const Polynomial<double>&, const Polynomial<double>&);
-
-  friend Polynomial<double>
-    operator * <> (const Polynomial<double>&, const Polynomial<double>&);
-
-  friend 
-  Polynomial<double>  operator / <> 
-  (const Polynomial<double>& p1, const Polynomial<double>& p2);
-  /*{\Xbinopfunc implements polynomial division of |p1| and |p2|. if
-  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
-  does not exist in |double[x]|.  The correct division algorithm is chosen
-  according to the number type traits class.
-  If |Number_type_traits<double>::Has_gcd == Tag_true| then the division is
-  done by \emph{pseudo division} based on a |gcd| operation of |double|.  If
-  |Number_type_traits<double>::Has_gcd == Tag_false| then the division is done
-  by \emph{euclidean division} based on the division operation of the
-  field |double|.
-
-  \textbf{Note} that |double=int| quickly leads to overflow
-  errors when using this operation.}*/
-
-  /*{\Xtext \headerline{Static member functions}}*/
-
-  CGAL_EXPORT static Polynomial<double> gcd
-    (const Polynomial<double>& p1, const Polynomial<double>& p2);
-  /*{\Xstatic returns the greatest common divisor of |p1| and |p2|.
-  \textbf{Note} that |double=int| quickly leads to overflow errors when
-  using this operation.  \precond Requires |double| to be a unique
-  factorization domain, i.e. to provide a |gdc| operation.}*/
-
-  CGAL_EXPORT static void pseudo_div
-    (const Polynomial<double>& f, const Polynomial<double>& g, 
-     Polynomial<double>& q, Polynomial<double>& r, double& D);
-  /*{\Xstatic implements division with remainder on polynomials of 
-  the ring |double[x]|: $D*f = g*q + r$.  \precond |double| is a unique
-  factorization domain, i.e., there exists a |gcd| operation and an
-  integral division operation on |double|.}*/
-
-  CGAL_EXPORT static void euclidean_div 
-    (const Polynomial<double>& f, const Polynomial<double>& g, 
-     Polynomial<double>& q, Polynomial<double>& r);
-  /*{\Xstatic implements division with remainder on polynomials of 
-  the ring |double[x]|: $f = g*q + r$.  \precond |double| is a field, i.e.,
-  there exists a division operation on |double|.  }*/
-
-  friend double to_double <> (const Polynomial<double>& p);
-
-
-  Polynomial<double>& operator += (const Polynomial<double>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) += p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<double>& operator -= (const Polynomial<double>& p1)
-  { this->copy_on_write();
-    int d = (std::min)(degree(),p1.degree()), i;
-    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
-    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
-    reduce(); return (*this); }
-
-  Polynomial<double>& operator *= (const Polynomial<double>& p1)
-  { (*this)=(*this)*p1; return (*this); }
-
-  Polynomial<double>& operator /= (const Polynomial<double>& p1)
-  { (*this)=(*this)/p1; return (*this); }
-
-  Polynomial<double>& operator %= (const Polynomial<double>& p1)
-  { (*this)=(*this)%p1; return (*this); }
-
-
-  //------------------------------------------------------------------
-  // SPECIALIZE_MEMBERS(int double) START
-    
-  Polynomial<double>& operator += (const double& num)
-  { this->copy_on_write();
-    coeff(0) += (double)num; return *this; }
-
-  Polynomial<double>& operator -= (const double& num)
-  { this->copy_on_write();
-    coeff(0) -= (double)num; return *this; }
-
-  Polynomial<double>& operator *= (const double& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (double)num; 
-    reduce(); return *this; }
-
-  Polynomial<double>& operator /= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (double)num; 
-    reduce(); return *this; }
-
-/*
-  Polynomial<double>& operator %= (const double& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (double)num; 
-    reduce(); return *this; }
-*/
-
-// SPECIALIZING_MEMBERS FOR const int& 
-    
-  Polynomial<double>& operator += (const int& num)
-  { this->copy_on_write();
-    coeff(0) += (double)num; return *this; }
-
-  Polynomial<double>& operator -= (const int& num)
-  { this->copy_on_write();
-    coeff(0) -= (double)num; return *this; }
-
-  Polynomial<double>& operator *= (const int& num)
-  { this->copy_on_write();
-    for(int i=0; i<=degree(); ++i) coeff(i) *= (double)num; 
-    reduce(); return *this; }
-
-  Polynomial<double>& operator /= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) /= (double)num; 
-    reduce(); return *this; }
-
-/*
-  Polynomial<double>& operator %= (const int& num)
-  { this->copy_on_write(); CGAL_assertion(num!=0);
-    for(int i=0; i<=degree(); ++i) coeff(i) %= (double)num; 
-    reduce(); return *this; }
-*/
-
-  // SPECIALIZE_MEMBERS(int double) END
-  //------------------------------------------------------------------
-
-  void minus_offsetmult(const Polynomial<double>& p, const double& b, int k)
-  { CGAL_assertion(!this->is_shared());
-    Polynomial<double> s(size_type(p.degree()+k+1)); // zero entries
-    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
-    operator-=(s);
-  }
-
-};
-
-/*{\Ximplementation This data type is implemented as an item type
-via a smart pointer scheme. The coefficients are stored in a vector of
-|double| entries.  The simple arithmetic operations $+,-$ take time
-$O(d*T(double))$, multiplication is quadratic in the maximal degree of the
-arguments times $T(double)$, where $T(double)$ is the time for a corresponding
-operation on two instances of the ring type.}*/
-
-
-//############ POLYNOMIAL< DOUBLE > ################################
-
-
-
-// SPECIALIZE_CLASS(NT,int double) END
-
-template <class NT> double to_double 
-  (const Polynomial<NT>&) 
-  { return 0; }
-
-template <class NT> bool is_valid 
-  (const Polynomial<NT>& p) 
-  { return (CGAL::is_valid(p[0])); }
-
-template <class NT> bool is_finite 
-  (const Polynomial<NT>& p) 
-  { return CGAL::is_finite(p[0]); }
-
-template <class NT> 
-inline
-Polynomial<NT> operator - (const Polynomial<NT>& p)
-{
-  CGAL_assertion(p.degree()>=0);
-  Polynomial<NT> res(std::make_pair(p.coeffs().begin(),p.coeffs().end())); 
-  typename Polynomial<NT>::iterator it, ite=res.coeffs().end();
-  for(it=res.coeffs().begin(); it!=ite; ++it) *it = -*it;
-  return res;
-}
-
-
-
-template <class NT> 
-Polynomial<NT> operator + (const Polynomial<NT>& p1, 
-                            const Polynomial<NT>& p2)
-{ 
-  typedef typename Polynomial<NT>::size_type size_type;
-  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
-  bool p1d_smaller_p2d = p1.degree() < p2.degree();
-  int min,max,i;
-  if (p1d_smaller_p2d) { min = p1.degree(); max = p2.degree(); }
-  else                 { max = p1.degree(); min = p2.degree(); }
-  Polynomial<NT>  p( size_type(max + 1));
-  for (i = 0; i <= min; ++i ) p.coeff(i) = p1[i]+p2[i];
-  if (p1d_smaller_p2d)  for (; i <= max; ++i ) p.coeff(i)=p2[i];
-  else /* p1d >= p2d */ for (; i <= max; ++i ) p.coeff(i)=p1[i];
-  p.reduce();
-  return p;
-}
-
-template <class NT> 
-Polynomial<NT> operator - (const Polynomial<NT>& p1, 
-                            const Polynomial<NT>& p2)
-{ 
-  typedef typename Polynomial<NT>::size_type size_type;
-  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
-  bool p1d_smaller_p2d = p1.degree() < p2.degree();
-  int min,max,i;
-  if (p1d_smaller_p2d) { min = p1.degree(); max = p2.degree(); }
-  else                 { max = p1.degree(); min = p2.degree(); }
-  Polynomial<NT>  p( size_type(max+1) );
-  for (i = 0; i <= min; ++i ) p.coeff(i)=p1[i]-p2[i];
-  if (p1d_smaller_p2d)  for (; i <= max; ++i ) p.coeff(i)= -p2[i];
-  else /* p1d >= p2d */ for (; i <= max; ++i ) p.coeff(i)=  p1[i];
-  p.reduce();
-  return p;
-}
-
-template <class NT> 
-Polynomial<NT> operator * (const Polynomial<NT>& p1, 
-                            const Polynomial<NT>& p2)
-{
-  typedef typename Polynomial<NT>::size_type size_type;
-  if (p1.degree()<0 || p2.degree()<0) return p1;
-  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
-  Polynomial<NT>  p( size_type(p1.degree()+p2.degree()+1) ); 
-  // initialized with zeros
-  for (int i=0; i <= p1.degree(); ++i)
-    for (int j=0; j <= p2.degree(); ++j)
-      p.coeff(i+j) += (p1[i]*p2[j]); 
-  p.reduce();
-  return p;
-}
-
-template <class NT> inline
-Polynomial<NT> operator / (const Polynomial<NT>& p1, 
-                           const Polynomial<NT>& p2)
-{ 
-    typedef Algebraic_structure_traits<NT> AST;
-    return divop(p1,p2, typename AST::Algebraic_category());
-}
-
-
-template <class NT> inline
-Polynomial<NT> operator % (const Polynomial<NT>& p1,
-			   const Polynomial<NT>& p2)
-{ 
-    typedef Algebraic_structure_traits<NT> AST;
-    return modop(p1,p2, typename AST::Algebraic_category());
-}
-
-
-template <class NT> 
-Polynomial<NT> divop (const Polynomial<NT>& p1, 
-                      const Polynomial<NT>& p2,
-                      Integral_domain_without_division_tag)
-{ CGAL_assertion(!p2.is_zero());
-  if (p1.is_zero()) {
-	return 0;
-  }
-  Polynomial<NT> q;
-  Polynomial<NT> r;
-  Polynomial<NT>::euclidean_div(p1,p2,q,r);
-  CGAL_postcondition( (p2*q+r==p1) );
-  return q;
-}
-
-
-template <class NT> 
-Polynomial<NT> divop (const Polynomial<NT>& p1, 
-                      const Polynomial<NT>& p2,
-                      Unique_factorization_domain_tag)
-{ CGAL_assertion(!p2.is_zero());
-  if (p1.is_zero()) return 0;
-  Polynomial<NT> q,r; NT D; 
-  Polynomial<NT>::pseudo_div(p1,p2,q,r,D); 
-  CGAL_postcondition( (p2*q+r==p1*Polynomial<NT>(D)) );
-  return q/=D;
-}
-
-
-template <class NT> 
-Polynomial<NT> modop (const Polynomial<NT>& p1, 
-                      const Polynomial<NT>& p2,
-                      Integral_domain_without_division_tag)
-{ CGAL_assertion(!p2.is_zero());
-  if (p1.is_zero()) return 0;
-  Polynomial<NT> q,r;
-  Polynomial<NT>::euclidean_div(p1,p2,q,r);
-  CGAL_postcondition( (p2*q+r==p1) );
-  return r;
-}
-
-
-template <class NT> 
-Polynomial<NT> modop (const Polynomial<NT>& p1, 
-                      const Polynomial<NT>& p2,
-                      Unique_factorization_domain_tag)
-{ CGAL_assertion(!p2.is_zero());
-  if (p1.is_zero()) return 0;
-  Polynomial<NT> q,r; NT D; 
-  Polynomial<NT>::pseudo_div(p1,p2,q,r,D); 
-  CGAL_postcondition( (p2*q+r==p1*Polynomial<NT>(D)) );
-  return q/=D;
-}
-
-
-template <class NT> 
-inline Polynomial<NT> 
-gcd(const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-{ return Polynomial<NT>::gcd(p1,p2); }
-
-
-template <class NT> bool operator == 
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() == CGAL::ZERO ); }    
-
-template <class NT> bool operator != 
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() != CGAL::ZERO ); }    
-
-template <class NT> bool operator <  
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() == CGAL::NEGATIVE ); }    
-
-template <class NT> bool operator <= 
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() != CGAL::POSITIVE ); }    
-
-template <class NT> bool operator >  
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() == CGAL::POSITIVE ); }    
-
-template <class NT> bool operator >= 
-  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-  { return ( (p1-p2).sign() != CGAL::NEGATIVE ); }    
-
-template <class NT> CGAL::Sign 
-  sign(const Polynomial<NT>& p)
-  { return p.sign(); }
-
-//------------------------------------------------------------------
-// SPECIALIZE_FUNCTION(NT,int double) START
-// SPECIALIZING inline to :
-
-  // lefthand side
-  inline    Polynomial<int> operator + 
-  (const int& num, const Polynomial<int>& p2)
-  { return (Polynomial<int>(num) + p2); }
-  inline    Polynomial<int> operator - 
-  (const int& num, const Polynomial<int>& p2)
-  { return (Polynomial<int>(num) - p2); }
-  inline    Polynomial<int> operator * 
-  (const int& num, const Polynomial<int>& p2)
-  { return (Polynomial<int>(num) * p2); }
-  inline    Polynomial<int> operator / 
-  (const int& num, const Polynomial<int>& p2)
-  { return (Polynomial<int>(num)/p2); }
-  inline    Polynomial<int> operator % 
-  (const int& num, const Polynomial<int>& p2)
-  { return (Polynomial<int>(num)%p2); }
-
-  // righthand side
-  inline    Polynomial<int> operator + 
-  (const Polynomial<int>& p1, const int& num)
-  { return (p1 + Polynomial<int>(num)); }
-  inline    Polynomial<int> operator - 
-  (const Polynomial<int>& p1, const int& num)
-  { return (p1 - Polynomial<int>(num)); }
-  inline    Polynomial<int> operator * 
-  (const Polynomial<int>& p1, const int& num)
-  { return (p1 * Polynomial<int>(num)); }
-  inline    Polynomial<int> operator / 
-  (const Polynomial<int>& p1, const int& num)
-  { return (p1 / Polynomial<int>(num)); }
-  inline    Polynomial<int> operator % 
-  (const Polynomial<int>& p1, const int& num)
-  { return (p1 % Polynomial<int>(num)); }
-
-  // lefthand side
-  inline    bool operator ==  
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() == CGAL::ZERO );}
-  inline    bool operator != 
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() != CGAL::ZERO );}
-  inline    bool operator <  
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() == CGAL::NEGATIVE );}
-  inline    bool operator <=  
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() != CGAL::POSITIVE );}
-  inline    bool operator >  
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() == CGAL::POSITIVE );}
-  inline    bool operator >=  
-  (const int& num, const Polynomial<int>& p) 
-  { return ( (Polynomial<int>(num)-p).sign() != CGAL::NEGATIVE );}
-
-  // righthand side
-  inline    bool operator ==
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() == CGAL::ZERO );}
-  inline    bool operator !=
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() != CGAL::ZERO );}
-  inline    bool operator < 
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() == CGAL::NEGATIVE );}
-  inline    bool operator <= 
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() != CGAL::POSITIVE );}
-  inline    bool operator > 
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() == CGAL::POSITIVE );}
-  inline    bool operator >=
-  (const Polynomial<int>& p, const int& num) 
-  { return ( (p-Polynomial<int>(num)).sign() != CGAL::NEGATIVE );}
-
-// SPECIALIZING pure int params:
-
-  // lefthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const int& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) + p2); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const int& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) - p2); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const int& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) * p2); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const int& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)/p2); }
-  template <class NT>    Polynomial<NT> operator % 
-  (const int& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)%p2); }
-
-  // righthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const Polynomial<NT>& p1, const int& num)
-  { return (p1 + Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const Polynomial<NT>& p1, const int& num)
-  { return (p1 - Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const Polynomial<NT>& p1, const int& num)
-  { return (p1 * Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const Polynomial<NT>& p1, const int& num)
-  { return (p1 / Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator % 
-  (const Polynomial<NT>& p1, const int& num)
-  { return (p1 % Polynomial<NT>(num)); }
-
-  // lefthand side
-  template <class NT>    bool operator ==  
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator != 
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator <  
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <=  
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator >  
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=  
-  (const int& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
-
-  // righthand side
-  template <class NT>    bool operator ==
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator !=
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator < 
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <= 
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator > 
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=
-  (const Polynomial<NT>& p, const int& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
-
-// SPECIALIZING inline to :
-
-  // lefthand side
-  inline    Polynomial<double> operator + 
-  (const double& num, const Polynomial<double>& p2)
-  { return (Polynomial<double>(num) + p2); }
-  inline    Polynomial<double> operator - 
-  (const double& num, const Polynomial<double>& p2)
-  { return (Polynomial<double>(num) - p2); }
-  inline    Polynomial<double> operator * 
-  (const double& num, const Polynomial<double>& p2)
-  { return (Polynomial<double>(num) * p2); }
-  inline    Polynomial<double> operator / 
-  (const double& num, const Polynomial<double>& p2)
-  { return (Polynomial<double>(num)/p2); }
-  inline    Polynomial<double> operator %
-  (const double& num, const Polynomial<double>& p2)
-  { return (Polynomial<double>(num)%p2); }
-
-  // righthand side
-  inline    Polynomial<double> operator + 
-  (const Polynomial<double>& p1, const double& num)
-  { return (p1 + Polynomial<double>(num)); }
-  inline    Polynomial<double> operator - 
-  (const Polynomial<double>& p1, const double& num)
-  { return (p1 - Polynomial<double>(num)); }
-  inline    Polynomial<double> operator * 
-  (const Polynomial<double>& p1, const double& num)
-  { return (p1 * Polynomial<double>(num)); }
-  inline    Polynomial<double> operator / 
-  (const Polynomial<double>& p1, const double& num)
-  { return (p1 / Polynomial<double>(num)); }
-  inline    Polynomial<double> operator % 
-  (const Polynomial<double>& p1, const double& num)
-  { return (p1 % Polynomial<double>(num)); }
-
-  // lefthand side
-  inline    bool operator ==  
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() == CGAL::ZERO );}
-  inline    bool operator != 
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() != CGAL::ZERO );}
-  inline    bool operator <  
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() == CGAL::NEGATIVE );}
-  inline    bool operator <=  
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() != CGAL::POSITIVE );}
-  inline    bool operator >  
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() == CGAL::POSITIVE );}
-  inline    bool operator >=  
-  (const double& num, const Polynomial<double>& p) 
-  { return ( (Polynomial<double>(num)-p).sign() != CGAL::NEGATIVE );}
-
-  // righthand side
-  inline    bool operator ==
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() == CGAL::ZERO );}
-  inline    bool operator !=
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() != CGAL::ZERO );}
-  inline    bool operator < 
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() == CGAL::NEGATIVE );}
-  inline    bool operator <= 
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() != CGAL::POSITIVE );}
-  inline    bool operator > 
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() == CGAL::POSITIVE );}
-  inline    bool operator >=
-  (const Polynomial<double>& p, const double& num) 
-  { return ( (p-Polynomial<double>(num)).sign() != CGAL::NEGATIVE );}
-
-// SPECIALIZING pure double params:
-
-  // lefthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const double& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) + p2); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const double& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) - p2); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const double& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) * p2); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const double& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)/p2); }
-  template <class NT>    Polynomial<NT> operator % 
-  (const double& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)%p2); }
-
-  // righthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const Polynomial<NT>& p1, const double& num)
-  { return (p1 + Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const Polynomial<NT>& p1, const double& num)
-  { return (p1 - Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const Polynomial<NT>& p1, const double& num)
-  { return (p1 * Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const Polynomial<NT>& p1, const double& num)
-  { return (p1 / Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator % 
-  (const Polynomial<NT>& p1, const double& num)
-  { return (p1 % Polynomial<NT>(num)); }
-
-
-  // lefthand side
-  template <class NT>    bool operator ==  
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator != 
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator <  
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <=  
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator >  
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=  
-  (const double& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
-
-  // righthand side
-  template <class NT>    bool operator ==
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator !=
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator < 
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <= 
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator > 
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=
-  (const Polynomial<NT>& p, const double& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
-
-// SPECIALIZE_FUNCTION ORIGINAL
-
-  // lefthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const NT& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) + p2); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const NT& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) - p2); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const NT& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num) * p2); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const NT& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)/p2); }
-  template <class NT>    Polynomial<NT> operator % 
-  (const NT& num, const Polynomial<NT>& p2)
-  { return (Polynomial<NT>(num)%p2); }
-
-  // righthand side
-  template <class NT>    Polynomial<NT> operator + 
-  (const Polynomial<NT>& p1, const NT& num)
-  { return (p1 + Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator - 
-  (const Polynomial<NT>& p1, const NT& num)
-  { return (p1 - Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator * 
-  (const Polynomial<NT>& p1, const NT& num)
-  { return (p1 * Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator / 
-  (const Polynomial<NT>& p1, const NT& num)
-  { return (p1 / Polynomial<NT>(num)); }
-  template <class NT>    Polynomial<NT> operator %
-  (const Polynomial<NT>& p1, const NT& num)
-  { return (p1 % Polynomial<NT>(num)); }
-
-
-  // lefthand side
-  template <class NT>    bool operator ==  
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator != 
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator <  
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <=  
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator >  
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=  
-  (const NT& num, const Polynomial<NT>& p) 
-  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
-
-  // righthand side
-  template <class NT>    bool operator ==
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
-  template <class NT>    bool operator !=
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
-  template <class NT>    bool operator < 
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
-  template <class NT>    bool operator <= 
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
-  template <class NT>    bool operator > 
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
-  template <class NT>    bool operator >=
-  (const Polynomial<NT>& p, const NT& num) 
-  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
-
-// SPECIALIZE_FUNCTION(NT,int double) END
-//------------------------------------------------------------------
-
-
-template <class NT> 
-void print_monomial(std::ostream& os, const NT& n, int i)
-{
-  if (i==0) os << n;
-  if (i==1) os << n << "R";
-  if (i>1)  os << n << "R^" << i;
-}
-
-// I/O 
-template <class NT>
-std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p)
-{
-  int i;
-  switch( os.iword(CGAL::IO::mode) )
-  {
-    case CGAL::IO::ASCII :
-      os << p.degree() << ' ';
-      for(i=0; i<=p.degree(); ++i) 
-        os << p[i] << ' ';
-      break;
-    case CGAL::IO::BINARY :
-      CGAL::write(os, p.degree());
-      for( i=0; i <= p.degree(); ++i) 
-        CGAL::write(os, p[i]);
-      break;
-  default: // i.e. PRETTY
-      os << "Polynomial(" << p.degree() << ", ";
-      for( i=0; i <= p.degree(); ++i) {
-          os << p[i];
-          if (i < p.degree())
-              os << ", ";
-      }
-      os << ")";
-      // Alternative pretty format
-      //print_monomial(os,p[p.degree()],p.degree());
-      //for(i=p.degree()-1; i>=0; --i) {
-      //  if (p[i]!=NT(0)) { os << " + "; print_monomial(os,p[i],i); }
-      //}
-      break;
-  }
-  return os;
-}
-
-template <class NT>
-std::istream& operator >> (std::istream& is, Polynomial<NT>& p) { 
-    int  i,d;
-    char ch;
-    NT   c;
-    bool pretty = false;
-    switch( is.iword(CGAL::IO::mode) ) { 
-    case CGAL::IO::ASCII : 
-    case CGAL::IO::PRETTY : 
-        is >> ch;
-        if ( ch == 'P') {
-            pretty = true;
-            // Parse rest of "olynomial("
-            const char buffer[11] = "olynomial(";
-            const char* p = buffer;
-            is >> ch;
-            while ( is && *p != '\0' && *p == ch) {
-                is >> ch;
-                ++p;
-            }
-            if ( *p != '\0')
-                is.clear( std::ios::badbit);
-            if ( ! is)
-                return is;
-	    is.putback(ch);
-        } else {
-	    is.putback(ch);
-        }
-        is >> d;
-        if ( pretty) {
-            is >> ch;
-            if ( ch != ',') {
-                is.clear( std::ios::badbit);
-                return is;
-            }
-        }
-        if (d < 0) {
-            if ( pretty) {
-                is >> ch;
-                if ( ch != ')') {
-                    is.clear( std::ios::badbit);
-                    return is;
-                }
-            }
-            if ( is)
-                p = Polynomial<NT>();
-        } else {
-            typename Polynomial<NT>::Vector coeffs(d+1);
-            for( i = 0; i <= d; ++i) {
-                is >> coeffs[i];
-                if ( pretty && i < d) {
-                    is >> ch;
-                    if ( ch != ',') {
-                        is.clear( std::ios::badbit);
-                        return is;
-                    }
-                }
-            }
-            if ( pretty) {
-                is >> ch;
-                if ( ch != ')') {
-                    is.clear( std::ios::badbit);
-                    return is;
-                }
-            }
-            if ( is)
-                p = Polynomial<NT>(std::make_pair( coeffs.begin(),
-                                                   coeffs.end()));
-        }
-        break;
-    case CGAL::IO::BINARY :
-        CGAL::read(is, d);
-        if (d < 0)
-            p = Polynomial<NT>();
-        else {
-            typename Polynomial<NT>::Vector coeffs(d+1);
-            for(i=0; i<=d; ++i) {
-                CGAL::read(is,c);
-                coeffs[i]=c;
-            }
-            p = Polynomial<NT>(std::make_pair( coeffs.begin(), coeffs.end()));
-        }
-        break;
-    }
-    return is;
-}
-
-// SPECIALIZE_FUNCTION ORIGINAL
-template <class NT> 
-void Polynomial<NT>::euclidean_div(
-  const Polynomial<NT>& f, const Polynomial<NT>& g,
-  Polynomial<NT>& q, Polynomial<NT>& r)
-{
-  r = f; 
-  r.copy_on_write();
-  int rd = r.degree();
-  int gd = g.degree(), qd;
-  if ( rd < gd ) { 
-    q = Polynomial<NT>(NT(0)); 
-  } else { 
-    qd = rd - gd + 1;
-    q = Polynomial<NT>(std::size_t(qd)); 
-  }
-  while ( rd >= gd && !(r.is_zero())) {
-    NT S = r[rd] / g[gd];
-    qd = rd-gd;
-    q.coeff(qd) += S;
-    r.minus_offsetmult(g,S,qd);
-    rd = r.degree();
-  }
-  CGAL_postcondition( f==q*g+r );
-}
-
-
-template <class NT> 
-void Polynomial<NT>::pseudo_div(
-  const Polynomial<NT>& f, const Polynomial<NT>& g, 
-  Polynomial<NT>& q, Polynomial<NT>& r, NT& D)
-{
-  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
-  int fd=f.degree(), gd=g.degree();
-  if ( fd<gd ) 
-  { q = Polynomial<NT>(0); r = f; D = 1; 
-    CGAL_postcondition(Polynomial<NT>(D)*f==q*g+r); return; 
-  }
-  // now we know fd >= gd and f>=g
-  int qd=fd-gd, delta=qd+1, rd=fd;
-  { q = Polynomial<NT>( std::size_t(delta) ); }; // workaround for SunPRO
-  NT G = g[gd]; // highest order coeff of g
-  D = G; while (--delta) D*=G; // D = G^delta
-  Polynomial<NT> res = Polynomial<NT>(D)*f;
-  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
-  while (qd >= 0) {
-    NT F = res[rd]; // highest order coeff of res
-    NT t = F/G;     // ensured to be integer by multiplication of D
-    q.coeff(qd) = t;    // store q coeff
-    res.minus_offsetmult(g,t,qd); 
-    if (res.is_zero()) break;
-    rd = res.degree();
-    qd = rd - gd;
-  }
-  r = res;
-  CGAL_postcondition(Polynomial<NT>(D)*f==q*g+r);
-  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
-}
-
-
-template <class NT> 
-Polynomial<NT> Polynomial<NT>::gcd(
-  const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
-  if ( p1.is_zero() ) {
-    if ( p2.is_zero() ) return Polynomial<NT>(NT(1));
-    else return p2.abs();
-  }
-  if ( p2.is_zero() )
-    return p1.abs();
-
-  Polynomial<NT> f1 = p1.abs();
-  Polynomial<NT> f2 = p2.abs();
-  NT f1c = f1.content(), f2c = f2.content();
-  f1 /= f1c; f2 /= f2c;
-  NT F = CGAL_NTS gcd(f1c,f2c);
-  Polynomial<NT> q,r; NT M=1,D;
-  bool first = true;
-  while ( ! f2.is_zero() ) { 
-    Polynomial<NT>::pseudo_div(f1,f2,q,r,D);
-    if (!first) M*=D;
-    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
-    r /= r.content();
-    f1=f2; f2=r;
-    first=false;
-  }
-  CGAL_NEF_TRACEV(f1.content());
-  return Polynomial<NT>(F)*f1.abs();
-}
-
-
-// SPECIALIZE_IMPLEMENTATION(NT,int double) END
-
-} // namespace Nef
-
-
-using Nef::to_double;
-using Nef::sign;
-using Nef::is_finite;
-using Nef::is_valid;
-using Nef::gcd;
-
-} //namespace CGAL
-
-
-
-
-
-
-
-
-
-#endif  // CGAL_NEF_2_POLYNOMIAL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/iterator_tools.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_2/iterator_tools.h
deleted file mode 100644
index eb5f2a5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/iterator_tools.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-#ifndef CGAL_ITERATORTOOLS_H
-#define CGAL_ITERATORTOOLS_H
-
-#include <CGAL/basic.h>
-#include <CGAL/circulator.h>
-
-namespace CGAL {
-
-template <typename Iter, typename Move> 
-class CircFromIt : public Iter {
-    // Ptr  node;    // The internal node ptr inherited from It.
-    typedef CircFromIt<Iter,Move> Self;
-public:
-    typedef typename Iter::iterator_category Icategory;
-    typedef I_Circulator_from_iterator_traits<Icategory> CTraits;
-    typedef typename CTraits::iterator_category iterator_category;
-
-    CircFromIt() : Iter(0) {}
-    CircFromIt(Iter i) : Iter(i) {}
-
-// OPERATIONS Forward Category
-// ---------------------------
-
-    bool operator==( Nullptr_t CGAL_assertion_code(p) ) const {
-      CGAL_assertion( p == NULL );
-      return Iter::operator==( Iter(NULL) );
-    }
-    bool operator!=( Nullptr_t p ) const {
-      return !(*this == p);
-    }
-    bool operator==( const Self& i ) const {
-      return Iter::operator==(i);
-    }
-    bool operator!=( const Self& i) const {
-        return !(*this == i);
-    }
-
-    Self& operator++() {
-      Move move;
-      move.forward(*this);
-      return *this;
-    }
-    Self  operator++(int) {
-      CircFromIt tmp = *this;
-      ++*this;
-      return tmp;
-    }
-
-// OPERATIONS Bidirectional Category
-// ---------------------------------
-
-    Self& operator--() {
-      Move move;
-      move.backward(*this);
-      return *this;
-    }
-    Self  operator--(int) {
-      CircFromIt tmp = *this;
-      --*this;
-      return tmp;
-    }
-
-};
-
-template <typename Iter, typename Pnt> 
-class PntItFromVertIt : public Iter {
-public:
-  typedef PntItFromVertIt<Iter,Pnt> Self;
-  typedef Iter Base;
-  typedef Pnt  value_type;
-  typedef const Pnt* pointer;
-  typedef const Pnt& reference;
-
-  PntItFromVertIt() : Base() {}
-  PntItFromVertIt(Iter it) : Base(it) {}
-  PntItFromVertIt(const Self& it) : Base(it) {}
-
-  reference operator*() const 
-  { return Base::operator*().point(); }
-  pointer operator->() const 
-  { return &(operator*()); }
-  Self& operator++() { return (Self&)Base::operator++(); }
-  Self operator++(int) { Self tmp=*this; ++*this; return tmp; }
-
-};
-
-template <class H>
-std::string PH(H h)
-{ if (h == H()) return "nil"; return h->debug(); }
-
-} //namespace CGAL
-#endif // CGAL_ITERATORTOOLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Pluecker_line_3.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Pluecker_line_3.h
deleted file mode 100644
index b80beff..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Pluecker_line_3.h
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
-//                 Miguel Granados <granados at mpi-sb.mpg.de>
-//                 Susan Hert      <hert at mpi-sb.mpg.de>
-//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
-#ifndef CGAL_PLUECKER_LINE_3_H
-#define CGAL_PLUECKER_LINE_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Homogeneous.h>
-#include <algorithm>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 61
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-/*{\Manpage{Pluecker_line_3}{R}{Straight lines in 3-space}{pl}}*/  
-
-/*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a
-directed straight line in the three-dimensional plane. Its
-representation is based on Pluecker coordinates. (For a treatment see
-the book on projected oriented geometry of Stolfi.)}*/
-
-template <typename Tag, typename R> class Pluecker_line_3;
-
-template <typename R_>
-class Pluecker_line_3<Homogeneous_tag,R_> {
-
-/*{\Mtypes 6}*/
-typedef R_ R;
-/*{\Mtypemember the standard kernel type.}*/
-typedef typename R::RT RT;
-/*{\Mtypemember the ring type.}*/
-typedef typename R::Point_3 Point_3;
-/*{\Mtypemember the point type of the standard kernel.}*/
-typedef typename R::Line_3  Line_3;
-/*{\Mtypemember the line type of the standard kernel.}*/
-/*{\Mtypemember iterator over Pluecker coefficients.}*/
-typedef Pluecker_line_3<Homogeneous_tag,R> Self;
-// typedef Infimaximal_box<typename Is_extended_kernel<R>::value_type, R> Infi_box;
-// typedef typename Infi_box::NT NT;
-typedef const RT* const_iterator;
-
-RT c_[6];
-
-public:
-/*{\Mcreation 3}*/     
-Pluecker_line_3() {}
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to some line.}*/
-
-Pluecker_line_3(const Line_3& l)
-  /*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to |l|.}*/
-{
-  Point_3 p(l.point(0)), q(l.point(1));
-  c_[0] = p.hx()*q.hy() - p.hy()*q.hx();
-  c_[1] = p.hx()*q.hz() - p.hz()*q.hx();
-  c_[2] = p.hy()*q.hz() - p.hz()*q.hy();
-  c_[3] = p.hx()*q.hw() - p.hw()*q.hx();
-  c_[4] = p.hy()*q.hw() - p.hw()*q.hy();
-  c_[5] = p.hz()*q.hw() - p.hw()*q.hz();
-}
-
-Pluecker_line_3(const Point_3& p, const Point_3& q)
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to the oriented line through |p| and |q|.}*/
-{
-  c_[0] = p.hx()*q.hy() - p.hy()*q.hx();
-  c_[1] = p.hx()*q.hz() - p.hz()*q.hx();
-  c_[2] = p.hy()*q.hz() - p.hz()*q.hy();
-  c_[3] = p.hx()*q.hw() - p.hw()*q.hx();
-  c_[4] = p.hy()*q.hw() - p.hw()*q.hy();
-  c_[5] = p.hz()*q.hw() - p.hw()*q.hz();
-
-}
-
-template <typename Forward_iterator>
-Pluecker_line_3(Forward_iterator s, Forward_iterator e) 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to line with the parameters |tuple [s,e)|.}*/
-{ int i=0;
-  while (s!=e && i<6) c_[i++] = *s;
-  CGAL_assertion(i==6);
-}
-
-/*{\Moperations 4 2 }*/
-
-const_iterator begin() const { return c_; }
-/*{\Mop returns an iterator pointing to the first
-Pluecker coefficient.}*/                                                   
-const_iterator end() const { return c_+6; }
-/*{\Mop returns an iterator pointing beyond the last
-Pluecker coefficient.}*/                                                   
-
-Pluecker_line_3(const Self& l) 
-{ std::copy(l.begin(),l.end(),c_); }
-
-Self& operator=(const Self& l) 
-{ if (&l!=this) std::copy(l.begin(),l.end(),c_); 
-  return *this; }
-
-const RT& operator[](unsigned i) const
-/*{\Marrop returns constant access to the $i$th Pluecker coefficient.}*/    
-{ CGAL_assertion(i<6); return c_[i]; }
-
-int sign() const
-/*{\Mop returns the sign of the first nonzero Pluecker coefficient
-within the ordered tuple of coefficients.}*/
-{ for (unsigned i=0; i<6; ++i) 
-    if (c_[i]!=RT(0)) return CGAL_NTS sign(c_[i]); 
- CGAL_error_msg("Pluecker line 0 0 0 0 0 0 shouldn't appear!!!"); 
-  return CGAL_NTS sign(c_[5]); 
-}
-
-void normalize()
-//{\Mop reduces the Pluecker coefficients to a minimal 
-//representation. This is done by dividing all Pluecker 
-//coefficients by their common gcd.}
-{ 
-  CGAL_NEF_TRACEN("normalize");
-  int i=0;
-  while(i<6 && c_[i]==0)
-    i++;
-    
-  if(i>5)
-    return;
-
-  RT D = c_[i];
-  CGAL_assertion(D!=0);
-
-  for(++i; i<6; ++i) 
-    D = (c_[i]==0 ? D : CGAL_NTS gcd(D, c_[i]));
-  if (D==0) return;
-  CGAL_NEF_TRACEN("gcd" << D);
-  for(int i=0; i<6; ++i) c_[i]/=D;
-}
-
-void negate()
-/*{\Mop negates all Pluecker coefficients.}*/
-{ for(int i=0; i<6; ++i) c_[i] = -c_[i]; }
-
-Self opposite() const
-/*{\Mop returns the line opposite to |\Mvar|. }*/
-{ Self res;
-  std::negate<RT> N;
-  std::transform(begin(), end(), res.c_, N);
-  return res;
-}
-
-static int cmp(const Self& l1,
-               const Self& l2)
-/*{\Mstatic returns the lexicographic order on lines defined
-on their Pluecker coefficient tuples.}*/
-{ for (unsigned i=0; i<5; ++i) {
-    typename R::RT diff = l1[i]-l2[i];
-    if ( diff != typename R::RT(0) ) return CGAL_NTS sign(diff);
-  }
-  return CGAL_NTS sign(l1[5]-l2[5]);
-}
-
-}; // Pluecker_line_3
-
-
-template <typename R_>
-class Pluecker_line_3<Cartesian_tag,R_> {
-
-/*{\Mtypes 6}*/
-typedef R_ R;
-/*{\Mtypemember the standard kernel type.}*/
-typedef typename R::FT FT;
-/*{\Mtypemember the ring type.}*/
-typedef typename R::Point_3 Point_3;
-/*{\Mtypemember the point type of the standard kernel.}*/
-typedef typename R::Line_3  Line_3;
-/*{\Mtypemember the line type of the standard kernel.}*/
-/*{\Mtypemember iterator over Pluecker coefficients.}*/
-typedef Pluecker_line_3<Cartesian_tag,R> Self;
-// typedef Infimaximal_box<typename Is_extended_kernel<R>::value_type, R> Infi_box;
-// typedef typename Infi_box::NT NT;
-typedef const FT* const_iterator;
-
-FT c_[6];
-
-public:
-/*{\Mcreation 3}*/     
-Pluecker_line_3() {}
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to some line.}*/
-
-Pluecker_line_3(const Line_3& l)
-  /*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to |l|.}*/
-{
-  Point_3 p(l.point(0)), q(l.point(1));
-  c_[0] = p.x()*q.y() - p.y()*q.x();
-  c_[1] = p.x()*q.z() - p.z()*q.x();
-  c_[2] = p.y()*q.z() - p.z()*q.y();
-  c_[3] = p.x() - q.x();
-  c_[4] = p.y() - q.y();
-  c_[5] = p.z() - q.z();
-}
-
-
-Pluecker_line_3(const Point_3& p, const Point_3& q)
-//{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-// initializes it to the oriented line through |p| and |q|.}
-{
-  c_[0] = p.x()*q.y() - p.y()*q.x();
-  c_[1] = p.x()*q.z() - p.z()*q.x();
-  c_[2] = p.y()*q.z() - p.z()*q.y();
-  c_[3] = p.x() - q.x();
-  c_[4] = p.y() - q.y();
-  c_[5] = p.z() - q.z();
-}
-
-template <typename Forward_iterator>
-Pluecker_line_3(Forward_iterator s, Forward_iterator e) 
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
-initializes it to line with the parameters |tuple [s,e)|.}*/
-{ int i=0;
-  while (s!=e && i<6) c_[i++] = *s;
-  CGAL_assertion(i==6);
-}
-
-/*{\Moperations 4 2 }*/
-
-const_iterator begin() const { return c_; }
-/*{\Mop returns an iterator pointing to the first
-Pluecker coefficient.}*/                                                   
-const_iterator end() const { return c_+6; }
-/*{\Mop returns an iterator pointing beyond the last
-Pluecker coefficient.}*/                                                   
-
-Pluecker_line_3(const Self& l) 
-{ std::copy(l.begin(),l.end(),c_); }
-
-Self& operator=(const Self& l) 
-{ if (&l!=this) std::copy(l.begin(),l.end(),c_); 
-  return *this; }
-
-const FT& operator[](unsigned i) const
-/*{\Marrop returns constant access to the $i$th Pluecker coefficient.}*/    
-{ CGAL_assertion(i<6); return c_[i]; }
-
-int sign() const
-/*{\Mop returns the sign of the first nonzero Pluecker coefficient
-within the ordered tuple of coefficients.}*/
-{ for (unsigned i=0; i<6; ++i) 
-    if (c_[i]!=FT(0)) return CGAL_NTS sign(c_[i]); 
- CGAL_error_msg("Pluecker line 0 0 0 0 0 0 shouldn't appear!!!"); 
-  return CGAL_NTS sign(c_[5]); 
-}
-
-void normalize()
-//{\Mop reduces the Pluecker coefficients to a minimal 
-//representation. This is done by dividing all Pluecker 
-//coefficients by their common gcd.}
-{
-  CGAL_NEF_TRACEN("normalize");
-  int i=0;
-  while(i<6 && c_[i]==FT(0))
-    ++i;
-    
-  if(i>5)
-    return;
-
-  FT D = c_[i];
-  if(D<FT(0)) D=-D;
-  CGAL_assertion(D!=0);
-
-  for(int i=0; i<6; ++i) {
-    c_[i]/=D;
-    //    c_[i].normalize();
-  }
-}
-
-void negate()
-/*{\Mop negates all Pluecker coefficients.}*/
-{ for(int i=0; i<6; ++i) c_[i] = -c_[i]; }
-
-Self opposite() const
-/*{\Mop returns the line opposite to |\Mvar|. }*/
-{ Self res;
-  std::negate<FT> N;
-  std::transform(begin(), end(), res.c_, N);
-  return res;
-}
-
-static int cmp(const Self& l1,
-               const Self& l2)
-/*{\Mstatic returns the lexicographic order on lines defined
-on their Pluecker coefficient tuples.}*/
-{ for (unsigned i=0; i<5; ++i) {
-    typename R::FT diff = l1[i]-l2[i];
-    if ( diff != typename R::FT(0) ) return CGAL_NTS sign(diff);
-  }
-  return CGAL_NTS sign(l1[5]-l2[5]);
-}
-
-}; // Pluecker_line_3
-
-template <typename Tag, typename R>
-std::ostream& operator<<(std::ostream& os, const Pluecker_line_3<Tag,R>& l)
-{ 
-  switch( os.iword(CGAL::IO::mode) ) {
-    case CGAL::IO::ASCII :
-      for (unsigned i=0; i<6; ++i) os << l[i] << " "; 
-      return os; 
-    case CGAL::IO::BINARY :
-      for (unsigned i=0; i<6; ++i) CGAL::write(os, l[i]);
-      return os;
-    default:
-      os << "Pluecker_line_3(";
-      for (unsigned i=0; i<5; ++i) os << l[i] << ", "; 
-      os << l[5] << ")";
-  } return os;
-}
-
-template <typename Tag, typename R>
-Pluecker_line_3<Tag,R> categorize(const Pluecker_line_3<Tag,R>& l, int& inverted)
-{ Pluecker_line_3<Tag,R> res(l);
-  if ( res.sign()<0 ) { res.negate(); inverted=1; }
-  else inverted=-1;
-  res.normalize();
-  CGAL_assertion(res.sign()!=0);
-  return res;
-}
-
-struct Pluecker_line_lt {
-  template <typename Tag, typename R>
-  bool operator()(const CGAL::Pluecker_line_3<Tag,R>& l1,
-                  const CGAL::Pluecker_line_3<Tag,R>& l2) const
-  { return CGAL::Pluecker_line_3<Tag,R>::cmp(l1,l2)<0; }
-};
-
-} //namespace CGAL
-#endif //CGAL_PLUECKER_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_FM_decorator.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_FM_decorator.h
deleted file mode 100644
index c797b24..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_FM_decorator.h
+++ /dev/null
@@ -1,672 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_SNC_FM_DECORATOR_H
-#define CGAL_SNC_FM_DECORATOR_H
-#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <CGAL/Nef_2/geninfo.h>
-#else
-#include <boost/any.hpp>
-#endif
-#include <CGAL/Nef_2/Segment_overlay_traits.h>
-#include <CGAL/Nef_3/SNC_decorator.h>
-#include <CGAL/Lazy_kernel.h>
-#include <list>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 31
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-//--------------------------------------------------------------------------
-/* We introduce a template that is a point that refers to a vertex.
-   We derive from the point type and add the vertex handle */
-
-template <typename P, typename H>
-class Vertex_point : public H {
-  P p_;
-public:
-  Vertex_point() {}
-  Vertex_point(const P& p, H v) : H(v), p_(p) {}
-  Vertex_point(const Vertex_point& vp) : H(vp) { p_=vp.p_; }
-  Vertex_point& operator=(const Vertex_point& vp)
-  { H::operator=(vp); p_=vp.p_; return *this; } 
-  H vertex() const { return *this; }
-  P point() const { return p_; } 
-};
-
-/*
-bool operator==(const Vertex_point& vp1, const Vertex_point& vp2) {
-    return vp1.vertex()==vp2.vertex();
-}
-*/
-
-template <typename P, typename H>
-std::ostream& operator<<(std::ostream& os, const Vertex_point<P,H>& p)
-{ os << p.point(); return os; }
-
-template <typename P, typename H>
-std::ostream& operator<<(std::ostream& os, 
-  const std::pair< Vertex_point<P,H>, Vertex_point<P,H> > & s)
-{ os << s.first << s.second; return os; }
-
-template <typename V, typename SE>
-struct Sort_sedges {
-  bool operator()(SE e1, SE e2) {
-    V v1[2], v2[2];
-    v1[0] = e1->source()->center_vertex();
-    v1[1] = e1->next()->source()->center_vertex();
-    v2[0] = e2->source()->center_vertex();
-    v2[1] = e2->next()->source()->center_vertex();
-    int i1(0), i2(0);
-    if(CGAL::lexicographically_xyz_smaller(v1[1]->point(),v1[0]->point())) i1 = 1;
-    if(CGAL::lexicographically_xyz_smaller(v2[1]->point(),v2[0]->point())) i2 = 1;
-    if(v1[i1] != v2[i2]) return CGAL::lexicographically_xyz_smaller(v1[i1]->point(),v2[i2]->point());
-    if(v1[1-i1] != v2[1-i2]) return CGAL::lexicographically_xyz_smaller(v1[1-i1]->point(),v2[1-i2]->point());
-    return i1<i2;
-  }
-};
-
-template <typename P, typename SE>
-struct Sort_sedges2 {
-  bool operator()(SE e1, SE e2) {
-    P p1[2], p2[2];
-    p1[0] = e1->source()->center_vertex()->point();
-    p1[1] = e1->twin()->source()->twin()->center_vertex()->point();
-    p2[0] = e2->source()->center_vertex()->point();
-    p2[1] = e2->twin()->source()->twin()->center_vertex()->point();
-    int i1(0), i2(0);
-    if(CGAL::lexicographically_xyz_smaller(p1[1],p1[0])) i1 = 1;
-    if(CGAL::lexicographically_xyz_smaller(p2[1],p2[0])) i2 = 1;
-    if(p1[i1] != p2[i2]) return CGAL::lexicographically_xyz_smaller(p1[i1],p2[i2]);
-    if(p1[1-i1] != p2[1-i2]) return CGAL::lexicographically_xyz_smaller(p1[1-i1],p2[1-i2]);
-    return i1<i2;
-  }
-};
-
-
-//--------------------------------------------------------------------------
-/* The following type is an output model for our generic segment
-   sweep module |Segment_overlay_traits|. We use that code to 
-   sweep all sedges of a plane to finally associate facet cycles
-   to facets. Note that we do not use the segment intersection
-   functionality of the code as the sedges only touch in endpoints.
-   There is room for optimization here. */
-//--------------------------------------------------------------------------
-
-template <typename P, typename V, typename E, typename I>
-struct Halffacet_output {
-
-Halffacet_output(CGAL::Unique_hash_map<I,E>& F, std::vector<E>& S) 
-  : From(F), Support(S) { edge_number=0; Support[0]=E(); }
-
-typedef P         Point;
-typedef V         Vertex_handle;
-typedef unsigned  Halfedge_handle;
-
-CGAL::Unique_hash_map<I,E>& From;
-std::vector<E>& Support;
-unsigned edge_number;
-
-Vertex_handle new_vertex(const Point& p) const
-{ 
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  geninfo<unsigned>::create(p.vertex()->info());
-  #else
-  p.vertex()->info()=unsigned();
-  #endif
-  return p.vertex(); }
-
-Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v) 
-{ CGAL_NEF_TRACEN("new_edge "<<&*v<<" "<<edge_number+1);
-  return ++edge_number; }
-
-void supporting_segment(Halfedge_handle e, I it)
-{ if ( From[it] != E() ) Support[e] = From[it]; }
-
-void halfedge_below(Vertex_handle v, Halfedge_handle e)
-{ CGAL_NEF_TRACEN("halfedge_below point "<< v->point() <<": " << e); 
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  geninfo<unsigned>::access(v->info()) = e;
-  #else
-  v->info() = e;
-  #endif
-}
-
-// all empty, no update necessary
-void link_as_target_and_append(Vertex_handle, Halfedge_handle)
-{ /* do nothing */ }
-
-void trivial_segment(Vertex_handle, I) const {}
-void starting_segment(Vertex_handle, I) const {}
-void passing_segment(Vertex_handle, I) const {}
-void ending_segment(Vertex_handle, I) const {}
-
-};
-
-//--------------------------------------------------------------------------
-// the following class is the geometry kernel of the generic sweep
-// module |Segment_overlay_traits|. 
-//--------------------------------------------------------------------------
-
-template <typename Point, typename Plane, typename Handle>
-class Halffacet_geometry { 
-
- public:
-  typedef Point Point_3;
-  typedef Plane Plane_3;
-  typedef Vertex_point<Point,Handle>  Point_2;
-  typedef std::pair<Point_2,Point_2>  Segment_2;
-
- private:
-  // the underlying plane:
-  Plane_3 h;
-
-  Point_3 above(const Point_3& p) const
-  { return p + h.orthogonal_vector(); }
-
- public:
-
-Halffacet_geometry(const Plane_3& hi) : h(hi) {}
-
-Point_2 source(const Segment_2& s) const  { return s.first; }
-Point_2 target(const Segment_2& s) const  { return s.second; }
-
-bool is_degenerate(const Segment_2& s) const { 
-  return source(s).vertex()==target(s).vertex();
-}
-
-Segment_2 construct_segment(const Point_2& p1, const Point_2& p2) const
-{ return Segment_2(p1,p2); }
-
-int orientation(const Point_2& p1, const Point_2& p2, const Point_2& p3) const
-{ return static_cast<int>(
-    CGAL::orientation(p1.point(),p2.point(),p3.point(),above(p1.point()))); }
-
-int orientation(const Segment_2& s, const Point_2& p) const {
-    if(source(s).vertex() == p.vertex() ||
-       target(s).vertex() == p.vertex())
-        return 0;
-    return orientation(source(s),target(s),p); 
-}
-
-int compare_xy(const Point_2& p1, const Point_2& p2) const { 
-    if(p1.vertex()==p2.vertex())
-        return 0;
-    return static_cast<int>(
-        CGAL::compare_xyz(p1.point(),p2.point()));
-}
-
-Point_2 intersection(const Segment_2& s1, const Segment_2& s2) const
-{ CGAL_assertion(target(s1).vertex()==target(s2).vertex()); 
-  return target(s1); }
-
-bool left_turn(const Point_3& p1, const Point_3& p2, const Point_3& p3) const
-{ return CGAL::orientation(p1,p2,p3,above(p1)) == CGAL::POSITIVE; }
-
-}; // Halffacet_geometry
-
-
-template<class Kernel, typename SHalfedge_handle, typename Halffacet_geometry> 
-class SmallerXYZ {
-  
-  typedef typename Kernel::Point_3  Point_3;
-  Halffacet_geometry& G;
- public:
-  SmallerXYZ(Halffacet_geometry& Gin) : G(Gin) {}
-
-  bool operator()(SHalfedge_handle se, SHalfedge_handle min, bool /*init*/) {
-    if(se->twin()->source()->twin()->source() == min->twin()->source()->twin()->source()) {
-      Point_3 p1 = se->source()->source()->point(), 
-	p2 = se->twin()->source()->twin()->source()->point(), 
-	p3 = se->next()->twin()->source()->twin()->source()->point();      
-      return !G.left_turn(p1,p2,p3);
-    }
-    return CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
-					       min->twin()->source()->twin()->source()->point());
-  }
-};
-
-/*
-template<typename SHalfedge_handle, typename EK> 
-class SmallerXYZ<CGAL::Lazy_kernel<EK>, SHalfedge_handle> {
-
-  typedef CGAL::Lazy_kernel<EK> Kernel;
-  typedef typename Kernel::Point_3  Point_3;
- public:
-  SmallerXYZ() {}
-
-  bool point_in_positive_direction_3(const Point_3& p) const {
-    if(p.x() < 0) return false;
-    if(p.x() > 0) return true;
-    if(p.y() < 0) return false;
-    if(p.y() > 0) return true;
-    return p.z() > 0;
-  }  
-
-  bool operator()(const SHalfedge_handle se, const Point_3 min, bool) {
-    return 
-      //      (point_in_positive_direction_3(se->next()->source()->point()) &&
-      //	    point_in_positive_direction_3(se->next()->twin()->source()->point()) &&
-      //	    (!init || 
-	     CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
-						 min);
-  }
-};
-*/
-
-/*
-template<class K2, typename EK, typename SHalfedge_handle> 
-class SmallerXYZ<CGAL::Lazy_kernel<EK>, K2, SHalfedge_handle> {
-
-  typedef typename K2::Point_3  Point_3;
- public:
-  SmallerXYZ() {}
-
-  bool point_in_positive_direction_2(const Point_3& p) const {
-    if(p.y() < 0) return false;
-    if(p.y() > 0) return true;
-    return p.z() > 0;
-  }
-
-  bool point_in_positive_direction_3(const Point_3& p) const {
-    if(p.x() < 0) return false;
-    if(p.x() > 0) return true;
-    if(p.y() < 0) return false;
-    if(p.y() > 0) return true;
-    return p.z() > 0;
-  }  
-
-  bool operator()(const SHalfedge_handle se, const Point_3 min, bool init) {
-    return (point_in_positive_direction_3(se->next()->source()->point()) &&
-	    point_in_positive_direction_3(se->next()->twin()->source()->point()) &&
-	    (!init || 
-	     CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
-						 min)));
-  }
-};
-*/
-
-//--------------------------------------------------------------------------
-// SNC_FM_decorator
-// Note that we interpret sedges as edge uses between vertices.  We
-//   overwrite some operations from the base class for that semantics.
-//--------------------------------------------------------------------------
-
-template <typename S> class SNC_decorator;
-
-template <typename SNC_structure_>
-class SNC_FM_decorator : public SNC_decorator<SNC_structure_> {
-public:
-  typedef SNC_structure_ SNC_structure;
-  typedef SNC_decorator<SNC_structure> Base;
-
-  typedef typename SNC_structure::Vertex_iterator Vertex_iterator; 
-  typedef typename SNC_structure::Vertex_handle Vertex_handle;
-  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator; 
-  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
-  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator; 
-  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
-  typedef typename SNC_structure::Volume_iterator Volume_iterator;
-  typedef typename SNC_structure::Volume_handle Volume_handle;
-  typedef typename SNC_structure::SVertex_iterator SVertex_iterator; 
-  typedef typename SNC_structure::SVertex_handle SVertex_handle;
-  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator; 
-  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
-  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator; 
-  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
-  typedef typename SNC_structure::SFace_iterator SFace_iterator; 
-  typedef typename SNC_structure::SFace_handle SFace_handle;
-  typedef typename SNC_structure::SFace_cycle_iterator SFace_cycle_iterator;
-  typedef typename SNC_structure::Halffacet_cycle_iterator Halffacet_cycle_iterator;
-  typedef typename SNC_structure::Shell_entry_iterator Shell_entry_iterator;
-  typedef typename SNC_structure::Object_handle Object_handle;
-  typedef typename SNC_structure::Kernel  Kernel;
-  typedef typename SNC_structure::Point_3 Point_3;
-  typedef typename SNC_structure::Plane_3 Plane_3;
-  typedef typename SNC_structure::Mark Mark;
-
-  typedef typename Base::SHalfedge_around_facet_circulator
-    SHalfedge_around_facet_circulator;
-#if 0
-  typedef typename Base::SHalfedge_around_facet_const_circulator
-    SHalfedge_around_facet_const_circulator;
-#endif
-
-  typedef typename std::list<Object_handle>::iterator 
-    Object_list_iterator;
-
-  typedef CGAL::Vertex_point<Point_3,Vertex_handle>  Vertex_point;
-  typedef std::pair<Vertex_point,Vertex_point> Vertex_segment;
-  typedef std::list<Vertex_segment>            Segment_list;
-  typedef typename Segment_list::iterator      Segment_iterator;
-
-  typedef CGAL::Halffacet_geometry<Point_3,Plane_3,Vertex_handle> 
-    Halffacet_geometry;
-  using Base::debug; using Base::link_as_facet_cycle; using Base::info; using Base::link_as_interior_loop;
-protected:
-  Halffacet_handle f_;
-public:
-
-  SNC_FM_decorator(SNC_structure& W) : Base(W), f_() {}
-  SNC_FM_decorator(SNC_structure& W, Halffacet_handle f)
-   : Base(W),f_(f) {}
-
-
-  Halffacet_cycle_iterator facet_cycles_begin() const 
-  { return f_->facet_cycles_begin(); }  
-  Halffacet_cycle_iterator facet_cycles_end()   const 
-  { return f_->facet_cycles_end(); }
-
-  void create_facet_objects(const Plane_3& h,
-    Object_list_iterator start, Object_list_iterator end) const;
-
-protected:
-
-//--------------------------------------------------------------------------
-/* We provide some information on determine_facet. To understand its
-   functionality please refer to the Nef_2 implementation report where
-   there is similar function determine_face with more documentation.
-
-   When we call |determine_facet|$(e,\ldots)$ we know that the
-   shalfedge |e| is not linked to a face object yet and thus no
-   shalfedge in its face cycle is linked. Thus we jump to the minimal
-   shalfedge and look down (along the previously used sweep line in
-   the plane of the facet). If we see an shalfedge we ask for its
-   face. If it does not have one we recurse.  Note that the target
-   vertex of the minimal halfedge actually has a view downwards as we
-   examine a hole facet cycle. The method |link_as_facet_cycle| does
-   the linkage between the facet object and all sedges of the facet
-   cycle. Its cost is linear in the size of the facet cycle. Note also
-   that we do the linking bottom up along the recursion stack for all
-   visited hole (facet) cycles.  Thus we visit each hole facet cycle
-   only once as afterwards each edge of the facet cycle is incident to
-   a facet. */
-//--------------------------------------------------------------------------
-
-  Halffacet_handle determine_facet(SHalfedge_handle e, 
-    const std::vector<SHalfedge_handle>& MinimalEdge,
-    const CGAL::Unique_hash_map<SHalfedge_handle,int>& FacetCycle,
-    const std::vector<SHalfedge_handle>& Edge_of) const
-  { CGAL_NEF_TRACEN("  determine_facet "<<debug(e));
-    int fc = FacetCycle[e];
-    SHalfedge_handle e_min = MinimalEdge[fc];
-    SHalfedge_handle e_below = 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      Edge_of[geninfo<unsigned>::access(info(e_min->twin()->source()->twin()->source()))];
-    #else
-      Edge_of[ boost::any_cast<unsigned>(info(e_min->twin()->source()->twin()->source())) ];
-    #endif
-    CGAL_assertion( e_below != SHalfedge_handle() );
-    CGAL_NEF_TRACEN("  edge below " << debug(e_below));    
-    Halffacet_handle f = e_below->facet();
-    if ( f != Halffacet_handle() ) return f; // has already a facet 
-    // e_below also has no facet
-    f = determine_facet(e_below, MinimalEdge, FacetCycle, Edge_of);
-    CGAL_NEF_TRACEN("  edge below " << debug(e_below));
-    link_as_facet_cycle(e_below,f); 
-    link_as_facet_cycle(e_below->twin(),f->twin()); 
-    return f;
-  }
-
-//--------------------------------------------------------------------------
-/* segment(...)
-   an shalfedge |e| can be interpreted as an edge-use extending along
-   the halfedge that leaves the local graph in |target(e)|. Only
-   edge-uses allow us to code the non-unique character of an edge as a
-   boundary object of several facets. An edge-use |e| represents the
-   edge |target(e)| in the boundary structure of a facet. */
-//--------------------------------------------------------------------------
-
-  Vertex_segment segment(SHalfedge_handle e) const
-  { Vertex_handle vs = e->source()->source(), 
-      vt = e->twin()->source()->twin()->source(); 
-    Vertex_point  ps(vs->point(),vs), pt(vt->point(),vt);
-    return Vertex_segment(ps,pt); }
-
-  Vertex_segment segment(SHalfloop_handle l) const
-  { Vertex_handle v = l->incident_sface()->center_vertex(); 
-    Vertex_point  p(v->point(),v);
-    return Vertex_segment(p,p); }
-
-
-}; // SNC_FM_decorator<SNC_structure_>
-
-
-
-//--------------------------------------------------------------------------
-/* create_facet_objects() 
-   In this method we use the visibility along a sweep line in the
-   facet plane to create facet objects. |SEdge_below[v]| either
-   provides the sedge that is hit first by a vertical ray downwards or
-   an uninitialized edge if there is none. */
-//--------------------------------------------------------------------------
-
-
-template <typename SNC_>
-void SNC_FM_decorator<SNC_>::
-create_facet_objects(const Plane_3& plane_supporting_facet,
-  Object_list_iterator start, Object_list_iterator end) const
-{ CGAL_NEF_TRACEN(">>>>>create_facet_objects "
-		  << normalized(plane_supporting_facet));
-  CGAL::Unique_hash_map<SHalfedge_handle,int> FacetCycle(-1);
-  std::vector<SHalfedge_handle> MinimalEdge;
-  std::list<SHalfedge_handle> SHalfedges; 
-  std::list<SHalfloop_handle> SHalfloops; 
-
-  CGAL::Unique_hash_map<Vertex_handle,SHalfedge_handle> SHalfedgeBelow;
-  CGAL::Unique_hash_map<Segment_iterator,SHalfedge_handle>  From;
-
-  Segment_list Segments;
-  SHalfedge_handle e; SHalfloop_handle l;
-  typename std::list<SHalfedge_handle>::iterator eit,epred;
-  typename std::list<SHalfloop_handle>::iterator lit;
-
-  // the output decorator for the facet plane sweep
-  typedef CGAL::Halffacet_output<Vertex_point, Vertex_handle, 
-    SHalfedge_handle, Segment_iterator> Halffacet_output;
-
-  // the sweep traits class instantiated with the input, output and
-  // geometry models
-  typedef CGAL::Segment_overlay_traits
-    <Segment_iterator, Halffacet_output, Halffacet_geometry>
-    Halffacet_sweep_traits;
-  typedef CGAL::generic_sweep<Halffacet_sweep_traits>   Halffacet_sweep;
-  Halffacet_geometry G(plane_supporting_facet);
-
-  /* We first separate sedges and sloops, and fill a list of segments
-     to trigger a sweep. */
-
-  for ( ; start != end; ++start ) {
-    if ( CGAL::assign(e,*start) ) {
-      SHalfedges.push_back(e); 
-    } else if ( CGAL::assign(l,*start) ) {
-      SHalfloops.push_back(l); 
-    } else 
-      CGAL_error_msg("Damn wrong handle.");
-  }
-
-  /* We iterate all shalfedges and assign a number for each facet
-     cycle.  After that iteration for an edge |e| the number of its
-     facet cycle is |FacetCycle[e]| and for a facet cycle |c| we know
-     |MinimalEdge[c]|. */
-  int i=0; 
-  //  bool xyplane = plane_supporting_facet.b() != 0 || plane_supporting_facet.c() != 0;
-  SmallerXYZ<Kernel, SHalfedge_handle, Halffacet_geometry> smallerXYZ(G);
-  CGAL_forall_iterators(eit,SHalfedges) { 
-    e = *eit;
-    if ( FacetCycle[e] >= 0 ) continue; // already assigned
-    SHalfedge_around_facet_circulator hfc(e),hend(hfc);
-    FacetCycle[hfc]=i;
-    SHalfedge_handle e_min = e;
-    bool init=false;
-    CGAL_NEF_TRACEN("\n  facet cycle numbering (up) "<<i);
-    CGAL_For_all(hfc,hend) {
-      FacetCycle[hfc]=i; // assign face cycle number
-      if(smallerXYZ(hfc, e_min, init)) {
-	init = true;
-	e_min = hfc;
-      }
-      
-      CGAL_NEF_TRACEN(hfc->twin()->source()->twin()->source()->point() << " lex xyz smaller " << 
-		      e_min->twin()->source()->twin()->source()->point() << "=" << 
-		      CGAL::lexicographically_xyz_smaller(hfc->twin()->source()->twin()->source()->point(), 
-							  e_min->twin()->source()->twin()->source()->point()));
-      
-    } CGAL_NEF_TRACEN("");
-    MinimalEdge.push_back(e_min);
-    ++i;
-  }
-
-
-
-  /* We now know the number of facet cycles |i| and we have a minimal
-     edge |e| for each facet cycle. We just check the geometric
-     embedding of |e| and |e->next()| to characterize the facet cycle
-     (outer or hole). Note that the two edges cannot be collinear due
-     to the minimality of |e| (the lexicographic minimality of the
-     embedding of its target vertex). Outer facet cycles obtain facet
-     objects right away. */
-
-  for (int j=0; j<i; ++j) {
-    SHalfedge_handle e = MinimalEdge[j];
-    CGAL_NEF_TRACEN("  facet cycle "<<j<<" minimal halfedge "<<debug(e));
-    Point_3 p1 = e->source()->source()->point(), 
-      p2 = e->twin()->source()->twin()->source()->point(), 
-      p3 = e->next()->twin()->source()->twin()->source()->point();
-    
-    //      std::cerr << "minimal shalfedge " << e->source()->source()->point() << ":"
-    //                << e->source()->point() << "->" << e->twin()->source()->point() << std::endl;
-
-
-    if ( G.left_turn(p1,p2,p3) ) { 
-      Halffacet_handle f = this->sncp()->new_halffacet_pair(plane_supporting_facet);
-      link_as_facet_cycle(e,f); link_as_facet_cycle(e->twin(),f->twin()); 
-      f->mark() = f->twin()->mark() = e->mark();
-      CGAL_NEF_TRACEN("  creating new facet object "<<&*f<<" bd "<<&*e);
-    }
-  }
-
-  /* Now the only shalfedges not linked are those on hole facet
-     cycles.  We use a recursive scheme to find the bounding cycle
-     providing the facet object and finally iterate over all isolated
-     vertices to link them accordingly to their containing facet
-     object. Note that in that final iteration all shalfedges already
-     have facet links. Thus that ensures termination. The recursive
-     operation $|determine_facet|(e,\ldots)$ returns the facet
-     containing the hole cycle of |e|. As a postcondition of this code
-     part we have all shalfedges and isolated shalfloops linked to
-     facet objects, and all facet objects know their bounding facet
-     cycles. */
- 
-  bool do_sweep = false;
-  if(SHalfloops.size() > 0)
-    do_sweep = true;
-
-  CGAL_forall_iterators(eit,SHalfedges) { 
-    //    std::cerr << "fc " << FacetCycle[*eit] << std::endl;
-    if ( (*eit)->facet() == Halffacet_handle() ) {
-      //      std::cerr << "nicht verlinkte shalfedge " << (*eit)->source()->source()->point() << ":"
-      //                << (*eit)->source()->point() << "->" << (*eit)->twin()->source()->point() << std::endl;
-      do_sweep = true;
-      break;
-    }
-  }
-
-
-  //  std::cerr << std::endl;
-#ifndef CGAL_NEF3_PLANE_SWEEP_OPTIMIZATION_OFF
-  if(!do_sweep) return; 
-#endif
-
-#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
-  number_of_plane_sweeps++;
-  timer_plane_sweeps.start();
-#endif
-
-  //  Note that we only allow those edges that are
-  //  directed from lexicographically smaller to larger vertices. 
-  //  Insertion of SHalfedges into Segments is shifted below in order
-  //  to guarantee that there are no gaps in the overlay.
-
-
-  //  SHalfedges.sort(Sort_sedges2<Point_3,SHalfedge_handle>());
-  SHalfedges.sort(Sort_sedges<Vertex_handle,SHalfedge_handle>());
-  for(eit = SHalfedges.begin();eit != SHalfedges.end();) {
-    CGAL_NEF_TRACEN("  appending edge "<< debug(*eit));
-    Segments.push_front(segment(*eit)); 
-    From[Segments.begin()] = *eit;
-    epred=eit;
-    ++eit;
-    if(eit != SHalfedges.end()) {
-      CGAL_NEF_TRACEN("test " << std::endl << "  " << debug(*epred) 
-	     << std::endl << "  " << debug(*eit));
-    }
-    if(eit != SHalfedges.end() && 
-       (*epred)->source()->source() ==(*eit)->next()->source()->source() &&  
-       (*eit)->source()->source() == (*epred)->next()->source()->source())
-      ++eit;
-  }
-
-  CGAL_forall_iterators(lit,SHalfloops) {
-    CGAL_NEF_TRACEN("  appending loop " << (*lit)->incident_sface()->center_vertex()->point()); 
-    Segments.push_back(segment(*lit));
-  }
-
-  std::vector<SHalfedge_handle> Edge_of(Segments.size()+1);
-  Halffacet_output O(From,Edge_of);
-  Halffacet_sweep f_s(typename Halffacet_sweep::INPUT(
-    Segments.begin(),Segments.end()), O, G); f_s.sweep();
-
-#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
-  timer_plane_sweeps.stop();
-#endif
-
-  CGAL_forall_iterators(eit,SHalfedges) { e=*eit;
-  if ( e->facet() != Halffacet_handle() ) continue;
-    CGAL_NEF_TRACEN("  linking hole "<<debug(e));
-    Halffacet_handle f = determine_facet(e,MinimalEdge,FacetCycle,Edge_of);
-    link_as_facet_cycle(e,f); link_as_facet_cycle(e->twin(),f->twin());
-  }
-
-  CGAL_forall_iterators(lit,SHalfloops) { l=*lit;
-    SHalfedge_handle e_below = 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      Edge_of[geninfo<unsigned>::access(info(l->incident_sface()->center_vertex()))];    
-    #else
-      Edge_of[ boost::any_cast<unsigned>(info(l->incident_sface()->center_vertex())) ];
-    #endif
-    
-    CGAL_assertion( e_below != SHalfedge_handle() );
-    CGAL_NEF_TRACEN("link sloop at vertex "<< l->incident_sface()->center_vertex()->point());
-    CGAL_NEF_TRACEN("e_below "  << debug(e_below));
-    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()));
-    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()));
-    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()->next()));
-    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()->next()->next()));
-    link_as_interior_loop(l,e_below->facet());
-    link_as_interior_loop(l->twin(),e_below->facet()->twin());
-  }
-  
-  CGAL_NEF_TRACEN("exit FM");
-}
-
-} //namespace CGAL
-#endif //CGAL_SNC_FM_DECORATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_external_structure.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_external_structure.h
deleted file mode 100644
index c34ac3c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_external_structure.h
+++ /dev/null
@@ -1,1360 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel       <seel at mpi-sb.mpg.de> 
-//                 Miguel Granados    <granados at mpi-sb.mpg.de>
-//                 Susan Hert         <hert at mpi-sb.mpg.de>
-//                 Lutz Kettner       <kettner at mpi-sb.mpg.de>
-//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-#ifndef CGAL_SNC_EXTERNAL_STRUCTURE_H
-#define CGAL_SNC_EXTERNAL_STRUCTURE_H
-
-#include <CGAL/Nef_S2/Normalizing.h>
-#include <CGAL/Nef_3/Pluecker_line_3.h>
-#include <CGAL/Nef_3/SNC_decorator.h>
-#include <CGAL/Nef_3/SNC_point_locator.h>
-#include <CGAL/Nef_S2/SM_point_locator.h>
-#include <CGAL/Nef_3/SNC_FM_decorator.h>
-#include <CGAL/Nef_3/SNC_io_parser.h>
-#include <CGAL/Nef_3/SNC_indexed_items.h>
-#include <CGAL/Nef_3/SNC_simplify.h>
-#include <map>
-#include <list>
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 43
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-struct int_lt {
-  bool operator()(const int& i1, const int& i2) const { return i1<i2; }
-};
-template <typename Edge_handle>
-struct Halfedge_key_lt4 {
-
-  bool operator()(const Edge_handle& e1, const Edge_handle& e2) const {
-    if(CGAL::sign(e1->point().x()) != 0) {
-      if(e1->source() != e2->source())
-	return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; 
-      else 
-	return e1->point().x() < 0;
-    }
-    if(CGAL::sign(e1->point().y()) != 0) {
-      if(e1->source() != e2->source())
-	return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; 
-      else 
-	return e1->point().y() < 0;
-    }
-    if(e1->source() != e2->source())
-      return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; 
-    return e1->point().z() < 0;
-  }
-};
-
-template <typename Edge_handle>
-struct Halfedge_key_lt3 {
-
-  bool operator()(const Edge_handle& e1, const Edge_handle& e2) const {
-    if(e1->source() != e2->source())
-      return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); 
-    if(CGAL::sign(e1->point().x()) != 0)
-      return e1->point().x() < 0;
-    if(CGAL::sign(e1->point().y()) != 0)
-      return e1->point().y() < 0;
-    return e1->point().z() < 0;
-  }
-};
-
-template <typename Point, typename Edge>
-struct Halfedge_key {
-  typedef Halfedge_key<Point,Edge> Self;
-  Point p; int i; Edge e;
-  Halfedge_key(Point pi, int ii, Edge ei) : 
-    p(pi), i(ii), e(ei) {}
-  Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {}
-  Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; }
-  bool operator==(const Self& k) const { return p==k.p && i==k.i; }
-  bool operator!=(const Self& k) const { return !operator==(k); }
-};
-
-template <typename Point, typename Edge, class Decorator>
-struct Halfedge_key_lt {
-  typedef Halfedge_key<Point,Edge> Key;
-  typedef typename Point::R R;
-  typedef typename R::Vector_3 Vector;
-  typedef typename R::Direction_3 Direction;
-  bool operator()( const Key& k1, const Key& k2) const { 
-    if( k1.e->source() == k2.e->source())
-      return (k1.i < k2.i);
-    Direction l(k1.e->vector());
-    if( k1.i < 0) l = -l;
-    return (Direction( k2.p - k1.p) == l); 
-  }
-};
-
-template <typename Point, typename Edge>
-std::ostream& operator<<(std::ostream& os, 
-                         const Halfedge_key<Point,Edge>& k )
-{ os << k.p << " " << k.i; return os; }
-
-template <typename R>
-int sign_of(const CGAL::Plane_3<R>& h)
-{ if ( h.c() != 0 ) return CGAL_NTS sign(h.c());
-  if ( h.b() != 0 ) return CGAL_NTS sign(-h.b());
-  return CGAL_NTS sign(h.a());
-}
-
-struct Plane_lt {
-  template <typename R>
-  bool operator()(const CGAL::Plane_3<R>& h1,
-                  const CGAL::Plane_3<R>& h2) const
-  { 
-    typedef typename R::RT     RT;
-    RT diff = h1.a()-h2.a();
-    if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
-    diff = h1.b()-h2.b();
-    if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
-    diff = h1.c()-h2.c();
-    if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
-    diff = h1.d()-h2.d(); return CGAL_NTS sign(diff) < 0;
-  }
-};
-
-struct Plane_RT_lt {
-  template <typename R>
-  bool operator()(const CGAL::Plane_3<R>& h1,
-                  const CGAL::Plane_3<R>& h2) const
-  { return (&(h1.a())) < (&(h2.a())); }
-};
-
-// ----------------------------------------------------------------------------
-// SNC_external_structure 
-// ----------------------------------------------------------------------------
-
-template <typename Items_, typename SNC_structure_>
-class SNC_external_structure_base : public SNC_decorator<SNC_structure_>
-{ 
-public:
-  typedef SNC_structure_ SNC_structure;
-
-  typedef typename SNC_structure::Infi_box                   Infi_box;
-  typedef typename Infi_box::Standard_kernel                 Standard_kernel;
-  typedef typename Standard_kernel::Point_3                  Standard_point_3;
-  typedef typename Infi_box::NT                              NT;
-
-  typedef CGAL::SNC_decorator<SNC_structure>                 SNC_decorator;
-  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
-  typedef CGAL::SNC_FM_decorator<SNC_structure>              FM_decorator;
-  typedef CGAL::SNC_simplify<Items_, SNC_structure>          SNC_simplify;
-
-  typedef typename SNC_structure::Sphere_map                 Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>                     SM_decorator;  
-  typedef CGAL::SM_const_decorator<Sphere_map>               SM_const_decorator;
-  typedef CGAL::SM_point_locator<SM_const_decorator>         SM_point_locator;
-
-  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator;
-  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator;
-  typedef typename SNC_structure::Volume_iterator Volume_iterator;
-
-  typedef typename SNC_structure::Vertex_handle Vertex_handle;
-  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
-  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
-  typedef typename SNC_structure::Volume_handle Volume_handle;
-
-  typedef typename SNC_structure::Halffacet_const_handle Halffacet_const_handle;
-  typedef typename SNC_structure::SFace_const_handle SFace_const_handle; 
-
-  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator;
-  typedef typename SNC_structure::SFace_iterator SFace_iterator;
-  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator;
-
-  typedef typename SNC_structure::SVertex_handle SVertex_handle;
-  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
-  typedef typename SNC_structure::SFace_handle SFace_handle;
-  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
-
-  typedef typename SNC_structure::Object_handle Object_handle;
-
-  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
-    SHalfedge_around_facet_circulator;
-
-  typedef typename SNC_structure::Point_3 Point_3;
-  typedef typename SNC_structure::Direction_3 Direction_3;
-  typedef typename SNC_structure::Plane_3 Plane_3;
-  typedef typename SNC_structure::Ray_3 Ray_3;
-
-  typedef typename SNC_structure::Sphere_point Sphere_point;
-  typedef typename SNC_structure::Sphere_circle Sphere_circle;
-
-  typedef typename SM_decorator::SHalfedge_around_svertex_circulator 
-    SHalfedge_around_svertex_circulator;
-
-  SNC_point_locator* pl;
-
-  typedef CGAL::Unique_hash_map<SFace_const_handle,unsigned int>  
-                                                         Sface_shell_hash;
-  typedef CGAL::Unique_hash_map<Halffacet_const_handle,unsigned int>  
-                                                         Face_shell_hash;
-  typedef CGAL::Unique_hash_map<SFace_const_handle,bool> SFace_visited_hash;
-  typedef CGAL::Unique_hash_map<SFace_const_handle,bool> Shell_closed_hash;
-
-  using SNC_decorator::visit_shell_objects;
-  using SNC_decorator::link_as_inner_shell;
-  using SNC_decorator::link_as_outer_shell;
-  using SNC_decorator::link_as_prev_next_pair;
-  using SNC_decorator::get_visible_facet;
-  using SNC_decorator::adjacent_sface;
-  using SNC_decorator::make_twins;
-
-  struct Shell_explorer {
-    const SNC_decorator& D;
-    Sface_shell_hash&  ShellSf;
-    Face_shell_hash&   ShellF;
-    //    Shell_closed_hash& Closed;
-    SFace_visited_hash& Done;
-    SFace_handle sf_min;
-    int n;
-
-    Shell_explorer(const SNC_decorator& Di, Sface_shell_hash& SSf, 
-                   Face_shell_hash& SF, SFace_visited_hash& Vi) 
-      : D(Di), ShellSf(SSf), ShellF(SF), Done(Vi), n(0) {}
-
-    void visit(SFace_handle h) { 
-      CGAL_NEF_TRACEN("visit sf "<<h->center_vertex()->point());
-      ShellSf[h]=n;
-      Done[h]=true;
-      if ( CGAL::lexicographically_xyz_smaller(h->center_vertex()->point(),
-					       sf_min->center_vertex()->point())) 
-	sf_min = h; 
-    }
-
-    void visit(Vertex_handle h) { 
-      CGAL_NEF_TRACEN("visit v  "<<h->point());
-    }
-
-    void visit(Halfedge_handle h) { 
-      CGAL_NEF_TRACEN("visit he "<< h->source()->point());
-    }
-
-    void visit(Halffacet_handle h) { 
-      CGAL_NEF_TRACEN(h->plane()); 
-      ShellF[h]=n; 
-    }
-
-    void visit(SHalfedge_handle ) {}
-    void visit(SHalfloop_handle ) {}
-
-    SFace_handle& minimal_sface() { return sf_min; }
-
-    void increment_shell_number() { 
-      CGAL_NEF_TRACEN("leaving shell "<<n);
-      ++n; 
-    }
-  };
-
-  SNC_external_structure_base( SNC_structure& W, SNC_point_locator* spl = NULL) 
-    : SNC_decorator(W), pl(spl) {}
-  /*{\Mcreate makes |\Mvar| a decorator of |W|.}*/
-
- public:
-  //#define CGAL_NEF_NO_HALFEDGE_KEYS
-#ifdef CGAL_NEF_NO_HALFEDGE_KEYS
-  void pair_up_halfedges() const {
-  /*{\Mop pairs all halfedge stubs to create the edges in 3-space.}*/
-
-  //  CGAL_NEF_SETDTHREAD(43*61);
-    CGAL_NEF_TRACEN(">>>>>pair_up_halfedges");
-    typedef Halfedge_key_lt3<Halfedge_handle> 
-      Halfedge_key_lt;
-    typedef std::list<Halfedge_handle>  Halfedge_list;
-    
-    typedef typename Standard_kernel::Kernel_tag   Kernel_tag;
-    typedef CGAL::Pluecker_line_3<Kernel_tag,Standard_kernel> Pluecker_line_3;
-    typedef CGAL::Pluecker_line_lt        Pluecker_line_lt;
-    typedef std::map< Pluecker_line_3, Halfedge_list, Pluecker_line_lt> 
-      Pluecker_line_map;
-    
-    Pluecker_line_map M;
-    Pluecker_line_map M2;
-    Pluecker_line_map M3;
-    Pluecker_line_map M4;
-    
-    NT eval(Infi_box::compute_evaluation_constant_for_halfedge_pairup(*this->sncp()));
-    
-    Halfedge_iterator e;
-    CGAL_forall_halfedges(e,*this->sncp()) {
-      //    progress++;
-      Point_3 p = e->source()->point();
-      Point_3 q = p + e->vector();
-      CGAL_NEF_TRACE(" segment("<<p<<", "<<q<<")"<<
-	    " direction("<<e->vector()<<")");
-      Standard_point_3 sp = Infi_box::standard_point(p,eval);
-      Standard_point_3 sq = Infi_box::standard_point(q,eval);
-      Pluecker_line_3  l( sp, sq);
-      
-      int inverted;
-      l = categorize( l, inverted);
-      
-      if(Infi_box::is_edge_on_infibox(e))
-	if(Infi_box::is_type4(e))
-	  M4[l].push_back(e);
-	else
-	  if(Infi_box::is_type3(e))
-	    M3[l].push_back(e);
-	  else
-	    M2[l].push_back(e);
-      else
-	M[l].push_back(e);
-      
-      // the following trace crashes when compiling with optimizations (-O{n})
-      //CGAL_NEF_TRACEN(Infi_box::standard_point(point(vertex(e)))+
-      
-      CGAL_NEF_TRACEN(" line("<<l<<")"<<" inverted="<<inverted);
-    }
-    
-    typename Pluecker_line_map::iterator it;
-    
-    CGAL_forall_iterators(it,M4) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = *itl;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = *itl;
-	while(normalized(e1->vector()) != normalized(-e2->vector())) {
-	  ++itl;
-	  make_twins(e1,*itl);
-	  e1 = e2;
-	  ++itl;
-	  e2 = *itl;
-	}
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-
-    CGAL_forall_iterators(it,M3) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = *itl;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = *itl;
-	while(normalized(e1->vector()) != normalized(-e2->vector())) {
-	  ++itl;
-	  make_twins(e1,*itl);
-	  e1 = e2;
-	  ++itl;
-	  e2 = *itl;
-	}
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }    
-
-    CGAL_forall_iterators(it,M2) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = *itl;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = *itl;
-	while(normalized(e1->vector()) != normalized(-e2->vector())) {
-	  ++itl;
-	  this->make_twins(e1,*itl);
-	  e1 = e2;
-	  ++itl;
-	  e2 = *itl;
-	}
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	this->make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-    
-    CGAL_forall_iterators(it,M) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = *itl;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = *itl;
-	while(normalized(e1->vector()) != normalized(-e2->vector())) {
-	  ++itl;
-	  this->make_twins(e1,*itl);
-	  e1 = e2;
-	  ++itl;
-	  e2 = *itl;
-	}
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	this->make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-
-  }
-#else
-  void pair_up_halfedges() const {
-  /*{\Mop pairs all halfedge stubs to create the edges in 3-space.}*/
-
-//    CGAL_NEF_SETDTHREAD(43*61);
-    CGAL_NEF_TRACEN(">>>>>pair_up_halfedges");
-    typedef Halfedge_key< Point_3, Halfedge_handle>
-      Halfedge_key;
-    typedef Halfedge_key_lt< Point_3, Halfedge_handle, SNC_decorator> 
-      Halfedge_key_lt;
-    typedef std::list<Halfedge_key>  Halfedge_list;
-    
-    typedef typename Standard_kernel::Kernel_tag   Kernel_tag;
-    typedef CGAL::Pluecker_line_3<Kernel_tag,Standard_kernel> Pluecker_line_3;
-    typedef CGAL::Pluecker_line_lt        Pluecker_line_lt;
-    typedef std::map< Pluecker_line_3, Halfedge_list, Pluecker_line_lt> 
-      Pluecker_line_map;
-    
-    SNC_decorator D(*this);
-    Pluecker_line_map M;
-    Pluecker_line_map M2;
-    Pluecker_line_map M3;
-    Pluecker_line_map M4;
-    
-    NT eval(Infi_box::compute_evaluation_constant_for_halfedge_pairup(*this->sncp()));;
-    
-    Halfedge_iterator e;
-    CGAL_forall_halfedges(e,*this->sncp()) {
-      //    progress++;
-      Point_3 p = e->source()->point();
-      Point_3 q = p + e->vector();
-      CGAL_NEF_TRACE(" segment("<<p<<", "<<q<<")"<<
-	    " direction("<<e->vector()<<")");
-      Standard_point_3 sp = Infi_box::standard_point(p,eval);
-      Standard_point_3 sq = Infi_box::standard_point(q,eval);
-      Pluecker_line_3  l( sp, sq);
-      
-      int inverted;
-      l = categorize( l, inverted);
-      
-      if(Infi_box::is_edge_on_infibox(e))
-	if(Infi_box::is_type4(e))
-	  M4[l].push_back(Halfedge_key(p,inverted,e));
-	else
-	  if(Infi_box::is_type3(e))
-	    M3[l].push_back(Halfedge_key(p,inverted,e));
-	  else
-	    M2[l].push_back(Halfedge_key(p,inverted,e));
-      else
-	M[l].push_back(Halfedge_key(p,inverted,e));
-      
-      // the following trace crashes when compiling with optimizations (-O{n})
-      //CGAL_NEF_TRACEN(Infi_box::standard_point(point(vertex(e)))+
-      
-      CGAL_NEF_TRACEN(" line("<<l<<")"<<" inverted="<<inverted);
-    }
-    
-    typename Pluecker_line_map::iterator it;
-    
-    CGAL_forall_iterators(it,M4) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = itl->e;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = itl->e;
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-    
-    CGAL_forall_iterators(it,M3) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = itl->e;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = itl->e;
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-    
-    CGAL_forall_iterators(it,M2) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = itl->e;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = itl->e;
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
-	make_twins(e1,e2);
-	CGAL_assertion(e1->mark()==e2->mark());
-	
-	// discard temporary sphere_point ?
-      }
-    }
-    
-    CGAL_forall_iterators(it,M) {
-      //    progress++;
-      it->second.sort(Halfedge_key_lt());
-      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = itl->e;
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = itl->e;
-	CGAL_NEF_TRACEN("    " << e1->source()->point() 
-			<< " -> " << e2->source()->point());
-	CGAL_NEF_TRACEN(e1->vector()<<" -> "<< -e2->vector());
-	CGAL_assertion(e1->source()->point() != e2->source()->point());
-	CGAL_assertion(e1->mark()==e2->mark());
-	make_twins(e1,e2);
-	
-	// discard temporary sphere_point ?
-      }
-    }
-  }
-#endif
-
-  void link_shalfedges_to_facet_cycles() const {
-  /*{\Mop creates all non-trivial facet cycles from sedges. 
-  \precond |pair_up_halfedges()| was called before.}*/
-    
-  //  CGAL_NEF_SETDTHREAD(43*31);
-    CGAL_NEF_TRACEN(">>>>>link_shalfedges_to_facet_cycles");
-
-#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
-    Point_3 p1(1,2,7), p2(p1);     
-    bool reference_counted = (&(p1.hx()) == &(p2.hx()));
-#endif
-
-    Halfedge_iterator e;
-    CGAL_forall_edges(e,*this->sncp()) {
-      //    progress++;
-      CGAL_NEF_TRACEN("");
-      CGAL_NEF_TRACEN(PH(e));
-      Halfedge_iterator et = e->twin();
-      SM_decorator D(&*e->source()), Dt(&*et->source());
-      CGAL_NEF_TRACEN(e->source()->point());
-      if ( D.is_isolated(e) ) continue;
-      SHalfedge_around_svertex_circulator ce(D.first_out_edge(e)),cee(ce);
-      SHalfedge_around_svertex_circulator cet(Dt.first_out_edge(et)),cete(cet);
-      
-#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
-      if(reference_counted) {
-	CGAL_For_all(cet,cete)
-	  if ( &(cet->circle().a()) == &(ce->circle().opposite().a()) && 
-	       cet->source()->twin() == ce->source() )
-	    break;
-      } else
-#endif
-        CGAL_For_all(cet,cete)
-	  if ( cet->circle() == ce->circle().opposite() && 
-	       cet->source()->twin() == ce->source() ) 
-            break;
-
-#ifndef NDEBUG
-      if( cet->circle() != ce->circle().opposite() )
-	CGAL_NEF_TRACEN("assertion failed!");
-      
-      CGAL_NEF_TRACEN("vertices " << e->source()->point() << 
-      "    "      << et->source()->point());
-      
-      
-      SHalfedge_around_svertex_circulator sc(D.first_out_edge(e));
-      SHalfedge_around_svertex_circulator sct(Dt.first_out_edge(et));
-
-      CGAL_NEF_TRACEN("");
-      CGAL_For_all(sc,cee)
-	CGAL_NEF_TRACEN("sseg at E addr="<<&*sc<<
-			" src="<< sc->source()->point()<<
-			" tgt="<< sc->target()->point()<<std::endl<<
-			" circle=" << normalized(sc->circle()));
-      CGAL_NEF_TRACEN("");
-
-      CGAL_For_all(sct,cete)
-      CGAL_NEF_TRACEN("sseg at ET addr="<<&*sct<<
-		      " src="<< sct->source()->point()<<
-		      " tgt="<<sct->target()->point()<<std::endl<<
-		      " circle=" << normalized(sct->circle()));
-      CGAL_NEF_TRACEN("");
-#endif
-
-      CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite()) ); 
-      CGAL_assertion( cet->source()->twin() == ce->source()); 
-      CGAL_For_all(ce,cee) { 
-	CGAL_NEF_TRACEN("circles " << normalized(cet->circle()) << "   " << normalized(ce->circle()) << 
-			" sources " << cet->target()->point() << 
-			"   " << ce->target()->point());
-	CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite())); 
-	CGAL_assertion( cet->source()->twin() == ce->source()); 
-	CGAL_assertion(ce->mark()==cet->mark());
-	link_as_prev_next_pair(cet->twin(),ce);
-	link_as_prev_next_pair(ce->twin(),cet);
-	--cet; // ce moves ccw, cet moves cw
-      }
-    }
-  }
-
-  void categorize_facet_cycles_and_create_facets() const {
-  /*{\Mop collects all facet cycles incident to a facet and creates
-  the facets. \precond |link_shalfedges_to_facet_cycles()| was called
-  before.}*/
-
-    //    CGAL_NEF_SETDTHREAD(43*31);
-    CGAL_NEF_TRACEN(">>>>>categorize_facet_cycles_and_create_facets");
-    
-    typedef std::list<Object_handle> Object_list;
-#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
-    typedef std::map<Plane_3, Object_list, Plane_RT_lt> 
-      Map_planes;
-#else
-    typedef std::map<Plane_3, Object_list, Plane_lt> 
-      Map_planes;
-#endif 
-   
-    Map_planes M;
-    SHalfedge_iterator e;
-    CGAL_forall_shalfedges(e,*this->sncp()) {
-      Sphere_circle c(e->circle());
-      Plane_3 h = c.plane_through(e->source()->source()->point());
-      CGAL_NEF_TRACEN("\n" << e->source()->twin()->source()->point() <<" - "
-		      << e->source()->source()->point() <<" - "<< 
-		      e->twin()->source()->twin()->source()->point() << 
-		      " has plane " << h << " has circle " << e->circle() << 
-		      " has signum " << sign_of(h));
-      if ( sign_of(h)<0 ) continue;
-      M[normalized(h)].push_back(make_object(e->twin())); 
-      CGAL_NEF_TRACEN(" normalized as " << normalized(h));
-      /*
-	Unique_hash_map<SHalfedge_handle, bool> Done(false);
-	SHalfedge_iterator ei;
-	CGAL_forall_sedges(ei,*this->sncp()) {
-	if(Done[ei]) continue;
-	Sphere_circle c(ei->circle());
-	Plane_3 h = c.plane_through(ei->source()->source()->point());
-	CGAL_NEF_TRACEN("\n" << ei->source()->twin()->source()->point() <<" - "
-	<< ei->source()->source()->point() <<" - "<< 
-		      ei->twin()->source()->twin()->source()->point() << 
-		      " has plane " << h << " has circle " << ei->circle() << 
-		      " has signum " << sign_of(h));
-      SHalfedge_handle e(ei);
-      if ( sign_of(h)<0 ) {
-	h = h.opposite();
-	e = e->twin();
-      }
-      SHalfedge_around_facet_circulator sfc(e), send(sfc);
-      CGAL_For_all(sfc, send) {
-	M[normalized(h)].push_back(make_object(e->twin())); 
-	Done[sfc] = true;
-	Done[sfc->twin()] = true;
-	CGAL_NEF_TRACEN(" normalized as " << normalized(h)); 
-      }
-      */
-    }
-    SHalfloop_iterator l;
-    CGAL_forall_shalfloops(l,*this->sncp()) {
-      Sphere_circle c(l->circle());
-      Plane_3 h = c.plane_through(l->incident_sface()->center_vertex()->point()); 
-      if ( sign_of(h)<0 ) continue;
-      // CGAL_assertion( h == normalized(h));
-      M[normalized(h)].push_back(make_object(l->twin()));
-    }
-    
-#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
-  number_of_plane_sweeps=0;
-  timer_plane_sweeps.reset();
-#endif
-
-    typename Map_planes::iterator it;
-    CGAL_forall_iterators(it,M) { 
-      //    progress2++;
-      //      CGAL_NEF_TRACEN("  plane "<<it->first<<"             "<<(it->first).point());
-      FM_decorator D(*this->sncp());
-      D.create_facet_objects(it->first,it->second.begin(),it->second.end());
-    }
-    //       CGAL_NEF_SETDTHREAD(1);
-  }
-
-  void create_volumes() {
-  /*{\Mop collects all shells incident to a volume and creates the
-  volumes.  \precond |categorize_facet_cycles_and_creating_facets()| was
-  called before.}*/
-
-#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
-    number_of_ray_shooting_queries=0;
-    timer_ray_shooting.reset();
-#endif 
-
-    //    CGAL_NEF_SETDTHREAD(37*43*503*509);
-
-    CGAL_NEF_TRACEN(">>>>>create_volumes");
-    Sface_shell_hash     ShellSf(0);
-    Face_shell_hash      ShellF(0);
-    SFace_visited_hash Done(false);
-    Shell_explorer V(*this,ShellSf,ShellF,Done);
-    std::vector<SFace_handle> MinimalSFace;
-    std::vector<SFace_handle> EntrySFace;
-    std::vector<bool> Closed;
-    
-    SFace_iterator f;
-    // First, we classify all the Shere Faces per Shell.  For each Shell we
-    //     determine its minimum lexicographyly vertex and we check wheter the
-    //     Shell encloses a region (closed surface) or not. 
-    CGAL_forall_sfaces(f,*this->sncp()) {
-      //    progress++;
-      CGAL_NEF_TRACEN("sface in " << ShellSf[f]);
-      if ( Done[f] ) 
-	continue;
-      V.minimal_sface() = f;
-      visit_shell_objects(f,V);
-      
-      CGAL_NEF_TRACEN("minimal vertex " << V.minimal_sface()->center_vertex()->point());
-
-      MinimalSFace.push_back(V.minimal_sface());
-      EntrySFace.push_back(f);
-      V.increment_shell_number();
-      CGAL_NEF_TRACEN("sface out " << ShellSf[f]);
-    }
-    
-    for(unsigned int i=0; i<EntrySFace.size(); ++i)
-      Closed.push_back(false);
-    
-    Halffacet_iterator hf;
-    CGAL_forall_facets(hf,*this) 
-      if(ShellF[hf] != ShellF[hf->twin()]) {
-	Closed[ShellF[hf]] = true;
-	Closed[ShellF[hf->twin()]] = true;
-      }
-    
-    CGAL_assertion( pl != NULL);
-
-#ifdef CGAL_NEF3_TIMER_INITIALIZE_KDTREE
-    CGAL::Timer timer_initialize_kdtree;
-    timer_initialize_kdtree.start();
-#endif
-    pl->initialize(this->sncp()); // construct the point locator 
-#ifdef CGAL_NEF3_TIMER_INITIALIZE_KDTREE
-    timer_initialize_kdtree.stop();
-    if(cgal_nef3_timer_on)
-      std::cout << "Runtime_initialize_kdtree: " 
-		<< timer_initialize_kdtree.time() << std::endl;
-#endif
-
-    //   then, we determine the Shells which correspond to Volumes via a ray
-    //   shootting in the direction (-1,0,0) over the Sphere_map of the minimal 
-    //   vertex.  The Shell corresponds to a Volume if the object hit belongs 
-    //   to another Shell. 
-    
-    this->sncp()->new_volume(); // outermost volume (nirvana)
-    if(MinimalSFace.size() == 0) return;
-    Vertex_handle v_min = MinimalSFace[0]->center_vertex();
-    for( unsigned int i = 0; i < MinimalSFace.size(); ++i) {
-      //    progress2++;
-      Vertex_handle v = MinimalSFace[i]->center_vertex();
-      if(CGAL::lexicographically_xyz_smaller(v->point(),v_min->point()))
-	v_min=v;
-      CGAL_NEF_TRACEN( "Shell #" << i << " minimal vertex: " << v->point());
-      SM_point_locator D((Sphere_map*) &*v);
-      Object_handle o = D.locate(Sphere_point(-1,0,0));
-      SFace_const_handle sfc;
-      if( !CGAL::assign(sfc, o) || ShellSf[sfc] != i) {
-	CGAL_NEF_TRACEN("the shell encloses a volume");
-	CGAL_NEF_TRACEN("sface hit? "<<CGAL::assign(sfc,o));
-	if( CGAL::assign(sfc, o)) { CGAL_NEF_TRACEN("sface on another shell? "<<ShellSf[sfc]); }
-	SFace_handle f = MinimalSFace[i];
-	CGAL_assertion( ShellSf[f] == i );
-	if( Closed[i] ) {
-	  CGAL_NEF_TRACEN("Shell #" << i << " is closed");
-	  SM_decorator SD(&*v);
-	  Volume_handle c = this->sncp()->new_volume();
-	  c->mark() = f->mark(); // TODO test if line is redundant
-	  link_as_inner_shell(f, c );
-	  CGAL_NEF_TRACE( "Shell #" << i <<" linked as inner shell");
-	  CGAL_NEF_TRACEN( "(sface" << (CGAL::assign(sfc,o)?"":" not") << " hit case)");
-	}
-      }
-    }
-    
-    // finaly, we go through all the Shells which do not correspond to a Volume 
-    //     and we assign them to its enclosing Volume determined via a facet below
-    //     check. 
-    
-    CGAL_forall_sfaces(f,*this->sncp()) {
-      //    progress3++;
-      if ( f->volume() != Volume_handle() ) 
-	continue;
-      CGAL_NEF_TRACEN( "Outer shell #" << ShellSf[f] << " volume?");
-      Volume_handle c = determine_volume( MinimalSFace[ShellSf[f]], 
-					  MinimalSFace, ShellSf );
-      c->mark() = f->mark();
-      link_as_outer_shell( f, c );
-    } 
-  }
-
-  Halffacet_handle get_facet_below( Vertex_handle vi, 
-				    const std::vector< SFace_handle>& MinimalSFace, 
-				    const Sface_shell_hash&  Shell) const {
-    // {\Mop determines the facet below a vertex |vi| via ray shooting. }
-    
-    Halffacet_handle f_below;
-    Point_3 p = vi->point();
-    if(!Infi_box::is_standard(p))
-      return Halffacet_handle();
-    
-    Ray_3 ray = Ray_3(p, Direction_3(-1,0,0));
-#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
-    number_of_ray_shooting_queries++;
-    timer_ray_shooting.start();
-#endif 
-    Object_handle o = pl->shoot(ray);
-#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
-    timer_ray_shooting.stop();
-#endif 
-    // The ray here has an special property since it is shooted from the lowest
-    // vertex in a shell, so it would be expected that the ray goes along the
-    // interior of a volume before it hits a 2-skeleton element.
-    // Unfortunatelly, it seems to be possible that several shells are incident
-    // to this lowest vertex, and in consequence, the ray could also go along
-    // an edge or a facet belonging to a different shell.
-    // This fact invalidates the precondition of the get_visible_facet method,
-    // (the ray must pierce the local view of the hit object in a sface).
-    // This situation has not been analyzed and has to be verified. Granados.
-    Vertex_handle v;
-    Halfedge_handle e;
-    Halffacet_handle f;
-    CGAL_NEF_TRACEN("get_facet_below");
-    if( CGAL::assign(v, o)) {
-      CGAL_NEF_TRACEN("facet below from from vertex...");
-      f_below = get_visible_facet(v, ray);
-      if( f_below == Halffacet_handle()) {
-	CGAL_assertion(v->sfaces_begin() == v->sfaces_last());
-	f_below = get_facet_below(MinimalSFace[Shell[v->sfaces_begin()]]->center_vertex(), 
-				  MinimalSFace,Shell);
-      }
-    }
-    else if( CGAL::assign(e, o)) {
-      CGAL_NEF_TRACEN("facet below from from edge...");
-      f_below = get_visible_facet(e, ray);
-      if( f_below == Halffacet_handle()) {
-	CGAL_assertion(e->source()->sfaces_begin() == e->source()->sfaces_last());
-	f_below = get_facet_below(MinimalSFace[Shell[e->source()->sfaces_begin()]]->center_vertex(), 
-				  MinimalSFace, Shell);
-      }
-    }
-    else if( CGAL::assign(f, o)) {
-      CGAL_NEF_TRACEN("facet below from from facet...");
-      f_below = get_visible_facet(f, ray);
-      CGAL_assertion( f_below != Halffacet_handle());
-    }
-    else { CGAL_NEF_TRACEN("no facet below found..."); }
-    return f_below;
-  }  
-
-  Volume_handle determine_volume( SFace_handle sf, 
-                const std::vector< SFace_handle>& MinimalSFace, 
-				  const Sface_shell_hash&  Shell ) const {
-    //{\Mop determines the volume |C| that a shell |S| pointed by |sf| 
-    //  belongs to.  \precondition |S| separates the volume |C| from an enclosed
-    //  volume.}
-    
-    CGAL_NEF_TRACEN("determine volume");
-    Vertex_handle v_min = MinimalSFace[Shell[sf]]->center_vertex();
-    
-    Halffacet_handle f_below = get_facet_below(v_min, MinimalSFace, Shell);
-    if ( f_below == Halffacet_handle())
-      return SNC_decorator(*this).volumes_begin();
-    Volume_handle c = f_below->incident_volume();
-    if( c != Volume_handle()) {
-      CGAL_NEF_TRACE( "Volume " << &*c << " hit ");
-      CGAL_NEF_TRACEN("(Shell #" << Shell[adjacent_sface(f_below)] << ")");
-      return c;
-    }
-    SFace_handle sf_below = adjacent_sface(f_below);
-    CGAL_NEF_TRACE( "Shell not assigned to a volume hit ");
-    CGAL_NEF_TRACEN( "(Inner shell #" << Shell[sf_below] << ")");
-    c = determine_volume( sf_below, MinimalSFace, Shell);
-    link_as_inner_shell( sf_below, c);
-    return c;
-  }
-   
-  void build_external_structure() {
-
-#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
-    CGAL::Timer timer_external_structure;
-    timer_external_structure.start();
-#endif
-
-#ifdef CGAL_NEF3_TIMER_PLUECKER
-    CGAL::Timer timer_pluecker;
-    timer_pluecker.start();
-#endif
-    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
-    //    O0.print();
-    pair_up_halfedges();
-#ifdef CGAL_NEF3_TIMER_PLUECKER
-    timer_pluecker.stop();
-     if(cgal_nef3_timer_on)
-      std::cout << "Runtime_pluecker: " 
-		<< timer_pluecker.time() << std::endl;
-#endif
-    link_shalfedges_to_facet_cycles();
-    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
-    //    O0.print();
-    categorize_facet_cycles_and_create_facets();
-    create_volumes();
-
-#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
-    timer_external_structure.stop();
-    if(cgal_nef3_timer_on)
-      std::cout << "Runtime_external_structure: " 
-		<< timer_external_structure.time() << std::endl;
-#endif
-  }
-
-  template<typename Association>
-  void build_after_binary_operation(Association) {
-
-#ifdef CGAL_NEF3_TIMER_SIMPLIFICATION
-    CGAL::Timer timer_simplification;
-    timer_simplification.start();
-#endif
-    SNC_simplify simp(*this->sncp());
-    simp.vertex_simplification(SNC_simplify::NO_SNC);
-#ifdef CGAL_NEF3_TIMER_SIMPLIFICATION
-    timer_simplification.stop();
-    if(cgal_nef3_timer_on)
-      std::cout << "Runtime_simplification: " 
-		<< timer_simplification.time() << std::endl;
-#endif
-    
-    CGAL_NEF_TRACEN("\nnumber of vertices (so far...) = "
-		    << this->sncp()->number_of_vertices());
-    
-    CGAL_NEF_TRACEN("=> resultant vertices (after simplification): ");
-    
-    build_external_structure();
-  }
-
-  void clear_external_structure() {
-    this->sncp()->clear_snc_boundary();
-
-    while(this->sncp()->volumes_begin()!= this->sncp()->volumes_end())
-      this->sncp()->delete_volume(this->sncp()->volumes_begin());
-
-    while(this->sncp()->halffacets_begin()!= this->sncp()->halffacets_end())
-      this->sncp()->delete_halffacet_pair(this->sncp()->halffacets_begin());
-
-    SHalfedge_iterator se;
-    CGAL_forall_shalfedges(se,*this)
-      se->facet() = Halffacet_handle();
-
-    SFace_iterator sf;
-    CGAL_forall_sfaces(sf,*this)
-      sf->volume() = Volume_handle();
-  }
-}; 
-
-
-
-template <typename Items_, typename SNC_structure_>
-class SNC_external_structure : public SNC_external_structure_base<Items_, SNC_structure_>
-{ 
-  typedef CGAL::SNC_decorator<SNC_structure_>                 SNC_decorator;
-  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
-public:
-
-  SNC_external_structure( SNC_structure_& W, SNC_point_locator* spl = NULL) 
-    : SNC_external_structure_base<Items_, SNC_structure_>(W, spl) 
-  {}
-};
-
-
-
-
-template <typename SNC_structure_>
-class SNC_external_structure<SNC_indexed_items, SNC_structure_> 
-  : public SNC_external_structure_base<int, SNC_structure_> {
- 
-public:
-  typedef SNC_structure_                                SNC_structure;
-  typedef SNC_external_structure_base<int, SNC_structure>    Base;
-
-  typedef CGAL::SNC_decorator<SNC_structure>                 SNC_decorator;
-  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
-  typedef CGAL::SNC_FM_decorator<SNC_structure>              FM_decorator;
-  typedef typename SNC_structure::Sphere_map                 Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>                     SM_decorator;  
-  typedef CGAL::SNC_simplify<SNC_indexed_items, SNC_structure> SNC_simplify;
-
-  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator;
-  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator;
-  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator;
-
-  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
-  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
-
-  typedef typename SNC_structure::Object_handle Object_handle;
-
-  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
-    SHalfedge_around_facet_circulator;
-  typedef typename SM_decorator::SHalfedge_around_svertex_circulator 
-    SHalfedge_around_svertex_circulator;
-  
-  typedef typename SNC_structure::Plane_3 Plane_3;
-
-  using Base::make_twins;
-  using Base::link_as_prev_next_pair;
-  using Base::link_as_inner_shell;
-
-
-  SNC_external_structure( SNC_structure& W, SNC_point_locator* spl = NULL) 
-    : Base(W, spl) {}
-  /*{\Mcreate makes |\Mvar| a decorator of |W|.}*/
-
- public:
-  void pair_up_halfedges() const {
-    typedef Halfedge_key_lt4<Halfedge_handle>  Halfedge_key_lt;
-    typedef std::list<Halfedge_handle>  Halfedge_list;
-    typedef std::map<int, Halfedge_list, int_lt> index_map;
-
-    CGAL_NEF_TRACEN("pair up by indexes");
-
-    index_map i2he;
-    Halfedge_iterator ei;
-    CGAL_forall_halfedges(ei, *this->sncp()) 
-      i2he[ei->get_index()].push_back(ei);
-    
-    typename index_map::iterator it;
-    CGAL_forall_iterators(it,i2he) {
-      CGAL_NEF_TRACEN("pair up " << it->first);
-      it->second.sort(Halfedge_key_lt());
-      typename Halfedge_list::iterator itl;
-      CGAL_forall_iterators(itl,it->second) {
-	Halfedge_handle e1 = *itl;
-	CGAL_NEF_TRACEN(e1->source()->point() << ", " << e1->vector());
-	++itl; 
-	CGAL_assertion(itl != it->second.end());
-	Halfedge_handle e2 = *itl;
-	CGAL_NEF_TRACEN(" + " << e2->source()->point() << ", " << e2->vector());
-	make_twins(e1,e2);
-	//	SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
-	//	O0.print();
-	CGAL_assertion(e1->mark()==e2->mark());
-      }
-    }
-  }
-
-  void link_shalfedges_to_facet_cycles() const {
-  /*{\Mop creates all non-trivial facet cycles from sedges. 
-  \precond |pair_up_halfedges()| was called before.}*/
-    
-  //  CGAL_NEF_SETDTHREAD(43*31);
-    CGAL_NEF_TRACEN(">>>>>link_shalfedges_to_facet_cycles");
-
-    Halfedge_iterator e;
-    CGAL_forall_edges(e,*this->sncp()) {
-      //    progress++;
-      CGAL_NEF_TRACEN("");
-      CGAL_NEF_TRACEN(PH(e));
-      Halfedge_iterator et = e->twin();
-      SM_decorator D(&*e->source()), Dt(&*et->source());
-      CGAL_NEF_TRACEN(e->source()->point());
-      if ( D.is_isolated(e) ) continue;
-      SHalfedge_around_svertex_circulator ce(D.first_out_edge(e)),cee(ce);
-      SHalfedge_around_svertex_circulator cet(Dt.first_out_edge(et)),cete(cet);
-      
-      CGAL_For_all(cet,cete) {
-	//	std::cerr << cet->get_index() << ", " << ce->twin()->get_index() << std::endl;
-	if (cet->get_forward_index() == ce->twin()->get_backward_index())
-	    //	    cet->source()->twin() == ce->source())
-	  break;
-      }
-
-      CGAL_NEF_TRACEN("vertices " << e->source()->point() << 
-      "    "      << et->source()->point());
-      
-      SHalfedge_around_svertex_circulator sc(D.first_out_edge(e));
-      SHalfedge_around_svertex_circulator sct(Dt.first_out_edge(et));
-
-      CGAL_NEF_TRACEN("");
-      CGAL_For_all(sc,cee)
-	CGAL_NEF_TRACEN("sseg at E addr="<<&*sc<<
-			" src="<< sc->source()->point()<< 
-			" tgt="<< sc->target()->point()<< std::endl << 
-			" circle=" << sc->circle()<< std::endl <<
-			" indexes=" << sc->get_forward_index() << 
-			"," << sc->get_backward_index() << std::endl <<
-			"         " << sc->twin()->get_forward_index() <<
-			"," << sc->twin()->get_backward_index());
- 
-      CGAL_NEF_TRACEN("");
-
-      CGAL_For_all(sct,cete)
-      CGAL_NEF_TRACEN("sseg at ET addr="<<&*sct<<
-		      " src="<< sct->source()->point()<<
-		      " tgt="<<sct->target()->point() <<std::endl<<
-		      " circle=" << sct->circle() << std::endl<<
-		      " indexes=" << sct->get_forward_index() << 
-		      "," << sct->get_backward_index() << std::endl <<
-		      "         " << sct->twin()->get_forward_index() <<
-	              "," << sct->twin()->get_backward_index());
-      CGAL_NEF_TRACEN("");
-
-      CGAL_assertion( cet->get_index() == ce->twin()->get_index());
-      CGAL_assertion( cet->twin()->get_index() == ce->get_index());
-      CGAL_assertion( cet->source()->twin() == ce->source()); 
-      CGAL_For_all(ce,cee) { 
-	CGAL_NEF_TRACEN("circles " << cet->circle() << "   " << ce->circle() << 
-			" sources " << cet->target()->point() << 
-			"   " << ce->target()->point());
-	CGAL_assertion( cet->source()->twin() == ce->source()); 
-	CGAL_assertion(ce->mark()==cet->mark());
-	link_as_prev_next_pair(cet->twin(),ce);
-	link_as_prev_next_pair(ce->twin(),cet);
-	--cet; // ce moves ccw, cet moves cw
-      }
-    }
-  }
-
-  void categorize_facet_cycles_and_create_facets() const {
-  /*{\Mop collects all facet cycles incident to a facet and creates
-  the facets. \precond |link_shalfedges_to_facet_cycles()| was called
-  before.}*/
-
-    //    CGAL_NEF_SETDTHREAD(43*31);
-    CGAL_NEF_TRACEN(">>>>>categorize_facet_cycles_and_create_facets");
-    
-    typedef std::list<Object_handle> Object_list;
-    typedef std::map<int, Object_list> 
-      Map_planes;
-   
-    Map_planes M;
-    SHalfedge_iterator e;
-    CGAL_forall_shalfedges(e,*this->sncp()) {
-      if(e->get_index() > e->twin()->get_index())
-	continue;
-      M[e->get_index()].push_back(make_object(e));
-    }
-    SHalfloop_iterator l;
-    CGAL_forall_shalfloops(l,*this->sncp()) {
-      if(l->get_index() > l->twin()->get_index())
-	continue;
-      M[l->get_index()].push_back(make_object(l));
-    }
-    
-#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
-  number_of_plane_sweeps=0;
-  timer_plane_sweeps.reset();
-#endif
-
-    typename Map_planes::iterator it;
-    CGAL_forall_iterators(it,M) { 
-      CGAL_NEF_TRACEN("  plane "<< it->first);
-      CGAL_NEF_TRACEN("  size "<< it->second.size());
-      FM_decorator D(*this->sncp());
-      Plane_3 h;
-      Object_handle o(*it->second.begin());
-      if(CGAL::assign(e, o))
-	h = e->circle().opposite().plane_through(e->source()->source()->point());
-      else if(CGAL::assign(l, o))
-	h = l->circle().opposite().plane_through(l->incident_sface()->center_vertex()->point());
-      else
-	CGAL_error_msg( "wrong handle");
-
-      D.create_facet_objects(h,it->second.begin(),it->second.end());
-    }
-    //       CGAL_NEF_SETDTHREAD(1);
-  }
-
-  void create_volumes() {
-    Base::create_volumes();
-  }
-   
-  void build_external_structure() {
-//    CGAL_NEF_SETDTHREAD(503*509);
-
-#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
-    CGAL::Timer timer_external_structure;
-    timer_external_structure.start();
-#endif
-
-#ifdef CGAL_NEF3_TIMER_PLUECKER
-    CGAL::Timer timer_pluecker;
-    timer_pluecker.start();
-#endif
-    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
-    //    O0.print();
-    pair_up_halfedges();
-#ifdef CGAL_NEF3_TIMER_PLUECKER
-    timer_pluecker.stop();
-     if(cgal_nef3_timer_on)
-      std::cout << "Runtime_pluecker: " 
-		<< timer_pluecker.time() << std::endl;
-#endif
-     //     SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
-     //     O0.print();
-    link_shalfedges_to_facet_cycles();
-
-    std::map<int, int> hash;
-    CGAL::Unique_hash_map<SHalfedge_handle, bool> done(false);
-
-    SHalfedge_iterator sei;
-    CGAL_forall_shalfedges(sei, *this->sncp()) {
-      hash[sei->get_index()] = sei->get_index();
-    }
-    
-    CGAL_forall_shalfedges(sei, *this->sncp()) {
-      if(done[sei])
-	continue;
-      SHalfedge_around_facet_circulator circ(sei), end(circ);
-      int index = circ->get_index();
-      ++circ;
-      CGAL_For_all(circ, end)
-	if(circ->get_index() < index)
-	  index = circ->get_index();      
-      index = hash[index];
-      CGAL_For_all(circ, end) {
-	hash[circ->get_index()] = index;
-	circ->set_index(index);
-	done[circ] = true;
-      }
-    }
-    
-    SHalfloop_iterator sli;
-    CGAL_forall_shalfloops(sli, *this->sncp())
-      sli->set_index(hash[sli->get_index()]);
-
-    categorize_facet_cycles_and_create_facets();
-    create_volumes();
-
-#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
-    timer_external_structure.stop();
-    if(cgal_nef3_timer_on)
-      std::cout << "Runtime_external_structure: " 
-		<< timer_external_structure.time() << std::endl;
-#endif
-  }
-
-  void clear_external_structure() {
-    Base::clear_external_structure();    
-  }
-
-  template<typename Association>
-  void build_after_binary_operation(Association& A) {
-    
-    SHalfedge_iterator sei;
-    CGAL_forall_shalfedges(sei, *this->sncp()) {
-      CGAL_NEF_TRACEN("hash sedge " << sei->get_index() 
-		      << "->" << A.get_hash(sei->get_index()));
-      sei->set_index(A.get_hash(sei->get_index()));
-    }
-
-    SHalfloop_iterator sli;
-    CGAL_forall_shalfloops(sli, *this->sncp()) {
-      CGAL_NEF_TRACEN("hash sloop " << sli->get_index() 
-		      << "->" << A.get_hash(sli->get_index()));
-      sli->set_index(A.get_hash(sli->get_index()));
-    }
-
-    //    CGAL_NEF_SETDTHREAD(43);
-    /*
-    {    CGAL::SNC_io_parser<SNC_structure> O
-      (std::cerr, *this->sncp(), false, true);
-      O.print();}
-    */
-    pair_up_halfedges();
-    /*
-    {      CGAL::SNC_io_parser<SNC_structure> O
-	(std::cerr, *this->sncp(), false, true);
-      O.print();}
-    */
-    link_shalfedges_to_facet_cycles();
-
-    SNC_simplify simp(*this->sncp());
-    simp.vertex_simplificationI();
-
-    //    std::map<int, int> hash;
-    CGAL::Unique_hash_map<SHalfedge_handle, bool> 
-      done(false);
-
-    /*
-    SHalfedge_iterator sei;
-    CGAL_forall_shalfedges(sei, *this->sncp()) {
-      hash[sei->get_forward_index()] = sei->get_forward_index();
-      hash[sei->get_backward_index()] = sei->get_backward_index();
-    }
-    */
-
-    categorize_facet_cycles_and_create_facets();
-    create_volumes();
-  }
-}; 
-
-} //namespace CGAL
-#endif //CGAL_SNC_EXTERNAL_STRUCTURE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_io_parser.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_io_parser.h
deleted file mode 100644
index b15d1d8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_io_parser.h
+++ /dev/null
@@ -1,2086 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
-//                 Miguel Granados <granados at mpi-sb.mpg.de>
-//                 Susan Hert      <hert at mpi-sb.mpg.de>
-//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_SNC_IO_PARSER_H
-#define CGAL_SNC_IO_PARSER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_3/SNC_structure.h>
-#include <CGAL/Nef_3/SNC_decorator.h>
-#include <CGAL/Nef_3/SNC_constructor.h>
-#include <CGAL/Nef_2/Object_index.h>
-#include <CGAL/Nef_S2/Normalizing.h>
-#include <vector>
-#include <CGAL/Fraction_traits.h>
-#include <CGAL/Homogeneous_converter.h>
-#include <CGAL/Cartesian_converter.h>
-
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 293
-#include <CGAL/Nef_2/debug.h>
-
-#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <boost/any.hpp>
-#endif
-
-#include <boost/mpl/has_xxx.hpp>
-
-namespace CGAL {
-
-template <class NT> class Lazy_exact_nt;
-class Homogeneous_tag;
-class Cartesian_tag;
-template <class T> struct Simple_cartesian;
-template <class T1, class T2> struct Simple_homogeneous;
-template <class RT> class Quotient;
-
-namespace Nef_3_internal{
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_Exact_kernel,Exact_kernel,false)
-
-template <class R,bool has_exact_kernel=Has_nested_Exact_kernel<R>::value, class FT = typename R::RT, class Kernel_tag=typename R::Kernel_tag>
-struct Type_converter{
-  typedef const CGAL::Point_3<R>& Point_3;
-  typedef const CGAL::Vector_3<R>& Vector_3;
-  typedef const CGAL::Plane_3<R>& Plane_3;
-
-  static Point_3 convert(Point_3 p){return p;}
-  static Plane_3 convert(Plane_3 p){return p;}
-  static Vector_3 convert(Vector_3 v){return v;}
-};
-
-template <class R>
-struct Type_converter<R, true>{
-  typedef CGAL::Point_3<typename R::Exact_kernel> Point_3;
-  typedef CGAL::Plane_3<typename R::Exact_kernel> Plane_3;
-  typedef CGAL::Vector_3<typename R::Exact_kernel> Vector_3;
-
-  static Point_3 convert(const CGAL::Point_3<R>& p){return p.exact();}
-  static Plane_3 convert(const CGAL::Plane_3<R>& p){return p.exact();}
-  static Vector_3 convert(const CGAL::Vector_3<R>& v){return v.exact();}
-};
-
-template <class R, class NT>
-struct Type_converter<R, false, ::CGAL::Lazy_exact_nt<NT>, ::CGAL::Cartesian_tag >{
-  typedef CGAL::Simple_cartesian< NT > EK;
-  typedef CGAL::Cartesian_converter<R, EK> Converter;
-  typedef CGAL::Point_3<EK> Point_3;
-  typedef CGAL::Plane_3<EK> Plane_3;
-  typedef CGAL::Vector_3<EK> Vector_3;
-
-  static Point_3 convert(const CGAL::Point_3<R>& p){return Converter()(p);}
-  static Plane_3 convert(const CGAL::Plane_3<R>& p){return Converter()(p);}
-  static Vector_3 convert(const CGAL::Vector_3<R>& v){return Converter()(v);}
-};
-
-template <class R, class NT>
-struct Type_converter<R, false, ::CGAL::Lazy_exact_nt<NT>, ::CGAL::Homogeneous_tag>{
-  typedef CGAL::Simple_homogeneous< NT, CGAL::Quotient<NT> > EK;
-  typedef CGAL::Homogeneous_converter<R, EK> Converter;
-  typedef CGAL::Point_3<EK> Point_3;
-  typedef CGAL::Plane_3<EK> Plane_3;
-  typedef CGAL::Vector_3<EK> Vector_3;
-
-  static Point_3 convert(const CGAL::Point_3<R>& p){return Converter()(p);}
-  static Plane_3 convert(const CGAL::Plane_3<R>& p){return Converter()(p);}
-  static Vector_3 convert(const CGAL::Vector_3<R>& v){return Converter()(v);}
-};
-
-
-template <class R>
-typename Type_converter<R>::Point_3 get_point(const CGAL::Point_3<R>& p){ return Type_converter<R>::convert(p); }
-
-template <class R>
-typename Type_converter<R>::Plane_3 get_plane(const CGAL::Plane_3<R>& p){ return Type_converter<R>::convert(p); }
-
-template <class R>
-typename Type_converter<R>::Vector_3 get_vector(const CGAL::Vector_3<R>& v){ return Type_converter<R>::convert(v); }
-
-} //end of Nef_3_internal
-
-template<typename T>
-class moreLeft : public T {
-  
-  typedef typename T::SM_decorator      SM_decorator;
-  typedef typename T::SHalfedge_handle  SHalfedge_handle;
-  typedef typename T::Vector_3          Vector_3;
-  typedef typename T::FT                FT;
-  typedef typename T::RT                RT;
- 
- public:
-  moreLeft(T D) : T(D) {}
-  
-  int operator()(SHalfedge_handle se1, SHalfedge_handle se2) {
-
-    CGAL_assertion(se1 != SHalfedge_handle());
-    if(se2 == SHalfedge_handle())
-      return -1;
-
-    SM_decorator SM(&*se1->source()->source());
-    Vector_3 vec1 = se1->circle().orthogonal_vector();
-    Vector_3 vec2 = se2->circle().orthogonal_vector();
-
-    if(vec1 == vec2)
-      return 0;
-    
-    if(vec1.x() == RT(0) && vec2.x() == RT(0)) {
-      if(vec1.y() != vec2.y()) {
-	if(vec1.y() < vec2.y())
-	  return -1;
-	else 
-	  return 1;
-      }
-      if(vec1.z() < vec2.z())
-	return -1;
-      else
-	return 1;
-    }
-    
-    Vector_3 minus(-1,0,0);
-    FT sk1(minus*vec1),  sk2(minus*vec2);
-    if((sk1 >= FT(0) && sk2 <= FT(0)) ||
-       (sk1 <= FT(0) && sk2 >= FT(0))) {
-      if(sk1 > FT(0) || sk2 < FT(0))
-	return -1;
-      else
-	return 1;
-    }
-
-    FT len1 = vec1.x()*vec1.x()+vec1.y()*vec1.y()+vec1.z()*vec1.z();
-    FT len2 = vec2.x()*vec2.x()+vec2.y()*vec2.y()+vec2.z()*vec2.z();
-    FT diff = len1*sk2*sk2 - len2*sk1*sk1;
-    
-    if(diff != FT(0)) {
-      if((sk1>FT(0) && diff<FT(0)) || (sk1<FT(0) && diff>FT(0)))
-	return -1;
-      else 
-	return 1;
-    }
-
-    return 0;
-  }
-};
-
-template <typename T>
-class sort_vertices : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;
-  typedef CGAL::SNC_decorator<T>          Base;
-  typedef typename T::Vertex_handle Vertex_handle;
-  typedef typename T::Point_3       Point_3;
-  
- public:
-  sort_vertices(T& D) : Base(D) {}
-  
-  bool operator() (Vertex_handle v1, Vertex_handle v2) const {
-    return lexicographically_xyz_smaller(v1->point(), v2->point());
-  }
-};
-  
-template <typename T>
-class sort_edges : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;  
-  typedef CGAL::SNC_decorator<T>            Base;
-  typedef typename T::Halfedge_handle Halfedge_handle;
-  
- public:
-  sort_edges(T& D) : Base(D) {}
-  
-  bool operator() (Halfedge_handle e1, Halfedge_handle e2) const {
-    sort_vertices<T> SORT(*this->sncp());
-    if(e1->source() != e2->source())
-      return SORT(e1->source(),e2->source());
-    return SORT(e1->twin()->source(), e2->twin()->source());
-  }
-};
-
-template <typename T>
-class sort_facets : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;  
-  typedef SNC_decorator<T>             Base;
-  typedef typename T::Halffacet_handle Halffacet_handle;
-  typedef typename T::SHalfedge_handle SHalfedge_handle;
-  typedef typename T::Vector_3         Vector_3;
-  typedef typename T::Plane_3          Plane_3;
-
- public:
-  sort_facets(T& D) : Base(D) {}
-  
-  bool operator() (Halffacet_handle f1, Halffacet_handle f2) const {
-    
-
-    Plane_3 p1(f1->plane());
-    Plane_3 p2(f2->plane());
-    
-    if(p1.d() != p2.d())
-      return p1.d() < p2.d();
-    else if(p1.a() != p2.a())
-      return p1.a() < p2.a();
-    else if(p1.b() != p2.b())
-      return p1.b() < p2.b();    
-    else if(p1.c() != p2.c())
-      return p1.c() < p2.c();    
-
-    SHalfedge_handle se1 = SHalfedge_handle(f1->facet_cycles_begin());
-    SHalfedge_handle se2 = SHalfedge_handle(f2->facet_cycles_begin());
-    
-    sort_vertices<T> SORT(*this->sncp());
-    if(se1->source()->source() != se2->source()->source())
-      return SORT(se1->source()->source(), se2->source()->source());
-
-    se1 = se1->next();
-    se2 = se2->next();
-    CGAL_assertion(se1->source()->source() != se2->source()->source());
-    return SORT(se1->source()->source(), se2->source()->source());
-
- 
-  }
-};
-
-template <typename T>
-class sort_sedges : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;  
-  typedef CGAL::SNC_decorator<T>             Base;
-  typedef CGAL::SM_decorator<T>          SM_decorator;
-  typedef typename T::Vertex_handle    Vertex_handle;
-  typedef typename T::SHalfedge_handle SHalfedge_handle;
-  typedef typename T::Sphere_circle    Sphere_circle;
-
- public:
-  sort_sedges(T& D) : Base(D) {}
-  
-  bool operator() (SHalfedge_handle se1, SHalfedge_handle se2) const {
-    CGAL_NEF_TRACEN("sort sedges");
-    if(se1 == se2) return false;
-    sort_vertices<T> SORT(*this->sncp());
-    CGAL_NEF_TRACEN("  center verices: " << se1->source()->source()->point() << 
-		    " , " << se2->source()->source()->point());
-    if(se1->source()->source() != se2->source()->source())
-      return SORT(se1->source()->source(),se2->source()->source());
-    if(se1 == se2->twin()) {
-      if(se1->source() == se2->source()) {
-	Sphere_circle vec1 = se1->circle();
-	Sphere_circle vec2 = se2->circle();
-	if(vec1.a() != vec2.a())
-	  return vec1.a() < vec2.a();
-	else if(vec1.b() != vec2.b())
-	  return vec1.b() < vec2.b();
-	return vec1.c() < vec2.c();     	
-      }
-      else
-	return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
-    }
-
-    if(SORT(se1->twin()->source()->twin()->source(), 
-	    se1->source()->twin()->source()))
-      se1 = se1->twin();
-    if(SORT(se2->twin()->source()->twin()->source(), 
-	    se2->source()->twin()->source()))
-      se2 = se2->twin();
-    CGAL_NEF_TRACEN("  ssources " << se1->source()->twin()->source()->point() 
-		    << " , " << se2->source()->twin()->source()->point());
-    if(se1->source() != se2->source())
-      return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
-    CGAL_NEF_TRACEN("  starget " << se1->twin()->source()->twin()->source()->point() << 
-		    " , " << se2->twin()->source()->twin()->source()->point());
-    if(se1->twin()->source()->twin()->source() != se2->twin()->source()->twin()->source())
-      return SORT(se1->twin()->source()->twin()->source(), se2->twin()->source()->twin()->source());
-
-    CGAL_assertion(se1->circle() != se2->circle());
-    Sphere_circle vec1 = se1->circle();
-    Sphere_circle vec2 = se2->circle();
- 
-    if(vec1.a() != vec2.a())
-      return vec1.a() < vec2.a();
-    else if(vec1.b() != vec2.b())
-      return vec1.b() < vec2.b();
-    return vec1.c() < vec2.c();     
-  }
-};
-
-
-template <typename T>
-class sort_sloops : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;  
-  typedef CGAL::SNC_decorator<T>             Base;
-  typedef typename T::SHalfloop_handle SHalfloop_handle;
-  
- public:
-  sort_sloops(T& D) : Base(D) {}
-  
-  bool operator() (SHalfloop_handle sl1, SHalfloop_handle sl2) const {
-    if(sl1 == sl2) return false;
-    sort_vertices<T> SORTV(*this->sncp());
-    sort_facets<T> SORTF(*this->sncp());
-    if(sl1->incident_sface()->center_vertex() != sl2->incident_sface()->center_vertex())
-      return SORTV(sl1->incident_sface()->center_vertex(),sl2->incident_sface()->center_vertex());
-    return SORTF(sl1->facet(), sl2->facet());
-  }
-};
-
-template <typename T>
-class sort_sface_cycle_entries : public SNC_decorator<T> {
-  
-  typedef T                             SNC_structure;  
-  typedef CGAL::SNC_decorator<T>        Base;
-  typedef typename T::SM_decorator      SM_decorator;
-  typedef typename T::Object_handle     Object_handle;
-  typedef typename T::SVertex_handle    SVertex_handle;
-  typedef typename T::SHalfedge_handle  SHalfedge_handle;
-  typedef typename T::SHalfloop_handle  SHalfloop_handle;
-  typedef typename T::SFace_handle      SFace_handle;
-  typedef typename T::Point_3           Point_3;
-  typedef typename T::Vector_3          Vector_3;
-  
- public:
-  sort_sface_cycle_entries(T D) : Base(D) {}
-  
-  bool operator() (Object_handle o1, Object_handle o2) const {
-    CGAL_NEF_TRACEN("sort sface cycles ");
-    SVertex_handle sv1, sv2;
-    SHalfedge_handle se1, se2;
-    SHalfloop_handle sl1, sl2;
-
-    if(!CGAL::assign(se1,o1) && !CGAL::assign(sl1,o1) && !CGAL::assign(sv1,o1))
-      CGAL_error_msg("wrong handle");
-    
-    if(!CGAL::assign(se2,o2) && !CGAL::assign(sl2,o2) && !CGAL::assign(sv2,o2))
-      CGAL_error_msg("wrong handle");    
-    
-    if(se1 != SHalfedge_handle() && se2 == SHalfedge_handle())
-      return true;
-
-    if(se1 == SHalfedge_handle() && se2 != SHalfedge_handle())
-      return false;
-
-    if(sl1 != SHalfloop_handle() && sv2 != SVertex_handle())
-      return true;
-
-    if(sl2 != SHalfloop_handle() && sv1 != SVertex_handle())
-      return false;
-
-    if(se1 != SHalfedge_handle() && se2 != SHalfedge_handle()) {
-      CGAL_NEF_TRACEN("  sedges " << &*se1 << " , " << &*se2);
-      sort_sedges<SNC_structure> SORT(*this->sncp());
-      return SORT(se1,se2);
-      /*
-	sort_vertices<SNC_structure> SORT(*this->sncp());
-      if(ssource(se1) != ssource(se2))
-	return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
-      else
-	return SORT(se1->target(), se2->target());
-      */
-    }
-
-    if(sl1 != SHalfloop_handle() && sl2 != SHalfloop_handle()) {
-      Vector_3 vec1(sl1->circle().orthogonal_vector());
-      Vector_3 vec2(sl2->circle().orthogonal_vector());
-      //      CGAL_assertion(vec1 == vec2.antipode());
-      if(vec1.x() != vec2.x())
-	return vec1.x() < vec2.x();
-      else if(vec1.y() != vec2.y())
-	return vec1.y() < vec2.y();
-      else if(vec1.z() != vec2.z())
-	return vec1.z() < vec2.z();          
-    }
-
-    CGAL_assertion(sv1 != SVertex_handle() && sv2 != SVertex_handle());
-    sort_vertices<SNC_structure> SORT(*this->sncp());
-    return SORT(sv1->twin()->source(), sv2->twin()->source());
-  }
-};
-
-template <typename T>
-class sort_sfaces : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;
-  typedef CGAL::SNC_decorator<T>            Base;
-  typedef typename T::SM_decorator          SM_decorator;
-  typedef typename T::Point_3               Point_3;
-  typedef typename T::Vector_3              Vector_3;
-  typedef typename T::SVertex_handle        SVertex_handle;
-  typedef typename T::SHalfedge_handle      SHalfedge_handle;
-  typedef typename T::SHalfloop_handle      SHalfloop_handle;
-  typedef typename T::SFace_handle          SFace_handle;
-  typedef typename T::SFace_cycle_iterator  SFace_cycle_iterator;
-  typedef typename T::SHalfedge_around_sface_circulator
-                      SHalfedge_around_sface_circulator;
-  
- public:
-  sort_sfaces(T& D) : Base(D) {}
-
-  bool operator() (SFace_handle sf1, SFace_handle sf2) const {
-    CGAL_NEF_TRACEN("sort sfaces");
-    if(&*sf1 == &*sf2) return false;
-    
-    sort_vertices<T> SORT(*this->sncp());
-    
-    CGAL_NEF_TRACEN("  vertices " << sf1->center_vertex()->point() << " , " << sf2->center_vertex()->point());
-    if(sf1->center_vertex() != sf2->center_vertex())
-      return SORT(sf1->center_vertex(), sf2->center_vertex());
-
-    //    sort_sface_cycle_entries<Base> sort_cycles((Base) *this);
-    //    return sort_cycles(*sf1->sface_cycles_begin(), *sf2->sface_cycles_begin());
-
-    SM_decorator SD(&*sf1->center_vertex());
-    moreLeft<Base> ml((Base) *this);
-    Vector_3 plus(1,0,0);
-
-    SFace_cycle_iterator fc;
-  
-    CGAL_NEF_TRACEN("  sface 1");
-
-    SHalfedge_handle se1;
-    SHalfloop_handle sl1;
-    CGAL_forall_sface_cycles_of(fc,sf1) {
-      if(fc.is_shalfedge()) {
-	SHalfedge_handle se(fc);
-	SHalfedge_around_sface_circulator ec(se),ee(se);
-	CGAL_For_all(ec,ee) {
-	  CGAL_NEF_TRACEN("     " << ec->source()->point() << 
-		 " | " << ec->circle().orthogonal_vector());
-	  if(ml(ec, se1) == -1)
-	    se1 = ec;
-	}
-      }
-      else if(fc.is_shalfloop())
-	sl1 = SHalfloop_handle(fc);
-      else
-	CGAL_assertion(fc.is_svertex());
-    }
-
-    CGAL_NEF_TRACEN("  sface 2");
-  
-    SHalfedge_handle se2;
-    SHalfloop_handle sl2;
-    CGAL_forall_sface_cycles_of(fc,sf2) {
-      if(fc.is_shalfedge()) {
-	SHalfedge_handle se(fc);
-	SHalfedge_around_sface_circulator ec(se),ee(se);
-	CGAL_For_all(ec,ee) { 
-	  CGAL_NEF_TRACEN("     " << ec->source()->point() << 
-		 " | " << ec->circle().orthogonal_vector());
-	  if(ml(ec, se2) == -1)
-	    se2 = ec;
-	}
-      }
-      else if(fc.is_shalfloop())
-	sl2 = SHalfloop_handle(fc);
-      else
-	CGAL_assertion(fc.is_svertex());
-    }
-  
-    CGAL_NEF_TRACEN("  sedge cycles existing? " << (se1 != SHalfedge_handle()) 
-	   << " , " << (se2 != SHalfedge_handle()));
-
-    if(se1 != SHalfedge_handle() && se2 == SHalfedge_handle())
-      return true;
-    if(se1 == SHalfedge_handle() && se2 != SHalfedge_handle())
-      return false;  
-  
-    if(se1 == SHalfedge_handle() && se2 == SHalfedge_handle()) {
-      Vector_3 vec1 = sl1->circle().orthogonal_vector();
-      Vector_3 vec2 = sl2->circle().orthogonal_vector();
-      CGAL_NEF_TRACEN("  sloops " << vec1 << " , " << vec2);
-      if(vec1.x() != vec2.x())
-	return vec1.x() < vec2.x();
-      else if(vec1.y() != vec2.y())
-	return vec1.y() < vec2.y();
-      else if(vec1.z() != vec2.z())
-	return vec1.z() < vec2.z();     
-    }
-    
-    CGAL_assertion(se1 != SHalfedge_handle() && se2 != SHalfedge_handle());
-
-    CGAL_NEF_TRACEN("  minimal sedge in sface 1:" << se1->source()->point() << 
-	   " , " << se1->circle().orthogonal_vector());
-    CGAL_NEF_TRACEN("  minimal sedge in sface 2:" << se2->source()->point() << 
-	   " , " << se2->circle().orthogonal_vector());
-    CGAL_NEF_TRACEN("result " << ml(se1,se2));
-    switch(ml(se1, se2)) {
-    case -1: return true;
-    case  1: return false;
-    }
-    sort_sface_cycle_entries<T> SORTSFC(*this->sncp());
-    return SORTSFC(*sf1->sface_cycles_begin(), *sf2->sface_cycles_begin());
-  }
-};
-
-template <typename T>
-class sort_volumes : public SNC_decorator<T> {
-  
-  typedef T SNC_structure;
-  typedef CGAL::SNC_decorator<T>    Base;
-  typedef typename T::Volume_handle Volume_handle;
-  typedef typename T::SFace_handle  SFace_handle;
-  
- public:
-  sort_volumes(T& D) : Base(D) {}
-  
-  bool operator() (Volume_handle c1, Volume_handle c2) const {
-    CGAL_NEF_TRACEN("sort volumes");
-    SFace_handle sf1 = SFace_handle(c1->shells_begin()); 
-    SFace_handle sf2 = SFace_handle(c2->shells_begin()); 
-
-    sort_sfaces<T> SORT(*this->sncp());
-    return SORT(sf1, sf2);
-  }
-};
-
-template <typename T>
-class sort_facet_cycle_entries : public T {
-  
-  typedef typename T::SNC_structure     SNC_structure;
-  typedef typename T::SM_decorator      SM_decorator;
-  typedef typename T::Object_handle     Object_handle;
-  typedef typename T::SHalfedge_handle  SHalfedge_handle;
-  typedef typename T::SHalfloop_handle  SHalfloop_handle;
-  typedef typename T::SFace_handle      SFace_handle;
-  typedef typename T::Point_3           Point_3;
-  typedef typename T::Vector_3          Vector_3;
-  
- public:
-  sort_facet_cycle_entries(T D) : T(D) {}
-  
-  bool operator() (Object_handle o1, Object_handle o2) const {
-    
-    SHalfedge_handle se1, se2;
-    SHalfloop_handle sl1, sl2;
-    
-    if(!CGAL::assign(se1,o1) && !CGAL::assign(sl1,o1))
-      CGAL_error_msg("wrong handle");
-    
-    if(!CGAL::assign(se2,o2) && !CGAL::assign(sl2,o2))
-      CGAL_error_msg("wrong handle");    
-    
-    if(se1 != SHalfedge_handle() && se2 != SHalfedge_handle()) {
-      sort_vertices<SNC_structure> SORT(*this->sncp());
-      return SORT(se1->source()->source(), se2->source()->source());
-    }
-
-    if(se1 != SHalfedge_handle())
-      return true;
-    if(se2 != SHalfedge_handle())
-      return false;
-
-    CGAL_assertion(sl1 != SHalfloop_handle() && 
-			sl2 != SHalfloop_handle());
-
-    SM_decorator SD(&*sl1->incident_sface()->center_vertex());
-    Vector_3 vec1(sl1->circle().orthogonal_vector());
-    Vector_3 vec2(sl2->circle().orthogonal_vector());
-    //    CGAL_assertion(vec1 == vec2.antipode());
-    if(vec1.x() != vec2.x())
-      return vec1.x() < vec2.x();
-    else if(vec1.y() != vec2.y())
-      return vec1.y() < vec2.y();
-    else
-      return vec1.z() < vec2.z();          
-  }
-};
-
-template <typename T>
-class sort_shell_entries : public T {
-  
-  typedef typename T::Object_handle Object_handle;
-  typedef typename T::Shell_entry_iterator  Shell_entry_iterator;
-  typedef typename T::SFace_handle  SFace_handle;
-  typedef typename T::Point_3       Point_3;
-  
- public:
-  sort_shell_entries(T D) : T(D) {}
-  
-  bool operator() (Object_handle o1, Object_handle o2) const {
-    SFace_handle sf1, sf2;
-    CGAL::assign(sf1, o1);
-    CGAL::assign(sf2, o2);
-    Point_3 p1(sf1->center_vertex()->point()), p2(sf2->center_vertex()->point());
-    if(p1.x() != p2.x())
-      return p1.x() < p2.x();
-    else if(p1.y() != p2.y())
-      return p1.y() < p2.y();
-    return p1.z() < p2.z();
-  }
-};
-
-template<typename T>
-struct find_minimal_sface_of_shell : public SNC_decorator<T> {
-  
-  typedef T                               SNC_structure;
-  typedef CGAL::SNC_decorator<T>          Base;
-  typedef typename T::Vertex_handle       Vertex_handle;
-  typedef typename T::Halfedge_handle     Halfedge_handle;
-  typedef typename T::Halffacet_handle    Halffacet_handle;
-  typedef typename T::SFace_handle        SFace_handle;
-  typedef typename T::SHalfedge_handle    SHalfedge_handle;
-  typedef typename T::SHalfloop_handle    SHalfloop_handle;
-  typedef CGAL::Unique_hash_map<SFace_handle,bool> SFace_visited_hash;
-
-  SFace_visited_hash& Done;
-  SFace_handle sf_min;
-  sort_sfaces<T> SORT;
-  
-  find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi) 
-    : Base(D), Done(Vi), SORT(D) {}
-  
-  void visit(SFace_handle h) { 
-    Done[h]=true;
-    if(sf_min == SFace_handle())
-      sf_min = h;
-    else {
-      if(SORT(h,sf_min))
-	sf_min = h;
-    }
-  }
-  
-  void visit(Vertex_handle ) {}
-  void visit(Halfedge_handle ) {}
-  void visit(Halffacet_handle ) {}
-  void visit(SHalfedge_handle ) {}
-  void visit(SHalfloop_handle ) {}
-
-  SFace_handle& minimal_sface() { return sf_min; }
-};
-
-
-template<typename Tag, typename Kernel> class Geometry_io;
-
-template<typename Kernel>
-class Geometry_io<Cartesian_tag, Kernel> {
- public:
-  template <typename EK, typename K> static
-  typename EK::Point_3 read_point(std::istream& in) {
-    typedef Fraction_traits<typename K::FT> FracTraits;
-    typename FracTraits::Type hx, hy, hz, hw;
-    typename FracTraits::Numerator_type num;
-    typename FracTraits::Denominator_type denom(1);
-    typename FracTraits::Compose composer;
-    in >> num;
-    hx = composer(num, denom);
-    in >> num;
-    hy = composer(num, denom);
-    in >> num;
-    hz = composer(num, denom);
-    in >> num;
-    hw = composer(num, denom);
-    return typename EK::Point_3(hx,hy,hz,hw);
-  }
-
-  template <typename EK, typename K> static
-  typename EK::Plane_3 read_plane(std::istream& in) {
-    typedef Fraction_traits<typename K::FT> FracTraits;
-    typename FracTraits::Type a, b, c, d;
-    typename FracTraits::Numerator_type num;
-    typename FracTraits::Denominator_type denom(1);
-    typename FracTraits::Compose composer;
-    in >> num;
-    a = composer(num, denom);
-    in >> num;
-    b = composer(num, denom);
-    in >> num;
-    c = composer(num, denom);
-    in >> num;
-    d = composer(num, denom);
-    return typename EK::Plane_3(a,b,c,d);
-  }
-
-  template <typename R> static
-    void print_point_impl(std::ostream& out, const CGAL::Point_3<R> p) {
-    typedef Fraction_traits<typename R::FT> FracTraits;
-    typedef std::vector<typename FracTraits::Numerator_type> NV;
-
-    typename FracTraits::Numerator_type num;
-    typename FracTraits::Denominator_type denom;
-    typename FracTraits::Decompose decomposer;
-    NV vec;
-
-    decomposer(p.x(),num,denom);
-    vec.push_back(num);
-    vec.push_back(denom);
-    vec.push_back(denom);
-    vec.push_back(denom);
-    decomposer(p.y(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=num;
-    vec[2]*=denom;
-    vec[3]*=denom;
-    decomposer(p.z(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=denom;
-    vec[2]*=num;
-    vec[3]*=denom;
-    Normalizing<Homogeneous_tag>::
-      normalized(vec.begin(),vec.end());
-    out << vec[0] << " " << vec[1] << " "
-	<< vec[2] << " " << vec[3];
-  }
-
-  template <typename R> static
-    void print_vector_impl(std::ostream& out, const CGAL::Vector_3<R> p) {
-    typedef Fraction_traits<typename R::FT> FracTraits;
-    typedef typename FracTraits::Numerator_type NumType;
-    typedef std::vector<NumType> NV;
-
-    typename FracTraits::Numerator_type num;
-    typename FracTraits::Denominator_type denom;
-    typename FracTraits::Decompose decomposer;
-    NV vec;
-
-    decomposer(p.x(),num,denom);
-    vec.push_back(num);
-    vec.push_back(denom);
-    vec.push_back(denom);
-    decomposer(p.y(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=num;
-    vec[2]*=denom;
-    decomposer(p.z(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=denom;
-    vec[2]*=num;
-    Normalizing<Homogeneous_tag>::
-      normalized(vec.begin(),vec.end());
-    out << vec[0] << " " << vec[1] << " "
-	<< vec[2] << " " << NumType(1);
-  }
-
-  template <typename R> static
-  void print_plane_impl(std::ostream& out, const CGAL::Plane_3<R> p) {
-    typedef Fraction_traits<typename R::FT> FracTraits;
-    typedef std::vector<typename FracTraits::Numerator_type> NV;
-
-    typename FracTraits::Numerator_type num;
-    typename FracTraits::Denominator_type denom;
-    typename FracTraits::Decompose decomposer;
-    NV vec;
-
-    decomposer(p.a(),num,denom);
-    vec.push_back(num);
-    vec.push_back(denom);
-    vec.push_back(denom);
-    vec.push_back(denom);
-    decomposer(p.b(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=num;
-    vec[2]*=denom;
-    vec[3]*=denom;
-    decomposer(p.c(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=denom;
-    vec[2]*=num;
-    vec[3]*=denom;
-    decomposer(p.d(),num,denom);
-    vec[0]*=denom;
-    vec[1]*=denom;
-    vec[2]*=denom;
-    vec[3]*=num;
-    Normalizing<Homogeneous_tag>::
-      normalized(vec.begin(),vec.end());
-
-    out << vec[0] << " " << vec[1] << " "
-	<< vec[2] << " " << vec[3];
-  }
-
-  template <class R> static
-  void print_point(std::ostream& out, const CGAL::Point_3<R>& p) {
-    print_point_impl(out, Nef_3_internal::get_point(p) );
-  }
-
-  template <class R> static
-  void print_vector(std::ostream& out, const CGAL::Vector_3<R>& v) {
-    print_vector_impl(out, Nef_3_internal::get_vector(v) );
-  }
-
-  template <class R> static
-  void print_plane(std::ostream& out, const CGAL::Plane_3<R>& p) {
-    print_plane_impl(out, Nef_3_internal::get_plane(p) );
-  }
-
-};
-
-template<typename Kernel>
-class Geometry_io<Homogeneous_tag, Kernel> {
- public:
-  template <typename EK, typename K> static
-  typename EK::Point_3 read_point(std::istream& in) {
-    typename K::RT hx, hy, hz, hw;
-    in >> hx >> hy >> hz >> hw;
-    return typename EK::Point_3(hx, hy, hz, hw);
-  }
-
-  template <typename EK, typename K> static
-  typename EK::Plane_3 read_plane(std::istream& in) {
-    typename K::RT a, b, c, d;
-    in >> a >> b >> c >> d;
-    return typename EK::Plane_3(a, b, c, d);
-  }
-
-  template <typename R> static
-  void print_point_impl(std::ostream& out, const CGAL::Point_3<R>& p) {
-    out << p;
-  }
-
-  template <typename R> static
-  void print_vector_impl(std::ostream& out, const CGAL::Vector_3<R>& vec) {
-    out << vec;
-  }
-
-  template <typename R> static
-  void print_plane_impl(std::ostream& out, const CGAL::Plane_3<R>& p) {
-    out << p;
-  }
-
-  template <class R> static
-  void print_point(std::ostream& out, const CGAL::Point_3<R>& p) {
-    print_point_impl(out, Nef_3_internal::get_point(p) );
-  }
-
-  template <class R> static
-  void print_vector(std::ostream& out, const CGAL::Vector_3<R>& v) {
-    print_vector_impl(out, Nef_3_internal::get_vector(v) );
-  }
-
-  template <class R> static
-  void print_plane(std::ostream& out, const CGAL::Plane_3<R>& p) {
-    print_plane_impl(out, Nef_3_internal::get_plane(p) );
-  }
-};
-
-template <typename SNC_structure_>
-class SNC_io_parser : public SNC_decorator<SNC_structure_>
-{ typedef SNC_structure_ SNC_structure;
-  typedef CGAL::SNC_io_parser<SNC_structure_> Self;
-  typedef CGAL::SNC_decorator<SNC_structure_> Base;
-  typedef typename Base::SNC_constructor SNC_constructor;
-  typedef typename SNC_structure::Sphere_map  Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>      SM_decorator;
-  typedef typename SNC_structure::Infi_box    Infi_box;
-  typedef typename Infi_box::Standard_kernel  Standard_kernel;
-public:
-  typedef typename SNC_structure::Vertex_iterator Vertex_iterator; 
-  typedef typename SNC_structure::Vertex_handle Vertex_handle;
-  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator; 
-  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
-  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator; 
-  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
-  typedef typename SNC_structure::Volume_iterator Volume_iterator; 
-  typedef typename SNC_structure::Volume_handle Volume_handle;
-  typedef typename SNC_structure::SVertex_iterator SVertex_iterator; 
-  typedef typename SNC_structure::SVertex_handle SVertex_handle;
-  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator; 
-  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
-  typedef typename SNC_structure::SFace_iterator SFace_iterator; 
-  typedef typename SNC_structure::SFace_handle SFace_handle;
-  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator; 
-  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
-  typedef typename SNC_structure::Object_iterator Object_iterator; 
-  typedef typename SNC_structure::Object_handle Object_handle;
-  typedef typename SNC_structure::SFace_cycle_iterator SFace_cycle_iterator;
-  typedef typename SNC_structure::Halffacet_cycle_iterator Halffacet_cycle_iterator;
-  typedef typename SNC_structure::Shell_entry_iterator Shell_entry_iterator;
-  typedef typename SNC_structure::SHalfedge_around_svertex_circulator 
-                                  SHalfedge_around_svertex_circulator;
-  typedef typename SNC_structure::SHalfedge_around_sface_circulator 
-                                  SHalfedge_around_sface_circulator;
-  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
-                                  SHalfedge_around_facet_circulator;
-  typedef typename SNC_structure::Point_3 Point_3;
-  typedef typename SNC_structure::Plane_3 Plane_3;
-  typedef typename SNC_structure::Vector_3 Vector_3;
-  typedef typename SNC_structure::Sphere_point Sphere_point;
-  typedef typename SNC_structure::Sphere_segment Sphere_segment;
-  typedef typename SNC_structure::Sphere_circle Sphere_circle;
-  typedef typename SNC_structure::Mark Mark;
-  typedef typename SNC_structure::Kernel Kernel;
-  typedef typename Kernel::RT RT;
-  typedef typename Infi_box::Standard_point  Standard_point;
-  typedef typename Infi_box::Standard_vector Standard_vector;
-  typedef typename Infi_box::Standard_plane  Standard_plane;
-
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  typedef void* GenPtr;
-  #else
-  typedef boost::any GenPtr;
-  #endif
-
-  using Base::visit_shell_objects;
-
- private:
-  std::istream& in; std::ostream& out;
-  bool verbose;
-  bool reduce;
-  bool sorted;
-  bool addInfiBox;
-
-  CGAL::Object_index<Vertex_iterator> VI;  
-  CGAL::Object_index<Halfedge_iterator> EI;
-  CGAL::Object_index<Halffacet_iterator>    FI;
-  CGAL::Object_index<Volume_iterator>   CI;
-  CGAL::Object_index<SHalfedge_iterator> SEI;
-  CGAL::Object_index<SHalfloop_iterator>   SLI;
-  CGAL::Object_index<SFace_iterator>     SFI;
-  std::list<Vertex_iterator> VL;
-  std::list<Halfedge_iterator> EL;
-  std::list<Halffacet_iterator> FL;
-  std::list<Volume_iterator> CL;
-  std::list<SHalfedge_iterator> SEL;
-  std::list<SHalfloop_iterator> SLL;
-  std::list<SFace_iterator> SFL;
-  std::vector<Vertex_iterator>   Vertex_of;
-  std::vector<Halfedge_iterator> Edge_of;
-  std::vector<Halffacet_iterator>    Halffacet_of;
-  std::vector<Volume_iterator>   Volume_of;
-  std::vector<SVertex_iterator>  SVertex_of; 
-  std::vector<SHalfedge_iterator> SEdge_of;
-  std::vector<SHalfloop_iterator> SLoop_of;
-  std::vector<SFace_iterator>     SFace_of;
-  std::size_t i,vn,en,fn,cn,sen,sln,sfn;
-
-public:
-  SNC_io_parser(std::istream& is, SNC_structure& W);
-  SNC_io_parser(std::ostream& os, SNC_structure& W, 
-		bool sort=false, bool reduce_ = false);
-
-  std::string index(Vertex_iterator v) const
-  { return VI(v,verbose); } 
-  std::string index(Halfedge_iterator e) const 
-  { return EI(e,verbose); }
-  std::string index(Halffacet_iterator f) const 
-  { return FI(f,verbose); }
-  std::string index(Volume_iterator c) const 
-  { return CI(c,verbose); }
-  std::string index(SHalfedge_iterator e) const 
-  { return SEI(e,verbose); }
-  std::string index(SHalfloop_iterator l) const 
-  { return SLI(l,verbose); }
-  std::string index(SFace_iterator f) const 
-  { return SFI(f,verbose); }
-  std::string index(Object_iterator o) const
-  { if( o == 0 )
-      return this->string("undef");
-    Vertex_iterator v;
-    Halfedge_iterator e;
-    Halffacet_iterator f;
-    Volume_iterator c;
-    SHalfedge_iterator se;
-    SHalfloop_iterator sl;
-    SFace_iterator sf;
-    if( CGAL::assign( v, *o))
-      return index(v);
-    else if( CGAL::assign( e, *o))
-      return index(e);
-    else if( CGAL::assign( f, *o))
-      return index(f);
-    else if( CGAL::assign( c, *o))
-      return index(c);
-    else if( CGAL::assign( se, *o))
-      return index(se);
-    else if( CGAL::assign( sl, *o))
-      return index(sl);
-    else if( CGAL::assign( sf, *o))
-      return index(sf);
-    return this->string("unknown object");
-  }
-
-  bool check_sep(const char* sep) const;
-  bool test_string(std::string s) const;
-  void print_vertex(Vertex_handle) const;
-  void print_edge(Halfedge_handle) const;
-  void print_facet(Halffacet_handle) const;
-  void print_volume(Volume_handle) const;
-  void print_sedge(SHalfedge_handle) const;
-  void print_sloop(SHalfloop_handle) const;
-  void print_sface(SFace_handle) const;
-  void print() const;
-  void print_local_graph(Vertex_handle) const;
-
-  template <typename NT> bool read_vertex(Vertex_handle);
-  template <typename NT> bool read_edge(Halfedge_handle);
-  template <typename NT> bool read_facet(Halffacet_handle);
-  bool read_volume(Volume_handle);
-  template <typename NT> bool read_svertex(SVertex_handle);
-  template <typename NT> bool read_sedge(SHalfedge_handle);
-  template <typename NT> bool read_sloop(SHalfloop_handle);
-  bool read_sface(SFace_handle);
-  void add_infi_box();
-  void read();
-  template <typename K> void read_items(int);
-
-  static void dump(SNC_structure& W, std::ostream& os = std::cerr, bool sort = false)
-  { Self O(os,W, sort); O.print(); }
-
-  template <typename Iter, typename Index>
-    void output_sorted_indexes(Iter begin, Iter end, Index i) const {
-    int low = i[begin];
-    int high = low;
-    for(Iter it=begin; it != end; it++) {
-      if(i[it] < low) low = i[it];
-      if(i[it] > high) high = i[it];
-    }
-    out << low << " " << high << ", ";
-  }
-
-};
-
-template <typename EW>
-SNC_io_parser<EW>::SNC_io_parser(std::istream& is, SNC_structure& W) : 
-  Base(W), in(is), out(std::cout) { 
-  W.clear();
-  CGAL_assertion(W.is_empty());
-  verbose = false; 
-}
-
-
-template <typename EW>
-SNC_io_parser<EW>::SNC_io_parser(std::ostream& os, SNC_structure& W, 
-				 bool sort, bool reduce_) : 
-  Base(W), in(std::cin), out(os),
-  FI(W.halffacets_begin(),W.halffacets_end(),'F'),
-  CI(W.volumes_begin(),W.volumes_end(),'C'),
-  SEI(W.shalfedges_begin(),W.shalfedges_end(),'e'),
-  SLI(W.shalfloops_begin(),W.shalfloops_end(),'l'),
-  SFI(W.sfaces_begin(),W.sfaces_end(),'f'),
-  vn(W.number_of_vertices()), 
-  en(W.number_of_halfedges()), 
-  fn(W.number_of_halffacets()),
-  cn(W.number_of_volumes()),
-  sen(W.number_of_shalfedges()),
-  sln(W.number_of_shalfloops()),
-  sfn(W.number_of_sfaces())
-{ 
-  verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
-             out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);  
-  sorted = sort;
-  reduce = reduce_;
-  reduce = reduce && this->is_extended_kernel() && this->is_bounded();
-  sorted = sorted || reduce;
-
-  Vertex_iterator vi; 
-  CGAL_forall_vertices(vi, *this->sncp()) {
-    VL.push_back(vi);
-    if(sorted) {
-      vi->point() = normalized(vi->point());
-      if(vi->has_shalfloop() && 
-	 sort_sloops<SNC_structure>(*this->sncp())(vi->shalfloop()->twin(),
-						   vi->shalfloop()))
-	vi->shalfloop() = vi->shalfloop()->twin();
-    }
-  }
-  if(sorted) {
-    VL.sort(sort_vertices<SNC_structure>(*this->sncp()));
-  }  
-  if(reduce)
-    for(int k=0; k<4; k++){
-      VL.pop_front(); VL.pop_back();
-    }
-  int i = 0;
-  typename std::list<Vertex_iterator>::iterator vl;
-  for(vl = VL.begin(); vl != VL.end(); vl++)
-    VI[*vl] = i++;
-  
-  SM_decorator SD;
-  Halfedge_iterator ei; 
-  CGAL_forall_halfedges(ei, *this->sncp()) {
-    EL.push_back(ei);
-    if(sorted) {
-      //      std::cerr << ei->point() << " | " << normalized(ei->point()) << " |";
-      ei->point() = normalized(ei->point());
-      //      std::cerr << ei->point() << std::endl;
-      sort_sedges<SNC_structure> sortSE(*this->sncp());
-      SHalfedge_handle new_outedge = ei->out_sedge();
-      SHalfedge_around_svertex_circulator cb(new_outedge), ce(cb);
-      CGAL_For_all(cb,ce) {
-	if(cb != new_outedge && sortSE(cb,new_outedge))
-	  new_outedge = cb;
-      }
-      ei->out_sedge() = new_outedge;
-    }
-  }
-  if(sorted) EL.sort(sort_edges<SNC_structure>(*this->sncp()));
-  if(reduce)
-    for(int k=0; k<12; k++){
-      EL.pop_front(); EL.pop_back();
-    }
-  i = 0;
-  typename std::list<Halfedge_iterator>::iterator el;
-  for(el = EL.begin(); el != EL.end(); el++)
-    EI[*el] = i++;
-
-  Halffacet_iterator fi; 
-  CGAL_forall_halffacets(fi, *this->sncp()){
-    if(sorted) {
-      sort_sedges<SNC_structure> sortSE(*this->sncp());
-      Halffacet_cycle_iterator fc;
-      for(fc = fi->facet_cycles_begin(); 
-	  fc != fi->facet_cycles_end(); ++fc) {
-	if(fc.is_shalfedge()) {
-	  SHalfedge_handle se(fc);
-	  if(this->sncp()->is_boundary_object(se))
-	    this->sncp()->undef_boundary_item(se);
-	  SHalfedge_around_facet_circulator sfc(fc), send(sfc);
-	  CGAL_For_all(sfc, send) {
-	    if(sortSE(sfc, se))
-	      se = sfc;
-	  }
-	  this->sncp()->store_boundary_item(se,fc);
-	  *fc = make_object(se);
-	}
-      }
-      fi->plane() = normalized(fi->plane());
-      fi->boundary_entry_objects().sort(sort_facet_cycle_entries<Base>((Base) *this));
-    }
-    FL.push_back(fi);
-  }
-  if(sorted) FL.sort(sort_facets<SNC_structure>(*this->sncp()));
-  if(reduce) {
-    for(int k=0; k<6; k++){
-      FL.pop_front();
-      FL.pop_back();
-    }
-  }
-  i = 0;
-  typename std::list<Halffacet_iterator>::iterator fl;
-  for(fl = FL.begin(); fl != FL.end(); fl++)
-    FI[*fl] = i++;
-
-  SHalfedge_iterator sei; 
-  CGAL_forall_shalfedges(sei, *this->sncp()) {
-    SEL.push_back(sei);
-    if(sorted)
-      sei->circle() = normalized(sei->circle());
-  }
-  if(sorted) SEL.sort(sort_sedges<SNC_structure>(*this->sncp()));
-  if(reduce)
-    for(int k=0; k<24; k++){
-      SEL.pop_front(); SEL.pop_back();
-    }
-  i = 0;
-  typename std::list<SHalfedge_iterator>::iterator sel;
-  for(sel = SEL.begin(); sel != SEL.end(); sel++)
-    SEI[*sel] = i++;
-
-  SHalfloop_iterator sli; 
-  CGAL_forall_shalfloops(sli, *this->sncp()) {
-    SLL.push_back(sli);
-    if(sorted)
-      sli->circle() = normalized(sli->circle());
-  }
-  if(sorted) SLL.sort(sort_sloops<SNC_structure>(*this->sncp()));
-  i = 0;
-  typename std::list<SHalfloop_iterator>::iterator sll;
-  for(sll = SLL.begin(); sll != SLL.end(); sll++)
-    SLI[*sll] = i++;
-
-  SFace_iterator sfi; 
-  CGAL_forall_sfaces(sfi, *this->sncp()) {
-    if(sorted) {
-      SFace_cycle_iterator fc;
-      CGAL_forall_sface_cycles_of(fc, sfi) {
-	if(fc.is_shalfedge()) {
-	  SHalfedge_handle se(fc);
-	  if(this->sncp()->is_sm_boundary_object(se))
-	    this->sncp()->undef_sm_boundary_item(se);
-	  SHalfedge_around_sface_circulator cb(se), ce(cb);
-	  CGAL_For_all(cb,ce) {
-	    if(cb->source() != se->source()) {
-	      if(lexicographically_xyz_smaller(cb->source()->twin()->source()->point(),
-					       se->source()->twin()->source()->point()))
-		se = cb;
-	    }
-	    else 
-	      if(lexicographically_xyz_smaller(cb->twin()->source()->twin()->source()->point(),
-					       se->twin()->source()->twin()->source()->point()))
-		se = cb;
-	  }
-	  this->sncp()->store_sm_boundary_item(se,fc);
-	  *fc = make_object(se);
-	}
-      }
-      sfi->boundary_entry_objects().sort(sort_sface_cycle_entries<Base>((Base) *this));
-    }
-    SFL.push_back(sfi);
-  }
-  if(sorted) SFL.sort(sort_sfaces<SNC_structure>(*this->sncp()));
-  if(reduce)
-    for(int k=0; k<8; k++){
-      SFL.pop_front(); SFL.pop_back();
-    }
-  i = 0;
-  typename std::list<SFace_iterator>::iterator sfl;
-  for(sfl = SFL.begin(); sfl != SFL.end(); sfl++)
-    SFI[*sfl] = i++;
-
-  Volume_iterator ci; 
-  CGAL::Unique_hash_map<SFace_handle,bool> Done(false);
-  find_minimal_sface_of_shell<SNC_structure> findMinSF(*this->sncp(),Done);
-  CGAL_forall_volumes(ci, *this->sncp()) {
-    if(sorted) {
-      Shell_entry_iterator it;
-      CGAL_forall_shells_of(it,ci) {
-	findMinSF.minimal_sface() = SFace_handle(it);
-	visit_shell_objects(SFace_handle(it),findMinSF);
-	*it = make_object(findMinSF.minimal_sface());
-      }
-      ci->shell_entry_objects().sort(sort_shell_entries<Base>((Base)*this));
-    } 
-    CL.push_back(ci);
-  }
- 
-  if(sorted) CL.sort(sort_volumes<SNC_structure>(*this->sncp()));
-  if(reduce)
-    CL.pop_front();
-  i = 0;
-  typename std::list<Volume_iterator>::iterator cl;
-  for(cl = CL.begin(); cl != CL.end(); cl++)
-    CI[*cl] = i++;
-
-  VI[W.vertices_end()]=-2;
-  EI[W.halfedges_end()]=-2;
-  FI[W.halffacets_end()]=-2;
-  CI[W.volumes_end()]=-2;
-  SEI[W.shalfedges_end()]=-2;
-  SLI[W.shalfloops_end()]=-2;
-  SFI[W.sfaces_end()]=-2;
-}
-
-template <typename EW>
-bool SNC_io_parser<EW>::check_sep(const char* sep) const
-{
-  char c; 
-  do in.get(c); while (isspace(c));
-  while (*sep != '\0') { 
-    if (*sep != c) {
-      in.putback(c);
-      return false;
-    }
-    ++sep; in.get(c);
-  }
-  in.putback(c);
-  return true;  
-}
-
-template <typename EW>
-bool SNC_io_parser<EW>::test_string(std::string s) const {
-  std::string s2;
-  in >> s2;
-  return (s==s2);
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::print() const
-{ 
-  out << "Selective Nef Complex" << std::endl;
-  if(this->is_extended_kernel() && (!reduce || !this->is_bounded()))
-    out << "extended" << std::endl;
-  else
-    out << "standard" << std::endl;
-  out << "vertices   " << VL.size() << std::endl;
-  out << "halfedges  " << EL.size() << std::endl;
-  out << "facets     " << FL.size() << std::endl;
-  out << "volumes    " << CL.size() << std::endl;
-  out << "shalfedges " << SEL.size() << std::endl;
-  out << "shalfloops " << SLL.size() << std::endl;
-  out << "sfaces     " << SFL.size() << std::endl;
-
-  if (verbose) 
-    out << "/* Vertex: index { svs sve ses see sfs sfe sl,"
-        << " mark, point } */\n";
-  typename std::list<Vertex_iterator>::const_iterator v;
-  for(v=VL.begin();v!=VL.end();v++)
-    print_vertex(*v);
-
-  if (verbose) 
-  out << "/* Edge: index { twin, source, isolated incident_object,"
-      << " mark } */\n";
-  typename std::list<Halfedge_iterator>::const_iterator e;
-  for(e=EL.begin();e!=EL.end();e++)
-    print_edge(*e);
-
-  if (verbose) 
-  out << "/* Facet: index { twin, fclist, ivlist, volume | plane } mark */\n";
-  typename std::list<Halffacet_iterator>::const_iterator f;
-  for(f=FL.begin();f!=FL.end();f++)
-    print_facet(*f);
-
-  if (verbose) 
-  out << "/* Volume: index { shlist } mark  */\n";
-  typename std::list<Volume_iterator>::const_iterator c;
-  for(c=CL.begin();c!=CL.end();c++)
-    print_volume(*c);
-
-  if (verbose) 
-  out << "/* SEdge: index { twin, sprev, snext, source, sface,"
-      << " prev, next, facet } */\n";
-  typename std::list<SHalfedge_iterator>::const_iterator se;
-  for(se=SEL.begin();se!=SEL.end();se++)
-    print_sedge(*se);
-
-  if (verbose) 
-  out << "/* SLoop: index { twin, sface, facet } */" << std::endl;
-  typename std::list<SHalfloop_iterator>::const_iterator sl;
-  for(sl=SLL.begin();sl!=SLL.end();sl++)
-    print_sloop(*sl);
-
-  if (verbose) 
-  out << "/* SFace: index { fclist, ivlist, sloop, volume } */" << std::endl;
-  typename std::list<SFace_iterator>::const_iterator sf;
-  for(sf=SFL.begin();sf!=SFL.end();sf++)
-    print_sface(*sf);
-
-  out << "/* end Selective Nef complex */" << std::endl;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::read()
-{ 
-  if ( !check_sep("Selective Nef Complex") )  
-    CGAL_error_msg("SNC_io_parser::read: no SNC header.");
-  std::string kernel_type;
-  in >> kernel_type;
-  CGAL_assertion(kernel_type == "standard" || kernel_type == "extended");
-  if ( !(check_sep("vertices") && (in >> vn)) ) 
-    CGAL_error_msg("SNC_io_parser::read: wrong vertex line.");
-  if ( !(check_sep("halfedges") && (in >> en) && (en%2==0)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong edge line.");
-  if ( !(check_sep("facets") && (in >> fn) && (fn%2==0)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong facet line.");
-  if ( !(check_sep("volumes") && (in >> cn)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong volume line.");
-  if ( !(check_sep("shalfedges") && (in >> sen)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong sedge line.");
-  if ( !(check_sep("shalfloops") && (in >> sln)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong sloop line.");
-  if ( !(check_sep("sfaces") && (in >> sfn)) )
-    CGAL_error_msg("SNC_io_parser::read: wrong sface line.");
-
-  addInfiBox = (kernel_type == "standard" && Infi_box::extended_kernel());
-
-  for(i=0; i<vn; ++i)  Vertex_of.push_back(this->sncp()->new_vertex_only());
-  for(i=0; i<en; ++i)  Edge_of.push_back(this->sncp()->new_halfedge_only());
-  for(i=0; i<fn; ++i)  Halffacet_of.push_back(this->sncp()->new_halffacet_only());
-  for(i=0; i<cn; ++i)  Volume_of.push_back(this->sncp()->new_volume_only());
-  for(i=0; i<sen; ++i) SEdge_of.push_back(this->sncp()->new_shalfedge_only());
-  for(i=0; i<sln; ++i) SLoop_of.push_back(this->sncp()->new_shalfloop_only());
-  for(i=0; i<sfn; ++i) SFace_of.push_back(this->sncp()->new_sface_only());
-
-  if(addInfiBox) {
-    Volume_of.push_back(this->sncp()->new_volume_only());
-    read_items<Standard_kernel>(1);
-    add_infi_box();
-  } else
-    read_items<Kernel>(0);
-}
-
-template <typename EW>
-template <typename K>
-void SNC_io_parser<EW>::read_items(int plus01) {
-
-  typename std::vector<Vertex_iterator>::iterator vi;
-  for(vi=Vertex_of.begin(); vi!=Vertex_of.end(); ++vi) {
-    if (!read_vertex<K>(*vi))
-      CGAL_error_msg("SNC_io_parser::read: error in node line");
-  }
-  
-  typename std::vector<Halfedge_iterator>::iterator ei;
-  for(ei=Edge_of.begin(); ei!=Edge_of.end(); ++ei) {
-    if (!read_edge<K>(*ei))
-      CGAL_error_msg("SNC_io_parser::read: error in edge line");
-  }
-  
-  typedef typename std::vector<Halffacet_iterator>::iterator vhf_iterator;
-  vhf_iterator fi;
-  for(fi=Halffacet_of.begin(); fi!=Halffacet_of.end(); ++fi) {
-    if (!read_facet<K>(*fi))
-      CGAL_error_msg("SNC_io_parser::read: error in facet line");
-  }
-  typename std::vector<Volume_iterator>::iterator ci;
-  for(ci=Volume_of.begin()+plus01; ci!=Volume_of.end(); ++ci) {
-    if (!read_volume(*ci))
-      CGAL_error_msg("SNC_io_parser::read: error in volume line");
-  }
-  typename std::vector<SHalfedge_iterator>::iterator sei;
-  for(sei=SEdge_of.begin(); sei!=SEdge_of.end(); ++sei) {
-    if (!read_sedge<K>(*sei))
-      CGAL_error_msg("SNC_io_parser::read: error in sedge line");
-  }
-  typename std::vector<SHalfloop_iterator>::iterator sli;
-  for(sli=SLoop_of.begin(); sli!=SLoop_of.end(); ++sli) {
-    if (!read_sloop<K>(*sli))
-      CGAL_error_msg("SNC_io_parser::read: error in sloop line");
-  }
-  typename std::vector<SFace_iterator>::iterator sfi;
-  for(sfi=SFace_of.begin(); sfi!=SFace_of.end(); ++sfi) {
-    if (!read_sface(*sfi))
-      CGAL_error_msg("SNC_io_parser::read: error in sface line");
-  }
-
-  SNC_constructor C(*this->sncp());
-  C.assign_indices(); 
-}
-
-
-template <typename EW>
-void SNC_io_parser<EW>::print_vertex(Vertex_handle v) const
-{ // syntax: index { svs sve, ses see, sfs sfe, sl | point } mark
-  SM_decorator SD(&*v);
-  out << index(v) << " { ";
-  if(sorted) {
-    
-    output_sorted_indexes(v->svertices_begin(), 
-			  v->svertices_end(), EI);
-    output_sorted_indexes(v->shalfedges_begin(), 
-			  v->shalfedges_end(), SEI);
-    output_sorted_indexes(v->sfaces_begin(), 
-			  v->sfaces_end(), SFI);
-    out << index(SD.shalfloop()) << " | ";
-  }
-  else {
-    out 
-    << index(v->svertices_begin()) << " "
-    << index(v->svertices_last()) << ", "
-    << index(v->shalfedges_begin()) << " "
-    << index(v->shalfedges_last()) << ", "
-    << index(v->sfaces_begin()) << " "
-    << index(v->sfaces_last()) << ", "
-    << index(SD.shalfloop()) << " | ";
-  }
-  if(reduce) {
-    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
-      print_point(out, Infi_box::standard_point(v->point())); 
-  }
-  else
-    Geometry_io<typename Kernel::Kernel_tag, Kernel>::print_point(out, v->point());
-  out << " } "  << v->mark() << std::endl;
-}
-
-template <typename EW>
-template <typename K>
-bool SNC_io_parser<EW>::
-read_vertex(Vertex_handle vh) {
-
-  bool OK = true;
-  int index;
-  typename K::RT hx, hy, hz, hw;
-
-  in >> index;
-  OK = OK && test_string("{");
-  vh->sncp() = this->sncp();
-  
-  in >> index;
-  vh->svertices_begin() = (index >= 0 ? Edge_of[index] : this->svertices_end());
-  in >> index;
-  vh->svertices_last()  = index >= 0 ? Edge_of[index] : this->svertices_end();
-  OK = OK && test_string(",");
-  in >> index;
-  vh->shalfedges_begin() = index >= 0 ? SEdge_of[index] : this->shalfedges_end();
-  in >> index;
-  vh->shalfedges_last()  = index >= 0 ? SEdge_of[index] : this->shalfedges_end();
-  OK = OK && test_string(",");
-  in >> index;
-  vh->sfaces_begin() = index >= 0 ? SFace_of[index] : this->sfaces_end();
-  in >> index;
-  vh->sfaces_last()  = index >= 0 ? SFace_of[index] : this->sfaces_end();
-  OK = OK && test_string(",");
-  in >> index;
-  vh->shalfloop() = index >= 0 ? SLoop_of[index] : this->shalfloops_end();
-  OK = OK && test_string("|");
-#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
-  in >> hx >> hy >> hz >> hw;
-  vh->point() = Point_3(hx,hy,hz,hw);
-#else
-  vh->point() = 
-    Geometry_io<typename K::Kernel_tag, Kernel>::template read_point<Kernel, K>(in);
-#endif
-  OK = OK && test_string("}");
-  in >> vh->mark();
-  
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::print_edge(Halfedge_handle e) const
-{ // syntax: index { twin, source, isolated incident_object | spoint } mark
-  SM_decorator D(&*e->source());
-  out << index(e) << " { " << index(e->twin()) << ", "
-      << index(e->source()) << ", ";
-  if ( D.is_isolated(e) ) out << "1 " << index(e->incident_sface());
-  else out << "0 " << index(e->out_sedge());
-  out << " | ";
-  if(reduce) {
-    Standard_point sp = Infi_box::standard_point(e->point());
-    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
-      print_vector(out, sp-CGAL::ORIGIN); 
-  }
-  else
-    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
-      print_vector(out, e->vector());
-
-  out << " } "<< e->mark();
-#ifdef CGAL_NEF_OUTPUT_INDEXES
-  out << " " << e->get_index();
-#endif
-  out << std::endl;
-}
-
-template <typename EW>
-template <typename K>
-bool SNC_io_parser<EW>::
-read_edge(Halfedge_handle eh) {
-
-  bool OK = true;
-  int index;
-  typename K::RT hx,hy,hz,hw;
-  
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> index;
-  eh->twin() = Edge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  eh->center_vertex() = Vertex_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  if(index == 0) {
-    in >> index;
-    eh->out_sedge() = SEdge_of[index];
-  } else { 
-    in >> index;
-    eh->incident_sface() = SFace_of[index];
-  }
-  OK = OK && test_string("|");
-#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
-  in >> hx >> hy >> hz >> hw;
-  eh->point() = Sphere_point(hx,hy,hz);
-#else
-  eh->point() = 
-    Geometry_io<typename K::Kernel_tag, Kernel>::template read_point<Kernel,K>(in);
-#endif
-  OK = OK && test_string("}");
-  in >> eh->mark();
-
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::print_facet(Halffacet_handle f) const
-{ // syntax: index { twin, fclist, ivlist, volume | plane } mark
-  out << index(f) << " { "; 
-  out << index(f->twin()) << ", ";
-  Halffacet_cycle_iterator it; 
-  CGAL_forall_facet_cycles_of(it,f)
-    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
-  out << ", ";
-  CGAL_forall_facet_cycles_of(it,f)
-    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it)) << ' ';
-  out << ", " << index(f->incident_volume()) << " | ";
-  if(reduce) {
-    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
-      print_plane(out, Infi_box::standard_plane(f->plane()));
-  }
-  else
-    Geometry_io<typename Kernel::Kernel_tag, Kernel>::print_plane(out, f->plane());
-
-  out << " } " << f->mark() << std::endl;
-}
-
-template <typename EW>
-template <typename K>
-bool SNC_io_parser<EW>::
-read_facet(Halffacet_handle fh) {
-
-  bool OK = true;
-  int index;
-  char cc;
-  typename K::RT a,b,c,d;
-
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> index;
-  fh->twin() = Halffacet_of[index];
-  OK = OK && test_string(",");
-  
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    fh->boundary_entry_objects().push_back(make_object(SEdge_of[index]));
-    in >> cc;
-  }
-  
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    fh->boundary_entry_objects().push_back(make_object(SLoop_of[index]));
-    in >> cc;
-  }
-  
-  in >> index;
-  fh->incident_volume() = Volume_of[index+addInfiBox];
-  OK = OK && test_string("|");
-#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
-  in >> a >> b >> c >> d;
-  fh->plane() = Plane_3(a,b,c,d);
-#else
-  fh->plane() = 
-    Geometry_io<typename K::Kernel_tag, Kernel>::
-    template read_plane<Kernel, K>(in);
-#endif
-  OK = OK && test_string("}");
-  in >> fh->mark();
-
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::print_volume(Volume_handle c) const
-{ // syntax: index { shlist } mark
-  out << index(c) << " { "; 
-  Shell_entry_iterator it;
-  CGAL_forall_shells_of(it,c) 
-    if(!reduce || Infi_box::is_standard(SFace_handle(it)->center_vertex()->point()))
-      out << index(SFace_handle(it)) << ' ';
-  out << "} " << c->mark() << std::endl;
-}
-
-template <typename EW>
-bool SNC_io_parser<EW>::
-read_volume(Volume_handle ch) {
-
-  bool OK = true;
-  int index;
-  char cc;
-  
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    ch->shell_entry_objects().push_back(make_object(SFace_of[index]));
-    in >> cc;
-  }
-  in >> ch->mark();
-
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::
-print_sedge(SHalfedge_handle e) const { 
-//index { twin, sprev, snext, source, sface, prev, next, facet | circle } mark
-  out << index(e) << " { "
-      << index(e->twin()) << ", " 
-      << index(e->sprev()) << ", " << index(e->snext()) << ", "
-      << index(e->source()) << ", " << index(e->incident_sface()) << ", "
-      << index(e->prev()) << ", " << index(e->next()) << ", "
-      << index(e->facet()) 
-      << " | ";
-  if(reduce) {
-    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
-      print_plane(out, Infi_box::standard_plane(e->circle()));
-  }
-  else
-    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
-      print_plane(out, (Plane_3) e->circle());
-
-  out << " } " << e->mark();
-#ifdef CGAL_NEF_OUTPUT_INDEXES
-  out << " " << e->get_forward_index() 
-      << " " << e->get_backward_index();
-#endif 
-  out << std::endl;
-}
-
-template <typename EW>
-template <typename K>
-bool SNC_io_parser<EW>::
-read_sedge(SHalfedge_handle seh) {
-
-  bool OK = true;
-  int index;
-  typename K::RT a,b,c,d;
-  
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> index;
-  seh->twin() = SEdge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->sprev() = SEdge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->snext() = SEdge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->source() = Edge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->incident_sface() = SFace_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->prev() = SEdge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->next() = SEdge_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  seh->facet() = Halffacet_of[index];
-  OK = OK && test_string("|");
-#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
-  in >> a >> b >> c >> d;
-  seh->circle() = Sphere_circle(Plane_3(a,b,c,d));
-#else
-  seh->circle() =     
-    Geometry_io<typename K::Kernel_tag, Kernel>::
-    template read_plane<Kernel, K>(in);
-#endif
-  OK = OK && test_string("}");
-  in >> seh->mark();
-
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::
-print_sloop(SHalfloop_handle l) const
-{ // syntax: index { twin, sface, facet | circle } mark
-  out << index(l) << " { "
-      << index(l->twin()) << ", " << index(l->incident_sface()) << ", "
-      << index(l->facet()) 
-      << " | ";  
-  if(reduce) {
-    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
-      print_plane(out, Infi_box::standard_plane(l->circle()));
-  }
-  else
-    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
-      print_plane(out, (Plane_3) l->circle());
-
-  out << " } " << l->mark() << "\n";
-}
-
-template <typename EW>
-template <typename K>
-bool SNC_io_parser<EW>::
-read_sloop(SHalfloop_handle slh) {
-
-  bool OK = true;
-  int index;
-  typename K::RT a,b,c,d;
-
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> index;
-  slh->twin() = SLoop_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  slh->incident_sface() = SFace_of[index];
-  OK = OK && test_string(",");
-  in >> index;
-  slh->facet() = Halffacet_of[index];
-  OK = OK && test_string("|");	
-#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
-  in >> a >> b >> c >> d;
-  slh->circle() = Sphere_circle(Plane_3(a,b,c,d));
-#else
-  slh->circle() =
-    Geometry_io<typename K::Kernel_tag, Kernel>::
-    template read_plane<Kernel, K>(in);	
-#endif
-  OK = OK && test_string("}");	
-  in >> slh->mark();
-  
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::
-print_sface(SFace_handle f) const
-{ // syntax: index { vertex, fclist, ivlist, sloop, volume }
-  SM_decorator D(&*f->center_vertex());
-  out << index(f) << " { " << index(f->center_vertex()) << ", "; 
-  SFace_cycle_iterator it;
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
-  out << ", ";
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_svertex() ) out << index(SVertex_handle(it)) << ' ';
-  out << ", ";
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it));
-  out << ", " << index(f->volume()) << " } " << f->mark() <<"\n";
-}
-
-template <typename EW>
-bool SNC_io_parser<EW>::
-read_sface(SFace_handle sfh) {
-
-  bool OK = true;
-  int index;
-  char cc;
-
-  in >> index;
-  OK = OK && test_string("{");
-  
-  in >> index;
-  sfh->center_vertex() = Vertex_of[index];
-  OK = OK && test_string(",");
-  
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    //    sfh->boundary_entry_objects().push_back(SEdge_of[index]);
-    SM_decorator SD(&*sfh->center_vertex());
-    SD.link_as_face_cycle(SEdge_of[index],sfh);
-    in >> cc;
-  }
-  
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    sfh->boundary_entry_objects().push_back(make_object(Edge_of[index]));
-    this->sncp()->store_sm_boundary_item(Edge_of[index], --(sfh->sface_cycles_end()));
-    in >> cc;
-  }
-
-  in >> cc;
-  while(isdigit(cc)) {
-    in.putback(cc);
-    in >> index;
-    sfh->boundary_entry_objects().push_back(make_object(SLoop_of[index]));
-    this->sncp()->store_sm_boundary_item(SLoop_of[index], --(sfh->sface_cycles_end()));
-    in >> cc;
-  }
-  
-  in >> index;
-  sfh->volume() = Volume_of[index+addInfiBox];
-  OK = OK && test_string("}");	
-  in >> sfh->mark();
-  
-  return OK;
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::print_local_graph(Vertex_handle v) const
-{ SM_decorator D(&*v);
-  out << "Local Graph " 
-      << D.number_of_vertices() << " " << D.number_of_edges() << " "
-      << D.number_of_loops() << " " << D.number_of_faces() << " "
-      << std::endl;
-  if (verbose) 
-    out << "/* index { twin, source, isolated incident_object, mark } */\n";
-  SVertex_iterator vit;
-  CGAL_forall_svertices_of(vit,v) print_edge(vit);
-  if (verbose) 
-    out << "/* index { twin, sprev, snext, source, sface,"
-        << " prev, next, facet } */\n";
-  SHalfedge_iterator eit;
-  CGAL_forall_shalfedges_of(eit,v) print_sedge(eit);
-  if (verbose) 
-    out << "/* index { twin, sface, facet } */" << std::endl;
-  if ( D.has_sloop() ) 
-  { print_sloop(D.loop()); print_sloop(twin(D.loop())); }
-  if (verbose) 
-    out << "/* index { fclist, ivlist, sloop, volume } */" << std::endl;
-  SFace_iterator fit;
-  CGAL_forall_sfaces_of(fit,v) print_sface(fit);
-  out.flush();
-}
-
-template <typename EW>
-void SNC_io_parser<EW>::add_infi_box() {
-
-  for(i=0; i<8; ++i)  Vertex_of.push_back(this->sncp()->new_vertex_only());
-  for(i=0; i<24; ++i)  Edge_of.push_back(this->sncp()->new_halfedge_only());
-  for(i=0; i<12; ++i)  Halffacet_of.push_back(this->sncp()->new_halffacet_only());
-  for(i=0; i<48; ++i) SEdge_of.push_back(this->sncp()->new_shalfedge_only());
-  for(i=0; i<16; ++i) SFace_of.push_back(this->sncp()->new_sface_only());
-
-  typename Standard_kernel::RT hx,hy,hz,hw;
-  for(int i=0; i<8; ++i) {
-    Vertex_handle vh = Vertex_of[vn+i];
-    vh->svertices_begin() = Edge_of[en+3*i];
-    vh->svertices_last()  = Edge_of[en+3*i+2];
-    vh->shalfedges_begin() = SEdge_of[sen+6*i];
-    vh->shalfedges_last()  = SEdge_of[sen+6*i+5];
-    vh->sfaces_begin() = SFace_of[sfn+2*i];
-    vh->sfaces_last()  = SFace_of[sfn+2*i+1];
-    vh->shalfloop() = this->shalfloops_end();
-    hx = i % 2 ? -1 : 1;
-    hy = i % 4 > 1 ? -1 : 1;
-    hz = i > 3 ? -1 : 1;
-    vh->point() = Infi_box::create_extended_point(hx, hy, hz);
-    vh->mark() = 1;		
-    vh->sncp() = this->sncp();
-  }
-  
-  int seOff[3] = {0, 1, 3};
-  int twinIdx[24] = { 3, 7,14,
-		      0,10,17,
-		      9, 1,20,
-		      6, 4,23,
-		      15,19, 2,
-		      12,22, 5,
-		      21,13, 8,
-		      18,16,11};
-  
-  for(int i = 0; i < 24; ++i) {
-    Halfedge_handle eh = Edge_of[en+i];
-    eh->twin() = Edge_of[en+twinIdx[i]];
-    eh->center_vertex() = Vertex_of[vn+(i/3)];
-    eh->out_sedge() = SEdge_of[sen+(i/3*6)+seOff[i%3]];
-    switch(i%3) {
-    case 0 : 
-      hx = i % 6 ? 1 : -1;
-      hy = hz = 0;
-      break;
-    case 1:
-      hy = i % 12 >= 6 ? 1 : -1;
-      hx = hz = 0;
-      break;
-    case 2:
-      hz = i >= 12 ? 1 : -1;
-      hx = hy = 0;
-      break;
-    }
-    eh->point() = Sphere_point(hx,hy,hz);
-    eh->mark() = 1;
-  }
-  
-  int bnd[12] = {19, 18, 43, 42, 35, 34,
-		 47, 46, 39, 38, 45, 44};
-  for(int i = 0; i < 12; ++i) {
-    Halffacet_handle fh = Halffacet_of[fn+i];
-    fh->twin() = Halffacet_of[fn+(i/2*2)+((i+1)%2)];
-    fh->boundary_entry_objects().push_back(make_object(SEdge_of[sen+bnd[i]]));
-    fh->incident_volume() = Volume_of[((i%4) == 1 || (i%4 == 2)) ? 1 : 0];
-    if(i<4) {
-      hz = i % 2 ? -1 : 1;
-      hx = hy = 0;
-    }
-    else if(i<8) {
-      hy = i % 2 ? -1 : 1;
-      hx = hz = 0;
-    }
-    else {
-      hx = i % 2 ? -1 : 1;
-      hz = hy = 0;
-    }
-    hw = ((i%4) == 1 || (i%4) == 2) ? 1 : -1;
-    fh->plane() = Infi_box::create_extended_plane(hx,hy,hz,hw);
-    fh->mark() = 1;
-  }
-  
-  Volume_of[0]->shell_entry_objects().push_back(make_object(SFace_of[sfn]));
-  Volume_of[0]->mark() = 0;
-  Volume_of[1]->shell_entry_objects().push_front(make_object(SFace_of[sfn+1]));
-  
-  int sprevOff[6] = {4,3,0,5,2,1};
-  int snextOff[6] = {2,5,4,1,0,3};
-  int prevIdx[48] = {7,12,15,26,29,10,
-		     1,18,21,32,35,4,
-		     19,0,3,38,41,22,
-		     13,6,9,44,47,16,
-		     31,36,39,2,5,34,
-		     25,42,45,8,11,28,
-		     43,24,27,14,17,46,
-		     37,30,33,20,23,40};
-  int nextIdx[48] = {13,6,27,14,11,28,
-		     19,0,33,20,5,34,
-		     1,18,39,2,23,40,
-		     7,12,45,8,17,46,
-		     37,30,3,38,35,4,
-		     43,24,9,44,29,10,
-		     25,42,15,26,47,16,
-		     31,36,21,32,41,22};
-  int factIdx[48] = {1,0,9,8,5,4,
-		     0,1,11,10,4,5,
-		     0,1,8,9,7,6,
-		     1,0,10,11,6,7,
-		     3,2,8,9,4,5,
-		     2,3,10,11,5,4,
-		     2,3,9,8,6,7,
-		     3,2,11,10,7,6};
-  int sgn[24] = {1,1,1,-1,1,-1,
-		 -1,-1,1,1,-1,-1,
-		 1,-1,-1,-1,-1,1,
-		 -1,1,-1,1,1,1};
-  
-  for(int i = 0; i < 48; ++i) {
-    SHalfedge_handle seh = SEdge_of[sen+i];
-    
-    seh->twin() = SEdge_of[sen+(i/2*2)+((i+1)%2)];
-    seh->sprev() = SEdge_of[sen+sprevOff[i%6]+(i/6*6)];
-    seh->snext() = SEdge_of[sen+snextOff[i%6]+(i/6*6)];
-    seh->source() = Edge_of[en+((i+1)%6)/2+(i/6)*3];
-    seh->incident_sface() = SFace_of[sfn+(i%2)+(i/6)*2];
-    seh->prev() = SEdge_of[sen+prevIdx[i]];
-    seh->next() = SEdge_of[sen+nextIdx[i]];
-    seh->facet() = Halffacet_of[fn+factIdx[i]];
-    if(i%6 < 2) {
-      hz = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
-      hx = hy = 0;
-    }
-    else if(i%6 < 4) {
-      hx = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
-      hz = hy = 0;
-    }
-    else {
-      hy = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
-      hx = hz = 0;
-    }
-    seh->circle() = Sphere_circle(Plane_3(RT(hx),RT(hy),RT(hz),RT(0)));
-    seh->mark() = 1;
-  }
-  
-  int volIdx[8] = {0,1,1,0,1,0,0,1};
-  
-  for(int i = 0; i < 16; ++i) {
-    SFace_handle sfh = SFace_of[sfn+i];
-    sfh->center_vertex() = Vertex_of[vn+(i/2)];
-    sfh->boundary_entry_objects().push_back(make_object(SEdge_of[sen+(i/2*6)+(i%2)]));
-    this->sncp()->store_sm_boundary_item(SEdge_of[sen+(i/2*6)+(i%2)], 
-					  --(sfh->sface_cycles_end()));
-    int cIdx = i%2 ? 1-volIdx[i/2] : volIdx[i/2];
-    sfh->volume() = Volume_of[cIdx];
-    sfh->mark() = cIdx ? Volume_of[1]->mark() : 0;
-  }
-}
-
-} //namespace CGAL
-#endif //CGAL_SNC_IO_PARSER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_ray_shooter.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_ray_shooter.h
deleted file mode 100644
index 0a94a19..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_ray_shooter.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
-//                 Miguel Granados <granados at mpi-sb.mpg.de>
-//                 Susan Hert      <hert at mpi-sb.mpg.de>
-//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
-#ifndef CGAL_SNC_RAY_SHOOTER_H
-#define CGAL_SNC_RAY_SHOOTER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/functional.h> 
-#include <CGAL/function_objects.h> 
-#include <CGAL/Nef_3/Pluecker_line_3.h>
-#include <CGAL/Nef_3/SNC_decorator.h>
-#include <CGAL/Nef_3/SNC_SM_overlayer.h>
-#include <CGAL/Nef_S2/SM_point_locator.h>
-#include <CGAL/Nef_3/SNC_FM_decorator.h>
-#include <CGAL/Nef_3/SNC_intersection.h>
-
-#ifdef SM_VISUALIZOR
-#include <CGAL/Nef_3/SNC_SM_visualizor.h>
-#endif // SM_VISUALIZOR
-#include <map>
-#include <list>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 37
-#include <CGAL/Nef_2/debug.h>
-
-#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <boost/any.hpp>
-#endif
-
-namespace CGAL {
-
-// ----------------------------------------------------------------------------
-// SNC_ray_shooting
-// ----------------------------------------------------------------------------
-
-/*{\Manpage{SNC_ray_shooting}{SNC}{ray shoot functionality}{O}}*/
-
-template <typename SNC_decorator>
-class SNC_ray_shooter : public SNC_decorator
-{ 
-
-protected:
-  typedef typename SNC_decorator::SNC_structure   SNC_structure;
-  typedef SNC_ray_shooter<SNC_decorator>          Self;
-  typedef SNC_decorator                           Base;
-
-public:
-  typedef typename SNC_decorator::Decorator_traits Decorator_traits;
-  typedef typename Decorator_traits::SM_decorator SM_decorator;
-  typedef SM_point_locator<SM_decorator>           SM_point_locator;
-  typedef SNC_intersection<SNC_structure>          SNC_intersection;
-
-  typedef typename Decorator_traits::Vertex_handle Vertex_handle;
-  typedef typename Decorator_traits::Halfedge_handle Halfedge_handle;
-  typedef typename Decorator_traits::Halffacet_handle Halffacet_handle;
-  typedef typename Decorator_traits::Volume_handle Volume_handle;
-
-  typedef typename Decorator_traits::SVertex_handle SVertex_handle;
-  typedef typename Decorator_traits::SHalfedge_handle SHalfedge_handle;
-  typedef typename Decorator_traits::SFace_handle SFace_handle;
-  typedef typename Decorator_traits::SHalfloop_handle SHalfloop_handle;
-
-  typedef typename SNC_structure::Object_handle Object_handle;
-
-  typedef typename SNC_structure::Kernel Kernel;
-  typedef typename SNC_structure::Point_3 Point_3;
-  typedef typename SNC_structure::Vector_3 Vector_3;
-  typedef typename SNC_structure::Segment_3 Segment_3;
-  typedef typename SNC_structure::Ray_3 Ray_3;
-  typedef typename SNC_structure::Line_3 Line_3;
-  typedef typename SNC_structure::Plane_3 Plane_3;
-
-  typedef typename SNC_structure::Mark Mark;
-
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  typedef void* GenPtr;
-  #else
-  typedef boost::any GenPtr;
-  #endif
-
-  SNC_ray_shooter() {}
-  void initialize(SNC_structure* W) { *this = SNC_ray_shooter(*W);}
-
-  SNC_ray_shooter(SNC_structure& W) : Base(W) {}
-  /*{\Mcreate makes |\Mvar| a ray shooter on |W|.}*/
-
- private:
-  Volume_handle determine_volume(const Ray_3& ray) const {
-    CGAL_precondition( !ray.is_degenerate());
-    Object_handle o = shoot(ray);
-    Vertex_handle v;
-    Halfedge_handle e;
-    Halffacet_handle f, f_below;
-    if( CGAL::assign(v, o)) {
-      CGAL_NEF_TRACEN("facet below from from vertex...");
-      f_below = get_visible_facet(v, ray);
-      if(f_below != Halffacet_handle())
-	return f_below->incident_volume();
-      SM_decorator SD(&*v);
-      CGAL_assertion( SD.number_of_sfaces() == 1);
-      return SD.sfaces_begin()->volume();
-    }
-    else if( CGAL::assign(e, o)) {
-      CGAL_NEF_TRACEN("facet below from from edge...");
-      f_below = get_visible_facet(e, ray);
-      if(f_below != Halffacet_handle())
-	return f_below->incident_volume();
-      SM_decorator SD(&*e->source());
-      CGAL_assertion(SD.is_isolated(e));
-      return e->incident_sface()->volume();
-    }
-    else if( CGAL::assign(f, o)) {
-      CGAL_NEF_TRACEN("facet below from from facet...");
-      f_below = get_visible_facet(f, ray);
-      CGAL_assertion( f_below != Halffacet_handle());
-      return f_below->incident_volume();
-    }
-    
-    return Base(*this).volumes_begin();
-  }
-
- public:
-  Object_handle shoot(const Ray_3& ray) const
-     /*{\Mop returns the nearest object hit by a ray |ray|. }*/ {
-    CGAL_precondition( !ray.is_degenerate());
-    bool hit = false;
-    Point_3 end_of_seg;
-    SNC_intersection is(*this->sncp());
-
-    CGAL_NEF_TRACEN( "Shooting ray " << ray);
-    Object_handle o;
-    Vertex_handle v;
-    CGAL_forall_vertices( v, *this->sncp()) {
-      if ( ray.source() != v->point() && ray.has_on(v->point())) {
-        if(hit && !Segment_3(ray.source(), end_of_seg).has_on(v->point()))
-          continue;
-        CGAL_NEF_TRACEN("ray hit vertex case "<<v->point());
-        end_of_seg = v->point();
-        hit = true;
-        o = Object_handle(v);
-      }
-    }
-
-    Halfedge_handle e;
-    CGAL_forall_edges( e, *this->sncp()) {
-      Point_3 q;
-      if( is.does_intersect_internally( ray, segment(e), q)) {
-        if (!hit || 
-	    has_smaller_distance_to_point(ray.source(),q, end_of_seg)) {
-          CGAL_NEF_TRACEN("ray hit edge case " << segment(e) << " in " << q);
-          end_of_seg = q;
-          hit = true;
-          o = Object_handle(e);
-        }
-      }
-    }
-
-    Halffacet_handle f;
-    CGAL_forall_halffacets( f, *this->sncp()) {
-      Point_3 q;
-      if( is.does_intersect_internally( ray, f, q) ) {
-        if(!hit || 
-	   has_smaller_distance_to_point(ray.source(), q, end_of_seg)) {
-        CGAL_NEF_TRACEN("ray hit facet "<< f->plane()<<" on "<<q);
-        end_of_seg = q;
-        hit = true;
-        o = Object_handle(f);
-        }
-      }
-    }
-    return o;
-  }
-
-  Object_handle locate( const Point_3& p) const
-    /*{\Mop returns the lowest dimension object on an SNC structure
-      which contais |p| in its interior. }*/ {
-
-    SNC_intersection is(*this->sncp());
-
-    CGAL_NEF_TRACEN( "Point locator for " << p);
-    Vertex_handle v;
-    CGAL_forall_vertices( v, *this->sncp()) {
-      CGAL_NEF_TRACEN("test vertex " << v->point());
-      if ( p == v->point()) {
-	CGAL_NEF_TRACEN("on vertex.");
-	return Object_handle(v);
-      }
-    }
-
-    Halfedge_handle e;
-    CGAL_forall_edges( e, *this->sncp()) {
-      if ( is.does_contain_internally( segment(e), p) ) {
-	CGAL_NEF_TRACEN("on edge.");
-	return Object_handle(e);
-      }
-    }
-    Halffacet_handle f;
-    CGAL_forall_halffacets( f, *this->sncp()) {
-      if ( is.does_contain_internally( f, p) ) {
-	CGAL_NEF_TRACEN("on facet.");
-	return Object_handle(f);
-      }
-    }
-
-    CGAL_warning("altered code in SNC_ray_shooter");
-    Ray_3 r( p, Vector_3( 0, 0, 1));
-    return Object_handle(determine_volume(r));
-  }   
-
-}; // SNC_ray_shooter
-
-} //namespace CGAL
-
-#endif //CGAL_SNC_RAY_SHOOTER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_io_parser.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_io_parser.h
deleted file mode 100644
index a47380f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_io_parser.h
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
-//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef CGAL_SM_IO_PARSER_H
-#define CGAL_SM_IO_PARSER_H
-
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_2/Object_index.h>
-#include <CGAL/Nef_S2/SM_decorator_traits.h>
-#include <vector>
-#include <iostream>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4355) // complaint about using 'this' to
-#endif                          // initialize a member
-
-namespace CGAL {
-
-/*{\Moptions outfile=SM_io_parser.man }*/
-/*{\Manpage {SM_io_parser}{Decorator_}{IO of embedded maps}{IO}}*/
-
-/*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a
-decorator to provide input and output of a embedded map.  |\Mtype| is
-generic with respect to the |Decorator_| parameter.  |Decorator_| has
-to be a decorator model of our |SM_decorator| concept.}*/
-
-/*{\Mgeneralization SM_decorator}*/
-
-template <typename Decorator_>
-class SM_io_parser : public Decorator_
-{
-  typedef Decorator_                         Base;
-  typedef typename Decorator_::Sphere_point  Sphere_point;
-  typedef typename Decorator_::Sphere_circle Sphere_circle;
-  typedef typename Decorator_::Mark          Mark;
-
-  typedef typename Decorator_::Decorator_traits  Decorator_traits;
-
-  typedef typename Decorator_traits::SVertex_iterator     SVertex_iterator;
-  typedef typename Decorator_traits::SHalfedge_iterator   SHalfedge_iterator;
-  typedef typename Decorator_traits::SFace_iterator       SFace_iterator;
-  typedef typename Decorator_traits::SVertex_handle             SVertex_handle;
-  typedef typename Decorator_traits::SVertex_const_handle       SVertex_const_handle;
-  typedef typename Decorator_traits::SHalfedge_handle           SHalfedge_handle;
-  typedef typename Decorator_traits::SHalfedge_const_handle     SHalfedge_const_handle;
-  typedef typename Decorator_traits::SFace_const_handle         SFace_const_handle;
-  typedef typename Decorator_traits::SFace_handle               SFace_handle;
-  typedef typename Decorator_traits::SHalfloop_handle           SHalfloop_handle;
-  typedef typename Decorator_traits::SHalfloop_const_handle     SHalfloop_const_handle;
-  typedef typename Decorator_traits::SFace_cycle_iterator SFace_cycle_iterator;
-  typedef typename Decorator_traits::SHalfedge_around_svertex_circulator
-                                     SHalfedge_around_svertex_circulator;
-
-
-  using Base::is_isolated;
-  using Base::first_out_edge;
-  using Base::out_edges;
-
-  std::istream& in; std::ostream& out;
-  bool verbose;
-  // a reference to the IO object
-  CGAL::Object_index<SVertex_const_handle>   VI;
-  CGAL::Object_index<SHalfedge_const_handle> EI;
-  CGAL::Object_index<SFace_const_handle>     FI;
-  std::vector<SVertex_handle>        SVertex_of;
-  std::vector<SHalfedge_handle>      Edge_of;
-  std::vector<SFace_handle>          SFace_of;
-  SHalfloop_handle                   Loop_of[2];
-  // object mapping for input
-  std::size_t vn,en,ln,fn,i;
-  // the number of objects
-
-  bool check_sep(const char* sep);
-  void print_vertex(SVertex_handle) const;
-  void print_edge(SHalfedge_handle) const;
-  void print_loop(SHalfloop_const_handle) const;
-  void print_face(SFace_handle) const;
-
-  bool read_vertex(SVertex_handle);
-  bool read_edge(SHalfedge_handle);
-  bool read_loop(SHalfloop_handle);
-  bool read_face(SFace_handle);
-
-  void debug_vertex(SVertex_handle) const;
-  void debug_edge(SHalfedge_handle) const;
-  void debug_loop(SHalfloop_const_handle) const;
-
-public:
-/*{\Mcreation 3}*/
-SM_io_parser(std::istream& is, const Base& D);
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
-to input |H| from |is|.}*/
-
-SM_io_parser(std::ostream& os, const Base& D);
-/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
-to output |H| to |os|.}*/
-
-/*{\Moperations 2 3}*/
-void print() const;
-/*{\Mop prints |H| to |os|.}*/
-void read();
-/*{\Mop reads |H| from |is|.}*/
-void debug() const;
-void print_faces() const;
-
-std::string index(SVertex_const_handle v) const 
-{ return VI(v,verbose); }
-std::string index(SHalfedge_const_handle e) const 
-{ return EI(e,verbose); }
-std::string index(SHalfloop_const_handle l) const 
-{ if (verbose)  return (l==this->shalfloop()? "l0" : "l1");
-  else return (l==this->shalfloop()? "0" : "1");
-}
-std::string index(SFace_const_handle f) const 
-{ return FI(f,verbose); }
-
-static void dump(const Decorator_& D, std::ostream& os = std::cerr);
-/*{\Mstatic prints the plane map decorated by |D| to |os|.}*/
-
-}; // SM_io_parser<Decorator_>
-
-
-template <typename Decorator_>
-SM_io_parser<Decorator_>::
-SM_io_parser(std::istream& iin, const Base& H) :
-  Base(H), in(iin), out(std::cout), verbose(0), 
-  vn(0), en(0), ln(0), fn(0)
-{ this->clear(); }
-
-template <typename Decorator_>
-SM_io_parser<Decorator_>::
-SM_io_parser(std::ostream& iout, const Base& D) 
-  : Base(D), in(std::cin), out(iout), 
-  VI(this->svertices_begin(),this->svertices_end(),'v'),
-  EI(this->shalfedges_begin(),this->shalfedges_end(),'e'),
-  FI(this->sfaces_begin(),this->sfaces_end(),'f'),
-  vn(this->number_of_svertices()), 
-  en(this->number_of_shalfedges()), 
-  ln(this->number_of_shalfloops()),
-  fn(this->number_of_sfaces())
-{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
-    out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
-}
-
-
-//-----------------------------------------------------------------------------
-// OUTPUT AND INPUT:
-//-----------------------------------------------------------------------------
-
-template <typename Decorator_>
-bool SM_io_parser<Decorator_>::check_sep(const char* sep)
-{
-  char c; 
-  do in.get(c); while (isspace(c));
-  while (*sep != '\0') { 
-    if (*sep != c) {
-      in.putback(c);
-      return false;
-    }
-    ++sep; in.get(c);
-  }
-  in.putback(c);
-  return true;  
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print_vertex(SVertex_handle v) const
-{
-  // syntax: index { isolated incident_object, mark, point }
-  out << index(v) << " { ";
-  if ( is_isolated(v) ) out << "1 " << index(v->incident_sface());
-  else                  out << "0 " << index(first_out_edge(v));
-  out  << ", " << v->mark() << ", " << v->point() <<  "}\n";
-}
-
-template <typename Decorator_>
-bool SM_io_parser<Decorator_>::read_vertex(SVertex_handle v)
-{ 
-  // precondition: nodes exist
-  // syntax: index { isolated incident_object, mark, point}
-  int n; bool iso; int f; Mark m; Sphere_point p; 
-  if ( !(in >> n) ||
-       !check_sep("{") ||
-       !(in >> iso) ||
-       !(in >> f) ||
-       !check_sep(",") ||
-       !(in >> m) ||
-       !check_sep(",") ||
-       !(in >> p) ||
-       !check_sep("}") ) return false;
- 
-  if (iso) set_face(v,SFace_of[f]);
-  else     set_first_out_edge(v,Edge_of[f]);
-  v->mark() = m; v->point() = p;
-  return true; 
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print_edge(SHalfedge_handle e) const
-{ // syntax: index { twin, prev, next, source, face, mark, circle }
-
-  Decorator_ D;
-  out << index(e) << " { "
-      << index(e->twin()) << ", " 
-      << index(e->sprev()) << ", " << index(e->snext()) << ", "
-      << index(e->source()) << ", " << index(e->incident_sface()) << ", "
-      << e->mark() << ", " << e->circle() << " }\n";
-}
-
-template <typename Decorator_>
-bool SM_io_parser<Decorator_>::read_edge(SHalfedge_handle e)
-{ // syntax: index { twin, prev, next, source, face, mark, circle }
-  int n, eo, epr, ene, v, f; bool m; Sphere_circle k;
-  if ( !(in >> n) ||
-       !check_sep("{") ||
-       !(in >> eo) || !check_sep(",") ||
-       !(in >> epr) || !check_sep(",") ||
-       !(in >> ene) || !check_sep(",") ||
-       !(in >> v) || !check_sep(",") ||
-       !(in >> f) || !check_sep(",") ||
-       !(in >> m) || !check_sep(",") ||
-       !(in >> k) || !check_sep("}") )
-    return false;
-  CGAL_assertion_msg 
-     (eo >= 0 && eo < en && epr >= 0 && epr < en && ene >= 0 && ene < en &&
-      v >= 0 && v < vn && f >= 0 && f < fn ,
-      "wrong index in read_edge");
-  
-  // precond: features exist!
-  CGAL_assertion(EI[e->twin()]);
-  set_prev(e,Edge_of[epr]);
-  set_next(e,Edge_of[ene]);
-  set_source(e,SVertex_of[v]);
-  set_face(e,SFace_of[f]);
-  e->mark() = m;
-  e->circle() = k;
-  return true;
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print_loop(SHalfloop_const_handle l) const
-{ // syntax: index { twin, face, mark, circle }
-  out << index(l) << " { "
-      << index(l->twin()) << ", " 
-      << index(l->incident_sface()) << ", "
-      << l->mark() << ", " << l->circle() << " }\n";
-}
-
-template <typename Decorator_>
-bool SM_io_parser<Decorator_>::read_loop(SHalfloop_handle l)
-{ // syntax: index { twin, face, mark, circle }
-  int n, lo, f; bool m; Sphere_circle k;
-  if ( !(in >> n) ||
-       !check_sep("{") ||
-       !(in >> lo) || !check_sep(",") ||
-       !(in >> f) || !check_sep(",") ||
-       !(in >> m) || !check_sep(",") ||
-       !(in >> k) || !check_sep("}") )
-    return false;
-  CGAL_assertion_msg(
-    (lo >= 0 && lo < 2 && f >= 0 && f < fn),"wrong index in read_edge");
-  
-  set_face(l,SFace_of[f]);
-  l->mark() = m;
-  l->circle() = k;
-  return true;
-}
-
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print_face(SFace_handle f) const
-{ // syntax: index { fclist, ivlist, loop, mark }
-  out << index(f) << " { "; 
-  SFace_cycle_iterator it;
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
-  out << ", ";
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_svertex() ) out << index(SVertex_handle(it)) << ' ';
-  out << ", ";
-  CGAL_forall_sface_cycles_of(it,f)
-    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it));
-  out << ", " << f->mark() << " }\n";
-}
-
-template <typename Decorator_>
-bool SM_io_parser<Decorator_>::read_face(SFace_handle f)
-{ // syntax: index { fclist, ivlist, loop, mark }
-  int n, ei, vi, li; Mark m;
-  if ( !(in >> n) || !check_sep("{") ) return false;
-  while (in >> ei) { 
-    CGAL_assertion_msg(ei >= 0 && ei < en, 
-                           "wrong index in face cycle list.");
-    store_sm_boundary_object(Edge_of[ei],f);
-  } in.clear();
-  if (!check_sep(",")) { return false; }
-  while (in >> vi) { 
-    CGAL_assertion_msg(vi >= 0 && vi < vn, 
-                           "wrong index in iso vertex list.");
-    store_sm_boundary_object(SVertex_of[vi],f);
-  } in.clear();
-  if (!check_sep(",")) { return false; }
-  while (in >> li) { 
-    CGAL_assertion_msg(li >= 0 && li < 2, 
-                           "wrong index in iso vertex list.");
-    store_sm_boundary_object(Loop_of[li],f);
-  } in.clear();
-  if (!check_sep(",") || !(in >> m) || !check_sep("}") ) 
-    return false;
-  f->mark() = m;
-  return true;
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print() const
-{
-  out << "Sphere_map_2" << std::endl;
-  out << "vertices "  << vn << std::endl;
-  out << "edges "     << en << std::endl;
-  out << "loops "     << ln << std::endl;
-  out << "faces "     << fn << std::endl;
-  if (verbose) 
-    out << "/* index { isolated ? face : edge, mark, point } */" << std::endl;
-  SVertex_iterator vit;
-  CGAL_forall_svertices(vit,*this) print_vertex(vit);
-  if (verbose) 
-    out << "/* index { twin, prev, next, source, face, mark, circle } */" 
-	<< std::endl;
-  SHalfedge_iterator eit;
-  CGAL_forall_shalfedges(eit,*this) print_edge(eit);
-  if (verbose) 
-    out << "/* index { twin, face, mark, circle } */" << std::endl;
-  if ( this->has_shalfloop() ) 
-    { print_loop(this->shalfloop()); print_loop(this->shalfloop()->twin()); }
-  if (verbose) 
-    out << "/* index { fclist, ivlist, loop, mark } */" << std::endl;
-  SFace_iterator fit;
-  CGAL_forall_sfaces(fit,*this) print_face(fit);
-  out.flush();
-  if (verbose) debug();
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::read() 
-{
-  if ( !check_sep("Sphere_map_2") )  
-    CGAL_error_msg("SM_io_parser::read: no embedded_PM header.");
-  if ( !(check_sep("vertices") && (in >> vn)) ) 
-    CGAL_error_msg("SM_io_parser::read: wrong vertex line.");
-  if ( !(check_sep("edges") && (in >> en) && (en%2==0)) )
-    CGAL_error_msg("SM_io_parser::read: wrong edge line.");
-  if ( !(check_sep("loops") && (in >> ln)) )
-    CGAL_error_msg("SM_io_parser::read: wrong loop line.");
-  if ( !(check_sep("faces") && (in >> fn)) )
-    CGAL_error_msg("SM_io_parser::read: wrong face line.");
-
-  SVertex_of.resize(vn);
-  Edge_of.resize(en);
-  SFace_of.resize(fn);
-  for(i=0; i<vn; i++)  SVertex_of[i] =   this->new_svertex();
-  for(i=0; i<en; i++) 
-    if (i%2==0) Edge_of[i] = this->new_shalfedge_pair();
-    else Edge_of[i] = Edge_of[i-1]->twin();
-  for(i=0; i<fn; i++)  SFace_of[i] =     this->new_sface();
-  if ( ln == 2 ) { 
-    Loop_of[0] = this->new_shalfloop_pair(); 
-    Loop_of[1] = this->shalfloop()->twin(); 
-  }
-
-  for(i=0; i<vn; i++) {
-    if (!read_vertex(SVertex_of[i]))
-      CGAL_error_msg("SM_io_parser::read: error in node line");
-  }
-  for(i=0; i<en; i++) {
-    if (!read_edge(Edge_of[i]))
-      CGAL_error_msg("SM_io_parser::read: error in edge line");
-  }
-  if ( ln == 2 ) {
-    read_loop(Loop_of[0]); read_loop(Loop_of[1]);
-  }
-  for(i=0; i<fn; i++) {
-    if (!read_face(SFace_of[i]))
-      CGAL_error_msg("SM_io_parser::read: error in face line");
-  }
-}
-
-//-----------------------------------------------------------------------------
-// VERBOSE OUTPUT:
-// note that we output the index of the objects which is stored in them
-// this is NOT the member index as produced by the forall loops
-//-----------------------------------------------------------------------------
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::debug_vertex(SVertex_handle v) const
-{ 
-  out << index(v) << "[" << v->mark() << "," << v->point() << "]" << std::endl; 
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::debug_edge(SHalfedge_handle e) const
-{ 
-  out << index(e)
-      << "(" << index(e->source()) << "," << index(e->target()) << ") "
-      << index(e->twin()) << " " << index(e->incident_sface())
-      << " ["<< e->mark() << "," << e->circle() << "] " << std::endl;
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::debug_loop(SHalfloop_const_handle l) const
-{ 
-  out << index(l) << " "
-      << index(l->twin()) << " " << index(l->incident_sface())
-      << " ["<< l->mark() << "] " << l->circle() << std::endl;
-}
-
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::debug() const
-{ 
-  out << "\nDEBUG Plane_map\n";
-  out << "Vertices:  " << this->number_of_svertices() << "\n";
-  out << "SHalfedges: " << this->number_of_shalfedges() << "\n";
-  out << "Loop:      " << this->number_of_shalfloops() << "\n";
-  SVertex_iterator vit; 
-  CGAL_forall_svertices(vit,*this) {
-    if ( is_isolated(vit) ) continue;
-    SHalfedge_around_svertex_circulator hcirc(out_edges(vit)), hend(hcirc);
-    debug_vertex(vit);
-    CGAL_For_all(hcirc,hend) { out << "  "; debug_edge(hcirc); }
-  }
-  if ( this->has_shalfloop() ) 
-    { debug_loop(this->shalfloop()); debug_loop(this->shalfloop()->twin()); }
-  out << std::endl;
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::print_faces() const
-{ 
-  out << "\nFACES\n";
-  out << "Vertices:  " << this->number_of_svertices() << "\n";
-  out << "SHalfedges: " << this->number_of_shalfedges() << "\n";
-  out << "Loop:      " << this->number_of_shalfloops() << "\n";
-  SHalfedge_iterator e;
-  Unique_hash_map<SHalfedge_iterator,bool> Done(false);
-  CGAL_forall_shalfedges(e,*this) {
-    if ( Done[e] ) continue;
-    typename Base::SHalfedge_around_sface_circulator c(e), ce = c;
-    out << "face cycle\n";
-    CGAL_For_all(c,ce) 
-    { Done[c]=true; out << "  "; debug_vertex(c->source()); }
-  }
-  if ( this->has_shalfloop() ) 
-    { debug_loop(this->shalfloop()); debug_loop(this->shalfloop()->twin()); }
-  out << std::endl;
-}
-
-template <typename Decorator_>
-void SM_io_parser<Decorator_>::dump(const Decorator_& D, std::ostream& os)
-{ SM_io_parser<Decorator_> Out(os,D);
-  Out.print();
-  Out.print_faces();
-}
-
-
-
-} //namespace CGAL
-
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif //CGAL_SM_IO_PARSER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_overlayer.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_overlayer.h
deleted file mode 100644
index 8450a4e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_overlayer.h
+++ /dev/null
@@ -1,2444 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#ifndef CGAL_SM_OVERLAYER_H
-#define CGAL_SM_OVERLAYER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Union_find.h>
-#include <CGAL/Nef_2/Segment_overlay_traits.h>
-#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <CGAL/Nef_2/geninfo.h>
-#else
-#include <boost/any.hpp>
-#endif
-#include <CGAL/Nef_S2/Sphere_geometry.h>
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_S2/SM_const_decorator.h>
-#include <CGAL/Nef_S2/SM_point_locator.h>
-#include <CGAL/Nef_S2/SM_io_parser.h>
-#include <CGAL/Nef_3/ID_support_handler.h>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 131
-#include <CGAL/Nef_2/debug.h>
-
-#ifndef CGAL_USE_LEDA
-#define LEDA_MEMORY(t)
-#else
-#include <LEDA/system/memory.h>
-#endif
-
-namespace CGAL {
-
-template <typename Decorator_, typename I>
-struct SMO_from_segs {
-  typedef Decorator_ SM_decorator;
-  typedef typename SM_decorator::SVertex_handle     Vertex_handle;
-  typedef typename SM_decorator::SHalfedge_handle   Halfedge_handle;
-  typedef typename SM_decorator::Sphere_point       Point;
-  typedef typename SM_decorator::Sphere_segment     Segment;
-  typedef CGAL::Unique_hash_map<I,bool>             Iterator_map;
-  SM_decorator G;
-  const Iterator_map& M;
-  SMO_from_segs(SM_decorator Gi, const Iterator_map& Mi) : G(Gi),M(Mi) {}
-
-  Vertex_handle new_vertex(const Point& p)
-  { Vertex_handle v = G.new_svertex(p); 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<Halfedge_handle>::create(G.info(v));
-    #else
-    G.info(v)=Halfedge_handle();
-    #endif
-    return v;
-  }
-
-  void link_as_target_and_append(Vertex_handle v, Halfedge_handle e) 
-  { G.link_as_target_and_append(v,e); }
-
-  Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
-  { Halfedge_handle e = 
-    G.new_shalfedge_pair_at_source(v,SM_decorator::BEFORE); 
-    return e;
-  }
-
-  void supporting_segment(Halfedge_handle e, I it) const
-  { if ( M[it] ) e->mark() = true; }
-
-  void trivial_segment(Vertex_handle v, I it) const
-  { if ( M[it] ) v->mark() = true; }
-
-  void starting_segment(Vertex_handle v, I it) const
-  { if ( M[it] ) v->mark() = true; }
-
-  void passing_segment(Vertex_handle v, I it) const
-  { if ( M[it] ) v->mark() = true; }
-
-  void ending_segment(Vertex_handle v, I it) const
-  { if ( M[it] ) v->mark() = true; }
-
-  void halfedge_below(Vertex_handle v, Halfedge_handle e) const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<Halfedge_handle>::access(G.info(v)) = e; 
-    #else
-    G.info(v)=e;
-    #endif
-  }
-
-  Halfedge_handle halfedge_below(Vertex_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<Halfedge_handle>::access(G.info(v)); 
-    #else
-    return 
-      boost::any_cast<Halfedge_handle>( G.info(v) );
-    #endif
-  }
-
-  void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const 
-  { CGAL_assertion(v1->mark()==v2->mark()); }
-
-  void discard_info(Vertex_handle v) const 
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<Halfedge_handle>::clear(G.info(v)); 
-    #else
-    G.info(v)=boost::any();
-    #endif
-  }
-
-  void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
-  { CGAL_assertion(e1->mark()==e2->mark()); }
-
-  void discard_info(Halfedge_handle ) const {}
-
-  void clear_temporary_vertex_info() const
-  { Vertex_handle v;
-    CGAL_forall_svertices(v,G)
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-      geninfo<Halfedge_handle>::clear(G.info(v));
-    #else
-    G.info(v)=boost::any();
-    #endif
-      
-  }
-
-
-}; // SMO_from_segs
-
-
-template <typename SM_overlayer, typename IT, typename INFO>
-struct SMO_from_sm {
-  typedef typename SM_overlayer::SM_const_decorator      SM_const_decorator;
-  typedef typename SM_overlayer::SVertex_handle          Vertex_handle;
-  typedef typename SM_overlayer::SHalfedge_handle        Halfedge_handle;
-  typedef typename SM_overlayer::Sphere_point            Point;
-  typedef typename SM_overlayer::Sphere_segment          Segment;
-
-  SM_overlayer G;
-  CGAL::Unique_hash_map<IT,INFO>& M;
-  SMO_from_sm(SM_overlayer Gi, 
-              SM_const_decorator* /* pGIi */, 
-              CGAL::Unique_hash_map<IT,INFO>& Mi) : 
-    G(Gi), M(Mi) {}
-
-Vertex_handle new_vertex(const Point& p)
-{ CGAL_NEF_TRACEN(" new vertex " << p);
-  Vertex_handle v = G.new_svertex(p);
-  G.assoc_info(v);
-  return v;
-}
-
-void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
-  { CGAL_NEF_TRACEN(" link as target and append " 
-		    << e->source()->point() << "->"
-		    << v->point());
-		    G.link_as_target_and_append(v,e); }
-
-Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
-{ CGAL_NEF_TRACEN(" new halfedge pair at source " << v->point());
-  Halfedge_handle e = 
-  G.new_shalfedge_pair_at_source(v,SM_overlayer::BEFORE); 
-  G.assoc_info(e);
-  return e;
-}
-
-void halfedge_below(Vertex_handle v, Halfedge_handle e) const
-{ 
-  CGAL_NEF_TRACEN("   edge below " << v->point() << ":");
-  CGAL_NEF_TRACEN(&*e);
-  G.halfedge_below(v) = e; 
-}
-
-void supporting_segment(Halfedge_handle e, IT it) const
-{ INFO& si = M[it];
-  G.is_forward(e) = true;
-  if ( si._from == -1 )  return; // equatorial segment
-  G.supp_object(e,si._from) = si._o;
-  CGAL_NEF_TRACEN("   supporting segment "<<si._from<<":"<<*it);
-}
-
-void trivial_segment(Vertex_handle v, IT it) const
-{ INFO& si = M[it];
-  CGAL_assertion( ! si._o.empty() );
-  typename SM_const_decorator::SHalfedge_const_handle se;
-  typename SM_const_decorator::SHalfloop_const_handle sl;
-  typename SM_const_decorator::SVertex_const_handle sv;
-  if(CGAL::assign(se, si._o)) {
-    if(se->source()->point() != v->point())
-      se = se->twin();
-    if(se->source()->point() != v->point())
-      G.supp_object(v,si._from) = si._o;
-    else
-      G.supp_object(v,si._from) = make_object(se->source());
-  } else if(CGAL::assign(sl, si._o)) {
-    G.supp_object(v,si._from) = si._o;
-  } else if(CGAL::assign(sv, si._o)) {
-    CGAL_assertion(sv->point() == v->point());
-    G.supp_object(v,si._from) = si._o;
-  } else
-    CGAL_error_msg( "wrong handle");
-  
-  CGAL_NEF_TRACEN("trivial_segment " << si._from << ":" << v->point()); 
-  //  debug();
-}
-
-void starting_segment(Vertex_handle v, IT it) const
-{ INFO& si = M[it];
-  if ( si._from == -1 ) return;
-  typename SM_const_decorator::SHalfedge_const_handle se;
-  typename SM_const_decorator::SHalfloop_const_handle sl;
-  if(CGAL::assign(se, si._o)) {
-    if(se->source()->point() != v->point()) {
-      se = se->twin();
-      if(se->source()->point() != v->point()) {
-	G.supp_object(v,si._from) = si._o;
-	return;
-      }
-    }
-    G.supp_object(v,si._from) = make_object(se->source());
-    CGAL_NEF_TRACEN("starting_segment " << si._from << ":"<< 
-		    v->point() << " " << se->source()->point()); 
-  } else if(CGAL::assign(sl, si._o)) {
-    G.supp_object(v,si._from) = si._o;
-  } else
-    CGAL_error_msg( "wrong object");
-  //  debug();
-}
-
-void ending_segment(Vertex_handle v, IT it) const
-{ INFO& si = M[it];
-  if ( si._from == -1 ) return;
-  typename SM_const_decorator::SHalfedge_const_handle se;
-  typename SM_const_decorator::SHalfloop_const_handle sl;
-  if(CGAL::assign(se, si._o)) {
-    if(se->source()->point() != v->point()) {
-      se = se->twin();
-      if(se->source()->point() != v->point()) {
-	G.supp_object(v,si._from) = si._o;
-	return;
-      }
-    }
-    G.supp_object(v,si._from) = make_object(se->source());
-    CGAL_NEF_TRACEN("ending_segment " << si._from << ":"<< 
-		    v->point() << ":" << 
-		    se->source()->point() << "->" << 
-		    se->twin()->source()->point()); 
-  } else if(CGAL::assign(sl, si._o)) {
-    G.supp_object(v,si._from) = si._o;
-  } else
-    CGAL_error_msg( "wrong object");
-  //  debug();
-}
-
-void passing_segment(Vertex_handle v, IT it) const
-{ INFO& si = M[it];
-  if ( si._from == -1 ) return;
-  G.supp_object(v,si._from) = si._o; 
-  CGAL_NEF_TRACEN("passing_segment " << si._from << ":"<< v->point()); 
-  //  debug();
-}
-
-Halfedge_handle halfedge_below(Vertex_handle v) const
-{ return G.halfedge_below(v); }
-
-void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const 
-{ CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
-  CGAL_NEF_TRACEV(G.mark(v2,0));CGAL_NEF_TRACEV(G.mark(v2,1));
-  CGAL_assertion(G.mark(v1,0)==G.mark(v2,0)&&
-		 G.mark(v1,1)==G.mark(v2,1)); }
-void discard_info(Vertex_handle v) const 
-{ G.discard_info(v); }
-
-void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
-{ CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) && 
-		 G.mark(e1,1)==G.mark(e2,1)); }
-
-void discard_info(Halfedge_handle e) const 
-{ G.discard_info(e); }
-
-void debug() const {
-  typename SM_overlayer::SVertex_iterator svii;
-  CGAL_forall_svertices(svii, G) {
-    typename SM_overlayer::SVertex_const_handle vs;
-    typename SM_overlayer::SHalfedge_const_handle es;
-    if(CGAL::assign(vs, G.supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
-    else if(CGAL::assign(es, G.supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-    if(CGAL::assign(vs, G.supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by svertex" << vs->point() << std::endl;
-    else if(CGAL::assign(es, G.supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-  }
-}
-
-}; // SMO_from_sm
-
-template <typename SM_decorator, typename ITERATOR>
-class SMO_decorator { 
-public:
-  typedef SM_decorator Graph;
-  typedef typename SM_decorator::SVertex_handle  SVertex_handle;
-  typedef typename SM_decorator::SHalfedge_handle    SHalfedge_handle;
-  typedef typename SM_decorator::Sphere_point    Point_2;
-  typedef typename SM_decorator::Sphere_segment  Segment_2;
-  SM_decorator G;
-
-SMO_decorator(Graph Gi) : G(Gi) {}
-
-SVertex_handle new_vertex(const Point_2& p)
-{ return G.snew_vertex(p); }
-
-void link_as_target_and_append(SVertex_handle v, SHalfedge_handle e)
-{ G.link_as_target_and_append(v,e); }
-
-SHalfedge_handle new_halfedge_pair_at_source(SVertex_handle v)
-{ return G.new_shalfedge_pair_at_source(v,Graph::BEFORE); }
-
-void supporting_segment(SHalfedge_handle /*e*/, ITERATOR /*it*/) {}
-void halfedge_below(SVertex_handle /*v*/, SHalfedge_handle /*e*/) {}
-void trivial_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
-void starting_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
-void passing_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
-void ending_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
-
-
-}; // SMO_decorator
-
-// ============================================================================
-// ============================================================================
-
-/*{\Manpage {SM_overlayer}{SM_decorator}{Overlay in the sphere}{O}}*/
-
-template <typename SM_decorator_>
-class SM_overlayer : public SM_decorator_ {
-public:
-
-  /*{\Mdefinition An instance |\Mvar| of data type |\Mname| is a
-  decorator object offering sphere map overlay calculation. Overlay is
-  either calculated from two sphere maps or from a set of halfspaces.
-  The result is stored in a sphere map |M| that carries the geometry and
-  the topology of the overlay.
-
-  The template parameter provides the underlying topological interface
-  to sphere maps. The template parameter |SM_decorator| has to be a model
-  conforming to our map decorator concept |SM_decorator|.  The concept
-  also describes the interface how the topological information stored in
-  |M| can be extracted or extended.
-
-  The overlay of a set of sphere segments $S$ is stored in a sphere map
-  $M = (V,E,L,F)$. Vertices are either the endpoints of segments (trivial
-  segments are allowed) or the result of the internal intersection of
-  two segments. Between two vertices there's an edge if there's a
-  segment that supports the spherical embedding of $e$ and if there's no
-  vertex in the relative interior of the embedding of $e$.
-
-  The faces refer to the maximal connected open point sets of the
-  spherical subdivision implied by the embedding of the vertices and
-  edges.  SFaces are bounded by possibly several face cycles\cgalFootnote{For
-  the definition of sphere maps and their concepts see the manual page
-  of |SM_decorator|.} including isolated vertices. The overlay process
-  in the method |create_from_segments| creates the objects and the
-  topology of the result. The method starts from zero- and
-  one-dimensional geometric objects in $S$ and produces a spherical
-  structure where each point of the sphere can be assigned to an object
-  (vertex, edge, loop, or face) of |M|.
-
-  The overlay of two sphere maps $M_i = (V_i, E_i, L_i, F_i)$ has the
-  additional aspect that we already start from two spherical
-  subdivisions.  We use the index $i=0,1$ defining the reference to
-  $M_i$, unindexed variables refer to the resulting sphere map $M$.  The
-  $1$-skeleta of the two maps subdivide the edges, loops, and faces of
-  the complementary structure into smaller units. This means vertices,
-  edges, and loops of $M_i$ can split edges and loops of $M_{1-i}$ and
-  face cycles of $M_i$ subdivide faces of $M_{1-i}$. The 1-skeleton $G$
-  of $M$ is defined by the overlay of the embedding of the 1-skeleta of
-  $M_0$ and $M_1$ (Take a trivial segment for each vertex and a segment
-  for each edge, and a circle for a loop, and use the overlay definition
-  of a set of segments and loops above). The faces of $M$ refer to the
-  maximal connected open point sets of the spherical subdivision implied
-  by the embedding of $G$. Each object from the output tuple $(V,E,F)$
-  has a \emph{supporting} object $u_i$ in each of the two input
-  structures.  Imagine the two maps to be transparent balls, where one
-  contains the other. Then each point of the sphere is covered by an
-  object from each of the input structures.  This support relationship
-  from the input structures to the output structure defines an
-  information flow. Each supporting object $u_i$ of $u$ $(i=0,1)$
-  carries an associated information $|mark|(u_i)$. After the subdivision
-  operation this information is attributed to the output object $u$ by
-  $|mark|(u,i)$.}*/
-
-  typedef SM_decorator_                         SM_decorator;
-  typedef typename SM_decorator::Map            Map;
-  typedef SM_decorator                          Base;
-  typedef SM_overlayer<SM_decorator_>           Self;
-  typedef CGAL::SM_const_decorator<Map>               SM_const_decorator;
-  typedef CGAL::SM_point_locator<SM_const_decorator>  SM_point_locator;
-
-  //  typedef typename SM_const_decorator::Constructor_parameter 
-  //                                       Constructor_const_parameter;
-  typedef typename SM_const_decorator::SVertex_const_handle SVertex_const_handle;
-  typedef typename SM_const_decorator::SHalfedge_const_handle SHalfedge_const_handle;
-  typedef typename SM_const_decorator::SHalfloop_const_handle SHalfloop_const_handle;
-  typedef typename SM_const_decorator::SFace_const_handle SFace_const_handle;
-  typedef typename SM_const_decorator::SVertex_const_iterator SVertex_const_iterator;
-  typedef typename SM_const_decorator::SHalfedge_const_iterator SHalfedge_const_iterator;
-  typedef typename SM_const_decorator::SFace_const_iterator SFace_const_iterator;
-
-  //  typedef typename Base::Constructor_parameter Constructor_parameter;
-  typedef typename Base::SVertex_handle SVertex_handle;
-  typedef typename Base::SHalfedge_handle SHalfedge_handle;
-  typedef typename Base::SHalfloop_handle SHalfloop_handle;
-  typedef typename Base::SFace_handle SFace_handle;
-  typedef typename Base::SVertex_iterator SVertex_iterator;
-  typedef typename Base::SHalfedge_iterator SHalfedge_iterator;
-  typedef typename Base::SFace_iterator SFace_iterator;
-  typedef typename Base::Object_handle Object_handle;
-
-  typedef typename Base::SHalfedge_around_svertex_circulator 
-                         SHalfedge_around_svertex_circulator;
-  typedef typename Base::SHalfedge_around_sface_circulator 
-                         SHalfedge_around_sface_circulator;
-  typedef typename Base::SFace_cycle_iterator 
-                         SFace_cycle_iterator;
-
-  typedef std::pair<SHalfedge_handle,SHalfedge_handle> SHalfedge_pair;
-
-  /*{\Mtypes 3}*/
-
-  typedef typename Base::Sphere_kernel           Sphere_kernel;
-  /*{\Mtypemember the geometry kernel.}*/
-  typedef typename Sphere_kernel::Sphere_point   Sphere_point;
-  /*{\Mtypemember the point type of the sphere geometry.}*/
-  typedef typename Sphere_kernel::Sphere_segment Sphere_segment;
-  /*{\Mtypemember the segment type of the sphere geometry.}*/
-  typedef typename Sphere_kernel::Sphere_circle  Sphere_circle;
-  /*{\Mtypemember the circle type of the sphere geometry.}*/
-  typedef typename Base::Mark Mark;
-  /*{\Mtypemember the mark of sphere map objects.}*/
-
-  typedef typename Base::GenPtr GenPtr;
-
-
-  using Base::info;
-  using Base::set_first_out_edge;
-  using Base::first_out_edge;
-  using Base::last_out_edge;
-  using Base::out_edges;
-  using Base::link_as_loop;
-  using Base::link_as_face_cycle;
-  using Base::link_as_prev_next_pair;
-  using Base::link_as_isolated_vertex;
-  using Base::is_isolated;
-  using Base::set_source;
-  using Base::set_face;
-  using Base::delete_vertex_only;
-  using Base::delete_face_only;
-  using Base::delete_edge_pair;
-  using Base::delete_edge_pair_only;
-  using Base::is_sm_boundary_object;
-  using Base::undo_sm_boundary_object;
-  using Base::store_sm_boundary_object;
-  using Base::clear_face_cycle_entries;
-  using Base::is_closed_at_source;
-  using Base::has_outdeg_two;
-  using Base::convert_edge_to_loop;
-  using Base::merge_edge_pairs_at_target;
-
-
-  /*{\Mgeneralization SM_decorator}*/
-
-protected:
-  SM_const_decorator PI[2];
-  const Sphere_kernel& K;
-
-public:
-
-  // ---------------------------------------------------------------
-
-  struct Seg_info { // to transport information from input to output
-    Object_handle _o; int _from;
-
-    Seg_info() : _o(), _from(-1) {}
-    Seg_info(SVertex_const_handle v, int i) 
-    { _o=make_object(v); _from=i; }
-    Seg_info(SHalfedge_const_handle e, int i) 
-    { _o=make_object(e); _from=i; }
-    Seg_info(SHalfloop_const_handle l, int i) 
-    { _o=make_object(l); _from=i; }
-    Seg_info(const Seg_info& si) 
-    { _o=si._o; _from=si._from; }
-    Seg_info& operator=(const Seg_info& si) 
-    { _o=si._o; _from=si._from; return *this; }
-    LEDA_MEMORY(Seg_info)
-  }; // Seg_info
-
-  typedef std::list<Sphere_segment>            Seg_list;
-  typedef typename Seg_list::iterator          Seg_iterator;
-  typedef std::pair<Seg_iterator,Seg_iterator> Seg_it_pair;
-  typedef std::pair<Sphere_segment,Sphere_segment> Seg_pair;
-  typedef CGAL::Unique_hash_map<Seg_iterator,Seg_info> Seg_map;
-
-  // ---------------------------------------------------------------
-
-  struct vertex_info {
-    Mark m[2];
-    Object_handle o_supp[2];
-    SHalfedge_handle e_below;
-    vertex_info() 
-    { o_supp[0]=o_supp[1]=Object_handle(); }
-    LEDA_MEMORY(vertex_info)
-  }; // vertex_info
-
-  void assoc_info(SVertex_handle v) const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<vertex_info>::create(info(v)); 
-    #else
-    info(v)=vertex_info();
-    #endif
-  }
-
-  void discard_info(SVertex_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<vertex_info>::clear(info(v)); 
-    #else
-    info(v)=boost::any();
-    #endif
-  }
-
-  vertex_info& ginfo(SVertex_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<vertex_info>::access(info(v)); 
-    #else
-    return 
-      *boost::any_cast<vertex_info>(&info(v)); 
-    #endif
-  }
-
-  Mark& mark(SVertex_handle v, int i) const
-  { return ginfo(v).m[i]; }
-
-  Object_handle& supp_object(SVertex_handle v, int i) const
-  { return ginfo(v).o_supp[i]; }
-
-  SHalfedge_handle& halfedge_below(SVertex_handle v) const
-  { return ginfo(v).e_below; }
-
-  // ---------------------------------------------------------------
-
-  struct edge_info {
-    Mark m[2];
-    Mark mf[2];
-    Object_handle o_supp[2];
-    bool forw;
-    edge_info()
-    { m[0]=m[1]=mf[0]=mf[1]=Mark(); 
-      o_supp[0]=o_supp[1]=Object_handle(); 
-      forw=false; }
-    LEDA_MEMORY(edge_info)
-  };
-
-  void assoc_info(SHalfedge_handle e)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<edge_info>::create(info(e));
-    geninfo<edge_info>::create(info(e->twin()));
-    #else
-    info(e)=edge_info();
-    info(e->twin())=edge_info();
-    #endif
-  }
-
-  void discard_info(SHalfedge_handle e)  const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<edge_info>::clear(info(e)); 
-    geninfo<edge_info>::clear(info(e->twin()));
-    #else
-    info(e)=boost::any();
-    info(e->twin())=boost::any();
-    #endif
-  }
-
-  edge_info& ginfo(SHalfedge_handle e)  const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<edge_info>::access(info(e)); 
-    #else
-    return 
-      *boost::any_cast<edge_info>(&info(e));
-    #endif
-  }
-
-  Mark& mark(SHalfedge_handle e, int i)  const
-    { return ginfo(e).m[i]; }
-
-  Object_handle& supp_object(SHalfedge_handle e, int i) const
-  // uedge information we store in the smaller one 
-  { if (&*e < &*(e->twin())) return ginfo(e).o_supp[i]; 
-    else                   return ginfo(e->twin()).o_supp[i]; }
-
-  Mark& incident_mark(SHalfedge_handle e, int i)  const
-  // biedge information we store in the edge
-  { return ginfo(e).mf[i]; }
-
-  bool& is_forward(SHalfedge_handle e) const
-  // biedge information we store in the edge
-  { return ginfo(e).forw; }
-
-  // ---------------------------------------------------------------
-
-  struct face_info {
-    Mark m[2];
-    face_info() { m[0]=m[1]=Mark(); }
-    LEDA_MEMORY(face_info)
-  };
-
-  void assoc_info(SFace_handle f)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<face_info>::create(info(f)); 
-    #else
-    info(f)=face_info();
-    #endif
-  }
-
-  void discard_info(SFace_handle f)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<face_info>::clear(info(f)); 
-    #else
-    info(f)=boost::any();
-    #endif
-  }
-
-  face_info& ginfo(SFace_handle f)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<face_info>::access(info(f)); 
-    #else
-    return
-      *boost::any_cast<face_info>(&info(f));
-    #endif
-  }
-
-  Mark& mark(SFace_handle f, int i)  const
-  { return ginfo(f).m[i]; }
-
-  // ---------------------------------------------------------------
-
-  template <typename Below_accessor>
-  SFace_handle determine_face(SHalfedge_handle e, 
-    const std::vector<SHalfedge_handle>& MinimalSHalfedge,
-    const CGAL::Unique_hash_map<SHalfedge_handle,int>& SFaceCycle,
-    const Below_accessor& D)
-  { CGAL_NEF_TRACEN("determine_face "<<PH(e));
-    int fc = SFaceCycle[e];
-    SHalfedge_handle e_min = MinimalSHalfedge[fc];
-    SHalfedge_handle e_below = D.halfedge_below(e_min->target());
-    if(e_below == SHalfedge_handle())
-      return SFace_handle();
-    SFace_handle f = e_below->incident_sface();
-    if ( f != SFace_handle() ) return f; // has already a face 
-    // e_below also has no face
-    f = determine_face(e_below, MinimalSHalfedge, SFaceCycle,D);
-    if(f != SFace_handle())
-      link_as_face_cycle(e_below,f);
-    return f;
-  }
-
-  Sphere_segment segment(SM_const_decorator , 
-                         SHalfedge_const_handle e) const
-  { return K.construct_segment(e->source()->point(),
-			       e->target()->point(),
-			       e->circle()); }
-
-  Sphere_segment trivial_segment(SM_const_decorator , 
-                                 SVertex_const_handle v) const
-  { Sphere_point p = v->point(); 
-    return K.construct_segment(p,p); }
-
-  Seg_pair two_segments(SM_const_decorator , 
-                        SHalfedge_const_handle e) const
-  // we know that e->source()==e->target()
-  { return e->circle().split_at(e->source()->point()); }
-
-  Seg_pair two_segments(SM_const_decorator , 
-                        SHalfloop_const_handle l) const
-  { return l->circle().split_at_xy_plane(); }
-
-
-  // ---------------------------------------------------------------
-  // INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE 
-  // ---------------------------------------------------------------
-
-  /*{\Mcreation 6}*/
-
-  SM_overlayer(Map* M, 
-    const Sphere_kernel& G = Sphere_kernel()) : Base(M), K(G) {}
-  /*{\Mcreate |\Mvar| is a decorator object manipulating the map
-  of |v|.}*/
-
-  /*{\Moperations 1.1 1}*/
-
-  template <typename Forward_iterator>
-  void create_from_segments(
-    Forward_iterator start, Forward_iterator end); 
-  /*{\Mop produces the sphere map which is the overlay of the
-  segments from the iterator range |[start,end)|.  \precond
-  |Forward_iterator| has value type |Sphere_segment|.}*/
-
-  template <typename Forward_iterator>
-  void create_from_circles(Forward_iterator start, Forward_iterator end);
-  /*{\Mop produces the sphere map which is the overlay of the
-  circles from the iterator range |[start,end)|.  \precond
-  |Forward_iterator| has value type |Sphere_circle|.}*/
-
-  void create(const Sphere_circle& c);
-  /*{\Mop produces the sphere map which consists of one loop
-  and the two halfspheres incident to it.}*/
-
-  void subdivide(const Map* M0, const Map* M1, 
-		 bool with_trivial_segments = false); 
-  
-  template <typename Association>
-  void subdivide(const Map* M0, const Map* M1, 
-		 Association& A, 
-		 bool with_trivial_segments = false);
-  /*{\Mop constructs the overlay of the sphere maps |M0| and |M1| in
-  |M|, where all objects (vertices, halfedges, faces) of |M| are
-  \emph{enriched} by the marks of the supporting objects of the two
-  input structures: e.g. let |v| be a vertex supported by a node |v0| in
-  |M0| and by a face |f1| in |M1| and |D0|, |D1| be decorators of
-  type |SM_decorator| on |M0|,|M1|. Then |\Mvar.mark(v,0) = D0.v0->mark()|
-  and |\Mvar.mark(v,1) = D1.f1->mark()|.}*/
-
-  template <typename Selection> 
-  void select(const Selection& SP) const;
-  /*{\Mop sets the marks of all objects according to the selection
-  predicate |SP|. |Selection| has to be a function object type with a
-  function operator\\
-  [[Mark operator()(Mark m0, Mark m1) const]]\\
-  For each object |u| of |M| enriched by the marks of the supporting
-  objects according to the previous procedure |subdivide|, after this
-  operation |\Mvar.u->mark() = SP ( \Mvar.mark(u,0),\Mvar.mark(u,1)
-  )|. The additional marks are invalidated afterwards.
-  \precond subdivide() was called before.}*/
-
-  void simplify();
-  /*{\Mop simplifies the structure of |M| according to the marks of
-  its objects. An edge |e| separating two faces |f1| and |f2| and equal
-  marks |e->mark() == f1->mark() == f2->mark()| is removed and the faces are
-  unified.  An isolated vertex |v| in a face |f| with |v->mark()==f->mark()|
-  is removed.  A vertex |v| with outdegree two, two collinear out-edges
-  |e1|,|e2| and equal marks |v->mark() == e1->mark() == e2->mark()| is removed
-  and the edges are unified.}*/
-
-  int check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const;
-
-  template <typename Iterator>
-  void subdivide_segments(Iterator start, Iterator end) const;
-  template <typename Iterator, typename T>
-  void partition_to_halfsphere(Iterator start, Iterator end,
-    Seg_list& L, CGAL::Unique_hash_map<Iterator,T>& M, 
-    Sphere_circle xycircle, Sphere_circle yzcircle, bool include_equator) const;
-
-  template <typename Mark_accessor>
-  void merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2,
-    const Mark_accessor& D);
-  template <typename Mark_accessor>
-  void merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2,
-    const Mark_accessor& D);
-
-  template <typename Below_accessor, typename Halfsphere_geometry>
-  void create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
-			   SVertex_iterator v_start, SVertex_iterator v_end,
-			   const Below_accessor& D, 
-			   const Halfsphere_geometry& SG);
-
-  template <typename Below_accessor>
-  void complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
-    const Below_accessor& D, std::vector<Mark>& mohs, int offset, bool both=true) const;
-
-  void complete_sface_marks() const;
-
-  void set_outer_face_mark(int offset, const std::vector<Mark>& mohs);
-
-  template <typename Association>
-    void transfer_data(Association& A);
-
-  void dump(std::ostream& os = std::cerr) const
-  { SM_io_parser<Base>::dump(*this,os); }
-
-}; // SM_overlayer<SM_decorator>
-
-template <typename Map>
-template <typename Forward_iterator>
-void SM_overlayer<Map>::
-create_from_segments(Forward_iterator start, Forward_iterator end)
-{
-  CGAL_NEF_TRACEN("creating from segment iterator range");
-  Seg_list L(start,end);
-  Unique_hash_map<Seg_iterator,bool> From_input(false);
-  Seg_iterator it;
-  CGAL_forall_iterators(it,L) From_input[it]=true;
-  Seg_list L_pos,L_neg;
-  partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input, 
-			  Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
-  partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input, 
-			  Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
-
-  typedef SMO_from_segs<Self,Seg_iterator> SM_output;
-  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
-  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-
-  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, NH_geometry> NHS_traits;
-  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  SVertex_iterator v;
-  SHalfedge_iterator e;
-  SM_output O(*this,From_input); 
-
-  typedef typename PHS_traits::INPUT Input_range;
-  Positive_halfsphere_sweep SP(
-    Input_range(L_pos.begin(),L_pos.end()),O,
-    PH_geometry());
-  SP.sweep();
-  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
-  v=--this->svertices_end(); e=--this->shalfedges_end();
-
-  Negative_halfsphere_sweep SM(
-    Input_range(L_neg.begin(),L_neg.end()),O,
-    NH_geometry());
-  SM.sweep();
-  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
-  ++v; ++e;
-  // now two CCs of sphere graph are calculated
-  // v = first vertex of CC in negative x-sphere
-  // e = first edge of CC in negative x-sphere
-
-  create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
-                      PH_geometry());
-  create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
-                      NH_geometry());
-
-  SHalfedge_iterator u;
-  CGAL_forall_sedges(u,*this) {
-    Sphere_segment s(u->source()->point(),u->target()->point());
-    u->circle() = s.sphere_circle();
-    u->twin()->circle() = s.sphere_circle().opposite();
-  }
-
-  merge_halfsphere_maps(this->svertices_begin(),v,O);
-  this->check_integrity_and_topological_planarity();
-
-  O.clear_temporary_vertex_info();
-}
-
-template <typename Map>
-template <typename Forward_iterator>
-void SM_overlayer<Map>::
-create_from_circles(Forward_iterator start, Forward_iterator end)
-{
-  CGAL_NEF_TRACEN("creating from circle iterator range");
-  Seg_list L;
-  Unique_hash_map<Seg_iterator,bool> From_input(false);
-  for ( ; start != end; ++start ) {
-    std::pair<Sphere_segment,Sphere_segment> spair =
-      start->split_at_xy_plane();
-    L.push_back(spair.first); L.push_back(spair.second);
-  }
-  Seg_iterator it;
-  CGAL_forall_iterators(it,L) From_input[it]=true;
-  Seg_list L_pos,L_neg;
-  partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
-			  Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
-  partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
-			  Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
-
-  typedef SMO_from_segs<Self,Seg_iterator> SM_output;
-  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
-  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-
-  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, NH_geometry> NHS_traits;
-  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  SVertex_iterator v;
-  SHalfedge_iterator e;
-  SM_output O(*this,From_input); 
-
-  typedef typename PHS_traits::INPUT Input_range;
-  Positive_halfsphere_sweep SP(
-    Input_range(L_pos.begin(),L_pos.end()),O,
-    PH_geometry());
-  SP.sweep();
-  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
-  v=--this->svertices_end(); e=--this->shalfedges_end();
-
-  Negative_halfsphere_sweep SM(
-    Input_range(L_neg.begin(),L_neg.end()), O,
-    NH_geometry());
-  SM.sweep();
-  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
-  ++v; ++e;
-  // now two CCs of sphere graph are calculated
-  // v = first vertex of CC in negative x-sphere
-  // e = first edge of CC in negative x-sphere
-
-  create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
-                      PH_geometry());
-  create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
-                      NH_geometry());
-
-  SHalfedge_iterator u;
-  CGAL_forall_sedges(u,*this) {
-    Sphere_segment s(u->source()->point(),u->target()->point());
-    u->circle() = s.sphere_circle();
-    u->twin()->circle() = s.sphere_circle().opposite();
-  }
-
-  merge_halfsphere_maps(this->svertices_begin(),v,O);
-  this->check_integrity_and_topological_planarity();
-
-  O.clear_temporary_vertex_info();
-}
-
-#ifdef CGAL_NEF_NEW_CHECK_SPHERE
-template <typename Map>
-int SM_overlayer<Map>::
-check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
-
-  int chsp = 0;
-  CGAL_NEF_TRACEN("chsp " << chsp);
-  
-  typename Seg_list::const_iterator it;
-  CGAL_forall_iterators(it,L) {
-    CGAL_NEF_TRACEN("source " << it->source());
-    CGAL_NEF_TRACEN("target " << it->target());
-
-    if((chsp&1)!=1)
-      if(it->source().hx()>0 || it->target().hx()>0)
-        chsp|=1;
-    if((chsp&2)!=2)
-      if(it->source().hx()<0 || it->target().hx()<0)
-        chsp|=2;
-    if((chsp&4)!=4)
-      if(it->source().hy()>0 || it->target().hy()>0)
-        chsp|=4;
-    if((chsp&8)!=8)
-      if(it->source().hy()<0 || it->target().hy()<0)
-        chsp|=8;
-    if((chsp&16)!=16)
-      if(it->source().hz()>0 || it->target().hz()>0)
-        chsp|=16;
-    if((chsp&32)!=32)
-      if(it->source().hz()<0 || it->target().hz()<0)
-        chsp|=32;
-    CGAL_NEF_TRACEN("chsp " << chsp);
-    if(chsp == 63)
-      break;
-  }
-
-  CGAL_forall_iterators(it,L) {
-    CGAL_NEF_TRACEN("chsp " << chsp);
-    if(chsp == 63)
-      break;
-
-//    int l = it->compare_length_to_halfcircle();
-    CGAL_NEF_TRACEN("source " << it->source());
-    CGAL_NEF_TRACEN("target " << it->target());
-    CGAL_NEF_TRACEN("cicle  " << it->sphere_circle());
-    CGAL_NEF_TRACEN("is long " << it->is_long());
-
-    if(it->is_short()) continue;
-
-    CGAL_NEF_TRACEN("not short");
-    CGAL_NEF_TRACEN("circle " << it->sphere_circle());
-    if(it->is_long()) {
-      if((chsp&60)!=60 && 
-         it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60;
-      if((chsp&51)!=51 && 
-         it->sphere_circle().orthogonal_vector().y()!=0) chsp|=51;
-      if((chsp&15)!=15 && 
-         it->sphere_circle().orthogonal_vector().z()!=0) chsp|=15;
-    } else {
-
-      int n = 0;
-      if(it->source().hx()==0) ++n;
-      if(it->source().hy()==0) ++n;
-      if(it->source().hz()==0) ++n;
-      CGAL_assertion(n<3);
-      
-      CGAL_NEF_TRACEN("n " << n);
-      CGAL_NEF_TRACEN("number of coordinats =0:" << n);
-      if(n==0) {
-        if((chsp&60)!=60 && 
-           it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60;
-        if((chsp&51)!=51 && 
-           it->sphere_circle().orthogonal_vector().y()!=0) chsp|=51;
-        if((chsp&15)!=15 && 
-           it->sphere_circle().orthogonal_vector().z()!=0) chsp|=15;
-      } else if(n==1) {
-        if((chsp&48)!=48 && it->source().z()==0) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if(i.z() > 0) chsp|=16;
-          else if(i.z() < 0) chsp|=32;
-        } else if((chsp&3)!=3 && it->source().x()==0) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if(i.x() > 0) chsp|=1;
-          else if(i.x() < 0) chsp|=2;
-        } else if((chsp&12)!=12) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if(i.y() > 0) chsp|=4;
-          else if(i.y() < 0) chsp|=8;
-        }
-      } else { // n==2
-        if((chsp&60)!=60 && it->source().x()!=0) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if((chsp&12)!=12)
-            if(i.y() > 0) chsp|=4;
-            else if(i.y() < 0) chsp|=8;
-          if((chsp&48)!=48)
-            if(i.z() > 0) chsp|=16;
-            else if(i.z() < 0) chsp|=32;
-	} else if((chsp&51)!=51 && it->source().y()!=0) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if((chsp&3)!=3)
-            if(i.x() > 0) chsp|=1;
-            else if(i.x() < 0) chsp|=2;
-	  if((chsp&48)!=48)
-	    if(i.z() > 0) chsp|=16;
-            else if(i.z() < 0) chsp|=32;
-        } else if((chsp&15)!=15 && it->source().z()!=0) {
-          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,0,1));
-          CGAL_NEF_TRACEN("intersection " << i);
-          if(!it->has_on_after_intersection(i)) i=i.antipode();
-          if((chsp&3)!=3)
-            if(i.x() > 0) chsp|=1;
-            else if(i.x() < 0) chsp|=2;
-	  if((chsp&12)!=12)
-            if(i.y() > 0) chsp|=4;
-            else if(i.y() < 0) chsp|=8;
-        }          
-      }
-    }
-  }
-
-  CGAL_NEF_TRACEN("chsp " << chsp);
-
-  compute_halfsphere[0][0] = (chsp&1)==1;
-  compute_halfsphere[0][1] = (chsp&2)==2;
-  compute_halfsphere[1][0] = (chsp&4)==4;
-  compute_halfsphere[1][1] = (chsp&8)==8;
-  compute_halfsphere[2][0] = (chsp&16)==16;
-  compute_halfsphere[2][1] = (chsp&32)==32;
-
-  if((chsp&1)==0) { 
-      compute_halfsphere[0][1]=true;
-      return 0;
-  }
-  if((chsp&2)==0) {
-      compute_halfsphere[0][0]=true;
-      return 1;
-  }
-  if((chsp&4)==0) { 
-      compute_halfsphere[1][1]=true;
-      return 2;
-  }
-  if((chsp&8)==0) {
-      compute_halfsphere[1][0]=true;
-      return 3;
-  }
-  if((chsp&16)==0) { 
-      compute_halfsphere[2][1]=true; 
-      return 4;
-  }
-  if((chsp&32)==0) { 
-      compute_halfsphere[2][0]=true;
-      return 5;
-  }
-
-  return -1;
-}
-#else
-template <typename Map>
-int SM_overlayer<Map>::
-check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
-
-  for(int i=0; i<6; i++)
-    compute_halfsphere[i/2][i%2] = false;  
-
-  CGAL_NEF_TRACEN("compute_halfsphere (at begin)");
-  for(int i=0; i<6; ++i)
-    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
-
-  typename Seg_list::const_iterator it;
-  CGAL_forall_iterators(it,L) {
-    if(!compute_halfsphere[0][0])
-      if(it->source().hx()>0 || it->target().hx()>0)
-	compute_halfsphere[0][0] = true;
-    if(!compute_halfsphere[0][1])
-      if(it->source().hx()<0 || it->target().hx()<0)
-	compute_halfsphere[0][1] = true;    
-    if(!compute_halfsphere[1][0])
-      if(it->source().hy()>0 || it->target().hy()>0)
-	compute_halfsphere[1][0] = true;
-    if(!compute_halfsphere[1][1])
-      if(it->source().hy()<0 || it->target().hy()<0)
-	compute_halfsphere[1][1] = true;    
-    if(!compute_halfsphere[2][0])
-      if(it->source().hz()>0 || it->target().hz()>0)
-	compute_halfsphere[2][0] = true;
-    if(!compute_halfsphere[2][1])
-      if(it->source().hz()<0 || it->target().hz()<0)
-	compute_halfsphere[2][1] = true;    
-  }
-
-  CGAL_NEF_TRACEN("compute_halfsphere (after vertices)");
-  for(int i=0; i<6; ++i)
-    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
-
-
-  if(!compute_halfsphere[2][0]) {
-    CGAL_forall_iterators(it,L) {
-      if((it->source().hz()==0 && it->target().hz()==0) 
-         || it->is_long()) { 
-	compute_halfsphere[2][0] = true;
-	break;
-      }
-    }
-  }
-  
-  if(!compute_halfsphere[2][0]) {
-    compute_halfsphere[2][1] = true;
-    return 4;
-  }
-  
-  if(!compute_halfsphere[2][1]) {
-    CGAL_forall_iterators(it,L) {
-      if(it->is_long() || (it->source().hz()==0 && it->target().hz()==0)) { 
-	compute_halfsphere[2][1] = true;
-	break;
-      }
-    }
-  }
-
-  if(!compute_halfsphere[2][1])
-    return 5;
-
-  if(!compute_halfsphere[0][0]) {
-    CGAL_forall_iterators(it,L) {
-      if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) { 
-	compute_halfsphere[0][0] = true;
-	break;
-      }
-    }
-  }
-
-  if(!compute_halfsphere[0][0]) {
-    compute_halfsphere[0][1] = true;
-    return 0;
-  }
-  
-  if(!compute_halfsphere[0][1]) {
-    CGAL_forall_iterators(it,L) {
-      if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) { 
-	compute_halfsphere[0][1] = true;
-	break;
-      }
-    }
-  }
-
-  if(!compute_halfsphere[0][1])
-    return 1;
-  
-
-  if(!compute_halfsphere[1][0]) {
-    CGAL_forall_iterators(it,L) {
-      if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) { 
-	compute_halfsphere[1][0] = true;
-	break;
-      }
-    }
-  }
-  
-  if(!compute_halfsphere[1][0]) {
-    compute_halfsphere[1][1] = true;
-    return 2;
-  }
-  
-  if(!compute_halfsphere[1][1]) {
-    CGAL_forall_iterators(it,L) {
-      if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) { 
-	compute_halfsphere[1][1] = true;
-	break;
-      }
-    }
-  }
-
-  if(!compute_halfsphere[1][1])
-    return 3;
-  return -1;
-}
-#endif
-
-template <typename Map>
-void SM_overlayer<Map>::
-create(const Sphere_circle& c)
-{ SHalfloop_handle l1 = this->new_shalfloop_pair();
-  SHalfloop_handle l2 = l1->twin();
-  l1->circle() = c; l2->circle() = c.opposite();
-  SFace_handle f1 = this->new_sface();
-  SFace_handle f2 = this->new_sface();
-  link_as_loop(l1,f1);
-  link_as_loop(l2,f2);
-}
-
-template <typename Map>
-void SM_overlayer<Map>::
-subdivide(const Map* M0, const Map* M1, 
-	  bool with_trivial_segments) {
-  PI[0] = SM_const_decorator(M0); 
-  PI[1] = SM_const_decorator(M1);
-  bool compute_halfsphere[3][2];
-  int cs=0;
-
-  Seg_list L;
-  Seg_map  From;
-  for (int i=0; i<2; ++i) {
-    SVertex_const_iterator v;
-    CGAL_forall_svertices(v,PI[i]) {
-      CGAL_NEF_TRACEN(v->point() << " from " << i << " mark " << v->mark());
-      if ( !PI[i].is_isolated(v) ) continue;
-      cs = -1;
-      L.push_back(trivial_segment(PI[i],v));
-      From[--L.end()] = Seg_info(v,i);
-    }
-    SHalfedge_const_iterator e;
-    CGAL_forall_sedges(e,PI[i]) {
-      if ( e->source() == e->target() ) {
-       if(with_trivial_segments) {	 
-	  CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
-          v = e->source();
-          L.push_back(trivial_segment(PI[i],v));
-          From[--L.end()] = Seg_info(v,i);
-        } else {
-	  CGAL_NEF_TRACEN("once around " << e->source()->point());
-          Seg_pair p = two_segments(PI[i],e);
-          L.push_back(p.first);
-          L.push_back(p.second);
-          From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
-        }
-      } else {
-	CGAL_NEF_TRACEN("normal segment " << e->source()->point()
-			<< "->" << e->twin()->source()->point());
-        L.push_back(segment(PI[i],e));
-        From[--L.end()] = Seg_info(e,i);
-      }
-    }
-    if ( PI[i].has_shalfloop() ) {
-      CGAL_NEF_TRACEN("loop ");
-      SHalfloop_const_handle shl = PI[i].shalfloop();
-      Seg_pair p = two_segments(PI[i],shl);
-      L.push_back(p.first); 
-      L.push_back(p.second.opposite());
-      From[--L.end()] = From[--(--L.end())] = 
-        Seg_info(shl,i);
-    }
-  }
-
-  CGAL_assertion_code(typename Seg_list::iterator it);
-  CGAL_assertion_code(CGAL_forall_iterators(it,L) CGAL_NEF_TRACEN("  "<<*it));
-
-#ifdef CGAL_NEF3_SPHERE_SWEEP_OPTIMIZATION_OFF
-  cs = -1;
-  compute_halfsphere[2][0]=true;
-  compute_halfsphere[2][1]=true;
-#else
-  if(cs != -1)
-    cs = check_sphere(L, compute_halfsphere);
-#endif
-
-  CGAL_NEF_TRACEN("compute_halfsphere\n  cs = " << cs);
-  for(int i=0; i<6; ++i)
-    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
-  Seg_list L_pos,L_neg;
-
-  switch(cs) {
-  case 1: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
-			    compute_halfsphere[0][1]);
-    break;
-  case 0:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
-			    compute_halfsphere[0][0]);
-    break;
-  case 3: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,1,0), Sphere_circle(1,0,0),
-			    compute_halfsphere[1][1]);
-    break;
-  case 2:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,-1,0), Sphere_circle(1,0,0), 
-			    compute_halfsphere[1][0]);
-    break;
-  case 5: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,0,1), Sphere_circle(1,0,0),
-			    compute_halfsphere[2][1]);
-    break;
-  case 4:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), 
-			    compute_halfsphere[2][0]);
-    break;
-  case -1:
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
-    break;
-  default: CGAL_error_msg( "wrong value");
-  }
-
-  cs = cs==-1 ? 2 : cs/2;
-
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-  timer_sphere_sweeps.start();
-#endif
-  
-  typedef SMO_from_sm<Self,Seg_iterator,Seg_info> SM_output;
-  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-  
-  typedef CGAL::Segment_overlay_traits< 
-    Seg_iterator, SM_output, PH_geometry>  PHS_traits;
-  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-    
-  typedef CGAL::Segment_overlay_traits< 
-    Seg_iterator, SM_output, NH_geometry> NHS_traits;
-  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  typedef typename PHS_traits::INPUT Input_range;
-
-  SVertex_handle v;
-  SHalfedge_handle e;
-  SM_output O(*this,PI,From); 
-
-  if(compute_halfsphere[cs][0]) {
-    PH_geometry phg(cs);
-    Positive_halfsphere_sweep SP(
-	Input_range(L_pos.begin(),L_pos.end()),O,phg);
-    SP.sweep();
-    v=--this->svertices_end(); e=--this->shalfedges_end();
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-    number_of_sphere_sweeps++;
-#endif
-  }
-
-  if(compute_halfsphere[cs][1]) {
-    NH_geometry nhg(cs);
-    Negative_halfsphere_sweep SM(
-        Input_range(L_neg.begin(),L_neg.end()),O,
-        nhg);
-    SM.sweep();
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-    number_of_sphere_sweeps++;
-#endif
-  }
-
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-  timer_sphere_sweeps.stop();
-#endif
-
-  if(compute_halfsphere[cs][0]) {
-    ++v; 
-    ++e;
-  }
-  else {
-    v = this->svertices_begin(); 
-    e = this->shalfedges_begin();
-  }
-
-  if(compute_halfsphere[cs][0])
-    create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
-                        PH_geometry(cs));
-  if(compute_halfsphere[cs][1])
-    create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
-			NH_geometry(cs));
-
-  CGAL_forall_sedges(e,*this) {
-    e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point()); 
-    e->twin()->circle() = e->circle().opposite();
-    CGAL_NEF_TRACEN(PH(e) << " with circle " << e->circle());
-  }
-
-  std::vector<Mark> mohs(4);
-  SM_point_locator L0(M0);
-  SM_point_locator L1(M1);
-  
-  L0.marks_of_halfspheres(mohs, 0, cs);
-  L1.marks_of_halfspheres(mohs, 2, cs);
-
-  CGAL_NEF_TRACEN("mohs[0]=" << mohs[0]);
-  CGAL_NEF_TRACEN("mohs[1]=" << mohs[1]);
-  CGAL_NEF_TRACEN("mohs[2]=" << mohs[2]);
-  CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
-
-  CGAL_NEF_TRACEN("compute_halfsphrere\n  cs = " << cs << 
-	 "\n  [cs][0] = " << compute_halfsphere[cs][0] <<
-	 "\n  [cs][1] = " << compute_halfsphere[cs][1]);
-  /*
-  SVertex_iterator svii;
-  CGAL_forall_svertices(svii, *this) {
-    SVertex_const_handle vs;
-    SHalfedge_const_handle es;
-    if(CGAL::assign(vs, supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
-    else if(CGAL::assign(es, supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-    if(CGAL::assign(vs, supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
-    else if(CGAL::assign(es, supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-  }
-  */
-  if(compute_halfsphere[cs][0])
-    complete_face_support(this->svertices_begin(), v, O, mohs, 0, 
-			  compute_halfsphere[cs][1]);
-  if(compute_halfsphere[cs][1])
-    complete_face_support(v, this->svertices_end(), O, mohs, 1,
-			  compute_halfsphere[cs][0]);
-
-  complete_sface_marks();
-
-  // DEBUG CODE: to do: have all svertices a halfedge below associated?
-  CGAL_NEF_TRACEN("Vertex info after swep");
-  CGAL_assertion_code(SVertex_iterator svi);
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  CGAL_assertion_code(
-    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
-      CGAL_NEF_TRACEN("vertex "<<svi->point()<<" info "<< info(svi)<< " marks "<<mark(svi,0)<<" "<<mark(svi,1));
-    }
-  )
-  #else
-  CGAL_assertion_code(
-    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
-      CGAL_NEF_TRACEN("vertex "<<svi->point()<< " marks "<<mark(svi,0)<<" "<<mark(svi,1));
-    }
-  )
-  #endif
-  if(compute_halfsphere[cs][0] && compute_halfsphere[cs][1])
-    merge_halfsphere_maps(this->svertices_begin(),v,O);
-  else
-    set_outer_face_mark(compute_halfsphere[cs][1], mohs);
-  
-  CGAL_assertion_code(this->check_integrity_and_topological_planarity());
-  
-  CGAL_NEF_TRACEN("subdivided");
-  CGAL_assertion_code(CGAL_forall_svertices(v,*this) CGAL_NEF_TRACEN(PH(v)));
-}
-
-template <typename Map>
-template <typename Association>
-void SM_overlayer<Map>::
-subdivide(const Map* M0, const Map* M1, 
-	  Association& A, 
-	  bool with_trivial_segments)
-{
-  PI[0] = SM_const_decorator(M0); 
-  PI[1] = SM_const_decorator(M1);
- 
-  bool compute_halfsphere[3][2];
-  int cs=0;
-
-  Seg_list L;
-  Seg_map  From;
-  for (int i=0; i<2; ++i) {
-    SVertex_const_iterator v;
-    CGAL_forall_svertices(v,PI[i]) {
-      CGAL_NEF_TRACEN(v->point() << " from " << i << " mark " << v->mark());
-      if ( !PI[i].is_isolated(v) ) continue;
-      cs = -1;
-      L.push_back(trivial_segment(PI[i],v));
-      From[--L.end()] = Seg_info(v,i);
-    }
-    SHalfedge_const_iterator e;
-    CGAL_forall_sedges(e,PI[i]) {
-      if ( e->source() == e->target() ) {
-       if(with_trivial_segments) {
-	 CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
-          v = e->source();
-          L.push_back(trivial_segment(PI[i],v));
-          From[--L.end()] = Seg_info(v,i);
-        } else {
-	 CGAL_NEF_TRACEN("once around " << e->source()->point());
-          Seg_pair p = two_segments(PI[i],e);
-          L.push_back(p.first);
-          L.push_back(p.second);
-          From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
-        }
-      } else {
-	CGAL_NEF_TRACEN("normal segment " << e->source()->point());
-        L.push_back(segment(PI[i],e));
-        From[--L.end()] = Seg_info(e,i);
-      }
-    }
-    if ( PI[i].has_shalfloop() ) {
-      cs = -1;
-      CGAL_NEF_TRACEN("loop ");
-      SHalfloop_const_handle shl = PI[i].shalfloop();
-      Seg_pair p = two_segments(PI[i],shl);
-      L.push_back(p.first); 
-      L.push_back(p.second.opposite());
-      From[--L.end()] = From[--(--L.end())] = 
-        Seg_info(shl,i);
-    }
-  }
-
-  CGAL_assertion_code(typename Seg_list::iterator it);
-  CGAL_assertion_code(CGAL_forall_iterators(it,L) CGAL_NEF_TRACEN("  "<<*it));
-
-#ifdef CGAL_NEF3_SPHERE_SWEEP_OPTIMIZATION_OFF
-  cs = -1;
-#endif
-  if(cs != -1)
-    cs = check_sphere(L, compute_halfsphere);
-  else {
-    compute_halfsphere[2][0]=true;
-    compute_halfsphere[2][1]=true;
-  }
-
-  CGAL_NEF_TRACEN("compute_halfsphere\n  cs = " << cs);
-  for(int i=0; i<6; ++i)
-    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
-  Seg_list L_pos,L_neg;
-
-  switch(cs) {
-  case 1: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
-			    compute_halfsphere[0][1]);
-    break;
-  case 0:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
-			    compute_halfsphere[0][0]);
-    break;
-  case 3: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,1,0), Sphere_circle(1,0,0),
-			    compute_halfsphere[1][1]);
-    break;
-  case 2:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,-1,0), Sphere_circle(1,0,0), 
-			    compute_halfsphere[1][0]);
-    break;
-  case 5: 
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,0,1), Sphere_circle(1,0,0),
-			    compute_halfsphere[2][1]);
-    break;
-  case 4:
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), 
-			    compute_halfsphere[2][0]);
-    break;
-  case -1:
-    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
-			    Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
-    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
-			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
-    break;
-  default: CGAL_error_msg( "wrong value");
-  }
-
-  cs = cs==-1 ? 2 : cs/2;
-
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-  timer_sphere_sweeps.start();
-#endif
-  
-  typedef SMO_from_sm<Self,Seg_iterator,Seg_info> SM_output;
-  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-  
-  typedef CGAL::Segment_overlay_traits< 
-    Seg_iterator, SM_output, PH_geometry>  PHS_traits;
-  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-    
-  typedef CGAL::Segment_overlay_traits< 
-    Seg_iterator, SM_output, NH_geometry> NHS_traits;
-  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  typedef typename PHS_traits::INPUT Input_range;
-
-  SVertex_handle v;
-  SHalfedge_handle e;
-  SM_output O(*this,PI,From); 
-
-  if(compute_halfsphere[cs][0]) {
-    PH_geometry phg(cs);
-
-    /*   
-    // the following is only needed for indexed items
-    SHalfedge_const_handle se;
-    SHalfloop_const_handle sl;
-    for(Seg_iterator it=L_pos.begin(); it!=L_pos.end();++it) {
-      CGAL_NEF_TRACEN("pos " << *it);
-      if(phg.compare_xy(it->target(),it->source())<0) {
-	Object_handle o = From[it]._o;
-	if(CGAL::assign(se, o)) {
-	  if(it->sphere_circle() == se->circle())
-	    From[it] = Seg_info(se->twin(), From[it]._from);
-	} else if(CGAL::assign(sl, o)) {
-	  if(it->sphere_circle() == sl->circle())
-	    From[it] = Seg_info(sl->twin(), From[it]._from);
-	}
-      }
-    }
- */
-
-    Positive_halfsphere_sweep SP(
-	Input_range(L_pos.begin(),L_pos.end()),O,phg);
-    SP.sweep();
-    v=--this->svertices_end(); e=--this->shalfedges_end();
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-    number_of_sphere_sweeps++;
-#endif
-  }
-
-  if(compute_halfsphere[cs][1]) {
-    NH_geometry nhg(cs);
-
-    /*
-    SHalfedge_const_handle se;
-    SHalfloop_const_handle sl;
-    for(Seg_iterator it=L_neg.begin(); it!=L_neg.end();++it) {
-      CGAL_NEF_TRACEN("neg " << *it);
-      if(nhg.compare_xy(it->target(),it->source())<0) {
-	Object_handle o = From[it]._o;
-	if(CGAL::assign(se, o)) {
-	  if(it->sphere_circle() == se->circle())
-	    From[it] = Seg_info(se->twin(), From[it]._from);
-	} else if(CGAL::assign(sl, o)) {
-	  if(it->sphere_circle() == sl->circle())
-	  From[it] = Seg_info(sl->twin(), From[it]._from);
-	}
-      }
-    }
-    */
-
-    Negative_halfsphere_sweep SM(
-        Input_range(L_neg.begin(),L_neg.end()),O,
-        nhg);
-    SM.sweep();
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-    number_of_sphere_sweeps++;
-#endif
-  }
-
-#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
-  timer_sphere_sweeps.stop();
-#endif
-
-  if(compute_halfsphere[cs][0]) {
-    ++v; 
-    ++e;
-  }
-  else {
-    v = this->svertices_begin(); 
-    e = this->shalfedges_begin();
-  }
-
-  if(compute_halfsphere[cs][0])
-    create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
-                        PH_geometry(cs));
-  if(compute_halfsphere[cs][1])
-    create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
-			NH_geometry(cs));
-
-  CGAL_forall_sedges(e,*this) {
-    e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point()); 
-    e->twin()->circle() = e->circle().opposite();
-    CGAL_NEF_TRACEN(PH(e) << " with circle " << e->circle());
-  }
-
-  std::vector<Mark> mohs(4);
-  SM_point_locator L0(M0);
-  SM_point_locator L1(M1);
-  
-  L0.marks_of_halfspheres(mohs, 0, cs);
-  L1.marks_of_halfspheres(mohs, 2, cs);
-
-  CGAL_NEF_TRACEN("mohs[0]=" << mohs[0]);
-  CGAL_NEF_TRACEN("mohs[1]=" << mohs[1]);
-  CGAL_NEF_TRACEN("mohs[2]=" << mohs[2]);
-  CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
-
-  CGAL_NEF_TRACEN("compute_halfsphrere\n  cs = " << cs << 
-	 "\n  [cs][0] = " << compute_halfsphere[cs][0] <<
-	 "\n  [cs][1] = " << compute_halfsphere[cs][1]);
-  /*
-  SVertex_iterator svii;
-  CGAL_forall_svertices(svii, *this) {
-    SVertex_const_handle vs;
-    SHalfedge_const_handle es;
-    if(CGAL::assign(vs, supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
-    else if(CGAL::assign(es, supp_object(svii,0)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-    if(CGAL::assign(vs, supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
-    else if(CGAL::assign(es, supp_object(svii,1)))
-      std::cerr << svii->point() << " supported by sedge" << std::endl;
-    else
-      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
-  }
-  */
-  if(compute_halfsphere[cs][0])
-    complete_face_support(this->svertices_begin(), v, O, mohs, 0, 
-			  compute_halfsphere[cs][1]);
-  if(compute_halfsphere[cs][1])
-    complete_face_support(v, this->svertices_end(), O, mohs, 1,
-			  compute_halfsphere[cs][0]);
-
-  complete_sface_marks();
-
-  // DEBUG CODE: to do: have all svertices a halfedge below associated?
-  CGAL_NEF_TRACEN("Vertex info after swep");
-  CGAL_assertion_code(SVertex_iterator svi);
-  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-  CGAL_assertion_code(
-    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
-        CGAL_NEF_TRACEN("vertex "<<svi->point() <<" info "<<info(svi) << " marks "<<mark(svi,0)<<" "<<mark(svi,1));
-    }
-  )
-  #else
-  CGAL_assertion_code(
-    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
-        CGAL_NEF_TRACEN("vertex "<<svi->point() << " marks "<<mark(svi,0)<<" "<<mark(svi,1));
-    }
-  )
-  #endif
-
-
-  transfer_data(A);
-
-  if(compute_halfsphere[cs][0] && compute_halfsphere[cs][1])
-    merge_halfsphere_maps(this->svertices_begin(),v,O);
-  else
-    set_outer_face_mark(compute_halfsphere[cs][1], mohs);
-  
-  CGAL_assertion_code(this->check_integrity_and_topological_planarity());
-  
-  CGAL_NEF_TRACEN("subdivided");
-  CGAL_assertion_code(CGAL_forall_svertices(v,*this) CGAL_NEF_TRACEN(PH(v)));
-}
-
-template <typename Map>
-template <typename Association>
-void SM_overlayer<Map>::
-transfer_data(Association& A) {
-
-  SVertex_iterator sv;
-  SHalfedge_handle se;
-  SVertex_const_handle sv0,sv1;
-  SHalfedge_const_handle se0, se1;
-  SHalfloop_const_handle sl0, sl1;
-
-  CGAL_forall_svertices(sv, *this) {
-    //    std::cerr << "svertex " << sv->point() << std::endl;
-    Object_handle o0 = supp_object(sv,0), o1 = supp_object(sv,1);
-    if(o0.empty()) {
-      if(CGAL::assign(sv1, o1))
-	A.handle_support(sv, sv1);
-      else
-	continue;
-    } else if(CGAL::assign(se0, o0)) {
-      if(o1.empty()) 
-	continue;
-      else if(assign(se1, o1))
-	A.handle_support(sv, se0, se1);
-      else if(CGAL::assign(sv1, o1))
-	A.handle_support(sv, se0, sv1);
-      else if(CGAL::assign(sl1, o1))
-	A.handle_support(sv, se0, sl1);
-      else
-	CGAL_error_msg( "wrong handle");
-    } else if(CGAL::assign(sv0, o0)) {
-      if(o1.empty())
-	A.handle_support(sv, sv0);
-      else if(CGAL::assign(se1, o1))
-	A.handle_support(sv, sv0, se1);
-      else if(CGAL::assign(sv1, o1))
-	A.handle_support(sv, sv0, sv1);
-      else if(CGAL::assign(sl1, o1))
-	A.handle_support(sv, sv0, sl1);
-      else
-	CGAL_error_msg( "wrong handle");
-    } else if(CGAL::assign(sl0, o0)) {
-      if(o1.empty())
-	continue;
-      else if(CGAL::assign(sv1, o1))
-	A.handle_support(sv, sl0, sv1);
-      else if(CGAL::assign(se1, o1))
-	A.handle_support(sv, sl0, se1);
-      else if(CGAL::assign(sl1, o1))
-	A.handle_support(sv, sl0, sl1);
-    } else 
-      CGAL_error_msg( "wrong handle");
-  }
-
-  CGAL_forall_sedges(se, *this) {
-    CGAL_assertion(is_forward(se));
-    Object_handle o0 = supp_object(se,0), o1 = supp_object(se,1);   
-    if(o0.empty()) {
-      if(assign(se1, o1))
-	A.handle_support(se, se1);
-      else if(assign(sl1, o1))
-	A.handle_support(se, sl1);
-      else
-	continue; // CGAL_error_msg( "wrong handle");
-    } else if(assign(se0, o0)) {
-      if(o1.empty())
-	A.handle_support(se, se0);
-      else if(assign(se1, o1))
-	A.handle_support(se, se0, se1);
-      else if(assign(sl1, o1))
-	A.handle_support(se, se0, sl1);
-      else
-	CGAL_error_msg( "wrong handle");    
-    } else if(assign(sl0, o0)) {
-      if(o1.empty())
-	A.handle_support(se, sl0);
-      else if(assign(se1, o1))
-	A.handle_support(se, sl0, se1);
-      else if(assign(sl1, o1))
-	A.handle_support(se, sl0, sl1);
-      else
-	CGAL_error_msg( "wrong handle");
-    } else
-      CGAL_error_msg( "wrong handle");	      
-  }
-}
-
-template <typename Map>
-void SM_overlayer<Map>::
-set_outer_face_mark(int offset, const std::vector<Mark>& mohs) {
-
-  SFace_handle sf = this->new_sface();
-  assoc_info(sf);
-  mark(sf, 0) = mohs[offset];
-  mark(sf, 1) = mohs[offset+2];
-
-  SHalfedge_iterator e;
-  CGAL_forall_shalfedges(e, *this) {
-    if ( e->incident_sface() != SFace_handle() ) continue;
-    link_as_face_cycle(e,sf); 
-  }
-  
-  SVertex_handle v;
-  CGAL_forall_svertices(v, *this) {
-    if(!is_isolated(v) || v->incident_sface() != SFace_handle()) continue;
-    link_as_isolated_vertex(v,sf);
-  }
-}
-
-template <typename Map>
-template <typename Iterator, typename T>
-void SM_overlayer<Map>::
-partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L, 
-			CGAL::Unique_hash_map<Iterator,T>& M, 
-			Sphere_circle xycircle, Sphere_circle yzcircle, 
-			bool include_equator) const
-{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
-//  CGAL_assertion(pos!=0);
-  Sphere_segment s1,s2;
-  //  Sphere_circle xycircle(0,0,pos);
-  if(include_equator) {
-    while ( start != beyond) {
-      int i = start->intersection(xycircle,s1,s2);
-      CGAL_NEF_TRACEN("segment " << start->source() << " " << start->target());
-      if (i>1) { 
-	L.push_back(s2); M[--L.end()] = M[start];    
-	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
-      }
-      if (i>0) { 
-	L.push_back(s1); M[--L.end()] = M[start];    
-	CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target()); 
-      }
-      ++start;
-    }
-  }
-  else {
-    while(start != beyond) {
-      L.push_back(*start);
-      M[--L.end()] = M[start];
-      ++start;
-    }
-  }
-
-  // now all segments are split into hemispheres
-  // we still have to:
-  // - split segments containing our special poles y^-, y^+
-  // - split halfcircles
-  // - add four equator segments 
-
-  //  Sphere_circle yzcircle(1,0,0);
-  typename Seg_list::iterator it, itl;
-  
-  CGAL_forall_iterators(it,L) { CGAL_NEF_TRACEN("  "<<*it);
-    if ( equal_as_sets(it->sphere_circle(),xycircle) ) {
-      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
-      bool added=false;
-      int n1 =  it->intersection(yzcircle,s1,s2);
-      if (n1 > 1 && !s2.is_degenerate()) { 
-	M[ L.insert(it,s2) ] = M[it]; 
-	added=true; 
-	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
-      }
-      if (n1 > 0 && !s1.is_degenerate()) { 
-	M[ L.insert(it,s1) ] = M[it]; 
-	added = true; 
-	CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target()); 
-      }
-      int n2 =  it->intersection(yzcircle.opposite(),s1,s2);
-      if (n2 > 1 && !s2.is_degenerate()) { 
-	M[ L.insert(it,s2) ] = M[it]; 
-	added=true; 
-	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
-      }
-      if (n2 > 0 && !s1.is_degenerate()) { 
-	M[ L.insert(it,s1) ] = M[it]; 
-	added=true; 
-	CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target()); 
-      }
-      if(added) {
-	itl = it; --it; M[itl] = T(); L.erase(itl);
-      }
-      // at least one item was appended
-    }
-  }
-
-  CGAL_forall_iterators(it,L) {
-    if ( it->is_halfcircle() ) {
-      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
-      Sphere_segment s1,s2;
-      it->split_halfcircle(s1,s2);
-      CGAL_NEF_TRACEN("    into " << s1);
-      CGAL_NEF_TRACEN("    into " << s2);
-      *it = s2; 
-      M[ L.insert(it,s1) ] = M[it];
-    }
-  }
-
-  if(include_equator) {
-    // append 4 xy-equator segments:
-    Sphere_point S(0,-1,0),N(0,1,0);
-    Sphere_segment sp(S,N,xycircle);
-    Sphere_segment sm(S,N,xycircle.opposite());
-    Sphere_segment s[4];
-    sp.split_halfcircle(s[0],s[1]);
-    sm.split_halfcircle(s[2],s[3]);
-    L.insert(L.end(),s,s+4);
-  }
-}
-
-template <typename Map>
-template <typename Below_accessor, typename Halfsphere_geometry>
-void SM_overlayer<Map>::
-create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
-  SVertex_iterator v_start, SVertex_iterator v_end,
-  const Below_accessor& D, 
-  const Halfsphere_geometry& SG)
-{
-  CGAL_NEF_TRACEN("create_face_objects()");
-  if(e_start != e_end) {
-    CGAL::Unique_hash_map<SHalfedge_handle,int> SFaceCycle(-1);
-    std::vector<SHalfedge_handle>  MinimalSHalfedge;
-    SHalfedge_around_sface_circulator hfc(last_out_edge(v_start)),hend(hfc);
-    CGAL_NEF_TRACEN("equator cycle "<<PH(hfc));
-    CGAL_For_all(hfc,hend) SFaceCycle[hfc]=0; // outer face cycle = 0
-    MinimalSHalfedge.push_back(first_out_edge(v_start)->twin());
-    int i=1; 
-    for (SHalfedge_iterator e = e_start; e != e_end; ++e) {
-      if ( SFaceCycle[e] >= 0 ) continue; // already assigned
-      SHalfedge_around_sface_circulator hfc(e),hend(hfc);
-      SHalfedge_handle e_min = e;
-      CGAL_NEF_TRACEN(""); 
-      CGAL_NEF_TRACEN("  face cycle numbering "<<i);
-      CGAL_For_all(hfc,hend) {
-	SFaceCycle[hfc]=i; // assign face cycle number
-	if (hfc->twin()->source() == e_min->twin()->source()) {
-	  Sphere_point p1 = hfc->source()->point(), 
-	    p2 = hfc->twin()->source()->point(), 
-	    p3 = hfc->snext()->twin()->source()->point();	  
-	  if ( SG.orientation(p1,p2,p3) <= 0 )
-	    e_min = hfc;
-	} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
-	  e_min = hfc;    
-	CGAL_NEF_TRACEN(PH(hfc));
-      } CGAL_NEF_TRACEN("");
-      MinimalSHalfedge.push_back(e_min);
-      ++i;
-    }
-    
-    for (int j=1; j<i; ++j) {
-      SHalfedge_handle e = MinimalSHalfedge[j];
-      CGAL_NEF_TRACEN("  face cycle "<<j<<" minimal halfedge "<<PH(e));
-      Sphere_point p1 = e->source()->point(), 
-	p2 = e->twin()->source()->point(), 
-	p3 = e->snext()->twin()->source()->point();
-      if ( SG.orientation(p1,p2,p3) > 0 ) { // left_turn => outer face cycle
-	SFace_handle f = this->new_sface();
-	link_as_face_cycle(e,f);
-	CGAL_NEF_TRACEN("  creating new face object "<<&*f<<" bd "<<&*e);
-      }
-    }
-    
-    for (SHalfedge_iterator e = e_start; e != e_end; ++e) {
-      if ( e->incident_sface() != SFace_handle() ) continue;
-      if ( SFaceCycle[e] == 0 ) continue;
-      CGAL_NEF_TRACEN("linking hole "<<PH(e));
-      SFace_handle f = determine_face(e,MinimalSHalfedge,SFaceCycle,D);
-      if(f != SFace_handle())
-	link_as_face_cycle(e,f);
-    }
-  }    
-
-  for (SVertex_iterator v = v_start; v != v_end; ++v) {
-    if ( !is_isolated(v) ) continue;
-    SHalfedge_handle e_below = D.halfedge_below(v);
-    CGAL_assertion( e_below != SHalfedge_handle() || e_start == e_end );
-    if(e_below != SHalfedge_handle())
-      link_as_isolated_vertex(v,e_below->incident_sface());
-  }
-
-}
-
-template <typename Map>
-template <typename Below_accessor>
-void SM_overlayer<Map>::
-complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
-  const Below_accessor& , std::vector<Mark>& mohs, int offset, bool both) const
-{ CGAL_NEF_TRACEN("complete_face_support");
-  for (SVertex_iterator v = v_start; v != v_end; ++v) { 
-    CGAL_NEF_TRACEN("VERTEX = "<<PH(v));
-    Mark m_buffer[2];
-    SHalfedge_handle e_below = halfedge_below(v);
-    if ( v == v_start ) {     
-      for (int i=0; i<2; ++i){
-	m_buffer[i] = mohs[offset+2*i];
-      } 
-    } else if ( e_below != SHalfedge_handle() ) {
-      for (int i=0; i<2; ++i) {
-	CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
-	m_buffer[i] = incident_mark(e_below,i);
-      }
-    } else { // e_below does not exist
-      //      CGAL_assertion( v->point().hz() == 0 && 
-      //		   ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
-      if(!is_isolated(v)) {
-	if(!both) {
-	  for (int i=0; i<2; ++i)
-	    m_buffer[i] = mohs[offset+2*i];	
-	  CGAL_NEF_TRACEN("no edge below ");
-	} else {
-	  for (int i=0; i<2; ++i) 
-	    m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
-	}
-      }
-    } CGAL_NEF_TRACEN(" faces right-below "<<m_buffer[0]<<" "<<m_buffer[1]);
-
-    for (int i=0; i<2; ++i) {
-      Object_handle o = supp_object(v,i);
-      if ( o.empty() ) { 
-	CGAL_NEF_TRACEN("no vertex support"); 
-	mark(v,i) = m_buffer[i]; continue; 
-      }
-      SVertex_const_handle vs;
-      SHalfedge_const_handle es;
-      SHalfloop_const_handle ls;
-      if ( CGAL::assign(vs,o) ) { 
-	CGAL_NEF_TRACEN("support by svertex");
-	mark(v,i) = vs->mark(); continue; 
-      }
-      if ( CGAL::assign(es,supp_object(v,i)) ) {
-	CGAL_NEF_TRACEN("support by sedge");
-        if ( es->source()->point() == v->point() ) 
-	  { mark(v,i) = es->source()->mark(); continue; }
-        if ( es->target()->point() == v->point() ) 
-	  { mark(v,i) = es->target()->mark(); continue; }
-        mark(v,i) = es->mark(); continue;
-      }
-      if ( CGAL::assign(ls,o) ) { 
-	mark(v,i) = ls->mark(); 
-	CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
-      CGAL_error_msg("wrong handle");
-    } CGAL_NEF_TRACEN(" vertex marks "<<mark(v,0)<<" "<<mark(v,1));
-
-    if ( is_isolated(v) ) continue;
-    SHalfedge_around_svertex_circulator e(first_out_edge(v)), hend(e);
-    CGAL_For_all(e,hend) {
-      if ( !is_forward(e) ) break;
-      CGAL_NEF_TRACEN("  forward edge "<<PH(e));
-      for (int i=0; i<2; ++i) {
-        if ( ! supp_object(e,i).empty() ) {
-          SHalfedge_const_handle ei; 
-          if ( CGAL::assign(ei,supp_object(e,i)) ) { 
-            if (!equal_not_opposite(ei->circle(),e->circle())) 
-	      ei = ei->twin();
-            CGAL_assertion( ei->circle() == e->circle() ); 
-            CGAL_NEF_TRACEN("  supporting edge "<<i<<" "<<PH(ei));
-            incident_mark(e->twin(),i) =
-              ei->twin()->incident_sface()->mark();
-            mark(e,i) = mark(e->twin(),i) = ei->mark();
-            incident_mark(e,i) = m_buffer[i] =
-              ei->incident_sface()->mark(); 
-          }
-          SHalfloop_const_handle li;
-          if ( CGAL::assign(li,supp_object(e,i)) ) { 
-	    if (!equal_not_opposite(li->circle(),e->circle())) 
-	      li = li->twin();
-	    CGAL_assertion( li->circle() == e->circle() ); 
-	    CGAL_NEF_TRACEN("  supporting loop "<<i<<" "<<PH(li));
-	    incident_mark(e->twin(),i) =
-	      li->twin()->incident_sface()->mark();
-	    mark(e,i) = mark(e->twin(),i) = li->mark();
-	    incident_mark(e,i) = m_buffer[i] =
-	      li->incident_sface()->mark(); 
-          }
-        } else { CGAL_NEF_TRACEN("  support from face below "<<i);
-	  incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
-          incident_mark(e,i) = m_buffer[i];
-        }
-      } CGAL_NEF_TRACEN("  face marks "<<m_buffer[0]<<" "<<m_buffer[1]);
-    }
-
-    CGAL_NEF_TRACEN(" mark of "<<PH(v)<<" "<<mark(v,0)<<" "<<mark(v,1));
-  }
-}
-
-template <typename Map>
-void SM_overlayer<Map>::complete_sface_marks() const {
-  SFace_iterator f;
-  for (f = this->sfaces_begin(); f != this->sfaces_end(); ++f) {
-    assoc_info(f);
-    SFace_cycle_iterator boundary_object(f->sface_cycles_begin());
-    if (!boundary_object.is_shalfedge() ) 
-      CGAL_error_msg("Outer face cycle should be first.");
-    SHalfedge_handle e(boundary_object);
-    for (int i=0; i<2; ++i) mark(f,i) = incident_mark(e,i);
-  }
-}
-
-template <typename Map>
-template <typename Mark_accessor>
-void SM_overlayer<Map>::
-merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2,
-  const Mark_accessor& D)
-{
-  SVertex_handle v1 = e1->source(), v2 = e2->target();
-  CGAL_NEF_TRACEN("merge_nodes "<<PH(v1)<<PH(v2));
-  CGAL_assertion(v1->point()==v2->point());
-  SHalfedge_handle ep1 = e1->sprev(), en2 = e2->snext();
-  SHalfedge_around_svertex_circulator eav(out_edges(v2)),ee(eav);
-  CGAL_For_all(eav,ee) { set_source(eav,v1); }
-  link_as_prev_next_pair(e2,e1);  
-  link_as_prev_next_pair(ep1,en2); 
-  D.assert_equal_marks(v1,v2);
-  D.discard_info(v2);
-  delete_vertex_only(v2);
-}
-
-template <typename Map>
-template <typename Mark_accessor>
-void SM_overlayer<Map>::
-merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2,
-  const Mark_accessor& D)
-{ CGAL_NEF_TRACEN("merging halfspheres "<<PH(v1)<<PH(v2));
-  CGAL_assertion(v1->point()==v2->point());
-  std::list<SHalfedge_pair> L_equator;
-  SHalfedge_around_sface_circulator 
-    ep(last_out_edge(v1)), en(first_out_edge(v2)->twin());
-  do { 
-   L_equator.push_back(SHalfedge_pair(ep,en));
-   merge_nodes(ep,en,D); ++ep; --en; 
-  } while ( ep->source() != v1 );
-  
-  typename std::list<SHalfedge_pair>::iterator it;
-  CGAL_forall_iterators(it,L_equator) { 
-    SHalfedge_handle e1 = it->first, e2 = it->second;
-    SHalfedge_handle e1t = e1->twin(), e2t = e2->twin();
-    CGAL_NEF_TRACEV(PH(e1));CGAL_NEF_TRACEV(PH(e2));
-    SHalfedge_handle e2tp = e2t->sprev();
-    SHalfedge_handle e2tn = e2t->snext();
-    link_as_prev_next_pair(e2tp,e1);
-    link_as_prev_next_pair(e1,e2tn);
-    SFace_handle f = e2t->incident_sface();
-    if ( is_sm_boundary_object(e2t) )
-    { undo_sm_boundary_object(e2t,f); store_sm_boundary_object(e1,f); }
-    set_face(e1,f);
-    if ( e2 == first_out_edge(e2->source()) )
-      set_first_out_edge(e2->source(),e1t);
-    D.discard_info(e2);
-    delete_edge_pair_only(e2);
-  }
-}
-
-template <typename Map>
-template <typename Selection>
-void SM_overlayer<Map>::
-select(const Selection& SP) const
-{ 
-  SVertex_iterator v;
-  CGAL_forall_svertices(v,*this) {
-    v->mark() = SP(mark(v,0),mark(v,1));
-    discard_info(v); 
-  }
-  SHalfedge_iterator e;
-  CGAL_forall_sedges(e,*this) {
-    e->mark() = SP(mark(e,0),mark(e,1));
-    e->twin()->mark() = SP(mark(e->twin(),0),mark(e->twin(),1));
-    CGAL_assertion(e->mark() == e->twin()->mark());
-    discard_info(e);
-  }
-  SFace_iterator f;
-  CGAL_forall_sfaces(f,*this) {
-    f->mark() = SP(mark(f,0),mark(f,1));
-    discard_info(f);
-  }
-
-}
-
-template <typename Map>
-void SM_overlayer<Map>::simplify()
-{
-  CGAL_NEF_TRACEN("simplifying"); 
-
-  typedef typename CGAL::Union_find<SFace_handle>::handle Union_find_handle;
-  CGAL::Unique_hash_map< SFace_handle, Union_find_handle> Pitem(NULL);
-  CGAL::Unique_hash_map< SVertex_handle, Union_find_handle> Vitem(NULL);
-  CGAL::Union_find< SFace_handle> UF;
-  
-  SFace_iterator f;
-  CGAL_forall_sfaces(f,*this) {
-     Pitem[f] = UF.make_set(f);
-     clear_face_cycle_entries(f);
-  }
-
-  if ( this->has_shalfloop() ) {
-    SHalfloop_handle l = this->shalfloop();
-    SFace_handle f = *(UF.find(Pitem[l->incident_sface()]));
-    link_as_loop(l,f);
-    f = *(UF.find(Pitem[l->twin()->incident_sface()]));
-    link_as_loop(l->twin(),f);
-  }
-
-  SHalfedge_iterator e, en;
-  for(e = this->shalfedges_begin(); e != this->shalfedges_end(); e = en) { 
-    en = e; ++en; if ( en==e->twin() ) ++en;
-    CGAL_NEF_TRACEN("can simplify ? " << PH(e));
-    CGAL_NEF_TRACEN(e->mark() << " " << 
-		    e->incident_sface()->mark() << " " << 
-		    e->twin()->incident_sface()->mark());
-    if (( e->mark() == e->incident_sface()->mark() && 
-	  e->mark() == e->twin()->incident_sface()->mark())){
-      CGAL_NEF_TRACEN("deleting "<<PH(e));
-      if ( !UF.same_set(Pitem[e->incident_sface()],
-			Pitem[e->twin()->incident_sface()]) ) {
-	
-	UF.unify_sets( Pitem[e->incident_sface()],
-		       Pitem[e->twin()->incident_sface()] );
-	CGAL_NEF_TRACEN("unioning disjoint faces");
-      }
-      
-      CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) << 
-	     " " << is_closed_at_source(e->twin()));
-      
-      if ( is_closed_at_source(e) )
-	Vitem[e->source()] = Pitem[e->incident_sface()];
-      
-      if ( is_closed_at_source(e->twin()))
-	Vitem[e->target()] = Pitem[e->incident_sface()];
-      
-      delete_edge_pair(e);
-    }
-  }
-
-  CGAL::Unique_hash_map<SHalfedge_handle,bool> linked(false);
-  for (e = this->shalfedges_begin(); e != this->shalfedges_end(); ++e) {
-    if ( linked[e] ) continue;
-    SHalfedge_around_sface_circulator hfc(e),hend(hfc);
-    SFace_handle f = *(UF.find( Pitem[e->incident_sface()]));
-    CGAL_For_all(hfc,hend) {  set_face(hfc,f); linked[hfc]=true; }
-    store_sm_boundary_object(e,f);
-  }
-
-  SVertex_iterator v,vn;
-  for(v = this->svertices_begin(); v != this->svertices_end(); v=vn) {
-    vn=v; ++vn;
-    if ( is_isolated(v) ) {
-    
-      if(Vitem[v] != NULL) {
-	set_face(v,*(UF.find(Vitem[v])));
-	CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
-      }
-      else {
-	set_face(v, *(UF.find(Pitem[v->incident_sface()])));
-	CGAL_NEF_TRACEN("isolated svertex " << PH(v) << 
-	       " already has incident face " << &*(v->incident_sface()));
-      }
-
-      if ( v->mark() == v->incident_sface()->mark() ) {
-        CGAL_NEF_TRACEN("removing isolated vertex"<<PH(v));
-        delete_vertex_only(v);  
-      } 
-      else 
-        store_sm_boundary_object(v,v->incident_sface()); // isolated, but should stay
-    } else { // v not isolated
-      SHalfedge_handle e2 = first_out_edge(v), e1 = e2->sprev();
-      if ( has_outdeg_two(v) &&
-           v->mark() == e1->mark() && v->mark() == e2->mark() &&
-           e1->circle() == e2->circle() ) {
-        CGAL_NEF_TRACEN("collinear at "<<PH(v)<<PH(e1)<<PH(e2));
-        if ( e1 == e2 ){ CGAL_NEF_TRACEN("edge_to_loop"); convert_edge_to_loop(e1);}
-        else {CGAL_NEF_TRACEN("merge_edge_pairs"); merge_edge_pairs_at_target(e1); } 
-      }
-    }
-  }
-
-  SFace_iterator fn;
-  for (f = fn = this->sfaces_begin(); f != this->sfaces_end(); f=fn) { 
-    ++fn;
-    Union_find_handle pit = Pitem[f];
-    if ( UF.find(pit) != pit ) {
-      CGAL_NEF_TRACEN("delete face " << &*f);
-      delete_face_only(f);
-    }
-  }
-}
-
-template <typename Map>
-template <typename Iterator>
-void SM_overlayer<Map>::
-subdivide_segments(Iterator start, Iterator end) const
-{
-typedef SMO_decorator<SM_decorator,Iterator> SM_output;
-typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-typedef CGAL::Segment_overlay_traits< 
-          Iterator, SM_output, PH_geometry>  PHS_traits;
-typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-
-typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-typedef CGAL::Segment_overlay_traits< 
-          Iterator, SM_output, NH_geometry> NHS_traits;
-typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  std::list<Sphere_segment> Lp,Lm;
-  partition_xy( start, end, Lp , +1);
-  partition_xy( start, end, Lm , -1);
-  // both lists initialized with four quarter segments
-  // supporting the xy-equator thereby separating the 
-  // two halfspheres 
-  // all other segments in the range are split into their
-  // connected components with respect to the xy-plane.
-
-  SVertex_handle v1,v2;
-  SM_output O(*this); 
-  typedef typename PHS_traits::INPUT Input_range;
-  Positive_halfsphere_sweep SP(Input_range(Lp.begin(),Lp.end()),O);
-  SP.sweep();
-  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
-  v1= this->vertices_begin(); v2=--this->vertices_end();
-  Negative_halfsphere_sweep SM(Input_range(Lm.begin(),Lm.end()),O);
-  SM.sweep();
-  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
-  ++v2;
-  // now two CCs of sphere graph calculated
-  // v1 = first node of CC in positive xy-sphere
-  // v2 = first node of CC in negative xy-sphere
-
-  merge_halfsphere_maps(v1,v2,O);
-  this->check_integrity_and_topological_planarity(false);
-}
-
-
-} //namespace CGAL
-
-#endif //CGAL_SM_OVERLAYER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_triangulator.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_triangulator.h
deleted file mode 100644
index 824eb5f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_triangulator.h
+++ /dev/null
@@ -1,744 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_SM_TRIANGULATOR_H
-#define CGAL_SM_TRIANGULATOR_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/Nef_2/Segment_overlay_traits.h>
-#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-#include <CGAL/Nef_2/geninfo.h>
-#else
-#include <boost/any.hpp>
-#endif
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_S2/SM_const_decorator.h>
-#include <CGAL/Nef_S2/SM_point_locator.h>
-#include <CGAL/Nef_S2/SM_io_parser.h>
-#include <CGAL/Nef_S2/SM_constrained_triang_traits.h>
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 137
-#include <CGAL/Nef_2/debug.h>
-
-#define CGAL_USING(t) typedef typename Base::t t
-#ifndef CGAL_USE_LEDA
-#define LEDA_MEMORY(t) 
-#endif
-namespace CGAL {
-
-template <typename Decorator_, typename IT, typename INFO>
-struct SM_subdivision {
-  typedef Decorator_ Triangulator;
-  typedef typename Decorator_::SVertex_handle Vertex_handle;
-  typedef typename Decorator_::SHalfedge_handle   Halfedge_handle;
-  typedef typename Decorator_::Sphere_point   Point;
-  typedef typename Decorator_::Sphere_segment Segment;
-  Triangulator T;
-  CGAL::Unique_hash_map<IT,INFO>& M;
-  /* M stores the object that supports the segment that
-     is input object of the sweep */
-
-  SM_subdivision(Triangulator Ti, 
-                 CGAL::Unique_hash_map<IT,INFO>& Mi) : T(Ti), M(Mi) {}
-
-Vertex_handle new_vertex(const Point& p)
-{ Vertex_handle v = T.new_svertex(p); T.assoc_info(v);
-  return v;
-}
-
-void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
-{ T.link_as_target_and_append(v,e); }
-
-Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
-{ Halfedge_handle e = 
-  T.new_shalfedge_pair_at_source(v,Decorator_::BEFORE); 
-  T.assoc_info(e);
-  return e;
-}
-
-void halfedge_below(Vertex_handle v, Halfedge_handle e) const 
-{ T.halfedge_below(v) = e; }
-
-/* the following operation associates segment support with
-   halfedges, we only update if non-NULL; this prevents 
-   artificial sphere subdivision segments that have NULL 
-   support to overwrite non-NULL support */
-
-void supporting_segment(Halfedge_handle e, IT it) const
-{ T.is_forward(e) = true; 
-  if ( ! M[it].empty() ) T.support(e) = M[it]; }
-
-/* the following operation associate segment support with
-   vertices, we only update if non-NULL; this prevents 
-   artificial segments that have NULL support to overwrite
-   non-NULL support */
-
-void trivial_segment(Vertex_handle v, IT it) const
-{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
-
-void starting_segment(Vertex_handle v, IT it) const
-{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
-
-void ending_segment(Vertex_handle v, IT it) const
-{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
-
-void passing_segment(Vertex_handle v, IT it) const
-{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
-
-
-}; // SM_subdivision
-
-
-
-/*{\Manpage {SM_triangulator}{Decorator_}{Overlay in the sphere}{O}}*/
-
-template <typename Decorator_>
-class SM_triangulator : public Decorator_ {
-public:
-  /*{\Mdefinition An instance |\Mvar| of data type |\Mname| is a
-  decorator object offering sphere map triangulation calculation.}*/
-
-  typedef Decorator_                            Base;
-  typedef typename Decorator_::Sphere_map       Sphere_map;
-  typedef CGAL::SM_const_decorator<Sphere_map>  SM_const_decorator;
-  typedef SM_const_decorator                    Explorer;
-  typedef Decorator_                            Decorator;
-  typedef SM_triangulator<Decorator_>           Self;
-  typedef CGAL::SM_point_locator<SM_const_decorator>  SM_point_locator;
-
-  typedef typename SM_const_decorator::SVertex_const_handle SVertex_const_handle;
-  typedef typename SM_const_decorator::SHalfedge_const_handle SHalfedge_const_handle;
-  typedef typename SM_const_decorator::SHalfloop_const_handle SHalfloop_const_handle;
-  typedef typename SM_const_decorator::SFace_const_handle SFace_const_handle;
-  typedef typename SM_const_decorator::SVertex_const_iterator SVertex_const_iterator;
-  typedef typename SM_const_decorator::SHalfedge_const_iterator SHalfedge_const_iterator;
-  typedef typename SM_const_decorator::SFace_const_iterator SFace_const_iterator;
-
-  typedef typename Base::SVertex_handle SVertex_handle;
-  typedef typename Base::SHalfedge_handle SHalfedge_handle;
-  typedef typename Base::SHalfloop_handle SHalfloop_handle;
-  typedef typename Base::SFace_handle SFace_handle;
-  typedef typename Base::SVertex_iterator SVertex_iterator;
-  typedef typename Base::SHalfedge_iterator SHalfedge_iterator;
-  typedef typename Base::SFace_iterator SFace_iterator;
-  typedef typename Base::Object_handle Object_handle;
-
-  typedef typename Base::SHalfedge_around_svertex_circulator 
-                         SHalfedge_around_svertex_circulator;
-  typedef typename Base::SHalfedge_around_sface_circulator 
-                         SHalfedge_around_sface_circulator;
-
-  typedef std::pair<SHalfedge_handle,SHalfedge_handle> SHalfedge_pair;
-
-  /*{\Mtypes 3}*/
-
-  typedef typename Base::Sphere_kernel Sphere_kernel;
-
-  typedef typename Sphere_kernel::Sphere_point   Sphere_point;
-  /*{\Mtypemember the point type of the sphere geometry.}*/
-  typedef typename Sphere_kernel::Sphere_segment Sphere_segment;
-  /*{\Mtypemember the segment type of the sphere geometry.}*/
-  typedef typename Sphere_kernel::Sphere_circle  Sphere_circle;
-  /*{\Mtypemember the circle type of the sphere geometry.}*/
-  typedef typename Sphere_kernel::Sphere_triangle Sphere_triangle;
-  /*{\Mtypemember the triangle type of the sphere geometry.}*/
-
-  typedef typename Decorator::Mark        Mark;
-  /*{\Mtypemember the mark of sphere map objects.}*/
-
-  /*{\Mgeneralization Decorator_}*/
-
-protected:
-  const Explorer* E_;
-  const Sphere_kernel& K;
-
-public:
-
-  typedef std::list<Sphere_segment>            Seg_list;
-  typedef typename Seg_list::iterator          Seg_iterator;
-  typedef std::pair<Seg_iterator,Seg_iterator> Seg_it_pair;
-  typedef std::pair<Sphere_segment,Sphere_segment> Seg_pair;
-  typedef CGAL::Unique_hash_map<Seg_iterator,Object_handle> Seg_map;
-
-  using Base::info;
-  using Base::set_first_out_edge;
-  using Base::first_out_edge;
-  using Base::last_out_edge;
-  using Base::is_isolated;
-  using Base::has_outdeg_two;
-  using Base::flip_diagonal;
-  using Base::out_edges;
-  using Base::set_source;
-  using Base::set_face;
-  using Base::link_as_prev_next_pair;
-  using Base::delete_vertex_only;
-  using Base::delete_edge_pair_only;
-  using Base::is_sm_boundary_object;
-  using Base::store_sm_boundary_object;
-  using Base::undo_sm_boundary_object;
-
-  // vertex_info stores the origin of vertices
-  struct vertex_info {
-    Object_handle         o_;
-    SHalfedge_handle       e_;
-    vertex_info() : o_(),e_() {}
-    LEDA_MEMORY(vertex_info)
-  };
-
-  void assoc_info(SVertex_handle v) const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<vertex_info>::create(info(v)); 
-    #else
-    info(v)=vertex_info();
-    #endif
-  }
-
-  void discard_info(SVertex_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<vertex_info>::clear(info(v)); 
-    #else
-    info(v)=boost::any();
-    #endif
-  }
-
-  vertex_info& ginfo(SVertex_handle v) const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<vertex_info>::access(info(v)); 
-    #else
-    return
-      *boost::any_cast<vertex_info>(&info(v));
-    #endif
-  }
-
-  Object_handle& support(SVertex_handle v) const
-  { return ginfo(v).o_; }
-
-  SHalfedge_handle& halfedge_below(SVertex_handle v) const
-  { return ginfo(v).e_; }
-
-  // edge_info stores the origin of edges
-  struct edge_info {
-    Mark m_left_; Object_handle o_; bool forw_;
-
-    edge_info() { m_left_=Mark(); o_=Object_handle(); forw_=false; }
-    LEDA_MEMORY(edge_info)
-  };
-
-  void assoc_info(SHalfedge_handle e)  const
-  { 
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<edge_info>::create(info(e)); 
-    geninfo<edge_info>::create(info(e->twin()));
-    #else
-    info(e)=edge_info();
-    info(e->twin())=edge_info();
-    #endif
-  }
-
-  void discard_info(SHalfedge_handle e)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    geninfo<edge_info>::clear(info(e)); 
-    geninfo<edge_info>::clear(info(e->twin()));
-    #else
-    info(e)=boost::any();
-    info(e->twin())=boost::any();
-    #endif
-  }
-
-  edge_info& ginfo(SHalfedge_handle e)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<edge_info>::access(info(e)); 
-    #else
-    return
-      *boost::any_cast<edge_info>(&info(e));
-    #endif
-  }
-
-  Object_handle& support(SHalfedge_handle e) const
-  // uedge information we store in the smaller one 
-  { if (&*e < &*(e->twin())) return ginfo(e).o_; 
-    else                   return ginfo(e->twin()).o_; }
-
-  Mark& incident_mark(SHalfedge_handle e)  const
-  // biedge information we store in the edge
-  { return ginfo(e).m_left_; }
-
-  const edge_info& ginfo(SHalfedge_const_handle e)  const
-  {
-    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
-    return geninfo<edge_info>::const_access(info(e)); 
-    #else
-    return 
-      *boost::any_cast<edge_info>(&info(e)); 
-    #endif
-  }
-  const Mark& incident_mark(SHalfedge_const_handle e)  const
-  { return ginfo(e).m_left_; }
-
-  bool& is_forward(SHalfedge_handle e) const
-  // biedge information we store in the edge
-  { return ginfo(e).forw_; }
-
-  void assert_equal_marks(SVertex_handle v1, SVertex_handle v2) const 
-  { CGAL_assertion(v1->mark()==v2->mark()); }
-
-  void assert_equal_marks(SHalfedge_handle e1, SHalfedge_handle e2) const
-  { CGAL_assertion(e1->mark()==e2->mark()); }
-
-  Sphere_segment segment(const Explorer* , 
-                         SHalfedge_const_handle e) const
-  { return Sphere_segment(
-	    e->source()->point(),e->twin()->source()->point(),e->circle()); }
-
-  Sphere_segment trivial_segment(const Explorer* , 
-                                 SVertex_const_handle v) const
-  { Sphere_point p = v->point(); 
-    return Sphere_segment(p,p); }
-
-  Seg_pair two_segments(const Explorer* , 
-                        SHalfedge_const_handle e) const
-  // we know that source(e)==target(e)
-  { return e->circle().split_at(e->source()->point()); }
-
-  Seg_pair two_segments(const Explorer* , 
-                        SHalfloop_const_handle l) const
-  { return l->circle().split_at_xy_plane(); }
-
-  /*{\Mcreation 6}*/
-  SM_triangulator(Sphere_map* M, const Explorer* E,
-		  const Sphere_kernel& G = Sphere_kernel()) : Base(M), E_(E), K(G) {}
-  /*{\Mcreate |\Mvar| is a triangulator object for the map |M|,
-     stores the triangulation in |MT|.}*/
-
-  /*{\Moperations 1.1 1}*/
-
-  void triangulate();
-  /*{\Mop produces a triangulated sphere map.}*/
-
-  void triangulate_per_hemisphere(SVertex_iterator start, SVertex_iterator end);
-
-  template <typename Iterator, typename T>
-  void partition_to_halfsphere(Iterator start, Iterator end,
-    Seg_list& L, CGAL::Unique_hash_map<Iterator,T>& M, int pos) const;
-
-  void merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2);
-  void merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2);
-  void complete_support(SVertex_iterator v_start, SVertex_iterator v_end, 
-			Mark mohs) const;
-
-  void correct_triangle_at(SVertex_handle v)
-  { CGAL_NEF_TRACEN("correct_triangle_at "<<PH(v));
-    if ( !has_outdeg_two(v) ) return;
-    SHalfedge_handle e = first_out_edge(v);
-    CGAL_assertion(e->snext()->snext()->snext()==e);
-    flip_diagonal(e->snext());
-  }
-
-  void dump(std::ostream& os = std::cerr) const
-  { SM_io_parser<Explorer>::dump(E_,os);
-    SM_io_parser<Base>::dump(*this,os); }
-
-  Sphere_triangle incident_triangle(SHalfedge_handle e) const
-  { SHalfedge_handle en(e->snext()), enn(en->snext());
-    CGAL_assertion(enn->snext()==e);
-    return Sphere_triangle(e->source()->point(),
-			   en->source()->point(),
-			   enn->source()->point(),
-			   e->circle(),
-			   en->circle(),
-			   enn->circle());
-  }
-
-  Sphere_triangle incident_triangle(SHalfedge_const_handle e) const
-  { SHalfedge_const_handle en(e->snext()), enn(en->snext());
-    CGAL_assertion(enn->snext()==e);
-    return Sphere_triangle(e->source()->point(),
-			   en->source()->point(),
-			   enn->source()->point(),
-			   e->circle(),
-			   en->circle(),
-			   enn->circle());
-  }
-
-  void discard_info()
-  {
-    SVertex_iterator v;
-    SHalfedge_iterator e;
-    CGAL_forall_svertices(v,*this) discard_info(v);
-    CGAL_forall_shalfedges(e,*this) discard_info(e);
-  }
-
-
-}; // SM_triangulator<Decorator_>
-
-
-template <typename Decorator_>
-void SM_triangulator<Decorator_>::triangulate()
-{ CGAL_NEF_TRACEN("triangulate");
-  // first create sphere segments from isoverts, edges, loops
-  Seg_list L;
-  Seg_map From;
-  SVertex_const_iterator v;
-  CGAL_forall_svertices(v,*E_) {
-    if ( !E_->is_isolated(v) ) continue;
-    L.push_back(trivial_segment(E_,v));
-    From[--L.end()] = make_object(v);
-  }
-  SHalfedge_const_iterator e;
-  CGAL_forall_sedges(e,*E_) {
-    if ( e->source() == e->twin()->source() ) {
-      Seg_pair p = two_segments(E_,e);
-      L.push_back(p.first); L.push_back(p.second);
-      From[--L.end()] = From[--(--L.end())] = make_object(e);
-    } else {
-      L.push_back(segment(E_,e));
-      From[--L.end()] = make_object(e);
-    }
-  }
-  if ( E_->has_shalfloop() ) {
-    Seg_pair p = two_segments(E_,E_->shalfloop());
-    L.push_back(p.first); L.push_back(p.second);
-    From[--L.end()] = From[--(--L.end())] = make_object(E_->shalfloop());
-  }
-
-  // partition segments from L to positive and negative hemisphere
-  Seg_list L_pos,L_neg;
-  partition_to_halfsphere(L.begin(), L.end(), L_pos, From, +1);
-  partition_to_halfsphere(L.begin(), L.end(), L_neg, From, -1);
-
-  //  typename Seg_list::iterator it;
-  //    std::cerr << "L_pos" << std::endl;
-  //    CGAL_forall_iterators(it,L_pos) std::cerr << *it << std::endl;
-  //    std::cerr << "L_neg" << std::endl;
-  //    CGAL_forall_iterators(it,L_neg) std::cerr << *it << std::endl;
-
-  // sweep the hemispheres to create two half sphere maps
-  typedef SM_subdivision<Self,Seg_iterator,Object_handle> SM_output;
-  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
-  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
-
-  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
-  typedef CGAL::Segment_overlay_traits< 
-            Seg_iterator, SM_output, NH_geometry> NHS_traits;
-  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
-
-  SVertex_handle v_sep;
-  SHalfedge_handle e_sep;
-  SM_output O(*this,From); 
-
-  typedef typename PHS_traits::INPUT Input_range;
-  Positive_halfsphere_sweep SP(
-    Input_range(L_pos.begin(),L_pos.end()),O,
-    PH_geometry());
-  SP.sweep();
-  v_sep=--this->svertices_end(); e_sep=--this->shalfedges_end();
-
-  Negative_halfsphere_sweep SM(
-    Input_range(L_neg.begin(),L_neg.end()),O,
-    NH_geometry());
-  SM.sweep();
-  ++v_sep; ++e_sep;
-  // now two CCs of sphere graph are calculated
-  // v_sep = first vertex of CC in negative x-sphere
-  // e_sep = first edge of CC in negative x-sphere
-   
-  SHalfedge_iterator u;
-  CGAL_forall_sedges(u,*this) {
-    Sphere_segment s(u->source()->point(),u->twin()->source()->point());
-    u->circle() = s.sphere_circle(); 
-    u->twin()->circle() = s.sphere_circle().opposite();
-  }
-
-  Mark lower, upper;
-  SM_point_locator PL(E_->sphere_map());
-  PL.marks_of_halfspheres(lower,upper);
-  complete_support(this->svertices_begin(), v_sep, lower);
-  complete_support(v_sep, this->svertices_end(), upper);
-
-  /*
-  CGAL_forall_sedges(u,*this) {
-    std::cerr << point(source(u)) << "->" << point(target(u)) << std::endl;
-  }
-  */
-
-  // triangulate per hemisphere
-  typedef SM_constrained_triang_traits<Self,PH_geometry>  PCT_traits;
-  typedef CGAL::generic_sweep<PCT_traits> Positive_halfsphere_ct_sweep;
-  typedef SM_constrained_triang_traits<Self,NH_geometry>  NCT_traits;
-  typedef CGAL::generic_sweep<NCT_traits> Negative_halfsphere_ct_sweep;
-  typedef std::pair<SVertex_iterator,SVertex_iterator> SVertex_pair;
-
-  SVertex_pair vpp(this->svertices_begin(),v_sep);
-  Positive_halfsphere_ct_sweep PCTS(vpp, *this,
-    PH_geometry());
-  PCTS.sweep();
-  SVertex_pair vpn(v_sep,this->svertices_end());
-  Negative_halfsphere_ct_sweep NCTS(vpn, *this,
-    NH_geometry());
-  NCTS.sweep();
-
-  /*
-  std::cerr << std::endl;
-  CGAL_forall_sedges(u,*this) {
-    std::cerr << point(source(u)) << "->" << point(target(u)) << std::endl;
-  }
-  */
-
-  /* Note the we divide the world along the xy equator and 
-     split the equator at y- and y+. We treat the halfcircle
-     at x+ as if perturbed slightly up. This makes triangles
-     that have y- or y+ as a vertex degenerate. if such triangles
-     appear we repair it by flipping the edge opposite to the
-     vertex y-(y+).
-  */
-
-  correct_triangle_at(this->svertices_begin());
-  correct_triangle_at(--SVertex_iterator(v_sep));
-  correct_triangle_at(v_sep);
-  correct_triangle_at(--this->svertices_end());
-
-  CGAL_forall_sedges(u,*this) {
-    Sphere_segment s(u->source()->point(),u->twin()->source()->point());
-    u->circle() = s.sphere_circle();
-    u->twin()->circle() = s.sphere_circle().opposite();
-  }
-
-  // merge the hemisphere maps into one sphere map
-  merge_halfsphere_maps(this->svertices_begin(),v_sep);
-  this->check_integrity_and_topological_planarity(false);
-}
-
-
-template <typename Decorator_>
-template <typename Iterator, typename T>
-void SM_triangulator<Decorator_>::
-partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L, 
-  CGAL::Unique_hash_map<Iterator,T>& M, int pos) const
-{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
-  CGAL_assertion(pos!=0);
-  bool add_cross = true;
-  Sphere_segment s1,s2;
-  Sphere_circle xycircle(0,0,pos);
-  while ( start != beyond ) { 
-    if(start->source().hz() * pos > 0 || start->target().hz() * pos > 0)
-      add_cross = false;
-    int i = start->intersection(xycircle,s1,s2);
-    if (i>1) { L.push_back(s2); M[--L.end()] = M[start]; }
-    if (i>0) { L.push_back(s1); M[--L.end()] = M[start]; }
-    ++start;
-  }
-  // now all segments are split into halfspheres
-  // we still have to:
-  // - split segments containing our special poles y^-, y^+
-  // - split halfcircles
-  // - add four equator segments 
-  Sphere_point S(0,-1,0),N(0,1,0);
-  Sphere_circle yzcircle(1,0,0);
-  typename Seg_list::iterator it, itl;
-
-  bool part_in_hemisphere(false);
-  CGAL_forall_iterators(it,L) { CGAL_NEF_TRACEN("  "<<*it);
-    if ( equal_as_sets(it->sphere_circle(),xycircle) ) {
-      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
-      int n1 =  it->intersection(yzcircle,s1,s2);
-      if (n1 > 1 && !s2.is_degenerate()) 
-      { M[ L.insert(it,s2) ] = M[it]; }
-      if (n1 > 0 && !s1.is_degenerate()) 
-      { M[ L.insert(it,s1) ] = M[it]; }
-      int n2 =  it->intersection(yzcircle.opposite(),s1,s2);
-      if (n2 > 1 && !s2.is_degenerate()) 
-      { M[ L.insert(it,s2) ] = M[it]; }
-      if (n2 > 0 && !s1.is_degenerate()) 
-      { M[ L.insert(it,s1) ] = M[it]; }
-      itl = it; --it; L.erase(itl); M[itl] = T();
-      // at least one item was appended
-    } else {
-      part_in_hemisphere = true;
-    }
-  }
-  CGAL_forall_iterators(it,L) {
-    if ( it->is_halfcircle() ) {
-      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
-      Sphere_segment s1,s2;
-      it->split_halfcircle(s1,s2);
-      *it = s2; 
-      M[ L.insert(it,s1) ] = M[it];
-    }
-  }
-  // append 4 xy-equator segments:
-  Sphere_segment sp(S,N,xycircle);
-  Sphere_segment sm(S,N,xycircle.opposite());
-  Sphere_segment s[4];
-  sp.split_halfcircle(s[0],s[1]);
-  sm.split_halfcircle(s[2],s[3]);
-  L.insert(L.end(),s,s+4);
-  /* if no segment is covering the interior of the hemisphere
-     we have to add a trivial segment to allow for a correct
-     triangulation */
-  if ( !part_in_hemisphere || add_cross) {
-    Sphere_point p(0,0,pos);
-    Sphere_circle c(1,0,0);
-    L.push_back(Sphere_segment(p,p,c));
-  }
-}
-
-template <typename Decorator_>
-void SM_triangulator<Decorator_>::
-merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2)
-{
-  SVertex_handle v1 = e1->source(), v2 = e2->twin()->source();
-  CGAL_NEF_TRACEN("merge_nodes "<<PH(v1)<<PH(v2));
-  CGAL_assertion(v1->point()==v2->point());
-  SHalfedge_handle ep1 = e1->sprev(), en2 = e2->snext();
-  SHalfedge_around_svertex_circulator eav(out_edges(v2)),ee(eav);
-  CGAL_For_all(eav,ee) { set_source(eav,v1); }
-  link_as_prev_next_pair(e2,e1);  
-  link_as_prev_next_pair(ep1,en2); 
-  assert_equal_marks(v1,v2);
-  discard_info(v2);
-  delete_vertex_only(v2);
-}
-
-
-template <typename Decorator_>
-void SM_triangulator<Decorator_>::
-merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2)
-{ CGAL_NEF_TRACEN("merging halfspheres "<<PH(v1)<<PH(v2));
-  CGAL_assertion(v1->point()==v2->point());
-  std::list<SHalfedge_pair> L_equator;
-  SHalfedge_around_sface_circulator 
-    ep(last_out_edge(v1)), en(first_out_edge(v2)->twin());
-  do { 
-   L_equator.push_back(SHalfedge_pair(ep,en));
-   merge_nodes(ep,en); ++ep; --en; 
-  } while ( ep->source() != v1 );
-  
-  typename std::list<SHalfedge_pair>::iterator it;
-  CGAL_forall_iterators(it,L_equator) { 
-    SHalfedge_handle e1 = it->first, e2 = it->second;
-    SHalfedge_handle e1t = e1->twin(), e2t = e2->twin();
-    CGAL_NEF_TRACEV(PH(e1));CGAL_NEF_TRACEV(PH(e2));
-    SHalfedge_handle e2tp = e2t->sprev();
-    SHalfedge_handle e2tn = e2t->snext();
-    link_as_prev_next_pair(e2tp,e1);
-    link_as_prev_next_pair(e1,e2tn);
-    SFace_handle f = e2t->incident_sface();
-    if ( is_sm_boundary_object(e2t) )
-    { undo_sm_boundary_object(e2t,f); store_sm_boundary_object(e1,f); }
-    set_face(e1,f);
-    if ( e2 == first_out_edge(e2->source()) )
-      set_first_out_edge(e2->source(),e1t);
-    discard_info(e2);
-    delete_edge_pair_only(e2);
-  }
-}
-
-template <typename Decorator_>
-void SM_triangulator<Decorator_>::
-complete_support(SVertex_iterator v_start, SVertex_iterator v_end,
-		 Mark mohs) const
-{ CGAL_NEF_TRACEN("complete_support");
-  Mark m_buffer(mohs); 
-  for (SVertex_iterator v = v_start; v != v_end; ++v) { 
-    CGAL_NEF_TRACEN(" vertex = "<<PH(v));
-    SHalfedge_handle e_below = halfedge_below(v);
-    if ( v != v_start ) {
-      if ( e_below != SHalfedge_handle() ) {
-	m_buffer = incident_mark(e_below); 
-      } else { // e_below does not exist
-	/* this is only the case for a vertex v on the final equatorial
-	   halfcircle; there we take the mark from an inedge edge into v */
-	//	CGAL_assertion( point(v).z() == 0 && 
-	//	  ( pos > 0 ? (point(v).x() >= 0) : (point(v).x()<=0)) );
-	m_buffer = incident_mark(first_out_edge(v)->sprev());
-      }
-    }
-    CGAL_NEF_TRACEN(" face mark below "<<m_buffer);
-
-    Object_handle o = support(v);
-    SVertex_const_handle vs;
-    SHalfedge_const_handle es;
-    SHalfloop_const_handle ls;
-    if ( o.empty() ) { v->mark() = m_buffer; }
-    else if ( CGAL::assign(vs,o) ) { v->mark() = vs->mark(); }
-    else if ( CGAL::assign(es,o) ) {
-      if ( es->source()->point() == v->point() ) 
-	{ v->mark() = es->source()->mark(); }
-      else if ( es->twin()->source()->point() == v->point() ) 
-	{ v->mark() = es->twin()->source()->mark(); }
-      else { v->mark() = es->mark(); }
-    }
-    else if ( CGAL::assign(ls,o) ) { v->mark() = ls->mark(); }
-    else CGAL_error_msg("damn wrong support.");
-    CGAL_NEF_TRACEN(" face mark at "<<v->mark());
-
-    if ( is_isolated(v) ) continue;
-
-    SHalfedge_around_svertex_circulator e(first_out_edge(v)), hend(e);
-    CGAL_For_all(e,hend) {
-      CGAL_NEF_TRACEN("  edge "<<PH(e));
-      if ( !is_forward(e) ) break;
-      if ( ! support(e).empty() ) {
-        SHalfedge_const_handle ei;
-        if ( CGAL::assign(ei,support(e)) ) { 
-          if ( ei->circle() != e->circle() ) { ei = ei->twin(); }
-          CGAL_assertion( ei->circle() == e->circle() ); 
-          CGAL_NEF_TRACEN("  supporting edge "<<PH(ei));
-          incident_mark(e->twin()) = ei->twin()->incident_sface()->mark();
-          e->mark() = ei->mark();
-          incident_mark(e) = m_buffer = ei->incident_sface()->mark(); 
-        }
-        SHalfloop_const_handle li;
-        if ( CGAL::assign(li,support(e)) ) { 
-          if ( li->circle() != e->circle() ) { li = li->twin(); }
-          CGAL_assertion( li->circle() == e->circle() ); 
-          CGAL_NEF_TRACEN("  supporting loop "<<PH(li));
-          incident_mark(e->twin()) = li->twin()->incident_sface()->mark();
-          e->mark() = li->mark();
-          incident_mark(e) = m_buffer = li->incident_sface()->mark();
-        }
-      } else { CGAL_NEF_TRACEN("  support from face below ");
-        incident_mark(e->twin()) = e->mark() = 
-        incident_mark(e) = m_buffer;
-      }
-      CGAL_NEF_TRACEN("  new face mark "<<m_buffer);
-
-    } // CGAL_For_all(e,hend)
-
-    CGAL_NEF_TRACEN(" mark of "<<PH(v));
-  }
-
-}
-
-
-
-
-} //namespace CGAL
-#undef CGAL_USING
-#endif //CGAL_SM_TRIANGULATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_geometry_OGL.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_geometry_OGL.h
deleted file mode 100644
index 04d7426..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_geometry_OGL.h
+++ /dev/null
@@ -1,824 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_SPHERE_GEOMETRY_OGL_H
-#define CGAL_SPHERE_GEOMETRY_OGL_H
-
-#include <CGAL/Nef_S2/OGL_base_object.h>
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Nef_S2/Sphere_geometry.h>
-#include <CGAL/Nef_S2/SM_triangulator.h>
-#include <CGAL/IO/Color.h>
-#include <qgl.h>
-#include <CGAL/glu.h>
-#include <cmath>
-#include <cstdlib>
-#include <cstdio>
-#include <string>
-#include <vector>
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 151
-#include <CGAL/Nef_2/debug.h>
-
-#define CGAL_NEF_LGREY CGAL::Color(170,170,200)
-#define CGAL_NEF_DGREY CGAL::Color(30,30,50)
-
-namespace CGAL {
-namespace OGL {
-
-struct Gen_object {
-  Gen_object() {}
-  virtual ~Gen_object() {}
-  virtual void draw() const {}
-  virtual Gen_object* clone() const { return 0; }
-  virtual void print() const {}
-};
-
-typedef CGAL::Simple_cartesian<double>      VKernel;
-typedef VKernel::Vector_3                   VVector;
-typedef VKernel::Point_3                    VPoint;
-typedef VKernel::Aff_transformation_3       VTrafo;
-typedef VKernel::Aff_transformation_3       Affine_3;
-typedef std::vector<VPoint>                 VSegment;
-typedef VKernel::Triangle_3                 DTriangle;
-typedef std::vector<DTriangle>              VTriangle;
-
-template <typename R>
-VVector convert(const CGAL::Vector_3<R>& v)
-{ return VVector(CGAL::to_double(v.x()),
-                 CGAL::to_double(v.y()),
-                 CGAL::to_double(v.z())); }
-
-
-const double refinement_angle = 0.1;
-const double shrink_fac = 0.995;
-
-template <typename R>
-class Approximator {
-
- public:
-  static VPoint approximate(const CGAL::Sphere_point<R>& p) {
-    VVector v = convert(p-CGAL::ORIGIN);
-    v = v / CGAL_NTS sqrt(v*v) ; // normalize
-    return CGAL::ORIGIN+v;
-  }
-   
-  static VSegment approximate(const CGAL::Sphere_segment<R>& s) {
-    
-    /* we construct the rotation matrix that transfers the x-axis
-       into |ps_|, the z-axis into h_.orthogonal_vector() and the
-       y-axix into the corresponding crossproduct of the two.*/
-    if ( s.is_degenerate() ) {
-      VSegment S(1);
-      S[0] = approximate(s.source());
-      return S;
-    }
-    
-    VVector v0 = convert(s.source()-CGAL::ORIGIN);
-    VVector v2 = convert(s.sphere_circle().orthogonal_vector());
-    VVector v1(-cross_product(v0,v2));
-    VVector v3 = convert(s.target()-CGAL::ORIGIN);
-    double v0l = CGAL_NTS sqrt(v0*v0);
-    double v1l = CGAL_NTS sqrt(v1*v1);
-    double v2l = CGAL_NTS sqrt(v2*v2);
-    double v3l = CGAL_NTS sqrt(v3*v3);
-    double cosalpha = v0*v3 / v0l / v3l; 
-    double alpha = std::acos(cosalpha);
-    const int units_per_halfcircle = 50;
-    int units = int(units_per_halfcircle/CGAL_PI * alpha);
-    if (units == 0) ++units;
-    bool seg_is_short = s.is_short();
-    bool seg_is_halfcircle = s.is_halfcircle();
-    if ( seg_is_halfcircle ) units = units_per_halfcircle;
-    else if ( !seg_is_short ) {
-      units = 2*units_per_halfcircle - (units+1);
-    } CGAL_NEF_TRACEV(units); CGAL_NEF_TRACEV(cosalpha); CGAL_NEF_TRACEV(alpha);
-    
-    v0 = v0 / v0l;
-    v1 = v1 / v1l;
-    v2 = v2 / v2l;
-    v3 = v3 / v3l;
-    VTrafo T(v0.x(),v1.x(),v2.x(),
-	     v0.y(),v1.y(),v2.y(),
-	     v0.z(),v1.z(),v2.z());
-    VSegment S(units+1);
-    for (int i=0; i<units; ++i) 
-      S[i] = VPoint(std::cos(CGAL_PI*i/double(units_per_halfcircle)),
-		    std::sin(CGAL_PI*i/double(units_per_halfcircle)),
-		    0.0);
-    double sinalpha = 1 - cosalpha*cosalpha;
-    if (sinalpha <0) sinalpha = 0; 
-    else             sinalpha = CGAL_NTS sqrt(sinalpha);
-    if ( seg_is_short ) 
-      S[units] = VPoint(cosalpha, sinalpha, 0);
-    else
-      S[units] = VPoint(cosalpha, -sinalpha, 0);
-    VSegment::iterator it;
-    for(it = S.begin(); it != S.end(); ++it) { CGAL_NEF_TRACEN(*it<<" "<<T(*it));
-    *it = T(*it); 
-    } CGAL_NEF_TRACEN("");
-    return S;
-  }
-
-  static VSegment approximate(const CGAL::Sphere_circle<R>& s) {
-    
-    /* we construct the rotation matrix that transfers the x-axis
-       into |ps_|, the z-axis into h_.orthogonal_vector() and the
-       y-axix into the corresponding crossproduct of the two.*/
-    
-    VVector v0 = convert(s.base1());
-    VVector v1 = convert(s.base2());
-    VVector v2 = convert(s.orthogonal_vector());
-    double v0l = CGAL_NTS sqrt(v0*v0);
-    double v1l = CGAL_NTS sqrt(v1*v1);
-    double v2l = CGAL_NTS sqrt(v2*v2);
-    const int units = 100;
-    v0 = v0 / v0l;
-    v1 = v1 / v1l;
-    v2 = v2 / v2l;
-    VTrafo T(v0.x(),v1.x(),v2.x(),
-	     v0.y(),v1.y(),v2.y(),
-	     v0.z(),v1.z(),v2.z());
-    VSegment S(units);
-    for (int i=0; i<units; ++i) {
-      S[i] = VPoint(std::cos(2.0*CGAL_PI*i/double(units)),
-		    std::sin(2.0*CGAL_PI*i/double(units)),
-		    0.0);
-    }
-    VSegment::iterator it;
-    for(it = S.begin(); it != S.end(); ++it) *it = T(*it); 
-    return S;
-  }
-
-
-/* the following operation refines a sphere triangle as a list of flat
-   triangles in 3d. The refinement only works for triangles that are
-   contained in a perfect hemisphere (no long sphere segments are
-   allowed as triangle segments). We split triangles along at the
-   midpoint of their longest side into two. */
-
-  static void refine(const DTriangle& t, VTriangle& T) {
-    double angle[3]; int i(0);
-    angle[0] = std::acos((t[0]-CGAL::ORIGIN)*(t[1]-CGAL::ORIGIN));
-    angle[1] = std::acos((t[1]-CGAL::ORIGIN)*(t[2]-CGAL::ORIGIN));
-    angle[2] = std::acos((t[2]-CGAL::ORIGIN)*(t[0]-CGAL::ORIGIN));
-    CGAL_NEF_TRACEN("refine "<<angle[0]<<" "<<angle[1]<<" "<<angle[2]);
-    if ( angle[1] > angle[0] ) {
-      if ( angle[2] > angle[1] ) i=2;
-      else                       i=1;
-    } else { // angle[0] >= angle[1]
-      if ( angle[2] > angle[0] ) i=2;
-      else                       i=0;
-    }
-    // now i references the side of maximal angle
-    if ( angle[i] < refinement_angle ) // refinement threshhold
-      { T.push_back(t); return; }
-    VVector v;
-    switch (i) {
-    case 0: v = (t[0]-CGAL::ORIGIN)+(t[1]-CGAL::ORIGIN); break;
-    case 1: v = (t[1]-CGAL::ORIGIN)+(t[2]-CGAL::ORIGIN); break;
-    case 2: v = (t[2]-CGAL::ORIGIN)+(t[0]-CGAL::ORIGIN); break;
-    }
-    v = v / CGAL_NTS sqrt(v*v) ; // normalize
-    VPoint p = CGAL::ORIGIN+v;
-    DTriangle t1,t2;
-    switch (i) {
-    case 0: t1=DTriangle(t[0],p,t[2]); t2=DTriangle(p,t[1],t[2]); break;
-    case 1: t1=DTriangle(t[1],p,t[0]); t2=DTriangle(p,t[2],t[0]); break;
-    case 2: t1=DTriangle(t[2],p,t[1]); t2=DTriangle(p,t[0],t[1]); break;
-    }
-    refine(t1,T);
-    refine(t2,T);
-  }
-
-  static VTriangle approximate(const CGAL::Sphere_triangle<R>& t) {
-    // we subdivide the triangle into a list of triangles until
-    // we reach a fine resolution on the surface.
-    
-    VTriangle T;
-    DTriangle td(approximate(t.point(0)), 
-		 approximate(t.point(1)),
-		 approximate(t.point(2)));
-    CGAL_NEF_TRACEN("approximate " << td);
-    refine(td,T);
-    return T;
-  }
-
-};
-
-
-template <class R_>
-class Sphere_point : public VPoint, public Gen_object {
-  typedef R_ R;
-  CGAL::Sphere_point<R> p_;
-  CGAL::Color           c_;
-  unsigned              w_;
-public:
-  Sphere_point() {}
-  Sphere_point(const CGAL::Sphere_point<R>& p,
-    CGAL::Color c = CGAL::BLACK, unsigned w = 10) : 
-    VPoint(Approximator<R>::approximate(p)), p_(p), c_(c), w_(w) {}
-  Sphere_point(const Sphere_point<R>& p) : VPoint(p), Gen_object()
-  { p_ = p.p_; c_ = p.c_; w_ = p.w_; }
-  Sphere_point<R>& operator=(const Sphere_point<R>& p)
-  { VPoint::operator=(p); p_ = p.p_;  c_ = p.c_; w_ = p.w_;
-    return *this; }
-
-  virtual ~Sphere_point() {}
-
-  const CGAL::Sphere_point<R>& original() const
-  { return p_; }
-
-  virtual Gen_object* clone() const 
-  { return new Sphere_point<R>(*this); }
- 
-  virtual void draw() const { 
-    glPointSize(w_);
-    glColor3ub(c_.red(),c_.green(),c_.blue());
-    glBegin(GL_POINTS);
-    glNormal3d(x(),y(),z());
-    glVertex3d(x(),y(),z());
-    glEnd();
-  }
-
-  virtual void print() const 
-  { std::cerr << "point " << p_; }
-
-};
-
-
-
-
-
-template <class R_>
-class Sphere_segment : public VSegment, public Gen_object { 
-  typedef R_ R;
-  CGAL::Sphere_segment<R> s_;
-  CGAL::Color             c_;
-  unsigned                w_;
-public:
-  Sphere_segment() {}
-  Sphere_segment(const CGAL::Sphere_segment<R>& s,
-    CGAL::Color c = CGAL::BLACK, unsigned w = 2) 
-    : VSegment(Approximator<R>::approximate(s)), s_(s), c_(c), w_(w) {}
-  Sphere_segment(const Sphere_segment<R>& s) : VSegment(s), Gen_object()
-  { s_ = s.s_; c_ = s.c_; w_ = s.w_; }
-  Sphere_segment<R>& operator=(const Sphere_segment<R>& s)
-  { VSegment::operator=(s); s_ = s.s_; c_ = s.c_; w_ = s.w_;
-    return *this; }
-  virtual ~Sphere_segment() {}
-
-  const CGAL::Sphere_segment<R>& original() const
-  { return s_; }
-
-  virtual Gen_object* clone() const 
-  { return new Sphere_segment<R>(*this); }
-
-  virtual void draw() const
-  { CGAL_NEF_TRACEN("draw "<<s_);
-    if ( size() == 1 ) {
-      glPointSize(5*w_);
-      glColor3ub(c_.red(),c_.green(),c_.blue());
-      glBegin(GL_POINTS);
-      glNormal3d(begin()->x(),begin()->y(),begin()->z());
-      glVertex3d(begin()->x(),begin()->y(),begin()->z());
-      glEnd();
-    } else {
-      glLineWidth(w_);
-      glColor3ub(c_.red(),c_.green(),c_.blue()); 
-      glBegin(GL_LINE_STRIP);
-      VSegment::const_iterator it;
-      for(it = begin(); it != end(); ++it) {
-        glNormal3d(it->x(),it->y(),it->z());
-        glVertex3d(it->x(),it->y(),it->z());
-      }
-      glEnd();
-    }
-  }
-
-  virtual void print() const 
-  { std::cerr << "segment " << s_; }
-
-};
-
-
-
-template <class R_>
-class Sphere_circle : public VSegment, public Gen_object { 
-  typedef R_ R;
-  CGAL::Sphere_circle<R> s_;
-  CGAL::Color            c_;
-  unsigned               w_;
-public:
-  Sphere_circle() {}
-  Sphere_circle(const CGAL::Sphere_circle<R>& s,
-    CGAL::Color c = CGAL::BLACK, unsigned w = 2) 
-    : VSegment(Approximator<R>::approximate(s)), s_(s), c_(c), w_(w) {}
-  Sphere_circle(const Sphere_circle<R>& s) : VSegment(s), Gen_object()
-  { s_ = s.s_; c_ = s.c_; w_ = s.w_; }
-  Sphere_circle<R>& operator=(const Sphere_circle<R>& s)
-  { VSegment::operator=(s); s_ = s.s_; c_ = s.c_; w_ = s.w_;
-    return *this; }
-  virtual ~Sphere_circle() {}
-
-  const CGAL::Sphere_circle<R>& original() const
-  { return s_; }
-
-  virtual Gen_object* clone() const 
-  { return new Sphere_circle<R>(*this); }
-
-  virtual void draw() const
-  { CGAL_NEF_TRACEN("draw "<<s_);
-    glLineWidth(w_);
-    glColor3ub(c_.red(),c_.green(),c_.blue()); 
-    glBegin(GL_LINE_LOOP);
-    VSegment::const_iterator it;
-    for(it = begin(); it != end(); ++it) {
-      glNormal3d(it->x(),it->y(),it->z());
-      glVertex3d(it->x(),it->y(),it->z());
-    }
-    glEnd();
-  }
-
-  virtual void print() const 
-  { std::cerr << "circle " << s_; }
-
-};
-
-
-/* The following class approximates a spherical triangle by a list
-   of flat triangles */
-
-template <class R_>
-class Sphere_triangle : public VTriangle, public Gen_object { 
-  typedef R_ R;
-  CGAL::Sphere_triangle<R> t_;
-  CGAL::Color              c_;
-public:
-  Sphere_triangle() {}
-
-  Sphere_triangle(const CGAL::Sphere_triangle<R>& t,
-    CGAL::Color c = CGAL::Color(100,100,120)) 
-    : VTriangle(Approximator<R>::approximate(t)), t_(t), c_(c) {}
-
-  Sphere_triangle(const Sphere_triangle<R>& t) : VTriangle(t), Gen_object()
-  { t_ = t.t_; c_ = t.c_; }
-
-  Sphere_triangle<R>& operator=(const Sphere_triangle<R>& t)
-  { VTriangle::operator=(t); t_ = t.t_; c_ = t.c_; return *this; }
-
-  virtual ~Sphere_triangle() {}
-
-  const CGAL::Sphere_triangle<R>& original() const
-  { return t_; }
-
-  virtual Gen_object* clone() const 
-  { return new Sphere_triangle<R>(*this); }
-
-  virtual void draw() const { 
-    CGAL_NEF_TRACEN("draw "<<t_ << " in " << c_);
-    VTriangle::const_iterator it;
-    VPoint p;
-    glColorMaterial(GL_FRONT, GL_DIFFUSE);
-    glEnable(GL_COLOR_MATERIAL);
-    glColor3ub(c_.red(),c_.green(),c_.blue());
-    glBegin(GL_TRIANGLES);
-    for(it = begin(); it != end(); ++it) {
-      p = it->vertex(0); 
-      glNormal3d(p.x(),p.y(),p.z()); 	//glVertex3d(p.x(),p.y(),p.z());
-      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
-      p = it->vertex(1); 
-      glNormal3d(p.x(),p.y(),p.z()); 
-      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
-      p = it->vertex(2); 
-      glNormal3d(p.x(),p.y(),p.z()); 
-      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
-    }
-    glEnd();
-    glDisable(GL_COLOR_MATERIAL);
-  }
-
-  virtual void print() const 
-  { std::cerr << "triangle " << t_; }
-
-};
-
-//----------------------------------------------------------------------------
-// the sphere:
-//----------------------------------------------------------------------------
-
- enum { SM_FACES, SM_SKELETON, SM_TRIANGULATION };
- enum { SM_AXES, SM_CUBE };
-
-class Unit_sphere : public OGL_base_object {
-  typedef std::list<Gen_object*> Object_list;
-  typedef Object_list::const_iterator  Object_const_iterator;
-  typedef Object_list::iterator  Object_iterator;
-  
-  GLUquadricObj*        sphere_;
-  int                   style_;
-  bool                  initialized_;
-  Object_list           objects_,triangles_,triangle_edges_;
-  GLuint                sphere_list_;
-  std::vector<bool>     switches;
-
-public:
-void init() { 
-  style_ = SM_FACES; 
-  switches[0] = true;
-  switches[1] = false;
-  gluQuadricNormals(sphere_,GLenum(GLU_SMOOTH));
-}
-
-Unit_sphere() : switches(2) { 
-  sphere_ = gluNewQuadric(); 
-  initialized_ = false; 
-  init(); 
-}
-
-void clear_list() 
-{ while ( objects_.begin() != objects_.end() ) {
-    delete (*objects_.begin());
-    objects_.pop_front();
-  }
-  while ( triangles_.begin() != triangles_.end() ) {
-    delete (*triangles_.begin());
-    triangles_.pop_front();
-  }
-  while ( triangle_edges_.begin() != triangle_edges_.end() ) {
-    delete (*triangle_edges_.begin());
-    triangle_edges_.pop_front();
-  }
-}
-
-void copy_list(const Unit_sphere& S)
-{ Object_const_iterator it;
-  CGAL_forall_iterators (it,S.objects_)
-    objects_.push_back( (*it)->clone() );
-  CGAL_forall_iterators (it,S.triangles_)
-    triangles_.push_back( (*it)->clone() );
-  CGAL_forall_iterators (it,S.triangle_edges_)
-    triangle_edges_.push_back( (*it)->clone() );
-}
-
-void print() const
-{ std::cerr << "Dumping Unit_sphere:\n";
-  for (Object_const_iterator it = objects_.begin();
-       it != objects_.end(); ++it)
-     (*it)->print();
-  std::cerr << std::endl;
-  for (Object_const_iterator it = triangles_.begin();
-       it != triangles_.end(); ++it)
-     (*it)->print();
-  std::cerr << std::endl;
-}
-
-Unit_sphere(const Unit_sphere& S) : OGL_base_object(), switches(2)
-{ CGAL_NEF_TRACEN("copyconstruction");
-  sphere_ = gluNewQuadric();
-  initialized_ = S.initialized_;
-  style_ = S.style_;
-  switches[0] = S.switches[0];
-  switches[1] = S.switches[1];
-  copy_list(S);
-}
-
-
-Unit_sphere& operator=(const Unit_sphere& S)
-{ CGAL_NEF_TRACEN("assignment");
-  initialized_ = S.initialized_;
-  style_ = S.style_;
-  switches[0] = S.switches[0];
-  switches[1] = S.switches[1];
-  clear_list(); copy_list(S);
-  return *this;
-}
-
-~Unit_sphere() {
-  clear_list(); 
-  gluDeleteQuadric(sphere_); 
-}
-
-template <typename R>
-void push_back(const CGAL::Sphere_point<R>& p,
-  CGAL::Color c = CGAL::YELLOW, unsigned w = 5)
-{ objects_.push_back(new Sphere_point<R>(p,c,w)); }
-
-template <typename R>
-void push_back(const CGAL::Sphere_segment<R>& s,
-  CGAL::Color c = CGAL::BLACK, unsigned w = 1)
-{ objects_.push_back(new Sphere_segment<R>(s,c,w)); }
-
-template <typename R>
-void push_back(const CGAL::Sphere_circle<R>& s,
-  CGAL::Color c = CGAL::BLACK, unsigned w = 1)
-{ objects_.push_back(new Sphere_circle<R>(s,c,w)); }
-
-template <typename R>
-void push_back(const CGAL::Sphere_triangle<R>& t,
-  CGAL::Color c = CGAL::WHITE)
-{ triangles_.push_back(new Sphere_triangle<R>(t,c)); }
-
-template <typename R>
-void push_back_triangle_edge(const CGAL::Sphere_segment<R>& s,
-  CGAL::Color c = CGAL::BLUE, unsigned w = 1)
-{ triangle_edges_.push_back(new Sphere_segment<R>(s,c,w)); }
-
-void set_style(int style) { 
-  style_ = style; 
-}
-
-void toggle(int index) { 
-  switches[index] = !switches[index]; 
-}
-private:
-
-void construct_axes() const
-{ int i;
-  register double f(1.02);
-  glNewList(sphere_list_+3, GL_COMPILE);
-  glLineWidth(2.0);
-  // red x-axis and equator
-  glColor3f(1.0,0.0,0.0);
-  glBegin(GL_LINES);
-  glVertex3d(0.0,0.0,0.0);
-  glVertex3d(1.2,0.0,0.0);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
-  for(i=0;i<100;i++)
-    glVertex3d(f*std::cos(2.0*CGAL_PI*i/100.0),f*std::sin(2.0*CGAL_PI*i/100.0),0.0);
-  glEnd();
-  // green y-axis and equator
-  glColor3f(0.0,1.0,0.0);
-  glBegin(GL_LINES);
-  glVertex3d(0.0,0.0,0.0);
-  glVertex3d(0.0,1.2,0.0);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
-  for(i=0;i<100;i++)
-    glVertex3d(0.0,f*std::cos(2.0*CGAL_PI*i/100.0),f*std::sin(2.0*CGAL_PI*i/100.0));
-  glEnd();
-  // blue z-axis and equator
-  glColor3f(0.0,0.0,1.0);
-  glBegin(GL_LINES);
-  glVertex3d(0.0,0.0,0.0);
-  glVertex3d(0.0,0.0,1.2);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
-  for(i=0;i<100;i++)
-    glVertex3d(f*std::cos(2.0*CGAL_PI*i/100.0),0.0,f*std::sin(2.0*CGAL_PI*i/100.0));
-  glEnd();
-  // six coordinate points in pink:
-  glPointSize(10);
-  glColor3f(1,0,1);
-  glBegin(GL_POINTS);
-  glVertex3d(1,0,0);
-  glVertex3d(0,1,0);
-  glVertex3d(0,0,1);
-  glVertex3d(-1,0,0);
-  glVertex3d(0,-1,0);
-  glVertex3d(0,0,-1);
-  glEnd(); glEndList();
-}
-
-void construct_cube() const
-{ 
-  glNewList(sphere_list_+4, GL_COMPILE);
-  glColor3f(1,1,0); // yellow
-  glLineWidth(2.0);
-  glBegin(GL_LINE_LOOP);
-  glVertex3d(-1.0,-1.0,-1.0);
-  glVertex3d( 1.0,-1.0,-1.0);
-  glVertex3d( 1.0, 1.0,-1.0);
-  glVertex3d(-1.0, 1.0,-1.0);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
-  glVertex3d(-1.0,-1.0, 1.0);
-  glVertex3d( 1.0,-1.0, 1.0);
-  glVertex3d( 1.0, 1.0, 1.0);
-  glVertex3d(-1.0, 1.0, 1.0);
-  glEnd();
-  glBegin(GL_LINES);
-  glVertex3d(-1.0,-1.0,-1.0);
-  glVertex3d(-1.0,-1.0, 1.0);
-  glVertex3d( 1.0,-1.0,-1.0);
-  glVertex3d( 1.0,-1.0, 1.0);
-  glVertex3d( 1.0, 1.0,-1.0);
-  glVertex3d( 1.0, 1.0, 1.0);
-  glVertex3d(-1.0, 1.0,-1.0);
-  glVertex3d(-1.0, 1.0, 1.0);
-  glEnd(); glEndList();
-}
-
-void construct()
-{ initialized_=true;
-  sphere_list_ = glGenLists(5);
-  CGAL_assertion_msg(sphere_list_!=0,"no display list.");
-  // skeleton:
-  glNewList(sphere_list_, GL_COMPILE);
-  for (Object_const_iterator it = objects_.begin();
-       it != objects_.end(); ++it) 
-     (*it)->draw();
-  glEndList();
-  // triangles:
-  glNewList(sphere_list_+1, GL_COMPILE);
-  for (Object_const_iterator it = triangles_.begin();
-       it != triangles_.end(); ++it) 
-     (*it)->draw();
-  glEndList();
-  glNewList(sphere_list_+2, GL_COMPILE);
-  for (Object_const_iterator it = triangle_edges_.begin();
-       it != triangle_edges_.end(); ++it) 
-     (*it)->draw();
-  glEndList();
-  // orientation features:
-  construct_axes();
-  construct_cube();
-}
-
-public:
-
-//void draw(GLdouble z_vec[3]) const
-void draw() const
-{ 
-  gluQuadricDrawStyle(sphere_,GLenum(GLU_FILL));
-  glEnable(GL_LIGHTING);
-  if ( style_ == SM_SKELETON ) {
-    glEnable(GL_COLOR_MATERIAL);
-    glColor3f(0.7f,0.7f,0.7f);
-    gluSphere(sphere_,shrink_fac,50,50);
-    glDisable(GL_COLOR_MATERIAL);
-  }
-  glDisable(GL_LIGHTING);
-  if ( !initialized_ ) const_cast<Unit_sphere*>(this)->construct();
-  if ( style_ == SM_FACES || style_ == SM_TRIANGULATION ) {
-    glEnable(GL_LIGHTING); 
-    glCallList(sphere_list_+1); // triangle list
-    glDisable(GL_LIGHTING);
-  }
-  if ( style_ == SM_TRIANGULATION ) {
-    glCallList(sphere_list_+2); // triangle edge list
-  }
-  
-  if ( style_ != SM_TRIANGULATION ) {
-    glCallList(sphere_list_);
-  }
-  if ( switches[0] ) glCallList(sphere_list_+3);
-  if ( switches[1] ) glCallList(sphere_list_+4);
-}
-
-
-};
-
-template <typename Map_>
-class SM_BooleColor 
-{
-  typedef typename Map_::SVertex_const_handle   SVertex_const_handle;   
-  typedef typename Map_::SHalfedge_const_handle SHalfedge_const_handle;   
-  typedef typename Map_::SHalfloop_const_handle SHalfloop_const_handle;   
-  typedef typename Map_::SFace_const_handle     SFace_const_handle;   
-  typedef typename Map_::Mark Mark;   
-public:
-  Color color(SVertex_const_handle, Mark m) const
-  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
-  Color color(SHalfedge_const_handle, Mark m) const
-  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
-  Color color(SHalfloop_const_handle, Mark m) const
-  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
-  Color color(SFace_const_handle, Mark m) const
-  { return ( m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY ); }
-};
-
-template <typename Nef_polyhedron>
-class NefS2_to_UnitSphere
-{
-  typedef typename Nef_polyhedron::Sphere_map          Sphere_map;
-  typedef typename Nef_polyhedron::Const_decorator     SM_const_decorator;
-  typedef CGAL::OGL::SM_BooleColor<Sphere_map>           Color_;
-  typedef typename Sphere_map::Sphere_kernel        Sphere_kernel;
-  typedef SM_decorator<Sphere_map>                  Decorator;
-  typedef CGAL::SM_triangulator<Decorator>                Base;
-
-  typedef typename Sphere_map::SVertex_const_handle SVertex_const_handle;   
-  typedef typename Sphere_map::SHalfedge_const_handle SHalfedge_const_handle; 
-  typedef typename Sphere_map::SFace_const_handle SFace_const_handle;     
-  typedef typename Sphere_map::SVertex_const_iterator SVertex_const_iterator;
-  typedef typename Sphere_map::SHalfedge_const_iterator SHalfedge_const_iterator;
-  typedef typename Sphere_map::SFace_const_iterator SFace_const_iterator;
-  typedef typename Sphere_map::Mark Mark;
-
-  typedef typename Sphere_kernel::Sphere_point    Sphere_point;
-  typedef typename Sphere_kernel::Sphere_segment  Sphere_segment;
-  typedef typename Sphere_kernel::Sphere_circle   Sphere_circle;
-  typedef typename Sphere_kernel::Sphere_triangle Sphere_triangle;
-
-  typedef Color_                                  Color_objects;  
-
- public:
-  static CGAL::OGL::Unit_sphere convert(const SM_const_decorator& E_,
-					const Color_objects& CO_ = Color_objects()) {
-    Sphere_map MT_(true);
-    Base T_(&MT_, &E_);
-    CGAL::OGL::Unit_sphere S_;
-
-    T_.triangulate();
-
-    SHalfedge_const_iterator e;
-    CGAL_forall_sedges(e,E_) {
-      if ( e->source() == e->twin()->source() ) {
-	S_.push_back(e->circle(), CO_.color(e,e->mark()));} else {
-	S_.push_back(Sphere_segment(e->source()->point(),
-				    e->twin()->source()->point(),
-				    e->circle()),CO_.color(e,e->mark()));
-      }
-    }
-    // draw sphere circles underlying loops of E_:
-    
-    if ( E_.has_shalfloop() )
-      S_.push_back(
-		   E_.shalfloop()->circle(),
-		   CO_.color(E_.shalfloop(),E_.shalfloop()->mark()));
-    
-    // draw points underlying vertices of E_:
-    SVertex_const_iterator v;
-    CGAL_forall_svertices(v,E_)
-      S_.push_back(v->point(),CO_.color(v,v->mark()));
-    
-    Unique_hash_map<SHalfedge_const_iterator,bool> Done(false);
-    CGAL_forall_shalfedges(e,T_) {
-      if ( Done[e] ) continue;
-      SHalfedge_const_handle en(e->snext()),enn(en->snext());
-      CGAL_NEF_TRACEV(T_.incident_triangle(e));
-      CGAL_NEF_TRACEN(T_.incident_mark(e)<<T_.incident_mark(en)<<T_.incident_mark(enn));
-      CGAL_assertion(T_.incident_mark(e)==T_.incident_mark(en) &&
-		     T_.incident_mark(en)==T_.incident_mark(enn));
-      Mark m = T_.incident_mark(e);
-      Sphere_triangle t = T_.incident_triangle(e);
-      S_.push_back(t, (m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY) );
-      Done[e]=Done[en]=Done[enn]=true;
-    }
-    
-    Done.clear(false);
-    CGAL_forall_shalfedges(e,T_) {
-      if ( Done[e] ) continue;
-      S_.push_back_triangle_edge(Sphere_segment(e->source()->point(),
-						e->twin()->source()->point(),
-						e->circle()));
-      Done[e]=Done[e->twin()]=true;
-    }    
-    return S_;
-  }
-};
-
-} // OGL
-} //namespace CGAL
-
-
-
-template <class R>
-std::ostream& operator<<(std::ostream& os, 
-                         const CGAL::OGL::Sphere_segment<R>& s)
-{ CGAL::OGL::VSegment::const_iterator it;
-   os << s.original() << " ";
-  for (it = s.begin(); it != s.end(); ++it) 
-    os << *it;
-  return os;
-}
-
-template <class R>
-std::ostream& operator<<(std::ostream& os, 
-                         const CGAL::OGL::Sphere_circle<R>& s)
-{ CGAL::OGL::VSegment::const_iterator it;
-   os << s.original() << " ";
-  for (it = s.begin(); it != s.end(); ++it) 
-    os << *it;
-  return os;
-}
-
-
-
-template <class R>
-std::ostream& operator<<(std::ostream& os, 
-                         const CGAL::OGL::Sphere_point<R>& p)
-{ os << p.original() << CGAL::OGL::VPoint(p); return os; }
-
-
-#endif //CGAL_SPHERE_GEOMETRY_OGL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_triangle.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_triangle.h
deleted file mode 100644
index e1e55b7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_triangle.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_SPHERE_TRIANGLE_H
-#define CGAL_SPHERE_TRIANGLE_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-
-template <class R_> class Sphere_triangle_rep 
-{ typedef Sphere_point<R_>  Point;
-  typedef Sphere_circle<R_> Circle;
-  typedef Sphere_triangle_rep<R_> Rep;
-
-  cpp11::array<Point,3>  points_; 
-  cpp11::array<Circle,3> circles_;
-
-  friend class Sphere_triangle<R_>;
- 
-  Sphere_triangle_rep(const Point& p1, const Point& p2, const Point& p3,
-        const Circle& c1, const Circle& c2, const Circle& c3) :
-    points_(CGAL::make_array(p1,p2,p3)), circles_(CGAL::make_array(c1,c2,c3)) {}
-public:
-  Sphere_triangle_rep() {}
-};
-
-
-/*{\Manpage{Sphere_triangle}{R}{Triangles on the unit sphere}{t}}*/
-template <class R_> class Sphere_triangle : 
-  public Handle_for< Sphere_triangle_rep<R_> > {
-/*{\Mdefinition An object |\Mvar| of type |\Mname| is a triangle
-on the surface of the unit sphere.}*/
-
-public:
-/*{\Mtypes 5}*/
-typedef R_ R;
-/*{\Mtypemember representation class.}*/
-typedef typename R::RT RT;
-/*{\Mtypemember ring type.}*/
-
-typedef Sphere_triangle_rep<R_> Rep;
-typedef Handle_for<Rep>         Base;
-
-/*{\Mcreation 5}*/
-Sphere_triangle() : Base() {}
-/*{\Mcreate creates some triangle.}*/
-
-Sphere_triangle(
-  const Sphere_point<R>& p0, const Sphere_point<R>& p1, 
-  const Sphere_point<R>& p2,
-  const Sphere_circle<R>& c0, const Sphere_circle<R>& c1, 
-  const Sphere_circle<R>& c2) : Base(Rep(p0,p1,p2,c0,c1,c2)) 
-/*{\Mcreate creates a triangle spanned by the three points
-|p0|, |p1|, |p2|, where the triangle is left of the three circles
-|c0|, |c1|, |c2|. \precond $c_i$ contains $p_i$ and $p_{i+1}$ mod 3.}*/
-{ CGAL_assertion( c0.has_on(p0) && c0.has_on(p1) );
-  CGAL_assertion( c1.has_on(p1) && c1.has_on(p2) );
-  CGAL_assertion( c2.has_on(p2) && c0.has_on(p0) );
-}
-
-Sphere_triangle(const Sphere_triangle<R>& t) : Base(t) {} 
-
-/*{\Moperations 4 2}*/
-
-const Sphere_point<R>& point(unsigned i) const 
-/*{\Mop returns the ith point of |\Mvar|.}*/
-{ return this->ptr()->points_[i%3]; }
-
-const Sphere_circle<R>& circle(unsigned i) const 
-/*{\Mop returns the ith circle of |\Mvar|.}*/
-{ return this->ptr()->circles_[i%3]; }
-
-Sphere_triangle<R> opposite() const 
-/*{\Mop returns the opposite of |\Mvar|.}*/
-{ return Sphere_triangle<R>(point(0), point(1), point(2),
-    circle(0).opposite(), circle(1).opposite(), circle(2).opposite()); }
-
-
-}; // Sphere_triangle<R>
-
-
-template <typename R>
-std::ostream& operator<<(std::ostream& os, 
-                         const CGAL::Sphere_triangle<R>& t)
-{ for (int i=0; i<3; ++i) os << t.point(i);
-  for (int i=0; i<3; ++i) os << t.circle(i); return os; }
-
-template <typename R>
-std::istream& operator>>(std::istream& is, 
-                         CGAL::Sphere_triangle<R>& t)
-{ CGAL::Sphere_point<R> p1,p2,p3;
-  CGAL::Sphere_circle<R> c1,c2,c3;
-  if ( !(is >> p1 >> p2 >> p3 >> c1 >> c2 >> c3) ) return is; 
-  t = CGAL::Sphere_triangle<R>(p1,p2,p3,c1,c2,c3);
-  return is; }
-
-} //namespace CGAL
-#endif //CGAL_SPHERE_TRIANGLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/sphere_predicates.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/sphere_predicates.h
deleted file mode 100644
index 600616d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/sphere_predicates.h
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_SPHERE_PREDICATES_H
-#define CGAL_SPHERE_PREDICATES_H
-
-#include <CGAL/basic.h>
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 23
-#include <CGAL/Nef_2/debug.h>
-#include <vector>
-
-#undef CGAL_forall_iterators
-#define CGAL_forall_iterators(x,L)\
-for(x = (L).begin(); x != (L).end(); ++x) 
-
-
-namespace CGAL {
-
-/* |spherical_orientation| takes three points of one hemisphere and
-returns the orientation of $p_3$ with respect to the halfcircle
-through $p_1$ and $p_2$. We map this to the 3d orientation predicate
-of the origin, $p_1$, $p_2$, and $p_3$ */
-
-template <class R>
-int spherical_orientation(const Sphere_point<R>& p1, 
-                          const Sphere_point<R>& p2, 
-                          const Sphere_point<R>& p3)
-{ return CGAL::orientation(typename R::Point_3(0,0,0),
-			   (typename R::Point_3)p1,
-			   (typename R::Point_3)p2,
-			   (typename R::Point_3)p3); }
-
-
-/* |spherical_compare| codes our order of points during the sweep. The
-south pole is the first point, the north pole is the last point, then
-we order lexicographically. We cover the special case where both
-points are part of the equator first. Otherwise we sort according to
-the angle of the halfcircle through $S$, $N$, and the points with
-respect to the xy-plane. If both lie on the same halfcircle then the
-angle with respect to $OS$ decides. The parameter $pos=1$ does
-everthing in the positive halfsphere. If $pos=-1$ then we rotate the
-whole scenery around the y-axis by $\pi$. Then the x-axis points left
-and the z-axis into the equatorial plane. */
-
-template <class R>
-bool is_south(const Sphere_point<R>& p, int axis) {
-  if(axis==1)  
-    return (p.hz() >  0 &&
-	    p.hx() == 0 &&
-	    p.hy() == 0);
-  
-  return (p.hy() <  0 &&
-	  p.hx() == 0 &&
-	  p.hz() == 0);
-}
-
-template <class R>
-bool is_north(const Sphere_point<R>& p, int axis) {
-  if(axis==1)  
-    return (p.hz() <  0 &&
-	    p.hx() == 0 &&
-	    p.hy() == 0);
-  
-  return (p.hy() >  0 &&
-	  p.hx() == 0 &&
-	  p.hz() == 0);
-}
-
-template <class R>
-int spherical_compare(const Sphere_point<R>& p1, 
-		      const Sphere_point<R>& p2,
-		      int axis, int pos) {
-  
-  Sphere_point<R> pS, pN;
-  CGAL_assertion(axis>=0 && axis<=2);
-  switch(axis) {
-  case 0:
-    pS=Sphere_point<R>(0,-1,0);
-    //    pN=Sphere_point<R>(0,1,0);
-    break;
-  case 1:
-    pS=Sphere_point<R>(0,0,1);
-    //    pN=Sphere_point<R>(0,0,-1);
-    break;
-  case 2: 
-    pS=Sphere_point<R>(0,-1,0);
-    //    pN=Sphere_point<R>(0,1,0);
-    break;
-  }
-  typename R::Direction_3 
-    d1(p1-CGAL::ORIGIN), 
-    d2(p2-CGAL::ORIGIN);
-  if (d1 == d2) return 0;
-  if(is_south(p1,axis) || is_north(p2,axis)) return -1;
-  if(is_south(p2,axis) || is_north(p1,axis)) return 1;
-  //  if (d1 == dS || d2 == dN) return -1;
-  //  if (d1 == dN || d2 == dS) return  1;
-  // now no more special cases 
-  if (axis==0 && (p1.hx()==static_cast<typename R::RT>(0) && 
-		  p2.hx()==static_cast<typename R::RT>(0))) {
-      int s1 = CGAL_NTS sign(p1.hz());
-      int s2 = CGAL_NTS sign(p2.hz());
-      if ( s1 != s2 ) return pos * -s1;
-      // now s1 == s2
-      return -s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(1,0,0),p2);
-  } else 
-  if (axis==1 && (p1.hy()==static_cast<typename R::RT>(0) && 
-		  p2.hy()==static_cast<typename R::RT>(0))) {
-    int s1 = CGAL_NTS sign(p1.hx());
-    int s2 = CGAL_NTS sign(p2.hx());
-    if ( s1 != s2 ) return pos * s1;
-    // now s1 == s2
-    return s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(0,1,0),p2);
-  } else 
-  if (axis==2 && (p1.hz()==static_cast<typename R::RT>(0) && 
-		  p2.hz()==static_cast<typename R::RT>(0))) { 
-    int s1 = CGAL_NTS sign(p1.hx());
-    int s2 = CGAL_NTS sign(p2.hx());
-    if ( s1 != s2 ) return pos * s1;
-    // now s1 == s2
-    return s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(0,0,1),p2);
-  }
-  int sor = CGAL::spherical_orientation(pS,p1,p2);
-  if ( sor ) return sor;
-  if(axis==0)
-    return CGAL::spherical_orientation(Sphere_point<R>(0,0,pos),p2,p1);
-  return CGAL::spherical_orientation(Sphere_point<R>(-pos,0,0),p2,p1);
-}
-
-/* the next two functions partition the segments in a list into a list
-that carries the segment parts that are only part of a halfspace.
-Halfcircles are again divided into two equally sized pieces. */
-
-template <class R, class I>
-void partition(const Sphere_circle<R>& c, I start, I beyond, 
-               std::list< Sphere_segment<R> >& Lpos)
-{ CGAL_NEF_TRACEN("partition ");
-  Sphere_segment<R> s1,s2,s3;
-  while ( start != beyond ) { CGAL_NEF_TRACEN("  "<<*start);
-    int i = start->intersection(c,s1,s2);
-    if (i>1) Lpos.push_back(s2);
-    if (i>0) Lpos.push_back(s1);
-    ++start;
-  }
-}
-
-template <class R, class I>
-void partition_xy(I start, I beyond,
-                  std::list< Sphere_segment<R> >& L, int pos)
-{
-  Sphere_circle<R> xy_circle(0,0,1), yz_circle(1,0,0);
-  Sphere_point<R> S(0,-1,0),N(0,1,0);
-  Sphere_segment<R> s1,s2;
-  if (pos > 0)  partition(xy_circle,start,beyond,L);
-  else partition(xy_circle.opposite(),start,beyond,L);
-  typename std::list< Sphere_segment<R> >::iterator it,itl;
-  CGAL_NEF_TRACEN("partition_xy ");
-  CGAL_forall_iterators(it,L) {
-    CGAL_NEF_TRACEN("  "<<*it);
-    if ( equal_as_sets(it->sphere_circle(),xy_circle) ) {
-      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
-      int n1 =  it->intersection(yz_circle,s1,s2);
-      if (n1 > 1 && !s2.is_degenerate()) L.insert(it,s2);
-      if (n1 > 0 && !s1.is_degenerate()) L.insert(it,s1);
-      int n2 =  it->intersection(yz_circle.opposite(),s1,s2);
-      if (n2 > 1 && !s2.is_degenerate()) L.insert(it,s2);
-      if (n2 > 0 && !s1.is_degenerate()) L.insert(it,s1);
-      itl = it; --it; L.erase(itl); 
-      // at least one item was appended
-    }
-  }
-  CGAL_forall_iterators(it,L) {
-    if ( it->is_halfcircle() ) {
-      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
-      Sphere_segment<R> s1,s2;
-      it->split_halfcircle(s1,s2);
-      *it = s2; L.insert(it,s1);
-    }
-  }
-  // append 4 xy-equator segments:
-  Sphere_segment<R> sp(S,N,xy_circle);
-  Sphere_segment<R> sm(S,N,xy_circle.opposite());
-  Sphere_segment<R> s[4];
-  sp.split_halfcircle(s[0],s[1]);
-  sm.split_halfcircle(s[2],s[3]);
-  L.insert(L.end(),s,s+4);
-}
-
-
-/* |intersection| calculates the intersection of a halfspace $h$
-(defined via a great circle $c$) with a sphere segment
-$s$. Interesting are the boundary cases. If an endpoint is part of
-$h^0$, but the part of $s$ incident to the endpoint is not part of
-$h^{0+}$ then we return a trivial segment.
-
-*/
-
-/*
-template <typename R> 
-int Sphere_segment<R>::
-intersection(const CGAL::Sphere_circle<R>& c, std::vector<Sphere_segment<R> >& s) const {  
-
-  CGAL_NEF_TRACEN("    intersection "<<*this<<" "<<c);
-  if ( is_degenerate() ) { 
-    CGAL_NEF_TRACEN("    degenerate");
-    s.push_back(*this); 
-    return 1;
-  }
-
-  CGAL::Oriented_side or1 = c.oriented_side(source());
-  CGAL::Oriented_side or2 = c.oriented_side(target());
-
-  CGAL_NEF_TRACEN("    Orientation " << or1 << " " << or2);
-
-  if ( or1 == CGAL::opposite(or2) && or1 != or2 ) { 
-    // it is sure that $s$ intersects $h$ in its interior. the
-    //   question is which part is in the halfspace $h^+$.
-    CGAL_NEF_TRACEN("    opposite");
-    Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
-    if ( !has_on(i1) ) 
-      i1 = i1.antipode();
-    s.push_back(Sphere_segment<R>(source(),i1,sphere_circle()));
-    s.push_back(Sphere_segment<R>(i1,target(),sphere_circle()));
-    return 2;
-  }
-  else if ( or1 == CGAL::ON_ORIENTED_BOUNDARY && 
-            or2 == CGAL::ON_ORIENTED_BOUNDARY ) { 
-    // if both ends of $s$ are part of $h$ then $s$ is a halfcircle or
-    //   $s$ is fully part of $h$.  In this case we have to check if the
-    //   halfcircle is not part of $h^-$.  This can be formulated by an
-    //   orientation test of the point $p$ at the tip of the normal of
-    //   |s.sphere_circle()| with respect to the plane through the
-    //   endpoints of $s$ and the tip of the normal of $h$.
-    CGAL_NEF_TRACEN("    both in plane");
-    s.push_back(*this); 
-    return 1;
-  }
-  else if ( or1 != CGAL::ON_NEGATIVE_SIDE && 
-            or2 != CGAL::ON_NEGATIVE_SIDE ) { 
-    // this case covers the endpoints of $s$ as part of the closed
-    //   oriented halfspace $h^{0+}$. At least one is part of
-    //   $h^{+}$. If $s$ is not long then the segment must be fully part
-    //   of $h^{0+}$. Otherwise if $s$ is long, then we at both ends
-    //   there are subsegments as part of $h^{0+}$ (one might be
-    //   degenerate). 
-    if ( is_long() ) { 
-      Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
-      Sphere_point<R> i2 = i1.antipode();
-      Sphere_segment<R> so(i1,i2,sphere_circle());
-      if ( so.has_on(source()) && so.has_on(target()) )
-	std::swap(i1,i2);
-      // now source(),i1,i2,target() are circularly ordered
-      s.push_back(Sphere_segment(source(),i1,sphere_circle()));
-      s.push_back(Sphere_segment(i1,i2,sphere_circle()));
-      s.push_back(Sphere_segment(i2,target(),sphere_circle()));
-      //      CGAL_NEF_TRACEN("    both >= plane, long "<<s1<<s2);
-      return 3;
-    } // now short:
-    CGAL_NEF_TRACEN("    both >= plane, short ");
-    s.push_back(*this); 
-    return 1; 
-  } 
-  else if ( or1 != CGAL::ON_POSITIVE_SIDE && 
-            or2 != CGAL::ON_POSITIVE_SIDE ) { 
-    // either both endpoints of $s$ are in $h^-$ or one is in $h^-$
-    //   and one on $h^0$. 
-    if ( is_long() ) { 
-      Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
-      Sphere_point<R> i2 = i1.antipode();
-      Sphere_segment so(i1,i2,sphere_circle());
-      //      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
-      if ( so.has_on(source()) && so.has_on(target()) )
-      { so = so.complement(); }
-      //      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
-      s.push_back(Sphere_segment(source(),so.source(),sphere_circle()));
-      s.push_back(so);
-      s.push_back(Sphere_segment(so.target(),target(),sphere_circle()));
-      return 3;
-    } // now short
-    CGAL_NEF_TRACEN("    both <= plane, short");
-    s.push_back(*this);
-    return 1;
-  }
-
-  CGAL_error_msg("Oops, forgot some case.");
-  return -1;
-}
-*/
-
-template <typename R> 
-int Sphere_segment<R>::
-intersection(const CGAL::Sphere_circle<R>& c,
-             Sphere_segment<R>& s1, Sphere_segment<R>& s2) const
-{  
-  CGAL_NEF_TRACEN("    intersection "<<*this<<" "<<c);
-  if ( is_degenerate() ) { CGAL_NEF_TRACEN("    degenerate");
-    if ( !c.has_on_negative_side(source()) ) 
-    { s1 = *this; return 1; }
-    return 0;
-  }
-  CGAL::Oriented_side or1 = c.oriented_side(source());
-  CGAL::Oriented_side or2 = c.oriented_side(target());
-  if ( or1 == CGAL::opposite(or2) && or1 != or2 ) { 
-// it is sure that $s$ intersects $h$ in its interior. the
-//       question is which part is in the halfspace $h^+$.
-    CGAL_NEF_TRACEN("    opposite");
-    Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
-    if ( !has_on(i1) ) i1 = i1.antipode();
-    if ( or1 == CGAL::ON_POSITIVE_SIDE ) 
-      s1 = Sphere_segment<R>(source(),i1,sphere_circle());
-    else if ( or2 == CGAL::ON_POSITIVE_SIDE )
-      s1 = Sphere_segment<R>(i1,target(),sphere_circle());
-    else CGAL_error_msg("no intersection.");
-    return 1;
-  }
-  else if ( or1 == CGAL::ON_ORIENTED_BOUNDARY && 
-            or2 == CGAL::ON_ORIENTED_BOUNDARY ) { 
-// if both ends of $s$ are part of $h$ then $s$ is a halfcircle or
-//    $s$ is fully part of $h$.  In this case we have to check if the
-//    halfcircle is not part of $h^-$.  This can be formulated by an
-//    orientation test of the point $p$ at the tip of the normal of
-//    |s.sphere_circle()| with respect to the plane through the
-//   endpoints of $s$ and the tip of the normal of $h$. 
-    CGAL_NEF_TRACEN("    both in plane");
-    if ( source() != target().antipode() ) {
-      s1 = *this; return 1;
-    } 
-    // now this is a halfcircle
-    register bool halfcircle_notin_hminus =
-      (CGAL::orientation(source(),target(),
-			 CGAL::ORIGIN + c.orthogonal_vector(),
-			 CGAL::ORIGIN + sphere_circle().orthogonal_vector())
-       != CGAL::POSITIVE);
-    CGAL_NEF_TRACE("    ");CGAL_NEF_TRACEV(halfcircle_notin_hminus);
-    if ( halfcircle_notin_hminus ) { s1 = *this; return 1; }
-    else { 
-      s1 = Sphere_segment(source(),source(),sphere_circle());
-      s2 = Sphere_segment(target(),target(),sphere_circle());
-      return 2;
-    }
-  }
-  else if ( or1 != CGAL::ON_NEGATIVE_SIDE && 
-            or2 != CGAL::ON_NEGATIVE_SIDE ) { 
-// this case covers the endpoints of $s$ as part of the closed
-//   oriented halfspace $h^{0+}$. At least one is part of
-//   $h^{+}$. If $s$ is not long then the segment must be fully part
-//   of $h^{0+}$. Otherwise if $s$ is long, then we at both ends
-//   there are subsegments as part of $h^{0+}$ (one might be
-//   degenerate).
-    if ( is_long() ) { 
-      Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
-      Sphere_point<R> i2 = i1.antipode();
-      Sphere_segment<R> so(i1,i2,sphere_circle());
-      if ( so.has_on(source()) && so.has_on(target()) )
-	std::swap(i1,i2);
-      // now source(),i1,i2,target() are circularly ordered
-      s1 = Sphere_segment(source(),i1,sphere_circle());
-      s2 = Sphere_segment(i2,target(),sphere_circle());
-      CGAL_NEF_TRACEN("    both >= plane, long "<<s1<<s2);
-      return 2;
-    } // now short:
-    CGAL_NEF_TRACEN("    both >= plane, short ");
-    s1=*this; return 1; 
-  } 
-  else if ( or1 != CGAL::ON_POSITIVE_SIDE && 
-            or2 != CGAL::ON_POSITIVE_SIDE ) { 
-// either both endpoints of $s$ are in $h^-$ or one is in $h^-$
-//     and one on $h^0$.
-    if ( is_long() ) { 
-      Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
-      Sphere_point<R> i2 = i1.antipode();
-      Sphere_segment<R> so(i1,i2,sphere_circle());
-      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
-      if ( so.has_on(source()) && so.has_on(target()) )
-      { so = so.complement(); }
-      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
-      s1 = so; return 1;
-    } // now short
-    CGAL_NEF_TRACEN("    both <= plane, short");
-    if ( or1 == CGAL::ON_ORIENTED_BOUNDARY ) 
-    { s1 = Sphere_segment<R>(source(),source(),sphere_circle()); return 1; }
-    if ( or2 == CGAL::ON_ORIENTED_BOUNDARY ) 
-    { s1 = Sphere_segment<R>(target(),target(),sphere_circle()); return 1; }
-    return 0;
-  }
-
-  CGAL_error_msg("Oops, forgot some case.");
-  return -1;
-}
-
-} //namespace CGAL
-
-#endif //CGAL_SPHERE_PREDICATES_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_2.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_2.h
deleted file mode 100644
index 211f13e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_2.h
+++ /dev/null
@@ -1,1129 +0,0 @@
-// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
-
-#ifndef CGAL_NEF_POLYHEDRON_2_H
-#define CGAL_NEF_POLYHEDRON_2_H
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4800) // complaint about performance in std::map where we can't do anything
-#endif                          
-
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Nef_2/HDS_items.h>
-#include <CGAL/HalfedgeDS_default.h>
-
-#include <CGAL/Is_extended_kernel.h>
-#include <CGAL/Nef_2/PM_explorer.h>
-#include <CGAL/Nef_2/PM_decorator.h>
-#include <CGAL/Nef_2/PM_io_parser.h>
-#include <CGAL/Nef_2/PM_overlayer.h>
-//#include <CGAL/Nef_2/PM_transformer.h>
-#include <CGAL/Nef_2/PM_point_locator.h>
-#include <CGAL/Nef_2/Bounding_box_2.h>
-#include <vector>
-#include <list>
-
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_real.hpp>
-#include <boost/random/variate_generator.hpp>
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 11
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-template <typename T, typename I, typename M> class Nef_polyhedron_2;
-template <typename T, typename I, typename M> class Nef_polyhedron_2_rep;
-
-template <typename T, typename I, typename M>
-std::ostream& operator<<(std::ostream&, const Nef_polyhedron_2<T,I,M>&); 
-
-template <typename T, typename I, typename M>
-std::istream& operator>>(std::istream&, Nef_polyhedron_2<T,I,M>&);
-
-template <typename T, typename Items, typename Mark_>
-class Nef_polyhedron_2_rep 
-{ 
-  typedef Nef_polyhedron_2_rep<T,Items,Mark_> Self;
-  friend class Nef_polyhedron_2<T,Items,Mark_>;
-
-  struct HDS_traits {
-    typedef typename T::Point_2 Point;
-    typedef Mark_                Mark;
-  };
-
-public: // gcc-3.3 otherwise claims that Decorator in Polyhedron_2 is private
-  typedef CGAL_HALFEDGEDS_DEFAULT<HDS_traits,Items> Plane_map;
-  typedef CGAL::PM_const_decorator<Plane_map>           Const_decorator;
-  typedef CGAL::PM_decorator<Plane_map>                 Decorator;
-  typedef CGAL::PM_naive_point_locator<Decorator,T>     Slocator;
-  typedef CGAL::PM_point_locator<Decorator,T>           Locator;
-  typedef CGAL::PM_overlayer<Decorator,T>               Overlayer;
-
-private:
-
-  Plane_map pm_; 
-  Locator* pl_;
-  
-  void init_locator() 
-  { 
-    if ( !pl_ ) 
-      pl_ = new Locator(pm_); 
-  }
-
-  void clear_locator() 
-  { 
-    if ( pl_ ) { 
-      delete pl_; 
-      pl_=0; 
-    } 
-  }
-
-public:
-  Nef_polyhedron_2_rep() 
-    : pm_(), pl_(0) 
-  {}
-
-  Nef_polyhedron_2_rep(const Self& ) 
-    : pm_(), pl_(0) 
-  {}
-
-  ~Nef_polyhedron_2_rep() 
-  { 
-    pm_.clear(); 
-    clear_locator(); 
-  }
-};
-
-/*{\Moptions print_title=yes }*/ 
-/*{\Manpage {Nef_polyhedron_2}{T}{Nef Polyhedra in the Plane}{N}}*/
-
-/*{\Mdefinition
-An instance of data type |\Mname| is a subset of the plane that is
-the result of forming complements and intersections starting from a
-finite set |H| of half-spaces. |\Mtype| is closed under all binary set
-operations |intersection|, |union|, |difference|, |complement| and
-under the topological operations |boundary|, |closure|, and
-|interior|.
-
-The template parameter |T| is specified via an extended kernel
-concept. |T| must be a model of the concept |ExtendedKernelTraits_2|.
-}*/
-
-template <typename T, typename Items_=HDS_items, typename Mark_=bool>
-class Nef_polyhedron_2 
-  : public Handle_for< Nef_polyhedron_2_rep<T,Items_,Mark_> >
-{ 
-public:
-typedef T Extended_kernel;
-static  T EK; // static extended kernel
-
-  /*{\Mtypes 7}*/
-  typedef Mark_ Mark;
-  /*{\Xtypemember marking set membership or exclusion.}*/
-  typedef Items_ Items;
-  typedef Nef_polyhedron_2<T,Items,Mark> Self;
-  typedef Handle_for< Nef_polyhedron_2_rep<T,Items,Mark> > Base;
-  typedef typename T::Point_2   Extended_point;
-  typedef typename T::Segment_2 Extended_segment;
-
-  typedef typename T::Standard_line_2 Line;
-  /*{\Mtypemember the oriented lines modeling half-planes}*/
-  typedef typename T::Standard_point_2 Point;
-  /*{\Mtypemember the affine points of the plane.}*/
-  typedef typename T::Standard_direction_2 Direction;
-  /*{\Mtypemember directions in our plane.}*/
-  typedef typename T::Standard_aff_transformation_2  Aff_transformation;
-  /*{\Mtypemember affine transformations of the plane.}*/
-
-
-  // types for choosing the right constructor
-  struct Polylines {};
-  struct Polygons {};
-
-  typedef Polylines Polylines_tag;
-  typedef Polygons Polygons_tag;
-
-  enum Operation { JOIN=0 };
-
-  enum Boundary { EXCLUDED=0, INCLUDED=1 };
-  /*{\Menum construction selection.}*/
-
-  enum Content { EMPTY=0, COMPLETE=1 };
-  /*{\Menum construction selection}*/
-
-  static const Polylines POLYLINES;
-  static const Polygons POLYGONS;
-protected:
-  struct AND { bool operator()(bool b1, bool b2)  const { return b1&&b2; }  };
-  struct OR { bool operator()(bool b1, bool b2)   const { return b1||b2; }  };
-  struct DIFF { bool operator()(bool b1, bool b2) const { return b1&&!b2; } };
-  struct XOR { bool operator()(bool b1, bool b2)  const 
-                                           { return (b1&&!b2)||(!b1&&b2); } };
-
-  typedef Nef_polyhedron_2_rep<T,Items,Mark>           Nef_rep;
-  typedef typename Nef_rep::Plane_map       Plane_map;
-  typedef typename Nef_rep::Decorator       Decorator;
-  typedef typename Nef_rep::Const_decorator Const_decorator;
-  typedef typename Nef_rep::Overlayer       Overlayer;
-  //typedef typename Nef_rep::T               Transformer;
-  typedef typename Nef_rep::Slocator        Slocator;
-  typedef typename Nef_rep::Locator         Locator;
-
-  using Base::ptr;
-  using Base::is_shared;
-
-  Plane_map& pm() { return ptr()->pm_; } 
-  const Plane_map& pm() const { return ptr()->pm_; } 
-
-  friend std::ostream& operator<< <>
-      (std::ostream& os, const Nef_polyhedron_2<T,Items,Mark>& NP);
-  friend std::istream& operator>> <>
-      (std::istream& is, Nef_polyhedron_2<T,Items,Mark>& NP);
-
-  typedef typename Decorator::Vertex_handle         Vertex_handle;
-  typedef typename Decorator::Halfedge_handle       Halfedge_handle;
-  typedef typename Decorator::Face_handle           Face_handle;
-  typedef typename Decorator::Vertex_const_handle   Vertex_const_handle;
-  typedef typename Decorator::Halfedge_const_handle Halfedge_const_handle;
-  typedef typename Decorator::Face_const_handle     Face_const_handle;
-
-  typedef typename Decorator::Vertex_iterator       Vertex_iterator;
-  typedef typename Decorator::Halfedge_iterator     Halfedge_iterator;
-  typedef typename Decorator::Face_iterator         Face_iterator;
-  typedef typename Const_decorator::Vertex_const_iterator   
-                                                    Vertex_const_iterator;
-  typedef typename Const_decorator::Halfedge_const_iterator 
-                                                    Halfedge_const_iterator;
-  typedef typename Const_decorator::Face_const_iterator     
-                                                    Face_const_iterator;
-
-  typedef Bounding_box_2<typename Is_extended_kernel<Extended_kernel>::value_type, 
-                         Extended_kernel> Box_2;
-
-  struct Except_frame_box_edges {
-    Decorator D_; 
-    Face_handle f_;
-
-    Except_frame_box_edges(Plane_map& P) 
-      : D_(P), f_(D_.faces_begin()) 
-    {}
-    
-    bool 
-    operator()(Halfedge_handle e, const Tag_true& ) const
-    { 
-      return D_.face(e)==f_ || D_.face(D_.twin(e))==f_; 
-    }
-
-    bool 
-    operator()(Halfedge_handle /*e*/, const Tag_false& ) const
-    { 
-      return false;
-    }
-    bool
-    operator()(Halfedge_handle e) const
-    {
-      return this->operator()(e, typename Is_extended_kernel<Extended_kernel>::value_type());
-    }
-
-  };
-
-  friend struct Except_frame_box_edges;
-
-  typedef std::list<Extended_segment>      ES_list;
-  typedef typename ES_list::const_iterator ES_iterator;
-
-  void fill_with_frame_segs(ES_list& L, const Tag_true& ) const
-  /*{\Xop fills the list with the four segments which span our frame,
-     the convex hull of SW,SE,NW,NE.}*/
-  { L.push_back(Extended_segment(EK.SW(),EK.NW()));
-    L.push_back(Extended_segment(EK.SW(),EK.SE()));
-    L.push_back(Extended_segment(EK.NW(),EK.NE()));
-    L.push_back(Extended_segment(EK.SE(),EK.NE()));
-  }
-
-  void fill_with_frame_segs(ES_list& , const Tag_false& ) const
-  {}
-
-  void fill_with_frame_segs(ES_list& L) const
-  { 
-
-    fill_with_frame_segs(L, typename Is_extended_kernel<Extended_kernel>::value_type());
-  }
-
-  struct Link_to_iterator {
-    const Decorator& D;
-    Halfedge_handle _e;
-    Vertex_handle   _v;
-    ES_iterator     _it;
-    Mark            _m;
-    Link_to_iterator(const Decorator& d, ES_iterator it, Mark m) : 
-      D(d), _e(), _v(), _it(it), _m(m) {}
-
-    void supporting_segment(Halfedge_handle e, ES_iterator it) 
-    { if ( it == _it ) _e = e; D.mark(e) = _m; }
-    void trivial_segment(Vertex_handle v, ES_iterator it) 
-    { if ( it == _it ) _v = v; D.mark(v) = _m; }
-    void starting_segment(Vertex_handle v, ES_iterator) 
-    { D.mark(v) = _m; }
-    void passing_segment(Vertex_handle v, ES_iterator) 
-    { D.mark(v) = _m; }
-    void ending_segment(Vertex_handle v, ES_iterator) 
-    { D.mark(v) = _m; }
-
-  };
-
-  template<typename IT>
-  struct From_intersecting_polygons {
-
-    Unique_hash_map<Halfedge_handle,IT>& halfedge2iterator;
-
-    From_intersecting_polygons(Unique_hash_map<Halfedge_handle,IT>& e2i) 
-      : halfedge2iterator(e2i) {}
-
-    void supporting_segment(Halfedge_handle e, IT it) 
-    { 
-      halfedge2iterator[e->opposite()] = 
-	halfedge2iterator[e] = it; e->mark() = true;}      
-
-    void trivial_segment(Vertex_handle v, IT) 
-    { v->mark() = true; }
-    void starting_segment(Vertex_handle v, IT) 
-    { v->mark() = true; }
-    void passing_segment(Vertex_handle v, IT) 
-    { v->mark() = true; }
-    void ending_segment(Vertex_handle v, IT) 
-    { v->mark() = true; }
-  };  
-
-  friend struct Link_to_iterator;
-
-  void clear_outer_face_cycle_marks(const Tag_true&) 
-  { // unset all frame marks
-    Decorator D(pm());
-    Face_iterator f = D.faces_begin(); 
-    D.mark(f) = false;
-    Halfedge_handle e = D.holes_begin(f);
-    D.set_marks_in_face_cycle(e, false);
-  }
-
-  void clear_outer_face_cycle_marks(const Tag_false&)
-  {}
-
-  void clear_outer_face_cycle_marks()
-  {
-    clear_outer_face_cycle_marks(typename Is_extended_kernel<Extended_kernel>::value_type());
-  }
-
-public:
-  /*{\Mcreation 3}*/
-  Nef_polyhedron_2(Content plane = EMPTY) : Base(Nef_rep())
-  /*{\Mcreate creates an instance |\Mvar| of type |\Mname|
-  and initializes it to the empty set if |plane == EMPTY|
-  and to the whole plane if |plane == COMPLETE|.}*/
-  {
-    ES_list L;
-    fill_with_frame_segs(L);
-    Overlayer D(pm());
-    Link_to_iterator I(D, --L.end(), false);
-    D.create(L.begin(),L.end(),I);
-    D.mark(--D.faces_end()) = bool(plane);
-  }
-
-
-  Nef_polyhedron_2(const Line& l, Boundary line = INCLUDED) : Base(Nef_rep())
-  /*{\Mcreate creates a Nef polyhedron |\Mvar| containing the half-plane
-  left of |l| including |l| if |line==INCLUDED|, excluding |l| if 
-  |line==EXCLUDED|.}*/  
-  {   CGAL_NEF_TRACEN("Nconstruction from line "<<l);
-    ES_list L;
-    fill_with_frame_segs(L);
-    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
-      Extended_point ep1 = EK.construct_opposite_point(l);
-      Extended_point ep2 = EK.construct_point(l);
-      L.push_back(EK.construct_segment(ep1,ep2));
-    }
-    Overlayer D(pm());
-    Link_to_iterator I(D, --L.end(), false);
-    D.create(L.begin(),L.end(),I);
-    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
-      CGAL_assertion( I._e != Halfedge_handle() );
-      Halfedge_handle el = I._e;
-      if ( D.point(D.target(el)) != EK.target(L.back()) )
-	el = D.twin(el);
-      D.mark(D.face(el)) = true;
-      D.mark(el) = bool(line);
-    } else {
-      D.mark(--D.faces_end()) = bool(EMPTY);
-      std::cerr << "Constructor not available with standard kernel. "
-                   " Returned empty polygon!" << std::endl;
-    }
-  }
-
-
-  template <class Forward_iterator>
-  Nef_polyhedron_2(Forward_iterator it, Forward_iterator end,
-    Boundary b = INCLUDED) : Base(Nef_rep())
-  /*{\Mcreate creates a Nef polyhedron |\Mvar| from the simple polygon
-  |P| spanned by the list of points in the iterator range |[it,end)| and
-  including its boundary if |b = INCLUDED| and excluding the boundary
-  otherwise. |Forward_iterator| has to be an iterator with value type
-  |Point|. This construction expects that |P| is simple. The degenerate
-  cases where |P| contains no point, one point or spans just one segment
-  (two points) are correctly handled. In all degenerate cases there's
-  only one unbounded face adjacent to the degenerate polygon. If |b ==
-  INCLUDED| then |\Mvar| is just the boundary. If |b == EXCLUDED| then
-  |\Mvar| is the whole plane without the boundary.}*/
-  { 
-    ES_list L;
-    fill_with_frame_segs(L);
-    bool empty = false;  
-    if (it != end) 
-      {
-        Extended_point ef, ep = ef = EK.construct_point(*it);
-        Forward_iterator itl=it; ++itl;
-        if (itl == end) // case only one point
-          L.push_back(EK.construct_segment(ep,ep));
-        else { // at least one segment
-          while( itl != end ) {
-            Extended_point en = EK.construct_point(*itl);
-            L.push_back(EK.construct_segment(ep,en));
-            ep = en; ++itl;
-          }
-          L.push_back(EK.construct_segment(ep,ef));
-        }
-      }
-
-    else empty = true;
-    Overlayer D(pm());
-    Link_to_iterator I(D, --L.end(), true);
-    D.create(L.begin(),L.end(),I);
-    if ( empty ) {
-      D.mark(--D.faces_end()) = !bool(b); return; }
-    CGAL_assertion( I._e != Halfedge_handle() || I._v != Vertex_handle() );
-
-    if ( EK.is_degenerate(L.back()) ) {
-      // its a point
-      CGAL_assertion(I._v != Vertex_handle());
-      D.mark(D.face(I._v)) = !bool(b); D.mark(I._v) = b;
-    } else {
-      // at least one segment
-      Halfedge_handle el = I._e;
-      if ( D.point(D.target(el)) != EK.target(L.back()) )
-	el = D.twin(el);  
-      D.set_marks_in_face_cycle(el,bool(b));
-      unsigned int n = 
-        check_tag(typename Is_extended_kernel<Extended_kernel>::value_type()) ? 2 : 1;
-      if ( D.number_of_faces() > n ) D.mark(D.face(el)) = true;
-      else                           D.mark(D.face(el)) = !bool(b);
-    }
-
-    clear_outer_face_cycle_marks();
-  }
-
-  // The constructor which takes an iterator range of polygons
-  template <class Forward_iterator>
-  Nef_polyhedron_2(Forward_iterator pit, Forward_iterator pend,	      
-		   Polygons, Operation op = JOIN) : Base(Nef_rep()) { 
-
-    CGAL_assertion(op==JOIN);
-
-    typedef typename std::iterator_traits<Forward_iterator>::value_type
-      iterator_pair;
-    typedef typename iterator_pair::first_type point_iterator;
-    point_iterator it, itl, end;
-
-    ES_list L;
-
-    fill_with_frame_segs(L);
-    for(;pit != pend; ++pit) {
-      it = pit->first;
-      end = pit->second;
-      if (it != end) {
-        Extended_point ef, ep = ef = EK.construct_point(*it);
-        itl=it; ++itl;
-        if (itl == end) // case only one point
-          L.push_back(EK.construct_segment(ep,ep));
-        else { // at least one segment
-          while( itl != end ) {
-            Extended_point en = EK.construct_point(*itl);
-            L.push_back(EK.construct_segment(ep,en));
-            ep = en; ++itl;
-          }
-          L.push_back(EK.construct_segment(ep,ef));
-        }
-      }
-    }
-
-    Overlayer D(pm());
-    Unique_hash_map<Halfedge_handle,ES_iterator> e2i;
-    From_intersecting_polygons<ES_iterator> fip(e2i);
-    D.create(L.begin(),L.end(),fip);
-
-    Face_handle outer_face;
-    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type()))
-      outer_face = ++D.faces_begin();
-    else
-      outer_face = D.faces_begin();
-    Halfedge_handle e;
-    for(e=D.halfedges_begin(); e!=D.halfedges_end(); ++e) {
-      if(&*e < &*(D.twin(e)) && EK.is_standard(D.source(e)->point())) {
-	ES_iterator eit = e2i[e];
-	if(lexicographically_xy_smaller(EK.standard_point(eit->source()),
-					EK.standard_point(eit->target()))) {
-	  if(lexicographically_xy_smaller(EK.standard_point(D.source(D.twin(e))->point()),
-					  EK.standard_point(D.source(e)->point())))
-	    e = D.twin(e);
-	} else
-	  if(lexicographically_xy_smaller(EK.standard_point(D.source(e)->point()),
-					  EK.standard_point(D.source(D.twin(e))->point())))
-	    e = D.twin(e);
-	if(D.face(e) != outer_face)
-	  D.mark(D.face(e)) = true;
-      }
-    }
-    
-    D.simplify(Except_frame_box_edges(pm()));
-    clear_outer_face_cycle_marks();
-  }
-
-
-  // The constructor which takes an iterator range of polylines
-  template <class Forward_iterator>
-  Nef_polyhedron_2(Forward_iterator pit, Forward_iterator pend,	      
-		   Polylines) : Base(Nef_rep()) { 
-
-    typedef typename std::iterator_traits<Forward_iterator>::value_type 
-      iterator_pair;
-    typedef typename iterator_pair::first_type point_iterator;
-    point_iterator it, itl, end;
-
-    ES_list L;
-
-    fill_with_frame_segs(L);
-    for(;pit != pend; ++pit) {
-      it = pit->first;
-      end = pit->second;
-      if (it != end) {
-        Extended_point ep  = EK.construct_point(*it);
-        itl=it; ++itl;
-        if (itl == end) // case only one point
-          L.push_back(EK.construct_segment(ep,ep));
-        else { // at least one segment
-          while( itl != end ) {
-            Extended_point en = EK.construct_point(*itl);
-            L.push_back(EK.construct_segment(ep,en));
-            ep = en;
-	    ++itl;
-          }
-        }
-      }
-    }
-
-    Overlayer D(pm());
-    Link_to_iterator I(D, --L.end(), true);
-    D.create(L.begin(),L.end(),I, Overlayer::POLYLINE);
-    
-    clear_outer_face_cycle_marks();
-  }
-
-  Nef_polyhedron_2(const Nef_polyhedron_2<T,Items,Mark>& N1) : Base(N1) {}
-  Nef_polyhedron_2& operator=(const Nef_polyhedron_2<T,Items,Mark>& N1)
-  { Base::operator=(N1); return (*this); }
-  ~Nef_polyhedron_2() {}
-
-
-
-  template <class Forward_iterator>
-  Nef_polyhedron_2(Forward_iterator first, Forward_iterator beyond, 
-    double p) : Base(Nef_rep())
-  /*{\Xcreate creates a random Nef polyhedron from the arrangement of
-  the set of lines |S = set[first,beyond)|. The cells of the arrangement
-  are selected uniformly at random with probability $p$. \precond $0 < p
-  < 1$.}*/
-  { CGAL_assertion(0<p && p<1);
-    ES_list L; fill_with_frame_segs(L);
-    while ( first != beyond ) {
-      Extended_point ep1 = EK.construct_opposite_point(*first);
-      Extended_point ep2 = EK.construct_point(*first);
-      L.push_back(EK.construct_segment(ep1,ep2)); ++first;
-    }
-    Overlayer D(pm());
-    Link_to_iterator I(D, --L.end(), false);
-    D.create(L.begin(),L.end(),I);
-
-    boost::rand48 rng;
-    boost::uniform_real<> dist(0,1);
-    boost::variate_generator<boost::rand48&, boost::uniform_real<> > get_double(rng,dist);
-
-    Vertex_iterator v; Halfedge_iterator e; Face_iterator f;
-    for (v = D.vertices_begin(); v != D.vertices_end(); ++v)
-      D.mark(v) = ( get_double() < p ? true : false );
-    for (e = D.halfedges_begin(); e != D.halfedges_end(); ++(++e))
-      D.mark(e) = ( get_double() < p ? true : false );
-    for (f = D.faces_begin(); f != D.faces_end(); ++f)
-      D.mark(f) = ( get_double() < p ? true : false );
-    D.simplify(Except_frame_box_edges(pm()));
-    clear_outer_face_cycle_marks(); 
-  }
-
-
-
-  protected:
-  Nef_polyhedron_2(const Plane_map& H, bool clone=true) : Base(Nef_rep()) 
-  /*{\Xcreate makes |\Mvar| a new object.  If |clone==true| then the
-  underlying structure of |H| is copied into |\Mvar|.}*/
-  { if (clone) {
-      Decorator D(pm()); // a decorator working on the rep plane map
-      D.clone(H);        // cloning H into pm()
-    }
-  }
-  void clone_rep() { *this = Nef_polyhedron_2<T,Items,Mark>(pm()); }
-
-  /*{\Moperations 4 3 }*/
-  public:
-
-  void clear(Content plane = EMPTY)
-  { *this = Nef_polyhedron_2(plane); }
-  /*{\Mop makes |\Mvar| the empty set if |plane == EMPTY| and the
-  full plane if |plane == COMPLETE|.}*/
-
-  bool is_empty() const
-  /*{\Mop returns true if |\Mvar| is empty, false otherwise.}*/
-  { Const_decorator D(pm());
-    Face_const_iterator f = D.faces_begin();
-    if(check_tag(typename Is_extended_kernel<Extended_kernel>::
-		 value_type()))
-      return (D.number_of_vertices()==4 &&
-	      D.number_of_edges()==4 &&
-	      D.number_of_faces()==2 &&
-	      D.mark(++f) == false);
-    else
-      return (D.number_of_vertices()==0 &&
-	      D.number_of_edges()==0 &&
-	      D.number_of_faces()==1 &&
-		D.mark(f) == false);    
-  }
-
-  bool is_plane() const
-  /*{\Mop returns true if |\Mvar| is the whole plane, false otherwise.}*/
-  { Const_decorator D(pm());
-    Face_const_iterator f = D.faces_begin();
-    if(check_tag(typename Is_extended_kernel<Extended_kernel>::
-         value_type()))
-      return (D.number_of_vertices()==4 &&
-              D.number_of_edges()==4 &&
-              D.number_of_faces()==2 &&
-              D.mark(++f) == true);
-    else
-      return (D.number_of_vertices()==0 &&
-          D.number_of_edges()==0 &&
-          D.number_of_faces()==1 &&
-          D.mark(f) == true);
-  }
-
-  void extract_complement()
-  { CGAL_NEF_TRACEN("extract complement");
-  if ( this->is_shared() ) {
-	  clone_rep();
-  }
-    Overlayer D(pm());
-    Vertex_iterator v, vend = D.vertices_end();
-    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = !D.mark(v);
-    Halfedge_iterator e, eend = D.halfedges_end();
-    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = !D.mark(e);
-    Face_iterator f, fend = D.faces_end();
-    for(f = D.faces_begin(); f != fend; ++f)         D.mark(f) = !D.mark(f);
-    clear_outer_face_cycle_marks();
-  }
-
-  void extract_interior()
-  { CGAL_NEF_TRACEN("extract interior");
-    if ( this->is_shared() ) clone_rep();
-    Overlayer D(pm());
-    Vertex_iterator v, vend = D.vertices_end();
-    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = false;
-    Halfedge_iterator e, eend = D.halfedges_end();
-    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = false;
-    D.simplify(Except_frame_box_edges(pm()));
-  }
-
-
-  void extract_boundary()
-  { CGAL_NEF_TRACEN("extract boundary");
-    if ( this->is_shared() ) clone_rep();
-    Overlayer D(pm());
-    Vertex_iterator v, vend = D.vertices_end();
-    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = true;
-    Halfedge_iterator e, eend = D.halfedges_end();
-    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = true;
-    Face_iterator f, fend = D.faces_end();
-    for(f = D.faces_begin(); f != fend; ++f)         D.mark(f) = false;
-    clear_outer_face_cycle_marks();
-    D.simplify(Except_frame_box_edges(pm()));
-  }
-
-  void extract_closure()
-  /*{\Xop converts |\Mvar| to its closure. }*/
-  { CGAL_NEF_TRACEN("extract closure");
-    extract_complement();
-    extract_interior();
-    extract_complement();
-  }
-
-  void extract_regularization()
-  /*{\Xop converts |\Mvar| to its regularization. }*/
-  { CGAL_NEF_TRACEN("extract regularization");
-    extract_interior();
-    extract_closure();
-  }
-
-  /*{\Mtext \headerline{Constructive Operations}}*/
-
-  Nef_polyhedron_2<T,Items,Mark> complement() const
-  /*{\Mop returns the complement of |\Mvar| in the plane.}*/
-  { Nef_polyhedron_2<T,Items,Mark> res = *this;
-    res.extract_complement();
-    return res;
-  }
-
-
-  Nef_polyhedron_2<T,Items,Mark> interior() const
-  /*{\Mop returns the interior of |\Mvar|.}*/
-  { Nef_polyhedron_2<T,Items,Mark> res = *this;
-    res.extract_interior();
-    return res;
-  }
-
-  Nef_polyhedron_2<T,Items,Mark> closure() const
-  /*{\Mop returns the closure of |\Mvar|.}*/
-  { Nef_polyhedron_2<T,Items,Mark> res = *this;
-    res.extract_closure();
-    return res;
-  }
-
-  Nef_polyhedron_2<T,Items,Mark> boundary() const
-  /*{\Mop returns the boundary of |\Mvar|.}*/
-  { Nef_polyhedron_2<T,Items,Mark> res = *this;
-    res.extract_boundary();
-    return res;
-  }
-
-  Nef_polyhedron_2<T,Items,Mark> regularization() const
-  /*{\Mop returns the regularized polyhedron (closure of interior).}*/
-  { Nef_polyhedron_2<T,Items,Mark> res = *this;
-    res.extract_regularization();
-    return res;
-  }
-
-
-  Nef_polyhedron_2<T,Items,Mark> intersection(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  /*{\Mop returns |\Mvar| $\cap$ |N1|. }*/
-  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
-    Overlayer D(res.pm());
-    D.subdivide(pm(),N1.pm());
-    AND _and; D.select(_and);
-    res.clear_outer_face_cycle_marks();
-    D.simplify(Except_frame_box_edges(res.pm()));
-    return res;
-  }
-
-
-  Nef_polyhedron_2<T,Items,Mark> join(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  /*{\Mop returns |\Mvar| $\cup$ |N1|. }*/
-  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
-    Overlayer D(res.pm());
-    D.subdivide(pm(),N1.pm());
-    OR _or; D.select(_or);
-    res.clear_outer_face_cycle_marks();
-    D.simplify(Except_frame_box_edges(res.pm()));
-    return res;
-  }
-
-  Nef_polyhedron_2<T,Items,Mark> difference(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  /*{\Mop returns |\Mvar| $-$ |N1|. }*/
-  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
-    Overlayer D(res.pm());
-    D.subdivide(pm(),N1.pm());
-    DIFF _diff; D.select(_diff);
-    res.clear_outer_face_cycle_marks();
-    D.simplify(Except_frame_box_edges(res.pm()));
-    return res;
-  }    
-
-  Nef_polyhedron_2<T,Items,Mark> symmetric_difference(
-    const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ 
-          |T - \Mvar|. }*/
-  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
-    Overlayer D(res.pm());
-    D.subdivide(pm(),N1.pm());
-    XOR _xor; D.select(_xor);
-    res.clear_outer_face_cycle_marks();
-    D.simplify(Except_frame_box_edges(res.pm()));
-    return res;
-  }
-
-  #if 0
-  Nef_polyhedron_2<T,Items,Mark> transform(const Aff_transformation& t) const
-  /*{\Mop returns $t(|\Mvar|)$.}*/
-  { Nef_polyhedron_2<T,Items,Mark> res(pm()); // cloned
-    Transformer PMT(res.pm());
-    PMT.transform(t);
-    return res;
-  }
-  #endif
-
-
-  /*{\Mtext Additionally there are operators |*,+,-,^,!| which
-  implement the binary operations \emph{intersection}, \emph{union},
-  \emph{difference}, \emph{symmetric difference}, and the unary
-  operation \emph{complement} respectively. There are also the
-  corresponding modification operations |*=,+=,-=,^=|.}*/
-
-  Nef_polyhedron_2<T,Items,Mark>  operator*(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return intersection(N1); }
-
-  Nef_polyhedron_2<T,Items,Mark>  operator+(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return join(N1); }
-
-  Nef_polyhedron_2<T,Items,Mark>  operator-(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return difference(N1); }
-
-  Nef_polyhedron_2<T,Items,Mark>  operator^(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return symmetric_difference(N1); }
-
-  Nef_polyhedron_2<T,Items,Mark>  operator!() const
-  { return complement(); }
-   
-  Nef_polyhedron_2<T,Items,Mark>& operator*=(const Nef_polyhedron_2<T,Items,Mark>& N1)
-  { *this = intersection(N1); return *this; }
-
-  Nef_polyhedron_2<T,Items,Mark>& operator+=(const Nef_polyhedron_2<T,Items,Mark>& N1)
-  { *this = join(N1); return *this; }
-
-  Nef_polyhedron_2<T,Items,Mark>& operator-=(const Nef_polyhedron_2<T,Items,Mark>& N1)
-  { *this = difference(N1); return *this; }
-
-  Nef_polyhedron_2<T,Items,Mark>& operator^=(const Nef_polyhedron_2<T,Items,Mark>& N1)
-  { *this = symmetric_difference(N1); return *this; }
-
-  /*{\Mtext There are also comparison operations like |<,<=,>,>=,==,!=|
-  which implement the relations subset, subset or equal, superset, superset
-  or equal, equality, inequality, respectively.}*/
-
-  bool operator==(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return symmetric_difference(N1).is_empty(); }
-
-  bool operator!=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return !operator==(N1); }  
-
-  bool operator<=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return difference(N1).is_empty(); } 
-
-  bool operator<(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return difference(N1).is_empty() && !N1.difference(*this).is_empty(); } 
-
-  bool operator>=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
-  { return N1.difference(*this).is_empty(); } 
-
-  bool operator>(const Nef_polyhedron_2<T,Items,Mark>& N1) const   
-  { return N1.difference(*this).is_empty() && !difference(N1).is_empty(); } 
-
-
-  /*{\Mtext \headerline{Exploration - Point location - Ray shooting}
-  As Nef polyhedra are the result of forming complements 
-  and intersections starting from a set |H| of half-spaces that are
-  defined by oriented lines in the plane, they can be represented by
-  an attributed plane map $M = (V,E,F)$. For topological queries
-  within |M| the following types and operations allow exploration
-  access to this structure.}*/
-
-  /*{\Mtypes 3}*/
-  typedef Const_decorator Topological_explorer;
-
-  typedef CGAL::PM_explorer<Const_decorator,T> Explorer;
-  /*{\Mtypemember a decorator to examine the underlying plane map. 
-  See the manual page of |Explorer|.}*/
-
-  typedef typename Locator::Object_handle Object_handle;
-  /*{\Mtypemember a generic handle to an object of the underlying
-  plane map. The kind of object |(vertex, halfedge, face)| can 
-  be determined and the object can be assigned to a corresponding
-  handle by the three functions:\\
-  |bool assign(Vertex_const_handle& h, Object_handle)|\\
-  |bool assign(Halfedge_const_handle& h, Object_handle)|\\
-  |bool assign(Face_const_handle& h, Object_handle)|\\
-  where each function returns |true| iff the assignment to
-  |h| was done.}*/
-
-  enum Location_mode { DEFAULT, NAIVE, LMWT };
-  /*{\Menum selection flag for the point location mode.}*/
-
-
-  /*{\Moperations 3 1 }*/
-
-  void init_locator() const 
-  { const_cast<Self*>(this)->ptr()->init_locator(); }
-  const Locator& locator() const 
-  { CGAL_assertion(ptr()->pl_); return *(ptr()->pl_); }
-
-
-  bool contains(Object_handle h) const
-  /*{\Mop  returns true iff the object |h| is contained in the set
-  represented by |\Mvar|.}*/
-  { Slocator PL(pm()); return PL.mark(h); }
-
-  bool contained_in_boundary(Object_handle h) const
-  /*{\Mop  returns true iff the object |h| is contained in the $1$-skeleton
-  of |\Mvar|.}*/
-  { Vertex_const_handle v;
-    Halfedge_const_handle e;
-    return  ( CGAL::assign(v,h) || CGAL::assign(e,h) );
-  }
-
-  Object_handle locate(const Point& p, Location_mode m = DEFAULT) const
-  /*{\Mop  returns a generic handle |h| to an object (face, halfedge, vertex) 
-  of the underlying plane map that contains the point |p| in its relative 
-  interior. The point |p| is contained in the set represented by |\Mvar| if 
-  |\Mvar.contains(h)| is true. The location mode flag |m| allows one to choose
-  between different point location strategies.}*/
-  { 
-    if (m == DEFAULT || m == LMWT) {
-      init_locator();
-      Extended_point ep = EK.construct_point(p);
-      return locator().locate(ep);
-    } else if (m == NAIVE) {
-      Slocator PL(pm(),EK);
-      Extended_segment s(EK.construct_point(p),
-			 PL.point(PL.vertices_begin()));
-      return PL.locate(s); 
-    }
-    CGAL_error_msg("location mode not implemented.");
-    return Object_handle();
-  }
-
-  struct INSET {
-    const Const_decorator& D;
-    INSET(const Const_decorator& Di) : D(Di) {}
-    bool operator()(Vertex_const_handle v) const { return D.mark(v); }
-    bool operator()(Halfedge_const_handle e) const { return D.mark(e); }
-    bool operator()(Face_const_handle f) const { return D.mark(f); }
-  };
-
-  friend struct INSET;
-
-  Object_handle ray_shoot(const Point& p, const Direction& d, 
-                          Location_mode m = DEFAULT) const
-  /*{\Mop returns a handle |h| with |\Mvar.contains(h)| that can be
-  converted to a |Vertex_/Halfedge_/Face_const_handle| as described
-  above. The object returned is intersected by the ray starting in |p|
-  with direction |d| and has minimal distance to |p|.  The operation
-  returns the null handle |NULL| if the ray shoot along |d| does not hit
-  any object |h| of |\Mvar| with |\Mvar.contains(h)|. The location mode
-  flag |m| allows one to choose between different point location
-  strategies.}*/
-  { 
-    Extended_point ep, eq;
-    if(!check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
-      Const_decorator D(pm());
-      Box_2 b(D.vertices_begin(), D.vertices_end());
-      ep = EK.construct_point(p);
-      eq = b.intersection_ray_bbox(p,d);
-    } else {
-      ep = EK.construct_point(p);
-      eq = EK.construct_point(p,d);      
-    }
-      
-    if (m == DEFAULT || m == LMWT) {
-      init_locator();
-      return locator().ray_shoot(EK.construct_segment(ep,eq),
-                                 INSET(locator())); 
-    } else if (m == NAIVE) {
-      Slocator PL(pm(),EK);
-      return PL.ray_shoot(EK.construct_segment(ep,eq),INSET(PL));
-    }
-    CGAL_error_msg("location mode not implemented.");
-    return Object_handle();
-  }
-
-  struct INSKEL {
-    bool operator()(Vertex_const_handle) const { return true; }
-    bool operator()(Halfedge_const_handle) const { return true; }
-    bool operator()(Face_const_handle) const { return false; }
-  };
-
-  Object_handle ray_shoot_to_boundary(const Point& p, const Direction& d, 
-                Location_mode m = DEFAULT) const
-  /*{\Mop returns a handle |h| that can be converted to a
-  |Vertex_/Halfedge_const_handle| as described above. The object
-  returned is part of the $1$-skeleton of |\Mvar|, intersected by the
-  ray starting in |p| with direction |d| and has minimal distance to
-  |p|.  The operation returns the null handle |NULL| if the ray shoot
-  along |d| does not hit any $1$-skeleton object |h| of |\Mvar|. The
-  location mode flag |m| allows one to choose between different point
-  location strategies.}*/
-  { 
-    Extended_point ep, eq;
-    if(!check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
-      Const_decorator D(pm());
-      Box_2 b(D.vertices_begin(), D.vertices_end());
-      ep = EK.construct_point(p);
-      eq = b.intersection_ray_bbox(p,d);
-    } else {
-      ep = EK.construct_point(p);
-      eq = EK.construct_point(p,d);      
-    }
-      
-    if (m == DEFAULT || m == LMWT) {
-      init_locator();
-      return locator().ray_shoot(EK.construct_segment(ep,eq),
-                                 INSKEL()); 
-    } else if (m == NAIVE) {
-      Slocator PL(pm(),EK);
-      return PL.ray_shoot(EK.construct_segment(ep,eq),INSKEL());
-    }
-    CGAL_error_msg("location mode not implemented.");
-    return Object_handle();
-  }
-
-
-  Explorer explorer() const { return Explorer(pm(),EK); }
-  /*{\Mop returns a decorator object which allows read-only access of
-  the underlying plane map. See the manual page |Explorer| for its 
-  usage.}*/
-
-
-  /*{\Mimplementation Nef polyhedra are implemented on top of a halfedge
-  data structure and use linear space in the number of vertices, edges
-  and facets.  Operations like |empty| take constant time. The
-  operations |clear|, |complement|, |interior|, |closure|, |boundary|,
-  |regularization|, input and output take linear time. All binary set
-  operations and comparison operations take time $O(n \log n)$ where $n$
-  is the size of the output plus the size of the input.
-
-  The point location and ray shooting operations are implemented in
-  two flavors. The |NAIVE| operations run in linear query time without
-  any preprocessing, the |DEFAULT| operations (equals |LMWT|) run in
-  sub-linear query time, but preprocessing is triggered with the first
-  operation. Preprocessing takes time $O(N^2)$, the sub-linear point
-  location time is either logarithmic when LEDA's persistent
-  dictionaries are present or if not then the point location time is
-  worst-case linear, but experiments show often sublinear runtimes.  Ray
-  shooting equals point location plus a walk in the constrained
-  triangulation overlayed on the plane map representation. The cost of
-  the walk is proportional to the number of triangles passed in
-  direction |d| until an obstacle is met. In a minimum weight
-  triangulation of the obstacles (the plane map representing the
-  polyhedron) the theory provides a $O(\sqrt{n})$ bound for the number
-  of steps. Our locally minimum weight triangulation approximates the
-  minimum weight triangulation only heuristically (the calculation of
-  the minimum weight triangulation is conjectured to be NP hard). Thus
-  we have no runtime guarantee but a strong experimental motivation for
-  its approximation.}*/
-
-  /*{\Mexample Nef polyhedra are parameterized by a so-called extended
-  geometric kernel. There are three kernels, one based on a homogeneous
-  representation of extended points called |Extended_homogeneous<RT>|
-  where |RT| is a ring type providing additionally a |gcd| operation and
-  one based on a cartesian representation of extended points called
-  |Extended_cartesian<NT>| where |NT| is a field type, and finally
-  |Filtered_extended_homogeneous<RT>| (an optimized version of the
-  first).
-
-  The member types of |Nef_polyhedron_2< Extended_homogeneous<NT> >|
-  map to corresponding types of the CGAL geometry kernel
-  (e.g. |Nef_polyhedron::Line| equals
-  |CGAL::Homogeneous<leda_integer>::Line_2| in the example below).
-  \begin{Mverb}
-  #include <CGAL/basic.h>
-  #include <CGAL/leda_integer.h>
-  #include <CGAL/Extended_homogeneous.h>
-  #include <CGAL/Nef_polyhedron_2.h>
-
-  using namespace CGAL;
-  typedef  Extended_homogeneous<leda_integer> Extended_kernel;
-  typedef  Nef_polyhedron_2<Extended_kernel>  Nef_polyhedron;
-  typedef  Nef_polyhedron::Line               Line;
-
-  int main()
-  {
-    Nef_polyhedron N1(Line(1,0,0));
-    Nef_polyhedron N2(Line(0,1,0), Nef_polyhedron::EXCLUDED);
-    Nef_polyhedron N3 = N1 * N2; // line (*)
-    return 0;
-  }
-  \end{Mverb}
-  After line (*) |N3| is the intersection of |N1| and |N2|.}*/
-
-
-}; // end of Nef_polyhedron_2
-
-template <typename T, typename Items, typename Mark>
-T Nef_polyhedron_2<T,Items,Mark>::EK;
-
-
-template <typename T, typename Items, typename Mark>
-const typename Nef_polyhedron_2<T,Items,Mark>::Polygons Nef_polyhedron_2<T,Items,Mark>::POLYGONS = typename Nef_polyhedron_2<T,Items,Mark>::Polygons();
-
-template <typename T, typename Items, typename Mark>
-const typename Nef_polyhedron_2<T,Items,Mark>::Polylines Nef_polyhedron_2<T,Items,Mark>::POLYLINES = typename Nef_polyhedron_2<T,Items,Mark>::Polylines();
-
-template <typename T, typename Items, typename Mark>
-std::ostream& operator<<
- (std::ostream& os, const Nef_polyhedron_2<T,Items,Mark>& NP)
-{
-  os << "Nef_polyhedron_2<" << NP.EK.output_identifier() << ">\n";
-  typedef typename Nef_polyhedron_2<T,Items,Mark>::Decorator Decorator;
-  CGAL::PM_io_parser<Decorator> O(os, NP.pm()); O.print();
-  return os;
-}
-
-template <typename T, typename Items, typename Mark>
-std::istream& operator>>
-  (std::istream& is, Nef_polyhedron_2<T,Items,Mark>& NP)
-{
-  typedef typename Nef_polyhedron_2<T,Items,Mark>::Decorator Decorator;
-  CGAL::PM_io_parser<Decorator> I(is, NP.pm()); 
-  if (I.check_sep("Nef_polyhedron_2<") &&
-      I.check_sep(NP.EK.output_identifier()) &&
-      I.check_sep(">")) I.read();
-  else {
-    std::cerr << "Nef_polyhedron_2 input corrupted." << std::endl;
-    NP = Nef_polyhedron_2<T,Items,Mark>();
-  }
-  typename Nef_polyhedron_2<T,Items,Mark>::Topological_explorer D(NP.explorer());
-  D.check_integrity_and_topological_planarity();
-  return is;
-}
-
-
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif //CGAL_NEF_POLYHEDRON_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_3.h
deleted file mode 100644
index 176de24..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_3.h
+++ /dev/null
@@ -1,2076 +0,0 @@
-// Copyright (c) 1997-2002,2005 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
-//                 Miguel Granados <granados at mpi-sb.mpg.de>
-//                 Susan Hert      <hert at mpi-sb.mpg.de>
-//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
-//                 Ralf Osbild     <osbild at mpi-sb.mpg.de>
-//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-#ifndef CGAL_NEF_POLYHEDRON_3_H
-#define CGAL_NEF_POLYHEDRON_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Nef_3/Default_items.h>
-#include <CGAL/Nef_3/SNC_structure.h>
-#include <CGAL/Nef_3/SNC_decorator.h>
-#include <CGAL/Nef_3/SNC_const_decorator.h>
-#include <CGAL/Nef_3/SNC_constructor.h>
-#include <CGAL/Nef_3/SNC_external_structure.h>
-#include <CGAL/Nef_3/Combine_with_halfspace.h>
-#ifdef CGAL_NEF_VISUAL_HULL
-#include <CGAL/Nef_3/Binary_operation_vs.h>
-#else
-#include <CGAL/Nef_3/Binary_operation.h>
-#endif
-#include <CGAL/Nef_S2/SM_decorator.h>
-#include <CGAL/Nef_S2/SM_const_decorator.h>
-#include <CGAL/Nef_3/SNC_SM_overlayer.h>
-#include <CGAL/Nef_S2/SM_point_locator.h>
-#include <CGAL/Nef_3/SNC_SM_explorer.h>
-#include <CGAL/Nef_polyhedron_S2.h>
-#include <CGAL/Modifier_base.h>
-#include <CGAL/Nef_3/Mark_bounded_volumes.h>
-
-#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE
-#include <CGAL/Nef_3/SNC_ray_shooter.h>
-#endif
-
-#ifdef CGAL_NEF3_CGAL_NEF3_SM_VISUALIZOR
-#include <CGAL/Nef_3/SNC_SM_visualizor.h>
-#endif // CGAL_NEF3_SM_VISUALIZOR
-
-#ifdef CGAL_NEF3_OLD_VISUALIZATION 
-#include <CGAL/Nef_3/Visualizor_OpenGL_3.h>
-#endif // CGAL_NEF3_OLD_VISUALIZATION 
-
-#include <CGAL/IO/Verbose_ostream.h>
-#include <CGAL/Nef_3/polyhedron_3_to_nef_3.h>
-#include <CGAL/Nef_3/shell_to_nef_3.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Nef_3/SNC_point_locator.h>
-#include <CGAL/assertions.h>
-
-#include <CGAL/Constrained_triangulation_2.h>
-#include <CGAL/Triangulation_data_structure_2.h>
-#include <CGAL/Projection_traits_xy_3.h>
-#include <CGAL/Projection_traits_yz_3.h>
-#include <CGAL/Projection_traits_xz_3.h>
-#include <CGAL/Constrained_triangulation_face_base_2.h>
-#include <list>
-
-// RO: includes for "vertex cycle to Nef" constructor
-#include <CGAL/Nef_3/vertex_cycle_to_nef_3.h>
-#include <CGAL/Vector_3.h>
-#include <CGAL/normal_vector_newell_3.h>
-
-#ifdef CGAL_NEF_VISUAL_HULL
-#include <CGAL/Nef_3/Modifying_binary_operation_vs.h>
-#endif
-
-#undef CGAL_NEF_DEBUG
-#define CGAL_NEF_DEBUG 11
-#include <CGAL/Nef_2/debug.h>
-
-namespace CGAL {
-
-template <typename K, typename I, typename M> class Nef_polyhedron_3;
-template <typename K, typename I, typename M> class Nef_polyhedron_3_rep;
-
-template <typename K, typename I, typename M>
-std::ostream& operator<<(std::ostream& os, Nef_polyhedron_3<K,I,M>& NP);
-
-template <typename K, typename I, typename M>
-std::istream& operator>>(std::istream& os, Nef_polyhedron_3<K,I,M>& NP);
-
-
-template <typename K, typename I, typename M>
-class Nef_polyhedron_3_rep 
-{ 
-  typedef Nef_polyhedron_3_rep<K,I,M>                  Self;
-  friend class Nef_polyhedron_3<K,I,M>;
- public:
-  typedef CGAL::SNC_structure<K,I,M>                      SNC_structure;
-  typedef CGAL::SNC_decorator<SNC_structure>              SNC_decorator;
-  typedef CGAL::SNC_const_decorator<SNC_structure>        SNC_const_decorator;
-  typedef CGAL::Binary_operation<SNC_structure>           Binary_operation;
-  typedef CGAL::SNC_constructor<I, SNC_structure>         SNC_constructor;
-  typedef CGAL::SNC_external_structure<I, SNC_structure>  SNC_external_structure;
-  typedef CGAL::SNC_point_locator<SNC_decorator> SNC_point_locator;
-  typedef CGAL::SNC_simplify<I, SNC_structure>            SNC_simplify;
-#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE
-  typedef CGAL::SNC_point_locator_naive<SNC_decorator> SNC_point_locator_default;
-#else
-  typedef CGAL::SNC_point_locator_by_spatial_subdivision<SNC_decorator> SNC_point_locator_default;
-#endif
-
-  typedef typename SNC_structure::Sphere_map       Sphere_map;
-  typedef CGAL::SM_decorator<Sphere_map>           SM_decorator;
-  typedef CGAL::SM_const_decorator<Sphere_map>     SM_const_decorator;
-  typedef CGAL::SNC_SM_overlayer<I, SM_decorator>  SM_overlayer;
-  typedef CGAL::SM_point_locator<SNC_structure>    SM_point_locator;
-
-#ifdef CGAL_NEF3_SM_VISUALIZOR
-  typedef CGAL::SNC_SM_visualizor<SNC_structure>       SM_visualizor;
-#endif // CGAL_NEF3_SM_VISUALIZOR
-
- private:
-  SNC_structure snc_;
-  SNC_point_locator* pl_;
-  
- public:
-  Nef_polyhedron_3_rep() : snc_(), pl_() {}
-  ~Nef_polyhedron_3_rep() { 
-    CGAL_NEF_TRACEN( "Nef_polyhedron_3_rep: destroying SNC structure "<<&snc_<<
-	    ", point locator "<<pl_);
-    snc_.clear(); 
-    delete pl_; 
-  }
-};
-
-/*{\Manpage {Nef_polyhedron_3} {T} {Nef Polyhedra in Space}{N}}*/
-
-/*{\Mdefinition
-An instance of data type |\Mname| is a subset of 3-space which is the
-result of forming complements and intersections starting from a set |H| of
-halfspaces. |\Mtype| is closed under all binary set opertions |intersection|,
-|union|, |difference|, |complement| and under the topological operations
-|boundary|, |closure|, and |interior|.}*/
-
-template <typename Kernel_, typename Items_ = typename CGAL::Default_items<Kernel_>::Items, typename Mark_ = bool>
-class Nef_polyhedron_3 : public CGAL::Handle_for< Nef_polyhedron_3_rep<Kernel_, Items_, Mark_> >, 
-			 public SNC_const_decorator<SNC_structure<Kernel_,Items_,Mark_> >
-{ 
- public:
-  /*{\Mtypes 7}*/  
-  
-  typedef Kernel_                                     Kernel;
-  typedef Kernel_                                     Traits;
-  typedef Items_                                      Items;
-  typedef Mark_                                       Mark;
-  typedef Nef_polyhedron_3<Kernel, Items, Mark>       Self;
-  typedef Nef_polyhedron_3<Kernel, Items, Mark>       Nef_polyhedron;
-  typedef Handle_for< Nef_polyhedron_3_rep<Kernel, Items, Mark> >   Base;
-  typedef typename Kernel::Point_3                    Point_3;
-  typedef typename Kernel::Plane_3                    Plane_3;
-  typedef typename Kernel::Vector_3                   Vector_3;
-  typedef typename Kernel::Segment_3                  Segment_3;
-  typedef typename Kernel::Aff_transformation_3       Aff_transformation_3;
-
-#ifndef _MSC_VER
-  // VC++ has a problem to digest the following typedef,
-  // and does not need the using statements -- AF
-  // The left and right part of these typedefs have the same name. It is
-  // very important to qualify the left part with the CGAL:: namespace, no
-  // to confuse g++. -- Laurent Rineau, 2010/09/13
-  typedef CGAL::SNC_structure<Kernel,Items,Mark> SNC_structure;
-  typedef CGAL::SNC_const_decorator<SNC_structure> SNC_const_decorator;
-  using SNC_const_decorator::set_snc;
-  using SNC_const_decorator::is_standard;
-  using SNC_const_decorator::is_bounded;
-#endif
-
-  struct Polylines_tag {};
-
-  enum Boundary { EXCLUDED=0, INCLUDED=1 };
-  /*{\Menum construction selection.}*/
-
-  typedef enum { EMPTY=0, COMPLETE=1 } Content;
-  /*{\Menum construction selection}*/
-
-  typedef enum { DEFAULT, NAIVE, WALKING, SPATIAL_SUBDIVISION  } Location_mode;
-  /*{\Menum selection flag for the point location mode.}*/
-
-protected: 
-  struct AND { Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false) const { return b1&&b2; } };
-  struct OR { Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false) const { return b1||b2; } };
-  struct DIFF { Mark operator()(const Mark& b1, const Mark& b2, bool inverted=false) const { 
-    if(inverted) return !b1&&b2; return b1&&!b2; } };
-  struct XOR { Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false) const 
-    { return (b1&&!b2)||(!b1&&b2); } };
-
- public:
-  typedef Nef_polyhedron_3_rep<Kernel,Items, Mark>    Nef_rep;
-
-  typedef typename Nef_rep::SM_decorator        SM_decorator;
-  typedef typename Nef_rep::SM_const_decorator  SM_const_decorator;
- protected:
-  typedef typename Nef_rep::SNC_decorator       SNC_decorator;
-  typedef typename Nef_rep::SNC_constructor     SNC_constructor;
-  typedef typename Nef_rep::SNC_external_structure SNC_external_structure;
-  typedef typename Nef_rep::Binary_operation    Binary_operation;
-  typedef typename Nef_rep::SNC_point_locator   SNC_point_locator;
-  typedef typename Nef_rep::SNC_point_locator_default
-    SNC_point_locator_default;
-  typedef CGAL::Combine_with_halfspace<SNC_structure, SNC_point_locator> 
-          Combine_with_halfspace;
-public:
- enum Intersection_mode { 
-	 CLOSED_HALFSPACE = Combine_with_halfspace::CLOSED_HALFSPACE, 
-     OPEN_HALFSPACE = Combine_with_halfspace::OPEN_HALFSPACE, 
-     PLANE_ONLY = Combine_with_halfspace::PLANE_ONLY};
-
-protected: 
-  typedef typename Nef_rep::SM_overlayer        SM_overlayer;
-  typedef typename Nef_rep::SM_point_locator    SM_point_locator;
-  typedef typename Nef_rep::SNC_simplify        SNC_simplify;
-#ifdef CGAL_NEF3_SM_VISUALIZOR
-  typedef typename Nef_rep::SM_visualizor       SM_visualizor;
-#endif // CGAL_NEF3_SM_VISUALIZOR
-#ifdef CGAL_NEF3_OLD_VISUALIZATION 
-  typedef CGAL::Nef_Visualizor_OpenGL_3<Nef_polyhedron_3> Visualizor;
-#endif // CGAL_NEF3_OLD_VISUALIZATION 
-
- typedef typename Nef_rep::Sphere_map                Sphere_map;
- public:
- typedef CGAL::Nef_polyhedron_S2<Kernel,Items,Mark,Sphere_map> Nef_polyhedron_S2;
- protected:
-
-  SNC_structure& snc() { return this->ptr()->snc_; } 
-  const SNC_structure& snc() const { return this->ptr()->snc_; } 
-
-  SNC_point_locator*& pl() { return this->ptr()->pl_; }
-  const SNC_point_locator* pl() const { return this->ptr()->pl_; }
-
-  friend std::ostream& operator<< <>
-      (std::ostream& os, Nef_polyhedron_3<Kernel,Items, Mark>& NP);
-  friend std::istream& operator>> <>
-      (std::istream& is, Nef_polyhedron_3<Kernel,Items, Mark>& NP);
-
-  typedef typename SNC_decorator::Vertex_handle    Vertex_handle;
-  typedef typename SNC_decorator::Halfedge_handle  Halfedge_handle;
-  typedef typename SNC_decorator::Halffacet_handle
-                                                   Halffacet_handle;
-  typedef typename SNC_decorator::Volume_handle    Volume_handle;
-
- public:
-  typedef typename SNC_structure::Sphere_point                 Sphere_point;
-  typedef typename SNC_structure::Sphere_segment               Sphere_segment;
-  typedef typename SNC_structure::Sphere_circle                Sphere_circle;
-  typedef typename SNC_structure::Vertex_base                  Vertex;
-  typedef typename SNC_structure::Halfedge_base                Halfedge;
-  typedef typename SNC_structure::Halffacet_base               Halffacet;
-  typedef typename SNC_structure::Volume_base                  Volume;
-  typedef typename SNC_structure::Vertex_const_handle          Vertex_const_handle;
-  typedef typename SNC_structure::Halfedge_const_handle        Halfedge_const_handle;
-  typedef typename SNC_structure::Halffacet_const_handle       Halffacet_const_handle;
-  typedef typename SNC_structure::Volume_const_handle          Volume_const_handle;
-  typedef typename SNC_structure::SHalfedge_around_svertex_circulator 
-                                  SHalfedge_around_svertex_circulator;
-  typedef typename SNC_structure::SHalfedge_around_svertex_const_circulator 
-                                  SHalfedge_around_svertex_const_circulator;
-  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
-                                  SHalfedge_around_facet_circulator;
-  typedef typename SNC_structure::SHalfedge_around_facet_const_circulator 
-                                  SHalfedge_around_facet_const_circulator;
-  typedef typename SNC_structure::SHalfedge_around_sface_const_circulator 
-                                  SHalfedge_around_sface_const_circulator;
-  typedef typename SNC_structure::Halffacet_cycle_const_iterator     
-                                  Halffacet_cycle_const_iterator;
-  typedef typename SNC_structure::Halffacet_cycle_iterator     
-                                  Halffacet_cycle_iterator;
-  typedef typename SNC_structure::Infi_box                     Infi_box;
-  typedef typename SNC_structure::Size_type Size_type;
-  typedef Size_type                         size_type;
-
-  typedef typename Kernel::RT                       RT;
-
- public:
-  typedef typename SM_decorator::SVertex_handle    SVertex_handle;
-  typedef typename SM_decorator::SHalfedge_handle  SHalfedge_handle;
-  typedef typename SM_decorator::SFace_handle      SFace_handle;
-  typedef typename SM_decorator::SVertex_const_handle
-                                                   SVertex_const_handle;
-  typedef typename SM_decorator::SHalfedge_const_handle
-                                                   SHalfedge_const_handle;
-  typedef typename SM_decorator::SHalfloop_const_handle
-                                                   SHalfloop_const_handle;
-  typedef typename SM_decorator::SFace_const_handle
-                                                   SFace_const_handle;
-  typedef typename SNC_decorator::Vertex_iterator  Vertex_iterator;
-  typedef typename SNC_decorator::Halfedge_iterator
-                                                   Halfedge_iterator;
-  typedef typename SNC_decorator::Halffacet_iterator
-                                                   Halffacet_iterator;
-  typedef typename SNC_structure::Shell_entry_iterator
-                                                   Shell_entry_iterator;
-  typedef typename SNC_decorator::Volume_iterator  Volume_iterator;
-  typedef typename SNC_structure::Vertex_const_iterator
-                                                    Vertex_const_iterator;
-  typedef typename SNC_structure::Halfedge_const_iterator 
-                                                   Halfedge_const_iterator;
-  typedef typename SNC_structure::Halffacet_const_iterator     
-                                                   Halffacet_const_iterator;
-  typedef typename SNC_structure::Volume_const_iterator     
-                                                   Volume_const_iterator;
-  typedef typename SNC_structure::Shell_entry_const_iterator
-                                                   Shell_entry_const_iterator;
-  typedef typename SM_decorator::SVertex_iterator  SVertex_iterator;
-  typedef typename SM_decorator::SHalfedge_iterator
-                                                   SHalfedge_iterator;
-  typedef typename SM_decorator::SHalfloop_iterator
-                                                   SHalfloop_iterator;
-  typedef typename SM_decorator::SFace_iterator    SFace_iterator;
-  typedef typename SM_decorator::SVertex_const_iterator
-                                                   SVertex_const_iterator;
-  typedef typename SM_decorator::SHalfedge_const_iterator 
-                                                   SHalfedge_const_iterator;
-  typedef typename SM_decorator::SHalfloop_const_iterator 
-                                                   SHalfloop_const_iterator;
-  typedef typename SM_decorator::SFace_const_iterator     
-                                                   SFace_const_iterator;
-  typedef typename SNC_decorator::SFace_cycle_const_iterator     
-                                                   SFace_cycle_const_iterator;
-
-  typedef typename SNC_decorator::Association  Association;
-
-
- protected: 
-  void initialize_infibox_vertices(Content space) {
-    SNC_constructor C(snc()); 
-    Infi_box::initialize_infibox_vertices(C, space == COMPLETE);
-  }
-
-  void check_h_for_intersection_of_12_cube_edges_and_add_vertices
-  (const Plane_3& p);
-  void create_intersection_vertex_of_h_and_e();
-  void init_cube_vertices_depending_on_h(const Plane_3& p);
-  void add_h_to_local_view_of_v();
-  
- public:
-  void build_external_structure() {
-    SNC_external_structure es(snc(), pl());
-    es.build_external_structure();
-  }
-
- public:
-  /*{\Mcreation 3}*/
-
-  Nef_polyhedron_3( Content space = EMPTY);
-		   
-  /*{\Mcreate creates an instance |\Mvar| of type |\Mname|
-  and initializes it to the empty set if |space == EMPTY|
-  and to the whole space if |space == COMPLETE|.}*/
-
-  explicit Nef_polyhedron_3(const Plane_3& p, Boundary b = INCLUDED);
-  /*{\Mcreate creates a Nef polyhedron |\Mvar| containing the
-  halfspace on the negative side of |p| including |p| if |b==INCLUDED|,
-  excluding |p| if |b==EXCLUDED|.}*/
-
-  Nef_polyhedron_3(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) 
- : Base(N1) , SNC_const_decorator() {
-    set_snc(snc());
-  } 
-
-  Nef_polyhedron_3& operator=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) { 
-    Base::operator=(N1);
-    set_snc(snc());
-    return (*this); 
-  }
-
-  ~Nef_polyhedron_3() { 
-    CGAL_NEF_TRACEN("~Nef_polyhedron_3: destructor called for snc "<<&snc()<<
-	   ", pl "<<pl());
-  }
-
-   // RO: "vertex cycle to Nef" constructor (main part)
-   // II input iterator; KN kernel of normal (may differ from Nef kernel)
-   template <class II, class KN>
-   Nef_polyhedron_3 (II v_first, II v_last,
-                    const CGAL::Vector_3<KN> &normal, bool verb = false)
-   {  CGAL_NEF_TRACEN("construction from vertex cycle (main part)");
-
-      // project and triangulate vertices,
-      // convert result to Nef_polyhedron
-      CGAL_precondition (!CGAL::is_empty_range (v_first, v_last));
-      bool is_nef = vertex_cycle_to_nef_3<Nef_polyhedron> (snc(),
-         v_first, v_last, normal, verb);
-      if (is_nef)
-      {
-	 // TO DO:
-	 // Wie kann der eigene point_locator pl() eingebunden werden?
-	 // Wie kann der Konstruktor umgangen werden?
-         typedef CGAL::SNC_point_locator_by_spatial_subdivision
-            <CGAL::SNC_decorator<SNC_structure> >    Point_locator;
-
-         Point_locator Pl;
-         SNC_external_structure es(snc(), &Pl);
-         es.build_external_structure();
-         *this = Nef_polyhedron(snc(), &Pl);
-      }
-      else
-      {  *this = Nef_polyhedron();
-      }
-      set_snc (snc());
-      CGAL_expensive_postcondition (is_valid());
-   }
-
-   // RO: "vertex cycle to Nef" constructor (normal computation)
-   template <class II>
-   Nef_polyhedron_3 (II v_first, II v_last, bool verb = false)
-   {  CGAL_NEF_TRACEN("construction from vertex cycle (normal computation)");
-
-      // compute normal vector
-      CGAL_precondition (!CGAL::is_empty_range (v_first, v_last));
-      CGAL::Vector_3<typename II::value_type::R> normal;
-      normal_vector_newell_3 (v_first, v_last, normal);
-
-      // call "main" constructor
-      *this = Nef_polyhedron_3 (v_first, v_last, normal, verb);
-      set_snc (snc());
-   }
-  
- template<typename Items, typename SNC_structure>
- class Sphere_map_creator {
-   typedef typename SNC_structure::SM_decorator     SM_decorator;
-   typedef typename SNC_structure::Vertex_handle    Vertex_handle;
-   typedef typename SNC_structure::SVertex_handle   SVertex_handle;
-   typedef typename SNC_structure::SFace_handle     SFace_handle;
-   typedef typename SNC_structure::Sphere_point     Sphere_point;
-   
-   public:
-   Sphere_map_creator() {}
-   
-   template<typename point_iterator>
-   void create_end_sphere_map(SNC_structure& snc,
-			      point_iterator cur,
-			      point_iterator prev) {
-     Vertex_handle v(snc.new_vertex(*cur, true));
-     SM_decorator SM(&*v);
-     SVertex_handle sv(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
-				      true));
-     SFace_handle sf(v->new_sface());
-     SM.link_as_isolated_vertex(sv,sf);
-   }
-   
-   template<typename point_iterator>
-   void create_sphere_map(SNC_structure& snc,
-			  point_iterator cur,
-			  point_iterator prev,
-			  point_iterator next) {
-     Vertex_handle v(snc.new_vertex(*cur, true));
-     SM_decorator SM(&*v);
-     SVertex_handle sv1(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
-				       true));
-     SVertex_handle sv2(v->new_svertex(Sphere_point(ORIGIN+(*next-*cur)),
-				       true));      
-     SFace_handle sf(v->new_sface());
-     SM.link_as_isolated_vertex(sv1,sf);
-     SM.link_as_isolated_vertex(sv2,sf);
-   }
- };
- 
- template<typename SNC_structure>
- class Sphere_map_creator<CGAL::SNC_indexed_items, SNC_structure> {
-   typedef typename SNC_structure::SM_decorator     SM_decorator;
-   typedef typename SNC_structure::Vertex_handle    Vertex_handle;
-   typedef typename SNC_structure::SVertex_handle   SVertex_handle;
-   typedef typename SNC_structure::SFace_handle     SFace_handle;
-   typedef typename SNC_structure::Sphere_point     Sphere_point;
-   
-   bool first;
-   int index;
- public:
-   Sphere_map_creator() : first(true), index(0) {}
-     
-     template<typename point_iterator>
-       void create_end_sphere_map(SNC_structure& snc,
-				  point_iterator cur,
-				  point_iterator prev) {
-       Vertex_handle v(snc.new_vertex(*cur, true));
-       SM_decorator SM(&*v);
-       SVertex_handle sv(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
-					true));
-       SFace_handle sf(v->new_sface());
-       SM.link_as_isolated_vertex(sv,sf);
-       if(first) {
-	 sv->set_index();
-	 index = sv->get_index();
-	 first = false;
-       } else
-	 sv->set_index(index);
-     }
-     
-     template<typename point_iterator>
-       void create_sphere_map(SNC_structure& snc,
-			      point_iterator cur,
-			      point_iterator prev,
-			      point_iterator next) {
-       Vertex_handle v(snc.new_vertex(*cur, true));
-       SM_decorator SM(&*v);
-       SVertex_handle sv1(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
-					 true));
-       SVertex_handle sv2(v->new_svertex(Sphere_point(ORIGIN+(*next-*cur)),
-					 true));      
-       SFace_handle sf(v->new_sface());
-       SM.link_as_isolated_vertex(sv1,sf);
-       SM.link_as_isolated_vertex(sv2,sf);
-       sv1->set_index(index);
-       sv2->set_index();
-       index = sv2->get_index();
-     }
- };
- 
- template <typename InputIterator>
- Nef_polyhedron_3(InputIterator begin, InputIterator end, Polylines_tag) {
-   typedef typename std::iterator_traits<InputIterator>::value_type
-     point_iterator_pair;
-   typedef typename point_iterator_pair::first_type
-     point_iterator;
-
-   empty_rep();
-   set_snc(snc());
-   initialize_infibox_vertices(EMPTY);
-
-   point_iterator pbegin, pend, pnext, pprev;
-   Sphere_map_creator<Items, SNC_structure> smc;
-   for(;begin != end; ++begin) {
-     pend = begin->second;
-     pprev = pnext = pbegin = begin->first;
-     ++pnext;
-     CGAL_assertion(pnext != pend);
-     smc.create_end_sphere_map(snc(),pbegin,pnext);
-     for(++pbegin,++pnext; pnext!=pend; ++pbegin,++pprev,++pnext)
-       smc.create_sphere_map(snc(),pbegin,pprev,pnext);
-     smc.create_end_sphere_map(snc(),pbegin,pprev);
-   }
-   build_external_structure();
-   simplify();
- }
-
- template <class T1, class T2,
-           template <class T31, class T32, class T33>
-           class T3, class T4 >
- Nef_polyhedron_3( CGAL::Polyhedron_3<T1,T2,T3,T4>& P) {
-    CGAL_NEF_TRACEN("construction from Polyhedron_3");
-    SNC_structure rsnc;
-    *this = Nef_polyhedron_3(rsnc, new SNC_point_locator_default, false);
-    initialize_infibox_vertices(EMPTY);
-    polyhedron_3_to_nef_3
-      <CGAL::Polyhedron_3<T1,T2,T3,T4>, SNC_structure>( P, snc());
-    build_external_structure();
-    simplify();
-    CGAL::Mark_bounded_volumes<Nef_polyhedron_3> mbv(true);
-    delegate(mbv);
-    set_snc(snc());
-  }
-  
- Nef_polyhedron_3(const Nef_polyhedron& N, 
-		  SFace_const_iterator sf) 
- {
-   SNC_structure rsnc;
-   *this = Nef_polyhedron_3(rsnc, new SNC_point_locator_default, false);
-   initialize_infibox_vertices(EMPTY);
-   shell_to_nef_3(N, sf, snc());
-   build_external_structure();
-   simplify();
-   CGAL::Mark_bounded_volumes<Nef_polyhedron_3> mbv(true);
-   delegate(mbv);
-   set_snc(snc());
- }
-
-
- protected: 
-
-  template<typename Kernel>
-  class Triangulation_handler2 {
-
-    typedef typename CGAL::Triangulation_vertex_base_2<Kernel>               Vb;
-    typedef typename CGAL::Constrained_triangulation_face_base_2<Kernel>     Fb;
-    typedef typename CGAL::Triangulation_data_structure_2<Vb,Fb>             TDS;
-    typedef typename CGAL::Constrained_triangulation_2<Kernel,TDS>           CT;
-
-    typedef typename CT::Face_handle           Face_handle;
-    typedef typename CT::Vertex_handle         CTVertex_handle;
-    typedef typename CT::Finite_faces_iterator Finite_face_iterator;
-    typedef typename CT::Edge                  Edge;
-
-    CT ct;
-    CGAL::Unique_hash_map<Face_handle, bool> visited;
-    CGAL::Unique_hash_map<CTVertex_handle, Vertex_const_handle> ctv2v;
-    Finite_face_iterator fi;
-    Plane_3 supporting_plane;
-
-  public:
-    Triangulation_handler2(Halffacet_const_handle f) : 
-      visited(false), supporting_plane(f->plane()) {
-
-      Halffacet_cycle_const_iterator fci;
-      for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) {
-	if(fci.is_shalfedge()) {
-          SHalfedge_around_facet_const_circulator sfc(fci), send(sfc);
-	  CGAL_For_all(sfc,send) {
-            CGAL_NEF_TRACEN("  insert point" << sfc->source()->source()->point());
-	    CTVertex_handle ctv = ct.insert(sfc->source()->source()->point());
-	    ctv2v[ctv] = sfc->source()->source();
-          }
-        }
-      }
-
-      for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) {
-	if(fci.is_shalfedge()) {
-          SHalfedge_around_facet_const_circulator sfc(fci), send(sfc);
-	  CGAL_For_all(sfc,send) {
-            CGAL_NEF_TRACEN("  insert constraint" << sfc->source()->source()->point()
-	                     << "->" << sfc->source()->twin()->source()->point());
-	    ct.insert_constraint(sfc->source()->source()->point(),
-	                         sfc->source()->twin()->source()->point());
-          }
-        }
-      }
-      CGAL_assertion(ct.is_valid());
-
-      CGAL_NEF_TRACEN("number of finite triangles " << ct.number_of_faces());
-
-      typename CT::Face_handle infinite = ct.infinite_face();
-      typename CT::Vertex_handle ctv = infinite->vertex(1);
-      if(ct.is_infinite(ctv)) ctv = infinite->vertex(2);
-      CGAL_assertion(!ct.is_infinite(ctv));
-
-      typename CT::Face_handle opposite;
-      typename CT::Face_circulator vc(ctv,infinite);
-      do { opposite = vc++;
-      } while(!ct.is_constrained(typename CT::Edge(vc,vc->index(opposite))));
-      typename CT::Face_handle first = vc;
-
-      CGAL_assertion(!ct.is_infinite(first));
-      traverse_triangulation(first, first->index(opposite));
-
-      fi = ct.finite_faces_begin();
-    }
-
-    void traverse_triangulation(Face_handle f, int parent) {
-      visited[f] = true;
-      if(!ct.is_constrained(Edge(f,ct.cw(parent))) && !visited[f->neighbor(ct.cw(parent))]) {
-	Face_handle child(f->neighbor(ct.cw(parent)));
-	traverse_triangulation(child, child->index(f));
-      } 
-      if(!ct.is_constrained(Edge(f,ct.ccw(parent))) && !visited[f->neighbor(ct.ccw(parent))]) {
-	Face_handle child(f->neighbor(ct.ccw(parent)));
-	traverse_triangulation(child, child->index(f));
-      } 
-    } 
- 
-    template<typename Triangle_3>
-    bool get_next_triangle(Triangle_3& tr) {
-      while(fi != ct.finite_faces_end() && visited[fi] == false) ++fi;
-      if(fi == ct.finite_faces_end()) return false;
-      tr = Triangle_3(fi->vertex(0)->point(), fi->vertex(1)->point(), fi->vertex(2)->point());
-      ++fi;
-      return true;
-    }
-
-    bool same_orientation(Plane_3 p1) const {
-      if(p1.a() != 0)
-	return CGAL::sign(p1.a()) == CGAL::sign(supporting_plane.a());
-      if(p1.b() != 0)
-	return CGAL::sign(p1.b()) == CGAL::sign(supporting_plane.b());
-      return CGAL::sign(p1.c()) == CGAL::sign(supporting_plane.c());
-    }
-
-    template<typename PIB, typename Index>
-    void handle_triangles(PIB& pib, Index& VI) {
-      while(fi != ct.finite_faces_end() && visited[fi] == false) ++fi;
-      while(fi != ct.finite_faces_end()) {
-	Plane_3 plane(fi->vertex(0)->point(),
-		      fi->vertex(1)->point(),
-		      fi->vertex(2)->point());
-	pib.begin_facet();
-	if(same_orientation(plane)) {
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(0)]]);
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(1)]]);
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(2)]]);
-	} else {
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(0)]]);
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(2)]]);
-	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(1)]]);
-	}
-	pib.end_facet();
-	do {
-	  ++fi;
-	} while(fi != ct.finite_faces_end() && visited[fi] == false);
-      }
-    }
-  };
- 
-  template <class HDS>
-  class Build_polyhedron : public CGAL::Modifier_base<HDS> {
-    
-    class Visitor {
-
-      typedef typename CGAL::Projection_traits_xy_3<Kernel>       XY;
-      typedef typename CGAL::Projection_traits_yz_3<Kernel>       YZ;
-      typedef typename CGAL::Projection_traits_xz_3<Kernel>       XZ;
-
-      const Object_index<Vertex_const_iterator>& VI;
-      Polyhedron_incremental_builder_3<HDS>& B;
-      const SNC_const_decorator& D;
-      
-    public:
-      Visitor(Polyhedron_incremental_builder_3<HDS>& BB,
-	      const SNC_const_decorator& sd,
-	      Object_index<Vertex_const_iterator>& vi) : VI(vi), B(BB), D(sd){}
-
-      void visit(Halffacet_const_handle opposite_facet) {
-
-	CGAL_NEF_TRACEN("Build_polyhedron: visit facet " << opposite_facet->plane());
- 
-	CGAL_assertion(Infi_box::is_standard(opposite_facet->plane()));
-	
-	SHalfedge_const_handle se;
-	Halffacet_cycle_const_iterator fc;
-     	
-	Halffacet_const_handle f = opposite_facet->twin();
-
-	SHalfedge_around_facet_const_circulator 
-	  sfc1(f->facet_cycles_begin()), sfc2(sfc1);
-	
-	if(++f->facet_cycles_begin() != f->facet_cycles_end() ||
-	   ++(++(++sfc1)) != sfc2) {
-	  Vector_3 orth = f->plane().orthogonal_vector();
-	  int c = CGAL::abs(orth[0]) > CGAL::abs(orth[1]) ? 0 : 1;
-	  c = CGAL::abs(orth[2]) > CGAL::abs(orth[c]) ? 2 : c;
-	  
-	  if(c == 0) {
-	    Triangulation_handler2<YZ> th(f);
-	    th.handle_triangles(B, VI);
-	  } else if(c == 1) {
-	    Triangulation_handler2<XZ> th(f);
-	    th.handle_triangles(B, VI);
-	  } else if(c == 2) {
-	    Triangulation_handler2<XY> th(f);
-	    th.handle_triangles(B, VI);
-	  } else
-	    CGAL_error_msg( "wrong value");
-
-	} else {
-
-	  B.begin_facet();
-	  fc = f->facet_cycles_begin();
-	  se = SHalfedge_const_handle(fc);
-	  CGAL_assertion(se!=0);
-	  SHalfedge_around_facet_const_circulator hc_start(se);
-	  SHalfedge_around_facet_const_circulator hc_end(hc_start);
-	  CGAL_For_all(hc_start,hc_end) {
-	    CGAL_NEF_TRACEN("   add vertex " << hc_start->source()->center_vertex()->point());
-	    B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]);
-	  }
-	  B.end_facet();
-	}
-      }
-
-      void visit(SFace_const_handle) {}
-      void visit(Halfedge_const_handle) {}
-      void visit(Vertex_const_handle) {}
-      void visit(SHalfedge_const_handle) {}
-      void visit(SHalfloop_const_handle) {}
-    };
-
-  public:
-
-    const SNC_const_decorator& scd;
-    Object_index<Vertex_const_iterator> VI;
-
-    Build_polyhedron(const SNC_const_decorator& s) : 
-      scd(s), VI(s.vertices_begin(),s.vertices_end(),'V') {}
-    
-    void operator()( HDS& hds) {
-
-      Polyhedron_incremental_builder_3<HDS> B(hds, true);
-
-      int skip_volumes;
-      if(Infi_box::extended_kernel()) {
-	B.begin_surface(scd.number_of_vertices()-8, 
-			scd.number_of_facets()-6,
-			scd.number_of_edges()-12);
-	skip_volumes = 2;
-      }
-      else {
-	B.begin_surface(scd.number_of_vertices(), 
-			2*scd.number_of_vertices()-4,
-			3*scd.number_of_vertices()-6);
-	skip_volumes = 1;
-      }
-      
-      int vertex_index = 0;
-      Vertex_const_iterator v;
-      CGAL_forall_vertices(v,scd) {
-	if(Infi_box::is_standard(v->point())) {
-	  VI[v]=vertex_index++;
-	  B.add_vertex(v->point());
-	}
-      }     
-      
-      Visitor V(B,scd,VI);
-      Volume_const_handle c;
-      CGAL_forall_volumes(c,scd)
-	if(skip_volumes-- <= 0)
-	  scd.visit_shell_objects(SFace_const_handle(c->shells_begin()),V);
-      B.end_surface();
-      if ( B.error() ) B.rollback();
-    }
-
-  };
-
-  template <class HDS>
-  class Build_polyhedron2 : public CGAL::Modifier_base<HDS> {
-    
-    class Find_holes {
-
-      Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
-      int nov, nof;
-
-    public:
-      Find_holes(Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_) 
-	: omit_vertex(omit_vertex_), nov(0), nof(0) {}
-
-      void visit(Halffacet_const_handle f) {
-	++nof;
-	Halffacet_cycle_const_iterator fc = f->facet_cycles_begin();
-	for(++fc; fc != f->facet_cycles_end(); ++fc) {
-	  if(fc.is_shalfedge()) {
-	    --nof;
-	    SHalfedge_around_facet_const_circulator 
-	      sfc(fc), send(sfc);
-	    CGAL_For_all(sfc, send) {
-	      omit_vertex[sfc->source()->source()] = true;
-	      --nov;
-	    }
-	  } else if(fc.is_shalfloop()) {
-	    SHalfloop_const_handle sl(fc);
-	    omit_vertex[sl->incident_sface()->center_vertex()];
-	    --nov;
-	  } else
-	    CGAL_error_msg( "wrong handle type");
-	}
-      }
-
-      void visit(Vertex_const_handle) { ++nov; }
-      void visit(SFace_const_handle) {}
-      void visit(Halfedge_const_handle) {}
-      void visit(SHalfedge_const_handle) {}
-      void visit(SHalfloop_const_handle) {}
-
-      int number_of_vertices() const {
-	return nov;
-      }
-
-      int number_of_facets() const {
-	return nof;
-      }
-    };
-
-    class Add_vertices {
-      
-      Polyhedron_incremental_builder_3<HDS>& B;
-      Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
-      Object_index<Vertex_const_iterator>& VI;      
-      int vertex_index;
-
-    public:
-      Add_vertices(Polyhedron_incremental_builder_3<HDS>& B_,
-		   Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_,
-		   Object_index<Vertex_const_iterator>& VI_) 
-	: B(B_), omit_vertex(omit_vertex_), VI(VI_), vertex_index(0) {}
-	
-      void visit(Vertex_const_handle v) {
-	if(omit_vertex[v]) return;
-	VI[v]=vertex_index++;
-	B.add_vertex(v->point());
-      }
-
-      void visit(Halffacet_const_handle) {}
-      void visit(SFace_const_handle) {}
-      void visit(Halfedge_const_handle) {}
-      void visit(SHalfedge_const_handle) {}
-      void visit(SHalfloop_const_handle) {}
-
-    };
-
-    class Visitor {
-
-      const Object_index<Vertex_const_iterator>& VI;
-      Polyhedron_incremental_builder_3<HDS>& B;
-      const Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
-      SNC_const_decorator& D;
-      
-    public:
-      Visitor(Polyhedron_incremental_builder_3<HDS>& BB,
-	      const Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_,
-	      SNC_const_decorator& sd,
-	      Object_index<Vertex_const_iterator>& vi) 
-	: VI(vi), B(BB), omit_vertex(omit_vertex_), D(sd){}
-
-      void visit(Halffacet_const_handle opposite_facet) {
-
-	CGAL_NEF_TRACEN("Build_polyhedron: visit facet " << opposite_facet->plane());
- 
-	CGAL_assertion(Infi_box::is_standard(opposite_facet->plane()));
-	
-	SHalfedge_const_handle se;
-	Halffacet_cycle_const_iterator fc;
-     	
-	Halffacet_const_handle f = opposite_facet->twin();
-
-	fc = f->facet_cycles_begin();
-	se = SHalfedge_const_handle(fc);
-	CGAL_assertion(se!=0);
-	if(omit_vertex[se->source()->source()]) return;
-	B.begin_facet();
-	SHalfedge_around_facet_const_circulator hc_start(se);
-	SHalfedge_around_facet_const_circulator hc_end(hc_start);
-	CGAL_For_all(hc_start,hc_end) {
-	  CGAL_NEF_TRACEN("   add vertex " << hc_start->source()->center_vertex()->point());
-	  B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]);
-	}
-	B.end_facet();
-      }
-
-      void visit(SFace_const_handle) {}
-      void visit(Halfedge_const_handle) {}
-      void visit(Vertex_const_handle) {}
-      void visit(SHalfedge_const_handle) {}
-      void visit(SHalfloop_const_handle) {}
-    };
-
-  public:
-
-    SFace_const_handle sf;
-    SNC_const_decorator& scd;
-    Object_index<Vertex_const_iterator> VI;
-    Unique_hash_map<Vertex_const_handle, bool> omit_vertex;
-
-    Build_polyhedron2(SFace_const_handle sf_, SNC_const_decorator& s) : 
-      sf(sf_), scd(s), VI(s.vertices_begin(),s.vertices_end(),'V'), 
-      omit_vertex(false) {}
-    
-      void operator()(HDS& hds) {
-
-      Polyhedron_incremental_builder_3<HDS> B(hds, true);
-      
-      Find_holes F(omit_vertex);
-      scd.visit_shell_objects(sf, F);
-
-      B.begin_surface(F.number_of_vertices(), 
-		      F.number_of_facets(),
-		      F.number_of_vertices()+F.number_of_facets()-2);
-
-      Add_vertices A(B,omit_vertex, VI);
-      scd.visit_shell_objects(sf, A);
-
-      Visitor V(B,omit_vertex, scd,VI);
-      scd.visit_shell_objects(sf, V);
-      B.end_surface();
-      if ( B.error() ) B.rollback();
-    }
-
-  };
-
-
- public:
- void delegate( Modifier_base<SNC_structure>& modifier, 
-		bool compute_external = false, 
-		bool do_simplify = true) {
-
-   // calls the `operator()' of the `modifier'. Precondition: The
-   // `modifier' returns a consistent representation.
-   if( this->is_shared()) clone_rep();
-   modifier(snc());
-   if(compute_external) {
-     SNC_external_structure es(snc());
-     es.clear_external_structure();
-     
-     build_external_structure();
-   }
-   if(do_simplify)
-     simplify();
-   CGAL_expensive_postcondition( is_valid());
- }
-
- struct SNC_and_PL {
-   SNC_structure* sncp;
-   SNC_point_locator* pl;
-
-   SNC_and_PL(SNC_structure* s, SNC_point_locator* p) : sncp(s), pl(p) {}
- };
-
- void delegate( Modifier_base<SNC_and_PL>& modifier, 
-		bool compute_external = false,
-		bool do_simplify = false) {
-   // calls the `operator()' of the `modifier'. Precondition: The
-   // `modifier' returns a consistent representation.
-   if( this->is_shared()) clone_rep();
-   SNC_and_PL sncpl(&snc(),pl());
-   modifier(sncpl);
-   pl() = sncpl.pl;
-   if(compute_external) {
-     SNC_external_structure es(snc());
-     es.clear_external_structure();
-     build_external_structure();
-   }
-   if(do_simplify)
-     simplify();
-   CGAL_expensive_postcondition( is_valid());
- }
- 
- public:
-
- template<typename Polyhedron>
- void convert_to_Polyhedron(Polyhedron& P) const {
-   convert_to_polyhedron(P);
- }
-
- template<typename Polyhedron>
- void convert_to_polyhedron(Polyhedron& P) const {
-   typedef typename Polyhedron::HalfedgeDS HalfedgeDS;
-   CGAL_precondition(is_simple());
-   P.clear();
-   Build_polyhedron<HalfedgeDS> bp(*this);    
-   P.delegate(bp);
- }
-
- template<typename Polyhedron>
- void convert_inner_shell_to_polyhedron(SFace_const_iterator sf, Polyhedron& P) {
-   typedef typename Polyhedron::HalfedgeDS HalfedgeDS;
-   P.clear();
-   Build_polyhedron2<HalfedgeDS> bp(sf, *this);
-   P.delegate(bp);
- }
-
-  bool is_valid( bool verb = false, int level = 0) {
-    // checks the combinatorial consistency.
-    Verbose_ostream verr(verb);
-    verr << "begin CGAL::Nef_polyhedron_3<...>::is_valid( verb=true, "
-      "level = " << level << "):" << std::endl;
-
-    SNC_decorator D(snc());
-    bool valid = D.is_valid(verb, level);
-    verr << "end of CGAL::Nef_polyhedron_3<...>::is_valid(): structure is "
-	 << ( valid ? "valid." : "NOT VALID.") << std::endl;
-    return valid;
-  }
-
-  bool is_simple() const {
-
-    Halfedge_const_iterator e;
-    CGAL_forall_edges(e,snc())
-      if(!is_edge_2manifold(e))
-	return false;
-
-    CGAL_NEF_TRACEN("there is no edge with non-manifold situation");
-
-    Vertex_const_iterator v;
-    CGAL_forall_vertices(v,snc())
-      if(!is_vertex_2manifold(v))
-	return false;
-
-    CGAL_NEF_TRACEN("there is no vertex with non-manifold situation");
-/*
-    Halffacet_iterator f;
-    CGAL_forall_halffacets(f,snc())
-      if(!is_facet_simple(f))
-	return false;
-
-    CGAL_NEF_TRACEN("there are no holes");
-*/
-    return true;
-  }
- 
- bool is_convex() const {
-   
-   Vertex_const_iterator v;
-   CGAL_forall_vertices(v, *this) {
-
-     SM_const_decorator SD(&*v);
-     if(std::distance(SD.sfaces_begin(),SD.sfaces_end())!=2)
-       return false;
-
-     if(!Infi_box::is_standard(v->point())) continue;
-
-     SFace_const_iterator sf;
-     CGAL_forall_sfaces(sf,SD) {
-       if(sf->volume() == Infi_box::getNirvana(snc())) continue;
-       if(std::distance(sf->sface_cycles_begin(),sf->sface_cycles_end())!=1)
-	 return false;
-       SFace_cycle_const_iterator sfi(sf->sface_cycles_begin());
-       if(!sfi.is_shalfedge())
-	 return false;
-       SHalfedge_const_handle se(sf->sface_cycles_begin());
-       SHalfedge_around_sface_const_circulator sec(se),send(sec);
-       CGAL_For_all(sec,send)
-	 if(spherical_orientation(sec->source()->point(),
-				  sec->snext()->source()->point(),
-				  sec->snext()->snext()->source()->point())<0) {
-	   std::cerr << "vertex at " << v->point() << " is not convex" << std::endl;
-	   return false;
-	 }
-     }
-   }
-   return true;
- }
-
- private:  
-  bool is_edge_2manifold(const Halfedge_const_handle& e) const {
-
-    SM_decorator SD;
-    SHalfedge_around_svertex_const_circulator c(SD.first_out_edge(e)), c2(c);
-
-    if(c == 0) {
-      CGAL_assertion(circulator_size(c) !=2);
-      return false;
-    }
-
-    if(++c == c2){
-      CGAL_assertion(circulator_size(c) !=2);
-      return false;
-    }
-
-    if(++c != c2) { 
-      CGAL_assertion(circulator_size(c) !=2);
-      return false;
-    }
-    
-    CGAL_assertion(circulator_size(c) == 2);
-    return true;
-  }
- 
-  bool is_vertex_2manifold(const Vertex_const_handle& v) const {
-     
-    SFace_const_iterator sfi(v->sfaces_begin());
-    if (++sfi != v->sfaces_last())
-      return false;
-
-    return true;
-  }
-
-  bool is_facet_simple(const Halffacet_const_handle& f) const {
-    
-    bool found_first = false;
-    Halffacet_cycle_const_iterator it; 
-    CGAL_forall_facet_cycles_of(it,f)
-      if (found_first || !it.is_shalfedge())
-	return false;
-      else
-	found_first = true;
-   
-    return true;
-  }
-
- public:
-#ifdef CGAL_NEF3_OLD_VISUALIZATION   
-  void visualize() { 
-    Visualizor sncv(*this);
-    sncv.draw();
-    //OGL::polyhedra_.back().debug();
-    OLDOGL::start_viewer();
-  }
-#endif // CGAL_NEF3_OLD_VISUALIZATION   
-   
-  void clear(Content space = EMPTY)
-    { *this = Nef_polyhedron_3(space); }
-  /*{\Mop makes |\Mvar| the empty set if |space == EMPTY| and the
-  full space if |space == COMPLETE|.}*/
-
- bool is_empty() const {
-   /*{\Mop returns true if |\Mvar| is empty, false otherwise.}*/
-   if(Infi_box::extended_kernel()) 
-     return this->number_of_vertices() == 8 &&
-            this->number_of_edges() == 12 &&
-            this->number_of_facets() == 6 &&
-            this->number_of_volumes() == 2 &&
-            (++this->volumes_begin())->mark() == false;
-
-   else 
-     return this->number_of_vertices() == 0 &&
-            this->number_of_edges() == 0 &&
-            this->number_of_facets() == 0 &&
-            this->number_of_volumes() == 1 &&
-            (this->volumes_begin())->mark() == false;
-  }
-
- bool is_space() const {
-  /*{\Mop returns true if |\Mvar| is the whole space, false otherwise.}*/
-   if(Infi_box::extended_kernel()) 
-     return this->number_of_vertices() == 8 &&
-            this->number_of_edges() == 12 &&
-            this->number_of_facets() == 6 &&
-            this->number_of_volumes() == 2 &&
-            (++this->volumes_begin())->mark() == true;
-
-   else 
-     return this->number_of_vertices() == 0 &&
-            this->number_of_edges() == 0 &&
-            this->number_of_facets() == 0 &&
-            this->number_of_volumes() == 1 &&
-            (this->volumes_begin())->mark() == true;
-  }
-
-  /*{\Xtext \headerline{Destructive Operations}}*/
-
- protected:
-  void clone_rep() { *this = Nef_polyhedron_3<Kernel,Items, Mark>(snc(), pl()); }
-  void empty_rep() { 
-    SNC_structure rsnc;
-    delete pl();
-    *this = Nef_polyhedron_3<Kernel,Items, Mark>(rsnc, new SNC_point_locator_default,false);
-  }
-
- public:
-  Nef_polyhedron_3( const SNC_structure& W, 
-		    SNC_point_locator* _pl = new SNC_point_locator_default,
-		    bool clone_pl = true,
-		    bool clone_snc = true);
-  /*{\Xcreate makes |\Mvar| a new object.  If |cloneit==true| then the
-  underlying structure of |W| is copied into |\Mvar|.}*/
-  // TODO: granados: define behavior when clone=false
-
-  /*{\Moperations 4 3 }*/
-
-  void simplify() {
-    SNC_simplify simp(snc());
-    bool simplified = simp.simplify();
-    CGAL_NEF_TRACEN( "simplify(): structure simplified? "<<simplified);
-    
-    if( simplified) {
-#ifdef CGAL_NEF3_UPDATE_K3TREE_AFTER_SIMPLIFICATION
-      /*debug*/ snc().print_statistics();
-      Unique_hash_map<Vertex_handle, bool> 
-	V(false, snc().number_of_vertices());
-      Unique_hash_map<Halfedge_handle, bool> 
-	E(false, snc().number_of_halfedges());
-      Unique_hash_map<Halffacet_handle, bool> 
-	F(false, snc().number_of_halffacets());
-      Vertex_iterator v;
-      Halfedge_iterator e;
-      Halffacet_iterator f;
-      CGAL_forall_vertices( v, snc()) V[Vertex_handle(v)] = true;
-      CGAL_forall_halfedges( e, snc()) E[Halfedge_handle(e)] = true;
-      CGAL_forall_halffacets( f, snc()) F[Halffacet_handle(f)] = true;
-      bool updated = pl()->update( V, E, F);
-      CGAL_NEF_TRACEN("simplify(): point locator structure updated? " << updated);
-#else
-      SNC_point_locator* old_pl = pl();
-      pl() = pl()->clone();
-      pl()->initialize(&snc());
-      delete old_pl;
-#endif
-    }
-  }
-
- public:
-  Nef_polyhedron_S2 get_sphere_map(Vertex_const_handle v) const {
-    return Nef_polyhedron_S2(*v);
-  }
-
-  void extract_complement();
-  /*{\Xop converts |\Mvar| to its complement. }*/
-  void extract_interior();
-  /*{\Xop converts |\Mvar| to its interior. }*/
-  void extract_boundary();
-  /*{\Xop converts |\Mvar| to its boundary. }*/
-
-  void extract_closure()
-  /*{\Xop converts |\Mvar| to its closure. }*/
-  { CGAL_NEF_TRACEN("extract closure");
-    if( this->is_shared()) clone_rep();
-    extract_complement();
-    extract_interior();
-    extract_complement();
-  }
-
-  void extract_regularization()
-  /*{\Xop converts |\Mvar| to its regularization. }*/
-  { CGAL_NEF_TRACEN("extract regularization");
-    if( this->is_shared()) clone_rep();
-    extract_interior();
-    extract_closure();
-  }
-
-  /*{\Mtext \headerline{Constructive Operations}}*/
-
-  Nef_polyhedron_3<Kernel,Items, Mark> complement() const
-  /*{\Mop returns the complement of |\Mvar| in the plane. }*/
-  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
-    res.extract_complement();
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> interior() const
-  /*{\Mop    returns the interior of |\Mvar|. }*/
-  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
-    res.extract_interior();
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> closure() const
-  /*{\Mop returns the closure of |\Mvar|. }*/
-  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
-    res.extract_closure();
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> boundary() const
-  /*{\Mop returns the boundary of |\Mvar|. }*/
-  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
-    res.extract_boundary();
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> regularization() const
-  /*{\Mop    returns the regularized polyhedron (closure of 
-    the interior).}*/
-  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
-    res.extract_regularization();
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>
-  intersection(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-    /*{\Mop returns |\Mvar| $\cap$ |N1|. }*/ {
-    CGAL_NEF_TRACEN(" intersection between nef3 "<<&*this<<" and "<<&N1);
-    AND _and;
-    SNC_structure rsnc;
-    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
-    Binary_operation bo( res.snc());
-    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _and);
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>
-   intersection(const Plane_3& plane, 
-		Intersection_mode im) const {
-    AND _and;
-    SNC_structure rsnc;
-    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
-    Combine_with_halfspace cwh(res.snc(), res.pl());
-    cwh.combine_with_halfspace(snc(), plane, _and, 
-							   static_cast<typename Combine_with_halfspace::Intersection_mode>(im));
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> 
-  join(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  /*{\Mop returns |\Mvar| $\cup$ |N1|. }*/ { 
-    CGAL_NEF_TRACEN(" join between nef3 "<<&*this<<" and "<<&N1);
-    OR _or;
-    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, OR> tests_impl;
-    SNC_structure rsnc;
-    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
-    Binary_operation bo(res.snc());
-    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _or);
-    return res;
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark> 
-  difference(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  /*{\Mop returns |\Mvar| $-$ |N1|. }*/ { 
-    CGAL_NEF_TRACEN(" difference between nef3 "<<&*this<<" and "<<&N1);
-    DIFF _diff;
-    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, DIFF> tests_impl;
-    SNC_structure rsnc;
-    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
-    Binary_operation bo(res.snc());
-    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _diff);
-    return res;
-  }    
-
-  Nef_polyhedron_3<Kernel,Items, Mark> 
-  symmetric_difference(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ 
-          |T - \Mvar|. }*/ {
-    CGAL_NEF_TRACEN(" symmetic difference between nef3 "<<&*this<<" and "<<&N1);
-    XOR _xor;
-    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, XOR> tests_impl;
-    SNC_structure rsnc;
-    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
-    Binary_operation bo(res.snc());
-    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _xor);
-    return res;
-  }
-
-
-  /*{\Mtext Additionally there are operators |*,+,-,^,!| which
-  implement the binary operations \emph{intersection}, \emph{union},
-  \emph{difference}, \emph{symmetric difference}, and the unary
-  operation \emph{complement}. There are also the corresponding
-  modification operations |*=,+=,-=,^=|.}*/
-
-  Nef_polyhedron_3<Kernel,Items, Mark>  operator*(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const 
-  { return intersection(N1); }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>  operator+(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return join(N1); }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>  operator-(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return difference(N1); }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>  operator^(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return symmetric_difference(N1); }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>  operator!() const
-  { return complement(); }
-   
-  Nef_polyhedron_3<Kernel,Items, Mark>& operator*=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
-  { 
-#ifdef CGAL_NEF_VISUAL_HULL
-    CGAL_NEF_SETDTHREAD(19*43*71);
-    std::cerr << "visual hull code " << std::endl;
-    std::cerr << *this << std::endl;
-    std::cerr << const_cast<Nef_polyhedron&>(N1) << std::endl;
-    AND _and;
-    typename CGAL::Modifying_binary_operation<SNC_structure> 
-      mbo(this->snc());
-    mbo(const_cast<SNC_structure&>(N1.snc()), N1.pl(), pl(), _and);
-    return *this;
-#else
-    *this = intersection(N1); return *this; 
-#endif
-  }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>& operator+=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
-  { *this = join(N1); return *this; }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>& operator-=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
-  { *this = difference(N1); return *this; }
-
-  Nef_polyhedron_3<Kernel,Items, Mark>& operator^=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
-  { *this = symmetric_difference(N1); return *this; }
-
-  /*{\Mtext There are also comparison operations like |<,<=,>,>=,==,!=|
-  which implement the relations subset, subset or equal, superset, superset
-  or equal, equality, inequality.}*/
-
-  bool operator==(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { CGAL_NEF_TRACEN(" equality comparision between nef3 "<<&*this<<" and "<<&N1);
-    return symmetric_difference(N1).is_empty(); }
-
-  bool operator!=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { CGAL_NEF_TRACEN(" inequality comparision between nef3 "<<&*this<<" and "<<&N1);
-    return !operator==(N1); }  
-
-  bool operator<(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return !N1.difference(*this).is_empty() && difference(N1).is_empty(); } 
-
-  bool operator>(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return difference(*this).is_empty() && !difference(N1).is_empty(); } 
-
-  bool operator<=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return difference(N1).is_empty(); } 
-
-  bool operator>=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
-  { return N1.difference(*this).is_empty(); } 
-
-
- bool is_90degree_rotation(const Aff_transformation_3& aff) const {
-   if(aff.hm(0,3) != 0) return false;
-   if(aff.hm(1,3) != 0) return false;
-   if(aff.hm(2,3) != 0) return false;
-   if(CGAL_NTS abs(aff.hm(0,0)) + 
-      CGAL_NTS abs(aff.hm(0,1)) + 
-      CGAL_NTS abs(aff.hm(0,2)) != aff.hm(3,3)) return false;
-   if(CGAL_NTS abs(aff.hm(1,0)) + 
-      CGAL_NTS abs(aff.hm(1,1)) + 
-      CGAL_NTS abs(aff.hm(1,2)) != aff.hm(3,3)) return false;
-   if(CGAL_NTS abs(aff.hm(2,0)) + 
-      CGAL_NTS abs(aff.hm(2,1)) + 
-      CGAL_NTS abs(aff.hm(2,2)) != aff.hm(3,3)) return false;
-   if(CGAL_NTS abs(aff.hm(0,0)) + 
-      CGAL_NTS abs(aff.hm(1,0)) + 
-      CGAL_NTS abs(aff.hm(2,0)) != aff.hm(3,3)) return false;
-   if(CGAL_NTS abs(aff.hm(0,1)) + 
-      CGAL_NTS abs(aff.hm(1,1)) + 
-      CGAL_NTS abs(aff.hm(2,1)) != aff.hm(3,3)) return false;
-   if(CGAL_NTS abs(aff.hm(0,2)) + 
-      CGAL_NTS abs(aff.hm(1,2)) + 
-      CGAL_NTS abs(aff.hm(2,2)) != aff.hm(3,3)) return false;
-   return true;
- }
-
- bool is_scaling(const Aff_transformation_3& aff) const {
-   if(aff.hm(0,3) != 0) return false;
-   if(aff.hm(1,3) != 0) return false;
-   if(aff.hm(2,3) != 0) return false;   
-   if(aff.hm(0,1) != 0) return false;
-   if(aff.hm(0,2) != 0) return false;
-   if(aff.hm(1,0) != 0) return false;   
-   if(aff.hm(1,2) != 0) return false;
-   if(aff.hm(2,0) != 0) return false;
-   if(aff.hm(2,1) != 0) return false;
-   if(aff.hm(0,0) != aff.hm(1,1)) return false;
-   if(aff.hm(0,0) != aff.hm(2,2)) return false;
-   return true;
- }
-
- void change_orientation(bool full = false) {
-
-   Halffacet_handle ftemp;
-   Volume_handle vtemp;
-   SVertex_handle svtemp;
-   SHalfedge_handle setemp;
-   SFace_handle sftemp;
-
-   SVertex_iterator sv;
-   CGAL_forall_svertices(sv, snc()) {
-     sv->out_sedge() = sv->out_sedge()->twin();
-   }
-
-   SHalfedge_iterator se;
-   CGAL_forall_shalfedges(se, snc()) {
-     if(se->is_twin()) {
-       svtemp = se->source();
-       se->source() = se->twin()->source();
-       se->twin()->source() = svtemp;
-
-       if(full) {
-	 ftemp = se->facet();
-	 se->facet() = se->twin()->facet();
-	 se->twin()->facet() = ftemp;
-       }
-       //       sftemp = se->incident_sface();
-       //       se->incident_sface() = se->twin()->incident_sface();
-       //       se->twin()->incident_sface() = sftemp;
-     }
-       
-     setemp = se->sprev();
-     se->sprev() = se->snext();
-     se->snext() = setemp;
-
-     se->circle() = se->circle().opposite();
-
-     if(full) {
-       setemp = se->prev();
-       se->prev() = se->next();
-       se->next() = setemp;
-     }
-   }
-
-   if(full) {
-     Halffacet_iterator f;
-     CGAL_forall_facets(f, snc()) {
-       vtemp  = f->incident_volume();
-       f->incident_volume() = f->twin()->incident_volume();
-       f->twin()->incident_volume() = vtemp;
-       Halffacet_cycle_iterator fc(f->facet_cycles_begin()),
-	 fct(f->twin()->facet_cycles_begin());
-       while(fc!=f->facet_cycles_end()) {
-	 CGAL_assertion(fct!=f->twin()->facet_cycles_end());
-	 if(fc.is_shalfedge()) {
-	   CGAL_assertion(fct.is_shalfedge());
-	   setemp = fc;
-	   *fc = *fct;
-	   *fct = make_object(setemp);
-	 }
-	 ++fc;
-	 ++fct;
-       }
-     }
-   
-     CGAL_forall_halffacets(f, snc()) {
-       Halffacet_cycle_iterator fc(f->facet_cycles_begin());
-       for(;fc!=f->facet_cycles_end();++fc) {
-	 if(fc.is_shalfedge()) {
-	   setemp = fc;
-	   SHalfedge_around_facet_circulator hfc(setemp),hend(hfc);
-	   ++hfc;
-	   CGAL_For_all(hfc,hend) {
-	     if ( CGAL::lexicographically_xyz_smaller(hfc->source()->source()->point(),
-						      setemp->source()->source()->point()))
-	       setemp = hfc;
-	   }
-	   *fc = make_object(setemp);
-	 }
-       }
-     }
-   }
- }
-
-  void transform( const Aff_transformation_3& aff) {
-    
-    if( this->is_shared())
-      clone_rep();
-    // only linear transform for the origin-centered sphere maps
-    Aff_transformation_3 linear( aff.hm(0,0), aff.hm(0,1), aff.hm(0,2),
-				 aff.hm(1,0), aff.hm(1,1), aff.hm(1,2),
-				 aff.hm(2,0), aff.hm(2,1), aff.hm(2,2),
-				 aff.hm(3,3));
-    
-    SNC_constructor cstr(snc());
-    
-    std::list<Vertex_handle> vertex_list;
-    std::list<Vertex_handle> corner_list;
-    std::list<Vertex_handle> delete_list;
-    typename std::list<Vertex_handle>::iterator li;
-    typename std::list<Vertex_handle>::iterator li2;
-
-    bool ninety = is_90degree_rotation(aff);
-    bool scale = is_scaling(aff);
-
-    Vertex_iterator vi;
-    CGAL_forall_vertices( vi, snc()) {
-      
-      CGAL_NEF_TRACEN("transform vertex ");
-      if(scale) {
-	if(is_standard(vi))
-	  vi->point() = vi->point().transform( aff);
-	else if(!Infi_box::is_infibox_corner(vi->point())) {
-	  vi->point() = normalized(Infi_box::normalize_transformed_vertex(vi->point().transform(aff)));
-	}
-      } else if (!is_standard(vi) && !ninety) {
-	if(Infi_box::is_infibox_corner(vi->point()))
-	  corner_list.push_back(vi);
-	vertex_list.push_back(vi);
-      } else {
-	vi->point() = vi->point().transform( aff);
-	SM_decorator sdeco(&*vi);
-	sdeco.transform( linear);
-      }
-    }
-
-    if(!this->is_bounded() && !ninety && !scale) {
-      Halffacet_iterator fi;
-      CGAL_forall_facets(fi, snc()) {
-	if(!is_standard(fi) || is_bounded(fi)) continue;
-	Plane_3 pt = fi->plane();
-	pt = pt.transform(aff);
-	std::list<Point_3> points(Infi_box::find_points_of_box_with_plane(cstr,pt));
-	std::list<Vertex_handle> newVertices;
-	newVertices = Infi_box::create_vertices_on_infibox(cstr,
-							   pt, points, fi->mark(), 
-							   fi->twin()->incident_volume()->mark(), 
-							   fi->incident_volume()->mark());
-
-	for(li = newVertices.begin(); li != newVertices.end(); ++li) {
-	  if(Infi_box::is_infibox_corner((*li)->point())) {
-	    li2 = corner_list.begin();
-	    while(li2 != corner_list.end() && (*li2)->point() != (*li)->point()) ++li2;
-	    CGAL_assertion(li2 != corner_list.end());
-	    delete_list.push_back(*li2);
-	    *li2 = *li;
-	  }
-	}
-      }
-      
-      for(li = vertex_list.begin(); li != vertex_list.end();++li) {
-	SM_decorator SD(&**li);
-	if(Infi_box::is_complex_facet_infibox_intersection(**li)) {
-	  Halffacet_handle hf[2];
-	  int i=0;
-	  SHalfedge_iterator sei;
-	  CGAL_forall_sedges(sei,SD) {
-	    if(!Infi_box::is_sedge_on_infibox(sei)) {
-	      hf[i] = sei->facet();
-	      if(hf[i]->is_twin()) hf[i] = hf[i]->twin();
-	      ++i;
-	    }
-	    if(i>1)
-	      break;
-	  }
-	}
-      }
-
-      Association A;
-      SNC_external_structure es(snc());
-      es.clear_external_structure();
-      for(li = vertex_list.begin(); li != vertex_list.end();++li){
-	if(Infi_box::is_complex_facet_infibox_intersection(**li)) {
-	  Vertex_handle v2;
-	  Vertex_handle v1 = cstr.create_for_infibox_overlay(*li);
-	  v1->point() = normalized(Infi_box::normalize_transformed_vertex((*li)->point().transform(aff)));
-	  SM_decorator sdeco(&*v1);
-	  sdeco.transform(linear);	    
-	  switch(Infi_box::type_of_infibox_point(v1->point())) {
-	  case 1: 
-	    v2 = cstr.create_from_point_on_infibox_facet(v1->point()); 
-	    break;
-	  case 2: 
-	    v2 = cstr.create_from_point_on_infibox_edge(v1->point());
-	    break;
-	  case 3: 
-	    v2 = cstr.create_from_point_on_infibox_vertex(v1->point());
-	    li2 = corner_list.begin();
-	    while(li2 != corner_list.end() && (*li2)->point() != v2->point()) ++li2;
-	    if(li2 != corner_list.end())
-	      delete_list.push_back(*li2);
-	    break;
-	  default: CGAL_error_msg( "wrong value");
-	  }
-	  Vertex_handle v = snc().new_vertex(v1->point(), (*li)->mark());
-	  SM_overlayer O(&*v);
-	  O.subdivide(&*v1, &*v2, A);
-	  AND _and;
-	  O.select(_and);
-	  O.simplify(A);
-	  snc().delete_vertex(v1);
-	  snc().delete_vertex(v2);
-	}
-	
-	if(Infi_box::is_infibox_corner((*li)->point())) {
-	  SM_decorator SD(&**li);
-	  if(SD.number_of_svertices() < 4)
-	    continue;
-	  li2 = corner_list.begin();
-	  while(li2 != corner_list.end() && (*li2)->point() != (*li)->point()) ++li2;
-	  CGAL_assertion(li2 != corner_list.end());
-	  if(*li == *li2) {
-	    delete_list.push_back(*li2);
-	    *li2 = cstr.create_from_point_on_infibox_vertex((*li)->point());
-	  }
-	} else 
-	  snc().delete_vertex(*li);	  
-      }
-
-      for(li = delete_list.begin(); li != delete_list.end(); ++li)
-	snc().delete_vertex(*li);
-
-      if(!aff.is_even())
-	change_orientation();
-
-      while(cstr.erase_redundant_vertices()) ;
-      cstr.correct_infibox_sedge_marks();
-
-      build_external_structure();
-      cstr.correct_infibox_sface_marks();
-
-      // are the upcoming lines necessary? 
-      SNC_point_locator* old_pl = pl();
-      pl() = pl()->clone();
-      pl()->initialize(&snc());
-      delete old_pl;   
-
-    } else {
-      Halffacet_iterator fi;
-      CGAL_forall_halffacets(fi,snc()) {
-	if(is_standard(fi) || ninety) {
-	  fi->plane() = fi->plane().transform( aff);
-#ifdef CGAL_NEF3_FACET_WITH_BOX 
-	  typedef typename Halffacet::Box Box;
-	  bool first = true;
-	  Halffacet_cycle_iterator cycle_it = fi->facet_cycles_begin();
-	  if( cycle_it.is_shalfedge() ) {
-	    SHalfedge_iterator edge_it(cycle_it);
-	    SHalfedge_around_facet_circulator
-	      start( edge_it ), end( edge_it );
-	    CGAL_For_all( start, end ) {
-	      const Point_3& p = start->source()->source()->point();
-	      typename Kernel::FT q[3];
-	      q[0] = p.x();
-	      q[1] = p.y();
-	      q[2] = p.z();
-	      if(first) {
-		fi->b = Box(q,q);
-		first = false;
-	      } else
-		fi->b.extend(q);
-	    }
-	  } else
-	    CGAL_error_msg( "is facet first cycle a SHalfloop?"); 
-#endif
-	}
-      }    
-
-      if(!aff.is_even())
-	change_orientation(true);
-
-      if(aff.homogeneous(0,1) != 0 ||
-	 aff.homogeneous(0,2) != 0 ||
-	 aff.homogeneous(1,0) != 0 ||
-	 aff.homogeneous(1,2) != 0 ||
-	 aff.homogeneous(2,0) != 0 ||
-	 aff.homogeneous(2,1) != 0 ||
-	 aff.homogeneous(0,0) != aff.homogeneous(1,1) ||
-	 aff.homogeneous(0,0) != aff.homogeneous(2,2) ||
-	 !this->is_bounded()) {
-	   SNC_point_locator* old_pl = pl();
-	   pl() = pl()->clone();
-	   pl()->initialize(&snc());
-	   delete old_pl;   
-	 }
-      else pl()->transform(aff); 
-    }
-
-    SNC_constructor C(snc());
-    C.assign_indices(); 
-  }
-  
-  /*{\Mtext \headerline{Exploration}
-  As Nef polyhedra are the result of forming complements 
-  and intersections starting from a set |H| of halfspaces which are
-  defined by oriented planes in three space. The corresponding 
-  structure is represented by an extended wuerzburg structure 
-  $W = (V,E,F,C)$. For topological queries within |W| the following 
-  types and operations allow exploration access to this structure.}*/
-
-  /*{\Mtypes 3}*/
-    
-    typedef CGAL::SNC_SM_explorer<SM_const_decorator>  SM_explorer;
-
-    SM_explorer SMexplorer(Vertex_const_handle v) const { 
-      SM_const_decorator SMCD(&*v);
-      return SM_explorer(SMCD); 
-    }
-
-  typedef typename SNC_structure::Object_list Object_list;
-  typedef typename SNC_structure::Object_handle Object_handle;
-  /*{\Mtypemember a generic handle to an object of the underlying
-  plane map. The kind of object |(vertex, halfedge, face)| can 
-  be determined and the object can be assigned to a corresponding
-  handle by the three functions:\\
-  |bool assign(Vertex_const_handle& h, Object_handle)|\\
-  |bool assign(Edge_const_handle& h, Object_handle)|\\
-  |bool assign(Facet_const_handle& h, Object_handle)|\\
-  |bool assign(Volume_const_handle& h, Object_handle)|\\
-  where each function returns |true| iff the assignment to
-  |h| was done.}*/
-
-  /*{\Moperations 3 1 }*/
-
-  bool contains(Object_handle /*h*/) const
-  /*{\Mop  returns true iff the object |h| is contained in the set
-  represented by |\Mvar|.}*/
-    // { SNC_point_locator PL(snc()); return PL.mark(h);} 
-    { CGAL_error_msg( "not implemented."); return false;}
-
-  bool contained_in_boundary(Object_handle h) const
-  /*{\Mop  returns true iff the object |h| is contained in the $2$-skeleton
-  of |\Mvar|.}*/
-  { Vertex_const_handle v;
-    Halfedge_const_handle e;
-    Halffacet_const_handle f;
-    return  ( assign(v,h) || assign(e,h) || assign(f,h) );
-  }
-
-  Object_handle locate(const Point_3& p) const
-  /*{\Mop  returns a generic handle |h| to an object (vertex, edge, facet,
-  volume) of the underlying SNC which contains the point |p| in its relative 
-  interior. The point |p| is contained in the set represented by |\Mvar| if 
-  |\Mvar.contains(h)| is true.}*/ {
-    CGAL_NEF_TRACEN( "locating point...");
-    CGAL_assertion( pl() != NULL);
-
-    Object_handle o = pl()->locate(p);
-    
-    Vertex_handle v;
-    Halfedge_handle e;
-    Halffacet_handle f;
-    Volume_handle c;
-    if(assign(v,o)) return make_object(Vertex_const_handle(v));
-    if(assign(e,o)) return make_object(Halfedge_const_handle(e));
-    if(assign(f,o)) return make_object(Halffacet_const_handle(f));
-    if(assign(c,o)) return make_object(Volume_const_handle(c));
-
-    return Object_handle();
-  }
-
-  /*{\Mimplementation Nef polyhedra are implemented on top of an
-  extended Wuerzburg structure data structure (EWS) and use linear
-  space in the number of vertices, edges and facets.  Operations like
-  empty take constant time. The operations clear, complement, interior,
-  closure, boundary, regularization, input and output take linear
-  time. All binary set operations and comparison operations take time
-  $O(N^2)$ where $N$ is the size of the output plus the size of the
-  input.
-
-  The point location operations run in linear query time without any 
-  preprocessing.}*/
-
-  /*{\Mexample Nef polyhedra are parameterized by a so called extended
-  geometric kernel. There's currently only one such kernel based on a
-  homogeneous representation of extended points called
-  |Extended_homogeneous<NT>|.  The kernel is parameterized by a
-  multiprecision integer type. The member types of |Nef_polyhedron_3<
-  Extended_homogeneous_3<NT> >| map to corresponding types of the CGAL
-  geometry kernel (e.g. |Nef_polyhedron::Plane_3| equals
-  |CGAL::Homogeneous<leda_integer>::Plane_3| in the example below).
-  \begin{Mverb}
-  #include <CGAL/basic.h>
-  #include <CGAL/leda_integer.h>
-  #include <CGAL/Extended_homogeneous.h>
-  #include <CGAL/Nef_polyhedron_3.h>
-
-  using namespace CGAL;
-  typedef  Extended_homogeneous<leda_integer>   Extended_kernel;
-  typedef  Nef_polyhedron_3<Extended_kernel>    Nef_polyhedron;
-  typedef  Nef_polyhedron::Plane_3              Plane_3;
-
-  int main()
-  {
-    Nef_polyhedron N1(Plane_3(1,0,0,0));
-    Nef_polyhedron N2(Plane_3(0,1,0,0), Nef_polyhedron::EXCLUDED);
-    Nef_polyhedron N3 = N1 * N2; // line (*)
-    return 0;
-  }
-  \end{Mverb}
-  After line (*) |N3| is the intersection of |N1| and |N2|.}*/
-
-  std::size_t bytes() {
-    // bytes used for the Nef_polyhedron_3.
-    return sizeof(Self) + (snc().bytes() - sizeof(SNC_structure));
-  }
-
-  std::size_t bytes_reduced() {
-    // bytes used for the Nef_polyhedron_3.
-    std::cout << sizeof(Self) + (snc().bytes_reduced2() - sizeof(SNC_structure)) << std::endl;
-    return sizeof(Self) + (snc().bytes_reduced() - sizeof(SNC_structure));
-  }
-
-}; // end of Nef_polyhedron_3
-
-template <typename Kernel, typename Items, typename Mark>
-Nef_polyhedron_3<Kernel,Items, Mark>::
-Nef_polyhedron_3( Content space) {
-  CGAL_NEF_TRACEN("construction from empty or space.");
-  empty_rep();
-  set_snc(snc());
-  if(Infi_box::extended_kernel()) {
-    initialize_infibox_vertices(space);
-    build_external_structure();
-  } else {
-    build_external_structure();
-    snc().volumes_begin()->mark() = (space == COMPLETE) ? 1 : 0;
-  }
-}
-
-template <typename Kernel, typename Items, typename Mark>
-Nef_polyhedron_3<Kernel,Items, Mark>::
-Nef_polyhedron_3(const Plane_3& h, Boundary b) {
-  CGAL_NEF_TRACEN("construction from plane "<<h);
-  empty_rep();
-  set_snc(snc());
-  SNC_constructor C(snc());
-  Infi_box::create_vertices_of_box_with_plane(C,h,(b==INCLUDED));
-  build_external_structure();
-  /*
-  if(Infi_box::extended_kernel()) {
-    SNC_structure snc1, snc2;
-    SNC_point_locator* pl1 = new SNC_point_locator_default; 
-    SNC_point_locator* pl2 = new SNC_point_locator_default; 
-
-    SNC_constructor c1(snc1); 
-    Infi_box::initialize_infibox_vertices(c1, true);
-    SNC_external_structure es1(snc1, pl1);
-    es1.build_external_structure();
-
-    SNC_constructor c2(snc2);
-    c2.create_vertices_for_halfspace(h, b);
-    SNC_external_structure es2(snc2, pl2);
-    es2.pair_up_halfedges();
-    es2.link_shalfedges_to_facet_cycles();
-    c2.create_facets_and_volumes_of_halfspace(h);
-    pl2->initialize(&snc2);
-
-    AND _and;
-    Binary_operation bo(snc());
-    bo(pl(), snc1, pl1, snc2, pl2, _and);
-    
-    delete pl1;
-    delete pl2;
-  } else
-    CGAL_error_msg
-      ("Constructor is only available with extended kernels");
-  */
-}
- 
-template <typename Kernel, typename Items, typename Mark>
-Nef_polyhedron_3<Kernel,Items, Mark>::
-Nef_polyhedron_3( const SNC_structure& W, SNC_point_locator* _pl, 
-		  bool clone_pl,
-		  bool clone_snc) {
-  CGAL_assertion( clone_snc == true || clone_pl == false);
-  // TODO: granados: define behavior when clone=false
-  //  CGAL_NEF_TRACEN("construction from an existing SNC structure (clone="<<clone<<")"); 
-
-  this->copy_on_write();
-  if(clone_snc) {
-    snc() = W;
-    set_snc(snc());
-  }
-  if(clone_pl) {
-    pl() = _pl->clone();
-    pl()->initialize(&snc());
-  } 
-  else
-    pl() = _pl;
-}
-
-template <typename Kernel, typename Items, typename Mark>
-void
-Nef_polyhedron_3<Kernel,Items, Mark>::
-extract_complement() {
-  CGAL_NEF_TRACEN("extract complement");
-  if( this->is_shared()) clone_rep();
-  SNC_decorator D(snc());
-  Vertex_iterator v;
-  CGAL_forall_vertices(v,D){
-    v->mark() = !v->mark(); 
-    SM_decorator SM(&*v);
-    SM.extract_complement();
-  }
-
-  Halffacet_iterator f;
-  CGAL_forall_halffacets(f,D) f->mark() = !f->mark(); 
- 
-  Volume_iterator c;
-  CGAL_forall_volumes(c,D) 
-    //    if(!(Infi_box::extended_kernel && c==D.volumes_begin()))
-      c->mark() = !c->mark();
-}
-
-template <typename Kernel, typename Items, typename Mark>
-void
-Nef_polyhedron_3<Kernel,Items, Mark>::
-extract_interior() {
-  CGAL_NEF_TRACEN("extract interior");
-  if (this->is_shared()) clone_rep();
-  SNC_decorator D(snc());
-  Vertex_iterator v;
-  CGAL_forall_vertices(v,D){
-    v->mark() = false;
-    SM_decorator SM(&*v);
-    SM.extract_interior();
-  }
-  Halffacet_iterator f;
-  CGAL_forall_halffacets(f,D) f->mark() = false;
-
-  simplify();
-}
-
-template <typename Kernel, typename Items, typename Mark>
-void
-Nef_polyhedron_3<Kernel,Items, Mark>::
-extract_boundary() {
-  CGAL_NEF_TRACEN("extract boundary");
-  if (this->is_shared()) clone_rep();
-  SNC_decorator D(snc());
-  Vertex_iterator v;
-  CGAL_forall_vertices(v,D) {
-    v->mark() = true;
-    SM_decorator SM(&*v);
-    SM.extract_boundary();
-  }
-  Halffacet_iterator f;
-  CGAL_forall_halffacets(f,D) f->mark() = true;
-  Volume_iterator c;
-  CGAL_forall_volumes(c,D) c->mark() = false;
-  simplify();
-}
-
-} //namespace CGAL
-
-#endif //CGAL_NEF_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/KernelD_converter.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/KernelD_converter.h
deleted file mode 100644
index c0cbc94..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/KernelD_converter.h
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
-#define CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
-
-#include <CGAL/basic.h>
-#include <CGAL/tuple.h>
-#include <CGAL/typeset.h>
-#include <CGAL/Object.h>
-#include <CGAL/Origin.h>
-#include <CGAL/NT_converter.h>
-#include <CGAL/NewKernel_d/functor_tags.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/is_iterator.h>
-#include <CGAL/transforming_iterator.h>
-#include <boost/utility/enable_if.hpp>
-#include <boost/mpl/if.hpp>
-#include <CGAL/NewKernel_d/store_kernel.h>
-#include <CGAL/NewKernel_d/Kernel_object_converter.h>
-
-namespace CGAL {
-namespace internal {
-// Reverses order, but that shouldn't matter.
-template<class K,class T> struct Map_taglist_to_typelist :
-  Map_taglist_to_typelist<K,typename T::tail>::type
-  ::template add<typename Get_type<K, typename T::head>::type>
-{};
-template<class K> struct Map_taglist_to_typelist<K,typeset<> > : typeset<> {};
-}
-
-template<class List = typeset<> >
-struct Object_converter {
-	typedef Object result_type;
-	template<class F>
-	result_type operator()(Object const& o, F const& f) const {
-	  typedef typename List::head H;
-		if (H const* ptr = object_cast<H>(&o))
-			return make_object(f(*ptr));
-		else
-			return Object_converter<typename List::tail>()(o,f);
-	}
-};
-template<>
-struct Object_converter <typeset<> > {
-	typedef Object result_type;
-	template<class F>
-	result_type operator()(Object const&,F const&)const {
-		CGAL_error_msg("Cartesiand_converter is unable to determine what is wrapped in the Object");
-		return Object();
-	}
-};
-
-
-	//TODO: special case when K1==K2 (or they are very close?)
-template<class Final_, class K1, class K2, class List>
-class KernelD_converter_
-: public KernelD_converter_<Final_,K1,K2,typename List::tail>
-{
-	typedef typename List::head Tag_;
-	typedef typename List::tail Rest;
-	typedef KernelD_converter_<Final_,K1,K2,Rest> Base;
-	typedef typename Get_type<K1,Tag_>::type K1_Obj;
-	typedef typename Get_type<K2,Tag_>::type K2_Obj;
-	typedef typename Get_functor<K1, Convert_ttag<Tag_> >::type K1_Conv;
-	typedef KO_converter<Tag_,K1,K2> KOC;
-	typedef CGAL_BOOSTD is_same<K1_Conv, Null_functor> no_converter;
-	typedef typename internal::Map_taglist_to_typelist<K1,Rest>::type::template contains<K1_Obj> duplicate;
-
-	// Disable the conversion in some cases:
-	struct Do_not_use{};
-	typedef typename boost::mpl::if_c <
-	  // If Point==Vector, keep only one conversion
-	  duplicate::value ||
-	  // For iterator objects, the default is make_transforming_iterator
-	  (iterator_tag_traits<Tag_>::is_iterator && no_converter::value),
-	  Do_not_use,K1_Obj>::type argument_type;
-	//typedef typename KOC::argument_type K1_Obj;
-	//typedef typename KOC::result_type K2_Obj;
-	public:
-	using Base::operator(); // don't use directly, just make it accessible to the next level
-	K2_Obj helper(K1_Obj const& o,CGAL_BOOSTD true_type)const{
-		return KOC()(this->myself().kernel(),this->myself().kernel2(),this->myself(),o);
-	}
-	K2_Obj helper(K1_Obj const& o,CGAL_BOOSTD false_type)const{
-		return K1_Conv(this->myself().kernel())(this->myself().kernel2(),this->myself(),o);
-	}
-	K2_Obj operator()(argument_type const& o)const{
-	  return helper(o,no_converter());
-	}
-	template<class X,int=0> struct result:Base::template result<X>{};
-	template<int i> struct result<Final_(argument_type),i> {typedef K2_Obj type;};
-};
-
-template<class Final_, class K1, class K2>
-class KernelD_converter_<Final_,K1,K2,typeset<> > {
-	public:
-	struct Do_not_use2{};
-	void operator()(Do_not_use2)const{}
-	template<class T> struct result;
-	Final_& myself(){return *static_cast<Final_*>(this);}
-	Final_ const& myself()const{return *static_cast<Final_ const*>(this);}
-};
-
-
-// TODO: use the intersection of Kn::Object_list.
-template<class K1, class K2, class List_=
-typename typeset_intersection<typename K1::Object_list, typename K2::Object_list>::type
-//typeset<Point_tag>::add<Vector_tag>::type/*::add<Segment_tag>::type*/
-> class KernelD_converter
-	: public Store_kernel<K1>, public Store_kernel2<K2>,
-	public KernelD_converter_<KernelD_converter<K1,K2,List_>,K1,K2,List_>
-{
-	typedef KernelD_converter Self;
-	typedef Self Final_;
-	typedef KernelD_converter_<Self,K1,K2,List_> Base;
-	typedef typename Get_type<K1, FT_tag>::type FT1;
-	typedef typename Get_type<K2, FT_tag>::type FT2;
-	typedef NT_converter<FT1, FT2> NTc;
-	NTc c; // TODO: compressed storage as this is likely empty and the converter gets passed around (and stored in iterators)
-
-	public:
-	KernelD_converter(){}
-	KernelD_converter(K1 const&a,K2 const&b):Store_kernel<K1>(a),Store_kernel2<K2>(b){}
-
-	// For boost::result_of, used in transforming_iterator
-	template<class T,int i=is_iterator<T>::value?42:0> struct result:Base::template result<T>{};
-	template<class T> struct result<Final_(T),42> {
-		typedef transforming_iterator<Final_,T> type;
-	};
-	template<int i> struct result<Final_(K1),i>{typedef K2 type;};
-	template<int i> struct result<Final_(int),i>{typedef int type;};
-	// Ideally the next 2 would come with Point_tag and Vector_tag, but that's hard...
-	template<int i> struct result<Final_(Origin),i>{typedef Origin type;};
-	template<int i> struct result<Final_(Null_vector),i>{typedef Null_vector type;};
-	template<int i> struct result<Final_(Object),i>{typedef Object type;};
-	template<int i> struct result<Final_(FT1),i>{typedef FT2 type;};
-
-	using Base::operator();
-	typename Store_kernel2<K2>::reference2_type operator()(K1 const&)const{return this->kernel2();}
-	int operator()(int i)const{return i;}
-	Origin operator()(Origin const&o)const{return o;}
-	Null_vector operator()(Null_vector const&v)const{return v;}
-	FT2 operator()(FT1 const&x)const{return c(x);}
-	//RT2 operator()(typename First_if_different<RT1,FT1>::Type const&x)const{return cr(x);}
-
-	typename Get_type<K2, Flat_orientation_tag>::type const&
-	operator()(typename Get_type<K1, Flat_orientation_tag>::type const&o)const
-	{ return o; } // Both kernels should have the same, returning a reference should warn if not.
-
-	template<class It>
-	transforming_iterator<Final_,typename boost::enable_if<is_iterator<It>,It>::type>
-	operator()(It const& it) const {
-		return make_transforming_iterator(it,*this);
-	}
-
-	template<class T>
-	//TODO: use decltype in C++11 instead of result
-	std::vector<typename result<Final_(T)>::type>
-	operator()(const std::vector<T>& v) const {
-		return std::vector<typename result<Final_(T)>::type>(operator()(v.begin()),operator()(v.begin()));
-	}
-
-	//TODO: convert std::list and other containers?
-
-	Object
-	operator()(const Object &obj) const
-	{
-		typedef typename internal::Map_taglist_to_typelist<K1,List_>::type Possibilities;
-		//TODO: add Empty, vector<Point>, etc to the list.
-		return Object_converter<Possibilities>()(obj,*this);
-	}
-
-	//TODO: convert boost::variant
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_d_interface.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_d_interface.h
deleted file mode 100644
index c54391a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_d_interface.h
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KD_KERNEL_D_INTERFACE_H
-#define CGAL_KD_KERNEL_D_INTERFACE_H
-
-#include <CGAL/NewKernel_d/functor_tags.h>
-#include <CGAL/transforming_iterator.h>
-#include <CGAL/NewKernel_d/utils.h>
-#include <CGAL/tuple.h>
-
-
-namespace CGAL {
-template <class Base_> struct Kernel_d_interface : public Base_ {
-  CGAL_CONSTEXPR Kernel_d_interface(){}
-  CGAL_CONSTEXPR Kernel_d_interface(int d):Base_(d){}
-
-	typedef Base_ Base;
-	typedef Kernel_d_interface<Base> Kernel;
-	typedef Base_ R_; // for the macros
-	typedef typename Get_type<Base, RT_tag>::type RT;
-	typedef typename Get_type<Base, FT_tag>::type FT;
-	typedef typename Get_type<Base, Bool_tag>::type Boolean;
-	typedef typename Get_type<Base, Sign_tag>::type Sign;
-	typedef typename Get_type<Base, Comparison_result_tag>::type Comparison_result;
-	typedef typename Get_type<Base, Orientation_tag>::type Orientation;
-	typedef typename Get_type<Base, Oriented_side_tag>::type Oriented_side;
-	typedef typename Get_type<Base, Bounded_side_tag>::type Bounded_side;
-	typedef typename Get_type<Base, Angle_tag>::type Angle;
-	typedef typename Get_type<Base, Flat_orientation_tag>::type Flat_orientation_d;
-	typedef typename Get_type<Base, Point_tag>::type	Point_d;
-	typedef typename Get_type<Base, Vector_tag>::type	Vector_d;
-	typedef typename Get_type<Base, Segment_tag>::type	Segment_d;
-	typedef typename Get_type<Base, Sphere_tag>::type	Sphere_d;
-	typedef typename Get_type<Base, Hyperplane_tag>::type	Hyperplane_d;
-	typedef Vector_d Direction_d;
-	typedef typename Get_type<Base, Line_tag>::type	Line_d;
-	typedef typename Get_type<Base, Ray_tag>::type	Ray_d;
-	typedef typename Get_type<Base, Iso_box_tag>::type	Iso_box_d;
-	typedef typename Get_type<Base, Aff_transformation_tag>::type	Aff_transformation_d;
-	typedef typename Get_functor<Base, Compute_point_cartesian_coordinate_tag>::type Compute_coordinate_d;
-	typedef typename Get_functor<Base, Compare_lexicographically_tag>::type Compare_lexicographically_d;
-	typedef typename Get_functor<Base, Equal_points_tag>::type Equal_d;
-	typedef typename Get_functor<Base, Less_lexicographically_tag>::type Less_lexicographically_d;
-	typedef typename Get_functor<Base, Less_or_equal_lexicographically_tag>::type Less_or_equal_lexicographically_d;
-	// FIXME: and vectors?
-	typedef typename Get_functor<Base, Orientation_of_points_tag>::type Orientation_d;
-	typedef typename Get_functor<Base, Less_point_cartesian_coordinate_tag>::type Less_coordinate_d;
-	typedef typename Get_functor<Base, Point_dimension_tag>::type Point_dimension_d;
-	typedef typename Get_functor<Base, Side_of_oriented_sphere_tag>::type Side_of_oriented_sphere_d;
-	typedef typename Get_functor<Base, Contained_in_affine_hull_tag>::type Contained_in_affine_hull_d;
-	typedef typename Get_functor<Base, Construct_flat_orientation_tag>::type Construct_flat_orientation_d;
-	typedef typename Get_functor<Base, In_flat_orientation_tag>::type In_flat_orientation_d;
-	typedef typename Get_functor<Base, In_flat_side_of_oriented_sphere_tag>::type In_flat_side_of_oriented_sphere_d;
-	typedef typename Get_functor<Base, Point_to_vector_tag>::type Point_to_vector_d;
-	typedef typename Get_functor<Base, Vector_to_point_tag>::type Vector_to_point_d;
-	typedef typename Get_functor<Base, Scaled_vector_tag>::type Scaled_vector_d;
-	typedef typename Get_functor<Base, Difference_of_vectors_tag>::type Difference_of_vectors_d;
-	typedef typename Get_functor<Base, Difference_of_points_tag>::type Difference_of_points_d;
-	typedef typename Get_functor<Base, Construct_ttag<Point_tag> >::type Construct_point_d;
-	typedef typename Get_functor<Base, Construct_ttag<Vector_tag> >::type Construct_vector_d;
-	typedef typename Get_functor<Base, Construct_ttag<Segment_tag> >::type Construct_segment_d;
-	typedef typename Get_functor<Base, Construct_ttag<Sphere_tag> >::type Construct_sphere_d;
-	typedef typename Get_functor<Base, Construct_ttag<Hyperplane_tag> >::type Construct_hyperplane_d;
-	typedef Construct_vector_d Construct_direction_d;
-	typedef typename Get_functor<Base, Construct_ttag<Line_tag> >::type Construct_line_d;
-	typedef typename Get_functor<Base, Construct_ttag<Ray_tag> >::type Construct_ray_d;
-	typedef typename Get_functor<Base, Construct_ttag<Iso_box_tag> >::type Construct_iso_box_d;
-	typedef typename Get_functor<Base, Construct_ttag<Aff_transformation_tag> >::type Construct_aff_transformation_d;
-	typedef typename Get_functor<Base, Midpoint_tag>::type Midpoint_d;
-	struct Component_accessor_d : private Store_kernel<Kernel> {
-	  typedef Kernel R_; // for the macro
-	  CGAL_FUNCTOR_INIT_STORE(Component_accessor_d)
-	  int dimension(Point_d const&p){
-	    return this->kernel().point_dimension_d_object()(p);
-	  }
-	  FT cartesian(Point_d const&p, int i){
-	    return this->kernel().compute_coordinate_d_object()(p,i);
-	  }
-	  RT homogeneous(Point_d const&p, int i){
-	    if (i == dimension(p))
-	      return 1;
-	    return cartesian(p, i);
-	  }
-	};
-	struct Construct_cartesian_const_iterator_d : private Store_kernel<R_> {
-	  CGAL_FUNCTOR_INIT_STORE(Construct_cartesian_const_iterator_d)
-	  typedef typename Get_functor<Base, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
-	  typedef typename Get_functor<Base, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
-	  // FIXME: The following sometimes breaks compilation. The typedef below forces instantiation of this, which forces Point_d, which itself (in the wrapper) needs the derived kernel to tell it what the base kernel is, and that's a cycle. The exact circumstances are not clear, g++ and clang++ are ok in both C++03 and C++11, it is only clang in C++11 without CGAL_CXX11 that breaks. For now, rely on result_type.
-	  //typedef typename CGAL::decay<typename boost::result_of<CPI(Point_d,CGAL::Begin_tag)>::type>::type result_type;
-	  typedef typename CGAL::decay<typename CPI::result_type>::type result_type;
-	  // Kernel_d requires a common iterator type for points and vectors
-	  // TODO: provide this mixed functor in preKernel?
-	  //CGAL_static_assertion((boost::is_same<typename CGAL::decay<typename boost::result_of<CVI(Vector_d,CGAL::Begin_tag)>::type>::type, result_type>::value));
-	  CGAL_static_assertion((boost::is_same<typename CGAL::decay<typename CVI::result_type>::type, result_type>::value));
-	  template <class Tag_>
-	  result_type operator()(Point_d const&p, Tag_ t)const{
-	    return CPI(this->kernel())(p,t);
-	  }
-	  template <class Tag_>
-	  result_type operator()(typename First_if_different<Vector_d,Point_d>::Type const&v, Tag_ t)const{
-	    return CVI(this->kernel())(v,t);
-	  }
-
-	  template <class Obj>
-	  result_type operator()(Obj const&o)const{
-	    return operator()(o, Begin_tag());
-	  }
-	  result_type operator()(Point_d const&p, int)const{
-	    return operator()(p, End_tag());
-	  }
-	  result_type operator()(typename First_if_different<Vector_d,Point_d>::Type const&v, int)const{
-	    return operator()(v, End_tag());
-	  }
-	};
-	typedef typename Construct_cartesian_const_iterator_d::result_type Cartesian_const_iterator_d;
-	typedef typename Get_functor<Base, Squared_distance_tag>::type Squared_distance_d;
-	typedef typename Get_functor<Base, Squared_length_tag>::type Squared_length_d;
-	typedef typename Get_functor<Base, Scalar_product_tag>::type Scalar_product_d;
-	typedef typename Get_functor<Base, Affine_rank_tag>::type Affine_rank_d;
-	typedef typename Get_functor<Base, Affinely_independent_tag>::type Affinely_independent_d;
-	typedef typename Get_functor<Base, Contained_in_linear_hull_tag>::type Contained_in_linear_hull_d;
-	typedef typename Get_functor<Base, Contained_in_simplex_tag>::type Contained_in_simplex_d;
-	typedef typename Get_functor<Base, Has_on_positive_side_tag>::type Has_on_positive_side_d;
-	typedef typename Get_functor<Base, Linear_rank_tag>::type Linear_rank_d;
-	typedef typename Get_functor<Base, Linearly_independent_tag>::type Linearly_independent_d;
-	typedef typename Get_functor<Base, Oriented_side_tag>::type Oriented_side_d;
-	typedef typename Get_functor<Base, Side_of_bounded_sphere_tag>::type Side_of_bounded_sphere_d;
-
-	typedef typename Get_functor<Base, Center_of_sphere_tag>::type Center_of_sphere_d;
-	typedef typename Get_functor<Base, Value_at_tag>::type Value_at_d;
-	typedef typename Get_functor<Base, Point_of_sphere_tag>::type Point_of_sphere_d;
-	typedef typename Get_functor<Base, Orthogonal_vector_tag>::type Orthogonal_vector_d;
-	typedef typename Get_functor<Base, Linear_base_tag>::type Linear_base_d;
-	typedef typename Get_functor<Base, Construct_min_vertex_tag>::type Construct_min_vertex_d;
-	typedef typename Get_functor<Base, Construct_max_vertex_tag>::type Construct_max_vertex_d;
-
-	//TODO:
-	//typedef ??? Intersect_d;
-
-
-	Compute_coordinate_d compute_coordinate_d_object()const{ return Compute_coordinate_d(*this); }
-	Has_on_positive_side_d has_on_positive_side_d_object()const{ return Has_on_positive_side_d(*this); }
-	Compare_lexicographically_d compare_lexicographically_d_object()const{ return Compare_lexicographically_d(*this); }
-	Equal_d equal_d_object()const{ return Equal_d(*this); }
-	Less_lexicographically_d less_lexicographically_d_object()const{ return Less_lexicographically_d(*this); }
-	Less_or_equal_lexicographically_d less_or_equal_lexicographically_d_object()const{ return Less_or_equal_lexicographically_d(*this); }
-	Less_coordinate_d less_coordinate_d_object()const{ return Less_coordinate_d(*this); }
-	Orientation_d orientation_d_object()const{ return Orientation_d(*this); }
-	Oriented_side_d oriented_side_d_object()const{ return Oriented_side_d(*this); }
-	Point_dimension_d point_dimension_d_object()const{ return Point_dimension_d(*this); }
-	Point_of_sphere_d point_of_sphere_d_object()const{ return Point_of_sphere_d(*this); }
-	Side_of_oriented_sphere_d side_of_oriented_sphere_d_object()const{ return Side_of_oriented_sphere_d(*this); }
-	Side_of_bounded_sphere_d side_of_bounded_sphere_d_object()const{ return Side_of_bounded_sphere_d(*this); }
-	Contained_in_affine_hull_d contained_in_affine_hull_d_object()const{ return Contained_in_affine_hull_d(*this); }
-	Contained_in_linear_hull_d contained_in_linear_hull_d_object()const{ return Contained_in_linear_hull_d(*this); }
-	Contained_in_simplex_d contained_in_simplex_d_object()const{ return Contained_in_simplex_d(*this); }
-	Construct_flat_orientation_d construct_flat_orientation_d_object()const{ return Construct_flat_orientation_d(*this); }
-	In_flat_orientation_d in_flat_orientation_d_object()const{ return In_flat_orientation_d(*this); }
-	In_flat_side_of_oriented_sphere_d in_flat_side_of_oriented_sphere_d_object()const{ return In_flat_side_of_oriented_sphere_d(*this); }
-	Point_to_vector_d point_to_vector_d_object()const{ return Point_to_vector_d(*this); }
-	Vector_to_point_d vector_to_point_d_object()const{ return Vector_to_point_d(*this); }
-	Scaled_vector_d scaled_vector_d_object()const{ return Scaled_vector_d(*this); }
-	Difference_of_vectors_d difference_of_vectors_d_object()const{ return Difference_of_vectors_d(*this); }
-	Difference_of_points_d difference_of_points_d_object()const{ return Difference_of_points_d(*this); }
-	Affine_rank_d affine_rank_d_object()const{ return Affine_rank_d(*this); }
-	Affinely_independent_d affinely_independent_d_object()const{ return Affinely_independent_d(*this); }
-	Linear_base_d linear_base_d_object()const{ return Linear_base_d(*this); }
-	Linear_rank_d linear_rank_d_object()const{ return Linear_rank_d(*this); }
-	Linearly_independent_d linearly_independent_d_object()const{ return Linearly_independent_d(*this); }
-	Midpoint_d midpoint_d_object()const{ return Midpoint_d(*this); }
-	Value_at_d value_at_d_object()const{ return Value_at_d(*this); }
-	/// Intersect_d intersect_d_object()const{ return Intersect_d(*this); }
-	Component_accessor_d component_accessor_d_object()const{ return Component_accessor_d(*this); }
-	Orthogonal_vector_d orthogonal_vector_d_object()const{ return Orthogonal_vector_d(*this); }
-	Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object()const{ return Construct_cartesian_const_iterator_d(*this); }
-	Construct_point_d construct_point_d_object()const{ return Construct_point_d(*this); }
-	Construct_vector_d construct_vector_d_object()const{ return Construct_vector_d(*this); }
-	Construct_segment_d construct_segment_d_object()const{ return Construct_segment_d(*this); }
-	Construct_sphere_d construct_sphere_d_object()const{ return Construct_sphere_d(*this); }
-	Construct_hyperplane_d construct_hyperplane_d_object()const{ return Construct_hyperplane_d(*this); }
-	Squared_distance_d squared_distance_d_object()const{ return Squared_distance_d(*this); }
-	Squared_length_d squared_length_d_object()const{ return Squared_length_d(*this); }
-	Scalar_product_d scalar_product_d_object()const{ return Scalar_product_d(*this); }
-	Center_of_sphere_d center_of_sphere_d_object()const{ return Center_of_sphere_d(*this); }
-	Construct_direction_d construct_direction_d_object()const{ return Construct_direction_d(*this); }
-	Construct_line_d construct_line_d_object()const{ return Construct_line_d(*this); }
-	Construct_ray_d construct_ray_d_object()const{ return Construct_ray_d(*this); }
-	Construct_iso_box_d construct_iso_box_d_object()const{ return Construct_iso_box_d(*this); }
-	Construct_aff_transformation_d construct_aff_transformation_d_object()const{ return Construct_aff_transformation_d(*this); }
-	Construct_min_vertex_d construct_min_vertex_d_object()const{ return Construct_min_vertex_d(*this); }
-	Construct_max_vertex_d construct_max_vertex_d_object()const{ return Construct_max_vertex_d(*this); }
-
-	// Dummies for those required functors missing a concept.
-	typedef Null_functor Position_on_line_d;
-	Position_on_line_d position_on_line_d_object()const{return Null_functor();}
-	typedef Null_functor Barycentric_coordinates_d;
-	Barycentric_coordinates_d barycentric_coordinates_d_object()const{return Null_functor();}
-
-	/* Not provided because they don't make sense here:
-	   Lift_to_paraboloid_d
-	   Project_along_d_axis_d
-	 */
-};
-}
-
-#endif // CGAL_KD_KERNEL_D_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/LA_eigen/constructors.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/LA_eigen/constructors.h
deleted file mode 100644
index 848aae5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/LA_eigen/constructors.h
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_LA_EIGEN_CONSTRUCTORS_H
-#define CGAL_LA_EIGEN_CONSTRUCTORS_H
-#include <CGAL/config.h>
-#ifndef CGAL_EIGEN3_ENABLED
-#error Requires Eigen
-#endif
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <CGAL/Dimension.h>
-#include <Eigen/Dense>
-#include <CGAL/iterator_from_indices.h>
-#include <CGAL/NewKernel_d/utils.h>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-
-namespace CGAL {
-  template <class Vector_> struct Construct_eigen {
-    typedef Vector_ result_type;
-    typedef typename Vector_::Scalar NT;
-
-    private:
-    static void check_dim(int CGAL_assertion_code(d)){
-      CGAL_assertion_code(int m = result_type::MaxSizeAtCompileTime;)
-      CGAL_assertion((m == Eigen::Dynamic) || (d <= m));
-    }
-    public:
-
-    struct Dimension {
-      // Initialize with NaN if possible?
-      result_type operator()(int d) const {
-	check_dim(d);
-	return result_type(d);
-      }
-    };
-
-    struct Iterator {
-      template<typename Iter>
-	result_type operator()(int d,Iter const& f,Iter const& e) const {
-	  check_dim(d);
-	  CGAL_assertion(d==std::distance(f,e));
-	  result_type a(d);
-	  // TODO: check the right way to do this
-	  std::copy(f,e,&a[0]);
-	  return a;
-	}
-    };
-
-#if 0
-    struct Iterator_add_one {
-      template<typename Iter>
-	result_type operator()(int d,Iter const& f,Iter const& e) const {
-	  check_dim(d);
-	  CGAL_assertion(d==std::distance(f,e)+1);
-	  result_type a(d);
-	  std::copy(f,e,&a[0]);
-	  a[d-1]=1;
-	  return a;
-	}
-    };
-#endif
-
-    struct Iterator_and_last {
-      template<typename Iter,typename T>
-	result_type operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
-	  check_dim(d);
-	  CGAL_assertion(d==std::distance(f,e)+1);
-	  result_type a(d);
-	  std::copy(f,e,&a[0]);
-	  a[d-1]=CGAL_FORWARD(T,t);
-	  return a;
-	}
-    };
-
-#ifdef CGAL_CXX11
-    struct Initializer_list {
-      // Fix T==NT?
-      template<class T>
-	result_type operator()(std::initializer_list<T> l) const {
-	  return Iterator()(l.size(),l.begin(),l.end());
-	}
-    };
-#endif
-
-    struct Values {
-#ifdef CGAL_CXX11
-      // TODO avoid going through Initializer_list which may cause extra copies. Possibly use forward_as_tuple.
-      template<class...U>
-	result_type operator()(U&&...u) const {
-	  check_dim(sizeof...(U)); // TODO: use static_assert
-	  return Initializer_list()({forward_safe<NT,U>(u)...});
-	}
-#else
-
-#define CGAL_CODE(Z,N,_) result_type operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-  check_dim(N); \
-  result_type a(N); \
-  a << BOOST_PP_ENUM_PARAMS(N,t); \
-  return a; \
-}
-BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-
-#endif
-    };
-
-    struct Values_divide {
-#ifdef CGAL_CXX11
-      template<class H,class...U>
-	result_type operator()(H const&h,U&&...u) const {
-	  check_dim(sizeof...(U)); // TODO: use static_assert
-	  return Initializer_list()({Rational_traits<NT>().make_rational(std::forward<U>(u),h)...});
-	}
-#else
-
-#define CGAL_VAR(Z,N,_) ( Rational_traits<NT>().make_rational( t##N ,h) )
-#define CGAL_CODE(Z,N,_) template <class H> result_type \
-  operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-    check_dim(N); \
-    result_type a(N); \
-    a << BOOST_PP_ENUM(N,CGAL_VAR,); \
-    return a; \
-  }
-  BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR
-
-#endif
-    };
-  };
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Hyperplane.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Hyperplane.h
deleted file mode 100644
index 4f7f9f7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Hyperplane.h
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KD_TYPE_HYPERPLANE_H
-#define CGAL_KD_TYPE_HYPERPLANE_H
-#include <CGAL/enum.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/NewKernel_d/store_kernel.h>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/iterator/counting_iterator.hpp>
-namespace CGAL {
-template <class R_> class Hyperplane {
-	typedef typename Get_type<R_, FT_tag>::type FT_;
-	typedef typename Get_type<R_, Vector_tag>::type	Vector_;
-	Vector_ v_;
-	FT_ s_;
-
-	public:
-	Hyperplane(Vector_ const&v, FT_ const&s): v_(v), s_(s) {}
-	// TODO: Add a piecewise constructor?
-
-	Vector_ const& orthogonal_vector()const{return v_;}
-	FT_ translation()const{return s_;}
-};
-namespace CartesianDKernelFunctors {
-template <class R_> struct Construct_hyperplane : Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Construct_hyperplane)
-  typedef typename Get_type<R_, Hyperplane_tag>::type	result_type;
-  typedef typename Get_type<R_, Point_tag>::type	Point;
-  typedef typename Get_type<R_, Vector_tag>::type	Vector;
-  typedef typename Get_type<R_, FT_tag>::type FT;
-  typedef typename R_::LA::Square_matrix Matrix;
-  private:
-  struct One {
-    typedef int result_type;
-    template<class T>int const& operator()(T const&)const{
-      static const int one = 1;
-      return one;
-    }
-  };
-  public:
-
-  result_type operator()(Vector const&a, FT const&b)const{
-    return result_type(a,b);
-  }
-  // Not really needed
-  result_type operator()()const{
-    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
-    return result_type(cv(),0);
-  }
-
-  template <class Iter>
-  result_type operator()(Iter f, Iter e)const{
-    typedef typename R_::LA LA;
-    typedef typename LA::Vector Vec;
-    typedef typename LA::Construct_vector CVec;
-    typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
-    typename Get_functor<R_, Point_dimension_tag>::type pd(this->kernel());
-
-    Point const& p0=*f;
-    int d = pd(p0);
-    Matrix m(d,d);
-    for(int j=0;j<d;++j)
-      m(0,j)=c(p0,j);
-    // Write the point coordinates in lines.
-    int i;
-    for (i=1; ++f!=e; ++i) {
-      Point const& p=*f;
-      for(int j=0;j<d;++j)
-	m(i,j)=c(p,j);
-    }
-    CGAL_assertion (i == d);
-    Vec one = typename CVec::Iterator()(d,
-	boost::make_transform_iterator(boost::counting_iterator<int>(0),One()),
-	boost::make_transform_iterator(boost::counting_iterator<int>(d),One()));
-    Vec res = typename CVec::Dimension()(d);
-    LA::solve(res, CGAL_MOVE(m), CGAL_MOVE(one));
-    return this->operator()(cv(d,LA::vector_begin(res),LA::vector_end(res)),1);
-  }
-  template <class Iter>
-  result_type operator()(Iter f, Iter e, Point const&p, CGAL::Oriented_side s)const{
-    result_type ret = this->operator()(f, e);
-    if (s == ON_ORIENTED_BOUNDARY)
-      return ret;
-    // TODO: I doubt this does the right thing wrt filtering...
-    typename Get_functor<R_, Value_at_tag>::type va(this->kernel());
-    CGAL::Oriented_side o = CGAL::compare(va(ret,p),ret.translation());
-    if (o == ON_ORIENTED_BOUNDARY || o == s)
-      return ret;
-    typename Get_functor<R_, Opposite_vector_tag>::type ov(this->kernel());
-    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
-    return this->operator()(ov(ret.orthogonal_vector()), -ret.translation());
-  }
-};
-template <class R_> struct Orthogonal_vector {
-  CGAL_FUNCTOR_INIT_IGNORE(Orthogonal_vector)
-  typedef typename Get_type<R_, Hyperplane_tag>::type		Hyperplane;
-  typedef typename Get_type<R_, Vector_tag>::type const&	result_type;
-  result_type operator()(Hyperplane const&s)const{
-    return s.orthogonal_vector();
-  }
-};
-template <class R_> struct Hyperplane_translation {
-  CGAL_FUNCTOR_INIT_IGNORE(Hyperplane_translation)
-  typedef typename Get_type<R_, Hyperplane_tag>::type	Hyperplane;
-  typedef typename Get_type<R_, FT_tag>::type result_type;
-  // TODO: Is_exact?
-  result_type operator()(Hyperplane const&s)const{
-    return s.translation();
-  }
-};
-template <class R_> struct Value_at : Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Value_at)
-  typedef typename Get_type<R_, Hyperplane_tag>::type	Hyperplane;
-  typedef typename Get_type<R_, Vector_tag>::type	Vector;
-  typedef typename Get_type<R_, Point_tag>::type	Point;
-  typedef typename Get_type<R_, FT_tag>::type		FT;
-  typedef FT result_type;
-  typedef typename Get_functor<R_, Scalar_product_tag>::type	Dot;
-  typedef typename Get_functor<R_, Point_to_vector_tag>::type	P2V;
-  result_type operator()(Hyperplane const&h, Point const&p)const{
-    Dot dot(this->kernel());
-    P2V p2v(this->kernel());
-    return dot(h.orthogonal_vector(),p2v(p));
-    // Use Orthogonal_vector to make it generic?
-    // Copy the code from Scalar_product to avoid p2v?
-  }
-};
-}
-//TODO: Add a condition that the hyperplane type is the one from this file.
-CGAL_KD_DEFAULT_TYPE(Hyperplane_tag,(CGAL::Hyperplane<K>),(Vector_tag),());
-CGAL_KD_DEFAULT_FUNCTOR(Construct_ttag<Hyperplane_tag>,(CartesianDKernelFunctors::Construct_hyperplane<K>),(Vector_tag,Hyperplane_tag),(Value_at_tag));
-CGAL_KD_DEFAULT_FUNCTOR(Orthogonal_vector_tag,(CartesianDKernelFunctors::Orthogonal_vector<K>),(Vector_tag,Hyperplane_tag),());
-CGAL_KD_DEFAULT_FUNCTOR(Hyperplane_translation_tag,(CartesianDKernelFunctors::Hyperplane_translation<K>),(Hyperplane_tag),());
-CGAL_KD_DEFAULT_FUNCTOR(Value_at_tag,(CartesianDKernelFunctors::Value_at<K>),(Point_tag,Vector_tag,Hyperplane_tag),(Scalar_product_tag,Point_to_vector_tag));
-} // namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Sphere.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Sphere.h
deleted file mode 100644
index 7ab10f1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Sphere.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KD_TYPE_SPHERE_H
-#define CGAL_KD_TYPE_SPHERE_H
-#include <CGAL/NewKernel_d/store_kernel.h>
-#include <boost/iterator/counting_iterator.hpp>
-namespace CGAL {
-template <class R_> class Sphere {
-	typedef typename Get_type<R_, FT_tag>::type FT_;
-	typedef typename Get_type<R_, Point_tag>::type	Point_;
-	Point_ c_;
-	FT_ r2_;
-
-	public:
-	Sphere(Point_ const&p, FT_ const&r2): c_(p), r2_(r2) {}
-	// TODO: Add a piecewise constructor?
-
-	Point_ const& center()const{return c_;}
-	FT_ const& squared_radius()const{return r2_;}
-};
-
-namespace CartesianDKernelFunctors {
-template <class R_> struct Construct_sphere : Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Construct_sphere)
-  typedef typename Get_type<R_, Sphere_tag>::type	result_type;
-  typedef typename Get_type<R_, Point_tag>::type	Point;
-  typedef typename Get_type<R_, FT_tag>::type FT;
-  result_type operator()(Point const&a, FT const&b)const{
-    return result_type(a,b);
-  }
-  // Not really needed
-  result_type operator()()const{
-    typename Get_functor<R_, Construct_ttag<Point_tag> >::type cp(this->kernel());
-    return result_type(cp(),0);
-  }
-  template <class Iter>
-  result_type operator()(Iter f, Iter e)const{
-    // 2*(x-y).c == x^2-y^2
-    typedef typename R_::LA LA;
-    typedef typename LA::Square_matrix Matrix;
-    typedef typename LA::Vector Vec;
-    typedef typename LA::Construct_vector CVec;
-    typedef typename Get_type<R_, Point_tag>::type	Point;
-    typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-    typename Get_functor<R_, Construct_ttag<Point_tag> >::type cp(this->kernel());
-    typename Get_functor<R_, Point_dimension_tag>::type pd(this->kernel());
-    typename Get_functor<R_, Squared_distance_to_origin_tag>::type sdo(this->kernel());
-    typename Get_functor<R_, Squared_distance_tag>::type sd(this->kernel());
-
-    Point const& p0=*f;
-    int d = pd(p0);
-    FT const& n0 = sdo(p0);
-    Matrix m(d,d);
-    Vec b = typename CVec::Dimension()(d);
-    // Write the point coordinates in lines.
-    int i;
-    for(i=0; ++f!=e; ++i) {
-      Point const& p=*f;
-      for(int j=0;j<d;++j) {
-	m(i,j)=2*(c(p,j)-c(p0,j));
-	b[i] = sdo(p) - n0;
-      }
-    }
-    CGAL_assertion (i == d);
-    Vec res = typename CVec::Dimension()(d);;
-    //std::cout << "Mat: " << m << "\n Vec: " << one << std::endl;
-    LA::solve(res, CGAL_MOVE(m), CGAL_MOVE(b));
-    //std::cout << "Sol: " << res << std::endl;
-    Point center = cp(d,LA::vector_begin(res),LA::vector_end(res));
-    FT const& r2 = sd (center, p0);
-    return this->operator()(CGAL_MOVE(center), r2);
-  }
-};
-
-template <class R_> struct Center_of_sphere : private Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Center_of_sphere)
-  typedef typename Get_type<R_, Sphere_tag>::type	Sphere;
-  // No reference because of the second overload
-  typedef typename Get_type<R_, Point_tag>::type	result_type;
-
-  result_type const& operator()(Sphere const&s)const{
-    return s.center();
-  }
-
-  template<class Iter>
-  result_type operator()(Iter b, Iter e)const{
-    typename Get_functor<R_, Construct_ttag<Sphere_tag> >::type	cs(this->kernel());
-    return operator()(cs(b,e)); // computes the radius needlessly
-  }
-};
-
-template <class R_> struct Squared_radius {
-  CGAL_FUNCTOR_INIT_IGNORE(Squared_radius)
-  typedef typename Get_type<R_, Sphere_tag>::type	Sphere;
-  typedef typename Get_type<R_, FT_tag>::type const&	result_type;
-  // TODO: Is_exact?
-  result_type operator()(Sphere const&s)const{
-    return s.squared_radius();
-  }
-};
-
-// FIXME: Move it to the generic functors, using the two above and conditional to the existence of sqrt(FT)
-template<class R_> struct Point_of_sphere : private Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Point_of_sphere)
-  typedef R_ R;
-  typedef typename Get_type<R, FT_tag>::type FT;
-  typedef typename Get_type<R, RT_tag>::type RT;
-  typedef typename Get_type<R, Point_tag>::type Point;
-  typedef typename Get_type<R, Sphere_tag>::type Sphere;
-  typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
-  typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-  typedef typename Get_functor<R, Point_dimension_tag>::type PD;
-  typedef Point result_type;
-  typedef Sphere first_argument_type;
-  typedef int second_argument_type;
-  struct Trans : std::binary_function<FT,int,FT> {
-    FT const& r_; int idx; bool sgn;
-    Trans (int n, FT const& r, bool b) : r_(r), idx(n), sgn(b) {}
-    FT operator()(FT const&x, int i)const{
-      return (i == idx) ? sgn ? x + r_ : x - r_ : x;
-    }
-  };
-  result_type operator()(Sphere const&s, int i)const{
-    CI ci(this->kernel());
-    PD pd(this->kernel());
-    typedef boost::counting_iterator<int,std::random_access_iterator_tag> Count;
-    Point const&c = s.center();
-    int d=pd(c);
-    bool last = (i == d);
-    FT r = sqrt(s.squared_radius());
-    Trans t(last ? 0 : i, r, !last);
-    return CP(this->kernel())(make_transforming_pair_iterator(ci(c,Begin_tag()),Count(0),t),make_transforming_pair_iterator(ci(c,End_tag()),Count(d),t));
-  }
-};
-}
-CGAL_KD_DEFAULT_TYPE(Sphere_tag,(CGAL::Sphere<K>),(Point_tag),());
-CGAL_KD_DEFAULT_FUNCTOR(Construct_ttag<Sphere_tag>,(CartesianDKernelFunctors::Construct_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Point_tag>,Compute_point_cartesian_coordinate_tag,Squared_distance_tag,Squared_distance_to_origin_tag,Point_dimension_tag));
-CGAL_KD_DEFAULT_FUNCTOR(Center_of_sphere_tag,(CartesianDKernelFunctors::Center_of_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Sphere_tag>));
-CGAL_KD_DEFAULT_FUNCTOR(Squared_radius_tag,(CartesianDKernelFunctors::Squared_radius<K>),(Sphere_tag),());
-CGAL_KD_DEFAULT_FUNCTOR(Point_of_sphere_tag,(CartesianDKernelFunctors::Point_of_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Point_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
-} // namespace CGAL
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/array.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/array.h
deleted file mode 100644
index 8e9b77f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/array.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_VECTOR_ARRAY_H
-#define CGAL_VECTOR_ARRAY_H
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <CGAL/Dimension.h>
-#include <CGAL/NewKernel_d/utils.h>
-#include <CGAL/array.h>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-
-#include <CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h>
-#include <CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h>
-#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h>
-#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h>
-#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h>
-
-
-
-namespace CGAL {
-
-// May not be safe to use with dim!=max_dim.
-// In that case, we should store the real dim next to the array.
-template<class NT_,class Dim_,class Max_dim_=Dim_> struct Array_vector {
-        typedef NT_ NT;
-	typedef Dim_ Dimension;
-	typedef Max_dim_ Max_dimension;
-	template< class D2, class D3=D2 >
-	struct Rebind_dimension {
-	  typedef Array_vector< NT, D2, D3 > Other;
-	};
-	template<class> struct Property : boost::false_type {};
-
-	static const unsigned d_=Max_dim_::value;
-	CGAL_static_assertion(d_ != (unsigned)UNKNOWN_DIMENSION);
-
-	typedef cpp0x::array<NT,d_> Vector;
-	struct Construct_vector {
-		struct Dimension {
-			// Initialize with NaN if possible?
-			Vector operator()(unsigned d) const {
-				CGAL_assertion(d<=d_);
-				return Vector();
-			}
-		};
-
-		struct Iterator {
-			template<typename Iter>
-				Vector operator()(unsigned CGAL_assertion_code(d),Iter const& f,Iter const& e) const {
-					CGAL_assertion(d==std::distance(f,e));
-					CGAL_assertion(d<=d_);
-					//TODO: optimize for forward iterators
-					Vector a;
-					std::copy(f,e,a.begin());
-					return a;
-				}
-		};
-
-#if 0
-		struct Iterator_add_one {
-			template<typename Iter>
-				Vector operator()(unsigned d,Iter const& f,Iter const& e) const {
-					CGAL_assertion(d==std::distance(f,e)+1);
-					CGAL_assertion(d<=d_);
-					//TODO: optimize
-					Vector a;
-					std::copy(f,e,a.begin());
-					a.back()=1;
-					return a;
-				}
-		};
-#endif
-
-		struct Iterator_and_last {
-			template<typename Iter,typename T>
-				Vector operator()(unsigned d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
-					CGAL_assertion(d==std::distance(f,e)+1);
-					CGAL_assertion(d<=d_);
-					//TODO: optimize for forward iterators
-					Vector a;
-					std::copy(f,e,a.begin());
-					a.back()=CGAL_FORWARD(T,t);
-					return a;
-				}
-		};
-
-		struct Values {
-#ifdef CGAL_CXX11
-			template<class...U>
-				Vector operator()(U&&...u) const {
-					static_assert(sizeof...(U)<=d_,"too many arguments");
-					Vector a={{forward_safe<NT,U>(u)...}};
-					return a;
-				}
-#else
-
-#define CGAL_CODE(Z,N,_) Vector operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-	CGAL_assertion(N<=d_); \
-	Vector a={{BOOST_PP_ENUM_PARAMS(N,t)}}; \
-	return a; \
-}
-BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-
-#endif
-		};
-
-		struct Values_divide {
-#ifdef CGAL_CXX11
-			template<class H,class...U>
-				Vector operator()(H const& h,U&&...u) const {
-					static_assert(sizeof...(U)<=d_,"too many arguments");
-					Vector a={{Rational_traits<NT>().make_rational(std::forward<U>(u),h)...}};
-					return a;
-				}
-#else
-
-#define CGAL_VAR(Z,N,_) Rational_traits<NT>().make_rational( t##N , h)
-#define CGAL_CODE(Z,N,_) template <class H> Vector \
-			operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-				CGAL_assertion(N<=d_); \
-				Vector a={{BOOST_PP_ENUM(N,CGAL_VAR,_)}}; \
-				return a; \
-			}
-			BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR
-
-#endif
-		};
-	};
-
-	typedef NT const* Vector_const_iterator;
-	static Vector_const_iterator vector_begin(Vector const&a){
-		return &a[0];
-	}
-	static Vector_const_iterator vector_end(Vector const&a){
-		return &a[0]+d_; // Don't know the real size
-	}
-	static unsigned size_of_vector(Vector const&){
-		return d_; // Don't know the real size
-	}
-
-};
-
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h
deleted file mode 100644
index ff7b4dd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_VECTOR_DET_ITER_PTS_ITER_VEC_H
-#define CGAL_VECTOR_DET_ITER_PTS_ITER_VEC_H
-#include <functional>
-#include <CGAL/transforming_iterator.h>
-#include <CGAL/NewKernel_d/functor_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class LA, class Dim_=typename LA::Dimension,
-	 class Max_dim_=typename LA::Max_dimension,
-	 bool = LA::template Property<Has_determinant_of_iterator_to_points_tag>::value,
-	 bool = LA::template Property<Has_determinant_of_iterator_to_vectors_tag>::value>
-struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors : LA {
-  template< class D2, class D3=D2 >
-    struct Rebind_dimension {
-      typedef typename LA::template Rebind_dimension<D2,D3> LA2;
-      typedef Add_determinant_of_iterator_to_points_from_iterator_to_vectors<LA2> Other;
-    };
-};
-
-template <class LA, class Dim_,class Max_dim_>
-struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors
-<LA, Dim_, Max_dim_, false, true> : LA {
-  typedef typename LA::NT NT;
-  typedef typename LA::Vector Vector;
-  template< class D2, class D3=D2 >
-    struct Rebind_dimension {
-      typedef typename LA::template Rebind_dimension<D2,D3> LA2;
-      typedef Add_determinant_of_iterator_to_points_from_iterator_to_vectors<LA2> Other;
-    };
-  template<class P,class=void> struct Property : LA::template Property<P> {};
-  template<class D> struct Property<Has_determinant_of_iterator_to_points_tag, D> :
-    boost::true_type {};
-
-  // TODO: use std::minus, std::bind, etc
-  template<class T> struct Minus_fixed {
-    T const& a;
-    Minus_fixed(T const&a_):a(a_){}
-    T operator()(T const&b)const{return b-a;}
-  };
-  template<class Iter>
-  static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){
-    Vector const&a=*first; ++first;
-    Minus_fixed<Vector> f(a);
-    return LA::determinant_of_iterator_to_vectors(make_transforming_iterator(first,f),make_transforming_iterator(end,f));
-  }
-  template<class Iter>
-  static Sign sign_of_determinant_of_iterator_to_points(Iter const&first, Iter const&end){
-    Vector const&a=*first; ++first;
-    Minus_fixed<Vector> f(a);
-    return LA::sign_of_determinant_of_iterator_to_vectors(make_transforming_iterator(first,f),make_transforming_iterator(end,f));
-  }
-};
-
-}
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/vector.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/vector.h
deleted file mode 100644
index 370bbad..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/vector.h
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_VECTOR_VECTOR_H
-#define CGAL_VECTOR_VECTOR_H
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <CGAL/Dimension.h>
-#include <CGAL/NewKernel_d/utils.h>
-#include <vector>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-namespace CGAL {
-
-//Derive from a class that doesn't depend on Dim, or still use Dim for checking?
-template<class NT_,class Dim_,class Max_dim_=Dim_> struct Vector_vector {
-        typedef NT_ NT;
-	typedef Dim_ Dimension;
-	typedef Max_dim_ Max_dimension;
-	typedef std::vector<NT> Vector;
-        template< class D2, class D3=D2 >
-        struct Rebind_dimension {
-	  typedef Vector_vector< NT, D2, D3 > Other;
-        };
-        template<class> struct Property : boost::false_type {};
-
-	struct Construct_vector {
-		struct Dimension {
-			Vector operator()(int d) const {
-				return Vector(d);
-			}
-		};
-
-		struct Iterator {
-			template<typename Iter>
-				Vector operator()(int d,Iter const& f,Iter const& e) const {
-					CGAL_assertion(d==std::distance(f,e));
-					return Vector(f,e);
-				}
-		};
-
-		// unneeded thanks to Iterator_and_last?
-#if 0
-		struct Iterator_add_one {
-			template<typename Iter>
-				Vector operator()(int d,Iter const& f,Iter const& e) const {
-					CGAL_assertion(d==std::distance(f,e)+1);
-					Vector a;
-					a.reserve(d+1);
-					a.insert(a.end(),f,e);
-					a.push_back(1);
-					return a;
-				}
-		};
-#endif
-
-		struct Iterator_and_last {
-			template<typename Iter,typename T>
-				Vector operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
-					CGAL_assertion(d==std::distance(f,e)+1);
-					Vector a;
-					a.reserve(d+1);
-					a.insert(a.end(),f,e);
-					a.push_back(CGAL_FORWARD(T,t));
-					return a;
-				}
-		};
-
-		// useless, use a transform_iterator?
-#if 0
-		struct Iterator_and_last_divide {
-			template<typename Iter,typename T>
-				Vector operator()(int d,Iter f,Iter const& e,T const&t) const {
-					CGAL_assertion(d==std::distance(f,e)+1);
-					Vector a;
-					a.reserve(d+1);
-					for(;f!=e;++f){
-						a.push_back(*f/t);
-					}
-					return a;
-				}
-		};
-#endif
-
-		struct Values {
-#ifdef CGAL_CXX11
-			template<class...U>
-				Vector operator()(U&&...u) const {
-					//TODO: check the right number of {}, g++ accepts one and two
-					Vector a={forward_safe<NT,U>(u)...};
-					return a;
-				}
-#else
-
-#define CGAL_VAR(Z,N,_) a.push_back(t##N);
-#define CGAL_CODE(Z,N,_) Vector operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-	Vector a; \
-	a.reserve(N); \
-	BOOST_PP_REPEAT(N,CGAL_VAR,) \
-	return a; \
-}
-BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR
-
-#endif
-		};
-
-		struct Values_divide {
-#ifdef CGAL_CXX11
-			template<class H,class...U>
-				Vector operator()(H const&h,U&&...u) const {
-					//TODO: do we want to cast at some point?
-					//e.g. to avoid 1/2 in integers
-					// ==> use Rational_traits<NT>().make_rational(x,y) ?
-					Vector a={Rational_traits<NT>().make_rational(std::forward<U>(u),h)...};
-					return a;
-				}
-#else
-
-#define CGAL_VAR(Z,N,_) a.push_back(Rational_traits<NT>().make_rational( t##N ,h));
-#define CGAL_CODE(Z,N,_) template<class H> Vector \
-			operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
-				Vector a; \
-				a.reserve(N); \
-				BOOST_PP_REPEAT(N,CGAL_VAR,) \
-				return a; \
-			}
-			BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR
-
-#endif
-		};
-	};
-	typedef typename Vector::const_iterator Vector_const_iterator;
-	static Vector_const_iterator vector_begin(Vector const&a){
-		return a.begin();
-	}
-	static Vector_const_iterator vector_end(Vector const&a){
-		return a.end();
-	}
-	static int size_of_vector(Vector const&a){
-		return (int)a.size();
-	}
-};
-
-
-}
-#endif
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h
deleted file mode 100644
index a0c6d8f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KERNEL_D_CARTESIAN_WRAP_H
-#define CGAL_KERNEL_D_CARTESIAN_WRAP_H
-
-#include <CGAL/basic.h>
-#include <CGAL/is_iterator.h>
-
-#include <CGAL/NewKernel_d/Wrapper/Point_d.h>
-#include <CGAL/NewKernel_d/Wrapper/Vector_d.h>
-#include <CGAL/NewKernel_d/Wrapper/Segment_d.h>
-#include <CGAL/NewKernel_d/Wrapper/Sphere_d.h>
-#include <CGAL/NewKernel_d/Wrapper/Hyperplane_d.h>
-
-#include <CGAL/NewKernel_d/Wrapper/Ref_count_obj.h>
-
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/contains.hpp>
-#include <boost/mpl/vector.hpp>
-
-//TODO: do we want to store the kernel ref in the Object wrappers? It would allow for additions and operator[] and things like that to work, but objects would still need to be created by functors.
-
-namespace CGAL {
-namespace internal {
-BOOST_MPL_HAS_XXX_TRAIT_DEF(Is_wrapper)
-template<class T,bool=has_Is_wrapper<T>::value> struct Is_wrapper {
-	enum { value=false };
-	typedef Tag_false type;
-};
-template<class T> struct Is_wrapper<T,true> {
-	typedef typename T::Is_wrapper type;
-	enum { value=type::value };
-};
-
-template<class T,bool=is_iterator_type<T,std::input_iterator_tag>::value> struct Is_wrapper_iterator {
-	enum { value=false };
-	typedef Tag_false type;
-};
-template<class T> struct Is_wrapper_iterator<T,true> :
-	Is_wrapper<typename std::iterator_traits<typename CGAL::decay<T>::type>::value_type>
-{ };
-
-struct Forward_rep {
-//TODO: make a good C++0X version with perfect forwarding
-//#ifdef CGAL_CXX11
-//template <class T,class=typename std::enable_if<!Is_wrapper<typename std::decay<T>::type>::value&&!Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
-//T&& operator()(typename std::remove_reference<T>::type&& t) const {return static_cast<T&&>(t);};
-//template <class T,class=typename std::enable_if<!Is_wrapper<typename std::decay<T>::type>::value&&!Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
-//T&& operator()(typename std::remove_reference<T>::type& t) const {return static_cast<T&&>(t);};
-//
-//template <class T,class=typename std::enable_if<Is_wrapper<typename std::decay<T>::type>::value>::type>
-//typename Type_copy_cvref<T,typename std::decay<T>::type::Rep>::type&&
-//operator()(T&& t) const {
-//	return static_cast<typename Type_copy_cvref<T,typename std::decay<T>::type::Rep>::type&&>(t.rep());
-//};
-//
-//template <class T,class=typename std::enable_if<Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
-//transforming_iterator<Forward_rep,typename std::decay<T>::type>
-//operator()(T&& t) const {
-//	return make_transforming_iterator(std::forward<T>(t),Forward_rep());
-//};
-//#else
-template <class T,bool=Is_wrapper<T>::value,bool=Is_wrapper_iterator<T>::value> struct result_;
-template <class T> struct result_<T,false,false>{typedef T const& type;};
-template <class T> struct result_<T,true,false>{typedef typename decay<T>::type::Rep const& type;};
-template <class T> struct result_<T,false,true>{typedef transforming_iterator<Forward_rep,typename decay<T>::type> type;};
-template<class> struct result;
-template<class T> struct result<Forward_rep(T)> : result_<T> {};
-
-template <class T> typename boost::disable_if<boost::mpl::or_<Is_wrapper<T>,Is_wrapper_iterator<T> >,T>::type const& operator()(T const& t) const {return t;}
-template <class T> typename boost::disable_if<boost::mpl::or_<Is_wrapper<T>,Is_wrapper_iterator<T> >,T>::type& operator()(T& t) const {return t;}
-
-template <class T> typename T::Rep const& operator()(T const& t, typename boost::enable_if<Is_wrapper<T> >::type* = 0) const {return t.rep();}
-
-template <class T> transforming_iterator<Forward_rep,typename boost::enable_if<Is_wrapper_iterator<T>,T>::type> operator()(T const& t) const {return make_transforming_iterator(t,Forward_rep());}
-//#endif
-};
-}
-
-template <class B, class K, class T, bool = Provides_type<B, T>::value>
-struct Map_wrapping_type : Get_type<B, T> {};
-#define CGAL_REGISTER_OBJECT_WRAPPER(X) \
-  template <class B, class K> \
-  struct Map_wrapping_type <B, K, X##_tag, true> { \
-    typedef Wrap::X##_d<K> type; \
-  }
-CGAL_REGISTER_OBJECT_WRAPPER(Point);
-CGAL_REGISTER_OBJECT_WRAPPER(Vector);
-CGAL_REGISTER_OBJECT_WRAPPER(Segment);
-CGAL_REGISTER_OBJECT_WRAPPER(Sphere);
-CGAL_REGISTER_OBJECT_WRAPPER(Hyperplane);
-#undef CGAL_REGISTER_OBJECT_WRAPPER
-
-// Note: this tends to be an all or nothing thing currently, wrapping
-// only some types breaks, probably because we don't check whether the
-// return type is indeed wrapped.
-template < typename Base_ , typename Derived_ = Default >
-struct Cartesian_wrap : public Base_
-{
-    CGAL_CONSTEXPR Cartesian_wrap(){}
-    CGAL_CONSTEXPR Cartesian_wrap(int d):Base_(d){}
-    typedef Base_ Kernel_base;
-    typedef Cartesian_wrap Self;
-    // TODO: pass the 2 types Self and Derived to the wrappers, they can use Self for most purposes and Derived only for Kernel_traits' typedef R.
-    typedef typename Default::Get<Derived_, Self>::type Derived;
-    // FIXME: The list doesn't belong here.
-    typedef boost::mpl::vector<Point_tag,Segment_tag,Sphere_tag,Vector_tag,Hyperplane_tag> Wrapped_list;
-
-    template <class T>
-    struct Type : Map_wrapping_type<Base_, Derived, T> {};
-
-    //Translate the arguments
-    template <class T, class D = void,
-      class=typename Get_functor_category<Derived,T>::type,
-      bool=Provides_functor<Kernel_base, T>::value,
-      bool=boost::mpl::contains<Wrapped_list,typename map_result_tag<T>::type>::type::value>
-    struct Functor {
-	    typedef typename Get_functor<Kernel_base, T>::type B;
-	    struct type {
-		    B b;
-		    type(){}
-		    type(Self const&k):b(k){}
-		    typedef typename B::result_type result_type;
-#ifdef CGAL_CXX11
-		    template<class...U> result_type operator()(U&&...u)const{
-			    return b(internal::Forward_rep()(u)...);
-		    }
-#else
-#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
-		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
-			    return b(BOOST_PP_ENUM(N,CGAL_VAR,)); \
-		    }
-		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-#undef CGAL_VAR
-// In case the last argument needs to be non-const. Fragile...
-#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U),class V> result_type \
-		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u),V&v)const{ \
-			    return b(BOOST_PP_ENUM(N,CGAL_VAR,),internal::Forward_rep()(v)); \
-		    }
-		    BOOST_PP_REPEAT_FROM_TO(1,8,CGAL_CODE,_)
-#undef CGAL_CODE
-#undef CGAL_VAR
-#endif
-	    };
-    };
-
-    // Preserve the difference between Null_functor and nothing.
-    template <class T, class D, class C, bool b>
-    struct Functor <T, D, C, false, b>
-      : Get_functor <Kernel_base, T> {};
-
-    //Translate both the arguments and the result
-    //TODO: Check Is_wrapper instead of relying on map_result_tag?
-    template<class T,class D> struct Functor<T,D,Construct_tag,true,true> {
-	    typedef typename Get_functor<Kernel_base, T>::type B;
-	    struct type {
-		    B b;
-		    type(){}
-		    type(Self const&k):b(k){}
-		    typedef typename map_result_tag<T>::type result_tag;
-		    // FIXME: Self or Derived?
-		    typedef typename Get_type<Self,result_tag>::type result_type;
-#ifdef CGAL_CXX11
-		    template<class...U> result_type operator()(U&&...u)const{
-			    return result_type(Eval_functor(),b,internal::Forward_rep()(u)...);
-		    }
-#else
-#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
-		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
-			    return result_type(Eval_functor(),b,BOOST_PP_ENUM(N,CGAL_VAR,)); \
-		    }
-		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-#undef CGAL_VAR
-#endif
-	    };
-    };
-
-};
-
-template < typename Base_ >
-struct Cartesian_refcount : public Base_
-{
-    CGAL_CONSTEXPR Cartesian_refcount(){}
-    CGAL_CONSTEXPR Cartesian_refcount(int d):Base_(d){}
-    typedef Base_ Kernel_base;
-    typedef Cartesian_refcount Self;
-
-    // FIXME: Use object_list, or a list passed as argument, or anything
-    // automatic.
-    template <class T, class=void> struct Type : Get_type<Base_, T> {};
-#define CGAL_Kernel_obj(X,Y) \
-    template <class D> struct Type<X##_tag, D> { typedef Ref_count_obj<Cartesian_refcount, X##_tag> type; };
-
-    CGAL_Kernel_obj(Point,point)
-    CGAL_Kernel_obj(Vector,vector)
-#undef CGAL_Kernel_obj
-
-    template<class T> struct Dispatch {
-	    //typedef typename map_functor_type<T>::type f_t;
-	    typedef typename map_result_tag<T>::type r_t;
-	    enum {
-		    is_nul = boost::is_same<typename Get_functor<Kernel_base, T>::type,Null_functor>::value,
-		    ret_rcobj = boost::is_same<r_t,Point_tag>::value || boost::is_same<r_t,Vector_tag>::value
-	    };
-    };
-
-    //Translate the arguments
-    template<class T,class D=void,bool=Dispatch<T>::is_nul,bool=Dispatch<T>::ret_rcobj> struct Functor {
-	    typedef typename Get_functor<Kernel_base, T>::type B;
-	    struct type {
-		    B b;
-		    type(){}
-		    type(Self const&k):b(k){}
-		    typedef typename B::result_type result_type;
-#ifdef CGAL_CXX11
-		    template<class...U> result_type operator()(U&&...u)const{
-			    return b(internal::Forward_rep()(u)...);
-		    }
-#else
-		    result_type operator()()const{
-			    return b();
-		    }
-#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
-		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
-			    return b(BOOST_PP_ENUM(N,CGAL_VAR,)); \
-		    }
-		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-#undef CGAL_VAR
-#endif
-	    };
-    };
-
-    //Translate both the arguments and the result
-    template<class T,class D,bool b> struct Functor<T,D,true,b> {
-	    typedef Null_functor type;
-    };
-
-    template<class T,class D> struct Functor<T,D,false,true> {
-	    typedef typename Get_functor<Kernel_base, T>::type B;
-	    struct type {
-		    B b;
-		    type(){}
-		    type(Self const&k):b(k){}
-		    typedef typename map_result_tag<T>::type result_tag;
-		    typedef typename Get_type<Self,result_tag>::type result_type;
-#ifdef CGAL_CXX11
-		    template<class...U> result_type operator()(U&&...u)const{
-			    return result_type(Eval_functor(),b,internal::Forward_rep()(u)...);
-		    }
-#else
-		    result_type operator()()const{
-			     return result_type(Eval_functor(),b);
-		    }
-#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
-		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
-			    return result_type(Eval_functor(),b,BOOST_PP_ENUM(N,CGAL_VAR,)); \
-		    }
-		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-#undef CGAL_VAR
-#endif
-	    };
-    };
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_KERNEL_D_CARTESIAN_WRAP_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h
deleted file mode 100644
index 59de609..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_HYPERPLANE_D_H
-#define CGAL_WRAPPER_HYPERPLANE_D_H
-
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-namespace CGAL {
-namespace Wrap {
-
-template <class R_>
-class Hyperplane_d : public Get_type<typename R_::Kernel_base, Hyperplane_tag>::type
-{
-  typedef typename Get_type<R_, FT_tag>::type		FT_;
-  typedef typename R_::Kernel_base		Kbase;
-  typedef typename Get_type<R_, Vector_tag>::type	Vector_;
-  typedef typename Get_functor<Kbase, Construct_ttag<Hyperplane_tag> >::type	CHBase;
-  typedef typename Get_functor<Kbase, Orthogonal_vector_tag>::type		OVBase;
-  typedef typename Get_functor<Kbase, Hyperplane_translation_tag>::type			HTBase;
-
-  typedef Hyperplane_d                            Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Hyperplane_tag>::type>::value));
-
-public:
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  typedef typename Increment_dimension<Ambient_dimension,-1>::type Feature_dimension;
-
-  typedef typename Get_type<Kbase, Hyperplane_tag>::type	Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Hyperplane_d> >::value>::type> explicit Hyperplane_d(U&&...u)
-	  : Rep(CHBase()(std::forward<U>(u)...)){}
-
-//  // called from Construct_point_d
-//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
-//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
-  template<class F,class...U> explicit Hyperplane_d(Eval_functor&&,F&&f,U&&...u)
-	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
-
-#if 0
-  // the new standard may make this necessary
-  Point_d(Point_d const&)=default;
-  Point_d(Point_d &);//=default;
-  Point_d(Point_d &&)=default;
-#endif
-
-  // try not to use these
-  Hyperplane_d(Rep const& v) : Rep(v) {}
-  Hyperplane_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
-  Hyperplane_d(Rep&& v) : Rep(std::move(v)) {}
-
-#else
-
-  Hyperplane_d() : Rep(CHBase()()) {}
-
-  Hyperplane_d(Rep const& v) : Rep(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Hyperplane_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(CHBase()( \
-	BOOST_PP_ENUM_PARAMS(N,t))) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Hyperplane_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
-  /*
-  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
-  */
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-
-#endif
-
-  //TODO: if OVBase returns a reference to a base vector, cast it to a
-  //reference to a wrapper vector. Ugly but should be safe.
-  Vector_ orthogonal_vector()const{
-    return Vector_(Eval_functor(),OVBase(),rep());
-  }
-  FT_ translation()const{
-    return HTBase()(rep());
-  }
-
-
-};
-
-} //namespace Wrap
-} //namespace CGAL
-
-#endif // CGAL_WRAPPER_SPHERE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Point_d.h
deleted file mode 100644
index 4c8fb01..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Point_d.h
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_POINT_D_H
-#define CGAL_WRAPPER_POINT_D_H
-
-#include <ostream>
-#include <CGAL/Origin.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-namespace CGAL {
-namespace Wrap {
-
-template <class R_>
-class Point_d : public Get_type<typename R_::Kernel_base, Point_tag>::type
-		// Deriving won't work if the point is just a __m256d.
-		// Test boost/std::is_class for instance
-{
-  typedef typename Get_type<R_, RT_tag>::type		RT_;
-  typedef typename Get_type<R_, FT_tag>::type		FT_;
-  typedef typename R_::Kernel_base		Kbase;
-  typedef typename Get_type<R_, Vector_tag>::type	Vector_;
-  typedef typename Get_functor<Kbase, Construct_ttag<Point_tag> >::type CPBase;
-  typedef typename Get_functor<Kbase, Compute_point_cartesian_coordinate_tag>::type CCBase;
-  typedef typename Get_functor<Kbase, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
-
-
-  typedef Point_d                            Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Point_tag>::type>::value));
-
-public:
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef typename Get_type<Kbase, Point_tag>::type      Rep;
-  //typedef typename CGAL::decay<typename boost::result_of<CPI(Rep,Begin_tag)>::type>::type Cartesian_const_iterator;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Point_d> >::value>::type> explicit Point_d(U&&...u)
-	  : Rep(CPBase()(std::forward<U>(u)...)){}
-
-//  // called from Construct_point_d
-//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
-//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
-  template<class F,class...U> explicit Point_d(Eval_functor&&,F&&f,U&&...u)
-	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
-
-#if 0
-  // the new standard may make this necessary
-  Point_d(Point_d const&)=default;
-  Point_d(Point_d &);//=default;
-  Point_d(Point_d &&)=default;
-#endif
-
-  // try not to use these
-  Point_d(Rep const& v) : Rep(v) {}
-  Point_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
-  Point_d(Rep&& v) : Rep(std::move(v)) {}
-
-  // this one should be implicit
-  Point_d(Origin const& v)
-    : Rep(CPBase()(v)) {}
-  Point_d(Origin& v)
-    : Rep(CPBase()(v)) {}
-  Point_d(Origin&& v)
-    : Rep(CPBase()(std::move(v))) {}
-
-#else
-
-  Point_d() : Rep(CPBase()()) {}
-
-  Point_d(Rep const& v) : Rep(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Point_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(CPBase()( \
-	BOOST_PP_ENUM_PARAMS(N,t))) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Point_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
-  /*
-  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
-  */
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-
-  // this one should be implicit
-  Point_d(Origin const& o)
-    : Rep(CPBase()(o)) {}
-
-#endif
-
-  typename boost::result_of<CCBase(Rep,int)>::type cartesian(int i)const{
-	  return CCBase()(rep(),i);
-  }
-  typename boost::result_of<CCBase(Rep,int)>::type operator[](int i)const{
-	  return CCBase()(rep(),i);
-  }
-
-  typename boost::result_of<CPI(Rep,Begin_tag)>::type cartesian_begin()const{
-	  return CPI()(rep(),Begin_tag());
-  }
-
-  typename boost::result_of<CPI(Rep,End_tag)>::type cartesian_end()const{
-	  return CPI()(rep(),End_tag());
-  }
-
-  int dimension() const {
-    typedef typename Get_functor<Kbase, Point_dimension_tag>::type PDBase;
-    return PDBase()(rep());
-  }
-
-  /*
-  Direction_d direction() const
-  {
-    return R().construct_direction_d_object()(*this);
-  }
-
-  Vector_d transform(const Aff_transformation_d &t) const
-  {
-    return t.transform(*this);
-  }
-
-  Vector_d operator/(const RT& c) const
-  {
-   return R().construct_divided_vector_d_object()(*this,c);
-  }
-
-  Vector_d operator/(const typename First_if_different<FT_,RT>::Type & c) const
-  {
-   return R().construct_divided_vector_d_object()(*this,c);
-  }
-
-  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
-  x() const
-  {
-    return R().compute_x_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_y_3, Vector_3>::type
-  y() const
-  {
-    return R().compute_y_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_z_3, Vector_3>::type
-  z() const
-  {
-    return R().compute_z_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hx_3, Vector_3>::type
-  hx() const
-  {
-    return R().compute_hx_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hy_3, Vector_3>::type
-  hy() const
-  {
-    return R().compute_hy_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hz_3, Vector_3>::type
-  hz() const
-  {
-    return R().compute_hz_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
-  hw() const
-  {
-    return R().compute_hw_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
-    if (i==0) return x();
-    if (i==1) return y();
-    return z();
-  }
-
-  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
-    if (i==0) return hx();
-    if (i==1) return hy();
-    if (i==2) return hz();
-    return hw();
-  }
-
-  typename Qualified_result_of<typename R::Compute_squared_length_3, Vector_3>::type
-  squared_length() const
-  {
-    return R().compute_squared_length_3_object()(*this);
-  }
-*/
-};
-#if 0
-template <class R_> Point_d<R_>::Point_d(Point_d &)=default;
-#endif
-
-//TODO: IO
-
-template <class R_>
-std::ostream& operator <<(std::ostream& os, const Point_d<R_>& p)
-{
-  typedef typename R_::Kernel_base Kbase;
-  typedef typename Get_functor<Kbase, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
-  // Should just be "auto"...
-  typename CGAL::decay<typename boost::result_of<
-        CPI(typename Point_d<R_>::Rep,Begin_tag)
-      >::type>::type
-    b = p.cartesian_begin(),
-    e = p.cartesian_end();
-  os << p.dimension();
-  for(; b != e; ++b){
-    os << " " << *b;
-  }
-  return os;
-}
-
-//template <class R_>
-//Vector_d<R_> operator+(const Vector_d<R_>& v,const Vector_d<R_>& w) const
-//{
-//	return typename R::template Construct<Sum_of_vectors_tag>::type()(v,w);
-//}
-//
-//template <class R_>
-//Vector_d<R_> operator-(const Vector_d<R_>& v,const Vector_d<R_>& w) const
-//{
-//	return typename R::template Construct<Difference_of_vectors_tag>::type()(v,w);
-//}
-
-} //namespace Wrap
-} //namespace CGAL
-
-#endif // CGAL_WRAPPER_POINT_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h
deleted file mode 100644
index 4c60713..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_REF_COUNT_OBJ_H
-#define CGAL_WRAPPER_REF_COUNT_OBJ_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Handle_for.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-// no need for a fancy interface here, people can use the Point_d wrapper on
-// top.
-
-namespace CGAL {
-
-template <class R_, class Tag_>
-class Ref_count_obj
-{
-  typedef typename R_::Kernel_base	Kbase;
-  typedef typename Get_functor<Kbase, Construct_ttag<Tag_> >::type CBase;
-
-  typedef Ref_count_obj			Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Tag_>::type>::value));
-
-public:
-  typedef R_ R;
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  //typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef typename Get_type<Kbase, Tag_>::type	Rep;
-  typedef Handle_for<Rep> Data;
-
-private:
-  Data data;
-public:
-
-  const Rep& rep() const
-  {
-    return CGAL::get(data);
-  }
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Ref_count_obj> >::value>::type> explicit Ref_count_obj(U&&...u)
-	  : data(Eval_functor(),CBase(),std::forward<U>(u)...){}
-
-  template<class F,class...U> explicit Ref_count_obj(Eval_functor&&,F&&f,U&&...u)
-	  : data(Eval_functor(),std::forward<F>(f),std::forward<U>(u)...){}
-
-  // try not to use these
-  Ref_count_obj(Rep const& v) : data(v) {}
-  Ref_count_obj(Rep& v) : data(static_cast<Rep const&>(v)) {}
-  Ref_count_obj(Rep&& v) : data(std::move(v)) {}
-
-  // Do we really need this for point?
-//  // this one should be implicit
-//  Ref_count_obj(Origin const& v)
-//    : data(Eval_functor(),CBase(),v) {}
-//  Ref_count_obj(Origin& v)
-//    : data(Eval_functor(),CBase(),v) {}
-//  Ref_count_obj(Origin&& v)
-//    : data(Eval_functor(),CBase(),std::move(v)) {}
-
-#else
-
-  Ref_count_obj() : data(Eval_functor(),CBase()) {}
-
-  Ref_count_obj(Rep const& v) : data(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Ref_count_obj(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : data(Eval_functor(),CBase(),BOOST_PP_ENUM_PARAMS(N,t)) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Ref_count_obj(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : data(Eval_functor(),f,BOOST_PP_ENUM_PARAMS(N,t)) {}
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-  template<class F>
-  Ref_count_obj(Eval_functor,F const& f)
-  : data(Eval_functor(),f) {}
-
-//  // this one should be implicit
-//  Ref_count_obj(Origin const& o)
-//    : data(Eval_functor(),CBase(),o) {}
-
-#endif
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Segment_d.h
deleted file mode 100644
index aca48d2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Segment_d.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_SEGMENT_D_H
-#define CGAL_WRAPPER_SEGMENT_D_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-namespace CGAL {
-namespace Wrap {
-
-template <class R_>
-class Segment_d : public Get_type<typename R_::Kernel_base, Segment_tag>::type
-{
-  typedef typename Get_type<R_, RT_tag>::type		RT_;
-  typedef typename Get_type<R_, FT_tag>::type		FT_;
-  typedef typename R_::Kernel_base			Kbase;
-  typedef typename Get_type<R_, Point_tag>::type	Point_;
-  typedef typename Get_functor<Kbase, Construct_ttag<Point_tag> >::type CPBase;
-  typedef typename Get_functor<Kbase, Construct_ttag<Segment_tag> >::type CSBase;
-  typedef typename Get_functor<Kbase, Segment_extremity_tag>::type CSEBase;
-
-  typedef Segment_d                            Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Segment_tag>::type>::value));
-
-public:
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef typename Get_type<Kbase, Segment_tag>::type	Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Segment_d> >::value>::type> explicit Segment_d(U&&...u)
-	  : Rep(CSBase()(std::forward<U>(u)...)){}
-
-//  // called from Construct_point_d
-//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
-//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
-  template<class F,class...U> explicit Segment_d(Eval_functor&&,F&&f,U&&...u)
-	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
-
-#if 0
-  // the new standard may make this necessary
-  Point_d(Point_d const&)=default;
-  Point_d(Point_d &);//=default;
-  Point_d(Point_d &&)=default;
-#endif
-
-  // try not to use these
-  Segment_d(Rep const& v) : Rep(v) {}
-  Segment_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
-  Segment_d(Rep&& v) : Rep(std::move(v)) {}
-
-#else
-
-  Segment_d() : Rep(CSBase()()) {}
-
-  Segment_d(Rep const& v) : Rep(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Segment_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(CSBase()( \
-	BOOST_PP_ENUM_PARAMS(N,t))) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Segment_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
-  /*
-  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
-  */
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-
-#endif
-
-	  //TODO: if CSEBase returns a reference to a base point, cast it to a
-	  //reference to a wrapper point. Ugly but should be safe.
-	  Point_ source()const{
-		  return Point_(Eval_functor(),CSEBase(),rep(),0);
-	  }
-	  Point_ target()const{
-		  return Point_(Eval_functor(),CSEBase(),rep(),1);
-	  }
-
-};
-
-} //namespace Wrap
-} //namespace CGAL
-
-#endif // CGAL_WRAPPER_SEGMENT_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h
deleted file mode 100644
index 110c924..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_SPHERE_D_H
-#define CGAL_WRAPPER_SPHERE_D_H
-
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-namespace CGAL {
-namespace Wrap {
-
-template <class R_>
-class Sphere_d : public Get_type<typename R_::Kernel_base, Sphere_tag>::type
-{
-  typedef typename Get_type<R_, FT_tag>::type		FT_;
-  typedef typename R_::Kernel_base		Kbase;
-  typedef typename Get_type<R_, Point_tag>::type	Point_;
-  typedef typename Get_functor<Kbase, Construct_ttag<Sphere_tag> >::type	CSBase;
-  typedef typename Get_functor<Kbase, Center_of_sphere_tag>::type		COSBase;
-  typedef typename Get_functor<Kbase, Squared_radius_tag>::type			SRBase;
-
-  typedef Sphere_d                            Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Sphere_tag>::type>::value));
-
-public:
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  typedef typename Increment_dimension<Ambient_dimension,-1>::type Feature_dimension;
-
-  typedef typename Get_type<Kbase, Sphere_tag>::type	Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Sphere_d> >::value>::type> explicit Sphere_d(U&&...u)
-	  : Rep(CSBase()(std::forward<U>(u)...)){}
-
-//  // called from Construct_point_d
-//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
-//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
-  template<class F,class...U> explicit Sphere_d(Eval_functor&&,F&&f,U&&...u)
-	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
-
-#if 0
-  // the new standard may make this necessary
-  Point_d(Point_d const&)=default;
-  Point_d(Point_d &);//=default;
-  Point_d(Point_d &&)=default;
-#endif
-
-  // try not to use these
-  Sphere_d(Rep const& v) : Rep(v) {}
-  Sphere_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
-  Sphere_d(Rep&& v) : Rep(std::move(v)) {}
-
-#else
-
-  Sphere_d() : Rep(CSBase()()) {}
-
-  Sphere_d(Rep const& v) : Rep(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Sphere_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(CSBase()( \
-	BOOST_PP_ENUM_PARAMS(N,t))) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Sphere_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
-  /*
-  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
-  */
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-
-#endif
-
-    //TODO: if COSBase returns a reference to a base point, cast it to a
-    //reference to a wrapper point. Ugly but should be safe.
-    Point_ center()const{
-      return Point_(Eval_functor(),COSBase(),rep());
-    }
-  FT_ squared_radius()const{
-    return SRBase()(rep());
-  }
-
-};
-
-} //namespace Wrap
-} //namespace CGAL
-
-#endif // CGAL_WRAPPER_SPHERE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Vector_d.h
deleted file mode 100644
index 70e27d0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Wrapper/Vector_d.h
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_WRAPPER_VECTOR_D_H
-#define CGAL_WRAPPER_VECTOR_D_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/representation_tags.h>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-#ifndef CGAL_CXX11
-#include <boost/preprocessor/repetition.hpp>
-#endif
-#include <boost/utility/result_of.hpp>
-
-namespace CGAL {
-namespace Wrap {
-
-template <class R_>
-class Vector_d : public Get_type<typename R_::Kernel_base, Vector_tag>::type
-{
-  typedef typename Get_type<R_, RT_tag>::type		RT_;
-  typedef typename Get_type<R_, FT_tag>::type		FT_;
-  typedef typename R_::Kernel_base           Kbase;
-  typedef typename Get_type<R_, Point_tag>::type	Point_;
-  typedef typename Get_functor<Kbase, Construct_ttag<Vector_tag> >::type CVBase;
-  typedef typename Get_functor<Kbase, Compute_vector_cartesian_coordinate_tag>::type CCBase;
-  typedef typename Get_functor<Kbase, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
-  typedef typename Get_functor<Kbase, Squared_length_tag>::type SLBase;
-
-  typedef Vector_d                            Self;
-  BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Vector_tag>::type>::value));
-
-public:
-
-  typedef Tag_true Is_wrapper;
-  typedef typename R_::Default_ambient_dimension Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  //typedef typename R_::Vector_cartesian_const_iterator Cartesian_const_iterator;
-  typedef typename Get_type<Kbase, Vector_tag>::type	Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-#ifdef CGAL_CXX11
-  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Vector_d> >::value>::type> explicit Vector_d(U&&...u)
-	  : Rep(CVBase()(std::forward<U>(u)...)){}
-
-//  // called from Construct_vector_d
-//  template<class...U> explicit Vector_d(Eval_functor&&,U&&...u)
-//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
-  template<class F,class...U> explicit Vector_d(Eval_functor&&,F&&f,U&&...u)
-	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
-
-#if 0
-  // the new standard may make this necessary
-  Vector_d(Vector_d const&)=default;
-  Vector_d(Vector_d &);//=default;
-  Vector_d(Vector_d &&)=default;
-#endif
-
-  // try not to use these
-  Vector_d(Rep const& v) : Rep(v) {}
-  Vector_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
-  Vector_d(Rep&& v) : Rep(std::move(v)) {}
-
-  // this one should be implicit
-  Vector_d(Null_vector const& v)
-    : Rep(CVBase()(v)) {}
-  Vector_d(Null_vector& v)
-    : Rep(CVBase()(v)) {}
-  Vector_d(Null_vector&& v)
-    : Rep(CVBase()(std::move(v))) {}
-
-#else
-
-  Vector_d() : Rep(CVBase()()) {}
-
-  Vector_d(Rep const& v) : Rep(v) {} // try not to use it
-
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  explicit Vector_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(CVBase()( \
-	BOOST_PP_ENUM_PARAMS(N,t))) {} \
-  \
-  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Vector_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
-  /*
-  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
-  Vector_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
-  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
-  */
-
-  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
-#undef CGAL_CODE
-
-  // this one should be implicit
-  Vector_d(Null_vector const& v)
-    : Rep(CVBase()(v)) {}
-
-#endif
-
-  typename boost::result_of<CCBase(Rep,int)>::type cartesian(int i)const{
-	  return CCBase()(rep(),i);
-  }
-
-  typename boost::result_of<CCBase(Rep,int)>::type operator[](int i)const{
-	  return CCBase()(rep(),i);
-  }
-
-  typename boost::result_of<CVI(Rep,Begin_tag)>::type cartesian_begin()const{
-	  return CVI()(rep(),Begin_tag());
-  }
-
-  typename boost::result_of<CVI(Rep,End_tag)>::type cartesian_end()const{
-	  return CVI()(rep(),End_tag());
-  }
-
-  Vector_d operator-() const
-  {
-    return typename Get_functor<R, Opposite_vector_tag>::type()(*this);
-  }
-
-  /*
-  Direction_d direction() const
-  {
-    return R().construct_direction_d_object()(*this);
-  }
-
-  Vector_d transform(const Aff_transformation_d &t) const
-  {
-    return t.transform(*this);
-  }
-
-  Vector_d operator/(const RT& c) const
-  {
-   return R().construct_divided_vector_d_object()(*this,c);
-  }
-
-  Vector_d operator/(const typename First_if_different<FT_,RT>::Type & c) const
-  {
-   return R().construct_divided_vector_d_object()(*this,c);
-  }
-
-  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
-  x() const
-  {
-    return R().compute_x_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_y_3, Vector_3>::type
-  y() const
-  {
-    return R().compute_y_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_z_3, Vector_3>::type
-  z() const
-  {
-    return R().compute_z_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hx_3, Vector_3>::type
-  hx() const
-  {
-    return R().compute_hx_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hy_3, Vector_3>::type
-  hy() const
-  {
-    return R().compute_hy_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hz_3, Vector_3>::type
-  hz() const
-  {
-    return R().compute_hz_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
-  hw() const
-  {
-    return R().compute_hw_3_object()(*this);
-  }
-
-  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
-    if (i==0) return x();
-    if (i==1) return y();
-    return z();
-  }
-
-  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
-    if (i==0) return hx();
-    if (i==1) return hy();
-    if (i==2) return hz();
-    return hw();
-  }
-
-  int dimension() const // bad idea?
-  {
-      return rep.dimension();
-  }
-*/
-  typename boost::result_of<SLBase(Rep)>::type squared_length()const{
-	  return SLBase()(rep());
-  }
-};
-#if 0
-template <class R_> Vector_d<R_>::Vector_d(Vector_d &)=default;
-#endif
-
-//TODO: IO
-
-template <class R_>
-Vector_d<R_> operator+(const Vector_d<R_>& v,const Vector_d<R_>& w)
-{
-	return typename Get_functor<R_, Sum_of_vectors_tag>::type()(v,w);
-}
-
-template <class R_>
-Vector_d<R_> operator-(const Vector_d<R_>& v,const Vector_d<R_>& w)
-{
-	return typename Get_functor<R_, Difference_of_vectors_tag>::type()(v,w);
-}
-
-} //namespace Wrap
-} //namespace CGAL
-
-#endif // CGAL_WRAPPER_VECTOR_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/function_objects_cartesian.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/function_objects_cartesian.h
deleted file mode 100644
index 86f038f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/function_objects_cartesian.h
+++ /dev/null
@@ -1,1159 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
-#define CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
-
-#include <CGAL/NewKernel_d/utils.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/Uncertain.h>
-#include <CGAL/NewKernel_d/store_kernel.h>
-#include <CGAL/is_iterator.h>
-#include <CGAL/iterator_from_indices.h>
-#include <CGAL/number_utils.h>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/transforming_iterator.h>
-#include <CGAL/transforming_pair_iterator.h>
-#include <CGAL/NewKernel_d/functor_tags.h>
-#include <CGAL/NewKernel_d/functor_properties.h>
-#include <CGAL/predicates/sign_of_determinant.h>
-#include <functional>
-#ifdef CGAL_CXX11
-#include <initializer_list>
-#endif
-
-namespace CGAL {
-namespace CartesianDKernelFunctors {
-namespace internal {
-template<class,int> struct Dimension_at_most { enum { value = false }; };
-template<int a,int b> struct Dimension_at_most<Dimension_tag<a>,b> {
-	enum { value = (a <= b) };
-};
-}
-
-template<class R_,class D_=typename R_::Default_ambient_dimension,bool=internal::Dimension_at_most<D_,6>::value> struct Orientation_of_points : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	typedef typename R::LA::Square_matrix Matrix;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-		Point const& p0=*f++;
-		int d=pd(p0);
-		Matrix m(d,d);
-		// FIXME: this writes the vector coordinates in lines ? check all the other uses in this file, this may be wrong for some.
-		for(int i=0;f!=e;++f,++i) {
-		  Point const& p=*f;
-		  for(int j=0;j<d;++j){
-		    m(i,j)=c(p,j)-c(p0,j);
-		    // should we cache the coordinates of p0 in case they are computed?
-		  }
-		}
-		return R::LA::sign_of_determinant(CGAL_MOVE(m));
-	}
-
-#ifdef CGAL_CXX11
-	// Since the dimension is at least 2, there are at least 3 points and no ambiguity with iterators.
-	// template <class...U,class=typename std::enable_if<std::is_same<Dimension_tag<sizeof...(U)-1>,typename R::Default_ambient_dimension>::value>::type>
-	template <class...U,class=typename std::enable_if<(sizeof...(U)>=3)>::type>
-	result_type operator()(U&&...u) const {
-		return operator()({std::forward<U>(u)...});
-	}
-
-	template <class P>
-	result_type operator()(std::initializer_list<P> l) const {
-		return operator()(l.begin(),l.end());
-	}
-#else
-	//should we make it template to avoid instantiation for wrong dim?
-	//or iterate outside the class?
-#define CGAL_VAR(Z,J,I) m(I,J)=c(p##I,J)-c(x,J);
-#define CGAL_VAR2(Z,I,N) BOOST_PP_REPEAT(N,CGAL_VAR,I)
-#define CGAL_CODE(Z,N,_) \
-	result_type operator()(Point const&x, BOOST_PP_ENUM_PARAMS(N,Point const&p)) const { \
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel()); \
-		Matrix m(N,N); \
-		BOOST_PP_REPEAT(N,CGAL_VAR2,N) \
-		return R::LA::sign_of_determinant(CGAL_MOVE(m)); \
-	}
-
-BOOST_PP_REPEAT_FROM_TO(7, 10, CGAL_CODE, _ )
-	// No need to do it for <=6, since that uses a different code path
-#undef CGAL_CODE
-#undef CGAL_VAR2
-#undef CGAL_VAR
-#endif
-};
-
-#ifdef CGAL_CXX11
-template<class R_,int d> struct Orientation_of_points<R_,Dimension_tag<d>,true> : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	template<class>struct Help;
-	template<int...I>struct Help<Indices<I...> > {
-		template<class C,class P,class T> result_type operator()(C const&c,P const&x,T&&t)const{
-			return sign_of_determinant(c(std::get<I/d>(t),I%d)-c(x,I%d)...);
-		}
-	};
-	template<class P0,class...P> result_type operator()(P0 const&x,P&&...p)const{
-		static_assert(d==sizeof...(P),"Wrong number of arguments");
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-		return Help<typename N_increasing_indices<d*d>::type>()(c,x,std::forward_as_tuple(std::forward<P>(p)...));
-	}
-
-
-	template<int N,class Iter,class...U> result_type help2(Dimension_tag<N>, Iter f, Iter const&e, U&&...u)const{
-		auto const&p=*f;
-		return help2(Dimension_tag<N-1>(),++f,e,std::forward<U>(u)...,p);
-	}
-	template<class Iter,class...U> result_type help2(Dimension_tag<0>, Iter CGAL_assertion_code(f), Iter const& CGAL_assertion_code(e), U&&...u)const{
-		CGAL_assertion(f==e);
-		return operator()(std::forward<U>(u)...);
-	}
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		return help2(Dimension_tag<d+1>(),f,e);
-	}
-};
-#else
-#define CGAL_VAR(Z,J,I) c(p##I,J)-x##J
-#define CGAL_VAR2(Z,I,N) BOOST_PP_ENUM(N,CGAL_VAR,I)
-#define CGAL_VAR3(Z,N,_) Point const&p##N=*++f;
-#define CGAL_VAR4(Z,N,_) RT const&x##N=c(x,N);
-#define CGAL_CODE(Z,N,_) \
-template<class R_> struct Orientation_of_points<R_,Dimension_tag<N>,true> : private Store_kernel<R_> { \
-	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points) \
-	typedef R_ R; \
-	typedef typename Get_type<R, RT_tag>::type RT; \
-	typedef typename Get_type<R, Point_tag>::type Point; \
-	typedef typename Get_type<R, Orientation_tag>::type result_type; \
-	result_type operator()(Point const&x, BOOST_PP_ENUM_PARAMS(N,Point const&p)) const { \
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel()); \
-		BOOST_PP_REPEAT(N,CGAL_VAR4,) \
-		return sign_of_determinant(BOOST_PP_ENUM(N,CGAL_VAR2,N)); \
-	} \
-	template<class Iter> \
-	result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{ \
-		Point const&x=*f; \
-		BOOST_PP_REPEAT(N,CGAL_VAR3,) \
-		CGAL_assertion(++f==e); \
-		return operator()(x,BOOST_PP_ENUM_PARAMS(N,p)); \
-	} \
-};
-
-	BOOST_PP_REPEAT_FROM_TO(2, 7, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR4
-#undef CGAL_VAR3
-#undef CGAL_VAR2
-#undef CGAL_VAR
-
-#endif
-
-template<class R_> struct Orientation_of_points<R_,Dimension_tag<1>,true> : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	result_type operator()(Point const&x, Point const&y) const {
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-		// No sign_of_determinant(RT) :-(
-		return CGAL::compare(c(y,0),c(x,0));
-	}
-	template<class Iter>
-	result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{
-		Point const&x=*f;
-		Point const&y=*++f;
-		CGAL_assertion(++f==e);
-		return operator()(x,y);
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Orientation_of_points_tag,(CartesianDKernelFunctors::Orientation_of_points<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Orientation_of_vectors : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation_of_vectors)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	typedef typename R::LA::Square_matrix Matrix;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
-		// FIXME: Uh? Using it on a vector ?!
-		Vector const& v0=*f;
-		int d=vd(v0);
-		Matrix m(d,d);
-		for(int j=0;j<d;++j){
-			m(0,j)=c(v0,j);
-		}
-		for(int i=1;++f!=e;++i) {
-			Vector const& v=*f;
-		for(int j=0;j<d;++j){
-			m(i,j)=c(v,j);
-		}
-		}
-		return R::LA::sign_of_determinant(CGAL_MOVE(m));
-	}
-
-#ifdef CGAL_CXX11
-	template <class...U,class=typename std::enable_if<(sizeof...(U)>=3)>::type>
-	result_type operator()(U&&...u) const {
-		return operator()({std::forward<U>(u)...});
-	}
-
-	template <class V>
-	result_type operator()(std::initializer_list<V> l) const {
-		return operator()(l.begin(),l.end());
-	}
-#else
-	//TODO
-#endif
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Orientation_of_vectors_tag,(CartesianDKernelFunctors::Orientation_of_vectors<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Linear_rank : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Linear_rank)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	// Computing a sensible Uncertain<int> is not worth it
-	typedef int result_type;
-	typedef typename R::LA::Dynamic_matrix Matrix;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		if (n==0) return 0;
-		Vector const& v0 = *f;
-		// FIXME: Uh? Using it on a vector ?!
-		int d=vd(v0);
-		Matrix m(d,n);
-		for(int j=0;j<d;++j){
-		  m(j,0)=c(v0,j);
-		}
-		for(int i=1; ++f!=e; ++i){
-		  Vector const& v = *f;
-		  for(int j=0;j<d;++j){
-		    m(j,i)=c(v,j);
-		  }
-		}
-		return R::LA::rank(CGAL_MOVE(m));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Linear_rank_tag,(CartesianDKernelFunctors::Linear_rank<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Linearly_independent : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Linearly_independent)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		// FIXME: Uh? Using it on a vector ?!
-		int d=vd(*f);
-		if (n>d) return false;
-		typename Get_functor<R, Linear_rank_tag>::type lr(this->kernel());
-		return lr(f,e) == n;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Linearly_independent_tag,(CartesianDKernelFunctors::Linearly_independent<K>),(Vector_tag),(Point_dimension_tag,Linear_rank_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Contained_in_linear_hull : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Contained_in_linear_hull)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	// Computing a sensible Uncertain<bool> is not worth it
-	typedef bool result_type;
-	typedef typename R::LA::Dynamic_matrix Matrix;
-
-	template<class Iter,class V>
-	result_type operator()(Iter f, Iter e,V const&w)const{
-		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		if (n==0) return false;
-		// FIXME: Uh? Using it on a vector ?!
-		int d=vd(w);
-		Matrix m(d,n+1);
-		for(int i=0; f!=e; ++f,++i){
-		  Vector const& v = *f;
-		  for(int j=0;j<d;++j){
-		    m(j,i)=c(v,j);
-		  }
-		}
-		for(int j=0;j<d;++j){
-		  m(j,n)=c(w,j);
-		}
-		int r1 = R::LA::rank(m);
-		// FIXME: Don't use eigen directly, go through an interface in LA...
-		m.conservativeResize(Eigen::NoChange, n);
-		int r2 = R::LA::rank(CGAL_MOVE(m));
-		return r1 == r2;
-		// TODO: This is very very far from optimal...
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Contained_in_linear_hull_tag,(CartesianDKernelFunctors::Contained_in_linear_hull<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Affine_rank : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Affine_rank)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	// Computing a sensible Uncertain<int> is not worth it
-	typedef int result_type;
-	typedef typename R::LA::Dynamic_matrix Matrix;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-		int n=(int)std::distance(f,e);
-		if (--n<=0) return n;
-		Point const& p0 = *f;
-		int d=pd(p0);
-		Matrix m(d,n);
-		for(int i=0; ++f!=e; ++i){
-		  Point const& p = *f;
-		  for(int j=0;j<d;++j){
-		    m(j,i)=c(p,j)-c(p0,j);
-		    // TODO: cache p0[j] in case it is computed?
-		  }
-		}
-		return R::LA::rank(CGAL_MOVE(m));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Affine_rank_tag,(CartesianDKernelFunctors::Affine_rank<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Affinely_independent : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Affinely_independent)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter e)const{
-		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		int d=pd(*f);
-		if (--n>d) return false;
-		typename Get_functor<R, Affine_rank_tag>::type ar(this->kernel());
-		return ar(f,e) == n;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Affinely_independent_tag,(CartesianDKernelFunctors::Affinely_independent<K>),(Point_tag),(Point_dimension_tag,Affine_rank_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Contained_in_simplex : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Contained_in_simplex)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	// Computing a sensible Uncertain<*> is not worth it
-	// typedef typename Get_type<R, Boolean_tag>::type result_type;
-	typedef bool result_type;
-	typedef typename Increment_dimension<typename R::Default_ambient_dimension>::type D1;
-	typedef typename Increment_dimension<typename R::Max_ambient_dimension>::type D2;
-	typedef typename R::LA::template Rebind_dimension<D1,D2>::Other LA;
-	typedef typename LA::Dynamic_matrix Matrix;
-	typedef typename LA::Dynamic_vector DynVec;
-	typedef typename LA::Vector Vec;
-
-	template<class Iter, class P>
-	result_type operator()(Iter f, Iter e, P const&q)const{
-		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		if (n==0) return false;
-		int d=pd(q);
-		Matrix m(d+1,n);
-		DynVec a(n);
-		// FIXME: Should use the proper vector constructor (Iterator_and_last)
-		Vec b(d+1);
-		for(int j=0;j<d;++j) b[j]=c(q,j);
-		b[d]=1;
-
-		for(int i=0; f!=e; ++i,++f){
-		  Point const& p = *f;
-		  for(int j=0;j<d;++j){
-		    m(j,i)=c(p,j);
-		  }
-		  m(d,i)=1;
-		}
-		if (!LA::solve(a,CGAL_MOVE(m),CGAL_MOVE(b))) return false;
-		for(int i=0;i<n;++i){
-		  if (a[i]<0) return false;
-		}
-		return true;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Contained_in_simplex_tag,(CartesianDKernelFunctors::Contained_in_simplex<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-  namespace internal {
-    template<class Ref_>
-    struct Matrix_col_access {
-      typedef Ref_ result_type;
-      int col;
-      Matrix_col_access(int r):col(r){}
-      template<class Mat> Ref_ operator()(Mat const& m, std::ptrdiff_t row)const{
-	return m(row,col);
-      }
-    };
-  }
-template<class R_> struct Linear_base : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Linear_base)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, FT_tag>::type FT;
-	typedef void result_type;
-	typedef typename R::LA::Dynamic_matrix Matrix;
-
-	template<class Iter, class Oter>
-	result_type operator()(Iter f, Iter e, Oter&o)const{
-		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
-		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
-		typename Get_functor<R, Construct_ttag<Vector_tag> >::type cv(this->kernel());
-		std::ptrdiff_t n=std::distance(f,e);
-		if (n==0) return;
-		Vector const& v0 = *f;
-		// FIXME: Uh? Using it on a vector ?!
-		int d=vd(v0);
-		Matrix m(d,n);
-		for(int j=0;j<d;++j){
-		  m(0,j)=c(v0,j);
-		}
-		for(int i=1; ++f!=e; ++i){
-		  Vector const& v = *f;
-		  for(int j=0;j<d;++j){
-		    m(i,j)=c(v,j);
-		  }
-		}
-		Matrix b = R::LA::basis(CGAL_MOVE(m));
-		for(int i=0; i < R::LA::columns(b); ++i){
-		  //*o++ = Vector(b.col(i));
-		  typedef
-#ifdef CGAL_CXX11
-		    decltype(std::declval<const Matrix>()(0,0))
-#else
-		    FT
-#endif
-		    Ref;
-		  typedef Iterator_from_indices<Matrix, FT, Ref,
-			  internal::Matrix_col_access<Ref> > IFI;
-		  *o++ = cv(IFI(b,0,i),IFI(b,d,i));
-		}
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Linear_base_tag,(CartesianDKernelFunctors::Linear_base<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
-
-#if 0
-namespace CartesianDKernelFunctors {
-template<class R_,bool=boost::is_same<typename R_::Point,typename R_::Vector>::value> struct Orientation : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	typedef typename Get_functor<R, Orientation_of_points_tag>::type OP;
-	typedef typename Get_functor<R, Orientation_of_vectors_tag>::type OV;
-
-	//FIXME!!!
-	//when Point and Vector are distinct types, the dispatch should be made
-	//in a way that doesn't instantiate a conversion from Point to Vector
-	template<class Iter>
-	result_type operator()(Iter const&f, Iter const& e)const{
-		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-		typename std::iterator_traits<Iter>::difference_type d=std::distance(f,e);
-		int dim=pd(*f); // BAD
-		if(d==dim) return OV(this->kernel())(f,e);
-		CGAL_assertion(d==dim+1);
-		return OP(this->kernel())(f,e);
-	}
-	//TODO: version that takes objects directly instead of iterators
-};
-
-template<class R_> struct Orientation<R_,false> : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Orientation)
-	typedef R_ R;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Orientation_tag>::type result_type;
-	typedef typename Get_functor<R, Orientation_of_points_tag>::type OP;
-	typedef typename Get_functor<R, Orientation_of_vectors_tag>::type OV;
-	typedef typename R::LA::Square_matrix Matrix;
-
-	//FIXME!!!
-	//when Point and Vector are distinct types, the dispatch should be made
-	//in a way that doesn't instantiate a conversion from Point to Vector
-	template<class Iter>
-	typename boost::enable_if<is_iterator_to<Iter,Point>,result_type>::type
-	operator()(Iter const&f, Iter const& e)const{
-		return OP(this->kernel())(f,e);
-	}
-	template<class Iter>
-	typename boost::enable_if<is_iterator_to<Iter,Vector>,result_type>::type
-	operator()(Iter const&f, Iter const& e)const{
-		return OV(this->kernel())(f,e);
-	}
-	//TODO: version that takes objects directly instead of iterators
-};
-}
-#endif
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Side_of_oriented_sphere : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Side_of_oriented_sphere)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Oriented_side_tag>::type result_type;
-	typedef typename Increment_dimension<typename R::Default_ambient_dimension>::type D1;
-	typedef typename Increment_dimension<typename R::Max_ambient_dimension>::type D2;
-	typedef typename R::LA::template Rebind_dimension<D1,D2>::Other LA;
-	typedef typename LA::Square_matrix Matrix;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter const& e)const{
-	  Point const& p0=*f++; // *--e ?
-	  return this->operator()(f,e,p0);
-	}
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter const& e, Point const& p0) const {
-	  typedef typename Get_functor<R, Squared_distance_to_origin_tag>::type Sqdo;
-	  typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
-	  typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
-
-	  int d=pd(p0);
-	  Matrix m(d+1,d+1);
-	  if(CGAL::Is_stored<Sqdo>::value) {
-	    Sqdo sqdo(this->kernel());
-	    for(int i=0;f!=e;++f,++i) {
-	      Point const& p=*f;
-	      for(int j=0;j<d;++j){
-		RT const& x=c(p,j);
-		m(i,j)=x-c(p0,j);
-	      }
-	      m(i,d) = sqdo(p) - sqdo(p0);
-	    }
-	  } else {
-	    for(int i=0;f!=e;++f,++i) {
-	      Point const& p=*f;
-	      m(i,d) = 0;
-	      for(int j=0;j<d;++j){
-		RT const& x=c(p,j);
-		m(i,j)=x-c(p0,j);
-		m(i,d)+=CGAL::square(m(i,j));
-	      }
-	    }
-	  }
-	  if(d%2)
-	    return -LA::sign_of_determinant(CGAL_MOVE(m));
-	  else
-	    return LA::sign_of_determinant(CGAL_MOVE(m));
-	}
-
-#ifdef CGAL_CXX11
-	template <class...U,class=typename std::enable_if<(sizeof...(U)>=4)>::type>
-	result_type operator()(U&&...u) const {
-		return operator()({std::forward<U>(u)...});
-	}
-
-	template <class P>
-	result_type operator()(std::initializer_list<P> l) const {
-		return operator()(l.begin(),l.end());
-	}
-#else
-	//TODO
-#endif
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Side_of_oriented_sphere_tag,(CartesianDKernelFunctors::Side_of_oriented_sphere<K>),(Point_tag),(Point_dimension_tag,Squared_distance_to_origin_tag,Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-// TODO: implement it directly, it should be at least as fast as Side_of_oriented_sphere.
-template<class R_> struct Side_of_bounded_sphere : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Side_of_bounded_sphere)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Bounded_side_tag>::type result_type;
-
-	template<class Iter>
-	result_type operator()(Iter f, Iter const& e) const {
-	  Point const& p0 = *f++; // *--e ?
-	  return operator() (f, e, p0);
-	}
-
-	template<class Iter>
-	result_type operator()(Iter const& f, Iter const& e, Point const& p0) const {
-	  typename Get_functor<R, Side_of_oriented_sphere_tag>::type sos (this->kernel());
-	  typename Get_functor<R, Orientation_of_points_tag>::type op (this->kernel());
-	  // enum_cast is not very generic, but since this function isn't supposed to remain like this...
-	  return enum_cast<Bounded_side> (sos (f, e, p0) * op (f, e));
-	}
-
-#ifdef CGAL_CXX11
-	template <class...U,class=typename std::enable_if<(sizeof...(U)>=4)>::type>
-	result_type operator()(U&&...u) const {
-		return operator()({std::forward<U>(u)...});
-	}
-
-	template <class P>
-	result_type operator()(std::initializer_list<P> l) const {
-		return operator()(l.begin(),l.end());
-	}
-#else
-	//TODO
-#endif
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Side_of_bounded_sphere_tag,(CartesianDKernelFunctors::Side_of_bounded_sphere<K>),(Point_tag),(Side_of_oriented_sphere_tag,Orientation_of_points_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Point_to_vector : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Point_to_vector)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Point argument_type;
-	result_type operator()(argument_type const&v)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(ci(v,Begin_tag()),ci(v,End_tag()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Point_to_vector_tag,(CartesianDKernelFunctors::Point_to_vector<K>),(Point_tag,Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Vector_to_point : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Vector_to_point)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef Point result_type;
-	typedef Vector argument_type;
-	result_type operator()(argument_type const&v)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(ci(v,Begin_tag()),ci(v,End_tag()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Vector_to_point_tag,(CartesianDKernelFunctors::Vector_to_point<K>),(Point_tag,Vector_tag),(Construct_ttag<Point_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Opposite_vector : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Opposite_vector)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Vector argument_type;
-	result_type operator()(Vector const&v)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(make_transforming_iterator(ci(v,Begin_tag()),std::negate<RT>()),make_transforming_iterator(ci(v,End_tag()),std::negate<RT>()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Opposite_vector_tag,(CartesianDKernelFunctors::Opposite_vector<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Scaled_vector : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Scaled_vector)
-	typedef R_ R;
-	typedef typename Get_type<R, FT_tag>::type FT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Vector first_argument_type;
-	typedef FT second_argument_type;
-	result_type operator()(Vector const&v,FT const& s)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(make_transforming_iterator(ci(v,Begin_tag()),Scale<FT>(s)),make_transforming_iterator(ci(v,End_tag()),Scale<FT>(s)));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Scaled_vector_tag,(CartesianDKernelFunctors::Scaled_vector<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Sum_of_vectors : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Sum_of_vectors)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Vector first_argument_type;
-	typedef Vector second_argument_type;
-	result_type operator()(Vector const&a, Vector const&b)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::plus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::plus<RT>()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Sum_of_vectors_tag,(CartesianDKernelFunctors::Sum_of_vectors<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Difference_of_vectors : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Difference_of_vectors)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Vector first_argument_type;
-	typedef Vector second_argument_type;
-	result_type operator()(Vector const&a, Vector const&b)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::minus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::minus<RT>()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Difference_of_vectors_tag,(CartesianDKernelFunctors::Difference_of_vectors<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Translated_point : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Translated_point)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
-	typedef Point  result_type;
-	typedef Point  first_argument_type;
-	typedef Vector second_argument_type;
-	result_type operator()(Point const&a, Vector const&b)const{
-		CVI cvi(this->kernel());
-		CPI cpi(this->kernel());
-		return CP(this->kernel())(make_transforming_pair_iterator(cpi(a,Begin_tag()),cvi(b,Begin_tag()),std::plus<RT>()),make_transforming_pair_iterator(cpi(a,End_tag()),cvi(b,End_tag()),std::plus<RT>()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Translated_point_tag,(CartesianDKernelFunctors::Translated_point<K>),(Point_tag, Vector_tag),(Construct_ttag<Point_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Difference_of_points : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Difference_of_points)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	typedef Vector result_type;
-	typedef Point first_argument_type;
-	typedef Point second_argument_type;
-	result_type operator()(Point const&a, Point const&b)const{
-		CI ci(this->kernel());
-		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::minus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::minus<RT>()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Difference_of_points_tag,(CartesianDKernelFunctors::Difference_of_points<K>),(Point_tag, Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Midpoint : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Midpoint)
-	typedef R_ R;
-	typedef typename Get_type<R, FT_tag>::type FT;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	typedef Point result_type;
-	typedef Point first_argument_type;
-	typedef Point second_argument_type;
-	// There is a division, but it will be cast to RT afterwards anyway, so maybe we could use RT.
-	struct Average : std::binary_function<FT,RT,FT> {
-		FT operator()(FT const&a, RT const&b)const{
-			return (a+b)/2;
-		}
-	};
-	result_type operator()(Point const&a, Point const&b)const{
-		CI ci(this->kernel());
-		//Divide<FT,int> half(2);
-		//return CP(this->kernel())(make_transforming_iterator(make_transforming_pair_iterator(ci.begin(a),ci.begin(b),std::plus<FT>()),half),make_transforming_iterator(make_transforming_pair_iterator(ci.end(a),ci.end(b),std::plus<FT>()),half));
-		return CP(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),Average()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),Average()));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Midpoint_tag,(CartesianDKernelFunctors::Midpoint<K>),(Point_tag),(Construct_ttag<Point_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Squared_length : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Squared_length)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Vector_tag>::type Vector;
-	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-	typedef RT result_type;
-	typedef Vector argument_type;
-	result_type operator()(Vector const&a)const{
-		CI ci(this->kernel());
-		typename Algebraic_structure_traits<RT>::Square f;
-		// TODO: avoid this RT(0)+...
-		return std::accumulate(make_transforming_iterator(ci(a,Begin_tag()),f),make_transforming_iterator(ci(a,End_tag()),f),RT(0));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Squared_length_tag,(CartesianDKernelFunctors::Squared_length<K>),(Vector_tag),(Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Squared_distance_to_origin : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Squared_distance_to_origin)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	typedef RT result_type;
-	typedef Point argument_type;
-	result_type operator()(Point const&a)const{
-		CI ci(this->kernel());
-		typename Algebraic_structure_traits<RT>::Square f;
-		// TODO: avoid this RT(0)+...
-		return std::accumulate(make_transforming_iterator(ci(a,Begin_tag()),f),make_transforming_iterator(ci(a,End_tag()),f),RT(0));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Squared_distance_to_origin_tag,(CartesianDKernelFunctors::Squared_distance_to_origin<K>),(Point_tag),(Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Squared_distance : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Squared_distance)
-	typedef R_ R;
-	typedef typename Get_type<R, RT_tag>::type RT;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	typedef RT result_type;
-	typedef Point first_argument_type;
-	typedef Point second_argument_type;
-	struct Sq_diff : std::binary_function<RT,RT,RT> {
-		RT operator()(RT const&a, RT const&b)const{
-			return CGAL::square(a-b);
-		}
-	};
-	result_type operator()(Point const&a, Point const&b)const{
-		CI ci(this->kernel());
-		Sq_diff f;
-		// TODO: avoid this RT(0)+...
-		return std::accumulate(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),f),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),f),RT(0));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Squared_distance_tag,(CartesianDKernelFunctors::Squared_distance<K>),(Point_tag),(Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Scalar_product : private Store_kernel<R_> {
-  CGAL_FUNCTOR_INIT_STORE(Scalar_product)
-  typedef R_ R;
-  typedef typename Get_type<R, RT_tag>::type RT;
-  typedef typename Get_type<R, Vector_tag>::type Vector;
-  typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
-  typedef RT result_type;
-  typedef Vector first_argument_type;
-  typedef Vector second_argument_type;
-  result_type operator()(Vector const&a, Vector const&b)const{
-    CI ci(this->kernel());
-    std::multiplies<RT> f;
-    // TODO: avoid this RT(0)+...
-    return std::accumulate(
-	make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),f),
-	make_transforming_pair_iterator(ci(a,  End_tag()),ci(b,  End_tag()),f),
-	RT(0));
-  }
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Scalar_product_tag,(CartesianDKernelFunctors::Scalar_product<K>),(Vector_tag),(Construct_ttag<Vector_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Compare_distance : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Compare_distance)
-	typedef R_ R;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_functor<R, Squared_distance_tag>::type CSD;
-	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
-	typedef Point first_argument_type;
-	typedef Point second_argument_type;
-	typedef Point third_argument_type; // why am I doing this already?
-	typedef Point fourth_argument_type;
-	result_type operator()(Point const&a, Point const&b, Point const&c)const{
-		CSD csd(this->kernel());
-		return CGAL_NTS compare(csd(a,b),csd(a,c));
-	}
-	result_type operator()(Point const&a, Point const&b, Point const&c, Point const&d)const{
-		CSD csd(this->kernel());
-		return CGAL_NTS compare(csd(a,b),csd(c,d));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Compare_distance_tag,(CartesianDKernelFunctors::Compare_distance<K>),(Point_tag),(Squared_distance_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Less_point_cartesian_coordinate : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Less_point_cartesian_coordinate)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-	typedef typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type Cc;
-	// TODO: This is_exact thing should be reengineered.
-	// the goal is to have a way to tell: don't filter this
-	typedef typename CGAL::Is_exact<Cc> Is_exact;
-
-	template<class V,class W,class I>
-	result_type operator()(V const&a, W const&b, I i)const{
-		Cc c(this->kernel());
-		return c(a,i)<c(b,i);
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Less_point_cartesian_coordinate_tag,(CartesianDKernelFunctors::Less_point_cartesian_coordinate<K>),(),(Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Compare_point_cartesian_coordinate : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Compare_point_cartesian_coordinate)
-	typedef R_ R;
-	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
-	typedef typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type Cc;
-	// TODO: This is_exact thing should be reengineered.
-	// the goal is to have a way to tell: don't filter this
-	typedef typename CGAL::Is_exact<Cc> Is_exact;
-
-	template<class V,class W,class I>
-	result_type operator()(V const&a, W const&b, I i)const{
-		Cc c(this->kernel());
-		return CGAL_NTS compare(c(a,i),c(b,i));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Compare_point_cartesian_coordinate_tag,(CartesianDKernelFunctors::Compare_point_cartesian_coordinate<K>),(),(Compute_point_cartesian_coordinate_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Compare_lexicographically : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Compare_lexicographically)
-	typedef R_ R;
-	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	// TODO: This is_exact thing should be reengineered.
-	// the goal is to have a way to tell: don't filter this
-	typedef typename CGAL::Is_exact<CI> Is_exact;
-
-	template<class V,class W>
-	result_type operator()(V const&a, W const&b)const{
-		CI c(this->kernel());
-#ifdef CGAL_CXX11
-		auto
-#else
-		typename CI::result_type
-#endif
-		a_begin=c(a,Begin_tag()),
-		b_begin=c(b,Begin_tag()),
-		a_end=c(a,End_tag());
-		result_type res;
-		// can't we do slightly better for Uncertain<*> ?
-		// after res=...; if(is_uncertain(res))return indeterminate<result_type>();
-		do res=CGAL_NTS compare(*a_begin++,*b_begin++);
-		while(a_begin!=a_end && res==EQUAL);
-		return res;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Compare_lexicographically_tag,(CartesianDKernelFunctors::Compare_lexicographically<K>),(),(Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Less_lexicographically : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Less_lexicographically)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-	typedef typename Get_functor<R, Compare_lexicographically_tag>::type CL;
-	typedef typename CGAL::Is_exact<CL> Is_exact;
-
-	template <class V, class W>
-	result_type operator() (V const&a, W const&b) const {
-		CL c (this->kernel());
-		return c(a,b) < 0;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Less_lexicographically_tag,(CartesianDKernelFunctors::Less_lexicographically<K>),(),(Compare_lexicographically_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Less_or_equal_lexicographically : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Less_or_equal_lexicographically)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-	typedef typename Get_functor<R, Compare_lexicographically_tag>::type CL;
-	typedef typename CGAL::Is_exact<CL> Is_exact;
-
-	template <class V, class W>
-	result_type operator() (V const&a, W const&b) const {
-		CL c (this->kernel());
-		return c(a,b) <= 0;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Less_or_equal_lexicographically_tag,(CartesianDKernelFunctors::Less_or_equal_lexicographically<K>),(),(Compare_lexicographically_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Equal_points : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Equal_points)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
-	// TODO: This is_exact thing should be reengineered.
-	// the goal is to have a way to tell: don't filter this
-	typedef typename CGAL::Is_exact<CI> Is_exact;
-
-	template<class V,class W>
-	result_type operator()(V const&a, W const&b)const{
-		CI c(this->kernel());
-#ifdef CGAL_CXX11
-		auto
-#else
-		typename CI::result_type
-#endif
-		a_begin=c(a,Begin_tag()),
-		b_begin=c(b,Begin_tag()),
-		a_end=c(a,End_tag());
-		result_type res = true;
-		// Is using CGAL::possibly for Uncertain really an optimization?
-		do res = res & (*a_begin++ == *b_begin++);
-		while(a_begin!=a_end && possibly(res));
-		return res;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Equal_points_tag,(CartesianDKernelFunctors::Equal_points<K>),(),(Construct_ttag<Point_cartesian_const_iterator_tag>));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Oriented_side : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Oriented_side)
-	typedef R_ R;
-	typedef typename Get_type<R, Oriented_side_tag>::type result_type;
-	typedef typename Get_type<R, Point_tag>::type Point;
-	typedef typename Get_type<R, Hyperplane_tag>::type Hyperplane;
-	typedef typename Get_type<R, Sphere_tag>::type Sphere;
-	typedef typename Get_functor<R, Value_at_tag>::type VA;
-	typedef typename Get_functor<R, Hyperplane_translation_tag>::type HT;
-	typedef typename Get_functor<R, Squared_distance_tag>::type SD;
-	typedef typename Get_functor<R, Squared_radius_tag>::type SR;
-	typedef typename Get_functor<R, Center_of_sphere_tag>::type CS;
-
-	result_type operator()(Hyperplane const&h, Point const&p)const{
-		HT ht(this->kernel());
-		VA va(this->kernel());
-		return CGAL::compare(va(h,p),ht(h));
-	}
-	result_type operator()(Sphere const&s, Point const&p)const{
-		SD sd(this->kernel());
-		SR sr(this->kernel());
-		CS cs(this->kernel());
-		return CGAL::compare(sd(cs(s),p),sr(s));
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Oriented_side_tag,(CartesianDKernelFunctors::Oriented_side<K>),(Point_tag,Sphere_tag,Hyperplane_tag),(Value_at_tag,Hyperplane_translation_tag,Squared_distance_tag,Squared_radius_tag,Center_of_sphere_tag));
-
-namespace CartesianDKernelFunctors {
-template<class R_> struct Has_on_positive_side : private Store_kernel<R_> {
-	CGAL_FUNCTOR_INIT_STORE(Has_on_positive_side)
-	typedef R_ R;
-	typedef typename Get_type<R, Bool_tag>::type result_type;
-	typedef typename Get_functor<R, Oriented_side_tag>::type OS;
-
-	template <class Obj, class Pt>
-	result_type operator()(Obj const&o, Pt const&p)const{
-		OS os(this->kernel());
-		return os(o,p) == ON_POSITIVE_SIDE;
-	}
-};
-}
-
-CGAL_KD_DEFAULT_FUNCTOR(Has_on_positive_side_tag,(CartesianDKernelFunctors::Has_on_positive_side<K>),(),(Oriented_side_tag));
-
-}
-#include <CGAL/NewKernel_d/Coaffine.h>
-#endif // CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/functor_tags.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/functor_tags.h
deleted file mode 100644
index f4e8678..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/functor_tags.h
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_FUNCTOR_TAGS_H
-#define CGAL_FUNCTOR_TAGS_H
-#include <CGAL/tags.h> // for Null_tag
-#include <CGAL/NewKernel_d/utils.h>
-#ifdef CGAL_CXX11
-#include <type_traits>
-#include <utility>
-#endif
-#include <boost/type_traits.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/empty.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/pop_front.hpp>
-namespace CGAL {
-
-  // Find a better place for this later
-
-  template <class K, class T, class=void> struct Get_type
-    : K::template Type<T> {};
-  template <class K, class F, class O=void, class=void> struct Get_functor
-    : K::template Functor<F, O> {};
-#ifdef CGAL_CXX11
-  template <class K, class T> using Type = typename Get_type<K, T>::type;
-  template <class K, class T> using Functor = typename Get_functor<K, T>::type;
-#endif
-
-  class Null_type {~Null_type();}; // no such object should be created
-
-	// To construct iterators
-	struct Begin_tag {};
-	struct End_tag {};
-
-	// Functor category
-	struct Predicate_tag {};
-	struct Construct_tag {};
-	struct Construct_iterator_tag {};
-	struct Compute_tag {};
-	struct Misc_tag {};
-
-	struct No_filter_tag {};
-
-	template<class>struct Construct_ttag {};
-	template<class>struct Convert_ttag {};
-
-	template <class K, class F, class=void, class=void> struct Get_functor_category { typedef Misc_tag type; };
-	template<class Tg, class Obj, class Base> struct Typedef_tag_type;
-	//template<class Kernel, class Tg> struct Read_tag_type {};
-
-	template<class Kernel, class Tg>
-	struct Provides_type
-	  : Has_type_different_from<Get_type<Kernel, Tg>, Null_type> {};
-
-	template<class Kernel, class Tg, class O=void>
-	struct Provides_functor
-	  : Has_type_different_from<Get_functor<Kernel, Tg, O>, Null_functor> {};
-
-	template<class K, class List, bool=boost::mpl::empty<List>::type::value>
-	struct Provides_functors : boost::mpl::and_ <
-				   Provides_functor<K, typename boost::mpl::front<List>::type>,
-				   Provides_functors<K, typename boost::mpl::pop_front<List>::type> > {};
-	template<class K, class List>
-	struct Provides_functors<K, List, true> : boost::true_type {};
-
-	template<class K, class List, bool=boost::mpl::empty<List>::type::value>
-	struct Provides_types : boost::mpl::and_ <
-				   Provides_type<K, typename boost::mpl::front<List>::type>,
-				   Provides_types<K, typename boost::mpl::pop_front<List>::type> > {};
-	template<class K, class List>
-	struct Provides_types<K, List, true> : boost::true_type {};
-
-	namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Type,template Type<Null_tag>,false) }
-	template<class Kernel, class Tg,
-	  bool = internal::has_Type<Kernel>::value /* false */>
-	struct Provides_type_i : boost::false_type {};
-	template<class Kernel, class Tg>
-	struct Provides_type_i <Kernel, Tg, true>
-	  : Has_type_different_from<typename Kernel::template Type<Tg>, Null_type> {};
-
-	//// This version does not like Functor<T,bool=false>
-	//namespace internal { BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_Functor,Functor,false) }
-	// This version lets us use non-type template parameters, but fails with older EDG-based compilers (Intel 14).
-	namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Functor,template Functor<Null_tag>,false) }
-
-	template<class Kernel, class Tg, class O=void,
-	  bool = internal::has_Functor<Kernel>::value /* false */>
-	struct Provides_functor_i : boost::false_type {};
-	template<class Kernel, class Tg, class O>
-	struct Provides_functor_i <Kernel, Tg, O, true>
-	  : Has_type_different_from<typename Kernel::template Functor<Tg, O>, Null_functor> {};
-
-	// TODO: Refine this a bit.
-	template <class K, class T, class D=void,
-		  //bool=Provides_functor<K,T>::value,
-		  //bool=Provides_functor_i<K,T>::value,
-		  bool = internal::has_Functor<K>::value
-		  >
-	struct Inherit_functor : K::template Functor<T> {};
-	template <class K, class T, class D>
-	struct Inherit_functor <K, T, D, false> {};
-
-	template <class K, class T, bool=internal::has_Type<K>::value>
-	struct Inherit_type : K::template Type<T> {};
-	template <class K, class T>
-	struct Inherit_type <K, T, false> {};
-
-	struct Number_tag {};
-	struct Discrete_tag {};
-	struct Object_tag {};
-	template <class K, class T, class=void> struct Get_type_category {
-	  // The lazy kernel uses it too eagerly,
-	  // so it currently needs a default.
-	  typedef Null_tag type;
-	};
-
-#define CGAL_DECL_OBJ_(X,Y) \
-  template<class Obj,class Base> \
-  struct Typedef_tag_type<X##_tag, Obj, Base> : Base { typedef Obj X; }; \
-  template<class K, class D> \
-  struct Get_type_category <K, X##_tag, D> { typedef Y##_tag type; }
-#define CGAL_DECL_OBJ(X,Y) struct X##_tag {}; \
-  CGAL_DECL_OBJ_(X,Y)
-
-  //namespace has_object { BOOST_MPL_HAS_XXX_TRAIT_DEF(X) }
-  //template<class Kernel>
-  //struct Provides_tag_type<Kernel, X##_tag> : has_object::has_##X<Kernel> {};
-  //template<class Kernel>
-  //struct Read_tag_type<Kernel, X##_tag> { typedef typename Kernel::X type; }
-
-	// Not exactly objects, but the extras can't hurt.
-	CGAL_DECL_OBJ(FT, Number);
-	CGAL_DECL_OBJ(RT, Number);
-
-	CGAL_DECL_OBJ(Bool, Discrete); // Boolean_tag is already taken, and is a template :-(
-	CGAL_DECL_OBJ(Comparison_result, Discrete);
-	CGAL_DECL_OBJ(Sign, Discrete);
-	CGAL_DECL_OBJ(Orientation, Discrete); // Note: duplicate with the functor tag!
-	CGAL_DECL_OBJ(Oriented_side, Discrete);
-	CGAL_DECL_OBJ(Bounded_side, Discrete);
-	CGAL_DECL_OBJ(Angle, Discrete);
-	CGAL_DECL_OBJ(Flat_orientation, Discrete);
-
-	CGAL_DECL_OBJ(Vector, Object);
-	CGAL_DECL_OBJ(Point, Object);
-	CGAL_DECL_OBJ(Segment, Object);
-	CGAL_DECL_OBJ(Sphere, Object);
-	CGAL_DECL_OBJ(Line, Object);
-	CGAL_DECL_OBJ(Direction, Object);
-	CGAL_DECL_OBJ(Hyperplane, Object);
-	CGAL_DECL_OBJ(Ray, Object);
-	CGAL_DECL_OBJ(Iso_box, Object);
-	CGAL_DECL_OBJ(Bbox, Object);
-	CGAL_DECL_OBJ(Aff_transformation, Object);
-#undef CGAL_DECL_OBJ_
-#undef CGAL_DECL_OBJ
-
-// Intel fails with those, and they are not so useful.
-//	CGAL_KD_DEFAULT_TYPE(RT_tag,(typename Get_type<K, FT_tag>::type),(),());
-//	CGAL_KD_DEFAULT_TYPE(FT_tag,(CGAL::Quotient<typename Get_type<K, RT_tag>::type>),(),());
-
-#define CGAL_SMURF2(A,B) CGAL_KD_DEFAULT_TYPE(A##_tag,(typename Same_uncertainty_nt<B, typename Get_type<K,RT_tag>::type>::type),(RT_tag),())
-#define CGAL_SMURF1(A) CGAL_SMURF2(A,CGAL::A)
-	CGAL_SMURF2(Bool, bool);
-	CGAL_SMURF1(Sign);
-	CGAL_SMURF1(Comparison_result);
-	CGAL_SMURF1(Orientation);
-	CGAL_SMURF1(Oriented_side);
-	CGAL_SMURF1(Bounded_side);
-	CGAL_SMURF1(Angle);
-#undef CGAL_SMURF1
-#undef CGAL_SMURF2
-
-	// TODO: replace with Get_type_category
-	template<class> struct is_NT_tag { enum { value = false }; };
-	template<> struct is_NT_tag<FT_tag> { enum { value = true }; };
-	template<> struct is_NT_tag<RT_tag> { enum { value = true }; };
-
-	template<class> struct iterator_tag_traits {
-	  enum { is_iterator = false, has_nth_element = false };
-	  typedef Null_tag value_tag;
-	};
-
-#define CGAL_DECL_COMPUTE(X) struct X##_tag {}; \
-	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Compute_tag type;}
-	CGAL_DECL_COMPUTE(Compute_point_cartesian_coordinate);
-	CGAL_DECL_COMPUTE(Compute_vector_cartesian_coordinate);
-	CGAL_DECL_COMPUTE(Compute_homogeneous_coordinate);
-	CGAL_DECL_COMPUTE(Squared_distance);
-	CGAL_DECL_COMPUTE(Squared_distance_to_origin);
-	CGAL_DECL_COMPUTE(Squared_length);
-	CGAL_DECL_COMPUTE(Squared_radius);
-	CGAL_DECL_COMPUTE(Scalar_product);
-	CGAL_DECL_COMPUTE(Hyperplane_translation);
-	CGAL_DECL_COMPUTE(Value_at);
-#undef CGAL_DECL_COMPUTE
-
-#define CGAL_DECL_ITER_OBJ(X,Y,Z,C) struct X##_tag {}; \
-  template<>struct iterator_tag_traits<X##_tag> { \
-    enum { is_iterator = true, has_nth_element = true }; \
-    typedef Y##_tag value_tag; \
-    typedef Z##_tag nth_element; \
-    typedef C##_tag container; \
-  }; \
-  template<class Obj,class Base> \
-  struct Typedef_tag_type<X##_tag, Obj, Base> : Base { typedef Obj X; }
-
-  //namespace has_object { BOOST_MPL_HAS_XXX_TRAIT_DEF(X) }
-  //template<class Kernel>
-  //struct Provides_tag_type<Kernel, X##_tag> : has_object::has_##X<Kernel> {};
-  //template<class Kernel>
-  //struct Read_tag_type<Kernel, X##_tag> { typedef typename Kernel::X type; }
-
-	CGAL_DECL_ITER_OBJ(Vector_cartesian_const_iterator, FT, Compute_vector_cartesian_coordinate, Vector);
-	CGAL_DECL_ITER_OBJ(Point_cartesian_const_iterator, FT, Compute_point_cartesian_coordinate, Point);
-#undef CGAL_DECL_ITER_OBJ
-
-	template<class>struct map_result_tag{typedef Null_type type;};
-	template<class T>struct map_result_tag<Construct_ttag<T> >{typedef T type;};
-
-	template<class A,class T,class B,class C>struct Get_functor_category<A,Construct_ttag<T>,B,C> :
-	  boost::mpl::if_c<iterator_tag_traits<T>::is_iterator,
-			   Construct_iterator_tag,
-			   Construct_tag> {};
-
-	// Really?
-	template<class A,class T,class B,class C>struct Get_functor_category<A,Convert_ttag<T>,B,C>{typedef Misc_tag type;};
-
-#define CGAL_DECL_CONSTRUCT(X,Y) struct X##_tag {}; \
-	template<>struct map_result_tag<X##_tag>{typedef Y##_tag type;}; \
-	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Construct_tag type;}
-	CGAL_DECL_CONSTRUCT(Midpoint,Point);
-	CGAL_DECL_CONSTRUCT(Center_of_sphere,Point);
-	CGAL_DECL_CONSTRUCT(Point_of_sphere,Point);
-	CGAL_DECL_CONSTRUCT(Segment_extremity,Point);
-	CGAL_DECL_CONSTRUCT(Sum_of_vectors,Vector);
-	CGAL_DECL_CONSTRUCT(Difference_of_vectors,Vector);
-	CGAL_DECL_CONSTRUCT(Opposite_vector,Vector);
-	CGAL_DECL_CONSTRUCT(Scaled_vector,Vector);
-	CGAL_DECL_CONSTRUCT(Orthogonal_vector,Vector);
-	CGAL_DECL_CONSTRUCT(Difference_of_points,Vector);
-	CGAL_DECL_CONSTRUCT(Translated_point,Point);
-	CGAL_DECL_CONSTRUCT(Point_to_vector,Vector);
-	CGAL_DECL_CONSTRUCT(Vector_to_point,Point);
-	CGAL_DECL_CONSTRUCT(Construct_min_vertex,Point);
-	CGAL_DECL_CONSTRUCT(Construct_max_vertex,Point);
-#undef CGAL_DECL_CONSTRUCT
-#if 0
-#define CGAL_DECL_ITER_CONSTRUCT(X,Y) struct X##_tag {}; \
-	template<>struct map_result_tag<X##_tag>{typedef Y##_tag type;}; \
-	template<>struct map_functor_type<X##_tag>{typedef Construct_iterator_tag type;}
-	CGAL_DECL_ITER_CONSTRUCT(Construct_point_cartesian_const_iterator,Point_cartesian_const_iterator);
-	CGAL_DECL_ITER_CONSTRUCT(Construct_vector_cartesian_const_iterator,Vector_cartesian_const_iterator);
-#undef CGAL_DECL_ITER_CONSTRUCT
-#endif
-
-	//FIXME: choose a convention: prefix with Predicate_ ?
-#define CGAL_DECL_PREDICATE_(X) \
-	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Predicate_tag type;}
-#define CGAL_DECL_PREDICATE(X) struct X##_tag {}; \
-	CGAL_DECL_PREDICATE_(X)
-	CGAL_DECL_PREDICATE(Less_point_cartesian_coordinate);
-	CGAL_DECL_PREDICATE(Compare_point_cartesian_coordinate);
-	CGAL_DECL_PREDICATE(Compare_distance);
-	CGAL_DECL_PREDICATE(Compare_lexicographically);
-	CGAL_DECL_PREDICATE(Less_lexicographically);
-	CGAL_DECL_PREDICATE(Less_or_equal_lexicographically);
-	CGAL_DECL_PREDICATE(Equal_points);
-	CGAL_DECL_PREDICATE(Has_on_positive_side);
-	CGAL_DECL_PREDICATE_(Orientation); // duplicate with the type
-	CGAL_DECL_PREDICATE_(Oriented_side); // duplicate with the type
-	CGAL_DECL_PREDICATE(Orientation_of_points);
-	CGAL_DECL_PREDICATE(Orientation_of_vectors);
-	CGAL_DECL_PREDICATE(Side_of_oriented_sphere);
-	CGAL_DECL_PREDICATE(Side_of_bounded_sphere);
-	CGAL_DECL_PREDICATE(Contained_in_affine_hull);
-	CGAL_DECL_PREDICATE(In_flat_orientation);
-	CGAL_DECL_PREDICATE(In_flat_side_of_oriented_sphere);
-	CGAL_DECL_PREDICATE(Construct_flat_orientation); // Making it a predicate is a questionable choice, it should be possible to let it be a construction for some implementations. Not sure how to do that... TODO
-	CGAL_DECL_PREDICATE(Linear_rank);
-	CGAL_DECL_PREDICATE(Affine_rank);
-	CGAL_DECL_PREDICATE(Linearly_independent);
-	CGAL_DECL_PREDICATE(Affinely_independent);
-	CGAL_DECL_PREDICATE(Contained_in_linear_hull);
-	CGAL_DECL_PREDICATE(Contained_in_simplex);
-#undef CGAL_DECL_PREDICATE
-
-#define CGAL_DECL_MISC(X) struct X##_tag {}; \
-	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Misc_tag type;}
-	//TODO: split into _begin and _end ?
-	//CGAL_DECL_MISC(Construct_point_cartesian_const_iterator);
-	//CGAL_DECL_MISC(Construct_vector_cartesian_const_iterator);
-	CGAL_DECL_MISC(Point_dimension);
-	CGAL_DECL_MISC(Vector_dimension);
-	CGAL_DECL_MISC(Linear_base); // Find a more appropriate category?
-#undef CGAL_DECL_MISC
-
-
-	// Properties for LA
-	struct Has_extra_dimension_tag {};
-	struct Has_vector_plus_minus_tag {};
-	struct Has_vector_scalar_ops_tag {};
-	struct Has_dot_product_tag {};
-	struct Has_determinant_of_vectors_tag {};
-	struct Has_determinant_of_points_tag {};
-	struct Has_determinant_of_iterator_to_vectors_tag {};
-	struct Has_determinant_of_iterator_to_points_tag {};
-	struct Has_determinant_of_vectors_omit_last_tag {};
-	struct Stores_squared_norm_tag {};
-
-	template<class> struct Preserved_by_non_linear_extra_coordinate
-	  : boost::false_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_extra_dimension_tag> : boost::true_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_determinant_of_vectors_tag> : boost::true_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_determinant_of_points_tag> : boost::true_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_determinant_of_iterator_to_vectors_tag> : boost::true_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_determinant_of_iterator_to_points_tag> : boost::true_type {};
-	template<> struct Preserved_by_non_linear_extra_coordinate
-	  <Has_determinant_of_vectors_omit_last_tag> : boost::true_type {};
-
-	// Kernel properties
-	struct Point_stores_squared_distance_to_origin_tag {};
-
-}
-#endif // CGAL_FUNCTOR_TAGS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/utils.h b/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/utils.h
deleted file mode 100644
index 27e871f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/utils.h
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_MARCUTILS
-#define CGAL_MARCUTILS
-
-#include <CGAL/config.h>
-#ifdef CGAL_CXX11
-#include <type_traits>
-#include <utility>
-#define CGAL_FORWARDABLE(T) T&&
-#define CGAL_FORWARD(T,t) std::forward<T>(t)
-#define CGAL_MOVE(t) std::move(t)
-#define CGAL_CONSTEXPR constexpr
-#else
-#define CGAL_FORWARDABLE(T) T const&
-#define CGAL_FORWARD(T,t) t
-#define CGAL_MOVE(t) t
-#define CGAL_CONSTEXPR
-#endif
-#include <boost/utility/enable_if.hpp>
-#include <boost/preprocessor/repetition.hpp>
-#include <CGAL/Rational_traits.h>
-#include <CGAL/tuple.h>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/type_traits.hpp>
-
-#ifdef CGAL_CXX11
-#define CGAL_BOOSTD std::
-#else
-#define CGAL_BOOSTD boost::
-#endif
-
-namespace CGAL {
-namespace internal {
-	BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
-}
-
-template <class T, class No, bool=internal::has_type<T>::value /*false*/>
-struct Has_type_different_from : boost::false_type {};
-template <class T, class No>
-struct Has_type_different_from <T, No, true>
-: boost::mpl::not_<boost::is_same<typename T::type, No> > {};
-
-
-	template <class T> struct Wrap_type { typedef T type; };
-
-	// tell a function f(a,b,c) that its real argument is a(b,c)
-	struct Eval_functor {};
-
-	// forget the first argument. Useful to make something dependant
-	// (and thus usable in SFINAE), although that's not a great design.
-	template<class A,class B> struct Second_arg {
-		typedef B type;
-	};
-
-	// like std::forward, except for basic types where it does a cast, to
-	// avoid issues with narrowing conversions
-#ifdef CGAL_CXX11
-	template<class T,class U,class V> inline
-		typename std::conditional<std::is_arithmetic<T>::value&&std::is_arithmetic<typename std::remove_reference<U>::type>::value,T,U&&>::type
-	       	forward_safe(V&& u) { return std::forward<U>(u); }
-#else
-	template<class T,class U> inline U const& forward_safe(U const& u) {
-		return u;
-	}
-#endif
-
-#ifdef CGAL_CXX11
-	template<class...> struct Constructible_from_each;
-	template<class To,class From1,class...From> struct Constructible_from_each<To,From1,From...>{
-		enum { value=std::is_convertible<From1,To>::value&&Constructible_from_each<To,From...>::value };
-	};
-	template<class To> struct Constructible_from_each<To>{
-		enum { value=true };
-	};
-#else
-// currently only used in C++0X code
-#endif
-
-	template<class T> struct Scale {
-#ifndef CGAL_CXX11
-		template<class> struct result;
-		template<class FT> struct result<Scale(FT)> {
-			typedef FT type;
-		};
-#endif
-		T const& scale;
-		Scale(T const& t):scale(t){}
-		template<class FT>
-#ifdef CGAL_CXX11
-		auto operator()(FT&& x)const->decltype(scale*std::forward<FT>(x))
-#else
-		FT operator()(FT const& x)const
-#endif
-		{
-			return scale*CGAL_FORWARD(FT,x);
-		}
-	};
-	template<class NT,class T> struct Divide {
-#if !defined(CGAL_CXX11) || !defined(BOOST_RESULT_OF_USE_DECLTYPE)
-		// requires boost > 1.44
-		// shouldn't be needed with C++0X
-		//template<class> struct result;
-		//template<class FT> struct result<Divide(FT)> {
-		//	typedef FT type;
-		//};
-		typedef NT result_type;
-#endif
-		T const& scale;
-		Divide(T const& t):scale(t){}
-		template<class FT>
-#ifdef CGAL_CXX11
-		//FIXME: gcc complains for Gmpq
-		//auto operator()(FT&& x)const->decltype(Rational_traits<NT>().make_rational(std::forward<FT>(x),scale))
-		NT operator()(FT&& x)const
-#else
-		NT operator()(FT const& x)const
-#endif
-		{
-			return Rational_traits<NT>().
-				make_rational(CGAL_FORWARD(FT,x),scale);
-		}
-	};
-
-	template <class NT> struct has_cheap_constructor : boost::is_arithmetic<NT>{};
-	template <bool p> struct has_cheap_constructor<Interval_nt<p> > {
-		        enum { value=true };
-	};
-
-	// like std::multiplies but allows mixing types
-	// in C++11 in doesn't need to be a template
-	template < class Ret >
-	struct multiplies {
-		template<class A,class B>
-#ifdef CGAL_CXX11
-		auto operator()(A&&a,B&&b)const->decltype(std::forward<A>(a)*std::forward<B>(b))
-#else
-		Ret operator()(A const& a, B const& b)const
-#endif
-		{
-			return CGAL_FORWARD(A,a)*CGAL_FORWARD(B,b);
-		}
-	};
-	template < class Ret >
-	struct division {
-		template<class A,class B>
-#ifdef CGAL_CXX11
-		auto operator()(A&&a,B&&b)const->decltype(std::forward<A>(a)/std::forward<B>(b))
-#else
-		Ret operator()(A const& a, B const& b)const
-#endif
-		{
-			return CGAL_FORWARD(A,a)/CGAL_FORWARD(B,b);
-		}
-	};
-
-#ifdef CGAL_CXX11
-	using std::decay;
-#else
-	template<class T> struct decay : boost::remove_cv<typename boost::decay<T>::type> {};
-#endif
-
-	template<class T,class U> struct Type_copy_ref { typedef U type; };
-	template<class T,class U> struct Type_copy_ref<T&,U> { typedef U& type; };
-#ifdef CGAL_CXX11
-	template<class T,class U> struct Type_copy_ref<T&&,U> { typedef U&& type; };
-#endif
-	template<class T,class U> struct Type_copy_cv { typedef U type; };
-	template<class T,class U> struct Type_copy_cv<T const,U> { typedef U const type; };
-	template<class T,class U> struct Type_copy_cv<T volatile,U> { typedef U volatile type; };
-	template<class T,class U> struct Type_copy_cv<T const volatile,U> { typedef U const volatile type; };
-
-	template<class T,class U> struct Type_copy_cvref :
-		Type_copy_ref<T,typename Type_copy_cv<typename boost::remove_reference<T>::type,U>::type> {};
-
-	struct Dereference_functor {
-		template<class> struct result{};
-		template<class It> struct result<Dereference_functor(It)> {
-			typedef typename std::iterator_traits<It>::reference type;
-		};
-		template<class It> typename result<Dereference_functor(It)>::type
-			operator()(It const&i)const{
-				return *i;
-			}
-	};
-
-#ifdef CGAL_CXX11
-	template<int...> struct Indices{};
-	template<class> struct Next_increasing_indices;
-	template<int...I> struct Next_increasing_indices<Indices<I...> > {
-		typedef Indices<I...,sizeof...(I)> type;
-	};
-	template<int N> struct N_increasing_indices {
-		typedef typename Next_increasing_indices<typename N_increasing_indices<N-1>::type>::type type;
-	};
-	template<> struct N_increasing_indices<0> { typedef Indices<> type; };
-	namespace internal {
-	template<class F,class...U,int...I> inline typename std::result_of<F&&(U...)>::type
-	do_call_on_tuple_elements(F&&f, std::tuple<U...>&&t, Indices<I...>&&) {
-		return f(std::get<I>(std::move(t))...);
-	}
-	} // internal
-	template<class/*result type, ignored*/,class F,class...U>
-	inline typename std::result_of<F&&(U...)>::type
-	call_on_tuple_elements(F&&f, std::tuple<U...>&&t) {
-		return internal::do_call_on_tuple_elements(std::forward<F>(f),std::move(t),
-				typename N_increasing_indices<sizeof...(U)>::type());
-	}
-#else
-#define CGAL_VAR(Z,N,_) cpp0x::get<N>(t)
-#define CGAL_CODE(Z,N,_) template<class Res, class F BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N,class U)> \
-	inline Res call_on_tuple_elements(F const&f, \
-			cpp0x::tuple<BOOST_PP_ENUM_PARAMS(N,U)> const&t) { \
-		return f(BOOST_PP_ENUM(N,CGAL_VAR,)); \
-	}
-	template<class Res, class F>
-	inline Res call_on_tuple_elements(F const&f, cpp0x::tuple<>) {
-		return f();
-	}
-BOOST_PP_REPEAT_FROM_TO(1, 8, CGAL_CODE, _ )
-#undef CGAL_CODE
-#undef CGAL_VAR
-#endif
-
-	template<class A> struct Factory {
-	  typedef A result_type;
-#ifdef CGAL_CXX11
-	  template<class...U> result_type operator()(U&&...u)const{
-	    return A(std::forward<U>(u)...);
-	  }
-#else
-	  result_type operator()()const{
-	    return A();
-	  }
-#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> \
-	  result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
-	    return A(BOOST_PP_ENUM_PARAMS(N,u)); \
-	  }
-BOOST_PP_REPEAT_FROM_TO(1, 8, CGAL_CODE, _ )
-#undef CGAL_CODE
-#endif
-	};
-}
-
-// TODO: make a Cartesian-only variant
-// WARNING: do not use the Req* parameters too much, they can cause circular instanciations and are only useful for dispatching.
-#define CGAL_STRIP_PAREN_(...) __VA_ARGS__
-#define CGAL_STRIP_PAREN(...) CGAL_STRIP_PAREN_ __VA_ARGS__
-// What to do with O? pass it down to other functors or drop it?
-#define CGAL_KD_DEFAULT_FUNCTOR(Tg,Name,ReqTyp,ReqFun) \
-    template <class K, class O> \
-    struct Get_functor<K, Tg, O, \
-      typename boost::mpl::if_c< \
-        Provides_functor_i<K, Tg, O>::value \
-        || !Provides_types<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqTyp> >::value \
-        || !Provides_functors<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqFun> >::value \
-      , int, void>::type> \
-    { \
-      typedef CGAL_STRIP_PAREN_ Name type; \
-      typedef K Bound_kernel; \
-    }
-
-// Not used yet, may need some changes.
-#define CGAL_KD_DEFAULT_TYPE(Tg,Name,ReqTyp,ReqFun) \
-    template <class K> \
-    struct Get_type<K, Tg, \
-      typename boost::mpl::if_c< \
-        Provides_type_i<K, Tg>::value \
-        || !Provides_types<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqTyp> >::value \
-        || !Provides_functors<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqFun> >::value \
-      , int, void>::type> \
-    { \
-      typedef CGAL_STRIP_PAREN_ Name type; \
-      typedef K Bound_kernel; \
-    }
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/linear_solver.h b/3rdparty/CGAL-4.6/include/CGAL/OpenNL/linear_solver.h
deleted file mode 100644
index a245424..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/linear_solver.h
+++ /dev/null
@@ -1,475 +0,0 @@
-// Copyright (c) 2005-2008  Inria Loria (France).
-/*
- * author:  Bruno Levy, INRIA, project ALICE
- * website: http://www.loria.fr/~levy/software
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Scientific work that use this software can reference the website and
- * the following publication:
- *
- * @INPROCEEDINGS {levy:NMDGP:05,
- *    AUTHOR = Bruno Levy,
- *    TITLE  = Numerical Methods for Digital Geometry Processing,
- *    BOOKTITLE =Israel Korea Bi-National Conference,
- *    YEAR=November 2005,
- *    URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics
- * }
- *
- *  Laurent Saboret 2005-2006: Changes for CGAL:
- *      - Added OpenNL namespace
- *      - DefaultLinearSolverTraits is now a model of the SparseLinearAlgebraTraits_d concept
- *      - Added SymmetricLinearSolverTraits
- *      - copied Jacobi preconditioner from Graphite 1.9 code
- */
-
-
-#ifndef __OPENNL_LINEAR_SOLVER__
-#define __OPENNL_LINEAR_SOLVER__
-
-#include <CGAL/OpenNL/conjugate_gradient.h>
-#include <CGAL/OpenNL/bicgstab.h>
-#include <CGAL/OpenNL/preconditioner.h>
-#include <CGAL/OpenNL/sparse_matrix.h>
-#include <CGAL/OpenNL/full_vector.h>
-
-#include <vector>
-#include <iostream>
-#include <cstdlib>
-
-namespace OpenNL {
-
-
-
-// Class DefaultLinearSolverTraits
-// is a traits class for solving general sparse linear systems.
-// It uses BICGSTAB solver with Jacobi preconditioner.
-//
-// Concept: Model of the SparseLinearAlgebraTraits_d concept.
-
-template
-<
-    class COEFFTYPE,                        // type of matrix and vector coefficients
-    class MATRIX = SparseMatrix<COEFFTYPE>, // model of SparseLinearSolverTraits_d::Matrix
-    class VECTOR = FullVector<COEFFTYPE>    // model of SparseLinearSolverTraits_d::Vector
->
-class DefaultLinearSolverTraits
-{
-// Public types
-public:
-    typedef COEFFTYPE                       CoeffType ;
-    typedef COEFFTYPE                       NT;
-    typedef MATRIX                          Matrix ;
-    typedef VECTOR                          Vector ;
-
-// Private types
-private:
-    typedef Jacobi_Preconditioner<NT>       Preconditioner ;
-    typedef Solver_preconditioned_BICGSTAB<Matrix, Preconditioner, Vector>
-                                            Preconditioned_solver ;
-    typedef Solver_BICGSTAB<Matrix, Vector> Solver ;
-
-// Public operations
-public:
-    // Default contructor, copy constructor, operator=() and destructor are fine
-
-    // Solve the sparse linear system "A*X = B"
-    // Return true on success. The solution is then (1/D) * X.
-    //
-    // Preconditions:
-    // - A.row_dimension()    == B.dimension()
-    // - A.column_dimension() == X.dimension()
-    bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
-    {
-        D = 1;              // OpenNL does not support homogeneous coordinates
-
-        // Solve using BICGSTAB solver with preconditioner
-        Preconditioned_solver preconditioned_solver ;
-        NT omega = 1.5;
-        Preconditioner C(A, omega);
-        X = B;
-        if (preconditioned_solver.solve(A, C, B, X))
-            return true;
-
-        // On error, solve using BICGSTAB solver without preconditioner
-#ifdef DEBUG_TRACE
-        std::cerr << "  Failure of BICGSTAB solver with Jacobi preconditioner. "
-                  << "Trying BICGSTAB." << std::endl;
-#endif
-        Solver solver ;
-        X = B;
-        return solver.solve(A, B, X) ;
-    }
-} ;
-
-// Class SymmetricLinearSolverTraits
-// is a traits class for solving symmetric positive definite sparse linear systems.
-// It uses Conjugate Gradient solver with Jacobi preconditioner.
-//
-// Concept: Model of the SparseLinearAlgebraTraits_d concept.
-
-template
-<
-    class COEFFTYPE,                        // type of matrix and vector coefficients
-    class MATRIX = SparseMatrix<COEFFTYPE>, // model of SparseLinearSolverTraits_d::Matrix
-    class VECTOR = FullVector<COEFFTYPE>    // model of SparseLinearSolverTraits_d::Vector
->
-class SymmetricLinearSolverTraits
-{
-// Public types
-public:
-    typedef COEFFTYPE                       CoeffType ;
-    typedef COEFFTYPE                       NT;
-    typedef MATRIX                          Matrix ;
-    typedef VECTOR                          Vector ;
-
-// Private types
-private:
-    typedef Jacobi_Preconditioner<NT>       Preconditioner ;
-    typedef Solver_preconditioned_CG<Matrix, Preconditioner, Vector>
-                                            Preconditioned_solver ;
-    typedef Solver_CG<Matrix, Vector>       Solver ;
-
-// Public operations
-public:
-    // Default contructor, copy constructor, operator=() and destructor are fine
-
-    // Solve the sparse linear system "A*X = B"
-    // Return true on success. The solution is then (1/D) * X.
-    //
-    // Preconditions:
-    // - A.row_dimension()    == B.dimension()
-    // - A.column_dimension() == X.dimension()
-    bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
-    {
-        D = 1;              // OpenNL does not support homogeneous coordinates
-
-        // Solve using Conjugate Gradient solver with preconditioner
-        Preconditioned_solver preconditioned_solver ;
-        NT omega = 1.5;
-        Preconditioner C(A, omega);
-        X = B;
-        if (preconditioned_solver.solve(A, C, B, X))
-            return true;
-
-        // On error, solve using Conjugate Gradient solver without preconditioner
-#ifdef DEBUG_TRACE
-        std::cerr << "  Failure of Conjugate Gradient solver with Jacobi preconditioner. "
-                  << "Trying Conjugate Gradient." << std::endl;
-#endif
-        Solver solver ;
-        X = B;
-        return solver.solve(A, B, X) ;
-    }
-};
-
-
-/*
- * Solves a linear system or minimizes a quadratic form.
- *
- * Requirements for its traits class: must be a model of SparseLinearSolverTraits_d concept
- */
-template <class TRAITS>
-class LinearSolver
-{
-protected:
-    enum State {
-        INITIAL, IN_SYSTEM, IN_ROW, CONSTRUCTED, SOLVED
-    } ;
-
-public:
-    typedef TRAITS Traits ;
-    typedef typename Traits::Matrix Matrix ;
-    typedef typename Traits::Vector Vector ;
-    typedef typename Traits::NT CoeffType ;
-
-    class Variable {
-    public:
-        Variable() : x_(0), index_(-1), locked_(false) { }
-        double value() const { return x_; }
-        void set_value(double x_in) { x_ = x_in ; }
-        void lock()   { locked_ = true ; }
-        void unlock() { locked_ = false ; }
-        bool is_locked() const { return locked_ ; }
-        unsigned int index() const {
-            CGAL_assertion(index_ != -1) ;
-            return (unsigned int)(index_) ;
-        }
-        void set_index(unsigned int index_in) {
-            index_ = index_in ;
-        }
-    private:
-        CoeffType x_ ;
-        int index_ ;
-        bool locked_ ;
-    }  ;
-
-
-    LinearSolver(unsigned int nb_variables) {
-        state_ = INITIAL ;
-        least_squares_ = false ;
-        nb_variables_ = nb_variables ;
-        variable_ = new Variable[nb_variables] ;
-        A_ = NULL ;
-        x_ = NULL ;
-        b_ = NULL ;
-    }
-
-    ~LinearSolver() {
-        delete[] variable_ ;
-        delete A_ ;
-        delete x_ ;
-        delete b_ ;
-    }
-
-    // __________________ Parameters ________________________
-
-    void set_least_squares(bool x) { least_squares_ = x ; }
-
-    // __________________ Access ____________________________
-
-    int nb_variables() const { return nb_variables_ ; }
-
-    Variable& variable(unsigned int idx) {
-        CGAL_assertion(idx < nb_variables_) ;
-        return variable_[idx] ;
-    }
-
-    const Variable& variable(unsigned int idx) const {
-        CGAL_assertion(idx < nb_variables_) ;
-        return variable_[idx] ;
-    }
-
-    // _________________ Construction _______________________
-
-    void begin_system() {
-        current_row_ = 0 ;
-        transition(INITIAL, IN_SYSTEM) ;
-        // Enumerate free variables.
-        unsigned int index = 0 ;
-        for(int ii=0; ii < nb_variables() ; ii++) {
-            Variable& v = variable(ii) ;
-            if(!v.is_locked()) {
-                v.set_index(index) ;
-                index++ ;
-            }
-        }
-        unsigned int n = index ;
-        A_ = new Matrix(n) ;
-        x_ = new Vector(n) ;
-        b_ = new Vector(n) ;
-        for(unsigned int i=0; i<n; i++) {
-            (*x_)[i] = 0 ;
-            (*b_)[i] = 0 ;
-        }
-        variables_to_vector() ;
-    }
-
-    void begin_row() {
-        transition(IN_SYSTEM, IN_ROW) ;
-        af_.clear() ;
-        if_.clear() ;
-        al_.clear() ;
-        xl_.clear() ;
-        bk_ = 0 ;
-    }
-
-    void set_right_hand_side(double b) {
-        check_state(IN_ROW) ;
-        bk_ = b ;
-    }
-
-    void add_coefficient(unsigned int iv, double a) {
-        check_state(IN_ROW) ;
-        Variable& v = variable(iv) ;
-        if(v.is_locked()) {
-            al_.push_back(a) ;
-            xl_.push_back(v.value()) ;
-        } else {
-            af_.push_back(a) ;
-            if_.push_back(v.index()) ;
-        }
-    }
-
-    void normalize_row(CoeffType weight = 1) {
-        check_state(IN_ROW) ;
-        CoeffType norm = 0.0 ;
-        unsigned int nf = af_.size() ;
-        for(unsigned int i=0; i<nf; i++) {
-            norm += af_[i] * af_[i] ;
-        }
-        unsigned int nl = al_.size() ;
-        for(unsigned int i=0; i<nl; i++) {
-            norm += al_[i] * al_[i] ;
-        }
-        norm = sqrt(norm) ;
-        CGAL_assertion( fabs(norm)>1e-40 );
-        scale_row(weight / norm) ;
-    }
-
-    void scale_row(CoeffType s) {
-        check_state(IN_ROW) ;
-        unsigned int nf = af_.size() ;
-         for(unsigned int i=0; i<nf; i++) {
-             af_[i] *= s ;
-         }
-         unsigned int nl = al_.size() ;
-         for(unsigned int i=0; i<nl; i++) {
-             al_[i] *= s ;
-         }
-         bk_ *= s ;
-    }
-
-    void end_row() {
-        if(least_squares_) {
-            unsigned int nf = af_.size() ;
-            unsigned int nl = al_.size() ;
-            for(unsigned int i=0; i<nf; i++) {
-                for(unsigned int j=0; j<nf; j++) {
-                    A_->add_coef(if_[i], if_[j], af_[i] * af_[j]) ;
-                }
-            }
-            CoeffType S = - bk_ ;
-            for(unsigned int j=0; j<nl; j++) {
-                S += al_[j] * xl_[j] ;
-            }
-            for(unsigned int i=0; i<nf; i++) {
-                (*b_)[if_[i]] -= af_[i] * S ;
-            }
-        } else {
-            unsigned int nf = af_.size() ;
-            unsigned int nl = al_.size() ;
-            for(unsigned int i=0; i<nf; i++) {
-                A_->add_coef(current_row_, if_[i], af_[i]) ;
-            }
-            (*b_)[current_row_] = bk_ ;
-            for(unsigned int i=0; i<nl; i++) {
-                (*b_)[current_row_] -= al_[i] * xl_[i] ;
-            }
-        }
-        current_row_++ ;
-        transition(IN_ROW, IN_SYSTEM) ;
-    }
-
-    void end_system() {
-        transition(IN_SYSTEM, CONSTRUCTED) ;
-    }
-
-    // ----------------------------- Solver -------------------------------
-
-    // Solves a linear system or minimizes a quadratic form.
-    // Return true on success.
-    // (modified for SparseLinearAlgebraTraits_d concept)
-    bool solve()
-    {
-        check_state(CONSTRUCTED) ;
-
-        // Solve the sparse linear system "A*X = B". On success, the solution is (1/D) * X.
-        Traits solver_traits;
-        CoeffType D;
-        bool success = solver_traits.linear_solver(*A_, *b_, *x_, D) ;
-        CGAL_assertion(D == 1.0);   // WARNING: this library does not support homogeneous coordinates!
-
-        vector_to_variables() ;
-
-        transition(CONSTRUCTED, SOLVED) ;
-
-        delete A_ ; A_ = NULL ;
-        delete b_ ; b_ = NULL ;
-        delete x_ ; x_ = NULL ;
-
-        return success;
-    }
-
-protected:
-
-    // ----------- Converting between user representation and the internal representation -----
-
-    void vector_to_variables() {
-        for(int ii=0; ii < nb_variables(); ii++) {
-            Variable& v = variable(ii) ;
-            if(!v.is_locked()) {
-                v.set_value( (*x_)[v.index()] ) ;
-            }
-        }
-    }
-
-    void variables_to_vector() {
-        for(int ii=0; ii < nb_variables(); ii++) {
-            Variable& v = variable(ii) ;
-            if(!v.is_locked()) {
-                (*x_)[v.index()] = v.value() ;
-            }
-        }
-    }
-
-    // ----------- Finite state automaton (checks that calling sequence is respected) ---------
-
-    std::string state_to_string(State s) {
-            switch(s) {
-            case INITIAL:
-                return "initial" ;
-            case IN_SYSTEM:
-                return "in system" ;
-            case IN_ROW:
-                return "in row" ;
-            case CONSTRUCTED:
-                return "constructed" ;
-            case SOLVED:
-                return "solved" ;
-            }
-            // Should not go there.
-            CGAL_error();
-            return "undefined" ;
-    }
-
-    void check_state(State s) {
-            CGAL_assertion(state_ == s) ;
-    }
-
-    void transition(State from, State to) {
-            check_state(from) ;
-            state_ = to ;
-    }
-
-private:
-
-    // --------------- parameters --------------------------
-    bool least_squares_ ;
-
-    // --------------- user representation --------------
-    unsigned int nb_variables_ ;
-    Variable* variable_ ;
-
-    // --------------- construction -----------------------
-    State state_ ;
-    unsigned int current_row_ ;
-    std::vector<CoeffType> af_ ;
-    std::vector<unsigned int> if_ ;
-    std::vector<CoeffType> al_ ;
-    std::vector<CoeffType> xl_ ;
-    double bk_ ;
-
-    // --------------- internal representation ---------
-    Matrix* A_ ;
-    Vector* x_ ;
-    Vector* b_ ;
-
-} ;
-
-
-} // namespace OpenNL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Origin.h b/3rdparty/CGAL-4.6/include/CGAL/Origin.h
deleted file mode 100644
index 70b3f94..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Origin.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-//                 Stefan Schirra
-
-#ifndef CGAL_ORIGIN_H
-#define CGAL_ORIGIN_H
-
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-class Origin
-{};
-
-CGAL_EXPORT extern const Origin ORIGIN;
-
-class Null_vector
-{};
-
-CGAL_EXPORT extern const Null_vector NULL_VECTOR;
-
-} //namespace CGAL
-
-#endif // CGAL_ORIGIN_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Orthogonal_incremental_neighbor_search.h b/3rdparty/CGAL-4.6/include/CGAL/Orthogonal_incremental_neighbor_search.h
deleted file mode 100644
index 9366757..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Orthogonal_incremental_neighbor_search.h
+++ /dev/null
@@ -1,620 +0,0 @@
-// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
-
-#ifndef CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH
-#define CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH
-
-#include <cstring>
-#include <list>
-#include <queue>
-#include <memory>
-#include <CGAL/Kd_tree.h>
-#include <CGAL/Euclidean_distance.h>
-#include <CGAL/tuple.h>
-
-namespace CGAL {
-
-  template <class SearchTraits, 
-            class Distance_= typename internal::Spatial_searching_default_distance<SearchTraits>::type,
-            class Splitter_ = Sliding_midpoint<SearchTraits>,
-            class Tree_= Kd_tree<SearchTraits, Splitter_, Tag_true> >
-  class Orthogonal_incremental_neighbor_search {
-
-  public:
-    typedef Splitter_ Splitter;
-    typedef Tree_  Tree;
-    typedef Distance_ Distance;
-    typedef typename SearchTraits::Point_d Point_d;
-    typedef typename Distance::Query_item Query_item;
-    typedef typename SearchTraits::FT FT;
-    typedef typename Tree::Point_d_iterator Point_d_iterator;
-    typedef typename Tree::Node_const_handle Node_const_handle;
-
-    typedef std::pair<Point_d,FT> Point_with_transformed_distance;
-    typedef CGAL::cpp11::tuple<Node_const_handle,FT,std::vector<FT> > Node_with_distance;
-    typedef std::vector<Node_with_distance*> Node_with_distance_vector;
-    typedef std::vector<Point_with_transformed_distance*> Point_with_transformed_distance_vector;
-
-    template<class T>
-    struct Object_wrapper
-    {   
-      T object;
-      Object_wrapper(const T& t):object(t){}
-      const T& operator* () const { return object; }
-      const T* operator-> () const { return &object; }
-    };
-
-    class Iterator_implementation {
-      SearchTraits traits;
-    public:
-
-      int number_of_neighbours_computed;
-      int number_of_internal_nodes_visited;
-      int number_of_leaf_nodes_visited;
-      int number_of_items_visited;
-
-    private:
-
-      typedef std::vector<FT> Distance_vector;
-    
-      Distance_vector dists;
-
-      Distance Orthogonal_distance_instance;
-    
-      FT multiplication_factor;
-
-      Query_item query_point;
-
-      FT distance_to_root;
-
-      bool search_nearest_neighbour;
-
-      FT rd;
-
-
-      class Priority_higher {
-      public:
-
-        bool search_nearest;
-
-        Priority_higher(bool search_the_nearest_neighbour) 
-	  : search_nearest(search_the_nearest_neighbour)
-	{} 
-
-        //highest priority is smallest distance
-        bool 
-	operator() (Node_with_distance* n1, Node_with_distance* n2) const
-	{
-	  return (search_nearest) ? (CGAL::cpp11::get<1>(*n1) > CGAL::cpp11::get<1>(*n2)) : (CGAL::cpp11::get<1>(*n2) > CGAL::cpp11::get<1>(*n1));
-        }
-      };
-
-      class Distance_smaller {
-
-      public:
-
-        bool search_nearest;
-
-        Distance_smaller(bool search_the_nearest_neighbour) 
-	  : search_nearest(search_the_nearest_neighbour)
-	{}
-
-        //highest priority is smallest distance
-        bool operator() (Point_with_transformed_distance* p1, Point_with_transformed_distance* p2) const
-	{
-	  return (search_nearest) ? (p1->second > p2->second) : (p2->second > p1->second);
-        }
-      };
-
-
-      std::priority_queue<Node_with_distance*, Node_with_distance_vector,
-	                  Priority_higher> PriorityQueue;
-
-    public:
-      std::priority_queue<Point_with_transformed_distance*, Point_with_transformed_distance_vector,
-	                  Distance_smaller> Item_PriorityQueue;
-
-
-    public:
-
-      int reference_count;
-
-    
-
-      // constructor
-      Iterator_implementation(const Tree& tree,const Query_item& q, const Distance& tr,
-			      FT Eps=FT(0.0), bool search_nearest=true)
-	: traits(tree.traits()),number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), 
-	number_of_leaf_nodes_visited(0), number_of_items_visited(0),
-	Orthogonal_distance_instance(tr), multiplication_factor(Orthogonal_distance_instance.transformed_distance(FT(1.0)+Eps)), 
-	query_point(q), search_nearest_neighbour(search_nearest), 
-	PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)),
-	reference_count(1)
-	  
-	  
-      {
-        if (tree.empty()) return;
-
-        typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits.construct_cartesian_const_iterator_d_object();
-        int dim = static_cast<int>(std::distance(ccci(q), ccci(q,0)));
-
-        dists.resize(dim);
-        for(int i=0 ; i<dim ; ++i){
-          dists[i] = 0;
-        }
-        
-        if (search_nearest){ 
-	  distance_to_root=
-	    Orthogonal_distance_instance.min_distance_to_rectangle(q, tree.bounding_box(),dists);
-          Node_with_distance *The_Root = new Node_with_distance(tree.root(),
-							        distance_to_root, dists);
-          PriorityQueue.push(The_Root);
-
-          // rd is the distance of the top of the priority queue to q
-          rd=CGAL::cpp11::get<1>(*The_Root);
-          Compute_the_next_nearest_neighbour();
-        }
-         else{
-           distance_to_root=
-   	 Orthogonal_distance_instance.max_distance_to_rectangle(q,
-						tree.bounding_box());
-           Node_with_distance *The_Root = new Node_with_distance(tree.root(),
-                                                                 distance_to_root, dists);
-        PriorityQueue.push(The_Root);
-
-        // rd is the distance of the top of the priority queue to q
-        rd=CGAL::cpp11::get<1>(*The_Root);
-        Compute_the_next_furthest_neighbour();
-         }
-
-        
-      }
-
-      // * operator
-      const Point_with_transformed_distance& 
-      operator* () const 
-      {
-	return *(Item_PriorityQueue.top());
-      }
-
-      // prefix operator
-      Iterator_implementation& 
-      operator++() 
-      {
-        Delete_the_current_item_top();
-        if(search_nearest_neighbour)
-          Compute_the_next_nearest_neighbour();
-        else
-          Compute_the_next_furthest_neighbour();
-        return *this;
-      }
-
-      // postfix operator
-      Object_wrapper<Point_with_transformed_distance>
-      operator++(int) 
-      {
-        Object_wrapper<Point_with_transformed_distance> result( *(Item_PriorityQueue.top()) );
-        ++*this;
-        return result;
-      }
-
-      // Print statistics of the general priority search process.
-      std::ostream& 
-      statistics (std::ostream& s) const {
-    	s << "Orthogonal priority search statistics:" 
-	  << std::endl;
-    	s << "Number of internal nodes visited:" 
-	  << number_of_internal_nodes_visited << std::endl;
-    	s << "Number of leaf nodes visited:" 
-	  << number_of_leaf_nodes_visited << std::endl;
-    	s << "Number of items visited:" 
-	  << number_of_items_visited << std::endl;
-        s << "Number of neighbours computed:" 
-	  << number_of_neighbours_computed << std::endl;
-        return s;
-      }
-
-
-      //destructor
-      ~Iterator_implementation() 
-      {
-	while (!PriorityQueue.empty()) {
-	  Node_with_distance* The_top=PriorityQueue.top();
-	  PriorityQueue.pop();
-	  delete The_top;
-	}
-	while (!Item_PriorityQueue.empty()) {
-	  Point_with_transformed_distance* The_top=Item_PriorityQueue.top();
-	  Item_PriorityQueue.pop();
-	  delete The_top;
-        }
-      }
-
-    private:
-
-      void 
-      Delete_the_current_item_top() 
-      {
-        Point_with_transformed_distance* The_item_top=Item_PriorityQueue.top();
-        Item_PriorityQueue.pop();
-        delete The_item_top;
-      }
-
-      void 
-      Compute_the_next_nearest_neighbour() 
-      {
-        // compute the next item
-        bool next_neighbour_found=false;
-        if (!(Item_PriorityQueue.empty())) {
-	    next_neighbour_found=
-	      (multiplication_factor*rd > Item_PriorityQueue.top()->second);
-        }
-	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object();
-	typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point);
-        // otherwise browse the tree further
-        while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
-	  Node_with_distance* The_node_top=PriorityQueue.top();
-	  Node_const_handle N= CGAL::cpp11::get<0>(*The_node_top);
-          dists = CGAL::cpp11::get<2>(*The_node_top);
-	  PriorityQueue.pop();
-	  delete The_node_top;
-	  FT copy_rd=rd;
-	  while (!(N->is_leaf())) { // compute new distance
-            typename Tree::Internal_node_const_handle node =
-            static_cast<typename Tree::Internal_node_const_handle>(N);
-	    number_of_internal_nodes_visited++;
-	    int new_cut_dim=node->cutting_dimension();
-	    FT new_rd,dst = dists[new_cut_dim];
-	    FT val = *(query_point_it + new_cut_dim);
-            FT diff1 = val - node->high_value();
-            FT diff2 = val - node->low_value();
-	    if (diff1 + diff2 < FT(0.0)) {
-              new_rd=
-		Orthogonal_distance_instance.new_distance(copy_rd,dst,diff1,new_cut_dim);
-                
-	      CGAL_assertion(new_rd >= copy_rd);
-                dists[new_cut_dim] = diff1;
-                Node_with_distance *Upper_Child =
-		  new Node_with_distance(node->upper(), new_rd, dists);
-		PriorityQueue.push(Upper_Child);
-                dists[new_cut_dim] = dst;
-		N=node->lower();
-
-	    }
-	    else { // compute new distance
-	      new_rd=Orthogonal_distance_instance.new_distance(copy_rd,dst,diff2,new_cut_dim);  
-	      CGAL_assertion(new_rd >= copy_rd);
-                dists[new_cut_dim] = diff2;
-		Node_with_distance *Lower_Child =
-		  new Node_with_distance(node->lower(), new_rd, dists);
-		PriorityQueue.push(Lower_Child);
-                dists[new_cut_dim] = dst;
-		N=node->upper();
-	    }
-	  }
-	  // n is a leaf
-          typename Tree::Leaf_node_const_handle node =
-            static_cast<typename Tree::Leaf_node_const_handle>(N);
-	  number_of_leaf_nodes_visited++;
-	  if (node->size() > 0) {
-	    for (typename Tree::iterator it=node->begin(); it != node->end(); it++) {
-	      number_of_items_visited++;
-	      FT distance_to_query_point=
-		Orthogonal_distance_instance.transformed_distance(query_point,*it);
-	      Point_with_transformed_distance *NN_Candidate=
-		new Point_with_transformed_distance(*it,distance_to_query_point);
-	      Item_PriorityQueue.push(NN_Candidate);
-	    }
-	    // old top of PriorityQueue has been processed,
-	    // hence update rd
-                
-	    if (!(PriorityQueue.empty()))  {
-	      rd = CGAL::cpp11::get<1>(*PriorityQueue.top());
-		next_neighbour_found =
-                  (multiplication_factor*rd > 
-		   Item_PriorityQueue.top()->second);
-	    }
-	    else // priority queue empty => last neighbour found
-	      {
-		next_neighbour_found=true;
-	      }
-
-	    number_of_neighbours_computed++;
-	  }
-        }   // next_neighbour_found or priority queue is empty
-        // in the latter case also the item priority quee is empty
-      }
-
-
-      void 
-      Compute_the_next_furthest_neighbour() 
-      {
-        // compute the next item
-        bool next_neighbour_found=false;
-        if (!(Item_PriorityQueue.empty())) {
-	    next_neighbour_found=
-	      (rd < multiplication_factor*Item_PriorityQueue.top()->second);
-        }
-	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object();
-	typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point);
-        // otherwise browse the tree further
-        while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
-	  Node_with_distance* The_node_top=PriorityQueue.top();
-	  Node_const_handle N= CGAL::cpp11::get<0>(*The_node_top);
-          dists = CGAL::cpp11::get<2>(*The_node_top);
-	  PriorityQueue.pop();
-	  delete The_node_top;
-	  FT copy_rd=rd;
-	  while (!(N->is_leaf())) { // compute new distance
-            typename Tree::Internal_node_const_handle node =
-              static_cast<typename Tree::Internal_node_const_handle>(N);
-	    number_of_internal_nodes_visited++;
-	    int new_cut_dim=node->cutting_dimension();
-	    FT new_rd,dst = dists[new_cut_dim];
-	    FT val = *(query_point_it + new_cut_dim);
-            FT diff1 = val - node->high_value();
-            FT diff2 = val - node->low_value();
-	    if (diff1 + diff2 < FT(0.0)) {
-              new_rd=
-		Orthogonal_distance_instance.new_distance(copy_rd,dst,diff1,new_cut_dim);
-                
-	      CGAL_assertion(new_rd >= copy_rd);
-		Node_with_distance *Lower_Child =
-		  new Node_with_distance(node->lower(), copy_rd, dists);
-		PriorityQueue.push(Lower_Child);
-		N=node->upper();
-                dists[new_cut_dim] = diff1;
-		copy_rd=new_rd;
-
-	    }
-	    else { // compute new distance
-	      new_rd=Orthogonal_distance_instance.new_distance(copy_rd,dst,diff2,new_cut_dim);  
-	      CGAL_assertion(new_rd >= copy_rd);
-		Node_with_distance *Upper_Child =
-		  new Node_with_distance(node->upper(), copy_rd, dists);
-		PriorityQueue.push(Upper_Child);
-		N=node->lower();
-                dists[new_cut_dim] = diff2;
-		copy_rd=new_rd;
-	    }
-	  }
-	  // n is a leaf
-          typename Tree::Leaf_node_const_handle node =
-            static_cast<typename Tree::Leaf_node_const_handle>(N);
-	  number_of_leaf_nodes_visited++;
-	  if (node->size() > 0) {
-	    for (typename Tree::iterator it=node->begin(); it != node->end(); it++) {
-	      number_of_items_visited++;
-	      FT distance_to_query_point=
-		Orthogonal_distance_instance.transformed_distance(query_point,*it);
-	      Point_with_transformed_distance *NN_Candidate=
-		new Point_with_transformed_distance(*it,distance_to_query_point);
-	      Item_PriorityQueue.push(NN_Candidate);
-	    }
-	    // old top of PriorityQueue has been processed,
-	    // hence update rd
-                
-	    if (!(PriorityQueue.empty()))  {
-	      rd = CGAL::cpp11::get<1>(*PriorityQueue.top());
-		next_neighbour_found =
-                  (multiplication_factor*rd < 
-		   Item_PriorityQueue.top()->second);
-	    }
-	    else // priority queue empty => last neighbour found
-	      {
-		next_neighbour_found=true;
-	      }
-
-	    number_of_neighbours_computed++;
-	  }
-        }   // next_neighbour_found or priority queue is empty
-        // in the latter case also the item priority quee is empty
-      }
-    }; // class Iterator_implementaion
-  
-
-
-
-
-
-    class iterator;
-
-    
-
-  public:
-
-    // constructor
-    Orthogonal_incremental_neighbor_search(const Tree& tree,  
-					   const Query_item& q, FT Eps = FT(0.0), 
-					   bool search_nearest=true, const Distance& tr=Distance())
-      : m_tree(tree),m_query(q),m_dist(tr),m_Eps(Eps),m_search_nearest(search_nearest)
-    {}
-
-    iterator 
-    begin() 
-    {
-      return iterator(m_tree,m_query,m_dist,m_Eps,m_search_nearest);
-    }
-
-    iterator 
-    end() 
-    {
-      return iterator();
-    }
-
-    std::ostream& 
-    statistics(std::ostream& s) 
-    {
-      begin()->statistics(s);
-      return s;
-    }
-
-
-
-
-    class iterator {
-
-    public:
-
-      typedef std::input_iterator_tag iterator_category;
-      typedef Point_with_transformed_distance       value_type;
-      typedef Point_with_transformed_distance*      pointer;
-      typedef const Point_with_transformed_distance&      reference;
-      typedef std::size_t               size_type;
-      typedef std::ptrdiff_t            difference_type;
-      typedef int distance_type;
-
-      //class Iterator_implementation;
-      Iterator_implementation *Ptr_implementation;
-
-
-    public:
-
-      // default constructor
-      iterator() 
-      : Ptr_implementation(0)
-      {}
-
-      int 
-      the_number_of_items_visited() 
-      {
-        return Ptr_implementation->number_of_items_visited;
-      }
-
-      // constructor
-      iterator(const Tree& tree,const Query_item& q, const Distance& tr=Distance(), FT eps=FT(0.0), 
-	       bool search_nearest=true)
-	: Ptr_implementation(new Iterator_implementation(tree, q, tr, eps, search_nearest))
-	{}
-
-      // copy constructor
-      iterator(const iterator& Iter) 
-      {
-        Ptr_implementation = Iter.Ptr_implementation;
-        if (Ptr_implementation != 0) Ptr_implementation->reference_count++;
-      }
-
-      iterator& operator=(const iterator& Iter)
-      {
-        if (Ptr_implementation != Iter.Ptr_implementation){
-          if (Ptr_implementation != 0 && --(Ptr_implementation->reference_count)==0) {
-              delete Ptr_implementation;
-          }
-          Ptr_implementation = Iter.Ptr_implementation;
-          if (Ptr_implementation != 0) Ptr_implementation->reference_count++;
-        }
-        return *this;
-      }      
-      
-      
-      const Point_with_transformed_distance& 
-      operator* () const 
-      {
-	return *(*Ptr_implementation);
-      }
-      
-      // -> operator
-      const Point_with_transformed_distance*
-      operator-> () const 
-      {
-	return &*(*Ptr_implementation);
-      }
-
-      // prefix operator
-      iterator& 
-      operator++() 
-      {
-        ++(*Ptr_implementation);
-        return *this;
-      }
-
-      // postfix operator
-      Object_wrapper<Point_with_transformed_distance>
-      operator++(int) 
-      {
-	return (*Ptr_implementation)++;
-      }
-
-
-      bool 
-      operator==(const iterator& It) const 
-      {
-        if (
-	    ((Ptr_implementation == 0) || 
-	     Ptr_implementation->Item_PriorityQueue.empty()) &&
-	    ((It.Ptr_implementation == 0) ||  
-	     It.Ptr_implementation->Item_PriorityQueue.empty())
-	    )
-	  return true;
-        // else
-        return (Ptr_implementation == It.Ptr_implementation);
-      }
-
-      bool 
-      operator!=(const iterator& It) const 
-      {
-        return !(*this == It);
-      }
-
-      std::ostream& 
-      statistics (std::ostream& s) 
-      {
-    	Ptr_implementation->statistics(s);
-        return s;
-      }
-
-      ~iterator() 
-      {
-        if (Ptr_implementation != 0) {
-	  Ptr_implementation->reference_count--;
-	  if (Ptr_implementation->reference_count==0) {
-	    delete Ptr_implementation;
-	    Ptr_implementation = 0;
-	  }
-        }
-      }
-
-
-    }; // class iterator
-
-    //data members
-    const Tree& m_tree;
-    Query_item m_query;
-    Distance m_dist;
-    FT m_Eps; 
-    bool m_search_nearest;
-  }; // class 
-
-  template <class Traits, class Query_item, class Distance>
-  void swap (typename Orthogonal_incremental_neighbor_search<Traits, 
-	     Query_item, Distance>::iterator& x,
-	     typename Orthogonal_incremental_neighbor_search<Traits, 
-	     Query_item, Distance>::iterator& y) 
-  {
-    typename Orthogonal_incremental_neighbor_search<Traits, 
-      Query_item, Distance>::iterator::Iterator_implementation
-      *tmp = x.Ptr_implementation;
-    x.Ptr_implementation  = y.Ptr_implementation;
-    y.Ptr_implementation = tmp;
-  }
-
-} // namespace CGAL
-
-#endif // CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/PCA_util.h b/3rdparty/CGAL-4.6/include/CGAL/PCA_util.h
deleted file mode 100644
index 5a4b3b5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/PCA_util.h
+++ /dev/null
@@ -1,755 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
-
-#include <CGAL/eigen.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-namespace internal {
-
-// Initialize a matrix in n dimension by an array or numbers
-template <typename K>
-typename CGAL::Linear_algebraCd<typename K::FT>::Matrix
-init_matrix(const int n,
-            typename K::FT entries[])
-{
-  CGAL_assertion(n > 1); // dimension > 1
-  typedef typename CGAL::Linear_algebraCd<typename K::FT>::Matrix Matrix;
-
-  Matrix m(n);
-  int i,j;
-  for(i = 0; i < n; i++) 
-    for(j = 0; j < n; j++)
-      m[i][j] = entries[i*n+j];
-
-  return m;
-} // end initialization of matrix
-
-// assemble covariance matrix from a point set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K& ,                    // kernel
-                             const typename K::Point_3*,   // used for indirection
-                             const CGAL::Dimension_tag<0>&)
-{
-  typedef typename K::FT       FT;
-  typedef typename K::Point_3  Point;
-  typedef typename K::Vector_3 Vector;
-
-  // Matrix numbering:
-  // 0          
-  // 1 2
-  // 3 4 5          
-  covariance[0] = covariance[1] = covariance[2] = 
-  covariance[3] = covariance[4] = covariance[5] = (FT)0.0;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Point& p = *it;
-    Vector d = p - c;
-    covariance[0] += d.x() * d.x();
-    covariance[1] += d.x() * d.y();
-    covariance[2] += d.y() * d.y();
-    covariance[3] += d.x() * d.z();
-    covariance[4] += d.y() * d.z();
-    covariance[5] += d.z() * d.z();
-  }
-}
-
-// assemble covariance matrix from a triangle set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K&,                    // kernel
-                             const typename K::Triangle_3*,// used for indirection
-                             const CGAL::Dimension_tag<2>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Triangle_3  Triangle;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all triangles and their combined mass
-  FT mass = 0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {1.0/12.0, 1.0/24.0, 1.0/24.0,
-                1.0/24.0, 1.0/12.0, 1.0/24.0,
-                1.0/24.0, 1.0/24.0, 1.0/12.0};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each triangle, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Triangle& t = *it;
-
-    // defined for convenience.
-    FT delta[9] = {t[0].x(), t[1].x(), t[2].x(), 
-                   t[0].y(), t[1].y(), t[2].y(),
-                   t[0].z(), t[1].z(), t[2].z()};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT area = std::sqrt(t.squared_area());
-
-		// skip zero measure primitives
-    if(area == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = 2 * area * transformation * moment * LA::transpose(transformation);
-    
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0];
-    covariance[1] += transformation[1][0];
-    covariance[2] += transformation[1][1];
-    covariance[3] += transformation[2][0];
-    covariance[4] += transformation[2][1];
-    covariance[5] += transformation[2][2];
-
-    mass += area;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-
-}
-
-// assemble covariance matrix from a cuboid set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K& ,                    // kernel
-                             const typename K::Iso_cuboid_3*,// used for indirection
-                             const CGAL::Dimension_tag<3>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Iso_cuboid_3    Iso_cuboid;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  // final combined covariance matrix for all cuboids and their combined mass
-  FT mass = (FT)0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {(FT)(1.0/3.0), (FT)(1.0/4.0), (FT)(1.0/4.0),
-								(FT)(1.0/4.0), (FT)(1.0/3.0), (FT)(1.0/4.0),
-                (FT)(1.0/4.0), (FT)(1.0/4.0), (FT)(1.0/3.0)};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each cuboid, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Iso_cuboid& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT x0 = t[0].x();
-    FT y0 = t[0].y();
-    FT z0 = t[0].z();
-    FT delta[9] = {t[1].x()-x0, t[3].x()-x0, t[5].x()-x0, 
-                   t[1].y()-y0, t[3].y()-y0, t[5].y()-y0,
-                   t[1].z()-z0, t[3].z()-z0, t[5].z()-z0};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT volume = t.volume();
-
-		// skip zero measure primitives
-    if(volume == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the cuboid wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = volume * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the minimum corner (x0,y0,z0) of the cuboid.
-    FT xav0 = (delta[0] + delta[1] + delta[2])/4.0;
-    FT yav0 = (delta[3] + delta[4] + delta[5])/4.0;
-    FT zav0 = (delta[6] + delta[7] + delta[8])/4.0;
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0);
-    covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0);
-    covariance[2] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0);
-    covariance[3] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0);
-    covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0);
-    covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0);
-
-    mass += volume;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (- c.x() * c.x());
-  covariance[1] += mass * (- c.x() * c.y());
-  covariance[2] += mass * (- c.y() * c.y());
-  covariance[3] += mass * (- c.z() * c.x());
-  covariance[4] += mass * (- c.z() * c.y());
-  covariance[5] += mass * (- c.z() * c.z());
-}
-
-// assemble covariance matrix from a cuboid set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K& ,                    // kernel
-                             const typename K::Iso_cuboid_3*,// used for indirection
-                             const CGAL::Dimension_tag<2>&)
-{
-  typedef typename K::FT FT;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all cuboids and their combined mass
-  FT mass = (FT)0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {(FT)(7.0/3.0), (FT)1.5,       (FT)1.5,
-                (FT)1.5,       (FT)(7.0/3.0), (FT)1.5,
-                (FT)1.5,       (FT)1.5,       (FT)(7.0/3.0)};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each cuboid, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Iso_cuboid& t = *it;
-
-    // defined for convenience.
-    FT x0 = t[0].x();
-    FT y0 = t[0].y();
-    FT z0 = t[0].z();
-    FT delta[9] = {t[1].x()-x0, t[3].x()-x0, t[5].x()-x0, 
-                   t[1].y()-y0, t[3].y()-y0, t[5].y()-y0,
-                   t[1].z()-z0, t[3].z()-z0, t[5].z()-z0};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT area = std::pow(delta[0]*delta[0] + delta[3]*delta[3] +
-                  delta[6]*delta[6],1/3.0)*std::pow(delta[1]*delta[1] +
-                  delta[4]*delta[4] + delta[7]*delta[7],1/3.0)*2 +
-                  std::pow(delta[0]*delta[0] + delta[3]*delta[3] +
-                  delta[6]*delta[6],1/3.0)*std::pow(delta[2]*delta[2] +
-                  delta[5]*delta[5] + delta[8]*delta[8],1/3.0)*2 +
-                  std::pow(delta[1]*delta[1] + delta[4]*delta[4] +
-                  delta[7]*delta[7],1/3.0)*std::pow(delta[2]*delta[2] +
-                  delta[5]*delta[5] + delta[8]*delta[8],1/3.0)*2;
-
-		// skip zero measure primitives
-    if(area == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the cuboid wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = area * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the minimum corner (x0,y0,z0) of the cuboid.
-    FT xav0 = (delta[0] + delta[1] + delta[2])/4.0;
-    FT yav0 = (delta[3] + delta[4] + delta[5])/4.0;
-    FT zav0 = (delta[6] + delta[7] + delta[8])/4.0;
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + area * (2*x0*xav0 + x0*x0);
-    covariance[1] += transformation[1][0] + area * (xav0*y0 + yav0*x0 + x0*y0);
-    covariance[2] += transformation[1][1] + area * (2*y0*yav0 + y0*y0);
-    covariance[3] += transformation[2][0] + area * (x0*zav0 + xav0*z0 + x0*z0);
-    covariance[4] += transformation[2][1] + area * (yav0*z0 + y0*zav0 + z0*y0);
-    covariance[5] += transformation[2][2] + area * (2*zav0*z0 + z0*z0);
-
-    mass += area;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-
-}
-
-// assemble covariance matrix from a sphere set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K&,                     // kernel
-                             const typename K::Sphere_3*,  // used for indirection
-                             const CGAL::Dimension_tag<3>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3  Sphere;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all spheres and their combined mass
-  FT mass = 0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {4.0/15.0, 0.0,      0.0,
-                0.0,      4.0/15.0, 0.0,
-                0.0,      0.0,      4.0/15.0};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each sphere, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Sphere& t = *it;
-
-    // defined for convenience.
-    FT radius = std::sqrt(t.squared_radius());
-    FT delta[9] = {radius, 0.0, 0.0, 
-                   0.0, radius, 0.0,
-                   0.0, 0.0, radius};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT volume = (FT)(4.0/3.0) * radius * t.squared_radius();
-
-		// skip zero measure primitives
-    if(volume == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = (3.0/4.0) * volume * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the sphere.
-    FT x0 = t.center().x();
-    FT y0 = t.center().y();
-    FT z0 = t.center().z();
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + volume * x0*x0;
-    covariance[1] += transformation[1][0] + volume * x0*y0;
-    covariance[2] += transformation[1][1] + volume * y0*y0;
-    covariance[3] += transformation[2][0] + volume * x0*z0;
-    covariance[4] += transformation[2][1] + volume * z0*y0;
-    covariance[5] += transformation[2][2] + volume * z0*z0;
-
-    mass += volume;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-
-}
-// assemble covariance matrix from a sphere set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K&,                     // kernel
-                             const typename K::Sphere_3*,  // used for indirection
-                             const CGAL::Dimension_tag<2>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3  Sphere;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all spheres and their combined mass
-  FT mass = 0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {4.0/3.0, 0.0,     0.0,
-                0.0,     4.0/3.0, 0.0,
-                0.0,     0.0,     4.0/3.0};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each sphere, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Sphere& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT radius = std::sqrt(t.squared_radius());
-    FT delta[9] = {radius, 0.0,    0.0, 
-                   0.0,    radius, 0.0,
-                   0.0,    0.0,    radius};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT area = (FT)4.0 * t.squared_radius();
-
-		// skip zero measure primitives
-    if(area == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = (1.0/4.0) * area * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the sphere.
-    FT x0 = t.center().x();
-    FT y0 = t.center().y();
-    FT z0 = t.center().z();
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + area * x0*x0;
-    covariance[1] += transformation[1][0] + area * x0*y0;
-    covariance[2] += transformation[1][1] + area * y0*y0;
-    covariance[3] += transformation[2][0] + area * x0*z0;
-    covariance[4] += transformation[2][1] + area * z0*y0;
-    covariance[5] += transformation[2][2] + area * z0*z0;
-
-    mass += area;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-
-}
-
-// assemble covariance matrix from a tetrahedron set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K& ,                    // kernel
-                             const typename K::Tetrahedron_3*,// used for indirection
-                             const CGAL::Dimension_tag<3>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Tetrahedron_3  Tetrahedron;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all tetrahedrons and their combined mass
-  FT mass = 0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {1.0/60.0,  1.0/120.0, 1.0/120.0,
-                1.0/120.0, 1.0/60.0,  1.0/120.0,
-                1.0/120.0, 1.0/120.0, 1.0/60.0};
-  Matrix moment = init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each tetrahedron, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Tetrahedron& t = *it;
-
-    // defined for convenience.
-    FT x0 = t[0].x();
-    FT y0 = t[0].y();
-    FT z0 = t[0].z();
-
-    FT delta[9] = {t[1].x()-x0, t[2].x()-x0, t[3].x()-x0, 
-                   t[1].y()-y0, t[2].y()-y0, t[3].y()-y0,
-                   t[1].z()-z0, t[2].z()-z0, t[3].z()-z0};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT volume = t.volume();
-
-		// skip zero measure primitives
-    if(volume == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the tetrahedron wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = 6 * volume * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the tetrahedron.
-    FT xav0 = (delta[0]+delta[1]+delta[2])/4.0;
-    FT yav0 = (delta[3]+delta[4]+delta[5])/4.0;
-    FT zav0 = (delta[6]+delta[7]+delta[8])/4.0;
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0);
-    covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0);
-    covariance[2] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0);
-    covariance[3] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0);
-    covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0);
-    covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0);
-
-    mass += volume;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-}
-
-// assemble covariance matrix from a segment set 
-template < typename InputIterator,
-           typename K >
-void
-assemble_covariance_matrix_3(InputIterator first,
-                             InputIterator beyond, 
-                             typename K::FT covariance[6], // covariance matrix
-                             const typename K::Point_3& c, // centroid
-                             const K& ,                    // kernel
-                             const typename K::Segment_3*,// used for indirection
-                             const CGAL::Dimension_tag<1>&)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Segment_3  Segment;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2 
-  // 3 4 5
-  //Final combined covariance matrix for all segments and their combined mass
-  FT mass = 0.0;
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[9] = {1.0, 0.5, 0.0,
-                0.5, 1.0, 0.0,
-                0.0, 0.0, 0.0};
-  Matrix moment = (FT)(1.0/3.0) * init_matrix<K>(3,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each segment, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Segment& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT delta[9] = {t[0].x(), t[1].x(), 0.0, 
-       t[0].y(), t[1].y(), 0.0,
-                   t[0].z(), t[1].z(), 1.0};
-    Matrix transformation = init_matrix<K>(3,delta);
-    FT length = std::sqrt(t.squared_length());
-
-		// skip zero measure primitives
-    if(length == (FT)0.0)
-			continue;
-
-    // Find the 2nd order moment for the segment wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = length * transformation * moment * LA::transpose(transformation);
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0];
-    covariance[1] += transformation[1][0];
-    covariance[2] += transformation[1][1];
-    covariance[3] += transformation[2][0];
-    covariance[4] += transformation[2][1];
-    covariance[5] += transformation[2][2];
-
-    mass += length;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-  covariance[3] += mass * (-1.0 * c.z() * c.x());
-  covariance[4] += mass * (-1.0 * c.z() * c.y());
-  covariance[5] += mass * (-1.0 * c.z() * c.z());
-
-}
-
-
-// compute the eigen values and vectors of the covariance 
-// matrix and deduces the best linear fitting plane.
-// returns fitting quality
-template < typename K >
-typename K::FT
-fitting_plane_3(const typename K::FT covariance[6], // covariance matrix
-                const typename K::Point_3& c,       // centroid
-                typename K::Plane_3& plane,         // best fit plane
-                const K& )                          // kernel
-{
-  typedef typename K::FT       FT;
-  typedef typename K::Plane_3  Plane;
-  typedef typename K::Vector_3 Vector;
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  FT eigen_values[3];
-  FT eigen_vectors[9];
-  eigen_symmetric<FT>(covariance,3,eigen_vectors,eigen_values);
-
-  // degenerate case 
-  if(eigen_values[0] == eigen_values[1] && 
-     eigen_values[1] == eigen_values[2])
-  {
-    // assemble a default horizontal plane that goes
-    // through the centroid.
-    plane = Plane(c,Vector(FT(0),FT(0),FT(1)));
-    return FT(0);
-  } 
-  else // regular and line case
-  {
-    Vector normal(eigen_vectors[6],
-                  eigen_vectors[7],
-                  eigen_vectors[8]);
-    plane = Plane(c,normal);
-    return FT(1) - eigen_values[2] / eigen_values[1];
-  } // end regular case
-}
-
-// compute the eigen values and vectors of the covariance 
-// matrix and deduces the best linear fitting line
-// (this is an internal function)
-// returns fitting quality
-template < typename K >
-typename K::FT
-fitting_line_3(const typename K::FT covariance[6], // covariance matrix
-               const typename K::Point_3& c,       // centroid
-               typename K::Line_3& line,           // best fit line
-               const K&)                           // kernel
-{
-  typedef typename K::FT       FT;
-  typedef typename K::Line_3   Line;
-  typedef typename K::Vector_3 Vector;
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  FT eigen_values[3];
-  FT eigen_vectors[9];
-  eigen_symmetric<FT>(covariance,3,eigen_vectors,eigen_values);
-
-    // isotropic case (infinite number of directions)
-  if(eigen_values[0] == eigen_values[1] && 
-     eigen_values[0] == eigen_values[2])
-  {
-    // assemble a default line along x axis which goes
-    // through the centroid.
-    line = Line(c,Vector(FT(1),FT(0),FT(0)));
-    return (FT)0.0;
-  }
-  else
-  {
-    // regular case
-    Vector direction(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]);
-    line = Line(c,direction);
-    return (FT)1.0 - eigen_values[1] / eigen_values[0];
-  } 
-}
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_vertex.h b/3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_vertex.h
deleted file mode 100644
index 6296e5c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_vertex.h
+++ /dev/null
@@ -1,441 +0,0 @@
-// Copyright (c) 2005  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
-
-
-#ifndef CGAL_PARAM_MESH_PATCH_VERTEX_H
-#define CGAL_PARAM_MESH_PATCH_VERTEX_H
-
-#include <CGAL/surface_mesh_parameterization_assertions.h>
-
-#include <list>
-
-namespace CGAL {
-
-/// \cond SKIP_IN_MANUAL
-
-// Forward reference
-template<class ParameterizationPatchableMesh_3> class Param_mesh_patch_vertex_const_handle;
-
-
-/// The class Param_mesh_patch_vertex represents a vertex
-/// of a Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> mesh.
-///
-/// Implementation note:
-/// A Param_mesh_patch_vertex object is basically a handle to a
-/// ParameterizationPatchableMesh_3::Vertex + its position / seam.
-/// Param_mesh_patch_vertex comparison methods compare the pointers.
-///
-template<class ParameterizationPatchableMesh_3>
-class Param_mesh_patch_vertex
-{
-// Private types
-private:
-
-    typedef Param_mesh_patch_vertex         Self;
-
-// Public types
-public:
-
-    /// Export template parameter type
-    typedef ParameterizationPatchableMesh_3 Adaptor;
-
-// Public operations
-public:
-
-    /// Default constructor
-    Param_mesh_patch_vertex()
-    {
-        m_vertex            = NULL;
-        m_last_cw_neighbor  = NULL;
-        m_first_cw_neighbor = NULL;
-    }
-
-    /// Constructor:
-    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
-    ///   must be NULL
-    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
-    /// defines the range of the valid neighbors of adaptor_vertex (included).
-    explicit Param_mesh_patch_vertex(
-        typename Adaptor::Vertex_handle adaptor_vertex,
-        typename Adaptor::Vertex_handle last_cw_neighbor  = typename Adaptor::Vertex_handle(),
-        typename Adaptor::Vertex_handle first_cw_neighbor = typename Adaptor::Vertex_handle())
-    {
-        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
-        CGAL_surface_mesh_parameterization_assertion( (last_cw_neighbor == NULL) ==
-                                                      (first_cw_neighbor == NULL) );
-
-        m_vertex            = adaptor_vertex;
-        m_last_cw_neighbor  = last_cw_neighbor;
-        m_first_cw_neighbor = first_cw_neighbor;
-    }
-
-    /// Copy constructor
-    Param_mesh_patch_vertex(const Self& hdl)
-    {
-        m_vertex            = hdl.m_vertex;
-        m_last_cw_neighbor  = hdl.m_last_cw_neighbor;
-        m_first_cw_neighbor = hdl.m_first_cw_neighbor;
-    }
-
-    /// operator =()
-    Self& operator =(const Self& hdl)
-    {
-        m_vertex            = hdl.m_vertex;
-        m_last_cw_neighbor  = hdl.m_last_cw_neighbor;
-        m_first_cw_neighbor = hdl.m_first_cw_neighbor;
-
-        return *this;
-    }
-
-    /// Comparison
-    bool operator==(const Param_mesh_patch_vertex& vertex) const {
-        return m_vertex            == vertex.m_vertex
-            && m_last_cw_neighbor  == vertex.m_last_cw_neighbor
-            && m_first_cw_neighbor == vertex.m_first_cw_neighbor;
-    }
-    bool operator!=(const Param_mesh_patch_vertex& vertex) const {
-        return ! (*this == vertex);
-    }
-
-    /// Get content
-    typename Adaptor::Vertex_handle vertex() {
-        return m_vertex;
-    }
-    typename Adaptor::Vertex_const_handle vertex() const {
-        return m_vertex;
-    }
-    typename Adaptor::Vertex_handle last_cw_neighbor() {
-        return m_last_cw_neighbor;
-    }
-    typename Adaptor::Vertex_const_handle last_cw_neighbor() const {
-        return m_last_cw_neighbor;
-    }
-    typename Adaptor::Vertex_handle first_cw_neighbor() {
-        return m_first_cw_neighbor;
-    }
-    typename Adaptor::Vertex_const_handle first_cw_neighbor() const {
-        return m_first_cw_neighbor;
-    }
-
-// Fields
-private:
-    /// The decorated vertex
-    typename Adaptor::Vertex_handle m_vertex;
-
-    /// [m_first_cw_neighbor, m_last_cw_neighbor] defines the range of the valid
-    /// neighbors of m_vertex (included) if m_vertex is on the main border/seam
-    /// (NULL if inner vertex)
-    typename Adaptor::Vertex_handle m_last_cw_neighbor;
-    typename Adaptor::Vertex_handle m_first_cw_neighbor;
-
-}; // Param_mesh_patch_vertex
-
-
-/// Param_mesh_patch_vertex_handle represents a handle to a
-/// Param_mesh_patch_vertex object, thus has the same behavior
-/// as Param_mesh_patch_vertex* pointer type.
-///
-/// ## Design Pattern ##
-/// Param_mesh_patch_vertex_handle is a Bridge [GHJV95].
-///
-/// Implementation note:
-/// A Param_mesh_patch_vertex_handle contains in fact a
-/// Param_mesh_patch_vertex object, which is basically
-/// a handle to a ParameterizationPatchableMesh_3::Vertex.
-/// Param_mesh_patch_vertex_handle comparison methods simply compare
-/// the address of the ParameterizationPatchableMesh_3::Vertex pointed by the handles.
-///
-template<class ParameterizationPatchableMesh_3>
-class Param_mesh_patch_vertex_handle
-{
-// Private types
-private:
-
-    typedef Param_mesh_patch_vertex_handle  Self;
-
-// Public types
-public:
-
-    /// Export template parameter type
-    typedef ParameterizationPatchableMesh_3 Adaptor;
-
-    // Iterator types
-    typedef Param_mesh_patch_vertex<ParameterizationPatchableMesh_3>
-                                            Vertex;
-    typedef Vertex                          value_type;
-    typedef std::ptrdiff_t                  difference_type;
-    typedef std::size_t                     size_type;
-    typedef Vertex&                         reference;
-    typedef Vertex*                         pointer;
-
-// Public operations
-public:
-
-    /// Constructor from ParameterizationPatchableMesh_3::Vertex pointer
-    Param_mesh_patch_vertex_handle(Vertex* ptr = NULL)
-    {
-        if (ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = *ptr;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-    }
-
-    /// Extra constructor that will create the Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex on the fly
-    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
-    ///   must be NULL
-    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
-    /// defines the range of the valid neighbors of adaptor_vertex (included).
-    explicit Param_mesh_patch_vertex_handle(
-        typename Adaptor::Vertex_handle adaptor_vertex,
-        typename Adaptor::Vertex_handle last_cw_neighbor  = typename Adaptor::Vertex_handle(),
-        typename Adaptor::Vertex_handle first_cw_neighbor = typename Adaptor::Vertex_handle())
-    {
-        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
-        m_vertex = Vertex(adaptor_vertex, last_cw_neighbor, first_cw_neighbor);
-        m_ptr = &m_vertex;
-    }
-
-    /// Copy constructor
-    Param_mesh_patch_vertex_handle(const Self& hdl)
-    {
-        if (hdl.m_ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = hdl.m_vertex;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-    }
-
-    /// operator =()
-    Self& operator =(const Self& hdl)
-    {
-        if (hdl.m_ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = hdl.m_vertex;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-
-        return *this;
-    }
-
-    /// Compare patch vertices instead of patch vertex pointers (two patch
-    /// vertex handles are equal iff they point to the same adaptor vertex)
-    bool operator==(const Self& hdl) const
-    {
-        if (m_ptr == NULL || hdl.m_ptr == NULL)
-            return m_ptr == hdl.m_ptr;
-        else
-            return *m_ptr == *(hdl.m_ptr);
-    }
-    bool operator!=(const Self& hdl) const { return ! (*this == hdl); }
-
-    /// Comparison to NULL pointer
-    bool operator==(Nullptr_t ptr) const {
-        CGAL_surface_mesh_parameterization_assertion(ptr == NULL);
-        return m_ptr == NULL;
-    }
-    bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
-
-    pointer operator->()  const { return  m_ptr; }
-    reference operator*() const { return *m_ptr; }
-    operator Param_mesh_patch_vertex_const_handle<Adaptor>() const {
-        return m_ptr;
-    }
-
-// Fields
-private:
-    /// The actual pointer
-    pointer m_ptr;
-
-    /// Internal Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> vertex
-    /// pointed to by m_ptr (except if NULL)
-    Vertex m_vertex;
-
-}; // Param_mesh_patch_vertex_handle
-
-
-/// Param_mesh_patch_vertex_const_handle represents a handle to a
-/// Param_mesh_patch_vertex object, thus has the same behavior
-/// as const Param_mesh_patch_vertex* pointer type.
-///
-/// ## Design Pattern ##
-/// Param_mesh_patch_vertex_const_handle is a Bridge [GHJV95].
-///
-/// Implementation note:
-/// A Param_mesh_patch_vertex_const_handle contains in fact a Param_mesh_patch_vertex
-/// object, which is basically a handle to a ParameterizationPatchableMesh_3::Vertex.
-/// Param_mesh_patch_vertex_const_handle comparison methods basically compare
-/// the address of the ParameterizationPatchableMesh_3::Vertex pointed by the handles.
-///
-template<class ParameterizationPatchableMesh_3>
-class Param_mesh_patch_vertex_const_handle
-{
-// Private types
-private:
-
-    typedef Param_mesh_patch_vertex_const_handle
-                                            Self;
-
-// Public types
-public:
-
-    /// Export template parameter type
-    typedef ParameterizationPatchableMesh_3 Adaptor;
-
-    // Iterator types
-    typedef Param_mesh_patch_vertex<ParameterizationPatchableMesh_3>
-                                            Vertex;
-    typedef Vertex                          value_type;
-    typedef std::ptrdiff_t                  difference_type;
-    typedef std::size_t                     size_type;
-    typedef const Vertex&                   reference;
-    typedef const Vertex*                   pointer;
-
-// Public operations
-public:
-
-    /// Constructor from ParameterizationPatchableMesh_3::Vertex pointer
-    Param_mesh_patch_vertex_const_handle(const Vertex* ptr = NULL)
-    {
-        if (ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = *ptr;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-    }
-
-    /// Extra constructor that will create the Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex on the fly
-    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
-    ///   must be NULL
-    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
-    /// defines the range of the valid neighbors of adaptor_vertex (included).
-    explicit Param_mesh_patch_vertex_const_handle(
-        typename Adaptor::Vertex_const_handle adaptor_vertex,
-        typename Adaptor::Vertex_const_handle last_cw_neighbor =typename Adaptor::Vertex_const_handle(),
-        typename Adaptor::Vertex_const_handle first_cw_neighbor=typename Adaptor::Vertex_const_handle())
-    {
-        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
-        m_vertex = Vertex((typename Adaptor::Vertex*)&*adaptor_vertex,
-                          (typename Adaptor::Vertex*)&*last_cw_neighbor,
-                          (typename Adaptor::Vertex*)&*first_cw_neighbor);
-        m_ptr = &m_vertex;
-    }
-
-    /// Copy constructor
-    Param_mesh_patch_vertex_const_handle(const Self& hdl)
-    {
-        if (hdl.m_ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = hdl.m_vertex;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-    }
-
-    /// operator =()
-    Self& operator =(const Self& hdl)
-    {
-        if (hdl.m_ptr == NULL)
-        {
-            m_vertex = Vertex();
-            m_ptr = NULL;
-        }
-        else
-        {
-            m_vertex = *hdl.m_ptr;
-            m_ptr = &m_vertex;
-        }
-
-        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
-
-        return *this;
-    }
-
-    /// Compare patch vertices instead of patch vertex pointers (two patch
-    /// vertex handles are equal iff they point to the same adaptor vertex)
-    bool operator==(const Self& hdl) const
-    {
-        if (m_ptr == NULL || hdl.m_ptr == NULL)
-            return m_ptr == hdl.m_ptr;
-        else
-            return *m_ptr == *(hdl.m_ptr);
-    }
-    bool operator!=(const Self& hdl) const { return ! (*this == hdl); }
-
-    /// Comparison to NULL pointer
-    bool operator==(Nullptr_t ptr) const {
-        CGAL_surface_mesh_parameterization_assertion(ptr == NULL);
-        return m_ptr == NULL;
-    }
-    bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
-
-    pointer operator->()  const { return  m_ptr; }
-    reference operator*() const { return *m_ptr; }
-
-// Fields
-private:
-    /// The actual pointer
-    pointer m_ptr;
-
-    /// Internal Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> vertex
-    /// pointed to by m_ptr (except if NULL)
-    Vertex m_vertex;
-
-}; // Param_mesh_patch_vertex_const_handle
-
-/// \endcond
-
-} //namespace CGAL
-
-#endif //CGAL_PARAM_MESH_PATCH_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_approx_convex_2.h b/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_approx_convex_2.h
deleted file mode 100644
index 7c11819..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_approx_convex_2.h
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Susan Hert <hert at mpi-sb.mpg.de>
-
-#ifndef CGAL_PARTITION_APPROX_CONVEX_H
-#define CGAL_PARTITION_APPROX_CONVEX_H
-
-#include <CGAL/Constrained_triangulation_2.h>
-#include <CGAL/Partition_2/Triangulation_indirect_traits_2.h>
-#include <CGAL/Partition_2/Turn_reverser.h>
-#include <CGAL/Partition_2/Partitioned_polygon_2.h>
-#include <CGAL/IO/Tee_for_output_iterator.h>
-#include <CGAL/Partition_traits_2.h>
-#include <CGAL/partition_is_valid_2.h>
-#include <CGAL/Partition_2/partition_assertions.h>
-#include <CGAL/Circulator/Safe_circulator_from_iterator.h>
-#include <utility>
-#include <iterator>
-
-namespace CGAL {
-
-template< class Point_2, class Traits >
-bool partition_appx_cvx_is_edge_through_interior(const Point_2& before_s, 
-                                                 const Point_2& source,
-                                                 const Point_2& after_s, 
-                                                 const Point_2& target,
-                                                 const Traits& traits )
-{
-   // determine if the edge goes through the interior of the polygon or not
-   typedef typename Traits::Left_turn_2   Left_turn_2;
-   Left_turn_2 left_turn = traits.left_turn_2_object();
-   Turn_reverser<Point_2, Left_turn_2> right_turn(left_turn);
-   if (right_turn(before_s, source, after_s)) // concave angle
-   {
-     if (right_turn(before_s, source, target) &&
-         right_turn(target, source, after_s))
-       return false;
-   }
-   else // left turn or straight
-     if (right_turn(before_s, source, target) ||
-         right_turn(target, source, after_s))
-       return false;
-   return true;
-}
-
-
-// e_circ is a circulator for the edges incident to the point referred to by
-// v_ref, which is a circualtor around the vertices of the original polygon
-template <class Edge_circulator, class Circulator, class Triangulation, 
-          class Traits>
-bool partition_appx_cvx_cuts_nonconvex_angle( Edge_circulator e_circ, 
-                                              Circulator v_ref,
-                                              const Triangulation& triangles, 
-                                              const Traits& traits)
-{
-   typedef typename Triangulation::Segment        Segment_2;
-
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-   Segment_2 edge = triangles.segment((*e_circ).first, (*e_circ).second);
-   std::cout << "edge: " << *edge.source() << " " << *edge.target()
-             << std::endl;
-#endif
-
-   typename Triangulation::Point next_ccw_pt_ref, prev_ccw_pt_ref;
-
-   // the next and previous edges in the ccw ordering of edges around v_ref
-   Edge_circulator next_e = e_circ; next_e++;
-   Edge_circulator prev_e = e_circ; prev_e--;
-
-   // find the first edge before this one that has been included in the
-   // partition polygon (and is thus marked as constrained in triangulation)
-   while (prev_e != e_circ && (triangles.is_infinite(*prev_e) ||
-           !(*prev_e).first->is_constrained((*prev_e).second)))
-      prev_e--;
- 
-   Segment_2  next_edge = triangles.segment((*next_e).first,(*next_e).second);
-   Segment_2  prev_edge = triangles.segment((*prev_e).first,(*prev_e).second);
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-   std::cout << "next_edge: " << *next_edge.source() << " " 
-             << *next_edge.target() <<std::endl;
-   std::cout << "prev_edge: " << *prev_edge.source() << " " 
-             << *prev_edge.target() <<std::endl;
-#endif
-   // find which endpoint is shared by the two edges
-   if (next_edge.source() == v_ref)
-      next_ccw_pt_ref = next_edge.target();
-   else
-      next_ccw_pt_ref = next_edge.source();
-   if (prev_edge.source() == v_ref)
-      prev_ccw_pt_ref = prev_edge.target();
-   else
-      prev_ccw_pt_ref = prev_edge.source();
-
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-   std::cout << "partition_appx_cvx_cuts_nonconvex_angle: next_ccw_pt " 
-             << *next_ccw_pt_ref << " v_ref " << *v_ref << " prev_ccw_pt_ref " 
-             << *prev_ccw_pt_ref << std::endl;
-#endif
-
-   typedef typename Traits::Left_turn_2    Left_turn_2;
-   typedef typename Traits::Point_2     Point_2;
-   Left_turn_2 left_turn = traits.left_turn_2_object();
-   Turn_reverser<Point_2, Left_turn_2>  right_turn(left_turn);
-   return right_turn(*next_ccw_pt_ref, *v_ref, *prev_ccw_pt_ref); 
-}
-
-
-template<class InputIterator, class Traits, class OutputIterator>
-OutputIterator partition_approx_convex_2(InputIterator first, 
-                                         InputIterator beyond,
-                                         OutputIterator result,
-                                         const Traits& traits) 
-{
-   if (first == beyond) return result;
-
-   typedef Partitioned_polygon_2< Traits >             P_Polygon_2;
-   typedef typename P_Polygon_2::iterator              I;
-   typedef Safe_circulator_from_iterator<I>            Circulator;
-   typedef Triangulation_indirect_traits_2<Circulator, Traits>  Gt;
-
-   typedef Constrained_triangulation_2<Gt>             Constrained_tri_2;
-   typedef typename Constrained_tri_2::Edge_circulator Edge_circulator;
-   typedef typename Constrained_tri_2::Vertex_iterator Tri_vertex_iterator;
-   typedef typename Constrained_tri_2::Vertex_handle   Vertex_handle;
-   typedef typename Gt::Segment_2                      Segment_2;
-
-   P_Polygon_2 polygon(first, beyond);
-
-   CGAL_partition_precondition(
-    orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE);
-
-   Circulator first_c(polygon.begin(), polygon.end(), polygon.begin());
-   Circulator c(polygon.begin(), polygon.end());
-   Circulator next(polygon.begin(), polygon.end());
-
-   Gt gt_traits(traits);
-   Constrained_tri_2 triangles(gt_traits);
-   
-   do 
-   {
-       next = c; next++;
-       triangles.insert(c, next);
-   } while (++c != first_c);
-
-   Segment_2 edge;
-   Circulator source, target, before_s, after_s;
-
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-   std::cout << "Inserting diagonals: " << std::endl;
-#endif
-
-   Edge_circulator e_circ, first_e;
-   Tri_vertex_iterator v_it;
-
-
-   for (v_it = triangles.vertices_begin(); v_it != triangles.vertices_end(); 
-        v_it++)
-   {
-       first_e = triangles.incident_edges(Vertex_handle(v_it));
-       // find the constrained edge attached to this vertex that is first
-       // when going CW from the first edge returned above.  
-       while (triangles.is_infinite(*first_e) ||  
-              !(*first_e).first->is_constrained((*first_e).second)) 
-       {
-          first_e--;
-       }
-       e_circ = first_e;
-       do 
-       {
-          if ((*e_circ).first->is_constrained((*e_circ).second))
-          {
-             edge = triangles.segment((*e_circ).first, (*e_circ).second);
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-             std::cout << "edge " <<  *edge.source() << " " << *edge.target() 
-                       << " is constrained " << std::endl;
-#endif
-          }  
-          else 
-          {
-             if (!triangles.is_infinite(*e_circ)) 
-             {
-                edge = triangles.segment((*e_circ).first, (*e_circ).second);
-                source = edge.source();
-                target = edge.target();
-                before_s = source; before_s--;
-                after_s = source; after_s++;
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-                std::cout << "considering " << *source << " " << *target 
-                          << "...";
-#endif
-                if (partition_appx_cvx_is_edge_through_interior(*before_s, 
-                                *source, *after_s, *target, traits)) 
-                {
-                   if (partition_appx_cvx_cuts_nonconvex_angle(e_circ, 
-                                 (*v_it).point(), triangles, traits)) 
-                   {
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-                      std::cout << "inserting" << std::endl;
-#endif
-                      polygon.insert_diagonal(source.unsafe_circulator()
-		                             ,target.unsafe_circulator()
-					     );
-                      triangles.insert(source, target);
-                   }
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-                   else 
-                      std::cout << "doesn't cut reflex angle" << std::endl;
-#endif
-                }
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-                else 
-                   std::cout << "not an edge through the interior" 
-                             << std::endl;
-#endif
-             }
-#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
-             std::cout << "edge is infinite " << std::endl;
-#endif
-          }
-       } while (++e_circ != first_e);
-   }
-
-#if defined(CGAL_PARTITION_NO_POSTCONDITIONS) || \
-    defined(CGAL_NO_POSTCONDITIONS)  || defined(NDEBUG)
-   OutputIterator res(result);
-#else
-   typedef typename Traits::Polygon_2                  Polygon_2;
-   Tee_for_output_iterator<OutputIterator, Polygon_2>  res(result);
-#endif // no postconditions
-
-   polygon.partition(res, 0);
-   CGAL_partition_postcondition(
-       convex_partition_is_valid_2(polygon.begin(), polygon.end(),
-                                   res.output_so_far_begin(), 
-                                   res.output_so_far_end(), traits));
-
-#if defined(CGAL_PARTITION_NO_POSTCONDITIONS) || \
-    defined(CGAL_NO_POSTCONDITIONS)  || defined(NDEBUG)
-   return res;
-#else
-   return res.to_output_iterator();
-#endif // no postconditions
-}
-
-template <class InputIterator, class OutputIterator>
-inline
-OutputIterator partition_approx_convex_2(InputIterator first, 
-                                         InputIterator beyond,
-                                         OutputIterator result)
-{
-   typedef typename std::iterator_traits<InputIterator>::value_type Point_2;
-   typedef typename Kernel_traits<Point_2>::Kernel K;
-   return partition_approx_convex_2(first, beyond, result,  
-                                    Partition_traits_2<K>());
-}
-
-}
-
-#endif // CGAL_PARTITION_APPROX_CONVEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_3.h
deleted file mode 100644
index 6a21b1b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_3.h
+++ /dev/null
@@ -1,4140 +0,0 @@
-// Copyright (c) 1999-2003,2006-2009   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
-//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
-//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
-
-#ifndef CGAL_PERIODIC_3_TRIANGULATION_3_H
-#define CGAL_PERIODIC_3_TRIANGULATION_3_H
-
-#include <CGAL/basic.h>
-
-#include <iostream>
-#include <algorithm>
-#include <cmath>
-#include <functional>
-#include <list>
-
-#include <boost/tuple/tuple.hpp>
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_smallint.hpp>
-#include <boost/random/variate_generator.hpp>
-
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/use.h>
-
-#include <CGAL/Triangulation_data_structure_3.h>
-#include <CGAL/Periodic_3_triangulation_ds_cell_base_3.h>
-#include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h>
-#include <CGAL/Triangulation_cell_base_3.h>
-#include <CGAL/Triangulation_vertex_base_3.h>
-
-#include <CGAL/Periodic_3_triangulation_iterators_3.h>
-
-#include <CGAL/Unique_hash_map.h>
-
-#include <CGAL/internal/Exact_type_selector.h>
-#include <CGAL/NT_converter.h>
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-#include <CGAL/Triangulation_structural_filtering_traits.h>
-#include <CGAL/determinant.h>
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-namespace CGAL {
-
-template < class GT, class TDS > class Periodic_3_triangulation_3;
-
-template < class GT, class TDS > std::istream& operator>> 
-    (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr);
-template < class GT, class TDS > std::ostream& operator<< 
-    (std::ostream& os, const Periodic_3_triangulation_3<GT,TDS> &tr);
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-namespace internal {
-// structural filtering is performed only for EPIC
-struct Periodic_structural_filtering_3_tag {};
-struct No_periodic_structural_filtering_3_tag {};
-
-template <bool filter>
-struct Periodic_structural_filtering_selector_3 {
-#ifdef FORCE_STRUCTURAL_FILTERING
-  typedef Periodic_structural_filtering_3_tag  Tag;
-#else
-  typedef No_periodic_structural_filtering_3_tag  Tag;
-#endif
-};
-
-template <>
-struct Periodic_structural_filtering_selector_3<true> {
-  typedef Periodic_structural_filtering_3_tag  Tag;
-};
-}
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-/**\class Periodic_3_triangulation_3
- * 
- * \brief Implements functionality for computing in periodic space.
- *
- * There are several things that are special to computing in $\mathbb{T}^3$
- * such as
- * - periodicity --> offsets
- * - no infinite vertex
- * - no degenerate dimensions
- * All functions that are affected can be found in this class. In case it is
- * necessary to provide different implementations for Delaunay and regular
- * triangulation, we work with visitors. 
- */
-
-template < class GT,
-            class TDS = Triangulation_data_structure_3 <
-	      Triangulation_vertex_base_3<
-		GT, Periodic_3_triangulation_ds_vertex_base_3<>
-		>,
-              Triangulation_cell_base_3<
-                GT, Periodic_3_triangulation_ds_cell_base_3<>
-              >
-            >
-          >
-class Periodic_3_triangulation_3 
-  : public Triangulation_utils_3
-{
-  friend std::istream& operator>> <>
-  (std::istream& is, Periodic_3_triangulation_3<GT, TDS> &tr);
-
-  typedef Periodic_3_triangulation_3<GT,TDS>   Self;
-
-public:
-  typedef GT                                   Geometric_traits;
-  typedef TDS                                  Triangulation_data_structure;
-
-  typedef typename GT::Periodic_3_offset_3     Offset;
-  typedef typename GT::Iso_cuboid_3            Iso_cuboid;
-  typedef array<int, 3>                        Covering_sheets;
-  
-  typedef typename GT::Point_3                 Point;
-  typedef typename GT::Segment_3               Segment;
-  typedef typename GT::Triangle_3              Triangle;
-  typedef typename GT::Tetrahedron_3           Tetrahedron;
-
-  typedef std::pair<Point,Offset>              Periodic_point;
-  typedef array< std::pair<Point,Offset>, 2>   Periodic_segment;
-  typedef array< std::pair<Point,Offset>, 3>   Periodic_triangle;
-  typedef array< std::pair<Point,Offset>, 4>   Periodic_tetrahedron;
-
-  typedef typename TDS::Vertex                 Vertex;
-  typedef typename TDS::Cell                   Cell;
-  typedef typename TDS::Facet                  Facet;
-  typedef typename TDS::Edge                   Edge;
-
-  typedef typename TDS::Vertex_handle          Vertex_handle;
-  typedef typename TDS::Cell_handle            Cell_handle;
-  
-  typedef typename TDS::size_type              size_type;
-  typedef typename TDS::difference_type        difference_type;
-
-  typedef typename TDS::Cell_iterator          Cell_iterator;
-  typedef typename TDS::Facet_iterator         Facet_iterator;
-  typedef typename TDS::Edge_iterator          Edge_iterator;
-  typedef typename TDS::Vertex_iterator        Vertex_iterator;
-
-  typedef typename TDS::Cell_circulator        Cell_circulator;
-  typedef typename TDS::Facet_circulator       Facet_circulator;
-
-  typedef Cell_iterator                        All_cells_iterator;
-  typedef Facet_iterator                       All_facets_iterator;
-  typedef Edge_iterator                        All_edges_iterator;
-  typedef Vertex_iterator                      All_vertices_iterator;
-  typedef Periodic_3_triangulation_unique_vertex_iterator_3<Self>
-                                               Unique_vertex_iterator;
-
-private:
-  typedef typename GT::FT                      FT;
-  typedef std::pair< Vertex_handle, Offset >   Virtual_vertex;
-  typedef std::map<Vertex_handle, Virtual_vertex>
-                                               Virtual_vertex_map;
-  typedef typename Virtual_vertex_map::const_iterator
-                                               Virtual_vertex_map_it;
-  typedef std::map<Vertex_handle, std::vector<Vertex_handle > >
-                                               Virtual_vertex_reverse_map;
-  typedef typename Virtual_vertex_reverse_map::const_iterator
-                                               Virtual_vertex_reverse_map_it;
-  typedef Triple< Vertex_handle, Vertex_handle, Vertex_handle >
-                                               Vertex_triple;
-
-public:
-  typedef Periodic_3_triangulation_tetrahedron_iterator_3<Self>
-                                               Periodic_tetrahedron_iterator;
-  typedef Periodic_3_triangulation_triangle_iterator_3<Self>
-                                               Periodic_triangle_iterator;
-  typedef Periodic_3_triangulation_segment_iterator_3<Self>
-                                               Periodic_segment_iterator;
-  typedef Periodic_3_triangulation_point_iterator_3<Self>
-                                               Periodic_point_iterator;
-
-  typedef Point                                value_type;
-  typedef const value_type&                    const_reference;
-
-  typedef Tag_false Weighted_tag;
-
-public:
-  enum Iterator_type {
-    STORED=0,
-    UNIQUE, //1
-    STORED_COVER_DOMAIN, //2
-    UNIQUE_COVER_DOMAIN };//3
-
-  enum Locate_type {
-    VERTEX=0, 
-    EDGE, //1
-    FACET, //2
-    CELL, //3
-    EMPTY , //4
-    OUTSIDE_CONVEX_HULL, // unused, for compatibility with Alpha_shape_3
-    OUTSIDE_AFFINE_HULL }; // unused, for compatibility with Alpha_shape_3
-
-private:
-  Geometric_traits  _gt;
-  Triangulation_data_structure _tds; 
-  Iso_cuboid _domain;
-  /// This threshold should be chosen such that if all edges are shorter,
-  /// we can be sure that there are no self-edges anymore.
-  FT edge_length_threshold;
-  
-  /// This adjacency list stores all edges that are longer than
-  /// edge_length_threshold.
-  std::map< Vertex_handle, std::list<Vertex_handle> > too_long_edges;
-  unsigned int too_long_edge_counter;
-  
-  /// map of offsets for periodic copies of vertices
-  Virtual_vertex_map virtual_vertices;
-  Virtual_vertex_reverse_map  virtual_vertices_reverse;
-
-protected:
-  /// v_offsets temporarily stores all the vertices on the border of a
-  /// conflict region.
-  mutable std::vector<Vertex_handle> v_offsets;
-
-private:
-  /// Determines if we currently compute in 3-cover or 1-cover.
-  Covering_sheets _cover;
-
-public:
-  /** @name Creation */ //@{
-  Periodic_3_triangulation_3(
-      const Iso_cuboid & domain = Iso_cuboid(0,0,0,1,1,1),
-      const Geometric_traits & gt = Geometric_traits())
-    : _gt(gt), _tds(), _domain(domain), too_long_edge_counter(0) {
-    _gt.set_domain(_domain);
-    typedef typename internal::Exact_field_selector<FT>::Type EFT;
-    typedef NT_converter<FT,EFT> NTC;
-    CGAL_USE_TYPE(NTC);
-    CGAL_triangulation_assertion_code( NTC ntc; )
-    CGAL_triangulation_precondition(ntc(_domain.xmax())-ntc(_domain.xmin())
-	== ntc(_domain.ymax())-ntc(_domain.ymin()));
-    CGAL_triangulation_precondition(ntc(_domain.ymax())-ntc(_domain.ymin())
-	== ntc(_domain.zmax())-ntc(_domain.zmin()));
-    CGAL_triangulation_precondition(ntc(_domain.zmax())-ntc(_domain.zmin())
-	== ntc(_domain.xmax())-ntc(_domain.xmin()));
-    _cover = make_array(3,3,3);
-    init_tds();
-    edge_length_threshold = FT(0.166) * (_domain.xmax()-_domain.xmin())
-                                      * (_domain.xmax()-_domain.xmin());
-  }
-
-private:
-  // Copy constructor helpers
-  class Finder;
-  void copy_multiple_covering(const Periodic_3_triangulation_3 & tr);
-public:
-  // Copy constructor duplicates vertices and cells
-  Periodic_3_triangulation_3(const Periodic_3_triangulation_3 & tr)
-    : _gt(tr.geom_traits()),
-      _domain(tr._domain),
-      edge_length_threshold(tr.edge_length_threshold),
-      _cover(tr._cover) {
-    if (is_1_cover()) {
-      _tds = tr.tds();
-    } else {
-      copy_multiple_covering(tr);
-    }
-    CGAL_triangulation_expensive_postcondition(*this == tr);
-  }
-  
-  /** @name Assignment */ //@{
-  Periodic_3_triangulation_3 & operator=(Periodic_3_triangulation_3 tr) {
-    swap(tr);
-    return *this;
-  }
-  
-  void swap(Periodic_3_triangulation_3 &tr) {
-    std::swap(tr._gt, _gt);
-    _tds.swap(tr._tds);
-    std::swap(_domain,tr._domain);
-    std::swap(edge_length_threshold,tr.edge_length_threshold);
-    std::swap(too_long_edges,tr.too_long_edges);
-    std::swap(too_long_edge_counter,tr.too_long_edge_counter);
-    std::swap(virtual_vertices,tr.virtual_vertices);
-    std::swap(virtual_vertices_reverse,tr.virtual_vertices_reverse);
-    std::swap(_cover, tr._cover);
-  }
-
-  /// Clears the triangulation and initializes it again.
-  void clear() {
-    _tds.clear();
-    init_tds();
-    too_long_edges.clear();
-    too_long_edge_counter = 0;
-    virtual_vertices.clear();
-    virtual_vertices_reverse.clear();
-    _cover = make_array(3,3,3);
-    v_offsets.clear();
-  }
-  //@}
-
-private:
-  /// Initializes the triangulation data structure
-  void init_tds() {
-    _tds.set_dimension(-2);
-    v_offsets.reserve(48);
-  }
-
-public:
-  /** @name Access functions */ //@{
-  const Geometric_traits& geom_traits() const { return _gt; }
-  const TDS & tds() const { return _tds; }
-  TDS & tds() { return _tds; }
-
-  const Iso_cuboid & domain() const { return _domain; }
-  // TODO: Documentation and tests
-  void set_domain(const Iso_cuboid & domain) {
-    clear();
-    _domain = domain;
-    _gt.set_domain(domain);
-    edge_length_threshold = FT(0.166) * (_domain.xmax()-_domain.xmin())
-                                      * (_domain.xmax()-_domain.xmin());
-  }
-
-  const Covering_sheets & number_of_sheets() const { return _cover; }
-  const std::pair<Vertex_handle, Offset> original_vertex(
-      const Vertex_handle v) const {
-    return (virtual_vertices.find(v) == virtual_vertices.end()) ?
-      std::make_pair(v,Offset()) : virtual_vertices.find(v)->second;
-  }
-  const std::vector<Vertex_handle>& periodic_copies(
-      const Vertex_handle v) const {
-    CGAL_triangulation_precondition(number_of_sheets() != make_array(1,1,1) );
-    CGAL_triangulation_precondition(
-	virtual_vertices.find(v) == virtual_vertices.end());
-    CGAL_triangulation_assertion(
-	virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end());
-    return virtual_vertices_reverse.find(v)->second;
-  }
-
-  bool is_extensible_triangulation_in_1_sheet_h1() const;
-  bool is_extensible_triangulation_in_1_sheet_h2() const;
-  bool is_triangulation_in_1_sheet() const;
-
-  void convert_to_1_sheeted_covering();
-  void convert_to_27_sheeted_covering();
-
-  size_type number_of_cells() const {
-    if (is_1_cover()) return _tds.number_of_cells();
-    else return _tds.number_of_cells()/27;
-  }
-  size_type number_of_facets() const {
-    if (is_1_cover()) return _tds.number_of_facets();
-    else return _tds.number_of_facets()/27;
-  }
-  size_type number_of_edges() const {
-    if (is_1_cover()) return _tds.number_of_edges();
-    else return _tds.number_of_edges()/27;
-  }
-  size_type number_of_vertices() const {
-    if (is_1_cover()) return _tds.number_of_vertices();
-    else return _tds.number_of_vertices()/27;
-  }
-
-  size_type number_of_stored_cells() const {
-    return _tds.number_of_cells();
-  }
-  size_type number_of_stored_facets() const {
-    return _tds.number_of_facets();
-  }
-  size_type number_of_stored_edges() const {
-    return _tds.number_of_edges();
-  }
-  size_type number_of_stored_vertices() const {
-    return _tds.number_of_vertices();
-  }
-
-protected:
-  bool is_1_cover() const {
-    bool flag;
-    flag = ((_cover[0] == 1) && (_cover[1] == 1) && (_cover[2] == 1));
-    return flag;
-  }
-
-public:
-  bool is_virtual(Vertex_handle v) {
-    if (is_1_cover()) return false;
-    return (virtual_vertices.find(v) != virtual_vertices.end());
-  }
-
-public:
-  // Offset converters
-  int off_to_int(const Offset & off) const {
-    CGAL_triangulation_assertion( off.x()==0 || off.x() ==1 );
-    CGAL_triangulation_assertion( off.y()==0 || off.y() ==1 );
-    CGAL_triangulation_assertion( off.z()==0 || off.z() ==1 );
-    int i = ((off.x()&1)<<2) + ((off.y()&1)<<1) + ((off.z()&1));
-    return i;
-  }
-  Offset int_to_off(int i) const {
-    return Offset((i>>2)&1,(i>>1)&1,i&1);
-  }
-
-
-  void set_offsets(Cell_handle c, int o0,int o1,int o2,int o3) {
-    int off0[3] = {(o0>>2)&1,(o0>>1)&1,(o0&1)};
-    int off1[3] = {(o1>>2)&1,(o1>>1)&1,(o1&1)};
-    int off2[3] = {(o2>>2)&1,(o2>>1)&1,(o2&1)};
-    int off3[3] = {(o3>>2)&1,(o3>>1)&1,(o3&1)};
-    for (int i=0; i<3; i++) {
-      int min_off = (std::min)((std::min)(off0[i],off1[i]),
-			       (std::min)(off2[i],off3[i]));
-      if (min_off != 0) {
-	off0[i] -= min_off; off1[i] -= min_off;
-	off2[i] -= min_off; off3[i] -= min_off;
-      }
-    }
-    o0 = ((off0[0]&1)<<2)+((off0[1]&1)<<1)+(off0[2]&1);
-    o1 = ((off1[0]&1)<<2)+((off1[1]&1)<<1)+(off1[2]&1);
-    o2 = ((off2[0]&1)<<2)+((off2[1]&1)<<1)+(off2[2]&1);
-    o3 = ((off3[0]&1)<<2)+((off3[1]&1)<<1)+(off3[2]&1);
-    c->set_offsets(o0,o1,o2,o3);
-  }
- 
-  template <class Offset> 
-  void set_offsets(Cell_handle c, Offset o0,Offset o1,Offset o2,Offset o3) {
-    int off0[3] = {o0.x(),o0.y(),o0.z()};
-    int off1[3] = {o1.x(),o1.y(),o1.z()};
-    int off2[3] = {o2.x(),o2.y(),o2.z()};
-    int off3[3] = {o3.x(),o3.y(),o3.z()};
-    for (int i=0; i<3; i++) {
-      int min_off = (std::min)((std::min)(off0[i],off1[i]),
-			       (std::min)(off2[i],off3[i]));
-      if (min_off != 0) {
-	off0[i] -= min_off; off1[i] -= min_off;
-	off2[i] -= min_off; off3[i] -= min_off;
-      }
-    }
-
-    CGAL_triangulation_assertion((std::min)((std::min)(off0[0],off1[0]),
-			      (std::min)(off2[0],off3[0])) == 0);
-    CGAL_triangulation_assertion((std::min)((std::min)(off0[1],off1[1]),
-			      (std::min)(off2[1],off3[1])) == 0);
-    CGAL_triangulation_assertion((std::min)((std::min)(off0[2],off1[2]),
-			      (std::min)(off2[2],off3[2])) == 0);
-    CGAL_triangulation_assertion((0 <= off0[0]) && (off0[0] < 2));
-    CGAL_triangulation_assertion((0 <= off1[0]) && (off1[0] < 2));
-    CGAL_triangulation_assertion((0 <= off2[0]) && (off2[0] < 2));
-    CGAL_triangulation_assertion((0 <= off3[0]) && (off3[0] < 2));
-    CGAL_triangulation_assertion((0 <= off0[1]) && (off0[1] < 2));
-    CGAL_triangulation_assertion((0 <= off1[1]) && (off1[1] < 2));
-    CGAL_triangulation_assertion((0 <= off2[1]) && (off2[1] < 2));
-    CGAL_triangulation_assertion((0 <= off3[1]) && (off3[1] < 2));
-    CGAL_triangulation_assertion((0 <= off0[2]) && (off0[2] < 2));
-    CGAL_triangulation_assertion((0 <= off1[2]) && (off1[2] < 2));
-    CGAL_triangulation_assertion((0 <= off2[2]) && (off2[2] < 2));
-    CGAL_triangulation_assertion((0 <= off3[2]) && (off3[2] < 2));
-
-    int o0i = ((off0[0]&1)<<2)+((off0[1]&1)<<1)+(off0[2]&1);
-    int o1i = ((off1[0]&1)<<2)+((off1[1]&1)<<1)+(off1[2]&1);
-    int o2i = ((off2[0]&1)<<2)+((off2[1]&1)<<1)+(off2[2]&1);
-    int o3i = ((off3[0]&1)<<2)+((off3[1]&1)<<1)+(off3[2]&1);
-    c->set_offsets(o0i,o1i,o2i,o3i);
-  }
-
-public:
-  /** @name Wrapping the traits */ //@{
-  Comparison_result compare_xyz(const Point &p1, const Point &p2) const {
-    return geom_traits().compare_xyz_3_object()(p1,p2);
-  }
-  Comparison_result compare_xyz(const Point &p1, const Point&p2,
-      const Offset &o1, const Offset &o2) const {
-    return geom_traits().compare_xyz_3_object()(p1,p2,o1,o2);
-  }
-
-  Orientation orientation(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
-      const {
-    return geom_traits().orientation_3_object()(p1,p2,p3,p4);
-  }
-  Orientation orientation(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
-      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
-      const {
-    return geom_traits().orientation_3_object()(p1,p2,p3,p4,o1,o2,o3,o4);
-  }
-
-  bool equal(const Point &p1, const Point &p2) const {
-    return compare_xyz(p1,p2) == EQUAL;
-  }
-  bool equal(const Point &p1, const Point &p2,
-      const Offset &o1, const Offset &o2) const {
-    return compare_xyz(p1,p2,o1,o2) == EQUAL;
-  }
-
-  bool coplanar(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
-      const {
-    return orientation(p1,p2,p3,p4) == COPLANAR;
-  }
-  bool coplanar(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
-      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
-      const {
-    return orientation(p1,p2,p3,p4,o1,o2,o3,o4) == COPLANAR;
-  }
-
-  Periodic_tetrahedron construct_periodic_3_tetrahedron(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
-      const {
-    return make_array(std::make_pair(p1,Offset()), std::make_pair(p2,Offset()),
-	std::make_pair(p3,Offset()), std::make_pair(p4,Offset()));
-  }
-  Periodic_tetrahedron construct_periodic_3_tetrahedron(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
-      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
-      const {
-    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2),
-	std::make_pair(p3,o3), std::make_pair(p4,o4));
-  }
-
-  Periodic_triangle construct_periodic_3_triangle(
-      const Point &p1, const Point &p2, const Point &p3) const {
-    return make_array(std::make_pair(p1,Offset()),
-	std::make_pair(p2,Offset()), std::make_pair(p3,Offset()));
-  }
-  Periodic_triangle construct_periodic_3_triangle(
-      const Point &p1, const Point &p2, const Point &p3,
-      const Offset &o1, const Offset &o2, const Offset &o3) const {
-    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2),
-	std::make_pair(p3,o3));
-  }
-
-  Periodic_segment construct_periodic_3_segment(
-      const Point &p1, const Point &p2) const {
-    return make_array(std::make_pair(p1,Offset()), std::make_pair(p2,Offset()));
-  }
-  Periodic_segment construct_periodic_3_segment(
-      const Point &p1, const Point &p2,
-      const Offset &o1, const Offset &o2) const {
-    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2));
-  }
-
-  Tetrahedron construct_tetrahedron(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
-      const {
-    return geom_traits().construct_tetrahedron_3_object()(p1,p2,p3,p4);
-  }
-  Tetrahedron construct_tetrahedron(
-      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
-      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
-      const {
-    return geom_traits().construct_tetrahedron_3_object()(p1,p2,p3,p4,
-	o1,o2,o3,o4);
-  }
-  Tetrahedron construct_tetrahedron(const Periodic_tetrahedron& tet) {
-    return construct_tetrahedron(
-	tet[0].first, tet[1].first, tet[2].first, tet[3].first,
-	tet[0].second, tet[1].second, tet[2].second, tet[3].second);
-  }
-
-  Triangle construct_triangle(
-      const Point &p1, const Point &p2, const Point &p3) const {
-    return geom_traits().construct_triangle_3_object()(p1,p2,p3);
-  }
-  Triangle construct_triangle(
-      const Point &p1, const Point &p2, const Point &p3,
-      const Offset &o1, const Offset &o2, const Offset &o3) const {
-    return geom_traits().construct_triangle_3_object()(p1,p2,p3,o1,o2,o3);
-  }
-  Triangle construct_triangle(const Periodic_triangle& tri) {
-    return construct_triangle(tri[0].first, tri[1].first, tri[2].first,
-       tri[0].second, tri[1].second, tri[2].second);
-  }
-
-  Segment construct_segment(const Point &p1, const Point &p2) const {
-    return geom_traits().construct_segment_3_object()(p1, p2);
-  }
-  Segment construct_segment(const Point &p1, const Point &p2,
-    const Offset &o1, const Offset &o2) const {
-    return geom_traits().construct_segment_3_object()(p1,p2,o1,o2);
-  }
-  Segment construct_segment(const Periodic_segment& seg) const {
-    return construct_segment(seg[0].first, seg[1].first,
-	seg[0].second, seg[1].second);
-  }
-
-  Point construct_point(const Point& p, const Offset &o) const {
-    return geom_traits().construct_point_3_object()(p,o);
-  }
-  Point construct_point(const Periodic_point& pp) const {
-    return construct_point(pp.first, pp.second);
-  }
-  //@}
-
-public:
-  /** @name Geometric access functions */ //@{
-  Periodic_point periodic_point( const Vertex_handle v ) const {
-    if (is_1_cover()) return std::make_pair(v->point(), Offset(0,0,0));
-    Virtual_vertex_map_it it = virtual_vertices.find(v);
-    if (it == virtual_vertices.end()) {
-      // if v is not contained in virtual_vertices, then it is in the
-      // original domain.
-      return std::make_pair(v->point(), Offset(0,0,0));
-    } else {
-      // otherwise it has to be looked up as well as its offset.
-      return std::make_pair(it->second.first->point(), it->second.second);
-    }
-  }
-  Periodic_point periodic_point( const Cell_handle c, int i) const {
-    if (is_1_cover()) return std::make_pair(c->vertex(i)->point(),
-					    int_to_off(c->offset(i)));
-    Virtual_vertex_map_it it = virtual_vertices.find(c->vertex(i));
-    if (it == virtual_vertices.end()) {
-      // if c->vertex(i) is not contained in virtual_vertices, then it
-      // is in the original domain.
-      return std::make_pair(c->vertex(i)->point(), 
-	  combine_offsets(Offset(),int_to_off(c->offset(i))) );
-    } else {
-      // otherwise it has to be looked up as well as its offset.
-      return std::make_pair(it->second.first->point(),
-	  combine_offsets(it->second.second, int_to_off(c->offset(i))) );
-    }
-  }
-
-  Periodic_segment periodic_segment(const Cell_handle c, int i, int j) const {
-    CGAL_triangulation_precondition( i != j );
-    CGAL_triangulation_precondition( number_of_vertices() != 0 );
-    CGAL_triangulation_precondition( i >= 0 && i <= 3 
-        && j >= 0 && j <= 3 );
-    return make_array( std::make_pair(c->vertex(i)->point(),
-				      get_offset(c,i)),
-		       std::make_pair(c->vertex(j)->point(),
-				      get_offset(c,j)) );
-  }
-  Periodic_segment periodic_segment(const Edge & e) const {
-    return periodic_segment(e.first,e.second,e.third);
-  }
-
-  Periodic_triangle periodic_triangle(const Cell_handle c, int i) const;
-  Periodic_triangle periodic_triangle(const Facet & f) const {
-    return periodic_triangle(f.first, f.second);
-  }
-
-  Periodic_tetrahedron periodic_tetrahedron(const Cell_handle c) const {
-    CGAL_triangulation_precondition( number_of_vertices() != 0 );
-    return make_array(
-        std::make_pair(c->vertex(0)->point(), get_offset(c,0)),
-	std::make_pair(c->vertex(1)->point(), get_offset(c,1)),
-        std::make_pair(c->vertex(2)->point(), get_offset(c,2)),
-	std::make_pair(c->vertex(3)->point(), get_offset(c,3)) );
-  }
-
-  Point point(const Periodic_point & pp) const {
-    return construct_point(pp.first, pp.second);
-  }
-  Segment segment(const Periodic_segment & ps) const {
-    return construct_segment(ps[0].first,ps[1].first,ps[0].second,ps[1].second);
-  }
-  Triangle triangle(const Periodic_triangle & pt) const {
-    return construct_triangle(pt[0].first, pt[1].first, pt[2].first,
-			      pt[0].second,pt[1].second,pt[2].second);
-  }
-  Tetrahedron tetrahedron(const Periodic_tetrahedron & pt) const {
-    return construct_tetrahedron(pt[0].first, pt[1].first,
-				 pt[2].first, pt[3].first,
-				 pt[0].second,pt[1].second,
-				 pt[2].second,pt[3].second);
-  }
-  // @}
-
-  /** @name Queries */ //@{
-  bool is_vertex(const Point & p, Vertex_handle & v) const;
-
-  bool is_vertex(Vertex_handle v) const {
-    return _tds.is_vertex(v);
-  }
-  bool is_edge(Vertex_handle u, Vertex_handle v,
-      Cell_handle & c, int & i, int & j) const {
-    return _tds.is_edge(u, v, c, i, j);
-  }
-  bool is_edge(Vertex_handle u, const Offset & off_u,
-	       Vertex_handle v, const Offset & off_v,
-      Cell_handle & c, int & i, int & j) const {
-    if (!_tds.is_edge(u,v,c,i,j)) return false;
-    if ((get_offset(c,i) == off_u) && (get_offset(c,j) == off_v))
-      return true;
-    // it might be that different cells containing (u,v) yield
-    // different offsets, which forces us to test for all possibilities.
-    else {
-      Cell_circulator ccirc = incident_cells(c,i,j,c);
-      while (++ccirc != c) {
-	i = ccirc->index(u);
-	j = ccirc->index(v);
-	if ((get_offset(ccirc,i) == off_u) && (get_offset(ccirc,j) == off_v)) {
-	  c = ccirc;
-	  return true;
-	}
-      }
-      return false;
-    }
-  }
-  bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
-      Cell_handle & c, int & i, int & j, int & k) const {
-    return _tds.is_facet(u, v, w, c, i, j, k);
-  }
-  bool is_facet(Vertex_handle u, const Offset & off_u,
-		Vertex_handle v, const Offset & off_v,
-		Vertex_handle w, const Offset & off_w,
-      Cell_handle & c, int & i, int & j, int & k) const {
-    if (!_tds.is_facet(u,v,w,c,i,j,k)) return false;
-    if ((get_offset(c,i) == off_u)
-	&& (get_offset(c,j) == off_v)
-	&& (get_offset(c,k) == off_w) )
-      return true;
-    // it might be that c and c->neighbor(l) yield different offsets
-    // which forces us to test for both possibilities.
-    else {
-      int l = 6-i-j-k;
-      c = c->neighbor(l);
-      i = c->index(u);
-      j = c->index(v);
-      k = c->index(w);      
-      return ((get_offset(c,i) == off_u)
-	  && (get_offset(c,j) == off_v)
-	  && (get_offset(c,k) == off_w) );
-    }
-  }
-  bool is_cell(Cell_handle c) const {
-    return _tds.is_cell(c);
-  }
-  bool is_cell(Vertex_handle u, Vertex_handle v,
-      Vertex_handle w, Vertex_handle t,
-      Cell_handle & c, int & i, int & j, int & k, int & l) const {
-    return _tds.is_cell(u, v, w, t, c, i, j, k, l);
-  }
-  bool is_cell(Vertex_handle u, Vertex_handle v, Vertex_handle w,
-      Vertex_handle t, Cell_handle & c) const {
-    int i,j,k,l;
-    return _tds.is_cell(u, v, w, t, c, i, j, k, l);
-  }
-  bool is_cell(Vertex_handle u, const Offset & off_u,
-	       Vertex_handle v, const Offset & off_v,
-	       Vertex_handle w, const Offset & off_w,
-	       Vertex_handle t, const Offset & off_t,
-      Cell_handle & c, int & i, int & j, int & k, int & l) const {
-    if (!_tds.is_cell(u,v,w,t,c,i,j,k,l)) return false;
-    return ((get_offset(c,i) == off_u)
-	    && (get_offset(c,j) == off_v)
-	    && (get_offset(c,k) == off_w)
-	    && (get_offset(c,l) == off_t) );
-    return false;
-  }
-  bool is_cell(Vertex_handle u, const Offset & off_u,
-	       Vertex_handle v, const Offset & off_v,
-	       Vertex_handle w, const Offset & off_w,
-	       Vertex_handle t, const Offset & off_t,
-	       Cell_handle & c) const {
-    int i, j, k, l;
-    return is_cell(u,off_u,v,off_v,w,off_w,t,off_t,c,i,j,k,l);
-  }
-
-  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const {
-    return _tds.has_vertex(f.first, f.second, v, j);
-  }
-  bool has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const {
-    return _tds.has_vertex(c, i, v, j);
-  }
-  bool has_vertex(const Facet & f, Vertex_handle v) const {
-    return _tds.has_vertex(f.first, f.second, v);
-  }
-  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const {
-    return _tds.has_vertex(c, i, v);
-  }
-  
-  bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const {
-    return _tds.are_equal(c, i, n, j);
-  }
-  bool are_equal(const Facet & f, const Facet & g) const {
-    return _tds.are_equal(f.first, f.second, g.first, g.second);
-  }
-  bool are_equal(const Facet & f, Cell_handle n, int j) const {
-    return _tds.are_equal(f.first, f.second, n, j);
-  }
-  //@}
-
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-  Cell_handle
-  periodic_locate(const Point & p, const Offset &o_p,
-	 Locate_type & lt, int & li, int & lj,
-	 Cell_handle start = Cell_handle()) const;
-#else // no CGAL_NO_STRUCTURAL_FILTERING
-#  ifndef CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-#    define CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
-#  endif // no CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-
-public:
-  Cell_handle
-  inexact_periodic_locate(const Point& p, const Offset &o_p,
-                 Cell_handle start = Cell_handle(),
-                 int max_num_cells = CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const;
-protected:
-  Cell_handle
-  exact_periodic_locate(const Point& p, const Offset &o_p,
-               Locate_type& lt,
-               int& li, int & lj,
-               Cell_handle start) const;
-
-  Cell_handle
-  generic_periodic_locate(const Point& p, const Offset &o_p,
-                 Locate_type& lt,
-                 int& li, int & lj,
-                 Cell_handle start,
-                 internal::Periodic_structural_filtering_3_tag) const {
-    return exact_periodic_locate(p, o_p, lt, li, lj, inexact_periodic_locate(p, o_p, start));
-  }
-
-  Cell_handle
-  generic_periodic_locate(const Point& p, const Offset &o_p,
-                 Locate_type& lt,
-                 int& li, int & lj,
-                 Cell_handle start,
-                 internal::No_periodic_structural_filtering_3_tag) const {
-    return exact_periodic_locate(p, o_p, lt, li, lj, start);
-  }
-
-  Orientation
-  inexact_orientation(const Point &p, const Point &q,
-                      const Point &r, const Point &s) const
-  {
-    const double px = to_double(p.x());
-    const double py = to_double(p.y());
-    const double pz = to_double(p.z());
-    const double qx = to_double(q.x());
-    const double qy = to_double(q.y());
-    const double qz = to_double(q.z());
-    const double rx = to_double(r.x());
-    const double ry = to_double(r.y());
-    const double rz = to_double(r.z());
-    const double sx = to_double(s.x());
-    const double sy = to_double(s.y());
-    const double sz = to_double(s.z());
-
-    const double pqx = qx - px;
-    const double pqy = qy - py;
-    const double pqz = qz - pz;
-    const double prx = rx - px;
-    const double pry = ry - py;
-    const double prz = rz - pz;
-    const double psx = sx - px;
-    const double psy = sy - py;
-    const double psz = sz - pz;
-
-    const double det = determinant(pqx, pqy, pqz,
-                                   prx, pry, prz,
-                                   psx, psy, psz);
-    if (det > 0) return POSITIVE;
-    if (det < 0) return NEGATIVE;
-    return ZERO;
-  }
-
-  Orientation
-  inexact_orientation(const Point &p, const Point &q,
-                      const Point &r, const Point &s,
-                      const Offset& o_p, const Offset& o_q,
-                      const Offset& o_r, const Offset& o_s) const
-  {
-    return inexact_orientation(construct_point(p, o_p),
-        construct_point(q, o_q),
-        construct_point(r, o_r),
-        construct_point(s, o_s));
-  }
-
-public:
-
-  Cell_handle
-  periodic_locate(const Point & p, const Offset &o_p,
-         Locate_type & lt, int & li, int & lj,
-         Cell_handle start = Cell_handle()) const
-  {
-    typedef Triangulation_structural_filtering_traits<Geometric_traits> TSFT;
-    typedef typename internal::Periodic_structural_filtering_selector_3<
-      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
-
-    return generic_periodic_locate(p, o_p, lt, li, lj, start, Should_filter_tag());
-  }
-
-  Cell_handle
-  inexact_locate(const Point& p,
-                 Cell_handle start = Cell_handle(),
-                 int max_num_cells = CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const
-  {
-	  return inexact_periodic_locate(p, Offset(), start, max_num_cells);
-  }
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-protected:
-  /** @name Location helpers */ //@{
-//  Cell_handle periodic_locate(const Point & p, const Offset &o_p,
-//    Locate_type & lt, int & li, int & lj, Cell_handle start) const;
-
-  Bounded_side side_of_cell(const Point & p, const Offset &off,
-      Cell_handle c, Locate_type & lt, int & i, int & j) const;
-  //@}
-  
-public:
-  /** @name Point Location */ //@{
-  /** Wrapper function for locate if only the request point is given.
-    */
-  Cell_handle locate(const Point & p, Cell_handle start=Cell_handle()) const {
-    Locate_type lt;
-    int li, lj;
-    return locate( p, lt, li, lj, start);
-  }
-  
-  /** Wrapper function calling locate with an empty offset if there was no
-    * offset given.
-    */
-  Cell_handle locate(const Point & p, Locate_type & lt, int & li, int & lj,
-      Cell_handle start = Cell_handle()) const {
-    return periodic_locate(p, Offset(), lt, li, lj, start);
-  }
-
-  Bounded_side side_of_cell(const Point & p,
-      Cell_handle c, Locate_type & lt, int & i, int & j) const {
-    if (number_of_vertices() == 0) {
-      lt = EMPTY;
-      return ON_UNBOUNDED_SIDE;
-    }
-    return side_of_cell(p,Offset(),c,lt,i,j);
-  }
-  //@}
-
-private:
-  /** @name Insertion helpers */ //@{
-  template <class CellIt>
-  void insert_too_long_edges(Vertex_handle v,
-      const CellIt begin, const CellIt end);
-
-  template <class CellIt>
-  void delete_too_long_edges(const CellIt begin, const CellIt end);
-
-  template < class Conflict_tester, class Point_hider >
-  Vertex_handle periodic_insert(const Point& p, const Offset& o, Locate_type lt,
-      Cell_handle c, const Conflict_tester &tester,
-      Point_hider &hider, Vertex_handle vh = Vertex_handle());
-
-  template <class Point_iterator, class Offset_iterator>
-  void periodic_sort(Point_iterator /*p_begin*/, Point_iterator /*p_end*/,
-                     Offset_iterator /*o_begin*/, Offset_iterator /*o_end*/) const {
-    std::cout << "Periodic_sort not yet implemented" << std::endl;
-  }
-
-  Vertex_handle create_initial_triangulation(const Point &p);
-public:
-  std::vector<Vertex_handle> insert_dummy_points();
-  
-protected:
-  // this is needed for compatibility reasons
-  template <class Conflict_test, class OutputIteratorBoundaryFacets,
-      class OutputIteratorCells, class OutputIteratorInternalFacets>
-  Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
-         OutputIteratorInternalFacets>
-  find_conflicts(Cell_handle c,
-      const Conflict_test &tester,
-      Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
-      OutputIteratorInternalFacets> it) const {
-    Offset off = get_location_offset(tester, c);
-    return find_conflicts(c,off,tester,it);
-  }
-
-  template <class Conflict_test, class OutputIteratorBoundaryFacets,
-      class OutputIteratorCells, class OutputIteratorInternalFacets>
-  Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
-         OutputIteratorInternalFacets>
-  find_conflicts(Cell_handle c, const Offset &current_off,
-      const Conflict_test &tester,
-      Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
-      OutputIteratorInternalFacets> it) const;
-  //@}
-  
-protected:
-  // COMMON INSERTION for DELAUNAY and REGULAR TRIANGULATION
-  template < class Conflict_tester, class Point_hider >
-  Vertex_handle insert_in_conflict(const Point & p, Cell_handle start,
-      const Conflict_tester &tester, Point_hider &hider) {
-    Locate_type lt = Locate_type();
-    int li=0, lj=0;
-    Cell_handle c = periodic_locate(p, Offset(), lt, li, lj, start);
-    return insert_in_conflict(p,lt,c,li,lj,tester,hider);
-  }
-
-  template < class Conflict_tester, class Point_hider >
-  Vertex_handle insert_in_conflict(const Point & p, Locate_type lt,
-    Cell_handle c, int li, int lj, const Conflict_tester &tester,
-    Point_hider &hider);
-
-  template < class InputIterator, class Conflict_tester,
-      class Point_hider>
-  std::vector<Vertex_handle> insert_in_conflict(
-      InputIterator begin, InputIterator end, Cell_handle start,
-      Conflict_tester &tester, Point_hider &hider) {
-    Vertex_handle new_vertex;
-    std::vector<Vertex_handle> double_vertices;
-    Locate_type lt = Locate_type();
-    int li=0, lj=0;
-    CGAL_triangulation_assertion_code( Locate_type lta = Locate_type(); )
-    CGAL_triangulation_assertion_code( int ia = 0; )
-    CGAL_triangulation_assertion_code( int ja = 0; )
-    Cell_handle hint;
-    while (begin!=end) {
-      tester.set_point(*begin);
-      hint = periodic_locate(*begin, Offset(), lt, li, lj, start);
-      CGAL_triangulation_assertion_code( if (number_of_vertices() != 0) { );
-	CGAL_triangulation_assertion(side_of_cell(
-		*begin,Offset(), hint, lta, ia, ja) != ON_UNBOUNDED_SIDE);
-	CGAL_triangulation_assertion(lta == lt);
-	CGAL_triangulation_assertion(ia == li);
-	CGAL_triangulation_assertion(ja == lj);
-      CGAL_triangulation_assertion_code( } );
-
-      new_vertex = insert_in_conflict(*begin,lt,hint,li,lj,tester,hider);
-      if (lt == VERTEX) double_vertices.push_back(new_vertex);
-      start = new_vertex->cell();
-      begin++;
-    }
-    return double_vertices;
-  }
-  //@}
-
-private:
-  /** @name Removal helpers */ //@{
-  Vertex_triple make_vertex_triple(const Facet& f) const {
-    Cell_handle ch = f.first;
-    int i = f.second;
-    return Vertex_triple(ch->vertex(vertex_triple_index(i,0)),
-        ch->vertex(vertex_triple_index(i,1)),
-        ch->vertex(vertex_triple_index(i,2))); 
-  }
-
-  void make_canonical(Vertex_triple& t) const;
-
-  void make_hole(Vertex_handle v, std::map<Vertex_triple,Facet> &outer_map,
-      std::vector<Cell_handle> &hole);
-
-  template < class PointRemover >
-  void periodic_remove(Vertex_handle v, PointRemover &remover); 
-  //@}
-  
-protected:
-  /** @name Removal */ //@{
-  template < class PointRemover, class CT >
-  void remove(Vertex_handle v, PointRemover &remover, CT &ct);
-  //@}
-
-public:
-  /** @name Traversal */ //@{
-  Cell_iterator cells_begin() const {
-    return _tds.cells_begin();
-  }
-  Cell_iterator cells_end() const {
-    return _tds.cells_end();
-  }
-
-  Vertex_iterator vertices_begin() const {
-    return _tds.vertices_begin();
-  }
-  Vertex_iterator vertices_end() const {
-    return _tds.vertices_end();
-  }
-
-  Edge_iterator edges_begin() const {
-    return _tds.edges_begin();
-  }
-  Edge_iterator edges_end() const {
-    return _tds.edges_end();
-  }
-
-  Facet_iterator facets_begin() const {
-    return _tds.facets_begin();
-  }
-  Facet_iterator facets_end() const {
-    return _tds.facets_end();
-  }
-
-  Cell_iterator finite_cells_begin() const {
-    return _tds.cells_begin();
-  }
-  Cell_iterator finite_cells_end() const {
-    return _tds.cells_end();
-  }
-
-  Vertex_iterator finite_vertices_begin() const {
-    return _tds.vertices_begin();
-  }
-  Vertex_iterator finite_vertices_end() const {
-    return _tds.vertices_end();
-  }
-
-  Edge_iterator finite_edges_begin() const {
-    return _tds.edges_begin();
-  }
-  Edge_iterator finite_edges_end() const {
-    return _tds.edges_end();
-  }
-
-  Facet_iterator finite_facets_begin() const {
-    return _tds.facets_begin();
-  }
-  Facet_iterator finite_facets_end() const {
-    return _tds.facets_end();
-  }
-
-  All_cells_iterator all_cells_begin() const {
-    return _tds.cells_begin();
-  }
-  All_cells_iterator all_cells_end() const {
-    return _tds.cells_end();
-  }
-
-  All_vertices_iterator all_vertices_begin() const {
-    return _tds.vertices_begin();
-  }
-  All_vertices_iterator all_vertices_end() const {
-    return _tds.vertices_end();
-  }
-
-  All_edges_iterator all_edges_begin() const {
-    return _tds.edges_begin();
-  }
-  All_edges_iterator all_edges_end() const {
-    return _tds.edges_end();
-  }
-
-  All_facets_iterator all_facets_begin() const {
-    return _tds.facets_begin();
-  }
-  All_facets_iterator all_facets_end() const {
-    return _tds.facets_end();
-  }
-  
-  Unique_vertex_iterator unique_vertices_begin() const {
-    return CGAL::filter_iterator(vertices_end(), Domain_tester<Self>(this),
-	                         vertices_begin());
-  }
-  Unique_vertex_iterator unique_vertices_end() const {
-    return CGAL::filter_iterator(vertices_end(), Domain_tester<Self>(this));
-  }
-
-  // Geometric iterators
-  Periodic_tetrahedron_iterator periodic_tetrahedra_begin(
-      Iterator_type it = STORED) const {
-    return Periodic_tetrahedron_iterator(this, it);
-  }
-  Periodic_tetrahedron_iterator periodic_tetrahedra_end(
-      Iterator_type it = STORED) const {
-    return Periodic_tetrahedron_iterator(this, 1, it);
-  }
-
-  Periodic_triangle_iterator periodic_triangles_begin(
-      Iterator_type it = STORED) const {
-    return Periodic_triangle_iterator(this, it);
-  }
-  Periodic_triangle_iterator periodic_triangles_end(
-      Iterator_type it = STORED) const {
-    return Periodic_triangle_iterator(this, 1, it);
-  }
-
-  Periodic_segment_iterator periodic_segments_begin(
-      Iterator_type it = STORED) const {
-    return Periodic_segment_iterator(this, it);
-  }
-  Periodic_segment_iterator periodic_segments_end(
-      Iterator_type it = STORED) const {
-    return Periodic_segment_iterator(this, 1, it);
-  }
-
-  Periodic_point_iterator periodic_points_begin(
-      Iterator_type it = STORED) const {
-    return Periodic_point_iterator(this, it);
-  }
-  Periodic_point_iterator periodic_points_end(
-      Iterator_type it = STORED) const  {
-    return Periodic_point_iterator(this, 1, it);
-  }
-
-  // Circulators
-  Cell_circulator incident_cells(const Edge & e) const {
-    return _tds.incident_cells(e);
-  }
-  Cell_circulator incident_cells(Cell_handle c, int i, int j) const {
-    return _tds.incident_cells(c, i, j);
-  }
-  Cell_circulator incident_cells(const Edge & e, Cell_handle start) const {
-    return _tds.incident_cells(e, start);
-  }
-  Cell_circulator incident_cells(Cell_handle c, int i, int j, 
-      Cell_handle start) const {
-    return _tds.incident_cells(c, i, j, start);
-  }
-
-  Facet_circulator incident_facets(const Edge & e) const {
-    return _tds.incident_facets(e);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j) const {
-    return _tds.incident_facets(c, i, j);
-  }
-  Facet_circulator incident_facets(const Edge & e, const Facet & start) const {
-    return _tds.incident_facets(e, start);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j, 
-      const Facet & start) const {
-    return _tds.incident_facets(c, i, j, start);
-  }
-  Facet_circulator incident_facets(const Edge & e,
-      Cell_handle start, int f) const {
-    return _tds.incident_facets(e, start, f);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j, 
-      Cell_handle start, int f) const {
-    return _tds.incident_facets(c, i, j, start, f);
-  }
-
-  // around a vertex
-  template <class OutputIterator>
-  OutputIterator incident_cells(Vertex_handle v, OutputIterator cells) const {
-    return _tds.incident_cells(v, cells);
-  }
-
-  template <class OutputIterator>
-  OutputIterator incident_facets(Vertex_handle v, OutputIterator facets) const {
-    return _tds.incident_facets(v, facets);
-  }
-
-  template <class OutputIterator>
-  OutputIterator incident_edges(
-      Vertex_handle v, OutputIterator edges) const {
-    return _tds.incident_edges(v, edges);
-  }
-
-  template <class OutputIterator>
-  OutputIterator adjacent_vertices(
-      Vertex_handle v, OutputIterator vertices) const {
-    return _tds.adjacent_vertices(v, vertices);
-  }
-
-  //deprecated, don't use anymore
-  template <class OutputIterator>
-  OutputIterator incident_vertices(
-      Vertex_handle v, OutputIterator vertices) const {
-    return _tds.adjacent_vertices(v, vertices);
-  }
-
-  size_type degree(Vertex_handle v) const {
-    return _tds.degree(v);
-  }
-
-  // Functions forwarded from TDS.
-  int mirror_index(Cell_handle c, int i) const {
-    return _tds.mirror_index(c, i);
-  }
-
-  Vertex_handle mirror_vertex(Cell_handle c, int i) const {
-    return _tds.mirror_vertex(c, i);
-  }
-
-  Facet mirror_facet(Facet f) const {
-    return _tds.mirror_facet(f);
-  }
-  //@}
-  
-private:
-  /** @name Checking helpers */ //@{
-  /// calls has_self_edges for every cell of the triangulation
-  bool has_self_edges() const {
-    Cell_iterator it;
-    for ( it = all_cells_begin(); it != all_cells_end(); ++it )
-      if (has_self_edges(it)) return true;
-    return false;
-  }
-  bool has_self_edges(Cell_handle c) const;
-  //@}
-  
-public:
-  /** @name Checking */ //@{
-  bool is_valid(bool verbose = false, int level = 0) const;
-  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
-protected:
-  template <class ConflictTester>
-  bool is_valid_conflict(ConflictTester &tester, bool verbose = false,
-      int level = 0) const;
-  //@}
-
-protected:
-  /** @name Functors */ //@{
-  template < class Cmp >
-  class Perturbation_order;
-  //@}
-
-public:
-  // undocumented access functions
-  Offset get_offset(Cell_handle ch, int i) const {
-    if (is_1_cover()) return int_to_off(ch->offset(i));
-    Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i));
-    if (it != virtual_vertices.end())
-      return combine_offsets(it->second.second, int_to_off(ch->offset(i)));
-    else return combine_offsets(Offset(), int_to_off(ch->offset(i)));
-  }
-  Offset get_offset(Vertex_handle vh) const {
-    if (is_1_cover()) return Offset();
-    Virtual_vertex_map_it it = virtual_vertices.find(vh);
-    if (it != virtual_vertices.end()) return it->second.second;
-    else return Offset();
-  }
-  Vertex_handle get_original_vertex(Vertex_handle vh) const {
-    if (is_1_cover()) return vh;
-    Virtual_vertex_map_it it = virtual_vertices.find(vh);
-    if (it != virtual_vertices.end()) return it->second.first;
-    else return vh;
-  }
-  Offset combine_offsets(const Offset& o_c, const Offset& o_t) const {
-    Offset o_ct(_cover[0]*o_t.x(),_cover[1]*o_t.y(),_cover[2]*o_t.z());
-    return o_c + o_ct;
-  }
-
-  // These functions give the pair (vertex, offset) that corresponds to the
-  // i-th vertex of cell ch or vertex vh, respectively.
-  void get_vertex(Cell_handle ch, int i, Vertex_handle &vh, Offset &off) const;
-  void get_vertex(Vertex_handle vh_i, Vertex_handle &vh, Offset &off) const;
-
-protected:
-  // Auxiliary functions
-  int find_too_long_edges(std::map<Vertex_handle,
-      std::list<Vertex_handle> >& edges) const;
-  Cell_handle get_cell(const Vertex_handle* vh) const;
-  template<class Conflict_tester>
-  Offset get_location_offset(const Conflict_tester& tester,
-	  Cell_handle c) const;
-
-  Offset get_neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const;
-  
-  /** @name Friends */ //@{
-  friend class Perturbation_order<typename GT::Compare_xyz_3>;
-  friend std::istream& operator>> <>
-      (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr);
-  friend std::ostream& operator<< <>
-      (std::ostream& os, const Periodic_3_triangulation_3<GT,TDS> &tr);
-  //@}
-
-  // unused and undocumented function required to be compatible to
-  // Alpha_shape_3
-public:
-  Point point(Cell_handle c, int idx) const {
-    //    if (is_1_cover())
-      return point(periodic_point(c,idx));
-
-    Offset vec_off[4];
-    for (int i=0 ; i<4 ; i++) vec_off[i] = periodic_point(c,i).second;
-    int ox = vec_off[0].x();
-    int oy = vec_off[0].y();
-    int oz = vec_off[0].z();
-    for (int i=1 ; i<4 ; i++) {
-      ox = (std::min)(ox,vec_off[i].x());
-      oy = (std::min)(oy,vec_off[i].y());
-      oz = (std::min)(oz,vec_off[i].z());
-    }
-    Offset diff_off(-ox,-oy,-oz);
-    if (diff_off.is_null()) return point(periodic_point(c,idx));
-
-    for (unsigned int i=0 ; i<4 ; i++) vec_off[i] += diff_off;
-    Vertex_handle canonic_vh[4];
-    for (int i=0 ; i<4 ; i++) {
-      Virtual_vertex_map_it vvmit = virtual_vertices.find(c->vertex(i));
-      Vertex_handle orig_vh;
-      if (vvmit == virtual_vertices.end()) orig_vh = c->vertex(i);
-      else orig_vh = vvmit->second.first;
-      if (vec_off[i].is_null()) canonic_vh[i] = orig_vh;
-      else {
-	CGAL_assertion(virtual_vertices_reverse.find(orig_vh)
-	    != virtual_vertices_reverse.end());
-	canonic_vh[i] = virtual_vertices_reverse.find(orig_vh)
-	  ->second[9*vec_off[i][0]+3*vec_off[i][1]+vec_off[i][2]-1];
-      }
-    }
-    
-    std::vector<Cell_handle> cells;
-    incident_cells(canonic_vh[0], std::back_inserter(cells));
-    for (unsigned int i=0 ; i<cells.size() ; i++) {
-      CGAL_assertion(cells[i]->has_vertex(canonic_vh[0]));
-      if (cells[i]->has_vertex(canonic_vh[1])
-	  && cells[i]->has_vertex(canonic_vh[2])
-	  && cells[i]->has_vertex(canonic_vh[3]) )
-	return point(periodic_point(cells[i],cells[i]->index(canonic_vh[idx])));
-    }
-    CGAL_assertion(false);
-  return Point();
-  }
-};
-
-template < class GT, class TDS >
-inline void
-Periodic_3_triangulation_3<GT,TDS>::
-copy_multiple_covering(const Periodic_3_triangulation_3<GT,TDS> & tr) {  
-  // Write the respective offsets in the vertices to make them
-  // automatically copy with the tds.
-  for (Vertex_iterator vit = tr.vertices_begin() ;
-       vit != tr.vertices_end() ; ++vit) {
-    vit->set_offset(tr.get_offset(vit));
-  }
-  // copy the tds
-  _tds = tr.tds();
-  // make a list of all vertices that belong to the original
-  // domain and initialize the basic structure of
-  // virtual_vertices_reverse
-  std::list<Vertex_handle> vlist;
-  for (Vertex_iterator vit = vertices_begin() ;
-       vit != vertices_end() ; ++vit) {
-    if (vit->offset() == Offset()) {
-      vlist.push_back(vit);
-      virtual_vertices_reverse.insert(
-	  std::make_pair(vit,std::vector<Vertex_handle>(26)));
-      CGAL_triangulation_assertion(virtual_vertices_reverse.find(vit)
-	  ->second.size() == 26);
-    }
-  }     
-  // Iterate over all vertices that are not in the original domain
-  // and construct the respective entries to virtual_vertices and
-  // virtual_vertices_reverse
-  for (Vertex_iterator vit2 = vertices_begin() ;
-       vit2 != vertices_end() ; ++vit2) {
-    if (vit2->offset() != Offset()) {
-      //TODO: use some binding, maybe boost instead of the Finder.
-      typename std::list<Vertex_handle>::iterator vlist_it
-	= std::find_if(vlist.begin(), vlist.end(),
-		       Finder(this,vit2->point()));
-      Offset off = vit2->offset();
-      virtual_vertices.insert(std::make_pair(vit2,
-					     std::make_pair(*vlist_it,off)));
-      virtual_vertices_reverse.find(*vlist_it)
-	->second[9*off[0]+3*off[1]+off[2]-1]=vit2;
-      CGAL_triangulation_assertion(get_offset(vit2) == off);
-    }
-  }
-  // Cleanup vertex offsets
-  for (Vertex_iterator vit = vertices_begin() ;
-       vit != vertices_end() ; ++vit)
-    vit->clear_offset();
-  for (Vertex_iterator vit = tr.vertices_begin() ;
-       vit != tr.vertices_end() ; ++vit)
-    vit->clear_offset();
-  // Build up the too_long_edges container
-  too_long_edge_counter = 0;
-  too_long_edges.clear();
-  for (Vertex_iterator vit = vertices_begin() ;
-       vit != vertices_end() ; ++vit) 
-    too_long_edges[vit] = std::list<Vertex_handle>();
-  std::pair<Vertex_handle, Vertex_handle> edge_to_add;
-  Point p1,p2;
-  int i,j;
-  for (Edge_iterator eit = edges_begin() ;
-       eit != edges_end() ; ++eit) {
-    if (&*(eit->first->vertex(eit->second))
-	< &*(eit->first->vertex(eit->third))) {
-      i = eit->second; j = eit->third;
-    } else {
-      i = eit->third; j = eit->second;
-    }
-    edge_to_add = std::make_pair(eit->first->vertex(i),
-				 eit->first->vertex(j));
-    p1 = construct_point(eit->first->vertex(i)->point(),
-	get_offset(eit->first, i));
-    p2 = construct_point(eit->first->vertex(j)->point(),
-	get_offset(eit->first, j));
-    Vertex_handle v_no = eit->first->vertex(i);
-    if (squared_distance(p1,p2) > edge_length_threshold) {
-      CGAL_triangulation_assertion(
-	  find(too_long_edges[v_no].begin(),
-	       too_long_edges[v_no].end(),
-	       edge_to_add.second) == too_long_edges[v_no].end());
-      too_long_edges[v_no].push_back(edge_to_add.second);
-      too_long_edge_counter++;
-    }
-  }
-}
-
-template < class GT, class TDS >
-inline bool
-Periodic_3_triangulation_3<GT,TDS>::
-is_extensible_triangulation_in_1_sheet_h1() const {
-  if (!is_1_cover()) {
-    if (too_long_edge_counter == 0) return true;
-    else return false;
-  } else {
-    typename Geometric_traits::FT longest_edge_squared_length(0);
-    Segment s;
-    for (Periodic_segment_iterator psit = periodic_segments_begin(UNIQUE);
- 	 psit != periodic_segments_end(UNIQUE) ; ++psit) {
-      s = construct_segment(*psit);
-      longest_edge_squared_length = (std::max)(longest_edge_squared_length,
-	  s.squared_length());
-    }
-    return (longest_edge_squared_length < edge_length_threshold);
-  }
-}
-
-template < class GT, class TDS >
-inline bool
-Periodic_3_triangulation_3<GT,TDS>::
-is_extensible_triangulation_in_1_sheet_h2() const {
-  typedef typename Geometric_traits::Construct_circumcenter_3
-    Construct_circumcenter;
-  typedef typename Geometric_traits::FT FT;
-  Construct_circumcenter construct_circumcenter
-    = _gt.construct_circumcenter_3_object();
-  for (Periodic_tetrahedron_iterator tit = periodic_tetrahedra_begin(UNIQUE) ;
-       tit != periodic_tetrahedra_end(UNIQUE) ; ++tit) {
-    Point cc = construct_circumcenter(
-	tit->at(0).first, tit->at(1).first,
-	tit->at(2).first, tit->at(3).first,
-	tit->at(0).second, tit->at(1).second,
-	tit->at(2).second, tit->at(3).second);
-
-    if ( !(FT(16)*squared_distance(cc,point(tit->at(0)))
-	    < (_domain.xmax()-_domain.xmin())*(_domain.xmax()-_domain.xmin())) )
-      return false;
-  }
-  return true;
-}
-
-template < class GT, class TDS >
-inline bool
-Periodic_3_triangulation_3<GT,TDS>::
-is_triangulation_in_1_sheet() const {
-  if (is_1_cover()) return true;
-  for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) {
-    if (virtual_vertices.find(vit) == virtual_vertices.end()) continue;
-    std::vector<Vertex_handle> nb_v;
-    std::set<Vertex_handle> nb_v_odom;
-    Vertex_handle vh;
-    Offset off;
-    adjacent_vertices(vit, std::back_inserter(nb_v));
-    for (unsigned int i=0; i<nb_v.size(); i++) {
-      get_vertex(nb_v[i],vh,off);
-      nb_v_odom.insert(vh);
-    }
-    if (nb_v.size() != nb_v_odom.size()) 
-      return false;
-  }
-  return true;
-}
-
-template < class GT, class TDS >
-inline bool
-Periodic_3_triangulation_3<GT,TDS>::
-is_vertex(const Point & p, Vertex_handle & v) const
-{
-  Locate_type lt;
-  int li, lj;
-  Cell_handle c = locate( p, lt, li, lj );
-  if ( lt != VERTEX )
-    return false;
-  v = c->vertex(li);
-  return true;
-}
-
-template < class GT, class TDS >
-inline void
-Periodic_3_triangulation_3<GT,TDS>::
-make_canonical(Vertex_triple& t) const
-{
-  int i = (&*(t.first) < &*(t.second))? 0 : 1;
-  if(i==0) {
-    i = (&*(t.first) < &*(t.third))? 0 : 2;
-  } else {
-    i = (&*(t.second) < &*(t.third))? 1 : 2;
-  }
-  Vertex_handle tmp; 
-  switch(i){
-  case 0: return;
-  case 1:
-    tmp = t.first;
-    t.first = t.second;
-    t.second = t.third;
-    t.third = tmp;
-    return;
-  default:
-    tmp = t.first;
-    t.first = t.third;
-    t.third = t.second;
-    t.second = tmp;
-  }
-}
-
-template < class GT, class TDS >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Periodic_triangle
-Periodic_3_triangulation_3<GT,TDS>::
-periodic_triangle(const Cell_handle c, int i) const
-{ 
-  CGAL_triangulation_precondition( number_of_vertices() != 0 );
-  CGAL_triangulation_precondition( i >= 0 && i <= 3 );
-  if ( (i&1)==0 ) 
-    return make_array(std::make_pair(c->vertex( (i+2)&3 )->point(),
-				     get_offset(c,(i+2)&3)),
-		      std::make_pair(c->vertex( (i+1)&3 )->point(),
-				     get_offset(c,(i+1)&3)),
-		      std::make_pair(c->vertex( (i+3)&3 )->point(),
-				     get_offset(c,(i+3)&3)) );
-  return make_array(std::make_pair(c->vertex( (i+1)&3 )->point(),
-				   get_offset(c,(i+1)&3)),
-		    std::make_pair(c->vertex( (i+2)&3 )->point(),
-				   get_offset(c,(i+2)&3)),
-		    std::make_pair(c->vertex( (i+3)&3 )->point(),
-				   get_offset(c,(i+3)&3)) );
-}
-
-/** Assumes a point, an offset, and a cell to start from.
-  * Gives the locate type and the simplex (cell and indices) containing p.
-  *
-  * Performs a remembering stochastic walk if the triangulation is not empty.
-  * After the walk the type of the simplex containing p is determined.
-  *
-  * returns the cell p lies in
-  * starts at cell "start"
-  * returns a cell Cell_handel if lt == CELL
-  * returns a facet (Cell_handle,li) if lt == FACET
-  * returns an edge (Cell_handle,li,lj) if lt == EDGE
-  * returns a vertex (Cell_handle,li) if lt == VERTEX
-  */
-template < class GT, class TDS >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
-Periodic_3_triangulation_3<GT,TDS>::
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-periodic_locate
-#else
-exact_periodic_locate
-#endif
-(const Point & p, const Offset &o_p,
-    Locate_type & lt, int & li, int & lj, Cell_handle start) const {
-  int cumm_off = 0;
-  Offset off_query = o_p;
-  if (number_of_vertices() == 0) {
-    lt = EMPTY;
-    return Cell_handle();
-  }
-  CGAL_triangulation_assertion(number_of_vertices() != 0);
-
-  if (start == Cell_handle()) {
-    start = cells_begin();
-  }
-
-  cumm_off = start->offset(0) | start->offset(1)
-    | start->offset(2) | start->offset(3);
-  if (is_1_cover() && cumm_off != 0) {
-    if (((cumm_off & 4) == 4) && (FT(2)*p.x()<(_domain.xmax()+_domain.xmin())))
-      off_query += Offset(1,0,0);
-    if (((cumm_off & 2) == 2) && (FT(2)*p.y()<(_domain.ymax()+_domain.ymin())))
-      off_query += Offset(0,1,0);
-    if (((cumm_off & 1) == 1) && (FT(2)*p.z()<(_domain.zmax()+_domain.zmin())))
-      off_query += Offset(0,0,1);
-  }
-
-  CGAL_triangulation_postcondition(start!=Cell_handle());
-  CGAL_triangulation_assertion(start->neighbor(0)->neighbor(
-      start->neighbor(0)->index(start))==start);
-  CGAL_triangulation_assertion(start->neighbor(1)->neighbor(
-      start->neighbor(1)->index(start))==start);
-  CGAL_triangulation_assertion(start->neighbor(2)->neighbor(
-      start->neighbor(2)->index(start))==start);
-  CGAL_triangulation_assertion(start->neighbor(3)->neighbor(
-      start->neighbor(3)->index(start))==start);
-
-  // We implement the remembering visibility/stochastic walk.
-  
-  // Remembers the previous cell to avoid useless orientation tests.
-  Cell_handle previous = Cell_handle();
-  Cell_handle c = start;
-  
-  // Stores the results of the 4 orientation tests.  It will be used
-  // at the end to decide if p lies on a face/edge/vertex/interior.
-  Orientation o[4];
-  
-  boost::rand48 rng;      
-  boost::uniform_smallint<> four(0, 3);
-  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die4(rng, four);
-
-  
-  // Now treat the cell c.
-try_next_cell:
-  // For the remembering stochastic walk,
-  // we need to start trying with a random index :
-  int i = die4();
-  // For the remembering visibility walk (Delaunay only), we don't :
-  // int i = 0;
-
-  cumm_off =
-    c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
-
-  bool simplicity_criterion = (cumm_off == 0) && (off_query.is_null());
-
-  // We know that the 4 vertices of c are positively oriented.
-  // So, in order to test if p is seen outside from one of c's facets,
-  // we just replace the corresponding point by p in the orientation
-  // test.  We do this using the arrays below.
-
-  Offset off[4];
-  const Point* pts[4] = { &(c->vertex(0)->point()),
-      &(c->vertex(1)->point()),
-      &(c->vertex(2)->point()),
-      &(c->vertex(3)->point()) };
-
-  if (!simplicity_criterion && is_1_cover() ) {
-    for (int i=0; i<4; i++) {
-      off[i] = int_to_off(c->offset(i));
-    }
-  }
-  
-  if (!is_1_cover()) {
-    // Just fetch the vertices of c as points with offsets
-    for (int i=0; i<4; i++) {
-      pts[i] = &(c->vertex(i)->point());
-      off[i] = get_offset(c,i);
-    }
-  }
-  
-  for (int j=0; j != 4; ++j, i = (i+1)&3) {
-    Cell_handle next = c->neighbor(i);
-    if (previous == next) {
-      o[i] = POSITIVE;
-      continue;
-    }
-    
-    CGAL_triangulation_assertion(next->neighbor(next->index(c)) == c);
-    
-    // We temporarily put p at i's place in pts.
-    const Point* backup = pts[i];
-    pts[i] = &p;
-    
-    if (simplicity_criterion && is_1_cover() ) {
-      o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]);
-      
-      if ( o[i] != NEGATIVE ) {
-        pts[i] = backup;
-        continue;
-      }
-    }
-    else {
-      Offset backup_off;
-      
-      backup_off = off[i];
-      off[i] = off_query;
-      o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3],
-          off[0], off[1], off[2], off[3]);
-
-      if ( o[i] != NEGATIVE ) {
-        pts[i] = backup;
-        off[i] = backup_off;
-        continue;
-      }
-    }
-
-    // Test whether we need to adapt the offset of the query point.
-    // This means, if we get out of the current cover.
-    off_query = combine_offsets(off_query, get_neighbor_offset(c,i,next));
-    previous = c;
-    c = next;
-    goto try_next_cell;
-  }
-
-  
-  // Ok, now we have found the cell. It remains to find the dimension of the
-  // intersected simplex.
-  // now p is in c or on its boundary
-  int sum = ( o[0] == COPLANAR )
-    + ( o[1] == COPLANAR )
-    + ( o[2] == COPLANAR )
-    + ( o[3] == COPLANAR );
-  switch (sum) {
-  case 0:
-      lt = CELL;
-      break;
-  case 1:
-      lt = FACET;
-      li = ( o[0] == COPLANAR ) ? 0 :
-          ( o[1] == COPLANAR ) ? 1 :
-          ( o[2] == COPLANAR ) ? 2 : 3;
-      break;
-  case 2:
-    lt = EDGE;
-    li = ( o[0] != COPLANAR ) ? 0 :
-        ( o[1] != COPLANAR ) ? 1 : 2;
-    lj = ( o[li+1] != COPLANAR ) ? li+1 :
-        ( o[li+2] != COPLANAR ) ? li+2 : li+3;
-    break;
-  case 3:
-    lt = VERTEX;
-    li = ( o[0] != COPLANAR ) ? 0 :
-        ( o[1] != COPLANAR ) ? 1 :
-        ( o[2] != COPLANAR ) ? 2 : 3;
-    break;
-  default:
-    // Vertex can not lie on four facets
-    CGAL_triangulation_assertion(false);
-  }
-  return c;
-}
-
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-template < class GT, class TDS >
-typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
-Periodic_3_triangulation_3<GT,TDS>::
-inexact_periodic_locate(const Point& p, const Offset& o_p,
-               Cell_handle start,
-               int n_of_turns) const
-{
-	int cumm_off = 0;
-	Offset off_query = o_p;
-	if (number_of_vertices() == 0) {
-		return Cell_handle();
-	}
-	CGAL_triangulation_assertion(number_of_vertices() != 0);
-
-	if (start == Cell_handle()) {
-		start = cells_begin();
-	}
-
-	cumm_off = start->offset(0) | start->offset(1)
-	    		| start->offset(2) | start->offset(3);
-	if (is_1_cover() && cumm_off != 0) {
-		if (((cumm_off & 4) == 4) && (FT(2)*p.x()<(_domain.xmax()+_domain.xmin())))
-			off_query += Offset(1,0,0);
-		if (((cumm_off & 2) == 2) && (FT(2)*p.y()<(_domain.ymax()+_domain.ymin())))
-			off_query += Offset(0,1,0);
-		if (((cumm_off & 1) == 1) && (FT(2)*p.z()<(_domain.zmax()+_domain.zmin())))
-			off_query += Offset(0,0,1);
-	}
-
-	CGAL_triangulation_postcondition(start!=Cell_handle());
-	CGAL_triangulation_assertion(start->neighbor(0)->neighbor(
-			start->neighbor(0)->index(start))==start);
-	CGAL_triangulation_assertion(start->neighbor(1)->neighbor(
-			start->neighbor(1)->index(start))==start);
-	CGAL_triangulation_assertion(start->neighbor(2)->neighbor(
-			start->neighbor(2)->index(start))==start);
-	CGAL_triangulation_assertion(start->neighbor(3)->neighbor(
-			start->neighbor(3)->index(start))==start);
-
-	// We implement the remembering visibility/stochastic walk.
-
-	// Remembers the previous cell to avoid useless orientation tests.
-	Cell_handle previous = Cell_handle();
-	Cell_handle c = start;
-
-	// Now treat the cell c.
-try_next_cell:
-  --n_of_turns;
-	cumm_off =
-			c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
-
-	bool simplicity_criterion = (cumm_off == 0) && (off_query.is_null());
-
-	// We know that the 4 vertices of c are positively oriented.
-	// So, in order to test if p is seen outside from one of c's facets,
-	// we just replace the corresponding point by p in the orientation
-	// test.  We do this using the arrays below.
-
-	Offset off[4];
-	const Point* pts[4] = { &(c->vertex(0)->point()),
-			&(c->vertex(1)->point()),
-			&(c->vertex(2)->point()),
-			&(c->vertex(3)->point()) };
-
-	if (!simplicity_criterion && is_1_cover() ) {
-		for (int i=0; i<4; i++) {
-			off[i] = int_to_off(c->offset(i));
-		}
-	}
-
-	if (!is_1_cover()) {
-		// Just fetch the vertices of c as points with offsets
-		for (int i=0; i<4; i++) {
-			pts[i] = &(c->vertex(i)->point());
-			off[i] = get_offset(c,i);
-		}
-	}
-
-	for (int i=0; i != 4; ++i) {
-		Cell_handle next = c->neighbor(i);
-		if (previous == next) {
-			continue;
-		}
-
-		// We temporarily put p at i's place in pts.
-		const Point* backup = pts[i];
-		pts[i] = &p;
-
-		if (simplicity_criterion && is_1_cover() ) {
-			if ( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE ) {
-				pts[i] = backup;
-				continue;
-			}
-		}
-		else {
-			Offset backup_off;
-
-			backup_off = off[i];
-			off[i] = off_query;
-
-			if ( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3],
-					off[0], off[1], off[2], off[3]) != NEGATIVE ) {
-				pts[i] = backup;
-				off[i] = backup_off;
-				continue;
-			}
-		}
-
-		// Test whether we need to adapt the offset of the query point.
-		// This means, if we get out of the current cover.
-		off_query = combine_offsets(off_query, get_neighbor_offset(c,i,next));
-		previous = c;
-		c = next;
-		if (n_of_turns)
-		  goto try_next_cell;
-	}
-
-	return c;
-}
-#endif
-
-
-/**
- * returns
- * ON_BOUNDED_SIDE if p inside the cell
- * (for an infinite cell this means that p lies strictly in the half space
- * limited by its finite facet)
- * ON_BOUNDARY if p on the boundary of the cell
- * (for an infinite cell this means that p lies on the *finite* facet)
- * ON_UNBOUNDED_SIDE if p lies outside the cell
- * (for an infinite cell this means that p is not in the preceding
- * two cases)
- * 
- * lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
- */
-// TODO: currently off is not used. It could probably be optimized
-// using off.
-template < class GT, class TDS >
-inline Bounded_side Periodic_3_triangulation_3<GT,TDS>::side_of_cell(
-    const Point & q, const Offset &off, Cell_handle c,
-    Locate_type & lt, int & i, int & j) const
-{
-  CGAL_triangulation_precondition( number_of_vertices() != 0 );
-
-  Orientation o0,o1,o2,o3;
-  o0 = o1 = o2 = o3 = ZERO;
-
-  int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
-  if ((cumm_off == 0) && (is_1_cover())) {
-    CGAL_triangulation_assertion(off == Offset());
-    const Point &p0  = c->vertex(0)->point();
-    const Point &p1  = c->vertex(1)->point();
-    const Point &p2  = c->vertex(2)->point();
-    const Point &p3  = c->vertex(3)->point();
-  
-    if (((o0 = orientation(q ,p1,p2,p3)) == NEGATIVE) ||
-        ((o1 = orientation(p0,q ,p2,p3)) == NEGATIVE) ||
-        ((o2 = orientation(p0,p1,q ,p3)) == NEGATIVE) ||
-        ((o3 = orientation(p0,p1,p2,q )) == NEGATIVE) ) {
-      return ON_UNBOUNDED_SIDE;
-    }
-  } else { // Special case for the periodic space.
-    Offset off_q;
-    Offset offs[4];
-    const Point *p[4];
-    for (int i=0; i<4; i++) {
-      p[i] = &(c->vertex(i)->point());
-      offs[i] = get_offset(c,i);
-    }
-    CGAL_triangulation_assertion(orientation(*p[0], *p[1], *p[2], *p[3],
-        offs[0], offs[1], offs[2], offs[3]) == POSITIVE);
-    bool found=false;
-    for (int i=0; (i<8)&&(!found); i++) {
-      if ((cumm_off | ((~i)&7)) == 7) {
-        o0 = o1 = o2 = o3 = NEGATIVE;
-        off_q = combine_offsets(off, int_to_off(i));
-
-        if (((o0 = orientation(      q,  *p[1],  *p[2],  *p[3], 
-                off_q  ,offs[1],offs[2],offs[3])) != NEGATIVE)&&
-            ((o1 = orientation(  *p[0],      q,  *p[2],  *p[3], 
-                offs[0],  off_q,offs[2],offs[3])) != NEGATIVE)&&
-            ((o2 = orientation(  *p[0],  *p[1],      q,  *p[3], 
-                offs[0],offs[1],  off_q,offs[3])) != NEGATIVE)&&
-            ((o3 = orientation(  *p[0],  *p[1],  *p[2],      q, 
-                offs[0],offs[1],offs[2],  off_q)) != NEGATIVE)) {
-          found = true;
-        }
-      }
-    }
-    if (!found) return ON_UNBOUNDED_SIDE;
-  }
-
-  // now all the oi's are >=0
-  // sum gives the number of facets p lies on
-  int sum = ( (o0 == ZERO) ? 1 : 0 ) 
-    + ( (o1 == ZERO) ? 1 : 0 ) 
-    + ( (o2 == ZERO) ? 1 : 0 ) 
-    + ( (o3 == ZERO) ? 1 : 0 );
-
-  switch (sum) {
-  case 0:
-    {
-      lt = CELL;
-      return ON_BOUNDED_SIDE;
-    }
-  case 1:
-    {
-      lt = FACET;
-      // i = index such that p lies on facet(i)
-      i = ( o0 == ZERO ) ? 0 :
-      ( o1 == ZERO ) ? 1 :
-      ( o2 == ZERO ) ? 2 :
-      3;
-      return ON_BOUNDARY;
-    }
-  case 2:
-    {
-      lt = EDGE;
-      // i = smallest index such that p does not lie on facet(i)
-      // i must be < 3 since p lies on 2 facets
-      i = ( o0 == POSITIVE ) ? 0 :
-      ( o1 == POSITIVE ) ? 1 :
-      2;
-      // j = larger index such that p not on facet(j)
-      // j must be > 0 since p lies on 2 facets
-      j = ( o3 == POSITIVE ) ? 3 :
-      ( o2 == POSITIVE ) ? 2 :
-      1;
-      return ON_BOUNDARY;
-    }
-  case 3:
-    {
-      lt = VERTEX;
-      // i = index such that p does not lie on facet(i)
-      i = ( o0 == POSITIVE ) ? 0 :
-      ( o1 == POSITIVE ) ? 1 :
-      ( o2 == POSITIVE ) ? 2 :
-      3;
-      return ON_BOUNDARY;
-    }
-  default:
-    {
-      // impossible : cannot be on 4 facets for a real tetrahedron
-      CGAL_triangulation_assertion(false);
-      return ON_BOUNDARY;
-    }
-  }
-} // side_of_cell
-
-template< class GT, class TDS >
-template< class CellIt >
-inline void Periodic_3_triangulation_3<GT,TDS>::
-    insert_too_long_edges(Vertex_handle v,
-        const CellIt begin, const CellIt end) {
-  CGAL_triangulation_precondition(number_of_vertices() != 0);
-  // add newly added edges to too_long_edges, if necessary.
-  Point p1,p2;
-  Offset omin;
-  std::pair< Vertex_handle, Vertex_handle > edge_to_add;
-  std::pair< Offset, Offset > edge_to_add_off;
-  std::list<Vertex_handle> empty_list;
-  too_long_edges[v] = empty_list;
-  // Iterate over all cells of the new star.
-  for (CellIt it = begin ; it != end ; ++it) {
-    // Consider all possible vertex pairs.
-    for (int k=0; k<4 ; k++) {
-    for (int j=0; j<4 ; j++) {
-      if (j==k) continue;
-      if (&*((*it)->vertex(j)) > &*((*it)->vertex(k))) continue;
-      // make the offsets canonical (wrt. to some notion)
-      // add to too_long_edges, if not yet added and if "too long"
-      CGAL_triangulation_precondition(
-	  &*((*it)->vertex(j))< &*((*it)->vertex(k)));
-
-      edge_to_add = std::make_pair((*it)->vertex(j), (*it)->vertex(k));
-      
-      p1 = construct_point((*it)->vertex(j)->point(), get_offset(*it, j));
-      p2 = construct_point((*it)->vertex(k)->point(), get_offset(*it, k));
-
-      if ((squared_distance(p1,p2) > edge_length_threshold)
-          && (find(too_long_edges[(*it)->vertex(j)].begin(),
-		  too_long_edges[(*it)->vertex(j)].end(),
-		  edge_to_add.second)
-	      == too_long_edges[(*it)->vertex(j)].end())
-      ){
-        too_long_edges[(*it)->vertex(j)].push_back(edge_to_add.second);
-        too_long_edge_counter++;
-      }
-    } }
-  }
-}
-
-template < class GT, class TDS >
-template < class CellIt >
-inline void Periodic_3_triangulation_3<GT,TDS>::
-    delete_too_long_edges(const CellIt begin, const CellIt end) {
-  std::pair< Vertex_handle, Vertex_handle > edge_to_delete, edge_to_delete2;
-  typename std::list< Vertex_handle >::iterator sit;
-  // Iterate over all cells that are in the star. That means that those cells
-  // are going to be deleted. Therefore, all of them have to be deleted from
-  // too_long_edges, if they are contained in it.
-  for (CellIt it = begin ; it != end ; ++it) {
-    for (int j=0; j<4 ; j++) {
-      for (int k=0; k<4; k++) {
-        if (&*((*it)->vertex(j)) < &*((*it)->vertex(k))) {
-          edge_to_delete = std::make_pair((*it)->vertex(j),(*it)->vertex(k));
-        } else {
-          edge_to_delete = std::make_pair((*it)->vertex(k),(*it)->vertex(j));
-        }
-        Vertex_handle v_no = edge_to_delete.first;
-        sit = find(too_long_edges[v_no].begin(),
-            too_long_edges[v_no].end(),
-            edge_to_delete.second);
-        if (sit != too_long_edges[v_no].end()) {
-          too_long_edges[v_no].erase(sit);
-          too_long_edge_counter--;
-        }
-      }
-    }
-  }
-}
-
-/*! \brief Insert point.
-*
-* Inserts the point p into the triangulation. It assumes that
-* the cell c containing p is already known.
-*
-* Implementation:
-* - some precondition checking
-* - find and mark conflicting cells --> find_conflicts
-* Conflicting cells are stored in the vector cells.
-* - backup hidden points
-* - Delete the edges of the marked cells from too_long_edges
-* - Insert the new vertex in the hole obtained by removing the
-*   conflicting cells (star-approach) --> _tds._insert_in_hole 
-* - find out about offsets
-* - Insert the newly added edges that are "too long"
-*   to too_long_edges
-* - reinsert hidden points
-*/
-template < class GT, class TDS >
-template < class Conflict_tester, class Point_hider >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
-Periodic_3_triangulation_3<GT,TDS>::periodic_insert(
-    const Point & p, const Offset& o,
-    Locate_type lt, Cell_handle c, const Conflict_tester &tester,
-    Point_hider &hider, Vertex_handle vh)
-{
-  Vertex_handle v;
-  CGAL_triangulation_assertion(number_of_vertices() != 0);
-  CGAL_triangulation_precondition_code(
-      Locate_type lt_assert; int i_assert; int j_assert;);
-  CGAL_triangulation_assertion(side_of_cell(tester.point(),o, c,
-      lt_assert, i_assert, j_assert) != ON_UNBOUNDED_SIDE);
-
-  tester.set_offset(o);
-
-  // This only holds for Delaunay
-  CGAL_triangulation_assertion(lt != VERTEX);
-
-  // Choose the periodic copy of tester.point() that is inside c.
-  Offset current_off = get_location_offset(tester, c);
-
-  CGAL_triangulation_assertion(side_of_cell(tester.point(),
-      combine_offsets(o,current_off),c,lt_assert,i_assert,j_assert)
-      != ON_UNBOUNDED_SIDE);
-  // If the new point is not in conflict with its cell, it is hidden.
-  if (!tester.test_initial_cell(c, current_off)) {
-    hider.hide_point(c,p);
-    return Vertex_handle();
-  }
-  // Ok, we really insert the point now.
-  // First, find the conflict region.
-  std::vector<Cell_handle> cells;
-  cells.reserve(32);
-
-  Facet facet;
-
-  find_conflicts(c, current_off, tester,
-      make_triple(Oneset_iterator<Facet>(facet),
-      std::back_inserter(cells),
-      Emptyset_iterator()));
-
-  // Remember the points that are hidden by the conflicting cells,
-  // as they will be deleted during the insertion.
-  hider.set_vertices(cells.begin(), cells.end());
-  
-  if (!is_1_cover())
-    delete_too_long_edges(cells.begin(), cells.end());
-  
-  // Insertion. Attention: facets[0].first MUST be in conflict!
-  // Compute the star and put it into the data structure.
-  // Store the new cells from the star in nbs.
-  v = _tds._insert_in_hole(cells.begin(), cells.end(),
-      facet.first, facet.second);
-  v->set_point(p);
-
-  //TODO: this could be done within the _insert_in_hole without losing any
-  //time because each cell is visited in any case.
-  //- Do timings to argue to modify _insert_in_conflicts if need be
-  //- Find the modified _insert_in_hole in the branch svn history of TDS
-  std::vector<Cell_handle> nbs;
-  incident_cells(v, std::back_inserter(nbs));
-  // For all neighbors of the newly added vertex v: fetch their offsets from
-  // the tester and reset them in the triangulation data structure.
-  for (typename std::vector<Cell_handle>::iterator cit = nbs.begin();
-      cit != nbs.end(); cit++) {
-    Offset off[4];
-    for (int i=0 ; i<4 ; i++) {
-      off[i] = (*cit)->vertex(i)->offset();
-    }
-    set_offsets(*cit, off[0], off[1], off[2], off[3]);
-  }
-  
-  for (typename std::vector<Vertex_handle>::iterator voit = v_offsets.begin();
-      voit != v_offsets.end() ; ++voit) {
-    (*voit)->clear_offset();
-  }
-  v_offsets.clear();
-
-  if (vh != Vertex_handle()) {
-    virtual_vertices[v] = Virtual_vertex(vh,o);
-    virtual_vertices_reverse[vh].push_back(v);
-  }
-
-  if (!is_1_cover())
-    insert_too_long_edges(v, nbs.begin(), nbs.end());
-
-  // Store the hidden points in their new cells.
-  hider.reinsert_vertices(v);
-  return v;
-}
-
-/** Inserts the first point to a triangulation.
-  *
-  * With inserting the first point the 3-sheeted covering is constructed.
-  * So first, the 27 vertices are inserted and are added to virtual_vertices
-  * Then 6*27 cells are created.
-  * Then all links are set.
- */
-template < class GT, class TDS >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
-Periodic_3_triangulation_3<GT,TDS>::create_initial_triangulation(
-    const Point &p) {
-  /// Virtual vertices, one per periodic domain
-  Vertex_handle vir_vertices[3][3][3];
-  /// Virtual cells, 6 per periodic domain
-  Cell_handle cells[3][3][3][6];
-
-  // Initialise vertices:
-  vir_vertices[0][0][0] = _tds.create_vertex();
-  vir_vertices[0][0][0]->set_point(p);
-  virtual_vertices_reverse[vir_vertices[0][0][0]] =
-std::vector<Vertex_handle>();
-  for (int i=0; i<_cover[0]; i++) {
-    for (int j=0; j<_cover[1]; j++) {
-      for (int k=0; k<_cover[2]; k++) {
-        if ((i!=0)||(j!=0)||(k!=0)) {
-          // Initialise virtual vertices out of the domain for debugging
-          vir_vertices[i][j][k] =
-            _tds.create_vertex();
-          vir_vertices[i][j][k]->set_point(p); //+Offset(i,j,k));
-          virtual_vertices[vir_vertices[i][j][k]] =
-            Virtual_vertex(vir_vertices[0][0][0], Offset(i,j,k));
-          virtual_vertices_reverse[vir_vertices[0][0][0]].push_back(
-            vir_vertices[i][j][k]);
-        }
-        CGAL_triangulation_assertion(vir_vertices[i][j][k] != Vertex_handle());
-        CGAL_triangulation_assertion(vir_vertices[0][0][0]->point() == p);
-      }
-    }
-  }
-
-  // Create cells:
-  for (int i=0; i<_cover[0]; i++) {
-    for (int j=0; j<_cover[1]; j++) {
-      for (int k=0; k<_cover[2]; k++) {
-        for (int l=0; l<6; l++) {
-          // 6 cells per 'cube'
-          cells[i][j][k][l] = _tds.create_cell();
-          for (int n=0; n<4; n++)
-            CGAL_triangulation_assertion(cells[i][j][k][l] != Cell_handle());
-        }
-      }
-    }
-  }
-  // set vertex and neighbor information
-  // index to the right vertex: [number of cells][vertex][offset]
-  int vertex_ind[6][4][3] = {
-    { {0, 0, 0},  {0, 1, 0},  {0, 0, 1},  {1, 0, 0} },
-    { {1, 1, 0},  {0, 1, 1},  {1, 0, 1},  {1, 1, 1} },
-    { {1, 0, 0},  {0, 1, 1},  {0, 1, 0},  {0, 0, 1} },
-    { {1, 0, 0},  {0, 1, 1},  {0, 0, 1},  {1, 0, 1} },
-    { {1, 0, 0},  {0, 1, 1},  {1, 0, 1},  {1, 1, 0} },
-    { {1, 0, 0},  {0, 1, 1},  {1, 1, 0},  {0, 1, 0} }
-  };
-  int neighb_ind[6][4][4] = {
-    { { 0, 0, 0, 2},  { 0,-1, 0, 5},  { 0, 0,-1, 3},  {-1, 0, 0, 4} },
-    { { 0, 0, 1, 5},  { 1, 0, 0, 2},  { 0, 1, 0, 3},  { 0, 0, 0, 4} },
-    { {-1, 0, 0, 1},  { 0, 0, 0, 0},  { 0, 0, 0, 3},  { 0, 0, 0, 5} },
-    { { 0, 0, 1, 0},  { 0,-1, 0, 1},  { 0, 0, 0, 4},  { 0, 0, 0, 2} },
-    { { 0, 0, 0, 1},  { 1, 0, 0, 0},  { 0, 0, 0, 5},  { 0, 0, 0, 3} },
-    { { 0, 1, 0, 0},  { 0, 0,-1, 1},  { 0, 0, 0, 2},  { 0, 0, 0, 4} }
-  };
-  for (int i=0; i<_cover[0]; i++) {
-    for (int j=0; j<_cover[1]; j++) {
-      for (int k=0; k<_cover[2]; k++) {
-        int offset = 
-          (i==_cover[0]-1 ? 4 : 0) | 
-	  (j==_cover[1]-1 ? 2 : 0) | 
-	  (k==_cover[2]-1 ? 1 : 0);
-        for (int l=0; l<6; l++) {
-          // cell 0:
-          cells[i][j][k][l]->set_vertices(
-              vir_vertices
-                [(i+vertex_ind[l][0][0])%_cover[0]]
-                [(j+vertex_ind[l][0][1])%_cover[1]]
-                [(k+vertex_ind[l][0][2])%_cover[2]],
-              vir_vertices
-                [(i+vertex_ind[l][1][0])%_cover[0]]
-                [(j+vertex_ind[l][1][1])%_cover[1]]
-                [(k+vertex_ind[l][1][2])%_cover[2]],
-              vir_vertices
-                [(i+vertex_ind[l][2][0])%_cover[0]]
-                [(j+vertex_ind[l][2][1])%_cover[1]]
-                [(k+vertex_ind[l][2][2])%_cover[2]],
-              vir_vertices
-                [(i+vertex_ind[l][3][0])%_cover[0]]
-                [(j+vertex_ind[l][3][1])%_cover[1]]
-                [(k+vertex_ind[l][3][2])%_cover[2]]);
-          set_offsets(cells[i][j][k][l],
-              offset & (vertex_ind[l][0][0]*4 +
-                        vertex_ind[l][0][1]*2 +
-                        vertex_ind[l][0][2]*1),
-              offset & (vertex_ind[l][1][0]*4 +
-                        vertex_ind[l][1][1]*2 +
-                        vertex_ind[l][1][2]*1),
-              offset & (vertex_ind[l][2][0]*4 +
-                        vertex_ind[l][2][1]*2 +
-                        vertex_ind[l][2][2]*1),
-              offset & (vertex_ind[l][3][0]*4 +
-                        vertex_ind[l][3][1]*2 +
-                        vertex_ind[l][3][2]*1));
-          cells[i][j][k][l]->set_neighbors(
-              cells [(i+_cover[0]+neighb_ind[l][0][0])%_cover[0]]
-                    [(j+_cover[1]+neighb_ind[l][0][1])%_cover[1]]
-                    [(k+_cover[2]+neighb_ind[l][0][2])%_cover[2]]
-                    [         neighb_ind[l][0][3]       ],
-              cells [(i+_cover[0]+neighb_ind[l][1][0])%_cover[0]]
-                    [(j+_cover[1]+neighb_ind[l][1][1])%_cover[1]]
-                    [(k+_cover[2]+neighb_ind[l][1][2])%_cover[2]]
-                    [         neighb_ind[l][1][3]       ],
-              cells [(i+_cover[0]+neighb_ind[l][2][0])%_cover[0]]
-                    [(j+_cover[1]+neighb_ind[l][2][1])%_cover[1]]
-                    [(k+_cover[2]+neighb_ind[l][2][2])%_cover[2]]
-                    [         neighb_ind[l][2][3]       ],
-              cells [(i+_cover[0]+neighb_ind[l][3][0])%_cover[0]]
-                    [(j+_cover[1]+neighb_ind[l][3][1])%_cover[1]]
-                    [(k+_cover[2]+neighb_ind[l][3][2])%_cover[2]]
-                    [         neighb_ind[l][3][3]       ]
-          );
-        }
-      }
-    }
-  }
-  // set pointers from the vertices to incident cells.
-  for (int i=0; i<_cover[0]; i++) {
-    for (int j=0; j<_cover[1]; j++) {
-      for (int k=0; k<_cover[2]; k++) {
-        vir_vertices[i][j][k]->set_cell(cells[i][j][k][0]);
-      }
-    }
-  }
-  
-  _tds.set_dimension(3);
-
-  // create the base for too_long_edges;
-  CGAL_triangulation_assertion( too_long_edges.empty() );
-  CGAL_triangulation_assertion(too_long_edge_counter == 0);
-
-  for (Vertex_iterator vit = vertices_begin() ;
-       vit !=vertices_end() ; ++vit )
-    too_long_edges[vit] = std::list<Vertex_handle>();;
-
-  std::vector<Cell_handle> temp_inc_cells;
-  for (Vertex_iterator vit = vertices_begin() ;
-       vit !=vertices_end() ; ++vit ) {
-    temp_inc_cells.clear();
-    incident_cells(vit, std::back_inserter(temp_inc_cells));
-    for (unsigned int i=0 ; i<temp_inc_cells.size() ; i++) {
-      int k = temp_inc_cells[i]->index(vit);
-      for (int j=0; j<4 ; j++) {
-        if (j==k) continue;
-        if (&*vit > &*(temp_inc_cells[i]->vertex(j))) continue;
-        if ((find(too_long_edges[vit].begin(),
-                  too_long_edges[vit].end(),
-            temp_inc_cells[i]->vertex(j)) ==
-		too_long_edges[vit].end())
-        ){
-	  too_long_edges[vit].push_back(temp_inc_cells[i]->vertex(j));
-          too_long_edge_counter++;
-        }
-      }
-    }
-  }
-  return vir_vertices[0][0][0];
-}
-
-#include <CGAL/Periodic_3_triangulation_dummy_36.h>
-
-/** finds all cells that are in conflict with the currently added point
-  * (stored in tester).
-  *
-  * The result will be a hole of which the following data is returned:
-  * - boundary facets
-  * - cells
-  * - internal facets.
-  *
-  * c is the current cell, which must be in conflict.
-  * tester is the function object that tests if a cell is in conflict.
-  */
-template <class GT, class TDS>
-template <class Conflict_test,
-	  class OutputIteratorBoundaryFacets,
-          class OutputIteratorCells,
-	  class OutputIteratorInternalFacets>
-Triple<OutputIteratorBoundaryFacets,
-       OutputIteratorCells,
-       OutputIteratorInternalFacets>
-Periodic_3_triangulation_3<GT,TDS>::
-find_conflicts(Cell_handle d, const Offset &current_off,
-    const Conflict_test &tester,
-    Triple<OutputIteratorBoundaryFacets,
-    OutputIteratorCells,
-    OutputIteratorInternalFacets> it) const {
-  CGAL_triangulation_precondition( number_of_vertices() != 0 );
-  CGAL_triangulation_precondition( tester(d, current_off) );
-
-  std::stack<std::pair<Cell_handle, Offset> > cell_stack;
-  cell_stack.push(std::make_pair(d,current_off));
-  d->tds_data().mark_in_conflict();  
-  *it.second++ = d;
-
-  do {
-    Cell_handle c = cell_stack.top().first;
-    Offset current_off2 = cell_stack.top().second;
-    cell_stack.pop();
-
-    for (int i=0; i< 4; ++i) {
-      Cell_handle test = c->neighbor(i);
-      if (test->tds_data().is_in_conflict()) {
-	if (c < test) {
-	  *it.third++ = Facet(c, i); // Internal facet.
-	}
-	continue; // test was already in conflict.
-      }
-      if (test->tds_data().is_clear()) {
-	Offset o_test = current_off2 + get_neighbor_offset(c, i, test);
-	if (tester(test,o_test)) {
-	  if (c < test)
-	    *it.third++ = Facet(c, i); // Internal facet.
-	  
-	  cell_stack.push(std::make_pair(test,o_test));
-	  test->tds_data().mark_in_conflict();
-	  *it.second++ = test;
-	  continue;
-	}
-	test->tds_data().mark_on_boundary(); // test is on the boundary.
-      }
-      *it.first++ = Facet(c, i);
-      for (int j = 0 ; j<4 ; j++){
-	if (j==i) continue;
-	if (!c->vertex(j)->get_offset_flag()) {
-	  c->vertex(j)->set_offset(int_to_off(c->offset(j))-current_off2);
-	  v_offsets.push_back(c->vertex(j));
-	}
-      }
-    }
-  } while (!cell_stack.empty());
-  return it;
-}
-
-/*! \brief Insert point into triangulation.
- *
- * Inserts the point p into the triangulation. It expects
- * - a cell to start the point location
- * - a testing function to determine cells in conflict
- * - a testing function to determine if a vertex is hidden.
- *
- * Implementation:
- * - If the triangulation is empty call a special function
- * (create_initial_triangulation) to construct the basic
- * triangulation.
- * - Run point location to get the cell c containing point p.
- * - Call periodic_insert to insert p into the 3-cover.
- * - Also insert the eight periodic copies of p.
- */
-template < class GT, class TDS >
-template < class Conflict_tester, class Point_hider >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
-Periodic_3_triangulation_3<GT,TDS>::insert_in_conflict(const Point & p,
-    Locate_type lt, Cell_handle c, int li, int lj,
-    const Conflict_tester &tester, Point_hider &hider) {
-
-  CGAL_triangulation_assertion((_domain.xmin() <= p.x())
-      && (p.x() < _domain.xmax()));
-  CGAL_triangulation_assertion((_domain.ymin() <= p.y())
-      && (p.y() < _domain.ymax()));
-  CGAL_triangulation_assertion((_domain.zmin() <= p.z()) 
-      && (p.z() < _domain.zmax()));
-
-  if (number_of_vertices() == 0) {
-    return create_initial_triangulation(p);
-  }
-
-  if ((lt == VERTEX) &&
-      (tester.compare_weight(c->vertex(li)->point(),p)==0) ) {
-    return c->vertex(li);
-  }
-
-  Vertex_handle vstart;
-  if (!is_1_cover()) {
-    Virtual_vertex_map_it vvmit = virtual_vertices.find(c->vertex(0));
-    if (vvmit == virtual_vertices.end())
-      vstart = c->vertex(0);
-    else
-      vstart = vvmit->second.first;
-    CGAL_triangulation_assertion(virtual_vertices.find(vstart)
-	==virtual_vertices.end());
-    CGAL_triangulation_assertion(virtual_vertices_reverse.find(vstart)
-        != virtual_vertices_reverse.end());
-  }
-  CGAL_triangulation_assertion( number_of_vertices() != 0 );
-  CGAL_triangulation_expensive_assertion(is_valid());
-  Vertex_handle vh = periodic_insert(p, Offset(), lt, c, tester, hider);
-  if (is_1_cover()) {
-    return vh;
-  }
-  
-  for (Cell_iterator it = all_cells_begin() ;
-      it != all_cells_end() ; it++){
-    CGAL_triangulation_assertion(it->neighbor(0)->neighbor(
-        it->neighbor(0)->index(it))==it);
-    CGAL_triangulation_assertion(it->neighbor(1)->neighbor(
-        it->neighbor(1)->index(it))==it);
-    CGAL_triangulation_assertion(it->neighbor(2)->neighbor(
-        it->neighbor(2)->index(it))==it);
-    CGAL_triangulation_assertion(it->neighbor(3)->neighbor(
-        it->neighbor(3)->index(it))==it);
-  }
-
-  std::vector<Vertex_handle> start_vertices
-      = virtual_vertices_reverse.find(vstart)->second;
-  Cell_handle start;
-  virtual_vertices_reverse[vh] = std::vector<Vertex_handle>();
-  // insert 26 periodic copies
-  for (int i=0; i<_cover[0]; i++) {
-    for (int j=0; j<_cover[1]; j++) {
-      for (int k=0; k<_cover[2]; k++) {
-        if ((i!=0)||(j!=0)||(k!=0)) {
-          start = start_vertices[i*9+j*3+k-1]->cell();
-          c = periodic_locate(p, Offset(i,j,k), lt, li, lj, start);
-          periodic_insert(p, Offset(i,j,k), lt, c, tester, hider,vh);
-        }
-      }
-    }
-  }
-  CGAL_triangulation_expensive_assertion(is_valid());
-
-  // Fall back to 1-cover if the criterion that the longest edge is shorter
-  // than sqrt(0.166) is fulfilled.
-  if ( too_long_edge_counter == 0 ) {
-    CGAL_triangulation_expensive_assertion(is_valid());
-    convert_to_1_sheeted_covering();
-    CGAL_triangulation_expensive_assertion( is_valid() );
-  }
-  return vh;
-}
-
-/// tests if two vertices of one cell are just periodic copies of each other
-template < class GT, class TDS >
-inline bool Periodic_3_triangulation_3<GT,TDS>::has_self_edges(Cell_handle c) const {
-  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(1)) || 
-      (c->offset(0) != c->offset(1)));
-  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(2)) || 
-      (c->offset(0) != c->offset(2)));
-  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(3)) || 
-      (c->offset(0) != c->offset(3)));
-  CGAL_triangulation_assertion((c->vertex(1) != c->vertex(2)) || 
-      (c->offset(1) != c->offset(2)));
-  CGAL_triangulation_assertion((c->vertex(1) != c->vertex(3)) || 
-      (c->offset(1) != c->offset(3)));
-  CGAL_triangulation_assertion((c->vertex(2) != c->vertex(3)) || 
-      (c->offset(2) != c->offset(3)));
-  return ((c->vertex(0) == c->vertex(1)) ||
-      (c->vertex(0) == c->vertex(2)) ||
-      (c->vertex(0) == c->vertex(3)) ||
-      (c->vertex(1) == c->vertex(2)) ||
-      (c->vertex(1) == c->vertex(3)) ||
-      (c->vertex(2) == c->vertex(3)));
-}
-
-/*! \brief Tests if the triangulation is valid.
- *
- * A triangulation is valid if
- * - A cell is not its own neighbor.
- * - A cell has no two equal neighbors
- * - A cell has no two equal vertex-offset pairs
- * - A cell is positively oriented.
- * - The point of a neighbor of cell c that does not belong to c is not inside
- *   the circumcircle of c.
- */
-template < class GT, class TDS >
-bool
-Periodic_3_triangulation_3<GT,TDS>::
-is_valid(bool verbose, int level) const {
-  bool error = false;
-  for (Cell_iterator cit = cells_begin();
-       cit != cells_end(); ++cit) {
-    for (int i=0; i<4; i++) {
-      CGAL_triangulation_assertion(cit != cit->neighbor(i));
-      for (int j=i+1; j<4; j++) {
-        CGAL_triangulation_assertion(cit->neighbor(i) != cit->neighbor(j));
-        CGAL_triangulation_assertion(cit->vertex(i) != cit->vertex(j));
-      }
-    }
-    // Check positive orientation:
-    const Point *p[4]; Offset off[4];
-    for (int i=0; i<4; i++) {
-      p[i] = &cit->vertex(i)->point();
-      off[i] = get_offset(cit,i);
-    }
-    if (orientation(*p[0], *p[1], *p[2], *p[3],
-                   off[0], off[1], off[2], off[3]) != POSITIVE) {
-      if (verbose) {
-	std::cerr<<"Periodic_3_triangulation_3: wrong orientation:"<<std::endl;
-	std::cerr<<off[0]<<'\t'<<*p[0]<<'\n'
-		 <<off[1]<<'\t'<<*p[1]<<'\n'
-		 <<off[2]<<'\t'<<*p[2]<<'\n'
-		 <<off[3]<<'\t'<<*p[3]<<std::endl;
-      }
-      error = true;
-    }
-  }
-
-  if (!has_self_edges()) {
-    if (! _tds.is_valid(verbose, level) ) {
-      return false;
-    }
-  }
-
-  return !error;
-}
-
-template < class GT, class TDS >
-bool Periodic_3_triangulation_3<GT,TDS>::is_valid(Cell_handle ch,
-    bool verbose, int level) const {
-  if ( ! _tds.is_valid(ch,verbose,level) )
-    return false;
-  bool error = false;
-  const Point *p[4]; Offset off[4];
-  for (int i=0; i<4; i++) {
-    p[i] = &ch->vertex(i)->point();
-    off[i] = get_offset(ch,i);
-  }
-  if (orientation(*p[0], *p[1], *p[2], *p[3], 
-		  off[0], off[1], off[2], off[3]) != POSITIVE) {
-    error = true;
-  }
-  
-  return !error;
-}
-
-template < class GT, class TDS >
-template < class ConflictTester >
-bool Periodic_3_triangulation_3<GT,TDS>::
-is_valid_conflict(ConflictTester &tester, bool verbose, int level) const {
-  Cell_iterator it;
-  for ( it = cells_begin(); it != cells_end(); ++it ) {
-    is_valid(it, verbose, level);
-    for (int i=0; i<4; i++ ) {
-      Offset o_nb = get_neighbor_offset(it,i,it->neighbor(i));
-      Offset o_vt = get_offset(it->neighbor(i),
-				      it->neighbor(i)->index(it));
-      if (tester(it,
-		 it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point(),
-		 o_vt-o_nb)) {
-        if (verbose)
-          std::cerr << "non-empty sphere: "
-              <<it->vertex(0)->point()<<'\t'
-              <<it->vertex(1)->point()<<'\t'
-              <<it->vertex(2)->point()<<'\t'
-              <<it->vertex(3)->point()<<'\n'
-	      <<it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point()
-              <<'\t'<<o_vt-o_nb
-              << std::endl;
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-template < class GT, class TDS >
-inline void Periodic_3_triangulation_3<GT,TDS>::make_hole(Vertex_handle v, 
-    std::map<Vertex_triple,Facet> &outer_map, std::vector<Cell_handle> &hole) {
-  
-  //CGAL_triangulation_precondition( all_vertices_begin()++ 
-  //    != all_vertices_end() );
-  
-  incident_cells(v, std::back_inserter(hole));
-
-  for (typename std::vector<Cell_handle>::iterator cit = hole.begin();
-       cit != hole.end(); ++cit) {
-    int indv = (*cit)->index(v);
-    Cell_handle opp_cit = (*cit)->neighbor( indv );
-    Facet f(opp_cit, opp_cit->index(*cit)); 
-    Vertex_triple vt = make_vertex_triple(f);
-    make_canonical(vt);
-    outer_map[vt] = f;
-    for (int i=0; i<4; i++)
-      if ( i != indv )
-        (*cit)->vertex(i)->set_cell(opp_cit);
-  }
-}
-
-/*! \brief Remove a vertex from the triangulation.
- *
- * Removes vertex v from the triangulation.
- */
-template < class GT, class TDS >
-template < class PointRemover, class Conflict_tester>
-inline void Periodic_3_triangulation_3<GT,TDS>::remove(Vertex_handle v,
-    PointRemover &r, Conflict_tester &t) {
-  CGAL_expensive_precondition(is_vertex(v));
-  std::vector<Vertex_handle> vhrem;
-  if (!is_1_cover()) {
-    if (number_of_vertices() == 1) {
-      clear();
-      return;
-    }
-    Virtual_vertex_map_it vvmit = virtual_vertices.find(v);
-    if (vvmit != virtual_vertices.end()) v = vvmit->second.first;
-    CGAL_triangulation_assertion(virtual_vertices_reverse.find(v)
-        != virtual_vertices_reverse.end());
-    vhrem = virtual_vertices_reverse.find(v)->second;
-    virtual_vertices_reverse.erase(v);
-    CGAL_triangulation_assertion(vhrem.size()==26);
-    for (int i=0 ; i<26 ; i++) {
-      periodic_remove(vhrem[i],r);
-      virtual_vertices.erase(vhrem[i]);
-      CGAL_triangulation_expensive_assertion(is_valid());
-    }
-    periodic_remove(v,r);
-  } else {
-    periodic_remove(v,r);
-    if (!is_1_cover()) remove(v,r,t);
-  }
-  
-}
-
-/*! \brief Remove a vertex from the triangulation.
- *
- * Removes vertex v from the triangulation.
- * It expects a reference to an instance of a PointRemover.
- * 
- * Implementation:
- * - Compute the hole, that is, all cells incident to v. Cells outside of
- *   this hole are not affected by the deletion of v.
- * - Triangulate the hole. This is done computing the triangulation
- *   in Euclidean space for the points on the border of the hole.
- * - Sew this triangulation into the hole.
- * - Test for all newly added edges, whether they are shorter than the
- *   edge_length_threshold. If not, convert to 3-cover.
- */
-template < class GT, class TDS >
-template < class PointRemover >
-inline void Periodic_3_triangulation_3<GT,TDS>::periodic_remove(Vertex_handle v,
-    PointRemover &remover) {
-
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
-  typedef PointRemover Point_remover;
-  typedef typename Point_remover::CellE_handle    CellE_handle;
-  typedef typename Point_remover::VertexE_handle  VertexE_handle;
-  typedef typename Point_remover::FacetE          FacetE;
-  typedef typename Point_remover::VertexE_triple  VertexE_triple;
-  typedef typename Point_remover::Finite_cellsE_iterator
-      Finite_cellsE_iterator;
-  typedef typename Point_remover::Vertex_triple_FacetE_map
-      Vertex_triple_FacetE_map;
-
-  // First compute the hole and its boundary vertices.
-  std::vector<Cell_handle> hole;
-  hole.reserve(64);
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_FacetE_map inner_map;
-
-  make_hole(v, outer_map, hole);
-
-  CGAL_triangulation_assertion(outer_map.size()==hole.size());
-  CGAL_triangulation_assertion(remover.hidden_points_begin() == 
-      remover.hidden_points_end());
-
-  if (!is_1_cover()) {
-    delete_too_long_edges(hole.begin(), hole.end());
-  }
-  
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::iterator
-      hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
-  {
-    remover.add_hidden_points(*hi);
-  }
-
-  // Build up the map between Vertices on the boundary and offsets
-  // collect all vertices on the boundary
-  std::vector<Vertex_handle> vertices;
-  vertices.reserve(64);
-
-  // The set is needed to ensure that each vertex is inserted only once.
-  std::set<Vertex_handle> tmp_vertices;
-  // The map connects vertices to offsets in the hole
-  std::map<Vertex_handle, Offset> vh_off_map;
-
-  for(typename std::vector<Cell_handle>::iterator cit = hole.begin();
-      cit != hole.end(); ++cit)
-  {
-    // Put all incident vertices in tmp_vertices.
-    for (int j=0; j<4; ++j){
-      if ((*cit)->vertex(j) != v){
-        tmp_vertices.insert((*cit)->vertex(j));
-        vh_off_map[(*cit)->vertex(j)] = int_to_off((*cit)->offset(j))
-            - int_to_off((*cit)->offset((*cit)->index(v)));
-      }
-    }
-  }
-
-  // Now output the vertices.
-  std::copy(tmp_vertices.begin(), tmp_vertices.end(),
-      std::back_inserter(vertices));
-
-  // create a Delaunay/Regular triangulation of the points on the boundary
-  // in Euclidean space and make a map from the vertices in remover.tmp
-  // towards the vertices in *this
-  
-  Unique_hash_map<VertexE_handle,Vertex_handle> vmap;
-  CellE_handle ch;
-  remover.tmp.clear();
-  
-  for(unsigned int i=0; i < vertices.size(); i++){
-    typedef typename Point_remover::Triangulation_R3::Point TRPoint;
-    CGAL_triangulation_assertion(get_offset(vertices[i])
-	+ combine_offsets(Offset(), vh_off_map[vertices[i]])
-	== combine_offsets(get_offset(vertices[i]),vh_off_map[vertices[i]]));
-    TRPoint trp = std::make_pair(vertices[i]->point(),
-	combine_offsets( get_offset(vertices[i]), vh_off_map[vertices[i]]) );
-    VertexE_handle vh = remover.tmp.insert(trp, ch);
-    vmap[vh] = vertices[i];
-    CGAL_triangulation_assertion(vmap.is_defined(vh));
-  }
-  CGAL_triangulation_assertion(remover.tmp.number_of_vertices() != 0);
-
-  // Construct the set of vertex triples of tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of tmp
-  for(Finite_cellsE_iterator it = remover.tmp.finite_cells_begin();
-      it != remover.tmp.finite_cells_end();
-      ++it){
-    VertexE_triple vt_aux;
-    for(int i=0; i < 4; i++){
-      FacetE f = std::pair<CellE_handle,int>(it,i);
-      vt_aux = VertexE_triple(
-          f.first->vertex(vertex_triple_index(f.second,0)),
-          f.first->vertex(vertex_triple_index(f.second,1)),
-          f.first->vertex(vertex_triple_index(f.second,2)));
-      if (vmap.is_defined(vt_aux.first)
-          && vmap.is_defined(vt_aux.second)
-          && vmap.is_defined(vt_aux.third) ) {
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],
-            vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-
-  // A structure for storing the new neighboring relations
-  typedef boost::tuple<Cell_handle, int, Cell_handle> Neighbor_relation;
-  std::vector<Neighbor_relation> nr_vec;
-  std::vector<Cell_handle> new_cells;
-
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-    
-    typename Vertex_triple_FacetE_map::iterator iit =
-        inner_map.find(o_vt_f_pair.first);
-    
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_FacetE_map::value_type i_vt_f_pair = *iit;
-    CellE_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-    
-    // create a new cell to glue to the outer surface
-    Cell_handle new_ch = _tds.create_cell();
-    new_cells.push_back(new_ch);
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                        vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-    set_offsets(new_ch, vh_off_map[vmap[i_ch->vertex(0)]],
-                        vh_off_map[vmap[i_ch->vertex(1)]],
-                        vh_off_map[vmap[i_ch->vertex(2)]],
-                        vh_off_map[vmap[i_ch->vertex(3)]]);
-    
-    // Update the edge length management
-    for( int i=0 ; i < 4 ; i++ ) {
-      for (int j=0 ; j < 4 ; j++) {
-        if (j==i) continue;
-        if (&*(new_ch->vertex(i)) > &*(new_ch->vertex(j))) continue;
-
-	Point p1 = construct_point(new_ch->vertex(i)->point(),
-	    get_offset(new_ch, i));
-	Point p2 = construct_point(new_ch->vertex(j)->point(),
-	    get_offset(new_ch, j));
-        Vertex_handle v_no = new_ch->vertex(i);
-
-        if (squared_distance(p1,p2) > edge_length_threshold) {
-	  // If the cell does not fulfill the edge-length criterion
-	  // revert all changes to the triangulation and transform it
-	  // to a triangulation in the needed covering space.
-          if (is_1_cover()) {
-	    _tds.delete_cells(new_cells.begin(), new_cells.end());
-	    convert_to_27_sheeted_covering();
-            return;
-          }
-          else if (find(too_long_edges[v_no].begin(),
-			too_long_edges[v_no].end(),
-			new_ch->vertex(j))
-		   == too_long_edges[v_no].end()) {
-            too_long_edges[v_no].push_back(new_ch->vertex(j));
-            too_long_edge_counter++;
-          }
-        }
-      }
-    }
-
-    // The neighboring relation needs to be stored temporarily in
-    // nr_vec. It cannot be applied directly because then we could not
-    // easily cancel the removing process if a cell is encountered
-    // that does not obey the edge-length criterion.
-    nr_vec.push_back(boost::make_tuple(o_ch,o_i,new_ch));
-    nr_vec.push_back(boost::make_tuple(new_ch,i_i,o_ch));
-
-    // for the other faces check, if they can also be glued
-    for(unsigned int i = 0; i < 4; i++){
-      if(i != i_i){
-	Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-        // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-	  nr_vec.push_back(boost::make_tuple(o_ch2,o_i2,new_ch));
-	  nr_vec.push_back(boost::make_tuple(new_ch,i,o_ch2));
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-
-  // finally set the neighboring relations
-  for (unsigned int i=0 ; i<nr_vec.size() ; i++) {
-    nr_vec[i].template get<0>()->set_neighbor(nr_vec[i].template get<1>(),nr_vec[i].template get<2>());
-  }
-  
-  _tds.delete_vertex(v);
-  _tds.delete_cells(hole.begin(), hole.end());
-  CGAL_triangulation_expensive_assertion(is_valid());
-}
-
-// ############################################################################
-// ############################################################################
-// ############################################################################
-template < class GT, class TDS >
-template < class Cmp >
-class Periodic_3_triangulation_3<GT, TDS>::Perturbation_order {
-
-  typedef GT Geometric_traits;
-  typedef typename Geometric_traits::Point_3 Point;
-  typedef typename Geometric_traits::Compare_xyz_3 Compare_xyz_3;
-  typedef typename Periodic_3_triangulation_3<GT, TDS>::Periodic_point
-      Periodic_point;
-  
-  Cmp _cmp;
-
-public:
-  Perturbation_order(const Cmp & cmp) : _cmp(cmp) {}
-
-  bool operator()(const Periodic_point *p, const Periodic_point *q) const {
-    return (_cmp(p->first, q->first, p->second, q->second) == SMALLER);
-  }
-};
-
-// ############################################################################
-// ############################################################################
-// ############################################################################
-
-/** \brief Delete each redundant cell and the not anymore needed data
- *  structures.
- * 
- *  This function consists of four iterations over all cells and one
- *  iteration over all vertices:
- *  1. cell iteration: mark all cells that are to delete
- *  2. cell iteration: redirect neighbors of remaining cells
- *  3. cell iteration: redirect vertices of remaining cells
- *  4. cell iteration: delete all cells marked in the 1. iteration
- *  Vertex iteration: delete all vertices outside the original domain.
- */
-template < class GT, class TDS >
-inline void 
-Periodic_3_triangulation_3<GT,TDS>::convert_to_1_sheeted_covering() {
-  // ###################################################################
-  // ### First cell iteration ##########################################
-  // ###################################################################
-  {
-    if (is_1_cover()) return;
-    bool to_delete, has_simplifiable_offset;
-    Virtual_vertex_map_it vvmit;
-    // First iteration over all cells: Mark the cells that are to delete.
-    // Cells are to delete if they cannot be translated anymore in the
-    // direction of one of the axes without yielding negative offsets.
-    for( Cell_iterator it = all_cells_begin() ;
-    it != all_cells_end() ; ++it ) {
-      to_delete = false;
-      // for all directions in 3D Space
-      for( int j=0 ; j<3 ; j++ ) {
-        has_simplifiable_offset = true;
-        // for all vertices of cell it
-        for( int i=0 ; i<4 ; i++ ) {
-          vvmit = virtual_vertices.find(it->vertex(i));
-          // if it->vertex(i) lies inside the original domain:
-          if (vvmit == virtual_vertices.end()) {
-            // the cell cannot be moved any more because if we did, then
-            // it->vertex(i) will get at least one negative offset.
-            has_simplifiable_offset = false;
-            // if it->vertex(i) lies outside the original domain:
-          } else {
-            // The cell can certainly be deleted if the offset contains a 2
-            to_delete = to_delete
-                || (vvmit->second.second[j] == 2) ;
-            // The cell can be moved into one direction only if the offset of
-            // all for vertices is >=1 for this direction. Since we already
-            // tested for 2 it is sufficient to test here for 1.
-            has_simplifiable_offset = has_simplifiable_offset
-                && (vvmit->second.second[j] == 1) ;
-          }
-        } 
-        // if the offset can be simplified, i.e. the cell can be moved, then
-        // it can be deleted.
-        if (has_simplifiable_offset)
-          to_delete = true;
-      }
-      // Mark all cells that are to delete. They cannot be deleted yet,
-      // because neighboring information still needs to be extracted.
-      if (to_delete) {
-        it->set_additional_flag(1);
-      }
-    }
-  }
-
-  // ###################################################################
-  // ### Second cell iteration #########################################
-  // ###################################################################
-  {
-    Vertex_handle vert[4], nbv[4];
-    Offset off[4];
-    Cell_handle nb, new_neighbor;
-    std::vector<Triple<Cell_handle, int, Cell_handle> > new_neighbor_relations;
-
-    // Second iteration over all cells: redirect neighbors where necessary
-    for (Cell_iterator it = all_cells_begin() ;
-        it != all_cells_end() ; ++it) {
-      // Skip all cells that are to delete.
-      if (it->get_additional_flag() == 1) continue;
-      
-      // Redirect neighbors: Only neighbors that are marked by the
-      // additional_flag have to be substituted by one of their periodic
-      // copies. The unmarked neighbors stay the same.
-      for ( int i = 0 ; i < 4 ; i++ ) {
-        if ( it->neighbor(i)->get_additional_flag() != 1 ) continue;
-        
-        nb = it->neighbor(i);
-        
-        for ( int j = 0 ; j < 4 ; j++ ) {
-          off[j] = Offset();
-          get_vertex( nb, j, vert[j], off[j]);
-        }
-        int x,y,z;
-        x = (std::min) ( (std::min) ( off[0][0], off[1][0] ),
-            (std::min) ( off[2][0], off[3][0] ) );
-        y = (std::min) ( (std::min) ( off[0][1], off[1][1] ),
-            (std::min) ( off[2][1], off[3][1] ) );
-        z = (std::min) ( (std::min) ( off[0][2], off[1][2] ),
-            (std::min) ( off[2][2], off[3][2] ) );
-        
-        // The vector from nb to the "original" periodic copy of nb, that is
-        // the copy that will not be deleted.
-        Offset difference_offset(x,y,z);
-        CGAL_triangulation_assertion( !difference_offset.is_null() );
-        
-        // We now have to find the "original" periodic copy of nb from
-        // its vertices. Therefore, we first have to find the vertices.
-        for ( int j = 0 ; j < 4 ; j++ ) {
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[0] >= 0);
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[1] >= 0);
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[2] >= 0);
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[0] < 3);
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[1] < 3);
-          CGAL_triangulation_assertion( (off[j]-difference_offset)[2] < 3);
-          
-          // find the Vertex_handles of the vertices of the "original"
-          // periodic copy of nb. If the vertex is inside the original
-          // domain, there is nothing to do
-          if ( (off[j]-difference_offset).is_null() ) {
-            nbv[j] = vert[j];
-            // If the vertex is outside the original domain, we have to search
-            // in virtual_vertices in the "wrong" direction. That means, we
-            // cannot use virtual_vertices.find but have to use
-            // virtual_vertices_reverse.
-          } else {
-            Offset nbo = off[j]-difference_offset;
-            nbv[j] = virtual_vertices_reverse.find(vert[j])
-              ->second[nbo[0]*9+nbo[1]*3+nbo[2]-1];
-          }
-        }
-        // Find the new neighbor by its 4 vertices
-        new_neighbor = get_cell( nbv );
-        
-        // Store the new neighbor relation. This cannot be applied yet because
-        // it would disturb the functioning of get_cell( ... )
-        new_neighbor_relations.push_back(make_triple(it, i, new_neighbor));
-      }
-    }
-    // Apply the new neighbor relations now.
-    for (unsigned int i=0 ; i<new_neighbor_relations.size() ; i++){
-      new_neighbor_relations[i].first->set_neighbor(
-          new_neighbor_relations[i].second,
-          new_neighbor_relations[i].third);
-    }
-  }
-  
-  // ###################################################################
-  // ### Third cell iteration ##########################################
-  // ###################################################################
-  {
-    Vertex_handle vert[4];
-    Offset off[4];
-    // Third iteration over all cells: redirect vertices where necessary
-    for (Cell_iterator it = all_cells_begin() ;
-        it != all_cells_end() ; ++it) {
-      // Skip all cells that are marked to delete
-      if (it->get_additional_flag() == 1) continue;
-      // Find the corresponding vertices of it in the original domain
-      // and set them as new vertices of it.
-      for ( int i = 0 ; i < 4 ; i++ ) {
-        off[i] = Offset();
-        get_vertex( it, i, vert[i], off[i]);
-        it->set_vertex( i, vert[i]);
-        CGAL_triangulation_assertion(vert[i]->point()[0] < _domain.xmax());
-        CGAL_triangulation_assertion(vert[i]->point()[1] < _domain.ymax());
-        CGAL_triangulation_assertion(vert[i]->point()[2] < _domain.zmax());
-        CGAL_triangulation_assertion(vert[i]->point()[0] >= _domain.xmin());
-        CGAL_triangulation_assertion(vert[i]->point()[1] >= _domain.ymin());
-        CGAL_triangulation_assertion(vert[i]->point()[2] >= _domain.zmin());
-        
-        // redirect also the cell pointer of the vertex.
-        it->vertex(i)->set_cell(it);
-      }
-      // Set the offsets.
-      set_offsets(it, off[0], off[1], off[2], off[3] );
-      CGAL_triangulation_assertion( int_to_off(it->offset(0)) == off[0] );
-      CGAL_triangulation_assertion( int_to_off(it->offset(1)) == off[1] );
-      CGAL_triangulation_assertion( int_to_off(it->offset(2)) == off[2] );
-      CGAL_triangulation_assertion( int_to_off(it->offset(3)) == off[3] );
-    }
-  }
-  
-  // ###################################################################
-  // ### Fourth cell iteration #########################################
-  // ###################################################################
-  {
-    // Delete the marked cells.
-    std::vector<Cell_handle> cells_to_delete;
-    for ( Cell_iterator cit = all_cells_begin() ;
-    cit != all_cells_end() ; ++cit ) {
-      if ( cit->get_additional_flag() == 1 )
-        cells_to_delete.push_back( cit );
-    }
-    _tds.delete_cells(cells_to_delete.begin(), cells_to_delete.end());
-  }
-  
-  // ###################################################################
-  // ### Vertex iteration ##############################################
-  // ###################################################################
-  {
-    // Delete all the vertices in virtual_vertices, that is all vertices
-    // outside the original domain.
-    std::vector<Vertex_handle> vertices_to_delete;
-    for ( Vertex_iterator vit = all_vertices_begin() ;
-	  vit != all_vertices_end() ; ++vit ) {
-      if ( virtual_vertices.count( vit ) != 0 ) {
-        CGAL_triangulation_assertion( virtual_vertices.count( vit ) == 1 );
-        vertices_to_delete.push_back( vit ) ;
-      }
-    }
-    _tds.delete_vertices(vertices_to_delete.begin(), vertices_to_delete.end());
-  }
-  _cover = make_array(1,1,1);
-  virtual_vertices.clear();
-  virtual_vertices_reverse.clear();
-}
-
-template < class GT, class TDS >
-inline void
-Periodic_3_triangulation_3<GT,TDS>::convert_to_27_sheeted_covering() {
-  if (_cover == make_array(3,3,3)) return;
-  CGAL_triangulation_precondition(is_1_cover());
-
-  // Create 27 copies of each vertex and write virtual_vertices and
-  // virtual_vertices_reverse
-  std::list<Vertex_handle> original_vertices;
-  // try to use std::copy instead of the following loop.
-  for (Vertex_iterator vit = vertices_begin() ; vit != vertices_end() ; ++vit)
-    original_vertices.push_back(vit);
-  for (typename std::list<Vertex_handle>::iterator vit
-	 = original_vertices.begin() ; vit != original_vertices.end() ; ++vit) {
-    Vertex_handle v_cp;
-    std::vector<Vertex_handle> copies;
-    for (int i=0; i<3; i++)
-      for (int j=0; j<3; j++)
-	for (int k=0; k<3; k++) {
-	  if (i==0 && j==0 && k==0) continue;
-	  v_cp = _tds.create_vertex(*vit);
-	  copies.push_back(v_cp);
-	  virtual_vertices.insert(std::make_pair(v_cp,
-	      std::make_pair(*vit,Offset(i,j,k))));
-	}
-    virtual_vertices_reverse.insert(std::make_pair(*vit,copies));
-  }
-
-  // Create 27 copies of each cell from the respective copies of the
-  // vertices and write virtual_cells and virtual_cells_reverse.
-  typedef std::map<Cell_handle, std::pair<Cell_handle, Offset> >
-    Virtual_cell_map;
-  typedef std::map<Cell_handle, std::vector<Cell_handle > >
-    Virtual_cell_reverse_map;
-  typedef typename Virtual_cell_reverse_map::const_iterator VCRMIT;
-
-  Virtual_cell_map virtual_cells;
-  Virtual_cell_reverse_map virtual_cells_reverse;
-  
-  std::list<Cell_handle> original_cells;
-  for (Cell_iterator cit = cells_begin() ; cit != cells_end() ; ++cit)
-    original_cells.push_back(cit);
-
-  // Store vertex offsets in a separate data structure
-  std::list< Offset > off_v;
-  for (typename std::list<Vertex_handle>::iterator vit
-	 = original_vertices.begin() ; vit != original_vertices.end() ; ++vit) {
-    Cell_handle ccc = (*vit)->cell();
-    int v_index = ccc->index(*vit);
-    off_v.push_back(int_to_off(ccc->offset(v_index)));
-  }
-
-  // Store neighboring offsets in a separate data structure
-  std::list< array<Offset,4> > off_nb;
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
-       cit != original_cells.end() ; ++cit) {
-    array<Offset,4> off_nb_c;
-    for (int i=0; i<4; i++){
-      Cell_handle ccc = *cit;
-      Cell_handle nnn = ccc->neighbor(i);
-      off_nb_c[i] = get_neighbor_offset(ccc,i,nnn);
-    }
-    off_nb.push_back(off_nb_c);
-  }
-
-  // Create copies of cells
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
-       cit != original_cells.end() ; ++cit) {
-    Cell_handle c_cp;
-    Vertex_handle v0,v1,v2,v3;
-    std::vector<Cell_handle> copies;
-    Virtual_vertex_reverse_map_it vvrmit[4];
-    Offset vvoff[4];
-    for (int i=0; i<4; i++) {
-	vvrmit[i] = virtual_vertices_reverse.find((*cit)->vertex(i));
-	CGAL_triangulation_assertion(
-	    vvrmit[i] != virtual_vertices_reverse.end());
-	vvoff[i] = int_to_off((*cit)->offset(i));
-    }
-    Vertex_handle vvh[4];
-    for (int n=0; n<26; n++) {
-      for (int i=0; i<4; i++) {
-	// Decomposition of n into an offset (nx,ny,nz):
-	// nx = (n+1)/9, ny = ((n+1)/3)%3, nz = (n+1)%3
-	int o_i = ((n+1)/9+vvoff[i].x()+3)%3;
-	int o_j = ((n+1)/3+vvoff[i].y()+3)%3;
-	int o_k = ((n+1)+vvoff[i].z()+3)%3;
-	int n_c = 9*o_i+3*o_j+o_k-1;
-	CGAL_triangulation_assertion(n_c >= -1);
-	if (n_c == -1) vvh[i] = (*cit)->vertex(i);
-	else           vvh[i] = vvrmit[i]->second[n_c];
-      }
-      c_cp = _tds.create_cell(vvh[0], vvh[1], vvh[2], vvh[3]);
-      copies.push_back(c_cp);
-    }
-    virtual_cells_reverse.insert(std::make_pair(*cit,copies));
-  }
-
-  // Set new vertices of boundary cells of the original domain.
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
-       cit != original_cells.end() ; ++cit) {
-    for (int i=0; i<4; i++) {
-      Virtual_vertex_reverse_map_it vvrmit
-	= virtual_vertices_reverse.find((*cit)->vertex(i));
-      CGAL_triangulation_assertion(vvrmit != virtual_vertices_reverse.end());
-      Offset vvoff = int_to_off((*cit)->offset(i));
-      if (!vvoff.is_null()) {
-	int n_c = 9*vvoff.x()+3*vvoff.y()+vvoff.z()-1;
-	CGAL_triangulation_assertion(n_c >= 0);
-	CGAL_triangulation_assertion(static_cast<unsigned int>(n_c) 
-	    < vvrmit->second.size());
-	(*cit)->set_vertex(i,vvrmit->second[n_c]);
-      }
-    }
-  }
-
-  // Set neighboring relations of cell copies
-  typename std::list< array<Offset,4> >::iterator oit = off_nb.begin() ; 
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin();
-       cit != original_cells.end() ; ++cit, ++oit) {
-    CGAL_triangulation_assertion( oit != off_nb.end() );
-    VCRMIT c_cp = virtual_cells_reverse.find(*cit);
-    CGAL_triangulation_assertion(c_cp != virtual_cells_reverse.end());
-    for (int i=0; i<4; i++) {
-      Cell_handle cit_nb = (*cit)->neighbor(i);
-      VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb);
-      CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end());
-      Offset nboff = (*oit)[i];
-      for (int n=0; n<26; n++) {
-	int n_nb;
- 	if (nboff.is_null()) n_nb = n;
- 	else {
- 	  int o_i = ((n+1)/9-nboff.x()+3)%3;
- 	  int o_j = ((n+1)/3-nboff.y()+3)%3;
- 	  int o_k = (n+1-nboff.z()+3)%3;
- 	  n_nb = 9*o_i+3*o_j+o_k-1;
- 	}
-	if (n_nb == -1) {
-	  CGAL_triangulation_assertion(cit_nb->has_vertex(
-		  c_cp->second[n]->vertex((i+1)%4)) );
-	  CGAL_triangulation_assertion(cit_nb->has_vertex(
-		  c_cp->second[n]->vertex((i+2)%4)) );
-	  CGAL_triangulation_assertion(cit_nb->has_vertex(
-		  c_cp->second[n]->vertex((i+3)%4)) );
-	  c_cp->second[n]->set_neighbor(i,cit_nb);
-	}
-	else {
-	  CGAL_triangulation_assertion(n_nb >= 0);
-	  CGAL_triangulation_assertion(static_cast<unsigned int>(n_nb)
-	      <= c_cp_nb->second.size());
-	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-			 ->has_vertex(c_cp->second[n]->vertex((i+1)%4)) );
-	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-			 ->has_vertex(c_cp->second[n]->vertex((i+2)%4)) );
-	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-			 ->has_vertex(c_cp->second[n]->vertex((i+3)%4)) );
-	  c_cp->second[n]->set_neighbor(i,c_cp_nb->second[n_nb]);
-	}
-      }
-    }
-  }
-
-  // Set neighboring relations of original cells
-  oit = off_nb.begin();
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin();
-       cit != original_cells.end() ; ++cit, ++oit) {
-    CGAL_triangulation_assertion( oit != off_nb.end() );
-    for (int i=0; i<4; i++) {
-      Offset nboff = (*oit)[i];
-      if (!nboff.is_null()) {
-	Cell_handle cit_nb = (*cit)->neighbor(i);
-	VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb);
-	CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end());
-	int o_i = (3-nboff.x())%3;
-	int o_j = (3-nboff.y())%3;
-	int o_k = (3-nboff.z())%3;
-	int n_nb = 9*o_i+3*o_j+o_k-1;
-	CGAL_triangulation_assertion(n_nb >= 0);
-	CGAL_triangulation_assertion(static_cast<unsigned int>(n_nb)
-	    <= c_cp_nb->second.size());
-	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-		       ->has_vertex((*cit)->vertex((i+1)%4)) );
-	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-		       ->has_vertex((*cit)->vertex((i+2)%4)) );
-	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
-		       ->has_vertex((*cit)->vertex((i+3)%4)) );
-	(*cit)->set_neighbor(i,c_cp_nb->second[n_nb]);
-      }
-    }
-  }
-
-  // Set incident cells 
-  for (Cell_iterator cit = cells_begin() ; cit != cells_end() ; ++cit) {
-    for (int i=0 ; i<4 ; i++) {
-      cit->vertex(i)->set_cell(cit);
-    }
-  }
-
-  // Set offsets where necessary
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
-       cit != original_cells.end() ; ++cit) {
-    VCRMIT c_cp = virtual_cells_reverse.find(*cit);
-    CGAL_triangulation_assertion( c_cp != virtual_cells_reverse.end());
-    Offset off[4];
-    for (int i=0; i<4; i++)
-      off[i] = int_to_off((*cit)->offset(i));
-    if (off[0].is_null() && off[1].is_null()
-	&& off[2].is_null() && off[3].is_null()) continue;
-    for (int n=0; n<26; n++) {
-      Offset off_cp[4];
-      int o_i = (n+1)/9;
-      int o_j = ((n+1)/3)%3;
-      int o_k = (n+1)%3;
-      if (o_i!=2 && o_j!=2 && o_k !=2) continue;
-      for (int i=0; i<4; i++) {
-	off_cp[i] = Offset((o_i==2)?off[i].x():0,
-			   (o_j==2)?off[i].y():0,
-			   (o_k==2)?off[i].z():0);
-	CGAL_triangulation_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1);
-	CGAL_triangulation_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1);
-	CGAL_triangulation_assertion(off_cp[i].z() == 0 || off_cp[i].z() == 1);
-      }
-      set_offsets(c_cp->second[n],off_cp[0],off_cp[1],off_cp[2],off_cp[3]);
-    }
-  }
-
-  // Iterate over all original cells and reset offsets.
-  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
-       cit != original_cells.end() ; ++cit) {
-    //This statement does not seem to have any effect
-    set_offsets(*cit, 0,0,0,0);
-    CGAL_triangulation_assertion((*cit)->offset(0) == 0);
-    CGAL_triangulation_assertion((*cit)->offset(1) == 0);
-    CGAL_triangulation_assertion((*cit)->offset(2) == 0);
-    CGAL_triangulation_assertion((*cit)->offset(3) == 0);
-  }
-
-  _cover = make_array(3,3,3);
-  CGAL_triangulation_expensive_assertion(is_valid());
-
-  // Set up too long edges data structure
-  int i=0;
-  for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) {
-    too_long_edges[vit] = std::list<Vertex_handle>();
-    ++i;
-  }
-  too_long_edge_counter = find_too_long_edges(too_long_edges);
-}
-
-// iterate over all edges and store the ones that are longer than
-// edge_length_threshold in edges. Return the number of too long edges.
-template < class GT, class TDS >
-inline int
-Periodic_3_triangulation_3<GT,TDS>::find_too_long_edges(
-    std::map<Vertex_handle, std::list<Vertex_handle> >& edges)
-const {
-  Point p1, p2;
-  int counter = 0;
-  Vertex_handle v_no,vh;
-  for (Edge_iterator eit = edges_begin();
-       eit != edges_end() ; eit++) {
-    p1 = construct_point(eit->first->vertex(eit->second)->point(),
-	get_offset(eit->first, eit->second));
-    p2 = construct_point(eit->first->vertex(eit->third)->point(),
-	get_offset(eit->first, eit->third));
-    if (squared_distance(p1,p2) > edge_length_threshold) {
-      if (&*(eit->first->vertex(eit->second)) <
-	  &*(eit->first->vertex(eit->third))) {
-	v_no = eit->first->vertex(eit->second);
-	vh = eit->first->vertex(eit->third);
-      } else {
-	v_no = eit->first->vertex(eit->third);
-	vh = eit->first->vertex(eit->second);
-      }
-      edges[v_no].push_back(vh);
-      counter++;
-    }
-  }
-  return counter;
-}
-
-template < class GT, class TDS >
-class Periodic_3_triangulation_3<GT,TDS>::Finder {
-  const Self* _t;
-  const Point & _p;
-public:
-  Finder(const Self* t, const Point &p) : _t(t), _p(p) {}
-  bool operator()(const Vertex_handle v) {
-    return _t->equal(v->point(), _p);
-  }
-};
-
-/** Find the cell that consists of the four given vertices
- *
- *  Iterates over all cells and compare the four vertices of each cell
- *  with the four vertices in vh.
- */
-template < class GT, class TDS >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
-Periodic_3_triangulation_3<GT,TDS>::get_cell(const Vertex_handle* vh) const {
-  bool contains_v[4];
-  std::vector<Cell_handle> cells;
-  incident_cells(vh[3],std::back_inserter(cells));
-  for ( typename std::vector<Cell_handle>::iterator it = cells.begin();
-       it != cells.end(); it++ ) {
-    CGAL_triangulation_assertion(
-	(*it)->vertex(0) == vh[3] || (*it)->vertex(1) == vh[3]
-      ||(*it)->vertex(2) == vh[3] || (*it)->vertex(3) == vh[3]) ;
-    for ( int j=0 ; j<3 ; j++ ) {
-      contains_v[j] = false;
-      contains_v[j] = ( (*it)->vertex(0) == vh[j] )
-          || ( (*it)->vertex(1) == vh[j] )
-          || ( (*it)->vertex(2) == vh[j] )
-          || ( (*it)->vertex(3) == vh[j] );
-    }
-    if (contains_v[0] && contains_v[1] && contains_v[2]) {
-      return (*it);
-    }
-  }
-  CGAL_triangulation_assertion(false);
-  return Cell_handle();
-}
-
-/*! \brief Get the offset of tester.point() such that 
- * this point is in conflict with c w.r.t tester.get_offset().
- *
- * Implementation: Just try all eight possibilities.
- */
-template < class GT, class TDS >
-template < class Conflict_tester >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Offset
-Periodic_3_triangulation_3<GT,TDS>::get_location_offset(
-    const Conflict_tester& tester, Cell_handle c) const {
-  CGAL_triangulation_precondition( number_of_vertices() != 0 );
-
-  //  CGAL_triangulation_precondition_code(Locate_type lt; int i; int j;);
-  //  CGAL_triangulation_precondition(side_of_cell(q,o,c,lt,i,j)
-  //      != ON_UNBOUNDED_SIDE);
-
-  int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
-  if (cumm_off == 0) {
-    // default case:
-    return Offset();
-  } else {
-    // Main idea seems to just test all possibilities.
-    for (int i=0; i<8; i++) {
-      if (((cumm_off | (~i))&7) == 7) {
-		  if (tester(c,int_to_off(i))) {
-			return int_to_off(i);
-        }
-      }
-    }
-  }
-  CGAL_triangulation_assertion(false);
-  return Offset();
-}
-
-/** Get the offset between the origins of the internal offset coordinate
-  * systems of two neighboring cells with respect from ch to nb.
-  *
-  * - Find two corresponding vertices from each cell
-  * - Return the difference of their offsets.
-  */
-template < class GT, class TDS >
-inline typename Periodic_3_triangulation_3<GT,TDS>::Offset
-Periodic_3_triangulation_3<GT,TDS>::get_neighbor_offset(
-    Cell_handle ch, int i, Cell_handle nb) const {
-  // Redundance in the signature!
-  CGAL_triangulation_precondition(ch->neighbor(i) == nb);
-  CGAL_triangulation_precondition(nb->neighbor(nb->index(ch)) == ch);
-  
-  Vertex_handle vertex_ch;
-  int index_ch, index_nb;
-  // ensure that vertex_ch \in nb and vertex_nb \in ch
-  index_ch = (i==0? 1 : 0);
-  vertex_ch = ch->vertex(index_ch);
-  index_nb = nb->index(vertex_ch);
-
-  return int_to_off(nb->offset(index_nb)) - int_to_off(ch->offset(index_ch));
-}
-
-/**
- * - ch->offset(i) is an bit triple encapsulated in an integer. Each bit
- *   represents the offset in one direction --> 2-cover!
- * - it_to_off(int) decodes this again.
- * - Finally the offset vector is multiplied by cover.
- *   So if we are working in 3-cover we translate it to the neighboring
- *   3-cover and not only to the neighboring domain.
- */
-template < class GT, class TDS >
-inline void Periodic_3_triangulation_3<GT, TDS>::get_vertex(
-    Cell_handle ch, int i, Vertex_handle &vh, Offset &off) const {
-
-  off = combine_offsets(Offset(),int_to_off(ch->offset(i)));
-  vh = ch->vertex(i);
-  
-  if (is_1_cover()) return;
-  Vertex_handle vh_i = vh;
-  get_vertex(vh_i, vh, off);
-  return;
-}
-
-template < class GT, class TDS >
-inline void Periodic_3_triangulation_3<GT, TDS>::get_vertex(
-    Vertex_handle vh_i, Vertex_handle &vh, Offset &off) const {
-  
-  Virtual_vertex_map_it it = virtual_vertices.find(vh_i);
-
-  if (it == virtual_vertices.end()) {
-    // if ch->vertex(i) is not contained in virtual_vertices, then it is in
-    // the original domain.
-    vh = vh_i;
-    CGAL_triangulation_assertion(vh != Vertex_handle());
-  } else {
-    // otherwise it has to be looked up as well as its offset.
-    vh = it->second.first;
-    off += it->second.second;
-    CGAL_triangulation_assertion(vh->point().x() < _domain.xmax());
-    CGAL_triangulation_assertion(vh->point().y() < _domain.ymax());
-    CGAL_triangulation_assertion(vh->point().z() < _domain.zmax());
-    CGAL_triangulation_assertion(vh->point().x() >= _domain.xmin());
-    CGAL_triangulation_assertion(vh->point().y() >= _domain.ymin());
-    CGAL_triangulation_assertion(vh->point().z() >= _domain.zmin());
-  }
-}
-
-template < class GT, class TDS >
-std::istream & 
-operator>> (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr)
-  // reads
-  // the current covering that guarantees the triangulation to be a
-  //     simplicial complex
-  // the number of vertices
-  // the non combinatorial information on vertices (points in case of 1-sheeted
-  //     covering, point-offset pairs otherwise)
-  //     ALL PERIODIC COPIES OF ONE VERTEX MUST BE STORED CONSECUTIVELY
-  // the number of cells
-  // the cells by the indices of their vertices in the preceding list
-  // of vertices, plus the non combinatorial information on each cell
-  // the neighbors of each cell by their index in the preceding list of cells
-{
-  CGAL_triangulation_precondition(is.good());
-
-  typedef Periodic_3_triangulation_3<GT,TDS>       Triangulation;
-  typedef typename GT::FT FT;
-  typedef typename Triangulation::size_type             size_type;
-  typedef typename Triangulation::Vertex_handle         Vertex_handle;
-  typedef typename Triangulation::Cell_handle           Cell_handle;
-  typedef typename Triangulation::Offset                Offset;
-  typedef typename Triangulation::Iso_cuboid            Iso_cuboid;
-
-  tr.clear();
-
-  Iso_cuboid domain(0,0,0,1,1,1);
-  int cx=0, cy=0, cz=0;
-  size_type n=0;
-
-  if (is_ascii(is)) {
-    is >> domain;
-    is >> cx >> cy >> cz;
-    is >> n;
-  }
-  else {
-    is >> domain;
-    read(is,cx);
-    read(is,cy);
-    read(is,cz);
-    read(is,n);
-  }
- 
-  CGAL_triangulation_assertion((n/(cx*cy*cz))*cx*cy*cz == n);
-
-  tr.tds().set_dimension((n==0?-2:3));
-  tr._domain = domain;
-  tr._gt.set_domain(domain);
-  tr._cover = make_array(cx,cy,cz);
-
-  if ( n==0 ) return is;
-
-  std::map< std::size_t, Vertex_handle > V;
-
-  if (cx==1 && cy==1 && cz==1) {
-    for (std::size_t i=0; i < n; i++) {
-      V[i] = tr.tds().create_vertex();
-      is >> *V[i];
-    }
-  } else {
-    Vertex_handle v,w;
-    std::vector<Vertex_handle> vv;
-    Offset off;
-    for (std::size_t i=0; i < n; i++) {
-      v = tr.tds().create_vertex();
-      V[i] = v;
-      is >> *V[i] >> off;
-      vv.clear();
-      for (int j=1; j<cx*cy*cz; j++) {
-        i++;
-        w = tr.tds().create_vertex();
-        V[i] = w;
-        is >> *V[i] >> off;
-        vv.push_back(w);
-        tr.virtual_vertices[w]=std::make_pair(v,off);
-      }
-      tr.virtual_vertices_reverse[v]=vv;
-    }
-  }
-  
-  std::map< std::size_t, Cell_handle > C;
-  std::size_t m;
-  tr._tds.read_cells(is, V, m, C);
-
-  // read offsets
-  int off[4] = {0,0,0,0};
-  for (std::size_t j=0 ; j < m; j++) {
-    if (is_ascii(is))
-      is >> off[0] >> off[1] >> off[2] >> off[3];
-    else {
-      read(is,off[0]);
-      read(is,off[1]);
-      read(is,off[2]);
-      read(is,off[3]);
-    }
-    tr.set_offsets(C[j],off[0],off[1],off[2],off[3]);
-  }
-  
-  // read potential other information
-  for (std::size_t j=0 ; j < m; j++)
-    is >> *(C[j]);
-
-  typedef typename Triangulation::Vertex_iterator VI;
-
-  int i=0;
-  for (VI vi = tr.vertices_begin();
-      vi != tr.vertices_end(); ++vi) {
-    tr.too_long_edges[vi]=std::list<Vertex_handle>();
-    ++i;
-  }
-
-  tr.edge_length_threshold = FT(0.166) * (tr._domain.xmax()-tr._domain.xmin())
-                                       * (tr._domain.xmax()-tr._domain.xmin());
-  tr.too_long_edge_counter = tr.find_too_long_edges(tr.too_long_edges);
-
-  CGAL_triangulation_expensive_assertion( tr.is_valid() );
-  return is;
-}
-    
-template < class GT, class TDS >
-std::ostream & 
-operator<< (std::ostream& os,const Periodic_3_triangulation_3<GT,TDS> &tr)
-// writes :
-// the number of vertices
-// the domain as six coordinates: xmin ymin zmin xmax ymax zmax
-// the current covering that guarantees the triangulation to be a
-//     simplicial complex
-// the non combinatorial information on vertices (points in case of 1-sheeted
-//     covering, point-offset pairs otherwise)
-//     ALL PERIODIC COPIES OF ONE VERTEX MUST BE STORED CONSECUTIVELY
-// the number of cells
-// the cells by the indices of their vertices in the preceding list
-// of vertices, plus the non combinatorial information on each cell
-// the neighbors of each cell by their index in the preceding list of cells
-{
-  typedef Periodic_3_triangulation_3<GT,TDS>       Triangulation;
-  typedef typename Triangulation::size_type        size_type;
-  typedef typename Triangulation::Vertex_handle    Vertex_handle;
-  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
-  typedef typename Triangulation::Cell_handle      Cell_handle;
-  typedef typename Triangulation::Cell_iterator    Cell_iterator;
-  typedef typename Triangulation::Covering_sheets  Covering_sheets;
-  typedef typename Triangulation::Offset           Offset;
-  typedef typename Triangulation::Virtual_vertex_map_it Virtual_vertex_map_it;
-  typedef typename Triangulation::Iso_cuboid       Iso_cuboid;
-
-  // outputs dimension, domain and number of vertices
-  Iso_cuboid domain = tr.domain();
-  Covering_sheets cover = tr.number_of_sheets();
-  size_type n = tr.number_of_vertices();
-
-  if (is_ascii(os))
-    os << domain << std::endl
-       << cover[0] << " " << cover[1] << " " << cover[2] << std::endl
-       << n*cover[0]*cover[1]*cover[2] << std::endl;       
-  else {
-    os << domain;
-    write(os,cover[0]);
-    write(os,cover[1]);
-    write(os,cover[2]);
-    write(os,n*cover[0]*cover[1]*cover[2]);
-  }
-
-  if (n == 0)
-    return os;
- 
-  // write the vertices
-  Unique_hash_map<Vertex_handle, std::size_t > V;
-  std::size_t i=0;
-  if (tr.is_1_cover()) {
-    for (Vertex_iterator it=tr.vertices_begin(); it!=tr.vertices_end(); ++it) {
-      V[it] = i++;
-      os << it->point();
-      if (is_ascii(os))
-        os << std::endl;
-    }
-  } else {
-    Virtual_vertex_map_it vit, vvit;
-    std::vector<Vertex_handle> vv;
-    for (Vertex_iterator it=tr.vertices_begin(); it!=tr.vertices_end(); ++it) {
-      vit = tr.virtual_vertices.find(it);
-      if (vit != tr.virtual_vertices.end()) continue;
-      V[it]=i++;
-      if (is_ascii(os))
-        os << it->point() << std::endl
-           << Offset(0,0,0) << std::endl;
-      else os << it->point() << Offset(0,0,0);
-      CGAL_triangulation_assertion(tr.virtual_vertices_reverse.find(it)
-          != tr.virtual_vertices_reverse.end());
-      vv = tr.virtual_vertices_reverse.find(it)->second;
-      CGAL_triangulation_assertion(vv.size() == 26);
-      for (std::size_t j=0; j<vv.size(); j++) {
-        vvit = tr.virtual_vertices.find(vv[j]);
-        CGAL_triangulation_assertion(vvit != tr.virtual_vertices.end());
-        V[vv[j]] = i++;
-        if (is_ascii(os))
-          os << vv[j]->point() << std::endl
-             << vvit->second.second << std::endl;
-        else os << vv[j]->point() << vvit->second.second;
-      }
-    }
-  }
-  CGAL_triangulation_postcondition(i==tr._cover[0]*tr._cover[1]*tr._cover[2]*n);
-  
-  // asks the tds for the combinatorial information
-  tr.tds().print_cells(os, V);
-  
-  // write offsets
-  //for (unsigned int i=0 ; i<tr.number_of_cells() ; i++) {
-  for (Cell_iterator it=tr.cells_begin(); it!=tr.cells_end(); ++it) {
-    //Cell_handle ch = std::find(tr.cells_begin(), tr.cells_end(), i);
-    Cell_handle ch(it);
-    for (int j=0; j<4; j++) {
-      if(is_ascii(os)) {
-	os << ch->offset(j);
-        if ( j==3 )
-          os << std::endl;
-        else
-          os << ' ';
-      }
-      else write(os,ch->offset(j));
-    }
-  }
-  
-  // write the non combinatorial information on the cells
-  // using the << operator of Cell
-  // works because the iterator of the tds traverses the cells in the
-  // same order as the iterator of the triangulation
-  if(tr.number_of_vertices() != 0) {
-      for(Cell_iterator it=tr.cells_begin(); it != tr.cells_end(); ++it) {
-    os << *it; // other information
-    if(is_ascii(os))
-      os << std::endl;
-    }
-  }
-  return os ;
-}
-
-namespace internal {
-
-  /// Internal function used by operator==.
-  // This function tests and registers the 4 neighbors of c1/c2,
-  // and performs a bfs traversal
-  // Returns false if an inequality has been found.
-  //TODO: introduce offsets
-  template <class GT, class TDS1, class TDS2>
-  bool
-  test_next(const Periodic_3_triangulation_3<GT, TDS1> &t1,
-            const Periodic_3_triangulation_3<GT, TDS2> & /* needed_for_deducing_TDS2 */,
-            typename Periodic_3_triangulation_3<GT, TDS1>::Cell_handle c1,
-            typename Periodic_3_triangulation_3<GT, TDS2>::Cell_handle c2,
-            std::map<typename Periodic_3_triangulation_3<GT, TDS1>::Cell_handle,
-            typename Periodic_3_triangulation_3<GT, TDS2>::Cell_handle> &Cmap,
-            std::map<typename Periodic_3_triangulation_3<GT, TDS1>::Vertex_handle,
-            typename Periodic_3_triangulation_3<GT, TDS2>::Vertex_handle> &Vmap)
-  {  
-    typedef Periodic_3_triangulation_3<GT, TDS1> Tr1;
-    typedef Periodic_3_triangulation_3<GT, TDS2> Tr2;
-    typedef typename Tr1::Vertex_handle  Vertex_handle1;
-    typedef typename Tr1::Cell_handle    Cell_handle1;
-    typedef typename Tr2::Vertex_handle  Vertex_handle2;
-    typedef typename Tr2::Cell_handle    Cell_handle2;
-    typedef typename std::map<Cell_handle1, Cell_handle2>::const_iterator  Cit;
-    typedef typename std::map<Vertex_handle1, Vertex_handle2>::const_iterator Vit;
-
-    std::vector<std::pair<Cell_handle1, Cell_handle2> > queue;
-    queue.push_back(std::make_pair(c1,c2));
-    
-    while(! queue.empty()){
-      boost::tie(c1,c2) = queue.back();
-      queue.pop_back();
-  
-      // Precondition: c1, c2 have been registered as well as their 4 vertices.
-      CGAL_triangulation_precondition(t1.number_of_vertices() != 0);
-      CGAL_triangulation_precondition(Cmap[c1] == c2);
-      CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end());
-      CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end());
-      CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end());
-      CGAL_triangulation_precondition(Vmap.find(c1->vertex(3)) != Vmap.end());
-      
-
-      for (int i=0; i <= 3; ++i) {
-        Cell_handle1 n1 = c1->neighbor(i);
-        Cit cit = Cmap.find(n1);
-        Vertex_handle1 v1 = c1->vertex(i);
-        Vertex_handle2 v2 = Vmap[v1];
-        Cell_handle2 n2 = c2->neighbor(c2->index(v2));
-        if (cit != Cmap.end()) {
-          // n1 was already registered.
-          if (cit->second != n2)
-            return false;
-          continue;
-        }
-        // n1 has not yet been registered.
-        // We check that the new vertices match geometrically.
-        // And we register them.
-        Vertex_handle1 vn1 = n1->vertex(n1->index(c1));
-        Vertex_handle2 vn2 = n2->vertex(n2->index(c2));
-        Vit vit = Vmap.find(vn1);
-        if (vit != Vmap.end()) {
-          // vn1 already registered
-          if (vit->second != vn2)
-            return false;
-        }
-        else {
-          if (t1.geom_traits().compare_xyz_3_object()(vn1->point(),
-                                                      vn2->point()) != 0)
-            return false;
-          
-          // We register vn1/vn2.
-          Vmap.insert(std::make_pair(vn1, vn2));
-        }
-        
-        // We register n1/n2.
-        Cmap.insert(std::make_pair(n1, n2));
-        queue.push_back(std::make_pair(n1, n2));
-      }
-    }
-    return true;
-  }
-
-} // namespace internal
-
-
-template < class GT, class TDS1, class TDS2  >
-bool
-operator==(const Periodic_3_triangulation_3<GT,TDS1> &t1,
-     const Periodic_3_triangulation_3<GT,TDS2> &t2)
-{
-  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Vertex_handle
-      Vertex_handle1;
-  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Cell_handle  
-      Cell_handle1;
-  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Vertex_handle
-      Vertex_handle2;
-  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Vertex_handle
-      Vertex_iterator2;
-  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Cell_handle
-      Cell_handle2;
-  
-  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Point      Point;
-  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Offset     Offset;
-
-  // typedef typename Periodic_3_triangulation_3<GT,TDS1>
-  //     ::Geometric_traits::Compare_xyz_3                       Compare_xyz_3;
-  // Compare_xyz_3 cmp1 = t1.geom_traits().compare_xyz_3_object();
-  // Compare_xyz_3 cmp2 = t2.geom_traits().compare_xyz_3_object();
-  
-  // Some quick checks.
-  if (   t1.domain()           != t2.domain()
-      || t1.number_of_sheets() != t2.number_of_sheets())
-    return false;
-
-  if (   t1.number_of_vertices() != t2.number_of_vertices()
-      || t1.number_of_cells() != t2.number_of_cells())
-    return false;
-
-  // Special case for empty triangulations
-  if (t1.number_of_vertices() == 0)
-    return true;
-
-  // We will store the mapping between the 2 triangulations vertices and
-  // cells in 2 maps.
-  std::map<Vertex_handle1, Vertex_handle2> Vmap;
-  std::map<Cell_handle1, Cell_handle2> Cmap;
-
-  // find a common point
-  Vertex_handle1 v1 = static_cast<Vertex_handle1>(t1.vertices_begin());
-  Vertex_handle2 iv2;
-  for (Vertex_iterator2 vit2 = t2.vertices_begin() ;
-      vit2 != t2.vertices_end(); ++vit2) {
-    if (!t1.equal(vit2->point(), v1->point(),
-		  t2.get_offset(vit2), t1.get_offset(v1)))
-      continue;
-    iv2 = static_cast<Vertex_handle2>(vit2);
-    break;
-  }
-  if (iv2 == Vertex_handle2())
-    return false;
-  Vmap.insert(std::make_pair(v1, iv2));
-
-  // We pick one cell of t1, and try to match it against the
-  // cells of t2.
-  Cell_handle1 c = v1->cell();
-  Vertex_handle1 v2 = c->vertex((c->index(v1)+1)%4);
-  Vertex_handle1 v3 = c->vertex((c->index(v1)+2)%4);
-  Vertex_handle1 v4 = c->vertex((c->index(v1)+3)%4);
-  Point p2 = v2->point();
-  Point p3 = v3->point();
-  Point p4 = v4->point();
-  Offset o2 = t1.get_offset(v2);
-  Offset o3 = t1.get_offset(v3);
-  Offset o4 = t1.get_offset(v4);
-
-  std::vector<Cell_handle2> ics;
-  t2.incident_cells(iv2, std::back_inserter(ics));
-  for (typename std::vector<Cell_handle2>::const_iterator cit = ics.begin();
-       cit != ics.end(); ++cit) {
-    int inf = (*cit)->index(iv2);
-
-    if (t1.equal(p2, (*cit)->vertex((inf+1)%4)->point(),
-	      o2, t2.get_offset((*cit)->vertex((inf+1)%4))))
-      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+1)%4)));
-    else if (t1.equal(p2, (*cit)->vertex((inf+2)%4)->point(),
-	      o2, t2.get_offset((*cit)->vertex((inf+2)%4))))
-      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+2)%4)));
-    else if (t1.equal(p2, (*cit)->vertex((inf+3)%4)->point(),
-	      o2, t2.get_offset((*cit)->vertex((inf+3)%4))))
-      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+3)%4)));
-    else
-      continue; // None matched v2.
-
-    if (t1.equal(p3, (*cit)->vertex((inf+1)%4)->point(),
-	      o3, t2.get_offset((*cit)->vertex((inf+1)%4))))
-      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+1)%4)));
-    else if (t1.equal(p3, (*cit)->vertex((inf+2)%4)->point(),
-	      o3, t2.get_offset((*cit)->vertex((inf+2)%4))))
-      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+2)%4)));
-    else if (t1.equal(p3, (*cit)->vertex((inf+3)%4)->point(),
-	      o3, t2.get_offset((*cit)->vertex((inf+3)%4))))
-      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+3)%4)));
-    else
-      continue; // None matched v3.
-
-    if (t1.equal(p4, (*cit)->vertex((inf+1)%4)->point(),
-	      o4, t2.get_offset((*cit)->vertex((inf+1)%4))))
-      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+1)%4)));
-    else if (t1.equal(p4, (*cit)->vertex((inf+2)%4)->point(),
-	      o4, t2.get_offset((*cit)->vertex((inf+2)%4))))
-      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+2)%4)));
-    else if (t1.equal(p4, (*cit)->vertex((inf+3)%4)->point(),
-	      o4, t2.get_offset((*cit)->vertex((inf+3)%4))))
-      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+3)%4)));
-    else
-      continue; // None matched v4.
-
-    // Found it !
-    Cmap.insert(std::make_pair(c, *cit));
-    break;
-  }
-
-  if (Cmap.size() == 0)
-    return false;
-
-  // We now have one cell, we need to compare in a bfs graph traversal
-  return internal::test_next(t1, t2, Cmap.begin()->first, Cmap.begin()->second, Cmap, Vmap);
-}
-
-template < class GT, class TDS1, class TDS2 >
-inline
-bool
-operator!=(const Periodic_3_triangulation_3<GT,TDS1> &t1,
-    const Periodic_3_triangulation_3<GT,TDS2> &t2)
-{
-  return ! (t1 == t2);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_PERIODIC_3_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h
deleted file mode 100644
index ab3c84f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright (c) 2004,2006-2009   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
-//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
-//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
-
-
-#ifndef CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
-#define CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
-
-#include <string>
-#include <CGAL/basic.h>
-#include <CGAL/config.h>
-#include <CGAL/Interval_nt.h>
-#include <CGAL/Uncertain.h>
-#include <CGAL/Profile_counter.h>
-#include <CGAL/Periodic_3_triangulation_traits_3.h>
-
-namespace CGAL {
-
-// This template class is a wrapper that implements the filtering for any
-// predicate (dynamic filters with IA).
-
-// TODO :
-// - each predicate in the default kernel should define a tag that says if it
-//   wants to be filtered or not (=> all homogeneous predicate define this
-//   tag).  We could even test-suite that automatically.  It makes a strong
-//   new requirement on the kernel though...
-//   Could be done with a traits mechanism ?
-//   A default template could use the current IA, but other tags or whatever
-//   could specify no filtering at all, or static filtering...
-// - same thing for constructions => virtual operator() ?
-// - similarly, constructions should have a tag saying if they can throw or
-//   not, or we let all this up to the compiler optimizer to figure out ?
-// - Some caching could be done at the Point_2 level.
-
-template <class EP, class AP, class C2E, class C2A, bool Protection = true>
-class Filtered_periodic_predicate
-  : public Filtered_predicate<EP, AP, C2E, C2A, Protection>
-{
-  typedef Filtered_predicate<EP, AP, C2E, C2A, Protection> Base;
-public:
-  Filtered_periodic_predicate() : Base() {}
-
-  // These constructors are used for constructive predicates.
-  // You should try to avoid constructive predicates, as they will construct
-  // the exact values systematically (in the ctor), rather than lazily.
-  template <class OE, class OA> 
-  Filtered_periodic_predicate(const OE * oe, const OA * oa) 
-    : Base( EP(oe), AP(oa) )
-  {}
-};
-
-// The Offset_converter is parametrized by a usual kernel converter,
-// and adds the conversions for Offsets.
-template < typename Converter >
-struct Offset_converter_3
-  : public Converter
-{
-  typedef typename Converter::Source_kernel Source_kernel;
-  typedef typename Converter::Target_kernel Target_kernel;
-
-  typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
-                   ::Offset  Source_off;
-  typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
-                   ::Point_3  Source_pt;
-
-  typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
-                   ::Offset  Target_off;
-  typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
-                   ::Point_3  Target_pt;
-
-
-  using Converter::operator();
-
-  Target_off
-  operator()(const Source_off &off) const
-  {
-    return off;
-  }
-};
-
-// The argument is supposed to be a Filtered_kernel like kernel.
-template < typename K, typename Off >
-class Periodic_3_triangulation_filtered_traits_base_3
-  : public Periodic_3_triangulation_traits_base_3<K, Off>
-{
-  typedef Periodic_3_triangulation_traits_base_3<K, Off> Base;
-
-  // Exact traits is based on the exact kernel.
-  typedef Periodic_3_triangulation_traits_3<typename K::Exact_kernel,
-                                            Off>
-                                                   Exact_traits;
-  // Filtering traits is based on the filtering kernel.
-  typedef Periodic_3_triangulation_traits_3<typename K::Approximate_kernel,
-                                            Off>
-                                                   Filtering_traits;
-private:
-  typedef typename K::C2E C2E;
-  typedef typename K::C2F C2F;
-
-  typedef typename C2E::Target_kernel::Iso_cuboid_3 Exact_iso_cuboid_3;
-  typedef typename C2F::Target_kernel::Iso_cuboid_3 Approximate_iso_cuboid_3;
- 
-public:
-  typedef typename K::Iso_cuboid_3 Iso_cuboid_3;
-
-  void set_domain(const Iso_cuboid_3& domain) {
-    C2E c2e;
-    C2F c2f;
-    this->_domain = domain;
-    this->_domain_e = c2e(this->_domain);
-    this->_domain_f = c2f(this->_domain);
-  }
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Compare_xyz_3,
-            typename Filtering_traits::Compare_xyz_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Compare_xyz_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Coplanar_orientation_3,
-            typename Filtering_traits::Coplanar_orientation_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Coplanar_orientation_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Orientation_3,
-            typename Filtering_traits::Orientation_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Orientation_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Coplanar_side_of_bounded_circle_3,
-            typename Filtering_traits::Coplanar_side_of_bounded_circle_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Coplanar_side_of_bounded_circle_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Side_of_oriented_sphere_3,
-            typename Filtering_traits::Side_of_oriented_sphere_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Side_of_oriented_sphere_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Compare_distance_3,
-            typename Filtering_traits::Compare_distance_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Compare_distance_3;
-
-  typedef Filtered_periodic_predicate<
-            typename Exact_traits::Side_of_bounded_sphere_3,
-            typename Filtering_traits::Side_of_bounded_sphere_3,
-            Offset_converter_3<C2E>,
-            Offset_converter_3<C2F> >  Side_of_bounded_sphere_3;
-
-
-  Compare_xyz_3 compare_xyz_3_object() const
-  { return Compare_xyz_3(&_domain_e,&_domain_f);}
-
-  Coplanar_orientation_3 coplanar_orientation_3_object() const
-  { return Coplanar_orientation_3(&_domain_e,&_domain_f); }
-
-  Orientation_3 orientation_3_object() const
-  { return Orientation_3(&_domain_e,&_domain_f);}
-
-  Coplanar_side_of_bounded_circle_3
-  coplanar_side_of_bounded_circle_3_object() const 
-  { return Coplanar_side_of_bounded_circle_3(&_domain_e,&_domain_f); }
-
-  Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const
-  { return Side_of_oriented_sphere_3(&_domain_e,&_domain_f);}
-
-  Compare_distance_3 compare_distance_3_object() const
-  { return Compare_distance_3(&_domain_e,&_domain_f);}
-
-  Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const
-  { return Side_of_bounded_sphere_3(&_domain_e,&_domain_f);}
-
-  // The following are inherited since they are constructions :
-  // Construct_segment_3
-  // Construct_triangle_3
-  // Construct_tetrahedron_3
-  // Construct_circumcenter_3
-
- protected:
-  Exact_iso_cuboid_3 _domain_e;
-  Approximate_iso_cuboid_3 _domain_f;
-};
-
-} //namespace CGAL
-
-#include <CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h>
-
-namespace CGAL {
-
-template < typename K, typename Off = typename CGAL::Periodic_3_offset_3 >
-class Periodic_3_triangulation_filtered_traits_3
-  : public Periodic_3_triangulation_statically_filtered_traits_3<
-  Periodic_3_triangulation_filtered_traits_base_3<K, Off> > {
-};
-
-} //namespace CGAL
-
-#endif // CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h
deleted file mode 100644
index c531fc6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2001,2004,2008-2009   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
-//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
- 
-#ifndef CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
-#define CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
-
-// This class gathers optimized predicates written by hand, using
-// a few steps of filtering.  It should work if the initial traits has
-// cartesian coordinates which fit exactly in doubles.
-//
-// Purely static filters code has been removed, since it requires additional
-// logic and is not plug'n play (requires users providing bounds).
-// If it should be provided again, it should probably be separate.
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kernel/function_objects.h>
-#include <CGAL/Cartesian/function_objects.h>
-
-#include <CGAL/internal/Static_filters/tools.h>
-#include <CGAL/internal/Static_filters/Periodic_3_orientation_3.h>
-#include <CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h>
-
-// TODO :
-// - add more predicates :
-
-namespace CGAL {
-
-// The K_base argument is supposed to provide exact primitives.
-template < typename Traits >
-class Periodic_3_triangulation_statically_filtered_traits_3 : public Traits
-{
-  typedef Periodic_3_triangulation_statically_filtered_traits_3<Traits> Self;
-
-public:
-
-  typedef internal::Static_filters_predicates::Periodic_3_orientation_3<Traits>
-    Orientation_3;
-  typedef internal::Static_filters_predicates::Periodic_3_side_of_oriented_sphere_3<Traits>
-    Side_of_oriented_sphere_3;
-
-  Orientation_3 orientation_3_object() const {
-    return Orientation_3(&this->_domain,&this->_domain_e,&this->_domain_f);
-  }
-  Side_of_oriented_sphere_3  side_of_oriented_sphere_3_object() const {
-    return Side_of_oriented_sphere_3(&this->_domain,
-                                     &this->_domain_e,
-                                     &this->_domain_f);
-  }
-};
-
-} //namespace CGAL
-
-#endif // CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_traits_3.h
deleted file mode 100644
index bfcb369..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_traits_3.h
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright (c) 2006-2009   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
-//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
-
-#ifndef CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
-#define CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Periodic_3_offset_3.h>
-#include <CGAL/triangulation_assertions.h>
-
-
-namespace CGAL { 
-
-template < class K, class Functor_ >
-  class Traits_with_offsets_adaptor {
-  typedef K Kernel;
-  typedef Functor_ Functor;
-  
-  typedef typename Kernel::Point_3       Point;
-  typedef typename Kernel::Offset        Offset;
- public:
-  typedef typename Kernel::Iso_cuboid_3  Iso_cuboid_3;
-
-public:
-  typedef typename Functor::result_type result_type;
-
-  Traits_with_offsets_adaptor(const Iso_cuboid_3 * dom) : _domain(dom) { }
-
-  result_type operator()(const Point& p0, const Point& p1,
-      const Offset& o0, const Offset& o1) const {
-    return Functor()(pp(p0,o0),pp(p1,o1));
-  }
-  result_type operator()(const Point& p0, const Point& p1, const Point& p2,
-      const Offset& o0, const Offset& o1, const Offset& o2) const {
-    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2));
-  }
-  result_type operator()(const Point& p0, const Point& p1,
-      const Point& p2, const Point& p3,
-      const Offset& o0, const Offset& o1,
-      const Offset& o2, const Offset& o3) const {
-    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2),pp(p3,o3));
-  }
-  result_type operator()(const Point& p0, const Point& p1,
-      const Point& p2, const Point& p3, const Point& p4,
-      const Offset& o0, const Offset& o1, const Offset& o2,
-      const Offset& o3, const Offset& o4) const {
-    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2),
-	pp(p3,o3),pp(p4,o4));
-  }
-
-  result_type operator()(const Point& p0, const Point& p1) const {
-    return Functor()(p0, p1);
-  }
-  result_type operator()(const Point& p0, const Point& p1,
-      const Point& p2) const {
-    return Functor()(p0, p1, p2);
-  }
-  result_type operator()(const Point& p0, const Point& p1,
-      const Point& p2, const Point& p3) const {
-    return Functor()(p0, p1, p2, p3);
-  }
-  result_type operator()(const Point& p0, const Point& p1,
-      const Point& p2, const Point& p3, const Point& p4) const {
-    return Functor()(p0, p1, p2, p3, p4);
-  }
-
-private:
-  Point pp(const Point &p, const Offset &o) const {
-    return Point(p.x()+(_domain->xmax()-_domain->xmin())*o.x(),
-		 p.y()+(_domain->ymax()-_domain->ymin())*o.y(),
-		 p.z()+(_domain->zmax()-_domain->zmin())*o.z());
-  }
- public:
-  const Iso_cuboid_3* _domain;
-};
-
-template < typename K, typename Construct_point_3_base>
-class Periodic_3_construct_point_3 : public Construct_point_3_base
-{
-  typedef K Kernel;
-
-public:
-  typedef typename Kernel::Point_3       Point;
-  typedef typename Kernel::Offset        Offset;
-  typedef typename Kernel::Iso_cuboid_3  Iso_cuboid_3;
-
-  typedef Point       result_type;
-
-  Periodic_3_construct_point_3(const Iso_cuboid_3 & dom) : _dom(dom) { }
-
-  Point operator() ( const Point& p, const Offset& o ) const {
-    return Point(p.x()+(_dom.xmax()-_dom.xmin())*o.x(),
-	p.y()+(_dom.ymax()-_dom.ymin())*o.y(),
-	p.z()+(_dom.zmax()-_dom.zmin())*o.z());
-  }
-
-private:
-  Iso_cuboid_3 _dom;
-};
-
-template < class Kernel, class Off = typename CGAL::Periodic_3_offset_3 >
-class Periodic_3_triangulation_traits_base_3
-  : public Kernel
-{
-public:
-  typedef Kernel                                                 K;
-  typedef Off                                                    Offset;
-  typedef Periodic_3_triangulation_traits_base_3< K, Offset >    Self;  
-
-  typedef typename K::RT                RT;
-  typedef typename K::FT                FT;
-  typedef typename K::Point_3           Point_3;
-  typedef typename K::Vector_3          Vector_3;
-  typedef Offset                        Periodic_3_offset_3;
-  typedef typename K::Iso_cuboid_3      Iso_cuboid_3;
-
-  // The next typedef is there for backward compatibility
-  // Some users take their point type from the traits class.
-  // Before this type was Point
-  typedef Point_3 Point;
-
-  typedef typename K::Segment_3         Segment_3;
-  typedef typename K::Triangle_3        Triangle_3;
-  typedef typename K::Tetrahedron_3     Tetrahedron_3;
-
-  // Triangulation predicates
-  typedef Traits_with_offsets_adaptor<Self, typename K::Compare_xyz_3>
-      Compare_xyz_3;
-  typedef Traits_with_offsets_adaptor<Self, typename K::Orientation_3>
-      Orientation_3;
-  
-  // Delaunay specific predicates
-  typedef Traits_with_offsets_adaptor<Self,
-				      typename K::Side_of_oriented_sphere_3>
-      Side_of_oriented_sphere_3;
-  typedef Traits_with_offsets_adaptor<Self, typename K::Compare_distance_3>
-      Compare_distance_3;
-   typedef Traits_with_offsets_adaptor<Self,
- 				      typename K::Side_of_bounded_sphere_3>
-       Side_of_bounded_sphere_3;
-
-  // Degenerate dimension predicates
-  typedef Traits_with_offsets_adaptor<Self, typename K::Coplanar_orientation_3>
-      Coplanar_orientation_3;
-  typedef Traits_with_offsets_adaptor<Self,
-              typename K::Coplanar_side_of_bounded_circle_3>
-      Coplanar_side_of_bounded_circle_3;
-
-  // Triangulation constructions
-  typedef Periodic_3_construct_point_3<Self, typename K::Construct_point_3>
-      Construct_point_3;
-  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_segment_3>
-      Construct_segment_3;
-  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_triangle_3>
-      Construct_triangle_3;
-  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_tetrahedron_3>
-      Construct_tetrahedron_3;
-
-  // Delaunay specific constructions
-  typedef Traits_with_offsets_adaptor<Self,
-				      typename K::Construct_circumcenter_3>
-      Construct_circumcenter_3;
-
-  // Access
-  void set_domain(const Iso_cuboid_3& domain) {
-    _domain = domain;
-  }
-  
-  Iso_cuboid_3 get_domain() const {
-    return _domain;
-  }
-
-  // Operations
-  Compare_xyz_3
-  compare_xyz_3_object() const {
-    return Compare_xyz_3(&_domain);
-  }
-  Orientation_3
-  orientation_3_object() const {
-    return Orientation_3(&_domain);
-  }
-  Side_of_oriented_sphere_3
-  side_of_oriented_sphere_3_object() const {
-    return Side_of_oriented_sphere_3(&_domain);
-  }
-  Compare_distance_3
-  compare_distance_3_object() const {
-    return Compare_distance_3(&_domain);
-  }
-  Coplanar_orientation_3
-  coplanar_orientation_3_object() const {
-    return Coplanar_orientation_3(&_domain);
-  }
-  Coplanar_side_of_bounded_circle_3
-  coplanar_side_of_bounded_circle_3_object() const {
-    return Coplanar_side_of_bounded_circle_3(&_domain);
-  }
-  Side_of_bounded_sphere_3
-  side_of_bounded_sphere_3_object() const {
-    return Side_of_bounded_sphere_3(&_domain);
-  }
-  Construct_point_3
-  construct_point_3_object() const {
-    return Construct_point_3(_domain);
-  }
-  Construct_segment_3
-  construct_segment_3_object() const {
-    return Construct_segment_3(&_domain);
-  }
-  Construct_triangle_3
-  construct_triangle_3_object() const {
-    return Construct_triangle_3(&_domain);
-  }
-  Construct_tetrahedron_3
-  construct_tetrahedron_3_object() const {
-    return Construct_tetrahedron_3(&_domain);
-  }
-  Construct_circumcenter_3
-  construct_circumcenter_3_object() const {
-    return Construct_circumcenter_3(&_domain);
-  }
-
-protected:
-  Iso_cuboid_3 _domain;
-};
-
-template < typename K, typename Off = CGAL::Periodic_3_offset_3 >
-class Periodic_3_triangulation_traits_3;
-
-} //namespace CGAL
-
-// Partial specialization for Filtered_kernel<CK>.
-#include <CGAL/Filtered_kernel.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
-
-namespace CGAL {
-
-// This declaration is needed to break the cyclic dependency.
-template < typename K, typename Off >
-class Periodic_3_triangulation_filtered_traits_3;
-
-template < class K, class Off>
-class Periodic_3_triangulation_traits_3
-  : public Periodic_3_triangulation_traits_base_3<K, Off>
-{
-};
-
-template < typename CK, typename Off >
-class Periodic_3_triangulation_traits_3 < Filtered_kernel<CK>, Off>
-  : public Periodic_3_triangulation_filtered_traits_3 <
-  Filtered_kernel<CK>, Off >
-{
-public:
-  typedef Filtered_kernel<CK>  Kernel;
-};
-
-template < class Off >
-class Periodic_3_triangulation_traits_3<CGAL::Epick, Off>
-  : public Periodic_3_triangulation_filtered_traits_3<CGAL::Epick, Off>
-{
-  typedef CGAL::Epick Kernel;
-};
-
-} //namespace CGAL
-
-#endif // CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Plane_3.h b/3rdparty/CGAL-4.6/include/CGAL/Plane_3.h
deleted file mode 100644
index 79acd6c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Plane_3.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
- 
-#ifndef CGAL_PLANE_3_H
-#define CGAL_PLANE_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Plane_3 : public R_::Kernel_base::Plane_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::Point_2               Point_2;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Direction_3           Direction_3;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Segment_3             Segment_3;
-  typedef typename R_::Line_3                Line_3;
-  typedef typename R_::Ray_3                 Ray_3;
-  typedef typename R_::Circle_3              Circle_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Plane_3                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Plane_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Plane_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Plane_3() {}
-
-  Plane_3(const Rep& p)
-    : Rep(p) {}
-
-  Plane_3(const Point_3& p, const Point_3& q, const Point_3& r)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {}
-
-  Plane_3(const Point_3& p, const Direction_3& d)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, d)) {}
-
-  Plane_3(const Point_3& p, const Vector_3& v)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, v)) {}
-
-  Plane_3(const RT& a, const RT& b, const RT& c, const RT& d)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), a, b, c, d)) {}
-
-  Plane_3(const Line_3& l, const Point_3& p)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), l, p)) {}
-
-  Plane_3(const Segment_3& s, const Point_3& p)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), s, p)) {}
-
-  Plane_3(const Ray_3& r, const Point_3& p)
-    : Rep(typename R::Construct_plane_3()(Return_base_tag(), r, p)) {}
-
-  explicit Plane_3(const Circle_3& c)
-    : Rep(typename R::Construct_plane_3()(c)) {}
-
-  Plane_3 transform(const Aff_transformation_3 &t) const
-  {
-    return t.transform(*this);
-  }
-
-  Plane_3 opposite() const
-  {
-    return R().construct_opposite_plane_3_object()(*this);
-  }
-
-  //Vector_3     orthogonal_vector() const;
-  Direction_3 orthogonal_direction() const
-  {
-    return Direction_3(a(), b(), c());
-  }
-
-  typename cpp11::result_of<typename R::Compute_a_3( Plane_3)>::type
-  a() const
-  {
-    return R().compute_a_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_b_3( Plane_3)>::type
-  b() const
-  {
-    return R().compute_b_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_c_3( Plane_3)>::type
-  c() const
-  {
-    return R().compute_c_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_d_3( Plane_3)>::type
-  d() const
-  {
-    return R().compute_d_3_object()(*this);
-  }
-
-  bool has_on(const Point_3 &p) const
-  {
-    return R().has_on_3_object()(*this, p);
-  }
-
-  bool has_on(const Circle_3 &c) const
-  {
-    return R().has_on_3_object()(*this, c);
-  }  
-  
-  bool has_on(const Line_3 &l) const
-  {
-    return R().has_on_3_object()(*this, l);
-  }
-
-  Line_3 perpendicular_line(const Point_3 &p) const
-  {
-    return R().construct_perpendicular_line_3_object()(*this, p);
-  }
-
-  Point_3 projection(const Point_3 &p) const
-  {
-    return R().construct_projected_point_3_object()(*this, p);
-  }
-
-  Point_3 point() const
-  {
-    return R().construct_point_on_3_object()(*this);
-  }
-
-  Vector_3 base1() const
-  {
-    return R().construct_base_vector_3_object()(*this, 1);
-  }
-
-  Vector_3 base2() const
-  {
-    return R().construct_base_vector_3_object()(*this, 2);
-  }
-
-  Vector_3 orthogonal_vector() const
-  {
-    return R().construct_orthogonal_vector_3_object()(*this);
-  }
-
-  Point_2 to_2d(const Point_3 &p) const
-  {
-    return R().construct_projected_xy_point_2_object()(*this, p);
-  }
-
-  Point_3 to_3d(const Point_2 &p) const
-  {
-    return R().construct_lifted_point_3_object()(*this, p);
-  }
-
-
-  //Point_3      projection(const Point_3 &p) const;
-  //Direction_3  orthogonal_direction() const;
-
-  Oriented_side oriented_side(const Point_3 &p) const
-  {
-    return R().oriented_side_3_object()(*this, p);
-  }
-
-  bool has_on_positive_side(const Point_3 &p) const
-  {
-    return R().has_on_positive_side_3_object()(*this, p);
-  }
-
-  bool has_on_negative_side(const Point_3 &p) const
-  {
-    return R().has_on_negative_side_3_object()(*this, p);
-  }
-
-/*
-  bool         has_on(const Point_3 &p) const
-  {
-    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
-  }
-  bool         has_on(const Line_3 &l) const
-  {
-    return has_on(l.point())
-       &&  has_on(l.point() + l.direction().to_vector());
-  }
-*/
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Plane_3<R> &p)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << p.a() << ' ' << p.b() <<  ' ' << p.c() << ' ' << p.d();
-    case IO::BINARY :
-        write(os, p.a());
-        write(os, p.b());
-        write(os, p.c());
-        write(os, p.d());
-        return os;
-        default:
-            os << "Plane_3(" << p.a() <<  ", " << p.b() <<   ", ";
-            os << p.c() << ", " << p.d() <<")";
-            return os;
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Plane_3<R> &p)
-{
-    typename R::RT a, b, c, d;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(a) >> iformat(b) >> iformat(c) >> iformat(d);
-        break;
-    case IO::BINARY :
-        read(is, a);
-        read(is, b);
-        read(is, c);
-        read(is, d);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-        p = Plane_3<R>(a, b, c, d);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_PLANE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2.h b/3rdparty/CGAL-4.6/include/CGAL/Point_2.h
deleted file mode 100644
index 83c6f1d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Point_2.h
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_POINT_2_H
-#define CGAL_POINT_2_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Point_2 : public R_::Kernel_base::Point_2
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-  typedef typename R_::Kernel_base::Point_2  RPoint_2;
-
-  typedef Point_2                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Point_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef RPoint_2 Rep;
-  typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Point_2() {}
-
-  Point_2(const Origin& o)
-    : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), o))
-  {}
-
-  Point_2(const RPoint_2& p)
-    : RPoint_2(p)
-  {}
-
-  template < typename T1, typename T2 >
-  Point_2(const T1 &x, const T2 &y)
-    : Rep(typename R::Construct_point_2()(Return_base_tag(), x, y))
-  {}
-
-  Point_2(const RT& hx, const RT& hy, const RT& hw)
-    : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), hx, hy, hw))
-  {}
-
-  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
-  x() const
-  {
-    return typename R::Compute_x_2()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_y_2(Point_2)>::type
-  y() const
-  {
-    return typename R::Compute_y_2()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) );
-    return (i==0) ?  x() : y();
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
-  operator[](int i) const
-  {
-      return cartesian(i);
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return typename R::Construct_cartesian_const_iterator_2()(*this);
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return typename R::Construct_cartesian_const_iterator_2()(*this,2);
-  }
-
-
-
-  typename cpp11::result_of<typename R::Compute_hx_2(Point_2)>::type
-  hx() const
-  {
-    return typename R::Compute_hx_2()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hy_2(Point_2)>::type
-  hy() const
-  {
-    return typename R::Compute_hy_2()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hw_2(Point_2)>::type
-  hw() const
-  {
-    return typename R::Compute_hw_2()(*this);
-  }
-
-  int dimension() const
-  {
-      return 2;
-  }
-
-  typename cpp11::result_of<typename R::Compute_hx_2(Point_2)>::type
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
-    return (i==0) ?  hx() : (i==1)? hy() : hw();
-  }
-
-  Bbox_2 bbox() const
-  {
-    return R().construct_bbox_2_object()(*this);
-  }
-
-  Point_2 transform(const Aff_transformation_2 &t) const
-  {
-    return t.transform(*this);
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Point_2<R>& p,const Cartesian_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << p.x() << ' ' << p.y();
-    case IO::BINARY :
-        write(os, p.x());
-        write(os, p.y());
-        return os;
-    default:
-        return os << "PointC2(" << p.x() << ", " << p.y() << ')';
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Point_2<R>& p,const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << p.hx() << ' ' << p.hy() << ' ' << p.hw();
-    case IO::BINARY :
-        write(os, p.hx());
-        write(os, p.hy());
-        write(os, p.hw());
-        return os;
-    default:
-        return os << "PointH2(" << p.hx() << ", "
-                                << p.hy() << ", "
-                                << p.hw() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Point_2<R>& p)
-{
-  return insert(os, p, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Point_2<R>& p, const Cartesian_tag&)
-{
-    typename R::FT x, y;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-	p = Point_2<R>(x, y);
-    return is;
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Point_2<R>& p, const Homogeneous_tag&)
-{
-  typename R::RT hx, hy, hw;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> hx >> hy >> hw;
-        break;
-    case IO::BINARY :
-        read(is, hx);
-        read(is, hy);
-        read(is, hw);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  if (is)
-    p = Point_2<R>(hx, hy, hw);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Point_2<R>& p)
-{
-  return extract(is, p, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_POINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_3.h b/3rdparty/CGAL-4.6/include/CGAL/Point_3.h
deleted file mode 100644
index 1343826..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Point_3.h
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_POINT_3_H
-#define CGAL_POINT_3_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Point_3 : public R_::Kernel_base::Point_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Point_3                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Point_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Point_3  Rep;
-  typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Point_3() {}
-
-  Point_3(const Origin& o)
-    : Rep(typename R::Construct_point_3()(Return_base_tag(), o))
-  {}
-
-  Point_3(const Rep& p)
-      : Rep(p) {}
-
-  template < typename T1, typename T2, typename T3 >
-  Point_3(const T1& x, const T2& y, const T3& z)
-    : Rep(typename R::Construct_point_3()(Return_base_tag(), x, y, z))
-  {}
-
-  Point_3(const RT& hx, const RT& hy, const RT& hz, const RT& hw)
-    : Rep(typename R::Construct_point_3()(Return_base_tag(), hx, hy, hz, hw))
-  {}
-
-  typename cpp11::result_of<typename R::Compute_x_3( Point_3)>::type
-  x() const
-  {
-    return typename R::Compute_x_3()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_y_3( Point_3)>::type
-  y() const
-  {
-    return typename R::Compute_y_3()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_z_3( Point_3)>::type
-  z() const
-  {
-    return typename R::Compute_z_3()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hx_3( Point_3)>::type
-  hx() const
-  {
-    return R().compute_hx_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hy_3( Point_3)>::type
-  hy() const
-  {
-    return R().compute_hy_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hz_3( Point_3)>::type
-  hz() const
-  {
-    return R().compute_hz_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hw_3( Point_3)>::type
-  hw() const
-  {
-    return R().compute_hw_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_3( Point_3)>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
-    if (i==0) return x();
-    if (i==1) return y();
-    return z();
-  }
-
-  RT
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
-    if (i==0) return hx();
-    if (i==1) return hy();
-    if (i==2) return hz();
-    return hw();
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_3(Point_3)>::type
-  operator[](int i) const
-  {
-      return cartesian(i);
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return typename R::Construct_cartesian_const_iterator_3()(*this);
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return typename R::Construct_cartesian_const_iterator_3()(*this,3);
-  }
-
-  int dimension() const
-  {
-      return 3;
-  }
-
-  Bbox_3 bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-  Point_3 transform(const Aff_transformation_3 &t) const
-  {
-    return t.transform(*this);
-  }
-
-};
-
-template <class R>
-inline
-bool
-operator==(const Origin& o, const Point_3<R>& p)
-{ return p == o; }
-
-template <class R>
-inline
-bool
-operator!=(const Origin& o, const Point_3<R>& p)
-{ return p != o; }
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Point_3<R>& p,const Cartesian_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << p.x() << ' ' << p.y() << ' ' << p.z();
-    case IO::BINARY :
-        write(os, p.x());
-        write(os, p.y());
-        write(os, p.z());
-        return os;
-    default:
-        return os << "PointC3(" << p.x() << ", " << p.y()
-                                         << ", " << p.z() << ')';
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Point_3<R>& p,const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << p.hx() << ' ' << p.hy() << ' ' << p.hz() << ' ' << p.hw();
-    case IO::BINARY :
-        write(os, p.hx());
-        write(os, p.hy());
-        write(os, p.hz());
-        write(os, p.hw());
-        return os;
-    default:
-        return os << "PointH3(" << p.hx() << ", "
-                                << p.hy() << ", "
-                                << p.hz() << ", "
-                                << p.hw() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Point_3<R>& p)
-{
-  return insert(os, p, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Point_3<R>& p, const Cartesian_tag&)
-{
-    typename R::FT x, y, z;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y) >> iformat(z);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        read(is, z);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-	p = Point_3<R>(x, y, z);
-    return is;
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Point_3<R>& p, const Homogeneous_tag&)
-{
-  typename R::RT hx, hy, hz, hw;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> hx >> hy >> hz >> hw;
-        break;
-    case IO::BINARY :
-        read(is, hx);
-        read(is, hy);
-        read(is, hz);
-        read(is, hw);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  if (is)
-    p = Point_3<R>(hx, hy, hz, hw);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Point_3<R>& p)
-{
-  return extract(is, p, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_POINT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_inside_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Point_inside_polyhedron_3.h
deleted file mode 100644
index a2b03e0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Point_inside_polyhedron_3.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (c) 2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot and Ilker O. Yaz
-
-
-#ifndef CGAL_POINT_INSIDE_POLYHEDRON_H
-#define CGAL_POINT_INSIDE_POLYHEDRON_H
-
-#include <CGAL/internal/Operations_on_polyhedra/Point_inside_vertical_ray_cast.h>
-#include <CGAL/internal/Operations_on_polyhedra/AABB_triangle_accessor_3_primitive.h>
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/Triangle_accessor_3.h>
-
-namespace CGAL {
-
-/** 
- * This class provides an efficient point location functionality with respect to a domain bounded
- * by one or several disjoint triangulated closed polyhedral (manifold) surfaces.
- * In case several polyhedral surface are provided as input, a point is said to be inside the domain
- * if an odd number of surfaces is crossed when walking from infinity to the point.
- * The implementation is based on an AABB-tree.
- * @tparam Polyhedron a triangulated polyhedral surface
- * @tparam Kernel a \cgal kernel
- * @tparam TriangleAccessor a model of the concept `TriangleAccessor_3`, with `TriangleAccessor_3::Triangle_3` being `Kernel::Triangle_3`. 
- *         If `Polyhedron` is a \cgal Polyhedron, a default is provided.
- * \todo Doc: move the concept `TriangleAccessor_3` into the "Operation on Polyhedra" package
- * \todo Code: Use this class as an implementation detail of Mesh_3's Polyhedral_mesh_domain_3
- * \todo Code: current version puts all polyhedra under one AABB, more proper approach might be using separate AABB for each polyhedron 
- *       and filtering query point with bboxes of polyhedra...
- */
-template <class Polyhedron, 
-          class Kernel,
-          class TriangleAccessor_3 = Triangle_accessor_3<Polyhedron, typename Polyhedron::Traits> 
->
-class Point_inside_polyhedron_3{
-  // typedefs
-  typedef CGAL::internal::AABB_triangle_accessor_3_primitive<Kernel, TriangleAccessor_3> Primitive;
-  typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
-  typedef CGAL::AABB_tree<Traits> Tree;
-  typedef typename Kernel::Point_3 Point;
-
-  //members
-  typename Kernel::Construct_ray_3     ray_functor;
-  typename Kernel::Construct_vector_3  vector_functor;
-  Tree tree;
-
-public:
-  /**
-   * Default constructor. The domain is considered to be empty.
-   */
-  Point_inside_polyhedron_3(const Kernel& kernel=Kernel())
-  : ray_functor(kernel.construct_ray_3_object()),
-  vector_functor(kernel.construct_vector_3_object())
-  { }
- 
-  /** 
-   * Constructor with one polyhedral surface. `polyhedron` must be closed and triangulated.
-   */
-  Point_inside_polyhedron_3(const Polyhedron& polyhedron, const Kernel& kernel=Kernel()) 
-  : ray_functor(kernel.construct_ray_3_object()),
-  vector_functor(kernel.construct_vector_3_object())
-  {
-    add_polyhedron(polyhedron);
-  }
-
-  /** 
-   * Constructor with several polyhedral surfaces. All the polyhedral surfaces must be closed, triangulated and disjoint.
-   * \tparam InputIterator is an input iterator with `Polyhedron` or `cpp11::reference_wrapper<Polyhedron>` as value type.
-   */
-  template <class InputIterator>
-  Point_inside_polyhedron_3(InputIterator begin, InputIterator beyond, const Kernel& kernel=Kernel()) 
-  : ray_functor(kernel.construct_ray_3_object()),
-  vector_functor(kernel.construct_vector_3_object())
-  {
-    add_polyhedra(begin, beyond);
-  }
-
-  /** 
-   * Builds internal AABB tree. Optional to call, since the tree is automatically built at the time of first query.
-   */ 
-  void build() { tree.build(); }
-
-  /**
-   * `polyhedron` is added as input
-   */
-  void add_polyhedron(const Polyhedron& polyhedron) 
-  {
-    CGAL_assertion(polyhedron.is_pure_triangle());
-    CGAL_assertion(polyhedron.is_closed());
-
-    tree.insert(TriangleAccessor_3().triangles_begin(polyhedron),
-                TriangleAccessor_3().triangles_end(polyhedron));
-  }
- 
-  /**
-   * The polyhedral surfaces in the range `[begin,beyond[` are added as input
-   * \tparam InputIterator is an input iterator with `Polyhedron` or `cpp11::reference_wrapper<Polyhedron>` as value type.
-   */
-  template<class InputIterator>
-  void add_polyhedra(InputIterator begin, InputIterator beyond) 
-  {
-    for(; begin != beyond; ++begin) {
-      add_polyhedron(*begin);
-    }
-  }
- 
-  /**
-   * Query function to determine point location.
-   * @return 
-   *   - CGAL::ON_BOUNDED_SIDE if the point is inside the polyhedron
-   *   - CGAL::ON_BOUNDARY if the point is on polyhedron
-   *   - CGAL::ON_UNBOUNDED_SIDE if the point is outside polyhedron
-   */
-  Bounded_side operator()(const Point& point) const
-  {
-    return internal::Point_inside_vertical_ray_cast<Kernel, Tree>()(point, tree, ray_functor, vector_functor);
-  }
-};
-
-} // namespace CGAL
-
-#endif //CGAL_POINT_INSIDE_POLYHEDRON_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Poisson_reconstruction_function.h b/3rdparty/CGAL-4.6/include/CGAL/Poisson_reconstruction_function.h
deleted file mode 100644
index 9f060fc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Poisson_reconstruction_function.h
+++ /dev/null
@@ -1,1210 +0,0 @@
-// Copyright (c) 2007-09  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Saboret, Pierre Alliez
-
-#ifndef CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
-#define CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
-
-#ifndef CGAL_DIV_NORMALIZED
-#  ifndef CGAL_DIV_NON_NORMALIZED
-#    define CGAL_DIV_NON_NORMALIZED 1
-#  endif
-#endif
-
-#include <vector>
-#include <deque>
-#include <algorithm>
-#include <cmath>
-#include <iterator>
-
-#include <CGAL/trace.h>
-#include <CGAL/Reconstruction_triangulation_3.h>
-#include <CGAL/spatial_sort.h>
-#ifdef CGAL_EIGEN3_ENABLED
-#include <CGAL/Eigen_solver_traits.h>
-#else
-#endif
-#include <CGAL/centroid.h>
-#include <CGAL/property_map.h>
-#include <CGAL/surface_reconstruction_points_assertions.h>
-#include <CGAL/poisson_refine_triangulation.h>
-#include <CGAL/Robust_circumcenter_filtered_traits_3.h>
-#include <CGAL/compute_average_spacing.h>
-#include <CGAL/Timer.h>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/array.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
-
-/*! 
-  \file Poisson_reconstruction_function.h
-*/
-
-namespace CGAL {
-
-  namespace internal {
-template <class RT>
-bool
-invert(
-       const RT& a0,  const RT& a1,  const RT& a2,
-       const RT& a3,  const RT& a4,  const RT& a5,
-       const RT& a6,  const RT& a7,  const RT& a8,
-       RT& i0,   RT& i1,   RT& i2,
-       RT& i3,   RT& i4,   RT& i5,
-       RT& i6,   RT& i7,   RT& i8)
-{
-    // Compute the adjoint.
-    i0 = a4*a8 - a5*a7;
-    i1 = a2*a7 - a1*a8;
-    i2 = a1*a5 - a2*a4;
-    i3 = a5*a6 - a3*a8;
-    i4 = a0*a8 - a2*a6;
-    i5 = a2*a3 - a0*a5;
-    i6 = a3*a7 - a4*a6;
-    i7 = a1*a6 - a0*a7;
-    i8 = a0*a4 - a1*a3;
-
-    RT det = a0*i0 + a1*i3 + a2*i6;
-
-    if(det != 0) {
-      RT idet = (RT(1.0))/det;
-      i0 *= idet;
-      i1 *= idet;
-      i2 *= idet;
-      i3 *= idet;
-      i4 *= idet;
-      i5 *= idet;
-      i6 *= idet;
-      i7 *= idet;
-      i8 *= idet;
-      return true;
-    }
-
-    return false;
-}
-
-  }
-
-
-/// \cond SKIP_IN_MANUAL
-struct Poisson_visitor {
-  void before_insertion() const
-  {}
-};
-
-struct Poisson_skip_vertices { 
-  double ratio;
-  Random& m_random;
-  Poisson_skip_vertices(const double ratio, Random& random)
-    : ratio(ratio), m_random(random) {}
-
-  template <typename Iterator>
-  bool operator()(Iterator) const {
-    return m_random.get_double() < ratio;
-  }
-};
-
-// Given f1 and f2, two sizing fields, that functor wrapper returns
-//   max(f1, f2*f2)
-// The wrapper stores only pointers to the two functors.
-template <typename F1, typename F2>
-struct Special_wrapper_of_two_functions_keep_pointers {
-  F1 *f1;
-  F2 *f2;
-  Special_wrapper_of_two_functions_keep_pointers(F1* f1, F2* f2) 
-    : f1(f1), f2(f2) {}
-
-  template <typename X>
-  double operator()(const X& x) const {
-    return (std::max)((*f1)(x), CGAL::square((*f2)(x)));
-  }
-
-  template <typename X>
-  double operator()(const X& x) {
-    return (std::max)((*f1)(x), CGAL::square((*f2)(x)));
-  }
-}; // end struct Special_wrapper_of_two_functions_keep_pointers<F1, F2>
-/// \endcond 
-
-
-/*!
-\ingroup PkgSurfaceReconstructionFromPointSets
-
-\brief Implementation of the Poisson Surface Reconstruction method.
-  
-Given a set of 3D points with oriented normals sampled on the boundary
-of a 3D solid, the Poisson Surface Reconstruction method \cgalCite{Kazhdan06} 
-solves for an approximate indicator function of the inferred
-solid, whose gradient best matches the input normals. The output
-scalar function, represented in an adaptive octree, is then
-iso-contoured using an adaptive marching cubes.
-
-`Poisson_reconstruction_function` implements a variant of this
-algorithm which solves for a piecewise linear function on a 3D
-Delaunay triangulation instead of an adaptive octree.
-
-\tparam Gt Geometric traits class. 
-
-\cgalModels `ImplicitFunction`
-
-*/
-template <class Gt>
-class Poisson_reconstruction_function
-{
-// Public types
-public:
-
-  /// \name Types 
-  /// @{
-
-  typedef Gt Geom_traits; ///< Geometric traits class
-  /// \cond SKIP_IN_MANUAL
-  typedef Reconstruction_triangulation_3<Robust_circumcenter_filtered_traits_3<Gt> >
-                                                   Triangulation;
-  /// \endcond
-  typedef typename Triangulation::Cell_handle   Cell_handle;
-
-  // Geometric types
-  typedef typename Geom_traits::FT FT; ///< number type.
-  typedef typename Geom_traits::Point_3 Point; ///< point type.
-  typedef typename Geom_traits::Vector_3 Vector; ///< vector type.
-  typedef typename Geom_traits::Sphere_3 Sphere; 
-
-  /// @}
-
-// Private types
-private:
-
-  // Internal 3D triangulation, of type Reconstruction_triangulation_3.
-  // Note: poisson_refine_triangulation() requires a robust circumcenter computation.
-
-  // Repeat Triangulation types
-  typedef typename Triangulation::Triangulation_data_structure Triangulation_data_structure;
-  typedef typename Geom_traits::Ray_3 Ray;
-  typedef typename Geom_traits::Plane_3 Plane;
-  typedef typename Geom_traits::Segment_3 Segment;
-  typedef typename Geom_traits::Triangle_3 Triangle;
-  typedef typename Geom_traits::Tetrahedron_3 Tetrahedron;
-  typedef typename Triangulation::Vertex_handle Vertex_handle;
-  typedef typename Triangulation::Cell   Cell;
-  typedef typename Triangulation::Vertex Vertex;
-  typedef typename Triangulation::Facet  Facet;
-  typedef typename Triangulation::Edge   Edge;
-  typedef typename Triangulation::Cell_circulator  Cell_circulator;
-  typedef typename Triangulation::Facet_circulator Facet_circulator;
-  typedef typename Triangulation::Cell_iterator    Cell_iterator;
-  typedef typename Triangulation::Facet_iterator   Facet_iterator;
-  typedef typename Triangulation::Edge_iterator    Edge_iterator;
-  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
-  typedef typename Triangulation::Point_iterator   Point_iterator;
-  typedef typename Triangulation::Finite_vertices_iterator Finite_vertices_iterator;
-  typedef typename Triangulation::Finite_cells_iterator    Finite_cells_iterator;
-  typedef typename Triangulation::Finite_facets_iterator   Finite_facets_iterator;
-  typedef typename Triangulation::Finite_edges_iterator    Finite_edges_iterator;
-  typedef typename Triangulation::All_cells_iterator       All_cells_iterator;
-  typedef typename Triangulation::Locate_type Locate_type;
-
-// Data members.
-// Warning: the Surface Mesh Generation package makes copies of implicit functions,
-// thus this class must be lightweight and stateless.
-private:
-
-  // operator() is pre-computed on vertices of *m_tr by solving
-  // the Poisson equation Laplacian(f) = divergent(normals field).
-  boost::shared_ptr<Triangulation> m_tr;
-
-  mutable boost::shared_ptr<std::vector<boost::array<double,9> > > m_Bary;
-  mutable std::vector<Point> Dual;
-  mutable std::vector<Vector> Normal;
-
-  // contouring and meshing
-  Point m_sink; // Point with the minimum value of operator()
-  mutable Cell_handle m_hint; // last cell found = hint for next search
-
-  FT average_spacing;
-
-
-  /// function to be used for the different constructors available that are
-  /// doing the same thing but with default template parameters
-  template <typename InputIterator,
-            typename PointPMap,
-            typename NormalPMap,
-            typename Visitor
-  >
-  void forward_constructor(
-    InputIterator first,
-    InputIterator beyond,
-    PointPMap point_pmap,
-    NormalPMap normal_pmap,
-    Visitor visitor)
-  {
-    CGAL::Timer task_timer; task_timer.start();
-    CGAL_TRACE_STREAM << "Creates Poisson triangulation...\n";
-
-    // Inserts points in triangulation
-    m_tr->insert(
-      first,beyond,
-      point_pmap,
-      normal_pmap,
-      visitor);
-
-    // Prints status
-    CGAL_TRACE_STREAM << "Creates Poisson triangulation: " << task_timer.time() << " seconds, "
-                                                           << std::endl;
-  }
-
-
-// Public methods
-public:
-
-  /// \name Creation 
-  /// @{
-
-
-  /*! 
-    Creates a Poisson implicit function from the  range of points `[first, beyond)`. 
-
-    \tparam InputIterator iterator over input points. 
-
-    \tparam PointPMap is a model of `ReadablePropertyMap` with
-      a `value_type = Point`.  It can be omitted if `InputIterator`
-      `value_type` is convertible to `Point`. 
-    
-    \tparam NormalPMap is a model of `ReadablePropertyMap`
-      with a `value_type = Vector`.
-  */ 
-  template <typename InputIterator,
-            typename PointPMap,
-            typename NormalPMap
-  >
-  Poisson_reconstruction_function(
-    InputIterator first,  ///< iterator over the first input point.
-    InputIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: `value_type of InputIterator` -> `Point` (the position of an input point).
-    NormalPMap normal_pmap ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
-  )
-    : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
-    , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6))
-  {
-    forward_constructor(first, beyond, point_pmap, normal_pmap, Poisson_visitor());
-  }
-
-  /// \cond SKIP_IN_MANUAL
-  template <typename InputIterator,
-            typename PointPMap,
-            typename NormalPMap,
-            typename Visitor
-  >
-  Poisson_reconstruction_function(
-    InputIterator first,  ///< iterator over the first input point.
-    InputIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: `value_type of InputIterator` -> `Point` (the position of an input point).
-    NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
-    Visitor visitor)
-    : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
-    , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6))
-  {
-    forward_constructor(first, beyond, point_pmap, normal_pmap, visitor);
-  }
-
-  // This variant creates a default point property map = Identity_property_map and Visitor=Poisson_visitor
-  template <typename InputIterator,
-            typename NormalPMap
-  >
-  Poisson_reconstruction_function(
-    InputIterator first,  ///< iterator over the first input point.
-    InputIterator beyond, ///< past-the-end iterator over the input points.
-    NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
-    typename boost::enable_if<
-      boost::is_convertible<typename InputIterator::value_type, Point>
-    >::type* = 0
-  )
-  : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
-  , average_spacing(CGAL::compute_average_spacing(first, beyond, 6))
-  {
-    forward_constructor(first, beyond, 
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      make_dereference_property_map(first),
-#else
-      make_identity_property_map(
-      typename std::iterator_traits<InputIterator>::value_type()),
-#endif
-      normal_pmap, Poisson_visitor());
-    CGAL::Timer task_timer; task_timer.start();
-  }
-  /// \endcond
-
-  /// @}
-
-  /// \name Operations
-  /// @{
-
-  /// Returns a sphere bounding the inferred surface.
-  Sphere bounding_sphere() const
-  {
-    return m_tr->bounding_sphere();
-  }
-  
-  /// \cond SKIP_IN_MANUAL
-  const Triangulation& tr() const {
-    return *m_tr;
-  }
-  
-  // This variant requires all parameters.
-  template <class SparseLinearAlgebraTraits_d,
-            class Visitor>
-  bool compute_implicit_function(
-                                 SparseLinearAlgebraTraits_d solver,// = SparseLinearAlgebraTraits_d(),
-                                 Visitor visitor,
-                                 double approximation_ratio = 0,
-                                 double average_spacing_ratio = 5) 
-  {
-    CGAL::Timer task_timer; task_timer.start();
-    CGAL_TRACE_STREAM << "Delaunay refinement...\n";
-
-    // Delaunay refinement
-    const FT radius_edge_ratio_bound = 2.5;
-    const unsigned int max_vertices = (unsigned int)1e7; // max 10M vertices
-    const FT enlarge_ratio = 1.5;
-    const FT radius = sqrt(bounding_sphere().squared_radius()); // get triangulation's radius
-    const FT cell_radius_bound = radius/5.; // large
-
-    internal::Poisson::Constant_sizing_field<Triangulation> sizing_field(CGAL::square(cell_radius_bound));
-
-    std::vector<int> NB; 
-
-    NB.push_back( delaunay_refinement(radius_edge_ratio_bound,sizing_field,max_vertices,enlarge_ratio));
-
-    while(m_tr->insert_fraction(visitor)){
-
-      NB.push_back( delaunay_refinement(radius_edge_ratio_bound,sizing_field,max_vertices,enlarge_ratio));
-    }
-
-    if(approximation_ratio > 0. && 
-       approximation_ratio * std::distance(m_tr->input_points_begin(),
-                                           m_tr->input_points_end()) > 20) {
-
-      // Add a pass of Delaunay refinement.
-      //
-      // In that pass, the sizing field, of the refinement process of the
-      // triangulation, is based on the result of a poisson function with a
-      // sample of the input points. The ratio is 'approximation_ratio'.
-      //
-      // For optimization reasons, the cell criteria of the refinement
-      // process uses two sizing fields:
-      //
-      //   - the minimum of the square of 'coarse_poisson_function' and the
-      // square of the constant field equal to 'average_spacing',
-      //
-      //   - a second sizing field that is constant, and equal to:
-      //
-      //         average_spacing*average_spacing_ratio
-      //
-      // If a given cell is smaller than the constant second sizing field,
-      // then the cell is considered as small enough, and the first sizing
-      // field, more costly, is not evaluated.
-
-      typedef Filter_iterator<typename Triangulation::Input_point_iterator,
-                              Poisson_skip_vertices> Some_points_iterator;
-      //make it deterministic
-      Random random(0);
-      Poisson_skip_vertices skip(1.-approximation_ratio,random);
-      
-      CGAL_TRACE_STREAM << "SPECIAL PASS that uses an approximation of the result (approximation ratio: "
-                << approximation_ratio << ")" << std::endl;
-      CGAL::Timer approximation_timer; approximation_timer.start();
-
-      CGAL::Timer sizing_field_timer; sizing_field_timer.start();
-      Poisson_reconstruction_function<Geom_traits> 
-        coarse_poisson_function(Some_points_iterator(m_tr->input_points_end(),
-                                                     skip,
-                                                     m_tr->input_points_begin()),
-                                Some_points_iterator(m_tr->input_points_end(),
-                                                     skip),
-                                Normal_of_point_with_normal_pmap<Geom_traits>() );
-      coarse_poisson_function.compute_implicit_function(solver, Poisson_visitor(),
-                                                        0.);
-      internal::Poisson::Constant_sizing_field<Triangulation> 
-        min_sizing_field(CGAL::square(average_spacing));
-      internal::Poisson::Constant_sizing_field<Triangulation> 
-        sizing_field_ok(CGAL::square(average_spacing*average_spacing_ratio));
-
-      Special_wrapper_of_two_functions_keep_pointers<
-        internal::Poisson::Constant_sizing_field<Triangulation>,
-        Poisson_reconstruction_function<Geom_traits> > sizing_field2(&min_sizing_field,
-                                                                     &coarse_poisson_function);
-        
-      sizing_field_timer.stop();
-      std::cerr << "Construction time of the sizing field: " << sizing_field_timer.time() 
-                << " seconds" << std::endl;
-
-      NB.push_back( delaunay_refinement(radius_edge_ratio_bound,
-                                        sizing_field2,
-                                        max_vertices,
-                                        enlarge_ratio,
-                                        sizing_field_ok) );
-      approximation_timer.stop();
-      CGAL_TRACE_STREAM << "SPECIAL PASS END (" << approximation_timer.time() <<  " seconds)" << std::endl;
-    }
-
-    
-    // Prints status
-    CGAL_TRACE_STREAM << "Delaunay refinement: " << "added ";
-    for(std::size_t i = 0; i < NB.size()-1; i++){
-      CGAL_TRACE_STREAM << NB[i] << " + "; 
-    } 
-    CGAL_TRACE_STREAM << NB.back() << " Steiner points, "
-                      << task_timer.time() << " seconds, "
-                      << std::endl;
-    task_timer.reset();
-
-#ifdef CGAL_DIV_NON_NORMALIZED
-    CGAL_TRACE_STREAM << "Solve Poisson equation with non-normalized divergence...\n";
-#else
-    CGAL_TRACE_STREAM << "Solve Poisson equation with normalized divergence...\n";
-#endif
-
-    // Computes the Poisson indicator function operator()
-    // at each vertex of the triangulation.
-    double lambda = 0.1;
-    if ( ! solve_poisson(solver, lambda) )
-    {
-      std::cerr << "Error: cannot solve Poisson equation" << std::endl;
-      return false;
-    }
-
-    // Shift and orient operator() such that:
-    // - operator() = 0 on the input points,
-    // - operator() < 0 inside the surface.
-    set_contouring_value(median_value_at_input_vertices());
-
-    // Prints status
-    CGAL_TRACE_STREAM << "Solve Poisson equation: " << task_timer.time() << " seconds, "
-                                                    << std::endl;
-    task_timer.reset();
-
-    return true;
-  }
-  /// \endcond
-
-  /*!
-    This function must be called after the
-    insertion of oriented points. It computes the piecewise linear scalar
-    function operator() by: applying Delaunay refinement, solving for
-    operator() at each vertex of the triangulation with a sparse linear
-    solver, and shifting and orienting operator() such that it is 0 at all
-    input points and negative inside the inferred surface.
-
-    \tparam SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
-    If \ref thirdpartyEigen "Eigen" 3.1 (or greater) is available and `CGAL_EIGEN3_ENABLED`
-    is defined, an overload with \link Eigen_solver_traits <tt>Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> ></tt> \endlink
-    as default solver is provided.
-  
-    \param solver sparse linear solver.
-    \param smoother_hole_filling controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.
-
-    \return `false` if the linear solver fails. 
-  */ 
-  template <class SparseLinearAlgebraTraits_d>
-  bool compute_implicit_function(SparseLinearAlgebraTraits_d solver, bool smoother_hole_filling = false)
-  {
-    if (smoother_hole_filling)
-      return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor(),0.02,5);
-    else
-      return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor());
-  }
-
-  /// \cond SKIP_IN_MANUAL
-  // This variant provides the default sparse linear traits class = Eigen_solver_traits.
-  bool compute_implicit_function(bool smoother_hole_filling = false)
-  {
-    typedef Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
-    return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
-  }
-
-  boost::tuple<FT, Cell_handle, bool> special_func(const Point& p) const
-  {
-    m_hint = m_tr->locate(p  ,m_hint  ); // no hint when we use hierarchy
-
-    if(m_tr->is_infinite(m_hint)) {
-      int i = m_hint->index(m_tr->infinite_vertex());
-      return boost::make_tuple(m_hint->vertex((i+1)&3)->f(),
-                               m_hint, true);
-    }
-
-    FT a,b,c,d;
-    barycentric_coordinates(p,m_hint,a,b,c,d);
-    return boost::make_tuple(a * m_hint->vertex(0)->f() +
-                             b * m_hint->vertex(1)->f() +
-                             c * m_hint->vertex(2)->f() +
-                             d * m_hint->vertex(3)->f(),
-                             m_hint, false);
-  }
-  /// \endcond
-
-  /*! 
-    `ImplicitFunction` interface: evaluates the implicit function at a 
-    given 3D query point. The function `compute_implicit_function()` must be 
-    called before the first call to `operator()`. 
-  */ 
-  FT operator()(const Point& p) const
-  {
-    m_hint = m_tr->locate(p ,m_hint); 
-
-    if(m_tr->is_infinite(m_hint)) {
-      int i = m_hint->index(m_tr->infinite_vertex());
-      return m_hint->vertex((i+1)&3)->f();
-    }
-
-    FT a,b,c,d;
-    barycentric_coordinates(p,m_hint,a,b,c,d);
-    return a * m_hint->vertex(0)->f() +
-           b * m_hint->vertex(1)->f() +
-           c * m_hint->vertex(2)->f() +
-           d * m_hint->vertex(3)->f();
-  }
-  
-  /// \cond SKIP_IN_MANUAL
-  void initialize_cell_indices()
-  {
-    int i=0;
-    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
-        fcit != m_tr->finite_cells_end();
-        ++fcit){
-      fcit->info()= i++;
-    }
-  }
-
-  void initialize_barycenters() const
-  {
-    m_Bary->resize(m_tr->number_of_cells());
-
-    for(std::size_t i=0; i< m_Bary->size();i++){
-      (*m_Bary)[i][0]=-1;
-    }
-  }
-
-  void initialize_cell_normals() const
-  {
-    Normal.resize(m_tr->number_of_cells());
-    int i = 0;
-    int N = 0;
-    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
-        fcit != m_tr->finite_cells_end();
-        ++fcit){
-      Normal[i] = cell_normal(fcit);
-      if(Normal[i] == NULL_VECTOR){
-        N++;
-      }
-      ++i;
-    }
-    std::cerr << N << " out of " << i << " cells have NULL_VECTOR as normal" << std::endl;
-  }
-
-  void initialize_duals() const
-  {
-    Dual.resize(m_tr->number_of_cells());    
-    int i = 0;
-    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
-        fcit != m_tr->finite_cells_end();
-        ++fcit){
-      Dual[i++] = m_tr->dual(fcit);
-    }
-  }
-
-  void clear_duals() const
-  {
-    Dual.clear();
-  }
-
-  void clear_normals() const
-  {
-    Normal.clear();
-  }
-
-  void initialize_matrix_entry(Cell_handle ch) const
-  {
-    boost::array<double,9> & entry = (*m_Bary)[ch->info()];
-    const Point& pa = ch->vertex(0)->point();
-    const Point& pb = ch->vertex(1)->point();
-    const Point& pc = ch->vertex(2)->point();
-    const Point& pd = ch->vertex(3)->point();
-    
-    Vector va = pa - pd;
-    Vector vb = pb - pd;
-    Vector vc = pc - pd;
-    
-    internal::invert(va.x(), va.y(), va.z(),
-           vb.x(), vb.y(), vb.z(),
-           vc.x(), vc.y(), vc.z(),
-           entry[0],entry[1],entry[2],entry[3],entry[4],entry[5],entry[6],entry[7],entry[8]);
-  }
-  /// \endcond
-  
-  /// Returns a point located inside the inferred surface.
-  Point get_inner_point() const
-  {
-    // Gets point / the implicit function is minimum
-    return m_sink;
-  }
-
-  /// @}
-
-// Private methods:
-private:
-
-  /// Delaunay refinement (break bad tetrahedra, where
-  /// bad means badly shaped or too big). The normal of
-  /// Steiner points is set to zero.
-  /// Returns the number of vertices inserted.
-
-  template <typename Sizing_field>
-  unsigned int delaunay_refinement(FT radius_edge_ratio_bound, ///< radius edge ratio bound (ignored if zero)
-                                   Sizing_field sizing_field, ///< cell radius bound (ignored if zero)
-                                   unsigned int max_vertices, ///< number of vertices bound
-                                   FT enlarge_ratio) ///< bounding box enlarge ratio
-  {
-    return delaunay_refinement(radius_edge_ratio_bound,
-                               sizing_field,
-                               max_vertices,
-                               enlarge_ratio,
-                               internal::Poisson::Constant_sizing_field<Triangulation>());
-  }
-
-  template <typename Sizing_field, 
-            typename Second_sizing_field>
-  unsigned int delaunay_refinement(FT radius_edge_ratio_bound, ///< radius edge ratio bound (ignored if zero)
-                                   Sizing_field sizing_field, ///< cell radius bound (ignored if zero)
-                                   unsigned int max_vertices, ///< number of vertices bound
-                                   FT enlarge_ratio, ///< bounding box enlarge ratio
-                                   Second_sizing_field second_sizing_field)
-  {
-    Sphere elarged_bsphere = enlarged_bounding_sphere(enlarge_ratio);
-    unsigned int nb_vertices_added = poisson_refine_triangulation(*m_tr,radius_edge_ratio_bound,sizing_field,second_sizing_field,max_vertices,elarged_bsphere);
-
-    return nb_vertices_added;
-  }
-
-  /// Poisson reconstruction.
-  /// Returns false on error.
-  ///
-  /// @commentheading Template parameters:
-  /// @param SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
-  template <class SparseLinearAlgebraTraits_d>
-  bool solve_poisson(
-    SparseLinearAlgebraTraits_d solver, ///< sparse linear solver
-    double lambda)
-  {
-    CGAL_TRACE("Calls solve_poisson()\n");
-
-    double time_init = clock();
-
-    double duration_assembly = 0.0;
-    double duration_solve = 0.0;
-
-
-    initialize_cell_indices();
-    initialize_barycenters();
-
-    // get #variables
-    constrain_one_vertex_on_convex_hull();
-    m_tr->index_unconstrained_vertices();
-    unsigned int nb_variables = static_cast<unsigned int>(m_tr->number_of_vertices()-1);
-
-    CGAL_TRACE("  Number of variables: %ld\n", (long)(nb_variables));
-
-    // Assemble linear system A*X=B
-    typename SparseLinearAlgebraTraits_d::Matrix A(nb_variables); // matrix is symmetric definite positive
-    typename SparseLinearAlgebraTraits_d::Vector X(nb_variables), B(nb_variables);
-
-    initialize_duals();
-#ifndef CGAL_DIV_NON_NORMALIZED
-    initialize_cell_normals();
-#endif
-    Finite_vertices_iterator v, e;
-    for(v = m_tr->finite_vertices_begin(),
-        e = m_tr->finite_vertices_end();
-        v != e;
-        ++v)
-    {
-      if(!m_tr->is_constrained(v)) {
-#ifdef CGAL_DIV_NON_NORMALIZED
-        B[v->index()] = div(v); // rhs -> divergent
-#else // not defined(CGAL_DIV_NORMALIZED)
-        B[v->index()] = div_normalized(v); // rhs -> divergent
-#endif // not defined(CGAL_DIV_NORMALIZED)
-        assemble_poisson_row<SparseLinearAlgebraTraits_d>(A,v,B,lambda);
-      }
-    }
-
-    clear_duals();
-    clear_normals();
-    duration_assembly = (clock() - time_init)/CLOCKS_PER_SEC;
-    CGAL_TRACE("  Creates matrix: done (%.2lf s)\n", duration_assembly);
-
-    CGAL_TRACE("  Solve sparse linear system...\n");
-
-    // Solve "A*X = B". On success, solution is (1/D) * X.
-    time_init = clock();
-    double D;
-    if(!solver.linear_solver(A, B, X, D))
-      return false;
-    CGAL_surface_reconstruction_points_assertion(D == 1.0);
-    duration_solve = (clock() - time_init)/CLOCKS_PER_SEC;
-
-    CGAL_TRACE("  Solve sparse linear system: done (%.2lf s)\n", duration_solve);
-
-    // copy function's values to vertices
-    unsigned int index = 0;
-    for (v = m_tr->finite_vertices_begin(), e = m_tr->finite_vertices_end(); v!= e; ++v)
-      if(!m_tr->is_constrained(v))
-        v->f() = X[index++];
-
-    CGAL_TRACE("End of solve_poisson()\n");
-
-    return true;
-  }
-
-  /// Shift and orient the implicit function such that:
-  /// - the implicit function = 0 for points / f() = contouring_value,
-  /// - the implicit function < 0 inside the surface.
-  ///
-  /// Returns the minimum value of the implicit function.
-  FT set_contouring_value(FT contouring_value)
-  {
-    // median value set to 0.0
-    shift_f(-contouring_value);
-
-    // check value on convex hull (should be positive)
-    Vertex_handle v = any_vertex_on_convex_hull();
-    if(v->f() < 0.0)
-      flip_f();
-
-    // Update m_sink
-    FT sink_value = find_sink();
-    return sink_value;
-  }
-
-
-/// Gets median value of the implicit function over input vertices.
-  FT median_value_at_input_vertices() const
-  {
-    std::deque<FT> values;
-    Finite_vertices_iterator v, e;
-    for(v = m_tr->finite_vertices_begin(),
-        e= m_tr->finite_vertices_end();
-        v != e; 
-        v++)
-      if(v->type() == Triangulation::INPUT)
-        values.push_back(v->f());
-
-    std::size_t size = values.size();
-    if(size == 0)
-    {
-      std::cerr << "Contouring: no input points\n";
-      return 0.0;
-    }
-
-    std::sort(values.begin(),values.end());
-    std::size_t index = size/2;
-    // return values[size/2];
-    return 0.5 * (values[index] + values[index+1]); // avoids singular cases
-  }
-
-  void barycentric_coordinates(const Point& p,
-                               Cell_handle cell,
-                               FT& a,
-                               FT& b,
-                               FT& c,
-                               FT& d) const
-  {
-
-    //    const Point& pa = cell->vertex(0)->point();
-    // const Point& pb = cell->vertex(1)->point();
-    // const Point& pc = cell->vertex(2)->point();
-    const Point& pd = cell->vertex(3)->point();
-#if 1
-    //Vector va = pa - pd;
-    //Vector vb = pb - pd;
-    //Vector vc = pc - pd;
-    Vector vp = p - pd;
-
-    //FT i00, i01, i02, i10, i11, i12, i20, i21, i22;
-    //internal::invert(va.x(), va.y(), va.z(),
-    //       vb.x(), vb.y(), vb.z(),
-    //       vc.x(), vc.y(), vc.z(),
-    //       i00, i01, i02, i10, i11, i12, i20, i21, i22);
-    const boost::array<double,9> & i = (*m_Bary)[cell->info()];
-    if(i[0]==-1){
-      initialize_matrix_entry(cell);
-    }
-    //    UsedBary[cell->info()] = true;
-    a = i[0] * vp.x() + i[3] * vp.y() + i[6] * vp.z();
-    b = i[1] * vp.x() + i[4] * vp.y() + i[7] * vp.z();
-    c = i[2] * vp.x() + i[5] * vp.y() + i[8] * vp.z();
-    d = 1 - ( a + b + c);
-#else
-    FT v = volume(pa,pb,pc,pd);
-    a = std::fabs(volume(pb,pc,pd,p) / v);
-    b = std::fabs(volume(pa,pc,pd,p) / v);
-    c = std::fabs(volume(pb,pa,pd,p) / v);
-    d = std::fabs(volume(pb,pc,pa,p) / v);
-
-    std::cerr << "_________________________________\n";
-    std::cerr << aa << "  " << bb << "  " << cc << "  " << dd << std::endl;
-    std::cerr << a << "  " << b << "  " << c << "  " << d << std::endl;
-
-#endif
-  }
-
-  FT find_sink()
-  {
-    m_sink = CGAL::ORIGIN;
-    FT min_f = 1e38;
-    Finite_vertices_iterator v, e;
-    for(v = m_tr->finite_vertices_begin(),
-        e= m_tr->finite_vertices_end();
-        v != e;
-        v++)
-    {
-      if(v->f() < min_f)
-      {
-        m_sink = v->point();
-        min_f = v->f();
-      }
-    }
-    return min_f;
-  }
-
-  void shift_f(const FT shift)
-  {
-    Finite_vertices_iterator v, e;
-    for(v = m_tr->finite_vertices_begin(),
-        e = m_tr->finite_vertices_end();
-        v!= e;
-        v++)
-      v->f() += shift;
-  }
-
-  void flip_f()
-  {
-    Finite_vertices_iterator v, e;
-    for(v = m_tr->finite_vertices_begin(),
-          e = m_tr->finite_vertices_end();
-        v != e;
-        v++)
-      v->f() = -v->f();
-  }
-
-  Vertex_handle any_vertex_on_convex_hull()
-  {
-    Cell_handle ch = m_tr->infinite_vertex()->cell();
-    return  ch->vertex( (ch->index( m_tr->infinite_vertex())+1)%4);
-  }
-
-
-  void constrain_one_vertex_on_convex_hull(const FT value = 0.0)
-  {
-    Vertex_handle v = any_vertex_on_convex_hull();
-    m_tr->constrain(v);
-    v->f() = value;
-  }
-
-  // TODO: Some entities are computed too often
-  // - nn and area should not be computed for the face and its opposite face
-  // 
-  // divergent
-  FT div_normalized(Vertex_handle v)
-  {
-    std::vector<Cell_handle> cells;
-    cells.reserve(32);
-    m_tr->incident_cells(v,std::back_inserter(cells));
-  
-    FT div = 0;
-    typename std::vector<Cell_handle>::iterator it;
-    for(it = cells.begin(); it != cells.end(); it++)
-    {
-      Cell_handle cell = *it;
-      if(m_tr->is_infinite(cell))
-        continue;
-
-      // compute average normal per cell
-      Vector n = get_cell_normal(cell);
-
-      // zero normal - no need to compute anything else
-      if(n == CGAL::NULL_VECTOR)
-        continue;
-
-
-      // compute n'
-      int index = cell->index(v);
-      const Point& x = cell->vertex(index)->point();
-      const Point& a = cell->vertex((index+1)%4)->point();
-      const Point& b = cell->vertex((index+2)%4)->point();
-      const Point& c = cell->vertex((index+3)%4)->point();
-      Vector nn = (index%2==0) ? CGAL::cross_product(b-a,c-a) : CGAL::cross_product(c-a,b-a);
-      nn = nn / std::sqrt(nn*nn); // normalize
-      Vector p = a - x;
-      Vector q = b - x;
-      Vector r = c - x;
-      FT p_n = std::sqrt(p*p);
-      FT q_n = std::sqrt(q*q);
-      FT r_n = std::sqrt(r*r);
-      FT solid_angle = p*(CGAL::cross_product(q,r));
-      solid_angle = std::abs(solid_angle / (p_n*q_n*r_n + (p*q)*r_n + (q*r)*p_n + (r*p)*q_n));
-
-      FT area = std::sqrt(squared_area(a,b,c));
-      FT length = p_n + q_n + r_n;
-      div += n * nn * area / length ;
-    }
-    return div * FT(3.0);
-  }
-
-  FT div(Vertex_handle v)
-  {
-    std::vector<Cell_handle> cells;
-    cells.reserve(32);
-    m_tr->incident_cells(v,std::back_inserter(cells));
-  
-    FT div = 0.0;
-    typename std::vector<Cell_handle>::iterator it;
-    for(it = cells.begin(); it != cells.end(); it++)
-    {
-      Cell_handle cell = *it;
-      if(m_tr->is_infinite(cell))
-        continue;
-      
-      const int index = cell->index(v);
-      const Point& a = cell->vertex(m_tr->vertex_triple_index(index, 0))->point();
-      const Point& b = cell->vertex(m_tr->vertex_triple_index(index, 1))->point();
-      const Point& c = cell->vertex(m_tr->vertex_triple_index(index, 2))->point();
-      const Vector nn = CGAL::cross_product(b-a,c-a);
-
-      div+= nn * (//v->normal() + 
-                  cell->vertex((index+1)%4)->normal() +
-                  cell->vertex((index+2)%4)->normal() +
-                  cell->vertex((index+3)%4)->normal());
-    }
-    return div;
-  }
-
-  Vector get_cell_normal(Cell_handle cell)
-  {
-    return Normal[cell->info()];
-  }
-
-  Vector cell_normal(Cell_handle cell) const
-  {
-    const Vector& n0 = cell->vertex(0)->normal();
-    const Vector& n1 = cell->vertex(1)->normal();
-    const Vector& n2 = cell->vertex(2)->normal();
-    const Vector& n3 = cell->vertex(3)->normal();
-    Vector n = n0 + n1 + n2 + n3;
-    if(n != NULL_VECTOR){
-      FT sq_norm = n*n;
-      if(sq_norm != 0.0){
-        return n / std::sqrt(sq_norm); // normalize
-      }
-    }
-    return NULL_VECTOR;
-  }
-
-  // cotan formula as area(voronoi face) / len(primal edge)
-  FT cotan_geometric(Edge& edge)
-  {
-    Cell_handle cell = edge.first;
-    Vertex_handle vi = cell->vertex(edge.second);
-    Vertex_handle vj = cell->vertex(edge.third);
-
-    // primal edge
-    const Point& pi = vi->point();
-    const Point& pj = vj->point();
-    Vector primal = pj - pi;
-    FT len_primal = std::sqrt(primal * primal);
-    return area_voronoi_face(edge) / len_primal;
-  }
-
-  // spin around edge
-  // return area(voronoi face)
-  FT area_voronoi_face(Edge& edge)
-  {
-    // circulate around edge
-    Cell_circulator circ = m_tr->incident_cells(edge);
-    Cell_circulator done = circ;
-    std::vector<Point> voronoi_points;
-    voronoi_points.reserve(9);
-    do
-    {
-      Cell_handle cell = circ;
-      if(!m_tr->is_infinite(cell))
-        voronoi_points.push_back(Dual[cell->info()]);
-      else // one infinite tet, switch to another calculation
-        return area_voronoi_face_boundary(edge);
-      circ++;
-    }
-    while(circ != done);
-
-    if(voronoi_points.size() < 3)
-    {
-      CGAL_surface_reconstruction_points_assertion(false);
-      return 0.0;
-    }
-
-    // sum up areas
-    FT area = 0.0;
-    const Point& a = voronoi_points[0];
-    std::size_t nb_triangles = voronoi_points.size() - 1;
-    for(std::size_t i=1;i<nb_triangles;i++)
-    {
-      const Point& b = voronoi_points[i];
-      const Point& c = voronoi_points[i+1];
-      area += std::sqrt(squared_area(a,b,c));
-    }
-    return area;
-  }
-
-  // approximate area when a cell is infinite
-  FT area_voronoi_face_boundary(Edge& edge)
-  {
-    FT area = 0.0;
-    Vertex_handle vi = edge.first->vertex(edge.second);
-    Vertex_handle vj = edge.first->vertex(edge.third);
-
-    const Point& pi = vi->point();
-    const Point& pj = vj->point();
-    Point m = CGAL::midpoint(pi,pj);
-
-    // circulate around each incident cell
-    Cell_circulator circ = m_tr->incident_cells(edge);
-    Cell_circulator done = circ;
-    do
-    {
-      Cell_handle cell = circ;
-      if(!m_tr->is_infinite(cell))
-      {
-        // circumcenter of cell
-        Point c = Dual[cell->info()];
-        Tetrahedron tet = m_tr->tetrahedron(cell);
-
-        int i = cell->index(vi);
-        int j = cell->index(vj);
-        int k =  Triangulation_utils_3::next_around_edge(i,j);
-        int l =  Triangulation_utils_3::next_around_edge(j,i);
-
-        Vertex_handle vk = cell->vertex(k);
-        Vertex_handle vl = cell->vertex(l);
-
-        const Point& pk = vk->point();
-        const Point& pl = vl->point();
-
-        // if circumcenter is outside tet
-        // pick barycenter instead
-        if(tet.has_on_unbounded_side(c))
-        {
-          Point cell_points[4] = {pi,pj,pk,pl};
-          c = CGAL::centroid(cell_points, cell_points+4);
-        }
-
-        Point ck = CGAL::circumcenter(pi,pj,pk);
-        Point cl = CGAL::circumcenter(pi,pj,pl);
-
-        area += std::sqrt(squared_area(m,c,ck));
-        area += std::sqrt(squared_area(m,c,cl));
-      }
-      circ++;
-    }
-    while(circ != done);
-    return area;
-  }
-
-  /// Assemble vi's row of the linear system A*X=B
-  ///
-  /// @commentheading Template parameters:
-  /// @param SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
-  template <class SparseLinearAlgebraTraits_d>
-  void assemble_poisson_row(typename SparseLinearAlgebraTraits_d::Matrix& A,
-                            Vertex_handle vi,
-                            typename SparseLinearAlgebraTraits_d::Vector& B,
-                            double lambda)
-  {
-    // for each vertex vj neighbor of vi
-    std::vector<Edge> edges;
-    m_tr->incident_edges(vi,std::back_inserter(edges));
-
-    double diagonal = 0.0;
-
-    for(typename std::vector<Edge>::iterator it = edges.begin();
-        it != edges.end();
-        it++)
-      {
-        Vertex_handle vj = it->first->vertex(it->third);
-        if(vj == vi){
-          vj = it->first->vertex(it->second);
-        }
-        if(m_tr->is_infinite(vj))
-          continue;
-
-        // get corresponding edge
-        Edge edge( it->first, it->first->index(vi), it->first->index(vj));
-        if(vi->index() < vj->index()){
-          std::swap(edge.second,  edge.third);
-        }
-
-        double cij = cotan_geometric(edge);
-
-        if(m_tr->is_constrained(vj)){
-          if(! is_valid(vj->f())){
-            std::cerr << "vj->f() = " << vj->f() << " is not valid" << std::endl;
-          }
-          B[vi->index()] -= cij * vj->f(); // change rhs
-          if(! is_valid( B[vi->index()])){
-            std::cerr << " B[vi->index()] = " <<  B[vi->index()] << " is not valid" << std::endl;
-          }
-
-        } else {
-          if(! is_valid(cij)){
-            std::cerr << "cij = " << cij << " is not valid" << std::endl;
-          }
-          A.set_coef(vi->index(),vj->index(), -cij, true /*new*/); // off-diagonal coefficient
-        }
-
-        diagonal += cij;
-      }
-    // diagonal coefficient
-    if (vi->type() == Triangulation::INPUT){
-      A.set_coef(vi->index(),vi->index(), diagonal + lambda, true /*new*/) ;
-    } else{
-      A.set_coef(vi->index(),vi->index(), diagonal, true /*new*/);
-    }
-  }
-  
-
-  /// Computes enlarged geometric bounding sphere of the embedded triangulation.
-  Sphere enlarged_bounding_sphere(FT ratio) const
-  {
-    Sphere bsphere = bounding_sphere(); // triangulation's bounding sphere
-    return Sphere(bsphere.center(), bsphere.squared_radius() * ratio*ratio);
-  }
-
-}; // end of Poisson_reconstruction_function
-
-
-} //namespace CGAL
-
-#endif // CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_impl.h
deleted file mode 100644
index add348a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_impl.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Wieger Wesselink <wieger at cs.ruu.nl>
-
-//-----------------------------------------------------------------------//
-//                          operator==
-//-----------------------------------------------------------------------//
-
-namespace CGAL {
-
-namespace i_polygon {
-template <class Equal_2, class Point_2>
-class Equal_pred {
-    Equal_2 m_equal_2;
-    Point_2 m_pt;
-public:
-    Equal_pred(Equal_2 equal_2, Point_2 const &pt)
-    : m_equal_2(equal_2), m_pt(pt) {}
-    bool operator()(Point_2 const &pt) const
-    { return m_equal_2(m_pt, pt); }
-};
-}
-
-template <class Traits_P, class Container1_P, class Container2_P>
-bool operator==( const Polygon_2<Traits_P,Container1_P> &x,
-                 const Polygon_2<Traits_P,Container2_P> &y )
-{
-  if (&x == &y)
-    return true;
-  typedef typename Traits_P::Equal_2 Equal_2;
-  typedef typename Traits_P::Point_2 Point_2;
-//  CGAL_polygon_precondition( (x.size() != 0) || (y.size() != 0));
-  if ((x.size() == 0) && (y.size() == 0)) return true;
-
-  if (x.size() != y.size()) return false;
-  Equal_2 equal_2 = x.traits_member().equal_2_object();
-  typename Polygon_2<Traits_P,Container1_P>::Vertex_const_iterator x_iter =
-    x.vertices_begin();
-
-  typename Polygon_2<Traits_P,Container2_P>::Vertex_const_iterator y_iter =
-    std::find_if(y.vertices_begin(), y.vertices_end(),
-    i_polygon::Equal_pred<Equal_2, Point_2>(equal_2, *x.vertices_begin()));
-
-  // if y doesn't contain the first point of x ...
-  if (y_iter == y.vertices_end()) return false;
-
-  ++x_iter;
-  ++y_iter;
-
-  while (y_iter != y.vertices_end()) {
-    if (!equal_2(*x_iter, *y_iter)) return false;
-    ++x_iter;
-    ++y_iter;
-  }
-
-  y_iter = y.vertices_begin();
-  while (x_iter != x.vertices_end()) {
-    if (!equal_2(*x_iter, *y_iter)) return false;
-    ++x_iter;
-    ++y_iter;
-  }
-
-  return true;
-}
-
-//-----------------------------------------------------------------------//
-//                          operator>>
-//-----------------------------------------------------------------------//
-
-template <class Traits_P, class Container_P>
-std::istream &
-operator>>(std::istream &is, Polygon_2<Traits_P,Container_P>& p)
-{
-  int n = 0; // number of vertices
-  is >> n;
-  typename Traits_P::Point_2 point;
- 
-  if (is) {
-      p.erase(p.vertices_begin(),p.vertices_end());
-      for (int i=0; i<n; i++) {
-        is >> point;
-        p.push_back(point);
-      }
-  }
- 
-  return is;
-}
-
-//-----------------------------------------------------------------------//
-//                          operator<<
-//-----------------------------------------------------------------------//
-
-template <class Traits_P, class Container_P>
-std::ostream&
-operator<<(std::ostream &os, const Polygon_2<Traits_P,Container_P>& p)
-{
-  typename Polygon_2<Traits_P,Container_P>::Vertex_const_iterator i;
-
-  switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-      os << p.size() << ' ';
-      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
-        os << *i << ' ';
-      }
-      return os;
-
-    case IO::BINARY :
-      os << p.size();
-      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
-        os << *i;
-      }
-      return os;
-
-    default:
-      os << "Polygon_2(" << std::endl;
-      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
-        os << "  " << *i << std::endl;
-      }
-      os << ")" << std::endl;
-      return os;
-  }
-}
-
-//-----------------------------------------------------------------------//
-//                          transform
-//-----------------------------------------------------------------------//
-
-template <class Transformation, class Traits_P, class Container_P>
-Polygon_2<Traits_P,Container_P>
-transform(const Transformation& t, const Polygon_2<Traits_P,Container_P>& p)
-{
-  typedef typename Polygon_2<Traits_P,Container_P>::Vertex_const_iterator VI;
-  Polygon_2<Traits_P,Container_P> result;
-  for (VI i = p.vertices_begin(); i != p.vertices_end(); ++i)
-    result.push_back(t(*i));
-  return result;
-}
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2_algorithms.h b/3rdparty/CGAL-4.6/include/CGAL/Polygon_2_algorithms.h
deleted file mode 100644
index e715786..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2_algorithms.h
+++ /dev/null
@@ -1,465 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Wieger Wesselink <wieger at cs.ruu.nl>
-
-/*!
-  \file Polygon_2_algorithms.h
-*/
-
-#ifndef CGAL_POLYGON_2_ALGORITHMS_H
-#define CGAL_POLYGON_2_ALGORITHMS_H
-
-#include <CGAL/basic.h>
-#include <CGAL/enum.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Polygon_2/polygon_assertions.h>
-
-/// 
-namespace CGAL {
-
-//-----------------------------------------------------------------------//
-//                  algorithms for sequences of 2D points
-//-----------------------------------------------------------------------//
-
-
-/// \addtogroup PkgPolygon2Functions
-/// @{
-
-/// Returns an iterator to the leftmost point from the range
-/// `[first,last)`. In case of a tie, the point
-/// with the smallest `y`-coordinate is taken.
-///
-/// \cgalRequires `Traits` is a model of the concept `PolygonTraits_2`.
-/// 	  Only the members `Less_xy_2` and
-/// 	  `less_xy_2_object()` are used.
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`,
-///
-///
-/// \sa `CGAL::right_vertex_2()`
-/// \sa `CGAL::top_vertex_2()`
-/// \sa `CGAL::bottom_vertex_2()`
-/// \sa `CGAL::Polygon_2`
-template <class ForwardIterator, class PolygonTraits>
-ForwardIterator left_vertex_2(ForwardIterator first,
-			      ForwardIterator last,
-			      const PolygonTraits& traits);
-
-/// Returns an iterator to the rightmost point from the range
-/// `[first,last)`. In case of a tie, the point
-/// with the largest `y`-coordinate is taken.
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  In fact, only the members `Less_xy_2` and
-/// 	  `less_xy_2_object()` are used.
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`.
-/// 
-/// \sa `CGAL::left_vertex_2()`
-/// \sa `CGAL::top_vertex_2()`
-/// \sa `CGAL::bottom_vertex_2()`
-/// \sa `CGAL::Polygon_2`
-template <class ForwardIterator, class PolygonTraits>
-ForwardIterator right_vertex_2(ForwardIterator first,
-			       ForwardIterator last,
-			       const PolygonTraits& traits);
-
-/// Returns an iterator to the topmost point from the range
-/// `[first,last)`. In case of a tie, the point
-/// with the largest `x`-coordinate is taken.
-///
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the members `Less_yx_2` and
-/// 	  `less_yx_2_object()` are used.
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`.
-/// 
-/// \sa `CGAL::left_vertex_2()`
-/// \sa `CGAL::right_vertex_2()`
-/// \sa `CGAL::bottom_vertex_2()`
-/// \sa `CGAL::Polygon_2`
-template <class ForwardIterator, class PolygonTraits>
-ForwardIterator top_vertex_2(ForwardIterator first,
-			     ForwardIterator last,
-			     const PolygonTraits& traits);
-
-/// Returns an iterator to the bottommost point from the range
-/// `[first,last)`. In case of a tie, the point
-/// with the smallest `x`-coordinate is taken.
-///
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the members `Less_yx_2` and
-/// 	  `less_yx_2_object()` are used.
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`.
-/// 
-/// \sa `CGAL::left_vertex_2()`
-/// \sa `CGAL::right_vertex_2()`
-/// \sa `CGAL::top_vertex_2()`
-/// \sa `CGAL::Polygon_2`
-/// \sa `PolygonTraits_2`
-template <class ForwardIterator, class PolygonTraits>
-ForwardIterator bottom_vertex_2(ForwardIterator first,
-				ForwardIterator last,
-				const PolygonTraits& traits);
-
-/// Computes the signed area of the polygon defined by the range of points
-/// `[first,last)`. The area is returned in the parameter
-/// `result`. The sign is positive for counterclockwise polygons, negative for
-/// clockwise polygons. If the polygon is not simple, the area is not well defined.
-/// The functionality is also available by the `polygon_area_2()` function, which
-/// returns the area instead of taking it as a parameter.
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Compute_area_2` : Computes the signed area of the
-/// 	    oriented triangle defined by 3 `Point_2` passed as arguments.
-///   - `FT`
-///   - `compute_area_2_object()`
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`.
-/// 
-/// \sa `CGAL::polygon_area_2()`
-/// \sa `PolygonTraits_2`
-/// \sa `CGAL::orientation_2()`
-/// \sa `CGAL::Polygon_2`
-template <class ForwardIterator, class PolygonTraits>
-void 
-area_2( ForwardIterator first, ForwardIterator last,
-   	typename PolygonTraits::FT &result,
-        const PolygonTraits& traits)
-{
-  typedef typename PolygonTraits::FT FT;
-   result = FT(0);
-   // check if the polygon is empty
-   if (first == last) return;
-   ForwardIterator second = first; ++second;
-   // check if the polygon has only one point
-   if (second == last) return;
-   typename PolygonTraits::Compute_area_2 compute_area_2 =
-            traits.compute_area_2_object();
-   ForwardIterator third = second;
-   while (++third != last) {
-	result = result + compute_area_2(*first, *second, *third);
-	second = third;
-   }
-}
-
-/// Computes the signed area of the polygon defined by the range of points
-/// `[first,last)`.
-/// The sign is positive for counterclockwise polygons, negative for
-/// clockwise polygons. If the polygon is not simple, the area is not well defined.
-/// 
-/// \cgalRequires `Traits` is a model of the concept `PolygonTraits_2`. Only the following members of this traits class are used:
-///   - `Compute_area_2` : Computes the signed area of the
-/// 	    oriented triangle defined by 3 `Point_2` passed as arguments.
-///   - `FT`
-///   - `compute_area_2_object`
-/// \cgalRequires `ForwardIterator::value_type` should be `Traits::Point_2`,
-/// 
-/// 
-/// \sa `PolygonTraits_2 `
-/// \sa `CGAL::orientation_2()`
-/// \sa `CGAL::Polygon_2 `
-template <class ForwardIterator, class PolygonTraits>
-typename PolygonTraits::FT 
-polygon_area_2( ForwardIterator first, ForwardIterator last,
-		const PolygonTraits& traits)
-{
-   typedef typename PolygonTraits::FT FT;
-   FT result = FT(0);
-   // check if the polygon is empty
-   if (first == last) return result;
-   ForwardIterator second = first; ++second;
-   // check if the polygon has only one point
-   if (second == last) return result;
-   typename PolygonTraits::Compute_area_2 compute_area_2 =
-            traits.compute_area_2_object();
-   ForwardIterator third = second;
-   while (++third != last) {
-	result = result + compute_area_2(*first, *second, *third);
-	second = third;
-   }
-   return result;
-}
-
-/// Checks if the polygon is convex.
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Less_xy_2`
-///   - `Orientation_2`
-///   - `less_xy_2_object`
-///   - `orientation_2_object`
-/// \cgalRequires `ForwardIterator::value_type` should be `PolygonTraits::Point_2`,
-///
-/// \sa `PolygonTraits_2 `
-/// \sa `CGAL::Polygon_2 `
-template <class ForwardIterator, class PolygonTraits>
-bool is_convex_2(ForwardIterator first,
-		 ForwardIterator last,
-		 const PolygonTraits& traits);
-
-/// Checks if the polygon defined by the
-/// iterator range `[first,last)` is simple, that is, if the edges 
-/// do not intersect, except consecutive edges in their common vertex.
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Point_2`
-///   - `Less_xy_2`
-///   - `Orientation_2`
-///   - `less_xy_2_object()`
-///   - `orientation_2_object()`
-/// \cgalRequires The value type of `ForwardIterator` must be `PolygonTraits::Point_2`,
-/// 
-/// ### Implementation##
-/// 
-/// The simplicity test is implemented by means of a plane sweep algorithm.
-/// The algorithm is quite robust when used with inexact number types.
-/// The running time is `O(n log n)`, where n is the number of vertices of the
-/// polygon.
-/// 
-/// \sa `PolygonTraits_2`
-/// \sa `CGAL::Polygon_2`
-template <class ForwardIterator, class PolygonTraits>
-bool is_simple_2(ForwardIterator first,
-		 ForwardIterator last,
-		 const PolygonTraits& traits);
-
-// In the following two functions we would like to use Traits::Point_2
-// instead of Point, but this is not allowed by g++ 2.7.2.
-///
-/// Computes on which side of a polygon a point lies.
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Less_xy_2`
-///   - `Compare_x_2`
-///   - `Compare_y_2`
-///   - `Orientation_2`
-///   - `less_xy_2_object()`
-///   - `compare_x_2_object()`
-///   - `compare_y_2_object()`
-///   - `orientation_2_object()`
-/// \cgalRequires The value type of `ForwardIterator` must be `PolygonTraits::Point_2`,
-///
-/// \sa `PolygonTraits_2`
-/// \sa `CGAL::bounded_side_2()`
-/// \sa `CGAL::is_simple_2()`
-/// \sa `CGAL::Polygon_2`
-/// \sa `Oriented_side`
-template <class ForwardIterator, class Point, class Traits>
-Oriented_side oriented_side_2(ForwardIterator first,
-			      ForwardIterator last,
-			      const Point& point,
-			      const Traits& traits);
-
-/// Computes if a point lies inside a polygon.
-/// The polygon is defined by the sequence of points `[first,last)`.
-/// Being inside is defined by the odd-even rule. If we take a ray starting at the
-/// point and extending to infinity (in any direction), we count the number of
-/// intersections. If this number is odd, the point is inside, otherwise it is
-/// outside. If the point is on a polygon edge, a special value is returned.  A
-/// simple polygon divides the plane in an unbounded and a bounded region.
-/// According to the definition points in the bounded region are inside the polygon.
-/// 
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Compare_x_2`
-///   - `Compare_y_2`
-///   - `Orientation_2`
-///   - `compare_x_2_object()`
-///   - `compare_y_2_object()`
-///   - `orientation_2_object()`
-/// \cgalRequires The value type of  `ForwardIterator` must be `Traits::Point_2`,
-/// 
-/// ### Implementation ###
-/// 
-/// The running time is linear in the number of vertices of the polygon.
-/// A horizontal ray is taken to count the number of intersections.
-/// Special care is taken that the result is correct even if there are degeneracies
-/// (if the ray passes through a vertex).
-///
-/// 
-/// \sa `PolygonTraits_2`
-/// \sa `CGAL::oriented_side_2()`
-/// \sa `CGAL::Polygon_2 `
-/// \sa \ref CGAL::Bounded_side
-template <class ForwardIterator, class Point, class PolygonTraits>
-Bounded_side bounded_side_2(ForwardIterator first,
-			    ForwardIterator last,
-			    const Point& point,
-			    const PolygonTraits& traits);
-
-/// Computes if a polygon is clockwise or counterclockwise oriented.
-/// \pre `is_simple_2(first, last, traits);`
-/// 
-/// \cgalRequires `Traits` is a model of the concept 
-/// 	  `PolygonTraits_2`.
-/// 	  Only the following members of this traits class are used:
-///   - `Less_xy_2`
-///   - `less_xy_2_object()`
-///   - `orientation_2_object()`
-/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`,
-/// 
-/// 
-/// 
-/// \sa `PolygonTraits_2`
-/// \sa `CGAL::is_simple_2()`
-/// \sa `CGAL::Polygon_2`
-/// \sa `CGAL::Orientation`
-template <class ForwardIterator, class Traits>
-Orientation orientation_2(ForwardIterator first,
-			  ForwardIterator last,
-			  const Traits& traits);
-
-/// @}
-
-//-----------------------------------------------------------------------//
-//                         implementation
-//-----------------------------------------------------------------------//
-
-template <class ForwardIterator>
-inline
-ForwardIterator left_vertex_2(ForwardIterator first,
-			      ForwardIterator last)
-{  
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return left_vertex_2(first, last, K());
-}
-
-
-template <class ForwardIterator>
-inline
-ForwardIterator right_vertex_2(ForwardIterator first,
-			       ForwardIterator last)
-{ 
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return right_vertex_2(first, last, K());
-}
-
-
-template <class ForwardIterator>
-inline
-ForwardIterator top_vertex_2(ForwardIterator first,
-			     ForwardIterator last)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return top_vertex_2(first, last, K());
-}
-
-
-template <class ForwardIterator>
-inline
-ForwardIterator bottom_vertex_2(ForwardIterator first,
-				ForwardIterator last)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return bottom_vertex_2(first, last, K());
-}
-
-template <class ForwardIterator, class Numbertype>
-inline
-void area_2(ForwardIterator first,
-	    ForwardIterator last,
-	    Numbertype& result)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  area_2(first, last, result, K());
-}
-
-
-
-template <class ForwardIterator>
-inline
-bool is_convex_2(ForwardIterator first,
-		 ForwardIterator last)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return is_convex_2(first, last, K());
-}
-
-
-
-template <class ForwardIterator>
-inline
-bool is_simple_2(ForwardIterator first,
-		 ForwardIterator last)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return is_simple_2(first, last, K());
-}
-
-template <class ForwardIterator>
-inline
-Oriented_side oriented_side_2(
-  ForwardIterator first,
-  ForwardIterator last,
-  const typename std::iterator_traits<ForwardIterator>::value_type& point)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return oriented_side_2(first, last, point, K());
-}
-
-
-template <class ForwardIterator>
-inline
-Bounded_side bounded_side_2(
-  ForwardIterator first,
-  ForwardIterator last,
-  const typename std::iterator_traits<ForwardIterator>::value_type& point)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return bounded_side_2(first, last, point, K());
-}
-
-
-
-template <class ForwardIterator>
-inline
-Orientation orientation_2(ForwardIterator first,
-			  ForwardIterator last)
-{
-  typedef typename Kernel_traits<
-    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
-  return orientation_2(first, last, K());
-}
-
-} //namespace CGAL
-
-#include <CGAL/Polygon_2/Polygon_2_algorithms_impl.h>
-
-#endif // CGAL_POLYGON_2_ALGORITHMS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_convex_decomposition_2.h b/3rdparty/CGAL-4.6/include/CGAL/Polygon_convex_decomposition_2.h
deleted file mode 100644
index 57bdaf3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polygon_convex_decomposition_2.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_POLYGON_CONVEX_DECOMPOSITION_H
-#define CGAL_POLYGON_CONVEX_DECOMPOSITION_H
-
-#include <CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h>
-#include <vector>
-
-namespace CGAL {
-
-/*!
- * \class
- * The O(n^4) optimal strategy for decomposing a polygon into convex
- * sub-polygons.
- */
-template <class Kernel_, 
-          class Container_ = std::vector<typename Kernel_::Point_2> >
-class Optimal_convex_decomposition_2 :
-  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
-						Tag_optimal_convex_parition>
-{
-public:
-
-  typedef Kernel_                                  Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
-  typedef typename Kernel::Point_2                 Point_2;
-
-};
-
-/*!
- * \class
- * Hertel and Mehlhorn's O(n) approximation strategy for decomposing a
- * polygon into convex sub-polygons.
- */
-template <class Kernel_, 
-          class Container_ = std::vector<typename Kernel_::Point_2> >
-class Hertel_Mehlhorn_convex_decomposition_2 :
-  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
-						Tag_approx_convex_parition>
-{
-public:
-
-  typedef Kernel_                                  Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
-  typedef typename Kernel::Point_2                 Point_2;
-
-};
-
-/*!
- * \class
- * Greene's O(n log(n)) approximation strategy for decomposing a polygon into
- * convex sub-polygons.
- */
-template <class Kernel_, 
-          class Container_ = std::vector<typename Kernel_::Point_2> >
-class Greene_convex_decomposition_2 :
-  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
-						Tag_Greene_convex_parition>
-{
-public:
-
-  typedef Kernel_                                  Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
-  typedef typename Kernel::Point_2                 Point_2;
-
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/PolyhedralSurf_neighbors.h b/3rdparty/CGAL-4.6/include/CGAL/PolyhedralSurf_neighbors.h
deleted file mode 100644
index cd1bcfa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/PolyhedralSurf_neighbors.h
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Pouget and Frédéric Cazals
-#ifndef CGAL_POLYHEDRALSURF_NEIGHBORS_H_
-#define CGAL_POLYHEDRALSURF_NEIGHBORS_H_
-
-#include <queue>
-#include <algorithm>
-#include <list>
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-//---------------------------------------------------------------------------
-//T_Gate : element of the priority queue. A gate is a halfedge and a
-//number giving the max distance from v to the vertices of the
-//triangle incident to the halfedge.
-//---------------------------------------------------------------------------
-template < class TriangularPolyhedralSurface > class T_Gate
-{  
-public:
-  typedef typename TriangularPolyhedralSurface::Traits::FT       FT;
-  typedef typename TriangularPolyhedralSurface::Traits::Vector_3 Vector_3;
-  typedef typename TriangularPolyhedralSurface::Traits::Point_3  Point_3;
-  typedef typename TriangularPolyhedralSurface::Vertex_const_handle    Vertex_const_handle;
-  typedef typename TriangularPolyhedralSurface::Halfedge_const_handle  Halfedge_const_handle;
- 
-  T_Gate(const Vertex_const_handle v, const Halfedge_const_handle he);
-  FT& d() { return m_d;}
-  const FT d() const { return m_d;}            
-  const Halfedge_const_handle he() { return m_he;}
-
-private:
-  FT m_d;
-  Halfedge_const_handle m_he;
-};
-
-//////////////IMPLEMENTATION//////////////////////////
-template < class TriangularPolyhedralSurface > 
-T_Gate<TriangularPolyhedralSurface>::T_Gate(const Vertex_const_handle v, 
-					    const Halfedge_const_handle he)
-  : m_he(he)
-{
-  Point_3 p0 = v->point(),
-    p1 = he->vertex()->point(),
-    p2 = he->next()->vertex()->point(),
-    p3 = he->prev()->vertex()->point();
-  Vector_3 p0p1 = p0 - p1,
-    p0p2 = p0 - p2,
-    p0p3 = p0 - p3;
-  FT d1 = p0p1*p0p1,
-    d2 = p0p2*p0p2,
-    d3 = p0p3*p0p3;
-  m_d = CGAL::sqrt( (std::max)( (std::max)(d1,d2), d3) );
-}
-
-//---------------------------------------------------------------------------
-// functor for priority queue
-// order so that the top element is the smallest in the queue
-//---------------------------------------------------------------------------
-template<class g>
-struct compare_gates 
-{       
-        bool operator()(const g& g1, 
-                        const g& g2) const
-        {       
-                return g1.d() > g2.d();
-        }
-};
-
-//---------------------------------------------------------------------------
-//T_PolyhedralSurf_neighbors : MAIN class for computation, it uses the
-//class Gate and the functor compare_gates for the definition of a
-//priority queue
-//---------------------------------------------------------------------------
-template < class TriangularPolyhedralSurface > class T_PolyhedralSurf_neighbors
-{
-public:
-  typedef typename TriangularPolyhedralSurface::Traits::FT        FT;
-  typedef typename TriangularPolyhedralSurface::Traits::Vector_3  Vector_3;
-  typedef typename TriangularPolyhedralSurface::Traits::Point_3   Point_3;
-  typedef typename TriangularPolyhedralSurface::Vertex_const_handle     Vertex_const_handle;
-  typedef typename TriangularPolyhedralSurface::Halfedge_const_handle   Halfedge_const_handle;
-  typedef typename TriangularPolyhedralSurface::Halfedge_around_vertex_const_circulator
-  Halfedge_around_vertex_const_circulator;
-  typedef typename TriangularPolyhedralSurface::Vertex_const_iterator   Vertex_const_iterator;
-  typedef T_Gate<TriangularPolyhedralSurface> Gate;
-
-  T_PolyhedralSurf_neighbors(const TriangularPolyhedralSurface& P);
-  // vertex_neigh stores the vertex v and its 1Ring neighbors contour
-  // stores halfedges, oriented CW, following the 1Ring disk border
-  // OneRingSize is the max distance from v to its OneRing
-  // neighbors. (the tag is_visited is not mofified)
-  void compute_one_ring(const Vertex_const_handle v,
-			std::vector<Vertex_const_handle> &vertex_neigh,
-			std::list<Halfedge_const_handle> &contour,
-			FT &OneRingSize);
-  // call compute_one_ring and expand the contour (circle of halfedges
-  // CW), vertex_neigh are vertices on and inside the contour (there
-  // tag is_visited is set to true, but reset to false at the end),
-  // size is such that gates with distance less than size*OneRingSize
-  // are processed
-  void compute_neighbors(const Vertex_const_handle v,
-			 std::vector<Vertex_const_handle> &vertex_neigh,
-			 std::list<Halfedge_const_handle> &contour,
-			 const FT size); 
-  //vertex tags is_visited are set to false
-  void reset_is_visited_map(std::vector<Vertex_const_handle> &vces);
-
- protected:
-  //tag to visit vertices
-  struct Vertex_cmp{//comparison is wrt vertex addresses
-    bool operator()(const Vertex_const_handle a, const Vertex_const_handle b) const{
-      return &*a < &*b;
-    }
-  };
-  typedef std::map<Vertex_const_handle, bool, Vertex_cmp> Vertex2bool_map;
-  Vertex2bool_map is_visited_map;
-};
-
-//////////////IMPLEMENTATION//////////////////////////
-template < class TriangularPolyhedralSurface >
-T_PolyhedralSurf_neighbors < TriangularPolyhedralSurface >::
-T_PolyhedralSurf_neighbors(const TriangularPolyhedralSurface& P)
-{
-  //init the is_visited_map
-  Vertex_const_iterator itb = P.vertices_begin(), ite = P.vertices_end();
-  for(;itb!=ite;itb++) is_visited_map[itb] = false; 
-}
-
-template < class TriangularPolyhedralSurface >
-void T_PolyhedralSurf_neighbors < TriangularPolyhedralSurface >::
-compute_one_ring(const Vertex_const_handle v,
-		 std::vector<Vertex_const_handle> &vertex_neigh,
-		 std::list<Halfedge_const_handle> &contour,
-		 FT &OneRingSize)
-{
-  vertex_neigh.push_back(v);
-  Halfedge_around_vertex_const_circulator he_circ = v->vertex_begin(), 
-                                    he_end = he_circ;
-  do {
-      if ( he_circ->is_border() )//then he and he->next follow the contour CW
-	{contour.push_back(he_circ);
-	contour.push_back(he_circ->next());}
-      else contour.push_back(he_circ->prev()->opposite());//not border, he->prev->opp on contour CW
-      vertex_neigh.push_back(he_circ->opposite()->vertex());
-      he_circ++;
-  } while (he_circ != he_end);
-
-  //compute OneRingSize = distance(v, 1Ring)
-  OneRingSize = 0;
-  typename std::vector<Vertex_const_handle>::const_iterator itb = vertex_neigh.begin(),
-    ite = vertex_neigh.end();
-  itb++;//the first vertex v is the center to which distances are
-	//computed from, for other 1ring neighbors
-  Point_3 p0 = v->point(), p;
-  Vector_3 p0p;
-  FT d = OneRingSize;
-  for (; itb != ite; itb++){
-
-    p = (*itb)->point();
-    p0p = p0 - p;
-    d =  CGAL::sqrt(p0p*p0p);
-    if (d > OneRingSize) OneRingSize = d;
-  }
-}
-
-template < class TriangularPolyhedralSurface >
-void T_PolyhedralSurf_neighbors < TriangularPolyhedralSurface >::
-compute_neighbors(const Vertex_const_handle v,
-		  std::vector<Vertex_const_handle> &vertex_neigh,
-		  std::list<Halfedge_const_handle> &contour,
-		  const FT size)  
-{
-  FT OneRingSize;
-  compute_one_ring(v, vertex_neigh, contour, OneRingSize);
-  const FT d_max = OneRingSize*size;
-  std::priority_queue< Gate, std::vector< Gate >, compare_gates< Gate > > GatePQ;
-  // tag neighbors 
-  typename std::vector<Vertex_const_handle>::const_iterator itbv = vertex_neigh.begin(),
-    itev = vertex_neigh.end();
-  for (; itbv != itev; itbv++) is_visited_map.find(*itbv)->second = true;
-
-  // init GatePQ
-  typename std::list<Halfedge_const_handle>::const_iterator itb = contour.begin(),
-                                       ite = contour.end();
-  for (; itb != ite; itb++) {
-    if (!( (*itb)->is_border() )) GatePQ.push(Gate(v, *itb));
-  }
-  // init d_current
-  Gate firstGate = GatePQ.top();
-  FT d_current = firstGate.d();
-  // main loop
-  while ( !GatePQ.empty() && d_current <= d_max ) {
-    Gate gate = GatePQ.top();
-    GatePQ.pop();
-    d_current = gate.d();
-    Halfedge_const_handle he = gate.he(), he1, he2;
-    Vertex_const_handle v1;
-    // find the gate on the contour
-    typename std::list<Halfedge_const_handle>::iterator pos_he, pos_prev, pos_next, iter;
-   
-    pos_he = find(contour.begin(), contour.end(), he);
-    iter = pos_he;
-    /**
-       there are different cases to expand the contour : 
-       (case 3) he is not on the contour, nothing to do
-       (case 2) he is on the contour and either the previous or the next 
-       following edge in the triangle is also on the contour, then delete
-       these 2 he from the contour and add the third one to the contour 
-       and the PQ.
-       (case1) the vertex opposite to he is not visited, then the he is removed
-       from the contour, the two others are added to the contour and PQ, the 
-       vertex is set visited.
-    */
-
-    // if the gate is not encountered on the contour (case 3)
-    if ( pos_he == contour.end() ) continue;
-    // simulate a circulator on the contour: 
-    // find the prev and next pos on coutour
-    if ( ite != (++iter) ) pos_next = iter;
-    else pos_next = contour.begin();
-    iter = pos_he;
-    if ( iter != contour.begin() ) pos_prev = --iter;
-    else pos_prev = --contour.end();
-
-    if ( he->next() == *pos_next )
-      {  // case 2a
-	//contour
-	he1 = he->prev()->opposite();
-	contour.insert(pos_he, he1);
-	contour.erase(pos_he);
-	contour.erase(pos_next);
-	//GatePQ
-	if ( !(he1->is_border()) ) GatePQ.push(Gate(v, he1));
-	continue;
-      }
-    else if ( he->prev() == *pos_prev )
-      {  // case 2b
-	//contour
-	he1 = he->next()->opposite();
-	contour.insert(pos_prev, he1);
-	contour.erase(pos_prev);
-	contour.erase(pos_he);
-	//GatePQ
-	if ( !(he1->is_border()) ) GatePQ.push(Gate(v, he1));
-	continue;
-      }
-    v1 = he->next()->vertex();
-    if ( !is_visited_map.find(v1)->second )
-      {  // case 1
-	//vertex
-	is_visited_map.find(v1)->second = true;
-	vertex_neigh.push_back(v1);
-	//contour
-	he1 = he->prev()->opposite();
-	he2 = he->next()->opposite();
-	contour.insert(pos_he, he1);
-	contour.insert(pos_he, he2);
-	contour.erase(pos_he);
-	//GatePQ
-	if ( !(he1->is_border()) ) GatePQ.push(Gate(v, he1));
-	if ( !(he2->is_border()) ) GatePQ.push(Gate(v, he2));
-	continue;
-      }
-    //else do nothing (keep the he on the contour, and continue) to
-    //prevent a change of the topology.
-  }// end while
-  
-  reset_is_visited_map(vertex_neigh);
-}
-
-template < class TriangularPolyhedralSurface >
-void T_PolyhedralSurf_neighbors < TriangularPolyhedralSurface >::
-reset_is_visited_map(std::vector<Vertex_const_handle> &vces)
-{
-  typename std::vector<Vertex_const_handle>::const_iterator 
-    itb = vces.begin(), ite = vces.end();
-  for (;itb != ite; itb++) is_visited_map[*itb] = false;
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_3.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_3.h
deleted file mode 100644
index 4ffb5a6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_3.h
+++ /dev/null
@@ -1,791 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// Copyright (c) 2011 GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-//
-//******************************************************************************
-
-#ifndef CGAL_POLYHEDRAL_MESH_DOMAIN_3_H
-#define CGAL_POLYHEDRAL_MESH_DOMAIN_3_H
-
-#include <CGAL/internal/Operations_on_polyhedra/Point_inside_vertical_ray_cast.h>
-
-#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
-#include <CGAL/Mesh_3/Triangle_accessor_primitive.h>
-#include <CGAL/Triangle_accessor_3.h>
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <sstream>
-
-#include <CGAL/Random.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
-#include <CGAL/Mesh_3/Profile_counter.h>
-
-#include <boost/optional.hpp>
-#include <boost/none.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/contains.hpp>
-#include <CGAL/tuple.h>
-#include <boost/format.hpp>
-#include <boost/variant.hpp>
-#include <boost/math/special_functions/round.hpp>
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/enumerable_thread_specific.h>
-#endif
-
-namespace CGAL {
-
-namespace Mesh_3 {
-
-namespace details {
-
-inline
-double
-max_length(const Bbox_3& b)
-{
-  return (std::max)(b.xmax()-b.xmin(),
-                    (std::max)(b.ymax()-b.ymin(),b.zmax()-b.zmin()) );
-}
-
-
-// -----------------------------------
-// Surface_patch_index_generator
-// To use patch_id enclosed in AABB_primitives or not
-// -----------------------------------
-template < typename Subdomain_index, typename Polyhedron, typename Tag >
-struct Surface_patch_index_generator
-{
-  typedef std::pair<Subdomain_index,Subdomain_index>  Surface_patch_index;
-  typedef Surface_patch_index                         type;
-
-  template < typename Primitive_id >
-  Surface_patch_index operator()(const Primitive_id&)
-  { return Surface_patch_index(0,1); }
-};
-
-template < typename Subdomain_index, typename Polyhedron >
-struct Surface_patch_index_generator<Subdomain_index, Polyhedron, CGAL::Tag_true>
-{
-  typedef typename Polyhedron::Face::Patch_id Surface_patch_index;
-  typedef Surface_patch_index   type;
-
-  template < typename Primitive_id >
-  Surface_patch_index operator()(const Primitive_id& primitive_id)
-  { return primitive_id->patch_id(); }
-};
-
-
-// -----------------------------------
-// Index_generator
-// Don't use boost::variant if types are the same type
-// -----------------------------------
-template < typename Subdomain_index, typename Surface_patch_index >
-struct Index_generator
-{
-  typedef boost::variant<Subdomain_index,Surface_patch_index> Index;
-  typedef Index                                         type;
-};
-
-template < typename T >
-struct Index_generator<T, T>
-{
-  typedef T       Index;
-  typedef Index   type;
-};
-
-// -----------------------------------
-// Geometric traits generator
-// -----------------------------------
-template < typename Gt,
-           typename Use_exact_intersection_construction_tag >
-struct IGT_generator {};
-
-template < typename Gt >
-struct IGT_generator<Gt,CGAL::Tag_true>
-{
-#ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-  typedef CGAL::Mesh_3::Robust_intersection_traits_3_new<Gt> type;
-#else // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-  typedef CGAL::Mesh_3::Robust_intersection_traits_3<Gt> type;
-#endif // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
-  typedef type Type;
-};
-
-template < typename Gt >
-struct IGT_generator<Gt,CGAL::Tag_false>
-{
-  typedef Gt type;
-  typedef type Type;
-};
-
-}  // end namespace details
-
-}  // end namespace Mesh_3
-
-
-/**
- * @class Polyhedral_mesh_domain_3
- *
- *
- */
-template<class Polyhedron,
-         class IGT_,
-         class TriangleAccessor=Triangle_accessor_3<Polyhedron,IGT_>,
-         class Use_patch_id_tag=Tag_false,
-         class Use_exact_intersection_construction_tag = CGAL::Tag_true>
-class Polyhedral_mesh_domain_3
-{
-  typedef typename Mesh_3::details::IGT_generator<
-    IGT_,Use_exact_intersection_construction_tag>::type IGT;
-
-public:
-  /// Geometric object types
-  typedef typename IGT::Point_3    Point_3;
-  typedef typename IGT::Segment_3  Segment_3;
-  typedef typename IGT::Ray_3      Ray_3;
-  typedef typename IGT::Line_3     Line_3;
-  typedef typename IGT::Vector_3   Vector_3;
-  typedef typename IGT::Sphere_3   Sphere_3;
-
-  //-------------------------------------------------------
-  // Index Types
-  //-------------------------------------------------------
-  /// Type of indexes for cells of the input complex
-  typedef int Subdomain_index;
-  typedef boost::optional<Subdomain_index> Subdomain;
-  /// Type of indexes for surface patch of the input complex
-  typedef typename Mesh_3::details::Surface_patch_index_generator<
-    Subdomain_index,Polyhedron,Use_patch_id_tag>::type    Surface_patch_index;
-  typedef boost::optional<Surface_patch_index>            Surface_patch;
-  /// Type of indexes to characterize the lowest dimensional face of the input
-  /// complex on which a vertex lie
-  typedef typename Mesh_3::details::Index_generator<
-    Subdomain_index, Surface_patch_index>::type           Index;
-
-  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
-
-
-  typedef typename IGT::FT         FT;
-
-  // Kernel_traits compatibility
-  typedef IGT R;
-
-private:
-  typedef Mesh_3::Triangle_accessor_primitive<
-    TriangleAccessor, IGT>                              AABB_primitive;
-  typedef class AABB_traits<IGT,AABB_primitive>         AABB_traits;
-  typedef class AABB_tree<AABB_traits>                  AABB_tree_;
-private:
-  typedef typename AABB_tree_::Primitive_id              AABB_primitive_id;
-  typedef typename AABB_tree_::Primitive Primitive;
-  typedef typename AABB_traits::Bounding_box            Bounding_box;
-
-public:
-
-  /// Default constructor
-  Polyhedral_mesh_domain_3()
-    : tree_()
-    , bounding_tree_(&tree_)
-    , p_rng_(NULL)
-    , delete_rng_(true)
-  {
-    p_rng_ = new CGAL::Random(0);
-  }
-
-  /**
-   * @brief Constructor. Contruction from a polyhedral surface
-   * @param polyhedron the polyhedron describing the polyhedral surface
-   */
-  Polyhedral_mesh_domain_3(const Polyhedron& p,
-                           CGAL::Random* p_rng = NULL)
-    : tree_(TriangleAccessor().triangles_begin(p),
-            TriangleAccessor().triangles_end(p))
-    , bounding_tree_(&tree_) // the bounding tree is tree_
-    , p_rng_(p_rng)
-    , delete_rng_(false)
-  {
-    if(!p.is_pure_triangle()) {
-      std::cerr << "Your input polyhedron must be triangulated!\n";
-      CGAL_error_msg("Your input polyhedron must be triangulated!");
-    }
-    if(!p_rng_)
-    {
-      p_rng_ = new CGAL::Random(0);
-      delete_rng_ = true;
-    }
-  }
-
-  Polyhedral_mesh_domain_3(const Polyhedron& p,
-                           const Polyhedron& bounding_polyhedron,
-                           CGAL::Random* p_rng = NULL)
-    : tree_(TriangleAccessor().triangles_begin(p),
-            TriangleAccessor().triangles_end(p))
-    , bounding_tree_(new AABB_tree_(TriangleAccessor().triangles_begin(bounding_polyhedron),
-                                    TriangleAccessor().triangles_end(bounding_polyhedron)))
-    , p_rng_(p_rng)
-    , delete_rng_(false)
-  {
-    tree_.insert(TriangleAccessor().triangles_begin(bounding_polyhedron),
-                 TriangleAccessor().triangles_end(bounding_polyhedron));
-    tree_.build();
-    bounding_tree_->build();
-    if(!p_rng_)
-    {
-      p_rng_ = new CGAL::Random(0);
-      delete_rng_ = true;
-    }
-  }
-
-  /**
-   * Constructor.
-   *
-   * Constructor from a sequence of polyhedral surfaces, and a bounding
-   * polyhedral surface.
-   *
-   * @param InputPolyhedraPtrIterator must an iterator of a sequence of
-   * pointers to polyhedra
-   *
-   * @param bounding_polyhedron reference to the bounding surface
-   */
-  template <typename InputPolyhedraPtrIterator>
-  Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
-                           InputPolyhedraPtrIterator end,
-                           const Polyhedron& bounding_polyhedron,
-                           CGAL::Random* p_rng = NULL)
-    : p_rng_(p_rng)
-    , delete_rng_(false)
-  {
-    if(begin != end) {
-      for(; begin != end; ++begin) {
-        tree_.insert(TriangleAccessor().triangles_begin(**begin),
-                     TriangleAccessor().triangles_end(**begin));
-      }
-      tree_.insert(TriangleAccessor().triangles_begin(bounding_polyhedron),
-                   TriangleAccessor().triangles_end(bounding_polyhedron));
-      tree_.build();
-      bounding_tree_ =
-        new AABB_tree_(TriangleAccessor().triangles_begin(bounding_polyhedron),
-                       TriangleAccessor().triangles_end(bounding_polyhedron));
-      bounding_tree_->build();
-    }
-    else {
-      tree_.rebuild(TriangleAccessor().triangles_begin(bounding_polyhedron),
-                    TriangleAccessor().triangles_end(bounding_polyhedron));
-      bounding_tree_ = &tree_;
-    }
-    if(!p_rng_)
-    {
-      p_rng_ = new CGAL::Random(0);
-      delete_rng_ = true;
-    }
-  }
-
-  /**
-   * Constructor.
-   *
-   * Constructor from a sequence of polyhedral surfaces, without bounding
-   * surface. The domain will always answer false to "is_in_domain"
-   * queries.
-   *
-   * @param InputPolyhedraPtrIterator must an iterator of a sequence of
-   * pointers to polyhedra
-   */
-  template <typename InputPolyhedraPtrIterator>
-  Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
-                           InputPolyhedraPtrIterator end,
-                           CGAL::Random* p_rng = NULL)
-    : p_rng_(p_rng)
-    , delete_rng_(false)
-  {
-    if(begin != end) {
-      for(; begin != end; ++begin) {
-        tree_.insert(TriangleAccessor().triangles_begin(**begin),
-                     TriangleAccessor().triangles_end(**begin));
-      }
-      tree_.build();
-    }
-    bounding_tree_ = 0;
-    if(!p_rng_)
-    {
-      p_rng_ = new CGAL::Random(0);
-      delete_rng_ = true;
-    }
-  }
-
-  /// Destructor
-  ~Polyhedral_mesh_domain_3() {
-    if(bounding_tree_ != 0 && bounding_tree_ != &tree_) {
-      delete bounding_tree_;
-    }
-    if(delete_rng_)
-      delete p_rng_;
-  }
-
-  /**
-   * Constructs  a set of \ccc{n} points on the surface, and output them to
-   *  the output iterator \ccc{pts} whose value type is required to be
-   *  \ccc{std::pair<Points_3, Index>}.
-   */
-  struct Construct_initial_points
-  {
-    Construct_initial_points(const Polyhedral_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    template<class OutputIterator>
-    OutputIterator operator()(OutputIterator pts, const int n = 8) const;
-
-  private:
-    const Polyhedral_mesh_domain_3& r_domain_;
-  };
-
-  Construct_initial_points construct_initial_points_object() const
-  {
-    return Construct_initial_points(*this);
-  }
-
-
-  /**
-   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
-   *  domain, the parameter index is set to the index of the subdomain
-   *  including $p$. It is set to the default value otherwise.
-   */
-  struct Is_in_domain
-  {
-    Is_in_domain(const Polyhedral_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    Subdomain operator()(const Point_3& p) const;
-  private:
-    const Polyhedral_mesh_domain_3& r_domain_;
-  };
-
-  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
-
-  Point_3 project_on_surface(const Point_3& p) const
-  {
-    return tree_.closest_point(p);
-  }
-
-  /// Allowed query types
-  typedef boost::mpl::vector<Segment_3, Ray_3, Line_3> Allowed_query_types;
-
-  /**
-   * Returns true is the element \ccc{type} intersect properly any of the
-   * surface patches describing the either the domain boundary or some
-   * subdomain boundary.
-   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * Parameter index is set to the index of the intersected surface patch
-   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
-   * value otherwise.
-   */
-  struct Do_intersect_surface
-  {
-    Do_intersect_surface(const Polyhedral_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    template <typename Query>
-    typename boost::enable_if<typename boost::mpl::contains<Allowed_query_types,
-                                                            Query>::type,
-                              Surface_patch>::type
-    operator()(const Query& q) const
-    {
-      CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION));
-
-      boost::optional<AABB_primitive_id> primitive_id = r_domain_.tree_.any_intersected_primitive(q);
-      if ( primitive_id )
-      {
-        r_domain_.cache_primitive(q, *primitive_id);
-        return Surface_patch(r_domain_.make_surface_index(*primitive_id));
-      } else {
-        return Surface_patch();
-      }
-    }
-
-  private:
-    const Polyhedral_mesh_domain_3& r_domain_;
-  };
-
-  Do_intersect_surface do_intersect_surface_object() const
-  {
-    return Do_intersect_surface(*this);
-  }
-
-  /**
-   * Returns a point in the intersection of the primitive \ccc{type}
-   * with some boundary surface.
-   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
-   * The integer \ccc{dimension} is set to the dimension of the lowest
-   * dimensional face in the input complex containing the returned point, and
-   * \ccc{index} is set to the index to be stored at a mesh vertex lying
-   * on this face.
-   */
-  struct Construct_intersection
-  {
-    Construct_intersection(const Polyhedral_mesh_domain_3& domain)
-      : r_domain_(domain) {}
-
-    template <typename Query>
-    typename boost::enable_if<typename boost::mpl::contains<Allowed_query_types,
-                                                            Query>::type,
-                              Intersection>::type
-    operator()(const Query& q) const
-    {
-      CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION));
-      typedef typename AABB_tree_::template Intersection_and_primitive_id<Query>::Type
-        Intersection_and_primitive_id;
-      typedef boost::optional<Intersection_and_primitive_id> AABB_intersection;
-      typedef Point_3 Bare_point;
-
-      AABB_intersection intersection;
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      if(r_domain_.query_is_cached(q))
-      {
-        const AABB_primitive_id primitive_id = r_domain_.cached_primitive_id();
-        typename cpp11::result_of<
-          typename IGT::Intersect_3(typename Primitive::Datum, Query)>::type o
-            = IGT().intersect_3_object()(Primitive(primitive_id).datum(),q);
-        intersection = o ?
-          Intersection_and_primitive_id(*o, primitive_id) :
-          AABB_intersection();
-      } else
-#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-      {
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-        CGAL_precondition(r_domain_.do_intersect_surface_object()(q));
-#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-
-        intersection = r_domain_.tree_.any_intersection(q);
-      }
-      if ( intersection )
-      {
-        // Get primitive
-        AABB_primitive_id primitive_id = intersection->second;
-
-        // intersection may be either a point or a segment
-#if CGAL_INTERSECTION_VERSION > 1
-        if ( const Bare_point* p_intersect_pt =
-             boost::get<Bare_point>( &(intersection->first) ) )
-#else
-        if ( const Bare_point* p_intersect_pt =
-             object_cast<Bare_point>( &(intersection->first) ) )
-#endif
-        {
-          return Intersection(*p_intersect_pt,
-                              r_domain_.index_from_surface_patch_index(
-                                r_domain_.make_surface_index(primitive_id)),
-                              2);
-        }
-#if CGAL_INTERSECTION_VERSION > 1
-        else if ( const Segment_3* p_intersect_seg =
-                  boost::get<Segment_3>(&(intersection->first)))
-#else
-        else if ( const Segment_3* p_intersect_seg =
-                  object_cast<Segment_3>(&(intersection->first)))
-#endif
-        {
-          CGAL_MESH_3_PROFILER("Mesh_3 profiler: Intersection is a segment");
-
-          return Intersection(p_intersect_seg->source(),
-                              r_domain_.index_from_surface_patch_index(
-                                r_domain_.make_surface_index(primitive_id)),
-                              2);
-        }
-        else {
-#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-          std::stringstream stream;
-          stream.precision(17);
-          set_pretty_mode(stream);
-          stream <<
-            "Mesh_3 error : AABB_tree any_intersection result is "
-            "not a point nor a segment\n";
-          if(intersection->first.empty()) {
-            stream <<  "The intersection is empty!";
-          } else {
-            stream <<  "The intersection typeinfo name is ";
-            stream <<  intersection->first.type().name();
-          }
-          stream << "\nThe query was: ";
-          stream << q << std::endl;
-          stream << "The intersecting primitive in the AABB tree was: "
-                 << AABB_primitive(intersection->second).datum() << std::endl;
-          CGAL_error_msg(stream.str().c_str());
-#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-        }
-      }
-
-      // Should not happen
-      // unless CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 is defined
-      return Intersection();
-    }
-
-  private:
-    const Polyhedral_mesh_domain_3& r_domain_;
-  };
-
-  Construct_intersection construct_intersection_object() const
-  {
-    return Construct_intersection(*this);
-  }
-
-
-  /**
-   * Returns the index to be stored in a vertex lying on the surface identified
-   * by \c index.
-   */
-  Index index_from_surface_patch_index(const Surface_patch_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the index to be stored in a vertex lying in the subdomain
-   * identified by \c index.
-   */
-  Index index_from_subdomain_index(const Subdomain_index& index) const
-  { return Index(index); }
-
-  /**
-   * Returns the \c Surface_patch_index of the surface patch
-   * where lies a vertex with dimension 2 and index \c index.
-   */
-  Surface_patch_index surface_patch_index(const Index& index) const
-  { return boost::get<Surface_patch_index>(index); }
-
-  /**
-   * Returns the index of the subdomain containing a vertex
-   *  with dimension 3 and index \c index.
-   */
-  Subdomain_index subdomain_index(const Index& index) const
-  { return boost::get<Subdomain_index>(index); }
-
-  // -----------------------------------
-  // Backward Compatibility
-  // -----------------------------------
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index   Surface_index;
-
-  Index index_from_surface_index(const Surface_index& index) const
-  { return index_from_surface_patch_index(index); }
-
-  Surface_index surface_index(const Index& index) const
-  { return surface_patch_index(index); }
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  // -----------------------------------
-  // End backward Compatibility
-  // -----------------------------------
-
-public:
-  Surface_patch_index make_surface_index(
-    const AABB_primitive_id& primitive_id = AABB_primitive_id() ) const
-  {
-    Mesh_3::details::Surface_patch_index_generator<Subdomain_index,
-                                                   Polyhedron,
-                                                   Use_patch_id_tag> generator;
-
-    return generator(primitive_id);
-  }
-
-  // Undocumented function, used to implement a sizing field that
-  // computes lfs using this AABB tree. That avoids to rebuild the same
-  // tree.
-  typedef AABB_tree_ AABB_tree;
-  const AABB_tree& aabb_tree() const {
-    return tree_;
-  }
-
-protected:
-  void add_primitives(const Polyhedron& p)
-  {
-    tree_.insert(TriangleAccessor().triangles_begin(p),
-                 TriangleAccessor().triangles_end(p));
-
-    tree_.build();
-  }
-
-private:
-  /// The AABB tree: intersection detection and more
-  AABB_tree_ tree_;
-
-  AABB_tree_* bounding_tree_;
-
-  // cache queries and intersected primitive
-  typedef typename boost::make_variant_over<Allowed_query_types>::type Cached_query;
-  struct Query_cache
-  {
-    Query_cache() : has_cache(false) {}
-    bool has_cache;
-    Cached_query cached_query;
-    AABB_primitive_id cached_primitive_id;
-  };
-#ifdef CGAL_LINKED_WITH_TBB
-  mutable tbb::enumerable_thread_specific<Query_cache> query_cache;
-#else
-  mutable Query_cache query_cache;
-#endif
-
-  //random number generator for Construct_initial_points
-  CGAL::Random* p_rng_;
-  bool delete_rng_;
-
-public:
-
-  template <typename Query>
-  void cache_primitive(const Query& q,
-                       const AABB_primitive_id id) const
-  {
-#ifdef CGAL_LINKED_WITH_TBB
-    Query_cache &qc = query_cache.local();
-    qc.cached_query = Cached_query(q);
-    qc.has_cache = true;
-    qc.cached_primitive_id = id;
-#else
-    query_cache.cached_query = Cached_query(q);
-    query_cache.has_cache = true;
-    query_cache.cached_primitive_id = id;
-#endif
-  }
-
-  template <typename Query>
-  bool query_is_cached(const Query& q) const {
-#ifdef CGAL_LINKED_WITH_TBB
-    Query_cache &qc = query_cache.local();
-    return qc.has_cache && (qc.cached_query == Cached_query(q));
-#else
-    return query_cache.has_cache 
-      && (query_cache.cached_query == Cached_query(q));
-#endif
-  }
-
-  AABB_primitive_id cached_primitive_id() const {
-#ifdef CGAL_LINKED_WITH_TBB
-    return query_cache.local().cached_primitive_id;
-#else
-    return query_cache.cached_primitive_id;
-#endif
-  }
-
-  void set_random_generator(CGAL::Random* p_rng)
-  {
-    if(delete_rng_) delete p_rng_;
-    if(!p_rng)
-    {
-      p_rng_ = new CGAL::Random(0);
-      delete_rng_ = true;
-    }
-    else {
-      p_rng_ = p_rng;
-      delete_rng_ = false;
-    }
-  }
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Polyhedral_mesh_domain_3 Self;
-  Polyhedral_mesh_domain_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Polyhedral_mesh_domain_3
-
-
-
-
-
-template<typename P_, typename IGT_, typename TA,
-         typename Tag, typename E_tag_>
-template<class OutputIterator>
-OutputIterator
-Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::
-Construct_initial_points::operator()(OutputIterator pts,
-                                     const int n) const
-{
-  typename IGT::Construct_ray_3 ray = IGT().construct_ray_3_object();
-  typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object();
-
-  const Bounding_box bbox = r_domain_.tree_.bbox();
-  const Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2),
-                        FT( (bbox.ymin() + bbox.ymax()) / 2),
-                        FT( (bbox.zmin() + bbox.zmax()) / 2) );
-
-  CGAL::Random& rng = *(r_domain_.p_rng_);
-  Random_points_on_sphere_3<Point_3> random_point(1., rng);
-
-  int i = n;
-# ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << "construct initial points:" << std::endl;
-# endif
-  // Point construction by ray shooting from the center of the enclosing bbox
-  while ( i > 0 )
-  {
-    const Ray_3 ray_shot = ray(center, vector(CGAL::ORIGIN,*random_point));
-
-#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
-    Intersection intersection = r_domain_.construct_intersection_object()(ray_shot);
-    if(CGAL::cpp0x::get<2>(intersection) != 0) {
-#else
-    if(r_domain_.do_intersect_surface_object()(ray_shot)) {
-      Intersection intersection = r_domain_.construct_intersection_object()(ray_shot);
-#endif
-      *pts++ = std::make_pair(CGAL::cpp0x::get<0>(intersection),
-                              CGAL::cpp0x::get<1>(intersection));
-
-      --i;
-
-#ifdef CGAL_MESH_3_VERBOSE
-      std::cerr << boost::format("\r             \r"
-                                 "%1%/%2% initial point(s) found...")
-        % (n - i)
-        % n;
-# endif
-    }
-    ++random_point;
-  }
-
-#ifdef CGAL_MESH_3_VERBOSE
-  std::cerr << std::endl;
-#endif
-  return pts;
-}
-
-
-template<typename P_, typename IGT_, typename TA,
-         typename Tag, typename E_tag_>
-typename Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::Subdomain
-Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::
-Is_in_domain::operator()(const Point_3& p) const
-{
-  if(r_domain_.bounding_tree_ == 0) return Subdomain();
-
-  internal::Point_inside_vertical_ray_cast<IGT_, AABB_tree_> inside_functor;
-  Bounded_side side = inside_functor(p, *(r_domain_.bounding_tree_));
-
-  if(side == CGAL::ON_UNBOUNDED_SIDE) { return Subdomain(); }
-  else { return Subdomain(Subdomain_index(1)); } // case ON_BOUNDARY && ON_BOUNDED_SIDE
-}
-
-
-
-
-}  // end namespace CGAL
-
-
-#endif // POLYHEDRAL_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
deleted file mode 100644
index 04ed165..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description :
-//
-//******************************************************************************
-
-#ifndef CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
-#define CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
-
-#include <CGAL/Mesh_3/config.h>
-
-#include <CGAL/Random.h>
-#include <CGAL/Polyhedral_mesh_domain_3.h>
-#include <CGAL/Mesh_domain_with_polyline_features_3.h>
-#include <CGAL/Mesh_polyhedron_3.h>
-
-#include <CGAL/Mesh_3/Detect_polylines_in_polyhedra.h>
-#include <CGAL/Mesh_3/Polyline_with_context.h>
-#include <CGAL/Mesh_3/Detect_features_in_polyhedra.h>
-
-#include <CGAL/enum.h>
-#include <CGAL/IO/Polyhedron_iostream.h>
-
-#include <boost/iterator/transform_iterator.hpp>
-
-#include <string>
-#include <vector>
-#include <fstream>
-
-
-namespace CGAL {
-
-/**
- * @class Polyhedral_mesh_domain_with_features_3
- *
- *
- */
-template < class IGT_,
-           class Polyhedron_ = typename Mesh_polyhedron_3<IGT_>::type,
-           class TriangleAccessor=Triangle_accessor_3<Polyhedron_,IGT_>,
-           class Use_patch_id_tag = Tag_true,
-           class Use_exact_intersection_construction_tag = Tag_true >
-class Polyhedral_mesh_domain_with_features_3
-  : public Mesh_domain_with_polyline_features_3<
-      Polyhedral_mesh_domain_3< Polyhedron_,
-                                IGT_,
-                                TriangleAccessor,
-                                Use_patch_id_tag,
-                                Use_exact_intersection_construction_tag > >
-{
-  typedef Mesh_domain_with_polyline_features_3<
-    Polyhedral_mesh_domain_3<
-      Polyhedron_, IGT_, TriangleAccessor,
-      Use_patch_id_tag, Use_exact_intersection_construction_tag > > Base;
-
- public:
-  typedef Polyhedron_ Polyhedron;
-  
-public:
-  // Index types
-  typedef typename Base::Index                Index;
-  typedef typename Base::Corner_index         Corner_index;
-  typedef typename Base::Curve_segment_index  Curve_segment_index;
-  typedef typename Base::Surface_patch_index  Surface_patch_index;
-  typedef typename Base::Subdomain_index      Subdomain_index;
-  
-  // Backward compatibility
-#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-  typedef Surface_patch_index                 Surface_index;
-#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
-
-  typedef typename Base::R         R;
-  typedef typename Base::Point_3   Point_3;
-  typedef typename Base::FT        FT;
-  
-  typedef CGAL::Tag_true           Has_features;
-
-  /// Constructors
-  Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
-    CGAL::Random* p_rng = NULL);
-  Polyhedral_mesh_domain_with_features_3(const std::string& filename,
-    CGAL::Random* p_rng = NULL);
-
-  // The following is needed, because otherwise, when a "const char*" is
-  // passed, the constructors templates are a better match, than the
-  // constructor with `std::string`.
-  Polyhedral_mesh_domain_with_features_3(const char* filename,
-    CGAL::Random* p_rng = NULL);
-
-  template <typename T1, typename T2>
-  Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b,
-                                         CGAL::Random* p_rng = NULL)
-    : Base(a, b)
-  { this->set_random_generator(p_rng); }
-
-
-  template <typename T1, typename T2, typename T3>
-  Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b, const T3& c,
-                                         CGAL::Random* p_rng = NULL)
-    : Base(a, b, c)
-  { this->set_random_generator(p_rng); }
-
-  /// Destructor
-  ~Polyhedral_mesh_domain_with_features_3() {}
-
-  /// Detect features
-  void initialize_ts(Polyhedron& p);
-
-  void detect_features(FT angle_in_degree, Polyhedron& p);
-  void detect_features(FT angle_in_degree = FT(60)) { detect_features(angle_in_degree, polyhedron_); }
-
-  const Polyhedron& polyhedron() const {return polyhedron_;}
-  
-private:
-  Polyhedron polyhedron_;
-
-private:
-  // Disabled copy constructor & assignment operator
-  typedef Polyhedral_mesh_domain_with_features_3 Self;
-  Polyhedral_mesh_domain_with_features_3(const Self& src);
-  Self& operator=(const Self& src);
-
-};  // end class Polyhedral_mesh_domain_with_features_3
-
-
-template < typename GT_, typename P_, typename TA_,
-           typename Tag_, typename E_tag_>
-Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
-Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
-                                       CGAL::Random* p_rng)
-  : Base()
-  , polyhedron_(p)
-{
-  this->add_primitives(polyhedron_);
-  this->set_random_generator(p_rng);
-}
-
-template < typename GT_, typename P_, typename TA_,
-           typename Tag_, typename E_tag_>
-Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
-Polyhedral_mesh_domain_with_features_3(const char* filename,
-                                       CGAL::Random* p_rng)
-  : Base()
-  , polyhedron_()
-{
-  // Create input polyhedron
-  std::ifstream input(filename);
-  input >> polyhedron_;
-  this->add_primitives(polyhedron_);
-  this->set_random_generator(p_rng);
-}
-
-template < typename GT_, typename P_, typename TA_,
-           typename Tag_, typename E_tag_>
-Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
-Polyhedral_mesh_domain_with_features_3(const std::string& filename,
-                                       CGAL::Random* p_rng)
-  : Base()
-  , polyhedron_()
-{
-  // Create input polyhedron
-  std::ifstream input(filename.c_str());
-  input >> polyhedron_;
-  this->add_primitives(polyhedron_);
-  this->set_random_generator(p_rng);
-}
-
-
-template < typename GT_, typename P_, typename TA_,
-           typename Tag_, typename E_tag_>
-void
-Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
-initialize_ts(Polyhedron& p)
-{
-  std::size_t ts = 0;
-  for(typename Polyhedron::Vertex_iterator v = p.vertices_begin(),
-      end = p.vertices_end() ; v != end ; ++v)
-  {
-    v->set_time_stamp(ts++);
-  }
-  for(typename Polyhedron::Facet_iterator fit = p.facets_begin(),
-       end = p.facets_end() ; fit != end ; ++fit )
-  {
-    fit->set_time_stamp(ts++);
-  }
-  for(typename Polyhedron::Halfedge_iterator hit = p.halfedges_begin(),
-       end = p.halfedges_end() ; hit != end ; ++hit )
-  {
-    hit->set_time_stamp(ts++);
-  }
-}
-
-
-template < typename GT_, typename P_, typename TA_,
-           typename Tag_, typename E_tag_>
-void
-Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
-detect_features(FT angle_in_degree, Polyhedron& p)
-{
-  initialize_ts(p);
-  // Get sharp features
-  Mesh_3::detect_features(p,angle_in_degree);
-  
-  // Get polylines
-  typedef std::vector<Point_3> Bare_polyline;
-  typedef Mesh_3::Polyline_with_context<Surface_patch_index, Curve_segment_index,
-    Bare_polyline > Polyline;
-  
-  std::vector<Polyline> polylines;
-  typedef std::back_insert_iterator<std::vector<Polyline> > Output_iterator;
-
-  Mesh_3::detect_polylines<Polyhedron,Polyline,Output_iterator>(
-    &p, std::back_inserter(polylines));
-    
-  // Insert polylines in domain
-  Mesh_3::Extract_bare_polyline<Polyline> extractor;
-  
-  this->add_features(
-    boost::make_transform_iterator(polylines.begin(),extractor),
-    boost::make_transform_iterator(polylines.end(),extractor));
-}
-
-} //namespace CGAL
-
-
-#endif // CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_3.h
deleted file mode 100644
index 66e8e9a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_3.h
+++ /dev/null
@@ -1,1542 +0,0 @@
-// Copyright (c) 1997  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>)
-
-#ifndef CGAL_POLYHEDRON_3_H
-#define CGAL_POLYHEDRON_3_H 1
-
-#include <CGAL/basic.h>
-#include <algorithm>
-#include <cstddef>
-
-#include <CGAL/HalfedgeDS_iterator.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/N_step_adaptor_derived.h>
-#include <CGAL/Polyhedron_items_3.h>
-#include <CGAL/HalfedgeDS_default.h>
-#include <CGAL/HalfedgeDS_const_decorator.h>
-#include <CGAL/HalfedgeDS_decorator.h>
-#include <CGAL/Modifier_base.h>
-#include <CGAL/IO/Verbose_ostream.h>
-#include <CGAL/Polyhedron_traits_3.h>
-
-namespace CGAL {
-
-template <class VertexBase>
-class I_Polyhedron_vertex  : public VertexBase  {
-public:
-    typedef VertexBase                            Base;
-    //typedef typename Base::HalfedgeDS              HDS;
-    typedef typename Base::Point                   Point;
-    typedef Point                                  Point_3;
-
-    // Handles have to explicitly repeated, although they are derived
-    typedef typename Base::Vertex_handle           Vertex_handle;
-    typedef typename Base::Halfedge_handle         Halfedge_handle;
-    typedef typename Base::Face_handle             Face_handle;
-    typedef typename Base::Face_handle             Facet_handle;
-    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
-    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
-    typedef typename Base::Face_const_handle       Face_const_handle;
-    typedef typename Base::Face_const_handle       Facet_const_handle;
-    typedef typename Base::Halfedge                Halfedge;
-    typedef typename Base::Face                    Face;
-    typedef typename Base::Face                    Facet;
-
-    // Supported options by HDS.
-    typedef typename Base::Supports_vertex_halfedge
-                                                  Supports_vertex_halfedge;
-    typedef typename Base::Supports_vertex_point  Supports_vertex_point;
-
-    // Circulator category.
-    typedef typename Halfedge::Supports_halfedge_prev  Supports_prev;
-
-public:
-    // Circulator category.
-    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
-    typedef typename Ctr::iterator_category circulator_category;
-
-    // Circulators around a vertex and around a facet.
-    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
-                                         Halfedge_around_facet_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
-                                        Halfedge_around_vertex_circulator;
-
-    typedef I_HalfedgeDS_facet_circ<
-        Halfedge_const_handle,
-        circulator_category>       Halfedge_around_facet_const_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ<
-        Halfedge_const_handle,
-        circulator_category>      Halfedge_around_vertex_const_circulator;
-
-
-
-    typedef typename Halfedge_around_vertex_circulator::size_type
-        size_type;
-    typedef typename Halfedge_around_vertex_circulator::difference_type
-        difference_type;
-
-public:
-    // We need to repeat the constructors here.
-    I_Polyhedron_vertex() {}
-    I_Polyhedron_vertex( const VertexBase& b) : VertexBase(b) {}
-    I_Polyhedron_vertex( const Point_3& p) : VertexBase(p) {}
-
-// New Access Functions (not provided in VertexBase).
-
-    Halfedge_around_vertex_circulator vertex_begin() {
-        // a circulator of halfedges around the vertex (clockwise).
-        return Halfedge_around_vertex_circulator( this->halfedge());
-    }
-    Halfedge_around_vertex_const_circulator vertex_begin() const {
-        // a circulator of halfedges around the vertex (clockwise).
-        return Halfedge_around_vertex_const_circulator( this->halfedge());
-    }
-
-    // the degree of the vertex, i.e., edges emanating from this vertex
-    std::size_t vertex_degree() const {
-        return this->halfedge()->vertex_degree();
-    }
-    size_type degree() const { return vertex_degree(); } //backwards compatible
-
-    // returns true if the vertex has exactly two incident edges
-    bool is_bivalent() const { return  this->halfedge()->is_bivalent(); }
-
-    // returns true if the vertex has exactly three incident edges
-    bool is_trivalent() const { return  this->halfedge()->is_trivalent(); }
-
-    // No longer hidden. Now the restricted version with precondition.
-    // sets incident halfedge to h. Precondition: h is incident, i.e.,
-    // h->vertex() == v.
-    void  set_halfedge( Halfedge_handle hh) {
-        CGAL_assertion( &*(hh->vertex()) == this);
-        Base::set_halfedge(hh);
-    }
-};
-
-// A halfedge is an oriented edge. Both orientations exist, i.e.
-// an edge is represented by two opposite halfedges. The geometric
-// relations are as follows:
-//
-//              _ _ _   .
-//             /        |\.
-//                      | \.
-//           /             \ next half
-//                          \ edge
-//         /                 \.
-//
-//        |                   O  incident vertex
-//                facet      ,
-//        |                 /| |
-//                         / | | opposite
-//         \                 | | half edge
-//                      half | |
-//           \          edge | | /
-//                           | |/
-//             \_ _ _ _ _ _    '
-//
-
-template <class HalfedgeBase>
-class I_Polyhedron_halfedge : public HalfedgeBase {
-public:
-    typedef HalfedgeBase                          Base;
-    typedef typename Base::HalfedgeDS              HDS;
-
-    // Handles have to explicitly repeated, although they are derived
-    typedef typename Base::Vertex_handle           Vertex_handle;
-    typedef typename Base::Halfedge_handle         Halfedge_handle;
-    typedef typename Base::Face_handle             Face_handle;
-    typedef typename Base::Face_handle             Facet_handle;
-    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
-    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
-    typedef typename Base::Face_const_handle       Face_const_handle;
-    typedef typename Base::Face_const_handle       Facet_const_handle;
-
-    typedef typename Base::Vertex                  Vertex;
-    typedef typename Base::Face                    Face;
-    typedef typename Base::Face                    Facet;
-
-    // Supported options by HDS.
-    typedef typename Base::Supports_halfedge_prev Supports_halfedge_prev;
-    typedef typename Base::Supports_halfedge_vertex
-                                                  Supports_halfedge_vertex;
-    typedef typename Base::Supports_halfedge_face Supports_halfedge_face;
-
-    // Circulator category.
-    typedef typename Base::Supports_halfedge_prev Supports_prev;
-
-public:
-    // Circulator category.
-    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
-    typedef typename Ctr::iterator_category circulator_category;
-
-    // Circulators around a vertex and around a facet.
-    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
-                                         Halfedge_around_facet_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
-                                        Halfedge_around_vertex_circulator;
-
-    typedef I_HalfedgeDS_facet_circ<
-        Halfedge_const_handle,
-        circulator_category>       Halfedge_around_facet_const_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ<
-        Halfedge_const_handle,
-        circulator_category>      Halfedge_around_vertex_const_circulator;
-
-
-
-public:
-    I_Polyhedron_halfedge() {}
-    I_Polyhedron_halfedge( const HalfedgeBase& b) : HalfedgeBase(b) {}
-
-// New Access Functions (not provided in HalfedgeBase).
-
-    // Change semantic of prev: it is always available at this level.
-    // If the HDS does not provide a prev-function, the previous
-    // halfedge will be searched around the incident facet.
-private:
-    Halfedge_handle       find_prev( Halfedge_handle,       Tag_true) {
-        return Base::prev();
-    }
-    Halfedge_const_handle find_prev( Halfedge_const_handle, Tag_true) const {
-        return Base::prev();
-    }
-    Halfedge_handle find_prev( Halfedge_handle h, Tag_false) const {
-        CGAL_precondition( &*h != this); // we have at least 2-gons
-        while ( &*(h->next()) != this)
-            h = h->next();
-        return h;
-    }
-    Halfedge_const_handle find_prev( Halfedge_const_handle h, Tag_false) const{
-        CGAL_precondition( &*h != this); // we have at least 2-gons
-        while ( &*(h->next()) != this)
-            h = h->next();
-        return h;
-    }
-
-public:
-    Halfedge_handle       prev() {
-        return find_prev( this->next(), Supports_halfedge_prev());
-    }
-    Halfedge_const_handle prev() const {
-        return find_prev( this->next(), Supports_halfedge_prev());
-    }
-
-    // Make face-functions also available as facet-functions.
-    Face_handle           facet()       { return this->face();}
-    Face_const_handle     facet() const { return this->face();}
-
-
-    // the next halfedge around the vertex (clockwise). This is equal to
-    // `h.next()->opposite()'.
-    Halfedge_handle       next_on_vertex() { return this->next()->opposite(); }
-    Halfedge_const_handle next_on_vertex() const {
-        return this->next()->opposite();
-    }
-
-    // the previous halfedge around the vertex (counterclockwise). Is
-    // equal to `h.opposite()->prev()'.
-    Halfedge_handle       prev_on_vertex() { return this->opposite()->prev(); }
-    Halfedge_const_handle prev_on_vertex() const {
-        return this->opposite()->prev();
-    }
-
-    bool is_border_edge() const {
-        // is true if `h' or `h.opposite()' is a border halfedge.
-        return (this->opposite()->is_border() || this->is_border());
-    }
-
-    // a circulator of halfedges around the vertex (clockwise).
-    Halfedge_around_vertex_circulator vertex_begin() {
-        return Halfedge_around_vertex_circulator(
-            HDS::halfedge_handle(this));
-    }
-    Halfedge_around_vertex_const_circulator vertex_begin() const {
-        return Halfedge_around_vertex_const_circulator(
-            HDS::halfedge_handle(this));
-    }
-
-    // a circulator of halfedges around the facet (counterclockwise).
-    Halfedge_around_facet_circulator facet_begin() {
-        return Halfedge_around_facet_circulator(
-            HDS::halfedge_handle(this));
-    }
-    Halfedge_around_facet_const_circulator facet_begin() const {
-        return Halfedge_around_facet_const_circulator(
-            HDS::halfedge_handle(this));
-    }
-
-    // the degree of the incident vertex, i.e., edges emanating from this
-    // vertex
-    std::size_t vertex_degree() const {
-        return circulator_size( vertex_begin());
-    }
-
-    // the degree of the incident facet, i.e., edges on the boundary of this
-    // facet
-    std::size_t facet_degree() const {
-        return circulator_size( facet_begin());
-    }
-
-    // returns true if the incident vertex has exactly two incident edges
-    bool is_bivalent() const {
-        CGAL_precondition( this != &* (this->next()->opposite()));
-        return  (this == &* (this->next()->opposite()->next()->opposite()));
-    }
-
-    // returns true if the incident vertex has exactly three incident edges
-    bool is_trivalent() const {
-        CGAL_precondition( this != &* (this->next()->opposite()));
-        return  (   this != &* (this->next()->opposite()->next()->opposite())
-                 && this == &* (this->next()->opposite()->next()->opposite()
-                                ->next()->opposite()));
-    }
-
-    // returns true if the incident facet is a triangle.
-    bool is_triangle() const {
-        CGAL_precondition( this != &* (this->next()));
-        CGAL_precondition( this != &* (this->next()->next()));
-        return  (this == &* (this->next()->next()->next()));
-    }
-
-    // returns true if the incident facet is a quadrilateral.
-    bool is_quad()     const {
-        CGAL_precondition( this != &* (this->next()));
-        CGAL_precondition( this != &* (this->next()->next()));
-        return  (this == &* (this->next()->next()->next()->next()));
-    }
-
-
-private:
-    // Hide some other functions of H.
-    void  set_next( Halfedge_handle hh)  { Base::set_next(hh);}
-    void  set_prev( Halfedge_handle hh)  { Base::set_prev(hh);}
-    void  set_vertex( Vertex_handle vv)  { Base::set_vertex(vv);}
-    void  set_face( Face_handle ff)      { Base::set_face(ff);}
-    void  set_facet( Face_handle ff)     { set_face(ff);}
-};
-
-
-template <class FacetBase>
-class I_Polyhedron_facet  : public FacetBase  {
-public:
-    typedef FacetBase                             Base;
-    //typedef typename Base::HalfedgeDS              HDS;
-    typedef typename Base::Plane                   Plane;
-    typedef Plane                                  Plane_3;
-
-    // Handles have to explicitly repeated, although they are derived
-    typedef typename Base::Vertex_handle           Vertex_handle;
-    typedef typename Base::Halfedge_handle         Halfedge_handle;
-    typedef typename Base::Face_handle             Face_handle;
-    typedef typename Base::Face_handle             Facet_handle;
-    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
-    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
-    typedef typename Base::Face_const_handle       Face_const_handle;
-    typedef typename Base::Face_const_handle       Facet_const_handle;
-    typedef typename Base::Vertex                  Vertex;
-    typedef typename Base::Halfedge                Halfedge;
-
-    // Supported options by HDS.
-    typedef typename Base::Supports_face_halfedge Supports_face_halfedge;
-    typedef typename Base::Supports_face_plane    Supports_face_plane;
-
-    // No longer required.
-    typedef Tag_false                             Supports_face_normal;
-
-    // Circulator category.
-    typedef typename Halfedge::Supports_halfedge_prev  Supports_prev;
-
-public:
-    // Circulator category.
-    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
-    typedef typename Ctr::iterator_category circulator_category;
-
-    // Circulators around a vertex and around a facet.
-    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
-                                         Halfedge_around_facet_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
-                                        Halfedge_around_vertex_circulator;
-
-    typedef I_HalfedgeDS_facet_circ<
-        Halfedge_const_handle,
-        circulator_category>       Halfedge_around_facet_const_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ<
-        Halfedge_const_handle,
-        circulator_category>      Halfedge_around_vertex_const_circulator;
-
-
-
-    typedef typename Halfedge_around_vertex_circulator::size_type
-        size_type;
-    typedef typename Halfedge_around_vertex_circulator::difference_type
-        difference_type;
-
-public:
-    // We need to repeat the constructors here.
-    I_Polyhedron_facet() {}
-    I_Polyhedron_facet( const FacetBase& b) : FacetBase(b) {}
-
-// New Access Functions (not provided in FacetBase).
-
-    Halfedge_around_facet_circulator facet_begin() {
-        // a circulator of halfedges around the facet (counterclockwise).
-        return Halfedge_around_facet_circulator( this->halfedge());
-    }
-    Halfedge_around_facet_const_circulator facet_begin() const {
-        // a circulator of halfedges around the facet (counterclockwise).
-        return Halfedge_around_facet_const_circulator( this->halfedge());
-    }
-
-    // the degree of the incident facet, i.e., edges on the boundary of this
-    // facet
-    std::size_t facet_degree() const {return this->halfedge()->facet_degree();}
-    size_type size() const { return facet_degree(); } // backwards compatible
-
-    // returns true if the facet is a triangle.
-    bool is_triangle() const { return this->halfedge()->is_triangle(); }
-
-    // returns true if the facet is a quadrilateral.
-    bool is_quad()     const { return this->halfedge()->is_quad(); }
-
-    // No longer hidden. Now the restricted version with precondition.
-    // sets incident halfedge to h. Precondition: h is incident, i.e.,
-    // h->face() == v.
-    void  set_halfedge( Halfedge_handle hh) {
-        CGAL_assertion( &*(hh->facet()) == this);
-        Base::set_halfedge(hh);
-    }
-};
-
-
-template < class Items>
-class I_Polyhedron_derived_items_3 {
-public:
-    template < class Refs, class Traits>
-    class Vertex_wrapper {
-    public:
-        typedef typename Items::template Vertex_wrapper<Refs,Traits> VWrap;
-        typedef typename VWrap::Vertex Vertex_base;
-        typedef I_Polyhedron_vertex< Vertex_base> Vertex;
-    };
-    template < class Refs, class Traits>
-    class Halfedge_wrapper {
-    public:
-        typedef typename Items::template Halfedge_wrapper<Refs,Traits> HWrap;
-        typedef typename HWrap::Halfedge Halfedge_base;
-        typedef I_Polyhedron_halfedge< Halfedge_base> Halfedge;
-    };
-    template < class Refs, class Traits>
-    class Face_wrapper {
-    public:
-        typedef typename Items::template Face_wrapper<Refs,Traits> FWrap;
-        typedef typename FWrap::Face Face_base;
-        typedef I_Polyhedron_facet< Face_base> Face;
-    };
-};
-
-
-template < class PolyhedronTraits_3,
-           class PolyhedronItems_3 = Polyhedron_items_3,
-           template < class T, class I, class A>
-           class T_HDS = HalfedgeDS_default,
-           class Alloc = CGAL_ALLOCATOR(int)>
-class Polyhedron_3 {
-    //
-    // DEFINITION
-    //
-    // The boundary representation of a 3d-polyhedron P of the type
-    // Polyhedron consists of vertices, edges and facets. The
-    // vertices are points in space. The edges are straight line
-    // segments. The facets are planar polygons. We restrict here
-    // the facets to be simple planar polygons without holes and the
-    // boundary of the polyhedron to be an oriented 2-manifold. Thus
-    // facets are consistently oriented and an edge is incident to
-    // exactly two facets. We restrict the representation further
-    // that an edge has two distinct incident endpoints and
-    // following duality that an edge has two distinct incident
-    // facets. The class Polyhedron is able to guarantee
-    // the combinatorial properties, but not all geometric
-    // properties. Support functions are provided for testing
-    // geometric properties, e.g. test for self intersections which
-    // is  too expensive to be guaranteed as a class invariant.
-public:
-    typedef Polyhedron_3< PolyhedronTraits_3, PolyhedronItems_3, T_HDS, Alloc>
-                                                  Self;
-    typedef PolyhedronTraits_3                    Traits;
-    typedef PolyhedronItems_3                     Items;
-    typedef I_Polyhedron_derived_items_3<Items>   Derived_items;
-    typedef T_HDS< Traits, Derived_items, Alloc>  HDS;
-    typedef HDS                                   HalfedgeDS;
-
-    // portability with older CGAL release
-    typedef HDS                                   Halfedge_data_structure;
-
-    typedef Alloc                                 Allocator;
-    typedef Alloc                                 allocator_type; // STL name
-
-    // Container stuff.
-    typedef typename HDS::size_type               size_type;
-    typedef typename HDS::difference_type         difference_type;
-    typedef typename HDS::iterator_category       iterator_category;
-    typedef typename HDS::Supports_removal        Supports_removal;
-
-    // Geometry
-    typedef typename Traits::Point_3              Point_3;
-    typedef typename Traits::Plane_3              Plane_3;
-    // No longer required.
-    //typedef typename Traits::Normal               Normal;
-
-    // Items
-    typedef typename HDS::Vertex                  Vertex;
-    typedef typename HDS::Halfedge                Halfedge;
-    typedef typename HDS::Face                    Face;
-
-    typedef typename Vertex::Base                 VBase;
-    typedef typename Halfedge::Base               HBase;
-    typedef typename Face::Base                   FBase;
-
-    // Handles and Iterators
-    typedef typename HDS::Vertex_handle           Vertex_handle;
-    typedef typename HDS::Halfedge_handle         Halfedge_handle;
-    typedef typename HDS::Face_handle             Face_handle;
-    typedef typename HDS::Vertex_iterator         Vertex_iterator;
-    typedef typename HDS::Halfedge_iterator       Halfedge_iterator;
-    typedef typename HDS::Face_iterator           Face_iterator;
-
-    typedef typename HDS::Vertex_const_handle     Vertex_const_handle;
-    typedef typename HDS::Halfedge_const_handle   Halfedge_const_handle;
-    typedef typename HDS::Face_const_handle       Face_const_handle;
-    typedef typename HDS::Vertex_const_iterator   Vertex_const_iterator;
-    typedef typename HDS::Halfedge_const_iterator Halfedge_const_iterator;
-    typedef typename HDS::Face_const_iterator     Face_const_iterator;
-
-    // Auxiliary iterators for convenience
-    typedef Project_point<Vertex>                 Proj_point;
-    typedef Iterator_project<Vertex_iterator, Proj_point>
-                                                  Point_iterator;
-    typedef Iterator_project<Vertex_const_iterator, Proj_point,
-        const Point_3&, const Point_3*>           Point_const_iterator;
-
-    typedef Project_plane<Face>                   Proj_plane;
-    typedef Iterator_project<Face_iterator, Proj_plane>
-                                                  Plane_iterator;
-    typedef Iterator_project<Face_const_iterator, Proj_plane,
-        const Plane_3&, const Plane_3*>           Plane_const_iterator;
-
-    typedef N_step_adaptor_derived<Halfedge_iterator, 2>
-                                                  Edge_iterator;
-    typedef N_step_adaptor_derived<Halfedge_const_iterator, 2>
-                                                  Edge_const_iterator;
-
-    // All face related types get a related facet type name.
-    typedef Face                                  Facet;
-    typedef Face_handle                           Facet_handle;
-    typedef Face_iterator                         Facet_iterator;
-    typedef Face_const_handle                     Facet_const_handle;
-    typedef Face_const_iterator                   Facet_const_iterator;
-
-    // Supported options by HDS.
-    typedef typename VBase::Supports_vertex_halfedge
-                                                  Supports_vertex_halfedge;
-    typedef typename HBase::Supports_halfedge_prev  Supports_halfedge_prev;
-    typedef typename HBase::Supports_halfedge_prev  Supports_prev;
-    typedef typename HBase::Supports_halfedge_vertex
-                                                  Supports_halfedge_vertex;
-    typedef typename HBase::Supports_halfedge_face  Supports_halfedge_face;
-    typedef typename FBase::Supports_face_halfedge  Supports_face_halfedge;
-
-    // Supported options especially for Polyhedron_3.
-    typedef typename VBase::Supports_vertex_point   Supports_vertex_point;
-    typedef typename FBase::Supports_face_plane     Supports_face_plane;
-
-    // No longer required.
-    typedef Tag_false                               Supports_face_normal;
-
-    // Renamed versions for facet
-    typedef Supports_halfedge_face  Supports_halfedge_facet;
-    typedef Supports_face_halfedge  Supports_facet_halfedge;
-    typedef Supports_face_plane     Supports_facet_plane;
-    // No longer required.
-    typedef Supports_face_normal    Supports_facet_normal;
-
-public:
-    // Circulator category.
-    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
-    typedef typename Ctr::iterator_category circulator_category;
-
-    // Circulators around a vertex and around a facet.
-    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
-                                         Halfedge_around_facet_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
-                                        Halfedge_around_vertex_circulator;
-
-    typedef I_HalfedgeDS_facet_circ<
-        Halfedge_const_handle,
-        circulator_category>       Halfedge_around_facet_const_circulator;
-
-    typedef I_HalfedgeDS_vertex_circ<
-        Halfedge_const_handle,
-        circulator_category>      Halfedge_around_vertex_const_circulator;
-
-
-
-protected:
-    HDS     hds_;  // the boundary representation.
-    Traits  m_traits;
-
-public:
-    HDS& hds() { return hds_; }
-    const HDS& hds() const { return hds_; }
-
-// CREATION
-public:
-
-    Polyhedron_3( const Traits& trts = Traits()) : m_traits(trts) {}
-        // the empty polyhedron `P'.
-
-    Polyhedron_3( size_type v, size_type h, size_type f,
-                  const Traits& traits = Traits())
-    : hds_(v,h,f), m_traits(traits) {}
-        // a polyhedron `P' with storage reserved for v vertices, h
-        // halfedges, and f facets. The reservation sizes are a hint for
-        // optimizing storage allocation.
-
-    void reserve( size_type v, size_type h, size_type f) {
-        // reserve storage for v vertices, h halfedges, and f facets. The
-        // reservation sizes are a hint for optimizing storage allocation.
-        // If the `capacity' is already greater than the requested size
-        // nothing happens. If the `capacity' changes all iterators and
-        // circulators invalidates.
-        hds_.reserve(v,h,f);
-    }
-
-protected:
-    Halfedge_handle
-    make_triangle( Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) {
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        Halfedge_handle h  = hds_.edges_push_back( Halfedge(), Halfedge());
-        h->HBase::set_next( hds_.edges_push_back( Halfedge(), Halfedge()));
-        h->next()->HBase::set_next( hds_.edges_push_back( Halfedge(),
-                                                         Halfedge()));
-        h->next()->next()->HBase::set_next( h);
-        decorator.set_prev( h, h->next()->next());
-        decorator.set_prev( h->next(), h);
-        decorator.set_prev( h->next()->next(), h->next());
-        h->opposite()->HBase::set_next( h->next()->next()->opposite());
-        h->next()->opposite()->HBase::set_next( h->opposite());
-        h->next()->next()->opposite()->HBase::set_next(
-            h->next()->opposite());
-        decorator.set_prev( h->opposite(), h->next()->opposite());
-        decorator.set_prev( h->next()->opposite(),
-                            h->next()->next()->opposite());
-        decorator.set_prev( h->next()->next()->opposite(), h->opposite());
-        // the vertices
-        decorator.set_vertex( h, v1);
-        decorator.set_vertex( h->next(), v2);
-        decorator.set_vertex( h->next()->next(), v3);
-        decorator.set_vertex( h->opposite(), v3);
-        decorator.set_vertex( h->next()->opposite(), v1);
-        decorator.set_vertex( h->next()->next()->opposite(), v2);
-        decorator.set_vertex_halfedge( h);
-        decorator.set_vertex_halfedge( h->next());
-        decorator.set_vertex_halfedge( h->next()->next());
-        // the facet
-        Facet_handle f = decorator.faces_push_back( Facet());
-        decorator.set_face( h, f);
-        decorator.set_face( h->next(), f);
-        decorator.set_face( h->next()->next(), f);
-        decorator.set_face_halfedge( h);
-        return h;
-    }
-
-    Halfedge_handle
-    make_tetrahedron( Vertex_handle v1,
-                      Vertex_handle v2,
-                      Vertex_handle v3,
-                      Vertex_handle v4) {
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        Halfedge_handle h  = make_triangle(v1,v2,v3);
-        // The remaining tip.
-        Halfedge_handle g  = hds_.edges_push_back( Halfedge(), Halfedge());
-        decorator.insert_tip( g->opposite(), h->opposite());
-        decorator.close_tip( g);
-        decorator.set_vertex( g, v4);
-        Halfedge_handle e  = hds_.edges_push_back( Halfedge(), Halfedge());
-        Halfedge_handle d  = hds_.edges_push_back( Halfedge(), Halfedge());
-        decorator.insert_tip( e->opposite(), h->next()->opposite());
-        decorator.insert_tip( e, g);
-        decorator.insert_tip( d->opposite(),h->next()->next()->opposite());
-        decorator.insert_tip( d, e);
-        decorator.set_vertex_halfedge( g);
-        // facets
-        Facet_handle f = decorator.faces_push_back( Facet());
-        decorator.set_face( h->opposite(), f);
-        decorator.set_face( g, f);
-        decorator.set_face( e->opposite(), f);
-        decorator.set_face_halfedge( g);
-        f = decorator.faces_push_back( Facet());
-        decorator.set_face( h->next()->opposite(), f);
-        decorator.set_face( e, f);
-        decorator.set_face( d->opposite(), f);
-        decorator.set_face_halfedge( e);
-        f = decorator.faces_push_back( Facet());
-        decorator.set_face( h->next()->next()->opposite(), f);
-        decorator.set_face( d, f);
-        decorator.set_face( g->opposite(), f);
-        decorator.set_face_halfedge( d);
-        return h;
-    }
-
-public:
-    Halfedge_handle make_tetrahedron() {
-        // the combinatorial structure of a tetrahedron is added to the
-        // actual polyhedral surface. Returns an arbitrary halfedge of
-        // this structure.
-        reserve( 4 + size_of_vertices(),
-                12 + size_of_halfedges(),
-                 4 + size_of_facets());
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        return make_tetrahedron( decorator.vertices_push_back( Vertex()),
-                                 decorator.vertices_push_back( Vertex()),
-                                 decorator.vertices_push_back( Vertex()),
-                                 decorator.vertices_push_back( Vertex()));
-    }
-
-    Halfedge_handle make_tetrahedron( const Point_3& p1,
-                                      const Point_3& p2,
-                                      const Point_3& p3,
-                                      const Point_3& p4) {
-        reserve( 4 + size_of_vertices(),
-                12 + size_of_halfedges(),
-                 4 + size_of_facets());
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        return make_tetrahedron( decorator.vertices_push_back( Vertex(p1)),
-                                 decorator.vertices_push_back( Vertex(p2)),
-                                 decorator.vertices_push_back( Vertex(p3)),
-                                 decorator.vertices_push_back( Vertex(p4)));
-
-    }
-
-    Halfedge_handle make_triangle() {
-        // the combinatorial structure of a single triangle with border
-        // edges is added to the actual polyhedral surface. Returns an
-        // arbitrary halfedge of this structure.
-        reserve( 3 + size_of_vertices(),
-                 6 + size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        return make_triangle( decorator.vertices_push_back( Vertex()),
-                              decorator.vertices_push_back( Vertex()),
-                              decorator.vertices_push_back( Vertex()));
-    }
-
-    Halfedge_handle make_triangle( const Point_3& p1,
-                                   const Point_3& p2,
-                                   const Point_3& p3) {
-        // the single triangle p_1, p_2, p_3 with border edges is added to
-        // the actual polyhedral surface. Returns an arbitrary halfedge of
-        // this structure.
-        reserve( 3 + size_of_vertices(),
-                 6 + size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        return make_triangle( decorator.vertices_push_back( Vertex(p1)),
-                              decorator.vertices_push_back( Vertex(p2)),
-                              decorator.vertices_push_back( Vertex(p3)));
-    }
-
-// Access Member Functions
-
-    allocator_type get_allocator() const { return hds_.get_allocator(); }
-
-    size_type size_of_vertices() const { return hds_.size_of_vertices();}
-        // number of vertices.
-
-    size_type size_of_halfedges() const { return hds_.size_of_halfedges();}
-        // number of all halfedges (including border halfedges).
-
-    size_type size_of_facets() const { return hds_.size_of_faces();}
-        // number of facets.
-
-    bool empty() const { return size_of_halfedges() == 0; }
-
-    bool is_empty() const { return size_of_halfedges() == 0; }
-
-    size_type capacity_of_vertices() const {
-        // space reserved for vertices.
-        return hds_.capacity_of_vertices();
-    }
-
-    size_type capacity_of_halfedges() const {
-        // space reserved for halfedges.
-        return hds_.capacity_of_halfedges();
-    }
-
-    size_type capacity_of_facets() const {
-        // space reserved for facets.
-        return hds_.capacity_of_faces();
-    }
-
-    std::size_t bytes() const {
-        // bytes used for the polyhedron.
-        return sizeof(Self) - sizeof(HDS) + hds_.bytes();
-    }
-
-    std::size_t bytes_reserved() const {
-        // bytes reserved for the polyhedron.
-        return sizeof(Self) - sizeof(HDS) + hds_.bytes_reserved();
-    }
-
-    Vertex_iterator vertices_begin() { return hds_.vertices_begin();}
-        // iterator over all vertices.
-
-    Vertex_iterator vertices_end() { return hds_.vertices_end();}
-
-    Halfedge_iterator halfedges_begin() { return hds_.halfedges_begin();}
-        // iterator over all halfedges
-
-    Halfedge_iterator halfedges_end() { return hds_.halfedges_end();}
-
-    Facet_iterator facets_begin() { return hds_.faces_begin();}
-        // iterator over all facets
-
-    Facet_iterator facets_end() { return hds_.faces_end();}
-
-    // The constant iterators and circulators.
-
-    Vertex_const_iterator vertices_begin() const {
-        return hds_.vertices_begin();
-    }
-    Vertex_const_iterator vertices_end() const {
-        return hds_.vertices_end();
-    }
-
-    Halfedge_const_iterator halfedges_begin() const {
-      return hds_.halfedges_begin();
-    }
-    Halfedge_const_iterator halfedges_end() const {
-        return hds_.halfedges_end();
-    }
-    Facet_const_iterator facets_begin() const { return hds_.faces_begin();}
-    Facet_const_iterator facets_end()   const { return hds_.faces_end();}
-
-    // Auxiliary iterators for convinience
-    Point_iterator       points_begin()       { return vertices_begin();}
-    Point_iterator       points_end()         { return vertices_end();}
-
-    Point_const_iterator points_begin() const { return vertices_begin();}
-    Point_const_iterator points_end()   const { return vertices_end();}
-
-    Plane_iterator       planes_begin()       { return facets_begin();}
-    Plane_iterator       planes_end()         { return facets_end();}
-
-    Plane_const_iterator planes_begin() const { return facets_begin();}
-    Plane_const_iterator planes_end()   const { return facets_end();}
-
-    Edge_iterator        edges_begin()        { return halfedges_begin();}
-        // iterator over all edges. The iterator refers to halfedges, but
-        // enumerates only one of the two corresponding opposite
-        // halfedges.
-    Edge_iterator        edges_end()          { return halfedges_end();}
-        // end of the range over all edges.
-
-    Edge_const_iterator  edges_begin()  const { return halfedges_begin();}
-    Edge_const_iterator  edges_end()    const { return halfedges_end();}
-
-    Traits&       traits()       { return m_traits; }
-    const Traits& traits() const { return m_traits; }
-
-
-// Combinatorial Predicates
-
-    bool is_closed() const {
-        for ( Halfedge_const_iterator i = halfedges_begin();
-              i != halfedges_end(); ++i) {
-            if ( i->is_border())
-                return false;
-        }
-        return true;
-    }
-
-private:
-    bool is_pure_bivalent( Tag_true) const {
-        for ( Vertex_const_iterator i = vertices_begin();
-              i != vertices_end(); ++i)
-            if ( ! i->is_bivalent())
-                return false;
-        return true;
-    }
-    bool is_pure_bivalent( Tag_false) const {
-        for ( Halfedge_const_iterator i = halfedges_begin();
-              i != halfedges_end(); ++i)
-            if ( ! i->is_bivalent())
-                return false;
-        return true;
-    }
-
-public:
-    // returns true if all vertices have exactly two incident edges
-    bool is_pure_bivalent() const {
-        return is_pure_bivalent( Supports_vertex_halfedge());
-    }
-
-private:
-    bool is_pure_trivalent( Tag_true) const {
-        for ( Vertex_const_iterator i = vertices_begin();
-              i != vertices_end(); ++i)
-            if ( ! i->is_trivalent())
-                return false;
-        return true;
-    }
-    bool is_pure_trivalent( Tag_false) const {
-        for ( Halfedge_const_iterator i = halfedges_begin();
-              i != halfedges_end(); ++i)
-            if ( ! i->is_trivalent())
-                return false;
-        return true;
-    }
-
-public:
-    // returns true if all vertices have exactly three incident edges
-    bool is_pure_trivalent() const {
-        return is_pure_trivalent( Supports_vertex_halfedge());
-    }
-
-private:
-    bool is_pure_triangle( Tag_true) const {
-        for ( Facet_const_iterator i = facets_begin();
-              i != facets_end(); ++i)
-            if ( ! i->is_triangle())
-                return false;
-        return true;
-    }
-    bool is_pure_triangle( Tag_false) const {
-        for ( Halfedge_const_iterator i = halfedges_begin();
-              i != halfedges_end(); ++i)
-            if ( ! i->is_border() && ! i->is_triangle())
-                return false;
-        return true;
-    }
-
-public:
-    // returns true if all facets are triangles
-    bool is_pure_triangle() const {
-        return is_pure_triangle( Supports_facet_halfedge());
-    }
-
-private:
-    bool is_pure_quad( Tag_true) const {
-        for ( Facet_const_iterator i = facets_begin();
-              i != facets_end(); ++i)
-            if ( ! i->is_quad())
-                return false;
-        return true;
-    }
-    bool is_pure_quad( Tag_false) const {
-        for ( Halfedge_const_iterator i = halfedges_begin();
-              i != halfedges_end(); ++i)
-            if ( ! i->is_border() && ! i->is_quad())
-                return false;
-        return true;
-    }
-
-public:
-    // returns true if all facets are quadrilaterals
-    bool is_pure_quad() const {
-        return is_pure_quad( Supports_facet_halfedge());
-    }
-
-
-// Geometric Predicates
-
-    bool
-    is_triangle( Halfedge_const_handle h1) const {
-        Halfedge_const_handle h2 = h1->next();
-        Halfedge_const_handle h3 = h1->next()->next();
-        // check halfedge combinatorics.
-        // exact two edges at vertices 1, 2, 3.
-        if ( h1->opposite()->next() != h3->opposite())    return false;
-        if ( h2->opposite()->next() != h1->opposite())    return false;
-        if ( h3->opposite()->next() != h2->opposite())    return false;
-        // The facet is a triangle.
-        if ( h1->next()->next()->next() != h1) return false;
-
-        if ( check_tag( Supports_halfedge_face())
-             &&  ! h1->is_border_edge())
-            return false;  // implies h2 and h3
-        CGAL_assertion( ! h1->is_border() || ! h1->opposite()->is_border());
-
-        // Assert consistency.
-        CGAL_assertion( h1 != h2);
-        CGAL_assertion( h1 != h3);
-        CGAL_assertion( h3 != h2);
-
-        // check prev pointer.
-        CGAL_assertion_code( HalfedgeDS_items_decorator<HDS> D;)
-        CGAL_assertion(D.get_prev(h1) == Halfedge_handle() ||
-                       D.get_prev(h1) == h3);
-        CGAL_assertion(D.get_prev(h2) == Halfedge_handle() ||
-                       D.get_prev(h2) == h1);
-        CGAL_assertion(D.get_prev(h3) == Halfedge_handle() ||
-                       D.get_prev(h3) == h2);
-
-        // check vertices.
-        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h2->opposite()));
-        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h3->opposite()));
-        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h1->opposite()));
-
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h1) != D.get_vertex(h2));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h1) != D.get_vertex(h3));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h2) != D.get_vertex(h3));
-
-        // check facets.
-        CGAL_assertion( D.get_face(h1) == D.get_face(h2));
-        CGAL_assertion( D.get_face(h1) == D.get_face(h3));
-
-        return true;
-    }
-
-    bool
-    is_tetrahedron( Halfedge_const_handle h1) const {
-        Halfedge_const_handle h2 = h1->next();
-        Halfedge_const_handle h3 = h1->next()->next();
-        Halfedge_const_handle h4 = h1->opposite()->next();
-        Halfedge_const_handle h5 = h2->opposite()->next();
-        Halfedge_const_handle h6 = h3->opposite()->next();
-        // check halfedge combinatorics.
-        // at least three edges at vertices 1, 2, 3.
-        if ( h4 == h3->opposite())    return false;
-        if ( h5 == h1->opposite())    return false;
-        if ( h6 == h2->opposite())    return false;
-        // exact three edges at vertices 1, 2, 3.
-        if ( h4->opposite()->next() != h3->opposite())    return false;
-        if ( h5->opposite()->next() != h1->opposite())    return false;
-        if ( h6->opposite()->next() != h2->opposite())    return false;
-        // three edges at v4.
-        if ( h4->next()->opposite() != h5) return false;
-        if ( h5->next()->opposite() != h6) return false;
-        if ( h6->next()->opposite() != h4) return false;
-        // All facets are triangles.
-        if ( h1->next()->next()->next() != h1) return false;
-        if ( h4->next()->next()->next() != h4) return false;
-        if ( h5->next()->next()->next() != h5) return false;
-        if ( h6->next()->next()->next() != h6) return false;
-        // all edges are non-border edges.
-        if ( h1->is_border()) return false;  // implies h2 and h3
-        CGAL_assertion( ! h2->is_border());
-        CGAL_assertion( ! h3->is_border());
-        if ( h4->is_border()) return false;
-        if ( h5->is_border()) return false;
-        if ( h6->is_border()) return false;
-
-        // Assert consistency.
-        CGAL_assertion( h1 != h2);
-        CGAL_assertion( h1 != h3);
-        CGAL_assertion( h3 != h2);
-        CGAL_assertion( h4 != h5);
-        CGAL_assertion( h5 != h6);
-        CGAL_assertion( h6 != h4);
-
-        // check prev pointer.
-        CGAL_assertion_code( HalfedgeDS_items_decorator<HDS> D;)
-        CGAL_assertion(D.get_prev(h1) == Halfedge_handle() ||
-                       D.get_prev(h1) == h3);
-        CGAL_assertion(D.get_prev(h2) == Halfedge_handle() ||
-                       D.get_prev(h2) == h1);
-        CGAL_assertion(D.get_prev(h3) == Halfedge_handle() ||
-                       D.get_prev(h3) == h2);
-        CGAL_assertion(D.get_prev(h4) == Halfedge_handle() ||
-                  D.get_prev(h4) == h1->opposite());
-        CGAL_assertion(D.get_prev(h5) == Halfedge_handle() ||
-                  D.get_prev(h5) == h2->opposite());
-        CGAL_assertion(D.get_prev(h6) == Halfedge_handle() ||
-                  D.get_prev(h6) == h3->opposite());
-
-        // check vertices.
-        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h2->opposite()));
-        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h5->opposite()));
-        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h3->opposite()));
-        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h6->opposite()));
-        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h1->opposite()));
-        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h4->opposite()));
-        CGAL_assertion( D.get_vertex(h4) == D.get_vertex( h5));
-        CGAL_assertion( D.get_vertex(h4) == D.get_vertex( h6));
-
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h1) != D.get_vertex(h2));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h1) != D.get_vertex(h3));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h1) != D.get_vertex(h4));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h2) != D.get_vertex(h3));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h2) != D.get_vertex(h4));
-        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
-                   D.get_vertex(h3) != D.get_vertex(h4));
-
-        // check facets.
-        CGAL_assertion( D.get_face(h1) == D.get_face(h2));
-        CGAL_assertion( D.get_face(h1) == D.get_face(h3));
-        CGAL_assertion( D.get_face(h4) == D.get_face(h4->next()));
-        CGAL_assertion( D.get_face(h4) == D.get_face(h1->opposite()));
-        CGAL_assertion( D.get_face(h5) == D.get_face(h5->next()));
-        CGAL_assertion( D.get_face(h5) == D.get_face(h2->opposite()));
-        CGAL_assertion( D.get_face(h6) == D.get_face(h6->next()));
-        CGAL_assertion( D.get_face(h6) == D.get_face(h3->opposite()));
-
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h1) != D.get_face(h4));
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h1) != D.get_face(h5));
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h1) != D.get_face(h6));
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h4) != D.get_face(h5));
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h4) != D.get_face(h6));
-        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
-                   D.get_face(h5) != D.get_face(h6));
-
-        return true;
-    }
-
-// Euler Operators (Combinatorial Modifications)
-//
-// The following Euler operations modify consistently the combinatorial
-// structure of the polyhedral surface. The geometry remains unchanged.
-
-    Halfedge_handle split_facet( Halfedge_handle h, Halfedge_handle g) {
-        // split the facet incident to `h' and `g' into two facets with
-        // new diagonal between the two vertices denoted by `h' and `g'
-        // respectively. The second (new) facet is a copy of the first
-        // facet. It returns the new diagonal. The time is proportional to
-        // the distance from `h' to `g' around the facet. Precondition:
-        // `h' and `g' are incident to the same facet. `h != g' (no
-        // loops). `h->next() != g' and `g->next() != h' (no multi-edges).
-        reserve( size_of_vertices(),
-                 2 + size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( D.get_face(h) == D.get_face(g));
-        CGAL_precondition( h != g);
-        CGAL_precondition( h != g->next());
-        CGAL_precondition( h->next() != g);
-        return D.split_face( h, g);
-    }
-
-    Halfedge_handle join_facet( Halfedge_handle h) {
-        // join the two facets incident to h. The facet incident to
-        // `h->opposite()' gets removed. Both facets might be holes.
-        // Returns the predecessor of h. The invariant `join_facet(
-        // split_facet( h, g))' returns h and keeps the polyhedron
-        // unchanged. The time is proportional to the size of the facet
-        // removed and the time to compute `h.prev()'. Precondition:
-        // `HDS' supports removal of facets. The degree of both
-        // vertices incident to h is at least three (no antennas).
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( circulator_size(h->vertex_begin())
-                           >= size_type(3));
-        CGAL_precondition( circulator_size(h->opposite()->vertex_begin())
-                           >= size_type(3));
-        return D.join_face(h);
-    }
-
-    Halfedge_handle split_vertex( Halfedge_handle h, Halfedge_handle g) {
-        // split the vertex incident to `h' and `g' into two vertices and
-        // connects them with a new edge. The second (new) vertex is a
-        // copy of the first vertex. It returns the new edge. The time is
-        // proportional to the distance from `h' to `g' around the vertex.
-        // Precondition: `h' and `g' are incident to the same vertex. `h
-        // != g' (no antennas). `h->next() != g' and `g->next() != h'.
-        reserve( 1 + size_of_vertices(),
-                 2 + size_of_halfedges(),
-                 size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( D.get_vertex(h) == D.get_vertex(g));
-        CGAL_precondition( h != g);
-        return D.split_vertex( h, g);
-    }
-
-    Halfedge_handle join_vertex( Halfedge_handle h) {
-        // join the two vertices incident to h. The vertex denoted by
-        // `h->opposite()' gets removed. Returns the predecessor of h. The
-        // invariant `join_vertex( split_vertex( h, g))' returns h and
-        // keeps the polyhedron unchanged. The time is proportional to
-        // the degree of the vertex removed and the time to compute
-        // `h.prev()'.
-        // Precondition: `HDS' supports removal of vertices. The size of
-        // both facets incident to h is at least four (no multi-edges)
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( circulator_size( h->facet_begin())
-                           >= size_type(4));
-        CGAL_precondition( circulator_size( h->opposite()->facet_begin())
-                           >= size_type(4));
-        return D.join_vertex(h);
-    }
-
-    Halfedge_handle split_edge( Halfedge_handle h) {
-        return split_vertex( h->prev(), h->opposite())->opposite();
-    }
-
-    Halfedge_handle flip_edge( Halfedge_handle h) {
-        HalfedgeDS_items_decorator<HDS> D;
-        return D.flip_edge(h);
-    }
-
-    Halfedge_handle create_center_vertex( Halfedge_handle h) {
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_assertion( circulator_size( h->facet_begin())
-                        >= size_type(3));
-        return D.create_center_vertex(h);
-    }
-
-    Halfedge_handle erase_center_vertex( Halfedge_handle h) {
-        HalfedgeDS_decorator<HDS> D(hds_);
-        return D.erase_center_vertex(h);
-    }
-
-// Euler Operators Modifying Genus
-
-    Halfedge_handle split_loop( Halfedge_handle h,
-                                Halfedge_handle i,
-                                Halfedge_handle j) {
-        // cut the polyhedron into two parts along the cycle (h,i,j).
-        // Three copies of the vertices and two new triangles will be
-        // created. h,i,j will be incident to the first new triangle. The
-        // returnvalue will be an halfedge iterator denoting the new
-        // halfegdes of the second new triangle which was h beforehand.
-        // Precondition: h,i,j are distinct, consecutive vertices of the
-        // polyhedron and form a cycle: i.e. `h->vertex() == i->opposite()
-        // ->vertex()', ..., `j->vertex() == h->opposite()->vertex()'. The
-        // six facets incident to h,i,j are all distinct.
-        reserve( 3 + size_of_vertices(),
-                 6 + size_of_halfedges(),
-                 2 + size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( h != i);
-        CGAL_precondition( h != j);
-        CGAL_precondition( i != j);
-        CGAL_precondition( D.get_vertex(h) == D.get_vertex(i->opposite()));
-        CGAL_precondition( D.get_vertex(i) == D.get_vertex(j->opposite()));
-        CGAL_precondition( D.get_vertex(j) == D.get_vertex(h->opposite()));
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(i));
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(j));
-        CGAL_precondition( D.get_face(i) == Facet_handle() ||
-                           D.get_face(i) != D.get_face(j));
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(h->opposite()));
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(i->opposite()));
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(j->opposite()));
-        CGAL_precondition( D.get_face(i) == Facet_handle() ||
-                           D.get_face(i) != D.get_face(h->opposite()));
-        CGAL_precondition( D.get_face(i) == Facet_handle() ||
-                           D.get_face(i) != D.get_face(i->opposite()));
-        CGAL_precondition( D.get_face(i) == Facet_handle() ||
-                           D.get_face(i) != D.get_face(j->opposite()));
-        CGAL_precondition( D.get_face(j) == Facet_handle() ||
-                           D.get_face(j) != D.get_face(h->opposite()));
-        CGAL_precondition( D.get_face(j) == Facet_handle() ||
-                           D.get_face(j) != D.get_face(i->opposite()));
-        CGAL_precondition( D.get_face(j) == Facet_handle() ||
-                           D.get_face(j) != D.get_face(j->opposite()));
-        CGAL_precondition( D.get_face(h->opposite()) == Facet_handle() ||
-            D.get_face(h->opposite()) != D.get_face(i->opposite()));
-        CGAL_precondition( D.get_face(h->opposite()) == Facet_handle() ||
-            D.get_face(h->opposite()) != D.get_face(j->opposite()));
-        CGAL_precondition( D.get_face(i->opposite()) == Facet_handle() ||
-            D.get_face(i->opposite()) != D.get_face(j->opposite()));
-        return D.split_loop( h, i, j);
-    }
-
-    Halfedge_handle join_loop( Halfedge_handle h, Halfedge_handle g) {
-        // glues the boundary of two facets together. Both facets and the
-        // vertices of g gets removed. Returns an halfedge iterator for h.
-        // The invariant `join_loop( h, split_loop( h, i, j))' returns h
-        // and keeps the polyhedron unchanged. Precondition: `HDS'
-        // supports removal of vertices and facets. The facets denoted by
-        // h and g have equal size.
-        HalfedgeDS_decorator<HDS> D(hds_);
-        CGAL_precondition( D.get_face(h) == Facet_handle() ||
-                           D.get_face(h) != D.get_face(g));
-        CGAL_precondition( circulator_size( h->facet_begin())
-                           >= size_type(3));
-        CGAL_precondition( circulator_size( h->facet_begin())
-                           == circulator_size( g->facet_begin()));
-        return D.join_loop( h, g);
-    }
-
-// Modifying Facets and Holes
-
-    Halfedge_handle make_hole( Halfedge_handle h) {
-        // removes incident facet and makes all halfedges incident to the
-        // facet to border edges. Returns h. Precondition: `HDS'
-        // supports removal of facets. `! h.is_border()'.
-        HalfedgeDS_decorator<HDS> D(hds_);
-        return D.make_hole(h);
-    }
-
-    Halfedge_handle fill_hole( Halfedge_handle h) {
-        // fill a hole with a new created facet. Makes all border
-        // halfedges of the hole denoted by h incident to the new facet.
-        // Returns h. Precondition: `h.is_border()'.
-        reserve( size_of_vertices(),
-                 size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        return D.fill_hole(h);
-    }
-
-    Halfedge_handle add_vertex_and_facet_to_border( Halfedge_handle h,
-                                                    Halfedge_handle g) {
-        // creates a new facet within the hole incident to h and g by
-        // connecting the tip of g with the tip of h with two new
-        // halfedges and a new vertex and filling this separated part of
-        // the hole with a new facet. Returns the new halfedge incident to
-        // the new facet and the new vertex. Precondition: `h->is_border(
-        // )', `g->is_border()', `h != g', and g can be reached along the
-        // same hole starting with h.
-        CGAL_precondition( h != g);
-        reserve( 1 + size_of_vertices(),
-                 4 + size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        Halfedge_handle hh = D.add_face_to_border( h, g);
-        CGAL_assertion( hh == g->next());
-        D.split_vertex( g, hh->opposite());
-        return g->next();
-    }
-
-    Halfedge_handle add_facet_to_border( Halfedge_handle h,
-                                         Halfedge_handle g) {
-        // creates a new facet within the hole incident to h and g by
-        // connecting the tip of g with the tip of h with a new halfedge
-        // and filling this separated part of the hole with a new facet.
-        // Returns the new halfedge incident to the new facet.
-        // Precondition: `h->is_border()', `g->is_border()', `h != g',
-        // `h->next() != g', and g can be reached along the same hole
-        // starting with h.
-        CGAL_precondition( h != g);
-        CGAL_precondition( h->next() != g);
-        reserve( size_of_vertices(),
-                 2 + size_of_halfedges(),
-                 1 + size_of_facets());
-        HalfedgeDS_decorator<HDS> D(hds_);
-        return D.add_face_to_border( h, g);
-    }
-
-// Erasing
-
-    void erase_facet( Halfedge_handle h) {
-        // removes the incident facet of h and changes all halfedges
-        // incident to the facet into border edges or removes them from
-        // the polyhedral surface if they were already border edges. See
-        // `make_hole(h)' for a more specialized variant. Precondition:
-        // `Traits' supports removal.
-        HalfedgeDS_decorator<HDS> D(hds_);
-        D.erase_face(h);
-    }
-
-    void erase_connected_component( Halfedge_handle h) {
-        // removes the vertices, halfedges, and facets that belong to the
-        // connected component of h. Precondition: `Traits' supports
-        // removal.
-        HalfedgeDS_decorator<HDS> D(hds_);
-        D.erase_connected_component(h);
-    }
-
-    /// Erases the small connected components and the isolated vertices.
-    ///
-    /// @commentheading Preconditions:
-    /// supports vertices, halfedges, and removal operation.
-    ///
-    /// @commentheading Template Parameters:
-    /// @param nb_components_to_keep the number of large connected components to keep.
-    ///
-    /// @return the number of connected components erased (ignoring isolated vertices).
-    unsigned int keep_largest_connected_components(unsigned int nb_components_to_keep)
-    {
-        HalfedgeDS_decorator<HDS> D(hds_);
-        return D.keep_largest_connected_components(nb_components_to_keep);
-    }
-
-    void clear() { hds_.clear(); }
-        // removes all vertices, halfedges, and facets.
-
-    void erase_all() { clear(); }
-        // equivalent to `clear()'. Depricated.
-
-// Special Operations on Polyhedral Surfaces
-
-    void delegate( Modifier_base<HDS>& modifier) {
-        // calls the `operator()' of the `modifier'. Precondition: The
-        // `modifier' returns a consistent representation.
-        modifier( hds_);
-        CGAL_expensive_postcondition( is_valid());
-    }
-
-// Operations with Border Halfedges
-
-    size_type size_of_border_halfedges() const {
-        // number of border halfedges. An edge with no incident facet
-        // counts as two border halfedges. Precondition: `normalize_border
-        // ()' has been called and no halfedge insertion or removal and no
-        // change in border status of the halfedges have occured since
-        // then.
-        return hds_.size_of_border_halfedges();
-    }
-
-    size_type size_of_border_edges() const {
-        // number of border edges. If `size_of_border_edges() ==
-        // size_of_border_halfedges()' all border edges are incident to a
-        // facet on one side and to a hole on the other side.
-        // Precondition: `normalize_border()' has been called and no
-        // halfedge insertion or removal and no change in border status of
-        // the halfedges have occured since then.
-        return hds_.size_of_border_edges();
-    }
-
-    Halfedge_iterator border_halfedges_begin() {
-        // halfedge iterator starting with the border edges. The range [
-        // `halfedges_begin(), border_halfedges_begin()') denotes all
-        // non-border edges. The range [`border_halfedges_begin(),
-        // halfedges_end()') denotes all border edges. Precondition:
-        // `normalize_border()' has been called and no halfedge insertion
-        // or removal and no change in border status of the halfedges have
-        // occured since then.
-        return hds_.border_halfedges_begin();
-    }
-    Halfedge_const_iterator border_halfedges_begin() const {
-        return hds_.border_halfedges_begin();
-    }
-
-    // Convenient edge iterator
-    Edge_iterator border_edges_begin() { return border_halfedges_begin(); }
-    Edge_const_iterator border_edges_begin() const {
-        return border_halfedges_begin();
-    }
-
-    bool normalized_border_is_valid( bool verbose = false) const {
-        // checks whether all non-border edges precedes the border edges.
-        HalfedgeDS_const_decorator<HDS> decorator(hds_);
-        bool valid = decorator.normalized_border_is_valid( verbose);
-        for ( Halfedge_const_iterator i = border_halfedges_begin();
-              valid && (i != halfedges_end()); (++i, ++i)) {
-            if ( i->is_border()) {
-                Verbose_ostream verr(verbose);
-                verr << "    both halfedges of an edge are border "
-                        "halfedges." << std::endl;
-                valid = false;
-            }
-        }
-        return valid;
-    }
-
-    void normalize_border() {
-        // sorts halfedges such that the non-border edges precedes the
-        // border edges.
-        hds_.normalize_border();
-        CGAL_postcondition( normalized_border_is_valid());
-    }
-
-protected:            // Supports_face_plane
-    void inside_out_geometry( Tag_false) {}
-    void inside_out_geometry( Tag_true) {
-        typename Traits::Construct_opposite_plane_3 opp
-            = traits().construct_opposite_plane_3_object();
-        std::transform( planes_begin(), planes_end(), planes_begin(), opp);
-    }
-
-public:
-    void inside_out() {
-        // reverse facet orientation.
-        HalfedgeDS_decorator<HDS> decorator(hds_);
-        decorator.inside_out();
-        inside_out_geometry( Supports_face_plane());
-    }
-
-    bool is_valid( bool verb = false, int level = 0) const {
-        // checks the combinatorial consistency.
-        Verbose_ostream verr(verb);
-        verr << "begin CGAL::Polyhedron_3<...>::is_valid( verb=true, "
-                          "level = " << level << "):" << std::endl;
-        HalfedgeDS_const_decorator<HDS> D(hds_);
-        bool valid = D.is_valid( verb, level + 3);
-        // All halfedges.
-        Halfedge_const_iterator i   = halfedges_begin();
-        Halfedge_const_iterator end = halfedges_end();
-        size_type  n = 0;
-        for( ; valid && (i != end); ++i) {
-            verr << "halfedge " << n << std::endl;
-            // At least triangular facets and distinct geometry.
-            valid = valid && ( i->next() != i);
-            valid = valid && ( i->next()->next() != i);
-            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
-                               D.get_vertex(i) != D.get_vertex(i->opposite()));
-            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
-                               D.get_vertex(i) != D.get_vertex(i->next()));
-            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
-                        D.get_vertex(i) != D.get_vertex(i->next()->next()));
-            if ( ! valid) {
-                verr << "    incident facet is not at least a triangle."
-                     << std::endl;
-                break;
-            }
-            // Distinct facets on each side of an halfegde.
-            valid = valid && ( ! check_tag( Supports_halfedge_face()) ||
-                               D.get_face(i) != D.get_face(i->opposite()));
-            if ( ! valid) {
-                verr << "    both incident facets are equal." << std::endl;
-                break;
-            }
-            ++n;
-        }
-        valid = valid && (n == size_of_halfedges());
-        if ( n != size_of_halfedges())
-            verr << "counting halfedges failed." << std::endl;
-
-        verr << "end of CGAL::Polyhedron_3<...>::is_valid(): structure is "
-             << ( valid ? "valid." : "NOT VALID.") << std::endl;
-        return valid;
-    }
-};
-
-} //namespace CGAL
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-#endif
-
-#endif // CGAL_POLYHEDRON_3_H //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_incremental_builder_3.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_incremental_builder_3.h
deleted file mode 100644
index d6e3779..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_incremental_builder_3.h
+++ /dev/null
@@ -1,914 +0,0 @@
-// Copyright (c) 1997  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>)
-
-#ifndef CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H
-#define CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H 1
-
-#include <CGAL/basic.h>
-#include <CGAL/Random_access_adaptor.h>
-#include <CGAL/HalfedgeDS_decorator.h>
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/IO/Verbose_ostream.h>
-#include <vector>
-#include <cstddef>
-
-namespace CGAL {
-
-template < class HalfedgeDS_>
-class Polyhedron_incremental_builder_3 {
-public:
-    typedef HalfedgeDS_                     HDS; // internal
-    typedef HalfedgeDS_                     HalfedgeDS;
-    typedef typename HDS::Vertex            Vertex;
-    typedef typename HDS::Halfedge          Halfedge;
-    typedef typename HDS::Face              Face;
-    typedef typename HDS::Vertex_handle     Vertex_handle;
-    typedef typename HDS::Halfedge_handle   Halfedge_handle;
-    typedef typename HDS::Face_handle       Face_handle;
-    typedef typename HDS::Face_handle       Facet_handle;
-    typedef typename Vertex::Base           VBase;
-    typedef typename Halfedge::Base         HBase;
-    typedef typename Vertex::Point          Point_3;
-    typedef typename HDS::size_type         size_type;
-
-protected:
-    typedef typename HDS::Supports_vertex_halfedge  Supports_vertex_halfedge;
-    typedef typename HDS::Supports_removal          Supports_removal;
-    typedef typename HDS::Vertex_iterator           Vertex_iterator;
-    typedef typename HDS::Halfedge_iterator         Halfedge_iterator;
-    typedef Random_access_adaptor<Vertex_iterator>  Random_access_index;
-
-    bool                      m_error;
-    bool                      m_verbose;
-    HDS&                      hds;
-    size_type                 rollback_v;
-    size_type                 rollback_f;
-    size_type                 rollback_h;
-    size_type                 new_vertices;
-    size_type                 new_faces;
-    size_type                 new_halfedges;
-    Face_handle               current_face;
-    Random_access_index       index_to_vertex_map;
-    std::vector< Halfedge_handle>  vertex_to_edge_map;
-
-    Halfedge_handle           g1;      // first halfedge, 0 denotes none.
-    Halfedge_handle           gprime;
-    Halfedge_handle           h1;      // current halfedge
-    size_type                 w1;      // first vertex.
-    size_type                 w2;      // second vertex.
-    size_type                 v1;      // current vertex
-    bool                      first_vertex;
-    bool                      last_vertex;
-
-    CGAL_assertion_code( int check_protocoll;)  // use to check protocoll.
-    // states for checking: 0 = created, 1 = constructing, 2 = make face.
-
-    // Implement the vertex_to_edge_map either with an array or
-    // the halfedge pointer in the vertices (if supported).
-    // ----------------------------------------------------
-    void initialize_vertex_to_edge_map( size_type  n, bool mode, Tag_true) {
-        vertex_to_edge_map.clear();
-        vertex_to_edge_map.resize(n);
-        if ( mode) {
-            // go through all halfedges and keep a halfedge for each
-            // vertex found in a hashmap.
-            size_type i = 0;
-            for ( Vertex_iterator vi = hds.vertices_begin();
-                  vi != hds.vertices_end();
-                  ++vi) {
-                set_vertex_to_edge_map( i, vi->halfedge());
-                ++i;
-            }
-        }
-    }
-    void initialize_vertex_to_edge_map( size_type n, bool mode, Tag_false){
-        vertex_to_edge_map.clear();
-        vertex_to_edge_map.resize(n);
-        if ( mode) {
-            // go through all halfedges and keep a halfedge for each
-            // vertex found in a hashmap.
-            typedef Unique_hash_map< Vertex_iterator, Halfedge_handle> V_map;
-            Halfedge_handle hh;
-            V_map v_map( hh, hds.size_of_vertices());
-            for ( Halfedge_iterator hi = hds.halfedges_begin();
-                  hi != hds.halfedges_end();
-                  ++hi) {
-                v_map[ hi->vertex()] = hi;
-            }
-            size_type i = 0;
-            for ( Vertex_iterator vi = hds.vertices_begin();
-                  vi != hds.vertices_end();
-                  ++vi) {
-                //set_vertex_to_edge_map( i, v_map[ index_to_vertex_map[i]]);
-                set_vertex_to_edge_map( i, v_map[ vi]);
-                ++i;
-            }
-        }
-    }
-    void initialize_vertex_to_edge_map( size_type n, bool mode) {
-        initialize_vertex_to_edge_map(n, mode, Supports_vertex_halfedge());
-    }
-    void push_back_vertex_to_edge_map( Halfedge_handle h, Tag_true) {
-        push_back_vertex_to_edge_map( h, Tag_false());
-    }
-    void push_back_vertex_to_edge_map( Halfedge_handle h, Tag_false) {
-        vertex_to_edge_map.push_back(h);
-    }
-    void push_back_vertex_to_edge_map( Halfedge_handle h) {
-        push_back_vertex_to_edge_map( h, Supports_vertex_halfedge());
-    }
-    Halfedge_handle get_vertex_to_edge_map( size_type i, Tag_true) {
-        // Use the halfedge pointer within the vertex.
-        //CGAL_assertion( index_to_vertex_map[i]->halfedge() == get_vertex_to_edge_map(i, Tag_false()));
-        return index_to_vertex_map[i]->halfedge();
-    }
-    Halfedge_handle get_vertex_to_edge_map( size_type i, Tag_false) {
-        // Use the self-managed array vertex_to_edge_map.
-        return vertex_to_edge_map[i];
-    }
-    Halfedge_handle get_vertex_to_edge_map( size_type i) {
-        return get_vertex_to_edge_map( i, Supports_vertex_halfedge());
-    }
-    void set_vertex_to_edge_map( size_type i, Halfedge_handle h, Tag_true) {
-        set_vertex_to_edge_map( i, h, Tag_false());
-        // Use the halfedge pointer within the vertex.
-        index_to_vertex_map[i]->VBase::set_halfedge(h);
-    }
-    void set_vertex_to_edge_map( size_type i, Halfedge_handle h, Tag_false) {
-        // Use the self-managed array vertex_to_edge_map.
-        CGAL_assertion(i < vertex_to_edge_map.size());
-        vertex_to_edge_map[i] = h;
-    }
-    void set_vertex_to_edge_map( size_type i, Halfedge_handle h) {
-        set_vertex_to_edge_map( i, h, Supports_vertex_halfedge());
-    }
-
-// An Incremental Builder for Polyhedral Surfaces
-// ----------------------------------------------
-// DEFINITION
-//
-// Polyhedron_incremental_builder_3<HDS> is an auxiliary class that
-// supports the incremental construction of polyhedral surfaces. This is
-// for example convinient when constructing polyhedral surfaces from
-// files. The incremental construction starts with a list of all point
-// coordinates and concludes with a list of all facet polygons. Edges are
-// not explicitly specified. They are derived from the incidence
-// information provided from the facet polygons. These are given as a
-// sequence of vertex indices. The correct protocol of method calls to
-// build a polyhedral surface can be stated as regular expression:
-//
-// `begin_surface (add_vertex | (begin_facet add_vertex_to_facet*
-//  end_facet))* end_surface '
-//
-// PARAMETERS
-//
-// `HDS' is the halfedge data structure used to represent the
-// polyhedral surface that is to be constructed.
-//
-// CREATION
-public:
-    bool error() const { return m_error; }
-
-    Polyhedron_incremental_builder_3( HDS& h, bool verbose = false)
-        // stores a reference to the halfedge data structure `h' in the
-        // internal state. The previous polyhedral surface in `h'
-        // remains unchanged. The incremental builder adds the new
-        // polyhedral surface to the old one.
-      : m_error( false), m_verbose( verbose), hds(h) {
-        CGAL_assertion_code(check_protocoll = 0;)
-    }
-
-    ~Polyhedron_incremental_builder_3() {
-        CGAL_assertion( check_protocoll == 0);
-    }
-
-// OPERATIONS
-    enum { RELATIVE_INDEXING = 0, ABSOLUTE_INDEXING = 1};
-
-
-    void begin_surface( std::size_t v, std::size_t f, std::size_t h = 0,
-                        int mode = RELATIVE_INDEXING);
-        // starts the construction. v is the number of new
-        // vertices to expect, f the number of new facets, and h the number of
-        // new halfedges. If h is unspecified (`== 0') it is estimated using
-        // Euler equations (plus 5% for the so far unkown holes and genus
-        // of the object). These values are used to reserve space in the
-        // polyhedron representation `HDS'. If the representation
-        // supports insertion these values do not restrict the class of
-        // readable polyhedrons. If the representation does not support
-        // insertion the object must fit in the reserved sizes.
-        //    If `mode' is set to ABSOLUTE_INDEXING the incremental builder
-        // uses absolute indexing and the vertices of the old polyhedral 
-        // surface can be used in new facets. Otherwise relative indexing is 
-        // used starting with new indices for the new construction.
-
-
-    Vertex_handle add_vertex( const Point_3& p) {
-        // adds p to the vertex list.
-        CGAL_assertion( check_protocoll == 1);
-        if ( hds.size_of_vertices() >= hds.capacity_of_vertices()) {
-            Verbose_ostream verr( m_verbose);
-            verr << " " << std::endl;
-            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
-                 << std::endl;
-            verr << "add_vertex(): capacity error: more than " << new_vertices
-                 << " vertices added." << std::endl;
-            m_error = true;
-            return Vertex_handle();
-        }
-        HalfedgeDS_decorator<HDS> decorator(hds);
-        Vertex_handle v = decorator.vertices_push_back( Vertex(p));
-        index_to_vertex_map.push_back( v);
-        decorator.set_vertex_halfedge( v, Halfedge_handle());
-        push_back_vertex_to_edge_map( Halfedge_handle());
-        ++new_vertices;
-        return v;
-    }
-
-    // returns handle for the vertex of index i
-    Vertex_handle vertex( std::size_t i) {
-        if ( i < new_vertices)
-            return index_to_vertex_map[i];
-        return Vertex_handle();
-    }
-
-    Facet_handle begin_facet() {
-        // starts a facet.
-        if ( m_error)
-            return Facet_handle();
-        CGAL_assertion( check_protocoll == 1);
-        CGAL_assertion_code( check_protocoll = 2;)
-        if ( hds.size_of_faces() >= hds.capacity_of_faces()) {
-            Verbose_ostream verr( m_verbose);
-            verr << " " << std::endl;
-            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
-                 << std::endl;
-            verr << "begin_facet(): capacity error: more than " << new_vertices
-                 << " facets added." << std::endl;
-            m_error = true;
-            return Facet_handle();
-        }
-        // initialize all status variables.
-        first_vertex = true;  // denotes 'no vertex yet'
-        g1 =  Halfedge_handle();  // denotes 'no halfedge yet'
-        last_vertex = false;
-
-        HalfedgeDS_decorator<HDS> decorator(hds);
-        current_face = decorator.faces_push_back( Face());
-        return current_face;
-    }
-
-    void add_vertex_to_facet( std::size_t i);
-        // adds a vertex with index i to the current facet. The first
-        // point added with `add_vertex()' has the index 0.
-
-    Halfedge_handle end_facet() {
-        // ends a facet.
-        if ( m_error)
-            return Halfedge_handle();
-        CGAL_assertion( check_protocoll == 2);
-        CGAL_assertion( ! first_vertex);
-        // cleanup all static status variables
-        add_vertex_to_facet( w1);
-        if ( m_error)
-            return Halfedge_handle();
-        last_vertex = true;
-        add_vertex_to_facet( w2);
-        if ( m_error)
-            return Halfedge_handle();
-        CGAL_assertion( check_protocoll == 2);
-        CGAL_assertion_code( check_protocoll = 1;)
-        HalfedgeDS_items_decorator<HDS> decorator;
-        Halfedge_handle h = get_vertex_to_edge_map(w1);
-        decorator.set_face_halfedge( current_face, h);
-        ++new_faces;
-        return h;
-    }
-
-    template <class InputIterator>
-    Halfedge_handle add_facet( InputIterator first, InputIterator beyond) {
-        // synonym for begin_facet(), a call to add_vertex_to_facet() for each iterator
-        // value type, and end_facet().
-        begin_facet();
-        for ( ; ! m_error && first != beyond; ++first)
-            add_vertex_to_facet( *first);
-        if ( m_error)
-            return Halfedge_handle();
-        return end_facet();
-    }
-
-    template <class InputIterator>
-    bool test_facet( InputIterator first, InputIterator beyond) {
-        // tests if the facet described by the vertex indices in the 
-        // range [first,beyond) can be inserted without creating a 
-        // a non-manifold (and therefore invalid) situation.
-        // First, create a copy of the indices and close it cyclically
-        std::vector< std::size_t> indices( first, beyond);
-        if ( indices.size() < 3)
-            return false;
-        indices.push_back( indices[0]);
-        return test_facet_indices( indices);
-    }
-
-    bool test_facet_indices( std::vector< std::size_t> indices);
-
-    void end_surface();
-        // ends the construction.
-
-    bool check_unconnected_vertices();
-        // returns `true' if unconnected vertices are detected. If `verb'
-        // is set to `true' debug information about the unconnected
-        // vertices is printed.
-
-    bool remove_unconnected_vertices( Tag_true);
-    bool remove_unconnected_vertices( Tag_false) {
-        return ! check_unconnected_vertices();
-    }
-    bool remove_unconnected_vertices() {
-        // returns `true' if all unconnected vertices could be removed
-        // successfully.
-        return remove_unconnected_vertices( Supports_removal());
-    }
-
-    void rollback();
-
-protected:
-    Halfedge_handle lookup_hole( std::size_t w) {
-        CGAL_assertion( w < new_vertices);
-        return lookup_hole( get_vertex_to_edge_map( w));
-    }
-
-    size_type find_vertex( Vertex_handle v) {
-        // Returns 0 if v == NULL.
-        if ( v == Vertex_handle() )
-            return 0;
-        size_type n = 0;
-        typename HDS::Vertex_iterator it = hds.vertices_begin();
-        while ( it != v) {
-            CGAL_assertion( it != hds.vertices_end());
-            ++n;
-            ++it;
-        }
-        n = n - rollback_v;
-        return n;
-    }
-
-    size_type find_facet( Face_handle f) {
-        // Returns 0 if f == NULL.
-        if ( f == Face_handle())
-            return 0;
-        size_type n = 0;
-        typename HDS::Face_iterator it = hds.faces_begin();
-        while ( it != f) {
-            CGAL_assertion( it != hds.faces_end());
-            ++n;
-            ++it;
-        }
-        n = n - rollback_f;
-        return n;
-    }
-
-    Halfedge_handle lookup_halfedge( size_type w, size_type v) {
-        // Pre: 0 <= w,v < new_vertices
-        // Case a: It exists an halfedge g from w to v:
-        //     g must be a border halfedge and the facet of g->opposite()
-        //     must be set and different from the current facet.
-        //     Set the facet of g to the current facet. Return the
-        //     halfedge pointing to g.
-        // Case b: It exists no halfedge from w to v:
-        //     Create a new pair of halfedges g and g->opposite().
-        //     Set the facet of g to the current facet and g->opposite()
-        //     to a border halfedge. Assign the vertex references.
-        //     Set g->opposite()->next() to g. Return g->opposite().
-        typedef typename HDS::Supports_halfedge_vertex 
-            Supports_halfedge_vertex;
-        Assert_compile_time_tag( Supports_halfedge_vertex(), Tag_true());
-        CGAL_assertion( w < new_vertices);
-        CGAL_assertion( v < new_vertices);
-        CGAL_assertion( ! last_vertex);
-        HalfedgeDS_items_decorator<HDS> decorator;
-        Halfedge_handle e = get_vertex_to_edge_map( w);
-        if ( e != Halfedge_handle()) {
-            CGAL_assertion( e->vertex() == index_to_vertex_map[w]);
-            // check that the facet has no self intersections
-            if ( current_face != Face_handle()
-                 && current_face == decorator.get_face(e)) {
-                Verbose_ostream verr( m_verbose);
-                verr << " " << std::endl;
-                verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
-                     << std::endl;
-                verr << "lookup_halfedge(): input error: facet "
-                     << new_faces << " has a self intersection at vertex "
-                     << w << "." << std::endl;
-                m_error = true;
-                return Halfedge_handle();
-            }
-            Halfedge_handle start_edge( e);
-            do {
-                if ( e->next()->vertex() == index_to_vertex_map[v]) {
-                    if ( ! e->next()->is_border()) {
-                        Verbose_ostream verr( m_verbose);
-                        verr << " " << std::endl;
-                        verr << "CGAL::Polyhedron_incremental_builder_3"
-                                "<HDS>::" << std::endl;
-                        verr << "lookup_halfedge(): input error: facet "
-                             << new_faces << " shares a halfedge from "
-                                "vertex " <<  w << " to vertex " << v
-                             << " with";
-                        if (  m_verbose && current_face != Face_handle())
-                            verr << " facet "
-                                 << find_facet( decorator.get_face(e->next()))
-                                 << '.' << std::endl;
-                        else
-                            verr << " another facet." << std::endl;
-                        m_error = true;
-                        return Halfedge_handle();
-                    }
-                    CGAL_assertion( ! e->next()->opposite()->is_border());
-                    if ( current_face != Face_handle() && current_face ==
-                         decorator.get_face( e->next()->opposite())) {
-                        Verbose_ostream verr( m_verbose);
-                        verr << " " << std::endl;
-                        verr << "CGAL::Polyhedron_incremental_builder_3"
-                                "<HDS>::" << std::endl;
-                        verr << "lookup_halfedge(): input error: facet "
-                             << new_faces << " has a self intersection "
-                                "at the halfedge from vertex " << w
-                             << " to vertex " << v << "." << std::endl;
-                        m_error = true;
-                        return Halfedge_handle();
-                    }
-                    decorator.set_face( e->next(), current_face);
-                    // The following line prevents e->next() to be picked
-                    // by get_vertex_to_edge_map(v) in an upcoming call
-                    // of lookup_halfedge(v, *)
-                    set_vertex_to_edge_map( v, e->next()->next()->opposite());
-                    return e;
-                }
-                e = e->next()->opposite();
-            } while ( e != start_edge);
-        }
-        // create a new halfedge
-        if ( hds.size_of_halfedges() >= hds.capacity_of_halfedges()) {
-            Verbose_ostream verr( m_verbose);
-            verr << " " << std::endl;
-            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
-                 << std::endl;
-            verr << "lookup_halfedge(): capacity error: more than "
-                 << new_halfedges << " halfedges added while creating facet"
-                 << new_faces << '.' << std::endl;
-            m_error = true;
-            return Halfedge_handle();
-        }
-        e = hds.edges_push_back( Halfedge(), Halfedge());
-        new_halfedges++;
-        new_halfedges++;
-        decorator.set_face( e, current_face);
-        e->HBase::set_vertex( index_to_vertex_map[v]);
-        e->HBase::set_next( Halfedge_handle());
-        decorator.set_prev( e, e->opposite());
-        e = e->opposite();
-        e->HBase::set_vertex( index_to_vertex_map[w]);
-        e->HBase::set_next( e->opposite());
-        return e;
-    }
-
-    Halfedge_handle lookup_hole( Halfedge_handle e) {
-        // Halfedge e points to a vertex w. Walk around w to find a hole
-        // in the facet structure. Report an error if none exist. Return
-        // the halfedge at this hole that points to the vertex w.
-        CGAL_assertion( e != Halfedge_handle());
-        HalfedgeDS_items_decorator<HDS> decorator;
-        Halfedge_handle start_edge( e);
-        do {
-            if ( e->next()->is_border()) {
-                return e;
-            }
-            e = e->next()->opposite();
-        } while ( e != start_edge);
-
-        Verbose_ostream verr( m_verbose);
-        verr << " " << std::endl;
-        verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::" << std::endl;
-        verr << "lookup_hole(): input error: at vertex "
-             << find_vertex( e->vertex())
-             << " a closed surface already exists and facet "
-             << new_faces << " is nonetheless adjacent." << std::endl;
-        if (  m_verbose && current_face != Face_handle()) {
-            verr << "             The closed cycle of facets is:";
-            do {
-                if ( ! e->is_border())
-                    verr << " " << find_facet( decorator.get_face(e));
-                e = e->next()->opposite();
-            } while ( e != start_edge);
-            verr << '.' << std::endl;
-        }
-        m_error = true;
-        return Halfedge_handle();
-    }
-};
-
-template < class HDS>
-void
-Polyhedron_incremental_builder_3<HDS>::
-rollback() {
-    CGAL_assertion( rollback_v <= hds.size_of_vertices());
-    CGAL_assertion( rollback_h <= hds.size_of_halfedges());
-    CGAL_assertion( rollback_f <= hds.size_of_faces());
-    if ( rollback_v == 0 && rollback_h == 0 && rollback_f == 0) {
-        hds.clear();
-    } else {
-        while ( rollback_v != hds.size_of_vertices())
-            hds.vertices_pop_back();
-        CGAL_assertion((( hds.size_of_halfedges() - rollback_h) & 1) == 0);
-        while ( rollback_h != hds.size_of_halfedges())
-            hds.edges_pop_back();
-        while ( rollback_f != hds.size_of_faces())
-            hds.faces_pop_back();
-    }
-    m_error = false;
-    CGAL_assertion_code( check_protocoll = 0;)
-}
-
-template < class HDS>  CGAL_MEDIUM_INLINE
-void
-Polyhedron_incremental_builder_3<HDS>::
-begin_surface( std::size_t v, std::size_t f, std::size_t h, int mode) {
-    CGAL_assertion( check_protocoll == 0);
-    CGAL_assertion_code( check_protocoll = 1;)
-    CGAL_assertion( ! m_error);
-    if ( mode == RELATIVE_INDEXING) {
-        new_vertices  = 0;
-        new_faces     = 0;
-        new_halfedges = 0;
-        rollback_v    = hds.size_of_vertices();
-        rollback_f    = hds.size_of_faces();
-        rollback_h    = hds.size_of_halfedges();
-    } else {
-        new_vertices  = hds.size_of_vertices();
-        new_faces     = hds.size_of_faces();
-        new_halfedges = hds.size_of_halfedges();
-        rollback_v    = 0;
-        rollback_f    = 0;
-        rollback_h    = 0;
-    }
-    if ( h == 0) {
-        // Use the Eulerian equation for connected planar graphs. We do
-        // not know the number of facets that are holes and we do not
-        // know the genus of the surface. So we add 12 and a factor of
-        // 5 percent.
-      h = (std::size_t)((double)(v + f - 2 + 12) * 2.1);
-    }
-    hds.reserve( hds.size_of_vertices()  + v,
-                 hds.size_of_halfedges() + h,
-                 hds.size_of_faces()     + f);
-    if ( mode == RELATIVE_INDEXING) {
-        index_to_vertex_map = Random_access_index( hds.vertices_end());
-        index_to_vertex_map.reserve(v);
-        initialize_vertex_to_edge_map( v, false);
-    } else {
-        index_to_vertex_map = Random_access_index( hds.vertices_begin(),
-                                                   hds.vertices_end());
-        index_to_vertex_map.reserve( hds.size_of_vertices() + v);
-        initialize_vertex_to_edge_map( hds.size_of_vertices() + v, true);
-    }
-}
-
-template < class HDS>
-void
-Polyhedron_incremental_builder_3<HDS>::
-add_vertex_to_facet( std::size_t v2) {
-    if ( m_error)
-        return;
-    CGAL_assertion( check_protocoll == 2);
-    if ( v2 >= new_vertices) {
-        Verbose_ostream verr( m_verbose);
-        verr << " " << std::endl;
-        verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
-             << std::endl;
-        verr << "add_vertex_to_facet(): vertex index " << v2
-             << " is out-of-range [0," << new_vertices-1 << "]."
-             << std::endl;
-        m_error = true;
-        return;
-    }
-    HalfedgeDS_items_decorator<HDS> decorator;
-
-    if ( first_vertex) {
-        CGAL_assertion( ! last_vertex);
-        w1 = v2;
-        first_vertex = false;
-        return;
-    }
-    if ( g1 == Halfedge_handle()) {
-        CGAL_assertion( ! last_vertex);
-        gprime  = lookup_halfedge( w1, v2);
-        if ( m_error)
-            return;
-        h1 = g1 = gprime->next();
-        v1 = w2 = v2;
-        return;
-    }
-    // g1, h1, v1, w1, w2 are set. Insert halfedge.
-    // Lookup v1-->v2
-    Halfedge_handle hprime;
-    if ( last_vertex)
-        hprime = gprime;
-    else {
-        hprime = lookup_halfedge( v1, v2);
-        if ( m_error)
-            return;
-    }
-    Halfedge_handle h2 = hprime->next();
-    CGAL_assertion( ! last_vertex || h2 == g1);
-    Halfedge_handle prev = h1->next();
-    h1->HBase::set_next( h2);
-    decorator.set_prev( h2, h1);
-
-    if ( get_vertex_to_edge_map( v1) == Halfedge_handle()) {  // case 1:
-        h2->opposite()->HBase::set_next( h1->opposite());
-        decorator.set_prev( h1->opposite(), h2->opposite());
-    } else {                                                  // case 2:
-        bool b1 = h1->opposite()->is_border();
-        bool b2 = h2->opposite()->is_border();
-        if ( b1 && b2) {
-            Halfedge_handle hole = lookup_hole( v1);
-            if ( m_error)
-                return;
-            CGAL_assertion( hole != Halfedge_handle());
-            h2->opposite()->HBase::set_next( hole->next());
-            decorator.set_prev( hole->next(), h2->opposite());
-            hole->HBase::set_next( h1->opposite());
-            decorator.set_prev( h1->opposite(), hole);
-        } else if ( b2) {                                     // case 2.b:
-            CGAL_assertion( prev->is_border());
-            h2->opposite()->HBase::set_next( prev);
-            decorator.set_prev( prev, h2->opposite());
-        } else if ( b1) {                                     // case 2.c:
-            CGAL_assertion( hprime->is_border());
-            hprime->HBase::set_next( h1->opposite());
-            decorator.set_prev( h1->opposite(), hprime);
-        } else if ( h2->opposite()->next() == h1->opposite()) {// case 2.d:
-            // f1 == f2
-            CGAL_assertion( decorator.get_face( h1->opposite()) ==
-                       decorator.get_face( h2->opposite()));
-        } else {                                              // case 2.e:
-            if ( prev == h2) {                                // case _i:
-                // nothing to be done, hole is closed.
-            } else {                                          // case _ii:
-                CGAL_assertion( prev->is_border());
-                CGAL_assertion( hprime->is_border());
-                hprime->HBase::set_next( prev);
-                decorator.set_prev( prev, hprime);
-                // Check whether the halfedges around v1 are connected.
-                // It is sufficient to check it for h1 to prev.
-                // Assert loop termination:
-                CGAL_assertion_code( std::size_t k = 0;)
-                // Look for a hole in the facet complex starting at h1.
-                Halfedge_handle hole;
-                Halfedge_handle e = h1;
-                do {
-                    if ( e->is_border())
-                        hole = e;
-                    e = e->next()->opposite();
-                    CGAL_assertion( k++ < hds.size_of_halfedges());
-                } while ( e->next() != prev && e != h1);
-                if ( e == h1) {
-                    // disconnected facet complexes
-                    if ( hole != Halfedge_handle()) {
-                        // The complex can be connected with
-                        // the hole at hprime.
-                        hprime->HBase::set_next( hole->next());
-                        decorator.set_prev( hole->next(), hprime);
-                        hole->HBase::set_next( prev);
-                        decorator.set_prev( prev, hole);
-                    } else {
-                        Verbose_ostream verr( m_verbose);
-                        verr << " " << std::endl;
-                        verr << "CGAL::Polyhedron_incremental_builder_3<"
-                                "HDS>::" << std::endl;
-                        verr << "add_vertex_to_facet(): input error: "
-                                "disconnected facet complexes at vertex "
-                             << v1 << ":" << std::endl;
-
-                        if ( m_verbose && current_face != Face_handle()) {
-                            verr << "           involved facets are:";
-                            do {
-                                if ( ! e->is_border())
-                                    verr << " " << find_facet(
-                                                decorator.get_face(e));
-                                e = e->next()->opposite();
-                            } while ( e != h1);
-                            verr << " (closed cycle) and";
-                            e = hprime;
-                            do {
-                                if ( ! e->is_border())
-                                    verr << " " << find_facet(
-                                                decorator.get_face(e));
-                            } while ( e != hprime);
-                            verr << "." << std::endl;
-                        }
-                        m_error = true;
-                        return;
-                    }
-                }
-            }
-        }
-    }
-    if ( h1->vertex() == index_to_vertex_map[v1])
-        set_vertex_to_edge_map( v1, h1);
-    CGAL_assertion( h1->vertex() == index_to_vertex_map[v1]);
-    h1 = h2;
-    v1 = v2;
-}
-
-template < class HDS>
-bool
-Polyhedron_incremental_builder_3<HDS>::
-test_facet_indices( std::vector< std::size_t> indices) {
-    typedef typename HDS::Supports_halfedge_vertex Supports_halfedge_vertex;
-    Assert_compile_time_tag( Supports_halfedge_vertex(), Tag_true());
-    // tests if the facet described by the vertex indices can be inserted 
-    // without creating a non-manifold (and therefore invalid) situation.
-    // indices are cyclically closed once.
-    std::size_t n = indices.size() - 1;
-    // Test if a vertex is not twice in the indices
-    for ( std::size_t i = 0; i < n; ++i) {
-        CGAL_precondition( indices[i] < new_vertices);
-        // check if vertex indices[i] is already in the sequence [0..i-1]
-        for ( std::size_t k = 0; k < i; ++k) {
-            if ( indices[k] == indices[i])
-                return false;
-        }
-    }
-    // Test non-manifold halfedges
-    for ( std::size_t i = 0; i < n; ++i) {
-        // halfedge goes from vertex indices[i] to indices[i+1]
-        // we know already that the halfedge is only once in the sequence
-        // (otherwise the end-vertices would be twice in the sequence too)
-        // check if halfedge is already in the HDS and is not border halfedge
-        Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
-        Vertex_handle   w = index_to_vertex_map[indices[i+1]];
-        if ( v != Halfedge_handle()
-             && get_vertex_to_edge_map(indices[i+1]) != Halfedge_handle()) {
-            // cycle through halfedge-loop and find edge to indices[i+1]
-            Halfedge_handle vstart = v;
-            do {
-                v = v->next()->opposite();
-            } while ( v->next()->vertex() != w && v != vstart);
-            if ( v->next()->vertex() == w && ! v->next()->is_border())
-                return false;
-        }
-    }
-    // test non-manifold vertices
-    for ( std::size_t i = 0; i < n; ++i) {
-        // since we don't allow duplicates in indices[..] and we 
-        // tested for non-manifold halfedges already, we just need to check
-        // if the vertex indices[i] is not a closed manifold yet.
-        Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
-        if ( v != Halfedge_handle()) {
-            Halfedge_handle vstart = v;
-            do {
-                v = v->next()->opposite();
-            } while ( ! v->is_border() && v != vstart);
-            if ( ! v->is_border())
-                return false;
-        }
-    }
-    
-    //Test if all halfedges of the new face 
-    //are possibly consecutive border halfedges in the HDS.
-    //Possibly because it may be not directly encoded in the HDS
-    //(using next() function ). This situation can occur when one or
-    //more facets share only a vertex: For example, the new facet we try to add
-    //would make the vertex indices[i] a manifold but this should be forbidden
-    //if a facet only incident to that vertex has already been inserted.
-    //We check this for each vertex of the sequence.
-    for ( std::size_t i = 0; i < n; ++i) {
-      std::size_t prev_index=indices[ (i-1+n)%n];
-      std::size_t next_index=indices[ (i+1)%n];
-      Vertex_handle   previous_vertex = index_to_vertex_map[ prev_index ];
-      Vertex_handle   next_vertex     = index_to_vertex_map[ next_index ];
-      
-      Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
-      
-      if ( v == Halfedge_handle() || 
-           get_vertex_to_edge_map(prev_index) == Halfedge_handle() ||
-           get_vertex_to_edge_map(next_index) == Halfedge_handle()
-         ) continue;
-      
-      Halfedge_handle start=v;
-      //halfedges pointing to/running out from vertex indices[i]
-      //and that need to be possibly consecutive
-      Halfedge_handle previous=Halfedge_handle(),next=Halfedge_handle();
-      
-      //look for a halfedge incident to vertex indices[i]
-      //and which opposite is incident to previous_vertex
-      do{
-        if (v->opposite()->vertex()==previous_vertex){
-          previous=v;
-          CGAL_precondition(previous->is_border());
-          break;
-        }
-        v = v->next()->opposite();
-      }
-      while (v!=start);
-      
-      if (previous!=Halfedge_handle()){
-        v=v->next()->opposite();
-        //previous and next are already consecutive in the HDS
-        if (v->opposite()->vertex()==next_vertex) continue;
-        
-        //look for a border halfedge which opposite is
-        //incident to next_vertex: set next halfedge
-        do
-        {
-          if (v->opposite()->vertex()==next_vertex){
-            next=v->opposite();
-            break;
-          }
-          v=v->next()->opposite();
-        }
-        while(v!=previous);
-        if (next==Halfedge_handle()) continue;
-        
-        //check if no constraint prevents
-        //previous and next to be adjacent: 
-        do{
-          v=v->next()->opposite();
-          if ( v->opposite()->is_border() ) break;
-        }
-        while (v!=previous);
-        if (v==previous) return false;
-        start=v;
-      }
-    }
-    
-    return true;
-}
-
-
-template < class HDS>  CGAL_MEDIUM_INLINE
-void
-Polyhedron_incremental_builder_3<HDS>::
-end_surface() {
-    if ( m_error)
-        return;
-    CGAL_assertion( check_protocoll == 1);
-    CGAL_assertion_code( check_protocoll = 0;)
-}
-
-template < class HDS>
-bool
-Polyhedron_incremental_builder_3<HDS>::
-check_unconnected_vertices() {
-    if ( m_error)
-        return false;
-    bool unconnected = false;
-    Verbose_ostream verr( m_verbose);
-    for ( std::size_t i = 0; i < new_vertices; i++) {
-        if ( get_vertex_to_edge_map( i) == Halfedge_handle()) {
-            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::\n"
-                 << "check_unconnected_vertices( verb = true): "
-                 << "vertex " << i << " is unconnected." << std::endl;
-            unconnected = true;
-        }
-    }
-    return unconnected;
-}
-
-template < class HDS>
-bool
-Polyhedron_incremental_builder_3<HDS>::
-remove_unconnected_vertices( Tag_true) {
-    if ( m_error)
-        return true;
-    for( std::size_t i = 0; i < new_vertices; i++) {
-        if( get_vertex_to_edge_map( i) == Halfedge_handle()) {
-            hds.vertices_erase( index_to_vertex_map[i]);
-        }
-    }
-    return true;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_slicer_3.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_slicer_3.h
deleted file mode 100644
index 3b220b0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_slicer_3.h
+++ /dev/null
@@ -1,444 +0,0 @@
-// Copyright (c) 2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ilker O. Yaz
-
-#ifndef CGAL_POLYHEDRON_SLICER_3_H
-#define CGAL_POLYHEDRON_SLICER_3_H
-
-#include <CGAL/AABB_tree.h>
-#include <CGAL/AABB_traits.h>
-#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
-#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
-
-#include <CGAL/Vector_3.h>
-#include <CGAL/Point_3.h>
-#include <CGAL/Plane_3.h>
-#include <CGAL/intersection_of_Polyhedra_3.h>
-
-#include <CGAL/Timer.h>
-#include <CGAL/Profile_counter.h>
-
-#include <vector>
-#include <map>
-#include <deque>
-
-#include <boost/tuple/tuple.hpp>
-#include <boost/optional.hpp>
-#include <boost/graph/adjacency_list.hpp>
-
-namespace CGAL {
-
-template<class Polyhedron, class Kernel>
-class Polyhedron_slicer_3
-{
-private:
-  typedef AABB_halfedge_graph_segment_primitive<Polyhedron>         AABB_primitive;
-  typedef AABB_traits<Kernel, AABB_primitive>                       AABB_traits_;
-  typedef AABB_tree<AABB_traits_>                                   AABB_tree_;
-
-  typedef typename AABB_tree_::Object_and_primitive_id             Object_and_primitive_id;
-  typedef typename AABB_tree_::Primitive_id                        Primitive_id;
-
-  typedef typename Kernel::Plane_3    Plane;
-  typedef typename Kernel::Segment_3  Segment;
-  typedef typename Kernel::Point_3    Point;
-
-  typedef typename boost::graph_traits<Polyhedron>::edge_descriptor   Edge_const_handle;
-  typedef typename boost::graph_traits<Polyhedron>::edge_iterator   Edge_const_iterator;
-  typedef typename boost::graph_traits<Polyhedron>::halfedge_descriptor Halfedge_const_handle;
-  typedef typename boost::graph_traits<Polyhedron>::face_descriptor    Facet_const_handle;
-  typedef typename boost::graph_traits<Polyhedron>::vertex_descriptor   Vertex_const_handle;
-  typedef Halfedge_around_target_circulator<Polyhedron> Halfedge_around_vertex_const_circulator;
-  typedef Halfedge_around_face_circulator<Polyhedron>  Halfedge_around_facet_const_circulator;
-
-  // to unite halfedges under an "edge"
-  struct Edge_comparator {
-    bool operator()(Halfedge_const_handle h1, Halfedge_const_handle h2) const {
-      return (std::min)(&*h1, &*(h1->opposite())) 
-        < (std::min)(&*h2, &*(h2->opposite()));
-    }
-  };
-
-  ////////////////////////////////////////////////
-  // to represent a intersection point with plane
-  struct Node {
-    Point point;
-  };
-
-  struct Node_edge { 
-    bool is_processed;
-    Node_edge() : is_processed(false) 
-    { }
-  };
-
-  // out_edges is setS for preventing parallel edges automatically (do not change it, or add custom check before add_edge)
-  typedef boost::adjacency_list<
-    boost::setS, boost::vecS, boost::undirectedS,
-    Node, Node_edge>
-  Node_graph;
-
-  typedef typename Node_graph::vertex_descriptor Vertex_g;
-  typedef typename Node_graph::vertex_iterator   Vertex_iterator_g;
-  typedef typename Node_graph::edge_descriptor   Edge_g;
-  typedef typename Node_graph::out_edge_iterator Out_edge_iterator_g;
-  ////////////////////////////////////////////////
-
-  // to store intersections of an edge
-  // there is two nodes (intersection points) when an edge is coplanar to plane
-  struct Node_pair {
-    Vertex_g v1, v2;
-    int vertex_count;
-
-    Node_pair() : vertex_count(0){ }
-    Node_pair(Vertex_g v1, Vertex_g v2) : v1(v1), v2(v2), vertex_count(2) { }
-
-    void put(Vertex_g v) {
-      CGAL_assertion(vertex_count <= 2);
-
-      (vertex_count == 0 ? v1 : v2) = v;
-      ++vertex_count;
-    }
-  };
-
-  typedef std::map<Halfedge_const_handle, Node_pair, Edge_comparator> Edge_node_map;
-  typedef typename Edge_node_map::iterator Edge_node_map_iterator;
-
-  enum Intersection_type { BOUNDARY, INTERVAL, PLANAR };
-
-  typedef std::map<Halfedge_const_handle, Intersection_type, Edge_comparator> Edge_intersection_map;
-  typedef typename Edge_intersection_map::iterator Edge_intersection_map_iterator;
-
-  // member variables //
-  typename Kernel::Intersect_3 intersect_3_functor;
-  AABB_tree_ tree;
-  mutable Node_graph node_graph;
-  Polyhedron& polyhedron;
-
-  boost::tuple<Point, Intersection_type, Vertex_const_handle>
-  halfedge_intersection(Halfedge_const_handle hf, const Plane& plane) const
-  { 
-    boost::tuple<Point, Intersection_type, Vertex_const_handle> ret;
-
-    const Point& s = hf->vertex()->point();
-    const Point& t = hf->opposite()->vertex()->point();
-    Oriented_side s_os, t_os;
-    s_os = plane.oriented_side(s);
-    t_os = plane.oriented_side(t);
-
-    // in case of planar just Intersection_type is not empty in tuple
-    if(t_os == ON_ORIENTED_BOUNDARY && s_os == ON_ORIENTED_BOUNDARY) {
-      ret.template get<1>() = PLANAR;
-      return ret;
-    }
-    // in case of boundary Intersection_type and vertex are not empty in tuple
-    if(t_os == ON_ORIENTED_BOUNDARY || s_os == ON_ORIENTED_BOUNDARY) { 
-      ret.template get<1>() = BOUNDARY;
-      ret.template get<2>() = t_os == ON_ORIENTED_BOUNDARY ? hf->opposite()->vertex() :
-                                                    hf->vertex();
-      return ret;
-    }
-
-    CGAL_assertion(t_os != s_os); // should one positive one negative
-    // in case of interval Intersection_type and point are not empty in tuple
-    ret.template get<1>() = INTERVAL;
-    Object intersection = intersect_3_functor(plane, Segment(s,t));
-
-    if(const Point* i_point  = object_cast<Point>(&intersection)) { 
-      ret.template get<0>() = *i_point;
-    }
-    else if( object_cast<Segment>(&intersection) ) {
-      // is it possible to predicate not-planar but construct segment ?
-      CGAL_warning(!"on interval case - predicate not-planar but construct segment");
-      ret.template get<1>() = PLANAR;
-    }
-    else {
-      // prediction indicates intersection but construction returns nothing, returning closest point
-      CGAL_warning(!"on interval case - no intersection found");
-      ret.template get<0>() = squared_distance(plane, s) < squared_distance(plane, t) ? s : t; 
-    }
-    return ret;
-  }
-
-  void add_intersection_node_to_one_ring(Vertex_const_handle v, Edge_node_map& edge_node_map) const {
-    Vertex_g v_g = boost::add_vertex(node_graph);
-    node_graph[v_g].point = v->point();
-
-    Halfedge_around_vertex_const_circulator around_vertex_c(v,polyhedron), done(around_vertex_c);
-    do {
-      edge_node_map[*around_vertex_c].put(v_g);
-    } 
-    while(++around_vertex_c != done);
-  }
-  
-  void add_intersection_edge_to_facet_neighbors(Halfedge_const_handle hf, Edge_node_map& edge_node_map) const {
-    Node_pair& hf_node_pair = edge_node_map.find(hf)->second;
-    CGAL_assertion(hf_node_pair.vertex_count == 1);
-
-    for(int i = 0; i < 2; ++i) // loop for hf and hf->opposite
-    {
-      if(i == 1) { hf = hf->opposite(); }
-      if(hf->is_border()) { continue;} 
-
-      for(int i = 0; i < 2; ++i) 
-      {
-        Halfedge_const_handle facet_hf = i == 0 ? hf->next() : hf->prev();
-        Edge_node_map_iterator facet_hf_it = edge_node_map.find(facet_hf);
-
-        if(facet_hf_it != edge_node_map.end()) {
-          Node_pair& facet_hf_node_pair = facet_hf_it->second;
-          CGAL_assertion(facet_hf_node_pair.vertex_count == 1); // == 2 if hf is planar and that cant happen 
-          boost::add_edge(hf_node_pair.v1, facet_hf_node_pair.v1, node_graph); 
-        }
-      }
-    } // for hf and hf->opposite
-  }
-
-  void add_intersection_edge_to_vertex_neighbors(Halfedge_const_handle hf, Vertex_const_handle v, Edge_node_map& edge_node_map) const {
-    // do not worry about duplicate edges, they are not allowed (but performance might be a concern)
-    Node_pair& hf_node_pair = edge_node_map.find(hf)->second;
-    Vertex_g v_g = node_graph[hf_node_pair.v1].point == v->point() ? hf_node_pair.v1 : hf_node_pair.v2;// find node containing v
-
-    Halfedge_around_vertex_const_circulator around_vertex_c(v, polyhedron), done(around_vertex_c);
-    do {
-      if((*around_vertex_c)->is_border()) { continue;} 
-      Node_pair& around_vertex_node_pair = edge_node_map.find(*around_vertex_c)->second;
-      Halfedge_around_facet_const_circulator around_facet_c(*around_vertex_c,polyhedron), done2(around_facet_c);
-      do {
-        CGAL_assertion(around_vertex_node_pair.vertex_count != 0);
-        if(around_vertex_node_pair.v1 != v_g) {
-          boost::add_edge(around_vertex_node_pair.v1, v_g, node_graph); 
-        }
-        if(around_vertex_node_pair.vertex_count == 2 && around_vertex_node_pair.v2 != v_g) {
-          boost::add_edge(around_vertex_node_pair.v2, v_g, node_graph); 
-        }
-      } 
-      while(++around_facet_c != done2);
-    } 
-    while(++around_vertex_c != done);
-  }
-
-  template<class OutputIterator>
-  OutputIterator intersect_plane(const Plane& plane, OutputIterator out) const
-  {
-    node_graph.clear();
-
-    // find out intersecting halfedges (note that tree contains edges only with custom comparator)
-    std::vector<Edge_const_handle> intersected_edges;
-    tree.all_intersected_primitives(plane, std::back_inserter(intersected_edges));
-
-    // create node graph from segments
-    // each node is associated with multiple edges
-    Edge_node_map edge_node_map;
-    Edge_intersection_map edge_intersection_map;
-    for(typename std::vector<Edge_const_handle>::iterator it = intersected_edges.begin();
-      it != intersected_edges.end(); ++it)
-    {
-      Halfedge_const_handle hf = halfedge(*it,polyhedron);
-      Node_pair& assoc_nodes = edge_node_map[hf];
-      CGAL_assertion(assoc_nodes.vertex_count < 3); // every Node_pair can at most contain 2 nodes
-
-      boost::tuple<Point, Intersection_type, Vertex_const_handle> intersection = halfedge_intersection(hf, plane);
-      edge_intersection_map[hf] = intersection.template get<1>(); // save intersection type
-
-      if(intersection.template get<1>() == INTERVAL) {
-        CGAL_PROFILER(" number of INTERVAL intersections.");
-        CGAL_assertion(assoc_nodes.vertex_count == 0); 
-
-        Vertex_g v = boost::add_vertex(node_graph);
-        node_graph[v].point = intersection.template get<0>();
-        assoc_nodes.put(v);
-        // no related hf to edge node, done
-      }
-      else if(intersection.template get<1>() == BOUNDARY) {
-        CGAL_PROFILER(" number of BOUNDARY intersections.");
-        CGAL_assertion(assoc_nodes.vertex_count < 2); 
-
-        if(assoc_nodes.vertex_count == 0) {
-          Vertex_const_handle v_h = intersection.template get<2>(); // boundary vertex
-          // update edge_node_map for neighbor halfedges of v_h
-          add_intersection_node_to_one_ring(v_h, edge_node_map);
-        } // else node is already added by other hf
-      }
-      else {// intersection.get<1>() == PLANAR
-        CGAL_PROFILER(" number of PLANAR intersections.");
-        CGAL_assertion(intersection.template get<1>() == PLANAR);
-
-        if(assoc_nodes.vertex_count != 2) {
-          if(assoc_nodes.vertex_count == 1) { // there is one intersection node that we need to add
-            if(node_graph[assoc_nodes.v1].point == hf->vertex()->point()) {
-              add_intersection_node_to_one_ring(hf->opposite()->vertex(), edge_node_map);
-            }
-            else {
-              CGAL_assertion(node_graph[assoc_nodes.v1].point == hf->opposite()->vertex()->point());
-              add_intersection_node_to_one_ring(hf->vertex(), edge_node_map);
-            }
-          }
-          else { // assoc_nodes.vertex_count == 0
-            // update edge_node_map for neighbor halfedges 
-            add_intersection_node_to_one_ring(hf->vertex(), edge_node_map);
-            add_intersection_node_to_one_ring(hf->opposite()->vertex(), edge_node_map);
-          }
-        } // else both nodes are already added by other hfs
-      }
-    } // for(typename std::vector<Halfedge_const_handle>::iterator it = intersected_edges.begin()...
-    
-    // introduce node connectivity
-    for(typename std::vector<Edge_const_handle>::iterator it = intersected_edges.begin();
-      it != intersected_edges.end(); ++it)
-    {
-      Halfedge_const_handle hf = halfedge(*it,polyhedron);
-      Edge_intersection_map_iterator intersection_it = edge_intersection_map.find(hf);
-      CGAL_assertion(intersection_it != edge_intersection_map.end());
-
-      Intersection_type intersection = intersection_it->second;
-      if(intersection == INTERVAL) {
-        add_intersection_edge_to_facet_neighbors(hf, edge_node_map);
-      }
-      else if(intersection == BOUNDARY) {
-        Node_pair& node_pair = edge_node_map[hf];
-        Vertex_const_handle v = hf->vertex()->point() == node_graph[node_pair.v1].point ?
-          hf->vertex() : hf->opposite()->vertex();
-        add_intersection_edge_to_vertex_neighbors(hf, v, edge_node_map);
-      }
-      else {
-        add_intersection_edge_to_vertex_neighbors(hf, hf->vertex(), edge_node_map);
-        add_intersection_edge_to_vertex_neighbors(hf, hf->opposite()->vertex(), edge_node_map);
-      }
-    }
-    
-    // use node_graph to construct polylines
-    return construct_polylines(out);
-  }
-
-  // find a new node to advance, if no proper node exists return v
-  std::pair<Vertex_g, bool> find_next(Vertex_g v) const {
-    std::pair<Vertex_g, bool> ret;
-    Out_edge_iterator_g ei_b, ei_e;
-    for(boost::tie(ei_b, ei_e) = boost::out_edges(v, node_graph); ei_b != ei_e; ++ei_b) {
-      if(node_graph[*ei_b].is_processed) { continue; } // do not go over same edge twice
-
-      ret.first = boost::target(*ei_b, node_graph);
-      ret.second = true;
-      node_graph[*ei_b].is_processed = true;
-      
-      CGAL_assertion(ret.first != v);
-      return ret;
-    }
-
-    ret.second = false;
-    return ret;
-  }
-
-  template<class OutputIterator>
-  OutputIterator construct_polylines(OutputIterator out) const  {
-    //std::cout << boost::num_vertices(node_graph) << std::endl;
-    //std::cout << boost::num_edges(node_graph) << std::endl;
-    //Vertex_iterator_g v_b, v_e;
-    //for(boost::tie(v_b, v_e) = boost::vertices(node_graph); v_b != v_e; ++v_b)
-    //{
-    //  Out_edge_iterator_g e_b, e_e;
-    //  boost::tie(e_b, e_e) = boost::out_edges(*v_b, node_graph);
-    //  for( ;e_b != e_e; ++e_b) // keep current vertex active while there is 
-    //  {
-    //    std::cout << "source " << boost::source(*e_b, node_graph) 
-    //      << " target " << boost::target(*e_b, node_graph) << std::endl;
-    //  }
-    //}
-
-    Vertex_iterator_g v_b, v_e;
-    for(boost::tie(v_b, v_e) = boost::vertices(node_graph); v_b != v_e; ++v_b)
-    {
-      Vertex_g v = *v_b;
-      Out_edge_iterator_g e_b, e_e;
-      boost::tie(e_b, e_e) = boost::out_edges(v, node_graph);
-      // isolated intersection, construct a polyline with one point
-      if(e_b == e_e) {
-        std::vector<Point> polyline;
-        polyline.push_back(node_graph[v].point);
-        *out++ = polyline;
-        continue;
-      }
-
-      Vertex_g v_head = v;
-      // there are edges, construct one or more polylines
-      for( ;e_b != e_e; ++e_b) // keep current vertex active while there is an non-processed edge to go
-      {
-        if(node_graph[*e_b].is_processed) { continue; } // we previously put it to polylines
-
-        // construct new polyline
-        std::vector<Point> polyline;
-
-        bool first_border = true;
-        while(true) {
-          polyline.push_back(node_graph[v].point);
-          bool found;
-          boost::tie(v, found) = find_next(v);
-
-          if(!found) { // intersection at boundary
-            if(!first_border) { break; } // completed non-loop polyline
-
-            first_border = false;
-            boost::tie(v, found) = find_next(v_head); // try to go other direction
-            if(!found) { break; }
-            std::reverse(polyline.begin(), polyline.end());
-            continue;
-          }
-
-          if(v == v_head) { // loop is completed
-            polyline.push_back(node_graph[v_head].point); // put first point again
-            break;
-          }
-        } // while( true )...
-        *out++ = polyline;
-
-      } // for( ;e_b != e_e;...
-    } // for(boost::tie(v_b, v_e) = boost::vertices(node_graph)...
-    return out;
-  }
-
-public:
-
-  /**
-  * Constructor. `polyhedron` must be valid polyhedron as long as this functor is used.
-  * @param polyhedron the polyhedron to be cut
-  * @param kernel the kernel
-  */
-  Polyhedron_slicer_3(const Polyhedron& polyhedron, const Kernel& kernel = Kernel())
-  : intersect_3_functor(kernel.intersect_3_object()),
-    tree( edges(polyhedron).first,
-          edges(polyhedron).second,
-          polyhedron),
-    polyhedron(const_cast<Polyhedron&>(polyhedron))
-  { }
-
-  /**
-   * @tparam OutputIterator an output iterator accepting polylines. A polyline is considered to be a `std::vector<Kernel::Point_3>`. A polyline is closed if its first and last points are identical.
-   * @param plane the plane to intersect the polyhedron with
-   * @out output iterator of polylines
-   * computes the intersection polylines of the polyhedron passed in the constructor with `plane` and puts each of them in `out`
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const typename Kernel::Plane_3& plane, OutputIterator out) const {
-    CGAL_precondition(!plane.is_degenerate());
-    return intersect_plane(plane, out);
-  }
-};
-
-}// end of namespace CGAL
-#endif //CGAL_POLYHEDRON_SLICER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_stitching.h b/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_stitching.h
deleted file mode 100644
index 28b4d29..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_stitching.h
+++ /dev/null
@@ -1,286 +0,0 @@
-// Copyright (c) 2014 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sebastien Loriot
-
-
-#ifndef CGAL_POLYHEDRON_STITCHING_H
-#define CGAL_POLYHEDRON_STITCHING_H
-
-#include <CGAL/Modifier_base.h>
-#include <CGAL/HalfedgeDS_decorator.h>
-#include <vector>
-#include <set>
-
-namespace CGAL{
-
-namespace Polyhedron_stitching{
-
-template <class Halfedge_handle, class Point_3>
-struct Less_for_halfedge{
-  bool operator()( Halfedge_handle h1, Halfedge_handle h2 ) const
-  {
-    const Point_3& s1=h1->opposite()->vertex()->point();
-    const Point_3& t1=h1->vertex()->point();
-    const Point_3& s2=h2->opposite()->vertex()->point();
-    const Point_3& t2=h2->vertex()->point();
-    return
-    ( s1 < t1?  std::make_pair(s1,t1) : std::make_pair(t1, s1) )
-    <
-    ( s2 < t2?  std::make_pair(s2,t2) : std::make_pair(t2, s2) );
-  }
-};
-
-template <class LessHedge, class Polyhedron, class OutputIterator>
-OutputIterator
-detect_duplicated_boundary_edges
-(Polyhedron& P, OutputIterator out, LessHedge less_hedge)
-{
-  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
-
-  P.normalize_border();
-
-  typedef
-    std::set<Halfedge_handle, LessHedge > Border_halfedge_set;
-  Border_halfedge_set border_halfedge_set(less_hedge);
-  for (typename Polyhedron::Halfedge_iterator
-          it=P.border_halfedges_begin(), it_end=P.halfedges_end();
-          it!=it_end; ++it)
-  {
-    if ( !it->is_border() ) continue;
-    typename Border_halfedge_set::iterator set_it;
-    bool insertion_ok;
-    CGAL::cpp11::tie(set_it,insertion_ok)=
-      border_halfedge_set.insert(it);
-
-    if ( !insertion_ok ) *out++=std::make_pair(*set_it, it);
-  }
-  return out;
-}
-
-template <class Polyhedron>
-struct Naive_border_stitching_modifier:
-  CGAL::Modifier_base<typename Polyhedron::HalfedgeDS>
-{
-  typedef typename Polyhedron::HalfedgeDS HDS;
-  typedef typename HDS::Halfedge_handle Halfedge_handle;
-  typedef typename HDS::Vertex_handle Vertex_handle;
-  typedef typename HDS::Halfedge::Base HBase;
-  typedef typename Polyhedron::Vertex::Point Point_3;
-
-  std::vector <std::pair<Halfedge_handle,Halfedge_handle> >& hedge_pairs_to_stitch;
-
-  Naive_border_stitching_modifier(
-    std::vector< std::pair<Halfedge_handle,Halfedge_handle> >&
-      hedge_pairs_to_stitch_) :hedge_pairs_to_stitch(hedge_pairs_to_stitch_)
-  {}
-
-  void update_target_vertex(Halfedge_handle h,
-                            Vertex_handle v_kept,
-                            CGAL::HalfedgeDS_decorator<HDS>& decorator)
-  {
-    Halfedge_handle start=h;
-    do{
-      decorator.set_vertex(h, v_kept);
-      h=h->next()->opposite();
-    } while( h!=start );
-  }
-
-
-  void operator() (HDS& hds)
-  {
-    std::size_t nb_hedges=hedge_pairs_to_stitch.size();
-
-    CGAL::HalfedgeDS_decorator<HDS> decorator(hds);
-
-    /// Merge the vertices
-    std::vector<Vertex_handle> vertices_to_delete;
-    // since there might be several vertices with identical point
-    // we use the following map to choose one vertex per point
-    std::map<Point_3, Vertex_handle> vertices_kept;
-    for (std::size_t k=0; k<nb_hedges; ++k)
-    {
-      Halfedge_handle h1=hedge_pairs_to_stitch[k].first;
-      Halfedge_handle h2=hedge_pairs_to_stitch[k].second;
-
-      CGAL_assertion( h1->is_border() );
-      CGAL_assertion( h2->is_border() );
-      CGAL_assertion( !h1->opposite()->is_border() );
-      CGAL_assertion( !h2->opposite()->is_border() );
-
-      Vertex_handle h1_tgt=h1->vertex();
-      Vertex_handle h2_src=h2->opposite()->vertex();
-
-      //update vertex pointers: target of h1 vs source of h2
-      Vertex_handle v_to_keep=h1_tgt;
-      std::pair<
-        typename std::map<Point_3, Vertex_handle>::iterator,
-        bool > insert_res =
-          vertices_kept.insert( std::make_pair(v_to_keep->point(), v_to_keep) );
-      if (!insert_res.second && v_to_keep!=insert_res.first->second)
-      {
-        v_to_keep=insert_res.first->second;
-        //we remove h1->vertex()
-        vertices_to_delete.push_back( h1_tgt );
-        update_target_vertex(h1, v_to_keep, decorator);
-      }
-      if (v_to_keep!=h2_src)
-      {
-        //we remove h2->opposite()->vertex()
-        vertices_to_delete.push_back( h2_src );
-        update_target_vertex(h2->opposite(), v_to_keep, decorator);
-      }
-      decorator.set_vertex_halfedge(v_to_keep, h1);
-
-      Vertex_handle h1_src=h1->opposite()->vertex();
-      Vertex_handle h2_tgt=h2->vertex();
-
-      //update vertex pointers: target of h1 vs source of h2
-      v_to_keep=h2_tgt;
-      insert_res =
-          vertices_kept.insert( std::make_pair(v_to_keep->point(), v_to_keep) );
-      if (!insert_res.second && v_to_keep!=insert_res.first->second)
-      {
-        v_to_keep=insert_res.first->second;
-        //we remove h2->vertex()
-        vertices_to_delete.push_back( h2_tgt );
-        update_target_vertex(h2, v_to_keep, decorator);
-      }
-      if (v_to_keep!=h1_src)
-      {
-        //we remove h1->opposite()->vertex()
-        vertices_to_delete.push_back( h1_src );
-        update_target_vertex(h1->opposite(), v_to_keep, decorator);
-      }
-      decorator.set_vertex_halfedge(v_to_keep, h1->opposite());
-    }
-
-    /// Update next/prev of neighbor halfedges (that are not set for stiching)
-    /// _______   _______
-    ///        | |
-    ///        | |
-    /// In order to avoid having to maintain a set with halfedges to stitch
-    /// we do on purpose next-prev linking that might not be useful but that
-    /// is harmless and still less expensive than doing queries in a set
-    for (std::size_t k=0; k<nb_hedges; ++k)
-    {
-      Halfedge_handle h1=hedge_pairs_to_stitch[k].first;
-      Halfedge_handle h2=hedge_pairs_to_stitch[k].second;
-
-      //link h2->prev() to h1->next()
-      Halfedge_handle prev=h2->prev();
-      Halfedge_handle next=h1->next();
-      prev->HBase::set_next(next);
-      decorator.set_prev(next, prev);
-
-      //link h1->prev() to h2->next()
-      prev=h1->prev();
-      next=h2->next();
-      prev->HBase::set_next(next);
-      decorator.set_prev(next, prev);
-    }
-
-    /// update HDS connectivity, removing the second halfedge
-    /// of each the pair and its opposite
-    for (std::size_t k=0; k<nb_hedges; ++k)
-    {
-      Halfedge_handle h1=hedge_pairs_to_stitch[k].first;
-      Halfedge_handle h2=hedge_pairs_to_stitch[k].second;
-
-    ///Set face-halfedge relationship
-      //h2 and its opposite will be removed
-      decorator.set_face(h1,h2->opposite()->face());
-      decorator.set_face_halfedge(h1->face(),h1);
-      //update next/prev pointers
-      Halfedge_handle tmp=h2->opposite()->prev();
-      tmp->HBase::set_next(h1);
-      decorator.set_prev(h1,tmp);
-      tmp=h2->opposite()->next();
-      h1->HBase::set_next(tmp);
-      decorator.set_prev(tmp,h1);
-
-    /// remove the extra halfedges
-      hds.edges_erase( h2 );
-    }
-
-    //remove the extra vertices
-    for(typename std::vector<Vertex_handle>::iterator
-          itv=vertices_to_delete.begin(),itv_end=vertices_to_delete.end();
-          itv!=itv_end; ++itv)
-    {
-      hds.vertices_erase(*itv);
-    }
-  }
-};
-
-} //end of namespace Polyhedron_stitching
-
-/// Stitches together border halfedges in a polyhedron.
-/// The halfedge to be stitched are provided in `hedge_pairs_to_stitch`.
-/// Foreach pair `p` in this vector, p.second and its opposite will be removed
-/// from `P`.
-/// The vertices that get removed from `P` are selected as follow:
-/// The pair of halfedges in `hedge_pairs_to_stitch` are processed linearly.
-/// Let `p` be such a pair.
-/// If the target of p.first has not been marked for deletion,
-/// then the source of p.second is.
-/// If the target of p.second has not been marked for deletion,
-/// then the source of p.first is.
-template <class Polyhedron>
-void polyhedron_stitching(
-  Polyhedron& P,
-  std::vector <std::pair<typename Polyhedron::Halfedge_handle,
-                         typename Polyhedron::Halfedge_handle> >&
-    hedge_pairs_to_stitch)
-{
-  Polyhedron_stitching::Naive_border_stitching_modifier<Polyhedron>
-    modifier(hedge_pairs_to_stitch);
-  P.delegate(modifier);
-}
-
-/// Same as above but the pair of halfedges to be stitched are found
-/// using `less_hedge`. Two halfedges `h1` and `h2` are set to be stitched
-/// if `less_hedge(h1,h2)=less_hedge(h2,h1)=true`.
-/// `LessHedge` is a key comparison function that is used to sort halfedges
-template <class Polyhedron, class LessHedge>
-void polyhedron_stitching(Polyhedron& P, LessHedge less_hedge)
-{
-  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
-
-  std::vector <std::pair<Halfedge_handle,Halfedge_handle> > hedge_pairs_to_stitch;
-  Polyhedron_stitching::detect_duplicated_boundary_edges(
-    P, std::back_inserter(hedge_pairs_to_stitch), less_hedge );
-  polyhedron_stitching(P, hedge_pairs_to_stitch);
-}
-
-/// Same as above using the sorted pair of vertices incidents to the halfedges
-/// as comparision
-template <class Polyhedron>
-void polyhedron_stitching(Polyhedron& P)
-{
-  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
-  typedef typename Polyhedron::Vertex::Point_3 Point_3;
-
-  Polyhedron_stitching::Less_for_halfedge<Halfedge_handle, Point_3> less_hedge;
-  polyhedron_stitching(P, less_hedge);
-}
-
-} //end of namespace CGAL
-
-
-#endif //CGAL_POLYHEDRON_STITCHING_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_constraint_hierarchy_2.h b/3rdparty/CGAL-4.6/include/CGAL/Polyline_constraint_hierarchy_2.h
deleted file mode 100644
index 5db68c7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyline_constraint_hierarchy_2.h
+++ /dev/null
@@ -1,1173 +0,0 @@
-// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Olivier Billet, Mariette Yvinec
-
-#ifndef CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
-#define CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
-
-#include <CGAL/basic.h>
-#include <utility>
-#include <map>
-#include <set> 
-#include <list> 
-#include <CGAL/Skiplist.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/triangulation_assertions.h>
-
-namespace CGAL {
-
-// T               is expected to be Vertex_handle
-// Compare         is a comparison operator for type T
-// Data            is intended to store info on a Vertex
-template <class T, class Compare, class Data>
-class Polyline_constraint_hierarchy_2
-{
-public:
-  typedef Data                                    Point;
-  typedef T                                       Vertex_handle;
-  typedef std::pair<T, T>                         Edge;
-  typedef std::pair<T, T>                         Constraint;
-  typedef std::pair<T, T>                         Subconstraint;
-
-private:
-  class Node {
-  public:
-    explicit Node(Vertex_handle vh, bool input = false)
-      : vertex_(vh), point_(vh->point()), id(-1), input(input)
-    {}
-    Point& point() { return point_; }
-    const Point& point() const { return point_; }
-    Vertex_handle vertex() const { return vertex_; }
-  private:
-    Vertex_handle vertex_;
-    Point point_;
-  public:
-    int id;
-    bool input;
-  };
-
-  typedef CGAL::Skiplist<Node>  Vertex_list;
-  typedef std::list<Constraint> Constraint_list;
-
-public:
-  // the base line is always 
-  class Point_it 
-    : public boost::iterator_adaptor<
-    Point_it
-    , typename Vertex_list::all_iterator 
-    , Point
-    >
-  {
-  public:
-    Point_it() : Vertex_it::iterator_adaptor_() {}
-    Point_it(typename Vertex_list::all_iterator it) : Point_it::iterator_adaptor_(it) {}
-  private:
-    friend class boost::iterator_core_access;
-    Point& dereference() const { return this->base()->point(); }
-  };
-
-  // only nodes with a vertex_handle that is still in the triangulation
-  class Vertex_it 
-    : public boost::iterator_adaptor<
-    Vertex_it
-    , typename Vertex_list::skip_iterator 
-    , Vertex_handle
-    , boost::use_default
-    , Vertex_handle>
-  {
-  public:
-    Vertex_it() : Vertex_it::iterator_adaptor_() {}
-    Vertex_it(typename Vertex_list::skip_iterator it) : Vertex_it::iterator_adaptor_(it) {}
-    operator Point_it() const { return Point_it(this->base()); }
-    bool& input() { return this->base()->input; }
-  private:
-    friend class boost::iterator_core_access;
-    Vertex_handle dereference() const { return this->base()->vertex(); }
-  };
-
-  typedef typename Constraint_list::iterator Constraint_it;
-
-  struct Constraint_id {
-    Vertex_list* second;
-
-    Constraint_id(): second(NULL) {}
-
-    Constraint_id(Vertex_list* vl)
-      : second(vl)
-    {}
-
-    Vertex_list* vl_ptr() const {return second;}
-
-    operator std::pair<std::pair<Vertex_handle, Vertex_handle>,Vertex_list*>()
-    { 
-      if (second!=NULL){
-        return std::make_pair(std::make_pair(second->front().vertex(),
-                                             second->back().vertex()),second);
-      } 
-      return std::make_pair(std::make_pair(Vertex_handle(),Vertex_handle()),second);
-    }
-
-    bool operator == (const Constraint_id& other) const
-    {
-      return second == other.second;
-    }
-    bool operator != (const Constraint_id& other) const
-    {
-      return second != other.second;
-    }
-
-    bool operator<(const Constraint_id& other) const{
-      return second < other.second;
-    }
-  };
-
-  class Pair_compare {
-    Compare comp;
-
-  public:
-    Pair_compare(const Compare& comp) : comp(comp) {}
-
-    bool operator()(const Edge& e1, const Edge& e2) const {
-      if(comp(e1.first, e2.first)) {
-        return true;
-      } else if((! comp(e2.first, e1.first)) && //  !less(e1,e2) && !less(e2,e1) == equal
-                comp(e1.second, e2.second)) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-  };
-
-  class Context {
-    friend class Polyline_constraint_hierarchy_2<T,Compare,Data>;
-  private:
-    Vertex_list*    enclosing;
-    Vertex_it       pos;
-  public:
-    Context() : enclosing(NULL) {}
-
-    Context(const Context& hc)
-      : enclosing(hc.enclosing), pos(hc.pos)
-    {}
-
-    Vertex_it    vertices_begin() { return enclosing->skip_begin();}
-    Vertex_it    current() {return pos;}
-    Vertex_it    vertices_end() {return enclosing->skip_end();}
-    Constraint_id  id() { return enclosing; }
-    std::size_t    number_of_vertices() const {return enclosing->skip_size(); }
-  };                                           
-
-  typedef std::list<Context>              Context_list;
-  typedef typename Context_list::iterator Context_iterator;
-
-  typedef std::set<Constraint_id>           Constraint_set;
-  typedef std::map<Edge, Context_list*,
-		   Pair_compare>            Sc_to_c_map;
-  typedef typename Constraint_set::iterator C_iterator;
-  typedef typename Sc_to_c_map::const_iterator    Sc_iterator;
-  typedef Sc_iterator Subconstraint_iterator;
-  
-private:
-  // data for the 1d hierarchy
-  Compare          comp;
-  Constraint_set   constraint_set;
-  Sc_to_c_map      sc_to_c_map;
-  std::map<std::pair<Vertex_handle, Vertex_handle>,
-	   Constraint_id,
-	   Pair_compare> constraint_map;
-  
-public:
-  Polyline_constraint_hierarchy_2(const Compare& comp)
-    : comp(comp)
-    , sc_to_c_map(Pair_compare(comp))
-    , constraint_map(Pair_compare(comp))
-  { }
-  Polyline_constraint_hierarchy_2(const Polyline_constraint_hierarchy_2& ch); 
-  ~Polyline_constraint_hierarchy_2(){ clear();}
-  void clear();
-  Polyline_constraint_hierarchy_2& operator=(const Polyline_constraint_hierarchy_2& ch);
-
-  // Query 
-  bool is_subconstrained_edge(T va, T vb) const;
-  bool is_constrained_edge(T va, T vb) const;
-  bool is_constrained_vertex(T v) const;
-
-  Vertex_it vertices_in_constraint_begin(Constraint_id cid) const
-  { return cid.vl_ptr()->skip_begin(); }
-  Vertex_it vertices_in_constraint_end(Constraint_id cid) const
-  { return cid.vl_ptr()->skip_end(); }
-
-  Vertex_it vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const
-  { Constraint_id cid = constraint_map.find(make_edge(va,vb))->second;
-    return cid.vl_ptr()->skip_begin(); }
-
-  Vertex_it vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const
-  { Constraint_id cid = constraint_map.find(make_edge(va,vb))->second;
-    return cid.vl_ptr()->skip_end(); }
-
-  Point_it points_in_constraint_begin(Constraint_id cid) const
-  { return cid.vl_ptr()->all_begin(); }
-  Point_it points_in_constraint_end(Constraint_id cid) const
-  { return cid.vl_ptr()->all_end(); }
-
-  bool enclosing_constraint(Edge he, Constraint& hc) const;
-  bool enclosing_constraint(T  vaa, T  vbb, T& va, T& vb) const;
-  bool enclosing_constraints(T vaa, T  vbb,  Constraint_list& hcl) const;
-  bool next_along_sc(T va, T vb, T& w) const;
-  void oriented_end(T va, T vb, T& vc) const;
-
-  Context context(T va, T vb);
-  std::size_t number_of_enclosing_constraints(T va, T vb) const;
-  Context_iterator contexts_begin(T va, T vb) const;
-  Context_iterator contexts_end(T va, T vb) const;
-  std::size_t number_of_constraints() const  { return constraint_set.size();}
-  std::size_t number_of_subconstraints()const {return sc_to_c_map.size();}
-  
-
-  // insert/remove
-  void add_Steiner(T va, T vb, T vx);
-  Vertex_list* insert_constraint(T va, T vb);
-  void append_constraint(Constraint_id cid, T va, T vb);
-  void swap(Constraint_id first, Constraint_id second);
-  void remove_constraint(Constraint_id cid);
-
-  void remove_constraint(Vertex_handle va, Vertex_handle vb)
-  {
-    remove_constraint(constraint_map[make_edge(va,vb)]);
-  }
-
-  void split_constraint(T va, T vb, T vc);
-
-  void simplify(Vertex_it u,
-                Vertex_it v,
-                Vertex_it w);
-
-  std::size_t remove_points_without_corresponding_vertex(Constraint_id);
-  std::size_t remove_points_without_corresponding_vertex();
-
-  Constraint_id concatenate(Constraint_id first, Constraint_id second);
-  Constraint_id concatenate2(Constraint_id first, Constraint_id second);
-  Constraint_id split(Constraint_id first, Vertex_it vcit);
-  Constraint_id split2(Constraint_id first, Vertex_it vcit);
-
-  void remove_Steiner(T v, T va, T vb);
-
-  // iterators
-
-  Subconstraint_iterator subconstraint_begin() const
-  { 
-    return sc_to_c_map.begin(); 
-  }
-
-  Subconstraint_iterator subconstraint_end() const
-  { 
-    return sc_to_c_map.end();   
-  }
-
-  Sc_iterator sc_begin() const{ return sc_to_c_map.begin(); }
-  Sc_iterator sc_end()   const{ return sc_to_c_map.end();   }
-  C_iterator  c_begin()  const{ return constraint_set.begin(); }
-  C_iterator  c_end()    const{ return constraint_set.end();   }
-  
-  // Helper functions
-  void copy(const Polyline_constraint_hierarchy_2& ch);
-  void copy(const Polyline_constraint_hierarchy_2& ch, std::map<Vertex_handle,Vertex_handle>& vmap);
-  void swap(Polyline_constraint_hierarchy_2& ch);
-
-private: 
-  Edge      make_edge(T va, T vb) const;
-  Vertex_it get_pos(T va, T vb) const;
-  bool      get_contexts(T va, T vb, 
-			 Context_iterator& ctxt, 
-			 Context_iterator& past) const;
-
-  bool      get_contexts(T va, T vb, Context_list*&) const;
-
-  //to_debug
-public:
-  void   print() const;
-};
-
-template <class T, class Compare, class Data>
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-Polyline_constraint_hierarchy_2(const Polyline_constraint_hierarchy_2& ch)
-  : comp(ch.comp)
-  , sc_to_c_map(Pair_compare(comp))
-  , constraint_map(Pair_compare(comp))
-{
-  copy(ch);
-}
-
-template <class T, class Compare, class Data>
-Polyline_constraint_hierarchy_2<T,Compare,Data>&
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-operator=(const Polyline_constraint_hierarchy_2& ch){
-  copy(ch);
-  return *this;
-}
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-copy(const Polyline_constraint_hierarchy_2& ch1)
-{
-  // create a identity transfer vertex map
-  std::map<Node, Node>  vmap;
-  C_iterator cit1 = ch1.c_begin();
-  for( ; cit1 != ch1.c_end(); ++cit1) {
-    Vertex_it vit = cit1->second->begin();
-    for( ; vit != cit1->second->end(); ++vit) {
-      vmap[*vit] = *vit;
-    }
-  }
-  copy(ch1, vmap);
-}
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-copy(const Polyline_constraint_hierarchy_2& ch1, std::map<Vertex_handle,Vertex_handle>& vmap)
-  // copy with a transfer vertex map
-{
-  std::map<Vertex_list*,Vertex_list*> vlmap;
-  clear();
-  // copy constraint_set
-  C_iterator cit1 = ch1.c_begin();
-  for( ; cit1 != ch1.c_end(); ++cit1) {
-    Vertex_list* hvl1 = cit1->vl_ptr();
-    Vertex_list* hvl2 = new Vertex_list;
-    vlmap[hvl1] = hvl2;
-    Vertex_it vit = hvl1->skip_begin(), end = hvl1->skip_end();
-    for( ; vit != end; ++vit) hvl2->push_back(Node(vmap[*vit]));
-    constraint_set.insert(hvl2);
-  }
-  // copy sc_to_c_map
-  Sc_iterator scit1 = ch1.sc_begin();
-  for( ; scit1 != ch1.sc_end(); ++scit1) {
-    //vertices of the subconstraints
-    Vertex_handle uu2 = vmap[scit1->first.first];
-    Vertex_handle vv2 = vmap[scit1->first.second];
-    Context_list* hcl1  = scit1->second;
-    Context_list* hcl2  = new Context_list;
-    Context_iterator cit1 = hcl1->begin();
-    for( ; cit1 != hcl1->end(); ++cit1){
-      // vertices of the enclosing constraints
-      Context ctxt2;
-      ctxt2.enclosing = vlmap[cit1->enclosing];
-      ctxt2.pos = ctxt2.enclosing->skip_begin();
-      Vertex_it aux = cit1->enclosing->skip_begin();
-      while( aux != cit1->pos) {
-	++aux;
-	++ctxt2.pos;
-      }
-      hcl2->push_back(ctxt2);
-    }
-    sc_to_c_map[make_edge(uu2,vv2)] = hcl2;
-  }
-
-  comp = ch1.comp;
-  return;
-}
-
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-swap(Polyline_constraint_hierarchy_2& ch)
-{
-  constraint_set.swap(ch.constraint_set);
-  sc_to_c_map.swap(ch.sc_to_c_map);
-}
-
-
-/*
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-is_constrained_edge(T va, T vb) const
-{
-  return( c_to_sc_map.find(make_edge(va, vb)) != c_to_sc_map.end() );
-}
-*/
-
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-is_subconstrained_edge(T va, T vb) const
-{
-  return( sc_to_c_map.find(make_edge(va, vb)) != sc_to_c_map.end() );
-}
-
-
-// af: obsolete
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-enclosing_constraint(Edge he, Constraint& hc) const
-{
-  Context_iterator hcit, past;
-  if ( !get_contexts(he.first,he.second, hcit ,past)) return false;
-  hc = make_edge(hcit->enclosing->front(), hcit->enclosing->back());
-  return true;
-}
-
-
-// used by Constrained_triangulation_plus_2::intersect with Exact_intersection_tag
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-enclosing_constraint(T  vaa, T  vbb, T& va, T& vb) const
-{
-  Context_iterator hcit, past;
-  if ( !get_contexts(vaa,vbb, hcit ,past)) return false;
-  // va = hcit->enclosing->front().vertex();
-  // vb = hcit->enclosing->back().vertex();
-  // Vertex_list* vl = hcit->enclosing;
-  Vertex_it pos = hcit->pos;
-  if(vaa != *pos){
-    std::swap(vaa,vbb);
-  }
-  while(!pos.input()){
-    --pos;
-  }
-  va = *pos;
-  pos = hcit->pos;
-  ++pos;
-  assert(vbb == *pos);
-  while(!pos.input()){
-    ++pos;
-  }
-  vb = *pos;
-  return true;
-}
-
-// af: obsolete
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-enclosing_constraints(T vaa, T vbb , Constraint_list& hcl) const
-{
-  Context_iterator hcit, past;
-  if ( !get_contexts(vaa,vbb, hcit ,past)) return false;
-  for (; hcit!=past; hcit++) {
-    hcl.push_back(make_edge(hcit->enclosing->front(), 
-			    hcit->enclosing->back())); 
-  }
-  return true;
-}
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-context(T va, T vb)
-{
-  Context_iterator hcit, past;
-  if(!get_contexts(va,vb, hcit ,past)) CGAL_triangulation_assertion(false);
-  return *hcit;
-}
-
-template <class T, class Compare, class Data>
-std::size_t 
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-number_of_enclosing_constraints(T va, T vb) const
-{
-  Context_list* hcl;
-  if (! get_contexts(va,vb,hcl)) CGAL_triangulation_assertion(false);
-  return hcl->size();
-}
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context_iterator
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-contexts_begin(T va, T vb) const
-{
-   Context_iterator first, last;
-   if( !get_contexts(va,vb,first,last))  CGAL_triangulation_assertion(false);
-   return first;
-}
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context_iterator
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-contexts_end(T va, T vb) const
-{   
-   Context_iterator first, last;
-   if( !get_contexts(va,vb,first,last))  CGAL_triangulation_assertion(false);
-   return last;
-} 
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-swap(Constraint_id first, Constraint_id second){
-    // We have to look at all subconstraints
-  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == first.vl_ptr()){
-	ctit->enclosing = 0;
-	break;
-      }
-    }
-  }
-    // We have to look at all subconstraints
-  for(Vertex_it it = second.vl_ptr()->skip_begin(), succ = it, end = second.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == second.vl_ptr()){
-	ctit->enclosing = first.vl_ptr();
-	break;
-      }
-    }
-  }   
-  // We have to look at all subconstraints
-  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == 0){
-	ctit->enclosing = second.vl_ptr();
-	break;
-      }
-    }
-  }
-  first.vl_ptr()->swap(*second.vl_ptr());
-}
-
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-remove_constraint(Constraint_id cid){
-  constraint_set.erase(cid);
-  
-  // We have to look at all subconstraints
-  for(Vertex_it it = cid.vl_ptr()->skip_begin(), succ = it, end = cid.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and remove the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == cid.vl_ptr()){
-	    hcl->erase(ctit);
-		break;
-      }
-    }
-    // If the constraint passes several times through the same subconstraint,
-    // the above loop maybe removes them in the wrong order
-
-    // If this was the only context in the list, delete the context list
-    if(hcl->empty()){
-      sc_to_c_map.erase(scit);
-      delete hcl;
-    }
-  }
-  delete cid.vl_ptr();
-}
-
-
-// This function removes vertex v from the polyline constraint
-// It only works for one polyline passing through v
-// and for the case that the constrained edge u,w has no intersections
-template <class T, class Compare, class Data>
-void Polyline_constraint_hierarchy_2<T,Compare,Data>::simplify(Vertex_it uc,
-                                                       Vertex_it vc,
-                                                       Vertex_it wc)
-
-{
-  Vertex_handle u = *uc, v = *vc, w = *wc;
-  typename Sc_to_c_map::iterator uv_sc_iter = sc_to_c_map.find(make_edge(u, v));
-  CGAL_assertion_msg( uv_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
-  Context_list*  uv_hcl = uv_sc_iter->second;
-  CGAL_assertion_msg(uv_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
-  if(*(uv_hcl->front().current()) != u) {
-    std::swap(u,w);
-    uv_sc_iter = sc_to_c_map.find(make_edge(u, v));
-    CGAL_assertion_msg( uv_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
-    uv_hcl = (*uv_sc_iter).second;
-    CGAL_assertion_msg(uv_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
-  }
-  // now u,v, and w are ordered along the polyline constraint
-  if(vc.input()){
-    uc.input() = true;
-    wc.input() = true;
-  }
-  typename Sc_to_c_map::iterator vw_sc_iter = sc_to_c_map.find(make_edge(v, w));
-  CGAL_assertion_msg( vw_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
-  Context_list*  vw_hcl = vw_sc_iter->second;
-  CGAL_assertion_msg(vw_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
-  Vertex_list* vertex_list = uv_hcl->front().id().vl_ptr();
-  CGAL_assertion_msg(vertex_list  == vw_hcl->front().id().vl_ptr(), "subconstraints from different polyline constraints" );
-  // Remove the list item which points to v
-  vertex_list->skip(vc.base());
-  
-  // Remove the entries for [u,v] and [v,w]
-  sc_to_c_map.erase(uv_sc_iter);
-  sc_to_c_map.erase(vw_sc_iter);
-  delete vw_hcl;
-  // reuse other context list
-  sc_to_c_map[make_edge(u,w)] = uv_hcl;
-}
-
-
-template <class T, class Compare, class Data>
-std::size_t
-Polyline_constraint_hierarchy_2<T,Compare,Data>::remove_points_without_corresponding_vertex(Constraint_id cid)
-{
-  std::size_t n = 0;
-  for(Point_it it = points_in_constraint_begin(cid); 
-      it != points_in_constraint_end(cid); ++it) { 
-    if(cid.vl_ptr()->is_skipped(it.base())) {
-      it = cid.vl_ptr()->erase(it.base());
-      ++n;
-    }
-  }
-  return n;
-}
-
-template <class T, class Compare, class Data>
-std::size_t
-Polyline_constraint_hierarchy_2<T,Compare,Data>::remove_points_without_corresponding_vertex()
-{
-  std::size_t n = 0;
-  for(C_iterator it = constraint_set.begin(); it!= constraint_set.end(); ++it){
-    n+= remove_points_without_corresponding_vertex(*it);
-  }
-  return n;
-}
-
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
-Polyline_constraint_hierarchy_2<T,Compare,Data>::concatenate(Constraint_id first, Constraint_id second)
-{
-  constraint_set.erase(first);
-  constraint_set.erase(second);
-  // We have to look at all subconstraints
-  for(Vertex_it it = second.vl_ptr()->skip_begin(), succ = it, end = second.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == second.vl_ptr()){
-	ctit->enclosing = first.vl_ptr();
-	break;
-      }
-    }
-  }
-  // now we really concatenate the vertex lists
-  // Note that all iterators pointing into second remain valid.
-  // This concerns user code, as well as  the data member "pos" of the Context class
-  first.vl_ptr()->pop_back(); // because it is the same as second.front()
-  Vertex_it back_it = first.vl_ptr()->skip_end();
-  --back_it;
-  first.vl_ptr()->splice(first.vl_ptr()->skip_end(), *(second.vl_ptr()), second.vl_ptr()->skip_begin(), second.vl_ptr()->skip_end());
-
-  // Note that for VC8 with iterator debugging the iterators pointing into second
-  // are NOT valid      So we have to update them
-  for(Vertex_it it = back_it, succ = it, end = first.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and update pos in the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == first.vl_ptr()){
-	ctit->pos = it;
-	break;
-      }
-    }
-    }
-  constraint_set.insert(first);
-
-  delete second.vl_ptr();
-  return first;
-}
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
-Polyline_constraint_hierarchy_2<T,Compare,Data>::concatenate2(Constraint_id first, Constraint_id second)
-{  
-  constraint_set.erase(first);
-  constraint_set.erase(second);
-  // We have to look at all subconstraints
-  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == first.vl_ptr()){
-	ctit->enclosing = second.vl_ptr();
-	break;
-      }
-    }
-  }
-  // now we really concatenate the vertex lists
-  // Note that all iterators pointing into second remain valid.
-  first.vl_ptr()->pop_back(); // because it is the same as second.front()
-  Vertex_it back_it = first.vl_ptr()->skip_end();
-  --back_it;
-  second.vl_ptr()->splice(second.vl_ptr()->skip_begin(), *(first.vl_ptr()), first.vl_ptr()->skip_begin(), first.vl_ptr()->skip_end());
-
-  // Note that for VC8 with iterator debugging the iterators pointing into second
-  // are NOT valid      So we have to update them
-  for(Vertex_it it = back_it, succ = it, end = first.vl_ptr()->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and update pos in the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == second.vl_ptr()){
-	ctit->pos = it;
-	break;
-      }
-    }
-  }
-  constraint_set.insert(second);
-
-  delete first.vl_ptr();
-  return second.vl_ptr();
-}
-
-
-  // split a constraint in two constraints, so that vcit becomes the first
-  // vertex of the new constraint
-  // returns the new constraint 
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
-Polyline_constraint_hierarchy_2<T,Compare,Data>::split(Constraint_id first, Vertex_it vcit)
-{
-  constraint_set.erase(first);
-  Vertex_list* second = new Vertex_list;
-  second->splice(second->skip_end(), *(first.vl_ptr()), vcit.base(), first.vl_ptr()->skip_end());
-  first.vl_ptr()->push_back(second->front()); // Duplicate the common vertex
-  Vertex_it vit = second->skip_begin();
-  vit.input() = true;
-  vit = first.vl_ptr()->skip_end();
-  --vit;
-  vit.input() = true;
-  constraint_set.insert(first);
-  constraint_set.insert(second);
- // We have to look at all subconstraints
-  for(Vertex_it it = second->skip_begin(), succ = it, end = second->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == first.vl_ptr()){
-	ctit->enclosing = second;
-	break;
-      }
-    }
-  }
-  return second;
-}
-
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
-Polyline_constraint_hierarchy_2<T,Compare,Data>::split2(Constraint_id first, Vertex_it vcit)
-{
-  constraint_set.erase(first);
-  Vertex_list* second = new Vertex_list;
-  second->splice(second->skip_end(), *first.vl_ptr(), first.vl_ptr()->skip_begin(), vcit.base());
-  second->push_back(first.vl_ptr()->front()); // Duplicate the common vertex
-  Vertex_it vit = second->skip_end();
-  --vit;
-  vit.input() = true;
-  vit = first.vl_ptr()->skip_begin();
-  vit.input() = true;
-  constraint_set.insert(first);
-  constraint_set.insert(second);
- // We have to look at all subconstraints
-  for(Vertex_it it = second->skip_begin(), succ = it, end = second->skip_end(); 
-      ++succ != end; 
-      ++it){
-    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
-    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
-    Context_list* hcl = scit->second;
-
-    // and replace the context of the constraint
-    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-      if(ctit->enclosing == first.vl_ptr()){
-	ctit->enclosing = second;
-	break;
-      }
-    }
-  }
-  return second;
-}
-
-
-/*
-when a constraint is inserted,
-it is, at first, both  a constraint and a subconstraint
- */
-template <class T, class Compare, class Data>
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Vertex_list*
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-insert_constraint(T va, T vb){
-  Edge        he = make_edge(va, vb);
-  Vertex_list*  children = new Vertex_list; 
-  Context_list* fathers;
-
-  typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
-  if(scit == sc_to_c_map.end()){
-    fathers = new Context_list;
-    sc_to_c_map.insert(std::make_pair(he,fathers));
-  } else {
-    fathers = scit->second;
-  }
-
-  children->push_front(Node(va, true));  // was he.first
-  children->push_back(Node(vb, true));   // was he.second
-  constraint_set.insert(children);
-  Context ctxt;
-  ctxt.enclosing = children;
-  ctxt.pos     = children->skip_begin();
-  fathers->push_front(ctxt);
-
-  constraint_map[he] = children;
-  return children;
-}
-
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-append_constraint(Constraint_id cid, T va, T vb){
-  Edge        he = make_edge(va, vb);
-  Context_list* fathers;
-
-  typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
-  if(scit == sc_to_c_map.end()){
-    fathers = new Context_list;
-    sc_to_c_map.insert(std::make_pair(he,fathers));
-  } else {
-    fathers = scit->second;
-  }
-
-  typename Vertex_list::skip_iterator bit = cid.vl_ptr()->skip_end();
-  --bit;
-  cid.vl_ptr()->push_back(Node(vb, true));
-  Context ctxt;
-  ctxt.enclosing = cid.vl_ptr();
-  ctxt.pos     = bit;
-  fathers->push_front(ctxt);
-}
-
-
-template <class T, class Compare, class Data>
-void Polyline_constraint_hierarchy_2<T,Compare,Data>::
-clear()
-{
-  C_iterator cit;
-  Sc_iterator scit;
-  // clean and delete vertices lists
-  for(cit=constraint_set.begin(); cit != constraint_set.end();  cit++){
-    cit->vl_ptr()->clear();
-    delete cit->vl_ptr();
-  }
-  // clean and delete context lists
-  for(scit=sc_to_c_map.begin(); scit != sc_to_c_map.end(); scit++){
-    (*scit).second->clear();
-    delete (*scit).second;
-  }
-  sc_to_c_map.clear();
-  constraint_set.clear();
-  constraint_map.clear();
-}
-
-
-template <class T, class Compare, class Data>
-bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
-next_along_sc(T va, T vb, T& w) const
-{
-  // find the next vertex after vb along any enclosing constrained
-  // return false if there is no ....
-  Context_iterator  ctxtit, past;
-  if(!get_contexts(va, vb, ctxtit, past)) CGAL_triangulation_assertion(false);
-
-  Vertex_it pos;
-  for( ; ctxtit != past; ctxtit++){
-    pos = ctxtit->pos;
-    if((*pos)==va) {
-      ++pos; ++pos;
-      if (pos != ctxtit->enclosing->end()) {  w=(*pos); return true;}
-    }
-    else {
-      if (pos != ctxtit->enclosing->begin()) {--pos; w=(*pos); return true;}
-    }
-  }
-  return false;
-}
-
-
-
-/*
-  Attention, le point v DOIT etre un point de Steiner,
-  et les segments va,v et v,vb sont des sous contraintes.
-*/
-template <class T, class Compare, class Data>
-void Polyline_constraint_hierarchy_2<T,Compare,Data>::
-remove_Steiner(T v, T va, T vb)
-{
-  // remove a Steiner point
-  CGAL_precondition(!is_constrained_vertex(v));
- 
-  Context_list*  hcl1;
-  Context_list*  hcl2;
-  if(!get_contexts(va,v,hcl1)) CGAL_triangulation_assertion(false);
-  if(!get_contexts(v,vb,hcl2)) CGAL_triangulation_assertion(false);
-
-  Vertex_it      pos;
-  for(Context_iterator ctit=hcl1->begin(); ctit != hcl1->end(); ctit++){
-    pos = ctit->pos;
-    if((*pos)==va) pos++;
-    pos = ctit->enclosing->erase(pos);
-    ctit->pos = --pos;
-  }
-
-  sc_to_c_map.erase(make_edge(va,v));
-  sc_to_c_map.erase(make_edge(v,vb));
-  delete hcl2;
-  sc_to_c_map.insert(std::make_pair(make_edge(va,vb),hcl1));
-}
-
-
-
-/*
-  same as add_Steiner
-  precondition : va,vb est une souscontrainte. 
-*/
-template <class T, class Compare, class Data>
-void Polyline_constraint_hierarchy_2<T,Compare,Data>::
-split_constraint(T va, T vb, T vc){
-  add_Steiner(va, vb, vc);
-}
-
-
-template <class T, class Compare, class Data>
-void 
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-add_Steiner(T va, T vb, T vc){
-  Context_list* hcl;
-  if(!get_contexts(va,vb,hcl)) CGAL_triangulation_assertion(false);
-
-  Context_list* hcl2 = new  Context_list;
-
-  Vertex_it      pos;
-  Context  ctxt;
-  for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
-    // insert vc in enclosing constraint
-    pos = ctit->current();
-    ++pos;
-    pos = ctit->enclosing->insert(pos.base(), Node(vc));
-    --pos;
-    
-    // set ctxt to the context of (vc,vb)
-    // change *ctit in hcl to the context of (va,vc)
-    // add ctxt to hcl2 list
-    ctxt.enclosing = ctit->enclosing;  
-    if(*pos == va) {
-      ctit->pos = pos;
-      ctxt.pos = ++pos;
-    }
-    else { //(*pos)==vb
-      ctxt.pos = pos;
-      ctit->pos = ++pos;
-    }
-    hcl2->push_back(ctxt);
-  }
-
-  Context_list* hcl3;
-  if (get_contexts(va,vc,hcl3)) { // (va,vc) is already a subconstraint
-    hcl3->splice(hcl3->end(), *hcl);
-    delete hcl;
-  }
-  else   sc_to_c_map.insert(std::make_pair(make_edge(va,vc), hcl));
-
-  if (get_contexts(vc,vb,hcl3)) {// (vc,vb) is already a subconstraint
-    hcl3->splice(hcl3->end(),*hcl2);
-
-    delete hcl2;
-  }
-  else  sc_to_c_map.insert(std::make_pair(make_edge(vc,vb), hcl2));
-    
-  
-  sc_to_c_map.erase(make_edge(va,vb));
-  return;
-}
-
-
-template <class T, class Compare, class Data>
-inline
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Edge
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-make_edge(T va, T vb) const
-{
-  return comp(va, vb) ? Edge(va,vb) : Edge(vb,va);
-}
-
-template <class T, class Compare, class Data>
-inline
-bool
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-get_contexts(T va, T vb, Context_list* & hcl) const
-{
-  Sc_iterator sc_iter = sc_to_c_map.find(make_edge(va,vb));
-  if( sc_iter == sc_to_c_map.end() )    return(false);
-  hcl = (*sc_iter).second;
-  return true;
-}
-
-template <class T, class Compare, class Data>
-inline
-bool
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-get_contexts(T va, T vb, 
-	     Context_iterator& ctxt, 
-	     Context_iterator& past) const
-{
-  Context_list* hcl;
-  if (!get_contexts(va,vb,hcl)) return false;
-  ctxt = hcl->begin();
-  past = hcl->end();
-  return true;    
-}
-
-
-
-template <class T, class Compare, class Data>
-inline
-typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Vertex_it
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-get_pos(T va, T vb) const
-  //return pos in the first context
-{
-    return (*sc_to_c_map.find(make_edge(va,vb))).second->begin().pos;
-}
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-oriented_end(T va, T vb, T& vc) const
-{
-  Context_iterator ctxt, past;
-  if(!get_contexts(va,vb, ctxt, past) ) CGAL_triangulation_assertion(false);
-  if(*(ctxt->pos) == va)
-    vc = ctxt->enclosing->back();
-  else
-    vc = ctxt->enclosing->front();
-}
-
-
-template <class T, class Compare, class Data>
-void
-Polyline_constraint_hierarchy_2<T,Compare,Data>::
-print() const
-{ 
-  C_iterator hcit;
-  std::map<T,int>  vertex_num;
-  int num = 0;
-  for(hcit = c_begin(); hcit != c_end();  hcit++) {
-    Constraint_id cid = (*hcit);
-    Vertex_it vit =cid.vl_ptr()->skip_begin(), end = cid.vl_ptr()->skip_end();
-    for (;vit != end; vit++){
-      num ++;
-      vertex_num.insert(std::make_pair((*vit), num));
-    }
-  }
-//  typename std::map<T,int>::iterator vnit = vertex_num.begin();
-//  for(; vnit != vertex_num.end(); vnit++) {
-//    vnit->second = ++num;
-//    std::cerr << "vertex num " << num  << " " << vnit->first->point()
-//	      << std::endl;
-//  }
-
-  C_iterator cit=c_begin();
-  Sc_iterator scit=sc_begin();
-
-  for(; cit != c_end();  cit++){
-    std::cout << std::endl ;
-    std::cout << "constraint " ;
-    std::cout << cit->vl_ptr();
-    std::cout << "  subconstraints " ;
-    Vertex_it vit = (*cit).vl_ptr()->skip_begin(), end = (*cit).vl_ptr()->skip_end();
-    for(; vit != end; vit++){
-      std::cout << vertex_num[*vit]  <<" ";
-    }
-    vit = (*cit).vl_ptr()->skip_begin(), end = (*cit).vl_ptr()->skip_end();
-    for(; vit != end; vit++){
-      std::cout << (*vit)->point()  <<" ";
-    }
-  }
-  std::cout << std::endl ;
-  for(;scit != sc_end(); scit++){
-    std::cout << "subconstraint " ;
-    std::cout << vertex_num[scit->first.first] << " " 
-	      << vertex_num[scit->first.second];
-    Context_iterator cb, ce;
-    get_contexts(scit->first.first, scit->first.second, cb, ce);
-    
-    std::cout << "  enclosing " ;
-    for(; cb != ce; cb++) { 
-      std::cout << cb->id().vl_ptr();
-      std::cout <<  "   " ;
-    }
-    std::cout << std::endl ;
-  }
-  return; 
-}
-
-
-} //namespace CGAL
-#endif // CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h b/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h
deleted file mode 100644
index e54f30c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) 2012 Geometry Factory. All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-//
-#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
-#define CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
-
-#include <CGAL/algorithm.h>
-
-namespace CGAL {
-
-namespace Polyline_simplification_2
-{
-/// \ingroup PkgPolylineSimplification2Classes
-
-/// This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines,
-/// possibly scaled based on a factor.
-///
-/// \cgalModels `PolylineSimplificationCostFunction`.
-template<class FT>
-class Hybrid_squared_distance_cost
-{
-
-public:
-
-  /// Initializes the cost function with the specified `ratio`
-  Hybrid_squared_distance_cost( FT ratio ) : mSquaredRatio(ratio*ratio) {}
-
-  /// Compute the hybrid squared distance cost.
-  /// 
-  /// Given a vertex in constraint iterator `vicq` computes `vicp=std::prev(vicq)` and `vicr=std::next(vicq)`,
-  /// returns the maximal square distance between each point along the original subpolyline,
-  /// between `vicp` and `vicr`,
-  /// and the straight line segment from `*vicp->point() to *vicr->point()` divided by the smallest of
-  /// - the square of the ratio given to the constructor of the cost function,
-  /// - and the shortest squared distance between that segment and each of the vertices adjacent to `vicq`.
-  ///
-  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
-  /// is model of  `PolylineSimplificationVertexBase_2`.
- template<class CDT>
- boost::optional<typename CDT::Geom_traits::FT>
-    operator()(  const Constrained_triangulation_plus_2<CDT>& pct
-                 , typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator vicq) const
-  {
-    typedef typename Constrained_triangulation_plus_2<CDT>::Points_in_constraint_iterator Points_in_constraint_iterator;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Vertex_circulator Vertex_circulator;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Geom_traits Geom_traits ;
-    typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance;
-    typedef typename Geom_traits::Construct_segment_2        Construct_segment;
-    typedef typename Geom_traits::Segment_2                  Segment;
-    typedef typename Geom_traits::Point_2                    Point;                   
-
-    Compute_squared_distance compute_squared_distance = pct.geom_traits().compute_squared_distance_2_object() ;
-    Construct_segment        construct_segment        = pct.geom_traits().construct_segment_2_object() ;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
-
-    Vertices_in_constraint_iterator vicp = boost::prior(vicq); 
-    Vertices_in_constraint_iterator vicr = boost::next(vicq); 
-
-    Point const& lP = (*vicp)->point();
-    Point const& lR = (*vicr)->point();
-
-    Segment lP_R = construct_segment(lP, lR) ;
-
-    FT d1(0);
-    Points_in_constraint_iterator pp(vicp), rr(vicr);
-    ++pp;
-
-    for ( ;pp != rr; ++pp )
-      d1 = (std::max)(d1, compute_squared_distance( lP_R, *pp ) ) ;
-
-    FT d2 = mSquaredRatio;
-
-    Vertex_circulator vc = (*vicq)->incident_vertices(), done(vc);
-    do {
-      if((vc != pct.infinite_vertex()) && (vc != *vicp) && (vc != *vicr)){
-	d2 = (std::min)(d2, compute_squared_distance(vc->point(), (*vicq)->point()));
-      }
-      ++vc;
-    }while(vc != done);
-
-    return d1 / d2;
-  }
-
-private:
-
-  FT mSquaredRatio ;
-
-};
-
-
-} // namespace Polyline_simplification_2
-
-
-} //namespace CGAL
-
-#endif // CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h
deleted file mode 100644
index 5e59c29..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2012 Geometry Factory. All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-//
-#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
-#define CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
-
-#include <CGAL/algorithm.h>
-
-namespace CGAL {
-
-namespace Polyline_simplification_2
-{
-/// \ingroup PkgPolylineSimplification2Classes
-
-
-/// This class is a cost function which calculates the cost as a scaled variant of the square of the distance between the original and simplified polylines.
-///
-/// \cgalModels  `PolylineSimplificationCostFunction`
-class Scaled_squared_distance_cost
-{
-
-public:
-
-  /// Initializes the cost function.
-  Scaled_squared_distance_cost() {}
-
-  /// Given a vertex in constraint iterator `vicq` computes `vicp=std::prev(vicq)` and `vicr=std::next(vicq)`,
-  /// returns the maximum of the square distances between each point along the original subpolyline
-  /// between `vicp` and `vicr`,
-  /// and the straight line segment  from `*vicp->point() to *vicr->point()` divided by the shortest squared distance between
-  /// that segment and each of the vertices adjacent to `vicq`.
-  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
-  /// is model of  `PolylineSimplificationVertexBase_2`.
-    template<class CDT>
-    boost::optional<typename CDT::Geom_traits::FT>
-    operator()(const Constrained_triangulation_plus_2<CDT>& pct
-               , typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator vicq) const
-  {
-    typedef typename Constrained_triangulation_plus_2<CDT>::Points_in_constraint_iterator Points_in_constraint_iterator;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Vertex_circulator Vertex_circulator;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Geom_traits Geom_traits ;
-    typedef typename Geom_traits::FT                                  FT;
-    typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance;
-    typedef typename Geom_traits::Construct_segment_2        Construct_segment;
-    typedef typename Geom_traits::Segment_2                  Segment;
-    typedef typename Geom_traits::Point_2                    Point;                   
-
-    Compute_squared_distance compute_squared_distance = pct.geom_traits().compute_squared_distance_2_object() ;
-    Construct_segment        construct_segment        = pct.geom_traits().construct_segment_2_object() ;
-    typedef typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
-
-    Vertices_in_constraint_iterator vicp = boost::prior(vicq); 
-    Vertices_in_constraint_iterator vicr = boost::next(vicq); 
-
-    Point const& lP = (*vicp)->point();
-    Point const& lR = (*vicr)->point();
-     
-    Segment lP_R = construct_segment(lP, lR) ;
-
-    FT d1(0);
-    Points_in_constraint_iterator pp(vicp), rr(vicr);
-    ++pp;
-    
-    for ( ;pp != rr; ++pp )
-      d1 = (std::max)(d1, compute_squared_distance( lP_R, *pp ) ) ;
-
-    
-    FT d2;
-    bool d2_uninitialized = true;
-
-    Vertex_circulator vc = (*vicq)->incident_vertices(), done(vc);
-    do {
-      if((vc != pct.infinite_vertex()) && (vc != *vicp) && (vc != *vicr)){
-        if(d2_uninitialized){
-          d2 = compute_squared_distance(vc->point(), (*vicq)->point());
-	  d2_uninitialized = false;
-        } else {
-          d2 = (std::min)(d2, compute_squared_distance(vc->point(), (*vicq)->point()));
-        }
-      }
-      ++vc;
-    }while(vc != done);
-
-    return d2_uninitialized ? 
-      boost::optional<FT>(boost::none) :
-      boost::optional<FT>(d1 / d2);
-  }
-
-};
-
-
-
-} // namespace Polyline_simplification_2
-
-
-} //namespace CGAL
-
-#endif // CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
-
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h b/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h
deleted file mode 100644
index febbdac..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 Geometry Factory. All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-//
-#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
-#define CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
-
-
-namespace CGAL {
-
-namespace Polyline_simplification_2
-{
-
-/// \ingroup PkgPolylineSimplification2Classes
-
-
-/// This class is a stop predicate returning `true` when the cost for 
-/// simplifying a vertex is smaller than a certain threshold.
-///
-/// \cgalModels `PolylineSimplificationStopPredicate`.
-class Stop_above_cost_threshold
-{
-public :
-
-  /// Initializes it with the given threshold value.
-  Stop_above_cost_threshold( double threshold ) : mThres(threshold) {}
-
-  /// Returns `true` when `cost` is smaller or equal than the threshold.
-  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
-  /// is model of  `PolylineSimplificationVertexBase_2`.
-
-  template<class CDT>
-  bool operator()(const Constrained_triangulation_plus_2<CDT>&
-                  , typename Constrained_triangulation_plus_2<CDT>::Vertex_handle
-                  , typename CDT::Geom_traits::FT          cost
-                 , std::size_t
-                 , std::size_t
-                 ) const
-  {
-    return cost >= mThres ;
-  }
-
-private:
-
-  double mThres ;
-};
-
-} // namespace Polyline_simplification_2
-
-} //namespace CGAL
-
-#endif // CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/simplify.h b/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/simplify.h
deleted file mode 100644
index 3462b84..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/simplify.h
+++ /dev/null
@@ -1,472 +0,0 @@
-// Copyright (c) 2012 Geometry Factory. All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri
-//
-#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_SIMPLIFY_H
-#define CGAL_POLYLINE_SIMPLIFICATION_2_SIMPLIFY_H
-
-#include <list>
-
-#include <CGAL/Polyline_simplification_2/Vertex_base_2.h>
-#include <CGAL/Polyline_simplification_2/Squared_distance_cost.h>
-#include <CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h>
-#include <CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h>
-#include <CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h>
-#include <CGAL/Polyline_simplification_2/Stop_below_count_threshold.h>
-#include <CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h>
-#include <CGAL/Modifiable_priority_queue.h>
-#include <CGAL/algorithm.h>
-
-// Needed for Polygon_2
-
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Constrained_triangulation_plus_2.h>
-#include <list>
-
-
-namespace CGAL {
-
-#ifndef DOXYGEN_RUNNING
-
-template < class CDT >
-class Constrained_triangulation_plus_2;
-
-
-template <class PolygonTraits_2, class Container>
-class Polygon_2;
-
-#endif
-
-namespace Polyline_simplification_2 {
-
-template <typename PCT, typename CostFunction, typename StopFunction>
-class Polyline_simplification_2
-{
-public:
-
-  typedef typename PCT::Point Point;
-  typedef typename PCT::Constraint_id Constraint_id;
-  typedef typename PCT::Constraint_iterator Constraint_iterator;
-  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
-  //typedef typename PCT::Points_in_constraint_iterator Points_in_constraint_iterator;
-  typedef typename PCT::Vertex_handle Vertex_handle;
-  typedef typename PCT::Vertex_circulator Vertex_circulator;
-
-  typedef typename PCT::Geom_traits::FT FT;
-  
-  PCT& pct;
-  CostFunction cost;
-  StopFunction stop;
-  std::size_t pct_initial_number_of_vertices, number_of_unremovable_vertices;
-
-  
-  struct Compare_cost 
-  { 
-    bool operator() ( Vertices_in_constraint_iterator const& x, 
-                      Vertices_in_constraint_iterator const& y ) const 
-    { 
-      return (*x)->cost() < (*y)->cost(); 
-    }
-  } ;
-  
-  struct Id_map : public boost::put_get_helper<std::size_t, Id_map>
-  { 
-    typedef boost::readable_property_map_tag category;
-    typedef std::size_t                      value_type;
-    typedef value_type                       reference;
-    typedef Vertices_in_constraint_iterator  key_type;
-    
-    reference operator[] ( key_type const& x ) const { return x.base()->id ; }
-  } ;
-  
-  typedef CGAL::Modifiable_priority_queue<Vertices_in_constraint_iterator,Compare_cost,Id_map> MPQ ;
-  
-  MPQ* mpq;
-
-  Polyline_simplification_2(PCT& pct, CostFunction cost, StopFunction stop)
-    : pct(pct), cost(cost), stop(stop), pct_initial_number_of_vertices(pct.number_of_vertices()), number_of_unremovable_vertices(0)
-  {
-    int m = initialize_indices();
-    initialize_unremovable();
-    Compare_cost cc;
-    Id_map idm;
-    mpq =  new MPQ(m, cc, idm);
-    initialize_costs();
-  }
-
-  Polyline_simplification_2(PCT& pct, Constraint_id cid, CostFunction cost, StopFunction stop)
-    : pct(pct), cost(cost), stop(stop), pct_initial_number_of_vertices(pct.number_of_vertices()), number_of_unremovable_vertices(0)
-  {
-    int m = initialize_indices(cid);
-    initialize_unremovable();
-    Compare_cost cc;
-    Id_map idm;
-    mpq =  new MPQ(m, cc, idm);
-    initialize_costs(cid);
-  }
-
-
-
-  ~Polyline_simplification_2()
-  {
-    delete mpq;
-  }
-
-  void initialize_unremovable()
-  {
-    std::set<Vertex_handle> vertices;
-    Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
-    for(; cit!=e; ++cit){
-      Constraint_id cid = *cit;
-      Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
-      (*it)->set_removable(false);
-      for(; it != pct.vertices_in_constraint_end(cid); ++it){
-        if(vertices.find(*it) != vertices.end()){
-          (*it)->set_removable(false);
-        } else {
-          vertices.insert(*it);
-        }
-      }
-      it = boost::prior(it);
-      (*it)->set_removable(false);
-    }
-  }
-
-  // For all polyline constraints we compute the cost of all unremovable and not removed vertices
-  int
-  initialize_costs(Constraint_id cid)
-  {
-    int n=0;
-    for(Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
-        it != pct.vertices_in_constraint_end(cid);
-        ++it){
-      if((*it)->is_removable()){
-        boost::optional<FT> dist = cost(pct, it);
-        if(dist){
-          (*it)->set_cost(*dist);
-          (*mpq).push(it);
-          ++n;
-        } else {
-          // no need to set the costs as this vertex is not in the priority queue
-        } 
-      }
-    }
-    return n;
-  }  
-  
-  void
-  initialize_costs()
-  {
-    int n=0;
-    Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
-    for(; cit!=e; ++cit){
-      n+= initialize_costs(*cit);
-    }
-  }
-
-  bool
-  is_removable(Vertices_in_constraint_iterator it)
-  {
-    typedef typename PCT::Geom_traits Geom_traits;
-    if(! (*it)->is_removable()) {
-      return false;
-    }
-    
-    Vertex_handle vh = *it;
-    Vertices_in_constraint_iterator u = boost::prior(it);
-    Vertex_handle uh = *u;
-    Vertices_in_constraint_iterator w = boost::next(it);
-    Vertex_handle wh = *w;
-    
-    typename Geom_traits::Orientation_2 orientation_2 = pct.geom_traits().orientation_2_object();
-    CGAL::Orientation o = orientation_2(uh->point(), vh->point(), wh->point());
-    if(o == CGAL::COLLINEAR){
-      return true;
-    }
-    if(o == CGAL::LEFT_TURN){
-      std::swap(uh,wh);
-    }
-    
-    // uh, vh, wh perform a right turn 
-    const Point& up = uh->point();
-    const Point& wp = wh->point();
-    Vertex_circulator circ = pct.incident_vertices(vh);
-    while(circ != uh){
-      ++circ;
-    }
-    ++circ;
-    if(circ == wh){
-      typename PCT::Edge e;
-      bool b = pct.is_edge(uh,wh,e.first,e.second);
-      assert(b);
-      return ! pct.is_constrained(e);
-    }
-    while(circ != wh){
-      o = orientation_2(up, circ->point(), wp);
-      if(orientation_2(up, wp, circ->point()) != CGAL::RIGHT_TURN){
-        return false;
-      }
-      ++circ;
-    }
-    return true;
-  }
-
-
-  int
-  initialize_indices(Constraint_id cid, int id = 0)
-  {
-    for(Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
-        it != pct.vertices_in_constraint_end(cid);
-        ++it){
-      it.base()->id = id++;
-    }
-    return id;
-  }
-  
-  int
-  initialize_indices()
-  {
-    int id = 0;
-    Constraint_iterator b = pct.constraints_begin(), e = pct.constraints_end();
-    for(; b!=e; ++b){
-      id = initialize_indices(*b, id);
-    }
-    return id;
-  }
-  
-bool
-operator()()
-{
-  if((*mpq).empty()){
-      return false;
-    }
-  Vertices_in_constraint_iterator v = (*mpq).top();
-  (*mpq).pop();
-  if(stop(pct, *v, (*v)->cost(), pct_initial_number_of_vertices, pct.number_of_vertices())){
-    return false;
-  }
-  if(is_removable(v)){
-    Vertices_in_constraint_iterator u = boost::prior(v), w = boost::next(v);
-    pct.simplify(v);
-    
-    if((*u)->is_removable()){
-      boost::optional<FT> dist = cost(pct, u);
-      if(! dist){
-        std::cerr << "undefined cost not handled yet" << std::endl;
-      } else {
-        (*u)->set_cost(*dist);
-        if((*mpq).contains(u)){
-        (*mpq).update(u, true);
-        }
-      }
-    }
-    
-    if((*w)->is_removable()){
-      boost::optional<FT> dist = cost(pct, w);
-      if(! dist){
-        std::cerr << "undefined cost not handled yet" << std::endl;
-      } else {
-        (*w)->set_cost(*dist);
-        if((*mpq).contains(w)){
-        (*mpq).update(w, true);
-        }
-
-      }
-    }
-  } else {
-    ++number_of_unremovable_vertices;
-  }
-  return true;
-}
-
-  std::size_t
-  number_of_removed_vertices() const
-  {
-    return pct_initial_number_of_vertices - pct.number_of_vertices();
-  }
-
-  };
-
-/*!
-\ingroup  PkgPolylineSimplification2Functions
-
-Simplifies a single polygon.
-
-\tparam Traits must be a model of `ConstrainedDelaunayTriangulationTraits_2`
-\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`.
-\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
-
-\attention Any \cgal kernel can be used for `Traits`, but as the traits
-class is used for internally using a constrained Delaunay triangulation,
-it should be a kernel with at least exact predicates.
-*/
-template <class Traits, class Container, class CostFunction, class StopFunction>
-                  CGAL::Polygon_2<Traits,Container>
-                  simplify(const CGAL::Polygon_2<Traits,Container>& polygon,
-                           CostFunction cost,
-                           StopFunction stop)
-{
-  typedef Traits K;
-  typedef typename K::Point_2 Point_2;
-
-  typedef Vertex_base_2< K > Vb;
-  typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
-  typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
-  typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, CGAL::Exact_predicates_tag> CDT;
-  typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
-  typedef typename PCT::Constraint_id Constraint_id;
-  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
-
-  PCT pct;
-
-  Constraint_id cid = pct.insert_constraint(polygon);
-
-  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(pct, cost, stop);
-  while(simplifier()){}
-
-  CGAL::Polygon_2<Traits,Container> result;
-  Vertices_in_constraint_iterator beg = pct.vertices_in_constraint_begin(cid);
-  Vertices_in_constraint_iterator end = pct.vertices_in_constraint_end(cid);
-  for(; beg!=end;){
-    Point_2 p = (*beg)->point();
-    ++beg;
-    if(beg!=end){
-      result.push_back(p);
-    }
-  }
-  return result;
-}
-
-/*!
-\ingroup  PkgPolylineSimplification2Functions
-
-Simplifies an open or closed polyline given as an iterator range of 2D \cgal points.
-
-\tparam PointIterator must be an iterator with value type `CGAL::Kernel::Point_2`.
-\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
-\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
-\tparam PointOutputIterator must be an output iterator to which `CGAL::Kernel::Point_2` can be assigned.
-*/
-  template <class PointIterator, class CostFunction, class StopFunction, class PointOutputIterator>
-  PointOutputIterator
-  simplify(PointIterator b, PointIterator e,
-           CostFunction cost,
-           StopFunction stop,
-           PointOutputIterator out,
-           bool close = false)
-{
-  typedef typename std::iterator_traits<PointIterator>::value_type Point_2;
-  typedef typename CGAL::Kernel_traits<Point_2>::type K;
-  typedef Vertex_base_2< K > Vb;
-  typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
-  typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
-  typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, CGAL::Exact_predicates_tag> CDT;
-  typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
-  typedef typename PCT::Constraint_id Constraint_id;
-  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
-
-  PCT pct;
-
-  Constraint_id cid = pct.insert_constraint(b,e, close);
-
-  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(pct, cost, stop);
-  while(simplifier()){}
-
-  Vertices_in_constraint_iterator beg = pct.vertices_in_constraint_begin(cid);
-  Vertices_in_constraint_iterator end = pct.vertices_in_constraint_end(cid);
-  for(; beg!=end;){
-    Point_2 p = (*beg)->point();
-    ++beg;
-    if((!close) || (beg!=end)){
-      *out++ = p;
-    }
-  }
-  return out;
-}
-
-
-/*!
-\ingroup  PkgPolylineSimplification2Functions
-
-Simplifies a single polyline in a triangulation with polylines as constraints. 
-
-\param ct The underlying constrained Delaunay triangulation which embeds the polyline constraints
-\param cid The constraint identifier of the polyline constraint to simplify
-\param cost The cost function
-\param stop The stop function
-\param remove_points  If `true` the function \link CGAL::Constrained_triangulation_plus_2::remove_points_without_corresponding_vertex() `ct.remove_points_without_corresponding_vertex()` \endlink is called.
-\returns the number of removed vertices
-\tparam CDT  must be `CGAL::Constrained_triangulation_plus_2` with a vertex type that
-is model of  `PolylineSimplificationVertexBase_2`.
-\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
-\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
-*/
-template <class CDT, class CostFunction, class StopFunction>
-std::size_t
-simplify(CGAL::Constrained_triangulation_plus_2<CDT>& ct,
-         typename CGAL::Constrained_triangulation_plus_2<CDT>::Constraint_id cid,
-         CostFunction cost,
-         StopFunction stop,
-         bool remove_points = true)
-{
-  typedef CGAL::Constrained_triangulation_plus_2<CDT> PCT;
-  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(ct, cid, cost, stop);
-
-  while(simplifier()){}
-  if(remove_points){
-    ct.remove_points_without_corresponding_vertex(cid);
-  }
-  return simplifier.number_of_removed_vertices();
-}
-
-/*!
-\ingroup  PkgPolylineSimplification2Functions
-Simplifies all polylines in a triangulation with polylines as constraints.
-\param ct The underlying constrained Delaunay triangulation which embeds the polyline constraints
-\param cost The cost function
-\param stop The stop function
-\param remove_points If `true` the function \link CGAL::Constrained_triangulation_plus_2::remove_points_without_corresponding_vertex() `ct.remove_points_without_corresponding_vertex()`\endlink is called.
-\returns the number of removed vertices
-\tparam CDT  must be `CGAL::Constrained_triangulation_plus_2` with a vertex type that
-is model of  `PolylineSimplificationVertexBase_2`.
-\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
-\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
-*/
-
-template <class CDT, class CostFunction, class StopFunction>
-std::size_t
-simplify(CGAL::Constrained_triangulation_plus_2<CDT>& ct,
-         CostFunction cost,
-         StopFunction stop,
-         bool remove_points = true)
-{
-  typedef CGAL::Constrained_triangulation_plus_2<CDT> PCT;
-  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(ct, cost, stop);
-
-  while(simplifier()){}
-  if(remove_points){
-    ct.remove_points_without_corresponding_vertex();
-  }
-  return simplifier.number_of_removed_vertices();
-}
-
-
-
-} // namespace polyline_simplification_2
-} // namespace CGAL 
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/CORE_Expr_root_stack.h b/3rdparty/CGAL-4.6/include/CGAL/Polynomial/CORE_Expr_root_stack.h
deleted file mode 100644
index 875b942..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/CORE_Expr_root_stack.h
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_POLYNOMIAL_CORE_SOLVER_H
-#define CGAL_POLYNOMIAL_CORE_SOLVER_H
-#include <CGAL/Polynomial/basic.h>
-#include <CGAL/CORE_Expr.h>
-#include <CGAL/Polynomial/internal/CORE_polynomial.h>
-#include <CGAL/Polynomial/internal/Root_stack_traits_base.h>
-#include <CGAL/CORE_BigInt.h>
-
-#include <iostream>
-
-/*namespace CGAL {
-double to_double(const CORE::BigInt &bi)
-{
-  return bi.doubleValue();
-  }
-
-
-  } //namespace CGAL*/
-
-namespace CGAL { namespace POLYNOMIAL {
-
-
-class CORE_Expr_root_stack
-{
-protected:
-  typedef CORE_Expr_root_stack This;
-  //typedef CORE::Poly<CORE::BigInt> BIP;
-public:
-
-  typedef internal::CORE_polynomial Function;
-  typedef Function::NT Coef;
-  typedef CORE::Sturm<Coef> CORE_Sturm;
-  
-
-  struct Traits: public internal::Root_stack_traits_base<Function> {
-    
-  };
-
-  typedef CORE::Expr Root;
-
-  CORE_Expr_root_stack(const Function &f,
-		       const Root &lb,
-		       const Root &ub,
-		       const Traits &tr): f_(f), ub_(ub),  cur_valid_(false), tr_(tr), one_even_left_(false){
-    initialize(lb);
-  }
-
-  CORE_Expr_root_stack():  num_roots_(0){}
-
-  const Root& top() const
-  {
-    CGAL_precondition(!empty());
-    if(!cur_valid_) make_cur_valid();
-    return cur_;
-  }
-  void pop() {
-    if (!one_even_left_) {
-      --num_roots_;
-      cur_valid_=false;
-      CGAL_precondition(num_roots_>=0);
-    } else {
-      one_even_left_=false;
-    }
-  }
-
-  bool empty() const
-  {
-    if (num_roots_ != 0 && !cur_valid_) {
-      make_cur_valid();
-    }
-    return num_roots_==0;
-  }
-
-
-  std::ostream &write(std::ostream &out) const {
-    return out << f_ << ": " << cur_ << std::endl;
-  }
-protected:
-  void make_cur_valid() const {
-    CGAL_precondition(!cur_valid_);
-    if (num_roots_==0) {
-      no_roots();
-    } else {
-      make_root();
-      enforce_upper_bound();
-    }
-  }
-
-  Function f_;
-  CORE_Sturm sturm_;
-  Root  ub_;
-  mutable Root cur_;
-  mutable bool cur_valid_;
-  mutable int num_roots_;
-  mutable CORE::BigFloat bflb_, bfub_;
-  Traits tr_;
-  mutable bool one_even_left_;
-  mutable int offset_in_interval_;
-  mutable CGAL::Sign last_sign_;
-
-  void initialize(const Root& lb) {
-    if (f_.degree()<=0) {
-      no_roots();
-      return;
-    } else {
-      //std::cout <<"solving " << f_ << std::endl;
-      f_.contract();
-      //std::cout << f_.core_polynomial() << std::endl;
-      sturm_= CORE_Sturm(f_.core_polynomial()/*, false*/); //BigInt to BigRat
-      
-      offset_in_interval_=0;
-      //CORE::BigFloat bflb, bfub;
-      
-      /*if (lb == -std::numeric_limits<Root>::infinity()){
-	bflb_= -f_.core_polynomial().CauchyUpperBound();
-	} else {*/
-      CORE::BigFloat offset(.5);
-      CGAL_postcondition(offset.isExact());
-      bflb_= bf_lower_bound(lb);
-      CGAL_postcondition(bflb_.isExact());
-      do {
-	bflb_ -= offset; // hack to get around assuming core is consistent with 0 endpoint
-	last_sign_=CGAL::sign(f_.core_polynomial().eval(bflb_));
-      } while (last_sign_==CGAL::ZERO);
-      CGAL_postcondition(bflb_.isExact());
-
-      bfub_= bf_upper_bound(ub_);
-      CGAL_precondition(bflb_ < bfub_);
-      
-      
-      //std::cout << " in interval: " << bflb_ << " " << bfub_ << std::endl;
-      num_roots_= sturm_.numberOfRoots(bflb_, bfub_);
-      //std::cout << "nr= " << num_roots_ << std::endl;
-      //CORE::Expr testr;
-      ++num_roots_;
-      do {
-	--num_roots_;
-	if ( num_roots_ == 0) {
-	  no_roots();
-	  return;
-	}
-	make_root();
-      } while (cur_ < lb);
-      //make_cur_root(testr);
-    }
-    //std::cout << "There are " << num_roots_ << " roots.\n";
-    enforce_upper_bound();
-  }
-
-  void enforce_upper_bound() const {
-    if (cur_ < ub_) return;
-    else {
-      //std::cout << "Rejected " << cur_ << std::endl;
-      no_roots();
-    }
-  }
-
-  void make_root() const {
-    CGAL_precondition(num_roots_!=0);
-    //std::cout << "making root: " << CGAL::to_double(bflb_) << " " << CGAL::to_double(bfub_) << std::endl;
-  
-    CORE::BFInterval bfi;
-    bfi= sturm_.isolateRoot(1+offset_in_interval_, bflb_, bfub_);
-   
-    //std::cout << "got: " << CGAL::to_double(bfi.first) << " " << CGAL::to_double(bfi.second) << std::endl;
-    //int nr= sturm_.numberOfRoots(bfi.first, bfi.second);
-    //int nr=1;
-    CGAL::Sign cur_sign=CGAL::sign(f_.core_polynomial().eval(bfi.second));
-    if (cur_sign==0) {
-      Traits::Sign_after sa= tr_.sign_after_object();
-      cur_sign= sa(f_, bfi.second);
-      ++offset_in_interval_;
-    } else {
-      offset_in_interval_=0;
-      bflb_= bfi.second;
-    }
-    CGAL_precondition(cur_sign!= CGAL::ZERO);
-    CGAL_precondition(last_sign_ != CGAL::ZERO);
-    if (last_sign_== cur_sign) {
-      one_even_left_=true;
-      //std::cout << "it is even" << std::endl;
-    } else {
-      one_even_left_=false;
-    }
-    last_sign_= cur_sign;
-    //std::cout << nr << " " << bfi.first << " " << bfi.second <<  std::endl;
-    cur_= CORE::Expr(f_.core_polynomial(), bfi);
-    cur_valid_=true;
-    //cur_ =Root(e/*/f_.scale()*/, nr);
-    //std::cout << "root= " << cur_ <<  " " << e << std::endl;
-  }
-
-  void no_roots() const {
-    //ub_= CORE::Expr(0);
-    cur_= infinity<Root>();
-    num_roots_=0;
-    one_even_left_=false;
-    cur_valid_=false;
-  }
-
-  /*void initialize_counters(const Root &lb) {
-    std::cout << "Computing strum of " << poly_ << "..." << std::flush;
-    CORE_Sturm sturm(poly_);
-    std::cout << "done." << std::endl;
-    num_roots_=0;
-    CGAL_assertion(-ub_ != infinity<Root>());
-    num_roots_= sturm.numberOfRoots();
-    if (lb== -infinity<Root>() && ub_== infinity<Root>()) {
-      counter_=0;
-    }
-    else if (ub_ == infinity<Root>()) {
-      std::cout << bf_lower_bound(lb.representation()) << std::endl;
-      //num_roots_= sturm.numberOfRootsAbove(bf_lower_bound(lb.representation()));
-      counter_ = sturm.numberOfRootsBelow(bf_lower_bound(lb.representation()));
-    }
-    else if (lb == infinity<Root>()) {
-      //num_roots_= sturm.numberOfRootsBelow(bf_upper_bound(ub_.representation()));
-      counter_ = 0;
-    }
-    else {
-      counter_= sturm.numberOfRootsBelow(bf_lower_bound(lb.representation()));
-      
-    }
-    }*/
-
-  //! There are probably better ways of doing this
-  Coef bf_lower_bound(const CORE::Expr &rt) const
-  {
-    machine_double lb, ub;
-    rt.doubleInterval(lb, ub);
-    return Coef(lb);
-  }
-
-  //! There are probably better ways of doing this
-  Coef bf_upper_bound(const CORE::Expr &rt) const
-  {
-    machine_double lb, ub;
-    rt.doubleInterval(lb, ub);
-    return Coef(ub);
-  }
-};
-
-std::ostream &operator<<(std::ostream &out, const CORE_Expr_root_stack &o) {
-  return o.write(out);
-}
-
-} } //namespace CGAL::POLYNOMIAL;
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Polynomial_type.h b/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Polynomial_type.h
deleted file mode 100644
index 096d679..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Polynomial_type.h
+++ /dev/null
@@ -1,1478 +0,0 @@
-// Copyright (c) 2008 Max-Planck-Institute Saarbruecken (Germany)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer <hemmer at informatik.uni-mainz.de> 
-//                 Arno Eigenwillig <arno at mpi-inf.mpg.de>
-//                 Michael Seel <seel at mpi-inf.mpg.de>
-//                 
-// ============================================================================
-
-// TODO: The comments are all original EXACUS comments and aren't adapted. So
-//         they may be wrong now.
-
-/*! \file CGAL/Polynomial.h
- *  \brief Defines class CGAL::Polynomial.
- *  
- *  Polynomials in one variable (or more, by recursion)
- */
-
-#ifndef CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
-#define CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
-
-#define CGAL_icoeff(T) typename CGAL::First_if_different<       \
-typename CGAL::internal::Innermost_coefficient_type<T>::Type, T, 1>::Type  
-
-#define CGAL_int(T) typename CGAL::First_if_different< int,   \
-typename CGAL::internal::Innermost_coefficient_type<T>::Type , 2>::Type 
-
-
-#include <CGAL/ipower.h>
-#include <cstdio>
-#include <sstream>
-#include <CGAL/Polynomial/misc.h>
-
-#include <CGAL/use.h>
-
-#ifdef CGAL_HAS_THREADS
-#  include <boost/thread/tss.hpp>
-#endif
-
-namespace CGAL {
-
-template <class NT> class Polynomial;
-template <class NT> class Scalar_factor_traits;
-template <class NT> Polynomial<NT> operator - (const Polynomial<NT>& p);
-
-namespace internal {
-
-template <class NT> class Polynomial_rep;
-
-// \brief tag type to distinguish a certain constructor of \c CGAL::Polynomial
-class Creation_tag {};
-
-//
-// The internal representation class Polynomial_rep<NT>
-//
-
-// \brief  internal representation class for \c CGAL::Polynomial
-template <class NT_> class Polynomial_rep 
-{ 
-  typedef NT_ NT;
-  typedef std::vector<NT> Vector;
-  typedef typename Vector::size_type      size_type;
-  typedef typename Vector::iterator       iterator;
-  typedef typename Vector::const_iterator const_iterator;
-  Vector coeff;
-
-  Polynomial_rep() : coeff() {}
-  Polynomial_rep(Creation_tag, size_type s) : coeff(s,NT(0)) {}
-
-  Polynomial_rep(size_type n, ...);
-
-#ifdef CGAL_USE_LEDA
-  Polynomial_rep(const LEDA::array<NT>& coeff_)
-    : coeff(coeff_.size())
-  {
-    for (int i = 0; i < coeff_.size(); i++) {
-      coeff[i] = coeff_[i + coeff_.low()];
-    }
-  }
-#endif // CGAL_USE_LEDA
-
-  template <class Forward_iterator>
-  Polynomial_rep(Forward_iterator first, Forward_iterator last) 
-    : coeff(first,last)
-  {}
-
-  void reduce() {
-    while ( coeff.size()>1 && CGAL::is_zero(coeff.back())) coeff.pop_back();
-  }
-
-  void simplify_coefficients() {
-    typename Algebraic_structure_traits<NT>::Simplify simplify;
-    for (iterator i = coeff.begin(); i != coeff.end(); i++) {
-      simplify(*i);
-    }
-  }
-
-  friend class Polynomial<NT>;
-};  // class Polynomial_rep<NT_>
-
-template <class NT>
-Polynomial_rep<NT>::Polynomial_rep(size_type n, ...)
-  : coeff(n)
-{
-  // varargs, hence not inline, otherwise g++-3.1 -O2 makes trouble
-  va_list ap; va_start(ap, n);
-  for (size_type i = 0; i < n; i++) {
-    coeff[i] = *(va_arg(ap, const NT*));
-  }
-  va_end(ap);
-}
-
-}// namespace internal
-
-//
-// The actual class Polynomial<NT>
-//
-
-/*! \ingroup CGAL_Polynomial
-  \brief polynomials in one variable (or more, by recursion)
-
-  An instance of the data type \c CGAL::Polynomial represents a
-  polynomial <I>p = a<SUB>0</SUB> + a<SUB>1</SUB>*x + ...
-  + a<SUB>d</SUB>*x<SUP>d</SUP></I> from the ring
-  NT[x]. The data type offers standard ring operations, comparison
-  operations (e.g. for symbolic computation with an infimaximal \e x ),
-  and various algebraic operations (gcd, resultant).
-
-  \c CGAL:Polynomial offers a full set of algebraic operators, i.e.
-  binary +, -, *, / as well as +=, -=, *=, /=; not only for polynomials
-  but also for a polynomial and a number of the coefficient type.
-  (The / operator must only be used for integral divisions, i.e.
-  those with remainder zero.)
-  Unary + and - and (in)equality ==, != are also provided.
-  If the member function \c sign() (see ibid.) is defined for
-  a coefficient type, then so are the comparison operators
-  <, >, <=, >= corresponding to the \c sign() of the difference.
-  The \c sign() of a polynomial is the \c sign() of its leading
-  coefficient, hence comparing by the \c sign() of the difference
-  amounts to lexicographic comparison of the coefficient sequence,
-  with the coefficient of the highest power taking precedence over
-  those of lower powers.
-
-  \c NT must be at least a model of \c IntegralDomainWithoutDiv.
-  For all operations naturally involving division, a \c IntegralDomain
-  is required. If more than a \c IntegralDomain is required, this is documented.
-
-  \c NT can itself be an instance of \c CGAL::Polynomial, yielding a
-  crude form of multivariate polynomials. They behave correctly from an
-  algebraic point of view (in particular w.r.t. gcd and resultant
-  computation), but not always as a user would expect. For example, the
-  leading coefficient of a polynomial from (NT[x])[y] naturally is an
-  element of NT[x]. Similarly, computing derivations, resultants, etc.
-  always happens w.r.t. the outmost variable.
-
-  Inexact and limited-precision types can be used as coefficients,
-  but at the user's risk. The algorithms implemented were written with
-  exact number types in mind.
-
-  This data type is implemented as a handle type with value semantics
-  (i.e. if you change it, it clones its representation by calling
-  \c copy_on_write(), hence no
-  aliasing occurs) using \c LiS::Handle (without unification).  The
-  coefficients are stored in a vector of \c NT entries. Arithmetic
-  operations are implemented naively: + and - need a number of NT
-  operations which is linear in the degree while * is quadratic.
-  The advanced algebraic operations are implemented with classical
-  non-modular methods.
-
-  The important invariant to be preserved by all methods is that
-  the coefficient sequence does not contain leading zero coefficients
-  (where leading means at the high-degree end), with the excpetion that
-  the zero polynomial is represented by a single zero coefficient.
-  An empty coefficient sequence denotes an undefined value.
-
-  Many functions modifying a \c CGAL::Polynomial appear both as a member
-  function (returning \c void ) which modifies the present object
-  and as a non-member function returning a new \c CGAL::Polynomial
-  while leaving their argument unchanged. The former is more efficient
-  when the old value is no longer referenced elsewhere whereas the
-  latter is more convenient.
-  \b History: This data type has evolved out of \c RPolynomial 
-  from Michael Seel's PhD thesis.  */ 
-
-template <class NT_>
-class Polynomial 
-  : public Handle_with_policy< internal::Polynomial_rep<NT_> >,
-    public boost::ordered_field_operators1< Polynomial<NT_> , 
-           boost::ordered_field_operators2< Polynomial<NT_> , NT_ ,  
-           boost::ordered_field_operators2< Polynomial<NT_> , CGAL_icoeff(NT_),
-           boost::ordered_field_operators2< Polynomial<NT_> , CGAL_int(NT_)  > > > > 
-{
-  typedef typename internal::Innermost_coefficient_type<NT_>::Type Innermost_coefficient_type; 
-public: 
-
-  //! \name Typedefs 
-  //@{ 
-  //! coefficient type of this instance 
-  typedef NT_ NT; 
-  //! representation pointed to by this handle 
-  typedef internal::Polynomial_rep<NT> Rep;
-  //! base class  
-  typedef Handle_with_policy< Rep > Base;
-  //! container used to store coefficient sequence
-  typedef typename Rep::Vector    Vector;
-  //! container's size type
-  typedef typename Rep::size_type size_type;
-  //! container's iterator (random access)
-  typedef typename Rep::iterator  iterator;
-  //! container's const iterator (random access)
-  typedef typename Rep::const_iterator const_iterator;
-  //! the Self type
-  typedef Polynomial<NT> Self; 
-  //@}
-  
-
-protected:
-  //! \name Protected methods
-  //@{
-  //! access to the internal coefficient sequence
-  Vector& coeffs() { return this->ptr()->coeff; }
-  //! const access to the internal coefficient sequence
-  const Vector& coeffs() const { return this->ptr()->coeff; }
-  //! create an empty polynomial with s coefficients (degree up to s-1)
-  Polynomial(internal::Creation_tag f, size_type s)
-    : Base(internal::Polynomial_rep<NT>(f,s) )
-    {}
-    //! non-const access to coefficient \c i
-    /*! The polynomial's representation must not be shared between
-     *  different handles when this function is called.
-     *  This can be ensured by calling \c copy_on_write().
-     *
-     *  If assertions are enabled, the index \c i is range-checked.
-     */
-    NT& coeff(unsigned int i) {
-      CGAL_precondition(!this->is_shared() && i<(this->ptr()->coeff.size()));
-      return this->ptr()->coeff[i]; 
-    }
-
-    //! remove leading zero coefficients
-    void reduce() { this->ptr()->reduce(); }
-    //! remove leading zero coefficients and warn if there were any
-    void reduce_warn() {
-      CGAL_precondition( this->ptr()->coeff.size() > 0 );
-      if (this->ptr()->coeff.back() == NT(0)) {
-        CGAL_warning_msg(false, "unexpected degree loss (zero divisor?)");
-        this->ptr()->reduce();
-      }
-    }
-    //@}
-
-//
-// Constructors of Polynomial<NT>
-//
-private:
-    static Self& get_default_instance(){
-      #ifdef CGAL_HAS_THREADS  
-        static boost::thread_specific_ptr< Self > safe_x_ptr;
-          if (safe_x_ptr.get() == NULL) 
-            safe_x_ptr.reset(new Self(0));
-        return *safe_x_ptr.get();  
-      #else
-        static Self x = Self(0);
-        return x;
-      #endif        
-    }
-public:
-
-    //! \name Constructors
-
-    //! default constructor
-    Polynomial() : Base(static_cast<const Base&>(get_default_instance())) {}
-
-    //! copy constructor: copy existing polynomial (shares rep)
-    Polynomial(const Self& p) : Base(static_cast<const Base&>(p)) {}
-        
-    //! construct the constant polynomial a0 from any type convertible to NT
-    template <class T>
-      explicit Polynomial(const T& a0)
-      : Base(Rep(internal::Creation_tag(), 1))
-      { coeff(0) = NT(a0); reduce(); simplify_coefficients(); } 
-          
-    //! construct the constant polynomial a0
-    explicit Polynomial(const NT& a0)
-      : Base(Rep(1, &a0))
-      { reduce(); simplify_coefficients(); }
-      
-    //! construct the polynomial a0 + a1*x
-    Polynomial(const NT& a0, const NT& a1)
-      : Base(Rep(2, &a0,&a1))
-      { reduce(); simplify_coefficients(); }
-
-    //! construct the polynomial a0 + a1*x + a2*x^2
-    Polynomial(const NT& a0,const NT& a1,const NT& a2)
-      : Base(Rep(3, &a0,&a1,&a2))
-      { reduce(); simplify_coefficients(); }
-      
-    //! construct the polynomial a0 + a1*x + ... + a3*x^3
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3)
-      : Base(Rep(4, &a0,&a1,&a2,&a3))
-      { reduce(); simplify_coefficients(); }
-
-    //! construct the polynomial a0 + a1*x + ... + a4*x^4
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
-        const NT& a4)
-      : Base(Rep(5, &a0,&a1,&a2,&a3,&a4))
-      { reduce(); simplify_coefficients(); }
-      
-    //! construct the polynomial a0 + a1*x + ... + a5*x^5
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
-        const NT& a4, const NT& a5)
-      : Base(Rep(6, &a0,&a1,&a2,&a3,&a4,&a5))
-      { reduce(); simplify_coefficients(); }
-
-    //! construct the polynomial a0 + a1*x + ... + a6*x^6
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
-        const NT& a4, const NT& a5, const NT& a6)
-      : Base(Rep(7, &a0,&a1,&a2,&a3,&a4,&a5,&a6))
-      { reduce(); simplify_coefficients(); }
-
-    //! construct the polynomial a0 + a1*x + ... + a7*x^7
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
-        const NT& a4, const NT& a5, const NT& a6, const NT& a7)
-      : Base(Rep(8, &a0,&a1,&a2,&a3,&a4,&a5,&a6,&a7))
-      { reduce(); simplify_coefficients(); }
-      
-    //! construct the polynomial a0 + a1*x + ... + a8*x^8
-    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
-        const NT& a4, const NT& a5, const NT& a6, const NT& a7,
-        const NT& a8)
-      : Base(Rep(9, &a0,&a1,&a2,&a3,&a4,&a5,&a6,&a7,&a8))
-      { reduce(); simplify_coefficients(); }
-      
-    /*! \brief construct the polynomial whose coefficients are determined
-     *  by the iterator range.
-     *
-     *  Let <TT>a0 = *first</TT>, <TT>a1 = *++first</TT>, ...,
-     *  <TT>ad = *it</TT>, where <TT>++it == last</TT>.
-     *  Then the polynomial constructed is a0 + a1*x + ... + ad*x<SUP>d</SUP>
-     */
-    template <class Forward_iterator>
-    Polynomial(Forward_iterator first, Forward_iterator last)
-      : Base(Rep(first,last)) 
-      { reduce(); simplify_coefficients(); }
-                              
-#if defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING)
-    /*! \brief construct a polynomial from a LEDA \c array
-     *
-     *  The coefficients are determined by \c c[c.low()] up to
-     *  \c c[c.high()] of the array \c c. The lowest array element
-     *  \c c[c.low()] is always used for the constant term and so on,
-     *  irrespective of whether \c c.low() is zero or not.
-     */
-    Polynomial(const LEDA::array<NT>& c)
-      : Base(Rep(c))
-      { reduce(); simplify_coefficients(); }
-#endif // defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING)
-                                
-//
-// Public member functions
-//
-
-public:
-    //! \name Public Methods
-    //@{
-
-    //! a random access iterator pointing to the constant coefficient
-    const_iterator begin() const { return this->ptr()->coeff.begin(); }
-    //! a random access iterator pointing beyond the leading coefficient
-    const_iterator end()   const { return this->ptr()->coeff.end(); }
-
-    //! the degree \e d of the polynomial
-    /*! The degree of the zero polynomial is 0.
-     *  The degree of an undefined polynomial is -1.
-     */
-  int degree() const { return static_cast<int>(this->ptr()->coeff.size())-1; } 
-
-    //! const access to the coefficient of x^i
-    const NT& operator[](unsigned int i) const {
-      CGAL_precondition( i<(this->ptr()->coeff.size()) );
-      return this->ptr()->coeff[i];
-    }
-
-    //! the number of non-zero terms of the polynomial
-    /*! For an undefined polynomial, this is set to -1. */
-    int number_of_terms() const {
-      int terms = 0;
-      if (degree() < 0) return -1;
-      for (int i = 0; i <= degree(); i++) {
-        if ((*this)[i] != NT(0)) terms++;
-      }
-      return terms;
-    }
-
-    //! the leading coefficient a<SUB>d</SUB> of the polynomial
-    const NT& lcoeff() const {
-      CGAL_precondition( this->ptr()->coeff.size() > 0 );
-      return this->ptr()->coeff.back();
-    }
-    
-
-    /*! \brief evaluate the polynomial at \c x
-     *
-     *  \c x can have another type \c NTX than the coefficient type \c NT.
-     *  The result type is defined by CGAL::Coercion_traits<>
-     */
-    // Note that there is no need to provide a special version for intervals.
-    // This was shown by some benchmarks of George Tzoumas, for the 
-    // Interval Newton method used in the Voronoi Diagram of Ellipses
-    template <class NTX>
-      typename Coercion_traits<NTX,NT>::Type 
-      evaluate(const NTX& x_) const {
-      typedef Coercion_traits<NTX,NT> CT;
-      typename CT::Cast cast;
-        
-      CGAL_precondition( degree() >= 0 );
-      int d = degree();
-      typename CT::Type x = cast(x_);
-      typename CT::Type y=cast(this->ptr()->coeff[d]);
-      while (--d >= 0){
-        //    y = y*x + cast(this->ptr()->coeff[d]);
-        y *= x;
-        y += cast(this->ptr()->coeff[d]);
-      }
-      return y; 
-    }
-public:
-    //! evaluates the polynomial as a homogeneous polynomial
-    //! in fact returns evaluate(u/v)*v^degree()
-   
-    template <class NTX>
-      typename Coercion_traits<NTX,NT>::Type 
-      evaluate_homogeneous(const NTX& u_, 
-          const NTX& v_,
-          int hom_degree = -1) const {
-      if(hom_degree == -1 ) hom_degree = degree();
-      CGAL_precondition( hom_degree >= degree());
-      CGAL_precondition( hom_degree >= 0 );
-      typedef Coercion_traits<NTX,NT> CT;
-      typedef typename CT::Type Type;
-      typename CT::Cast cast;
-
-      Type u = cast(u_);
-      Type v = cast(v_);
-      Type monom;
-      Type y(0);
-      for(int i = 0; i <= hom_degree; i++){
-        monom = CGAL::ipower(v,hom_degree-i)*CGAL::ipower(u,i);
-        if(i <= degree())
-          y += monom * cast(this->ptr()->coeff[i]);  
-      }
-      return y;
-    }
-
-private:
-    // NTX not decomposable
-    template <class NTX, class TAG >
-      CGAL::Sign sign_at_(const NTX& x, TAG) const{
-      CGAL_precondition(degree()>=0);
-      return CGAL::sign(evaluate(x));
-    }
-    // NTX decomposable
-    
-    template <class NTX>
-      CGAL::Sign sign_at_(const NTX& x, CGAL::Tag_true) const{
-      CGAL_precondition(degree()>=0);
-      typedef Fraction_traits<NTX> FT;
-      typedef typename FT::Numerator_type Numerator_type;
-      typedef typename FT::Denominator_type Denominator_type;
-      Numerator_type num;
-      Denominator_type den;
-      typename FT::Decompose decompose;
-      decompose(x,num,den);
-      CGAL_precondition(CGAL::sign(den) == CGAL::POSITIVE);
-
-      typedef Coercion_traits< Numerator_type , Denominator_type > CT;
-      typename CT::Cast cast;
-      return CGAL::sign(evaluate_homogeneous(cast(num),cast(den)));
-    }
-public:
-    //! evaluates the sign of the Polynomial at x
-    template <class NTX>
-      CGAL::Sign sign_at(const NTX& x) const{
-      // the sign with evaluate_homogeneous is called
-      // if NTX is decaomposable
-      // and NT would be changed by NTX 
-      typedef typename Fraction_traits<NTX>::Is_fraction Is_fraction;
-      typedef typename Coercion_traits<NT,NTX>::Type Type;
-      typedef typename ::boost::mpl::if_c<
-      ::boost::is_same<Type,NT>::value, Is_fraction, CGAL::Tag_false
-        >::type If_decomposable_AND_Type_equals_NT;
-            
-      return sign_at_(x,If_decomposable_AND_Type_equals_NT());
-    }
-    
-    
-    // for the benefit of mem_fun1 & friends who don't like const ref args
-    template <class NTX>
-      typename CGAL::Coercion_traits<NT,NTX>::Type 
-      evaluate_arg_by_value(NTX x) const { return evaluate(x); } 
-
-    /*!  \brief evaluate the polynomial with all coefficients replaced by
-     *  their absolute values
-     *
-     *  That is, the function computes <I>|a<SUB>0</SUB>| +
-     *  |a<SUB>1</SUB>|*x + ... + |a<SUB>d</SUB>|*x<SUP>d</SUP></I>.
-     *  As with \c evaluate(), \c x can be of a type other than \c NT.
-     *  \pre Requires \c CGAL::Algebraic_structure_traits::Abs for NT.
-     */
-   
-    template <class NTX> 
-      typename Coercion_traits<NTX,NT>::Type 
-      evaluate_absolute(const NTX& x) const {
-      typedef typename Coercion_traits<NTX,NT>::Type Type;
-      typedef typename Coercion_traits<NTX,NT>::Cast Cast;
-      Type xx(Cast()(x));
-      CGAL_precondition( degree() >= 0 );
-      typename Real_embeddable_traits<Type>::Abs abs;
-      int d = degree();
-      Type y(abs(Cast()(this->ptr()->coeff[d])));
-      while (--d >= 0) y = y*xx + abs(Cast()(this->ptr()->coeff[d]));
-      return y;
-    } 
-
-    /*! \brief evaluate the polynomial with all coefficients replaced by
-     *  their absolute values
-     *
-     *  This is a specialization for \c x is of type CGAL::Interval.
-     */
-    // TODO: Interval isn't available either!!
-/*    Interval evaluate_absolute(const Interval& x) const {
-      CGAL_precondition( degree() >= 0 );
-      typename Algebraic_structure_traits<Interval>::Abs abs;
-      typename Algebraic_structure_traits<NT>::To_Interval to_Interval;
-      int d = 0;
-      Interval y(to_Interval(this->ptr()->coeff[d]));
-      while (++d <= degree()) 
-      y+=abs(pow(x,d)*to_Interval(this->ptr()->coeff[d]));
-      return y;
-      } */
-    /*! \brief return the sign of the leading coefficient
-     *
-     *  For univariate real polynomials, this is the sign
-     *  of the limit process \e x --> oo.
-     *  Also available as non-member function.
-     */
-    CGAL::Sign sign() const {
-//        CGAL_static_assertion( (boost::is_same< typename Real_embeddable_traits<NT>::Is_real_embeddable,
-//                              CGAL::Tag_true>::value) );
-      return CGAL::sign(lcoeff());
-    }
-
-    //! return sign of difference
-    CGAL::Comparison_result compare(const Polynomial& p2) const {
-      typename Real_embeddable_traits<NT>::Compare compare;
-      typename Real_embeddable_traits<NT>::Sgn sign;
-      CGAL_precondition(degree() >= 0);
-      CGAL_precondition(p2.degree() >= 0);
-
-      if (this->is_identical(p2)) return CGAL::EQUAL;
-
-      int d1 = degree();
-      int d2 = p2.degree();
-      if (d1 > d2) {
-        return sign((*this)[d1]);
-      } else if (d1 < d2) {
-        return -sign(p2[d2]);
-      }
-
-      for (int i = d1; i >= 0; i--) {
-        CGAL::Comparison_result s = compare((*this)[i], p2[i]);
-        if (s != CGAL::EQUAL) return s;
-      }
-      return CGAL::EQUAL;
-    }
-
-    //! return sign of difference with constant "polynomial"
-    CGAL::Comparison_result compare(const NT& p2) const {
-      typename Real_embeddable_traits<NT>::Compare compare;
-      typename Real_embeddable_traits<NT>::Sgn sign;
-      CGAL_precondition(degree() >= 0);
-
-      if (degree() > 0) {
-        return sign(lcoeff());
-      } else {
-        return compare((*this)[0], p2);
-      }
-    }
-
-    //! return true iff this is the zero polynomial
-    bool is_zero() const
-    { return degree()==0 && this->ptr()->coeff[0]==NT(0); }
-
-    //! return \c -p if \c p.sign()<0 and \c p otherwise
-    Polynomial<NT> abs() const
-    { if ( sign()<0 ) return -*this; return *this; }
-
-    //! return the gcd of all coefficients
-    /*! The content is defined as 1 for the zero polynomial. */
-    NT content() const {
-      CGAL_precondition(degree() >= 0);
-      if (is_zero()) return NT(0);
-        
-      return content_( typename Algebraic_structure_traits< NT >::Algebraic_category() );
-    }
-
-private:
-    NT content_( Unique_factorization_domain_tag ) const {
-      typename Algebraic_structure_traits<NT>::Integral_division idiv;
-      typename Algebraic_structure_traits<NT>::Unit_part    upart;
-      typename Algebraic_structure_traits<NT>::Gcd          gcd;
-      const_iterator it = this->ptr()->coeff.begin(), ite = this->ptr()->coeff.end();
-      while (*it == NT(0)) it++;
-      NT d = idiv(*it, upart(*it));
-      for( ; it != ite; it++) {
-        if (d == NT(1)) return d;
-        if (*it != NT(0)) d = gcd(d, *it);
-      }
-      return d;
-    }
-
-    NT content_( Field_tag ) const {
-      return NT(1);
-    }
-
-public:
-    
-    //! return the unit part of the polynomial
-    /*! It is defined as the unit part of the leading coefficient. */
-    NT unit_part() const {
-      typename Algebraic_structure_traits<NT>::Unit_part upart;
-      return upart(lcoeff());
-    }
-
-    //! turn p(x) into its derivative p'(x)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void diff() {
-      CGAL_precondition( degree() >= 0 );
-      if (is_zero()) return;
-      this->copy_on_write();
-      if (degree() == 0) { coeff(0) = NT(0); return; }
-      coeff(0) = coeff(1); // avoid redundant multiplication by NT(1)
-      for (int i = 2; i <= degree(); i++) coeff(i-1) = coeff(i) * NT(i);
-      this->ptr()->coeff.pop_back();
-      reduce(); // in case NT has positive characteristic
-    }
-
-    //! replace p(x) by p(a*x)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void scale_up(const NT& a) {
-      CGAL_precondition( degree() >= 0 );
-      if (degree() == 0) return;
-      this->copy_on_write();
-      NT a_to_j = a;
-      for (int j = 1; j <= degree(); j++) {
-        coeff(j) *= a_to_j; 
-        a_to_j *= a;
-      }
-      reduce_warn();
-    }
-
-    //! replace p(x) by b<SUP>d</SUP> * p(x/b)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void scale_down(const NT& b)
-    {
-      CGAL_precondition( degree() >= 0 );
-      if (degree() == 0) return;
-      this->copy_on_write();
-      NT b_to_n_minus_j = b;
-      for (int j = degree() - 1; j >= 0; j--) {
-        coeff(j) *= b_to_n_minus_j; 
-        b_to_n_minus_j *= b;
-      }
-      reduce_warn();
-    }
-
-    //! replace p(x) by b<SUP>d</SUP> * p(a*x/b)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void scale(const NT& a, const NT& b) { scale_up(a); scale_down(b); }
-
-    //! replace p(x) by p(x+1)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void translate_by_one()
-    {   // implemented using Ruffini-Horner, see [Akritas, 1989]
-      CGAL_precondition( degree() >= 0 );
-      this->copy_on_write();
-      const int n = degree();
-      for (int j = n-1; j >= 0; j--) {
-        for (int i = j; i < n; i++) coeff(i) += coeff(i+1); 
-      }
-    }
-
-    //! replace p(x) by p(x+c)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void translate(const NT& c)
-    {   // implemented using Ruffini-Horner, see [Akritas, 1989]
-      CGAL_precondition( degree() >= 0 );
-      this->copy_on_write();
-      const int n = degree();
-      for (int j = n-1; j >= 0; j--) {
-        for (int i = j; i < n; i++) coeff(i) += c*coeff(i+1);
-      }
-    }
-
-    //! replace p by b<SUP>d</SUP> * p(x+a/b)
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void translate(const NT& a, const NT& b) 
-    {   // implemented using Mehlhorn's variant of Ruffini-Horner
-      CGAL_precondition( degree() >= 0 );
-      this->copy_on_write();
-      const int n = degree();
-
-      NT b_to_n_minus_j = b;
-      for (int j = n-1; j >= 0; j--) {
-        coeff(j) *= b_to_n_minus_j;
-        b_to_n_minus_j *= b;
-      }
-
-      for (int j = n-1; j >= 0; j--) {
-        coeff(j) += a*coeff(j+1);
-        for (int i = j+1; i < n; i++) {
-          coeff(i) = b*coeff(i) + a*coeff(i+1); 
-        }
-        coeff(n) *= b;
-      }
-      reduce_warn();
-    }
-
-    //! replace p by x<SUP>d</SUP> * p(1/x), i.e. reverse the coefficient sequence
-    /*! Also available as non-member function which returns the result
-     *  instead of overwriting the argument. */
-    void reversal() {
-      CGAL_precondition( degree() >= 0 );
-      this->copy_on_write();
-      NT t;
-      for (int l = 0, r = degree(); l < r; l++, r--) {
-        t = coeff(l); coeff(l) = coeff(r); coeff(r) = t;
-      }
-      reduce();
-    }
-
-    //! divide \e P(x) by \e x , discarding the remainder \e p(0)
-    void divide_by_x() {
-      CGAL_precondition(degree() >= 0);
-      if (is_zero()) return;
-      this->copy_on_write();
-      for (int i = 0; i < degree(); i++) {
-        coeff(i) = coeff(i+1);
-      }
-      coeffs().pop_back();
-    }
-
-    //! invoke \c CGAL::Algebraic_structure_traits::Simplify on all coefficients
-    void simplify_coefficients() { this->ptr()->simplify_coefficients(); }
-
-    //! write polynomial to \c os in \c LiS::IO::PRETTY format
-    /*! The output is intended to be Maple-readable; see module
-     *  \link CGAL_io CGAL I/O Support \endlink.
-     *
-     * Example: A \c CGAL::Polynomial<int> with a value of
-     * 4<I>x</I><SUP>2</SUP> - 1 will be written as
-     * <TT> 4*x^2 + (-1) </TT> by this function.
-     */
-    void output_maple(std::ostream& os) const;
-    //! write polynomial to \c os in a format readable by \c input_ascii()
-    void output_ascii(std::ostream& os) const;
-    //! write polynomial to \c os in \c LiS::IO::BENCHMARK format
-    void output_benchmark(std::ostream& os) const;
-
-    //! implement \c CGAL::Scalar_factor_traits::Scalar_div for polynomials
-    void scalar_div(const typename
-        Scalar_factor_traits< Polynomial<NT> >::Scalar& b) {
-      typename Scalar_factor_traits<NT>::Scalar_div sdiv;
-      this->copy_on_write();
-      for (int i = degree(); i >= 0; --i) {
-        sdiv(coeff(i), b);
-      }
-    };
-
-    //@}
-
-//
-// Static member functions
-//
-
-    //! \name Static member functions
-    //@{
-
-    /*! \brief division with remainder on polynomials
-     *
-     * Given \c f and \c g, compute quotient \c q and remainder \c r
-     * such that <I>f = g*q + r</I> and deg(<I>r</I>) < deg(<I>g</I>).
-     *
-     * \pre \c g!=0. NT is a field, or \c f and \c g are such that
-     * the division can be performed in NT anyway.
-     */
-    static void euclidean_division (const Polynomial<NT>& f,
-        const Polynomial<NT>& g,
-        Polynomial<NT>& q, Polynomial<NT>& r);
-
-    /*! \brief pseudo division with remainder on polynomials
-     *
-     * Given \c f and \c g != 0, compute quotient \c q and remainder \c r
-     * such that <I>D*f = g*q + r</I> and deg(<I>r</I>) < deg(<I>g</I>),
-     * where \e D = lcoeff(<I>g</I>)^max(0, deg(<I>f</I>)-deg(<I>g</I>)+1)
-     *
-     * This is similar to \c euclidean_division() except that multiplying
-     * by \e D makes sure that the division can be performed over any ring.
-     */
-    static void pseudo_division(const Polynomial<NT>& f,
-        const Polynomial<NT>& g, 
-        Polynomial<NT>& q, Polynomial<NT>& r, NT& D);
-
-
-    /*! \brief read a polynomial from \c is
-     *
-     * The expected format is:
-     * <TT><B>P[</B></TT><I>d</I> <TT><B>(</B></TT><I>i</I><TT><B>,</B></TT>
-     * <I>ai</I><TT><B>)</B></TT> ... <TT><B>]</B></TT> 
-     * with coefficients in arbitrary order (but without
-     * repetitions). <I>d</I> is the degree and <I>ai</I> is the coefficient
-     * of <I>x<SUP>i</SUP></I>. Missing coefficients are set to zero.
-     * Whitespace is ignored.
-     * The format of the coefficients must be understandable for
-     * <TT> is >> iformat(ai) </TT>.
-     *
-     * Example: A \c CGAL::Polynomial<int> with a value of
-     * 4<I>x</I><SUP>2</SUP> - 1 has to be written as
-     * \c P[2(2,4)(0,-1)] or \c P[2(2,4)(1,0)(0,-1)]
-     * or similarly with permuted coefficients.
-     */
-    static Polynomial<NT> input_ascii(std::istream& is);
-
-    //@}
-
-//
-// Arithmetic Operations, Part II:
-// implementing two-address arithmetic (incl. mixed-mode) by member functions
-//
-
-// ...for polynomials
-    Polynomial<NT>& operator += (const Polynomial<NT>& p1) {
-      this->copy_on_write();
-      int d = (std::min)(degree(),p1.degree()), i;
-      for(i=0; i<=d; ++i) coeff(i) += p1[i];
-      while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
-      reduce(); return (*this);
-    }
-
-    Polynomial<NT>& operator -= (const Polynomial<NT>& p1) 
-      {
-        this->copy_on_write();
-        int d = (std::min)(degree(),p1.degree()), i;
-        for(i=0; i<=d; ++i) coeff(i) -= p1[i];
-        while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
-        reduce(); return (*this);
-      }
-
-    Polynomial<NT>& operator *= (const Polynomial<NT>& p2)
-      { 
-        // TODO: use copy on write 
-        Polynomial<NT> p1 = (*this);
-        typedef typename Polynomial<NT>::size_type size_type;
-        CGAL_precondition(p1.degree()>=0 && p2.degree()>=0);
-        internal::Creation_tag TAG;
-        Polynomial<NT>  p(TAG, size_type(p1.degree()+p2.degree()+1) ); 
-        // initialized with zeros
-        for (int i=0; i <= p1.degree(); ++i)
-          for (int j=0; j <= p2.degree(); ++j)
-            p.coeff(i+j) += (p1[i]*p2[j]); 
-        p.reduce();
-        return (*this) = p ;
-      }
-
-    Polynomial<NT>& operator /= (const Polynomial<NT>& p2)
-      { 
-        // TODO: use copy on write 
-        CGAL_precondition(!p2.is_zero());
-        if ((*this).is_zero()) return (*this);
-
-        Polynomial<NT> p1 = (*this);
-        typedef Algebraic_structure_traits< Polynomial<NT> > AST; 
-        // Precondition: q with p1 == p2 * q must exist within NT[x].
-        // If this holds, we can perform Euclidean division even over a ring NT
-        // Proof: The quotients of each division that occurs are precisely
-        //   the terms of q and hence in NT.
-        Polynomial<NT> q, r;
-        Polynomial<NT>::euclidean_division(p1, p2, q, r);
-        CGAL_USE_TYPE(AST);
-        CGAL_postcondition( !AST::Is_exact::value || p2 * q == p1);
-        return (*this) = q;
-      }
-
-
-    // ...and in mixed-mode arithmetic
-    Polynomial<NT>& operator += (const NT& num)
-      { this->copy_on_write(); coeff(0) += (NT)num; return *this; }
-
-    Polynomial<NT>& operator -= (const NT& num)
-      { this->copy_on_write(); coeff(0) -= (NT)num; return *this; }
-
-    Polynomial<NT>& operator *= (const NT& num) {
-      CGAL_precondition(degree() >= 0);
-      this->copy_on_write();
-      for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
-      reduce();
-      return *this;
-    }
-
-    Polynomial<NT>& operator /= (const NT& num)
-      {
-        CGAL_precondition(num != NT(0));
-        CGAL_precondition(degree() >= 0);
-        if (is_zero()) return *this;
-        this->copy_on_write();
-        typename Algebraic_structure_traits<NT>::Integral_division idiv;
-        for(int i = 0; i <= degree(); ++i) coeff(i) = idiv(coeff(i), num);
-        reduce_warn();
-        return *this;
-      }// ...and in mixed-mode arithmetic
-                              
-    // TODO: avoid  NT(num)
-    Polynomial<NT>& operator += (CGAL_int(NT) num)
-      { return *this += NT(num); } 
-    Polynomial<NT>& operator -= (CGAL_int(NT) num)
-      { return *this -= NT(num); } 
-    Polynomial<NT>& operator *= (CGAL_int(NT) num)
-      { return *this *= NT(num); } 
-    Polynomial<NT>& operator /= (CGAL_int(NT) num)
-      { return *this /= NT(num); }  
-                              
-    // TODO: avoid  NT(num)
-    Polynomial<NT>& operator += (const CGAL_icoeff(NT)& num)
-      { return *this += NT(num); } 
-    Polynomial<NT>& operator -= (const CGAL_icoeff(NT)& num)
-      { return *this -= NT(num); } 
-    Polynomial<NT>& operator *= (const CGAL_icoeff(NT)& num)
-      { return *this *= NT(num); } 
-    Polynomial<NT>& operator /= (const CGAL_icoeff(NT)& num)
-      { return *this /= NT(num); }
-
-    // special operation to implement (pseudo-)division and the like
-    void minus_offsetmult(const Polynomial<NT>& p, const NT& b, int k)
-    {
-      CGAL_precondition(!this->is_shared());
-      int pd = p.degree();
-      CGAL_precondition(degree() >= pd+k);
-      for (int i = 0; i <= pd; i++) coeff(i+k) -= b*p[i];
-      reduce();
-    }
-    
-    friend Polynomial<NT> operator - <> (const Polynomial<NT>&);   
-}; // class Polynomial<NT_>
-
-// Arithmetic Operators, Part III:
-// implementation of unary operators and three-address arithmetic
-// by friend functions
-//
-
-template <class NT> inline
-Polynomial<NT> operator + (const Polynomial<NT>& p) {
-  CGAL_precondition(p.degree() >= 0);
-  return p;
-}
-
-template <class NT> inline
-Polynomial<NT> operator - (const Polynomial<NT>& p) {
-  CGAL_precondition(p.degree()>=0);
-  Polynomial<NT> res(p.coeffs().begin(),p.coeffs().end());
-  typename Polynomial<NT>::iterator it, ite=res.coeffs().end();
-  for(it=res.coeffs().begin(); it!=ite; ++it) *it = -*it;
-  return res;
-}
-
-
-
-
-template <class NT> inline
-Polynomial<NT> operator * (const Polynomial<NT>& p1, 
-    const Polynomial<NT>& p2)
-{
-  typedef typename Polynomial<NT>::size_type size_type;
-  CGAL_precondition(p1.degree()>=0 && p2.degree()>=0);
-  internal::Creation_tag TAG;
-  Polynomial<NT>  p(TAG, size_type(p1.degree()+p2.degree()+1) ); 
-  // initialized with zeros
-  for (int i=0; i <= p1.degree(); ++i)
-    for (int j=0; j <= p2.degree(); ++j)
-      p.coeff(i+j) += (p1[i]*p2[j]); 
-  p.reduce();
-  return p;
-}
-
-
-//
-// Comparison Operators
-//
-
-// polynomials only
-template <class NT> inline
-bool operator == (const Polynomial<NT>& p1, const Polynomial<NT>& p2) {
-  CGAL_precondition(p1.degree() >= 0);
-  CGAL_precondition(p2.degree() >= 0);
-  if (p1.is_identical(p2)) return true;
-  if (p1.degree() != p2.degree()) return false;
-  for (int i = p1.degree(); i >= 0; i--) if (p1[i] != p2[i]) return false;
-  return true;
-}
-template <class NT> inline
-bool operator < (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-{ return ( p1.compare(p2) < 0 ); } 
-template <class NT> inline
-bool operator > (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
-{ return ( p1.compare(p2) > 0 ); } 
-
-// operators NT
-template <class NT> inline 
-bool operator == (const NT& num, const Polynomial<NT>& p) {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == num;
-}
-template <class NT> inline
-bool operator == (const Polynomial<NT>& p, const NT& num)  {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == num;
-}
-template <class NT> inline
-bool operator < (const NT& num, const Polynomial<NT>& p) 
-{ return ( p.compare(num) > 0 );}
-template <class NT> inline
-bool operator < (const Polynomial<NT>& p,const NT& num) 
-{ return ( p.compare(num) < 0 );}
-template <class NT> inline
-bool operator > (const NT& num, const Polynomial<NT>& p) 
-{ return ( p.compare(num) < 0 );}
-template <class NT> inline
-bool operator > (const Polynomial<NT>& p,const NT& num) 
-{ return ( p.compare(num) > 0 );}
-
-
-// compare int #################################
-template <class NT> inline
-bool operator == (const CGAL_int(NT)& num, const Polynomial<NT>& p)  {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == NT(num);
-}
-template <class NT> inline
-bool operator == (const Polynomial<NT>& p, const CGAL_int(NT)& num)  {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == NT(num);
-}
-template <class NT> inline
-bool operator < (const CGAL_int(NT)& num, const Polynomial<NT>& p) 
-{ return ( p.compare(NT(num)) > 0 );}
-template <class NT> inline
-bool operator < (const Polynomial<NT>& p, const CGAL_int(NT)& num) 
-{ return ( p.compare(NT(num)) < 0 );}
-template <class NT> inline
-bool operator > (const CGAL_int(NT)& num, const Polynomial<NT>& p) 
-{ return ( p.compare(NT(num)) < 0 );}
-template <class NT> inline
-bool operator > (const Polynomial<NT>& p, const CGAL_int(NT)& num) 
-{ return ( p.compare(NT(num)) > 0 );}
-
-// compare icoeff ###################################
-template <class NT> inline
-bool operator == (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p)  {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == NT(num);
-}
-template <class NT> inline
-bool operator == (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num)  {
-  CGAL_precondition(p.degree() >= 0);
-  return p.degree() == 0 && p[0] == NT(num);
-}
-template <class NT> inline
-bool operator < (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p) 
-{ return ( p.compare(NT(num)) > 0 );}
-template <class NT> inline
-bool operator < (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num) 
-{ return ( p.compare(NT(num)) < 0 );}
-
-
-template <class NT> inline
-bool operator > (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p) 
-{ return ( p.compare(NT(num)) < 0 );}
-template <class NT> inline
-bool operator > (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num) 
-{ return ( p.compare(NT(num)) > 0 );}
-
-//
-// Algebraically non-trivial operations
-//
-
-// 1) Euclidean and pseudo-division of polynomials
-// (implementation of static member functions)
-
-template <class NT>
-void Polynomial<NT>::euclidean_division(
-    const Polynomial<NT>& f, const Polynomial<NT>& g,
-    Polynomial<NT>& q, Polynomial<NT>& r)
-{
-  typedef Algebraic_structure_traits<NT> AST;
-  typename AST::Integral_division idiv;
-  int fd = f.degree(), gd = g.degree();
-  if ( fd < gd ) {
-    q = Polynomial<NT>(NT(0)); r = f;
-
-    CGAL_postcondition( !AST::Is_exact::value || f == q*g + r); 
-    return;
-  }
-  // now we know fd >= gd 
-  int qd = fd-gd, delta = qd+1, rd = fd;
-
-  internal::Creation_tag TAG;    
-  q = Polynomial<NT>(TAG, delta ); 
-  r = f; r.copy_on_write();
-  while ( qd >= 0 ) {
-    NT Q = idiv(r[rd], g[gd]);
-    q.coeff(qd) += Q;
-    r.minus_offsetmult(g,Q,qd);
-    r.simplify_coefficients();
-    if (r.is_zero()) break;
-    rd = r.degree();
-    qd = rd - gd;
-  }
-  q.simplify_coefficients();
-
-  CGAL_postcondition( !AST::Is_exact::value || f == q*g + r);
-}
-
-#ifndef CGAL_POLY_USE_OLD_PSEUDODIV
-
-template <class NT>
-void Polynomial<NT>::pseudo_division(
-    const Polynomial<NT>& A, const Polynomial<NT>& B,
-    Polynomial<NT>& Q, Polynomial<NT>& R, NT& D)
-{
-  typedef Algebraic_structure_traits<NT> AST;
-  // pseudo-division with incremental multiplication by lcoeff(B)
-  // see [Cohen, 1993], algorithm 3.1.2
-
-  CGAL_precondition(!B.is_zero());
-  int delta = A.degree() - B.degree();
-
-  if (delta < 0 || A.is_zero()) {
-    Q = Polynomial<NT>(NT(0)); R = A; D = NT(1);
-       
-    CGAL_USE_TYPE(AST);
-    CGAL_postcondition( !AST::Is_exact::value || Polynomial<NT>(D)*A == Q*B + R);
-    return;
-  }
-  const NT d = B.lcoeff();
-  int e = delta + 1;
-  D = CGAL::ipower(d, e);
-  internal::Creation_tag TAG;
-  Q = Polynomial<NT>(TAG, e);
-  R = A; R.copy_on_write(); R.simplify_coefficients();
-
-  // invariant: d^(deg(A)-deg(B)+1 - e) * A == Q*B + R
-  do { // here we have delta == R.degree() - B.degree() >= 0 && R != 0
-    NT lR = R.lcoeff();
-    for (int i = delta+1; i <= Q.degree(); i++) Q.coeff(i) *= d;
-    Q.coeff(delta) = lR;              // Q = d*Q + lR * X^delta
-    for (int i = 0; i <= R.degree(); i++) R.coeff(i) *= d;
-    R.minus_offsetmult(B, lR, delta); // R = d*R - lR * X^delta * B
-    R.simplify_coefficients();
-    e--;
-    delta = R.degree() - B.degree();
-  } while (delta > 0 || (delta == 0 && !R.is_zero()));
-  // funny termination condition because deg(0) = 0, not -\infty
-
-  NT q = CGAL::ipower(d, e);
-  Q *= q; Q.simplify_coefficients();
-  R *= q; R.simplify_coefficients();
-
-  CGAL_postcondition( !AST::Is_exact::value || Polynomial<NT>(D)*A == Q*B + R);
-}
-
-#else
-
-template <class NT>
-void Polynomial<NT>::pseudo_division(
-    const Polynomial<NT>& f, const Polynomial<NT>& g, 
-    Polynomial<NT>& q, Polynomial<NT>& r, NT& D)
-{
-  typedef Algebraic_structure_traits<NT> AST;
-  // pseudo-division with one big multiplication with lcoeff(g)^{...}
-  typename Algebraic_structure_traits<NT>::Integral_division idiv;
-
-  int fd=f.degree(), gd=g.degree();
-  if ( fd < gd ) {
-    q = Polynomial<NT>(NT(0)); r = f; D = NT(1); 
-
-    CGAL_postcondition( !AST::Is_exact::value  || Polynomial<NT>(D)*f==q*g+r);
-    return;
-  }
-  // now we know rd >= gd 
-  int qd = fd-gd, delta = qd+1, rd = fd;
-  internal::Creation_tag TAG;
-  q = Polynomial<NT>(TAG, delta );
-  NT G = g[gd]; // highest order coeff of g
-  D = CGAL::ipower(G, delta);
-  Polynomial<NT> res = D*f;
-  res.simplify_coefficients();
-  while ( qd >= 0 ) {
-    NT F = res[rd];    // highest order coeff of res
-    NT t = idiv(F, G); // sure to be integral by multiplication of D
-    q.coeff(qd) = t;   // store q coeff
-    res.minus_offsetmult(g,t,qd); 
-    res.simplify_coefficients();
-    if (res.is_zero()) break;
-    rd = res.degree();
-    qd = rd - gd;
-  }
-  r = res; // already simplified
-  q.simplify_coefficients();
-
-  CGAL_postcondition( !AST::Is_exact::value  || Polynomial<NT>(D)*f==q*g+r);
-}
-
-template <class NT> inline
-Polynomial<NT> division(const Polynomial<NT>& p1, 
-    const Polynomial<NT>& p2,
-    Integral_domain_tag)
-{
-  typedef Algebraic_structure_traits<NT> AST;
-  CGAL_precondition(!p2.is_zero());
-  if ( p1.is_zero() ) return p1;
-  Polynomial<NT> q,r; NT D;
-  Polynomial<NT>::pseudo_division(p1,p2,q,r,D);
-  q/=D;
-
-  CGAL_postcondition( !AST::Is_exact::value || p2 * q == p1);
-  return q;
-}
-
-template <class NT> inline
-Polynomial<NT> division(const Polynomial<NT>& p1, 
-    const Polynomial<NT>& p2,
-    Field_tag)
-{
-  typedef Algebraic_structure_traits<NT> AST;
-  CGAL_precondition(!p2.is_zero());
-  if (p1.is_zero()) return p1;
-  Polynomial<NT> q,r;
-  Polynomial<NT>::euclidean_division(p1,p2,q,r);
-  CGAL_postcondition( !AST::Is_exact::value  || p2 * q == p1);
-  return q;
-}
-
-#endif // CGAL_POLY_USE_OLD_PSEUDODIV
-
-//
-// I/O Operations
-//
-
-/*! \ingroup CGAL_Polynomial
- *  \relates CGAL::Polynomial
- *  \brief output \c p to \c os
- *
- *  Output \c p in a format as specified by
- *  \c LiS::get_mode(os), see \link LiS_io LiS I/O Support \endlink.
- *  Currently, the output for \c LiS::IO::BINARY happens to be
- *  identical to \c LiS::IO::ASCII.
- */
-template <class NT>
-std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p) {
-  switch(CGAL::get_mode(os)) {
-  case CGAL::IO::PRETTY:
-    p.output_maple(os); break;
-  default:
-    p.output_ascii(os); break;
-  }
-  return os;
-}
-
-/*! \ingroup CGAL_Polynomial
- *  \relates CGAL::Polynomial
- *  \brief try to read a polynomial from \c is into \c p
- *
- *  \c is must be in a mode that supports input of polynomials
- *  (\c LiS::IO::ASCII or \c LiS::IO::BINARY) and the input from
- *  \c is must have the format of output to a stream of the same mode.
- */
-template <class NT>
-std::istream& operator >> (std::istream& is, Polynomial<NT>& p) {
-  CGAL_precondition(!CGAL::is_pretty(is));
-  p = Polynomial<NT>::input_ascii(is);
-  return is;
-}
-
-
-template <class NT> inline
-void print_maple_monomial(std::ostream& os, const NT& coeff,
-    const char *var, int expn)
-{
-  if (expn == 0 || coeff != NT(1)) {
-    os << CGAL::oformat(coeff, Parens_as_product_tag());
-    if (expn >= 1) os << "*";
-  }
-  if (expn >= 1) {
-    os << var;
-    if (expn > 1) os << "^" << CGAL::oformat(expn);
-  }
-}
-
-// fwd declaration of Polynomial_traits_d
-template <typename Polynomial_d> class Polynomial_traits_d;
-
-template <class NT>
-void Polynomial<NT>::output_maple(std::ostream& os) const {
-  const Polynomial<NT>& p = *this;
-  const char *varname;
-  char vnbuf[42];
-    
-  // use variable names x, y, z, w1, w2, w3, ...
-  if (Polynomial_traits_d<NT>::d < 3) {
-    static const char *varnames[] = { "x", "y", "z" };
-    varname = varnames[Polynomial_traits_d<NT>::d];
-  } else {
-    std::sprintf(vnbuf, "w%d", Polynomial_traits_d<NT>::d - 2);
-    varname = vnbuf;
-  }
-    
-  int i = p.degree();
-  CGAL::print_maple_monomial(os, p[i], varname, i);
-  while (--i >= 0) {
-    if (p[i] != NT(0)) {
-      os << " + ";
-      CGAL::print_maple_monomial(os, p[i], varname, i);
-    }
-  }
-}
-
-template <class NT>
-void Polynomial<NT>::output_ascii(std::ostream &os) const {
-  const Polynomial<NT> &p = *this;
-  if (p.is_zero()) { os << "P[0 (0," << oformat(NT(0)) << ")]"; return; }
-
-  os << "P[" << oformat(p.degree());
-  for (int i = 0; i <= p.degree(); i++) {
-    if (p[i] != NT(0)) os << "(" << CGAL::oformat(i) << ","
-                          << CGAL::oformat(p[i]) << ")";
-  }
-  os << "]";
-}
-
-template <class NT>
-void Polynomial<NT>::output_benchmark(std::ostream &os) const {
-  typedef typename Polynomial_traits_d< Polynomial<NT> >::Innermost_coefficient_type 
-    Innermost_coefficient_type;
-  typedef std::pair< Exponent_vector, Innermost_coefficient_type >
-    Exponents_coeff_pair;
-  typedef typename Polynomial_traits_d< Polynomial<NT> >::Monomial_representation Gmr;
-    
-  std::vector< Exponents_coeff_pair > monom_rep;
-  Gmr gmr;
-  gmr( *this, std::back_inserter( monom_rep ) );
-    
-  os << Benchmark_rep< Polynomial< NT > >::get_benchmark_name() << "( ";
-    
-  for( typename std::vector< Exponents_coeff_pair >::iterator it = monom_rep.begin();
-       it != monom_rep.end(); ++it ) {
-    if( it != monom_rep.begin() )
-      os << ", ";
-    os << "( " << bmformat( it->second ) << ", ";
-    it->first.output_benchmark(os);
-    os << " )";        
-  }
-  os << " )";
-}
-
-// Benchmark_rep specialization 
-template < class NT >
-class Benchmark_rep< CGAL::Polynomial< NT > > {
-  const CGAL::Polynomial< NT >& t;
-public:
-  //! initialize with a const reference to \a t.
-  Benchmark_rep( const CGAL::Polynomial< NT >& tt) : t(tt) {}
-  //! perform the output, calls \c operator\<\< by default.
-  std::ostream& operator()( std::ostream& out) const { 
-    t.output_benchmark( out );
-    return out;
-  }
-    
-  static std::string get_benchmark_name() {
-    std::stringstream ss;
-    ss << "Polynomial< " << Polynomial_traits_d< Polynomial< NT > >::d;
-        
-    std::string coeff_name = Benchmark_rep< NT >::get_benchmark_name();
-        
-    if( coeff_name != "" )
-      ss << ", " << coeff_name;
-        
-    ss << " >";
-    return ss.str();
-  }
-};
-
-// Moved to internal namespace because of name clashes
-// TODO: Is this OK?
-namespace internal {
-
-inline static void swallow(std::istream &is, char d) {
-  char c;
-  do c = is.get(); while (isspace(c));
-  if (c != d) CGAL_error_msg( "input error: unexpected character in polynomial");
-}
-} // namespace internal
-
-template <class NT>
-Polynomial<NT> Polynomial<NT>::input_ascii(std::istream &is) {
-  char c;
-  int degr = -1, i=0;
-
-  internal::swallow(is, 'P');
-  internal::swallow(is, '[');
-  is >> CGAL::iformat(degr);
-  if (degr < 0) {
-    CGAL_error_msg( "input error: negative degree of polynomial specified");
-  }
-  internal::Creation_tag TAG;
-  Polynomial<NT> p(TAG, degr+1);
-
-  do c = is.get(); while (isspace(c));
-  do {
-    if (c != '(') CGAL_error_msg( "input error: ( expected");
-    is >> CGAL::iformat(i);
-    if (!(i >= 0 && i <= degr && p[i] == NT(0))) {
-      CGAL_error_msg( "input error: invalid exponent in polynomial");
-    };
-    internal::swallow(is, ',');
-    is >> CGAL::iformat(p.coeff(i));
-    internal::swallow(is, ')');
-    do c = is.get(); while (isspace(c));
-  } while (c != ']');
-
-  p.reduce();
-  p.simplify_coefficients();
-  return p;
-}
-
-template <class COEFF>
-struct Needs_parens_as_product<Polynomial<COEFF> >{
-  typedef Polynomial<COEFF> Poly;
-  bool operator()(const Poly& x){ return (x.degree() > 0); }
-};
-
-
-
-} //namespace CGAL
-
-#undef CGAL_icoeff
-#undef CGAL_int
-
-#endif // CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/CORE_polynomial.h b/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/CORE_polynomial.h
deleted file mode 100644
index 42026e5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/CORE_polynomial.h
+++ /dev/null
@@ -1,278 +0,0 @@
-// Copyright (c) 2005,2006  Stanford University (USA).
-// 
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$ $Date$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_POLYNOMIAL_POLYNOMIAL_POLYCORE_KERNEL_H
-#define CGAL_POLYNOMIAL_POLYNOMIAL_POLYCORE_KERNEL_H
-#include <CGAL/Polynomial/basic.h>
-
-#include <CGAL/CORE_Expr.h>
-#include <CGAL/CORE/poly/Poly.h>
-#include <CGAL/CORE_BigFloat.h>
-#include <CGAL/CORE_Expr.h>
-#include <CGAL/CORE_BigRat.h>
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-
-struct CORE_polynomial {
-  typedef CORE::Polynomial<CORE::BigRat> P;
-  typedef CORE::BigRat NT;
-
-  template <class It>
-  CORE_polynomial(It b, It e): p_(std::vector<NT> (b,e)) {
-    /*for (int i=0; i<= degree(); ++i){
-      CGAL_precondition(P::getCoeffi(i).err()==0);
-      }*/
-  }
-  CORE_polynomial(){
-  }
-  CORE_polynomial(NT n): p_(0, &n){
-  }
-  CORE_polynomial(int d): p_(d){}
-  CORE_polynomial(const P&p): p_(p){
-    /*for (int i=0; i<= degree(); ++i){
-      CGAL_precondition(p_.getCoeffi(i).err()==0);
-      }*/
-  }
-
-  NT operator[](unsigned int i) const {
-    return p_.getCoeffi(i);
-  }
-
-  /*NT &operator[](unsigned int i) {
-    return p_.getCoeffi(i);
-    }*/
-
-  NT operator()(const NT &nt) const {
-    return p_.eval(nt);
-  }
-
-  bool operator==(const CORE_polynomial&o ) const {
-    if (p_.getTrueDegree() != o.p_.getTrueDegree()) {
-      return false;
-    } else {
-      for (int i=0; i<= p_.getTrueDegree(); ++i) {
-	if (operator[](i) != o[i]) return false;
-      }
-    }
-    return true;
-  }
-  
-  void contract()  {
-    p_.contract();
-  }
-
-  bool operator!=(const CORE_polynomial&o ) const {
-    return !operator==(o);
-  }
-
-  CORE_polynomial operator/(const NT &nt) const {
-    P ret(p_.getTrueDegree());
-    for (int i=0; i<= degree(); ++i){
-      ret.setCoeff(i, operator[](i)/nt);
-      //CGAL_assertion(rr);
-    }
-    return CORE_polynomial(ret);
-  }
-
-  CORE_polynomial operator-() const {
-    P ret(p_.getTrueDegree());
-    for (int i=0; i<= degree(); ++i){
-      ret.setCoeff(i, -operator[](i));
-      //CGAL_assertion(setr);
-    }
-    return CORE_polynomial(ret);
-  }
-
-  CORE_polynomial operator-(const CORE_polynomial &o) const {
-    CORE_polynomial r(core_polynomial());
-    r.p_-=o.core_polynomial();
-    return r;
-  }
-
-
-  CORE_polynomial operator+(const CORE_polynomial &o) const {
-    CORE_polynomial r(core_polynomial());
-    r.p_+=o.core_polynomial();
-    return r;
-  }
-
-  CORE_polynomial operator*(const CORE_polynomial &o) const {
-    CORE_polynomial r(core_polynomial());
-    r.p_*=o.core_polynomial();
-    return r;
-  }
-
-  CORE::Expr operator()(const CORE::Expr &nt) const {
-    return p_.eval(nt);
-  }
-
-  int degree() const {
-    return p_.getTrueDegree();
-  }
-
-  const P &core_polynomial() const {
-    return p_;
-  }
-
-  //! write it in maple format
-  template <class C, class T>
-  void write(std::basic_ostream<C,T> &out) const
-  {
-    std::basic_ostringstream<C,T> s;
-    s.flags(out.flags());
-    s.imbue(out.getloc());
-    s.precision(12);
-    if (degree()<0) {
-      s << "0";
-    }
-    else {
-      for (int i=0; i<= degree(); ++i) {
-	if (i==0) {
-	  if (p_.getCoeffi(i) != 0) s << p_.getCoeffi(i);
-	}
-	else {
-	  if ( p_.getCoeffi(i) != 0 ) {
-	    if (p_.getCoeffi(i) >0) s << "+";
-	    s << p_.getCoeffi(i) << "*t";
-	    if (i != 1) {
-	      s << "^" << i;
-	    }
-	  }
-	}
-      }
-    }
-
-    out << s.str();
-  }
-
-
- //! Read very stylized input
-  template <class charT, class Traits>
-  void read(std::basic_istream<charT, Traits> &in) {
-    std::vector<NT> coefs;
-    bool pos=(in.peek()!='-');
-    if (in.peek() == '+' || in.peek() == '-') {
-      char c;
-      in >> c;
-    }
-    char v='\0';
-    while (true) {
-      char vc, t;
-      NT coef;
-      // eat
-      in >> coef;
-      //coef.makeExact();
-      if (!in.good()) return;
-      unsigned int pow;
-      char p= in.peek();
-      if (in.peek() =='*') {
-	in >> t >> vc;
-	if (t != '*') {
-	  in.setstate(std::ios_base::failbit);
-	  return;
-	  //return in;
-	}
-	if ( !(v=='\0' || v== vc)) {
-	  in.setstate(std::ios_base::failbit);
-	  return;
-	  //return in;
-	}
-	v=vc;
-	p=in.peek();
-	if (in.peek() =='^') {
-	  char c;
-	  in  >> c >> pow;
-	}
-	else {
-	  pow=1;
-	}
-      }
-      else {
-	pow=0;
-      }
-
-      if (coefs.size() <=pow) {
-	coefs.resize(pow+1);
-      }
-
-      if (!pos) coef=-coef;
-      coefs[pow]=coef;
-
-      char n= in.peek();
-      if (n=='+' || n=='-') {
-	pos= (n!='-');
-	char e;
-	in >> e;
-      } else {
-	/*bool f= in.fail();
-	  bool g= in.good();
-	  bool e= in.eof();
-	  bool b= in.bad();*/
-	// This is necessary since peek could have failed if we hit the end of the buffer
-	// it would better to do without peek, but that is too messy
-	in.clear();
-	//std::cout << f << g << e << b<<std::endl;
-	break;
-      }
-    }
-    
-    p_.operator=(P(coefs));
-  }
-
-  bool is_constant() const {
-    return degree() < 1;
-  }
-
-  typedef const NT* iterator;
-  iterator begin() const {
-    return p_.coeff;
-  }
-  iterator end() const {
-    return p_.coeff+p_.degree+1;
-  }
-
-
-protected:
-  P p_;
-};
-
-template < class C, class Tr>
-inline std::ostream &operator<<(std::basic_ostream<C, Tr> &out,
-				const CORE_polynomial &poly)
-{
-  poly.write(out);
-  return out;
-}
-
-template <class C, class Tr>
-inline std::istream &operator>>(std::basic_istream<C, Tr> &in,
-				CORE_polynomial &poly)
-{
-  poly.read(in);
-  return in;
-}
-
-CORE_polynomial operator*(const CORE_polynomial::NT &a,
-			  const CORE_polynomial &p){
-  //CORE_polynomial::NT ac(a);
-  return CORE_polynomial(CORE_polynomial::P(0, &a)*p.core_polynomial());
-}
-
-} } } //namespace CGAL::POLYNOMIAL::internal
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers.h b/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers.h
deleted file mode 100644
index 6c805fd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H
-#define CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H
-#include <CGAL/Polynomial/basic.h>
-#include <vector>
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-
-// JAMA
-CGAL_EXPORT
-void jama_polynomial_compute_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-CGAL_EXPORT
-void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-// GSL
-CGAL_EXPORT
-void gsl_polynomial_compute_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-CGAL_EXPORT
-void gsl_polynomial_compute_cleaned_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-// Turkowski
-CGAL_EXPORT
-void Turkowski_polynomial_compute_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-CGAL_EXPORT
-void Turkowski_polynomial_compute_cleaned_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots);
-
-/*struct GSL_numeric_solver {
-  void operator()(const double *begin, const double *end,
-          double lb, double ub,
-          std::vector<double> &roots) const {
-    gsl_polynomial_compute_roots(begin, end, lb, ub, roots);
-  }
-};
-
-struct GSL_cleaned_numeric_solver {
-  void operator()(const double *begin, const double *end,
-          double lb, double ub,
-std::vector<double> &roots) const {
-gsl_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
-}
-};*/
-
-struct JAMA_numeric_solver
-{
-    void operator()(const double *begin, const double *end,
-        double lb, double ub,
-        std::vector<double> &roots) const
-    {
-        jama_polynomial_compute_roots(begin, end, lb, ub, roots);
-    }
-};
-
-struct JAMA_cleaned_numeric_solver
-{
-    void operator()(const double *begin, const double *end,
-        double lb, double ub,
-        std::vector<double> &roots) const
-    {
-        jama_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
-    }
-};
-
-struct Turkowski_numeric_solver
-{
-    void operator()(const double *begin, const double *end,
-        double lb, double ub,
-        std::vector<double> &roots) const
-    {
-        Turkowski_polynomial_compute_roots(begin, end, lb, ub, roots);
-    }
-};
-
-struct Turkowski_cleaned_numeric_solver
-{
-    void operator()(const double *begin, const double *end,
-        double lb, double ub,
-        std::vector<double> &roots) const
-    {
-        Turkowski_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
-    }
-};
-
-} } } //namespace CGAL::POLYNOMIAL::internal
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers_support.h b/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers_support.h
deleted file mode 100644
index b5e4e03..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/numeric_solvers_support.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_SUPPORT_H
-#define CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_SUPPORT_H
-#include <CGAL/Polynomial/basic.h>
-#include <vector>
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-
-template <class NT>
-inline bool root_is_good(NT r, NT c, NT lb, NT ub, NT tol=.0000005)
-{
-  if (std::abs(c) < tol && r > lb && r < ub) {
-        return true;
-    } else return false;
-}
-
-
-void compute_quadratic_roots(const double *begin, const double *end,
-			     double lb, double ub,
-			     std::vector<double> &roots);
-
-void compute_quadratic_cleaned_roots(const double *begin, const double *end,
-				     double lb, double ub, 
-				     std::vector<double> &roots);
-
-void compute_linear_roots(const double *begin, const double *end,
-			  double lb, double ub,
-			  std::vector<double> &roots);
-
-void compute_linear_cleaned_roots(const double *begin, const double *end,
-				  double lb, double ub, 
-				  std::vector<double> &roots);
-
-
-
-void filter_solver_roots(const double *begin, const double *end,
-			 double lb, double ub, double last,
-			 std::vector<double> &roots);
-
-} } } //namespace CGAL::POLYNOMIAL::internal
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d.h b/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d.h
deleted file mode 100644
index cd5c4aa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d.h
+++ /dev/null
@@ -1,932 +0,0 @@
-// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>
-
-#ifndef CGAL_POLYTOPE_DISTANCE_D_H
-#define CGAL_POLYTOPE_DISTANCE_D_H
-
-// includes
-// --------
-#include <CGAL/Optimisation/basic.h>
-#include <CGAL/function_objects.h>
-
-#include <CGAL/QP_options.h>
-#include <CGAL/QP_solver/QP_solver.h>
-#include <CGAL/QP_models.h>
-#include <CGAL/QP_solver/functors.h>
-#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
-#include <CGAL/QP_solver/QP_full_exact_pricing.h>
-
-namespace CGAL {
-
-// To determine the polytope distance, we set up the following QP:
-// 
-// We let v-w be nonnegative vectors such that
-// v-w = p-q, where p and q are the points that realize the
-// optimal distance. That way, we obtain a nonnegative QP
-// 
-//
-//min (v-w)^T(w-v)
-//     v-w - \sum x_i p_i + \sum y_j q_j    = 0
-//           \sum x_i                       = 1
-//                           \sum y_j       = 1
-//     v, w, x, y >= 0
-
-namespace PD_detail {
-  // The functors necessary to realize access to A
-  // 
-  // A has the form
-  //    I  -I    -P    Q
-  //    0   0     1    0
-  //    0   0     0    1
-  // where  I and -I are blocks of size d*d, and the 0's and 1's are
-  // rows vectors of 0's and 1's 
-  //
-  // we have one functor for a fixed column, and one functor for the
-  // whole matrix
-
-  // functor for a fixed column of A
-  template <class NT, class Iterator>
-  class A_column : public std::unary_function <int, NT>
-  {
-  public:
-    typedef NT result_type;
-    A_column()
-    {}
-  
-    A_column (int j, int d, bool in_p, Iterator it)
-      : j_ (j), d_ (d), in_p_ (in_p), it_ (it), nt_0_ (0), nt_1_ (1)
-    {}
-
-    result_type operator() (int i) const
-    {
-      if (j_ < d_) {
-	// column for v
-	return (i == j_ ? nt_1_ : nt_0_);
-      }
-      if (j_ < 2*d_) {
-	// column for w
-	return (i == j_-d_ ? -nt_1_ : nt_0_);
-      }
-      // point column
-      if (in_p_) {
-	// column for P
-	if (i < d_) return -(*(it_ + i));
-	if (i == d_) return *(it_ + d_); // homogenizing coordinate
-	return nt_0_;
-      } else {
-	// column for Q
-	if (i < d_) return (*(it_ + i));
-	if (i == d_+1) return *(it_ + d_); // homogenizing coordinate
-	return nt_0_;
-      }
-      // never get here
-    }
-    
-  private:
-    int j_;                  // column number
-    int d_;                  // dimension
-    bool in_p_;              // point in P ?
-    Iterator it_;            // the iterator through the column's point
-    NT nt_0_;
-    NT nt_1_; 
-  };
-  
-  // functor for matrix A
-  template <class NT, class Access_coordinate_begin_d,
-	    class Point_iterator >
-  class A_matrix : public std::unary_function
-  <int, boost::transform_iterator <A_column
-    <NT, typename Access_coordinate_begin_d::Coordinate_iterator>, 
-				   boost::counting_iterator<int> > >
-  { 
-    typedef PD_detail::A_column
-    <NT, typename Access_coordinate_begin_d::Coordinate_iterator> A_column;
-  public:
-    typedef  boost::transform_iterator
-    <A_column, boost::counting_iterator<int> > result_type;
-    
-    A_matrix ()
-    {}
-
-    A_matrix (int d, 
-	      Access_coordinate_begin_d da_coord,
-	      Point_iterator P, 
-	      int r, 
-	      Point_iterator Q) 
-      : d_ (d), da_coord_ (da_coord), P_ (P), r_ (r), Q_ (Q)
-    {}
-
-    result_type operator () (int j) const
-    { 
-      if (j < 2*d_) {
-	// column of v or w
-	return result_type
-	  (0, A_column (j, d_, false  /*dummy*/, 
-			da_coord_ (*P_) /*dummy*/));
-      }
-      if (j < 2*d_+r_) {
-	// column of P
-	return result_type
-	  (0, A_column (j , d_, true, da_coord_ (*(P_+(j-2*d_)))));
-      }
-      // column of Q
-      return result_type
-	(0, A_column (j, d_, false, da_coord_ (*(Q_+(j-2*d_-r_))))); 
-    }
-
-  private:
-    int d_;                  // dimension
-    Access_coordinate_begin_d da_coord_; // data accessor
-    Point_iterator P_;       // point set P
-    int r_;                  // size of point set P
-    Point_iterator Q_;       // point set Q
-  };
-
-  // The functor necessary to realize access to b
-  // b has the form
-  // 0
-  // 0
-  // 1  (row d)
-  // 1  (row d+1)
-
-  template <class NT>
-  class B_vector : public std::unary_function<int, NT>
-  {
-  public:
-    typedef NT result_type;
-    B_vector()
-    {}
-
-    B_vector (int d)
-      : d_ (d), nt_0_ (0), nt_1_ (1)
-    {}
-
-    result_type operator() (int i) const
-    {
-      return ( (i == d_ || i == d_+1) ? nt_1_ : nt_0_);
-    }
-
-  private:
-    int d_;
-    NT nt_0_;
-    NT nt_1_;
-  };
-
-
-  // The functors necessary to realize access to D
-  // 
-  // D has the form
-  //   I  -I    0
-  //  -I   I    0
-  //   0   0    0
-  // where all I and -I are blocks of size d*d
-  //
-  // we have one functor for a fixed row, and one functor for the
-  // whole matrix
-
-  // functor for a fixed row of D; note that we have to return 2D in
-  // order to please the QP_solver
-  template <class NT> 
-  class D_row : public std::unary_function <int, NT> 
-  {
-  public:
-    typedef NT result_type;
-    D_row () 
-    {}
-    D_row (int i, int d) 
-      : i_ (i), d_ (d), nt_0_ (0), nt_2_ (2)
-    {}
-    
-    result_type operator () (int j) const
-    {
-      if (j < d_) {
-	//  I ( 1 iff i = j)
-	// -I (-1 iff i = j + d)
-	//  0
-	if (i_ == j) return nt_2_;
-	if (i_ == j + d_) return -nt_2_;
-	return nt_0_;
-      }
-      if (j < 2*d_) {
-	// -I (-1 iff i = j - d)
-	//  I ( 1 iff i = j)
-	//  0
-	if (i_ == j - d_) return -nt_2_;
-	if (i_ == j) return nt_2_;
-	return nt_0_;
-      }
-      // 0
-      // 0
-      // 0
-      return nt_0_;
-    }
-  private:
-    int i_; // row number
-    int d_; // dimension
-    NT nt_0_;
-    NT nt_2_;
-  };
-
-  // functor for matrix D
-  template <class NT>
-  class D_matrix : public std::unary_function
-  <int, boost::transform_iterator<D_row<NT>,
-				  boost::counting_iterator<int> > >
-  { 
-  public:
-    typedef boost::transform_iterator<D_row<NT>,
-	    boost::counting_iterator<int> > result_type; 
-    D_matrix ()
-    {}
-    D_matrix (int d)
-      :  d_ (d)
-    {}
-
-    result_type operator()(int i) const 
-    {
-      return result_type (0, D_row<NT>(i, d_));
-    }
-
-  private:
-    int d_; // dimension
-  };
-}
-
-// Class interfaces
-// ================
-template < class Traits_ >
-class Polytope_distance_d {
-public:
-  // self
-  typedef  Traits_                    Traits;
-  typedef  Polytope_distance_d<Traits>
-  Self;
-
-  // types from the traits class
-  typedef  typename Traits::Point_d   Point;
-
-  typedef  typename Traits::Rep_tag   Rep_tag;
-
-  typedef  typename Traits::RT        RT;
-  typedef  typename Traits::FT        FT;
-
-  typedef  typename Traits::Access_dimension_d
-  Access_dimension_d;
-  typedef  typename Traits::Access_coordinates_begin_d
-  Access_coordinates_begin_d;
-
-  typedef  typename Traits::Construct_point_d
-  Construct_point_d;
-
-  typedef  typename Traits::ET        ET;
-  typedef  typename Traits::NT        NT; 
-
-private:
-  // private types
-  typedef  std::vector<Point>         Point_vector;
-  typedef  std::vector<ET>            ET_vector;
-    
-  typedef  QP_access_by_index
-  <typename std::vector<Point>::const_iterator, int> Point_by_index;
-    
-  typedef  std::vector<NT>            NT_vector;
-  typedef  std::vector<NT_vector>     NT_matrix;
-  
-  typedef  std::vector<int>           Index_vector;
-public:    
-  // public types
-  typedef  typename Point_vector::const_iterator
-  Point_iterator;
-    
-  typedef typename Index_vector::const_iterator IVCI;
-  typedef CGAL::Join_input_iterator_1< IVCI, Point_by_index >
-  Support_point_iterator;
-
-  typedef typename Index_vector::const_iterator
-  Support_point_index_iterator;
-    
-  typedef  typename ET_vector::const_iterator
-  Coordinate_iterator;
-
-private:
-  
-  // QP solver iterator types
-  typedef PD_detail::A_matrix <NT, Access_coordinates_begin_d,
-			       Point_iterator> A_matrix;
-  typedef boost::transform_iterator<
-    A_matrix, boost::counting_iterator<int> > A_iterator;
-
-  typedef PD_detail::B_vector <NT> B_vector;
-  typedef boost::transform_iterator<
-    B_vector, boost::counting_iterator<int> > B_iterator;
-
-  typedef CGAL::Const_oneset_iterator<CGAL::Comparison_result> R_iterator;  
-  typedef CGAL::Const_oneset_iterator<NT> C_iterator; 
-
-  typedef PD_detail::D_matrix <NT> D_matrix;
-  typedef boost::transform_iterator <
-    D_matrix, boost::counting_iterator<int> > D_iterator;
-
-  // Program type
-  typedef CGAL::Nonnegative_quadratic_program_from_iterators
-      <A_iterator, B_iterator, R_iterator, D_iterator, C_iterator> QP;
-
-  // Tags
-  typedef QP_solver_impl::QP_tags <Tag_false, Tag_true> QP_tags;
-
-  // Solver types
-  typedef  CGAL::QP_solver <QP, ET, QP_tags > Solver;
-
-  typedef  typename Solver::Pricing_strategy Pricing_strategy;
-
-public:    
-
-  // creation
-  Polytope_distance_d( const Traits&  traits  = Traits())
-    : nt_0(0), nt_1(1),
-      tco( traits), da_coord (tco.access_coordinates_begin_d_object()),
-      d( -1), solver(0) 
-  {}
-    
-  template < class InputIterator1, class InputIterator2 >
-  Polytope_distance_d( InputIterator1 p_first,
-		       InputIterator1 p_last,
-		       InputIterator2 q_first,
-		       InputIterator2 q_last,
-		       const Traits&  traits = Traits())
-    : nt_0(0), nt_1(1), 
-      tco( traits), da_coord (tco.access_coordinates_begin_d_object()),
-      solver(0)
-  {
-    set( p_first, p_last, q_first, q_last);
-  }
-
-  ~Polytope_distance_d() {    
-    if (solver)
-      delete solver;
-  }
-
-  // access to point sets
-  int  ambient_dimension( ) const { return d; }
-    
-  int  number_of_points( ) const { return static_cast<int>(p_points.size()+q_points.size());}
-    
-  int  number_of_points_p( ) const { return static_cast<int>(p_points.size()); }
-  int  number_of_points_q( ) const { return static_cast<int>(q_points.size()); }
-    
-  Point_iterator  points_p_begin( ) const { return p_points.begin(); }
-  Point_iterator  points_p_end  ( ) const { return p_points.end  (); }
-    
-  Point_iterator  points_q_begin( ) const { return q_points.begin(); }
-  Point_iterator  points_q_end  ( ) const { return q_points.end  (); }
-    
-  // access to support points
-  int
-  number_of_support_points( ) const
-  { return is_finite() ? 
-      static_cast<int>(p_support_indices.size()+q_support_indices.size()) : 0; }
-    
-  int  number_of_support_points_p() const { return static_cast<int>(p_support_indices.size());}
-  int  number_of_support_points_q() const { return static_cast<int>(q_support_indices.size());}
-    
-  Support_point_iterator
-  support_points_p_begin() const
-  { return Support_point_iterator(
-				  p_support_indices.begin(),
-				  Point_by_index( p_points.begin())); }
-    
-  Support_point_iterator
-  support_points_p_end() const
-  { return Support_point_iterator(
-				  is_finite() ? p_support_indices.end()
-				  : p_support_indices.begin(),
-				  Point_by_index( p_points.begin())); }
-    
-  Support_point_iterator
-  support_points_q_begin() const
-  { return Support_point_iterator(
-				  q_support_indices.begin(),
-				  Point_by_index( q_points.begin())); }
-    
-  Support_point_iterator
-  support_points_q_end() const
-  { return Support_point_iterator(
-				  is_finite() ? q_support_indices.end()
-				  : q_support_indices.begin(),
-				  Point_by_index( q_points.begin())); }
-
-  Support_point_index_iterator
-  support_points_p_indices_begin() const
-  { return p_support_indices.begin(); }
-    
-  Support_point_index_iterator
-  support_points_p_indices_end() const
-  { return p_support_indices.end(); }
-
-  Support_point_index_iterator
-  support_points_q_indices_begin() const
-  { return q_support_indices.begin(); }
-
-  Support_point_index_iterator
-  support_points_q_indices_end() const
-  { return q_support_indices.end(); }
-    
-  // access to realizing points (rational representation)
-  Coordinate_iterator
-  realizing_point_p_coordinates_begin( ) const { return p_coords.begin(); }
-    
-  Coordinate_iterator
-  realizing_point_p_coordinates_end  ( ) const { return p_coords.end  (); }
-    
-  Coordinate_iterator
-  realizing_point_q_coordinates_begin( ) const { return q_coords.begin(); }
-    
-  Coordinate_iterator
-  realizing_point_q_coordinates_end  ( ) const { return q_coords.end  (); }
-    
-  // access to squared distance (rational representation)
-  ET  squared_distance_numerator  ( ) const
-  { return solver->solution_numerator(); }
-    
-  ET  squared_distance_denominator( ) const
-  { return solver->solution_denominator(); }
-    
-  // access to realizing points and squared distance
-  // NOTE: an implicit conversion from ET to RT must be available!
-  Point
-  realizing_point_p( ) const
-  { CGAL_optimisation_precondition( is_finite());
-  return tco.construct_point_d_object()
-    ( ambient_dimension(),
-      realizing_point_p_coordinates_begin(),
-      realizing_point_p_coordinates_end  ()); }
-    
-  Point
-  realizing_point_q( ) const
-  { CGAL_optimisation_precondition( is_finite());
-  return tco.construct_point_d_object()
-    ( ambient_dimension(),
-      realizing_point_q_coordinates_begin(),
-      realizing_point_q_coordinates_end  ()); }
-    
-  FT
-  squared_distance( ) const
-  { 
-    return FT( squared_distance_numerator  ()) /
-      FT( squared_distance_denominator()); }
-    
-  bool  is_finite( ) const
-  { return ( number_of_points_p() > 0) && ( number_of_points_q() > 0); }
-    
-  bool  is_zero( ) const
-  { return CGAL_NTS is_zero( squared_distance_numerator()); }
-    
-  bool  is_degenerate( ) const { return ( ! is_finite()); }
-    
-  // modifiers
-  template < class InputIterator1, class InputIterator2 >
-  void
-  set( InputIterator1 p_first, InputIterator1 p_last,
-       InputIterator2 q_first, InputIterator2 q_last)
-  { 
-    p_points.clear();
-    q_points.clear();
-    std::copy( p_first, p_last, std::back_inserter( p_points));
-    std::copy( q_first, q_last, std::back_inserter( q_points));
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( p_points.begin(), p_points.end())
-       && check_dimension( q_points.begin(), q_points.end()),
-       "Not all points have the same dimension.");
-
-    compute_distance(); 
-  }
-    
-  template < class InputIterator >
-  void
-  set_p( InputIterator p_first, InputIterator p_last)
-  { 
-    p_points.clear();
-    std::copy( p_first, p_last, std::back_inserter( p_points));
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( p_points.begin(), p_points.end()),
-       "Not all points have the same dimension.");
-
-    compute_distance(); 
-  }
-    
-  template < class InputIterator >
-  void
-  set_q( InputIterator q_first, InputIterator q_last)
-  {
-    q_points.clear();
-    std::copy( q_first, q_last, std::back_inserter( q_points));
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( q_points.begin(), q_points.end()),
-       "Not all points have the same dimension.");
-  
-    compute_distance(); 
-  }
-    
-  void
-  insert_p( const Point& p)
-  { 
-    CGAL_optimisation_precondition
-      ( ( ! is_finite()) ||
-	( tco.access_dimension_d_object()( p) == d));
-    p_points.push_back( p);
-    set_dimension(); // it might no longer be -1 
-    compute_distance(); 
-  }
-    
-  void
-  insert_q( const Point& q)
-  { 
-    CGAL_optimisation_precondition
-      ( ( ! is_finite()) ||
-	( tco.access_dimension_d_object()( q) == d));
-    q_points.push_back( q); 
-    set_dimension(); // it might no longer be -1 
-    compute_distance(); 
-  }
-    
-  template < class InputIterator1, class InputIterator2 >
-  void
-  insert( InputIterator1 p_first, InputIterator1 p_last,
-	  InputIterator2 q_first, InputIterator2 q_last)
-  { 
-    CGAL_optimisation_precondition_code(int old_r = static_cast<int>(p_points.size()));
-    CGAL_optimisation_precondition_code(int old_s = static_cast<int>(q_points.size()));
-    p_points.insert( p_points.end(), p_first, p_last);
-    q_points.insert( q_points.end(), q_first, q_last);
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( p_points.begin()+old_r, p_points.end())
-       && check_dimension( q_points.begin()+old_s, q_points.end()),
-       "Not all points have the same dimension.");
-    compute_distance(); 
-  }
-    
-  template < class InputIterator >
-  void
-  insert_p( InputIterator p_first, InputIterator p_last)
-  { 
-    CGAL_optimisation_precondition_code(int old_r = static_cast<int>(p_points.size()));
-    p_points.insert( p_points.end(), p_first, p_last);
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( p_points.begin()+old_r, p_points.end()),
-       "Not all points have the same dimension.");
-    compute_distance(); 
-  }
-    
-  template < class InputIterator >
-  void
-  insert_q( InputIterator q_first, InputIterator q_last)
-  { 
-    CGAL_optimisation_precondition_code( int old_s = static_cast<int>(q_points.size()));
-    q_points.insert( q_points.end(), q_first, q_last);
-    set_dimension();
-    CGAL_optimisation_precondition_msg
-      (check_dimension( q_points.begin()+old_s, q_points.end()),
-       "Not all points have the same dimension.");
-    compute_distance(); 
-  }
-    
-  void
-  clear( )
-  { 
-    p_points.clear();
-    q_points.clear();
-    compute_distance(); 
-  }
-    
-  // validity check
-  bool  is_valid( bool verbose = false, int level = 0) const;
-    
-  // traits class access
-  const Traits&  traits( ) const { return tco; }
-    
-
-private:
-  NT nt_0;
-  NT nt_1;
-
-  Traits                     tco;        // traits class object
-  Access_coordinates_begin_d da_coord;   // data accessor object
-    
-  Point_vector             p_points;  // points of P
-  Point_vector             q_points;  // points of Q
-  int                      d;         // dimension of input points
-    
-  ET_vector                p_coords;          // realizing point of P
-  ET_vector                q_coords;          // realizing point of Q
-    
-  Solver                   *solver;    // quadratic programming solver
-    
-  Index_vector             p_support_indices;
-  Index_vector             q_support_indices;
-    
-private:    
-  // set dimension of input points
-  void
-  set_dimension( )
-  { 
-    d = ( p_points.size() > 0 ?
-	  tco.access_dimension_d_object()( p_points[ 0]) :
-	  q_points.size() > 0 ?
-	  tco.access_dimension_d_object()( q_points[ 0]) :
-	  -1); 
-  }
-    
-  // check dimension of input points
-  template < class InputIterator >
-  bool
-  check_dimension( InputIterator first, InputIterator last)
-  { return ( std::find_if
-	     ( first, last,
-	       CGAL::compose1_1
-	       ( std::bind2nd(std::not_equal_to<int>(), d),
-		 tco.access_dimension_d_object()))
-	     == last); }
-    
-  // compute (squared) distance
-  void
-  compute_distance( )
-  {
-    // clear support points
-    p_support_indices.clear();
-    q_support_indices.clear();
-    if ( ( p_points.size() == 0) || ( q_points.size() == 0)) return;
-        
-    // construct program
-    int n = 2 * d + static_cast<int>(p_points.size() + q_points.size());
-    int m = d + 2;
-    CGAL_optimisation_precondition (p_points.size() > 0);
-    QP qp (n, m, 
-	   A_iterator 
-	   (boost::counting_iterator<int>(0), 
-	    A_matrix (d, da_coord, p_points.begin(), static_cast<int>(p_points.size()), 
-			 q_points.begin())),
-	   B_iterator (boost::counting_iterator<int>(0), B_vector (d)), 
-	   R_iterator (CGAL::EQUAL), 
-	   D_iterator (boost::counting_iterator<int>(0), D_matrix (d)),
-	   C_iterator (nt_0));
-
-    delete solver;
-    Quadratic_program_options options;
-    options.set_pricing_strategy(pricing_strategy(NT()));
-    solver = new Solver(qp, options);
-    CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL);
-    // compute support and realizing points
-    ET  et_0 = 0;
-    int r = static_cast<int>(p_points.size());
-    p_coords.resize( ambient_dimension()+1);
-    q_coords.resize( ambient_dimension()+1);
-    std::fill( p_coords.begin(), p_coords.end(), et_0);
-    std::fill( q_coords.begin(), q_coords.end(), et_0);
-    for (int i = 0; i < solver->number_of_basic_original_variables(); ++i) {
-      ET  value = solver->basic_original_variables_numerator_begin()[ i];
-      int index = solver->basic_original_variable_indices_begin()[ i];
-      if (index < 2*d) continue; // v or w variable
-      if (index < 2*d + r) {
-	// a point of p
-	for ( int j = 0; j < d; ++j) {
-	  p_coords[ j]
-	    += value * ET(da_coord (p_points[ index-2*d ])[ j]);
-	}
-	p_support_indices.push_back( index-2*d);
-      } else {
-	// a point of q
-	for ( int j = 0; j < d; ++j) {
-	  q_coords[ j]
-	    += value * ET(da_coord (q_points[ index-2*d-r])[ j]);
-	}
-	q_support_indices.push_back( index-2*d-r);
-      }
-    }
-    p_coords[ d] = q_coords[ d] = solver->variables_common_denominator();
-  }
-    
-  template < class NT >
-  Quadratic_program_pricing_strategy pricing_strategy( NT) {
-    return QP_PARTIAL_FILTERED_DANTZIG;
-  }
-  
-  Quadratic_program_pricing_strategy pricing_strategy( ET) {
-    return QP_PARTIAL_DANTZIG;
-  }
-    
-};
-
-// Function declarations
-// =====================
-// output operator
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os,
-              const Polytope_distance_d<Traits_>& poly_dist);
-
-
-// ============================================================================
-
-// Class implementation
-// ====================
-
-// validity check
-template < class Traits_ >
-bool
-Polytope_distance_d<Traits_>::
-is_valid( bool verbose, int level) const
-{
-  using namespace std;
-
-  CGAL::Verbose_ostream verr( verbose);
-  verr << "CGAL::Polytope_distance_d<Traits>::" << endl;
-  verr << "is_valid( true, " << level << "):" << endl;
-  verr << "  |P+Q| = " << number_of_points_p()
-       <<          '+' << number_of_points_q()
-       <<   ", |S| = " << number_of_support_points_p()
-       <<          '+' << number_of_support_points_q() << endl;
-
-  if ( is_finite()) {
-
-    // compute normal vector
-    ET_vector  normal( d), diff( d);
-    ET  et_0 = 0, den = p_coords[d];
-    CGAL_optimisation_assertion (den > et_0);
-    CGAL_optimisation_assertion (den == q_coords[d]);
-    int i, j;
-    for ( j = 0; j < d; ++j) normal[ j] = p_coords[ j] - q_coords[ j];
-
-    // check correctness of computed squared distance
-    verr << "  checking squared_distance..." << flush;
-    ET sqr_dist_num (0);
-    for ( j = 0; j < d; ++j)
-      sqr_dist_num += normal[ j] * normal[ j];
-    ET sqr_dist_den = 
-      p_coords[ d] * p_coords[ d];
-    if (sqr_dist_num * squared_distance_denominator() !=
-	sqr_dist_den * squared_distance_numerator())
-      return CGAL::_optimisation_is_valid_fail
-	( verr, "realizing points don't have correct squared distance");
-
-
-    // check P
-    // -------
-    verr << "  checking P..." << flush;
-        
-    // check point set
-    for ( i = 0; i < number_of_points_p(); ++i) {
-      for ( j = 0; j < d; ++j) {
-	// compute (a positive multiple of) p^* - p_i
-	diff[ j] = 
-	  ET(da_coord(p_points[ i])[d]) * p_coords[ j] - 
-	  den * ET(da_coord( p_points[ i])[ j]);
-      }
-      if ( std::inner_product( diff.begin(), diff.end(),
-			       normal.begin(), et_0) > et_0)
-	return CGAL::_optimisation_is_valid_fail
-	  ( verr, "polytope P is not separated by its hyperplane");
-    }
-        
-    verr << "passed." << endl;
-
-    // check Q
-    // -------
-    verr << "  checking Q..." << flush;
-        
-    // check point set
-    for ( i = 0; i < number_of_points_q(); ++i) {
-      for ( j = 0; j < d; ++j) {
-	// compute (a positive multiple of) q^* - q_i
-	diff[ j] = 
-	  ET(da_coord(q_points[ i])[d]) * q_coords[ j] - 
-	  den * ET(da_coord( q_points[ i])[ j]);
-      }
-      if ( std::inner_product( diff.begin(), diff.end(),
-			       normal.begin(), et_0) < et_0)
-	return CGAL::_optimisation_is_valid_fail
-	  ( verr, "polytope Q is not separated by its hyperplane");
-    }
-        
-    verr << "passed." << endl;
-  }
-
-  verr << "  object is valid!" << endl;
-  return( true);
-}
-
-// output operator
-template < class Traits_ >
-std::ostream&
-operator << ( std::ostream& os,
-              const Polytope_distance_d<Traits_>& poly_dist)
-{
-  using namespace std;
-
-  typedef  typename Polytope_distance_d<Traits_>::Point  Point;
-  typedef  ostream_iterator<Point>       Os_it;
-  typedef  typename Traits_::ET          ET;
-  typedef  ostream_iterator<ET>          Et_it;
-
-  switch ( CGAL::get_mode( os)) {
-
-  case CGAL::IO::PRETTY:
-    os << "CGAL::Polytope_distance_d( |P+Q| = "
-       << poly_dist.number_of_points_p() << '+'
-       << poly_dist.number_of_points_q() << ", |S| = "
-       << poly_dist.number_of_support_points_p() << '+'
-       << poly_dist.number_of_support_points_q() << endl;
-    os << "  P = {" << endl;
-    os << "    ";
-    copy( poly_dist.points_p_begin(), poly_dist.points_p_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  Q = {" << endl;
-    os << "    ";
-    copy( poly_dist.points_q_begin(), poly_dist.points_q_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  S_P = {" << endl;
-    os << "    ";
-    copy( poly_dist.support_points_p_begin(),
-	  poly_dist.support_points_p_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  S_Q = {" << endl;
-    os << "    ";
-    copy( poly_dist.support_points_q_begin(),
-	  poly_dist.support_points_q_end(),
-	  Os_it( os, ",\n    "));
-    os << "}" << endl;
-    os << "  p = ( ";
-    copy( poly_dist.realizing_point_p_coordinates_begin(),
-	  poly_dist.realizing_point_p_coordinates_end(),
-	  Et_it( os, " "));
-    os << ")" << endl;
-    os << "  q = ( ";
-    copy( poly_dist.realizing_point_q_coordinates_begin(),
-	  poly_dist.realizing_point_q_coordinates_end(),
-	  Et_it( os, " "));
-    os << ")" << endl;
-    os << "  squared distance = "
-       << poly_dist.squared_distance_numerator() << " / "
-       << poly_dist.squared_distance_denominator() << endl;
-    break;
-
-  case CGAL::IO::ASCII:
-    os << poly_dist.number_of_points_p() << endl;
-    copy( poly_dist.points_p_begin(),
-	  poly_dist.points_p_end(),
-	  Os_it( os, "\n"));
-    os << poly_dist.number_of_points_q() << endl;
-    copy( poly_dist.points_q_begin(),
-	  poly_dist.points_q_end(),
-	  Os_it( os, "\n"));
-    break;
-
-  case CGAL::IO::BINARY:
-    os << poly_dist.number_of_points_p() << endl;
-    copy( poly_dist.points_p_begin(),
-	  poly_dist.points_p_end(),
-	  Os_it( os));
-    os << poly_dist.number_of_points_q() << endl;
-    copy( poly_dist.points_q_begin(),
-	  poly_dist.points_q_end(),
-	  Os_it( os));
-    break;
-
-  default:
-    CGAL_optimisation_assertion_msg( false,
-				     "CGAL::get_mode( os) invalid!");
-    break; }
-
-  return( os);
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_POLYTOPE_DISTANCE_D_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse.h
deleted file mode 100644
index 9d35784..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse.h
+++ /dev/null
@@ -1,1136 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp 
-//                 Kaspar Fischer 
-                                                                               
-#ifndef CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
-#define CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
-
-#include <CGAL/QP_solver/basic.h>
-#include <CGAL/IO/Verbose_ostream.h>
-#include <vector>
-
-namespace CGAL {
-                    
-// =================
-// class declaration
-// =================
-template < class ET_, class Is_LP_ >
-class QP_basis_inverse;
-
-// ===============
-// class interface
-// ===============
-template < class ET_, class Is_LP_ >
-class QP_basis_inverse {
-  public:
-    // self
-    typedef  ET_                        ET;
-    typedef  Is_LP_                     Is_LP;
-    typedef  QP_basis_inverse<ET,Is_LP>
-                                        Self;
-
-  private:
-    
-    // private types
-    typedef std::vector<ET>             Row;
-    typedef std::vector<Row>            Matrix;
-
-  public:
-
-    /*
-     * Note: Some member functions below are suffixed with '_'.
-     * They are member templates and their declaration is "hidden",
-     * because they are also implemented in the class interface.
-     * This is a workaround for M$-VC++, which otherwise fails to
-     * instantiate them correctly.
-     */
-
-    // creation and initialization
-    // ---------------------------
-    QP_basis_inverse( CGAL::Verbose_ostream&  verbose_ostream);
-
-    // set-up
-    void  set( int n, int m, int nr_equalities);
-    
-    // init
-    template < class InputIterator >                            // phase I
-    void  init_( unsigned int art_size, InputIterator art_first);
-
-    /*
-    template < class InputIterator >                            // phase II
-    void  init_( ...);
-    */
-
-    // transition to phase II
-    template < class InputIterator >                            // QP case
-    void  transition_( InputIterator twice_D_it);
-
-    void  transition( );                                        // LP case
-
-    // access
-    // ------
-    const ET&  denominator( ) const { return d; }
-
-    const ET&  entry( unsigned int row, unsigned int column) const
-        { return entry( row, column, Is_LP()); }
-
-    // multiplication functions
-    // ------------------------
-    // matrix-vector multiplication ( y = M v )
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply( ForwardIterator v_l_it, ForwardIterator v_x_it,
-                     OutputIterator y_l_it,  OutputIterator y_x_it) const
-        { multiply( v_l_it, v_x_it, y_l_it, y_x_it, Is_LP(), Tag_true()); }
-    
-    // special matrix-vector multiplication functions for LPs
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply_l( ForwardIterator v_x_it, OutputIterator y_l_it) const
-        { CGAL_qpe_assertion( is_LP || is_phaseI);
-          multiply__l( v_x_it, y_l_it); }
-    
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply_x( ForwardIterator v_l_it, OutputIterator y_x_it) const
-        { CGAL_qpe_assertion( is_LP || is_phaseI);
-	  multiply__x( v_l_it, y_x_it); }
-    
-    // vector-matrix multiplication ( x^T = u^T M )
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply_transposed( ForwardIterator u_l_it, ForwardIterator u_x_it,
-                                OutputIterator x_l_it,  OutputIterator x_x_it)
-                                                                          const
-        { multiply( u_l_it, u_x_it, x_l_it, x_x_it); } // M_B^{-1} is symmetric
-    
-    // special vector-matrix multiplication functions for LPs
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply_transposed_l( ForwardIterator u_x_it,
-                                  OutputIterator x_l_it) const
-        { multiply_l( u_x_it, x_l_it); }        // Note: M_B^{-1} is symmetric
-    
-    template < class ForwardIterator, class OutputIterator >  inline
-    void  multiply_transposed_x( ForwardIterator u_l_it,
-                                  OutputIterator x_x_it) const
-        { multiply_x( u_l_it, x_x_it); }        // Note: M_B^{-1} is symmetric
-    
-    // vector-vector multiplication ( y = u^T v )
-    template < class InputIterator1, class InputIterator2 >  inline
-    typename std::iterator_traits<InputIterator1>::value_type
-    inner_product( InputIterator1 u_l_it, InputIterator1 u_x_it,
-		   InputIterator2 v_l_it, InputIterator2 v_x_it) const
-        { return inner_product_l( u_l_it, v_l_it)
-	       + inner_product_x( u_x_it, v_x_it); }
-    
-    template < class InputIterator1, class InputIterator2 >  inline
-    typename std::iterator_traits<InputIterator1>::value_type
-    inner_product_l( InputIterator1 u_l_it, InputIterator2 v_l_it) const
-        { return inner_product( u_l_it, v_l_it, s); }
-    
-    template < class InputIterator1, class InputIterator2 >  inline
-    typename std::iterator_traits<InputIterator1>::value_type
-    inner_product_x( InputIterator1 u_x_it, InputIterator2 v_x_it) const
-        { return inner_product( u_x_it, v_x_it, b); }
-	
-    
-    // update functions
-    // ----------------
-    // entering of original variable (update type U1)
-    template < class ForwardIterator >
-    void  enter_original_( ForwardIterator y_l_it,
-			   ForwardIterator y_x_it, const ET& z);
-    
-    // leaving of original variable (update type U2)
-    void  leave_original( );
-    
-    // entering of slack variable (update type U3)
-    void  enter_slack( );
-
-    // leaving of slack variable (update type U4)
-    template < class ForwardIterator >
-    void  leave_slack_( ForwardIterator u_x_it);
-    
-    // replacing of original by original variable (update type U5)
-    template < class ForwardIterator >
-    void  enter_original_leave_original_( ForwardIterator y, unsigned int k);
-    
-    // replacing of slack by slack variable (update type U6)
-    template < class ForwardIterator >
-    void  enter_slack_leave_slack_( ForwardIterator u, unsigned int k);
-    
-    // replacing of slack by original variable (update type U7)
-    template < class ForwardIterator1, class ForwardIterator2 >
-    void  enter_original_leave_slack_( ForwardIterator1 y, ForwardIterator2 u);
-    
-    // replacing of original by slack variable (update type U8)
-    void  enter_slack_leave_original( );
-    
-    
-    // replacing of original by original variable with precondition in QP-case
-    // for phaseII                               (update type UZ_1)
-    template < class ForwardIterator >
-    void  z_replace_original_by_original(ForwardIterator y_l_it,
-                                         ForwardIterator y_x_it,
-                                         const ET& s_delta, const ET& s_nu,
-					                     unsigned int k_i);
-
-
-    // replacing of original by slack variable with precondition in QP-case
-    // for phaseII                               (update type UZ_2)
-    void  z_replace_original_by_slack( );
-
-
-    // replacing of slack by original variable with precondition in QP-case
-    // for phaseII                               (update type UZ_3)
-    template < class ForwardIterator >
-    void  z_replace_slack_by_original(ForwardIterator y_l_it,
-                                      ForwardIterator y_x_it,
-				      ForwardIterator u_x_it, const ET& hat_kappa,
-				      const ET& hat_nu);
-
-
-    // replacing of slack by slack variable with precondition in QP-case
-    // for phaseII                               (update type UZ_4)
-    template < class ForwardIterator >
-    void  z_replace_slack_by_slack(ForwardIterator u_x_it, unsigned int k_j);
-    
-
-    // copying of reduced basis inverse row in (upper) C-half
-    template < class OutIt >
-    void  copy_row_in_C(OutIt y_l_it, OutIt y_x_it, unsigned int k);
-    
-    // copying of reduced basis inverse row in (lower) B_O-half
-    template < class OutIt >
-    void  copy_row_in_B_O(OutIt y_l_it, OutIt y_x_it, unsigned int k);
-
-
-    // swap functions
-    void  swap_variable( unsigned int j)                // ``to the end'' of R
-        { CGAL_qpe_assertion( j < b);
-	  swap_variable( j, Is_LP()); }
-    void  swap_constraint( unsigned int i)              // ``to the end'' of P
-        { CGAL_qpe_assertion( i < s);
-	  swap_constraint( i, Is_LP()); }
-
-  private:
-    
-    // constants
-    const ET                 et0, et1, et2;
-                                        
-    // data members
-    Matrix                   M;         // basis inverse, stored row-wise
-    ET                       d;         // denominator
-
-    unsigned int             l;         // minimum of `n' and `m'
-    unsigned int             s;         // size of `E \cup S_N'
-    unsigned int             b;         // size of `B_O'
-
-    bool                     is_phaseI; // flag indicating phase I
-    bool                     is_phaseII;// flag indicating phase II
-    const bool               is_LP;     // flag indicating a linear    program
-    const bool               is_QP;     // flag indicating a quadratic program
-
-    CGAL::Verbose_ostream&   vout;      // used for diagnostic output
-
-    Row                      x_l, tmp_l;  // used in the 
-    Row                      x_x, tmp_x;  // update functions
-
-    // private member functions
-    // ------------------------
-    // set-up
-    void  set( Tag_false);        // QP case
-    void  set( Tag_true );        // LP case
-
-    // init
-    template < class InIt >                                     // QP case
-    void  init_( unsigned int art_size, InIt art_first, Tag_false);
-    template < class InIt >                                     // LP case
-    void  init_( unsigned int art_size, InIt art_first, Tag_true );
-
-    // access
-    const ET&  entry( unsigned int row,
-		      unsigned int column, Tag_false) const;    // QP case
-    const ET&  entry( unsigned int row,
-		      unsigned int column, Tag_true ) const;    // LP case
-
-    // matrix-vector multiplication
-    template < class ForIt, class OutIt, class Use1stArg >      // QP case
-    void  multiply_( ForIt v_l_it, ForIt v_x_it,
-		     OutIt y_l_it, OutIt y_x_it, Tag_false, Use1stArg) const;
-    template < class ForIt, class OutIt, class  DummyArg >      // LP case
-    void  multiply_( ForIt v_l_it, ForIt v_x_it,
-		     OutIt y_l_it, OutIt y_x_it, Tag_true,   DummyArg) const;
-
-    // special matrix-vector multiplication functions for LPs
-    template < class ForIt, class OutIt >
-    void  multiply__l_( ForIt v_x_it, OutIt y_l_it) const;
-    template < class ForIt, class OutIt >
-    void  multiply__x_( ForIt v_l_it, OutIt y_x_it) const;
-
-    // in-place update
-    template < class ForIt >                                    // QP case
-    void  update_inplace_QP_( ForIt  y_l_it, ForIt  y_x_it,
-			      const ET&  d_new, const ET&  d_old);
-    template < class ForIt1, class ForIt2 >                     // LP case
-    void  update_inplace_LP_( ForIt1 x_x_it, ForIt2 y_x_it,
-			      const ET&  d_new, const ET&  d_old);
-			      
-    template < class ForIt >                                  // QP case only
-    void  z_update_inplace( ForIt psi1_l_it, ForIt psi1_x_it,
-                            ForIt psi2_l_it, ForIt psi2_x_it,
-			    const ET& omega0, const ET& omega1,
-			    const ET& omega2, const ET& omega3); 
-
-    void  update_entry( ET& entry,   const ET& d_new,
-			const ET& y, const ET& d_old) const;
-
-    // swap functions
-    void  swap_variable  ( unsigned int, Tag_true );            // LP case
-    void  swap_variable  ( unsigned int, Tag_false);            // QP case
-    void  swap_constraint( unsigned int, Tag_true );            // LP case
-    void  swap_constraint( unsigned int, Tag_false);            // QP case	
-    
-    // diagnostic output
-    void  print( );
-
-// ----------------------------------------------------------------------------
-
-// ===============================
-// class implementation (template)
-// ===============================
-
-  public:
-
-    // creation and initialization
-    // ---------------------------
-    // init
-    template < class InputIterator >
-    void
-    init( unsigned int art_size, InputIterator art_first)
-    {
-	CGAL_qpe_assertion_msg( art_size <= l, \
-	    "There are more equality constraints than original variables!");
-
-        init( art_size, art_first, Is_LP());
-	d = et1;
-        CGAL_qpe_assertion( s == art_size);
-        CGAL_qpe_assertion( b == art_size);
-
-	is_phaseI  = true;
-	is_phaseII = false;
-
-        if ( x_x.size() < art_size) {
-            x_x.insert( x_x.end(), art_size-x_x.size(), et0);
-        }
-	
-        if ( tmp_x.size() < art_size) {
-            tmp_x.insert( tmp_x.end(), art_size-tmp_x.size(), et0);
-        }
-        
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-        }
-    }
-
-    // transition to phase II
-    template < class InputIterator >                            // QP case
-    void  transition( InputIterator twice_D_it)
-    {
-	typename Matrix::iterator  m_it1, m_it2, p_begin, r_begin;
-	typename Row   ::iterator  x_it;
-	unsigned int      row, col;
-
-	// fill missing rows
-	for (row= 0; row< s; ++ row) {
-	    CGAL_qpe_assertion(M[row].size()==0);
-	    M[row].insert(M[row].end(), row+1, et0);
-	}
-
-	// compute new basis inverse [ upper-left part: -(Q^T * 2 D_B * Q) ]
-	// -----------------------------------------------------------------
-	// compute 'Q^T * 2 D_B' ( Q = A_B^-1 )	
-	p_begin = M.begin();
-	r_begin = M.begin();
-	if (b > 0) r_begin += l+s-1;   	// initialize only if for loops 
-					// are entered
-	for ( col = 0; col < b; ++col, ++twice_D_it) {
-            ++p_begin;
-
-	    // get column of D (D symmetric)
-	    std::copy( *twice_D_it, *twice_D_it+b, x_l.begin());
-
-	    // compute 'Q^T * 2 D_Bj'
-	    multiply__l( x_l.begin(), x_x.begin());
-
-	    // store resulting column in 'P' and 'R'
-	    x_it  = x_x.begin();
-	    m_it2 = r_begin;
-	    for ( row = l+col; row >= l; --row, --m_it2, ++x_it) {
-		(*m_it2)[ row] = *x_it;
-	    }
-	    m_it1 = p_begin;
-	    for ( row = col+1; row <  s; ++row, ++m_it1, ++x_it) {
-		(*m_it1)[ col] = *x_it;
-	    }
-	}
-
-	// compute '(Q^T * 2 D_B) * Q' ( Q = A_B^-1 )
-	m_it1 = M.begin();
-	m_it2 = r_begin;
-	for ( row = 0; row < s; ++row, ++m_it1, --m_it2) {
-
-	    // get row of '(Q^T * 2 D_B)' (stored in 'P' and 'R')
-	    std::copy(m_it1->begin()  ,m_it1->begin()+row,    x_l.begin());
-	    std::copy(m_it2->begin()+l,m_it2->begin()+(l+b-row),
-	    	x_l.begin()+row);
-
-	    // compute '(Q^T * 2 D_B)_i * Q'
-	    multiply__l( x_l.begin(), x_x.begin());
-
-	    // negate and store result in 'P'
-	    std::transform( x_x.begin(), x_x.begin()+row+1,
-			    m_it1->begin(), std::negate<ET>());
-
-	    // clean up in 'R'
-	    std::fill_n( m_it2->begin()+l, b-row, et0);
-	}
-
-	// scale A_B^-1
-	m_it1 = M.begin()+l;
-	for ( row = 0; row < s; ++row, ++m_it1) {
-	    std::transform( m_it1->begin(), m_it1->begin()+s, m_it1->begin(),
-			    std::bind2nd( std::multiplies<ET>(), d));
-	}
-
-	// new denominator: |det(A_B)|^2
-	d *= d;
-
-	// update status
-	transition();
-    }
-
-    // update functions
-    // ----------------
-    // entering of original variable (update type U1)
-    template < class ForwardIterator >
-    void
-    enter_original( ForwardIterator y_l_it,
-                    ForwardIterator y_x_it, const ET& z)
-    {
-        // assert QP case
-        Assert_compile_time_tag( Tag_false(), Is_LP());
-    
-        // update matrix in-place
-        // ----------------------
-        // handle sign of new denominator
-        CGAL_qpe_assertion( z != et0);
-        bool  z_neg = ( z < et0);
-
-        // update matrix
-        update_inplace_QP( y_l_it, y_x_it, z, ( z_neg ? -d : d));
-                                                                      
-        // append new row and column ("after R")
-        // -------------------------------------
-        typename Row::iterator  row_it;
-	ForwardIterator           y_it;
-        unsigned int            col, k = l+(++b);
-    
-//      // allocate new row, if necessary
-//      // BG: replaced this by the ensure_physical_row construct below
-//      if ( k <= M.size()) {
-//           row_it = M[ k-1].begin();
-//      } else {
-//           row_it = M.insert( M.end(), Row( k, et0))->begin();
-//           x_x.push_back( et0);
-// 	     tmp_x.push_back( et0);
-//      }
-	ensure_physical_row(k-1);
-	row_it = M[ k-1].begin();
-    
-        // store entries in new row
-        for (   col = 0,                              y_it = y_l_it;
-                col < s;
-              ++col,     ++row_it,                  ++y_it         ) {
-            *row_it = ( z_neg ? *y_it : -( *y_it));
-        }
-        for (   col = l,     row_it += l-s,           y_it = y_x_it;
-                col < k-1;
-              ++col,       ++row_it,                ++y_it         ) {
-            *row_it = ( z_neg ? *y_it : -( *y_it));
-        }
-        *row_it = ( z_neg ? -d : d);
-    
-        // store new denominator
-	// ---------------------
-        d = ( z_neg ? -z : z);
-        CGAL_qpe_assertion( d > et0);
-    
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-        }
-    }
-    
-    // leaving of slack variable (update type U4)
-    template < class ForwardIterator >
-    void
-    leave_slack( ForwardIterator u_x_it)
-    {
-        // assert QP case
-        Assert_compile_time_tag( Tag_false(), Is_LP());
-    
-        // update matrix in-place
-        // ----------------------
-        // compute new row/column of basis inverse
-        multiply( u_x_it,                               // dummy (not used)
-		  u_x_it, x_l.begin(), x_x.begin(),
-		  Tag_false(),                          // QP
-		  Tag_false());                         // ignore 1st argument
-        ET    z     = -inner_product_x( x_x.begin(), u_x_it);
-        bool  z_neg = ( z < et0);
-        CGAL_qpe_assertion( z != et0);
-    
-        // update matrix
-        update_inplace_QP( x_l.begin(), x_x.begin(), z, ( z_neg ? -d : d));
-                                                                      
-        // insert new row and column ("after P")
-        // -------------------------------------
-        typename Row   ::iterator  row_it, x_it;
-        typename Matrix::iterator  col_it;
-        unsigned int               col, k = l+b;
-    
-        // store entries in new row
-	if (M[s].size()==0) {
-	   // row has to be filled first
-	   M[s].insert(M[s].end(), s+1, et0);
-	}
-        for (   col = 0,   row_it = M[ s].begin(),        x_it = x_l.begin();
-                col < s;
-              ++col,     ++row_it,                      ++x_it              ) {
-            *row_it = ( z_neg ? *x_it : -( *x_it));
-        }
-        *row_it = ( z_neg ? -d : d);
-    
-        for (   col = l,   col_it = M.begin()+l,          x_it = x_x.begin();
-                col < k;
-              ++col,     ++col_it,                      ++x_it              ) {
-            (*col_it)[ s] = ( z_neg ? *x_it : -( *x_it));
-        }
-        ++s;
-    
-        // store new denominator
-	// ---------------------
-        d = ( z_neg ? -z : z);
-        CGAL_qpe_assertion( d > et0);
-    
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-	}
-    }
-
-    // replacing of original variable (update type U5) [ replace column ]
-    template < class RandomAccessIterator >
-    void
-    enter_original_leave_original( RandomAccessIterator y_x_it, unsigned int k)
-    {
-        // assert LP case or phase I
-	CGAL_qpe_assertion( is_LP || is_phaseI);
-	CGAL_qpe_assertion( k < b);
-
-        // update matrix in place
-        // ----------------------
-        typename Matrix::iterator  matrix_it;
-        typename Row   ::iterator     row_it, row_k_it, row_k;
-
-        // handle sign of new denominator
-        ET    z     = y_x_it[ k];
-        bool  z_neg = ( z < et0);
-        if ( z_neg) d = -d;
-
-	// QP (in phase I)?
-	matrix_it = M.begin();
-	if ( is_QP) matrix_it += l;
-	row_k = ( matrix_it+k)->begin();
-
-        // rows: 0..s-1 without k
-        unsigned int  row, col;
-	ET            minus_y;
-        for (   row = 0;
-                row < s;
-              ++row,     ++matrix_it, ++y_x_it) {
-	    if ( row != k) {
-
-		// columns: 0..b-1
-		minus_y = -( *y_x_it);
-		for (   col = 0, row_it = matrix_it->begin(), row_k_it = row_k;
-			col < b;
-		      ++col,   ++row_it,                    ++row_k_it       ){
-        
-		    // update in place
-		    update_entry( *row_it, z, minus_y * *row_k_it, d);
-		}
-	    }
-        }
-
-	// rows: k (flip signs, if necessary)
-	if ( z_neg) {
-	    for (   col = 0,   row_it = row_k;
-		    col < b;
-		  ++col,     ++row_it        ) {
-        
-		*row_it = -( *row_it);
-	    }
-	}
-
-        // store new denominator
-        // ---------------------
-        d = ( z_neg ? -z : z);
-        CGAL_qpe_assertion( d > et0);
-
-	// diagnostic output
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-	}
-    }
-    
-    // replacing of slack variable (update type U6) [ replace row ]
-    template < class ForwardIterator >
-    void
-    enter_slack_leave_slack( ForwardIterator u_x_it, unsigned int k)
-    {
-        // assert LP case or phase I
-	CGAL_qpe_assertion( is_LP || is_phaseI);
-	CGAL_qpe_assertion( k < s);
-
-        // compute new row of basis inverse
-        multiply__l( u_x_it, x_x.begin());
-
-        // update matrix in place
-        // ----------------------
-        typename Matrix::iterator  matrix_it;
-        typename Row   ::iterator     row_it, x_it;
-
-        // handle sign of new denominator
-        ET    z     = x_x[ k];
-        bool  z_neg = ( z < et0);
-        if ( z_neg) d = -d;
-
-	// QP (in phase I)?
-	matrix_it = M.begin();
-	if ( is_QP) matrix_it += l;
-
-        // rows: 0..s-1
-        unsigned int          row, col;
-	ET            minus_m_row;
-        for (   row = 0;
-                row < s;
-              ++row,     ++matrix_it) {
-
-	    // columns: 0..b-1
-	    minus_m_row = -( *matrix_it)[ k];
-	    for (   col = 0,   row_it = matrix_it->begin(), x_it = x_x.begin();
-		    col < b;
-		  ++col,     ++row_it,                    ++x_it             ){
-
-		if ( col != k) {                // all columns but k
-
-		    // update in place
-		    update_entry( *row_it, z, minus_m_row * *x_it, d);
-
-		} else {                        // column k
-
-		    // flip sign, if necessary
-		    if ( z_neg) *row_it = -( *row_it);
-
-		}
-	    }
-	}
-
-        // store new denominator
-        // ---------------------
-        d = ( z_neg ? -z : z);
-        CGAL_qpe_assertion( d > et0);
-
-	// diagnostic output
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-	}
-    }
-    
-    // replacing of slack by original variable (update type U7) [ grow ]
-    template < class ForwardIterator1, class ForwardIterator2 >
-    void  enter_original_leave_slack( ForwardIterator1 y_x_it,
-				      ForwardIterator2 u_x_it)
-    {
-        // assert LP case or phase I
-	CGAL_qpe_assertion( is_LP || is_phaseI);
-
-        // update matrix in-place
-        // ----------------------
-        // compute new row of basis inverse
-        multiply__l( u_x_it, x_x.begin());
-        ET    z     = d*u_x_it[ b] - inner_product_x( y_x_it, u_x_it);
-        bool  z_neg = ( z < et0);
-        CGAL_qpe_assertion( z != et0);
-	
-        // update matrix
-	update_inplace_LP( x_x.begin(), y_x_it, z, ( z_neg ? -d : d));
-                                                  
-        // append new row and column
-        // -------------------------
-        typename Matrix::iterator  matrix_it;
-        typename Row   ::iterator     row_it, x_it;
-        unsigned int                  row, col;
-
-	// QP (in phase I)?
-	if ( is_QP) {
-	    ensure_physical_row(l+b);
-	    row_it = M[l+b].begin();
-	    matrix_it = M.begin() + l;
-	} else {
-	    row_it = M[s].begin();
-	    matrix_it = M.begin();
-	} 	
-	
-	// store 'x_x' in new row 
-	x_it = x_x.begin();
-	for ( col = 0; col < b; ++col, ++row_it, ++x_it) {
-		*row_it = ( z_neg ? *x_it : -( *x_it));
-	}
-        *row_it = ( z_neg ? -d : d);
-	
-	// store 'y_x' in new col
-	for ( row = 0; row < s; ++row, ++matrix_it, ++y_x_it) {
-		(*matrix_it)[b] = ( z_neg ? *y_x_it : -( *y_x_it));
-	}
-	++s; ++b;
-    
-        // store new denominator
-	// ---------------------
-        d = ( z_neg ? -z : z);
-        CGAL_qpe_assertion( d > et0);
-    
-        CGAL_qpe_debug {
-            if ( vout.verbose()) print();
-        }
-    }
-  // due to basis_matrix_stays_regular fix, needs reconsideration
-  //private:
-
-    // private member functions
-    // ------------------------
-    // init (QP case)
-    template < class InIt >  inline
-    void
-    init( unsigned int art_size, InIt art_first, Tag_false)
-    {
-	// only Q is used to store A_B^-1 in phase I
-        for ( s = l, b = 0; b < art_size; ++s, ++b, ++art_first) {
-	    ensure_physical_row(s);
-            M[ s][ b] = ( art_first->second ? -et1 : et1);
-        }
-
-        s = art_size;
-    }
-
-    // init (LP case)
-    template < class InIt >  inline
-    void
-    init( unsigned int art_size, InIt art_first, Tag_true)
-    {
-        for ( s = 0; s < art_size; ++s, ++art_first) {
-	    std::fill_n( M[ s].begin(), art_size, et0);
-	    M[ s][ s] = ( art_first->second ? -et1 : et1);
-	}
-	b = art_size;
-    }
-    
-    // append row in Q if no allocated row available
-    void ensure_physical_row (unsigned int row) {
-    	unsigned int rows = static_cast<unsigned int>(M.size());
-	CGAL_qpe_assertion(rows >= row);
-	if (rows == row) {
-            M.push_back(Row(row+1, et0));
-	    
-	    // do we have to grow x_x?
-	    CGAL_qpe_assertion(x_x.size() >= row-l);
-	    if (x_x.size() == row-l)
-	       x_x.push_back(et0);
-	    
-	    // do we have to grow tmp_x?
-	    CGAL_qpe_assertion(tmp_x.size() >= row-l);
-	    if (tmp_x.size() == row-l)
-	       tmp_x.push_back(et0);
-	    
-            CGAL_qpe_assertion(M[row].size()==row+1);
-	    CGAL_qpe_debug {
-	      if ( vout.verbose()) {
-                    vout << "physical row " << (row) << " appended in Q\n";
-	      }
-            }
-	}
-    }
-    
-    // matrix-vector multiplication (QP case)
-    template < class ForIt, class OutIt, class Use1stArg >
-    void
-    multiply( ForIt v_l_it, ForIt v_x_it,
-              OutIt y_l_it, OutIt y_x_it, Tag_false,
-	      Use1stArg use_1st_arg) const
-    {
-	// use 'LP' functions in phase I
-	if ( is_phaseI) {
-	    multiply__l( v_x_it, y_l_it);
-	    multiply__x( v_l_it, y_x_it);
-	    return;
-	}
-
-	// phase II
-        typename Matrix::const_iterator  matrix_it;
-        typename Row   ::const_iterator     row_it;     // left  of diagonal
-        typename Matrix::const_iterator  column_it;     // right of diagonal
-        ForIt                                 v_it;
-    
-        unsigned int  row, count, k = l+b;
-        ET            sum;
-    
-        // compute  P v_l + Q^T v_x	
-        for (   row = 0,   matrix_it = M.begin();
-                row < s;
-              ++row,                                                ++y_l_it) {
-            sum = et0;
-
-	    // P v_l
-	    if ( check_tag( use_1st_arg)) {
-
-		// P: left of diagonal (including)
-		for (   row_it =  matrix_it->begin(),            v_it = v_l_it;
-			row_it != matrix_it->end();
-		      ++row_it,                                ++v_it) {
-		    sum += *row_it * *v_it;
-		}
-
-		// P: right of diagonal (excluding)
-		for (   count = row+1,   column_it  = ++matrix_it;
-			count < s;
-		      ++count,         ++column_it,                ++v_it) {
-		    sum += (*column_it)[ row] * *v_it;
-		}
-	    }
-    
-            // Q^T:
-            for (   count = 0,       column_it  = M.begin()+l,   v_it = v_x_it;
-                    count < b;
-                  ++count,         ++column_it,                ++v_it) {
-                sum += (*column_it)[ row] * *v_it;
-            }
-    
-            // store result
-            *y_l_it = sum;
-        }
-    
-        // compute  Q v_l + R v_x
-        for (   row = l,   matrix_it = M.begin()+l;
-                row < k;
-              ++row,                                                ++y_x_it) {
-            sum = et0;
-
-	    // Q v_l
-	    if ( check_tag( use_1st_arg)) {
-
-		// Q:
-		for (   count = 0,  row_it = matrix_it->begin(), v_it = v_l_it;
-			count < s;
-		      ++count,    ++row_it,                    ++v_it) {
-		    sum += *row_it * *v_it;
-		}
-	    }
-    
-	    // R: left of diagonal (including)
-            for (                row_it =  matrix_it->begin()+l, v_it = v_x_it;
-                                 row_it != matrix_it->end();
-                               ++row_it,                       ++v_it) {
-                sum += *row_it * *v_it;
-            }
-    
-            // R: right of diagonal (excluding)
-            for (   count = row+1,   column_it = ++matrix_it;
-                    count < k;
-                  ++count,         ++column_it,                ++v_it) {
-                sum += (*column_it)[ row] * *v_it;
-            }
-    
-            // store result
-            *y_x_it = sum;
-        }
-    }
-    
-    // matrix-vector multiplication (LP case)
-    template < class ForIt, class OutIt, class Dummy > inline
-    void
-    multiply( ForIt v_l_it, ForIt v_x_it,
-              OutIt y_l_it, OutIt y_x_it, Tag_true, Dummy) const
-    {
-        multiply__l( v_x_it, y_l_it);
-        multiply__x( v_l_it, y_x_it);
-    }
-    
-    // special matrix-vector multiplication functions for LPs
-    template < class ForIt, class OutIt > inline
-    void
-    multiply__l( ForIt v_x_it, OutIt y_l_it) const
-    {
-        typename Matrix::const_iterator  matrix_it = M.begin();
-        typename Matrix::const_iterator  column_it;
-        ForIt                                 v_it;
-    
-        unsigned int  row, count;
-        ET            sum;
-    
-	// QP?
-	if ( is_QP) matrix_it += l;
-
-        // compute  Q^T v_x
-        for ( row = 0; row < s; ++row,                              ++y_l_it) {
-            sum = et0;
-    
-            for (   count = 0,   column_it = matrix_it,   v_it = v_x_it;
-                    count < b;
-                  ++count,     ++column_it,             ++v_it) {
-                sum += (*column_it)[ row] * *v_it;
-            }
-    
-            *y_l_it = sum;
-        }
-    }
-    
-    template < class ForIt, class OutIt > inline
-    void
-    multiply__x( ForIt v_l_it, OutIt y_x_it) const
-    {
-        typename Matrix::const_iterator  matrix_it = M.begin();
-        unsigned int  row;
-
-	// QP?
-	if ( is_QP) matrix_it += l;
-
-        // compute  Q v_l
-        for (   row = 0;
-                row < b;
-              ++row,     ++matrix_it, ++y_x_it) {
-
-	    *y_x_it = inner_product( matrix_it->begin(), v_l_it, s);
-	}
-    }
-    
-    // vector-vector multiplication  
-    template < class InIt1, class InIt2 > inline
-    typename std::iterator_traits<InIt1>::value_type  
-    inner_product( InIt1 u_it, InIt2 v_it, unsigned int n) const
-    {
-	typedef  typename std::iterator_traits<InIt1>::value_type  NT;
-    
-        // compute u^T v
-	NT sum = NT( 0);
-        for ( unsigned int count = 0; count < n; ++count, ++u_it, ++v_it) {
-            sum += NT(*u_it) * NT(*v_it);
-        }
-    
-        return sum;
-    }
-    
-    // in-place update
-    template < class ForIt >                                    // QP case
-    void  update_inplace_QP( ForIt y_l_it, ForIt y_x_it,
-			     const ET& d_new, const ET& d_old)
-    {
-        typename Matrix::      iterator  matrix_it;
-        typename Row   ::      iterator     row_it;
-        typename Row   ::const_iterator      y_it1, y_it2;
-    
-        unsigned int  row, col, k = l+b;
-    
-        // rows: 0..s-1  ( P )
-        for (   row = 0,   y_it1 = y_l_it,   matrix_it = M.begin();
-                row < s;
-              ++row,     ++y_it1,          ++matrix_it            ) {
-    
-            // columns: 0..row  ( P )
-            for (   row_it =  matrix_it->begin(),   y_it2 = y_l_it;
-                    row_it != matrix_it->end();
-                  ++row_it,                       ++y_it2         ) {
-    
-                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
-            }
-        }
-    
-        // rows: l..k-1  ( Q R )
-        for (   row = l,   y_it1 = y_x_it,   matrix_it += l-s;
-                row < k;
-              ++row,     ++y_it1,          ++matrix_it       ) {
-    
-            // columns: 0..s-1  ( Q )
-            for (   col = 0,   row_it =  matrix_it->begin(),   y_it2 = y_l_it;
-                    col < s;
-                  ++col,     ++row_it,                       ++y_it2         ){
-    
-                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
-            }
-    
-            // columns: l..k-1  ( R )
-            for (              row_it += l-s,                  y_it2 = y_x_it;
-                               row_it != matrix_it->end();
-                             ++row_it,                       ++y_it2         ){
-    
-                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
-            }
-        }
-    }
-    
-    template < class ForIt1, class ForIt2 >                     // LP case
-    void  update_inplace_LP( ForIt1 x_x_it, ForIt2 y_x_it,
-			     const ET& d_new, const ET& d_old)
-    {
-        typename Matrix::      iterator  matrix_it;
-        typename Row   ::      iterator     row_it;
-	ForIt1                                x_it;
-    
-        unsigned int  row, col;
-	ET            y;
-
-	// QP (in phase I)?
-	matrix_it = M.begin();
-	if ( is_QP) matrix_it += l;
-
-        // rows: 0..s-1  ( Q )
-        for (   row = 0;
-                row < s;
-              ++row,     ++y_x_it, ++matrix_it) {
-    
-            // columns: 0..b-1  ( Q )
-	    y = *y_x_it;
-            for (   col = 0,   row_it =  matrix_it->begin(),   x_it = x_x_it;
-		    col < b;
-		  ++col,     ++row_it,                       ++x_it         ){
-    
-                update_entry( *row_it, d_new, y * *x_it, d_old);
-            }
-        }
-    }
-    
-    
-    template < class RandomAccessIterator >
-    typename std::iterator_traits<RandomAccessIterator>::value_type 
-    inv_M_B_row_dot_col( int row, RandomAccessIterator u_l_it) const
-    {
-	typename Row::const_iterator row_it;
-	if ( is_QP) {
-	    row_it = M[l + row].begin();
-	} else {
-	    row_it = M[row].begin();
-	}
-	return inner_product(row_it, u_l_it, b);	
-    }
-
-};
-
-// ----------------------------------------------------------------------------
-
-// =============================
-// class implementation (inline)
-// =============================
-
-// creation
-template < class ET_, class Is_LP_ >  inline
-QP_basis_inverse<ET_,Is_LP_>::
-QP_basis_inverse( CGAL::Verbose_ostream&  verbose_ostream)
-    : et0( 0), et1( 1), et2( 2),
-      is_LP( check_tag( Is_LP())), is_QP( ! is_LP),
-      vout( verbose_ostream)
-{ }
-
-// transition (LP case)
-template < class ET_, class Is_LP_ >  inline
-void  QP_basis_inverse<ET_,Is_LP_>::
-transition( )
-{
-    is_phaseI  = false;
-    is_phaseII = true;
-
-    CGAL_qpe_debug {
-	if ( vout.verbose()) print();
-    }
-}
-
-// set-up (QP case)
-template < class ET_, class Is_LP_ >  inline
-void  QP_basis_inverse<ET_,Is_LP_>::
-set( Tag_false)
-{
-    M.reserve( l);
-    // only allocate empty rows
-    for ( unsigned int i = 0; i < l; ++i )
-       M.push_back(Row(0, et0)); 
-}
-    
-// set-up (LP case)
-template < class ET_, class Is_LP_ >  inline
-void  QP_basis_inverse<ET_,Is_LP_>::
-set( Tag_true)
-{
-    M.reserve( l);
-    for ( unsigned int i = 0; i < l; ++i) M.push_back( Row( l, et0));
-}
-
-// access (QP case)
-template < class ET_, class Is_LP_ >  inline
-const ET_&  QP_basis_inverse<ET_,Is_LP_>::
-entry( unsigned int r, unsigned int c, Tag_false) const
-{
-    CGAL_qpe_assertion( ( r < s) || ( ( r >= l) && ( r < l+b)));
-    CGAL_qpe_assertion( ( c < s) || ( ( c >= l) && ( c < l+b)));
-    return ( c < r ? M[ r][ c] : M[ c][ r]);
-}
-
-// access (LP case)
-template < class ET_, class Is_LP_ >  inline
-const ET_&  QP_basis_inverse<ET_,Is_LP_>::
-entry( unsigned int r, unsigned int c, Tag_true) const
-{
-    CGAL_qpe_assertion( r < s);
-    CGAL_qpe_assertion( c < b);
-    return M[ r][ c];
-}
-
-// in-place update
-template < class ET_, class Is_LP_ >  inline
-void  QP_basis_inverse<ET_,Is_LP_>::
-update_entry( ET& entry, const ET& d_new, const ET& y, const ET& d_old) const
-{
-    entry *= d_new;
-    entry += y;
-    entry = CGAL::integral_division(entry, d_old);
-}
-
-} //namespace CGAL
-
-#include <CGAL/QP_solver/QP_basis_inverse_impl.h>
-
-#endif // CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse_impl.h
deleted file mode 100644
index 3a9e02e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_basis_inverse_impl.h
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr 
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp 
-//                 Kaspar Fischer 
-
-namespace CGAL {
-
-// =============================
-// class implementation (cont'd)
-// =============================
-
-// creation and initialization
-// ---------------------------
-// set-up
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-set( int n, int m, int nr_equalities)
-{
-    CGAL_qpe_assertion( n >= 0);
-    CGAL_qpe_assertion( m >= 0);
-    b = s = 0;
-    // l is the maximum size of the basis in phase I
-    l = (std::min)( n+nr_equalities+1, m);
-    if ( ! M.empty()) M.clear();
-    set( Is_LP());
-    
-    if ( ! x_l.empty()) x_l.clear();
-    if ( ! x_x.empty()) x_x.clear();
-       
-    x_l.insert( x_l.end(), l, et0);
-    x_x.insert( x_x.end(), l, et0); // has to grow later QP-case
-    
-    if ( ! tmp_l.empty()) tmp_l.clear();
-    if ( ! tmp_x.empty()) tmp_x.clear();
-
-    tmp_l.insert( tmp_l.end(), l, et0);
-    tmp_x.insert( tmp_x.end(), l, et0); // has to grow later QP-case
-
-}
-
-// update functions
-// ----------------
-// leaving of original variable (update type U2)
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-leave_original( )
-{
-    // assert QP case
-    Assert_compile_time_tag( Tag_false(), Is_LP());
-
-    // determine new denominator (`z')
-    --b;
-    ET    z     = M[ l+b][ l+b];
-    bool  z_neg = ( z < et0);
-    CGAL_qpe_assertion( z != et0);
-
-    // update matrix in place
-    update_inplace_QP( M[ l+b].begin(), M[ l+b].begin()+l,
-		       -z, ( z_neg ? d : -d));
-                                                                 
-    // store new denominator
-    d = ( z_neg ? -z : z);
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-}
-
-// entering of slack variable (update type U3)
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-enter_slack( )
-{
-    // assert QP case
-    Assert_compile_time_tag( Tag_false(), Is_LP());
-
-    // determine new denominator (`z')
-    --s;
-    ET    z     = M[ s][ s];
-    bool  z_neg = ( z < et0);
-    CGAL_qpe_assertion( z != et0);
-
-    // update matrix in place
-    typename Matrix::iterator  col_it;
-    typename Row   ::iterator    x_it;
-    unsigned int               col;
-    for (   col = 0,   col_it = M.begin()+l,   x_it = x_x.begin();
-            col < b;
-          ++col,     ++col_it,               ++x_it              ) {
-        *x_it = (*col_it)[ s];
-    }
-    update_inplace_QP( M[ s].begin(), x_x.begin(), -z, ( z_neg ? d : -d));
-
-    // store new denominator
-    d = ( z_neg ? -z : z);
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-}
-
-// replacing of original by slack variable (update type U8)
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-enter_slack_leave_original( )
-{
-    // assert LP case or phase I
-    CGAL_qpe_assertion( is_LP || is_phaseI);
-
-    // update matrix in-place
-    // ----------------------
-    typename Matrix::iterator  matrix_it;
-    typename Row   ::iterator       x_it;
-    unsigned int                     row;
-
-    // QP (in phase I)?
-    matrix_it = M.begin();
-    if ( is_QP) matrix_it += l;
-
-    // get last column of basis inverse (store it in 'x_x')
-    --s; --b;
-    for (   row = 0,   x_it = x_x.begin();
-	    row < s;
-	  ++row,     ++x_it,               ++matrix_it) {
-	*x_it = (*matrix_it)[ b];
-    }
-    ET    z     = (*matrix_it)[ b];
-    bool  z_neg = ( z < et0);
-    CGAL_qpe_assertion( z != et0);
-
-    // update matrix
-    update_inplace_LP( matrix_it->begin(), x_x.begin(), -z, ( z_neg ? d : -d));
-
-    // store new denominator
-    // ---------------------
-    d = ( z_neg ? -z : z);
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-}
-
-
-// replacing of original by original variable with precondition in QP-case
-// for phaseII                               (update type UZ_1)
-template < class ET_, class Is_LP_ >
-template < class ForwardIterator >
-void  QP_basis_inverse<ET_,Is_LP_>::
-z_replace_original_by_original(ForwardIterator y_l_it,
-                               ForwardIterator y_x_it, const ET& s_delta,
-                               const ET& s_nu, unsigned int k_i)
-{
-
-    // assert QP case and phaseII
-    CGAL_qpe_assertion(is_QP && is_phaseII);
-
-
-    // prepare \hat{k}_{1} -scalar
-    ET  hat_k_1 = *(y_x_it + k_i);
-
-    // prepare \hat{\rho} -vector in x_l, x_x
-    copy_row_in_B_O(x_l.begin(), x_x.begin(), k_i);
-    
-    // prepare \hat{v} -vector in tmp_l, tmp_x
-    
-    // tmp_l -part
-    std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(),
-        compose2_2(std::plus<ET>(), Identity<ET>(),
-        std::bind1st(std::multiplies<ET>(), s_delta)));
-    
-    // tmp_x -part    
-    std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(),
-        compose2_2(std::plus<ET>(), Identity<ET>(),
-        std::bind1st(std::multiplies<ET>(), s_delta)));
-    tmp_x[k_i] -= d;
-    
-    // prepare \hat{k}_{2} -scalar
-    ET  hat_k_2 = s_nu - (et2 * s_delta * hat_k_1);
-    
-    CGAL_qpe_assertion( d != et0);
-        
-    // update matrix in place
-    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
-                      hat_k_1 * hat_k_1, -hat_k_2, -hat_k_1, d*d);
-    
-    // store new denominator
-    d = CGAL::integral_division(hat_k_1 * hat_k_1, d);
-
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-    
-}
-
-
-// replacing of original by slack variable with precondition in QP-case
-// for phaseII                               (update type UZ_2)
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-z_replace_original_by_slack( )
-{
-
-    // assert QP case and phaseII
-    CGAL_qpe_assertion(is_QP && is_phaseII);
-
-    // adapt s and b
-    --s; --b;
-
-    // prepare \hat{\rho} -vector in x_l, x_x
-    copy_row_in_B_O(x_l.begin(), x_x.begin(), b);
-    
-    // prepare \hat{\varrho} -vector in tmp_l, tmp_x
-    copy_row_in_C(tmp_l.begin(), tmp_x.begin(), s);
-    
-    // prepare \hat{\kappa} -scalar
-    ET  hat_kappa = M[l+b][s];
-    
-    // prepare \hat{\xi} -scalar
-    ET hat_xi = M[s][s];
-        
-    CGAL_qpe_assertion( d != et0);
-    
-    // update matrix in place
-    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
-                           hat_kappa * hat_kappa, hat_xi, -hat_kappa, d * d);
-		     
-    // store new denominator
-    d = CGAL::integral_division(hat_kappa * hat_kappa, d);
-
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-
-}
-
-
-// replacing of slack by original variable with precondition in QP-case
-// for phaseII                               (update type UZ_3)
-template < class ET_, class Is_LP_ >
-template < class ForwardIterator >
-void  QP_basis_inverse<ET_,Is_LP_>::
-z_replace_slack_by_original(ForwardIterator y_l_it,
-                            ForwardIterator y_x_it,
-			                ForwardIterator u_x_it, const ET& hat_kappa,
-		                    const ET& hat_nu)
-{
-    // assert QP case and phaseII
-    CGAL_qpe_assertion(is_QP && is_phaseII);
-    
-    // get copies of y_l_it and y_x_it for later use
-    ForwardIterator y_l_it_copy = y_l_it;
-    ForwardIterator y_x_it_copy = y_x_it;
-
-    CGAL_qpe_assertion( d != et0);
-    
-    // prepare \hat{\phi}
-     
-    // prepare \hat{\varphi} -vector in x_l, x_x
-    multiply(u_x_it, u_x_it, x_l.begin(), x_x.begin(), Tag_false(),
-             Tag_false());
-	     
-    // prepare \hat{\kappa} -scalar
-    
-    // prepare \hat{\nu} -scalar
-   
-    // update matrix in place
-    z_update_inplace(x_l.begin(), x_x.begin(), y_l_it, y_x_it,
-                     hat_kappa * hat_kappa, -hat_nu, hat_kappa, d * d);    
-    
-    // append new rows and columns
-    // ---------------------------
-    typename Row   ::iterator  row_it, x_l_it, x_x_it;
-    typename Matrix::iterator  matrix_it;
-    unsigned int               count;
-    
-    // insert new row and column at the end of block P
-    CGAL_qpe_assertion(M.size()>=s+1);
-    if (M[s].size()==0) {
-	// row has to be filled first
-        M[s].insert(M[s].end(), s+1, et0);
-    }
-     
-    
-    // P-block: left of diagonal (including element on diagonal)
-    y_l_it = y_l_it_copy;
-    for (  row_it = M[s].begin(), x_l_it = x_l.begin();
-           row_it != M[s].end() - 1;
-	 ++row_it,  ++x_l_it,  ++y_l_it                ) {
-        *row_it = 
-	  CGAL::integral_division((hat_nu * *x_l_it)-(hat_kappa * *y_l_it), d);  
-    } 
-    *row_it = -hat_nu;
-     
-    // Q-block
-    y_x_it = y_x_it_copy;
-    for (  matrix_it = M.begin()+l, count = 0, x_x_it = x_x.begin();
-           count < b;
-	 ++matrix_it,  ++count, ++x_x_it, ++y_x_it                  ) {
-        (*matrix_it)[s] = 
-	  CGAL::integral_division((hat_nu * *x_x_it) - (hat_kappa * *y_x_it), d);
-    }
-          
-    // insert new row and column at the end of blocks Q and R
-    ensure_physical_row(l+b);
-    
-    // Q-block
-    for (  row_it = M[l+b].begin(), count = 0, x_l_it = x_l.begin();
-           count < s;
-	 ++row_it,  ++count,  ++x_l_it                              ) {
-        *row_it = CGAL::integral_division(-hat_kappa * *x_l_it, d);
-    }
-    *row_it = hat_kappa;
-    
-    // R-block
-    for (  row_it = M[l+b].begin()+l, count = 0, x_x_it = x_x.begin();
-           count < b;
-	 ++row_it,  ++count,  ++x_x_it                                ) {
-        *row_it = CGAL::integral_division(-hat_kappa * *x_x_it, d);
-    }
-    *row_it = et0;
-    
-    //adapt s and b
-    ++s; ++b; 
-
-    // store new denominator
-    d = CGAL::integral_division(hat_kappa * hat_kappa, d);
-
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-		     
-}
-
-
-// replacing of slack by slack variable with precondition in QP-case
-// for phaseII                               (update type UZ_4)
-template < class ET_, class Is_LP_ >
-template < class ForwardIterator >
-void  QP_basis_inverse<ET_,Is_LP_>::
-z_replace_slack_by_slack(ForwardIterator u_x_it, unsigned int k_j)
-{
-
-    // assert QP case and phaseII
-    CGAL_qpe_assertion(is_QP && is_phaseII);
-
-    // prepare \hat{v} -vector in x_l, x_x
-    multiply(u_x_it, u_x_it, x_l.begin(), x_x.begin(),Tag_false(),
-             Tag_false());
-    x_l[k_j] -= d;
-    
-    // prepare \hat{\varrho} -vector in tmp_l, tmp_x
-    copy_row_in_C(tmp_l.begin(), tmp_x.begin(), k_j);
-    
-    // prepare \hat{k}_{1} -scalar
-    ET  hat_k_1 = inner_product_x(tmp_x.begin(), u_x_it);
-    
-    // prepare \hat{k}_{3} -scalar
-    ET  hat_k_3 = -M[k_j][k_j];
-    
-    CGAL_qpe_assertion( d != et0);    
-    
-    // update matrix in place
-    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
-                     hat_k_1 * hat_k_1, -hat_k_3, -hat_k_1, d * d);
-		     
-    // store new denominator
-    d = CGAL::integral_division(hat_k_1 * hat_k_1, d);
-
-    CGAL_qpe_assertion( d > et0);
-
-    CGAL_qpe_debug {
-        if ( vout.verbose()) print();
-    }
-      
-}
-
-
-// copying of reduced basis inverse row in (upper) C-half
-template < class ET_, class Is_LP_ >
-template < class OutIt >
-void  QP_basis_inverse<ET_,Is_LP_>::
-copy_row_in_C(OutIt y_l_it, OutIt y_x_it, unsigned int r)
-{
-    typename Matrix::const_iterator  matrix_it;
-    typename Row   ::const_iterator     row_it;
-    unsigned int  count;
-    
-    // P-block: left of diagonal (including element on diagonal)
-    matrix_it = M.begin()+r;
-    for (  row_it = matrix_it->begin();
-           row_it != matrix_it->end(); 
-	 ++row_it, ++y_l_it            ) {
-        *y_l_it = *row_it;    
-    }
-    
-    // P-block: right of diagonal (excluding element on diagonal)
-    for (  matrix_it = M.begin()+r+1, count = r+1;
-           count < s; 
-	 ++matrix_it,  ++count,  ++y_l_it         ) {
-        *y_l_it = (*matrix_it)[r];
-    }
-    
-    // Q-block
-    for (  matrix_it = M.begin()+l, count = 0;
-           count < b;
-	 ++matrix_it,  ++count,  ++y_x_it     ) {
-	*y_x_it = (*matrix_it)[r]; 
-    } 
-}
-
-
-// copying of reduced basis inverse row in (lower) B_O-half
-template < class ET_, class Is_LP_ >
-template < class OutIt >
-void  QP_basis_inverse<ET_,Is_LP_>::
-copy_row_in_B_O(OutIt y_l_it, OutIt y_x_it, unsigned int r)
-{
-    typename Matrix::const_iterator  matrix_it;
-    typename Row   ::const_iterator     row_it;
-    unsigned int  count;
-    
-    // Q-block
-    matrix_it = M.begin()+l+r;
-    for (  row_it = matrix_it->begin(), count = 0;
-           count < s;
-	 ++row_it,  ++count,  ++y_l_it           ) {
-        *y_l_it = *row_it;
-    }
-    
-    // R-block: left of diagonal (including element on diagonal)
-    for (  row_it = matrix_it->begin()+l; 
-           row_it != matrix_it->end();
-	 ++row_it,  ++y_x_it            ) {
-        *y_x_it = *row_it;
-    }
-    
-    // R-block: right of diagonal (excluding element on diagonal)
-    for (  matrix_it = M.begin()+l+r+1, count = r+1;
-           count < b;
-	 ++matrix_it,  ++count,  ++y_x_it           ) {
-        *y_x_it = (*matrix_it)[l+r];
-    }
-
-}
-
-template < class ET_, class Is_LP_ >
-template < class ForIt >
-void  QP_basis_inverse<ET_,Is_LP_>::
-z_update_inplace( ForIt psi1_l_it, ForIt psi1_x_it,
-                  ForIt psi2_l_it, ForIt psi2_x_it,
-	             const ET& omega0, const ET& omega1,
-		         const ET& omega2, const ET& omega3)
-{
-    typename Matrix::      iterator  matrix_it;
-    typename Row   ::      iterator     row_it;
-    typename Row   ::const_iterator      y_it1_r, y_it1_c, y_it2_r, y_it2_c;
-	
-    unsigned int  row, col, k = l+b;
-    ET           u_elem;
-
-    // rows: 0..s-1  ( P )
-    for (  row = 0, matrix_it = M.begin(),
-           y_it1_r = psi1_l_it,  y_it2_r = psi2_l_it;
-	   row < s;
-         ++row, ++matrix_it, ++y_it1_r, ++y_it2_r  ) {
-	      
-        // columns: 0..row  ( P )
-        for (   row_it =  matrix_it->begin(),
-	        y_it1_c = psi1_l_it,  y_it2_c = psi2_l_it;
-                row_it != matrix_it->end();
-              ++row_it,  ++y_it1_c,  ++y_it2_c            ) {
-                
-            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
-	    u_elem *= omega2;
-	    u_elem += omega1 * *y_it1_r * *y_it1_c;
-            update_entry( *row_it, omega0, u_elem, omega3);
-        } 
-    }
-	
-    // rows: l..k-1  ( Q R )
-    for (  row = l, matrix_it = M.begin()+l,
-	   y_it1_r = psi1_x_it,  y_it2_r = psi2_x_it;
-	   row != k;
-	 ++row,  ++matrix_it,  ++y_it1_r,  ++y_it2_r ) {
-	    
-        // columns: 0..s-1  ( Q )
-        for (   col = 0,   row_it =  matrix_it->begin(),
-	        y_it1_c = psi1_l_it,  y_it2_c = psi2_l_it;
-                col < s;
-              ++col, ++row_it,  ++y_it1_c,  ++y_it2_c     ){
-    
-            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
-	       u_elem *= omega2;
-	       u_elem += omega1 * *y_it1_r * *y_it1_c; 
-	       update_entry( *row_it, omega0, u_elem, omega3);
-        }
-    
-        // columns: l..k-1  ( R )
-        for (  row_it = matrix_it->begin()+l,
-	       y_it1_c = psi1_x_it,  y_it2_c = psi2_x_it;
-               row_it != matrix_it->end();
-             ++row_it,  ++y_it1_c,  ++y_it2_c            ){
-		 
-            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
-            u_elem *= omega2;
-	        u_elem += omega1 * *y_it1_r * *y_it1_c;     
-            update_entry( *row_it, omega0, u_elem, omega3);
-        }
-	    
-    } 
-	
-} 
-
-
-// swap functions
-// --------------
-// swap variable ``to the end'' of R
-template < class ET_, class Is_LP_ >                            // LP case
-void  QP_basis_inverse<ET_,Is_LP_>::
-swap_variable( unsigned int j, Tag_true)
-{
-    unsigned int  k = b-1;
-    if ( j == k) return;
-
-    // swap rows
-    // ---------
-    typename Row::iterator   row_j_it = M[ j].begin();
-    typename Row::iterator   row_k_it = M[ k].begin();
-    unsigned int  count;
-
-    // swap entries 0..b-1 (row <-> row) [in Q]
-    for (   count = 0;
-            count < b;
-          ++count,     ++row_j_it, ++row_k_it) {
-        std::iter_swap( row_j_it, row_k_it);
-    }
-}
-
-template < class ET_, class Is_LP_ >                            // QP case
-void  QP_basis_inverse<ET_,Is_LP_>::
-swap_variable( unsigned int j, Tag_false)
-{
-    unsigned int  i = l+j, k = l+b-1;
-    if ( i == k) return;
-
-    // swap rows and columns
-    // ---------------------
-    typename    Row::iterator   row_i_it = M[ i].begin();
-    typename    Row::iterator   row_k_it = M[ k].begin();
-    typename Matrix::iterator  matrix_it = M.begin()+(i+1);
-    unsigned int  count;
-
-    // swap entries 0..s-1 (row <-> row) [in Q]
-    for (   count = 0;
-            count < s;
-          ++count,     ++row_i_it, ++row_k_it) {
-        std::iter_swap( row_i_it, row_k_it);
-    }
-
-    if ( is_phaseII) {
-
-	// swap entries l..i-1 (row <-> row) [in R]
-	for (   count = l,   row_i_it += l-s,   row_k_it += l-s;
-		count < i;
-	      ++count,     ++row_i_it,        ++row_k_it       ) {
-	    std::iter_swap( row_i_it, row_k_it);
-	}
-
-	// swap entries i+1..k-1 (column <-> row) [in R]
-	for ( ++count,                        ++row_k_it;
-		count < k;
-	      ++count,     ++matrix_it,       ++row_k_it) {
-	    std::swap( ( *matrix_it)[ i], *row_k_it);
-	}
-
-	// swap entries i,i with k,k (entry <-> entry) [in R]
-	std::iter_swap( row_i_it, row_k_it);
-    }
-}
-
-// swap constraint ``to the end'' of P
-template < class ET_, class Is_LP_ >                            // LP case
-void  QP_basis_inverse<ET_,Is_LP_>::
-swap_constraint( unsigned int i, Tag_true)
-{
-    unsigned int  k = s-1;
-    if ( i == k) return;
-
-    // swap columns
-    // ------------
-    typename Matrix::iterator  matrix_it = M.begin();
-    unsigned int  count;
-
-    // swap entries 0..s-1 (column <-> column) [in Q]
-    for (   count = 0;
-            count < s;
-          ++count,     ++matrix_it) {
-        std::swap( ( *matrix_it)[ i], ( *matrix_it)[ k]);
-    }
-}
-
-template < class ET_, class Is_LP_ >                            // QP case
-void  QP_basis_inverse<ET_,Is_LP_>::
-swap_constraint( unsigned int i, Tag_false)
-{
- 
-    if ( i == s-1) return;
-
-    // swap rows and columns
-    // ---------------------
-    typename    Row::iterator   row_i_it = M[ i].begin();
-    typename    Row::iterator   row_k_it = M[ s-1].begin();
-    typename Matrix::iterator  matrix_it = M.begin()+i;
-    unsigned int  count;
-
-    if ( is_phaseI) {
-
-	// skip empty P
-	matrix_it =M.begin() + l;
-
-    } else {
-
-	// swap entries 0..i-1 (row <-> row) [in P]
-	for (   count =  0;
-		count < i;
-	      ++count,      ++row_i_it, ++row_k_it) {
-	    std::iter_swap( row_i_it, row_k_it);
-	}
-
-	// swap entries i+1..s-2 (column <-> row) [in P]
-	for ( count = i + 1, ++matrix_it, ++row_k_it;
-		count < s-1;
-	      ++count,     ++matrix_it, ++row_k_it) {
-	    std::swap( ( *matrix_it)[ i], *row_k_it);
-	}
-	// the remaining two entries to be swapped on the main diagonal
-	std::swap(M[i][i], M[s-1][s-1]);
-
-	// advance to Q
-	matrix_it = M.begin() + l;
-    }
-
-    // swap entries l..l+b (column <-> column) [in Q]
-    for (   count = 0;
-            count < b;
-          ++count,     ++matrix_it) {
-        std::swap( ( *matrix_it)[ i], ( *matrix_it)[ s-1]);
-    }
-}
-
-// diagnostic output
-// -----------------
-template < class ET_, class Is_LP_ >
-void  QP_basis_inverse<ET_,Is_LP_>::
-print( )
-{
-    // P
-    if ( is_LP || is_phaseII) {
-	for ( unsigned int row = 0; row < s; ++row) {
-	    std::copy( M[ row].begin(),
-		       M[ row].begin() + ( is_LP ? s : row+1),
-		       std::ostream_iterator<ET>( vout.out(), " "));
-	    vout.out() << std::endl;
-	}
-	if ( is_QP) vout.out() << "= = = = = = = = = =" << std::endl;
-    }
-
-    // Q & R
-    if ( is_QP) {
-	for ( unsigned int row = l; row < l+b; ++row) {
-	    std::copy( M[ row].begin(), M[ row].begin()+s,
-		       std::ostream_iterator<ET>( vout.out(), " "));
-	    if ( is_phaseII) {
-		vout.out() << "|| ";
-		std::copy( M[ row].begin()+l, M[ row].end(),
-			   std::ostream_iterator<ET>( vout.out(), " "));
-	    }
-	    vout.out() << std::endl;
-	}
-    }
-    vout.out() << "denominator = " << d << std::endl;
-}
-
-} //namespace CGAL
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_exact_pricing.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_exact_pricing.h
deleted file mode 100644
index 9d87089..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_exact_pricing.h
+++ /dev/null
@@ -1,252 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp 
-//                 Kaspar Fischer
-
-#ifndef CGAL_QP_PARTIAL_EXACT_PRICING_H
-#define CGAL_QP_PARTIAL_EXACT_PRICING_H
-
-// includes
-#include <CGAL/QP_solver/QP__partial_base.h>
-
-namespace CGAL {
-
-// =================
-// class declaration
-// =================
-template < typename Q, typename ET, typename Tags >
-class QP_partial_exact_pricing;
-
-// ===============
-// class interface
-// ===============
-template < typename Q, typename ET, typename Tags >
-class QP_partial_exact_pricing : public QP__partial_base<Q,ET,Tags> {
-
-    // self
-    typedef  QP_pricing_strategy<Q,ET,Tags>       Base;
-    typedef  QP__partial_base<Q,ET,Tags>          Partial_base;
-    typedef  QP_partial_exact_pricing<Q,ET,Tags>  Self;
-
-    // types from the pricing base class
-    typedef  typename Tags::Is_nonnegative           Is_nonnegative;
-    typedef  typename Partial_base::Index_iterator        Index_iterator;
-    typedef  typename Partial_base::Index_const_iterator  Index_const_iterator;
-
-  public:
-
-    // creation
-    QP_partial_exact_pricing( bool     randomize = false,
-			       Random&  random    = default_random);
-
-    // operations
-    int  pricing(int& direction );
-    
-    // creation
-    ~QP_partial_exact_pricing(){ };
-
-  private:
-    int pricing_helper(int& direction, Tag_true  /*is_in_standard_form*/);
-    int pricing_helper(int& direction, Tag_false /*is_in_standard_form*/);
-};
-
-// ----------------------------------------------------------------------------
-
-// =============================
-// class implementation (inline)
-// =============================
-
-// construction
-template < typename Q, typename ET, typename Tags >  inline
-QP_partial_exact_pricing<Q,ET,Tags>::
-QP_partial_exact_pricing( bool  randomize, Random&  random)
-    : Base( "partial exact"),
-      Partial_base( randomize, random)
-{ }
-    
-// operations
-template < typename Q, typename ET, typename Tags >
-int  QP_partial_exact_pricing<Q,ET,Tags>::
-pricing(int& direction )
-{
-  return (pricing_helper(direction, Is_nonnegative()));
-}
-
-template < typename Q, typename ET, typename Tags >
-int  QP_partial_exact_pricing<Q,ET,Tags>::
-pricing_helper(int& /*direction*/, Tag_true /*is_in_standard_form*/)
-{
-    Index_const_iterator  it, min_it;
-    ET mu, min_mu = this->et0;
-
-    // loop over all active non-basic variables
-    CGAL_qpe_debug {
-	this->vout() << "active variables:" << std::endl;
-    }
-    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
-
-        // don't price artificial variables
-	if (this->solver().is_artificial( *it) ||
-	    this->solver().is_basic( *it))  // added by kf
-	  continue;
-
-	// compute mu_j
-	mu = this->mu_j( *it);
-
-	CGAL_qpe_debug {
-	    this->vout() << "  mu_" << *it << ": " << mu << std::endl;
-	}
-
-	// new minimum?
-	if ( mu < min_mu) { min_it = it; min_mu = mu; }
-    }
-
-    // no entering variable found so far?
-    if ( ( min_mu == this->et0) && ( this->inactive_set_begin() <
-                                     this->inactive_set_end())) {
-
-	// loop over all inactive non-basic variables
-	CGAL_qpe_debug {
-	    this->vout() << "inactive variables:" << std::endl;
-	}
-	Index_const_iterator  active_it;
-	for ( it = this->inactive_set_begin(); it != this->inactive_set_end(); ++it) {
-
-	    // don't price artificial variables
-	    if (this->solver().is_artificial( *it)) continue;
-	    
-	    // compute mu_j
-	    mu = this->mu_j( *it);
-
-	    CGAL_qpe_debug {
-		this->vout() << "  mu_" << *it << ": " << mu << std::endl;
-	    }
-
-	    // candidate for entering?
-	    if ( mu < this->et0) {
-
-		// make variable active
-		active_it = it;
-		this->activating( active_it);
-
-		// new minimum?
-		if ( mu < min_mu) { min_it = active_it; min_mu = mu; }
-	    }
-	}
-    }
-    CGAL_qpe_debug { 
-      this->vout() << std::endl;
-    }
-
-    // return index of entering variable, if any
-    if ( min_mu < this->et0) {
-	int  j = *min_it;
-	this->entering_basis( min_it);
-	return j;
-    }
-
-    // no entering variable found
-    return -1;
-}
-template < typename Q, typename ET, typename Tags >
-int  QP_partial_exact_pricing<Q,ET,Tags>::
-pricing_helper(int& direction, Tag_false /*is_in_standard_form*/)
-{
-    Index_const_iterator  it, min_it;
-    int                   min_j = -1;
-    ET                    mu, min_mu =  this->et0;
-
-    // loop over all active non-basic variables
-    CGAL_qpe_debug {
-	this->vout() << "active variables:" << std::endl;
-    }
-    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
-
-        // don't price artificial variables
-	if (this->solver().is_artificial( *it) ||
-	    this->solver().is_basic( *it))  // added by kf
-	  continue;
-
-	// compute mu_j
-	mu = this->mu_j( *it);
-
-	if (this->price_dantzig (*it, mu, this->et0, min_j, min_mu, direction))
-	  min_it = it;
-    }
-
-    // no entering variable found so far?
-    if ( ( min_j == -1) && ( this->inactive_set_begin() <
-                             this->inactive_set_end())) 
-      {
-
-	// loop over all inactive non-basic variables
-	CGAL_qpe_debug {
-	    this->vout() << "inactive variables:" << std::endl;
-	}
-	Index_const_iterator  active_it;
-	for ( it = this->inactive_set_begin(); 
-	      it != this->inactive_set_end(); ++it) {
-
-	  // don't price basics/artificials
-	  CGAL_qpe_assertion (!this->solver().is_basic(*it));
-	  if (this->solver().is_artificial( *it)) continue;
-	    
-	  // compute mu_j
-	  mu = this->mu_j( *it);
-
-	  CGAL_qpe_debug {
-	    this->vout() << "  mu_" << *it << ": " << mu << std::endl;
-	  }
-
-	  // candidate for entering?
-	  if ( this->is_improving(*it, mu, this->et0)) {
-
-	    // make variable active
-	    active_it = it;
-	    this->activating( active_it);
-
-	    // new minimum?
-	    if (this->price_dantzig (*active_it, mu, this->et0, 
-			       min_j, min_mu, direction))
-	      min_it = active_it;
-	  }
-	}
-      }
-    CGAL_qpe_debug { 
-      this->vout() << std::endl;
-    }
-
-    // return index of entering variable, if any
-    if ( min_j >= 0) {
-      CGAL_qpe_assertion(min_j == *min_it);
-      this->entering_basis( min_it);
-      return min_j;
-    }
-
-    // no entering variable found
-    return -1;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_QP_PARTIAL_EXACT_PRICING_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_filtered_pricing.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_filtered_pricing.h
deleted file mode 100644
index 5395e6a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_partial_filtered_pricing.h
+++ /dev/null
@@ -1,432 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp
-//                 Kaspar Fischer 
-
-#ifndef CGAL_QP_PARTIAL_FILTERED_PRICING_H
-#define CGAL_QP_PARTIAL_FILTERED_PRICING_H
-
-// MSVC detection
-#include <boost/config.hpp>
-
-// includes
-#include <CGAL/QP_solver/QP__partial_base.h>
-#include <CGAL/QP_solver/QP__filtered_base.h>
-
-
-// MSVC complains about inheritance through dominance when only one
-// base implements virtual functions from the top of the diamond.
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4250)
-#endif
-
-namespace CGAL {
-
-// =================
-// class declaration
-// =================
-template < typename Q, typename ET, typename Tags, class NT_ = double, class ET2NT_ =
-    To_double<ET> >
-class QP_partial_filtered_pricing;
-
-// ===============
-// class interface
-// ===============
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
-class QP_partial_filtered_pricing
-    : public QP__partial_base <Q,ET,Tags>,
-      public QP__filtered_base<Q,ET,Tags,NT_,ET2NT_> {
-
-    // self
-    typedef  QP_pricing_strategy<Q,ET,Tags>          Base;
-    typedef  QP__partial_base<Q,ET,Tags>             Partial_base;
-    typedef  QP__filtered_base<Q,ET,Tags, NT_, ET2NT_>  Filtered_base;
-    typedef  QP_partial_filtered_pricing<Q, ET, Tags, NT_, ET2NT_>  Self;
-
-    // types from the base class
-    typedef  typename Tags::Is_nonnegative           Is_nonnegative;
-    typedef  typename Partial_base::Index_iterator        Index_iterator;
-    typedef  typename Partial_base::Index_const_iterator  Index_const_iterator;
-
-    using Base::price_dantzig;
-    using Base::is_improving;
-
-  public:
-
-    // number type
-    typedef  NT_                        NT;
-    typedef  ET2NT_                     ET2NT;
-
-    // creation
-    QP_partial_filtered_pricing( bool     randomize = false,
-				  Random&  random    = default_random,
-				  ET2NT    et2nt     = ET2NT());
-
-    // operations
-    int  pricing(int& direction );
-
-    void  init( );
-    void  transition( );
-    
-    
-    // cleanup
-    ~QP_partial_filtered_pricing() {};
-
-  private:
-  int pricing_helper(int& direction, Tag_true  /*is_in_standard_form*/);
-  int pricing_helper(int& direction, Tag_false /*is_in_standard_form*/);
-};
-
-// ----------------------------------------------------------------------------
-
-// =============================
-// class implementation (inline)
-// =============================
-
-// construction
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
-QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-QP_partial_filtered_pricing( bool randomize, Random& random, ET2NT et2nt)
-    : Base( "partial filtered"),
-      Partial_base( randomize, random),
-      Filtered_base( et2nt)
-{ }
-    
-// operations
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
-void  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-init( )
-{
-     Partial_base::init();
-    Filtered_base::init();
-}
-
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
-void  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-transition( )
-{
-     Partial_base::transition();
-    Filtered_base::transition();
-}
-
-
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
-int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-pricing(int& direction ) 
-{
-  return (pricing_helper(direction, Is_nonnegative()));
-}
-
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
-int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-pricing_helper(int& /*direction*/, Tag_true /*is_in_standard_form*/ )
-{
-    // initialize filtered computation
-    this->init_NT();
-
-    // loop over all active non-basic variables
-    CGAL_qpe_debug {
-	this->vout() << "active variables:" << std::endl;
-    }
-
-    Index_const_iterator  it, min_it;
-    NT                            mu, min_mu = this->nt0;
-    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
-
-	// don't price artificial variables
-	if (this->solver().is_artificial( *it) ||
-	    this->solver().is_basic( *it))  // added by kf
-	  continue;
-
-	// compute mu_j
-	mu = this->mu_j_NT( *it);
-
-	CGAL_qpe_debug {
-	    this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
-	}
-
-	// new minimum?
-	if ( mu < min_mu) { min_it = it; min_mu = mu; }
-    }
-
-    // exact check of entering variable
-    if ( min_mu < this->nt0) {
-	if ( this->mu_j( *min_it) >= this->et0) {
-
-	    // exact check failed!
-	    CGAL_qpe_debug {
-		this->vout() << "--> exact check of entering variable failed!"
-		       << std::endl;
-	    }
-
-	    // reject entering variable
-	    min_mu = this->nt0;
-	}
-    } else {
-	CGAL_qpe_debug {
-	    this->vout() << "--> no entering variable found yet" << std::endl;
-	}
-    }
-
-    // no entering variable found so far?
-    if ( ( min_mu == this->nt0) &&
-         ( this->inactive_set_begin() < this->inactive_set_end())) {
-
-	// loop over all inactive non-basic variables
-	CGAL_qpe_debug {
-	    this->vout() << "inactive variables:" << std::endl;
-	}
-	Index_const_iterator  active_it;
-	for ( it = this->inactive_set_begin(); it != this->inactive_set_end(); ++it) {
-
-	    // don't price artificial variables
-	    if (this->solver().is_artificial( *it)) continue;
-
-	    // compute mu_j
-	    mu = this->mu_j_NT( *it);
-
-	    CGAL_qpe_debug {
-		this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
-	    }
-
-	    // candidate for entering?
-	    if ( mu < this->nt0) {
-
-		// make variable active
-		active_it = it;
-		this->activating( active_it);
-
-		// new minimum?
-		if ( mu < min_mu) { min_it = active_it; min_mu = mu; }
-	    }
-	}
-
-	// exact check of entering variable
-	if ( min_mu < this->nt0) {
-	    if ( this->mu_j( *min_it) >= this->et0) {
-
-		// exact check failed!
-		CGAL_qpe_debug {
-		    this->vout() << "--> exact check of entering variable failed!"
-			   << std::endl;
-		}
-
-		// reject entering variable
-		min_mu = this->nt0;
-	    }
-	} else {
-	    CGAL_qpe_debug {
-		this->vout() << "--> still no entering variable found" << std::endl;
-	    }
-	}
-    }
-
-    // certify non-existance of entering variable, if necessary
-    if ( min_mu == this->nt0) {
-
-	// update row and column maxima
-	this->update_maxima();
-
-	// loop over all non-basic variables again
-	for ( it = this->active_set_begin(); it != this->inactive_set_end(); ++it) {
-
-	    // don't price artificial variables
-	    if (this->solver().is_artificial( *it)) continue;
-
-	    // certify 'mu_j >= 0'
-	    if ( ! this->certify_mu_j_NT( *it)) {
-
-		// entering variable missed by inexact arithmetic
-		min_it = it;
-		break;
-	    }
-	}
-    }
-    CGAL_qpe_debug { 
-      this->vout() << std::endl;
-    }
-
-    // return index of entering variable, if any
-    if ( min_mu < this->nt0) {
-	int  j = *min_it;
-        this->entering_basis( min_it);
-	return j;
-    }
-
-    // no entering variable found
-    return -1;
-}
-template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
-int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
-pricing_helper(int& direction, Tag_false /*is_in_standard_form*/ )
-{
-    // initialize filtered computation
-    this->init_NT();
-
-    // loop over all active non-basic variables
-    CGAL_qpe_debug {
-	this->vout() << "active variables:" << std::endl;
-    }
-
-    Index_const_iterator  it, min_it;    
-    int min_j = -1;
-    NT  mu, min_mu = this->nt0;
-    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
-
-	// don't price artificial variables
-	if (this->solver().is_artificial( *it) ||
-	    this->solver().is_basic( *it))  // added by kf
-	  continue;
-
-	// compute mu_j
-	mu = this->mu_j_NT( *it);
-
-	if (price_dantzig (*it, mu, this->nt0, min_j, min_mu, direction))
-	  min_it = it;
-    }
-
-    if ( min_j >= 0 ) {
-        // exact check; do we really have an entering variable
-	if ( !this->is_improving(min_j, this->mu_j( min_j), this->et0)) {
-
-	    // exact check failed!
-	    CGAL_qpe_debug {
-		this->vout() << "--> exact check of entering variable failed!"
-		       << std::endl;
-	    }
-
-	    // reject entering variable
-	    min_j = -1;
-	    min_mu = this->nt0;
-	}
-    } else {
-	CGAL_qpe_debug {
-	    this->vout() << "--> no entering variable found yet" << std::endl;
-	}
-    }
-
-    // no entering variable found so far?
-    if ( ( min_j == -1) &&
-         ( this->inactive_set_begin() < this->inactive_set_end())) {
-
-	// loop over all inactive non-basic variables
-	CGAL_qpe_debug {
-	    this->vout() << "inactive variables:" << std::endl;
-	}
-	Index_const_iterator  active_it;
-	for ( it = this->inactive_set_begin(); 
-	      it != this->inactive_set_end(); ++it) {
-
-	    // don't price artificial variables
-	    if (this->solver().is_artificial( *it)) continue;
-
-	    // compute mu_j
-	    mu = this->mu_j_NT( *it);
-
-	    CGAL_qpe_debug {
-		this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
-	    }
-
-	    // candidate for entering?
-	    if (is_improving(*it, mu, this->nt0)) {
-
-		// make variable active
-		active_it = it;
-		this->activating( active_it);
-		
-		// new minimum
-		if (price_dantzig (*active_it, mu, this->nt0, 
-			            min_j, min_mu, direction))
-		  min_it = active_it;
-	    }
-	}
-
-	if ( min_j >= 0) {	
-	    // exact check of entering variable
-	    if (!this->is_improving(min_j, this->mu_j( min_j), this->et0)) {
-
-		// exact check failed!
-		CGAL_qpe_debug {
-		    this->vout() << 
-		      "--> exact check of entering variable failed!"
-		      << std::endl;
-		}
-
-		// reject entering variable
-		min_j = -1;
-		min_mu = this->nt0;
-	    }
-	} else {
-	    CGAL_qpe_debug {
-		this->vout() << 
-		  "--> still no entering variable found" 
-		  << std::endl;
-	    }
-	}
-    }
-
-    // certify non-existance of entering variable, if necessary
-    if ( min_j == -1) {
-
-	// update row and column maxima
-	this->update_maxima();
-
-	// loop over all non-basic variables again
-	for ( it = this->active_set_begin(); 
-	      it != this->inactive_set_end(); ++it) {
-
-	    // don't price artificial variables
-	    if (this->solver().is_artificial( *it)) continue;
-
-	    if ( ! this->certify_mu_j_NT( *it)) {
-
-		// entering variable missed by inexact arithmetic
-	      min_j = *it;
-	      min_it = it;
-	      break;
-	    }
-	}
-    }
-    CGAL_qpe_debug { 
-      this->vout() << std::endl;
-    }
-
-    // return index of entering variable, if any
-    if ( min_j >= 0) {
-      CGAL_qpe_assertion(min_j == *min_it);
-      this->entering_basis( min_it);
-      return min_j;
-    }
-
-    // no entering variable found
-    return -1;
-}
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_QP_PARTIAL_FILTERED_PRICING_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver.h
deleted file mode 100644
index d84c96d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver.h
+++ /dev/null
@@ -1,1999 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licenseges holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Kaspar Fischer
-//               : Bernd Gaertner <gaertner at inf.ethz.ch>
-//               : Sven Schoenherr 
-//               : Franz Wessendorp 
-
-#ifndef CGAL_QP_SOLVER_H
-#define CGAL_QP_SOLVER_H
-
-#include <CGAL/iterator.h>
-#include <CGAL/QP_solver/basic.h>
-#include <CGAL/QP_solver/functors.h>
-#include <CGAL/QP_options.h>
-#include <CGAL/QP_solution.h>
-#include <CGAL/QP_solver/QP_basis_inverse.h>
-#include <CGAL/QP_solver/QP_pricing_strategy.h>
-#include <CGAL/QP_solver/QP_full_exact_pricing.h>
-#include <CGAL/QP_solver/QP_partial_exact_pricing.h>
-#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
-#include <CGAL/QP_solver/QP_partial_filtered_pricing.h>
-#include <CGAL/QP_solver/QP_exact_bland_pricing.h>
-
-#include <CGAL/algorithm.h>
-
-#include <CGAL/IO/Verbose_ostream.h>
-
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-
-#include <boost/iterator/transform_iterator.hpp>
-
-#include <vector>
-#include <numeric>
-#include <algorithm>
-
-namespace CGAL {
-
-// ==================
-// class declarations
-// ==================
-template < typename Q, typename ET, typename Tags  >
-class QP_solver;
-
-template <class ET>
-class QP_solution; 
-
-namespace QP_solver_impl {   // namespace for implemenation details
-  // --------------
-  // Tags generator
-  // --------------
-  template < typename Linear, 
-	     typename Nonnegative >
-  struct QP_tags {
-    typedef Linear                Is_linear;
-    typedef Nonnegative           Is_nonnegative;
-  };
-
-  template < class Q, class Is_linear >
-  struct D_selector {};
-
-  template <class Q>
-  struct D_selector<Q, Tag_false> // quadratic
-  {
-    typedef typename Q::D_iterator D_iterator;
-  };
-
-  template <class Q>
-  struct D_selector<Q, Tag_true> // linear
-  {
-    // dummy type, not used
-    typedef int** D_iterator;
-  };
-
-  template < class Q, class Is_nonnegative >
-  struct Bd_selector {};
-
-  template < class Q >
-  struct Bd_selector<Q, Tag_false> // nonstandard form
-  {
-    typedef typename Q::FL_iterator FL_iterator;
-    typedef typename Q::L_iterator L_iterator;
-    typedef typename Q::FU_iterator FU_iterator;
-    typedef typename Q::U_iterator U_iterator;
-  };
-
-  template < class Q >
-  struct Bd_selector<Q, Tag_true> // standard form
-  {
-    // dummy types, not used
-    typedef int* FL_iterator;
-    typedef int* L_iterator;
-    typedef int* FU_iterator;
-    typedef int* U_iterator;
-  };
-
-  // only allow filtered pricing if NT = double
-  template <typename Q, typename ET, typename Tags, typename NT>
-  struct Filtered_pricing_strategy_selector
-  {
-    typedef QP_full_exact_pricing<Q, ET, Tags> FF;
-    typedef QP_partial_exact_pricing<Q, ET, Tags> PF;
-  };
-
-  template <typename Q, typename ET, typename Tags>
-  struct Filtered_pricing_strategy_selector<Q, ET, Tags, double> 
-  {
-    typedef QP_full_filtered_pricing<Q, ET, Tags> FF;
-    typedef QP_partial_filtered_pricing<Q, ET, Tags> PF;
-  };
-
-} // end of namespace for implementation details
-
-// ================
-// class interfaces
-// ================
-
-
-template < typename Q, typename ET, typename Tags >
-class QP_solver : public QP_solver_base<ET> {
-
-public: // public types
-  typedef  QP_solver<Q, ET, Tags> Self;
-  typedef  QP_solver_base<ET> Base;
-  
-  // types from the QP
-  typedef  typename Q::A_iterator   A_iterator;
-  typedef  typename Q::B_iterator   B_iterator;
-  typedef  typename Q::C_iterator   C_iterator;
-  typedef  CGAL::Comparison_result Row_type;
-  typedef  typename Q::R_iterator Row_type_iterator;
-  
-  // the remaining types might not be present in the qp, so the
-  // following selectors generate dummy types for them 
-  typedef  typename QP_solver_impl::
-  D_selector<Q, typename Tags::Is_linear>::
-  D_iterator D_iterator;
-  typedef typename QP_solver_impl::
-  Bd_selector<Q, typename Tags::Is_nonnegative>::
-  L_iterator L_iterator;
-  typedef typename QP_solver_impl::
-  Bd_selector<Q, typename Tags::Is_nonnegative>::
-  U_iterator U_iterator;
-  typedef typename QP_solver_impl::
-  Bd_selector<Q, typename Tags::Is_nonnegative>::
-  FL_iterator FL_iterator;
-  typedef typename QP_solver_impl::
-  Bd_selector<Q, typename Tags::Is_nonnegative>::
-  FU_iterator FU_iterator;
-
-  // types from the Tags
-  typedef  typename Tags::Is_linear    Is_linear;
-  typedef  typename Tags::Is_nonnegative Is_nonnegative;
-
-  // friends
-  template <class Q_, class ET_>
-  friend bool has_linearly_independent_equations 
-  (const Q_& qp, const ET_& dummy);
-
-private: // private types
-
-  // types of original problem:
-  typedef  typename std::iterator_traits<A_iterator>::value_type  A_column;
-  typedef  typename std::iterator_traits<D_iterator>::value_type  D_row;
-  
-  typedef  typename std::iterator_traits<A_column  >::value_type  A_entry;
-  typedef  typename std::iterator_traits<B_iterator>::value_type  B_entry;
-  typedef  typename std::iterator_traits<C_iterator>::value_type  C_entry;
-  typedef  typename std::iterator_traits<D_row     >::value_type  D_entry;
-  typedef  typename std::iterator_traits<L_iterator>::value_type  L_entry;
-  typedef  typename std::iterator_traits<U_iterator>::value_type  U_entry;
-  
-  // slack columns:
-  //
-  // The following two types are used to (conceptually) add to the matrix A
-  // additional columns that model the constraints "x_s>=0" for the slack
-  // variables x_s.  Of course, we do not store the column (which is just
-  // plus/minus a unit vector), but maintain a pair (int,bool): the first
-  // entry says in which column the +-1 is and the second entry of the pair
-  // says whether it is +1 (false) or -1 (true).
-  typedef  std::pair<int,bool>        Slack_column;
-  typedef  std::vector<Slack_column>  A_slack;
-
-  // artificial columns
-  //
-  // Artificial columns that are (conceptually) added to the matrix A are
-  // handled exactly like slack columns (see above).
-  typedef  std::pair<int,bool>        Art_column;
-  typedef  std::vector<Art_column>    A_art;
-
-  // special artificial column:
-  //
-  // Also for the special artificial variable we (conceptually) add a column
-  // to A. This column contains only +-1's (but it may contain several nonzero
-  // entries).
-  typedef  std::vector<A_entry>       S_art;
-  
-  // auxiliary objective vector (i.e., the objective vector for phase I):
-  typedef  std::vector<C_entry>       C_aux;
-
-public: // export some additional types:
-  
-  typedef  typename Base::Indices     Indices; 
-  typedef  typename Base::Index_mutable_iterator   Index_iterator;
-  typedef  typename Base::Index_const_iterator     Index_const_iterator;
- 
-  // For problems in nonstandard form we also export the following type, which
-  // for an original variable will say whether it sits at is lower, upper, at
-  // its lower and upper (fixed) bound, or at zero, or whether the variable is
-  // basic:
-  enum  Bound_index  { LOWER, ZERO, UPPER, FIXED, BASIC };
-
-private:
-  typedef  std::vector<Bound_index>    Bound_index_values;
-  typedef  typename Bound_index_values::iterator
-  Bound_index_value_iterator;
-  typedef  typename Bound_index_values::const_iterator
-  Bound_index_value_const_iterator;
-  
-  // values (variables' numerators):
-  typedef  std::vector<ET>            Values;
-  typedef  typename Values::iterator  Value_iterator;
-  typedef  typename Values::const_iterator
-  Value_const_iterator;
-    
-  // access values by basic index functor:
-  typedef  CGAL::Value_by_basic_index<Value_const_iterator>
-  Value_by_basic_index;
-
-  // access to original problem by basic variable/constraint index:
-  typedef  QP_vector_accessor<A_column, false, false >  A_by_index_accessor;
-  typedef  boost::transform_iterator
-  < A_by_index_accessor,Index_const_iterator >
-  A_by_index_iterator;
-
-  // todo kf: following can be removed once we have all these (outdated)
-  // accessors removed:
-  typedef  QP_vector_accessor< B_iterator, false, false >
-  B_by_index_accessor;
-  typedef  boost::transform_iterator
-  < B_by_index_accessor, Index_const_iterator >
-  B_by_index_iterator;
-
-  typedef  QP_vector_accessor< C_iterator, false, false >
-  C_by_index_accessor;
-  typedef  boost::transform_iterator
-  <C_by_index_accessor, Index_const_iterator >
-  C_by_index_iterator;
-
-  typedef  QP_matrix_accessor< A_iterator, false, true, false, false>
-  A_accessor;
-  typedef  boost::function1<typename A_accessor::result_type, int>
-  A_row_by_index_accessor;
-  typedef  boost::transform_iterator 
-  < A_row_by_index_accessor, Index_iterator >
-  A_row_by_index_iterator;
-
-  // Access to the matrix D sometimes converts to ET, and 
-  // sometimes retruns the original input type
-  typedef  QP_matrix_pairwise_accessor< D_iterator, ET >
-  D_pairwise_accessor;
-  typedef boost::transform_iterator 
-  < D_pairwise_accessor, Index_const_iterator>
-  D_pairwise_iterator;
-  typedef  QP_matrix_pairwise_accessor< D_iterator, D_entry >
-  D_pairwise_accessor_input_type;
-  typedef  boost::transform_iterator
-  < D_pairwise_accessor_input_type, Index_const_iterator >
-  D_pairwise_iterator_input_type;
-
-  // access to special artificial column by basic constraint index:
-  typedef  QP_vector_accessor< typename S_art::const_iterator, false, false>
-  S_by_index_accessor;
-  typedef  boost::transform_iterator
-  < S_by_index_accessor, Index_iterator >
-  S_by_index_iterator;
-  
-public:
-    
-  typedef  typename A_slack::const_iterator
-  A_slack_iterator;
-
-  typedef  typename A_art::const_iterator
-  A_artificial_iterator;
-    
-  typedef  typename C_aux::const_iterator
-  C_auxiliary_iterator;
-
-  typedef typename Base::Variable_numerator_iterator
-  Variable_numerator_iterator;
-
-  typedef  Index_const_iterator       Basic_variable_index_iterator;
-  typedef  Value_const_iterator       Basic_variable_numerator_iterator;
-  typedef  Index_const_iterator       Basic_constraint_index_iterator;
-        
-  typedef  QP_pricing_strategy<Q, ET, Tags>  Pricing_strategy;
-
-private:
-  // compile time tag for symbolic perturbation, should be moved into traits
-  // class when symbolic perturbation is to be implemented
-  Tag_false                is_perturbed;
-    
-  // some constants
-  const ET                 et0, et1, et2;
-
-  // verbose output streams
-  mutable Verbose_ostream  vout;      // used for any  diagnostic output
-  mutable Verbose_ostream  vout1;     // used for some diagnostic output
-  mutable Verbose_ostream  vout2;     // used for more diagnostic output
-  mutable Verbose_ostream  vout3;     // used for full diagnostic output
-  mutable Verbose_ostream  vout4;     // used for output of basis inverse
-  mutable Verbose_ostream  vout5;     // used for output of validity tests
-    
-  // pricing strategy
-  Pricing_strategy*        strategyP;
-
-  // given QP
-  int                      qp_n;      // number of variables
-  int                      qp_m;      // number of constraints
-    
-  // min x^T D x + c^T x + c0
-  A_iterator               qp_A;      // constraint matrix
-  B_iterator               qp_b;      // right-hand-side vector
-  C_iterator               qp_c;      // objective vector
-  C_entry                  qp_c0;     // constant term in objective function
-  // attention: qp_D represents *twice* the matrix D
-  D_iterator               qp_D;      // objective matrix
-  Row_type_iterator        qp_r;      // row-types of constraints
-  FL_iterator              qp_fl;     // lower bound finiteness vector
-  L_iterator               qp_l;      // lower bound vector
-  FU_iterator              qp_fu;     // upper bound finiteness vector
-  U_iterator               qp_u;      // upper bound vector
-
-  A_slack                  slack_A;   // slack part of constraint matrix
-
-  // auxiliary problem    
-  A_art                    art_A;     // artificial part of constraint matrix
-  // Note: in phase I there is an
-  // additional "fake" column attached
-  // to this "matrix", see init_basis()
-
-  S_art                    art_s;     // special artificial column for slacks
-  int                      art_s_i;   // art_s_i>=0  -> index of special
-  //                artificial column
-  // art_s_i==-1 -> no sp. art. col
-  // art_s_i==-2 -> sp. art. col removed
-  //                after it left basis 
-  int                      art_basic; // number of basic artificial variables
-  C_aux                    aux_c;     // objective function for phase I
-  // initially has the same size as A_art
-
-  Indices                  B_O;       // basis (original variables)
-  // Note: the size of B_O is always
-  // correct, i.e., equals the number of
-  // basic original variables, plus (in
-  // phase I) the number of basic
-  // artificial variables.
-
-  Indices                  B_S;       // basis (   slack variables)
-    
-  Indices                  C;         // basic constraints ( C = E+S_N )
-  // Note: the size of C is always
-  // correct, i.e., corresponds to the
-  // size of the (conceptual) set
-  // $E\cup S_N$.
-
-  Indices                  S_B;       // nonbasic constraints ( S_B '=' B_S)
-    
-  QP_basis_inverse<ET,Is_linear>
-  inv_M_B;   // inverse of basis matrix
-
-  const ET&                d;         // reference to `inv_M_B.denominator()'
-    
-  Values                   x_B_O;     // basic variables (original)
-  // Note: x_B_O is only enlarged,
-  // so its size need not be |B|.
-
-  Values                   x_B_S;     // basic variables (slack)
-  Values                   lambda;    // lambda (from KKT conditions)
-  Bound_index_values       x_O_v_i;   // bounds value index vector
-  // the following vectors are updated
-  // with each update in order to avoid
-  // evaluating a matrix vector
-  // multiplication
-  Values                   r_C;       // r_C = A_{C,N_O}x_{N_O}
-  // Note: r_C.size() == C.size().
-
-  Values                   r_S_B;     // r_S_B = A_{S_B,N_O}x_{N_O}
-
-  // The following to variables are initialized (if used at all) in
-  // transition().  They are not used in case Is_linear or
-  // Is_nonnegative is set to Tag_true.
-  Values                   r_B_O;     // r_B_O = 2D_{B_O,N_O}x_{N_O}
-  Values                   w;         // w = 2D_{O, N_O}x_{N_O}
-    
-  int                      m_phase;   // phase of the Simplex method
-  Quadratic_program_status                   m_status;  // status of last pivot step
-  int                      m_pivots;  // number of pivot steps
-    
-  bool                     is_phaseI; // flag indicating phase I
-  bool                     is_phaseII;// flag indicating phase II
-  bool                     is_RTS_transition; // flag indicating transition
-  // from Ratio Test Step1 to Ratio
-  // Test Step2                                           
-  const bool               is_LP;     // flag indicating a linear program
-  const bool               is_QP;     // flag indicating a quadratic program
-
-  // the following flag indicates whether the program is in equational form
-  // AND still has all its equations; this is given in phase I for any
-  // program in equational form, but it may change if redundant constraints
-  // get removed from the basis. If no_ineq == true, the program is treated
-  // in a more efficient manner, since in that case we need no bookkeeping 
-  // for basic constraints
-  bool                     no_ineq;   
-  bool                     has_ineq;  // !no_ineq
-
-  const bool               is_nonnegative; // standard form, from Tag
-
-  // additional variables
-  int                      l;         // minimum of 'qp_n+e+1' and 'qp_m'
-  // Note: this is an upper bound for
-  // the size of the reduced basis in
-  // phase I (in phase II, the reduced
-  // basis size can be arbitrarily
-  // large)
-    
-  int 		     e;         // number of equality constraints
-    
-  // Given a variable number i, in_B[i] is -1 iff x_i is not in the current
-  // basis.  If the number in_B[i] is >=0, it is the basis heading of x_i.
-  Indices                  in_B;      // variable   in basis, -1 if non-basic
-
-  // Given a number i in {0,...,qp_m-1} of a constraint, 
-  Indices                  in_C;      // constraint in basis, -1 if non-basic
-  // Note: in_C is only maintained if
-  // there are inequality constraints.
-
-  Values                   b_C;       // exact version of `qp_b'
-  // restricted to basic constraints C
-  Values                   minus_c_B; // exact version of `-qp_c'
-  // restricted to basic variables B_O
-  // Note: minus_c_B is only enlarged,
-  // so its size need not be |B|.
-
-  Values                   A_Cj;      // exact version of j-th column of A
-  // restricted to basic constraints C
-  Values                   two_D_Bj;  // exact version of twice the j-th
-  // column of D restricted to B_O
-  // Note: tmp_x_2 is only enlarged,
-  // so its size need not be |B|.
-    
-  int                      j;         // index of entering variable `x_j'
-    
-  int                      i;         // index of leaving variable `x_i'
-  ET                       x_i;       // numerator of leaving variable `x_i'
-  ET                       q_i;       // corresponding `q_i'
-  int                      direction; // indicates whether the current
-  // entering variable x_j is increased
-  // or decreased
-  Bound_index              ratio_test_bound_index;  // indicates for leaving
-  // original variables which bound
-  // was hit with upper bounding
-
-  ET                       mu;        //   numerator of `t_j'
-  ET                       nu;        // denominator of `t_j'
-    
-  Values                   q_lambda;  // length dependent on C
-  Values                   q_x_O;     // used in the ratio test & update
-  // Note: q_x_O is only enlarged,
-  // so its size need not be |B|.
-
-  Values                   q_x_S;     // 
-
-  Values                   tmp_l;     // temporary vector of size l
-  Values                   tmp_x;     // temporary vector of s. >= B_O.size()
-  // Note: tmp_x is only enlarged,
-  // so its size need not be |B|.
-
-  Values                   tmp_l_2;   // temporary vector of size l
-  Values                   tmp_x_2;   // temporary vector of s. >= B_O.size()
-  // Note: tmp_x_2 is only enlarged,
-  // so its size need not be |B|.
-  // Diagnostics
-  struct Diagnostics {
-    bool redundant_equations;
-  };
-    
-  Diagnostics              diagnostics;
-
-public:
-
-  /*
-   * Note: Some member functions below are suffixed with '_'.
-   * They are member templates and their declaration is "hidden",
-   * because they are also implemented in the class interface.
-   * This is a workaround for M$-VC++, which otherwise fails to
-   * instantiate them correctly.
-   */
-
-  // creation & initialization
-  // -------------------------
-  // creation
-  QP_solver(const Q& qp, 
-	    const Quadratic_program_options& options = 
-	    Quadratic_program_options());
-
-  virtual ~QP_solver()
-  {
-    if (strategyP != static_cast<Pricing_strategy*>(0))
-      delete strategyP;
-  }
-
-	      
-private:
-  // set-up of QP
-  void set( const Q& qp); 
-  void set_D (const Q& qp, Tag_true is_linear);
-  void set_D (const Q& qp, Tag_false is_linear);
-	         
-  // set-up of explicit bounds
-  void set_explicit_bounds(const Q& qp); 
-  void set_explicit_bounds(const Q& qp, Tag_true /*is_nonnegative*/); 
-  void set_explicit_bounds(const Q& qp, Tag_false /*is_nonnegative*/);
-
-  // initialization (of phase I)
-  void  init( );
-    
-  // initialization (of phase II)
-  /*
-    template < class InputIterator >
-    void  init( InputIterator  basic_variables_first,
-    InputIterator  basic_variables_beyond);
-  */
-    
-  // operations
-  // ----------
-  // pivot step
-  Quadratic_program_status  pivot( )
-  { CGAL_qpe_assertion( phase() > 0);
-  CGAL_qpe_assertion( phase() < 3);
-  pivot_step();
-  return status(); }
-
-  // solve QP
-  Quadratic_program_status  solve( )
-  { CGAL_qpe_assertion( phase() > 0);
-  while ( phase() < 3) { pivot_step(); }
-  return status(); }
-
-public:
-
-  // access
-  // ------
-  // access to QP
-  int  number_of_variables  ( ) const { return qp_n; }
-  int  number_of_constraints( ) const { return qp_m; }
-    
-  A_iterator  a_begin( ) const { return qp_A;      }
-  A_iterator  a_end  ( ) const { return qp_A+qp_n; }
-    
-  B_iterator  b_begin( ) const { return qp_b;      }
-  B_iterator  b_end  ( ) const { return qp_b+qp_m; }
-    
-  C_iterator  c_begin( ) const { return qp_c;      }
-  C_iterator  c_end  ( ) const { return qp_c+qp_n; }
-
-  C_entry     c_0    ( ) const { return qp_c0;}
-    
-  D_iterator  d_begin( ) const { return qp_D;      }
-  D_iterator  d_end  ( ) const { return qp_D+qp_n; }
-    
-  Row_type_iterator  row_type_begin( ) const { return qp_r;      }
-  Row_type_iterator  row_type_end  ( ) const { return qp_r+qp_m; }
-
-  // access to current status
-  int     phase     ( ) const { return m_phase;  }
-  Quadratic_program_status  status    ( ) const { return m_status; }
-  int     iterations( ) const { return m_pivots; }
-    
-  // access to common denominator
-  const ET& variables_common_denominator( ) const 
-  { 
-    CGAL_qpe_assertion (d > 0);
-    return d; 
-  }
-
-  // access to current solution
-  ET  solution_numerator( ) const;
-
-  // access to current solution
-  ET  solution_denominator( ) const { return et2*d*d; }
-    
-  // access to original variables
-  int  number_of_original_variables( ) const { return qp_n; }
-    
-  // access to slack variables
-  int  number_of_slack_variables( ) const { return static_cast<int>(slack_A.size()); }
-
-  // access to artificial variables
-  int  number_of_artificial_variables( ) const { return static_cast<int>(art_A.size()); }
-    
-  C_auxiliary_iterator
-  c_auxiliary_value_iterator_begin( ) const { return aux_c.begin(); }
-  C_auxiliary_iterator
-  c_auxiliary_value_iterator_end( ) const {return aux_c.end(); }
-
-  // access to basic variables
-  int  number_of_basic_variables( ) const { return static_cast<int>(B_O.size()+B_S.size()); }
-  int  number_of_basic_original_variables( ) const { return static_cast<int>(B_O.size()); }
-  int  number_of_basic_slack_variables( ) const { return static_cast<int>(B_S.size()); }
-
-  Basic_variable_index_iterator
-  basic_original_variable_indices_begin( ) const { return B_O.begin(); }
-  Basic_variable_index_iterator
-  basic_original_variable_indices_end  ( ) const { return B_O.end(); }
-    
-  Basic_variable_numerator_iterator
-  basic_original_variables_numerator_begin( ) const { return x_B_O.begin(); }
-  Basic_variable_numerator_iterator
-  basic_original_variables_numerator_end  ( ) const { return x_B_O.begin()
-							+ B_O.size(); }
-
-public: // only the pricing strategies (including user-defined ones
-        // need access to this) -- make them friends?
-
-  // access to working variables
-  int  number_of_working_variables( ) const { return static_cast<int>(in_B.size()); }
-  
-  bool is_basic( int j) const
-  { 
-    CGAL_qpe_assertion(j >= 0);
-    CGAL_qpe_assertion(j < number_of_working_variables());
-    return (in_B[ j] >= 0);
-  }
-  
-  bool is_original(int j) const
-  {
-    CGAL_qpe_assertion(j >= 0);
-    CGAL_qpe_assertion(j < number_of_working_variables());
-    return (j < qp_n);    
-  }
-    
-  bool phaseI( ) const {return is_phaseI;}
-  
-  bool is_artificial(int k) const;
-
-  int get_l() const;
-
-  // Returns w[j] for an original variable x_j.
-  ET w_j_numerator(int j) const
-  { 
-    CGAL_qpe_assertion((0 <= j) && (j < qp_n) && is_phaseII);
-    return w[j];
-  }
-  
-  Bound_index nonbasic_original_variable_bound_index(int i) const
-    // Returns on which bound the nonbasic variable x_i is currently
-    // sitting:
-    //
-    // - LOWER: the variable is sitting on its lower bound.
-    // - UPPER: the variable is sitting on its upper bound.
-    // - FIXED: the variable is sitting on its lower and upper bound.
-    // - ZERO: the variable has value zero and is sitting on its lower
-    //   bound, its upper bound, or betweeen the two bounds.
-    //
-    // Note: in the latter case you can call state_of_zero_nonbasic_variable()
-    // to find out which bound is active, if any.
-  {
-    CGAL_assertion(!check_tag(Is_nonnegative()) &&
-		   !is_basic(i) && i < qp_n);
-    if (x_O_v_i[i] == BASIC) {
-      CGAL_qpe_assertion(false);
-    }
-    return x_O_v_i[i];  
-  };
-  
-  int state_of_zero_nonbasic_variable(int i) const
-    // Returns -1 if the original variable x_i equals its lower bound,
-    // 0 if it lies strictly between its lower and upper bound, and 1 if
-    // it coincides with its upper bound.
-    // 
-    // See also the documentation of nonbasic_original_variable_bound_index()
-    // above.
-  {
-    CGAL_assertion(!check_tag(Is_nonnegative()) &&
-		   !is_basic(i) && i < qp_n && x_O_v_i[i] == ZERO);
-    if (*(qp_fl+i) && CGAL::is_zero(*(qp_l+i)))
-      return -1;
-    if (*(qp_fu+i) && CGAL::is_zero(*(qp_u+i)))
-      return 1;
-    return 0;
-  }
-  
-private:
-  // miscellaneous
-  // -------------
-  // setting the pricing strategy:
-  void  set_pricing_strategy ( Quadratic_program_pricing_strategy strategy);
-
-  // diagnostic output
-  void  set_verbosity( int verbose = 0, std::ostream& stream = std::cout);
-
-
-public:
-  // access to indices of basic constraints
-  int  number_of_basic_constraints( ) const { return static_cast<int>(C.size()); }
-
-  Basic_constraint_index_iterator
-  basic_constraint_indices_begin( ) const { return C.begin(); }
-  Basic_constraint_index_iterator
-  basic_constraint_indices_end  ( ) const { return C.end(); }
-
-  // helper functions
-  template < class RndAccIt1, class RndAccIt2, class NT >  
-  NT  mu_j_( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& dd) const;
-
-  ET  dual_variable( int i)
-  {
-    for ( int j = 0; j < qp_m; ++j) {
-      tmp_x[ j] = inv_M_B.entry( j, i);
-    }
-    return std::inner_product( tmp_x.begin(), tmp_x.begin()+qp_m,
-			       minus_c_B.begin(), et0);
-  }
-
-public:
-  // public access to compressed lambda (used in filtered base)
-  Value_const_iterator get_lambda_begin() const
-  {
-    return lambda.begin();
-  }
-  Value_const_iterator get_lambda_end() const
-  {
-    return lambda.begin() + C.size();
-  }
-  
-
-private:    
-
-  // private member functions
-  // ------------------------
-  // initialization
-  void  init_basis( );
-  void  init_basis__slack_variables( int s_i, Tag_true  has_no_inequalities);
-  void  init_basis__slack_variables( int s_i, Tag_false has_no_inequalities);
-  void  init_basis__slack_variables( int s_i, bool has_no_inequalities) {
-    if (has_no_inequalities)
-      init_basis__slack_variables (s_i, Tag_true());
-    else 
-      init_basis__slack_variables (s_i, Tag_false());
-  }
-
-  void  init_basis__constraints    ( int s_i, Tag_true  has_no_inequalities);
-  void  init_basis__constraints    ( int s_i, Tag_false has_no_inequalities);
-  void  init_basis__constraints    ( int s_i, bool has_no_inequalities) {
-    if (has_no_inequalities)
-      init_basis__constraints (s_i, Tag_true());
-    else 
-      init_basis__constraints (s_i, Tag_false());
-  }
-
-  void  init_x_O_v_i();
-  void  init_r_C(Tag_true  /*is_nonnegative*/);
-  void  init_r_C(Tag_false /*is_nonnegative*/);
-  void  init_r_S_B(Tag_true  /*is_nonnegative*/);
-  void  init_r_S_B(Tag_false /*is_nonnegative*/);
-
-  void  init_r_B_O();
-  void  init_w();
-
-
-  void  init_solution( );
-  void  init_solution__b_C( Tag_true  has_no_inequalities);
-  void  init_solution__b_C( Tag_false has_no_inequalities); 
-  void  init_solution__b_C( bool has_no_inequalities) {
-    if (has_no_inequalities)
-      init_solution__b_C (Tag_true());
-    else
-      init_solution__b_C (Tag_false());
-  }
-
-  void  init_additional_data_members( );
-    
-  // function needed for set up of auxiliary problem for symbolic perturbation
-  int  signed_leading_exponent( int row);
-  // This is a variant of set_up_auxiliary_problem for symbolic perturbation
-  // for the perturbed case
-  void  set_up_auxiliary_problemI( Tag_true is_perturbed);
-
-  void  set_up_auxiliary_problem();
-
-  // transition (to phase II)
-  void  transition( );
-  void  transition( Tag_true  is_linear);
-  void  transition( Tag_false is_linear);
-    
-  // pivot step
-  void  pivot_step( );
-
-  // pricing
-  void  pricing( );
-
-  template < class NT, class It >
-  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
-			    Tag_true  has_no_inequalities) const;
-  template < class NT, class It >
-  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
-			    Tag_false has_no_inequalities) const;
-  template < class NT, class It >
-  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
-			    bool has_no_inequalities) const {
-    if (has_no_inequalities)
-      mu_j__linear_part_ (mu_j, j, lambda_it, Tag_true());
-    else
-      mu_j__linear_part_ (mu_j, j, lambda_it, Tag_false());
-  }
-
-
-//   template < class NT, class It >
-//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
-// 			       Tag_true  is_linear) const;
-//   template < class NT, class It >
-//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
-// 			       Tag_false is_linear) const;
-//   template < class NT, class It >
-//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
-// 			       Tag_false is_linear,
-// 			       Tag_true  is_symmetric) const;
-//   template < class NT, class It >
-//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
-// 			       Tag_false is_linear,
-// 			       Tag_false is_symmetric) const;
-
-  template < class NT, class It >
-  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it, 
-				    const NT& dd,
-				    Tag_true  has_no_inequalities) const;
-  template < class NT, class It >
-  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it, 
-				    const NT& dd,
-				    Tag_false has_no_inequalities) const;
-
-  template < class NT, class It >
-  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it,
-				    const NT& dd,
-				    bool has_no_inequalities) const {
-    if (has_no_inequalities)
-      mu_j__slack_or_artificial_ (mu_j, j, lambda_it, dd, Tag_true());
-    else
-      mu_j__slack_or_artificial_ (mu_j, j, lambda_it, dd, Tag_false());
-  }
-
-  // ratio test
-  void  ratio_test_init( );
-  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
-			       Tag_true  has_no_inequalities);
-  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
-			       Tag_false has_no_inequalities);
-  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
-			       bool has_no_inequalities) {
-    if (has_no_inequalities) 
-      ratio_test_init__A_Cj (A_Cj_it, j, Tag_true());
-    else
-      ratio_test_init__A_Cj (A_Cj_it, j, Tag_false());
-  }
-
-  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
-				 Tag_true  is_linear);
-  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
-				 Tag_false is_linear);
-  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
-				 Tag_false is_linear,
-				 Tag_true  has_no_inequalities);
-  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
-				 Tag_false is_linear,
-				 Tag_false has_no_inequalities);
-  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
-				 Tag_false is_linear,
-				 bool has_no_inequalities) {
-    if (has_no_inequalities)
-      ratio_test_init__2_D_Bj( two_D_Bj_it, j, is_linear, Tag_true());
-    else
-      ratio_test_init__2_D_Bj( two_D_Bj_it, j, is_linear, Tag_false());
-  }
-
-
-  void  ratio_test_1( );
-  void  ratio_test_1__q_x_O( Tag_true  is_linear);
-  void  ratio_test_1__q_x_O( Tag_false is_linear);
-  void  ratio_test_1__q_x_S( Tag_true  has_no_inequalities);
-  void  ratio_test_1__q_x_S( Tag_false has_no_inequalities);
-  void  ratio_test_1__q_x_S( bool has_no_inequalities) {
-    if (has_no_inequalities)
-      ratio_test_1__q_x_S (Tag_true());
-    else
-      ratio_test_1__q_x_S (Tag_false());
-  }
-
-  void  ratio_test_1__t_min_j(Tag_true  /*is_nonnegative*/);  
-  void  ratio_test_1__t_min_j(Tag_false /*is_nonnegative*/);
-    
-  void  ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
-			   Value_iterator x_it, Value_iterator   q_it,
-			   Tag_true  no_check);
-  void  ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
-			   Value_iterator x_it, Value_iterator   q_it,
-			   Tag_false  no_check);
-    
-  // replaces the above two functions
-  void  ratio_test_1__t_min_B(Tag_true has_no_inequalities );
-  void  ratio_test_1__t_min_B(Tag_false has_no_inequalities ); 
-  void  ratio_test_1__t_min_B(bool has_no_inequalities ) {
-    if (has_no_inequalities)
-      ratio_test_1__t_min_B (Tag_true());
-    else
-      ratio_test_1__t_min_B (Tag_false());
-  }
-   
-  void  ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
-			      Value_iterator x_it, Value_iterator q_it,
-			      Tag_true  /*is_nonnegative*/);
-  void  ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
-			      Value_iterator x_it, Value_iterator q_it,
-			      Tag_false /*is_nonnegative*/);
-  void  ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
-			      Value_iterator x_it, Value_iterator q_it,
-			      Tag_true  /*is_nonnegative*/);
-  void  ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
-			      Value_iterator x_it, Value_iterator q_it,
-			      Tag_false /*is_nonnegative*/);
-			     
-  void  test_implicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-				     int& i_min, ET& d_min, ET& q_min);
-  void  test_implicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-				     int& i_min, ET& d_min, ET& q_min);
-  void  test_explicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-				     int& i_min, ET& d_min, ET& q_min);
-  void  test_explicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-				     int& i_min, ET& d_min, ET& q_min);
-  void  test_mixed_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-				  int& i_min, ET& d_min, ET& q_min);
-  void  test_mixed_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-				  int& i_min, ET& d_min, ET& q_min);    
-                                    
-  void  ratio_test_1__t_j( Tag_true  is_linear);
-  void  ratio_test_1__t_j( Tag_false is_linear);
-
-  void  ratio_test_2( Tag_true  is_linear);
-  void  ratio_test_2( Tag_false is_linear);
-  void  ratio_test_2__p( Tag_true  has_no_inequalities);
-  void  ratio_test_2__p( Tag_false has_no_inequalities);   
-  void  ratio_test_2__p( bool has_no_inequalities) {
-    if (has_no_inequalities)
-      ratio_test_2__p (Tag_true());
-    else
-      ratio_test_2__p (Tag_false());
-  }
-
-  // update
-  void  update_1( );
-  void  update_1( Tag_true  is_linear);
-  void  update_1( Tag_false is_linear);
-
-  void  update_2( Tag_true  is_linear);
-  void  update_2( Tag_false is_linear);
-
-  void  replace_variable( );
-  void  replace_variable( Tag_true  has_no_inequalities);
-  void  replace_variable( Tag_false has_no_inequalities);
-  void  replace_variable( bool has_no_inequalities) {
-    if (has_no_inequalities)
-      replace_variable (Tag_true());
-    else
-      replace_variable (Tag_false());
-  }
-
-  void  replace_variable_original_original( );
-  // update of the vector r
-  void  replace_variable_original_original_upd_r(Tag_true
-						 /*is_nonnegative*/);
-  void  replace_variable_original_original_upd_r(Tag_false
-						 /*is_nonnegative*/);
-
-  void  replace_variable_original_slack( );
-  // update of the vector r
-  void  replace_variable_original_slack_upd_r(Tag_true /*is_nonnegative*/);
-  void  replace_variable_original_slack_upd_r(Tag_false /*is_nonnegative*/);
-
-  void  replace_variable_slack_original( );
-  // update of the vector r
-  void  replace_variable_slack_original_upd_r(Tag_true /*is_nonnegative*/);
-  void  replace_variable_slack_original_upd_r(Tag_false /*is_nonnegative*/);
-    
-  void  replace_variable_slack_slack( );
-  // update of the vector r
-  void  replace_variable_slack_slack_upd_r(Tag_true /*is_nonnegative*/);
-  void  replace_variable_slack_slack_upd_r(Tag_false /*is_nonnegative*/);
-    
-  void  remove_artificial_variable_and_constraint( );
-  // update of the vector r
-  void  remove_artificial_variable_and_constraint_upd_r(Tag_true
-							/*is_nonnegative*/);
-  void  remove_artificial_variable_and_constraint_upd_r(Tag_false
-							/*is_nonnegative*/);    
-    
-  void  expel_artificial_variables_from_basis( );
-    
-  // update that occurs only with upper bounding in ratio test step 1
-  void  enter_and_leave_variable( );
-
-  void  enter_variable( );
-  // update of the vectors w and r
-  void  enter_variable_original_upd_w_r(Tag_true /*is_nonnegative*/);
-  void  enter_variable_original_upd_w_r(Tag_false /*is_nonnegative*/);
-  void  enter_variable_slack_upd_w_r(Tag_true /*is_nonnegative*/);
-  void  enter_variable_slack_upd_w_r(Tag_false /*is_nonnegative*/);
-    
-  void  leave_variable( );
-  // update of the vectors w and r
-  void  leave_variable_original_upd_w_r(Tag_true /*is_nonnegative*/);    
-  void  leave_variable_original_upd_w_r(Tag_false /*is_nonnegative*/);
-  void  leave_variable_slack_upd_w_r(Tag_true /*is_nonnegative*/);
-  void  leave_variable_slack_upd_w_r(Tag_false /*is_nonnegative*/);
-    
-  void  z_replace_variable( );
-  void  z_replace_variable( Tag_true has_no_inequalities);
-  void  z_replace_variable( Tag_false has_no_inequalities);
-  void  z_replace_variable( bool has_no_inequalities) {
-    if (has_no_inequalities) 
-      z_replace_variable (Tag_true());
-    else
-      z_replace_variable (Tag_false());
-  }
-    
-  void  z_replace_variable_original_by_original( );
-  // update of the vectors w and r
-  void  z_replace_variable_original_by_original_upd_w_r(Tag_true 
-							/*is_nonnegative*/);
-  void  z_replace_variable_original_by_original_upd_w_r(Tag_false 
-							/*is_nonnegative*/);
-    
-  void  z_replace_variable_original_by_slack( );
-  // update of the vectors w and r    
-  void  z_replace_variable_original_by_slack_upd_w_r(Tag_true 
-						     /*is_nonnegative*/);
-  void  z_replace_variable_original_by_slack_upd_w_r(Tag_false
-						     /*is_nonnegative*/);
-    
-  void  z_replace_variable_slack_by_original( );
-  // update of the vectors w and r
-  void  z_replace_variable_slack_by_original_upd_w_r(Tag_true
-						     /*is_nonnegative*/);
-  void  z_replace_variable_slack_by_original_upd_w_r(Tag_false
-						     /*is_nonnegative*/);
-    
-  void  z_replace_variable_slack_by_slack( );
-  // update of the vectors w and r
-  void  z_replace_variable_slack_by_slack_upd_w_r(Tag_true
-						  /*is_nonnegative*/);
-  void  z_replace_variable_slack_by_slack_upd_w_r(Tag_false
-						  /*is_nonnegative*/);
-    
-  // update of the parts r_C and r_S_B
-  void  update_r_C_r_S_B__j(ET& x_j);
-  void  update_r_C_r_S_B__j_i(ET& x_j, ET& x_i);
-  void  update_r_C_r_S_B__i(ET& x_i);
-    
-  // update of w and r_B_O 
-  void  update_w_r_B_O__j(ET& x_j);
-  void  update_w_r_B_O__j_i(ET& x_j, ET& x_i);
-  void  update_w_r_B_O__i(ET& x_i);
-    
-    
-  bool  basis_matrix_stays_regular( );
-
-  // current solution
-  void  compute_solution(Tag_true  /*is_nonnegative*/);
-  void  compute_solution(Tag_false /*is_nonnegative*/);
-
-  void  compute__x_B_S( Tag_false  has_no_inequalities,
-			Tag_false /*is_nonnegative*/);
-  void  compute__x_B_S( Tag_false  has_no_inequalities,
-			Tag_true  /*is_nonnegative*/);
-  void  compute__x_B_S( Tag_true  has_no_inequalities,
-			Tag_false /*is_nonnegative*/);
-  void  compute__x_B_S( Tag_true  has_no_inequalities,
-			Tag_true  /*is_nonnegative*/);
-  void  compute__x_B_S( bool  has_no_inequalities,
-			Tag_true  is_nonnegative) {
-    if (has_no_inequalities)
-      compute__x_B_S (Tag_true(), is_nonnegative);
-    else
-      compute__x_B_S (Tag_false(), is_nonnegative);
-  }
-    
-  void  compute__x_B_S( bool  has_no_inequalities,
-			Tag_false  is_nonnegative) {
-    if (has_no_inequalities)
-      compute__x_B_S (Tag_true(), is_nonnegative);
-    else
-      compute__x_B_S (Tag_false(), is_nonnegative);
-  }  
-
-  void  multiply__A_S_BxB_O( Value_iterator in, Value_iterator out) const;
-    
-  ET    multiply__A_ixO(int row) const;
-  void  multiply__A_CxN_O(Value_iterator out) const;
-  bool  check_r_C(Tag_true  /*is_nonnegative*/) const;
-  bool  check_r_C(Tag_false /*is_nonnegative*/) const;
-    
-  void  multiply__A_S_BxN_O(Value_iterator out) const;
-  bool  check_r_S_B(Tag_true  /*is_nonnegative*/) const;
-  bool  check_r_S_B(Tag_false /*is_nonnegative*/) const;
-    
-  void  multiply__2D_B_OxN_O(Value_iterator out) const;
-  bool  check_r_B_O(Tag_true  /*is_nonnegative*/) const;
-  bool  check_r_B_O(Tag_false /*is_nonnegative*/) const;
-        
-  void  multiply__2D_OxN_O(Value_iterator out) const;
-  bool  check_w(Tag_true  /*is_nonnegative*/) const;
-  bool  check_w(Tag_false /*is_nonnegative*/) const;
-    
-  // utility routines for QP's in nonstandard form:
-  ET original_variable_value_under_bounds(int i) const;
-  ET nonbasic_original_variable_value (int i) const;
-
-public: 
-  // for original variables
-  ET variable_numerator_value(int i) const;
-  ET unbounded_direction_value(int i) const;
-  ET lambda_numerator(int i) const
-  {
-    // we use the vector lambda which conforms to C (basic constraints)
-    CGAL_qpe_assertion (i >= 0);
-    CGAL_qpe_assertion (i <= qp_m);
-    if (no_ineq)
-      return lambda[i];
-    else {
-      int k = in_C[i];     // position of i in C
-      if (k != -1) 
-	return lambda[k];
-      else 
-	return et0;
-    }   
-}
-
-private:
-  // check basis inverse
-  bool  check_basis_inverse( );
-  bool  check_basis_inverse( Tag_true  is_linear);
-  bool  check_basis_inverse( Tag_false is_linear);
-
-  // diagnostic output
-  void  print_program ( ) const;
-  void  print_basis   ( ) const;
-  void  print_solution( ) const;
-  void  print_ratio_1_original(int k, const ET& x_k, const ET& q_k);
-  void  print_ratio_1_slack(int k, const ET& x_k, const ET& q_k);
-
-  const char*  variable_type( int k) const;
-    
-  // ensure container size
-  template <class Container>
-  void ensure_size(Container& c, typename Container::size_type desired_size) {
-    typedef typename Container::value_type Value_type;
-    for (typename Container::size_type i=c.size(); i < desired_size; ++i) {
-      c.push_back(Value_type());
-    }
-  }
-    
-private:
-
-private:  // (inefficient) access to bounds of variables:
-  // Given an index of an original or slack variable, returns whether
-  // or not the variable has a finite lower bound.
-  bool has_finite_lower_bound(int i) const;
-
-  // Given an index of an original or slack variable, returns whether
-  // or not the variable has a finite upper bound.
-  bool has_finite_upper_bound(int i) const;
-
-  // Given an index of an original or slack variable, returns its
-  // lower bound.
-  ET lower_bound(int i) const;
-
-  // Given an index of an original variable, returns its upper bound.
-  ET upper_bound(int i) const;
-
-  struct Bnd { // (inefficient) utility class representing a possibly
-    // infinite bound
-    enum Kind { MINUS_INF=-1, FINITE=0, PLUS_INF=1 };
-    const Kind kind;      // whether the bound is finite or not
-    const ET value;       // bound's value in case it is finite
-
-    Bnd(bool is_upper, bool is_finite, const ET& value) 
-      : kind(is_upper? (is_finite? FINITE : PLUS_INF) :
-	     (is_finite? FINITE : MINUS_INF)),
-	value(value) {}
-    Bnd(Kind kind, const ET& value) : kind(kind), value(value) {}
-    
-    bool operator==(const ET& v) const { return kind == FINITE && value == v; }
-    bool operator==(const Bnd& b) const {
-      return kind == b.kind && (kind != FINITE || value == b.value);
-    }
-    bool operator!=(const Bnd& b) const { return !(*this == b); }
-    bool operator<(const ET& v) const { return kind == FINITE && value < v; }
-    bool operator<(const Bnd& b) const {
-      return kind < b.kind ||
-	(kind == b.kind && kind == FINITE && value < b.value);
-    }
-    bool operator<=(const Bnd& b) const { return *this < b || *this == b; }
-    bool operator>(const ET& v) const { return kind == FINITE && value > v; }
-    bool operator>(const Bnd& b)  const { return !(*this <= b); }
-    bool operator>=(const Bnd& b) const { return !(*this < b); }
-    
-    Bnd operator*(const ET& f) const { return Bnd(kind, value*f); }
-  };
-
-  // Given an index of an original, slack, or artificial variable,
-  // return its lower bound.
-  Bnd lower_bnd(int i) const;
-
-  // Given an index of an original, slack, or artificial variable,
-  // return its upper bound.
-  Bnd upper_bnd(int i) const;
-
-private:
-  bool is_value_correct() const;
-  // ----------------------------------------------------------------------------
-
-  // ===============================
-  // class implementation (template)
-  // ===============================
-
-public:
-
-  // pricing
-  // -------
-  // The solver provides three methods to compute mu_j; the first
-  // two below take additional information (which the pricing
-  // strategy either provides in exact- or NT-form), and the third
-  // simply does the exact computation. (Note: internally, we use
-  // the third version, too, see ratio_test_1__t_j().)
-
-  // computation of mu_j with standard form
-  template < class RndAccIt1, class RndAccIt2, class NT >  
-  NT
-  mu_j( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& dd) const
-  {
-    NT  mu_j;
-
-    if ( j < qp_n) {                                // original variable
-
-      // [c_j +] A_Cj^T * lambda_C
-      mu_j = ( is_phaseI ? NT( 0) : dd * NT(*(qp_c+ j)));
-      mu_j__linear_part( mu_j, j, lambda_it, no_ineq);
-
-      // ... + 2 D_Bj^T * x_B
-      mu_j__quadratic_part( mu_j, j, x_it, Is_linear());
-
-    } else {                                        // slack or artificial
-
-      mu_j__slack_or_artificial( mu_j, j, lambda_it, dd,
-				 no_ineq);
-
-    }
-
-    return mu_j;
-  }
-    
-  // computation of mu_j with upper bounding
-  template < class RndAccIt1, class RndAccIt2, class NT >  
-  NT
-  mu_j( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& w_j,
-	const NT& dd) const
-  {
-    NT  mu_j;
-
-    if ( j < qp_n) {                                // original variable
-
-      // [c_j +] A_Cj^T * lambda_C
-      mu_j = ( is_phaseI ? NT( 0) : dd * NT(*(qp_c+ j)));
-      mu_j__linear_part( mu_j, j, lambda_it, no_ineq);
-
-      // ... + 2 D_Bj^T * x_B + 2 D_Nj x_N
-      mu_j__quadratic_part( mu_j, j, x_it, w_j, dd, Is_linear());
-
-    } else {                                        // slack or artificial
-
-      mu_j__slack_or_artificial( mu_j, j, lambda_it, dd,
-				 no_ineq);
-
-    }
-
-    return mu_j;
-  }
-
-  // computation of mu_j (exact, both for upper bounding and standard form)
-  ET
-  mu_j( int j) const
-  {
-    CGAL_qpe_assertion(!is_basic(j));
-    
-    if (!check_tag(Is_nonnegative()) &&
-	!check_tag(Is_linear()) &&
-	!is_phaseI && is_original(j)) {
-      return mu_j(j,
-		  lambda.begin(),
-		  basic_original_variables_numerator_begin(),
-		  w_j_numerator(j),
-		  variables_common_denominator());
-    } else {
-      return mu_j(j,
-		  lambda.begin(),
-		  basic_original_variables_numerator_begin(),
-		  variables_common_denominator());
-    }
-  }
-
-private:
-
-  // pricing (private helper functions)
-  // ----------------------------------
-  template < class NT, class It > inline                      // no ineq.
-  void
-  mu_j__linear_part( NT& mu_j, int j, It lambda_it, Tag_true) const
-  {
-    mu_j += inv_M_B.inner_product_l( lambda_it, *(qp_A+ j));
-  }
-
-  template < class NT, class It > inline                      // has ineq.
-  void
-  mu_j__linear_part( NT& mu_j, int j, It lambda_it, Tag_false) const
-  {
-    mu_j += inv_M_B.inner_product_l
-      ( lambda_it,
-	A_by_index_iterator( C.begin(),
-			     A_by_index_accessor( *(qp_A + j))));
-  }
-
-  template < class NT, class It > inline                     
-  void
-  mu_j__linear_part( NT& mu_j, int j, It lambda_it, 
-		     bool has_no_inequalities) const {
-    if (has_no_inequalities) 
-      mu_j__linear_part (mu_j, j, lambda_it, Tag_true());
-    else
-      mu_j__linear_part (mu_j, j, lambda_it, Tag_false());     
-  }
-
-  template < class NT, class It > inline          // LP case, standard form
-  void
-  mu_j__quadratic_part( NT&, int, It, Tag_true) const
-  {
-    // nop
-  }
-    
-  template < class NT, class It > inline          // LP case, upper bounded
-  void
-  mu_j__quadratic_part( NT&, int, It, const NT& /*w_j*/, const NT& /*dd*/,
-			Tag_true) const
-  {
-    // nop
-  }    
-
-  template < class NT, class It > inline          // QP case, standard form
-  void
-  mu_j__quadratic_part( NT& mu_j, int j, It x_it, Tag_false) const
-  {
-    if ( is_phaseII) {
-      // 2 D_Bj^T * x_B
-      mu_j += inv_M_B.inner_product_x
-	( x_it,
-	  D_pairwise_iterator_input_type( B_O.begin(),
-			       D_pairwise_accessor_input_type(qp_D, j)));
-    }
-  }
-
-  template < class NT, class It > inline          // QP case, upper bounded
-  void
-  mu_j__quadratic_part( NT& mu_j, int j, It x_it, const NT& w_j,
-			const NT& dd, Tag_false) const
-  {
-    if ( is_phaseII) {
-      mu_j += dd * w_j;
-      // 2 D_Bj^T * x_B
-      mu_j += inv_M_B.inner_product_x
-	( x_it,
-	  D_pairwise_iterator_input_type( B_O.begin(),
-			       D_pairwise_accessor_input_type(qp_D, j)));
-    }
-  }
-
-
-  template < class NT, class It >  inline                     // no ineq.
-  void
-  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, const NT& dd, Tag_true) const
-  {
-    j -= qp_n;
-    // artificial variable
-    // A_j^T * lambda
-    mu_j = lambda_it[ j];
-    if ( art_A[ j].second) mu_j = -mu_j;
-
-    // c_j + ...
-    mu_j += dd*NT(aux_c[ j]);
-
-  }
-
-  template < class NT, class It >  inline                     // has ineq.
-  void
-  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, const NT& dd, Tag_false) const
-  {
-    j -= qp_n;
-
-    if ( j < static_cast<int>(slack_A.size())) {                 // slack variable
-
-      // A_Cj^T * lambda_C
-      mu_j = lambda_it[ in_C[ slack_A[ j].first]];
-      if ( slack_A[ j].second) mu_j = -mu_j;
-
-    } else {                                        // artificial variable
-      j -= static_cast<int>(slack_A.size());
-
-      // A_Cj^T * lambda_C
-      mu_j = lambda_it[ in_C[ art_A[ j].first]];
-      if ( art_A[ j].second) mu_j = -mu_j;
-
-      // c_j + ...
-      mu_j += dd*NT(aux_c[ j]);
-    }
-  }
-
-  template < class NT, class It >  inline
-  void
-  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, 
-			     const NT& dd, bool has_no_inequalities) const {
-    if (has_no_inequalities)
-      mu_j__slack_or_artificial (mu_j, j, lambda_it, dd, Tag_true());
-    else
-      mu_j__slack_or_artificial (mu_j, j, lambda_it, dd, Tag_false());
-  }
-
-  
-  
-};
-
-// ----------------------------------------------------------------------------
-
-// =============================
-// class implementation (inline)
-// =============================
-
-// initialization
-// --------------
-
-// transition
-// ----------
-template < class Q, typename ET, typename Tags >  inline                                 // QP case
-void  QP_solver<Q, ET, Tags>::
-transition( Tag_false)
-{
-  typedef  Creator_2< D_iterator, int, 
-    D_pairwise_accessor >  D_transition_creator_accessor;
-
-  typedef  Creator_2< Index_iterator, D_pairwise_accessor,
-    D_pairwise_iterator >  D_transition_creator_iterator;
-
-  // initialization of vector w and vector r_B_O:
-  if (!check_tag(Is_nonnegative())) {
-    init_w();                      
-    init_r_B_O();
-  }
-
-  // here is what we need in the transition: an iterator that steps through 
-  // the basic indices, where dereferencing
-  // yields an iterator through the corresponding row of D, restricted 
-  // to the basic indices. This means that we select the principal minor of D 
-  // corresponding to the current basis.
- 
-  // To realize this, we transform B_O.begin() via the function h where
-  //   h(i) = D_pairwise_iterator
-  //           (B_O.begin(), 
-  //            D_pairwise_accessor(qp_D, i))
-
-
-  inv_M_B.transition 
-    (boost::make_transform_iterator 
-     (B_O.begin(),
-      boost::bind 
-      (D_transition_creator_iterator(), B_O.begin(), 
-       boost::bind (D_transition_creator_accessor(), qp_D, _1))));
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-transition( Tag_true)
-{
-  inv_M_B.transition();
-}
-
-// ratio test
-// ----------
-template < typename Q, typename ET, typename Tags > inline                                  // LP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__2_D_Bj( Value_iterator, int, Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags > inline                                  // QP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false)
-{
-  if ( is_phaseII) {
-    ratio_test_init__2_D_Bj( two_D_Bj_it, j_,
-			     Tag_false(), no_ineq);
-  }
-}
-
-template < typename Q, typename ET, typename Tags > inline                                  // QP, no ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false,
-			 Tag_true )
-{
-  // store exact version of `2 D_{B_O,j}'
-  D_pairwise_accessor  d_accessor( qp_D, j_);
-  std::copy( D_pairwise_iterator( B_O.begin(), d_accessor),
-	     D_pairwise_iterator( B_O.end  (), d_accessor),
-	     two_D_Bj_it);
-}
-
-template < typename Q, typename ET, typename Tags > inline                                  // QP, has ineq
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false,
-			 Tag_false)
-{
-  // store exact version of `2 D_{B_O,j}'
-  if ( j_ < qp_n) {                               // original variable
-    ratio_test_init__2_D_Bj( two_D_Bj_it, j_, Tag_false(), Tag_true());
-  } else {                                        // slack variable
-    std::fill_n( two_D_Bj_it, B_O.size(), et0);
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__q_x_O( Tag_true)
-{
-  inv_M_B.multiply_x( A_Cj.begin(), q_x_O.begin());
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // QP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__q_x_O( Tag_false)
-{
-  if ( is_phaseI) {                                   // phase I
-    inv_M_B.multiply_x(     A_Cj.begin(),    q_x_O.begin());
-  } else {                                            // phase II
-    inv_M_B.multiply  (     A_Cj.begin(), two_D_Bj.begin(),
-			    q_lambda.begin(),    q_x_O.begin());
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__q_x_S( Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__q_x_S( Tag_false)
-{
-  // A_S_BxB_O * q_x_O
-  multiply__A_S_BxB_O( q_x_O.begin(), q_x_S.begin());
-
-  // ( A_S_BxB_O * q_x_O) - A_S_Bxj
-  if ( j < qp_n) {
-    std::transform( q_x_S.begin(),
-		    q_x_S.begin()+S_B.size(),
-		    A_by_index_iterator( S_B.begin(),
-					 A_by_index_accessor( *(qp_A + j))),
-		    q_x_S.begin(),
-		    compose2_2( std::minus<ET>(),
-				Identity<ET>(),
-				std::bind1st( std::multiplies<ET>(), d)));
-  }
-
-  // q_x_S = -+ ( A_S_BxB_O * q_x_O - A_S_Bxj)
-  Value_iterator  q_it = q_x_S.begin();
-  Index_iterator  i_it;
-  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++q_it) {
-    if ( ! slack_A[ *i_it - qp_n].second) *q_it = -(*q_it);
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // no check
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_i( Index_iterator, Index_iterator,
-		   Value_iterator, Value_iterator, Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // check
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
-		   Value_iterator x_it, Value_iterator   q_it, Tag_false)
-{
-  // check `t_i's
-  for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it) {
-    // BLAND rule: In case the ratios are the same, only update if the new index
-    // is smaller. The special artificial variable is always made to leave first.
-    if ( (*q_it > et0) && (
-                           (( *x_it * q_i) < ( x_i * *q_it)) ||
-                           ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
-                           )
-        ) {
-      i = *i_it; x_i = *x_it; q_i = *q_it;
-    }
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_j( Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // QP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_j( Tag_false)
-{
-  if ( is_phaseII) {
-
-    // compute `nu' and `mu_j' 
-    mu = mu_j(j);
-    nu = inv_M_B.inner_product(     A_Cj.begin(), two_D_Bj.begin(),
-				    q_lambda.begin(),    q_x_O.begin());
-    if ( j < qp_n) {                                // original variable
-      nu -= d*ET( (*(qp_D + j))[ j]);
-    }
-    CGAL_qpe_assertion_msg(nu <= et0,
-			   "nu <= et0 violated -- is your D matrix positive semidefinite?");
-
-    // check `t_j'
-    CGAL_qpe_assertion(mu != et0);
-    // bg: formula below compares abs values, assuming mu < 0
-    if ( ( nu < et0) && ( ( (mu < et0 ? mu : -mu) * q_i) > ( x_i * nu))) {
-      i = -1; q_i = et1;
-    }
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-ratio_test_2( Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_2__p( Tag_true)
-{
-  // get column index of entering variable in basis
-  int  col = in_B[ j];
- 
-  CGAL_qpe_assertion( col >= 0);
-  col += l;
-
-  // get (last) column of `M_B^{-1}' (Note: `p_...' is stored in `q_...')
-  Value_iterator  it;
-  int             row;
-  unsigned int    k;
-  for (   k = 0,            row = 0,   it = q_lambda.begin();
-	  k < C.size();
-	  ++k,              ++row,     ++it                   ) {
-    *it = inv_M_B.entry( row, col);
-  }
-  for (   k = 0,            row = l,   it = q_x_O.begin();
-	  k < B_O.size();
-	  ++k,              ++row,     ++it                   ) {
-    *it = inv_M_B.entry( row, col);
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_2__p( Tag_false)
-{
-  Value_iterator  v_it;
-  Index_iterator  i_it;
-
-  // compute 'p_lambda' and 'p_x_O' (Note: `p_...' is stored in `q_...')
-  // -------------------------------------------------------------------
-
-  // type of entering variable
-  if ( j < qp_n) {                                        // original
-
-    // use 'no_ineq' variant
-    ratio_test_2__p( Tag_true());
-
-  } else {                                                // slack
-
-    j -= qp_n;
-
-    // get column A_{S_j,B_O}^T (i.e. row of A_{S_B,B_O})
-    int             row  = slack_A[ j].first;
-    bool            sign = slack_A[ j].second;
-
-    for (   i_it =  B_O.begin(),   v_it = tmp_x.begin();
-	    i_it != B_O.end();
-	    ++i_it,                ++v_it                ) {
-      *v_it = ( sign ? 
-		*((*(qp_A+ *i_it))+ row) : - (*((*(qp_A + *i_it))+ row)));
-    }
-
-    // compute  ( p_l | p_x_O )^T = M_B^{-1} * ( 0 | A_{S_j,B_O} )^T
-    std::fill_n( tmp_l.begin(), C.size(), et0);
-    inv_M_B.multiply( tmp_l     .begin(), tmp_x  .begin(),
-		      q_lambda.begin(),   q_x_O.begin());
-
-    j += qp_n;
-  }
-
-  // compute 'p_x_S'
-  // ---------------
-  // A_S_BxB_O * p_x_O
-  multiply__A_S_BxB_O( q_x_O.begin(), q_x_S.begin());
-
-  // p_x_S = +- ( A_S_BxB_O * p_x_O)
-  for (   i_it =  B_S.begin(),   v_it = q_x_S.begin();
-	  i_it != B_S.end();
-	  ++i_it,                ++v_it                ) {
-    if ( ! slack_A[ *i_it - qp_n].second) *v_it = -(*v_it);
-  }
-}
-
-// update
-// ------
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-update_1( Tag_true)
-{
-  // replace leaving with entering variable
-  if ((i == j) && (i >= 0)) {
-    enter_and_leave_variable();
-  } else {
-    replace_variable();
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // QP case
-void  QP_solver<Q, ET, Tags>::
-update_1( Tag_false)
-{
-  if ( is_phaseI) {                                   // phase I
-
-    // replace leaving with entering variable
-    if ((i == j) && (i >= 0)) {
-      enter_and_leave_variable();
-    } else {
-      replace_variable();
-    }
-
-  } else {                                            // phase II
-        
-    if ((i == j) && (i >= 0)) {
-      enter_and_leave_variable();
-    } else {
-
-      if ( ( i >= 0) && basis_matrix_stays_regular()) {
-
-	// leave variable from basis, if
-	// - some leaving variable was found  and
-	// - basis matrix stays regular
-	leave_variable();
-
-      } else {
-
-	// enter variable into basis, if
-	// - no leaving variable was found  or
-	// - basis matrix would become singular when variable i leaves
-
-	if ( i < 0 ) {
-	  enter_variable();
-	} else {
-	  z_replace_variable();
-	}
-      }
-    }
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // LP case
-void  QP_solver<Q, ET, Tags>::
-update_2( Tag_true)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
-void  QP_solver<Q, ET, Tags>::
-replace_variable( Tag_true)
-{
-  replace_variable_original_original();
-  strategyP->leaving_basis( i);
-}
-
-template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
-void  QP_solver<Q, ET, Tags>::
-replace_variable( Tag_false)
-{
-  // determine type of variables
-  bool  enter_original = ( (j < qp_n) || (j >= static_cast<int>( qp_n+slack_A.size())));
-  bool  leave_original = ( (i < qp_n) || (i >= static_cast<int>( qp_n+slack_A.size())));
-
-  // update basis & basis inverse
-  if ( leave_original) {
-    if ( enter_original) {                              // orig  <--> orig
-      replace_variable_original_original();
-    } else {                                            // slack <--> orig
-      replace_variable_slack_original();
-    }
-
-    // special artificial variable removed?
-    if ( is_phaseI && ( i == art_s_i)) {
-      // remove the fake column - it corresponds
-      // to the special artificial variable which is
-      // (like all artificial variables) not needed
-      // anymore once it leaves the basis. Note:
-      // regular artificial variables are only removed
-      // from the problem after phase I
-      // art_s_i == -1 -> there is no special artificial variable
-      // art_s_i == -2 -> there was a special artificial variable, 
-      // but has been removed  
-      art_s_i = -2;
-      art_A.pop_back();
-      CGAL_qpe_assertion(in_B[in_B.size()-1] == -1); // really removed?
-      in_B.pop_back();
-      // BG: shouldn't the pricing strategy be notfied also here?
-    } else {
-      strategyP->leaving_basis( i);
-    }
-  } else {
-    if ( enter_original) {                              // orig  <--> slack
-      replace_variable_original_slack();
-    } else {                                            // slack <--> slack
-      replace_variable_slack_slack();
-    }
-    strategyP->leaving_basis( i);
-  }
-}
-
-template < typename Q, typename ET, typename Tags >  inline
-bool  QP_solver<Q, ET, Tags>::
-basis_matrix_stays_regular()
-{
-  CGAL_qpe_assertion( is_phaseII);
-  int new_row, k;
-    
-  if ( has_ineq && (i >= qp_n)) {	// slack variable
-    new_row = slack_A[ i-qp_n].first;
-    A_row_by_index_accessor  a_accessor =
-      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
-    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-	       A_row_by_index_iterator( B_O.end  (), a_accessor),
-	       tmp_x.begin());	   
-    inv_M_B.multiply( tmp_x.begin(),                        // dummy (not used)
-		      tmp_x.begin(), tmp_l_2.begin(), tmp_x_2.begin(),
-		      Tag_false(),                                 // QP
-		      Tag_false());                             // ignore 1st argument
-    return ( -inv_M_B.inner_product_x( tmp_x_2.begin(), tmp_x.begin()) != et0);
-
-	
-  } else {						// check original variable
-    k = l+in_B[ i];
-    return ( inv_M_B.entry( k, k) != et0);
-  }
-
-  /* ToDo: check, if really not needed in 'update_1':
-     - basis has already minimal size  or
-     || ( B_O.size()==C.size()) 
-  */
-}
-
-// current solution
-// ----------------
-template < typename Q, typename ET, typename Tags >  inline             // no inequalities, upper bounded
-void  QP_solver<Q, ET, Tags>::
-compute__x_B_S( Tag_true  /*has_equalities_only_and_full_rank*/,
-                Tag_false /*is_nonnegative*/)
-{
-  // nop
-}
-
-template < typename Q, typename ET, typename Tags >  inline             // no inequalities, standard form
-void  QP_solver<Q, ET, Tags>::
-compute__x_B_S( Tag_true /*has_equalities_only_and_full_rank*/,
-                Tag_true /*is_nonnegative*/)
-{
-  // nop
-}
-
-
-template < typename Q, typename ET, typename Tags >  inline             // has inequalities, upper bounded
-void  QP_solver<Q, ET, Tags>::
-compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/,
-                Tag_false /*is_nonnegative*/)
-{
-  // A_S_BxB_O * x_B_O
-  multiply__A_S_BxB_O( x_B_O.begin(), x_B_S.begin());
-
-  // b_S_B - ( A_S_BxB_O * x_B_O)
-  B_by_index_accessor  b_accessor( qp_b);
-  std::transform( B_by_index_iterator( S_B.begin(), b_accessor),
-		  B_by_index_iterator( S_B.end  (), b_accessor),
-		  x_B_S.begin(),
-		  x_B_S.begin(),
-		  compose2_2( std::minus<ET>(),
-			      std::bind1st( std::multiplies<ET>(), d),
-			      Identity<ET>()));
-				
-  // b_S_B - ( A_S_BxB_O * x_B_O) - r_S_B
-  std::transform(x_B_S.begin(), x_B_S.begin()+S_B.size(),
-		 r_S_B.begin(), x_B_S.begin(),
-		 compose2_2(std::minus<ET>(),
-			    Identity<ET>(),
-			    std::bind1st( std::multiplies<ET>(), d)));
-                        
-
-  // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O)
-  Value_iterator  x_it = x_B_S.begin();
-  Index_iterator  i_it;
-  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it) {
-    if ( slack_A[ *i_it - qp_n].second) *x_it = -(*x_it);
-  }
-       
-}
-
-
-
-template < typename Q, typename ET, typename Tags >  inline             // has inequalities, standard form
-void  QP_solver<Q, ET, Tags>::
-compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/,
-                Tag_true  /*is_nonnegative*/)
-{
-  // A_S_BxB_O * x_B_O
-  multiply__A_S_BxB_O( x_B_O.begin(), x_B_S.begin());
-
-  // b_S_B - ( A_S_BxB_O * x_B_O)
-  B_by_index_accessor  b_accessor( qp_b);
-  std::transform( B_by_index_iterator( S_B.begin(), b_accessor),
-		  B_by_index_iterator( S_B.end  (), b_accessor),
-		  x_B_S.begin(),
-		  x_B_S.begin(),
-		  compose2_2( std::minus<ET>(),
-			      std::bind1st( std::multiplies<ET>(), d),
-			      Identity<ET>()));
-
-  // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O)
-  Value_iterator  x_it = x_B_S.begin();
-  Index_iterator  i_it;
-  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it) {
-    if ( slack_A[ *i_it - qp_n].second) *x_it = -(*x_it);
-  }
-       
-}
-
-} //namespace CGAL
-
-#include <CGAL/QP_solver/Unbounded_direction.h>
-#include <CGAL/QP_solver/QP_solver_nonstandardform_impl.h>
-#include <CGAL/QP_solver/QP_solver_bounds_impl.h>
-#include <CGAL/QP_solver/QP_solver_impl.h>
-
-#endif // CGAL_QP_SOLVER_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_impl.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_impl.h
deleted file mode 100644
index c6ac5df..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_impl.h
+++ /dev/null
@@ -1,3390 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp
-//                 Kaspar Fischer
-
-#include <CGAL/QP_solver/Initialization.h>
-
-namespace CGAL {
-
-// =============================
-// class implementation (cont'd)
-// =============================
-
-// transition (to phase II)
-// ------------------------
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-transition( )
-{
-    CGAL_qpe_debug {
-	if ( vout.verbose()) {
-	    vout2 << std::endl
-		  << "----------------------" << std::endl
-		  << 'T';
-	    vout1 << "[ t"; vout  << "ransition to phase II"; vout1 << " ]";
-	    vout  << std::endl;
-	    vout2 << "----------------------";
-	}
-    }
-
-    // update status
-    m_phase    = 2;
-    is_phaseI  = false;
-    is_phaseII = true;
-
-    // remove artificial variables
-    in_B.erase( in_B.begin()+qp_n+slack_A.size(), in_B.end());
-    //ensure_size(tmp_x_2, tmp_x.size());
-    // update basis inverse
-    CGAL_qpe_debug {
-	vout4 << std::endl << "basis-inverse:" << std::endl;
-    }
-    transition( Is_linear());
-    CGAL_qpe_debug {
-        check_basis_inverse();
-    }
-
-    // initialize exact version of `-qp_c' (implicit conversion to ET)
-    C_by_index_accessor  c_accessor( qp_c);
-    std::transform( C_by_index_iterator( B_O.begin(), c_accessor),
-                    C_by_index_iterator( B_O.end  (), c_accessor),
-                    minus_c_B.begin(), std::negate<ET>());
-    
-    // compute initial solution of phase II
-    compute_solution(Is_nonnegative());
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout.verbose()) print_solution();
-    }
-
-    // notify pricing strategy
-    strategyP->transition();
-}
-
-// access
-// ------
-// numerator of current solution; the denominator is 2*d*d, so we should
-// compute here d*d*(x^T2Dx + x^T2c + 2c0)
-template < typename Q, typename ET, typename Tags >
-ET QP_solver<Q, ET, Tags>::
-solution_numerator( ) const
-{
-    ET   s, z = et0;
-    int  i, j;
-
-    if (check_tag(Is_nonnegative()) || is_phaseI) {
-      // standard form or phase I; it suffices to go
-      // through the basic variables; all D- and c-entries
-      // are obtained through the appropriate iterators 
-      Index_const_iterator  i_it;
-      Value_const_iterator  x_i_it, c_it;
-
-      // foreach i
-      x_i_it =       x_B_O.begin();
-      c_it = minus_c_B  .begin();
-      for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++x_i_it, ++c_it){
-        i = *i_it;
-
-        // compute quadratic part: 2D_i x
-        s = et0;
-        if ( is_QP && is_phaseII) {
-	  // half the off-diagonal contribution
-	  s += std::inner_product(x_B_O.begin(), x_i_it,
-				  D_pairwise_iterator(
-					 B_O.begin(),
-					 D_pairwise_accessor( qp_D, i)),
-				  et0);
-	  // the other half
-	  s *= et2;
-	  // diagonal contribution
-	  s += ET( (*(qp_D + i))[ i]) * *x_i_it;
-        }
-        // add linear part: 2c_i
-        s -= d * et2 * ET( *c_it);
-
-        // add x_i(2D_i x + 2c_i)
-        z += s * *x_i_it; // endowed with a factor of d*d now
-      }
-    } else {
-      // nonstandard form and phase II, 
-      // take all original variables into account; all D- and c-entries
-      // are obtained from the input data directly
-      // order in i_it and j_it matches original variable order
-      if (is_QP) {
-	// quadratic part
-	i=0;
-	for (Variable_numerator_iterator 
-	       i_it = this->original_variables_numerator_begin(); 
-	     i_it < this->original_variables_numerator_end(); ++i_it, ++i) {
-	  // do something only if *i_it != 0
-	  if (*i_it == et0) continue;
-	  s = et0; // contribution of i-th row
-	  Variable_numerator_iterator j_it = 
-	    this->original_variables_numerator_begin();
-	  // half the off-diagonal contribution
-	  j=0;
-	  for (; j<i; ++j_it, ++j)
-	    s += ET(*((*(qp_D+i))+j)) * *j_it;
-	  // the other half
-	  s *= et2;
-	  // the diagonal entry
-	  s += ET(*((*(qp_D+i))+j)) * *j_it;
-	  // accumulate
-	  z += s * *i_it;
-	}
-      }
-      // linear part
-      j=0; s = et0;
-      for (Variable_numerator_iterator 
-	     j_it = this->original_variables_numerator_begin();
-	   j_it < this->original_variables_numerator_end(); ++j_it, ++j)
-	s +=  et2 * ET(*(qp_c+j)) * *j_it;
-      z += d * s;
-    }
-    // finally, add the constant term (phase II only)
-    if (is_phaseII) z += et2 * ET(qp_c0) * d * d;
-    return z;
-}
-
-// pivot step
-// ----------
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-pivot_step( )
-{
-    ++m_pivots;
-
-    
-  
-    // diagnostic output
-    CGAL_qpe_debug {
-        vout2 << std::endl
-              << "==========" << std::endl
-              << "Pivot Step" << std::endl
-              << "==========" << std::endl;
-    }
-  
-  
-    vout  << "[ phase " << ( is_phaseI ? "I" : "II")
-	  << ", iteration " << m_pivots << " ]" << std::endl;
-    
-	    
-    // pricing
-    // -------
-    pricing();
-
-	    
-    // check for optimality
-    if ( j < 0) {
-
-        if ( is_phaseI) {                               // phase I
-	    // since we no longer assume full row rank and subsys assumption
-	    // we have to strengthen the precondition for infeasibility
-            if (this->solution_numerator() > et0) {    
-	      // problem is infeasible
-	        m_phase  = 3;
-	        m_status = QP_INFEASIBLE;
-	        
-		vout << "  ";
-		vout << "problem is INFEASIBLE" << std::endl;
-	       
-	    } else {  // Drive/remove artificials out of basis
-	        expel_artificial_variables_from_basis();
-	        transition();
-	    }
-        } else {                                        // phase II
-
-	    // optimal solution found
-	    m_phase  = 3;
-            m_status = QP_OPTIMAL;
-  
-	    vout << "  ";
-	    vout  << "solution is OPTIMAL" << std::endl;
-            
-        }
-        return;
-    }
-
-	    
-    // ratio test & update (step 1)
-    // ----------------------------
-    // initialize ratio test
-    ratio_test_init();
-    
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose() && is_QP && is_phaseII) {
-	    vout2.out() << std::endl
-			<< "----------------------------" << std::endl
-			<< "Ratio Test & Update (Step 1)" << std::endl
-			<< "----------------------------" << std::endl;
-	}
-    }
-
-    // loop (step 1)
-    do {
-
-        // ratio test
-        ratio_test_1();
-
-        // check for unboundedness
-        if ( q_i == et0) {
-            m_phase  = 3;
-            m_status = QP_UNBOUNDED;
-            
-	    vout << "  ";
-	    vout << "problem is UNBOUNDED" << std::endl;
-	    
-	    CGAL_qpe_debug {
-		//nu should be zero in this case
-		// note: (-1)/hat{\nu} is stored instead of \hat{\nu}
-		// todo kf: as this is just used for an assertion check,
-		// all the following lines should only be executed if
-		// assertions are enabled...
-		nu = inv_M_B.inner_product(     A_Cj.begin(), two_D_Bj.begin(),
-		    q_lambda.begin(),    q_x_O.begin());
-	        if (is_QP) {
-		    if (j < qp_n) {
-		        nu -= d*ET(*((*(qp_D+j))+j));
-		    }
-		}
-		CGAL_qpe_assertion(nu == et0);
-            }
-            return;
-        }
-	
-        // update
-        update_1();
-
-    } while ( j >= 0);
-
-    // ratio test & update (step 2)
-    // ----------------------------
-/*    
-    if ( i >= 0) {
-
-	// diagnostic output
-	CGAL_qpe_debug {
-	    vout2 << std::endl
-		  << "----------------------------" << std::endl
-		  << "Ratio Test & Update (Step 2)" << std::endl
-		  << "----------------------------" << std::endl;
-	}
-
-	// compute index of entering variable
-	j += in_B.size();
-
-	// loop (step 2)
-	while ( ( i >= 0) && basis_matrix_stays_regular()) {
-
-	    // update
-	    update_2( Is_linear());
-
-	    // ratio test
-	    ratio_test_2( Is_linear());
-	}
-    }
-*/
-    // instead of the above piece of code we now have
-    // diagnostic output
-    if (is_RTS_transition) {
-        is_RTS_transition = false;
-     
-        CGAL_qpe_debug {
-            vout2 << std::endl
-		  << "----------------------------" << std::endl
-		  << "Ratio Test & Update (Step 2)" << std::endl
-		  << "----------------------------" << std::endl;
-        }
-
-        // compute index of entering variable
-        j += static_cast<int>(in_B.size());
-
-        ratio_test_2( Is_linear());
-    
-        while ((i >= 0) && basis_matrix_stays_regular()) {
-        
-	    update_2(Is_linear());
-	
-	    ratio_test_2(Is_linear());
-	
-        }
-    } 
-
-
-
-    // ratio test & update (step 3)
-    // ----------------------------
-    CGAL_qpe_assertion_msg( i < 0, "Step 3 should never be reached!");
-
-    // diagnostic output
-    
-    if ( vout.verbose()) print_basis();
-    if ( vout.verbose()) print_solution();
-
-    // transition to phase II (if possible)
-    // ------------------------------------
-    if ( is_phaseI && ( art_basic == 0)) {
-	CGAL_qpe_debug {
-	    if ( vout2.verbose()) {
-		vout2.out() << std::endl
-			    << "all artificial variables are nonbasic"
-			    << std::endl;
-	    }
-	}
-	transition();
-    }
-}
-
-// pricing
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-pricing( )
-{
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) {
-	    vout2 << std::endl
-		  << "-------" << std::endl
-		  << "Pricing" << std::endl
-		  << "-------" << std::endl;
-	}
-    }
-
-    // call pricing strategy
-    j = strategyP->pricing(direction);
-
-    // diagnostic output
-
-    if ( vout.verbose()) {
-      if ( j < 0) {
-	CGAL_qpe_debug {
-	  vout2 << "entering variable: none" << std::endl;
-	}
-      } else {
-	vout  << "  ";
-	vout  << "entering: ";
-	vout  << j;
-	CGAL_qpe_debug {
-	  vout2 << " (" << variable_type( j) << ')' << std::endl;
-	  vout2 << "direction: "
-		<< ((direction == 1) ? "positive" : "negative") << std::endl;
-	}
-      }
-    }
-}
-
-// initialization of ratio-test
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-ratio_test_init( )
-{
-    // store exact version of `A_Cj' (implicit conversion)
-    ratio_test_init__A_Cj( A_Cj.begin(), j, no_ineq);
-
-    // store exact version of `2 D_{B_O,j}'
-    ratio_test_init__2_D_Bj( two_D_Bj.begin(), j, Is_linear());
-}
-
-template < typename Q, typename ET, typename Tags >                                         // no ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_true)
-{
-    // store exact version of `A_Cj' (implicit conversion)
-    if ( j_ < qp_n) {                                   // original variable
-
-	CGAL::cpp11::copy_n( *(qp_A + j_), qp_m, A_Cj_it);
-
-    } else {                                            // artificial variable
-
-	unsigned int  k = j_;
-	k -= qp_n;
-	std::fill_n( A_Cj_it, qp_m, et0);
-	A_Cj_it[ k] = ( art_A[ k].second ? -et1 : et1);
-    }
-}
-
-template < typename Q, typename ET, typename Tags >                                        // has ineq.
-void  QP_solver<Q, ET, Tags>::
-ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_false)
-{
-    // store exact version of `A_Cj' (implicit conversion)
-    if ( j_ < qp_n) {                                   // original variable
-      A_by_index_accessor  a_accessor( *(qp_A + j_));
-      std::copy( A_by_index_iterator( C.begin(), a_accessor),
-                 A_by_index_iterator( C.end  (), a_accessor),
-                 A_Cj_it);
-
-    } else {
-      unsigned int  k = j_;
-      k -= qp_n;
-      std::fill_n( A_Cj_it, C.size(), et0);
-
-      if ( k < static_cast<unsigned int>(slack_A.size())) {                      // slack variable
-
-        A_Cj_it[ in_C[ slack_A[ k].first]] = ( slack_A[ k].second ? -et1
-						                      :  et1);
-
-      } else {                                        // artificial variable
-        k -= static_cast<unsigned int>(slack_A.size());
-
-        if ( j_ != art_s_i) {                           // normal art.
-
-          A_Cj_it[ in_C[ art_A[ k].first]] = ( art_A[ k].second ? -et1
-						                      :  et1);
-
-        } else {                                        // special art.
-          S_by_index_accessor  s_accessor( art_s.begin());
-          std::copy( S_by_index_iterator( C.begin(), s_accessor),
-                     S_by_index_iterator( C.end  (), s_accessor),
-                     A_Cj_it);
-        }	
-      }
-    }
-}
-
-// ratio test (step 1)
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-ratio_test_1( )
-{
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) {
-	    vout2.out() << std::endl;
-	    if ( is_LP || is_phaseI) {
-		vout2.out() << "----------" << std::endl
-			    << "Ratio Test" << std::endl
-			    << "----------" << std::endl;
-	    } else {
-		vout2.out() << "Ratio Test (Step 1)" << std::endl
-			    << "-------------------" << std::endl;
-	    }
-	    if ( vout3.verbose()) {
-		vout3.out() << "    A_Cj: ";
-		std::copy( A_Cj.begin(), A_Cj.begin()+C.size(),
-			   std::ostream_iterator<ET>( vout3.out()," "));
-		vout3.out() << std::endl;
-		if ( is_QP && is_phaseII) {
-		    vout3.out() << "  2 D_Bj: ";
-		    std::copy( two_D_Bj.begin(), two_D_Bj.begin()+B_O.size(),
-			       std::ostream_iterator<ET>( vout3.out()," "));
-		    vout3.out() << std::endl;
-		}
-		vout3.out() << std::endl;
-	    }
-	}
-    }
-    
-    // compute `q_lambda' and `q_x'
-    ratio_test_1__q_x_O( Is_linear());
-    ratio_test_1__q_x_S( no_ineq);
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout3.verbose()) {
-	    if ( is_QP && is_phaseII) {
-		vout3.out() << "q_lambda: ";
-		std::copy( q_lambda.begin(), q_lambda.begin()+C.size(),
-			   std::ostream_iterator<ET>( vout3.out()," "));
-		vout3.out() << std::endl;
-	    }
-	    vout3.out() << "   q_x_O: ";
-	    std::copy( q_x_O.begin(), q_x_O.begin()+B_O.size(),
-		       std::ostream_iterator<ET>( vout3.out()," "));
-	    vout3.out() << std::endl;
-
-	    if ( has_ineq) {
-		vout3.out() << "   q_x_S: ";
-		std::copy( q_x_S.begin(), q_x_S.begin()+B_S.size(),
-			   std::ostream_iterator<ET>( vout3.out()," "));
-		vout3.out() << std::endl;
-	    }
-	    vout3.out() << std::endl;
-	}
-    }
-
-    // check `t_i's
-    x_i = et1;                                          // trick: initialize
-    q_i = et0;                                          // minimum with +oo
-
-    // computation of t_{min}^{j}
-    ratio_test_1__t_min_j(Is_nonnegative());
-    CGAL_qpe_debug { // todo kf: at first sight, this debug message should
-                     // only be output for problems in nonstandard form...
-        if (vout2.verbose()) {
-            vout2.out() << "t_min_j: " << x_i << '/' << q_i << std::endl;
-            vout2.out() << std::endl;
-        }
-    }    
-
-    // what happens, if all original variables are nonbasic?
-/*
-    ratio_test_1__t_i(   B_O.begin(),   B_O.end(),
-		       x_B_O.begin(), q_x_O.begin(), Tag_false());
-    ratio_test_1__t_i(   B_S.begin(),   B_S.end(),
-		       x_B_S.begin(), q_x_S.begin(), no_ineq);
-*/		       
-    ratio_test_1__t_min_B(no_ineq);    
-
-    // check `t_j'
-    ratio_test_1__t_j( Is_linear());
-
-    // diagnostic output
-    CGAL_qpe_debug {
-        if ( vout2.verbose()) {
-            for ( unsigned int k = 0; k < static_cast<unsigned int>(B_O.size()); ++k) {
-                print_ratio_1_original(k, x_B_O[k], q_x_O[k]);
-            }     
-            if ( has_ineq) {
-                for ( unsigned int k = 0; k < static_cast<unsigned int>(B_S.size()); ++k) {
-                    /*
-                    vout2.out() << "t_S_" << k << ": "
-				    << x_B_S[ k] << '/' << q_x_S[ k]
-				    << ( ( q_i > et0) && ( i == B_S[ k]) ? " *":"")
-				    << std::endl;
-				    */
-				    print_ratio_1_slack(k, x_B_S[k], q_x_S[k]);
-                }
-            }
-	    if ( is_QP && is_phaseII) {
-		vout2.out() << std::endl
-			    << "  t_j: " << mu << '/' << nu
-			    << ( ( q_i > et0) && ( i < 0) ? " *" : "")
-			    << std::endl;
-	    }
-	    vout2.out() << std::endl;
-	}
-    }
-    if ( q_i > et0) {
-      if ( i < 0) {
-	vout2 << "leaving variable: none" << std::endl;
-      } else {
-	vout << ", ";
-	vout  << "leaving: ";
-	vout  << i;
-	CGAL_qpe_debug {
-	  if ( vout2.verbose()) {
-	    if ( ( i < qp_n) || ( i >= static_cast<int>( qp_n+slack_A.size())) ) {
-	      vout2.out() << " (= B_O[ " << in_B[ i] << "]: "
-			  << variable_type( i) << ')';
-	    } else {
-	      vout2.out() << " (= B_S[ " << in_B[ i] << "]: slack)";
-	    }
-	  }
-	  vout2 << std::endl;
-	}
-	
-      }
-    }
-    
-}
-
-
-template < typename Q, typename ET, typename Tags >                         // Standard form
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_min_j(Tag_true /*is_nonnegative*/)
-{
-}
-
-// By the pricing step we have the following precondition
-// direction == +1 => x_O_v_i[j] == (LOWER v ZERO)
-// direction == -1 => x_O_v_i[j] == (UPPER v ZERO) 
-template < typename Q, typename ET, typename Tags >                         // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_min_j(Tag_false /*is_nonnegative*/)
-{
-    if (j < qp_n) {                                 // original variable
-        if (direction == 1) {
-            if (x_O_v_i[j] == LOWER) {              // has lower bound value
-                if (*(qp_fu+j)) {                   // has finite upper bound
-                    x_i = (*(qp_u+j) - *(qp_l+j));
-                    q_i = et1;
-                    i = j;
-                    ratio_test_bound_index = UPPER;
-                } else {                            // has infinite upper bound
-                    x_i = et1;
-                    q_i = et0;
-                }
-            } else {                                // has value zero
-                if (*(qp_fu+j)) {                   // has finite upper bound
-                    x_i = *(qp_u+j);
-                    q_i = et1;
-                    i = j;
-                    ratio_test_bound_index = UPPER;
-                } else {                            // has infinite upper bound
-                    x_i = et1;
-                    q_i = et0;                    
-                }
-            }
-        } else {                                    // direction == -1
-            if (x_O_v_i[j] == UPPER) {              // has upper bound value
-                if (*(qp_fl+j)) {                   // has finite lower bound
-                    x_i = (*(qp_u+j) - *(qp_l+j));
-                    q_i = et1;
-                    i = j;
-                    ratio_test_bound_index = LOWER;
-                } else {                            // has infinite lower bound
-                    x_i = et1;
-                    q_i = et0;
-                }
-            } else {                                // has value zero
-                if (*(qp_fl+j)) {                   // has finite lower bound
-                    x_i = -(*(qp_l+j));
-                    q_i = et1;
-                    i = j;
-                    ratio_test_bound_index = LOWER;
-                } else {                            // has infinite lower bound
-                    x_i = et1;
-                    q_i = et0;
-                }
-            }
-        }
-    } else {                                        // slack or artificial var
-        x_i = et1;
-        q_i = et0;
-    }
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_min_B(Tag_true  /*has_equalities_only_and_full_rank*/)
-{
-    ratio_test_1_B_O__t_i(B_O.begin(), B_O.end(), x_B_O.begin(),
-                        q_x_O.begin(), Is_nonnegative());
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1__t_min_B(Tag_false /*has_equalities_only_and_full_rank*/)
-{
-    ratio_test_1_B_O__t_i(B_O.begin(), B_O.end(), x_B_O.begin(),
-                        q_x_O.begin(), Is_nonnegative());
-    ratio_test_1_B_S__t_i(B_S.begin(), B_S.end(), x_B_S.begin(),
-                        q_x_S.begin(), Is_nonnegative());
-}    
-
-// ratio test for the basic original variables
-template < typename Q, typename ET, typename Tags >                         // Standard form
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
-                    Value_iterator x_it, Value_iterator q_it,
-                    Tag_true  /*is_nonnegative*/)
-{    
-    for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-        test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
-    }
-}
-
-// ratio test for the basic original variables                    
-template < typename Q, typename ET, typename Tags >                         // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
-                    Value_iterator x_it, Value_iterator q_it,
-                    Tag_false /*is_nonnegative*/)
-{
-    if (is_phaseI) {
-        if (direction == 1) {
-            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-                test_mixed_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
-            }
-        } else {
-            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-                test_mixed_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
-            }
-        }
-    } else {
-        if (direction == 1) {
-            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-                test_explicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
-            }
-        } else {
-            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-                test_explicit_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
-            }
-        }
-    }
-}
-
-// ratio test for the basic slack variables
-template < typename Q, typename ET, typename Tags >                         // Standard form
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
-                Value_iterator x_it, Value_iterator q_it,
-                Tag_true  /*is_nonnegative*/)
-{
-    for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-        test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
-    }
-}
-
-// ratio test for the basic slack variables
-template < typename Q, typename ET, typename Tags >                         // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
-                Value_iterator x_it, Value_iterator q_it,
-                Tag_false /*is_nonnegative*/)
-{
-    if (direction == 1) {
-        for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-            test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
-        }
-    } else {
-        for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
-            test_implicit_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
-        }    
-    }
-}
-
-// test for one basic variable with implicit bounds only,
-// note that this function writes the member variables i, x_i, q_i
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_implicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{   
-    if (q_k > et0) {
-      // BLAND rule: In case the ratios are the same, only update if the new index
-      // is smaller. The special artificial variable is always made to leave first.
-      if ((x_k * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == d_min * q_k)) ) {
-        i_min = k;
-        d_min = x_k;
-        q_min = q_k;
-      }
-    }
-}
-
-// test for one basic variable with implicit bounds only,
-// note that this function writes the member variables i, x_i, q_i
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_implicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{
-    if (q_k < et0) {
-      // BLAND rule: In case the ratios are the same, only update if the new index
-      // is smaller. The special artificial variable is always made to leave first.
-      if ((x_k * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == -(d_min * q_k))) ) {
-        i_min = k;
-        d_min = x_k;
-        q_min = -q_k;
-      }
-    }
-}
-
-// test for one basic variable with explicit bounds only,
-// note that this function writes the member variables i, x_i, q_i and
-// ratio_test_bound_index, although the second and third variable name
-// are in the context of upper bounding misnomers
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_explicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{
-    if (q_k > et0) {                                // check for lower bound
-        if (*(qp_fl+k)) {
-            ET  diff = x_k - (d * ET(*(qp_l+k)));
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = q_k;
-                ratio_test_bound_index = LOWER;
-            }
-        }
-    } else {                                        // check for upper bound
-        if ((q_k < et0) && (*(qp_fu+k))) {
-            ET  diff = (d * ET(*(qp_u+k))) - x_k;
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = -q_k;
-                ratio_test_bound_index = UPPER;
-            }    
-        }
-    }
-}
-
-// test for one basic variable with explicit bounds only,
-// note that this function writes the member variables i, x_i, q_i and
-// ratio_test_bound_index, although the second and third variable name
-// are in the context of upper bounding misnomers
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_explicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{
-    if (q_k < et0) {                                // check for lower bound
-        if (*(qp_fl+k)) {
-            ET  diff = x_k - (d * ET(*(qp_l+k)));
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = -q_k;
-                ratio_test_bound_index = LOWER;
-            }
-        }
-    } else {                                        // check for upper bound
-        if ((q_k > et0) && (*(qp_fu+k))) {
-            ET  diff = (d * ET(*(qp_u+k))) - x_k;
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = q_k;
-                ratio_test_bound_index = UPPER;
-            }    
-        }
-    }
-}
-
-// test for one basic variable with mixed bounds,
-// note that this function writes the member variables i, x_i, q_i and
-// ratio_test_bound_index, although the second and third variable name
-// are in the context of upper bounding misnomers
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_mixed_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{
-    if (q_k > et0) {                                // check for lower bound
-        if (k < qp_n) {                             // original variable
-            if (*(qp_fl+k)) {
-                ET  diff = x_k - (d * ET(*(qp_l+k)));
-                // BLAND rule: In case the ratios are the same, only update if the new index
-                // is smaller. The special artificial variable is always made to leave first.
-                if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k))) {
-                  i_min = k;
-                  d_min = diff;
-                  q_min = q_k;
-                  ratio_test_bound_index = LOWER;
-              } // phase  I II switch
-              
-            }
-        } else {                                    // artificial variable
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((x_k * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == d_min * q_k))) {
-                i_min = k;
-                d_min = x_k;
-                q_min = q_k;
-            }
-        }
-    } else {                                        // check for upper bound
-        if ((q_k < et0) && (k < qp_n) && *(qp_fu+k)) {
-            ET  diff = (d * ET(*(qp_u+k))) - x_k;
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = -q_k;
-                ratio_test_bound_index = UPPER;
-            }
-        }
-    }
-}
-
-// test for one basic variable with mixed bounds,
-// note that this function writes the member variables i, x_i, q_i and
-// ratio_test_bound_index, although the second and third variable name
-// are in the context of upper bounding misnomers
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-test_mixed_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
-                                int& i_min, ET& d_min, ET& q_min)
-{
-    if (q_k < et0) {                                // check for lower bound
-        if (k < qp_n) {                             // original variable
-            if (*(qp_fl+k)) {
-                ET  diff = x_k - (d * ET(*(qp_l+k)));
-                // BLAND rule: In case the ratios are the same, only update if the new index
-                // is smaller. The special artificial variable is always made to leave first.
-                if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
-                    i_min = k;
-                    d_min = diff;
-                    q_min = -q_k;
-                    ratio_test_bound_index = LOWER;
-                }
-            }
-        } else {                                    // artificial variable
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((x_k * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == -(d_min * q_k))) ) {
-                i_min = k;
-                d_min = x_k;
-                q_min = -q_k;
-            }
-        }
-    } else {                                        // check for upper bound
-        if ((q_k > et0) && (k < qp_n) && *(qp_fu+k)) {
-            ET  diff = (d * ET(*(qp_u+k))) - x_k;
-            // BLAND rule: In case the ratios are the same, only update if the new index
-            // is smaller. The special artificial variable is always made to leave first.
-            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
-                i_min = k;
-                d_min = diff;
-                q_min = q_k;
-                ratio_test_bound_index = UPPER;
-            }
-        }
-    }
-}    
-
-
-template < typename Q, typename ET, typename Tags >                                         // QP case
-void
-QP_solver<Q, ET, Tags>::
-ratio_test_2( Tag_false)
-{
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) {
-	    vout2.out() << std::endl
-			<< "Ratio Test (Step 2)" << std::endl
-			<< "-------------------" << std::endl;
-	}
-    }
-
-    // compute `p_lambda' and `p_x' (Note: `p_...' is stored in `q_...')
-    ratio_test_2__p( no_ineq);
- 
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout3.verbose()) {
-	    vout3.out() << "p_lambda: ";
-	    std::copy( q_lambda.begin(), q_lambda.begin()+C.size(),
-		       std::ostream_iterator<ET>( vout3.out()," "));
-	    vout3.out() << std::endl;
-	    vout3.out() << "   p_x_O: ";
-	    std::copy( q_x_O.begin(), q_x_O.begin()+B_O.size(),
-		       std::ostream_iterator<ET>( vout3.out()," "));
-	    vout3.out() << std::endl;
-	    if ( has_ineq) {
-		vout3.out() << "   p_x_S: ";
-		std::copy( q_x_S.begin(), q_x_S.begin()+B_S.size(),
-			   std::ostream_iterator<ET>( vout3.out()," "));
-		vout3.out() << std::endl;
-	    }
-	    vout3.out() << std::endl;
-	}
-    }
-    
-    // Idea here: At this point, the goal is to increase \mu_j until either we
-    // become optimal (\mu_j=0), or one of the variables in x^*_\hat{B} drops
-    // down to zero.
-    //
-    // Let us see first how this is done in the standard-form case (where
-    // Sven's thesis applies).  Eq. (2.11) in Sven's thesis holds, and by
-    // multlying it by $M_\hat{B}^{-1}$ we obtain an equation for \lambda and
-    // x^*_\hat{B}.  The interesting equation (the one for x^*_\hat{B}) looks
-    // more or less as follows:
-    //
-    //    x(mu_j)      = x(0) + mu_j      q_it                          (1)
-    //
-    // where q_it is the vector from (2.12).  In paritcular, for
-    // mu_j=mu_j(t_1) (i.e., if we plug the value of mu_j at the beginning of
-    // this ratio step 2 into (1)) we have
-    //
-    //    x(mu_j(t_1)) = x(0) + mu_j(t_1) q_it                          (2)
-    //
-    // where x(mu_j(t_1)) is the current solution of the solver at this point
-    // (i.e., at the beginning of ratio step 2).
-    //
-    // By subtracting (2) from (1) we can thus eliminate the "unkown" x(0)
-    // (which is cheaper than computing it):
-    //
-    //    x(mu_j) = x(mu_j(t_1)) + (mu_j-mu_j(t_1)) q_it
-    //                             ----------------
-    //                                  := delta
-    //
-    // In order to compute for each variable x_k in \hat{B} the value of mu_j
-    // for which x_k(mu_j) = 0, we thus evaluate
-    //
-    //                x(mu_j(t_1))_k
-    //    delta_k:= - --------------
-    //                    q_it_k
-    //
-    // The first variable in \hat{B} that hits zero "in the future" is then
-    // the one whose delta_k equals
-    //
-    //    delta_min:= min {delta_k | k in \hat{B} and (q_it)_k < 0 }
-    //    
-    // So in order to handle the standard-form case, we would compute this
-    // minimum.  Once we have delta_min, we need to check whether we get
-    // optimal BEFORE a variable drops to zero.  As delta = mu_j - mu_j(t_1),
-    // the latter is precisely the case if delta_min >= -mu_j(t_1).
-    //
-    // (Note: please forget the crap identitiy between (2.11) and (2.12); the
-    // notation is misleading.)
-    //
-    // Now to the nonstandard-form case.
-    
-    // fw: By definition delta_min >= 0, such that initializing
-    // delta_min with -mu_j(t_1) has the desired effect that a basic variable
-    // is leaving only if 0 <= delta_min < -mu_j(t_1).
-    //
-    // The only initialization of delta_min as fraction x_i/q_i that works is
-    // x_i=mu_j(t_1); q_i=-1; (see below).
-    //
-    // Since mu_j(t_1) has been computed in ratio test step 1 we can
-    // reuse it.
-      
-    x_i = mu;                                     // initialize minimum
-    q_i = -et1;                                        // with -mu_j(t_1) 
-
-    Value_iterator  x_it = x_B_O.begin();
-    Value_iterator  q_it = q_x_O.begin();
-    Index_iterator  i_it;
-    for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++x_it, ++q_it) {
-      // BLAND rule: In case the ratios are the same, only update if the new index
-      // is smaller. The special artificial variable is always made to leave first.
-      if ( (*q_it < et0) && (
-              (( *x_it * q_i) < ( x_i * *q_it)) ||
-              ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
-            )
-          ) {
-        i = *i_it; x_i = *x_it; q_i = *q_it;
-      }
-    }
-    x_it = x_B_S.begin();
-    q_it = q_x_S.begin();
-    for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it, ++q_it) {
-      // BLAND rule: In case the ratios are the same, only update if the new index
-      // is smaller. The special artificial variable is always made to leave first.
-      if ( ( *q_it < et0) && (
-             (( *x_it * q_i) < ( x_i * *q_it)) ||
-             ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
-            )
-          ){
-          i = *i_it; x_i = *x_it; q_i = *q_it;
-      }
-    }
-
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) {
-	    for ( unsigned int k = 0; k < static_cast<unsigned int>(B_O.size()); ++k) {
-		vout2.out() << "mu_j_O_" << k << ": - "
-			    << x_B_O[ k] << '/' << q_x_O[ k]
-			    << ( ( q_i < et0) && ( i == B_O[ k]) ? " *" : "")
-			    << std::endl;
-	    }
-	    for ( unsigned int k = 0; k < static_cast<unsigned int>(B_S.size()); ++k) {
-		vout2.out() << "mu_j_S_" << k << ": - "
-			    << x_B_S[ k] << '/' << q_x_S[ k]
-			    << ( ( q_i < et0) && ( i == B_S[ k]) ? " *" : "")
-			    << std::endl;
-	    }
-	    vout2.out() << std::endl;
-	}
-    }
-    if ( i < 0) {
-      vout2 << "leaving variable: none" << std::endl;
-    } else {
-      vout1 << ", ";
-      vout  << "leaving"; vout2 << " variable"; vout << ": ";
-      vout  << i;
-      if ( vout2.verbose()) {
-	if ( i < qp_n) {
-	  vout2.out() << " (= B_O[ " << in_B[ i] << "]: original)"
-		      << std::endl;
-	} else {
-	  vout2.out() << " (= B_S[ " << in_B[ i] << "]: slack)"
-		      << std::endl;
-	}
-      }
-    }
-    
-}
-
-// update (step 1)
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-update_1( )
-{
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) {
-	    vout2.out() << std::endl;
-	    if ( is_LP || is_phaseI) {
-		vout2.out() << "------" << std::endl
-			    << "Update" << std::endl
-			    << "------" << std::endl;
-	    } else {
-		vout2.out() << "Update (Step 1)" << std::endl
-			    << "---------------" << std::endl;
-	    }
-	}
-    }
-
-    // update basis & basis inverse
-    update_1( Is_linear());
-    CGAL_qpe_assertion(check_basis_inverse());
-    
-    // check the updated vectors r_C and r_S_B
-    CGAL_expensive_assertion(check_r_C(Is_nonnegative()));
-    CGAL_expensive_assertion(check_r_S_B(Is_nonnegative()));
-    
-    // check the vectors r_B_O and w in phaseII for QPs
-    CGAL_qpe_debug {
-        if (is_phaseII && is_QP) {
-            CGAL_expensive_assertion(check_r_B_O(Is_nonnegative()));
-            CGAL_expensive_assertion(check_w(Is_nonnegative()));
-        }
-    }
-
-    // compute current solution
-    compute_solution(Is_nonnegative());
-    
-    // check feasibility 
-    CGAL_qpe_debug {
-      if (j < 0 && !is_RTS_transition) // todo kf: is this too conservative?
-                 // Note: the above condition is necessary because of the
-                 // following.  In theory, it is true that the current
-                 // solution is at this point in the solver always
-                 // feasible. However, the solution has its x_j-entry equal to
-                 // the current t from the pricing, and is not zero (in the
-                 // standard-form case) or the current lower/upper bound
-                 // of the variable (in the non-standard-form case), resp., as
-                 // the routines is_solution_feasible() and
-                 // is_solution_feasible_for_auxiliary_problem() assume.
-	if (is_phaseI) {
-	  CGAL_expensive_assertion(
-            is_solution_feasible_for_auxiliary_problem());
-	} else {
-	  CGAL_expensive_assertion(is_solution_feasible());
-	}
-      else
-	vout2 << "(feasibility not checked in intermediate step)" << std::endl;
-      CGAL_expensive_assertion(check_tag(Is_nonnegative()) ||
-			       r_C.size() == C.size());
-    }
-	 
-}
-
-// update (step 2)
-template < typename Q, typename ET, typename Tags >                                         // QP case
-void
-QP_solver<Q, ET, Tags>::
-update_2( Tag_false)
-{
-    CGAL_qpe_debug {
-	vout2 << std::endl
-	      << "Update (Step 2)" << std::endl
-	      << "---------------" << std::endl;
-    }
-
-    // leave variable from basis
-    leave_variable();
-    CGAL_qpe_debug {
-        check_basis_inverse();
-    }
-    
-    // check the updated vectors r_C, r_S_B, r_B_O and w
-    CGAL_expensive_assertion(check_r_C(Is_nonnegative()));
-    CGAL_expensive_assertion(check_r_S_B(Is_nonnegative()));
-    CGAL_expensive_assertion(check_r_B_O(Is_nonnegative()));
-    CGAL_expensive_assertion(check_w(Is_nonnegative()));
-
-    // compute current solution
-    compute_solution(Is_nonnegative());
-}
- 
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-expel_artificial_variables_from_basis( )
-{
-    int row_ind;
-    ET r_A_Cj;
-    
-    CGAL_qpe_debug {
-        vout2 << std::endl
-	      << "---------------------------------------------" << std::endl
-	      << "Expelling artificial variables from the basis" << std::endl
-	      << "---------------------------------------------" << std::endl;
-    }
-  
-
-  
-    for (unsigned int i_ = 0; i_ < static_cast<unsigned int>(qp_n + slack_A.size()); ++i_) {
-      if (!is_basic(i_)) { 
-      ratio_test_init__A_Cj( A_Cj.begin(), i_, no_ineq);
-      }
-    }
-
-    
-    // try to pivot the artificials out of the basis
-    // Note that we do not notify the pricing strategy about variables
-    // leaving the basis, furthermore the pricing strategy does not
-    // know about variables entering the basis.
-    // The partial pricing strategies that keep the set of nonbasic vars
-    // explicitly are synchronized during transition from phaseI to phaseII 
-    for (unsigned int i_ = static_cast<unsigned int>(qp_n + slack_A.size()); i_ < static_cast<unsigned int>(in_B.size()); ++i_) {
-      if (is_basic(i_)) { 					// is basic
-        row_ind = in_B[i_];  
-        
-        //CGAL_qpe_assertion(row_ind >= 0);
-        
-	    
-        // determine first possible entering variable,
-        // if there is any
-        for (unsigned int j_ = 0; j_ < static_cast<unsigned int>(qp_n + slack_A.size()); ++j_) {
-	        if (!is_basic(j_)) {  				// is nonbasic
-            ratio_test_init__A_Cj( A_Cj.begin(), j_, no_ineq);
-                        
-            r_A_Cj = inv_M_B.inv_M_B_row_dot_col(row_ind, A_Cj.begin());
-                       
-            if (r_A_Cj != et0) {
-              ratio_test_1__q_x_O(Is_linear());
-              i = i_;
-              j = j_;
-              update_1(Is_linear());
-              break;
-            } 
-          }
-        }
-      }
-    }
-  
-    if ((art_basic != 0) && no_ineq) {
-      // the vector in_C was not used in phase I, but now we remove redundant
-      // constraints and switch to has_ineq treatment, hence we need it to
-      // be correct at this stage
-      for (int i=0; i<qp_m; ++i)
-        in_C.push_back(i);
-      }
-      diagnostics.redundant_equations = (art_basic != 0);
-
-      // now reset the no_ineq and has_ineq flags to match the situation
-      no_ineq = no_ineq && !diagnostics.redundant_equations;
-      has_ineq = !no_ineq;
-    
-      // remove the remaining ones with their corresponding equality constraints
-      // Note: the special artificial variable can always be driven out of the
-      // basis
-      for (unsigned int i_ = static_cast<unsigned int>(qp_n + slack_A.size()); i_ < static_cast<unsigned int>(in_B.size()); ++i_) {
-        if (in_B[i_] >= 0) {
-          i = i_;
-          CGAL_qpe_debug {
-            vout2 << std::endl
-            << "~~> removing artificial variable " << i
-            << " and its equality constraint" << std::endl
-            << std::endl;
-          }
-        remove_artificial_variable_and_constraint();
-      }
-    }
-}
-
-
-// replace variable in basis
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-replace_variable( )
-{
-    CGAL_qpe_debug {
-	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
-	      << " replaces basic (" << variable_type( i) << ") variable " << i
-	      << std::endl << std::endl;
-    }
-
-    // replace variable
-    replace_variable( no_ineq);
-
-    // pivot step done
-    i = j = -1;
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_original( )
-{
-    // updates for the upper bounded case
-    replace_variable_original_original_upd_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // replace original variable [ in: j | out: i ]
-    in_B  [ i] = -1;
-    in_B  [ j] = k;
-       B_O[ k] = j;
-
-    minus_c_B[ k] = 
-      ( is_phaseI ? 
-	( j < qp_n ? et0 : -aux_c[j-qp_n-slack_A.size()]) : -ET( *(qp_c+ j)));
-
-    if ( is_phaseI) {
-	if ( j >= qp_n) ++art_basic;
-	if ( i >= qp_n) --art_basic;
-    }
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-	    
-    // update basis inverse
-    inv_M_B.enter_original_leave_original( q_x_O.begin(), k);
-}
-
-// update of the vector r for U_5 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_original_upd_r(Tag_true )
-{
-}
-
-// update of the vector r for U_5 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_original_upd_r(Tag_false )
-{
-    ET      x_j, x_i;
-    
-    if (is_artificial(j)) {
-        if (!is_artificial(i)) {
-            x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-            update_r_C_r_S_B__i(x_i);
-            // update x_O_v_i
-            x_O_v_i[i] = ratio_test_bound_index;
-        }
-    } else {
-        x_j = nonbasic_original_variable_value(j);
-        if (is_artificial(i)) {
-            update_r_C_r_S_B__j(x_j);
-        } else {
-            x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-            update_r_C_r_S_B__j_i(x_j, x_i);
-            // update x_O_v_i
-            x_O_v_i[i] = ratio_test_bound_index;
-        }
-        // update x_O_v_i
-        x_O_v_i[j] = BASIC;
-    }
-}
-
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_slack( )
-{
-    
-    // updates for the upper bounded case
-    replace_variable_slack_slack_upd_r(Is_nonnegative()); 
-    
-    int  k = in_B[ i];
-
-    // replace slack variable [ in: j | out: i ]
-    in_B  [ i] = -1;
-    in_B  [ j] = k;
-       B_S[ k] = j;
-       S_B[ k] = slack_A[ j-qp_n].first;
-
-    // replace inequality constraint [ in: i | out: j ]
-    int old_row = S_B[ k];
-    int new_row = slack_A[ i-qp_n].first;
-    k = in_C[ old_row];
-
-    in_C[ old_row] = -1;
-    in_C[ new_row] = k;
-       C[ k      ] = new_row;
-
-     b_C[ k] = ET( *(qp_b+ new_row));
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    A_row_by_index_accessor  a_accessor =
-      boost::bind( A_accessor( qp_A, 0, qp_n), _1, new_row);
-    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-	       A_row_by_index_iterator( B_O.end  (), a_accessor),
-	       tmp_x.begin());
-    if ( art_s_i > 0) {                                 // special artificial
-	tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
-    }
-    inv_M_B.enter_slack_leave_slack( tmp_x.begin(), k);
-}
-
-// update of the vector r for U_6 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_slack_upd_r(Tag_true )
-{
-}
-
-// update of the vector r for U_6 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_slack_upd_r(Tag_false )
-{
-    int     sigma_j = slack_A[ j-qp_n].first;
-    
-    // swap r_gamma_C(sigma_j) in r_C with r_gamma_S_B(sigma_i) in r_S_B
-    std::swap(r_C[in_C[sigma_j]], r_S_B[in_B[i]]); 
-}
-
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_original( )
-{
-    // updates for the upper bounded case
-    replace_variable_slack_original_upd_r(Is_nonnegative()); 
-     
-    int  k = in_B[ i];
-
-    // leave original variable [ out: i ]
-    in_B  [ B_O.back()] = k;
-       B_O[ k] = B_O.back();
-       in_B  [ i         ] = -1;
-       B_O.pop_back();
-
-    minus_c_B[ k] = minus_c_B[ B_O.size()];
-
-    if ( is_phaseI && ( i >= qp_n)) --art_basic;
-
-    // enter slack variable [ in: j ]
-    int  old_row = slack_A[ j-qp_n].first;
-    in_B  [ j] = static_cast<int>(B_S.size());
-       B_S.push_back( j);
-       S_B.push_back( old_row);
-
-    // leave inequality constraint [ out: j ]
-    int  l = in_C[ old_row];
-     b_C[ l       ] = b_C[ C.size()-1];
-       C[ l       ] = C.back();
-    in_C[ C.back()] = l;
-    in_C[ old_row ] = -1;
-       C.pop_back();
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    inv_M_B.swap_variable( k);
-    inv_M_B.swap_constraint( l);
-    inv_M_B.enter_slack_leave_original();
-}
-
-// update of the vector r for U_8 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_original_upd_r(Tag_true )
-{
-}
-
-// update of the vector r for U_8 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_slack_original_upd_r(Tag_false )
-{
-    if (!is_artificial(i)) {
-        ET  x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-        update_r_C_r_S_B__i(x_i);
-    }
-    
-    int     sigma_j = slack_A[ j-qp_n].first;
-    
-    // append r_gamma_C(sigma_j) from r_C to r_S_B:
-    r_S_B.push_back(r_C[in_C[sigma_j]]);
-    
-    // remove r_gamma_C(sigma_j) from r_C:
-    r_C[in_C[sigma_j]] = r_C.back();
-    r_C.pop_back();
-    
-    // update x_O_v_i
-    if (!is_artificial(i)) // original and not artificial?
-      x_O_v_i[i] = ratio_test_bound_index;
-}
-
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_slack( )
-{
-    // updates for the upper bounded case
-    replace_variable_original_slack_upd_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // enter original variable [ in: j ]
-
-    minus_c_B[ B_O.size()]
-      = ( is_phaseI ? 
-	  ( j < qp_n ? et0 : -aux_c[j-qp_n-slack_A.size()]) 
-	  : -ET( *(qp_c+ j)));
-    
-
-    in_B  [ j] = static_cast<int>(B_O.size());
-       B_O.push_back( j);
-
-    if ( is_phaseI && ( j >= qp_n)) ++art_basic;
-
-    // leave slack variable [ out: i ]
-       B_S[ k         ] = B_S.back();
-       S_B[ k         ] = S_B.back();
-    in_B  [ B_S.back()] = k;
-    in_B  [ i         ] = -1; 
-       B_S.pop_back();
-       S_B.pop_back();
-
-    // enter inequality constraint [ in: i ]
-    int new_row = slack_A[ i-qp_n].first;
-
-     b_C[ C.size()] = ET( *(qp_b+ new_row));
-    in_C[ new_row ] = static_cast<int>(C.size());
-       C.push_back( new_row);
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    A_row_by_index_accessor  a_accessor =
-      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
-    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-	       A_row_by_index_iterator( B_O.end  (), a_accessor),
-	       tmp_x.begin());
-    if ( art_s_i > 0) {                                 // special art.
-	tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
-    }
-    inv_M_B.enter_original_leave_slack( q_x_O.begin(), tmp_x.begin());
-    
-}
-
-// update of the vector r for U_7 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_slack_upd_r(Tag_true )
-{
-}
-
-// update of the vector r for U_7 with upper bounding, note that we 
-// need the headings C, and S_{B} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-replace_variable_original_slack_upd_r(Tag_false )
-{
-    if (!is_artificial(j)) {
-        ET x_j = nonbasic_original_variable_value(j);
-        update_r_C_r_S_B__j(x_j);
-    }
-    
-    // append r_gamma_S_B(sigma_i) from r_S_B to r_C
-    r_C.push_back(r_S_B[in_B[i]]);
-    
-    // remove r_gamma_S_B(sigma_i) from r_S_B
-    r_S_B[in_B[i]] = r_S_B.back();
-    r_S_B.pop_back();
-    
-    // update x_O_v_i
-    if (!is_artificial(j)) {
-        x_O_v_i[j] = BASIC;
-    }
-}
-
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-remove_artificial_variable_and_constraint( )
-{
-    // updates for the upper bounded case
-    remove_artificial_variable_and_constraint_upd_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // leave artificial (original) variable [ out: i ]
-    in_B  [ B_O.back()] = k;
-       B_O[ k] = B_O.back();
-       in_B  [ i         ] = -1;
-       B_O.pop_back();
-
-    minus_c_B[ k] = minus_c_B[ B_O.size()];
-
-    if ( is_phaseI && ( i >= qp_n)) --art_basic;
-
-    int old_row = art_A[i - qp_n - slack_A.size()].first;
-
-    // leave its equality constraint 
-    int  l = in_C[ old_row];
-     b_C[ l       ] = b_C[ C.size()-1];
-       C[ l       ] = C.back();
-    in_C[ C.back()] = l;
-    in_C[ old_row ] = -1;
-       C.pop_back();
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    inv_M_B.swap_variable( k);
-    inv_M_B.swap_constraint( l);
-    inv_M_B.enter_slack_leave_original();
-}
-
-// update of the vector r with upper bounding for the removal of an
-// artificial variable with its equality constraint, note that we 
-// need the headings C before it is updated
-template < typename Q, typename ET, typename Tags >                                 // Standard form
-void  QP_solver<Q, ET, Tags>::
-remove_artificial_variable_and_constraint_upd_r(Tag_true )
-{
-}
-
-// update of the vector r with upper bounding for the removal of an
-// artificial variable with its equality constraint, note that we 
-// need the headings C before it is updated
-template < typename Q, typename ET, typename Tags >                                 // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-remove_artificial_variable_and_constraint_upd_r(Tag_false )
-{
-    int sigma_i = art_A[i - qp_n - slack_A.size()].first;
-    
-    // remove r_gamma_C(sigma_i) from r_C
-    r_C[in_C[sigma_i]] = r_C.back();
-    r_C.pop_back();
-}
-
-// update that occurs only with upper bounding in ratio test step 1
-template < typename Q, typename ET, typename Tags >            
-void  QP_solver<Q, ET, Tags>::
-enter_and_leave_variable( )
-{
-    
-    CGAL_qpe_assertion((i == j) && (i >= 0));
-    
-    CGAL_qpe_debug {
-	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
-	      << " enters and leaves basis" << std::endl << std::endl;
-    }
-
-    
-    ET diff;
-    ET x_j = nonbasic_original_variable_value(j);
-    
-    if (ratio_test_bound_index == LOWER) {
-        diff = x_j - ET(*(qp_l+j));
-    } else {
-        diff = x_j - ET(*(qp_u+j));
-    }
-    
-    if (is_phaseI) {
-        update_r_C_r_S_B__j(diff);
-    } else {
-        update_w_r_B_O__j(diff);
-        update_r_C_r_S_B__j(diff);
-    }
-    
-    x_O_v_i[j] = ratio_test_bound_index;
-    
-    // notify pricing strategy (it has called enter_basis on i before)
-    strategyP->leaving_basis (i);
-
-    // variable entered and left basis
-    i = -1; j = -1;
-}
-
-
-
-// enter variable into basis
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-enter_variable( )
-{
-  CGAL_qpe_assertion (is_phaseII);
-    CGAL_qpe_debug {
-	vout2 << "--> nonbasic (" << variable_type( j) << ") variable "
-	      << j << " enters basis" << std::endl << std::endl;
-    }
-
-    // update basis & basis inverse:
-    if (no_ineq || (j < qp_n)) {              // original variable
-    
-        // updates for the upper bounded case:
-        enter_variable_original_upd_w_r(Is_nonnegative());
-
-	// enter original variable [ in: j ]:
-	if (minus_c_B.size() <= B_O.size()) { // Note: minus_c_B and the
-					      // containers resized in this
-					      // if-block are only enlarged
-					      // and never made smaller
-					      // (while B_O always has the
-					      // correct size). We check here
-					      // whether we need to enlarge
-					      // them.
-	  CGAL_qpe_assertion(minus_c_B.size() == B_O.size());
-	    minus_c_B.push_back(et0);
-	        q_x_O.push_back(et0);
-	      tmp_x  .push_back(et0);
-	      tmp_x_2.push_back(et0);
-	     two_D_Bj.push_back(et0);
-	        x_B_O.push_back(et0);
-	}
-	minus_c_B[B_O.size()] = -ET(*(qp_c+ j)); // Note: B_O has always the
-					       // correct size.
-	
-	in_B[j] = static_cast<int>(B_O.size());
-	B_O.push_back(j);
-
-	// diagnostic output
-	CGAL_qpe_debug {
-	    if (vout2.verbose())
-	      print_basis();
-	}
-	    
-	// update basis inverse
-	// note: (-1)\hat{\nu} is stored instead of \hat{\nu}
-	inv_M_B.enter_original(q_lambda.begin(), q_x_O.begin(), -nu);
-	
-    } else {                                  // slack variable
-
-        // updates for the upper bounded case:
-        enter_variable_slack_upd_w_r(Is_nonnegative());
-
-	// enter slack variable [ in: j ]:
-	in_B  [ j] = static_cast<int>(B_S.size());
-	   B_S.push_back( j);
-	   S_B.push_back( slack_A[ j-qp_n].first);
-
-	// leave inequality constraint [ out: j ]:
-	int old_row = slack_A[ j-qp_n].first;
-	int k = in_C[old_row];
-	
-	// reflect change of active constraints heading C in b_C:
-	b_C[ k] = b_C[C.size()-1];
-		
-	   C[ k] = C.back();
-	in_C[ C.back()      ] = k;
-	in_C[ old_row       ] = -1;
-	   C.pop_back();
-	
-	// diagnostic output:
-	CGAL_qpe_debug {
-	    if (vout2.verbose())
-	      print_basis();
-	}
-
-	// update basis inverse:
-	inv_M_B.swap_constraint(k);  // swap to back
-	inv_M_B.enter_slack();       // drop drop
-    }
-
-    // variable entered:
-    j -= static_cast<int>(in_B.size());
-}
-
-// update of the vectors w and r for U_1 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-enter_variable_original_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_1 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded     
-void  QP_solver<Q, ET, Tags>::
-enter_variable_original_upd_w_r(Tag_false )
-{
-
-    ET      x_j = nonbasic_original_variable_value(j);
-
-    // Note: w needs to be updated before r_C, r_S_B
-    update_w_r_B_O__j(x_j);
-    update_r_C_r_S_B__j(x_j);
-    
-    // append w_j to r_B_O
-    if (!check_tag(Is_linear())) // (kf.)
-      r_B_O.push_back(w[j]);
-    
-    // update x_O_v_i
-    x_O_v_i[j] = BASIC;
-}
-
-// update of the vectors w and r for U_3 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-enter_variable_slack_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_3 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded     
-void  QP_solver<Q, ET, Tags>::
-enter_variable_slack_upd_w_r(Tag_false )
-{
-    
-    int     sigma_j = slack_A[ j-qp_n].first;       
-    
-    // append r_gamma_C(sigma_j) to r_S_B
-    r_S_B.push_back(r_C[in_C[sigma_j]]);
-    
-    // remove r_gamma_C(sigma_j) from r_C   
-    r_C[in_C[sigma_j]] = r_C.back();
-    r_C.pop_back();
-}
-
-// leave variable from basis
-template < typename Q, typename ET, typename Tags >
-void
-QP_solver<Q, ET, Tags>::
-leave_variable( )
-{
-    CGAL_qpe_debug {
-	vout2 << "<-- basic (" << variable_type( i) << ") variable "
-	      << i << " leaves basis" << std::endl << std::endl;
-    }
-
-    // update basis & basis inverse
-    int  k = in_B[ i];
-    if ( no_ineq || ( i < qp_n)) {                      // original variable
-        
-        // updates for the upper bounded case
-        leave_variable_original_upd_w_r(Is_nonnegative());
-
-	// leave original variable [ out: i ]
-	in_B  [ B_O.back()] = k;
-	in_B  [ i         ] = -1; 
-	//in_B  [ B_O.back()] = k;
-	   B_O[ k] = B_O.back(); B_O.pop_back();
-
-	minus_c_B [ k] = minus_c_B [ B_O.size()];
-	  two_D_Bj[ k] =   two_D_Bj[ B_O.size()];
-	  
-
-	// diagnostic output
-	CGAL_qpe_debug {
-	    if ( vout2.verbose()) print_basis();
-	}
-
-	// update basis inverse
-	inv_M_B.swap_variable( k);
-	inv_M_B.leave_original();
-
-    } else {                                            // slack variable
-        
-        // updates for the upper bounded case
-        leave_variable_slack_upd_w_r(Is_nonnegative());
-
-	// leave slack variable [ out: i ]
-	in_B  [ B_S.back()] = k;      // former last var moves to position k
-	in_B  [ i         ] = -1;     // i gets deleted
-	   B_S[ k] = B_S.back(); B_S.pop_back();
-	   S_B[ k] = S_B.back(); S_B.pop_back();
-
-	// enter inequality constraint [ in: i ]
-	int new_row = slack_A[ i-qp_n].first;
-
-	A_Cj[ C.size()] = ( j < qp_n ? ET( *((*(qp_A + j))+ new_row)) : et0);
-
-	 b_C[ C.size()] = ET( *(qp_b+ new_row));
-	in_C[ new_row ] = static_cast<int>(C.size());
-	   C.push_back( new_row);
-
-	// diagnostic output
-	CGAL_qpe_debug {
-	    if ( vout2.verbose()) print_basis();
-	}
-
-	// update basis inverse
-	A_row_by_index_accessor  a_accessor =
-	  boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
-	std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-		   A_row_by_index_iterator( B_O.end  (), a_accessor),
-		   tmp_x.begin());
-	inv_M_B.leave_slack( tmp_x.begin());
-    }
-
-    // notify pricing strategy
-    strategyP->leaving_basis( i);
-
-    // variable left
-    i = -1;
-}
-
-// update of the vectors w and r for U_2 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-leave_variable_original_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_2 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-leave_variable_original_upd_w_r(Tag_false )
-{
-
-    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-    
-    // Note: w needs to be updated before r_C, r_S_B
-    update_w_r_B_O__i(x_i);
-    update_r_C_r_S_B__i(x_i);    
-    
-    // remove r_beta_O(i) from r_B_O
-    if (!check_tag(Is_linear())) { // (kf.)
-      r_B_O[in_B[i]] = r_B_O.back();
-      r_B_O.pop_back();
-    }
-    
-    // update x_O_v_i
-    x_O_v_i[i] = ratio_test_bound_index;
-}
-
-// update of the vectors w and r for U_4 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-leave_variable_slack_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_4 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-leave_variable_slack_upd_w_r(Tag_false )
-{
-    
-    // append r_gamma_S_B(sigma_i) to r_C
-    r_C.push_back(r_S_B[in_B[i]]);
-    
-    // remove r_gamma_S_B(sigma_i) from r_S_B
-    r_S_B[in_B[i]] = r_S_B.back();
-    r_S_B.pop_back();
-}
-
-
-// replace variable in basis QP-case, transition to Ratio Test Step 2
-template < typename Q, typename ET, typename Tags >
-void QP_solver<Q, ET, Tags>::
-z_replace_variable( )
-{
-    CGAL_qpe_debug {
-	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
-	      << " z_replaces basic (" << variable_type( i) << ") variable " << i
-	      << std::endl << std::endl;
-    }
-
-    // replace variable
-    z_replace_variable( no_ineq);
-
-    // pivot step not yet completely done
-    i = -1;
-    j -= static_cast<int>(in_B.size());
-    is_RTS_transition = true;
-}
-
-
-template < typename Q, typename ET, typename Tags >  inline                           // no inequalities
-void QP_solver<Q, ET, Tags>::
-z_replace_variable( Tag_true)
-{
-    z_replace_variable_original_by_original();
-    strategyP->leaving_basis(i);
-
-}
-
-
-template < typename Q, typename ET, typename Tags >  inline                          // has inequalities
-void QP_solver<Q, ET, Tags>::
-z_replace_variable( Tag_false)
-{
-    // determine type of variables
-    bool  enter_original = ( (j < qp_n) || (j >= static_cast<int>( qp_n+slack_A.size())));
-    bool  leave_original = ( (i < qp_n) || (i >= static_cast<int>( qp_n+slack_A.size())));
-
-    // update basis and basis inverse
-    if ( leave_original) {
-        if ( enter_original) {               
-	    z_replace_variable_original_by_original();
-	} else {                             
-	    z_replace_variable_original_by_slack();
-	}
-    } else {
-        if ( enter_original) {
-	    z_replace_variable_slack_by_original();
-	} else {
-	    z_replace_variable_slack_by_slack();
-	}
-    }
-    strategyP->leaving_basis( i);
-}
-
-
-// replacement with precond det(M_{B \setminus \{i\}})=0
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_original( )
-{
-    // updates for the upper bounded case
-    z_replace_variable_original_by_original_upd_w_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // replace original variable [ in: j | out: i ]
-    in_B  [ i] = -1;
-    in_B  [ j] = k;
-       B_O[ k] = j;
-
-    minus_c_B[ k] = -ET( *(qp_c+ j));
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-	
-    // compute s_delta
-    D_pairwise_accessor  d_accessor( qp_D, j);
-    ET                   s_delta =d_accessor(j)-d_accessor(i); 
-    	    
-    // update basis inverse
-    // note: (-1)\hat{\nu} is stored instead of \hat{\nu}
-    inv_M_B.z_replace_original_by_original( q_lambda.begin(), q_x_O.begin(), 
-        s_delta, -nu, k);
-
-}
-
-// update of the vectors w and r for U_Z_1 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form      
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_original_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_Z_1 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                           
-// Upper bounded      
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_original_upd_w_r(Tag_false )
-{
-
-    ET      x_j = nonbasic_original_variable_value(j);
-    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-    
-    // Note: w needs to be updated before r_C, r_S_B
-    update_w_r_B_O__j_i(x_j, x_i);
-    update_r_C_r_S_B__j_i(x_j, x_i);
-    
-    // replace r_beta_O(i) with w_j    
-    r_B_O[in_B[i]] = w[j];
-    
-    // update x_O_v_i
-    x_O_v_i[j] = BASIC;
-    x_O_v_i[i] = ratio_test_bound_index;    
-}
-
-
-// replacement with precond det(M_{B \setminus \{i\}})=0
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_slack( )
-{
-    // updates for the upper bounded case
-    z_replace_variable_original_by_slack_upd_w_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // leave original variable [ out: i ]
-    in_B  [ B_O.back()] = k;
-       B_O[ k] = B_O.back();
-       in_B  [ i         ] = -1;
-       B_O.pop_back();
-
-    minus_c_B[ k] = minus_c_B[ B_O.size()];
-
-    // enter slack variable [ in: j ]
-    int  old_row = slack_A[ j-qp_n].first;
-    in_B  [ j] = static_cast<int>(B_S.size());
-       B_S.push_back( j);
-       S_B.push_back( old_row);
-
-    // leave inequality constraint [ out: j ]
-    int  l = in_C[ old_row];
-     b_C[ l       ] = b_C[ C.size()-1];
-       C[ l       ] = C.back();
-    in_C[ C.back()] = l;
-    in_C[ old_row ] = -1;
-       C.pop_back();
-    
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    inv_M_B.swap_variable( k);
-    inv_M_B.swap_constraint( l);
-    inv_M_B.z_replace_original_by_slack( );
-
-}
-
-// update of the vectors w and r for U_Z_2 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                         // Standard form
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_slack_upd_w_r(Tag_true )
-{
-}
-
-
-// update of the vectors w and r for U_Z_2 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                         // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_original_by_slack_upd_w_r(Tag_false )
-{
-
-    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
-    
-    // Note: w needs to be updated before r_C, r_S_B
-    update_w_r_B_O__i(x_i);
-    update_r_C_r_S_B__i(x_i);
-    
-    int     sigma_j = slack_A[ j-qp_n].first;
-    
-    // append r_gamma_C(sigma_j) to r_S_B
-    r_S_B.push_back(r_C[in_C[sigma_j]]);
-    
-    // remove r_gamma_C(sigma_j) from r_C
-    r_C[in_C[sigma_j]] = r_C.back();
-    r_C.pop_back();
-    
-    // remove r_beta_O(i) from r_B_O    
-    if (!check_tag(Is_linear())) { // (kf.)
-      r_B_O[in_B[i]] = r_B_O.back();
-      r_B_O.pop_back();
-    }
-    
-    // update x_O_v_i
-    x_O_v_i[i] = ratio_test_bound_index;
-}
-
-
-// replacement with precond det(M_{B \setminus \{i\}})=0
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_original( )
-{
-    // updates for the upper bounded case
-    z_replace_variable_slack_by_original_upd_w_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-    if (minus_c_B.size() <= B_O.size()) {  // Note: minus_c_B and the
-					   // containers resized in this
-					   // if-block are only enlarged
-					   // and never made smaller
-					   // (while B_O always has the
-					   // correct size). We check here
-					   // whether we need to enlarge
-					   // them.
-      CGAL_qpe_assertion(minus_c_B.size() == B_O.size());
-	 minus_c_B.push_back(et0);
-	     q_x_O.push_back(et0);
-	   tmp_x  .push_back(et0);
-	   tmp_x_2.push_back(et0);
-	  two_D_Bj.push_back(et0);
-	     x_B_O.push_back(et0);
-    }
-
-    // enter original variable [ in: j ]
-
-    minus_c_B[ B_O.size()] = -ET( *(qp_c+ j));
-    
-
-    in_B  [ j] = static_cast<int>(B_O.size());
-       B_O.push_back( j);
-
-
-    // leave slack variable [ out: i ]
-       B_S[ k         ] = B_S.back();
-       S_B[ k         ] = S_B.back();
-    in_B  [ B_S.back()] = k;
-    in_B  [ i         ] = -1; 
-       B_S.pop_back();
-       S_B.pop_back();
-
-    // enter inequality constraint [ in: i ]
-    int new_row = slack_A[ i-qp_n].first;
-
-     b_C[ C.size()] = ET( *(qp_b+ new_row));
-    in_C[ new_row ] = static_cast<int>(C.size());
-       C.push_back( new_row);
-    
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    // --------------------
-
-    // prepare u
-    A_row_by_index_accessor  a_accessor =
-      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
-    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-	       A_row_by_index_iterator( B_O.end  (), a_accessor),
-	       tmp_x.begin());
-    
-    
-    // prepare kappa
-    ET  kappa = d * ET(*((*(qp_A + j))+new_row)) 
-                - inv_M_B.inner_product_x( tmp_x.begin(), q_x_O.begin());
-		
-	// note: (-1)/hat{\nu} is stored instead of \hat{\nu}	 
-    inv_M_B.z_replace_slack_by_original( q_lambda.begin(), q_x_O.begin(),
-                                          tmp_x.begin(), kappa, -nu);    
-}
-
-// update of the vectors w and r for U_Z_3 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                            // Standard form
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_original_upd_w_r(Tag_true )
-{
-}
-
-// update of the vectors w and r for U_Z_3 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                             // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_original_upd_w_r(Tag_false )
-{
-
-    ET      x_j = nonbasic_original_variable_value(j);
-
-    // Note: w needs to be updated before r_C, r_S_B    
-    update_w_r_B_O__j(x_j);
-    update_r_C_r_S_B__j(x_j);
-        
-    // append r_gamma_S_B(sigma_i) to r_C
-    r_C.push_back(r_S_B[in_B[i]]);
-    
-    // remove r_gamma_S_B(sigma_i) from r_S_B
-    r_S_B[in_B[i]] = r_S_B.back();
-    r_S_B.pop_back();
-    
-    // append w_j to r_B_O    
-    if (!check_tag(Is_linear())) // (kf.)
-      r_B_O.push_back(w[j]);
-    
-    // update x_O_v_i
-    x_O_v_i[j] = BASIC;
-}
-
-
-// replacement with precond det(M_{B \setminus \{i\}})=0
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_slack( )
-{
-    // updates for the upper bounded case
-    z_replace_variable_slack_by_slack_upd_w_r(Is_nonnegative());
-    
-    int  k = in_B[ i];
-
-    // replace slack variable [ in: j | out: i ]
-    in_B  [ i] = -1;
-    in_B  [ j] = k;
-       B_S[ k] = j;
-       S_B[ k] = slack_A[ j-qp_n].first;
-
-    // replace inequality constraint [ in: i | out: j ]
-    int old_row = S_B[ k];
-    int new_row = slack_A[ i-qp_n].first;
-    k = in_C[ old_row];
-
-    in_C[ old_row] = -1;
-    in_C[ new_row] = k;
-       C[ k      ] = new_row;
-
-     b_C[ k] = ET( *(qp_b+ new_row));
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	    if ( vout2.verbose()) print_basis();
-    }
-
-    // update basis inverse
-    // --------------------
-    A_row_by_index_accessor  a_accessor =
-      boost::bind ( A_accessor( qp_A, 0, qp_n), _1, new_row);
-    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
-	       A_row_by_index_iterator( B_O.end  (), a_accessor),
-	       tmp_x.begin());
-
-
-    inv_M_B.z_replace_slack_by_slack( tmp_x.begin(), k);
-}
-
-// update of the vectors w and r for U_Z_4 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                             // Standard form
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_slack_upd_w_r(Tag_true )
-{
-}
-
-
-// update of the vectors w and r for U_Z_4 with upper bounding, note that we 
-// need the headings C, S_{B}, B_{O} before they are updated
-template < typename Q, typename ET, typename Tags >                             // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-z_replace_variable_slack_by_slack_upd_w_r(Tag_false )
-{
-    
-    int     sigma_j = slack_A[ j-qp_n].first;
-    
-    // swap r_sigma_j in r_C with r_sigma_i in r_S_B
-    std::swap(r_C[in_C[sigma_j]], r_S_B[in_B[i]]);           
-}
-
-// update of the vectors r_C and r_S_B with "x_j" column
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_r_C_r_S_B__j(ET& x_j)
-{
-    // update of vector r_{C}
-    A_by_index_accessor     a_accessor_j(*(qp_A + j));
-    
-    A_by_index_iterator     A_C_j_it(C.begin(), a_accessor_j);
-    
-    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
-                                                    ++r_C_it, ++A_C_j_it) {
-        *r_C_it -= x_j * ET(*A_C_j_it); 
-    }
-    
-    // update of r_{S_{B}}
-    A_by_index_iterator     A_S_B_j_it(S_B.begin(), a_accessor_j);
-        
-    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
-                                                ++r_S_B_it, ++A_S_B_j_it) {
-        *r_S_B_it -= x_j * ET(*A_S_B_j_it);
-    }   
-}
-
-// update of the vectors r_C and r_S_B with "x_j" and "x_i" column
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_r_C_r_S_B__j_i(ET& x_j, ET& x_i)
-{
-    // update of vector r_{C}
-    A_by_index_accessor     a_accessor_j(*(qp_A+j));
-    A_by_index_accessor     a_accessor_i(*(qp_A+i));
-    
-    A_by_index_iterator     A_C_j_it(C.begin(), a_accessor_j);
-    A_by_index_iterator     A_C_i_it(C.begin(), a_accessor_i);
-    
-    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
-                                        ++r_C_it, ++A_C_j_it, ++A_C_i_it) {
-        *r_C_it += (x_i * ET(*A_C_i_it)) - (x_j * ET(*A_C_j_it)); 
-    }
-    
-    // update of vector r_{S_{B}}
-    A_by_index_iterator     A_S_B_j_it(S_B.begin(), a_accessor_j);
-    A_by_index_iterator     A_S_B_i_it(S_B.begin(), a_accessor_i);
-
-    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
-                                    ++r_S_B_it, ++A_S_B_j_it, ++A_S_B_i_it) {
-        *r_S_B_it += (x_i * ET(*A_S_B_i_it)) - (x_j * ET(*A_S_B_j_it)); 
-    }
-}
-
-// update of the vectors r_C and r_S_B with "x_i'" column
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_r_C_r_S_B__i(ET& x_i)
-{
-    // update of vector r_{C}
-    A_by_index_accessor     a_accessor_i(*(qp_A+i));
-    A_by_index_iterator     A_C_i_it(C.begin(), a_accessor_i);
-    
-    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end(); 
-                                                    ++r_C_it, ++A_C_i_it) {
-        *r_C_it += x_i * ET(*A_C_i_it); 
-    }
-    
-    // update of r_{S_{B}}
-    A_by_index_iterator     A_S_B_i_it(S_B.begin(), a_accessor_i);
-    
-    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
-                                                ++r_S_B_it, ++A_S_B_i_it) {
-        *r_S_B_it += x_i * ET(*A_S_B_i_it);
-    }   
-}
-
-
-// Update of w and r_B_O with "x_j" column.
-//
-// todo: could be optimized slightly by factoring out the factor 2
-// (which is implicitly contained in the pairwise accessor for D).
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_w_r_B_O__j(ET& x_j)
-{
-  // assertion checking:
-  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
-
-  // Note: we only do anything it we are dealing with a QP.
-  if (!check_tag(Is_linear())) {
-    D_pairwise_accessor     d_accessor_j(qp_D, j);
-    
-    // update of vector w:
-    for (int it = 0; it < qp_n; ++it)
-      w[it] -= d_accessor_j(it) * x_j;
-    
-    // update of r_B_O:
-    D_pairwise_iterator D_B_O_j_it(B_O.begin(), d_accessor_j);
-    for (Value_iterator r_B_O_it = r_B_O.begin();
-	 r_B_O_it != r_B_O.end();
-	 ++r_B_O_it, ++D_B_O_j_it)
-        *r_B_O_it -= *D_B_O_j_it * x_j;
-  }
-}
-
-// update of w and r_B_O with "x_j" and "x_i" column
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_w_r_B_O__j_i(ET& x_j, ET& x_i)
-{
-  // assertion checking:
-  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
-
-  // Note: we only do anything it we are dealing with a QP.
-  if (!check_tag(Is_linear())) {
-    D_pairwise_accessor     d_accessor_i(qp_D, i);
-    D_pairwise_accessor     d_accessor_j(qp_D, j);
-    
-    // update of vector w
-    for (int it = 0; it < qp_n; ++it)
-        w[it] += (d_accessor_i(it) * x_i) - (d_accessor_j(it) * x_j);
-    
-    // update of r_B_O
-    D_pairwise_iterator D_B_O_j_it(B_O.begin(), d_accessor_j);
-    D_pairwise_iterator D_B_O_i_it(B_O.begin(), d_accessor_i);
-    for (Value_iterator r_B_O_it = r_B_O.begin();
-	 r_B_O_it != r_B_O.end();
-	 ++r_B_O_it, ++D_B_O_j_it, ++D_B_O_i_it)
-        *r_B_O_it += (*D_B_O_i_it * x_i) - (*D_B_O_j_it * x_j);
-  }
-}
-
-// update of w and r_B_O with "x_i" column
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-update_w_r_B_O__i(ET& x_i)
-{
-  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
-
-  // Note: we only do anything it we are dealing with a QP.
-  if (!check_tag(Is_linear())) {
-
-    // update of vector w:
-    D_pairwise_accessor     d_accessor_i(qp_D, i);
-    
-    for (int it = 0; it < qp_n; ++it)
-        w[it] += d_accessor_i(it) * x_i;
-    
-    // update of r_B_O:
-    D_pairwise_iterator D_B_O_i_it(B_O.begin(), d_accessor_i);
-    for (Value_iterator r_B_O_it = r_B_O.begin();
-	 r_B_O_it != r_B_O.end();
-	 ++r_B_O_it, ++D_B_O_i_it)
-        *r_B_O_it += *D_B_O_i_it * x_i;
-  }
-}
-
-// Compute solution, meaning compute the solution vector x and the KKT
-// coefficients lambda.
-template < typename Q, typename ET, typename Tags >                                      // Standard form
-void  QP_solver<Q, ET, Tags>::
-compute_solution(Tag_true)
-{
-  // compute current solution, original variables and lambdas
-  inv_M_B.multiply( b_C.begin(), minus_c_B.begin(),
-		    lambda.begin(), x_B_O.begin());
-  
-  // compute current solution, slack variables
-  compute__x_B_S(no_ineq, Is_nonnegative());
-}
-
-// Compute solution, meaning compute the solution vector x and the KKT
-// coefficients lambda.
-template < typename Q, typename ET, typename Tags >                                      // Upper bounded
-void  QP_solver<Q, ET, Tags>::
-compute_solution(Tag_false)
-{ 
-  // compute the difference b_C - r_C
-  std::transform(b_C.begin(), b_C.begin()+C.size(), // Note: r_C.size() ==
-						    // C.size() always holds,
-						    // whereas b_C.size() >=
-						    // C.size() in general.
-		 r_C.begin(),  tmp_l.begin(), std::minus<ET>());
-        
-  // compute the difference minus_c_B - r_B_O:
-  if (is_phaseII && is_QP) {
-    std::transform(minus_c_B.begin(), minus_c_B.begin() + B_O.size(), 
-		   r_B_O.begin(), tmp_x.begin(), std::minus<ET>());
-    
-    // compute current solution, original variables and lambdas:
-    inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
-		      lambda.begin(), x_B_O.begin());
-  } else {                                          // r_B_O == 0
-    
-    // compute current solution, original variables and lambdas        
-    inv_M_B.multiply( tmp_l.begin(), minus_c_B.begin(),
-		      lambda.begin(), x_B_O.begin());
-  }
-  
-  // compute current solution, slack variables
-  compute__x_B_S( no_ineq, Is_nonnegative());
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-multiply__A_S_BxB_O(Value_iterator in, Value_iterator out) const
-{
-  // initialize with zero vector
-  std::fill_n( out, B_S.size(), et0);
-  
-  // foreach original column of A in B_O (artificial columns are zero in S_B
-  A_column              a_col;                             // except special)
-  Index_const_iterator  row_it, col_it;
-  Value_iterator        out_it;
-  //ET                    in_value;
-  for ( col_it = B_O.begin(); col_it != B_O.end(); ++col_it, ++in) {
-    const ET in_value = *in;
-    out_it   = out;
-    
-    if ( *col_it < qp_n) {	                        // original variable
-      a_col = *(qp_A+ *col_it);
-      
-      // foreach row of A in S_B
-      for ( row_it = S_B.begin(); row_it != S_B.end(); ++row_it,
-	      ++out_it) {
-	*out_it += ET( a_col[ *row_it]) * in_value;
-      }
-    } else {
-      if ( *col_it == art_s_i) {                  // special artificial
-	
-	// foreach row of 'art_s'
-	for ( row_it = S_B.begin(); row_it != S_B.end(); ++row_it,
-		++out_it) {
-	  *out_it += ET( art_s[ *row_it]) * in_value;
-	}
-      }
-    }
-  }
-}
-
-// compare the updated vector r_{C} with t_r_C=A_{C, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                         // Standard form
-bool  QP_solver<Q, ET, Tags>::
-check_r_C(Tag_true) const
-{
-    return true;
-}
-
-// compare the updated vector r_{C} with t_r_C=A_{C, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                         // Upper bounded
-bool  QP_solver<Q, ET, Tags>::
-check_r_C(Tag_false) const
-{
-    Values                  t_r_C;
-    // compute t_r_C from scratch
-    t_r_C.resize(C.size(), et0);
-    multiply__A_CxN_O(t_r_C.begin());
-    
-    // compare r_C and the from scratch computed t_r_C
-    bool failed = false;
-    int count = 0;
-    Value_const_iterator t_r_C_it = r_C.begin();
-    for (Value_const_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
-                                    ++r_C_it, ++t_r_C_it, ++count) {
-        if (*r_C_it != *t_r_C_it) {
-            failed = true;
-        }
-    }
-    return (!failed);
-}
-
-// compare the updated vector r_{S_B} with t_r_S_B=A_{S_B, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                             // Standard form
-bool  QP_solver<Q, ET, Tags>::
-check_r_S_B(Tag_true) const
-{
-    return true;
-}
-
-// compare the updated vector r_{S_B} with t_r_S_B=A_{S_B, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                             // Upper bounded
-bool  QP_solver<Q, ET, Tags>::
-check_r_S_B(Tag_false) const
-{
-    Values                  t_r_S_B;
-    // compute t_r_S_B from scratch
-    t_r_S_B.resize(S_B.size(), et0);
-    multiply__A_S_BxN_O(t_r_S_B.begin());
-    
-    // compare r_S_B and the from scratch computed t_r_S_B
-    bool failed = false;
-    int count = 0;
-    Value_const_iterator    t_r_S_B_it = t_r_S_B.begin();
-    for (Value_const_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
-                                    ++r_S_B_it, ++t_r_S_B_it, ++count) {
-        if (*r_S_B_it != *t_r_S_B_it) {
-            failed = true;
-        }
-    }
-    return (!failed);
-}
-
-
-// computes r_{B_{O}}:=2D_{B_O, N_O}x_{N_O} with upper bounding
-// OPTIMIZATION: If D is symmetric we can multiply by two at the end of the
-// computation of entry of r_B_O instead of each access to D
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-multiply__2D_B_OxN_O(Value_iterator out) const
-{
-    //initialize
-    std::fill_n( out, B_O.size(), et0);
-
-    Value_iterator          out_it;
-    ET                      value;
-    
-    // foreach entry in r_B_O
-    out_it = out;
-    for (Index_const_iterator row_it = B_O.begin(); row_it != B_O.end();
-                                                        ++row_it, ++out_it) {
-        D_pairwise_accessor d_accessor_i(qp_D, *row_it);
-        for (int i = 0; i < qp_n; ++i) {
-            if (!is_basic(i)) {
-                value = nonbasic_original_variable_value(i);
-                *out_it += d_accessor_i(i) * value;
-            }
-        }    
-    }
-}
-
-// compares the updated vector r_{B_O} with t_r_B_O=2D_{B_O, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                                // Standard form
-bool  QP_solver<Q, ET, Tags>::
-check_r_B_O(Tag_true) const
-{
-    return true;
-}
-
-// compares the updated vector r_{B_O} with t_r_B_O=2D_{B_O, N_O}x_{N_O}
-template < typename Q, typename ET, typename Tags >                                 // Upper bounded
-bool  QP_solver<Q, ET, Tags>::
-check_r_B_O(Tag_false) const
-{
-    Values                  t_r_B_O;
-    // compute t_r_B_O from scratch
-    t_r_B_O.resize(B_O.size(), et0);
-    multiply__2D_B_OxN_O(t_r_B_O.begin());
-    
-    // compare r_B_O and the from scratch computed t_r_B_O
-    bool failed = false;
-    int count = 0;
-    Value_const_iterator    t_r_B_O_it = t_r_B_O.begin();
-    for (Value_const_iterator r_B_O_it = r_B_O.begin(); r_B_O_it != r_B_O.end();
-                                    ++r_B_O_it, ++t_r_B_O_it, ++count) {
-        if (*r_B_O_it != *t_r_B_O_it) {
-            failed = true;
-        }
-    }
-    return (!failed);   
-}
-
-// compares the updated vector w with t_w=2D_{O,N_O}*x_N_O
-template < typename Q, typename ET, typename Tags >                             // Standard form
-bool  QP_solver<Q, ET, Tags>::
-check_w(Tag_true) const
-{
-    return true;
-}
-
-// compares the updated vector w with t_w=2D_O_N_O*x_N_O
-template < typename Q, typename ET, typename Tags >                             // Upper bounded
-bool  QP_solver<Q, ET, Tags>::
-check_w(Tag_false) const
-{
-    Values              t_w;
-    // compute t_w from scratch
-    t_w.resize( qp_n, et0);
-    multiply__2D_OxN_O(t_w.begin());
-    
-    // compare w and the from scratch computed t_w
-    bool  failed = false;
-    Value_const_iterator    t_w_it = t_w.begin();
-    for (int i = 0; i < qp_n; ++i, ++t_w_it) {
-        if (w[i] != *t_w_it) {
-            failed = true;
-        }
-    }
-    return (!failed);
-}
-
-// check basis inverse
-template < typename Q, typename ET, typename Tags >
-bool
-QP_solver<Q, ET, Tags>::
-check_basis_inverse()
-{
-    // diagnostic output
-    CGAL_qpe_debug {
-	vout4 << "check: " << std::flush;
-    }
-    bool ok;
-    if (is_phaseI) {
-    	ok = check_basis_inverse(Tag_true());
-    } else {
-        ok = check_basis_inverse( Is_linear());
-    }
-
-    // diagnostic output
-    CGAL_qpe_debug {
-	if ( ok) {
-	    vout4 << "check ok";
-	} else {
-	    vout4 << "check failed";
-	}
-	vout4 << std::endl;
-    }
-
-    return ok;
-}
-
-template < typename Q, typename ET, typename Tags >                                         // LP case
-bool  QP_solver<Q, ET, Tags>::
-check_basis_inverse( Tag_true)
-{
-    CGAL_qpe_debug {
-	vout4 << std::endl;
-    }
-    bool res = true;
-    unsigned int    row, rows =   static_cast<unsigned int>(C.size());
-    unsigned int    col, cols = static_cast<unsigned int>(B_O.size());
-    Index_iterator  i_it = B_O.begin();
-    Value_iterator  q_it;
-
-    
-    // BG: is this a real check?? How does the special artifical
-    // variable come in, e.g.? OK: it comes in through
-    // ratio_test_init__A_Cj
-    for ( col = 0; col < cols; ++col, ++i_it) {
-	ratio_test_init__A_Cj( tmp_l.begin(), *i_it,
-			       no_ineq);
-	inv_M_B.multiply_x( tmp_l.begin(), q_x_O.begin());
-
-	CGAL_qpe_debug {
-       	    if ( vout4.verbose()) {
-		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << " ||  ";
-		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << std::endl;
-	    }
-	}
-
-	q_it = q_x_O.begin();
-	for ( row = 0; row < rows; ++row, ++q_it) {
-	    if ( *q_it != ( row == col ? d : et0)) {
-		if ( ! vout4.verbose()) {
-		    std::cerr << std::endl << "basis-inverse check: ";
-		}
-		std::cerr << "failed ( row=" << row << " | col=" << col << " )"
-		          << std::endl;
-		res = false;
-	    }
-	}
-    }
-
-    return res;
-}
-
-template < typename Q, typename ET, typename Tags >                                         // QP case
-bool  QP_solver<Q, ET, Tags>::
-check_basis_inverse( Tag_false)
-{
-    bool res = true;
-    unsigned int    row, rows =   static_cast<unsigned int>(C.size());
-    unsigned int    col, cols = static_cast<unsigned int>(B_O.size());
-    Value_iterator  v_it;
-    Index_iterator  i_it;
-
-    CGAL_qpe_debug {
-	vout4 << std::endl;
-    }
-    // left part of M_B
-    std::fill_n( tmp_l.begin(), rows, et0);
-    for ( col = 0; col < rows; ++col) {
-
-	// get column of A_B^T (i.e. row of A_B)
-	row = ( has_ineq ? C[ col] : col);
-	v_it = tmp_x.begin();
-	for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++v_it) {
-	    *v_it = ( *i_it < qp_n ? *((*(qp_A+ *i_it))+ row) :  // original
-		      art_A[ *i_it - qp_n].first != static_cast<int>(row) ? et0 :// artific.
-		      ( art_A[ *i_it - qp_n].second ? -et1 : et1));
-	}
-// 	if ( art_s_i >= 0) {              // special artificial variable?
-// 	  CGAL_qpe_assertion (static_cast<int>(in_B.size()) == art_s_i+1);  
-// 	  // the special artificial variable has never been
-// 	  // removed from the basis, consider it
-// 	  tmp_x[ in_B[ art_s_i]] = art_s[ row];
-// 	} 
-// BG: currently, this check only runs in phase II, where we have no
-// articficials
-	CGAL_qpe_assertion (art_s_i < 0);
-	
-	inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
-			  q_lambda.begin(), q_x_O.begin());
-
-	CGAL_qpe_debug {
-	    if ( vout4.verbose()) {
-		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << "| ";
-		std::copy( tmp_x.begin(), tmp_x.begin()+cols,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << " ||  ";
-		std::copy( q_lambda.begin(), q_lambda.begin()+rows,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << " |  ";
-		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << std::endl;
-	    }
-	}
-
-	v_it = q_lambda.begin();
-	for ( row = 0; row < rows; ++row, ++v_it) {
-	    if ( *v_it != ( row == col ? d : et0)) {
-		if ( ! vout4.verbose()) {
-		    std::cerr << std::endl << "basis-inverse check: ";
-		}
-		std::cerr << "failed ( row=" << row << " | col=" << col << " )"
-		          << std::endl;
-		//		return false;
-		res = false;
-	    }
-	}
-	v_it = std::find_if( q_x_O.begin(), q_x_O.begin()+cols,
-			     std::bind2nd( std::not_equal_to<ET>(), et0));
-	if ( v_it != q_x_O.begin()+cols) {
-	    if ( ! vout4.verbose()) {
-		std::cerr << std::endl << "basis-inverse check: ";
-	    }
-	    std::cerr << "failed ( row=" << rows+(v_it-q_x_O.begin())
-		      << " | col=" << col << " )" << std::endl;
-	    // ToDo: return false;
-	    res = false;
-	}
-    }
-    vout4 << "= = = = = = = = = =" << std::endl;
-
-    // right part of M_B
-    if ( is_phaseI) std::fill_n( tmp_x.begin(), B_O.size(), et0);
-    i_it = B_O.begin();
-    for ( col = 0; col < cols; ++col, ++i_it) {
-	ratio_test_init__A_Cj  ( tmp_l.begin(), *i_it, 
-				 no_ineq);
-	ratio_test_init__2_D_Bj( tmp_x.begin(), *i_it, Tag_false());
-	inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
-			  q_lambda.begin(), q_x_O.begin());
-
-	CGAL_qpe_debug {
-	    if ( vout4.verbose()) {
-		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << "| ";
-		std::copy( tmp_x.begin(), tmp_x.begin()+cols,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << " ||  ";
-		std::copy( q_lambda.begin(), q_lambda.begin()+rows,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << " |  ";
-		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
-			   std::ostream_iterator<ET>( vout4.out(), " "));
-		vout4.out() << std::endl;
-	    }
-	}
-
-	v_it = std::find_if( q_lambda.begin(), q_lambda.begin()+rows,
-			     std::bind2nd( std::not_equal_to<ET>(), et0));
-	if ( v_it != q_lambda.begin()+rows) {
-	    if ( ! vout4.verbose()) {
-		std::cerr << std::endl << "basis-inverse check: ";
-	    }
-	    std::cerr << "failed ( row=" << v_it-q_lambda.begin()
-		      << " | col=" << col << " )" << std::endl;
-	    //	    return false;
-	    res = false;
-	}
-	v_it = q_x_O.begin();
-	for ( row = 0; row < cols; ++row, ++v_it) {
-	    if ( *v_it != ( row == col ? d : et0)) {
-		if ( ! vout4.verbose()) {
-		    std::cerr << std::endl << "basis-inverse check: ";
-		}
-		std::cerr << "failed ( row=" << row+rows << " | col="
-			  << col << " )" << std::endl;
-		//		return false;
-		res = false;
-	    }
-	}
-    }
-    return res;
-}
-
-// filtered strategies are only allowed if the input type as
-// indicated by C_entry is double; this may still fail if the
-// types of some other program entries are not double, but 
-// since the filtered stuff is internal anyway, we can probably
-// live with this simple check
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-set_pricing_strategy
-( Quadratic_program_pricing_strategy strategy)
-{
-    CGAL_qpe_assertion( phase() != 1);
-    CGAL_qpe_assertion( phase() != 2);
-
-    if (strategy == QP_DANTZIG)
-      strategyP = new QP_full_exact_pricing<Q, ET, Tags>;
-    else if (strategy == QP_FILTERED_DANTZIG)    
-      // choose between FF (double) and FE (anything else)
-      strategyP = 
-	new typename QP_solver_impl::Filtered_pricing_strategy_selector
-	<Q, ET, Tags, C_entry>::FF;
-    else if (strategy == QP_PARTIAL_DANTZIG)
-      strategyP = new QP_partial_exact_pricing<Q, ET, Tags>;
-    else if (strategy == QP_PARTIAL_FILTERED_DANTZIG
-	     || strategy == QP_CHOOSE_DEFAULT)   
-      // choose between PF (double) and PE (anything else)
-      strategyP = 
-	new typename QP_solver_impl::Filtered_pricing_strategy_selector
-	<Q, ET, Tags, C_entry>::PF;
-    else if (strategy == QP_BLAND) 
-      strategyP = new QP_exact_bland_pricing<Q, ET, Tags>;
-    CGAL_qpe_assertion(strategyP != static_cast<Pricing_strategy*>(0));
-   
-    if ( phase() != -1) strategyP->set( *this, vout2);
-}
-
-// diagnostic output
-// -----------------
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-set_verbosity( int verbose, std::ostream& stream)
-{
-    vout  = Verbose_ostream( verbose >  0, stream);
-    vout1 = Verbose_ostream( verbose == 1, stream);
-    vout2 = Verbose_ostream( verbose >= 2, stream);
-    vout3 = Verbose_ostream( verbose >= 3, stream);
-    vout4 = Verbose_ostream( verbose == 4, stream);
-    vout5 = Verbose_ostream( verbose == 5, stream);
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-print_program( ) const
-{
-    int  row, i;
-
-    // objective function
-    vout4.out() << std::endl << "objective function:" << std::endl;
-    if ( is_QP) {
-	vout4.out() << "--> output of MATRIX must go here <--";
-	vout4.out() << std::endl;
-    }
-    std::copy( qp_c, qp_c+qp_n,
-	       std::ostream_iterator<C_entry>( vout4.out(), " "));
-    vout4.out() << "(+ " << qp_c0 << ") ";
-    vout4.out() << std::endl;
-    vout4.out() << std::endl;
-
-    // constraints
-    vout4.out() << "constraints:" << std::endl;
-    for ( row = 0; row < qp_m; ++row) {
-
-	// original variables
-	for (i = 0; i < qp_n; ++i) 
-	  vout4.out() << *((*(qp_A+ i))+row) << ' ';
-
-	// slack variables
-	if ( ! slack_A.empty()) {
-	    vout4.out() << " |  ";
-	    for ( i = 0; i < static_cast<int>(slack_A.size()); ++i) {
-		vout4.out() << ( slack_A[ i].first != row ? " 0" :
-		               ( slack_A[ i].second ? "-1" : "+1")) << ' ';
-	    }
-	}
-
-	// artificial variables
-	if ( ! art_A.empty()) {
-	    vout4.out() << " |  ";
-	    for ( i = 0; i < static_cast<int>(art_A.size()); ++i) {
-	      if (art_s_i == i+qp_n+static_cast<int>(slack_A.size()))
-		vout4.out() << " * ";          // for special artificial column
-	      vout4.out() << ( art_A[ i].first != row ? " 0" :
-		             ( art_A[ i].second ? "-1" : "+1")) << ' ';
-	    }
-	}
-	if ( ! art_s.empty()) vout4.out() << " |  " << art_s[ row] << ' ';
-
-	// rhs
-	vout4.out() << " |  "
-		    << ( *(qp_r+ row) == CGAL::EQUAL      ? ' ' :
-		       ( *(qp_r+ row) == CGAL::SMALLER ? '<' : '>')) << "=  "
-		    << *(qp_b+ row);
-		    if (!is_nonnegative) {
-		        vout4.out() << " - " << multiply__A_ixO(row);
-		    }
-		    vout4.out() << std::endl;
-    }
-    vout4.out() << std::endl;
-    
-    // explicit bounds
-    if (!is_nonnegative) {
-        vout4.out() << "explicit bounds:" << std::endl; 
-        for (int i = 0; i < qp_n; ++i) {
-            if (*(qp_fl+i)) {                   // finite lower bound
-                vout4.out() << *(qp_l+i);
-            } else {                            // infinite lower bound
-                vout4.out() << "-inf";
-            }
-            vout4.out() << " <= x_" << i << " <= ";
-            if (*(qp_fu+i)) {
-                vout4.out() << *(qp_u+i);
-            } else {
-                vout4.out() << "inf";
-            }
-            vout4.out() << std::endl;
-        }
-    }
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-print_basis( ) const
-{
-    char label;
-    vout << "  basis: ";
-    CGAL_qpe_debug {
-      vout2 << "basic variables" << ( has_ineq ? "  " : "") << ":  ";
-    }
-    std::copy( B_O.begin(), B_O.end  (),
-	       std::ostream_iterator<int>( vout.out(), " "));
-    CGAL_qpe_debug {
-      if ( vout2.verbose()) {
-	if ( has_ineq && ( ! slack_A.empty())) {
-	  vout2.out() << " |  ";
-	  std::copy( B_S.begin(), B_S.end(),
-		     std::ostream_iterator<int>( vout2.out(), " "));
-	}
-	if ( is_phaseI) {
-	  vout2.out() << " (# of artificials: " << art_basic << ')';
-	}
-	if ( has_ineq) {
-	  vout2.out() << std::endl
-		      << "basic constraints:  ";
-	  for (Index_const_iterator i_it = 
-		 C.begin(); i_it != C.end(); ++i_it) {
-	    label = (*(qp_r+ *i_it) == CGAL::EQUAL) ? 'e' : 'i';
-	    vout2.out() << *i_it << ":" << label << " ";
-	  }
-	  /*
-	    std::copy( C.begin(), C.begin()+(C.size()-slack_A.size()),
-	    std::ostream_iterator<int>( vout2.out(), " "));
-	    if ( ! slack_A.empty()) {
-	    vout2.out() << " |  ";
-	    std::copy( C.end() - slack_A.size(), C.end(),
-	    std::ostream_iterator<int>( vout2.out(), " "));
-	    }
-	  */
-	}
-	if ( vout3.verbose()) {
-	  vout3.out() << std::endl
-		      << std::endl
-		      << "    in_B: ";
-	  std::copy( in_B.begin(), in_B.end(),
-		     std::ostream_iterator<int>( vout3.out(), " "));
-	  if ( has_ineq) {
-	    vout3.out() << std::endl
-			<< "    in_C: ";
-	    std::copy( in_C.begin(), in_C.end(),
-		       std::ostream_iterator<int>( vout3.out(), " "));
-	  }
-	}
-      }
-    }
-    vout.out() << std::endl;
-    CGAL_qpe_debug {
-      vout4 << std::endl << "basis-inverse:" << std::endl;
-    }
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-print_solution( ) const
-{
-  CGAL_qpe_debug {
-    if ( vout3.verbose()) {
-	   vout3.out() << std::endl
-            << "     b_C: ";
-	   std::copy( b_C.begin(), b_C.begin()+C.size(),
-		   std::ostream_iterator<ET>( vout3.out()," "));
-	   vout3.out() << std::endl
-            << "  -c_B_O: ";
-	   std::copy( minus_c_B.begin(), minus_c_B.begin()+B_O.size(),
-		   std::ostream_iterator<ET>( vout3.out()," "));
-	   if (!is_nonnegative) {
-	       vout3.out() << std::endl
-                << "     r_C: ";
-	       std::copy( r_C.begin(), r_C.begin()+r_C.size(),
-	           std::ostream_iterator<ET>( vout3.out(), " "));
-	       vout3.out() << std::endl
-	           << "   r_B_O: ";
-	       std::copy( r_B_O.begin(), r_B_O.begin()+r_B_O.size(),
-	           std::ostream_iterator<ET>( vout3.out(), " "));
-	       if (r_B_O.size() == 0)
-		 vout3.out() << "< will only be allocated in phase II>";
-
-	   }
-	   vout3.out() << std::endl;
-    }
-    if ( vout2.verbose()) {
-        vout2.out() << std::endl << "  lambda: ";
-        std::copy( lambda.begin(), lambda.begin()+C.size(),
-            std::ostream_iterator<ET>( vout2.out(), " "));
-        vout2.out() << std::endl << "   x_B_O: ";
-        std::copy( x_B_O.begin(), x_B_O.begin()+B_O.size(),
-            std::ostream_iterator<ET>( vout2.out(), " "));
-        vout2.out() << std::endl;
-        if (!is_nonnegative) {
-            vout2.out() << "   x_N_O: ";
-            for (int i = 0; i < qp_n; ++i) {
-                if (!is_basic(i)) {
-                    vout2.out() << d * 
-		      nonbasic_original_variable_value(i);
-                    vout2.out() << " ";    
-                }
-            }
-            vout2.out() << std::endl;
-        }
-        if ( has_ineq) {
-            vout2.out() << "   x_B_S: ";
-            std::copy( x_B_S.begin(), x_B_S.begin()+B_S.size(),
-                std::ostream_iterator<ET>( vout2.out()," "));
-            vout2.out() << std::endl;
-        }
-        const ET denom = inv_M_B.denominator();
-        vout2.out() << "   denominator: " << denom << std::endl;
-        vout2.out() << std::endl;
-    }
-  }
-  vout << "  ";
-  vout.out() 
-    << "solution: " 
-    << solution_numerator() << " / " << solution_denominator() 
-    << "  ~= " 
-    << to_double
-    (CGAL::Quotient<ET>(solution_numerator(), solution_denominator()))
-    << std::endl;
-  CGAL_qpe_debug {
-      vout2 << std::endl;
-  }
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-print_ratio_1_original(int k, const ET& x_k, const ET& q_k)
-{
-    if (is_nonnegative) {                      // => direction== 1
-        if (q_k > et0) {                            // check for lower bound
-            vout2.out() << "t_O_" << k << ": "
-            << x_k << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-            << std::endl;
-        } else if (q_k < et0) {                     // check for upper bound
-            vout2.out() << "t_O_" << k << ": "
-            << "inf" << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-            << std::endl;
-        } else {                                    // q_k == 0
-            vout2.out() << "t_O_" << k << ": "
-            << "inf"
-            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-            << std::endl;
-        }
-    } else {                                        // upper bounded
-        if (q_k * ET(direction) > et0) {            // check for lower bound
-            if (B_O[k] < qp_n) {                         // original variable
-                if (*(qp_fl+B_O[k])) {                   // finite lower bound
-                    vout2.out() << "t_O_" << k << ": "
-                    << x_k - (d * ET(*(qp_l+B_O[k]))) << '/' << q_k
-                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                    << std::endl;
-                } else {                            // lower bound -infinity
-                    vout2.out() << "t_O_" << k << ": "
-                    << "-inf" << '/' << q_k
-                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                    << std::endl;                
-                }
-            } else {                                // artificial variable
-                vout2.out() << "t_O_" << k << ": "
-                << x_k << '/' << q_k
-                << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                << std::endl;
-            }
-        } else if (q_k * ET(direction) < et0) {     // check for upper bound
-            if (B_O[k] < qp_n) {                         // original variable
-                if (*(qp_fu+B_O[k])) {                   // finite upper bound
-                    vout2.out() << "t_O_" << k << ": "
-                    << (d * ET(*(qp_l+B_O[k]))) - x_k << '/' << q_k
-                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                    << std::endl;                    
-                } else {                            // upper bound infinity
-                    vout2.out() << "t_O_" << k << ": "
-                    << "inf" << '/' << q_k
-                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                    << std::endl;
-                }
-            } else {                                // artificial variable
-                vout2.out() << "t_O_" << k << ": "
-                << "inf" << '/' << q_k
-                << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-                << std::endl;
-            }
-        } else {                                    // q_k == 0
-            vout2.out() << "t_O_" << k << ": "
-            <<  "inf"
-            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
-            << std::endl;
-        }
-    }
-}
-
-template < typename Q, typename ET, typename Tags >
-void  QP_solver<Q, ET, Tags>::
-print_ratio_1_slack(int k, const ET& x_k, const ET& q_k)
-{
-    if (is_nonnegative) {                      // => direction == 1
-        if (q_k > et0) {                            // check for lower bound
-            vout2.out() << "t_S_" << k << ": "
-            << x_k << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
-            << std::endl;
-        } else {                                    // check for upper bound
-            vout2.out() << "t_S_" << k << ": "
-            << "inf" << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
-            << std::endl;        
-        }
-    } else {                                        // upper bounded
-        if (q_k * ET(direction) > et0) {            // check for lower bound
-            vout2.out() << "t_S_" << k << ": "
-            << x_k << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
-            << std::endl;            
-        } else if (q_k * ET(direction) < et0) {     // check for upper bound
-            vout2.out() << "t_S_" << k << ": "
-            << "inf" << '/' << q_k
-            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
-            << std::endl;
-        } else {                                    // q_k == 0
-            vout2.out() << "t_S_" << k << ": "
-            << "inf"
-            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
-            << std::endl;
-        }
-    }
-}
-
-
-template < typename Q, typename ET, typename Tags >
-const char*  QP_solver<Q, ET, Tags>::
-variable_type( int k) const
-{
-    return ( k <        qp_n                 ? "original"  :
-	   ( k < static_cast<int>( qp_n+slack_A.size()) ? "slack"     :
-	                                       "artificial"));
-}
-
-template < typename Q, typename ET, typename Tags > 
-bool QP_solver<Q, ET, Tags>::
-is_artificial(int k) const
-{
-    return (k >= static_cast<int>(qp_n+slack_A.size())); 
-}
-
-template < typename Q, typename ET, typename Tags > 
-int QP_solver<Q, ET, Tags>::
-get_l() const
-{
-    return l;
-}
-
-} //namespace CGAL
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/basic.h b/3rdparty/CGAL-4.6/include/CGAL/QP_solver/basic.h
deleted file mode 100644
index 77a3326..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/basic.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr
-//                 Bernd Gaertner <gaertner at inf.ethz.ch>
-//                 Franz Wessendorp
-//                 Kaspar Fischer
-
-#ifndef CGAL_QP_SOLVER_BASIC_H
-#define CGAL_QP_SOLVER_BASIC_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Quotient.h>
-#include <CGAL/QP_solver/assertions.h>
-#include <CGAL/QP_solver/debug.h>
-
-#endif // CGAL_QP_SOLVER_BASIC_H
-
-// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/CGAL_Qt4_config.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/CGAL_Qt4_config.h
deleted file mode 100644
index 869c027..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/CGAL_Qt4_config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_QT4_CONFIG_H
-#define CGAL_QT4_CONFIG_H
-
-#include <QtCore/qglobal.h>
-
-#ifdef CGAL_Qt4_DLL
-#  ifdef CGAL_Qt4_EXPORTS
-#    define CGAL_QT4_EXPORT Q_DECL_EXPORT
-#  else
-#    define CGAL_QT4_EXPORT Q_DECL_IMPORT
-#  endif
-#else
-// empty definition
-#  define CGAL_QT4_EXPORT
-#endif
-
-#endif // CGAL_QT4_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/Converter.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/Converter.h
deleted file mode 100644
index e61564b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/Converter.h
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-#ifndef CGAL_QT_CONVERTER_H
-#define CGAL_QT_CONVERTER_H
-
-#include <QPointF>
-#include <QLineF>
-#include <QRectF>
-#include <QPolygonF>
-#include <list>
-
-#include <CGAL/intersection_2.h>
-#include <CGAL/auto_link/Qt4.h>
-
-#include <boost/mpl/has_xxx.hpp>
-
-namespace CGAL {
-
-namespace internal {
-
-BOOST_MPL_HAS_XXX_TRAIT_DEF( Circular_arc_point_2 )
-
-template < class K, bool b = has_Circular_arc_point_2< K >::value >
-struct get_Circular_arc_point_2
-{
-    struct type { };
-};
-
-template < class K >
-struct get_Circular_arc_point_2< K, true >
-{
-    typedef typename K::Circular_arc_point_2 type;
-};
-
-}
-
-namespace Qt {
-
-template <typename K>
-class Converter {
-public:
-  typedef typename K::Point_2              CGAL_Point_2;
-  typedef typename K::Segment_2            CGAL_Segment_2;
-  typedef typename K::Ray_2                CGAL_Ray_2;
-  typedef typename K::Line_2               CGAL_Line_2;
-  typedef typename K::Triangle_2           CGAL_Triangle_2;
-  typedef typename K::Iso_rectangle_2      CGAL_Iso_rectangle_2;
-  typedef typename internal::get_Circular_arc_point_2< K >::type
-    CGAL_Circular_arc_point_2;
-
-private:
-  bool clippingRectIsInitialized;
-  CGAL_Iso_rectangle_2 clippingRect;
-  
-
-public:
-
-  Converter()
-    : clippingRectIsInitialized(false)
-  {
-  }
-
-  Converter(QRectF rect)
-  {
-    if(rect.isValid()) {
-      clippingRect = this->operator()(rect);
-      clippingRectIsInitialized = true;
-    }
-    else
-      clippingRectIsInitialized = false;
-  }
-
-  CGAL_Point_2 operator()(const QPointF& qp) const
-  {
-    return CGAL_Point_2(qp.x(), qp.y());
-  }
-
-
-  QPointF operator()(const CGAL_Point_2& p) const
-  {
-    return QPointF(to_double(p.x()), to_double(p.y()));
-  }
-
-  QPointF operator()(const CGAL_Circular_arc_point_2& p) const
-  {
-    return QPointF(to_double(p.x()), to_double(p.y()));
-  }
-
-      
-  CGAL_Segment_2 operator()(const QLineF& qs) const
-  {
-    return CGAL_Segment_2(operator()(qs.p1()), operator()(qs.p2()));
-  }
- 
-  QLineF operator()(const CGAL_Segment_2 &s) const
-  {
-    return QLineF(operator()(s.source()), operator()(s.target()));
-  }
-
-  
-  CGAL_Iso_rectangle_2 operator()(const QRectF& qr) const
-  {
-    return CGAL_Iso_rectangle_2(operator()(qr.bottomLeft()), operator()(qr.topRight()));
-  }
-
-
-  QRectF operator()(const CGAL_Iso_rectangle_2& r) const
-  {
-    return QRectF(operator()(r[3]), operator()(r[1])).normalized();  // top left, bottom right
-  }
-
-
-  QRectF operator()(const CGAL::Bbox_2& bb) const
-  {
-    return QRectF(bb.xmin(),
-		  bb.ymin(),
-		  bb.xmax()-bb.xmin(),
-		  bb.ymax()-bb.ymin());
-  }
-
-     
-  QLineF operator()(const CGAL_Ray_2 &r) const
-  {
-    CGAL_assertion(clippingRectIsInitialized);
-    Object o = CGAL::intersection(r, clippingRect);
-    typedef CGAL_Segment_2 Segment_2;
-    typedef CGAL_Point_2 Point_2;
-    if(const Segment_2 *s = CGAL::object_cast<Segment_2>(&o)){
-      return this->operator()(*s);
-    } else if(const Point_2 *p = CGAL::object_cast<Point_2>(&o)){
-      return QLineF(operator()(*p), operator()(*p));
-    }
-    return QLineF();
-  }
-
-  QLineF operator()(const CGAL_Line_2 &l) const
-  {
-    CGAL_assertion(clippingRectIsInitialized);
-    Object o = CGAL::intersection(l, clippingRect);
-    typedef CGAL_Segment_2 Segment_2;
-    typedef CGAL_Point_2 Point_2;
-    if(const Segment_2 *s = CGAL::object_cast<Segment_2>(&o)){
-      return this->operator()(*s);
-    } else if(const Point_2 *p = CGAL::object_cast<Point_2>(&o)){
-      return QLineF(operator()(*p), operator()(*p));
-    }
-    return QLineF();
-  }
-
-  QPolygonF operator()(const CGAL_Triangle_2 &t) const
-  {
-    QPolygonF qp;
-    qp << operator()(t.vertex(0)) << operator()(t.vertex(1)) << operator()(t.vertex(2));
-    return qp;
-  }
-
-
-  void operator()(std::list< CGAL_Point_2 >& p, const QPolygonF& qp) const
-  {
-    for(int i = 0; i < qp.size(); i++){
-      p.push_back(operator()(qp[i]));
-    }
-  }
-
-};
-
-} // namesapce Qt
-} // namespace CGAL
-#endif // CGAL_QT_CONVERTER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h
deleted file mode 100644
index 8f283c2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
-#define CGAL_QT_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
-
-#include <CGAL/Qt/ConstrainedTriangulationGraphicsItem.h>
-#include <QBrush>
-
-namespace CGAL {
-
-namespace Qt {
-
-template <typename T>
-class DelaunayMeshTriangulationGraphicsItem : public ConstrainedTriangulationGraphicsItem<T>
-{
-  typedef ConstrainedTriangulationGraphicsItem<T> Base;
-
-public:
-  DelaunayMeshTriangulationGraphicsItem(T  * t_)
-    : Base(t_),
-      visible_in_domain(true),
-      in_domain_brush(::Qt::blue)
-  {
-  }
-  
-  void operator()(typename T::Face_handle fh);
-
-  const QBrush& facesInDomainBrush() const
-  {
-    return in_domain_brush;
-  }
-
-  void setFacesInDomainBrush(const QBrush& brush)
-  {
-    in_domain_brush = brush;
-  }
-
-  bool visibleFacesInDomain() const
-  {
-    return visible_in_domain;
-  }
-
-  void setVisibleFacesInDomain(const bool b)
-  {
-    visible_in_domain = b;
-    this->update();
-  }
-
-protected:
-  void drawAll(QPainter *painter);
-
-  bool visible_in_domain;
-  QBrush in_domain_brush;
-};
-
-template <typename T>
-void 
-DelaunayMeshTriangulationGraphicsItem<T>::drawAll(QPainter *painter)
-{
-  if(visibleFacesInDomain()) {
-    this->painterostream = PainterOstream<typename T::Geom_traits>(painter);
-    painter->setBrush(facesInDomainBrush());
-    painter->setPen(::Qt::NoPen);
-    for(typename T::Finite_faces_iterator fit = this->t->finite_faces_begin();
-	fit != this->t->finite_faces_end();
-	++fit){
-      if(fit->is_in_domain()){
-	this->painterostream << this->t->triangle(fit);
-      }
-    }
-  }
-  Base::drawAll(painter);
-}
-
-template <typename T>
-void 
-DelaunayMeshTriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
-{
-  if(visibleFacesInDomain()) {
-    if(fh->is_in_domain()){
-      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
-      this->m_painter->setBrush(facesInDomainBrush());
-      this->m_painter->setPen(::Qt::NoPen) ;
-      this->painterostream << this->t->triangle(fh);
-    }
-  }
-  Base::operator()(fh);
-}
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_Q_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/DemosMainWindow.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/DemosMainWindow.h
deleted file mode 100644
index 8cd5096..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/DemosMainWindow.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_DEMOS_MAIN_WINDOW_H
-#define CGAL_QT_DEMOS_MAIN_WINDOW_H
-#include <iostream>
-#include <QVector>
-#include <QMainWindow>
-#include <QDragEnterEvent>
-#include <QDropEvent>
-#include <CGAL/auto_link/Qt4.h>
-#include <CGAL/export/Qt4.h>
-#include <CGAL/Qt/resources.h>
-
-// forward declaration
-class QLabel;
-class QGraphicsView;
-class QAction;
-class QMenu;
-
-namespace CGAL {
-namespace Qt {
-
-// forward declaration
-class GraphicsViewNavigation;
-
-class CGAL_QT4_EXPORT DemosMainWindow : public QMainWindow 
-{
-  Q_OBJECT
-
-public:
-  enum Option { NoOption = 0x0,
-		Size     = 0x1,
-		Position = 0x2,
-		State    = 0x4};
-
-  Q_DECLARE_FLAGS(Options, Option)
-
-  virtual void dragEnterEvent(QDragEnterEvent *event);
-  virtual void dropEvent(QDropEvent *event);
-
-  virtual void open(QString)
-  {
-    std::cerr << "You should implement open(QString);" << std::endl; 
-  }
-
-public:
-  unsigned int maxNumberOfRecentFiles() const ;
-
-public slots:
-  void setMaxNumberOfRecentFiles(const unsigned int);
-
-private:
-  QMenu* getMenu(QString objectName, QString title);
-  void popupAboutBox(QString title, QString html_resource_name);
-  QMenu* getHelpMenu();
-
-protected:
-  DemosMainWindow (QWidget * parent = 0, ::Qt::WindowFlags flags = 0 );
-  void setupStatusBar();
-  void addNavigation(QGraphicsView*);
-  void setupOptionsMenu(QMenu* menu  = 0);
-  void addAboutCGAL(QMenu* menu  = 0);
-  void addAboutDemo(QString htmlResourceName, QMenu* menu  = 0);
-  void setupExportSVG(QAction*, QGraphicsView*);
-
-  void addRecentFiles(QMenu* menu, QAction* insertBefore = 0);
-
-  void writeState(QString groupname = "MainWindow");
-  void readState(QString groupname = "MainWindow",
-		 Options what_to_save = Options(Size|State));
-
-protected slots:
-  void setUseAntialiasing(bool checked);
-  void setUseOpenGL(bool checked);
-  void popupAboutCGAL();
-  void popupAboutDemo();
-
-  void exportSVG();
-
-  void openRecentFile_aux();
-  void addToRecentFiles(QString fileName);
-  void updateRecentFileActions();
-
-signals:
-  void openRecentFile(QString filename);
-
-protected:
-  QGraphicsView* view;
-  GraphicsViewNavigation* navigation;
-  QLabel* xycoord ;
-
-  QAction *actionUse_OpenGL;
-  QAction *actionUse_Antialiasing;
-  QAction *actionAbout;
-  QAction *actionAboutCGAL;
-
-  QString aboutHtmlResource;
-
-  QAction* recentFilesSeparator;
-  unsigned int maxNumRecentFiles;
-  QVector<QAction*> recentFileActs;
-}; // end class DemosMainWindow
-
-} // namespace Qt
-} // namespace CGAL
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(CGAL::Qt::DemosMainWindow::Options)
-
-#endif // CGAL_QT_DEMOS_MAIN_WINDOW_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsItem.h
deleted file mode 100644
index c560041..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsItem.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_ITEM_H
-#define CGAL_QT_GRAPHICS_ITEM_H
-
-#include <CGAL/export/Qt4.h>
-#include <CGAL/auto_link/Qt4.h>
-#include <QObject>
-#include <QGraphicsItem>
-#ifndef Q_MOC_RUN
-#  include <CGAL/Object.h>
-#endif
-
-
-
-namespace CGAL {
-namespace Qt {
-
-class CGAL_QT4_EXPORT GraphicsItem : public QObject, public QGraphicsItem {
-
-  Q_OBJECT
-#if QT_VERSION >= 0x040600
-  Q_INTERFACES(QGraphicsItem)
-#endif
-public slots:
-
-  virtual void modelChanged() = 0;
-};
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircleInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircleInput.h
deleted file mode 100644
index 9cc574d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircleInput.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
-
-#include <QGraphicsView>
-#include <QRectF>
-#include <QPointF>
-#include <QGraphicsItem>
-#include <QGraphicsEllipseItem> 
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-#include <QPainter>
-#include <QStyleOption>
-
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Qt/GraphicsViewInput.h>
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename K>
-class GraphicsViewCircleInput : public GraphicsViewInput
-{
-public:
-  GraphicsViewCircleInput(QObject *parent, QGraphicsScene* s, int pointsOnCircle=1); 
-
-protected:
-    
-  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  virtual void keyPressEvent(QKeyEvent *event);
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-
-  
-
-private:
-
-  typedef typename K::Point_2 Point_2;
-  int m_pointsOnCircle; // 1, 2 or 3
-  int count;
-  QGraphicsEllipseItem *qcircle;
-  QPointF qp, qq, qr;
-  Point_2 p, q, r;
-  QGraphicsScene *scene_;  
-  Converter<K> convert;
-};
-
-
-template <typename K>
-GraphicsViewCircleInput<K>::GraphicsViewCircleInput(QObject *parent, QGraphicsScene* s, int pointsOnCircle)
-  : GraphicsViewInput(parent), m_pointsOnCircle(pointsOnCircle), 
-    count(0), qcircle(new QGraphicsEllipseItem()), scene_(s)
-{
-  qcircle->hide();
-  s->addItem(qcircle);
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{ 
-  if(event->modifiers()  & ::Qt::ShiftModifier){
-    return;
-  }
-  if(m_pointsOnCircle < 3){
-    if(count == 0){
-      qp = event->scenePos();
-      p = convert(qp);
-      count = 1;
-    } else {
-      qq = event->scenePos();
-      if(qp != qq){
-	qcircle->hide();
-	q = convert(qq);
-	if(m_pointsOnCircle == 1){
-	  typename K::FT sd = squared_distance(p,q);
-	  emit generate(CGAL::make_object(std::make_pair(p, sd)));
-	} else {
-	  emit generate(CGAL::make_object(std::make_pair(p, q)));
-	}
-	count = 0;
-      } 
-    }
-  } else {
-    if(count == 0){
-      qp = event->scenePos();
-      p = convert(qp);
-      count = 1;
-    } else if(count == 1){
-      qq = event->scenePos();
-      if(qp != qq){
-	q = convert(qq);
-	count = 2;
-      }
-    } else { // count == 2
-      qr  = event->scenePos();
-      r = convert(qr);
-      typename K::Collinear_2 collinear;
-      if(! collinear(p,q,r)){
-	emit generate(CGAL::make_object(CGAL::make_array(p,q,r)));
-	count = 0;
-      }
-    }
-  }
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircleInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  CGAL::Bbox_2 bb;
-  typename K::Construct_circle_2 construct_circle;
-  if(count == 0){
-    qcircle->hide();
-    return;
-  } else if(count == 1) {
-    qq = event->scenePos();
-    q = convert(qq);
-    if(qp == qq){
-      qcircle->hide();
-      return;
-    } else {
-      if(m_pointsOnCircle == 1){
-	typename K::FT sd = squared_distance(p,q);
-	bb = construct_circle(p, sd).bbox();
-      } else {
-	bb = construct_circle(p, q).bbox();
-      }
-    }
-  } else { // count == 2
-    qr = event->scenePos();
-    r = convert(qr);
-    typename K::Collinear_2 collinear;
-    if(collinear(p,q,r)){
-      qcircle->hide();
-      return;
-    } else {
-      bb = construct_circle(p, q, r).bbox();
-    }
-  }
-  qcircle->setRect(bb.xmin(), bb.ymin(), bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin());
-  qcircle->show();
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircleInput<K>::keyPressEvent ( QKeyEvent * event ) 
-{
-  if(event->key() == ::Qt::Key_Delete){
-    if(count>0){
-      --count;
-    }
-  }
-}
-
-
-
-template <typename K>
-bool 
-GraphicsViewCircleInput<K>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::KeyPress) {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-    keyPressEvent(keyEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-} // namespace Qt
-
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircularArcInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircularArcInput.h
deleted file mode 100644
index 7eba4e5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewCircularArcInput.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
-
-#include <QGraphicsView>
-#include <QRectF>
-#include <QPointF>
-#include <QGraphicsItem>
-#include <QGraphicsEllipseItem> 
-#include <QGraphicsLineItem> 
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-#include <QPainter>
-#include <QStyleOption>
-
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/CircularArcGraphicsItem.h>
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename K>
-class GraphicsViewCircularArcInput : public GraphicsViewInput
-{
-public:
-  GraphicsViewCircularArcInput(QObject *parent, QGraphicsScene* s); 
-  ~GraphicsViewCircularArcInput();
-
-protected:
-    
-  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  virtual void keyPressEvent(QKeyEvent *event);
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-
-  
-
-private:
-  typedef typename K::Circular_arc_2 Circular_arc_2;
-  typedef typename K::Line_arc_2 Line_arc_2;
-  typedef typename K::Point_2 Point_2;
-  typedef typename K::Segment_2 Segment_2;
-
-  int count;
-  QGraphicsLineItem *qline;
-  CircularArcGraphicsItem<K> *qcarc;
-  QPointF qp, qq, qr;
-  Point_2 p, q, r, ap, aq, ar;
-  QGraphicsScene *scene_;  
-  Converter<K> convert;
-};
-
-
-template <typename K>
-GraphicsViewCircularArcInput<K>::GraphicsViewCircularArcInput(QObject *parent, QGraphicsScene* s)
-  : GraphicsViewInput(parent), count(0), scene_(s)
-{
-  qline = new QGraphicsLineItem();
-  qcarc = new CircularArcGraphicsItem<K>();
-  qline->hide();
-  qcarc->hide();
-  s->addItem(qline);
-  s->addItem(qcarc);
-}
-
-
-template <typename K>
-GraphicsViewCircularArcInput<K>::~GraphicsViewCircularArcInput()
-{
-  // do not delete qline and qcarc, because 's' owns them and will delete them.
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircularArcInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if(event->modifiers()  & ::Qt::ShiftModifier){
-    return;
-  }
-  if(count == 0){
-    qp = event->scenePos();
-    p = convert(qp);
-    qline->setLine(QLineF(qp, qp));
-    qline->show();
-    count = 1;
-  } else if(count == 1){
-    qq = event->scenePos();
-    qline->setLine(QLineF(qp, qq));
-    q = convert(qq);
-    if( (event->button() == ::Qt::RightButton) && (p != q) ){
-      qline->hide();
-      emit generate(CGAL::make_object(Line_arc_2(Segment_2(p,q))));
-      count = 0;
-    } else {
-      count = 2;
-    }
-  } else if(count == 2){
-    qr  = event->scenePos();
-    r = convert(qr);
-    typename K::Collinear_2 collinear;
-    if(! collinear(p,q,r)){
-      qcarc->hide();
-      emit generate(make_object(qcarc->arc()));
-      count = 0;
-    }
-  }
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircularArcInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  if(count == 0){
-    qcarc->hide();
-    qline->hide();
-    return;
-  } else if(count == 1) {
-    qcarc->hide();
-    qq = event->scenePos();
-    q = convert(qq);
-    qline->setLine(QLineF(qp, qq));
-    qline->show();
-  } else if(count == 2){
-    qline->hide();
-    qr = event->scenePos();
-    r = convert(qr);
-    typename K::Collinear_2 collinear;
-    if(collinear(p,q,r)){
-      qcarc->hide();
-      return;
-    } else {
-      if(CGAL::orientation(p, q, r) == CGAL::RIGHT_TURN) {
-	ap = p; ar = r; aq = q;
-	qcarc->setArc(Circular_arc_2(p,r,q));
-      } else {
-	ap = q; ar = r; aq = p;
-	qcarc->setArc(Circular_arc_2(q,r,p));
-      }
-      qcarc->show();
-    }
-  }
-}
-
-
-template <typename K>
-void 
-GraphicsViewCircularArcInput<K>::keyPressEvent ( QKeyEvent * event ) 
-{
-  if(event->key() == ::Qt::Key_Delete){
-    if(count>0){
-      --count;
-    }
-  }
-  
-  if(event->key() == ::Qt::Key_Escape){
-    count = 0;
-  }
-}
-
-
-
-template <typename K>
-bool 
-GraphicsViewCircularArcInput<K>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::KeyPress) {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-    keyPressEvent(keyEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewInput.h
deleted file mode 100644
index a9d8960..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewInput.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_INPUT_H
-#include <CGAL/export/Qt4.h>
-#include <CGAL/auto_link/Qt4.h>
-#ifndef Q_MOC_RUN
-#  include <CGAL/Object.h>
-#endif
-#include <QObject>
-
-namespace CGAL {
-namespace Qt {
-class CGAL_QT4_EXPORT GraphicsViewInput  : public QObject
-{
-  Q_OBJECT
-
-public:
-  GraphicsViewInput(QObject* parent) 
-    : QObject(parent)
-  {}
-
-signals:
-  void generate(CGAL::Object o);
-  void modelChanged();
-
-public slots:
-
-  virtual void processInput(CGAL::Object /*o*/) {}
-
-};
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h
deleted file mode 100644
index 514099f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
-
-#include <QGraphicsView>
-#include <QRectF>
-#include <QPointF>
-#include <QGraphicsItem>
-#include <QGraphicsRectItem> 
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-#include <QPainter>
-#include <QStyleOption>
-
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Qt/GraphicsViewInput.h>
-
-#include <CGAL/array.h>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename K>
-class GraphicsViewIsoRectangleInput : public GraphicsViewInput
-{
-public:
-  GraphicsViewIsoRectangleInput(QObject *parent, QGraphicsScene* s); 
-  ~GraphicsViewIsoRectangleInput();
-
-protected:
-    
-  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  virtual void keyPressEvent(QKeyEvent *event);
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-
-  
-
-private:
-
-  typedef typename K::Point_2 Point_2;
-  QPointF qp, qq, qr;
-  Point_2 p, q, r;
-  QGraphicsRectItem *rectItem;
-  QPointF rect_first_point;
-  QGraphicsScene *scene_;  
-  Converter<K> convert;
-};
-
-
-template <typename K>
-GraphicsViewIsoRectangleInput<K>::GraphicsViewIsoRectangleInput(QObject *parent, QGraphicsScene* s)
-  : GraphicsViewInput(parent), rectItem(new QGraphicsRectItem), scene_(s)
-{
-  rectItem->setBrush(QBrush());
-  scene_->addItem(rectItem);
-  rectItem->hide();
-  rectItem->setZValue(10000);
-}
-
-template <typename K>
-GraphicsViewIsoRectangleInput<K>::~GraphicsViewIsoRectangleInput()
-{
-  delete rectItem;
-}
-
-
-template <typename K>
-void 
-GraphicsViewIsoRectangleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if(event->modifiers()  & ::Qt::ShiftModifier){
-    return;
-  }
-  if(event->button() == ::Qt::LeftButton) {
-    if(rectItem->isVisible()) {
-      // we have clicked twice
-      emit generate(CGAL::make_object(convert(rectItem->rect())));
-      rectItem->hide();
-    } else { 
-      // we enter a first point
-      rect_first_point = event->scenePos();
-      rectItem->setRect(QRectF(rect_first_point, rect_first_point));
-      rectItem->show();
-    }
-  }
-}
-
-
-template <typename K>
-void 
-GraphicsViewIsoRectangleInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  // todo: only do this if no modifiers are pressed at the same time
-  if(rectItem->isVisible()) {
-    rectItem->setRect(QRectF(rect_first_point,
-			     event->scenePos()));
-  }
-}
-
-
-template <typename K>
-void 
-GraphicsViewIsoRectangleInput<K>::keyPressEvent ( QKeyEvent * event ) 
-{
-}
-
-
-
-template <typename K>
-bool 
-GraphicsViewIsoRectangleInput<K>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::KeyPress) {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-    keyPressEvent(keyEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-} // namespace Qt
-
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewLineInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewLineInput.h
deleted file mode 100644
index 345e026..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewLineInput.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
-
-#include <QGraphicsView>
-#include <QRectF>
-#include <QPointF>
-#include <QGraphicsItem>
-#include <QGraphicsLineItem> 
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-#include <QPainter>
-#include <QStyleOption>
-
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/utility.h>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename K>
-class GraphicsViewLineInput : public GraphicsViewInput
-{
-public:
-  GraphicsViewLineInput(QObject *parent, QGraphicsScene* s);
-
-protected:
-    
-  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-  virtual void keyPressEvent(QKeyEvent *event);
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-
-  
-
-private:
-
-  QRectF boundingRect();
-  QLineF qlinef();
-
-  bool second;
-  QGraphicsLineItem line;
-  QPointF qsp, qtp;
-  typename K::Point_2 sp, tp;
-  typename K::Line_2 l;
-  QGraphicsScene *scene_;  
-  Converter<K> convert;
-};
-
-template <typename K>
-QRectF
-GraphicsViewLineInput<K>::boundingRect()
-{
-  QRectF rect = CGAL::Qt::viewportsBbox(scene_);
-  return rect;
-}
-
-
-template <typename K>
-GraphicsViewLineInput<K>::GraphicsViewLineInput(QObject *parent, QGraphicsScene* s)
-  : GraphicsViewInput(parent), second(false), scene_(s)
-{}
-
-
-template <typename K>
-QLineF
-GraphicsViewLineInput<K>::qlinef()
-{
-
-  sp = convert(qsp);
-  tp = convert(qtp);
-  typename K::Line_2  l(sp,tp);
-  QRectF qrect(boundingRect());
-  typename K::Iso_rectangle_2 rect;
-  rect = convert(qrect);
-  Object o = intersection(l,rect);
-  typename K::Segment_2 s;
-  assign(s, o);
-  return convert(s);
-}
-
-template <typename K>
-void 
-GraphicsViewLineInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{  
-  if(event->modifiers()  & ::Qt::ShiftModifier){
-    return;
-  }
-  if(second){
-      qtp = event->scenePos();
-      sp = convert(qsp);
-      tp = convert(qtp);
-      scene_->removeItem(&line);
-      emit generate(CGAL::make_object(typename K::Line_2(sp,tp)));
-  } else {
-    qsp = event->scenePos();
-    qtp = QPointF(qsp.x()+1, qsp.y());
-    line.setLine(qlinef());
-    scene_->addItem(&line);
-  }
-  second = !second;
-}
-
-
-
-
-template <typename K>
-void 
-GraphicsViewLineInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  qtp = event->scenePos();
-  if(qtp == qsp){
-    qtp = QPointF(qsp.x()+1, qsp.y());
-  } 
-  line.setLine(qlinef());
-}
-
-
-template <typename K>
-void 
-GraphicsViewLineInput<K>::keyPressEvent ( QKeyEvent * event ) 
-{
-  if(event->key() != ::Qt::Key_Delete){ // need an anchored namespace to get away from CGAL::Qt
-    return;
-  }
-  if(second){
-    scene_->removeItem(&line);
-    second = false;
-  }
-}
-
-
-
-template <typename K>
-bool 
-GraphicsViewLineInput<K>::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mousePressEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return true;
-  } else if (event->type() == QEvent::KeyPress) {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-    keyPressEvent(keyEvent);
-    return true;
-  } else{
-    // standard event processing
-    return QObject::eventFilter(obj, event);
-  }
-} 
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewNavigation.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewNavigation.h
deleted file mode 100644
index 76e9352..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewNavigation.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
-#define CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
-
-#include <CGAL/auto_link/Qt4.h>
-#include <CGAL/export/Qt4.h>
-#include <QObject>
-#include <QPointF>
-#include <QString>
-#include <QCursor>
-#include <QRect>
-#include <QRectF>
-
-class QGraphicsView;
-class QGraphicsScene;
-class QEvent;
-class QGraphicsRectItem;
-
-namespace CGAL {
-namespace Qt {
-
-class CGAL_QT4_EXPORT GraphicsViewNavigation: public QObject {
-
-  Q_OBJECT
-
-  signals:
-  void mouseCoordinates(QString);
-
-public:
-  GraphicsViewNavigation();
-  ~GraphicsViewNavigation();
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-
-private:
-
-  void scaleView(QGraphicsView*, qreal scaleFactor);
-  void translateView(QGraphicsView*, int dx,  int dy);
-  void drag_to(QGraphicsView*, QPoint new_pos);
-  void display_parameters(QGraphicsView*);
-
-  QGraphicsRectItem* rectItem;
-  QPointF rect_first_point;
-  bool dragging;
-  QPointF dragging_start;
-  QCursor cursor_backup;
-};
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h
deleted file mode 100644
index 0b6eae0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
-
-#include <list>
-
-#include <QGraphicsView>
-#include <QGraphicsItem>
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-
-#include <CGAL/Polygon_with_holes_2.h>
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/PolygonWithHolesGraphicsItem.h>
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-#include <CGAL/array.h>
-
-namespace CGAL {
-namespace Qt {
-
-  /*
-    We store a polygon with holes and display it with a graphics item
-    We use a PolygonInput tool for entering the boundary and the holes
-    We forward most events directly to the polygon input tool
-    We only deal with events when the polygon input is not active
-    - left click: enter new polygon
-    - right click: return result
-    - backspace: delete last polygon
-    - esc: return with empty result
-
-    todo: check that polygons don't intersect
-   */
-
-
-
-template <typename K>
-class GraphicsViewPolygonWithHolesInput : public GraphicsViewInput
-{
-public:
-  GraphicsViewPolygonWithHolesInput(QObject *parent, QGraphicsScene* s); 
-  ~GraphicsViewPolygonWithHolesInput();
-  
-public slots:
-  void processInput(CGAL::Object o);
-
-typedef CGAL::Polygon_2<K> Polygon;
-typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes;
-
-protected:
-    
-  virtual void keyPressEvent(QKeyEvent *event);
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-private:
-
-  Polygon polygon;
-  std::list<Polygon> holes; 
-  Polygon_with_holes pwh;  // this one collects the input polygons
-
-  CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes> * pwhItem;
-  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
-
-  bool polygon_input;
-  typedef typename K::Point_2 Point_2;
-  QGraphicsScene *scene_;  
-};
-
-
-template <typename K>
-GraphicsViewPolygonWithHolesInput<K>::GraphicsViewPolygonWithHolesInput(QObject *parent, QGraphicsScene* s)
-  : GraphicsViewInput(parent), scene_(s), polygon_input(false)
-{
-  pwhItem = new CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes>(&pwh);
-  pwhItem->setBrush(::Qt::yellow);
-  scene_->addItem(pwhItem);
-  pwhItem->hide();
-  
-  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(parent,s);
-  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
-		   this, SLOT(processInput(CGAL::Object)));
-
-  QObject::connect(this, SIGNAL(modelChanged()),
-		   pwhItem, SLOT(modelChanged()));
-
-}
-
-template <typename K>
-GraphicsViewPolygonWithHolesInput<K>::~GraphicsViewPolygonWithHolesInput()
-{
-  //delete pwhItem;
-  //delete pi;
-}
-
-
-template <typename K>
-void
-GraphicsViewPolygonWithHolesInput<K>::processInput(CGAL::Object o)
-{
-   std::list<Point_2> points;
-  if(CGAL::assign(points, o)){
-    if((points.size() == 1)&& polygon.size()>0){
-    
-    } else {
-      polygon.clear();
-      if(points.front() == points.back()){
-	points.pop_back();
-      }
-      polygon.insert(polygon.vertices_begin(), points.begin(), points.end());
-      if(holes.empty()){
-	if(polygon.orientation() == CGAL::CLOCKWISE){
-	  polygon.reverse_orientation();
-	}
-      } else {
-	if(polygon.orientation() == CGAL::COUNTERCLOCKWISE){
-	  polygon.reverse_orientation();
-	}
-      }
-      holes.push_back(polygon);
-      typename std::list<Polygon>::iterator it = holes.begin();
-      it++;
-      pwh = Polygon_with_holes(holes.front(), it, holes.end());
-    }
-    emit(modelChanged());
-    polygon_input = false;
-  } 
-}
-
-
-template <typename K>
-void 
-GraphicsViewPolygonWithHolesInput<K>::keyPressEvent ( QKeyEvent * event ) 
-{
-}
-
-
-
-template <typename K>
-bool 
-GraphicsViewPolygonWithHolesInput<K>::eventFilter(QObject *obj, QEvent *event)
-{
-  if(polygon_input){
-    return pi->eventFilter(obj, event);
-  } else {
-    if (event->type() == QEvent::GraphicsSceneMousePress) {
-      QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-      
-      if(mouseEvent->modifiers()  & ::Qt::ShiftModifier){
-	return QObject::eventFilter(obj, event);;
-      }
-      if(mouseEvent->button() == ::Qt::LeftButton) {
-	polygon_input = true;
-	return pi->eventFilter(obj, event);
-      } else if(mouseEvent->button() == ::Qt::RightButton) {
-	emit(generate(CGAL::make_object(pwh)));
-	pwh.clear();
-	holes.clear();
-	polygon_input = false;
-	emit(modelChanged());
-      }
-      return true;
-    } else if (event->type() == QEvent::KeyPress) {
-      QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-      keyPressEvent(keyEvent);
-      return true;
-    } else{
-      // standard event processing
-      return QObject::eventFilter(obj, event);
-    }
-  }
-} 
-
-} // namespace Qt
-
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolylineInput.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolylineInput.h
deleted file mode 100644
index c9078d3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPolylineInput.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
-#define CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
-
-#include <CGAL/auto_link/Qt4.h>
-#include <CGAL/export/Qt4.h>
-#include <QPolygonF>
-#include <QPointF>
-
-#include <CGAL/Qt/GraphicsViewInput.h>
-#include <CGAL/Qt/Converter.h>
-
-class QGraphicsScene;
-class QGraphicsSceneMouseEvent;
-class QGraphicsItem;
-class QGraphicsPathItem;
-class QKeyEvent;
-class QEvent;
-class QObject;
-
-namespace CGAL {
-namespace Qt {
-
-class CGAL_QT4_EXPORT GraphicsViewPolylineInput_non_templated_base : public GraphicsViewInput
-{
-public:
-  void setNumberOfVertices(int n)
-  {
-    n_ = n;
-  }
-  
-  bool eventFilter(QObject *obj, QEvent *event);
-  
-protected:
-  // protected constructor
-  GraphicsViewPolylineInput_non_templated_base(QObject* parent, 
-                                     QGraphicsScene* s,
-                                     int n = 0,
-                                     bool closed = true);
-
-
-  // mousePressEvent returns true iff the event is consummed
-  bool mousePressEvent(QGraphicsSceneMouseEvent *event);
-
-  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-
-  // keyPressEvent returns true iff the event is consummed
-  bool keyPressEvent(QKeyEvent *event);
-
-  void rubberbands(const QPointF& p);
-
-  virtual void generate_polygon() = 0;
-
-protected:
-  QPolygonF polygon;
-  bool closed_;
-
-private:
-  QGraphicsPathItem *path_item;
-  QGraphicsLineItem *b, *e;
-  int n_;
-  QPointF sp;
-  QGraphicsScene *scene_;
-}; // end class GraphicsViewPolylineInput_non_templated_base
-
-template <typename K>
-class GraphicsViewPolylineInput : public GraphicsViewPolylineInput_non_templated_base
-{
-public:
-  GraphicsViewPolylineInput(QObject* parent, QGraphicsScene* s, int n = 0, bool closed = true)
-    : GraphicsViewPolylineInput_non_templated_base(parent, s, n, closed)
-  {
-  }
-
-protected:
-  void generate_polygon() {
-    std::list<typename K::Point_2> points;
-    Converter<K> convert;
-    convert(points, this->polygon); 
-    if(closed_ && points.size()>2){
-      points.push_back(points.front());
-    }
-    emit(generate(CGAL::make_object(points)));
-  }
-}; // end class GraphicsViewPolylineInput
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h
deleted file mode 100644
index d8477ca..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
-#define CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/bounding_box.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-#include <CGAL/Fuzzy_iso_box.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename KdTree>
-class PointsInKdTreeGraphicsItem : public GraphicsItem
-{
-  typedef typename std::iterator_traits<typename KdTree::iterator>::value_type Point_2;
-  typedef typename CGAL::Kernel_traits<Point_2>::Kernel Traits;
-  typedef typename Traits::Iso_rectangle_2 Iso_rectangle_2;
-
-  typedef CGAL::Fuzzy_iso_box<typename KdTree::Traits> Fuzzy_iso_box;
-
-
-  // Instead of first collecting points into a container, and then draw them
-  // we use an output iterator that draws them on the fly
-  template <typename K>
-  class Draw : public std::iterator<std::output_iterator_tag, void, void, void, void> {
-    QPainter* painter;
-    QMatrix* matrix;
-    Converter<K> convert;
-  public:
-    Draw(QPainter* painter, QMatrix* matrix)
-      : painter(painter), matrix(matrix)
-    {}
-
-    Draw& operator=(const Point_2& p)
-    {
-      QPointF point = matrix->map(convert(p));
-      painter->drawPoint(point);
-      return *this;
-    }
-
-    Draw& operator++()
-    {
-      return *this;
-    }
-
-    Draw& operator*()
-    {
-      return *this;
-    }
-
-
-    Draw& operator++(int)
-    {
-      return *this;
-    }
-
-  };
-
-
-public:
-  PointsInKdTreeGraphicsItem(KdTree* p_);
-
-  void modelChanged();
-
-public:
-  QRectF boundingRect() const;
-
-  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-  
-
-  const QPen& verticesPen() const
-  {
-    return vertices_pen;
-  }
-
-  void setVerticesPen(const QPen& pen)
-  {
-    vertices_pen = pen;
-  }
-
-protected:
-  void updateBoundingBox();
-
-  KdTree * kdtree;
-  QPainter* m_painter;
-  PainterOstream<Traits> painterostream;
-  Converter<Traits> convert;
-
-  QRectF bounding_rect;
-
-  QPen vertices_pen;
-  bool draw_vertices;
-};
-
-
-template <typename KdTree>
-PointsInKdTreeGraphicsItem<KdTree>::PointsInKdTreeGraphicsItem(KdTree * p_)
-  :  kdtree(p_), painterostream(0),  draw_vertices(true)   
-{
-  setVerticesPen(QPen(::Qt::red, 3.));
-  if(kdtree->size() == 0){
-    this->hide();
-  }
-  updateBoundingBox();
-  setZValue(3);
-#if QT_VERSION >= 0x040600
-  setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
-#endif
-}
-
-template <typename KdTree>
-QRectF 
-PointsInKdTreeGraphicsItem<KdTree>::boundingRect() const
-{
-  return bounding_rect;
-}
-
-
-
-
-
-
-template <typename KdTree>
-void 
-PointsInKdTreeGraphicsItem<KdTree>::paint(QPainter *painter, 
-                                    const QStyleOptionGraphicsItem *option,
-                                    QWidget * /*widget*/)
-{
-  Iso_rectangle_2 isor = convert(option->exposedRect);
-  Fuzzy_iso_box range(isor.vertex(0), isor.vertex(2));
-  painter->setPen(verticesPen());
-  QMatrix matrix = painter->matrix();
-  painter->resetMatrix();
-  Draw<Traits> draw(painter, &matrix);
-  kdtree->search(draw, range);
-}
-
-// We let the bounding box only grow, so that when vertices get removed
-// the maximal bbox gets refreshed in the GraphicsView
-template <typename KdTree>
-void 
-PointsInKdTreeGraphicsItem<KdTree>::updateBoundingBox()
-{
-  prepareGeometryChange();
-  if(kdtree->size() == 0){
-    return;
-  }
-  bounding_rect = convert(CGAL::bounding_box(kdtree->begin(), kdtree->end()));
-}
-
-
-template <typename KdTree>
-void 
-PointsInKdTreeGraphicsItem<KdTree>::modelChanged()
-{
-  if((kdtree->size() == 0) ){
-    this->hide();
-  } else if((kdtree->size() > 0) && (! this->isVisible())){
-    this->show();
-  }
-  updateBoundingBox();
-  update();
-}
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PolygonGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/PolygonGraphicsItem.h
deleted file mode 100644
index 95dec61..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/PolygonGraphicsItem.h
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_POLYGON_GRAPHICS_ITEM_H
-#define CGAL_QT_POLYGON_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/apply_to_range.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename P>
-class PolygonGraphicsItem : public GraphicsItem
-{
-  typedef typename P::Traits Traits;
-public:
-  PolygonGraphicsItem(P* p_);
-
-  void modelChanged();
-
-public:
-  QRectF boundingRect() const;
-  
-  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-  
-
-  const QPen& verticesPen() const
-  {
-    return vertices_pen;
-  }
-
-  const QPen& edgesPen() const
-  {
-    return edges_pen;
-  }
-
-  void setVerticesPen(const QPen& pen)
-  {
-    vertices_pen = pen;
-  }
-
-  void setEdgesPen(const QPen& pen)
-  {
-    edges_pen = pen;
-  }
-
-  bool drawVertices() const
-  {
-    return draw_vertices;
-  }
-
-  void setDrawVertices(const bool b)
-  {
-    draw_vertices = b;
-    update();
-  }
-
-  bool drawEdges() const
-  {
-    return draw_edges;
-  }
-
-  void setDrawEdges(const bool b)
-  {
-    draw_edges = b;
-    update();
-  }
-
-protected:
-  void updateBoundingBox();
-
-  P * poly;
-  QPainter* m_painter;
-  PainterOstream<Traits> painterostream;
-
-  typename P::Point_2 p;
-  QRectF bounding_rect;
-
-  QPen vertices_pen;
-  QPen edges_pen;
-  bool draw_edges;
-  bool draw_vertices;
-};
-
-
-template <typename P>
-PolygonGraphicsItem<P>::PolygonGraphicsItem(P * p_)
-  :  poly(p_), painterostream(0),
-     draw_edges(true), draw_vertices(true)   
-{
-  setVerticesPen(QPen(::Qt::red, 3.));
-  updateBoundingBox();
-  setZValue(3);
-}
-
-template <typename P>
-QRectF 
-PolygonGraphicsItem<P>::boundingRect() const
-{
-  return bounding_rect;
-}
-
-
-
-
-template <typename P>
-void 
-PolygonGraphicsItem<P>::paint(QPainter *painter, 
-                                    const QStyleOptionGraphicsItem * /*option*/,
-                                    QWidget * /*widget*/)
-{
-  painter->setPen(this->edgesPen());
-  painterostream = PainterOstream<Traits>(painter);
-  if(drawEdges()) {
-    for(typename P::Edge_const_iterator eit = poly->edges_begin();
-        eit != poly->edges_end();
-        ++eit){
-      painterostream << *eit;
-    }
-  }
-
-  if(drawVertices()) {
-    Converter<Traits> convert;
-
-    painter->setPen(verticesPen());
-    QMatrix matrix = painter->matrix();
-    painter->resetMatrix();
-    for(typename P::Vertex_iterator it = poly->vertices_begin();
-        it != poly->vertices_end();
-        it++){
-      QPointF point = matrix.map(convert(*it));
-      painter->drawPoint(point);
-    }
-  }
-}
-
-// We let the bounding box only grow, so that when vertices get removed
-// the maximal bbox gets refreshed in the GraphicsView
-template <typename P>
-void 
-PolygonGraphicsItem<P>::updateBoundingBox()
-{
-  Converter<Traits> convert;
-  prepareGeometryChange();
-  if(poly->size() == 0){
-    return;
-  }
-  bounding_rect = convert(poly->bbox());
-}
-
-
-template <typename P>
-void 
-PolygonGraphicsItem<P>::modelChanged()
-{
-  updateBoundingBox();
-  update();
-}
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_POLYGON_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h
deleted file mode 100644
index d258a5a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
-#define CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/utility.h>
-//#include <CGAL/Qt/Converter.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-
-
-namespace CGAL {
-
-namespace Qt {
-
-template <typename T>
-class SegmentDelaunayGraphGraphicsItem : public GraphicsItem
-{ 
-  typedef typename T::Geom_traits Geom_traits;
-  typedef typename T::Point_2 Point_2;
-  typedef typename Kernel_traits<Point_2> ::Kernel Kern;
-
-  T* t;
-  QPainter* m_painter;
-  PainterOstream<Kern> painterostream;
-
-  QPen vertices_pen, segment_pen, voronoi_pen ;
-  Bbox_2 bb;
-  bool bb_initialized;
-
-public:
-  SegmentDelaunayGraphGraphicsItem(T  * t_)
-    : t(t_), painterostream(0),
-      segment_pen(::Qt::blue),
-      voronoi_pen(::Qt::blue)
-  {
-  }
-  
-
-  void updateBoundingBox();
-
-  void modelChanged();
-
-
-  QRectF boundingRect() const;
- 
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
- 
-  const QPen& verticesPen() const
-  {
-    return vertices_pen;
-  }
-
-  void setVerticesPen(const QPen& pen)
-  {
-    vertices_pen = pen;
-  }
-
-
-  const QPen& segmentPen() const
-  {
-    return segment_pen;
-  }
-
-  void setSegmentPen(const QPen& pen)
-  {
-    segment_pen = pen;
-  }
-
-
-
-  const QPen& voronoiPen() const
-  {
-    return voronoi_pen;
-  }
-
-  void setVoronoiPen(const QPen& pen)
-  {
-    voronoi_pen = pen;
-  }
-
-
-protected:
-  void drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option);
- void drawDualEdge(QPainter *painter, typename T::Edge e);
-
-
-
-};
-
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::drawDualEdge(QPainter * /*painter*/, typename T::Edge e)
-{
-   CGAL_precondition( ! t->is_infinite(e) );
-
-    typename Geom_traits::Line_2          l;
-    typename Geom_traits::Segment_2       s;
-    typename Geom_traits::Ray_2           r;
-    CGAL::Parabola_segment_2<Geom_traits> ps;
-
-    Object o = t->primal(e);
-
-    if (CGAL::assign(l, o)) { /* m_painter->setPen(::Qt::cyan); std::cerr << "line " << std::endl; */ painterostream << l; }
-    else if (CGAL::assign(s, o)) { /* m_painter->setPen(::Qt::magenta); std::cerr << "segment " << std::endl; */ painterostream << s;}
-    else if (CGAL::assign(r, o))  { /* m_painter->setPen(::Qt::darkMagenta);  std::cerr << "ray " << r << std::endl;  */ painterostream << r; }
-    else if (CGAL::assign(ps, o)) { /* std::cerr << "ps  " << std::endl; */ painterostream << ps;}
-    else { std::cerr << "unknown" << std::endl; }
-
-    /* m_painter->setPen(::Qt::black); */
-
-}
-
-
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option)
-{
-  QRectF rect = option->exposedRect;
-  m_painter = painter;
-  painterostream = PainterOstream<Kern>(m_painter, rect);
-  m_painter->setPen(this->voronoiPen());
-  typename T::Finite_edges_iterator eit = t->finite_edges_begin();
-  for (; eit != t->finite_edges_end(); ++eit) {
-    drawDualEdge(m_painter, *eit);
-  }
-  {
-    m_painter->setPen(this->segmentPen());
-      typename T::Finite_vertices_iterator vit;
-      for (vit = t->finite_vertices_begin();
-	   vit != t->finite_vertices_end(); ++vit) {
-	typename T::Site_2 s = vit->site();
-	if ( s.is_segment() ) {
-	  painterostream << s.segment();
-	}
-      }
-    }
-    {
-    m_painter->setPen(this->verticesPen());
-    QMatrix matrix = m_painter->matrix();
-    m_painter->resetMatrix();
-    Converter<Kern> convert;
-      typename T::Finite_vertices_iterator vit;
-      for (vit = t->finite_vertices_begin();
-	   vit != t->finite_vertices_end(); ++vit) {
-	typename T::Site_2 s = vit->site();
-	if ( s.is_input() ) {
-	  //*widget << CGAL::RED;
-	} else {
-	  //*widget << CGAL::YELLOW;
-	}
-	if ( s.is_point() ) {
-          QPointF point = matrix.map(convert(s.point()));
-          m_painter->drawPoint(point);
-	}
-      }
-    }
-
-}
-
-/*
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::operator()(typename T::Face_handle fh)
-{
-  if(visibleFacesInDomain()) {
-    if(fh->is_in_domain()){
-      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
-      this->m_painter->setBrush(facesInDomainBrush());
-      this->m_painter->setPen(::Qt::NoPen) ;
-      this->painterostream << this->t->triangle(fh);
-    }
-  }
-  Base::operator()(fh);
-}
-*/
-
-
-template <typename T>
-QRectF 
-SegmentDelaunayGraphGraphicsItem<T>::boundingRect() const
-{
-
-  QRectF rect = CGAL::Qt::viewportsBbox(scene());
-  return rect;
-}
-
-
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::modelChanged()
-{
-  if((t->number_of_vertices() == 0) ){
-    this->hide();
-  } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
-    this->show();
-  }
-  update();
-}
-
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::updateBoundingBox()
-{
-  prepareGeometryChange();
-  if(t->number_of_vertices() == 0){
-    bb = Bbox_2(0,0,0,0);
-    bb_initialized = false;
-    return;
-  } else if(! bb_initialized){
-    //    bb = t->finite_vertices_begin()->point().bbox();
-    bb_initialized = true;
-  }
-  /*
-  if(t->dimension() <2){
-    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
-	it != t->finite_vertices_end();
-	++it){
-      bb = bb + it->point().bbox();
-    }
-  } else {
-    typename T::Vertex_handle inf = t->infinite_vertex();
-    typename T::Vertex_circulator vc = t->incident_vertices(inf), done(vc);
-    do {
-      bb = bb + vc->point().bbox();
-      ++vc;
-    } while(vc != done);
-  }
-  bounding_rect = QRectF(bb.xmin(),
-                         bb.ymin(),
-                         bb.xmax()-bb.xmin(),
-                         bb.ymax()-bb.ymin());
-  */
-}
-
-
-
-template <typename T>
-void 
-SegmentDelaunayGraphGraphicsItem<T>::paint(QPainter *painter, 
-                                    const QStyleOptionGraphicsItem *option,
-                                    QWidget * /*widget*/)
-{
-
-//   painter->drawRect(boundingRect());
-  //  if ( t->dimension()<2 || option->exposedRect.contains(boundingRect()) ) {
-
-    drawAll(painter, option);
-    //  } else {
-    //    std::cerr << "else" << std::endl;
-    //  }
-}
-
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentsGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentsGraphicsItem.h
deleted file mode 100644
index d418de3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/SegmentsGraphicsItem.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
-#define CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/bounding_box.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename P>
-class SegmentsGraphicsItem : public GraphicsItem
-{
-  typedef typename P::value_type Segment_2;
-  typedef typename CGAL::Kernel_traits<Segment_2>::Kernel Traits;
-
-public:
-  SegmentsGraphicsItem(P* p_);
-
-  void modelChanged();
-
-public:
-  QRectF boundingRect() const;
-  
-  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-  
-
-  const QPen& verticesPen() const
-  {
-    return vertices_pen;
-  }
-
-  void setVerticesPen(const QPen& pen)
-  {
-    vertices_pen = pen;
-  }
-
-  bool drawVertices() const
-  {
-    return draw_vertices;
-  }
-
-  void setDrawVertices(const bool b)
-  {
-    draw_vertices = b;
-    update();
-  }
-
-protected:
-  void updateBoundingBox();
-
-  P * segments;
-  QPainter* m_painter;
-  PainterOstream<Traits> painterostream;
-
-
-  QRectF bounding_rect;
-
-  QPen vertices_pen;
-  bool draw_edges;
-  bool draw_vertices;
-};
-
-
-template <typename P>
-SegmentsGraphicsItem<P>::SegmentsGraphicsItem(P * p_)
-  :  segments(p_), painterostream(0),
-     draw_edges(true), draw_vertices(true)   
-{
-  setVerticesPen(QPen(::Qt::red, 3.));
-
-  updateBoundingBox();
-  setZValue(3);
-}
-
-template <typename P>
-QRectF 
-SegmentsGraphicsItem<P>::boundingRect() const
-{
-  return bounding_rect;
-}
-
-
-
-
-template <typename P>
-void 
-SegmentsGraphicsItem<P>::paint(QPainter *painter, 
-                                    const QStyleOptionGraphicsItem * /*option*/,
-                                    QWidget * /*widget*/)
-{
-
-  painterostream = PainterOstream<Traits>(painter);
-  
-    for(typename P::iterator it = segments->begin();
-        it != segments->end();
-        it++){
-      painterostream << *it;
-    }
-}
-
-// We let the bounding box only grow, so that when vertices get removed
-// the maximal bbox gets refreshed in the GraphicsView
-template <typename P>
-void 
-SegmentsGraphicsItem<P>::updateBoundingBox()
-{
-  Converter<Traits> convert;
-  prepareGeometryChange();
-  if(segments->size() == 0){
-    return;
-  }
-  Bbox_2 bb = segments->begin()->bbox();
-  for(typename P::iterator it = segments->begin();
-      it != segments->end();
-      ++it){
-    bb = bb + it->bbox();
-  }
-
-  bounding_rect = convert(bb);
-}
-
-
-template <typename P>
-void 
-SegmentsGraphicsItem<P>::modelChanged()
-{
-  updateBoundingBox();
-  update();
-}
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/TriangulationGraphicsItem.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/TriangulationGraphicsItem.h
deleted file mode 100644
index 8c0876e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/TriangulationGraphicsItem.h
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
-#define CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/apply_to_range.h>
-#include <CGAL/Qt/PainterOstream.h>
-#include <CGAL/Qt/GraphicsItem.h>
-#include <CGAL/Qt/Converter.h>
-
-#include <QGraphicsScene>
-#include <QPainter>
-#include <QStyleOption>
-
-namespace CGAL {
-namespace Qt {
-
-template <typename T>
-class TriangulationGraphicsItem : public GraphicsItem
-{
-  typedef typename T::Geom_traits Geom_traits;
-public:
-  TriangulationGraphicsItem(T* t_);
-
-  void modelChanged();
-
-public:
-
-  QRectF boundingRect() const;
-  
-  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-  
-  virtual void operator()(typename T::Face_handle fh);
-
-  const QPen& verticesPen() const
-  {
-    return vertices_pen;
-  }
-
-  QPen& verticesPen()
-  {
-    return vertices_pen;
-  }
-  const QPen& edgesPen() const
-  {
-    return edges_pen;
-  }
-
-  QPen& edgesPen()
-  {
-    return edges_pen;
-  }
-
-  void setVerticesPen(const QPen& pen)
-  {
-    vertices_pen = pen;
-  }
-
-  void setEdgesPen(const QPen& pen)
-  {
-    edges_pen = pen;
-  }
-
-  bool visibleVertices() const
-  {
-    return visible_vertices;
-  }
-
-  void setVisibleVertices(const bool b)
-  {
-    visible_vertices = b;
-    update();
-  }
-
-  bool visibleEdges() const
-  {
-    return visible_edges;
-  }
-
-  void setVisibleEdges(const bool b)
-  {
-    visible_edges = b;
-    update();
-  }
-
-protected:
-  virtual void drawAll(QPainter *painter);
-  void paintVertices(QPainter *painter);
-  void paintOneVertex(const typename T::Point& point);
-  virtual void paintVertex(typename T::Vertex_handle vh);
-  void updateBoundingBox();
-
-  T * t;
-  QPainter* m_painter;
-  PainterOstream<Geom_traits> painterostream;
-
-  typename T::Vertex_handle vh;
-  typename T::Point p;
-  CGAL::Bbox_2 bb;  
-  bool bb_initialized;
-  QRectF bounding_rect;
-
-  QPen vertices_pen;
-  QPen edges_pen;
-  bool visible_edges;
-  bool visible_vertices;
-};
-
-
-template <typename T>
-TriangulationGraphicsItem<T>::TriangulationGraphicsItem(T * t_)
-  :  t(t_), painterostream(0),
-     bb(0,0,0,0), bb_initialized(false),
-     visible_edges(true), visible_vertices(true)
-{
-  setVerticesPen(QPen(::Qt::red, 4.));
-  if(t->number_of_vertices() == 0){
-    this->hide();
-  }
-  updateBoundingBox();
-  setZValue(3);
-}
-
-template <typename T>
-QRectF 
-TriangulationGraphicsItem<T>::boundingRect() const
-{
-  return bounding_rect;
-}
-
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
-{
-  if(visible_edges) {
-    for (int i=0; i<3; i++) {
-      if (fh < fh->neighbor(i) || t->is_infinite(fh->neighbor(i))){
-        m_painter->setPen(this->edgesPen());
-        painterostream << t->segment(fh,i);
-      }
-    }
-  }
-  if(visible_vertices) {
-    for (int i=0; i<3; i++) {
-      paintVertex(fh->vertex(i));
-    }
-  }
-}
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::drawAll(QPainter *painter)
-{
-  painterostream = PainterOstream<Geom_traits>(painter);
- 
-  if(visibleEdges()) {
-    for(typename T::Finite_edges_iterator eit = t->finite_edges_begin();
-        eit != t->finite_edges_end();
-        ++eit){
-      painterostream << t->segment(*eit);
-    }
-  }
-  paintVertices(painter);
-}
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::paintVertices(QPainter *painter)
-{
-  if(visibleVertices()) {
-    Converter<Geom_traits> convert;
-
-    painter->setPen(verticesPen());
-    QMatrix matrix = painter->matrix();
-    painter->resetMatrix();
-    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
-        it != t->finite_vertices_end();
-        it++){
-      QPointF point = matrix.map(convert(it->point()));
-      painter->drawPoint(point);
-    }
-  }
-}
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::paintOneVertex(const typename T::Point& point)
-{
-  Converter<Geom_traits> convert;
-
-  m_painter->setPen(this->verticesPen());
-  QMatrix matrix = m_painter->matrix();
-  m_painter->resetMatrix();
-  m_painter->drawPoint(matrix.map(convert(point)));
-  m_painter->setMatrix(matrix);
-}
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::paintVertex(typename T::Vertex_handle vh)
-{
-  Converter<Geom_traits> convert;
-
-  m_painter->setPen(this->verticesPen());
-  QMatrix matrix = m_painter->matrix();
-  m_painter->resetMatrix();
-  m_painter->drawPoint(matrix.map(convert(vh->point())));
-  m_painter->setMatrix(matrix);
-}
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::paint(QPainter *painter, 
-                                    const QStyleOptionGraphicsItem *option,
-                                    QWidget * /*widget*/)
-{
-  painter->setPen(this->edgesPen());
-//   painter->drawRect(boundingRect());
-  if ( t->dimension()<2 || option->exposedRect.contains(boundingRect()) ) {
-    drawAll(painter);
-  } else {
-    m_painter = painter;
-    painterostream = PainterOstream<Geom_traits>(painter);
-    CGAL::apply_to_range (*t, 
-                          typename T::Point(option->exposedRect.left(),
-                                            option->exposedRect.bottom()), 
-                          typename T::Point(option->exposedRect.right(),
-                                            option->exposedRect.top()), 
-                          *this);
-  }
-}
-
-// We let the bounding box only grow, so that when vertices get removed
-// the maximal bbox gets refreshed in the GraphicsView
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::updateBoundingBox()
-{
-  prepareGeometryChange();
-  if(t->number_of_vertices() == 0){
-    bb = Bbox_2(0,0,0,0);
-    bb_initialized = false;
-    return;
-  } else if(! bb_initialized){
-    bb = t->finite_vertices_begin()->point().bbox();
-    bb_initialized = true;
-  }
-  
-  if(t->dimension() <2){
-    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
-	it != t->finite_vertices_end();
-	++it){
-      bb = bb + it->point().bbox();
-    }
-  } else {
-    typename T::Vertex_handle inf = t->infinite_vertex();
-    typename T::Vertex_circulator vc = t->incident_vertices(inf), done(vc);
-    do {
-      bb = bb + vc->point().bbox();
-      ++vc;
-    } while(vc != done);
-  }
-  bounding_rect = QRectF(bb.xmin(),
-                         bb.ymin(),
-                         bb.xmax()-bb.xmin(),
-                         bb.ymax()-bb.ymin());
-}
-
-
-template <typename T>
-void 
-TriangulationGraphicsItem<T>::modelChanged()
-{
-  if((t->number_of_vertices() == 0) ){
-    this->hide();
-  } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
-    this->show();
-  }
-  updateBoundingBox();
-  update();
-}
-
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/debug.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/debug.h
deleted file mode 100644
index d886332..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/debug.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_DEBUG_H
-#define CGAL_QT_DEBUG_H
-
-#include <CGAL/auto_link/Qt4.h>
-#include <CGAL/export/Qt4.h>
-#include <QString>
-
-namespace CGAL {
-namespace Qt {
-
-/**
- *  Must be used like that:
- *     CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
- *  or
- *     CGAL::Qt:traverse_resources(":"); // view all resources
- *  and displays the resources tree on std::cerr.
- */
-CGAL_QT4_EXPORT void traverse_resources(const QString& name,
-                                        const QString& dirname = QString(),
-                                        int indent = 0);
-
-} // namespace Qt
-} // namespace CGAL
-
-
-#endif // CGAL_QT_DEBUG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/resources.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/resources.h
deleted file mode 100644
index 2e390d0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/resources.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2011  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_RESOURCES_H
-#define CGAL_QT_RESOURCES_H
-
-#include <CGAL/export/Qt4.h>
-
-// cannot use namespaces because of the Q_INIT_RESOURCE macro
-CGAL_QT4_EXPORT void CGAL_Qt4_init_resources();
-
-#define CGAL_QT4_INIT_RESOURCES do { CGAL_Qt4_init_resources(); } while(0)
-// The do{}while(0) trick is used to make that macro value a regular
-// statement and not a compound statement.
-
-#endif // CGAL_QT_RESOURCES_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/utility.h b/3rdparty/CGAL-4.6/include/CGAL/Qt/utility.h
deleted file mode 100644
index 5221beb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Qt/utility.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#ifndef CGAL_QT_UTILITY_H
-#define CGAL_QT_UTILITY_H
-
-#include <QRectF>
-#include <QRect>
-#include <CGAL/auto_link/Qt4.h>
-#include <CGAL/export/Qt4.h>
-
-class QGraphicsScene;
-class QGraphicsView;
-
-namespace CGAL {
-namespace Qt {
-
-CGAL_QT4_EXPORT QRectF mapToScene(const QGraphicsView* v, const QRect rect);
-CGAL_QT4_EXPORT QRectF viewportsBbox(const QGraphicsScene*);
-
-} // namespace Qt
-} // namespace CGAL
-
-#endif // CGAL_QT_UTILITY_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/dyadic.h b/3rdparty/CGAL-4.6/include/CGAL/RS/dyadic.h
deleted file mode 100644
index 9ceb72d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/RS/dyadic.h
+++ /dev/null
@@ -1,438 +0,0 @@
-// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author: Luis Peñaranda <luis.penaranda at gmx.com>
-
-#ifndef CGAL_RS_DYADIC_H
-#define CGAL_RS_DYADIC_H
-
-#include <stdio.h>
-#include <math.h>
-#include <gmp.h>
-#include <mpfr.h>
-#include <CGAL/assertions.h>
-
-// for c++, compile with -lgmpxx
-#ifdef __cplusplus
-#include <iostream>
-#endif
-
-#define CGALRS_dyadic_struct            __mpfr_struct
-#define CGALRS_dyadic_t                 mpfr_t
-#define CGALRS_dyadic_ptr               mpfr_ptr
-#define CGALRS_dyadic_srcptr            mpfr_srcptr
-
-// some auxiliary defines
-#define CGALRS_dyadic_set_prec(D,P) \
- ( mpfr_set_prec( (D), (P)>MPFR_PREC_MIN?(P):MPFR_PREC_MIN) )
-
-#define CGALRS_dyadic_prec_round(D,P) \
- ( mpfr_prec_round( (D), (P)>MPFR_PREC_MIN?(P):MPFR_PREC_MIN, GMP_RNDN) )
-
-#define CGALRS_dyadic_set_exp(D,E) \
- ( CGAL_assertion( (E) <= mpfr_get_emax() && \
-                   (E) >= mpfr_get_emin() ) ,\
-   mpfr_set_exp(D,E) )
-
-// init functions
-#define CGALRS_dyadic_init(D)          mpfr_init2(D,MPFR_PREC_MIN)
-#define CGALRS_dyadic_init2(D,P)       mpfr_init2(D,P)
-#define CGALRS_dyadic_clear(D)         mpfr_clear(D)
-
-inline void CGALRS_dyadic_set(CGALRS_dyadic_ptr rop,CGALRS_dyadic_srcptr op){
-        if(rop!=op){
-                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
-                mpfr_set(rop,op,GMP_RNDN);
-        }
-        CGAL_assertion(mpfr_equal_p(rop,op)!=0);
-}
-
-inline void CGALRS_dyadic_set_z(CGALRS_dyadic_ptr rop,mpz_srcptr z){
-        size_t prec;
-        prec=mpz_sizeinbase(z,2)-(mpz_tstbit(z,0)?0:mpz_scan1(z,0));
-        CGALRS_dyadic_set_prec(rop,prec);
-        mpfr_set_z(rop,z,GMP_RNDN);
-        CGAL_assertion(!mpfr_cmp_z(rop,z));
-}
-
-inline void CGALRS_dyadic_set_si(CGALRS_dyadic_ptr rop,long s){
-        CGALRS_dyadic_set_prec(rop,sizeof(long));
-        mpfr_set_si(rop,s,GMP_RNDN);
-        CGAL_assertion(!mpfr_cmp_si(rop,s));
-}
-
-inline void CGALRS_dyadic_set_ui(CGALRS_dyadic_ptr rop,unsigned long u){
-        CGALRS_dyadic_set_prec(rop,sizeof(unsigned long));
-        mpfr_set_ui(rop,u,GMP_RNDN);
-        CGAL_assertion(!mpfr_cmp_ui(rop,u));
-}
-
-inline void CGALRS_dyadic_set_fr(CGALRS_dyadic_ptr rop,mpfr_srcptr op){
-        if(rop!=op){
-                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
-                mpfr_set(rop,op,GMP_RNDN);
-                CGAL_assertion(mpfr_equal_p(rop,op)!=0);
-        }
-}
-
-#define CGALRS_dyadic_init_set(R,D) \
- ( CGALRS_dyadic_init(R), CGALRS_dyadic_set((R), (D)) )
-#define CGALRS_dyadic_init_set_z(R,Z) \
- ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_z((R), (Z)) )
-#define CGALRS_dyadic_init_set_si(R,I) \
- ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_si((R), (I)) )
-#define CGALRS_dyadic_init_set_ui(R,I) \
- ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_ui((R), (I)) )
-#define CGALRS_dyadic_init_set_fr(R,F) \
- ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_fr((R), (F)) )
-
-#define CGALRS_dyadic_get_fr(M,D)      mpfr_set(M,D,GMP_RNDN)
-#define CGALRS_dyadic_get_d(D,RM)      mpfr_get_d(D,RM)
-inline void CGALRS_dyadic_get_exactfr(mpfr_ptr rop,CGALRS_dyadic_srcptr op){
-        if(rop!=op){
-                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
-                mpfr_set(rop,op,GMP_RNDN);
-                CGAL_assertion(mpfr_equal_p(rop,op)!=0);
-        }
-}
-
-#define CGALRS_dyadic_canonicalize(D)  ()
-
-// comparison functions
-#define CGALRS_dyadic_sgn(D)    mpfr_sgn(D)
-#define CGALRS_dyadic_zero(D)   mpfr_zero_p(D)
-#define CGALRS_dyadic_cmp(D,E)  mpfr_cmp(D,E)
-
-// arithmetic functions
-#define CGALRS_dyadic_add(R,D,E)        CGALRS_dyadic_ll_add(R,D,E,0)
-#define CGALRS_dyadic_sub(R,D,E)        CGALRS_dyadic_ll_sub(R,D,E,0)
-#define CGALRS_dyadic_mul(R,D,E)        CGALRS_dyadic_ll_mul(R,D,E,0)
-
-inline void CGALRS_dyadic_neg(CGALRS_dyadic_ptr rop,CGALRS_dyadic_srcptr op){
-        if(rop!=op)
-                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
-        mpfr_neg(rop,op,GMP_RNDN);
-        CGAL_assertion(
-                rop==op||
-                (!mpfr_cmpabs(rop,op)&&
-                ((CGALRS_dyadic_zero(op)&&CGALRS_dyadic_zero(rop))||
-                 (CGALRS_dyadic_sgn(op)!=CGALRS_dyadic_sgn(rop)))));
-}
-
-// low-level addition:
-// add op1 and op2 and reserve b bits for future lowlevel operations
-inline void CGALRS_dyadic_ll_add(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 CGALRS_dyadic_srcptr op2,
-                                 mp_prec_t b){
-        mp_exp_t l,r,temp1,temp2;
-        mp_prec_t rop_prec;
-        if(mpfr_zero_p(op1)){
-                if(rop!=op2)
-                        CGALRS_dyadic_set(rop,op2);
-                return;
-        }
-        if(mpfr_zero_p(op2)){
-                if(rop!=op1)
-                        CGALRS_dyadic_set(rop,op1);
-                return;
-        }
-        l=mpfr_get_exp(op1)>mpfr_get_exp(op2)?
-                mpfr_get_exp(op1):
-                mpfr_get_exp(op2);
-        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
-        temp2=mpfr_get_exp(op2)-(mp_exp_t)mpfr_get_prec(op2);
-        r=temp1>temp2?temp2:temp1;
-        CGAL_assertion(l>r);
-
-        rop_prec=b+1+(mp_prec_t)(l-r);
-        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
-                rop_prec>=mpfr_get_prec(op2));
-        if(rop==op1||rop==op2)
-                CGALRS_dyadic_prec_round(rop,rop_prec);
-        else
-                CGALRS_dyadic_set_prec(rop,rop_prec);
-        CGAL_assertion_code(int round=)
-        mpfr_add(rop,op1,op2,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_add_z(CGALRS_dyadic_ptr rop,
-                                CGALRS_dyadic_srcptr op1,
-                                mpz_srcptr z){
-        mp_exp_t l,r;
-        mp_prec_t rop_prec;
-        if(mpfr_zero_p(op1)){
-                CGALRS_dyadic_set_z(rop,z);
-                return;
-        }
-        if(!mpz_sgn(z)){
-                if(rop!=op1)
-                        CGALRS_dyadic_set(rop,op1);
-                return;
-        }
-        l=mpfr_get_exp(op1)>(mp_exp_t)mpz_sizeinbase(z,2)?
-                mpfr_get_exp(op1):
-                mpz_sizeinbase(z,2);
-        r=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1)<0?
-                mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1):
-                0;
-        CGAL_assertion(l>r);
-
-        rop_prec=1+(mp_prec_t)(l-r);
-        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
-                rop_prec>=(mp_prec_t)mpz_sizeinbase(z,2));
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(rop,rop_prec);
-        else
-                CGALRS_dyadic_set_prec(rop,rop_prec);
-        CGAL_assertion_code(int round=)
-        mpfr_add_z(rop,op1,z,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-// low-level subtraction:
-// subtract op2 to op1 and reserve b bits for future lowlevel operations
-inline void CGALRS_dyadic_ll_sub(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 CGALRS_dyadic_srcptr op2,
-                                 mp_prec_t b){
-        mp_exp_t l,r,temp1,temp2;
-        mp_prec_t rop_prec;
-        if(mpfr_zero_p(op1)){
-                CGALRS_dyadic_neg(rop,op2);
-                return;
-        }
-        if(mpfr_zero_p(op2)){
-                if(rop!=op1)
-                        CGALRS_dyadic_set(rop,op1);
-                return;
-        }
-        l=mpfr_get_exp(op1)>mpfr_get_exp(op2)?
-                mpfr_get_exp(op1):
-                mpfr_get_exp(op2);
-        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
-        temp2=mpfr_get_exp(op2)-(mp_exp_t)mpfr_get_prec(op2);
-        r=temp1>temp2?temp2:temp1;
-        CGAL_assertion(l>r);
-
-        rop_prec=b+1+(mp_prec_t)(l-r);
-        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
-                rop_prec>=mpfr_get_prec(op2));
-        if(rop==op1||rop==op2)
-                CGALRS_dyadic_prec_round(rop,rop_prec);
-        else
-                CGALRS_dyadic_set_prec(rop,rop_prec);
-        CGAL_assertion_code(int round=)
-        mpfr_sub(rop,op1,op2,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-// low-level multiplication:
-// multiply op1 and op2 and reserve b bits for future lowlevel operations
-inline void CGALRS_dyadic_ll_mul(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 CGALRS_dyadic_srcptr op2,
-                                 mp_prec_t b){
-        if(rop==op1||rop==op2)
-                CGALRS_dyadic_prec_round(rop,b+mpfr_get_prec(op1)+mpfr_get_prec(op2));
-        else
-                CGALRS_dyadic_set_prec(rop,b+mpfr_get_prec(op1)+mpfr_get_prec(op2));
-        CGAL_assertion_code(int round=)
-        mpfr_mul(rop,op1,op2,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_mul_z(CGALRS_dyadic_ptr rop,
-                                CGALRS_dyadic_srcptr op1,
-                                mpz_srcptr z){
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(
-                        rop,
-                        mpfr_get_prec(op1)+mpz_sizeinbase(z,2));
-        else
-                CGALRS_dyadic_set_prec(
-                        rop,
-                        mpfr_get_prec(op1)+mpz_sizeinbase(z,2));
-        CGAL_assertion_code(int round=)
-        mpfr_mul_z(rop,op1,z,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_mul_si(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 long s){
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(rop,mpfr_get_prec(op1)+sizeof(long));
-        else
-                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op1)+sizeof(long));
-        CGAL_assertion_code(int round=)
-        mpfr_mul_si(rop,op1,s,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_mul_ui(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 unsigned long u){
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(
-                        rop,
-                        mpfr_get_prec(op1)+sizeof(unsigned long));
-        else
-                CGALRS_dyadic_set_prec(
-                        rop,
-                        mpfr_get_prec(op1)+sizeof(unsigned long));
-        CGAL_assertion_code(int round=)
-        mpfr_mul_ui(rop,op1,u,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_pow_ui(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 unsigned long u){
-        if(!u){
-                CGAL_assertion_msg(!mpfr_zero_p(op1),"0^0");
-                CGALRS_dyadic_set_ui(rop,1);
-                return;
-        }
-        if(u==1){
-                if(rop!=op1)
-                        CGALRS_dyadic_set(rop,op1);
-                return;
-        }
-        if(mpfr_zero_p(op1)){
-                CGAL_assertion_msg(u!=0,"0^0");
-                CGALRS_dyadic_set_ui(rop,0);
-                return;
-        }
-        if(!mpfr_cmp_ui(op1,1)){
-                if(rop!=op1)
-                        CGALRS_dyadic_set(rop,op1);
-                return;
-        }
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(rop,u*mpfr_get_prec(op1));
-        else
-                CGALRS_dyadic_set_prec(rop,u*mpfr_get_prec(op1));
-        CGAL_assertion_code(int round=)
-        mpfr_pow_ui(rop,op1,u,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_addmul(CGALRS_dyadic_ptr rop,
-                                 CGALRS_dyadic_srcptr op1,
-                                 CGALRS_dyadic_srcptr op2){
-        CGALRS_dyadic_t temp;
-        CGALRS_dyadic_init(temp);
-        CGALRS_dyadic_mul(temp,op1,op2);
-        CGALRS_dyadic_add(rop,rop,temp);
-        CGALRS_dyadic_clear(temp);
-}
-
-inline void CGALRS_dyadic_addmul_si(CGALRS_dyadic_ptr rop,
-                                    CGALRS_dyadic_srcptr op1,
-                                    long op2){
-        CGALRS_dyadic_t temp;
-        CGALRS_dyadic_init(temp);
-        CGALRS_dyadic_mul_si(temp,op1,op2);
-        CGALRS_dyadic_add(rop,rop,temp);
-        CGALRS_dyadic_clear(temp);
-}
-
-inline void CGALRS_dyadic_addmul_ui(CGALRS_dyadic_ptr rop,
-                                    CGALRS_dyadic_srcptr op1,
-                                    unsigned long u){
-        //CGALRS_dyadic_t temp;
-        //CGALRS_dyadic_init(temp);
-        //CGALRS_dyadic_mul_ui(temp,op1,u);
-        //CGALRS_dyadic_add(rop,rop,temp);
-        //CGALRS_dyadic_clear(temp);
-        CGALRS_dyadic_t temp;
-        mp_exp_t l,r,temp1,temp2;
-        mp_prec_t rop_prec;
-        if(u==0||mpfr_zero_p(op1))
-                return;
-        if(u==1){
-                CGALRS_dyadic_add(rop,rop,op1);
-                return;
-        }
-        // TODO: if(op1==1)
-        // calculate temp=op1*u
-        mpfr_init2(temp,mpfr_get_prec(op1)+sizeof(unsigned int));
-        CGAL_assertion_code(int round1=)
-        mpfr_mul_ui(temp,op1,u,GMP_RNDN);
-        CGAL_assertion(!round1);
-        // calculate the precision needed for rop
-        l=mpfr_get_exp(op1)>0?mpfr_get_exp(op1):0;
-        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
-        temp2=sizeof(unsigned long);
-        r=temp1>temp2?temp2:temp1;
-        CGAL_assertion(l>r);
-        rop_prec=sizeof(unsigned long)+1+(mp_prec_t)(l-r);
-        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
-                rop_prec>=mpfr_get_prec(rop));
-        // set precision and add
-        CGALRS_dyadic_prec_round(rop,rop_prec);
-        CGAL_assertion_code(int round2=)
-        mpfr_add(rop,rop,temp,GMP_RNDN);
-        CGAL_assertion(!round2);
-}
-
-inline void CGALRS_dyadic_mul_2exp(CGALRS_dyadic_ptr rop,
-                                   CGALRS_dyadic_srcptr op1,
-                                   unsigned long ui){
-        // mpfr_mul_2ui does change the mantissa!
-        if(rop==op1)
-                CGALRS_dyadic_prec_round(
-                        rop,
-                        sizeof(unsigned long)+mpfr_get_prec(op1));
-        else
-                CGALRS_dyadic_set_prec(
-                        rop,
-                        sizeof(unsigned long)+mpfr_get_prec(op1));
-        CGAL_assertion_code(int round=)
-        mpfr_mul_2ui(rop,op1,ui,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-inline void CGALRS_dyadic_div_2exp(CGALRS_dyadic_ptr rop,
-                                   CGALRS_dyadic_srcptr op1,
-                                   unsigned long ui){
-        // mpfr_div_2ui does not change the mantissa... am I sure?
-        CGAL_assertion_code(int round=)
-        mpfr_div_2ui(rop,op1,ui,GMP_RNDN);
-        CGAL_assertion(!round);
-}
-
-// miscelaneous functions
-#define CGALRS_dyadic_midpoint(R,D,E) \
- ( CGALRS_dyadic_ll_add(R,D,E,1) , mpfr_div_2ui(R,R,1,GMP_RNDN) )
-#define CGALRS_dyadic_swap(D,E)         mpfr_swap(D,E)
-
-// I/O functions
-#define CGALRS_dyadic_out_str(F,D)      mpfr_out_str(F,10,0,D,GMP_RNDN)
-#ifdef __cplusplus
-inline std::ostream& operator<<(std::ostream &s,CGALRS_dyadic_srcptr op){
-        mp_exp_t exponent;
-        mpz_t mantissa;
-        mpz_init(mantissa);
-        exponent=mpfr_get_z_exp(mantissa,op);
-        s<<"["<<mantissa<<","<<exponent<<"]";
-        return s;
-}
-#endif
-
-#endif  // CGAL_RS_DYADIC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random.h b/3rdparty/CGAL-4.6/include/CGAL/Random.h
deleted file mode 100644
index 3433ccf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Random.h
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) 1997-2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Sylvain Pion, Andreas Fabri
-
-#ifndef CGAL_RANDOM_H
-#define CGAL_RANDOM_H
-
-#include <string>
-#include <utility>
-#include <CGAL/basic.h>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4244)
-#endif
-#include <boost/random/uniform_smallint.hpp>
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_int.hpp>
-#include <boost/random/uniform_real.hpp>
-#include <boost/random/uniform_01.hpp>
-#include <boost/random/variate_generator.hpp>
-
-
-namespace CGAL {
-
-class Random {
-public:
-  // types
-  
-  struct State {
-    std::string rng;
-    unsigned int random_value, val, seed;
-    
-    State()
-    {}
-    
-    State(std::string rng, 
-          unsigned int random_value, 
-          unsigned int val, 
-          unsigned int seed)
-      : rng(rng), random_value(random_value), val(val), seed(seed)
-    {}
-  };
-  // creation
-  CGAL_EXPORT Random( );
-  CGAL_EXPORT Random( unsigned int  seed);
-  
-  // seed
-  CGAL_EXPORT unsigned int get_seed ( ) const;
-    
-  // operations
-  bool get_bool( )
-  {
-    return( static_cast< bool>( rng() & 1));
-  }
-
-
-  template <typename IntType>
-  IntType
-  uniform_smallint(IntType lower, IntType upper)
-  {
-    // uniform_smallint has a closed interval, CGAL a halfopen
-    boost::uniform_smallint<IntType> dist(lower,upper-1);
-    boost::variate_generator<boost::rand48&, boost::uniform_smallint<IntType> > generator(rng,dist);
-    
-    return generator();
-  }
-
-  template <typename IntType>
-  IntType
-  uniform_smallint(IntType lower)
-  {
-    return uniform_smallint<IntType>(lower,9);
-  }
-
-  template <typename IntType>
-  IntType
-  uniform_smallint()
-  {
-    return uniform_smallint<IntType>(0,9);
-  }
-
-  template <typename IntType>
-  IntType
-  uniform_int(IntType lower, IntType upper)
-  {
-    // uniform_int has a closed interval, CGAL a halfopen
-    boost::uniform_int<IntType> dist(lower,upper);
-    boost::variate_generator<boost::rand48&, boost::uniform_int<IntType> > generator(rng,dist);
-    
-    return generator();
-  }
-
-
-  template <typename IntType>
-  IntType
-  uniform_int(IntType lower)
-  {
-    return uniform_int<IntType>(lower,9);
-  }
-
-  template <typename IntType>
-  IntType
-  uniform_int()
-  {
-    return uniform_int<IntType>(0,9);
-  }
- 
-
-  
-  template <typename IntType>
-  IntType
-  operator () (IntType upper)
-  {
-    return uniform_int<IntType>(0, upper-1);
-  }
- 
-  int
-  get_int(int lower, int upper)
-  {
-    return uniform_int<int>(lower,upper-1);
-  }
-
-
-  template <typename RealType>
-  RealType
-  uniform_real( RealType lower, RealType upper)
-  {
-    // uniform_real as well as CGAL have a halfopen interval
-    boost::uniform_real<RealType> dist(lower,upper);
-    boost::variate_generator<boost::rand48&, boost::uniform_real<RealType> > generator(rng,dist);
-    
-    return generator();
-  }
-
-
-  template <typename RealType>
-  RealType
-  uniform_real( RealType lower)
-  {
-    return uniform_real<RealType>(lower, 1.0);
-  }
-
-
-  template <typename RealType>
-  RealType
-  uniform_real()
-  {
-    return uniform_real<RealType>(0.0, 1.0);
-  }
-
-
-  template <typename RealType>
-  RealType
-  uniform_01()
-  {
-    // uniform_01 as well as CGAL have a halfopen interval
-    boost::uniform_01<RealType> dist;
-    boost::variate_generator<boost::rand48&, boost::uniform_01<RealType> > generator(rng,dist);
-    
-    return generator();
-  }
-
-
-  double
-  get_double( double lower = 0.0, double upper = 1.0)
-  {
-    return uniform_real<double>(lower, upper);
-  }
-
-    // state 
-    CGAL_EXPORT void save_state( State& state) const;
-    CGAL_EXPORT void restore_state( const State& state);
-
-    // Computes a random int value smaller than 2^b.
-    // It's supposed to be fast, useful for randomized algorithms.
-    // The distribution is not perfectly flat, but this is a sacrifice against
-    // efficiency.
-    template <int b>
-    int get_bits()
-    {
-	CGAL_assertion(0<b && b<16);
-        if (val == 0) {
-            random_value = (421U * random_value + 2073U) % 32749U;
-            val = random_value;
-        }
-        int ret = val & ((1<<b)-1);
-        val >>= 1; // Shifting by b would be slightly better, but is slower.
-        return ret;
-    }
-
-    
-  bool    operator==(Random rd) const
-  {
-    return (rng == rd.rng) 
-      && (random_value == rd.random_value)
-      && (val == rd.val)
-      && (seed == rd.seed);
-  }
-
-  private:
-    // data members
-    unsigned int random_value; // Current 15 bits random value.
-    unsigned int val; // random_value shifted by used bits.
-    unsigned int seed; 
-    boost::rand48 rng;
-};
-
-// Global variables
-// ================
-CGAL_EXPORT extern  Random  default_random;
-
-} //namespace CGAL
-
-#endif // CGAL_RANDOM_H
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Range_tree_d.h b/3rdparty/CGAL-4.6/include/CGAL/Range_tree_d.h
deleted file mode 100644
index ca85542..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Range_tree_d.h
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright (c) 1997  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Gabriele Neyer
-
-
-#ifndef CGAL_RANGE_TREE_D_H
-#define CGAL_RANGE_TREE_D_H
-
-#include <algorithm>
-#include <iterator>
-#include <functional>
-#include <CGAL/Tree_base.h>
-#include <list>
-#include <vector>
-
-// A d-dimensional Range Tree or a multilayer tree consisting of Range 
-// and other trees that are derived public 
-// Tree_base<C_Data, C_Window, C_Interface>
-// can be construced within this class.
-// C_Data: container class which contains the d-dimensional data the tree holds.
-// C_Window: Query window -- a d-dimensional interval
-// C_Interface: Interface for the class with functions that allow to 
-// access the data.
-// cf. file Tree_interface.h, class point_interface for the requirements.
-
-namespace CGAL {
-
-template <class C_Data, class C_Window, class C_Interface>
-class Range_tree_d;
-
-template <class C_Data, class C_Window, class C_Interface>
-struct Range_tree_node: public Tree_node_base<Range_tree_node<C_Data, C_Window, C_Interface> >
-{
-  private:
-  typedef  C_Data Data;
-  typedef  C_Window Window;
-  typedef typename C_Interface::Key Key;
-  typedef  C_Interface Interface;
-  typedef typename Tree_base< C_Data,  C_Window>::Tree_base_type Tree_base_type;
-  //  protected:
-  //typedef Range_tree_d< C_Data,  C_Window,  C_Interface> rT_d;
-public:
-  friend class Range_tree_d< C_Data,  C_Window,  C_Interface>;
-
-  typedef Tree_node_base<Range_tree_node<C_Data, C_Window, C_Interface> >  Base;
-
-  Range_tree_node()
-    : sublayer(0)
-  {} 
-
-  Range_tree_node( Range_tree_node    * p_left,
-		   Range_tree_node    * p_right,
-		   const  Data & v_obj,
-		   const  Key  & v_key )
-    : Base(p_left, p_right), object( v_obj ), key( v_key ), sublayer(0)
-  {}
-  
-  Range_tree_node( Range_tree_node    * p_left,
-		   Range_tree_node    * p_right,
-		   const  Key  & v_key )
-    : Base(p_left, p_right), key( v_key ), sublayer(0)
-  {}
-
-  virtual ~Range_tree_node()
-  {
-    if (sublayer != 0)
-      delete sublayer;
-  }
-  
-  Data object;
-  Key key;
-  Tree_base_type *sublayer;
-};
-
-
-template <class C_Data, class C_Window, class C_Interface>
-class Range_tree_d: public Tree_base< C_Data,  C_Window>
-{
- private:
-  typedef  C_Data Data;
-  typedef  C_Window Window;
-  typedef typename C_Interface::Key Key;
-  typedef  C_Interface Interface;
-  typedef Tree_base< C_Data,  C_Window>  tbt;
-protected:
-  //  typedef Range_tree_d< C_Data,  C_Window,  C_Interface> rT_d;
-  Tree_base<C_Data, C_Window> *sublayer_tree;
-  C_Interface m_interface;
-  int is_built;
-
- 
-  // A vertex is of this type:
-  //  struct Range_tree_node;
-
-  friend struct Range_tree_node<C_Data,C_Window,C_Interface>;
-
-  typedef Range_tree_node<C_Data,C_Window,C_Interface> Range_tree_node2;
-  typedef Range_tree_node<C_Data,C_Window,C_Interface> *link_type;
-
-  static link_type& left(link_type x) { 
-    return x->left_link;
-  }
-  static link_type& right(link_type x) {
-    return x->right_link;   
-  }
-
-  static link_type& parent(link_type x) {
-    return x->parent_link;
-  }
-
-  link_type header;
-  link_type node;
-  link_type rightmost(){return right(header);}
-  link_type leftmost(){return left(header);}
-  link_type root() const {
-    if(header!=0)
-      return header->parent_link;
-    // return parent(header);
-    else 
-      return 0;
-  }
-
-  bool is_less_equal(const Key&  x, const Key&  y) const
-  {
-    return (!m_interface.comp(y,x));
-  }  
-  
-  // this tree is not a recursion anchor
-  bool is_anchor() const {return false;}
-
-  // returns true, if the object lies inside of win
-  bool is_inside( C_Window const &win,  C_Data const& object) const
-  {
-    if(is_less_equal(m_interface.get_left(win), m_interface.get_key(object)) 
-       && m_interface.comp(m_interface.get_key(object),m_interface.get_right(win)))
-   //half open
-//       && is_less_equal(m_interface.get_key(object),m_interface.get_right(win)))
-   //closed interval
-    {
-      return sublayer_tree->is_inside(win,object);
-    }
-
-    return false;
-  }
-
-
-  // merge sort algorithms that takes O(n) time if the sequence to
-  // be sorted consists of two sorted subsequences.
-  template <class T>
-  void dynamic_merge(const T& first, const T& last) // af: was not const
-  {
-    T prev, current=first;
-    T current_first, current_middle, current_last;
-
-    std::list<T> startpoints, tmp_startpoints;
-    startpoints.push_back(current);
-    prev = current++;
-
-    while(current!=last)
-    {
-      if (m_interface.comp(m_interface.get_key(*current),m_interface.get_key(*prev)))
-	startpoints.push_back(current);
-      prev = current++;
-    }
-    while(startpoints.size()>1)
-    {
-      while(startpoints.size()>1)
-      {
-	current_first = startpoints.front();
-	startpoints.erase(startpoints.begin());
-	current_middle = startpoints.front();
-	startpoints.erase(startpoints.begin());
-	if(startpoints.size()>0)
-	  current_last = startpoints.front();
-	else 
-	  current_last = last;
-	tmp_startpoints.push_back(current_first);
-	std::inplace_merge(current_first, current_middle, current_last, 
-		      m_interface.key_comp);
-      }
-      if(startpoints.size()>0)
-      {
-	tmp_startpoints.push_back(startpoints.front());
-	startpoints.erase(startpoints.begin());
-      }
-      startpoints.swap(tmp_startpoints);
-    }
-  }
-
-
-  // recursive function 
-  // (current,last) describe an interval of length n of sorted elements,
-  // for this interval a tree is build containing these elements.
-  // the most left child is returend in prevchild.
-
-  template <class T>
-  void build_range_tree(int n, link_type& leftchild, 
-			link_type& rightchild,
-			link_type& prevchild, 
-			link_type& leftmostlink,
-			T& current, 
-			const T& last,
-			T& sublevel_first,
-			T& sublevel_last)
-  {
-    // only two elements ==> two leaves and a parent is constructed
-    if (n==2)
-    {
-      sublevel_first = current;
-
-      link_type  vleft = new Range_tree_node2( 0, 0,
-                                  (*current), m_interface.get_key(*current) ); 
-      //CGAL_NIL CGAL_NIL first two arguments
-      CGAL_Tree_assertion( vleft != 0);
-
-      ++current;
-      link_type  vright = new Range_tree_node2( 0,0,
-                                  (*current), m_interface.get_key(*current) ); 
-      //CGAL_NIL CGAL_NIL first two arguments
-      CGAL_Tree_assertion( vright != 0);
-      current++;
-      sublevel_last = current;
-
-      link_type  vparent = new Range_tree_node2( vleft, vright, vleft->key );
-      CGAL_Tree_assertion( vparent != 0);
-
-      vleft->parent_link = vparent;
-      vright->parent_link = vparent;
-      leftchild = vleft;
-      rightchild = vright;
-      prevchild = vparent;
-      if ( leftmostlink == 0)
-	leftmostlink = leftchild;
-
-      Tree_base<C_Data, C_Window> *g = sublayer_tree->clone();
-      
-      T sub_first = sublevel_first;
-      T sub_last = sublevel_last;
-   
-      g->make_tree(sub_first, sub_last);
-      
-      vparent->sublayer= g;
-    }
-    else
-      // only one element ==> one leaf is constructed
-      if(n==1)
-      {
-	sublevel_first = current;
-	link_type vright = new Range_tree_node2( 0, 0,
-	                           (*current), m_interface.get_key(*current) );
-	//CGAL_NIL CGAL_NIL first two arguments
-        CGAL_Tree_assertion( vright != 0); //CGAL_NIL
-	current++;
-	sublevel_last = current;
-	prevchild = vright;
-	rightchild = vright;
-      }
-      else
-      {
-	// recursiv call for the construction. the interval is devided.
-	T sublevel_left, sublevel_right;
-	build_range_tree(n - (int)n/2, leftchild, rightchild, 
-			 prevchild, leftmostlink, current, last, 
-			 sublevel_first, sublevel_left);
-	link_type vparent = new Range_tree_node2( prevchild, 0,
-                                        rightchild->key );
-	//CGAL_NIL argument
-        CGAL_Tree_assertion( vparent != 0);
-
-	prevchild->parent_link = vparent;
-
-	build_range_tree((int)n/2, leftchild, rightchild, 
-			 prevchild, leftmostlink, current, 
-			 last, sublevel_right, sublevel_last);
-	vparent->right_link = prevchild;
-	prevchild->parent_link = vparent;
-	prevchild = vparent;
-	Tree_base<C_Data, C_Window> *g = sublayer_tree->clone();
-	T sub_first = sublevel_first;
-	T sub_last = sublevel_last;
-	g->make_tree(sub_first, sub_last);
-	vparent->sublayer = g;
-      }
-  }
-
-
-
-  void delete_tree(link_type v)
-  {
-    if (v->left_link != 0)
-    { 
-       delete_tree(left(v));
-       delete_tree(right(v));
-    }
-    delete v;
-  }	    
-		    
-  
-  // the vertex from that the way from root to the left interval bound 
-  // and the right interval bound splits.
-  link_type findSplitNode(Window const &key)
-  {
-    link_type v = root();
-
-    while(v->left_link!=0)
-    {
-//      if(m_interface.comp(m_interface.get_right(key), v->key))
-      if(is_less_equal(m_interface.get_right(key), v->key))
-	v = left(v);
-      else 
-	if(m_interface.comp(v->key, m_interface.get_left(key)))
-	  v = right(v);
-	else
-	  break;
-    }
-
-    return v;
-  }
-
-  template <class T>
-  void report_subtree(link_type v, 
-		      T result)
-  {
-    if(left(v)!=0)
-    {
-      report_subtree(left(v), result);
-      report_subtree(right(v), result);
-    }
-    else
-      (*result++)=v->object;
-  }
-
-  bool is_valid(link_type& v, link_type&  leftmost_child, 
-		link_type& rightmost_child) const
-  {
-    link_type leftmost_child_l, rightmost_child_l,  leftmost_child_r, 
-      rightmost_child_r;
-    if (v->sublayer != 0)
-    {
-      Tree_base<C_Data, C_Window> *T= v->sublayer;
-      if(! T->is_valid())
-	return false;
-    }
-    if(left(v)!=0)
-    {
-      if(!is_valid(left(v), leftmost_child_l, rightmost_child_l))
-	return false;
-      if(!is_valid(right(v), leftmost_child_r, rightmost_child_r))
-	return false;
-      if(m_interface.comp(v->key, rightmost_child_l->key) || 
-	 m_interface.comp(rightmost_child_l->key, v->key))
-	return false;
-      rightmost_child = rightmost_child_r;
-      leftmost_child = leftmost_child_l;
-    }
-    else
-    {
-      rightmost_child = v;
-      leftmost_child = v;      
-    }
-    return true;
-  }
-
-
-
-
-public:
-
-  // construction of a tree
-  Range_tree_d(Range_tree_d const &fact, bool):
-    sublayer_tree(fact.sublayer_tree->clone()), is_built(false), header(0)
-  {}
-
-  // construction of a tree
-  Range_tree_d(Tree_base<C_Data, C_Window> const &fact):
-    sublayer_tree(fact.clone()), is_built(false), header(0) 
-  {}
-
-  // destruction
-  virtual ~Range_tree_d()
-  {
-    link_type v=root();   
-
-    if (v!=0)
-      delete_tree(v);
-      if (header!=0)
-      	delete header;
-      if (sublayer_tree!=0)
-      	delete sublayer_tree;
-  }
-
-
- // a prototype of the tree is returned
-  Tree_base<C_Data, C_Window> *clone() const 
-  { 
-    return new Range_tree_d(*this, true); 
-  }
-  
-  bool make_tree(const typename std::list< C_Data>::iterator& beg, 
-		 const typename std::list< C_Data>::iterator& end,
-		 typename tbt::lit * =0){ 
-    return make_tree_impl(beg,end);
-  }
-
-#ifdef stlvector
-  bool make_tree(const typename std::vector< C_Data>::iterator& beg, 
-		 const typename std::vector< C_Data>::iterator& end,
-		 typename tbt::vbit * =0){ 
-    return make_tree_impl(beg,end);
-  }
-#endif
-#ifdef carray
-  bool make_tree(const C_Data *beg, 
-		 const C_Data *end){
-    return make_tree_impl(beg,end);
-  }
-#endif
-
-  // the tree is build according to the input elements in [first,last)
-  template<class T>
-  inline  
-  bool make_tree_impl(T first, 
-		      T last) // af: was &   todo: can we turn it in const& ??  
-  {
-    link_type leftchild, rightchild, prevchild, leftmostlink;
-
-    if(!is_built)
-      is_built = true;
-    else
-      return false;
-    
-    if(first == last) {
-      is_built = false;
-      return true;
-    }
-
-    int n = static_cast<int>(std::distance(first,last));
-    dynamic_merge(first, last);
-    
-    leftmostlink = 0;
-    T sublevel_first, sublevel_last;
-    
-    build_range_tree(n, leftchild, rightchild, prevchild, 
-		     leftmostlink, first, last, 
-		     sublevel_first, sublevel_last);
-    
-    header = new Range_tree_node2();
-    header->right_link = rightchild;
-    header->parent_link = prevchild;
-    header->left_link = leftmostlink;
-
-    return true;
-  }
-
-
-  std::back_insert_iterator< std::list< C_Data> > window_query
-          ( C_Window const &win, 
-	    std::back_insert_iterator< std::list< C_Data> > out,
-	    typename tbt::lbit * =0){
-    return window_query_impl(win,out);
-  }
-
-
-  std::back_insert_iterator< std::vector< C_Data> > window_query
-          ( C_Window const &win, 
-	    std::back_insert_iterator< std::vector< C_Data> > out,
-	    typename tbt::vbit * =0){
-    return window_query_impl(win,out);
-  }
-
-
-#ifdef carray
-  C_Data *window_query( C_Window const &win, C_Data *out){
-    return window_query_impl(win,out);
-  }
-#endif
-
-#ifdef ostreamiterator
-  std::ostream_iterator< C_Data>  window_query( C_Window const &win, 
-		     std::ostream_iterator< C_Data> out,
-		     typename tbt::oit *dummy=0){
-    return window_query_impl(win,out);
-  }
-#endif
-
-  // all elements that ly in win are inserted in result
-  template <class X>
-  inline  
-  X window_query_impl( C_Window const &win, X result)
-  {
-    if(is_less_equal(m_interface.get_right(win), m_interface.get_left(win)))
-       return result;
-    if(root()==0)
-      return result;
-    link_type split_node = findSplitNode(win);
-    if(left(split_node)==0)
-    {
-      if(is_inside(win,split_node->object))
-	(*result++)=split_node->object;
-    }	  
-    else
-    {
-      link_type v = (link_type) split_node->left_link;
-
-      while(left(v)!=0)
-      {
-	if(is_less_equal(m_interface.get_left(win),v->key))
-	{
-	  link_type w = right(v);
-	  if(left(w)!=0)
-	  {
-	    Tree_base<C_Data, C_Window> *T= (w)->sublayer;
-	    if(T->is_anchor())
-	      report_subtree(w,result);
-	    else
-	      T->window_query(win, result);
-	  }
-	  else
-	    if(is_inside(win,w->object))
-	      (*result++)=(w)->object;
-	  v = left(v);
-	}
-	else
-	  v = right(v);
-      }                 // end while
-      if(is_inside(win,v->object))
-	(*result++)=v->object;
-      v = right(split_node);
-      while(right(v)!=0)
-      {
-//	if(is_less_equal(v->key, m_interface.get_right(win))) closed interval
-	if(m_interface.comp(v->key, m_interface.get_right(win))) 
-	  //half open interval
-	{
-	  if(left(left(v))!=0)
-	  {
-	    Tree_base<C_Data, C_Window> *T= (left(v))->sublayer;
-	    if(T->is_anchor())
-	      report_subtree(left(v),result);
-	    else
-	      T->window_query(win, result);
-	  }
-	  else
-	  {
-	    if(is_inside(win,left(v)->object))
-	      (*result++)=left(v)->object; 
-	  }
-	  v = right(v);
-	}
-	else
-	  v = left(v);
-      }//end while
-      if(is_inside(win,v->object))
-      {
-	(*result++)=v->object; 
-      }
-    }
-    return result;
-  }
-
-  std::back_insert_iterator< std::list< C_Data> > enclosing_query( C_Window const &win, 
-			     std::back_insert_iterator< std::list< C_Data> > out,
-			     typename tbt::lbit * =0){
-    return enclosing_query_impl(win,out);
-  }
-
-  std::back_insert_iterator< std::vector< C_Data> > enclosing_query( C_Window const &win, 
-			     std::back_insert_iterator< std::vector< C_Data> > out,
-			     typename tbt::vbit * =0){
-    return enclosing_query_impl(win,out);
-  }
-
-
-#ifdef carray
-  C_Data *enclosing_query( C_Window const &win, C_Data *out){
-    return enclosing_query_impl(win,out);
-  }
-#endif
-
-#ifdef ostreamiterator
-  std::ostream_iterator< C_Data>  enclosing_query( C_Window const &win, 
-			     std::ostream_iterator< C_Data> out,
-			     typename tbt::oit *dummy=0){
-    return enclosing_query_impl(win,out);
-  }
-#endif
-
-  // a window query is performed 
-  template <class T>
-  inline
-  T enclosing_query_impl(C_Window const &win, T result)
-  {
-    return window_query_impl(win, result);
-  }
-
-  bool is_valid() const
-  {
-    link_type u,v,w;
-    u=v=w=root();
-    if(v!=0)
-      return is_valid(u, v, w);
-    return true;
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_RANGE_TREE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2.h b/3rdparty/CGAL-4.6/include/CGAL/Ray_2.h
deleted file mode 100644
index f01f6fe..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Ray_2.h
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_RAY_2_H
-#define CGAL_RAY_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Ray_2 : public R_::Kernel_base::Ray_2
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_2               Point_2;
-  typedef typename R_::Direction_2           Direction_2;
-  typedef typename R_::Vector_2              Vector_2;
-  typedef typename R_::Line_2                Line_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-
-  typedef typename R_::Kernel_base::Ray_2    RRay_2;
-
-  typedef Ray_2                              Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef RRay_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_   R;
-
-  Ray_2() {}
-
-  Ray_2(const RRay_2& r)
-    : RRay_2(r) {}
-
-  Ray_2(const Point_2 &sp, const Point_2 &secondp)
-    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, secondp)) {}
-
-  Ray_2(const Point_2 &sp, const Direction_2 &d)
-    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, d)) {}
-
-  Ray_2(const Point_2 &sp, const Vector_2 &v)
-    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, v)) {}
-
-  Ray_2(const Point_2 &sp, const Line_2 &l)
-    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, l)) {}
-
-
-  typename cpp11::result_of<typename R_::Construct_source_2( Ray_2)>::type
-  source() const
-  {
-    return R().construct_source_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R_::Construct_second_point_2( Ray_2)>::type
-  second_point() const
-  {
-    return R().construct_second_point_2_object()(*this);
-  }
-
-
-  Point_2
-  point(int i) const
-  {
-    CGAL_kernel_precondition( i >= 0 );
-    
-    typename R::Construct_vector_2 construct_vector;
-    typename R::Construct_scaled_vector_2 construct_scaled_vector;
-    typename R::Construct_translated_point_2 construct_translated_point;
-    if (i == 0) return source();
-    if (i == 1) return second_point();
-    return construct_translated_point(source(),
-				      construct_scaled_vector(construct_vector(source(), 
-									       second_point()),
-							      FT(i)));
-  }
-
-
-  typename cpp11::result_of<typename R_::Construct_source_2( Ray_2 )>::type
-  start() const
-  {
-    return source();
-  }
-
-  bool is_horizontal() const
-  {
-    return R().equal_y_2_object()(source(), second_point());
-  }
-
-  bool is_vertical() const
-  {
-    return R().equal_x_2_object()(source(), second_point());
-  }
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_2_object()(*this);
-  }
-
-  Direction_2
-  direction() const
-  {
-    typename R::Construct_vector_2 construct_vector;
-    typename R::Construct_direction_2 construct_direction;
-    return construct_direction( construct_vector(source(), second_point()) );
-  }
-
-
-  Vector_2
-  to_vector() const
-  {
-    typename R::Construct_vector_2 construct_vector;
-    return construct_vector(source(), second_point());
-  }
-
-  bool
-  has_on(const Point_2 &p) const
-  {
-    typename R::Construct_vector_2  construct_vector;
-    return p == source() ||
-         ( R().collinear_2_object()(source(), p, second_point()) &&
-           Direction_2(construct_vector( source(), p)) == direction() );
-  }
-
-
-
-  bool
-  collinear_has_on(const Point_2 &p) const
-  {
-    return R().collinear_has_on_2_object()(*this, p);
-  }
-
-  Ray_2
-  opposite() const
-  {
-    return Ray_2( source(), - direction() );
-  }
-
-  Line_2
-  supporting_line() const
-  {
-    return R().construct_line_2_object()(source(), second_point());
-  }
-
-  bool
-  operator==(const Ray_2& r) const
-  {
-    return R().equal_2_object()(*this, r);
-  }
-
-  bool
-  operator!=(const Ray_2& r) const
-  {
-    return !(*this == r);
-  }
-
-  Ray_2 
-  transform(const Aff_transformation_2 &t) const
-  {
-    return Ray_2(t.transform(source()), t.transform(second_point()));
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Ray_2<R>& r, const Cartesian_tag&) 
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << r.source() << ' ' << r.second_point();
-    case IO::BINARY :
-        return os << r.source() << r.second_point();
-    default:
-        return os << "RayC2(" << r.source() <<  ", " << r.second_point() << ")";
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Ray_2<R>& r, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << r.source() << ' ' << r.second_point();
-    case IO::BINARY :
-        return os << r.source() << r.second_point();
-    default:
-       return os << "RayH2(" << r.source() <<  ", " << r.second_point() << ")";
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Ray_2<R>& r)
-{
-  return insert(os, r, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Ray_2<R>& r, const Cartesian_tag&) 
-{
-    typename R::Point_2 p, q;
-    is >> p >> q;
-    if (is)
-        r = Ray_2<R>(p, q);
-    return is;
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Ray_2<R>& r, const Homogeneous_tag&) 
-{
-  typename R::Point_2 p, q;
-  is >> p >> q;
-  if (is)
-    r = Ray_2<R>(p, q);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Ray_2<R>& r)
-{
-  return extract(is, r, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif  // CGAL_RAY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Bbox_2_intersection.h b/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Bbox_2_intersection.h
deleted file mode 100644
index 13323e8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Bbox_2_intersection.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman
-
-
-#ifndef CGAL_RAY_2_BBOX_2_INTERSECTION_H
-#define CGAL_RAY_2_BBOX_2_INTERSECTION_H
-
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Ray_2.h>
-#include <CGAL/kernel_assertions.h>
-#include <CGAL/number_utils.h>
-
-namespace CGAL {
-
-class Bbox_2_Ray_2_pair_impl;
-
-class CGAL_EXPORT Bbox_2_Ray_2_pair {
-public:
-    enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT};
-    ~Bbox_2_Ray_2_pair() ;
-    Bbox_2_Ray_2_pair() ;
-    Bbox_2_Ray_2_pair(Bbox_2_Ray_2_pair const &o) ;
-    Bbox_2_Ray_2_pair(Bbox_2 const &box,
-                      double x, double y, double dx, double dy) ;
-    Bbox_2_Ray_2_pair& operator=(Bbox_2_Ray_2_pair const &o) ;
-    Intersection_results intersection_type() const;
-    bool intersection(double &x, double &y) const;
-    bool intersection(double &x1, double &y1, double &x2, double &y2) const;
-protected:
-    Bbox_2_Ray_2_pair_impl *pimpl;
-};
-
-CGAL_EXPORT bool do_intersect_ray_2(
-    const Bbox_2 &box, double x, double y, double dx, double dy);
-
-template <class Ray>
-bool do_intersect_ray_2(
-    const Bbox_2 &box,
-    const Ray &ray)
-{
-    double startx = to_double(ray->start().x());
-    double starty = to_double(ray->start().y());
-    double dx = to_double(ray->direction().to_vector().x());
-    double dy = to_double(ray->direction().to_vector().y());
-    return do_intersect_ray_2(box, startx, starty, dx, dy);
-}
-
-template <class Ray>
-inline bool do_intersect_ray_2(
-    const Ray &ray,
-    const Bbox_2 &box)
-{
-    return do_intersect_ray_2(box, ray);
-}
-} //namespace CGAL
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_3.h b/3rdparty/CGAL-4.6/include/CGAL/Ray_3.h
deleted file mode 100644
index 1d004ec..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Ray_3.h
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_RAY_3_H
-#define CGAL_RAY_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Ray_3 : public R_::Kernel_base::Ray_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Direction_3           Direction_3;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Line_3                Line_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Ray_3                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Ray_3    Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Ray_3() {}
-
-  Ray_3(const Rep& r)
-    : Rep(r) {}
-
-  Ray_3(const Point_3& sp, const Point_3& secondp)
-    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, secondp)) {}
-
-  Ray_3(const Point_3& sp, const Vector_3& v)
-    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, v)) {}
-
-  Ray_3(const Point_3& sp, const Direction_3& d)
-    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, d)) {}
-
-  Ray_3(const Point_3& sp, const Line_3& l)
-    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, l)) {}
-
-  Ray_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Ray_3(t.transform(this->source()),
-                 t.transform(this->second_point()));
-    // NB : Homogeneous used direction() instead of second_point().
-  }
-
-/*
-  const Point_3 &   start() const;
-  const Point_3 &   source() const
-  {
-      return get(base).e0;
-  }
-
-  Direction_3 direction() const;
-  Vector_3    to_vector() const;
-  Line_3      supporting_line() const;
-  Ray_3       opposite() const;
-
-  bool        is_degenerate() const;
-  bool        collinear_has_on(const Point_3 &p) const;
-*/
-
-  typename cpp11::result_of<typename R::Construct_point_on_3(Ray_3, int)>::type
-  point(int i) const // TODO : use Qrt
-  {
-    return R().construct_point_on_3_object()(*this, i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_source_3(Ray_3)>::type
-  source() const
-  {
-    return R().construct_source_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_second_point_3(Ray_3)>::type
-  second_point() const
-  {
-    return R().construct_second_point_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_source_3(Ray_3)>::type
-  start() const
-  {
-    return source();
-  }
-
-  bool has_on(const Point_3 &p) const
-  {
-    return R().has_on_3_object()(*this, p);
-  }
-
-  Direction_3
-  direction() const
-  {
-    typename R::Construct_vector_3 construct_vector;
-    typename R::Construct_direction_3 construct_direction;
-    return construct_direction( construct_vector(source(), second_point()) );
-  }
-
-  Ray_3
-  opposite() const
-  {
-    return Ray_3( source(), - direction() );
-  }
-
-  Vector_3
-  to_vector() const
-  {
-    typename R::Construct_vector_3 construct_vector;
-    return construct_vector(source(), second_point());
-  }
-
-  Line_3
-  supporting_line() const
-  {
-    return R().construct_line_3_object()(source(), second_point());
-  }
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Ray_3<R>& r, const Cartesian_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << r.start() << ' ' << r.direction();
-    case IO::BINARY :
-        return os<< r.start() << r.direction();
-    default:
-        return os << "RayC3(" << r.start() <<  ", " << r.direction() << ")";
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Ray_3<R>& r, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-      case IO::ASCII :
-          return os << r.start() << ' ' << r.direction();
-      case IO::BINARY :
-          return os<< r.start() << r.direction();
-      default:
-          return os << "RayH3(" << r.start() <<  ", " << r.direction() << ")";
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Ray_3<R>& r)
-{
-  return insert(os, r, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Ray_3<R>& r, const Cartesian_tag&)
-{
-    typename R::Point_3 p;
-    typename R::Direction_3 d;
-
-    is >> p >> d;
-
-    if (is)
-        r = Ray_3<R>(p, d);
-    return is;
-}
-
-template <class R >
-std::istream&
-extract(std::istream& is, Ray_3<R>& r, const Homogeneous_tag&)
-{
-  typename R::Point_3 p;
-  typename R::Direction_3 d;
-  is >> p >> d;
-  if (is)
-    r = Ray_3<R>(p, d);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Ray_3<R>& r)
-{
-  return extract(is, r, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_RAY_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Real_timer.h b/3rdparty/CGAL-4.6/include/CGAL/Real_timer.h
deleted file mode 100644
index 130f36d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Real_timer.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
-//                 Matthias Baesken <baesken at informatik.uni-halle.de>
-
-#ifndef CGAL_REAL_TIMER_H
-#define CGAL_REAL_TIMER_H 1
-
-#include <CGAL/basic.h>
-// For the numerical limits
-#include <cfloat>
-
-namespace CGAL {
-
-// SECTION: A Timer Measuring Real-Time
-// ========================================================================
-// 
-// DEFINITION
-// 
-// A timer `t' of type Real_timer is an object with a state. It is either
-// running or it is stopped. The state is controlled with `t.start()'
-// and `t.stop()'. The timer counts the time elapsed since its creation
-// or last reset. It counts only the time where it is in the running
-// state. The time information is given in seconds.
-
-class CGAL_EXPORT Real_timer {
-private:
-    double      elapsed;
-    double      started;
-    int         interv;
-    bool        running;
-
-    static bool m_failed;
-
-    double   get_real_time()     const; // in seconds
-    double   compute_precision() const; // in seconds
-public:
-    Real_timer() : elapsed(0.0), started(0.0), interv(0), running(false) {}
-
-    void     start();
-    void     stop ();
-    void     reset();
-    bool     is_running() const { return running; }
-
-    double   time()       const;
-    int      intervals()  const { return interv; }
-    double   precision()  const;
-    // Returns timer precison. Computes it dynamically at first call.
-    // Returns -1.0 if timer system call fails, which, for a proper coded
-    // test towards precision leads to an immediate stop of an otherwise 
-    // infinite loop (fixed tolerance * total time >= precision).
-    double   max BOOST_PREVENT_MACRO_SUBSTITUTION ()        const { return DBL_MAX; }
-};
-
-
-// -----------------------------------------------------------------------
-
-// Member functions for Real_timer
-// ===========================
-
-inline void Real_timer::start() {
-    CGAL_precondition( ! running);
-    started = get_real_time();
-    running = true;
-    ++ interv;
-}
-
-inline void Real_timer::stop() {
-    CGAL_precondition( running);
-    double t = get_real_time();
-    elapsed += (t - started);
-    started = 0.0;
-    running = false;
-}
-
-inline void Real_timer::reset() {
-    interv  = 0;
-    elapsed = 0.0;
-    if (running) {
-	started = get_real_time();
-	++ interv;
-    } else {
-        started = 0.0;
-    }
-}
-
-inline double Real_timer::time() const {
-    if (running) {
-        double t = get_real_time();
-	return elapsed + (t - started);
-    }
-    return elapsed;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_REAL_TIMER_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_3.h
deleted file mode 100644
index 948bb75..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_3.h
+++ /dev/null
@@ -1,2152 +0,0 @@
-// Copyright (c) 1999-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion
-//                 Christophe Delage <Christophe.Delage at sophia.inria.fr>
-//                 Clement Jamin
-
-#ifndef CGAL_REGULAR_TRIANGULATION_3_H
-#define CGAL_REGULAR_TRIANGULATION_3_H
-
-#include <CGAL/basic.h>
-
-#include <set>
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/enumerable_thread_specific.h>
-#endif
-
-#include <CGAL/Triangulation_3.h>
-#include <CGAL/Regular_triangulation_cell_base_3.h>
-#include <boost/bind.hpp>
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-#include <CGAL/Spatial_sort_traits_adapter_3.h>
-#include <CGAL/internal/info_check.h>
-
-#include <boost/iterator/zip_iterator.hpp>
-#include <boost/mpl/and.hpp>
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-# include <CGAL/Mesh_3/Profiling_tools.h>
-#endif
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4355) // complaint about using 'this' to
-#endif                          // initialize a member
-
-namespace CGAL {
-
-  /************************************************
-   *
-   * Regular_triangulation_3 class
-   *
-   ************************************************/
-
-  template < class Gt, class Tds_ = Default, class Lock_data_structure_ = Default >
-  class Regular_triangulation_3
-  : public Triangulation_3<
-      Gt,
-      typename Default::Get<Tds_, Triangulation_data_structure_3 <
-        Triangulation_vertex_base_3<Gt>,
-        Regular_triangulation_cell_base_3<Gt> > >::type,
-      Lock_data_structure_>
-  {
-    typedef Regular_triangulation_3<Gt, Tds_, Lock_data_structure_> Self;
-
-    typedef typename Default::Get<Tds_, Triangulation_data_structure_3 <
-      Triangulation_vertex_base_3<Gt>,
-      Regular_triangulation_cell_base_3<Gt> > >::type Tds;
-
-    typedef Triangulation_3<Gt,Tds,Lock_data_structure_> Tr_Base;
-
-  public:
-
-    typedef Tds                                   Triangulation_data_structure;
-    typedef Gt                                    Geom_traits;
-
-    typedef typename Tr_Base::Concurrency_tag     Concurrency_tag;
-    typedef typename Tr_Base::Lock_data_structure Lock_data_structure;
-
-    typedef typename Tr_Base::Vertex_handle       Vertex_handle;
-    typedef typename Tr_Base::Cell_handle         Cell_handle;
-    typedef typename Tr_Base::Vertex              Vertex;
-    typedef typename Tr_Base::Cell                Cell;
-    typedef typename Tr_Base::Facet               Facet;
-    typedef typename Tr_Base::Edge                Edge;
-
-    typedef typename Tr_Base::size_type           size_type;
-    typedef typename Tr_Base::Locate_type         Locate_type;
-    typedef typename Tr_Base::Cell_iterator       Cell_iterator;
-    typedef typename Tr_Base::Facet_iterator      Facet_iterator;
-    typedef typename Tr_Base::Edge_iterator       Edge_iterator;
-    typedef typename Tr_Base::Facet_circulator    Facet_circulator;
-
-    typedef typename Tr_Base::Finite_vertices_iterator Finite_vertices_iterator;
-    typedef typename Tr_Base::Finite_cells_iterator    Finite_cells_iterator;
-    typedef typename Tr_Base::Finite_facets_iterator   Finite_facets_iterator;
-    typedef typename Tr_Base::Finite_edges_iterator    Finite_edges_iterator;
-    typedef typename Tr_Base::All_cells_iterator       All_cells_iterator;
-
-    typedef typename Gt::Weighted_point_3            Weighted_point;
-    typedef typename Gt::Bare_point                  Bare_point;
-    typedef typename Gt::Segment_3                   Segment;
-    typedef typename Gt::Triangle_3                  Triangle;
-    typedef typename Gt::Tetrahedron_3               Tetrahedron;
-
-    // types for dual:
-    typedef typename Gt::Line_3        Line;
-    typedef typename Gt::Ray_3         Ray;
-    typedef typename Gt::Plane_3       Plane;
-    typedef typename Gt::Object_3      Object;
-
-    //Tag to distinguish Delaunay from Regular triangulations
-    typedef Tag_true   Weighted_tag;
-
-    using Tr_Base::cw;
-    using Tr_Base::ccw;
-#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
-    using Tr_Base::geom_traits;
-#endif
-    using Tr_Base::number_of_vertices;
-    using Tr_Base::dimension;
-    using Tr_Base::finite_facets_begin;
-    using Tr_Base::finite_facets_end;
-    using Tr_Base::finite_vertices_begin;
-    using Tr_Base::finite_vertices_end;
-    using Tr_Base::finite_cells_begin;
-    using Tr_Base::finite_cells_end;
-    using Tr_Base::finite_edges_begin;
-    using Tr_Base::finite_edges_end;
-    using Tr_Base::tds;
-    using Tr_Base::infinite_vertex;
-    using Tr_Base::next_around_edge;
-    using Tr_Base::vertex_triple_index;
-    using Tr_Base::mirror_vertex;
-    using Tr_Base::mirror_index;
-    using Tr_Base::orientation;
-    using Tr_Base::coplanar_orientation;
-    using Tr_Base::adjacent_vertices;
-    using Tr_Base::construct_segment;
-    using Tr_Base::incident_facets;
-    using Tr_Base::insert_in_conflict;
-    using Tr_Base::is_infinite;
-    using Tr_Base::is_valid_finite;
-    using Tr_Base::locate;
-    using Tr_Base::side_of_segment;
-    using Tr_Base::side_of_edge;
-    using Tr_Base::find_conflicts;
-    using Tr_Base::is_valid;
-
-    Regular_triangulation_3(const Gt & gt = Gt(), Lock_data_structure *lock_ds = NULL)
-      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
-    {}
-
-    Regular_triangulation_3(Lock_data_structure *lock_ds, const Gt & gt = Gt())
-      : Tr_Base(lock_ds, gt), hidden_point_visitor(this)
-    {}
-
-    Regular_triangulation_3(const Regular_triangulation_3 & rt)
-      : Tr_Base(rt), hidden_point_visitor(this)
-    {
-      CGAL_triangulation_postcondition( is_valid() );
-    }
-
-    //insertion
-    template < typename InputIterator >
-    Regular_triangulation_3(InputIterator first, InputIterator last,
-      const Gt & gt = Gt(), Lock_data_structure *lock_ds = NULL)
-      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
-    {
-      insert(first, last);
-    }
-
-    template < typename InputIterator >
-    Regular_triangulation_3(InputIterator first, InputIterator last,
-      Lock_data_structure *lock_ds, const Gt & gt = Gt())
-      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
-    {
-      insert(first, last);
-    }
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-    template < class InputIterator >
-    std::ptrdiff_t
-      insert( InputIterator first, InputIterator last,
-      typename boost::enable_if<
-      boost::is_convertible<
-      typename std::iterator_traits<InputIterator>::value_type,
-      Weighted_point
-      >
-      >::type* = NULL
-      )
-#else
-    template < class InputIterator >
-    std::ptrdiff_t
-      insert( InputIterator first, InputIterator last)
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-    {
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-      static Profile_branch_counter_3 bcounter(
-        "early withdrawals / late withdrawals / successes [Regular_tri_3::insert]");
-#endif
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-      WallClockTimer t;
-#endif
-
-      size_type n = number_of_vertices();
-      std::vector<Weighted_point> points(first, last);
-      spatial_sort (points.begin(), points.end(), geom_traits());
-
-    // Parallel
-#ifdef CGAL_LINKED_WITH_TBB
-      if (this->is_parallel())
-      {
-        size_t num_points = points.size();
-        Cell_handle hint;
-        std::vector<Vertex_handle> far_sphere_vertices;
-        
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-        const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000;
-        if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
-        {
-          // Add temporary vertices on a "far sphere" to reduce contention on
-          // the infinite vertex
-
-          // Get bbox
-          const Bbox_3 &bbox = *this->get_bbox();
-          // Compute radius for far sphere
-          const double& xdelta = bbox.xmax() - bbox.xmin();
-          const double& ydelta = bbox.ymax() - bbox.ymin();
-          const double& zdelta = bbox.zmax() - bbox.zmin();
-          const double radius = 1.3 * 0.5 * std::sqrt(xdelta*xdelta +
-                                                      ydelta*ydelta +
-                                                      zdelta*zdelta);
-          
-          // WARNING - TODO: this code has to be fixed because Vector_3 is not 
-          // required by the traits concept
-          const typename Gt::Vector_3 center(
-            bbox.xmin() + 0.5*xdelta,
-            bbox.ymin() + 0.5*ydelta,
-            bbox.zmin() + 0.5*zdelta);
-          Random_points_on_sphere_3<Point> random_point(radius);
-          const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
-            tbb::task_scheduler_init::default_num_threads() * 3.5);
-          std::vector<Point> points_on_far_sphere;
-          for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
-            points_on_far_sphere.push_back(*random_point + center);
-
-          spatial_sort(points_on_far_sphere.begin(), 
-                       points_on_far_sphere.end(), 
-                       geom_traits());
-
-          std::vector<Point>::const_iterator it_p = points_on_far_sphere.begin();
-          std::vector<Point>::const_iterator it_p_end = points_on_far_sphere.end();
-          for ( ; it_p != it_p_end ; ++it_p)
-          {
-            Locate_type lt;
-            Cell_handle c;
-            int li, lj;
-
-            c = locate (*it_p, lt, li, lj, hint);
-            Vertex_handle v = insert (*it_p, lt, c, li, lj);
-            hint = (v == Vertex_handle() ? c : v->cell());
-
-            far_sphere_vertices.push_back(v);
-          }
-        }
-#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-      
-        size_t i = 0;
-        // Insert "num_points_seq" points sequentially
-        // (or more if dim < 3 after that)
-        size_t num_points_seq = (std::min)(num_points, (size_t)500);
-        while (dimension() < 3 || i < num_points_seq)
-        {
-          Locate_type lt;
-          Cell_handle c;
-          int li, lj;
-
-          c = locate (points[i], lt, li, lj, hint);
-          Vertex_handle v = insert (points[i], lt, c, li, lj);
-
-          hint = (v == Vertex_handle() ? c : v->cell());
-          ++i;
-        }
-
-        tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint->vertex(0));
-        tbb::parallel_for(
-          tbb::blocked_range<size_t>( i, num_points ),
-          Insert_point<Self>(*this, points, tls_hint)
-        );
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-        if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
-        {
-          // Remove the temporary vertices on far sphere
-          remove(far_sphere_vertices.begin(), far_sphere_vertices.end());
-        }
-#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
-      }
-      // Sequential
-      else
-#endif // CGAL_LINKED_WITH_TBB
-      {
-        Cell_handle hint;
-        for (typename std::vector<Weighted_point>::const_iterator p = points.begin(),
-          end = points.end(); p != end; ++p)
-        {
-          Locate_type lt;
-          Cell_handle c;
-          int li, lj;
-          c = locate (*p, lt, li, lj, hint);
-
-          Vertex_handle v = insert (*p, lt, c, li, lj);
-
-          hint = v == Vertex_handle() ? c : v->cell();
-        }
-      }
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-      std::cerr << "Points inserted in " << t.elapsed() << " seconds." << std::endl;
-#endif
-      return number_of_vertices() - n;
-    }
-
-
-#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-  private:
-    //top stands for tuple-or-pair
-    template <class Info>
-    const Weighted_point& top_get_first(const std::pair<Weighted_point,Info>& pair) const { return pair.first; }
-    template <class Info>
-    const Info& top_get_second(const std::pair<Weighted_point,Info>& pair) const { return pair.second; }
-    template <class Info>
-    const Weighted_point& top_get_first(const boost::tuple<Weighted_point,Info>& tuple) const { return boost::get<0>(tuple); }
-    template <class Info>
-    const Info& top_get_second(const boost::tuple<Weighted_point,Info>& tuple) const { return boost::get<1>(tuple); }
-
-    template <class Tuple_or_pair,class InputIterator>
-    std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
-    {
-      size_type n = number_of_vertices();
-      std::vector<std::ptrdiff_t> indices;
-      std::vector<Weighted_point> points;
-      std::vector<typename Triangulation_data_structure::Vertex::Info> infos;
-      std::ptrdiff_t index=0;
-      for (InputIterator it=first;it!=last;++it){
-        Tuple_or_pair pair = *it;
-        points.push_back( top_get_first(pair) );
-        infos.push_back ( top_get_second(pair) );
-        indices.push_back(index++);
-      }
-
-      typedef Spatial_sort_traits_adapter_3<Geom_traits,Weighted_point*> Search_traits;
-
-      spatial_sort( indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()) );
-
-      Cell_handle hint;
-      for (typename std::vector<std::ptrdiff_t>::const_iterator
-        it = indices.begin(), end = indices.end();
-        it != end; ++it)
-      {
-        Locate_type lt;
-        Cell_handle c;
-        int li, lj;
-        c = locate (points[*it], lt, li, lj, hint);
-
-        Vertex_handle v = insert (points[*it], lt, c, li, lj);
-        if (v!=Vertex_handle()){
-          v->info()=infos[*it];
-          hint=v->cell();
-        }
-        else
-          hint=c;
-      }
-
-      return number_of_vertices() - n;
-    }
-
-  public:
-
-    template < class InputIterator >
-    std::ptrdiff_t
-      insert( InputIterator first,
-      InputIterator last,
-      typename boost::enable_if<
-      boost::is_convertible<
-      typename std::iterator_traits<InputIterator>::value_type,
-      std::pair<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type>
-      >
-      >::type* = NULL
-      )
-    {return insert_with_info< std::pair<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);}
-
-    template <class  InputIterator_1,class InputIterator_2>
-    std::ptrdiff_t
-      insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
-      boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
-      typename boost::enable_if<
-      boost::mpl::and_<
-      typename boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Weighted_point >,
-      typename boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type >
-      >
-      >::type* =NULL
-      )
-    {return insert_with_info< boost::tuple<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);}
-#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
-
-
-    Vertex_handle insert(const Weighted_point & p, Vertex_handle hint,
-                         bool *could_lock_zone = NULL)
-    {
-      return insert(p,
-                    hint == Vertex_handle() ? this->infinite_cell() : hint->cell(),
-                    could_lock_zone);
-    }
-
-    Vertex_handle insert(const Weighted_point & p,
-      Cell_handle start = Cell_handle(), bool *could_lock_zone = NULL);
-
-    Vertex_handle insert(const Weighted_point & p, Locate_type lt,
-      Cell_handle c, int li, int, bool *could_lock_zone = NULL);
-
-    template <class CellIt>
-    Vertex_handle
-      insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
-      Cell_handle begin, int i);
-
-    template <class CellIt>
-    Vertex_handle
-      insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
-      Cell_handle begin, int i, Vertex_handle newv);
-
-    template <class OutputIteratorBoundaryFacets,
-    class OutputIteratorCells,
-    class OutputIteratorInternalFacets>
-      Triple<OutputIteratorBoundaryFacets,
-      OutputIteratorCells,
-      OutputIteratorInternalFacets>
-      find_conflicts(const Weighted_point &p, Cell_handle c,
-      OutputIteratorBoundaryFacets bfit,
-      OutputIteratorCells cit,
-      OutputIteratorInternalFacets ifit
-      , bool *could_lock_zone = NULL
-      , const Facet *this_facet_must_be_in_the_cz = NULL
-      , bool *the_facet_is_in_its_cz = NULL
-      ) const
-    {
-      CGAL_triangulation_precondition(dimension() >= 2);
-
-      std::vector<Cell_handle> cells;
-      cells.reserve(32);
-      std::vector<Facet> facets;
-      facets.reserve(64);
-
-      if (dimension() == 2) {
-        Conflict_tester_2 tester(p, this);
-        if (! tester (c)) return make_triple (bfit, cit, ifit);
-        ifit = Tr_Base::find_conflicts
-          (c, tester,
-          make_triple(std::back_inserter(facets),
-          std::back_inserter(cells),
-          ifit)
-          , could_lock_zone
-          , this_facet_must_be_in_the_cz
-          , the_facet_is_in_its_cz
-          ).third;
-      }
-      else {
-        Conflict_tester_3 tester(p, this);
-        if (! tester (c)) return make_triple (bfit, cit, ifit);
-        ifit = Tr_Base::find_conflicts
-          (c, tester,
-          make_triple(std::back_inserter(facets),
-          std::back_inserter(cells),
-          ifit)
-          , could_lock_zone
-          , this_facet_must_be_in_the_cz
-          , the_facet_is_in_its_cz
-          ).third;
-      }
-
-      // Reset the conflict flag on the boundary.
-      for(typename std::vector<Facet>::iterator fit=facets.begin();
-        fit != facets.end(); ++fit) {
-          fit->first->neighbor(fit->second)->tds_data().clear();
-          *bfit++ = *fit;
-      }
-
-      // Reset the conflict flag in the conflict cells.
-      for(typename std::vector<Cell_handle>::iterator ccit=cells.begin();
-        ccit != cells.end(); ++ccit) {
-          (*ccit)->tds_data().clear();
-          *cit++ = *ccit;
-      }
-      return make_triple(bfit, cit, ifit);
-    }
-
-    template <class OutputIteratorBoundaryFacets, class OutputIteratorCells>
-    std::pair<OutputIteratorBoundaryFacets, OutputIteratorCells>
-      find_conflicts(const Weighted_point &p, Cell_handle c,
-      OutputIteratorBoundaryFacets bfit,
-      OutputIteratorCells cit
-      , bool *could_lock_zone = NULL
-      ) const
-    {
-      Triple<OutputIteratorBoundaryFacets,
-        OutputIteratorCells,
-        Emptyset_iterator> t = find_conflicts(p, c, bfit, cit,
-                                              Emptyset_iterator(),
-                                              could_lock_zone);
-      return std::make_pair(t.first, t.second);
-    }
-
-    // Returns the vertices on the interior of the conflict hole.
-    template <class OutputIterator>
-    OutputIterator
-      vertices_inside_conflict_zone(const Weighted_point&p, Cell_handle c,
-      OutputIterator res) const
-    {
-      CGAL_triangulation_precondition(dimension() >= 2);
-
-      // Get the facets on the boundary of the hole, and the cells of the hole
-      std::vector<Cell_handle> cells;
-      std::vector<Facet> facets;
-      find_conflicts(p, c, std::back_inserter(facets),
-        std::back_inserter(cells), Emptyset_iterator());
-
-      // Put all vertices on the hole in 'vertices'
-      const int d = dimension();
-      std::set<Vertex_handle> vertices;
-      for (typename std::vector<Cell_handle>::const_iterator
-        it = cells.begin(),
-        end = cells.end(); it != end; ++it)
-      {
-        for(int i = 0; i <= d; ++i) {
-          vertices.insert((*it)->vertex(i));
-        }
-      }
-      // Then extract the vertices of the boundary and remove them from
-      // 'vertices'
-      if (dimension() == 3) {
-        for (typename std::vector<Facet>::const_iterator i = facets.begin();
-          i != facets.end(); ++i) {
-            vertices.erase(i->first->vertex((i->second+1)&3));
-            vertices.erase(i->first->vertex((i->second+2)&3));
-            vertices.erase(i->first->vertex((i->second+3)&3));
-        }
-      } else {
-        for (typename std::vector<Facet>::const_iterator i = facets.begin();
-          i != facets.end(); ++i) {
-            vertices.erase(i->first->vertex(cw(i->second)));
-            vertices.erase(i->first->vertex(ccw(i->second)));
-        }
-      }
-
-      return std::copy(vertices.begin(), vertices.end(), res);
-    }
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-    // Returns the vertices on the boundary of the conflict hole.
-    template <class OutputIterator>
-    OutputIterator
-      vertices_in_conflict(const Weighted_point&p, Cell_handle c, OutputIterator res) const
-    {
-      return vertices_on_conflict_zone_boundary(p, c, res);
-    }
-#endif // CGAL_NO_DEPRECATED_CODE
-
-    // Returns the vertices on the boundary of the conflict hole.
-    template <class OutputIterator>
-    OutputIterator
-      vertices_on_conflict_zone_boundary(const Weighted_point&p, Cell_handle c,
-      OutputIterator res) const
-    {
-      CGAL_triangulation_precondition(dimension() >= 2);
-
-      // Get the facets on the boundary of the hole.
-      std::vector<Facet> facets;
-      find_conflicts(p, c, std::back_inserter(facets),
-        Emptyset_iterator(), Emptyset_iterator());
-
-      // Then extract uniquely the vertices.
-      std::set<Vertex_handle> vertices;
-      if (dimension() == 3) {
-        for (typename std::vector<Facet>::const_iterator i = facets.begin();
-          i != facets.end(); ++i) {
-            vertices.insert(i->first->vertex((i->second+1)&3));
-            vertices.insert(i->first->vertex((i->second+2)&3));
-            vertices.insert(i->first->vertex((i->second+3)&3));
-        }
-      } else {
-        for (typename std::vector<Facet>::const_iterator i = facets.begin();
-          i != facets.end(); ++i) {
-            vertices.insert(i->first->vertex(cw(i->second)));
-            vertices.insert(i->first->vertex(ccw(i->second)));
-        }
-      }
-
-      return std::copy(vertices.begin(), vertices.end(), res);
-    }
-
-    void remove (Vertex_handle v);
-    // Concurrency-safe
-    // See Triangulation_3::remove for more information
-    bool remove (Vertex_handle v, bool *could_lock_zone);
-
-    template < typename InputIterator >
-    size_type remove(InputIterator first, InputIterator beyond)
-    {
-      CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond));
-      size_type n = number_of_vertices();
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-      WallClockTimer t;
-#endif
-
-      // Parallel
-#ifdef CGAL_LINKED_WITH_TBB
-      if (this->is_parallel())
-      {
-        // TODO: avoid that by asking for ramdom-access iterators?
-        std::vector<Vertex_handle> vertices(first, beyond);
-        tbb::concurrent_vector<Vertex_handle> vertices_to_remove_sequentially;
-
-        tbb::parallel_for(
-          tbb::blocked_range<size_t>( 0, vertices.size()),
-          Remove_point<Self>(*this, vertices, vertices_to_remove_sequentially)
-        );
-
-        // Do the rest sequentially
-        for ( typename tbb::concurrent_vector<Vertex_handle>::const_iterator
-                it = vertices_to_remove_sequentially.begin(),
-                it_end = vertices_to_remove_sequentially.end()
-            ; it != it_end
-            ; ++it)
-        {
-          remove(*it);
-        }
-      }
-      // Sequential
-      else
-#endif // CGAL_LINKED_WITH_TBB
-      {
-        while (first != beyond) {
-          remove(*first);
-          ++first;
-        }
-      }
-
-#ifdef CGAL_TRIANGULATION_3_PROFILING
-      std::cerr << "Points removed in " << t.elapsed() << " seconds." << std::endl;
-#endif
-      return n - number_of_vertices();
-    }
-
-    
-    template <class OutputItCells>
-    void remove_and_give_new_cells(Vertex_handle v, OutputItCells cit)
-    {
-      Self tmp;
-      Vertex_remover<Self> remover (tmp);
-      Tr_Base::remove_and_give_new_cells(v, remover, cit);
-
-      CGAL_triangulation_expensive_postcondition(is_valid());
-    }
-
-
-    // DISPLACEMENT
-    Vertex_handle move_point(Vertex_handle v, const Weighted_point & p);
-
-    // Displacement works only for Regular triangulation
-    // without hidden points at any time
-    Vertex_handle move_if_no_collision(Vertex_handle v, const Weighted_point & p);
-    Vertex_handle move(Vertex_handle v, const Weighted_point & p);
-
-    // REMOVE CLUSTER - works only when Regular has no hidden point at all
-    // "regular as Delaunay"
-    template < typename InputIterator >
-    size_type remove_cluster(InputIterator first, InputIterator beyond)
-    {
-      Self tmp;
-      Vertex_remover<Self> remover (tmp);
-      return Tr_Base::remove(first, beyond, remover);
-    }
-
-  protected:
-
-    Oriented_side
-      side_of_oriented_power_sphere(const Weighted_point &p0,
-      const Weighted_point &p1,
-      const Weighted_point &p2,
-      const Weighted_point &p3,
-      const Weighted_point &p,
-      bool perturb = false) const;
-
-    Oriented_side
-      side_of_oriented_power_circle(const Weighted_point &p0,
-      const Weighted_point &p1,
-      const Weighted_point &p2,
-      const Weighted_point &p,
-      bool perturb = false) const;
-
-    Bounded_side
-      side_of_bounded_power_circle(const Weighted_point &p0,
-      const Weighted_point &p1,
-      const Weighted_point &p2,
-      const Weighted_point &p,
-      bool perturb = false) const;
-
-    Bounded_side
-      side_of_bounded_power_segment(const Weighted_point &p0,
-      const Weighted_point &p1,
-      const Weighted_point &p,
-      bool perturb = false) const;
-
-
-  public:
-
-    // Queries
-    Bounded_side
-      side_of_power_sphere(Cell_handle c, const Weighted_point &p,
-      bool perturb = false) const;
-
-    Bounded_side
-      side_of_power_circle(const Facet & f, const Weighted_point & p,
-      bool /* perturb */ = false) const
-    {
-      return side_of_power_circle(f.first, f.second, p);
-    }
-
-    Bounded_side
-      side_of_power_circle(Cell_handle c, int i, const Weighted_point &p,
-      bool perturb = false) const;
-
-    Bounded_side
-      side_of_power_segment(Cell_handle c, const Weighted_point &p,
-      bool perturb = false) const;
-
-    Vertex_handle
-      nearest_power_vertex_in_cell(const Bare_point& p,
-      Cell_handle c)  const;
-
-    Vertex_handle
-      nearest_power_vertex(const Bare_point& p, Cell_handle c =
-      Cell_handle()) const;
-
-    bool is_Gabriel(Cell_handle c, int i) const;
-    bool is_Gabriel(Cell_handle c, int i, int j) const;
-    bool is_Gabriel(const Facet& f)const ;
-    bool is_Gabriel(const Edge& e) const;
-    bool is_Gabriel(Vertex_handle v) const;
-
-
-    // Dual functions
-    Bare_point dual(Cell_handle c) const;
-
-    Object dual(const Facet & f) const
-    { return dual( f.first, f.second ); }
-
-    Object dual(Cell_handle c, int i) const;
-
-    template < class Stream>
-    Stream& draw_dual(Stream & os)
-    {
-      for (Finite_facets_iterator fit = finite_facets_begin(),
-        end = finite_facets_end();
-        fit != end; ++fit) {
-          Object o = dual(*fit);
-          if      (const Segment    *s = object_cast<Segment>(&o))    os << *s;
-          else if (const Ray        *r = object_cast<Ray>(&o))        os << *r;
-          else if (const Bare_point *p = object_cast<Bare_point>(&o)) os << *p;
-      }
-      return os;
-    }
-
-    bool is_valid(bool verbose = false, int level = 0) const;
-
-  protected:
-    bool
-      less_power_distance(const Bare_point &p,
-      const Weighted_point &q,
-      const Weighted_point &r)  const
-    {
-      return
-        geom_traits().compare_power_distance_3_object()(p, q, r) == SMALLER;
-    }
-
-    Bare_point
-      construct_weighted_circumcenter(const Weighted_point &p,
-      const Weighted_point &q,
-      const Weighted_point &r,
-      const Weighted_point &s) const
-    {
-      return geom_traits().construct_weighted_circumcenter_3_object()(p,q,r,s);
-    }
-
-    Bare_point
-      construct_weighted_circumcenter(const Weighted_point &p,
-      const Weighted_point &q,
-      const Weighted_point &r) const
-    {
-      return geom_traits().construct_weighted_circumcenter_3_object()(p,q,r);
-    }
-
-    Line
-      construct_perpendicular_line(const Plane &pl, const Bare_point &p) const
-    {
-      return geom_traits().construct_perpendicular_line_3_object()(pl, p);
-    }
-
-    Plane
-      construct_plane(const Bare_point &p, const Bare_point &q, const Bare_point &r) const
-    {
-      return geom_traits().construct_plane_3_object()(p, q, r);
-    }
-
-    Ray
-      construct_ray(const Bare_point &p, const Line &l) const
-    {
-      return geom_traits().construct_ray_3_object()(p, l);
-    }
-
-    Object
-      construct_object(const Bare_point &p) const
-    {
-      return geom_traits().construct_object_3_object()(p);
-    }
-
-    Object
-      construct_object(const Segment &s) const
-    {
-      return geom_traits().construct_object_3_object()(s);
-    }
-
-    Object
-      construct_object(const Ray &r) const
-    {
-      return geom_traits().construct_object_3_object()(r);
-    }
-
-    Vertex_handle
-      nearest_power_vertex(const Bare_point &p,
-      Vertex_handle v,
-      Vertex_handle w) const
-    {
-      // In case of equality, v is returned.
-      CGAL_triangulation_precondition(v != w);
-      if (is_infinite(v))	  return w;
-      if (is_infinite(w))	  return v;
-      return less_power_distance(p, w->point(), v->point()) ? w : v;
-    }
-
-    Oriented_side
-      power_test(const Weighted_point &p, const Weighted_point &q) const
-    {
-      CGAL_triangulation_precondition(this->equal(p, q));
-      return geom_traits().power_test_3_object()(p, q);
-    }
-
-    Oriented_side
-      power_test(const Weighted_point &p, const Weighted_point &q,
-      const Weighted_point &r) const
-    {
-      CGAL_triangulation_precondition(this->collinear(p, q, r));
-      return geom_traits().power_test_3_object()(p, q, r);
-    }
-
-    Oriented_side
-      power_test(const Weighted_point &p, const Weighted_point &q,
-      const Weighted_point &r, const Weighted_point &s) const
-    {
-      CGAL_triangulation_precondition(this->coplanar(p, q, r, s));
-      return geom_traits().power_test_3_object()(p, q, r, s);
-    }
-
-    Oriented_side
-      power_test(const Weighted_point &p, const Weighted_point &q,
-      const Weighted_point &r, const Weighted_point &s,
-      const Weighted_point &t) const
-    {
-      return geom_traits().power_test_3_object()(p, q, r, s, t);
-    }
-
-    bool in_conflict_3(const Weighted_point &p, const Cell_handle c) const
-    {
-      return side_of_power_sphere(c, p, true) == ON_BOUNDED_SIDE;
-    }
-
-    bool in_conflict_2(const Weighted_point &p, const Cell_handle c, int i) const
-    {
-      return side_of_power_circle(c, i, p, true) == ON_BOUNDED_SIDE;
-    }
-
-    bool in_conflict_1(const Weighted_point &p, const Cell_handle c) const
-    {
-      return side_of_power_segment(c, p, true) == ON_BOUNDED_SIDE;
-    }
-
-    bool in_conflict_0(const Weighted_point &p, const Cell_handle c) const
-    {
-      return power_test(c->vertex(0)->point(), p) == ON_POSITIVE_SIDE;
-    }
-
-    bool in_conflict(const Weighted_point &p, const Cell_handle c) const
-    {
-      switch (dimension()) {
-      case 0: return in_conflict_0(p, c);
-      case 1: return in_conflict_1(p, c);
-      case 2: return in_conflict_2(p, c, 3);
-      case 3: return in_conflict_3(p, c);
-      }
-      return true;
-    }
-
-    class Conflict_tester_3
-    {
-      const Weighted_point &p;
-      const Self *t;
-
-    public:
-
-      Conflict_tester_3(const Weighted_point &pt, const Self *tr)
-        : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const {
-        return t->in_conflict_3(p, c);
-      }
-
-      bool test_initial_cell(const Cell_handle c) const {
-        return operator()(c);
-      }
-      Oriented_side compare_weight(const Weighted_point &wp1,
-        const Weighted_point &wp2) const
-      {
-        return t->power_test (wp1, wp2);
-      }
-    };
-
-    class Conflict_tester_2
-    {
-      const Weighted_point &p;
-      const Self *t;
-    public:
-
-      Conflict_tester_2(const Weighted_point &pt, const Self *tr)
-        : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const
-      {
-        return t->in_conflict_2(p, c, 3);
-      }
-      bool test_initial_cell(const Cell_handle c) const {
-        return operator()(c);
-      }
-      Oriented_side compare_weight(const Weighted_point &wp1,
-        const Weighted_point &wp2) const
-      {
-        return t->power_test (wp1, wp2);
-      }
-    };
-
-    class Conflict_tester_1
-    {
-      const Weighted_point &p;
-      const Self *t;
-
-    public:
-
-      Conflict_tester_1(const Weighted_point &pt, const Self *tr)
-        : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const
-      {
-        return t->in_conflict_1(p, c);
-      }
-      bool test_initial_cell(const Cell_handle c) const {
-        return operator()(c);
-      }
-      Oriented_side compare_weight(const Weighted_point &wp1,
-        const Weighted_point &wp2) const
-      {
-        return t->power_test (wp1, wp2);
-      }
-    };
-
-    class Conflict_tester_0
-    {
-      const Weighted_point &p;
-      const Self *t;
-
-    public:
-
-      Conflict_tester_0(const Weighted_point &pt, const Self *tr)
-        : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const
-      {
-        return t->in_conflict_0(p, c);
-      }
-      bool test_initial_cell(const Cell_handle c) const {
-        return operator()(c);
-      }
-      int compare_weight(const Weighted_point &wp1,
-        const Weighted_point &wp2) const
-      {
-        return t->power_test (wp1, wp2);
-      }
-    };
-
-    // Sequential version
-    // "dummy" is here to allow the specialization (see below)
-    // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6
-    template<typename Concurrency_tag_, typename dummy = void>
-    class Hidden_point_visitor
-    {
-      Self *t;
-      mutable std::vector<Vertex_handle> vertices;
-      mutable std::vector<Weighted_point> hidden_points;
-
-    public:
-
-      Hidden_point_visitor(Self *tr) : t(tr) {}
-
-      template <class InputIterator>
-      void process_cells_in_conflict(InputIterator start, InputIterator end) const
-      {
-        int dim = t->dimension();
-        while (start != end) {
-          std::copy((*start)->hidden_points_begin(),
-            (*start)->hidden_points_end(),
-            std::back_inserter(hidden_points));
-
-          for (int i=0; i<=dim; i++) {
-            Vertex_handle v = (*start)->vertex(i);
-            if (v->cell() != Cell_handle()) {
-              vertices.push_back(v);
-              v->set_cell(Cell_handle());
-            }
-          }
-          start ++;
-        }
-      }
-      void reinsert_vertices(Vertex_handle v) {
-        Cell_handle hc = v->cell();
-        for (typename std::vector<Vertex_handle>::iterator
-          vi = vertices.begin(); vi != vertices.end(); ++vi) {
-            if ((*vi)->cell() != Cell_handle()) continue;
-            hc = t->locate ((*vi)->point(), hc);
-            hide_point(hc, (*vi)->point());
-            t->tds().delete_vertex(*vi);
-        }
-        vertices.clear();
-        for (typename std::vector<Weighted_point>::iterator
-          hp = hidden_points.begin(); hp != hidden_points.end(); ++hp) {
-            hc = t->locate (*hp, hc);
-            hide_point (hc, *hp);
-        }
-        hidden_points.clear();
-      }
-      Vertex_handle replace_vertex(Cell_handle c, int index,
-        const Weighted_point &p) {
-          Vertex_handle v = c->vertex(index);
-          hide_point(c, v->point());
-          v->set_point(p);
-          return v;
-      }
-      void hide_point(Cell_handle c, const Weighted_point &p) {
-        c->hide_point(p);
-      }
-    };
-
-#ifdef CGAL_LINKED_WITH_TBB
-    // Parallel version specialization
-    template<typename dummy>
-    class Hidden_point_visitor<Parallel_tag, dummy>
-    {
-      typedef Hidden_point_visitor<Parallel_tag> HPV;
-
-      Self *t;
-      mutable tbb::enumerable_thread_specific<std::vector<Vertex_handle> >  vertices;
-      mutable tbb::enumerable_thread_specific<std::vector<Weighted_point> > hidden_points;
-
-    public:
-
-      Hidden_point_visitor(Self *tr) : t(tr) {}
-
-      template <class InputIterator>
-      void process_cells_in_conflict(InputIterator start, InputIterator end) const
-      {
-        int dim = t->dimension();
-        while (start != end) {
-          std::copy((*start)->hidden_points_begin(),
-            (*start)->hidden_points_end(),
-            std::back_inserter(hidden_points.local()));
-
-          for (int i=0; i<=dim; i++) {
-            Vertex_handle v = (*start)->vertex(i);
-            if (v->cell() != Cell_handle()) {
-              vertices.local().push_back(v);
-              v->set_cell(Cell_handle());
-            }
-          }
-          start ++;
-        }
-      }
-      void reinsert_vertices(Vertex_handle v) {
-        Cell_handle hc = v->cell();
-        for (typename std::vector<Vertex_handle>::iterator
-          vi = vertices.local().begin(); vi != vertices.local().end(); ++vi) {
-            if ((*vi)->cell() != Cell_handle()) continue;
-            hc = t->locate ((*vi)->point(), hc);
-            hide_point(hc, (*vi)->point());
-            t->tds().delete_vertex(*vi);
-        }
-        vertices.local().clear();
-        for (typename std::vector<Weighted_point>::iterator
-          hp = hidden_points.local().begin(); hp != hidden_points.local().end(); ++hp) {
-            hc = t->locate (*hp, hc);
-            hide_point (hc, *hp);
-        }
-        hidden_points.local().clear();
-      }
-      Vertex_handle replace_vertex(Cell_handle c, int index,
-        const Weighted_point &p) {
-          Vertex_handle v = c->vertex(index);
-          hide_point(c, v->point());
-          v->set_point(p);
-          return v;
-      }
-      void hide_point(Cell_handle c, const Weighted_point &p) {
-        c->hide_point(p);
-      }
-    };
-
-  // Functor for parallel insert(begin, end) function
-  template <typename RT>
-  class Insert_point
-  {
-    typedef typename RT::Weighted_point                 Weighted_point;
-    typedef typename RT::Vertex_handle                  Vertex_handle;
-
-    RT                                                  & m_rt;
-    const std::vector<Weighted_point>                   & m_points;
-    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
-
-  public:
-    // Constructor
-    Insert_point(RT & rt,
-                 const std::vector<Weighted_point> & points,
-                 tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
-    : m_rt(rt), m_points(points), m_tls_hint(tls_hint)
-    {}
-
-    // Constructor
-    Insert_point(const Insert_point &ip)
-    : m_rt(ip.m_rt), m_points(ip.m_points), m_tls_hint(ip.m_tls_hint)
-    {}
-
-    // operator()
-    void operator()( const tbb::blocked_range<size_t>& r ) const
-    {
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-      static Profile_branch_counter_3 bcounter(
-        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]");
-#endif
-
-      Vertex_handle &hint = m_tls_hint.local();
-      for( size_t i_point = r.begin() ; i_point != r.end() ; ++i_point)
-      {
-        bool success = false;
-        const Weighted_point &p = m_points[i_point];
-        while(!success)
-        {
-          if (m_rt.try_lock_vertex(hint) && m_rt.try_lock_point(p))
-          {
-            bool could_lock_zone;
-            Locate_type lt;
-            int li, lj;
-
-            Cell_handle c = m_rt.locate (p, lt, li, lj, hint->cell(), 
-                                         &could_lock_zone);
-            Vertex_handle v;
-            if (could_lock_zone)
-              v = m_rt.insert (p, lt, c, li, lj, &could_lock_zone);
-
-            if (could_lock_zone)
-            {
-              hint = (v == Vertex_handle() ? c->vertex(0) : v);
-              m_rt.unlock_all_elements();
-              success = true;
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-              ++bcounter;
-#endif
-            }
-            else
-            {
-              m_rt.unlock_all_elements();
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-              bcounter.increment_branch_1(); // THIS is a late withdrawal!
-#endif
-            }
-          }
-          else
-          {
-            m_rt.unlock_all_elements();
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-            bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-          }
-        }
-      }
-    }
-  };
-
-  // Functor for parallel remove(begin, end) function
-  template <typename RT>
-  class Remove_point
-  {
-    typedef typename RT::Weighted_point                 Weighted_point;
-    typedef typename RT::Vertex_handle                  Vertex_handle;
-
-    RT                                    & m_rt;
-    const std::vector<Vertex_handle>      & m_vertices;
-    tbb::concurrent_vector<Vertex_handle> & m_vertices_to_remove_sequentially;
-
-  public:
-    // Constructor
-    Remove_point(RT & rt,
-                 const std::vector<Vertex_handle> & vertices,
-                 tbb::concurrent_vector<Vertex_handle> & 
-                   vertices_to_remove_sequentially)
-    : m_rt(rt), m_vertices(vertices), 
-      m_vertices_to_remove_sequentially(vertices_to_remove_sequentially)
-    {}
-
-    // Constructor
-    Remove_point(const Remove_point &rp)
-    : m_rt(rp.m_rt), m_vertices(rp.m_vertices),
-      m_vertices_to_remove_sequentially(rp.m_vertices_to_remove_sequentially)
-    {}
-
-    // operator()
-    void operator()( const tbb::blocked_range<size_t>& r ) const
-    {
-      for( size_t i_vertex = r.begin() ; i_vertex != r.end() ; ++i_vertex)
-      {
-        Vertex_handle v = m_vertices[i_vertex];
-        bool could_lock_zone, needs_to_be_done_sequentially;
-        do
-        {
-          needs_to_be_done_sequentially =
-            !m_rt.remove(v, &could_lock_zone);
-          m_rt.unlock_all_elements();
-        } while (!could_lock_zone);
-
-        if (needs_to_be_done_sequentially)
-          m_vertices_to_remove_sequentially.push_back(v);
-      }
-    }
-  };
-#endif // CGAL_LINKED_WITH_TBB
-
-    Hidden_point_visitor<Concurrency_tag> &get_hidden_point_visitor()
-    {
-      return hidden_point_visitor;
-    }
-
-    template < class RegularTriangulation_3 >
-    class Vertex_remover;
-
-    template < class RegularTriangulation_3 >
-    class Vertex_inserter;
-
-    Hidden_point_visitor<Concurrency_tag> hidden_point_visitor;
-  };
-
-
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    nearest_power_vertex_in_cell(const Bare_point& p,
-    Cell_handle c) const
-    // Returns the finite vertex of the cell c with smaller
-    // power distance  to p.
-  {
-    CGAL_triangulation_precondition(dimension() >= 1);
-    Vertex_handle nearest = nearest_power_vertex(p,
-      c->vertex(0),
-      c->vertex(1));
-    if (dimension() >= 2) {
-      nearest = nearest_power_vertex(p, nearest, c->vertex(2));
-      if (dimension() == 3)
-        nearest = nearest_power_vertex(p, nearest, c->vertex(3));
-    }
-    return nearest;
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    nearest_power_vertex(const Bare_point& p, Cell_handle start) const
-  {
-    if (number_of_vertices() == 0)
-      return Vertex_handle();
-
-    // Use a brute-force algorithm if dimension < 3.
-    if (dimension() < 3) {
-      Finite_vertices_iterator vit = finite_vertices_begin();
-      Vertex_handle res = vit;
-      ++vit;
-      for (Finite_vertices_iterator end = finite_vertices_end(); vit != end; ++vit)
-        res = nearest_power_vertex(p, res, vit);
-      return res;
-    }
-
-    Locate_type lt;
-    int li, lj;
-    // I put the cast here temporarily
-    // until we solve the traits class pb of regular triangulation
-    Cell_handle c = locate(static_cast<Weighted_point>(p), lt, li, lj, start);
-
-    // - start with the closest vertex from the located cell.
-    // - repeatedly take the nearest of its incident vertices if any
-    // - if not, we're done.
-    Vertex_handle nearest = nearest_power_vertex_in_cell(p, c);
-    std::vector<Vertex_handle> vs;
-    vs.reserve(32);
-    while (true) {
-      Vertex_handle tmp = nearest;
-      adjacent_vertices(nearest, std::back_inserter(vs));
-      for (typename std::vector<Vertex_handle>::const_iterator
-        vsit = vs.begin(); vsit != vs.end(); ++vsit)
-        tmp = nearest_power_vertex(p, tmp, *vsit);
-      if (tmp == nearest)
-        break;
-      vs.clear();
-      nearest = tmp;
-    }
-    return nearest;
-  }
-
-template < class Gt, class Tds, class Lds >
-typename Regular_triangulation_3<Gt,Tds,Lds>::Bare_point
-Regular_triangulation_3<Gt,Tds,Lds>::
-dual(Cell_handle c) const
-{
-  CGAL_triangulation_precondition(dimension()==3);
-  CGAL_triangulation_precondition( ! is_infinite(c) );
-
-  return c->weighted_circumcenter(geom_traits());
-}
-
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Object
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    dual(Cell_handle c, int i) const
-  {
-    CGAL_triangulation_precondition(dimension()>=2);
-    CGAL_triangulation_precondition( ! is_infinite(c,i) );
-
-    if ( dimension() == 2 ) {
-      CGAL_triangulation_precondition( i == 3 );
-      return construct_object(
-        construct_weighted_circumcenter(c->vertex(0)->point(),
-        c->vertex(1)->point(),
-        c->vertex(2)->point()) );
-    }
-
-    // dimension() == 3
-    Cell_handle n = c->neighbor(i);
-    if ( ! is_infinite(c) && ! is_infinite(n) )
-      return construct_object(construct_segment( dual(c), dual(n) ));
-
-    // either n or c is infinite
-    int in;
-    if ( is_infinite(c) )
-      in = n->index(c);
-    else {
-      n = c;
-      in = i;
-    }
-    // n now denotes a finite cell, either c or c->neighbor(i)
-    int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
-    if ( (in&1) == 1 )
-      std::swap(ind[0], ind[1]);
-    const Weighted_point& p = n->vertex(ind[0])->point();
-    const Weighted_point& q = n->vertex(ind[1])->point();
-    const Weighted_point& r = n->vertex(ind[2])->point();
-
-    Line l =
-      construct_perpendicular_line( construct_plane(p,q,r),
-      construct_weighted_circumcenter(p,q,r) );
-    return construct_object(construct_ray( dual(n), l));
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  Oriented_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_oriented_power_sphere(const Weighted_point &p0,
-    const Weighted_point &p1,
-    const Weighted_point &p2,
-    const Weighted_point &p3,
-    const Weighted_point &p, bool perturb) const
-  {
-    CGAL_triangulation_precondition( orientation(p0, p1, p2, p3) == POSITIVE );
-
-    using namespace boost;
-
-    Oriented_side os = power_test(p0, p1, p2, p3, p);
-
-    if (os != ON_ORIENTED_BOUNDARY || !perturb)
-      return os;
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    // We sort the points lexicographically.
-    const Weighted_point * points[5] = {&p0, &p1, &p2, &p3, &p};
-    std::sort(points, points + 5,
-      boost::bind(geom_traits().compare_xyz_3_object(),
-      boost::bind(Dereference<Weighted_point>(), _1),
-      boost::bind(Dereference<Weighted_point>(), _2)) == SMALLER);
-
-    // We successively look whether the leading monomial, then 2nd monomial
-    // of the determinant has non null coefficient.
-    for (int i=4; i>1; --i) {
-      if (points[i] == &p)
-        return ON_NEGATIVE_SIDE; // since p0 p1 p2 p3 are non coplanar
-      // and positively oriented
-      Orientation o;
-      if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
-        return o;
-      if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
-        return o;
-      if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
-        return o;
-      if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
-        return o;
-    }
-
-    CGAL_triangulation_assertion(false);
-    return ON_NEGATIVE_SIDE;
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  Bounded_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_power_sphere(Cell_handle c, const Weighted_point &p,
-    bool perturb) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    int i3;
-    if ( ! c->has_vertex( infinite_vertex(), i3 ) ) {
-      return Bounded_side( side_of_oriented_power_sphere(c->vertex(0)->point(),
-        c->vertex(1)->point(),
-        c->vertex(2)->point(),
-        c->vertex(3)->point(),
-        p, perturb) );
-    }
-    // else infinite cell :
-    int i0,i1,i2;
-    if ( (i3%2) == 1 ) {
-      i0 = (i3+1)&3;
-      i1 = (i3+2)&3;
-      i2 = (i3+3)&3;
-    }
-    else {
-      i0 = (i3+2)&3;
-      i1 = (i3+1)&3;
-      i2 = (i3+3)&3;
-    }
-
-    // general case
-    Orientation o = orientation(c->vertex(i0)->point(),
-      c->vertex(i1)->point(),
-      c->vertex(i2)->point(), p);
-    if (o != ZERO)
-      return Bounded_side(o);
-
-    // else p coplanar with i0,i1,i2
-    return side_of_bounded_power_circle(c->vertex(i0)->point(),
-      c->vertex(i1)->point(),
-      c->vertex(i2)->point(),
-      p, perturb);
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  Bounded_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_bounded_power_circle(const Weighted_point &p0,
-    const Weighted_point &p1,
-    const Weighted_point &p2,
-    const Weighted_point &p, bool perturb) const
-  {
-    CGAL_triangulation_precondition(coplanar_orientation(p0, p1, p2) != 0);
-    if (coplanar_orientation(p0, p1, p2) == POSITIVE)
-      return Bounded_side (side_of_oriented_power_circle(p0, p1, p2, p, perturb));
-    // Wrong because the low level power test already does a coplanar orientation
-    // test.
-    // return Bounded_side (- side_of_oriented_power_circle (p0, p2, p1, p,
-    // perturb));
-    return Bounded_side (side_of_oriented_power_circle(p0, p2, p1, p, perturb));
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  Oriented_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_oriented_power_circle(const Weighted_point &p0,
-    const Weighted_point &p1,
-    const Weighted_point &p2,
-    const Weighted_point &p, bool perturb) const
-  {
-    CGAL_triangulation_precondition( coplanar_orientation(p0, p1, p2) == POSITIVE );
-
-    using namespace boost;
-
-    Oriented_side os = power_test(p0, p1, p2, p);
-
-    if (os != ON_ORIENTED_BOUNDARY || !perturb)
-      return os;
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    // We sort the points lexicographically.
-    const Weighted_point * points[4] = {&p0, &p1, &p2, &p};
-    std::sort(points, points + 4,
-      boost::bind(geom_traits().compare_xyz_3_object(),
-      boost::bind(Dereference<Weighted_point>(), _1),
-      boost::bind(Dereference<Weighted_point>(), _2)) == SMALLER);
-
-    // We successively look whether the leading monomial, then 2nd monomial
-    // of the determinant has non null coefficient.
-    // 2 iterations are enough (cf paper)
-    for (int i=3; i>1; --i) {
-      if (points[i] == &p)
-        return ON_NEGATIVE_SIDE; // since p0 p1 p2 are non collinear
-      // and positively oriented
-      Orientation o;
-      if (points[i] == &p2 && (o = coplanar_orientation(p0,p1,p)) != COPLANAR )
-        return o;
-      if (points[i] == &p1 && (o = coplanar_orientation(p0,p,p2)) != COPLANAR )
-        return o;
-      if (points[i] == &p0 && (o = coplanar_orientation(p,p1,p2)) != COPLANAR )
-        return o;
-    }
-
-    CGAL_triangulation_assertion(false);
-    return ON_NEGATIVE_SIDE;
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  Bounded_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_power_circle(Cell_handle c, int i, const Weighted_point &p,
-    bool perturb) const
-  {
-    CGAL_triangulation_precondition( dimension() >= 2 );
-    int i3 = 5;
-    if ( dimension() == 2 ) {
-      CGAL_triangulation_precondition( i == 3 );
-      // the triangulation is supposed to be valid, ie the facet
-      // with vertices 0 1 2 in this order is positively oriented
-      if ( ! c->has_vertex( infinite_vertex(), i3 ) )
-        return Bounded_side( side_of_oriented_power_circle(c->vertex(0)->point(),
-        c->vertex(1)->point(),
-        c->vertex(2)->point(),
-        p, perturb) );
-      // else infinite facet
-      // v1, v2 finite vertices of the facet such that v1,v2,infinite
-      // is positively oriented
-      Vertex_handle v1 = c->vertex( ccw(i3) ),
-        v2 = c->vertex( cw(i3) );
-      CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
-        mirror_vertex(c, i3)->point()) == NEGATIVE);
-      Orientation o = coplanar_orientation(v1->point(), v2->point(), p);
-      if ( o != ZERO )
-        return Bounded_side( o );
-      // case when p collinear with v1v2
-      return side_of_bounded_power_segment(v1->point(),
-        v2->point(),
-        p, perturb);
-    }// dim 2
-
-    // else dimension == 3
-    CGAL_triangulation_precondition( (i >= 0) && (i < 4) );
-    if ( ( ! c->has_vertex(infinite_vertex(),i3) ) || ( i3 != i ) ) {
-      // finite facet
-      // initialization of i0 i1 i2, vertices of the facet positively
-      // oriented (if the triangulation is valid)
-      int i0 = (i>0) ? 0 : 1;
-      int i1 = (i>1) ? 1 : 2;
-      int i2 = (i>2) ? 2 : 3;
-      CGAL_triangulation_precondition(this->coplanar(c->vertex(i0)->point(),
-        c->vertex(i1)->point(),
-        c->vertex(i2)->point(), p));
-      return side_of_bounded_power_circle(c->vertex(i0)->point(),
-        c->vertex(i1)->point(),
-        c->vertex(i2)->point(),
-        p, perturb);
-    }
-    //else infinite facet
-    // v1, v2 finite vertices of the facet such that v1,v2,infinite
-    // is positively oriented
-    Vertex_handle v1 = c->vertex( next_around_edge(i3,i) ),
-      v2 = c->vertex( next_around_edge(i,i3) );
-    Orientation o = (Orientation)
-      (coplanar_orientation( v1->point(), v2->point(),
-      c->vertex(i)->point()) *
-      coplanar_orientation( v1->point(), v2->point(), p));
-    // then the code is duplicated from 2d case
-    if ( o != ZERO )
-      return Bounded_side( -o );
-    // because p is in f iff
-    // it is not on the same side of v1v2 as c->vertex(i)
-    // case when p collinear with v1v2 :
-    return side_of_bounded_power_segment(v1->point(),
-      v2->point(),
-      p, perturb);
-  }
-
-  template < class Gt, class Tds, class Lds >
-  Bounded_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_bounded_power_segment(const Weighted_point &p0,
-    const Weighted_point &p1,
-    const Weighted_point &p, bool perturb) const
-  {
-    Oriented_side os = power_test(p0, p1, p);
-
-    if (os != ON_ORIENTED_BOUNDARY || !perturb)
-      return Bounded_side(os);
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    switch (this->collinear_position(p0, p, p1)) {
-    case Tr_Base::BEFORE: case Tr_Base::AFTER:
-      return ON_UNBOUNDED_SIDE;
-    case Tr_Base::MIDDLE:
-      return ON_BOUNDED_SIDE;
-    default:
-      ;
-    }
-
-    CGAL_triangulation_assertion(false);
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  template < class Gt, class Tds, class Lds >
-  Bounded_side
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    side_of_power_segment(Cell_handle c, const Weighted_point &p,
-    bool perturb) const
-  {
-    CGAL_triangulation_precondition( dimension() == 1 );
-    if ( ! is_infinite(c,0,1) )
-      return side_of_bounded_power_segment(c->vertex(0)->point(),
-      c->vertex(1)->point(),
-      p, perturb);
-    Locate_type lt; int i;
-    Bounded_side soe = side_of_edge( p, c, lt, i );
-    if (soe != ON_BOUNDARY)
-      return soe;
-    // Either we compare weights, or we use the finite neighboring edge
-    Cell_handle finite_neighbor = c->neighbor(c->index(infinite_vertex()));
-    CGAL_triangulation_assertion(!is_infinite(finite_neighbor,0,1));
-    return side_of_bounded_power_segment(finite_neighbor->vertex(0)->point(),
-      finite_neighbor->vertex(1)->point(),
-      p, perturb);
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_Gabriel(const Facet& f) const
-  {
-    return is_Gabriel(f.first, f.second);
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_Gabriel(Cell_handle c, int i) const
-  {
-    CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i));
-    typename Geom_traits::Side_of_bounded_orthogonal_sphere_3
-      side_of_bounded_orthogonal_sphere =
-      geom_traits().side_of_bounded_orthogonal_sphere_3_object();
-
-    if ((!is_infinite(c->vertex(i))) &&
-      side_of_bounded_orthogonal_sphere(
-      c->vertex(vertex_triple_index(i,0))->point(),
-      c->vertex(vertex_triple_index(i,1))->point(),
-      c->vertex(vertex_triple_index(i,2))->point(),
-      c->vertex(i)->point()) == ON_BOUNDED_SIDE ) return false;
-
-    Cell_handle neighbor = c->neighbor(i);
-    int in = neighbor->index(c);
-
-    if ((!is_infinite(neighbor->vertex(in))) &&
-      side_of_bounded_orthogonal_sphere(
-      c->vertex(vertex_triple_index(i,0))->point(),
-      c->vertex(vertex_triple_index(i,1))->point(),
-      c->vertex(vertex_triple_index(i,2))->point(),
-      neighbor->vertex(in)->point()) == ON_BOUNDED_SIDE ) return false;
-
-    return true;
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_Gabriel(const Edge& e) const
-  {
-    return is_Gabriel(e.first, e.second, e.third);
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_Gabriel(Cell_handle c, int i, int j) const
-  {
-    CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j));
-    typename Geom_traits::Side_of_bounded_orthogonal_sphere_3
-      side_of_bounded_orthogonal_sphere =
-      geom_traits().side_of_bounded_orthogonal_sphere_3_object();
-
-    Facet_circulator fcirc = incident_facets(c,i,j),
-      fdone(fcirc);
-    Vertex_handle v1 = c->vertex(i);
-    Vertex_handle v2 = c->vertex(j);
-    do {
-      // test whether the vertex of cc opposite to *fcirc
-      // is inside the sphere defined by the edge e = (s, i,j)
-      Cell_handle cc = (*fcirc).first;
-      int ii = (*fcirc).second;
-      if (!is_infinite(cc->vertex(ii)) &&
-        side_of_bounded_orthogonal_sphere( v1->point(),
-        v2->point(),
-        cc->vertex(ii)->point())
-        == ON_BOUNDED_SIDE ) return false;
-    } while(++fcirc != fdone);
-    return true;
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_Gabriel(Vertex_handle v) const
-  {
-    return nearest_power_vertex( v->point().point(), v->cell()) == v;
-  }
-
-  // Returns
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    insert(const Weighted_point & p, Cell_handle start, bool *could_lock_zone)
-  {
-    Locate_type lt;
-    int li, lj;
-
-    // Parallel
-    if (could_lock_zone)
-    {
-      Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone);
-      if (*could_lock_zone)
-        return insert(p, lt, c, li, lj, could_lock_zone);
-      else
-        return Vertex_handle();
-    }
-    // Sequential
-    else
-    {
-      Cell_handle c = locate(p, lt, li, lj, start);
-      return insert(p, lt, c, li, lj);
-    }
-  }
-
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    insert(const Weighted_point & p, Locate_type lt, Cell_handle c,
-           int li, int lj, bool *could_lock_zone)
-  {
-    switch (dimension()) {
-    case 3:
-      {
-        Conflict_tester_3 tester (p, this);
-        return insert_in_conflict(p, lt,c,li,lj, tester,
-                                  get_hidden_point_visitor(),
-                                  could_lock_zone);
-      }
-    case 2:
-      {
-        Conflict_tester_2 tester (p, this);
-        return insert_in_conflict(p, lt,c,li,lj, tester,
-                                  get_hidden_point_visitor(),
-                                  could_lock_zone);
-      }
-    case 1:
-      {
-        Conflict_tester_1 tester (p, this);
-        return insert_in_conflict(p, lt,c,li,lj, tester,
-                                  get_hidden_point_visitor(),
-                                  could_lock_zone);
-      }
-    }
-
-    Conflict_tester_0 tester (p, this);
-    return insert_in_conflict(p, lt,c,li,lj, tester,
-                              get_hidden_point_visitor(),
-                              could_lock_zone);
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  template <class CellIt>
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
-    Cell_handle begin, int i)
-  {
-    CGAL_triangulation_precondition(cell_begin != cell_end);
-
-    get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end);
-
-    Vertex_handle v =
-      Tr_Base::insert_in_hole(p, cell_begin, cell_end, begin, i);
-
-    // Store the hidden points in their new cells and hide vertices that
-    // have to be hidden
-    get_hidden_point_visitor().reinsert_vertices(v);
-    return v;
-  }
-
-
-  template < class Gt, class Tds, class Lds >
-  template <class CellIt>
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
-    Cell_handle begin, int i, Vertex_handle newv)
-  {
-    CGAL_triangulation_precondition(cell_begin != cell_end);
-
-    get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end);
-
-    Vertex_handle v =
-      Tr_Base::insert_in_hole(p, cell_begin, cell_end, begin, i, newv);
-
-    // Store the hidden points in their new cells and hide vertices that
-    // have to be hidden
-    get_hidden_point_visitor().reinsert_vertices(v);
-    return v;
-  }
-
-  template <class Gt, class Tds, class Lds >
-  template <class RegularTriangulation_3>
-  class Regular_triangulation_3<Gt, Tds, Lds>::Vertex_remover {
-    typedef RegularTriangulation_3 Regular;
-    typedef typename Gt::Point_3 Point;
-  public:
-    typedef typename std::vector<Point>::iterator
-      Hidden_points_iterator;
-
-    Vertex_remover(Regular &tmp_) : tmp(tmp_) {}
-
-    Regular &tmp;
-
-    void add_hidden_points(Cell_handle ch) {
-      std::copy (ch->hidden_points_begin(), ch->hidden_points_end(),
-        std::back_inserter(hidden));
-    }
-
-    Hidden_points_iterator hidden_points_begin() {
-      return hidden.begin();
-    }
-    Hidden_points_iterator hidden_points_end() {
-      return hidden.end();
-    }
-
-    Bounded_side side_of_bounded_circle(const Point &p, const Point &q,
-      const Point &r, const Point &s, bool perturb = false) const {
-        return tmp.side_of_bounded_power_circle(p,q,r,s,perturb);
-    }
-
-  private:
-    // The removal of v may un-hide some points,
-    // Space functions output them.
-    std::vector<Point> hidden;
-  };
-
-  // The displacement method works only
-  // on regular triangulation without hidden points at any time
-  // the vertex inserter is used only
-  // for the purpose of displacements
-  template <class Gt, class Tds, class Lds >
-  template <class RegularTriangulation_3>
-  class Regular_triangulation_3<Gt, Tds, Lds>::Vertex_inserter {
-    typedef RegularTriangulation_3 Regular;
-  public:
-    typedef Nullptr_t Hidden_points_iterator;
-
-    Vertex_inserter(Regular &tmp_) : tmp(tmp_) {}
-
-    Regular &tmp;
-
-    void add_hidden_points(Cell_handle) {}
-    Hidden_points_iterator hidden_points_begin() { return NULL; }
-    Hidden_points_iterator hidden_points_end() { return NULL; }
-
-    Vertex_handle insert(const Weighted_point& p,
-      Locate_type lt, Cell_handle c, int li, int lj) {
-        return tmp.insert(p, lt, c, li, lj);
-    }
-
-    Vertex_handle insert(const Weighted_point& p, Cell_handle c) {
-      return tmp.insert(p, c);
-    }
-
-    Vertex_handle insert(const Weighted_point& p) {
-      return tmp.insert(p);
-    }
-  };
-
-  template < class Gt, class Tds, class Lds >
-  void
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    remove(Vertex_handle v)
-  {
-    Cell_handle c;
-    if (dimension() > 0)
-      c = v->cell()->neighbor(v->cell()->index(v));
-
-    Self tmp;
-    Vertex_remover<Self> remover(tmp);
-    Tr_Base::remove(v,remover);
-
-    // Re-insert the points that v was hiding.
-    for (typename Vertex_remover<Self>::Hidden_points_iterator
-      hi = remover.hidden_points_begin();
-      hi != remover.hidden_points_end(); ++hi) {
-        Vertex_handle hv = insert (*hi, c);
-        if (hv != Vertex_handle()) c = hv->cell();
-    }
-    CGAL_triangulation_expensive_postcondition (is_valid());
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    remove(Vertex_handle v, bool *could_lock_zone)
-  {
-    bool removed = true;
-
-    // Locking vertex v...
-    if (!this->try_lock_vertex(v))
-    {
-      *could_lock_zone = false;
-    }
-    else
-    {
-      Vertex_handle hint = (v->cell()->vertex(0) == v ?
-        v->cell()->vertex(1) : v->cell()->vertex(0));
-
-      Self tmp;
-      Vertex_remover<Self> remover(tmp);
-      removed = Tr_Base::remove(v, remover, could_lock_zone);
-
-      if (*could_lock_zone && removed)
-      {
-        // Re-insert the points that v was hiding.
-        for (typename Vertex_remover<Self>::Hidden_points_iterator
-          hi = remover.hidden_points_begin();
-          hi != remover.hidden_points_end(); ++hi)
-        {
-          bool could_lock_zone = false;
-          Vertex_handle hv;
-          while (!could_lock_zone)
-          {
-            hv = insert (*hi, hint, &could_lock_zone);
-          }
-          if (hv != Vertex_handle())
-            hint = hv;
-        }
-        CGAL_triangulation_expensive_postcondition (is_valid());
-      }
-    }
-
-    return removed;
-  }
-
-  // Again, verbatim copy from Delaunay.
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    move_point(Vertex_handle v, const Weighted_point & p)
-  {
-    CGAL_triangulation_precondition(! is_infinite(v));
-    CGAL_triangulation_expensive_precondition(is_vertex(v));
-
-    // Dummy implementation for a start.
-
-    // Remember an incident vertex to restart
-    // the point location after the removal.
-    Cell_handle c = v->cell();
-    Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0);
-    CGAL_triangulation_assertion(old_neighbor != v);
-
-    remove(v);
-
-    if (dimension() <= 0)
-      return insert(p);
-    return insert(p, old_neighbor->cell());
-  }
-
-  // Displacement works only for Regular triangulation
-  // without hidden points at any time
-  template < class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    move_if_no_collision(Vertex_handle v, const Weighted_point &p)
-  {
-    Self tmp;
-    Vertex_remover<Self> remover (tmp);
-    Vertex_inserter<Self> inserter (*this);
-    Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter);
-
-    CGAL_triangulation_expensive_postcondition(is_valid());
-    return res;
-  }
-
-  template <class Gt, class Tds, class Lds >
-  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    move(Vertex_handle v, const Weighted_point &p) {
-      CGAL_triangulation_precondition(!is_infinite(v));
-      if(v->point() == p) return v;
-      Self tmp;
-      Vertex_remover<Self> remover (tmp);
-      Vertex_inserter<Self> inserter (*this);
-      return Tr_Base::move(v,p,remover,inserter);
-  }
-
-  template < class Gt, class Tds, class Lds >
-  bool
-    Regular_triangulation_3<Gt,Tds,Lds>::
-    is_valid(bool verbose, int level) const
-  {
-    if ( ! Tr_Base::is_valid(verbose,level) ) {
-      if (verbose)
-        std::cerr << "invalid base triangulation" << std::endl;
-      CGAL_triangulation_assertion(false);
-      return false;
-    }
-
-    switch ( dimension() ) {
-    case 3:
-      {
-        for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end(); it != end; ++it) {
-          is_valid_finite(it, verbose, level);
-          for(int i=0; i<4; i++) {
-            if ( !is_infinite
-              (it->neighbor(i)->vertex(it->neighbor(i)->index(it))) ) {
-                if ( side_of_power_sphere
-                  (it,
-                  it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point())
-                  == ON_BOUNDED_SIDE ) {
-                    if (verbose)
-                      std::cerr << "non-empty sphere " << std::endl;
-                    CGAL_triangulation_assertion(false);
-                    return false;
-                }
-            }
-          }
-        }
-        break;
-      }
-    case 2:
-      {
-        for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end(); it!= end; ++it) {
-          is_valid_finite((*it).first, verbose, level);
-          for(int i=0; i<3; i++) {
-            if( !is_infinite
-              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
-              ->index((*it).first))) ) {
-                if ( side_of_power_circle
-                  ( (*it).first, 3,
-                  (*it).first->neighbor(i)->
-                  vertex( (((*it).first)->neighbor(i))
-                  ->index((*it).first) )->point() )
-                  == ON_BOUNDED_SIDE ) {
-                    if (verbose)
-                      std::cerr << "non-empty circle " << std::endl;
-                    CGAL_triangulation_assertion(false);
-                    return false;
-                }
-            }
-          }
-        }
-        break;
-      }
-    case 1:
-      {
-        for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end(); it != end; ++it) {
-          is_valid_finite((*it).first, verbose, level);
-          for(int i=0; i<2; i++) {
-            if( !is_infinite
-              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
-              ->index((*it).first))) ) {
-                if ( side_of_power_segment
-                  ( (*it).first,
-                  (*it).first->neighbor(i)->
-                  vertex( (((*it).first)->neighbor(i))
-                  ->index((*it).first) )->point() )
-                  == ON_BOUNDED_SIDE ) {
-                    if (verbose)
-                      std::cerr << "non-empty edge " << std::endl;
-                    CGAL_triangulation_assertion(false);
-                    return false;
-                }
-            }
-          }
-        }
-        break;
-      }
-    }
-    if (verbose)
-      std::cerr << "valid Regular triangulation" << std::endl;
-    return true;
-  }
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_REGULAR_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_filtered_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_filtered_traits_3.h
deleted file mode 100644
index 6ad6c14..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_filtered_traits_3.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2004   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H
-#define CGAL_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-
-#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
-
-
-namespace CGAL{
- 
-
-// The argument is supposed to be a Filtered_kernel like kernel.
-template < typename K>
-class Regular_triangulation_filtered_traits_3
-  : public Regular_triangulation_euclidean_traits_3<K>
-{};
-
-	
-
-} //namespace CGAL::internal
-
-#endif //CGAL_NO_DEPRECATED_CODE
-
-#endif // CGAL_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ridges.h b/3rdparty/CGAL-4.6/include/CGAL/Ridges.h
deleted file mode 100644
index 6ce8b91..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Ridges.h
+++ /dev/null
@@ -1,899 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Pouget and Frédéric Cazals
-#ifndef CGAL_RIDGE_3_H_
-#define CGAL_RIDGE_3_H_
-
-#include <utility>
-#include <list>
-#include <map>
-
-#include <CGAL/basic.h>
-#include <CGAL/Min_sphere_d.h>
-#include <CGAL/Optimisation_d_traits_3.h>
-#include <CGAL/barycenter.h>
-#include <CGAL/property_map.h>
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-
-namespace CGAL {
- 
-enum Ridge_interrogation_type {MAX_RIDGE, MIN_RIDGE, CREST_RIDGE};
-
-enum Ridge_type {NO_RIDGE=0, 
-		 MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE, 
-		 MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE};
- 
-//are ridges tagged as elliptic or hyperbolic using 3rd or 4th order
-//differential quantitities?
-//with Ridge_order_3 P1 and P2 are not used and the sharpness is not defined.
-enum Ridge_order {Ridge_order_3 = 3, Ridge_order_4 = 4};
-  
-//---------------------------------------------------------------------------
-//Ridge_line : a connected sequence of edges of a
-//TriangularPolyhedralSurface crossed by a
-//ridge (with a barycentric coordinate to compute the crossing point),
-//with a Ridge_type and weights : strength and sharpness. Note
-//sharpness is only available (more precisely only meaningful)
-//if the Ridge_approximation has
-//been computed with the Ridge_order Ridge_order_4.
-//(else, if it is computed with Ridge_order_3 it keeps its initial
-//value 0)
-//--------------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh > class Ridge_line
-{
-public:
-  typedef typename TriangulatedSurfaceMesh::Traits::FT         FT;
-  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3   Vector_3;
-  typedef typename TriangulatedSurfaceMesh::Traits::Point_3    Point_3;
-  typedef typename TriangulatedSurfaceMesh::Halfedge_const_handle Halfedge_const_handle;
-  typedef std::pair< Halfedge_const_handle, FT> ridge_halfhedge; 
-
-  Ridge_type line_type() const {return m_line_type;}
-  Ridge_type& line_type() {return m_line_type;}
-
-  const FT strength() const {return m_strength;}
-  FT& strength() {return m_strength;}
-
-  const FT sharpness() const {return m_sharpness;}
-  FT& sharpness() {return m_sharpness;}
-
-  const std::list<ridge_halfhedge>* line() const { return &m_line;}
-  std::list<ridge_halfhedge>* line() { return &m_line;}
-
-  //constructor
-  Ridge_line();
-  
-  /* The output is : line_type, strength, sharpness, list of points of
-     the polyline. An insert operator << is also available.
-   */
-  void dump_4ogl(std::ostream& out_stream) const ;
-  void dump_verbose(std::ostream& out_stream) const ;
-
-protected:
-  //one of MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE,
-  //MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE or MIN_CREST_RIDGE
-  Ridge_type m_line_type;  
-  std::list<ridge_halfhedge> m_line;
-  FT m_strength;// = integral of ppal curvature along the line
-  FT m_sharpness;// = (integral of second derivative of curvature
-		 // along the line) multiplied by the squared of 
-                 // the size of the model
-		 // (which is the radius of the smallest enclosing
-		 // ball)
-};
-
-//--------------------------------------------------------------------------
-// IMPLEMENTATION OF Ridge_line members
-//--------------------------------------------------------------------------
-
- //constructor
-template < class TriangulatedSurfaceMesh >
-Ridge_line<TriangulatedSurfaceMesh>::
-Ridge_line() : m_strength(0.), m_sharpness(0.)  {}
-   
-
-template < class TriangulatedSurfaceMesh >
-void Ridge_line<TriangulatedSurfaceMesh>::
-dump_4ogl(std::ostream& out_stream) const
-{
-  out_stream << line_type() << " "
-	     << strength() << " "
-	     << sharpness() << " ";
-
-  typename std::list<ridge_halfhedge >::const_iterator
-    iter = line()->begin(), 
-    ite =  line()->end();
-  for (;iter!=ite;iter++){
-    //he: p->q, r is the crossing point
-    Point_3 p = iter->first->opposite()->vertex()->point(),
-            q = iter->first->vertex()->point();
-    Point_3 r = CGAL::barycenter(p, iter->second, q);
-    out_stream << " " << r ;	
-  }
-  out_stream  << std::endl;  
-}
-
-//verbose output
-template < class TriangulatedSurfaceMesh >
-void Ridge_line<TriangulatedSurfaceMesh>::
-dump_verbose(std::ostream& out_stream) const
-{
-  out_stream << "Line type is : " << line_type() << std::endl
-	     << "Strength is :  " << strength() << std::endl
-	     << "Sharpness is : " << sharpness() << std::endl
-	     << "Polyline point coordinates are : " << std::endl;
-
-  typename std::list<ridge_halfhedge>::const_iterator
-    iter = line()->begin(), 
-    ite =  line()->end();
-  for (;iter!=ite;iter++){
-    //he: p->q, r is the crossing point
-    Point_3 p = iter->first->opposite()->vertex()->point(),
-            q = iter->first->vertex()->point();
-    Point_3 r = CGAL::barycenter(p, iter->second, q);
-    out_stream << r << std::endl;	
-  }
-}
-
-template <class TriangulatedSurfaceMesh>
-std::ostream& 
-operator<<(std::ostream& out_stream, const Ridge_line<TriangulatedSurfaceMesh>& ridge_line)
-{
-  ridge_line.dump_verbose(out_stream);
-  return out_stream;
-}
-
-//---------------------------------------------------------------------------
-//Vertex2Data_Property_Map_with_std_map
-// defines models for Vertex2FTPropertyMap and Vertex2VectorPropertyMap
-//--------------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh >
-class Vertex2Data_Property_Map_with_std_map 
-{
- public:
-  typedef typename TriangulatedSurfaceMesh::Traits::FT        FT;
-  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3  Vector_3;
-  typedef typename TriangulatedSurfaceMesh::Vertex_const_handle Vertex_const_handle;
-
-  struct Vertex_cmp{
-    bool operator()(Vertex_const_handle a,  Vertex_const_handle b) const{
-      return &*a < &*b;
-    }
-  };
-
-  typedef std::map<Vertex_const_handle, FT, Vertex_cmp> Vertex2FT_map;
-  typedef boost::associative_property_map< Vertex2FT_map > Vertex2FT_property_map;
-
-  typedef std::map<Vertex_const_handle, Vector_3, Vertex_cmp> Vertex2Vector_map;
-  typedef boost::associative_property_map< Vertex2Vector_map > Vertex2Vector_property_map;
-};
-
-
-//---------------------------------------------------------------------------
-//Ridge_approximation
-//--------------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-class Ridge_approximation
-{
- public:  
-  typedef typename TriangulatedSurfaceMesh::Traits::FT        FT;
-  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3  Vector_3;
-  typedef typename TriangulatedSurfaceMesh::Vertex_const_handle     Vertex_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Halfedge_const_handle   Halfedge_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Facet_const_handle      Facet_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Facet_const_iterator    Facet_const_iterator;
-
-  //requirements for the templates TriangulatedSurfaceMesh and Vertex2FTPropertyMap or Vertex2VectorPropertyMap
-  CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
-  CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
-  CGAL_static_assertion((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
-  CGAL_static_assertion((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
-
-  typedef std::pair< Halfedge_const_handle, FT>    Ridge_halfhedge;
-  typedef CGAL::Ridge_line<TriangulatedSurfaceMesh>  Ridge_line;
-
-  Ridge_approximation(const TriangulatedSurfaceMesh &P,
-		      const Vertex2FTPropertyMap& vertex2k1_pm, 
-		      const Vertex2FTPropertyMap& vertex2k2_pm,
-		      const Vertex2FTPropertyMap& vertex2b0_pm, 
-		      const Vertex2FTPropertyMap& vertex2b3_pm,
-		      const Vertex2VectorPropertyMap& vertex2d1_pm, 
-		      const Vertex2VectorPropertyMap& vertex2d2_pm,
-		      const Vertex2FTPropertyMap& vertex2P1_pm, 
-		      const Vertex2FTPropertyMap& vertex2P2_pm);
- 
-  template <class OutputIterator>
-  OutputIterator compute_max_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
-  template <class OutputIterator>
-  OutputIterator compute_min_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
-  template <class OutputIterator>
-  OutputIterator compute_crest_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
-  
-  //Find MAX_RIDGE, MIN_RIDGE or CREST_RIDGE ridges iterate on P facets,
-  //find a non-visited, regular (i.e. if there is a coherent
-  //orientation of ppal dir at the facet vertices), 2Xing triangle,
-  //follow non-visited, regular, 2Xing triangles in both sens to
-  //create a Ridge line.  Each time an edge is added the strength and
-  //sharpness(if Ridge_order_4) are updated.
-  template <class OutputIterator>
-  OutputIterator compute_ridges(Ridge_interrogation_type r_type, 
-			  OutputIterator ridge_lines_it,
-			  Ridge_order ord = Ridge_order_3);
-
- protected:
-  const TriangulatedSurfaceMesh& P;
-  FT squared_model_size;//squared radius of the smallest enclosing sphere of the TriangulatedSurfaceMesh
-		//used to make the sharpness scale independant and iso indep
-  Ridge_order tag_order;
-
-  //tag to visit faces
-  struct Facet_cmp{ //comparison is wrt facet addresses
-    bool operator()(Facet_const_handle a,  Facet_const_handle b) const{
-      return &*a < &*b;
-    }
-  };
-  typedef std::map<Facet_const_handle, bool, Facet_cmp> Facet2bool_map_type;
-  Facet2bool_map_type is_visited_map;
-
-  //Property maps
-  const Vertex2FTPropertyMap &k1, &k2, &b0, &b3, &P1, &P2;
-  const Vertex2VectorPropertyMap &d1, &d2;
-
-  //is a facet crossed by a BLUE, RED or CREST_RIDGE ridge? if so, return
-  //the crossed edges and more precise type from MAX_ELLIPTIC_RIDGE,
-  //MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE, MIN_ELLIPTIC_RIDGE,
-  //MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE or NO_RIDGE
-  Ridge_type facet_ridge_type(const Facet_const_handle f, 
-			      Halfedge_const_handle& he1, 
-			      Halfedge_const_handle& he2,
-			      Ridge_interrogation_type r_type);
-  
-  //is an edge crossed by a BLUE/RED ridge? (color is MAX_RIDGE or
-  //MIN_RIDGE ).  As we only test edges of regular triangles, the ppal
-  //direction at endpoints d_p and d_q cannot be orthogonal. If both
-  //extremalities vanish, we consider no crossing occurs. If only one
-  //of them vanishes, we consider it as an positive infinitesimal and
-  //apply the general rule. The general rule is that for both
-  //non-vanishing extremalities, a crossing occurs if their sign
-  //differ; Assuming the accute rule to orient the ppal directions,
-  //there is a crossing iff d_p.d_q * b_p*b_q < 0
-  void xing_on_edge(const Halfedge_const_handle he, 
-		    bool& is_crossed, 
-		    Ridge_interrogation_type color);
- 
-  //given a ridge segment of a given color, in a triangle crossing he1
-  //(v_p1 -> v_q1) and he2 (v_p2 -> v_q2) return true if it is
-  //elliptic, false if it is hyperbolic.
-  bool tag_as_elliptic_hyperbolic(const Ridge_interrogation_type color,
-				  const Halfedge_const_handle he1, 
-				  const Halfedge_const_handle he2);
-
-  //for the computation with tag_order == 3 only
-  //for a ridge segment [r1,r2] in a triangle (v1,v2,v3), let r = r2 -
-  //r1 and normalize, the projection of a point p on the line (r1,r2)
-  //is pp=r1+tr, with t=(p-r1)*r then the vector v starting at p is
-  //pointing to the ridge line (r1,r2) if (pp-p)*v >0. Return the sign
-  //of b, for a ppal direction pointing to the ridge segment,
-  //appearing at least at two vertices of the facet.
-  //
-  // for color = MAX_RIDGE, sign = 1 if MAX_ELLIPTIC_RIDGE, -1 if
-  // MAX_HYPERBOLIC_RIDGE 
-  //
-  // for color = MIN_RIDGE, sign = -1 if MIN_ELLIPTIC_RIDGE, 1 if
-  // MIN_HYPERBOLIC_RIDGE
-  int b_sign_pointing_to_ridge(const Vertex_const_handle v1, 
-			       const Vertex_const_handle v2,
-			       const Vertex_const_handle v3,
-			       const Vector_3 r1, const Vector_3 r2, 
-			       const Ridge_interrogation_type color);
-
-  //a ridge line begins with a segment in a triangle given by the 2 he
-  //crossed
-  void init_ridge_line(Ridge_line* ridge_line, 
-		       const Halfedge_const_handle h1, 
-		       const Halfedge_const_handle h2, 
-		       const Ridge_type r_type);
-  //When the line is extended with a he, the bary coord of the
-  //crossing point is computed, the pair (he,coord) is added and the
-  //weights are updated 
-  void addback(Ridge_line* ridge_line, 
-	       const Halfedge_const_handle he, 
-	       const Ridge_type r_type);
-  void addfront(Ridge_line* ridge_line, 
-		const Halfedge_const_handle he,
-		const Ridge_type r_type);
-
-  //compute the barycentric coordinate of the xing point (blue or red)
-  //for he: p->q (wrt the extremality values b0/3).  coord is st
-  //xing_point = coord*p + (1-coord)*q
-  FT bary_coord(const Halfedge_const_handle he, 
-		const Ridge_type r_type);
-};
-
-
-// IMPLEMENTATION OF Ridge_approximation members
-/////////////////////////////////////////////////////////////////////////////
- //contructor
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap,
-  class Vertex2VectorPropertyMap > 
-  Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap >::
-  Ridge_approximation(const TriangulatedSurfaceMesh &p,
-		      const Vertex2FTPropertyMap& vertex2k1_pm, 
-		      const Vertex2FTPropertyMap& vertex2k2_pm,
-		      const Vertex2FTPropertyMap& vertex2b0_pm, 
-		      const Vertex2FTPropertyMap& vertex2b3_pm,
-		      const Vertex2VectorPropertyMap& vertex2d1_pm, 
-		      const Vertex2VectorPropertyMap& vertex2d2_pm,
-		      const Vertex2FTPropertyMap& vertex2P1_pm, 
-		      const Vertex2FTPropertyMap& vertex2P2_pm)
-    : P(p), k1(vertex2k1_pm), k2(vertex2k2_pm), b0(vertex2b0_pm), b3(vertex2b3_pm), 
-      P1(vertex2P1_pm), P2(vertex2P2_pm), d1(vertex2d1_pm), d2(vertex2d2_pm)
-{
-  //init the is_visited_map and check that the mesh is a triangular one.
-  Facet_const_iterator itb = P.facets_begin(), ite = P.facets_end();
-  for(;itb!=ite;itb++) {
-    is_visited_map[itb] = false;
-    CGAL_precondition( itb->is_triangle() );
-  }
-
-  CGAL::Min_sphere_d<CGAL::Optimisation_d_traits_3<typename TriangulatedSurfaceMesh::Traits> > 
-    min_sphere(P.points_begin(), P.points_end());
-  squared_model_size = min_sphere.squared_radius();
-  //maybe better to use CGAL::Min_sphere_of_spheres_d ?? but need to create spheres?
-
-  tag_order = Ridge_order_3;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-  template <class OutputIterator>
-  OutputIterator Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  compute_max_ridges(OutputIterator it, Ridge_order ord)
-{
-  compute_ridges(MAX_RIDGE, it, ord);
-  return it;
-}
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-  template <class OutputIterator>
-  OutputIterator Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  compute_min_ridges(OutputIterator it, Ridge_order ord)
-{
-  compute_ridges(MIN_RIDGE, it, ord);
-  return it;
-}
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-  template <class OutputIterator>
-  OutputIterator Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  compute_crest_ridges(OutputIterator it, Ridge_order ord)
-{
-  compute_ridges(CREST_RIDGE, it, ord);
-  return it;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-  template <class OutputIterator>
-  OutputIterator Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  compute_ridges(Ridge_interrogation_type r_type, OutputIterator ridge_lines_it, Ridge_order ord)
-{
-  tag_order = ord;
-
-  //reinit the is_visited_map
-  Facet_const_iterator itb = P.facets_begin(), ite = P.facets_end();
-  for(;itb!=ite;itb++) is_visited_map[itb] = false;
-  
-  itb = P.facets_begin();
-  for(;itb!=ite;itb++)
-    {
-      Facet_const_handle f = itb;
-      if (is_visited_map.find(f)->second) continue;
-      is_visited_map.find(f)->second = true;
-      Halfedge_const_handle h1, h2, curhe1, curhe2, curhe;
-      
-      //h1 h2 are the hedges crossed if any, r_type should be
-      //MAX_RIDGE, MIN_RIDGE or CREST_RIDGE ; cur_ridge_type should be
-      //MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE,
-      //MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE or NO_RIDGE
-      Ridge_type cur_ridge_type = facet_ridge_type(f,h1,h2,r_type);
-      if ( cur_ridge_type == NO_RIDGE ) continue;
-      
-      //a ridge_line is begining and stored
-      Ridge_line* cur_ridge_line = new Ridge_line();
-      init_ridge_line(cur_ridge_line, h1, h2, cur_ridge_type);
-      *ridge_lines_it++ = cur_ridge_line;
-    
-      //next triangle adjacent to h1 (push_front)
-      if ( !(h1->is_border_edge()) ) 
-	{
-	  f = h1->opposite()->facet();
-	  curhe = h1;
-	  while (cur_ridge_type == facet_ridge_type(f,curhe1,curhe2,r_type))
-	    {
-	      //follow the ridge from curhe
-	      if (is_visited_map.find(f)->second) break;
-	      is_visited_map.find(f)->second = true;
-	      if (curhe->opposite() == curhe1) curhe = curhe2;
-	      else curhe = curhe1;//curhe stays at the ridge extremity
-	      addfront(cur_ridge_line, curhe, cur_ridge_type);
-	      if ( !(curhe->is_border_edge()) ) f =
-						  curhe->opposite()->facet();
-	      else break;
-	    }
-	  //exit from the while if
-	  //1. border or already visited (this is a ridge loop)
-	  //2. not same type, then do not set visisted cause a MAX_ELLIPTIC_RIDGE
-	  //	  follows a MAX_HYPERBOLIC_RIDGE
-	}
-
-      //next triangle adjacent to h2 (push_back)
-      if ( !(h2->is_border_edge()) ) 
-	{
-	  f = h2->opposite()->facet();
-	  curhe = h2;
-	  while (cur_ridge_type ==
-		 facet_ridge_type(f,curhe1,curhe2,r_type))
-	    {
-	      //follow the ridge from curhe
-	      if (is_visited_map.find(f)->second) break;
-	      is_visited_map.find(f)->second = true;
-	      if (curhe->opposite() == curhe1) curhe = curhe2;
-	      else curhe = curhe1;
-	      addback(cur_ridge_line, curhe, cur_ridge_type);
-	      if ( !(curhe->is_border_edge()) ) f =
-						  curhe->opposite()->facet();
-	      else break;
-	    }
-	} 
-    }
-  return ridge_lines_it;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-Ridge_type Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-facet_ridge_type(const Facet_const_handle f, Halfedge_const_handle& he1, Halfedge_const_handle&
-		 he2, Ridge_interrogation_type r_type)
-{
-  //polyhedral data
-  //we have v1--h1-->v2--h2-->v3--h3-->v1
-  const Halfedge_const_handle h1 = f->halfedge();
-  const Vertex_const_handle v2 = h1->vertex();
-  const Halfedge_const_handle h2 = h1->next();
-  const Vertex_const_handle v3 = h2->vertex();
-  const Halfedge_const_handle h3 = h2->next();
-  const Vertex_const_handle v1 = h3->vertex();
-
-  //check for regular facet
-  //i.e. if there is a coherent orientation of ppal dir at the facet vertices
-  if ( d1[v1]*d1[v2] * d1[v1]*d1[v3] * d1[v2]*d1[v3] < 0 ) 
-    return NO_RIDGE;
-   
-  //determine potential crest color
-  //MAX_CREST_RIDGE if |sum(k1)|>|sum(k2)| sum over facet vertices vi
-  //MIN_CREST_RIDGE if |sum(k1)|<|sum(k2)|
-  Ridge_type crest_color = NO_RIDGE;
-  if (r_type == CREST_RIDGE) 
-    {
-      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) > CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
-	crest_color = MAX_CREST_RIDGE; 
-      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) < CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
-	crest_color = MIN_CREST_RIDGE;
-      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) == CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
-	return NO_RIDGE;
-    }
-  
-  //compute Xing on the 3 edges
-  bool h1_is_crossed = false, h2_is_crossed = false, h3_is_crossed = false;
-  if ( r_type == MAX_RIDGE || crest_color == MAX_CREST_RIDGE ) 
-    {
-      xing_on_edge(h1, h1_is_crossed, MAX_RIDGE);
-      xing_on_edge(h2, h2_is_crossed, MAX_RIDGE);
-      xing_on_edge(h3, h3_is_crossed, MAX_RIDGE);
-    }
-  if ( r_type == MIN_RIDGE || crest_color == MIN_CREST_RIDGE ) 
-    {
-      xing_on_edge(h1, h1_is_crossed, MIN_RIDGE);
-      xing_on_edge(h2, h2_is_crossed, MIN_RIDGE);
-      xing_on_edge(h3, h3_is_crossed, MIN_RIDGE);
-    }
-
-  //there are either 0 or 2 crossed edges
-  if ( !h1_is_crossed && !h2_is_crossed && !h3_is_crossed ) 
-    return NO_RIDGE; 
-  if (h1_is_crossed && h2_is_crossed && !h3_is_crossed)
-    {
-      he1 = h1; 
-      he2 = h2;
-    }
-  if (h1_is_crossed && !h2_is_crossed && h3_is_crossed)
-    {
-      he1 = h1; 
-      he2 = h3;
-    }
-  if (!h1_is_crossed && h2_is_crossed && h3_is_crossed)
-    {
-      he1 = h2; 
-      he2 = h3;
-    }
-  //check there is no other case (just one edge crossed)
-  CGAL_postcondition ( !( (h1_is_crossed && !h2_is_crossed && !h3_is_crossed)
-			  || (!h1_is_crossed && h2_is_crossed && !h3_is_crossed)
-			  || (!h1_is_crossed && !h2_is_crossed && h3_is_crossed)) );
-
-  //There is a ridge segment in the triangle, determine its type elliptic/hyperbolic
-  bool is_elliptic;  
-  if ( r_type == MAX_RIDGE || crest_color == MAX_CREST_RIDGE ) 
-    is_elliptic = tag_as_elliptic_hyperbolic(MAX_RIDGE, he1, he2);
-  else is_elliptic = tag_as_elliptic_hyperbolic(MIN_RIDGE, he1, he2);
-  
-  if (r_type == MAX_RIDGE) 
-    {if (is_elliptic) return MAX_ELLIPTIC_RIDGE;
-    else return MAX_HYPERBOLIC_RIDGE; }
-  if (crest_color == MAX_CREST_RIDGE && is_elliptic) return MAX_CREST_RIDGE;
-
-  if (r_type == MIN_RIDGE) 
-    {if (is_elliptic) return MIN_ELLIPTIC_RIDGE;
-    else return MIN_HYPERBOLIC_RIDGE; }
-  if (crest_color == MIN_CREST_RIDGE && is_elliptic) return MIN_CREST_RIDGE;
-  
-  return NO_RIDGE;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-void Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-xing_on_edge(const Halfedge_const_handle he, bool& is_crossed, Ridge_interrogation_type color)
-{
-  is_crossed = false;
-  FT sign = 0;
-  FT b_p, b_q; // extremalities at p and q for he: p->q
-  Vector_3  d_p = d1[he->opposite()->vertex()],
-    d_q = d1[he->vertex()]; //ppal dir
-  if ( color == MAX_RIDGE ) {
-    b_p = b0[he->opposite()->vertex()];
-    b_q = b0[he->vertex()];
-  }
-  else {     
-    b_p = b3[he->opposite()->vertex()];
-    b_q = b3[he->vertex()];
-  }
-  if ( b_p == 0 && b_q == 0 ) return;
-  if ( b_p == 0 && b_q !=0 ) sign = d_p*d_q * b_q;
-  if ( b_p != 0 && b_q ==0 ) sign = d_p*d_q * b_p;
-  if ( b_p != 0 && b_q !=0 ) sign = d_p*d_q * b_p * b_q;
-  if ( sign < 0 ) is_crossed = true;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-bool Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  tag_as_elliptic_hyperbolic(const Ridge_interrogation_type color,
-			     const Halfedge_const_handle he1, 
-			     const Halfedge_const_handle he2)
-{
-  const Vertex_const_handle v_p1 = he1->opposite()->vertex(), v_q1 = he1->vertex(),
-    v_p2 = he2->opposite()->vertex(), v_q2 = he2->vertex(); // hei: pi->qi
-
-  FT coord1, coord2;
-  if (color == MAX_RIDGE) 
-    {
-      coord1 = CGAL::abs(b0[v_q1]) / ( CGAL::abs(b0[v_p1]) + CGAL::abs(b0[v_q1]) );
-      coord2 = CGAL::abs(b0[v_q2]) / ( CGAL::abs(b0[v_p2]) + CGAL::abs(b0[v_q2]) ); 
-    }
-  else 
-    {
-      coord1 = CGAL::abs(b3[v_q1]) / ( CGAL::abs(b3[v_p1]) + CGAL::abs(b3[v_q1]) );
-      coord2 = CGAL::abs(b3[v_q2]) / ( CGAL::abs(b3[v_p2]) + CGAL::abs(b3[v_q2]) ); 
-    }
-
-  if ( tag_order == Ridge_order_3 ) {
-    Vector_3 r1 = CGAL::barycenter(v_p1->point(), coord1, v_q1->point()) - ORIGIN,
-             r2 = CGAL::barycenter(v_p2->point(), coord2, v_q2->point()) - ORIGIN; 
-    //identify the 3 different vertices v_p1, v_q1 and v3 = v_p2 or v_q2
-    Vertex_const_handle v3;
-    if (v_p2 == v_p1 || v_p2 == v_q1) v3 = v_q2;
-    else v3 = v_p2;
-
-    int b_sign = b_sign_pointing_to_ridge(v_p1, v_q1, v3, r1, r2, color); 
-
-    if (color == MAX_RIDGE) 
-      if (b_sign == 1) return true; 
-      else return false;
-    else if (b_sign == -1) return true; 
-      else return false;
-  }
-  else {//tag_order == Ridge_order_4, check the sign of the meanvalue of the signs
-    //      of Pi at the two crossing points
-    FT sign_P;
-    if (color == MAX_RIDGE) 
-      sign_P =  P1[v_p1]*coord1 + P1[v_q1]*(1-coord1) 
-	+ P1[v_p2]*coord2 + P1[v_q2]*(1-coord2);
-    else sign_P =  P2[v_p1]*coord1 + P2[v_q1]*(1-coord1) 
-	+ P2[v_p2]*coord2 + P2[v_q2]*(1-coord2);
-
-    if ( sign_P < 0 ) return true; else return false;
-  }
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-int Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-  b_sign_pointing_to_ridge(const Vertex_const_handle v1, 
-			       const Vertex_const_handle v2,
-			       const Vertex_const_handle v3,
-			       const Vector_3 r1, const Vector_3 r2, 
-			       const Ridge_interrogation_type color)
-{
-  Vector_3 r = r2 - r1, dv1, dv2, dv3;
-  FT bv1, bv2, bv3;
-  if ( color == MAX_RIDGE ) {
-    bv1 = b0[v1];
-    bv2 = b0[v2];
-    bv3 = b0[v3];
-    dv1 = d1[v1];
-    dv2 = d1[v2];
-    dv3 = d1[v3];
-  }
-  else {
-    bv1 = b3[v1];
-    bv2 = b3[v2];
-    bv3 = b3[v3];
-    dv1 = d2[v1];
-    dv2 = d2[v2];
-    dv3 = d2[v3];    
-  }
-  if ( r != CGAL::NULL_VECTOR ) r = r/CGAL::sqrt(r*r);
-  FT sign1, sign2, sign3;
-  sign1 = bv1*(r1 - (v1->point()-ORIGIN) + (((v1->point()-ORIGIN)-r1)*r)*r )*dv1;
-  sign2 = bv2*(r1 - (v2->point()-ORIGIN) + (((v2->point()-ORIGIN)-r1)*r)*r )*dv2;
-  sign3 = bv3*(r1 - (v3->point()-ORIGIN) + (((v3->point()-ORIGIN)-r1)*r)*r )*dv3;
-  
-  int compt = 0;
-  if ( sign1 > 0 ) compt++; else if (sign1 < 0) compt--;
-  if ( sign2 > 0 ) compt++; else if (sign2 < 0) compt--;
-  if ( sign3 > 0 ) compt++; else if (sign3 < 0) compt--;
-  
-  if (compt > 0) return 1; else return -1;
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-void Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-init_ridge_line(Ridge_line* ridge_line, 
-		const Halfedge_const_handle h1, 
-		const Halfedge_const_handle h2, 
-		const Ridge_type r_type)
-{
-  ridge_line->line_type() = r_type;
-  ridge_line->line()->push_back(Ridge_halfhedge(h1, bary_coord(h1,r_type)));
-  addback(ridge_line, h2, r_type);
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-void Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-addback(Ridge_line* ridge_line, const Halfedge_const_handle he,
-	const Ridge_type r_type)
-{
-  Halfedge_const_handle he_cur = ( --(ridge_line->line()->end()) )->first;
-  FT coord_cur = ( --(ridge_line->line()->end()) )->second;//bary_coord(he_cur);
-  FT coord = bary_coord(he,r_type);
-  Vertex_const_handle v_p = he->opposite()->vertex(), v_q = he->vertex(),
-    v_p_cur = he_cur->opposite()->vertex(), v_q_cur = he_cur->vertex(); // he: p->q
-  Vector_3 segment = CGAL::barycenter(v_p->point(), coord, v_q->point()) -
-                     CGAL::barycenter(v_p_cur->point(), coord_cur, v_q_cur->point());
-
-  FT k1x, k2x; //abs value of the ppal curvatures at the Xing point on he.
-  FT k_second = 0; // abs value of the second derivative of the curvature
-               // along the line of curvature
-  k1x = CGAL::abs(k1[v_p]) * coord + CGAL::abs(k1[v_q]) * (1-coord) ;   
-  k2x = CGAL::abs(k2[v_p]) * coord + CGAL::abs(k2[v_q]) * (1-coord) ;   
-
-  if ( (ridge_line->line_type() == MAX_ELLIPTIC_RIDGE) 
-       || (ridge_line->line_type() == MAX_HYPERBOLIC_RIDGE) 
-       || (ridge_line->line_type() == MAX_CREST_RIDGE) ) {
-    ridge_line->strength() += k1x * CGAL::sqrt(segment * segment); 
-    if (tag_order == Ridge_order_4) { 
-      if (k1x != k2x) 
-	k_second =CGAL::abs(( CGAL::abs(P1[v_p]) * coord + CGAL::abs(P1[v_q]) * (1-coord) )/(k1x-k2x));
-      ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
-  }
-  if ( (ridge_line->line_type() == MIN_ELLIPTIC_RIDGE) 
-       || (ridge_line->line_type() == MIN_HYPERBOLIC_RIDGE) 
-       || (ridge_line->line_type() == MIN_CREST_RIDGE) ) {
-   ridge_line->strength() += k2x * CGAL::sqrt(segment * segment); 
-   if (tag_order == Ridge_order_4) {
-     if (k1x != k2x) 
-       k_second =CGAL::abs(( CGAL::abs(P2[v_p]) * coord + CGAL::abs(P2[v_q]) * (1-coord) )/(k1x-k2x));
-     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
-   } 
-  ridge_line->line()->push_back( Ridge_halfhedge(he, coord));
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-void Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-addfront(Ridge_line* ridge_line, 
-	 const Halfedge_const_handle he, 
-	 const Ridge_type r_type)
-{
-  Halfedge_const_handle he_cur = ( ridge_line->line()->begin() )->first;
-  FT coord_cur = ( ridge_line->line()->begin() )->second;
-  FT coord = bary_coord(he,r_type);
-  Vertex_const_handle v_p = he->opposite()->vertex(), v_q = he->vertex(),
-    v_p_cur = he_cur->opposite()->vertex(), v_q_cur = he_cur->vertex(); // he: p->q
-  Vector_3 segment = CGAL::barycenter(v_p->point(), coord, v_q->point()) -
-                     CGAL::barycenter(v_p_cur->point(), coord_cur, v_q_cur->point());
-
-  FT k1x, k2x; //abs value of the ppal curvatures at the Xing point on he.
-  FT k_second = 0.; // abs value of the second derivative of the curvature
-               // along the line of curvature
-  k1x = CGAL::abs(k1[v_p]) * coord + CGAL::abs(k1[v_q]) * (1-coord) ;   
-  k2x = CGAL::abs(k2[v_p]) * coord + CGAL::abs(k2[v_q]) * (1-coord) ;   
-
-  if ( (ridge_line->line_type() == MAX_ELLIPTIC_RIDGE) 
-       || (ridge_line->line_type() == MAX_HYPERBOLIC_RIDGE) 
-       || (ridge_line->line_type() == MAX_CREST_RIDGE) ) {
-    ridge_line->strength() += k1x * CGAL::sqrt(segment * segment); 
-   if (tag_order == Ridge_order_4) {
-     if (k1x != k2x) 
-       k_second =CGAL::abs(( CGAL::abs(P1[v_p]) * coord + CGAL::abs(P1[v_q]) * (1-coord) )/(k1x-k2x));
-     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
-  }
-  if ( (ridge_line->line_type() == MIN_ELLIPTIC_RIDGE) 
-       || (ridge_line->line_type() == MIN_HYPERBOLIC_RIDGE) 
-       || (ridge_line->line_type() == MIN_CREST_RIDGE) ) {
-   ridge_line->strength() += k2x * CGAL::sqrt(segment * segment); 
-   if (tag_order == Ridge_order_4) {
-     if (k1x != k2x) 
-       k_second =CGAL::abs(( CGAL::abs(P2[v_p]) * coord + CGAL::abs(P2[v_q]) * (1-coord) )/(k1x-k2x));
-     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
-   } 
-  ridge_line->line()->push_front( Ridge_halfhedge(he, coord));
-}
-
-template < class TriangulatedSurfaceMesh,  
-           class Vertex2FTPropertyMap,
-           class Vertex2VectorPropertyMap > 
-typename TriangulatedSurfaceMesh::Traits::FT 
-Ridge_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap , Vertex2VectorPropertyMap  >::
-bary_coord(const Halfedge_const_handle he, const Ridge_type r_type)
-{
-  FT b_p = 0., b_q = 0.; // extremalities at p and q for he: p->q
-  if ( (r_type == MAX_ELLIPTIC_RIDGE) 
-       || (r_type == MAX_HYPERBOLIC_RIDGE) 
-       || (r_type == MAX_CREST_RIDGE) ) {
-    b_p = b0[he->opposite()->vertex()];
-    b_q = b0[he->vertex()];    
-  }
-  if ( (r_type == MIN_ELLIPTIC_RIDGE) 
-       || (r_type == MIN_HYPERBOLIC_RIDGE) 
-       || (r_type == MIN_CREST_RIDGE) ) {
-    b_p = b3[he->opposite()->vertex()];
-    b_q = b3[he->vertex()];    
-  }
-  //denominator cannot be 0 since there is no crossing when both extremalities are 0
-  return CGAL::abs(b_q) / ( CGAL::abs(b_q) + CGAL::abs(b_p) );
-}
-  
-
-//---------------------------------------------------------------------------
-//Global functions
-//--------------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap,
-  class Vertex2VectorPropertyMap,
-  class OutputIterator>
-  OutputIterator compute_max_ridges(const TriangulatedSurfaceMesh &P,
-				    const Vertex2FTPropertyMap& vertex2k1_pm, 
-				    const Vertex2FTPropertyMap& vertex2k2_pm,
-				    const Vertex2FTPropertyMap& vertex2b0_pm, 
-				    const Vertex2FTPropertyMap& vertex2b3_pm,
-				    const Vertex2VectorPropertyMap& vertex2d1_pm, 
-				    const Vertex2VectorPropertyMap& vertex2d2_pm,
-				    const Vertex2FTPropertyMap& vertex2P1_pm, 
-				    const Vertex2FTPropertyMap& vertex2P2_pm,
-				    OutputIterator it, 
-				    Ridge_order order = Ridge_order_3)
-{
-  typedef Ridge_approximation < TriangulatedSurfaceMesh, 
-    Vertex2FTPropertyMap, Vertex2VectorPropertyMap > Ridge_approximation;
-  
-  Ridge_approximation ridge_approximation(P, 
-					  vertex2k1_pm, vertex2k2_pm,
-					  vertex2b0_pm, vertex2b3_pm,
-					  vertex2d1_pm, vertex2d2_pm,
-					  vertex2P1_pm, vertex2P2_pm );
-  return ridge_approximation.compute_max_ridges(it, order);  
-}
-
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap,
-  class Vertex2VectorPropertyMap,
-  class OutputIterator>
-  OutputIterator compute_min_ridges(const TriangulatedSurfaceMesh &P,
-				    const Vertex2FTPropertyMap& vertex2k1_pm, 
-				    const Vertex2FTPropertyMap& vertex2k2_pm,
-				    const Vertex2FTPropertyMap& vertex2b0_pm, 
-				    const Vertex2FTPropertyMap& vertex2b3_pm,
-				    const Vertex2VectorPropertyMap& vertex2d1_pm, 
-				    const Vertex2VectorPropertyMap& vertex2d2_pm,
-				    const Vertex2FTPropertyMap& vertex2P1_pm, 
-				    const Vertex2FTPropertyMap& vertex2P2_pm,
-				    OutputIterator it, 
-				    Ridge_order order = Ridge_order_3)
-{
-  typedef Ridge_approximation < TriangulatedSurfaceMesh, 
-    Vertex2FTPropertyMap, Vertex2VectorPropertyMap > Ridge_approximation;
-  
-  Ridge_approximation ridge_approximation(P, 
-					  vertex2k1_pm, vertex2k2_pm,
-					  vertex2b0_pm, vertex2b3_pm,
-					  vertex2d1_pm, vertex2d2_pm,
-					  vertex2P1_pm, vertex2P2_pm );
-  return ridge_approximation.compute_min_ridges(it, order);  
-}
-
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap,
-  class Vertex2VectorPropertyMap,
-  class OutputIterator>
-  OutputIterator compute_crest_ridges(const TriangulatedSurfaceMesh &P,
-				    const Vertex2FTPropertyMap& vertex2k1_pm, 
-				    const Vertex2FTPropertyMap& vertex2k2_pm,
-				    const Vertex2FTPropertyMap& vertex2b0_pm, 
-				    const Vertex2FTPropertyMap& vertex2b3_pm,
-				    const Vertex2VectorPropertyMap& vertex2d1_pm, 
-				    const Vertex2VectorPropertyMap& vertex2d2_pm,
-				    const Vertex2FTPropertyMap& vertex2P1_pm, 
-				    const Vertex2FTPropertyMap& vertex2P2_pm,
-				    OutputIterator it, 
-				    Ridge_order order = Ridge_order_3)
-{
-  typedef Ridge_approximation < TriangulatedSurfaceMesh, 
-    Vertex2FTPropertyMap, Vertex2VectorPropertyMap > Ridge_approximation;
-  
-  Ridge_approximation ridge_approximation(P, 
-					  vertex2k1_pm, vertex2k2_pm,
-					  vertex2b0_pm, vertex2b3_pm,
-					  vertex2d1_pm, vertex2d2_pm,
-					  vertex2P1_pm, vertex2P2_pm );
-  return ridge_approximation.compute_crest_ridges(it, order);  
-}
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Root_for_circles_2_2.h b/3rdparty/CGAL-4.6/include/CGAL/Root_for_circles_2_2.h
deleted file mode 100644
index 6083e20..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Root_for_circles_2_2.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud, Sylvain Pion
-
-// Partially supported by the IST Programme of the EU as a Shared-cost
-// RTD (FET Open) Project under Contract No  IST-2000-26473 
-// (ECG - Effective Computational Geometry for Curves and Surfaces) 
-// and a STREP (FET Open) Project under Contract No  IST-006413 
-// (ACS -- Algorithms for Complex Shapes)
-
-#ifndef CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
-#define CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
-
-#include <iostream>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Root_of_traits.h>
-#include <CGAL/Handle_for.h>
-#include <boost/type_traits/is_same.hpp>
-
-namespace CGAL {
-
-template < typename RT_ >
-class Root_for_circles_2_2 {
-
-  typedef RT_                                                              RT;
-  typedef typename Root_of_traits< RT >::RootOf_2    Root_of_2;
-  typedef typename Root_of_traits< RT >::RootOf_1    FT;
-
-  private:
-    Handle_for<Root_of_2> x_;
-    Handle_for<Root_of_2> y_;
-    
-  public:
-  Root_for_circles_2_2(){}
-  
-  Root_for_circles_2_2(const Root_of_2& r1, const Root_of_2& r2)
-    : x_(r1), y_(r2)
-  {
-    // When it is an interval this assertion dont compile
-    //CGAL_assertion((r1.is_rational() || r2.is_rational()) || 
-    //               (r1.gamma() == r2.gamma()));
-  }
-
-  const Root_of_2& x() const 
-  { return get(x_); }
-    
-  const Root_of_2& y() const 
-  { return get(y_); }
-
-  CGAL::Bbox_2 bbox() const
-  {
-    CGAL::Interval_nt<> 
-     ix=to_interval(x()),
-     iy=to_interval(y());
-    return CGAL::Bbox_2(ix.inf(),iy.inf(),
-	                ix.sup(),iy.sup());
-    /*
-      const Root_of_2 &ox = x();
-      const Root_of_2 &oy = y();
-
-      if(ox.is_rational() || oy.is_rational()) {
-        CGAL::Interval_nt<> 
-          ix=to_interval(ox),
-          iy=to_interval(oy);
-        return CGAL::Bbox_2(ix.inf(),iy.inf(),
-	                ix.sup(),iy.sup());
-      }
-
-      // delta must be the same
-      // WE HAVE TO TEST THE EXECUTION TIME
-      // IT STILL NOT POSSIBLE BECAUSE OF THE 
-      // PROBLEM ON THE ARRANGEMENT
-      // (it is very likely to make it better with this changing)
-      const CGAL::Interval_nt<true> alpha1 = to_interval(ox.alpha());
-      const CGAL::Interval_nt<true> beta1 = to_interval(ox.beta());
-      const CGAL::Interval_nt<true> alpha2 = to_interval(oy.alpha());
-      const CGAL::Interval_nt<true> beta2 = to_interval(oy.beta());
-      const CGAL::Interval_nt<true> g = to_interval(ox.gamma());
-      const CGAL::Interval_nt<true> sqrtg = CGAL::sqrt(g);
-      const CGAL::Interval_nt<true> ix = alpha1 + beta1 * sqrtg;
-      const CGAL::Interval_nt<true> iy = alpha2 + beta2 * sqrtg;
-      return CGAL::Bbox_2(ix.inf(),iy.inf(),
-	                ix.sup(),iy.sup());
-    */
-  }
-
-  template < typename RT >
-  friend bool operator == ( const Root_for_circles_2_2<RT>& r1,
-   	                    const Root_for_circles_2_2<RT>& r2 );
-
-};
-  
-template < typename RT >
-bool 
-operator == ( const Root_for_circles_2_2<RT>& r1,
-	      const Root_for_circles_2_2<RT>& r2 )
-{ if (CGAL::identical(r1.x_, r2.x_) && CGAL::identical(r1.y_, r2.y_))
-	  return true;
-  return (r1.x() == r2.x()) && (r1.y() == r2.y()); 
-}
-
-template < typename RT >
-std::ostream &
-operator<<(std::ostream & os, const Root_for_circles_2_2<RT> &r)
-{ return os << r.x() << " " << r.y() << " "; }
-
-template < typename RT >
-std::istream &
-operator>>(std::istream & is, Root_for_circles_2_2<RT> &r)
-{
-  typedef typename Root_of_traits< RT >::RootOf_2         Root_of_2;
-  Root_of_2 x,y;
-  
-  is >> x >> y;
-  if(is)
-    r = Root_for_circles_2_2<RT>(x,y);
-  return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h
deleted file mode 100644
index 8da661d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h
+++ /dev/null
@@ -1,539 +0,0 @@
-//Copyright (C) 2014  INRIA - Sophia Antipolis
-//
-//This program is free software: you can redistribute it and/or modify
-//it under the terms of the GNU General Public License as published by
-//the Free Software Foundation, either version 3 of the License, or
-//(at your option) any later version.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License
-//along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-// Author(s):      Thijs van Lankveld
-
-#ifndef CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
-#define CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
-
-//#include <omp.h>
-#ifdef CGAL_LINKED_WITH_TBB
-#include "tbb/blocked_range.h"
-#include "tbb/parallel_for.h"
-#endif // CGAL_LINKED_WITH_TBB
-
-namespace CGAL {
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-class
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-Finite_point_iterator: public Finite_vertices_iterator {
-    typedef Finite_vertices_iterator    Base;
-    typedef Finite_point_iterator       Self;
-
-public:
-    Finite_point_iterator(): Base() {}
-    Finite_point_iterator( const Base& b ): Base(b) {}
-
-    operator Point&() const { return this->point(); }
-}; // class Finite_point_iterator
-
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-class
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-In_surface_tester {
-    const Shape* _s;
-
-public:
-    In_surface_tester() {}
-    In_surface_tester( const Shape* s ): _s(s) {}
-
-    inline bool operator()( const Cell_iterator& /* c */ ) const {
-        return false;
-    }
-
-    inline bool operator()( const Edge_iterator& e ) const {
-        typename Shape::Classification_type cl = _s->classify( e );
-        return cl == Shape::REGULAR || cl == Shape::SINGULAR;
-    }
-
-    inline bool operator()( const Facet_iterator& f ) const {
-        typename Shape::Classification_type cl = _s->classify( f );
-        return cl == Shape::REGULAR || cl == Shape::SINGULAR;
-    }
-
-    inline bool operator()( const Vertex_iterator& v ) const {
-        return !_s->is_infinite( v );
-    }
-}; // In_surface_tester
-
-
-// Compute the number of neighbors of a point that lie within a fixed radius.
-template < class Gt, class FS, class Sh, class wA, class Ct >
-class
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-ComputeNN {
-public:
-    typedef std::vector< Point >        Pointset;
-    typedef std::vector< unsigned int >	CountVec;
-
-private:
-    typename Gt::Compare_squared_distance_3 compare;
-
-    const Pointset&     _pts;
-    const Search_tree&  _tree;
-    const FT&           _sq_rd;
-    CountVec&           _nn;
-
-public:
-    ComputeNN(const Pointset& points, const Search_tree&  tree,
-              const FT& sq_radius, CountVec& nn)
-    : _pts(points), _tree(tree), _sq_rd(sq_radius), _nn(nn) {}
-    
-#ifdef CGAL_LINKED_WITH_TBB
-    void operator()( const tbb::blocked_range< std::size_t >& range ) const {
-        for( std::size_t i = range.begin(); i != range.end(); ++i )
-            (*this)( i );
-    }
-#endif // CGAL_LINKED_WITH_TBB
-    void operator()( const std::size_t& i ) const {
-        // Iterate over the neighbors until the first one is found that is too far.
-        Dynamic_search search( _tree, _pts[i] );
-        for( typename Dynamic_search::iterator nit = search.begin();
-             nit != search.end() && compare( _pts[i], nit->first, _sq_rd ) != LARGER;
-             ++nit )
-            ++_nn[i];
-    }
-}; // class ComputeNN
-
-
-// Advance a point to a coarser scale.
-template < class Gt, class FS, class Sh, class wA, class Ct >
-class
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-AdvanceSS {
-public:
-    typedef std::vector< Point >            Pointset;
-    typedef std::vector< unsigned int >	    CountVec;
-    typedef std::map< Point, std::size_t >       PIMap;
-
-private:
-    const Search_tree&  _tree;
-    const CountVec&     _nn;
-    const PIMap&        _ind;
-    Pointset&           _pts;
-    
-public:
-    AdvanceSS(const Search_tree& tree, const CountVec& nn,
-              const PIMap& ind, Pointset& points)
-    : _tree(tree), _nn(nn), _ind(ind), _pts(points) {}
-    
-#ifdef CGAL_LINKED_WITH_TBB
-    void operator()( const tbb::blocked_range< std::size_t >& range ) const {
-        for( std::size_t i = range.begin(); i != range.end(); ++i )
-            (*this)( i );
-    }
-#endif // CGAL_LINKED_WITH_TBB
-    void operator()( const std::size_t& i ) const {
-        // If the neighborhood is too small, the vertex is not moved.
-        if( _nn[i] < 4 )
-            return;
-    
-        // Collect the vertices within the ball and their weights.
-        Dynamic_search search( _tree, _pts[i] );
-        Approximation pca( _nn[i] );
-        unsigned int column = 0;
-        for( typename Dynamic_search::iterator nit = search.begin();
-             nit != search.end() && column < _nn[i];
-             ++nit, ++column ) {
-            pca.set_point( column, nit->first, 1.0 / _nn[ _ind.at( nit->first ) ] );
-        }
-        CGAL_assertion( column == _nn[i] );
-    
-        // Compute the weighted least-squares planar approximation of the point set.
-        if( !pca.compute() )
-            return;
-
-        // The vertex is moved by projecting it onto the plane
-        // through the barycenter and orthogonal to the Eigen vector with smallest Eigen value.
-        _pts[i] = pca.fit( _pts[i] );
-    }
-}; // class AdvanceSS
-
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-Scale_space_surface_reconstruction_3( unsigned int neighbors, unsigned int samples )
-: _mean_neighbors(neighbors), _samples(samples), _squared_radius(-1), _shape(0) {}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-Scale_space_surface_reconstruction_3( FT sq_radius )
-: _mean_neighbors(0), _samples(0), _squared_radius(sq_radius), _shape(0) {
-    CGAL_precondition( sq_radius >= 0 );
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-inline bool
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-is_handled( Cell_handle c, unsigned int li ) const {
-    switch( li ) {
-    case 0: return ( c->info()&1 ) != 0;
-    case 1: return ( c->info()&2 ) != 0;
-    case 2: return ( c->info()&4 ) != 0;
-    case 3: return ( c->info()&8 ) != 0;
-    }
-    return false;
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-inline void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-mark_handled( Cell_handle c, unsigned int li ) {
-    switch( li ) {
-    case 0: c->info() |= 1; return;
-    case 1: c->info() |= 2; return;
-    case 2: c->info() |= 4; return;
-    case 3: c->info() |= 8; return;
-    }
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-inline typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Triple
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-ordered_facet_indices( const Facet& f ) const {
-    if( (f.second&1) == 0 )
-        return make_array<unsigned int>( f.first->vertex( (f.second+2)&3 )->info(),
-                                         f.first->vertex( (f.second+1)&3 )->info(),
-                                         f.first->vertex( (f.second+3)&3 )->info() );
-    else
-        return make_array<unsigned int>( f.first->vertex( (f.second+1)&3 )->info(),
-                                         f.first->vertex( (f.second+2)&3 )->info(),
-                                         f.first->vertex( (f.second+3)&3 )->info() );
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-collect_shell( Cell_handle c, unsigned int li ) {
-    // Collect one surface mesh from the alpha-shape in a fashion similar to ball-pivoting.
-    // Invariant: the facet is regular or singular.
-
-    // To stop stack overflows: use own stack.
-    std::stack<Facet> stack;
-    stack.push( Facet(c, li) );
-
-    Facet f;
-    Cell_handle n, p;
-    int ni, pi;
-    Vertex_handle a;
-    Classification_type cl;
-    bool processed = false;
-    while( !stack.empty() ) {
-        f = stack.top();
-        stack.pop();
-
-        // Check if the cell was already handled.
-        // Note that this is an extra check that in many cases is not necessary.
-        if( is_handled(f) )
-            continue;
-
-        // The facet is part of the surface.
-        CGAL_assertion( !_shape->is_infinite(f) );
-        mark_handled(f);
-
-        // Output the facet as a triple of indices.
-        _surface.push_back( ordered_facet_indices(f) );
-        if( !processed ) {
-            _shells.push_back( --_surface.end() );
-            processed = true;
-        }
-		
-        // Pivot over each of the facet's edges and continue the surface at the next regular or singular facet.
-        for( int i = 0; i < 4; ++i ) {
-            // Skip the current facet.
-            if( i == f.second || is_handled(f.first, i) )
-                continue;
-
-            // Rotate around the edge (starting from the shared facet in the current cell) until a regular or singular facet is found.
-            n = f.first;
-            ni = i;
-            a = f.first->vertex( f.second );
-            cl = _shape->classify( Facet(n, ni) );
-            while( cl != Shape::REGULAR && cl != Shape::SINGULAR ) {
-                p = n;
-                n = n->neighbor(ni);
-                ni = n->index(a);
-                pi = n->index(p);
-                a = n->vertex(pi);
-                cl = _shape->classify( Facet(n, ni) );
-            }
-
-            // Continue the surface at the next regular or singular facet.
-            stack.push( Facet(n, ni) );
-        }
-    }
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-collect_facets( Tag_true ) {
-    // Collect all surface meshes from the alpha-shape in a fashion similar to ball-pivoting.
-    // Reset the facet handled markers.
-    for( All_cells_iterator cit = _shape->all_cells_begin(); cit != _shape->all_cells_end(); ++cit )
-        cit->info() = 0;
-
-    // We check each of the facets: if it is not handled and either regular or singular,
-    // we start collecting the next surface from here.
-    for( Finite_facets_iterator fit = _shape->finite_facets_begin(); fit != _shape->finite_facets_end(); ++fit ) {
-        switch( _shape->classify( *fit ) ) {
-            case Shape::REGULAR:
-                // Build a surface from the outer cell.
-                if( _shape->classify(fit->first) == Shape::EXTERIOR )
-                    collect_shell( *fit );
-                else
-                    collect_shell( _shape->mirror_facet( *fit ) );
-                break;
-            case Shape::SINGULAR:
-                // Build a surface from both incident cells.
-                collect_shell( *fit );
-                collect_shell( _shape->mirror_facet( *fit ) );
-                break;
-            default:
-                break;
-        }
-    }
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-collect_facets( Tag_false ) {
-    // Collect all facets from the alpha-shape in an unordered fashion.
-    for( Finite_facets_iterator fit = _shape->finite_facets_begin(); fit != _shape->finite_facets_end(); ++fit ) {
-        switch( _shape->classify( *fit ) ) {
-            case Shape::REGULAR:
-                // Collect the outer cell.
-                if( _shape->classify(fit->first) == Shape::EXTERIOR )
-                    _surface.push_back( ordered_facet_indices( *fit ) );
-                else
-                    _surface.push_back( ordered_facet_indices( _shape->mirror_facet( *fit ) ) );
-                break;
-            case Shape::SINGULAR:
-                // Collect both incident cells.
-                _surface.push_back( ordered_facet_indices( *fit ) );
-                _surface.push_back( ordered_facet_indices( _shape->mirror_facet( *fit ) ) );
-                break;
-            default:
-                break;
-        }
-    }
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-const typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Shape&
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-shape() const {
-	if( !has_shape() )
-        _shape = Shape_construction_3().construct( _shape, _squared_radius );
-    return *_shape;
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::FT
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-estimate_neighborhood_squared_radius( unsigned int neighbors, unsigned int samples ) {
-    typename Gt::Compute_squared_distance_3 squared_distance = Gt().compute_squared_distance_3_object();
-
-    unsigned int handled = 0;
-    unsigned int checked = 0;
-    FT radius = 0;
-        
-    if( !_tree.is_built() )
-        _tree.build();
-
-    for( Point_const_iterator it = _tree.begin(); it != _tree.end(); ++it ) {
-        unsigned int left = (unsigned int)( _tree.size() - handled );
-        if( samples >= left || _generator.get_double() < double(samples - checked) / left ) {
-            // The neighborhood should contain the point itself as well.
-            Static_search search( _tree, *it, neighbors+1 );
-            radius += sqrt( to_double( squared_distance( *it, ( search.end()-1 )->first ) ) );
-            ++checked;
-        }
-        ++handled;
-    }
-    radius /= double(checked);
-
-    set_neighborhood_squared_radius( radius * radius );
-    return radius;
-}
-
-// Doxygen has a bug where it cannot link the declaration and implementation
-// of methods with a templated parameter.
-#ifndef DOXYGEN_RUNNING
-template < class Gt, class FS, class Sh, class wA, class Ct >
-template < class InputIterator >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::FT
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples,
-                              typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* ) {
-    clear();
-	insert( begin, end );
-	return estimate_neighborhood_squared_radius( neighbors, samples );
-}
-#endif // DOXYGEN_RUNNING
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-increase_scale( unsigned int iterations ) {
-    typedef std::vector< unsigned int >		CountVec;
-    typedef std::map<Point, std::size_t>			PIMap;
-
-    // This method must be called after filling the point collection.
-    if( iterations == 0 || _tree.empty() ) return;
-        
-    if( !has_neighborhood_squared_radius() )
-        estimate_neighborhood_squared_radius();
-
-
-    for( unsigned int iter = 0; iter < iterations; ++iter ) {
-        if( !_tree.is_built() )
-            _tree.build();
-
-        // Collect the number of neighbors of each point.
-        // This can be done concurrently.
-        CountVec neighbors( _tree.size(), 0 );
-        try_parallel( ComputeNN( _points, _tree, _squared_radius, neighbors ), 0, _tree.size() );
-
-        // Construct a mapping from each point to its index.
-        PIMap indices;
-        std::size_t index = 0;
-        for( typename Pointset::const_iterator pit = _points.begin(); pit != _points.end(); ++pit, ++index)
-            indices[ *pit ] = index;
-
-        // Compute the tranformed point locations.
-        // This can be done concurrently.
-        try_parallel( AdvanceSS( _tree, neighbors, indices, _points ), 0, _tree.size() );
-
-        // Put the new points back in the tree.
-        _tree.clear();
-        _tree.insert( _points.begin(), _points.end() );
-    }
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-template< class F >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-try_parallel( const F& func, std::size_t begin, std::size_t end, Sequential_tag ) const {
-    for( std::size_t i = begin; i < end; ++i ) func( i );
-}
-    
-template < class Gt, class FS, class Sh, class wA, class Ct >
-template< class F >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-try_parallel( const F& func, std::size_t begin, std::size_t end, Parallel_tag ) const {
-#ifdef CGAL_LINKED_WITH_TBB
-    tbb::parallel_for( tbb::blocked_range< std::size_t >( begin, end ), func );
-#else // CGAL_LINKED_WITH_TBB
-    try_parallel( func, begin, end, Sequential_tag() );
-#endif // CGAL_LINKED_WITH_TBB
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-template < class InputIterator >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-construct_shape( InputIterator begin, InputIterator end,
-                 typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* ) {
-    deinit_shape();
-    if( !has_neighborhood_squared_radius() )
-        estimate_neighborhood_squared_radius();
-    _shape = Shape_construction_3().construct( begin, end, _squared_radius );
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-collect_surface() {
-    clear_surface();
-    if( !has_shape() )
-        construct_shape();
-    collect_facets();
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-reconstruct_surface( unsigned int iterations ) {
-    // Smooth the scale space.
-    increase_scale( iterations );
-
-    // Mesh the perturbed points.
-    collect_surface();
-}
-
-/// \cond internal_doc
-template < class Gt, class FS, class Sh, class wA, class Ct >
-template < class InputIterator >
-void
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::
-reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations,
-                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type*) {
-    // Compute the radius for which the mean ball would contain the required number of neighbors.
-    clear();
-    insert( begin, end );
-
-    // Smooth the scale space.
-    increase_scale( iterations );
-
-    // Mesh the perturbed points.
-    collect_surface();
-}
-/// \endcond
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Triple_const_iterator
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::shell_begin( std::size_t shell ) const {
-    CGAL_assertion( Sh::value == true );
-    CGAL_assertion( shell >= 0 && shell < _shells.size() );
-    return _shells[ shell ];
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Triple_iterator
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::shell_begin( std::size_t shell ) {
-    CGAL_assertion( Sh::value == true );
-    CGAL_assertion( shell >= 0 && shell < _shells.size() );
-    return _shells[ shell ];
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Triple_const_iterator
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::shell_end( std::size_t shell ) const {
-    CGAL_assertion( Sh::value == true );
-    CGAL_assertion( shell >= 0 && shell < _shells.size() );
-    if( shell == _shells.size()-1 )
-        return _surface.end();
-    return _shells[ shell+1 ];
-}
-
-template < class Gt, class FS, class Sh, class wA, class Ct >
-typename Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::Triple_iterator
-Scale_space_surface_reconstruction_3<Gt,FS,Sh,wA,Ct>::shell_end( std::size_t shell ) {
-    CGAL_assertion( Sh::value == true );
-    CGAL_assertion( shell >= 0 && shell < _shells.size() );
-    if( shell == _shells.size()-1 )
-        return _surface.end();
-    return _shells[ shell+1 ];
-}
-
-} // namespace CGAL
-
-#endif // CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h
deleted file mode 100644
index afeef08..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h
+++ /dev/null
@@ -1,177 +0,0 @@
-//Copyright (C) 2014  INRIA - Sophia Antipolis
-//
-//This program is free software: you can redistribute it and/or modify
-//it under the terms of the GNU General Public License as published by
-//the Free Software Foundation, either version 3 of the License, or
-//(at your option) any later version.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License
-//along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-// Author(s):      Thijs van Lankveld
-
-
-#ifndef CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H
-#define CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H
-
-#include <Eigen/Dense>
-
-
-namespace CGAL {
-    
-/// approximates a point set using a weighted least-squares plane.
-/** \ingroup PkgScaleSpaceReconstruction3Classes
- *  The weighted least-squares planar approximation contains the barycenter
- *  of the points and is orthogonal to the eigenvector corresponding to the
- *  smallest eigenvalue.
- *
- *  Point are fitted to this approximation by projecting them orthogonally onto
- *  the weighted least-squares plane.
- *  
- *  This class requires the eigenvector solvers of \ref thirdpartyEigen version
- *  3.1.2 (or greater).
- *
- *  \tparam Kernel the geometric traits class of the input and output. It
- *  must have a `RealEmbeddable` field number type.
- *
- *  \note Irrespective of the geometric traits class, the approximation is
- *  always estimated up to double precision.
- *
- *  \cgalModels `WeightedApproximation_3`
- */
-template < class Kernel >
-class Weighted_PCA_approximation_3 {
-public:
-	typedef typename Kernel::FT                         FT;
-	typedef typename Kernel::Point_3                    Point;
-
-private:
-    typedef Eigen::Matrix<double, 3, Eigen::Dynamic>	Matrix3D;       // 3-by-dynamic double-value matrix.
-    typedef Eigen::Array<double, 1, Eigen::Dynamic>		Array1D;        // 1-by-dynamic double-value array.
-    typedef Eigen::Matrix3d								Matrix3;        // 3-by-3 double-value matrix.
-    typedef Eigen::Vector3d								Vector3;        // 3-by-1 double-value matrix.
-    typedef Eigen::SelfAdjointEigenSolver< Matrix3 >    EigenSolver;    // Eigen value decomposition solver.
-
-private:
-    bool _comp;        // Whether the eigenvalues are computed.
-
-    Matrix3D _pts;  // points.
-    Array1D _wts;   // weights.
-
-    Vector3 _bary;  // barycenter.
-    Vector3 _norm;  // normal.
-
-public:
-    // constructs an default approximation to hold the points.
-    /*  \param size is the number of points that will be added.
-     */
-    Weighted_PCA_approximation_3( unsigned int size ): _comp(false), _pts(3,size), _wts(1,size) {}
-
-    // computes the weighted least-squares planar approximation of a point set.
-    /*  Similar to constructing an empty projection and calling
-     *  <code>[set_points(points_begin, points_end, weights_begin)](\ref WeightedApproximation_3::set_points )</code>
-     *
-     *  \tparam PointIterator is an input iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *  \tparam WeightIterator is an input iterator over the collection of
-     *  weights. The value type of the iterator must be an `FT`.
-     *
-     *  \param points_begin is an iterator to the first point.
-     *  \param points_end is a past-the-end oterator for the points.
-     *  \param weights_begin is an iterator to the weight of the first point.
-     */
-    template < typename PointIterator, typename WeightIterator >
-    Weighted_PCA_approximation_3( PointIterator points_begin, PointIterator points_end, WeightIterator weights_begin )
-    : _comp(false) {
-        std::size_t size = std::distance( points_begin, points_end );
-        _pts = Matrix3D(3,size);
-        _wts = Array1D(1,size);
-        set_points( points_begin, points_end, weights_begin );
-    }
-
-public:
-    // sets a weighted point in the collection.
-    void set_point( unsigned int i, const Point& p, const FT& w ) {
-        _pts( 0, i ) = CGAL::to_double( p[0] );
-        _pts( 1, i ) = CGAL::to_double( p[1] );
-        _pts( 2, i ) = CGAL::to_double( p[2] );
-        _wts( i ) = CGAL::to_double( w );
-        _comp = false;
-    }
-
-    // sets the weighted points and compute PCA.
-    template < typename PointIterator, typename WeightIterator >
-    bool set_points( PointIterator points_begin, PointIterator points_end, WeightIterator weights_begin ) {
-        for( unsigned int column = 0; points_begin != points_end; ++column, ++points_begin, ++weights_begin ) {
-            _pts( 0, column ) = CGAL::to_double( (*points_begin)[0] );
-            _pts( 1, column ) = CGAL::to_double( (*points_begin)[1] );
-            _pts( 2, column ) = CGAL::to_double( (*points_begin)[2] );
-            _wts( column ) = CGAL::to_double( *weights_begin );
-        }
-        return compute();
-    }
-    
-    // gives the size of the weighted point set.
-    std::size_t size() const { return _pts.cols(); }
-    
-    // compute weighted PCA.
-    bool compute() {
-        // Construct the barycenter.
-        _bary = ( _pts.array().rowwise() * _wts ).rowwise().sum() / _wts.sum();
-			
-        // Replace the points by their difference with the barycenter.
-        _pts = ( _pts.colwise() - _bary ).array().rowwise() * _wts;
-
-        // Construct the weighted covariance matrix.
-        Matrix3 covar = Matrix3::Zero();
-        for( int column = 0; column < _pts.cols(); ++column )
-            covar += _wts.matrix()(column) * _pts.col(column) * _pts.col(column).transpose();
-
-        // Construct the Eigen system.
-        EigenSolver solver( covar );
-
-        // If the Eigen system does not converge, the vertex is not moved.
-        if( solver.info() != Eigen::Success )
-            return false;
-
-        // Find the Eigen vector with the smallest Eigen value.
-        std::ptrdiff_t index;
-        solver.eigenvalues().minCoeff( &index );
-        if( solver.eigenvectors().col( index ).imag() != Vector3::Zero() ) {
-            // This should actually never happen,
-            // because the covariance matrix is symmetric!
-            CGAL_assertion( false );
-            return false;
-        }
-
-        // The normal is the Eigen vector with smallest Eigen value.
-        _norm = solver.eigenvectors().col( index ).real();
-        _comp = true;
-        return true;
-    }
-    
-    // checks whether the weighted least-squares approximating plane has been computed.
-    bool is_computed() const { return _comp; }
-    
-public:
-    // projects a point onto the weighted PCA plane.
-    Point fit( const Point& p ) {
-        CGAL_assertion( _comp );
-        // The point is moved by projecting it onto the plane through the
-        // barycenter and orthogonal to the normal.
-        Vector3 to_p = Vector3( to_double( p[0] ),
-                                to_double( p[1] ),
-                                to_double( p[2] ) ) - _bary;
-        Vector3 proj = _bary + to_p - ( _norm.dot(to_p) * _norm );
-        return Point( proj(0), proj(1), proj(2) );
-    }
-}; // class Weighted_PCA_approximation_3
-
-} // namespace CGAL
-
-#endif // CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_surface_reconstruction_3.h b/3rdparty/CGAL-4.6/include/CGAL/Scale_space_surface_reconstruction_3.h
deleted file mode 100644
index f0e01b8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_surface_reconstruction_3.h
+++ /dev/null
@@ -1,890 +0,0 @@
-//Copyright (C) 2014  INRIA - Sophia Antipolis
-//
-//This program is free software: you can redistribute it and/or modify
-//it under the terms of the GNU General Public License as published by
-//the Free Software Foundation, either version 3 of the License, or
-//(at your option) any later version.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License
-//along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-// Author(s):      Thijs van Lankveld
-
-#ifndef CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
-#define CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
-
-#include <iostream>
-#include <list>
-#include <map>
-#include <vector>
-
-#include <boost/iterator/transform_iterator.hpp>
-
-#include <CGAL/utility.h>
-#include <CGAL/is_iterator.h>
-#include <CGAL/Default.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_incremental_neighbor_search.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Random.h>
-
-#include <CGAL/Scale_space_reconstruction_3/Shape_construction_3.h>
-
-#ifdef CGAL_EIGEN3_ENABLED
-#include <CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h>
-#endif // CGAL_EIGEN3_ENABLED
-
-#include <boost/mpl/and.hpp>
-
-namespace CGAL {
-
-/// computes a triangulated surface mesh interpolating a point set.
-/** \ingroup PkgScaleSpaceReconstruction3Classes
- *  This class stores several of the (intermediate) results. This makes it
- *  easier and more efficient to adjust the parameter settings based on
- *  preliminary results, or to further increase the scale to improve the
- *  results. The class stores the point set at the current scale and the
- *  reconstructed surface, possibly with iterators over the shells.
- *
- *  The class also stores the parameters for estimating the optimal
- *  neighborhood radius and either the lastest estimate or the manually set
- *  radius. This way, the radius can be estimated (again) whenever necessary.
- *  Also note that both increasing the scale and reconstructing the
- *  surface use this radius. By changing or re-estimating the radius between
- *  these operations, they can use separate parameter settings.
- *
- *  The surface can be constructed either for a fixed neighborhood radius, or
- *  for a dynamic radius. When constructing the surface for exactly one
- *  neighborhood radius, it is faster to set `FS` to `Tag_true`. If
- *  the correct neighborhood radius should be changed or estimated multiple
- *  times, it is faster to set `FS` to `Tag_false`.
- *
- *  It is undefined whether a surface with fixed radius may have its radius
- *  changed, but if so, this will likely require more computation time than
- *  changing the radius of a dynamic surface. In either case, it is possible to
- *  change the point set while maintaining the same radius.
- *
- *  The surface can be stored either as an unordered collection of triangles, 
- *  or as a collection ordered by shells. A shell is a maximally connected
- *  component of the surface where connected facets are locally oriented
- *  towards the same side of the surface.
- *  
- *  \tparam Gt is the geometric traits class. It must be a model of
- *  `DelaunayTriangulationTraits_3`. It must have a `RealEmbeddable` field
- *  number type. Generally, `Exact_predicates_inexact_constructions_kernel` is
- *  preferred.
- *  \tparam FS determines whether the surface is expected to be constructed
- *  for a fixed neighborhood radius. It must be a `Boolean_tag` type. The default value is
- *  `Tag_true`. Note that the value of this parameter does not change the result but
- *  only has an impact on the run-time.
- *  \tparam Sh determines whether to collect the surface per shell. It
- *  must be a `Boolean_tag` type. The default value is `Tag_true`.
- *  \tparam wA must be a model of `WeightedPCAProjection_3` and determines how
- *  to approximate a weighted point set. If \ref thirdpartyEigen 3.1.2 (or
- *  greater) is available and CGAL_EIGEN3_ENABLED is defined, then
- *  `Weighted_PCA_approximation_3<DelaunayTriangulationTraits_3>` is used by default.
- *  \tparam Ct indicates whether to use concurrent processing. It must be
- *  either `Sequential_tag` or `Parallel_tag` (the default value).
- */
-template < class Gt, class FS = Tag_true, class Sh = Tag_true, class wA = Default, class Ct = Parallel_tag >
-class Scale_space_surface_reconstruction_3 {
-    typedef typename Default::Get< wA,
-#ifdef CGAL_EIGEN3_ENABLED
-                                   Weighted_PCA_approximation_3<Gt>
-#else // CGAL_EIGEN3_ENABLED
-                                   void
-#endif // CGAL_EIGEN3_ENABLED
-                                 >::type                Approximation;
-
-private:
-    // Searching for neighbors.
-    typedef Search_traits_3< Gt >                       Search_traits;
-    typedef Orthogonal_k_neighbor_search< Search_traits >
-                                                        Static_search;
-    typedef Orthogonal_incremental_neighbor_search< Search_traits >
-                                                        Dynamic_search;
-    typedef typename Dynamic_search::Tree               Search_tree;
-
-    typedef CGAL::Random                                Random;
-
-    // Constructing the surface.
-    typedef CGAL::Shape_construction_3< Gt, FS >        Shape_construction_3;
-
-    typedef typename Shape_construction_3::Shape           Shape;
-    typedef typename Shape_construction_3::Triangulation   Triangulation;
-
-    typedef typename Shape::Vertex_handle               Vertex_handle;
-    typedef typename Shape::Cell_handle                 Cell_handle;
-    typedef typename Shape::Facet                       Facet;
-    
-    typedef typename Shape::Vertex_iterator             Vertex_iterator;
-    typedef typename Shape::Cell_iterator               Cell_iterator;
-    typedef typename Shape::Facet_iterator              Facet_iterator;
-    typedef typename Shape::Edge_iterator               Edge_iterator;
-
-    typedef typename Shape::Finite_facets_iterator      Finite_facets_iterator;
-    typedef typename Shape::Finite_facets_iterator      Finite_vertices_iterator;
-
-    typedef typename Shape::All_cells_iterator          All_cells_iterator;
-
-    typedef typename Shape::Classification_type         Classification_type;
-    
-public:
-/// \name Types
-/// \{
-    typedef typename Gt::FT                             FT;             ///< defines the field number type.
-	typedef typename Gt::Point_3                        Point;          ///< defines the point type.
-
-#ifdef DOXYGEN_RUNNING
-    typedef unspecified_type                            Point_iterator;         ///< defines an iterator over the points.
-    typedef const unspecified_type                      Point_const_iterator;   ///< defines a constant iterator over the points.
-#else // DOXYGEN_RUNNING
-
-    typedef typename Search_tree::iterator              Point_iterator;
-    typedef typename Search_tree::const_iterator        Point_const_iterator;
-#endif // DOXYGEN_RUNNING
-
-    typedef CGAL::cpp11::array< unsigned int, 3 >       Triple;                 ///< defines a triple of point indices indicating a triangle of the surface.
-private:
-    typedef std::list< Triple >                         Tripleset;              ///< defines a collection of triples.
-    // Note that this is a list for two reasons: iterator validity for the shell iterators, and memory requirements for the expected huge collections.
-
-public:
-#ifdef DOXYGEN_RUNNING
-    typedef unspecified_type                            Triple_iterator;        ///< defines an iterator over the triples.
-    typedef const unspecified_type                      Triple_const_iterator;  ///< defines a constant iterator over the triples.
-#else // DOXYGEN_RUNNING
-    typedef Tripleset::iterator                         Triple_iterator;
-    typedef Tripleset::const_iterator                   Triple_const_iterator;
-#endif // DOXYGEN_RUNNING
-
-/// \}
-
-private:
-    typedef std::vector< Triple_iterator >              TripleIterSet;
-    
-private:
-    class Finite_point_iterator;
-    class In_surface_tester;
-    typedef Filter_iterator< Facet_iterator, In_surface_tester >
-                                                    Surface_facets_iterator;
-
-    // Parallel processing functors.
-    class ComputeNN;
-    class AdvanceSS;
-
-private:
-    Search_tree     _tree;              // To quickly search for nearest neighbors.
-
-	Random          _generator;         // For sampling random points.
-
-    unsigned int    _mean_neighbors;    // The number of nearest neighbors in the mean neighborhood.
-    unsigned int    _samples;           // The number of sample points for estimating the neighborhood radius.
-
-    FT              _squared_radius;    // The squared neighborhood radius.
-
-    // The shape must be a pointer, because the alpha of a Fixed_alpha_shape_3
-    // can only be set at construction and its assignment operator is private.
-    // We want to be able to set the alpha after constructing the scale-space
-    // reconstructer object.
-	Shape*          _shape;
-
-    // The surface. If the surface is collected per shell, the triples of the
-    // same shell are stored consecutively.
-    Tripleset       _surface;
-
-    // The shells can be accessed through iterators to the surface.
-    TripleIterSet   _shells;
-
-    typedef std::vector<Point> Pointset;
-    Pointset _points;
-
-public:
-/// \name Constructors
-/// \{
-    /// constructs a surface reconstructor that will automatically estimate the neighborhood radius.
-    /** \param neighbors is the number of neighbors a point's neighborhood should
-     *  contain on average.
-     *  \param samples is the number of points sampled to estimate the
-     *  neighborhood radius.
-     */
-	Scale_space_surface_reconstruction_3( unsigned int neighbors, unsigned int samples );
-
-    /// constructs a surface reconstructor with a given neighborhood radius.
-    /** \param sq_radius is the squared radius of the neighborhood.
-     *
-     *  \pre `sq_radius` is not negative.
-     */
-	Scale_space_surface_reconstruction_3( FT sq_radius );
-
-/// \}
-	~Scale_space_surface_reconstruction_3() { deinit_shape(); }
-
-private:
-    void deinit_shape() { if( _shape != 0 ) { delete _shape; _shape = 0; } }
-
-    void clear_tree() { _tree.clear(); }
-	void clear_surface() { _shells.clear(); _surface.clear(); deinit_shape(); }
-    
-    // SURFACE COLLECTION
-	// Once a facet is added to the surface, it is marked as handled.
-	bool is_handled( Cell_handle c, unsigned int li ) const;
-	inline bool is_handled( const Facet& f ) const { return is_handled( f.first, f.second ); }
-	void mark_handled( Cell_handle c, unsigned int li );
-	inline void mark_handled( Facet f ) { mark_handled( f.first, f.second ); }
-    
-    // Get the indices of the points of the facet ordered to point
-    // towardds the outside of the shape.
-    Triple ordered_facet_indices( const Facet& f ) const;
-
-    //  Collect the triangles of one shell of the surface.
-	void collect_shell( Cell_handle c, unsigned int li );
-
-    //  Collect the triangles of one shell of the surface.
-	void collect_shell( const Facet& f ) {
-		collect_shell( f.first, f.second );
-	}
-
-    //  Collect the triangles of the complete surface.
-	void collect_facets( Tag_true );
-	void collect_facets( Tag_false );
-    void collect_facets() { 
-        if( !has_neighborhood_squared_radius() )
-            estimate_neighborhood_squared_radius();
-        collect_facets( Sh() );
-    }
-
-private:
-    //  Get the shape of the scale space.
-    /*  If the shape does not exist, it is  constructed first.
-     *  \return the shape of the scale space.
-     */
-    const Shape& shape() const;
-
-public:
-/// \name Point Set Manipulation
-/// \{
-    /// inserts a collection of points into the scale-space at the current scale.
-    /** \tparam InputIterator is an iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *
-     *  \note Inserting the points does not automatically construct or
-     *  update the surface.
-     *
-     *  \note In order to construct the surface, call
-     *  `reconstruct_surface()` after inserting the points.
-     *
-     *  \warning Inserting new points may invalidate the neighborhood radius if
-     *  it was previously estimated.
-     *
-     *  \sa `insert(const Point& p)`.
-     */
-	template < class InputIterator >
-#ifdef DOXYGEN_RUNNING
-	void insert( InputIterator begin, InputIterator end ) {
-#else // DOXYGEN_RUNNING
-	void insert( InputIterator begin, InputIterator end,
-                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
-#endif // DOXYGEN_RUNNING
-		_tree.insert( begin, end );
-                _points.insert(_points.end(), begin, end);
-	}
-    
-    /// inserts a point into the scale-space at the current scale.
-    /** \param p is the point to insert.
-     *
-     *  \note Inserting the point does not automatically construct or
-     *  update the surface.
-     *
-     *  \note In order to construct the surface, call
-     *  `#reconstruct_surface()`.
-     *
-     *  \warning Inserting a new point may invalidate the neighborhood radius
-     *  if it was previously estimated.
-     *
-     *  \sa `insert(InputIterator begin, InputIterator end)`.
-     */
-	void insert( const Point& p ) {
-		_tree.insert( p );
-                _points.push_back(p);
-	}
-    
-    /// clears the stored scale-space surface reconstruction data.
-    /** This includes discarding the surface, the scale-space and all its
-     *  points, and any estimation of the neighborhood radius. 
-     *
-     *  Methods called after this point may have to re-estimate the
-     *  neighborhood radius. This method does not discard the parameters for
-     *  estimating this radius (the mean number of neighbors and the sample
-     *  size).
-     */
-    void clear() {
-		clear_tree();
-        clear_surface();
-        _squared_radius = -1;
-    }
-
-/// \}
-    
-private:
-    //  checks whether the shape has been constructed.
-    /*  The shape contains the structure of the point cloud.
-     *
-     *  Until the shape is constructed, the surface is undefined.
-     *  \return true if the shape exists and false otherwise.
-     *  \sa construct_shape(InputIterator begin, InputIterator end).
-     */
-	bool has_shape() const { return _shape != 0; }
-
-public:
-/// \name Neighborhood Size Estimation
-/// \{
-    /// estimates the neighborhood radius.
-    /** This method is equivalent to running
-     *  <code>[estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() )](\ref estimate_neighborhood_squared_radius)</code>.
-     *
-     *  This method can be called by the scale-space and surface construction
-     *  methods if the neighborhood radius is not set when they are called.
-     *
-     *  \return the estimated neighborhood radius.
-     *
-     *  \note This method processes the point set at the current scale. The
-     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
-     *
-     *  \warning If the surface was already constructed, estimating the
-     *  neighborhood radius will automatically adjust the surface.
-     *
-     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
-     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
-     *  \sa `estimate_neighborhood_squared_radius(unsigned int neighbors, unsigned int samples)`.
-     *  \sa `increase_scale(unsigned int iterations)`.
-     *  \sa `reconstruct_surface()`.
-     */
-    inline FT estimate_neighborhood_squared_radius() {
-        return estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() );
-    }
-
-    /// estimates the neighborhood radius based on a number of sample points.
-    /** The neighborhood radius is expressed as the radius of the smallest ball
-     *  centered on a point such that the ball contains at least a specified
-     *  number of points, not counting the point itself.
-     *
-     *  The neighborhood radius is set to the mean of these radii, taken over a
-     *  number of point samples.
-     *
-     *  \param neighbors is the number of neighbors a point's neighborhood
-     *  should contain on average, not counting the point itself.
-     *  \param samples is the number of points sampled to estimate the
-     *  neighborhood radius.
-     *  \return the estimated neighborhood radius.
-     *
-     *  \note This method processes the point set at the current scale. The
-     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
-     *
-     *  \warning If the surface was already constructed, estimating the
-     *  neighborhood radius will automatically adjust the surface.
-     *
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     */
-	FT estimate_neighborhood_squared_radius( unsigned int neighbors, unsigned int samples );
-
-
-    /// sets the squared radius of the neighborhood.
-    /** The neighborhood radius is used by
-     *  `#[increase_scale()` to
-     *  compute the point set at the desired scale and by
-     *  `reconstruct_surface()` to
-     *  construct a surface from the point set at the current scale.
-     *
-     *  \param sq_radius is the squared radius of the neighborhood.
-     *
-     *  \note If the neighborhood squared radius is negative when the point set
-     *  is smoothed or when the surface is computed, the neighborhood radius
-     *  will be computed automatically.
-     *
-     *  \warning If the surface was already constructed, changing the
-     *  neighborhood radius will automatically adjust the surface.
-     *
-     *  \sa `neighborhood_squared_radius()`.
-     *  \sa `has_neighborhood_squared_radius()`.
-     *  \sa `increase_scale(unsigned int iterations)`.
-     *  \sa `reconstruct_surface()`.
-     */
-    void set_neighborhood_squared_radius( const FT& sq_radius ) {
-        _squared_radius = sq_radius;
-		if( has_neighborhood_squared_radius() && has_shape() )
-            Shape_construction_3().change_scale( _shape, _squared_radius );
-    }
-
-    /// gives the squared radius of the neighborhood.
-    /** The neighborhood radius is used by
-     *  `#increase_scale()` to
-     *  compute the point set at the desired scale and by
-     *  `#reconstruct_surface()` to
-     *  construct a surface from the point set at the current scale.
-     *
-     *  \return the squared radius of the neighborhood, or -1 if the
-     *  neighborhood radius has not yet been set.
-     *
-     *  \sa `increase_scale(unsigned int iterations)`.
-     *  \sa `reconstruct_surface()`.
-     */
-    FT neighborhood_squared_radius() const { return _squared_radius; }
-
-    /// checks whether the neighborhood radius has been set.
-    /** The radius can be set manually, or estimated automatically.
-     *
-     *  \return `true` iff the radius has been either set manually or estimated.
-     *
-     *  \sa `set_neighborhood_squared_radius()`.
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     */
-    bool has_neighborhood_squared_radius() const {
-        return sign( _squared_radius ) == POSITIVE;
-    }
-    
-    /// \cond internal_doc
-    /// estimates the neighborhood radius of a collection of points.
-    /** This method is equivalent to running
-     *  `clear()` followed by
-     *  <code>[insert(begin, end)](\ref insert)</code> and
-     *  finally <code>[estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() )](\ref estimate_neighborhood_squared_radius)</code>.
-     *
-     *  This method can be called by the scale-space and surface construction
-     *  methods if the neighborhood radius is not set when they are called.
-     *
-     *  \tparam InputIterator is an iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *  \return the estimated neighborhood radius.
-     *
-     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
-     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     *  \sa `insert(InputIterator begin, InputIterator end)`.
-     */
-	template < class InputIterator >
-#ifdef DOXYGEN_RUNNING
-    FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end ) {
-#else // DOXYGEN_RUNNING
-    FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end,
-                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
-#endif // DOXYGEN_RUNNING
-        return estimate_neighborhood_squared_radius( begin, end, mean_number_of_neighbors(), neighborhood_sample_size() );
-    }
-    /// \endcond
-
-    /// \cond internal_doc
-    /// estimates the neighborhood radius of a collection of points based on a number of sample points.
-    /** The neighborhood radius is expressed as the radius of the smallest ball
-     *  centered on a point such that the ball contains at least a specified
-     *  number of points, not counting the point itself.
-     *
-     *  The neighborhood radius is set to the mean of these radii, taken over a
-     *  number of point samples.
-     *  
-     *  This method is equivalent to running
-     *  `clear()` followed by
-     *  <code>[insert(begin, end)](\ref insert)</code> and finally
-     *  <code>[estimate_neighborhood_squared_radius(neighbors, samples)](\ref estimate_neighborhood_squared_radius)</code>.
-     *
-     *  \tparam InputIterator is an iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *  \param neighbors is the number of neighbors a point's neighborhood
-     *  should contain on average, not counting the point itself.
-     *  \param samples is the number of points sampled to estimate the
-     *  neighborhood radius.
-     *  \return the estimated neighborhood radius.
-     *
-     *  \sa `estimate_neighborhood_squared_radius(unsigned int neighbors, unsigned int samples)`.
-     */
-	template < class InputIterator >
-#ifdef DOXYGEN_RUNNING
-	FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples );
-#else // DOXYGEN_RUNNING
-	FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples,
-                                         typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL);
-#endif // DOXYGEN_RUNNING
-    /// \endcond
-/// \}
-
-/// \name Neighborhood Size Estimation Parameters
-/// \{
-    /// gives the mean number of neighbors an estimated neighborhood should contain.
-    /** This number is only used if the neighborhood radius has not been set
-     *  manually.
-     *
-     *  When the neighborhood radius is estimated, it should on average contain
-     *  this many neighbors, not counting the neighborhood center.
-     *
-     *  \return the number of neighbors a neighborhood ball centered on a point
-     *  should contain on average when the radius is estimated, not counting
-     *  the point itself.
-     *
-     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
-     *  \sa `has_neighborhood_squared_radius()`.
-     *  \sa `neighborhood_sample_size()`.
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     */
-    unsigned int mean_number_of_neighbors() const { return _mean_neighbors; }
-
-    /// gives the number of sample points the neighborhood estimation uses.
-    /** This number is only used if the neighborhood radius has not been set
-     *  manually.
-     *
-     *  If the number of samples is larger than the point cloud, every point is
-     *  used and the optimal neighborhood radius is computed exactly instead of
-     *  estimated.
-     *
-     *  \return the number of points sampled for neighborhood estimation.
-     *
-     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
-     *  \sa `has_neighborhood_squared_radius()`.
-     *  \sa `mean_number_of_neighbors()`.
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     */
-    unsigned int neighborhood_sample_size() const { return _samples; }  
-
-    /// sets the mean number of neighbors an estimated neighborhood should contain.
-    /** This number is only used if the neighborhood radius has not been set
-     *  manually.
-     *
-     *  When the neighborhood radius is estimated, it should on average contain
-     *  this many neighbors, not counting the neighborhood center.
-     *
-     *  \param neighbors is the number of neighbors a neighborhood ball centered on a point
-     *  should contain on average when the radius is estimated, not counting
-     *  the point itself.
-     *
-     *  \note This does not start the estimation process.
-     *
-     *  \sa `mean_number_of_neighbors()`.
-     *  \sa `has_neighborhood_squared_radius()`.
-     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
-     */
-    void set_mean_number_of_neighbors( unsigned int neighbors ) { _mean_neighbors = neighbors; }
-    
-    /// sets the number of sample points the neighborhood estimation uses.
-    /** This number is only used if the neighborhood radius has not been set
-     *  manually.
-     *
-     *  If the number of samples is larger than the point cloud, every point is
-     *  used and the optimal neighborhood radius is computed exactly instead of
-     *  estimated.
-     *
-     *  \param samples is the number of points to sample for neighborhood
-     *  estimation.
-     *
-     *  \note This does not start the estimation process.
-     *
-     *  \sa `neighborhood_sample_size()`.
-     *  \sa `has_neighborhood_squared_radius()`.
-     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     */
-    void set_neighborhood_sample_size( unsigned int samples ) { _samples = samples; }
-/// \}
-
-/// \name Scale-Space Manipulation
-/// \{
-    /// increases the scale by a number of iterations.
-    /** Each iteration the scale is increased, the points set at a higher scale
-     *  is computed. At a higher scale, the points set is smoother.
-     *
-     *  If the neighborhood radius has not been set before, it is automatically
-     *  estimated using `estimate_neighborhood_squared_radius()`.
-     *
-     *  \param iterations is the number of iterations to perform. If
-     *  `iterations` is 0, nothing happens.
-     *
-     *  \note This method processes the point set at the current scale. The
-     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
-     *
-     *  \note If the surface was already constructed, increasing the scale
-     *  will not automatically adjust the surface.
-     *
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     *  \sa `reconstruct_surface()`.
-     */
-	void increase_scale( unsigned int iterations = 1 );
-
-    /// \cond internal_doc
-    /// constructs a scale-space of a collection of points.
-    /** If the neighborhood radius has not been set before, it is automatically
-     *  estimated using `estimate_neighborhood_squared_radius()`.
-     *
-     *  This method is equivalent to running
-     *  `clear()` followed by
-     *  <code>[insert(begin, end)](\ref insert)</code> and finally
-     *  <code>[increase_scale(iterations)](\ref increase_scale)</code>.
-     *
-     *  \tparam InputIterator is an iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *  \param iterations is the number of iterations to perform. If
-     *  `iterations` is 0, nothing happens.
-     *
-     *  \sa `insert(InputIterator begin, InputIterator end)`.
-     *  \sa `estimate_neighborhood_squared_radius(InputIterator begin, InputIterator end)`.
-     *  \sa `increase_scale(unsigned int iterations)`.
-     *  \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
-     */
-	template < class InputIterator >
-	void construct_scale_space( InputIterator begin, InputIterator end, unsigned int iterations = 1,
-                                    typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
-        clear();
-		insert( begin, end );
-		increase_scale( iterations );
-	}
-    ///\endcond
-
-/// \}
-private:
-    // constructs the scale-space from a triangulation.
-    void construct_scale_space( Triangulation& tr ) {
-        insert( tr.finite_vertices_begin(), tr.finite_vertices_end() );
-    }
-
-    // tries to perform a functor in parallel.
-    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end, Sequential_tag ) const;
-    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end, Parallel_tag ) const;
-    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end ) const { try_parallel( func, begin, end, Ct() );}
-    
-private:
-/// \name Shape
-/// \{
-    /// constructs the shape of the points at a fixed scale.
-    /** The shape contains geometric and connectivity information
-     *  of the scale space.
-     *
-     *  If the neighborhood radius has not been set before, it is automatically
-     *  estimated.
-     */
-    void construct_shape() {
-		construct_shape( points_begin(), points_end() );
-    }
-    
-    /// constructs the shape from an existing triangulation.
-    /** The shape contains geometric and connectivity information
-     *  of the scale space.
-     *
-     *  \param tr is the triangulation to construct the shape of.
-     *
-     *  \note This does not set the current scale-space.
-     *  To set this as well, use `construct_scale_space(Triangulation& tr)`.
-     *
-     *  \note If the neighborhood radius has not been set before, it is automatically
-     *  estimated.
-     */
-    void construct_shape(Triangulation& tr ) {
-        deinit_shape();
-        if( !has_neighborhood_squared_radius() )
-            estimate_neighborhood_squared_radius();
-        _shape = Shape_construction_3()( *tr, _squared_radius );
-	}
-
-    /// constructs the shape from a collection of points.
-    /** The shape contains geometric and connectivity information
-     *  of the scale space.
-     *
-     *  \tparam InputIterator is an iterator over the point sample.
-     *  The value type of the iterator must be a `Point`.
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *
-     *  \note This does not set the current scale-space.
-     *  To set this as well, use `insert( InputIterator begin, InputIterator end )`.
-     *
-     *  \note If the neighborhood radius has not been set before, it is automatically
-     *  estimated.
-     *
-     *  \sa `is_constructed()`.
-     */
-	template < class InputIterator >
-#ifdef DOXYGEN_RUNNING
-	void construct_shape( InputIterator begin, InputIterator end );
-#else // DOXYGEN_RUNNING
-	void construct_shape( InputIterator begin, InputIterator end,
-                              typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL );
-#endif // DOXYGEN_RUNNING
-    
-    // collects the surface mesh from the shape.
-    // If the sahep does not yet exist, it is constructed.
-    void collect_surface();
-
-/// \}
-
-public:
-/// \name Surface Reconstruction
-/// \{
-    /// constructs a triangle mesh from the point set at a fixed scale.
-    /** The order of the points at the current scale is the same as the order
-     *  at the original scale, meaning that the surface can interpolate the
-     *  point set at the original scale by applying the indices of the surface
-     *  triangles to the original point set.
-     *
-     *  After construction, the triangles of the surface can be iterated using
-     *  `surface_begin()` and `surface_end()`.
-     *
-     *  If the neighborhood radius has not been set before, it is automatically
-     *  estimated using `estimate_neighborhood_squared_radius()`.
-     *
-     *  \note This method processes the point set at the current scale. The
-     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
-     *
-     *  \sa `estimate_neighborhood_squared_radius()`.
-     *  \sa `increase_scale(unsigned int iterations)`.
-     */
-        void reconstruct_surface()
-        {
-          reconstruct_surface(0);
-        }
-
-    /// gives the number of triangles of the surface.
-    std::size_t number_of_triangles() const { return _surface.size(); }
-    
-    /// gives the number of points of the surface.
-    std::size_t number_of_points() const { return _tree.size(); }
-
-
-    /// gives the number of shells of the surface.
-    std::size_t number_of_shells() const {
-        CGAL_assertion( Sh::value == true );
-        return _shells.size();
-    }
-
-    /// \cond internal_doc
-        void reconstruct_surface( unsigned int iterations);
-    /// \endcond
-
-    /// \cond internal_doc
-    /// constructs a surface mesh from a collection of points at a fixed scale.
-    /** This method is equivalent to running
-     *  `clear()` followed by
-     *  <code>[insert(begin, end)](\ref insert)</code> and finally
-     *  <code>[reconstruct_surface(iterations)](\ref reconstruct_surface)</code>.
-     *
-     *  If the neighborhood radius has not been set before, it is automatically
-     *  estimated using `estimate_neighborhood_squared_radius()`.
-     *
-     *  \tparam InputIterator is an iterator over the point collection.
-     *  The value type of the iterator must be a `Point`.
-     *
-     *  \param begin is an iterator to the first point of the collection.
-     *  \param end is a past-the-end iterator for the point collection.
-     *  \param iterations is the number of scale increase iterations to apply.
-     *  If `iterations` is 0, the point set at the current scale is used.
-     *  
-     *  \sa `reconstruct_surface(unsigned int iterations)`.
-     *  \sa `insert(InputIterator begin, InputIterator end)`.
-     *  \sa `estimate_neighborhood_squared_radius(InputIterator begin, InputIterator end)`.
-     *  \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
-     */
-	template < class InputIterator >
-#ifdef DOXYGEN_RUNNING
-	void reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations = 0 );
-#else // DOXYGEN_RUNNING
-	void reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations = 0,
-                                  typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL );
-#endif // DOXYGEN_RUNNING
-    /// \endcond
-/// \}
-
-public:
-/// \name Iterators
-/// \{
-    /// gives an iterator to the first point at the current scale.
-    Point_const_iterator points_begin() const { return _points.begin(); }
-    /// gives an iterator to the first point at the current scale.
-    /** \warning Changes to the scale-space do not cause an automatic update to
-     *  the surface.
-     */
-    Point_iterator points_begin() { return _points.begin(); }
-
-    /// gives a past-the-end iterator of the points at the current scale.
-    Point_const_iterator points_end() const { return _points.end(); }
-    /// gives a past-the-end iterator of the points at the current scale.
-    /** \warning Changes to the scale-space do not cause an automatic update to
-     *  the surface.
-     */
-    Point_iterator points_end() { return _points.end(); }
-
-    /// gives an iterator to the first triple in the surface.
-    Triple_const_iterator surface_begin() const { return _surface.begin(); }
-    /// gives an iterator to the first triple in the surface.
-    /** \warning Changes to the surface may change its topology.
-     */
-    Triple_iterator surface_begin() { return _surface.begin(); }
-    
-    /// gives a past-the-end iterator of the triples in the surface.
-    Triple_const_iterator surface_end() const { return _surface.end(); }
-    /// gives a past-the-end iterator of the triples in the surface.
-    /** \warning Changes to the surface may change its topology.
-     */
-    Triple_iterator surface_end() { return _surface.end(); }
-
-    /// gives an iterator to the first triple in a given shell.
-    /** \param shell is the index of the shell to access.
-     *
-     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
-     */
-    Triple_const_iterator shell_begin( std::size_t shell ) const;
-    /// gives an iterator to the first triple in a given shell.
-    /** \param shell is the index of the shell to access.
-     *
-     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
-     *
-     *  \warning Changes to a shell may invalidate the topology of the surface.
-     */
-    Triple_iterator shell_begin( std::size_t shell );
-
-    /// gives a past-the-end iterator of the triples in a given shell.
-    /** \param shell is the index of the shell to access.
-     *
-     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
-     */
-    Triple_const_iterator shell_end( std::size_t shell ) const;
-
-    /// gives a past-the-end iterator of the triples in a given shell.
-    /** \param shell is the index of the shell to access.
-     *
-     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
-     *
-     *  \warning Changes to a shell may invalidate the topology of the surface.
-     */
-    Triple_iterator shell_end( std::size_t shell );
-
-/// \}
-}; // class Scale_space_surface_reconstruction_3
-
-} // namespace CGAL
-
-template< typename T >
-std::ostream&
-operator<<( std::ostream& os, const CGAL::cpp11::array< T, 3 >& t ) {
-    return os << t[0] << " " << t[1] << " " << t[2];
-}
-
-template< typename T >
-std::istream&
-operator>>( std::istream& is, CGAL::cpp11::array< T, 3 >& t ) {
-    return is >> get<0>(t) >> get<1>(t) >> get<2>(t);
-}
-
-#include <CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h>
-
-#endif // CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_adapter.h b/3rdparty/CGAL-4.6/include/CGAL/Search_traits_adapter.h
deleted file mode 100644
index 3a04488..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_adapter.h
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot
-
-#ifndef CGAL_SEARCH_TRAITS_WITH_INFO
-#define CGAL_SEARCH_TRAITS_WITH_INFO
-
-#include <CGAL/Kd_tree_rectangle.h>
-#include <CGAL/Euclidean_distance.h> //for default distance specialization
-#include <CGAL/property_map.h>
-
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace CGAL{
-
-using ::get;
-  
-template <class Point_with_info,class PointPropertyMap,class Base_traits>
-class Search_traits_adapter;
-  
-template <class Point_with_info,class PointPropertyMap,class Base_distance>
-class Distance_adapter;
-  
-namespace internal{
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_typedef_Iso_box_d,Iso_box_d,false)
-
-template <class T,bool Has_iso_box_d=Has_typedef_Iso_box_d<T>::value >
-struct Get_iso_box_d;
-
-template <class T>
-struct Get_iso_box_d<T,false>
-{
-  typedef void type;
-};
-
-template <class T>
-struct Get_iso_box_d<T,true>
-{
-  typedef typename T::Iso_box_d type;
-};
-  
-  template <class Point_with_info,class PointPropertyMap,class Base_traits>
-  struct Spatial_searching_default_distance< ::CGAL::Search_traits_adapter<Point_with_info,PointPropertyMap,Base_traits> >{
-    typedef ::CGAL::Distance_adapter<Point_with_info,
-                                                 PointPropertyMap,
-                                                 typename Spatial_searching_default_distance<Base_traits>::type> type;
-  };
-
-} //namespace internal
-  
-  
-template <class Point_with_info,class PointPropertyMap,class Base_traits>
-class Search_traits_adapter : public Base_traits{
-  PointPropertyMap ppmap;
-
-  BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag,
-                           typename boost::property_traits<PointPropertyMap>::category
-                         >::value ) );
-public:
-  typedef Base_traits Base;
-  typedef typename internal::Get_iso_box_d<Base>::type Iso_box_d;
-
-  Search_traits_adapter(const PointPropertyMap& ppmap_=PointPropertyMap(),
-                          const Base_traits& base=Base_traits()
-  ):Base_traits(base),ppmap(ppmap_){}
-
-  typedef typename Base_traits::Cartesian_const_iterator_d      Cartesian_const_iterator_d;
-  typedef Point_with_info                                       Point_d;
-  typedef typename Base_traits::FT                              FT;
-  typedef typename Base_traits::Dimension                       Dimension;
-  
-
-  struct Construct_cartesian_const_iterator_d: public Base_traits::Construct_cartesian_const_iterator_d{
-    PointPropertyMap ppmap;
-    using Base_traits::Construct_cartesian_const_iterator_d::operator();
-    
-    Construct_cartesian_const_iterator_d(const typename Base_traits::Construct_cartesian_const_iterator_d& base, const PointPropertyMap& ppmap_)
-      :Base_traits::Construct_cartesian_const_iterator_d(base), ppmap(ppmap_){}
-    
-    typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p) const
-    { return this->operator() (get(ppmap,p)); }
-
-    typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p, int)  const
-    { return this->operator() (get(ppmap,p),0); }
-  };
-  
-  struct Construct_iso_box_d: public Base::Construct_iso_box_d{
-    PointPropertyMap ppmap;
-    typedef typename Base_traits::FT  FT; // needed for VC++, because otherwise it is taken from the private typedef of the base class
-
-    Iso_box_d operator() () const {
-      return static_cast<const typename Base::Construct_iso_box_d* >(this)->operator() ();
-    }
-    Iso_box_d operator() (const Point_with_info& p, const Point_with_info& q) const
-    {
-      return static_cast<const typename Base::Construct_iso_box_d* >(this)->operator() (get(ppmap,p),get(ppmap,q));
-    }
-  };
-  
-  const PointPropertyMap& point_property_map() const {return ppmap;}
-  
-  Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const {
-    return Construct_cartesian_const_iterator_d(
-      static_cast<const Base*>(this)->construct_cartesian_const_iterator_d_object(),
-      ppmap);
-  }
-};
-
-template <class Point_with_info,class PointPropertyMap,class Base_distance>
-class Distance_adapter : public Base_distance {
-  PointPropertyMap ppmap;
-  typedef typename Base_distance::FT FT;
-
-  BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag,
-                           typename boost::property_traits<PointPropertyMap>::category
-                         >::value ) );
-public:
-    
-  Distance_adapter( const PointPropertyMap& ppmap_=PointPropertyMap(),
-                         const Base_distance& distance=Base_distance()
-  ):Base_distance(distance),ppmap(ppmap_){}
-
-  using Base_distance::transformed_distance;
-  
-  typedef Point_with_info Point_d;
-  typedef typename Base_distance::Query_item Query_item;
-
-  const PointPropertyMap& point_property_map() const {return ppmap;}    
-
-  FT transformed_distance(const Query_item& p1, const Point_with_info& p2) const
-  {
-    return this->transformed_distance(p1,get(ppmap,p2));
-  }
-
-  template <class FT,class Dimension>
-  FT min_distance_to_rectangle(const Query_item& p, const CGAL::Kd_tree_rectangle<FT,Dimension>& b) const
-  {
-    return static_cast<const Base_distance*>(this)->min_distance_to_rectangle(p,b);
-  }
-
-  template <class FT,class Dimension>
-  FT min_distance_to_rectangle(const Query_item& p, const CGAL::Kd_tree_rectangle<FT,Dimension>& b,std::vector<FT>& dists) 
-  {
-    return static_cast<Base_distance*>(this)->min_distance_to_rectangle(p,b,dists);
-  }
-
-  template <class FT,class Dimension>
-  FT max_distance_to_rectangle(const Query_item& p,const CGAL::Kd_tree_rectangle<FT,Dimension>& b) const
-  {
-    return static_cast<const Base_distance*>(this)->max_distance_to_rectangle(p,b);
-  }  
-  template <class FT,class Dimension>
-  FT max_distance_to_rectangle(const Query_item& p,const CGAL::Kd_tree_rectangle<FT,Dimension>& b,std::vector<FT>& dists)
-  {
-    return static_cast<Base_distance*>(this)->max_distance_to_rectangle(p,b,dists);
-  }  
-};
-
-}//namespace CGAL
-
-#endif //CGAL_SEARCH_TRAITS_WITH_INFO
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_2.h
deleted file mode 100644
index 2aa7307..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_2.h
+++ /dev/null
@@ -1,310 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_SEGMENT_2_H
-#define CGAL_SEGMENT_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Segment_2 : public R_::Kernel_base::Segment_2
-{
-  typedef typename R_::RT                     RT;
-  typedef typename R_::FT                     FT;
-  typedef typename R_::Point_2                Point_2;
-  typedef typename R_::Direction_2            Direction_2;
-  typedef typename R_::Vector_2               Vector_2;
-  typedef typename R_::Line_2                 Line_2;
-  typedef typename R_::Aff_transformation_2   Aff_transformation_2;
-  typedef typename R_::Kernel_base::Segment_2 RSegment_2;
-
-  typedef Segment_2                           Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef RSegment_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_                               R;
-
-  Segment_2() {}
-
-  // conversion from implementation class object to interface class object
-  Segment_2(const RSegment_2& s)
-    : RSegment_2(s) {}
-
-  Segment_2(const Point_2 &sp, const Point_2 &ep)
-    :  RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {}
-
-  typename cpp11::result_of<typename R::Construct_source_2( Segment_2)>::type
-  source() const
-  { 
-    return R_().construct_source_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_target_2( Segment_2)>::type
-  target() const
-  {
-    return R_().construct_target_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_source_2( Segment_2)>::type
-  start() const
-  {
-    return source();
-  }
-
-  typename cpp11::result_of<typename R::Construct_target_2( Segment_2)>::type
-  end() const
-  {
-    return target();
-  }
-
-  
-  typename cpp11::result_of<typename R::Construct_min_vertex_2( Segment_2)>::type
-  min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-
-  typename cpp11::result_of<typename R::Construct_max_vertex_2( Segment_2)>::type
-  max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
-  vertex(int i) const;
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
-  point(int i) const;
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
-  operator[](int i) const;
-
-  bool        is_horizontal() const;
-  bool        is_vertical() const;
-  bool        has_on(const Point_2 &p) const;  
-  bool        collinear_has_on(const Point_2 &p) const;
-  FT          squared_length() const;
-
-  bool        is_degenerate() const;
-
-  Bbox_2      bbox() const
-  {
-    return R().construct_bbox_2_object()(*this);
-  }
-
-  bool
-  operator==(const Segment_2 &s) const
-  {
-    return R().equal_2_object()(*this, s);
-  }
-
-  bool
-  operator!=(const Segment_2 &s) const
-  {
-    return !(*this == s);
-  }
-
-
-  Direction_2
-  direction() const
-  {
-    typename R::Construct_vector_2 construct_vector;
-    return Direction_2( construct_vector( source(), target()));
-  }
-
-  Vector_2
-  to_vector() const
-  {
-    typename R::Construct_vector_2 construct_vector;
-    return construct_vector( source(), target());
-  }
-
-  Line_2
-  supporting_line() const
-  {
-    typename R::Construct_line_2 construct_line;  
-    return construct_line(*this);
-  }
-
-  Segment_2
-  opposite() const
-  {
-    return R().construct_opposite_segment_2_object()(*this);
-  }
-
-  Segment_2
-  transform(const Aff_transformation_2 &t) const
-  {
-    return Segment_2(t.transform(source()), t.transform(target()));
-  }
-};
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_min_vertex_2( Segment_2<R_> )>::type
-Segment_2<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  typename R_::Less_xy_2 less_xy; 
-  return less_xy(source(),target()) ? source() : target();
-}
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_max_vertex_2( Segment_2<R_> )>::type
-Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  typename R_::Less_xy_2 less_xy; 
-  return less_xy(source(),target()) ? target() : source();
-}
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
-Segment_2<R_>::vertex(int i) const
-{
-  return (i%2 == 0) ? source() : target();
-}
-
-template < class R_ >
-inline
-typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
-Segment_2<R_>::point(int i) const
-{
-  return vertex(i);
-}
-
-template < class R_ >
-inline
-typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
-Segment_2<R_>::operator[](int i) const
-{
-  return vertex(i);
-}
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-bool
-Segment_2<R_>::is_horizontal() const
-{
-  return R_().equal_y_2_object()(source(), target());
-}
-
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-bool
-Segment_2<R_>::is_vertical() const
-{
-  return R_().equal_x_2_object()(source(), target());
-}
-
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-bool
-Segment_2<R_>::
-has_on(const typename R_::Point_2 &p) const
-{
-  return R_().are_ordered_along_line_2_object()(source(), 
-					       p, 
-					       target());
-}
-
-
-template < class R_ >
-inline
-bool
-Segment_2<R_>::
-collinear_has_on(const typename R_::Point_2 &p) const
-{
-  return R_().collinear_has_on_2_object()
-               (*this, p);
-}
-
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename Segment_2<R_>::FT
-Segment_2<R_>::squared_length() const
-{
- return R_().compute_squared_length_2_object()(*this);
-}
-
-
-template < class R_ >
-inline
-bool
-Segment_2<R_>::is_degenerate() const
-{
-  return R().is_degenerate_2_object()(*this);
-}
-
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Segment_2<R> &s)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << s.source() << ' ' << s.target();
-    case IO::BINARY :
-        return os << s.source() << s.target();
-    default:
-        return os << "Segment_2(" << s.source() <<  ", " << s.target() << ")";
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Segment_2<R> &s)
-{
-    typename R::Point_2 p, q;
-
-    is >> p >> q;
-
-    if (is)
-        s = Segment_2<R>(p, q);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif //  CGAL_SEGMENT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_3.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_3.h
deleted file mode 100644
index a811035..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_3.h
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_SEGMENT_3_H
-#define CGAL_SEGMENT_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Segment_3 : public R_::Kernel_base::Segment_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Vector_3              Vector_3;
-  typedef typename R_::Direction_3           Direction_3;
-  typedef typename R_::Line_3                Line_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Segment_3                          Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<1>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Segment_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Segment_3() {}
-
-  Segment_3(const Rep& s)
-      : Rep(s) {}
-
-  Segment_3(const Point_3& sp, const Point_3& ep)
-    : Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {}
-
-  typename cpp11::result_of<typename R::Construct_source_3(Segment_3)>::type
-  source() const
-  { 
-    return R_().construct_source_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_target_3(Segment_3)>::type
-  target() const
-  {
-    return R_().construct_target_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Construct_source_3(Segment_3)>::type
-  start() const
-  {
-    return source();
-  }
-
-  typename cpp11::result_of<typename R::Construct_target_3(Segment_3)>::type
-  end() const
-  {
-    return target();
-  }
- 
-  typename cpp11::result_of<typename R::Construct_min_vertex_3(Segment_3)>::type
-  min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-
-  typename cpp11::result_of<typename R::Construct_max_vertex_3(Segment_3)>::type
-  max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-
-  typename cpp11::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
-  vertex(int i) const;
-
-  typename cpp11::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
-  point(int i) const
-  { return vertex(i); }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
-  operator[](int i) const
-  { return vertex(i); }
-
-
-  Segment_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Segment_3(t.transform(this->source()), t.transform(this->target()));
-  }
-
-  FT squared_length() const
-  {
-    return squared_distance(this->target(), this->source());
-  }
-
-  Vector_3 to_vector() const
-  {
-    return R().construct_vector_3_object()(*this);
-  }
-
-  bool has_on(const Point_3 &p) const
-  { // TODO : use one predicate.
-    return R_().are_ordered_along_line_3_object()(source(), 
-					         p, 
-					         target());
-  }
-
-  Segment_3 opposite() const
-  {
-    return R().construct_opposite_segment_3_object()(*this);
-  }
-
-  Direction_3 direction() const
-  {
-    typename R::Construct_vector_3 construct_vector;
-    return Direction_3( construct_vector( source(), target()));
-  }
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-  Bbox_3 bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-  Line_3
-  supporting_line() const
-  {
-    return R().construct_line_3_object()(*this);
-  }
-
-};
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_min_vertex_3( Segment_3<R_> ) >::type
-Segment_3<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  typename R_::Less_xyz_3 less_xyz; 
-  return less_xyz(source(),target()) ? source() : target();
-}
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_max_vertex_3( Segment_3<R_> ) >::type
-Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
-{
-  typename R_::Less_xyz_3 less_xyz; 
-  return less_xyz(source(),target()) ? target() : source();
-}
-
-template < class R_ >
-CGAL_KERNEL_INLINE
-typename cpp11::result_of<typename R_::Construct_vertex_3( Segment_3<R_>, int ) >::type
-Segment_3<R_>::vertex(int i) const
-{
-  return (i%2 == 0) ? source() : target();
-}
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Segment_3<R> &s)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << s.source() << ' ' << s.target();
-    case IO::BINARY :
-        return os << s.source() << s.target();
-    default:
-        return os << "Segment_3(" << s.source() <<  ", " << s.target() << ")";
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Segment_3<R> &s)
-{
-    typename R::Point_3 p, q;
-
-    is >> p >> q;
-
-    if (is)
-        s = Segment_3<R>(p, q);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_SEGMENT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2.h
deleted file mode 100644
index 4918683..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2.h
+++ /dev/null
@@ -1,1945 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
-#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
-
-#include <iostream>
-#include <vector>
-#include <list>
-#include <set>
-#include <map>
-#include <algorithm>
-#include <boost/tuple/tuple.hpp>
-
-#include <CGAL/Segment_Delaunay_graph_2/basic.h>
-
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Segment_Delaunay_graph_storage_traits_2.h>
-#include <CGAL/Segment_Delaunay_graph_vertex_base_2.h>
-#include <CGAL/Segment_Delaunay_graph_face_base_2.h>
-#include <CGAL/Triangulation_data_structure_2.h>
-
-#include <CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h>
-#include <CGAL/Segment_Delaunay_graph_2/edge_list.h>
-#include <CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Constructions_C2.h>
-
-#include <CGAL/Iterator_project.h>
-#include <CGAL/utility.h>
-
-#include <CGAL/spatial_sort.h>
-#include <CGAL/Spatial_sort_traits_adapter_2.h>
-
-#include <boost/iterator/counting_iterator.hpp>
-
-/*
-  Conventions:
-  ------------
-  1. we treat segments as open; the endpoints are separate objects
-  2. a segment of length zero is treated as a point
-  3. a point is deleted only if it has no segment adjacent to it
-  4. when a segment is deleted it's endpoints are not deleted
-  5. the user can force the deletion of endpoints; this is only done
-     if condition 3 is met.
-  6. when objects are written to a stream we distinguish between
-     points and segments; points start by a 'p' and segments by an 's'.
-*/
-
-
-namespace CGAL {
-
-namespace SegmentDelaunayGraph_2 {
-
-namespace Internal {
-
-  template<typename Edge, typename LTag> struct Which_list;
-
-  // use the in-place edge list
-  template<typename E>
-  struct Which_list<E,Tag_true>
-  {
-    typedef E                           Edge;
-    typedef In_place_edge_list_for_sdg<Edge>    List;
-  };
-
-  // do not use the in-place edge list
-  template<typename E>
-  struct Which_list<E,Tag_false>
-  {
-    typedef E                                 Edge;
-    // change the following to Tag_false in order to use
-    // CGAL's Unique_hash_map
-    typedef Tag_true                          Use_stl_map_tag;
-    typedef Edge_list<Edge,Use_stl_map_tag>   List;
-  };
-
-
-  template < class Node >
-  struct Project_site_2 {
-    typedef Node                   argument_type;
-    typedef typename Node::Site_2  Site;
-    typedef Site                   result_type;
-    Site& operator()(const Node& x) const { 
-      static Site s;
-      s = x.site();
-      return s;
-    }
-    //    const Site& operator()(const Node& x) const { return x.site(); }
-  };
-
-  template < class Node, class Site_t >
-  struct Project_input_to_site_2 {
-    typedef Node                   argument_type;
-    typedef Site_t                 Site;
-    typedef Site                   result_type;
-    Site& operator()(const Node& x) const {
-      static Site s;
-      if ( boost::tuples::get<2>(x) /*x.third*/ ) { // it is a point
-	//	s = Site::construct_site_2(*x.first);
-	s = Site::construct_site_2( *boost::tuples::get<0>(x) );
-      } else {
-	//	s = Site::construct_site_2(*x.first, *x.second);
-	s = Site::construct_site_2
-	  (*boost::tuples::get<0>(x), *boost::tuples::get<1>(x));
-      }
-      return s;
-    }
-  };
-
-  template<typename T, typename U>
-  struct Check_type_equality_for_info
-  {
-    Check_type_equality_for_info()
-    {
-      ERROR__INFO_TYPES_OF_insert_AND_Storage_traits_with_info_2_MUST_MATCH
-	(T(), U());
-    }
-  };
-
-  template<typename T>
-  struct Check_type_equality_for_info<T,T>
-  {
-  };
-
-} // namespace Internal
-
-} //namespace SegmentDelaunayGraph_2
-
-
-template<class Gt, class ST, class STag, class D_S, class LTag >
-class Segment_Delaunay_graph_hierarchy_2;
-
-
-
-template<class Gt,
-	 class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
-	 class D_S = Triangulation_data_structure_2 < 
-                Segment_Delaunay_graph_vertex_base_2<ST>,
-                Segment_Delaunay_graph_face_base_2<Gt> >,
-	 class LTag = Tag_false >
-class Segment_Delaunay_graph_2
-  : private Triangulation_2<
-          Segment_Delaunay_graph_traits_wrapper_2<Gt>, D_S >
-{
-  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_true,D_S,LTag>;
-  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_false,D_S,LTag>;
-protected:
-  // LOCAL TYPES
-  //------------
-  typedef Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>       Self;
-
-  typedef Segment_Delaunay_graph_traits_wrapper_2<Gt>   Modified_traits;
-  typedef Triangulation_2<Modified_traits,D_S>           DG;
-  typedef DG                                            Delaunay_graph;
-
-  typedef LTag                                          List_tag;
-
-public:
-  // PUBLIC TYPES
-  //-------------
-  typedef D_S                                     Data_structure;
-  typedef D_S                                     Triangulation_data_structure;
-  typedef Gt                                     Geom_traits;
-  typedef ST                                     Storage_traits;
-  typedef typename Gt::Site_2                    Site_2;
-  typedef typename Gt::Point_2                   Point_2;
-
-  typedef typename D_S::Edge                      Edge;
-  typedef typename D_S::Vertex_handle             Vertex_handle;
-  typedef typename D_S::Face_handle               Face_handle;
-  typedef typename D_S::Vertex                    Vertex;
-  typedef typename D_S::Face                      Face;
-
-  typedef typename D_S::size_type                 size_type;
-
-  typedef typename D_S::Vertex_circulator         Vertex_circulator;
-  typedef typename D_S::Edge_circulator           Edge_circulator;
-  typedef typename D_S::Face_circulator           Face_circulator;
-
-  typedef typename D_S::Face_iterator             All_faces_iterator;
-  typedef typename D_S::Vertex_iterator           All_vertices_iterator;
-  typedef typename D_S::Edge_iterator             All_edges_iterator;
-
-  typedef typename DG::Finite_faces_iterator     Finite_faces_iterator;
-  typedef typename DG::Finite_vertices_iterator  Finite_vertices_iterator;
-  typedef typename DG::Finite_edges_iterator     Finite_edges_iterator;
-
-  typedef typename Storage_traits::Point_container     Point_container;
-  typedef typename Storage_traits::Point_handle        Point_handle;
-  typedef typename Storage_traits::const_Point_handle  const_Point_handle;
-
-protected:
-  typedef typename Geom_traits::Arrangement_type_2  AT2;
-  typedef typename AT2::Arrangement_type            Arrangement_type;
-
-  // these containers should have point handles and should replace the
-  // point container...
-  typedef boost::tuples::tuple<Point_handle,Point_handle,bool>  Site_rep_2;
-
-  struct Site_rep_less_than {
-    // less than for site reps
-    bool operator()(const Site_rep_2& x, const Site_rep_2& y) const {
-      Point_handle x1 = boost::tuples::get<0>(x);
-      Point_handle y1 = boost::tuples::get<0>(y);
-
-      if ( &(*x1) < &(*y1) ) { return true; }
-      if ( &(*y1) < &(*x1) ) { return false; }
-
-      Point_handle x2 = boost::tuples::get<1>(x);
-      Point_handle y2 = boost::tuples::get<1>(y);
-
-      return &(*x2) < &(*y2);
-    }
-  };
-
-  typedef std::set<Site_rep_2,Site_rep_less_than>  Input_sites_container;
-  typedef typename Input_sites_container::const_iterator
-  All_inputs_iterator;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
-  Project_input_to_site_2<Site_rep_2, Site_2>
-  Proj_input_to_site;
-
-  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Project_site_2<Vertex>
-  Proj_site;
-
-  struct Point_handle_less_than {
-    // less than
-    bool operator()(const const_Point_handle& x,
-		    const const_Point_handle& y) const {
-      return &(*x) < &(*y);
-    }
-  };
-
-  typedef std::pair<Point_handle,Point_handle>   Point_handle_pair;
-
-  typedef std::map<Point_handle,Point_handle,Point_handle_less_than>
-  Handle_map;
-
-public:
-  typedef Iterator_project<All_inputs_iterator, Proj_input_to_site>
-  Input_sites_iterator;
-
-  typedef Iterator_project<Finite_vertices_iterator, 
-                           Proj_site>            Output_sites_iterator;
-protected:
-  // LOCAL VARIABLE(S)
-  //------------------
-  // the container of points
-  Point_container pc_;
-  Input_sites_container isc_;
-  Storage_traits st_;
-#ifdef CGAL_SDG_NO_FACE_MAP
-  std::vector<Face_handle> fhc_;
-#endif
-
-protected:
-  // MORE LOCAL TYPES
-  //-----------------
-  typedef typename Gt::Intersections_tag        Intersections_tag;
-
-  typedef std::map<Face_handle,bool>            Face_map;
-  typedef std::vector<Edge>                     Edge_vector;
-
-  typedef std::list<Vertex_handle>              Vertex_list;
-  typedef typename Vertex_list::iterator        Vertex_list_iterator;
-
-  typedef Triple<Vertex_handle,Vertex_handle,Vertex_handle>
-  Vertex_triple;
-
-  typedef Vertex_handle                         Vh_triple[3];
-  typedef std::map<Face_handle,Sign>            Sign_map;
-
-  typedef std::pair<Face_handle,Face_handle>    Face_pair;
-
-  typedef typename Storage_traits::Storage_site_2   Storage_site_2;
-
-  // the edge list
-  typedef typename
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Which_list<Edge,List_tag>::List 
-  List;
-
-public:
-  // CREATION
-  //---------
-  Segment_Delaunay_graph_2(const Geom_traits& gt = Geom_traits(),
-			   const Storage_traits& st = Storage_traits())
-    : DG(gt), st_(st) {}
-
-  template< class Input_iterator >
-  Segment_Delaunay_graph_2(Input_iterator first, Input_iterator beyond,
-			   const Geom_traits& gt = Geom_traits(),
-			   const Storage_traits& st = Storage_traits())
-    : DG(gt), st_(st)
-  {
-    insert(first, beyond);
-  }
-
-  Segment_Delaunay_graph_2(const Self& other);
-  Self& operator=(const Self& other);
-
-public:
-  // ACCESS METHODS
-  // --------------
-  const Geom_traits&  geom_traits() const { return DG::geom_traits(); }
-
-  const Storage_traits&  storage_traits() const { return st_; }
-
-  const Data_structure&   data_structure() const { return this->_tds; }
-  const Triangulation_data_structure& tds() const { return this->_tds; }
-  const Point_container&  point_container() const { return pc_; }
-
-  inline size_type number_of_input_sites() const {
-    return isc_.size();
-  }
-
-  inline size_type number_of_output_sites() const {
-    return number_of_vertices();
-  }
-
-  inline size_type number_of_vertices() const {
-    return DG::number_of_vertices();
-  }
-
-  inline size_type number_of_faces() const {
-    return DG::number_of_faces();
-  }
-
-  inline Vertex_handle infinite_vertex() const {
-    return DG::infinite_vertex();
-  }
-
-  inline Face_handle infinite_face() const {
-    return DG::infinite_face();
-  }
-
-  inline Vertex_handle finite_vertex() const {
-    return DG::finite_vertex();
-  }
-
-  inline int dimension() const {
-    return DG::dimension();
-  }
-
-  using Delaunay_graph::cw;
-  using Delaunay_graph::ccw;
-  using Delaunay_graph::delete_vertex;
-  using Delaunay_graph::delete_face;
-public:
-  // TRAVERSAL OF THE DUAL GRAPH
-  //----------------------------
-  inline Finite_faces_iterator finite_faces_begin() const {
-    return DG::finite_faces_begin();
-  }
-
-  inline Finite_faces_iterator finite_faces_end() const {
-    return DG::finite_faces_end();
-  }
-
-  inline Finite_vertices_iterator finite_vertices_begin() const {
-    return DG::finite_vertices_begin();
-  }
-
-  inline Finite_vertices_iterator finite_vertices_end() const {
-    return DG::finite_vertices_end();
-  }
-
-  inline Finite_edges_iterator finite_edges_begin() const {
-    return DG::finite_edges_begin();    
-  }
-
-  inline Finite_edges_iterator finite_edges_end() const {
-    return DG::finite_edges_end();    
-  }
-
-  inline All_faces_iterator all_faces_begin() const {
-    return DG::all_faces_begin();
-  }
-
-  inline All_faces_iterator all_faces_end() const {
-    return DG::all_faces_end();
-  }
-
-  inline All_vertices_iterator all_vertices_begin() const {
-    return DG::all_vertices_begin();
-  }
-
-  inline All_vertices_iterator all_vertices_end() const {
-    return DG::all_vertices_end();
-  }
-
-  inline All_edges_iterator all_edges_begin() const {
-    return DG::all_edges_begin();
-  }
-
-  inline All_edges_iterator all_edges_end() const {
-    return DG::all_edges_end();
-  }
-
-  inline Input_sites_iterator input_sites_begin() const {
-    return Input_sites_iterator(isc_.begin());
-  }
-
-  inline Input_sites_iterator input_sites_end() const {
-    return Input_sites_iterator(isc_.end());
-  }
-
-  inline Output_sites_iterator output_sites_begin() const {
-    return Output_sites_iterator(finite_vertices_begin());
-  }
-
-  inline Output_sites_iterator output_sites_end() const {
-    return Output_sites_iterator(finite_vertices_end());    
-  }
-
-public:
-  // CIRCULATORS
-  //------------
-  inline Face_circulator
-  incident_faces(Vertex_handle v,
-		 Face_handle f = Face_handle()) const {
-    return DG::incident_faces(v, f);
-  }
-
-  inline Vertex_circulator
-  incident_vertices(Vertex_handle v,
-		    Face_handle f = Face_handle()) const { 
-    return DG::incident_vertices(v, f);
-  }
-
-  inline Edge_circulator
-  incident_edges(Vertex_handle v,
-		 Face_handle f = Face_handle()) const {
-    return DG::incident_edges(v, f);
-  }
- 
-public:
-  // PREDICATES
-  //-----------
-  inline bool is_infinite(const Vertex_handle& v) const {
-    return DG::is_infinite(v);
-  }
-
-  inline bool is_infinite(const Face_handle& f) const {
-    return DG::is_infinite(f);
-  }
-
-  inline bool is_infinite(const Face_handle& f, int i) const {
-    return DG::is_infinite(f, i);
-  }
-
-  inline bool is_infinite(const Edge& e) const {
-    return is_infinite(e.first, e.second);
-  }
-
-  inline bool is_infinite(const Edge_circulator& ec) const {
-    return DG::is_infinite(ec);
-  }
-
-public:
-  // INSERTION METHODS
-  //------------------
-  template<class Input_iterator>
-  inline size_type insert(Input_iterator first, Input_iterator beyond) {
-    return insert(first, beyond, Tag_false());
-  }
-
-  template<class Input_iterator>
-  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_false)
-  {
-    // do it the obvious way: insert them as they come;
-    // one might think though that it might be better to first insert
-    // all end points and then all segments, or a variation of that.
-    size_type n_before = number_of_vertices();
-    for (Input_iterator it = first; it != beyond; ++it) {
-      insert(*it);
-    }
-    size_type n_after = number_of_vertices();
-    return n_after - n_before;
-  }
-
-  //insert a range of points using spatial sorting
-  std::size_t insert_points(std::vector<Point_2>& points)
-  {
-    size_type n = this->number_of_vertices();
-    spatial_sort (points.begin(), points.end(), geom_traits());
-    Vertex_handle hint;
-    for (typename std::vector<Point_2>::const_iterator
-          p = points.begin(), end = points.end(); p != end; ++p)
-    {
-      hint = insert(*p, hint);
-    }
-
-    return this->number_of_vertices() - n;
-  }
-
-  template <class PointIterator>
-  std::size_t insert_points(PointIterator first, PointIterator beyond)
-  {
-    std::vector<Point_2> points (first, beyond);
-    return insert_points(points);
-  }
-
-  template <class IndicesIterator>
-  std::size_t insert_segments( const std::vector<Point_2>& points,
-                               IndicesIterator indices_first,
-                               IndicesIterator indices_beyond )
-  {
-    typedef std::vector<std::ptrdiff_t> Vertex_indices;
-    typedef std::vector<Vertex_handle> Vertices;
-
-    Vertex_indices vertex_indices;
-    vertex_indices.resize(points.size());
-
-    std::copy(boost::counting_iterator<std::ptrdiff_t>(0),
-              boost::counting_iterator<std::ptrdiff_t>(points.size()),
-              std::back_inserter(vertex_indices));
-
-    size_type n = this->number_of_vertices();
-    Spatial_sort_traits_adapter_2<Gt,const Point_2*> sort_traits(&(points[0]));
-
-    spatial_sort(vertex_indices.begin(), vertex_indices.end(), sort_traits);
-
-    Vertices vertices;
-    vertices.resize(points.size());
-
-    Vertex_handle hint;
-    for(typename Vertex_indices::const_iterator
-          it_pti = vertex_indices.begin(), end = vertex_indices.end();
-          it_pti != end; ++it_pti)
-    {
-      hint = insert(points[*it_pti], hint);
-      vertices[*it_pti] = hint;
-    }
-
-    for(IndicesIterator it_cst=indices_first, end=indices_beyond;
-        it_cst!=end; ++it_cst)
-    {
-      Vertex_handle v1 = vertices[it_cst->first];
-      Vertex_handle v2 = vertices[it_cst->second];
-      if(v1 != v2) insert(v1, v2);
-    }
-
-    return this->number_of_vertices() - n;
-  }
-
-  template <class PointIterator, class IndicesIterator>
-  std::size_t insert_segments(PointIterator points_first,
-                              PointIterator points_beyond,
-                              IndicesIterator indices_first,
-                              IndicesIterator indices_beyond)
-  {
-    std::vector<Point_2> points (points_first, points_beyond);
-    return insert_segments(points, indices_first, indices_beyond);
-  }
-
-  static const Point_2& get_source(const std::pair<Point_2, Point_2>& segment){
-    return segment.first;
-  }
-  static const Point_2& get_target(const std::pair<Point_2, Point_2>& segment){
-    return segment.second;
-  }
-
-  template <class Segment_2>
-  static const Point_2& get_source(const Segment_2& segment){
-    return segment.source();
-  }
-  template <class Segment_2>
-  static const Point_2& get_target(const Segment_2& segment){
-    return segment.target();
-  }
-
-  static const Point_2& get_source(const Site_2& segment){
-    return segment.source_of_supporting_site();
-  }
-
-  static const Point_2& get_target(const Site_2& segment){
-    return segment.target_of_supporting_site();
-  }
-
-  template <class SegmentIterator>
-  std::size_t insert_segments(SegmentIterator first, SegmentIterator beyond)
-  {
-    std::vector<Point_2> points;
-    for (SegmentIterator s_it=first; s_it!=beyond; ++s_it)
-    {
-      points.push_back( get_source(*s_it) );
-      points.push_back( get_target(*s_it) );
-    }
-
-    std::vector< std::pair<std::size_t, std::size_t> > segment_indices;
-    std::size_t nb_segments = points.size() / 2;
-    segment_indices.reserve( nb_segments );
-    for (std::size_t k=0; k < nb_segments; ++k)
-      segment_indices.push_back( std::make_pair(2*k,2*k+1) );
-
-    return insert_segments( points,
-                            segment_indices.begin(),
-                            segment_indices.end() );
-  }
-
-  template <class Input_iterator>
-  inline size_type
-  insert_range(Input_iterator first, Input_iterator beyond, Site_2){
-    std::vector<Point_2> points;
-    std::vector<Point_2> segment_points;
-    std::vector< std::pair<std::size_t, std::size_t> > segment_indices;
-    std::vector<Site_2> non_input_segments;
-
-    for (Input_iterator it=first; it!=beyond; ++it)
-    {
-      if ( it->is_input() )
-      {
-        if (it->is_point() ) points.push_back( it->point() );
-        else{
-          segment_points.push_back( it->source_of_supporting_site() );
-          segment_points.push_back( it->target_of_supporting_site() );
-          segment_indices.push_back( std::make_pair(segment_points.size()-2,
-                                                    segment_points.size()-1 ));
-        }
-      }
-      else
-        non_input_segments.push_back(*it);
-    }
-    //insert the points
-    size_type n = insert_points(points);
-    //insert the segments
-    n += insert_segments( segment_points,
-                          segment_indices.begin(),
-                          segment_indices.end() );
-    //insert non-input sites
-    std::random_shuffle( non_input_segments.begin(), non_input_segments.end() );
-    n += insert(non_input_segments.begin(),
-                non_input_segments.end(), Tag_false() );
-    return n;
-  }
-
-  template <class Input_iterator>
-  inline size_type
-  insert_range(Input_iterator first, Input_iterator beyond, Point_2){
-    return insert_points(first, beyond);
-  }
-
-  template <class Input_iterator, class Segment_2>
-  inline size_type
-  insert_range(Input_iterator first, Input_iterator beyond, Segment_2){
-    return insert_segments(first, beyond);
-  }
-
-  template<class Input_iterator>
-  inline size_type
-  insert(Input_iterator first, Input_iterator beyond, Tag_true)
-  {
-    return
-      insert_range(first, beyond,
-                   typename std::iterator_traits<Input_iterator>::value_type()
-      );
-  }
-
-  // insert a point
-  inline Vertex_handle insert(const Point_2& p) {
-    // update input site container
-    Point_handle ph = register_input_site(p);
-    Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
-    return insert_point(ss, p, Vertex_handle());
-  }
-
-  inline Vertex_handle insert(const Point_2& p, Vertex_handle vnear) {
-    // update input site container
-    Point_handle ph = register_input_site(p);
-    Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
-    return insert_point(ss, p, vnear);
-  }
-
-protected:
-  // insert a point without registering it in the input sites
-  // container: useful for the hierarchy
-  inline Vertex_handle insert_no_register(const Storage_site_2& ss,
-					  const Point_2& p,
-					  Vertex_handle vnear) {
-    return insert_point(ss, p, vnear);
-  }
-
-public:
-  // insert a segment
-  inline Vertex_handle insert(const Point_2& p0, const Point_2& p1) {
-    // update input site container
-    Point_handle_pair php = register_input_site(p0, p1);
-    Storage_site_2 ss =
-      st_.construct_storage_site_2_object()(php.first, php.second);
-    Vertex_handle v = insert_segment(ss, Site_2::construct_site_2(p0, p1),
-				     Vertex_handle());
-    if ( v == Vertex_handle() ) {
-      unregister_input_site(php.first, php.second);
-    }
-    return v;
-  }
-
-  // inserting a segment whose endpoints have already been inserted
-  // update input site container
-  inline Vertex_handle insert(const Vertex_handle& v0,
-			      const Vertex_handle& v1) {
-    CGAL_precondition( v0->storage_site().is_point() &&
-		       v1->storage_site().is_point() );
-
-    Point_handle h0 = v0->storage_site().point();
-    Point_handle h1 = v1->storage_site().point();
-    Storage_site_2 ss = st_.construct_storage_site_2_object()(h0, h1);
-
-    // update input site container
-    Point_handle_pair php = register_input_site(h0, h1);
-
-    if ( number_of_vertices() == 2 ) {
-      return insert_third(ss, v0, v1);
-    }
-
-    Vertex_handle v = insert_segment_interior(ss.site(), ss, v0);
-    if ( v == Vertex_handle() ) {
-      unregister_input_site(php.first, php.second);
-    }
-    return v;
-  }
-
-  inline Vertex_handle insert(const Point_2& p0, const Point_2& p1, 
-			      Vertex_handle vnear) {
-    // update input site container
-    Point_handle_pair php = register_input_site(p0, p1);
-    Storage_site_2 ss =
-      st_.construct_storage_site_2_object()(php.first, php.second);
-    Vertex_handle v =
-      insert_segment(ss, Site_2::construct_site_2(p0, p1), vnear);
-    if ( v == Vertex_handle() ) {
-      unregister_input_site(php.first, php.second);
-    }
-    return v;
-  }
-
-  inline Vertex_handle insert(const Site_2& t) {
-    return insert(t, Vertex_handle());
-  }
-
-  Vertex_handle insert(const Site_2& t, Vertex_handle vnear)
-  {
-    // the intended use is to unify the calls to insert(...);
-    // thus the site must be an exact one; 
-    CGAL_precondition( t.is_input() );
-
-    // update input site container
-
-    if ( t.is_segment() ) {
-      Point_handle_pair php =
-	register_input_site( t.source_of_supporting_site(),
-			     t.target_of_supporting_site() );
-      Storage_site_2 ss =
-	st_.construct_storage_site_2_object()(php.first, php.second);
-      Vertex_handle v = insert_segment(ss, t, vnear);
-      if ( v == Vertex_handle() ) {
-	unregister_input_site( php.first, php.second );
-      }
-      return v;
-    } else if ( t.is_point() ) {
-      Point_handle ph = register_input_site( t.point() );
-      Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
-      return insert_point(ss, t.point(), vnear);
-    } else {
-      CGAL_precondition ( t.is_defined() );
-      return Vertex_handle(); // to avoid compiler error
-    }
-  }
-
-protected:
-  template<class SSite>
-  inline void convert_info1(SSite& ss_trg, const SSite& ss_src,
-			    bool is_src, int,
-			    typename SSite::Has_info_tag const* = 0) const
-  {
-    //    std::cerr << "converting info..." << std::flush;
-    typename Storage_traits::Convert_info convert = st_.convert_info_object();
-
-    ss_trg.set_info( convert(ss_src.info(), is_src) );
-    //    std::cerr << " done!" << std::endl;
-  }
-
-  template<class SSite>
-  inline void convert_info1(SSite& /*  ss_trg */,
-			    const SSite& /* ss_src */, bool, char) const
-  {
-  }
-
-  void convert_info(Storage_site_2& ss_trg,
-		    const Storage_site_2& ss_src, bool is_src) const {
-    CGAL_precondition( ss_src.is_segment() && ss_trg.is_point() );
-    CGAL_precondition( ss_src.is_input() && ss_trg.is_input() );
-    CGAL_assertion( (is_src && same_points(ss_src.source_site(), ss_trg)) ||
-		    (!is_src && same_points(ss_src.target_site(), ss_trg))
-		    );
-    convert_info1(ss_trg, ss_src, is_src, 0);
-  }
-
-  template<class SSite>
-  inline void merge_info1(Vertex_handle v, const SSite& ss, int,
-			  typename SSite::Has_info_tag const* = 0)
-  {
-    //    std::cerr << "merging info..." << std::flush;
-    Storage_site_2 ss_v = v->storage_site();
-
-    typename Storage_traits::Merge_info merge = st_.merge_info_object();
-
-    ss_v.set_info( merge(ss_v.info(), ss.info()) );
-    v->set_site(ss_v);
-    //    std::cerr << " done!" << std::endl;
-  }
-
-  template<class SSite>
-  inline void merge_info1(Vertex_handle, const SSite&, char) const
-  {
-  }
-
-  // merges the info of the storage site of the vertex handle with the
-  // info of the given site; the vertex_handle contains the storage
-  // site with the new info
-  inline void merge_info(Vertex_handle v, const Storage_site_2& ss)  {
-    CGAL_precondition( (v->storage_site().is_segment() &&
-			ss.is_segment() &&
-			same_segments(v->site(), ss.site())) ||
-		       (v->storage_site().is_point() &&
-			ss.is_point() &&
-			same_points(v->site(), ss.site())) ||
-    		       (v->storage_site().is_point() &&	ss.is_segment())
-    		       );
-    merge_info1(v, ss, 0);
-  }
-
-public:
-  template<typename Info_t>
-  inline Vertex_handle insert(const Site_2& t,
-			      const Info_t& info) {
-    return insert(t, info, Vertex_handle());
-  }
-
-  template<typename Info_t>
-  Vertex_handle insert(const Site_2& t,
-		       const Info_t& info,
-		       Vertex_handle vnear)
-  {
-    typedef typename Storage_traits::Info Info;
-    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
-      Check_type_equality_for_info<Info_t, Info>();
-    // the intended use is to unify the calls to insert(...);
-    // thus the site must be an exact one; 
-    CGAL_precondition( t.is_input() );
-
-    // update input site container
-
-    if ( t.is_segment() ) {
-      Point_handle_pair php =
-	register_input_site( t.source_of_supporting_site(),
-			     t.target_of_supporting_site() );
-      Storage_site_2 ss =
-	st_.construct_storage_site_2_object()(php.first, php.second);
-      ss.set_info(info);
-      Vertex_handle v = insert_segment(ss, t, vnear);
-      if ( v == Vertex_handle() ) {
-	unregister_input_site( php.first, php.second );
-      }
-      return v;
-    } else if ( t.is_point() ) {
-      Point_handle ph = register_input_site( t.point() );
-      Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
-      ss.set_info(info);
-      return insert_point(ss, t.point(), vnear);
-    } else {
-      CGAL_precondition ( t.is_defined() );
-      return Vertex_handle(); // to avoid compiler error
-    }
-  }
-
-  // REMOVAL METHODS
-  //----------------
-protected:
-  bool is_star(const Vertex_handle& v) const;
-  bool is_linear_chain(const Vertex_handle& v0, const Vertex_handle& v1,
-		       const Vertex_handle& v2) const;
-  bool is_flippable(const Face_handle& f, int i) const;
-
-  void minimize_degree(const Vertex_handle& v);
-
-  // this method does not really do the job as intended, i.e., for removal
-  void equalize_degrees(const Vertex_handle& v, Self& small_d,
-			std::map<Vertex_handle,Vertex_handle>& vmap,
-			List& l) const;
-
-  void expand_conflict_region_remove(const Face_handle& f,
-				     const Site_2& t,
-				     const Storage_site_2& ss,
-				     List& l, Face_map& fm,
-				     Sign_map& sign_map);
-
-  void find_conflict_region_remove(const Vertex_handle& v,
-				   const Vertex_handle& vnearest,
-				   List& l, Face_map& fm, Sign_map& vm);
-
-  template<class OutputItFaces>
-  OutputItFaces get_faces(const List& l, OutputItFaces fit) const
-  {
-    // map that determines if a face has been visited
-    std::map<Face_handle,bool> fmap;
-
-    // compute the initial face
-    Edge e_front = l.front();
-    Face_handle fstart = e_front.first->neighbor(e_front.second);
-
-    // do the recursion
-    return get_faces(l, fstart, fmap, fit);
-  }
-
-  template<class OutputItFaces>
-  OutputItFaces get_faces(const List& l, Face_handle f,
-			  std::map<Face_handle,bool>& fmap,
-			  OutputItFaces fit) const
-  {
-    // if the face has been visited return
-    if ( fmap.find(f) != fmap.end() ) { return fit; }
-
-    // mark the face as visited
-    fmap[f] = true;
-
-    // output the face
-    *fit++ = f;
-
-    // recursively go to neighbors
-    for (int i = 0; i < 3; i++) {
-      Face_handle n = f->neighbor(i);
-      Edge ee(n, n->index( this->_tds.mirror_vertex(f,i) ));
-      if ( !l.is_in_list(ee) ) {
-	fit = get_faces(l, n, fmap, fit);
-      }
-    }
-    return fit;
-  }
-
-  size_type count_faces(const List& l) const;
-
-  void fill_hole(const Self& small_d, const Vertex_handle& v, const List& l,
-		 std::map<Vertex_handle,Vertex_handle>& vmap);
-
-  bool remove_first(const Vertex_handle& v);
-  bool remove_second(const Vertex_handle& v);
-  bool remove_third(const Vertex_handle& v);
-
-  void compute_small_diagram(const Vertex_handle& v, Self& small_d) const;
-  void compute_vertex_map(const Vertex_handle& v, const Self& small_d,
-			  std::map<Vertex_handle,Vertex_handle>& vmap) const;
-  void remove_degree_d_vertex(const Vertex_handle& v);
-
-  bool remove_base(const Vertex_handle& v);
-
-public:
-  bool remove(const Vertex_handle& v);
-
-protected:
-  inline void unregister_input_site(const Point_handle& h)
-  {
-    Site_rep_2 rep(h, h, true);
-    typename Input_sites_container::iterator it = isc_.find(rep);
-    CGAL_assertion( it != isc_.end() );
-
-    pc_.erase(h);
-    isc_.erase(it);
-  }
-
-  inline void unregister_input_site(const Point_handle& h1,
-				    const Point_handle& h2)
-  {   
-    Site_rep_2 rep(h1, h2, false);
-    typename Input_sites_container::iterator it = isc_.find(rep);
-    
-    Site_rep_2 sym_rep(h2, h1, false);
-    typename Input_sites_container::iterator sym_it = isc_.find(sym_rep);
-
-    CGAL_assertion( it != isc_.end() || sym_it != isc_.end() );
-
-    if ( it != isc_.end() ) { isc_.erase(it); }
-    if ( sym_it != isc_.end() ) { isc_.erase(sym_it); }
-
-    Site_rep_2 r1(h1, h1, true);
-    if ( isc_.find(r1) == isc_.end() ) { isc_.insert(r1); }
-
-    Site_rep_2 r2(h2, h2, true);
-    if ( isc_.find(r2) == isc_.end() ) { isc_.insert(r2); }
-  }
-
-  inline Point_handle register_input_site(const Point_2& p)
-  {
-    std::pair<Point_handle,bool> it = pc_.insert(p);
-    Site_rep_2 rep(it.first, it.first, true);
-    isc_.insert( rep );
-    return it.first;
-  }
-
-  inline
-  Point_handle_pair register_input_site(const Point_2& p0, const Point_2& p1)
-  {
-    std::pair<Point_handle,bool> it1 = pc_.insert(p0);
-    std::pair<Point_handle,bool> it2 = pc_.insert(p1);
-    Site_rep_2 rep(it1.first, it2.first, false);
-    isc_.insert( rep );
-    return Point_handle_pair(it1.first, it2.first);
-  }
-
-  inline
-  Point_handle_pair register_input_site(const Point_handle& h0,
-					const Point_handle& h1)
-  {
-    CGAL_precondition( h0 != h1 );
-    Site_rep_2 rep(h0, h1, false);
-    isc_.insert( rep );
-    return Point_handle_pair(h0, h1);
-  }
-
-  Vertex_handle  insert_first(const Storage_site_2& ss, const Point_2& p);
-  Vertex_handle  insert_second(const Storage_site_2& ss, const Point_2& p);
-  Vertex_handle  insert_third(const Storage_site_2& ss, const Point_2& p);
-  Vertex_handle  insert_third(const Site_2& t, const Storage_site_2& ss);
-  Vertex_handle  insert_third(const Storage_site_2& ss, Vertex_handle v0,
-			      Vertex_handle v1);
-
-  Vertex_handle insert_point(const Storage_site_2& ss, const Point_2& p,
-			     Vertex_handle vnear);
-  Vertex_handle insert_point(const Storage_site_2& ss,
-			     const Site_2& t, Vertex_handle vnear);
-  Vertex_handle insert_point2(const Storage_site_2& ss,
-			      const Site_2& t, Vertex_handle vnear);
-
-  Triple<Vertex_handle,Vertex_handle,Vertex_handle>
-  insert_point_on_segment(const Storage_site_2& ss, const Site_2& t,
-			  Vertex_handle v, const Tag_true&);
-
-  Triple<Vertex_handle,Vertex_handle,Vertex_handle>
-  insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
-				Vertex_handle v);
-
-  Vertex_handle insert_segment(const Storage_site_2& ss, const Site_2& t,
-			       Vertex_handle vnear);
-
-  Vertex_handle insert_segment_interior(const Site_2& t,
-					const Storage_site_2& ss,
-					Vertex_handle vnear);
-
-  template<class ITag>
-  inline
-  Vertex_handle insert_intersecting_segment(const Storage_site_2& ss,
-					    const Site_2& t,
-					    Vertex_handle v,
-					    ITag tag) {
-    return insert_intersecting_segment_with_tag(ss, t, v, tag);
-  }
-
-  Vertex_handle
-  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				       const Site_2& t,
-				       Vertex_handle v, Tag_false);
-
-  Vertex_handle
-  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				       const Site_2& t,
-				       Vertex_handle v, Tag_true);
-
-
-
-public:
-  // NEAREST NEIGHBOR LOCATION
-  //--------------------------
-  inline Vertex_handle nearest_neighbor(const Point_2& p) const {
-    return nearest_neighbor(Site_2::construct_site_2(p), Vertex_handle());
-  }
-
-  inline Vertex_handle nearest_neighbor(const Point_2& p,
-					Vertex_handle vnear) const {
-    return nearest_neighbor(Site_2::construct_site_2(p), vnear);
-  }
-
-protected:
-  Vertex_handle nearest_neighbor(const Site_2& p,
-				 Vertex_handle vnear) const;
-
-
-protected:
-  // I/O METHODS
-  //------------
-  typedef std::map<const_Point_handle,size_type,Point_handle_less_than>
-  Point_handle_mapper;
-
-  typedef std::vector<Point_handle> Point_handle_vector;
-
-  void file_output(std::ostream&, const Storage_site_2&,
-		   Point_handle_mapper&) const;
-
-  void file_output(std::ostream&, Point_handle_mapper&,
-		   bool print_point_container) const;
-
-  void file_input(std::istream&, Storage_site_2&,
-		  const Point_handle_vector&, const Tag_true&) const;
-  void file_input(std::istream&, Storage_site_2&,
-		  const Point_handle_vector&, const Tag_false&) const;
-  void file_input(std::istream&, bool read_handle_vector,
-		  Point_handle_vector&);
-
-public:
-  void file_input(std::istream& is) {
-    Point_handle_vector P;
-    file_input(is, true, P);
-  }
-
-  void file_output(std::ostream& os) const {
-    Point_handle_mapper P;
-    size_type inum = 0;
-    for (const_Point_handle ph = pc_.begin(); ph != pc_.end(); ++ph) {
-      P[ph] = inum++;
-    }
-    file_output(os, P, true);
-  }
-
-  template< class Stream >
-  Stream& draw_dual(Stream& str) const
-  {
-    Finite_edges_iterator eit = finite_edges_begin();
-    for (; eit != finite_edges_end(); ++eit) {
-      draw_dual_edge(*eit, str);
-    }
-    return str;
-  }
-
-  template < class Stream > 
-  Stream& draw_skeleton(Stream& str) const
-  {
-    Finite_edges_iterator eit = finite_edges_begin();
-    for (; eit != finite_edges_end(); ++eit) {
-      Site_2 p = eit->first->vertex(  cw(eit->second) )->site();
-      Site_2 q = eit->first->vertex( ccw(eit->second) )->site();
-
-      bool is_endpoint_of_seg =
-	( p.is_segment() && q.is_point() &&
-	  is_endpoint_of_segment(q, p) ) ||
-	( p.is_point() && q.is_segment() &&
-	  is_endpoint_of_segment(p, q) );
-
-      if ( !is_endpoint_of_seg ) {
-	draw_dual_edge(*eit, str);
-      }
-    }
-    return str;
-  }
-
-  // MK: this has to be rewritten. all the checking must be done in
-  // the geometric traits class.
-  template< class Stream >
-  Stream& draw_dual_edge(Edge e, Stream& str) const
-  {
-    CGAL_precondition( !is_infinite(e) );
-
-    typename Geom_traits::Line_2              l;
-    typename Geom_traits::Segment_2           s;
-    typename Geom_traits::Ray_2               r;
-    CGAL::Parabola_segment_2<Gt>              ps;
-
-    Object o = primal(e);
-
-    if (CGAL::assign(l, o))   str << l;
-    if (CGAL::assign(s, o))   str << s; 
-    if (CGAL::assign(r, o))   str << r;
-    if (CGAL::assign(ps, o))  ps.draw(str);
-
-    return str;
-  }
-
-  template< class Stream >
-  inline
-  Stream& draw_dual_edge(Edge_circulator ec, Stream& str) const {
-    return draw_dual_edge(*ec, str);
-  }
-
-  template< class Stream >
-  inline
-  Stream& draw_dual_edge(Finite_edges_iterator eit, Stream& str) const {
-    return draw_dual_edge(*eit, str);
-  }
-
-public:
-  // VALIDITY CHECK
-  //---------------
-  bool is_valid(bool verbose = false, int level = 1) const;
-
-public:
-  // MISCELLANEOUS
-  //--------------
-  void clear() {
-    DG::clear();
-    pc_.clear();
-    isc_.clear();
-  }
-
-  void swap(Segment_Delaunay_graph_2& sdg) {
-    DG::swap(sdg);
-    pc_.swap(sdg.pc_);
-    isc_.swap(sdg.isc_);
-  }
-
-  //////////////////////////////////////////////////////////////////////
-  // THE METHODS BELOW ARE LOCAL
-  //////////////////////////////////////////////////////////////////////
-
-protected:
-  // THE COPY METHOD
-  //------------------------------------------------------------------
-  // used in the copy constructor and assignment operator
-
-  Storage_site_2
-  copy_storage_site(const Storage_site_2& ss_other,
-		    Handle_map& hm, const Tag_false&);
-
-  Storage_site_2
-  copy_storage_site(const Storage_site_2& ss_other,
-		    Handle_map& hm, const Tag_true&);
-
-  void copy(Segment_Delaunay_graph_2& other);
-  void copy(Segment_Delaunay_graph_2& other, Handle_map& hm);
-
-protected:
-  // HELPER METHODS FOR COMBINATORIAL OPERATIONS ON THE DATA STRUCTURE
-  //------------------------------------------------------------------
-
-  // getting the degree of a vertex
-  inline
-  typename Data_structure::size_type degree(const Vertex_handle& v) const {
-    return this->_tds.degree(v);
-  }
-
-  // getting the symmetric edge
-  inline Edge sym_edge(const Edge e) const {
-    return sym_edge(e.first, e.second);
-  }
-
-  inline Edge sym_edge(const Face_handle& f, int i) const {
-    Face_handle f_sym = f->neighbor(i);
-#ifdef CGAL_SDG_ALTERNATE_SYMEDGE_IMPLEMENTATION_BY_AF
-    int count = ( f_sym->neighbor(0) == f );
-    int i_sym = 0;
-    if ( f_sym->neighbor(1) == f ) {
-      ++count;
-      i_sym = 1;
-    }
-    if ( f_sym->neighbor(2) == f ) {
-      ++count;
-      i_sym = 2;
-    }
-    if ( count == 1 ) {
-      return Edge(f_sym, i_sym);
-    }
-    return Edge(f_sym, f_sym->index( f->vertex(i) ));
-#else
-    return Edge(  f_sym, f_sym->index( this->_tds.mirror_vertex(f, i) )  );
-#endif
-  }
-
-  Edge flip(Face_handle& f, int i) {
-    CGAL_precondition ( f != Face_handle() );
-    CGAL_precondition (i == 0 || i == 1 || i == 2);
-    CGAL_precondition( this->dimension()==2 ); 
-
-    CGAL_precondition( f->vertex(i) != this->_tds.mirror_vertex(f, i) );
-
-    this->_tds.flip(f, i);
-
-    return Edge(f, ccw(i));
-  }
-
-  inline Edge flip(Edge e) {
-    return flip(e.first, e.second);
-  }
-
-  inline bool is_degree_2(const Vertex_handle& v) const {
-    Face_circulator fc = incident_faces(v);
-    Face_circulator fc1 = fc;
-    ++(++fc1);
-    return ( fc == fc1 );
-  }
-
-  inline Vertex_handle insert_degree_2(Edge e) {
-    return this->_tds.insert_degree_2(e.first,e.second);
-  }
-
-  inline Vertex_handle insert_degree_2(Edge e, const Storage_site_2& ss) {
-    Vertex_handle v = insert_degree_2(e);
-    v->set_site(ss);
-    return v;
-  }
-
-  inline void remove_degree_2(Vertex_handle v) {
-    CGAL_precondition( is_degree_2(v) );
-    this->_tds.remove_degree_2(v);
-  }
-
-  inline void remove_degree_3(Vertex_handle v) {
-    CGAL_precondition( degree(v) == 3 );
-    this->_tds.remove_degree_3(v, Face_handle());
-  }
-
-  inline Vertex_handle create_vertex(const Storage_site_2& ss) {
-    Vertex_handle v = this->_tds.create_vertex();
-    v->set_site(ss);
-    return v;
-  }
-
-  inline Vertex_handle create_vertex_dim_up(const Storage_site_2& ss) {
-    Vertex_handle v = this->_tds.insert_dim_up(infinite_vertex());
-    v->set_site(ss);
-    return v;
-  }
-
-protected:
-  // HELPER METHODS FOR CREATING STORAGE SITES
-  //------------------------------------------
-  inline
-  Storage_site_2 split_storage_site(const Storage_site_2& ss0,
-				    const Storage_site_2& ss1,
-				    bool first)
-  {
-    // Split the first storage site which is a segment using the
-    // second storage site which is an exact point
-    // i denotes whether the first or second half is to be created
-    CGAL_precondition( ss0.is_segment() && ss1.is_point() );
-
-    return st_.construct_storage_site_2_object()(ss0, ss1, first);
-  }
-
-public:
-  // METHODS FOR ACCESSING THE PRIMAL GRAPH
-  //---------------------------------------
-  // used primarily for visualization
-  inline Point_2 primal(const Face_handle& f) const {
-    return circumcenter(f);
-  }
-
-  Object primal(const Edge e) const;
-
-  inline Object primal(const Edge_circulator& ec) const {
-    return primal(*ec); 
-  }
-
-  inline Object primal(const Finite_edges_iterator& ei) const {
-    return primal(*ei);
-  }
-
-protected:
-  void print_error_message() const;
-
-  void print_error_message(const Tag_false&) const
-  {
-    static int i = 0;
-
-    if ( i == 0 ) {
-      i++;
-      std::cerr << "SDG::Insert aborted: intersecting segments found"
-		<< std::endl;
-    }
-  }
-
-  void print_error_message(const Tag_true&) const {}
-
-  //protected:
-public:
-  // wrappers for constructions
-  inline Point_2 circumcenter(const Face_handle& f) const {
-    CGAL_precondition( this->dimension()==2 || !is_infinite(f) );
-    return circumcenter(f->vertex(0)->site(),
-			f->vertex(1)->site(),
-			f->vertex(2)->site());
-  }
-
-  inline Point_2 circumcenter(const Site_2& t0, const Site_2& t1, 
-			      const Site_2& t2) const {
-    return
-    geom_traits().construct_svd_vertex_2_object()(t0, t1, t2);
-  }
-
-protected:
-  // HELPER METHODS FOR INSERTION
-  //-----------------------------
-  void initialize_conflict_region(const Face_handle& f, List& l);
-
-  std::pair<Face_handle,Face_handle>
-  find_faces_to_split(const Vertex_handle& v, const Site_2& t) const;
-
-  void expand_conflict_region(const Face_handle& f, const Site_2& t,
-			      const Storage_site_2& ss,
-#ifdef CGAL_SDG_NO_FACE_MAP
-			      List& l,
-#else
-			      List& l, Face_map& fm,
-			      std::map<Face_handle,Sign>& sign_map,
-#endif
-			      Triple<bool, Vertex_handle,
-			      Arrangement_type>& vcross);
-
-  Vertex_handle add_bogus_vertex(Edge e, List& l);
-  Vertex_list   add_bogus_vertices(List& l);
-  void          remove_bogus_vertices(Vertex_list& vl);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-  void retriangulate_conflict_region(Vertex_handle v, List& l);
-#else
-  void retriangulate_conflict_region(Vertex_handle v, List& l,
-				     Face_map& fm);
-#endif
-
-
-protected:
-  // TYPES AND ACCESS METHODS FOR VISUALIZATION
-  //-------------------------------------------
-
-  // types
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_circle_2<Gt,Integral_domain_without_division_tag>
-  Construct_sdg_circle_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_2<Gt,Integral_domain_without_division_tag>
-  Construct_sdg_bisector_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_ray_2<Gt,Integral_domain_without_division_tag>
-  Construct_sdg_bisector_ray_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
-  Construct_sdg_bisector_segment_2<Gt,Integral_domain_without_division_tag>
-  Construct_sdg_bisector_segment_2;
-
-  // access
-  inline Construct_sdg_circle_2
-  construct_sdg_circle_2_object() const{
-    return Construct_sdg_circle_2();
-  }
-
-  inline Construct_sdg_bisector_2
-  construct_sdg_bisector_2_object() const {
-    return Construct_sdg_bisector_2();
-  }
-
-  inline Construct_sdg_bisector_ray_2
-  construct_sdg_bisector_ray_2_object() const {
-    return Construct_sdg_bisector_ray_2();
-  }
-
-  inline Construct_sdg_bisector_segment_2
-  construct_sdg_bisector_segment_2_object() const { 
-    return Construct_sdg_bisector_segment_2(); 
-  }
-
-protected:
-  // WRAPPERS FOR GEOMETRIC PREDICATES
-  //----------------------------------
-  inline
-  bool same_points(const Storage_site_2& p, const Storage_site_2& q) const {
-    return geom_traits().equal_2_object()(p.site(), q.site());
-  }
-
-  inline
-  bool same_segments(const Storage_site_2& t, Vertex_handle v) const {
-    if ( is_infinite(v) ) { return false; }
-    if ( t.is_point() || v->storage_site().is_point() ) { return false; }
-    return same_segments(t.site(), v->site());
-  }
-
-  inline
-  bool is_endpoint_of_segment(const Storage_site_2& p,
-			      const Storage_site_2& s) const
-  {
-    CGAL_precondition( p.is_point() && s.is_segment() );
-    return ( same_points(p, s.source_site()) ||
-	     same_points(p, s.target_site()) );
-  }
-
-  inline
-  bool is_degenerate_segment(const Storage_site_2& s) const {
-    CGAL_precondition( s.is_segment() );
-    return same_points(s.source_site(), s.target_site());
-  }
-
-  // returns:
-  //   ON_POSITIVE_SIDE if q is closer to t1
-  //   ON_NEGATIVE_SIDE if q is closer to t2
-  //   ON_ORIENTED_BOUNDARY if q is on the bisector of t1 and t2
-  inline
-  Oriented_side side_of_bisector(const Storage_site_2 &t1,
-				 const Storage_site_2 &t2,
-				 const Storage_site_2 &q) const {
-    return
-      geom_traits().oriented_side_of_bisector_2_object()(t1.site(),
-							 t2.site(),
-							 q.site());
-  }
-
-  inline
-  Sign incircle(const Storage_site_2 &t1, const Storage_site_2 &t2,
-		const Storage_site_2 &t3, const Storage_site_2 &q) const {
-#ifdef CGAL_PROFILE_SDG_DUMP_INCIRCLE
-    typedef typename Geom_traits::FT  FT;
-    if ( !Algebraic_structure_traits<FT>::Is_exact::value ) {
-      std::ofstream ofs("incircle.cin", std::ios_base::app);
-      ofs.precision(16);
-      ofs << t1.site() << " ";
-      ofs << t2.site() << " ";
-      ofs << t3.site() << " ";
-      ofs <<  q.site() << std::endl;
-      ofs.close();
-    }
-#endif
-    return geom_traits().vertex_conflict_2_object()(t1.site(),
-						    t2.site(),
-						    t3.site(),
-						    q.site());
-  }
-
-  inline
-  Sign incircle(const Storage_site_2 &t1, const Storage_site_2 &t2,
-		const Storage_site_2 &q) const {
-    return geom_traits().vertex_conflict_2_object()(t1.site(),
-						    t2.site(),
-						    q.site());
-  }
-
-  inline
-  Sign incircle(const Face_handle& f, const Storage_site_2& q) const {
-    return incircle(f, q.site());
-  }
-
-  inline
-  bool finite_edge_interior(const Storage_site_2& t1,
-			    const Storage_site_2& t2,
-			    const Storage_site_2& t3,
-			    const Storage_site_2& t4,
-			    const Storage_site_2& q, Sign sgn) const {
-    return
-      geom_traits().finite_edge_interior_conflict_2_object()
-      (t1.site(), t2.site(), t3.site(), t4.site(), q.site(), sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Face_handle& f, int i,
-			    const Storage_site_2& q, Sign sgn) const {
-    CGAL_precondition( !is_infinite(f) &&
-		       !is_infinite(f->neighbor(i)) );
-    return finite_edge_interior( f->vertex( ccw(i) )->site(),
-				 f->vertex(  cw(i) )->site(),
-				 f->vertex(     i  )->site(),
-				 this->_tds.mirror_vertex(f, i)->site(),
-				 q.site(), sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Storage_site_2& t1,
-			    const Storage_site_2& t2,
-			    const Storage_site_2& t3,
-			    const Storage_site_2& q,
-			    Sign sgn) const {
-    return geom_traits().finite_edge_interior_conflict_2_object()(t1.site(),
-								  t2.site(),
-								  t3.site(),
-								  q.site(),
-								  sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Storage_site_2& t1,
-			    const Storage_site_2& t2,
-			    const Storage_site_2& q,
-			    Sign sgn) const {
-    return
-      geom_traits().finite_edge_interior_conflict_2_object()(t1.site(),
-							     t2.site(),
-							     q.site(),
-							     sgn);
-  }
-
-  bool finite_edge_interior(const Face_handle& f, int i,
-			    const Storage_site_2& p, Sign sgn,
-			    int j) const {
-    return finite_edge_interior(f, i, p.site(), sgn, j);
-  }
-
-  inline
-  bool infinite_edge_interior(const Storage_site_2& t2,
-			      const Storage_site_2& t3,
-			      const Storage_site_2& t4,
-			      const Storage_site_2& q, Sign sgn) const {
-    return
-      geom_traits().infinite_edge_interior_conflict_2_object()
-      (t2.site(), t3.site(), t4.site(), q.site(), sgn);
-  }
-
-  inline
-  bool infinite_edge_interior(const Face_handle& f, int i,
-			      const Storage_site_2& q, Sign sgn) const
-  {
-    return infinite_edge_interior(f, i, q, sgn);
-  }
-
-  inline
-  bool edge_interior(const Face_handle& f, int i,
-		     const Storage_site_2& t, Sign sgn) const {
-    return edge_interior(f, i, t.site(), sgn);
-  }
-
-  inline
-  bool edge_interior(const Edge& e,
-		     const Storage_site_2& t, Sign sgn) const {
-    return edge_interior(e.first, e.second, t, sgn);
-  }
-
-  inline Arrangement_type
-  arrangement_type(const Storage_site_2& t, const Vertex_handle& v) const {
-    if ( is_infinite(v) ) { return AT2::DISJOINT; }
-    return arrangement_type(t, v->storage_site());
-  }
-
-  inline
-  Arrangement_type arrangement_type(const Storage_site_2& p,
-				    const Storage_site_2& q) const {
-    return arrangement_type(p.site(), q.site());
-  }
-
-  inline
-  bool are_parallel(const Storage_site_2& p, const Storage_site_2& q) const {
-    return geom_traits().are_parallel_2_object()(p.site(), q.site());
-  }
-
-  inline Oriented_side
-  oriented_side(const Storage_site_2& q, const Storage_site_2& supp,
-		const Storage_site_2& p) const
-  {
-    CGAL_precondition( q.is_point() && supp.is_segment() && p.is_point() );
-    return
-      geom_traits().oriented_side_2_object()(q.site(), supp.site(), p.site());
-  }
-
-  inline Oriented_side
-  oriented_side(const Storage_site_2& s1, const Storage_site_2& s2,
-		const Storage_site_2& s3, const Storage_site_2& supp,
-		const Storage_site_2& p) const {
-    CGAL_precondition( supp.is_segment() && p.is_point() );
-    return geom_traits().oriented_side_2_object()(s1.site(),
-						  s2.site(),
-						  s3.site(),
-						  supp.site(), p.site());
-  }
-
-
-  //-------
-
-  inline
-  bool same_points(const Site_2& p, const Site_2& q) const {
-    return geom_traits().equal_2_object()(p, q);
-  }
-
-  inline
-  bool same_segments(const Site_2& t, Vertex_handle v) const {
-    if ( is_infinite(v) ) { return false; }
-    if ( t.is_point() || v->site().is_point() ) { return false; }
-    return same_segments(t, v->site());
-  }
-
-  inline
-  bool same_segments(const Site_2& p, const Site_2& q) const {
-    CGAL_precondition( p.is_segment() && q.is_segment() );
-
-    return
-      (same_points(p.source_site(), q.source_site()) &&
-       same_points(p.target_site(), q.target_site())) ||
-      (same_points(p.source_site(), q.target_site()) &&
-       same_points(p.target_site(), q.source_site()));
-  }
-
-  inline
-  bool is_endpoint_of_segment(const Site_2& p, const Site_2& s) const
-  {
-    CGAL_precondition( p.is_point() && s.is_segment() );
-    return ( same_points(p, s.source_site()) ||
-	     same_points(p, s.target_site()) );
-  }
-
-  inline
-  bool is_degenerate_segment(const Site_2& s) const {
-    CGAL_precondition( s.is_segment() );
-    return same_points(s.source_site(), s.target_site());
-  }
-
-  // returns:
-  //   ON_POSITIVE_SIDE if q is closer to t1
-  //   ON_NEGATIVE_SIDE if q is closer to t2
-  //   ON_ORIENTED_BOUNDARY if q is on the bisector of t1 and t2
-  inline
-  Oriented_side side_of_bisector(const Site_2 &t1, const Site_2 &t2,
-				 const Site_2 &q) const {
-    return geom_traits().oriented_side_of_bisector_2_object()(t1, t2, q);
-  }
-
-  inline
-  Sign incircle(const Site_2 &t1, const Site_2 &t2,
-		const Site_2 &t3, const Site_2 &q) const {
-#ifdef CGAL_PROFILE_SDG_DUMP_INCIRCLE
-    typedef typename Geom_traits::FT  FT;
-    if ( !Algebraic_structure_traits<FT>::Is_exact::value ) {
-      std::ofstream ofs("incircle.cin", std::ios_base::app);
-      ofs.precision(16);
-      ofs << t1 << " ";
-      ofs << t2 << " ";
-      ofs << t3 << " ";
-      ofs <<  q << std::endl;
-      ofs.close();
-    }
-#endif
-    return geom_traits().vertex_conflict_2_object()(t1, t2, t3, q);
-  }
-
-  inline
-  Sign incircle(const Site_2 &t1, const Site_2 &t2,
-		const Site_2 &q) const {
-    return geom_traits().vertex_conflict_2_object()(t1, t2, q);
-  }
-
-  inline
-  Sign incircle(const Face_handle& f, const Site_2& q) const;
-
-  inline
-  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
-		const Vertex_handle& v) const {
-    CGAL_precondition( !is_infinite(v0) && !is_infinite(v1)
-		       && !is_infinite(v) );
-
-    return incircle( v0->site(), v1->site(), v->site());
-  }
-
-  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
-		const Vertex_handle& v2, const Vertex_handle& v) const;
-
-  inline
-  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
-			    const Site_2& t3, const Site_2& t4,
-			    const Site_2& q,  Sign sgn) const {
-    return
-      geom_traits().finite_edge_interior_conflict_2_object()
-      (t1,t2,t3,t4,q,sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Face_handle& f, int i,
-			    const Site_2& q, Sign sgn) const {
-    CGAL_precondition( !is_infinite(f) &&
-		       !is_infinite(f->neighbor(i)) );
-    return finite_edge_interior( f->vertex( ccw(i) )->site(),
-				 f->vertex(  cw(i) )->site(),
-				 f->vertex(     i  )->site(),
-				 this->_tds.mirror_vertex(f, i)->site(),
-				 q, sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
-			    const Vertex_handle& v3, const Vertex_handle& v4,
-			    const Vertex_handle& v, Sign sgn) const {
-    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
-		       !is_infinite(v3) && !is_infinite(v4) &&
-		       !is_infinite(v) );
-    return finite_edge_interior( v1->site(), v2->site(),
-				 v3->site(), v4->site(),
-				 v->site(), sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
-			    const Site_2& t3, const Site_2& q,
-			    Sign sgn) const {
-    return
-    geom_traits().finite_edge_interior_conflict_2_object()(t1,t2,t3,q,sgn);
-  }
-
-  inline
-  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
-			    const Site_2& q,  Sign sgn) const {
-    return
-    geom_traits().finite_edge_interior_conflict_2_object()(t1,t2,q,sgn);
-  }
-
-  bool finite_edge_interior(const Face_handle& f, int i,
-			    const Site_2& p, Sign sgn, int) const;
-
-  bool finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
-			    const Vertex_handle& v3, const Vertex_handle& v4,
-			    const Vertex_handle& v, Sign, int) const;
-
-  inline
-  bool infinite_edge_interior(const Site_2& t2, const Site_2& t3,
-			      const Site_2& t4, const Site_2& q,
-			      Sign sgn) const {
-    return
-      geom_traits().infinite_edge_interior_conflict_2_object()
-      (t2,t3,t4,q,sgn);
-  }
-
-
-  bool infinite_edge_interior(const Face_handle& f, int i,
-			      const Site_2& q, Sign sgn) const;
-
-  bool infinite_edge_interior(const Vertex_handle& v1,
-			      const Vertex_handle& v2,
-			      const Vertex_handle& v3,
-			      const Vertex_handle& v4,
-			      const Vertex_handle& v,
-			      Sign sgn) const;
-
-  bool edge_interior(const Face_handle& f, int i,
-		     const Site_2& t, Sign sgn) const;
-
-  bool edge_interior(const Edge& e,
-		     const Site_2& t, Sign sgn) const {
-    return edge_interior(e.first, e.second, t, sgn);
-  }
-
-  bool edge_interior(const Vertex_handle& v1,
-		     const Vertex_handle& v2,
-		     const Vertex_handle& v3,
-		     const Vertex_handle& v4,
-		     const Vertex_handle& v,
-		     Sign sgn) const;
-
-  inline Arrangement_type
-  arrangement_type(const Site_2& t, const Vertex_handle& v) const {
-    if ( is_infinite(v) ) { return AT2::DISJOINT; }
-    return arrangement_type(t, v->site());
-  }
-
-  Arrangement_type arrangement_type(const Site_2& p, const Site_2& q) const;
-
-  inline
-  bool are_parallel(const Site_2& p, const Site_2& q) const {
-    return geom_traits().are_parallel_2_object()(p, q);
-  }
-
-  inline Oriented_side
-  oriented_side(const Site_2& q, const Site_2& supp, const Site_2& p) const
-  {
-    CGAL_precondition( q.is_point() && supp.is_segment() && p.is_point() );
-    return geom_traits().oriented_side_2_object()(q, supp, p);
-  }
-
-  inline Oriented_side
-  oriented_side(const Site_2& s1, const Site_2& s2, const Site_2& s3,
-		const Site_2& supp, const Site_2& p) const {
-    CGAL_precondition( supp.is_segment() && p.is_point() );
-    return geom_traits().oriented_side_2_object()(s1, s2, s3, supp, p);
-  }
-
-  bool is_degenerate_edge(const Site_2& p1,
-			  const Site_2& p2,
-			  const Site_2& p3,
-			  const Site_2& p4) const {
-    return geom_traits().is_degenerate_edge_2_object()
-      (p1, p2, p3, p4);
-  }
-
-  bool is_degenerate_edge(const Vertex_handle& v1,
-			  const Vertex_handle& v2,
-			  const Vertex_handle& v3,
-			  const Vertex_handle& v4) const {
-    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
-		       !is_infinite(v3) && !is_infinite(v4) );
-
-    return is_degenerate_edge(v1->site(), v2->site(),
-			      v3->site(), v4->site());
-  }
-
-  bool is_degenerate_edge(const Face_handle& f, int i) const {
-    Vertex_handle v1 = f->vertex( ccw(i) );
-    Vertex_handle v2 = f->vertex(  cw(i) );
-    Vertex_handle v3 = f->vertex(     i  );
-    Vertex_handle v4 = this->_tds.mirror_vertex(f, i);
-
-    return is_degenerate_edge(v1, v2, v3, v4);
-  }
-
-  bool is_degenerate_edge(const Edge& e) const {
-    return is_degenerate_edge(e.first, e.second);
-  }
-
-  Vertex_handle first_endpoint_of_segment(const Vertex_handle& v) const;
-  Vertex_handle second_endpoint_of_segment(const Vertex_handle& v) const;
-
-}; // Segment_Delaunay_graph_2
-
-
-template<class Gt, class D_S, class LTag>
-std::istream& operator>>(std::istream& is,
-			 Segment_Delaunay_graph_2<Gt,D_S,LTag>& sdg)
-{
-  sdg.file_input(is);
-  return is;
-}
-
-template<class Gt, class D_S, class LTag>
-std::ostream& operator<<(std::ostream& os,
-			 const Segment_Delaunay_graph_2<Gt,D_S,LTag>& sdg)
-{
-  sdg.file_output(os);
-  return os;
-}
-
-} //namespace CGAL
-
-
-#include <CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h>
-
-
-#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h
deleted file mode 100644
index 4bf7eb1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h
+++ /dev/null
@@ -1,470 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
-#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
-
-#include <CGAL/Segment_Delaunay_graph_2/basic.h>
-#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h>
-
-#include <CGAL/Filtered_predicate.h>
-#include <CGAL/Filtered_construction.h>
-
-#include <CGAL/number_utils_classes.h>
-#include <CGAL/Cartesian_converter.h>
-
-namespace CGAL {
-
-
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-// the filtered Traits class
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-//-----------------------------------------------------------------------
-
-template<class CK_t, class CK_MTag, class EK_t, class EK_MTag,
-	 class FK_t, class FK_MTag, class C2E_t, class C2F_t,
-	 class ITag>
-class Segment_Delaunay_graph_filtered_traits_base_2
-{
-private:
-  typedef
-  Segment_Delaunay_graph_filtered_traits_base_2<CK_t, CK_MTag,
-						EK_t, EK_MTag,
-						FK_t, FK_MTag,
-						C2E_t, C2F_t,
-						ITag>  Self;
-
-  typedef Segment_Delaunay_graph_traits_base_2<CK_t,CK_MTag,ITag> CK_traits;
-  typedef Segment_Delaunay_graph_traits_base_2<FK_t,FK_MTag,ITag> FK_traits;
-  typedef Segment_Delaunay_graph_traits_base_2<EK_t,EK_MTag,ITag> EK_traits;
-
-  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<CK_t,ITag>  CK;
-  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<FK_t,ITag>  FK;
-  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<EK_t,ITag>  EK;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,EK,C2E_t>   C2E;
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,FK,C2F_t>   C2F;
-
-  typedef
-  Cartesian_converter<FK, CK, To_double<typename FK::RT> >  F2C_t;
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<FK,CK,F2C_t>   F2C;
-
-  typedef
-  Cartesian_converter<EK, CK, To_double<typename EK::RT> >  E2C_t;
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<EK,CK,E2C_t>   E2C;
-  
-  // Types for the construction kernel
-  typedef typename CK::Point_2                CK_Point_2;
-  typedef typename CK::Line_2                 CK_Line_2;
-  typedef typename CK::Segment_2              CK_Segment_2;
-  typedef typename CK::Ray_2                  CK_Ray_2;
-
-  typedef typename CK::Site_2                 CK_Site_2;
-
-  typedef typename CK::FT                     CK_FT;
-  typedef typename CK::RT                     CK_RT;
-
-  // Types for the exact kernel
-  typedef typename EK::Point_2                EK_Point_2;
-  typedef typename EK::Line_2                 EK_Line_2;
-  typedef typename EK::Segment_2              EK_Segment_2;
-  typedef typename EK::Ray_2                  EK_Ray_2;
-
-  typedef typename EK::Site_2                 EK_Site_2;
-
-  typedef typename EK::FT                     EK_FT;
-  typedef typename EK::RT                     EK_RT;
-
-  // Types for the filtering kernel
-  typedef typename FK::Point_2                FK_Point_2;
-  typedef typename FK::Line_2                 FK_Line_2;
-  typedef typename FK::Segment_2              FK_Segment_2;
-  typedef typename FK::Ray_2                  FK_Ray_2;
-
-  typedef typename FK::Site_2                 FK_Site_2;
-
-  typedef typename FK::FT                     FK_FT;
-  typedef typename FK::RT                     FK_RT;
-
-public:
-  //-----------------------------------------------------------------------
-  //                  TYPE DEFINITIONS
-  //-----------------------------------------------------------------------
-
-  // BASIC TYPES
-  //------------
-  typedef CK_t                          R;
-  typedef CK_MTag                       Method_tag;
-  typedef ITag                          Intersections_tag;
-
-  typedef CK_t                          Construction_kernel;
-  typedef FK_t                          Filtering_kernel;
-  typedef EK_t                          Exact_kernel;
-
-  typedef CK_traits                     Construction_traits;
-  typedef FK_traits                     Filtering_traits;
-  typedef EK_traits                     Exact_traits;
-
-  typedef CK_MTag                       Construction_traits_method_tag;
-  typedef FK_MTag                       Filtering_traits_method_tag;
-  typedef EK_MTag                       Exact_traits_method_tag;
-
-  typedef typename CK::Point_2          Point_2;
-  typedef typename CK::Line_2           Line_2;
-  typedef typename CK::Segment_2        Segment_2;
-  typedef typename CK::Ray_2            Ray_2;
-  //  typedef typename CK::Circle_2         Circle_2;
-  typedef typename CK::Site_2           Site_2;
-
-  typedef typename CK::Object_2         Object_2;
-
-  typedef typename CK::FT               FT;
-  typedef typename CK::RT               RT;
-
-  typedef typename CK::Rep_tag          Rep_tag;
-
-protected:
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Arrangement_enum
-  Arrangement_enum;
-
-private:
-  typedef typename CK_traits::Construct_svd_vertex_2
-  CK_Construct_svd_vertex_2;
-
-  typedef typename FK_traits::Construct_svd_vertex_2
-  FK_Construct_svd_vertex_2;
-
-  typedef typename EK_traits::Construct_svd_vertex_2
-  EK_Construct_svd_vertex_2;
-
-public:
-  // OBJECT CONSTRUCTION & ASSIGNMENT
-  //---------------------------------
-  typedef typename CK::Construct_object_2     Construct_object_2;
-  typedef typename CK::Assign_2               Assign_2;
-
-  // CONSTRUCTIONS
-  //--------------
-  // vertex and Voronoi circle
-  typedef
-  Filtered_construction<CK_Construct_svd_vertex_2,
-			EK_Construct_svd_vertex_2,
-			FK_Construct_svd_vertex_2,
-			C2E, C2F, E2C, F2C>
-  Construct_svd_vertex_2;
-
-  //  typedef typename CK::Construct_site_2   Construct_site_2;
-
-  //  typedef typename CK_traits::Construct_sdg_circle_2
-  //  Construct_sdg_circle_2;
-
-private:
-  // PREDICATES FOR THE TWO KERNELS
-  //-------------------------------
-#if 1
-  // Predicates for the filtering kernel
-  typedef typename FK_traits::Compare_x_2        FK_Compare_x_2;
-  typedef typename FK_traits::Compare_y_2        FK_Compare_y_2;
-  typedef typename FK_traits::Orientation_2      FK_Orientation_2;
-  typedef typename FK_traits::Equal_2            FK_Equal_2;
-  typedef typename FK_traits::Are_parallel_2     FK_Are_parallel_2;
-
-  typedef typename FK_traits::Oriented_side_of_bisector_2
-  FK_Oriented_side_of_bisector_2;
-
-  typedef typename FK_traits::Vertex_conflict_2  FK_Vertex_conflict_2;
-
-  typedef typename FK_traits::Finite_edge_interior_conflict_2
-  FK_Finite_edge_interior_conflict_2;
-
-  typedef typename FK_traits::Infinite_edge_interior_conflict_2
-  FK_Infinite_edge_interior_conflict_2;
-
-  typedef typename FK_traits::Is_degenerate_edge_2
-  FK_Is_degenerate_edge_2;
-
-  typedef typename FK_traits::Arrangement_type_2 FK_Arrangement_type_2;
-  typedef typename FK_traits::Oriented_side_2    FK_Oriented_side_2;
-
-  // Predicates for the exact kernel
-  typedef typename EK_traits::Compare_x_2        EK_Compare_x_2;
-  typedef typename EK_traits::Compare_y_2        EK_Compare_y_2;
-  typedef typename EK_traits::Orientation_2      EK_Orientation_2;
-  typedef typename EK_traits::Equal_2            EK_Equal_2;
-  typedef typename EK_traits::Are_parallel_2     EK_Are_parallel_2;
-
-  typedef typename EK_traits::Oriented_side_of_bisector_2
-  EK_Oriented_side_of_bisector_2;
-
-  typedef typename EK_traits::Vertex_conflict_2  EK_Vertex_conflict_2;
-
-  typedef typename EK_traits::Finite_edge_interior_conflict_2
-  EK_Finite_edge_interior_conflict_2;
-
-  typedef typename EK_traits::Infinite_edge_interior_conflict_2
-  EK_Infinite_edge_interior_conflict_2;
-
-  typedef typename EK_traits::Is_degenerate_edge_2
-  EK_Is_degenerate_edge_2;
-
-  typedef typename EK_traits::Arrangement_type_2 EK_Arrangement_type_2;
-  typedef typename EK_traits::Oriented_side_2    EK_Oriented_side_2;
-
-#else
-  // Predicates for the filtering kernel
-  typedef Sdg_compare_x_2<FK>                    FK_Compare_x_2;
-  typedef Sdg_compare_y_2<FK>                    FK_Compare_y_2;
-  typedef Sdg_orientation_C2<FK>                 FK_Orientation_2;
-  typedef Sdg_are_same_points_C2<FK>             FK_Equal_2;
-  typedef Sdg_are_parallel_C2<FK>                FK_Are_parallel_2;
-
-  typedef Sdg_oriented_side_of_bisector_C2<FK,FK_MTag>
-  FK_Oriented_side_of_bisector_2;
-
-  typedef Sdg_incircle_2<FK,FK_MTag>             FK_Vertex_conflict_2;
-
-  typedef Sdg_finite_edge_interior_2<FK,FK_MTag>
-  FK_Finite_edge_interior_conflict_2;
-
-  typedef Sdg_infinite_edge_interior_2<FK,FK_MTag>
-  FK_Infinite_edge_interior_conflict_2;
-
-  typedef Sdg_is_degenerate_edge_C2<FK,FK_MTag>  FK_Is_degenerate_edge_2;
-  typedef Sdg_arrangement_type_C2<FK>            FK_Arrangement_type_2;
-  typedef Sdg_oriented_side_C2<FK,FK_MTag>       FK_Oriented_side_2;
-
-  // Predicates for the exact kernel
-  typedef Sdg_compare_x_2<EK>                    EK_Compare_x_2;
-  typedef Sdg_compare_y_2<EK>                    EK_Compare_y_2;
-  typedef Sdg_orientation_C2<EK>                 EK_Orientation_2;
-  typedef Sdg_are_same_points_C2<EK>             EK_Equal_2;
-  typedef Sdg_are_parallel_C2<EK>                EK_Are_parallel_2;
-
-  typedef Sdg_oriented_side_of_bisector_C2<EK,EK_MTag>
-  EK_Oriented_side_of_bisector_2;
-
-  typedef Sdg_incircle_2<EK,EK_MTag>             EK_Vertex_conflict_2;
-
-  typedef Sdg_finite_edge_interior_2<EK,EK_MTag>
-  EK_Finite_edge_interior_conflict_2;
-
-  typedef Sdg_infinite_edge_interior_2<EK,EK_MTag>
-  EK_Infinite_edge_interior_conflict_2;
-
-  typedef Sdg_is_degenerate_edge_C2<EK,EK_MTag>  EK_Is_degenerate_edge_2;
-  typedef Sdg_arrangement_type_C2<EK>            EK_Arrangement_type_2;
-  typedef Sdg_oriented_side_C2<EK,EK_MTag>       EK_Oriented_side_2;
-#endif
-
-public:
-  // PREDICATES
-  //-----------
-  typedef
-  Filtered_predicate<EK_Compare_x_2, FK_Compare_x_2, C2E, C2F>
-  Compare_x_2;
-
-  typedef
-  Filtered_predicate<EK_Compare_y_2, FK_Compare_y_2, C2E, C2F>
-  Compare_y_2;
-
-  typedef
-  Filtered_predicate<EK_Orientation_2, FK_Orientation_2, C2E, C2F>
-  Orientation_2;
-
-  typedef
-  Filtered_predicate<EK_Equal_2, FK_Equal_2, C2E, C2F>
-  Equal_2;
-
-  typedef
-  Filtered_predicate<EK_Are_parallel_2,	FK_Are_parallel_2, C2E, C2F>
-  Are_parallel_2;
-
-  typedef
-  Filtered_predicate<EK_Oriented_side_of_bisector_2,
-		     FK_Oriented_side_of_bisector_2, C2E, C2F>
-  Oriented_side_of_bisector_2;
-
-  typedef
-  Filtered_predicate<EK_Vertex_conflict_2,
-		     FK_Vertex_conflict_2, C2E, C2F>
-  Vertex_conflict_2;
-
-  typedef
-  Filtered_predicate<EK_Finite_edge_interior_conflict_2,
-		     FK_Finite_edge_interior_conflict_2, C2E, C2F>
-  Finite_edge_interior_conflict_2;
-
-  typedef
-  Filtered_predicate<EK_Infinite_edge_interior_conflict_2,
-		     FK_Infinite_edge_interior_conflict_2, C2E, C2F>
-  Infinite_edge_interior_conflict_2;
-
-  typedef
-  Filtered_predicate<EK_Is_degenerate_edge_2,
-		     FK_Is_degenerate_edge_2, C2E, C2F>
-  Is_degenerate_edge_2;
-
-  typedef typename CK::Less_x_2 Less_x_2;
-  typedef typename CK::Less_y_2 Less_y_2;
-
-private:
-  typedef
-  Filtered_predicate<EK_Arrangement_type_2, FK_Arrangement_type_2, C2E, C2F>
-  Arrangement_type_2_base;
-
-public:
-  struct Arrangement_type_2
-    : public Arrangement_type_2_base, public Arrangement_enum
-  {};
-
-  typedef
-  Filtered_predicate<EK_Oriented_side_2, FK_Oriented_side_2, C2E, C2F>
-  Oriented_side_2;
-
-public:
-  //-----------------------------------------------------------------------
-  //                  ACCESS TO OBJECTS
-  //-----------------------------------------------------------------------
-
-  // OBJECT CONSTRUCTION & ASSIGNMENT
-  //---------------------------------
-  Assign_2
-  assign_2_object() const {
-    return Assign_2();
-  }
-
-  Construct_object_2
-  construct_object_2_object() const { 
-    return Construct_object_2();
-  }
-
-  // CONSTRUCTIONS
-  //--------------
-  Construct_svd_vertex_2
-  construct_svd_vertex_2_object() const { 
-    return Construct_svd_vertex_2();
-  }
-
-  /*
-  Construct_site_2
-  construct_site_2_object() const { 
-    return Construct_site_2();
-  }
-  */
-
-  /*
-  Construct_sdg_circle_2
-  construct_sdg_circle_2_object() const {
-    return Construct_sdg_circle_2();
-  }
-  */
-
-  // PREDICATES
-  //-----------
-  Compare_x_2
-  compare_x_2_object() const {
-    return Compare_x_2();
-  }
-
-  Compare_y_2
-  compare_y_2_object() const {
-    return Compare_y_2();
-  }
-
-  Orientation_2
-  orientation_2_object() const {
-    return Orientation_2();
-  }
-
-  Equal_2
-  equal_2_object() const {
-    return Equal_2();
-  }
-
-  Are_parallel_2
-  are_parallel_2_object() const {
-    return Are_parallel_2();
-  }
-
-  Oriented_side_of_bisector_2
-  oriented_side_of_bisector_2_object() const {
-    return Oriented_side_of_bisector_2();
-  }
-
-  Vertex_conflict_2
-  vertex_conflict_2_object() const {
-    return Vertex_conflict_2();
-  }
-
-  Finite_edge_interior_conflict_2
-  finite_edge_interior_conflict_2_object() const {
-    return Finite_edge_interior_conflict_2();
-  }
-
-  Infinite_edge_interior_conflict_2
-  infinite_edge_interior_conflict_2_object() const {
-    return Infinite_edge_interior_conflict_2();
-  }
-
-  Is_degenerate_edge_2
-  is_degenerate_edge_2_object() const {
-    return Is_degenerate_edge_2();
-  }
-
-  Arrangement_type_2
-  arrangement_type_2_object() const {
-    return Arrangement_type_2();
-  }
-
-  Oriented_side_2
-  oriented_side_2_object() const {
-    return Oriented_side_2();
-  }
-
-  Less_x_2
-  less_x_2_object() const {
-    return Less_x_2();
-  }
-
-  Less_y_2
-  less_y_2_object() const {
-    return Less_y_2();
-  }
-};
-
-
-
-} //namespace CGAL
-
-#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h
deleted file mode 100644
index 1dd0fde..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
-#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
-
-#include <CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h>
-
-
-namespace CGAL {
-
-namespace SegmentDelaunayGraph_2 {
-
-//-----------------------------------------------------------------------------
-
-
-
-template<class K, class Method_tag>
-class Oriented_side_C2
-  : public Basic_predicates_C2<K>
-{
-private:
-
-  typedef Basic_predicates_C2<K>              Base;
-  typedef Voronoi_vertex_C2<K,Method_tag>     Voronoi_vertex_2;
-  
-  typedef typename Base::Point_2              Point_2;
-  typedef typename Base::Segment_2            Segment_2;
-  typedef typename Base::Line_2               Line_2;
-  typedef typename Base::Site_2               Site_2;
-  typedef typename Base::FT                   FT;
-  typedef typename Base::RT                   RT;
-
-
-  using Base::compute_supporting_line;
-  using Base::compute_perpendicular;
-
-public:
-  typedef typename Base::Oriented_side        Oriented_side;
-  typedef Oriented_side                       result_type;
-  typedef Site_2                              argument_type;
-
-  // computes the oriented side of the point q
-  // wrt the line that is passes through the point p and its direction
-  // is the direction of the supporting line of s, rotated by 90
-  // degrees counterclockwise.
-  Oriented_side operator()(const Site_2& q, 
-			   const Site_2& s, const Site_2& p) const
-  {
-    CGAL_precondition( q.is_point() );
-    CGAL_precondition( s.is_segment() && p.is_point() );
-
-    Line_2 l = compute_supporting_line( s );
-    Line_2 lp = compute_perpendicular(l, p.point());
-
-    return lp.oriented_side(q.point());
-  }
-
-  // computes the oriented side of the Voronoi vertex of s1, s2, s3
-  // wrt the line that is passes through the point p and its direction
-  // is the direction of the supporting line of s, rotated by 90
-  // degrees counterclockwise.
-  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
-			   const Site_2& s3,
-			   const Site_2& s, const Site_2& p) const
-  {
-    CGAL_precondition( s.is_segment() && p.is_point() );
-
-    Voronoi_vertex_2 v(s1, s2, s3);
-    Line_2 l = compute_supporting_line( s );
-    Line_2 lp = compute_perpendicular(l, p.point());
-
-    return v.oriented_side(lp);
-  }
-};
-
-
-//-----------------------------------------------------------------------------
-
-} //namespace SegmentDelaunayGraph_2
-
-} //namespace CGAL
-
-#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h
deleted file mode 100644
index 30e16d3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h
+++ /dev/null
@@ -1,3284 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-// class implementation continued
-//=================================
-
-namespace CGAL {
-
-//====================================================================
-//====================================================================
-//                   CONSTRUCTORS
-//====================================================================
-//====================================================================
-
-// copy constructor
-template<class Gt, class ST, class D_S, class LTag>
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-Segment_Delaunay_graph_2(const Segment_Delaunay_graph_2& other)
-  : DG(other.geom_traits())
-{
-  Segment_Delaunay_graph_2&
-    non_const_other = const_cast<Segment_Delaunay_graph_2&>(other);
-  copy(non_const_other);
-  CGAL_postcondition( is_valid() );
-}
-
-// assignment operator
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Self&
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-operator=(const Self& other)
-{
-  if ( this != &other ) {
-    Segment_Delaunay_graph_2&
-      non_const_other = const_cast<Segment_Delaunay_graph_2&>(other);
-    copy(non_const_other);
-  }
-  return (*this);
-}
-
-//====================================================================
-//====================================================================
-//                   METHODS FOR INSERTION
-//====================================================================
-//====================================================================
-
-//--------------------------------------------------------------------
-// insertion of first three sites
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_first(const Storage_site_2& ss, const Point_2& )
-{
-  CGAL_precondition( number_of_vertices() == 0 );
-
-  Vertex_handle v = this->_tds.insert_second();
-  v->set_site(ss);
-  return v;
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_second(const Storage_site_2& ss, const Point_2& p)
-{
-  CGAL_precondition( number_of_vertices() == 1 );
-  // p0 is actually a point
-  Site_2 p0 = finite_vertices_begin()->site();
-  // MK: change the equality test between points by the functor in
-  // geometric traits
-  Site_2 tp = Site_2::construct_site_2(p);
-  if ( same_points(tp,p0) ) {
-    // merge info of identical sites
-    merge_info(finite_vertices_begin(), ss);
-    return finite_vertices_begin();
-  }
-
-  return create_vertex_dim_up(ss);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_third(const Storage_site_2& ss, const Point_2& p)
-{
-  Site_2 t = Site_2::construct_site_2(p);
-  return insert_third(t, ss);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_third(const Site_2& t, const Storage_site_2& ss)
-{
-  CGAL_precondition( number_of_vertices() == 2 );
-
-  // p0 and p1 are actually points
-  Vertex_handle v0 = finite_vertices_begin();
-  Vertex_handle v1 = ++finite_vertices_begin();
-  Site_2 t0 = v0->site();
-  Site_2 t1 = v1->site();
-
-  if ( same_points(t, t0) ) {
-    // merge info of identical sites
-    merge_info(v0, ss);
-    return v0;
-  }
-  if ( same_points(t, t1) ) {
-    // merge info of identical sites
-    merge_info(v1, ss);
-    return v1;
-  }
-
-  Vertex_handle v = create_vertex_dim_up(ss);
-
-  Face_handle f(finite_faces_begin());
-
-  Site_2 s1 = f->vertex(0)->site();
-  Site_2 s2 = f->vertex(1)->site();
-  Site_2 s3 = f->vertex(2)->site();
-
-  Orientation o =
-    geom_traits().orientation_2_object()(s1, s2, s3);
-
-  if ( o != COLLINEAR ) {
-    if ( o == RIGHT_TURN ) {
-      f->reorient();
-      for (int i = 0; i < 3; i++) {
-	f->neighbor(i)->reorient();
-      }
-    }
-  } else {
-    typename Geom_traits::Compare_x_2 compare_x =
-      geom_traits().compare_x_2_object();
-
-    Comparison_result xcmp12 = compare_x(s1, s2);
-    if ( xcmp12 == SMALLER ) {        // x1 < x2
-      Comparison_result xcmp23 = compare_x(s2, s3);
-      if ( xcmp23 == SMALLER ) {            // x2 < x3
-	flip(f, f->index(v1));
-      } else {
-	Comparison_result xcmp31 = compare_x(s3, s1);
-	if ( xcmp31 == SMALLER ) {          // x3 < x1
-	  flip(f, f->index(v0));
-	} else {                            // x1 < x3 < x2
-	  flip(f, f->index(v)); 
-	}
-      }
-    } else if ( xcmp12 == LARGER ) {  // x1 > x2
-      Comparison_result xcmp32 = compare_x(s3, s2);
-      if ( xcmp32 == SMALLER ) {            // x3 < x2
-	flip(f, f->index(v1));
-      } else {
-	Comparison_result xcmp13 = compare_x(s1, s3);
-	if ( xcmp13 == SMALLER ) {          // x1 < x3
-	  flip(f, f->index(v0));
-	} else {                            // x2 < x3 < x1
-	  flip(f, f->index(v));
-	}
-      }
-    } else {                          // x1 == x2
-      typename Geom_traits::Compare_y_2 compare_y =
-	geom_traits().compare_y_2_object();
-
-      Comparison_result ycmp12 = compare_y(s1, s2);
-      if ( ycmp12 == SMALLER ) {      // y1 < y2
-	Comparison_result ycmp23 = compare_y(s2, s3);
-	if ( ycmp23 == SMALLER ) {          // y2 < y3
-	  flip(f, f->index(v1));
-	} else {
-	  Comparison_result ycmp31 = compare_y(s3, s1);
-	  if ( ycmp31 == SMALLER ) {        // y3 < y1
-	    flip(f, f->index(v0));
-	  } else {                          // y1 < y3 < y2
-	    flip(f, f->index(v));
-	  }
-	}
-      } else if ( ycmp12 == LARGER ) { // y1 > y2
-	Comparison_result ycmp32 = compare_y(s3, s2);
-	if ( ycmp32 == SMALLER ) {           // y3 < y2
-	  flip(f, f->index(v1));
-	} else {
-	  Comparison_result ycmp13 = compare_y(s1, s3);
-	  if ( ycmp13 == SMALLER ) {         // y1 < y3
-	    flip(f, f->index(v0));
-	  } else {                           // y2 < y3 < y1
-	    flip(f, f->index(v));
-	  }
-	}
-      } else {
-	// this line should never have been reached
-	CGAL_error();
-      }
-    }
-  }
-
-  return v;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_third(const Storage_site_2& ss, Vertex_handle , Vertex_handle )
-{
-  CGAL_precondition( number_of_vertices() == 2 );
-
-  //  this can only be the case if the first site is a segment
-  CGAL_precondition( dimension() == 1 );
-
-  Vertex_handle v = create_vertex_dim_up(ss);
-
-  Face_circulator fc = incident_faces(v);
-
-  while ( true ) {
-    Face_handle f(fc);
-    if ( !is_infinite(f) ) {
-      flip(f, f->index(v));
-      break;
-    }
-    ++fc;
-  }
-  
-  return v;
-}
-
-//--------------------------------------------------------------------
-// insertion of a point
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_point(const Storage_site_2& ss, const Point_2& p, Vertex_handle vnear)
-{
-  size_type n = number_of_vertices();
-  if ( n == 0 ) {
-    return insert_first(ss, p);
-  } else if ( n == 1 ) {
-    return insert_second(ss, p);
-  } else if ( n == 2 ) {
-    return insert_third(ss, p);
-  }
-
-  Site_2 t = Site_2::construct_site_2(p);
-  return insert_point(ss, t, vnear);
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_point(const Storage_site_2& ss, const Site_2& t,
-	     Vertex_handle vnear)
-{
-  CGAL_precondition( t.is_point() );
-  CGAL_assertion( number_of_vertices() > 2 );
-
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  // MK::ERROR: I need to write a insert_point_no_search method that
-  // does not search for the nearest neighbor; this should be used by
-  // insert_point. Below the first version of the code is correct. The
-  // second is what the insert_point method should do before calling
-  // insert_point_no_search.
-
-  // first find the nearest neighbor
-#if 1
-  Vertex_handle  vnearest = nearest_neighbor( t, vnear );
-#else
-  Vertex_handle vnearest;
-  if ( vnear == Vertex_handle() ) {
-    vnearest = nearest_neighbor( t, vnear );
-  } else {
-    vnearest = vnear;
-  }
-#endif
-
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-  //*********************************************************************
-
-
-  // check is the point has already been inserted or lies on
-  // a segment already inserted
-  Arrangement_type at_res = arrangement_type(t, vnearest);
-  if ( vnearest->is_point() ) {
-    if ( at_res == AT2::IDENTICAL ) {
-      // merge info of identical sites
-      merge_info(vnearest, ss);
-      return vnearest;
-    }
-  } else {
-    CGAL_assertion( vnearest->is_segment() );
-    CGAL_assertion( at_res != AT2::TOUCH_1 );
-    CGAL_assertion( at_res != AT2::TOUCH_2 );
-    CGAL_assertion( at_res == AT2::DISJOINT || at_res == AT2::INTERIOR );
-    if ( at_res == AT2::INTERIOR ) {
-      CGAL_assertion( t.is_input() );
-
-      Vertex_triple vt = insert_exact_point_on_segment(ss, t, vnearest);
-      return vt.first;
-    } else {
-      // the point to be inserted does not belong to the interior of a
-      // segment
-      CGAL_assertion( at_res == AT2::DISJOINT );
-    }
-  }
-
-  return insert_point2(ss, t, vnearest);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_point2(const Storage_site_2& ss, const Site_2& t,
-	      Vertex_handle vnearest)
-{
-  CGAL_precondition( t.is_point() );
-  CGAL_assertion( number_of_vertices() > 2 );
-
-  CGAL_expensive_precondition
-    ( nearest_neighbor(t, vnearest) == vnearest );
-
-  // find the first conflict
-
-#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
-  // verify that there are no intersections...
-  Vertex_circulator vc = incident_vertices(vnearest);
-  Vertex_circulator vc_start = vc;
-  do {
-    Vertex_handle vv(vc);
-    Arrangement_type at_res = arrangement_type(t, vv);
-
-    CGAL_assertion( at_res == AT2::DISJOINT );
-    ++vc;
-  } while ( vc != vc_start );
-#endif
-
-  // first look for conflict with vertex
-  Face_circulator fc_start = incident_faces(vnearest);
-  Face_circulator fc = fc_start;
-  Face_handle start_f;
-  Sign s;
-
-#ifndef CGAL_SDG_NO_FACE_MAP
-  std::map<Face_handle,Sign> sign_map;
-#endif
-
-  do {
-    Face_handle f(fc);
-
-    s = incircle(f, t);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-    f->tds_data().set_incircle_sign(s);
-#else
-    sign_map[f] = s;
-#endif
-
-    if ( s == NEGATIVE ) {
-      start_f = f;
-      break;
-    }
-    ++fc;
-  } while ( fc != fc_start );
-
-  // we are not in conflict with a Voronoi vertex, so we have to
-  // be in conflict with the interior of a Voronoi edge
-  if ( s != NEGATIVE ) {
-    Edge_circulator ec_start = incident_edges(vnearest);
-    Edge_circulator ec = ec_start;
-
-    bool interior_in_conflict(false);
-    Edge e;
-    do {
-      e = *ec;
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-      Sign s1 = e.first->tds_data().incircle_sign();
-      Sign s2 = e.first->neighbor(e.second)->tds_data().incircle_sign();
-#else
-      Sign s1 = sign_map[e.first];
-      Sign s2 = sign_map[e.first->neighbor(e.second)];
-#endif
-
-      if ( s1 == s2 ) {
-	interior_in_conflict = edge_interior(e, t, s1);
-      } else {
-	// It seems that there was a problem here when one of the
-	// signs was positive and the other zero. In this case we
-	// still check pretending that both signs where positive
-	interior_in_conflict = edge_interior(e, t, POSITIVE);
-      }
-
-      if ( interior_in_conflict ) { break; }
-      ++ec;
-    } while ( ec != ec_start );
-
-#ifndef CGAL_SDG_NO_FACE_MAP
-    sign_map.clear();
-#endif
-
-    CGAL_assertion( interior_in_conflict );
-
-    return insert_degree_2(e, ss);
-  }
-
-
-  // we are in conflict with a Voronoi vertex; start from that and 
-  // find the entire conflict region and then repair the diagram
-  List l;
-#ifndef CGAL_SDG_NO_FACE_MAP
-  Face_map fm;
-#endif
-
-  Triple<bool, Vertex_handle, Arrangement_type>
-    vcross(false, Vertex_handle(), AT2::DISJOINT);
-
-  // MK:: NEED TO WRITE A FUNCTION CALLED find_conflict_region WHICH
-  // IS GIVEN A STARTING FACE, A LIST, A FACE MAP, A VERTEX MAP AND A
-  // LIST OF FLIPPED EDGES AND WHAT IS DOES IS INITIALIZE THE CONFLICT 
-  // REGION AND EXPANDS THE CONFLICT REGION.
-  initialize_conflict_region(start_f, l);
-#ifdef CGAL_SDG_NO_FACE_MAP
-  expand_conflict_region(start_f, t, ss, l, vcross);
-#else
-  expand_conflict_region(start_f, t, ss, l, fm, sign_map, vcross);
-#endif
-
-  CGAL_assertion( !vcross.first );
-
-  Vertex_handle v = create_vertex(ss);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-  retriangulate_conflict_region(v, l);
-#else
-  retriangulate_conflict_region(v, l, fm);
-#endif
-
-  return v;
-}
-
-//--------------------------------------------------------------------
-// insertion of a point that lies on a segment
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Face_pair
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-find_faces_to_split(const Vertex_handle& v, const Site_2& t) const
-{
-  CGAL_precondition( v->is_segment() );
-
-#ifndef CGAL_NO_ASSERTIONS
-  {
-    // count number of adjacent infinite faces
-    Face_circulator fc = incident_faces(v);
-    Face_circulator fc_start = fc;
-    int n_inf = 0;
-    do {
-      if ( is_infinite(fc) ) { n_inf++; }
-      fc++;
-    } while ( fc != fc_start );
-    CGAL_assertion( n_inf == 0 || n_inf == 2 || n_inf == 4 );
-  }
-#endif
-
-  Face_circulator fc1 = incident_faces(v);
-  Face_circulator fc2 = fc1; ++fc2;
-  Face_circulator fc_start = fc1;
-  Face_handle f1, f2;
-  bool found_f1 = false, found_f2 = false;
-  Site_2 sitev_supp = v->site().supporting_site();
-  do {
-    Face_handle ff1(fc1), ff2(fc2);
-
-    Oriented_side os1, os2;
-
-    if ( is_infinite(ff1) ) {
-      int id_v = ff1->index(v);
-      int cw_v = this->cw( id_v );
-      int ccw_v = this->ccw( id_v );
-
-      Site_2 sv_ep;
-      if ( is_infinite( ff1->vertex(cw_v) ) ) {
-	CGAL_assertion(  !is_infinite( ff1->vertex(ccw_v) )  );
-	CGAL_assertion( ff1->vertex(ccw_v)->site().is_point() );
-	sv_ep = ff1->vertex(ccw_v)->site();
-      } else {
-	CGAL_assertion(  !is_infinite( ff1->vertex( cw_v) )  );
-	CGAL_assertion( ff1->vertex( cw_v)->site().is_point() );
-	sv_ep = ff1->vertex( cw_v)->site();
-      }
-
-      os1 = oriented_side(sv_ep, sitev_supp, t);
-    } else {
-      os1 = oriented_side(fc1->vertex(0)->site(),
-			  fc1->vertex(1)->site(),
-			  fc1->vertex(2)->site(),
-			  sitev_supp, t);
-    }
-
-    if ( is_infinite(ff2) ) {
-      int id_v = ff2->index(v);
-      int cw_v = this->cw( id_v );
-      int ccw_v = this->ccw( id_v );
-
-      Site_2 sv_ep;
-      if ( is_infinite( ff2->vertex(cw_v) ) ) {
-	CGAL_assertion(  !is_infinite( ff2->vertex(ccw_v) )  );
-	CGAL_assertion( ff2->vertex(ccw_v)->site().is_point() );
-	sv_ep = ff2->vertex(ccw_v)->site();
-      } else {
-	CGAL_assertion(  !is_infinite( ff2->vertex( cw_v) )  );
-	CGAL_assertion( ff2->vertex( cw_v)->site().is_point() );
-	sv_ep = ff2->vertex( cw_v)->site();
-      }
-
-      os2 = oriented_side(sv_ep, sitev_supp, t);
-    } else {
-      os2 = oriented_side(fc2->vertex(0)->site(),
-			  fc2->vertex(1)->site(),
-			  fc2->vertex(2)->site(),
-			  sitev_supp, t);
-    }
-
-    if ( !found_f1 &&
-	 os1 != ON_POSITIVE_SIDE && os2 == ON_POSITIVE_SIDE ) {
-      f1 = ff2;
-      found_f1 = true;
-    }
-
-    if ( !found_f2 &&
-	 os1 == ON_POSITIVE_SIDE && os2 != ON_POSITIVE_SIDE ) {
-      f2 = ff2;
-      found_f2 = true;
-    }
-
-    if ( found_f1 && found_f2 ) { break; }
-
-    ++fc1, ++fc2;
-  } while ( fc_start != fc1 ); 
-
-
-  CGAL_assertion( found_f1 && found_f2 );
-  CGAL_assertion( f1 != f2 );
-
-  return Face_pair(f1, f2);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_triple
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
-			      Vertex_handle v)
-{
-  // splits the segment site v->site() in two and inserts represented by t
-  // on return the three vertices are, respectively, the vertex
-  // corresponding to t and the two subsegments of v->site()
-
-  CGAL_assertion( t.is_point() );
-  CGAL_assertion( t.is_input() );
-
-  Storage_site_2 ssitev = v->storage_site();  
-
-  CGAL_assertion( ssitev.is_segment() );
-
-  Face_pair fpair = find_faces_to_split(v, t);
-
-  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
-    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
-
-  // now I need to update the sites for vertices v1 and v2
-  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
-  Storage_site_2 ssv1 = split_storage_site(ssitev, ss, true);
-  v1->set_site( ssv1 );
-
-  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
-  Storage_site_2 ssv2 = split_storage_site(ssitev, ss, false);
-  v2->set_site( ssv2 );
-
-  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
-  Vertex_handle vsx =
-    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
-
-  vsx->set_site(ss);
-  // merge info of point and segment; the point lies on the segment
-  merge_info(vsx, ssitev);
-
-  return Vertex_triple(vsx, v1, v2);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_triple
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_point_on_segment(const Storage_site_2& ss, const Site_2& ,
-			Vertex_handle v, const Tag_true&)
-{
-  // splits the segment site v->site() in two and inserts the point of
-  // intersection of t and v->site()
-  // on return the three vertices are, respectively, the point of
-  // intersection and the two subsegments of v->site()
-
-  Storage_site_2 ssitev = v->storage_site();
-  Storage_site_2 ssx = st_.construct_storage_site_2_object()(ss, ssitev);
-
-  Face_pair fpair = find_faces_to_split(v, ssx.site());
-
-  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
-    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
-
-  // now I need to update the sites for vertices v1 and v2
-  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
-  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
-
-  Storage_site_2 ssv1 =
-    st_.construct_storage_site_2_object()(ssitev, ss, true);
-
-  Storage_site_2 ssv2 =
-    st_.construct_storage_site_2_object()(ssitev, ss, false);
-
-  v1->set_site( ssv1 );
-  v2->set_site( ssv2 );
-
-  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
-  Vertex_handle vsx =
-    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
-
-  vsx->set_site(ssx);
-
-  return Vertex_triple(vsx, v1, v2);
-}
-
-//--------------------------------------------------------------------
-// insertion of a segment
-//--------------------------------------------------------------------
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_segment(const Storage_site_2& ss, const Site_2& t, Vertex_handle vnear)
-{
-  CGAL_precondition( t.is_segment() );
-  CGAL_precondition( t.is_input() );
-
-  if ( is_degenerate_segment(t) ) {
-    Storage_site_2 ss_src = ss.source_site();
-    convert_info(ss_src, ss, true);
-    return insert_point(ss_src, t.source(), vnear);
-  }
-
-  Storage_site_2 ss_src = ss.source_site();
-  convert_info(ss_src, ss, true);
-  Storage_site_2 ss_trg = ss.target_site();
-  convert_info(ss_trg, ss, false);
-
-  Vertex_handle v0 = insert_point( ss_src, t.source(), vnear );
-  CGAL_assertion( is_valid() );
-  Vertex_handle v1 = insert_point( ss_trg, t.target(), v0 );
-  CGAL_assertion( is_valid() );
-
-  if ( number_of_vertices() == 2 ) {
-    return insert_third(ss, v0, v1);
-  }
-
-  return insert_segment_interior(t, ss, v0);
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_segment_interior(const Site_2& t, const Storage_site_2& ss,
-			Vertex_handle vnearest)
-{
-  CGAL_precondition( t.is_segment() );
-  CGAL_precondition( number_of_vertices() > 2 );
-
-  CGAL_assertion( vnearest != Vertex_handle() );
-
-  // find the first conflict
-
-  // first look if there are intersections...
-  Vertex_circulator vc = incident_vertices(vnearest);
-  Vertex_circulator vc_start = vc;
-  do {
-    Vertex_handle vv(vc);
-    if ( is_infinite(vv) ) {
-      vc++;
-      continue;
-    }
-
-    Arrangement_type at_res = arrangement_type(t, vv);
-
-    if ( vv->is_segment() ) {
-      if ( at_res == AT2::DISJOINT || at_res == AT2::TOUCH_1 ||
-	   at_res == AT2::TOUCH_2 || at_res == AT2::TOUCH_11 ||
-	   at_res == AT2::TOUCH_12 || at_res == AT2::TOUCH_21 ||
-	   at_res == AT2::TOUCH_22 ) {
-	// do nothing
-      } else if ( at_res == AT2::IDENTICAL ) {
-	// merge info of identical items
-	merge_info(vv, ss);
-	return vv;
-      } else if ( at_res == AT2::CROSSING ) {
-	Intersections_tag itag;
-	return insert_intersecting_segment(ss, t, vv, itag);
-      } else if ( at_res == AT2::TOUCH_11_INTERIOR_1 ) {
-	Vertex_handle vp = second_endpoint_of_segment(vv);	
-	Storage_site_2 ssvp = vp->storage_site();
-	Storage_site_2 sss = split_storage_site(ss, ssvp, false);
-
-	Storage_site_2 sss1 = split_storage_site(ss, ssvp, true);
-	// merge the info of the first (common) subsegment
-	merge_info(vv, sss1);
-	// merge the info of the (common) splitting endpoint
-	merge_info(vp, ss);
-
-	return insert_segment_interior(sss.site(), sss, vp);
-      } else if ( at_res == AT2::TOUCH_12_INTERIOR_1 ) {
-	Vertex_handle vp = first_endpoint_of_segment(vv);	
-	Storage_site_2 ssvp = vp->storage_site();
-	Storage_site_2 sss = split_storage_site(ss, ssvp, true);
-
-	/*Storage_site_2 sss1 =*/
-  split_storage_site(ss, ssvp, false);
-	// merge the info of the second (common) subsegment
-	//	merge_info(vv, sss);
-	// merge the info of the (common) splitting endpoint
-	merge_info(vp, ss);
-
-	return insert_segment_interior(sss.site(), sss, vp);
-      } else {
-	// this should never be reached; the only possible values for
-	// at_res are DISJOINT, CROSSING, TOUCH_11_INTERIOR_1
-	// and TOUCH_12_INTERIOR_1
-	CGAL_error();
-      }
-    } else {
-      CGAL_assertion( vv->is_point() );
-      if ( at_res == AT2::INTERIOR ) {
-	Storage_site_2 ssvv = vv->storage_site();
-	if ( ssvv.is_input() ) {
-	  Storage_site_2 ss1 = split_storage_site(ss, ssvv, true);
-	  Storage_site_2 ss2 = split_storage_site(ss, ssvv, false);
-	  // merge the info of the splitting point and the segment
-	  merge_info(vv, ss);
-	  insert_segment_interior(ss1.site(), ss1, vv);
-	  return insert_segment_interior(ss2.site(), ss2, vv);
-	} else {
-	  // this should never be reached; the only possible values for
-	  // at_res are DISJOINT and INTERIOR
-	  CGAL_error();
-	}
-      }
-    }
-    ++vc;
-  } while ( vc != vc_start );
-
-  // first look for conflict with vertex
-  Face_circulator fc_start = incident_faces(vnearest);
-  Face_circulator fc = fc_start;
-  Face_handle start_f;
-  Sign s;
-
-#ifndef CGAL_SDG_NO_FACE_MAP
-  std::map<Face_handle,Sign> sign_map;
-#endif
-
-  do {
-    Face_handle f(fc);
-
-    s = incircle(f, t);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-    f->tds_data().set_incircle_sign(s);
-#else
-    sign_map[f] = s;
-#endif
-
-    if ( s == NEGATIVE ) {
-      start_f = f;
-      break;
-    }
-    ++fc;
-  } while ( fc != fc_start );
-
-  // segments must have a conflict with at least one vertex
-  CGAL_assertion( s == NEGATIVE );
-
-  // we are in conflict with a Voronoi vertex; start from that and 
-  // find the entire conflict region and then repair the diagram
-  List l;
-#ifndef CGAL_SDG_NO_FACE_MAP
-  Face_map fm;
-#endif
-
-  Triple<bool, Vertex_handle, Arrangement_type>
-    vcross(false, Vertex_handle(), AT2::DISJOINT);
-
-  // MK:: NEED TO WRITE A FUNCTION CALLED find_conflict_region WHICH
-  // IS GIVEN A STARTING FACE, A LIST, A FACE MAP, A VERTEX MAP AND A
-  // LIST OF FLIPPED EDGES AND WHAT IS DOES IS INITIALIZE THE CONFLICT 
-  // REGION AND EXPANDS THE CONFLICT REGION.
-  initialize_conflict_region(start_f, l);
-#ifdef CGAL_SDG_NO_FACE_MAP
-  expand_conflict_region(start_f, t, ss, l, vcross);
-#else
-  expand_conflict_region(start_f, t, ss, l, fm, sign_map, vcross);
-#endif
-
-  CGAL_assertion( vcross.third == AT2::DISJOINT ||
-		  vcross.third == AT2::CROSSING ||
-		  vcross.third == AT2::INTERIOR );
-
-  // the following condition becomes true only if intersecting
-  // segments are found
-  if ( vcross.first ) {
-    if ( t.is_segment() ) {
-      if ( vcross.third == AT2::CROSSING ) {
-	Intersections_tag itag;
-	return insert_intersecting_segment(ss, t, vcross.second, itag);
-      } else if ( vcross.third == AT2::INTERIOR ) {
-	Storage_site_2 ssvv = vcross.second->storage_site();
-	Storage_site_2 ss1 = split_storage_site(ss, ssvv, true);
-	Storage_site_2 ss2 = split_storage_site(ss, ssvv, false);
-	// merge the info of the splitting point and the segment
-	merge_info(vcross.second, ss);
-	insert_segment_interior(ss1.site(), ss1, vcross.second);
-	return insert_segment_interior(ss2.site(), ss2, vcross.second);
-      } else {
-	// this should never be reached; the only possible values for
-	// vcross.third are CROSSING, INTERIOR and DISJOINT
-	CGAL_error();
-      }
-    }
-  }
-
-  // no intersecting segment has been found; we insert the segment as
-  // usual...
-  Vertex_handle v = create_vertex(ss);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-  retriangulate_conflict_region(v, l);
-#else
-  retriangulate_conflict_region(v, l, fm);
-#endif
-
-  return v;
-}
-
-
-//--------------------------------------------------------------------
-// insertion of an intersecting segment
-//--------------------------------------------------------------------
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_intersecting_segment_with_tag(const Storage_site_2& /* ss */,
-				     const Site_2& /* t */, Vertex_handle /* v */,
-				     Tag_false)
-{
-#if defined(__POWERPC__) && \
-  defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
-  // hack to avoid nasty warning for G++ 3.4 on Darwin
-  static int i;
-#else
-  static int i = 0;
-#endif
-  if ( i == 0 ) {
-    i = 1;
-    print_error_message();
-  }
-  return Vertex_handle();
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				     const Site_2& t, Vertex_handle v,
-				     Tag_true tag)
-{
-  CGAL_precondition( t.is_segment() && v->is_segment() );
-
-  const Storage_site_2& ssitev = v->storage_site();
-  Site_2 sitev = ssitev.site();
-
-  if ( same_segments(t, sitev) ) {
-    merge_info(v, ss);
-    return v;
-  }
-
-  Vertex_triple vt = insert_point_on_segment(ss, t, v, tag);
-
-  Vertex_handle vsx = vt.first;
-  
-  Storage_site_2 ss3 = st_.construct_storage_site_2_object()(ss, ssitev, true);
-  Storage_site_2 ss4 = st_.construct_storage_site_2_object()(ss, ssitev, false);
-  Site_2 s3 = ss3.site();
-  Site_2 s4 = ss4.site();
-
-  insert_segment_interior(s3, ss3, vsx);
-  insert_segment_interior(s4, ss4, vsx);
-  return vsx;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// helper methods for insertion (find conflict region)
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-initialize_conflict_region(const Face_handle& f, List& l)
-{
-
-
-  l.clear();
-  for (int i = 0; i < 3; i++) {
-    l.push_back(sym_edge(f, i));
-  }
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-expand_conflict_region(const Face_handle& f, const Site_2& t,
-		       const Storage_site_2& ss,
-#ifdef CGAL_SDG_NO_FACE_MAP
-		       List& l,
-#else
-		       List& l, Face_map& fm,
-		       std::map<Face_handle,Sign>& sign_map,
-#endif
-		       Triple<bool,Vertex_handle,Arrangement_type>& vcross)
-{
-#ifdef CGAL_SDG_NO_FACE_MAP
-  if ( f->tds_data().is_in_conflict() ) { return; }
-#else
-  if ( fm.find(f) != fm.end() ) { return; }
-#endif
-
-  // this is done to stop the recursion when intersecting segments
-  // are found
-  if ( vcross.first ) { return; }
-
-  // setting fm[f] to true means that the face has been reached and
-  // that the face is available for recycling. If we do not want the
-  // face to be available for recycling we must set this flag to
-  // false.
-#ifdef CGAL_SDG_NO_FACE_MAP
-  f->tds_data().mark_in_conflict();
-  fhc_.push_back(f);
-#else
-  fm[f] = true;
-#endif
-
-  //  CGAL_assertion( fm.find(f) != fm.end() );
-
-  for (int i = 0; i < 3; i++) {
-    Face_handle n = f->neighbor(i);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-    bool face_registered = n->tds_data().is_in_conflict();
-#else
-    bool face_registered = (fm.find(n) != fm.end());
-#endif
-
-    if ( !face_registered ) {
-      for (int j = 0; j < 3; j++) {
-	Vertex_handle vf = n->vertex(j);
-
-	if ( is_infinite(vf) ) { continue; }
-
-	Arrangement_type at_res = arrangement_type(t, vf);
-
-	CGAL_assertion( vcross.third == AT2::DISJOINT ||
-			vcross.third == AT2::CROSSING ||
-			vcross.third == AT2::INTERIOR );
-
-	if ( vf->is_segment() ) {
-	  CGAL_assertion( at_res != AT2::IDENTICAL );
-	  CGAL_assertion( at_res != AT2::TOUCH_11_INTERIOR_1 );
-	  CGAL_assertion( at_res != AT2::TOUCH_12_INTERIOR_1 );
-
-	  if ( at_res == AT2::CROSSING ) {
-	    vcross.first = true;
-	    vcross.second = vf;
-	    vcross.third = AT2::CROSSING;
-	    l.clear();
-#ifdef CGAL_SDG_NO_FACE_MAP
-	    fhc_.clear();
-#else
-	    fm.clear();
-#endif
-	    return;
-	  } else {
-	    CGAL_assertion ( at_res == AT2::DISJOINT ||
-			     at_res == AT2::TOUCH_1 ||
-			     at_res == AT2::TOUCH_2 ||
-			     at_res == AT2::TOUCH_11 ||
-			     at_res == AT2::TOUCH_12 ||
-			     at_res == AT2::TOUCH_21 ||
-			     at_res == AT2::TOUCH_22 );
-	    // we do nothing in these cases
-	  }
-	} else {
-	  CGAL_assertion( vf->is_point() );
-	  if ( at_res == AT2::INTERIOR ) {
-	    vcross.first = true;
-	    vcross.second = vf;
-	    vcross.third = AT2::INTERIOR;
-	    l.clear();
-#ifdef CGAL_SDG_NO_FACE_MAP
-	    fhc_.clear();
-#else
-	    fm.clear();
-#endif
-	    return;
-	  }
-	}
-      }
-    }
-
-    Sign s = incircle(n, t);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-    n->tds_data().set_incircle_sign(s);
-
-    Sign s_f = f->tds_data().incircle_sign();
-#else
-    sign_map[n] = s;
-
-    Sign s_f = sign_map[f];
-#endif
-
-    if ( s == POSITIVE ) { continue; }
-    if ( s != s_f ) { continue; }
-
-    bool interior_in_conflict = edge_interior(f, i, t, s);
-
-    if ( !interior_in_conflict ) { continue; }
-
-    if ( face_registered ) { continue; }
-
-    Edge e = sym_edge(f, i);
-
-    CGAL_assertion( l.is_in_list(e) );
-    int j = this->_tds.mirror_index(f, i);
-    Edge e_before = sym_edge(n, ccw(j));
-    Edge e_after = sym_edge(n, cw(j));
-    if ( !l.is_in_list(e_before) ) {
-      l.insert_before(e, e_before);
-    }
-    if ( !l.is_in_list(e_after) ) {
-      l.insert_after(e, e_after);
-    }
-    l.remove(e);
-
-#ifdef CGAL_SDG_NO_FACE_MAP
-    expand_conflict_region(n, t, ss, l, vcross);
-#else
-    expand_conflict_region(n, t, ss, l, fm, sign_map, vcross);
-#endif
-
-    // this is done to stop the recursion when intersecting segments
-    // are found
-    //    if ( fm.size() == 0 && l.size() == 0 ) { return; }
-    if ( vcross.first ) { return; }
-  } // for-loop
-}
-
-
-//--------------------------------------------------------------------
-// retriangulate conflict region
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-add_bogus_vertex(Edge e, List& l)
-{
-  Edge esym = sym_edge(e);
-  Face_handle g1 = e.first;
-  CGAL_assertion_code(Face_handle g2 = esym.first);
-
-  Vertex_handle v = insert_degree_2(e);
-
-  Face_circulator fc(v);
-  Face_handle f1(fc);
-  Face_handle f2(++fc);
-  int i1 = f1->index(v);
-  int i2 = f2->index(v);
-
-  CGAL_assertion( ((f1->neighbor(i1) == g1) && (f2->neighbor(i2) == g2)) ||
-		  ((f1->neighbor(i1) == g2) && (f2->neighbor(i2) == g1)) );
-
-  Edge ee, eesym;
-  if ( f1->neighbor(i1) == g1 ) {
-    ee = Edge(f2, i2);
-    eesym = Edge(f1, i1);
-  } else {
-    ee = Edge(f1, i1);
-    eesym = Edge(f2, i2);
-  }
-
-  l.replace(e, ee);
-  l.replace(esym, eesym);
-
-  return v;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_list
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-add_bogus_vertices(List& l)
-{
-#if defined(USE_INPLACE_LIST) && defined(CGAL_SDG_NO_FACE_MAP)
-  Vertex_list vertex_list;
-
-  Edge e_start = l.front();
-  Edge e = e_start;
-
-  std::list<Edge> edge_list;
-
-  do {
-    Edge esym = sym_edge(e);
-    if ( l.is_in_list(esym) ) {
-      if ( !esym.first->tds_data().is_selected(esym.second) ) {
-	e.first->tds_data().mark_selected(e.second);
-	edge_list.push_back(e);
-      }
-    }
-    e = l.next(e);
-  } while ( e != e_start );
-
-  e_start = l.front();
-  e = e_start;
-  do {
-    if ( e.first->tds_data().is_selected(e.second) ) {
-      e.first->tds_data().mark_unselected(e.second);
-    }
-  } while ( e != e_start );
-
-  typename std::list<Edge>::iterator it;
-
-  for (it = edge_list.begin();  it != edge_list.end(); ++it) {
-    Vertex_handle v = add_bogus_vertex(*it, l);
-    vertex_list.push_back(v);
-  }
-
-  return vertex_list;
-#else
-  Vertex_list vertex_list;
-
-  std::set<Edge> edge_list;
-
-  edge_list.clear();
-
-  Edge e_start = l.front();
-  Edge e = e_start;
-
-  do {
-    Edge esym = sym_edge(e);
-    if ( l.is_in_list(esym) &&
-	 edge_list.find(esym) == edge_list.end() ) {
-      edge_list.insert(e);
-    }
-    e = l.next(e);
-  } while ( e != e_start );
-
-  typename std::set<Edge>::iterator it;
-
-  for (it = edge_list.begin();  it != edge_list.end(); ++it) {
-    Vertex_handle v = add_bogus_vertex(*it, l);
-    vertex_list.push_back(v);
-  }
-
-  return vertex_list;
-#endif
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_bogus_vertices(Vertex_list& vl)
-{
-  while ( vl.size() > 0 ) {
-    Vertex_handle v = vl.front();
-    vl.pop_front();
-    remove_degree_2(v);
-  }
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-#ifdef CGAL_SDG_NO_FACE_MAP
-retriangulate_conflict_region(Vertex_handle v, List& l)
-#else
-retriangulate_conflict_region(Vertex_handle v, List& l,
-			      Face_map& fm)
-#endif
-
-{
-  // 1. add the bogus vetrices
-  Vertex_list dummy_vertices = add_bogus_vertices(l);
-
-  // 2. repair the face pointers...
-  Edge e_start = l.front();
-  Edge eit = e_start;
-  do {
-    CGAL_assertion_code(Edge esym =) sym_edge(eit);
-    Face_handle f = eit.first;
-    int k = eit.second;
-    CGAL_assertion( !l.is_in_list(esym) );
-#ifdef CGAL_SDG_NO_FACE_MAP
-    CGAL_assertion( !f->tds_data().is_in_conflict() );
-#else
-    CGAL_assertion( fm.find(f) == fm.end() );
-#endif
-    f->vertex(ccw(k))->set_face(f);
-    f->vertex( cw(k))->set_face(f);
-    eit = l.next(eit);
-  } while ( eit != e_start );
-
-  // 3. copy the edge list to a vector of edges and clear the edge list
-  // MK:: here I actually need to copy the edges to an std::list<Edge>, or
-  // even better add iterators to the list of type List
-  std::vector<Edge> ve(l.size());
-
-  Edge efront = l.front();
-  Edge e = efront;
-  unsigned int k = 0;
-  do {
-    ve[k] = e;
-    ++k;
-    e = l.next(e);
-  } while ( e != efront );
-
-  l.clear();
-
-  // 4. retriangulate the hole
-  this->_tds.star_hole(v, ve.begin(), ve.end());
-
-  // 5. remove the bogus vertices
-  remove_bogus_vertices(dummy_vertices);
-
-  // 6. remove the unused faces
-#ifdef CGAL_SDG_NO_FACE_MAP
-  typename std::vector<Face_handle>::iterator it;
-  for (it = fhc_.begin(); it != fhc_.end(); ++it) {
-    (*it)->tds_data().clear();
-    this->_tds.delete_face( *it );
-  }
-
-  fhc_.clear();
-#else
-  typename Face_map::iterator it;
-  for (it = fm.begin(); it != fm.end(); ++it) {
-    Face_handle fh = (*it).first;
-    this->_tds.delete_face(fh);
-  }
-
-  fm.clear();
-#endif
-
-  // 7. DONE!!!!
-}
-
-//====================================================================
-//====================================================================
-//                   METHODS FOR REMOVAL
-//====================================================================
-//====================================================================
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-is_star(const Vertex_handle& v) const
-{
-  CGAL_precondition( v->storage_site().is_point() );
-
-  Vertex_circulator vc_start = incident_vertices(v);
-  Vertex_circulator vc = vc_start;
-  Storage_site_2 p = v->storage_site();
-
-  size_type count = 0;
-  do {
-    Storage_site_2 ss = vc->storage_site();
-    if ( ss.is_segment() && is_endpoint_of_segment(p, ss) ) {
-      ++count;
-      //      if ( count == 3 ) { break; }
-      if ( count == 3 ) { return true; }
-    }
-    ++vc;
-  } while ( vc != vc_start );
-
-  return false;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-is_linear_chain(const Vertex_handle& v0, const Vertex_handle& v1,
-		const Vertex_handle& v2) const
-{
-  Site_2 tt[3] = { v0->site(), v1->site(), v2->site() };
-
-  if ( tt[1].is_point() &&
-       tt[0].is_segment() &&
-       tt[2].is_segment() &&
-       is_endpoint_of_segment(tt[1], tt[0]) &&
-       is_endpoint_of_segment(tt[1], tt[2]) ) {
-    typename Geom_traits::Equal_2 are_equal = geom_traits().equal_2_object();
-    Site_2 s_end[2];
-    if (  are_equal( tt[1], tt[0].source_site() )  ) {
-      s_end[0] = tt[0].target_site();
-    } else {
-      s_end[0] = tt[0].source_site();
-    }
-
-    if (  are_equal( tt[1], tt[2].source_site() )  ) {
-      s_end[1] = tt[2].target_site();
-    } else {
-      s_end[1] = tt[2].source_site();
-    }
-
-    typename Geom_traits::Orientation_2 orientation =
-      geom_traits().orientation_2_object();
-
-    return orientation(s_end[0], s_end[1], tt[1]) == COLLINEAR;
-  }
-  return false;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-is_flippable(const Face_handle& f, int i) const
-{
-  CGAL_assertion( !is_infinite(f->vertex( cw(i) )) );
-
-  Vertex_handle v_other = f->vertex( ccw(i) );
-  Vertex_handle v0 = f->vertex( i );
-  Vertex_handle v1 = this->_tds.mirror_vertex( f, i );
-
-  if ( is_infinite(v_other) || is_infinite(v0) || is_infinite(v1) ) {
-    return false;
-  }
-
-  Vertex_handle v = f->vertex( cw(i) );
-
-  Storage_site_2 ss = v->storage_site();
-  Storage_site_2 ss_other = v_other->storage_site();
-  if ( ss_other.is_point() && ss.is_segment() &&
-       is_endpoint_of_segment(ss_other,	ss) && is_star(v_other) ) {
-    return false;
-  }
-
-  if ( is_linear_chain(v0, v_other, v1) ) { return false; }
-
-  return (v0 != v1) && is_degenerate_edge(f, i);
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-minimize_degree(const Vertex_handle& v)
-{
-  CGAL_precondition ( degree(v) > 3 );
-
-  Face_circulator fc_start = incident_faces(v);
-  Face_circulator fc = incident_faces(v);
-  bool found(false);
-  do {
-    Face_handle f = Face_handle(fc);
-    int i = ccw( f->index(v) );
-
-    CGAL_assertion( f->vertex( cw(i) ) == v );
-
-    if ( is_flippable(f,i) ) {
-      Edge e = flip(f, i);
-      f = e.first;
-
-      if ( !f->has_vertex(v) ) {
-	f = e.first->neighbor(e.second);
-	CGAL_assertion( f->has_vertex(v) );
-      }
-
-      fc = --( incident_faces(v,f) );
-      fc_start = fc;
-      found = true;
-    } else {
-      ++fc;
-      found = false;
-    }
-  } while ( found || fc != fc_start );
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-equalize_degrees(const Vertex_handle& v, Self& small_d,
-		 std::map<Vertex_handle,Vertex_handle>& vmap,
-		 List& l) const
-{
-  size_type deg = degree(v);
-  CGAL_assertion( l.size() <= deg );
-  if ( l.size() == deg ) { return; }
-#if 0
-  std::cerr << "size of l  : " << l.size() << std::endl;
-  std::cerr << "degree of v: " << deg << std::endl;
-#endif
-
-  //  typedef std::map<Edge,Edge>  Edge_map;
-  // maps edges on the boundary of the conflict region from the small
-  // diagram to edges of the star of v in the small diagram
-  //  Edge_map emap;
-
-  Edge e_small_start = l.front();
-  Edge e_small = e_small_start;
-  bool found;
-  Edge e_small_begin;
-  Edge e_large_begin;
-  do {
-    found = false;
-    Vertex_handle v_sml_src = e_small.first->vertex(cw(e_small.second));
-    Vertex_handle v_sml_trg = e_small.first->vertex(ccw(e_small.second));
-
-    // first we find a first edge in common
-    Face_circulator fc_start = incident_faces(v);
-    Face_circulator fc = fc_start;
-
-    do {
-      int id = fc->index(v);
-      Vertex_handle v_lrg_src = fc->vertex(ccw(id));
-      Vertex_handle v_lrg_trg = fc->vertex(cw(id));
-      if ( vmap[v_sml_src] == v_lrg_src && vmap[v_sml_trg] == v_lrg_trg ) {
-	found = true;
-	e_large_begin = Edge(fc, id);
-	e_small_begin = e_small;
-	break;
-      }
-    } while ( ++fc != fc_start );
-    if ( found ) { break; }
-    e_small = l.next(e_small);
-  } while ( e_small != e_small_start );
-
-  CGAL_assertion( found );
-
-  Face_circulator fc_start = incident_faces(v, e_large_begin.first);
-  Face_circulator fc = fc_start;
-  e_small = e_small_begin;
-  do {
-    int id = fc->index(v);
-    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
-    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
-    Vertex_handle vlrg_src = fc->vertex(ccw(id));
-    Vertex_handle vlrg_trg = fc->vertex(cw(id));
-    if ( vmap[vsml_src] != vlrg_src || vmap[vsml_trg] != vlrg_trg ) {
-      Edge e_small_prev = l.previous(e_small);
-      std::cerr << "size of l: " << l.size() << std::endl;
-      l.remove(e_small);
-
-      std::cerr << "size of l: " << l.size() << std::endl;
-
-      Edge e_small_new = small_d.flip(e_small);
-      Edge e_small_new_sym = small_d.sym_edge(e_small_new);
-      Face_handle f1 = e_small_new.first;
-      Face_handle f2 = e_small_new_sym.first;
-
-      if ( f2->vertex(e_small_new_sym.second) == vsml_src ) {
-	std::swap(f1, f2);
-	std::swap(e_small_new, e_small_new_sym);
-	CGAL_assertion( f1->vertex(e_small_new.second) == vsml_src );
-	CGAL_assertion( f2->vertex(e_small_new_sym.second) == vsml_trg );
-      }
-
-      Edge to_list1(f1, cw(e_small_new.second));
-      Edge to_list2(f2, ccw(e_small_new_sym.second));
-
-      e_small = small_d.sym_edge(to_list1);
-
-      l.insert_after(e_small_prev, e_small);
-      std::cerr << "size of l: " << l.size() << std::endl;
-      l.insert_after(e_small, small_d.sym_edge(to_list2));
-      std::cerr << "size of l: " << l.size() << std::endl;
-    } else {
-      e_small = l.next(e_small);
-      ++fc;
-    }
-    CGAL_assertion( l.size() <= deg );
-  } while ( fc != fc_start );
-
-#if 0
-  std::cerr << "size of l  : " << l.size() << std::endl;
-  std::cerr << "degree of v: " << deg << std::endl;
-#endif
-
-#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)  
-  // we go around the boundary of the conflict region verify that all
-  // edges are there
-  CGAL_assertion( l.size() == degree(v) );
-  e_small = e_small_begin;
-  fc_start = incident_faces(v, e_large_begin.first);
-  fc = fc_start;
-  do {
-    int id = fc->index(v);
-    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
-    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
-    Vertex_handle vlrg_src = fc->vertex(ccw(id));
-    Vertex_handle vlrg_trg = fc->vertex(cw(id));
-    CGAL_assertion(vmap[vsml_src] == vlrg_src && vmap[vsml_trg] == vlrg_trg );
-
-    // go to next edge
-    e_small = l.next(e_small);
-  } while ( ++fc != fc_start );
-#endif
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-expand_conflict_region_remove(const Face_handle& f, const Site_2& t,
-			      const Storage_site_2& ss,
-			      List& l, Face_map& fm, Sign_map& sign_map)
-{
-  if ( fm.find(f) != fm.end() ) { return; }
-
-  // setting fm[f] to true means that the face has been reached and
-  // that the face is available for recycling. If we do not want the
-  // face to be available for recycling we must set this flag to
-  // false.
-  fm[f] = true;
-
-  //  CGAL_assertion( fm.find(f) != fm.end() );
-
-  for (int i = 0; i < 3; i++) {
-    Face_handle n = f->neighbor(i);
-
-    bool face_registered = (fm.find(n) != fm.end());
-
-    Sign s = incircle(n, t);
-
-    sign_map[n] = s;
-
-    Sign s_f = sign_map[f];
-
-    if ( s == POSITIVE ) { continue; }
-    if ( s != s_f ) { continue; }
-
-    bool interior_in_conflict = edge_interior(f, i, t, s);
-
-    if ( !interior_in_conflict ) { continue; }
-
-    if ( face_registered ) { continue; }
-
-    Edge e = sym_edge(f, i);
-
-    CGAL_assertion( l.is_in_list(e) );
-    int j = this->_tds.mirror_index(f, i);
-    Edge e_before = sym_edge(n, ccw(j));
-    Edge e_after = sym_edge(n, cw(j));
-    if ( !l.is_in_list(e_before) ) {
-      l.insert_before(e, e_before);
-    }
-    if ( !l.is_in_list(e_after) ) {
-      l.insert_after(e, e_after);
-    }
-    l.remove(e);
-
-    expand_conflict_region_remove(n, t, ss, l, fm, sign_map);
-  } // for-loop
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-find_conflict_region_remove(const Vertex_handle& v,
-			    const Vertex_handle& vnearest,
-			    List& l, Face_map& fm, Sign_map&)
-{
-  CGAL_precondition( vnearest != Vertex_handle() );
-  Storage_site_2 ss = v->storage_site();
-  Site_2 t = ss.site();
-
-  // find the first conflict
-
-  // first look for conflict with vertex
-  Face_circulator fc_start = incident_faces(vnearest);
-  Face_circulator fc = fc_start;
-  Face_handle start_f;
-  Sign s;
-
-  Sign_map sign_map;
-
-  do {
-    Face_handle f(fc);
-
-    s = incircle(f, t);
-
-    sign_map[f] = s;
-
-    if ( s == NEGATIVE ) {
-      start_f = f;
-      break;
-    }
-    ++fc;
-  } while ( fc != fc_start );
-
-  CGAL_assertion( s == NEGATIVE );
-
-  // we are not in conflict with a Voronoi vertex, so we have to
-  // be in conflict with the interior of a Voronoi edge
-  if ( s != NEGATIVE ) {
-    Edge_circulator ec_start = incident_edges(vnearest);
-    Edge_circulator ec = ec_start;
-
-    bool interior_in_conflict(false);
-    Edge e;
-    do {
-      e = *ec;
-
-      Sign s1 = sign_map[e.first];
-      Sign s2 = sign_map[e.first->neighbor(e.second)];
-
-      if ( s1 == s2 ) {
-	interior_in_conflict = edge_interior(e, t, s1);
-      } else {
-	// It seems that there was a problem here when one of the
-	// signs was positive and the other zero. In this case we
-	// still check pretending that both signs where positive
-	interior_in_conflict = edge_interior(e, t, POSITIVE);
-      }
-
-      if ( interior_in_conflict ) { break; }
-      ++ec;
-    } while ( ec != ec_start );
-
-    sign_map.clear();
-
-    CGAL_assertion( interior_in_conflict );
-
-    l.push_back(e);
-    l.push_back(sym_edge(e));
-    return;
-  }
-
-  initialize_conflict_region(start_f, l);
-  expand_conflict_region_remove(start_f, t, ss,	l, fm, sign_map);
-}
-
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::size_type
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-count_faces(const List& l) const
-{
-  std::vector<Face_handle> flist;
-  get_faces(l, std::back_inserter(flist));
-  return flist.size();
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-fill_hole(const Self& small_d, const Vertex_handle& v, const List& l,
-	  std::map<Vertex_handle,Vertex_handle>& vmap)
-{
-#if 0
-  std::cerr << "size of l  : " << l.size() << std::endl;
-  std::cerr << "degree of v: " << degree(v) << std::endl;
-#endif
-
-  typedef std::map<Edge,Edge>  Edge_map;
-  // maps edges on the boundary of the conflict region from the small
-  // diagram to edges of the star of v in the small diagram
-  Edge_map emap;
-
-  Edge e_sml_sym = sym_edge(l.front());
-
-  Vertex_handle v_sml_src = e_sml_sym.first->vertex(ccw(e_sml_sym.second));
-  Vertex_handle v_sml_trg = e_sml_sym.first->vertex(cw(e_sml_sym.second));
-
-  // first we find a first edge in common
-  Face_circulator fc_start = incident_faces(v);
-  Face_circulator fc = fc_start;
-  Face_circulator fc_begin;
-  CGAL_assertion_code( bool found = false; )
-  do {
-    int id = fc->index(v);
-    Vertex_handle v_lrg_src = fc->vertex(ccw(id));
-    Vertex_handle v_lrg_trg = fc->vertex(cw(id));
-    if ( vmap[v_sml_src] == v_lrg_src && vmap[v_sml_trg] == v_lrg_trg ) {
-      CGAL_assertion_code( found = true; )
-      fc_begin = fc;
-      break;
-    }
-  } while ( ++fc != fc_start );
-  CGAL_assertion( found );
-
-  // container of faces to delete
-  std::list<Face_handle> to_delete;
-
-  // next we go around the boundary of the conflict region and map all edges
-  Edge e_small = l.front();
-  fc_start = incident_faces(v, fc_begin);
-  fc = fc_start;
-  do {
-    int id = fc->index(v);
-#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
-    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
-    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
-    Vertex_handle vlrg_src = fc->vertex(ccw(id));
-    Vertex_handle vlrg_trg = fc->vertex(cw(id));
-    CGAL_assertion(vmap[vsml_src] == vlrg_src && vmap[vsml_trg] == vlrg_trg );
-#endif
-    // set mapping
-    emap[e_small] = sym_edge(fc, id);
-    // keep face for deletion
-    to_delete.push_back(fc);
-    // go to next edge
-    e_small = l.next(e_small);
-  } while ( ++fc != fc_start );
-
-
-  // map the faces of the small diagram with the new faces of the
-  // large diagram
-  std::map<Face_handle,Face_handle> fmap;
-  std::vector<Face_handle> f_small, f_large;
-
-  small_d.get_faces(l, std::back_inserter(f_small));
-  for (unsigned int i = 0; i < f_small.size(); i++) {
-    Face_handle f = this->_tds.create_face();
-    fmap[ f_small[i] ] = f;
-    f_large.push_back(f);
-  }
-
-  CGAL_assertion( l.size() == degree(v) );
-  CGAL_assertion( f_small.size() == f_large.size() );
-  CGAL_assertion( f_small.size() == l.size() - 2 );
-  CGAL_assertion( f_small.size() == count_faces(l) );
-
-  // set the vertices for the new faces; also set the face for each
-  // vertex
-  for (typename std::vector<Face_handle>::iterator fit = f_small.begin();
-       fit != f_small.end(); ++fit) {
-    Face_handle ff_small = *fit;
-    Face_handle f = fmap[ff_small];
-
-    for (int i = 0; i < 3; ++i) {
-      CGAL_assertion( vmap.find(ff_small->vertex(i)) != vmap.end() );
-      f->set_vertex(i, vmap[ff_small->vertex(i)]);
-      // we are setting the face for each vertex a lot of times; we
-      // could possibly do it faster if we use the edges on the
-      // boundary of the conflict region
-      // in fact we may not even need it since the make_hole method
-      // updates the faces of the vertices of the boundary of the
-      // hole, and we do not introduce any new vertices
-      f->vertex(i)->set_face(f);
-    }
-  }
-
-  // set the neighbors for each face
-  for (typename std::vector<Face_handle>::iterator fit = f_small.begin();
-       fit != f_small.end(); ++fit) {
-    Face_handle ff_small = *fit;
-
-    for (int i = 0; i < 3; i++) {
-      Face_handle f = fmap[ff_small];
-      Face_handle n_small = ff_small->neighbor(i);
-      if ( fmap.find(n_small) != fmap.end() ) {
-	// this is one of the new faces
-	f->set_neighbor(i, fmap[n_small]);
-      } else {
-	// otherwise it is one of the old faces outside the conflict
-	// region; we have to use the edge map in this case
-	Edge e_small_sym = small_d.sym_edge(ff_small, i);
-	CGAL_assertion(emap.find(e_small_sym) != emap.end());
-
-	Edge e_large = emap[e_small_sym];
-	f->set_neighbor(i, e_large.first);
-	e_large.first->set_neighbor(e_large.second, f);
-      }
-    }
-  }
-
-  // delete the unused faces and the vertex
-  while ( !to_delete.empty() ) {
-    delete_face(to_delete.front());
-    to_delete.pop_front();
-  }
-  delete_vertex(v);
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_first(const Vertex_handle& v)
-{
-  Delaunay_graph::remove_first(v);
-  return true;
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_second(const Vertex_handle& v)
-{
-  Delaunay_graph::remove_second(v);
-  return true;
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_third(const Vertex_handle& v)
-{
-  if ( is_degree_2(v) ) {
-    CGAL_assertion( v->storage_site().is_point() );
-    Face_handle fh( incident_faces(v) );
-    int i = fh->index(v);
-    flip(fh, i);
-  } else if ( degree(v) == 4 ) {
-    Edge_circulator ec = incident_edges(v);
-    for (int i = 0; i < 4; i++) {
-      Edge e = *ec;
-      Edge sym = sym_edge(e);
-      if ( e.first->vertex(e.second) !=	sym.first->vertex(sym.second) ) {
-	flip(e);
-	break;
-      }
-      ++ec;
-    }
-  }
-
-  this->_tds.remove_dim_down( v );
-  return true;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-compute_small_diagram(const Vertex_handle& v, Self& small_d) const
-{
-  Vertex_circulator vc_start = incident_vertices(v);
-  Vertex_circulator vc = vc_start;
-
-  // insert all neighboring sites
-  do {
-    if ( !is_infinite(vc) ) {
-      Site_2 t = vc->site();
-      if ( t.is_input() ) {
-	small_d.insert(t);
-      } else if ( t.is_point() ) {
-	small_d.insert(t.supporting_site(0));
-	/*Vertex_handle vnear =*/ small_d.insert(t.supporting_site(1));
-	//	vh_small = sdg_small.nearest_neighbor(t, vnear);
-      } else {
-	CGAL_assertion( t.is_segment() );
-	/*Vertex_handle vnear =*/ small_d.insert(t.supporting_site());
-	//	vh_small = sdg_small.nearest_neighbor(t, vnear);
-      }
-      //      CGAL_assertion( vh_small != Vertex_handle() );
-      //      vmap[vh_small] = vh_large;
-    }
-    ++vc;
-  } while ( vc != vc_start );
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-compute_vertex_map(const Vertex_handle& v, const Self& small_d,
-		   std::map<Vertex_handle,Vertex_handle>& vmap) const
-{
-  Vertex_circulator vc_start = incident_vertices(v);
-  Vertex_circulator vc = vc_start;
-  Vertex_handle vh_large, vh_small;
-
-  do {
-    vh_large = Vertex_handle(vc);
-    if ( is_infinite(vh_large) ) {
-      vh_small = small_d.infinite_vertex();
-      vmap[vh_small] = vh_large;
-    } else { 
-#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
-      vh_small = Vertex_handle();
-#endif
-      Site_2 t = vc->site();
-      if ( t.is_input() ) {
-	if ( t.is_segment() ) {
-	  Vertex_handle vv = small_d.nearest_neighbor( t.source() );
-	  Vertex_circulator vvc_start = small_d.incident_vertices(vv);
-	  Vertex_circulator vvc = vvc_start;
-	  do {
-	    if ( small_d.same_segments(t, vvc) ) {
-	      vh_small = vvc;
-	      break;
-	    }
-	  } while ( ++vvc != vvc_start );
-	  CGAL_assertion( small_d.same_segments(t, vh_small) );
-	} else {
-	  CGAL_assertion( t.is_point() );
-	  vh_small = small_d.nearest_neighbor( t.point() );
-	  CGAL_assertion( small_d.same_points(t, vh_small->site()) );
-	}
-      } else if ( t.is_segment() ) {
-	Vertex_handle vv =
-	  small_d.nearest_neighbor( t.source_site(), Vertex_handle() );
-	Vertex_circulator vvc_start = small_d.incident_vertices(vv);
-	Vertex_circulator vvc = vvc_start;
-	do {
-	  if ( small_d.same_segments(t, vvc) ) {
-	    vh_small = vvc;
-	    break;
-	  }
-	} while ( ++vvc != vvc_start );
-	CGAL_assertion( small_d.same_segments(t, vh_small) );
-      } else {
-	CGAL_assertion( t.is_point() );
-	vh_small = small_d.nearest_neighbor( t, Vertex_handle() );
-	CGAL_assertion( small_d.same_points(t, vh_small->site()) );
-      }
-      CGAL_assertion( vh_small != Vertex_handle() );
-      vmap[vh_small] = vh_large;
-    }
-    ++vc;
-  } while ( vc != vc_start );
-}
-
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_degree_d_vertex(const Vertex_handle& v)
-{
-#if 0
-  Self sdg_small;
-  compute_small_diagram(v, sdg_small);
-  std::map<Vertex_handle,Vertex_handle> vmap;
-  compute_vertex_map(v, sdg_small, vmap);
-
-  // find nearest neighbor of v in small diagram
-  Site_2 t = v->site();
-  Vertex_handle vn;
-
-  CGAL_assertion( t.is_input() );
-
-  if ( t.is_point() ) {
-    vn = sdg_small.nearest_neighbor( t.point() );
-  } else {
-    vn = sdg_small.nearest_neighbor( t.source() );
-  }
-  CGAL_assertion( vn != Vertex_handle() );
-
-  List l;
-  Face_map fm;
-  Sign_map sign_map;
-
-  sdg_small.find_conflict_region_remove(v, vn, l, fm, sign_map);
-
-  fm.clear();
-  sign_map.clear();
-
-  equalize_degrees(v, sdg_small, vmap, l);
-
-  fill_hole(sdg_small, v, l, vmap);
-
-  l.clear();
-  return;
-
-#else
-  minimize_degree(v);
-  size_type deg = degree(v);
-  if ( deg == 3 ) {
-    remove_degree_3(v);
-    return;
-  }
-  if ( deg == 2 ) {
-    remove_degree_2(v);
-    return;
-  }
-  
-  Self sdg_small;
-  compute_small_diagram(v, sdg_small);
-
-  if ( sdg_small.number_of_vertices() <= 2 ) {
-    CGAL_assertion( sdg_small.number_of_vertices() == 2 );
-    CGAL_assertion( deg == 4 );
-    Edge_circulator ec_start = incident_edges(v);
-    Edge_circulator ec = ec_start;
-    do {
-      if ( is_infinite(*ec) ) { break; }
-      ++ec;
-    } while ( ec != ec_start );
-    CGAL_assertion( is_infinite(ec) );
-    flip(*ec);
-    remove_degree_3(v);
-    return;
-  }
-
-  std::map<Vertex_handle,Vertex_handle> vmap;
-  compute_vertex_map(v, sdg_small, vmap);
-
-  // find nearest neighbor of v in small diagram
-  Site_2 t = v->site();
-  Vertex_handle vn;
-
-  CGAL_assertion( t.is_input() );
-
-  // here we find a site in the small diagram that serves as a
-  // starting point for finding all conflicts.
-  // To do that we find the nearest neighbor of t if t is a point;
-  // t is guarranteed to have a conflict with its nearest neighbor
-  // If t is a segment, then one endpoint of t is enough; t is
-  // guarranteed to have a conflict with the Voronoi edges around
-  // this endpoint
-  if ( t.is_point() ) {
-    vn = sdg_small.nearest_neighbor( t.point() );
-  } else {
-    vn = sdg_small.nearest_neighbor( t.source() );
-  }
-  CGAL_assertion( vn != Vertex_handle() );
-
-  List l;
-  Face_map fm;
-  Sign_map sign_map;
-
-  sdg_small.find_conflict_region_remove(v, vn, l, fm, sign_map);
-
-  fill_hole(sdg_small, v, l, vmap);
-
-  l.clear();
-  fm.clear();
-  sign_map.clear();
-#endif
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove_base(const Vertex_handle& v)
-{
-  Storage_site_2 ssv = v->storage_site();
-  CGAL_precondition( ssv.is_input() );
-
-  // first consider the case where we have up to 2 points
-  size_type n = number_of_vertices();
-
-  if ( n == 1 ) {
-    return remove_first(v);
-  } else if ( n == 2 ) {
-    return remove_second(v);
-  } 
-
-  // secondly check if the point to be deleted is adjacent to a segment
-  if ( ssv.is_point() ) {
-    Vertex_circulator vc_start = incident_vertices(v);
-    Vertex_circulator vc = vc_start;
-
-    do {
-      Storage_site_2 ss = vc->storage_site();
-      if ( ss.is_segment() && is_endpoint_of_segment(ssv, ss) ) {
-	return false;
-      }
-      ++vc;
-    } while ( vc != vc_start );
-  }
-
-  // now do the deletion
-  if ( n == 3 ) {
-    return remove_third(v);
-  }
-
-  size_type deg = degree(v);
-  if ( deg == 2 ) {
-    remove_degree_2(v);
-  } else if ( deg == 3 ) {
-    remove_degree_3(v);
-  } else {
-    remove_degree_d_vertex(v);
-  }
-
-  return true;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-remove(const Vertex_handle& v)
-{
-  CGAL_precondition( !is_infinite(v) );
-  const Storage_site_2& ss = v->storage_site();
-
-  if ( !ss.is_input() ) { return false; }
-
-  Point_handle h1, h2;
-  bool is_point = ss.is_point();
-  if ( is_point ) {
-    h1 = ss.point();
-  } else {
-    CGAL_assertion( ss.is_segment() );   
-    h1 = ss.source_of_supporting_site();
-    h2 = ss.target_of_supporting_site();
-  }
-
-  bool success = remove_base(v);
-
-  if ( success ) {
-    // unregister the input site
-    if ( is_point ) {
-      unregister_input_site( h1 );
-    } else {
-      unregister_input_site( h1, h2 );
-    }
-  }
-  return success;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// combinatorial operations
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// point location
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-nearest_neighbor(const Site_2& p,
-		 Vertex_handle start_vertex) const
-{
-  CGAL_precondition( p.is_point() );
-
-  if ( number_of_vertices() == 0 ) {
-    return Vertex_handle();
-  }
-
-  if ( start_vertex == Vertex_handle() ) {
-    start_vertex = finite_vertex();
-  }
-
-  //  if ( start_vertex == NULL ) { return start_vertex; }
-
-  Vertex_handle vclosest;
-  Vertex_handle v = start_vertex;
-
-  if ( number_of_vertices() < 3 ) {
-    vclosest = v;
-    Finite_vertices_iterator vit = finite_vertices_begin();
-    for (; vit != finite_vertices_end(); ++vit) {
-      Vertex_handle v1(vit);
-      if ( v1 != vclosest /*&& !is_infinite(v1)*/ ) {
-	Site_2 t0 = vclosest->site();
-	Site_2 t1 = v1->site();
-	if ( side_of_bisector(t0, t1, p) == ON_NEGATIVE_SIDE ) {
-	  vclosest = v1;
-	}
-      }
-    }
-    return vclosest;
-  }
-
-  do {
-    vclosest = v;
-    Site_2 t0 = v->site();
-    //    if ( t0.is_point() && same_points(p, t0) ) {
-    //      return vclosest;
-    //    }
-    Vertex_circulator vc_start = incident_vertices(v);
-    Vertex_circulator vc = vc_start;
-    do {
-      if ( !is_infinite(vc) ) {
-	Vertex_handle v1(vc);
-	Site_2 t1 = v1->site();
-	Oriented_side os = side_of_bisector(t0, t1, p);
-
-	if ( os == ON_NEGATIVE_SIDE ) {
-	  v = v1;
-	  break;
-	}
-      }
-      ++vc;
-    } while ( vc != vc_start );
-  } while ( vclosest != v );
-
-  return vclosest;
-}
-
-//----------------------------------------------------------------------
-//----------------------------------------------------------------------
-// methods for the predicates
-//----------------------------------------------------------------------
-//----------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-Sign
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-incircle(const Face_handle& f, const Site_2& q) const
-{
-  if ( !is_infinite(f) ) {
-    return incircle(f->vertex(0)->site(),
-		    f->vertex(1)->site(),
-		    f->vertex(2)->site(), q);
-  }
-
-  int inf_i(-1); // to avoid compiler warning
-  for (int i = 0; i < 3; i++) {
-    if ( is_infinite(f->vertex(i)) ) {
-      inf_i = i;
-      break;
-    }
-  }
-  return incircle( f->vertex( ccw(inf_i) )->site(),
-		   f->vertex(  cw(inf_i) )->site(), q );
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-Sign
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-incircle(const Vertex_handle& v0, const Vertex_handle& v1,
-	      const Vertex_handle& v2, const Vertex_handle& v) const
-{
-  CGAL_precondition( !is_infinite(v) );
-
-  if ( !is_infinite(v0) && !is_infinite(v1) &&
-       !is_infinite(v2) ) {
-    return incircle(v0->site(), v1->site(),
-		    v2->site(), v->site());
-  }
-
-  if ( is_infinite(v0) ) {
-    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) );
-    return incircle( v1->site(), v2->site(), v->site());
-  }
-  if ( is_infinite(v1) ) {
-    CGAL_precondition( !is_infinite(v0) && !is_infinite(v2) );
-    return incircle( v2->site(), v0->site(), v->site());
-  }
-
-  CGAL_assertion( is_infinite(v2) );
-  CGAL_precondition( !is_infinite(v0) && !is_infinite(v1) );
-  return incircle( v0->site(), v1->site(), v->site());
-}
-
-
-// this the finite edge interior predicate for a degenerate edge
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-finite_edge_interior(const Face_handle& f, int i, const Site_2& q,
-		     Sign sgn, int) const
-{
-  if ( !is_infinite( this->_tds.mirror_vertex(f, i) ) ) {
-    CGAL_precondition( is_infinite(f->vertex(i)) );
-
-    Face_handle g = f->neighbor(i);
-    int j = this->_tds.mirror_index(f, i);
-
-    return finite_edge_interior(g, j, q, sgn, 0 /* degenerate */);
-  }
-
-  CGAL_precondition( is_infinite( this->_tds.mirror_vertex(f, i) ) );
-
-  Site_2 t1 = f->vertex( ccw(i) )->site();
-  Site_2 t2 = f->vertex(  cw(i) )->site();
-
-  if ( is_infinite(f->vertex(i)) ) {
-    return finite_edge_interior(t1, t2, q, sgn);
-  }
-
-  Site_2 t3 = f->vertex(i)->site();
-  return finite_edge_interior(t1, t2, t3, q, sgn);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
-		     const Vertex_handle& v3, const Vertex_handle& v4,
-		     const Vertex_handle& v, Sign sgn, int) const
-{
-  CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) && 
-		     !is_infinite(v) );
-  if ( !is_infinite( v4 ) ) {
-    CGAL_precondition( is_infinite(v3) );
-
-    return
-      finite_edge_interior(v2, v1, v4, v3, v, sgn, 0 /* degenerate */);
-  }
-
-  CGAL_precondition( is_infinite( v4 ) );
-
-  Site_2 t1 = v1->site();
-  Site_2 t2 = v2->site();
-  Site_2 q = v->site();
-
-  if ( is_infinite(v3) ) {
-    return finite_edge_interior(t1, t2, q, sgn);
-  }
-
-  Site_2 t3 = v3->site();
-  return finite_edge_interior(t1, t2, t3, q, sgn);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-infinite_edge_interior(const Face_handle& f, int i,
-		       const Site_2& q, Sign sgn) const
-{
-  if ( !is_infinite( f->vertex(ccw(i)) ) ) {
-    CGAL_precondition( is_infinite( f->vertex(cw(i)) ) );
-    Face_handle g = f->neighbor(i);
-    int j = this->_tds.mirror_index(f, i);
-
-    return infinite_edge_interior(g, j, q, sgn);
-  }
-
-  CGAL_precondition( is_infinite( f->vertex(ccw(i)) ) );
-
-  Site_2 t2 = f->vertex(  cw(i) )->site();
-  Site_2 t3 = f->vertex(     i  )->site();
-  Site_2 t4 = this->_tds.mirror_vertex(f, i)->site();
-
-  return infinite_edge_interior(t2, t3, t4, q, sgn);
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-infinite_edge_interior(const Vertex_handle& v1,
-		       const Vertex_handle& v2,
-		       const Vertex_handle& v3,
-		       const Vertex_handle& v4,
-		       const Vertex_handle& v, Sign sgn) const
-{
-  CGAL_precondition( !is_infinite(v3) && !is_infinite(v4) && 
-		     !is_infinite(v) );
-
-  if ( !is_infinite( v1 ) ) {
-    CGAL_precondition( is_infinite( v2 ) );
-
-    return infinite_edge_interior(v2, v1, v4, v3, v, sgn);
-  }
-
-  CGAL_precondition( is_infinite( v1 ) );
-
-  Site_2 t2 = v2->site();
-  Site_2 t3 = v3->site();
-  Site_2 t4 = v4->site();
-  Site_2 q = v->site();
-
-  return infinite_edge_interior(t2, t3, t4, q, sgn);
-}
-
-
-
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-edge_interior(const Vertex_handle& v1,
-	      const Vertex_handle& v2,
-	      const Vertex_handle& v3,
-	      const Vertex_handle& v4,
-	      const Vertex_handle& v, Sign sgn) const
-{
-  CGAL_precondition( !is_infinite(v) );
-
-  bool is_inf_v1 = is_infinite(v1);
-  bool is_inf_v2 = is_infinite(v2);
-  bool is_inf_v3 = is_infinite(v3);
-  bool is_inf_v4 = is_infinite(v4);
-
-  bool result;
-
-  if ( !is_inf_v1 && !is_inf_v2 && !is_inf_v3 && !is_inf_v4 ) {
-    result = finite_edge_interior(v1, v2, v3, v4, v, sgn);
-  } else if ( is_inf_v3 || is_inf_v4 ) {
-    result = finite_edge_interior(v1, v2, v3, v4, v, sgn, 0/* degenerate */);
-  } else {
-    result = infinite_edge_interior(v1, v2, v3, v4, v, sgn);
-  }
-
-  return result;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-edge_interior(const Face_handle& f, int i,
-	      const Site_2& q, Sign sgn) const
-{
-  Face_handle g = f->neighbor(i);
-
-  bool is_inf_f = is_infinite(f);
-  bool is_inf_g = is_infinite(g);
-
-  bool result;
-
-  if ( !is_inf_f && !is_inf_g ) {
-    result = finite_edge_interior(f, i, q, sgn);
-  } else if ( !is_inf_f || !is_inf_g ) {
-    result = finite_edge_interior(f, i, q, sgn, 0 /* denegerate */);
-  } else {
-    if ( !is_infinite(f, i) ) {
-      result = finite_edge_interior(f, i, q, sgn, 0 /* degenerate */);
-    } else {
-      result = infinite_edge_interior(f, i, q, sgn);
-    }
-  }
-
-  return result;
-}
-
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Arrangement_type
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-arrangement_type(const Site_2& p, const Site_2& q) const
-{
-  typedef typename Geom_traits::Arrangement_type_2  AT2;
-  typedef typename AT2::result_type                 Arrangement_type;
-
-  Arrangement_type res = geom_traits().arrangement_type_2_object()(p, q);
-
-  // The valeus that have to be treated are the following:
-  // DISJOINT, TOUCH_1, TOUCH_2, CROSSING, IDENTICAL, INTERIOR,
-  // TOUCH_11_INTERIOR_1, TOUCH_12_INTERIOR_1, TOUCH_21_INTERIOR_1 and
-  // TOUCH_22_INTERIOR_1.
-  //
-  // The remaining values will either never appear because of one of
-  // the following reasons:
-  // 1. we insert the endpoints of the segments first and then the
-  //    interior (OVERLAPPING_*, INTERIOR_*, TOUCH_*_INTERIOR_2).
-  // 2. the values have no meaning since we consider the segments to
-  //    be open (TOUCH_INTERIOR_*). In this case, the conflict will
-  //    appear when we test with the endpoint.
-  // 3. a conflict will first happen with an endpoint before testing
-  //    for the segment (TOUCH_2*_INTERIOR_1). In this case the
-  //    segment to be inserted will first find an endpoint in its
-  //    interior before actually finding that there is another segment
-  //    it overlaps with.
-
-  CGAL_assertion( res != AT2::INTERIOR_1 );
-  CGAL_assertion( res != AT2::INTERIOR_2 );
-
-  CGAL_assertion( res != AT2::OVERLAPPING_11 );
-  CGAL_assertion( res != AT2::OVERLAPPING_12 );
-  CGAL_assertion( res != AT2::OVERLAPPING_21 );
-  CGAL_assertion( res != AT2::OVERLAPPING_22 );
-
-  CGAL_assertion( res != AT2::TOUCH_11_INTERIOR_2 );
-  CGAL_assertion( res != AT2::TOUCH_21_INTERIOR_2 );
-  CGAL_assertion( res != AT2::TOUCH_12_INTERIOR_2 );
-  CGAL_assertion( res != AT2::TOUCH_22_INTERIOR_2 );
-
-  CGAL_assertion( res != AT2::TOUCH_21_INTERIOR_1 );
-  CGAL_assertion( res != AT2::TOUCH_22_INTERIOR_1 );
-
-  if ( res == AT2::TOUCH_INTERIOR_12 || res == AT2::TOUCH_INTERIOR_21 ||
-       res == AT2::TOUCH_INTERIOR_11 || res == AT2::TOUCH_INTERIOR_22 ) {
-    return AT2::DISJOINT;
-  }
-  if ( res == AT2::TOUCH_11 || res == AT2::TOUCH_12 ||
-       res == AT2::TOUCH_21 || res == AT2::TOUCH_22 ) {
-    return AT2::DISJOINT;
-  }
-
-  return res;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// embedding and visualization methods and constructions for primal
-// and dual
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-// primal
-template<class Gt, class ST, class D_S, class LTag>
-Object
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-primal(const Edge e) const
-{
-  typedef typename Gt::Line_2   Line_2;
-  typedef typename Gt::Ray_2    Ray_2;
-
-  CGAL_precondition( !is_infinite(e) );
-
-  if ( this->dimension() == 1 ) {
-    Site_2 p = (e.first)->vertex(cw(e.second))->site();
-    Site_2 q = (e.first)->vertex(ccw(e.second))->site();
-
-    Line_2 l = construct_sdg_bisector_2_object()(p,q);
-    return make_object(l);
-  }
-
-  // dimension == 2
-  // none of the two adjacent faces is infinite
-  if( (!is_infinite(e.first)) &&
-      (!is_infinite(e.first->neighbor(e.second))) ) {
-    Site_2 p = (e.first)->vertex( ccw(e.second) )->site();
-    Site_2 q = (e.first)->vertex(  cw(e.second) )->site();
-    Site_2 r = (e.first)->vertex(     e.second  )->site();
-    Site_2 s = this->_tds.mirror_vertex(e.first, e.second)->site();
-    return construct_sdg_bisector_segment_2_object()(p,q,r,s);
-  }
-
-  // both of the adjacent faces are infinite
-  if ( is_infinite(e.first) &&
-       is_infinite(e.first->neighbor(e.second)) )  {
-    Site_2 p = (e.first)->vertex(cw(e.second))->site();
-    Site_2 q = (e.first)->vertex(ccw(e.second))->site();
-    Line_2 l = construct_sdg_bisector_2_object()(p,q);
-    return make_object(l);
-  }
-
-  // only one of the adjacent faces is infinite
-  CGAL_assertion( is_infinite( e.first ) ||
-		  is_infinite( e.first->neighbor(e.second) )
-		  );
-
-  CGAL_assertion( !(is_infinite( e.first ) &&
-		    is_infinite( e.first->neighbor(e.second) )
-		    )
-		  );
-
-  CGAL_assertion( is_infinite(e.first->vertex(e.second)) ||
-		  is_infinite(this->_tds.mirror_vertex(e.first, e.second)) );
-
-  Edge ee = e;
-  if ( is_infinite( e.first->vertex(e.second) )  ) {
-    ee = sym_edge(e);
-  }
-  Site_2 p = ee.first->vertex( ccw(ee.second) )->site();
-  Site_2 q = ee.first->vertex(  cw(ee.second) )->site();
-  Site_2 r = ee.first->vertex(     ee.second  )->site();
-
-  Ray_2 ray = construct_sdg_bisector_ray_2_object()(p,q,r);
-  return make_object(ray);
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// validity test method
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-template<class Gt, class ST, class D_S, class LTag>
-bool Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-is_valid(bool verbose, int level) const
-{
-  if (level < 0) { return true; }
-
-  if (number_of_vertices() <= 1) {
-    if ( verbose && number_of_vertices() == 1 ) {
-      std::cerr << "SDGDS is ok... " << std::flush;
-    }
-    return true;
-  }
-
-  // level 0 test: check the TDS
-  bool result = data_structure().is_valid(verbose, level);
-
-  if ( result && verbose ) {
-    std::cerr << "SDGDS is ok... " << std::flush;
-  }
-
-  if (level == 0) { return result; }
-
-  // level 1 test: do the incircle tests
-  if (number_of_vertices() < 3)  { return true; }
-
-  for (All_edges_iterator eit = all_edges_begin();
-       eit != all_edges_end(); ++eit) {
-    Edge e = *eit;
-    Face_handle f = e.first;
-
-    Vertex_handle v = this->_tds.mirror_vertex(f, e.second);
-
-    if ( f->vertex(e.second) == v ) { continue; }
-    if ( !is_infinite(v) ) {
-      result = result &&
-	( incircle(f, v->site()) != NEGATIVE );
-    }
-    Edge sym_e = sym_edge(e);
-    f = sym_e.first;
-    v = this->_tds.mirror_vertex(f, sym_e.second);
-
-    if ( !is_infinite(v) ) {
-      result = result &&
-	( incircle(f, v->site()) != NEGATIVE );
-    }
-  }
-
-  if ( result && verbose ) {
-    std::cerr << "Segment Delaunay graph is ok..." << std::flush;
-  }
-  if ( !result && verbose ) {
-    std::cerr << "Segment Delaunay graph is NOT valid..." << std::flush;
-  }
-
-  return result;
-}
-
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// misc
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-print_error_message() const
-{
-  std::cerr << std::endl;
-  std::cerr << "ATTENTION:" << std::endl;
-  std::cerr << "A segment-segment intersection was found."
-	    << std::endl;
-  std::cerr << "The Segment_Delaunay_graph_2 class is not configured"
-	    << " to handle this situation." << std::endl;
-  std::cerr << "Please look at the documentation on how to handle"
-	    << " this behavior." << std::endl;
-  std::cerr << std::endl;
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// the copy method
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Storage_site_2
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-copy_storage_site(const Storage_site_2& ss_other, Handle_map& hm,
-		  const Tag_false&)
-{
-  if ( ss_other.is_segment() ) {
-    Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
-    Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
-    return st_.construct_storage_site_2_object()(p0, p1);
-  } else {
-    Point_handle p0 = hm[ ss_other.point() ];
-    return st_.construct_storage_site_2_object()(p0);
-  }
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Storage_site_2
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-copy_storage_site(const Storage_site_2& ss_other, Handle_map& hm,
-		  const Tag_true&)
-{
-  if ( ss_other.is_segment() ) {
-    if ( ss_other.is_input() ) {
-      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
-      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
-      return st_.construct_storage_site_2_object()(p0, p1);
-    } else if ( ss_other.is_input(0) ) {
-      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
-      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
-      Point_handle p4 = hm[ ss_other.source_of_crossing_site(1) ];
-      Point_handle p5 = hm[ ss_other.target_of_crossing_site(1) ];
-      return st_.construct_storage_site_2_object()(p0, p1, p4, p5, true);
-    } else if ( ss_other.is_input(1) ) {
-      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
-      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
-      Point_handle p2 = hm[ ss_other.source_of_crossing_site(0) ];
-      Point_handle p3 = hm[ ss_other.target_of_crossing_site(0) ];
-      return st_.construct_storage_site_2_object()(p0, p1, p2, p3, false);
-    } else {
-      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
-      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
-      Point_handle p2 = hm[ ss_other.source_of_crossing_site(0) ];
-      Point_handle p3 = hm[ ss_other.target_of_crossing_site(0) ];
-      Point_handle p4 = hm[ ss_other.source_of_crossing_site(1) ];
-      Point_handle p5 = hm[ ss_other.target_of_crossing_site(1) ];
-      return st_.construct_storage_site_2_object()(p0, p1, p2, p3, p4, p5);
-    }
-  } else {
-    if ( ss_other.is_input() ) {
-      Point_handle p0 = hm[ ss_other.point() ];
-      return st_.construct_storage_site_2_object()(p0);
-    } else {
-      Point_handle p2 = hm[ ss_other.source_of_supporting_site(0) ];
-      Point_handle p3 = hm[ ss_other.target_of_supporting_site(0) ];
-      Point_handle p4 = hm[ ss_other.source_of_supporting_site(1) ];
-      Point_handle p5 = hm[ ss_other.target_of_supporting_site(1) ];
-      return st_.construct_storage_site_2_object()(p2, p3, p4, p5);
-    }
-  }
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-copy(Segment_Delaunay_graph_2& other)
-{
-  // first copy the point container
-  pc_ = other.pc_;
-
-  // copy storage traits
-  st_ = other.st_;
-
-  // first create a map between the old point handles and the new ones
-  Handle_map hm;
-
-  Point_handle it_other = other.pc_.begin();
-  Point_handle it_this = pc_.begin();
-  for (; it_other != other.pc_.end(); ++it_other, ++it_this) {
-    hm.insert( Point_handle_pair(it_other, it_this) );
-  }
-
-  copy(other, hm);
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-copy(Segment_Delaunay_graph_2& other, Handle_map& hm)
-{
-  // second, copy the site representation info for the input sites
-  // using the correct handles (i.e., the handles from the new point
-  // container
-  isc_.clear();
-  typename Input_sites_container::iterator iit_other = other.isc_.begin();
-  for (; iit_other != other.isc_.end(); ++iit_other) {
-    Site_rep_2 old_srep = *iit_other;
-    Site_rep_2 new_srep( hm[boost::tuples::get<0>(old_srep)],
-			 hm[boost::tuples::get<1>(old_srep)],
-			 boost::tuples::get<2>(old_srep) );
-    isc_.insert( new_srep );
-  }
-  
-  CGAL_assertion( pc_.size() == other.pc_.size() );
-  CGAL_assertion( isc_.size() == other.isc_.size() );
-
-#ifndef CGAL_NO_ASSERTIONS
-  {
-    Point_handle it_other = other.pc_.begin();
-    Point_handle it_this = pc_.begin();
-    for (; it_other != other.pc_.end(); ++it_other, ++it_this) {
-      CGAL_assertion( *it_other == *it_this );
-    }
-  }
-#endif
-
-  // then copy the diagram
-  DG::operator=(other);
-
-  // now we have to update the sotrage sites in each vertex of the
-  // diagram and also update the 
-
-  // then update the storage sites for each vertex
-  Intersections_tag itag;
-
-  Finite_vertices_iterator vit_other = other.finite_vertices_begin();
-  Finite_vertices_iterator vit_this = finite_vertices_begin();
-  for (; vit_other != other.finite_vertices_end(); vit_other++,
-	 vit_this++) {
-    Storage_site_2 ss_other = vit_other->storage_site();
-
-#ifndef CGAL_NO_ASSERTIONS
-    Storage_site_2 ss_this = vit_this->storage_site();
-    if ( ss_other.is_segment() ) {
-      CGAL_assertion( ss_this.is_segment() );
-      CGAL_assertion( same_segments(ss_this.site(), ss_other.site()) );
-    } else {
-      CGAL_assertion( ss_this.is_point() );
-      CGAL_assertion( same_points(ss_this.site(), ss_other.site()) );
-    }
-#endif
-
-    Storage_site_2 new_ss_this = copy_storage_site(ss_other, hm, itag);
-    vit_this->set_site( new_ss_this );
-  }
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// getting endpoints of segments
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-first_endpoint_of_segment(const Vertex_handle& v) const
-{
-  CGAL_assertion( v->is_segment() );
-  Site_2 fe = v->site().source_site();
-  Vertex_circulator vc_start = incident_vertices(v);
-  Vertex_circulator vc = vc_start;
-  do {
-    // Vertex_handle vv(vc);
-    if ( !is_infinite(vc) && vc->is_point() ) {
-      if ( same_points(fe, vc->site()) ) {
-	return Vertex_handle(vc);
-      }
-    }
-    vc++;
-  } while ( vc != vc_start );
-
-  // we should never reach this point
-  CGAL_error();
-  return Vertex_handle();
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-second_endpoint_of_segment(const Vertex_handle& v) const
-{
-  CGAL_assertion( v->is_segment() );
-  Site_2 fe = v->site().target_site();
-  Vertex_circulator vc_start = incident_vertices(v);
-  Vertex_circulator vc = vc_start;
-  do {
-    //      Vertex_handle vv(vc);
-    if ( !is_infinite(vc) && vc->is_point() ) {
-      if ( same_points(fe, vc->site()) ) {
-	return Vertex_handle(vc);
-      }
-    }
-    vc++;
-  } while ( vc != vc_start );
-
-  // we should never reach this point
-  CGAL_error();
-  return Vertex_handle();
-}
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-// file I/O
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-file_output(std::ostream& os, const Storage_site_2& t,
-	    Point_handle_mapper& P) const
-{
-  CGAL_precondition( t.is_defined() );
-
-  if ( t.is_point() ) {
-    // 0 for point
-    os << 0;
-    if ( is_ascii(os) ) { os << ' '; }
-    if ( t.is_input() ) {
-      // 0 for input
-      os << 0;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.point()];
-    } else {
-      // 1 for non-input
-      os << 1;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site(0)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site(0)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site(1)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site(1)];
-    }
-  } else { // t is a segment
-    // 1 for segment
-    os << 1;
-    if ( is_ascii(os) ) { os << ' '; }
-    if ( t.is_input() ) {
-      // 0 for input
-      os << 0;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site()];
-    } else if ( t.is_input(0) ) {
-      // 1 for input source
-      os << 1;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_crossing_site(1)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_crossing_site(1)];
-    } else if ( t.is_input(1) ) {
-      // 2 for input target
-      os << 2;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_crossing_site(0)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_crossing_site(0)];
-    } else {
-      // 3 for non-input src & trg
-      os << 3;
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_supporting_site()];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_crossing_site(0)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_crossing_site(0)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.source_of_crossing_site(1)];
-      if ( is_ascii(os) ) { os << ' '; }
-      os << P[t.target_of_crossing_site(1)];
-    }
-  }
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-file_input(std::istream& is, Storage_site_2& t,
-	   const Point_handle_vector& P, const Tag_false&) const
-{
-  int type, input;
-  is >> type >> input;
-  CGAL_assertion( type == 0 || type == 1 );
-  CGAL_assertion( input == 0 );
-  if ( type == 0 ) {
-    // we have an input point
-    size_type p;
-    is >> p;
-    t = st_.construct_storage_site_2_object()(P[p]);
-  } else {
-    CGAL_assertion( type == 1 );
-    // we have an input segment
-    size_type p1, p2;
-    is >> p1 >> p2;
-    t = st_.construct_storage_site_2_object()(P[p1], P[p2]);
-  }
-}
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-file_input(std::istream& is, Storage_site_2& t,
-	   const Point_handle_vector& P, const Tag_true&) const
-{
-  int type, input;
-  is >> type >> input;
-  CGAL_assertion( type == 0 || type == 1 );
-  CGAL_assertion( input >= 0 && input <= 3 );
-  if ( type == 0 ) {
-    // we have a point
-    if ( input == 0 ) {
-      // we have an input point
-      size_type p;
-      is >> p;
-      t = st_.construct_storage_site_2_object()(P[p]);
-    } else {
-      // we have a point that is the intersection of two segments
-      CGAL_assertion( input == 1 );
-      size_type p1, p2, q1, q2;
-      is >> p1 >> p2 >> q1 >> q2;
-      t = st_.construct_storage_site_2_object()(P[p1], P[p2], P[q1], P[q2]);
-    }
-  } else {
-    // we have a segment
-    CGAL_assertion( type == 1 );
-    if ( input == 0 ) {
-      // we have an input segment
-      size_type p1, p2;
-      is >> p1 >> p2;
-      t = st_.construct_storage_site_2_object()(P[p1], P[p2]);
-    } else if ( input < 3 ) {
-      // we have a segment whose source or target is input but not both
-      size_type p1, p2, q1, q2;
-      is >> p1 >> p2 >> q1 >> q2;
-      t = st_.construct_storage_site_2_object()(P[p1], P[p2],
-						P[q1], P[q2], input == 1);
-    } else {
-      // we have a segment whose neither its source nor its target is input
-      CGAL_assertion( input == 3 );
-      size_type p1, p2, q1, q2, r1, r2;
-      is >> p1 >> p2 >> q1 >> q2 >> r1 >> r2;
-      t = st_.construct_storage_site_2_object()(P[p1], P[p2],
-						P[q1], P[q2],
-						P[r1], P[r2]);      
-    }
-  }
-}
-
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-file_output(std::ostream& os, Point_handle_mapper& P,
-	    bool print_point_container) const
-{
-  // ouput to a file
-  size_type n = this->_tds.number_of_vertices();
-  size_type m = this->_tds.number_of_full_dim_faces();
-
-  CGAL_assertion( n >= 1 );
-
-  if( is_ascii(os) ) {
-    os << n << ' ' << m << ' ' << dimension() << std::endl;
-  } else {
-    os << n << m << dimension();
-  }
-
-  // points in point container and input sites container
-  if ( print_point_container ) {
-    if ( is_ascii(os) ) { os << std::endl; }
-    os << pc_.size();
-    if ( is_ascii(os) ) { os << std::endl; }
-    for (const_Point_handle ph = pc_.begin(); ph != pc_.end(); ++ph) {
-      os << *ph;
-      if ( is_ascii(os) ) { os << std::endl; }
-    }
-
-    // print the input sites container
-    if ( is_ascii(os) ) { os << std::endl; }
-    os << isc_.size();
-    if ( is_ascii(os) ) { os << std::endl; }
-    for (typename Input_sites_container::const_iterator it = isc_.begin();
-	 it != isc_.end(); ++it) {
-      os << P[boost::tuples::get<0>(*it)];
-      if ( is_ascii(os) ) { os << " "; }
-      os << P[boost::tuples::get<1>(*it)];
-      if ( is_ascii(os) ) { os << std::endl; }
-    }
-  }
-
-  std::map<Vertex_handle,size_type> V;
-  std::map<Face_handle,size_type> F;
-
-  // first vertex (infinite vertex) 
-  size_type inum = 0;
-  V[infinite_vertex()] = inum++;
-  
-  // finite vertices
-  if (is_ascii(os)) os << std::endl;
-  for (Finite_vertices_iterator vit = finite_vertices_begin();
-       vit != finite_vertices_end(); ++vit) {
-    V[vit] = inum++;
-    //    os << vit->site();
-    file_output(os, vit->storage_site(), P);
-    // write non-combinatorial info of the vertex
-    //    os << *vit ;
-    if ( is_ascii(os) ) { os << std::endl; }
-  }
-  if ( is_ascii(os) ) { os << std::endl; }
-
-  // vertices of the faces
-  inum = 0;
-  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
-  for(All_faces_iterator fit = all_faces_begin();
-      fit != all_faces_end(); ++fit) {
-    F[fit] = inum++;
-    for(int j = 0; j < dim ; ++j) {
-      os << V[ fit->vertex(j) ];
-      if( is_ascii(os) ) { os << ' '; }
-    }
-    // write non-combinatorial info of the face
-    //    os << *fit ;
-    if( is_ascii(os) ) { os << std::endl; }
-  }
-  if( is_ascii(os) ) { os << std::endl; }
-    
-  // neighbor pointers of the  faces
-  for( All_faces_iterator it = all_faces_begin();
-       it != all_faces_end(); ++it) {
-    for(int j = 0; j < dimension()+1; ++j){
-      os << F[ it->neighbor(j) ];
-      if( is_ascii(os) ) { os << ' '; }
-    }
-    if( is_ascii(os) ) { os << std::endl; }
-  }
-
-  if ( is_ascii(os) ) { os << std::endl; }
-}
-
-
-
-template<class Gt, class ST, class D_S, class LTag>
-void
-Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
-file_input(std::istream& is, bool read_handle_vector,
-	   Point_handle_vector& P)
-{
-  //input from file
-  size_type n, m;
-  int d;
-  is >> n >> m >> d;
-
-  CGAL_assertion( n >= 1 );
-
-  size_type i = 0;
-  Storage_site_2 ss;
-
-  if ( read_handle_vector ) {
-    pc_.clear();
-    size_type np;
-    is >> np;
-    for (; i < np; i++) {
-      Point_2 p;
-      is >> p;
-      std::pair<Point_handle,bool> res = pc_.insert(p);
-      P.push_back(res.first);
-      CGAL_assertion( P[i] == res.first );
-    }
-
-    // now read the input sites container
-    isc_.clear();
-    size_type nisc;
-    is >> nisc;
-    int id1, id2;
-    for (i = 0; i < nisc; i++) {
-      is >> id1 >> id2;
-      isc_.insert( Site_rep_2(P[id1], P[id2], id1 == id2) );
-    }
-  }
-
-  if ( n == 1 ) {
-    CGAL_assertion( d == -1 );
-    if ( number_of_vertices() > 0 ) { clear(); }
-    return;
-  }
-  if ( n == 2 ) {
-    CGAL_assertion( d == 0 );
-    if ( number_of_vertices() > 0 ) { clear(); }
-    file_input(is, ss, P, Intersections_tag());
-    insert_first(ss, *ss.point());
-    return;
-  }
-  if ( n == 3 ) {
-    CGAL_assertion( d == 1 );
-    if ( number_of_vertices() > 0 ) { clear(); }
-    file_input(is, ss, P, Intersections_tag());
-    insert_first(ss, *ss.point());  
-    file_input(is, ss, P, Intersections_tag());
-    insert_second(ss, *ss.point());  
-    return;
-  }
-
-  if (this->_tds.number_of_vertices() != 0) { this->_tds.clear(); }
-
-  this->_tds.set_dimension(d);
-
-  std::vector<Vertex_handle> V(n);
-  std::vector<Face_handle> F(m);
-
-  // first vertex (infinite vertex)
-  V[0] = this->_tds.create_vertex();
-  this->set_infinite_vertex(V[0]);
-  i = 1;
-
-  // read vertices
-  for (; i < n; ++i) {
-    V[i] = this->_tds.create_vertex();
-    file_input(is, ss, P, Intersections_tag());
-    V[i]->set_site(ss);
-    // read non-combinatorial info of the vertex
-    //    is >> *(V[i]);
-  }
-  
-  // Creation of the faces
-  int index;
-  int dim = (dimension() == -1 ? 1 : dimension() + 1);
-
-  for (i = 0; i < m; ++i) {
-    F[i] = this->_tds.create_face();
-    for (int j = 0; j < dim ; ++j){
-      is >> index;
-      F[i]->set_vertex(j, V[index]);
-      // The face pointer of vertices is set too often,
-      // but otherwise we had to use a further map
-      V[index]->set_face(F[i]);
-    }
-    // read in non-combinatorial info of the face
-    //      is >> *(F[i]) ;
-  }
-
-  // Setting the neighbor pointers 
-  for (i = 0; i < m; ++i) {
-    for (int j = 0; j < dimension()+1; ++j){
-      is >> index;
-      F[i]->set_neighbor(j, F[index]);
-    }
-  }
-}
-
-
-} //namespace CGAL
-
-// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h
deleted file mode 100644
index 92490db..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h
+++ /dev/null
@@ -1,1153 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-
-// class implementation continued
-//=================================
-
-namespace CGAL {
-
-
-//===========================================================================
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  constructors
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-init_hierarchy(const Geom_traits& gt)
-{
-  hierarchy[0] = this; 
-  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    hierarchy[i] = new Base(gt);
-  }
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-Segment_Delaunay_graph_hierarchy_2(const Gt& gt)
-  : Base(gt)
-{ 
-  init_hierarchy(gt);
-}
-
-
-// copy constructor duplicates vertices and faces
-template<class Gt, class ST, class STag, class D_S, class LTag>
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-Segment_Delaunay_graph_hierarchy_2
-(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
-    : Base(sdg.geom_traits())
-{ 
-  // create an empty triangulation to be able to delete it !
-  init_hierarchy(sdg.geom_traits());
-  copy(sdg);
-} 
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  destructor
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
-~Segment_Delaunay_graph_hierarchy_2()
-{
-  clear();
-  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i){ 
-    delete hierarchy[i];
-  }
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-// assignment operator
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag> &
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-operator=(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
-{
-  if ( this != &sdg ) {
-    copy(sdg);
-  }
-  return *this;
-}
-
-//====================================================================
-//====================================================================
-//                   METHODS FOR INSERTION
-//====================================================================
-//====================================================================
-
-//--------------------------------------------------------------------
-// insertion of a point
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-std::pair<bool,int>
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_point(const Point_2& p, const Storage_site_2& ss, int level,
-	     Vertex_handle* vertices)
-{
-  CGAL_precondition( level != UNDEFINED_LEVEL );
-
-  int new_level = level;
-
-  bool lies_on_seg = false;
-
-  Vertex_handle vertex;
-  Vertex_handle vs1, vs2;
-  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
-
-  Site_2 t = Site_2::construct_site_2(p);
-
-  nearest_neighbor(t, vnear, false);
-
-  size_type n = hierarchy[0]->number_of_vertices();
-  if ( n > 2 ) {
-    Arrangement_type at_res = this->arrangement_type(t, vnear[0]);
-
-    CGAL_assertion( at_res == AT2::DISJOINT ||
-		    at_res == AT2::INTERIOR ||
-		    at_res == AT2::IDENTICAL );
-
-    if ( vnear[0]->is_point() ) {
-      if ( at_res == AT2::IDENTICAL ) {
-	vertex = vnear[0];
-	merge_info(vertex, ss);
-      } else {
-	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
-      }
-    } else { // nearest neighbor is a segment
-      CGAL_assertion( vnear[0]->is_segment() );
-      CGAL_assertion( at_res == AT2::DISJOINT ||
-		      at_res == AT2::INTERIOR );
-
-      if ( at_res == AT2::INTERIOR ) {
-	CGAL_assertion( t.is_input() );
-	lies_on_seg = true;
-
-	int vnear_level = find_level(vnear[0]);
-
-	// I need to find the level of the nearest neighbor that t
-	// lies on and update the level of t
-	if ( new_level < vnear_level ) {
-	  new_level = vnear_level;
-	}
-
-	Vertex_triple vt =
-	  hierarchy[0]->insert_exact_point_on_segment(ss, t, vnear[0]);
-	vertex = vt.first;
-	vs1 = vt.second;
-	vs2 = vt.third;
-      } else {
-	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
-      }
-    }
-  } else if ( n == 0 ) {
-    vertex = hierarchy[0]->insert_first(ss, p);
-  } else if ( n == 1 ) {
-    vertex = hierarchy[0]->insert_second(ss, p);
-  } else if ( n == 2 ) {
-    vertex = hierarchy[0]->insert_third(ss, p);
-  }
-
-  CGAL_assertion( vertex != Vertex_handle() );
-
-  if ( vertices != NULL ) { vertices[0] = vertex; }
-
-  // insert at other levels
-  Vertex_handle previous = vertex;
-  Vertex_handle vs1_prev = vs1;
-  Vertex_handle vs2_prev = vs2;
-
-  //  Storage_site_2 ss = vertex->storage_site();
-
-  int k = 1;
-  while ( k <= new_level ) {
-    size_type nv = hierarchy[k]->number_of_vertices();
-    if ( nv > 2 ) {
-      if ( nv < sdg_hierarchy_2__minsize ) {
-	CGAL_assertion( vnear[k] == Vertex_handle() );
-	vnear[k] = hierarchy[k]->nearest_neighbor(p);
-      }
-      Arrangement_type at_res = this->arrangement_type(t, vnear[k]->site());
-      if ( at_res == AT2::INTERIOR ) {
-	Vertex_triple vt =
-	  hierarchy[k]->insert_exact_point_on_segment(ss, t, vnear[k]);
-	vertex = vt.first;
-	vs1 = vt.second;
-	vs2 = vt.third;
-
-	CGAL_assertion( (same_segments(vs1_prev->site(), vs1->site()) &&
-			 same_segments(vs2_prev->site(), vs2->site())) ||
-			(same_segments(vs1_prev->site(), vs2->site()) &&
-			 same_segments(vs2_prev->site(), vs1->site())) );
-	if ( same_segments(vs1_prev->site(), vs1->site()) ) {
-	  vs1->set_down(vs1_prev);
-	  vs1_prev->set_up(vs1);
-	  vs1_prev = vs1;
-
-	  vs2->set_down(vs2_prev);
-	  vs2_prev->set_up(vs2);
-	  vs2_prev = vs2;
-	} else {
-	  vs1->set_down(vs2_prev);
-	  vs2_prev->set_up(vs1);
-	  vs2_prev = vs1;
-
-	  vs2->set_down(vs1_prev);
-	  vs1_prev->set_up(vs2);
-	  vs1_prev = vs2;
-	}
-      } else {
-	vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);	
-      }
-    } else if ( nv == 2 ) {
-      vertex = hierarchy[k]->insert_third(t, ss);
-    } else { // nv == 0 || nv == 1
-      vertex = hierarchy[k]->insert_no_register(ss, p, vnear[k]);
-    }
-
-    CGAL_assertion( vertex != Vertex_handle() );
-
-    if ( vertices != NULL ) { vertices[k] = vertex; }
-
-    vertex->set_down(previous); // link with other levels
-    previous->set_up(vertex);
-    previous = vertex;
-    k++;
-  }
-  return std::make_pair(lies_on_seg, new_level);
-}
-
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_point(const Site_2& t, const Storage_site_2& ss,
-	     int low, int high, Vertex_handle vbelow,
-	     Vertex_handle* vertices)
-{
-  CGAL_precondition( low >= 1 && low <= high );
-  CGAL_precondition( vbelow != Vertex_handle() );
-
-  Vertex_handle vertex;
-  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
-
-  nearest_neighbor(t, vnear, false);
-
-  Vertex_handle previous = vbelow;
-
-  // insert at all levels
-  int k = low;
-  while ( k <= high ) {
-    // MK::ERROR: this is a hack. I need to change the code in the
-    // segment Delaunay graph class, so that I can insert sites as
-    // the first, second, or third site...; actually this is
-    // problematic only if the number of vertices is exactly 2; it
-    // cannot be smaller since we already have added the endpoints
-    // of the segment at level k.
-    size_type n = hierarchy[k]->number_of_vertices();
-    if ( n > 2 ) {
-      vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);
-    } else if ( n == 2 ) {
-      vertex = hierarchy[k]->insert_third(t, ss);
-    } else {
-      if ( ss.is_input() ) {
-	vertex = hierarchy[k]->insert_no_register(ss, t.point(), vnear[k]);
-      } else {
-	break;
-      }
-      // ideally what should be instead of the break-statement above is the
-      // following statement(s) in the #if-#endif block
-#if 0
-    } else if ( n == 1 ) {
-      vertex = hierarchy[k]->insert_second(t, ss);
-    } else {
-      CGAL_assertion( n == 0 );
-      vertex = hierarchy[k]->insert_first(t, ss);
-#endif
-    }
-
-    CGAL_assertion( vertex != Vertex_handle() );
-
-    if ( vertices != NULL ) { vertices[k] = vertex; }
-
-    vertex->set_down(previous); // link with other levels
-    previous->set_up(vertex);
-    previous = vertex;
-    k++;
-  }
-}
-
-
-//--------------------------------------------------------------------
-// insertion of a segment
-//--------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_segment(const Point_2& p0, const Point_2& p1,
-	       const Storage_site_2& ss, int level)
-{
-  // the tag is true so we DO insert segments in hierarchy
-  if ( level == UNDEFINED_LEVEL ) {
-    level = random_level();
-  }
-
-  Site_2 t = Site_2::construct_site_2(p0, p1);
-
-  if ( is_degenerate_segment(t) ) {
-    Storage_site_2 ss_src = ss.source_site();
-    convert_info(ss_src, ss, true);
-    return insert_point(p0, ss_src, level);
-  }
-
-  Vertex_handle vertices0[sdg_hierarchy_2__maxlevel];
-  Vertex_handle vertices1[sdg_hierarchy_2__maxlevel];
-
-  Storage_site_2 ss_src = ss.source_site();
-  convert_info(ss_src, ss, true);
-#if 1
-  insert_point(p0, ss_src, level, vertices0);
-#else
-  std::pair<bool,int> res = insert_point(p0, ss_src, level, vertices0);
-  if ( res.first ) { level = res.second; }
-#endif
-
-  Storage_site_2 ss_trg = ss.target_site();
-  convert_info(ss_trg, ss, false);
-  insert_point(p1, ss_trg, level, vertices1);
-
-  CGAL_assertion( vertices0[0] != Vertex_handle() );
-  CGAL_assertion( vertices1[0] != Vertex_handle() );
-
-  Vertex_handle vertex;
-
-  if ( hierarchy[0]->number_of_vertices() == 2 ) {
-    static Segments_in_hierarchy_tag stag;
-
-    vertex = hierarchy[0]->insert_third(ss, vertices0[0], vertices1[0]);
-    insert_segment_in_upper_levels(t, vertex->storage_site(),
-				   vertex, vertices0, level, stag);
-  } else {
-    vertex = insert_segment_interior(t, ss, vertices0, level);
-  }
-
-  return vertex;
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_segment_interior(const Site_2& t, const Storage_site_2& ss,
-			const Vertex_handle* vertices, int level)
-{
-  // insert the interior of a segment, and DO insert segments in
-  // upper levels of the hierarchy
-  CGAL_precondition( t.is_segment() );
-  CGAL_precondition( this->number_of_vertices() >= 2 );
-
-  CGAL_assertion( vertices[0] != Vertex_handle() );
-  // MK: add here code that checks if the inserted segment has already
-  // been inserted; MAYBE THIS IS NOT NEEDED; I ALREADY DO IT IN
-  // arrangement_type
-
-  // the tags
-  static Intersections_tag          itag;
-  static Segments_in_hierarchy_tag  stag;
-
-  // find the first conflict
-
-  // first look if there are intersections...
-  Vertex_circulator vc = hierarchy[0]->incident_vertices(vertices[0]);
-  Vertex_circulator vc_start = vc;
-  do {
-    Vertex_handle vv(vc);
-    if ( is_infinite(vv) ) {
-      vc++;
-      continue;
-    }
-
-    Arrangement_type at_res = this->arrangement_type(t, vv);
-    if ( vv->is_segment() ) {
-      if ( at_res == AT2::DISJOINT || at_res == AT2::TOUCH_1 ||
-	   at_res == AT2::TOUCH_2 || at_res == AT2::TOUCH_11 ||
-	   at_res == AT2::TOUCH_12 || at_res == AT2::TOUCH_21 ||
-	   at_res == AT2::TOUCH_22 ) {
-	// do nothing
-      } else if ( at_res == AT2::IDENTICAL ) {
-	// merge info of identical items
-	merge_info(vv, ss);
-	return vv;
-      } else if ( at_res == AT2::CROSSING ) {
-	return insert_intersecting_segment_with_tag(ss, t, vv, level,
-						    itag, stag);
-      } else if ( at_res == AT2::TOUCH_11_INTERIOR_1 ) {
-	Vertex_handle vp = second_endpoint_of_segment(vv);
-
-	Storage_site_2 sss = split_storage_site(ss, vp->storage_site(), true);
-	// merge the info of the first (common) subsegment
-	merge_info(vv, sss);
-
-	return insert_segment_on_point(ss, vp, level, 1);
-      } else if ( at_res == AT2::TOUCH_12_INTERIOR_1 ) {
-	Vertex_handle vp = first_endpoint_of_segment(vv);
-	return insert_segment_on_point(ss, vp, level, 0);
-      } else {
-	// this should never be reached; the only possible values for
-	// at_res are DISJOINT, CROSSING, TOUCH_11_INTERIOR_1
-	// and TOUCH_12_INTERIOR_1
-	CGAL_error();
-      }
-    } else {
-      CGAL_assertion( vv->is_point() );
-      if ( at_res == AT2::INTERIOR ) {
-	Storage_site_2 svv = vv->storage_site();
-	if ( svv.is_input() ) {
-	  return insert_segment_on_point(ss, vv, level, 2);
-	} else {
-	  // MK::ERROR:: not ready yet
-	  CGAL_error();
-	}
-      }
-    }
-    ++vc;
-  } while ( vc != vc_start );
-
-  // first look for conflict with vertex
-  Face_circulator fc_start = hierarchy[0]->incident_faces(vertices[0]);
-  Face_circulator fc = fc_start;
-  Face_handle start_f;
-  Sign s;
-
-  std::map<Face_handle,Sign> sign_map;
-
-  do {
-    Face_handle f(fc);
-
-    s = incircle(f, t);
-
-    sign_map[f] = s;
-
-    if ( s == NEGATIVE ) {
-      start_f = f;
-      break;
-    }
-    ++fc;
-  } while ( fc != fc_start );
-
-  // segments must have a conflict with at least one vertex
-  CGAL_assertion( s == NEGATIVE );
-
-  // we are in conflict with a Voronoi vertex; start from that and 
-  // find the entire conflict region and then repair the diagram
-  List l;
-  Face_map fm;
-
-  Triple<bool, Vertex_handle, Arrangement_type>
-    vcross(false, Vertex_handle(), AT2::DISJOINT);
-
-  hierarchy[0]->initialize_conflict_region(start_f, l);
-  hierarchy[0]->expand_conflict_region(start_f, t, ss, l, fm,
-				       sign_map, vcross);
-
-  CGAL_assertion( vcross.third == AT2::DISJOINT ||
-		  vcross.third == AT2::CROSSING ||
-		  vcross.third == AT2::INTERIOR );
-
-  // the following condition becomes true only if intersecting
-  // segments are found
-  if ( vcross.first ) {
-    if ( t.is_segment() ) {
-      if ( vcross.third == AT2::CROSSING ) {
-	Intersections_tag itag;
-	return insert_intersecting_segment_with_tag(ss, t, vcross.second,
-						    level, itag, stag);
-      } else if ( vcross.third == AT2::INTERIOR ) {
-	return insert_segment_on_point(ss, vcross.second, level, 2);
-      } else {
-	// this should never be reached; the only possible values for
-	// vcross.third are CROSSING, INTERIOR and DISJOINT
-	CGAL_error();
-      }
-    }
-  }
-
-  // no intersecting segment has been found; we insert the segment as
-  // usual...
-  Vertex_handle v = hierarchy[0]->create_vertex(ss);
-
-  hierarchy[0]->retriangulate_conflict_region(v, l, fm);
-
-  insert_segment_in_upper_levels(t, ss, v, vertices, level, stag);
-
-  return v;
-}
-
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_segment_in_upper_levels(const Site_2& t, const Storage_site_2& ss,
-			       Vertex_handle vbelow,
-			       const Vertex_handle* vertices,
-			       int level, Tag_true /* stag */)
-{
-  CGAL_precondition( vertices != NULL );
-  CGAL_precondition( vbelow != Vertex_handle() );
-
-  // insert at all upper levels
-  Vertex_handle previous = vbelow;
-  Vertex_handle vertex = vbelow;
-
-  int k = 1;
-  while ( k <= level ) {
-    if ( hierarchy[k]->number_of_vertices() == 2 ) {
-      Vertex_handle v0(hierarchy[k]->finite_vertices_begin());
-      Vertex_handle v1(++(hierarchy[k]->finite_vertices_begin()));
-      CGAL_precondition( v0 != Vertex_handle() &&
-			 v1 != Vertex_handle() );
-      vertex = hierarchy[k]->insert_third(ss, v0, v1);
-    } else {
-      vertex = hierarchy[k]->insert_segment_interior(t, ss, vertices[k]);
-    }
-
-    CGAL_assertion( vertex != Vertex_handle() );
-
-    vertex->set_down(previous); // link with level above
-    previous->set_up(vertex);
-    previous = vertex;
-    k++;
-  }
-}
-
-//--------------------------------------------------------------------
-// insertion of a segment that goes through a point
-//--------------------------------------------------------------------
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_segment_on_point(const Storage_site_2& ss,
-			const Vertex_handle& v,
-			int level, int which)
-{  
-  // inserts the segment represented by ss in the case where this
-  // segment goes through a point which has already been inserted and
-  // corresponds to the vertex handle v
-  CGAL_precondition( ss.is_segment() );
-  CGAL_precondition( v->is_point() );
-
-  Storage_site_2 ssv = v->storage_site();
-  Site_2 sv = ssv.site();
-
-  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
-
-  nearest_neighbor(sv, vnear, false);
-
-  int v_level = find_level(v);
-
-  if ( v_level < level ) {
-    Vertex_handle vbelow = vnear[v_level];
-
-    insert_point(sv, ssv, v_level + 1, level, vbelow, vnear);
-  }
-
-  // merge the info of the (common) splitting endpoint
-  merge_info(v, ss);
-
-  if ( which == 2 ) {
-    Storage_site_2 ss1 = this->split_storage_site(ss, ssv, true);
-    Storage_site_2 ss2 = this->split_storage_site(ss, ssv, false);
-
-    insert_segment_interior(ss1.site(), ss1, vnear, level);
-    return insert_segment_interior(ss2.site(), ss2, vnear, level);
-  }
-
-  Storage_site_2 ss1 = this->split_storage_site(ss, ssv, which == 0);
-  return insert_segment_interior(ss1.site(), ss1, vnear, level);
-}
-
-//--------------------------------------------------------------------
-// insertion of an intersecting segment
-//--------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				     const Site_2& t, Vertex_handle v,
-				     int level,
-				     Tag_true itag, Tag_false /* stag */)
-{
-  CGAL_precondition( t.is_segment() && v->is_segment() );
-
-  const Storage_site_2& ssitev = v->storage_site();
-  Site_2 sitev = ssitev.site();
-
-  if ( same_segments(t, sitev) ) {
-    merge_info(v, ss);
-    return v;
-  }
-
-  Vertex_triple vt = hierarchy[0]->insert_point_on_segment(ss, t, v, itag);
-
-  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
-
-  Vertex_handle vsx = vt.first;
-  verticesx[0] = vsx;
-
-  bool compute_new_level = true;
-  int new_level = compute_new_level ? random_level() : level;
-  if ( new_level > 0 ) {
-    Storage_site_2 ssx = vsx->storage_site();
-    Site_2 sx = ssx.site();
-    insert_point(sx, ssx, 1, new_level, vsx, verticesx);
-  }
-
-  Storage_site_2 ss3 =
-    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
-  Storage_site_2 ss4 =
-    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
-
-  Site_2 s3 = ss3.site();
-  Site_2 s4 = ss4.site();
-
-  insert_segment_interior(s3, ss3, verticesx, level);
-  insert_segment_interior(s4, ss4, verticesx, level);
-  return vsx;
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				     const Site_2& t, Vertex_handle v,
-				     int level,
-				     Tag_true itag, Tag_true /* stag */)
-{
-  CGAL_precondition( t.is_segment() && v->is_segment() );
-
-  CGAL_expensive_precondition( arrangement_type(t, v->site()) );
-
-  const Storage_site_2& ssitev = v->storage_site();
-  Site_2 sitev = ssitev.site();
-
-  if ( same_segments(t, sitev) ) {
-    // MK::ERROR: I may need to insert it to levels higher than its
-    // previous level...
-    merge_info(v, ss);
-    return v;
-  }
-
-  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
-
-  int levelv = find_level(v);
-
-  Vertex_handle vcross = v;
-  Vertex_handle v1_old, v2_old, vsx_old;
-
-  int k = 0;
-  while ( k <= levelv ) {
-    Vertex_handle vcross_up = vcross->up();
-
-    Vertex_triple vt =
-      hierarchy[k]->insert_point_on_segment(ss, t, vcross, itag);
-
-    // now I need to update the sites for vertices v1 and v2
-    Vertex_handle vsx = vt.first;
-    Vertex_handle v1 = vt.second;
-    Vertex_handle v2 = vt.third;
-
-    CGAL_assertion( v1->is_segment() && v2->is_segment() );
-
-    if ( k > 0 ) {
-      CGAL_assertion( (same_segments(v1->site(), v1_old->site()) &&
-		       same_segments(v2->site(), v2_old->site())) ||
-		      (same_segments(v1->site(), v2_old->site()) &&
-		       same_segments(v2->site(), v1_old->site()))
-		      );
-      if ( same_segments(v1->site(), v1_old->site()) ) {
-	v1->set_down(v1_old);
-	v2->set_down(v2_old);
-	v1_old->set_up(v1);
-	v2_old->set_up(v2);
-      } else {
-	v1->set_down(v2_old);
-	v2->set_down(v1_old);
-	v1_old->set_up(v2);
-	v2_old->set_up(v1);
-      }
-      vsx_old->set_up(vsx);
-      vsx->set_down(vsx_old);
-    }
-
-    v1_old = v1;
-    v2_old = v2;
-    vsx_old = vsx;
-
-    verticesx[k] = vsx;
-
-    vcross = vcross_up;
-    k++;
-  }
-
-  if ( levelv < level ) {
-    Storage_site_2 ssx = verticesx[0]->storage_site();
-    Site_2 sx = ssx.site();
-
-    insert_point(sx, ssx, levelv + 1, level, verticesx[levelv], verticesx);
-  }
-
-  Storage_site_2 ss3 =
-    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
-
-  Storage_site_2 ss4 =
-    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
-
-  Site_2 s3 = ss3.site();
-  Site_2 s4 = ss4.site();
-
-  insert_segment_interior(s3, ss3, verticesx, level);
-  insert_segment_interior(s4, ss4, verticesx, level);
-  return verticesx[0];
-}
-
-
-//====================================================================
-//====================================================================
-//                   METHODS FOR REMOVAL
-//====================================================================
-//====================================================================
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-remove(const Vertex_handle& v)
-{
-  CGAL_precondition( !is_infinite(v) );
-  const Storage_site_2& ss = v->storage_site();
-
-  if ( !ss.is_input() ) { return false; }
-
-  Point_handle h1, h2;
-  bool is_point = ss.is_point();
-  if ( is_point ) {
-    h1 = ss.point();
-  } else {
-    CGAL_assertion( ss.is_segment() );   
-    h1 = ss.source_of_supporting_site();
-    h2 = ss.target_of_supporting_site();
-  }
-
-  // remove at level 0
-  Vertex_handle u = v->up();
-  bool success = hierarchy[0]->remove_base(v);
-  if ( !success ) { return false; }
-
-  // remove at higher levels
-  unsigned int l = 1;
-  Vertex_handle vv = u;
-  while ( u != Vertex_handle() ) {
-    if ( l >= sdg_hierarchy_2__maxlevel) { break; }
-    vv = u;
-    u = vv->up();
-    success = hierarchy[l++]->remove_base(vv);
-    CGAL_assertion( success );
-  }
-
-  // unregister the input site
-  if ( is_point ) {
-    this->unregister_input_site( h1 );
-  } else {
-    this->unregister_input_site( h1, h2 );
-  }
-
-  return true;
-}
-
-//===========================================================================
-//===========================================================================
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  nearest neighbor location
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-typename
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle 
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-nearest_neighbor(const Point_2& p, bool force_point) const
-{
-  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
-  //  nearest_neighbor(Site_2(p), vnear, force_point);
-
-  Site_2 t = Site_2::construct_site_2(p);
-
-  nearest_neighbor(t, vnear, force_point);
-  return vnear[0];
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-nearest_neighbor(const Site_2& t,
-		 Vertex_handle vnear[sdg_hierarchy_2__maxlevel],
-		 bool /* force_point */) const
-{
-  CGAL_precondition( t.is_point() );
-
-  Vertex_handle nearest;
-  int level  = sdg_hierarchy_2__maxlevel;
-
-  // find the highest level with enough vertices
-  while ( hierarchy[--level]->number_of_vertices() 
-	  < sdg_hierarchy_2__minsize ) {
-    if ( !level ) break;  // do not go below 0
-  }
-  for (unsigned int i = level + 1; i < sdg_hierarchy_2__maxlevel; i++) {
-    vnear[i] = Vertex_handle();
-  }
-
-  while ( level > 0 ) {
-    vnear[level] = nearest =
-      hierarchy[level]->nearest_neighbor(t, nearest);  
-
-    CGAL_assertion( !hierarchy[level]->is_infinite(vnear[level]) );
-    CGAL_assertion( vnear[level] != Vertex_handle() );
-    // go at the same vertex on level below
-    nearest = nearest->down();
-    --level;
-  }
-  vnear[0] = hierarchy[0]->nearest_neighbor(t, nearest);
-  // at level 0
-}
-
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  miscellaneous methods
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::   
-copy(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
-{
-#ifndef CGAL_NO_ASSERTIONS
-  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    CGAL_assertion( hierarchy[i]->pc_.size() == 0 );
-    CGAL_assertion( hierarchy[i]->isc_.size() == 0 );
-
-    CGAL_assertion( sdg.hierarchy[i]->pc_.size() == 0 );
-    CGAL_assertion( sdg.hierarchy[i]->isc_.size() == 0 );
-  }
-#endif
-
-  // first copy the point container and input point container
-  this->pc_ = sdg.pc_;
-
-  // first create a map between the old point handles and the new ones
-  Handle_map hm;
-
-  Point_handle it_other = sdg.hierarchy[0]->pc_.begin();
-  Point_handle it_this = hierarchy[0]->pc_.begin();
-  for (; it_other != sdg.hierarchy[0]->pc_.end(); ++it_other, ++it_this) {
-    hm.insert( Point_handle_pair(it_other, it_this) );
-  }
-
-  {
-    for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-      hierarchy[i]->copy(*sdg.hierarchy[i], hm);
-    }
-  }
-
-  //up and down have been copied in straightforward way
-  // compute a map at lower level
-  std::map< Vertex_handle, Vertex_handle > V;
-  {
-    for(Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
-	it != hierarchy[0]->finite_vertices_end(); ++it) {
-      if ( it->up() != Vertex_handle() ) {
-	V[ it->up()->down() ] = it;
-      }
-    }
-  }
-  {
-    for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-      for(Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
-	  it != hierarchy[i]->finite_vertices_end(); ++it) {
-	// down pointer goes in original instead in copied triangulation
-	it->set_down(V[it->down()]);
-	// make reverse link
-	it->down()->set_up( it );
-	// make map for next level
-	if ( it->up() != Vertex_handle() ) {
-	  V[ it->up()->down() ] = it;
-	}
-      }
-    }
-  }
-
-  // the point container and the input sites container are copied by
-  // the operator= of the one-level classes
-  //  hierarchy[0]->pc_ = sdg.hierarchy[0]->pc_;
-  //  hierarchy[0]->isc_ = sdg.hierarchy[0]->isc_;
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
-clear()
-{
-  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    hierarchy[i]->clear();
-  }
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
-swap(Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>& other)
-{
-  Base* temp;
-  Base::swap(other);
-  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    temp = hierarchy[i];
-    hierarchy[i] = other.hierarchy[i];
-    other.hierarchy[i]= temp;
-  }
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  validity check
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-template<class Gt, class ST, class STag, class D_S, class LTag>
-bool
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
-is_valid(bool verbose, int level) const
-{
-  bool result(true);
-
-  //verify correctness of triangulation at all levels
-  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    if ( verbose ) {
-      std::cerr << "Level " << i << ": " << std::flush;
-    }
-    result = result && hierarchy[i]->is_valid(verbose, level);
-    if ( verbose ) {
-      std::cerr << std::endl;
-    }
-  }
-  //verify that lower level has no down pointers
-  for( Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
-       it != hierarchy[0]->finite_vertices_end(); ++it) {
-    result = result && ( it->down() == Vertex_handle() );
-  }
-
-  //verify that other levels has down pointer and reciprocal link is fine
-  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    for( Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
-	 it != hierarchy[i]->finite_vertices_end(); ++it) {
-      Vertex_handle vit(it);
-      result = result && ( it->down()->up() == vit );
-    }
-  }
-  return result;
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  local helper methods
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-print_error_message() const
-{
-  std::cerr << std::endl;
-  std::cerr << "ATTENTION:" << std::endl;
-  std::cerr << "A segment-segment intersection was found."
-	    << std::endl;
-  std::cerr << "The Segment_Delaunay_graph_hierarchy_2 class is not"
-	    << " configured to handle this situation." << std::endl;
-  std::cerr << "Please look at the documentation on how to handle"
-	    << " this behavior." << std::endl;
-  std::cerr << std::endl;
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//  file I/O
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-file_output(std::ostream& os) const
-{
-  typedef std::map<Vertex_handle,int>        Vertex_map;
-  typedef typename Base::const_Point_handle  const_Point_handle;
-
-  // compute the point handle mapper
-  typename Base::Point_handle_mapper P;
-  size_type inum = 0;
-  for (const_Point_handle ph = this->pc_.begin(); ph != this->pc_.end(); ++ph) {
-    P[ph] = inum++;
-  }
-
-  // write each level of the hierarchy
-  hierarchy[0]->file_output(os, P, true);
-  if ( is_ascii(os) ) { os << std::endl << std::endl; }
-  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    hierarchy[i]->file_output(os, P, false);
-    if ( is_ascii(os) ) { os << std::endl << std::endl; }
-  }
-
-  Vertex_map* V = new Vertex_map[sdg_hierarchy_2__maxlevel];
-
-  // create the map of vertex indices
-  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    int inum = 0;
-    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
-	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
-      V[i][vit] = inum++;
-    }
-  }
-
-  Vertex_map* V_up   = new Vertex_map[sdg_hierarchy_2__maxlevel];
-  Vertex_map* V_down = new Vertex_map[sdg_hierarchy_2__maxlevel];
-
-  // create the map of up and down pointers
-  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
-	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
-      if ( vit->up() != Vertex_handle() ) {
-	V_up[i][vit] = V[i+1][vit->up()];
-      } else {
-	V_up[i][vit] = -1;
-      }
-
-      if ( vit->down() != Vertex_handle() ) {
-	V_down[i][vit] = V[i-1][vit->down()];
-      } else {
-	V_down[i][vit] = -1;
-      }
-    }
-  }
-
-  // write up and down pointer info
-  if ( is_ascii(os) ) { os << std::endl << std::endl; }
-  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    os << i;
-    if ( is_ascii(os) ) { os << " "; }
-    os << hierarchy[i]->number_of_vertices();
-    if ( is_ascii(os) ) { os << std::endl; }
-    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
-	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
-      os << V[i][vit];
-      if ( is_ascii(os) ) { os << " "; }
-      os << V_down[i][vit];
-      if ( is_ascii(os) ) { os << " "; }
-      os << V_up[i][vit];
-      if ( is_ascii(os) ) { os << std::endl; }
-    }
-    if ( is_ascii(os) ) { os << std::endl << std::endl; }
-  }
-
-  delete[] V;
-  delete[] V_up;
-  delete[] V_down;
-}
-
-template<class Gt, class ST, class STag, class D_S, class LTag>
-void
-Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>::
-file_input(std::istream& is)
-{
-  typedef std::vector<Vertex_handle>  Vertex_vector;
-
-  // firstly, read the segment Delaunay graph at each level
-  clear();
-  typename Base::Point_handle_vector P;
-  hierarchy[0]->file_input(is, true, P);
-  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
-    hierarchy[i]->file_input(is, false, P);
-  }
-
-  Vertex_vector* V = new Vertex_vector[sdg_hierarchy_2__maxlevel];
-
-  // secondly, create the map of vertex indices
-  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    V[i].resize(hierarchy[i]->number_of_vertices());
-    int j = 0;
-    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
-	 vit != hierarchy[i]->finite_vertices_end(); ++vit, ++j) {
-      V[i][j] = vit;
-    }
-  }
-
-  // read the correspondences between up and down pointers and set
-  // them appropriately
-  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
-    unsigned int level;
-    int vnum;
-    is >> level >> vnum;
-    for (int k = 0; k < vnum; k++) {
-      int ithis, iup, idown;
-      is >> ithis >> idown >> iup;
-      if ( idown != -1 ) { V[i][ithis]->set_down(V[i-1][idown]); }
-      if ( iup != -1 )   { V[i][ithis]->set_up(V[i+1][iup]); }
-    }
-  }
-
-  delete[] V;
-}
-
-
-//--------------------------------------------------------------------
-
-
-} //namespace CGAL
-
-
-// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h
deleted file mode 100644
index 8c819ae..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
-#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
-
-#include <CGAL/Segment_Delaunay_graph_2/basic.h>
-#include <CGAL/Segment_Delaunay_graph_2/Predicates_C2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Constructions_C2.h>
-#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
-
-namespace CGAL {
-
-namespace Internal {
-
-  template<class K,class BooleanTag> struct Which_arrangement_type;
-
-  // Tag_true means that we want to support intersections
-  template<class K>
-  struct Which_arrangement_type<K,Tag_true>
-  {
-    typedef
-    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_C2<K>
-    Arrangement_type;
-  };
-
-  // Tag_false means that we do not want to support intersections
-  template<class K>
-  struct Which_arrangement_type<K,Tag_false>
-  {
-    typedef
-    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_non_intersecting_C2<K>
-    Arrangement_type;
-  };
-
-} // namespace Internal
-
-
-//-----------------------------------------------------------------------
-// the Traits class
-//-----------------------------------------------------------------------
-
-template<class R, class MTag, class ITag>
-class Segment_Delaunay_graph_traits_base_2
-{
-public:
-  //-----------------------------------------------------------------------
-  //                  TYPE DEFINITIONS
-  //-----------------------------------------------------------------------
-
-  // BASIC TYPES
-  //------------
-  
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<R,ITag>  Kernel;
-  typedef Kernel                                              K;
-  typedef R                                                   Rep;
-  typedef MTag                                                Method_tag;
-
-  // the following tag controls how support intersections in the
-  // traits. If it is Tag_true then we fully support intersections.
-  // If it is Tag_true it is assumed that no intersections appear in
-  // the data and so there is limited support for intersections.
-  typedef ITag                                    Intersections_tag;
-
-  typedef typename Kernel::Point_2                Point_2;
-  typedef typename Kernel::Line_2                 Line_2;
-  typedef typename Kernel::Segment_2              Segment_2;
-  typedef typename Kernel::Ray_2                  Ray_2;
-  //  typedef typename Kernel::Circle_2               Circle_2;
-
-  typedef typename Kernel::Site_2                 Site_2;
-  typedef typename Kernel::Object_2               Object_2;
-
-  typedef typename Kernel::FT                     FT;
-  typedef typename Kernel::RT                     RT;
-
-protected:
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Arrangement_enum
-  Arrangement_enum;
-
-public:
-  // OBJECT CONSTRUCTION & ASSIGNMENT
-  //-------------------------------
-  typedef typename Kernel::Construct_object_2     Construct_object_2;
-  typedef typename Kernel::Assign_2               Assign_2;
-
-  // CONSTRUCTIONS
-  //--------------
-  // vertex and Voronoi circle
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_svd_vertex_2<K,MTag>
-  Construct_svd_vertex_2;
-
-  /*
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_svd_circle_2<K,MTag>
-  Construct_svd_circle_2;
-  */
-
-  // PREDICATES
-  //-----------
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Compare_x_2<K>
-  Compare_x_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Compare_y_2<K>
-  Compare_y_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Orientation_C2<K>
-  Orientation_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_points_C2<K>
-  Equal_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_parallel_C2<K>
-  Are_parallel_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_of_bisector_C2<K,MTag>
-  Oriented_side_of_bisector_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Vertex_conflict_C2<K,MTag>
-  Vertex_conflict_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Finite_edge_interior_conflict_C2<K,MTag>
-  Finite_edge_interior_conflict_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Infinite_edge_interior_conflict_C2<K,MTag>
-  Infinite_edge_interior_conflict_2;
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Is_degenerate_edge_C2<K,MTag>
-  Is_degenerate_edge_2;
-
-#ifdef CGAL_SDG_USE_SIMPLIFIED_ARRANGEMENT_TYPE_PREDICATE
-  typedef typename
-  Internal::Which_arrangement_type<K,ITag>::Arrangement_type
-  Arrangement_type_2;
-#else
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_C2<K>
-  Arrangement_type_2;
-#endif
-
-  typedef
-  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_C2<K,MTag>
-  Oriented_side_2;
-
-  typedef typename R::Less_x_2 Less_x_2;
-  typedef typename R::Less_y_2 Less_y_2;
-
-public:
-  //-----------------------------------------------------------------------
-  //                  ACCESS TO OBJECTS
-  //-----------------------------------------------------------------------
-
-  // OBJECT CONSTRUCTION & ASSIGNMENT
-  //---------------------------------
-  Assign_2
-  assign_2_object() const {
-    return Assign_2();
-  }
-
-  Construct_object_2
-  construct_object_2_object() const { 
-    return Construct_object_2();
-  }
-
-  // CONSTRUCTIONS
-  //--------------
-  Construct_svd_vertex_2
-  construct_svd_vertex_2_object() const { 
-    return Construct_svd_vertex_2();
-  }
-
-  /*
-  Construct_svd_circle_2
-  construct_svd_circle_2_object() const {
-    return Construct_svd_circle_2();
-  }
-  */
-
-  // PREDICATES
-  //-----------
-  Compare_x_2
-  compare_x_2_object() const {
-    return Compare_x_2();
-  }
-
-  Compare_y_2
-  compare_y_2_object() const {
-    return Compare_y_2();
-  }
-
-  Orientation_2
-  orientation_2_object() const {
-    return Orientation_2();
-  }
-
-  Equal_2
-  equal_2_object() const {
-    return Equal_2();
-  }
-
-  Are_parallel_2
-  are_parallel_2_object() const {
-    return Are_parallel_2();
-  }
-
-  Oriented_side_of_bisector_2
-  oriented_side_of_bisector_2_object() const {
-    return Oriented_side_of_bisector_2();
-  }
-
-  Vertex_conflict_2
-  vertex_conflict_2_object() const {
-    return Vertex_conflict_2();
-  }
-
-  Finite_edge_interior_conflict_2
-  finite_edge_interior_conflict_2_object() const {
-    return Finite_edge_interior_conflict_2();
-  }
-
-  Infinite_edge_interior_conflict_2
-  infinite_edge_interior_conflict_2_object() const {
-    return Infinite_edge_interior_conflict_2();
-  }
-
-  Is_degenerate_edge_2
-  is_degenerate_edge_2_object() const {
-    return Is_degenerate_edge_2();
-  }
-
-  Arrangement_type_2
-  arrangement_type_2_object() const {
-    return Arrangement_type_2();
-  }
-
-  Oriented_side_2
-  oriented_side_2_object() const {
-    return Oriented_side_2();
-  }
-
-  Less_x_2
-  less_x_2_object() const {
-    return Less_x_2();
-  }
-
-  Less_y_2
-  less_y_2_object() const {
-    return Less_y_2();
-  }
-};
-
-} //namespace CGAL
-
-#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h b/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h
deleted file mode 100644
index 8eb2ffc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h
+++ /dev/null
@@ -1,506 +0,0 @@
-// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-
-
-#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
-#define CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
-
-#include <map>
-
-#include <boost/random/random_number_generator.hpp>
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/geometric_distribution.hpp>
-#include <boost/random/variate_generator.hpp>
-
-#include <CGAL/Segment_Delaunay_graph_2/basic.h>
-
-#include <CGAL/Segment_Delaunay_graph_2.h>
-#include <CGAL/Triangulation_data_structure_2.h>
-#include <CGAL/Segment_Delaunay_graph_vertex_base_2.h>
-#include <CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h>
-#include <CGAL/Segment_Delaunay_graph_face_base_2.h>
-
-
-namespace CGAL {
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-// parameterization of the hierarchy
-#ifdef CGAL_SDG_HIERARCHY_DEMO
-const unsigned int sdg_hierarchy_2__ratio    = 3;
-const unsigned int sdg_hierarchy_2__minsize  = 5;
-#else
-const unsigned int sdg_hierarchy_2__ratio    = 30;
-const unsigned int sdg_hierarchy_2__minsize  = 20;
-#endif
-const unsigned int sdg_hierarchy_2__maxlevel = 5;
-// maximal number of points is 30^5 = 24 millions !
-
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
-
-template < class Gt,
-	   class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
-	   class STag = Tag_false,
-	   class D_S = Triangulation_data_structure_2<
-              Segment_Delaunay_graph_hierarchy_vertex_base_2<
-		Segment_Delaunay_graph_vertex_base_2<ST> >,
-              Segment_Delaunay_graph_face_base_2<Gt> >,
-	   class LTag = Tag_false>
-class Segment_Delaunay_graph_hierarchy_2
-  : public Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>
-{
-protected:
-  typedef Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag>  Self;
-
-public:
-  // PUBLIC TYPES
-  //-------------
-  typedef Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>  Base;
-
-  typedef typename Base::Geom_traits        Geom_traits;
-  typedef typename Base::Storage_traits     Storage_traits;
-
-  typedef typename Geom_traits::Point_2     Point_2;
-  typedef typename Geom_traits::Site_2      Site_2;
-
-  typedef typename Base::Vertex_handle      Vertex_handle;
-  typedef typename Base::Face_handle        Face_handle;
-  typedef typename Base::Edge               Edge;
-
-  typedef typename Base::Vertex_circulator         Vertex_circulator;
-  typedef typename Base::Edge_circulator           Edge_circulator;
-  typedef typename Base::Face_circulator           Face_circulator;
-
-  typedef typename Base::All_faces_iterator        All_faces_iterator;
-  typedef typename Base::Finite_faces_iterator     Finite_faces_iterator;
-  typedef typename Base::All_vertices_iterator     All_vertices_iterator;
-  typedef typename Base::Finite_vertices_iterator  Finite_vertices_iterator;
-  typedef typename Base::All_edges_iterator        All_edges_iterator;
-  typedef typename Base::Finite_edges_iterator     Finite_edges_iterator;
-
-  typedef typename Base::Input_sites_iterator      Input_sites_iterator;
-  typedef typename Base::Output_sites_iterator     Output_sites_iterator;
-
-  typedef typename Base::Point_handle              Point_handle;
-
-protected:
-  typedef typename Base::Handle_map                Handle_map;
-  typedef typename Base::Point_handle_pair         Point_handle_pair;
-
-  using Base::merge_info;
-  using Base::same_segments;
-  using Base::is_degenerate_segment;
-  using Base::convert_info;
-  using Base::second_endpoint_of_segment;
-  using Base::split_storage_site;
-  using Base::first_endpoint_of_segment;
-  using Base::incircle;
-
-public:
-  using Base::is_infinite;
-
-  typedef typename Base::Point_container           Point_container;
-  typedef typename Base::size_type                 size_type;
-
-  typedef typename Base::Intersections_tag         Intersections_tag;
-
-  typedef STag                            Insert_segments_in_hierarchy_tag;
-  typedef STag                            Segments_in_hierarchy_tag;
-
-protected:
-  // LOCAL TYPES
-  //------------
-  typedef typename Base::Storage_site_2            Storage_site_2;
-  typedef typename Base::List                      List;
-  typedef typename Base::Face_map                  Face_map;
-  typedef typename Base::Vertex_triple             Vertex_triple;
-
-  typedef typename Base::Arrangement_type          Arrangement_type;
-  typedef typename Base::AT2                       AT2;
-
-protected:
-  // LOCAL VARIABLES
-  //----------------
-  static const int UNDEFINED_LEVEL = -1;
-
-  // here is the stack of triangulations which form the hierarchy
-  Base*   hierarchy[sdg_hierarchy_2__maxlevel];
-  boost::rand48  random; // random generator
-public:
-  // CONSTRUCTORS
-  //-------------
-  Segment_Delaunay_graph_hierarchy_2(const Gt& gt = Gt());
-
-  template<class Input_iterator>
-  Segment_Delaunay_graph_hierarchy_2(Input_iterator first,
-				     Input_iterator beyond,
-				     const Gt& gt=Gt())
-    : Base(gt)
-  {
-    init_hierarchy(gt);
-    insert(first, beyond);
-  }
-
-  Segment_Delaunay_graph_hierarchy_2(const Self& sdg);
-  Self& operator=(const Self& sdg);
-
-  // DESTRUCTOR
-  //-----------
-  ~Segment_Delaunay_graph_hierarchy_2();
-
-public:
-  // ACCESS METHODS
-  //---------------
-  const Base& diagram(unsigned int i) const  {
-    CGAL_precondition( i < sdg_hierarchy_2__maxlevel );
-    return *hierarchy[i];
-  }
-
-public:
-  // INSERTION METHODS
-  //------------------
-  template<class Input_iterator>
-  size_type insert(Input_iterator first, Input_iterator beyond) {
-    return insert(first, beyond, Tag_false());
-  }
-
-  template<class Input_iterator>
-  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_true)
-  {
-    std::vector<Site_2> site_vec;
-    for (Input_iterator it = first; it != beyond; ++it) {
-      site_vec.push_back(Site_2(*it));
-    }
-
-    boost::random_number_generator<boost::rand48> rng(random);
-    std::random_shuffle(site_vec.begin(), site_vec.end(),rng);
-    return insert(site_vec.begin(), site_vec.end(), Tag_false());
-  }
-
-  template<class Input_iterator>
-  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_false)
-  {
-    // do it the obvious way: insert them as they come;
-    // one might think though that it might be better to first insert
-    // all end points and then all segments, or a variation of that.
-    size_type n_before = this->number_of_vertices();
-    for (Input_iterator it = first; it != beyond; ++it) {
-      insert(*it);
-    }
-    size_type n_after = this->number_of_vertices();
-    return n_after - n_before;
-  }
-
-  Vertex_handle  insert(const Point_2& p) {
-    Point_handle ph = this->register_input_site(p);
-    Storage_site_2 ss = 
-      this->st_.construct_storage_site_2_object()(ph);
-    return insert_point(p, ss, UNDEFINED_LEVEL);
-  }
-
-  Vertex_handle  insert(const Point_2& p0, const Point_2& p1) {
-    Point_handle_pair php = this->register_input_site(p0,p1);
-    Storage_site_2 ss =
-      this->st_.construct_storage_site_2_object()(php.first, php.second);
-    Vertex_handle v = insert_segment(p0, p1, ss, UNDEFINED_LEVEL);
-    if ( v == Vertex_handle() ) {
-      this->unregister_input_site( php.first, php.second );
-    }
-    return v;
-  }
-
-  Vertex_handle insert(const Vertex_handle& v0, const Vertex_handle& v1) {
-    return hierarchy[0]->insert(v0, v1);
-  }
-
-  Vertex_handle insert(const Point_2& p, Vertex_handle) {
-    return insert(p);
-  }
-
-  Vertex_handle insert(const Point_2& p0, const Point_2& p1,
-		       Vertex_handle) {
-    return insert(p0, p1);
-  }
-
-  Vertex_handle  insert(const Site_2& t) {
-    // the intended use is to unify the calls to insert(...);
-    // thus the site must be an exact one; 
-    CGAL_precondition( t.is_input() );
-
-    if ( t.is_segment() ) {
-      Point_handle_pair php =
-	this->register_input_site(t.source(), t.target());
-      Storage_site_2 ss =
-	this->st_.construct_storage_site_2_object()(php.first, php.second);
-      Vertex_handle v =
-	insert_segment(t.source(), t.target(), ss, UNDEFINED_LEVEL);
-      if ( v == Vertex_handle() ) {
-	this->unregister_input_site( php.first, php.second );
-      }
-      return v;
-    } else if ( t.is_point() ) {
-      Point_handle ph = this->register_input_site( t.point() );
-      Storage_site_2 ss = this->st_.construct_storage_site_2_object()(ph);
-      return insert_point(t.point(), ss, UNDEFINED_LEVEL);
-    } else {
-      CGAL_precondition ( t.is_defined() );
-      return Vertex_handle(); // to avoid compiler error
-    }
-  }
-
-  inline Vertex_handle insert(const Site_2& t, Vertex_handle) {
-    return insert(t);
-  }
-
-  template<class Info_t>
-  inline
-  Vertex_handle insert(const Site_2& t, const Info_t& info)
-  {
-    typedef typename Storage_traits::Info Info;
-    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
-      Check_type_equality_for_info<Info_t, Info>();
-    // the intended use is to unify the calls to insert(...);
-    // thus the site must be an exact one; 
-    CGAL_precondition( t.is_input() );
-
-    if ( t.is_segment() ) {
-      Point_handle_pair php =
-	this->register_input_site(t.source(), t.target());
-      Storage_site_2 ss =
-	this->st_.construct_storage_site_2_object()(php.first, php.second);
-      ss.set_info(info);
-      Vertex_handle v =
-	insert_segment(t.source(), t.target(), ss, UNDEFINED_LEVEL);
-      if ( v == Vertex_handle() ) {
-	this->unregister_input_site( php.first, php.second );
-      }
-      return v;
-    } else if ( t.is_point() ) {
-      Point_handle ph = this->register_input_site( t.point() );
-      Storage_site_2 ss = this->st_.construct_storage_site_2_object()(ph);
-      ss.set_info(info);
-      return insert_point(t.point(), ss, UNDEFINED_LEVEL);
-    } else {
-      CGAL_precondition ( t.is_defined() );
-      return Vertex_handle(); // to avoid compiler error
-    }
-  }
-
-  template<class Info_t>
-  inline
-  Vertex_handle insert(const Site_2& t, const Info_t& info, Vertex_handle)
-  {
-    return insert(t, info);
-  }
-
-protected:
-  Vertex_handle insert_point(const Point_2& p, const Storage_site_2& ss,
-			     int level) {
-    if ( level == UNDEFINED_LEVEL ) {
-      level = random_level();
-    }
-
-    Vertex_handle vertices[sdg_hierarchy_2__maxlevel];
-  
-    insert_point(p, ss, level, vertices);
-
-    return vertices[0];
-  }
-
-  //  std::pair<bool,Vertex_triple>
-  std::pair<bool,int>
-                insert_point(const Point_2& p, const Storage_site_2& ss,
-			     int level, Vertex_handle* vertices);
-
-  void          insert_point(const Site_2& t, const Storage_site_2& ss,
-			     int low, int high, Vertex_handle vbelow,
-			     Vertex_handle* vertices);
-
-  Vertex_handle insert_segment(const Point_2& p0, const Point_2& p1,
-			       const Storage_site_2& ss, int level); 
-
-  Vertex_handle insert_segment_interior(const Site_2& t,
-					const Storage_site_2& ss,
-					const Vertex_handle* vertices0,
-					int level);
-
-  void insert_segment_in_upper_levels(const Site_2& t,
-				      const Storage_site_2& ss,
-				      Vertex_handle vbelow,
-				      const Vertex_handle* vertices0,
-				      int level, Tag_true);
-
-  void insert_segment_in_upper_levels(const Site_2& ,
-				      const Storage_site_2& ,
-				      Vertex_handle ,
-				      const Vertex_handle* ,
-				      int , Tag_false) {}
-
-  Vertex_handle insert_segment_on_point(const Storage_site_2& ss,
-					const Vertex_handle& v,
-					int level, int which);
-
-  template<class Tag>
-  Vertex_handle
-  insert_intersecting_segment_with_tag(const Storage_site_2&,
-				       const Site_2& ,
-				       Vertex_handle ,
-				       int , Tag_false /* itag */, Tag) {
-#if defined(__POWERPC__) && \
-  defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
-    // hack to avoid nasty warning for G++ 3.4 on Darwin
-    static int i;
-#else
-    static int i = 0;
-#endif
-    if ( i == 0 ) {
-      i = 1;
-      print_error_message();
-    }
-    return Vertex_handle();
-  }
-
-  Vertex_handle
-  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				       const Site_2& t,
-				       Vertex_handle v,
-				       int level,
-				       Tag_true itag, Tag_false stag);
-
-  Vertex_handle
-  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
-				       const Site_2& t,
-				       Vertex_handle v,
-				       int level,
-				       Tag_true itag, Tag_true stag);
-
-public:
-  // REMOVAL METHODS
-  //----------------
-  bool remove(const Vertex_handle& v);
-
-public:
-  // NEAREST NEIGHBOR LOCATION
-  //--------------------------
-  Vertex_handle  nearest_neighbor(const Point_2& p,
-				  bool force_point = false) const;
-
-  Vertex_handle  nearest_neighbor(const Point_2& p, Vertex_handle)
-  {
-    return nearest_neighbor(p);
-  }
-
-protected:
-  void nearest_neighbor(const Site_2& p,
-			Vertex_handle vnear[sdg_hierarchy_2__maxlevel],
-			bool force_point) const; 
-
-public:
-  // MISCELLANEOUS
-  //--------------
-  void init_hierarchy(const Geom_traits& gt);
-
-  void copy(const Segment_Delaunay_graph_hierarchy_2& sdgh);
-
-  void swap(Segment_Delaunay_graph_hierarchy_2& sdgh);
-  void clear();
-
-public:
-  // FILE I/O
-  //---------
-  void file_input(std::istream&);
-  void file_output(std::ostream&) const;
-
-public:
-  // VALIDITY CHECK
-  //---------------
-  bool is_valid(bool verbose = false, int level = 1) const;
-
-protected:
-  // LOCAL HELPER METHODS
-  //---------------------
-  int random_level() {
-    boost::geometric_distribution<> proba(1.0/sdg_hierarchy_2__ratio);
-    boost::variate_generator<boost::rand48&, boost::geometric_distribution<> > die(random, proba);
-
-    return (std::min)(die(), (int)sdg_hierarchy_2__maxlevel)-1;
-  }
-
-  int find_level(Vertex_handle v) const {
-    CGAL_precondition( v != Vertex_handle() );
-    int level = 0;
-    Vertex_handle vertex = v;
-    while ( vertex->up() != Vertex_handle() ) {
-      vertex = vertex->up();
-      level++;
-    }
-
-    return level;
-  }
-
-  Vertex_handle
-  vertex_at_level(const Vertex_handle& v, unsigned int k) const
-  {
-    CGAL_precondition( k <= sdg_hierarchy_2__maxlevel );
-
-    unsigned int level = 0;
-    Vertex_handle v_at_level = v;
-    while ( level < k ) {
-      v_at_level = v_at_level->up();
-      level++;
-    }
-    return v_at_level;
-  }
-
-  void print_error_message() const;
-};
-
-
-
-template<class Gt, class STag, class D_S, class LTag>
-std::istream& operator>>(std::istream& is,
-			 Segment_Delaunay_graph_hierarchy_2<Gt,STag,D_S,LTag>&
-			 sdgh)
-{
-  sdgh.file_input(is);
-  return is;
-}
-
-template<class Gt, class STag, class D_S, class LTag>
-std::ostream& operator<<(std::ostream& os,
-			 const
-			 Segment_Delaunay_graph_hierarchy_2<Gt,STag,D_S,LTag>&
-			 sdgh)
-{
-  sdgh.file_output(os);
-  return os;
-}
-			 
-
-} //namespace CGAL
-
-
-#include <CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h>
-
-
-#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Self_intersection_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Self_intersection_polyhedron_3.h
deleted file mode 100644
index 4e07e62..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Self_intersection_polyhedron_3.h
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008-2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Pierre Alliez, Laurent Rineau, Ilker O. Yaz
-
-// compute self-intersection of a CGAL triangle polyhedron mesh
-// original code from Lutz Kettner
-
-#ifndef CGAL_SELF_INTERSECTION_POLYHEDRON_3
-#define CGAL_SELF_INTERSECTION_POLYHEDRON_3
-
-#include <CGAL/box_intersection_d.h>
-#include <CGAL/intersections.h>
-#include <CGAL/Bbox_3.h>
-
-#include <vector>
-#include <exception>
-
-#include <boost/function_output_iterator.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/graph/graph_traits.hpp>
-
-namespace CGAL {
-namespace internal {
-template <class FaceGraph, class Kernel, class Box, class OutputIterator>
-struct Intersect_facets
-{
-  // wrapper to check whether anything is inserted to output iterator
-  struct Output_iterator_with_bool 
-  {
-    Output_iterator_with_bool(OutputIterator* out, bool* intersected)
-      : m_iterator(out), m_intersected(intersected) { }
-
-    template<class T>
-    void operator()(const T& t) {
-      *m_intersected = true;
-      *(*m_iterator)++ = t; 
-    }
-
-    OutputIterator* m_iterator;
-    bool* m_intersected;
-  };
-// typedefs
-  typedef typename Kernel::Segment_3    Segment;
-  typedef typename Kernel::Triangle_3   Triangle;
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  typedef typename boost::property_map<FaceGraph, boost::vertex_point_t>::const_type Ppmap;
-
-// members
-  const FaceGraph& m_polyhedron;
-  const Ppmap m_point;
-  mutable OutputIterator  m_iterator;
-  mutable bool            m_intersected;
-  mutable boost::function_output_iterator<Output_iterator_with_bool> m_iterator_wrapper;
-
-  typename Kernel::Construct_segment_3  segment_functor;
-  typename Kernel::Construct_triangle_3 triangle_functor;
-  typename Kernel::Do_intersect_3       do_intersect_3_functor;
-
-  
-  Intersect_facets(const FaceGraph& polyhedron, OutputIterator it, const Kernel& kernel)
-    : 
-    m_polyhedron(polyhedron),
-    m_point(get(vertex_point, m_polyhedron)),
-    m_iterator(it),
-    m_intersected(false),
-    m_iterator_wrapper(Output_iterator_with_bool(&m_iterator, &m_intersected)),
-    segment_functor(kernel.construct_segment_3_object()),
-    triangle_functor(kernel.construct_triangle_3_object()),
-    do_intersect_3_functor(kernel.do_intersect_3_object())
-  { }
-
-  void operator()(const Box* b,
-    const Box* c) const
-  {
-    halfedge_descriptor h  = halfedge(b->info(),m_polyhedron);
-
-    // check for shared egde --> no intersection
-    if(face(opposite(h,m_polyhedron),m_polyhedron) == c->info() ||
-       face(opposite(next(h,m_polyhedron),m_polyhedron),m_polyhedron) == c->info() ||
-       face(opposite(next(next(h,m_polyhedron),m_polyhedron),m_polyhedron),m_polyhedron) == c->info())
-      return;
-
-    // check for shared vertex --> maybe intersection, maybe not
-    halfedge_descriptor g = halfedge(c->info(),m_polyhedron);
-    halfedge_descriptor v;
-
-    if(target(h,m_polyhedron) == target(g,m_polyhedron))
-      v = g;
-    if(target(h,m_polyhedron) == target(next(g,m_polyhedron),m_polyhedron))
-      v = next(g,m_polyhedron);
-    if(target(h,m_polyhedron) == target(next(next(g,m_polyhedron),m_polyhedron),m_polyhedron))
-      v = next(next(g,m_polyhedron),m_polyhedron);
-
-    if(v == halfedge_descriptor()){
-      h = next(h,m_polyhedron);
-      if(target(h,m_polyhedron) == target(g,m_polyhedron))
-        v = g;
-      if(target(h,m_polyhedron) == target(next(g,m_polyhedron),m_polyhedron))
-        v = next(g,m_polyhedron);
-      if(target(h,m_polyhedron) == target(next(next(g,m_polyhedron),m_polyhedron),m_polyhedron))
-        v = next(next(g,m_polyhedron),m_polyhedron);
-      if(v == halfedge_descriptor()){
-        h = next(h,m_polyhedron);
-        if(target(h,m_polyhedron) == target(g,m_polyhedron))
-          v = g;
-        if(target(h,m_polyhedron) == target(next(g,m_polyhedron),m_polyhedron))
-          v = next(g,m_polyhedron);
-        if(target(h,m_polyhedron) == target(next(next(g,m_polyhedron),m_polyhedron),m_polyhedron))
-          v = next(next(g,m_polyhedron),m_polyhedron);
-      }
-    }
-
-    if(v != halfedge_descriptor()){
-      // found shared vertex: 
-      CGAL_assertion(target(h,m_polyhedron) == target(v,m_polyhedron));
-      // geometric check if the opposite segments intersect the triangles
-      Triangle t1 = triangle_functor( m_point[target(h,m_polyhedron)], m_point[target(next(h,m_polyhedron),m_polyhedron)], m_point[target(next(next(h,m_polyhedron),m_polyhedron),m_polyhedron)]);
-      Triangle t2 = triangle_functor( m_point[target(v,m_polyhedron)], m_point[target(next(v,m_polyhedron),m_polyhedron)], m_point[target(next(next(v,m_polyhedron),m_polyhedron),m_polyhedron)]);
-      
-      Segment s1 = segment_functor( m_point[target(next(h,m_polyhedron),m_polyhedron)], m_point[target(next(next(h,m_polyhedron),m_polyhedron),m_polyhedron)]);
-      Segment s2 = segment_functor( m_point[target(next(v,m_polyhedron),m_polyhedron)], m_point[target(next(next(v,m_polyhedron),m_polyhedron),m_polyhedron)]);
-      
-      if(do_intersect_3_functor(t1,s2)){
-        *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
-      } else if(do_intersect_3_functor(t2,s1)){
-        *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
-      }
-      return;
-    }
-    
-    // check for geometric intersection
-    Triangle t1 = triangle_functor( m_point[target(h,m_polyhedron)], m_point[target(next(h,m_polyhedron),m_polyhedron)], m_point[target(next(next(h,m_polyhedron),m_polyhedron),m_polyhedron)]);
-    Triangle t2 = triangle_functor( m_point[target(g,m_polyhedron)], m_point[target(next(g,m_polyhedron),m_polyhedron)], m_point[target(next(next(g,m_polyhedron),m_polyhedron),m_polyhedron)]);
-    if(do_intersect_3_functor(t1, t2)){
-      *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
-    }
-  } // end operator ()
-}; // end struct Intersect_facets
-
-struct Throw_at_output {
-  class Throw_at_output_exception: public std::exception
-  { };
-
-  template<class T>
-  void operator()(const T& /* t */) const {
-    throw Throw_at_output_exception();
-  }
-};
-
-}// namespace internal
-
-////////////////////////////////////////////////////////////////////////////////////
-/*
-/// Geometric traits concept for the functions `self_intersect`
-concept SelfIntersectionTraits{
-  /// @name Geometric Types
-  /// @{
-  /// 3D point type
-  typedef unspecified_type Point_3;
-  /// 3D triangle type
-  typedef unspecified_type Triangle_3;
-  /// 3D segment type
-  typedef unspecified_type Segment_3;
-  /// @}
-
-  /// @name Functors
-  /// @{
-  /// Functor constructing triangles. It provides `Triangle_3 operator() const(const Point_3&, const Point_3&, const Point_3&)
-  typedef unspecified_type Construct_triangle_3;
-  /// Functor constructing segments. It provides `Segment_3 operator() const(const Point_3&, const Point_3&)
-  typedef unspecified_type Construct_segment_3;
-  /// Functor testing intersections between triangles and segment. It provides `bool operator() const (const Triangle_3&, const Segment_3&)` and `bool operator() const (const Triangle_3&, const Triangle_3&)`
-  typedef unspecified_type Do_intersect_3;
-  /// @}
-
-  /// @name Functions
-  /// @{
-  Construct_triangle_3 construct_triangle_3_object() const;
-  Construct_segment_3 construct_segment_3_object() const;
-  Do_intersect_3 do_intersect_3_object() const;
-  /// @}
-};
-*/
-////////////////////////////////////////////////////////////////////////////////////
-
-/** 
- * Detects and reports self-intersections of a triangulated polyhedral surface
- * @pre @a p.is_pure_triangle()
- *
- * @tparam GeomTraits a model of `SelfIntersectionTraits`
- * @tparam FaceGraph a \cgal polyhedron
- * @tparam OutputIterator Output iterator accepting objects of type `std::pair<FaceGraph::face_descriptor, FaceGraph::face_descriptor>`
- *         if @a polyhedron is passed by const reference.
- *
- * @param polyhedron polyhedron to be checked, might be passed by const reference or reference
- * @param out all pairs of non-adjacent facets intersecting are put in it
- *
- * @return pair of `bool` and `out`, where the Boolean indicates whether there is an intersection or not
- *
- * \TODO Doc: move SelfIntersectionTraits concept to appropriate location.
- */
-template <class GeomTraits, class FaceGraph, class OutputIterator>
-std::pair<bool, OutputIterator>
-self_intersect(const FaceGraph& polyhedron, OutputIterator out, const GeomTraits& geom_traits = GeomTraits())
-{
-  //CGAL_assertion(polyhedron.is_pure_triangle());
-
-  typedef typename boost::graph_traits<FaceGraph>::face_iterator Facet_it;
-
-  typedef typename boost::graph_traits<FaceGraph>::face_descriptor Facet_hdl;
-
-  typedef typename CGAL::Box_intersection_d::Box_with_info_d<double, 3, Facet_hdl> Box;
-
-  typedef typename boost::property_map<FaceGraph, CGAL::vertex_point_t>::const_type Ppmap;
-
-  Ppmap m_point = get(CGAL::vertex_point, polyhedron);
-
-  // make one box per facet
-  std::vector<Box> boxes;
-  boxes.reserve(num_faces(polyhedron));
-
-  Facet_it fi,e;
-
-  for(boost::tie(fi,e)= faces(polyhedron);
-    fi != e;
-      ++fi){
-    Facet_hdl f = *fi;
-    boxes.push_back(Box( m_point[target(halfedge(f,polyhedron),polyhedron)].bbox() +
-                         m_point[target(next(halfedge(f,polyhedron),polyhedron),polyhedron)].bbox() +
-                         m_point[target(next(next(halfedge(f,polyhedron),polyhedron),polyhedron),polyhedron)].bbox(),
-    f));
-  }
-  // generate box pointers
-  std::vector<const Box*> box_ptr;
-  box_ptr.reserve(num_faces(polyhedron));
-  typename std::vector<Box>::iterator b;
-  for(b = boxes.begin();
-    b != boxes.end();
-    b++)
-    box_ptr.push_back(&*b);
-
-  // compute self-intersections filtered out by boxes
-  internal::Intersect_facets<FaceGraph,GeomTraits,Box,OutputIterator> intersect_facets(polyhedron, out, geom_traits);
-  std::ptrdiff_t cutoff = 2000;
-  CGAL::box_self_intersection_d(box_ptr.begin(), box_ptr.end(),intersect_facets,cutoff);
-  return std::make_pair(intersect_facets.m_intersected, intersect_facets.m_iterator);
-}
-
-/** 
- * Checks if a polyhedron is self-intersecting
- * @pre @a p.is_pure_triangle()
- *
- * @tparam GeomTraits a model of `SelfIntersectionTraits`
- * @tparam FaceGraph a %CGAL polyhedron
- *
- * @param polyhedron polyhedron to be tested
- *
- * @return true if `polyhedron` is self-intersecting
- */
-template <class GeomTraits, class FaceGraph>
-bool self_intersect(const FaceGraph& polyhedron, const GeomTraits& geom_traits = GeomTraits())
-{
-  try 
-  {
-    typedef boost::function_output_iterator<internal::Throw_at_output> OutputIterator;
-    self_intersect<GeomTraits>(polyhedron, OutputIterator(), geom_traits); 
-  }
-  catch( internal::Throw_at_output::Throw_at_output_exception& ) 
-  { return true; }
-
-  return false;
-}
-
-}// namespace CGAL
-
-#endif // CGAL_SELF_INTERSECTION_POLYHEDRON_3
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_filtered_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_filtered_traits_3.h
deleted file mode 100644
index c06b7b1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_filtered_traits_3.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2005 Rijksuniversiteit Groningen (Netherlands)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Nico Kruithof <Nico at cs.rug.nl>
-
-#include <CGAL/Skin_surface_traits_3.h>
-
-#ifndef CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
-#define CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Skin_surface_traits_3.h>
-#include <CGAL/Regular_triangulation_filtered_traits_3.h>
-#include <CGAL/Filtered_predicate.h>
-
-namespace CGAL { 
-
-template <class K>
-class Skin_surface_filtered_traits_3
-  : public Skin_surface_traits_base_3<K>
-{
-  // Exact traits is based on the exact kernel.
-  typedef Skin_surface_traits_3<typename K::Exact_kernel>
-                                                   Exact_traits;
-  // Filtering traits is based on the filtering kernel.
-  typedef Skin_surface_traits_3<typename K::Approximate_kernel>
-                                                   Filtering_traits;
-
-  typedef typename K::C2E C2E;
-  typedef typename K::C2F C2F;
-
-  typedef Skin_surface_traits_base_3<K>           Base;
-public:
-  typedef Filtered_predicate<
-            typename Exact_traits::Side_of_mixed_cell_3,
-            typename Filtering_traits::Side_of_mixed_cell_3,
-            Weighted_converter_3<C2E>,
-            Weighted_converter_3<C2F> >  Side_of_mixed_cell_3;
-
-  enum { Has_filtered_predicates=true };
-  enum { Has_static_filters=false };
-
-  Skin_surface_filtered_traits_3() {}
-  Skin_surface_filtered_traits_3(typename Base::FT s) : Base(s) {}
-
-  // Only make the predicates filtered, not the constructions:
-  Side_of_mixed_cell_3 
-  side_of_mixed_cell_3_object() const 
-  { 
-    return Side_of_mixed_cell_3(Base::get_shrink()); 
-  }
-
-};
-
-} //namespace CGAL
-#endif // CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Small_side_angle_bisector_decomposition_2.h b/3rdparty/CGAL-4.6/include/CGAL/Small_side_angle_bisector_decomposition_2.h
deleted file mode 100644
index 56d8cb4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Small_side_angle_bisector_decomposition_2.h
+++ /dev/null
@@ -1,941 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-//                 (based on an old version by Eyal Flato)
-
-#ifndef CGAL_SMALL_SIDE_ANGLE_BISECTOR_DECOMPOSITION_2_H
-#define CGAL_SMALL_SIDE_ANGLE_BISECTOR_DECOMPOSITION_2_H
-
-#include <CGAL/Polygon_2.h>
-#include <vector>
-#include <list>
-
-namespace CGAL {
-
-/*!
- * \class
- * Small-side angle-bisector decomposition strategy.
- */
-template <class Kernel_, 
-          class Container_ = std::vector<typename Kernel_::Point_2> >
-class Small_side_angle_bisector_decomposition_2
-{
-public:
-
-  typedef Kernel_                                        Kernel;
-  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
-  typedef typename Kernel::Point_2                       Point_2;
-
-private:
-
-  typedef typename Kernel::Direction_2                   Direction_2;
-  typedef typename Kernel::Segment_2                     Segment_2;
-
-  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
-
-  // Kernel functors:
-  typedef typename Kernel::Equal_2                       Equal_2;
-  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
-  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
-  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
-  typedef typename Kernel::Orientation_2                 Compute_orientation_2;
-  typedef typename Kernel::Do_intersect_2                Do_intersect_2;
-  typedef typename Kernel::Counterclockwise_in_between_2 Ccw_in_between_2;
-        
-  typedef std::list<unsigned int>                        Indices_list;
-  typedef typename Indices_list::const_iterator          Indices_iterator;
-
-  // Point with additional infomaration.
-  struct Point_info_2
-  {
-    Point_2           point;
-    bool              is_reflex;
-    unsigned int      reflex_count;
-    Indices_list      visible;
-    Indices_list      non_visible;
-
-    // Default constructor.
-    Point_info_2 () :
-      is_reflex (false),
-      reflex_count (0),
-      visible (),
-      non_visible ()
-    {}
-
-    // Check if the given vertex is visible.
-    bool is_visible (unsigned int index) const
-    {
-      Indices_iterator    it;
-
-      for (it = visible.begin(); it != visible.end(); ++it)
-      {
-        if (*it == index)
-          return (true);
-      }
-
-      return (false);
-    }
-
-    // Check if the given vertex is non-visible.
-    bool is_non_visible (unsigned int index) const
-    {
-      Indices_iterator    it;
-
-      for (it = non_visible.begin(); it != non_visible.end(); ++it)
-      {
-        if (*it == index)
-          return (true);
-      }
-
-      return (false);
-    }
-  };
- 
-  typedef std::vector<Point_info_2>                Point_vector_2;
-
-  // Data members:
-  Equal_2                 f_equal;
-  Translate_point_2       f_add;
-  Construct_vector_2      f_vector;
-  Construct_direction_2   f_direction;
-  Compute_orientation_2   f_orientation;
-  Do_intersect_2          f_do_intersect;
-  Ccw_in_between_2        f_ccw_in_between;
-
-public:
-
-  /*! Default constructor. */
-  Small_side_angle_bisector_decomposition_2 ()
-  {
-    // Obtain kernel functors.
-    Kernel                ker;
-
-    f_equal = ker.equal_2_object();
-    f_add = ker.construct_translated_point_2_object(); 
-    f_vector = ker.construct_vector_2_object();
-    f_direction = ker.construct_direction_2_object();
-    f_orientation = ker.orientation_2_object();
-    f_do_intersect = ker.do_intersect_2_object();
-    f_ccw_in_between = ker.counterclockwise_in_between_2_object();
-  }
-
-  /*!
-   * Decompose a simple polygon to convex sub-polygons.
-   * \param pgn The input polygon.
-   * \param oi An output iterator of convex polygons.
-   * \return A past-the-end iterator for the sub-polygons.
-   */
-  template <class OutputIterator>
-  OutputIterator operator() (const Polygon_2& pgn,
-                             OutputIterator oi) const
-  {
-    // Construct a point-info vector that represents the input polygon.
-    Point_vector_2   vec;
-
-    if (_construct_point_vector (pgn, vec))
-    {
-      // The input polygon is convex - just return it as is (we use the
-      // auxiliary function to make sure the returned polygon is oriented
-      // counterclockwise).
-      oi = _output_polygon (vec, oi);
-      return (oi);
-    }
-
-    // Prepare a queue of polygons, represented as point vectors, to decompose.
-    // We first try the small-side decomposition, and if we fail we turn to
-    // the normal angle-bisector decomposition. 
-    std::list<Point_vector_2>   ss_queue;
-    std::list<Point_vector_2>   ab_queue;
-    unsigned int                ind1, ind2;
-    Point_vector_2              vec1, vec2;
-
-    ind1 = ind2 = static_cast<unsigned int>(-1);        // Pacify some compiler
-
-    ss_queue.push_back (vec);
-
-    // Use the small-side decomposition as long as possible.
-    while (! ss_queue.empty())
-    {
-      // Extract the first polygon from the queue.
-      vec = ss_queue.front();
-      ss_queue.pop_front();
-
-      // Try computing a minimal diagonal eliminating two reflex vertices.
-      if (_compute_min_diagonal (vec, ind1, ind2))
-      {
-        // We have found a minimal diagonal - use it to split the polygon.
-        _split_by_diagonal (vec, ind1, ind2,
-                            false,
-                            vec1, vec2);
-
-        // For either of the resulting sub-polygons: Report them if they are
-        // convex, otherwise decompose them recursively.
-        if (vec1[vec1.size() - 1].reflex_count == 0)
-          oi = _output_polygon (vec1, oi);
-        else
-          ss_queue.push_back (vec1);
-
-        if (vec2[vec2.size() - 1].reflex_count == 0)
-          oi = _output_polygon (vec2, oi);
-        else
-          ss_queue.push_back (vec2);
-      }
-      else
-      {
-        // We have failed to find a minimal diagonal eliminating two reflex
-        // vertices - use the simple angle bisector method for this polygon.
-        ab_queue.push_back (vec);
-      }
-    }
-
-    // Decompose the remaining polygons.
-    while (! ab_queue.empty())
-    {
-      // Extract the first polygon from the queue.
-      vec = ab_queue.front();
-      ab_queue.pop_front();
-
-      // Compute the best angle bisector and split the polygon accordingly.
-      _approximate_angle_bisector (vec, ind1, ind2);
-
-      _split_by_diagonal (vec, ind1, ind2,
-                          true,
-                          vec1, vec2);
-
-      // For either of the resulting sub-polygons: Report them if they are
-      // convex, otherwise decompose them recursively.
-      if (vec1[vec1.size() - 1].reflex_count == 0)
-        oi = _output_polygon (vec1, oi);
-      else
-        ab_queue.push_back (vec1);
-
-      if (vec2[vec2.size() - 1].reflex_count == 0)
-        oi = _output_polygon (vec2, oi);
-      else
-        ab_queue.push_back (vec2);
-    }
-
-    return (oi);
-  }
-
-private:
-
-  /*! Return the succesive index of a 'point info' vector. */
-  inline unsigned int _vec_succ (const Point_vector_2& vec,
-                                 unsigned int i) const
-  {
-    return ((i + 1) % vec.size());
-  }
-        
-  /*! Return the previous index of a 'point info' vector. */
-  inline unsigned int _vec_pred (const Point_vector_2& vec,
-                                 unsigned int i) const
-  {
-    if (i == 0)
-      return static_cast<unsigned int>(vec.size() - 1);
-    return (i - 1);
-  }
-
-  /*!
-   * Reflect the point b around the point a.
-   * \return The result of: a + vec('a'-'b').
-   */
-  Point_2 _opposite_from_vertex (const Point_2& a, const Point_2& b) const
-  {
-    return (f_add (a, f_vector(b, a)));
-  }
-
-  // The "reflex zone" of a vertex v is the slice created by continuing the
-  // edges incident to this vertex, from v to infinity. This enumeration
-  // describes the location of a point with respect to this zone.
-  enum Reflex_zone_position
-  {
-    LEFT_OF_ZONE = -1,
-    INSIDE_ZONE = 0,
-    RIGHT_OF_ZONE = 1,
-    ON_ZONE_BOUNDARY = 3,
-    OPPOSITE_OF_ZONE = 9
-  };
-
-  /*!
-   * Get the position of a query point with respect to the reflex zone of a
-   * given vertex.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param v_ind The index of the vertex v.
-   * \param q_pt A query point.
-   * \return The location of the query point with respect to the zone.
-   */
-  Reflex_zone_position _query_reflex_zone (const Point_vector_2& vec, 
-                                           unsigned int v_ind,
-                                           const Point_2& q_pt) const
-  {
-    // Initialize q, the reflex vertex, and it previous and next vertices
-    // and incident edges.
-    const Point_2&  v_pt = vec[v_ind].point;
-    const Point_2&  pred_pt = vec[_vec_pred(vec, v_ind)].point;
-    const Point_2&  succ_pt = vec[_vec_succ(vec, v_ind)].point;
-    Direction_2     pred_dir = f_direction (f_vector (v_pt, pred_pt));
-    Direction_2     succ_dir = f_direction (f_vector (v_pt, succ_pt));
-    Point_2         opp_pred_pt = _opposite_from_vertex (v_pt, pred_pt);
-    Point_2         opp_succ_pt = _opposite_from_vertex (v_pt, succ_pt);
-    Direction_2     opp_pred_dir = f_direction (f_vector (v_pt, opp_pred_pt));
-    Direction_2     opp_succ_dir = f_direction (f_vector (v_pt, opp_succ_pt));
-    Direction_2     q_dir = f_direction (f_vector (v_pt, q_pt));
-
-    if (f_ccw_in_between (q_dir, opp_pred_dir, opp_succ_dir))
-    {
-      // The point is contained between the continuation of the edges around v,
-      // so it is inside the reflex zone. 
-      return (INSIDE_ZONE);
-    }
-
-    if (f_equal (q_dir, opp_pred_dir) || f_equal (q_dir, opp_succ_dir))
-    {
-      // The point lies on the boundary of the reflex zone.
-      return (ON_ZONE_BOUNDARY);
-    }
-
-    if (f_ccw_in_between (q_dir, opp_succ_dir, pred_dir))
-    {
-      // The point lies to the left of the reflex zone.
-      return (LEFT_OF_ZONE);
-    }
-
-    if (f_ccw_in_between (q_dir, succ_dir, opp_pred_dir))
-    {
-      // The point lies to the right of the reflex zone.
-      return (RIGHT_OF_ZONE);
-    }
-
-    // If we reached here, the query point lies on the opposite side of the
-    // reflex zone.
-    CGAL_assertion (f_ccw_in_between (q_dir, pred_dir, succ_dir) ||
-                    f_equal (q_dir, pred_dir) || f_equal (q_dir, succ_dir));
-
-    return (OPPOSITE_OF_ZONE);
-  }
-
-  /*!
-   * Check whether a given vertex u is visible from a reflex vertex v.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param v_ind The index of the reflex vertex v.
-   * \param u_ind The index of the vertex u.
-   * \return Whether the vertices are visible.
-   */
-  bool _is_visible (Point_vector_2& vec,
-                    unsigned int v_ind, unsigned int u_ind) const
-  {
-    CGAL_precondition (vec[v_ind].is_reflex);
-
-    // Check whether the visiblity status is already known.
-    if (vec[v_ind].is_visible (u_ind))
-      return (true);
-
-    if (vec[v_ind].is_non_visible (u_ind))
-      return (false);
-                
-    // Check whether the diagonal (v_ind, u_ind) does not intersect any of
-    // the polygn edges.
-    bool    result;
-
-    if (u_ind == v_ind ||
-        u_ind == _vec_pred(vec, v_ind) ||
-        u_ind == _vec_succ(vec, v_ind))
-    {
-      // A polygon edge (or a degenerate diagonal) is not considered as a legal
-      // visibility diagonal.
-      result = false;
-    }
-    else if (_query_reflex_zone (vec, v_ind, 
-                                 vec[u_ind].point) == OPPOSITE_OF_ZONE)
-    {
-      // In this case the diagonal between u and v lies outside the polygon,
-      // so the two vertices are not visible.
-      result = false;
-    }
-    else
-    {
-      // Perform an exhaustive search on the polygon edges and check if any of
-      // them intersects the diagonal segment uv.
-      Segment_2       diag (vec[u_ind].point, vec[v_ind].point);
-      unsigned int    curr = _vec_succ(vec, v_ind);
-      unsigned int    next = _vec_succ(vec, curr);
-
-      result = true;
-      while (result && next != v_ind)
-      {
-        if (curr != u_ind && next != u_ind)
-        {
-          if (do_intersect (diag, 
-                            Segment_2 (vec[curr].point, vec[next].point)))
-            result = false;
-        }
-
-        curr = next;
-        next = _vec_succ(vec, curr);
-      }
-    }
-
-    // Update the visibility status.
-    if (result)
-    {
-      vec[v_ind].visible.push_back (u_ind);                                
-    }
-    else
-    {
-      vec[v_ind].non_visible.push_back (u_ind);                                
-    }
-                
-    return (result);
-  }
-        
-  /*!
-   * Construct a Point_info_2 vector from the given polygon.
-   * \param poly The input polygon.
-   * \param vec Output: The point vector.
-   * \return Whether the polygon is convex.
-   */
-  bool _construct_point_vector (const Polygon_2& pgn,
-                                Point_vector_2& vec) const
-  {
-    // Resize the vector to fit the polygon.
-    const unsigned int  n = static_cast<unsigned int>(pgn.size());
-    const bool          forward = (pgn.orientation() == COUNTERCLOCKWISE);
-    Vertex_circulator          prev, curr, next;
-    unsigned int        reflex_count = 0;
-    unsigned int        k;
-
-    vec.resize (n);
-
-    // Initialize the vertex circulators.
-    next = curr = prev = pgn.vertices_circulator();
-      
-    if (forward)
-      --prev;
-    else
-      ++prev;
-
-    // Traverse the polygon's vertices in a counterclockwise order and prepare
-    // the output vector.
-    for (k = 0; k < n; k++)
-    {
-      // Set the next vertex.
-      if (forward)
-        ++next;
-      else
-        --next;
- 
-      // Set the current point.
-      vec[k].point = *curr;
-
-      // Check if the current vertex is reflex by checking the orientation of
-      // the polygon around it.
-      vec[k].is_reflex = (f_orientation (*prev, *curr, *next) == RIGHT_TURN);
-    
-      // Set the number of reflex vertices from the beginning of the vector
-      // until the k'th (including itself).
-      if (vec[k].is_reflex)
-        reflex_count++;
-
-      vec[k].reflex_count = reflex_count;
-
-      // Proceed to the next vertex.
-      prev = curr;
-      curr = next;
-    }
-
-    // The polygon is convex if there are not reflex vertices:
-    return (reflex_count == 0);
-  }
-       
-  /*!
-   * Given a polygon and to of its vertices u and v, count the number of reflex
-   * vertices between u and v, and between v and u (not including u and v
-   * themselves), and return the lesser quantity.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param v_ind The index of the vertex v.
-   * \param u_ind The index of the vertex u.
-   * \return The minimal number of reflex vertices between u and v.
-   */
-  unsigned int _count_reflex_vertices (const Point_vector_2& vec,
-                                       unsigned int u_ind,
-                                       unsigned int v_ind) const
-  {
-    if (u_ind == v_ind) 
-      return (0);
-
-    unsigned int    count1 = 0, count2 = 0;
-    unsigned int    k;
-
-    // Make sure that v_ind > u_ind (if necessary, swap indices).
-    if (u_ind > v_ind)
-    {
-      k = u_ind;
-      u_ind = v_ind;
-      v_ind = k;
-    }
-                
-    // Compute how many reflex vertices there are between u and v (not
-    // including v itself).
-    count1 = (vec[v_ind].reflex_count - vec[u_ind].reflex_count);
-
-    if (vec[v_ind].is_reflex) 
-      count1--;
-   
-    // Compute how many reflex vertices there are between v and u (not
-    // including u itself).
-    count2 = (vec[vec.size() - 1].reflex_count - vec[v_ind].reflex_count) + 
-             vec[u_ind].reflex_count;
-
-    if (vec[u_ind].is_reflex) 
-      count2--;
-
-    // Return the smaller value.
-    if (count1 < count2) 
-      return count1;
-    else
-      return count2;
-  }
-        
-  /*!
-   * Given a non-convex polygon, try to find a diagonal connecting to mutually
-   * visible reflex vertices u and v such that the number of reflex vertices
-   * between u and v is minimized.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param v_ind Output: The index of the vertex v.
-   * \param u_ind Output: The index of the vertex u.
-   * \return Whether a diagonal was found.
-   */
-  bool _compute_min_diagonal (Point_vector_2& vec,
-                              unsigned int& u_ind, unsigned int& v_ind) const
-  {
-    unsigned int          ind1, ind2;
-    Reflex_zone_position  zone_pos;
-    unsigned int          curr_count;
-    unsigned int          min_count = 0;
-    bool                  found = false;
-    unsigned int          dist;
-
-    // Let the distance between pairs of vertices we try vary between 2 and
-    // half the size of the polygon.
-    for (dist = 2; dist < (vec.size() + 1) / 2; dist++)
-    {
-      // Traverse the polygon vertices.
-      for (ind1 = 0; ind1 < vec.size(); ind1++)
-      {
-        if (! vec[ind1].is_reflex)
-          // Ignore convex vertices.        
-          continue;
-
-        ind2 = (ind1 + dist) % vec.size();
-
-        if (! vec[ind2].is_reflex)
-          // Ignore convex vertices.
-          continue;
-
-        // Count the number of reflex vertices between the current pair of
-        // reflex vertices.
-        curr_count = _count_reflex_vertices (vec, ind1, ind2);
-
-        // If we are not below the minimal, stop checking.
-        if (found && min_count < curr_count)
-          continue;
-
-        // Check whether the two vertices lie in the reflex zone of one
-        // another. If so, the diagonal between them splits each of the angles
-        // of u and v into two angles than are not greater than 180 degrees.
-        zone_pos = _query_reflex_zone (vec, ind1, vec[ind2].point);
-
-        if ((zone_pos != INSIDE_ZONE) && (zone_pos != ON_ZONE_BOUNDARY))
-          continue;
-
-        zone_pos = _query_reflex_zone (vec, ind2, vec[ind1].point);
-
-        if ((zone_pos != INSIDE_ZONE) && (zone_pos != ON_ZONE_BOUNDARY))
-          continue;
-
-        // Check whether the two vertices are mutually visible.
-        if (! _is_visible (vec, ind1, ind2))
-          continue;
-
-        // If we passed all the various tests and reached here, we can update
-        // the minimal count.
-        min_count = curr_count;
-        u_ind = ind1;
-        v_ind = ind2;
-        found = true;
-      }
-    }
-
-    // Return whether a diagonal has been found.
-    return (found);
-  }
-
-  /*!
-   * Split the given polygon by the given diagonal.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param ind1 The index of the first diagonal end-vertex.
-   * \param ind2 The index of the second diagonal end-vertex.
-   * \param check_ends Should we check for convexity near ind1 and ind2.
-   * \param vec1 Output: The first output polygon.
-   * \param vec2 Output: The second output polygon.
-   */
-  void _split_by_diagonal (const Point_vector_2& vec,
-                           unsigned int ind1, unsigned int ind2,
-                           bool check_ends,
-                           Point_vector_2& vec1,
-                           Point_vector_2& vec2) const
-  {
-    unsigned int      i1, i2;
-    Indices_iterator  iter;
-    unsigned int      reflex_count;
-
-    // Make sure that the index ind2 is greater than ind1.
-    if (ind1 > ind2)
-    {
-      i1 = ind1;
-      ind1 = ind2;
-      ind2 = i1;
-    }
-                
-    // Resize the output vectors.
-    vec1.resize (ind2 - ind1 + 1);
-    vec2.resize (vec.size() - (ind2 - ind1 - 1));
-                
-    // Construct the first output polygon. Notice we traverse the polygon in
-    // a counterclockwise direction from ind1 to ind2 and back.
-    reflex_count = 0;
-
-    for (i1 = ind1; i1 <= ind2; i1++)
-    {
-      // Copy the point.
-      vec1[i1 - ind1].point = vec[i1].point;
-
-      // Clear the visible vertices list.
-      vec1[i1-ind1].visible.clear();
-      vec1[i1-ind1].non_visible.clear();
-
-      if (i1 == ind1)
-      {
-        if (check_ends)
-        {
-          // Check the turn around ind1.
-          vec1[i1-ind1].is_reflex = 
-            (f_orientation (vec[ind2].point,
-                            vec[ind1].point,
-                            vec[_vec_succ(vec, ind1)].point) == RIGHT_TURN);
-        }
-        else
-        {
-          // The two diagonal end-vertices are not reflex any more.
-          vec1[i1-ind1].is_reflex = false;
-        }
-      }
-      else if (i1 == ind2)
-      {
-        if (check_ends)
-        {
-          // Check the turn around ind2.
-          vec1[i1-ind1].is_reflex = 
-            (f_orientation (vec[_vec_pred(vec, ind2)].point,
-                            vec[ind2].point,
-                            vec[ind1].point) == RIGHT_TURN);
-        }
-        else
-        {
-          // The two diagonal end-vertices are not reflex any more.
-          vec1[i1-ind1].is_reflex = false;
-        }
-      }
-      else
-      {
-        // Copy the reflexity flag.
-        vec1[i1-ind1].is_reflex = vec[i1].is_reflex;
-
-        // Set the visible vertices list.
-        for (iter = vec[i1].visible.begin(); 
-             iter != vec[i1].visible.end(); ++iter)
-        {
-          if ((*iter > ind1) && (*iter < ind2))
-            vec1[i1-ind1].visible.push_back(*iter - ind1);
-        }
-
-        // Set the non-visible vertices list.
-        for (iter = vec[i1].non_visible.begin(); 
-             iter != vec[i1].non_visible.end(); ++iter)
-        {
-          if ((*iter > ind1) && (*iter < ind2))
-            vec1[i1-ind1].non_visible.push_back(*iter - ind1);
-        }
-      }
-
-      // Set the reflex count.
-      if (vec1[i1-ind1].is_reflex)
-        reflex_count++;
-
-      vec1[i1-ind1].reflex_count = reflex_count;
-    }
-                
-    // Construct the second output polygon. Notice we traverse the polygon in
-    // a counterclockwise direction from ind2 to ind1 and back.
-    reflex_count = 0;
-    i2 = 0;
-    i1 = ind2;
-
-    // go ccw on all the vertices from 'ind2' to 'ind1'.
-    while (i1 != (ind1+1))
-    {
-      // Copy the point.
-      vec2[i2].point = vec[i1].point;
-
-      // Clear the visible vertices list.
-      vec2[i2].visible.clear();
-      vec2[i2].non_visible.clear();
-
-
-      if (i1 == ind1)
-      {
-        if (check_ends)
-        {
-          // Check the turn around ind1.
-          vec2[i2].is_reflex = 
-            (f_orientation (vec[_vec_pred(vec, ind1)].point,
-                            vec[ind1].point,
-                            vec[ind2].point) == RIGHT_TURN);
-        }
-        else
-        {
-          // The two diagonal end-vertices are not reflex any more.
-          vec2[i2].is_reflex = false;
-        }
-      }
-      else if (i1 == ind2)
-      {
-        if (check_ends)
-        {
-          // Check the turn around ind2.
-          vec2[i2].is_reflex = 
-            (f_orientation (vec[ind1].point,
-                            vec[ind2].point,
-                            vec[_vec_succ(vec, ind2)].point) == RIGHT_TURN);
-        }
-        else
-        {
-          // The two diagonal end-vertices are not reflex any more.
-          vec2[i2].is_reflex = false;
-        }
-      }
-      else
-      {
-        // Copy the reflexity flag.
-        vec2[i2].is_reflex = vec[i1].is_reflex;
-        
-        // Set the visible vertices list.
-        for (iter = vec[i1].visible.begin();
-             iter != vec[i1].visible.end(); ++iter)
-        {
-          if (*iter > ind2)
-          {
-            vec2[i2].visible.push_back (*iter - ind2);
-          }
-          else if (*iter < ind1)
-          {
-            vec2[i2].visible.push_back (*iter + static_cast<unsigned int>(vec.size()) - ind2);
-          }
-        }
-        
-        // Set the non-visible vertices list.
-        for (iter = vec[i1].non_visible.begin();
-             iter != vec[i1].non_visible.end(); ++iter)
-        {
-          if (*iter > ind2)
-          {
-            vec2[i2].non_visible.push_back (*iter - ind2);
-          }
-          else if (*iter < ind1)
-          {
-            vec2[i2].non_visible.push_back (*iter + static_cast<int>(vec.size()) - ind2);
-          }
-        }
-      }
-
-      // Set the reflex count.
-      if (vec2[i2].is_reflex)
-        reflex_count++;
-
-      vec2[i2].reflex_count = reflex_count;
-      
-      // advance the indices.                        
-      i1 = _vec_succ(vec, i1);
-      i2++;
-    }
-    
-    return;
-  }
-
-  /*!
-   * Get the angle ratio created by the the bisection of the angle at the
-   * reflex vertex v by the diagonal uv.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param v_ind The index of the vertex v.
-   * \param u_ind The index of the vertex u.
-   * \return The ratio between the bisected angles.
-   */
-  double _angle_bisection_ratio (Point_vector_2 &vec, 
-                                 unsigned int v_ind,
-                                 unsigned int u_ind) const
-  {
-    const double    _2_PI = 6.2831853;
-
-    // Get the points at u and v, as well as v's adjacencies and approximate
-    // their coordinates. 
-    const Point_2&  u_pt = vec[u_ind].point;
-    const Point_2&  v_pt = vec[v_ind].point;
-    const Point_2&  pred_pt = vec[_vec_pred(vec, v_ind)].point;
-    const Point_2&  succ_pt = vec[_vec_succ(vec, v_ind)].point;
-    const double    ux = CGAL::to_double (u_pt.x());
-    const double    uy = CGAL::to_double (u_pt.y());
-    const double    vx = CGAL::to_double (v_pt.x());
-    const double    vy = CGAL::to_double (v_pt.y());
-    const double    pred_x = CGAL::to_double (pred_pt.x());
-    const double    pred_y = CGAL::to_double (pred_pt.y());
-    const double    succ_x = CGAL::to_double (succ_pt.x());
-    const double    succ_y = CGAL::to_double (succ_pt.y());
-
-    // Compute the edge length and the diagonal length.
-    const double    len_uv = ::sqrt((ux - vx) * (ux - vx) +
-                                    (uy - vy) * (uy - vy));
-    const double    len_pred = ::sqrt((pred_x - vx) * (pred_x - vx) +
-                                      (pred_y - vy) * (pred_y - vy));
-    const double    len_succ = ::sqrt((succ_x - vx) * (succ_x - vx) +
-                                      (succ_y - vy) * (succ_y - vy));
-
-    // Compute the angle a1 = <) (pred_pt, v_pt, u_pt):
-    const double    cos_a1 = ((ux - vx) * (pred_x - vx) +
-                              (uy - vy) * (pred_y - vy)) / (len_uv * len_pred);
-    double          a1 = ::acos (cos_a1);
-    
-    if (f_orientation (pred_pt, v_pt, u_pt) == RIGHT_TURN)
-      // The angle a1 is larger than 180 degree:
-      a1 = _2_PI - a1;
-
-    // Compute the angle a2 = <) (u_pt, v_pt, succ_pt):
-    const double    cos_a2 = ((ux - vx) * (succ_x - vx) +
-                              (uy - vy) * (succ_y - vy)) / (len_uv * len_succ);
-    double          a2 = ::acos (cos_a2);
-
-    if (f_orientation (u_pt, v_pt, succ_pt) == RIGHT_TURN)
-      // The angle a1 is larger than 180 degree:
-      a2 = _2_PI - a2;
-
-    // Return the ratio of max(a1,a2)/min(a1,a2).
-    if (a1 == 0 || a2 == 0)
-      return (10000);
-
-    if (a1 > a2)
-      return (a1 / a2);
-    else
-      return (a2 / a1);
-  }
-
-  /*!
-   * Perform an approximate angle-bisector decomposition, by locating a reflex
-   * vertex and another vertex such that the diagonal between them is not
-   * blocked, and such that it approximates the angle bisector of the reflex
-   * vertex.
-   * \param vec A vector defining counterclockwise-oriented polygon.
-   * \param reflex_ind Output: The index of the reflex vertex whose angle we
-   *                           wish to bisect.
-   * \param other_ind Output: The index of the other polygon vertex.
-   */
-  void _approximate_angle_bisector (Point_vector_2& vec,
-                                    unsigned int& reflex_ind,
-                                    unsigned int& other_ind) const
-  {
-    unsigned int          ind1, ind2;
-    double                curr_ratio;
-    double                min_ratio = 0;
-    bool                  found = false;
-    unsigned int          dist;
-
-    // Let the distance between pairs of vertices we try vary between 2 and
-    // the size of the polygon - 2.
-    for (dist = 2; dist <= vec.size() - 2; dist++)
-    {
-      // Traverse the polygon vertices.
-      for (ind1 = 0; ind1 < vec.size(); ind1++)
-      {
-        if (! vec[ind1].is_reflex)
-          // Ignore convex vertices.        
-          continue;
-
-        ind2 = (ind1 + dist) % vec.size();
-
-        // Get the current ratio between the two angles the current
-        // diagonal splits around vec[ind1].
-        curr_ratio = _angle_bisection_ratio (vec, ind1, ind2);
-
-        // If we are not below the minimal, stop checking.
-        if (found && min_ratio < curr_ratio)
-          continue;
-
-        // Check whether the two vertices are mutually visible.
-        if (! _is_visible (vec, ind1, ind2))
-          continue;
-
-        // If we passed all the various tests and reached here, we can update
-        // the minimal angle difference.
-        min_ratio = curr_ratio;
-        reflex_ind = ind1;
-        other_ind = ind2;
-        found = true;
-      }
-    }
-
-    // Return whether a diagonal has been found.
-    CGAL_assertion (found);
-    return;
-  }
-
-  /*!
-   * Convert the point-info vector into a polygon and send it as an output.
-   * \param vec A vector defining counterclockwise-oriented convex polygon.
-   * \param oi The output iterator.
-   * \return A past-the-end iterator for the sub-polygons.
-   */
-  template <class OutputIterator>
-  OutputIterator _output_polygon (const Point_vector_2& vec,
-                                  OutputIterator oi) const
-  {
-    const unsigned int    n = static_cast<int>(vec.size());
-    Polygon_2             pgn;
-    unsigned int          k;
-
-    for (k = 0; k < n; k++)
-      pgn.push_back (vec[k].point);
-
-    *oi = pgn;
-    ++oi;
-
-    return (oi);
-  }
-};
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_traits_2.h b/3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_traits_2.h
deleted file mode 100644
index bd5e23f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_traits_2.h
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright (c) 2001,2009,2014  Tel-Aviv University (Israel), Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// author(s)     : Eli Packer <elip at post.tau.ac.il>,
-//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
-
-#ifndef CGAL_SNAP_ROUNDING_2_TRAITS_H
-#define CGAL_SNAP_ROUNDING_2_TRAITS_H
-
-#include <CGAL/basic.h>
-#include <map>
-#include <list>
-
-#include <CGAL/Arr_segment_traits_2.h>
-
-namespace CGAL {
-
-template<class Base_kernel>
-class Snap_rounding_traits_2 :
-  public CGAL::Arr_segment_traits_2<Base_kernel> {
-
-public: // otherwise Segment_data cannot access the types
-  typedef typename Base_kernel::FT                          NT;
-  typedef typename Base_kernel::FT                          FT;
-  typedef typename Base_kernel::Point_2                     Point_2;
-  typedef typename Base_kernel::Segment_2                   Segment_2;
-  typedef typename Base_kernel::Iso_rectangle_2             Iso_rectangle_2;
-  typedef typename Base_kernel::Vector_2                    Vector_2;
-  typedef typename Base_kernel::Line_2                      Line_2;
-  typedef typename Base_kernel::Aff_transformation_2        Aff_transformation_2;
-  typedef typename Base_kernel::Direction_2                 Direction_2;
-  typedef typename Base_kernel::Construct_vertex_2          Construct_vertex_2 ;
-  typedef typename Base_kernel::Construct_segment_2         Construct_segment_2 ;
-  typedef typename Base_kernel::Construct_iso_rectangle_2   Construct_iso_rectangle_2;
-  typedef typename Base_kernel::Compare_y_2                 Compare_y_2;
-
-  typedef typename Base_kernel::Construct_min_vertex_2                    Construct_min_vertex_2;
-  typedef typename Base_kernel::Construct_max_vertex_2                    Construct_max_vertex_2;
-  typedef typename Base_kernel::Cartesian_const_iterator_2                Cartesian_const_iterator_2;
-  typedef typename Base_kernel::Construct_cartesian_const_iterator_2      Construct_cartesian_const_iterator_2;
-
-  typedef CGAL::Arr_segment_traits_2<Base_kernel>                         Base_traits;
-  typedef typename Base_traits::Compare_x_2                               Compare_x_2;
-  typedef CGAL::To_double<NT>                                             To_double;
-
-public:
-  /*! Functor */
-  class Snap_2 {
-  public:
-    void operator()(const Point_2& p, NT pixel_size, NT &x, NT &y)
-    {
-      NT x_tmp = p.x() / pixel_size;
-      NT y_tmp = p.y() / pixel_size;
-
-      double x_floor = std::floor(CGAL::to_double(x_tmp));
-      double y_floor = std::floor(CGAL::to_double(y_tmp));
-      x = NT(x_floor) * pixel_size + pixel_size / NT(2.0);
-      y = NT(y_floor) * pixel_size + pixel_size / NT(2.0);
-    }
-  };
-
-  Snap_2 snap_2_object() const { return Snap_2(); }
-
-  /*! Functor */
-  class Integer_grid_point_2 {
-  public:
-    Point_2 operator()(const Point_2& p, NT pixel_size)
-    {
-      NT x = (p.x() - pixel_size / NT(2.0)) / pixel_size;
-      NT y = (p.y() - pixel_size / NT(2.0)) / pixel_size;
-      Point_2 out_p(x,y);
-
-      return(out_p);
-    }
-  };
-
-  /*! */
-  Integer_grid_point_2 integer_grid_point_2_object() const
-  {
-    return Integer_grid_point_2();
-  }
-
-  /*! Functor */
-  class Minkowski_sum_with_pixel_2 {
-  private:
-    typedef Snap_rounding_traits_2<Base_kernel>         Traits;
-    typedef std::list<Point_2>                          Point_list;
-
-
-    const Traits * m_gt;
-
-    Minkowski_sum_with_pixel_2(const Traits * gt) : m_gt(gt) {}
-
-  public:
-    void operator()(Point_list & points_list, const Segment_2& s, NT unit_square)
-    {
-
-      Construct_vertex_2 construct_ver = m_gt->construct_vertex_2_object();
-      Compare_y_2 compare_y = m_gt->compare_y_2_object();
-      Compare_x_2 compare_x = m_gt->compare_x_2_object();
-
-      Point_2 src = construct_ver(s, 0);
-      Point_2 trg = construct_ver(s, 1);
-      Comparison_result cx = compare_x(src, trg);
-      Comparison_result cy = compare_y(src, trg);
-      NT x1 = src.x();
-      NT y1 = src.y();
-      NT x2 = trg.x();
-      NT y2 = trg.y();
-      Point_2 ms1, ms2, ms3, ms4, ms5, ms6;// minkowski sum points
-
-      if (cx == SMALLER) {
-        if (cy == SMALLER) {
-          // we use unit_square instead of unit_square / 2 in order to
-          // find tangency points which are not supported by kd-tree
-          ms1 = Point_2(x1 - unit_square, y1 - unit_square);
-          ms2 = Point_2(x1 - unit_square, y1 + unit_square);
-          ms3 = Point_2(x1 + unit_square, y1 - unit_square);
-          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
-          ms5 = Point_2(x2 + unit_square, y2 + unit_square);
-          ms6 = Point_2(x2 - unit_square, y2 + unit_square);
-        } else {
-          ms1 = Point_2(x1 - unit_square, y1 - unit_square);
-          ms2 = Point_2(x1 - unit_square, y1 + unit_square);
-          ms3 = Point_2(x1 + unit_square, y1 + unit_square);
-          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
-          ms5 = Point_2(x2 + unit_square, y2 + unit_square);
-          ms6 = Point_2(x2 - unit_square, y2 - unit_square);
-        }
-      } else {
-        if(cy == SMALLER) {
-          ms1 = Point_2(x1 + unit_square, y1 - unit_square);
-          ms2 = Point_2(x1 + unit_square, y1 + unit_square);
-          ms3 = Point_2(x1 - unit_square, y1 - unit_square);
-          ms4 = Point_2(x2 + unit_square, y2 + unit_square);
-          ms5 = Point_2(x2 - unit_square, y2 + unit_square);
-          ms6 = Point_2(x2 - unit_square, y2 - unit_square);
-        } else {
-          ms1 = Point_2(x1 + unit_square, y1 - unit_square);
-          ms2 = Point_2(x1 + unit_square, y1 + unit_square);
-          ms3 = Point_2(x1 - unit_square, y1 + unit_square);
-          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
-          ms5 = Point_2(x2 - unit_square, y2 - unit_square);
-          ms6 = Point_2(x2 - unit_square, y2 + unit_square);
-        }
-      }
-
-      points_list.push_back(ms1);
-      points_list.push_back(ms2);
-      points_list.push_back(ms3);
-      points_list.push_back(ms4);
-      points_list.push_back(ms5);
-      points_list.push_back(ms6);
-    }
-
-    friend class Snap_rounding_traits_2<Base_kernel>;
-  };
-
-  /*! */
-  Minkowski_sum_with_pixel_2 minkowski_sum_with_pixel_2_object() const
-  {
-    return Minkowski_sum_with_pixel_2(this);
-  }
-
-  Construct_segment_2  construct_segment_2_object() const
-  {
-    Base_kernel k;
-    return k.construct_segment_2_object();
-  }
-
-  Construct_vertex_2 construct_vertex_2_object() const
-  {
-    Base_kernel k;
-    return k.construct_vertex_2_object();
-  }
-
-  Compare_y_2 compare_y_2_object() const
-  {
-    Base_kernel k;
-    return k.compare_y_2_object();
-  }
-
-  Construct_iso_rectangle_2 construct_iso_rectangle_2_object() const
-  {
-    Base_kernel k;
-    return k.construct_iso_rectangle_2_object();
-  }
-
-};
-
-} //namespace CGAL
-
-#endif // CGAL_ISR_2_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sphere_3.h b/3rdparty/CGAL-4.6/include/CGAL/Sphere_3.h
deleted file mode 100644
index 436d580..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Sphere_3.h
+++ /dev/null
@@ -1,349 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra
-
-#ifndef CGAL_SPHERE_3_H
-#define CGAL_SPHERE_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Sphere_3 : public R_::Kernel_base::Sphere_3
-{
-  typedef typename R_::FT                    FT;
-// http://www.cgal.org/Members/Manual_test/LAST/Developers_internal_manual/Developers_manual/Chapter_code_format.html#sec:programming_conventions
-  typedef typename R_::Point_3               Point_3_;
-  typedef typename R_::Circle_3              Circle_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Sphere_3                           Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Sphere_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Sphere_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Sphere_3() {}
-
-  Sphere_3(const Rep& s)
-   : Rep(s) {}
-
-  Sphere_3(const Point_3_& p, const FT& sq_rad,
-           const Orientation& o = COUNTERCLOCKWISE)
-   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, sq_rad, o)) {}
-
-  Sphere_3(const Point_3_& p, const Point_3_& q,
-           const Point_3_& r, const Point_3_& u)
-   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, u)) {}
-
-  Sphere_3(const Point_3_& p, const Point_3_& q, const Point_3_& r,
-           const Orientation& o = COUNTERCLOCKWISE)
-   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, o)) {}
-
-  Sphere_3(const Point_3_& p, const Point_3_&  q,
-           const Orientation& o = COUNTERCLOCKWISE)
-   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, o)) {}
-
-  explicit Sphere_3(const Point_3_& p, const Orientation& o = COUNTERCLOCKWISE)
-   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, o)) {}
-
-  explicit Sphere_3(const Circle_3& c)
-   : Rep(typename R::Construct_sphere_3()(c)) {}
-
-  Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const;
-
-  typename cpp11::result_of<typename R::Construct_center_3( Sphere_3)>::type
-  center() const
-  {
-    return R().construct_center_3_object()(*this);
-  }
-
-  FT
-  squared_radius() const
-  {
-    return R().compute_squared_radius_3_object()(*this);
-  }
-
-  // Returns a circle with opposite orientation
-  Sphere_3 opposite() const
-  {
-    return R().construct_opposite_sphere_3_object()(*this);
-  }
-
-  typename R::Orientation orientation() const
-  {
-    return R().orientation_3_object()(*this);
-  }
-
-  typename R::Bounded_side
-  bounded_side(const Point_3_ &p) const
-  {
-    return R().bounded_side_3_object()(*this, p);
-  }
-
-  typename R::Oriented_side
-  oriented_side(const Point_3_ &p) const
-  {
-    return R().oriented_side_3_object()(*this, p);
-  }
-
-  typename R::Boolean
-  has_on(const Point_3_ &p) const
-  {
-    return R().has_on_3_object()(*this, p);
-  }  
-
-  typename R::Boolean
-  has_on(const Circle_3 &c) const
-  {
-    return R().has_on_3_object()(*this, c);
-  }
-  
-  typename R::Boolean
-  has_on_boundary(const Point_3_ &p) const
-  {
-    return R().has_on_boundary_3_object()(*this, p);
-    //return bounded_side(p) == ON_BOUNDARY;
-  }
-
-  typename R::Boolean
-  has_on_bounded_side(const Point_3_ &p) const
-  {
-    return bounded_side(p) == ON_BOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_unbounded_side(const Point_3_ &p) const
-  {
-    return bounded_side(p) == ON_UNBOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_negative_side(const Point_3_ &p) const
-  {
-    if (orientation() == COUNTERCLOCKWISE)
-      return has_on_unbounded_side(p);
-    return has_on_bounded_side(p);
-  }
-
-  typename R::Boolean
-  has_on_positive_side(const Point_3_ &p) const
-  {
-    if (orientation() == COUNTERCLOCKWISE)
-      return has_on_bounded_side(p);
-    return has_on_unbounded_side(p);
-  }
-
-  typename R::Boolean
-  is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-    //return CGAL_NTS is_zero(squared_radius());
-  }
-
-  Bbox_3
-  bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-};
-
-template <class R_>
-Sphere_3<R_>
-Sphere_3<R_>::
-orthogonal_transform(const typename R_::Aff_transformation_3& t) const
-{
-    typedef typename  R_::RT  RT;
-    typedef typename  R_::FT  FT;
-    typedef typename  R_::Vector_3  Vector_3;
-
-    // FIXME: precond: t.is_orthogonal() (*UNDEFINED*)
-    Vector_3 vec(RT(1), RT(0), RT(0));        // unit vector
-    vec = vec.transform(t);                   // transformed
-    FT sq_scale = vec.squared_length();       // squared scaling factor
-
-    return Sphere_3(t.transform(this->center()),
-                    sq_scale * this->squared_radius(),
-                    t.is_even() ? this->orientation()
-                                : CGAL::opposite(this->orientation()));
-}
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Sphere_3<R>& c,const Cartesian_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        os << c.center() << ' ' << c.squared_radius() << ' '
-           << static_cast<int>(c.orientation());
-        break;
-    case IO::BINARY :
-        os << c.center();
-        write(os, c.squared_radius());
-        write(os, static_cast<int>(c.orientation()));
-        break;
-    default:
-        os << "SphereC3(" << c.center() <<  ", " << c.squared_radius();
-        switch (c.orientation()) {
-        case CLOCKWISE:
-            os << ", clockwise)";
-            break;
-        case COUNTERCLOCKWISE:
-            os << ", counterclockwise)";
-            break;
-        default:
-            os << ", collinear)";
-            break;
-        }
-        break;
-    }
-    return os;
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Sphere_3<R>& c, const Homogeneous_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        os << c.center() << ' ' << c.squared_radius() << ' '
-           << static_cast<int>(c.orientation());
-        break;
-    case IO::BINARY :
-        os << c.center();
-        write(os, c.squared_radius());
-        write(os, static_cast<int>(c.orientation()));
-        break;
-    default:
-        os << "SphereH3(" << c.center() <<  ", " << c.squared_radius();
-        switch (c.orientation()) {
-        case CLOCKWISE:
-            os << ", clockwise)";
-            break;
-        case COUNTERCLOCKWISE:
-            os << ", counterclockwise)";
-            break;
-        default:
-            os << ", collinear)";
-            break;
-        }
-        break;
-    }
-    return os;
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Sphere_3<R>& c)
-{
-  return insert(os, c, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Sphere_3<R>& c, const Cartesian_tag&)
-{
-    typename R::Point_3 center;
-    typename R::FT squared_radius;
-    int o=0;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> center >> squared_radius >> o;
-        break;
-    case IO::BINARY :
-        is >> center;
-        read(is, squared_radius);
-        is >> o;
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-        c = Sphere_3<R>(center, squared_radius, static_cast<Orientation>(o));
-    return is;
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Sphere_3<R>& c, const Homogeneous_tag&)
-{
-    typename R::Point_3 center;
-    typename R::FT squared_radius;
-    int o;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> center >> squared_radius >> o;
-        break;
-    case IO::BINARY :
-        is >> center;
-        read(is, squared_radius);
-        is >> o;
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-        c = Sphere_3<R>(center, squared_radius, static_cast<Orientation>(o));
-    return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Sphere_3<R>& c)
-{
-  return extract(is, c, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_SPHERE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/convert_to_bfi.h b/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/convert_to_bfi.h
deleted file mode 100644
index 4198c3e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/convert_to_bfi.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
-
-// This files adds an optional static cache to convert_to_bfi for Sqrt_extension
-
-#ifndef CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
-#define CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
-
-#include <CGAL/basic.h>
-#include <CGAL/convert_to_bfi.h>
-#include <CGAL/Coercion_traits.h>
-#include <CGAL/Sqrt_extension/Sqrt_extension_type.h>
-
-
-// Disbale SQRT_EXTENSION_TO_BFI_CACHE by default
-#ifndef CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE
-#define CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE 0
-#endif
-
-#if CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE
-
-namespace CGAL {
-
-namespace INTERN_SQRT_EXTENSION {
-template <typename BFI, typename ROOT>
-class Sqrt_extension_bfi_cache {
-  typedef std::pair<long , ROOT> Input;
-  typedef BFI                    Output;
-  typedef typename Coercion_traits<ROOT,BFI>::Cast Cast;
-  typedef typename Algebraic_structure_traits<BFI>::Sqrt Sqrt; 
-
-  struct Creator : public std::unary_function<BFI,Input> {
-    BFI operator()(const Input& pair){
-      return Sqrt()(Cast()(pair.second)); 
-    }
-  };    
-
-public:
-  typedef Cache<Input,Output,Creator> Cache_type;
-  static Cache_type cache; 
-};
-template <typename BFI, typename ROOT>
-typename Sqrt_extension_bfi_cache<BFI,ROOT>::Cache_type 
-Sqrt_extension_bfi_cache<BFI,ROOT>::cache;
-} // namespace INTERN_SQRT_EXTENSION 
-
-
-template <typename NT, typename ROOT, typename ACDE_TAG, typename FP_TAG>
-typename Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval
-convert_to_bfi(const CGAL::Sqrt_extension<NT,ROOT,ACDE_TAG,FP_TAG>& x) {
-  typedef typename Get_arithmetic_kernel<NT>::Arithmetic_kernel AK;
-  typedef typename AK::Bigfloat_interval BFI;
-  typedef Bigfloat_interval_traits<BFI> BFIT;
-  long precision = typename BFIT::Get_precision()();
-
-  BFI result;
-  if(x.is_extended()){
-    typedef INTERN_SQRT_EXTENSION::Sqrt_extension_bfi_cache<BFI,ROOT> Get_cache;
-    BFI a0(convert_to_bfi(x.a0()));
-    BFI a1(convert_to_bfi(x.a1()));
-    BFI root(Get_cache::cache(std::make_pair(precision,x.root())));  
-    result = a0+a1*root;
-  }else{
-    result =  convert_to_bfi(x.a0());
-  }
-#ifndef NDEBUG
-  BFI result_;
-  typedef typename Get_arithmetic_kernel<NT>::Arithmetic_kernel AT;
-  typedef typename AT::Bigfloat_interval BFI;
-  if(x.is_extended()){
-    BFI a0(convert_to_bfi(x.a0()));
-    BFI a1(convert_to_bfi(x.a1()));
-    BFI root(CGAL::sqrt(convert_to_bfi(x.root())));
-    result_ = a0+a1*root;
-  }else{
-    result_ = convert_to_bfi(x.a0());
-  }
-  assert(lower(result) == lower(result_));
-  assert(upper(result) == upper(result_));
-#endif
-  return result; 
-}
-
-} // namespace CGAL 
-
-#endif 
-
-
-#endif  // CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h
deleted file mode 100644
index fd40860..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h
+++ /dev/null
@@ -1,1820 +0,0 @@
-// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H
-#define CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H 1
-
-#include <boost/bind.hpp>
-#include <boost/utility.hpp>
-#include <boost/graph/adjacency_matrix.hpp>
-#include <CGAL/Unique_hash_map.h>
-
-#include <CGAL/Real_timer.h>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4355) // complaint about using 'this' to
-#endif                          // initialize a member
-
-namespace CGAL {
-
-
-template<class Gt, class Ss, class V>
-Straight_skeleton_builder_2<Gt,Ss,V>::Straight_skeleton_builder_2 ( boost::optional<FT> aMaxTime, Traits const& aTraits, Visitor const& aVisitor )
-  :
-  mTraits(aTraits)
- ,mVisitor(aVisitor)
- ,mEventCompare(this)
- ,mVertexID(0)
- ,mEdgeID(0)
- ,mFaceID(0)
- ,mEventID(0)
- ,mStepID(0)
- ,mMaxTime(aMaxTime)
- ,mPQ(mEventCompare)
- ,mSSkel( new SSkel() )
-{
-}
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Halfedge_handle 
-Straight_skeleton_builder_2<Gt,Ss,V>::validate( Halfedge_handle aH ) const
-{
-  if ( !handle_assigned(aH) )
-    throw std::runtime_error("Incomplete straight skeleton");
-  return aH ;
-}
-  
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle 
-Straight_skeleton_builder_2<Gt,Ss,V>::validate( Vertex_handle aH ) const
-{
-  if ( !handle_assigned(aH) )
-    throw std::runtime_error("Incomplete straight skeleton");
-  return aH ;
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::InsertEventInPQ( EventPtr aEvent )
-{
-  mPQ.push(aEvent);
-  CGAL_STSKEL_BUILDER_TRACE(4, "Enque: " << *aEvent);
-}
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr 
-Straight_skeleton_builder_2<Gt,Ss,V>::PopEventFromPQ()
-{
-  EventPtr rR = mPQ.top(); mPQ.pop();
-  return rR ;
-}
-
-// Tests whether there is an edge event between the 3 contour edges defining nodes 'aLnode' and 'aRNode'.
-// If such event exits and is not in the past, it's returned. Otherwise the result is null
-//
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr
-Straight_skeleton_builder_2<Gt,Ss,V>::FindEdgeEvent( Vertex_handle aLNode, Vertex_handle aRNode, Triedge const& aPrevEventTriedge  )
-{
-  EventPtr rResult ;
- 
-  Triedge lTriedge = GetVertexTriedge(aLNode) & GetVertexTriedge(aRNode) ;
-  
-  if ( lTriedge.is_valid()  && lTriedge != aPrevEventTriedge )
-  {
-    Trisegment_2_ptr lTrisegment = CreateTrisegment(lTriedge,aLNode,aRNode);
-    
-    if ( ExistEvent(lTrisegment) )
-    {
-      Comparison_result lLNodeD = CompareEvents(lTrisegment,aLNode) ;
-      Comparison_result lRNodeD = CompareEvents(lTrisegment,aRNode) ;
-      
-      if ( lLNodeD != SMALLER && lRNodeD != SMALLER )
-      {
-        rResult = EventPtr( new EdgeEvent( lTriedge, lTrisegment, aLNode, aRNode ) ) ;
-
-        mVisitor.on_edge_event_created(aLNode, aRNode) ;
-        
-        CGAL_STSKEL_DEBUG_CODE( SetEventTimeAndPoint(*rResult) );
-      }
-      else
-      {
-        CGAL_STSKEL_BUILDER_TRACE(4, "Edge event: " << lTriedge << " is in the past. Compared to L=" << lLNodeD << " to R=" << lRNodeD ) ;
-      }
-    }
-  }
-  return rResult ;
-}
-
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr 
-Straight_skeleton_builder_2<Gt,Ss,V>::IsPseudoSplitEvent( EventPtr const& aEvent, Vertex_handle_pair aOpp, Site const& aSite )
-{
-  EventPtr rPseudoSplitEvent ;
-  
-  if ( aSite != INSIDE )
-  {
-    SplitEvent& lEvent = dynamic_cast<SplitEvent&>(*aEvent) ;
-    
-    Triedge           const& lEventTriedge    = lEvent.triedge();
-    Trisegment_2_ptr  const& lEventTrisegment = lEvent.trisegment();
-    Vertex_handle            lSeedN           = lEvent.seed0();
-    
-    Vertex_handle lOppL = aOpp.first ;
-    Vertex_handle lOppR = aOpp.second ;
-    
-    if ( aSite == AT_SOURCE )
-    {
-      Halfedge_handle lOppPrevBorder = GetVertexTriedge(lOppL).e0() ; 
-      
-      if ( lEventTriedge.e0() != lOppPrevBorder && lEventTriedge.e1() != lOppPrevBorder )
-      {
-        rPseudoSplitEvent = EventPtr( new PseudoSplitEvent(lEventTriedge,lEventTrisegment,lOppL,lSeedN,true) ) ;
-  
-        CGAL_STSKEL_BUILDER_TRACE(1,"Pseudo-split-event found against N" << lOppL->id() ) ;
-        
-        mVisitor.on_pseudo_split_event_created(lOppL,lSeedN) ;
-      }
-    }
-    else // aSite == AT_TARGET 
-    {
-      Vertex_handle lOppNextN = GetNextInLAV(lOppR) ;
-      
-      Halfedge_handle lOppNextBorder = GetVertexTriedge(lOppNextN).e0() ; 
-      
-      if ( lEventTriedge.e0() != lOppNextBorder && lEventTriedge.e1() != lOppNextBorder )
-      {
-        rPseudoSplitEvent = EventPtr( new PseudoSplitEvent(lEventTriedge, lEventTrisegment, lSeedN, lOppR,false) ) ;  
-  
-        CGAL_STSKEL_BUILDER_TRACE(1,"Pseudo-split-event found against N" << lOppR->id() ) ;
-        
-        mVisitor.on_pseudo_split_event_created(lSeedN,lOppR) ;
-      }
-    }
-  }
-  
-  if ( rPseudoSplitEvent )
-    rPseudoSplitEvent->SetTimeAndPoint(aEvent->time(),aEvent->point());
-  
-  return rPseudoSplitEvent ;
-}
-
-// Tests whether there is a split event between the contour edges (aReflexLBorder,aReflexRBorder,aOppositeBorder).
-// If such event exits and is not in the past, it's returned. Otherwise the result is null
-// 'aReflexLBorder' and 'aReflexRBorder' are consecutive contour edges which 'aNode' as the vertex.
-// 'aOppositeBorder' is some other edge in the polygon which, if the event exists, is split by the reflex wavefront.
-//
-// NOTE: 'aNode' can be a skeleton node (an interior split event produced by a previous vertex event). In that case,
-// the 'reflex borders' are not consecutive in the input polygon but they are in the corresponding offset polygon that
-// contains aNode as a vertex.
-//
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::CollectSplitEvent( Vertex_handle aNode, Triedge const& aTriedge )
-{
-  if ( IsOppositeEdgeFacingTheSplitSeed(aNode,aTriedge.e2()) )
-  {
-    Trisegment_2_ptr lTrisegment = CreateTrisegment(aTriedge,aNode);
-    
-    if ( lTrisegment->collinearity() != TRISEGMENT_COLLINEARITY_02 && ExistEvent(lTrisegment) )
-    {
-      if ( CompareEvents(lTrisegment,aNode) != SMALLER )
-      {
-        EventPtr lEvent = EventPtr( new SplitEvent (aTriedge,lTrisegment,aNode) ) ;
-        
-        mVisitor.on_split_event_created(aNode) ;
- 
-        CGAL_STSKEL_DEBUG_CODE( SetEventTimeAndPoint(*lEvent) ) ;
-  
-        AddSplitEvent(aNode,lEvent);      
-      }
-    }
-  }
-}
-
-// Tests the reflex wavefront emerging from 'aNode' against the other contour edges in search for split events.
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::CollectSplitEvents( Vertex_handle aNode, Triedge const& aPrevEventTriedge  )
-{
-  // lLBorder and lRBorder are the consecutive contour edges forming the reflex wavefront.
-  Triedge const& lTriedge = GetVertexTriedge(aNode);
-  
-  Halfedge_handle lLBorder = lTriedge.e0();
-  Halfedge_handle lRBorder = lTriedge.e1();
-  
-  CGAL_STSKEL_BUILDER_TRACE(3
-                      ,"Finding SplitEvent for N" << aNode->id()
-                      << " LBorder: E" << lLBorder->id() << " RBorder: E" << lRBorder->id()
-                      );
-
-  for ( Halfedge_handle_vector_iterator i = mContourHalfedges.begin(); i != mContourHalfedges.end(); ++ i )
-  {
-    Halfedge_handle lOpposite = *i ;
-
-    if ( lOpposite != lLBorder && lOpposite != lRBorder )
-    {
-      Triedge lEventTriedge(lLBorder, lRBorder, lOpposite);
-      
-      if ( lEventTriedge != aPrevEventTriedge )
-      {
-        CollectSplitEvent(aNode, lEventTriedge ) ;
-      }
-    }
-  }
-}
-
-
-// Finds and enques all the new potential events produced by the vertex wavefront emerging from 'aNode' (which can be a reflex wavefront).
-// This new events are simply stored in the priority queue, not processed.
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::CollectNewEvents( Vertex_handle aNode, Triedge const& aPrevEventTriedge )
-{
-  // A Straight Skeleton is the trace of the 'grassfire propagation' that corresponds to the inward move of all the vertices 
-  // of a polygon along their angular bisectors.
-  // Since vertices are the common endpoints of contour edges, the propagation corresponds to contour edges moving inward,
-  // shrinking and expanding as neccesasry to keep the vertices along the angular bisectors.
-  // At each instant in time the current location of vertices (and edges) describe the current 'Offset polygon'
-  // (with at time zero corresponds to the input polygon).
-  // 
-  // An 'edge wavefront' is a moving contour edge.
-  // A 'vertex wavefront' is the wavefront of two consecutive edge wavefronts (sharing a moving vertex).
-  //
-  // An 'Event' is the coallision of 2 wavefronts.
-  // Each event changes the topology of the shrinking polygon; that is, at the event, the current polygon differs from the
-  // inmediately previous polygon in the number of vertices.
-  //
-  // If 2 vertex wavefronts sharing a common edge collide, the event is called an edge event. At the time of the event, the current
-  // polygon doex not have the common edge anynmore, and the two vertices become one. This new 'skeleton' vertex generates a new
-  // vertex wavefront which can further collide with other wavefronts, producing for instance, more edge events.
-  //
-  // If a refex vertex wavefront collide with an edge wavefront, the event is called a split event. At the time of the event, the current
-  // polygon is split in two unconnected polygons, each one containing a portion of the edge hit and split by the reflex wavefront.
-  //
-  // If 2 reflex wavefronts collide each other, the event is called a vertex event. At the time of the event, the current polygon
-  // is split in two unconnected polygons. Each one contains a different combination of the colliding reflex edges. That is, if the
-  // wavefront (edgea,edgeb) collides with (edgec,edged), the two resulting polygons will contain (edgea,edgec) and (edgeb,edged).
-  // Furthermore, one of the new vertices can be a reflex vertex generating a reflex wavefront which can further produce more split or
-  // vertex events (or edge events of course)
-  // 
-  // Each vertex wavefront (reflex or not) results in one and only one event from a set of possible events.
-  // It can result in a edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not
-  // in the input polygon); or it can result in a split event (or vertex event) against any other wavefront in the rest of 
-  // current polygon.
-
-  
-  // Adjacent vertices in the current polygon containing aNode (called LAV)
-  Vertex_handle lPrev = GetPrevInLAV(aNode) ;
-  Vertex_handle lNext = GetNextInLAV(aNode) ;
-
-  CGAL_STSKEL_BUILDER_TRACE
-    ( 2
-    , "Collecting new events generated by N" << aNode->id() << " at " << aNode->point() << " (Prev: N" << lPrev->id() << " Next: N"
-       << lNext->id() << ")"
-    ) ;
-
-  if ( IsReflex(aNode) )
-    CollectSplitEvents(aNode, aPrevEventTriedge) ;
-    
-  EventPtr lLEdgeEvent = FindEdgeEvent( lPrev , aNode, aPrevEventTriedge ) ;
-  EventPtr lREdgeEvent = FindEdgeEvent( aNode , lNext, aPrevEventTriedge ) ;
-
-  bool lAcceptL = !!lLEdgeEvent ;
-  bool lAcceptR = !!lREdgeEvent ;
-    
-  if ( lAcceptL )
-    InsertEventInPQ(lLEdgeEvent);
-    
-  if ( lAcceptR )
-    InsertEventInPQ(lREdgeEvent);
-}
-
-// Handles the special case of two simultaneous edge events, that is, two edges
-// collapsing along the line/point were they meet at the same time.
-// This ocurrs when the bisector emerging from vertex 'aA' is defined by the same pair of 
-// contour edges as the bisector emerging from vertex 'aB' (but in opposite order).
-//
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSimultaneousEdgeEvent( Vertex_handle aA, Vertex_handle aB )
-{
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "Handling simultaneous EdgeEvent between N" << aA ->id() << " and N"  << aB ->id() ) ;
-
-  mVisitor.on_anihiliation_event_processed(aA,aB) ;
-
-  Halfedge_handle lOA = aA->primary_bisector() ;
-  Halfedge_handle lOB = aB->primary_bisector() ;
-  Halfedge_handle lIA = lOA->opposite();
-  Halfedge_handle lIB = lOB->opposite();
-
-  Vertex_handle lOAV = lOA->vertex() ;
-  Vertex_handle lIAV = lIA->vertex() ;
-  Vertex_handle lOBV = lOB->vertex() ;
-  // Vertex_handle lIBV = lIB->vertex() ;
-  
-  CGAL_STSKEL_BUILDER_TRACE ( 2
-                            ,    "OA: B" << lOA->id() << '\n'
-                              << "IA: B" << lIA->id() << '\n'
-                              << "OB: B" << lOB->id() << '\n'
-                              << "IB: B" << lIB->id()
-                            ) ;
-
-  SetIsProcessed(aA) ;
-  SetIsProcessed(aB) ;
-  mGLAV.remove(aA);
-  mGLAV.remove(aB);
-
-  CGAL_STSKEL_BUILDER_TRACE ( 3, 'N' << aA->id() << " processed\nN" << aB->id() << " processed" ) ;
-
-  Halfedge_handle lOA_Prev = lOA->prev() ;
-  Halfedge_handle lIA_Next = lIA->next() ;
-
-  Halfedge_handle lOB_Prev = lOB->prev() ;
-  Halfedge_handle lIB_Next = lIB->next() ;
-  (void) lOB_Prev; // may be unused
-  (void) lIB_Next; // may be unused
-
-  CGAL_STSKEL_BUILDER_TRACE ( 2
-                            ,   "OA_Prev: B" << lOA_Prev->id() << '\n'
-                              << "IA_Next: B" << lIA_Next->id() << '\n'
-                              << "OB_Prev: B" << lOB_Prev->id() << '\n'
-                              << "IB_Next: B" << lIB_Next->id()
-                           ) ;
-
-  CrossLinkFwd(lOB, lIA_Next );
-  CrossLinkFwd(lOA_Prev, lIB );
-
-  Link(lOB,aA);
-
-  CGAL_STSKEL_BUILDER_TRACE ( 1, "B" << lOA->id() << " and B" << lIA->id() << " erased." ) ;
-  mDanglingBisectors.push_back(lOA);
-  
-  //
-  // The code above corrects the links for vertices aA/aB to the erased halfedges lOA and lIA.
-  // However, any of these vertices (aA/aB) maybe one of the twin vertices of a split event.
-  // If that's the case, the erased halfedge maybe be linked to a 'couple' of those vertices.
-  // This situation is corrected below:
-
-  
-  if ( !lOAV->has_infinite_time() && lOAV != aA && lOAV != aB )
-  {
-    Link(lOAV,lIB);
-    
-    CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lOAV->id() << " has B" << lOA->id() 
-                              << " as it's halfedge. Replacing it with B" << lIB->id() 
-                              ) ;
-  }
-  if ( !lIAV->has_infinite_time() && lIAV != aA && lIAV != aB )
-  {
-    Link(lIAV,lOB);
-    
-    CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lIAV->id() << " has B" << lIA->id() 
-                              << " as it's halfedge. Replacing it with B" << lOB->id() 
-                              ) ;
-  }
-  
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "N" << aA->id() << " halfedge: B" << aA->halfedge()->id() ) ;
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "N" << aB->id() << " halfedge: B" << aB->halfedge()->id() ) ;
-
-  SetBisectorSlope(aA,aB);
-
-  CGAL_assertion( aA->primary_bisector() == lIB ) ;
-  
-  CGAL_STSKEL_BUILDER_TRACE ( 1, "Wavefront: E" << lIB->defining_contour_edge()->id() << " and E" << lIB->opposite()->defining_contour_edge()->id() << " anhiliated each other." ) ;
-  
-  if ( lOAV->has_infinite_time() )
-  {
-    CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lOAV->id() << " erased." ) ;
-    EraseNode(lOAV);
-  }
-  
-  if ( lOBV->has_infinite_time() )
-  {
-    CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lOBV->id() << " erased." ) ;
-    EraseNode(lOBV);
-  }
-}
-
-// Returns true if the skeleton edges 'aA' and 'aB' are defined by the same pair of contour edges (but possibly in reverse order)
-//
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::AreBisectorsCoincident ( Halfedge_const_handle aA, Halfedge_const_handle aB  ) const
-{
-  CGAL_STSKEL_BUILDER_TRACE ( 3, "Testing for simultaneous EdgeEvents between B" << aA->id() << " and B" << aB->id() ) ;
-
-  Halfedge_const_handle lA_LBorder = aA->defining_contour_edge();
-  Halfedge_const_handle lA_RBorder = aA->opposite()->defining_contour_edge();
-  Halfedge_const_handle lB_LBorder = aB->defining_contour_edge();
-  Halfedge_const_handle lB_RBorder = aB->opposite()->defining_contour_edge();
-
-  return    ( lA_LBorder == lB_LBorder && lA_RBorder == lB_RBorder )
-         || ( lA_LBorder == lB_RBorder && lA_RBorder == lB_LBorder ) ;
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::UpdatePQ( Vertex_handle aNode, Triedge const& aPrevEventTriedge )
-{
-  Vertex_handle lPrev = GetPrevInLAV(aNode) ;
-  Vertex_handle lNext = GetNextInLAV(aNode) ;
-
-  CGAL_STSKEL_BUILDER_TRACE ( 3, "Updating PQ for N" << aNode->id() << " Prev N" << lPrev->id() << " Next N" << lNext->id() ) ;
-
-  Halfedge_handle lOBisector_P = lPrev->primary_bisector() ;
-  Halfedge_handle lOBisector_C = aNode->primary_bisector() ;
-  Halfedge_handle lOBisector_N = lNext->primary_bisector() ;
-
-  if ( AreBisectorsCoincident(lOBisector_C,lOBisector_P) )
-    HandleSimultaneousEdgeEvent( aNode, lPrev ) ;
-  else
-  if ( AreBisectorsCoincident(lOBisector_C,lOBisector_N) )
-    HandleSimultaneousEdgeEvent( aNode, lNext ) ;
-  else
-     CollectNewEvents(aNode,aPrevEventTriedge);
-}
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::CreateInitialEvents()
-{
-  Triedge const cNull_triedge ;
-  
-  CGAL_STSKEL_BUILDER_TRACE(0, "Creating initial events...");
-  for ( Vertex_iterator v = mSSkel->vertices_begin(); v != mSSkel->vertices_end(); ++ v )
-  {
-    if ( ! v->has_infinite_time() )
-    {
-      UpdatePQ(v,cNull_triedge);
-      mVisitor.on_initial_events_collected(v,IsReflex(v),IsDegenerate(v)) ;
-    }
-  }
-}
-
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::CreateContourBisectors()
-{
-  CGAL_STSKEL_BUILDER_TRACE(0, "Creating contour bisectors...");
-  for ( Vertex_iterator v = mSSkel->vertices_begin(); v != mSSkel->vertices_end(); ++ v )
-  {
-    mGLAV.push_back(static_cast<Vertex_handle>(v));
-    Vertex_handle lPrev = GetPrevInLAV(v) ;
-    Vertex_handle lNext = GetNextInLAV(v) ;
-
-    Orientation lOrientation = CGAL::orientation(lPrev->point(),v->point(),lNext->point()); 
-    if ( lOrientation == COLLINEAR )
-    {
-      SetIsDegenerate(v);
-      CGAL_STSKEL_BUILDER_TRACE(1, "COLLINEAR vertex: N" << v->id() );
-    }
-    else if ( lOrientation == RIGHT_TURN )
-    {
-      mReflexVertices.push_back(v);
-      SetIsReflex(v);
-      CGAL_STSKEL_BUILDER_TRACE(1,"Reflex vertex: N" << v->id() );
-    }
-
-    Halfedge lOB(mEdgeID++), lIB(mEdgeID++);
-    Halfedge_handle lOBisector = mSSkel->SSkel::Base::edges_push_back (lOB, lIB);
-    Halfedge_handle lIBisector = lOBisector->opposite();
-    lOBisector->HBase_base::set_face(v->halfedge()->face());
-    lIBisector->HBase_base::set_face(v->halfedge()->next()->face());
-    lIBisector->HBase_base::set_vertex(v);
-
-    Halfedge_handle lIBorder = v->halfedge() ;
-    Halfedge_handle lOBorder = v->halfedge()->next() ;
-    lIBorder  ->HBase_base::set_next(lOBisector);
-    lOBisector->HBase_base::set_prev(lIBorder);
-    lOBorder  ->HBase_base::set_prev(lIBisector);
-    lIBisector->HBase_base::set_next(lOBorder);
-    CGAL_STSKEL_BUILDER_TRACE(3
-                             ,"Adding Contour Bisector at N:" << v->id() << "\n B" << lOBisector->id()
-                             << " (Out)\n B" << lIBisector->id() << " (In)"
-                             ) ;
-  }
-  
-  for( Face_iterator fit = mSSkel->SSkel::Base::faces_begin(); fit != mSSkel->SSkel::Base::faces_end(); ++fit)
-  {
-    Halfedge_handle lBorder    = fit->halfedge();
-    Halfedge_handle lLBisector = lBorder->prev();
-    Halfedge_handle lRBisector = lBorder->next();
-    
-    Vertex_handle lInfNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ;
-    InitVertexData(lInfNode);
-    CGAL_assertion(lInfNode->has_null_point());
-
-    lRBisector->HBase_base::set_next( lLBisector  );
-    lLBisector->HBase_base::set_prev( lRBisector );
-        
-    lRBisector->HBase_base::set_vertex(lInfNode);
-        
-    lInfNode->VBase::set_halfedge(lRBisector);
-        
-    SetBisectorSlope(lRBisector,POSITIVE);
-    SetBisectorSlope(lLBisector,NEGATIVE);
-    
-    CGAL_STSKEL_BUILDER_TRACE(3
-                             ,"Closing face of E" << lBorder->id()
-                             << " with a ficticious vertex. B" << lRBisector->id()
-                             << "->N" << lInfNode->id()
-                             << "->B" << lLBisector->id()
-                             ) ;
-  }
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::InitPhase()
-{
-  mVisitor.on_initialization_started(mSSkel->size_of_vertices());
-  CreateContourBisectors();
-  CreateInitialEvents();
-  mVisitor.on_initialization_finished();
-}
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle
-Straight_skeleton_builder_2<Gt,Ss,V>::ConstructEdgeEventNode( EdgeEvent& aEvent )
-{
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating EdgeEvent Node" ) ;
-
-  Vertex_handle lLSeed = aEvent.seed0() ;
-  Vertex_handle lRSeed = aEvent.seed1() ;
-  
-  Vertex_handle lNewNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), false, false) ) ;
-  InitVertexData(lNewNode);
-
-  mGLAV.push_back(lNewNode);
- 
-  SetTrisegment(lNewNode,aEvent.trisegment());
- 
-  CGAL_STSKEL_BUILDER_TRACE
-  ( 3
-  ,    "LSeed: N" << lLSeed->id() << " processed\n"
-    << "RSeed: N" << lRSeed->id() << " processed"
-  ) ;
-
-  SetIsProcessed(lLSeed) ;
-  SetIsProcessed(lRSeed) ;
-  mGLAV.remove(lLSeed);
-  mGLAV.remove(lRSeed);
-
-  Vertex_handle lLPrev = GetPrevInLAV(lLSeed) ;
-  Vertex_handle lRNext = GetNextInLAV(lRSeed) ;
-
-  SetPrevInLAV(lNewNode, lLPrev ) ;
-  SetNextInLAV(lLPrev  , lNewNode  ) ;
-
-  SetNextInLAV(lNewNode, lRNext ) ;
-  SetPrevInLAV(lRNext  , lNewNode  ) ;
-
-  CGAL_STSKEL_BUILDER_TRACE( 2, "New Node: N" << lNewNode->id() << " at " << lNewNode->point() << '\n'
-                              << 'N' << lLSeed->id() << " removed from LAV\n"
-                              << 'N' << lRSeed->id() << " removed from LAV\n"
-                           );
-  
-  return lNewNode ;
-}
-
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
-Straight_skeleton_builder_2<Gt,Ss,V>::LookupOnSLAV ( Halfedge_handle aBorder, EventPtr const& aEvent, Site& rSite )
-{
-  Vertex_handle_pair rResult ;
-
-  CGAL_STSKEL_DEBUG_CODE( bool lFound = false ; )
-  
-  // Vertex_handle lSeed = aEvent->seed0();
-  
-  CGAL_STSKEL_BUILDER_TRACE ( 3, "Looking up for E" << aBorder->id() << ". P=" << aEvent->point() ) ;
-   
-  for ( typename std::list<Vertex_handle>::const_iterator vi = mGLAV.begin(); vi != mGLAV.end(); ++ vi )
-  {
-    Vertex_handle v = *vi;
-    
-    Triedge const& lTriedge = GetVertexTriedge(v);
-      
-    Vertex_handle lPrevN = GetPrevInLAV(v);
-    Vertex_handle lNextN = GetNextInLAV(v);
-    
-    if ( lTriedge.e0() == aBorder )
-    {
-      Halfedge_handle lPrevBorder = GetEdgeEndingAt(lPrevN) ; 
-      Halfedge_handle lNextBorder = GetEdgeEndingAt(lNextN) ; 
-      
-      CGAL_STSKEL_DEBUG_CODE( lFound = true ; )
-
-      CGAL_STSKEL_BUILDER_TRACE ( 3
-                                , "Subedge found in SLAV: N" << lPrevN->id() << "->N" << v->id()
-                                  << " (E" << lPrevBorder->id() << "->E" << aBorder->id() << "->E" << lNextBorder->id() << ")"
-                                ) ;
-      
-      Oriented_side lLSide = EventPointOrientedSide(*aEvent, lPrevBorder, aBorder    , lPrevN, false ) ;
-      Oriented_side lRSide = EventPointOrientedSide(*aEvent, aBorder    , lNextBorder, v     , true  ) ;
-                                                   
-      if ( lLSide != ON_POSITIVE_SIDE && lRSide != ON_NEGATIVE_SIDE )
-      {
-        if ( lLSide != ON_ORIENTED_BOUNDARY || lRSide != ON_ORIENTED_BOUNDARY ) 
-        {
-          rSite = ( lLSide == ON_ORIENTED_BOUNDARY ? AT_SOURCE : ( lRSide == ON_ORIENTED_BOUNDARY ?  AT_TARGET : INSIDE ) ) ;
-            
-          rResult = std::make_pair(lPrevN,v) ;
-          
-          CGAL_STSKEL_BUILDER_TRACE ( 3, "Split point found at the " 
-                                    << ( rSite == AT_SOURCE ? "SOURCE vertex" : ( rSite == AT_TARGET ? "TARGET vertex" : "strict inside" ) )
-                                    << " of the offset edge."
-                                    ) ;
-          break ;
-        }
-        else
-        {
-          CGAL_STSKEL_BUILDER_TRACE ( 3, "Opposite edge collapsed to a point" ) ;
-        }
-      } 
-    }
-  }
-  
-#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE
-  if ( !handle_assigned(rResult.first) )
-  {
-    if ( !lFound )
-    {
-      CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Opposite edge vanished.");
-    }
-    else
-    { 
-      CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Point not inside the opposite edge offset zone.");
-    }
-  } 
-#endif
-
-  return rResult ;
-}
-
-
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
-Straight_skeleton_builder_2<Gt,Ss,V>::ConstructSplitEventNodes( SplitEvent& aEvent, Vertex_handle aOppR )
-{
-  Vertex_handle_pair rResult;
-
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating SplitEvent Nodes" ) ;
-
-  Vertex_handle lOppL = GetPrevInLAV(aOppR) ;
-
-  Vertex_handle lNewNodeA = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
-  Vertex_handle lNewNodeB = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
-  
-  InitVertexData(lNewNodeA);
-  InitVertexData(lNewNodeB);
-  SetTrisegment(lNewNodeA,aEvent.trisegment());
-  SetTrisegment(lNewNodeB,aEvent.trisegment());
-
-  mGLAV.push_back(lNewNodeA);
-  mGLAV.push_back(lNewNodeB);
-  
-  Vertex_handle lSeed = aEvent.seed0() ;
- 
-  CGAL_STSKEL_BUILDER_TRACE ( 3, "Seed: N" << lSeed->id() << " processed" ) ;
-  
-  SetIsProcessed(lSeed) ;
-  mGLAV.remove(lSeed);
-
-  CGAL_STSKEL_BUILDER_TRACE ( 2, 'N' << lNewNodeA->id() << " and N" << lNewNodeB->id() << " inserted into LAV." ) ;
-
-  Vertex_handle lPrev = GetPrevInLAV(lSeed) ;
-  Vertex_handle lNext = GetNextInLAV(lSeed) ;
-
-  SetNextInLAV(lPrev    , lNewNodeA ) ;
-  SetPrevInLAV(lNewNodeA, lPrev     ) ;
-
-  SetNextInLAV(lNewNodeA, aOppR     ) ;
-  SetPrevInLAV(aOppR    , lNewNodeA ) ;
-
-  SetNextInLAV(lOppL    , lNewNodeB ) ;
-  SetPrevInLAV(lNewNodeB, lOppL     ) ;
-
-  SetNextInLAV(lNewNodeB, lNext     ) ;
-  SetPrevInLAV(lNext    , lNewNodeB ) ;
-
-  CGAL_STSKEL_BUILDER_TRACE( 2, 'N' << lSeed->id() << " removed from LAV" );
-
-  rResult = std::make_pair(lNewNodeA,lNewNodeB);
-
-  mSplitNodes.push_back(rResult);
-
-  return rResult ;
-}
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
-Straight_skeleton_builder_2<Gt,Ss,V>::ConstructPseudoSplitEventNodes( PseudoSplitEvent& aEvent )
-{
-  Vertex_handle_pair rResult;
-
-  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating PseudoSplitEvent Nodes" ) ;
-
-  Vertex_handle lLSeed = aEvent.seed0() ;
-  Vertex_handle lRSeed = aEvent.seed1() ;
-
-  Vertex_handle lNewNodeA = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
-  Vertex_handle lNewNodeB = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
-
-  mGLAV.push_back(lNewNodeA);
-  mGLAV.push_back(lNewNodeB);
-  
-  InitVertexData(lNewNodeA);
-  InitVertexData(lNewNodeB);
-  SetTrisegment(lNewNodeA,aEvent.trisegment());
-  SetTrisegment(lNewNodeB,aEvent.trisegment());
-  
-  CGAL_STSKEL_BUILDER_TRACE
-  (
-   3
-   ,   "LSeed: N" << lLSeed->id() << " processed\n"
-    << "RSeed: N" << lRSeed->id() << " processed"
-  ) ;
-
-  
-  SetIsProcessed(lLSeed) ;
-  SetIsProcessed(lRSeed) ;
-  mGLAV.remove(lLSeed);
-  mGLAV.remove(lRSeed);
-
-  Vertex_handle lLPrev = GetPrevInLAV(lLSeed) ;
-  Vertex_handle lLNext = GetNextInLAV(lLSeed) ;
-  Vertex_handle lRPrev = GetPrevInLAV(lRSeed) ;
-  Vertex_handle lRNext = GetNextInLAV(lRSeed) ;
-
-  SetPrevInLAV(lNewNodeA, lLPrev    ) ;
-  SetNextInLAV(lLPrev   , lNewNodeA ) ;
-
-  SetNextInLAV(lNewNodeA, lRNext    ) ;
-  SetPrevInLAV(lRNext   , lNewNodeA ) ;
-
-  SetPrevInLAV(lNewNodeB, lRPrev    ) ;
-  SetNextInLAV(lRPrev   , lNewNodeB ) ;
-
-  SetNextInLAV(lNewNodeB, lLNext    ) ;
-  SetPrevInLAV(lLNext   , lNewNodeB ) ;
-
-  CGAL_STSKEL_BUILDER_TRACE(2,   "NewNodeA: N" << lNewNodeA->id() << " at " << lNewNodeA->point() << '\n'
-                              << "NewNodeB: N" << lNewNodeB->id() << " at " << lNewNodeB->point() << '\n'
-                              << 'N' << lLSeed->id() << " removed from LAV\n"
-                              << 'N' << lRSeed->id() << " removed from LAV"
-                           );
-
-  
-  rResult = std::make_pair(lNewNodeA,lNewNodeB);
-
-  mSplitNodes.push_back(rResult);
-
-  return rResult ;
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::IsProcessed( EventPtr aEvent )
-{
-  return IsProcessed(aEvent->seed0()) || IsProcessed(aEvent->seed1()) ;
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidEdgeEvent( EdgeEvent const& aEvent )
-{
-  bool rResult = false ;
-  
-  Vertex_handle lLSeed = aEvent.seed0() ;
-  Vertex_handle lRSeed = aEvent.seed1() ;
-  
-  Vertex_handle lPrevLSeed = GetPrevInLAV(lLSeed) ;
-  Vertex_handle lNextRSeed = GetNextInLAV(lRSeed) ;
-  
-  if ( lPrevLSeed != lNextRSeed )
-  {
-    Halfedge_handle lPrevE0 = GetEdgeEndingAt(lPrevLSeed) ;
-    Halfedge_handle lE0     = aEvent.triedge().e0() ;
-    Halfedge_handle lE2     = aEvent.triedge().e2() ;
-    Halfedge_handle lNextE2 = GetEdgeStartingAt(lNextRSeed) ;
-    
-    CGAL_STSKEL_BUILDER_TRACE(3, "PrevLSeed=N" << lPrevLSeed->id() << " PrevE0=E" << lPrevE0->id() ) ;
-    CGAL_STSKEL_BUILDER_TRACE(3, "NextRSeed=N" << lNextRSeed->id() << " NextE2=E" << lNextE2->id() ) ;
-    
-    Oriented_side lLSide = EventPointOrientedSide(aEvent, lPrevE0, lE0    , lPrevLSeed, false ) ;
-    Oriented_side lRSide = EventPointOrientedSide(aEvent, lE2    , lNextE2, lNextRSeed, true  ) ;
-    
-    bool lLSideOK = ( lLSide != ON_POSITIVE_SIDE ) ;
-    bool lRSideOK = ( lRSide != ON_NEGATIVE_SIDE ) ;
-    
-    CGAL_STSKEL_BUILDER_TRACE_IF( !lLSideOK
-                                ,3
-                                ,"Invalid edge event: " << aEvent.triedge() << " NewNode is before E" << lE0->id()
-                                << " source N" << lPrevLSeed->id()
-                                ) ;
-                                
-    CGAL_STSKEL_BUILDER_TRACE_IF( !lRSideOK
-                                ,3
-                                ,"Invalid edge event: " << aEvent.triedge() << " NewNode is past E" << lE2->id()
-                                 << " target N" << lNextRSeed->id() 
-                                ) ;
-                                
-    rResult = lLSideOK && lRSideOK ;                                 
-  }
-  else
-  {
-    // Triangle collapse. No need to test explicitely.
-    rResult = true ;
-  }
-  return rResult ; 
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::HandleEdgeEvent( EventPtr aEvent )
-{
-  EdgeEvent& lEvent = dynamic_cast<EdgeEvent&>(*aEvent) ;
-
-  if ( IsValidEdgeEvent(lEvent) )
-  {
-    Vertex_handle lLSeed = lEvent.seed0() ;
-    Vertex_handle lRSeed = lEvent.seed1() ;
-
-    Vertex_handle lNewNode = ConstructEdgeEventNode(lEvent);
-  
-    Halfedge_handle lLOBisector = lLSeed->primary_bisector() ;
-    Halfedge_handle lROBisector = lRSeed->primary_bisector() ;
-    Halfedge_handle lLIBisector = lLOBisector->opposite();
-    Halfedge_handle lRIBisector = lROBisector->opposite();
-  
-    Vertex_handle lRIFicNode = lROBisector->vertex() ;
-    Vertex_handle lLOFicNode = lLOBisector->vertex() ;
-    
-    CrossLink(lLOBisector,lNewNode);
-    
-    Link(lROBisector,lNewNode);
-
-    CrossLinkFwd(lROBisector,lLIBisector) ;
-
-    Halfedge_handle lDefiningBorderA = lNewNode->halfedge()->defining_contour_edge();
-    Halfedge_handle lDefiningBorderB = lNewNode->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
-    Halfedge_handle lDefiningBorderC = lNewNode->halfedge()->opposite()->prev()->defining_contour_edge();
-  
-    lNewNode->VBase::set_event_triedge( lEvent.triedge() ) ;
-    
-    Triedge lTri(lDefiningBorderA,lDefiningBorderB,lDefiningBorderC);
-    
-    SetVertexTriedge( lNewNode, lTri ) ;
-    
-    SetBisectorSlope(lLSeed,lNewNode);
-    SetBisectorSlope(lRSeed,lNewNode);
-  
-    CGAL_STSKEL_BUILDER_TRACE( 1, "E" << lRSeed->halfedge()->defining_contour_edge()->id() << " collapsed." );
-    CGAL_STSKEL_BUILDER_TRACE( 3, "Ficticious node along collapsed face is N" << lRIFicNode->id() << " between B" << lROBisector->id() << " and B" << lLIBisector->id() ) ;
-    
-    if ( lLOFicNode->has_infinite_time() )
-    {
-      CGAL_STSKEL_BUILDER_TRACE(3,"Creating new Edge Event's Bisector");
-  
-      Halfedge_handle lNOBisector = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID),Halfedge(mEdgeID+1) );
-  
-      Halfedge_handle lNIBisector = lNOBisector->opposite();
-      mEdgeID += 2 ;
-  
-      CrossLinkFwd(lNOBisector        , lLOBisector->next());
-      CrossLinkFwd(lRIBisector->prev(), lNIBisector        );
-
-      CrossLink(lNOBisector,lLOFicNode);
-      
-      SetBisectorSlope(lNOBisector,POSITIVE);
-      SetBisectorSlope(lNIBisector,NEGATIVE);
-            
-      CrossLinkFwd(lNIBisector, lRIBisector);
-      CrossLinkFwd(lLOBisector, lNOBisector);
-  
-      Link(lNOBisector,lLOBisector->face());
-      Link(lNIBisector,lRIBisector->face());
-      
-      Link(lNIBisector,lNewNode);
-  
-      CGAL_STSKEL_BUILDER_TRACE( 2, newn2str("",lNewNode,lTri) ) ;
-      CGAL_STSKEL_BUILDER_TRACE( 2, newb2str("O",lNOBisector) ) ;
-      CGAL_STSKEL_BUILDER_TRACE( 2, newb2str("I",lNIBisector) ) ;
-  
-      CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lRIFicNode->id() << " erased." ) ;
-      EraseNode(lRIFicNode);
-      
-      SetupNewNode(lNewNode) ;
-      
-      UpdatePQ(lNewNode, lEvent.triedge());
-     
-      mVisitor.on_edge_event_processed(lLSeed,lRSeed,lNewNode) ;
-    }
-    else
-    {
-      CGAL_STSKEL_BUILDER_TRACE( 2, newn2str("",lNewNode,lTri) 
-                                    << ".\nThis is a multiple node (A node with these defining edges already exist in the LAV)"
-                               );
-    }
-    
-    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefront: " << wavefront2str(lNewNode) );
-  }
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidSplitEvent( SplitEvent const& /*aEvent*/ )
-{
-  return true ;
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSplitEvent( EventPtr aEvent, Vertex_handle_pair aOpp  )
-{
-  SplitEvent& lEvent = dynamic_cast<SplitEvent&>(*aEvent) ;
-
-  if ( IsValidSplitEvent(lEvent) )
-  {
-    Vertex_handle lSeed = lEvent.seed0();
-   
-    Vertex_handle lOppL = aOpp.first ;
-    Vertex_handle lOppR = aOpp.second ;
-    
-    Halfedge_handle lOppIBisector_L = lOppL->primary_bisector()->opposite();
-    Halfedge_handle lOppOBisector_R = lOppR->primary_bisector();
-    
-    Vertex_handle lOppFicNode = lOppOBisector_R->vertex() ;
-    (void)lOppFicNode; // variable may be unused
-    
-    CGAL_assertion(lOppOBisector_R->next() == lOppIBisector_L ) ;
-    CGAL_assertion(lOppIBisector_L->prev() == lOppOBisector_R ) ;
-    CGAL_assertion(lOppFicNode->has_infinite_time());
-    
-    
-    CGAL_STSKEL_BUILDER_TRACE(2,"Splitted face: N" << lOppR->id()
-                                << "->B" << lOppOBisector_R->id()
-                                << "->N" << lOppFicNode->id()
-                                << "->B" << lOppIBisector_L->id()
-                                << "->N" << lOppL->id()
-                             ) ;   
-                             
-    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for right half of opposite edge: N" << lOppFicNode->id() ) ;
-      
-    Halfedge_handle lOppBorder = lEvent.triedge().e2() ;
-  
-    Vertex_handle lNewNode_L, lNewNode_R ;
-    boost::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR);
-  
-    // Triedge lTriedge = aEvent->triedge();
-        
-    // Halfedge_handle lReflexLBorder = lTriedge.e0();
-    // Halfedge_handle lReflexRBorder = lTriedge.e1();
-  
-    Halfedge_handle lNOBisector_L = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID  ),Halfedge(mEdgeID+1) );
-    Halfedge_handle lNOBisector_R = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) );
-    Halfedge_handle lNIBisector_L = lNOBisector_L->opposite();
-    Halfedge_handle lNIBisector_R = lNOBisector_R->opposite();
-  
-    mEdgeID += 4 ;
-    
-    Halfedge_handle lXOBisector = lSeed->primary_bisector() ;
-    Halfedge_handle lXIBisector = lXOBisector->opposite();
-    
-    Halfedge_handle lXONextBisector = lXOBisector->next();
-    Halfedge_handle lXIPrevBisector = lXIBisector->prev();
-  
-    Vertex_handle lXOFicNode = lXOBisector->vertex() ;
-    CGAL_assertion(lXOFicNode->has_infinite_time());
-    
-    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for left reflex face: N" << lXOFicNode->id() ) ;
-    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for right reflex face: N" << lXIPrevBisector->vertex()->id() ) ;
-    
-    Link(lNewNode_L,lXOBisector);
-    Link(lNewNode_R,lNIBisector_L) ;
-    
-    Link(lXOBisector,lNewNode_L);
-    
-    Link(lNOBisector_L,lXOBisector->face());
-    Link(lNIBisector_L,lOppBorder ->face());
-    Link(lNOBisector_R,lOppBorder ->face());
-    Link(lNIBisector_R,lXIBisector->face());
-  
-    Link(lNIBisector_L,lNewNode_R);
-    Link(lNIBisector_R,lNewNode_R);
-  
-    Link(lNOBisector_L,lXOFicNode);
-    
-    
-    CrossLinkFwd(lXOBisector    ,lNOBisector_L);
-    CrossLinkFwd(lNOBisector_L  ,lXONextBisector);
-    CrossLinkFwd(lXIPrevBisector,lNIBisector_R);
-    CrossLinkFwd(lNIBisector_R  ,lXIBisector);
-    CrossLinkFwd(lOppOBisector_R,lNIBisector_L);
-    CrossLinkFwd(lNIBisector_L  ,lNOBisector_R);
-    CrossLinkFwd(lNOBisector_R  ,lOppIBisector_L);
-    
-    SetBisectorSlope(lSeed,lNewNode_L);
-  
-    Vertex_handle lNewFicNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ;
-    InitVertexData(lNewFicNode);
-    CGAL_assertion(lNewFicNode->has_null_point());
-    CrossLink(lNOBisector_R,lNewFicNode);
-    
-    SetBisectorSlope(lNOBisector_L,POSITIVE);
-    SetBisectorSlope(lNIBisector_L,NEGATIVE);
-    SetBisectorSlope(lNOBisector_R,POSITIVE);
-    SetBisectorSlope(lNIBisector_R,NEGATIVE);
-    
-    CGAL_STSKEL_BUILDER_TRACE(2,"(New) ficticious node for left half of opposite edge: N" << lNewFicNode->id() ) ;
-    
-    Halfedge_handle lNewNode_L_DefiningBorderA = lNewNode_L->halfedge()->defining_contour_edge();
-    Halfedge_handle lNewNode_L_DefiningBorderB = lNewNode_L->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
-    Halfedge_handle lNewNode_L_DefiningBorderC = lNewNode_L->halfedge()->opposite()->prev()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderA = lNewNode_R->halfedge()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge();
-  
-    lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ;
-    lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ;
-    
-    Triedge lTriL( lNewNode_L_DefiningBorderA,lNewNode_L_DefiningBorderB,lNewNode_L_DefiningBorderC ) ;
-    Triedge lTriR( lNewNode_R_DefiningBorderA,lNewNode_R_DefiningBorderB,lNewNode_R_DefiningBorderC ) ;
-    
-    SetVertexTriedge( lNewNode_L, lTriL ) ;
-    SetVertexTriedge( lNewNode_R, lTriR ) ;
-    
-    CGAL_STSKEL_BUILDER_TRACE(2,   newn2str("L",lNewNode_L,lTriL) << std::endl
-                                << newn2str("R",lNewNode_R,lTriR) << std::endl
-                                << newb2str("OL",lNOBisector_L)   << std::endl
-                                << newb2str("IL",lNIBisector_L)   << std::endl
-                                << newb2str("OR",lNOBisector_R)   << std::endl
-                                << newb2str("IR",lNIBisector_R)
-                             ) ;
-      
-    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefronts:\n  " << wavefront2str(lNewNode_L) << "\n  " << wavefront2str(lNewNode_R) );
-    
-    SetupNewNode(lNewNode_L) ;
-    SetupNewNode(lNewNode_R) ;
-    
-    UpdatePQ(lNewNode_L, lEvent.triedge());
-    UpdatePQ(lNewNode_R, lEvent.triedge());
-  
-    mVisitor.on_split_event_processed(lSeed,lNewNode_L,lNewNode_R) ;
-  }
-
-      
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::SetupNewNode( Vertex_handle aNode )
-{
-  // In an edge-edge anihiliation the current polygon becomes a two-node degenerate chain collapsed into a single point
-  if ( GetPrevInLAV(aNode) != GetNextInLAV(aNode) )
-  {
-    Halfedge_handle lLE = GetEdgeEndingAt  (aNode);
-    Halfedge_handle lRE = GetEdgeStartingAt(aNode);
-    
-    Vector_2 lLV = CreateVector(lLE);
-    Vector_2 lRV = CreateVector(lRE);
-  
-    Orientation lOrientation = CGAL::orientation(lLV,lRV) ;
-    if ( lOrientation == COLLINEAR )
-    {
-      SetIsDegenerate(aNode);
-      CGAL_STSKEL_BUILDER_TRACE(1, "COLLINEAR *NEW* vertex: N" << aNode->id() << " (E" << lLE->id() << ",E" << lRE->id() << ")" ) ; 
-    }
-    else if ( lOrientation == RIGHT_TURN )
-    {
-      mReflexVertices.push_back(aNode);
-      SetIsReflex(aNode);
-      CGAL_STSKEL_BUILDER_TRACE(1, "Reflex *NEW* vertex: N" << aNode->id()  << " (E" << lLE->id() << ",E" << lRE->id() << ")" );
-    }
-  }
-}
-
-template<class Direction>
-bool counterclockwise_at_or_in_between_2( Direction const& p, Direction const& q, Direction const& r )
-{
-  typedef typename Kernel_traits<Direction>::Kernel K ;
-  
-  return p == q || p == r || K().counterclockwise_in_between_2_object()(p,q,r) ;
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidPseudoSplitEvent( PseudoSplitEvent const& aEvent )
-{
-  Vertex_handle lSeed0 = aEvent.seed0();
-  Vertex_handle lSeed1 = aEvent.seed1();
-  
-  Halfedge_handle lEL0 = GetEdgeEndingAt  (lSeed0);
-  Halfedge_handle lER0 = GetEdgeStartingAt(lSeed0);
-  
-  Halfedge_handle lEL1 = GetEdgeEndingAt  (lSeed1);
-  Halfedge_handle lER1 = GetEdgeStartingAt(lSeed1);
-  
-  Direction_2 lDL0 = - CreateDirection(lEL0);
-  Direction_2 lDL1 = - CreateDirection(lEL1);
-  Direction_2 lDR0 =   CreateDirection(lER0);
-  Direction_2 lDR1 =   CreateDirection(lER1);
-  
-  bool lV01Degenerate = (lDL0 == lDR1) ;
-  bool lV10Degenerate = (lDL1 == lDR0) ;
-  
-  
-  CGAL_STSKEL_BUILDER_TRACE(3, "Validating pseudo-split event. Resulting re-connection: "
-                           << "\nE" << lEL0->id() << " [DL0:" << dir2str(lDL0) << "]"
-                           << "->E" << lER1->id() << " [DR1:" << dir2str(lDR1) << "]" << ( lV01Degenerate ? " (degenerate)" : "" )
-                           << "\nE" << lEL1->id() << " [DL1:" << dir2str(lDL1) << "]"
-                           << "->E" << lER0->id() << " [DR0:" << dir2str(lDR0) << "]" << ( lV10Degenerate ? " (degenerate)" : "" )
-                           ) ;
-  
-  bool lTangled ;
-   
-  if ( !lV01Degenerate )
-  {
-    bool lEL1V_Tangled = counterclockwise_at_or_in_between_2(lDL1,lDR1,lDL0);
-    bool lER0V_Tangled = counterclockwise_at_or_in_between_2(lDR0,lDR1,lDL0);
-    
-    lTangled = lEL1V_Tangled || lER0V_Tangled ;
-  }
-  else if ( !lV10Degenerate )
-  {
-    bool lEL0V_Tangled = counterclockwise_at_or_in_between_2(lDL0,lDR0,lDL1);
-    bool lER1V_Tangled = counterclockwise_at_or_in_between_2(lDR1,lDR0,lDL1);
-
-    lTangled = lEL0V_Tangled || lER1V_Tangled ;
-  }
-  else
-  {
-    lTangled = (lDL0 == lDL1) ;
-  }
-  
-  CGAL_STSKEL_BUILDER_TRACE_IF(lTangled, 3, "Tangled profile. Pseudo-split event is invalid");
-
-  return !lTangled ;
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::HandlePseudoSplitEvent( EventPtr aEvent )
-{
-  PseudoSplitEvent& lEvent = dynamic_cast<PseudoSplitEvent&>(*aEvent) ;
-  
-  if ( IsValidPseudoSplitEvent(lEvent) )
-  {
-    Vertex_handle lLSeed = lEvent.seed0() ;
-    Vertex_handle lRSeed = lEvent.seed1() ;
-
-    Vertex_handle lNewNode_L, lNewNode_R ;
-    boost::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent);
-  
-    Halfedge_handle lNBisector_LO = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID  ),Halfedge(mEdgeID+1) );
-    Halfedge_handle lNBisector_RO = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) );
-    Halfedge_handle lNBisector_LI = lNBisector_LO->opposite();
-    Halfedge_handle lNBisector_RI = lNBisector_RO->opposite();
-  
-    mEdgeID += 4 ;
-    
-    Halfedge_handle lSBisector_LO = lLSeed->primary_bisector() ;
-    Halfedge_handle lSBisector_LI = lSBisector_LO->opposite();
-  
-    Halfedge_handle lSBisector_RO = lRSeed->primary_bisector() ;
-    Halfedge_handle lSBisector_RI = lSBisector_RO->opposite();
-  
-    Halfedge_handle lSBisector_LO_Next = lSBisector_LO->next();
-    Halfedge_handle lSBisector_RO_Next = lSBisector_RO->next();
-    Halfedge_handle lSBisector_LI_Prev = lSBisector_LI->prev();
-    Halfedge_handle lSBisector_RI_Prev = lSBisector_RI->prev();
-    
-    Vertex_handle lFicNod_SLO = lSBisector_LO->vertex();
-    CGAL_assertion_code(Vertex_handle lFicNod_SLI = lSBisector_LI_Prev->vertex();) // unused 
-    Vertex_handle lFicNod_SRO = lSBisector_RO->vertex();
-    CGAL_assertion_code(Vertex_handle lFicNod_SRI = lSBisector_RI_Prev->vertex();) // unused
-    
-    CGAL_assertion( lFicNod_SLO->has_infinite_time() ) ;
-    CGAL_assertion( lFicNod_SLI->has_infinite_time() ) ;
-    CGAL_assertion( lFicNod_SRO->has_infinite_time() ) ;
-    CGAL_assertion( lFicNod_SRI->has_infinite_time() ) ;
-    
-    Link(lNBisector_LO, lSBisector_LO->face());
-    Link(lNBisector_LI, lSBisector_RI->face());
-    Link(lNBisector_RO, lSBisector_RO->face());
-    Link(lNBisector_RI, lSBisector_LI->face());
-    
-    CrossLink(lSBisector_LO, lNewNode_L );
-    CrossLink(lSBisector_RO, lNewNode_R );
-    
-    CrossLink(lNBisector_LO, lFicNod_SLO );
-    CrossLink(lNBisector_RO, lFicNod_SRO );
-    
-    SetBisectorSlope(lNBisector_LO,POSITIVE);
-    SetBisectorSlope(lNBisector_LI,NEGATIVE);
-    SetBisectorSlope(lNBisector_RO,POSITIVE);
-    SetBisectorSlope(lNBisector_RI,NEGATIVE);
-    
-    Link(lNBisector_LI, lNewNode_L);
-    Link(lNBisector_RI, lNewNode_R);
-
-    Link(lNewNode_L, lSBisector_LO);
-    Link(lNewNode_R, lSBisector_RO);
-    
-    CrossLinkFwd(lSBisector_LO,lNBisector_LO);
-    CrossLinkFwd(lNBisector_LO,lSBisector_LO_Next);
-    CrossLinkFwd(lSBisector_LI_Prev,lNBisector_RI);
-    CrossLinkFwd(lNBisector_RI,lSBisector_LI);
-    CrossLinkFwd(lSBisector_RI_Prev,lNBisector_LI);
-    CrossLinkFwd(lNBisector_LI,lSBisector_RI);
-    CrossLinkFwd(lSBisector_RO,lNBisector_RO);
-    CrossLinkFwd(lNBisector_RO,lSBisector_RO_Next);
-  
-    SetBisectorSlope(lLSeed,lNewNode_L);
-    SetBisectorSlope(lRSeed,lNewNode_R);
-    
-    Halfedge_handle lNewNode_L_DefiningBorderA = lNewNode_L->halfedge()->defining_contour_edge();
-    Halfedge_handle lNewNode_L_DefiningBorderB = lNewNode_L->halfedge()->next()->opposite()->defining_contour_edge();
-    Halfedge_handle lNewNode_L_DefiningBorderC = lNewNode_L->halfedge()->opposite()->prev()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderA = lNewNode_R->halfedge()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->next()->opposite()->defining_contour_edge();
-    Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge();
-  
-    lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ;
-    lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ;
-    
-    Triedge lTriL( lNewNode_L_DefiningBorderA, lNewNode_L_DefiningBorderB, lNewNode_L_DefiningBorderC ) ;
-    Triedge lTriR( lNewNode_R_DefiningBorderA, lNewNode_R_DefiningBorderB, lNewNode_R_DefiningBorderC ) ;
-    
-    SetVertexTriedge( lNewNode_L, lTriL ) ;
-    SetVertexTriedge( lNewNode_R, lTriR ) ;
-  
-    CGAL_STSKEL_BUILDER_TRACE(2,   newn2str("L",lNewNode_L,lTriL) << std::endl
-                                << newn2str("R",lNewNode_R,lTriR) << std::endl
-                                << newb2str("OL",lNBisector_LO)   << std::endl
-                                << newb2str("IL",lNBisector_LI)   << std::endl
-                                << newb2str("OR",lNBisector_RO)   << std::endl
-                                << newb2str("IR",lNBisector_RI)
-                             ) ;
-  
-    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefronts:\n  " << wavefront2str(lNewNode_L) << "\n  " << wavefront2str(lNewNode_R) );
-    
-    SetupNewNode(lNewNode_L) ;
-    SetupNewNode(lNewNode_R) ;
-    
-    UpdatePQ(lNewNode_L, lEvent.triedge());
-    UpdatePQ(lNewNode_R, lEvent.triedge());
-  
-    mVisitor.on_pseudo_split_event_processed(lLSeed,lRSeed,lNewNode_L,lNewNode_R) ;
-  }  
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSplitOrPseudoSplitEvent( EventPtr aEvent )
-{
-  Halfedge_handle lOppEdge = aEvent->triedge().e2() ;
-  
-  Site lSite;
-  
-  Vertex_handle_pair lOpp = LookupOnSLAV(lOppEdge,aEvent,lSite);
-  
-  if ( handle_assigned(lOpp.first) )
-  {
-    EventPtr lPseudoSplitEvent = IsPseudoSplitEvent(aEvent,lOpp,lSite);
-    if ( lPseudoSplitEvent )
-         HandlePseudoSplitEvent(lPseudoSplitEvent);
-    else HandleSplitEvent(aEvent,lOpp);  
-  }  
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::InsertNextSplitEventInPQ( Vertex_handle v )
-{
-  EventPtr lSplitEvent = PopNextSplitEvent(v);
-  if ( !!lSplitEvent )
-    InsertEventInPQ(lSplitEvent);
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::InsertNextSplitEventsInPQ()
-{
-  for ( typename Vertex_handle_vector::iterator v = mReflexVertices.begin(), ev = mReflexVertices.end(); v != ev ; ++ v )
-    if ( !IsProcessed(*v) )
-      InsertNextSplitEventInPQ(*v);
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::Propagate()
-{
-  CGAL_STSKEL_BUILDER_TRACE(0,"Propagating events...");
-  mVisitor.on_propagation_started();
-
-  for (;;)
-  {
-    InsertNextSplitEventsInPQ();
-       
-    if ( !mPQ.empty() )
-    {
-      EventPtr lEvent = PopEventFromPQ();
-    
-      if ( lEvent->type() != Event::cEdgeEvent )    
-        AllowNextSplitEvent(lEvent->seed0());
-    
-      if ( !IsProcessed(lEvent) )
-      {
-        CGAL_STSKEL_BUILDER_TRACE (1,"\nS" << mStepID << " Event: " << *lEvent ) ;
-    
-        SetEventTimeAndPoint(*lEvent) ;
-        
-        switch ( lEvent->type() )
-        {
-          case Event::cEdgeEvent       : HandleEdgeEvent              (lEvent) ; break ;
-          case Event::cSplitEvent      : HandleSplitOrPseudoSplitEvent(lEvent) ; break ;
-          case Event::cPseudoSplitEvent: HandlePseudoSplitEvent       (lEvent) ; break ; 
-        }
-    
-        ++ mStepID ;
-      }
-    }   
-    else break ;
-  }
-  
-  mVisitor.on_propagation_finished();
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::MergeSplitNodes ( Vertex_handle_pair aSplitNodes )
-{
-  Vertex_handle lLNode, lRNode ;
-  boost::tie(lLNode,lRNode)=aSplitNodes;
-
-  Halfedge_handle lIBisectorL1 = lLNode->primary_bisector()->opposite();
-  Halfedge_handle lIBisectorR1 = lRNode->primary_bisector()->opposite();
-  Halfedge_handle lIBisectorL2 = lIBisectorL1->next()->opposite();
-  Halfedge_handle lIBisectorR2 = lIBisectorR1->next()->opposite();
-  
-  CGAL_STSKEL_BUILDER_TRACE(2
-                      ,"Merging SplitNodes: (L) N" << lLNode->id() << " and (R) N" << lRNode->id() << ".\n"
-                       << "  LOut: B" << lLNode->primary_bisector()->id() << '\n'
-                       << "  ROut: B" << lRNode->primary_bisector()->id() << '\n'
-                       << "  LIn1: B" << lIBisectorL1->id() << '\n'
-                       << "  RIn1: B" << lIBisectorR1->id() << '\n'
-                       << "  LIn2: B" << lIBisectorL2->id() << '\n'
-                       << "  RIn2: B" << lIBisectorR2->id() 
-                       );
-
-  if ( lIBisectorL1->vertex() == lRNode )
-    lIBisectorL1->HBase_base::set_vertex(lLNode);
-
-  if ( lIBisectorR1->vertex() == lRNode )
-    lIBisectorR1->HBase_base::set_vertex(lLNode);
-
-  if ( lIBisectorL2->vertex() == lRNode )
-    lIBisectorL2->HBase_base::set_vertex(lLNode);
-
-  if ( lIBisectorR2->vertex() == lRNode )
-    lIBisectorR2->HBase_base::set_vertex(lLNode);
-
-  CGAL_STSKEL_BUILDER_TRACE(2
-                      ,   "  N" << lRNode->id() << " removed.\n"
-                       << "  LIn1 B" << lIBisectorL1->id() << " now linked to N" << lIBisectorL1->vertex()->id() << '\n'
-                       << "  RIn1 B" << lIBisectorR1->id() << " now linked to N" << lIBisectorR1->vertex()->id() << '\n'
-                       << "  LIn2 B" << lIBisectorL2->id() << " now linked to N" << lIBisectorL2->vertex()->id() << '\n'
-                       << "  RIn2 B" << lIBisectorR2->id() << " now linked to N" << lIBisectorR2->vertex()->id()
-                       );
-
-  EraseNode(lRNode);
-}
-
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::EraseNode ( Vertex_handle aNode )
-{
-  aNode->VBase::reset_id__internal__(-aNode->id());
-  mSSkel->SSkel::Base::vertices_erase(aNode);
-}
-
-#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE
-template<class Halfedge_handle>
-void TraceMultinode( char const* t, Halfedge_handle b, Halfedge_handle e )
-{
-  std::ostringstream ss ;
-  ss << t ;
-  
-  do
-  {
-    ss << "B" << b->id() << " N" << b->vertex()->id() << " " ;
-  }
-  while ( b = b->next(), b != e ) ;
-  
-  std::string s = ss.str();
-  CGAL_STSKEL_BUILDER_TRACE(0, s);
-}
-
-
-template<class Point>
-double angle_wrt_X ( Point const& a, Point const& b )
-{
-  double dx = to_double(b.x() - a.x() ) ;
-  double dy = to_double(b.y() - a.y() ) ;
-  double atan = std::atan2(dy,dx);
-  double rad  = atan >= 0.0 ? atan : 2.0 * 3.141592 + atan ;
-  double deg  = rad * 180.0 / 3.141592 ;
-  return deg ;
-}
-
-template<class Vertex_handle, class Halfedge_around_vertex_circulator>
-void TraceFinalBisectors( Vertex_handle v, Halfedge_around_vertex_circulator cb )
-{
-  Halfedge_around_vertex_circulator c = cb ;
-
-  do
-  {
-    double phi = angle_wrt_X((*c)->vertex()->point(),(*c)->opposite()->vertex()->point());
-    
-    CGAL_STSKEL_BUILDER_TRACE(2, "  N" << v->id() << " in=B" << (*c)->id() 
-                        << " E" << (*c)->defining_contour_edge()->id() 
-                        << " out=B" << (*c)->opposite()->id() 
-                        << " E" << (*c)->opposite()->defining_contour_edge()->id() 
-                        << " phi=" << phi
-                        );
-    
-    ++ c ;
-  }
-  while( c != cb ) ;
-  
-}
-#endif
-
-template<class Vertex_handle, class Halfedge_around_vertex_circulator>
-bool ValidateFinalBisectorsAfterMerge( Vertex_handle /* v */, Halfedge_around_vertex_circulator cb )
-{
-  bool rOK = true ;
-  
-  Halfedge_around_vertex_circulator c = cb ;
-
-  do
-  {
-    if ( (*c)->defining_contour_edge() != (*c)->prev()->defining_contour_edge() )
-      rOK = false ;
-      
-    ++ c ;
-  }
-  while( rOK && c != cb ) ;
-  
-  return rOK ;
-  
-}
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::RelinkBisectorsAroundMultinode( Vertex_handle const& v0, Halfedge_handle_vector& aLinks )
-{
-  CGAL_assertion( aLinks.size() > 0 ) ;
-  
-  CGAL_STSKEL_BUILDER_TRACE(4, "Relinking " << aLinks.size() << " bisectors around N" << v0->id() ) ;
-  
-  // Connect the bisectors with each other following the CCW ordering
-  
-  Halfedge_handle first_he = aLinks.front();        
-  Halfedge_handle prev_he  = first_he ;
-  
-  first_he->HBase_base::set_vertex(v0);
-  
-  for ( typename Halfedge_handle_vector::iterator i = cpp11::next(aLinks.begin()), ei = aLinks.end(); i != ei ; ++ i )
-  {
-    Halfedge_handle he = *i ;
-
-    he->HBase_base::set_vertex(v0);
-            
-    Halfedge_handle prev_he_opp = prev_he->opposite();
-    
-    he         ->HBase_base::set_next(prev_he_opp);
-    prev_he_opp->HBase_base::set_prev(he);
-
-    CGAL_STSKEL_BUILDER_TRACE(4, "Relinking B" << he->id() << "->B" << prev_he_opp->id() ) ;
-    
-    prev_he = he ;
-  }
-
-  Halfedge_handle prev_he_opp = prev_he->opposite();
-    
-  first_he   ->HBase_base::set_next(prev_he_opp);
-  prev_he_opp->HBase_base::set_prev(first_he);
-
-  CGAL_STSKEL_BUILDER_TRACE(4, "Relinking B" << first_he->id() << "->B" << prev_he_opp->id() ) ;
-  
-  // Reset the main halfedge for v0  
-  v0->VBase::set_halfedge(first_he) ;
-  
-  CGAL_STSKEL_DEBUG_CODE( TraceFinalBisectors(v0,v0->halfedge_around_vertex_begin()); )
-
-  CGAL_postcondition( ValidateFinalBisectorsAfterMerge(v0,v0->halfedge_around_vertex_begin()) ) ;
-}
-
-
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::PreprocessMultinode( Multinode& aMN )
-{
-  //
-  // A Multinode is a run of coincident nodes along a face.
-  // Its represented by a pair of halfedges describing a linear profile.
-  // The first halfedge in the pair points to the first node in the multinode.
-  // Each ->next() halfedge in the profile points to a subsequent node.
-  // The second halfedge in the pair is past-the-end (it points to the first node around the face that IS NOT part of the multinode)
-  //
-  
-  // Halfedge_handle oend = validate(aMN.end->opposite());
-  
-  Halfedge_handle h = aMN.begin ;
- 
-  aMN.bisectors_to_relink.push_back(h);
-  
-  // Traverse the profile collecting:
-  //  The nodes to be removed from the HDS (all but the first)
-  //  The bisectors to be removed from the HDS (each bisector pointing to the next node in the multinode)
-  //  The bisectors around each node that must be relinked to the first node (which will be kept in place of the multinode)
-  do
-  {
-    ++ aMN.size ;
-    Halfedge_handle nx = validate(h->next());
-    if ( nx != aMN.end )
-      aMN.bisectors_to_remove.push_back(nx);
-
-    // Since each halfedge "h" in this lineal profile corresponds to a single face, all the bisectors around
-    // each node which must be relinked are those found ccw between h and h->next()
-    Halfedge_handle ccw = h ;
-    Halfedge_handle ccw_end = validate(h->next()->opposite());
-    for(;;)
-    {
-      ccw = validate(ccw->opposite()->prev()) ;
-      if ( ccw != ccw_end )
-           aMN.bisectors_to_relink.push_back(ccw);
-      else break ;  
-    }    
-    if ( h != aMN.begin )
-    {
-      aMN.nodes_to_remove.push_back(h->vertex());
-    }
-      
-    h = nx;
-  }
-  while ( h != aMN.end ) ;
-  
-  aMN.bisectors_to_relink.push_back(aMN.end->opposite());
-  
-  CGAL_STSKEL_DEBUG_CODE( TraceMultinode("Preprocessing multinode: ", aMN.begin,aMN.end) ) ;
-}
-
-//
-// Replaces a run of coincident nodes with a single one by removing all but the first, remvong node-to-node bisectors and
-// relinking the other bisectors.
-//
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::ProcessMultinode( Multinode&              aMN 
-                                                           , Halfedge_handle_vector& rBisectorsToRemove 
-                                                           , Vertex_handle_vector&   rNodesToRemove
-                                                           )
-{
-  bool lDoNotProcess = false ;
-  
-  Halfedge_handle h = aMN.begin ;
-
-  do
-  {
-    if ( h->vertex()->has_infinite_time() || IsExcluded(h->vertex()))
-      lDoNotProcess = true ;
-  }
-  while ( h = h->next(), !lDoNotProcess && h != aMN.end ) ;
-  
-  if ( !lDoNotProcess )
-  {
-    CGAL_STSKEL_DEBUG_CODE( TraceMultinode("Processing multinode: ", aMN.begin,aMN.end) ) ;
-    
-    Halfedge_handle h = aMN.begin ;
-    do
-    {
-      Exclude(h->vertex());
-    }
-    while ( h = h->next(), h != aMN.end ) ;
-
-    std::copy(aMN.bisectors_to_remove.begin(), aMN.bisectors_to_remove.end(), std::back_inserter(rBisectorsToRemove));
-    
-    for( Vertex_handle_vector_iterator vi = aMN.nodes_to_remove.begin(), evi = aMN.nodes_to_remove.end() ; vi != evi ; ++ vi )
-      rNodesToRemove.push_back(*vi) ;
-     
-    RelinkBisectorsAroundMultinode(aMN.v,aMN.bisectors_to_relink);    
-  }
-}
-
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::MultinodePtr
-Straight_skeleton_builder_2<Gt,Ss,V>::CreateMultinode( Halfedge_handle begin, Halfedge_handle end )
-{
-  return MultinodePtr( new Multinode(begin,end) );
-}
-
-
-//
-// Finds coincident skeleton nodes and merge them
-//
-// If moving edges Ei,Ej collide with moving edge Ek causing Ej to collapse, Ei and Ek becomes consecutive and a new
-// polygon vertex (Ei,Ek) appears in the wavefront.
-// If moving edges Ei,Ej collide with moving edge Ek causing Ek to be split in two halves, L(Ek) amd R(Ek) resp, two new 
-// polygon vertices appears in the wavefront; namely: (Ei,R(Ek)) and (L(Ek),Ej))
-// If moving edge Ei,Ej collide with both Ek,El simultaneously causing the edges to cross-connect, two new vertices
-// (Ei,Ek) and (El,Ej) appear in the wavefront.
-//
-// In all those 3 cases, each new polygon vertex is represented in the straight skeleton as a skeleton node.
-// Every skeleton node is describing the coallision of at least 3 edges (called the "defining edges" of the node)
-// and it has at least 3 incident bisectors, each one pairing 2 out of the total number of defining egdes. 
-// 
-// Any skeleton node has a degree of at least 3, but if more than 3 edges collide simultaneously, the corresponding
-// skeleton node has a higher degree. (the degree of the node is exactly the number of colliding edges)
-//
-// However, the algorithm handles the coallison of 3 edges at a time so each skeleton node initially created
-// has degree exactly 3 so this function which detects higher degree nodes and merge them into a single node
-// of the proper degree is needed.
-//
-// Two skeleton nodes are "coincident" IFF they have 2 defining edges in common and each triedge of edges collide
-// at the same time and point. IOW, 2 nodes are coincident if they represent the simultaneous 
-// coallison of exactly 4 edges (the union of 2 triedges with 2 common elements is a set of 4).
-//
-template<class Gt, class Ss, class V>
-void Straight_skeleton_builder_2<Gt,Ss,V>::MergeCoincidentNodes()
-{
-  //
-  // NOTE: This code might be executed on a topologically incosistent HDS, thus the need to check
-  // the structure along the way.
-  //
-
-  CGAL_STSKEL_BUILDER_TRACE(0, "Merging coincident nodes...");
-
-  // ALGORITHM DESCRIPTION:
-  //
-  // While circulating the bisectors along the face for edge Ei we find all those edges E* which
-  // are or become consecutive to Ei during the wavefront propagation. Each bisector along the face:
-  // (Ei,Ea), (Ei,Eb), (Ei,Ec), etcc pairs Ei with such other edge.
-  // Between one bisector (Ei,Ea) and the next (Ei,Eb) there is skeleton node which represents
-  // the coallision between the 3 edges (Ei,Ea,Eb).
-  // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), neccesarily
-  // shares two edges (Ei and Eb precisely) with any next skeleton node Ni+1 around the face.
-  // That is, the triedge of defining edges that correspond to each skeleton node around the face follow this
-  // sequence: (Ei,Ea,Eb), (Ei,Eb,Ec), (Ei,Ec,Ed), ...
-  //
-  // Any 2_ consecutive_ skeleton nodes around a face share 2 out of the 3 defining edges, which is one of the 
-  // neccesary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face
-  //
-
-  MultinodeVector lMultinodes ;
-
-  for( Face_iterator fit = mSSkel->SSkel::Base::faces_begin(); fit != mSSkel->SSkel::Base::faces_end(); ++fit)
-  {
-    // 'h' is the first (CCW) skeleton halfedge.
-    Halfedge_handle h = validate(validate(fit->halfedge())->next());
-
-    CGAL_assertion ( h->is_bisector() ) ;
-
-    // 'last' is the last (CCW) skeleton halfedge
-    Halfedge_handle last = validate(fit->halfedge()->prev()) ;
-
-    CGAL_assertion ( last->is_bisector() ) ;
-    CGAL_assertion ( last->vertex()->is_contour() ) ;
-
-    Halfedge_handle h0 = h ;
-    Vertex_handle   v0 = validate(h0->vertex()) ;
-
-    if ( ! v0->has_infinite_time() )
-    {
-      CGAL_assertion ( v0->is_skeleton() ) ;
-
-      h = validate(h->next()) ;
-
-      while ( h != last )
-      {
-        Vertex_handle v = validate(h->vertex());
-
-        if ( ! v->has_infinite_time() )
-        {
-          CGAL_assertion ( v->is_skeleton() ) ;
-          
-          if ( !AreSkeletonNodesCoincident(v0,v) )
-          {
-            if ( h0->next() != h )
-              lMultinodes.push_back( CreateMultinode(h0,h) );
-
-            v0 = v ;
-            h0 = h ;
-          }
-        }
-
-        h = validate(h->next());
-      } 
-
-      if ( h0->next() != h )
-        lMultinodes.push_back( CreateMultinode(h0,h) );
-    }
-  }
-
-  //
-  // The merging loop removes all but one of the coincident skeleton nodes and the halfedges between them.
-  // But it can't physically erase those from the HDS while looping, so the nodes/bisector to erase 
-  // are collected in these sequences are erased after the merging loop.
-  // 
-  Halfedge_handle_vector lBisectorsToRemove ;
-  Vertex_handle_vector   lNodesToRemove ;
-
-  for ( typename MultinodeVector::iterator it = lMultinodes.begin(), eit = lMultinodes.end() ; it != eit ; ++ it )
-    PreprocessMultinode(**it);
-    
-  std::sort(lMultinodes.begin(), lMultinodes.end(), MultinodeComparer());
-    
-  for ( typename MultinodeVector::iterator it = lMultinodes.begin(), eit = lMultinodes.end() ; it != eit ; ++ it )
-    ProcessMultinode(**it,lBisectorsToRemove,lNodesToRemove);
-  
-  for( Halfedge_handle_vector_iterator hi = lBisectorsToRemove.begin(), ehi = lBisectorsToRemove.end() ; hi != ehi ; ++ hi )
-  {
-    CGAL_STSKEL_BUILDER_TRACE(1, "B" << (*hi)->id() << " removed.");
-    (*hi)->HBase_base::reset_id(-1);
-    mSSkel->SSkel::Base::edges_erase(*hi);    
-  }
-    
-  for( Vertex_handle_vector_iterator vi = lNodesToRemove.begin(), evi = lNodesToRemove.end() ; vi != evi ; ++ vi )
-    EraseNode(*vi);
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::FinishUp()
-{
-  CGAL_STSKEL_BUILDER_TRACE(0, "\n\nFinishing up...");
-
-  mVisitor.on_cleanup_started();
-  
-  std::for_each( mSplitNodes.begin()
-                ,mSplitNodes.end  ()
-                ,boost::bind(&Straight_skeleton_builder_2<Gt,Ss,V>::MergeSplitNodes,this,_1)
-               ) ;
-  
-  std::for_each( mDanglingBisectors.begin()
-                ,mDanglingBisectors.end  ()
-                ,boost::bind(&Straight_skeleton_builder_2<Gt,Ss,V>::EraseBisector,this,_1)
-               ) ;
-               
-  MergeCoincidentNodes();             
-
-  mVisitor.on_cleanup_finished();
-
-  return mSSkel->is_valid() ;
-}
-
-template<class Gt, class Ss, class V>
-bool Straight_skeleton_builder_2<Gt,Ss,V>::Run()
-{
-  InitPhase();
-  Propagate();
-  return FinishUp();
-}
-
-template<class Gt, class Ss, class V>
-typename Straight_skeleton_builder_2<Gt,Ss,V>::SSkelPtr Straight_skeleton_builder_2<Gt,Ss,V>::construct_skeleton( bool aNull_if_failed )
-{
-  bool ok = false ;
-  
-  try
-  {
-    ok = Run() ;
-  }
-  catch( std::exception const& e ) 
-  {
-    mVisitor.on_error ( e.what() ) ;
-    CGAL_STSKEL_BUILDER_TRACE(0,"EXCEPTION THROWN (" << e.what() << ") during straight skeleton construction.");
-  }
-  catch(...) 
-  {
-    mVisitor.on_error ( "Unhandled exception" ) ;
-    CGAL_STSKEL_BUILDER_TRACE(0,"UNHANDLED EXCEPTION during straight skeleton construction.");
-  }
-
-  if ( !ok ) 
-  {
-    CGAL_STSKEL_BUILDER_TRACE(0,"Invalid result.");
-    if ( aNull_if_failed )
-      mSSkel = SSkelPtr() ; 
-  }
-
-  mVisitor.on_algorithm_finished(ok);
-  
-  return mSSkel ;
-}
-
-} // end namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh.h
deleted file mode 100644
index ffd91be..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2014 GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Phlipp Moeller
-#ifndef CGAL_TOP_LEVEL_SURFACE_MESH_H
-#define CGAL_TOP_LEVEL_SURFACE_MESH_H
-
-#include "CGAL/Surface_mesh/Surface_mesh_fwd.h"
-#include "CGAL/Surface_mesh/Surface_mesh.h"
-
-#ifdef DOXYGEN_RUNNING
-namespace CGAL {
-
-// fwdS for the public interface
-template<typename K>
-class Surface_mesh;
-
-}
-#endif
-
-#endif /* CGAL_TOP_LEVEL_SURFACE_MESH_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh.h
deleted file mode 100644
index 8b5dbce..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh.h
+++ /dev/null
@@ -1,2792 +0,0 @@
-//=============================================================================
-// Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen
-// Copyright (C) 2011 by Graphics & Geometry Group, Bielefeld University
-// Copyright (C) 2014 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-
-#ifndef CGAL_SURFACE_MESH_H
-#define CGAL_SURFACE_MESH_H
-
-#include <iterator>
-#include <algorithm>
-#include <utility>
-#include <iostream>
-#include <cstddef>
-#include <vector>
-#include <string>
-#include <typeinfo>
-
-#include <boost/cstdint.hpp>
-#include <boost/array.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/fusion/container/map.hpp>
-#include <boost/fusion/include/map.hpp>
-#include <boost/fusion/include/at_key.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/foreach.hpp>
-#include <boost/property_map/property_map.hpp>
-
-#include <CGAL/Iterator_range.h>
-#include <CGAL/circulator.h>
-#include <CGAL/assertions.h>
-#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
-#include <CGAL/Surface_mesh/IO.h>
-//#include <CGAL/Surface_mesh/Properties.h>
-#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
-#include <CGAL/boost/graph/iterator.h>
-
-namespace CGAL {
-  /// \ingroup PkgSurface_mesh
-  /// This class is a data structure that can be used as halfedge data structure or polyhedral
-  /// surface. It is an alternative to the classes `HalfedgeDS` and `Polyhedron_3`
-  /// defined in the packages  \ref PkgHDSSummary and \ref PkgPolyhedronSummary. 
-  /// The main difference is that it is indexed based and not pointer based,
-  /// and that the mechanism for adding information to vertices, halfedges,
-  /// and faces is much simpler and done at runtime and not at compile time.
-  /// When elements are removed, they are only marked as removed, and a garbage
-  /// collection function must be called to really remove them. 
-  /// @tparam P The type of the \em point property of a vertex. There is no requirement on `P`,
-  ///         besides being default constructible and assignable. 
-  ///         In typical use cases it will be a 2D or 3D point type.
-  /// \cgalModels `MutableFaceGraph` and `FaceListGraph`
-
-template <typename P>
-class Surface_mesh
-{
-
-    typedef Surface_mesh<P> Self;
-
-    template<typename>
-    class Handle_iterator;
-public:
-
-
-
-/// \addtogroup PkgSurface_mesh
-///
-/// @{
-
-/// @cond CGAL_DOCUMENT_INTERNALS
-class Base_property_array
-{
-public:
-
-    /// Default constructor
-    Base_property_array(const std::string& name) : name_(name) {}
-
-    /// Destructor.
-    virtual ~Base_property_array() {}
-
-    /// Reserve memory for n elements.
-    virtual void reserve(size_t n) = 0;
-
-    /// Resize storage to hold n elements.
-    virtual void resize(size_t n) = 0;
-
-    /// Free unused memory.
-    virtual void shrink_to_fit() = 0;
-
-    /// Extend the number of elements by one.
-    virtual void push_back() = 0;
-
-    /// Let two elements swap their storage place.
-    virtual void swap(size_t i0, size_t i1) = 0;
-
-    /// Return a deep copy of self.
-    virtual Base_property_array* clone () const = 0;
-
-    /// Return the type_info of the property
-    virtual const std::type_info& type() = 0;
-
-    /// Return the name of the property
-    const std::string& name() const { return name_; }
-
-
-protected:
-
-    std::string name_;
-};
-
-  /// @endcond
-
-
-//== CLASS DEFINITION =========================================================
-
-/// @cond CGAL_DOCUMENT_INTERNALS
-
-template <class T>
-class Property_array : public Base_property_array
-{
-public:
-
-    typedef T                                       value_type;
-    typedef std::vector<value_type>                 vector_type;
-    typedef typename vector_type::reference         reference;
-    typedef typename vector_type::const_reference   const_reference;
-
-    Property_array(const std::string& name, T t=T()) : Base_property_array(name), value_(t) {}
-
-public: // virtual interface of Base_property_array
-
-    virtual void reserve(size_t n)
-    {
-        data_.reserve(n);
-    }
-
-    virtual void resize(size_t n)
-    {
-        data_.resize(n, value_);
-    }
-
-    virtual void push_back()
-    {
-        data_.push_back(value_);
-    }
-
-    virtual void shrink_to_fit()
-    {
-        vector_type(data_).swap(data_);
-    }
-
-    virtual void swap(size_t i0, size_t i1)
-    {
-        T d(data_[i0]);
-        data_[i0]=data_[i1];
-        data_[i1]=d;
-    }
-
-    virtual Base_property_array* clone() const
-    {
-        Property_array<T>* p = new Property_array<T>(this->name_, this->value_);
-        p->data_ = data_;
-        return p;
-    }
-
-    virtual const std::type_info& type() { return typeid(T); }
-
-
-public:
-
-    /// Get pointer to array (does not work for T==bool)
-    const T* data() const
-    {
-        return &data_[0];
-    }
-
-    /// Access the i'th element. No range check is performed!
-    reference operator[](int _idx)
-    {
-        CGAL_assertion( size_t(_idx) < data_.size() );
-        return data_[_idx];
-    }
-
-    /// Const access to the i'th element. No range check is performed!
-    const_reference operator[](int _idx) const
-    {
-        CGAL_assertion( size_t(_idx) < data_.size());
-        return data_[_idx];
-    }
-
-
-
-private:
-    vector_type data_;
-    value_type  value_;
-};
-
-
-#if 0
-// specialization for bool properties
-template <>
-inline const bool*
-Property_array<bool>::data() const
-{
-    CGAL_assertion(false);
-    return NULL;
-}
-#endif 
-
-  /// @endcond
-
-//== CLASS DEFINITION =========================================================
-
-/// @cond CGAL_DOCUMENT_INTERNALS
-
-template<typename>
-class Property_container;
-/// @endcond 
-
-
-
-
-//== CLASS DEFINITION =========================================================
-/// @cond CGAL_DOCUMENT_INTERNALS
-
-template <class, class>
-class Property_map;
-
-template<typename Key>
-class Property_container
-{
-public:
-
-    // default constructor
-    Property_container() : size_(0) {}
-
-    // destructor (deletes all property arrays)
-    virtual ~Property_container() { clear(); }
-
-    // copy constructor: performs deep copy of property arrays
-    Property_container(const Property_container& _rhs) { operator=(_rhs); }
-
-    // assignment: performs deep copy of property arrays
-    Property_container& operator=(const Property_container& _rhs)
-    {
-        if (this != &_rhs)
-        {
-            clear();
-            parrays_.resize(_rhs.n_properties());
-            size_ = _rhs.size();
-            for (unsigned int i=0; i<parrays_.size(); ++i)
-                parrays_[i] = _rhs.parrays_[i]->clone();
-        }
-        return *this;
-    }
-
-    // returns the current size of the property arrays
-    size_t size() const { return size_; }
-
-    // returns the number of property arrays
-    size_t n_properties() const { return parrays_.size(); }
-
-    // returns a vector of all property names
-    std::vector<std::string> properties() const
-    {
-        std::vector<std::string> names;
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            names.push_back(parrays_[i]->name());
-        return names;
-    }
-
-    // add a property with name \c name and default value \c t
-    template <class T>
-    std::pair<Property_map<Key, T>, bool>
-    add(const std::string& name, const T t=T())
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-        {
-            if (parrays_[i]->name() == name)
-            {
-              return std::make_pair(Property_map<Key, T>(dynamic_cast<Property_array<T>*>(parrays_[i])), false);
-            }
-        }
-
-        // otherwise add the property
-        Property_array<T>* p = new Property_array<T>(name, t);
-        p->resize(size_);
-        parrays_.push_back(p);
-        return std::make_pair(Property_map<Key, T>(p), true);
-    }
-
-
-    // get a property by its name. returns invalid property if it does not exist.
-    template <class T> 
-    std::pair<Property_map<Key, T>,bool>
-    get(const std::string& name) const
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            if (parrays_[i]->name() == name)
-              return std::make_pair(Property_map<Key, T>(dynamic_cast<Property_array<T>*>(parrays_[i])), true);
-        return std::make_pair(Property_map<Key, T>(), false);
-    }
-
-
-    // returns a property if it exists, otherwise it creates it first.
-    template <class T> Property_map<Key, T> get_or_add(const std::string& name, const T t=T())
-    {
-      Property_map<Key, T> p;
-      bool b;
-      boost::tie(p,b)= get<T>(name);
-        if (!b) p = add<T>(name, t).first;
-        return p;
-    }
-
-
-    // get the type of property by its name. returns typeid(void) if it does not exist.
-    const std::type_info& get_type(const std::string& name)
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            if (parrays_[i]->name() == name)
-                return parrays_[i]->type();
-        return typeid(void);
-    }
-
-
-    // delete a property
-    template <class T> void remove(Property_map<Key, T>& h)
-    {
-        typename std::vector<Base_property_array*>::iterator it=parrays_.begin(), end=parrays_.end();
-        for (; it!=end; ++it)
-        {
-            if (*it == h.parray_)
-            {
-                delete *it;
-                parrays_.erase(it);
-                h.reset();
-                break;
-            }
-        }
-    }
-
-
-    // delete all properties
-    void clear()
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            delete parrays_[i];
-        parrays_.clear();
-        size_ = 0;
-    }
-
-
-    // reserve memory for n entries in all arrays
-    void reserve(size_t n) const
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            parrays_[i]->reserve(n);
-    }
-
-    // resize all arrays to size n
-    void resize(size_t n)
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            parrays_[i]->resize(n);
-        size_ = n;
-    }
-
-    // free unused space in all arrays
-    void shrink_to_fit() const
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            parrays_[i]->shrink_to_fit();
-    }
-
-    // add a new element to each vector
-    void push_back()
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            parrays_[i]->push_back();
-        ++size_;
-    }
-
-    // swap elements i0 and i1 in all arrays
-    void swap(size_t i0, size_t i1) const
-    {
-        for (unsigned int i=0; i<parrays_.size(); ++i)
-            parrays_[i]->swap(i0, i1);
-    }
-
-
-private:
-    std::vector<Base_property_array*>  parrays_;
-    size_t  size_;
-};
-
-  /// @endcond
-
-#ifndef DOXYGEN_RUNNING
-/// 
-///
-/// `Property_map` enables to attach properties to the simplices of a 
-///  surface mesh.
-/// 
-/// @tparam Key The key type of the property map. It must be a model of `Index`.
-/// @tparam Value The value type of the property.
-///
-/// \cgalModels `LvaluePropertyMap`
-///
-template <class I, class T>
-class Property_map
-/// @cond CGAL_DOCUMENT_INTERNALS
-  : public boost::put_get_helper< 
-           typename Property_array<T>::reference,
-           Property_map< I, T > >
-/// @endcond
-{
-    typedef void (Property_map::*bool_type)() const;
-    void this_type_does_not_support_comparisons() const {}
-public:
-    typedef I key_type;
-    typedef T value_type;
-    typedef boost::lvalue_property_map_tag category;
-
-#ifndef DOXYGEN_RUNNING
-
-    typedef typename Property_array<T>::reference reference;
-
-    typedef typename Property_array<T>::const_reference const_reference;
-#else 
-    /// A reference to the value type of the property.
-  typedef unspecified_type reference;
-
-    /// A const reference to the value type of the property.
-  typedef unspecified_type const_reference;
-#endif
-
-#ifndef DOXYGEN_RUNNING
-    friend class Property_container<I>;
-
-    template <typename K>  friend class Surface_mesh;
-#endif
-
-public:
-/// @cond CGAL_DOCUMENT_INTERNALS
-    Property_map(Property_array<T>* p=NULL) : parray_(p) {}
-
-    void reset()
-    {
-        parray_ = NULL;
-    }
-  /// @endcond 
-
-public:
-    /// \name Accessing Properties
-    //@{
-#ifdef DOXYGEN_RUNNING
-    /// Conversion to a Boolean. It is \c true when the property map
-    /// can be used, and \c false otherwise.  
-  operator bool () const;
-#else
-    operator bool_type() const {
-        return parray_ != NULL ?
-            &Property_map::this_type_does_not_support_comparisons : 0;
-    }
-#endif
-    /// Access the property associated with the key \c i.
-    reference operator[](const I& i)
-    {
-      CGAL_assertion(parray_ != NULL);
-      return (*parray_)[i];
-    }
-
-    /// Access the property associated with the key \c i.
-    reference operator[](const I& i) const
-    {
-      CGAL_assertion(parray_ != NULL);
-      return (*parray_)[i];
-    }
-
-    /// Allows access to the underlying storage of the property. This
-    /// is useful when the key associated with the properties is
-    /// unimportant and only the properties are of interest
-    /// (e.g. rendering).
-    ///
-    /// \returns a pointer to the underlying storage of the property.
-    const T* data() const
-    {
-      CGAL_assertion(parray_ != NULL);
-      return parray_->data();
-    }
-
-    //@}
-private:
-
-    Property_array<T>& array()
-    {
-        CGAL_assertion(parray_ != NULL);
-        return *parray_;
-    }
-
-    const Property_array<T>& array() const
-    {
-        CGAL_assertion(parray_ != NULL);
-        return *parray_;
-    }
-
-    Property_array<T>* parray_;
-};
-
-#endif // DOXYGEN_RUNNING
-
-///@}
-
-
-
-    /// \name Basic Types
-    ///
-    ///@{
-
-    /// The point type.
-    typedef P Point;
-
-    /// The type used to represent an index.
-    typedef boost::uint32_t size_type;
-
-    ///@}
-
-    /// \name Basic Elements
-    ///
-    ///@{
-
-#ifndef DOXYGEN_RUNNING
-    /// Base class for vertex, halfedge, edge, and face index. 
-    ///
-    /// \attention Note that `Index` is not a model of the concept `Handle`,
-    /// because it cannot be dereferenced.
-    /// \sa `Vertex_index`, `Halfedge_index`, `Edge_index`, `Face_index`.
-    template<typename T>
-    class Index
-    {
-    public:
-        /// Constructor. %Default construction creates an invalid index.
-        /// We write -1, which is <a href="http://en.cppreference.com/w/cpp/concept/numeric_limits">
-        /// <tt>std::numeric_limits<size_type>::max()</tt></a>
-        /// as `size_type` is an unsigned type. 
-        explicit Index(size_type _idx=-1) : idx_(_idx) {}
-
-        /// Get the underlying index of this index
-        operator size_type() const { return idx_; }
-
-        /// reset index to be invalid (index=-1)
-        void reset() { idx_=-1; }
-
-        /// return whether the index is valid, i.e., the index is not equal to -1.
-        bool is_valid() const { 
-          size_type inf = -1;
-          return idx_ != inf;
-        }
-
-        /// are two indices equal?
-        bool operator==(const T& _rhs) const {
-            return idx_ == _rhs.idx_;
-        }
-
-        /// are two indices different?
-        bool operator!=(const T& _rhs) const {
-            return idx_ != _rhs.idx_;
-        }
-
-        /// Comparison by index.
-        bool operator<(const T& _rhs) const {
-            return idx_ < _rhs.idx_;
-        }
-
-        /// increments the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// increment.
-        Index& operator++() { ++idx_; return *this; }
-        /// decrements the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// decrement.
-        Index& operator--() { --idx_; return *this; }
-
-        /// increments the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// increment.
-        Index operator++(int) { Index tmp(*this); ++idx_; return tmp; }
-        /// decrements the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// decrement.
-        Index operator--(int) { Index tmp(*this); --idx_; return tmp; }
-    private:
-        size_type idx_;
-    };
-
-#endif
-
-    /// This class represents a vertex.
-    /// \cgalModels `Index`
-    /// \sa `Halfedge_index`, `Edge_index`, `Face_index`
-    class Vertex_index
-#ifndef DOXYGEN_RUNNING
- : public Index<Vertex_index>
-#endif
-    {
-    public:
-        /// %Default constructor.
-        Vertex_index() : Index<Vertex_index>(-1) {}
-
-        explicit Vertex_index(size_type _idx) : Index<Vertex_index>(_idx) {}
-
-        /// prints the index and a short identification string to an ostream.
-        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Vertex_index const& v)
-        {
-          return (os << 'v' << (size_type)v );
-        }
-    };
-
-    /// This class represents a halfedge.
-    /// \cgalModels `Index`
-    /// \sa `Vertex_index`, `Edge_index`, `Face_index`
-    class Halfedge_index
-#ifndef DOXYGEN_RUNNING
-      : public Index<Halfedge_index>
-#endif
-    {
-    public:
-        /// %Default constructor
-        Halfedge_index() : Index<Halfedge_index>(-1) {}
-
-        explicit Halfedge_index(size_type _idx) : Index<Halfedge_index>(_idx) {}
-
-        /// prints the index and a short identification string to an ostream.
-        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Halfedge_index const& h)
-        {
-          return (os << 'h' << (size_type)h );
-        }
-    };
-
-    /// This class represents a face
-    /// \cgalModels `Index`
-    /// \sa `Vertex_index`, `Halfedge_index`, `Edge_index`
-    class Face_index
-#ifndef DOXYGEN_RUNNING
-      : public Index<Face_index>
-#endif
-    {
-    public:
-        /// %Default constructor
-        Face_index() : Index<Face_index>(-1) {}
-
-        explicit Face_index(size_type _idx) : Index<Face_index>(_idx) {}
-
-        /// prints the index and a short identification string to an ostream.
-        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Face_index const& f)
-        {
-          return (os << 'f' << (size_type)f );
-        }
-    };
-
-    /// This class represents an edge.
-    /// \cgalModels `Index`
-    /// \sa `Vertex_index`, `Halfedge_index`, `Face_index`
-    class Edge_index
-    {
-    public:
-        /// %Default constructor
-        Edge_index() : halfedge_(-1) { }
-
-        Edge_index(size_type idx) : halfedge_(idx * 2) { }
-
-        /// constructs an `Edge_index` from a halfedge.
-        Edge_index(Halfedge_index he) : halfedge_(he) { }
-        /// @cond CGAL_DOCUMENT_INTERNALS
-        /// returns the internal halfedge.
-        Halfedge_index halfedge() const { return halfedge_; }
-
-        /// returns the underlying index of this index.
-        operator size_type() const { return (size_type)halfedge_ / 2; }
-
-        /// resets index to be invalid (index=-1)
-        void reset() { halfedge_.reset(); }
-
-        /// returns whether the index is valid, i.e., the index is not equal to -1.
-        bool is_valid() const { return halfedge_.is_valid(); }
-
-        /// Are two indices equal?
-        bool operator==(const Edge_index& other) const { return (size_type)(*this) == (size_type)other; }
-
-        /// Are two indices different?
-        bool operator!=(const Edge_index& other) const { return (size_type)(*this) != (size_type)other; }
-
-        /// compares by index.
-        bool operator<(const Edge_index& other) const { return (size_type)(*this) < (size_type)other;}
-
-        /// decrements the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// decrement.
-        Edge_index& operator--() { halfedge_ = Halfedge_index((size_type)halfedge_ - 2); return *this; }
-
-        /// increments the internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// increment.
-        Edge_index& operator++() { halfedge_ = Halfedge_index((size_type)halfedge_ + 2); return *this; }
-
-        /// decrements internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// decrement.
-        Edge_index operator--(int) { Edge_index tmp(*this); halfedge_ = Halfedge_index((size_type)halfedge_ - 2); return tmp; }
-
-        /// increments internal index. This operation does not
-        /// guarantee that the index is valid or undeleted after the
-        /// increment.
-        Edge_index operator++(int) { Edge_index tmp(*this); halfedge_ = Halfedge_index((size_type)halfedge_ + 2); return tmp; }
-
-        /// @endcond 
-
-        /// prints the index and a short identification string to an ostream.
-        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Edge_index const& e)
-        {
-          return (os << 'e' << (size_type)e << " on " << e.halfedge());
-        }
-    private:
-        Halfedge_index halfedge_;
-    };
-
-
- 
-    ///@}
-private: //-------------------------------------------------- connectivity types
-
-    /// This type stores the vertex connectivity
-    /// \sa `Halfedge_connectivity`, `Face_connectivity`
-    struct Vertex_connectivity
-    {
-        /// an incoming halfedge per vertex (it will be a border halfedge for border vertices)
-        Halfedge_index  halfedge_;
-    };
-
-
-    /// This type stores the halfedge connectivity
-    /// \sa `Vertex_connectivity`, `Face_connectivity`
-    struct Halfedge_connectivity
-    {
-        /// face incident to halfedge
-        Face_index      face_;
-        /// vertex the halfedge points to
-        Vertex_index    vertex_;
-        /// next halfedge within a face (or along a border)
-        Halfedge_index  next_halfedge_;
-        /// previous halfedge within a face (or along a border)
-        Halfedge_index  prev_halfedge_;
-    };
-
-
-    /// This type stores the face connectivity
-    /// \sa `Vertex_connectivity`, `Halfedge_connectivity`
-    struct Face_connectivity
-    {
-        /// a halfedge that is part of the face
-        Halfedge_index  halfedge_;
-    };
-
-private: //------------------------------------------------------ iterator types
-    template<typename Index_>
-    class Index_iterator
-      : public boost::iterator_facade< Index_iterator<Index_>,
-                                       Index_,
-                                       std::bidirectional_iterator_tag
-                                       >
-    {
-        typedef boost::iterator_facade< Index_iterator<Index_>,
-                                        Index_,
-                                        std::bidirectional_iterator_tag
-                                        > Facade;
-    public:
-        Index_iterator() : hnd_(), mesh_(NULL) {}
-        Index_iterator(const Index_& h, const Surface_mesh* m)
-          : hnd_(h), mesh_(m) {
-            if (mesh_ && mesh_->has_garbage())
-              while (mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) ++hnd_;
-        }
-    private:
-        friend class boost::iterator_core_access;
-        void increment()
-        {
-            ++hnd_;
-            CGAL_assertion(mesh_ != NULL);
-            while (mesh_->has_garbage() && mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) ++hnd_;
-        }
-
-        void decrement()
-        {
-            --hnd_;
-            CGAL_assertion(mesh_ != NULL);
-            while (mesh_->has_garbage() && mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) --hnd_;
-        }
-
-        bool equal(const Index_iterator& other) const
-        {
-            return this->hnd_ == other.hnd_;
-        }
-
-        Index_& dereference() const { return const_cast<Index_&>(hnd_); }
-
-        Index_ hnd_;
-        const Surface_mesh* mesh_;
-    };
-public:
-    /// \name Range Types
-    ///
-    /// Each range `R` in this section has a nested type `R::iterator`, 
-    /// is convertible to `std:pair<R::iterator,R::iterator>`, so that one can use `boost::tie()`,
-    /// and can be used with `BOOST_FOREACH()`, as well as with the C++11 range based for-loop.
-
-    ///@{
-
-#ifndef DOXYGEN_RUNNING
-    typedef Index_iterator<Vertex_index> Vertex_iterator;
-#endif
-
-    /// \brief The range over all vertex indices.
-    ///
-    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Vertex_index`.
-    /// \sa `vertices()`
-    /// \sa `Halfedge_range`, `Edge_range`, `Face_range`
-#ifdef DOXYGEN_RUNNING
-    typedef unspecified_type Vertex_range;
-#else
-    typedef Iterator_range<Vertex_iterator> Vertex_range;
-#endif
-
-#ifndef DOXYGEN_RUNNING
-    typedef Index_iterator<Halfedge_index> Halfedge_iterator;
-#endif
-
-    /// \brief The range over all halfedge indices.
-    ///
-    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Halfedge_index`.
-    /// \sa `halfedges()`
-    /// \sa `Vertex_range`, `Edge_range`, `Face_range`
-#ifdef DOXYGEN_RUNNING
-    typedef unspecified_type Halfedge_range;
-#else
-    typedef Iterator_range<Halfedge_iterator> Halfedge_range;
-#endif
-
-#ifndef DOXYGEN_RUNNING
-    typedef Index_iterator<Edge_index> Edge_iterator;
-#endif
-
-    /// \brief The range over all edge indices.
-    ///
-    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Edge_index`.
-    /// \sa `edges()`
-    /// \sa `Halfedge_range`, `Vertex_range`, `Face_range`
-#ifdef DOXYGEN_RUNNING
-    typedef unspecified_type Edge_range;
-#else
-    typedef Iterator_range<Edge_iterator> Edge_range;
-#endif
-
-
-#ifndef DOXYGEN_RUNNING
-    typedef Index_iterator<Face_index> Face_iterator;
-#endif
-    /// \brief The range over all face indices.
-    ///
-    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Face_index`.
-    /// \sa `faces()`
-    /// \sa `Vertex_range`, `Halfedge_range`, `Edge_range`
- #ifdef DOXYGEN_RUNNING
-    typedef unspecified_type Face_range;
-#else
-   typedef Iterator_range<Face_iterator> Face_range;
-#endif
-
-#ifndef DOXYGEN_RUNNING 
-
-  typedef CGAL::Vertex_around_target_iterator<Surface_mesh> Vertex_around_target_iterator;
-  typedef Iterator_range<Vertex_around_target_iterator> Vertex_around_target_range;
-
-  typedef CGAL::Halfedge_around_target_iterator<Surface_mesh>  Halfedge_around_target_iterator;
-  typedef Iterator_range<Halfedge_around_target_iterator> Halfedge_around_target_range;
-
-  typedef CGAL::Face_around_target_iterator<Surface_mesh>  Face_around_target_iterator;
-  typedef Iterator_range<Face_around_target_iterator> Face_around_target_range;
-
-  typedef CGAL::Vertex_around_face_iterator<Surface_mesh>  Vertex_around_face_iterator;
-  typedef Iterator_range<Vertex_around_face_iterator> Vertex_around_face_range;
-
-  typedef CGAL::Halfedge_around_face_iterator<Surface_mesh>  Halfedge_around_face_iterator;
-  typedef Iterator_range<Halfedge_around_face_iterator> Halfedge_around_face_range;
-
-  typedef CGAL::Face_around_face_iterator<Surface_mesh>  Face_around_face_iterator;
-  typedef Iterator_range<Face_around_face_iterator> Face_around_face_range;
-#endif
-
-    /// @cond CGAL_BEGIN_END
-    /// Start iterator for vertices.
-    Vertex_iterator vertices_begin() const
-    {
-        return Vertex_iterator(Vertex_index(0), this);
-    }
-
-    /// End iterator for vertices.
-    Vertex_iterator vertices_end() const
-    {
-        return Vertex_iterator(Vertex_index(num_vertices()), this);
-    }
-    /// @endcond
-
-
-    /// returns the iterator range of the vertices of the mesh.
-    Vertex_range vertices() const {
-      return make_range(vertices_begin(), vertices_end());
-    }
-
-
-    /// @cond CGAL_BEGIN_END
-    /// Start iterator for halfedges.
-    Halfedge_iterator halfedges_begin() const
-    {
-        return Halfedge_iterator(Halfedge_index(0), this);
-    }
-
-    /// End iterator for halfedges.
-    Halfedge_iterator halfedges_end() const
-    {
-        return Halfedge_iterator(Halfedge_index(num_halfedges()), this);
-    }
-    /// @endcond
-
-
-    /// returns the iterator range of the halfedges of the mesh.
-    Halfedge_range halfedges() const {
-      return make_range(halfedges_begin(), halfedges_end());
-    }
-
-
-    /// @cond CGAL_BEGIN_END
-    /// Start iterator for edges.
-    Edge_iterator edges_begin() const
-    {
-        return Edge_iterator(Edge_index(0), this);
-    }
-
-    /// End iterator for edges.
-    Edge_iterator edges_end() const
-    {
-        return Edge_iterator(Edge_index(num_edges()), this);
-    }
-    /// @endcond
-
-
-    /// returns the iterator range of the edges of the mesh.
-    Edge_range edges() const
-    {
-        return make_range(edges_begin(), edges_end());
-    }
-
-
-    /// @cond CGAL_BEGIN_END
-    /// Start iterator for faces.
-    Face_iterator faces_begin() const
-    {
-        return Face_iterator(Face_index(0), this);
-    }
-
-    /// End iterator for faces.
-    Face_iterator faces_end() const
-    {
-        return Face_iterator(Face_index(num_faces()), this);
-    }
-    /// @endcond
-
-    /// returns the iterator range of the faces of the mesh.
-    Face_range faces() const {
-      return make_range(faces_begin(), faces_end());
-    }
-
-#ifndef DOXYGEN_RUNNING
-    /// returns the iterator range for vertices around vertex `target(h)`, starting at `source(h)`.
-    Vertex_around_target_range vertices_around_target(Halfedge_index h) const
-    {
-      return CGAL::vertices_around_target(h,*this);
-    }
-
-    /// returns the iterator range for incoming halfedges around vertex `target(h)`, starting at `h`.
-    Halfedge_around_target_range halfedges_around_target(Halfedge_index h) const
-    {
-      return CGAL::halfedges_around_target(h,*this);
-    }
-
-    /// returns the iterator range for faces around vertex `target(h)`, starting at `face(h)`.
-    Face_around_target_range faces_around_target(Halfedge_index h) const
-    {
-      return CGAL::faces_around_target(h,*this);
-    }
-
-    /// returns the iterator range for vertices around face `face(h)`, starting at `target(h)`.
-    Vertex_around_face_range vertices_around_face(Halfedge_index h) const
-     {
-       return CGAL::vertices_around_face(h,*this);
-     }
-
-    /// returns the iterator range for halfedges around face `face(h)`, starting at `h`.
-    Halfedge_around_face_range halfedges_around_face(Halfedge_index h) const
-    {
-      return CGAL::halfedges_around_face(h,*this);
-    }
-
-    /// returns the iterator range for halfedges around face `face(h)`, starting at `h`.
-    Face_around_face_range faces_around_face(Halfedge_index h) const
-    {
-       return CGAL::faces_around_face(h,*this);
-    }
-
-#endif
-
-    ///@}
-
-
-public: 
-
-#ifndef DOXYGEN_RUNNING
-    /// \name Circulator Types
-    ///
-    /// The following circulators enable to iterate through the elements around a face or vertex.
-    /// As explained in the \ref SurfaceMeshOrientation "User Manual", we can speak of a  
-    /// *clockwise* or *counterclockwise*
-    /// traversal, by looking at the surface from the right side.  
-    ///@{
-
-    /// \brief This class circulates clockwise through all 
-    /// one-ring neighbors of a vertex. 
-    ///  A model of `BidirectionalCirculator` with value type `Vertex_index`.
-    /// \sa `Halfedge_around_target_circulator`, `Face_around_target_circulator`
-
-  typedef CGAL::Vertex_around_target_circulator<Surface_mesh> Vertex_around_target_circulator;
-
-
-
-    /// \brief This class circulates clockwise through all incident faces of a vertex.
-    ///  A model of `BidirectionalCirculator` with value type `Face_index`.
-    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
-
-  typedef CGAL::Face_around_target_circulator<Surface_mesh> Face_around_target_circulator;
-
-
-    /// \brief This class circulates clockwise through all halfedges around a vertex that have this vertex as target.
-    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
-    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
-
-  typedef CGAL::Halfedge_around_target_circulator<Surface_mesh> Halfedge_around_target_circulator;
-
-
-    /// \brief This class circulates clockwise through all halfedges around a vertex that have this vertex as source.
-    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
-    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
-
-  typedef CGAL::Halfedge_around_source_circulator<Surface_mesh> Halfedge_around_source_circulator;
-
-    /// \brief This class circulates counterclockwise through all vertices around a face.
-    ///  A model of `BidirectionalCirculator` with value type `Vertex_index`.
-
-  typedef  CGAL::Vertex_around_face_circulator<Surface_mesh> Vertex_around_face_circulator;
-
-
-    /// \brief This class circulates counterclockwise through all halfedges around a face.
-    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
-
-  typedef  CGAL::Halfedge_around_face_circulator<Surface_mesh> Halfedge_around_face_circulator;
-
-   /// \brief This class circulates counterclockwise through all faces around a face.
-   ///  A model of `BidirectionalCirculator` with value type `Face_index`.
-   ///  Note that the face index is the same after `operator++`, if the neighboring faces share 
-   ///  several halfedges.
-
-  typedef  CGAL::Face_around_face_circulator<Surface_mesh> Face_around_face_circulator;
-  /// @}
-#endif
-
-  /// @cond CGAL_DOCUMENT_INTERNALS
-  // typedefs which make it easier to write the partial specialisation of boost::graph_traits
-
-  typedef Vertex_index   vertex_index;
-  typedef P                   vertex_property_type;
-  typedef Halfedge_index halfedge_index;
-  typedef Edge_index     edge_index;
-  typedef Face_index     face_index;
-
-  typedef Vertex_iterator     vertex_iterator;
-  typedef Halfedge_iterator   halfedge_iterator;
-  typedef Edge_iterator       edge_iterator;
-  typedef Face_iterator      face_iterator;
-  typedef CGAL::Out_edge_iterator<Self>     out_edge_iterator;
-
-  typedef boost::undirected_tag             directed_category;
-  typedef boost::disallow_parallel_edge_tag edge_parallel_category; 
-
-  struct traversal_category : public virtual boost::bidirectional_graph_tag,
-                              public virtual boost::vertex_list_graph_tag,
-                              public virtual boost::edge_list_graph_tag
-  {};
-
-  typedef size_type vertices_size_type;
-  typedef size_type halfedges_size_type;
-  typedef size_type edges_size_type;
-  typedef size_type faces_size_type;
-  typedef size_type degree_size_type;
-
- /// @endcond
-public:
-
-    /// \name Construction, Destruction, Assignment
-    ///
-    ///  Copy constructors as well as assignment do also copy simplices marked as removed.
-    ///@{
-
-    /// %Default constructor.
-    Surface_mesh();
-
-    /// Copy constructor: copies `rhs` to `*this`. Performs a deep copy of all properties.
-    Surface_mesh(const Surface_mesh& rhs) { *this = rhs; }
-
-    /// assigns `rhs` to `*this`. Performs a deep copy of all properties.
-    Surface_mesh& operator=(const Surface_mesh& rhs);
-
-    /// assigns `rhs` to `*this`. Does not copy custom properties.
-    Surface_mesh& assign(const Surface_mesh& rhs);
-
-    ///@}
-
-public:
-
-    /// \name Adding Vertices, Edges, and Faces
-    ///@{
-
-   /// adds a new vertex, and resizes vertex properties if necessary.
-    Vertex_index add_vertex()
-    {
-      size_type inf = -1;
-      if(vertices_freelist_ != inf){
-        size_type idx = vertices_freelist_;
-        vertices_freelist_ = (size_type)vconn_[Vertex_index(vertices_freelist_)].halfedge_;
-        --removed_vertices_;
-        vremoved_[Vertex_index(idx)] = false;
-        return Vertex_index(idx);
-      } else {
-        vprops_.push_back();
-        return Vertex_index(num_vertices()-1);
-      }
-    }
-
-    /// adds a new vertex, resizes vertex properties if necessary,
-    /// and sets the \em point property to `p`.
-    /// \note Several vertices may have the same point property.
-    Vertex_index add_vertex(const Point& p) 
-    {
-        Vertex_index v = add_vertex();
-        vpoint_[v] = p;
-        return v;
-    }
-
-
-
-public:
-
-    /// adds a new edge, and resizes edge and halfedge properties if necessary.
-    Halfedge_index add_edge()
-    {
-      Halfedge_index h0, h1;
-      size_type inf = -1;
-      if(edges_freelist_ != inf){
-        size_type idx = edges_freelist_;
-        edges_freelist_ = (size_type)hconn_[Halfedge_index(edges_freelist_)].next_halfedge_;
-        --removed_edges_;
-        eremoved_[Edge_index(Halfedge_index(idx))] = false;
-        return Halfedge_index(idx);
-      } else {
-        eprops_.push_back();
-        hprops_.push_back();
-        hprops_.push_back();
-
-        return Halfedge_index(num_halfedges()-2);
-      }
-    }
-
-    /// adds two opposite halfedges, and resizes edge and halfedge properties if necessary.
-    /// Sets the targets of the halfedge to the given vertices, but does not modify the halfedge
-    /// associated to the vertices.
-    /// \note The function does not check whether there is already an edge between the vertices.
-    /// \returns the halfedge with `v1` as target
-
-    Halfedge_index add_edge(Vertex_index v0, Vertex_index v1)
-    {
-        CGAL_assertion(v0 != v1);
-        Halfedge_index h = add_edge();
-
-        set_target(h, v1);
-        set_target(opposite(h), v0);
-
-        return h;
-    }
-
-    /// adds a new face, and resizes face properties if necessary.
-    Face_index add_face()
-    {
-      size_type inf = -1;
-      if(faces_freelist_ != inf){
-        size_type idx = faces_freelist_;
-        faces_freelist_ = (size_type)fconn_[Face_index(faces_freelist_)].halfedge_;
-        --removed_faces_;
-        fremoved_[Face_index(idx)] = false;
-        return Face_index(idx);
-      } else {
-        fprops_.push_back();
-        return Face_index(num_faces()-1);
-      }
-    }
-
-    /// if possible, adds a new face with vertices from a range with value type `Vertex_index`.
-    /// The function adds halfedges between successive vertices if they are not yet indicent to halfedges,
-    /// or updates the connectivity of halfedges already in place. 
-    /// Resizes halfedge, edge, and face properties if necessary.
-    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
-    template <typename Range>
-    Face_index add_face(const Range& vertices);
-
-
-    /// adds a new triangle connecting vertices `v0`, `v1`, `v2`.
-    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
-    Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2)
-    {
-        boost::array<Vertex_index, 3> 
-            v = {{v0, v1, v2}};
-        return add_face(v);
-    }
-
-    /// adds a new quad connecting vertices `v0`, `v1`, `v2`, `v3`.
-    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
-    Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2, Vertex_index v3)
-    {
-        boost::array<Vertex_index, 4> 
-            v = {{v0, v1, v2, v3}};
-        return add_face(v);
-    }
-
-    ///@}
-
-
- 
-    /// \name Low-Level Removal Functions 
-    ///
-    /// Although the elements are only marked as removed
-    /// their connectivity and properties should not be used.
-    ///
-    /// \warning Functions in this group do not adjust any of
-    /// connected elements and usually leave the surface mesh in an
-    /// invalid state.
-    /// 
-    ///
-    /// @{
-
-    /// removes vertex `v` from the halfedge data structure without
-    /// adjusting anything.
-    void remove_vertex(Vertex_index v)
-    {
-        vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
-        vremoved_[v] = true; ++removed_vertices_; garbage_ = true;
-        vconn_[v].halfedge_ = Halfedge_index(vertices_freelist_);
-        vertices_freelist_ = (size_type)v;
-    }
-
-    /// removes the two halfedges corresponding to `e` from the halfedge data structure without
-    /// adjusting anything.
-    void remove_edge(Edge_index e)
-    {
-        eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
-        eremoved_[e] = true; ++removed_edges_; garbage_ = true;
-        hconn_[Halfedge_index((size_type)e << 1)].next_halfedge_ = Halfedge_index(edges_freelist_ );
-        edges_freelist_ = ((size_type)e << 1);
-    }
-
-    /// removes  face `f` from the halfedge data structure without
-    /// adjusting anything.
-
-    void remove_face(Face_index f)
-    {
-        fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
-        fremoved_[f] = true; ++removed_faces_; garbage_ = true;
-        fconn_[f].halfedge_ = Halfedge_index(faces_freelist_);
-        faces_freelist_ = (size_type)f;
-    }
-
-
-    ///@}
-
-
-    /// \name Memory Management
-    ///
-    /// Functions to check the number of elements, the amount of space
-    /// allocated for elements, and to clear the structure.
-    ///@{
-
-  /// returns the number of vertices in the mesh.
-  size_type number_of_vertices() const
-  {
-    return num_vertices() - number_of_removed_vertices();
-  }
- 
-  /// returns the number of halfedges in the mesh.
-  size_type number_of_halfedges() const
-  {
-    return num_halfedges() - number_of_removed_halfedges();
-  }
-
-  /// returns the number of edges in the mesh.
-  size_type number_of_edges() const
-  {
-    return num_edges() - number_of_removed_edges();
-  }
-
-  /// returns the number of faces in the mesh.
-  size_type number_of_faces() const
-  {
-    return num_faces() - number_of_removed_faces();
-  }
-
-    /// returns `true` iff the mesh is empty, i.e., has no vertices, halfedges and faces.
-    bool is_empty() const
-  {
-    return ( num_vertices() == number_of_removed_vertices()
-             && num_halfedges() == number_of_removed_halfedges()
-             && num_faces() == number_of_removed_faces());
-  }
-
-    /// removes all vertices, halfedge, edges and faces. Collects garbage and clears all properties.
-    void clear();
-
- 
-    /// reserves space for vertices, halfedges, edges, faces, and their currently
-    /// associated properties.
-    void reserve(size_type nvertices,
-                 size_type nedges,
-                 size_type nfaces )
-    {
-        vprops_.reserve(nvertices);
-        hprops_.reserve(2*nedges);
-        eprops_.reserve(nedges);
-        fprops_.reserve(nfaces);
-    }
-
-
-    ///@}
-
-    
-    /// \name Garbage Collection
-    ///
-    /// While removing elements only marks them as removed
-    /// garbage collection really removes them.
-    /// The API in this section allows to check whether 
-    /// an element is removed, to get the number of
-    /// removed elements, and to collect garbage.
-    /// The number of elements together with the number of  removed elements is
-    /// an upperbound on the index, and is needed
-    /// by algorithms that temporarily store a 
-    /// property in a vector of the appropriate size.
-    /// Note however that by garbage collecting elements get new indices.
-    /// In case you store indices in an auxiliary data structure
-    /// or in a property these indices are potentially no longer 
-    /// refering to the right elements. 
-
-
-    ///@{
-#ifndef DOXYGEN_RUNNING
-   /// returns the number of used and removed vertices in the mesh.
-    size_type num_vertices() const { return (size_type) vprops_.size(); }
-
-    /// returns the number of used and removed halfedges in the mesh.
-    size_type num_halfedges() const { return (size_type) hprops_.size(); }
-
-    /// returns the number of used and removed edges in the mesh.
-    size_type num_edges() const { return (size_type) eprops_.size(); }
-
-    /// returns the number of used and removed faces in the mesh.
-    size_type num_faces() const { return (size_type) fprops_.size(); }
-
-#endif
-
-    /// returns the number of vertices in the mesh which are marked removed.
-    size_type number_of_removed_vertices() const { return removed_vertices_; }
-
-    /// returns the number of halfedges in the mesh which are marked removed.
-    size_type number_of_removed_halfedges() const { return 2*removed_edges_; }
-
-    /// returns the number of edges in the mesh which are marked removed.
-    size_type number_of_removed_edges() const { return removed_edges_; }
-
-    /// returns the number offaces in the mesh which are marked removed.
-    size_type number_of_removed_faces() const { return removed_faces_; }
-
-
-
-    /// returns whether vertex `v` is marked removed.
-    /// \sa `collect_garbage()`
-    bool is_removed(Vertex_index v) const
-    {
-        return vremoved_[v];
-    }
-    /// returns whether halfedge `h` is marked removed.
-    /// \sa `collect_garbage()`
-    bool is_removed(Halfedge_index h) const
-    {
-        return eremoved_[edge(h)];
-    }
-    /// returns whether edge `e` is marked removed.
-    /// \sa `collect_garbage()`
-    bool is_removed(Edge_index e) const
-    {
-        return eremoved_[e];
-    }
-    /// returns whether face `f` is marked removed.
-    /// \sa `collect_garbage()`
-    bool is_removed(Face_index f) const
-    {
-        return fremoved_[f];
-    }
-
-    /// checks if any vertices, halfedges, edges, or faces are marked as removed.
-    /// \sa collect_garbage
-    bool has_garbage() const { return garbage_; }
-
-    /// really removes vertices, halfedges, edges, and faces which are marked removed.
-    /// \sa `has_garbage()`
-    /// \attention By garbage collecting elements get new indices.
-    /// In case you store indices in an auxiliary data structure
-    /// or in a property these indices are potentially no longer 
-    /// refering to the right elements. 
-    void collect_garbage();
-
-
-    /// @cond CGAL_DOCUMENT_INTERNALS
-    /// removes unused memory from vectors. This shrinks the storage
-    /// of all properties to the minimal required size.
-    /// \attention Invalidates all existing references to properties.
-
-    void shrink_to_fit()
-    {
-        vprops_.shrink_to_fit();
-        hprops_.shrink_to_fit();
-        eprops_.shrink_to_fit();
-        fprops_.shrink_to_fit();
-    }
-    /// @endcond
-
-    ///@}
-
-    /// @cond CGAL_DOCUMENT_INTERNALS
-    ///
-    /// \name Simple Validity Checks
-    ///
-    /// Functions in this group check if the index is valid, that is between
-    /// `0` and the currently allocated maximum amount of the
-    /// elements. They do not check if an element is marked as removed.
-    ///@{
-
-    /// returns whether the index of vertex `v` is valid, that is within the current array bounds.
-    bool has_valid_index(Vertex_index v) const
-    {
-      return ((size_type)v < num_vertices());
-    }
-    /// returns whether the index of halfedge `h` is valid, that is within the current array bounds.
-    bool has_valid_index(Halfedge_index h) const
-    {
-      return ((size_type)h < num_halfedges());
-    }
-    /// returns whether the index of edge `e` is valid, that is within the current array bounds.
-    bool has_valid_index(Edge_index e) const
-    {
-      return ((size_type)e < num_edges());
-    }
-    /// returns whether the index of face `f` is valid, that is within the current array bounds.
-    bool has_valid_index(Face_index f) const
-    {
-        return ((size_type)f < num_faces());
-    }
-
-    /// @}
-    /// @endcond
-    
-    /// \name Validity Checks
-    ///
-    /// Functions in this group perform checks for structural
-    /// consistency of a complete surface mesh, or an individual element. 
-    /// They are expensive and should only be used in debug configurations.
-
-    ///@{
-
-    /// perform an expensive validity check on the data structure and
-    /// print found errors to `std::cerr` when `verbose == true`.
-  bool is_valid(bool verbose = true) const
-    {
-        bool valid = true;
-        for(Halfedge_iterator it = halfedges_begin(); it != halfedges_end(); ++it) { 
-            valid = valid && next(*it).is_valid();
-            valid = valid && opposite(*it).is_valid();
-            if(!valid) {
-                if (verbose)
-                  std::cerr << "Integrity of halfedge " << *it << " corrupted."  << std::endl;
-                break;
-            }
-
-            valid = valid && (opposite(*it) != *it);
-            valid = valid && (opposite(opposite(*it)) == *it);
-            if(!valid) {
-              if (verbose)
-                std::cerr << "Integrity of opposite halfedge of " << *it << " corrupted."  << std::endl;
-                break;
-            }
-
-            valid = valid && (next(prev(*it)) == *it);
-            if(!valid) {
-                if (verbose)
-                  std::cerr << "Integrity of previous halfedge of " << *it << " corrupted."  << std::endl;
-                break;
-            }
-
-            valid = valid && (prev(next(*it)) == *it);
-            if(!valid) {
-                if (verbose)
-                  std::cerr << "Integrity of next halfedge of " << *it << " corrupted."  << std::endl;
-                break;
-            }
-
-            valid = valid && target(*it).is_valid();
-            if(!valid) {
-                if (verbose)
-                  std::cerr << "Integrity of vertex of halfedge " << *it << " corrupted."  << std::endl;
-                break;
-            }
-
-            valid = valid && (target(*it) == target(opposite(next(*it))));
-            if(!valid) {
-                if (verbose)
-                  std::cerr << "Halfedge vertex of next opposite is not the same for " << *it << "."  << std::endl;
-                break;
-            }
-        }
-
-        for(Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) { 
-            if(halfedge(*it).is_valid()) {
-                // not an isolated vertex
-                valid = valid && (target(halfedge(*it)) == *it);
-                if(!valid) {
-                    if (verbose)
-                      std::cerr << "Halfedge of " << *it << " is not an incoming halfedge." << std::endl;
-                    break;
-                }
-            }
-        }
-
-
-        return valid;
-    }
-
-    /// performs a validity check on a single vertex.
-    bool is_valid(Vertex_index v) const {
-        Halfedge_index h = vconn_[v].halfedge_;
-        if(h!= null_halfedge() && (!has_valid_index(h) || is_removed(h))) {
-          std::cerr << "Vertex connectivity halfedge error in " << (size_type)v
-                    << " with " << (size_type)h << std::endl;
-            return false;
-        }
-        return true;
-    }
-
-    /// performs a validity check on a single halfedge.
-    bool is_valid(Halfedge_index h) const {
-        Face_index f = hconn_[h].face_;
-        Vertex_index v = hconn_[h].vertex_;
-        Halfedge_index hn = hconn_[h].next_halfedge_;
-        Halfedge_index hp = hconn_[h].prev_halfedge_;
-
-        bool valid = true;
-        // don't validate the face if this is a border halfedge
-        if(!is_border(h)) {
-            if(!has_valid_index(f) || is_removed(f)) {
-                std::cerr << "Halfedge connectivity Face "
-                          << (!has_valid_index(f) ? "invalid" : "removed")
-                          << " in " << (size_type)h << std::endl;
-                valid = false;
-            }
-        }
-
-        if(!has_valid_index(v) || is_removed(v)) {
-            std::cerr << "Halfedge connectivity Vertex "
-                      << (!has_valid_index(v) ? "invalid" : "removed")
-                      << " in " << (size_type)h << std::endl;
-            valid = false;
-        }
-
-        if(!has_valid_index(hn) || is_removed(hn)) {
-            std::cerr << "Halfedge connectivity hnext "
-                      << (!has_valid_index(hn) ? "invalid" : "removed")
-                      << " in " << (size_type)h << std::endl;
-            valid = false;
-        }
-        if(!has_valid_index(hp) || is_removed(hp)) {
-            std::cerr << "Halfedge connectivity hprev "
-                      << (!has_valid_index(hp) ? "invalid" : "removed")
-                      << " in " << (size_type)h << std::endl;
-            valid = false;
-        }
-        return valid;
-    }
-
-
-    /// performs a validity check on a single ede.
-    bool is_valid(Edge_index e) const {
-      Halfedge_index h = halfedge(e);
-      return is_valid(h) && is_valid(opposite(h));
-    }
-
-
-    /// performs a validity check on a single face.
-    bool is_valid(Face_index f) const {
-        Halfedge_index h = fconn_[f].halfedge_;
-        if(!has_valid_index(h) || is_removed(h)) {
-          std::cerr << "Face connectivity halfedge error in " << (size_type)f
-                      << " with " << (size_type)h << std::endl;
-            return false;
-        }
-        return true;
-    }
-
-    ///@}
-
-
-
-    /// \name Low-Level Connectivity
-    ///@{
-
-    /// returns the vertex the halfedge `h` points to.
-    Vertex_index target(Halfedge_index h) const
-    {
-        return hconn_[h].vertex_;
-    }
-
-    /// sets the vertex the halfedge `h` points to to `v`.
-    void set_target(Halfedge_index h, Vertex_index v)
-    {
-        hconn_[h].vertex_ = v;
-    }
-
-    /// returns the face incident to halfedge `h`.
-    Face_index face(Halfedge_index h) const
-    {
-        return hconn_[h].face_;
-    }
-
-    /// sets the incident face to halfedge `h` to `f`.
-    void set_face(Halfedge_index h, Face_index f)
-    {
-        hconn_[h].face_ = f;
-    }
-
-    /// returns the next halfedge within the incident face.
-    Halfedge_index next(Halfedge_index h) const
-    {
-        return hconn_[h].next_halfedge_;
-    }
-
-    /// returns the previous halfedge within the incident face.
-    Halfedge_index prev(Halfedge_index h) const
-    {
-        return hconn_[h].prev_halfedge_;
-    }
-
-    /// @cond CGAL_DOCUMENT_INTERNALS
-    // sets the next halfedge of `h` within the face to `nh`.
-    void set_next_only(Halfedge_index h, Halfedge_index nh)
-    {
-      hconn_[h].next_halfedge_ = nh;
-    }
-
-    // sets previous halfedge of `h` to `nh`.
-    void set_prev_only(Halfedge_index h, Halfedge_index nh)
-    {
-      if(h != null_halfedge()){
-        hconn_[h].prev_halfedge_ = nh;
-      }
-    }
-    /// @endcond  
-
-    /// sets the next halfedge of `h` within the face to `nh` and
-    /// the previous halfedge of `nh` to `h`.
-    void set_next(Halfedge_index h, Halfedge_index nh)
-    {
-      set_next_only(h, nh);
-      set_prev_only(nh, h);
-    }
-
-    /// returns an incoming halfedge of vertex `v`.
-    /// If `v` is a border vertex this will be a border halfedge.
-    /// \invariant `target(halfedge(v)) == v`
-    Halfedge_index halfedge(Vertex_index v) const
-    {
-        return vconn_[v].halfedge_;
-    }
-
-    /// sets the incoming halfedge of vertex `v` to `h`.
-    void set_halfedge(Vertex_index v, Halfedge_index h)
-    {
-        vconn_[v].halfedge_ = h;
-    }
-
-
-    /// returns a halfedge of face `f`.
-    Halfedge_index halfedge(Face_index f) const
-    {
-        return fconn_[f].halfedge_;
-    }
-
-    /// sets the halfedge of face `f` to `h`.
-    void set_halfedge(Face_index f, Halfedge_index h)
-    {
-        fconn_[f].halfedge_ = h;
-    }
-
-    /// returns the opposite halfedge of `h`. Note that there is no function `set_opposite()`.
-    Halfedge_index opposite(Halfedge_index h) const
-    {
-        return Halfedge_index(((size_type)h & 1) ? (size_type)h-1 : (size_type)h+1);
-    }
-
-    ///@}
-
-    /// \name Low-Level Connectivity Convenience Functions
-    ///@{
-
-    /// returns the vertex the halfedge `h` emanates from.
-    Vertex_index source(Halfedge_index h) const
-    {
-        return target(opposite(h));
-    }
-
-    /// returns `opposite(next(h))`, that is the next halfedge \ref SurfaceMeshOrientation 
-    /// "clockwise" around the target vertex of `h`.
-    Halfedge_index next_around_target(Halfedge_index h) const
-    {
-        return opposite(next(h));
-    }
-
-    /// returns `prev(opposite(h))`, that is the previous halfedge \ref SurfaceMeshOrientation
-    /// "clockwise" around the target vertex of `h`.
-    Halfedge_index prev_around_target(Halfedge_index h) const
-    {
-        return prev(opposite(h));
-    }
-
-    /// returns `next(opposite(h))`, that is the next halfedge \ref SurfaceMeshOrientation 
-    /// "clockwise" around the source vertex of `h`.
-    Halfedge_index next_around_source(Halfedge_index h) const
-    {
-        return next(opposite(h));
-    }
-
-    /// returns `opposite(prev(h))`, that is the previous halfedge \ref SurfaceMeshOrientation
-    /// "clockwise" around the source vertex of `h`.
-    Halfedge_index prev_around_source(Halfedge_index h) const
-    {
-        return opposite(prev(h));
-    }
-
-    /// returns the i'th vertex of edge `e`, for `i=0` or `1`.
-    Vertex_index vertex(Edge_index e, unsigned int i) const
-    {
-        CGAL_assertion(i<=1);
-        return target(halfedge(e, i));
-    }
-
-    /// finds a halfedge between two vertices. Returns a default constructed
-    /// `Halfedge_index`, if  `source` and  `target` are not connected.
-    Halfedge_index halfedge(Vertex_index source, Vertex_index target) const;
-
-    ///@}
-
-
-    /// \name Switching between Halfedges and Edges
-    ///@{
-
-    /// returns the edge that contains halfedge `h` as one of its two halfedges.
-    Edge_index edge(Halfedge_index h) const
-    {
-        return Edge_index(h);
-    }
-
-    /// returns the halfedge corresponding to the edge `e`.
-    Halfedge_index halfedge(Edge_index e) const
-    {
-        return Halfedge_index(e.halfedge());
-    }
-
-    /// returns the i'th halfedge of edge `e`, for `i=0` or `1`.
-    Halfedge_index halfedge(Edge_index e, unsigned int i) const
-    {
-        CGAL_assertion(i<=1);
-        return Halfedge_index(((size_type)e << 1) + i);
-    }
-
-    ///@}
-
-
-    /// \name Degree Functions
-    ///@{
-
-    /// returns the number of incident halfedges of vertex `v`.
-    size_type degree(Vertex_index v) const;
-
-    /// returns the number of incident halfedges of face `f`.
-    size_type degree(Face_index f) const;
-
-    ///@}
-
-
-
-    /// \name Borders
-    ///
-    ///  A halfedge, or edge is on the border of a surface mesh
-    /// if it is incident to a `null_face()`.  A vertex is on a border
-    /// if it is incident to a border halfedge. While for a halfedge and
-    /// edge this is a constant time operation, for a vertex it means
-    /// to look at all incident halfedges.  If algorithms operating on a 
-    /// surface mesh maintain that the halfedge associated to a border vertex is
-    /// a border halfedge, this is a constant time operation too.  
-    /// This section provides functions to check if an element is on a 
-    /// border and to change the halfedge associated to a border vertex.
-    ///@{
-
-    /// returns whether `v` is a border vertex. 
-    /// \cgalAdvancedBegin
-    /// With the default value for
-    /// `check_all_incident_halfedges` the function iteratates over the incident halfedges.
-    /// With `check_all_incident_halfedges == false` the function returns `true`, if the incident
-    /// halfedge associated to vertex `v` is a border halfedge.
-    /// \cgalAdvancedEnd
-  bool is_border(Vertex_index v, bool check_all_incident_halfedges = true) const
-    {
-        Halfedge_index h(halfedge(v));
-        if (h == null_halfedge()){
-          return false;
-        }
-        if(check_all_incident_halfedges){
-          Halfedge_around_target_circulator hatc(h,*this), done(hatc);
-          do {
-            if(is_border(*hatc)){
-              return true;
-            }
-          }while(++hatc != done);
-          return false;
-        }
-        return (!(is_valid(h) && is_border(h)));
-    }
-
-    /// returns whether `h` is a border halfege, that is if its incident face is `sm.null_face()`.
-    bool is_border(Halfedge_index h) const
-    {
-        return !face(h).is_valid();
-    }
-
-
-    /// returns whether `e` is a border edge, i.e., if any 
-    /// of its two halfedges is a border halfedge.
-    bool is_border(Edge_index e) const
-    {
-      return is_border(e.halfedge()) || is_border(opposite(e.halfedge()));
-    }
-
-  /// iterates over the incident halfedges and sets the incident halfedge
-  /// associated to vertex `v` to a border halfedge and returns `true` if it exists.
-  bool set_vertex_halfedge_to_border_halfedge(Vertex_index v)
-  {
-    if(halfedge(v) == null_halfedge()){
-      return false;
-    }
-    Halfedge_around_target_circulator hatc(halfedge(v),*this), done(hatc);
-    do {
-      if(is_border(*hatc)){
-        set_halfedge(v,*hatc);
-        return true;
-      }
-    }while(++hatc != done);
-    return false;
-  }
-
-  /// applies `set_vertex_halfedge_to_border_halfedge(Vertex_index)` on all vertices 
-  /// around the face associated to `h`.
-  void set_vertex_halfedge_to_border_halfedge(Halfedge_index h)
-  {
-    if(is_border(h)){
-      Halfedge_around_face_circulator hafc(h,*this),done(hafc);
-      do {
-        set_halfedge(target(*hafc),*hafc);
-      }while(++hafc != done);
-    } else {
-       Vertex_around_face_circulator vafc(h,*this),done(vafc);
-      do {
-        set_vertex_halfedge_to_border_halfedge(*vafc);
-      }while(++vafc != done);
-    }
-  }
-
-  /// applies `set_vertex_halfedge_to_border_halfedge(Vertex_index)` on all vertices 
-  /// of the surface mesh.
-  void set_vertex_halfedge_to_border_halfedge()
-  {
-    BOOST_FOREACH(Halfedge_index h, halfedges()){
-      if(is_border(h)){
-          set_halfedge(target(h),h);
-        }
-    }
-  }
-
-
-    /// returns whether `v` is isolated, i.e., incident to `Surface_mesh::null_halfedge()`.
-    bool is_isolated(Vertex_index v) const
-    {
-        return !halfedge(v).is_valid();
-    }
-
-    ///@}
-
-
-private: //--------------------------------------------------- property handling
-
-    /// @cond BROKEN_DOC
-    typedef boost::fusion::map<
-      boost::fusion::pair< typename Surface_mesh::Vertex_index, Property_container<Vertex_index> (Surface_mesh::*)>,
-      boost::fusion::pair< typename Surface_mesh::Halfedge_index, Property_container<Halfedge_index> (Surface_mesh::*)>,
-      boost::fusion::pair< typename Surface_mesh::Edge_index, Property_container<Edge_index> (Surface_mesh::*)>,
-      boost::fusion::pair< typename Surface_mesh::Face_index, Property_container<Face_index> (Surface_mesh::*)> >
-        map_type;
-
-    map_type pmap_;
-    /// @endcond
-
-    public:
- 
-
- /*! \name Property Handling
-
- A `Property_map<I,T>` allows to associate properties of type `T` to a vertex, halfdge, edge, or face index type I.
- Properties can be added, and looked up with a string, and they can be removed at runtime.
- The \em point property of type `P` is associated to the string "v:point". 
-
-    */
-    ///@{
-
-  /// Model of `LvaluePropertyMap` with `I` as key type and `T` as value type, where `I`
-  /// is either a vertex, halfedge, edge, or face index type.
-#ifdef DOXYGEN_RUNNING
-  template <class I, class T>
-  using Property_map = unspecified_type;
-
-#else
-
-
-#endif
-
-    /// adds a property map named `name` with value type `T` and default `t`
-    /// for index type `I`. Returns the property map together with a Boolean 
-    /// that is `true` if a new map was created. In case it already exists
-    /// the existing map together with `false` is returned.
-
-  
-    template<class I, class T>
-      std::pair<Property_map<I, T>, bool>
-    add_property_map(const std::string& name, const T t=T()) {
-        return (this->*boost::fusion::at_key<I>(pmap_)).template add<T>(name, t);
-    }
-
- 
-    /// returns a property map named `name` with key type `I` and value type `T`, 
-    /// and a Boolean that is `true` if the property exists. 
-    /// In case it does not exist the Boolean is `false` and the behavior of
-    /// the property map is undefined.
-    template <class I, class T>
-    std::pair<Property_map<I, T>,bool> property_map(const std::string& name) const
-    {
-      return (this->*boost::fusion::at_key<I>(pmap_)).template get<T>(name);
-    }
-
-
-    /// removes property map `p`. The memory allocated for that property map is
-    /// freed.
-    template<class I, class T>
-    void remove_property_map(Property_map<I, T>& p)
-    {
-        (this->*boost::fusion::at_key<I>(pmap_)).remove(p);
-    }
-
-    /// @cond CGAL_DOCUMENT_INTERNALS
-    /// returns the std::type_info of the value type of the
-    /// property identified by `name`.  `typeid(void)` if `name`
-    /// does not identify any property.
-    ///
-    /// @tparam I The key type of the property. 
-
-    template<class I>
-    const std::type_info& property_type(const std::string& name)
-    {
-        return (this->*boost::fusion::at_key<I>(pmap_)).get_type(name);
-    }
-  /// @endcond
-
-    /// returns a vector with all strings that describe properties with the key type `I`.
-    /// @tparam I The key type of the properties.
-    template<class I>
-    std::vector<std::string> properties() const
-    {
-        return (this->*boost::fusion::at_key<I>(pmap_)).properties();
-    }
-
-    /// returns the property for the string "v:point".
-    Property_map<Vertex_index, Point>
-    points() const { return vpoint_; }
-
-    /// returns the point associated to vertex `v`.
-    const Point&
-    point(Vertex_index v) const { return vpoint_[v]; }
-
-    /// returns the point associated to vertex `v`.
-    Point&
-    point(Vertex_index v) { return vpoint_[v]; }
-
-    /// @cond CGAL_DOCUMENT_INTERNALS
-    /// prints property statistics to the stream `out`. The output is human-readable but
-    /// not machine-friendly.  
-    ///
-    void property_stats(std::ostream& out = std::cout) const;
-    /// @endcond
-    ///@}
-
-
- /// \name Null Elements
-    ///@{
-
-  /// returns `Vertex_index(-1)`.
-  static Vertex_index null_vertex()
-  {
-    return vertex_index(-1);
-  }
-
-  /// returns `Edge_index(-1)`.
-  static Edge_index null_edge()
-  {
-    return edge_index(-1);
-  }
-  /// returns `Halfedge_index(-1)`.
-  static Halfedge_index null_halfedge()
-  {
-    return halfedge_index(-1);
-  }
-  /// returns `Face_index(-1)`.
-  static Face_index null_face()
-  {
-    return face_index(-1);
-  }
-  /// @}
-
-  
-private: //--------------------------------------------------- helper functions
-
-
-    /// make sure that the incoming halfedge of vertex v is a border halfedge
-    /// if `v` is a border vertex.
-    void adjust_incoming_halfedge(Vertex_index v);
-
-private: //------------------------------------------------------- private data
-    Property_container<Vertex_index> vprops_;
-    Property_container<Halfedge_index> hprops_;
-    Property_container<Edge_index> eprops_;
-    Property_container<Face_index> fprops_;
-
-    Property_map<Vertex_index, Vertex_connectivity>      vconn_;
-    Property_map<Halfedge_index, Halfedge_connectivity>  hconn_;
-    Property_map<Face_index, Face_connectivity>          fconn_;
-
-    Property_map<Vertex_index, bool>  vremoved_;
-    Property_map<Edge_index, bool>    eremoved_;
-    Property_map<Face_index, bool>    fremoved_;
-
-    Property_map<Vertex_index, Point>   vpoint_;
-
-    size_type removed_vertices_;
-    size_type removed_edges_;
-    size_type removed_faces_;
-
-    size_type vertices_freelist_;
-    size_type edges_freelist_;
-    size_type faces_freelist_;
-    bool garbage_;
-};
-
-  /*! \addtogroup PkgSurface_mesh
-   *
-   * @{
-   */
-
-  /// \relates Surface_mesh
-  /// Inserts the surface mesh in an output stream in Ascii OFF format. 
-  /// Only the \em point property is inserted in the stream.
-  /// \pre `operator<<(std::ostream&,const P&)` must be defined.
-  template <typename P>
-  std::ostream& operator<<(std::ostream& os, const Surface_mesh<P>& sm)
-  {
-    typedef Surface_mesh<P> Mesh;
-    typedef typename Mesh::Vertex_index Vertex_index;
-    typedef typename Mesh::Face_index Face_index;
-
-    os << "OFF\n" << sm.number_of_vertices() << " " << sm.number_of_faces() << " 0\n";
-    std::vector<int> reindex;
-    reindex.resize(sm.num_vertices());
-    int n = 0;
-    BOOST_FOREACH(Vertex_index v, sm.vertices()){
-      os << sm.point(v) << std::endl;
-      reindex[v]=n++;
-    }
-
-    BOOST_FOREACH(Face_index f, sm.faces()){
-      os << sm.degree(f);
-      BOOST_FOREACH(Vertex_index v, CGAL::vertices_around_face(sm.halfedge(f),sm)){
-        os << " " << reindex[v];
-      }
-      os << "\n";
-    }
-    return os;
-  }
-
-  inline std::istream& sm_skip_comments( std::istream& in) {
-      char c;
-      in >> c;
-      if (c == '#')
-        in.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
-      else
-        in.putback(c);
-      return in;
-  }
-
-  /// \relates Surface_mesh
-  /// Extracts the surface mesh from an input stream in Ascii OFF format.
-  /// The operator only reads the point property and does not read files 
-  /// with vertex normals or textures.
-  /// \pre `operator>>(std::istream&,const P&)` must be defined.
-  template <typename P>
-  std::istream& operator>>(std::istream& is, Surface_mesh<P>& sm)
-  {
-    typedef Surface_mesh<P> Mesh;
-    typedef typename Mesh::size_type size_type;
-    sm.clear();
-    int n, f, e;
-    std::string off;
-    is >> off;
-    assert(off == "OFF" || off == "COFF");
-    is >> n >> f >> e;
-    sm.reserve(n,2*f,e);
-    P p;
-    for(int i=0; i < n; i++){
-      is >> sm_skip_comments;
-      is >> p;
-      sm.add_vertex(p);
-      is.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
-    }
-    std::vector<size_type> vr;
-    std::size_t d;
-    for(int i=0; i < f; i++){
-      is >> sm_skip_comments;
-      is >> d;
-      vr.resize(d);
-      for(std::size_t j=0; j<d; j++){
-        is >> vr[j];
-      }
-      sm.add_face(vr);
-    }
-    return is;
-  }
-
- 
- /*! @} */
-
-template <typename P>
-Surface_mesh<P>::
-Surface_mesh()
-  : pmap_(boost::fusion::make_pair< typename Surface_mesh::Vertex_index >(&Surface_mesh::vprops_)
-          , boost::fusion::make_pair< typename Surface_mesh::Halfedge_index >(&Surface_mesh::hprops_)
-          , boost::fusion::make_pair< typename Surface_mesh::Edge_index >(&Surface_mesh::eprops_)
-          , boost::fusion::make_pair< typename Surface_mesh::Face_index >(&Surface_mesh::fprops_))
-{
-    // allocate standard properties
-    // same list is used in operator=() and assign()
-    vconn_    = add_property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
-    hconn_    = add_property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
-    fconn_    = add_property_map<Face_index, Face_connectivity>("f:connectivity").first;
-    vpoint_   = add_property_map<Vertex_index, Point>("v:point").first;
-    vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
-    eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
-    fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
-
-    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
-    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
-    garbage_ = false;
-}
-
-
-//-----------------------------------------------------------------------------
-template <typename P>
-Surface_mesh<P>&
-Surface_mesh<P>::
-operator=(const Surface_mesh<P>& rhs)
-{
-    if (this != &rhs)
-    {
-        pmap_ = rhs.pmap_;
-
-        // deep copy of property containers
-        vprops_ = rhs.vprops_;
-        hprops_ = rhs.hprops_;
-        eprops_ = rhs.eprops_;
-        fprops_ = rhs.fprops_;
-
-        // property handles contain pointers, have to be reassigned
-        vconn_    = property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
-        hconn_    = property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
-        fconn_    = property_map<Face_index, Face_connectivity>("f:connectivity").first;
-        vremoved_ = property_map<Vertex_index, bool>("v:removed").first;
-        eremoved_ = property_map<Edge_index, bool>("e:removed").first;
-        fremoved_ = property_map<Face_index, bool>("f:removed").first;
-        vpoint_   = property_map<Vertex_index, P>("v:point").first;
-
-        // how many elements are removed?
-        removed_vertices_  = rhs.removed_vertices_;
-        removed_edges_     = rhs.removed_edges_;
-        removed_faces_     = rhs.removed_faces_;
-        vertices_freelist_ = rhs.vertices_freelist_;
-        edges_freelist_    = rhs.edges_freelist_;
-        faces_freelist_    = rhs.faces_freelist_;
-        garbage_           = rhs.garbage_;
-    }
-
-    return *this;
-}
-
-
-//-----------------------------------------------------------------------------
-template <typename P>
-Surface_mesh<P>&
-Surface_mesh<P>::
-assign(const Surface_mesh<P>& rhs)
-{
-    if (this != &rhs)
-    {
-        // clear properties
-        vprops_.clear();
-        hprops_.clear();
-        eprops_.clear();
-        fprops_.clear();
-
-        // allocate standard properties
-        vconn_    = add_property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
-        hconn_    = add_property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
-        fconn_    = add_property_map<Face_index, Face_connectivity>("f:connectivity").first;
-        vpoint_   = add_property_map<Vertex_index, P>("v:point").first;
-        vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
-        eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
-        fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
-
-        // copy properties from other mesh
-        vconn_.array()     = rhs.vconn_.array();
-        hconn_.array()     = rhs.hconn_.array();
-        fconn_.array()     = rhs.fconn_.array();
-        vpoint_.array()    = rhs.vpoint_.array();
-        vremoved_.array()  = rhs.vremoved_.array();
-        eremoved_.array()  = rhs.eremoved_.array();
-        fremoved_.array()  = rhs.fremoved_.array();
-
-        // resize (needed by property containers)
-        vprops_.resize(rhs.num_vertices());
-        hprops_.resize(rhs.num_halfedges());
-        eprops_.resize(rhs.num_edges());
-        fprops_.resize(rhs.num_faces());
-
-        // how many elements are removed?
-        removed_vertices_  = rhs.removed_vertices_;
-        removed_edges_     = rhs.removed_edges_;
-        removed_faces_     = rhs.removed_faces_;
-        vertices_freelist_ = rhs.vertices_freelist_;
-        edges_freelist_    = rhs.edges_freelist_;
-        faces_freelist_    = rhs.faces_freelist_;
-        garbage_           = rhs.garbage_;
-    }
-
-    return *this;
-}
-
-//-----------------------------------------------------------------------------
-template <typename P>
-void
-Surface_mesh<P>::
-clear()
-{
-    vprops_.resize(0);
-    hprops_.resize(0);
-    eprops_.resize(0);
-    fprops_.resize(0);
-
-    vprops_.shrink_to_fit();
-    hprops_.shrink_to_fit();
-    eprops_.shrink_to_fit();
-    fprops_.shrink_to_fit();
-
-    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
-    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
-    garbage_ = false;
-}
-
-//-----------------------------------------------------------------------------
-/// @cond CGAL_DOCUMENT_INTERNALS
-template <typename P>
-void
-Surface_mesh<P>::
-property_stats(std::ostream& out) const
-{
-    std::vector<std::string> props;
-
-    out << "vertex properties:\n";
-    props = properties<Vertex_index>();
-    for (unsigned int i=0; i<props.size(); ++i)
-        out << "\t" << props[i] << std::endl;
-
-    out << "halfedge properties:\n";
-    props = properties<Halfedge_index>();
-    for (unsigned int i=0; i<props.size(); ++i)
-        out << "\t" << props[i] << std::endl;
-
-    out << "edge properties:\n";
-    props = properties<Edge_index>();
-    for (unsigned int i=0; i<props.size(); ++i)
-        out << "\t" << props[i] << std::endl;
-
-    out << "face properties:\n";
-    props = properties<Face_index>();
-    for (unsigned int i=0; i<props.size(); ++i)
-        out << "\t" << props[i] << std::endl;
-}
-/// @endcond
-
-//-----------------------------------------------------------------------------
-template <typename P>
-typename Surface_mesh<P>::Halfedge_index
-Surface_mesh<P>::
-halfedge(Vertex_index source, Vertex_index target) const
-{
-    CGAL_assertion(has_valid_index(source) && has_valid_index(target));
-
-    Halfedge_index h  = halfedge(target);
-    const Halfedge_index hh = h;
-
-    if (h.is_valid())
-    {
-        do
-        {
-            if (this->source(h) == source)
-              return h;
-            h = next_around_target(h);
-        }
-        while (h != hh);
-    }
-
-    return Halfedge_index();
-}
-
-
-//-----------------------------------------------------------------------------
-template <typename P>
-void
-Surface_mesh<P>::
-adjust_incoming_halfedge(Vertex_index v)
-{
-    Halfedge_index h  = halfedge(v);
-    Halfedge_index hh = h;
-
-    if (h.is_valid())
-    {
-        if (target(h) != v)
-        {
-            // wrong target, flip
-            h = opposite(h);
-            hh = h;
-            set_halfedge(v, h);
-        }
-
-        do
-        {
-            if (is_border(h))
-            {
-                set_halfedge(v, h);
-                return;
-            }
-            h = next_around_target(h);
-        }
-        while (h != hh);
-    }
-}
-
-//-----------------------------------------------------------------------------
-
- /// @cond CGAL_DOCUMENT_INTERNALS
-
-template <typename P>
-template <typename Range>
-typename Surface_mesh<P>::Face_index
-Surface_mesh<P>::add_face(const Range& r)
-{
-  std::vector<Vertex_index> vertices(r.begin(), r.end()); // quick and dirty copy
-    Vertex_index                   v;
-    unsigned int             i, ii, n((int)vertices.size()), id;
-    std::vector<Halfedge_index>    halfedges(n);
-    std::vector<bool>        is_new(n), needs_adjust(n, false);
-    Halfedge_index                 inner_next, inner_prev,
-    outer_next, outer_prev,
-    border_next, border_prev,
-    patch_start, patch_end;
-
-    // cache for set_next and vertex' set_halfedge
-    typedef std::pair<Halfedge_index, Halfedge_index>  NextCacheEntry;
-    typedef std::vector<NextCacheEntry>    NextCache;
-
-    NextCache    next_cache;
-    next_cache.reserve(3*n);
-
-
-    // don't allow degenerated faces
-    CGAL_assertion (n > 2);
-
-    // test for topological errors
-    for (i=0, ii=1; i<n; ++i, ++ii, ii%=n)
-    {
-      if ( !(is_isolated(vertices[i]) || is_border(vertices[i]) ) )
-        {
-            std::cerr << "Surface_meshT::add_face: complex vertex " << vertices[i] << std::endl;
-            return Face_index();
-        }
-        halfedges[i] = halfedge(vertices[i], vertices[ii]);
-        is_new[i]    = !halfedges[i].is_valid();
-        if (!is_new[i] && !is_border(halfedges[i]))
-        {
-            std::cerr << "Surface_meshT::add_face: complex edge " << halfedges[i] << std::endl;
-            std::cerr << std::boolalpha << is_border(halfedges[i]) << std::endl;
-            std::cerr << target(halfedges[i]) << std::endl;
-
-            return Face_index();
-        }
-    }
-
-    // re-link patches if necessary
-    for (i=0, ii=1; i<n; ++i, ++ii, ii%=n)
-    {
-        if (!is_new[i] && !is_new[ii])
-        {
-            inner_prev = halfedges[i];
-           inner_next = halfedges[ii];
-
-            if (next(inner_prev) != inner_next)
-            {
-                // here comes the ugly part... we have to relink a whole patch
-
-                // search a free gap
-                // free gap will be between border_prev and border_next
-                outer_prev = opposite(inner_next);
-                outer_next = opposite(inner_prev);
-                border_prev = outer_prev;
-                do
-                    border_prev = opposite(next(border_prev));
-                while (!is_border(border_prev) || border_prev==inner_prev);
-                border_next = next(border_prev);
-                CGAL_assertion(is_border(border_prev));
-                CGAL_assertion(is_border(border_next));
-
-
-                // ok ?
-                if (border_next == inner_next)
-                {
-                    std::cerr << "Surface_meshT::add_face: patch re-linking failed\n";
-                    return Face_index();
-                }
-
-                // other halfedges' indices
-                patch_start = next(inner_prev);
-                patch_end   = prev(inner_next);
-
-                // relink
-                next_cache.push_back(NextCacheEntry(border_prev, patch_start));
-                next_cache.push_back(NextCacheEntry(patch_end, border_next));
-                next_cache.push_back(NextCacheEntry(inner_prev, inner_next));
-            }
-        }
-    }
-    // create missing edges
-    for (i=0, ii=1; i<n; ++i, ++ii, ii%=n)
-      if (is_new[i]){
-            halfedges[i] = add_edge(vertices[i], vertices[ii]);
-            set_face(opposite(halfedges[i]), null_face()); // as it may be recycled we have to reset it  
-            assert(source(halfedges[i]) == vertices[i]);
-      }
-    // create the face
-    Face_index f = add_face();
-    set_halfedge(f, halfedges[n-1]);
-
-    // setup halfedges
-    for (i=0, ii=1; i<n; ++i, ++ii, ii%=n)
-    {
-        v          = vertices[ii];
-        inner_prev = halfedges[i];
-        inner_next = halfedges[ii];
-
-        id = 0;
-        if (is_new[i])  id |= 1;
-        if (is_new[ii]) id |= 2;
-
-        if (id)
-        {
-            outer_prev = opposite(inner_next);
-            outer_next = opposite(inner_prev);
-
-            // set outer links
-            switch (id)
-            {
-                case 1: // prev is new, next is old
-
-                    border_prev = prev(inner_next);
-                    next_cache.push_back(NextCacheEntry(border_prev, outer_next));
-                    set_halfedge(v, border_prev);
-                    break;
-
-                case 2: // next is new, prev is old
-
-                    border_next = next(inner_prev);
-                    next_cache.push_back(NextCacheEntry(outer_prev, border_next));
-                    set_halfedge(v, outer_prev);
-                    break;
-
-                case 3: // both are new
-
-                    if (!halfedge(v).is_valid())
-                    {
-                        set_halfedge(v, outer_prev);
-                        next_cache.push_back(NextCacheEntry(outer_prev, outer_next));
-                    }
-                    else
-                    {
-                        border_prev = halfedge(v);
-                        border_next = next(border_prev);
-                        next_cache.push_back(NextCacheEntry(border_prev, outer_next));
-                        next_cache.push_back(NextCacheEntry(outer_prev, border_next));
-                    }
-                    break;
-            }
-
-            // set inner link
-            next_cache.push_back(NextCacheEntry(inner_prev, inner_next));
-        }
-        else {
-            needs_adjust[ii] = true; // (halfedge(v) == inner_next); the code is over adjusting
-        }
-
-        // set face index
-        set_face(halfedges[i], f);
-    }
-
-
-
-    // process next halfedge cache
-    typename NextCache::const_iterator ncIt(next_cache.begin()), ncEnd(next_cache.end());
-    for (; ncIt != ncEnd; ++ncIt)
-        set_next(ncIt->first, ncIt->second);
-
-
-
-    // adjust vertices' halfedge index
-    for (i=0; i<n; ++i)
-      if (true) //(needs_adjust[i])
-            adjust_incoming_halfedge(vertices[i]);
-
-    return f;
-}
-
-  /// @endcond
-
-//-----------------------------------------------------------------------------
-template <typename P>
-typename Surface_mesh<P>::size_type
-Surface_mesh<P>::
-degree(Vertex_index v) const
-{
-    size_type count(0);
-    if(halfedge(v) == null_halfedge()){
-      return 0;
-    }
-    Vertex_around_target_circulator vvit(halfedge(v), *this);
-    Vertex_around_target_circulator vvend = vvit;
-    if(vvit) do
-    {
-        ++count;
-    } while (++vvit != vvend);
-
-    return count;
-}
-
-
-//-----------------------------------------------------------------------------
-template <typename P>
-typename Surface_mesh<P>::size_type
-Surface_mesh<P>::
-degree(Face_index f) const
-{
-    size_type count(0);
-    if(halfedge(f) == null_halfedge()){
-      return 0;
-    }
-    Vertex_around_face_circulator fvit(halfedge(f),*this);
-    Vertex_around_face_circulator fvend = fvit;
-    if(fvit) do {
-        ++count;
-    } while (++fvit != fvend);
-
-    return count;
-}
-
-template <typename P>
-void
-Surface_mesh<P>::
-collect_garbage()
-{
-    int  i, i0, i1,
-    nV(num_vertices()),
-    nE(num_edges()),
-    nH(num_halfedges()),
-    nF(num_faces());
-
-    Vertex_index    v;
-    Halfedge_index  h;
-    Face_index      f;
-
-
-    // setup index mapping%
-    Property_map<Vertex_index, Vertex_index>      vmap = add_property_map<Vertex_index, Vertex_index>("v:garbage-collection").first;
-    Property_map<Halfedge_index, Halfedge_index>  hmap = add_property_map<Halfedge_index, Halfedge_index>("h:garbage-collection").first;
-    Property_map<Face_index, Face_index>          fmap = add_property_map<Face_index, Face_index>("f:garbage-collection").first;
-    for (i=0; i<nV; ++i)
-        vmap[Vertex_index(i)] = Vertex_index(i);
-    for (i=0; i<nH; ++i)
-        hmap[Halfedge_index(i)] = Halfedge_index(i);
-    for (i=0; i<nF; ++i)
-        fmap[Face_index(i)] = Face_index(i);
-
-
-
-    // really remove vertices
-    if (nV > 0)
-    {
-        i0=0;  i1=nV-1;
-
-        while (1)
-        {
-            // find first removed and last un-removed
-            while (!vremoved_[Vertex_index(i0)] && i0 < i1)  ++i0;
-            while ( vremoved_[Vertex_index(i1)] && i0 < i1)  --i1;
-            if (i0 >= i1) break;
-
-            // swap
-            vprops_.swap(i0, i1);
-        };
-
-        // remember new size
-        nV = vremoved_[Vertex_index(i0)] ? i0 : i0+1;
-    }
-
-    // really remove edges
-    if (nE > 0)
-    {
-        i0=0;  i1=nE-1;
-
-        while (1)
-        {
-            // find first removed and last un-removed
-            while (!eremoved_[Edge_index(i0)] && i0 < i1) ++i0;
-            while ( eremoved_[Edge_index(i1)] && i0 < i1) --i1;
-            if (i0 >= i1) break;
-
-            // swap
-            eprops_.swap(i0, i1);
-            hprops_.swap(2*i0,   2*i1);
-            hprops_.swap(2*i0+1, 2*i1+1);
-        };
-
-        // remember new size
-        nE = eremoved_[Edge_index(i0)] ? i0 : i0+1;
-        nH = 2*nE;
-    }
-
-
-    // really remove faces
-    if (nF > 0)
-    {
-        i0=0;  i1=nF-1;
-
-        while (1)
-        {
-            // find 1st removed and last un-removed
-            while (!fremoved_[Face_index(i0)] && i0 < i1)  ++i0;
-            while ( fremoved_[Face_index(i1)] && i0 < i1)  --i1;
-            if (i0 >= i1) break;
-
-            // swap
-            fprops_.swap(i0, i1);
-        };
-
-        // remember new size
-        nF = fremoved_[Face_index(i0)] ? i0 : i0+1;
-    }
-
-
-    // update vertex connectivity
-    for (i=0; i<nV; ++i)
-    {
-        v = Vertex_index(i);
-        if (!is_isolated(v))
-            set_halfedge(v, hmap[halfedge(v)]);
-    }
-
-
-    // update halfedge connectivity
-    for (i=0; i<nH; ++i)
-    {
-        h = Halfedge_index(i);
-        set_target(h, vmap[target(h)]);
-        set_next(h, hmap[next(h)]);
-        if (!is_border(h))
-            set_face(h, fmap[face(h)]);
-    }
-
-
-    // update indices of faces
-    for (i=0; i<nF; ++i)
-    {
-        f = Face_index(i);
-        set_halfedge(f, hmap[halfedge(f)]);
-    }
-
-    // remove index maps
-    remove_property_map<Vertex_index>(vmap);
-    remove_property_map<Halfedge_index>(hmap);
-    remove_property_map<Face_index>(fmap);
-
-    // finally resize arrays
-    vprops_.resize(nV); vprops_.shrink_to_fit();
-    hprops_.resize(nH); hprops_.shrink_to_fit();
-    eprops_.resize(nE); eprops_.shrink_to_fit();
-    fprops_.resize(nF); fprops_.shrink_to_fit();
-
-    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
-    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
-    garbage_ = false;
-}
-
-} // CGAL
-
-#endif /* CGAL_SURFACE_MESH_H */
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh_fwd.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh_fwd.h
deleted file mode 100644
index 19707b7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Surface_mesh_fwd.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//=============================================================================
-// Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen
-// Copyright (C) 2011 by Graphics & Geometry Group, Bielefeld University
-// Copyright (C) 2014 GeometryFactory
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-#ifndef CGAL_SURFACE_MESH_FWD_H
-#define CGAL_SURFACE_MESH_FWD_H
-
-#include <string>
-
-/// \file Surface_mesh_fwd.h
-/// Forward declarations of the Surface_mesh package.
-
-#ifndef DOXYGEN_RUNNING
-namespace CGAL {
-
-// fwdS for the public interface
-template<typename K>
-class Surface_mesh;
-
-  
-} // CGAL
-#endif
-
-#endif /* CGAL_SURFACE_MESH_FWD_H */
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_deformation.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_deformation.h
deleted file mode 100644
index 997fb59..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_deformation.h
+++ /dev/null
@@ -1,1509 +0,0 @@
-// Copyright (c) 2014 GeometryFactory
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Yin Xu, Andreas Fabri and Ilker O. Yaz
-
-#ifndef CGAL_SURFACE_MESH_DEFORMATION_H
-#define CGAL_SURFACE_MESH_DEFORMATION_H
-
-#include <CGAL/config.h>
-#include <CGAL/internal/Surface_modeling/Weights.h>
-#include <CGAL/Default.h>
-#include <CGAL/tuple.h>
-
-#include <vector>
-#include <list>
-#include <utility>
-#include <limits>
-#include <boost/foreach.hpp>
-
-/*
-#define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE // define it to activate optimal scale calculation,
-// then you can define below to just scale, if not both rotate and scale will be activated
-#define CGAL_DEFORM_MESH_JUST_EXPERIMENTAL_SCALE // to not to rotate but just scale
-*/
-
-// for default parameters
-#if defined(CGAL_EIGEN3_ENABLED)
-#include <CGAL/Eigen_solver_traits.h>  // for sparse linear system solver
-#include <CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h>  // for 3x3 closest rotation computer
-#endif
-
-namespace CGAL {
-
-/// \ingroup PkgSurfaceModeling
-///@brief Deformation algorithm type
-enum Deformation_algorithm_tag
-{
-  ORIGINAL_ARAP,  /**< use original as-rigid-as possible algorithm */
-  SPOKES_AND_RIMS /**< use spokes and rims version of as-rigid-as possible algorithm */
-};
-
-/// @cond CGAL_DOCUMENT_INTERNAL
-namespace internal {
-template<class HalfedgeGraph, Deformation_algorithm_tag deformation_algorithm_tag>
-struct Weight_calculator_selector {
-  typedef Uniform_weight<HalfedgeGraph> weight_calculator;
-};
-
-template<class HalfedgeGraph>
-struct Weight_calculator_selector<HalfedgeGraph, CGAL::SPOKES_AND_RIMS> {
-  typedef Single_cotangent_weight<HalfedgeGraph> weight_calculator;
-};
-
-template<class HalfedgeGraph>
-struct Weight_calculator_selector<HalfedgeGraph, CGAL::ORIGINAL_ARAP> {
-  typedef Cotangent_weight<HalfedgeGraph> weight_calculator;
-};
-}//namespace internal
-/// @endcond
-
- ///
- /// \ingroup PkgSurfaceModeling
- /// @brief Class providing the functionalities for deforming a triangulated surface mesh
- ///
- /// @tparam HG a model of HalfedgeGraph
- /// @tparam VIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::vertex_descriptor` as key and `unsigned int` as value type.
- ///         The default is `boost::property_map<HG, boost::%vertex_index_t>::%type`.
- /// @tparam HIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::halfedge_descriptor` as key and `unsigned int` as value type.
- ///         The default is `boost::property_map<HG, boost::%halfedge_index_t>::%type`.
- /// @tparam TAG tag for selecting the deformation algorithm
- /// @tparam WC a model of SurfaceModelingWeights, with `WC::Halfedge_graph` being `HG`.
- ///         If `TAG` is `ORIGINAL_ARAP`, the weights must be positive to guarantee a correct energy minimization.
- ///         The default is the cotangent weighting scheme. In case `TAG` is `ORIGINAL_ARAP`, negative weights are clamped to zero.
- /// @tparam ST a model of SparseLinearAlgebraTraitsWithFactor_d. If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available
- /// and `CGAL_EIGEN3_ENABLED` is defined, then an overload of `Eigen_solver_traits` is provided as default parameter.\n
-  /// \code
- ///     CGAL::Eigen_solver_traits<
- ///         Eigen::SparseLU<
- ///            CGAL::Eigen_sparse_matrix<double>::EigenType,
- ///            Eigen::COLAMDOrdering<int> >  >
- /// \endcode
- /// @tparam CR a model of DeformationClosestRotationTraits_3. If \ref thirdpartyEigen "Eigen" 3.1 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined,
- /// `Deformation_Eigen_polar_closest_rotation_traits_3` is provided as default parameter.
- /// @tparam VPM a model of `ReadWritePropertyMap`</a>  with `Surface_mesh_deformation::vertex_descriptor` as key and a point as value type. The point type must be a model of `::RawPoint_3`.
- /// The default is `boost::property_map<HG, CGAL::vertex_point_t>::%type`.
-template <
-  class HG,
-  class VIM=Default,
-  class HIM=Default,
-  Deformation_algorithm_tag TAG = SPOKES_AND_RIMS,
-  class WC = Default,
-  class ST = Default,
-  class CR = Default,
-  class VPM = Default
-  >
-class Surface_mesh_deformation
-{
-//Typedefs
-public:
-
-  /// \name Types
-  /// @{
-  // typedefed template parameters, main reason is doxygen creates autolink to typedefs but not template parameters
-  ///
-  typedef HG Halfedge_graph;
-
-// Index maps
-#ifndef DOXYGEN_RUNNING
-  typedef typename Default::Get<
-    VIM,
-    typename boost::property_map<Halfedge_graph, boost::vertex_index_t>::type
-  >::type Vertex_index_map;
-  typedef typename Default::Get<
-    HIM,
-    typename boost::property_map<Halfedge_graph, boost::halfedge_index_t>::type
-  >::type Hedge_index_map;
-#else
-  ///
-  typedef VIM Vertex_index_map;
-  ///
-  typedef HIM Hedge_index_map;
-#endif
-
-// weight calculator
-#ifndef DOXYGEN_RUNNING
-  typedef typename Default::Get<
-    WC,
-    typename internal::Weight_calculator_selector<HG, TAG>::weight_calculator
-  >::type Weight_calculator;
-#else
-  ///
-  typedef WC Weight_calculator;
-#endif
-
-// sparse linear solver
-#ifndef DOXYGEN_RUNNING
-  typedef typename Default::Get<
-    ST,
-  #if defined(CGAL_EIGEN3_ENABLED)
-      CGAL::Eigen_solver_traits<
-          Eigen::SparseLU<
-            CGAL::Eigen_sparse_matrix<double>::EigenType,
-            Eigen::COLAMDOrdering<int> >  >
-  #else
-    ST // no parameter provided, and Eigen is not enabled: so don't compile!
-  #endif
-  >::type Sparse_linear_solver;
-#else
-  ///
-  typedef ST Sparse_linear_solver;
-#endif
-
-// CR helper
-#ifndef DOXYGEN_RUNNING
-  typedef typename Default::Get<
-    CR,
-  #if defined(CGAL_EIGEN3_ENABLED)
-    Deformation_Eigen_polar_closest_rotation_traits_3
-  #else
-    CR // no parameter provided, and Eigen is not enabled: so don't compile!
-  #endif
-  >::type Closest_rotation_traits;
-#else
-  ///
-  typedef CR Closest_rotation_traits;
-#endif
-
-// vertex point pmap
-#ifndef DOXYGEN_RUNNING
-  typedef typename Default::Get<
-    VPM,
-    typename boost::property_map<Halfedge_graph, CGAL::vertex_point_t>::type
-  >::type Vertex_point_map;
-#else
-  ///
-  typedef VPM Vertex_point_map;
-#endif
-
-  /// The type for vertex descriptor
-  typedef typename boost::graph_traits<Halfedge_graph>::vertex_descriptor vertex_descriptor;
-  /// The type for halfedge descriptor
-  typedef typename boost::graph_traits<Halfedge_graph>::halfedge_descriptor halfedge_descriptor;
-  /// The 3D point type, model of `::RawPoint_3`
-  typedef typename boost::property_traits<Vertex_point_map>::value_type Point;
-  /// A constant iterator range over the vertices of the region-of-interest.
-  /// It is a model of `ConstRange` with `vertex_descriptor` as iterator value type.
-  typedef std::vector<vertex_descriptor> Roi_vertex_range;
-/// @}
-
-private:
-  typedef Surface_mesh_deformation<HG, VIM, HIM, TAG, WC, ST, CR> Self;
-  // Repeat Halfedge_graph types
-  typedef typename boost::graph_traits<Halfedge_graph>::vertex_iterator     vertex_iterator;
-  typedef typename boost::graph_traits<Halfedge_graph>::halfedge_iterator       halfedge_iterator;
-  typedef typename boost::graph_traits<Halfedge_graph>::in_edge_iterator    in_edge_iterator;
-  typedef typename boost::graph_traits<Halfedge_graph>::out_edge_iterator   out_edge_iterator;
-
-  typedef typename Closest_rotation_traits::Matrix CR_matrix;
-  typedef typename Closest_rotation_traits::Vector CR_vector;
-
-// Data members.
-  Halfedge_graph& m_halfedge_graph;                   /**< Source triangulated surface mesh for modeling */
-
-  std::vector<Point> original;                        ///< original positions of roi (size: ros + boundary_of_ros)
-  std::vector<Point> solution;                        ///< storing position of ros vertices during iterations (size: ros + boundary_of_ros)
-
-  Vertex_index_map vertex_index_map;                  ///< storing indices of all vertices
-  Hedge_index_map   hedge_index_map;                  ///< storing indices of all halfedges
-
-  std::vector<vertex_descriptor> roi;                 ///< region of interest
-  std::vector<vertex_descriptor> ros;                 ///< region of solution, including roi and hard constraints on boundary of roi
-
-  std::vector<std::size_t> ros_id_map;                ///< (size: num vertices)
-  std::vector<bool>        is_roi_map;                ///< (size: num vertices)
-  std::vector<bool>        is_ctrl_map;               ///< (size: num vertices)
-
-  std::vector<double> hedge_weight;                   ///< all halfedge weights
-  std::vector<CR_matrix> rot_mtr;                     ///< rotation matrices of ros vertices (size: ros)
-
-  Sparse_linear_solver m_solver;                      ///< linear sparse solver
-  unsigned int m_iterations;                          ///< number of maximal iterations
-  double m_tolerance;                                 ///< tolerance of convergence
-
-  bool need_preprocess_factorization;                 ///< is there any need to compute L and factorize
-  bool need_preprocess_region_of_solution;            ///< is there any need to compute region of solution
-
-  bool last_preprocess_successful;                    ///< stores the result of last call to preprocess()
-
-  Weight_calculator weight_calculator;
-
-  Vertex_point_map vertex_point_map;
-
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
-public:
-// SR-ARAP [Zohar13]
-  double m_sr_arap_alpha;
-private:
-#endif
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
-  std::vector<double> scales;
-#endif
-
-#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
-public:
-  Surface_mesh_deformation(const Self&) = delete; // no copy
-#else
-private:
-  Surface_mesh_deformation(const Self&); // no copy
-#endif
-
-
-// Public methods
-public:
-
-  /// \cond SKIP_FROM_MANUAL
-  //vertex_point_map set by default
-  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
-                           Vertex_index_map vertex_index_map,
-                           Hedge_index_map hedge_index_map
-                          )
-    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map), hedge_index_map(hedge_index_map),
-      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
-      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      m_iterations(5), m_tolerance(1e-4),
-      need_preprocess_factorization(true),
-      need_preprocess_region_of_solution(true),
-      last_preprocess_successful(false),
-      weight_calculator(Weight_calculator()),
-      vertex_point_map(get(vertex_point, halfedge_graph))
-  {
-    init();
-  }
-
-  //vertex_point_map and hedge_index_map set by default
-  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
-                           Vertex_index_map vertex_index_map
-                          )
-    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map),
-      hedge_index_map(get(boost::halfedge_index, halfedge_graph)),
-      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
-      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      m_iterations(5), m_tolerance(1e-4),
-      need_preprocess_factorization(true),
-      need_preprocess_region_of_solution(true),
-      last_preprocess_successful(false),
-      weight_calculator(Weight_calculator()),
-      vertex_point_map(get(vertex_point, halfedge_graph))
-  {
-    init();
-  }
-  //vertex_point_map, hedge_index_map and vertex_index_map set by default
-  Surface_mesh_deformation(Halfedge_graph& halfedge_graph)
-    : m_halfedge_graph(halfedge_graph),
-      vertex_index_map(get(boost::vertex_index, halfedge_graph)),
-      hedge_index_map(get(boost::halfedge_index, halfedge_graph)),
-      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
-      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-      m_iterations(5), m_tolerance(1e-4),
-      need_preprocess_factorization(true),
-      need_preprocess_region_of_solution(true),
-      last_preprocess_successful(false),
-      weight_calculator(Weight_calculator()),
-      vertex_point_map(get(vertex_point, halfedge_graph))
-  {
-    init();
-  }
-
-  // Constructor with all the parameters provided
-  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
-                           Vertex_index_map vertex_index_map,
-                           Hedge_index_map hedge_index_map,
-                           Vertex_point_map vertex_point_map,
-                           Weight_calculator weight_calculator = Weight_calculator()
-                          )
-    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map), hedge_index_map(hedge_index_map),
-    ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
-    is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-    is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
-    m_iterations(5), m_tolerance(1e-4),
-    need_preprocess_factorization(true),
-    need_preprocess_region_of_solution(true),
-    last_preprocess_successful(false),
-    weight_calculator(weight_calculator),
-    vertex_point_map(vertex_point_map)
-  {
-    init();
-  }
-  /// \endcond
-  #if DOXYGEN_RUNNING
-/// \name Construction
-/// @{
-    /**
-   * The constructor of a deformation object
-   *
-   * @pre the halfedge_graph consists of only triangular facets
-   * @param halfedge_graph triangulated surface mesh to deform
-   * @param vertex_index_map property map which associates an id to each vertex, from `0` to `num_vertices(halfedge_graph)-1`.
-   * @param hedge_index_map property map which associates an id to each halfedge, from `0` to `2*num_edges(halfedge_graph)-1`.
-   * @param vertex_point_map property map which associates a point to each vertex of the graph.
-   * @param weight_calculator function object or pointer for weight calculation
-   */
-  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
-    Vertex_index_map vertex_index_map=get(boost::vertex_index, halfedge_graph),
-    Hedge_index_map hedge_index_map=get(boost::halfedge_index, halfedge_graph),
-    Vertex_point_map vertex_point_map=get(boost::vertex_point, halfedge_graph),
-    Weight_calculator weight_calculator = Weight_calculator()
-    );
-/// @}
-  #endif
-
-private:
-  void init() {
-    // compute halfedge weights
-    halfedge_iterator eb, ee;
-    hedge_weight.reserve(2*num_edges(m_halfedge_graph));
-    for(cpp11::tie(eb, ee) = halfedges(m_halfedge_graph); eb != ee; ++eb)
-    {
-      hedge_weight.push_back(
-        this->weight_calculator(*eb, m_halfedge_graph, vertex_point_map));
-    }
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
-    m_sr_arap_alpha=2;
-#endif
-  }
-
-public:
-
-/// \name Preprocessing
-/// @{
-  /**
-   * Erases all the vertices from the region-of-interest (control vertices included).
-   */
-  void clear_roi_vertices(){
-    need_preprocess_both();
-    // clear roi vertices
-    roi.clear();
-    //set to false all bits
-    is_roi_map.assign(num_vertices(m_halfedge_graph), false);
-    is_ctrl_map.assign(num_vertices(m_halfedge_graph), false);
-  }
-
-  /**
-   * Erases all the vertices from the set of control vertices.
-   */
-  void clear_control_vertices(){
-    need_preprocess_factorization=true;
-    //set to false all bits
-    is_ctrl_map.assign(num_vertices(m_halfedge_graph), false);
-  }
-
-  /**
-   * Inserts a vertex in the set of control vertices. The vertex is also inserted in the region-of-interest if it is not already in it.
-   * @param vd the vertex to be inserted
-   * @return `true` if `vd` is not already a control vertex.
-   */
-  bool insert_control_vertex(vertex_descriptor vd)
-  {
-    if(is_control_vertex(vd)) { return false; }
-    need_preprocess_factorization=true;
-
-    insert_roi_vertex(vd); // also insert it as roi
-
-    is_ctrl_map[id(vd)] = true;
-    return true;
-  }
-
-  /**
-   * Inserts a range of vertices in the set of control vertices. The vertices are also inserted in the region-of-interest if they are not already in it.
-   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
-   * @param begin first iterator of the range of vertices
-   * @param end past-the-end iterator of the range of vertices
-   */
-  template<class InputIterator>
-  void insert_control_vertices(InputIterator begin, InputIterator end)
-  {
-    for( ;begin != end; ++begin)
-    {
-      insert_control_vertex(*begin);
-    }
-  }
-
-  /**
-   * Erases a vertex from the set of control vertices.
-   * @param vd the vertex to be erased
-   * @return `true` if `vd` was a control vertex.
-   */
-  bool erase_control_vertex(vertex_descriptor vd)
-  {
-    if(!is_control_vertex(vd)) { return false; }
-
-    need_preprocess_factorization=true;
-    is_ctrl_map[id(vd)] = false;
-    return true;
-  }
-
-  /**
-   * Inserts a range of vertices in the region-of-interest
-   * @tparam InputIterator input iterator with `vertex_descriptor` as value type
-   * @param begin first iterator of the range of vertices
-   * @param end past-the-end iterator of the range of vertices
-   */
-  template<class InputIterator>
-  void insert_roi_vertices(InputIterator begin, InputIterator end)
-  {
-    for( ;begin != end; ++begin)
-    {
-      insert_roi_vertex(*begin);
-    }
-  }
-
-  /**
-   * Inserts a vertex in the region-of-interest
-   * @param vd the vertex to be inserted
-   * @return `true` if `vd` is not already in the region-of-interest.
-   */
-  bool insert_roi_vertex(vertex_descriptor vd)
-  {
-    if(is_roi_vertex(vd)) { return false; }
-    need_preprocess_both();
-
-    is_roi_map[id(vd)] = true;
-    roi.push_back(vd);
-    return true;
-  }
-
-  /**
-   * Erases a vertex from the region-of-interest and the set of control vertices.
-   * \note At the next call to `preprocess()`, any vertex that is no longer in the region-of-interest will be assigned to its original position
-   * (that is the position of the vertex at the time of construction or after the last call to `overwrite_initial_geometry()`).
-   * @param vd the vertex to be erased
-   * @return `true` `vd` was a vertex from the region-of-interest.
-   */
-  bool erase_roi_vertex(vertex_descriptor vd)
-  {
-    if(!is_roi_vertex(vd)) { return false; }
-
-    erase_control_vertex(vd); // also erase from being control
-
-    typename std::vector<vertex_descriptor>::iterator it = std::find(roi.begin(), roi.end(), vd);
-    if(it != roi.end())
-    {
-      is_roi_map[id(vd)] = false;
-      roi.erase(it);
-
-      need_preprocess_both();
-      return true;
-    }
-
-    CGAL_assertion(false); // inconsistency between is_roi_map, and roi vector!
-    return false;
-  }
-
-  /**
-   * Preprocessing function that need to be called each time the region-of-interest or the set
-   * of control vertices are changed before calling `deform()`.
-   * If not already done, `deform()` first calls this function.
-   * \cgalAdvancedBegin
-   * Collects the vertices not in the region-of-interest that are adjacent to a vertex from the
-   * region-of-interest (these vertices are internally considered as fixed control vertices).
-   * Then assembles and factorizes the Laplacian matrix used in the function `deform()`.
-   * \cgalAdvancedEnd
-   * \note A modification of the set of control vertices or the region-of-interest invalidates the
-   * preprocessing data.
-   * @return `true` if successful.
-   * A common reason for failure is that the system is rank deficient,
-   * which happens for example when all the vertices are in the region-of-interest and no control vertices are set, or
-   * if the weighting scheme used features too many zero and breaks the connectivity information.
-   */
-  bool preprocess()
-  {
-    region_of_solution();
-    assemble_laplacian_and_factorize();
-    return last_preprocess_successful; // which is set by assemble_laplacian_and_factorize()
-  }
-/// @} Preprocessing
-
-/// \name Deformation
-/// @{
-
-  /**
-   * Sets the target position of a control vertex.
-   * @param vd the control vertex the target position is set
-   * @param target_position the new target position
-   */
-  void set_target_position(vertex_descriptor vd, const Point& target_position)
-  {
-    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
-
-    if(!is_control_vertex(vd)) { return; }
-    solution[ros_id(vd)] = target_position;
-  }
-
-  /**
-   * Updates the target position of `vd` by applying     a translation of vector `t`.
-   *
-   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
-   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
-   *
-   * @param vd a control vertex
-   * @param t translation vector
-   * \pre `is_control_vertex(vd)`
-   */
-  template<class Vect>
-  void translate(vertex_descriptor vd, const Vect& t)
-  {
-    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
-
-    std::size_t v_id = ros_id(vd);
-    solution[v_id] = add_to_point(solution[v_id], t);
-  }
-
-  /**
-   * Equivalent to calling the overload taking only one control vertex, for each vertex in the range `[begin,end[`.
-   *
-   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
-   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
-   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
-   *
-   * @param begin first iterator of the range of vertices
-   * @param end past-the-end iterator of the range of vertices
-   * @param t translation vector
-   */
-  template<class InputIterator, class Vect>
-  void translate(InputIterator begin, InputIterator end, const Vect& t)
-  {
-    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
-
-    for(; begin != end; ++begin) {
-      std::size_t v_id = ros_id(*begin);
-      solution[v_id] = add_to_point(solution[v_id], t);
-    }
-  }
-
-  /**
-   * Updates the target position of `vd` by applying to its last target position
-   * a rotation defined by the quaternion `quat`, the center of the rotation being
-   * the origin translated by `to_rotation_center` .
-   *
-   * @tparam Quaternion is a quaternion class with `Vect operator*(Quaternion, Vect)` returning the product of a quaternion with a vector
-   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
-   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
-   *
-   * @param vd a control vertex
-   * @param to_rotation_center the vector to translate the origin to the center of the rotation
-   * @param quat quaternion of the rotation
-   * \pre `is_control_vertex(vd)`
-   * \pre `quad` represents a rotation
-   */
-  template <typename Quaternion, typename Vect>
-  void rotate(vertex_descriptor vd, const Vect& to_rotation_center, const Quaternion& quat)
-  {
-    CGAL_precondition( is_control_vertex(vd) );
-    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
-
-    std::size_t v_id = ros_id(vd);
-    Vect v = quat * sub_to_vect(solution[v_id], to_rotation_center);
-    solution[v_id] = Point( to_rotation_center[0]+v[0],
-                            to_rotation_center[1]+v[1],
-                            to_rotation_center[2]+v[2] );
-  }
-
-  /**
-   * Equivalent to calling the overload taking only one control vertex, for each vertex in the range `[begin,end[`.
-   *
-   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
-   * @tparam Quaternion is a quaternion class with `Vect operator*(Quaternion, Vect)` returning the product of a quaternion with a vector
-   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
-   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
-   *
-   * @param begin first iterator of the range of vertices
-   * @param end past-the-end iterator of the range of vertices
-   * @param to_rotation_center the vector to translate the origin to the center of the rotation
-   * @param quat quaternion of the rotation
-   * \pre `quad` represents a rotation
-   */
-  template <typename InputIterator, typename Vect, typename Quaternion>
-  void rotate(InputIterator begin, InputIterator end, const Vect& to_rotation_center, const Quaternion& quat)
-  {
-    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
-
-    for(; begin != end; ++begin) {
-      std::size_t v_id = ros_id(*begin);
-      Vect v = quat * sub_to_vect(solution[v_id], to_rotation_center);
-      solution[v_id] = Point( to_rotation_center[0]+v[0],
-                              to_rotation_center[1]+v[1],
-                              to_rotation_center[2]+v[2] );
-    }
-  }
-
-  /**
-    * Returns the target position of a control vertex.
-    * \param vd a control vertex
-    * \pre `is_control_vertex(vd)`
-    */
-  const Point& target_position(vertex_descriptor vd)
-  {
-    region_of_solution();
-
-    CGAL_precondition( is_control_vertex(vd) );
-    return solution[ ros_id(vd) ];
-  }
-
-  /**
-   * Deforms the region-of-interest according to the deformation algorithm, using the target positions of each control vertex set by using `rotate()`, `translate()`, or `set_target_position()`.
-   * The points associated to each vertex of the input graph that are inside the region-of-interest are updated.
-   * \note Nothing happens if `preprocess()` returns `false`.
-   * @see set_iterations(unsigned int iterations), set_tolerance(double tolerance), deform(unsigned int iterations, double tolerance)
-   */
-  void deform()
-  {
-    deform(m_iterations, m_tolerance);
-  }
-
-  /**
-   * Same as `deform()` but the number of iterations and the tolerance are one-time parameters.
-   * @param iterations number of iterations for optimization procedure
-   * @param tolerance tolerance of convergence (see explanations set_tolerance(double tolerance))
-   */
-  void deform(unsigned int iterations, double tolerance)
-  {
-    preprocess();
-
-    if(!last_preprocess_successful) {
-      CGAL_warning(false);
-      return;
-    }
-    // Note: no energy based termination occurs at first iteration
-    // because comparing energy of original model (before deformation) and deformed model (deformed_1_iteration)
-    // simply does not make sense, comparison is meaningful between deformed_(i)_iteration & deformed_(i+1)_iteration
-
-    double energy_this = 0; // initial value is not important, because we skip first iteration
-    double energy_last;
-
-    // iterations
-    for ( unsigned int ite = 0; ite < iterations; ++ite)
-    {
-      // main steps of optimization
-      update_solution();
-#ifndef CGAL_DEFORM_MESH_JUST_EXPERIMENTAL_SCALE
-      optimal_rotations();
-#endif
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
-      optimal_scales();
-#endif
-      // energy based termination
-      if(tolerance > 0.0 && (ite + 1) < iterations) // if tolerance <= 0 then don't compute energy
-      {                                             // also no need compute energy if this iteration is the last iteration
-        energy_last = energy_this;
-        energy_this = energy();
-        CGAL_warning(energy_this >= 0);
-
-        if(ite != 0) // skip first iteration
-        {
-          double energy_dif = std::abs((energy_last - energy_this) / energy_this);
-          if ( energy_dif < tolerance ) { break; }
-        }
-      }
-    }
-    // copy solution to the target surface mesh
-    assign_solution();
-  }
-
-  /**
-   * Resets the points associated to the vertices of the region-of-interest at their
-   * initial positions at time of the functor construction or after
-   * the last call to `overwrite_initial_geometry()`.
-   * \note if the region-of-interest or the set of control vertices have been
-   * modified since the last call to `preprocess()`, it will be called prior
-   * to the reset.
-   */
-  void reset()
-  {
-    if(roi.empty()) { return; } // no ROI to reset
-
-    region_of_solution(); // since we are using original vector
-
-    //restore the current positions to be the original positions
-    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
-    {
-      put(vertex_point_map, vd, original[ros_id(vd)]);
-      solution[ros_id(vd)]=original[ros_id(vd)];
-    }
-
-    // also set rotation matrix to identity
-    std::fill(rot_mtr.begin(), rot_mtr.end(),
-              Closest_rotation_traits().identity_matrix());
-  }
-
-  /**
-   * Sets the initial positions of the vertices from the region-of-interest to the current positions. Calling this function has the same effect as creating
-   * a new deformation object with the current deformed halfedge-graph, keeping the region-of-interest and the set of control vertices.
-   * \note if the region-of-interest or the set of control vertices have been modified since the last call to `preprocess()`,
-   * it will be called prior to the overwrite.
-   *
-   * \cgalAdvancedBegin
-   * This function might have a non-negligible effect on the result.
-   * The Laplacian matrix of the free vertices and the optimal rotations
-   * are computed using the original positions of the points
-   * associated to the vertices. Thus, if a deformed version of the surface mesh
-   * is used as reference, the surface mesh properties the algorithm
-   * tries to preserve are those of an altered version (which are already
-   * degraded).
-   * \cgalAdvancedEnd
-   */
-  void overwrite_initial_geometry()
-  {
-    if(roi.empty()) { return; } // no ROI to overwrite
-
-    region_of_solution(); // the roi should be preprocessed since we are using original_position vec
-
-    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
-    {
-      original[ros_id(vd)] = get(vertex_point_map, vd);
-    }
-
-    // now I need to compute weights for halfedges incident to roi vertices
-    std::vector<bool> is_weight_computed(2*num_edges(m_halfedge_graph), false);
-    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
-    {
-      in_edge_iterator e, e_end;
-      for (cpp11::tie(e,e_end) = in_edges(vd, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-        std::size_t id_e = id(he);
-        if(is_weight_computed[id_e]) { continue; }
-
-        hedge_weight[id_e] = weight_calculator(he, m_halfedge_graph, vertex_point_map);
-        is_weight_computed[id_e] = true;
-
-        halfedge_descriptor e_opp = opposite(he, m_halfedge_graph);
-        std::size_t id_e_opp = id(e_opp);
-
-        hedge_weight[id_e_opp] = weight_calculator(e_opp, m_halfedge_graph, vertex_point_map);
-        is_weight_computed[id_e_opp] = true;
-      }
-    }
-
-    // also set rotation matrix to identity
-    std::fill(rot_mtr.begin(), rot_mtr.end(), Closest_rotation_traits().identity_matrix());
-
-    need_preprocess_both(); // now we need reprocess
-  }
-
-/// @} Deformation
-
-/// \name Utilities
-/// @{
-
-  /**
-   * Gets the default number of iterations (5) or the value passed to the function `set_iterations()`
-   */
-  unsigned int iterations()
-  { return m_iterations; }
-
-  /**
-   * Gets the default tolerance parameter (1e-4) or the value passed to the function `set_tolerance()`
-   */
-  double tolerance()
-  { return m_tolerance; }
-
-  /**
-   * Sets the maximum number of iterations ran by `deform()`
-   */
-  void set_iterations(unsigned int iterations)
-  { this->m_iterations = iterations; }
-
-   /// @brief Sets the tolerance of the convergence used in `deform()`.
-   /// If `tolerance==0`, no energy based termination criteria is used (preventing to do the energy computation at each iteration step)
-   ///
-   /// `tolerance >` \f$|\mathrm{energy}(m_i) - \mathrm{energy}(m_{i-1})| / \mathrm{energy}(m_i)\f$ will be used as a termination criterium.
-  void set_tolerance(double tolerance)
-  { this->m_tolerance = tolerance; }
-
-  /**
-   * Returns the range of vertices in the region-of-interest.
-   */
-  Roi_vertex_range roi_vertices() const
-  {
-    return roi;
-  }
-
-  /**
-   * Tests whether a vertex is inside the region-of-interest.
-   * @param vd the query vertex
-   * @return `true` if `vd` has been inserted to (and not erased from) the region-of-interest.
-   */
-  bool is_roi_vertex(vertex_descriptor vd) const
-  { return is_roi_map[id(vd)]; }
-
-  /**
-   * Tests whether a vertex is a control vertex.
-   * @param vd the query vertex
-   * @return `true` if `vd` has been inserted to (and not erased from) the set of control vertices.
-   */
-  bool is_control_vertex(vertex_descriptor vd) const
-  { return is_ctrl_map[id(vd)]; }
-
-  /**
-   * Provides access to the halfedge graph being deformed
-   */
-  const Halfedge_graph& halfedge_graph() const
-  { return m_halfedge_graph; }
-
-/// @} Utilities
-
-
-private:
-
-  /// Assigns id to one ring neighbor of vd, and also push them into push_vector
-  void assign_ros_id_to_one_ring(vertex_descriptor vd,
-                             std::size_t& next_id,
-                             std::vector<vertex_descriptor>& push_vector)
-  {
-    in_edge_iterator e, e_end;
-    for (cpp11::tie(e,e_end) = in_edges(vd, m_halfedge_graph); e != e_end; e++)
-    {
-      vertex_descriptor vt = source(*e, m_halfedge_graph);
-      if(ros_id(vt) == (std::numeric_limits<std::size_t>::max)())  // neighboring vertex which is outside of roi and not visited previously (i.e. need an id)
-      {
-        ros_id(vt) = next_id++;
-        push_vector.push_back(vt);
-      }
-    }
-  }
-
-  /// Find region of solution, including roi and hard constraints, which is the 1-ring vertices out roi
-  /// Contains four parts:
-  ///  - if there is any vertex which is no longer roi, set its position back to original position
-  ///  - assign a ros id to vertices inside ros + ros-boundary
-  ///  - reinitialize rotation matrices, if a vertex is previously ros, use its previous matrix, otherwise set zero
-  ///  - reinitialize original, and solution,
-  ///      + if a vertex is previously roi, then use its original position in old_origional, else use point().
-  ///        In both case we are using "original position" of the vertex.
-  ///      + same for solution (it is required to prevent jumping effects)
-  void region_of_solution()
-  {
-    if(!need_preprocess_region_of_solution) { return; }
-    need_preprocess_region_of_solution = false;
-
-    std::vector<std::size_t>  old_ros_id_map = ros_id_map;
-    std::vector<CR_matrix>    old_rot_mtr    = rot_mtr;
-    std::vector<Point>        old_solution   = solution;
-    std::vector<Point>        old_original   = original;
-
-    // any vertices which are no longer ROI, should be assigned to their original position, so that:
-    // IF a vertex is ROI (actually if its ros + boundary) previously (when previous region_of_solution() is called)
-    // we have its original position in old_original
-    // ELSE
-    // we have its original position in vertex->point()
-    // (current ros is actually old ros - we did not change it yet)
-    for(typename std::vector<vertex_descriptor>::iterator it = ros.begin(); it != ros.end(); ++it)
-    {
-      if(!is_roi_vertex(*it)) {
-        put(vertex_point_map, *it, old_original[ old_ros_id_map[id(*it)] ]);
-      }
-    }
-
-    ////////////////////////////////////////////////////////////////
-    // assign id to vertices inside: roi, boundary of roi (roi + boundary of roi = ros),
-    //                               and boundary of ros
-    // keep in mind that id order does not have to be compatible with ros order
-    ros.clear(); // clear ros
-    ros.insert(ros.end(), roi.begin(), roi.end());
-
-    ros_id_map.assign(num_vertices(m_halfedge_graph), (std::numeric_limits<std::size_t>::max)()); // use max as not assigned mark
-
-    for(std::size_t i = 0; i < roi.size(); i++)  // assign id to all roi vertices
-    { ros_id(roi[i]) = i; }
-
-    // now assign an id to vertices on boundary of roi
-    std::size_t next_ros_index = roi.size();
-    for(std::size_t i = 0; i < roi.size(); i++)
-    { assign_ros_id_to_one_ring(roi[i], next_ros_index, ros); }
-
-    std::vector<vertex_descriptor> outside_ros;
-    // boundary of ros also must have ids because in CR calculation,
-    // one-ring neighbor of ROS vertices are reached.
-    for(std::size_t i = roi.size(); i < ros.size(); i++)
-    { assign_ros_id_to_one_ring(ros[i], next_ros_index, outside_ros); }
-    ////////////////////////////////////////////////////////////////
-
-    // initialize the rotation matrices (size: ros)
-    rot_mtr.resize(ros.size());
-    for(std::size_t i = 0; i < rot_mtr.size(); i++)
-    {
-      std::size_t v_ros_id = ros_id(ros[i]);
-      std::size_t v_id = id(ros[i]);
-
-      // any vertex which is previously ROS has a rotation matrix
-      // use that matrix to prevent jumping effects
-      if(old_ros_id_map[v_id] != (std::numeric_limits<std::size_t>::max)()
-          && old_ros_id_map[v_id] < old_rot_mtr.size()) {
-          // && boundary of ros vertices also have ids so check whether it is ros
-        rot_mtr[v_ros_id] = old_rot_mtr[ old_ros_id_map[v_id] ];
-      }
-      else {
-        rot_mtr[v_ros_id] = Closest_rotation_traits().identity_matrix();
-      }
-    }
-
-    // initialize solution and original (size: ros + boundary_of_ros)
-
-    // for simplifying coding effort, I also put boundary of ros into solution and original
-    // because boundary of ros vertices are reached in optimal_rotations() and energy()
-    solution.resize(ros.size() + outside_ros.size());
-    original.resize(ros.size() + outside_ros.size());
-
-    for(std::size_t i = 0; i < ros.size(); i++)
-    {
-      std::size_t v_ros_id = ros_id(ros[i]);
-      std::size_t v_id = id(ros[i]);
-
-      if(is_roi_vertex(ros[i]) && old_ros_id_map[v_id] != (std::numeric_limits<std::size_t>::max)()) {
-        // if it is currently roi and previously ros + boundary
-        // (actually I just need to assign old's to new's if a vertex is currently and previously ROI
-        // but no harm on assigning if its also previously ros + boundary because
-        // those(old_original & old_solution) will be equal to original position)
-        original[v_ros_id] = old_original[old_ros_id_map[v_id]];
-        solution[v_ros_id] = old_solution[old_ros_id_map[v_id]];
-      }
-      else {
-        solution[v_ros_id] = get(vertex_point_map, ros[i]);
-        original[v_ros_id] = get(vertex_point_map, ros[i]);
-      }
-    }
-
-    for(std::size_t i = 0; i < outside_ros.size(); ++i)
-    {
-      std::size_t v_ros_id = ros_id(outside_ros[i]);
-      original[v_ros_id] = get(vertex_point_map, outside_ros[i]);
-      solution[v_ros_id] = get(vertex_point_map, outside_ros[i]);
-    }
-
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
-    scales.resize(ros.size());
-    std::fill(scales.begin(), scales.end(), 1.0);
-#endif
-  }
-
-  /// Assemble Laplacian matrix A of linear system A*X=B
-  void assemble_laplacian_and_factorize()
-  {
-    if(TAG == SPOKES_AND_RIMS)
-    {
-      assemble_laplacian_and_factorize_spokes_and_rims();
-    }
-    else
-    {
-      assemble_laplacian_and_factorize_arap();
-    }
-  }
-  /// Construct matrix that corresponds to left-hand side of eq:lap_ber in user manual
-  /// Also constraints are integrated as eq:lap_energy_system in user manual
-  void assemble_laplacian_and_factorize_arap()
-  {
-    if(!need_preprocess_factorization) { return; }
-    need_preprocess_factorization = false;
-
-    typename Sparse_linear_solver::Matrix A(ros.size());
-
-    /// assign cotangent Laplacian to ros vertices
-    for(std::size_t k = 0; k < ros.size(); k++)
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )          // vertices of ( roi - ctrl )
-      {
-        double diagonal = 0;
-        in_edge_iterator e, e_end;
-        for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
-        {
-          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-          vertex_descriptor vj = source(he, m_halfedge_graph);
-          double wij = hedge_weight[id(he)];  // edge(pi - pj)
-          double wji = hedge_weight[id(opposite(he, m_halfedge_graph))]; // edge(pi - pj)
-          double total_weight = wij + wji;
-
-          A.set_coef(vi_id, ros_id(vj), -total_weight, true); // off-diagonal coefficient
-          diagonal += total_weight;
-        }
-        // diagonal coefficient
-        A.set_coef(vi_id, vi_id, diagonal, true);
-      }
-      else
-      {
-        A.set_coef(vi_id, vi_id, 1.0, true);
-      }
-    }
-
-    // now factorize
-    double D;
-    last_preprocess_successful = m_solver.factor(A, D);
-    CGAL_warning(last_preprocess_successful);
-  }
-  /// Construct matrix that corresponds to left-hand side of eq:lap_ber_rims in user manual
-  /// Also constraints are integrated as eq:lap_energy_system in user manual
-  void assemble_laplacian_and_factorize_spokes_and_rims()
-  {
-    if(!need_preprocess_factorization) { return; }
-    need_preprocess_factorization = false;
-
-    typename Sparse_linear_solver::Matrix A(ros.size());
-
-    /// assign cotangent Laplacian to ros vertices
-    for(std::size_t k = 0; k < ros.size(); k++)
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      if ( is_roi_vertex(vi) && !is_control_vertex(vi) ) // vertices of ( roi - ctrl ): free vertices
-      {
-        double diagonal = 0;
-        out_edge_iterator e, e_end;
-        for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
-        {
-          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-          double total_weight = 0;
-          // an edge contribute to energy only if it is part of an incident triangle
-          // (i.e it should not be a border edge)
-          if(!is_border(he, m_halfedge_graph))
-          {
-            double wji = hedge_weight[id(he)]; // edge(pj - pi)
-            total_weight += wji;
-          }
-
-          halfedge_descriptor opp = opposite(he, m_halfedge_graph);
-          if(!is_border(opp, m_halfedge_graph))
-          {
-            double wij = hedge_weight[id(opp)]; // edge(pi - pj)
-            total_weight += wij;
-          }
-
-          // place coefficient to matrix
-          vertex_descriptor vj = target(he, m_halfedge_graph);
-          A.set_coef(vi_id, ros_id(vj), -total_weight, true); // off-diagonal coefficient
-          diagonal += total_weight;
-        }
-        // diagonal coefficient
-        A.set_coef(vi_id, vi_id, diagonal, true);
-      }
-      else // constrained vertex
-      {
-        A.set_coef(vi_id, vi_id, 1.0, true);
-      }
-    }
-
-    // now factorize
-    double D;
-    last_preprocess_successful = m_solver.factor(A, D);
-    CGAL_warning(last_preprocess_successful);
-  }
-
-  /// Local step of iterations, computing optimal rotation matrices
-  void optimal_rotations()
-  {
-    if(TAG == SPOKES_AND_RIMS)
-    {
-      optimal_rotations_spokes_and_rims();
-    }
-    else
-    {
-      optimal_rotations_arap();
-    }
-  }
-  void optimal_rotations_arap()
-  {
-    Closest_rotation_traits cr_traits;
-    CR_matrix cov = cr_traits.zero_matrix();
-
-    // only accumulate ros vertices
-    for ( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      // compute covariance matrix (user manual eq:cov_matrix)
-      cov = cr_traits.zero_matrix();
-
-      in_edge_iterator e, e_end;
-
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
-      cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph);
-      double ne_i=std::distance(e,e_end);
-#endif
-      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he=halfedge(*e, m_halfedge_graph);
-        vertex_descriptor vj = source(he, m_halfedge_graph);
-        std::size_t vj_id = ros_id(vj);
-
-        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
-        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
-        double wij = hedge_weight[id(he)];
-
-        cr_traits.add_scalar_t_vector_t_vector_transpose(cov, wij, pij, qij); // cov += wij * (pij * qij)
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
-        // add neighbor rotation
-        cov += m_sr_arap_alpha * rot_mtr[vj_id].transpose() / ne_i;
-#endif
-
-      }
-
-      cr_traits.compute_close_rotation(cov, rot_mtr[vi_id]);
-    }
-  }
-  void optimal_rotations_spokes_and_rims()
-  {
-    Closest_rotation_traits cr_traits;
-    CR_matrix cov =cr_traits.zero_matrix();
-
-    // only accumulate ros vertices
-    for ( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      // compute covariance matrix
-      cov = cr_traits.zero_matrix();
-
-      //iterate through all triangles
-      out_edge_iterator e, e_end;
-      for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-        if(is_border(he, m_halfedge_graph)) { continue; } // no facet
-        // iterate edges around facet
-        halfedge_descriptor hedge_around_facet = he;
-        do
-        {
-          vertex_descriptor v1 = target(hedge_around_facet, m_halfedge_graph);
-          vertex_descriptor v2 = source(hedge_around_facet, m_halfedge_graph);
-
-          std::size_t v1_id = ros_id(v1); std::size_t v2_id = ros_id(v2);
-
-          const CR_vector& p12 = sub_to_CR_vector(original[v1_id], original[v2_id]);
-          const CR_vector& q12 = sub_to_CR_vector(solution[v1_id], solution[v2_id]);
-          double w12 = hedge_weight[id(hedge_around_facet)];
-
-          cr_traits.add_scalar_t_vector_t_vector_transpose(cov, w12, p12, q12); // cov += w12 * (p12 * q12);
-
-        } while( (hedge_around_facet = next(hedge_around_facet, m_halfedge_graph)) != he);
-      }
-
-      cr_traits.compute_close_rotation(cov, rot_mtr[vi_id]);
-    }
-  }
-
-#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
-  void optimal_scales()
-  {
-    for ( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      // compute covariance matrix (user manual eq:cov_matrix)
-      double eT_eR = 0, eRT_eR = 0;
-
-      in_edge_iterator e, e_end;
-      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he = *e;
-        vertex_descriptor vj = source(he, m_halfedge_graph);
-        std::size_t vj_id = ros_id(vj);
-
-        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
-        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
-
-        double wij = hedge_weight[id(he)];
-
-        const CR_vector& pRij = rot_mtr[vi_id] * pij;
-        eRT_eR += pRij[0]*pRij[0] + pRij[1]*pRij[1] + pRij[2]*pRij[2];
-        eT_eR  += qij[0]*pRij[0]  + qij[1]*pRij[1]  + qij[2]*pRij[2];
-      }
-
-      scales[vi_id] = eT_eR / eRT_eR;
-    }
-  }
-#endif
-
-  /// Global step of iterations, updating solution
-  void update_solution()
-  {
-    if(TAG == SPOKES_AND_RIMS)
-    {
-      update_solution_spokes_and_rims();
-    }
-    else
-    {
-      update_solution_arap();
-    }
-  }
-  /// calculate right-hand side of eq:lap_ber in user manual and solve the system
-  void update_solution_arap()
-  {
-    typename Sparse_linear_solver::Vector X(ros.size()), Bx(ros.size());
-    typename Sparse_linear_solver::Vector Y(ros.size()), By(ros.size());
-    typename Sparse_linear_solver::Vector Z(ros.size()), Bz(ros.size());
-
-    Closest_rotation_traits cr_traits;
-
-    // assemble right columns of linear system
-    for ( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-
-      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )
-      {// free vertices
-        // sum of right-hand side of eq:lap_ber in user manual
-        CR_vector xyz = cr_traits.vector(0, 0, 0);
-
-        in_edge_iterator e, e_end;
-        for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
-        {
-          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-          vertex_descriptor vj = source(he, m_halfedge_graph);
-          std::size_t vj_id = ros_id(vj);
-
-          const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
-
-          double wij = hedge_weight[id(he)];
-          double wji = hedge_weight[id(opposite(he, m_halfedge_graph))];
-#ifndef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
-          cr_traits.add__scalar_t_matrix_p_scalar_t_matrix__t_vector(xyz, wij, rot_mtr[vi_id], wji, rot_mtr[vj_id], pij);
-#else
-        cr_traits.add__scalar_t_matrix_p_scalar_t_matrix__t_vector(xyz, wij * scales[vi_id], rot_mtr[vi_id],
-          wji * scales[vj_id], rot_mtr[vj_id], pij);
-#endif
-          // corresponds xyz += (wij*rot_mtr[vi_id] + wji*rot_mtr[vj_id]) * pij
-        }
-        Bx[vi_id] = cr_traits.vector_coordinate(xyz, 0);
-        By[vi_id] = cr_traits.vector_coordinate(xyz, 1);
-        Bz[vi_id] = cr_traits.vector_coordinate(xyz, 2);
-      }
-      else
-      {// constrained vertex
-        Bx[vi_id] = solution[vi_id][0]; By[vi_id] = solution[vi_id][1]; Bz[vi_id] = solution[vi_id][2];
-      }
-    }
-
-    // solve "A*X = B".
-    bool is_all_solved = m_solver.linear_solver(Bx, X) && m_solver.linear_solver(By, Y) && m_solver.linear_solver(Bz, Z);
-    if(!is_all_solved) {
-      CGAL_warning(false);
-      return;
-    }
-    // copy to solution
-    for (std::size_t i = 0; i < ros.size(); i++)
-    {
-      std::size_t v_id = ros_id(ros[i]);
-      Point p(X[v_id], Y[v_id], Z[v_id]);
-      solution[v_id] = p;
-    }
-  }
-  /// calculate right-hand side of eq:lap_ber_rims in user manual and solve the system
-  void update_solution_spokes_and_rims()
-  {
-    typename Sparse_linear_solver::Vector X(ros.size()), Bx(ros.size());
-    typename Sparse_linear_solver::Vector Y(ros.size()), By(ros.size());
-    typename Sparse_linear_solver::Vector Z(ros.size()), Bz(ros.size());
-
-    Closest_rotation_traits cr_traits;
-
-    // assemble right columns of linear system
-    for ( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-
-      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )
-      {// free vertices
-        // sum of right-hand side of eq:lap_ber_rims in user manual
-        CR_vector xyz = cr_traits.vector(0, 0, 0);
-
-        out_edge_iterator e, e_end;
-        for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
-        {
-          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-          vertex_descriptor vj = target(he, m_halfedge_graph);
-          std::size_t vj_id = ros_id(vj);
-
-          const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
-
-          if(!is_border(he, m_halfedge_graph))
-          {
-            vertex_descriptor vn = target(next(he, m_halfedge_graph), m_halfedge_graph); // opp vertex of e_ij
-            double wji = hedge_weight[id(he)] / 3.0;  // edge(pj - pi)
-            cr_traits.add_scalar_t_matrix_sum_t_vector(xyz, wji, rot_mtr[vi_id], rot_mtr[vj_id], rot_mtr[ros_id(vn)], pij);
-            // corresponds  xyz += wji*(rot_mtr[vi_id] + rot_mtr[vj_id] + rot_mtr[ros_id(vn)])*pij;
-          }
-
-          halfedge_descriptor opp = opposite(he, m_halfedge_graph);
-          if(!is_border(opp, m_halfedge_graph))
-          {
-            vertex_descriptor vm = target(next(opp, m_halfedge_graph), m_halfedge_graph); // other opp vertex of e_ij
-            double wij = hedge_weight[id(opp)] / 3.0;  // edge(pi - pj)
-            cr_traits.add_scalar_t_matrix_sum_t_vector(xyz, wij, rot_mtr[vi_id], rot_mtr[vj_id], rot_mtr[ros_id(vm)], pij);
-            // corresponds xyz += wij * ( rot_mtr[vi_id] + rot_mtr[vj_id] + rot_mtr[ros_id(vm)] ) * pij
-          }
-        }
-        Bx[vi_id] = cr_traits.vector_coordinate(xyz, 0);
-        By[vi_id] = cr_traits.vector_coordinate(xyz, 1);
-        Bz[vi_id] = cr_traits.vector_coordinate(xyz, 2);
-      }
-      else
-      {// constrained vertices
-        Bx[vi_id] = solution[vi_id][0]; By[vi_id] = solution[vi_id][1]; Bz[vi_id] = solution[vi_id][2];
-      }
-    }
-    // solve "A*X = B".
-    bool is_all_solved = m_solver.linear_solver(Bx, X) && m_solver.linear_solver(By, Y) && m_solver.linear_solver(Bz, Z);
-    if(!is_all_solved) {
-      CGAL_warning(false);
-      return;
-    }
-
-    // copy to solution
-    for (std::size_t i = 0; i < ros.size(); i++)
-    {
-      std::size_t v_id = ros_id(ros[i]);
-      Point p(X[v_id], Y[v_id], Z[v_id]);
-      solution[v_id] = p;
-    }
-  }
-
-  /// Assign solution to target surface mesh
-  void assign_solution()
-  {
-    for(std::size_t i = 0; i < ros.size(); ++i){
-      std::size_t v_id = ros_id(ros[i]);
-      if(is_roi_vertex(ros[i]))
-      {
-        put(vertex_point_map, ros[i], solution[v_id]);
-      }
-    }
-  }
-
-  /// Compute modeling energy
-  double energy() const
-  {
-    if(TAG == SPOKES_AND_RIMS)
-    {
-      return energy_spokes_and_rims();
-    }
-    else
-    {
-      return energy_arap();
-      return 0;
-    }
-  }
-  double energy_arap() const
-  {
-    Closest_rotation_traits cr_traits;
-
-    double sum_of_energy = 0;
-    // only accumulate ros vertices
-    for( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-
-      in_edge_iterator e, e_end;
-      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-        vertex_descriptor vj = source(he, m_halfedge_graph);
-        std::size_t vj_id = ros_id(vj);
-
-        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
-        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
-
-        double wij = hedge_weight[id(he)];
-
-        sum_of_energy += wij * cr_traits.squared_norm_vector_scalar_vector_subs(qij, rot_mtr[vi_id], pij);
-        // sum_of_energy += wij * ( qij - rot_mtr[vi_id]*pij )^2
-      }
-    }
-    return sum_of_energy;
-  }
-  double energy_spokes_and_rims() const
-  {
-    Closest_rotation_traits cr_traits;
-
-    double sum_of_energy = 0;
-    // only accumulate ros vertices
-    for( std::size_t k = 0; k < ros.size(); k++ )
-    {
-      vertex_descriptor vi = ros[k];
-      std::size_t vi_id = ros_id(vi);
-      //iterate through all triangles
-      out_edge_iterator e, e_end;
-      for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
-      {
-        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
-        if(is_border(he, m_halfedge_graph)) { continue; } // no facet
-        // iterate edges around facet
-        halfedge_descriptor hedge_around_facet = he;
-        do
-        {
-          vertex_descriptor v1 = target(hedge_around_facet, m_halfedge_graph);
-          vertex_descriptor v2 = source(hedge_around_facet, m_halfedge_graph);
-          std::size_t v1_id = ros_id(v1); std::size_t v2_id = ros_id(v2);
-
-          const CR_vector& p12 = sub_to_CR_vector(original[v1_id], original[v2_id]);
-          const CR_vector& q12 = sub_to_CR_vector(solution[v1_id], solution[v2_id]);
-          double w12 = hedge_weight[id(hedge_around_facet)];
-
-          sum_of_energy += w12 * cr_traits.squared_norm_vector_scalar_vector_subs(q12, rot_mtr[vi_id], p12);
-          // sum_of_energy += w12 * ( q12 - rot_mtr[vi_id]*p12 )^2
-
-        } while( (hedge_around_facet = next(hedge_around_facet, m_halfedge_graph)) != he);
-      }
-    }
-    return sum_of_energy;
-  }
-
-  void need_preprocess_both()
-  {
-    need_preprocess_factorization = true;
-    need_preprocess_region_of_solution = true;
-  }
-
-  /// p1 - p2, return CR_vector
-  CR_vector sub_to_CR_vector(const Point& p1, const Point& p2) const
-  {
-    return Closest_rotation_traits().vector(p1[0] - p2[0], p1[1] - p2[1], p1[2] - p2[2]);
-  }
-
-  template<class Vect>
-  Point add_to_point(const Point& p, const Vect& v) {
-    return Point(p[0] + v[0], p[1] + v[1], p[2] + v[2]);
-  }
-
-  template<class Vect>
-  Vect sub_to_vect(const Point& p, const Vect& v) {
-    return Vect(p[0] - v[0], p[1] - v[1], p[2] - v[2]);
-  }
-
-  /// shorthand of get(vertex_index_map, v)
-  std::size_t id(vertex_descriptor vd) const
-  { return get(vertex_index_map, vd); }
-
-  std::size_t& ros_id(vertex_descriptor vd)
-  { return ros_id_map[id(vd)]; }
-  std::size_t  ros_id(vertex_descriptor vd) const
-  { return ros_id_map[id(vd)]; }
-
-  /// shorthand of get(hedge_index_map, e)
-  std::size_t id(halfedge_descriptor e) const
-  {
-    return get(hedge_index_map, e);
-  }
-};
-} //namespace CGAL
-#endif  // CGAL_SURFACE_MESH_DEFORMATION_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/edge_collapse.h
deleted file mode 100644
index 6604cc5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/edge_collapse.h
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright (c) 2006  GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando.cacciola at geometryfactory.com>
-//
-#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H
-#define CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H 1
-
-#include <CGAL/boost/graph/properties.h>
-#include <CGAL/boost/graph/named_function_params.h>
-
-#include <CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h>
-#include <CGAL/Surface_mesh_simplification/Detail/Common.h>
-#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h>
-
-namespace CGAL {
-
-namespace Surface_mesh_simplification
-{
-
-template<class ECM
-        ,class ShouldStop
-        ,class VertexIndexMap
-        ,class VertexPointMap
-        ,class EdgeIndexMap
-        ,class EdgeIsConstrainedMap
-        ,class GetCost
-        ,class GetPlacement
-        ,class Visitor
-        >
-int edge_collapse ( ECM&                       aSurface
-                  , ShouldStop           const& aShould_stop
-                  // optional mesh information policies 
-                  , VertexIndexMap       const& aVertex_index_map     // defaults to get(vertex_index,aSurface)
-                  , VertexPointMap       const& aVertex_point_map     // defaults to get(vertex_point,aSurface)
-                  , EdgeIndexMap         const& aEdge_index_map       // defaults to get(edge_index,aSurface)
-                  , EdgeIsConstrainedMap const& aEdge_is_constrained_map   // defaults to No_constrained_edge_map<ECM>()
-                  
-                  // optional strategy policies - defaults to LindstomTurk
-                  , GetCost              const& aGet_cost
-                  , GetPlacement         const& aGet_placement
-                  
-                  , Visitor                     aVisitor
-                  ) 
-{
-  typedef EdgeCollapse< ECM
-                      , ShouldStop
-                      , VertexIndexMap
-                      , VertexPointMap
-                      , EdgeIndexMap
-                      , EdgeIsConstrainedMap
-                      , GetCost
-                      , GetPlacement
-                      , Visitor
-                      >
-                      Algorithm;
-                      
-  Algorithm algorithm( aSurface
-                     , aShould_stop
-                     , aVertex_index_map
-                     , aVertex_point_map
-                     , aEdge_index_map
-                     , aEdge_is_constrained_map
-                     , aGet_cost
-                     , aGet_placement
-                     , aVisitor
-                     ) ;
-                     
-  return algorithm.run();
-}                          
-
-
-struct Dummy_visitor
-{
-  template<class ECM>                                 void OnStarted( ECM& ) const {} 
-  template<class ECM>                                 void OnFinished ( ECM& ) const {} 
-  template<class Profile>                             void OnStopConditionReached( Profile const& ) const {} 
-  template<class Profile, class OFT>                  void OnCollected( Profile const&, OFT const& ) const {}                
-  template<class Profile, class OFT, class Size_type> void OnSelected( Profile const&, OFT const&, Size_type, Size_type ) const {}                
-  template<class Profile, class OPoint>               void OnCollapsing(Profile const&, OPoint const& ) const {}                
-  template<class Profile, class VH>                   void OnCollapsed( Profile const&, VH ) const {}
-  template<class Profile>                             void OnNonCollapsable(Profile const& ) const {}                
-} ;
-
-template<class ECM, class ShouldStop, class P, class T, class R>
-int edge_collapse ( ECM& aSurface
-                  , ShouldStop const& aShould_stop
-                  , cgal_bgl_named_params<P,T,R> const& aParams 
-                  ) 
-{
-  using boost::choose_param ;
-  using boost::choose_const_pmap ;
-  using boost::get_param ;
-  
-  LindstromTurk_params lPolicyParams ;
-  
-  boost::graph_visitor_t vis = boost::graph_visitor_t() ;
-
-  return edge_collapse(aSurface
-                      ,aShould_stop
-                      ,choose_const_pmap(get_param(aParams,boost::vertex_index),aSurface,boost::vertex_index)
-                      ,choose_pmap(get_param(aParams,boost::vertex_point),aSurface,boost::vertex_point)
-                      ,choose_const_pmap(get_param(aParams,boost::halfedge_index),aSurface,boost::halfedge_index)
-                       ,choose_param     (get_param(aParams,edge_is_constrained),No_constrained_edge_map<ECM>())
-                       ,choose_param     (get_param(aParams,get_cost_policy), LindstromTurk_cost<ECM>())
-                       ,choose_param     (get_param(aParams,get_placement_policy), LindstromTurk_placement<ECM>())
-                      ,choose_param     (get_param(aParams,vis), Dummy_visitor())
-                      );
-
-}
-  template<class ECM, class ShouldStop, class GT, class P, class T, class R>
-int edge_collapse ( ECM& aSurface
-                  , ShouldStop const& aShould_stop
-                  , cgal_bgl_named_params<P,T,R> const& aParams 
-                  ) 
-{
-  using boost::choose_param ;
-  using boost::choose_const_pmap ;
-  using boost::get_param ;
-  
-  LindstromTurk_params lPolicyParams ;
-  
-  boost::graph_visitor_t vis = boost::graph_visitor_t() ;
-    
-  return edge_collapse(aSurface
-                      ,aShould_stop
-                      ,choose_const_pmap(get_param(aParams,boost::vertex_index),aSurface,boost::vertex_index)
-                      ,choose_const_pmap(get_param(aParams,boost::vertex_point),aSurface,boost::vertex_point)
-                      ,choose_const_pmap(get_param(aParams,boost::halfedge_index),aSurface,boost::halfedge_index)
-                      ,choose_param     (get_param(aParams,edge_is_constrained),No_constrained_edge_map<ECM>())
-                      ,choose_param     (get_param(aParams,get_cost_policy), LindstromTurk_cost<ECM>())
-                      ,choose_param     (get_param(aParams,get_placement_policy), LindstromTurk_placement<ECM>())
-                      ,choose_param     (get_param(aParams,vis), Dummy_visitor())
-                      );
-
-}
-
-template<class ECM, class ShouldStop>
-int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop ) 
-{
-  return edge_collapse(aSurface,aShould_stop, halfedge_index_map(get(boost::halfedge_index,aSurface))); // AF why the halfedge_index_map?
-}
-
-  template<class ECM, class ShouldStop, class GT>
-  int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop) 
-{
-  return edge_collapse(aSurface,aShould_stop, CGAL::halfedge_index_map(get(boost::halfedge_index,aSurface)));
-}
-
-} // namespace Surface_mesh_simplification
-
-} //namespace CGAL
-
-#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H //
-// EOF //
- 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Polyhedral_oracle.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Polyhedral_oracle.h
deleted file mode 100644
index a6833ac..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Polyhedral_oracle.h
+++ /dev/null
@@ -1,409 +0,0 @@
-// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Steve OUDOT, Laurent Rineau
-
-#ifndef CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
-#define CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
-
-#include <boost/static_warning.hpp>
-#include <utility>
-
-#include <CGAL/iterator.h>
-#include <CGAL/Surface_mesher/Null_oracle_visitor.h>
-#include <CGAL/Surface_mesher/Has_edges.h>
-
-namespace CGAL {
-  namespace Surface_mesher {
-
-template <
-  class Surface,
-  class Point_creator = Creator_uniform_3<typename Surface::Geom_traits::FT,
-    typename Surface::Geom_traits::Point_3>,
-  class Visitor = Null_oracle_visitor,
-  typename Has_edges_tag_ = typename Surface::Has_edges_tag,
-  bool mesh_the_whole_bounding_box = false
-  >
-class Polyhedral_oracle : Has_edges_tag_
-{
-public:
-  typedef typename Surface::Geom_traits GT;
-  typedef GT Geom_traits;
-  typedef typename GT::FT FT;
-
-  typedef typename Geom_traits::Point_3 Point;
-  typedef typename Surface::Subfacets_tree Subfacets_tree;
-  typedef typename Surface::Subsegments_tree Subsegments_tree;
-  typedef typename Subsegments_tree::Point_with_index Point_with_index;
-  typedef typename Geom_traits::Segment_3 Segment_3;
-  typedef typename Geom_traits::Ray_3 Ray_3;
-  typedef typename Geom_traits::Line_3 Line_3;
-  typedef typename Geom_traits::Triangle_3 Triangle_3;
-
-  typedef Polyhedral_oracle<Surface, 
-                            Point_creator, 
-                            Visitor,
-                            Has_edges_tag_,
-                            mesh_the_whole_bounding_box> Self;
-
-  typedef Surface Surface_3;
-
-  typedef Point Intersection_point;
-
-  // Private members
-
-private:
-  Visitor visitor;
-
-public:
-
-  // Public members
-
-  // Surface constructor
-  Polyhedral_oracle(Visitor visitor_ = Visitor() )
-    : visitor(visitor_)
-  {
-//       is.seekg(0,std::ios::beg);
-//       tr.clear();
-//       // The data structure for testing intersections is set
-//       std::cerr << "Creating data structure for intersections detection... ";
-//       data_struct.input(is, CGAL::Insert_iterator<Tr>(tr));
-//       std::cerr << "done\n\n";
-  }
-
-//   Finite_vertices_iterator finite_vertices_begin()
-//   {
-//     return tr.finite_vertices_begin();
-//   }
-
-
-//   Finite_vertices_iterator finite_vertices_end()
-//   {
-//     return tr.finite_vertices_end();
-//   }
-
-  class Intersect_3;
-
-  friend class Intersect_3;
-
-  class Intersect_3 {
-    const Self& self;
-  public:
-    Intersect_3(const Self& self) : self(self)
-    {
-    }
-
-    Object operator()(const Surface_3& surface, const Segment_3& s) const
-    {
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
-      double pa[3], pb[3];
-      pa[0] = s[0].x();
-      pa[1] = s[0].y();
-      pa[2] = s[0].z();
-      pb[0] = s[1].x();
-      pb[1] = s[1].y();
-      pb[2] = s[1].z();
-      if(surface.pinpolyhedron_ptr->isPinPolyhedron(pa) == 
-	 surface.pinpolyhedron_ptr->isPinPolyhedron(pb))
-	return Object();
-#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
-      return self.intersect_segment_surface(*surface.subfacets_tree_ptr, s);
-#endif
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_INTERSECTION_DATA_STRUCTURE
-      return surface.subfacets_tree_ptr->intersection(s);
-#endif
-    }
-    
-    Object operator()(const Surface_3& surface, const Ray_3& r) const {
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
-      return self.intersect_ray_surface(*surface.subfacets_tree_ptr, r);
-#endif
-      return Object();
-    }
-      
-    Object operator()(const Surface_3& surface, const Line_3& l) const {
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
-      return self.intersect_line_surface(*surface.subfacets_tree_ptr, l);
-#endif
-      return Object();
-    }
-  };
-
-  Intersect_3 intersect_3_object() const
-  {
-    return Intersect_3(*this);
-  }
-
-  class Construct_initial_points;
-
-  friend class Construct_initial_points;
-
-  class Construct_initial_points
-  {
-    const Self& self;
-  public:
-    Construct_initial_points(const Self& self) : self(self)
-    {
-    }
-
-    template <typename OutputIteratorPoints>
-    OutputIteratorPoints operator() (const Surface_3& surface, 
-                                     OutputIteratorPoints out, 
-                                     int n = 20) const // WARNING: why 20?    
-    {
-      for (typename Surface_3::Corner_vertices::const_iterator vit =
-             surface.corner_vertices_ptr->begin();
-           vit != surface.corner_vertices_ptr->end();
-           ++vit)
-      {
-        Point p = (*vit)->point();
-        CGAL_assertion((*vit)->tag() >= 0);
-        p.set_on_vertex((*vit)->tag());
-        self.visitor.new_point(p);
-        *out++= p;
-      }
-      for (typename Surface_3::Edges_vertices::const_iterator vit =
-             surface.edges_vertices_ptr->begin();
-           vit != surface.edges_vertices_ptr->end() && n > 0;
-           ++vit, --n)
-      {
-        Point p = (*vit)->point();
-        CGAL_assertion((*vit)->tag() >= 0);
-        p.set_on_curve((*vit)->tag());
-        self.visitor.new_point(p);
-        *out++= p;
-      }
-      for (typename Surface_3::Input_vertices::const_iterator vit =
-             surface.input_vertices_ptr->begin();
-           vit != surface.input_vertices_ptr->end() && n > 0;
-           ++vit, --n)
-      {
-        Point p = (*vit)->point();
-        CGAL_assertion((*vit)->tag() >= 0);
-        p.set_on_surface((*vit)->tag());
-        self.visitor.new_point(p);
-        *out++= p;
-      }
-      return out;
-    }
-  };
-
-  Construct_initial_points construct_initial_points_object() const
-  {
-    return Construct_initial_points(*this);
-  }
-
-  template <class P>
-  bool is_in_volume(const Surface_3& surface, const P& p)
-  {
-    if(mesh_the_whole_bounding_box)
-      return CGAL::do_overlap(surface.bbox(),p.bbox());
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
-    double point[3];
-    point[0] = p.x();
-    point[1] = p.y();
-    point[2] = p.z();
-    return surface.pinpolyhedron_ptr->isPinPolyhedron(point);
-#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
-    typename CGAL::Random_points_on_sphere_3<Point,
-      Point_creator> random_point(FT(1));
-    typename Geom_traits::Construct_vector_3 vector =
-      Geom_traits().construct_vector_3_object();
-    typename Geom_traits::Construct_segment_3 segment =
-      Geom_traits().construct_segment_3_object();
-    typename Geom_traits::Construct_translated_point_3 translate =
-      Geom_traits().construct_translated_point_3_object();
-    typename Geom_traits::Bounded_side_3 bounded_side =
-      Geom_traits().bounded_side_3_object();
-    typename Geom_traits::Construct_scaled_vector_3 scale = 
-      Geom_traits().construct_scaled_vector_3_object();
-
-    const typename GT::Iso_cuboid_3& cuboid = surface.subfacets_tree_ptr->iso_cuboid();
-
-    if( bounded_side(cuboid,
-		     p) == ON_UNBOUNDED_SIDE )
-      return false;
-
-#ifdef CGAL_SURFACE_MESHER_DEBUG_INTERSECTION_DATA_STRUCTURE
-    std::cerr << "(in volume) ";
-#endif
-    std::pair<bool, int> result = std::make_pair(false, 0);
-
-    // upper bound of the diameter of the bounding box
-    const FT& diameter = 2*FT(surface.subfacets_tree_ptr->max_length());
-    while(! result.first)
-    {
-      result = surface.subfacets_tree_ptr->
-        number_of_intersections(segment(p, 
-					translate(p, 
-						  scale(vector(ORIGIN,
-							       *random_point++),
-							diameter))));
-    }
-    return (result.second % 2) == 1;
-  }
-
-  Object intersect_curves_with_triangle(const Surface_3& surface,
-					const Triangle_3& t) const
-  {
-    if(! surface.has_edges())
-      return Object();
-
-    const Object o = surface.subsegments_tree_ptr->intersection(t);
-    if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
-    {
-      Point p = *pi;
-      CGAL_assertion(pi->surface_index()>=0);
-      p.set_on_curve(pi->surface_index());
-      visitor.new_point(p);
-      return make_object(p);
-    }
-    else
-      return Object();
-  }
-//   // Basic intersection function for segments/rays/lines with the polyhedron
-//   template <class Elt>
-//   CGAL::Object intersect_with_surface (Octree data_struct, Elt e) {
-//     typedef CGAL::Data_structure_using_tree_3<Geom_traits> Octree;
-//     for ( typename Octree::Constraint_map_iterator cit = data_struct.c_m.begin();
-// 	  cit != data_struct.c_m.end(); ++cit ) {
-//       if (cit->second->does_intersect (e))
-// 	return cit->second->intersection (e);
-//     }
-
-//     return CGAL::Object();
-//   }
-
-#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
-  CGAL::Object intersect_segment_surface(const Subfacets_tree& data_struct,
-                                         const Segment_3& s) const
-    {
-      typename Geom_traits::Is_degenerate_3  is_degenerate;
-      // debug: test if segment is degenerate
-      // (can happen, because of rounding in circumcenter computations)
-      if (is_degenerate(s)) {
-	std::cerr << "Warning: degenerate segment (" << s << ")\n";
-	return CGAL::Object();
-      }
-
-      // debug: for detecting whether Marie's code works
-      // (we compare with our basic intersection function)
-//       CGAL::Object oun, odeux;
-//       Point p;
-//       oun = data_struct.intersection(s.vertex(0), s.vertex(1));
-//       odeux = intersect_with_surface (s);
-//       odeux = oun;
-
-
-//       if ((assign(p, oun) && !assign(p,odeux)) ||
-// 	  !assign(p, oun) && assign(p,odeux))
-// 	std::cout << "s " << s
-// 		  << " " << (assign(p, odeux))
-// 		  << std::endl;
-
-      const Object o = data_struct.intersection(s.vertex(0), s.vertex(1));
-      if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
-      {
-        Point p = *pi;
-        CGAL_assertion(pi->surface_index()>=0);
-        p.set_on_surface(pi->surface_index());
-        visitor.new_point(p);
-        return make_object(p);
-      }
-      else
-        return Object();
-
-/*       return  intersect_with_surface (s);  // basic intersection function */
-/*       return data_struct.intersection (s.vertex(0), s.vertex(1));  // Marie */
-    }
-
-  CGAL::Object intersect_ray_surface(const Subfacets_tree& data_struct,
-                                     const Ray_3 &r) const
-    {
-      typename Geom_traits::Is_degenerate_3  is_degenerate;
-      // debug: test if segment is degenerate
-      // (can happen, because of rounding in circumcenter computations)
-      if (is_degenerate(r)) {
-	std::cerr << "Warning: degenerate ray (" << r << ")\n";
-	return CGAL::Object();
-      }
-      // debug: for detecting whether Marie's code works
-      // (we compare with our basic intersection function)
-//       CGAL::Object oun, odeux;
-//       Point p;
-//       oun = data_struct.intersection (r);
-//       //      odeux = intersect_with_surface (r);
-//       odeux = oun;
-
-//       if ((assign(p, oun) && !assign(p,odeux)) ||
-// 	  !assign(p, oun) && assign(p,odeux))
-// 	std::cout << "r " << r
-// 		  << " " << (assign(p, odeux))
-// 		  << std::endl;
-
-//       return odeux;
-
-      const Object o = data_struct.intersection (r);
-      if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
-      {
-        Point p = *pi;
-        CGAL_assertion(pi->surface_index()>=0);
-        p.set_on_surface(pi->surface_index());
-        visitor.new_point(p);
-        return make_object(p);
-      }
-      else
-        return Object();
-
-
-//       return intersect_with_surface (r);  // basic intersection function
-//       return data_struct.intersection (r);   // Marie's code
-    }
-
-
-  CGAL::Object intersect_line_surface(const Subfacets_tree&,
-                                      const Line_3 &) const
-    {
-      CGAL_error();
-      return CGAL::Object();
-    }
-#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
-private:
-
-
-}; // end class Polyhedral_oracle
-
-template <class GT,
-          class Visitor = Null_oracle_visitor
-         >
-class Polyhedral : public Polyhedral_oracle<GT, Visitor>
-{
-  typedef int Deprecated__class__use__Polyhedral_oracle__instead;
-
-  Polyhedral(Visitor visitor = Visitor())
-    : Polyhedral_oracle<GT, Visitor>(visitor)
-  {
-    BOOST_STATIC_WARNING(Deprecated__class__use__Polyhedral_oracle__instead() == 1);
-  }
-};
-
-  } // end namespace Surface_mesher
-} // end namespace CGAL
-
-#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_manifold.h
deleted file mode 100644
index fbc4e39..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_manifold.h
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
-// Copyright (c) 2008       GeometryFactory, Sophia Antipolis (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Steve Oudot, David Rey, Mariette Yvinec, Laurent Rineau, Andreas Fabri
-
-#ifndef CGAL_SURFACE_MESHER_MANIFOLD_H
-#define CGAL_SURFACE_MESHER_MANIFOLD_H
-
-#include <CGAL/Surface_mesher/Surface_mesher_regular_edges.h>
-
-namespace CGAL {
-
-  namespace Surface_mesher {
-
-  template <
-    class C2T3,
-    class Surface,
-    class SurfaceMeshTraits,
-    class Criteria,
-    typename SMMBB // ("SMM_base_base")
-  >
-  class Surface_mesher_manifold_base
-    : public SMMBB
-  {
-    public:
-      typedef C2T3 C2t3;
-      typedef typename C2T3::Triangulation Tr;
-      typedef typename Tr::Geom_traits GT;
-      typedef typename GT::FT FT;
-      typedef typename Tr::Point Point;
-      typedef typename Tr::Facet Facet;
-      typedef typename Tr::Cell_handle Cell_handle;
-      typedef typename Tr::Vertex_handle Vertex_handle;
-      typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
-      typedef std::list<Facet> Facets;
-      typedef std::list<Vertex_handle> Vertices;
-      typedef typename Facets::iterator Facets_iterator;
-      typedef typename Vertices::iterator Vertices_iterator;
-      typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
-
-  protected:
-    // because of the caching, these two members have to be mutable,
-    // because they are actually updated in the const method
-    // 'no_longer_element_to_refine_impl()'
-    typedef std::set<Vertex_handle> Bad_vertices;
-    mutable Bad_vertices bad_vertices;
-    mutable bool bad_vertices_initialized;
-
-    private:
-      Facet canonical_facet(const Facet& f) const {
-	const Cell_handle& c = f.first;
-	const Cell_handle& c2 = c->neighbor(f.second);
-	return (c2 < c) ? std::make_pair(c2,c2->index(c)) : f;
-      }
-
-      // Action to perform on a facet on the boundary of the conflict zone
-      void 
-      before_insertion_handle_facet_on_boundary_of_conflict_zone(const Facet& f)
-      {
-	const Cell_handle& c = f.first;
-	const int i = f.second;
-
-       	// for each v of f
-	for (int j = 0; j < 4; j++)
-	  if (i != j)
-            bad_vertices.erase(c->vertex(j));
-      }
-
-      Facet 
-      biggest_incident_facet_in_complex(const Vertex_handle sommet) const
-      {
-
-	std::list<Facet> facets;
-	SMMBB::c2t3.incident_facets(sommet, std::back_inserter(facets));
-
-	typename std::list<Facet>::iterator it = facets.begin();
-	Facet biggest_facet = *it;
-	CGAL_assertion(it!=facets.end());
-
-	for (++it;
-	     it != facets.end();
-	     ++it) {
-	  Facet current_facet = *it;
-	  // is the current facet bigger than the current biggest one
-	  if ( SMMBB::compute_distance_to_facet_center(current_facet, sommet) >
-	       SMMBB::compute_distance_to_facet_center(biggest_facet, sommet) )
-	  {
-	    biggest_facet = current_facet;
-	  }
-	}
-	return biggest_facet;
-      }
-
-    public:
-      Surface_mesher_manifold_base (C2T3& c2t3,
-                                    const Surface& surface,
-                                    const SurfaceMeshTraits& mesh_traits,
-                                    const Criteria& criteria)
-	: SMMBB(c2t3, surface, mesh_traits, criteria),
-          bad_vertices_initialized(false)
-      {
-#ifdef CGAL_SURFACE_MESHER_DEBUG_CONSTRUCTORS
-        std::cerr << "CONS: Surface_mesher_manifold_base\n";
-#endif
-      }
-
-    public:
-
-      // Tells whether there remain elements to refine
-      bool no_longer_element_to_refine_impl() const {
-	if(SMMBB::no_longer_element_to_refine_impl()){
-	  if(! bad_vertices_initialized){
-	    initialize_bad_vertices();
-	  }
-	  return bad_vertices.empty();
-	}
-	return false;
-      }
-
-      void initialize_bad_vertices() const
-      {
-#ifdef CGAL_SURFACE_MESHER_VERBOSE
-	std::cerr << "scanning vertices" << std::endl;
-#endif
-	int n = 0;
-	for (Finite_vertices_iterator vit = SMMBB::tr.finite_vertices_begin();
-	     vit != SMMBB::tr.finite_vertices_end();
-	     ++vit) {
-	  if ( (SMMBB::c2t3.face_status(vit)  // @TODO: appeler is_regular
-		== C2t3::SINGULAR) ) {
-	    bad_vertices.insert( vit );
-	    ++n;
-	  }
-	}
-	bad_vertices_initialized = true;
-#ifdef CGAL_SURFACE_MESHER_VERBOSE
-	std::cerr << "   -> found " << n << " bad vertices\n";
-#endif
-      }
-
-      // Lazy initialization function
-      void scan_triangulation_impl() {
-	SMMBB::scan_triangulation_impl();
-#ifdef CGAL_SURFACE_MESHER_VERBOSE
-	std::cerr << "scanning vertices (lazy)" << std::endl;
-#endif
-      }
-
-      // Returns the next element to refine
-      Facet get_next_element_impl() {
-	if ( !SMMBB::no_longer_element_to_refine_impl() ) {
-	  return SMMBB::get_next_element_impl();
-	}
-	else {
-	  CGAL_assertion(bad_vertices_initialized);
-	  Vertex_handle first_bad_vertex = *(bad_vertices.begin());
-	  return biggest_incident_facet_in_complex(first_bad_vertex);
-	}
-      }
-
-      void before_insertion_impl(const Facet& f, const Point& s,
-				 Zone& zone) {
-        if(bad_vertices_initialized)
-        {
-          for (typename Zone::Facets_iterator fit =
-                 zone.boundary_facets.begin(); fit !=
-                 zone.boundary_facets.end(); ++fit)
-	    before_insertion_handle_facet_on_boundary_of_conflict_zone (*fit); 
-        }
-	SMMBB::before_insertion_impl(f, s, zone);
-      }
-
-    void after_insertion_impl(const Vertex_handle v) {
-      SMMBB::after_insertion_impl(v);
-
-      if(bad_vertices_initialized){
-	// foreach v' in star of v
-	Vertices vertices;
-	SMMBB::tr.incident_vertices(v, std::back_inserter(vertices));
-
-	// is_regular_or_boundary_for_vertices
-	// is used here also incident edges are not known to be
-	// REGULAR which may cause some singular vertices to be forgotten
-	// This causes no problem because 
-	// those SINGULAR incident SINGULAR edges are going to be handled
-	for (Vertices_iterator vit = vertices.begin();
-	     vit != vertices.end();
-	     ++vit)
-	  if ( SMMBB::c2t3.is_in_complex(*vit)  &&
-	       !SMMBB::c2t3.is_regular_or_boundary_for_vertices(*vit)) {
-	    bad_vertices.insert(*vit);
-	  }
-
-	if ( SMMBB::c2t3.is_in_complex(v) &&
-	     !SMMBB::c2t3.is_regular_or_boundary_for_vertices(v)) {
-	  bad_vertices.insert(v);
-	}
-      }
-    }
-      
-    std::string debug_info() const
-    {
-      std::stringstream s;
-      s << SMMBB::debug_info() << ",";
-      if(bad_vertices_initialized) 
-	s << bad_vertices.size();
-      else
-	s << "non manifold vertices not initialized";
-      return s.str();
-    }
-
-    std::string debug_info_header() const
-    {
-      std::stringstream s;
-      s << SMMBB::debug_info_header() << "," << "#bad vertices";
-      return s.str();
-    }
-  };  // end Surface_mesher_manifold_base
-
-  }  // end namespace Surface_mesher
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_SURFACE_MESHER_MANIFOLD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2_algorithms.h b/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2_algorithms.h
deleted file mode 100644
index 20c442b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2_algorithms.h
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s): Baruch Zukerman <baruchzu at post.tau.ac.il>
-//            Efi Fogel       <efif at post.tau.ac.il>
-//            (based on old version by Tali Zvi)
-
-#ifndef CGAL_SWEEP_LINE_2_ALGORITHMS_H
-#define CGAL_SWEEP_LINE_2_ALGORITHMS_H
-
-/*!
- * \file Definition of the sweep-line related functions.
- */
-
-#include <CGAL/Sweep_line_2.h>
-#include <CGAL/Sweep_line_2/Sweep_line_2_visitors.h>
-
-#include <CGAL/Segment_2.h>
-#include <CGAL/Arr_segment_traits_2.h>
-#include <CGAL/Arr_polyline_traits_2.h>
-#include <CGAL/Arr_conic_traits_2.h>
-#include <CGAL/Arr_rational_function_traits_2.h>
-#include <CGAL/Arr_circle_segment_traits_2.h>
-#include <CGAL/Arr_linear_traits_2.h>
-#include <CGAL/Arr_rat_arc/Rational_arc_d_1.h>
-
-namespace CGAL {
-
-template <typename Curve>
-struct Default_arr_traits
-{};
-
-template <typename Kernel>
-struct Default_arr_traits<CGAL::Segment_2<Kernel> >
-{
-  typedef CGAL::Arr_segment_traits_2<Kernel>                            Traits;
-};
-
-template <typename Kernel>
-struct Default_arr_traits<CGAL::Arr_segment_2<Kernel> >
-{
-  typedef CGAL::Arr_segment_traits_2<Kernel>                            Traits;
-};
-
-template <typename SegTraits>
-struct Default_arr_traits<CGAL::polyline::Polyline_2
-                          <SegTraits, typename SegTraits::Point_2> >
-{
-  typedef CGAL::Arr_polyline_traits_2<SegTraits>                        Traits;
-};
-
-template <typename Rat_kernel_, class Alg_kernel_, class Nt_traits_>
-struct Default_arr_traits<CGAL::_Conic_arc_2<Rat_kernel_, Alg_kernel_,
-                                             Nt_traits_> >
-{
-  typedef CGAL::Arr_conic_traits_2<Rat_kernel_, Alg_kernel_, Nt_traits_>
-                                                                        Traits;
-};
-
-template <typename Algebraic_kernel_>
-struct Default_arr_traits<CGAL::Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_> >
-{
-  typedef CGAL::Arr_rational_function_traits_2<Algebraic_kernel_>       Traits;
-};
-
-template <typename Kernel_, bool Filter_>
-struct Default_arr_traits<CGAL::_Circle_segment_2<Kernel_, Filter_> >
-{
-  typedef CGAL::Arr_circle_segment_traits_2<Kernel_, Filter_>           Traits;
-};
-
-template <typename Kernel>
-struct Default_arr_traits<CGAL::Arr_linear_object_2<Kernel> >
-{
-  typedef CGAL::Arr_linear_traits_2<Kernel>                             Traits;
-};
-
-/*!
- * Compute all intersection points induced by a range of input curves.
- * The intersections are calculated using the sweep-line algorithm.
- * \param begin An input iterator for the first curve in the range.
- * \param end A input past-the-end iterator for the range.
- * \param points Output: An output iterator for the intersection points
- *                       induced by the input curves.
- * \param report_endpoints If (true), the end points of the curves are also
- *                         reported as intersection points.
- * \pre The value-type of CurveInputIterator is Traits::Curve_2, and the
- *      value-type of OutputIterator is Traits::Point_2.
- */
-template <class CurveInputIterator, class OutputIterator, class Traits>
-OutputIterator compute_intersection_points (CurveInputIterator curves_begin,
-                                            CurveInputIterator curves_end,
-                                            OutputIterator points,
-                                            bool report_endpoints,
-                                            Traits &tr)
-{
-  // Define the sweep-line types:
-  typedef Sweep_line_points_visitor<Traits,OutputIterator>  Visitor;
-  typedef Sweep_line_2< Traits,
-                        Sweep_line_points_visitor<Traits, OutputIterator> >
-                                                            Sweep_line;
-
-  // Perform the sweep and obtain the intersection points.
-  Visitor     visitor (points, report_endpoints);
-  Sweep_line  sweep_line (&tr, &visitor);
-  visitor.sweep(curves_begin, curves_end);
-
-  return (visitor.output_iterator());
-}
-
-template <class CurveInputIterator, class OutputIterator>
-OutputIterator compute_intersection_points (CurveInputIterator curves_begin,
-                                            CurveInputIterator curves_end,
-                                            OutputIterator points,
-                                            bool report_endpoints = false)
-{
-  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
-
-  typename Default_arr_traits<Curve>::Traits   traits;
-
-  return (compute_intersection_points(curves_begin, curves_end, points,
-                                      report_endpoints, traits));
-}
-
-/*!
- * Compute all x-monotone subcurves that are disjoint in their interiors
- * induced by a range of input curves.
- * The subcurves are calculated using the sweep-line algorithm.
- * \param begin An input iterator for the first curve in the range.
- * \param end A input past-the-end iterator for the range.
- * \param points Output: An output iterator for the subcurve.
- * \param mult_overlaps If (true), the overlapping subcurve will be reported
- *                      multiple times.
- * \pre The value-type of CurveInputIterator is Traits::Curve_2, and the
- *      value-type of OutputIterator is Traits::X_monotone_curve_2.
- */
-template <class CurveInputIterator, class OutputIterator, class Traits>
-OutputIterator compute_subcurves (CurveInputIterator curves_begin,
-                                  CurveInputIterator curves_end,
-                                  OutputIterator subcurves,
-                                  bool mult_overlaps, Traits &tr)
-{
-  // Define the sweep-line types:
-  typedef Sweep_line_subcurves_visitor<Traits, OutputIterator>  Visitor;
-  typedef Sweep_line_2<Traits,
-                       Sweep_line_subcurves_visitor<Traits, OutputIterator> >
-                                                                Sweep_line;
-
-  // Perform the sweep and obtain the subcurves.
-  Visitor     visitor (subcurves, mult_overlaps);
-  Sweep_line  sweep_line (&tr, &visitor);
-  visitor.sweep(curves_begin, curves_end);
-
-  return (visitor.output_iterator());
-}
-
-
-template <class CurveInputIterator, class OutputIterator>
-OutputIterator compute_subcurves (CurveInputIterator curves_begin,
-                                  CurveInputIterator curves_end,
-                                  OutputIterator subcurves,
-                                  bool mult_overlaps = false)
-{
-  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
-  typename Default_arr_traits<Curve>::Traits   m_traits;
-  return compute_subcurves(curves_begin, curves_end, subcurves, mult_overlaps,
-                           m_traits);
-}
-
-/*!
- * Determine if there occurs an intersection between any pair of curves in
- * a given range.
- * \param begin An input iterator for the first curve in the range.
- * \param end A input past-the-end iterator for the range.
- * \return (true) if any pair of curves intersect; (false) otherwise.
- */
-template <class CurveInputIterator, class Traits>
-bool do_curves_intersect (CurveInputIterator curves_begin,
-                          CurveInputIterator curves_end, Traits &tr)
-{
-  // Define the sweep-line types:
-  typedef Sweep_line_do_curves_x_visitor<Traits>      Visitor;
-  typedef Sweep_line_2<Traits, Sweep_line_do_curves_x_visitor<Traits> >
-    Sweep_line;
-
-  // Perform the sweep and obtain the subcurves.
-  Visitor     visitor;
-  Sweep_line  sweep_line (&tr, &visitor);
-  visitor.sweep(curves_begin, curves_end);
-
-  return (visitor.found_intersection());
-}
-
-
-template <class CurveInputIterator>
-bool do_curves_intersect (CurveInputIterator curves_begin,
-                          CurveInputIterator curves_end)
-{
-  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
-
-  typename Default_arr_traits<Curve>::Traits   m_traits;
-  return do_curves_intersect (curves_begin, curves_end, m_traits);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tetrahedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/Tetrahedron_3.h
deleted file mode 100644
index 625421b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Tetrahedron_3.h
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_TETRAHEDRON_3_H
-#define CGAL_TETRAHEDRON_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3
-{
-  typedef typename R_::Point_3             Point_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Tetrahedron_3                      Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Tetrahedron_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<3>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Tetrahedron_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Tetrahedron_3() {}
-
-  Tetrahedron_3(const Rep& t)
-      : Rep(t) {}
-
-  Tetrahedron_3(const Point_3& p, const Point_3& q,
-                const Point_3& r, const Point_3& s)
-    : Rep(typename R::Construct_tetrahedron_3()(Return_base_tag(), p, q, r, s)) {}
-
-  Tetrahedron_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Tetrahedron_3(t.transform(this->vertex(0)),
-                         t.transform(this->vertex(1)),
-                         t.transform(this->vertex(2)),
-                         t.transform(this->vertex(3)));
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
-  vertex(int i) const
-  {
-    return R().construct_vertex_3_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
-  operator[](int i) const
-  {
-    return vertex(i);
-  }
-
-  bool
-  is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-  Orientation orientation() const
-  {
-    return R().orientation_3_object()(*this);
-  }
-
-  Bounded_side bounded_side(const Point_3 &p) const
-  {
-    return R().bounded_side_3_object()(*this, p);
-  }
-
-  Oriented_side oriented_side(const Point_3 &p) const
-  {
-    return R().oriented_side_3_object()(*this, p);
-  }
-
-  bool has_on_positive_side(const Point_3 &p) const
-  {
-    return R().has_on_positive_side_3_object()(*this, p);
-  }
-
-  bool has_on_negative_side(const Point_3 &p) const
-  {
-    return R().has_on_negative_side_3_object()(*this, p);
-  }
-
-  bool has_on_boundary(const Point_3 &p) const
-  {
-    return R().has_on_boundary_3_object()(*this, p);
-  }
-
-  bool has_on_bounded_side(const Point_3 &p) const
-  {
-    return R().has_on_bounded_side_3_object()(*this, p);
-  }
-
-  bool has_on_unbounded_side(const Point_3 &p) const
-  {
-    return R().has_on_unbounded_side_3_object()(*this, p);
-  }
-
-  typename cpp11::result_of<typename R::Compute_volume_3( Tetrahedron_3)>::type
-  volume() const
-  {
-    return R().compute_volume_3_object()(*this);
-  }
-
-  Bbox_3
-  bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Tetrahedron_3<R> &t)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3];
-    case IO::BINARY :
-        return os << t[0]  << t[1]  << t[2] << t[3];
-    default:
-        os << "Tetrahedron_3(" << t[0] <<  ", " << t[1] <<   ", " << t[2];
-        os <<  ", " << t[3] << ")";
-        return os;
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Tetrahedron_3<R> &t)
-{
-    typename R::Point_3 p, q, r, s;
-
-    is >> p >> q >> r >> s;
-
-    if (is)
-        t = Tetrahedron_3<R>(p, q, r, s);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif  // CGAL_TETRAHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Timer.h b/3rdparty/CGAL-4.6/include/CGAL/Timer.h
deleted file mode 100644
index 4e63563..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Timer.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
-//                 Matthias Baesken <baesken at informatik.uni-halle.de>
-
-#ifndef CGAL_TIMER_H
-#define CGAL_TIMER_H 1
-
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-// SECTION: A Timer for User-Process Time
-// ========================================================================
-// 
-// DEFINITION
-// 
-// A timer `t' of type Timer is an object with a state. It is either
-// running or it is stopped. The state is controlled with `t.start()'
-// and `t.stop()'. The timer counts the time elapsed since its creation
-// or last reset. It counts only the time where it is in the running
-// state. The time information is given in seconds.
-
-class CGAL_EXPORT Timer {
-private:
-    double      elapsed;
-    double      started;
-    int         interv;
-    bool        running;
-
-    static bool m_failed;
-
-    double   user_process_time() const; // in seconds
-    double   compute_precision() const; // in seconds
-public:
-    Timer() : elapsed(0.0), started(0.0), interv(0), running(false) {}
-
-    void     start();
-    void     stop ();
-    void     reset();
-    bool     is_running() const { return running; }
-
-    double   time()       const;
-    int      intervals()  const { return interv; }
-    double   precision()  const;
-    // Returns timer precison. Computes it dynamically at first call.
-    // Returns -1.0 if timer system call fails, which, for a proper coded
-    // test towards precision leads to an immediate stop of an otherwise 
-    // infinite loop (fixed tolerance * total time >= precision).
-    double   max BOOST_PREVENT_MACRO_SUBSTITUTION ()        const;
-};
-
-
-// -----------------------------------------------------------------------
-
-// Member functions for Timer
-// ===========================
-
-inline void Timer::start() {
-    CGAL_precondition( ! running);
-    started = user_process_time();
-    running = true;
-    ++ interv;
-}
-
-inline void Timer::stop() {
-    CGAL_precondition( running);
-    double t = user_process_time();
-    elapsed += (t - started);
-    started = 0.0;
-    running = false;
-}
-
-inline void Timer::reset() {
-    interv  = 0;
-    elapsed = 0.0;
-    if (running) {
-	started = user_process_time();
-	++ interv;
-    } else {
-        started = 0.0;
-    }
-}
-
-inline double Timer::time() const {
-    if (running) {
-        double t = user_process_time();
-	return elapsed + (t - started);
-    }
-    return elapsed;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TIMER_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tools/Log.h b/3rdparty/CGAL-4.6/include/CGAL/Tools/Log.h
deleted file mode 100644
index 60bbb8e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Tools/Log.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#ifndef CGAL_LOG_H_
-#define CGAL_LOG_H_
-#include <CGAL/basic.h>
-#include <CGAL/Tools/utility_macros.h>
-#include <iostream>
-#include <fstream>
-#include <ios>
-
-#if defined(BOOST_MSVC)
-// Disable the warning about dll-interface needed for std::ofstream members
-// of Log::State.
-#  pragma warning(push)
-#  pragma warning(disable:4251)
-#endif
-
-namespace CGAL {
-
-class Log
-{
-public: 
-  enum Level {NONE=0, SOME=2, LOTS=3};
-  
-  enum Target {COUT, FILE, DEVNULL};
-private:
-  struct CGAL_EXPORT State {
-    Target target_;
-    Level level_;
-    std::ofstream fstream_;
-    std::ofstream null_;
-    std::ofstream maple_;
-    bool maple_is_open_;
-    bool output_maple_;
-    State(){
-      level_= NONE;
-      target_= COUT;
-      null_.open("/dev/null");
-      //maple_.open("maple.log");
-      maple_is_open_=false;
-      output_maple_=true;
-    }
-  };
-  CGAL_EXPORT static State state_;
-public:
-  // The different types of logs supported
-  /*  MAPLE is a log which should be able to be fed directly in to
-      maple and preferably will produce obviously good or bad outwhen
-      when evaluated.
-  */
-
-  static Level level() {return state_.level_;}
-  static void set_level(Level l) {state_.level_=l;}
- 
-
-  static std::ostream &stream(Level l) {
-    if (is_output(l)) {
-      if (state_.target_== COUT) {
-	return std::cout;
-      }
-      else {
-	return state_.fstream_;
-      }
-    }
-    else {
-      return state_.null_;
-    }
-  }
-
-  static bool is_output(Level l) {
-    return l <= level();
-  }
-  static Target target() {return state_.target_;}
-  static CGAL_SET(Target, target, state_.target_=k);
-  static CGAL_SET(std::string, filename, state_.fstream_.open(k.c_str()));
-
-  static bool is_output_maple(){return state_.output_maple_;}
-  
-  static void set_output_maple(bool b) {
-    state_.output_maple_=b;
-  }
-  std::ofstream &maple_stream() {
-    if (!state_.maple_is_open_) {
-      state_.maple_is_open_=true;
-      state_.maple_.open("maple.log");
-    }
-    return state_.maple_;
-  }
-private:
-  Log() {
-   
-  }
-};
-
-
-
-#ifndef CGAL_DISABLE_LOGGING
-#define CGAL_LOG(level, expr) if (CGAL::Log::is_output(level))\
-    { CGAL::Log::stream(level) << expr << std::flush;};
-#define CGAL_LOG_WRITE(level, expr) if (CGAL::Log::is_output(level))\
-{std::ostream &LOG_STREAM= CGAL::Log::stream(level); expr;}
-#define CGAL_ERROR(expr) std::cerr << expr << std::endl;
-#define CGAL_ERROR_WRITE(expr) {std::ostream &LOG_STREAM= std::cerr; expr; std::cerr << std::endl;}
-#define CGAL_SET_LOG_LEVEL(level) CGAL::Log::set_level(level);
-#define CGAL_GET_LOG_LEVEL CGAL::Log::level();
-
-template <class T>
-inline int CGAL_assertion_strip_unsigned(const T&t) {
-  return static_cast<int>(t);
-}
-
-
-/*inline int CGAL_assertion_strip_unsigned(size_t t) {
-  return static_cast<int>(t);
-  }*/
-
-#define CGAL_assert_equal(a,b) do {if (a != b) { CGAL_ERROR("" #a " = " << a); CGAL_ERROR("" #b " = " << b); CGAL_assertion(a ==b);} } while (0)
-#define CGAL_check_bounds(a,b,e) do {if (CGAL::CGAL_assertion_strip_unsigned(a) < CGAL::CGAL_assertion_strip_unsigned(b) || CGAL::CGAL_assertion_strip_unsigned(a) >=CGAL::CGAL_assertion_strip_unsigned(e)){ CGAL_ERROR("" #a " = " << a); CGAL_ERROR("[" #b "..." #e ") = [" << b << "..." << e << ")"); CGAL_error();} } while (0)
-
-#else
-#define CGAL_LOG(l,e)
-#define CGAL_LOG_WRITE(l,e)
-#define CGAL_ERROR(e)
-#define CGAL_ERROR_WRITE(e)
-#define CGAL_SET_LOG_LEVEL(l)
-#define CGAL_assert_equal(a,b) 
-#define CGAL_check_bounds(a,b,c)
-#endif
-
-struct Set_log_state{
-  Set_log_state(Log::Level l) {
-    old_level_= CGAL_GET_LOG_LEVEL;
-    CGAL_SET_LOG_LEVEL(l);
-  }
-  ~Set_log_state() {
-    CGAL_SET_LOG_LEVEL(old_level_);
-  }
-
-  Log::Level old_level_;
-};
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2.h b/3rdparty/CGAL-4.6/include/CGAL/Triangle_2.h
deleted file mode 100644
index f89aa93..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_TRIANGLE_2_H
-#define CGAL_TRIANGLE_2_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_2.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Triangle_2 : public R_::Kernel_base::Triangle_2
-{
-  typedef typename R_::Point_2          Point_2;
-  typedef typename R_::Aff_transformation_2 Aff_transformation_2;
-  typedef typename R_::Kernel_base::Triangle_2  RTriangle_2;
-
-  typedef Triangle_2                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef RTriangle_2 Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_                          R;
-  typedef typename R::FT               FT;
-
-  Triangle_2() {}
-
-  Triangle_2(const RTriangle_2& t)
-      : RTriangle_2(t) {}
-
-  Triangle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
-      : RTriangle_2(typename R::Construct_triangle_2()(Return_base_tag(), p,q,r)) {}
-
-  FT
-  area() const
-  {
-    return R().compute_area_2_object()(vertex(0), vertex(1), vertex(2));
-  }
-
-  typename R::Orientation
-  orientation() const
-  {
-    return R().orientation_2_object()(vertex(0), vertex(1), vertex(2));
-  }
-
-  typename R::Bounded_side
-  bounded_side(const Point_2 &p) const
-  {
-    return R().bounded_side_2_object()(*this,p);
-  }
-
-  typename R::Oriented_side
-  oriented_side(const Point_2 &p) const
-  {
-    return R().oriented_side_2_object()(*this,p);
-  }
-
-  typename R::Boolean
-  operator==(const Triangle_2 &t) const
-  {
-    return R().equal_2_object()(*this,t);
-  }
-
-  typename R::Boolean
-  operator!=(const Triangle_2 &t) const
-  {
-    return !(*this == t);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
-  vertex(int i) const
-  {
-    return R().construct_vertex_2_object()(*this,i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
-  operator[](int i) const
-  {
-    return vertex(i);
-  }
-
-  typename R::Boolean
-  has_on_bounded_side(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_BOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_unbounded_side(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_UNBOUNDED_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_boundary(const Point_2 &p) const
-  {
-    return bounded_side(p) == ON_BOUNDARY;
-  }
-
-  typename R::Boolean
-  has_on_negative_side(const Point_2 &p) const
-  {
-    return oriented_side(p) == ON_NEGATIVE_SIDE;
-  }
-
-  typename R::Boolean
-  has_on_positive_side(const Point_2 &p) const
-  {
-    return oriented_side(p) == ON_POSITIVE_SIDE;
-  }
-
-  typename R::Boolean
-  is_degenerate() const
-  {
-    return R().collinear_2_object()(vertex(0), vertex(1), vertex(2));
-  }
-
-  Bbox_2
-  bbox() const
-  {
-    return R().construct_bbox_2_object()(*this);
-  }
-
-  Triangle_2
-  opposite() const
-  {
-    return R().construct_opposite_triangle_2_object()(*this);
-  }
-
-  Triangle_2
-  transform(const Aff_transformation_2 &t) const
-  {
-    return Triangle_2(t.transform(vertex(0)),
-                      t.transform(vertex(1)),
-                      t.transform(vertex(2)));
-  }
-
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Triangle_2<R> &t)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << t[0] << ' ' << t[1] << ' ' << t[2];
-    case IO::BINARY :
-        return os << t[0] << t[1]  << t[2];
-    default:
-        return os<< "Triangle_2(" << t[0] << ", "
-                 << t[1] << ", " << t[2] <<")";
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Triangle_2<R> &t)
-{
-    typename R::Point_2 p, q, r;
-
-    is >> p >> q >> r;
-
-    if (is)
-        t = Triangle_2<R>(p, q, r);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h
deleted file mode 100644
index 579d530..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#ifndef CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
-#define CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
-
-#include <CGAL/Point_2.h>
-#include <CGAL/Segment_2.h>
-#include <CGAL/Triangle_2.h>
-#include <CGAL/Iso_rectangle_2.h>
-#include <CGAL/Segment_2_Segment_2_intersection.h>
-#include <CGAL/Intersection_traits_2.h>
-
-#include <vector>
-#include <list>
-
-
-namespace CGAL{ namespace internal {
-
-  template <class K>
-  typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
-  intersection(const typename K::Triangle_2 &t, const typename K::Iso_rectangle_2 &r, const K& kk)
-  {
-    typedef typename K::FT FT;
-    typedef typename K::Segment_2 Segment;
-    typedef typename K::Triangle_2 Triangle;
-    typedef typename K::Point_2   Point;
-
-    FT xr1, yr1, xr2, yr2;  
-    bool position[3][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
-    bool is_inside[3] = {false, false, false}; //true when a vertex is inside rectangle
-
-    xr1 = r.xmin(); xr2 = r.xmax();
-    yr1 = r.ymax(); yr2 = r.ymin();
-
-    Point upper_left, lower_right;
-    Point p[3]; //the vertices of triangle
-
-    upper_left = Point(xr1, yr1); //upper left
-    lower_right = Point(xr2, yr2); //lower right    
-    
-    p[0] = t.vertex(0);
-    p[1] = t.vertex(1);
-    p[2] = t.vertex(2);  
-
-    //check the points of the triangle
-    for(int i=0; i<3; i++){
-      if(!(compare_x(p[i], upper_left) == SMALLER))
-        if(!(compare_x(p[i], lower_right) == LARGER))
-          if(!(compare_y(p[i], upper_left) == LARGER))
-            if(!(compare_y(p[i], lower_right) == SMALLER))        
-              is_inside[i] = true; //the point is inside       
-            else        
-              position[i][2] = true; //South        
-          else      
-            position[i][0] = true; //North      
-        else
-        {
-          position[i][3] = true; //East
-          if(compare_y(p[i], upper_left) == LARGER)
-            position[i][0] = true; //North
-          else if(compare_y(p[i], lower_right) == SMALLER)
-            position[i][2] = true; //South
-        }
-      else
-      {
-        position[i][1] = true;  //West
-        if(compare_y(p[i], upper_left) == LARGER)
-          position[i][0] = true; //North
-        else if(compare_y(p[i], lower_right) == SMALLER)
-          position[i][2] = true; //South
-
-      }
-    }
-
-    //test if the triangle is completely to the left, right, below or above the rectangle
-    bool intersection = true; //true if it could be a intersection with the rectangle
-    for(int j=0; j<4; j++)
-      if(position[0][j] && position[1][j] && position[2][j] ){
-        intersection = false;
-        break;
-      }
-
-    if(intersection){
-      Segment s[4]; //the segments that identify the N, W, S, E  
-      bool outside = false;
-      bool status_in_list[3] = {false, false, false}; //true if the triangle's points are in the result vector
-      std::list<int> last_intersected;
-      int last_intersected_segment = 5; //could be 0=N, 1=W, 2=S, 3=E
-      last_intersected.push_back(5);
-      int status_intersected[4] = {0, 0, 0, 0}; //the number of intersections for each segment
-      std::vector<Point> result; //the vector containing the result vertices
-      int next; //the index of the next vertex
-
-      s[0] = Segment(Point(xr2, yr1), Point(xr1, yr1)); //N
-      s[1] = Segment(Point(xr1, yr1), Point(xr1, yr2)); //W  
-      s[2] = Segment(Point(xr1, yr2), Point(xr2, yr2)); //S
-      s[3] = Segment(Point(xr2, yr2), Point(xr2, yr1)); //E
-        
-      //assign to p[i] the vertices of the triangle in ccw order
-      if(t.orientation() == CGAL::CLOCKWISE)
-      {
-        p[0] = t.vertex(2);
-        p[2] = t.vertex(0);
-        
-        is_inside[0] = is_inside[2] ^ is_inside[0];
-        is_inside[2] = is_inside[2] ^ is_inside[0];
-        is_inside[0] = is_inside[0] ^ is_inside[2];
-
-        for(int i=0; i<4; i++){
-          position[0][i] = position[2][i] ^ position[0][i];
-          position[2][i] = position[2][i] ^ position[0][i];
-          position[0][i] = position[0][i] ^ position[2][i];
-        }
-      }
-
-      for(int index=0; index<3; index++) //for each vertex
-      {
-        next=(index+1)%3;
-        if(is_inside[index]){ // true if first is inside
-          if(!status_in_list[index]){  //if is not yet in the list
-            result.push_back(p[index]);
-            status_in_list[index] = true;
-          }
-          if(is_inside[next]){ //true if second is inside
-            //add the points in the vector    
-            if(!status_in_list[next]){ // if is not yet in the list
-              result.push_back(p[next]);
-              status_in_list[next] = true;
-            }
-          } else { //I'm going out, the second is outside
-            for(int j=0; j<4; j++) // for all directions
-              if(position[next][j]) // if it's a second point direction
-              {
-                //test for intersection
-                typename Intersection_traits<K, Segment, Segment>::result_type
-                  v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
-                if(v) {
-                  if(const Point *p_obj = intersect_get<Point>(v))
-                {
-                  //intersection found
-                  outside = true;
-                  result.push_back(*p_obj); //add the intersection point
-                  if(last_intersected.back()!=j)
-                    last_intersected.push_back(j);
-                  status_intersected[j]++;
-                }
-              }
-          }
-          }
-        } else { //the first point is outside      
-          for(int j=0; j<4; j++) // for all directions
-            if(position[index][j]) //watch only the first point directions
-            {
-              //test for intersection
-              typename Intersection_traits<K, Segment, Segment>::result_type
-                v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
-              if(v) {
-                if(const Point *p_obj = intersect_get<Point>(v))
-              {
-                //intersection found
-                outside = false;
-                last_intersected_segment = last_intersected.back();
-                if(last_intersected_segment != 5 && last_intersected_segment != j && status_intersected[j] == 0){
-                  //add the target of each rectangle segment in the list
-                  if(last_intersected_segment < j)
-                    while(last_intersected_segment < j){
-                      result.push_back(s[last_intersected_segment].target());
-                      last_intersected_segment++;
-                    }
-                  else{
-                    while(last_intersected_segment < 4){
-                      result.push_back(s[last_intersected_segment].target());
-                      last_intersected_segment++;
-                    }
-                    last_intersected_segment = 0;
-                    while(last_intersected_segment < j){
-                      result.push_back(s[last_intersected_segment].target());
-                      last_intersected_segment++;
-                    }
-                  }
-                }
-                result.push_back(*p_obj); //add the intersection point in the list
-                if(last_intersected.back()!=j)
-                  last_intersected.push_back(j);
-                status_intersected[j]++;
-                if(!is_inside[next]){ //if the second point is not inside search a second intersection point
-                  for(j=0; j<4; j++) // for all directions
-                    if(position[next][j])
-                    {
-                      //test for intersection
-                        typename Intersection_traits<K, Segment, Segment>
-                          ::result_type
-                          v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
-                        if(v) {
-                          if(const Point *p_obj = intersect_get<Point>(v))
-                           //found the second intersection
-                      {
-                        outside = true;
-                        result.push_back(*p_obj);
-                        if(last_intersected.back()!=j)
-                          last_intersected.push_back(j);
-                        status_intersected[j]++;
-                      }
-                    }
-                      }
-                }//end if the second point is not inside
-              } 
-              } // end v
-            }
-        }//end else (the first point is outside)
-      }//endfor
-      if(outside){
-        std::list<int>::const_iterator it = last_intersected.begin();
-        while(*it == 5)
-          it++;
-        last_intersected_segment = *it;
-        int j = last_intersected.back();
-        if(last_intersected_segment != 5 && last_intersected_segment != j){
-          //add the target of each rectangle segment in the list
-          if(last_intersected_segment > j)
-            while(last_intersected_segment > j){
-              result.push_back(s[j].target());
-              j++;
-            }
-          else{
-            while(j<4){
-              result.push_back(s[j].target());
-              j++;
-            }
-            j = 0;
-            while(j<last_intersected_segment){
-              result.push_back(s[j].target());
-              j++;
-            }
-          }
-        }
-      }//end if(outside)
-
-      //test if were not intersections 
-      //between the triangle and the rectangle
-      if(status_intersected[0] == 0 && status_intersected[1] == 0 && 
-        status_intersected[2] == 0 && status_intersected[3] == 0)
-      {
-        //should test if the rectangle is inside the triangle
-        if(t.bounded_side(upper_left) == CGAL::ON_BOUNDED_SIDE){
-          for(int k=0; k<4; k++)
-            result.push_back(s[k].source());
-        }
-      }
-      //remove duplicated consecutive points
-      typename std::vector<Point>::iterator last = std::unique(result.begin(),result.end());
-      result.erase(last,result.end());
-      
-      switch(result.size()){
-        case 0:
-          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>();
-        case 1:
-          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(result[0]);
-        case 2:
-          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(Segment(result[0], result[1]));
-        case 3:
-          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(Triangle(result[0], result[1], result[2]));
-        default:
-          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(result);
-      }
-
-    }//end if(intersection)
-    return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>();
-  }//end intersection
-  
-  template <class K>
-  typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
-  inline intersection(const typename K::Iso_rectangle_2 &r, const typename K::Triangle_2 &t, const K& k)
-  {
-    return intersection(t,r,k);
-  }
-  
-  template <class K>
-  bool do_intersect(
-    const typename K::Triangle_2 &tr,
-    const typename K::Iso_rectangle_2 &ir,
-    const K& k)
-  {
-    //1) check if at least one vertex of tr is not outside ir
-    //2) if not, check if at least on vertex of tr is not outside tr
-    
-    typename K::Has_on_unbounded_side_2 unbounded_side=k.has_on_unbounded_side_2_object();
-    typename K::Construct_vertex_2 vertex=k.construct_vertex_2_object();
-    for (int i=0;i<3;++i)
-      if ( !unbounded_side( ir,vertex(tr,i) ) ) return true;
-    for (int i=0;i<4;++i)
-      if ( !unbounded_side( tr,vertex(ir,i) ) ) return true;
-    return false;
-  }
-
-  template <class K>
-  inline bool do_intersect(
-    const typename K::Iso_rectangle_2 &ir,
-    const typename K::Triangle_2 &tr,
-    const K& k)
-  {
-    return do_intersect(tr,ir,k);
-  }
-  
-} //namespace internal
-
-CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
-CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
-  
-}//end namespace
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangle_3.h
deleted file mode 100644
index b1d04a1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3.h
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_TRIANGLE_3_H
-#define CGAL_TRIANGLE_3_H
-
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Triangle_3 : public R_::Kernel_base::Triangle_3
-{
-  typedef typename R_::RT                    RT;
-  typedef typename R_::FT                    FT;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Plane_3               Plane_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Triangle_3                         Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<2>  Feature_dimension;
-
-  typedef typename R_::Kernel_base::Triangle_3  Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Triangle_3() {}
-
-  Triangle_3(const Rep& t)
-      : Rep(t) {}
-
-  Triangle_3(const Point_3& p, const Point_3& q, const Point_3& r)
-    : Rep(typename R::Construct_triangle_3()(Return_base_tag(), p, q, r)) {}
-
-  Triangle_3 transform(const Aff_transformation_3 &t) const
-  {
-    return Triangle_3(t.transform(this->vertex(0)),
-                      t.transform(this->vertex(1)),
-                      t.transform(this->vertex(2)));
-  }
-
-  Plane_3 supporting_plane() const
-  {
-    return R().construct_supporting_plane_3_object()(*this);
-  }
-
-  bool has_on(const Point_3 &p) const
-  {
-    return R().has_on_3_object()(*this, p);
-  }
-
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Triangle_3, int )>::type
-  vertex(int i) const
-  {
-    return R().construct_vertex_3_object()(*this, i);
-  }
-
-  typename cpp11::result_of<typename R::Construct_vertex_3( Triangle_3, int )>::type
-  operator[](int i) const
-  {
-    return vertex(i);
-  }
-
-  bool is_degenerate() const
-  {
-    return R().is_degenerate_3_object()(*this);
-  }
-
-  Bbox_3
-  bbox() const
-  {
-    return R().construct_bbox_3_object()(*this);
-  }
-
-  FT squared_area() const // TODO : use Qrt
-  {
-    return R().compute_squared_area_3_object()(*this);
-  }
-
-};
-
-
-template < class R >
-std::ostream &
-operator<<(std::ostream &os, const Triangle_3<R> &t)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << t[0] << ' ' << t[1] << ' ' << t[2];
-    case IO::BINARY :
-        return os << t[0]  << t[1]  << t[2];
-    default:
-        os << "Triangle_3(" << t[0] <<  ", " << t[1] <<   ", " << t[2] <<")";
-        return os;
-    }
-}
-
-template < class R >
-std::istream &
-operator>>(std::istream &is, Triangle_3<R> &t)
-{
-    typename R::Point_3 p, q, r;
-
-    is >> p >> q >> r;
-
-    if (is)
-        t = Triangle_3<R>(p, q, r);
-    return is;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGLE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation.h
deleted file mode 100644
index 18805c0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation.h
+++ /dev/null
@@ -1,1330 +0,0 @@
-// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)    : Samuel Hornus
-
-#ifndef CGAL_TRIANGULATION_H
-#define CGAL_TRIANGULATION_H
-
-#include <CGAL/internal/Triangulation/utilities.h>
-#include <CGAL/Triangulation_data_structure.h>
-#include <CGAL/Triangulation_full_cell.h>
-#include <CGAL/Triangulation_vertex.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/spatial_sort.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Default.h>
-
-#include <boost/iterator/filter_iterator.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-
-namespace CGAL {
-
-// Iterator which iterates over vertex_handle's, but returns a point when
-// dereferenced. If the current 
-// vertex_handle vh == vh_where_point_should_be_substituted, it returns
-// "subtitute_point", otherwise, it returns vh->point()
-template<class VertexHandleConstIter>
-class Substitute_point_in_vertex_iterator 
-{
-  typedef typename std::iterator_traits<VertexHandleConstIter>::value_type Vertex_handle;
-  typedef typename Vertex_handle::value_type Vertex;
-  typedef typename Vertex::Point Point;
-
-public:
-  typedef Point const& result_type; // For result_of
-
-  Substitute_point_in_vertex_iterator(
-    Vertex_handle vh_where_point_should_be_substituted,
-    Point const *subtitute_point)
-  : vh_where_point_should_be_substituted_(vh_where_point_should_be_substituted)
-  , subtitute_point_(subtitute_point)
-  {}
-
-  result_type operator()(Vertex_handle vh) const
-  {
-    if (vh == vh_where_point_should_be_substituted_) 
-      return *subtitute_point_;
-    else
-      return vh->point();
-  }
-
-private:
-  Vertex_handle vh_where_point_should_be_substituted_;
-  Point const *subtitute_point_;
-
-};
-
-
-template <  class TriangulationTraits, class TDS_ = Default >
-class Triangulation
-{
-    typedef typename TriangulationTraits::Dimension Maximal_dimension_;
-    typedef typename Default::Get<TDS_, Triangulation_data_structure
-                    <   Maximal_dimension_,
-                        Triangulation_vertex<TriangulationTraits>,
-                        Triangulation_full_cell<TriangulationTraits> >
-                        >::type                     TDS;
-    typedef Triangulation<TriangulationTraits, TDS_> Self;
-    
-protected:
-    typedef typename TriangulationTraits::Flat_orientation_d Flat_orientation_d;
-    typedef typename TriangulationTraits::Construct_flat_orientation_d Construct_flat_orientation_d;
-    typedef typename TriangulationTraits::In_flat_orientation_d In_flat_orientation_d;
-    
-    // Wrapper
-    struct Coaffine_orientation_d 
-    {
-      boost::optional<Flat_orientation_d>* fop;
-      Construct_flat_orientation_d cfo;
-      In_flat_orientation_d ifo;
-
-      Coaffine_orientation_d(
-        boost::optional<Flat_orientation_d>& x, 
-        Construct_flat_orientation_d const&y, 
-        In_flat_orientation_d const&z)
-      : fop(&x), cfo(y), ifo(z) {}
-      
-      template<class Iter> 
-      CGAL::Orientation operator()(Iter a, Iter b) const
-      {
-        if (*fop)
-          return ifo(fop->get(),a,b);
-        *fop = cfo(a,b);
-        CGAL_assertion(ifo(fop->get(),a,b) == CGAL::POSITIVE);
-        return CGAL::POSITIVE;
-      }
-    };
-
-    void reset_flat_orientation()
-    {
-      if (current_dimension() == preset_flat_orientation_.first)
-      {
-        CGAL_assertion(preset_flat_orientation_.second != NULL);
-        flat_orientation_ = *preset_flat_orientation_.second;
-      }
-      else
-        flat_orientation_ = boost::none;
-    }
-
-    typedef typename TriangulationTraits::Orientation_d
-                                                    Orientation_d;
-
-public:
-
-    typedef TriangulationTraits                     Geom_traits;
-    typedef TDS                                     Triangulation_ds;
-
-    typedef typename TDS::Vertex                    Vertex;
-    typedef typename TDS::Full_cell                 Full_cell;
-    typedef typename TDS::Facet                     Facet;
-    typedef typename TDS::Face                      Face;
-
-    typedef Maximal_dimension_                      Maximal_dimension;
-    typedef typename Geom_traits::Point_d           Point;
-
-    typedef typename TDS::Vertex_handle            Vertex_handle;
-    typedef typename TDS::Vertex_iterator          Vertex_iterator;
-    typedef typename TDS::Vertex_const_handle      Vertex_const_handle;
-    typedef typename TDS::Vertex_const_iterator    Vertex_const_iterator;
-
-    typedef typename TDS::Full_cell_handle           Full_cell_handle;
-    typedef typename TDS::Full_cell_iterator         Full_cell_iterator;
-    typedef typename TDS::Full_cell_const_handle     Full_cell_const_handle;
-    typedef typename TDS::Full_cell_const_iterator   Full_cell_const_iterator;
-    
-    typedef typename TDS::Facet_iterator           Facet_iterator;
-
-    typedef typename TDS::size_type                size_type;
-    typedef typename TDS::difference_type          difference_type;
-
-    /// The type of location a new point is found lying on
-    enum  Locate_type
-    {
-          ON_VERTEX = 0 // simplex of dimension 0
-        , IN_FACE   = 1 // simplex of dimension in [ 1, |current_dimension()| - 2 ]
-        , IN_FACET  = 2 // simplex of dimension |current_dimension()| - 1
-        , IN_FULL_CELL  = 3 /// simplex of dimension |current_dimension()|
-        , OUTSIDE_CONVEX_HULL = 4
-        , OUTSIDE_AFFINE_HULL = 5
-    };
-
-    // Finite elements iterators
-
-    class Finiteness_predicate;
-
-    typedef boost::filter_iterator<Finiteness_predicate, Vertex_iterator>
-        Finite_vertex_iterator;
-    typedef boost::filter_iterator<Finiteness_predicate, Vertex_const_iterator>
-        Finite_vertex_const_iterator;
-    typedef boost::filter_iterator<Finiteness_predicate, Full_cell_iterator>
-        Finite_full_cell_iterator;
-    typedef boost::filter_iterator<Finiteness_predicate, Full_cell_const_iterator>
-        Finite_full_cell_const_iterator;
-    typedef boost::filter_iterator<Finiteness_predicate, Facet_iterator>
-        Finite_facet_iterator;
-
-protected: // DATA MEMBERS
-
-    Triangulation_ds                    tds_;
-    const Geom_traits                   kernel_;
-    Vertex_handle                       infinity_;
-    mutable std::vector<Oriented_side>  orientations_;
-    mutable boost::optional<Flat_orientation_d> flat_orientation_;
-    // The user can specify a Flat_orientation_d object to be used for 
-    // orienting simplices of a specific dimension 
-    // (= preset_flat_orientation_.first)
-    // preset_flat_orientation_.first = numeric_limits<int>::max() otherwise)
-    std::pair<int, const Flat_orientation_d *> preset_flat_orientation_;
-    // for stochastic walk in the locate() function:
-    mutable Random                      rng_;
-#ifdef CGAL_TRIANGULATION_STATISTICS
-    mutable unsigned long walk_size_;
-#endif
-
-protected: // HELPER FUNCTIONS
-
-    typedef CGAL::Iterator_project<
-        typename Full_cell::Vertex_handle_const_iterator,
-        internal::Triangulation::Point_from_vertex_handle<Vertex_handle, Point>
-    > Point_const_iterator;
-
-    Point_const_iterator points_begin(Full_cell_const_handle c) const
-        { return Point_const_iterator(c->vertices_begin()); }
-    Point_const_iterator points_end(Full_cell_const_handle c) const
-        { return Point_const_iterator(c->vertices_end()); }
-    Point_const_iterator points_begin(Full_cell_handle c) const
-        { return Point_const_iterator(c->vertices_begin()); }
-    Point_const_iterator points_end(Full_cell_handle c) const
-        { return Point_const_iterator(c->vertices_end()); }
-
-public:
-
-    //       FACETS OPERATIONS
-
-    Full_cell_handle full_cell(const Facet & f) const
-    {
-        return tds().full_cell(f);
-    }
-
-    int index_of_covertex(const Facet & f) const
-    {
-        return tds().index_of_covertex(f);
-    }
-
-    // - - - - - - - - - - - - - - - - - - - - - - - - CREATION / CONSTRUCTORS
-
-    Triangulation(int dim, const Geom_traits k = Geom_traits())
-        : tds_(dim)
-        , kernel_(k)
-        , infinity_()
-        , preset_flat_orientation_((std::numeric_limits<int>::max)(),
-                                   (Flat_orientation_d*) NULL)
-        , rng_((long)0)
-#ifdef CGAL_TRIANGULATION_STATISTICS
-        ,walk_size_(0)
-#endif
-    {
-        clear();
-    }
-
-    // With this constructor,
-    // the user can specify a Flat_orientation_d object to be used for 
-    // orienting simplices of a specific dimension 
-    // (= preset_flat_orientation_.first)
-    // It it used for by dark triangulations created by DT::remove
-    Triangulation(
-      int dim,
-      const std::pair<int, const Flat_orientation_d *> &preset_flat_orientation, 
-      const Geom_traits k = Geom_traits())
-        : tds_(dim)
-        , kernel_(k)
-        , infinity_()
-        , preset_flat_orientation_(preset_flat_orientation)
-        , rng_((long)0)
-#ifdef CGAL_TRIANGULATION_STATISTICS
-        ,walk_size_(0)
-#endif
-    {
-        clear();
-    }
-    
-    Triangulation(const Triangulation & t2)
-        : tds_(t2.tds_)
-        , kernel_(t2.kernel_)
-        , infinity_()
-        , preset_flat_orientation_((std::numeric_limits<int>::max)(), 
-                                   (Flat_orientation_d*) NULL)
-        , rng_(t2.rng_)
-#ifdef CGAL_TRIANGULATION_STATISTICS
-        ,walk_size_(t2.walk_size_)
-#endif
-    {
-        // We find the vertex at infinity by scanning the vertices of both
-        // triangulations. This works because Compact_container garantees that
-        // the vertices in the copy (*this) are stored in the same order as in
-        // the original triangulation (t2)
-        infinity_ = vertices_begin();
-        Vertex_const_iterator inf2 = t2.vertices_begin();
-        while( inf2 != t2.infinite_vertex() )
-        {
-            ++infinity_;
-            ++inf2;
-        }
-        // A full_cell has at most 1 + maximal_dimension() facets:
-        orientations_.resize(1 + maximal_dimension());
-        // Our coaffine orientation predicates HAS state member variables
-        reset_flat_orientation();
-    }
-
-    ~Triangulation() {}
-
-    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ACCESS FUNCTIONS
-
-    /* These three function are no longer needed since we do not use them anymore
-       in the Delaunay_triangulation::remove. *But*, they may reappear in the future
-       if we manage to passe the information that flags/TDS_data is available or not
-       for marking simplices in Delaunay_triangulation::remove. This would be useful
-       to make it a little faster, instead of binary searching if a simplex is marked
-       or not... 
-    // NOT DOCUMENTED -- 
-    bool get_visited(Full_cell_handle s) const
-    {
-        return tds().get_visited(s);
-    }
-    // NOT DOCUMENTED -- 
-    bool get_visited(Full_cell_const_handle s) const
-    {
-        return tds().get_visited(s);
-    }
-
-    // NOT DOCUMENTED -- 
-    void set_visited(Full_cell_handle s, bool b) const
-    {
-        tds().set_visited(s, b);
-    } */
-
-    Coaffine_orientation_d coaffine_orientation_predicate() const
-    {
-      return Coaffine_orientation_d (
-        flat_orientation_, 
-        geom_traits().construct_flat_orientation_d_object(), 
-        geom_traits().in_flat_orientation_d_object()
-      );
-    }
-
-    const Triangulation_ds & tds() const
-    {
-        return tds_;
-    }
-
-    Triangulation_ds & tds()
-    {
-        return tds_;
-    }
-
-    const Geom_traits & geom_traits() const
-    {
-        return kernel_;
-    }
-
-    int maximal_dimension() const { return tds().maximal_dimension(); }
-    int current_dimension() const { return tds().current_dimension(); }
-
-    bool empty() const
-    {
-        return current_dimension() == -1;
-    }
-
-    size_type number_of_vertices() const
-    {
-        return tds().number_of_vertices() - 1;
-    }
-
-    size_type number_of_full_cells() const
-    {
-        return tds().number_of_full_cells();
-    }
-
-    Vertex_handle infinite_vertex() const
-    {
-        return infinity_;
-    }
-
-    Full_cell_handle infinite_full_cell() const
-    {
-        CGAL_assertion(infinite_vertex()->full_cell()->has_vertex(infinite_vertex()));
-        return infinite_vertex()->full_cell();
-    }
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - NON CONSTANT-TIME ACCESS FUNCTIONS
-
-    size_type number_of_finite_full_cells() const
-    {
-        Full_cell_const_iterator s = full_cells_begin();
-        size_type result = number_of_full_cells();
-        for( ; s != full_cells_end(); ++s )
-        {
-            if( is_infinite(s) )
-                --result;
-        }
-        return result;
-    }
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TRAVERSAL
-
-    Vertex_iterator vertices_begin() { return tds().vertices_begin(); }
-    Vertex_iterator vertices_end()   { return tds().vertices_end(); }
-
-    Vertex_const_iterator vertices_begin() const { return tds().vertices_begin(); }
-    Vertex_const_iterator vertices_end()   const { return tds().vertices_end(); }
-
-    Finite_vertex_iterator finite_vertices_begin()
-    { return Finite_vertex_iterator(Finiteness_predicate(*this), vertices_begin(), vertices_end()); }
-    Finite_vertex_iterator finite_vertices_end()
-    { return Finite_vertex_iterator(Finiteness_predicate(*this), vertices_end(), vertices_end()); }
-    Finite_vertex_const_iterator finite_vertices_begin() const
-    { return Finite_vertex_const_iterator(Finiteness_predicate(*this), vertices_begin(), vertices_end()); }
-    Finite_vertex_const_iterator finite_vertices_end() const
-    { return Finite_vertex_const_iterator(Finiteness_predicate(*this), vertices_end(), vertices_end()); }
-
-    Full_cell_iterator full_cells_begin() { return tds().full_cells_begin(); }
-    Full_cell_iterator full_cells_end()   { return tds().full_cells_end(); }
-
-    Full_cell_const_iterator full_cells_begin() const { return tds().full_cells_begin(); }
-    Full_cell_const_iterator full_cells_end()   const { return tds().full_cells_end(); }
-
-    Finite_full_cell_iterator finite_full_cells_begin()
-    { return Finite_full_cell_iterator(Finiteness_predicate(*this), full_cells_begin(), full_cells_end()); }
-    Finite_full_cell_iterator finite_full_cells_end()
-    { return Finite_full_cell_iterator(Finiteness_predicate(*this), full_cells_end(), full_cells_end()); }
-    Finite_full_cell_const_iterator finite_full_cells_begin() const
-    { return Finite_full_cell_const_iterator(Finiteness_predicate(*this), full_cells_begin(), full_cells_end()); }
-    Finite_full_cell_const_iterator finite_full_cells_end() const
-    { return Finite_full_cell_const_iterator(Finiteness_predicate(*this), full_cells_end(), full_cells_end()); }
-
-    Facet_iterator facets_begin() { return tds().facets_begin(); }
-    Facet_iterator facets_end() { return tds().facets_end(); }
-    Facet_iterator finite_facets_begin()
-    { return Finite_facet_iterator(Finiteness_predicate(*this), facets_begin(), facets_end()); }
-    Facet_iterator finite_facets_end()
-    { return Finite_facet_iterator(Finiteness_predicate(*this), facets_end(), facets_end()); }
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SOME PREDICATE FUNCTORS
-
-    class Finiteness_predicate
-    {
-        const Self & t_;
-    public:
-        Finiteness_predicate(const Self & t) : t_(t) {}
-        template < class T >
-        bool operator()(const T & t) const
-        {
-            return ! t_.is_infinite(t);
-        }
-    };
-
-    class Point_equality_predicate
-    {
-        const Point & o_;
-    public:
-        Point_equality_predicate(const Point & o) : o_(o) {}
-        bool operator()(const Point & o) const { return  (o == o_ );}
-    };
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIMPLE QUERIES
-/*
-    bool is_vertex(const Point & p, Vertex_handle & v, Full_cell_handle hint = Full_cell_handle()) const
-    {
-        Locate_type lt;
-        Face f(maximal_dimension());
-        Facet ft;
-        Full_cell_handle s = locate(p, lt, f, ft, hint);
-        if( ON_VERTEX == lt )
-        {
-            v = s->vertex(f.index(0));
-            return true;
-        }
-        return false;
-    }
-
-    bool is_vertex(Vertex_const_handle v) const
-    {
-        return tds().is_vertex(v);
-    }
-
-    bool is_full_cell(Full_cell_const_handle s) const
-    {
-        return tds().is_full_cell(s);
-    }
-*/
-
-    bool is_infinite(Vertex_const_handle v) const
-    {
-        CGAL_precondition(Vertex_const_handle() != v);
-        return (infinite_vertex() == v);
-    }
-
-    bool is_infinite(const Vertex & v) const /* internal use, not documented */
-    {
-        return (&(*infinite_vertex()) == &v);
-    }
-
-    bool is_infinite(Full_cell_const_handle s) const
-    {
-        CGAL_precondition(Full_cell_const_handle() != s);
-        return is_infinite(*s);
-    }
-    bool is_infinite(const Full_cell & s) const /* internal use, not documented */
-    {
-        for(int i = 0; i <= current_dimension(); ++i)
-            if( is_infinite(s.vertex(i)) )
-                return true;
-        return false;
-    }
-    bool is_infinite(const Facet & ft) const
-    {
-        Full_cell_const_handle s = full_cell(ft);
-        CGAL_precondition(s != Full_cell_handle());
-        if( is_infinite(s) )
-            return (s->vertex(index_of_covertex(ft)) != infinite_vertex());
-        return false;
-    }
-
-    bool is_infinite(const Face & f) const
-    {
-        Full_cell_const_handle s = f.full_cell();
-        CGAL_precondition(s != Full_cell_handle());
-        if( is_infinite(s) )
-        {
-            Vertex_handle v;
-            for( int i(0); i<= f.face_dimension(); ++i)
-                if ( is_infinite( f.vertex(i) )) return true;
-        }
-        return false;
-    }
-
-    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ELEMENT GATHERING
-
-    
-    template< typename OutputIterator >
-    OutputIterator incident_full_cells(const Face & f, OutputIterator out) const
-    {
-        return tds().incident_full_cells(f, out);
-    }
-    template< typename OutputIterator >
-    OutputIterator incident_full_cells(Vertex_const_handle v, OutputIterator out) const
-    {
-        return tds().incident_full_cells(v, out);
-    }
-    template< typename OutputIterator >
-    OutputIterator star(const Face & f, OutputIterator out) const
-    {
-        return tds().star(f, out);
-    }
-
-    template< typename OutputIterator >
-    OutputIterator incident_faces(Vertex_const_handle v, int d, OutputIterator out)
-    {
-        return tds().incident_faces(v, d, out);
-    }
-    /*
-    template< typename OutputIterator, class Comparator >
-    OutputIterator incident_upper_faces( Vertex_const_handle v, int d,
-                                                OutputIterator out, Comparator cmp = Comparator())
-    {
-        return tds().incident_upper_faces(v, d, out, cmp);
-    }
-    template< typename OutputIterator >
-    OutputIterator incident_upper_faces( Vertex_const_handle v, int d,
-                                                OutputIterator out)
-    { // FIXME: uncomment this function, since it uses a comparator specific to
-       // *geometric* triangulation (taking infinite vertex into account)
-        internal::Triangulation::Compare_vertices_for_upper_face<Self> cmp(*this);
-        return tds().incident_upper_faces(v, d, out, cmp);
-    }
-    */
-    Orientation orientation(Full_cell_const_handle s, bool in_is_valid = false) const
-    {
-        if( ! in_is_valid )
-            CGAL_assertion( ! is_infinite(s) );
-        if( 0 == current_dimension() )
-            return POSITIVE;
-        if( current_dimension() == maximal_dimension() )
-        {
-            Orientation_d ori = geom_traits().orientation_d_object();
-            return ori(points_begin(s), points_begin(s) + 1 + current_dimension());
-        }
-        else
-        {
-            return coaffine_orientation_predicate()(points_begin(s), points_begin(s) + 1 + current_dimension());
-        }
-    }
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UPDATE OPERATIONS
-
-    void clear()
-    {
-        tds_.clear();
-        infinity_ = tds().insert_increase_dimension();
-        // A full_cell has at most 1 + maximal_dimension() facets:
-        orientations_.resize(1 + maximal_dimension());
-        // Our coaffine orientation predicates HAS state member variables
-        reset_flat_orientation();
-#ifdef CGAL_TRIANGULATION_STATISTICS
-        walk_size_ = 0;
-#endif
-    }
-
-    void set_current_dimension(int d)
-    {
-        tds().set_current_dimension(d);
-    }
-
-    Full_cell_handle new_full_cell()
-    { 
-        return tds().new_full_cell();
-    }
-
-    Vertex_handle  new_vertex(const Point & p) 
-    {
-        return tds().new_vertex(p);
-    }
-
-    void set_neighbors(Full_cell_handle s, int i, Full_cell_handle s1, int j)
-    {
-        tds().set_neighbors(s, i, s1, j);
-    }
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
-
-    bool is_valid(bool = false, int = 0) const;
-    bool are_incident_full_cells_valid(Vertex_const_handle, bool = false, int = 0) const;
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT LOCATION
-
-protected:
-    template< typename OrientationPredicate >
-    Full_cell_handle do_locate(   const Point &, Locate_type &, Face &, Facet &,
-                                Full_cell_handle start,
-                                const OrientationPredicate & o) const;
-public:
-    Full_cell_handle locate(  const Point &, Locate_type &, Face &, Facet &,
-                            Full_cell_handle start = Full_cell_handle()) const;
-    Full_cell_handle locate(  const Point &, Locate_type &, Face &, Facet &,
-                            Vertex_handle) const;
-    Full_cell_handle locate(const Point & p, Full_cell_handle s = Full_cell_handle()) const;
-    Full_cell_handle locate(const Point & p, Vertex_handle v) const;
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - REMOVALS
-
-    Vertex_handle contract_face(const Point &, const Face &);
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT INSERTION
-
-    template< typename ForwardIterator >
-    size_type insert(ForwardIterator start, ForwardIterator end)
-    {
-        size_type n = number_of_vertices();
-        std::vector<Point> points(start, end);
-        spatial_sort(points.begin(), points.end(), geom_traits());
-        Full_cell_handle hint = Full_cell_handle();
-        typename std::vector<Point>::const_iterator s = points.begin();
-        while( s != points.end() )
-        {
-            hint = insert(*s++, hint)->full_cell();
-        }
-        return number_of_vertices() - n;
-    }
-    Vertex_handle insert(const Point &, const Locate_type, const Face &, const Facet &, const Full_cell_handle);
-    Vertex_handle insert(const Point &, Full_cell_handle start = Full_cell_handle());
-    Vertex_handle insert(const Point &, Vertex_handle);
-    template< typename ForwardIterator >
-    Vertex_handle insert_in_hole(const Point & p, ForwardIterator start, ForwardIterator end, const Facet & ft)
-    {
-        Emptyset_iterator out;
-        return insert_in_hole(p, start, end, ft, out);
-    }
-    template< typename ForwardIterator, typename OutputIterator >
-    Vertex_handle insert_in_hole(const Point & p, ForwardIterator start, ForwardIterator end, const Facet & ft, 
-                                 OutputIterator out)
-    {
-        Vertex_handle v = tds().insert_in_hole(start, end, ft, out);
-        v->set_point(p);
-        return v;
-    }
-    Vertex_handle insert_in_face(const Point &, const Face &);
-    Vertex_handle insert_in_facet(const Point &, const Facet &);
-    Vertex_handle insert_in_full_cell(const Point &, Full_cell_handle);
-    Vertex_handle insert_outside_convex_hull_1(const Point &, Full_cell_handle);
-    Vertex_handle insert_outside_convex_hull(const Point &, Full_cell_handle);
-    Vertex_handle insert_outside_affine_hull(const Point &);
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - FACET-TRAVERSAL PREDICATES
-
-    template< typename OrientationPredicate >
-    class Outside_convex_hull_traversal_predicate
-    {
-        Triangulation & t_;
-        const Point & p_;
-        OrientationPredicate const& ori_;
-        int cur_dim_;
-    public:
-        Outside_convex_hull_traversal_predicate(Triangulation & t, const Point & p,
-                                    OrientationPredicate const& ori)
-        : t_(t), p_(p), ori_(ori), cur_dim_(t.current_dimension()) {}
-        // FUTURE change parameter to const reference
-        bool operator()(Facet f) const
-        {
-            Full_cell_handle s = t_.full_cell(f);
-            const int i = t_.index_of_covertex(f);
-            Full_cell_handle n = s->neighbor(i);
-            if( ! t_.is_infinite(n) )
-                return false;
-            int inf_v_index = n->index(t_.infinite_vertex());
-            n->vertex(inf_v_index)->set_point(p_);
-            bool ok = (POSITIVE == ori_(t_.points_begin(n), t_.points_begin(n) + cur_dim_ + 1));
-            return ok;
-        }
-    };
-
-    // make sure all full_cells have positive orientation
-    void reorient_full_cells();
-
-}; // Triangulation<...>
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
-
-// CLASS MEMBER FUNCTIONS
-
-template < class TT, class TDS >
-void
-Triangulation<TT, TDS>
-::reorient_full_cells()
-{
-    if( current_dimension() < 1 )
-        return;
-    Full_cell_iterator sit = full_cells_begin();
-    Full_cell_iterator send = full_cells_end();
-    while( sit != send )
-    {
-        if( is_infinite(sit) && (1 == current_dimension()) )
-        {
-            ++sit;
-            continue;
-        }
-        sit->swap_vertices(current_dimension() - 1, current_dimension());
-        ++sit;
-    }
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-// - - - - - - - - - - - - - - - - - - - - - - - - THE REMOVAL METHODS
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::contract_face(const Point & p, const Face & f)
-{
-    CGAL_precondition( ! is_infinite(f) );
-    Vertex_handle v = tds().contract_face(f);
-    v->set_point(p);
-    CGAL_expensive_postcondition_msg(are_incident_full_cells_valid(v), "new point is not where it should be");
-    return v;
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-// - - - - - - - - - - - - - - - - - - - - - - - - THE INSERTION METHODS
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert(const Point & p, const Locate_type lt, const Face & f, const Facet & ft, const Full_cell_handle s)
-{
-    switch( lt )
-    {
-        case IN_FULL_CELL:
-            return insert_in_full_cell(p, s);
-            break;
-        case OUTSIDE_CONVEX_HULL:
-            return insert_outside_convex_hull(p, s);
-            break;
-        case OUTSIDE_AFFINE_HULL:
-            return insert_outside_affine_hull(p);
-            break;
-        case IN_FACET:
-        {
-            return insert_in_facet(p, ft);
-            break;
-        }
-        case IN_FACE:
-            return insert_in_face(p, f);
-            break;
-        case ON_VERTEX:
-            s->vertex(f.index(0))->set_point(p);
-            return s->vertex(f.index(0));
-            break;
-    }
-    CGAL_assertion(false);
-    return Vertex_handle();
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert(const Point & p, Full_cell_handle start)
-{
-    Locate_type lt;
-    Face f(maximal_dimension());
-    Facet ft;
-    Full_cell_handle s = locate(p, lt, f, ft, start);
-    return insert(p, lt, f, ft, s);
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert(const Point & p, Vertex_handle v)
-{
-    if( Vertex_handle() == v )
-        v = infinite_vertex();
-    return insert(p, v->full_cell());
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_in_face(const Point & p, const Face & f)
-{
-    CGAL_precondition( ! is_infinite(f) );
-    Vertex_handle v = tds().insert_in_face(f);
-    v->set_point(p);
-    return v;
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_in_facet(const Point & p, const Facet & ft)
-{
-    CGAL_precondition( ! is_infinite(ft) );
-    Vertex_handle v = tds().insert_in_facet(ft);
-    v->set_point(p);
-    return v;
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_in_full_cell(const Point & p, Full_cell_handle s)
-{
-    CGAL_precondition( ! is_infinite(s) );
-    Vertex_handle v = tds().insert_in_full_cell(s);
-    v->set_point(p);
-    return v;
-}
-
-// NOT DOCUMENTED...
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_outside_convex_hull_1(const Point & p, Full_cell_handle s)
-{
-    // This is a special case for dimension 1, because in that case, the right
-    // infinite full_cell is not correctly oriented... (sice its first vertex is the
-    // infinite one...
-    CGAL_precondition( is_infinite(s) );
-    CGAL_precondition( 1 == current_dimension() );
-    int inf_v_index = s->index(infinite_vertex());
-    bool swap = (0 == s->neighbor(inf_v_index)->index(s));
-    Vertex_handle v = tds().insert_in_full_cell(s);
-    v->set_point(p);
-    if( swap )
-    {
-        s->swap_vertices(0, 1);
-    }
-    return v;
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_outside_convex_hull(const Point & p, Full_cell_handle s)
-{
-    if( 1 == current_dimension() )
-    {
-        return insert_outside_convex_hull_1(p, s);
-    }
-    CGAL_precondition( is_infinite(s) );
-    CGAL_assertion( current_dimension() >= 2 );
-    std::vector<Full_cell_handle> simps;
-    simps.reserve(64);
-    std::back_insert_iterator<std::vector<Full_cell_handle> > out(simps);
-    if( current_dimension() < maximal_dimension() )
-    {
-        Outside_convex_hull_traversal_predicate<Coaffine_orientation_d>
-            ochtp(*this, p, coaffine_orientation_predicate());
-        tds().gather_full_cells(s, ochtp, out);
-    }
-    else
-    {
-        Orientation_d ori = geom_traits().orientation_d_object();
-        Outside_convex_hull_traversal_predicate<Orientation_d>
-            ochtp(*this, p, ori);
-        tds().gather_full_cells(s, ochtp, out);
-    }
-    int inf_v_index = s->index(infinite_vertex());
-    Vertex_handle v = insert_in_hole(
-      p, simps.begin(), simps.end(), Facet(s, inf_v_index));
-    return v;
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Vertex_handle
-Triangulation<TT, TDS>
-::insert_outside_affine_hull(const Point & p)
-{
-    CGAL_precondition( current_dimension() < maximal_dimension() );
-    Vertex_handle v = tds().insert_increase_dimension(infinite_vertex());
-    // reset the orientation predicate:
-    reset_flat_orientation();
-    v->set_point(p);
-    if( current_dimension() >= 1 )
-    {
-        Full_cell_handle inf_v_cell = infinite_vertex()->full_cell();
-        int inf_v_index = inf_v_cell->index(infinite_vertex());
-        Full_cell_handle s = inf_v_cell->neighbor(inf_v_index);
-        Orientation o = orientation(s);
-        CGAL_assertion( COPLANAR != o );
-            if( NEGATIVE == o )
-                reorient_full_cells();
-    }
-    return v;
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-// - - - - - - - - - - - - - - - - - - - - THE MAIN LOCATE(...) FUNCTION
-
-template < class TT, class TDS >
-template< typename OrientationPredicate >
-typename Triangulation<TT, TDS>::Full_cell_handle
-Triangulation<TT, TDS>
-::do_locate(   const Point & p, // query point
-            Locate_type & loc_type,// type of result (full_cell, face, vertex)
-            Face & face,// the face containing the query in its interior (when appropriate)
-            Facet & facet,// the facet containing the query in its interior (when appropriate)
-            const Full_cell_handle start// starting full_cell for the walk
-            , OrientationPredicate const& orientation_pred
-        ) const
-{
-    const int cur_dim = current_dimension();
-
-    if( cur_dim == -1 )
-    {
-        loc_type = OUTSIDE_AFFINE_HULL;
-        return Full_cell_handle();
-    }
-    else if( cur_dim == 0 )
-    {
-        Vertex_handle vit = infinite_full_cell()->neighbor(0)->vertex(0);
-        if( EQUAL != geom_traits().compare_lexicographically_d_object()(p, vit->point()) )
-        {
-            loc_type = OUTSIDE_AFFINE_HULL;
-            return Full_cell_handle();
-        }
-        else
-        {
-            loc_type = ON_VERTEX;
-            face.set_full_cell(vit->full_cell());
-            face.set_index(0, 0);
-            return vit->full_cell();
-        }
-    }
-
-    Full_cell_handle s;
-
-    // if we don't know where to start, we start from any bounded full_cell
-    if( Full_cell_handle() == start )
-    {
-        // THE HACK THAT NOBODY SHOULD DO... BUT DIFFICULT TO WORK AROUND
-        // THIS... TODO: WORK AROUND IT
-        Full_cell_handle inf_c = const_cast<Self*>(this)->infinite_full_cell();
-        int inf_v_index = inf_c->index(infinite_vertex());
-        s = inf_c->neighbor(inf_v_index);
-    }
-    else
-    {
-        s = start;
-        if( is_infinite(s) )
-        {
-            int inf_v_index = s->index(infinite_vertex());
-            s = s->neighbor(inf_v_index);
-        }
-    }
-
-    // Check if query |p| is outside the affine hull
-    if( cur_dim < maximal_dimension() )
-    {
-        if( ! geom_traits().contained_in_affine_hull_d_object()(
-            points_begin(s),
-            points_begin(s) + current_dimension() + 1,
-            p) )
-        {
-            loc_type = OUTSIDE_AFFINE_HULL;
-            return Full_cell_handle();
-        }
-    }
-
-    // we remember the |previous|ly visited full_cell to avoid the evaluation
-    // of one |orientation| predicate
-    Full_cell_handle previous = Full_cell_handle();
-    bool full_cell_not_found = true;
-    while(full_cell_not_found) // we walk until we locate the query point |p|
-    {
-    #ifdef CGAL_TRIANGULATION_STATISTICS
-        ++walk_size_;
-    #endif
-        // For the remembering stochastic walk, we need to start trying
-        // with a random index:
-        int j, i = rng_.get_int(0, cur_dim);
-        // we check |p| against all the full_cell's hyperplanes in turn
-       
-        for(j = 0; j <= cur_dim; ++j, i = (i + 1) % (cur_dim + 1) )
-        {
-            Full_cell_handle next = s->neighbor(i);
-            if( previous == next )
-            {   // no need to compute the orientation, we already know it
-                orientations_[i] = POSITIVE;
-                continue; // go to next full_cell's facet
-            }
-
-            Substitute_point_in_vertex_iterator<
-              typename Full_cell::Vertex_handle_const_iterator> 
-              spivi(s->vertex(i), &p);
-
-            orientations_[i] = orientation_pred(
-              boost::make_transform_iterator(s->vertices_begin(), spivi),
-              boost::make_transform_iterator(s->vertices_begin() + cur_dim + 1, 
-                                             spivi));
-
-            if( orientations_[i] != NEGATIVE )
-            {
-                // from this facet's point of view, we are inside the
-                // full_cell or on its boundary, so we continue to next facet
-                continue;
-            }
-
-            // At this point, we know that we have to jump to the |next|
-            // full_cell because orientation_[i] == NEGATIVE
-            previous = s;
-            s = next;
-            if( is_infinite(next) )
-            {   // we have arrived OUTSIDE the convex hull of the triangulation,
-                // so we stop the search
-                full_cell_not_found = false;
-                loc_type = OUTSIDE_CONVEX_HULL;
-                face.set_full_cell(s);
-            }
-            break;
-        } // end of the 'for' loop
-        if( ( cur_dim + 1 ) == j ) // we found the full_cell containing |p|
-            full_cell_not_found = false;
-    }
-    // Here, we know in which full_cell |p| is in.
-    // We now check more precisely where |p| landed:
-    // vertex, facet, face or full_cell.
-    if( ! is_infinite(s) )
-    {
-        face.set_full_cell(s);
-        int num(0);
-        int verts(0);
-        for(int i = 0; i < cur_dim; ++i)
-        {
-            if( orientations_[i] == COPLANAR )
-            {
-                ++num;
-                facet = Facet(s, i);
-            }
-            else
-                face.set_index(verts++, i);
-        }
-        //-- We could put the if{}else{} below in the loop above, but then we would
-        // need to test if (verts < cur_dim) many times... we do it only once
-        // here:
-        if( orientations_[cur_dim] == COPLANAR )
-        {
-            ++num;
-            facet = Facet(s, cur_dim);
-        }
-        else if( verts < cur_dim )
-            face.set_index(verts, cur_dim);
-        //-- end of remark above //
-        if( 0 == num )
-        {
-            loc_type = IN_FULL_CELL;
-            face.clear();
-        }
-        else if( cur_dim == num )
-            loc_type = ON_VERTEX;
-        else if( 1 == num )
-            loc_type = IN_FACET;
-        else
-            loc_type = IN_FACE;
-    }
-    return s;
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Full_cell_handle
-Triangulation<TT, TDS>
-::locate(   const Point & p, // query point
-            Locate_type & loc_type,// type of result (full_cell, face, vertex)
-            Face & face,// the face containing the query in its interior (when appropriate)
-            Facet & facet,// the facet containing the query in its interior (when appropriate)
-            Full_cell_handle start// starting full_cell for the walk
-        ) const
-{
-    if( current_dimension() == maximal_dimension() )
-    {
-        Orientation_d ori = geom_traits().orientation_d_object();
-        return do_locate(p, loc_type, face, facet, start, ori);
-    }
-    else
-        return do_locate(p, loc_type, face, facet, start, coaffine_orientation_predicate());
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-// - - - - - - - - - - - - - - - - - - - - the locate(...) variants
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Full_cell_handle
-Triangulation<TT, TDS>
-::locate(   const Point & p,
-            Locate_type & loc_type,
-            Face & face,
-            Facet & facet,
-            Vertex_handle start) const
-{
-    if( Vertex_handle() == start )
-        start = infinite_vertex();
-    return locate(p, loc_type, face, facet, start->full_cell());
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Full_cell_handle
-Triangulation<TT, TDS>
-::locate(const Point & p, Full_cell_handle s) const
-{
-    Locate_type lt;
-    Face face(maximal_dimension());
-    Facet facet;
-    return locate(p, lt, face, facet, s);
-}
-
-template < class TT, class TDS >
-typename Triangulation<TT, TDS>::Full_cell_handle
-Triangulation<TT, TDS>
-::locate(const Point & p, Vertex_handle v) const
-{
-    if( Vertex_handle() != v )
-        v = infinite_vertex();
-    return this->locate(p, v->full_cell());
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
-
-template < class TT, class TDS >
-bool
-Triangulation<TT, TDS>
-::is_valid(bool verbose, int level) const
-{ 
-    if( ! tds().is_valid(verbose, level) )
-        return false;
-
-    Full_cell_const_iterator c;
-    if( current_dimension() < 0 )
-        return true;
-    Orientation o;
-    for( c = full_cells_begin(); c != full_cells_end(); ++c )
-    {
-        if( is_infinite(c) )
-        {
-            if( current_dimension() > 1 )
-            {
-                int i = c->index( infinite_vertex() );
-                Full_cell_handle n = c->neighbor(i);
-                infinite_vertex()->set_point(n->vertex(c->mirror_index(i))->point());
-                o = - orientation(c, true);
-            }
-            else
-                o = POSITIVE;
-        }
-        else
-            o = orientation(c, true);
-        if( NEGATIVE == o )
-        {
-            if( verbose ) CGAL_warning_msg(false, "full_cell is not correctly oriented");
-            return false;
-        }
-        if( COPLANAR == o )
-        {
-            if( verbose ) CGAL_warning_msg(false, "full_cell is flat");
-            return false;
-        }
-    }
-    return true;
-}
-
-template < class TT, class TDS >
-bool Triangulation<TT, TDS>::are_incident_full_cells_valid(Vertex_const_handle v, bool verbose, int) const
-{
-    if( current_dimension() <= 0 )
-        return true;
-    typedef std::vector<Full_cell_const_handle> Simps;
-    Simps simps;
-    simps.reserve(64);
-    std::back_insert_iterator<Simps> out(simps);
-    incident_full_cells(v, out);
-    typename Simps::const_iterator sit = simps.begin();
-    for( ; sit != simps.end(); ++sit )
-    {
-        if( is_infinite(*sit) )
-            continue;
-        Orientation o = orientation(*sit);
-        if( NEGATIVE == o )
-        {
-            if( verbose ) CGAL_warning_msg(false, "full_cell is not correctly oriented");
-            return false;
-        }
-        if( COPLANAR == o )
-        {
-            if( verbose ) CGAL_warning_msg(false, "full_cell is flat");
-            return false;
-        }
-    }
-    return true;
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-// FUNCTIONS THAT ARE NOT MEMBER FUNCTIONS:
-
-template < class TT, class TDS >
-std::istream & 
-operator>>(std::istream & is, Triangulation<TT, TDS> & tr)
-  // reads :
-  // - the dimensions (maximal and current)
-  // - the number of finite vertices
-  // - the non combinatorial information on vertices (point, etc)
-  // - the number of full_cells
-  // - the full_cells by the indices of their vertices in the preceding list
-  // of vertices, plus the non combinatorial information on each full_cell
-  // - the neighbors of each full_cell by their index in the preceding list
-{
-    typedef Triangulation<TT, TDS>            T;
-    typedef typename T::Vertex_handle         Vertex_handle;
-
-    // read current dimension and number of vertices
-    size_t n;
-    int cd;
-    if( is_ascii(is) )
-        is >> cd >> n;
-    else
-    {
-        read(is, cd);
-        read(is, n, io_Read_write());
-    }
-
-    CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation has too high dimension");
-
-    tr.clear();
-    tr.set_current_dimension(cd);
-
-    if( n == 0 )
-        return is;
-
-    std::vector<Vertex_handle> vertices;
-    vertices.resize(n+1);
-    vertices[0] = tr.infinite_vertex();
-    is >> (*vertices[0]);
-
-    // read the vertices:
-    size_t i(1);
-    while( i <= n )
-    {
-        vertices[i] = tr.new_vertex();
-        is >> (*vertices[i]); // read a vertex
-        ++i;
-    }
-
-    // now, read the combinatorial information
-   return tr.tds().read_full_cells(is, vertices);
-}
-
-template < class TT, class TDS >
-std::ostream & 
-operator<<(std::ostream & os, const Triangulation<TT, TDS> & tr)
-  // writes :
-  // - the dimensions (maximal and current)
-  // - the number of finite vertices
-  // - the non combinatorial information on vertices (point, etc)
-  // - the number of full_cells
-  // - the full_cells by the indices of their vertices in the preceding list
-  // of vertices, plus the non combinatorial information on each full_cell
-  // - the neighbors of each full_cell by their index in the preceding list
-{
-    typedef Triangulation<TT, TDS> T;
-    typedef typename T::Vertex_const_handle         Vertex_handle;
-    typedef typename T::Vertex_const_iterator       Vertex_iterator;
-
-    // outputs dimensions and number of vertices
-    size_t n = tr.number_of_vertices();
-    if( is_ascii(os) )
-        os << tr.current_dimension() << std::endl << n << std::endl;
-    else
-    {
-        write(os, tr.current_dimension());
-        write(os, n, io_Read_write());
-    }
-
-    if( n == 0 )
-        return os;
-
-    size_t i(0);
-    // write the vertices
-    std::map<Vertex_handle, int> index_of_vertex;
-
-    // infinite vertex has index 0 (among all the vertices)
-    index_of_vertex[tr.infinite_vertex()] = i++;
-    os << *tr.infinite_vertex();
-    for( Vertex_iterator it = tr.vertices_begin(); it != tr.vertices_end(); ++it )
-    {
-        if( tr.is_infinite(it) )
-            continue;
-        os << *it; // write the vertex
-        index_of_vertex[it] = i++;
-    }
-    CGAL_assertion( i == n+1 );
-
-    // output the combinatorial information
-    return tr.tds().write_full_cells(os, index_of_vertex);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2.h
deleted file mode 100644
index 5f32861..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2.h
+++ /dev/null
@@ -1,3655 +0,0 @@
-// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Olivier Devillers, Mariette Yvinec
-
-#ifndef CGAL_TRIANGULATION_2_H
-#define CGAL_TRIANGULATION_2_H
-
-#include <list>
-#include <vector>
-#include <map>
-#include <algorithm>
-#include <utility>
-#include <iostream>
-
-#include <CGAL/iterator.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/function_objects.h>
-
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Triangulation_utils_2.h>
-
-#include <CGAL/Triangulation_data_structure_2.h>
-#include <CGAL/Triangulation_vertex_base_2.h>
-#include <CGAL/Triangulation_face_base_2.h>
-#include <CGAL/Triangulation_line_face_circulator_2.h>
-#include <CGAL/spatial_sort.h>
-
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_smallint.hpp>
-#include <boost/random/variate_generator.hpp>
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-#include <CGAL/internal/Static_filters/tools.h>
-#include <CGAL/Triangulation_structural_filtering_traits.h>
-#include <CGAL/determinant.h>
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-namespace CGAL {
-template < class Gt, class Tds > class Triangulation_2;
-template < class Gt, class Tds > std::istream& operator>>
-    (std::istream& is, Triangulation_2<Gt,Tds> &tr);
-template < class Gt, class Tds >  std::ostream& operator<<
-  (std::ostream& os, const Triangulation_2<Gt,Tds> &tr);
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-namespace internal {
-// structural filtering is performed only for EPIC
-struct Structural_filtering_2_tag {};
-struct No_structural_filtering_2_tag {};
-
-template <bool filter>
-struct Structural_filtering_selector_2 {
-  typedef No_structural_filtering_2_tag  Tag;
-};
-
-template <>
-struct Structural_filtering_selector_2<true> {
-  typedef Structural_filtering_2_tag  Tag;
-};
-}
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-template < class Gt, 
-           class Tds = Triangulation_data_structure_2 <
-                             Triangulation_vertex_base_2<Gt>,
-                             Triangulation_face_base_2<Gt> > >
-class Triangulation_2
-  : public Triangulation_cw_ccw_2
-{
-  friend std::istream& operator>> <>
-                (std::istream& is, Triangulation_2 &tr);
-  typedef Triangulation_2<Gt,Tds>             Self;
-
-public:
-  typedef Tds                                 Triangulation_data_structure;
-  typedef Gt                                  Geom_traits;
-  typedef typename Geom_traits::Point_2       Point;
-  typedef typename Geom_traits::Segment_2     Segment;
-  typedef typename Geom_traits::Triangle_2    Triangle;
-  typedef typename Geom_traits::Orientation_2 Orientation_2;
-  typedef typename Geom_traits::Compare_x_2   Compare_x;
-  typedef typename Geom_traits::Compare_y_2   Compare_y;
-
-  typedef typename Tds::size_type              size_type;
-  typedef typename Tds::difference_type        difference_type;
- 
-  typedef typename Tds::Vertex                 Vertex;
-  typedef typename Tds::Face                   Face;
-  typedef typename Tds::Edge                   Edge;
-  typedef typename Tds::Vertex_handle          Vertex_handle;
-  typedef typename Tds::Face_handle            Face_handle;
-
-  typedef typename Tds::Face_circulator        Face_circulator;
-  typedef typename Tds::Vertex_circulator      Vertex_circulator;
-  typedef typename Tds::Edge_circulator        Edge_circulator;
-
-  typedef typename Tds::Face_iterator          All_faces_iterator;
-  typedef typename Tds::Edge_iterator          All_edges_iterator;
-  typedef typename Tds::Halfedge_iterator      All_halfedges_iterator;
-  typedef typename Tds::Vertex_iterator        All_vertices_iterator;
- 
-
-  class Perturbation_order {
-      const Self *t;
-
-  public:
-      Perturbation_order(const Self *tr)
-	  : t(tr) {}
-
-      bool operator()(const Point *p, const Point *q) const {
-	  return t->compare_xy(*p, *q) == SMALLER;
-      }
-  };
-
-  friend class Perturbation_order;
-
- // This class is used to generate the Finite_*_iterators.
- class Infinite_tester
-  {
-    const Triangulation_2 *t;
-  public:
-    Infinite_tester() {}
-    Infinite_tester(const Triangulation_2 *tr)	  : t(tr) {}
-
-    bool operator()(const All_vertices_iterator & vit) const  {
-	  return t->is_infinite(vit);
-    }
-    bool operator()(const All_faces_iterator & fit ) const {
-      return t->is_infinite(fit);
-    }
-    bool operator()(const All_edges_iterator & eit) const {
-      return t->is_infinite(eit);
-    }
- };
-
-  //We derive in order to add a conversion to handle.
-  class Finite_vertices_iterator :
-    public Filter_iterator<All_vertices_iterator, Infinite_tester> 
-  {
-    typedef Filter_iterator<All_vertices_iterator, Infinite_tester> Base; 
-    typedef Finite_vertices_iterator                          Self;
-  public:
-    Finite_vertices_iterator() : Base() {}
-    Finite_vertices_iterator(const Base &b) : Base(b) {}
-    Self & operator++() { Base::operator++(); return *this; }
-    Self & operator--() { Base::operator--(); return *this; }
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-    operator Vertex_handle() const { return Base::base(); }
-  };
-
-  class Finite_faces_iterator
-    : public Filter_iterator<All_faces_iterator, Infinite_tester> 
-  {
-    typedef Filter_iterator<All_faces_iterator, Infinite_tester> Base;
-    typedef Finite_faces_iterator                           Self;
-  public:
-    Finite_faces_iterator() : Base() {}
-    Finite_faces_iterator(const Base &b) : Base(b) {}
-    Self & operator++() { Base::operator++(); return *this; }
-    Self & operator--() { Base::operator--(); return *this; }
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-    operator Face_handle() const { return Base::base(); }
-  };
-  
-  typedef Filter_iterator<All_edges_iterator, 
-                           Infinite_tester>
-                                               Finite_edges_iterator;
-  
-  //for backward compatibility
-  typedef Finite_faces_iterator                Face_iterator;
-  typedef Finite_edges_iterator                Edge_iterator;
-  typedef Finite_vertices_iterator             Vertex_iterator;
-
-  typedef Triangulation_line_face_circulator_2<Self>  Line_face_circulator;
-
-  // Auxiliary iterators for convenience
-  // do not use default template argument to please VC++
-  typedef Project_point<Vertex>                           Proj_point;
-  typedef Iterator_project<Finite_vertices_iterator, 
-                           Proj_point,
-	                   const Point&, 
-                           const Point*,
-                           std::ptrdiff_t,
-                           std::bidirectional_iterator_tag>  Point_iterator;
-
-  typedef Point                value_type; // to have a back_inserter
-  typedef const value_type&    const_reference; 
-  typedef value_type&          reference;
-  
-  
-  enum Locate_type {VERTEX=0, 
-		    EDGE, //1
-		    FACE, //2
-		    OUTSIDE_CONVEX_HULL, //3
-		    OUTSIDE_AFFINE_HULL}; //4
-
-  //Tag to distinguish Regular triangulations from others;
-  typedef Tag_false  Weighted_tag;
-  
-
-protected:
-  Gt  _gt;
-  Tds _tds;
-  Vertex_handle _infinite_vertex;
-
-public:
-  // CONSTRUCTORS
-  Triangulation_2(const Geom_traits& geom_traits=Geom_traits()); 
-  Triangulation_2(const Triangulation_2<Gt,Tds> &tr);
- 
-  //Assignement
-  Triangulation_2 &operator=(const Triangulation_2 &tr);
-
-  //Helping
-  void copy_triangulation(const Triangulation_2 &tr);
-  void swap(Triangulation_2 &tr);
-  void clear();
-
-
-  //ACCESS FUNCTION
-  const Geom_traits& geom_traits() const { return _gt;}
-  const Tds & tds() const  { return _tds;}
-  Tds & tds()   { return _tds;}
-  int dimension() const { return _tds.dimension();}
-  size_type number_of_vertices() const {return _tds.number_of_vertices() - 1;}
-  
-  size_type number_of_faces() const;
-  Vertex_handle infinite_vertex() const;
-  Vertex_handle finite_vertex() const;
-  Face_handle infinite_face() const;
-  Infinite_tester infinite_tester() const;
-  
-  //SETTING
-  void set_infinite_vertex(const Vertex_handle& v) {_infinite_vertex=v;}
-  
-  // CHECKING
-  bool is_valid(bool verbose = false, int level = 0) const;
- 
-  // TEST INFINITE FEATURES AND OTHER FEATURES
-  bool is_infinite(Face_handle f) const;
-  bool is_infinite(Vertex_handle v) const; 
-  bool is_infinite(Face_handle f, int i) const;
-  bool is_infinite(const Edge& e) const;
-  bool is_infinite(const Edge_circulator& ec) const;
-  bool is_infinite(const All_edges_iterator& ei) const;
-  bool is_edge(Vertex_handle va, Vertex_handle vb) const;
-  bool is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr,
-	       int & i) const;
-  bool includes_edge(Vertex_handle va, Vertex_handle vb,
-		     Vertex_handle& vbb,
-		     Face_handle& fr, int & i) const;
-  bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const;
-  bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
-       Face_handle &fr) const;
-
- // GEOMETRIC FEATURES AND CONSTRUCTION
-  Triangle triangle(Face_handle f) const;
-  Segment segment(Face_handle f, int i) const;
-  Segment segment(const Edge& e) const;
-  Segment segment(const Edge_circulator& ec) const;
-  Segment segment(const All_edges_iterator& ei) const;
-  Segment segment(const Finite_edges_iterator& ei) const;
-  Point circumcenter(Face_handle  f) const; 
-  Point circumcenter(const Point& p0, 
-		     const Point& p1, 
-		     const Point& p2) const;
-  
-
-  //MOVE - INSERTION - DELETION - Flip
-public:
-  void   flip(Face_handle f, int i);
-  
-  Vertex_handle insert_first(const Point& p);
-  Vertex_handle insert_second(const Point& p);
-  Vertex_handle insert_in_edge(const Point& p, Face_handle f,int i);
-  Vertex_handle insert_in_face(const Point& p, Face_handle f);
-  Vertex_handle insert_outside_convex_hull(const Point& p, Face_handle f);
-  Vertex_handle insert_outside_affine_hull(const Point& p);
-  Vertex_handle insert(const Point &p, Face_handle start = Face_handle() );
-  Vertex_handle insert(const Point& p,
-		       Locate_type lt,
-		       Face_handle loc, int li );
-//   template < class InputIterator >
-//   std::ptrdiff_t insert(InputIterator first, InputIterator last);
-  Vertex_handle push_back(const Point& a);
- 
-  void remove_degree_3(Vertex_handle  v, Face_handle f = Face_handle());
-  void remove_first(Vertex_handle  v);
-  void remove_second(Vertex_handle v);
-  void remove(Vertex_handle  v);
-
-  // MOVE
-  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
-  Vertex_handle move(Vertex_handle v, const Point &p);
-
-protected: // some internal methods
-	
-  // INSERT, REMOVE, MOVE GIVING NEW FACES
-  template <class OutputItFaces>
-  Vertex_handle insert_and_give_new_faces(const Point  &p, 
-                                          OutputItFaces fit,
-                                          Face_handle start = Face_handle() );
-  template <class OutputItFaces>
-  Vertex_handle insert_and_give_new_faces(const Point& p,
-                                          Locate_type lt,
-                                          Face_handle loc, int li, 
-                                          OutputItFaces fit);
-
-  template <class OutputItFaces>
-  void remove_and_give_new_faces(Vertex_handle v, 
-                                 OutputItFaces fit);
-
-  template <class OutputItFaces>
-  Vertex_handle move_if_no_collision_and_give_new_faces(Vertex_handle v, 
-                                                        const Point &p, 
-                                                        OutputItFaces fit);
-
-public:
-
-  // POINT LOCATION
-  Face_handle
-  march_locate_1D(const Point& t, Locate_type& lt, int& li) const ;
-  Face_handle
-  march_locate_2D(Face_handle start,
-		  const Point& t,
-		  Locate_type& lt,
-		  int& li) const;
-
-  Face_handle
-  march_locate_2D_LFC(Face_handle start,
-		  const Point& t,
-		  Locate_type& lt,
-		  int& li) const;
-
-  void
-  compare_walks(const Point& p,
-		Face_handle c1, Face_handle c2,
-		Locate_type& lt1, Locate_type& lt2,
-		int li1, int li2) const;
-
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-  Face_handle
-  locate(const Point& p,
-	 Locate_type& lt,
-	 int& li,
-	 Face_handle start = Face_handle()) const;
-
-  Face_handle
-  locate(const Point &p,
-	 Face_handle start = Face_handle()) const;	
-#else  // no CGAL_NO_STRUCTURAL_FILTERING
-#  ifndef CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-#    define CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
-#  endif // no CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-
-protected:
-  Face_handle
-  exact_locate(const Point& p,
-               Locate_type& lt,
-               int& li,
-               Face_handle start) const;
-	
-  Face_handle
-  generic_locate(const Point& p,
-                 Locate_type& lt,
-                 int& li,
-                 Face_handle start,
-                 internal::Structural_filtering_2_tag) const {
-    return exact_locate(p, lt, li, inexact_locate(p, start));
-  }	
-	
-  Face_handle
-  generic_locate(const Point& p,
-                 Locate_type& lt,
-                 int& li,
-                 Face_handle start,
-                 internal::No_structural_filtering_2_tag) const {
-    return exact_locate(p, lt, li, start);
-  }	
-	
-
-  bool has_inexact_negative_orientation(const Point &p, const Point &q,
-                      const Point &r) const;
-
-public:
-  Face_handle
-  inexact_locate(const Point& p,
-                 Face_handle start = Face_handle(), 
-                 int max_num_cells = 
-                 CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const;
-
-  Face_handle
-  locate(const Point & p,
-         Locate_type & lt, int & li, 
-         Face_handle start = Face_handle()) const
-  {
-    typedef Triangulation_structural_filtering_traits<Geom_traits> TSFT;
-    typedef typename internal::Structural_filtering_selector_2< 
-      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
-
-    return generic_locate(p, lt, li, start, Should_filter_tag());
-  }
-	
-  Face_handle
-  locate(const Point & p, Face_handle start = Face_handle()) const
-  {
-    Locate_type lt;
-    int li;
-    return locate(p, lt, li, start);
-  }
-	
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-	
-  //TRAVERSING : ITERATORS AND CIRCULATORS
-  Finite_faces_iterator finite_faces_begin() const;
-  Finite_faces_iterator finite_faces_end() const;
-  Finite_vertices_iterator finite_vertices_begin() const;
-  Finite_vertices_iterator finite_vertices_end() const;
-  Finite_edges_iterator finite_edges_begin() const;
-  Finite_edges_iterator finite_edges_end() const; 
-  Point_iterator points_begin() const;
-  Point_iterator points_end() const;
-
-  All_faces_iterator all_faces_begin() const;
-  All_faces_iterator all_faces_end() const;
-  All_vertices_iterator all_vertices_begin() const;
-  All_vertices_iterator all_vertices_end() const;
-  All_edges_iterator all_edges_begin() const;
-  All_edges_iterator all_edges_end() const; 
-  All_halfedges_iterator all_halfedges_begin() const;
-  All_halfedges_iterator all_halfedges_end() const; 
-
-  //for compatibility with previous versions
-  Face_iterator faces_begin() const {return finite_faces_begin();}
-  Face_iterator faces_end() const {return finite_faces_end();}
-  Edge_iterator edges_begin() const {return finite_edges_begin();}
-  Edge_iterator edges_end() const {return finite_edges_end();}
-  Vertex_iterator vertices_begin() const {return finite_vertices_begin();}
-  Vertex_iterator vertices_end() const {return finite_vertices_end();}
-
-  Face_circulator incident_faces( Vertex_handle v, 
-				  Face_handle f = Face_handle()) const;
-  Vertex_circulator incident_vertices(Vertex_handle v,
-				      Face_handle f = Face_handle()) const;
-  Edge_circulator incident_edges(Vertex_handle v,
-				 Face_handle f = Face_handle()) const;
- 
-  size_type degree(Vertex_handle v) const;
-
-  Vertex_handle mirror_vertex(Face_handle f, int i) const;
-  int mirror_index(Face_handle v, int i) const;
-  Edge mirror_edge(Edge e) const;
-
-  Line_face_circulator    line_walk(const Point& p,
-				    const Point& q,
-				    Face_handle f = Face_handle()) const;
-
- // TO DEBUG
-  void show_all() const;
-  void show_vertex(Vertex_handle vh) const;
-  void show_face( Face_handle fh) const;
-
-  // IO
-// template < class Stream >
-// Stream&  draw_triangulation(Stream& os) const;
-
- //PREDICATES
- Oriented_side
- oriented_side(const Point &p0, const Point &p1,
-	       const Point &p2, const Point &p) const;
-    
- Bounded_side
- bounded_side(const Point &p0, const Point &p1,
-	      const Point &p2, const Point &p) const;
-    
- Oriented_side
- oriented_side(Face_handle f, const Point &p) const;
-
-
-Oriented_side
-side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2,
-	                const Point &p, bool perturb) const;
-
- Oriented_side
- side_of_oriented_circle(Face_handle f, const Point & p, bool perturb = false) const; 
-
- bool 
- collinear_between(const Point& p, const Point& q, const Point& r)
-   const;
-
-  Comparison_result compare_x(const Point& p, const Point& q) const;
-
-  Comparison_result compare_xy(const Point& p, const Point& q) const;
-  Comparison_result compare_y(const Point& p, const Point& q) const;
-  bool               xy_equal(const Point& p, const Point& q) const;
-  Orientation orientation(const Point& p, 
-			  const Point& q, 
-			  const Point& r) const;
-
-
-protected:
-  void remove_1D(Vertex_handle v);
-  void remove_2D(Vertex_handle v);
-  bool test_dim_down(Vertex_handle v) const;
-  void fill_hole(Vertex_handle v, std::list<Edge> & hole);
-  void fill_hole_delaunay(std::list<Edge> & hole);
-
-  // output faces
-  template <class OutputItFaces>	
-  void fill_hole(Vertex_handle v, std::list<Edge> & hole, OutputItFaces fit);
-
-  template <class OutputItFaces>	
-  void fill_hole_delaunay(std::list<Edge> & hole, OutputItFaces fit);
-
-  void make_hole(Vertex_handle v, std::list<Edge> & hole,
-                 std::set<Face_handle> &faces_set);
-
-public:
-  void make_hole(Vertex_handle v, std::list<Edge> & hole);
-//   template<class EdgeIt>
-//   Vertex_handle star_hole( Point p, 
-// 			      EdgeIt edge_begin,
-// 			      EdgeIt edge_end);
-
-//   template<class EdgeIt, class FaceIt>
-//   Vertex_handle star_hole( Point p, 
-// 			      EdgeIt edge_begin,
-// 			      EdgeIt edge_end,
-// 			      FaceIt face_begin,
-// 			      FaceIt face_end);
-
-  Face_handle create_face(Face_handle f1d, int i1,
-			  Face_handle f2, int i2,
-			  Face_handle f3, int i3);
-  Face_handle create_face(Face_handle f1, int i1,
-			  Face_handle f2, int i2);
-  Face_handle create_face(Face_handle f, int i, Vertex_handle v);
-  Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3);
-  Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3,
-			  Face_handle f1, Face_handle f2, Face_handle f3);
-  Face_handle create_face();
-  Face_handle create_face(Face_handle); //calls copy constructor of Face
-  void delete_face(Face_handle f);
-  void delete_vertex(Vertex_handle v);
-
-  Vertex_handle collapse_edge(Edge e)
-  {
-    return _tds.collapse_edge(e);
-  }
-
-  Vertex_handle file_input(std::istream& is);
-  void file_output(std::ostream& os) const;
-
-private:
-  Vertex_handle insert_outside_convex_hull_1(const Point& p, Face_handle f);
-  Vertex_handle insert_outside_convex_hull_2(const Point& p, Face_handle f);
-  
-  // template members
-public:
-template < class Stream >
-Stream&  draw_triangulation(Stream& os) const 
-{
-  Finite_edges_iterator it = finite_edges_begin();
-  for( ;it != finite_edges_end() ; ++it) {
-    os << segment(it);
-  }
-  return os;
-}
-
-template < class InputIterator >
-std::ptrdiff_t insert(InputIterator first, InputIterator last)
-{
-  size_type n = number_of_vertices();
-
-  std::vector<Point> points (first, last);
-  spatial_sort (points.begin(), points.end(), geom_traits());
-  Face_handle f;
-  for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-          p != end; ++p)
-      f = insert (*p, f)->face();
-
-  return number_of_vertices() - n;
-}
-
-bool well_oriented(Vertex_handle v) const
-{
-  Face_circulator fc = incident_faces(v), done(fc);
-  do {
-    if(!is_infinite(fc)) {
-      Vertex_handle v0 = fc->vertex(0);
-      Vertex_handle v1 = fc->vertex(1);
-      Vertex_handle v2 = fc->vertex(2);
-      if(orientation(v0->point(),v1->point(),v2->point()) 
-        != COUNTERCLOCKWISE) return false;
-    }
-  } while(++fc != done);
-  return true;
-}
-
-bool from_convex_hull(Vertex_handle v) {
-  CGAL_triangulation_precondition(!is_infinite(v));
-  Vertex_circulator vc = incident_vertices(v), done(vc);
-  do { if(is_infinite(vc)) return true; } while(++vc != done);
-  return false;
-}
-
-public:
-  template<class EdgeIt>
-  Vertex_handle star_hole( const Point& p, 
-			   EdgeIt edge_begin,
-			   EdgeIt edge_end) {
-    std::list<Face_handle> empty_list;
-    return star_hole(p, 
-		     edge_begin, 
-		     edge_end, 
-		     empty_list.begin(),
-		     empty_list.end());
-  }
-
-  template<class EdgeIt, class FaceIt>
-  Vertex_handle star_hole( const Point& p, 
-			   EdgeIt edge_begin,
-			   EdgeIt edge_end,
-			   FaceIt face_begin,
-			   FaceIt face_end) {
-    Vertex_handle v = _tds.star_hole( edge_begin, edge_end,
-				      face_begin, face_end);
-    v->set_point(p);
-    return v;
-  }
-
-};
-
-// CONSTRUCTORS
-template <class Gt, class Tds >
-Triangulation_2<Gt, Tds>::
-Triangulation_2(const Geom_traits& geom_traits) 
-     : _gt(geom_traits), _tds()
-{
-  _infinite_vertex = _tds.insert_first();
-}
-  
-// copy constructor duplicates vertices and faces
-template <class Gt, class Tds >
-Triangulation_2<Gt, Tds>::
-Triangulation_2(const Triangulation_2 &tr)
-    : _gt(tr._gt)
-{
-  _infinite_vertex = _tds.copy_tds(tr._tds, tr.infinite_vertex());
-} 
- 
-
-  //Assignement
-template <class Gt, class Tds >
-Triangulation_2<Gt, Tds> &
-Triangulation_2<Gt, Tds>::
-operator=(const Triangulation_2 &tr)
-{
-  copy_triangulation(tr);
-  return *this;
-}
-
-  // Helping functions
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::   
-copy_triangulation(const Triangulation_2 &tr)
-{
-  _tds.clear();
-  _gt = tr._gt;
-  _infinite_vertex = _tds.copy_tds(tr._tds, tr._infinite_vertex);
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>:: 
-swap(Triangulation_2 &tr)
-{
-  Vertex_handle v= _infinite_vertex;
-  _infinite_vertex = tr._infinite_vertex;
-  tr._infinite_vertex = v;
-  
-  _tds.swap(tr._tds);
-
-  Geom_traits t = geom_traits();
-  _gt = tr.geom_traits();
-  tr._gt = t; 
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>:: 
-clear()
-{
-  _tds.clear(); //detruit tous les sommets et toutes les faces
-  _infinite_vertex = _tds.insert_first();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::size_type
-Triangulation_2<Gt, Tds>::
-number_of_faces() const
-{
-  size_type count = _tds.number_of_faces();
-  Face_circulator fc = incident_faces(infinite_vertex()),
-    done(fc);
-  if ( ! fc.is_empty() ) {
-    do { 
-      --count; ++fc;
-    }  while (fc != done);
-  }
-  return count;
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt,Tds>::Vertex_handle 
-Triangulation_2<Gt,Tds>::
-infinite_vertex() const
-{
-  return  _infinite_vertex;
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt,Tds>::Vertex_handle 
-Triangulation_2<Gt,Tds>::
-finite_vertex() const
-{
-  CGAL_triangulation_precondition (number_of_vertices() >= 1);
-  return (finite_vertices_begin());
-}
-   
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt,Tds>::Face_handle 
-Triangulation_2<Gt,Tds>::
-infinite_face() const
-{
-  return infinite_vertex()->face();
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt,Tds>::Infinite_tester
-Triangulation_2<Gt,Tds>::
-infinite_tester() const
-{
-  return Infinite_tester(this);
-}
-
-
-template <class Gt, class Tds >
-bool
-Triangulation_2<Gt, Tds>::
-is_valid(bool verbose, int level) const
-{
-  bool result = _tds.is_valid(verbose, level);
-  if (dimension() <= 0 ||
-      (dimension()==1 && number_of_vertices() == 2 ) ) return result;
-
-  if (dimension() == 1) {
-    Finite_vertices_iterator it1 = finite_vertices_begin(),
-                             it2(it1), it3(it1);
-    ++it2;
-    ++it3; ++it3;
-    while( it3 != finite_vertices_end()) {
-     Orientation s = orientation(it1->point(),
-				 it2->point(),
-				 it3->point()); 
-     result = result && s == COLLINEAR ;
-     CGAL_triangulation_assertion(result);
-     ++it1 ; ++it2; ++it3;
-    }
-  }    
-
-  else { //dimension() == 2
-    for(Finite_faces_iterator it=finite_faces_begin(); 
-	it!=finite_faces_end(); it++) {
-      CGAL_triangulation_assertion( ! is_infinite(it));
-      Orientation s = orientation(it->vertex(0)->point(),
-				  it->vertex(1)->point(),
-				  it->vertex(2)->point());
-      CGAL_triangulation_assertion( s == LEFT_TURN );
-      result = result && ( s == LEFT_TURN );
-    }
-
-    Vertex_circulator start = incident_vertices(infinite_vertex());
-    Vertex_circulator pc(start);
-    Vertex_circulator qc(start); ++qc;
-    Vertex_circulator rc(start); ++rc; ++rc;
-    do{
-      Orientation s = orientation(pc->point(),
-				  qc->point(),
-				  rc->point());
-      CGAL_triangulation_assertion( s != LEFT_TURN );
-      result = result && ( s != LEFT_TURN );
-      ++pc ; ++qc ; ++rc;
-    }while(pc != start);
-
-    // check number of faces. This cannot be done by the Tds
-    // which does not know the number of components nor the genus
-    result = result && (number_of_faces() == 2*(number_of_vertices()+1)
-			                    - 4 
-                                            - degree(infinite_vertex()));
-    CGAL_triangulation_assertion( result);
-  }
-  return result;
-}
-
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(Face_handle f) const 
-{
-  return f->has_vertex(infinite_vertex());
-}
-
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(Vertex_handle v) const 
-{
-  return v == infinite_vertex();
-}
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(Face_handle f, int i) const 
-{
-  return is_infinite(f->vertex(ccw(i))) ||
-         is_infinite(f->vertex(cw(i)));
-}
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(const Edge& e) const 
-{
-  return is_infinite(e.first,e.second);
-}
-   
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(const Edge_circulator& ec) const 
-{
-  return is_infinite(*ec);
-}
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_infinite(const All_edges_iterator& ei) const 
-{
-  return is_infinite(*ei);
-}
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_edge(Vertex_handle va, Vertex_handle vb) const
-{
-  return _tds.is_edge( va, vb);
-}
-
-template <class Gt, class Tds >
-inline bool
-Triangulation_2<Gt, Tds>::
-is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr, int & i) const
-{
-  return _tds.is_edge(va, vb, fr, i);
-}
-
-template <class Gt, class Tds >
-bool 
-Triangulation_2<Gt, Tds>::
-includes_edge(Vertex_handle va, Vertex_handle vb,
-	      Vertex_handle & vbb,
-	      Face_handle& fr, int & i) const
-  // returns true if the line segment ab contains an edge e of t 
-  // incident to a, false otherwise
-  // if true, vbb becomes the vertex of e distinct from a
-  // fr is the face incident to e and e=(fr,i)
-  // fr is on the right side of a->b
-{
-  Vertex_handle v;
-  Orientation orient;
-  int indv;
-  Edge_circulator ec = incident_edges(va), done(ec);
-  if (ec != 0) {
-    do { 
-      //find the index of the other vertex of *ec
-      indv = 3 - ((*ec).first)->index(va) - (*ec).second ; 
-      v = ((*ec).first)->vertex(indv);
-      if (!is_infinite(v)) {
-	if (v==vb) {
-	  vbb = vb;
-	  fr=(*ec).first;
-	  i= (*ec).second;
-	  return true;
-	}
-	else {
-	  orient = orientation(va->point(),
-			   vb->point(),
-			   v->point()); 
-	  if((orient==COLLINEAR) && 
-	     (collinear_between (va->point(),
-				 v->point(),
-				 vb->point()))) {
-	    vbb = v;
-	    fr=(*ec).first;
-	    i= (*ec).second;
-	    return true;
-	  }
-	}
-      }
-    } while (++ec != done);
-  }
-  return false;
-}
-
-template <class Gt, class Tds >
-inline bool 
-Triangulation_2<Gt, Tds>::
-is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const
-{
-  return _tds.is_face(v1, v2, v3);
-}
-
-template <class Gt, class Tds >
-inline bool 
-Triangulation_2<Gt, Tds>::
-is_face(Vertex_handle v1, 
-	Vertex_handle v2, 
-	Vertex_handle v3,
-	Face_handle &fr) const
-{
-  return _tds.is_face(v1, v2, v3, fr);
-}
-
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Triangle
-Triangulation_2<Gt, Tds>::
-triangle(Face_handle f) const
-{
-  CGAL_triangulation_precondition( ! is_infinite(f) );
-  typename Gt::Construct_triangle_2 
-     construct_triangle = geom_traits().construct_triangle_2_object();
-  return construct_triangle(f->vertex(0)->point(),
-			    f->vertex(1)->point(),
-			    f->vertex(2)->point());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Segment
-Triangulation_2<Gt, Tds>::
-segment(Face_handle f, int i) const
-{
-  CGAL_triangulation_precondition( ! is_infinite(f,i));
-  typename Gt::Construct_segment_2 
-     construct_segment = geom_traits().construct_segment_2_object();
-  return construct_segment(f->vertex(ccw(i))->point(),
-			   f->vertex(cw(i))->point());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Segment
-Triangulation_2<Gt, Tds>::
-segment(const Edge& e) const
-{
-  CGAL_triangulation_precondition(! is_infinite(e)); 
-  typename Gt::Construct_segment_2 
-     construct_segment = geom_traits().construct_segment_2_object();
-  return construct_segment(e.first->vertex(ccw(e.second))->point(),
-			   e.first->vertex( cw(e.second))->point());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Segment
-Triangulation_2<Gt, Tds>::
-segment(const Edge_circulator& ec) const
-{
-  return segment(*ec);
-}
-    
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Segment
-Triangulation_2<Gt, Tds>::
-segment(const Finite_edges_iterator& ei) const
-{
-  return segment(*ei);
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Segment
-Triangulation_2<Gt, Tds>::
-segment(const All_edges_iterator& ei) const
-{
-  return segment(*ei);
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-flip(Face_handle f, int i)
-{
-  CGAL_triangulation_precondition ( f != Face_handle() );
-  CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2);
-  CGAL_triangulation_precondition( dimension()==2); 
-    
-  CGAL_triangulation_precondition( !is_infinite(f) && 
-				   !is_infinite(f->neighbor(i)) );
-  CGAL_triangulation_precondition( 
-                  orientation(f->vertex(i)->point(),
-			      f->vertex(cw(i))->point(),
-			      mirror_vertex(f,i)->point()) == RIGHT_TURN &&
-                  orientation(f->vertex(i)->point(),
-			      f->vertex(ccw(i))->point(),
-			      mirror_vertex(f,i)->point()) ==  LEFT_TURN); 
-  _tds.flip(f, i);
-  return;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_first(const Point& p)
-{
-  CGAL_triangulation_precondition(number_of_vertices() == 0);
-  Vertex_handle v = _tds.insert_second();
-  v->set_point(p);
-  return  v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_second(const Point& p)
-{
-  CGAL_triangulation_precondition(number_of_vertices() == 1);
-   Vertex_handle v = _tds.insert_dim_up(infinite_vertex(), true);
-   v->set_point(p);
-   return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_in_edge(const Point& p, Face_handle f,int i)
-{
- CGAL_triangulation_exactness_precondition( 
-	      orientation(f->vertex(cw(i))->point(),  p,
-			  f->vertex(ccw(i))->point()) == COLLINEAR &&
-	      collinear_between(f->vertex(cw(i))->point(), p,
-				f->vertex(ccw(i))->point() ) );
-  Vertex_handle v = _tds.insert_in_edge(f,i);
-  v->set_point(p);
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_in_face(const Point& p, Face_handle f)
-{
-  CGAL_triangulation_precondition(oriented_side(f,p) ==   ON_POSITIVE_SIDE);
-  Vertex_handle v= _tds.insert_in_face(f);
-  v->set_point(p);
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_outside_convex_hull(const Point& p, Face_handle f)
-{
-  CGAL_triangulation_precondition(is_infinite(f) && dimension() >= 1);
-  Vertex_handle v;
-  if (dimension() == 1)  v=insert_outside_convex_hull_1(p, f);
-  else   v=insert_outside_convex_hull_2(p, f);
-  v->set_point(p);
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_outside_convex_hull_1(const Point& p, Face_handle f)
-{
-  CGAL_triangulation_precondition( is_infinite(f) && dimension()==1);
-  CGAL_triangulation_precondition(  
-    orientation(
-	     mirror_vertex(f,f->index(infinite_vertex()))->point(),
-	     f->vertex(1- f->index(infinite_vertex()))->point(),
-	     p) == COLLINEAR &&
-    collinear_between( 
-	     mirror_vertex(f,f->index(infinite_vertex()))->point(),
-	     f->vertex(1- f->index(infinite_vertex()))->point(),
-	     p) );
-   Vertex_handle v=_tds.insert_in_edge(f, 2);
-   v->set_point(p);
-   return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_outside_convex_hull_2(const Point& p, Face_handle f)
-{ 
-  CGAL_triangulation_precondition(is_infinite(f));
-  
-  int li = f->index(infinite_vertex());
-  
-  CGAL_triangulation_precondition( 
-		orientation(p,
-			    f->vertex(ccw(li))->point(),
-			    f->vertex(cw(li))->point()) == LEFT_TURN);
-
-  std::list<Face_handle> ccwlist;
-  std::list<Face_handle> cwlist;
-    
-  Face_circulator fc = incident_faces(infinite_vertex(), f);
-  bool done = false;
-  while(! done) {
-    fc--;
-    li = fc->index(infinite_vertex());
-    const Point& q = fc->vertex(ccw(li))->point();
-    const Point& r = fc->vertex(cw(li))->point();
-    if(orientation(p,q,r) == LEFT_TURN ) { ccwlist.push_back(fc); }
-    else {done=true;}
-  }
-
-  fc = incident_faces(infinite_vertex(), f);
-  done = false;
-  while(! done){
-    fc++;
-    li = fc->index(infinite_vertex());
-     const Point& q = fc->vertex(ccw(li))->point();
-     const Point& r = fc->vertex(cw(li))->point();
-    if(orientation(p,q,r) == LEFT_TURN ) { cwlist.push_back(fc);}
-    else {done=true;}
-  }
-
-  Vertex_handle v = _tds.insert_in_face(f);
-  v->set_point(p);
-
-  Face_handle fh;
-  while ( ! ccwlist.empty()) {
-    fh = ccwlist.front();
-    li = ccw(fh->index(infinite_vertex()));
-    _tds.flip( fh, li);
-    ccwlist.pop_front();
-  }
-
-  while ( ! cwlist.empty()) {
-    fh = cwlist.front();
-    li = cw(fh->index(infinite_vertex()));
-    _tds.flip( fh, li);
-    cwlist.pop_front();
-  }
-
-  //reset infinite_vertex()->face();
-  fc = incident_faces(v);
-  while( ! is_infinite(fc)) { fc++;}
-  infinite_vertex()->set_face(fc);
-
-  return v;
-} 
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert_outside_affine_hull(const Point& p)
-{
-  CGAL_triangulation_precondition(dimension() < 2);
-  bool conform = false;
-  if (dimension() == 1) {
-      Face_handle f = (*finite_edges_begin()).first;
-      Orientation orient = orientation( f->vertex(0)->point(),
-              f->vertex(1)->point(),
-              p);
-      CGAL_triangulation_precondition(orient != COLLINEAR);
-      conform = ( orient == COUNTERCLOCKWISE);
-  }
-  Vertex_handle v = _tds.insert_dim_up( infinite_vertex(), conform);
-  v->set_point(p);
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert(const Point &p, Face_handle start)
-{
-  Locate_type lt;
-  int li;
-  Face_handle loc = locate (p, lt, li, start);
-  return insert(p, lt, loc, li);
-}
-
- 
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-insert(const Point& p, Locate_type lt, Face_handle loc, int li)
-  // insert a point p, whose localisation is known (lt, f, i)
-{
-  if(number_of_vertices() == 0) {
-    return(insert_first(p));
-  }
-
-  if(number_of_vertices() == 1) {
-    if (lt == VERTEX) return finite_vertex();
-    else return(insert_second(p));
-  }
-
-  switch(lt) {
-  case FACE:
-    return insert_in_face(p,loc);
-  case EDGE:
-    return insert_in_edge(p,loc,li);
-  case OUTSIDE_CONVEX_HULL:
-    return  insert_outside_convex_hull(p,loc);
-  case OUTSIDE_AFFINE_HULL:
-   return  insert_outside_affine_hull(p);
-  case VERTEX:
-    return loc->vertex(li);
-  }
-  CGAL_triangulation_assertion(false);  // locate step failed
-  return Vertex_handle();
-}
-
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-push_back(const Point &p)
-{
-  return insert(p);
-}
-
-template <class Gt, class Tds >
-inline void 
-Triangulation_2<Gt,Tds>::
-remove_degree_3(Vertex_handle  v, Face_handle f)
-{
-  if (f == Face_handle()) f=v->face();
-  _tds.remove_degree_3(v, f);
-  return;
-}
-
-template <class Gt, class Tds >
-inline void
-Triangulation_2<Gt,Tds>::
-remove_first(Vertex_handle  v)
-{
-  _tds.remove_second(v);
-  return;
-}
-
-template <class Gt, class Tds >
-inline void 
-Triangulation_2<Gt,Tds>::
-remove_second(Vertex_handle v)
-{
-  _tds.remove_dim_down(v);
-  return;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt,Tds>::      
-remove(Vertex_handle  v)
-{
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !is_infinite(v));
-    
-  if  (number_of_vertices() == 1)     remove_first(v);
-  else if (number_of_vertices() == 2) remove_second(v);
-  else   if ( dimension() == 1) remove_1D(v);
-  else  remove_2D(v);
-  return;
-}
-
-template <class Gt, class Tds >
-inline void
-Triangulation_2<Gt, Tds>::
-remove_1D(Vertex_handle v)
-{
-  _tds.remove_1D(v);
-}
-
-template <class Gt, class Tds >
-bool
-Triangulation_2<Gt,Tds>::
-test_dim_down(Vertex_handle v) const
-{
-  //test the dimensionality of the resulting triangulation
-  //upon removing of vertex v
-  //it goes down to 1 iff
-  // 1) any finite face is incident to v
-  // 2) all vertices are collinear
-  CGAL_triangulation_precondition(dimension() == 2);
-  bool  dim1 = true; 
-  Finite_faces_iterator fit = finite_faces_begin();
-  while (dim1==true && fit != finite_faces_end()) {
-    dim1 = dim1 && fit->has_vertex(v);
-    fit++;
-  }
-  Face_circulator fic = incident_faces(v);
-  while (is_infinite(fic)) {++fic;}
-  Face_circulator done(fic);
-  Face_handle start(fic); int iv = start->index(v);
-  const Point& p = start->vertex(cw(iv))->point(); 
-  const Point& q = start->vertex(ccw(iv))->point();
-  while ( dim1 && ++fic != done) {
-    iv = fic->index(v);
-    if (fic->vertex(ccw(iv)) != infinite_vertex()) {
-      dim1 = dim1 && 
-	orientation(p, q, fic->vertex(ccw(iv))->point()) == COLLINEAR; 
-    }
-  }
-  return dim1;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt,Tds>::
-remove_2D(Vertex_handle v)
-{
-  if (test_dim_down(v)) {  _tds.remove_dim_down(v);  }
-  else {
-    std::list<Edge> hole;
-    make_hole(v, hole);
-    fill_hole(v, hole);
-    delete_vertex(v);
-  }
-  return;       
-}
-
-template < class Gt, class Tds >
-template < class OutputItFaces >
-inline
-typename Triangulation_2<Gt,Tds>::Vertex_handle 
-Triangulation_2<Gt,Tds>::
-insert_and_give_new_faces(const Point  &p, 
-                          OutputItFaces oif,
-                          Face_handle start)
-{
-  Vertex_handle v = insert(p, start);
-  int dimension = this->dimension();
-  if(dimension == 2)
-  {
-    Face_circulator fc = incident_faces(v), done(fc);
-    do {
-      *oif++ = fc;
-    } while(++fc != done);
-  }
-  else if(dimension == 1)
-  {
-    Face_handle c = v->face();
-    *oif++ = c;
-    *oif++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *oif++ = v->face(); // dimension == 0
-  return v;
-}
-		
-template < class Gt, class Tds >
-template < class OutputItFaces >
-inline
-typename Triangulation_2<Gt,Tds>::Vertex_handle 
-Triangulation_2<Gt,Tds>::
-insert_and_give_new_faces(const Point  &p,
-                          Locate_type lt,
-                          Face_handle loc, int li, 
-                          OutputItFaces oif)
-{
-  Vertex_handle v = insert(p, lt, loc, li);
-  int dimension = this->dimension();
-  if(dimension == 2)
-  {
-    Face_circulator fc = incident_faces(v), done(fc);
-    do {
-      *oif++ = fc;
-    } while(++fc != done);
-  }
-  else if(dimension == 1)
-  {
-    Face_handle c = v->face();
-    *oif++ = c;
-    *oif++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *oif++ = v->face(); // dimension == 0	
-  return v;	
-}
-
-template < class Gt, class Tds >
-template <class OutputItFaces>
-void
-Triangulation_2<Gt,Tds>::
-remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
-{
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !is_infinite(v));
-    
-  if(number_of_vertices() == 1) remove_first(v);
-  else if(number_of_vertices() == 2) remove_second(v);
-  else if( dimension() == 1) 
-  {
-    Point p = v->point();
-    remove(v);
-    *fit++ = locate(p);
-  }
-  else if (test_dim_down(v)) {  
-    _tds.remove_dim_down(v);  
-    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
-        afi != tds().face_iterator_base_begin(); 
-        afi++) *fit++ = afi;
-  }
-  else {
-    std::list<Edge> hole;
-    make_hole(v, hole);
-    fill_hole(v, hole, fit);
-    delete_vertex(v);
-  }
-  return;		
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-make_hole ( Vertex_handle v, std::list<Edge> & hole)
-{
-  std::vector<Face_handle> to_delete;
-  to_delete.reserve(16);
-
-  Face_handle  f, fn;
-  int i, in ;
-  Vertex_handle  vv;
-
-  Face_circulator fc = incident_faces(v);
-  Face_circulator done(fc);
-  do {
-    f = fc; fc++;
-    i = f->index(v);
-    fn = f->neighbor(i);
-    in = fn->index(f);
-    vv = f->vertex(cw(i));
-    vv->set_face(fn);
-    vv = f->vertex(ccw(i));
-    vv->set_face(fn);
-    fn->set_neighbor(in, Face_handle());
-    hole.push_back(Edge(fn,in));
-    to_delete.push_back(f);
-  } while(fc != done);
-
-  std::size_t size = to_delete.size();
-  for(std::size_t i=0; i<size; i++) {
-    f = to_delete[i];
-    delete_face(f);
-  }
-}
-
-template <class Gt, class Tds >
-void 
-Triangulation_2<Gt,Tds>::
-make_hole(Vertex_handle v, std::list<Edge> & hole,
-          std::set<Face_handle> &faces_set)
-{
-  std::vector<Face_handle> to_delete;
-  to_delete.reserve(16);
-
-  Face_handle  f, fn;
-  int i, in ;
-  Vertex_handle  vv;
-
-  Face_circulator fc = incident_faces(v);
-  Face_circulator done(fc);
-  do {
-    f = fc; fc++;
-    i = f->index(v);
-    fn = f->neighbor(i);
-    in = fn->index(f);
-    vv = f->vertex(cw(i));
-    vv->set_face(fn);
-    vv = f->vertex(ccw(i));
-    vv->set_face(fn);
-    fn->set_neighbor(in, Face_handle());
-    hole.push_back(Edge(fn,in));
-    to_delete.push_back(f);
-  } while(fc != done);
-
-  std::size_t size = to_delete.size();
-  for(std::size_t i=0; i<size; i++) {
-    f = to_delete[i];
-    faces_set.erase(f);
-    delete_face(f);
-  }
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::						     
-fill_hole ( Vertex_handle v, std::list< Edge > & hole )
-{
-  // uses the fact that the hole is starshaped
-  // with repect to v->point()
-  typedef std::list<Edge> Hole;
-
-  Face_handle  ff, fn;
-  int ii , in; 
-  Vertex_handle v0, v1, v2;
-  Bounded_side side;
-
-  //stack algorithm to create faces
-  // create face v0,v1,v2
-  //if v0,v1,v2 are finite vertices
-  // and form a left_turn
-  // and triangle v0v1v2 does not contain v->point()
-  if( hole.size() != 3) {
-    typename Hole::iterator hit = hole.begin();
-    typename Hole::iterator next= hit; 
-    while( hit != hole.end() && hole.size() != 3) {
-      ff = (*hit).first;  
-      ii = (*hit).second;
-      v0 = ff->vertex(cw(ii));
-      v1 = ff->vertex(ccw(ii));
-      if( !is_infinite(v0) && !is_infinite(v1)) {
-	next=hit; next++;
-	if(next == hole.end()) next=hole.begin();
-	fn = (*next).first; 
-	in = (*next).second;
-	v2 = fn->vertex(ccw(in));	
-	if ( !is_infinite(v2) &&
-	     orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) {
-	  side =  bounded_side(v0->point(), 
-			       v1->point(), 
-			       v2->point(),
-			       v->point());
-
-	  if( side == ON_UNBOUNDED_SIDE || 
-	      (side == ON_BOUNDARY && orientation(v0->point(),
-					     v->point(),
-					     v2->point()) == COLLINEAR &&
-	       collinear_between(v0->point(),v->point(),v2->point()) )) 
-	    {
-	      //create face
-	      Face_handle  newf = create_face(ff,ii,fn,in); 
-	      typename Hole::iterator tempo=hit;
-	      hit = hole.insert(hit,Edge(newf,1)); //push newf
-	      hole.erase(tempo); //erase ff
-	      hole.erase(next); //erase fn
-	      if (hit != hole.begin() ) --hit;
-	      continue;
-	    }
-	}
-      }
-      ++hit; 
-    } 
-  }
-
-  // either the hole has only three edges
-  // or all its finite vertices are reflex or flat
-  // except may be one vertex whose corresponding ear 
-  // includes the vertex being removed
-
-  // deal with the last left_turn if any
-  if(hole.size() != 3) {
-    typename Hole::iterator hit=hole.begin();
-    while(hit != hole.end()) {
-      ff = (*hit).first;  ii = (*hit).second;
-      hit++;
-      if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;}
-      else { fn = ((hole.front()).first); in = (hole.front()).second;}
-      if ( !is_infinite(ff->vertex(cw(ii))) &&
-	   !is_infinite(fn->vertex(cw(in))) &&
-	   !is_infinite(fn->vertex(ccw(in))) &&
-	   orientation(ff->vertex(cw(ii))->point(),
-		       fn->vertex(cw(in))->point(),
-		       fn->vertex(ccw(in))->point()) == LEFT_TURN) {
-	  create_face(ff,ii,fn,in);
-	  break;
-	}
-    }
-  }
-
-  // deal with a reflex chain of convex hull edges
-  if(hole.size() != 3) {
-    // look for infinite vertex
-    ff = (hole.front()).first;
-    ii = (hole.front()).second;
-    while ( ! is_infinite(ff->vertex(cw(ii)))){
-      hole.push_back(hole.front());
-      hole.pop_front();
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-    }
-    //create faces
-    while(hole.size() != 3){
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-      hole.pop_front();
-      fn = (hole.front()).first;
-      in = (hole.front()).second;
-      hole.pop_front();
-      Face_handle  newf = create_face(ff,ii,fn,in);
-      hole.push_front(Edge(newf,1));
-    }
-  }
-    
-  // now hole has three edges
-  typename Hole::iterator hit;
-  hit = hole.begin();
-  //  I don't know why the following yelds a segmentation fault
-  //    create_face( (*hit).first, (*hit).second,
-  // 	     (* ++hit).first, (*hit).second,
-  // 	     (* ++hit).first, (*hit).second);
-  ff = (*hit).first;      ii = (*hit).second;
-  fn = (* ++hit).first;   in = (*hit).second;
-  Face_handle f3 = (* ++hit).first;
-  int i3 = (*hit).second;
-  create_face(ff,ii,fn,in,f3,i3);
-}
-
-template < class Gt, class Tds >
-template <class OutputItFaces>
-void
-Triangulation_2<Gt,Tds>::
-fill_hole(Vertex_handle v, std::list<Edge> & hole, OutputItFaces fit)
-{
-  // uses the fact that the hole is starshaped
-  // with repect to v->point()
-  typedef std::list<Edge> Hole;
-
-  Face_handle  ff, fn;
-  int ii , in; 
-  Vertex_handle v0, v1, v2;
-  Bounded_side side;
-
-  //stack algorithm to create faces
-  // create face v0,v1,v2
-  //if v0,v1,v2 are finite vertices
-  // and form a left_turn
-  // and triangle v0v1v2 does not contain v->point()
-  if( hole.size() != 3) {
-    typename Hole::iterator hit = hole.begin();
-    typename Hole::iterator next= hit; 
-    while( hit != hole.end() && hole.size() != 3) {
-      ff = (*hit).first;  
-      ii = (*hit).second;
-      v0 = ff->vertex(cw(ii));
-      v1 = ff->vertex(ccw(ii));
-      if( !is_infinite(v0) && !is_infinite(v1)) {
-        next=hit; next++;
-        if(next == hole.end()) next=hole.begin();
-        fn = (*next).first; 
-        in = (*next).second;
-        v2 = fn->vertex(ccw(in));	
-        if ( !is_infinite(v2) &&
-             orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) {
-          side =  bounded_side(v0->point(), v1->point(), v2->point(), v->point());
-          if( side == ON_UNBOUNDED_SIDE || 
-              (side == ON_BOUNDARY && orientation(v0->point(),
-                                                  v->point(),
-                                                  v2->point()) == COLLINEAR &&
-               collinear_between(v0->point(),v->point(),v2->point()) )) 
-          {
-            //create face
-            Face_handle  newf = create_face(ff,ii,fn,in);
-            *fit++ = newf; 
-            typename Hole::iterator tempo=hit;
-            hit = hole.insert(hit,Edge(newf,1)); //push newf
-            hole.erase(tempo); //erase ff
-            hole.erase(next); //erase fn
-            if (hit != hole.begin() ) --hit;
-            continue;
-          }
-        }
-      }
-      ++hit; 
-    } 
-  }
-
-  // either the hole has only three edges
-  // or all its finite vertices are reflex or flat
-  // except may be one vertex whose corresponding ear 
-  // includes the vertex being removed
-
-  // deal with the last left_turn if any
-  if(hole.size() != 3) {
-    typename Hole::iterator hit=hole.begin();
-    while(hit != hole.end()) {
-      ff = (*hit).first;  ii = (*hit).second;
-      hit++;
-      if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;}
-      else { fn = ((hole.front()).first); in = (hole.front()).second;}
-      if ( !is_infinite(ff->vertex(cw(ii))) &&
-           !is_infinite(fn->vertex(cw(in))) &&
-           !is_infinite(fn->vertex(ccw(in))) &&
-           orientation(ff->vertex(cw(ii))->point(),
-                       fn->vertex(cw(in))->point(),
-                       fn->vertex(ccw(in))->point()) == LEFT_TURN) {
-        Face_handle  newf = create_face(ff,ii,fn,in);
-        *fit++ = newf;
-        break;
-      }
-    }
-  }
-
-  // deal with a reflex chain of convex hull edges
-  if(hole.size() != 3) {
-    // look for infinite vertex
-    ff = (hole.front()).first;
-    ii = (hole.front()).second;
-    while ( ! is_infinite(ff->vertex(cw(ii)))){
-      hole.push_back(hole.front());
-      hole.pop_front();
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-    }
-    //create faces
-    while(hole.size() != 3){
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-      hole.pop_front();
-      fn = (hole.front()).first;
-      in = (hole.front()).second;
-      hole.pop_front();
-      Face_handle newf = create_face(ff,ii,fn,in);
-      *fit++ = newf;
-      hole.push_front(Edge(newf,1));
-    }
-  }
-
-  // now hole has three edges
-  typename Hole::iterator hit;
-  hit = hole.begin();
-  //  I don't know why the following yelds a segmentation fault
-  //    create_face( (*hit).first, (*hit).second,
-  // 	     (* ++hit).first, (*hit).second,
-  // 	     (* ++hit).first, (*hit).second);
-  ff = (*hit).first;      ii = (*hit).second;
-  fn = (* ++hit).first;   in = (*hit).second;
-  Face_handle f3 = (* ++hit).first;
-  int i3 = (*hit).second;
-  Face_handle newf = create_face(ff,ii,fn,in,f3,i3);
-  *fit++ = newf;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-fill_hole_delaunay(std::list<Edge> & first_hole)
-{
-  typedef std::list<Edge> Hole;
-  typedef std::list<Hole> Hole_list;
-  
-  Face_handle  f, ff, fn;
-  int i, ii, in;
-  Hole_list hole_list;
-  Hole hole;
-        
-  hole_list.push_front(first_hole);
-  
-  while( ! hole_list.empty())
-    {
-      hole = hole_list.front();
-      hole_list.pop_front();
-      typename Hole::iterator hit = hole.begin();
-  
-      // if the hole has only three edges, create the triangle
-      if (hole.size() == 3) {
-	hit = hole.begin();
-	f = (*hit).first;        i = (*hit).second;
-	ff = (* ++hit).first;    ii = (*hit).second;
-	fn = (* ++hit).first;    in = (*hit).second;
-	create_face(f,i,ff,ii,fn,in);
-	continue;
-      }
-  
-      // else find an edge with two finite vertices
-      // on the hole boundary
-      // and the new triangle adjacent to that edge
-      //  cut the hole and push it back
-  
-      // first, ensure that a neighboring face
-      // whose vertices on the hole boundary are finite
-      // is the first of the hole
-      bool finite= false;
-      while (!finite){
-	ff = (hole.front()).first;
-	ii = (hole.front()).second;
-	if ( is_infinite(ff->vertex(cw(ii))) ||
-	     is_infinite(ff->vertex(ccw(ii)))) {
-          hole.push_back(hole.front());
-          hole.pop_front();
-	}
-	else finite=true;
-      }
-  
-      // take the first neighboring face and pop it;
-      ff = (hole.front()).first;
-      ii =(hole.front()).second;
-      hole.pop_front();
-    
-      Vertex_handle v0 = ff->vertex(cw(ii)); 
-      Vertex_handle v1 = ff->vertex(ccw(ii)); 
-      Vertex_handle v2 = infinite_vertex(); 
-      Vertex_handle v3; 
-      const Point& p0 = v0->point();
-      const Point& p1 = v1->point();
-  
-      typename Hole::iterator hdone = hole.end();
-      hit =  hole.begin();
-      typename Hole::iterator cut_after(hit);
-  
-      // if tested vertex is c with respect to the vertex opposite
-      // to NULL neighbor,
-      // stop at the before last face;
-      hdone--;
-      while( hit != hdone) {
-	fn = (*hit).first;
-	in = (*hit).second;
-        Vertex_handle vv = fn->vertex(ccw(in));
-	if (is_infinite(vv)) {
-	  if(is_infinite(v2)) cut_after = hit;
-	}
-	else {     // vv is a finite vertex
-	  const Point & p = vv->point();
-	  if (orientation(p0,p1,p) == COUNTERCLOCKWISE) {
-	    if (is_infinite(v2)) { v2=vv; v3=vv; cut_after=hit;}
-	    else{
-              //
-	      if (this->side_of_oriented_circle(p0,p1,v3->point(),p,true) ==  ON_POSITIVE_SIDE){
-		v2=vv; v3=vv; cut_after=hit;}
-	    }
-	  }
-	}
-	++hit;
-      }
- 
-      // create new triangle and update adjacency relations
-      Face_handle newf;
-    
-      //update the hole and push back in the Hole_List stack
-      // if v2 belongs to the neighbor following or preceding *f
-      // the hole remain a single hole
-      // otherwise it is split in two holes
-  
-      fn = (hole.front()).first;
-      in = (hole.front()).second;
-      if (fn->has_vertex(v2, i) && i == fn->ccw(in)) {
-	newf = create_face(ff,ii,fn,in);
-	hole.pop_front();
-	hole.push_front(Edge( newf,1));
-	hole_list.push_front(hole);
-      }
-      else{
-	fn = (hole.back()).first;
-	in = (hole.back()).second;
-	if (fn->has_vertex(v2, i) && i== fn->cw(in)) {
-	  newf = create_face(fn,in,ff,ii);
-	  hole.pop_back();
-	  hole.push_back(Edge(newf,1));
-	  hole_list.push_front(hole);
-	}
-	else{
-	  // split the hole in two holes
-	  newf = create_face(ff,ii,v2);
-	  Hole new_hole;
-	  ++cut_after;
-	  while( hole.begin() != cut_after )
-            {
-              new_hole.push_back(hole.front());
-              hole.pop_front();
-            }
-  
-	  hole.push_front(Edge( newf,1));
-	  new_hole.push_front(Edge( newf,0));
-	  hole_list.push_front(hole);
-	  hole_list.push_front(new_hole);
-	}
-      }
-    }
-}
-
-template < class Gt, class Tds >
-template <class OutputItFaces>
-void
-Triangulation_2<Gt,Tds>::
-fill_hole_delaunay(std::list<Edge> & first_hole, OutputItFaces fit)
-{
-  typedef typename Gt::Orientation_2             Orientation_2;
-  typedef typename Gt::Side_of_oriented_circle_2 In_circle;
-  typedef std::list<Edge>                        Hole;
-  typedef std::list<Hole>                        Hole_list;
-
-  Orientation_2 orientation_2 = geom_traits().orientation_2_object();
-  In_circle in_circle = 
-    geom_traits().side_of_oriented_circle_2_object();
-
-  Face_handle  f, ff, fn;
-  int i, ii, in;
-  Hole_list hole_list;
-  Hole hole;
-      
-  hole_list.push_front(first_hole);
-
-  while(!hole_list.empty()) {
-    hole = hole_list.front();
-    hole_list.pop_front();
-    typename Hole::iterator hit = hole.begin();
-
-    if (hole.size() == 3) {
-      hit = hole.begin();
-      f = (*hit).first;        i = (*hit).second;
-      ff = (* ++hit).first;    ii = (*hit).second;
-      fn = (* ++hit).first;    in = (*hit).second;
-      Face_handle newf = create_face(f,i,ff,ii,fn,in);
-      *fit++ = newf;
-      continue;
-    }
-
-    bool finite= false;
-    while (!finite){
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-      if ( is_infinite(ff->vertex(cw(ii))) ||
-     is_infinite(ff->vertex(ccw(ii)))) {
-        hole.push_back(hole.front());
-        hole.pop_front();
-      } else finite=true;
-    }
-
-    ff = (hole.front()).first;
-    ii =(hole.front()).second;
-    hole.pop_front();
-  
-    Vertex_handle v0 = ff->vertex(cw(ii)); 
-    Vertex_handle v1 = ff->vertex(ccw(ii)); 
-    Vertex_handle v2 = infinite_vertex(); 
-    const Point& p0 = v0->point();
-    const Point& p1 = v1->point();
-
-    typename Hole::iterator hdone = hole.end();
-    hit =  hole.begin();
-    typename Hole::iterator cut_after(hit);
-
-    hdone--;
-    while( hit != hdone) {
-      fn = (*hit).first;
-      in = (*hit).second;
-      Vertex_handle vv = fn->vertex(ccw(in));
-      if (is_infinite(vv)) {
-        if(is_infinite(v2)) cut_after = hit;
-      } else {     // vv is a finite vertex
-  const Point & p = vv->point();
-  if (orientation_2(p0,p1,p) == CGAL::COUNTERCLOCKWISE) {
-          if (is_infinite(v2)) { v2 = vv; cut_after = hit;}
-    else{
-      if (in_circle(p0,p1,v2->point(),p) == CGAL::ON_POSITIVE_SIDE){
-        v2 = vv; cut_after = hit;
-            }
-    }
-  }
-      }
-      ++hit;
-    }
-
-    Face_handle newf;
-  
-    fn = (hole.front()).first;
-    in = (hole.front()).second;
-    if (fn->has_vertex(v2, i) && i == fn->ccw(in)) {
-      newf = create_face(ff,ii,fn,in);
-      hole.pop_front();
-      hole.push_front(Edge( newf,1));
-      hole_list.push_front(hole);
-    } else {
-      fn = (hole.back()).first;
-      in = (hole.back()).second;
-      if (fn->has_vertex(v2, i) && i== fn->cw(in)) {
-        newf = create_face(fn,in,ff,ii);
-        hole.pop_back();
-        hole.push_back(Edge(newf,1));
-        hole_list.push_front(hole);
-      } else {
-  newf = create_face(ff,ii,v2);
-  Hole new_hole;
-  ++cut_after;
-  while( hole.begin() != cut_after ) {
-          new_hole.push_back(hole.front());
-          hole.pop_front();
-        }
-        hole.push_front(Edge(newf, 1));
-        new_hole.push_front(Edge(newf, 0));
-        hole_list.push_front(hole);
-        hole_list.push_front(new_hole);
-      }
-    }
-    *fit++ = newf;
-  }
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-move_if_no_collision(Vertex_handle v, const Point &p) {
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;	
-
-  const int dim = dimension();
-
-  Locate_type lt;
-  int li;
-  Face_handle loc = locate(p, lt, li, v->face());
-
-  if(lt == VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->set_point(p);
-    return v;
-  }
-
-	size_type n_vertices = tds().number_of_vertices();
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
-	  v->set_point(p);
-	  return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-    if(loc->has_vertex(v)) {
-      v->set_point(p);
-    } else {
-      Vertex_handle inserted = insert(p, lt, loc, li);
-      Face_handle f = v->face();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Face_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_face(f);
-      delete_face(g);
-      Face_handle f_ins = inserted->face();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Face_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-      v->set_point(p);
-      v->set_face(inserted->face());
-      delete_vertex(inserted);
-    }
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) {
-	  // verify if p and two static vertices are collinear in this case
-		int iinf = 0;
-		Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf);
-	  do { 
-		  if(!finf->has_vertex(v))
-		  {
-				iinf = ~(finf->index(infinite_vertex()));
-				break;
-		  }
-		} while(++finf != fdone);
-	  if(this->orientation(finf->vertex(iinf&1)->point(),
-	                       finf->vertex(iinf&2)->point(),
-	                       p) == COLLINEAR)
-	  {
-      v->set_point(p);
-      _tds.dim_down(loc, loc->index(v));
-		  return v;
-		}
-  }
-
-  Vertex_handle inserted = insert(p, lt, loc, li);
-
-  std::list<Edge> hole;
-  make_hole(v, hole);
-  fill_hole(v, hole);
-
-  // fixing pointer
-  Face_circulator fc = this->incident_faces(inserted), done(fc);
-  std::vector<Face_handle> faces_pt;
-	faces_pt.reserve(16);
-  do { faces_pt.push_back(fc); } while(++fc != done);
-  std::size_t ss = faces_pt.size();
-  for(std::size_t k=0; k<ss; k++)
-    {
-      Face_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-  v->set_point(p);
-  v->set_face(inserted->face());
-  delete_vertex(inserted);
-
-  return v;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt,Tds>::Vertex_handle
-Triangulation_2<Gt,Tds>::
-move(Vertex_handle v, const Point &p) {
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;	
-  Vertex_handle w = move_if_no_collision(v,p);
-  if(w != v) {
-    remove(v);
-    return w;
-  }
-  return v;
-}
-
-template <class Gt, class Tds >
-template <class OutputItFaces>
-typename Triangulation_2<Gt,Tds>::Vertex_handle 
-Triangulation_2<Gt,Tds>::
-move_if_no_collision_and_give_new_faces(Vertex_handle v, 
-                                            const Point &p, 
-                                            OutputItFaces oif)
-{
-  CGAL_triangulation_precondition(!is_infinite(v));		
-  if(v->point() == p) return v;	
-  const int dim = this->dimension();
-
-  Locate_type lt;
-  int li;
-  Vertex_handle inserted;
-  Face_handle loc = locate(p, lt, li, v->face());
-
-  if(lt == VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->set_point(p);
-    return v;
-  }
-
-  int n_vertices = tds().number_of_vertices();
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
-    v->set_point(p);
-	
-    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
-        afi != tds().face_iterator_base_begin(); 
-        afi++) *oif++ = afi;
-	
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-    if(loc->has_vertex(v)) {
-      v->set_point(p);
-    } else {
-      inserted = insert(p, lt, loc, li);
-      Face_handle f = v->face();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Face_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_face(f);
-      delete_face(g);
-      *oif++ = f;
-      Face_handle f_ins = inserted->face();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Face_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-      v->set_point(p);
-      v->set_face(inserted->face());
-      delete_vertex(inserted);
-    }
-    *oif++ = v->face();
-    if(v->face()->neighbor(0)->has_vertex(v)) 
-      *oif++ = v->face()->neighbor(0);
-    if(v->face()->neighbor(1)->has_vertex(v)) 
-      *oif++ = v->face()->neighbor(1);			
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) {
-    // verify if p and two static vertices are collinear in this case
-    int iinf;
-    Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf);
-    do { 
-      if(!finf->has_vertex(v))
-        {
-          iinf = ~(finf->index(infinite_vertex()));
-          break;
-        }
-    } while(++finf != fdone);
-    if(this->orientation(finf->vertex(iinf&1)->point(),
-                         finf->vertex(iinf&2)->point(),
-                         p) == COLLINEAR)
-      {
-        v->set_point(p);
-        _tds.dim_down(loc, loc->index(v));
-        return v;
-      }
-		
-    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
-        afi != tds().face_iterator_base_begin(); 
-        afi++) *oif++ = afi;
-		
-  }
-
-  std::set<Face_handle> faces_set;
-  inserted = insert(p, lt, loc, li);
-  Face_circulator fc = incident_faces(inserted), done(fc);
-  do { faces_set.insert(fc); } while(++fc != done);
-
-  std::list<Edge> hole;
-  make_hole(v, hole, faces_set);
-  fill_hole(v, hole, oif);
-
-  fc = this->incident_faces(inserted), done(fc);
-  std::vector<Face_handle> faces_pt;
-  faces_pt.reserve(16);
-  do { faces_pt.push_back(fc); } while(++fc != done);
-  int ss = faces_pt.size();
-  for(int k=0; k<ss; k++)
-    {
-      Face_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-  v->set_point(p);
-  v->set_face(inserted->face());
-  delete_vertex(inserted);
-
-  for(typename std::set<Face_handle>::iterator ib = faces_set.begin(),
-        iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
-
-  return v;
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Face_handle f1, int i1,
-	 Face_handle f2, int i2,
-	 Face_handle f3, int i3)
-{
-  return _tds.create_face(f1, i1, f2, i2, f3, i3);
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Face_handle f1, int i1,
-	 Face_handle f2, int i2)
-{
-  return _tds.create_face(f1, i1, f2, i2);
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Face_handle f, int i, Vertex_handle v)
-{
-  return _tds.create_face(f, i, v);
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
-{
-  return _tds.create_face(v1, v2, v3);
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
-	    Face_handle f1, Face_handle f2,  Face_handle f3)
-{
-  return _tds.create_face(v1, v2, v3, f1, f2, f3);
-}
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face(Face_handle fh)
-{
-  return _tds.create_face(fh);
-}
-
-
-
-template <class Gt, class Tds >    
-inline
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-create_face()
-{
-  return _tds.create_face();
-}
-
-template <class Gt, class Tds >    
-inline
-void
-Triangulation_2<Gt, Tds>::
-delete_face(Face_handle f)
-{
-  _tds.delete_face(f);
-}
-
-template <class Gt, class Tds >    
-inline
-void
-Triangulation_2<Gt, Tds>::
-delete_vertex(Vertex_handle v)
-{
-  _tds.delete_vertex(v);
-}
-
-// POINT LOCATION
-template <class Gt, class Tds >    
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-march_locate_1D(const Point& t,
-		Locate_type& lt,
-		int& li) const
-{
-  Face_handle ff = infinite_face();
-  int iv = ff->index(infinite_vertex());
-  Face_handle f = ff->neighbor(iv);
-  Orientation pqt = orientation(f->vertex(0)->point(), 
-				f->vertex(1)->point(),
-				t);
-  if(pqt == RIGHT_TURN || pqt == LEFT_TURN) {
-    lt = OUTSIDE_AFFINE_HULL;
-    li = 4 ;// should not be used
-    return Face_handle();
-  }
-
-  int i= f->index(ff);
-  if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) {
-    lt = OUTSIDE_CONVEX_HULL;
-    li = iv;
-    return ff;
-  }
-
-  if( xy_equal(t,f->vertex(1-i)->point()) ){
-    lt = VERTEX;
-    li=1-i;
-    return f;
-  }
-
-  ff = ff->neighbor(1-iv); //the other infinite face
-  iv = ff->index(infinite_vertex());
-  f = ff->neighbor(iv);
-  i = f->index(ff);
-  if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) {
-    lt = OUTSIDE_CONVEX_HULL;
-    li = iv;
-    return ff;
-  }
-  if( xy_equal(t,f->vertex(1-i)->point()) ){
-      lt = VERTEX;
-      li=1-i;
-    return f;
-  } 
-	
-  Finite_edges_iterator eit= finite_edges_begin();
-  Vertex_handle u,v;
-  for( ; eit != finite_edges_end() ; eit++) {
-    u = (*eit).first->vertex(0);
-    v = (*eit).first->vertex(1);
-    if(xy_equal(t,v->point())){
-      lt = VERTEX;
-      li = 1;
-      return (*eit).first;
-    }
-    if(collinear_between(u->point(), t, v->point())){
-      lt = EDGE;
-      li =  2;
-      return (*eit).first;
-    }
-  }
-  CGAL_triangulation_assertion(false);
-  return Face_handle();
-}
-
-template <class Gt, class Tds >    
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-march_locate_2D_LFC(Face_handle start,
-		const Point& t,
-		Locate_type& lt,
-		int& li) const
-{
-  //    CGAL_triangulation_precondition( ! is_infinite(start) );
-  const Point& p = start->vertex(0)->point();
-  const Point& q = start->vertex(1)->point();
-  const Point& r = start->vertex(2)->point();
-  if(xy_equal(t,p)) {
-    lt = VERTEX;
-    li = 0;
-    return start;
-  }
-
-  Line_face_circulator lfc;
-  
-  Orientation o2 = orientation(p, q, t);
-  Orientation o0 = orientation(q, r, t);
-  Orientation o1 = orientation(r, p, t);
-  if( (o2 == LEFT_TURN)&& (o1 == LEFT_TURN)) {
-    lfc = Line_face_circulator(start, 0,
-			       Line_face_circulator::vertex_edge, 
-			       this, p, t); 
-  } else if ( (o0 == LEFT_TURN)&& (o2 == LEFT_TURN)) {
-    lfc = Line_face_circulator(start, 1,
-			       Line_face_circulator::vertex_edge, 
-			       this, q, t); 
-  } else if ( (o1 == LEFT_TURN)&& (o0 == LEFT_TURN)) {
-    lfc = Line_face_circulator(start, 2,
-			       Line_face_circulator::vertex_edge, 
-			       this, r, t); 
-  } if( (o2 == RIGHT_TURN)&& (o1 == RIGHT_TURN)) {
-    lfc = Line_face_circulator(start, 0,
-			       Line_face_circulator::edge_vertex, 
-			       this, p, t); 
-  } else if ( (o0 == RIGHT_TURN)&& (o2 == RIGHT_TURN)) {
-    lfc = Line_face_circulator(start, 1,
-			       Line_face_circulator::edge_vertex, 
-			       this, q, t); 
-  } else if ( (o1 == RIGHT_TURN)&& (o0 == RIGHT_TURN)) {
-    lfc = Line_face_circulator(start, 2,
-			       Line_face_circulator::edge_vertex, 
-			       this, r, t); 
-  }else {
-    lfc = Line_face_circulator(start->vertex(0), this, t);
-  }
-  if(lfc==0 || lfc.collinear_outside()){
-    // point t lies outside or on the convex hull
-    // we walk on the convex hull to find it out
-    Face_circulator fc = incident_faces(infinite_vertex());
-    Face_circulator done(fc);
-    int ic = fc->index(infinite_vertex());
-    if (xy_equal(t,fc->vertex(cw(ic))->point())){
-      lt = VERTEX;
-      li = cw(ic);
-      return fc;
-     }
-    Orientation ori;
-    do{ // walking ccw around convex hull
-      ic = fc->index(infinite_vertex());
-      if (xy_equal(t,fc->vertex(ccw(ic))->point())){
-	lt = VERTEX;
-	li = ccw(ic);
-	return fc;
-      }
-      ori = orientation( fc->vertex(cw(ic))->point(),
-			 fc->vertex(ccw(ic))->point(), t);
-      if (ori == RIGHT_TURN) {
-	lt = OUTSIDE_CONVEX_HULL;
-	li = ic;
-	return fc;
-      }
-      if (ori == COLLINEAR &&
-	  collinear_between(fc->vertex(cw(ic))->point(),
-			    t, 
-			    fc->vertex(ccw(ic))->point()) ) {
-	lt = EDGE;
-	li = ic;
-	return fc;
-      }
-    } while (--fc != done);
-    //should not arrive there;
-    CGAL_triangulation_assertion(fc != done);
-  }
-	  
-  while(! lfc.locate(t, lt, li) ){
-    ++lfc;
-  }
-  return lfc;
-}    
-
-template <class Gt, class Tds >    
-void
-Triangulation_2<Gt, Tds>::
-compare_walks(const Point& p,
-	      Face_handle c1, Face_handle c2,
-	      Locate_type& lt1, Locate_type& lt2,
-	      int li1, int li2) const
-{
-  bool b = true;
-  b = b && (lt1 == lt2);
-  if((lt1 == lt2) && (lt1 == VERTEX)) {
-    b = b && ( c1->vertex(li1) == c2->vertex(li2) );
-  } else if((lt1 == lt2) && (lt1 == EDGE)) {
-    b = b && ((c1 == c2) || ( (c1->neighbor(li1) == c2) && (c2->neighbor(li2) == c1)));
-  }else if((lt1 == lt2) && (lt1  == OUTSIDE_CONVEX_HULL)) {
-    b = b && (is_infinite(c1) && is_infinite(c2));
-  } else {
-    b = b && (lt1 == lt2);
-    b = b && (lt1 == FACE);
-    b = b && (c1 == c2);
-  }
-  
-  if ( c1 != c2) {
-    std::cerr << "from compare_walks " << std::endl;
-    std::cerr << "point " << p << std::endl;
-    std::cerr << "locate 1 " << &*c1 << "\t" << lt1 << "\t" << li1 
-	      << std::endl;
-    std::cerr << "locate 2 " << &*c2 << "\t" << lt2 << "\t" << li2 
-	      << std::endl;
-    std::cerr << std::endl;
-    show_face(c1);
-    std::cerr << std::endl;
-    show_face(c2);
-    std::cerr << std::endl;
-  }
-    
-    CGAL_triangulation_assertion(b);
-}
-      
-
-#if 1
-
-template <class Gt, class Tds >   typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-march_locate_2D(Face_handle c,
-		const Point& t,
-		Locate_type& lt,
-		int& li) const
-{
-  CGAL_triangulation_assertion(! is_infinite(c));
-  
-  boost::rand48 rng;
-
-  boost::uniform_smallint<> two(0, 1);
-  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > coin(rng, two);
-
-  Face_handle prev = Face_handle();
-  bool first = true;
-  while (1) {
-    if ( is_infinite(c) ) {
-      // c must contain t in its interior
-      lt = OUTSIDE_CONVEX_HULL;
-      li = c->index(infinite_vertex());
-      return c;
-    }
-    
-    // else c is finite
-    // Instead of testing its edges in a random order we do the following
-    // until we find a neighbor to go further:
-    // As we come from prev we do not have to check the edge leading to prev
-    // Now we flip a coin in order to decide if we start checking the
-    // edge before or the edge after the edge leading to prev
-    // We do loop unrolling in order to find out if this is faster.
-    // In the very beginning we do not have a prev, but for the first step 
-    // we do not need randomness
-    int left_first = coin()%2;
-    
-    const Point & p0 = c->vertex( 0 )->point();
-    const Point & p1 = c->vertex( 1 )->point();
-    const Point & p2 = c->vertex( 2 )->point();
-    Orientation o0, o1, o2;
-
-    if(first){
-      prev = c;
-      first = false;
-      o0 = orientation(p0,p1,t);
-      if ( o0 == NEGATIVE ) {
-	c = c->neighbor( 2 );
-	continue;
-      }
-      o1 = orientation(p1,p2,t);
-      if ( o1 == NEGATIVE ) {
-	c = c->neighbor( 0 );
-	continue;
-      }
-      o2 = orientation(p2,p0,t);
-      if ( o2 == NEGATIVE ) {
-	c = c->neighbor( 1 );
-	continue;
-      }
-    } else if(left_first){
-      if(c->neighbor(0) == prev){
-	prev = c;
-	o0 = orientation(p0,p1,t);
-	if ( o0 == NEGATIVE ) {
-	  c = c->neighbor( 2 );
-	  continue;
-	}
-	o2 = orientation(p2,p0,t);
-	if ( o2 == NEGATIVE ) {
-	  c = c->neighbor( 1 );
-	  continue;
-	}
-        o1 = POSITIVE;
-      } else if(c->neighbor(1) == prev){
-	prev = c;
-	o1 = orientation(p1,p2,t);
-	if ( o1 == NEGATIVE ) {
-	  c = c->neighbor( 0 );
-	  continue;
-	}
-	o0 = orientation(p0,p1,t);
-	if ( o0 == NEGATIVE ) {
-	  c = c->neighbor( 2 );
-	  continue;
-	}
-        o2 = POSITIVE;
-      } else {
-	prev = c;
-	o2 = orientation(p2,p0,t);
-	if ( o2 == NEGATIVE ) {
-	  c = c->neighbor( 1 );
-	  continue;
-	}
-	o1 = orientation(p1,p2,t);
-	if ( o1 == NEGATIVE ) {
-	  c = c->neighbor( 0 );
-	  continue;
-	}
-        o0 = POSITIVE;
-      }
-      
-    } else { // right_first
-      if(c->neighbor(0) == prev){
-	prev = c;
-	o2 = orientation(p2,p0,t);
-	if ( o2 == NEGATIVE ) {
-	  c = c->neighbor( 1 );
-	  continue;
-	}
-	o0 = orientation(p0,p1,t);
-	if ( o0 == NEGATIVE ) {
-	  c = c->neighbor( 2 );
-	  continue;
-	}
-        o1 = POSITIVE;
-      } else if(c->neighbor(1) == prev){
-	prev = c;
-	o0 = orientation(p0,p1,t);
-	if ( o0 == NEGATIVE ) {
-	  c = c->neighbor( 2 );
-	  continue;
-	}
-	o1 = orientation(p1,p2,t);
-	if ( o1 == NEGATIVE ) {
-	  c = c->neighbor( 0 );
-	  continue;
-	}
-        o2 = POSITIVE;
-      } else {
-	prev = c;
-	o1 = orientation(p1,p2,t);
-	if ( o1 == NEGATIVE ) {
-	  c = c->neighbor( 0 );
-	  continue;
-	}
-	o2 = orientation(p2,p0,t);
-	if ( o2 == NEGATIVE ) {
-	  c = c->neighbor( 1 );
-	  continue;
-	}
-        o0 = POSITIVE;
-      }
-    }
-  
-    // now p is in c or on its boundary
-    int sum = ( o0 == COLLINEAR )
-      + ( o1 == COLLINEAR )
-      + ( o2 == COLLINEAR );
-    switch (sum) {
-    case 0:
-      {
-	lt = FACE;
-	li = 4;
-	break;
-      }
-    case 1:
-      {
-	lt = EDGE;
-	li = ( o0 == COLLINEAR ) ? 2 :
-	  ( o1 == COLLINEAR ) ? 0 :
-	  1;
-	break;
-      }
-    case 2:
-      {
-	lt = VERTEX;
-	li = ( o0 != COLLINEAR ) ? 2 :
-	  ( o1 != COLLINEAR ) ? 0 :
-	  1;
-	break;
-      }
-    }
-    return c;
-  }
-} 
-
-
-#else // not 1
-
-template <class Gt, class Tds >   typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-march_locate_2D(Face_handle c,
-		const Point& t,
-		Locate_type& lt,
-		int& li) const
-{
-  CGAL_triangulation_assertion(! is_infinite(c));
-
-  boost::uniform_smallint<> three(0, 2);
-  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die3(rng, three);  
-
-  Face_handle prev = Face_handle();
-  while (1) {
-    if ( is_infinite(c) ) {
-      // c must contain t in its interior
-      lt = OUTSIDE_CONVEX_HULL;
-      li = c->index(infinite_vertex());
-      return c;
-    }
-
-    // else c is finite
-    // we test its edges in a random order until we find a
-    // neighbor to go further
-
-    int i = die3();
-    int ccwi = ccw(i);
-    int cwi = cw(i);
-    const Point & p0 = c->vertex( i )->point();
-    const Point & p1 = c->vertex( ccwi )->point();
-    Orientation o0, o1, o2;
-    CGAL_triangulation_assertion(orientation(p0,p1,c->vertex( cwi )->point())==POSITIVE);
-    if(c->neighbor(cwi) == prev){
-      o0 = POSITIVE;
-    } else {
-      o0 = orientation(p0,p1,t);
-      if ( o0 == NEGATIVE ) {
-	prev = c;
-	c = c->neighbor( cwi );
-	continue;
-      }
-    }
-    const Point & p2 = c->vertex( cwi )->point();
-    if(c->neighbor(i) == prev){
-      o1 = POSITIVE;
-    } else {
-      o1 = orientation(p1,p2,t);
-      if ( o1 == NEGATIVE ) {
-	prev = c;
-	c = c->neighbor( i );
-	continue;
-      }
-    }
-    if(c->neighbor(ccwi) == prev){
-      o2 = POSITIVE;
-    } else {
-      o2 = orientation(p2,p0,t);
-      if ( o2 == NEGATIVE ) {
-	prev = c;
-	c = c->neighbor( ccwi );
-	continue;
-      }
-    }
-
-    // now p is in c or on its boundary
-    int sum = ( o0 == COLLINEAR )
-      + ( o1 == COLLINEAR )
-      + ( o2 == COLLINEAR );
-    switch (sum) {
-    case 0:
-      {
-	lt = FACE;
-	li = 4;
-	break;
-      }
-    case 1:
-      {
-	lt = EDGE;
-	li = ( o0 == COLLINEAR ) ? cwi :
-	  ( o1 == COLLINEAR ) ? i :
-	  ccwi;
-	break;
-      }
-    case 2:
-      {
-	lt = VERTEX;
-	li = ( o0 != COLLINEAR ) ? cwi :
-	  ( o1 != COLLINEAR ) ? i :
-	  ccwi;
-	break;
-      }
-    }
-    return c;
-  }
-}    
-
-
-#endif // not 1
-
-
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt,Tds>::
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-locate(const Point& p,
-       Locate_type& lt,
-       int& li,
-       Face_handle start) const
-#else // no CGAL_NO_STRUCTURAL_FILTERING
-exact_locate(const Point& p,
-       Locate_type& lt,
-       int& li,
-       Face_handle start) const
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-{
-  if (dimension() < 0) {
-      lt = OUTSIDE_AFFINE_HULL;
-      li = 4; // li should not be used in this case
-      return Face_handle();
-  }
-  if( dimension() == 0) {
-      // Do not use finite_vertex directly because there can be hidden vertices
-      // (regular triangulations)
-      if (xy_equal(p,finite_vertex()->face()->vertex(0)->point())){
-	lt = VERTEX ;
-      }
-      else{
-	lt = OUTSIDE_AFFINE_HULL;
-      }
-      li = 4; // li should not be used in this case
-      return Face_handle();
-  }
-  if(dimension() == 1){
-    return march_locate_1D(p, lt, li);
-  }
-
-  if(start == Face_handle()){
-    start = infinite_face()->
-      neighbor(infinite_face()->index(infinite_vertex()));
-  }else if(is_infinite(start)){
-    start = start->neighbor(start->index(infinite_vertex()));
-  }
-
-#if ( ! defined(CGAL_ZIG_ZAG_WALK)) && ( ! defined(CGAL_LFC_WALK))
-#define CGAL_ZIG_ZAG_WALK
-#endif
-
-#ifdef CGAL_ZIG_ZAG_WALK
-  Face_handle res1 = march_locate_2D(start, p, lt, li);
-#endif
-#ifdef CGAL_LFC_WALK
-  Locate_type lt2;
-  int li2;
-  Face_handle res2 = march_locate_2D_LFC(start, p, lt2, li2);
-#endif
-
-#if defined(CGAL_ZIG_ZAG_WALK) && defined(CGAL_LFC_WALK)
-  compare_walks(p,
-		res1, res2,
-		lt, lt2,
-		li, li2);
-#endif
-
-#ifdef CGAL_ZIG_ZAG_WALK
-  return res1;
-#endif
-
-#ifdef CGAL_LFC_WALK
-  lt = lt2;
-  li = li2;
-  return res2;
-#endif
-
-}
-
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>:: Face_handle
-Triangulation_2<Gt, Tds>::
-locate(const Point &p,
-       Face_handle start) const
-{
-  Locate_type lt;
-  int li;
-  return locate(p, lt, li, start);
-}
-#else
-template <class Gt, class Tds >
-inline 
-typename Triangulation_2<Gt, Tds>::Face_handle
-Triangulation_2<Gt, Tds>::
-inexact_locate(const Point & t, Face_handle start, int n_of_turns) const
-{
-  if(dimension() < 2) return start;
-	
-  if(start == Face_handle()){
-    start = infinite_face()->
-      neighbor(infinite_face()->index(infinite_vertex()));
-  } else if(is_infinite(start)){
-    start = start->neighbor(start->index(infinite_vertex()));
-  }
-
-  Face_handle prev = Face_handle(), c = start;
-  bool first = true;
-  while (1) {
-	
-    if(!(n_of_turns--)) return c;
-
-    if ( is_infinite(c) ) return c;
-    
-    const Point & p0 = c->vertex( 0 )->point();
-    const Point & p1 = c->vertex( 1 )->point();
-    const Point & p2 = c->vertex( 2 )->point();
-
-    if(first) {
-      prev = c;
-      first = false;
-      if(has_inexact_negative_orientation(p0,p1,t) ) {
-        c = c->neighbor( 2 );
-        continue;
-      }
-      if(has_inexact_negative_orientation(p1,p2,t) ) {
-        c = c->neighbor( 0 );
-        continue;
-      }
-      if (has_inexact_negative_orientation(p2,p0,t) ) {
-        c = c->neighbor( 1 );
-        continue;
-      }
-    } else {
-      if(c->neighbor(0) == prev){
-        prev = c;
-        if (has_inexact_negative_orientation(p0,p1,t) ) {
-          c = c->neighbor( 2 );
-          continue;
-        }
-        if (has_inexact_negative_orientation(p2,p0,t) ) {
-          c = c->neighbor( 1 );
-          continue;
-        }
-      } else if(c->neighbor(1) == prev){
-        prev = c;
-        if (has_inexact_negative_orientation(p0,p1,t) ) {
-          c = c->neighbor( 2 );
-          continue;
-        }
-        if (has_inexact_negative_orientation(p1,p2,t) ) {
-          c = c->neighbor( 0 );
-          continue;
-        }
-      } else {
-        prev = c;
-        if (has_inexact_negative_orientation(p2,p0,t) ) {
-          c = c->neighbor( 1 );
-          continue;
-        }
-        if (has_inexact_negative_orientation(p1,p2,t) ) {
-          c = c->neighbor( 0 );
-          continue;
-        }
-      }  
-    } 
-    break;
-  }
-  return c;
-}
-
-template <class Gt, class Tds >
-inline
-bool
-Triangulation_2<Gt, Tds>::
-has_inexact_negative_orientation(const Point &p, const Point &q,
-                    const Point &r) const
-{ 
-  // So that this code works well with Lazy_kernel
-  internal::Static_filters_predicates::Get_approx<Point> get_approx;
-
-  const double px = to_double(get_approx(p).x()); 
-  const double py = to_double(get_approx(p).y());
-  const double qx = to_double(get_approx(q).x());
-  const double qy = to_double(get_approx(q).y());
-  const double rx = to_double(get_approx(r).x());
-  const double ry = to_double(get_approx(r).y());
-
-  const double pqx = qx - px;
-  const double pqy = qy - py;
-  const double prx = rx - px;
-  const double pry = ry - py;
-
-  return ( determinant(pqx, pqy, prx, pry) < 0);
-}
-
-#endif
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_faces_iterator
-Triangulation_2<Gt, Tds>::
-finite_faces_begin() const
-{
-  if ( dimension() < 2 )
-    return finite_faces_end();
-  return CGAL::filter_iterator( all_faces_end(),
-                                Infinite_tester(this),
-                                all_faces_begin() );
-} 
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_faces_iterator
-Triangulation_2<Gt, Tds>::
-finite_faces_end() const
-{
-  return CGAL::filter_iterator(  all_faces_end(),
-                                 Infinite_tester(this)   );
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_vertices_iterator
-Triangulation_2<Gt, Tds>::
-finite_vertices_begin() const
-{
-  if ( number_of_vertices() <= 0 ) 
-    return finite_vertices_end();
-  return CGAL::filter_iterator( all_vertices_end(),
-                                Infinite_tester(this),
-                                all_vertices_begin() );
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_vertices_iterator
-Triangulation_2<Gt, Tds>::
-finite_vertices_end() const
-{
-  return CGAL::filter_iterator(all_vertices_end(),
-                               Infinite_tester(this)); 
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_edges_iterator
-Triangulation_2<Gt, Tds>::
-finite_edges_begin() const
-{
-  if ( dimension() < 1 )
-    return finite_edges_end();
-  return CGAL::filter_iterator( all_edges_end(),
-                                infinite_tester(),
-                                all_edges_begin());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Finite_edges_iterator
-Triangulation_2<Gt, Tds>::
-finite_edges_end() const
-{
-  return CGAL::filter_iterator(all_edges_end(),
-                               infinite_tester() );
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Point_iterator
-Triangulation_2<Gt, Tds>::
-points_begin() const
-{
-  return Point_iterator(finite_vertices_begin());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Point_iterator
-Triangulation_2<Gt, Tds>::
-points_end() const
-{
-  return Point_iterator(finite_vertices_end());
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_faces_iterator
-Triangulation_2<Gt, Tds>::
-all_faces_begin() const
-{
-  return _tds.faces_begin();
-} 
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_faces_iterator
-Triangulation_2<Gt, Tds>::
-all_faces_end() const
-{
-  return _tds.faces_end();;
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_vertices_iterator
-Triangulation_2<Gt, Tds>::
-all_vertices_begin() const
-{
-  return _tds.vertices_begin();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_vertices_iterator
-Triangulation_2<Gt, Tds>::
-all_vertices_end() const
-{
-  return _tds.vertices_end();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_edges_iterator
-Triangulation_2<Gt, Tds>::
-all_edges_begin() const
-{
-  return _tds.edges_begin();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_edges_iterator
-Triangulation_2<Gt, Tds>::
-all_edges_end() const
-{
-  return _tds.edges_end();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_halfedges_iterator
-Triangulation_2<Gt, Tds>::
-all_halfedges_begin() const
-{
-  return _tds.halfedges_begin();
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::All_halfedges_iterator
-Triangulation_2<Gt, Tds>::
-all_halfedges_end() const
-{
-  return _tds.halfedges_end();
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::Face_circulator
-Triangulation_2<Gt, Tds>::
-incident_faces(Vertex_handle v, Face_handle f) const
-{
-  return _tds.incident_faces(v,f);
-}  
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::Vertex_circulator
-Triangulation_2<Gt, Tds>::  
-incident_vertices(Vertex_handle v, Face_handle f) const
-{
-  return _tds.incident_vertices(v,f);
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::Edge_circulator
-Triangulation_2<Gt, Tds>::    
-incident_edges(Vertex_handle v, Face_handle f) const
-{
-  return _tds.incident_edges(v,f);
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::size_type
-Triangulation_2<Gt, Tds>::    
-degree(Vertex_handle v) const
-{
-  return _tds.degree(v);
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::Vertex_handle
-Triangulation_2<Gt, Tds>::    
-mirror_vertex(Face_handle f, int i) const
-{
-  return _tds.mirror_vertex(f,i);
-}
-
-template <class Gt, class Tds >
-inline
-int
-Triangulation_2<Gt, Tds>::    
-mirror_index(Face_handle f, int i) const
-{
-  return _tds.mirror_index(f,i);
-}
-
-template <class Gt, class Tds >
-inline
-typename Triangulation_2<Gt, Tds>::Edge
-Triangulation_2<Gt, Tds>::    
-mirror_edge(const Edge e) const
-{
-  return _tds.mirror_edge(e);
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Line_face_circulator  
-Triangulation_2<Gt, Tds>::    
-line_walk(const Point& p, const Point& q,  Face_handle f) const
-{
-  CGAL_triangulation_precondition( (dimension() == 2) && 
-				! xy_equal(p,q));
-  Line_face_circulator lfc = (f == Face_handle())
-    ? Line_face_circulator(p, q, this)
-    : Line_face_circulator(p, q, f, this);
-    
-  // the following lines may be useless :
-  //  Line_face_circulator(p,q...) returns either a null circulator 
-  //  or a pointer to a finite face (to be checked)
-  if( (!lfc.is_empty()) && is_infinite( lfc )){
-    do {      ++lfc ;} 
-    while (is_infinite(lfc));
-  }
-  return lfc;
-}
-   
-template <class Gt, class Tds >
-Oriented_side
-Triangulation_2<Gt, Tds>::
-oriented_side(const Point &p0, const Point &p1,
-	      const Point &p2, const Point &p) const
-{
-  // return position of point p with respect to the oriented triangle p0p1p2
-  // depends on the orientation of the vertices
-  Bounded_side bs=bounded_side(p0,p1,p2,p);
-  if (bs == ON_BOUNDARY) return ON_ORIENTED_BOUNDARY;
-  Orientation      ot = orientation(p0, p1, p2);
-  if (bs == ON_BOUNDED_SIDE)
-    return (ot == LEFT_TURN) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE;
-  // bs == ON_UNBOUNDED_SIDE
-  return (ot == LEFT_TURN) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE;
-}
-
-
-
-template <class Gt, class Tds >
-Bounded_side
-Triangulation_2<Gt, Tds>::
-bounded_side(const Point &p0, const Point &p1,
-	     const Point &p2, const Point &p) const
-{
-  // return position of point p with respect to triangle p0p1p2
-  CGAL_triangulation_precondition( orientation(p0, p1, p2) != COLLINEAR);
-  Orientation o1 = orientation(p0, p1, p),
-              o2 = orientation(p1, p2, p),
-              o3 = orientation(p2, p0, p);
-    
-  if (o1 == COLLINEAR){
-    if (o2 == COLLINEAR ||  o3 == COLLINEAR) return ON_BOUNDARY;
-    if (collinear_between(p0, p, p1))        return ON_BOUNDARY;
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  if (o2 == COLLINEAR){
-    if (o3 == COLLINEAR)                     return ON_BOUNDARY;
-    if (collinear_between(p1, p, p2))        return ON_BOUNDARY;
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  if (o3 == COLLINEAR){
-    if (collinear_between(p2, p, p0))        return ON_BOUNDARY;
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  // from here none ot, o1, o2 and o3 are known to be non null
-    if (o1 == o2 && o2 == o3)  return ON_BOUNDED_SIDE;
-    return ON_UNBOUNDED_SIDE;
-}
-
-
-template <class Gt, class Tds >
-Oriented_side
-Triangulation_2<Gt, Tds>::
-oriented_side(Face_handle f, const Point &p) const
-{
-  CGAL_triangulation_precondition ( dimension()==2); 
-  return oriented_side(f->vertex(0)->point(),
-		       f->vertex(1)->point(),
-		       f->vertex(2)->point(),
-		       p);
-}
-
-
-template <class Gt, class Tds >
-Oriented_side
-Triangulation_2<Gt, Tds>::
-side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2,
-	                const Point &p, bool perturb) const
-{
-  //CGAL_triangulation_precondition( orientation(p0, p1, p2) == POSITIVE );
-  // no reason for such precondition and it invalidates fast removal in Delaunay
-
-    typename Gt::Side_of_oriented_circle_2 pred = geom_traits().side_of_oriented_circle_2_object();
-    Oriented_side os =
-	pred(p0, p1, p2, p);
-    if ((os != ON_ORIENTED_BOUNDARY) || (! perturb))
-	return os;
-
-    // We are now in a degenerate case => we do a symbolic perturbation.
-
-    // We sort the points lexicographically.
-    const Point * points[4] = {&p0, &p1, &p2, &p};
-    std::sort(points, points+4, Perturbation_order(this) );
-
-    // We successively look whether the leading monomial, then 2nd monomial
-    // of the determinant has non null coefficient.
-    // 2 iterations are enough if p0p1p2 is positive (cf paper)
-    for (int i=3; i>0; --i) {
-        if (points[i] == &p)
-            return ON_NEGATIVE_SIDE; // since p0 p1 p2 are non collinear
-	                             // and "conceptually" positively oriented
-        Orientation o;
-        if (points[i] == &p2 && (o = orientation(p0,p1,p)) != COLLINEAR )
-            return Oriented_side(o);
-        if (points[i] == &p1 && (o = orientation(p0,p,p2)) != COLLINEAR )
-            return Oriented_side(o);
-        if (points[i] == &p0 && (o = orientation(p,p1,p2)) != COLLINEAR )
-            return Oriented_side(o);
-    }
-    // CGAL_triangulation_assertion(false);
-    //no reason for such precondition and it invalidates fast removal in Delaunay
-    return ON_NEGATIVE_SIDE;
-}
-
-
-
-
-
-
-template < class Gt, class Tds >
-Oriented_side
-Triangulation_2<Gt,Tds>::
-side_of_oriented_circle(Face_handle f, const Point & p, bool perturb) const
-{
-  if ( ! is_infinite(f) ) {
-    /*
-    typename Gt::Side_of_oriented_circle_2 
-      in_circle = geom_traits().side_of_oriented_circle_2_object();
-    return in_circle(f->vertex(0)->point(),
-		     f->vertex(1)->point(),
-		     f->vertex(2)->point(),p);
-    */
-    return this->side_of_oriented_circle(f->vertex(0)->point(),
-		     f->vertex(1)->point(),
-		     f->vertex(2)->point(),p, perturb);
-  }
-
-  int i = f->index(infinite_vertex());
-  Orientation o = orientation(f->vertex(ccw(i))->point(),
-			      f->vertex(cw(i))->point(),
-			      p);
-  return (o == NEGATIVE) ? ON_NEGATIVE_SIDE :
-                (o == POSITIVE) ? ON_POSITIVE_SIDE :
-                      ON_ORIENTED_BOUNDARY;
-}
-
-
-
-template <class Gt, class Tds >
-bool
-Triangulation_2<Gt, Tds>::
-collinear_between(const Point& p, const Point& q, const Point& r) const
-{
-  // return true if point q is strictly between p and r
-  // p,q and r are supposed to be collinear points
-  Comparison_result c_pr = compare_x(p, r);
-  Comparison_result c_pq;
-  Comparison_result c_qr;
-  if(c_pr == EQUAL) {
-    //c_pr = compare_y(p, r);
-    c_pq = compare_y(p, q);
-    c_qr = compare_y(q, r);
-  } else {
-    c_pq = compare_x(p, q);
-    c_qr = compare_x(q, r);
-  }
-  return ( (c_pq == SMALLER) && (c_qr == SMALLER) ) ||
-         ( (c_pq == LARGER)  && (c_qr == LARGER) );
-    
-}
-
-template <class Gt, class Tds >
-inline
-Comparison_result
-Triangulation_2<Gt, Tds>::
-compare_x(const Point& p, const Point& q) const
-{
-  return geom_traits().compare_x_2_object()(p,q);
-}
-
-template <class Gt, class Tds >
-inline
-Comparison_result
-Triangulation_2<Gt, Tds>::
-compare_xy(const Point& p, const Point& q) const
-{
-  Comparison_result res = geom_traits().compare_x_2_object()(p,q);
-  if(res == EQUAL){
-    return geom_traits().compare_y_2_object()(p,q);
-  }
-  return res;
-}
-
-template <class Gt, class Tds >
-inline
-Comparison_result
-Triangulation_2<Gt, Tds>::
-compare_y(const Point& p, const Point& q) const
-{
-  return geom_traits().compare_y_2_object()(p,q);
-}
-
-template <class Gt, class Tds >
-inline
-bool
-Triangulation_2<Gt, Tds>::
-xy_equal(const Point& p, const Point& q) const
-{
-  return compare_x(p,q)== EQUAL && compare_y(p,q)== EQUAL ;
-}
-
-template <class Gt, class Tds >
-inline
-Orientation
-Triangulation_2<Gt, Tds>::
-orientation(const Point& p, const Point& q,const Point& r ) const
-{
-  return geom_traits().orientation_2_object()(p,q,r);
-}
-
-template<class Gt, class Tds>
-inline
-typename Triangulation_2<Gt,Tds>::Point
-Triangulation_2<Gt,Tds>::
-circumcenter (const Point& p0, const Point& p1, const Point&  p2) const
-{
-  return 
-    geom_traits().construct_circumcenter_2_object()(p0,p1,p2);
-}
-
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Point
-Triangulation_2<Gt, Tds>::
-circumcenter(Face_handle  f) const
-{
-  CGAL_triangulation_precondition (dimension()==2);
-  // typename Gt::Construct_circumcenter_2
-//     circumcenter = geom_traits().construct_circumcenter_2_object();
-  return circumcenter((f->vertex(0))->point(), 
-		      (f->vertex(1))->point(), 
-		      (f->vertex(2))->point());
-}
-
- 
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-show_all() const
-{
-  std::cerr<< "AFFICHE TOUTE LA TRIANGULATION :"<<std::endl;
-  std::cerr << std::endl<<"====> "<< this; 
-  std::cerr <<  " dimension " <<  dimension() << std::endl;
-  std::cerr << "nb of vertices " << number_of_vertices() << std::endl;
-    
-  if (dimension() < 1) return;
-  if(dimension() == 1) {
-    std::cerr<<" all edges "<<std::endl; 
-    All_edges_iterator aeit;
-    for(aeit = all_edges_begin(); aeit != all_edges_end(); aeit++){
-      show_face(aeit->first);
-    }
-    return;
-  }
-
-  std::cerr<<" faces finies "<<std::endl;
-  Finite_faces_iterator fi;
-  for(fi = finite_faces_begin(); fi != finite_faces_end(); fi++) {
-    show_face(fi);
-  }
-
-  std::cerr <<" faces infinies "<<std::endl;
-  All_faces_iterator afi;
-  for(afi = all_faces_begin(); afi != all_faces_end(); afi++) {
-    if(is_infinite(afi)) show_face(afi);
-  }
-  
-  if (number_of_vertices()>1) {
-    std::cerr << "affichage des sommets de la triangulation reguliere"
-	      <<std::endl;
-    All_vertices_iterator vi;
-    for( vi = all_vertices_begin(); vi != all_vertices_end(); vi++){
-      show_vertex(vi);
-      std::cerr << "  / face associee : "
-	     << (void*)(&(*(vi->face())))<< std::endl;;
-      }
-      std::cerr<<std::endl;
-  }
-  return;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-show_vertex(Vertex_handle vh) const
-{
-  if(is_infinite(vh)) std::cerr << "inf \t";
-  else std::cerr << vh->point() << "\t";
-  return;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-show_face(Face_handle fh) const
-{
-  std::cerr << "face : "<<(void*)&(*fh)<<" => "<<std::endl;
-  int i = fh->dimension(); 
-  switch(i){
-  case 0:
-    std::cerr <<"point :" ; show_vertex(fh->vertex(0));
-    std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
-    std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
-    std::cerr <<"]"  << std::endl;
-    break;
-  case 1:
-     std::cerr <<"point :" ; show_vertex(fh->vertex(0));
-     std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
-     std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
-     std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1));
-     std::cerr <<"]" <<std::endl;
-
-     std::cerr <<"point :" ; show_vertex(fh->vertex(1));
-     std::cerr <<" / voisin " << &(*(fh->neighbor(1)));
-     std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0));
-     std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1));
-     std::cerr <<"]" <<std::endl;
-     break;
-  case 2:
-    std::cerr <<"point :" ; show_vertex(fh->vertex(0));
-    std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
-    std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(2));
-    std::cerr <<"]" <<std::endl;
-
-    std::cerr <<"point :" ; show_vertex(fh->vertex(1));
-    std::cerr <<" / voisin " << &(*(fh->neighbor(1)));
-    std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(2));
-    std::cerr <<"]" <<std::endl;
-
-    std::cerr <<"point :" ; show_vertex(fh->vertex(2));
-    std::cerr <<" / voisin " << &(*(fh->neighbor(2)));
-    std::cerr <<"[" ; show_vertex(fh->neighbor(2)->vertex(0));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(1));
-    std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(2));
-    std::cerr <<"]" <<std::endl;
-    break;
-  }
-  return;
-}
-
-template <class Gt, class Tds >
-void
-Triangulation_2<Gt, Tds>::
-file_output(std::ostream& os) const
-{
-  _tds.file_output(os, infinite_vertex(), true);
-}
-
-template <class Gt, class Tds >
-typename Triangulation_2<Gt, Tds>::Vertex_handle
-Triangulation_2<Gt, Tds>::
-file_input(std::istream& is)
-{
-  clear();
-  Vertex_handle v= _tds.file_input(is, true);
-  set_infinite_vertex(v);
-  return v;
-}
-
-template <class Gt, class Tds >
-std::ostream&
-operator<<(std::ostream& os, const Triangulation_2<Gt, Tds> &tr)
-{
-  tr.file_output(os);
-  return os ;
-}
-
-
-
-template < class Gt, class Tds >
-std::istream&
-operator>>(std::istream& is, Triangulation_2<Gt, Tds> &tr)
-{
-  tr.file_input(is);
-  CGAL_triangulation_assertion(tr.is_valid());
-  return is;
-}
- 
-} //namespace CGAL
-    
-
-#endif //CGAL_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_filtered_projection_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_filtered_projection_traits_3.h
deleted file mode 100644
index 1316192..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_filtered_projection_traits_3.h
+++ /dev/null
@@ -1,91 +0,0 @@
- // Copyright (c) 2009  GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-
-#ifndef CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
-#define CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
-
-#include <CGAL/Triangulation_2_projection_traits_3.h>
-#include <CGAL/Filtered_predicate.h>
-
-namespace CGAL {
-
-template < class Filtered_kernel >
-class Triangulation_2_filtered_projection_traits_3
-  : public Triangulation_2_projection_traits_3<Filtered_kernel>
-{
-  typedef Filtered_kernel K;
-  typedef Triangulation_2_filtered_projection_traits_3<K> Self;
-  typedef Triangulation_2_projection_traits_3<K> Base;
-
-  typedef typename K::Exact_kernel Exact_kernel;
-  typedef typename K::Approximate_kernel Approximate_kernel;
-  typedef typename K::C2E C2E;
-  typedef typename K::C2F C2F;
-
-public:
-  typedef Triangulation_2_projection_traits_3<Exact_kernel> Exact_traits;
-  typedef Triangulation_2_projection_traits_3<Approximate_kernel> Filtering_traits;
-
-public:
-  Triangulation_2_filtered_projection_traits_3(const typename K::Vector_3& n)
-    : Base(n)
-  {
-  }
-
-  Triangulation_2_filtered_projection_traits_3(const Self& other)
-    : Base(other)
-  {
-    CGAL_PROFILER("Copy of the filtered traits")
-    CGAL_TIME_PROFILER("Copy of the filtered traits")
-//     std::cerr << "Copy of the filtered traits.\n";
-  }
-
-  Self& operator=(const Self& other)
-  {
-    std::cerr << "Assignement of the filtered traits.\n";
-    if(this != &other) {
-      Base::operator=(other);
-    }
-    return *this;
-  }
-
-#define CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(P, Pf, obj)    \
-  typedef  Filtered_predicate< \
-    typename Exact_traits::P, \
-    typename Filtering_traits::P, \
-    C2E, \
-    C2F > P; \
-  P Pf() const { \
-    return P(this->normal()); \
-  }
-  // std::cerr << #P << "_object()\n";
-  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Orientation_2,
-                                               orientation_2_object,
-                                               orientation)
-  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Side_of_oriented_circle_2,
-                                               side_of_oriented_circle_2_object,
-                                               side_of_oriented_circle)
-}; // end class Triangulation_2_projection_traits_3<Filtered_kernel>
-
-} // end namespace CGAL
-
-
-#endif // CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_projection_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_projection_traits_3.h
deleted file mode 100644
index 05d4c04..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_projection_traits_3.h
+++ /dev/null
@@ -1,444 +0,0 @@
-// Copyright (c) 2009  GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-
-#ifndef CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
-#define CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
-
-#include <CGAL/Profile_timer.h>
-#include <CGAL/intersections.h>
-
-namespace CGAL {
-
-namespace TriangulationProjectionTraitsCartesianFunctors {
-
-template <class Traits>
-class Projected_orientation_with_normal_3
-{
-  // private members
-  const typename Traits::Vector_3 normal;
-
-  // private type aliases
-  typedef typename Traits::K K;
-  typedef typename Traits::Point_2 Point;
-  typedef typename Traits::Vector_3 Vector_3;
-public:
-  typedef typename K::Orientation Orientation;
-  typedef Orientation result_type;
-
-  Projected_orientation_with_normal_3(const Vector_3& normal_)
-    : normal(normal_)
-  {
-    CGAL_PROFILER("Construct Projected_orientation_with_normal_3.")
-    CGAL_TIME_PROFILER("Construct Projected_orientation_with_normal_3")
-  }
-
-  Orientation operator()(const Point& p,
-			 const Point& q,
-			 const Point& r) const
-  {    
-    CGAL_PROFILER("Projected_orientation_with_normal_3::operator()");
-    CGAL_TIME_PROFILER("Projected_orientation_with_normal_3::operator()");
-    return orientation(q-p, r-p, normal);
-  }
-}; // end class Projected_orientation_with_normal_3<Traits>
-
-template <class Traits>
-class Projected_side_of_oriented_circle_with_normal_3
-{
-  // private members
-  const typename Traits::Vector_3 normal;
-
-  // private types aliases
-  typedef typename Traits::K K;
-  typedef typename Traits::Point_2 Point;
-  typedef typename Traits::Vector_3 Vector_3;
-  typedef typename Traits::FT FT;
-
-  typedef Projected_side_of_oriented_circle_with_normal_3<Traits> Self;
-
-public:
-  typedef typename K::Oriented_side Oriented_side;
-  typedef Oriented_side result_type;
-
-  Projected_side_of_oriented_circle_with_normal_3(const Vector_3& normal_)
-    : normal(normal_)
-  {
-    CGAL_PROFILER("Construct Projected_side_of_oriented_circle_with_normal_3.")
-    CGAL_TIME_PROFILER("Construct Projected_side_of_oriented_circle_with_normal_3.")
-//     std::cerr << "Projected_side_of_oriented_circle_with_normal_3(" << normal_ << ")\n";
-  }
-
-  Projected_side_of_oriented_circle_with_normal_3(const Self& other)
-    : normal(other.normal)
-  {
-    CGAL_PROFILER("Copy Projected_side_of_oriented_circle_with_normal_3::operator()")
-    CGAL_TIME_PROFILER("Copy Projected_side_of_oriented_circle_with_normal_3::operator()")
-  }
-
-  Oriented_side operator()(const Point& p,
-			   const Point& q,
-			   const Point& r,
-			   const Point& t) const
-  {
-    CGAL_PROFILER("Projected_side_of_oriented_circle_with_normal_3::operator()")
-    CGAL_TIME_PROFILER("Projected_side_of_oriented_circle_with_normal_3::operator()")
-    const Vector_3& u = normal;
-//     std::cerr << "Projected_side_of_oriented_circle_with_normal_3::operator(). Normal=" << normal << ")\n";
-
-    const Vector_3 tp = p - t;
-    const Vector_3 tq = q - t;
-    const Vector_3 tr = r - t;
-
-    const FT tp2 = tp * tp;
-    const FT tq2 = tq * tq;
-    const FT tr2 = tr * tr;
-    const FT u2  =  u * u;
-
-    const FT k_p = tp * u;
-    const FT k_q = tq * u;
-    const FT k_r = tr * u;
-
-    return 
-       sign_of_determinant(tp.x(), tp.y(), tp.z(), (tp2 + k_p) * u2 - k_p * k_p,
-			   tr.x(), tr.y(), tr.z(), (tr2 + k_r) * u2 - k_r * k_r,
-			   tq.x(), tq.y(), tq.z(), (tq2 + k_q) * u2 - k_q * k_q,
-                           u.x(),  u.y(),  u.z(), u2 * u2);
-    // Note that q and r have been swapped in the determinant above, to
-    // inverse its sign.
-  }
-}; // end class Projected_side_of_oriented_circle_with_normal_3
-
-template <class Traits>
-class Projected_squared_distance_with_normal_3
-{
-  // private members
-  const typename Traits::Vector_3 normal;
-  
-  // private types aliases
-  typedef typename Traits::K K;
-  typedef typename Traits::Point_2 Point;
-  typedef typename Traits::Line_2 Line;
-  typedef typename Traits::Vector_3 Vector_3;
-  typedef typename Traits::FT FT;
-
-public:
-  Projected_squared_distance_with_normal_3(const Vector_3& normal_)
-    : normal(normal_)
-  {
-    CGAL_PROFILER("Construct Projected_squared_distance_with_normal_3.")
-    CGAL_TIME_PROFILER("Construct Projected_squared_distance_with_normal_3")
-  }
-
-  FT operator()(const Point& p, const Point& q)
-  {
-    return squared_distance(p, q);
-  }
-
-  FT operator()(const Line& line, const Point& p)
-  {
-    CGAL_PROFILER("Projected_squared_distance_with_normal_3::operator()")
-    CGAL_TIME_PROFILER("Projected_squared_distance_with_normal_3::operator()")
-    const Vector_3& vl = line.to_vector();
-    const Point& pl = line.point();
-    const Vector_3 v = cross_product(normal,
-                                     vl);
-    if(v == NULL_VECTOR) {
-      // den == 0 if the line is vertical
-      // In that case, the distance is the distance to the line
-      const Vector_3 w = cross_product(pl - p,
-                                       vl);
-      return (w * w) / (vl * vl);
-    }
-    else {
-      const FT det = determinant(normal, 
-                                 vl, 
-                                 pl - p);
-      return (det * det) / ( v * v );
-    }
-  }
-}; // end class Projected_squared_distance_with_normal_3
-
-template <class Traits>
-class Projected_intersect_3
-{
-  // private members
-  const typename Traits::Vector_3 normal;
-  
-  // private types aliases
-  typedef typename Traits::K K;
-  typedef typename Traits::Point_2 Point;
-  typedef typename Traits::Line_2 Line;
-  typedef typename Traits::Segment_2 Segment;
-  typedef typename K::Plane_3 Plane_3;
-  typedef typename Traits::Vector_3 Vector_3;
-  typedef typename Traits::FT FT;
-public:
-  Projected_intersect_3(const Vector_3& normal_)
-    : normal(normal_)
-  {
-    CGAL_PROFILER("Construct Projected_intersect_3")
-    CGAL_TIME_PROFILER("Construct Projected_intersect_3")
-  }
-
-  Object operator()(const Segment& s1, const Segment& s2)
-  {
-    CGAL_PROFILER("Projected_intersect_3::operator()")
-    CGAL_TIME_PROFILER("Projected_intersect_3::operator()")
-    const Vector_3 u1 = cross_product(s1.to_vector(), normal);
-    if(u1 == NULL_VECTOR)
-      return K().intersect_3_object()(s1.supporting_line(), s2);
-
-    const Vector_3 u2 = cross_product(s2.to_vector(), normal);
-    if(u2 == NULL_VECTOR)
-      return K().intersect_3_object()(s1, s2.supporting_line());
-    
-    const Plane_3 plane_1(s1.source(), u1);
-    const Plane_3 plane_2(s2.source(), u2);
-    
-    Object planes_intersection = intersection(plane_1, plane_2);
-    if(planes_intersection.empty()) {
-      std::cerr << "planes_intersection is empty\n";
-      return planes_intersection;
-    }
-    if(const Line* line = object_cast<Line>(&planes_intersection))
-    {
-      const Point& pi = line->point(0);
-      if(cross_product(normal, pi - s1.source())
-         * cross_product(normal, pi - s1.target()) > FT(0)
-         ||
-         cross_product(normal, pi - s2.source())
-         * cross_product(normal, pi - s2.target()) > FT(0) )
-      {
-        // the intersection of the lines is not inside the segments
-        std::cerr << "intersection not inside\n";
-        return Object();
-      }
-      else
-      {
-        // Let the plane passing through s1.source() and with normal
-        // the cross product of s1.to_vector() and s2.to_vector(). That
-        // plane should intersect *l, now.
-        return intersection(*line, Plane_3(s1.source(), 
-                                           cross_product(s1.to_vector(),
-                                                         s2.to_vector())));
-      }
-    }
-    if(object_cast<Plane_3>(&planes_intersection))
-    {
-      std::cerr << "coplanar lines\n";
-      CGAL_error();
-      return Object();
-    }
-    return Object();
-  }
-}; // end class Projected_intersect_3
-
-} // end namespace TriangulationProjectionTraitsCartesianFunctors
-
-
-template < class Kernel >
-class Triangulation_2_projection_traits_3
-{
-  typedef Triangulation_2_projection_traits_3<Kernel> Self;
-
-  typename Kernel::Vector_3 n;
-
-public:
-  typedef typename Kernel::Vector_3 Vector_3;
-
-
-  Triangulation_2_projection_traits_3(const Vector_3& n_)
-    : n(n_)
-  {}
-
-  Triangulation_2_projection_traits_3(const Self& other)
-    : n(other.n)
-  {
-//     std::cerr << "Copy of a traits. Type="
-//               << typeid(*this).name() << std::endl
-//               << "normal=" << normal() << std::endl;
-  }
-
-  const Vector_3& normal() const
-  {
-//     std::cerr << "normal=" << n << std::endl;
-    return n;
-  }
-
-  Self& operator=(const Self& other)
-  {
-    std::cerr << "Assign of a non-filtrered projected traits. Type="
-              << typeid(*this).name() << std::endl;
-    if(this != &other) {
-      n = other.n;
-    }
-    std::cerr << "Normal="<< this->normal() << std::endl;
-    return *this;
-  }
-
-  typedef Kernel K;
-  typedef typename K::FT          FT;
-  typedef typename K::Point_3     Point_2;
-  typedef typename K::Segment_3   Segment_2;
-  typedef typename K::Vector_3    Vector_2;
-  typedef typename K::Triangle_3  Triangle_2;
-  typedef typename K::Line_3      Line_2;
-
-  // Maybe not a good choice
-  typedef typename K::Less_xy_3            Less_x_2;
-  typedef typename K::Less_z_3             Less_y_2;
-
-  typedef typename K::Compare_xy_3                           Compare_x_2;
-  typedef typename K::Compare_z_3                            Compare_y_2;
-
-  typedef typename K::Angle_3                                Angle_2;
-
-  typedef TriangulationProjectionTraitsCartesianFunctors::
-    Projected_orientation_with_normal_3<Self>                Orientation_2;
-
-  typedef TriangulationProjectionTraitsCartesianFunctors::
-    Projected_side_of_oriented_circle_with_normal_3<Self>    Side_of_oriented_circle_2;
-
-  typedef TriangulationProjectionTraitsCartesianFunctors::
-  Projected_squared_distance_with_normal_3<Self>             Compute_squared_distance_2;
-
-  typedef TriangulationProjectionTraitsCartesianFunctors::
-  Projected_intersect_3<Self>                                Intersect_2;
-
-  typedef typename K::Construct_segment_3  Construct_segment_2;
-  typedef typename K::Construct_vector_3   Construct_vector_2;
-  typedef typename K::Construct_line_3     Construct_line_2;
-  typedef typename K::Construct_triangle_3 Construct_triangle_2;
-
-  typedef typename K::Construct_scaled_vector_3     Construct_scaled_vector_2;
-  typedef typename K::Construct_translated_point_3  Construct_translated_point_2;
-  typedef typename K::Construct_midpoint_3          Construct_midpoint_2;
-  typedef typename K::Construct_circumcenter_3      Construct_circumcenter_2;
-
-  typedef typename K::Compute_area_3                Compute_area_2;
-
-  Less_x_2
-  less_x_2_object() const
-    { return Less_x_2();}
-
-  Less_y_2
-  less_y_2_object() const
-    { return Less_y_2();}
-
-  Compare_x_2
-  compare_x_2_object() const
-  {
-    return Compare_x_2();
-  }
-
-  Compare_y_2
-  compare_y_2_object() const
-  { 
-    return Compare_y_2();
-  }
-
-  Orientation_2 
-  orientation_2_object() const
-  {
-    return Orientation_2(this->normal()); 
-  }
-
-  Side_of_oriented_circle_2
-  side_of_oriented_circle_2_object() const
-  {
-    return Side_of_oriented_circle_2(this->normal());
-  }
-  
-  Compute_squared_distance_2
-  compute_squared_distance_2_object() const
-  {
-    return Compute_squared_distance_2(this->normal());
-  }
-  
-  Intersect_2
-  intersect_2_object () const
-  {
-    return Intersect_2(this->normal());
-  }
-
-  Angle_2  angle_2_object() const
-    {return Angle_2();}
-
-  Construct_segment_2  construct_segment_2_object() const
-    {return Construct_segment_2();}
-  
-  Construct_vector_2  construct_vector_2_object() const
-    {return Construct_vector_2();}
-
-  Construct_scaled_vector_2  construct_scaled_vector_2_object() const
-    {return Construct_scaled_vector_2();}
-
-  Construct_midpoint_2  construct_midpoint_2_object() const
-    {return Construct_midpoint_2();}
-
-  Construct_circumcenter_2  construct_circumcenter_2_object() const
-    {return Construct_circumcenter_2();}
-
-  Construct_translated_point_2  construct_translated_point_2_object() const
-    {return Construct_translated_point_2();}
-
-  Construct_line_2  construct_line_2_object() const
-    {return Construct_line_2();}
-  
-  Construct_triangle_2  construct_triangle_2_object() const
-    {return Construct_triangle_2();}
-
-  Compute_area_2 compute_area_2_object() const
-  {return Compute_area_2();}
-    
-
-
-  // Special functor, not in the Kernel concept
-  class Projection_to_plan {
-    // Remeber: Point_2 is K::Point_3
-    const Point_2& plane_point;
-    const Vector_3& normal;
-  public:
-    // Return the projection of a point to a plane passing through 
-    // the point 'plane_point' and with orthogonal vector normal().
-    Projection_to_plan(const Point_2& plane_point_, const Self& self)
-      : plane_point(plane_point_),
-        normal(self.normal())
-    {}
-
-    Point_2 operator()(const Point_2& point) const 
-    {
-      return point +
-        ( ( (plane_point - point) * normal ) / (normal * normal) ) * normal;
-    }
-  }; // end Projection_to_plan
-
-  Projection_to_plan projection_to_plan_object(const Point_2& plane_point) const
-  {
-    return Projection_to_plan(plane_point, *this);
-  }
-
-}; // end class Triangulation_2_projection_traits_3<Kernel>
-  
-
-} // end namespace CGAL
-
-#endif // CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_3.h
deleted file mode 100644
index 60781d3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_3.h
+++ /dev/null
@@ -1,6684 +0,0 @@
-// Copyright (c) 1999-2003  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion
-//                 Clement Jamin
-
-#ifndef CGAL_TRIANGULATION_3_H
-#define CGAL_TRIANGULATION_3_H
-
-#include <CGAL/basic.h>
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-# define CGAL_PROFILE
-# include <CGAL/Profile_counter.h>
-#endif
-
-#include <iostream>
-#include <list>
-#include <set>
-#include <map>
-#include <utility>
-#include <stack>
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Triangulation_utils_3.h>
-
-#include <CGAL/Triangulation_data_structure_3.h>
-#include <CGAL/Triangulation_cell_base_3.h>
-#include <CGAL/Triangulation_vertex_base_3.h>
-
-#include <CGAL/spatial_sort.h>
-
-#include <CGAL/iterator.h>
-#include <CGAL/function_objects.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Default.h>
-
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Spatial_lock_grid_3.h>
-
-#include <boost/bind.hpp>
-#include <boost/random/linear_congruential.hpp>
-#include <boost/random/uniform_smallint.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <boost/mpl/if.hpp>
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-#include <CGAL/Triangulation_structural_filtering_traits.h>
-#include <CGAL/determinant.h>
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-#ifdef CGAL_LINKED_WITH_TBB
-# include <tbb/scalable_allocator.h>
-#endif
-
-#define CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
-
-namespace CGAL {
-
-template < class GT, class Tds = Default,
-           class Lock_data_structure = Default >
-class Triangulation_3;
-
-template < class GT, class Tds, class Lds > std::istream& operator>>
-(std::istream& is, Triangulation_3<GT,Tds,Lds> &tr);
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-namespace internal {
-// structural filtering is performed only for EPIC
-struct Structural_filtering_3_tag {};
-struct No_structural_filtering_3_tag {};
-
-template <bool filter>
-struct Structural_filtering_selector_3 {
-#ifdef FORCE_STRUCTURAL_FILTERING
-  typedef Structural_filtering_3_tag  Tag;
-#else
-  typedef No_structural_filtering_3_tag  Tag;
-#endif
-};
-
-template <>
-struct Structural_filtering_selector_3<true> {
-  typedef Structural_filtering_3_tag  Tag;
-};
-}
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-/************************************************
-// Class Triangulation_3_base
-// Two versions: Sequential (no locking) / Parallel (with locking)
-************************************************/
-
-// Sequential (without locking)
-template <typename Concurrency_tag, typename Lock_data_structure_>
-class Triangulation_3_base
-{
-public:
-  // If Lock_data_structure_ = Default => void
-  typedef typename Default::Get<
-    Lock_data_structure_, void>::type Lock_data_structure;
-
-protected:
-  Triangulation_3_base()  {}
-
-  Triangulation_3_base(Lock_data_structure *) {}
-
-  void swap(Triangulation_3_base<Concurrency_tag, Lock_data_structure_> &){}
-
-  template <typename Vertex_triple, typename Facet>
-  struct Vertex_triple_Facet_map_generator
-  {
-    typedef std::map<Vertex_triple, Facet> type;
-  };
-
-  template <typename Vertex_handle>
-  struct Vertex_handle_unique_hash_map_generator
-  {
-    typedef Unique_hash_map<Vertex_handle,
-                            Vertex_handle,
-                            Handle_hash_function> type;
-  };
-
-public:
-  bool is_parallel() const
-  {
-    return false;
-  }
-
-  // LOCKS (no-op functions)
-
-  template <typename Point_3>
-  bool try_lock_point(const Point_3 &, int = 0) const
-  { return true; }
-
-  template <typename Vertex_handle>
-  bool try_lock_vertex(const Vertex_handle &, int = 0) const
-  { return true; }
-
-  template <typename Cell_handle>
-  bool try_lock_cell(const Cell_handle &, int = 0) const
-  { return true; }
-
-  template <typename Facet>
-  bool try_lock_facet(const Facet &, int = 0) const
-  { return true; }
-
-  template <typename P3>
-  bool is_point_locked_by_this_thread(const P3 &) const
-  { return false; }
-
-  template <typename Cell_handle>
-  bool is_cell_locked_by_this_thread(const Cell_handle &) const
-  { return false; }
-
-  void *get_lock_data_structure() const
-  {
-    return 0;
-  }
-
-  void set_lock_data_structure(void *) const
-  {
-  }
-
-  void unlock_all_elements() const {}
-  template <typename P3> void unlock_all_elements_but_one_point(const P3 &) const {}
-
-  const Bbox_3 *get_bbox() const
-  {
-    return NULL;
-  }
-};
-
-#ifdef CGAL_LINKED_WITH_TBB
-// Parallel (with locking)
-template <typename Lock_data_structure_>
-class Triangulation_3_base<Parallel_tag, Lock_data_structure_>
-{
-public:
-  // If Lock_data_structure_ = Default => use Spatial_lock_grid_3
-  typedef typename Default::Get<
-    Lock_data_structure_, Spatial_lock_grid_3<Tag_priority_blocking> >
-    ::type Lock_data_structure;
-
-protected:
-  Triangulation_3_base()
-    : m_lock_ds(0) {}
-
-  Triangulation_3_base(Lock_data_structure *lock_ds)
-    : m_lock_ds(lock_ds) {}
-
-  void swap(Triangulation_3_base<Parallel_tag, Lock_data_structure_> &tr)
-  {
-    std::swap(tr.m_lock_ds, m_lock_ds);
-  }
-
-  template <typename Vertex_triple, typename Facet>
-  struct Vertex_triple_Facet_map_generator
-  {
-    typedef std::map
-    <
-      Vertex_triple,
-      Facet,
-      std::less<Vertex_triple>,
-      tbb::scalable_allocator<std::pair<const Vertex_triple, Facet> >
-    > type;
-  };
-
-  template <typename Vertex_handle>
-  struct Vertex_handle_unique_hash_map_generator
-  {
-    typedef Unique_hash_map<Vertex_handle,
-                            Vertex_handle,
-                            Handle_hash_function,
-                            tbb::scalable_allocator<Vertex_handle> > type;
-  };
-
-public:
-
-  bool is_parallel() const
-  {
-    return m_lock_ds != 0;
-  }
-
-  // LOCKS
-  template <typename Point_3>
-  bool try_lock_point(const Point_3 &p, int lock_radius = 0) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      locked = m_lock_ds->try_lock(p, lock_radius);
-    }
-    return locked;
-  }
-
-  template <typename Vertex_handle>
-  bool try_lock_vertex(const Vertex_handle &vh, int lock_radius = 0) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      locked = m_lock_ds->try_lock(vh->point(), lock_radius);
-    }
-    return locked;
-  }
-
-  template <typename Cell_handle>
-  bool try_lock_cell(const Cell_handle &cell_handle, int lock_radius = 0) const
-  {
-    bool success = true;
-    // Lock the element area on the grid
-    for (int iVertex = 0 ; success && iVertex < 4 ; ++iVertex)
-    {
-      success = try_lock_vertex(cell_handle->vertex(iVertex), lock_radius);
-    }
-    return success;
-  }
-
-  template <typename Facet>
-  bool try_lock_facet(const Facet &facet, int lock_radius = 0) const
-  {
-    bool success = true;
-
-    // Lock the element area on the grid
-    for (int iVertex = (facet.second+1)&3 ;
-          success && iVertex != facet.second ; iVertex = (iVertex+1)&3)
-    {
-      success = try_lock_vertex(facet.first->vertex(iVertex), lock_radius);
-    }
-
-    return success;
-  }
-
-  template <typename P3>
-  bool is_point_locked_by_this_thread(const P3 &p) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      locked = m_lock_ds->is_locked_by_this_thread(p);
-    }
-    return locked;
-  }
-
-  template <typename Cell_handle>
-  bool is_cell_locked_by_this_thread(const Cell_handle &cell_handle) const
-  {
-    bool locked = true;
-    if (m_lock_ds)
-    {
-      for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
-      {
-        locked = m_lock_ds->is_locked_by_this_thread(
-          cell_handle->vertex(iVertex)->point());
-      }
-    }
-    return locked;
-  }
-
-  Lock_data_structure *get_lock_data_structure() const
-  {
-    return m_lock_ds;
-  }
-
-  void set_lock_data_structure(Lock_data_structure *lock_ds) const
-  {
-    m_lock_ds = lock_ds;
-  }
-
-  void unlock_all_elements() const
-  {
-    if (m_lock_ds)
-      m_lock_ds->unlock_all_points_locked_by_this_thread();
-  }
-
-  template <typename P3>
-  void unlock_all_elements_but_one_point(const P3 &point) const
-  {
-    if (m_lock_ds)
-      m_lock_ds->unlock_all_tls_locked_locations_but_one_point(point);
-  }
-
-  const Bbox_3 *get_bbox() const
-  {
-    return &m_lock_ds->get_bbox();
-  }
-
-protected:
-  mutable Lock_data_structure *m_lock_ds;
-};
-#endif // CGAL_LINKED_WITH_TBB
-
-/************************************************
- *
- * Triangulation_3 class
- *
- ************************************************/
-
-template < class GT, class Tds_, class Lock_data_structure_ >
-class Triangulation_3
-  : public Triangulation_3_base<
-      // Get Concurrency_tag from TDS
-      typename Default::Get< Tds_,
-                             Triangulation_data_structure_3
-                             <
-                               Triangulation_vertex_base_3<GT>,
-                                     Triangulation_cell_base_3<GT>
-                             >
-                           >::type::Concurrency_tag,
-      Lock_data_structure_>
-  , public Triangulation_utils_3
-{
-  friend std::istream& operator>> <>
-  (std::istream& is, Triangulation_3<GT,Tds_,Lock_data_structure_> &tr);
-
-  typedef typename Default::Get<Tds_, Triangulation_data_structure_3 <
-                                          Triangulation_vertex_base_3<GT>,
-                                          Triangulation_cell_base_3<GT> > >::type Tds;
-
-  typedef Triangulation_3<GT, Tds_, Lock_data_structure_> Self;
-  typedef Triangulation_3_base<
-    typename Tds::Concurrency_tag, Lock_data_structure_>  Base;
-
-public:
-
-  typedef typename Base::Lock_data_structure   Lock_data_structure;
-  typedef Tds                                  Triangulation_data_structure;
-  typedef GT                                   Geom_traits;
-
-  typedef typename GT::Point_3                 Point;
-  typedef typename GT::Segment_3               Segment;
-  typedef typename GT::Triangle_3              Triangle;
-  typedef typename GT::Tetrahedron_3           Tetrahedron;
-
-  typedef typename Tds::Concurrency_tag        Concurrency_tag;
-
-  typedef typename Tds::Vertex                 Vertex;
-  typedef typename Tds::Cell                   Cell;
-  typedef typename Tds::Facet                  Facet;
-  typedef typename Tds::Edge                   Edge;
-
-  typedef typename Tds::size_type              size_type;
-  typedef typename Tds::difference_type        difference_type;
-
-  typedef typename Tds::Vertex_handle          Vertex_handle;
-  typedef typename Tds::Cell_handle            Cell_handle;
-
-  typedef typename Tds::Cell_circulator        Cell_circulator;
-  typedef typename Tds::Facet_circulator       Facet_circulator;
-
-  // Not documented, see TDS.
-  typedef typename Tds::Face_circulator        Face_circulator;
-
-  typedef typename Tds::Cell_iterator          Cell_iterator;
-  typedef typename Tds::Facet_iterator         Facet_iterator;
-  typedef typename Tds::Edge_iterator          Edge_iterator;
-  typedef typename Tds::Vertex_iterator        Vertex_iterator;
-
-  typedef Cell_iterator                        All_cells_iterator;
-  typedef Facet_iterator                       All_facets_iterator;
-  typedef Edge_iterator                        All_edges_iterator;
-  typedef Vertex_iterator                      All_vertices_iterator;
-
-  typedef typename Tds::Simplex                Simplex;
-private:
-  // This class is used to generate the Finite_*_iterators.
-  class Infinite_tester
-  {
-      const Self *t;
-
-  public:
-
-      Infinite_tester() {}
-
-      Infinite_tester(const Self *tr)
-          : t(tr) {}
-
-      bool operator()(const Vertex_iterator & v) const
-      {
-          return t->is_infinite(v);
-      }
-
-      bool operator()(typename std::vector<Vertex_handle>::const_iterator v) const
-      {
-              return t->is_infinite(*v);
-      }
-
-      bool operator()(const Cell_iterator & c) const
-      {
-          return t->is_infinite(c);
-      }
-
-      bool operator()(const Edge_iterator & e) const
-      {
-          return t->is_infinite(*e);
-      }
-
-      bool operator()(const Facet_iterator & f) const
-      {
-          return t->is_infinite(*f);
-      }
-  };
-
-public:
-
-  // We derive in order to add a conversion to handle.
-  class Finite_cells_iterator
-    : public Filter_iterator<Cell_iterator, Infinite_tester> {
-    typedef Filter_iterator<Cell_iterator, Infinite_tester> Base;
-    typedef Finite_cells_iterator                           Self;
-  public:
-
-    Finite_cells_iterator() : Base() {}
-    Finite_cells_iterator(const Base &b) : Base(b) {}
-
-    Self & operator++() { Base::operator++(); return *this; }
-    Self & operator--() { Base::operator--(); return *this; }
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-
-    operator Cell_handle() const { return Base::base(); }
-  };
-
-  // We derive in order to add a conversion to handle.
-  class Finite_vertices_iterator
-    : public Filter_iterator<Vertex_iterator, Infinite_tester> {
-    typedef Filter_iterator<Vertex_iterator, Infinite_tester> Base;
-    typedef Finite_vertices_iterator                          Self;
-  public:
-
-    Finite_vertices_iterator() : Base() {}
-    Finite_vertices_iterator(const Base &b) : Base(b) {}
-
-    Self & operator++() { Base::operator++(); return *this; }
-    Self & operator--() { Base::operator--(); return *this; }
-    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
-    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
-
-    operator Vertex_handle() const { return Base::base(); }
-  };
-
-  typedef Filter_iterator<Edge_iterator, Infinite_tester>
-                                               Finite_edges_iterator;
-  typedef Filter_iterator<Facet_iterator, Infinite_tester>
-                                               Finite_facets_iterator;
-
-private:
-  // Auxiliary iterators for convenience
-  // do not use default template argument to please VC++
-  typedef Project_point<Vertex>                           Proj_point;
-public:
-  typedef Iterator_project<Finite_vertices_iterator,
-                           Proj_point,
-                           const Point&,
-                           const Point*,
-                           std::ptrdiff_t,
-                           std::bidirectional_iterator_tag>  Point_iterator;
-
-  typedef Point                         value_type; // to have a back_inserter
-  typedef const value_type&             const_reference;
-
-  //Tag to distinguish triangulations with weighted_points
-  typedef Tag_false  Weighted_tag;
-
-
-
-  enum Locate_type {
-    VERTEX=0,
-    EDGE, //1
-    FACET, //2
-    CELL, //3
-    OUTSIDE_CONVEX_HULL, //4
-    OUTSIDE_AFFINE_HULL };//5
-
-protected:
-  Tds _tds;
-  GT  _gt;
-  Vertex_handle infinite; //infinite vertex
-
-  Comparison_result
-  compare_xyz(const Point &p, const Point &q) const
-  {
-      return geom_traits().compare_xyz_3_object()(p, q);
-  }
-
-  bool
-  equal(const Point &p, const Point &q) const
-  {
-      return compare_xyz(p, q) == EQUAL;
-  }
-
-  Orientation
-  orientation(const Point &p, const Point &q,
-              const Point &r, const Point &s) const
-  {
-      return geom_traits().orientation_3_object()(p, q, r, s);
-  }
-
-  bool
-  coplanar(const Point &p, const Point &q,
-           const Point &r, const Point &s) const
-  {
-      return orientation(p, q, r, s) == COPLANAR;
-  }
-
-  Orientation
-  coplanar_orientation(const Point &p, const Point &q, const Point &r) const
-  {
-      return geom_traits().coplanar_orientation_3_object()(p, q, r);
-  }
-
-  bool
-  collinear(const Point &p, const Point &q, const Point &r) const
-  {
-      return coplanar_orientation(p, q, r) == COLLINEAR;
-  }
-
-  Segment
-  construct_segment(const Point &p, const Point &q) const
-  {
-      return geom_traits().construct_segment_3_object()(p, q);
-  }
-
-  Triangle
-  construct_triangle(const Point &p, const Point &q, const Point &r) const
-  {
-      return geom_traits().construct_triangle_3_object()(p, q, r);
-  }
-
-  Tetrahedron
-  construct_tetrahedron(const Point &p, const Point &q,
-                        const Point &r, const Point &s) const
-  {
-      return geom_traits().construct_tetrahedron_3_object()(p, q, r, s);
-  }
-
-  enum COLLINEAR_POSITION {BEFORE, SOURCE, MIDDLE, TARGET, AFTER};
-
-  COLLINEAR_POSITION
-  collinear_position(const Point &s, const Point &p, const Point &t) const
-  // (s,t) defines a line, p is on that line.
-  // Depending on the position of p wrt s and t, returns :
-  // --------------- s ---------------- t --------------
-  // BEFORE       SOURCE    MIDDLE    TARGET       AFTER
-  {
-      CGAL_triangulation_precondition(!equal(s, t));
-      CGAL_triangulation_precondition(collinear(s, p, t));
-
-      Comparison_result ps = compare_xyz(p, s);
-      if (ps == EQUAL)
-          return SOURCE;
-      Comparison_result st = compare_xyz(s, t);
-      if (ps == st)
-          return BEFORE;
-      Comparison_result pt = compare_xyz(p, t);
-      if (pt == EQUAL)
-          return TARGET;
-      if (pt == st)
-          return MIDDLE;
-      return AFTER;
-  }
-
-  void init_tds()
-    {
-      infinite = _tds.insert_increase_dimension();
-    }
-
-  void init_tds(const Point &p0, const Point &p1,
-                const Point &p2, const Point &p3)
-  {
-    Vertex_handle v0, v1, v2, v3;
-    infinite = _tds.insert_first_finite_cell(v0, v1, v2, v3, infinite);
-    v0->set_point(p0);
-    v1->set_point(p1);
-    v2->set_point(p2);
-    v3->set_point(p3);
-  }
-
-  void init_tds(const Point &p0, const Point &p1,
-                const Point &p2, const Point &p3,
-                Vertex_handle &vh0, Vertex_handle &vh1,
-                Vertex_handle &vh2, Vertex_handle &vh3)
-  {
-    infinite = _tds.insert_first_finite_cell(vh0, vh1, vh2, vh3, infinite);
-    vh0->set_point(p0);
-    vh1->set_point(p1);
-    vh2->set_point(p2);
-    vh3->set_point(p3);
-  }
-
-public:
-
-  // CONSTRUCTORS
-  Triangulation_3(const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
-    : Base(lock_ds), _tds(), _gt(gt)
-    {
-      init_tds();
-    }
-
-  Triangulation_3(Lock_data_structure *lock_ds, const GT & gt = GT())
-    : Base(lock_ds), _tds(), _gt(gt)
-    {
-      init_tds();
-    }
-
-  // copy constructor duplicates vertices and cells
-  Triangulation_3(const Triangulation_3 & tr)
-    : Base(tr.get_lock_data_structure()), _gt(tr._gt)
-    {
-      infinite = _tds.copy_tds(tr._tds, tr.infinite);
-      CGAL_triangulation_expensive_postcondition(*this == tr);
-    }
-
-  template < typename InputIterator >
-  Triangulation_3(InputIterator first, InputIterator last,
-                  const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
-    : Base(lock_ds), _gt(gt)
-    {
-      init_tds();
-      insert(first, last);
-    }
-
-  // Create the 3D triangulation of p0, p1, p3 and p4
-  // Precondition: p0, p1, p3 and p4 MUST BE positively oriented
-  Triangulation_3(const Point &p0, const Point &p1,
-                  const Point &p3, const Point &p4,
-                  const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
-    : Base(lock_ds), _gt(gt)
-    {
-      CGAL_triangulation_precondition(orientation(p0, p1, p3, p4) == POSITIVE);
-      init_tds(p0, p1, p3, p4);
-    }
-
-  void clear()
-    {
-      _tds.clear();
-      init_tds();
-    }
-
-  Triangulation_3 & operator=(Triangulation_3 tr)
-    {
-      // The triangulation passed as argument has been copied,
-      // because the parameter tr is passed by value. Then the following
-      // swap consumes the *copy*. The original triangulation is left
-      // untouched.
-      swap(tr);
-      return *this;
-    }
-
-  // HELPING FUNCTIONS
-
-  void swap(Triangulation_3 &tr)
-    {
-      std::swap(tr._gt, _gt);
-      std::swap(tr.infinite, infinite);
-      _tds.swap(tr._tds);
-      Base::swap(tr);
-    }
-
-  //ACCESS FUNCTIONS
-  const GT & geom_traits() const
-    { return _gt;}
-
-  const Tds & tds() const
-    { return _tds;}
-
-  Tds & tds()
-    { return _tds;}
-
-  int dimension() const
-    { return _tds.dimension();}
-
-  size_type number_of_finite_cells() const;
-
-  size_type number_of_cells() const;
-
-  size_type number_of_finite_facets() const;
-
-  size_type number_of_facets() const;
-
-  size_type number_of_finite_edges() const;
-
-  size_type number_of_edges() const;
-
-  size_type number_of_vertices() const // number of finite vertices
-    {return _tds.number_of_vertices()-1;}
-
-  Vertex_handle infinite_vertex() const
-    { return infinite; }
-
-  void set_infinite_vertex(Vertex_handle v)
-    { infinite=v;}
-
-  Cell_handle infinite_cell() const
-    {
-      CGAL_triangulation_assertion(infinite_vertex()->cell()->
-                                   has_vertex(infinite_vertex()));
-      return infinite_vertex()->cell();
-    }
-
-  // GEOMETRIC ACCESS FUNCTIONS
-
-  Tetrahedron tetrahedron(const Cell_handle c) const
-    {
-      CGAL_triangulation_precondition( dimension() == 3 );
-      CGAL_triangulation_precondition( ! is_infinite(c) );
-      return construct_tetrahedron(c->vertex(0)->point(),
-                                   c->vertex(1)->point(),
-                                   c->vertex(2)->point(),
-                                   c->vertex(3)->point());
-    }
-
-  Triangle triangle(const Cell_handle c, int i) const;
-
-  Triangle triangle(const Facet & f) const
-    { return triangle(f.first, f.second); }
-
-  Segment segment(const Cell_handle c, int i, int j) const;
-
-  Segment segment(const Edge & e) const
-    { return segment(e.first,e.second,e.third); }
-
-  const Point & point(Cell_handle c, int i) const {
-    CGAL_triangulation_precondition( dimension() >= 0 );
-    CGAL_triangulation_precondition( i >= 0 && i <= dimension() );
-    CGAL_triangulation_precondition( ! is_infinite(c->vertex(i)) );
-    return c->vertex(i)->point();
-  }
-
-  const Point & point(Vertex_handle v) const {
-    CGAL_triangulation_precondition( dimension() >= 0 );
-    CGAL_triangulation_precondition( ! is_infinite(v) );
-    return v->point();
-  }
-
-  // TEST IF INFINITE FEATURES
-  bool is_infinite(const Vertex_handle v) const
-  { return v == infinite_vertex(); }
-
-  bool is_infinite(const Cell_handle c) const
-    {
-      CGAL_triangulation_precondition( dimension() == 3 );
-      return c->has_vertex(infinite_vertex());
-    }
-
-  bool is_infinite(const Cell_handle c, int i) const;
-
-  bool is_infinite(const Facet & f) const
-    { return is_infinite(f.first,f.second); }
-
-  bool is_infinite(const Cell_handle c, int i, int j) const;
-
-  bool is_infinite(const Edge & e) const
-    { return is_infinite(e.first,e.second,e.third); }
-
-  //QUERIES
-
-  bool is_vertex(const Point & p, Vertex_handle & v) const;
-
-  bool is_vertex(Vertex_handle v) const;
-  bool is_edge(Vertex_handle u, Vertex_handle v,
-               Cell_handle & c, int & i, int & j) const;
-  bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
-                Cell_handle & c, int & i, int & j, int & k) const;
-  bool is_cell(Cell_handle c) const;
-  bool is_cell(Vertex_handle u, Vertex_handle v,
-               Vertex_handle w, Vertex_handle t,
-               Cell_handle & c, int & i, int & j, int & k, int & l) const;
-  bool is_cell(Vertex_handle u, Vertex_handle v,
-               Vertex_handle w, Vertex_handle t,
-               Cell_handle & c) const;
-
-  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const;
-  bool has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const;
-  bool has_vertex(const Facet & f, Vertex_handle v) const;
-  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const;
-
-  bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const;
-  bool are_equal(const Facet & f, const Facet & g) const;
-  bool are_equal(const Facet & f, Cell_handle n, int j) const;
-
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-  Cell_handle
-  locate(const Point & p,
-         Locate_type & lt, int & li, int & lj,
-         Cell_handle start = Cell_handle(),
-         bool *could_lock_zone = NULL) const;
-#else // no CGAL_NO_STRUCTURAL_FILTERING
-#  ifndef CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-#    define CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
-#  endif // no CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
-
-
-public:
-  Cell_handle
-  inexact_locate(const Point& p,
-                 Cell_handle start = Cell_handle(),
-                 int max_num_cells = CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS,
-                 bool *could_lock_zone = NULL) const;
-protected:
-  Cell_handle
-  exact_locate(const Point& p,
-               Locate_type& lt,
-               int& li, int & lj,
-               Cell_handle start,
-               bool *could_lock_zone = NULL
-               ) const;
-
-  Cell_handle
-  generic_locate(const Point& p,
-                 Locate_type& lt,
-                 int& li, int & lj,
-                 Cell_handle start,
-                 internal::Structural_filtering_3_tag,
-                 bool *could_lock_zone = NULL) const
-  {
-    Cell_handle ch = inexact_locate(
-      p, start, CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS, could_lock_zone);
-    if (could_lock_zone && *could_lock_zone == false)
-      return ch; // = Cell_handle() here
-    else
-      return exact_locate(p, lt, li, lj, ch, could_lock_zone);
-  }
-
-  Cell_handle
-  generic_locate(const Point& p,
-                 Locate_type& lt,
-                 int& li, int & lj,
-                 Cell_handle start,
-                 internal::No_structural_filtering_3_tag
-                 , bool *could_lock_zone = NULL) const
-  {
-    return exact_locate(p, lt, li, lj, start, could_lock_zone);
-  }
-
-public:
-  Orientation
-  inexact_orientation(const Point &p, const Point &q,
-                      const Point &r, const Point &s) const
-  {
-    const double px = to_double(p.x());
-    const double py = to_double(p.y());
-    const double pz = to_double(p.z());
-    const double qx = to_double(q.x());
-    const double qy = to_double(q.y());
-    const double qz = to_double(q.z());
-    const double rx = to_double(r.x());
-    const double ry = to_double(r.y());
-    const double rz = to_double(r.z());
-    const double sx = to_double(s.x());
-    const double sy = to_double(s.y());
-    const double sz = to_double(s.z());
-
-    const double pqx = qx - px;
-    const double pqy = qy - py;
-    const double pqz = qz - pz;
-    const double prx = rx - px;
-    const double pry = ry - py;
-    const double prz = rz - pz;
-    const double psx = sx - px;
-    const double psy = sy - py;
-    const double psz = sz - pz;
-
-    const double det = determinant(pqx, pqy, pqz,
-                                   prx, pry, prz,
-                                   psx, psy, psz);
-    if (det > 0) return POSITIVE;
-    if (det < 0) return NEGATIVE;
-    return ZERO;
-  }
-
-public:
-
-  Cell_handle
-  locate(const Point & p,
-         Locate_type & lt, int & li, int & lj,
-         Cell_handle start = Cell_handle()
-         , bool *could_lock_zone = NULL
-         ) const
-  {
-    typedef Triangulation_structural_filtering_traits<Geom_traits> TSFT;
-    typedef typename internal::Structural_filtering_selector_3<
-      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
-
-    return generic_locate(p, lt, li, lj, start, Should_filter_tag(), could_lock_zone);
-  }
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-  Cell_handle
-  locate(const Point & p, Cell_handle start = Cell_handle(),
-         bool *could_lock_zone = NULL) const
-  {
-      Locate_type lt;
-      int li, lj;
-      return locate( p, lt, li, lj, start, could_lock_zone);
-  }
-
-  Cell_handle
-  locate(const Point & p,
-         Locate_type & lt, int & li, int & lj, Vertex_handle hint,
-   bool *could_lock_zone = NULL) const
-  {
-      return locate(p, lt, li, lj,
-        hint == Vertex_handle() ? infinite_cell() : hint->cell(),
-        could_lock_zone);
-  }
-
-  Cell_handle
-  locate(const Point & p, Vertex_handle hint,
-         bool *could_lock_zone = NULL) const
-    {
-      return locate(p, hint == Vertex_handle() ? infinite_cell() : hint->cell(),
-        could_lock_zone);
-  }
-
-  // PREDICATES ON POINTS ``TEMPLATED'' by the geom traits
-
-  Bounded_side
-  side_of_tetrahedron(const Point & p,
-                      const Point & p0,
-                      const Point & p1,
-                      const Point & p2,
-                      const Point & p3,
-                      Locate_type & lt, int & i, int & j ) const;
-  Bounded_side
-  side_of_cell(const Point & p,
-               Cell_handle c,
-               Locate_type & lt, int & i, int & j) const;
-  Bounded_side
-  side_of_triangle(const Point & p,
-                   const Point & p0, const Point & p1, const Point & p2,
-                   Locate_type & lt, int & i, int & j ) const;
-  Bounded_side
-  side_of_facet(const Point & p,
-                Cell_handle c,
-                Locate_type & lt, int & li, int & lj) const;
-  Bounded_side
-  side_of_facet(const Point & p,
-                const Facet & f,
-                Locate_type & lt, int & li, int & lj) const
-    {
-      CGAL_triangulation_precondition( f.second == 3 );
-      return side_of_facet(p, f.first, lt, li, lj);
-    }
-  Bounded_side
-  side_of_segment(const Point & p,
-                  const Point & p0, const Point & p1,
-                  Locate_type & lt, int & i ) const;
-  Bounded_side
-  side_of_edge(const Point & p,
-               Cell_handle c,
-               Locate_type & lt, int & li) const;
-  Bounded_side
-  side_of_edge(const Point & p,
-               const Edge & e,
-               Locate_type & lt, int & li) const
-    {
-      CGAL_triangulation_precondition( e.second == 0 );
-      CGAL_triangulation_precondition( e.third == 1 );
-      return side_of_edge(p, e.first, lt, li);
-    }
-
-  // Functions forwarded from TDS.
-  int mirror_index(Cell_handle c, int i) const
-  { return _tds.mirror_index(c, i); }
-
-  Vertex_handle mirror_vertex(Cell_handle c, int i) const
-  { return _tds.mirror_vertex(c, i); }
-
-  Facet mirror_facet(Facet f) const
-  { return _tds.mirror_facet(f);}
-
-  // MODIFIERS
-  bool flip(const Facet &f)
-  // returns false if the facet is not flippable
-  // true other wise and
-  // flips facet i of cell c
-  // c will be replaced by one of the new cells
-  {
-    return flip( f.first, f.second);
-  }
-  bool flip(Cell_handle c, int i);
-  void flip_flippable(const Facet &f)
-  {
-    flip_flippable( f.first, f.second);
-  }
-  void flip_flippable(Cell_handle c, int i);
-  bool flip(const Edge &e)
-  // returns false if the edge is not flippable
-  // true otherwise and
-  // flips edge i,j of cell c
-  // c will be deleted
-  {
-    return flip( e.first, e.second, e.third );
-  }
-  bool flip(Cell_handle c, int i, int j);
-  void flip_flippable(const Edge &e)
-  {
-    flip_flippable( e.first, e.second, e.third );
-  }
-  void flip_flippable(Cell_handle c, int i, int j);
-
-  //INSERTION
-
-  Vertex_handle insert(const Point & p, Vertex_handle hint)
-  {
-    return insert(p, hint == Vertex_handle() ? infinite_cell() : hint->cell());
-  }
-  Vertex_handle insert(const Point & p, Cell_handle start = Cell_handle());
-  Vertex_handle insert(const Point & p, Locate_type lt, Cell_handle c,
-                       int li, int lj);
-
-//protected: // internal methods
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point  &p,
-                                          OutputItCells fit,
-                                          Cell_handle start = Cell_handle() );
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point& p,
-                                          OutputItCells fit,
-                                          Vertex_handle hint);
-
-  template <class OutputItCells>
-  Vertex_handle insert_and_give_new_cells(const Point& p,
-                                          Locate_type lt,
-                                          Cell_handle c, int li, int lj,
-                                          OutputItCells fit);
-
-  template < class Conflict_tester, class Hidden_points_visitor >
-  inline Vertex_handle insert_in_conflict(const Point & p,
-                                          Locate_type lt,
-                                          Cell_handle c, int li, int lj,
-                                          const Conflict_tester &tester,
-                                          Hidden_points_visitor &hider,
-                                          bool *could_lock_zone = NULL);
-
-  template < class InputIterator >
-  std::ptrdiff_t insert(InputIterator first, InputIterator last)
-    {
-      size_type n = number_of_vertices();
-
-      std::vector<Point> points (first, last);
-      spatial_sort (points.begin(), points.end(), geom_traits());
-
-      Vertex_handle hint;
-      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
-              p != end; ++p)
-          hint = insert(*p, hint);
-
-      return number_of_vertices() - n;
-    }
-
-  Vertex_handle
-  insert_in_cell(const Point & p, Cell_handle c);
-
-  Vertex_handle
-  insert_in_facet(const Point & p, Cell_handle c, int i);
-
-  Vertex_handle
-  insert_in_facet(const Point & p, const Facet & f)
-    {
-      return insert_in_facet(p, f.first, f.second);
-    }
-
-  Vertex_handle
-  insert_in_edge(const Point & p, Cell_handle c, int i, int j);
-
-  Vertex_handle
-  insert_in_edge(const Point & p, const Edge & e)
-    {
-      return insert_in_edge(p, e.first, e.second, e.third);
-    }
-
-  Vertex_handle
-  insert_outside_convex_hull(const Point & p, Cell_handle c);
-
-  Vertex_handle
-  insert_outside_affine_hull(const Point & p);
-
-  template <class CellIt>
-  Vertex_handle
-  insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
-                 Cell_handle begin, int i)
-  {
-      // Some geometric preconditions should be tested...
-      Vertex_handle v = _tds.insert_in_hole(cell_begin, cell_end, begin, i);
-      v->set_point(p);
-      return v;
-  }
-
-  template <class CellIt>
-  Vertex_handle
-  insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
-                 Cell_handle begin, int i, Vertex_handle newv)
-  {
-      // Some geometric preconditions should be tested...
-      newv->set_point(p);
-      return _tds.insert_in_hole(cell_begin, cell_end, begin, i, newv);
-  }
-
-  // Internal function, cells should already be marked.
-  template <class CellIt>
-  Vertex_handle
-  _insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
-                  Cell_handle begin, int i)
-  {
-      // Some geometric preconditions should be tested...
-      Vertex_handle v = _tds._insert_in_hole(cell_begin, cell_end, begin, i);
-      v->set_point(p);
-      return v;
-  }
-
-  // Internal function, cells should already be marked.
-  template <class CellIt>
-  Vertex_handle
-  _insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
-                  Cell_handle begin, int i, Vertex_handle newv)
-  {
-      // Some geometric preconditions should be tested...
-      newv->set_point(p);
-      return _tds._insert_in_hole(cell_begin, cell_end, begin, i, newv);
-  }
-
-protected:
-
-  template < class InputIterator >
-  bool does_repeat_in_range(InputIterator first, InputIterator beyond) const;
-
-  template < class InputIterator >
-  bool infinite_vertex_in_range(InputIterator first, InputIterator beyond) const;
-
-
-  // - c is the current cell, which must be in conflict.
-  // - tester is the function object that tests if a cell is in conflict.
-  template <class Conflict_test,
-            class OutputIteratorBoundaryFacets,
-            class OutputIteratorCells,
-            class OutputIteratorInternalFacets>
-  Triple<OutputIteratorBoundaryFacets,
-         OutputIteratorCells,
-         OutputIteratorInternalFacets>
-  find_conflicts(
-     Cell_handle d,
-     const Conflict_test &tester,
-     Triple<OutputIteratorBoundaryFacets,
-     OutputIteratorCells,
-     OutputIteratorInternalFacets> it
-     , bool *could_lock_zone = NULL
-     , const Facet *this_facet_must_be_in_the_cz = NULL
-     , bool *the_facet_is_in_its_cz = NULL
-     ) const
-  {
-    CGAL_triangulation_precondition( dimension()>=2 );
-
-    if (the_facet_is_in_its_cz)
-      *the_facet_is_in_its_cz = false;
-
-    if (could_lock_zone)
-      *could_lock_zone = true;
-
-    if (could_lock_zone)
-    {
-      if (!this->try_lock_cell(d))
-      {
-        *could_lock_zone = false;
-        return it;
-      }
-    }
-
-    CGAL_triangulation_precondition( tester(d) );
-
-    // To store the boundary cells, in case we need to rollback
-    std::stack<Cell_handle> cell_stack;
-    cell_stack.push(d);
-    d->tds_data().mark_in_conflict();
-
-    *it.second++ = d;
-
-    do {
-      Cell_handle c = cell_stack.top();
-      cell_stack.pop();
-
-      // For each neighbor cell
-      for (int i=0; i<dimension()+1; ++i) {
-        Cell_handle test = c->neighbor(i);
-
-        // "test" is either in the conflict zone,
-        // either facet-adjacent to the CZ
-
-        if (test->tds_data().is_in_conflict()) {
-
-          Facet f(c, i); // Internal facet.
-          // Is it the facet where're looking for?
-          if (this_facet_must_be_in_the_cz && the_facet_is_in_its_cz
-            && f == *this_facet_must_be_in_the_cz)
-          {
-            *the_facet_is_in_its_cz = true;
-          }
-          if (c < test)
-          {
-            *it.third++ = f;
-          }
-          continue; // test was already in conflict.
-        }
-        if (test->tds_data().is_clear()) {
-            if (tester(test)) {
-
-            // "test" is in the conflict zone
-            if (could_lock_zone)
-            {
-              if (!this->try_lock_cell(test))
-              {
-                *could_lock_zone = false;
-                // Unlock
-                return it;
-              }
-            }
-
-
-            Facet f(c, i); // Internal facet.
-            // Is it the facet where're looking for?
-            if (this_facet_must_be_in_the_cz && the_facet_is_in_its_cz
-              && f == *this_facet_must_be_in_the_cz)
-            {
-              *the_facet_is_in_its_cz = true;
-            }
-
-            if (c < test)
-            {
-              *it.third++ = f;
-            }
-
-            cell_stack.push(test);
-            test->tds_data().mark_in_conflict();
-            *it.second++ = test;
-            continue;
-          }
-
-          test->tds_data().mark_on_boundary();
-        }
-
-        Facet f(c, i); // Boundary facet.
-        // Is it the facet where're looking for?
-        if (this_facet_must_be_in_the_cz
-            && the_facet_is_in_its_cz
-            &&
-            (mirror_facet(f) == *this_facet_must_be_in_the_cz
-             || f == *this_facet_must_be_in_the_cz) )
-        {
-          *the_facet_is_in_its_cz = true;
-        }
-
-        *it.first++ = f;
-      }
-    } while (!cell_stack.empty());
-    return it;
-  }
-
-  // This one takes a function object to recursively determine the cells in
-  // conflict, then calls _tds._insert_in_hole().
-  template < class Conflict_test >
-  Vertex_handle
-  insert_conflict(Cell_handle c, const Conflict_test &tester)
-  {
-    CGAL_triangulation_precondition( dimension() >= 2 );
-    CGAL_triangulation_precondition( c != Cell_handle() );
-    CGAL_triangulation_precondition( tester(c) );
-
-    std::vector<Cell_handle> cells;
-    cells.reserve(32);
-
-    Facet facet;
-
-    // Find the cells in conflict
-    switch (dimension()) {
-    case 3:
-      find_conflicts(c, tester, make_triple(Oneset_iterator<Facet>(facet),
-                                            std::back_inserter(cells),
-                                            Emptyset_iterator()));
-      break;
-    case 2:
-      find_conflicts(c, tester, make_triple(Oneset_iterator<Facet>(facet),
-                                            std::back_inserter(cells),
-                                            Emptyset_iterator()));
-    }
-    // Create the new cells and delete the old.
-    return _tds._insert_in_hole(cells.begin(), cells.end(),
-                                  facet.first, facet.second);
-  }
-
-private:
-  // Here are the conflit tester function objects passed to
-  // insert_conflict_[23]() by insert_outside_convex_hull().
-  class Conflict_tester_outside_convex_hull_3
-  {
-      const Point &p;
-      const Self *t;
-
-  public:
-
-      Conflict_tester_outside_convex_hull_3(const Point &pt, const Self *tr)
-          : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const
-      {
-          Locate_type loc;
-          int i, j;
-          return t->side_of_cell( p, c, loc, i, j ) == ON_BOUNDED_SIDE;
-      }
-  };
-
-  class Conflict_tester_outside_convex_hull_2
-  {
-      const Point &p;
-      const Self *t;
-
-  public:
-
-      Conflict_tester_outside_convex_hull_2(const Point &pt, const Self *tr)
-          : p(pt), t(tr) {}
-
-      bool operator()(const Cell_handle c) const
-      {
-          Locate_type loc;
-          int i, j;
-          return t->side_of_facet( p, c, loc, i, j ) == ON_BOUNDED_SIDE;
-      }
-  };
-
-protected:
-
-  // no point being private, we might need to test
-  // whether a displacement decreases dimension on
-  // others inherited triangulations
-  bool test_dim_down(Vertex_handle v) const;
-
-  bool test_dim_down_using_incident_cells_3(
-    Vertex_handle v, std::vector<Cell_handle> &incident_cells,
-    std::vector<Vertex_handle> &adj_vertices,
-    bool *could_lock_zone = NULL) const;
-
-  // REMOVAL
-  template < class VertexRemover >
-  void remove(Vertex_handle v, VertexRemover &remover);
-  template < class VertexRemover >
-  // Concurrency-safe version
-  // Pre-condition: dimension = 3
-  // The return value is only meaningful if *could_lock_zone = true:
-  // * returns true if the vertex was removed
-  // * returns false if the vertex wasn't removed since it would decrease
-  //   the dimension => needs to be done sequentially
-  bool remove(Vertex_handle v, VertexRemover &remover,
-              bool *could_lock_zone);
-
-  template < class VertexRemover, class OutputItCells >
-  void remove_and_give_new_cells(Vertex_handle v, VertexRemover &remover,
-                                 OutputItCells fit);
-
-  // This function removes a batch of points at once.
-  // If points are grouped in cluster, the performance is increased
-  // compared to removing one by one.
-  // For now, this function is only guaranteed for Delaunay triangulations (or Regular as Delaunay).
-  // By doing these kind of remove followed by inserting the cluster,
-  // we achieve fast relocations for a batch of points (in a Delaunay triangulation).
-  template < class InputIterator, class VertexRemover >
-  size_type remove(InputIterator first, InputIterator beyond,
-                   VertexRemover &remover);
-  enum REMOVE_VERTEX_STATE {CLEAR, TO_REMOVE, PROCESSED, EXTREMITY};
-
-  // MOVE
-  template < class VertexRemover, class VertexInserter >
-  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p,
-                                     VertexRemover &remover,
-                                     VertexInserter &inserter);
-
-  template < class VertexRemover, class VertexInserter >
-  Vertex_handle move(Vertex_handle v, const Point &p,
-                     VertexRemover &remover, VertexInserter &inserter);
-
-  // move and give new cells
-  template < class VertexRemover, class VertexInserter, class OutputItCells  >
-  Vertex_handle move_if_no_collision_and_give_new_cells(
-                                                        Vertex_handle v, const Point &p, VertexRemover &remover,
-                                                        VertexInserter &inserter, OutputItCells fit);
-
-  // This is a function better suited for tds
-  // but because it is not required in the model of tds
-  // at this time, it should be implemented here.
-  void flip_2D(Cell_handle f, int i)
-  {
-    CGAL_triangulation_precondition( dimension()==2);
-    Cell_handle n  = f->neighbor(i);
-    int ni = this->_tds.mirror_index(f,i); //ni = n->index(f);
-
-    int cwi = (i+2)%3;
-    int ccwi = (i+1)%3;
-    int cwni = (ni+2)%3;
-    int ccwni = (ni+1)%3;
-
-    Vertex_handle  v_cw = f->vertex(cwi);
-    Vertex_handle  v_ccw = f->vertex(ccwi);
-
-    // bl == bottom left, tr == top right
-    Cell_handle tr = f->neighbor(ccwi);
-    int tri =  this->_tds.mirror_index(f,ccwi);
-    Cell_handle bl = n->neighbor(ccwni);
-    int bli =  this->_tds.mirror_index(n,ccwni);
-
-    f->set_vertex(cwi, n->vertex(ni));
-    n->set_vertex(cwni, f->vertex(i));
-
-    // update the neighborhood relations
-    this->_tds.set_adjacency(f, i, bl, bli);
-    this->_tds.set_adjacency(f, ccwi, n, ccwni);
-    this->_tds.set_adjacency(n, ni, tr, tri);
-
-    if(v_cw->cell() == f) {
-      v_cw->set_cell(n);
-    }
-
-    if(v_ccw->cell() == n) {
-      v_ccw->set_cell(f);
-    }
-  }
-
-  template < class VertexRemover, class VertexInserter >
-  void restore_edges_after_decrease_dimension(Vertex_handle v,
-                                              VertexRemover &remover, VertexInserter &inserter)
-  {
-
-    Cell_handle fkstart = v->cell();
-    Cell_handle start = fkstart->neighbor(fkstart->index(v));
-
-    std::list<Edge_2D> hole;
-    make_hole_2D(v, hole, remover);
-    fill_hole_2D(hole, remover);
-    // make hole here will work if the link of v is a valid triangulation
-    // the aim here is Delaunay triangulations
-    // to make it more general one could have an internal function here
-    // to remove v without touching its handle
-
-    // This insert must be from Delaunay (or the particular trian.)
-    // not the basic Triangulation_3.
-    // Here we correct the recent triangulation (with decreased dimension) formed
-    // in particular here a 2D (from 3D to 2D displacement)
-    Vertex_handle inserted = inserter.insert(v->point(), start);
-
-    // fixing pointer
-    Cell_handle fc = inserted->cell(), done(fc);
-    std::vector<Cell_handle> faces_pt;
-    faces_pt.reserve(16);
-    do {
-      faces_pt.push_back(fc);
-      fc = fc->neighbor((fc->index(inserted) + 1)%3);
-    } while(fc != done);
-    std::size_t ss = faces_pt.size();
-    for(std::size_t k=0; k<ss; k++)
-    {
-      Cell_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-    v->set_cell(inserted->cell());
-
-    tds().delete_vertex(inserted);
-  }
-
-private:
-  typedef Facet Edge_2D;
-  typedef Triple<Vertex_handle,Vertex_handle,Vertex_handle> Vertex_triple;
-  typedef typename Base::template Vertex_triple_Facet_map_generator<
-    Vertex_triple, Facet>::type Vertex_triple_Facet_map;
-  typedef typename Base::template Vertex_handle_unique_hash_map_generator<
-    Vertex_handle>::type Vertex_handle_unique_hash_map;
-
-  Vertex_triple make_vertex_triple(const Facet& f) const;
-  void make_canonical(Vertex_triple& t) const;
-
-  template < class VertexRemover >
-  VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D> & hole,
-      VertexRemover &remover);
-  template < class VertexRemover >
-  VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D> & hole,
-                              VertexRemover &remover,
-                              std::set<Cell_handle> &cells_set);
-
-  template < class VertexRemover >
-  void fill_hole_2D(std::list<Edge_2D> & hole, VertexRemover &remover);
-
-  void make_hole_3D( Vertex_handle v, Vertex_triple_Facet_map& outer_map,
-      std::vector<Cell_handle> & hole);
-  // When the incident cells are already known
-  void make_hole_3D(
-    Vertex_handle v,
-    const std::vector<Cell_handle> & incident_cells,
-          Vertex_triple_Facet_map& outer_map);
-
-  template < class VertexRemover >
-  VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover &remover);
-  template < class VertexRemover >
-  VertexRemover& remove_1D(Vertex_handle v, VertexRemover &remover);
-  template < class VertexRemover >
-  VertexRemover& remove_2D(Vertex_handle v, VertexRemover &remover);
-  template < class VertexRemover >
-  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover);
-  // Version of remove_3D if the incident cells and the adjacent vertices
-  // are already known
-  template < class VertexRemover >
-  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover,
-                           const std::vector<Cell_handle> &inc_cells,
-                           std::vector<Vertex_handle> &adj_vertices);
-
-  template < class VertexRemover, class OutputItCells  >
-  VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover &remover,
-                                 OutputItCells fit);
-
-  template < class VertexRemover, class OutputItCells  >
-  VertexRemover& remove_1D(Vertex_handle v, VertexRemover &remover,
-                           OutputItCells fit);
-
-  template < class VertexRemover, class OutputItCells  >
-  VertexRemover& remove_2D(Vertex_handle v, VertexRemover &remover,
-                           OutputItCells fit);
-
-  template < class VertexRemover, class OutputItCells  >
-  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover,
-                           OutputItCells fit);
-
-  template < class VertexRemover, class OutputItCells  >
-  void fill_hole_2D(std::list<Edge_2D> & hole, VertexRemover &remover,
-                    OutputItCells fit);
-
-  // They access "Self", so need to be friend.
-  friend class Conflict_tester_outside_convex_hull_3;
-  friend class Conflict_tester_outside_convex_hull_2;
-  friend class Infinite_tester;
-  friend class Finite_vertices_iterator;
-  friend class Finite_cells_iterator;
-
-  // remove cluster
-  template < class InputIterator >
-  void _mark_vertices_to_remove(InputIterator first, InputIterator beyond,
-    std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) const
-  {
-    while (first != beyond) vstates[*first++] = TO_REMOVE;
-  }
-
-  bool _test_dim_down_cluster(
-                              std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) const
-  // tests whether removing the cluster of vertices
-  // marked as "to remove", decreases the dimension of the triangulation
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    int k=0;
-    Vertex_handle v[4];
-    for (Finite_vertices_iterator fit = finite_vertices_begin();
-         fit != finite_vertices_end(); ++fit ) {
-      if(vstates[fit] == TO_REMOVE) continue;
-      v[k++] = fit;
-      if(k == 4)
-      {
-        if (!coplanar(v[0]->point(), v[1]->point(),
-                      v[2]->point(), v[3]->point())) return false;
-        k--;
-      }
-    }
-    return k < 4;
-  }
-
-  template < class InputIterator, class VertexRemover >
-  bool
-  _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover &remover,
-                     std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates);
-
-  void _make_big_hole_3D(Vertex_handle v,
-                         std::map<Vertex_triple,Facet>& outer_map,
-                         std::vector<Cell_handle> & hole,
-                         std::vector<Vertex_handle> & vertices,
-                         std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates);
-
-public:
-
-  //TRAVERSING : ITERATORS AND CIRCULATORS
-  Finite_cells_iterator finite_cells_begin() const
-  {
-      if ( dimension() < 3 )
-          return finite_cells_end();
-      return CGAL::filter_iterator(cells_end(), Infinite_tester(this),
-                                   cells_begin());
-  }
-  Finite_cells_iterator finite_cells_end() const
-  {
-      return CGAL::filter_iterator(cells_end(), Infinite_tester(this));
-  }
-
-  Cell_iterator cells_begin() const
-  {
-      return _tds.cells_begin();
-  }
-  Cell_iterator cells_end() const
-  {
-      return _tds.cells_end();
-  }
-
-  All_cells_iterator all_cells_begin() const
-  {
-      return _tds.cells_begin();
-  }
-  All_cells_iterator all_cells_end() const
-  {
-      return _tds.cells_end();
-  }
-
-  Finite_vertices_iterator finite_vertices_begin() const
-  {
-      if ( number_of_vertices() <= 0 )
-          return finite_vertices_end();
-      return CGAL::filter_iterator(vertices_end(), Infinite_tester(this),
-                                   vertices_begin());
-  }
-  Finite_vertices_iterator finite_vertices_end() const
-  {
-      return CGAL::filter_iterator(vertices_end(), Infinite_tester(this));
-  }
-
-  Vertex_iterator vertices_begin() const
-  {
-      return _tds.vertices_begin();
-  }
-  Vertex_iterator vertices_end() const
-  {
-      return _tds.vertices_end();
-  }
-
-  All_vertices_iterator all_vertices_begin() const
-  {
-      return _tds.vertices_begin();
-  }
-  All_vertices_iterator all_vertices_end() const
-  {
-      return _tds.vertices_end();
-  }
-
-  Finite_edges_iterator finite_edges_begin() const
-  {
-      if ( dimension() < 1 )
-          return finite_edges_end();
-      return CGAL::filter_iterator(edges_end(), Infinite_tester(this),
-                                   edges_begin());
-  }
-  Finite_edges_iterator finite_edges_end() const
-  {
-      return CGAL::filter_iterator(edges_end(), Infinite_tester(this));
-  }
-
-  Edge_iterator edges_begin() const
-  {
-      return _tds.edges_begin();
-  }
-  Edge_iterator edges_end() const
-  {
-      return _tds.edges_end();
-  }
-
-  All_edges_iterator all_edges_begin() const
-  {
-      return _tds.edges_begin();
-  }
-  All_edges_iterator all_edges_end() const
-  {
-      return _tds.edges_end();
-  }
-
-  Finite_facets_iterator finite_facets_begin() const
-  {
-      if ( dimension() < 2 )
-          return finite_facets_end();
-      return CGAL::filter_iterator(facets_end(), Infinite_tester(this),
-                                   facets_begin());
-  }
-  Finite_facets_iterator finite_facets_end() const
-  {
-      return CGAL::filter_iterator(facets_end(), Infinite_tester(this));
-  }
-
-  Facet_iterator facets_begin() const
-  {
-      return _tds.facets_begin();
-  }
-  Facet_iterator facets_end() const
-  {
-      return _tds.facets_end();
-  }
-
-  All_facets_iterator all_facets_begin() const
-  {
-      return _tds.facets_begin();
-  }
-  All_facets_iterator all_facets_end() const
-  {
-      return _tds.facets_end();
-  }
-
-  Point_iterator points_begin() const
-  {
-      return Point_iterator(finite_vertices_begin());
-  }
-  Point_iterator points_end() const
-  {
-      return Point_iterator(finite_vertices_end());
-  }
-
-  // cells around an edge
-  Cell_circulator incident_cells(const Edge & e) const
-  {
-    return _tds.incident_cells(e);
-  }
-  Cell_circulator incident_cells(Cell_handle c, int i, int j) const
-  {
-    return _tds.incident_cells(c, i, j);
-  }
-  Cell_circulator incident_cells(const Edge & e, Cell_handle start) const
-  {
-    return _tds.incident_cells(e, start);
-  }
-  Cell_circulator incident_cells(Cell_handle c, int i, int j,
-                                 Cell_handle start) const
-  {
-    return _tds.incident_cells(c, i, j, start);
-  }
-
-  // facets around an edge
-  Facet_circulator incident_facets(const Edge & e) const
-  {
-    return _tds.incident_facets(e);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j) const
-  {
-    return _tds.incident_facets(c, i, j);
-  }
-  Facet_circulator incident_facets(const Edge & e, const Facet & start) const
-  {
-    return _tds.incident_facets(e, start);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j,
-                                   const Facet & start) const
-  {
-    return _tds.incident_facets(c, i, j, start);
-  }
-  Facet_circulator incident_facets(const Edge & e,
-                                   Cell_handle start, int f) const
-  {
-    return _tds.incident_facets(e, start, f);
-  }
-  Facet_circulator incident_facets(Cell_handle c, int i, int j,
-                                   Cell_handle start, int f) const
-  {
-    return _tds.incident_facets(c, i, j, start, f);
-  }
-
-  // around a vertex
-  class Finite_filter {
-    const Self* t;
-    public:
-    Finite_filter(const Self* _t): t(_t) {}
-    template<class T>
-    bool operator() (const T& e) const {
-      return t->is_infinite(e);
-    }
-  };
-
-  class Finite_filter_2D {
-    const Self* t;
-    public:
-    Finite_filter_2D(const Self* _t): t(_t) {}
-
-    template<class T>
-    bool operator() (const T& e) const {
-      return t->is_infinite(e);
-    }
-
-    bool operator() (const Cell_handle c) {
-      return t->is_infinite(c, 3);
-    }
-  };
-
-  template <typename OutputIterator>
-  OutputIterator
-  incident_cells(Vertex_handle v, OutputIterator cells) const
-  {
-    return _tds.incident_cells(v, cells);
-  }
-  
-  template <typename OutputIterator>
-  void incident_cells_threadsafe(Vertex_handle v,
-                                 OutputIterator cells) const
-  {
-    _tds.incident_cells_threadsafe(v, cells);
-  }
-  
-  template <typename Filter, typename OutputIterator>
-  void incident_cells_threadsafe(Vertex_handle v,
-                                 OutputIterator cells,
-                                 const Filter &filter) const
-  {
-    _tds.incident_cells_threadsafe(v, cells, filter);
-  }
-
-  bool
-  try_lock_and_get_incident_cells(Vertex_handle v,
-                                  std::vector<Cell_handle>& cells) const
-  {
-    // We need to lock v individually first, to be sure v->cell() is valid
-    if (!this->try_lock_vertex(v))
-      return false;
-
-    Cell_handle d = v->cell();
-    if (!this->try_lock_cell(d)) // LOCK
-    {
-      return false;
-    }
-    cells.push_back(d);
-    d->tds_data().mark_in_conflict();
-    int head=0;
-    int tail=1;
-    do {
-      Cell_handle c = cells[head];
-
-      for (int i=0; i<4; ++i) {
-        if (c->vertex(i) == v)
-          continue;
-        Cell_handle next = c->neighbor(i);
-
-        if (!this->try_lock_cell(next)) // LOCK
-        {
-          BOOST_FOREACH(Cell_handle& ch,
-            std::make_pair(cells.begin(), cells.end()))
-          {
-            ch->tds_data().clear();
-          }
-          cells.clear();
-          return false;
-        }
-        if (! next->tds_data().is_clear())
-          continue;
-        cells.push_back(next);
-        ++tail;
-        next->tds_data().mark_in_conflict();
-      }
-      ++head;
-    } while(head != tail);
-    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
-    {
-      ch->tds_data().clear();
-    }
-    return true;
-  }
-
-  template <class OutputIterator>
-  bool
-  try_lock_and_get_adjacent_vertices_and_cells_3(
-    Vertex_handle v, OutputIterator vertices,
-    std::vector<Cell_handle> &cells) const
-  {
-
-    // We need to lock v individually first, to be sure v->cell() is valid
-    if (!this->try_lock_vertex(v))
-      return false;
-
-    Cell_handle d = v->cell();
-    if (!this->try_lock_cell(d)) // LOCK
-    {
-      return false;
-    }
-    cells.push_back(d);
-    d->tds_data().mark_in_conflict();
-    int head=0;
-    int tail=1;
-    do {
-      Cell_handle c = cells[head];
-
-      for (int i=0; i<4; ++i) {
-        if (c->vertex(i) == v)
-          continue;
-        Cell_handle next = c->neighbor(i);
-
-        if (!this->try_lock_cell(next)) // LOCK
-        {
-          BOOST_FOREACH(Cell_handle& ch,
-            std::make_pair(cells.begin(), cells.end()))
-          {
-            ch->tds_data().clear();
-          }
-          cells.clear();
-          return false;
-        }
-        if (! next->tds_data().is_clear())
-          continue;
-        cells.push_back(next);
-        ++tail;
-        next->tds_data().mark_in_conflict();
-      }
-      ++head;
-    } while(head != tail);
-
-    std::set<Vertex_handle> tmp_vertices;
-    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
-    {
-      ch->tds_data().clear();
-      for (int i = 0;  i < 4; ++i)
-      {
-              Vertex_handle w = ch->vertex(i);
-              if (w != v && tmp_vertices.insert(w).second)
-        {
-                *vertices = w;
-
-        }
-      }
-    }
-    return true;
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  finite_incident_cells(Vertex_handle v, OutputIterator cells) const
-  {
-        if(dimension() == 2)
-          return _tds.incident_cells(v, cells, Finite_filter_2D(this));
-    return _tds.incident_cells(v, cells, Finite_filter(this));
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_facets(Vertex_handle v, OutputIterator facets) const
-  {
-    return _tds.incident_facets(v, facets);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  finite_incident_facets(Vertex_handle v, OutputIterator facets) const
-  {
-    return _tds.incident_facets(v, facets, Finite_filter(this));
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
-  {
-    return _tds.incident_facets_threadsafe(v, facets);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  finite_incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
-  {
-    return _tds.incident_facets_threadsafe(v, facets, Finite_filter(this));
-  }
-
-  // old name (up to CGAL 3.4)
-  // kept for backwards compatibility but not documented
-  template <class OutputIterator>
-  OutputIterator
-  incident_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return _tds.adjacent_vertices(v, vertices);
-  }
-
-  // correct name
-  template <class OutputIterator>
-  OutputIterator
-  adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return _tds.adjacent_vertices(v, vertices);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  adjacent_vertices_and_cells_3(Vertex_handle v, OutputIterator vertices,
-                                std::vector<Cell_handle> &cells) const
-  {
-    return _tds.adjacent_vertices_and_cells_3(v, vertices, cells);
-  }
-
-  // old name (up to CGAL 3.4)
-  // kept for backwards compatibility but not documented
-  template <class OutputIterator>
-  OutputIterator
-  finite_incident_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return _tds.adjacent_vertices(v, vertices, Finite_filter(this));
-  }
-
-  // correct name
-  template <class OutputIterator>
-  OutputIterator
-  finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return _tds.adjacent_vertices(v, vertices, Finite_filter(this));
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_edges(Vertex_handle v, OutputIterator edges) const
-  {
-      return _tds.incident_edges(v, edges);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  finite_incident_edges(Vertex_handle v, OutputIterator edges) const
-  {
-    return _tds.incident_edges(v, edges, Finite_filter(this));
-  }
-
-  size_type degree(Vertex_handle v) const
-  {
-      return _tds.degree(v);
-  }
-
-
-
-  // CHECKING
-  bool is_valid(bool verbose = false, int level = 0) const;
-
-  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
-
-  bool is_valid_finite(Cell_handle c, bool verbose = false, int level=0) const;
-};
-
-template < class GT, class Tds, class Lds >
-std::istream &
-operator>> (std::istream& is, Triangulation_3<GT, Tds, Lds> &tr)
-  // reads
-  // the dimension
-  // the number of finite vertices
-  // the non combinatorial information on vertices (point, etc)
-  // the number of cells
-  // the cells by the indices of their vertices in the preceding list
-  // of vertices, plus the non combinatorial information on each cell
-  // the neighbors of each cell by their index in the preceding list of cells
-  // when dimension < 3 : the same with faces of maximal dimension
-{
-  typedef Triangulation_3<GT, Tds>               Triangulation;
-  typedef typename Triangulation::Vertex_handle  Vertex_handle;
-  typedef typename Triangulation::Cell_handle    Cell_handle;
-
-  tr._tds.clear(); // infinite vertex deleted
-  tr.infinite = tr._tds.create_vertex();
-
-  std::size_t n;
-  int d;
-  if(is_ascii(is))
-     is >> d >> n;
-  else {
-    read(is, d);
-    read(is, n);
-  }
-  if(!is) return is;
-  tr._tds.set_dimension(d);
-
-  std::map< std::size_t, Vertex_handle > V;
-  V[0] = tr.infinite_vertex();
-  // the infinite vertex is numbered 0
-
-  for (std::size_t i=1; i <= n; i++) {
-    V[i] = tr._tds.create_vertex();
-    if(!(is >> *V[i])) return is;
-  }
-
-  std::map< std::size_t, Cell_handle > C;
-
-  std::size_t m;
-  tr._tds.read_cells(is, V, m, C);
-
-  for (std::size_t j=0 ; j < m; j++)
-    if(!(is >> *(C[j]))) return is;
-
-  CGAL_triangulation_assertion( tr.is_valid(false) );
-  return is;
-}
-
-template < class GT, class Tds, class Lds >
-std::ostream &
-operator<< (std::ostream& os, const Triangulation_3<GT, Tds, Lds> &tr)
-  // writes :
-  // the dimension
-  // the number of finite vertices
-  // the non combinatorial information on vertices (point, etc)
-  // the number of cells
-  // the cells by the indices of their vertices in the preceding list
-  // of vertices, plus the non combinatorial information on each cell
-  // the neighbors of each cell by their index in the preceding list of cells
-  // when dimension < 3 : the same with faces of maximal dimension
-{
-  typedef Triangulation_3<GT, Tds>                 Triangulation;
-  typedef typename Triangulation::size_type        size_type;
-  typedef typename Triangulation::Vertex_handle    Vertex_handle;
-  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
-  typedef typename Triangulation::Cell_iterator    Cell_iterator;
-  typedef typename Triangulation::Edge_iterator    Edge_iterator;
-  typedef typename Triangulation::Facet_iterator   Facet_iterator;
-
-  // outputs dimension and number of vertices
-  size_type n = tr.number_of_vertices();
-  if (is_ascii(os))
-    os << tr.dimension() << std::endl << n << std::endl;
-  else
-  {
-    write(os, tr.dimension());
-    write(os, n);
-  }
-
-  if (n == 0)
-    return os;
-
-  std::vector<Vertex_handle> TV(n+1);
-  size_type i = 0;
-
-  // write the vertices
-
-  for (Vertex_iterator it = tr.vertices_begin(), end = tr.vertices_end();
-         it != end; ++it)
-    TV[i++] = it;
-
-  CGAL_triangulation_assertion( i == n+1 );
-  CGAL_triangulation_assertion( tr.is_infinite(TV[0]) );
-
-  Unique_hash_map<Vertex_handle, std::size_t > V;
-
-  V[tr.infinite_vertex()] = 0;
-  for (i=1; i <= n; i++) {
-    os << *TV[i];
-    V[TV[i]] = i;
-    if (is_ascii(os))
-        os << std::endl;
-  }
-
-    // asks the tds for the combinatorial information
-  tr.tds().print_cells(os, V);
-
-
-  // write the non combinatorial information on the cells
-  // using the << operator of Cell
-  // works because the iterator of the tds traverses the cells in the
-  // same order as the iterator of the triangulation
-  switch ( tr.dimension() ) {
-  case 3:
-    {
-      for(Cell_iterator it = tr.cells_begin(), end = tr.cells_end(); it != end; ++it) {
-        os << *it; // other information
-        if(is_ascii(os))
-          os << std::endl;
-      }
-      break;
-    }
-  case 2:
-    {
-      for(Facet_iterator it = tr.facets_begin(), end = tr.facets_end(); it != end; ++it) {
-        os << *((*it).first); // other information
-        if(is_ascii(os))
-          os << std::endl;
-      }
-      break;
-    }
-  case 1:
-    {
-      for(Edge_iterator it = tr.edges_begin(), end = tr.edges_end(); it != end; ++it) {
-        os << *((*it).first); // other information
-        if(is_ascii(os))
-          os << std::endl;
-      }
-      break;
-    }
-  }
-
-
-  return os ;
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_finite_cells() const
-{
-  if ( dimension() < 3 ) return 0;
-  return std::distance(finite_cells_begin(), finite_cells_end());
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_cells() const
-{
-  return _tds.number_of_cells();
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_finite_facets() const
-{
-  if ( dimension() < 2 ) return 0;
-  return std::distance(finite_facets_begin(), finite_facets_end());
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_facets() const
-{
-  return _tds.number_of_facets();
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_finite_edges() const
-{
-  if ( dimension() < 1 ) return 0;
-  return std::distance(finite_edges_begin(), finite_edges_end());
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::size_type
-Triangulation_3<GT,Tds,Lds>::
-number_of_edges() const
-{
-  return _tds.number_of_edges();
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Triangle
-Triangulation_3<GT,Tds,Lds>::
-triangle(const Cell_handle c, int i) const
-{
-  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3 );
-  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
-                                || (dimension() == 3 && i >= 0 && i <= 3) );
-  CGAL_triangulation_precondition( ! is_infinite(Facet(c, i)) );
-  if ( (i&1)==0 )
-    return construct_triangle(c->vertex( (i+2)&3 )->point(),
-                              c->vertex( (i+1)&3 )->point(),
-                              c->vertex( (i+3)&3 )->point());
-  return construct_triangle(c->vertex( (i+1)&3 )->point(),
-                            c->vertex( (i+2)&3 )->point(),
-                            c->vertex( (i+3)&3 )->point());
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Segment
-Triangulation_3<GT,Tds,Lds>::
-segment(const Cell_handle c, int i, int j) const
-{
-  CGAL_triangulation_precondition( i != j );
-  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
-  CGAL_triangulation_precondition( i >= 0 && i <= dimension()
-                                   && j >= 0 && j <= dimension() );
-  CGAL_triangulation_precondition( ! is_infinite(Edge(c, i, j)) );
-  return construct_segment( c->vertex(i)->point(), c->vertex(j)->point() );
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_infinite(const Cell_handle c, int i) const
-{
-  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3 );
-  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
-                                   || (dimension() == 3 && i >= 0 && i <= 3) );
-  return is_infinite(c->vertex(i<=0 ? 1 : 0)) ||
-         is_infinite(c->vertex(i<=1 ? 2 : 1)) ||
-         is_infinite(c->vertex(i<=2 ? 3 : 2));
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_infinite(const Cell_handle c, int i, int j) const
-{
-  CGAL_triangulation_precondition( i != j );
-  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
-  CGAL_triangulation_precondition(
-          i >= 0 && i <= dimension() && j >= 0 && j <= dimension() );
-  return is_infinite( c->vertex(i) ) || is_infinite( c->vertex(j) );
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_vertex(const Point & p, Vertex_handle & v) const
-{
-  Locate_type lt;
-  int li, lj;
-  Cell_handle c = locate( p, lt, li, lj );
-  if ( lt != VERTEX )
-    return false;
-  v = c->vertex(li);
-  return true;
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_vertex(Vertex_handle v) const
-{
-  return _tds.is_vertex(v);
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_edge(Vertex_handle u, Vertex_handle v,
-        Cell_handle & c, int & i, int & j) const
-{
-  return _tds.is_edge(u, v, c, i, j);
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
-         Cell_handle & c, int & i, int & j, int & k) const
-{
-  return _tds.is_facet(u, v, w, c, i, j, k);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_cell(Cell_handle c) const
-{
-  return _tds.is_cell(c);
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_cell(Vertex_handle u, Vertex_handle v,
-        Vertex_handle w, Vertex_handle t,
-        Cell_handle & c, int & i, int & j, int & k, int & l) const
-{
-  return _tds.is_cell(u, v, w, t, c, i, j, k, l);
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_cell(Vertex_handle u, Vertex_handle v,
-        Vertex_handle w, Vertex_handle t,
-        Cell_handle & c) const
-{
-  int i,j,k,l;
-  return _tds.is_cell(u, v, w, t, c, i, j, k, l);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-has_vertex(const Facet & f, Vertex_handle v, int & j) const
-{
-  return _tds.has_vertex(f.first, f.second, v, j);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const
-{
-  return _tds.has_vertex(c, i, v, j);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-has_vertex(const Facet & f, Vertex_handle v) const
-{
-  return _tds.has_vertex(f.first, f.second, v);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-has_vertex(Cell_handle c, int i, Vertex_handle v) const
-{
-  return _tds.has_vertex(c, i, v);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-are_equal(Cell_handle c, int i, Cell_handle n, int j) const
-{
-  return _tds.are_equal(c, i, n, j);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-are_equal(const Facet & f, const Facet & g) const
-{
-  return _tds.are_equal(f.first, f.second, g.first, g.second);
-}
-
-template < class GT, class Tds, class Lds >
-inline
-bool
-Triangulation_3<GT,Tds,Lds>::
-are_equal(const Facet & f, Cell_handle n, int j) const
-{
-  return _tds.are_equal(f.first, f.second, n, j);
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Cell_handle
-Triangulation_3<GT,Tds,Lds>::
-#ifdef CGAL_NO_STRUCTURAL_FILTERING
-locate(const Point & p, Locate_type & lt, int & li, int & lj,
-       Cell_handle start, bool *could_lock_zone) const
-#else
-exact_locate(const Point & p, Locate_type & lt, int & li, int & lj,
-             Cell_handle start, bool *could_lock_zone) const
-#endif
-  // returns the (finite or infinite) cell p lies in
-  // starts at cell "start"
-  // if lt == OUTSIDE_CONVEX_HULL, li is the
-  // index of a facet separating p from the rest of the triangulation
-  // in dimension 2 :
-  // returns a facet (Cell_handle,li) if lt == FACET
-  // returns an edge (Cell_handle,li,lj) if lt == EDGE
-  // returns a vertex (Cell_handle,li) if lt == VERTEX
-  // if lt == OUTSIDE_CONVEX_HULL, li, lj give the edge of c
-  // separating p from the rest of the triangulation
-  // lt = OUTSIDE_AFFINE_HULL if p is not coplanar with the triangulation
-{
-  CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) );
-
-  if (could_lock_zone)
-    *could_lock_zone = true;
-
-  if ( dimension() >= 1 ) {
-      // Make sure we continue from here with a finite cell.
-      if ( start == Cell_handle() )
-          start = infinite_cell();
-
-      int ind_inf;
-      if ( start->has_vertex(infinite, ind_inf) )
-          start = start->neighbor(ind_inf);
-  }
-
-  boost::rand48 rng;
-
-  switch (dimension()) {
-  case 3:
-  {
-    CGAL_triangulation_precondition( start != Cell_handle() );
-    CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
-
-    // We implement the remembering visibility/stochastic walk.
-
-    // Remembers the previous cell to avoid useless orientation tests.
-    Cell_handle previous = Cell_handle();
-    Cell_handle c = start;
-
-    if (could_lock_zone)
-    {
-      if (!this->try_lock_cell(c))
-      {
-        *could_lock_zone = false;
-        return Cell_handle();
-      }
-    }
-
-    // Stores the results of the 4 orientation tests.  It will be used
-    // at the end to decide if p lies on a face/edge/vertex/interior.
-    Orientation o[4];
-
-    boost::uniform_smallint<> four(0, 3);
-    boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die4(rng, four);
-
-    // Now treat the cell c.
-    bool try_next_cell = true;
-    while(try_next_cell)
-    {
-      try_next_cell = false;
-      // We know that the 4 vertices of c are positively oriented.
-      // So, in order to test if p is seen outside from one of c's facets,
-      // we just replace the corresponding point by p in the orientation
-      // test.  We do this using the array below.
-      const Point* pts[4] = { &(c->vertex(0)->point()),
-                              &(c->vertex(1)->point()),
-                              &(c->vertex(2)->point()),
-                              &(c->vertex(3)->point()) };
-
-      // For the remembering stochastic walk,
-      // we need to start trying with a random index :
-      int i = die4();
-      // For the remembering visibility walk (Delaunay and Regular only), we don't :
-      // int i = 0;
-
-      // for each vertex
-      for (int j=0; !try_next_cell && j != 4; ++j, i = (i+1)&3)
-      {
-              Cell_handle next = c->neighbor(i);
-
-              if (previous == next)
-        {
-                o[i] = POSITIVE;
-        }
-        else
-        {
-          // We temporarily put p at i's place in pts.
-          const Point* backup = pts[i];
-          pts[i] = &p;
-                o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]);
-                if ( o[i] != NEGATIVE )
-          {
-            pts[i] = backup;
-          }
-          else
-          {
-                  if ( next->has_vertex(infinite, li) )
-            {
-                    // We are outside the convex hull.
-                    lt = OUTSIDE_CONVEX_HULL;
-                    return next;
-                  }
-                  previous = c;
-                  c = next;
-            if (could_lock_zone)
-            {
-              //previous->unlock(); // DON'T do that, "c" may be in
-                                    // the same locking cell as "previous"
-              if (!this->try_lock_cell(c))
-              {
-                *could_lock_zone = false;
-                return Cell_handle();
-              }
-            }
-            try_next_cell = true;
-          }
-        }
-      } // next vertex
-    } // next cell
-
-          // now p is in c or on its boundary
-          int sum = ( o[0] == COPLANAR )
-                  + ( o[1] == COPLANAR )
-                  + ( o[2] == COPLANAR )
-                  + ( o[3] == COPLANAR );
-          switch (sum) {
-          case 0:
-            {
-              lt = CELL;
-              break;
-            }
-          case 1:
-            {
-              lt = FACET;
-              li = ( o[0] == COPLANAR ) ? 0 :
-                   ( o[1] == COPLANAR ) ? 1 :
-                   ( o[2] == COPLANAR ) ? 2 : 3;
-              break;
-            }
-          case 2:
-            {
-              lt = EDGE;
-              li = ( o[0] != COPLANAR ) ? 0 :
-                   ( o[1] != COPLANAR ) ? 1 : 2;
-              lj = ( o[li+1] != COPLANAR ) ? li+1 :
-                   ( o[li+2] != COPLANAR ) ? li+2 : li+3;
-              CGAL_triangulation_assertion(collinear( p,
-                                                      c->vertex( li )->point(),
-                                                      c->vertex( lj )->point()));
-              break;
-            }
-          case 3:
-            {
-              lt = VERTEX;
-              li = ( o[0] != COPLANAR ) ? 0 :
-                   ( o[1] != COPLANAR ) ? 1 :
-                   ( o[2] != COPLANAR ) ? 2 : 3;
-              break;
-            }
-          }
-          return c;
-  }
-
-  case 2:
-    {
-      CGAL_triangulation_precondition( start != Cell_handle() );
-      CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
-      Cell_handle c = start;
-
-      boost::uniform_smallint<> three(0, 2);
-      boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die3(rng, three);
-
-      //first tests whether p is coplanar with the current triangulation
-      if ( orientation( c->vertex(0)->point(),
-                        c->vertex(1)->point(),
-                        c->vertex(2)->point(),
-                        p ) != DEGENERATE ) {
-        lt = OUTSIDE_AFFINE_HULL;
-        li = 3; // only one facet in dimension 2
-        return c;
-      }
-      // if p is coplanar, location in the triangulation
-      // only the facet numbered 3 exists in each cell
-      while (1) {
-        int inf;
-        if ( c->has_vertex(infinite,inf) ) {
-          // c must contain p in its interior
-          lt = OUTSIDE_CONVEX_HULL;
-          li = cw(inf);
-          lj = ccw(inf);
-          return c;
-        }
-
-        // else c is finite
-        // we test its edges in a random order until we find a
-        // neighbor to go further
-        int i = die3();
-        const Point & p0 = c->vertex( i )->point();
-        const Point & p1 = c->vertex( ccw(i) )->point();
-        const Point & p2 = c->vertex( cw(i) )->point();
-        Orientation o[3];
-        CGAL_triangulation_assertion(coplanar_orientation(p0,p1,p2)==POSITIVE);
-        o[0] = coplanar_orientation(p0,p1,p);
-        if ( o[0] == NEGATIVE ) {
-          c = c->neighbor( cw(i) );
-          continue;
-        }
-        o[1] = coplanar_orientation(p1,p2,p);
-        if ( o[1] == NEGATIVE ) {
-          c = c->neighbor( i );
-          continue;
-        }
-        o[2] = coplanar_orientation(p2,p0,p);
-        if ( o[2] == NEGATIVE ) {
-          c = c->neighbor( ccw(i) );
-          continue;
-        }
-
-        // now p is in c or on its boundary
-        int sum = ( o[0] == COLLINEAR )
-                + ( o[1] == COLLINEAR )
-                + ( o[2] == COLLINEAR );
-        switch (sum) {
-        case 0:
-          {
-            lt = FACET;
-            li = 3; // useless ?
-            break;
-          }
-        case 1:
-          {
-            lt = EDGE;
-            li = ( o[0] == COLLINEAR ) ? i :
-                 ( o[1] == COLLINEAR ) ? ccw(i) :
-                 cw(i);
-            lj = ccw(li);
-            break;
-          }
-        case 2:
-          {
-            lt = VERTEX;
-            li = ( o[0] != COLLINEAR ) ? cw(i) :
-                 ( o[1] != COLLINEAR ) ? i :
-                 ccw(i);
-            break;
-          }
-        }
-        return c;
-      }
-    }
-  case 1:
-    {
-      CGAL_triangulation_precondition( start != Cell_handle() );
-      CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
-      Cell_handle c = start;
-
-      //first tests whether p is collinear with the current triangulation
-      if ( ! collinear( p,
-                        c->vertex(0)->point(),
-                        c->vertex(1)->point()) ) {
-        lt = OUTSIDE_AFFINE_HULL;
-        return c;
-      }
-      // if p is collinear, location :
-      while (1) {
-        if ( c->has_vertex(infinite) ) {
-          // c must contain p in its interior
-          lt = OUTSIDE_CONVEX_HULL;
-          return c;
-        }
-
-        // else c is finite
-        // we test on which direction to continue the traversal
-        switch (collinear_position(c->vertex(0)->point(),
-                                   p,
-                                   c->vertex(1)->point()) ) {
-        case AFTER:
-          c = c->neighbor(0);
-          continue;
-        case BEFORE:
-          c = c->neighbor(1);
-          continue;
-        case MIDDLE:
-            lt = EDGE;
-            li = 0;
-            lj = 1;
-            return c;
-        case SOURCE:
-            lt = VERTEX;
-            li = 0;
-            return c;
-        case TARGET:
-            lt = VERTEX;
-            li = 1;
-            return c;
-        }
-      }
-    }
-  case 0:
-    {
-      Finite_vertices_iterator vit = finite_vertices_begin();
-      if ( ! equal( p, vit->point() ) ) {
-        lt = OUTSIDE_AFFINE_HULL;
-      }
-      else {
-        lt = VERTEX;
-        li = 0;
-      }
-      return vit->cell();
-    }
-  case -1:
-    {
-      lt = OUTSIDE_AFFINE_HULL;
-      return Cell_handle();
-    }
-  default:
-    {
-      CGAL_triangulation_assertion(false);
-      return Cell_handle();
-    }
-  }
-}
-
-#ifndef CGAL_NO_STRUCTURAL_FILTERING
-template <class Gt, class Tds, class Lds>
-inline
-typename Triangulation_3<Gt, Tds, Lds>::Cell_handle
-Triangulation_3<Gt, Tds, Lds>::
-inexact_locate(const Point & t, Cell_handle start, int n_of_turns,
-               bool *could_lock_zone) const
-{
-  CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) );
-
-  if (could_lock_zone)
-    *could_lock_zone = true;
-
-  if(dimension() < 3) return start;
-
-  // Make sure we continue from here with a finite cell.
-  if ( start == Cell_handle() )
-    start = infinite_cell();
-
-  // CJTODO: useless?
-  if (could_lock_zone)
-  {
-    if (!this->try_lock_cell(start))
-    {
-      *could_lock_zone = false;
-      return Cell_handle();
-    }
-  }
-
-  int ind_inf;
-  if( start->has_vertex(infinite, ind_inf) )
-    start = start->neighbor(ind_inf);
-
-  CGAL_triangulation_precondition( start != Cell_handle() );
-  CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
-
-  // We implement the remembering visibility walk.
-  // in this phase, no need to be stochastic
-
-  // Remembers the previous cell to avoid useless orientation tests.
-  Cell_handle previous = Cell_handle();
-  Cell_handle c = start;
-
-  if (could_lock_zone)
-  {
-    if (!this->try_lock_cell(c))
-    {
-      *could_lock_zone = false;
-      return Cell_handle();
-    }
-  }
-
-  // Now treat the cell c.
-  try_next_cell:
-
-  n_of_turns--;
-
-  // We know that the 4 vertices of c are positively oriented.
-  // So, in order to test if p is seen outside from one of c's facets,
-  // we just replace the corresponding point by p in the orientation
-  // test.  We do this using the array below.
-  const Point* pts[4] = { &(c->vertex(0)->point()),
-                          &(c->vertex(1)->point()),
-                          &(c->vertex(2)->point()),
-                          &(c->vertex(3)->point()) };
-
-  // (non-stochastic) visibility walk
-  for (int i=0; i != 4; ++i) {
-    Cell_handle next = c->neighbor(i);
-    if (previous == next) continue;
-
-    // We temporarily put p at i's place in pts.
-    const Point* backup = pts[i];
-    pts[i] = &t;
-    if( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE) {
-      pts[i] = backup;
-      continue;
-    }
-    if(next->has_vertex(infinite)) {
-      // We are outside the convex hull.
-      return next;
-    }
-    previous = c;
-    c = next;
-    if (could_lock_zone)
-    {
-      //previous->unlock(); // DON'T do that, "c" may be in
-                            // the same locking cell as "previous"
-      if (!this->try_lock_cell(c))
-      {
-        *could_lock_zone = false;
-        return Cell_handle();
-      }
-    }
-    if(n_of_turns) goto try_next_cell;
-  }
-
-  return c;
-}
-#endif // no CGAL_NO_STRUCTURAL_FILTERING
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_tetrahedron(const Point & p,
-                    const Point & p0,
-                    const Point & p1,
-                    const Point & p2,
-                    const Point & p3,
-                    Locate_type & lt, int & i, int & j ) const
-  // p0,p1,p2,p3 supposed to be non coplanar
-  // tetrahedron p0,p1,p2,p3 is supposed to be well oriented
-  // returns :
-  // ON_BOUNDED_SIDE if p lies strictly inside the tetrahedron
-  // ON_BOUNDARY if p lies on one of the facets
-  // ON_UNBOUNDED_SIDE if p lies strictly outside the tetrahedron
-{
-  CGAL_triangulation_precondition
-    ( orientation(p0,p1,p2,p3) == POSITIVE );
-
-  Orientation o0,o1,o2,o3;
-  if ( ((o0 = orientation(p,p1,p2,p3)) == NEGATIVE) ||
-       ((o1 = orientation(p0,p,p2,p3)) == NEGATIVE) ||
-       ((o2 = orientation(p0,p1,p,p3)) == NEGATIVE) ||
-       ((o3 = orientation(p0,p1,p2,p)) == NEGATIVE) ) {
-    lt = OUTSIDE_CONVEX_HULL;
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  // now all the oi's are >=0
-  // sum gives the number of facets p lies on
-  int sum = ( (o0 == ZERO) ? 1 : 0 )
-          + ( (o1 == ZERO) ? 1 : 0 )
-          + ( (o2 == ZERO) ? 1 : 0 )
-          + ( (o3 == ZERO) ? 1 : 0 );
-
-  switch (sum) {
-  case 0:
-    {
-      lt = CELL;
-      return ON_BOUNDED_SIDE;
-    }
-  case 1:
-    {
-      lt = FACET;
-      // i = index such that p lies on facet(i)
-      i = ( o0 == ZERO ) ? 0 :
-          ( o1 == ZERO ) ? 1 :
-          ( o2 == ZERO ) ? 2 :
-          3;
-      return ON_BOUNDARY;
-    }
-  case 2:
-    {
-      lt = EDGE;
-      // i = smallest index such that p does not lie on facet(i)
-      // i must be < 3 since p lies on 2 facets
-      i = ( o0 == POSITIVE ) ? 0 :
-          ( o1 == POSITIVE ) ? 1 :
-          2;
-      // j = larger index such that p not on facet(j)
-      // j must be > 0 since p lies on 2 facets
-      j = ( o3 == POSITIVE ) ? 3 :
-          ( o2 == POSITIVE ) ? 2 :
-          1;
-      return ON_BOUNDARY;
-    }
-  case 3:
-    {
-      lt = VERTEX;
-      // i = index such that p does not lie on facet(i)
-      i = ( o0 == POSITIVE ) ? 0 :
-          ( o1 == POSITIVE ) ? 1 :
-          ( o2 == POSITIVE ) ? 2 :
-          3;
-      return ON_BOUNDARY;
-    }
-  default:
-    {
-      // impossible : cannot be on 4 facets for a real tetrahedron
-      CGAL_triangulation_assertion(false);
-      return ON_BOUNDARY;
-    }
-  }
-}
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_cell(const Point & p,
-             Cell_handle c,
-             Locate_type & lt, int & i, int & j) const
-  // returns
-  // ON_BOUNDED_SIDE if p inside the cell
-  // (for an infinite cell this means that p lies strictly in the half space
-  // limited by its finite facet)
-  // ON_BOUNDARY if p on the boundary of the cell
-  // (for an infinite cell this means that p lies on the *finite* facet)
-  // ON_UNBOUNDED_SIDE if p lies outside the cell
-  // (for an infinite cell this means that p is not in the preceding
-  // two cases)
-  // lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-  if ( ! is_infinite(c) ) {
-    return side_of_tetrahedron(p,
-                               c->vertex(0)->point(),
-                               c->vertex(1)->point(),
-                               c->vertex(2)->point(),
-                               c->vertex(3)->point(),
-                               lt, i, j);
-  }
-  else {
-    int inf = c->index(infinite);
-    Orientation o;
-    Vertex_handle
-      v1=c->vertex((inf+1)&3),
-      v2=c->vertex((inf+2)&3),
-      v3=c->vertex((inf+3)&3);
-    if ( (inf&1) == 0 )
-      o = orientation(p, v1->point(), v2->point(), v3->point());
-    else
-      o =  orientation(v3->point(), p, v1->point(), v2->point());
-
-    switch (o) {
-    case POSITIVE:
-      {
-        lt = CELL;
-        return ON_BOUNDED_SIDE;
-      }
-    case NEGATIVE:
-      return ON_UNBOUNDED_SIDE;
-    case ZERO:
-      {
-        // location in the finite facet
-        int i_f, j_f;
-        Bounded_side side =
-          side_of_triangle(p, v1->point(), v2->point(), v3->point(),
-                           lt, i_f, j_f);
-        // lt need not be modified in most cases :
-        switch (side) {
-        case ON_BOUNDED_SIDE:
-          {
-            // lt == FACET ok
-            i = inf;
-            return ON_BOUNDARY;
-          }
-        case ON_BOUNDARY:
-          {
-            // lt == VERTEX OR EDGE ok
-            i = ( i_f == 0 ) ? ((inf+1)&3) :
-                ( i_f == 1 ) ? ((inf+2)&3) :
-                ((inf+3)&3);
-            if ( lt == EDGE ) {
-              j = (j_f == 0 ) ? ((inf+1)&3) :
-                  ( j_f == 1 ) ? ((inf+2)&3) :
-                  ((inf+3)&3);
-            }
-            return ON_BOUNDARY;
-          }
-        case ON_UNBOUNDED_SIDE:
-          {
-            // p lies on the plane defined by the finite facet
-            // lt must be initialized
-            return ON_UNBOUNDED_SIDE;
-          }
-        default:
-          {
-            CGAL_triangulation_assertion(false);
-            return ON_BOUNDARY;
-          }
-        } // switch side
-      }// case ZERO
-    default:
-      {
-        CGAL_triangulation_assertion(false);
-        return ON_BOUNDARY;
-      }
-    } // switch o
-  } // else infinite cell
-} // side_of_cell
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_triangle(const Point & p,
-                 const Point & p0,
-                 const Point & p1,
-                 const Point & p2,
-                 Locate_type & lt, int & i, int & j ) const
-  // p0,p1,p2 supposed to define a plane
-  // p supposed to lie on plane p0,p1,p2
-  // triangle p0,p1,p2 defines the orientation of the plane
-  // returns
-  // ON_BOUNDED_SIDE if p lies strictly inside the triangle
-  // ON_BOUNDARY if p lies on one of the edges
-  // ON_UNBOUNDED_SIDE if p lies strictly outside the triangle
-{
-  CGAL_triangulation_precondition( coplanar(p,p0,p1,p2) );
-
-  Orientation o012 = coplanar_orientation(p0,p1,p2);
-  CGAL_triangulation_precondition( o012 != COLLINEAR );
-
-  Orientation o0; // edge p0 p1
-  Orientation o1; // edge p1 p2
-  Orientation o2; // edge p2 p0
-
-  if ((o0 = coplanar_orientation(p0,p1,p)) == opposite(o012) ||
-      (o1 = coplanar_orientation(p1,p2,p)) == opposite(o012) ||
-      (o2 = coplanar_orientation(p2,p0,p)) == opposite(o012)) {
-    lt = OUTSIDE_CONVEX_HULL;
-    return ON_UNBOUNDED_SIDE;
-  }
-
-  // now all the oi's are >=0
-  // sum gives the number of edges p lies on
-  int sum = ( (o0 == ZERO) ? 1 : 0 )
-          + ( (o1 == ZERO) ? 1 : 0 )
-          + ( (o2 == ZERO) ? 1 : 0 );
-
-  switch (sum) {
-  case 0:
-    {
-      lt = FACET;
-      return ON_BOUNDED_SIDE;
-    }
-  case 1:
-    {
-      lt = EDGE;
-      i = ( o0 == ZERO ) ? 0 :
-          ( o1 == ZERO ) ? 1 :
-          2;
-      if ( i == 2 )
-        j=0;
-      else
-        j = i+1;
-      return ON_BOUNDARY;
-    }
-  case 2:
-    {
-      lt = VERTEX;
-      i = ( o0 == o012 ) ? 2 :
-          ( o1 == o012 ) ? 0 :
-          1;
-      return ON_BOUNDARY;
-    }
-  default:
-    {
-      // cannot happen
-      CGAL_triangulation_assertion(false);
-      return ON_BOUNDARY;
-    }
-  }
-}
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_facet(const Point & p,
-              Cell_handle c,
-              Locate_type & lt, int & li, int & lj) const
-  // supposes dimension 2 otherwise does not work for infinite facets
-  // returns :
-  // ON_BOUNDED_SIDE if p inside the facet
-  // (for an infinite facet this means that p lies strictly in the half plane
-  // limited by its finite edge)
-  // ON_BOUNDARY if p on the boundary of the facet
-  // (for an infinite facet this means that p lies on the *finite* edge)
-  // ON_UNBOUNDED_SIDE if p lies outside the facet
-  // (for an infinite facet this means that p is not in the
-  // preceding two cases)
-  // lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
-  // when they mean anything, li and lj refer to indices in the cell c
-  // giving the facet (c,i)
-{
-  CGAL_triangulation_precondition( dimension() == 2 );
-  if ( ! is_infinite(c,3) ) {
-    // The following precondition is useless because it is written
-    // in side_of_facet
-    // 	CGAL_triangulation_precondition( coplanar (p,
-    // 					  c->vertex(0)->point,
-    // 					  c->vertex(1)->point,
-    // 					  c->vertex(2)->point) );
-    int i_t, j_t;
-    Bounded_side side = side_of_triangle(p,
-                            c->vertex(0)->point(),
-                            c->vertex(1)->point(),
-                            c->vertex(2)->point(),
-                            lt, i_t, j_t);
-    // We protect the following code by this test to avoid valgrind messages.
-    if (side == ON_BOUNDARY) {
-        // indices in the original cell :
-        li = ( i_t == 0 ) ? 0 :
-             ( i_t == 1 ) ? 1 : 2;
-        lj = ( j_t == 0 ) ? 0 :
-             ( j_t == 1 ) ? 1 : 2;
-    }
-    return side;
-  }
-  // else infinite facet
-  int inf = c->index(infinite);
-    // The following precondition is useless because it is written
-    // in side_of_facet
-    // 	CGAL_triangulation_precondition( coplanar (p,
-    // 				  c->neighbor(inf)->vertex(0)->point(),
-    // 				  c->neighbor(inf)->vertex(1)->point(),
-    // 				  c->neighbor(inf)->vertex(2)->point()));
-  int i2 = next_around_edge(inf,3);
-  int i1 = 3-inf-i2;
-  Vertex_handle v1 = c->vertex(i1),
-                v2 = c->vertex(i2);
-
-  CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
-                               mirror_vertex(c, inf)->point()) == POSITIVE);
-
-  switch (coplanar_orientation(v1->point(), v2->point(), p)) {
-  case POSITIVE:
-      // p lies on the same side of v1v2 as vn, so not in f
-      return ON_UNBOUNDED_SIDE;
-  case NEGATIVE:
-      // p lies in f
-      lt = FACET;
-      li = 3;
-      return ON_BOUNDED_SIDE;
-  default: // case ZERO:
-      // p collinear with v1v2
-      int i_e;
-      switch (side_of_segment(p, v1->point(), v2->point(), lt, i_e)) {
-        // computation of the indices in the original cell
-      case ON_BOUNDED_SIDE:
-          // lt == EDGE ok
-          li = i1;
-          lj = i2;
-          return ON_BOUNDARY;
-      case ON_BOUNDARY:
-          // lt == VERTEX ok
-          li = ( i_e == 0 ) ? i1 : i2;
-          return ON_BOUNDARY;
-      default: // case ON_UNBOUNDED_SIDE:
-          // p lies on the line defined by the finite edge
-          return ON_UNBOUNDED_SIDE;
-      }
-  }
-}
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_segment(const Point & p,
-                const Point & p0,
-                const Point & p1,
-                Locate_type & lt, int & i ) const
-  // p0, p1 supposed to be different
-  // p supposed to be collinear to p0, p1
-  // returns :
-  // ON_BOUNDED_SIDE if p lies strictly inside the edge
-  // ON_BOUNDARY if p equals p0 or p1
-  // ON_UNBOUNDED_SIDE if p lies strictly outside the edge
-{
-  CGAL_triangulation_precondition( ! equal(p0, p1) );
-  CGAL_triangulation_precondition( collinear(p, p0, p1) );
-
-  switch (collinear_position(p0, p, p1)) {
-  case MIDDLE:
-    lt = EDGE;
-    return ON_BOUNDED_SIDE;
-  case SOURCE:
-    lt = VERTEX;
-    i = 0;
-    return ON_BOUNDARY;
-  case TARGET:
-    lt = VERTEX;
-    i = 1;
-    return ON_BOUNDARY;
-  default: // case BEFORE: case AFTER:
-    lt = OUTSIDE_CONVEX_HULL;
-    return ON_UNBOUNDED_SIDE;
-  }
-}
-
-template < class GT, class Tds, class Lds >
-Bounded_side
-Triangulation_3<GT,Tds,Lds>::
-side_of_edge(const Point & p,
-             Cell_handle c,
-             Locate_type & lt, int & li) const
-  // supposes dimension 1 otherwise does not work for infinite edges
-  // returns :
-  // ON_BOUNDED_SIDE if p inside the edge
-  // (for an infinite edge this means that p lies in the half line
-  // defined by the vertex)
-  // ON_BOUNDARY if p equals one of the vertices
-  // ON_UNBOUNDED_SIDE if p lies outside the edge
-  // (for an infinite edge this means that p lies on the other half line)
-  // lt has a meaning when ON_BOUNDED_SIDE and ON_BOUNDARY
-  // li refer to indices in the cell c
-{
-  CGAL_triangulation_precondition( dimension() == 1 );
-  if ( ! is_infinite(c,0,1) )
-    return side_of_segment(p, c->vertex(0)->point(), c->vertex(1)->point(),
-                           lt, li);
-  // else infinite edge
-  int inf = c->index(infinite);
-  switch (collinear_position(c->vertex(1-inf)->point(), p,
-                             mirror_vertex(c, inf)->point())) {
-      case SOURCE:
-          lt = VERTEX;
-          li = 1-inf;
-          return ON_BOUNDARY;
-      case BEFORE:
-          lt = EDGE;
-          return ON_BOUNDED_SIDE;
-      default: // case MIDDLE: case AFTER: case TARGET:
-          return ON_UNBOUNDED_SIDE;
-  }
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-flip( Cell_handle c, int i )
-{
-  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
-                                   && (number_of_vertices() >= 5) );
-
-  Cell_handle n = c->neighbor(i);
-  int in = n->index(c);
-  if ( is_infinite( c ) || is_infinite( n ) ) return false;
-
-  if ( i%2 == 1 ) {
-    if ( orientation( c->vertex((i+1)&3)->point(),
-                      c->vertex((i+2)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-    if ( orientation( c->vertex((i+2)&3)->point(),
-                      c->vertex((i+3)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-    if ( orientation( c->vertex((i+3)&3)->point(),
-                      c->vertex((i+1)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-  }
-  else {
-    if ( orientation( c->vertex((i+2)&3)->point(),
-                      c->vertex((i+1)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-    if ( orientation( c->vertex((i+3)&3)->point(),
-                      c->vertex((i+2)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-    if ( orientation( c->vertex((i+1)&3)->point(),
-                      c->vertex((i+3)&3)->point(),
-                      n->vertex(in)->point(),
-                      c->vertex(i)->point() )
-         != POSITIVE ) return false;
-  }
-
-  _tds.flip_flippable(c, i);
-  return true;
-}
-
-template < class GT, class Tds, class Lds >
-void
-Triangulation_3<GT,Tds,Lds>::
-flip_flippable( Cell_handle c, int i )
-{
-  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
-                                   && (number_of_vertices() >= 5) );
-  CGAL_triangulation_precondition_code( Cell_handle n = c->neighbor(i); );
-  CGAL_triangulation_precondition_code( int in = n->index(c); );
-  CGAL_triangulation_precondition( ( ! is_infinite( c ) ) &&
-                                   ( ! is_infinite( n ) ) );
-
-  if ( i%2 == 1 ) {
-    CGAL_triangulation_precondition( orientation( c->vertex((i+1)&3)->point(),
-                                                  c->vertex((i+2)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-    CGAL_triangulation_precondition( orientation( c->vertex((i+2)&3)->point(),
-                                                  c->vertex((i+3)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-    CGAL_triangulation_precondition( orientation( c->vertex((i+3)&3)->point(),
-                                                  c->vertex((i+1)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-  }
-  else {
-    CGAL_triangulation_precondition( orientation( c->vertex((i+2)&3)->point(),
-                                                  c->vertex((i+1)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-    CGAL_triangulation_precondition( orientation( c->vertex((i+3)&3)->point(),
-                                                  c->vertex((i+2)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-    CGAL_triangulation_precondition( orientation( c->vertex((i+1)&3)->point(),
-                                                  c->vertex((i+3)&3)->point(),
-                                                  n->vertex(in)->point(),
-                                                  c->vertex(i)->point() )
-                                     == POSITIVE );
-  }
-
-  _tds.flip_flippable(c, i);
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-flip( Cell_handle c, int i, int j )
-  // flips edge i,j of cell c
-{
-  CGAL_triangulation_precondition( (dimension() == 3)
-                                   && (0<=i) && (i<4)
-                                   && (0<=j) && (j<4)
-                                   && ( i != j )
-                                   && (number_of_vertices() >= 5) );
-
-  // checks that degree 3 and not on the convex hull
-  int degree = 0;
-  Cell_circulator ccir = incident_cells(c,i,j);
-  Cell_circulator cdone = ccir;
-  do {
-    if ( is_infinite(ccir) ) return false;
-    ++degree;
-    ++ccir;
-  } while ( ccir != cdone );
-
-  if ( degree != 3 ) return false;
-
-  // checks that future tetrahedra are well oriented
-  Cell_handle n = c->neighbor( next_around_edge(i,j) );
-  int in = n->index( c->vertex(i) );
-  int jn = n->index( c->vertex(j) );
-  if ( orientation( c->vertex(next_around_edge(i,j))->point(),
-                    c->vertex(next_around_edge(j,i))->point(),
-                    n->vertex(next_around_edge(jn,in))->point(),
-                    c->vertex(j)->point() )
-       != POSITIVE ) return false;
-  if ( orientation( c->vertex(i)->point(),
-                    c->vertex(next_around_edge(j,i))->point(),
-                    n->vertex(next_around_edge(jn,in))->point(),
-                    c->vertex(next_around_edge(i,j))->point() )
-       != POSITIVE ) return false;
-
-  _tds.flip_flippable(c, i, j);
-  return true;
-}
-
-template < class GT, class Tds, class Lds >
-void
-Triangulation_3<GT,Tds,Lds>::
-flip_flippable( Cell_handle c, int i, int j )
-  // flips edge i,j of cell c
-{
-#if !defined CGAL_TRIANGULATION_NO_PRECONDITIONS && \
-    !defined CGAL_NO_PRECONDITIONS && !defined NDEBUG
-  CGAL_triangulation_precondition( (dimension() == 3)
-                                   && (0<=i) && (i<4)
-                                   && (0<=j) && (j<4)
-                                   && ( i != j )
-                                   && (number_of_vertices() >= 5) );
-  int degree = 0;
-  Cell_circulator ccir = incident_cells(c,i,j);
-  Cell_circulator cdone = ccir;
-  do {
-    CGAL_triangulation_precondition( ! is_infinite(ccir) );
-    ++degree;
-    ++ccir;
-  } while ( ccir != cdone );
-  CGAL_triangulation_precondition( degree == 3 );
-
-  Cell_handle n = c->neighbor( next_around_edge(i, j) );
-  int in = n->index( c->vertex(i) );
-  int jn = n->index( c->vertex(j) );
-  CGAL_triangulation_precondition
-    ( orientation( c->vertex(next_around_edge(i,j))->point(),
-                   c->vertex(next_around_edge(j,i))->point(),
-                   n->vertex(next_around_edge(jn,in))->point(),
-                   c->vertex(j)->point() ) == POSITIVE );
-  CGAL_triangulation_precondition
-    ( orientation( c->vertex(i)->point(),
-                   c->vertex(next_around_edge(j,i))->point(),
-                   n->vertex(next_around_edge(jn,in))->point(),
-                   c->vertex(next_around_edge(i,j))->point() ) == POSITIVE );
-#endif
-  _tds.flip_flippable(c, i, j);
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert(const Point & p, Cell_handle start)
-{
-  Locate_type lt;
-  int li, lj;
-  Cell_handle c = locate( p, lt, li, lj, start);
-  return insert(p, lt, c, li, lj);
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert(const Point & p, Locate_type lt, Cell_handle c, int li, int lj)
-{
-  switch (lt) {
-  case VERTEX:
-    return c->vertex(li);
-  case EDGE:
-    return insert_in_edge(p, c, li, lj);
-  case FACET:
-    return insert_in_facet(p, c, li);
-  case CELL:
-    return insert_in_cell(p, c);
-  case OUTSIDE_CONVEX_HULL:
-    return insert_outside_convex_hull(p, c);
-  case OUTSIDE_AFFINE_HULL:
-  default:
-    return insert_outside_affine_hull(p);
-  }
-}
-
-
-
-template < class GT, class Tds, class Lds >
-template < class Conflict_tester, class Hidden_points_visitor >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_in_conflict(const Point & p,
-                   Locate_type lt, Cell_handle c, int li, int /*lj*/,
-                   const Conflict_tester &tester,
-                   Hidden_points_visitor &hider,
-                   bool *could_lock_zone)
-{
-  if (could_lock_zone)
-    *could_lock_zone = true;
-
-  switch (dimension()) {
-  case 3:
-    {
-      if ((lt == VERTEX) &&
-          (tester.compare_weight(c->vertex(li)->point(), p)==0) ) {
-        return c->vertex(li);
-      }
-      // If the new point is not in conflict with its cell, it is hidden.
-      if (!tester.test_initial_cell(c)) {
-        hider.hide_point(c,p);
-        return Vertex_handle();
-      }
-
-      // Ok, we really insert the point now.
-      // First, find the conflict region.
-      std::vector<Cell_handle> cells;
-      Facet facet;
-
-      cells.reserve(32);
-
-      // Parallel
-      if (could_lock_zone)
-      {
-        std::vector<Facet> facets;
-        facets.reserve(32);
-
-        find_conflicts(
-          c,
-          tester,
-          make_triple(
-            std::back_inserter(facets),
-                                    std::back_inserter(cells),
-            Emptyset_iterator()),
-          could_lock_zone);
-
-        if (*could_lock_zone == false)
-        {
-          BOOST_FOREACH(Cell_handle& ch,
-            std::make_pair(cells.begin(), cells.end()))
-          {
-            ch->tds_data().clear();
-          }
-
-          BOOST_FOREACH(Facet& f,
-            std::make_pair(facets.begin(), facets.end()))
-          {
-            f.first->neighbor(f.second)->tds_data().clear();
-          }
-          return Vertex_handle();
-        }
-
-        facet = facets.back();
-      }
-      // Sequential
-      else
-      {
-        cells.reserve(32);
-        find_conflicts(
-          c,
-          tester,
-          make_triple(
-            Oneset_iterator<Facet>(facet),
-                                    std::back_inserter(cells),
-                                    Emptyset_iterator()));
-      }
-
-
-      // Remember the points that are hidden by the conflicting cells,
-      // as they will be deleted during the insertion.
-      hider.process_cells_in_conflict(cells.begin(), cells.end());
-
-      Vertex_handle v = _insert_in_hole(p, cells.begin(), cells.end(),
-                                        facet.first, facet.second);
-
-      // Store the hidden points in their new cells.
-      hider.reinsert_vertices(v);
-      return v;
-    }
-  case 2:
-    {
-      // This check is added compared to the 3D case
-      if (lt == OUTSIDE_AFFINE_HULL)
-        return insert_outside_affine_hull (p);
-
-      if ((lt == VERTEX) &&
-          (tester.compare_weight(c->vertex(li)->point(), p)==0) ) {
-        return c->vertex(li);
-      }
-      // If the new point is not in conflict with its cell, it is hidden.
-      if (!tester.test_initial_cell(c)) {
-        hider.hide_point(c,p);
-        return Vertex_handle();
-      }
-
-      // Ok, we really insert the point now.
-      // First, find the conflict region.
-      std::vector<Cell_handle> cells;
-      Facet facet;
-
-      cells.reserve(32);
-      find_conflicts
-        (c, tester, make_triple(Oneset_iterator<Facet>(facet),
-                                std::back_inserter(cells),
-                                Emptyset_iterator()));
-
-      // Remember the points that are hidden by the conflicting cells,
-      // as they will be deleted during the insertion.
-      hider.process_cells_in_conflict(cells.begin(), cells.end());
-
-      Vertex_handle v = _insert_in_hole(p, cells.begin(), cells.end(),
-                                        facet.first, facet.second);
-
-      // Store the hidden points in their new cells.
-      hider.reinsert_vertices(v);
-      return v;
-    }
-  default:
-    {
-      // dimension() <= 1
-      if (lt == OUTSIDE_AFFINE_HULL)
-        return insert_outside_affine_hull (p);
-
-      if (lt == VERTEX &&
-          tester.compare_weight(c->vertex(li)->point(), p) == 0) {
-        return c->vertex(li);
-      }
-
-      // If the new point is not in conflict with its cell, it is hidden.
-      if (! tester.test_initial_cell(c)) {
-        hider.hide_point(c,p);
-        return Vertex_handle();
-      }
-
-      if (dimension() == 0) {
-        return hider.replace_vertex(c, li, p);
-      }
-
-
-      // dimension() == 1;
-
-      // Ok, we really insert the point now.
-      // First, find the conflict region.
-      std::vector<Cell_handle> cells;
-      Facet facet;
-      Cell_handle bound[2];
-      // corresponding index: bound[j]->neighbor(1-j) is in conflict.
-
-      // We get all cells in conflict,
-      // and remember the 2 external boundaries.
-      cells.push_back(c);
-
-      for (int j = 0; j<2; ++j) {
-        Cell_handle n = c->neighbor(j);
-        while ( tester(n) ) {
-          cells.push_back(n);
-          n = n->neighbor(j);
-        }
-        bound[j] = n;
-      }
-
-      // Insertion.
-      hider.process_cells_in_conflict(cells.begin(), cells.end());
-
-      tds().delete_cells(cells.begin(), cells.end());
-
-      // We preserve the order (like the orientation in 2D-3D).
-      Vertex_handle v = tds().create_vertex();
-      Cell_handle c0 = tds().create_face(v, bound[0]->vertex(0), Vertex_handle());
-      Cell_handle c1 = tds().create_face(bound[1]->vertex(1), v, Vertex_handle());
-      tds().set_adjacency(c0, 1, c1, 0);
-      tds().set_adjacency(bound[0], 1, c0, 0);
-      tds().set_adjacency(c1, 1, bound[1], 0);
-      bound[0]->vertex(0)->set_cell(bound[0]);
-      bound[1]->vertex(1)->set_cell(bound[1]);
-      v->set_cell(c0);
-      v->set_point (p);
-
-      hider.reinsert_vertices(v);
-
-      return v;
-    }
-  }
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_in_cell(const Point & p, Cell_handle c)
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-  CGAL_triangulation_precondition_code
-    ( Locate_type lt;
-      int i; int j; );
-  CGAL_triangulation_precondition
-    ( side_of_tetrahedron( p,
-                           c->vertex(0)->point(),
-                           c->vertex(1)->point(),
-                           c->vertex(2)->point(),
-                           c->vertex(3)->point(),
-                           lt,i,j ) == ON_BOUNDED_SIDE );
-
-    Vertex_handle v = _tds.insert_in_cell(c);
-    v->set_point(p);
-    return v;
-}
-
-template < class GT, class Tds, class Lds >
-inline
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_in_facet(const Point & p, Cell_handle c, int i)
-{
-  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3);
-  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
-                                || (dimension() == 3 && i >= 0 && i <= 3) );
-  CGAL_triangulation_exactness_precondition_code
-    ( Locate_type lt;
-      int li; int lj; );
-  CGAL_triangulation_exactness_precondition
-    ( coplanar( p, c->vertex((i+1)&3)->point(),
-                   c->vertex((i+2)&3)->point(),
-                   c->vertex((i+3)&3)->point() )
-      &&
-      side_of_triangle( p,
-                        c->vertex((i+1)&3)->point(),
-                        c->vertex((i+2)&3)->point(),
-                        c->vertex((i+3)&3)->point(),
-                        lt, li, lj) == ON_BOUNDED_SIDE );
-
-    Vertex_handle v = _tds.insert_in_facet(c, i);
-    v->set_point(p);
-    return v;
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_in_edge(const Point & p, Cell_handle c, int i, int j)
-{
-  CGAL_triangulation_precondition( i != j );
-  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
-  CGAL_triangulation_precondition( i >= 0 && i <= dimension()
-                                   && j >= 0 && j <= dimension() );
-  CGAL_triangulation_exactness_precondition_code( Locate_type lt; int li; );
-  switch ( dimension() ) {
-  case 3:
-  case 2:
-    {
-      CGAL_triangulation_precondition( ! is_infinite(c, i, j) );
-      CGAL_triangulation_exactness_precondition(
-                         collinear( c->vertex(i)->point(),
-                                    p,
-                                    c->vertex(j)->point() )
-                      && side_of_segment( p,
-                                          c->vertex(i)->point(),
-                                          c->vertex(j)->point(),
-                                          lt, li ) == ON_BOUNDED_SIDE );
-      break;
-    }
-  case 1:
-    {
-      CGAL_triangulation_exactness_precondition( side_of_edge(p, c, lt, li)
-                                                 == ON_BOUNDED_SIDE );
-      break;
-    }
-  }
-
-  Vertex_handle v = _tds.insert_in_edge(c, i, j);
-  v->set_point(p);
-  return v;
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_outside_convex_hull(const Point & p, Cell_handle c)
-  // c is an infinite cell containing p
-  // p is strictly outside the convex hull
-  // dimension 0 not allowed, use outside-affine-hull
-{
-  CGAL_triangulation_precondition( dimension() > 0 );
-  CGAL_triangulation_precondition( c->has_vertex(infinite) );
-  // the precondition that p is in c is tested in each of the
-  // insertion methods called from this method
-  switch ( dimension() ) {
-  case 1:
-    {
-      // 	// p lies in the infinite edge neighboring c
-      // 	// on the other side of li
-      // 	return insert_in_edge(p,c->neighbor(1-li),0,1);
-      return insert_in_edge(p,c,0,1);
-    }
-  case 2:
-    {
-      Conflict_tester_outside_convex_hull_2 tester(p, this);
-      Vertex_handle v = insert_conflict(c, tester);
-      v->set_point(p);
-      return v;
-    }
-  default: // case 3:
-    {
-      Conflict_tester_outside_convex_hull_3 tester(p, this);
-      Vertex_handle v = insert_conflict(c, tester);
-      v->set_point(p);
-      return v;
-    }
-  }
-}
-
-template < class GT, class Tds, class Lds >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::
-insert_outside_affine_hull(const Point & p)
-{
-  CGAL_triangulation_precondition( dimension() < 3 );
-  bool reorient;
-  switch ( dimension() ) {
-  case 1:
-    {
-      Cell_handle c = infinite_cell();
-      Cell_handle n = c->neighbor(c->index(infinite_vertex()));
-      Orientation o = coplanar_orientation(n->vertex(0)->point(),
-                                           n->vertex(1)->point(), p);
-      CGAL_triangulation_precondition ( o != COLLINEAR );
-      reorient = o == NEGATIVE;
-      break;
-    }
-  case 2:
-    {
-      Cell_handle c = infinite_cell();
-      Cell_handle n = c->neighbor(c->index(infinite_vertex()));
-      Orientation o = orientation( n->vertex(0)->point(),
-                                   n->vertex(1)->point(),
-                                   n->vertex(2)->point(), p );
-      CGAL_triangulation_precondition ( o != COPLANAR );
-      reorient = o == NEGATIVE;
-      break;
-    }
-  default:
-    reorient = false;
-  }
-
-  Vertex_handle v = _tds.insert_increase_dimension(infinite_vertex());
-  v->set_point(p);
-
-  if (reorient)
-      _tds.reorient();
-
-  return v;
-}
-
-template < class GT, class Tds, class Lds >
-template < class OutputItCells >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point  &p,
-                                                   OutputItCells fit,
-                                                   Cell_handle start)
-{
-  Vertex_handle v = insert(p, start);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-template < class GT, class Tds, class Lds >
-template < class OutputItCells >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point& p,
-                                                   OutputItCells fit,
-                                                   Vertex_handle hint)
-{
-  Vertex_handle v = insert(p, hint);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-template < class GT, class Tds, class Lds >
-template < class OutputItCells >
-typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
-Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point& p,
-                                                   Locate_type lt,
-                                                   Cell_handle c, int li, int lj,
-                                                   OutputItCells fit)
-{
-  Vertex_handle v = insert(p, lt, c, li, lj);
-  int dimension = this->dimension();
-  if(dimension == 3) this->incident_cells(v, fit);
-  else if(dimension == 2)
-  {
-    Cell_handle c = v->cell(), end = c;
-    do {
-      *fit++ = c;
-      int i = c->index(v);
-      c = c->neighbor((i+1)%3);
-    } while(c != end);
-  }
-  else if(dimension == 1)
-  {
-    Cell_handle c = v->cell();
-    *fit++ = c;
-    *fit++ = c->neighbor((~(c->index(v)))&1);
-  }
-  else *fit++ = v->cell(); // dimension = 0
-  return v;
-}
-
-template <class Gt, class Tds, class Lds>
-typename Triangulation_3<Gt,Tds,Lds>::Vertex_triple
-Triangulation_3<Gt,Tds,Lds>::
-make_vertex_triple(const Facet& f) const
-{
-  Cell_handle ch = f.first;
-  int i = f.second;
-
-  return Vertex_triple(ch->vertex(vertex_triple_index(i,0)),
-      ch->vertex(vertex_triple_index(i,1)),
-      ch->vertex(vertex_triple_index(i,2)));
-}
-
-template <class Gt, class Tds, class Lds>
-void
-Triangulation_3<Gt,Tds,Lds>::
-make_canonical(Vertex_triple& t) const
-{
-  int i = (t.first < t.second) ? 0 : 1;
-  if(i==0) {
-    i = (t.first < t.third) ? 0 : 2;
-  } else {
-    i = (t.second < t.third) ? 1 : 2;
-  }
-  Vertex_handle tmp;
-  switch(i){
-  case 0: return;
-  case 1:
-    tmp = t.first;
-    t.first = t.second;
-    t.second = t.third;
-    t.third = tmp;
-    return;
-  default:
-    tmp = t.first;
-    t.first = t.third;
-    t.third = t.second;
-    t.second = tmp;
-  }
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-test_dim_down(Vertex_handle v) const
-  // tests whether removing v decreases the dimension of the triangulation
-  // true iff
-  // v is incident to all finite cells/facets
-  // and all the other vertices are coplanar/collinear in dim3/2.
-{
-  CGAL_triangulation_precondition(dimension() >= 0);
-  CGAL_triangulation_precondition(! is_infinite(v) );
-
-  if (dimension() == 3) {
-      Finite_cells_iterator cit = finite_cells_begin();
-
-      int iv;
-      if ( ! cit->has_vertex(v,iv) )
-          return false;
-      const Point &p1=cit->vertex((iv+1)&3)->point();
-      const Point &p2=cit->vertex((iv+2)&3)->point();
-      const Point &p3=cit->vertex((iv+3)&3)->point();
-      ++cit;
-
-      for (; cit != finite_cells_end(); ++cit ) {
-          if ( ! cit->has_vertex(v,iv) )
-              return false;
-          for (int i=1; i<4; i++ )
-              if ( !coplanar(p1,p2,p3,cit->vertex((iv+i)&3)->point()) )
-                  return false;
-      }
-  }
-  else if (dimension() == 2)
-  {
-      Finite_facets_iterator cit = finite_facets_begin();
-
-      int iv;
-      if ( ! cit->first->has_vertex(v,iv) )
-          return false;
-      const Point &p1 = cit->first->vertex(cw(iv))->point();
-      const Point &p2 = cit->first->vertex(ccw(iv))->point();
-      ++cit;
-
-      for (; cit != finite_facets_end(); ++cit ) {
-          if ( ! cit->first->has_vertex(v,iv) )
-              return false;
-          if ( !collinear(p1, p2, cit->first->vertex(cw(iv))->point()) ||
-               !collinear(p1, p2, cit->first->vertex(ccw(iv))->point()) )
-              return false;
-      }
-  }
-  else // dimension() == 1 or 0
-      return number_of_vertices() == (size_type) dimension() + 1;
-
-  return true;
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-test_dim_down_using_incident_cells_3(
-  Vertex_handle v, std::vector<Cell_handle> &incident_cells,
-  std::vector<Vertex_handle> &adj_vertices,
-  bool *could_lock_zone) const
-{
-  CGAL_triangulation_precondition(dimension() == 3);
-  CGAL_triangulation_precondition(! is_infinite(v) );
-
-  // Collect all vertices on the boundary
-  // and all incident cells
-  if (could_lock_zone)
-  {
-    *could_lock_zone = try_lock_and_get_adjacent_vertices_and_cells_3(
-      v, std::back_inserter(adj_vertices), incident_cells);
-    if (*could_lock_zone == false)
-      return false;
-  }
-  else
-  {
-    adjacent_vertices_and_cells_3(
-      v, std::back_inserter(adj_vertices), incident_cells);
-  }
-
-  typedef Filter_iterator< typename std::vector<Vertex_handle>::const_iterator,
-                           Infinite_tester
-                         > Finite_vertex_iterator;
-  Finite_vertex_iterator vit(
-    adj_vertices.end(), Infinite_tester(this), adj_vertices.begin());
-  Finite_vertex_iterator vit_end(
-    adj_vertices.end(), Infinite_tester(this));
-  const Point &p1 = (*vit++)->point();
-  const Point &p2 = (*vit++)->point();
-  const Point &p3 = (*vit++)->point();
-
-  for ( ; vit != vit_end ; ++vit )
-  {
-          if (!coplanar(p1, p2, p3, (*vit)->point()))
-            return false;
-  }
-
-  for (typename std::vector<Cell_handle>::const_iterator it_inc_cell
-         = incident_cells.begin() ;
-       it_inc_cell != incident_cells.end() ;
-       ++it_inc_cell)
-  {
-    if (!is_infinite(*it_inc_cell))
-      return is_infinite(mirror_vertex(
-        *it_inc_cell, (*it_inc_cell)->index(v)));
-  }
-
-  return true;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-make_hole_2D(Vertex_handle v, std::list<Edge_2D> &hole, VertexRemover &remover)
-{
-  std::vector<Cell_handle> to_delete;
-  to_delete.reserve(32);
-
-  Face_circulator fc = tds().incident_faces(v);
-  Face_circulator done(fc);
-
-  // We prepare for deleting all interior cells.
-  // We ->set_cell() pointers to cells outside the hole.
-  // We push the Edges_2D of the boundary (seen from outside) in "hole".
-  do {
-    Cell_handle f = fc;
-    int i = f->index(v);
-    Cell_handle fn = f->neighbor(i);
-    int in = fn->index(f);
-
-    f->vertex(cw(i))->set_cell(fn);
-    fn->set_neighbor(in, Cell_handle());
-
-    hole.push_back(Edge_2D(fn, in));
-    remover.add_hidden_points(f);
-    to_delete.push_back(f);
-
-    ++fc;
-  } while (fc != done);
-
-  tds().delete_cells(to_delete.begin(), to_delete.end());
-  return remover;
-}
-
-// this one also erases a set of cells
-// which is useful to the move method
-// outputting newly created cells
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-make_hole_2D(Vertex_handle v, std::list<Edge_2D> &hole, VertexRemover &remover,
-             std::set<Cell_handle> &cells_set)
-{
-  std::vector<Cell_handle> to_delete;
-  to_delete.reserve(32);
-
-  Face_circulator fc = tds().incident_faces(v);
-  Face_circulator done(fc);
-
-  // We prepare for deleting all interior cells.
-  // We ->set_cell() pointers to cells outside the hole.
-  // We push the Edges_2D of the boundary (seen from outside) in "hole".
-  do {
-    Cell_handle f = fc;
-    int i = f->index(v);
-    Cell_handle fn = f->neighbor(i);
-    int in = fn->index(f);
-
-    f->vertex(cw(i))->set_cell(fn);
-    fn->set_neighbor(in, Cell_handle());
-
-    hole.push_back(Edge_2D(fn, in));
-    remover.add_hidden_points(f);
-    to_delete.push_back(f);
-
-    ++fc;
-  } while (fc != done);
-
-  for(typename std::vector<Cell_handle>::const_iterator ib = to_delete.begin(),
-        iend = to_delete.end(); ib != iend; ib++) cells_set.erase(*ib);
-
-  tds().delete_cells(to_delete.begin(), to_delete.end());
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-void
-Triangulation_3<Gt, Tds, Lds>::
-fill_hole_2D(std::list<Edge_2D> & first_hole, VertexRemover &remover)
-{
-  typedef std::list<Edge_2D> Hole;
-
-  std::vector<Hole> hole_list;
-
-  Cell_handle  f, ff, fn;
-  int i, ii, in;
-
-  hole_list.push_back(first_hole);
-
-  while( ! hole_list.empty())
-    {
-      Hole hole = hole_list.back();
-      hole_list.pop_back();
-
-      // if the hole has only three edges, create the triangle
-      if (hole.size() == 3) {
-        typename Hole::iterator hit = hole.begin();
-        f = (*hit).first;        i = (*hit).second;
-        ff = (* ++hit).first;    ii = (*hit).second;
-        fn = (* ++hit).first;    in = (*hit).second;
-        tds().create_face(f, i, ff, ii, fn, in);
-        continue;
-      }
-
-      // else find an edge with two finite vertices
-      // on the hole boundary
-      // and the new triangle adjacent to that edge
-      //  cut the hole and push it back
-
-      // first, ensure that a neighboring face
-      // whose vertices on the hole boundary are finite
-      // is the first of the hole
-      while (1) {
-        ff = (hole.front()).first;
-        ii = (hole.front()).second;
-        if ( is_infinite(ff->vertex(cw(ii))) ||
-             is_infinite(ff->vertex(ccw(ii)))) {
-          hole.push_back(hole.front());
-          hole.pop_front();
-        }
-        else
-            break;
-      }
-
-      // take the first neighboring face and pop it;
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-      hole.pop_front();
-
-      Vertex_handle v0 = ff->vertex(cw(ii));
-      Vertex_handle v1 = ff->vertex(ccw(ii));
-      Vertex_handle v2 = infinite_vertex();
-      const Point &p0 = v0->point();
-      const Point &p1 = v1->point();
-      const Point *p2 = NULL; // Initialize to NULL to avoid warning.
-
-      typename Hole::iterator hdone = hole.end();
-      typename Hole::iterator hit = hole.begin();
-      typename Hole::iterator cut_after(hit);
-
-      // if tested vertex is c with respect to the vertex opposite
-      // to NULL neighbor,
-      // stop at the before last face;
-      hdone--;
-      for (; hit != hdone; ++hit) {
-        fn = hit->first;
-        in = hit->second;
-        Vertex_handle vv = fn->vertex(ccw(in));
-        if (is_infinite(vv)) {
-          if (is_infinite(v2))
-              cut_after = hit;
-        }
-        else {     // vv is a finite vertex
-          const Point &p = vv->point();
-          if (coplanar_orientation(p0, p1, p) == COUNTERCLOCKWISE) {
-            if (is_infinite(v2) ||
-                remover.side_of_bounded_circle(p0, p1, *p2, p, true)
-                  == ON_BOUNDED_SIDE) {
-                v2 = vv;
-                p2 = &p;
-                cut_after = hit;
-            }
-          }
-        }
-      }
-
-      // create new triangle and update adjacency relations
-      Cell_handle newf;
-
-      //update the hole and push back in the Hole_List stack
-      // if v2 belongs to the neighbor following or preceding *f
-      // the hole remain a single hole
-      // otherwise it is split in two holes
-
-      fn = (hole.front()).first;
-      in = (hole.front()).second;
-      if (fn->has_vertex(v2, i) && i == ccw(in)) {
-        newf = tds().create_face(ff, ii, fn, in);
-        hole.pop_front();
-        hole.push_front(Edge_2D(newf, 1));
-        hole_list.push_back(hole);
-      }
-      else{
-        fn = (hole.back()).first;
-        in = (hole.back()).second;
-        if (fn->has_vertex(v2, i) && i == cw(in)) {
-          newf = tds().create_face(fn, in, ff, ii);
-          hole.pop_back();
-          hole.push_back(Edge_2D(newf, 1));
-          hole_list.push_back(hole);
-        }
-        else{
-          // split the hole in two holes
-          newf = tds().create_face(ff, ii, v2);
-          Hole new_hole;
-          ++cut_after;
-          while( hole.begin() != cut_after )
-            {
-              new_hole.push_back(hole.front());
-              hole.pop_front();
-            }
-
-          hole.push_front(Edge_2D(newf, 1));
-          new_hole.push_front(Edge_2D(newf, 0));
-          hole_list.push_back(hole);
-          hole_list.push_back(new_hole);
-        }
-      }
-    }
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-void
-Triangulation_3<Gt, Tds, Lds>::
-fill_hole_2D(std::list<Edge_2D> & first_hole, VertexRemover &remover,
-             OutputItCells fit)
-{
-  typedef std::list<Edge_2D> Hole;
-
-  std::vector<Hole> hole_list;
-
-  Cell_handle  f, ff, fn;
-  int i, ii, in;
-
-  hole_list.push_back(first_hole);
-
-  while( ! hole_list.empty())
-  {
-    Hole hole = hole_list.back();
-    hole_list.pop_back();
-
-    // if the hole has only three edges, create the triangle
-    if (hole.size() == 3) {
-      typename Hole::iterator hit = hole.begin();
-      f = (*hit).first;        i = (*hit).second;
-      ff = (* ++hit).first;    ii = (*hit).second;
-      fn = (* ++hit).first;    in = (*hit).second;
-      *fit++ = tds().create_face(f, i, ff, ii, fn, in);
-      continue;
-    }
-
-    // else find an edge with two finite vertices
-    // on the hole boundary
-    // and the new triangle adjacent to that edge
-    //  cut the hole and push it back
-
-    // first, ensure that a neighboring face
-    // whose vertices on the hole boundary are finite
-    // is the first of the hole
-    while (1) {
-      ff = (hole.front()).first;
-      ii = (hole.front()).second;
-      if ( is_infinite(ff->vertex(cw(ii))) ||
-           is_infinite(ff->vertex(ccw(ii)))) {
-        hole.push_back(hole.front());
-        hole.pop_front();
-      }
-      else
-        break;
-    }
-
-    // take the first neighboring face and pop it;
-    ff = (hole.front()).first;
-    ii = (hole.front()).second;
-    hole.pop_front();
-
-    Vertex_handle v0 = ff->vertex(cw(ii));
-    Vertex_handle v1 = ff->vertex(ccw(ii));
-    Vertex_handle v2 = infinite_vertex();
-    const Point &p0 = v0->point();
-    const Point &p1 = v1->point();
-    const Point *p2 = NULL; // Initialize to NULL to avoid warning.
-
-    typename Hole::iterator hdone = hole.end();
-    typename Hole::iterator hit = hole.begin();
-    typename Hole::iterator cut_after(hit);
-
-    // if tested vertex is c with respect to the vertex opposite
-    // to NULL neighbor,
-    // stop at the before last face;
-    hdone--;
-    for (; hit != hdone; ++hit) {
-      fn = hit->first;
-      in = hit->second;
-      Vertex_handle vv = fn->vertex(ccw(in));
-      if (is_infinite(vv)) {
-        if (is_infinite(v2))
-          cut_after = hit;
-      }
-      else {     // vv is a finite vertex
-        const Point &p = vv->point();
-        if (coplanar_orientation(p0, p1, p) == COUNTERCLOCKWISE) {
-          if (is_infinite(v2) ||
-              remover.side_of_bounded_circle(p0, p1, *p2, p, true)
-              == ON_BOUNDED_SIDE) {
-            v2 = vv;
-            p2 = &p;
-            cut_after = hit;
-          }
-        }
-      }
-    }
-
-    // create new triangle and update adjacency relations
-    Cell_handle newf;
-
-    //update the hole and push back in the Hole_List stack
-    // if v2 belongs to the neighbor following or preceding *f
-    // the hole remain a single hole
-    // otherwise it is split in two holes
-
-    fn = (hole.front()).first;
-    in = (hole.front()).second;
-    if (fn->has_vertex(v2, i) && i == ccw(in)) {
-      newf = tds().create_face(ff, ii, fn, in);
-      hole.pop_front();
-      hole.push_front(Edge_2D(newf, 1));
-      hole_list.push_back(hole);
-    } else {
-      fn = (hole.back()).first;
-      in = (hole.back()).second;
-      if (fn->has_vertex(v2, i) && i == cw(in)) {
-        newf = tds().create_face(fn, in, ff, ii);
-        hole.pop_back();
-        hole.push_back(Edge_2D(newf, 1));
-        hole_list.push_back(hole);
-      } else {
-        // split the hole in two holes
-        newf = tds().create_face(ff, ii, v2);
-        Hole new_hole;
-        ++cut_after;
-        while( hole.begin() != cut_after )
-        {
-          new_hole.push_back(hole.front());
-          hole.pop_front();
-        }
-        hole.push_front(Edge_2D(newf, 1));
-        new_hole.push_front(Edge_2D(newf, 0));
-        hole_list.push_back(hole);
-        hole_list.push_back(new_hole);
-      }
-    }
-
-    *fit++ = newf;
-
-  }
-}
-
-template <class Gt, class Tds, class Lds>
-void
-Triangulation_3<Gt,Tds,Lds>::
-make_hole_3D( Vertex_handle v,
-              Vertex_triple_Facet_map& outer_map,
-              std::vector<Cell_handle> & hole)
-{
-  CGAL_triangulation_expensive_precondition( ! test_dim_down(v) );
-
-  incident_cells(v, std::back_inserter(hole));
-
-  for (typename std::vector<Cell_handle>::iterator cit = hole.begin(),
-       end = hole.end(); cit != end; ++cit) {
-    int indv = (*cit)->index(v);
-    Cell_handle opp_cit = (*cit)->neighbor( indv );
-    Facet f(opp_cit, opp_cit->index(*cit));
-    Vertex_triple vt = make_vertex_triple(f);
-    make_canonical(vt);
-    outer_map[vt] = f;
-    for (int i=0; i<4; i++)
-      if ( i != indv )
-        (*cit)->vertex(i)->set_cell(opp_cit);
-  }
-}
-
-// When the incident cells are already known
-template <class Gt, class Tds, class Lds>
-void
-Triangulation_3<Gt,Tds,Lds>::
-make_hole_3D( Vertex_handle v,
-              const std::vector<Cell_handle> & incident_cells,
-              Vertex_triple_Facet_map& outer_map)
-{
-  CGAL_triangulation_expensive_precondition( ! test_dim_down(v) );
-
-  for (typename std::vector<Cell_handle>::const_iterator cit = incident_cells.begin(),
-       end = incident_cells.end(); cit != end; ++cit) {
-    int indv = (*cit)->index(v);
-    Cell_handle opp_cit = (*cit)->neighbor( indv );
-    Facet f(opp_cit, opp_cit->index(*cit));
-    Vertex_triple vt = make_vertex_triple(f);
-    make_canonical(vt);
-    outer_map[vt] = f;
-    for (int i=0; i<4; i++)
-      if ( i != indv )
-        (*cit)->vertex(i)->set_cell(opp_cit);
-  }
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt,Tds,Lds>::
-remove_dim_down(Vertex_handle v, VertexRemover &remover)
-{
-    CGAL_triangulation_precondition (dimension() >= 0);
-
-    // Collect all the hidden points.
-    for (All_cells_iterator ci = tds().raw_cells_begin(),
-            end = tds().raw_cells_end(); ci != end; ++ci)
-        remover.add_hidden_points(ci);
-
-    tds().remove_decrease_dimension(v, infinite_vertex());
-
-    // Now try to see if we need to re-orient.
-    if (dimension() == 2) {
-        Facet f = *finite_facets_begin();
-        if (coplanar_orientation(f.first->vertex(0)->point(),
-                                 f.first->vertex(1)->point(),
-                                 f.first->vertex(2)->point()) == NEGATIVE)
-            tds().reorient();
-    }
-
-    return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt,Tds,Lds>::
-remove_1D(Vertex_handle v, VertexRemover &remover)
-{
-    CGAL_triangulation_precondition (dimension() == 1);
-
-    Cell_handle c1 = v->cell();
-    Cell_handle c2 = c1->neighbor(c1->index(v) == 0 ? 1 : 0);
-    remover.add_hidden_points(c1);
-    remover.add_hidden_points(c2);
-
-    tds().remove_from_maximal_dimension_simplex (v);
-
-    return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt,Tds,Lds>::
-remove_2D(Vertex_handle v, VertexRemover &remover)
-{
-    CGAL_triangulation_precondition(dimension() == 2);
-    std::list<Edge_2D> hole;
-    make_hole_2D(v, hole, remover);
-    fill_hole_2D(hole, remover);
-    tds().delete_vertex(v);
-    return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt,Tds,Lds>::
-remove_3D(Vertex_handle v, VertexRemover &remover)
-{
-  std::vector<Cell_handle> hole;
-  hole.reserve(64);
-
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_Facet_map inner_map;
-
-  make_hole_3D(v, outer_map, hole);
-  CGAL_assertion(remover.hidden_points_begin() ==
-      remover.hidden_points_end() );
-
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::iterator
-      hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
-    remover.add_hidden_points(*hi);
-
-  bool inf = false;
-  // collect all vertices on the boundary
-  std::vector<Vertex_handle> vertices;
-  vertices.reserve(64);
-
-  adjacent_vertices(v, std::back_inserter(vertices));
-
-  // create a Delaunay triangulation of the points on the boundary
-  // and make a map from the vertices in remover.tmp towards the vertices
-  // in *this
-
-  unsigned int i = 0;
-  Vertex_handle_unique_hash_map vmap;
-  Cell_handle ch = Cell_handle();
-#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
-  size_t num_vertices = vertices.size();
-  if (num_vertices >= 5)
-  {
-    //std::random_shuffle(vertices.begin(), vertices.end());
-    for (int j = 0 ; j < 4 ; ++j)
-    {
-      if (is_infinite(vertices[j]))
-      {
-        std::swap(vertices[j], vertices[4]);
-        break;
-      }
-    }
-    Orientation o = orientation(
-      vertices[0]->point(),
-      vertices[1]->point(),
-      vertices[2]->point(),
-      vertices[3]->point());
-
-    if (o == NEGATIVE)
-      std::swap(vertices[0], vertices[1]);
-
-    if (o != ZERO)
-    {
-      Vertex_handle vh1, vh2, vh3, vh4;
-      remover.tmp.init_tds(
-        vertices[0]->point(), vertices[1]->point(),
-        vertices[2]->point(), vertices[3]->point(),
-        vh1, vh2, vh3, vh4);
-      ch = vh1->cell();
-      vmap[vh1] = vertices[0];
-      vmap[vh2] = vertices[1];
-      vmap[vh3] = vertices[2];
-      vmap[vh4] = vertices[3];
-      i = 4;
-    }
-  }
-#endif
-
-  for(; i < vertices.size(); i++){
-    if(! is_infinite(vertices[i])){
-      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
-      ch = vh->cell();
-      vmap[vh] = vertices[i];
-    }else {
-      inf = true;
-    }
-  }
-
-  if(remover.tmp.dimension()==2){
-    Vertex_handle fake_inf = remover.tmp.insert(v->point());
-    vmap[fake_inf] = infinite_vertex();
-  } else {
-    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
-  }
-
-  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
-
-  // Construct the set of vertex triples of remover.tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of remover.tmp
-
-  if(inf){
-    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-        end = remover.tmp.all_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  } else {
-      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-        end = remover.tmp.finite_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    while(is_infinite(oit->first.first) ||
-          is_infinite(oit->first.second) ||
-          is_infinite(oit->first.third)){
-      ++oit;
-      // otherwise the lookup in the inner_map fails
-      // because the infinite vertices are different
-    }
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-
-    typename Vertex_triple_Facet_map::iterator iit =
-             inner_map.find(o_vt_f_pair.first);
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-    Cell_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-
-    // create a new cell and glue it to the outer surface
-    Cell_handle new_ch = tds().create_cell();
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-    o_ch->set_neighbor(o_i,new_ch);
-    new_ch->set_neighbor(i_i, o_ch);
-
-    // for the other faces check, if they can also be glued
-    for(i = 0; i < 4; i++){
-      if(i != i_i){
-        Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-          // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-          o_ch2->set_neighbor(o_i2,new_ch);
-          new_ch->set_neighbor(i, o_ch2);
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-  tds().delete_vertex(v);
-  tds().delete_cells(hole.begin(), hole.end());
-
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-VertexRemover&
-Triangulation_3<Gt,Tds,Lds>::
-remove_3D(Vertex_handle v, VertexRemover &remover,
-          const std::vector<Cell_handle> &inc_cells,
-          std::vector<Vertex_handle> &adj_vertices)
-{
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_Facet_map inner_map;
-
-  make_hole_3D(v, inc_cells, outer_map);
-
-  CGAL_assertion(remover.hidden_points_begin() ==
-      remover.hidden_points_end() );
-
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::const_iterator
-      hi = inc_cells.begin(), hend = inc_cells.end(); hi != hend; ++hi)
-    remover.add_hidden_points(*hi);
-
-  bool inf = false;
-
-  // create a Delaunay triangulation of the points on the boundary
-  // and make a map from the vertices in remover.tmp towards the vertices
-  // in *this
-
-  unsigned int i = 0;
-  Vertex_handle_unique_hash_map vmap;
-  Cell_handle ch = Cell_handle();
-#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
-  size_t num_vertices = adj_vertices.size();
-  if (num_vertices >= 5)
-  {
-    //std::random_shuffle(adj_vertices.begin(), adj_vertices.end());
-    for (int j = 0 ; j < 4 ; ++j)
-    {
-      if (is_infinite(adj_vertices[j]))
-      {
-        std::swap(adj_vertices[j], adj_vertices[4]);
-        break;
-      }
-    }
-    Orientation o = orientation(
-      adj_vertices[0]->point(),
-      adj_vertices[1]->point(),
-      adj_vertices[2]->point(),
-      adj_vertices[3]->point());
-
-    if (o == NEGATIVE)
-      std::swap(adj_vertices[0], adj_vertices[1]);
-
-    if (o != ZERO)
-    {
-      Vertex_handle vh1, vh2, vh3, vh4;
-      remover.tmp.init_tds(
-        adj_vertices[0]->point(), adj_vertices[1]->point(),
-        adj_vertices[2]->point(), adj_vertices[3]->point(),
-        vh1, vh2, vh3, vh4);
-      ch = vh1->cell();
-      vmap[vh1] = adj_vertices[0];
-      vmap[vh2] = adj_vertices[1];
-      vmap[vh3] = adj_vertices[2];
-      vmap[vh4] = adj_vertices[3];
-      i = 4;
-    }
-  }
-#endif
-
-  for(; i < adj_vertices.size(); i++){
-    if(! is_infinite(adj_vertices[i])){
-      Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch);
-      ch = vh->cell();
-      vmap[vh] = adj_vertices[i];
-    }else {
-      inf = true;
-    }
-  }
-
-  if(remover.tmp.dimension()==2){
-    Vertex_handle fake_inf = remover.tmp.insert(v->point());
-    vmap[fake_inf] = infinite_vertex();
-  } else {
-    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
-  }
-
-  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
-
-  // Construct the set of vertex triples of remover.tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of remover.tmp
-
-  if(inf){
-    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-        end = remover.tmp.all_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  } else {
-      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-        end = remover.tmp.finite_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    while(is_infinite(oit->first.first) ||
-          is_infinite(oit->first.second) ||
-          is_infinite(oit->first.third)){
-      ++oit;
-      // otherwise the lookup in the inner_map fails
-      // because the infinite vertices are different
-    }
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-
-    typename Vertex_triple_Facet_map::iterator iit =
-             inner_map.find(o_vt_f_pair.first);
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-    Cell_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-
-    // create a new cell and glue it to the outer surface
-    Cell_handle new_ch = tds().create_cell();
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-    o_ch->set_neighbor(o_i,new_ch);
-    new_ch->set_neighbor(i_i, o_ch);
-
-    // for the other faces check, if they can also be glued
-    for(i = 0; i < 4; i++){
-      if(i != i_i){
-        Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-          // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-          o_ch2->set_neighbor(o_i2,new_ch);
-          new_ch->set_neighbor(i, o_ch2);
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-  tds().delete_vertex(v);
-  tds().delete_cells(inc_cells.begin(), inc_cells.end());
-
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-void
-Triangulation_3<Gt, Tds, Lds>::
-remove(Vertex_handle v, VertexRemover &remover) {
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !is_infinite(v));
-  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
-
-  if (test_dim_down (v)) {
-    remove_dim_down (v, remover);
-  }
-  else {
-    switch (dimension()) {
-    case 1: remove_1D (v, remover); break;
-    case 2: remove_2D (v, remover); break;
-    case 3: remove_3D (v, remover); break;
-    default:
-      CGAL_triangulation_assertion (false);
-    }
-  }
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover >
-bool
-Triangulation_3<Gt, Tds, Lds>::
-remove(Vertex_handle v, VertexRemover &remover, bool *could_lock_zone)
-{
-  // N.B.: dimension doesn't need to be atomic since the parallel removal
-  //       will never decrease the dimension (the last few removes are done
-  //       sequentially)
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !is_infinite(v));
-  CGAL_triangulation_precondition( dimension() == 3);
-  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-  static Profile_branch_counter_3 bcounter(
-    "early withdrawals / late withdrawals / successes [Delaunay_tri_3::remove]");
-#endif
-
-  bool removed = true;
-
-  // Locking vertex v is a good start
-  if (!this->try_lock_vertex(v))
-  {
-    *could_lock_zone = false;
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-    bcounter.increment_branch_2(); // THIS is an early withdrawal!
-#endif
-  }
-  else
-  {
-    std::vector<Cell_handle> incident_cells;
-    incident_cells.reserve(64);
-    std::vector<Vertex_handle> adj_vertices;
-    adj_vertices.reserve(64);
-    bool dim_down = test_dim_down_using_incident_cells_3(
-      v, incident_cells, adj_vertices, could_lock_zone);
-
-    if (*could_lock_zone)
-    {
-      if (dim_down)
-        removed = false;
-      else
-        remove_3D (v, remover, incident_cells, adj_vertices);
-    }
-  }
-
-#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
-  if (could_lock_zone)
-  {
-    if (*could_lock_zone)
-      ++bcounter;
-    else
-      bcounter.increment_branch_1(); // THIS is a late withdrawal!
-  }
-#endif
-
-  return removed;
-}
-
-// The remove here uses the remover, but
-// no function envolving hidden points
-// will be used in this internal version
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-remove_dim_down(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
-  remove_dim_down(v, remover);
-  for(All_cells_iterator afi = tds().raw_cells_begin();
-      afi != tds().raw_cells_end();
-      afi++) *fit++ = afi;
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-remove_1D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
-  Point p = v->point();
-  remove_1D(v, remover);
-  *fit++ = locate(p);
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-remove_2D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
-  CGAL_triangulation_precondition(dimension() == 2);
-  std::list<Edge_2D> hole;
-  make_hole_2D(v, hole, remover);
-  fill_hole_2D(hole, remover, fit);
-  tds().delete_vertex(v);
-  return remover;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-VertexRemover&
-Triangulation_3<Gt, Tds, Lds>::
-remove_3D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
-  CGAL_triangulation_precondition(dimension() == 3);
-
-  std::vector<Cell_handle> hole;
-  hole.reserve(64);
-
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_Facet_map inner_map;
-
-  make_hole_3D(v, outer_map, hole);
-
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::iterator
-         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
-    remover.add_hidden_points(*hi);
-
-  bool inf = false;
-  unsigned int i;
-  // collect all vertices on the boundary
-  std::vector<Vertex_handle> vertices;
-  vertices.reserve(64);
-
-  adjacent_vertices(v, std::back_inserter(vertices));
-
-  // create a Delaunay triangulation of the points on the boundary
-  // and make a map from the vertices in remover.tmp towards the vertices
-  // in *this
-
-  Vertex_handle_unique_hash_map vmap;
-  Cell_handle ch = Cell_handle();
-  for(i=0; i < vertices.size(); i++){
-    if(! is_infinite(vertices[i])){
-      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
-      ch = vh->cell();
-      vmap[vh] = vertices[i];
-    }else {
-      inf = true;
-    }
-  }
-
-  if(remover.tmp.dimension()==2){
-    Vertex_handle fake_inf = remover.tmp.insert(v->point());
-    vmap[fake_inf] = infinite_vertex();
-  } else {
-    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
-  }
-
-  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
-
-  // Construct the set of vertex triples of remover.tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of remover.tmp
-
-  if(inf){
-    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-          end = remover.tmp.all_cells_end(); it != end; ++it)
-    {
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  } else {
-    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-        end = remover.tmp.finite_cells_end(); it != end; ++it)
-    {
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    while(is_infinite(oit->first.first) ||
-          is_infinite(oit->first.second) ||
-          is_infinite(oit->first.third)){
-      ++oit;
-      // otherwise the lookup in the inner_map fails
-      // because the infinite vertices are different
-    }
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-
-    typename Vertex_triple_Facet_map::iterator iit =
-             inner_map.find(o_vt_f_pair.first);
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-    Cell_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-
-    // create a new cell and glue it to the outer surface
-    Cell_handle new_ch = tds().create_cell();
-                *fit++ = new_ch;
-
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-    o_ch->set_neighbor(o_i,new_ch);
-    new_ch->set_neighbor(i_i, o_ch);
-
-    // for the other faces check, if they can also be glued
-    for(i = 0; i < 4; i++){
-      if(i != i_i){
-        Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-          // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-          o_ch2->set_neighbor(o_i2,new_ch);
-          new_ch->set_neighbor(i, o_ch2);
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-  tds().delete_vertex(v);
-  tds().delete_cells(hole.begin(), hole.end());
-
-  return remover;
-}
-
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class OutputItCells >
-void
-Triangulation_3<Gt, Tds, Lds>::
-remove_and_give_new_cells(Vertex_handle v, VertexRemover &remover,
-  OutputItCells fit) {
-  CGAL_triangulation_precondition( v != Vertex_handle());
-  CGAL_triangulation_precondition( !is_infinite(v));
-  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
-
-  if (test_dim_down (v)) {
-    remove_dim_down (v, remover, fit);
-  }
-  else {
-    switch (dimension()) {
-    case 1: remove_1D (v, remover, fit); break;
-    case 2: remove_2D (v, remover, fit); break;
-    case 3: remove_3D (v, remover, fit); break;
-    default:
-      CGAL_triangulation_assertion (false);
-    }
-  }
-}
-
-// The VertexInserter is needed so as to
-// allow us the usage of the insertion method
-// from the particular triangulation
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class VertexInserter >
-typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
-Triangulation_3<Gt,Tds,Lds>::
-move_if_no_collision(Vertex_handle v, const Point &p,
-                     VertexRemover &remover, VertexInserter &inserter) {
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;
-  const int dim = dimension();
-
-  // If displacements are known to be small
-  // we might want to optimize by checking
-  // whether there is a topological change
-  // or not before.
-  // In this version this will not be put inside this method
-  // because it is for general purposes,
-  // and remaining Delaunay after motion is a bit too restrictive.
-  // In the filtered version optimized for displacements
-  // it will be used as an a priori.
-  // However, a non-fully optimized but good version of
-  // is_delaunay_after_displacement is provided as an internal method of
-  // Delaunay_triangulation_3 (see the class for more details).
-
-  Locate_type lt;
-  int li, lj;
-  Cell_handle loc = locate(p, lt, li, lj, v->cell());
-
-  if(lt == VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->set_point(p);
-    return v;
-  }
-
-  size_type n_vertices = tds().number_of_vertices();
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
-    v->set_point(p);
-    return v;
-  }
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 2) && (n_vertices == 4)) {
-    v->set_point(p);
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-
-    if(loc->has_vertex(v)) {
-      v->set_point(p);
-    } else {
-      Vertex_handle inserted = insert(p, lt, loc, li, lj);
-      Cell_handle f = v->cell();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Cell_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_cell(f);
-      tds().delete_cell(g);
-      Cell_handle f_ins = inserted->cell();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Cell_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-      v->set_point(p);
-      v->set_cell(inserted->cell());
-      tds().delete_vertex(inserted);
-    }
-    return v;
-  }
-
-  bool dim_down = test_dim_down(v);
-
-  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 2)) {
-    // verify if p and two static vertices are collinear in this case
-    int iinf;
-    Cell_handle finf = infinite_vertex()->cell(), fdone;
-    fdone = finf;
-    do {
-      iinf = finf->index(infinite_vertex());
-      if(!finf->has_vertex(v)) break;
-      finf = finf->neighbor((iinf+1)%3);
-    } while(finf != fdone);
-    iinf = ~iinf;
-    if(this->collinear(finf->vertex(iinf&1)->point(),
-                       finf->vertex(iinf&2)->point(),
-                       p))
-    {
-      v->set_point(p);
-      _tds.decrease_dimension(loc, loc->index(v));
-      return v;
-    }
-  }
-
-  if(((dim == 2) && (lt != OUTSIDE_AFFINE_HULL)) ||
-     ((lt == OUTSIDE_AFFINE_HULL) && (dim == 1)))
-  {
-
-    // This is insert must be from Delaunay (or the particular trian.)
-    // not Triangulation_3 !
-    Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
-
-    std::list<Edge_2D> hole;
-    make_hole_2D(v, hole, remover);
-    fill_hole_2D(hole, remover);
-
-    // fixing pointer
-    Cell_handle fc = inserted->cell(), done(fc);
-    std::vector<Cell_handle> faces_pt;
-    faces_pt.reserve(16);
-    do {
-      faces_pt.push_back(fc);
-      fc = fc->neighbor((fc->index(inserted) + 1)%3);
-    } while(fc != done);
-    std::size_t ss = faces_pt.size();
-    for(std::size_t k=0; k<ss; k++)
-    {
-      Cell_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-    v->set_point(p);
-    v->set_cell(inserted->cell());
-
-    tds().delete_vertex(inserted);
-
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 3)) {
-    // verify if p and two static vertices are collinear in this case
-    std::vector<Cell_handle> ics;
-    incident_cells(infinite_vertex(), std::back_inserter(ics));
-    std::size_t size = ics.size();
-    Cell_handle finf;
-    for (std::size_t i=0; i<size; i++) {
-      finf = ics[i];
-      if(!finf->has_vertex(v)) break;
-    }
-    int iinf = finf->index(infinite_vertex());
-    if(remover.tmp.coplanar(finf->vertex((iinf+1)&3)->point(),
-                            finf->vertex((iinf+2)&3)->point(),
-                            finf->vertex((iinf+3)&3)->point(),
-                            p))
-    {
-      v->set_point(p);
-      _tds.decrease_dimension(loc, loc->index(v));
-      Facet f = *finite_facets_begin();
-      if (coplanar_orientation(f.first->vertex(0)->point(),
-                               f.first->vertex(1)->point(),
-                               f.first->vertex(2)->point()) == NEGATIVE)
-        tds().reorient();
-      restore_edges_after_decrease_dimension(v, remover,inserter);
-      return v;
-    }
-  }
-
-  // This is insert must be from Delaunay (or the particular trian.)
-  // not Triangulation_3 !
-  Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
-
-  std::vector<Cell_handle> hole;
-  hole.reserve(64);
-
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_Facet_map inner_map;
-
-  make_hole_3D(v, outer_map, hole);
-
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::iterator
-         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
-    remover.add_hidden_points(*hi);
-
-  bool inf = false;
-  unsigned int i;
-  // collect all vertices on the boundary
-  std::vector<Vertex_handle> vertices;
-  vertices.reserve(64);
-
-  adjacent_vertices(v, std::back_inserter(vertices));
-
-  // create a Delaunay triangulation of the points on the boundary
-  // and make a map from the vertices in remover.tmp towards the vertices
-  // in *this
-
-  Vertex_handle_unique_hash_map vmap;
-  Cell_handle ch = Cell_handle();
-  for(i=0; i < vertices.size(); i++){
-    if(! is_infinite(vertices[i])){
-      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
-      ch = vh->cell();
-      vmap[vh] = vertices[i];
-    }else {
-      inf = true;
-    }
-  }
-
-  if(remover.tmp.dimension()==2){
-    Vertex_handle fake_inf = remover.tmp.insert(v->point());
-    vmap[fake_inf] = infinite_vertex();
-  } else {
-    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
-  }
-
-  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
-
-  // Construct the set of vertex triples of remover.tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of remover.tmp
-
-  if(inf){
-    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-          end = remover.tmp.all_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  } else {
-    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-          end = remover.tmp.finite_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    while(is_infinite(oit->first.first) ||
-          is_infinite(oit->first.second) ||
-          is_infinite(oit->first.third)){
-      ++oit;
-      // otherwise the lookup in the inner_map fails
-      // because the infinite vertices are different
-    }
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-
-    typename Vertex_triple_Facet_map::iterator iit =
-      inner_map.find(o_vt_f_pair.first);
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-    Cell_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-
-    // create a new cell and glue it to the outer surface
-    Cell_handle new_ch = tds().create_cell();
-
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-    o_ch->set_neighbor(o_i,new_ch);
-    new_ch->set_neighbor(i_i, o_ch);
-
-    // for the other faces check, if they can also be glued
-    for(i = 0; i < 4; i++){
-      if(i != i_i){
-        Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-          // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-          o_ch2->set_neighbor(o_i2,new_ch);
-          new_ch->set_neighbor(i, o_ch2);
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-
-  // fixing pointer
-  std::vector<Cell_handle> cells_pt;
-  cells_pt.reserve(64);
-  incident_cells(inserted, std::back_inserter(cells_pt));
-  std::size_t size = cells_pt.size();
-  for(std::size_t i=0; i<size; i++) {
-    Cell_handle c = cells_pt[i];
-    c->set_vertex(c->index(inserted), v);
-  }
-  v->set_point(p);
-  v->set_cell(inserted->cell());
-  tds().delete_vertex(inserted);
-  tds().delete_cells(hole.begin(), hole.end());
-  return v;
-} // end of Vertex_handle
-  // Triangulation_3<Gt,Tds,Lds>::
-  // move_if_no_collision(Vertex_handle,Point, VertexRemover, VertexInserter)
-
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class VertexInserter >
-typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
-Triangulation_3<Gt,Tds,Lds>::
-move(Vertex_handle v, const Point &p,
-     VertexRemover &remover, VertexInserter &inserter) {
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;
-  Vertex_handle w = move_if_no_collision(v,p,remover,inserter);
-  if(w != v) {
-    remove(v, remover);
-    return w;
-  }
-  return v;
-}
-
-// The VertexInserter is needed so as to
-// allow us the usage of the insertion method
-// from the particular triangulation
-template <class Gt, class Tds, class Lds>
-template < class VertexRemover, class VertexInserter, class OutputItCells >
-typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
-Triangulation_3<Gt,Tds,Lds>::
-move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point &p,
-                                        VertexRemover &remover, VertexInserter &inserter, OutputItCells fit) {
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-  CGAL_triangulation_precondition(!is_infinite(v));
-  if(v->point() == p) return v;
-  const int dim = dimension();
-
-  // If displacements are known to be small
-  // we might want to optimize by checking
-  // whether there is a topological change
-  // or not before.
-  // In this version this will not be put inside this method
-  // because it is for general purposes,
-  // and remaining Delaunay after motion is a bit too restrictive.
-  // In the filtered version optimized for displacements
-  // it will be used as an a priori.
-  // However, a non-fully optimized but good version of
-  // is_delaunay_after_displacement is provided as an internal method of
-  // Delaunay_triangulation_3 (see the class for more details).
-
-  Locate_type lt;
-  int li, lj;
-  Cell_handle loc = locate(p, lt, li, lj, v->cell());
-
-  if(lt == VERTEX) return loc->vertex(li);
-
-  if(dim == 0) {
-    v->set_point(p);
-    return v;
-  }
-
-  int n_vertices = tds().number_of_vertices();
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
-    v->set_point(p);
-    for(All_cells_iterator afi = tds().raw_cells_begin();
-        afi != tds().raw_cells_end();
-        afi++) *fit++ = afi;
-    return v;
-  }
-
-  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 2) && (n_vertices == 4)) {
-    v->set_point(p);
-    for(All_cells_iterator afi = tds().raw_cells_begin();
-        afi != tds().raw_cells_end();
-        afi++) *fit++ = afi;
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
-    if(loc->has_vertex(v)) {
-      v->set_point(p);
-    } else {
-      Vertex_handle inserted = insert(p, lt, loc, li, lj);
-      Cell_handle f = v->cell();
-      int i = f->index(v);
-      if (i==0) {f = f->neighbor(1);}
-      CGAL_triangulation_assertion(f->index(v) == 1);
-      Cell_handle g= f->neighbor(0);
-      f->set_vertex(1, g->vertex(1));
-      f->set_neighbor(0,g->neighbor(0));
-      g->neighbor(0)->set_neighbor(1,f);
-      g->vertex(1)->set_cell(f);
-      tds().delete_cell(g);
-      *fit++ = f;
-      Cell_handle f_ins = inserted->cell();
-      i = f_ins->index(inserted);
-      if (i==0) {f_ins = f_ins->neighbor(1);}
-      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
-      Cell_handle g_ins = f_ins->neighbor(0);
-      f_ins->set_vertex(1, v);
-      g_ins->set_vertex(0, v);
-      v->set_point(p);
-      v->set_cell(inserted->cell());
-      tds().delete_vertex(inserted);
-    }
-    *fit++ = v->cell();
-    if(v->cell()->neighbor(0)->has_vertex(v))
-      *fit++ = v->cell()->neighbor(0);
-    if(v->cell()->neighbor(1)->has_vertex(v))
-      *fit++ = v->cell()->neighbor(1);
-    return v;
-  }
-
-  bool dim_down = test_dim_down(v);
-
-  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 2)) {
-    // verify if p and two static vertices are collinear in this case
-    int iinf;
-    Cell_handle finf = infinite_vertex()->cell(), fdone;
-    fdone = finf;
-    do {
-      iinf = finf->index(infinite_vertex());
-      if(!finf->has_vertex(v)) break;
-      finf = finf->neighbor((iinf+1)%3);
-    } while(finf != fdone);
-    iinf = ~iinf;
-    if(this->collinear(finf->vertex(iinf&1)->point(),
-                       finf->vertex(iinf&2)->point(),
-                       p))
-    {
-      v->set_point(p);
-      _tds.decrease_dimension(loc, loc->index(v));
-      for(All_cells_iterator afi = tds().raw_cells_begin();
-          afi != tds().raw_cells_end();
-          afi++) *fit++ = afi;
-      return v;
-    }
-  }
-
-  if(((dim == 2) && (lt != OUTSIDE_AFFINE_HULL)) ||
-     ((lt == OUTSIDE_AFFINE_HULL) && (dim == 1)))
-  {
-
-    std::set<Cell_handle> cells_set;
-    // This is insert must be from Delaunay (or the particular trian.)
-    // not Triangulation_3 !
-    Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
-    Cell_handle c = inserted->cell(), end = c;
-    do {
-      cells_set.insert(c);
-      int i = c->index(inserted);
-      c = c->neighbor((i+1)%3);
-    }	while(c != end);
-
-    std::list<Edge_2D> hole;
-    make_hole_2D(v, hole, remover, cells_set);
-    fill_hole_2D(hole, remover, fit);
-
-    // fixing pointer
-    Cell_handle fc = inserted->cell(), done(fc);
-    std::vector<Cell_handle> faces_pt;
-    faces_pt.reserve(16);
-    do {
-      faces_pt.push_back(fc);
-      fc = fc->neighbor((fc->index(inserted) + 1)%3);
-    } while(fc != done);
-    int ss = faces_pt.size();
-    for(int k=0; k<ss; k++)
-    {
-      Cell_handle f = faces_pt[k];
-      int i = f->index(inserted);
-      f->set_vertex(i, v);
-    }
-    v->set_point(p);
-    v->set_cell(inserted->cell());
-
-    tds().delete_vertex(inserted);
-
-    for(typename std::set<Cell_handle>::const_iterator ib = cells_set.begin(),
-          iend = cells_set.end(); ib != iend; ib++) *fit++ = *ib;
-
-    return v;
-  }
-
-  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 3)) {
-    // verify if p and two static vertices are collinear in this case
-    std::vector<Cell_handle> ics;
-    incident_cells(infinite_vertex(), std::back_inserter(ics));
-    int size = ics.size();
-    Cell_handle finf;
-    for (int i=0; i<size; i++) {
-      finf = ics[i];
-      if(!finf->has_vertex(v)) break;
-    }
-    int iinf = finf->index(infinite_vertex());
-    if(remover.tmp.coplanar(finf->vertex((iinf+1)&3)->point(),
-                            finf->vertex((iinf+2)&3)->point(),
-                            finf->vertex((iinf+3)&3)->point(),
-                            p))
-    {
-      v->set_point(p);
-      _tds.decrease_dimension(loc, loc->index(v));
-      Facet f = *finite_facets_begin();
-      if (coplanar_orientation(f.first->vertex(0)->point(),
-                               f.first->vertex(1)->point(),
-                               f.first->vertex(2)->point()) == NEGATIVE)
-        tds().reorient();
-      restore_edges_after_decrease_dimension(v, remover,inserter);
-      for(All_cells_iterator afi = tds().raw_cells_begin();
-          afi != tds().raw_cells_end();
-          afi++) *fit++ = afi;
-      return v;
-    }
-  }
-
-  std::set<Cell_handle> cells_set;
-
-  // This is insert must be from Delaunay (or the particular trian.)
-  // not Triangulation_3 !
-  Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
-
-  std::vector<Cell_handle> cells_tmp;
-  cells_tmp.reserve(64);
-  incident_cells(inserted, std::back_inserter(cells_tmp));
-  int size = cells_tmp.size();
-  for(int i=0; i<size; i++) {
-    cells_set.insert(cells_tmp[i]);
-  }
-
-  std::vector<Cell_handle> hole;
-  hole.reserve(64);
-
-  // Construct the set of vertex triples on the boundary
-  // with the facet just behind
-  Vertex_triple_Facet_map outer_map;
-  Vertex_triple_Facet_map inner_map;
-
-  make_hole_3D(v, outer_map, hole);
-
-  for(typename std::vector<Cell_handle>::const_iterator ib = hole.begin(),
-        iend = hole.end(); ib != iend; ib++) cells_set.erase(*ib);
-
-  CGAL_assertion(remover.hidden_points_begin() ==
-                 remover.hidden_points_end() );
-
-  // Output the hidden points.
-  for (typename std::vector<Cell_handle>::iterator
-         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
-    remover.add_hidden_points(*hi);
-
-  bool inf = false;
-  unsigned int i;
-  // collect all vertices on the boundary
-  std::vector<Vertex_handle> vertices;
-  vertices.reserve(64);
-
-  adjacent_vertices(v, std::back_inserter(vertices));
-
-  // create a Delaunay triangulation of the points on the boundary
-  // and make a map from the vertices in remover.tmp towards the vertices
-  // in *this
-
-  Vertex_handle_unique_hash_map vmap;
-  Cell_handle ch = Cell_handle();
-  for(i=0; i < vertices.size(); i++){
-    if(! is_infinite(vertices[i])){
-      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
-      ch = vh->cell();
-      vmap[vh] = vertices[i];
-    }else {
-      inf = true;
-    }
-  }
-
-  if(remover.tmp.dimension()==2){
-    Vertex_handle fake_inf = remover.tmp.insert(v->point());
-    vmap[fake_inf] = infinite_vertex();
-  } else {
-    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
-  }
-
-  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
-
-  // Construct the set of vertex triples of remover.tmp
-  // We reorient the vertex triple so that it matches those from outer_map
-  // Also note that we use the vertices of *this, not of remover.tmp
-
-  if(inf){
-    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-          end = remover.tmp.all_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  } else {
-    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-          end = remover.tmp.finite_cells_end(); it != end; ++it){
-      for(i=0; i < 4; i++){
-        Facet f = std::pair<Cell_handle,int>(it,i);
-        Vertex_triple vt_aux = make_vertex_triple(f);
-        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-        make_canonical(vt);
-        inner_map[vt]= f;
-      }
-    }
-  }
-  // Grow inside the hole, by extending the surface
-  while(! outer_map.empty()){
-    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-    while(is_infinite(oit->first.first) ||
-          is_infinite(oit->first.second) ||
-          is_infinite(oit->first.third)){
-      ++oit;
-      // otherwise the lookup in the inner_map fails
-      // because the infinite vertices are different
-    }
-    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-    Cell_handle o_ch = o_vt_f_pair.second.first;
-    unsigned int o_i = o_vt_f_pair.second.second;
-
-    typename Vertex_triple_Facet_map::iterator iit =
-      inner_map.find(o_vt_f_pair.first);
-    CGAL_triangulation_assertion(iit != inner_map.end());
-    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-    Cell_handle i_ch = i_vt_f_pair.second.first;
-    unsigned int i_i = i_vt_f_pair.second.second;
-
-    // create a new cell and glue it to the outer surface
-    Cell_handle new_ch = tds().create_cell();
-    *fit++ = new_ch;
-
-    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-    o_ch->set_neighbor(o_i,new_ch);
-    new_ch->set_neighbor(i_i, o_ch);
-
-    // for the other faces check, if they can also be glued
-    for(i = 0; i < 4; i++){
-      if(i != i_i){
-        Facet f = std::pair<Cell_handle,int>(new_ch,i);
-        Vertex_triple vt = make_vertex_triple(f);
-        make_canonical(vt);
-        std::swap(vt.second,vt.third);
-        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-        if(oit2 == outer_map.end()){
-          std::swap(vt.second,vt.third);
-          outer_map[vt]= f;
-        } else {
-          // glue the faces
-          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-          int o_i2 = o_vt_f_pair2.second.second;
-          o_ch2->set_neighbor(o_i2,new_ch);
-          new_ch->set_neighbor(i, o_ch2);
-          outer_map.erase(oit2);
-        }
-      }
-    }
-    outer_map.erase(oit);
-  }
-
-  // fixing pointer
-  std::vector<Cell_handle> cells_pt;
-  cells_pt.reserve(64);
-  incident_cells(inserted, std::back_inserter(cells_pt));
-  size = cells_pt.size();
-  for(int i=0; i<size; i++) {
-    Cell_handle c = cells_pt[i];
-    c->set_vertex(c->index(inserted), v);
-  }
-  v->set_point(p);
-  v->set_cell(inserted->cell());
-  tds().delete_vertex(inserted);
-  tds().delete_cells(hole.begin(), hole.end());
-
-  for(typename std::set<Cell_handle>::const_iterator ib = cells_set.begin(),
-        iend = cells_set.end(); ib != iend; ib++) *fit++ = *ib;
-  return v;
-}
-
-template <class Gt, class Tds, class Lds>
-void
-Triangulation_3<Gt,Tds,Lds>::
-_make_big_hole_3D( Vertex_handle v,
-                   std::map<Vertex_triple,Facet>& outer_map,
-                   std::vector<Cell_handle> & hole,
-                   std::vector<Vertex_handle> & vertices,
-                   std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates)
-{
-
-  Cell_handle start = v->cell();
-  start->tds_data().mark_processed();
-  hole.push_back(start);
-  std::size_t i=0, n=1;
-  while(i < n)
-  {
-
-    Cell_handle c = hole[i++];
-
-    for(int k=0; k<4; k++)
-    {
-      Vertex_handle v0 = c->vertex(k);
-
-      const REMOVE_VERTEX_STATE vst = vstates[v0];
-
-      if(vst == CLEAR)
-      {
-        vstates[v0] = EXTREMITY;
-        vertices.push_back(v0);
-      }	else if(vst == TO_REMOVE) {
-        // we mark the vertices, so all the vertices
-        // from the same cluster will be skipped
-        // in the remove_cluster_3D function
-        vstates[v0] = PROCESSED;
-      }
-
-      int i1 = vertex_triple_index(k, 0);
-      int i2 = vertex_triple_index(k, 1);
-      int i3 = vertex_triple_index(k, 2);
-
-      Vertex_handle v1 = c->vertex(i1);
-      Vertex_handle v2 = c->vertex(i2);
-      Vertex_handle v3 = c->vertex(i3);
-
-      Cell_handle opp_cit = c->neighbor(k);
-      int opp_i = tds().mirror_index(c,k);
-      Vertex_handle vm = opp_cit->vertex(opp_i);
-
-      bool pb1 = false, pb2 = false, pb3 = false, pbm = false;
-
-      const REMOVE_VERTEX_STATE vst1 = vstates[v1];
-      pb1 = vst1 == TO_REMOVE || vst1 == PROCESSED;
-
-      if(!pb1) {
-        const REMOVE_VERTEX_STATE vst2 = vstates[v2];
-        pb2 = vst2 == TO_REMOVE || vst2 == PROCESSED;
-
-        if(!pb2) {
-          const REMOVE_VERTEX_STATE vst3 = vstates[v3];
-          pb3 = vst3 == TO_REMOVE || vst3 == PROCESSED;
-
-          if(!pb3) {
-            const REMOVE_VERTEX_STATE vstm = vstates[vm];
-            pbm = vstm == TO_REMOVE || vstm == PROCESSED;
-          }
-
-        }
-
-      }
-
-      bool bad_opposite_cell = pb1 || pb2 || pb3 || pbm;
-
-      // update the hole if needed
-      // when the vertex is not to be removed
-      if(bad_opposite_cell)
-      {
-        if(opp_cit->tds_data().is_clear())
-        {
-          hole.push_back(opp_cit);
-          opp_cit->tds_data().mark_processed();
-          n++;
-        }
-        continue;
-      }
-
-      Facet f(opp_cit, opp_i);
-      Vertex_triple vt = make_vertex_triple(f);
-      make_canonical(vt);
-      outer_map[vt] = f;
-      v1->set_cell(opp_cit);
-      v2->set_cell(opp_cit);
-      v3->set_cell(opp_cit);
-      vm->set_cell(opp_cit);
-
-    }
-  }
-
-  std::size_t vsize = vertices.size();
-  for(std::size_t i=0; i<vsize; i++) vstates[vertices[i]] = CLEAR;
-
-}
-
-
-template <class Gt, class Tds, class Lds>
-template < class InputIterator, class VertexRemover >
-bool
-Triangulation_3<Gt, Tds, Lds>::
-_remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover &remover,
-                   std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) {
-  InputIterator init = first;
-  while(first != beyond)
-  {
-    Vertex_handle v = *first++;
-
-    if(vstates[v] == PROCESSED) continue;
-
-    //  _make_big_hole_3D and we fill the hole for each cluster
-    vstates[v] = PROCESSED;
-
-    // here, we make the hole for the cluster with v inside
-    typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
-    std::vector<Cell_handle> hole;
-    std::vector<Vertex_handle> vertices;
-    hole.reserve(64);
-    vertices.reserve(32);
-    Vertex_triple_Facet_map outer_map;
-    _make_big_hole_3D(v, outer_map, hole, vertices, vstates);
-
-    // the connectivity is totally lost, we need to rebuild
-    if(!outer_map.size())
-    {
-      std::size_t nh = hole.size();
-      for(std::size_t i=0; i<nh; i++) hole[i]->tds_data().clear();
-      return false;
-    }
-
-    std::size_t vsi = vertices.size();
-
-    bool inf = false;
-    std::size_t i;
-    Vertex_handle_unique_hash_map vmap;
-    Cell_handle ch = Cell_handle();
-
-    if(vsi > 100)
-    {
-      // spatial sort if too many points
-      std::vector<Point> vps;
-      std::map<Point, Vertex_handle> mp_vps;
-      for(i=0; i<vsi;i++)
-      {
-        Vertex_handle vv = vertices[i];
-        if(! this->is_infinite(vv)) {
-          vps.push_back(vv->point());
-          mp_vps[vv->point()] = vv;
-        } else inf = true;
-      }
-      spatial_sort(vps.begin(), vps.end());
-
-      std::size_t svps = vps.size();
-
-      for(i=0; i < svps; i++){
-        Vertex_handle vv = mp_vps[vps[i]];
-        Vertex_handle vh = remover.tmp.insert(vv->point(), ch);
-        ch = vh->cell();
-        vmap[vh] = vv;
-      }
-
-      if(remover.tmp.dimension()==2){
-        Vertex_handle fake_inf = remover.tmp.insert(v->point());
-        vmap[fake_inf] = this->infinite_vertex();
-      } else {
-        vmap[remover.tmp.infinite_vertex()] = this->infinite_vertex();
-      }
-    } else {
-
-      for(i=0; i < vsi; i++){
-        if(!this->is_infinite(vertices[i])){
-          Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
-          ch = vh->cell();
-          vmap[vh] = vertices[i];
-        } else {
-          inf = true;
-        }
-      }
-
-      if(remover.tmp.dimension()==2){
-        Vertex_handle fake_inf = remover.tmp.insert(v->point());
-        vmap[fake_inf] = this->infinite_vertex();
-      } else {
-        vmap[remover.tmp.infinite_vertex()] = this->infinite_vertex();
-      }
-    }
-
-    Vertex_triple_Facet_map inner_map;
-
-    if(inf){
-      for(All_cells_iterator it = remover.tmp.all_cells_begin(),
-            end = remover.tmp.all_cells_end(); it != end; ++it){
-        for(unsigned int index=0; index < 4; index++) {
-          Facet f = std::pair<Cell_handle,int>(it,index);
-          Vertex_triple vt_aux = this->make_vertex_triple(f);
-          Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-          this->make_canonical(vt);
-          inner_map[vt]= f;
-        }
-      }
-    } else {
-      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
-            end = remover.tmp.finite_cells_end(); it != end; ++it){
-        for(unsigned int index=0; index < 4; index++){
-          Facet f = std::pair<Cell_handle,int>(it,index);
-          Vertex_triple vt_aux = this->make_vertex_triple(f);
-          Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
-          this->make_canonical(vt);
-          inner_map[vt]= f;
-        }
-      }
-    }
-
-    // Grow inside the hole, by extending the surface
-    while(! outer_map.empty()){
-      typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
-
-      while(this->is_infinite(oit->first.first) ||
-            this->is_infinite(oit->first.second) ||
-            this->is_infinite(oit->first.third)){
-        ++oit;
-        // otherwise the lookup in the inner_map fails
-        // because the infinite vertices are different
-      }
-      typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
-      Cell_handle o_ch = o_vt_f_pair.second.first;
-      unsigned int o_i = o_vt_f_pair.second.second;
-
-      typename Vertex_triple_Facet_map::iterator iit =
-        inner_map.find(o_vt_f_pair.first);
-      CGAL_triangulation_assertion(iit != inner_map.end());
-      typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
-      Cell_handle i_ch = i_vt_f_pair.second.first;
-      unsigned int i_i = i_vt_f_pair.second.second;
-
-      // create a new cell and glue it to the outer surface
-      Cell_handle new_ch = tds().create_cell();
-      new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
-                           vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
-
-      o_ch->set_neighbor(o_i,new_ch);
-      new_ch->set_neighbor(i_i, o_ch);
-
-      for(int j=0;j<4;j++) new_ch->vertex(j)->set_cell(new_ch);
-
-      // for the other faces check, if they can also be glued
-      for(unsigned int index = 0; index < 4; index++){
-        if(index != i_i){
-          Facet f = std::pair<Cell_handle,int>(new_ch,index);
-          Vertex_triple vt = this->make_vertex_triple(f);
-          this->make_canonical(vt);
-          std::swap(vt.second,vt.third);
-          typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
-          if(oit2 == outer_map.end()){
-            std::swap(vt.second,vt.third);
-            outer_map[vt]= f;
-          } else {
-            // glue the faces
-            typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
-            Cell_handle o_ch2 = o_vt_f_pair2.second.first;
-            int o_i2 = o_vt_f_pair2.second.second;
-            o_ch2->set_neighbor(o_i2,new_ch);
-            new_ch->set_neighbor(index, o_ch2);
-            outer_map.erase(oit2);
-          }
-        }
-      }
-
-      outer_map.erase(oit);
-    }
-
-    this->tds().delete_cells(hole.begin(), hole.end());
-    remover.tmp.clear();
-
-  }
-
-  this->tds().delete_vertices(init, beyond);
-
-  return true;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class InputIterator >
-bool
-Triangulation_3<Gt, Tds, Lds>::
-does_repeat_in_range(InputIterator first, InputIterator beyond) const {
-  std::set<Vertex_handle> s;
-  while (first!=beyond) if (! s.insert(*first++).second ) return true;
-  return false;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class InputIterator >
-bool
-Triangulation_3<Gt, Tds, Lds>::
-infinite_vertex_in_range(InputIterator first, InputIterator beyond) const {
-  while(first != beyond) if(is_infinite(*first++)) return true;
-  return false;
-}
-
-template <class Gt, class Tds, class Lds>
-template < class InputIterator, class VertexRemover >
-typename Triangulation_3<Gt, Tds, Lds>::size_type
-Triangulation_3<Gt, Tds, Lds>::
-remove(InputIterator first, InputIterator beyond, VertexRemover &remover) {
-  CGAL_triangulation_precondition(!does_repeat_in_range(first, beyond));
-  CGAL_triangulation_precondition(!infinite_vertex_in_range(first, beyond));
-  size_type n = number_of_vertices();
-  InputIterator init = first, init2 = first;
-  if(dimension() == 3 && n > 4)
-  {
-    // If we could add states on a vertex base as it is done
-    // for cells, it would improve the performance.
-    std::map<Vertex_handle, REMOVE_VERTEX_STATE> vstates;
-    _mark_vertices_to_remove(first, beyond, vstates);
-    if(!_test_dim_down_cluster(vstates))
-    {
-      if(_remove_cluster_3D(init, beyond, remover, vstates))
-        return n - number_of_vertices();
-    }
-  }
-
-  // dimension() < 3 or
-  // no connectivity of the remaining vertices
-  // we remove one by one
-  while (init2 != beyond) {
-    Vertex_handle v = *init2++;
-    remover.tmp.clear();
-    remove(v, remover);
-  }
-  return n - number_of_vertices();
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_valid(bool verbose, int level) const
-{
-  if ( ! _tds.is_valid(verbose,level) ) {
-    if (verbose)
-        std::cerr << "invalid data structure" << std::endl;
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-
-  if ( infinite_vertex() == Vertex_handle() ) {
-    if (verbose)
-        std::cerr << "no infinite vertex" << std::endl;
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-
-  switch ( dimension() ) {
-  case 3:
-    {
-      for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end();
-              it != end; ++it)
-        is_valid_finite(it, verbose, level);
-      break;
-    }
-  case 2:
-    {
-      for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end();
-             it != end; ++it)
-        is_valid_finite(it->first,verbose,level);
-      break;
-    }
-  case 1:
-    {
-      for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end();
-             it != end; ++it)
-        is_valid_finite(it->first,verbose,level);
-      break;
-    }
-  }
-  if (verbose)
-      std::cerr << "valid triangulation" << std::endl;
-  return true;
-}
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_valid(Cell_handle c, bool verbose, int level) const
-{
-  if ( ! _tds.is_valid(c,verbose,level) ) {
-    if (verbose) {
-      std::cerr << "combinatorially invalid cell";
-      for (int i=0; i <= dimension(); i++ )
-        std::cerr << c->vertex(i)->point() << ", ";
-      std::cerr << std::endl;
-    }
-    CGAL_triangulation_assertion(false);
-    return false;
-  }
-  if ( ! is_infinite(c) )
-    is_valid_finite(c, verbose, level);
-  if (verbose)
-      std::cerr << "geometrically valid cell" << std::endl;
-  return true;
-}
-
-
-template < class GT, class Tds, class Lds >
-bool
-Triangulation_3<GT,Tds,Lds>::
-is_valid_finite(Cell_handle c, bool verbose, int) const
-{
-  switch ( dimension() ) {
-  case 3:
-    {
-      if ( orientation(c->vertex(0)->point(),
-                       c->vertex(1)->point(),
-                       c->vertex(2)->point(),
-                       c->vertex(3)->point()) != POSITIVE ) {
-        if (verbose)
-            std::cerr << "badly oriented cell "
-                      << c->vertex(0)->point() << ", "
-                      << c->vertex(1)->point() << ", "
-                      << c->vertex(2)->point() << ", "
-                      << c->vertex(3)->point() << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      break;
-    }
-  case 2:
-    {
-        if (coplanar_orientation(c->vertex(0)->point(),
-                                 c->vertex(1)->point(),
-                                 c->vertex(2)->point()) != POSITIVE) {
-          if (verbose)
-              std::cerr << "badly oriented face "
-                        << c->vertex(0)->point() << ", "
-                        << c->vertex(1)->point() << ", "
-                        << c->vertex(2)->point() << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-      break;
-    }
-  case 1:
-    {
-      const Point & p0 = c->vertex(0)->point();
-      const Point & p1 = c->vertex(1)->point();
-
-      Vertex_handle v = c->neighbor(0)->vertex(c->neighbor(0)->index(c));
-      if ( ! is_infinite(v) )
-      {
-        if ( collinear_position(p0, p1, v->point()) != MIDDLE ) {
-          if (verbose)
-              std::cerr << "badly oriented edge "
-                        << p0 << ", " << p1 << std::endl
-                        << "with neighbor 0"
-                        << c->neighbor(0)->vertex(1-c->neighbor(0)->index(c))
-                                         ->point()
-                        << ", " << v->point() << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-      }
-
-      v = c->neighbor(1)->vertex(c->neighbor(1)->index(c));
-      if ( ! is_infinite(v) )
-      {
-        if ( collinear_position(p1, p0, v->point()) != MIDDLE ) {
-          if (verbose)
-              std::cerr << "badly oriented edge "
-                        << p0 << ", " << p1 << std::endl
-                        << "with neighbor 1"
-                        << c->neighbor(1)->vertex(1-c->neighbor(1)->index(c))
-                                         ->point()
-                        << ", " << v->point() << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-      }
-      break;
-    }
-  }
-  return true;
-}
-
-
-namespace internal {
-
-// Internal function used by operator==.
-template < class GT, class Tds1, class Tds2, class Lds >
-bool
-test_next(const Triangulation_3<GT, Tds1, Lds> &t1,
-          const Triangulation_3<GT, Tds2, Lds> &t2,
-          typename Triangulation_3<GT, Tds1, Lds>::Cell_handle c1,
-          typename Triangulation_3<GT, Tds2, Lds>::Cell_handle c2,
-          std::map<typename Triangulation_3<GT, Tds1, Lds>::Cell_handle,
-                   typename Triangulation_3<GT, Tds2, Lds>::Cell_handle> &Cmap,
-          std::map<typename Triangulation_3<GT, Tds1, Lds>::Vertex_handle,
-                   typename Triangulation_3<GT, Tds2, Lds>::Vertex_handle> &Vmap)
-{
-
-    // This function tests and registers the 4 neighbors of c1/c2,
-    // and recursively calls itself over them.
-    // We don't use the call stack as it may overflow
-    // Returns false if an inequality has been found.
-
-    // Precondition: c1, c2 have been registered as well as their 4 vertices.
-    CGAL_triangulation_precondition(t1.dimension() >= 2);
-    CGAL_triangulation_precondition(Cmap[c1] == c2);
-    CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end());
-    CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end());
-    CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end());
-    CGAL_triangulation_precondition(t1.dimension() == 2 ||
-                                    Vmap.find(c1->vertex(3)) != Vmap.end());
-
-    typedef Triangulation_3<GT, Tds1, Lds> Tr1;
-    typedef Triangulation_3<GT, Tds2, Lds> Tr2;
-    typedef typename Tr1::Vertex_handle  Vertex_handle1;
-    typedef typename Tr1::Cell_handle    Cell_handle1;
-    typedef typename Tr2::Vertex_handle  Vertex_handle2;
-    typedef typename Tr2::Cell_handle    Cell_handle2;
-    typedef typename std::map<Cell_handle1, Cell_handle2>::const_iterator  Cit;
-    typedef typename std::map<Vertex_handle1,
-                              Vertex_handle2>::const_iterator Vit;
-
-    std::vector<std::pair<Cell_handle1, Cell_handle2> > cell_stack;
-    cell_stack.push_back(std::make_pair(c1, c2));
-
-    while(! cell_stack.empty()){
-
-      Cell_handle1 c1 = cell_stack.back().first;
-      Cell_handle2 c2 = cell_stack.back().second;
-      cell_stack.pop_back();
-
-      for (int i=0; i <= t1.dimension(); ++i) {
-        Cell_handle1 n1 = c1->neighbor(i);
-        Cit cit = Cmap.find(n1);
-        Vertex_handle1 v1 = c1->vertex(i);
-        Vertex_handle2 v2 = Vmap[v1];
-        Cell_handle2 n2 = c2->neighbor(c2->index(v2));
-        if (cit != Cmap.end()) {
-          // n1 was already registered.
-          if (cit->second != n2)
-              return false;
-          continue;
-        }
-        // n1 has not yet been registered.
-        // We check that the new vertices match geometrically.
-        // And we register them.
-        Vertex_handle1 vn1 = n1->vertex(n1->index(c1));
-        Vertex_handle2 vn2 = n2->vertex(n2->index(c2));
-        Vit vit = Vmap.find(vn1);
-        if (vit != Vmap.end()) {
-          // vn1 already registered
-          if (vit->second != vn2)
-            return false;
-        }
-        else {
-          if (t2.is_infinite(vn2))
-            return false; // vn1 can't be infinite,
-          // since it would have been registered.
-          if (t1.geom_traits().compare_xyz_3_object()(vn1->point(),
-                                                      vn2->point()) != 0)
-            return false;
-          // We register vn1/vn2.
-          Vmap.insert(std::make_pair(vn1, vn2));
-        }
-
-        // We register n1/n2.
-        Cmap.insert(std::make_pair(n1, n2));
-        cell_stack.push_back(std::make_pair(n1, n2));
-      }
-    }
-
-    return true;
-}
-
-} // namespace internal
-
-
-template < class GT, class Tds1, class Tds2, class Lds >
-bool
-operator==(const Triangulation_3<GT, Tds1, Lds> &t1,
-           const Triangulation_3<GT, Tds2, Lds> &t2)
-{
-    typedef typename Triangulation_3<GT, Tds1>::Vertex_handle Vertex_handle1;
-    typedef typename Triangulation_3<GT, Tds1>::Cell_handle   Cell_handle1;
-    typedef typename Triangulation_3<GT, Tds2>::Vertex_handle Vertex_handle2;
-    typedef typename Triangulation_3<GT, Tds2>::Cell_handle   Cell_handle2;
-
-    typedef typename Triangulation_3<GT, Tds1>::Point                       Point;
-    typedef typename Triangulation_3<GT, Tds1>::Geom_traits::Equal_3        Equal_3;
-    typedef typename Triangulation_3<GT, Tds1>::Geom_traits::Compare_xyz_3  Compare_xyz_3;
-
-    Equal_3 equal = t1.geom_traits().equal_3_object();
-    Compare_xyz_3 cmp1 = t1.geom_traits().compare_xyz_3_object();
-    Compare_xyz_3 cmp2 = t2.geom_traits().compare_xyz_3_object();
-
-    // Some quick checks.
-    if (t1.dimension() != t2.dimension()
-        || t1.number_of_vertices() != t2.number_of_vertices()
-        || t1.number_of_cells() != t2.number_of_cells())
-        return false;
-
-    int dim = t1.dimension();
-    // Special case for dimension < 1.
-    // The triangulation is uniquely defined in these cases.
-    if (dim < 1)
-        return true;
-
-    // Special case for dimension == 1.
-    if (dim == 1) {
-        // It's enough to test that the points are the same,
-        // since the triangulation is uniquely defined in this case.
-        using namespace boost;
-        std::vector<Point> V1 (t1.points_begin(), t1.points_end());
-        std::vector<Point> V2 (t2.points_begin(), t2.points_end());
-        std::sort(V1.begin(), V1.end(), boost::bind(cmp1, _1, _2) == NEGATIVE);
-        std::sort(V2.begin(), V2.end(), boost::bind(cmp2, _1, _2) == NEGATIVE);
-        return V1 == V2;
-    }
-
-    // We will store the mapping between the 2 triangulations vertices and
-    // cells in 2 maps.
-    std::map<Vertex_handle1, Vertex_handle2> Vmap;
-    std::map<Cell_handle1, Cell_handle2> Cmap;
-
-    // Handle the infinite vertex.
-    Vertex_handle1 v1 = t1.infinite_vertex();
-    Vertex_handle2 iv2 = t2.infinite_vertex();
-    Vmap.insert(std::make_pair(v1, iv2));
-
-    // We pick one infinite cell of t1, and try to match it against the
-    // infinite cells of t2.
-    Cell_handle1 c = v1->cell();
-    Vertex_handle1 v2 = c->vertex((c->index(v1)+1)%(dim+1));
-    Vertex_handle1 v3 = c->vertex((c->index(v1)+2)%(dim+1));
-    Vertex_handle1 v4 = c->vertex((c->index(v1)+3)%(dim+1));
-    const Point &p2 = v2->point();
-    const Point &p3 = v3->point();
-    const Point &p4 = v4->point();
-
-    std::vector<Cell_handle2> ics;
-    t2.incident_cells(iv2, std::back_inserter(ics));
-    for (typename std::vector<Cell_handle2>::const_iterator cit = ics.begin();
-            cit != ics.end(); ++cit) {
-        int inf = (*cit)->index(iv2);
-
-        if (equal(p2, (*cit)->vertex((inf+1)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+1)%(dim+1))));
-        else if (equal(p2, (*cit)->vertex((inf+2)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+2)%(dim+1))));
-        else if (dim == 3 &&
-                 equal(p2, (*cit)->vertex((inf+3)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+3)%(dim+1))));
-        else
-            continue; // None matched v2.
-
-        if (equal(p3, (*cit)->vertex((inf+1)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+1)%(dim+1))));
-        else if (equal(p3, (*cit)->vertex((inf+2)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+2)%(dim+1))));
-        else if (dim == 3 &&
-                 equal(p3, (*cit)->vertex((inf+3)%(dim+1))->point()))
-            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+3)%(dim+1))));
-        else
-            continue; // None matched v3.
-
-        if (dim == 3) {
-            if (equal(p4, (*cit)->vertex((inf+1)%(dim+1))->point()))
-                Vmap.insert(std::make_pair(v4,
-                                           (*cit)->vertex((inf+1)%(dim+1))));
-            else if (equal(p4, (*cit)->vertex((inf+2)%(dim+1))->point()))
-                Vmap.insert(std::make_pair(v4,
-                                           (*cit)->vertex((inf+2)%(dim+1))));
-            else if (equal(p4, (*cit)->vertex((inf+3)%(dim+1))->point()))
-                Vmap.insert(std::make_pair(v4,
-                                           (*cit)->vertex((inf+3)%(dim+1))));
-            else
-                continue; // None matched v4.
-        }
-
-        // Found it !
-        Cmap.insert(std::make_pair(c, *cit));
-        break;
-    }
-
-    if (Cmap.size() == 0)
-        return false;
-    // We now have one cell, we need to propagate recursively.
-    return internal::test_next(t1, t2,
-                     Cmap.begin()->first, Cmap.begin()->second, Cmap, Vmap);
-}
-
-template < class GT, class Tds1, class Tds2 >
-inline
-bool
-operator!=(const Triangulation_3<GT, Tds1> &t1,
-           const Triangulation_3<GT, Tds2> &t2)
-{
-  return ! (t1 == t2);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_2.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_2.h
deleted file mode 100644
index 5300853..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_2.h
+++ /dev/null
@@ -1,2323 +0,0 @@
-// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Mariette Yvinec
-
-#ifndef CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
-#define CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <list>
-#include <map>
-#include <set>
-#include <stack>
-#include <vector>
-#include <algorithm>
-#include <boost/tuple/tuple.hpp>
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Triangulation_utils_2.h>
- 
-#include <CGAL/Compact_container.h>
-
-#include <CGAL/Triangulation_ds_face_base_2.h>
-#include <CGAL/Triangulation_ds_vertex_base_2.h>
-#include <CGAL/Triangulation_ds_iterators_2.h>
-#include <CGAL/Triangulation_ds_circulators_2.h>
-
-#include <CGAL/IO/File_header_OFF.h>
-#include <CGAL/IO/File_scanner_OFF.h>
-
-namespace CGAL { 
-
-template < class Vb = Triangulation_ds_vertex_base_2<>, 
-           class Fb = Triangulation_ds_face_base_2<> >
-class Triangulation_data_structure_2 
-  :public Triangulation_cw_ccw_2
-{
-  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
-
-  typedef typename Vb::template Rebind_TDS<Tds>::Other  Vertex_base;
-  typedef typename Fb::template Rebind_TDS<Tds>::Other  Face_base;
-
-  friend class Triangulation_ds_edge_iterator_2<Tds,false>;
-  friend class Triangulation_ds_edge_iterator_2<Tds,true>;
-  friend class Triangulation_ds_face_circulator_2<Tds>;
-  friend class Triangulation_ds_edge_circulator_2<Tds>;
-  friend class Triangulation_ds_vertex_circulator_2<Tds>;
-
-public:
-  // Tools to change the Vertex and Face types of the TDS.
-  template < typename Vb2 >
-  struct Rebind_vertex {
-    typedef Triangulation_data_structure_2<Vb2, Fb>  Other;
-  };
-
-  template < typename Fb2 >
-  struct Rebind_face {
-    typedef Triangulation_data_structure_2<Vb, Fb2>  Other;
-  };
-
-  typedef Vertex_base                                Vertex;
-  typedef Face_base                                  Face;
-  
-  typedef Compact_container<Face>                    Face_range;
-  typedef Compact_container<Vertex>                  Vertex_range;
-
-  typedef typename Face_range::size_type             size_type;
-  typedef typename Face_range::difference_type       difference_type;
-
-  typedef typename Face_range::iterator              Face_iterator;
-  typedef typename Vertex_range::iterator            Vertex_iterator;
-
-  typedef Triangulation_ds_edge_iterator_2<Tds>      Edge_iterator;
-  typedef Triangulation_ds_edge_iterator_2<Tds,false> Halfedge_iterator;
-
-  typedef Triangulation_ds_face_circulator_2<Tds>    Face_circulator;
-  typedef Triangulation_ds_vertex_circulator_2<Tds>  Vertex_circulator;
-  typedef Triangulation_ds_edge_circulator_2<Tds>    Edge_circulator;
-
-  typedef Vertex_iterator                            Vertex_handle;
-  typedef Face_iterator                              Face_handle;
-
-  typedef std::pair<Face_handle,int> Edge;
-
-  typedef std::list<Edge> List_edges;
-
-protected:
-  int _dimension;
-  Face_range   _faces;
-  Vertex_range _vertices;
-
-  //CREATORS - DESTRUCTORS
-public:
-  Triangulation_data_structure_2(); 
-  Triangulation_data_structure_2(const Tds &tds);
-  ~Triangulation_data_structure_2();
-  Tds& operator= (const Tds &tds);
-  void swap(Tds &tds);
-
-  //ACCESS FUNCTIONS
-  // We need the const_cast<>s because TDS is not const-correct.
-  Face_range& faces()             { return _faces;}
-  Face_range& faces() const 
-    { return  const_cast<Tds*>(this)->_faces;}
-  Vertex_range& vertices()         {return _vertices;}
-  Vertex_range& vertices() const
-    {return  const_cast<Tds*>(this)->_vertices;}
-
-  int  dimension() const { return _dimension;  }
-  size_type number_of_vertices() const {return vertices().size();}
-  size_type number_of_faces() const ;
-  size_type number_of_edges() const;
-  size_type number_of_full_dim_faces() const; //number of faces stored by tds
-  
-  // TEST FEATURES
-  bool is_vertex(Vertex_handle v) const;
-  bool is_edge(Face_handle fh, int i) const;
-  bool is_edge(Vertex_handle va, Vertex_handle vb) const;
-  bool is_edge(Vertex_handle va, Vertex_handle vb, 
-	       Face_handle& fr,  int& i) const;
-  bool is_face(Face_handle fh) const;
-  bool is_face(Vertex_handle v1, 
-	       Vertex_handle v2, 
-	       Vertex_handle v3) const;
-  bool is_face(Vertex_handle v1, 
-	       Vertex_handle v2, 
-	       Vertex_handle v3,
-	       Face_handle& fr) const;
-
-  // ITERATORS AND CIRCULATORS
-public:
-// The face_iterator_base_begin  gives the possibility to iterate over all
-// faces in the container  independently of the dimension.
-  // public for the need of file_ouput() of Constrained triangulation
-  // should be made private later
-
-  Face_iterator face_iterator_base_begin() const    {
-    return faces().begin();
-  }
-  Face_iterator face_iterator_base_end() const    {
-    return faces().end();
-  }
-
-public:
-  Face_iterator faces_begin() const {
-    if (dimension() < 2) return faces_end();
-    return faces().begin();
-  }
-    
-  Face_iterator faces_end() const {
-    return faces().end();
-  }
-
-  Vertex_iterator vertices_begin() const  {
-    return vertices().begin();
-  }
-
-  Vertex_iterator vertices_end() const {
-    return vertices().end();
-  }
-  
-  Edge_iterator edges_begin() const {
-    return Edge_iterator(this);
-  }
-
-  Edge_iterator edges_end() const {
-    return Edge_iterator(this,1);
-  }
-  
-  Halfedge_iterator halfedges_begin() const {
-    return Halfedge_iterator(this);
-  }
-
-  Halfedge_iterator halfedges_end() const {
-    return Halfedge_iterator(this,1);
-  }
-  
-  Face_circulator incident_faces(Vertex_handle v, 
-				 Face_handle f =  Face_handle()) const{
-    return Face_circulator(v,f);
-  }
-  Vertex_circulator incident_vertices(Vertex_handle v, 
-				      Face_handle f = Face_handle()) const
-  {    
-    return Vertex_circulator(v,f);  
-  }
-
-  Edge_circulator incident_edges(Vertex_handle v, 
-				 Face_handle f = Face_handle()) const{
-    return Edge_circulator(v,f);
-  }
-
-  size_type degree(Vertex_handle v) const {
-    int count = 0;
-    Vertex_circulator vc = incident_vertices(v), done(vc);
-    if ( ! vc.is_empty()) {
-      do { 
-	count += 1;
-      } while (++vc != done);
-    }
-    return count;
-  }
-
-  
-  Vertex_handle
-  mirror_vertex(Face_handle f, int i) const
-  {
-    CGAL_triangulation_precondition ( f->neighbor(i) != Face_handle()
-				    && f->dimension() >= 1);
-  return f->neighbor(i)->vertex(mirror_index(f,i));
-  }
-
-  int
-  mirror_index(Face_handle f, int i) const
-  {
-    // return the index of opposite vertex in neighbor(i);
-    CGAL_triangulation_precondition (f->neighbor(i) != Face_handle() &&
-				     f->dimension() >= 1);
-    if (f->dimension() == 1) {
-      CGAL_assertion(i<=1);
-      const int j = f->neighbor(i)->index(f->vertex((i==0) ? 1 : 0));
-      CGAL_assertion(j<=1);
-      return (j==0) ? 1 : 0;
-    }
-    return ccw( f->neighbor(i)->index(f->vertex(ccw(i))));
-  }
-
-  Edge 
-  mirror_edge(const Edge e) const 
-  {
-    CGAL_triangulation_precondition(e.first->neighbor(e.second) != Face_handle()
-                                    && e.first->dimension() >= 1);
-    return Edge(e.first->neighbor(e.second),
-                mirror_index(e.first,  e.second));
-  }
-
-  // MODIFY
-  void flip(Face_handle f, int i);
- 
-  Vertex_handle insert_first();
-  Vertex_handle insert_second();
-  Vertex_handle insert_in_face(Face_handle f);
-  Vertex_handle insert_in_edge(Face_handle f, int i);
-  Vertex_handle insert_dim_up(Vertex_handle w = Vertex_handle(), 
-			      bool orient=true);
-
-  void remove_degree_3(Vertex_handle v, Face_handle f = Face_handle());
-  void remove_1D(Vertex_handle v); 
-   
-  void remove_second(Vertex_handle v);
-  void remove_first(Vertex_handle v);
-  void remove_dim_down(Vertex_handle v);
-  void dim_down(Face_handle f, int i);
-
-  Vertex_handle star_hole(List_edges& hole);
-  void    star_hole(Vertex_handle v, List_edges& hole);
-  void    make_hole(Vertex_handle v, List_edges& hole);
-
-//   template< class EdgeIt>
-//   Vertex_handle star_hole(EdgeIt edge_begin,EdgeIt edge_end);
- 
-//   template< class EdgeIt>
-//   void  star_hole(Vertex_handle v, EdgeIt edge_begin,  EdgeIt edge_end);
-
-//   template< class EdgeIt, class FaceIt>
-//   Vertex_handle star_hole(EdgeIt edge_begin, 
-// 		    EdgeIt edge_end,
-// 		    FaceIt face_begin,
-// 		    FaceIt face_end);
- 
-//   template< class EdgeIt, class FaceIt>
-//   void  star_hole(Vertex_handle v,
-// 		  EdgeIt edge_begin, 
-// 		  EdgeIt edge_end,
-// 		  FaceIt face_begin,
-// 		  FaceIt face_end);
-  
-  Vertex_handle create_vertex(const Vertex &v = Vertex());
-  Vertex_handle create_vertex(Vertex_handle v); //calls copy constructor 
-  Face_handle create_face(const Face& f = Face());
-  Face_handle create_face(Face_handle f); //calls copy constructor 
-
- Face_handle create_face(Face_handle f1, int i1, 
-			  Face_handle f2, int i2, 
-			  Face_handle f3, int i3);
-  Face_handle create_face(Face_handle f1, int i1, 
-			  Face_handle f2, int i2);
-  Face_handle create_face(Face_handle f1, int i1, Vertex_handle v);
-  Face_handle create_face(Vertex_handle v1, 
-			  Vertex_handle v2, 
-			  Vertex_handle v3);
-  Face_handle create_face(Vertex_handle v1, 
-			  Vertex_handle v2, 
-			  Vertex_handle v3,
-			  Face_handle f1, 
-			  Face_handle f2, 
-			  Face_handle f3);
-  void set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const;
-  void delete_face(Face_handle);
-  void delete_vertex(Vertex_handle);
-
-  // split and join operations
- protected:
-  Vertex_handle join_vertices(Face_handle f, int i, Vertex_handle v);
-
-  typedef
-  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
-  Fourtuple;
-
- public:
-  Fourtuple split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1);
-
-  inline Vertex_handle join_vertices(Face_handle f, int i) {
-    return join_vertices(f, i, f->vertex( ccw(i) ));
-  }
-
-  inline Vertex_handle join_vertices(Edge e) {
-    return join_vertices(e.first, e.second);
-  }
-
-  inline Vertex_handle join_vertices(Edge_iterator eit) {
-    return join_vertices(*eit);
-  }
-
-  inline Vertex_handle join_vertices(Edge_circulator ec) {
-    return join_vertices(*ec);
-  }
-
-  // insert_degree_2 and remove_degree_2 operations
-  Vertex_handle insert_degree_2(Face_handle f, int i);
-  void remove_degree_2(Vertex_handle v);
-
-  // CHECKING
-  bool is_valid(bool verbose = false, int level = 0) const;
-  
-  // HELPING
-private:
-  typedef std::pair<Vertex_handle,Vertex_handle> Vh_pair;
-  void  set_adjacency(Face_handle fh, 
-		      int ih, 
-		      std::map< Vh_pair, Edge>& edge_map);
-  void reorient_faces();
-  bool dim_down_precondition(Face_handle f, int i);
-
-public:
-  void clear();
-
-  template <class TDS_src>
-  Vertex_handle copy_tds(const TDS_src &tds, typename TDS_src::Vertex_handle);
-
-  template <class TDS_src>
-  Vertex_handle copy_tds(const TDS_src &tds)
-  {
-    return copy_tds(tds, typename TDS_src::Vertex_handle());
-  }
-
-  template <class TDS_src,class ConvertVertex,class ConvertFace>
-  Vertex_handle copy_tds(const TDS_src&, typename TDS_src::Vertex_handle,const ConvertVertex&,const ConvertFace&);
-
-  Vertex_handle collapse_edge(Edge e)
-  {
-    std::cout << "before collapse"<<std::endl;
-    Face_handle fh = e.first;
-    int i = e.second;
-    Vertex_handle vh = fh->vertex(cw(i));
-    Vertex_handle wh = fh->vertex(ccw(i));
-    Face_handle left = fh->neighbor(cw(i));
-    Face_handle right = fh->neighbor(ccw(i));
-    Face_handle nh = fh->neighbor(i);
-    int li = left->index(fh);
-    int ri = right->index(fh);
-    int ni = nh->index(fh);
-    left->set_neighbor(li, right);
-    right->set_neighbor(ri,left);
-    left->set_vertex(ccw(li), vh);
-    vh->set_face(right);
-    right->vertex(ccw(ri))->set_face(right);
-
-    left = nh->neighbor(ccw(ni));
-    right = nh->neighbor(cw(ni));
-    li = left->index(nh);
-    ri = right->index(nh);
-    left->set_neighbor(li, right);
-    right->set_neighbor(ri,left);
-    left->set_vertex(cw(li), vh);
-    right->vertex(cw(ri))->set_face(right);
-    delete_face(fh);
-    delete_face(nh);
-    delete_vertex(wh);
-    std::cout << "after collapse"<<std::endl;
-    return vh;
-  }
-
-
-  // I/O
-  Vertex_handle file_input(std::istream& is, bool skip_first=false);
-  void file_output(std::ostream& os,
-		   Vertex_handle v = Vertex_handle(),
-		   bool skip_first=false) const;
-  Vertex_handle off_file_input(std::istream& is, bool verbose=false);
-  void  vrml_output(std::ostream& os,
-		    Vertex_handle v = Vertex_handle(),
-		    bool skip_first=false) const;
-
-  // SETTING (had to make them public for use in remove from Triangulations)
-  void set_dimension (int n) {_dimension = n ;}
-
-  // template members definition
-public:
-  template< class EdgeIt>
-  Vertex_handle star_hole(EdgeIt edge_begin, EdgeIt edge_end)
-  // creates a new vertex 
-  // and stars from it
-  // the hole described by the range [edge_begin,edge_end[
-  // the triangulation is assumed to have dim=2
-  // hole is supposed to be ccw oriented
-  {
-     Vertex_handle newv = create_vertex();
-     star_hole(newv, edge_begin, edge_end);
-     return newv;
-  }
- 
-  template< class EdgeIt>
-  void  star_hole(Vertex_handle v, EdgeIt edge_begin,  EdgeIt edge_end)
-  // uses vertex v
-  // to star the hole described by the range [edge_begin,edge_end[
-  // the triangulation is assumed to have dim=2
-  // the hole is supposed to be ccw oriented
-  { 
-    std::list<Face_handle> empty_list;
-    star_hole(v, 
-	      edge_begin, 
-	      edge_end, 
-	      empty_list.begin(),
-	      empty_list.end());
-    return;    
-  }
-
-
-  template< class EdgeIt, class FaceIt>
-  Vertex_handle star_hole(EdgeIt edge_begin, 
-		    EdgeIt edge_end,
-		    FaceIt face_begin,
-		    FaceIt face_end)
-  // creates a new vertex 
-  // and stars from it
-  // the hole described by the range [edge_begin,edge_end[
-    // reusing the faces in the range [face_begin,face_end[
-  // the triangulation is assumed to have dim=2
-  // the hole is supposed to be ccw oriented
-  {
-    Vertex_handle newv = create_vertex();
-    star_hole(newv, edge_begin, edge_end, face_begin, face_end);
-    return newv;
-  }
- 
-  template< class EdgeIt, class FaceIt>
-  void  star_hole(Vertex_handle newv,
-		  EdgeIt edge_begin, 
-		  EdgeIt edge_end,
-		  FaceIt face_begin,
-		  FaceIt face_end)
-    // uses vertex v
-    // to star the hole described by the range [edge_begin,edge_end[
-    // reusing the faces in the range [face_begin,face_end[
-    // the triangulation is assumed to have dim=2
-    // hole is supposed to be ccw oriented
-  {
-    CGAL_triangulation_precondition(dimension() == 2);
-    EdgeIt eit = edge_begin;
-    FaceIt fit = face_begin;
-
-    Face_handle fn = (*eit).first;
-    int in = (*eit).second;
-    fn->vertex(cw(in))->set_face(fn);
-    Face_handle first_f =  reset_or_create_face(fn, in , newv, fit, face_end);
-    Face_handle previous_f=first_f, next_f;
-    ++eit; 
-
-    for( ; eit != edge_end ; eit++) {
-      fn = (*eit).first;
-      in = (*eit).second;
-      fn->vertex(cw(in))->set_face(fn);
-      next_f = reset_or_create_face(fn, in , newv, fit, face_end);
-      set_adjacency(next_f, 1, previous_f, 0);
-      previous_f=next_f;
-    }
-
-    set_adjacency(next_f, 0, first_f, 1);
-    newv->set_face(first_f);
-    return;    
-  }
-
-private:
-  template< class FaceIt>
-  Face_handle  reset_or_create_face(Face_handle fn, 
-			      int in, 
-			      Vertex_handle v,
-			      FaceIt& fit,
-			      const FaceIt& face_end)
-  {
-    if (fit == face_end) return create_face(fn, in, v);
-    (*fit)->set_vertices(fn->vertex(cw(in)), fn->vertex(ccw(in)), v);
-    (*fit)->set_neighbors(Face_handle(),Face_handle(),fn);
-    fn->set_neighbor(in, *fit);
-    return *fit++;    
-  }
-
-};
-
-//for backward compatibility
-template < class Gt , class Vb, class Fb>
-class Triangulation_default_data_structure_2 
-  : public Triangulation_data_structure_2<Vb,Fb>
-{
-public:
-  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
-  typedef Triangulation_default_data_structure_2<Gt,Vb,Fb> Tdds;
-  typedef Gt                           Geom_traits; 
-
-  Triangulation_default_data_structure_2(const Geom_traits& = Geom_traits())
-    : Tds() {}
- 
-  Triangulation_default_data_structure_2(const Tdds &tdds)
-    : Tds(tdds) {}
-};
-
-//for backward compatibility
-template <class Vb, class Fb>
-class Triangulation_data_structure_using_list_2
-  :public Triangulation_data_structure_2<Vb, Fb>
-{
-public:
-  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
-  typedef Triangulation_data_structure_using_list_2<Vb,Fb>  Tdsul;
-
-  Triangulation_data_structure_using_list_2(): Tds() {} 
-  Triangulation_data_structure_using_list_2(const Tdsul &tdsul)
-    : Tds(tdsul) {}
-};
-
- 
-template < class Vb, class Fb>
-Triangulation_data_structure_2<Vb,Fb> ::
-Triangulation_data_structure_2() 
-  : _dimension(-2)
-{ }
-
-template < class Vb, class Fb>
-Triangulation_data_structure_2<Vb,Fb> ::
-Triangulation_data_structure_2(const Tds &tds)
-{
-  copy_tds(tds);
-}
-
-template < class Vb, class Fb>
-Triangulation_data_structure_2<Vb,Fb> ::
-~Triangulation_data_structure_2()
-{
-  clear();
-}
-
-//assignement  
-template < class Vb, class Fb>
-Triangulation_data_structure_2<Vb,Fb>&
-Triangulation_data_structure_2<Vb,Fb> ::
-operator= (const Tds &tds)
-{
-  copy_tds(tds);
-  return *this;
-}  
-
-template <  class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-clear()
-{
-  faces().clear();
-  vertices().clear();
-  set_dimension(-2);
-  return;
-}
-
-template <  class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-swap(Tds &tds)
-{
-  CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid());
-  std::swap(_dimension, tds._dimension);
-  faces().swap(tds.faces());
-  vertices().swap(tds.vertices());
-  return;
-}
-
-//ACCESS FUNCTIONS
-template <class Vb, class Fb>
-inline 
-typename Triangulation_data_structure_2<Vb,Fb>::size_type
-Triangulation_data_structure_2<Vb,Fb> ::
-number_of_faces() const 
-{
-  if (dimension() < 2) return 0;
-  return faces().size();
-}
-
-template <class Vb, class Fb>
-inline 
-typename Triangulation_data_structure_2<Vb,Fb>::size_type
-Triangulation_data_structure_2<Vb,Fb>::
-number_of_edges() const
-{
-  switch (dimension()) {
-  case 1:  return number_of_vertices();
-  case 2:  return 3*number_of_faces()/2;
-  default: return 0;
-  }
-}
-      
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::size_type
-Triangulation_data_structure_2<Vb,Fb>::
-number_of_full_dim_faces() const
-{
-  return faces().size();
-}
-
-template <class Vb, class Fb>
-inline bool
-Triangulation_data_structure_2<Vb,Fb>::
-is_vertex(Vertex_handle v) const
-{
-  Vertex_iterator vit = vertices_begin();
-  while (vit != vertices_end() && v != vit)
-        ++vit;
-  return v == vit;
-}
-
-template <class Vb, class Fb>
-inline bool
-Triangulation_data_structure_2<Vb,Fb>::
-is_edge(Face_handle fh, int i) const
-{
-  if ( dimension() == 0 )  return false;
-  if ( dimension() == 1 && i != 2) return false;
-  if (i > 2) return false;
-  Face_iterator fit = face_iterator_base_begin();
-  while (fit != face_iterator_base_end() && fh != fit ) ++fit;
-  return fh == fit;
-}
-
-template <class Vb, class Fb>
-bool
-Triangulation_data_structure_2<Vb,Fb>::
-is_edge(Vertex_handle va, Vertex_handle vb) const
-// returns true (false) if the line segment ab is (is not) an edge of t
-//It is assumed that va is a vertex of t
-{
-  Vertex_circulator vc = incident_vertices(va), done(vc);
-  if ( vc == 0) return false;
-  do {
-    if( vb == vc ) {return true;} 
-  } while (++vc != done);
-  return false;
-}
- 
-
-template <class Vb, class Fb>
-bool
-Triangulation_data_structure_2<Vb,Fb>::
-is_edge(Vertex_handle va, Vertex_handle vb, 
-	Face_handle &fr,  int & i) const
-// assume va is a vertex of t
-// returns true (false) if the line segment ab is (is not) an edge of t
-// if true is returned (fr,i) is the edge ab
-// with face fr on the right of a->b
-{
-  Face_handle fc = va->face(); 
-  Face_handle start = fc;
-  if (fc == 0) return false;
-  int inda, indb;
-  do {
-    inda=fc->index(va);
-    indb = (dimension() == 2 ? cw(inda) : 1-inda);
-    if(fc->vertex(indb) == vb) {
-      fr=fc;
-      i = 3 - inda - indb; //works in dim 1 or 2
-      return true;
-    }
-    fc=fc->neighbor(indb); //turns ccw around va
-  } while (fc != start);
-  return false;
-}
-
-template <class Vb, class Fb>
-inline bool 
-Triangulation_data_structure_2<Vb,Fb>::
-is_face(Face_handle fh) const
-{
-  if (dimension() < 2)  return false;
-  Face_iterator fit = faces_begin();
-  while (fit != faces_end() && fh != fit ) ++fit;
-  return fh == fit;
-}
-
-template <class Vb, class Fb>
-inline bool 
-Triangulation_data_structure_2<Vb,Fb>::
-is_face(Vertex_handle v1, 
-	Vertex_handle v2, 
-	Vertex_handle v3) const
-{
-  Face_handle f;
-  return is_face(v1,v2,v3,f);
-}
-
-template <class Vb, class Fb>
-bool 
-Triangulation_data_structure_2<Vb,Fb>::
-is_face(Vertex_handle v1, 
-	Vertex_handle v2, 
-	Vertex_handle v3,
-	Face_handle &f) const
-{
-  if (dimension() != 2) return false;
-  int i;
-  bool b = is_edge(v1,v2,f,i);
-  if (!b) return false;
-  else if (v3== f->vertex(i)) return true;
-  f = f-> neighbor(i);
-  int ind1= f->index(v1);
-  int ind2= f->index(v2);
-  if (v3 == f->vertex(3-ind1-ind2)) { return true;}
-  return false;  
-}
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-flip(Face_handle f, int i)
-{
-  CGAL_triangulation_precondition( dimension()==2);
-  Face_handle n  = f->neighbor(i);
-  int ni = mirror_index(f,i); //ni = n->index(f);
-    
-  Vertex_handle  v_cw = f->vertex(cw(i));
-  Vertex_handle  v_ccw = f->vertex(ccw(i));
-
-  // bl == bottom left, tr == top right
-  Face_handle tr = f->neighbor(ccw(i));
-  int tri =  mirror_index(f,ccw(i));  
-  Face_handle bl = n->neighbor(ccw(ni));
-  int bli =  mirror_index(n,ccw(ni)); 
-      
-  f->set_vertex(cw(i), n->vertex(ni));
-  n->set_vertex(cw(ni), f->vertex(i));
-    
-  // update the neighborhood relations
-  set_adjacency(f, i, bl, bli);
-  set_adjacency(f, ccw(i), n, ccw(ni));
-  set_adjacency(n, ni, tr, tri);
-
-  if(v_cw->face() == f) {
-    v_cw->set_face(n);
-  }
-    
-  if(v_ccw->face() == n) {
-    v_ccw->set_face(f);
-  }
-}
-  
-template < class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-insert_first( )
-{
-  CGAL_triangulation_precondition( number_of_vertices() == 0 &&
-				   dimension()==-2 );
-  return insert_dim_up();
-}
-
-template < class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle 
-Triangulation_data_structure_2<Vb,Fb>::
-insert_second()
-{
-  CGAL_triangulation_precondition( number_of_vertices() == 1 &&
-				   dimension()==-1 );
-  return insert_dim_up();
-
-}
-
-
-template <  class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-insert_in_face(Face_handle f)
-  // New vertex will replace f->vertex(0) in face f
-{
-  CGAL_triangulation_precondition( f != Face_handle() && dimension()== 2);
-  Vertex_handle  v = create_vertex();
-
-  Vertex_handle v0 = f->vertex(0);
-  Vertex_handle v2 = f->vertex(2);
-  Vertex_handle v1 = f->vertex(1);
-    
-  Face_handle n1 = f->neighbor(1);
-  Face_handle n2 = f->neighbor(2);
-    
-  Face_handle f1 = create_face(v0, v, v2, f, n1, Face_handle());
-  Face_handle f2 = create_face(v0, v1, v, f, Face_handle(), n2);
-
-  set_adjacency(f1, 2, f2, 1);
-  if (n1 != Face_handle()) {
-    int i1 = mirror_index(f,1); //int i1 = n1->index(f);
-    n1->set_neighbor(i1,f1);
-  }
-  if (n2 != Face_handle()) {
-    int i2 = mirror_index(f,2);//int i2 = n2->index(f);
-    n2->set_neighbor(i2,f2);}
-
-  f->set_vertex(0, v);
-  f->set_neighbor(1, f1);
-  f->set_neighbor(2, f2);
-
-  if( v0->face() == f  ) {  v0->set_face(f2); }
-  v->set_face(f);
-
-  return v;
-}
-
-
-template <  class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-insert_in_edge(Face_handle f, int i)
-  //insert in the edge opposite to vertex i of face f
-{
-  CGAL_triangulation_precondition(f != Face_handle() && dimension() >= 1); 
-  if (dimension() == 1) {CGAL_triangulation_precondition(i == 2);}
-  if (dimension() == 2) {CGAL_triangulation_precondition(i == 0 || 
-							 i == 1 || 
-							 i == 2);}
-  Vertex_handle v;
-  if (dimension() == 1) {
-    v = create_vertex();
-    Face_handle ff = f->neighbor(0);
-    Vertex_handle vv = f->vertex(1);
-    Face_handle g = create_face(v,vv,Vertex_handle(),ff, f, Face_handle());
-    f->set_vertex(1,v);f->set_neighbor(0,g);
-    ff->set_neighbor(1,g);
-    v->set_face(g);
-    vv->set_face(ff);
-  }
-
-    else { //dimension() ==2
-    Face_handle n = f->neighbor(i);
-    int in = mirror_index(f,i); //n->index(f);
-    v = insert_in_face(f);
-    flip(n,in); 
-    }
-
-  return v;
-}
-
-
-template <  class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-insert_dim_up(Vertex_handle w,  bool orient)
-{
-  // the following function insert 
-  // a vertex  v which is outside the affine  hull of Tds
-  // The triangulation will be starred from  v and w 
-  // ( geometrically w=  // the infinite vertex )
-  // w=NULL for first and second insertions
-  // orient governs the orientation of the resulting triangulation
-
-  Vertex_handle v = create_vertex();
-  set_dimension( dimension() + 1);
-  Face_handle f1;
-  Face_handle f2;
-
-  const int dim = dimension(); //it is the resulting dimension
-    
-  switch (dim) { 
-  case -1:
-    f1 = create_face(v,Vertex_handle(),Vertex_handle());
-    v->set_face(f1);
-    break;
-  case 0 :
-    f1 = face_iterator_base_begin();
-    f2 = create_face(v,Vertex_handle(),Vertex_handle());
-    set_adjacency(f1, 0, f2, 0);
-    v->set_face(f2);
-    break;
-  case 1 :
-  case 2 :
-    {
-      std::list<Face_handle> faces_list;
-      Face_iterator ib= face_iterator_base_begin(); 
-      Face_iterator ib_end = face_iterator_base_end();
-      for (; ib != ib_end ; ++ib){
-	faces_list.push_back( ib);
-      }
-      
-      std::list<Face_handle>  to_delete;
-      typename std::list<Face_handle>::iterator lfit = faces_list.begin();
-      Face_handle f, g;
-
-      for ( ; lfit != faces_list.end() ; ++lfit) {
-	f = * lfit;
-	g = create_face(f); //calls copy constructor of face
-	f->set_vertex(dim,v);
-	g->set_vertex(dim,w);
-	set_adjacency(f, dim, g, dim);
-	if (f->has_vertex(w)) to_delete.push_back(g); // flat face to delete
-      }
-
-      lfit = faces_list.begin();
-      for ( ; lfit != faces_list.end() ; ++lfit) {
-	f = * lfit;
-	g = f->neighbor(dim);
-	for(int j = 0; j < dim ; ++j) {
-	  g->set_neighbor(j, f->neighbor(j)->neighbor(dim));
-	}
-      }
-
-      // couldn't unify the code for reorientation mater
-      lfit = faces_list.begin() ; 
-      if (dim == 1){
-	if (orient) {
-	  (*lfit)->reorient(); ++lfit ;  (*lfit)->neighbor(1)->reorient();
-	}
-	else {
-	  (*lfit)->neighbor(1)->reorient(); ++lfit ; (*lfit)->reorient(); 
-	}
-      }
-      else { // dimension == 2
-	for( ;lfit  != faces_list.end(); ++lfit ) {
-	  if (orient) {(*lfit)->neighbor(2)->reorient();}
-	  else { (*lfit)->reorient();}
-	}
-      }
-
-      lfit = to_delete.begin();
-      int i1, i2;
-      for ( ;lfit  != to_delete.end(); ++lfit){
-	f = *lfit ;
-	int j ;
-	if (f->vertex(0) == w) {j=0;}
-	else {j=1;}
-	f1= f->neighbor(dim); i1= mirror_index(f,dim); //f1->index(f);
-	f2= f->neighbor(j); i2= mirror_index(f,j); //f2->index(f);
-	set_adjacency(f1, i1, f2, i2);
-	delete_face(f);
-      }
-    
-      v->set_face( *(faces_list.begin()));
-    }
-    break;
-  default:
-    CGAL_triangulation_assertion(false);
-    break;  }
-  return v;
-}
-
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-remove_degree_3(Vertex_handle v, Face_handle f)
-// remove a vertex of degree 3
-{
-  CGAL_triangulation_precondition(v != Vertex_handle());
-  CGAL_triangulation_precondition(degree(v) == 3);
-
-  if (f == Face_handle()) {f= v->face();}
-  else { CGAL_triangulation_assertion( f->has_vertex(v));}
-      
-  int i = f->index(v);
-  Face_handle left = f->neighbor(cw(i));
-  int li = mirror_index(f,cw(i)); 
-  Face_handle right = f->neighbor(ccw(i));
-  int ri = mirror_index(f,ccw(i)); 
-
-  Face_handle ll, rr;
-  Vertex_handle q = left->vertex(li);
-  CGAL_triangulation_assertion( left->vertex(li) == right->vertex(ri));
-    
-  ll = left->neighbor(cw(li));
-  if(ll != Face_handle()) {
-    int lli = mirror_index(left,cw(li)); 
-    ll->set_neighbor(lli, f);
-  } 
-  f->set_neighbor(cw(i), ll);
-  if (f->vertex(ccw(i))->face() == left) f->vertex(ccw(i))->set_face(f);    
-        
-  rr = right->neighbor(ccw(ri));
-  if(rr != Face_handle()) {
-    int rri =  mirror_index(right,ccw(ri)); //rr->index(right);
-    rr->set_neighbor(rri, f);
-  } 
-  f->set_neighbor(ccw(i), rr);
-  if (f->vertex(cw(i))->face() == right) f->vertex(cw(i))->set_face(f);  
-        
-  f->set_vertex(i, q);
-  if (q->face() == right || q->face() == left) {
-    q->set_face(f);
-  }
-  delete_face(right);
-  delete_face(left);
-        
-  delete_vertex(v);
-} 
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-dim_down(Face_handle f, int i)
-{
-  CGAL_triangulation_expensive_precondition( is_valid() );
-  CGAL_triangulation_precondition( dimension() == 2 );
-  CGAL_triangulation_precondition( number_of_vertices() > 3 );
-  CGAL_triangulation_precondition( degree( f->vertex(i) ) == 
-                                   number_of_vertices()-1 );
-
-  Vertex_handle v = f->vertex(i);
-  std::list<Face_handle > to_delete;
-  std::list<Face_handle> to_downgrade;
-  Face_iterator ib = face_iterator_base_begin();
-  for( ; ib != face_iterator_base_end(); ++ib ){
-    if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);}
-    else { to_downgrade.push_back(ib);}
-  }
-
-  typename std::list<Face_handle>::iterator lfit = to_downgrade.begin();
-  int j;
-  for( ; lfit !=  to_downgrade.end() ; ++lfit) {
-    Face_handle fs = *lfit; j = fs->index(v);
-    if (j == 0) fs->cw_permute();
-    else if(j == 1) fs->ccw_permute();
-    fs->set_vertex(2, Vertex_handle());
-    fs->set_neighbor(2, Face_handle());
-    fs->vertex(0)->set_face(fs);
-  }
-  lfit = to_delete.begin();
-  for( ; lfit !=  to_delete.end() ; ++lfit) {
-    delete_face(*lfit);
-  }
-  set_dimension(dimension() -1);
-  Face_handle n0 = f->neighbor(0);
-  //Face_handle n1 = f->neighbor(1);
-  //Vertex_handle v0 = f->vertex(0);
-  Vertex_handle v1 = f->vertex(1);
-  f->set_vertex(1, v);
-  Face_handle fl = create_face(v, v1, Vertex_handle(),
-	                       n0, f, Face_handle());
-  f->set_neighbor(0, fl);
-  n0->set_neighbor(1, fl);
-  v->set_face(f);
-}
-  
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-remove_dim_down(Vertex_handle v)
-{
-  Face_handle f;
-  switch( dimension()){
-  case -1: 
-    delete_face(v->face());
-    break;
-  case 0:
-    f = v->face();
-    f->neighbor(0)->set_neighbor(0,Face_handle());
-    delete_face(v->face());
-    break;
-  case 1:
-  case 2:
-//  CGAL_triangulation_precondition ( 
-//           (dimension() == 1 &&  number_of_vertices() == 3) ||
-//           (dimension() == 2 && number_of_vertices() > 3) );
-    // the faces incident to v are down graded one dimension
-    // the other faces are deleted
-    std::list<Face_handle > to_delete;
-    std::list<Face_handle > to_downgrade;
-    Face_iterator ib = face_iterator_base_begin();
-    for( ; ib != face_iterator_base_end(); ++ib ){
-      if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);}
-      else { to_downgrade.push_back(ib);}
-    }
-
-    typename std::list<Face_handle>::iterator lfit = to_downgrade.begin();
-    int j;
-    for( ; lfit !=  to_downgrade.end() ; ++lfit) {
-      f = *lfit; j = f->index(v);
-      if (dimension() == 1) {
-	if (j == 0) 	f->reorient();
-	f->set_vertex(1,Vertex_handle());
-	f->set_neighbor(1, Face_handle());
-      }
-      else { //dimension() == 2
-	if (j == 0) f->cw_permute();
-	else if(j == 1) f->ccw_permute();
-	f->set_vertex(2, Vertex_handle());
-	f->set_neighbor(2, Face_handle());
-      }
-      f->vertex(0)->set_face(f);
-    }
-
-    lfit = to_delete.begin();
-    for( ; lfit !=  to_delete.end() ; ++lfit) {
-      delete_face(*lfit);
-    }
-  }  
-  delete_vertex(v);
-  set_dimension(dimension() -1);
-  return;
-}
-
-template <  class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::  
-remove_1D(Vertex_handle v)
-{
-  CGAL_triangulation_precondition( dimension() == 1 &&
-				   number_of_vertices() > 3);
-  Face_handle f = v->face();
-  int i = f->index(v);
-  if (i==0) {f = f->neighbor(1);}
-  CGAL_triangulation_assertion( f->index(v) == 1);
-  Face_handle g= f->neighbor(0);
-  f->set_vertex(1, g->vertex(1));
-  set_adjacency(f, 0, g->neighbor(0), 1);
-  g->vertex(1)->set_face(f);
-  delete_face(g);
-  delete_vertex(v);
-  return;
-}
-
-
-
-template <class Vb, class Fb>
-inline void
-Triangulation_data_structure_2<Vb,Fb>::
-remove_second(Vertex_handle v)
-{
-  CGAL_triangulation_precondition(number_of_vertices()== 2 &&
- 				  dimension() == 0);
-  remove_dim_down(v);
-  return;
-}
-
-    
-template <class Vb, class Fb>
-inline void
-Triangulation_data_structure_2<Vb,Fb>::
-remove_first(Vertex_handle v)
-{
-  CGAL_triangulation_precondition(number_of_vertices()== 1 && 
- 				  dimension() == -1);
-  remove_dim_down(v);
-  return; 
-}
-
-template <class Vb, class Fb>
-inline
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-star_hole(List_edges& hole)
-{
-  Vertex_handle newv = create_vertex();
-  star_hole(newv, hole);
-  return newv;
-}
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-star_hole(Vertex_handle newv, List_edges& hole)
-  // star the hole represented by hole around newv
-  // the triangulation is assumed to have dim=2
-  // hole is supposed to be ccw oriented
-{
-   
-  star_hole(newv, hole.begin(), hole.end());
-  return;	    
-}
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-make_hole(Vertex_handle v, List_edges& hole)
-  // delete the faces incident to v and v
-  // and return the dscription of the hole in hole
-{
- CGAL_triangulation_precondition(dimension() == 2);
- std::list<Face_handle> to_delete;  
-
- Face_handle  f, fn;
- int i =0, in =0;
- Vertex_handle  vv;
-
- Face_circulator fc = incident_faces(v);
- Face_circulator done(fc);
- do {
-   f = fc ;
-   i = f->index(v);
-   fn = f->neighbor(i);
-   in = mirror_index(f,i); //fn->index(f);
-   vv = f->vertex(cw(i));
-   if( vv->face()==  f) vv->set_face(fn);
-   vv = fc->vertex(ccw(i));
-   if( vv->face()== f) vv->set_face(fn);
-   fn->set_neighbor(in, Face_handle());
-   hole.push_back(Edge(fn,in));
-   to_delete.push_back(f);
- }
-  while(++fc != done);
-
-  while (! to_delete.empty()){
-    delete_face(to_delete.front());
-    to_delete.pop_front();
-  }
-  delete_vertex(v);
-  return;
-}
-
-
-template <class Vb, class Fb>
-inline
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_vertex(const Vertex &v)
-{
-  return vertices().insert(v);
-}
-
-template <class Vb, class Fb>
-inline
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_vertex(Vertex_handle vh)
-{
-  return vertices().insert(*vh);
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(const Face& f)
-{
-  return faces().insert(f);
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face( Face_handle fh)
-{
-  return create_face(*fh);
-}
-
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(Face_handle f1, int i1, 
-	    Face_handle f2, int i2, 
-	    Face_handle f3, int i3)
-{
-  Face_handle newf = faces().emplace(f1->vertex(cw(i1)),
-					      f2->vertex(cw(i2)),
-					      f3->vertex(cw(i3)),
-					      f2, f3, f1);
-  f1->set_neighbor(i1,newf);
-  f2->set_neighbor(i2,newf);
-  f3->set_neighbor(i3,newf);
-  return newf;
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(Face_handle f1, int i1, Face_handle f2, int i2)
-{
-  Face_handle newf = faces().emplace(f1->vertex(cw(i1)),
-					      f2->vertex(cw(i2)),
-					      f2->vertex(ccw(i2)),
-					      f2, Face_handle(), f1);
-  f1->set_neighbor(i1,newf);
-  f2->set_neighbor(i2,newf);
-  return newf;
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(Face_handle f1, int i1, Vertex_handle v)
-{
-  Face_handle newf = create_face();
-  newf->set_vertices(f1->vertex(cw(i1)), f1->vertex(ccw(i1)), v);
-  newf->set_neighbors(Face_handle(), Face_handle(), f1);
-  f1->set_neighbor(i1,newf);
-  return newf;
-}
-
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
-{
-  Face_handle newf = faces().emplace(v1, v2, v3);
-  return newf;
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
-Triangulation_data_structure_2<Vb,Fb>::
-create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
-	    Face_handle f1, Face_handle f2, Face_handle f3)
-{
-  Face_handle newf = faces().emplace(v1, v2, v3, f1, f2, f3);
-
-  return(newf);
-}
-
-template <class Vb, class Fb>
-inline void
-Triangulation_data_structure_2<Vb,Fb>::
-set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const
-{
-  CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension());
-  CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension());
-  CGAL_triangulation_assertion(f0 != f1);
-  f0->set_neighbor(i0,f1);
-  f1->set_neighbor(i1,f0);
-}
-
-template <class Vb, class Fb>
-inline void
-Triangulation_data_structure_2<Vb,Fb>::
-delete_face(Face_handle f)
-{
-  CGAL_triangulation_expensive_precondition( dimension() != 2 || is_face(f));
-  CGAL_triangulation_expensive_precondition( dimension() != 1 || is_edge(f,2));
-  CGAL_triangulation_expensive_precondition( dimension() != 0 ||
-					     is_vertex(f->vertex(0)) );
-  faces().erase(f);
-}
-
-template <class Vb, class Fb>
-inline void
-Triangulation_data_structure_2<Vb,Fb>::
-delete_vertex(Vertex_handle v)
-{
-  CGAL_triangulation_expensive_precondition( is_vertex(v) );
-  vertices().erase(v);
-}
-
-// split and join operations
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Fourtuple
-Triangulation_data_structure_2<Vb,Fb>::
-split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1)
-{
-  /*
-  // The following method preforms a split operation of the vertex v
-  // using the faces f1 and g1. The split operation is shown
-  // below.
-  // The names of the variables in the method correspond to the
-  // quantities in the drawings below
-  //
-  // The configuration before the split:
-  //
-  //                  cw(i1)   v3   ccw(i2)
-  //                     *-----*-----*
-  //                    / \    |    / \
-  //                   /   \ f1|f2 /   \
-  //                  /     \  |  /     \
-  //                 /       \ | /       \
-  //                /         \|/v        \
-  //               *-----------*-----------*
-  //                \         /|\         /
-  //                 \       / | \       /
-  //                  \     /  |  \     /
-  //                   \   / g2|g1 \   /
-  //                    \ /    |    \ /
-  //                     *-----*-----*
-  //                 ccw(j2)   v4   cw(j1)
-  //
-  //
-  // The configuration after the split:
-  //
-  //
-  //               cw(i1)      v3     ccw(i2)
-  //                 *---------*---------*
-  //                / \       / \       / \
-  //               /   \  f1 /   \  f2 /   \
-  //              /     \   /  f  \   /     \
-  //             /       \ /     v2\ /       \
-  //            *---------*---------*---------*
-  //             \       / \v1     / \       /
-  //              \     /   \  g  /   \     /
-  //               \   /  g2 \   /  g1 \   /
-  //                \ /       \ /       \ /
-  //                 *---------*---------*
-  //              ccw(j2)      v4      cw(j1)
-  //
-  */
-
-  CGAL_triangulation_expensive_precondition( is_valid() );
-
-  CGAL_triangulation_precondition( dimension() == 2 );
-  CGAL_triangulation_precondition( f1 != Face_handle() && f1->has_vertex(v) );
-  CGAL_triangulation_precondition( g1 != Face_handle() && g1->has_vertex(v) );
-
-  // 1. first we read some information that we will need
-  int i1 = f1->index(v);
-  int j1 = g1->index(v);
-  Face_handle f2 = f1->neighbor( cw(i1) );
-  Face_handle g2 = g1->neighbor( cw(j1) );
-
-  int i2 = f2->index(v);
-  int j2 = g2->index(v);
-
-  Vertex_handle v3 = f1->vertex( ccw(i1) );
-  Vertex_handle v4 = g1->vertex( ccw(j1) );
-
-  // lst is the list of faces adjecent to v stored in
-  // counterclockwise order from g2 to f1) inclusive.
-  // the list idx contains the indices of v in the
-  // faces in lst.
-  std::list<Face_handle> lst;
-  std::list<int>         idx;
-
-  Face_circulator fc(v, g1);
-  Face_handle ff(fc);
-  while ( ff != f2 ) {
-    lst.push_back( ff );
-    idx.push_back( ff->index(v) );
-    fc++;
-    ff = Face_handle(fc);
-  }
-  lst.push_back( ff );
-  idx.push_back( ff->index(v) );
-
-  // 2. we create the new vertices and the two new faces
-  Vertex_handle v1 = v;
-  Vertex_handle v2 = create_vertex();
-  Face_handle f = create_face(v1, v2, v3);
-  Face_handle g = create_face(v2, v1, v4);
-
-  // 3. we update the adjacency information for the new vertices and
-  //    the new faces
-  f->set_neighbor(0, f2);
-  f->set_neighbor(1, f1);
-  f->set_neighbor(2, g);
-  g->set_neighbor(0, g2);
-  g->set_neighbor(1, g1);
-  g->set_neighbor(2, f);
-  v1->set_face(f);
-  v2->set_face(g);
-
-  // 4. update the vertex for the faces f2 through g1 in
-  //    counterclockwise order
-  typename std::list<Face_handle>::iterator fit = lst.begin();
-  typename std::list<int>::iterator         iit = idx.begin();
-  for (; fit != lst.end(); ++fit, ++iit) {
-    (*fit)->set_vertex(*iit, v2);
-  }
-
-  lst.clear();
-  idx.clear();
-
-  // 5. make f and g the new neighbors of f1, f2 and g1, g2
-  //    respectively.
-  f1->set_neighbor(  cw(i1), f );
-  f2->set_neighbor( ccw(i2), f );
-  g1->set_neighbor(  cw(j1), g );
-  g2->set_neighbor( ccw(j2), g );
-
-  CGAL_triangulation_expensive_postcondition( is_valid() );
-
-  // 6. return the new stuff
-  return Fourtuple(v1, v2, f, g);
-}
-
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-join_vertices(Face_handle f, int i, Vertex_handle v)
-{
-  CGAL_triangulation_expensive_precondition( is_valid() );
-  CGAL_triangulation_precondition( f != Face_handle() );
-  CGAL_triangulation_precondition( i >= 0 && i <= 2 );
-
-  // this methods does the "join"-operation and preserves
-  // the vertex v among the two vertices that define the edge (f, i) 
-
-  Vertex_handle v1 = f->vertex( ccw(i) );
-  Vertex_handle v2 = f->vertex( cw(i)  );
-
-  CGAL_triangulation_precondition( v == v1 || v == v2 );
-
-  if ( v == v2 ) {
-    return join_vertices(f->neighbor(i), mirror_index(f,i), v);
-  }
-
-  int deg2 = degree(v2);
-
-  CGAL_triangulation_precondition( deg2 >= 3 );
-
-  if ( deg2 == 3 ) {
-    remove_degree_3(v2, f->neighbor(ccw(i)));
-    return v1;
-  }
-  
-  /*
-  // The following drawing corrsponds to the variables
-  // used in this part...
-  // The vertex v1 is returned...
-  //
-  //      itl       i=v3      itr
-  //       *---------*---------*
-  //        \       / \       /
-  //         \  tl /   \  tr /
-  //          \   /  f  \   /
-  //           \ /       \ /
-  //  v1=ccw(i) *---------*  cw(i)=v2
-  //           / \       / \
-  //          /   \  g  /   \
-  //         /  bl \   /  br \
-  //        /       \ /	      \
-  //       *---------*---------*
-  //      ibl       j=v4      ibr
-  //                                                           
-  // The situation after the "join"-operation is as follows:
-  //
-  //                 i
-  //           *-----*-----*
-  //            \    |    /
-  //             \ tl|tr /
-  //              \  |  /
-  //               \ | /
-  //                \|/
-  //                 *  v1
-  //                /|\
-  //               / | \
-  //              /  |	\
-  //             / bl|br \
-  //            /    |	  \
-  //           *-----*-----*
-  //
-  */
-
-  // first we register all the needed info
-  Face_handle g = f->neighbor(i);
-  int j = mirror_index(f,i);
-
-  Face_handle tl = f->neighbor( cw(i)  );
-  Face_handle tr = f->neighbor( ccw(i) );
-
-  int itl = mirror_index(f, cw(i)  );
-  int itr = mirror_index(f, ccw(i) );
-
-  Face_handle bl = g->neighbor( ccw(j) );
-  Face_handle br = g->neighbor( cw(j)  );
-
-  int ibl = mirror_index(g, ccw(j) );
-  int ibr = mirror_index(g, cw(j)  );
-
-  // we need to store the faces adjacent to v2 as well as the
-  // indices of v2 w.r.t. these faces, so that afterwards we can set 
-  // v1 to be the vertex for these faces
-  std::vector<Face_handle> star_faces_of_v2;
-  std::vector<int> star_indices_of_v2;
-  Face_circulator fc_start(v2);
-  Face_circulator fc = fc_start;
-
-  do {
-    Face_handle ff(fc);
-    star_faces_of_v2.push_back(ff);
-    star_indices_of_v2.push_back(ff->index(v2));
-    ++fc;
-  } while ( fc != fc_start );
-
-  CGAL_triangulation_assertion( int(star_faces_of_v2.size()) == deg2 );
-
-  // from this point and on we modify the values
-
-  // first set the neighbors
-  set_adjacency(tl, itl, tr, itr);
-  set_adjacency(bl, ibl, br, ibr);
-
-  // make sure that all the faces containing v2 as a vertex, now
-  // contain v1
-  for (unsigned int k = 0; k < star_faces_of_v2.size(); k++) {
-    int id = star_indices_of_v2[k];
-    CGAL_triangulation_assertion( star_faces_of_v2[k]->vertex(id) == v2 );
-    star_faces_of_v2[k]->set_vertex( id, v1 );
-  }
-
-  // then make sure that all the vertices have correct pointers to 
-  // faces
-  Vertex_handle v3 = f->vertex(i);
-  Vertex_handle v4 = g->vertex(j);
-  if ( v3->face() == f )  v3->set_face(tr);
-  if ( v4->face() == g )  v4->set_face(br);
-  if ( v1->face() == f || v1->face() == g ) v1->set_face(tl);
-
-
-#ifndef CGAL_NO_ASSERTIONS
-  for (Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) {
-    int id;
-    CGAL_triangulation_assertion( !fit->has_vertex(v2, id) );
-  }
-#endif
-
-  // memory management
-  star_faces_of_v2.clear();
-  star_indices_of_v2.clear();
-
-  delete_face(f);
-  delete_face(g);
-
-  delete_vertex(v2);
-
-  CGAL_triangulation_expensive_postcondition( is_valid() );
-
-  return v1;
-}
-
-// insert_degree_2 and remove_degree_2 operations
-template <class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-insert_degree_2(Face_handle f, int i)
-{
-  /*
-  // This method basically does the following transformation
-  // The remove_degree_2 method performs the same operation in the
-  // opposite direction
-  //
-  //
-  //                                                *
-  //                 i                             / \
-  //                 *                            /   \
-  //                / \                          /  f  \
-  //               /   \                        / _____	\
-  //              /  f  \                      / /  f1 \ \
-  //             /       \                     |/   v   \|
-  //  v0=ccw(i) *---------* v1=cw(i)  ===>  v0 *----*----* v1
-  //             \       /                     |\   f2  /|
-  //              \  g  /                      \ \_____/ /
-  //               \   /                        \       /
-  //                \ /                          \  g  /
-  //                 *                            \   /
-  //                 j                             \ /
-  //                                                *
-  //
-  */
-
-  Face_handle g = f->neighbor(i);
-  int j = mirror_index(f,i);
-
-  Vertex_handle  v = create_vertex();
-
-  Vertex_handle v0 = f->vertex( ccw(i) );
-  Vertex_handle v1 = f->vertex( cw(i)  );
-
-  Face_handle f_undef;
-
-  Face_handle f1 = create_face(v0, v, v1, f_undef, f, f_undef);
-  Face_handle f2 = create_face(v0, v1, v, f_undef, f_undef, g);
-
-  set_adjacency(f1, 0, f2, 0);
-  set_adjacency(f1, 2, f2, 1);
-
-  f->set_neighbor(i, f1);
-  g->set_neighbor(j, f2);
-
-  v->set_face(f1);
-
-  return v;
-}
-
-template <class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-remove_degree_2(Vertex_handle v)
-{
-  CGAL_precondition( degree(v) == 2 );
-
-  Face_handle f1 = v->face();
-  int i = f1->index(v);
-
-  Face_handle f2 = f1->neighbor( ccw(i) );
-  int j = f2->index(v);
-
-  Face_handle ff1 = f1->neighbor( i );
-  Face_handle ff2 = f2->neighbor( j );
-
-  int id1 = mirror_index(f1,i);
-  int id2 = mirror_index(f2,j);
-
-  set_adjacency(ff1, id1, ff2, id2);
-
-  Vertex_handle v1 = f1->vertex( ccw(i) );
-  //    if ( v1->face() == f1 || v1->face() == f2 ) {
-  v1->set_face(ff1);
-  //    }
-
-  Vertex_handle v2 = f1->vertex( cw(i) );
-  //    if ( v2->face() == f1 || v2->face() == f2 ) {
-  v2->set_face(ff2);
-  //    }
-
-  delete_face(f1);
-  delete_face(f2);
-
-  delete_vertex(v);
-}
-
-// CHECKING
-template <  class Vb, class Fb>
-bool
-Triangulation_data_structure_2<Vb,Fb>::
-is_valid(bool verbose, int level) const
-{
-  if(number_of_vertices() == 0){ 
-    return (dimension() == -2);
-  }
-
-      
-  bool result = (dimension()>= -1);
-  CGAL_triangulation_assertion(result);
-
-  //count and test the validity of the faces (for positive dimensions)
-  Face_iterator ib = face_iterator_base_begin(); 
-  Face_iterator ib_end = face_iterator_base_end();
-  size_type count_stored_faces =0;
-  for ( ; ib != ib_end ; ++ib){
-    count_stored_faces += 1;
-    if (dimension()>= 0) {
-      result = result && ib->is_valid(verbose,level);
-      CGAL_triangulation_assertion(result);
-    }
-  }
-  
-  result = result && (count_stored_faces == number_of_full_dim_faces());
-  CGAL_triangulation_assertion(
-		 count_stored_faces == number_of_full_dim_faces());
- 
-  // vertex count
-  size_type vertex_count = 0;
-  for(Vertex_iterator vit = vertices_begin(); vit != vertices_end();
-      ++vit) {
-    CGAL_triangulation_assertion( vit->face() != Face_handle());
-    result = result && vit->is_valid(verbose,level);
-    CGAL_triangulation_assertion( result );
-    ++vertex_count;
-  }
-  result = result && (number_of_vertices() == vertex_count);
-  CGAL_triangulation_assertion( number_of_vertices() == vertex_count );
-    
-  //edge count
-  size_type edge_count = 0;
-  for(Edge_iterator eit = edges_begin(); eit != edges_end(); ++eit) { 
-    ++edge_count;
-  }
-
-  // face count
-  size_type face_count = 0;
-  for(Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) {
-    ++face_count;
-  }
-        
-  switch(dimension()) {
-  case -1: 
-    result = result && vertex_count == 1 && face_count == 0
-      && edge_count == 0;
-    CGAL_triangulation_assertion(result);
-    break;
-  case 0:
-    result = result && vertex_count == 2 && face_count == 0
-      && edge_count == 0;
-    CGAL_triangulation_assertion(result);
-    break;
-  case 1:
-    result = result &&  edge_count == vertex_count;
-    CGAL_triangulation_assertion(result);
-    result = result &&  face_count == 0;
-    CGAL_triangulation_assertion(result);
-    break;
-  case 2:
-    result = result &&  edge_count == 3*face_count/2 ;
-    CGAL_triangulation_assertion(edge_count == 3*face_count/2);
-    break;
-  default:
-    result = false;
-    CGAL_triangulation_assertion(result);
-  }
-  return result;
-}
-
-template <class Vb, class Fb>
-template <class TDS_src,class ConvertVertex,class ConvertFace>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-copy_tds(const TDS_src& tds_src,
-        typename TDS_src::Vertex_handle vert,
-        const ConvertVertex& convert_vertex,
-        const ConvertFace& convert_face)
-{
-  if (vert != typename TDS_src::Vertex_handle()) 
-    CGAL_triangulation_precondition( tds_src.is_vertex(vert));
-
-  clear();
-  size_type n = tds_src.number_of_vertices();
-  set_dimension(tds_src.dimension());
-
-  // Number of pointers to cell/vertex to copy per cell.
-  int dim = (std::max)(1, dimension() + 1);
- 
-  if(n == 0) {return Vertex_handle();}
-  
-  //initializes maps
-  Unique_hash_map<typename TDS_src::Vertex_handle,Vertex_handle> vmap;
-  Unique_hash_map<typename TDS_src::Face_handle,Face_handle> fmap;
-
-  // create vertices
-  typename TDS_src::Vertex_iterator vit1 = tds_src.vertices_begin();
-  for( ; vit1 != tds_src.vertices_end(); ++vit1) {
-    Vertex_handle vh = create_vertex( convert_vertex(*vit1) );
-    vmap[vit1] = vh;
-    convert_vertex(*vit1, *vh);
-  }
-
-  //create faces 
-  typename TDS_src::Face_iterator fit1 = tds_src.faces().begin();
-  for( ; fit1 != tds_src.faces_end(); ++fit1) {
-    Face_handle fh = create_face( convert_face(*fit1) );
-    fmap[fit1] = fh;
-    convert_face(*fit1, *fh);
-  }
-
-  //link vertices to a cell 
-  vit1 = tds_src.vertices_begin();
-  for ( ; vit1 != tds_src.vertices_end(); vit1++) {
-    vmap[vit1]->set_face(fmap[vit1->face()]);
-  }
-
-  //update vertices and neighbor pointers
-  fit1 = tds_src.faces().begin();
-  for ( ; fit1 != tds_src.faces_end(); ++fit1) {
-      for (int j = 0; j < dim ; ++j) {
-	fmap[fit1]->set_vertex(j, vmap[fit1->vertex(j)] );
-	fmap[fit1]->set_neighbor(j, fmap[fit1->neighbor(j)]);
-      }
-    }
-   
-  // remove the post condition because it is false when copying the
-  // TDS of a regular triangulation because of hidden vertices
-  // CGAL_triangulation_postcondition( is_valid() );
-  return (vert == typename TDS_src::Vertex_handle())  ? Vertex_handle() : vmap[vert];
-}
-
-//utilities for copy_tds
-namespace internal { namespace TDS_2{
-  template <class Vertex_src,class Vertex_tgt>
-  struct Default_vertex_converter
-  {
-    Vertex_tgt operator()(const Vertex_src& src) const {
-      return Vertex_src( src.point() );
-    }
-    
-    void operator()(const Vertex_src&,Vertex_tgt&) const {}
-  };
-
-  template <class Face_src,class Face_tgt>
-  struct Default_face_converter
-  {
-    Face_tgt operator()(const Face_src& /*src*/) const {
-      return Face_tgt();
-    } 
-    
-    void operator()(const Face_src&,Face_tgt&) const {}
-  };
-  
-  template <class Vertex>
-  struct Default_vertex_converter<Vertex,Vertex>
-  {
-    const Vertex& operator()(const Vertex& src) const {
-      return src;
-    }
-    
-    void operator()(const Vertex&,Vertex&) const {}
-  };
-  
-  template <class Face>
-  struct Default_face_converter<Face,Face>{
-    const Face& operator()(const Face& src) const {
-      return src;
-    } 
-    
-    void operator()(const Face&,Face&) const {}
-  };
-} } //namespace internal::TDS_2
-
-template <  class Vb, class Fb>
-template < class TDS_src>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-copy_tds(const TDS_src &src, typename TDS_src::Vertex_handle vh)
-  // return the vertex corresponding to vh in the new tds
-{
-  if (this == &src) return Vertex_handle();
-  internal::TDS_2::Default_vertex_converter<typename TDS_src::Vertex,Vertex> setv;
-  internal::TDS_2::Default_face_converter<typename TDS_src::Face,Face>  setf;
-  return copy_tds(src,vh,setv,setf);
-}
-
-template < class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-file_output( std::ostream& os, Vertex_handle v, bool skip_first) const
-{
-  // ouput to a file
-  // if non NULL, v is the vertex to be output first
-  // if skip_first is true, the point in the first vertex is not output
-  // (it may be for instance the infinite vertex of the triangulation)
-  
-  size_type n = number_of_vertices();
-  size_type m = number_of_full_dim_faces();
-  if(is_ascii(os))  os << n << ' ' << m << ' ' << dimension() << std::endl;
-  else     os << n << m << dimension();
-  if (n==0) return;
-
-  Unique_hash_map<Vertex_handle,int> V;
-  Unique_hash_map<Face_handle,int> F;
-
-
-  // first vertex 
-  int inum = 0;
-  if ( v != Vertex_handle()) {
-    V[v] = inum++;
-    if( ! skip_first){
-      // os << v->point();
-      os << *v ;
-    if(is_ascii(os))  os << std::endl;
-    }
-  }
-  
-  // other vertices
-  for( Vertex_iterator vit= vertices_begin(); vit != vertices_end() ; ++vit) {
-    if ( v != vit ) {
-	V[vit] = inum++;
-	// os << vit->point();
-	os << *vit;
-	if(is_ascii(os)) os << "\n";
-    }
-  }
-  if(is_ascii(os)) os << "\n";
-
-  // vertices of the faces
-  inum = 0;
-  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
-  for( Face_iterator ib = face_iterator_base_begin();
-       ib != face_iterator_base_end(); ++ib) {
-    F[ib] = inum++;
-    for(int j = 0; j < dim ; ++j) {
-      os << V[ib->vertex(j)];
-      if(is_ascii(os)) os << " ";
-    }
-    os << *ib ;
-    if(is_ascii(os)) os << "\n";
-  }
-  if(is_ascii(os)) os << "\n";
-    
-  // neighbor pointers of the  faces
-  for( Face_iterator it = face_iterator_base_begin();
-       it != face_iterator_base_end(); ++it) {
-    for(int j = 0; j < dimension()+1; ++j){
-      os << F[it->neighbor(j)];
-      if(is_ascii(os))  os << " ";
-    }
-    if(is_ascii(os)) os << "\n";
-  }
-
-  return ;
-}
-
-
-template < class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-file_input( std::istream& is, bool skip_first)
-{
-  //input from file
-  //return a pointer to the first input vertex
-  // if skip_first is true, a first vertex is added (infinite_vertex)
-  //set this  first vertex as infinite_Vertex
-  if(number_of_vertices() != 0)    clear();
-  
-  size_type n, m;
-  int d;
-  is >> n >> m >> d;
-
-  if (n==0){ return Vertex_handle();}
-
-  set_dimension(d);
-
-  std::vector<Vertex_handle > V(n);
-  std::vector<Face_handle> F(m);
-
-  // read vertices
-  size_type i = 0;
-  if(skip_first){
-    V[0] = create_vertex();
-    ++i;
-  }
-  for( ; i < n; ++i) {
-    V[i] = create_vertex();
-    is >> *(V[i]);
-  }
-  
-  // Creation of the faces
-  int index;
-  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
-  {
-    for(i = 0; i < m; ++i) {
-      F[i] = create_face() ;
-      for(int j = 0; j < dim ; ++j){
-	is >> index;
-	F[i]->set_vertex(j, V[index]);
-	// The face pointer of vertices is set too often,
-	// but otherwise we had to use a further map
-	V[index]->set_face(F[i]);
-      }
-      // read in non combinatorial info of the face
-      is >> *(F[i]) ;
-    }
-  }
-
-  // Setting the neighbor pointers 
-  {
-    for(i = 0; i < m; ++i) {
-      for(int j = 0; j < dimension()+1; ++j){
-	is >> index;
-	F[i]->set_neighbor(j, F[index]);
-      }
-    }
-  }
-  
-  return V[0];
-}
-
-
-template < class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-vrml_output( std::ostream& os, Vertex_handle v, bool skip_infinite) const
-{
-  // ouput to a vrml file style
-  // Point are assumed to be 3d points with a stream oprator <<
-  // if non NULL, v is the vertex to be output first
-  // if skip_inf is true, the point in the first vertex is not output
-  // and the faces incident to v are not output
-  // (it may be for instance the infinite vertex of the terrain)
-  os << "#VRML V2.0 utf8" << std::endl;
-  os << "Shape {" << std::endl;
-  os << "\tgeometry IndexedFaceSet {" << std::endl;
-  os << "\t\tcoord Coordinate {" << std::endl;
-  os << "\t\t\tpoint [" << std::endl;
-
-  Unique_hash_map<Vertex_handle,int> vmap;
-
-  Vertex_iterator vit;
-  Face_iterator fit;
-
-  //first vertex
-  int inum = 0;
-  if ( v != Vertex_handle()) {
-    vmap[v] = inum++;
-    if( ! skip_infinite)  os << "\t\t\t\t" << *v << std::endl;
-  }
-
-  //other vertices
-  for( vit= vertices_begin(); vit != vertices_end() ; ++vit) {
-    if ( v != vit) {
-      vmap[vit] = inum++;
-      os << "\t\t\t\t" << *vit << std::endl;
-    }
-  }
-
-   os << "\t\t\t]" << std::endl;
-   os << "\t\t}" << std::endl;
-   os << "\t\tcoordIndex [" << std::endl;
-
-   // faces
-   for(fit= faces_begin(); fit != faces_end(); ++fit) {
-     if (!skip_infinite || !fit->has_vertex(v)) {
-   	os << "\t\t\t";
-	os << vmap[(*fit).vertex(0)] << ", ";
-	os << vmap[(*fit).vertex(1)] << ", ";
-	os << vmap[(*fit).vertex(2)] << ", ";
-	os << "-1, " << std::endl;  
-     }
-   }
-   os << "\t\t]" << std::endl;
-   os << "\t}" << std::endl;
-   os << "}" << std::endl;
-   return;
-}
-
-template < class Vb, class Fb>
-typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
-Triangulation_data_structure_2<Vb,Fb>::
-off_file_input( std::istream& is, bool verbose)
-{
-  // input from an OFF file
-  // assume a dimension 2 triangulation
-  // create an infinite-vertex and  infinite faces with the
-  // boundary edges if any.
-  // return the infinite vertex if created
-  Vertex_handle vinf;
-  File_scanner_OFF scanner(is, verbose);
-  if (! is) {
-    if (scanner.verbose()) {
-         std::cerr << " " << std::endl;
-	 std::cerr << "TDS::off_file_input" << std::endl;
-	 std::cerr << " input error: file format is not OFF." << std::endl;
-    }
-    return vinf;
-  }
-
-  if(number_of_vertices() != 0)    clear();
-  int dim = 2;
-  set_dimension(dim);
-
-  std::vector<Vertex_handle > vvh(scanner.size_of_vertices());
-  std::map<Vh_pair, Edge> edge_map;
-  typedef typename Vb::Point   Point;
-
-  // read vertices
-  std::size_t i;
-  for ( i = 0; i < scanner.size_of_vertices(); i++) {
-    Point p;
-    file_scan_vertex( scanner, p);
-    vvh[i] = create_vertex();
-    vvh[i]->set_point(p);
-    scanner.skip_to_next_vertex( i);
-  }
-  if ( ! is ) {
-    is.clear( std::ios::badbit);
-    return vinf;
-  }
-  //vinf = vvh[0];
-
-  // create the facets
-  for ( i = 0; i < scanner.size_of_facets(); i++) {
-    Face_handle fh = create_face();
-    std::size_t no;
-    scanner.scan_facet( no, i);
-    if( ! is || no != 3) {
-      if ( scanner.verbose()) {
-	std::cerr << " " << std::endl;
-	std::cerr << "TDS::off_file_input" << std::endl;
-	std::cerr << "facet " << i << "does not have  3 vertices." 
-		  << std::endl;
-      }
-      is.clear( std::ios::badbit);
-      return vinf;
-    }
-
-    for ( std::size_t j = 0; j < no; ++j) {
-      std::size_t index;
-      scanner.scan_facet_vertex_index( index, i);
-      fh->set_vertex(j, vvh[index]);
-      vvh[index]->set_face(fh);
-    }
-
-    for (std::size_t ih  = 0; ih < no; ++ih) {
-	set_adjacency(fh, ih, edge_map);
-    }
-  }
-
-  // deal with  boundaries
-  if ( !edge_map.empty()) {
-    vinf = create_vertex();
-    std::map<Vh_pair, Edge> inf_edge_map;
-   while (!edge_map.empty()) {
-     Face_handle fh = edge_map.begin()->second.first;
-     int ih = edge_map.begin()->second.second;
-     Face_handle fn = create_face( vinf, 
-				   fh->vertex(cw(ih)), 
-				   fh->vertex(ccw(ih)));
-     vinf->set_face(fn);
-     set_adjacency(fn, 0, fh, ih);
-     set_adjacency(fn, 1, inf_edge_map);
-     set_adjacency(fn, 2, inf_edge_map);
-     edge_map.erase(edge_map.begin());
-   }
-   CGAL_triangulation_assertion(inf_edge_map.empty());
-  }
-  
-  
-  // coherent orientation
-  reorient_faces();
-  return vinf;
-}
-
-
-template < class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-set_adjacency(Face_handle fh, 
-	      int ih, 
-	      std::map< Vh_pair, Edge>& edge_map)
-{
-  // set adjacency to (fh,ih) using the the map edge_map
-  // or insert (fh,ih) in edge map
-  Vertex_handle vhcw  =  fh->vertex(cw(ih));
-  Vertex_handle vhccw =  fh->vertex(ccw(ih)); 
-  Vh_pair  vhp =  vhcw < vhccw ?  
-                  std::make_pair(vhcw, vhccw) 
-                : std::make_pair(vhccw, vhcw) ;
-  typename std::map<Vh_pair, Edge>::iterator emapit = edge_map.find(vhp);
-  if (emapit == edge_map.end()) {// not found, insert edge
-    edge_map.insert(std::make_pair(vhp, Edge(fh,ih)));
-  }
-  else { //found set adjacency and erase
-    Edge e = emapit->second;
-    set_adjacency( fh,ih, e.first, e.second);
-    edge_map.erase(emapit);
-  } 
-}
-
-
-
-template < class Vb, class Fb>
-void
-Triangulation_data_structure_2<Vb,Fb>::
-reorient_faces()
-{
-  // reorient the faces of a triangulation 
-  // needed for example in off_file_input
-  // because the genus is not known, the number of faces 
-  std::set<Face_handle> oriented_set;
-  std::stack<Face_handle>  st;
-  Face_iterator fit = faces_begin();
-  int nf  = std::distance(faces_begin(),faces_end());
-
-  while (static_cast<int>(oriented_set.size()) != nf) {
-    while ( oriented_set.find(fit) != oriented_set.end()){
-      ++fit; // find a germ for  non oriented components 
-    }
-    // orient component
-    oriented_set.insert(fit);
-    st.push(fit);
-    while ( ! st.empty()) {
-      Face_handle fh = st.top();
-      st.pop();
-      for(int ih = 0 ; ih < 3 ; ++ih){
-	Face_handle fn = fh->neighbor(ih);
-	if (oriented_set.find(fn) == oriented_set.end()){
-	  int in = fn->index(fh);
-	  if (fn->vertex(cw(in)) != fh->vertex(ccw(ih))) fn->reorient();
-	  oriented_set.insert(fn);
-	  st.push(fn);
-	}
-      }
-    }
-
-  }
-  return;
-}
-	  
-
-template <  class Vb, class Fb>
-std::istream&
-operator>>(std::istream& is,  
-	   Triangulation_data_structure_2<Vb,Fb>& tds) 
-{
-  tds.file_input(is);
-  return is;
-}
-
-
-template <  class Vb, class Fb>
-std::ostream&
-operator<<(std::ostream& os, 
-	   const Triangulation_data_structure_2<Vb,Fb>  &tds) 
-{
-   tds.file_output(os);
-   return os;
-}
-
-
-} //namespace CGAL 
-
-#endif //CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_3.h
deleted file mode 100644
index 41d79ac..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_3.h
+++ /dev/null
@@ -1,3979 +0,0 @@
-// Copyright (c) 1999-2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion
-
-// combinatorial triangulation of the boundary of a polytope
-// of dimension d in dimension d+1
-// for -1 <= d <= 3
-
-#ifndef CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
-#define CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
-
-#include <CGAL/basic.h>
-
-#include <utility>
-#include <map>
-#include <set>
-#include <vector>
-#include <stack>
-
-#include <boost/unordered_set.hpp>
-#include <CGAL/utility.h>
-#include <CGAL/iterator.h>
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/Triangulation_utils_3.h>
-
-#include <CGAL/Concurrent_compact_container.h>
-#include <CGAL/Compact_container.h>
-
-#include <CGAL/Triangulation_ds_cell_base_3.h>
-#include <CGAL/Triangulation_ds_vertex_base_3.h>
-#include <CGAL/Triangulation_simplex_3.h>
-
-#include <CGAL/internal/Triangulation_ds_iterators_3.h>
-#include <CGAL/internal/Triangulation_ds_circulators_3.h>
-
-#ifdef CGAL_HAS_THREADS
-#  ifdef CGAL_LINKED_WITH_TBB
-#    include <tbb/enumerable_thread_specific.h>
-#  else
-#    include <boost/thread/tss.hpp>
-#  endif
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-#  include <tbb/scalable_allocator.h>
-#endif
-
-#include <boost/foreach.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-namespace CGAL {
-
-// TODO : noms : Vb != Vertex_base : clarifier.
-
-template < class Vb = Triangulation_ds_vertex_base_3<>,
-           class Cb = Triangulation_ds_cell_base_3<>,
-           class Concurrency_tag_ = Sequential_tag
->
-class Triangulation_data_structure_3
-  : public Triangulation_utils_3
-{
-  typedef Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_> Tds;
-
-public:
-
-  typedef Concurrency_tag_            Concurrency_tag;
-
-  // Tools to change the Vertex and Cell types of the TDS.
-  template < typename Vb2 >
-  struct Rebind_vertex {
-    typedef Triangulation_data_structure_3<Vb2, Cb, Concurrency_tag> Other;
-  };
-
-  template < typename Cb2 >
-  struct Rebind_cell {
-    typedef Triangulation_data_structure_3<Vb, Cb2, Concurrency_tag> Other;
-  };
-
-  // Put this TDS inside the Vertex and Cell types.
-  typedef typename Vb::template Rebind_TDS<Tds>::Other  Vertex;
-  typedef typename Cb::template Rebind_TDS<Tds>::Other  Cell;
-
-  class Cell_data {
-    unsigned char conflict_state;
-  public:
-    Cell_data() : conflict_state(0) {}
-
-    void clear()            { conflict_state = 0; }
-    void mark_in_conflict() { conflict_state = 1; }
-    void mark_on_boundary() { conflict_state = 2; }
-    void mark_processed()   { conflict_state = 1; }
-
-    bool is_clear()       const { return conflict_state == 0; }
-    bool is_in_conflict() const { return conflict_state == 1; }
-    bool is_on_boundary() const { return conflict_state == 2; }
-    bool processed() const { return conflict_state == 1; }
-  };
-
-private:
-
-  friend class internal::Triangulation_ds_facet_iterator_3<Tds>;
-  friend class internal::Triangulation_ds_edge_iterator_3<Tds>;
-
-  friend class internal::Triangulation_ds_cell_circulator_3<Tds>;
-  friend class internal::Triangulation_ds_facet_circulator_3<Tds>;
-
-public:
-    
-  // Cells
-  // N.B.: Concurrent_compact_container requires TBB
-#ifdef CGAL_LINKED_WITH_TBB
-  typedef typename boost::mpl::if_c
-  <
-    boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
-    Concurrent_compact_container<Cell, tbb::scalable_allocator<Cell> >,
-    Compact_container<Cell>
-  >::type                                                Cell_range;
-
-# else
-  typedef Compact_container<Cell>                        Cell_range;
-#endif
-
-  // Vertices
-  // N.B.: Concurrent_compact_container requires TBB
-#ifdef CGAL_LINKED_WITH_TBB
-  typedef typename boost::mpl::if_c
-  <
-    boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
-    Concurrent_compact_container<Vertex, tbb::scalable_allocator<Vertex> >,
-    Compact_container<Vertex>
-  >::type                                                Vertex_range;
-
-# else
-  typedef Compact_container<Vertex>                      Vertex_range;
-#endif
-
-  
-  typedef typename Cell_range::size_type       size_type;
-  typedef typename Cell_range::difference_type difference_type;
-
-  typedef typename Cell_range::iterator        Cell_iterator;
-  typedef typename Vertex_range::iterator      Vertex_iterator;
-
-  typedef internal::Triangulation_ds_facet_iterator_3<Tds>   Facet_iterator;
-  typedef internal::Triangulation_ds_edge_iterator_3<Tds>    Edge_iterator;
-
-  typedef internal::Triangulation_ds_cell_circulator_3<Tds>  Cell_circulator;
-  typedef internal::Triangulation_ds_facet_circulator_3<Tds> Facet_circulator;
-
-//private: // In 2D only :
-  typedef internal::Triangulation_ds_face_circulator_3<Tds>  Face_circulator;
-
-  typedef Vertex_iterator                          Vertex_handle;
-  typedef Cell_iterator                            Cell_handle;
-
-  typedef std::pair<Cell_handle, int>              Facet;
-  typedef Triple<Cell_handle, int, int>            Edge;
-
-  typedef Triangulation_simplex_3<Tds>             Simplex;
-//#ifndef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
-  //internally used for create_star_3 (faster than a tuple)
-  struct iAdjacency_info{
-    int v1;
-    Cell_handle v2;
-    int v3;
-    Cell_handle v4;
-    int v5;
-    int v6;
-    iAdjacency_info(){}
-    iAdjacency_info(int a1,Cell_handle a2,int a3,Cell_handle a4,int a5 ,int a6):
-      v1(a1),v2(a2),v3(a3),v4(a4),v5(a5),v6(a6) {}
-    void update_variables(int& a1,Cell_handle& a2,int& a3,Cell_handle& a4,int& a5 ,int& a6)
-    {
-      a1=v1;
-      a2=v2;
-      a3=v3;
-      a4=v4;
-      a5=v5;
-      a6=v6;
-    }
-  };
-//#endif  
- 
-
-public:
-  Triangulation_data_structure_3()
-    : _dimension(-2)
-  {}
-
-  Triangulation_data_structure_3(const Tds & tds)
-  {
-    copy_tds(tds);
-  }
-
-  Tds & operator= (const Tds & tds)
-  {
-    if (&tds != this) {
-      Tds tmp(tds);
-      swap(tmp);
-    }
-    return *this;
-  }
-
-  size_type number_of_vertices() const { return vertices().size(); }
-
-  int dimension() const {return _dimension;}
-
-  size_type number_of_cells() const
-    {
-      if ( dimension() < 3 ) return 0;
-      return cells().size();
-    }
-
-  size_type number_of_facets() const
-    {
-      if ( dimension() < 2 ) return 0;
-      return std::distance(facets_begin(), facets_end());
-    }
-
-  size_type number_of_edges() const
-    {
-      if ( dimension() < 1 ) return 0;
-      return std::distance(edges_begin(), edges_end());
-    }
-
-  // USEFUL CONSTANT TIME FUNCTIONS
-
-  // SETTING
-
-  void set_dimension(int n) { _dimension = n; }
-
-  Vertex_handle create_vertex(const Vertex &v)
-  {
-      return vertices().insert(v);
-  }
-
-  Vertex_handle create_vertex()
-  {
-      return vertices().emplace();
-  }
-
-  Vertex_handle create_vertex(Vertex_handle v)
-  {
-      return create_vertex(*v);
-  }
-
-  Cell_handle create_cell(const Cell &c)
-    {
-      return cells().insert(c);
-    }
-
-  Cell_handle create_cell()
-    {
-      return cells().emplace();
-    }
-
-  Cell_handle create_cell(Cell_handle c)
-    {
-      return create_cell(*c);
-    }
-
-  Cell_handle create_cell(Vertex_handle v0, Vertex_handle v1,
-                          Vertex_handle v2, Vertex_handle v3)
-    {
-      return cells().emplace(v0, v1, v2, v3);
-    }
-
-  Cell_handle create_cell(Vertex_handle v0, Vertex_handle v1,
-                          Vertex_handle v2, Vertex_handle v3,
-                          Cell_handle n0, Cell_handle n1,
-                          Cell_handle n2, Cell_handle n3)
-    {
-      return cells().emplace(v0, v1, v2, v3, n0, n1, n2, n3);
-    }
-
-  Cell_handle create_face()
-    {
-      CGAL_triangulation_precondition(dimension()<3);
-      return create_cell();
-    }
-
-  Cell_handle create_face(Vertex_handle v0, Vertex_handle v1,
-                          Vertex_handle v2)
-    {
-      CGAL_triangulation_precondition(dimension()<3);
-      return cells().emplace(v0, v1, v2, Vertex_handle());
-    }
-
-  // The following functions come from TDS_2.
-  Cell_handle create_face(Cell_handle f0, int i0,
-                          Cell_handle f1, int i1,
-                          Cell_handle f2, int i2)
-    {
-      CGAL_triangulation_precondition(dimension() <= 2);
-      Cell_handle newf = create_face(f0->vertex(cw(i0)),
-                                     f1->vertex(cw(i1)),
-                                     f2->vertex(cw(i2)));
-      set_adjacency(newf, 2, f0, i0);
-      set_adjacency(newf, 0, f1, i1);
-      set_adjacency(newf, 1, f2, i2);
-      return newf;
-    }
-
-  Cell_handle create_face(Cell_handle f0, int i0,
-                          Cell_handle f1, int i1)
-    {
-      CGAL_triangulation_precondition(dimension() <= 2);
-      Cell_handle newf = create_face(f0->vertex(cw(i0)),
-                                     f1->vertex(cw(i1)),
-                                     f1->vertex(ccw(i1)));
-      set_adjacency(newf, 2, f0, i0);
-      set_adjacency(newf, 0, f1, i1);
-      return newf;
-    }
-
-  Cell_handle create_face(Cell_handle f, int i, Vertex_handle v)
-    {
-      CGAL_triangulation_precondition(dimension() <= 2);
-      Cell_handle newf = create_face(f->vertex(cw(i)),
-                                     f->vertex(ccw(i)),
-                                     v);
-      set_adjacency(newf, 2, f, i);
-      return newf;
-    }
-
-  // not documented
-  void read_cells(std::istream& is, std::map< std::size_t, Vertex_handle > &V,
-                  std::size_t & m, std::map< std::size_t, Cell_handle > &C );
-  // not documented
-  void print_cells(std::ostream& os,
-                   const Unique_hash_map<Vertex_handle, std::size_t> &V ) const;
-
-  // ACCESS FUNCTIONS
-
-  void delete_vertex( Vertex_handle v )
-  {
-      CGAL_triangulation_expensive_precondition( is_vertex(v) );
-      vertices().erase(v);
-  }
-
-  void delete_cell( Cell_handle c )
-  {
-      CGAL_triangulation_expensive_precondition( is_simplex(c) );
-      cells().erase(c);
-  }
-
-  template <class InputIterator>
-  void delete_vertices(InputIterator begin, InputIterator end)
-  {
-      for(; begin != end; ++begin)
-          delete_vertex(*begin);
-  }
-
-  template <class InputIterator>
-  void delete_cells(InputIterator begin, InputIterator end)
-  {
-      for(; begin != end; ++begin)
-          delete_cell(*begin);
-  }
-
-  // QUERIES
-
-  bool is_simplex(Cell_handle c) const; // undocumented for now
-  bool is_vertex(Vertex_handle v) const;
-  bool is_edge(Cell_handle c, int i, int j) const;
-  bool is_edge(Vertex_handle u, Vertex_handle v, Cell_handle & c,
-               int & i, int & j) const;
-  bool is_edge(Vertex_handle u, Vertex_handle v) const;
-  bool is_facet(Cell_handle c, int i) const;
-  bool is_facet(Vertex_handle u, Vertex_handle v,
-                Vertex_handle w,
-                Cell_handle & c, int & i, int & j, int & k) const;
-  bool is_cell(Cell_handle c) const;
-  bool is_cell(Vertex_handle u, Vertex_handle v,
-               Vertex_handle w, Vertex_handle t,
-               Cell_handle & c, int & i, int & j, int & k, int & l) const;
-  bool is_cell(Vertex_handle u, Vertex_handle v,
-               Vertex_handle w, Vertex_handle t) const;
-
-  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const;
-  bool has_vertex(Cell_handle c, int i,
-                  Vertex_handle v, int & j) const;
-  bool has_vertex(const Facet & f, Vertex_handle v) const;
-  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const;
-
-  bool are_equal(Cell_handle c, int i,
-                 Cell_handle n, int j) const;
-  bool are_equal(const Facet & f, const Facet & g) const;
-  bool are_equal(const Facet & f, Cell_handle n, int j) const;
-
-  // MODIFY
-
-  bool flip(Cell_handle c, int i);
-  bool flip(const Facet &f)
-  { return flip( f.first, f.second); }
-
-  void flip_flippable(Cell_handle c, int i);
-  void flip_flippable(const Facet &f)
-  { flip_flippable( f.first, f.second ); }
-
-  bool flip(Cell_handle c, int i, int j);
-  bool flip(const Edge &e)
-  { return flip( e.first, e.second, e.third ); }
-
-  void flip_flippable(Cell_handle c, int i, int j);
-  void flip_flippable(const Edge &e)
-  { flip_flippable( e.first, e.second, e.third ); }
-
-private:
-  // common to flip and flip_flippable
-  void flip_really(Cell_handle c, int i, Cell_handle n, int in);
-  void flip_really(Cell_handle c, int i, int j,
-                   Cell_handle c1, Vertex_handle v1,
-                   int i1, int j1, int next1,
-                   Cell_handle c2, Vertex_handle v2,
-                   int i2, int j2, int next2,
-                   Vertex_handle v3);
-
-  #ifdef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
-  Cell_handle create_star_3(Vertex_handle v, Cell_handle c,
-                            int li, int prev_ind2 = -1);
-  #else
-  Cell_handle recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2,int depth);
-  Cell_handle non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2);
-
-  Cell_handle create_star_3(Vertex_handle v, Cell_handle c,
-                            int li, int prev_ind2 = -1)
-  {
-    return recursive_create_star_3(v,c,li,prev_ind2,0);
-  }
-  #endif
-
-  Cell_handle create_star_2(Vertex_handle v,
-                            Cell_handle c, int li);
-
-public:
-
-  // Internal function : assumes the conflict cells are marked.
-  template <class CellIt>
-  Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end,
-                                Cell_handle begin, int i,
-                                Vertex_handle newv)
-  {
-      CGAL_triangulation_precondition(begin != Cell_handle());
-      // if begin == NULL (default arg), we could compute one by walking in
-      // CellIt.  At the moment, the functionality is not available, you have
-      // to specify a starting facet.
-
-      Cell_handle cnew;
-      if (dimension() == 3)
-          cnew = create_star_3(newv, begin, i);
-      else
-          cnew = create_star_2(newv, begin, i);
-
-      newv->set_cell(cnew);
-      delete_cells(cell_begin, cell_end);
-      return newv;
-  }
-
-  // Internal function : assumes the conflict cells are marked.
-  template <class CellIt>
-  Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end,
-                                Cell_handle begin, int i)
-  {
-      return _insert_in_hole(cell_begin, cell_end, begin, i, create_vertex());
-  }
-
-  // Mark the cells in conflict, then calls the internal function.
-  template <class CellIt>
-  Vertex_handle insert_in_hole(CellIt cell_begin, CellIt cell_end,
-                               Cell_handle begin, int i,
-                               Vertex_handle newv)
-  {
-      for (CellIt cit = cell_begin; cit != cell_end; ++cit)
-          (*cit)->tds_data().mark_in_conflict();
-
-      return _insert_in_hole(cell_begin, cell_end, begin, i, newv);
-  }
-
-  // Mark the cells in conflict, then calls the internal function.
-  template <class CellIt>
-  Vertex_handle insert_in_hole(CellIt cell_begin, CellIt cell_end,
-                               Cell_handle begin, int i)
-  {
-      return insert_in_hole(cell_begin, cell_end, begin, i, create_vertex());
-  }
-
-  //INSERTION
-  
-  // Create a finite cell with v1, v2, v3 and v4
-  // Precondition: v1, v2, v3 and v4 MUST BE positively oriented
-  Vertex_handle insert_first_finite_cell(
-    Vertex_handle &v1, Vertex_handle &v2, Vertex_handle &v3, Vertex_handle &v4,
-    Vertex_handle v_infinite = Vertex_handle());
-
-  Vertex_handle insert_in_cell(Cell_handle c);
-
-  Vertex_handle insert_in_facet(const Facet & f)
-    { return insert_in_facet(f.first, f.second); }
-
-  Vertex_handle insert_in_facet(Cell_handle c, int i);
-
-  Vertex_handle insert_in_edge(const Edge & e)
-    { return insert_in_edge(e.first, e.second, e.third); }
-
-  Vertex_handle insert_in_edge(Cell_handle c, int i, int j);
-
-  Vertex_handle insert_increase_dimension(Vertex_handle star =Vertex_handle());
-
-  // REMOVAL
-
-private:
-  Cell_handle remove_degree_4(Vertex_handle v);
-  Cell_handle remove_degree_3(Vertex_handle v);
-  Cell_handle remove_degree_2(Vertex_handle v);
-public:
-  Cell_handle remove_from_maximal_dimension_simplex(Vertex_handle v);
-  void remove_decrease_dimension(Vertex_handle v)
-  {
-      remove_decrease_dimension (v, v);
-  }
-  void remove_decrease_dimension(Vertex_handle v, Vertex_handle w);
-  void decrease_dimension(Cell_handle f, int i);
-
-  // Change orientation of the whole TDS.
-  void reorient()
-  {
-      CGAL_triangulation_precondition(dimension() >= 1);
-      for (Cell_iterator i = cells().begin();
-              i != cells().end(); ++i)
-          change_orientation(i);
-  }
-
-  // ITERATOR METHODS
-
-  Cell_iterator cells_begin() const
-  {
-    if ( dimension() < 3 )
-        return cells_end();
-    return cells().begin();
-  }
-
-  Cell_iterator cells_end() const
-  {
-    return cells().end();
-  }
-
-  Cell_iterator raw_cells_begin() const
-  {
-    return cells().begin();
-  }
-
-  Cell_iterator raw_cells_end() const
-  {
-    return cells().end();
-  }
-
-  Facet_iterator facets_begin() const
-  {
-    if ( dimension() < 2 )
-        return facets_end();
-    return Facet_iterator(this);
-  }
-
-  Facet_iterator facets_end() const
-  {
-    return Facet_iterator(this, 1);
-  }
-
-  Edge_iterator edges_begin() const
-  {
-    if ( dimension() < 1 )
-        return edges_end();
-    return Edge_iterator(this);
-  }
-
-  Edge_iterator edges_end() const
-  {
-    return Edge_iterator(this,1);
-  }
-
-  Vertex_iterator vertices_begin() const
-  {
-    return vertices().begin();
-  }
-
-  Vertex_iterator vertices_end() const
-  {
-    return vertices().end();
-  }
-
-  // CIRCULATOR METHODS
-
-  // cells around an edge
-  Cell_circulator incident_cells(const Edge & e) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Cell_circulator(e);
-  }
-  Cell_circulator incident_cells(Cell_handle ce, int i, int j) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Cell_circulator(ce, i, j);
-  }
-
-  Cell_circulator incident_cells(const Edge &e, Cell_handle start) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Cell_circulator(e, start);
-  }
-  Cell_circulator incident_cells(Cell_handle ce, int i, int j,
-                                 Cell_handle start) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Cell_circulator(ce, i, j, start);
-  }
-
-  //facets around an edge
-  Facet_circulator incident_facets(const Edge & e) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(e);
-  }
-  Facet_circulator incident_facets(Cell_handle ce, int i, int j) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(ce, i, j);
-  }
-  Facet_circulator incident_facets(const Edge & e, const Facet & start) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(e, start);
-  }
-  Facet_circulator incident_facets(Cell_handle ce, int i, int j,
-                                   const Facet & start) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(ce, i, j, start);
-  }
-  Facet_circulator incident_facets(const Edge & e,
-                                   Cell_handle start, int f) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(e, start, f);
-  }
-  Facet_circulator incident_facets(Cell_handle ce, int i, int j,
-                                   Cell_handle start, int f) const
-  {
-    CGAL_triangulation_precondition( dimension() == 3 );
-    return Facet_circulator(ce, i, j, start, f);
-  }
-
-  // 2D : circulates on the faces adjacent to a vertex.
-  Face_circulator incident_faces(Vertex_handle v) const
-  {
-    CGAL_triangulation_precondition( dimension() == 2 );
-    return Face_circulator(v, v->cell());
-  }
-
-  // around a vertex
-private:
-
-  template <class IncidentCellIterator, class IncidentFacetIterator>
-  std::pair<IncidentCellIterator, IncidentFacetIterator>
-  incident_cells_3(Vertex_handle v, Cell_handle d,
-                                 std::pair<IncidentCellIterator,
-                                 IncidentFacetIterator> it) const
-  {
-        CGAL_triangulation_precondition(dimension() == 3);
-        
-        std::stack<Cell_handle> cell_stack;
-        cell_stack.push(d);
-        d->tds_data().mark_in_conflict();
-        *it.first++ = d;
-        
-        do {
-                Cell_handle c = cell_stack.top();
-                cell_stack.pop();
-                
-                for (int i=0; i<4; ++i) {
-                        if (c->vertex(i) == v)
-                                continue;
-                        Cell_handle next = c->neighbor(i);
-                        if (c < next)
-                                *it.second++ = Facet(c, i); // Incident facet.
-                        if (! next->tds_data().is_clear())
-                                continue;
-                        cell_stack.push(next);
-                        next->tds_data().mark_in_conflict();
-                        *it.first++ = next;
-                }
-        } while(!cell_stack.empty());
-
-        return it;
-  }
-
-  template <class IncidentFacetIterator>
-  void
-  incident_cells_3_threadsafe(Vertex_handle v, Cell_handle d,
-                              std::vector<Cell_handle> &cells,
-                              IncidentFacetIterator facet_it) const
-  {
-    boost::unordered_set<Cell_handle, Handle_hash_function> found_cells;
-
-    cells.push_back(d);
-    found_cells.insert(d);
-    int head=0;
-    int tail=1;
-    do {
-      Cell_handle c = cells[head];
-
-      for (int i=0; i<4; ++i) {
-        if (c->vertex(i) == v)
-          continue;
-        Cell_handle next = c->neighbor(i);
-        if (c < next)
-          *facet_it++ = Facet(c, i); // Incident facet
-        if (! found_cells.insert(next).second )
-          continue;
-        cells.push_back(next);
-        ++tail;
-      }
-      ++head;
-    } while(head != tail);
-  }
-  
-  void just_incident_cells_3(Vertex_handle v,
-                             std::vector<Cell_handle>& cells) const
-  {
-    CGAL_triangulation_precondition(dimension() == 3);
-
-    Cell_handle d = v->cell();
-    cells.push_back(d);
-    d->tds_data().mark_in_conflict();
-    int head=0;
-    int tail=1;
-    do {
-      Cell_handle c = cells[head];
-
-      for (int i=0; i<4; ++i) {
-        if (c->vertex(i) == v)
-          continue;
-        Cell_handle next = c->neighbor(i);
-        if (! next->tds_data().is_clear())
-          continue;
-        cells.push_back(next);
-        ++tail;
-        next->tds_data().mark_in_conflict();
-      }
-      ++head;
-    } while(head != tail);
-  }
-
-  template <class OutputIterator>
-  void
-  incident_cells_2(Vertex_handle v, Cell_handle,
-                   OutputIterator cells) const
-  {
-      CGAL_triangulation_precondition(dimension() == 2);
-
-      Face_circulator fc = incident_faces(v);
-      Face_circulator done(fc);
-      do {
-        *cells++ = fc;
-        ++fc;
-      } while (fc != done);
-  }
-
-public:
-
-  class False_filter {
-    public:
-    False_filter() {}
-    template<class T>
-    bool operator() (T) {
-      return false;
-    }
-  };
-
-        // Visitor for visit_incident_cells:
-        // outputs the facets
-  template <class OutputIterator, class Filter>
-  class Facet_extractor {
-    OutputIterator output;
-    Filter filter;
-    public:
-    Facet_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
-    output(_output), filter(_filter){}
-    void operator() (Cell_handle) {}
-
-    OutputIterator result() {
-      return output;
-    }
-
-    class Facet_it {
-      OutputIterator& output;
-      Filter& filter;
-      public:
-      Facet_it(OutputIterator& _output, Filter& _filter): output(_output), filter(_filter) {}
-      Facet_it& operator*() {return *this;};
-      Facet_it& operator++() {return *this;};
-      Facet_it operator++(int) {return *this;};
-      template<class T>
-      Facet_it& operator=(const T& e) {
-        if(filter(e))
-          return *this;
-        *output++ = e;
-        return *this;
-      }
-      Facet_it& operator=(const Facet_it& f) {
-        output = f.output;
-        filter = f.filter;
-        return *this;
-      }
-    };
-    Facet_it facet_it() {
-      return Facet_it(output, filter);
-    }
-  };
-
-        // Visitor for visit_incident_cells:
-        // outputs the cells
-  template <class OutputIterator, class Filter>
-  class Cell_extractor {
-    OutputIterator output;
-    Filter filter;
-    public:
-    Cell_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
-    output(_output), filter(_filter) {}
-
-    void operator()(Cell_handle c) {
-      if(filter(c))
-        return;
-      *output++ = c;
-    }
-    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
-    OutputIterator result() {
-      return output;
-    }
-  };
-
-  // Visitor for visit_incident_cells:
-  // WARNING: 2D ONLY
-  // outputs the faces obtained as degenerated cells
-  template <class OutputIterator, class Filter>
-  class DegCell_as_Facet_extractor {
-    OutputIterator output;
-    Filter filter;
-    public:
-    DegCell_as_Facet_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
-    output(_output), filter(_filter) {}
-
-    void operator()(Cell_handle c) {
-      Facet f = Facet(c,3);
-      if(filter(f))
-        return;
-      *output++ = f;
-    }
-    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
-    OutputIterator result() {
-      return output;
-    }
-  };
-
-  template<class Treatment, class OutputIterator, class Filter, bool hasVisited>
-  class Vertex_extractor;
-
-        // Visitor for visit_incident_cells:
-        // outputs the result of Treatment applied to the vertices
-  template<class Treatment, class OutputIterator, class Filter>
-  class Vertex_extractor<Treatment,OutputIterator,Filter,false> {
-    Vertex_handle v;
-
-    boost::unordered_set<Vertex_handle, Handle_hash_function> tmp_vertices;
-
-    Treatment treat;
-    const Tds* t;
-    Filter filter;
-  public:
-    Vertex_extractor(Vertex_handle _v, OutputIterator _output, const Tds* _t, Filter _filter):
-    v(_v), treat(_output), t(_t), filter(_filter) 
-    {
-#if ( BOOST_VERSION >= 105000 )
-      tmp_vertices.reserve(64);
-#endif
-    }
-
-    void operator()(Cell_handle c) {
-      for (int j=0; j<= t->dimension(); ++j) {
-        Vertex_handle w = c->vertex(j);
-        if(filter(w))
-          continue;
-        if (w != v) {
-          if(tmp_vertices.insert(w).second) {
-            treat(c, v, j);
-          }
-
-        }
-      }
-    }
-
-
-    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
-    OutputIterator result() {
-      return treat.result();
-    }
-  };
-
-  template<class Treatment, class OutputIterator, class Filter>
-  class Vertex_extractor<Treatment,OutputIterator,Filter,true> {
-    Vertex_handle v;
-    std::vector<Vertex_handle> tmp_vertices;
-
-    Treatment treat;
-    const Tds* t;
-    Filter filter;
-  public:
-    Vertex_extractor(Vertex_handle _v, OutputIterator _output, const Tds* _t, Filter _filter):
-    v(_v), treat(_output), t(_t), filter(_filter) {
-      tmp_vertices.reserve(64);
-    }
-
-    void operator()(Cell_handle c) {
-      for (int j=0; j<= t->dimension(); ++j) {
-	Vertex_handle w = c->vertex(j);
-	if(filter(w))
-	  continue;
-	if (w != v){
-
-          if(! w->visited_for_vertex_extractor){
-            w->visited_for_vertex_extractor = true;
-            tmp_vertices.push_back(w);
-	    treat(c, v, j);
-          }
-        }
-      }
-    }
-
-    ~Vertex_extractor()
-    {
-      for(std::size_t i=0; i < tmp_vertices.size(); ++i){
-        tmp_vertices[i]->visited_for_vertex_extractor = false;
-      }
-    }
-
-
-    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
-    OutputIterator result() {
-      return treat.result();
-    }
-  };
-
-
-
-  // Treatment for Vertex_extractor:
-  // outputs the vertices
-  template<class OutputIterator>
-  class Vertex_feeder_treatment {
-    OutputIterator output;
-  public:
-    Vertex_feeder_treatment(OutputIterator _output): output(_output) {};
-    void operator()(Cell_handle c, Vertex_handle, int index) {
-      *output++ = c->vertex(index);
-    }
-    OutputIterator result() {
-      return output;
-    }
-  };
-
-  // Treatment for Vertex_extractor:
-  // outputs the edges corresponding to the vertices
-  template<class OutputIterator>
-  class Edge_feeder_treatment {
-    OutputIterator output;
-  public:
-    Edge_feeder_treatment(OutputIterator _output): output(_output) {};
-    void operator()(Cell_handle c, Vertex_handle v, int index) {
-      *output++ = Edge(c, c->index(v), index);
-    }
-    OutputIterator result() {
-      return output;
-    }
-  };
-
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  incident_cells(Vertex_handle v, OutputIterator cells, Filter f = Filter()) const
-  {
-    return visit_incident_cells<Cell_extractor<OutputIterator, Filter>,
-      OutputIterator>(v, cells, f);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_cells(Vertex_handle v, OutputIterator cells) const
-  {
-    return incident_cells<False_filter>(v, cells);
-  }
-
-  // This version only works for vectors and only in 3D
-  void incident_cells_3(Vertex_handle v,
-                        std::vector<Cell_handle>& cells) const
-  {
-    just_incident_cells_3(v, cells);  
-    typename std::vector<Cell_handle>::iterator cit,end;
-    for(cit = cells.begin(), end = cells.end();
-              cit != end;
-              ++cit)
-    {
-      (*cit)->tds_data().clear();
-    }
-  }
-  
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  incident_cells_threadsafe(Vertex_handle v, OutputIterator cells, Filter f = Filter()) const
-  {
-    return visit_incident_cells_threadsafe<Cell_extractor<OutputIterator, Filter>,
-      OutputIterator>(v, cells, f);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_cells_threadsafe(Vertex_handle v, OutputIterator cells) const
-  {
-    return incident_cells_threadsafe<False_filter>(v, cells);
-  }
-
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  incident_facets(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const
-  {
-    CGAL_triangulation_precondition( dimension() > 1 );
-    if(dimension() == 3)
-        return visit_incident_cells<Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
-    else
-        return visit_incident_cells<DegCell_as_Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_facets(Vertex_handle v, OutputIterator facets) const
-  {
-    return incident_facets<False_filter>(v, facets);
-  }
-  
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const
-  {
-    CGAL_triangulation_precondition( dimension() > 1 );
-    if(dimension() == 3)
-        return visit_incident_cells_threadsafe<Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
-    else
-        return visit_incident_cells_threadsafe<DegCell_as_Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
-  {
-    return incident_facets<False_filter>(v, facets);
-  }
-
-  BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_member_visited,Has_visited_for_vertex_extractor,false)
-
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  incident_edges(Vertex_handle v, OutputIterator edges, Filter f = Filter()) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_precondition( dimension() >= 1 );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-    CGAL_triangulation_expensive_precondition( is_valid() );
-
-    if (dimension() == 1) {
-      CGAL_triangulation_assertion( number_of_vertices() >= 3);
-      Cell_handle n0 = v->cell();
-      const int index_v_in_n0 = n0->index(v);
-      CGAL_assume(index_v_in_n0 <= 1);
-      Cell_handle n1 = n0->neighbor(1-index_v_in_n0);
-      const int index_v_in_n1 = n1->index(v);
-      CGAL_assume(index_v_in_n1 <= 1);
-      if(!f(n0->vertex(1-index_v_in_n0))) *edges++ = Edge(n0, n0->index(v), 1-index_v_in_n0);
-      if(!f(n1->vertex(1-index_v_in_n1))) *edges++ = Edge(n1, n1->index(v), 1-index_v_in_n1);
-      return edges;
-    }
-    return visit_incident_cells<Vertex_extractor<Edge_feeder_treatment<OutputIterator>,
-                                                 OutputIterator, Filter, Has_member_visited<Vertex>::value>,
-    OutputIterator>(v, edges, f);
-  }
-
-  template <class OutputIterator>
-  OutputIterator
-  incident_edges(Vertex_handle v, OutputIterator edges) const
-  {
-    return incident_edges<False_filter>(v, edges);
-  }
-
-  template <class Filter, class OutputIterator>
-  OutputIterator
-  adjacent_vertices(Vertex_handle v, OutputIterator vertices, Filter f = Filter()) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_precondition( dimension() >= -1 );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-    CGAL_triangulation_expensive_precondition( is_valid() );
-
-    if (dimension() == -1)
-    return vertices;
-
-    if (dimension() == 0) {
-      Vertex_handle v1 = v->cell()->neighbor(0)->vertex(0);
-      if(!f(v1)) *vertices++ = v1;
-      return vertices;
-    }
-
-    if (dimension() == 1) {
-      CGAL_triangulation_assertion( number_of_vertices() >= 3);
-      Cell_handle n0 = v->cell();
-      const int index_v_in_n0 = n0->index(v);
-      CGAL_assume(index_v_in_n0 <= 1);
-      Cell_handle n1 = n0->neighbor(1-index_v_in_n0);
-      const int index_v_in_n1 = n1->index(v);
-      CGAL_assume(index_v_in_n1 <= 1);
-      Vertex_handle v1 = n0->vertex(1-index_v_in_n0);
-      Vertex_handle v2 = n1->vertex(1-index_v_in_n1);
-      if(!f(v1)) *vertices++ = v1;
-      if(!f(v2)) *vertices++ = v2;
-      return vertices;
-    }
-    return visit_incident_cells<Vertex_extractor<Vertex_feeder_treatment<OutputIterator>,
-    OutputIterator, Filter, Has_member_visited<Vertex>::value>,
-    OutputIterator>(v, vertices, f);
-  }
-
-  // old name - kept for backwards compatibility but not documented
-  template <class OutputIterator>
-  OutputIterator
-  incident_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return adjacent_vertices<False_filter>(v, vertices);
-  }
-
-  // correct name
-  template <class OutputIterator>
-  OutputIterator
-  adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
-  {
-    return adjacent_vertices<False_filter>(v, vertices);
-  }
-
-  template <class Visitor, class OutputIterator, class Filter>
-  OutputIterator
-  visit_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-
-    if ( dimension() < 2 )
-    return output;
-
-    Visitor visit(v, output, this, f);
-
-    std::vector<Cell_handle> tmp_cells;
-    tmp_cells.reserve(64);
-    if ( dimension() == 3 )
-    incident_cells_3(v, v->cell(), std::make_pair(std::back_inserter(tmp_cells), visit.facet_it()));
-    else
-    incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
-
-    typename std::vector<Cell_handle>::iterator cit;
-    for(cit = tmp_cells.begin();
-        cit != tmp_cells.end();
-        ++cit)
-    {
-      (*cit)->tds_data().clear();
-      visit(*cit);
-    } 
-
-    return visit.result();
-  }
-  
-  template <class Visitor, class OutputIterator, class Filter>
-  OutputIterator
-  visit_incident_cells_threadsafe(
-    Vertex_handle v, OutputIterator output, Filter f) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-
-    if ( dimension() < 2 )
-    return output;
-
-    Visitor visit(v, output, this, f);
-
-    std::vector<Cell_handle> tmp_cells;
-    tmp_cells.reserve(64);
-    if ( dimension() == 3 )
-      incident_cells_3_threadsafe(
-        v, v->cell(), tmp_cells, visit.facet_it());
-    else
-      incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
-
-    typename std::vector<Cell_handle>::iterator cit;
-    for(cit = tmp_cells.begin();
-        cit != tmp_cells.end();
-        ++cit)
-    {
-      visit(*cit);
-    } 
-
-    return visit.result();
-  }
-  
-  template <class Visitor, class OutputIterator, class Filter>
-  OutputIterator
-  visit_incident_cells(Vertex_handle v, OutputIterator output, 
-                       std::vector<Cell_handle> &cells, Filter f) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-
-    if ( dimension() < 2 )
-    return output;
-
-    Visitor visit(v, output, this, f);
-
-    if ( dimension() == 3 )
-    incident_cells_3(v, v->cell(), std::make_pair(std::back_inserter(cells), visit.facet_it()));
-    else
-    incident_cells_2(v, v->cell(), std::back_inserter(cells));
-
-    typename std::vector<Cell_handle>::iterator cit;
-    for(cit = cells.begin();
-        cit != cells.end();
-        ++cit)
-    {
-      (*cit)->tds_data().clear();
-      visit(*cit);
-    }
-    return visit.result();
-  }
-
-  template <class Visitor, class OutputIterator, class Filter>
-  OutputIterator
-  visit_just_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-
-    if ( dimension() < 2 )
-    return output;
-
-    Visitor visit(v, output, this, f);
-
-    std::vector<Cell_handle> tmp_cells;
-    tmp_cells.reserve(64);
-
-    if ( dimension() == 3 )
-      just_incident_cells_3(v, tmp_cells);
-    else
-    incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
-
-    typename std::vector<Cell_handle>::iterator cit;
-    for(cit = tmp_cells.begin();
-        cit != tmp_cells.end();
-        ++cit)
-    {
-      (*cit)->tds_data().clear();
-      visit(*cit);
-    }
-    return visit.result();
-  }
-  
-  // For dimension 3 only
-  template <class VertexFilter, class OutputVertexIterator>
-  OutputVertexIterator
-  adjacent_vertices_and_cells_3(Vertex_handle v, OutputVertexIterator vertices,
-                                std::vector<Cell_handle> &cells,
-                                VertexFilter f = VertexFilter()) const
-  {
-    CGAL_triangulation_precondition( v != Vertex_handle() );
-    CGAL_triangulation_precondition( dimension() == 3 );
-    CGAL_triangulation_expensive_precondition( is_vertex(v) );
-    CGAL_triangulation_expensive_precondition( is_valid() );
-
-    return 
-      visit_incident_cells
-      <
-        Vertex_extractor<Vertex_feeder_treatment<OutputVertexIterator>,
-                         OutputVertexIterator, 
-                         VertexFilter, 
-                         Has_member_visited<Vertex>::value>,
-        OutputVertexIterator
-      >(v, vertices, cells, f);
-  }
-
-  // For dimension 3 only
-  template <class OutputVertexIterator>
-  OutputVertexIterator
-  adjacent_vertices_and_cells_3(Vertex_handle v, OutputVertexIterator vertices,
-                                std::vector<Cell_handle> &cells) const
-  {
-    return adjacent_vertices_and_cells_3<False_filter>(v, vertices, cells);
-  }
-
-  size_type degree(Vertex_handle v) const;
-
-  // CHECKING
-  bool is_valid(bool verbose = false, int level = 0) const;
-  bool is_valid(Vertex_handle v, bool verbose = false, int level = 0) const;
-  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
-
-  // Helping functions
-  template <class TDS_src>
-  Vertex_handle copy_tds(const TDS_src & tds,
-                         typename TDS_src::Vertex_handle vert);
-
-  template <class TDS_src>
-  Vertex_handle copy_tds(const TDS_src & tds)
-  {
-    return copy_tds(tds, typename TDS_src::Vertex_handle());
-  }
-    // returns the new vertex corresponding to vert in the new tds
-
-  template <class TDS_src,class ConvertVertex,class ConvertCell>
-  Vertex_handle copy_tds(const TDS_src&, typename TDS_src::Vertex_handle,const ConvertVertex&,const ConvertCell&);
-
-  
-  void swap(Tds & tds);
-
-  void clear();
-
-  void set_adjacency(Cell_handle c0, int i0,
-                     Cell_handle c1, int i1) const
-  {
-      CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension());
-      CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension());
-      CGAL_triangulation_assertion(c0 != c1);
-      c0->set_neighbor(i0,c1);
-      c1->set_neighbor(i1,c0);
-  }
-
-  int mirror_index(Cell_handle c, int i) const
-  {
-      CGAL_triangulation_precondition ( i>=0 && i<4 );
-      return c->neighbor(i)->index(c);
-  }
-
-  Vertex_handle mirror_vertex(Cell_handle c, int i) const
-  {
-      return c->neighbor(i)->vertex(mirror_index(c, i));
-  }
-
-  Facet mirror_facet(Facet f) const
-  {
-    Cell_handle neighbor_cell = f.first->neighbor(f.second);
-    const int opposite_index = neighbor_cell->index(f.first);
-    return Facet(neighbor_cell, opposite_index);
-  }
-
-  // We need the const_cast<>s because TDS is not const-correct.
-  Cell_range & cells() { return _cells; }
-  Cell_range & cells() const
-  { return const_cast<Tds*>(this)->_cells; }
-
-  Vertex_range & vertices() {return _vertices;}
-  Vertex_range & vertices() const
-  { return const_cast<Tds*>(this)->_vertices; }
-
-private:
-
-  // Change the orientation of the cell by swapping indices 0 and 1.
-  void change_orientation(Cell_handle c) const
-  {
-      Vertex_handle tmp_v = c->vertex(0);
-      c->set_vertex(0, c->vertex(1));
-      c->set_vertex(1, tmp_v);
-      Cell_handle tmp_c = c->neighbor(0);
-      c->set_neighbor(0, c->neighbor(1));
-      c->set_neighbor(1, tmp_c);
-  }
-
-  // in dimension i, number of vertices >= i+2
-  // ( the boundary of a simplex in dimension i+1 has i+2 vertices )
-  int _dimension;
-
-  Cell_range   _cells;
-  Vertex_range _vertices;
-
-  // used by is-valid :
-  bool count_vertices(size_type &i, bool verbose = false, int level = 0) const;
-  // counts AND checks the validity
-  bool count_facets(size_type &i, bool verbose = false, int level = 0) const;
-  // counts but does not check
-  bool count_edges(size_type &i, bool verbose = false, int level = 0) const;
-  // counts but does not check
-  bool count_cells(size_type &i, bool verbose = false, int level = 0) const;
-  // counts AND checks the validity
-};
-
-#ifdef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2)
-{
-    CGAL_triangulation_precondition( dimension() == 3);
-    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
-    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
-
-    Cell_handle cnew = create_cell(c->vertex(0),
-                                   c->vertex(1),
-                                   c->vertex(2),
-                                   c->vertex(3));
-    cnew->set_vertex(li, v);
-    Cell_handle c_li = c->neighbor(li);
-    set_adjacency(cnew, li, c_li, c_li->index(c));
-
-    // Look for the other neighbors of cnew.
-    for (int ii=0; ii<4; ++ii) {
-      if (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle())
-          continue;
-      cnew->vertex(ii)->set_cell(cnew);
-
-      // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
-      Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
-      Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
-      Cell_handle cur = c;
-      int zz = ii;
-      Cell_handle n = cur->neighbor(zz);
-      // turn around the oriented edge vj1 vj2
-      while ( n->tds_data().is_in_conflict() ) {
-        CGAL_triangulation_assertion( n != c );
-        cur = n;
-        zz = next_around_edge(n->index(vj1), n->index(vj2));
-        n = cur->neighbor(zz);
-      }
-      // Now n is outside region, cur is inside.
-      n->tds_data().clear(); // Reset the flag for boundary cells.
-
-      int jj1 = n->index(vj1);
-      int jj2 = n->index(vj2);
-      Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
-      Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
-      int zzz = nnn->index(vvv);
-      if (nnn == cur) {
-        // Neighbor relation is reciprocal, ie
-        // the cell we are looking for is not yet created.
-        nnn = create_star_3(v, nnn, zz, zzz);
-      }
-
-      set_adjacency(nnn, zzz, cnew, ii);
-    }
-
-    return cnew;
-}
-#else
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-recursive_create_star_3(Vertex_handle v, Cell_handle c, int li,
-                        int prev_ind2, int depth)
-{
-    if ( depth == 100 ) return non_recursive_create_star_3(v,c,li,prev_ind2);
-    CGAL_triangulation_precondition( dimension() == 3);
-    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
-    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
-
-    Cell_handle cnew = create_cell(c->vertex(0),
-                                   c->vertex(1),
-                                   c->vertex(2),
-                                   c->vertex(3));
-    cnew->set_vertex(li, v);
-    Cell_handle c_li = c->neighbor(li);
-    set_adjacency(cnew, li, c_li, c_li->index(c));
-
-    // Look for the other neighbors of cnew.
-    for (int ii=0; ii<4; ++ii) {
-      if (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle())
-          continue;
-      cnew->vertex(ii)->set_cell(cnew);
-
-      // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
-      Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
-      Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
-      Cell_handle cur = c;
-      int zz = ii;
-      Cell_handle n = cur->neighbor(zz);
-      // turn around the oriented edge vj1 vj2
-      while ( n->tds_data().is_in_conflict() ) {
-        CGAL_triangulation_assertion( n != c );
-        cur = n;
-        zz = next_around_edge(n->index(vj1), n->index(vj2));
-        n = cur->neighbor(zz);
-      }
-      // Now n is outside region, cur is inside.
-      n->tds_data().clear(); // Reset the flag for boundary cells.
-
-      int jj1 = n->index(vj1);
-      int jj2 = n->index(vj2);
-      Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
-      Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
-      int zzz = nnn->index(vvv);
-      if (nnn == cur) {
-        // Neighbor relation is reciprocal, ie
-        // the cell we are looking for is not yet created.
-        nnn = recursive_create_star_3(v, nnn, zz, zzz,depth+1);
-      }
-
-      set_adjacency(nnn, zzz, cnew, ii);
-    }
-
-    return cnew;
-}
-
-//We use the class iAdjacency_info instead of a tuple because
-//at the moment we made the change it was faster like this.
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2)
-{
-    CGAL_triangulation_precondition( dimension() == 3);
-    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
-    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
-
-    Cell_handle cnew = create_cell(c->vertex(0),
-                                   c->vertex(1),
-                                   c->vertex(2),
-                                   c->vertex(3));
-    cnew->set_vertex(li, v);
-    Cell_handle c_li = c->neighbor(li);
-    set_adjacency(cnew, li, c_li, c_li->index(c));
-    
-    std::stack<iAdjacency_info> adjacency_info_stack;
-  
-    int ii=0;
-    do
-    {
-      // Look for the other neighbors of cnew.
-      if ( ! (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle()) ){
-        cnew->vertex(ii)->set_cell(cnew);
-
-        // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
-        Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
-        Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
-        Cell_handle cur = c;
-        int zz = ii;
-        Cell_handle n = cur->neighbor(zz);
-        // turn around the oriented edge vj1 vj2
-        while ( n->tds_data().is_in_conflict() ) {
-          CGAL_triangulation_assertion( n != c );
-          cur = n;
-          zz = next_around_edge(n->index(vj1), n->index(vj2));
-          n = cur->neighbor(zz);
-        }
-        // Now n is outside region, cur is inside.
-        n->tds_data().clear(); // Reset the flag for boundary cells.
-
-        int jj1 = n->index(vj1);
-        int jj2 = n->index(vj2);
-        Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
-        Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
-        int zzz = nnn->index(vvv);
-        if (nnn == cur) {
-          // Neighbor relation is reciprocal, ie
-          // the cell we are looking for is not yet created.
-          //re-run the loop
-          adjacency_info_stack.push( iAdjacency_info(zzz,cnew,ii,c,li,prev_ind2) );
-          c=nnn;  li=zz; prev_ind2=zzz; ii=0;
-          //copy-pasted from beginning to avoid if ii==0
-          CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
-          CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
-          cnew = create_cell(c->vertex(0),c->vertex(1),c->vertex(2),c->vertex(3));
-          cnew->set_vertex(li, v);
-          c_li = c->neighbor(li);
-          set_adjacency(cnew, li, c_li, c_li->index(c));          
-          continue;
-        }
-        set_adjacency(nnn, zzz, cnew, ii);
-      }
-      while (++ii==4){
-        if ( adjacency_info_stack.empty() ) return cnew;
-        Cell_handle nnn=cnew; 
-        int zzz;
-        adjacency_info_stack.top().update_variables(zzz,cnew,ii,c,li,prev_ind2);
-        adjacency_info_stack.pop();
-        set_adjacency(nnn, zzz, cnew, ii);
-      }
-    }
-    while (true);
-}
-#endif
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-create_star_2(Vertex_handle v, Cell_handle c, int li )
-{
-  CGAL_triangulation_assertion( dimension() == 2 );
-  Cell_handle cnew;
-
-  // i1 i2 such that v,i1,i2 positive
-  int i1=ccw(li);
-  // traversal of the boundary of region in ccw order to create all
-  // the new facets
-  Cell_handle bound = c;
-  Vertex_handle v1 = c->vertex(i1);
-  int ind = c->neighbor(li)->index(c); // to be able to find the
-                                       // first cell that will be created
-  Cell_handle cur;
-  Cell_handle pnew = Cell_handle();
-  do {
-    cur = bound;
-    // turn around v2 until we reach the boundary of region
-    while ( cur->neighbor(cw(i1))->tds_data().is_in_conflict() ) {
-      // neighbor in conflict
-      cur = cur->neighbor(cw(i1));
-      i1 = cur->index( v1 );
-    }
-    cur->neighbor(cw(i1))->tds_data().clear();
-    // here cur has an edge on the boundary of region
-    cnew = create_face( v, v1, cur->vertex( ccw(i1) ) );
-    set_adjacency(cnew, 0, cur->neighbor(cw(i1)),
-                           cur->neighbor(cw(i1))->index(cur));
-    cnew->set_neighbor(1, Cell_handle());
-    cnew->set_neighbor(2, pnew);
-    // pnew is null at the first iteration
-    v1->set_cell(cnew);
-    //pnew->set_neighbor( cw(pnew->index(v1)), cnew );
-    if (pnew != Cell_handle()) { pnew->set_neighbor( 1, cnew );}
-
-    bound = cur;
-    i1 = ccw(i1);
-    v1 = bound->vertex(i1);
-    pnew = cnew;
-    //} while ( ( bound != c ) || ( li != cw(i1) ) );
-  } while ( v1 != c->vertex(ccw(li)) );
-  // missing neighbors between the first and the last created cells
-  cur = c->neighbor(li)->neighbor(ind); // first created cell
-  set_adjacency(cnew, 1, cur, 2);
-  return cnew;
-}
-
-template <class Vb, class Cb, class Ct>
-std::istream&
-operator>>(std::istream& is, Triangulation_data_structure_3<Vb,Cb,Ct>& tds)
-  // reads :
-  // the dimension
-  // the number of vertices
-  // the number of cells
-  // the cells by the indices of their vertices
-  // the neighbors of each cell by their index in the preceding list of cells
-  // when dimension < 3 : the same with faces of maximal dimension
-{
-  typedef Triangulation_data_structure_3<Vb,Cb,Ct> Tds;
-  typedef typename Tds::Vertex_handle  Vertex_handle;
-  typedef typename Tds::Cell_handle    Cell_handle;
-
-  tds.clear();
-
-  std::size_t n;
-  int d;
-  if(is_ascii(is))
-     is >> d >> n;
-  else {
-    read(is, n);
-    read(is,d);
-  }
-  tds.set_dimension(d);
-
-  if(n == 0)
-    return is;
-
-  std::map<std::size_t , Vertex_handle > V;
-
-  // creation of the vertices
-  for (std::size_t i=0; i < n; i++) {
-    //    is >> p;
-    //    V[i] = tds.create_vertex();
-    //    V[i]->set_point(p);
-    V[i] = tds.create_vertex();
-  }
-
-  std::map< std::size_t, Cell_handle > C;
-  std::size_t m;
-
-  tds.read_cells(is, V, m, C);
-  CGAL_triangulation_assertion( tds.is_valid() );
-  return is;
-}
-
-template <class Vb, class Cb, class Ct>
-std::ostream&
-operator<<(std::ostream& os, const Triangulation_data_structure_3<Vb,Cb,Ct> &tds)
-  // writes :
-  // the dimension
-  // the number of vertices
-  // the number of cells
-  // the cells by the indices of their vertices
-  // the neighbors of each cell by their index in the preceding list of cells
-  // when dimension < 3 : the same with faces of maximal dimension
-{
-  typedef Triangulation_data_structure_3<Vb,Cb,Ct> Tds;
-  typedef typename Tds::size_type               size_type;
-  typedef typename Tds::Vertex_handle           Vertex_handle;
-  typedef typename Tds::Vertex_iterator         Vertex_iterator;
-
-
-  Unique_hash_map<Vertex_handle, size_type> V;
-
-  // outputs dimension and number of vertices
-  size_type n = tds.number_of_vertices();
-
-  if (is_ascii(os))
-      os << tds.dimension() << std::endl << n << std::endl;
-  else
-  {
-    write(os,tds.dimension());
-    write(os,n);
-  }
-
-  if (n == 0)
-    return os;
-
-  // index the vertices
-  size_type i = 0;
-  for (Vertex_iterator it=tds.vertices_begin(); it != tds.vertices_end(); ++it)
-    V[it] = i++;
-
-  CGAL_triangulation_assertion( i == n );
-
-  tds.print_cells(os, V);
-
-  return os;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_simplex( Cell_handle c ) const
-{
-  switch(dimension()) {
-    case 3 : return is_cell(c);
-    case 2 : return is_facet(c, 3);
-    case 1 : return is_edge(c, 0, 1);
-    case 0 : return is_vertex(c->vertex(0));
-    case -1 : return c == cells().begin();
-  }
-  return false;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_vertex(Vertex_handle v) const
-{
-    return vertices().owns_dereferencable(v);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_edge(Vertex_handle u, Vertex_handle v,
-        Cell_handle &c, int &i, int &j) const
-  // returns false when dimension <1 or when indices wrong
-{
-    CGAL_triangulation_expensive_precondition( is_vertex(u) && is_vertex(v) );
-
-    if (u==v)
-        return false;
-
-    std::vector<Cell_handle> cells;
-    cells.reserve(64);
-    incident_cells(u, std::back_inserter(cells));
-
-    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
-              cit != cells.end(); ++cit)
-        if ((*cit)->has_vertex(v, j)) {
-            c = *cit;
-            i = c->index(u);
-            return true;
-        }
-    return false;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_edge(Vertex_handle u, Vertex_handle v) const
-{
-    Cell_handle c;
-    int i, j;
-    return is_edge(u, v, c, i, j);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_edge(Cell_handle c, int i, int j) const
-{
-  if (dimension() < 1)
-    return false;
-
-  if ( i==j ) return false;
-  if ( (i<0) || (j<0) ) return false;
-  if ( (dimension() == 1) && ((i>1) || (j>1)) ) return false;
-  if ( (dimension() == 2) && ((i>2) || (j>2)) ) return false;
-  if ((i>3) || (j>3)) return false;
-
-  return cells().owns_dereferencable(c);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_facet(Vertex_handle u, Vertex_handle v,
-         Vertex_handle w,
-         Cell_handle & c, int & i, int & j, int & k) const
-  // returns false when dimension <2 or when indices wrong
-{
-    CGAL_triangulation_expensive_precondition( is_vertex(u) &&
-                                               is_vertex(v) &&
-                                               is_vertex(w) );
-
-    if ( u==v || u==w || v==w )
-        return false;
-    if (dimension() < 2)
-        return false;
-
-    std::vector<Cell_handle> cells;
-    cells.reserve(64);
-    incident_cells(u, std::back_inserter(cells));
-
-    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
-              cit != cells.end(); ++cit)
-        if ((*cit)->has_vertex(v, j) && (*cit)->has_vertex(w, k)) {
-            c = *cit;
-            i = c->index(u);
-            return true;
-        }
-    return false;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_facet(Cell_handle c, int i) const
-{
-    CGAL_triangulation_precondition(i>=0 && i<4);
-
-    if ( dimension() < 2 )
-        return false;
-
-    if ( (dimension() == 2) && (i!=3) )
-        return false;
-
-    return cells().owns_dereferencable(c);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_cell( Cell_handle c ) const
-  // returns false when dimension <3
-{
-    if (dimension() < 3)
-        return false;
-
-    return cells().owns_dereferencable(c);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_cell(Vertex_handle u, Vertex_handle v,
-        Vertex_handle w, Vertex_handle t,
-        Cell_handle & c, int & i, int & j, int & k, int & l) const
-  // returns false when dimension <3
-{
-    CGAL_triangulation_expensive_precondition( is_vertex(u) &&
-                                               is_vertex(v) &&
-                                               is_vertex(w) &&
-                                               is_vertex(t) );
-
-    if ( u==v || u==w || u==t || v==w || v==t || w==t )
-        return false;
-
-    std::vector<Cell_handle> cells;
-    cells.reserve(64);
-    incident_cells(u, std::back_inserter(cells));
-
-    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
-              cit != cells.end(); ++cit)
-        if ((*cit)->has_vertex(v, j) && (*cit)->has_vertex(w, k) &&
-            (*cit)->has_vertex(t, l)) {
-            c = *cit;
-            i = c->index(u);
-            return true;
-        }
-    return false;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_cell(Vertex_handle u, Vertex_handle v,
-        Vertex_handle w, Vertex_handle t)
-    const
-  // returns false when dimension <3
-{
-    Cell_handle c;
-    int i, j, k, l;
-    return is_cell(u, v, w, t, c, i, j, k, l);
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const
-  // computes the index j of the vertex in the cell c giving the query
-  // facet (c,i)
-  // j has no meaning if false is returned
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-  return ( c->has_vertex(v,j) && (j != i) );
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-has_vertex(Cell_handle c, int i, Vertex_handle v) const
-  // checks whether the query facet (c,i) has vertex v
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-  int j;
-  return ( c->has_vertex(v,j) && (j != i) );
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-has_vertex(const Facet & f, Vertex_handle v, int & j) const
-{
-  return has_vertex(f.first, f.second, v, j);
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-has_vertex(const Facet & f, Vertex_handle v) const
-{
-  return has_vertex(f.first, f.second, v);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-are_equal(Cell_handle c, int i, Cell_handle n, int j) const
-  // tests whether facets c,i and n,j, have the same 3 vertices
-  // the triangulation is supposed to be valid, the orientation of the
-  // facets is not checked here
-  // the neighbor relations between c and  n are not tested either,
-  // which allows to use this method before setting these relations
-  // (see remove in Delaunay_3)
-  //   if ( c->neighbor(i) != n ) return false;
-  //   if ( n->neighbor(j) != c ) return false;
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-
-  if ( (c==n) && (i==j) ) return true;
-
-  int j1,j2,j3;
-  return( n->has_vertex( c->vertex((i+1)&3), j1 ) &&
-          n->has_vertex( c->vertex((i+2)&3), j2 ) &&
-          n->has_vertex( c->vertex((i+3)&3), j3 ) &&
-          ( j1+j2+j3+j == 6 ) );
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-are_equal(const Facet & f, const Facet & g) const
-{
-  return are_equal(f.first, f.second, g.first, g.second);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-are_equal(const Facet & f, Cell_handle n, int j) const
-{
-  return are_equal(f.first, f.second, n, j);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip( Cell_handle c, int i )
-  // returns false if the facet is not flippable
-  // true other wise and
-  // flips facet i of cell c
-  // c will be replaced by one of the new cells
-{
-  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
-                                   && (number_of_vertices() >= 6) );
-  CGAL_triangulation_expensive_precondition( is_cell(c) );
-
-  Cell_handle n = c->neighbor(i);
-  int in = n->index(c);
-
-  // checks that the facet is flippable,
-  // ie the future edge does not already exist
-  if (is_edge(c->vertex(i), n->vertex(in)))
-      return false;
-
-  flip_really(c,i,n,in);
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip_flippable(Cell_handle c, int i )
-  // flips facet i of cell c
-  // c will be replaced by one of the new cells
-{
-  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
-                                   && (number_of_vertices() >= 6) );
-  CGAL_triangulation_expensive_precondition( is_cell(c) );
-
-  Cell_handle n = c->neighbor(i);
-  int in = n->index(c);
-
-  // checks that the facet is flippable,
-  // ie the future edge does not already exist
-  CGAL_triangulation_expensive_precondition( !is_edge(c->vertex(i),
-                                                      n->vertex(in)));
-  flip_really(c,i,n,in);
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip_really( Cell_handle c, int i, Cell_handle n, int in )
-  // private - used by flip and flip_flippable
-{
-  int i1 = (i+1)&3;
-  int i2 = (i+2)&3;
-  int i3 = (i+3)&3;
-
-  int in1 = n->index(c->vertex(i1));
-  int in2 = n->index(c->vertex(i2));
-  int in3 = n->index(c->vertex(i3));
-
-  set_adjacency(c, i, n->neighbor(in3), n->neighbor(in3)->index(n));
-  c->set_vertex( i3, n->vertex(in) );
-
-  set_adjacency(n, in, c->neighbor(i1), c->neighbor(i1)->index(c));
-  n->set_vertex( in1, c->vertex(i) );
-
-  Cell_handle cnew = create_cell(c->vertex(i), c->vertex(i1),
-                                 n->vertex(in), n->vertex(in3));
-
-  set_adjacency(cnew, 0, n->neighbor(in2), n->neighbor(in2)->index(n));
-  set_adjacency(cnew, 1, n, in2);
-  set_adjacency(cnew, 2, c->neighbor(i2), c->neighbor(i2)->index(c));
-  set_adjacency(cnew, 3, c, i2);
-  set_adjacency(c, i1, n, in3);
-
-  if ((i&1) != 0)
-      change_orientation(cnew);
-
-  c->vertex(i1)->set_cell(cnew);
-  c->vertex(i2)->set_cell(c);
-  n->vertex(in3)->set_cell(n);
-  // to be implemented : 2d case
-  // CGAL_triangulation_precondition( (0<=i) && (i<3) );
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip( Cell_handle c, int i, int j )
-  // returns false if the edge is not flippable
-  // true otherwise and
-  // flips edge i,j of cell c
-  // c will be deleted
-{
-  CGAL_triangulation_precondition( (dimension() == 3)
-                                   && (0<=i) && (i<4)
-                                   && (0<=j) && (j<4)
-                                   && ( i != j )
-                                   && (number_of_vertices() >= 6) );
-  CGAL_triangulation_expensive_precondition( is_cell(c) );
-
-  // checks that the edge is flippable ie degree 3
-  int degree = 0;
-  Cell_circulator ccir = incident_cells(c,i,j);
-  Cell_circulator cdone = ccir;
-  do {
-    ++degree;
-    ++ccir;
-  } while ( ccir != cdone );
-
-  if ( degree != 3 ) return false;
-
-  int next = next_around_edge(i,j);
-  Cell_handle c1 = c->neighbor( next );
-  Vertex_handle v1 = c->vertex( next ); // will become vertex of c1
-  int i1 = c1->index( c->vertex(i) );
-  int j1 = c1->index( c->vertex(j) );
-
-  int next1 = next_around_edge(i1,j1);
-  Cell_handle c2  = c1->neighbor( next1 );
-  Vertex_handle v2 = c1->vertex( next1 ); // will become vertex of c2
-  int i2 = c2->index( c->vertex(i) );
-  int j2 = c2->index( c->vertex(j) );
-
-  int next2 = next_around_edge(i2,j2);
-  Vertex_handle v3 = c2->vertex( next2 );
-
-  // checks that the edge is flippable,
-  // is the future cells do not already exist
-  if ( is_cell(v1,v2,v3,c->vertex(i)) ) return false;
-  if ( is_cell(v1,v2,v3,c->vertex(j)) ) return false;
-
-  flip_really(c,i,j,c1,v1,i1,j1,next1,c2,v2,i2,j2,next2,v3);
-
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip_flippable( Cell_handle c, int i, int j )
-  // flips edge i,j of cell c
-  // c will be deleted
-{
-  CGAL_triangulation_precondition( (dimension() == 3)
-                                   && (0<=i) && (i<4)
-                                   && (0<=j) && (j<4)
-                                   && ( i != j )
-                                   && (number_of_vertices() >= 6) );
-  CGAL_triangulation_expensive_precondition( is_cell(c) );
-
-  // checks that the edge is flippable ie degree 3
-  CGAL_triangulation_precondition_code( int degree = 0; );
-  CGAL_triangulation_precondition_code
-    ( Cell_circulator ccir = incident_cells(c,i,j); );
-  CGAL_triangulation_precondition_code( Cell_circulator cdone = ccir; );
-  CGAL_triangulation_precondition_code( do {
-                                          ++degree;
-                                          ++ccir;
-                                        } while ( ccir != cdone ); );
-
-  CGAL_triangulation_precondition( degree == 3 );
-
-  int next = next_around_edge(i,j);
-  Cell_handle c1 = c->neighbor( next );
-  Vertex_handle v1 = c->vertex( next ); // will become vertex of c1
-  int i1 = c1->index( c->vertex(i) );
-  int j1 = c1->index( c->vertex(j) );
-
-  int next1 = next_around_edge(i1,j1);
-  Cell_handle c2  = c1->neighbor( next1 );
-  Vertex_handle v2 = c1->vertex( next1 ); // will become vertex of c2
-  int i2 = c2->index( c->vertex(i) );
-  int j2 = c2->index( c->vertex(j) );
-
-  int next2 = next_around_edge(i2,j2);
-  Vertex_handle v3 = c2->vertex( next2 );
-
-  // checks that the edge is flippable,
-  // is the future cells do not already exist
-  CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(i)) );
-  CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(j)) );
-
-  flip_really(c,i,j,c1,v1,i1,j1,next1,c2,v2,i2,j2,next2,v3);
-}
-
-template <class Vb, class Cb, class Ct>
-inline
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-flip_really( Cell_handle c, int i, int j,
-             Cell_handle c1, Vertex_handle v1,
-             int i1, int j1, int next1,
-             Cell_handle c2, Vertex_handle v2,
-             int i2, int j2, int next2,
-             Vertex_handle v3 )
-{
-  c->vertex(i)->set_cell(c1);
-  c->vertex(j)->set_cell(c2);
-
-  c1->set_vertex( j1, v1 );
-  v1->set_cell(c1);
-  c2->set_vertex( i2, v2 );
-  v2->set_cell(c2);
-
-  set_adjacency(c1, next1,c2->neighbor(j2), c2->neighbor(j2)->index(c2));
-  set_adjacency(c2,c2->index(v1),c1->neighbor(i1),c1->neighbor(i1)->index(c1));
-
-  set_adjacency(c1, i1, c2, j2);
-
-  set_adjacency(c1, 6-i1-j1-next1, c->neighbor(j), c->neighbor(j)->index(c));
-  set_adjacency(c2, next2, c->neighbor(i), c->neighbor(i)->index(c));
-
-  v3->set_cell( c2 );
-
-  delete_cell( c );
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-read_cells(std::istream& is, std::map< std::size_t, Vertex_handle > &V,
-           std::size_t & m, std::map< std::size_t, Cell_handle > &C)
-{
-  // creation of the cells and neighbors
-  switch (dimension()) {
-  case 3:
-  case 2:
-  case 1:
-    {
-      if(is_ascii(is))
-        is >> m;
-      else
-        read(is, m);
-
-      for(std::size_t i = 0; i < m; i++) {
-        Cell_handle c = create_cell();
-        for (int k=0; k<=dimension(); ++k) {
-          std::size_t ik;
-            if(is_ascii(is))
-               is >> ik;
-            else
-              read(is, ik);
-            c->set_vertex(k, V[ik]);
-            V[ik]->set_cell(c);
-        }
-        C[i] = c;
-      }
-      for(std::size_t j = 0; j < m; j++) {
-        Cell_handle c = C[j];
-        for (int k=0; k<=dimension(); ++k) {
-          std::size_t ik;
-            if(is_ascii(is))
-              is >> ik;
-            else
-              read(is, ik);
-            c->set_neighbor(k, C[ik]);
-        }
-      }
-      break;
-    }
-  case 0:
-    {
-      m = 2;
-
-      //      CGAL_triangulation_assertion( n == 2 );
-      for (int i=0; i < 2; i++) {
-        Cell_handle c = create_face(V[i], Vertex_handle(), Vertex_handle());
-        C[i] = c;
-        V[i]->set_cell(c);
-      }
-      for (int j=0; j < 2; j++) {
-        Cell_handle c = C[j];
-        c->set_neighbor(0, C[1-j]);
-      }
-      break;
-    }
-  case -1:
-    {
-      m = 1;
-      //      CGAL_triangulation_assertion( n == 1 );
-      Cell_handle c = create_face(V[0], Vertex_handle(), Vertex_handle());
-      C[0] = c;
-      V[0]->set_cell(c);
-      break;
-    }
-  }
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-print_cells(std::ostream& os, const Unique_hash_map<Vertex_handle, std::size_t> &V ) const
-{
-  std::map<Cell_handle, std::size_t > C;
-  std::size_t i = 0;
-
-  switch ( dimension() ) {
-  case 3:
-    {
-      std::size_t m = number_of_cells();
-      if(is_ascii(os))
-        os << m << std::endl;
-      else
-        write(os, m);
-
-      // write the cells
-      Cell_iterator it;
-      for(it = cells_begin(); it != cells_end(); ++it) {
-        C[it] = i++;
-        for(int j = 0; j < 4; j++){
-          if(is_ascii(os)) {
-            os << V[it->vertex(j)];
-            if ( j==3 )
-              os << std::endl;
-            else
-              os << ' ';
-          }
-          else
-            write(os, V[it->vertex(j)]);
-        }
-      }
-      CGAL_triangulation_assertion( i == m );
-
-      // write the neighbors
-      for(it = cells_begin(); it != cells_end(); ++it) {
-        for (int j = 0; j < 4; j++) {
-          if(is_ascii(os)){
-            os << C[it->neighbor(j)];
-            if(j==3)
-              os << std::endl;
-            else
-              os <<  ' ';
-          }
-          else
-            write(os, C[it->neighbor(j)]);
-        }
-      }
-      break;
-    }
-  case 2:
-    {
-      size_type m = number_of_facets();
-      if(is_ascii(os))
-        os << m << std::endl;
-      else
-        write(os, m);
-
-      // write the facets
-      Facet_iterator it;
-      for(it = facets_begin(); it != facets_end(); ++it) {
-        C[(*it).first] = i++;
-        for(int j = 0; j < 3; j++){
-          if(is_ascii(os)) {
-            os << V[(*it).first->vertex(j)];
-            if ( j==2 )
-              os << std::endl;
-            else
-              os <<  ' ';
-          }
-          else {
-            write(os,  V[(*it).first->vertex(j)]);
-          }
-        }
-      }
-      CGAL_triangulation_assertion( i == m );
-
-      // write the neighbors
-      for(it = facets_begin(); it != facets_end(); ++it) {
-        for (int j = 0; j < 3; j++) {
-          if(is_ascii(os)){
-            os << C[(*it).first->neighbor(j)];
-            if(j==2)
-              os << std::endl;
-            else
-              os <<  ' ';
-          }
-          else {
-            write(os, C[(*it).first->neighbor(j)]);
-          }
-        }
-      }
-      break;
-    }
-  case 1:
-    {
-      size_type m = number_of_edges();
-      if(is_ascii(os))
-        os << m << std::endl;
-      else
-        write(os, m);
-      // write the edges
-      Edge_iterator it;
-      for(it = edges_begin(); it != edges_end(); ++it) {
-        C[(*it).first] = i++;
-        for(int j = 0; j < 2; j++){
-          if(is_ascii(os)) {
-            os << V[(*it).first->vertex(j)];
-            if ( j==1 )
-              os << std::endl;
-            else
-              os <<  ' ';
-          }
-          else {
-            write(os, V[(*it).first->vertex(j)]);
-          }
-        }
-      }
-      CGAL_triangulation_assertion( i == m );
-
-      // write the neighbors
-      for(it = edges_begin(); it != edges_end(); ++it) {
-        for (int j = 0; j < 2; j++) {
-          if(is_ascii(os)){
-            os << C[(*it).first->neighbor(j)];
-            if(j==1)
-              os << std::endl;
-            else
-              os <<  ' ';
-          }
-          else {
-            write(os, C[(*it).first->neighbor(j)]);
-          }
-        }
-      }
-      break;
-    }
-  }
-}
-
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::insert_first_finite_cell(
-  Vertex_handle &v0, Vertex_handle &v1, Vertex_handle &v2, Vertex_handle &v3,
-  Vertex_handle v_infinite)
-{
-  CGAL_triangulation_precondition( 
-    (v_infinite == Vertex_handle() && dimension() == -2)
-    || (v_infinite != Vertex_handle() && dimension() == -1));
-
-  if (v_infinite == Vertex_handle())
-    v_infinite = create_vertex();
-
-  set_dimension(3);
-
-  v0 = create_vertex();
-  v1 = create_vertex();
-  v2 = create_vertex();
-  v3 = create_vertex();
-
-  Cell_handle c0123 = create_cell(v0,         v1,   v2,   v3);
-  Cell_handle ci012 = create_cell(v_infinite, v0,   v1,   v2);
-  Cell_handle ci103 = create_cell(v_infinite, v1,   v0,   v3);
-  Cell_handle ci023 = create_cell(v_infinite, v0,   v2,   v3);
-  Cell_handle ci132 = create_cell(v_infinite, v1,   v3,   v2);
-
-  v_infinite->set_cell(ci012);
-  v0->set_cell(c0123);
-  v1->set_cell(c0123);
-  v2->set_cell(c0123);
-  v3->set_cell(c0123);
-
-  set_adjacency(c0123, 0, ci132, 0);
-  set_adjacency(c0123, 1, ci023, 0);
-  set_adjacency(c0123, 2, ci103, 0);
-  set_adjacency(c0123, 3, ci012, 0);
-
-  set_adjacency(ci012, 3, ci103, 3);
-  set_adjacency(ci012, 2, ci023, 3);
-  set_adjacency(ci012, 1, ci132, 2);
-  set_adjacency(ci103, 1, ci023, 2);
-  set_adjacency(ci023, 1, ci132, 1);
-  set_adjacency(ci103, 2, ci132, 3);
-
-  return v_infinite;
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-insert_in_cell(Cell_handle c)
-{
-  CGAL_triangulation_precondition( dimension() == 3 );
-  CGAL_triangulation_precondition( c != Cell_handle() );
-  CGAL_triangulation_expensive_precondition( is_cell(c) );
-
-  Vertex_handle v = create_vertex();
-
-  Vertex_handle v0 = c->vertex(0);
-  Vertex_handle v1 = c->vertex(1);
-  Vertex_handle v2 = c->vertex(2);
-  Vertex_handle v3 = c->vertex(3);
-
-  Cell_handle n1 = c->neighbor(1);
-  Cell_handle n2 = c->neighbor(2);
-  Cell_handle n3 = c->neighbor(3);
-
-  // c will be modified to have v,v1,v2,v3 as vertices
-  Cell_handle c3 = create_cell(v0,v1,v2,v);
-  Cell_handle c2 = create_cell(v0,v1,v,v3);
-  Cell_handle c1 = create_cell(v0,v,v2,v3);
-
-  set_adjacency(c3, 0, c, 3);
-  set_adjacency(c2, 0, c, 2);
-  set_adjacency(c1, 0, c, 1);
-
-  set_adjacency(c2, 3, c3, 2);
-  set_adjacency(c1, 3, c3, 1);
-  set_adjacency(c1, 2, c2, 1);
-
-  set_adjacency(n1, n1->index(c), c1, 1);
-  set_adjacency(n2, n2->index(c), c2, 2);
-  set_adjacency(n3, n3->index(c), c3, 3);
-
-  c->set_vertex(0,v);
-
-  v0->set_cell(c1);
-  v->set_cell(c);
-
-  return v;
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-insert_in_facet(Cell_handle c, int i)
-{ // inserts v in the facet opposite to vertex i of cell c
-
-  CGAL_triangulation_precondition( c != Cell_handle() );
-  CGAL_triangulation_precondition( dimension() >= 2 );
-
-  Vertex_handle v = create_vertex();
-
-  switch ( dimension() ) {
-
-  case 3:
-    {
-      CGAL_triangulation_expensive_precondition( is_cell(c) );
-      CGAL_triangulation_precondition( i == 0 || i == 1 ||
-                                       i == 2 || i == 3 );
-      // c will be modified to have v replacing vertex(i+3)
-      int i1,i2,i3;
-
-      if ( (i&1) == 0 ) {
-        i1=(i+1)&3; i2=(i+2)&3; i3=6-i-i1-i2;
-      }
-      else {
-        i1=(i+1)&3; i2=(i+3)&3; i3=6-i-i1-i2;
-      }
-      // i,i1,i2,i3 is well oriented
-      // so v will "replace" the vertices in this order
-      // when creating the new cells one after another from c
-
-      Vertex_handle vi=c->vertex(i);
-      Vertex_handle v1=c->vertex(i1);
-      Vertex_handle v2=c->vertex(i2);
-      Vertex_handle v3=c->vertex(i3);
-
-      // new cell with v in place of i1
-      Cell_handle nc = c->neighbor(i1);
-      Cell_handle cnew1 = create_cell(vi,v,v2,v3);
-      set_adjacency(cnew1, 1, nc, nc->index(c));
-      set_adjacency(cnew1, 3, c, i1);
-
-      v3->set_cell(cnew1);
-
-      // new cell with v in place of i2
-      nc = c->neighbor(i2);
-      Cell_handle cnew2 = create_cell(vi,v1,v,v3);
-      set_adjacency(cnew2, 2, nc, nc->index(c));
-      set_adjacency(cnew2, 3, c, i2);
-      set_adjacency(cnew1, 2, cnew2, 1);
-
-      // v replaces i3 in c
-      c->set_vertex(i3,v);
-
-      // other side of facet containing v
-      Cell_handle d = c->neighbor(i);
-      int j = d->index(c);
-      int j1=d->index(v1);// triangulation supposed to be valid
-      int j2=d->index(v2);
-      int j3=6-j-j1-j2;
-      // then the orientation of j,j1,j2,j3 depends on the parity
-      // of i-j
-
-      // new cell with v in place of j1
-      Cell_handle nd = d->neighbor(j1);
-      Cell_handle dnew1 = create_cell(d->vertex(j),v,v3,v2);
-      set_adjacency(dnew1, 1, nd, nd->index(d));
-      set_adjacency(dnew1, 2, d, j1);
-      set_adjacency(dnew1, 0, cnew1, 0);
-
-      // new cell with v in place of j2
-      nd = d->neighbor(j2);
-      Cell_handle dnew2 = create_cell(d->vertex(j),v1,v3,v);
-
-      set_adjacency(dnew2, 3, nd, nd->index(d));
-      set_adjacency(dnew2, 2, d, j2);
-      set_adjacency(dnew2, 0, cnew2, 0);
-      set_adjacency(dnew1, 3, dnew2, 1);
-
-      // v replaces i3 in d
-      d->set_vertex(j3,v);
-      v->set_cell(d);
-
-      break;
-    }
-  case 2:
-    {
-      CGAL_triangulation_expensive_precondition( is_facet(c,i) );
-      Cell_handle n = c->neighbor(2);
-      Cell_handle cnew = create_face(c->vertex(0),c->vertex(1),v);
-      set_adjacency(cnew, 2, n, n->index(c));
-      set_adjacency(cnew, 0, c, 2);
-      c->vertex(0)->set_cell(cnew);
-
-      n = c->neighbor(1);
-      Cell_handle dnew = create_face(c->vertex(0),v,c->vertex(2));
-      set_adjacency(dnew, 1, n, n->index(c));
-      set_adjacency(dnew, 0, c, 1);
-      set_adjacency(dnew, 2, cnew, 1);
-
-      c->set_vertex(0,v);
-      v->set_cell(c);
-      break;
-    }
-  }
-
-  return v;
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-insert_in_edge(Cell_handle c, int i, int j)
-  // inserts a vertex in the edge of cell c with vertices i and j
-{
-  CGAL_triangulation_precondition( c != Cell_handle() );
-  CGAL_triangulation_precondition( i != j );
-  CGAL_triangulation_precondition( dimension() >= 1 );
-
-  switch ( dimension() ) {
-  case 3:
-    {
-      CGAL_triangulation_expensive_precondition( is_cell(c) );
-      CGAL_triangulation_precondition( i>=0 && i<=3 && j>=0 && j<=3 );
-
-      std::vector<Cell_handle > cells;
-      cells.reserve(32);
-      Cell_circulator ccir = incident_cells(c, i, j);
-      do {
-          Cell_handle cc = ccir;
-          cells.push_back(cc);
-          cc->tds_data().mark_in_conflict();
-          ++ccir;
-      } while (c != ccir);
-
-      return _insert_in_hole(cells.begin(), cells.end(), c, i);
-    }
-  case 2:
-    {
-      CGAL_triangulation_expensive_precondition( is_edge(c,i,j) );
-
-      Vertex_handle v = create_vertex();
-      int k=3-i-j; // index of the third vertex of the facet
-      Cell_handle d = c->neighbor(k);
-      int kd = d->index(c);
-      int id = d->index(c->vertex(i));
-      int jd = d->index(c->vertex(j));
-
-      Cell_handle cnew = create_cell();
-      cnew->set_vertex(i,c->vertex(i));
-      c->vertex(i)->set_cell(cnew);
-      cnew->set_vertex(j,v);
-      cnew->set_vertex(k,c->vertex(k));
-      c->set_vertex(i,v);
-
-      Cell_handle dnew = create_cell();
-      dnew->set_vertex(id,d->vertex(id));
-      // d->vertex(id)->cell() is cnew OK
-      dnew->set_vertex(jd,v);
-      dnew->set_vertex(kd,d->vertex(kd));
-      d->set_vertex(id,v);
-
-      Cell_handle nj = c->neighbor(j);
-      set_adjacency(cnew, i, c, j);
-      set_adjacency(cnew, j, nj, nj->index(c));
-
-      nj = d->neighbor(jd);
-      set_adjacency(dnew, id, d, jd);
-      set_adjacency(dnew, jd, nj, nj->index(d));
-
-      set_adjacency(cnew, k, dnew, kd);
-
-      v->set_cell(cnew);
-      return v;
-    }
-  default: // case 1:
-    {
-      Vertex_handle v = create_vertex();
-      CGAL_triangulation_expensive_precondition( is_edge(c,i,j) );
-      Cell_handle cnew = create_face(v, c->vertex(1), Vertex_handle());
-      c->vertex(1)->set_cell(cnew);
-      c->set_vertex(1,v);
-      set_adjacency(cnew, 0, c->neighbor(0), 1);
-      set_adjacency(cnew, 1, c, 0);
-
-      v->set_cell(cnew);
-      return v;
-    }
-  }
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-insert_increase_dimension(Vertex_handle star)
-  // star = vertex from which we triangulate the facet of the
-  // incremented dimension
-  // ( geometrically : star = infinite vertex )
-  // = NULL only used to insert the 1st vertex (dimension -2 to dimension -1)
-  // changes the dimension
-{
-  CGAL_triangulation_precondition( dimension() < 3);
-
-  Vertex_handle v = create_vertex();
-
-  int dim = dimension();
-  if (dim != -2) {
-      CGAL_triangulation_precondition( star != Vertex_handle() );
-      // In this case, this precondition is not relatively expensive.
-      CGAL_triangulation_precondition( is_vertex(star) );
-  }
-
-  // this is set now, so that it becomes allowed to reorient
-  // new facets or cells by iterating on them (otherwise the
-  // dimension is too small)
-  set_dimension( dimension()+1 );
-
-  switch ( dim ) {
-  case -2:
-      // insertion of the first vertex
-      // ( geometrically : infinite vertex )
-    {
-      Cell_handle c = create_face(v, Vertex_handle(), Vertex_handle());
-      v->set_cell(c);
-      break;
-    }
-
-  case -1:
-    // insertion of the second vertex
-    // ( geometrically : first finite vertex )
-    {
-      Cell_handle d = create_face(v, Vertex_handle(), Vertex_handle());
-      v->set_cell(d);
-      set_adjacency(d, 0, star->cell(), 0);
-      break;
-    }
-
-  case 0:
-    // insertion of the third vertex
-    // ( geometrically : second finite vertex )
-    {
-      Cell_handle c = star->cell();
-      Cell_handle d = c->neighbor(0);
-
-      c->set_vertex(1,d->vertex(0));
-      d->set_vertex(1,v);
-      d->set_neighbor(1,c);
-      Cell_handle e = create_face( v, star, Vertex_handle() );
-      set_adjacency(e, 0, c, 1);
-      set_adjacency(e, 1, d, 0);
-
-      v->set_cell(d);
-      break;
-    }
-
-  case 1:
-    // general case : 4th vertex ( geometrically : 3rd finite vertex )
-    // degenerate cases geometrically : 1st non collinear vertex
-    {
-      Cell_handle c = star->cell();
-      int i = c->index(star); // i== 0 or 1
-      CGAL_assertion(i==0 || i==1);
-      int j = (i == 0) ? 1 : 0;
-      Cell_handle d = c->neighbor(j);
-        
-      c->set_vertex(2,v);
-
-      Cell_handle e = c->neighbor(i);
-      Cell_handle cnew = c;
-      Cell_handle enew = Cell_handle();
-        
-      while( e != d ){
-        enew = create_cell();
-        enew->set_vertex(i,e->vertex(j));
-        enew->set_vertex(j,e->vertex(i));
-        enew->set_vertex(2,star);
-        
-        set_adjacency(enew, i, cnew, j);
-        // false at the first iteration of the loop where it should
-        // be neighbor 2
-        // it is corrected after the loop
-        set_adjacency(enew, 2, e, 2);
-        // neighbor j will be set during next iteration of the loop
-        
-        e->set_vertex(2,v);
-
-        e = e->neighbor(i);
-        cnew = enew;
-      }
-        
-      d->set_vertex(2,v);
-      set_adjacency(enew, j, d, 2);
-
-      // corrections for star->cell() :
-      c = star->cell();
-      c->set_neighbor(2,c->neighbor(i)->neighbor(2));
-      c->set_neighbor(j,d);
-
-      v->set_cell(d);
-
-      break;
-    }
-
-  case 2:
-    // general case : 5th vertex ( geometrically : 4th finite vertex )
-    // degenerate cases : geometrically 1st non coplanar vertex
-    {
-      // used to store the new cells, in order to be able to traverse only
-      // them to find the missing neighbors.
-      std::vector<Cell_handle > new_cells;
-      new_cells.reserve(16);
-
-      Cell_iterator it = cells_begin();
-      // allowed since the dimension has already been set to 3
-
-      v->set_cell(it); // ok since there is at least one ``cell''
-      for(; it != cells_end(); ++it) {
-        // Here we must be careful since we create_cells in a loop controlled
-        // by an iterator.  So we first take care of the cells newly created
-        // by the following test :
-        if (it->neighbor(0) == Cell_handle())
-          continue;
-        it->set_neighbor(3, Cell_handle());
-        it->set_vertex(3, v);
-        if ( ! it->has_vertex(star) ) {
-          Cell_handle cnew = create_cell( it->vertex(0), it->vertex(2),
-                                          it->vertex(1), star);
-          // The Intel compiler has a problem with passing "it" directly to
-          // function "set_adjacency": the adjacency is not changed.
-          Cell_handle ch_it = it;
-          set_adjacency(cnew, 3, ch_it, 3);
-          cnew->set_neighbor(0, Cell_handle());
-          new_cells.push_back(cnew);
-        }
-      }
-
-      // traversal of the new cells only, to add missing neighbors
-      for(typename std::vector<Cell_handle>::iterator ncit = new_cells.begin();
-           ncit != new_cells.end(); ++ncit) {
-        Cell_handle n = (*ncit)->neighbor(3); // opposite to star
-        for ( int i=0; i<3; i++ ) {
-          int j;
-          if ( i==0 ) j=0;
-          else j=3-i; // vertex 1 and vertex 2 are always switched when
-          // creating a new cell (see above)
-          Cell_handle c = n->neighbor(i)->neighbor(3);
-          if ( c != Cell_handle() ) {
-            // i.e. star is not a vertex of n->neighbor(i)
-            (*ncit)->set_neighbor(j, c);
-            // opposite relation will be set when ncit arrives on c
-            // this avoids to look for the correct index
-            // and to test whether *ncit already has neighbor i
-          }
-          else {
-            // star is a vertex of n->neighbor(i)
-            set_adjacency(*ncit, j, n->neighbor(i), 3);//neighbor opposite to v
-          }
-        }
-      }
-    }
-  }// end switch
-
-  return v;
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-remove_decrease_dimension(Vertex_handle v, Vertex_handle w)
-{
-    CGAL_triangulation_expensive_precondition( is_valid() );
-    CGAL_triangulation_precondition( dimension() >= -1 );
-    CGAL_triangulation_precondition( dimension() != 1 ||
-                                     number_of_vertices() == 3);
-    CGAL_triangulation_precondition( number_of_vertices() >
-                                     (size_type) dimension() + 1 );
-    CGAL_triangulation_precondition( degree(v) == number_of_vertices()-1 );
-
-    if (dimension() <= 0) {
-        delete_cell(v->cell());
-    }
-    else {
-        // the cells incident to w are down graded one dimension
-        // the other cells are deleted
-        std::vector<Cell_handle> to_delete, to_downgrade;
-
-        for (Cell_iterator ib = cells().begin();
-            ib != cells().end(); ++ib) {
-            if ( ib->has_vertex(w) )
-                to_downgrade.push_back(ib);
-            else
-                to_delete.push_back(ib);
-        }
-
-        typename std::vector<Cell_handle>::iterator lfit=to_downgrade.begin();
-        for( ; lfit != to_downgrade.end(); ++lfit) {
-            Cell_handle f = *lfit;
-            int j = f->index(w);
-            int k; if (f->has_vertex(v, k)) f->set_vertex(k, w);
-            if (j != dimension()) {
-                f->set_vertex(j, f->vertex(dimension()));
-                f->set_neighbor(j, f->neighbor(dimension()));
-                if (dimension() >= 1)
-                    change_orientation(f);
-            }
-            f->set_vertex(dimension(), Vertex_handle());
-            f->set_neighbor(dimension(), Cell_handle());
-
-            // Update vertex->cell() pointers.
-            for (int i = 0; i < dimension(); ++i)
-                f->vertex(i)->set_cell(f);
-        }
-
-        delete_cells(to_delete.begin(), to_delete.end());
-    }
-    delete_vertex(v);
-    set_dimension(dimension()-1);
-    CGAL_triangulation_postcondition(is_valid());
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-remove_from_maximal_dimension_simplex(Vertex_handle v)
-{
-    CGAL_triangulation_precondition(dimension() >= 1);
-    CGAL_triangulation_precondition(degree(v) == (size_type) dimension() + 1);
-    CGAL_triangulation_precondition(number_of_vertices() >
-                                    (size_type) dimension() + 1);
-
-    if (number_of_vertices() == (size_type) dimension() + 2) {
-        remove_decrease_dimension(v);
-        return Cell_handle();
-    }
-
-    if (dimension() == 3)
-        return remove_degree_4(v);
-    if (dimension() == 2)
-        return remove_degree_3(v);
-
-    // dimension() == 1
-    return remove_degree_2(v);
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-remove_degree_2(Vertex_handle v)
-{
-    CGAL_triangulation_precondition(dimension() == 1);
-    CGAL_triangulation_precondition(degree(v) == 2);
-    CGAL_triangulation_precondition(number_of_vertices() >= 4);
-
-    // Cells to be killed.
-    Cell_handle c0, c1;
-    // Indices of v in these cells.
-    int i0, i1;
-
-    c0 = v->cell();
-    i0 = c0->index(v);
-    c1 = c0->neighbor((i0 == 0) ? 1 : 0);
-    i1 = c1->index(v);
-
-    // New cell : we copy the content of c0, so we keep the orientation.
-    Cell_handle newc = create_face(c0->vertex(0),
-                                   c0->vertex(1),
-                                   Vertex_handle());
-
-    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
-
-    set_adjacency(newc,    i0, c0->neighbor(i0), mirror_index(c0, i0));
-    set_adjacency(newc,  1-i0, c1->neighbor(i1), mirror_index(c1, i1));
-
-    newc->vertex(0)->set_cell(newc);
-    newc->vertex(1)->set_cell(newc);
-
-    delete_cell(c0);
-    delete_cell(c1);
-    delete_vertex(v);
-
-    return newc;
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-remove_degree_3(Vertex_handle v)
-{
-    CGAL_triangulation_precondition(dimension() == 2);
-    CGAL_triangulation_precondition(degree(v) == 3);
-    CGAL_triangulation_precondition(number_of_vertices() >= 5);
-
-    // Cells to be killed.
-    Cell_handle c0, c1, c2;
-    // Indices of v in these cells.
-    int i0, i1, i2;
-
-    c0 = v->cell();
-    i0 = c0->index(v);
-    c1 = c0->neighbor(cw(i0));
-    i1 = c1->index(v);
-    c2 = c0->neighbor(ccw(i0));
-    i2 = c2->index(v);
-
-    // New cell : we copy the content of c0, so we keep the orientation.
-    Cell_handle newc = create_face(c0->vertex(0),
-                                   c0->vertex(1),
-                                   c0->vertex(2));
-
-    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
-
-    set_adjacency(newc,      i0, c0->neighbor(i0), mirror_index(c0, i0));
-    set_adjacency(newc,  cw(i0), c1->neighbor(i1), mirror_index(c1, i1));
-    set_adjacency(newc, ccw(i0), c2->neighbor(i2), mirror_index(c2, i2));
-
-    newc->vertex(0)->set_cell(newc);
-    newc->vertex(1)->set_cell(newc);
-    newc->vertex(2)->set_cell(newc);
-
-    delete_cell(c0);
-    delete_cell(c1);
-    delete_cell(c2);
-    delete_vertex(v);
-
-    return newc;
-}
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-remove_degree_4(Vertex_handle v)
-{
-    CGAL_triangulation_precondition(dimension() == 3);
-    CGAL_triangulation_precondition(degree(v) == 4);
-    CGAL_triangulation_precondition(number_of_vertices() >= 6);
-
-    // Cells to be killed.
-    Cell_handle c0, c1, c2, c3;
-    // Indices of v in these cells.
-    int i0, i1, i2, i3;
-
-    c0 = v->cell();
-    i0 = c0->index(v);
-    c1 = c0->neighbor(i0^1);
-    i1 = c1->index(v);
-    c2 = c0->neighbor(i0^2);
-    i2 = c2->index(v);
-    c3 = c0->neighbor(i0^3);
-    i3 = c3->index(v);
-
-    // New cell : we copy the content of c0, so we keep the orientation.
-    Cell_handle newc = create_cell(c0->vertex(0),
-                                   c0->vertex(1),
-                                   c0->vertex(2),
-                                   c0->vertex(3));
-
-    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
-
-    set_adjacency(newc,   i0, c0->neighbor(i0), mirror_index(c0, i0));
-    set_adjacency(newc, i0^1, c1->neighbor(i1), mirror_index(c1, i1));
-    set_adjacency(newc, i0^2, c2->neighbor(i2), mirror_index(c2, i2));
-    set_adjacency(newc, i0^3, c3->neighbor(i3), mirror_index(c3, i3));
-
-    newc->vertex(0)->set_cell(newc);
-    newc->vertex(1)->set_cell(newc);
-    newc->vertex(2)->set_cell(newc);
-    newc->vertex(3)->set_cell(newc);
-
-    delete_cell(c0);
-    delete_cell(c1);
-    delete_cell(c2);
-    delete_cell(c3);
-    delete_vertex(v);
-
-    return newc;
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-decrease_dimension(Cell_handle c, int i)
-{
-  CGAL_triangulation_expensive_precondition( is_valid() );;
-  CGAL_triangulation_precondition( dimension() >= 2);
-  CGAL_triangulation_precondition( number_of_vertices() >
-                                   (size_type) dimension() + 1 );
-  CGAL_triangulation_precondition( degree(c->vertex(i)) == number_of_vertices()-1 );
-
-  Vertex_handle v = c->vertex(i);
-  Vertex_handle w = c->vertex(i);
-
-  // the cells incident to w are down graded one dimension
-  // the other cells are deleted
-  std::vector<Cell_handle> to_delete, to_downgrade;
-
-  for (Cell_iterator ib = cells().begin();
-       ib != cells().end(); ++ib) {
-    if ( ib->has_vertex(w) )
-      to_downgrade.push_back(ib);
-    else
-      to_delete.push_back(ib);
-  }
-
-  typename std::vector<Cell_handle>::iterator lfit=to_downgrade.begin();
-  for( ; lfit != to_downgrade.end(); ++lfit) {
-    Cell_handle f = *lfit;
-    int j = f->index(w);
-    int k; 
-    if (f->has_vertex(v, k)) f->set_vertex(k, w);
-    if (j != dimension()) {
-      f->set_vertex(j, f->vertex(dimension()));
-      f->set_neighbor(j, f->neighbor(dimension()));
-      if (dimension() >= 1)
-        change_orientation(f);
-    }
-    f->set_vertex(dimension(), Vertex_handle());
-    f->set_neighbor(dimension(), Cell_handle());
-
-    // Update vertex->cell() pointers.
-    for (int i = 0; i < dimension(); ++i)
-      f->vertex(i)->set_cell(f);
-  }
-
-  delete_cells(to_delete.begin(), to_delete.end());
-
-  //delete_vertex(v);
-  set_dimension(dimension()-1);
-
-  if(dimension() == 2)
-  {
-    Cell_handle n0 = c->neighbor(0);
-    Cell_handle n1 = c->neighbor(1);
-    Cell_handle n2 = c->neighbor(2);
-    Vertex_handle v0 = c->vertex(0);
-    Vertex_handle v1 = c->vertex(1);
-    Vertex_handle v2 = c->vertex(2);
-                
-    int i0 = 0, i1 = 0, i2 = 0;
-                
-    for(int i=0; i<3; i++) if(n0->neighbor(i) == c) { i0 = i; break; }
-    for(int i=0; i<3; i++) if(n1->neighbor(i) == c) { i1 = i; break; }
-    for(int i=0; i<3; i++) if(n2->neighbor(i) == c) { i2 = i; break; }
-                
-    Cell_handle c1 = create_cell(v, v0, v1, Vertex_handle());
-    Cell_handle c2 = create_cell(v, v1, v2, Vertex_handle());
-
-    c->set_vertex(0, v);
-    c->set_vertex(1, v2);
-    c->set_vertex(2, v0);
-    c->set_vertex(3, Vertex_handle());
-
-    //Cell_handle c3 = create_cell(v, v2, v0, Vertex_handle());
-    Cell_handle c3 = c;
-                
-    c1->set_neighbor(0, n2); n2->set_neighbor(i2, c1);
-    c1->set_neighbor(1, c2); 
-    c1->set_neighbor(2, c3);
-    c1->set_neighbor(3, Cell_handle());
-                
-    c2->set_neighbor(0, n0); n0->set_neighbor(i0, c2);
-    c2->set_neighbor(1, c3); 
-    c2->set_neighbor(2, c1);
-    c2->set_neighbor(3, Cell_handle());
-                
-    c3->set_neighbor(0, n1); n1->set_neighbor(i1, c3);
-    c3->set_neighbor(1, c1); 
-    c3->set_neighbor(2, c2);
-    c3->set_neighbor(3, Cell_handle());
-                
-    v->set_cell(c1);
-    v0->set_cell(c1);
-    v1->set_cell(c1);
-    v2->set_cell(c2);
-  }
-        
-  if(dimension() == 1)
-  {
-    Cell_handle n0 = c->neighbor(0);
-    Cell_handle n1 = c->neighbor(1);
-    Vertex_handle v0 = c->vertex(0);
-    Vertex_handle v1 = c->vertex(1);
-                
-    int i0 = 0 , i1 = 0;
-                
-    for(int i=0; i<2; i++) if(n0->neighbor(i) == c) { i0 = i; break; }
-    for(int i=0; i<2; i++) if(n1->neighbor(i) == c) { i1 = i; break; }
-                
-    Cell_handle c1 = create_cell(v0, v, Vertex_handle(), Vertex_handle());
-                
-    c->set_vertex(0, v);
-    c->set_vertex(1, v1);
-    c->set_vertex(2, Vertex_handle());
-    c->set_vertex(3, Vertex_handle());
-
-    //Cell_handle c2 = create_cell(v, v1, Vertex_handle(), Vertex_handle());
-    Cell_handle c2 = c;
-                
-    c1->set_neighbor(0, c2); 
-    c1->set_neighbor(1, n1); n1->set_neighbor(i1, c1);
-    c1->set_neighbor(2, Cell_handle());
-    c1->set_neighbor(3, Cell_handle());
-                
-    c2->set_neighbor(0, n0); n0->set_neighbor(i0, c2);
-    c2->set_neighbor(1, c1); 
-    c2->set_neighbor(2, Cell_handle());
-    c2->set_neighbor(3, Cell_handle());
-                
-    v->set_cell(c1);
-    v0->set_cell(c1);
-    v1->set_cell(c2);
-  }
-        
-  CGAL_triangulation_postcondition(is_valid());
-}
-
-
-template <class Vb, class Cb, class Ct>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::size_type
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-degree(Vertex_handle v) const
-{
-    std::size_t res;
-    adjacent_vertices(v, Counting_output_iterator(&res));
-    return res;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_valid(bool verbose, int level ) const
-{
-  switch ( dimension() ) {
-  case 3:
-    {
-        
-      if(number_of_vertices() <= 4) {
-        if (verbose)
-          std::cerr << "wrong number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-        
-      size_type vertex_count;
-      if ( ! count_vertices(vertex_count,verbose,level) )
-        return false;
-      if ( number_of_vertices() != vertex_count ) {
-        if (verbose)
-          std::cerr << "wrong number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      size_type cell_count;
-      if ( ! count_cells(cell_count,verbose,level) )
-        return false;
-      size_type edge_count;
-      if ( ! count_edges(edge_count,verbose,level) )
-          return false;
-      size_type facet_count;
-      if ( ! count_facets(facet_count,verbose,level) )
-          return false;
-
-      // Euler relation
-      if ( cell_count - facet_count + edge_count - vertex_count != 0 ) {
-        if (verbose)
-            std::cerr << "Euler relation unsatisfied" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      break;
-    }
-  case 2:
-    {
-        
-      if(number_of_vertices() <= 3) {
-        if (verbose)
-          std::cerr << "wrong number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-        
-      size_type vertex_count;
-      
-      if ( ! count_vertices(vertex_count,verbose,level) )
-        return false;
-      if ( number_of_vertices() != vertex_count ) {
-        if (verbose)
-            std::cerr << "false number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      size_type edge_count;
-      if ( ! count_edges(edge_count,verbose,level) )
-          return false;
-      // Euler for edges
-      if ( edge_count != 3 * vertex_count - 6 ) {
-        if (verbose)
-            std::cerr << "Euler relation unsatisfied - edges/vertices"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      size_type facet_count;
-      if ( ! count_facets(facet_count,verbose,level) )
-          return false;
-      // Euler for facets
-      if ( facet_count != 2 * vertex_count - 4 ) {
-        if (verbose)
-            std::cerr << "Euler relation unsatisfied - facets/vertices"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      break;
-    }
-  case 1:
-    {
-        
-      if(number_of_vertices() <= 1) {
-        if (verbose)
-          std::cerr << "wrong number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-        
-      size_type vertex_count;
-      if ( ! count_vertices(vertex_count,verbose,level) )
-          return false;
-      if ( number_of_vertices() != vertex_count ) {
-        if (verbose)
-            std::cerr << "false number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      size_type edge_count;
-      if ( ! count_edges(edge_count,verbose,level) )
-          return false;
-      // Euler for edges
-      if ( edge_count != vertex_count ) {
-        if (verbose)
-            std::cerr << "false number of edges" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      break;
-    }
-  case 0:
-    {
-      if ( number_of_vertices() < 2 ) {
-        if (verbose)
-            std::cerr << "less than 2 vertices but dimension 0" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      // no break; continue
-    }
-  case -1:
-    {
-      if ( number_of_vertices() < 1 ) {
-        if (verbose)
-          std::cerr << "no vertex but dimension -1" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      // vertex count
-      size_type vertex_count;
-      if ( ! count_vertices(vertex_count,verbose,level) )
-        return false;
-      if ( number_of_vertices() != vertex_count ) {
-        if (verbose)
-          std::cerr << "false number of vertices" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-    }
-  } // end switch
-  if (verbose)
-      std::cerr << "valid data structure" << std::endl;
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_valid(Vertex_handle v, bool verbose, int level) const
-{
-  bool result = v->is_valid(verbose,level);
-  result = result && v->cell()->has_vertex(v);
-  if ( ! result ) {
-    if ( verbose )
-      std::cerr << "invalid vertex" << std::endl;
-    CGAL_triangulation_assertion(false);
-  }
-  return result;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-is_valid(Cell_handle c, bool verbose, int level) const
-{
-    if ( ! c->is_valid(verbose, level) )
-        return false;
-
-    switch (dimension()) {
-    case -2:
-    case -1:
-    {
-      if ( c->vertex(0) == Vertex_handle() ) {
-        if (verbose)
-            std::cerr << "vertex 0 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      is_valid(c->vertex(0),verbose,level);
-      if ( c->vertex(1) != Vertex_handle() || c->vertex(2) != Vertex_handle()) {
-        if (verbose)
-            std::cerr << "vertex 1 or 2 != NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      if ( c->neighbor(0) != Cell_handle() ||
-           c->neighbor(1) != Cell_handle() ||
-           c->neighbor(2) != Cell_handle()) {
-        if (verbose)
-            std::cerr << "one neighbor != NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      break;
-    }
-
-    case 0:
-      {
-      if ( c->vertex(0) == Vertex_handle() ) {
-        if (verbose)
-            std::cerr << "vertex 0 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      is_valid(c->vertex(0),verbose,level);
-      if ( c->neighbor (0) == Cell_handle() ) {
-        if (verbose)
-            std::cerr << "neighbor 0 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      if ( c->vertex(1) != Vertex_handle() ||
-           c->vertex(2) != Vertex_handle() ) {
-        if (verbose)
-            std::cerr << "vertex 1 or 2 != NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      if ( c->neighbor(1) != Cell_handle() ||
-           c->neighbor(2) != Cell_handle() ) {
-        if (verbose)
-            std::cerr << "neighbor 1 or 2 != NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      if ( ! c->neighbor(0)->has_vertex(c->vertex(0)) ) {
-        if (verbose)
-            std::cerr << "neighbor 0 does not have vertex 0" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      break;
-      }
-
-    case 1:
-      {
-      Vertex_handle v0 = c->vertex(0);
-      Vertex_handle v1 = c->vertex(1);
-      Cell_handle n0 = c->neighbor(0);
-      Cell_handle n1 = c->neighbor(1);
-
-      if ( v0 == Vertex_handle() || v1 == Vertex_handle() ) {
-        if (verbose)
-            std::cerr << "vertex 0 or 1 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      is_valid(c->vertex(0),verbose,level);
-      is_valid(c->vertex(1),verbose,level);
-      if ( n0 == Cell_handle() || n1 == Cell_handle() ) {
-        if (verbose)
-            std::cerr << "neighbor 0 or 1 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      if ( v0 !=  n1->vertex(1) ) {
-        if (verbose)
-            std::cerr << "neighbor 1 does not have vertex 0 as vertex 1"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      if ( v1 != n0->vertex(0) ) {
-        if (verbose)
-            std::cerr << "neighbor 0 does not have vertex 1 as vertex 0"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      if ( n0->neighbor(1) != c ) {
-        if (verbose)
-            std::cerr << "neighbor 0 does not have this as neighbor 1"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      if ( n1->neighbor(0) != c ) {
-        if (verbose)
-            std::cerr << "neighbor 1 does not have this as neighbor 0"
-                      << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-
-      break;
-      }
-
-    case 2:
-      {
-      if ( c->vertex(0) == Vertex_handle() ||
-           c->vertex(1) == Vertex_handle() ||
-           c->vertex(2) == Vertex_handle() ) {
-        if (verbose)
-            std::cerr << "vertex 0, 1, or 2 NULL" << std::endl;
-        CGAL_triangulation_assertion(false);
-        return false;
-      }
-      is_valid(c->vertex(0),verbose,level);
-      is_valid(c->vertex(1),verbose,level);
-      is_valid(c->vertex(2),verbose,level);
-      int in;
-      Cell_handle n;
-      for(int i = 0; i < 3; i++) {
-        n = c->neighbor(i);
-        if ( n == Cell_handle() ) {
-          if (verbose)
-              std::cerr << "neighbor " << i << " NULL" << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-        if ( ! n->has_vertex(c->vertex(cw(i)),in ) ) {
-          if (verbose)
-              std::cerr << "vertex " << cw(i)
-                        << " not vertex of neighbor " << i << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-        in = cw(in);
-        if ( n->neighbor(in) != c ) {
-          if (verbose)
-              std::cerr << "neighbor " << i
-                        << " does not have this as neighbor "
-                        << in << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-        if ( c->vertex(ccw(i)) != n->vertex(cw(in)) ) {
-          if (verbose)
-              std::cerr << "vertex " << ccw(i)
-                        << " is not vertex " << cw(in)
-                        << " of neighbor " << i << std::endl;
-          CGAL_triangulation_assertion(false);
-          return false;
-        }
-      }
-      break;
-      }
-
-    case 3:
-      {
-        int i;
-        for(i = 0; i < 4; i++) {
-          if ( c->vertex(i) == Vertex_handle() ) {
-            if (verbose)
-                std::cerr << "vertex " << i << " NULL" << std::endl;
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-          is_valid(c->vertex(i),verbose,level);
-        }
-
-        for(i = 0; i < 4; i++) {
-          Cell_handle n = c->neighbor(i);
-          if ( n == Cell_handle() ) {
-            if (verbose)
-              std::cerr << "neighbor " << i << " NULL" << std::endl;
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-
-          int in = 5;
-          // if ( ! n->has_neighbor(handle(), in) ) {
-          if ( n->neighbor(0) == c) in = 0;
-          if ( n->neighbor(1) == c) in = 1;
-          if ( n->neighbor(2) == c) in = 2;
-          if ( n->neighbor(3) == c) in = 3;
-          if (in == 5) {
-            if (verbose)
-              std::cerr << "neighbor of c has not c as neighbor" << std::endl;
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-        
-          int j1n,j2n,j3n;
-          if ( ! n->has_vertex(c->vertex((i+1)&3),j1n) ) {
-            if (verbose) { std::cerr << "vertex " << ((i+1)&3)
-                                     << " not vertex of neighbor "
-                                     << i << std::endl; }
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-          if ( ! n->has_vertex(c->vertex((i+2)&3),j2n) ) {
-            if (verbose) { std::cerr << "vertex " << ((i+2)&3)
-                                     << " not vertex of neighbor "
-                                     << i << std::endl; }
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-          if ( ! n->has_vertex(c->vertex((i+3)&3),j3n) ) {
-            if (verbose) { std::cerr << "vertex " << ((i+3)&3)
-                                     << " not vertex of neighbor "
-                                     << i << std::endl; }
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-        
-          if ( in+j1n+j2n+j3n != 6) {
-            if (verbose) { std::cerr << "sum of the indices != 6 "
-                                     << std::endl; }
-            CGAL_triangulation_assertion(false);
-            return false;
-          }
-        
-          // tests whether the orientations of this and n are consistent
-          if ( ((i+in)&1) == 0 ) { // i and in have the same parity
-            if ( j1n == ((in+1)&3) ) {
-              if ( ( j2n != ((in+3)&3) ) || ( j3n != ((in+2)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-            if ( j1n == ((in+2)&3) ) {
-              if ( ( j2n != ((in+1)&3) ) || ( j3n != ((in+3)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-            if ( j1n == ((in+3)&3) ) {
-              if ( ( j2n != ((in+2)&3) ) || ( j3n != ((in+1)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-          }
-          else { // i and in do not have the same parity
-            if ( j1n == ((in+1)&3) ) {
-              if ( ( j2n != ((in+2)&3) ) || ( j3n != ((in+3)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-            if ( j1n == ((in+2)&3) ) {
-              if ( ( j2n != ((in+3)&3) ) || ( j3n != ((in+1)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-            if ( j1n == ((in+3)&3) ) {
-              if ( ( j2n != ((in+1)&3) ) || ( j3n != ((in+2)&3) ) ) {
-                if (verbose)
-                  std::cerr << " pb orientation with neighbor "
-                            << i << std::endl;
-                CGAL_triangulation_assertion(false);
-                return false;
-              }
-            }
-          }
-        } // end looking at neighbors
-      }// end case dim 3
-    } // end switch
-    return true;
-}
-
-template <class Vb, class Cb, class Ct>
-template <class TDS_src,class ConvertVertex,class ConvertCell>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-copy_tds(const TDS_src& tds,
-        typename TDS_src::Vertex_handle vert,
-        const ConvertVertex& convert_vertex,
-        const ConvertCell& convert_cell)
-{
-  CGAL_triangulation_expensive_precondition( vert == Vertex_handle()
-                                          || tds.is_vertex(vert) );
-
-  clear();
-
-  size_type n = tds.number_of_vertices();
-  set_dimension(tds.dimension());
-
-  if (n == 0)  return Vertex_handle(); 
-
-  // Number of pointers to cell/vertex to copy per cell.
-  int dim = (std::max)(1, dimension() + 1);
-
-  // Create the vertices.
-  std::vector<typename TDS_src::Vertex_handle> TV(n);
-  size_type i = 0;
-
-  for (typename TDS_src::Vertex_iterator vit = tds.vertices_begin();
-       vit != tds.vertices_end(); ++vit)
-    TV[i++] = vit;
-
-  CGAL_triangulation_assertion( i == n );
-
-  Unique_hash_map< typename TDS_src::Vertex_handle,Vertex_handle > V;
-  Unique_hash_map< typename TDS_src::Cell_handle,Cell_handle > F;
-  
-  for (i=0; i <= n-1; ++i){
-    Vertex_handle vh=create_vertex( convert_vertex(*TV[i]) );
-    V[ TV[i] ] = vh;
-    convert_vertex(*TV[i],*vh);
-  }
-
-  // Create the cells.
-  for (typename TDS_src::Cell_iterator cit = tds.cells().begin();
-          cit != tds.cells_end(); ++cit) {
-      Cell_handle ch=create_cell(convert_cell(*cit));
-      F[cit]=ch;
-      for (int j = 0; j < dim; j++)
-        ch->set_vertex(j, V[cit->vertex(j)] );
-      convert_cell(*cit,*ch);
-  }
-
-  // Link the vertices to a cell.
-  for (typename TDS_src::Vertex_iterator vit2 = tds.vertices_begin();
-       vit2 != tds.vertices_end(); ++vit2)
-    V[vit2]->set_cell( F[vit2->cell()] );
-
-  // Hook neighbor pointers of the cells.
-  for (typename TDS_src::Cell_iterator cit2 = tds.cells().begin();
-          cit2 != tds.cells_end(); ++cit2) {
-    for (int j = 0; j < dim; j++)
-      F[cit2]->set_neighbor(j, F[cit2->neighbor(j)] );
-  }
-
-  CGAL_triangulation_postcondition( is_valid() );
-
-  return (vert != typename TDS_src::Vertex_handle()) ? V[vert] : Vertex_handle();
-}
-
-//utilities for copy_tds
-namespace internal { namespace TDS_3{
-  template <class Vertex_src,class Vertex_tgt>
-  struct Default_vertex_converter
-  {
-    Vertex_tgt operator()(const Vertex_src& src) const {
-      return Vertex_tgt(src.point());
-    }
-    
-    void operator()(const Vertex_src&,Vertex_tgt&) const {}
-  };
-
-  template <class Cell_src,class Cell_tgt>
-  struct Default_cell_converter
-  {
-    Cell_tgt operator()(const Cell_src&) const {
-      return Cell_tgt();
-    }
-    
-    void operator()(const Cell_src&,Cell_tgt&) const {}
-  };
-  
-  template <class Vertex>
-  struct Default_vertex_converter<Vertex,Vertex>
-  {
-    const Vertex& operator()(const Vertex& src) const {
-      return src;
-    }
-    
-    void operator()(const Vertex&,Vertex&) const {}
-  };
-  
-  template <class Cell>
-  struct Default_cell_converter<Cell,Cell>{
-    const Cell& operator()(const Cell& src) const {
-      return src;
-    } 
-    
-    void operator()(const Cell&,Cell&) const {}
-  };
-} } //namespace internal::TDS_3
-
-template <class Vb, class Cb, class Ct>
-template<class TDS_src>
-typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-copy_tds(const TDS_src& src,typename TDS_src::Vertex_handle vert)
-{
-  internal::TDS_3::Default_vertex_converter<typename TDS_src::Vertex,Vertex> setv;
-  internal::TDS_3::Default_cell_converter<typename TDS_src::Cell,Cell>  setc;
-  return copy_tds(src,vert,setv,setc);
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-swap(Tds & tds)
-{
-  CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid());
-
-  std::swap(_dimension, tds._dimension);
-  cells().swap(tds.cells());
-  vertices().swap(tds.vertices());
-}
-
-template <class Vb, class Cb, class Ct>
-void
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-clear()
-{
-  cells().clear();
-  vertices().clear();
-  set_dimension(-2);
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-count_vertices(size_type & i, bool verbose, int level) const
-  // counts AND checks the validity
-{
-  i = 0;
-
-  for (Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) {
-    if ( ! is_valid(it,verbose,level) ) {
-      if (verbose)
-          std::cerr << "invalid vertex" << std::endl;
-      CGAL_triangulation_assertion(false);
-      return false;
-    }
-    ++i;
-  }
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-count_facets(size_type & i, bool verbose, int level) const
-  // counts but does not check
-{
-  i = 0;
-
-  for (Facet_iterator it = facets_begin(); it != facets_end(); ++it) {
-    if ( ! is_valid((*it).first,verbose, level) ) {
-      if (verbose)
-          std::cerr << "invalid facet" << std::endl;
-      CGAL_triangulation_assertion(false);
-      return false;
-    }
-    ++i;
-  }
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-count_edges(size_type & i, bool verbose, int level) const
-  // counts but does not check
-{
-  i = 0;
-
-  for (Edge_iterator it = edges_begin(); it != edges_end(); ++it) {
-    if ( ! is_valid((*it).first,verbose, level) ) {
-      if (verbose)
-          std::cerr << "invalid edge" << std::endl;
-      CGAL_triangulation_assertion(false);
-      return false;
-    }
-    ++i;
-  }
-  return true;
-}
-
-template <class Vb, class Cb, class Ct>
-bool
-Triangulation_data_structure_3<Vb,Cb,Ct>::
-count_cells(size_type & i, bool verbose, int level) const
-  // counts AND checks the validity
-{
-  i = 0;
-
-  for (Cell_iterator it = cells_begin(); it != cells_end(); ++it) {
-    if ( ! is_valid(it,verbose, level) ) {
-      if (verbose)
-          std::cerr << "invalid cell" << std::endl;
-      CGAL_triangulation_assertion(false);
-      return false;
-    }
-    ++i;
-  }
-  return true;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_cell_base_3.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_cell_base_3.h
deleted file mode 100644
index cce0eaf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_cell_base_3.h
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright (c) 1999-2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
-//                 Sylvain Pion
-
-// cell of a triangulation data structure of any dimension <=3
-
-#ifndef CGAL_TRIANGULATION_DS_CELL_BASE_3_H
-#define CGAL_TRIANGULATION_DS_CELL_BASE_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/triangulation_assertions.h>
-#include <CGAL/internal/Dummy_tds_3.h>
-
-namespace CGAL {
-
-template < typename TDS = void >
-class Triangulation_ds_cell_base_3
-{
-public:
-  typedef TDS                           Triangulation_data_structure;
-  typedef typename TDS::Vertex_handle   Vertex_handle;
-  typedef typename TDS::Cell_handle     Cell_handle;
-  typedef typename TDS::Vertex          Vertex;
-  typedef typename TDS::Cell            Cell;
-  typedef typename TDS::Cell_data       TDS_data;
-
-  template <typename TDS2>
-  struct Rebind_TDS { typedef Triangulation_ds_cell_base_3<TDS2> Other; };
-
-  Triangulation_ds_cell_base_3() 
-  {
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-    mark = -1;
-    mark2 = -1;
-#endif
-  }
-
-  Triangulation_ds_cell_base_3(Vertex_handle v0, Vertex_handle v1,
-                               Vertex_handle v2, Vertex_handle v3)
-#ifndef CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
-    : V{v0, v1, v2, v3}
-  {
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-    mark = -1;
-    mark2 = -1;
-#endif
-  }
-#else
-  {
-    set_vertices(v0, v1, v2, v3);
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-    mark = -1;
-    mark2 = -1;
-#endif
-  }
-#endif
-
-  Triangulation_ds_cell_base_3(Vertex_handle v0, Vertex_handle v1,
-                               Vertex_handle v2, Vertex_handle v3,
-                               Cell_handle   n0, Cell_handle   n1,
-                               Cell_handle   n2, Cell_handle   n3)
-#ifndef CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
-    : N{n0, n1, n2, n3}, V{v0, v1, v2, v3} {}
-#else
-  {
-    set_neighbors(n0, n1, n2, n3);
-    set_vertices(v0, v1, v2, v3);
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-    mark = -1;
-    mark2 = -1;
-#endif
-  }
-#endif
-
-  // ACCESS FUNCTIONS
-
-  Vertex_handle vertex(int i) const
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3 );
-    return V[i];
-  }
-
-  bool has_vertex(Vertex_handle v) const
-  {
-    return (V[0] == v) || (V[1] == v) || (V[2]== v) || (V[3]== v);
-  }
-
-  bool has_vertex(Vertex_handle v, int & i) const
-    {
-      if (v == V[0]) { i = 0; return true; }
-      if (v == V[1]) { i = 1; return true; }
-      if (v == V[2]) { i = 2; return true; }
-      if (v == V[3]) { i = 3; return true; }
-      return false;
-    }
-
-  int index(Vertex_handle v) const
-  {
-    if (v == V[0]) { return 0; }
-    if (v == V[1]) { return 1; }
-    if (v == V[2]) { return 2; }
-    CGAL_triangulation_assertion( v == V[3] );
-    return 3;
-  }
-
-  Cell_handle neighbor(int i) const
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    return N[i];
-  }
-
-  bool has_neighbor(Cell_handle n) const
-  {
-    return (N[0] == n) || (N[1] == n) || (N[2] == n) || (N[3] == n);
-  }
-
-  bool has_neighbor(Cell_handle n, int & i) const
-  {
-    if(n == N[0]){ i = 0; return true; }
-    if(n == N[1]){ i = 1; return true; }
-    if(n == N[2]){ i = 2; return true; }
-    if(n == N[3]){ i = 3; return true; }
-    return false;
-  }
-
-  int index(Cell_handle n) const
-  {
-    if (n == N[0]) return 0;
-    if (n == N[1]) return 1;
-    if (n == N[2]) return 2;
-    CGAL_triangulation_assertion( n == N[3] );
-    return 3;
-  }
-
-  // SETTING
-
-  void set_vertex(int i, Vertex_handle v)
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    V[i] = v;
-  }
-
-  void set_neighbor(int i, Cell_handle n)
-  {
-    CGAL_triangulation_precondition( i >= 0 && i <= 3);
-    CGAL_triangulation_precondition( this != &*n );
-    N[i] = n;
-  }
-
-  void set_vertices()
-  {
-    V[0] = V[1] = V[2] = V[3] = Vertex_handle();
-  }
-
-  void set_vertices(Vertex_handle v0, Vertex_handle v1,
-                    Vertex_handle v2, Vertex_handle v3)
-  {
-    V[0] = v0;
-    V[1] = v1;
-    V[2] = v2;
-    V[3] = v3;
-  }
-
-  void set_neighbors()
-  {
-    N[0] = N[1] = N[2] = N[3] = Cell_handle();
-  }
-
-  void set_neighbors(Cell_handle n0, Cell_handle n1,
-                     Cell_handle n2, Cell_handle n3)
-  {
-    CGAL_triangulation_precondition( this != &*n0 );
-    CGAL_triangulation_precondition( this != &*n1 );
-    CGAL_triangulation_precondition( this != &*n2 );
-    CGAL_triangulation_precondition( this != &*n3 );
-    N[0] = n0;
-    N[1] = n1;
-    N[2] = n2;
-    N[3] = n3;
-  }
-
-  // CHECKING
-
-  // the following trivial is_valid allows
-  // the user of derived cell base classes
-  // to add their own purpose checking
-  bool is_valid(bool = false, int = 0) const
-  { return true; }
-
-  // This is here in the *ds*_cell_base to ease its use as default
-  // template parameter, so that the .dual() functions of Delaunay_3
-  // still work.
-  template < typename Traits >
-  typename Traits::Point_3
-  circumcenter(const Traits& gt) const
-  {
-    return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
-                                                this->vertex(1)->point(),
-                                                this->vertex(2)->point(),
-                                                this->vertex(3)->point());
-  }
-
-  // For use by Compact_container.
-  void * for_compact_container() const { return N[0].for_compact_container(); }
-  void * & for_compact_container()     { return N[0].for_compact_container(); }
-
-  // TDS internal data access functions.
-        TDS_data& tds_data()       { return _tds_data; }
-  const TDS_data& tds_data() const { return _tds_data; }
-  
-#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
-  int mark;
-  int mark2;
-#endif
-
-private:
-
-  Cell_handle   N[4];
-  Vertex_handle V[4];
-  TDS_data      _tds_data;
-};
-
-template < class TDS >
-inline
-std::istream&
-operator>>(std::istream &is, Triangulation_ds_cell_base_3<TDS> &)
-  // non combinatorial information. Default = nothing
-{
-  return is;
-}
-
-template < class TDS >
-inline
-std::ostream&
-operator<<(std::ostream &os, const Triangulation_ds_cell_base_3<TDS> &)
-  // non combinatorial information. Default = nothing
-{
-  return os;
-}
-
-// Specialization for void.
-template <>
-class Triangulation_ds_cell_base_3<void>
-{
-public:
-  typedef internal::Dummy_tds_3                         Triangulation_data_structure;
-  typedef Triangulation_data_structure::Vertex_handle   Vertex_handle;
-  typedef Triangulation_data_structure::Cell_handle     Cell_handle;
-  template <typename TDS2>
-  struct Rebind_TDS { typedef Triangulation_ds_cell_base_3<TDS2> Other; };
-};
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_DS_CELL_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_full_cell.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_full_cell.h
deleted file mode 100644
index 3177d48..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_full_cell.h
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)    : Samuel Hornus
-
-#ifndef CGAL_TRIANGULATION_SIMPLEX_H
-#define CGAL_TRIANGULATION_SIMPLEX_H
-
-#include <CGAL/Triangulation_ds_full_cell.h>
-#include <CGAL/internal/Triangulation/utilities.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/Default.h>
-
-namespace CGAL {
-
-struct No_full_cell_data {};
-
-template< class TriangulationTraits, typename Data_ = No_full_cell_data, class TDSFullCell = Default >
-class Triangulation_full_cell : public Default::Get<TDSFullCell, Triangulation_ds_full_cell<> >::type
-{
-    // The default type for TDSFullCell is Triangulation_ds_full_cell<> :
-    typedef typename Default::Get<TDSFullCell, Triangulation_ds_full_cell<> >::type
-                                                                Base;
-    typedef Triangulation_full_cell<TriangulationTraits, Data_, TDSFullCell>  Self;
-public:
-    typedef Data_                                       Data;
-    typedef typename Base::Vertex_handle                Vertex_handle;
-    typedef typename Base::Vertex_const_handle          Vertex_const_handle;
-    typedef typename Base::Vertex_handle_const_iterator Vertex_handle_const_iterator;
-    typedef typename Base::Full_cell_const_handle       Full_cell_const_handle;
-    typedef typename TriangulationTraits::Point_d       Point;
-    typedef typename TriangulationTraits::Point_d       Point_d;
-
-private: // DATA MEMBERS
-    Data    data_;
-
-public:
-
-    using Base::vertices_begin;
-    using Base::vertices_end;
-
-    template< class TDS2 >
-    struct Rebind_TDS
-    {
-        typedef typename Base::template Rebind_TDS<TDS2>::Other TDSFullCell2;
-        typedef Triangulation_full_cell<TriangulationTraits, Data_, TDSFullCell2> Other;
-    };
- 
-    Triangulation_full_cell(const int d)
-        : Base(d), data_() {}
-
-    Triangulation_full_cell(const Self & s)
-        : Base(s), data_(s.data_)  {}
-
-    Point circumcenter() const
-    {
-        TriangulationTraits pct;
-        Vertex_handle_const_iterator vhit = vertices_begin();
-        while( vhit != vertices_end() )
-        {
-            if( *vhit == Vertex_const_handle() )
-            {
-                CGAL_warning_msg(false, "too few points; can not compute circumcenter.");
-                return Point();
-            }
-            ++vhit;
-        }
-        return pct.center_of_sphere_d_object()(points_begin(), points_end());
-    }
-
-    const Data & data() const
-    {
-        return data_;
-    }
-
-    Data & data()
-    {
-        return data_;
-    }
-
-    struct Point_from_vertex_handle
-    {
-        typedef Vertex_handle   argument_type;
-        typedef Point           result_type;
-        result_type & operator()(argument_type & x) const
-        {
-            return x->point();
-        }
-        const result_type & operator()(const argument_type & x) const
-        {
-            return x->point();
-        }
-    };
-
-protected:
-
-    typedef CGAL::Iterator_project<
-        Vertex_handle_const_iterator,
-        internal::Triangulation::Point_from_vertex_handle<Vertex_handle, Point>
-    > Point_const_iterator;
-
-    Point_const_iterator points_begin() const
-        { return Point_const_iterator(Base::vertices_begin()); }
-    Point_const_iterator points_end() const
-        { return Point_const_iterator(Base::vertices_end()); }
-};
-
-// FUNCTIONS THAT ARE NOT MEMBER FUNCTIONS:
-
-std::istream &
-operator>>(std::istream & is, No_full_cell_data &)
-{
-    return is;
-}
-
-std::ostream &
-operator<<(std::ostream & os, const No_full_cell_data &)
-{
-    return os;
-}
-
-template < typename TDS, typename Data, typename SSP >
-std::ostream &
-operator<<(std::ostream & O, const Triangulation_full_cell<TDS, Data, SSP> & s)
-{
-    /*if( is_ascii(O) )
-    {
-        // os << '\n';
-    }
-    else {}*/
-    O << s.data();
-    return O;
-}
-
-template < typename TDS, typename Data, typename SSP >
-std::istream &
-operator>>(std::istream & I, Triangulation_full_cell<TDS, Data, SSP> & s)
-{
-    /*if( is_ascii(I) )
-    {}
-    else {}*/
-    I >> s.data();
-    return I;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_SIMPLEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_structural_filtering_traits.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_structural_filtering_traits.h
deleted file mode 100644
index c62c4a4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_structural_filtering_traits.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2010  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Rineau <Laurent.Rineau__CGAL at normalesup.org>
-// 
-
-#ifndef TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
-#define TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
-
-#include <CGAL/tags.h>
-
-namespace CGAL {
-
-template <typename Geom_traits>
-struct Triangulation_structural_filtering_traits {
-  typedef Tag_false Use_structural_filtering_tag;
-};
-
-#ifdef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
-template <>
-struct Triangulation_structural_filtering_traits<Epeck> {
-  typedef Tag_true Use_structural_filtering_tag;
-};
-#endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
-
-#ifdef CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
-template <>
-struct Triangulation_structural_filtering_traits<Epick> {
-  typedef Tag_true Use_structural_filtering_tag;
-};
-#endif // CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
-
-} // end namespace CGAL
-
-#endif // no TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex.h b/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex.h
deleted file mode 100644
index 74d6a49..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex.h
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)    : Samuel Hornus
-
-#ifndef CGAL_TRIANGULATION_VERTEX_H
-#define CGAL_TRIANGULATION_VERTEX_H
-
-#include <CGAL/Triangulation_ds_vertex.h>
-#include <CGAL/Default.h>
-#include <CGAL/Random.h>
-
-namespace CGAL {
-
-struct No_vertex_data {};
-
-template< class TriangulationTraits, typename Data_ = No_vertex_data, class TDSVertex = Default >
-class Triangulation_vertex : public Default::Get<TDSVertex, Triangulation_ds_vertex<> >::type
-{
-    // The default type for TDSVertex is Triangulation_ds_vertex<> :
-    typedef typename Default::Get<TDSVertex, Triangulation_ds_vertex<> >::type
-                                                                Base;
-    typedef Triangulation_vertex<TriangulationTraits, Data_, TDSVertex>    Self;
-public:
-    typedef Data_                                   Data;
-    typedef typename TriangulationTraits::Point_d   Point;
-    typedef typename TriangulationTraits::Point_d   Point_d;
-    typedef typename Base::Full_cell_handle         Full_cell_handle;
-
-    template <typename TDS2>
-    struct Rebind_TDS
-    {
-        typedef typename Base::template Rebind_TDS<TDS2>::Other TDSVertex2;
-        typedef Triangulation_vertex<TriangulationTraits, Data_, TDSVertex2> Other;
-    };
-
-private: // DATA MEMBERS
-    Point       point_;
-    Data        data_;
-
-public:
-    template< typename T >
-    Triangulation_vertex(Full_cell_handle s, const Point & p, const T & t)
-    : Base(s), point_(p), data_(t) {}
-    Triangulation_vertex(Full_cell_handle s, const Point & p)
-    : Base(s), point_(p), data_() {}
-    template< typename T >
-    Triangulation_vertex(const Point & p, const T & t)
-    : Base(), point_(p), data_(t) {}
-    Triangulation_vertex(const Point & p)
-    : Base(), point_(p), data_() {}
-    Triangulation_vertex() : Base(), point_(), data_() {}
-
-    ~Triangulation_vertex() {}
-
-    /// Set the position in space of the vertex to 'p'
-    void set_point(const Point & p)
-    {
-        point_ = p;
-    }
-
-    /// Returns the position in space of the vertex
-    const Point & point() const
-    {
-        return point_;
-    }
-
-    const Data & data() const
-    {
-        return data_;
-    }
-
-    Data & data()
-    {
-        return data_;
-    }
-
-};  // end of Triangulation_vertex
-
-// NON CLASS-MEMBER FUNCTIONS
-
-std::istream &
-operator>>(std::istream & is, No_vertex_data &)
-{
-    return is;
-}
-
-std::ostream &
-operator<<(std::ostream & os, const No_vertex_data &)
-{
-    return os;
-}
-
-template < class A, typename Data, class B >
-std::istream &
-operator>>(std::istream & is, Triangulation_vertex<A, Data, B> & v)
-{
-    is >> v.point();
-    return (is >> v.data());
-}
-
-template< class A, typename Data, class B >
-std::ostream &
-operator<<(std::ostream & os, const Triangulation_vertex<A, Data, B> & v)
-{
-    os << v.point();
-    os << v.data();
-    return os;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATION_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Umbilics.h b/3rdparty/CGAL-4.6/include/CGAL/Umbilics.h
deleted file mode 100644
index f1ed4fb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Umbilics.h
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Pouget and Frédéric Cazals
-#ifndef CGAL_UMBILIC_H_
-#define CGAL_UMBILIC_H_
-
-#include <list>
-#include <vector>
-#include <math.h>
-#include <CGAL/basic.h>
-#include <CGAL/PolyhedralSurf_neighbors.h>
-#include <boost/shared_ptr.hpp>
-
-namespace CGAL {
-
-enum Umbilic_type { NON_GENERIC_UMBILIC = 0, ELLIPTIC_UMBILIC, HYPERBOLIC_UMBILIC};
-
-//-------------------------------------------------------------------
-//Umbilic : stores umbilic data, its location given by a vertex, its
-//type and a circle of edges bording a disk containing the vertex
-//------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh >
-class Umbilic
-{
- public:
-  typedef typename TriangulatedSurfaceMesh::Vertex_const_handle    Vertex_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Halfedge_const_handle  Halfedge_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3 Vector_3;
-  
-  //contructor
-  Umbilic(const Vertex_const_handle v_init,
-	  const std::list<Halfedge_const_handle> contour_init); 
-  //access fct
-  Vertex_const_handle vertex() const { return v;}
-  Umbilic_type umbilic_type() const { return umb_type;}
-  Umbilic_type& umbilic_type() { return umb_type;}
-  const std::list<Halfedge_const_handle>& contour_list() const { return contour;}
-
- protected:
-  const Vertex_const_handle v;
-  Umbilic_type umb_type;
-  const std::list<Halfedge_const_handle> contour;
-};
-
-//constructor
-template <class TriangulatedSurfaceMesh>
-Umbilic<TriangulatedSurfaceMesh>::
-Umbilic(const Vertex_const_handle v_init,
-	const std::list<Halfedge_const_handle> contour_init) 
-  : v(v_init), contour(contour_init) {} 
-
-
-template <class TriangulatedSurfaceMesh>
-std::ostream& 
-operator<<(std::ostream& out_stream, const Umbilic<TriangulatedSurfaceMesh>& umbilic)
-{
-  out_stream << "Umbilic at location (" << umbilic.vertex()->point() << ") of type ";
-  switch (umbilic.umbilic_type())
-    {
-    case CGAL::NON_GENERIC_UMBILIC: out_stream << "non generic" << std::endl; break;
-    case CGAL::ELLIPTIC_UMBILIC: out_stream << "elliptic" << std::endl; break;
-    case CGAL::HYPERBOLIC_UMBILIC: out_stream << "hyperbolic" << std::endl; break;
-    default : out_stream << "Something wrong occured for sure..." << std::endl; break;
-    }
-  return out_stream;
-}
-//---------------------------------------------------------------------------
-//Umbilic_approximation : enable computation of umbilics of a
-//TriangulatedSurfaceMesh. It uses the class
-//T_PolyhedralSurf_neighbors to compute topological disk patches
-//around vertices
-//--------------------------------------------------------------------------
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap, class Vertex2VectorPropertyMap >
-  class Umbilic_approximation
-{
- public:
-  typedef typename TriangulatedSurfaceMesh::Traits::FT       FT;
-  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3 Vector_3;
-  typedef typename TriangulatedSurfaceMesh::Vertex_const_handle    Vertex_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Halfedge_const_handle  Halfedge_const_handle;
-  typedef typename TriangulatedSurfaceMesh::Facet_const_iterator   Facet_const_iterator;
-  typedef typename TriangulatedSurfaceMesh::Vertex_const_iterator  Vertex_const_iterator;
-
-  //requirements for the templates TriangulatedSurfaceMesh and Vertex2FTPropertyMap or Vertex2VectorPropertyMap
-  CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
-  CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
-  CGAL_static_assertion((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
-  CGAL_static_assertion((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
-
-  typedef CGAL::Umbilic<TriangulatedSurfaceMesh> Umbilic;
-
-  //constructor : sets propertymaps and the poly_neighbors
-  Umbilic_approximation(const TriangulatedSurfaceMesh& P, 
-			const Vertex2FTPropertyMap& vertex2k1_pm, 
-			const Vertex2FTPropertyMap& vertex2k2_pm,
-			const Vertex2VectorPropertyMap& vertex2d1_pm, 
-			const Vertex2VectorPropertyMap& vertex2d2_pm);
-  //identify umbilics as vertices minimizing the function k1-k2 on
-  //their patch and for which the index is not 0. We avoid
-  //potential umbilics whose contours touch the border.
-  template <class OutputIterator>
-  OutputIterator compute(OutputIterator it, FT size);
-
- protected:
-  const TriangulatedSurfaceMesh& P;
-  
-  typedef T_PolyhedralSurf_neighbors<TriangulatedSurfaceMesh> Poly_neighbors;
-  boost::shared_ptr<Poly_neighbors> poly_neighbors;
-
-  CGAL::Abs<FT> cgal_abs;
-  CGAL::To_double<FT> To_double;
-
-  //Property maps
-  const Vertex2FTPropertyMap &k1, &k2;
-  const Vertex2VectorPropertyMap &d1, &d2;
-
-  // index: following CW the contour, we choose an orientation for the
-  // max dir of an arbitrary starting point, the max dir field is
-  // oriented on the next point so that the scalar product of the
-  // consecutive vectors is positive.  Adding all the angles between
-  // consecutive vectors around the contour gives ~ -/+180 for a
-  // wedge/trisector, ~ 0 gives a false umbilic, everything else gives
-  // a non_generic umbilic.
-  int compute_type(Umbilic& umb);
-};
-
-template < class TriangulatedSurfaceMesh,  class Vertex2FTPropertyMap, class Vertex2VectorPropertyMap >
-  Umbilic_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap, Vertex2VectorPropertyMap >::
-Umbilic_approximation(const TriangulatedSurfaceMesh& p, 
-		      const Vertex2FTPropertyMap& vertex2k1_pm, 
-		      const Vertex2FTPropertyMap& vertex2k2_pm,
-		      const Vertex2VectorPropertyMap& vertex2d1_pm, 
-		      const Vertex2VectorPropertyMap& vertex2d2_pm)
-  : P(p), k1(vertex2k1_pm), k2(vertex2k2_pm), 
-    d1(vertex2d1_pm), d2(vertex2d2_pm)
-{
-  //check that the mesh is a triangular one.
-  Facet_const_iterator itb = P.facets_begin(), ite = P.facets_end();
-  for(;itb!=ite;itb++) CGAL_precondition( itb->is_triangle() );
-
-  poly_neighbors = boost::shared_ptr<Poly_neighbors>(new Poly_neighbors(P));
-}
-
-template < class TriangulatedSurfaceMesh,  class Vertex2FTPropertyMap, class Vertex2VectorPropertyMap >
-  template <class OutputIterator>
-  OutputIterator Umbilic_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap, Vertex2VectorPropertyMap >::
-  compute(OutputIterator umbilics_it, FT size)
-{
-  CGAL_precondition( size >= 1 );
-  
-  std::vector<Vertex_const_handle> vces;
-  std::list<Halfedge_const_handle> contour;
-  FT umbilicEstimatorVertex, umbilicEstimatorNeigh;
-  
-  bool is_umbilic = true;
-
-  //MAIN loop on P vertices
-  Vertex_const_iterator itb = P.vertices_begin(), ite = P.vertices_end();
-  for (;itb != ite; itb++) {
-    Vertex_const_handle vh = itb;
-    umbilicEstimatorVertex = cgal_abs(k1[vh]-k2[vh]);
-    //reset vector, list and bool
-    vces.clear();
-    contour.clear();
-    is_umbilic = true;
-    //the size of neighbourhood is (size * OneRingSize)
-    poly_neighbors->compute_neighbors(vh, vces, contour, size);
-    
-    
-    // avoid umbilics whose contours touch the border (Note may not be
-    // desirable?)
-    typename std::list<Halfedge_const_handle>::const_iterator itb_cont = contour.begin(),
-      ite_cont = contour.end();
-    for (; itb_cont != ite_cont; itb_cont++)
-      if ( (*itb_cont)->is_border() ) {is_umbilic = false; continue;}
-    if (is_umbilic == false) continue;
-    
-    //is v an umbilic?
-    //a priori is_umbilic = true, and it switches to false as soon as a 
-    //  neigh vertex has a lower umbilicEstimator value
-    typename std::vector<Vertex_const_handle>::const_iterator itbv = vces.begin(),
-      itev = vces.end();
-    itbv++;
-    for (; itbv != itev; itbv++)
-      {	umbilicEstimatorNeigh = cgal_abs( k1[*itbv] - k2[*itbv] );
-	if ( umbilicEstimatorNeigh < umbilicEstimatorVertex ) 
-	  {is_umbilic = false; break;}
-      }
-    if (is_umbilic == false) continue;
-    
-    //v is an umbilic (wrt the min of k1-k2), compute the index. If
-    //the index is not 0 then we have actually an umbilic which is output
-    Umbilic*  cur_umbilic = new Umbilic(vh, contour);
-    if (compute_type(*cur_umbilic) != 0)  *umbilics_it++ = cur_umbilic;
-  }
-  return umbilics_it;
-}
-
-template < class TriangulatedSurfaceMesh,  class Vertex2FTPropertyMap, class Vertex2VectorPropertyMap >
-  int Umbilic_approximation< TriangulatedSurfaceMesh, Vertex2FTPropertyMap, Vertex2VectorPropertyMap >::
-  compute_type(Umbilic& umb)
-{
-  Vector_3 dir, dirnext, normal;
-  double cosinus, angle=0, angleSum=0;
-  const double  pi=3.141592653589793;
-  Vertex_const_handle v;
-  typename std::list<Halfedge_const_handle>::const_iterator itb = umb.contour_list().begin(),
-    itlast = --umb.contour_list().end();
-  v = (*itb)->vertex();
-
-  dir = d1[v];
-  normal = CGAL::cross_product(d1[v], d2[v]);
-
-  //sum angles along the contour
-  do{
-    itb++;
-    v=(*itb)->vertex();
-    dirnext = d1[v];
-    cosinus = To_double(dir*dirnext);
-    if (cosinus < 0) {dirnext = dirnext*(-1); cosinus *= -1;}
-    if (cosinus>1) cosinus = 1;
-    //orientation of (dir, dirnext, normal)
-    if ( (dir * CGAL::cross_product(dirnext, normal)) > 0) angle = acos(cosinus);
-    else angle = -acos(cosinus);
-    angleSum += angle;
-    dir = dirnext;
-    normal = CGAL::cross_product(d1[v], d2[v]);
-  }
-  while (itb != (itlast));
-  
-  //angle (v_last, v_0)
-  v=(*umb.contour_list().begin())->vertex();
-   dirnext = d1[v];
-   cosinus = To_double(dir*dirnext);
-  if (cosinus < 0) {dirnext = dirnext*(-1); cosinus *= -1;}
-  if (cosinus>1) cosinus = 1;
-  if ( (dir * CGAL::cross_product(dirnext, normal)) > 0) angle = acos(cosinus);
-  else angle = -acos(cosinus);
-  angleSum += angle;
-
-  if ((angleSum > (pi/2)) && (angleSum < (3*pi/2))) umb.umbilic_type() = HYPERBOLIC_UMBILIC ;
-  else if ((angleSum < (-pi/2)) && (angleSum > (-3*pi/2))) umb.umbilic_type() = ELLIPTIC_UMBILIC;
-  else if ((angleSum <= (pi/2)) && (angleSum >= (-pi/2))) return 0;//is not considered as an umbilic
-  else umb.umbilic_type() = NON_GENERIC_UMBILIC;
-  return 1;
-}
-
-//Global function
-
-template < class TriangulatedSurfaceMesh,  
-  class Vertex2FTPropertyMap,
-  class Vertex2VectorPropertyMap,
-  class OutputIterator>
-  OutputIterator compute_umbilics(const TriangulatedSurfaceMesh &P,
-				  const Vertex2FTPropertyMap& vertex2k1_pm, 
-				  const Vertex2FTPropertyMap& vertex2k2_pm,
-				  const Vertex2VectorPropertyMap& vertex2d1_pm, 
-				  const Vertex2VectorPropertyMap& vertex2d2_pm,
-				  OutputIterator it, 
-				  double size)
-{
-  typedef Umbilic_approximation < TriangulatedSurfaceMesh, 
-    Vertex2FTPropertyMap, Vertex2VectorPropertyMap > Umbilic_approximation;
-  
-  Umbilic_approximation umbilic_approximation(P, 
-					      vertex2k1_pm, vertex2k2_pm,
-					      vertex2d1_pm, vertex2d2_pm);
-  return umbilic_approximation.compute(it, size);  
-}
-
-
-
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Union_find.h b/3rdparty/CGAL-4.6/include/CGAL/Union_find.h
deleted file mode 100644
index 8049cca..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Union_find.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright (c) 1997-2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>,
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-
-
-#ifndef CGAL_UNION_FIND_H
-#define CGAL_UNION_FIND_H
-
-#include <CGAL/basic.h>
-#include <CGAL/memory.h>
-#include <cstddef>
-
-namespace CGAL {
-
-namespace internal {
-
-template <class PTR_, class V_, class R_, class P_>
-class UF_forward_iterator {
-    PTR_   m_p;
-public:
-    // should be private and Union_find<...> a friend.
-    PTR_   ptr() const { return m_p; }  
-
-    typedef UF_forward_iterator<PTR_, V_, R_, P_> Self;
-    typedef V_                                    value_type;
-    typedef R_                                    reference;
-    typedef P_                                    pointer;
-    typedef std::forward_iterator_tag             iterator_category;
-
-    UF_forward_iterator() : m_p(0) {}
-    UF_forward_iterator(PTR_ p) : m_p(p) {}
-
-    // Allows construction of const_iterator from iterator
-    template <class PPTR, class VV, class RR, class PP>
-    UF_forward_iterator(const UF_forward_iterator<PPTR, VV, RR, PP>& i)
-        : m_p(i.ptr()) {}
-
-    bool      operator==( const Self& x) const { return m_p == x.m_p; }
-    bool      operator!=( const Self& x) const { return !(*this == x); }
-    reference operator*()  const { return m_p->value; }
-    pointer   operator->() const { return &(m_p->value); }
-    Self&     operator++() {
-                  CGAL_assertion(m_p != 0);
-                  m_p = m_p->next;
-                  return *this;
-    }
-    Self      operator++(int) {
-                  Self tmp = *this;
-                  ++*this;
-                  return tmp;
-    }
-};
-
-} // internal
-
-
-// Union-Find with path compression.
-// --------------------------------------------------------------------
-// An instance of the data type Union_find is a partition of values of
-// type |T| into disjoint sets. The type |A| has to be a model of the
-// allocator concept as defined in the C++ standard.
-
-// Union_find is implemented with union by rank and path compression.
-// The running time for $m$ set operations on $n$ elements is 
-// $O(n \alpha(m,n))$ where $\alpha(m,n)$ is the extremely slow
-// growing inverse of Ackermann's function.
-
-template <typename T, typename A = CGAL_ALLOCATOR(T) > 
-class Union_find {
-    struct Union_find_struct {
-        typedef Union_find_struct* pointer;
-        // friend class Union_find<T,A>;
-        mutable pointer      up;
-        pointer              next;
-        std::size_t          size;
-        T                    value;
-        Union_find_struct( pointer n, const T& x)
-            : up(0), next(n), size(1), value(x) {}
-    };
-
-public:
-    typedef Union_find<T,A>                                  Self;
-    typedef Union_find_struct*                               pointer;
-    typedef const Union_find_struct*                         const_pointer;
-
-    typedef T                                                value_type; 
-    typedef T&                                               reference; 
-    typedef const T&                                         const_reference; 
-
-    typedef internal::UF_forward_iterator< pointer, T, T&, T*>  iterator;
-    typedef iterator                                         handle;
-    typedef internal::UF_forward_iterator< const_pointer, T, const T&, const T*>
-                                                             const_iterator;
-    typedef const_iterator                                   const_handle;
-
-#ifdef _MSC_VER
-    typedef CGAL_ALLOCATOR(Union_find_struct)                allocator;
-#else
-    typedef typename A::template rebind<Union_find_struct>   Rebind;
-    typedef typename Rebind::other                           allocator;
-#endif
-
-private:
-    pointer      m_first;
-    std::size_t  sets;
-    std::size_t  values;
-    allocator    alloc;
-
-    // Private decl. and no definition, thus no copy constructor
-    // and no assignment for this class.
-    Union_find(const Self&);
-    Self& operator=(const Self&);
-
-    pointer find( pointer p) const {
-        CGAL_assertion(p != 0);
-        pointer r = p;
-        while (r->up) 
-            r = r->up; // now r is the root;
-        while (p->up) {
-            pointer u = p->up;
-            p->up = r; // path compression: assign root r as new parent
-            p = u;     // this would need the 'mutable' for the up field
-        }              // if we would have a const_pointer, see the cast
-        return r;      // in the fct. below. We keep the mutable as reminder.
-    }
-    const_pointer find( const_pointer p ) const {
-        return find( const_cast<pointer>(p));
-    }
-    bool is_valid(const_handle v) const { return v != const_handle(0); }
-
-public:
-    Union_find() : m_first(0), sets(0), values(0) {}
-    ~Union_find() { clear(); }
-
-    allocator   get_allocator() const { return alloc; }
-
-    std::size_t number_of_sets() const { return sets; }
-    // returns the number of disjoint sets
-
-    std::size_t size() const { return values; }
-    // returns the number of values
-
-    std::size_t bytes() const {
-    // returns the memory consumed
-        return values * sizeof(Union_find_struct) + sizeof( Self); 
-    }
-
-    std::size_t size( const_handle p) const { return find(p).ptr()->size; }
-    // returns the size of the set containing $p$
-
-    void clear();
-    // reinitializes to an empty partition
-
-    handle make_set(const T& x);
-    // creates a new singleton set containing |x| and returns a handle to it
-
-    handle push_back(const T& x) { return make_set(x); }
-    // same as |make_set(x)|
-
-    template <class Forward_iterator>
-    void insert( Forward_iterator first, Forward_iterator beyond) {
-    // insert the range of values referenced by |[first,beyond)|.
-    // Precond: value type of |Forward_iterator| is |T|.
-        while (first != beyond)
-            push_back(*first++);
-    }
-
-    handle       find( handle p)       const { return find(p.ptr()); }
-
-    const_handle find( const_handle p ) const {
-    // returns a canonical handle of the set that contains |p|,
-    // i.e., |P.same_set(p,q)| iff  |P.find(p)| and |P.find(q)| return
-    // the same handle. Precond: |p| is a handle in the union find structure.
-        return find(p.ptr());
-    }
-
-    void unify_sets(handle p, handle q);
-    // unites the sets of partition containing $p$ and $q$.
-    // Precond: $p$ and $q$ are in the partition.
-
-    bool same_set( const_handle p, const_handle q) const {
-    // returns true iff $p$ and $q$ belong to the same set.
-    // Precond: $p$ and $q$ are in the partition.
-        return find(p) == find(q); 
-    }
-
-    iterator begin() { return iterator(m_first); }
-    iterator end()   { return iterator(0); }
-
-    const_iterator begin() const { return const_iterator(m_first); }
-    const_iterator end()   const { return const_iterator(0); }
-};
-
-template <typename T, typename A>
-typename Union_find<T,A>::handle Union_find<T,A>::make_set(const T& x) {
-    pointer tmp = m_first;
-    m_first = alloc.allocate(1);
-    alloc.construct( m_first, Union_find_struct(tmp,x));
-    ++sets;
-    ++values;
-    return handle( m_first);
-}
-
-template <typename T, typename A>
-void Union_find<T,A>::clear() {
-    while (m_first) { 
-        pointer tmp = m_first->next;
-        alloc.destroy(m_first);
-        alloc.deallocate(m_first,1);
-        m_first = tmp;
-    }
-    sets   = 0;
-    values = 0;
-}
-
-template <typename T, typename A>
-void Union_find<T,A>::unify_sets( handle p, handle q) {
-    CGAL_assertion( is_valid(p) && is_valid(q));
-    pointer pit = find( p.ptr());
-    pointer qit = find( q.ptr());
-    if (pit == qit)
-        return;
-    std::size_t sp = pit->size;
-    std::size_t sq = qit->size;
-    if (sp > sq) 
-        std::swap(pit,qit); // now sp <= sq
-    pit->up = qit;  // linking roots
-    qit->size += pit->size; // updating size
-    --sets;
-}
-
-} //namespace CGAL
-
-#endif // CGAL_UNION_FIND_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Vector_2.h b/3rdparty/CGAL-4.6/include/CGAL/Vector_2.h
deleted file mode 100644
index 539030b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Vector_2.h
+++ /dev/null
@@ -1,352 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_VECTOR_2_H
-#define CGAL_VECTOR_2_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Vector_2 : public R_::Kernel_base::Vector_2
-{
-  typedef typename R_::RT             RT;
-  typedef typename R_::FT             FT;
-  typedef typename R_::Segment_2      Segment_2;
-  typedef typename R_::Ray_2          Ray_2;
-  typedef typename R_::Line_2         Line_2;
-  typedef typename R_::Point_2        Point_2;
-  typedef typename R_::Direction_2    Direction_2;
-  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
-  typedef typename R_::Kernel_base::Vector_2  RVector_2;
-
-  typedef Vector_2                    Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_2>::value));
-
-public:
-
-  typedef Dimension_tag<2>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef RVector_2 Rep;
-  typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef  R_                        R;
-
-  Vector_2() {}
-
-  Vector_2(const RVector_2& v)
-      : RVector_2(v) {}
-
-  Vector_2(const Point_2& a, const Point_2& b)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), a, b)) {}
-
-  explicit Vector_2(const Segment_2 &s)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), s)) {}
-
-  explicit Vector_2(const Ray_2 &r)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), r)) {}
-
-  explicit Vector_2(const Line_2 &l)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), l)) {}
-
-  Vector_2(const Null_vector &v)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), v)) {}
-
-  template < typename T1, typename T2 >
-  Vector_2(const T1 &x, const T2 &y)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y)) {}
-
-  Vector_2(const RT &x, const RT &y, const RT &w)
-      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y,w)) {}
-
-
-  typename cpp11::result_of<typename R::Compute_x_2(Vector_2)>::type
-  x() const
-  {
-    return R().compute_x_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_y_2(Vector_2)>::type
-  y() const
-  {
-    return R().compute_y_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_y_2(Vector_2)>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) );
-    return (i==0) ?  x() : y();
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_2(Vector_2)>::type
-  operator[](int i) const
-  {
-      return cartesian(i);
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return typename R::Construct_cartesian_const_iterator_2()(*this);
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return typename R::Construct_cartesian_const_iterator_2()(*this,2);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hx_2(Vector_2)>::type
-  hx() const
-  {
-    return R().compute_hx_2_object()(*this);
-  }
-
-
-  typename cpp11::result_of<typename R::Compute_hy_2(Vector_2)>::type
-  hy() const
-  {
-    return R().compute_hy_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hw_2(Vector_2)>::type
-  hw() const
-  {
-    return R().compute_hw_2_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hx_2(Vector_2)>::type
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
-    return (i==0) ?  hx() : (i==1)? hy() : hw();
-  }
-
-  int dimension() const
-  {
-      return 2;
-  }
-
-  Vector_2 operator-() const
-  {
-    return R().construct_opposite_vector_2_object()(*this);
-  }
-
-  Vector_2 operator-(const Vector_2& v) const
-  {
-    return R().construct_difference_of_vectors_2_object()(*this,v);
-  }
-
-  Vector_2 operator+(const Vector_2& v) const
-  {
-    return R().construct_sum_of_vectors_2_object()(*this,v);
-  }
-
-  Vector_2 operator/(const RT& c) const
-  {
-   return R().construct_divided_vector_2_object()(*this,c);
-  }
-
-  Vector_2 operator/(const typename First_if_different<FT,RT>::Type & c) const
-  {
-   return R().construct_divided_vector_2_object()(*this,c);
-  }
-
-  FT squared_length() const
-  {
-    return R().compute_squared_length_2_object()(*this);
-  }
-
-
-  Direction_2 direction() const
-  {
-    return R().construct_direction_2_object()(*this);
-  }
-
-  Vector_2 perpendicular(const Orientation &o) const
-  {
-    return R().construct_perpendicular_vector_2_object()(*this,o);
-  }
-
-  Vector_2 transform(const Aff_transformation_2 &t) const
-  {
-    return t.transform(*this);
-  }
-
-};
-
-
-template < class R >
-inline
-bool
-operator==(const Vector_2<R> &v, const Null_vector &n)
-{
-  return R().equal_2_object()(v, n);
-}
-
-template < class R >
-inline
-bool
-operator==(const Null_vector &n, const Vector_2<R> &v)
-{
-  return v == n;
-}
-
-template < class R >
-inline
-bool
-operator!=(const Vector_2<R> &v, const Null_vector &n)
-{
-  return !(v == n);
-}
-
-template < class R >
-inline
-bool
-operator!=(const Null_vector &n, const Vector_2<R> &v)
-{
-  return !(v == n);
-}
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Vector_2<R>& v, const Cartesian_tag&)
-{
-    switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-        return os << v.x() << ' ' << v.y();
-    case IO::BINARY :
-        write(os, v.x());
-        write(os, v.y());
-        return os;
-    default:
-        return os << "VectorC2(" << v.x() << ", " << v.y() << ')';
-    }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Vector_2<R>& v, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << v.hx() << ' ' << v.hy() << ' ' << v.hw();
-    case IO::BINARY :
-        write(os, v.hx());
-        write(os, v.hy());
-        write(os, v.hw());
-        return os;
-    default:
-        return os << "VectorH2(" << v.hx() << ", "
-                                 << v.hy() << ", "
-                                 << v.hw() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Vector_2<R>& v)
-{
-  return insert(os, v, typename R::Kernel_tag() );
-}
-
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Vector_2<R>& v, const Cartesian_tag&)
-{
-    typename R::FT x, y;
-    switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-        is >> iformat(x) >> iformat(y);
-        break;
-    case IO::BINARY :
-        read(is, x);
-        read(is, y);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-    }
-    if (is)
-        v = Vector_2<R>(x, y);
-    return is;
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Vector_2<R>& v, const Homogeneous_tag&)
-{
-  typename R::RT hx, hy, hw;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> hx >> hy >> hw;
-        break;
-    case IO::BINARY :
-        read(is, hx);
-        read(is, hy);
-        read(is, hw);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  v = Vector_2<R>(hx, hy, hw);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Vector_2<R>& v)
-{
-  return extract(is, v, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_VECTOR_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Vector_3.h b/3rdparty/CGAL-4.6/include/CGAL/Vector_3.h
deleted file mode 100644
index e76e0a4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Vector_3.h
+++ /dev/null
@@ -1,334 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
-
-#ifndef CGAL_VECTOR_3_H
-#define CGAL_VECTOR_3_H
-
-#include <CGAL/Origin.h>
-#include <CGAL/Kernel/mpl.h>
-#include <CGAL/representation_tags.h>
-#include <CGAL/assertions.h>
-#include <boost/type_traits/is_same.hpp>
-#include <CGAL/Kernel/Return_base_tag.h>
-#include <CGAL/Dimension.h>
-
-namespace CGAL {
-
-template <class R_>
-class Vector_3 : public R_::Kernel_base::Vector_3
-{
-  typedef typename R_::RT                    RT;
-// http://www.cgal.org/Members/Manual_test/LAST/Developers_internal_manual/Developers_manual/Chapter_code_format.html#sec:programming_conventions
-  typedef typename R_::FT                    FT_;
-  typedef typename R_::Segment_3             Segment_3;
-  typedef typename R_::Ray_3                 Ray_3;
-  typedef typename R_::Line_3                Line_3;
-  typedef typename R_::Point_3               Point_3;
-  typedef typename R_::Direction_3           Direction_3;
-  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
-
-  typedef Vector_3                            Self;
-  CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_3>::value));
-
-public:
-
-  typedef Dimension_tag<3>  Ambient_dimension;
-  typedef Dimension_tag<0>  Feature_dimension;
-
-  typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator;
-  typedef typename R_::Kernel_base::Vector_3      Rep;
-
-  const Rep& rep() const
-  {
-    return *this;
-  }
-
-  Rep& rep()
-  {
-    return *this;
-  }
-
-  typedef          R_                       R;
-
-  Vector_3() {}
-
-  Vector_3(const Rep& v)
-      : Rep(v) {}
-
-  Vector_3(const Point_3& a, const Point_3& b)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), a, b)) {}
-
-  explicit Vector_3(const Segment_3& s)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), s)) {}
-
-  explicit Vector_3(const Ray_3& r)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), r)) {}
-
-  explicit Vector_3(const Line_3& l)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), l)) {}
-
-  Vector_3(const Null_vector& v)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), v)) {}
-
-  template < typename T1, typename T2, typename T3 >
-  Vector_3(const T1 &x, const T2 &y, const T3 &z)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z)) {}
-
-  Vector_3(const RT& x, const RT& y, const RT& z, const RT& w)
-    : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z, w)) {}
-
-  Direction_3 direction() const
-  {
-    return R().construct_direction_3_object()(*this);
-  }
-
-  Vector_3 transform(const Aff_transformation_3 &t) const
-  {
-    return t.transform(*this);
-  }
-
-  Vector_3 operator-() const
-  {
-    return R().construct_opposite_vector_3_object()(*this);
-  }
-
-  Vector_3 operator-(const Vector_3& v) const
-  {
-    return R().construct_difference_of_vectors_3_object()(*this,v);
-  }
-
-  Vector_3 operator+(const Vector_3& v) const
-  {
-    return R().construct_sum_of_vectors_3_object()(*this,v);
-  }
-
-  Vector_3 operator/(const RT& c) const
-  {
-   return R().construct_divided_vector_3_object()(*this,c);
-  }
-
-  Vector_3 operator/(const typename First_if_different<FT_,RT>::Type & c) const
-  {
-   return R().construct_divided_vector_3_object()(*this,c);
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
-  x() const
-  {
-    return R().compute_x_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_y_3(Vector_3)>::type
-  y() const
-  {
-    return R().compute_y_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_z_3(Vector_3)>::type
-  z() const
-  {
-    return R().compute_z_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hx_3(Vector_3)>::type
-  hx() const
-  {
-    return R().compute_hx_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hy_3(Vector_3)>::type
-  hy() const
-  {
-    return R().compute_hy_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hz_3(Vector_3)>::type
-  hz() const
-  {
-    return R().compute_hz_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_hw_3(Vector_3)>::type
-  hw() const
-  {
-    return R().compute_hw_3_object()(*this);
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
-  cartesian(int i) const
-  {
-    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
-    if (i==0) return x();
-    if (i==1) return y();
-    return z();
-  }
-
-  typename cpp11::result_of<typename R::Compute_hw_3(Vector_3)>::type
-  homogeneous(int i) const
-  {
-    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
-    if (i==0) return hx();
-    if (i==1) return hy();
-    if (i==2) return hz();
-    return hw();
-  }
-
-  int dimension() const
-  {
-      return 3;
-  }
-
-  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
-  operator[](int i) const
-  {
-      return cartesian(i);
-  }
-
-  Cartesian_const_iterator cartesian_begin() const
-  {
-    return typename R::Construct_cartesian_const_iterator_3()(*this);
-  }
-
-  Cartesian_const_iterator cartesian_end() const
-  {
-    return typename R::Construct_cartesian_const_iterator_3()(*this,3);
-  }
-
-  typename cpp11::result_of<typename R::Compute_squared_length_3(Vector_3)>::type
-  squared_length() const
-  {
-    return R().compute_squared_length_3_object()(*this);
-  }
-
-};
-
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Vector_3<R>& v, const Cartesian_tag&) 
-{
-  switch(os.iword(IO::mode)) {
-    case IO::ASCII :
-      return os << v.x() << ' ' << v.y()  << ' ' << v.z();
-    case IO::BINARY :
-      write(os, v.x());
-      write(os, v.y());
-      write(os, v.z());
-      return os;
-    default:
-      os << "VectorC3(" << v.x() << ", " << v.y() <<  ", " << v.z() << ")";
-      return os;
-  }
-}
-
-template <class R >
-std::ostream&
-insert(std::ostream& os, const Vector_3<R>& v, const Homogeneous_tag&)
-{
-  switch(os.iword(IO::mode))
-  {
-    case IO::ASCII :
-        return os << v.hx() << ' ' << v.hy() << ' ' << v.hz() << ' ' << v.hw();
-    case IO::BINARY :
-        write(os, v.hx());
-        write(os, v.hy());
-        write(os, v.hz());
-        write(os, v.hw());
-        return os;
-    default:
-        return os << "VectorH3(" << v.hx() << ", "
-                                 << v.hy() << ", "
-                                 << v.hz() << ", "
-                                 << v.hw() << ')';
-  }
-}
-
-template < class R >
-std::ostream&
-operator<<(std::ostream& os, const Vector_3<R>& v)
-{
-  return insert(os, v, typename R::Kernel_tag() );
-}
-
-
-template <class R >
-std::istream&
-extract(std::istream& is, Vector_3<R>& v, const Cartesian_tag&) 
-{
-  typename R::FT x, y, z;
-  switch(is.iword(IO::mode)) {
-    case IO::ASCII :
-      is >> iformat(x) >> iformat(y) >> iformat(z);
-      break;
-    case IO::BINARY :
-      read(is, x);
-      read(is, y);
-      read(is, z);
-      break;
-    default:
-      std::cerr << "" << std::endl;
-      std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-      break;
-  }
-  if (is)
-      v = Vector_3<R>(x, y, z);
-  return is;
-}
-
-template <class R >
-std::istream&
-extract(std::istream& is, Vector_3<R>& v, const Homogeneous_tag&) 
-{
-  typename R::RT hx, hy, hz, hw;
-  switch(is.iword(IO::mode))
-  {
-    case IO::ASCII :
-        is >> hx >> hy >> hz >> hw;
-        break;
-    case IO::BINARY :
-        read(is, hx);
-        read(is, hy);
-        read(is, hz);
-        read(is, hw);
-        break;
-    default:
-        std::cerr << "" << std::endl;
-        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
-        break;
-  }
-  if (is)
-    v = Vector_3<R>(hx, hy, hz, hw);
-  return is;
-}
-
-template < class R >
-std::istream&
-operator>>(std::istream& is, Vector_3<R>& v)
-{
-  return extract(is, v, typename R::Kernel_tag() );
-}
-
-} //namespace CGAL
-
-#endif // CGAL_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2.h b/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2.h
deleted file mode 100644
index 6c6ad79..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2.h
+++ /dev/null
@@ -1,829 +0,0 @@
-// Copyright (c) 2006 Foundation for Research and Technology-Hellas (Greece).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
-
-#ifndef CGAL_VORONOI_DIAGRAM_2_H
-#define CGAL_VORONOI_DIAGRAM_2_H 1
-
-#include <CGAL/Voronoi_diagram_2/basic.h>
-#include <CGAL/iterator.h>
-#include <CGAL/Iterator_project.h>
-#include <CGAL/circulator.h>
-#include <CGAL/tags.h>
-
-#include <iostream>
-#include <iterator>
-
-#include <CGAL/Voronoi_diagram_2/Halfedge.h>
-#include <CGAL/Voronoi_diagram_2/Face.h>
-#include <CGAL/Voronoi_diagram_2/Vertex.h>
-#include <CGAL/Voronoi_diagram_2/Circulator_adaptors.h>
-#include <CGAL/Voronoi_diagram_2/Iterator_adaptors.h>
-#include <CGAL/Voronoi_diagram_2/Handle_adaptor.h>
-#include <CGAL/Voronoi_diagram_2/Validity_testers.h>
-#include <CGAL/Voronoi_diagram_2/Unbounded_faces.h>
-#include <CGAL/Voronoi_diagram_2/Unbounded_edges.h>
-#include <CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h>
-#include <CGAL/Voronoi_diagram_2/Connected_components.h>
-#include <CGAL/Voronoi_diagram_2/Accessor.h>
-
-#include <CGAL/Identity_policy_2.h>
-
-#include <boost/variant.hpp>
-
-namespace CGAL {
-
-//=========================================================================
-//=========================================================================
-//=========================================================================
-
-template<class DG, class AT, class AP = Identity_policy_2<DG,AT> >
-class Voronoi_diagram_2
-{
- private:
-  typedef Voronoi_diagram_2<DG,AT,AP>        Self;
-  typedef Triangulation_cw_ccw_2             CW_CCW_2;
-
-  friend class CGAL_VORONOI_DIAGRAM_2_INS::Accessor<Self>;
- public:
-  //-------
-  // TYPES
-  //-------
-
-  // TYPES FOR THE DUAL GRAPH
-
-  // the (triangulated) dual graph
-  typedef DG                                          Delaunay_graph;
-  typedef AT                                          Adaptation_traits;
-  typedef AP                                          Adaptation_policy;
-
-  typedef typename Delaunay_graph::Geom_traits        Delaunay_geom_traits;
-
-  typedef typename Delaunay_graph::size_type          size_type;
-
-  typedef typename Delaunay_graph::Vertex_handle      Delaunay_vertex_handle;
-  typedef typename Delaunay_graph::Face_handle        Delaunay_face_handle;
-  typedef typename Delaunay_graph::Edge               Delaunay_edge;
-
- protected:
-  typedef typename Delaunay_graph::Edge_circulator    Dual_edge_circulator;
-  typedef typename Delaunay_graph::Vertex_circulator  Dual_vertex_circulator;
-  typedef typename Delaunay_graph::Face_circulator    Dual_face_circulator;
-
-  typedef typename Delaunay_graph::Finite_vertices_iterator 
-  Dual_vertices_iterator;
-
-  typedef typename Delaunay_graph::Finite_faces_iterator
-  Dual_faces_iterator;
-
-  typedef typename Delaunay_graph::Finite_edges_iterator
-  Dual_edges_iterator;
-  typedef typename Delaunay_graph::All_edges_iterator
-  All_dual_edges_iterator;
-
- protected:
-  // TYPES FOR THE DEGENERACY TESTERS
-  typedef typename Adaptation_policy::Has_site_inserter  Has_site_inserter;
-  typedef typename Adaptation_policy::Has_site_remover   Has_site_remover;
-
-  typedef typename Adaptation_policy::Edge_rejector
-  Edge_rejector;
-
-  typedef typename Adaptation_policy::Face_rejector
-  Face_rejector;
-
- protected:
-  // DEGENERACY TESTER BINDERS
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_rejector_binder<Self>
-  Edge_rejector_binder;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_rejector_binder<Self>
-  Face_rejector_binder;
-
-  // ITERATORS FOR EDGES
-  typedef Filter_iterator<Dual_edges_iterator,Edge_rejector_binder>
-  Non_degenerate_edges_iterator;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_iterator_adaptor
-  <Self,Non_degenerate_edges_iterator>
-  Edge_iterator_base;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_validity_tester
-  <Self,Edge_iterator_base>
-  Edge_validity_tester;
-
-  typedef Filter_iterator<Edge_iterator_base,Edge_validity_tester>
-  Valid_edges_iterator;
-
- public:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_iterator_adaptor
-  <Self,Valid_edges_iterator,Tag_false>
-  Edge_iterator;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
-  <Self,Edge_iterator>
-  Halfedge_iterator;
-
-  // THE HALFEDGE
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge<Self>     Halfedge;
-
- protected:
-  // ITERATORS FOR FACES
-  typedef Filter_iterator<Dual_vertices_iterator,Face_rejector_binder>
-  Non_degenerate_faces_iterator;
-
- public:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
-  <Self,Non_degenerate_faces_iterator>
-  Face_iterator;
-
-  // THE FACE
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face<Self>         Face;
-
- protected:
-  // ITERATORS FOR VERTICES
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex_validity_tester<Self>
-  Vertex_validity_tester;
-
-  typedef Filter_iterator<Dual_faces_iterator,Vertex_validity_tester>
-  Non_degenerate_vertices_iterator;
-
- public:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex_iterator_adaptor
-  <Self,Non_degenerate_vertices_iterator>
-  Vertex_iterator;
-
-  // THE VERTEX
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex<Self>       Vertex;
-
- public:
-  // HANDLES
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Halfedge>  Halfedge_handle;
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Vertex>    Vertex_handle;
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Face>      Face_handle;
-
-  // CIRCULATORS
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_around_vertex_circulator_adaptor
-  <Halfedge>
-  Halfedge_around_vertex_circulator;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Ccb_halfedge_circulator_adaptor
-  <Halfedge>
-  Ccb_halfedge_circulator;
-
-  // THE BOUNDED AND UNBOUNDED FACES ITERATOR
- protected:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Bounded_face_tester
-  <Self,Non_degenerate_faces_iterator>
-  Bounded_face_tester;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Unbounded_face_tester
-  <Self,Non_degenerate_faces_iterator>
-  Unbounded_face_tester;
-
- protected:
-  typedef
-  Filter_iterator<Non_degenerate_faces_iterator,Bounded_face_tester>
-  Unbounded_faces_iterator_base;
-
-  typedef
-  Filter_iterator<Non_degenerate_faces_iterator,Unbounded_face_tester>
-  Bounded_faces_iterator_base;
-
- public:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
-  <Self,Unbounded_faces_iterator_base>
-  Unbounded_faces_iterator;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
-  <Self,Bounded_faces_iterator_base>
-  Bounded_faces_iterator;
-
-  // THE BOUNDED AND UNBOUNDED HALFEDGES ITERATOR
- protected:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Bounded_edge_tester
-  <Self,Edge_iterator>
-  Bounded_edge_tester;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Unbounded_edge_tester
-  <Self,Edge_iterator>
-  Unbounded_edge_tester;
-
- protected:
-  typedef
-  Filter_iterator<Edge_iterator,Bounded_edge_tester>
-  Unbounded_edges_iterator_base;
-
-  typedef
-  Filter_iterator<Edge_iterator,Unbounded_edge_tester>
-  Bounded_edges_iterator_base;
-
- public:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
-  <Self,Unbounded_edges_iterator_base>
-  Unbounded_halfedges_iterator;
-
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
-  <Self,Bounded_edges_iterator_base>
-  Bounded_halfedges_iterator;
-
-  // GENERATOR ITERATOR
- protected:
-  struct Project_site_2
-  {
-    typedef typename Adaptation_traits::Site_2  Site_2;
-    typedef Face                                argument_type;
-    typedef Site_2                              result_type;
-
-    Site_2& operator()(const Face& f) const {
-      static Site_2 s;
-      // here we construct an adaptation traits; ideally we should get
-      // the adaptation traits from the outer class
-      s = Adaptation_traits().access_site_2_object()(f.dual());
-      return s;
-    }
-  };
-
- public:
-  typedef Iterator_project<Face_iterator,Project_site_2>
-  Site_iterator;
-
-  // ACCESSOR
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Accessor<Self>  Accessor;
-
-protected:
-  // POINT LOCATION RELATED TYPES
-  typedef typename Adaptation_traits::Has_nearest_site_2  Has_nearest_site_2;
-public:
-  typedef typename Adaptation_traits::Point_2             Point_2;
-
-  typedef boost::variant<Face_handle,Halfedge_handle,Vertex_handle>
-  Locate_result;
-
-private:
-  typedef CGAL_VORONOI_DIAGRAM_2_INS::Find_valid_vertex<Self>
-  Find_valid_vertex;
-
-public:
-  //--------------
-  // CONSTRUCTORS
-  //--------------
-  Voronoi_diagram_2(const Adaptation_traits& at = Adaptation_traits(),
-		    const Adaptation_policy& ap = Adaptation_policy(),
-		    const Delaunay_geom_traits& gt = Delaunay_geom_traits())
-    : dual_(gt), ap_(ap), at_(at) {}
-
-  Voronoi_diagram_2(const Delaunay_graph& dg, bool swap_dg = false,
-		    const Adaptation_traits& at = Adaptation_traits(),
-		    const Adaptation_policy& ap = Adaptation_policy())
-    : dual_(), ap_(ap), at_(at) {
-    if ( swap_dg ) {
-      dual_.swap(const_cast<Delaunay_graph&>(dg));
-    } else {
-      dual_ = dg;
-    }
-  }
-
-  template<class Iterator>
-  Voronoi_diagram_2(Iterator first, Iterator beyond,
-		    const Adaptation_traits& at = Adaptation_traits(),
-		    const Adaptation_policy& ap = Adaptation_policy(),
-		    const Delaunay_geom_traits& gt = Delaunay_geom_traits())
-    : dual_(first, beyond, gt), ap_(ap), at_(at) {}
-
-  Voronoi_diagram_2(const Voronoi_diagram_2& other)
-    : dual_(other.dual_), ap_(other.ap_), at_(other.at_) {}
-
-  Self& operator=(const Self& other) {
-    dual_ = other.dual_;
-    ap_ = other.ap_;
-    at_ = other.at_;
-    return *this;
-  }
-
-public:
-  //------------------
-  // ACCESS FUNCTIONS
-  //------------------
-
-  // VORONOI FEATURES FROM DELAUNAY FEATURES
-  Halfedge_handle dual(const Delaunay_edge& e) const {
-    return Halfedge_handle( Halfedge(this, e.first, e.second) );
-  }
-
-  Face_handle dual(Delaunay_vertex_handle v) const {
-    return Face_handle( Face(this, v) );
-  }
-
-  Vertex_handle dual(Delaunay_face_handle f) const {
-    return Vertex_handle( Vertex(this, f) );
-  }
-
-  // DUAL
-  const Delaunay_graph& dual() const { return dual_; }
-
-  // VORONOI TRAITS
-  const Adaptation_traits& adaptation_traits() const { return at_; }
-
-  // ADAPTATION POLICY
-  const Adaptation_policy& adaptation_policy() const { return ap_; }
-
-  // SIZE RELATED METHODS
-  size_type number_of_vertices() const {
-    size_type num_v = 0;
-    for (Vertex_iterator it = vertices_begin();	it != vertices_end();
-	 ++it, ++num_v) {}
-    return num_v;
-  }
-
-  size_type number_of_faces() const {
-    size_type num_f = 0;
-    for (Face_iterator it = faces_begin(); it != faces_end();
-	 ++it, ++num_f) {}
-    return num_f;
-  }
-
-  size_type number_of_halfedges() const {
-    size_type num_h = 0;
-    for (Halfedge_iterator it = halfedges_begin(); it != halfedges_end();
-	 ++it, ++num_h) {}
-    return num_h;
-  }
-
-  size_type number_of_connected_components() const {
-    return CGAL_VORONOI_DIAGRAM_2_INS::Connected_components<Self>()(*this);
-  }
-
-  // DEGENERACY TESTERS -- THESE ARE UNDOCUMENTED
-
-  // MAYBE THE FOLLOWING TWO METHODS SHOULD BE PRIVATE AND ACCESSED
-  // ONLY THROUGH THE ACCESSOR
-  const Edge_rejector& edge_rejector() const {
-    return ap_.edge_rejector_object();
-  }
-
-  const Face_rejector& face_rejector() const {
-    return ap_.face_rejector_object();
-  }
-
-  // UNBOUNDED/BOUNDED FACE
-  Face_handle unbounded_face() const {
-    if ( unbounded_faces_begin() != unbounded_faces_end() ) {
-      return unbounded_faces_begin();
-    }
-    return Face_handle();
-  }
-
-  Face_handle bounded_face() const {
-    if ( bounded_faces_begin() != bounded_faces_end() ) {
-      return bounded_faces_begin();
-    }
-    return Face_handle();
-  }
-
-  // UNBOUNDED/BOUNDED EDGE
-  Halfedge_handle unbounded_halfedge() const {
-    if ( unbounded_halfedges_begin() != unbounded_halfedges_end() ) {
-      return unbounded_halfedges_begin();
-    }
-    return Halfedge_handle();
-  }
-
-  Halfedge_handle bounded_halfedge() const {
-    if ( bounded_halfedges_begin() != bounded_halfedges_end() ) {
-      return bounded_halfedges_begin();
-    }
-    return Halfedge_handle();
-  }
-
-  // FACE ITERATORS
- private:
-  Non_degenerate_faces_iterator non_degenerate_faces_begin() const {
-    return CGAL::filter_iterator( dual_.finite_vertices_end(),
-				  Face_rejector_binder(this),
-				  dual_.finite_vertices_begin() );
-  }
-
-  Non_degenerate_faces_iterator non_degenerate_faces_end() const {
-    return CGAL::filter_iterator( dual_.finite_vertices_end(),
-				  Face_rejector_binder(this) );
-  }
-
- public:
-  Face_iterator faces_begin() const {
-    return Face_iterator(this, non_degenerate_faces_begin());
-  }
-
-  Face_iterator faces_end() const {
-    return Face_iterator(this, non_degenerate_faces_end());
-  }
-
- private:
-  Unbounded_faces_iterator_base unbounded_faces_base_begin() const {
-    return CGAL::filter_iterator( non_degenerate_faces_end(),
-				  Bounded_face_tester(this),
-				  non_degenerate_faces_begin() );
-  }
-
-  Unbounded_faces_iterator_base unbounded_faces_base_end() const {
-    return CGAL::filter_iterator( non_degenerate_faces_end(),
-				  Bounded_face_tester(this) );
-  }
-
-  Bounded_faces_iterator_base bounded_faces_base_begin() const {
-    return CGAL::filter_iterator( non_degenerate_faces_end(),
-				  Unbounded_face_tester(this),
-				  non_degenerate_faces_begin() );
-  }
-
-  Bounded_faces_iterator_base bounded_faces_base_end() const {
-    return CGAL::filter_iterator( non_degenerate_faces_end(),
-				  Unbounded_face_tester(this) );
-  }
-
- public:
-  Unbounded_faces_iterator unbounded_faces_begin() const {
-    return Unbounded_faces_iterator(this, unbounded_faces_base_begin());
-  }
-
-  Unbounded_faces_iterator unbounded_faces_end() const {
-    return Unbounded_faces_iterator(this, unbounded_faces_base_end());
-  }
-
-  Bounded_faces_iterator bounded_faces_begin() const {
-    return Bounded_faces_iterator(this, bounded_faces_base_begin());
-  }
-
-  Bounded_faces_iterator bounded_faces_end() const {
-    return Bounded_faces_iterator(this, bounded_faces_base_end());
-  }
-
-  // EDGE ITERATORS
- private:
-  Non_degenerate_edges_iterator non_degenerate_edges_begin() const {
-    return CGAL::filter_iterator( dual_.finite_edges_end(),
-				  Edge_rejector_binder(this),
-				  dual_.finite_edges_begin() );
-  }
-
-  Non_degenerate_edges_iterator non_degenerate_edges_end() const {
-    return CGAL::filter_iterator( dual_.finite_edges_end(),
-				  Edge_rejector_binder(this) );
-  }
-
-
-  Edge_iterator_base edges_base_begin() const {
-    return Edge_iterator_base(this, non_degenerate_edges_begin());
-  }
-
-  Edge_iterator_base edges_base_end() const {
-    return Edge_iterator_base(this, non_degenerate_edges_end());
-  }
-
-  Valid_edges_iterator valid_edges_begin() const {
-    return CGAL::filter_iterator( edges_base_end(),
-				  Edge_validity_tester(this),
-				  edges_base_begin() );
-  }
-
-  Valid_edges_iterator valid_edges_end() const {
-    return CGAL::filter_iterator( edges_base_end(),
-				  Edge_validity_tester(this) );
-  }
-
- public:
-  Edge_iterator edges_begin() const {
-    return Edge_iterator(this, valid_edges_begin());
-  }
-
-  Edge_iterator edges_end() const {
-    return Edge_iterator(this, valid_edges_end());
-  }
-
-  Halfedge_iterator halfedges_begin() const {
-    return Halfedge_iterator(this, edges_begin());
-  }
-
-  Halfedge_iterator halfedges_end() const {
-    return Halfedge_iterator(this, edges_end());
-  }
-
- protected:
-  Unbounded_edges_iterator_base unbounded_edges_base_begin() const {
-    return CGAL::filter_iterator( edges_end(),
-				  Bounded_edge_tester(this),
-				  edges_begin() );
-  }
-
-  Unbounded_edges_iterator_base unbounded_edges_base_end() const {
-    return CGAL::filter_iterator( edges_end(),
-				  Bounded_edge_tester(this) );
-  }
-
-  Bounded_edges_iterator_base bounded_edges_base_begin() const {
-    return CGAL::filter_iterator( edges_end(),
-				  Unbounded_edge_tester(this),
-				  edges_begin() );
-  }
-
-  Bounded_edges_iterator_base bounded_edges_base_end() const {
-    return CGAL::filter_iterator( edges_end(),
-				  Unbounded_edge_tester(this) );
-  }
-
- public:
-  Unbounded_halfedges_iterator unbounded_halfedges_begin() const {
-    return Unbounded_halfedges_iterator(this, unbounded_edges_base_begin());
-  }
-
-  Unbounded_halfedges_iterator unbounded_halfedges_end() const {
-    return Unbounded_halfedges_iterator(this, unbounded_edges_base_end());
-  }
-
-  Bounded_halfedges_iterator bounded_halfedges_begin() const {
-    return Bounded_halfedges_iterator(this, bounded_edges_base_begin());
-  }
-
-  Bounded_halfedges_iterator bounded_halfedges_end() const {
-    return Bounded_halfedges_iterator(this, bounded_edges_base_end());
-  }
-
-  // VERTEX ITERATORS
- private:
-  Non_degenerate_vertices_iterator non_degenerate_vertices_begin() const {
-    return CGAL::filter_iterator( dual_.finite_faces_end(),
-				  Vertex_validity_tester(this),
-				  dual_.finite_faces_begin() );
-  }
-
-  Non_degenerate_vertices_iterator non_degenerate_vertices_end() const {
-    return CGAL::filter_iterator( dual_.finite_faces_end(),
-				  Vertex_validity_tester(this) );
-  }
-
- public:
-  Vertex_iterator vertices_begin() const {
-    return Vertex_iterator(this, non_degenerate_vertices_begin());
-  }
-
-  Vertex_iterator vertices_end() const {
-    return Vertex_iterator(this, non_degenerate_vertices_end());
-  }
-
-  // SITE ITERATOR
-  Site_iterator sites_begin() const {
-    return Site_iterator(faces_begin());    
-  }
-
-  Site_iterator sites_end() const {
-    return Site_iterator(faces_end());
-  }
-
-  // CIRCULATORS
-  Ccb_halfedge_circulator ccb_halfedges(const Face_handle& f) const {
-    return Ccb_halfedge_circulator(*f->halfedge());
-  }
-
-  Ccb_halfedge_circulator ccb_halfedges(const Face_handle& f,
-					const Halfedge_handle& he) const {
-    CGAL_precondition( he->face() == f );
-    return Ccb_halfedge_circulator(*he);
-  }
-
-
-  Halfedge_around_vertex_circulator
-  incident_halfedges(const Vertex_handle& v) const {
-    return incident_halfedges(v, v->halfedge());
-  }
-
-  Halfedge_around_vertex_circulator
-  incident_halfedges(const Vertex_handle& v, const Halfedge_handle& he) const {
-    internal::use(v);
-    CGAL_precondition( he->target() == v );
-    return Halfedge_around_vertex_circulator(*he);
-  }
-
-  // POINT LOCATION
-  //---------------
- private:
-  Locate_result locate(const Point_2& , const Tag_false&) const {
-    static unsigned int i = 0;
-    if ( i == 0 ) {
-      i++;
-      std::cerr << "Point location is not supported..." << std::endl;
-    }
-
-    // to avoid warnings/errors...
-    //    Face_handle f;
-    return Locate_result();
-  }
-
-  Locate_result locate(const Point_2& p, const Tag_true&) const
-  {
-    CGAL_precondition( dual_.number_of_vertices() > 0 );
-
-    typedef typename Adaptation_traits::Nearest_site_2  Nearest_site_2;
-    typedef typename Nearest_site_2::result_type        Query_result;
-
-    Nearest_site_2 nearest_site = at_.nearest_site_2_object();
-    Query_result ns_qr = nearest_site(dual_, p);
-
-    if ( const Delaunay_vertex_handle* dv =
-	 boost::get<Delaunay_vertex_handle>(&ns_qr) ) {
-      return Face_handle( Face(this, *dv) );
-    } else if ( const Delaunay_face_handle *df =
-		boost::get<Delaunay_face_handle>(&ns_qr) ) {
-      Find_valid_vertex vertex_finder;
-      Delaunay_face_handle dfvalid = vertex_finder(this, *df);
-      return Vertex_handle( Vertex(this, dfvalid) );
-    } else if ( const Delaunay_edge* de =
-		boost::get<Delaunay_edge>(&ns_qr) ) {
-      CGAL_assertion(  !edge_rejector()(dual_, *de)  );
-      if ( dual_.dimension() == 1 ) {
-	Delaunay_vertex_handle v1 =
-	  de->first->vertex(CW_CCW_2::ccw(de->second));
-	Delaunay_vertex_handle v2 =
-	  de->first->vertex(CW_CCW_2::cw(de->second) );
-	return Halfedge_handle( Halfedge(this, v1, v2) );
-      }
-      return Halfedge_handle( Halfedge(this, de->first, de->second) );
-    }
-
-    // I should never have reached this line;
-    CGAL_error();
-    return Locate_result();
-  }
-
- public:
-  Locate_result locate(const Point_2& p) const {
-    return locate(p, Has_nearest_site_2());
-  }
-
-
-  // VALIDITY TESTING
-  //-----------------
-  bool is_valid() const {
-    bool valid = dual_.is_valid();
-    valid = valid && ap_.is_valid();
-    valid = valid && ap_.is_valid(dual_);
-
-    for (Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) {
-      valid = valid && it->is_valid();
-    }
-
-    for (Face_iterator it = faces_begin(); it != faces_end(); ++it) {
-      valid = valid && it->is_valid();
-    }
-
-    for (Halfedge_iterator it = halfedges_begin(); it != halfedges_end();
-	 ++it) {
-      valid = valid && it->is_valid();
-    }
-
-    return valid;
-  }
-  
-  // I/O
-  //----
- public:
-  void file_output(std::ostream& os) const { os << dual_; }
-  void file_input(std::istream& is) { is >> dual_; }
-
-  // MISCALLANEOUS
-  //--------------
- public:
-  void clear() {
-    dual_.clear();
-    ap_.clear();
-  }
-
-  void swap(Self& other) {
-    dual_.swap(other.dual_);
-    ap_.swap(other.ap_);
-  }
-
-  // ACCESSOR
-  //---------
-  Accessor accessor() const { return Accessor(this); }
-  Accessor accessor() { return Accessor(this); }
-
- private:
-  Delaunay_graph  dual_;
-  Adaptation_policy ap_;
-  Adaptation_traits at_;
-
- protected:
-  Delaunay_edge opposite(const Delaunay_edge& e) const {
-    int i_mirror = dual_.tds().mirror_index(e.first, e.second);
-    return Dual_edge( e.first->neighbor(e.second), i_mirror );
-  }
-
- public:
-  typedef typename Adaptation_traits::Site_2     Site_2;
-
- protected:
-  // insert is supported...
-  inline Face_handle insert(const Site_2& t, const Tag_true&) {
-    Delaunay_vertex_handle v = ap_.site_inserter_object()(dual_, t);
-    if ( v == Delaunay_vertex_handle() ) { return Face_handle(); }
-    return Face_handle( Face(this, v) );
-  }
-
-  // insert is not really supported...
-  inline Face_handle insert(const Site_2& t, const Tag_false&) {
-    INSERT_IS_NOT_SUPPORTED(t);
-    return Face_handle();
-  }
-
- public:
-  inline Face_handle insert(const Site_2& t) {
-#if 0
-    // THE FOLLOWING LINE MAY BE ADDED FOR DEBUGGING PURPOSES
-    for (Halfedge_iterator it=halfedges_begin();it!=halfedges_end();++it) ;
-#endif
-    return insert(t, Has_site_inserter());
-  }
-
-  template<class Iterator>
-  inline size_type insert(Iterator first, Iterator beyond) {
-    size_type counter = 0;
-    for (Iterator it = first; it != beyond; ++it, ++counter) {
-      insert(*it);
-    }
-    return counter;
-  }
-
-#if 0
- // REMOVAL IS NOT READY YET
- protected:
-  void update_cached_testers(const Face_handle& f, const Tag_true&)
-  {
-    // HERE WE ALSO NEED TO ACCOUNT FOR THE DELETED VERTEX. THE
-    // DELETED VERTEX CAN AFFECT THE CACHED FACE DEGENERACY TESTER
-    Dual_vertex_handle v = f->dual();
-    Dual_edge_circulator ec_start = dual_.incident_edges(v);
-    Dual_edge_circulator ec = ec_start;
-    do {
-      cached_e_tester_.erase(*ec);
-    } while ( ++ec != ec_start );
-  }
-
-  void update_cached_testers(const Face_handle& f, const Tag_false&) {}
-
-  void remove(const Face_handle& f, const Tag_true&) {
-    if ( f == Face_handle() ) { return; }
-    update_cached_testers(f, !Has_insert() && Has_get_conflicts());
-    dual_.remove(f->dual());
-  }
-
-  void remove(const Face_handle& f, const Tag_false&) {
-    REMOVE_IS_NOT_SUPPORTED(f);
-  }
-
- public:
-  inline void remove(const Face_handle& f) {
-    return remove(f, Has_remove());
-  }
-#endif
-};
-
-
-// I/O OPERATORS
-//--------------
-template<class DG, class AT, class AP>
-std::ostream& operator<<(std::ostream& os,
-			 const Voronoi_diagram_2<DG,AT,AP>& vd)
-{
-  vd.file_output(os);
-  return os;
-}
-
-
-template<class DG, class AT, class AP>
-std::istream& operator>>(std::istream& is,
-			 Voronoi_diagram_2<DG,AT,AP>& vd)
-{
-  vd.file_input(is);
-  return is;
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_VORONOI_DIAGRAM_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_point.h b/3rdparty/CGAL-4.6/include/CGAL/Weighted_point.h
deleted file mode 100644
index 4aed838..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/Weighted_point.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) 1999-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Mariette Yvinec
-//                 Sylvain Pion
-
-#ifndef CGAL_WEIGHTED_POINT_H
-#define CGAL_WEIGHTED_POINT_H
-
-#include <iostream>
-#include <CGAL/Kernel_traits.h>
-#include <CGAL/Dimension.h>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/logical.hpp>
-
-namespace CGAL {
-
-template < class Pt, class We >
-class Weighted_point : public Pt
-{
-  typedef typename Kernel_traits<Pt>::Kernel::FT FT;
-public:
-  typedef We Weight;
-  typedef Pt Point;
-
-  Weighted_point ()
-      : Point(), _weight(0) {}
-
-  //explicit
-  Weighted_point (const Point &p)
-      : Point(p), _weight(0)
-  {
-    // CGAL_error_msg( "Warning : truncated weight !!!");
-  }
-
-  Weighted_point (const Point &p, const Weight &w)
-      : Point(p), _weight(w) {}
-
-
-  // Constructors from coordinates are also provided for convenience, except
-  // that they are only from Cartesian coordinates, and with no weight, so as
-  // to avoid any potential ambiguity between the homogeneous weight and the
-  // power weight (it should be easy enough to pass a Point explicitly in those
-  // cases).
-  // The enable_if complexity comes from the fact that we separate dimension 2 and 3.
-
-  template < typename Tx, typename Ty >
-  Weighted_point (const Tx &x, const Ty &y,
-	          typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
-					                      boost::is_convertible<Ty, FT>,
-							      boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 2> > >::type* = 0)
-      : Point(x, y), _weight(0) {}
-
-  template < typename Tx, typename Ty, typename Tz >
-  Weighted_point (const Tx &x, const Ty &y, const Tz &z,
-	          typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
-					                      boost::is_convertible<Ty, FT>,
-					                      boost::is_convertible<Tz, FT>,
-							      boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 3> > >::type* = 0)
-      : Point(x, y, z), _weight(0) {}
-
-  const Point & point() const
-  {
-      return *this;
-  }
-
-  const Weight & weight() const
-  {
-      return _weight;
-  }
-
-// The following power() member functions are not used at the moment.
-// They belong to the traits class anyway.
-//
-//  Weight power(const Point &p)
-//  {	
-//      return squared_distance(*this, p) - weight();
-//  }
-// 
-//  Weight power(const Weighted_point &p)
-//  {	
-//      return squared_distance(*this, p) - weight() - p.weight();
-//  }
-
-private:
-  Weight _weight;
-};
-
-
-template < class Point, class Weight >
-std::ostream &
-operator<<(std::ostream &os, const Weighted_point<Point,Weight> &p)
-{
-  switch(os.iword(IO::mode))
-  {
-  case IO::ASCII :
-    return os << p.point() <<  " " << p.weight();
-  case IO::BINARY :
-    os << p.point();
-    write(os, p.weight());
-    return os;
-  default:
-    return os << "Weighted_point(" << p.point() << ", " << p.weight() << ")";
-  }
-}
-
-template < class Point, class Weight >
-std::istream &
-operator>>(std::istream &is, Weighted_point<Point,Weight> &wp)
-{
-  Weight w;
-  Point p;
-  is >> p;
-  if(!is) return is;
-  if(is_ascii(is))
-    is >> w;
-  else
-    read(is, w);
-  if (is)
-    wp = Weighted_point<Point,Weight>(p,w);
-  return is;
-}
-
-} // namespace CGAL
-
-#endif // CGAL_WEIGHTED_POINT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/aff_transformation_tags.h b/3rdparty/CGAL-4.6/include/CGAL/aff_transformation_tags.h
deleted file mode 100644
index 7e6b833..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/aff_transformation_tags.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
- 
-
-#ifndef CGAL_AFF_TRANSFORMATION_TAGS_H
-#define CGAL_AFF_TRANSFORMATION_TAGS_H
-
-#include <CGAL/basic.h>
-
-namespace CGAL {
-
-class Translation {};
-class Rotation {};
-class Scaling {};
-class Reflection {};
-class Identity_transformation {};
-
-CGAL_EXPORT extern const Translation             TRANSLATION;
-CGAL_EXPORT extern const Rotation                ROTATION;
-CGAL_EXPORT extern const Scaling                 SCALING;
-CGAL_EXPORT extern const Reflection              REFLECTION;
-CGAL_EXPORT extern const Identity_transformation IDENTITY;
-
-} //namespace CGAL
-
-#endif // CGAL_AFF_TRANSFORMATION_TAGS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/approximated_offset_2.h b/3rdparty/CGAL-4.6/include/CGAL/approximated_offset_2.h
deleted file mode 100644
index 7f61553..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/approximated_offset_2.h
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_APPROXIMATED_OFFSET_H
-#define CGAL_APPROXIMATED_OFFSET_H
-
-#include <CGAL/Minkowski_sum_2/Approx_offset_base_2.h>
-#include <CGAL/Minkowski_sum_2/Offset_conv_2.h>
-#include <CGAL/Minkowski_sum_2/Offset_decomp_2.h>
-
-namespace CGAL {
-
-/*!
- * Approximate the offset of a given simple polygon by a given radius,
- * using the convolution method.
- * Note that as the input polygon may not be convex, its offset may not be 
- * simply connected. The result is therefore represented as a polygon with
- * holes.
- * \param pgn The polygon.
- * \param r The offset radius.
- * \param eps The approximation-error bound.
- * \return The approximated offset polygon.
- */
-template <class Kernel, class Container>
-typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-approximated_offset_2 (const Polygon_2<Kernel, Container>& pgn,
-                       const typename Kernel::FT& r,
-                       const double& eps)
-{
-  typedef Approx_offset_base_2<Kernel, Container>            Base;
-  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
-  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
-
-  Base                                               base (eps);
-  Approx_offset_2                                    approx_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  approx_offset (pgn, r,
-                 offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Approximate the offset of a given polygon with holes by a given radius,
- * using the convolution method.
- * The result is represented as a polygon with holes whose edges are line
- * segments and circular arcs.
- * \param pwh The polygon with holes.
- * \param r The offset radius.
- * \param eps The approximation-error bound.
- * \pre The polygon is bounded (has a valid outer boundary).
- * \return The approximated offset polygon.
- */
-template <class Kernel, class Container>
-typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-approximated_offset_2 (const Polygon_with_holes_2<Kernel, Container>& pwh,
-                       const typename Kernel::FT& r,
-                       const double& eps)
-{
-  typedef Approx_offset_base_2<Kernel, Container>            Base;
-  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
-  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
-
-  Base                                               base (eps);
-  Approx_offset_2                                    approx_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  approx_offset (pwh, r,
-                 offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Approximate the offset of a given simple polygon by a given radius,
- * by decomposing it to convex sub-polygons and computing the union of their
- * offsets.
- * Note that as the input polygon may not be convex, its offset may not be 
- * simply connected. The result is therefore represented as a polygon with
- * holes.
- * \param pgn The polygon.
- * \param r The offset radius.
- * \param eps The approximation-error bound.
- * \param decomp A functor for decomposing polygons.
- * \return The approximated offset polygon.
- */
-template <class Kernel, class Container, class DecompositionStrategy>
-typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-approximated_offset_2 (const Polygon_2<Kernel, Container>& pgn,
-                       const typename Kernel::FT& r,
-                       const double& eps,
-                       const DecompositionStrategy&)
-{
-  typedef Approx_offset_base_2<Kernel, Container>            Base;
-  typedef Offset_by_decomposition_2<Base, DecompositionStrategy>
-                                                             Approx_offset_2;
-  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
-
-  Base                                               base (eps);
-  Approx_offset_2                                    approx_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  approx_offset (pgn, r,
-                 offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Approximate the inset of a given simple polygon by a given radius, using
- * the convolution method.
- * Note that as the input polygon may not be convex, its inset may not be 
- * simply connected. The result is therefore represented as a set of polygons.
- * \param pgn The polygon.
- * \param r The inset radius.
- * \param eps The approximation-error bound.
- * \param oi An output iterator for the inset polygons.
- *           Its value-type must be
- *           Gps_circle_segment_traits_2<Kernel>::Polygon_2.
- * \return A past-the-end iterator for the inset polygons.
- */
-template <class Kernel, class Container, class OutputIterator>
-OutputIterator
-approximated_inset_2 (const Polygon_2<Kernel, Container>& pgn,
-                      const typename Kernel::FT& r,
-                      const double& eps,
-                      OutputIterator oi)
-{
-  typedef Approx_offset_base_2<Kernel, Container>            Base;
-  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
-  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
-
-  Base                                               base (eps);
-  Approx_offset_2                                    approx_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  oi = approx_offset.inset (pgn, r,
-                            oi);
-
-  return (oi);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/arrange_offset_polygons_2.h b/3rdparty/CGAL-4.6/include/CGAL/arrange_offset_polygons_2.h
deleted file mode 100644
index f61563a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/arrange_offset_polygons_2.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar> 
-//
-#ifndef CGAL_ARRANGE_OFFSET_POLYGONS_2_H
-#define CGAL_ARRANGE_OFFSET_POLYGONS_2_H
-
-#include <boost/shared_ptr.hpp>
-#include <CGAL/Polygon_with_holes_2.h>
-
-namespace CGAL {
-
-//
-// This should only be used to arrange the polygons coming from Polygon_offset_builder
-// as it uses their known properties:
-//
-//  Polygons are simple
-//  Outer polygons are CCW while holes are CW
-//  Outer polygons do not contain other outer polygons, only holes
-//  Every hole is contained in one and only one outer polygon
-//
-template<class K, class InputPolygonPtrIterator, class OutputPolygonWithHolesPtrIterator>
-void arrange_offset_polygons_2 ( InputPolygonPtrIterator           aBegin
-                               , InputPolygonPtrIterator           aEnd
-                               , OutputPolygonWithHolesPtrIterator rOut
-                               , K const&
-                               )
-{
-  typedef typename std::iterator_traits<InputPolygonPtrIterator>::difference_type difference_type ;
-  
-  typedef Polygon_2<K>            Polygon ;
-  typedef Polygon_with_holes_2<K> PolygonWithHoles ;
-  
-  typedef boost::shared_ptr<Polygon>          PolygonPtr ;
-  typedef boost::shared_ptr<PolygonWithHoles> PolygonWithHolesPtr ;
-  
-  typedef typename Polygon::Vertex_const_iterator Vertex_const_iterator ;
-  
-  difference_type lSize = std::distance(aBegin,aEnd);
-  
-  std::vector<PolygonWithHolesPtr> lTable(lSize);
-  
-  for ( InputPolygonPtrIterator it = aBegin ; it != aEnd ; ++ it )
-  {
-    difference_type lIdx = std::distance(aBegin,it);
-    
-    PolygonPtr lPoly = *it ;
-    Orientation lOrient = lPoly->orientation();
-    
-    // It's an outer boundary
-    if ( lOrient == COUNTERCLOCKWISE )
-    {
-      PolygonWithHolesPtr lOuter( new PolygonWithHoles(*lPoly) );
-      *rOut ++ = lOuter ; 
-      lTable[lIdx] = lOuter ;
-    }  
-  }  
-  
-  for ( InputPolygonPtrIterator it = aBegin ; it != aEnd ; ++ it )
-  {
-    PolygonPtr lPoly = *it ;
-    
-    difference_type lIdx = std::distance(aBegin,it);
-    
-    // Is a hole?
-    if ( !lTable[lIdx] )
-    {
-      PolygonWithHolesPtr lParent ;
-      
-      for ( difference_type j = 0 ; j < lSize && !lParent ; ++ j )
-      {
-        PolygonWithHolesPtr lOuter = lTable[j];
-        if ( lOuter )
-          for ( Vertex_const_iterator v = lPoly->vertices_begin(), ve = lPoly->vertices_end(); v != ve && !lParent ; ++ v )
-            if ( lOuter->outer_boundary().bounded_side(*v) == ON_BOUNDED_SIDE )
-              lParent = lOuter ;
-      }
-      
-      CGAL_assertion(lParent != NULL);
-      
-      lParent->add_hole(*lPoly);
-    }
-  }  
-}
-
-template<class K>
-std::vector< boost::shared_ptr< Polygon_with_holes_2<K> > >
-inline
-arrange_offset_polygons_2 ( std::vector< boost::shared_ptr< Polygon_2<K> > > const& aPolygons )
-{
-  std::vector< boost::shared_ptr< Polygon_with_holes_2<K> > > rResult ;
-  
-  arrange_offset_polygons_2(aPolygons.begin(), aPolygons.end(), std::back_inserter(rResult), K() ) ;
-  
-  return rResult ;
-}
-
-} // end namespace CGAL
-
-
-#endif 
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/assertions.h b/3rdparty/CGAL-4.6/include/CGAL/assertions.h
deleted file mode 100644
index 63144c9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/assertions.h
+++ /dev/null
@@ -1,346 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Geert-Jan Giezeman and Sven Schoenherr
-
-#include <CGAL/config.h>
-
-#ifndef CGAL_ASSERTIONS_H
-#define CGAL_ASSERTIONS_H
-
-#include <CGAL/export/CGAL.h>
-
-// #include <CGAL/assertions_behaviour.h> // for backward compatibility
-
-#ifndef CGAL_NO_ASSERTIONS 
-#ifdef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
-#include <boost/static_assert.hpp>
-#endif
-#endif
-
-namespace CGAL {
-
-// function declarations
-// =====================
-// failure functions
-// -----------------
-CGAL_EXPORT void assertion_fail      ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
-CGAL_EXPORT void precondition_fail   ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
-CGAL_EXPORT void postcondition_fail  ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
-
-// warning function
-// ----------------
-CGAL_EXPORT
-void warning_fail( const char*, const char*, int, const char* = "");
-
-
-// The following declarations are needed first, before assertions are used.
-// ---------------------------------------------------------------------
-template < typename T > class Uncertain;
-inline bool possibly(bool b);
-inline bool possibly(Uncertain<bool> c);
-
-
-// macro definitions
-// =================
-// assertions
-// ----------
-
-#ifdef NDEBUG
-#  ifndef CGAL_NDEBUG
-#    define CGAL_NDEBUG
-#  endif
-#endif
-
-#ifdef CGAL_NDEBUG
-#  define CGAL_NO_ASSERTIONS
-#  define CGAL_NO_PRECONDITIONS
-#  define CGAL_NO_POSTCONDITIONS
-#  define CGAL_NO_WARNINGS
-#endif
-
-#if defined(CGAL_NO_ASSERTIONS)
-#  define CGAL_assertion(EX) (static_cast<void>(0))
-#  define CGAL_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_assertion_code(CODE)
-#  ifdef CGAL_ASSUME
-#    define CGAL_assume(EX) CGAL_ASSUME(EX)
-#    define CGAL_assume_code(CODE) CODE
-#  else // not def CGAL_ASSUME
-#    define CGAL_assume(EX)  CGAL_assertion(EX)
-#    define CGAL_assume_code(CODE) CGAL_assertion_code(CODE)
-#  endif // not def CGAL_ASSUME
-#else // no CGAL_NO_ASSERTIONS
-#  define CGAL_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_assertion_code(CODE) CODE
-#  define CGAL_assume(EX) CGAL_assertion(EX)
-#  define CGAL_assume_code(CODE) CGAL_assertion_code(CODE)
-#endif // no CGAL_NO_ASSERTIONS
-
-#ifndef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
-
-#  if defined(CGAL_NO_ASSERTIONS)
-
-#    define CGAL_static_assertion(EX) \
-     static_assert(true, "")
-
-#    define CGAL_static_assertion_msg(EX,MSG) \
-     static_assert(true, "")
-
-#  else // no CGAL_NO_ASSERTIONS
-
-#    define CGAL_static_assertion(EX) \
-     static_assert(EX, #EX)
-
-#    define CGAL_static_assertion_msg(EX,MSG) \
-     static_assert(EX, MSG)
-
-#  endif // no CGAL_NO_ASSERTIONS
-
-#else // if CGAL_CFG_NO_CPP0X_STATIC_ASSERT is true
-
-#  if defined(CGAL_NO_ASSERTIONS)
-
-#    define CGAL_static_assertion(EX) \
-     BOOST_STATIC_ASSERT(true) CGAL_UNUSED
-  
-#    define CGAL_static_assertion_msg(EX,MSG) \
-     BOOST_STATIC_ASSERT(true) CGAL_UNUSED
-
-#  else // no CGAL_NO_ASSERTIONS
-
-#    define CGAL_static_assertion(EX) \
-     BOOST_STATIC_ASSERT(EX) CGAL_UNUSED
-  
-#    define CGAL_static_assertion_msg(EX,MSG) \
-     BOOST_STATIC_ASSERT(EX) CGAL_UNUSED
-
-#  endif // no CGAL_NO_ASSERTIONS
-
-#endif // if CGAL_CFG_NO_CPP0X_STATIC_ASSERT is true
-  
-#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS)
-#  define CGAL_exactness_assertion(EX) (static_cast<void>(0))
-#  define CGAL_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_exactness_assertion_code(CODE)
-#else
-#  define CGAL_exactness_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_exactness_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_exactness_assertion_code(CODE) CODE
-#endif // CGAL_NO_ASSERTIONS
-
-#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_assertion(EX) (static_cast<void>(0))
-#  define CGAL_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_assertion_code(CODE)
-#else
-#  define CGAL_expensive_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_assertion_code(CODE) CODE
-#endif // CGAL_NO_ASSERTIONS
-
-#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_exactness_assertion(EX) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_assertion_code(CODE)
-#else
-#  define CGAL_expensive_exactness_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_exactness_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_exactness_assertion_code(CODE) CODE
-#endif // CGAL_NO_ASSERTIONS
-
-
-// preconditions
-// -------------
-
-#if defined(CGAL_NO_PRECONDITIONS)
-#  define CGAL_precondition(EX) (static_cast<void>(0))
-#  define CGAL_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_precondition_code(CODE)
-#else
-#  define CGAL_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_precondition_code(CODE) CODE
-#endif // CGAL_NO_PRECONDITIONS
-
-#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
-#  define CGAL_exactness_precondition(EX) (static_cast<void>(0))
-#  define CGAL_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_exactness_precondition_code(CODE)
-#else
-#  define CGAL_exactness_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_exactness_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_exactness_precondition_code(CODE) CODE
-#endif // CGAL_NO_PRECONDITIONS
-
-#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_precondition(EX) (static_cast<void>(0))
-#  define CGAL_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_precondition_code(CODE)
-#else
-#  define CGAL_expensive_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_precondition_code(CODE) CODE
-#endif // CGAL_NO_PRECONDITIONS
-
-#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE) 
-#  define CGAL_expensive_exactness_precondition(EX) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_precondition_code(CODE)
-#else
-#  define CGAL_expensive_exactness_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_exactness_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_exactness_precondition_code(CODE) CODE
-#endif // CGAL_NO_PRECONDITIONS
-
-
-// postconditions
-// --------------
-
-#if defined(CGAL_NO_POSTCONDITIONS)
-#  define CGAL_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_postcondition_code(CODE)
-#else
-#  define CGAL_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_postcondition_code(CODE) CODE
-#endif // CGAL_NO_POSTCONDITIONS
-
-#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
-#  define CGAL_exactness_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_exactness_postcondition_code(CODE)
-#else
-#  define CGAL_exactness_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_exactness_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_exactness_postcondition_code(CODE) CODE
-#endif // CGAL_NO_POSTCONDITIONS
-
-#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_postcondition_code(CODE)
-#else
-#  define CGAL_expensive_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_postcondition_code(CODE) CODE
-#endif // CGAL_NO_POSTCONDITIONS
-
-#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_exactness_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_postcondition_code(CODE)
-#else
-#  define CGAL_expensive_exactness_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_exactness_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_exactness_postcondition_code(CODE) CODE
-#endif // CGAL_NO_POSTCONDITIONS
-
-
-// warnings
-// --------
-
-#if defined(CGAL_NO_WARNINGS)
-#  define CGAL_warning(EX) (static_cast<void>(0))
-#  define CGAL_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_warning_code(CODE)
-#else
-#  define CGAL_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_warning_code(CODE) CODE
-#endif // CGAL_NO_WARNINGS
-
-#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS)
-#  define CGAL_exactness_warning(EX) (static_cast<void>(0))
-#  define CGAL_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_exactness_warning_code(CODE)
-#else
-#  define CGAL_exactness_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_exactness_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_exactness_warning_code(CODE) CODE
-#endif // CGAL_NO_WARNINGS
-
-#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_warning(EX) (static_cast<void>(0))
-#  define CGAL_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_warning_code(CODE)
-#else
-#  define CGAL_expensive_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_warning_code(CODE) CODE
-#endif // CGAL_NO_WARNINGS
-
-#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
-#  define CGAL_expensive_exactness_warning(EX) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_expensive_exactness_warning_code(CODE)
-#else
-#  define CGAL_expensive_exactness_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_expensive_exactness_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_expensive_exactness_warning_code(CODE) CODE
-#endif // CGAL_NO_WARNINGS
-
-// CGAL error
-#define CGAL_error_msg(MSG) ::CGAL::assertion_fail( "", __FILE__, __LINE__, MSG )
-#define CGAL_error()        ::CGAL::assertion_fail( "", __FILE__, __LINE__ )
-
-} //namespace CGAL
-
-// This comes last as it is dependant on the macros to be defined.
-// But the macros need CGAL::possibly().
-#include <CGAL/Uncertain.h>
-
-#endif // CGAL_ASSERTIONS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/CGALQt3.h b/3rdparty/CGAL-4.6/include/CGAL/auto_link/CGALQt3.h
deleted file mode 100644
index 59bdaec..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/auto_link/CGALQt3.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2007 GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Fernando Cacciola (fernando.cacciola at geometryfactry.com)
-
-#ifndef CGAL_AUTO_LINK_CGALQT_H
-#define CGAL_AUTO_LINK_CGALQT_H
-
-#include <CGAL/config.h>
-
-#ifndef CGAL_NO_AUTOLINK_CGALQT
-
-#define CGAL_LIB_NAME CGAL_Qt3
-#include <CGAL/auto_link/auto_link.h>
-
-#endif // CGAL_NO_AUTOLINK_CGALQT
-
-#endif // CGAL_AUTO_LINK_CGALQT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/Qt4.h b/3rdparty/CGAL-4.6/include/CGAL/auto_link/Qt4.h
deleted file mode 100644
index f21b81b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/auto_link/Qt4.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2008 GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_AUTO_LINK_QT4_H
-#define CGAL_AUTO_LINK_QT4_H
-
-#include <CGAL/config.h>
-
-#ifndef CGAL_NO_AUTOLINK_QT4
-#if ( ! defined( CGAL_EXPORTS ) ) && (! defined ( CGAL_Qt4_EXPORTS ) ) 
-
-// If CGAL_EXPORTS is defined it means that we are building the CGAL
-// library as a DLL. The CGAL.dll does not really depend on CGAL_Qt4,
-// whatever the header inclusion graph says.
-
-#define CGAL_LIB_NAME CGAL_Qt4
-#include <CGAL/auto_link/auto_link.h>
-
-#endif // CGAL_EXPORTS
-#endif // CGAL_NO_AUTOLINK_QT4
-
-#endif // CGAL_AUTO_LINK_QT4_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/auto_link.h b/3rdparty/CGAL-4.6/include/CGAL/auto_link/auto_link.h
deleted file mode 100644
index 33f5acf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/auto_link/auto_link.h
+++ /dev/null
@@ -1,446 +0,0 @@
-// This header file is a copy of "boost/config/auto_link.hpp" 
-// from boost version 1.44.0
-// but slightly modified to accomodate CGAL libraries.
-//-------------------------------------------------------------------------------------- 
-//
-//  (C) Copyright John Maddock 2003.
-//  Use, modification and distribution are subject to the
-//  Boost Software License, Version 1.0. (See accompanying file
-//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//-------------------------------------------------------------------------------------- 
-// Copyright (C) 2007 GeometryFactory (France)
-// 
-// $URL$
-// $Id$
-// 
-// Author(s)     : Fernando Cacciola (fernando.cacciola at geometryfactory.com)
-/*************************************************************************
-
-USAGE:
-~~~~~~
-
-Before including this header you must define one or more of define the following macros:
-
-CGAL_LIB_NAME:           Required: A string containing the basename of the library,
-                          for example boost_regex.
-CGAL_LIB_TOOLSET:        Optional: the base name of the toolset.
-CGAL_BUILD_SHARED_LIBS:  Optional: when set link to dll rather than static library.
-CGAL_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name
-                          of the library selected (useful for debugging).
-CGAL_AUTO_LINK_NOMANGLE: Specifies that we should link to CGAL_LIB_NAME.lib,
-                          rather than a mangled-name version.
-CGAL_AUTO_LINK_TAGGED:   Specifies that we link to libraries built with the --layout=tagged option.
-                          This is essentially the same as the default name-mangled version, but without
-                          the compiler name and version, or the Boost version.  Just the build options.
-
-ALL these macros will be undef'ed at the end of the header, even though they are defined from the outside.
-That means you must always define them before including this.
-
-Further, this header has no include guards because you can reuse it several times with different
-macros (arguments) in order to link different libraries.
-Be sure to include it only once for each target library!
-
-Algorithm:
-~~~~~~~~~~
-
-Libraries for Borland and Microsoft compilers are automatically
-selected here, the name of the lib is selected according to the following
-formula:
-
-CGAL_LIB_PREFIX
-   + CGAL_LIB_NAME
-   + "_"
-   + CGAL_LIB_TOOLSET
-   + CGAL_LIB_THREAD_OPT
-   + CGAL_LIB_RT_OPT
-   "-"
-   + CGAL_VERSION
-
-These are defined as:
-
-CGAL_LIB_PREFIX:     "lib" for static libraries otherwise "".
-
-CGAL_LIB_NAME:       The base name of the lib ( for example boost_regex).
-
-CGAL_LIB_TOOLSET:    The compiler toolset name (vc71, vc80 etc).
-
-CGAL_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
-
-CGAL_LIB_RT_OPT:     A suffix that indicates the runtime library used,
-                      contains one or more of the following letters after
-                      a hiphen:
-
-                      s      static runtime (dynamic if not present).
-                      g      debug/diagnostic runtime (release if not present).
-                      y      Python debug/diagnostic runtime (release if not present).
-                      d      debug build (release if not present).
-                      g      debug/diagnostic runtime (release if not present).
-                      p      STLPort Build.
-
-CGAL_VERSION:        Defined in <CGAL/version.h>
-
-
-***************************************************************************/
-
-#ifndef CGAL_NO_AUTOLINK
-
-#ifdef __cplusplus
-#  ifndef BOOST_CONFIG_HPP
-#     include <boost/config.hpp>
-#  endif
-#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
-//
-// C language compatability (no, honestly)
-//
-#  define BOOST_MSVC _MSC_VER
-#  define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
-#  define BOOST_DO_STRINGIZE(X) #X
-#endif
-//
-// Only include what follows for known and supported compilers:
-//
-#if defined(BOOST_MSVC) \
-    || defined(__BORLANDC__) \
-    || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
-    || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
-
-#ifndef CGAL_VERSION
-#  include <CGAL/version.h>
-#endif
-
-#ifndef CGAL_LIB_NAME
-#  error "Macro CGAL_LIB_NAME not set (internal error)"
-#endif
-
-//
-// error check:
-//
-#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
-#  pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
-#  pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
-#  error "Incompatible build options"
-#endif
-//
-// select toolset if not defined already:
-//
-#ifndef CGAL_LIB_TOOLSET
-// Note: no compilers before 1200 are supported
-#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
-
-#  ifdef UNDER_CE
-     // vc6:
-#    define CGAL_LIB_TOOLSET "evc4"
-#  else
-     // vc6:
-#    define CGAL_LIB_TOOLSET "vc6"
-#  endif
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
-
-   // vc7:
-#  define CGAL_LIB_TOOLSET "vc7"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
-
-   // vc71:
-#  define CGAL_LIB_TOOLSET "vc71"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)
-
-   // vc80:
-#  define CGAL_LIB_TOOLSET "vc80"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)
-
-   // vc90:
-#  define CGAL_LIB_TOOLSET "vc90"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
-
-   // vc10:
-#  define CGAL_LIB_TOOLSET "vc100"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
-
-   // vc11:
-#  define CGAL_LIB_TOOLSET "vc110"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1800)
-
-   // vc12:
-#  define CGAL_LIB_TOOLSET "vc120"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1900)
-
-   // vc13:
-#  define CGAL_LIB_TOOLSET "vc130"
-
-#elif defined(__BORLANDC__)
-
-   // CBuilder 6:
-#  define CGAL_LIB_TOOLSET "bcb"
-
-#elif defined(__ICL)
-
-   // Intel C++, no version number:
-#  define CGAL_LIB_TOOLSET "iw"
-
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
-
-   // Metrowerks CodeWarrior 8.x
-#  define CGAL_LIB_TOOLSET "cw8"
-
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
-
-   // Metrowerks CodeWarrior 9.x
-#  define CGAL_LIB_TOOLSET "cw9"
-
-#endif
-#endif // CGAL_LIB_TOOLSET
-
-//
-// select thread opt:
-//
-#if defined(_MT) || defined(__MT__)
-#  define CGAL_LIB_THREAD_OPT "-mt"
-#else
-#  define CGAL_LIB_THREAD_OPT
-#endif
-
-#if defined(_MSC_VER) || defined(__MWERKS__)
-
-#  ifdef _DLL
-
-#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
-
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-gydp"
-#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-#            define CGAL_LIB_RT_OPT "-gdp"
-#        elif defined(_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-gydp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        elif defined(_DEBUG)
-#            define CGAL_LIB_RT_OPT "-gdp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        else
-#            define CGAL_LIB_RT_OPT "-p"
-#        endif
-
-#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-gydpn"
-#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-#            define CGAL_LIB_RT_OPT "-gdpn"
-#        elif defined(_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-gydpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        elif defined(_DEBUG)
-#            define CGAL_LIB_RT_OPT "-gdpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        else
-#            define CGAL_LIB_RT_OPT "-pn"
-#        endif
-
-#     else
-
-#        if defined(_DEBUG) && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-gyd"
-#        elif defined(_DEBUG)
-#            define CGAL_LIB_RT_OPT "-gd"
-#        else
-#            define CGAL_LIB_RT_OPT
-#        endif
-
-#     endif
-
-#  else
-
-#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
-
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-sgydp"
-#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-#            define CGAL_LIB_RT_OPT "-sgdp"
-#        elif defined(_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#             define CGAL_LIB_RT_OPT "-sgydp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        elif defined(_DEBUG)
-#             define CGAL_LIB_RT_OPT "-sgdp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        else
-#            define CGAL_LIB_RT_OPT "-sp"
-#        endif
-
-#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#            define CGAL_LIB_RT_OPT "-sgydpn"
-#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-#            define CGAL_LIB_RT_OPT "-sgdpn"
-#        elif defined(_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#             define CGAL_LIB_RT_OPT "-sgydpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        elif defined(_DEBUG)
-#             define CGAL_LIB_RT_OPT "-sgdpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
-#            error "Build options aren't compatible with pre-built libraries"
-#        else
-#            define CGAL_LIB_RT_OPT "-spn"
-#        endif
-
-#     else
-
-#        if defined(_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#             define CGAL_LIB_RT_OPT "-sgyd"
-#        elif defined(_DEBUG)
-#             define CGAL_LIB_RT_OPT "-sgd"
-#        else
-#            define CGAL_LIB_RT_OPT "-s"
-#        endif
-
-#     endif
-
-#  endif
-
-#elif defined(__BORLANDC__)
-
-//
-// figure out whether we want the debug builds or not:
-//
-#if __BORLANDC__ > 0x561
-#pragma defineonoption CGAL_BORLAND_DEBUG -v
-#endif
-//
-// sanity check:
-//
-#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
-#error "Pre-built versions of the CGAL libraries are not provided in STLPort-debug form"
-#endif
-
-#  ifdef _RTLDLL
-
-#     if defined(CGAL_BORLAND_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#         define CGAL_LIB_RT_OPT "-yd"
-#     elif defined(CGAL_BORLAND_DEBUG)
-#         define CGAL_LIB_RT_OPT "-d"
-#     elif defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#         define CGAL_LIB_RT_OPT -y
-#     else
-#         define CGAL_LIB_RT_OPT
-#     endif
-
-#  else
-
-#     if defined(CGAL_BORLAND_DEBUG)\
-               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#         define CGAL_LIB_RT_OPT "-syd"
-#     elif defined(CGAL_BORLAND_DEBUG)
-#         define CGAL_LIB_RT_OPT "-sd"
-#     elif defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
-#         define CGAL_LIB_RT_OPT "-sy"
-#     else
-#         define CGAL_LIB_RT_OPT "-s"
-#     endif
-
-#  endif
-
-#endif
-
-//
-// select linkage opt:
-//
-#if (defined(_DLL) || defined(_RTLDLL)) && defined(CGAL_BUILD_SHARED_LIBS)
-#  define CGAL_LIB_PREFIX
-#elif defined(CGAL_BUILD_SHARED_LIBS)
-#  error "Mixing a dll CGAL library with a static runtime is a really bad idea..."
-#else
-#  define CGAL_LIB_PREFIX "lib"
-#endif
-
-//
-// now include the lib:
-//
-#if defined(CGAL_LIB_NAME) \
-      && defined(CGAL_LIB_PREFIX) \
-      && defined(CGAL_LIB_TOOLSET) \
-      && defined(CGAL_LIB_THREAD_OPT) \
-      && defined(CGAL_LIB_RT_OPT) \
-      && defined(CGAL_VERSION)
-
-#ifdef CGAL_AUTO_LINK_TAGGED
-#  pragma commentcomment(lib, CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT ".lib")
-#  ifdef CGAL_LIB_DIAGNOSTIC
-#     pragma message ("Linking to lib file: " CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
-#  endif
-#elif defined(CGAL_AUTO_LINK_NOMANGLE)
-#  pragma comment(lib, BOOST_STRINGIZE(CGAL_LIB_NAME) ".lib")
-#  ifdef CGAL_LIB_DIAGNOSTIC
-#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(CGAL_LIB_NAME) ".lib")
-#  endif
-#else
-#  pragma comment(lib, CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
-#  ifdef CGAL_LIB_DIAGNOSTIC
-#     pragma message ("Linking to lib file: " CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
-#  endif
-#endif
-
-#else
-#  error "some required macros where not defined (internal logic error)."
-#endif
-
-
-#endif // _MSC_VER || __BORLANDC__
-
-#endif // CGAL_NO_AUTOLINK
-
-//
-// finally undef any macros we may have set:
-//
-#ifdef CGAL_LIB_PREFIX
-#  undef CGAL_LIB_PREFIX
-#endif
-#if defined(CGAL_LIB_NAME)
-#  undef CGAL_LIB_NAME
-#endif
-// Don't undef this one: it can be set by the user and should be the 
-// same for all libraries:
-//#if defined(CGAL_LIB_TOOLSET)
-//#  undef CGAL_LIB_TOOLSET
-//#endif
-#if defined(CGAL_LIB_THREAD_OPT)
-#  undef CGAL_LIB_THREAD_OPT
-#endif
-#if defined(CGAL_LIB_RT_OPT)
-#  undef CGAL_LIB_RT_OPT
-#endif
-#if defined(CGAL_LIB_LINK_OPT)
-#  undef CGAL_LIB_LINK_OPT
-#endif
-#if defined(CGAL_LIB_DEBUG_OPT)
-#  undef CGAL_LIB_DEBUG_OPT
-#endif
-#if defined(CGAL_DYN_LINK)
-#  undef CGAL_DYN_LINK
-#endif
-#if defined(CGAL_AUTO_LINK_NOMANGLE)
-#  undef CGAL_AUTO_LINK_NOMANGLE
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/bilateral_smooth_point_set.h b/3rdparty/CGAL-4.6/include/CGAL/bilateral_smooth_point_set.h
deleted file mode 100644
index 2197d1b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/bilateral_smooth_point_set.h
+++ /dev/null
@@ -1,649 +0,0 @@
-// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
-
-#ifndef CGAL_BILATERAL_SMOOTH_POINT_SET_H
-#define CGAL_BILATERAL_SMOOTH_POINT_SET_H
-
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/Point_with_normal_3.h>
-
-#include <iterator>
-#include <set>
-#include <algorithm>
-#include <cmath>
-#include <ctime>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-#include <boost/property_map/property_map.hpp>
-#else
-#include <boost/property_map.hpp>
-#endif
-
-#ifdef CGAL_LINKED_WITH_TBB
-#include <tbb/parallel_for.h>
-#include <tbb/blocked_range.h>
-#include <tbb/scalable_allocator.h>  
-#endif // CGAL_LINKED_WITH_TBB
-
-// Default allocator: use TBB allocators if available
-#ifdef CGAL_LINKED_WITH_TBB
-# define CGAL_PSP3_DEFAULT_ALLOCATOR tbb::scalable_allocator
-#else // CGAL_LINKED_WITH_TBB
-# define CGAL_PSP3_DEFAULT_ALLOCATOR std::allocator
-#endif // CGAL_LINKED_WITH_TBB
-
-
-//#define CGAL_PSP3_VERBOSE 
-
-namespace CGAL {
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-
-namespace bilateral_smooth_point_set_internal{
-
-// Item in the Kd-tree: position (Point_3) + index
-template <typename Kernel>
-class Kd_tree_element : public Point_with_normal_3<Kernel>
-{
-public:
-  unsigned int index;
-
-  // basic geometric types
-  typedef typename CGAL::Origin Origin;
-  typedef CGAL::Point_with_normal_3<Kernel> Base;
-
-  Kd_tree_element(const Origin& o = ORIGIN, unsigned int id=0)
-    : Base(o), index(id)
-  {}
-  Kd_tree_element(const Base& p, unsigned int id=0)
-    : Base(p), index(id)
-  {}
-  Kd_tree_element(const Kd_tree_element& other)
-    : Base(other), index(other.index)
-  {}
-};
-
-
-// Helper class for the Kd-tree
-template <typename Kernel>
-class Kd_tree_gt : public Kernel
-{
-public:
-  typedef Kd_tree_element<Kernel> Point_3;
-};
-
-template <typename Kernel>
-class Kd_tree_traits : public CGAL::Search_traits_3<Kd_tree_gt<Kernel> >
-{
-public:
-  typedef typename Kernel::Point_3 PointType;
-};
-
-
-/// Compute bilateral projection for each point
-/// according to their KNN neighborhood points
-/// 
-/// \pre `k >= 2`, radius > 0 , sharpness_angle > 0 && sharpness_angle < 90
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return 
-
-template <typename Kernel>
-CGAL::Point_with_normal_3<Kernel>
-compute_denoise_projection(
-  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point to project
-  const std::vector<CGAL::Point_with_normal_3<Kernel>,
-  CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > >& neighbor_pwns,  //
-  typename Kernel::FT radius,                   ///< accept neighborhood radius
-  typename Kernel::FT sharpness_angle           ///< control sharpness(0-90)
-)
-{
-  CGAL_point_set_processing_precondition(radius > 0);
-  CGAL_point_set_processing_precondition(sharpness_angle > 0
-                                         && sharpness_angle < 90);
-
-  // basic geometric types
-  typedef typename Kernel::FT FT;
-  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::Point_3 Point;
-
-  FT radius2 = radius * radius;
-
-  FT weight = (FT)0.0;
-  FT iradius16 = -(FT)4.0/radius2;
-  FT project_dist_sum = FT(0.0);
-  FT project_weight_sum = FT(0.0);
-  Vector normal_sum = CGAL::NULL_VECTOR; 
-
-  FT cos_sigma = cos(sharpness_angle / 180.0 * 3.1415926);
-  FT sharpness_bandwidth = std::pow((CGAL::max)(1e-8, 1 - cos_sigma), 2);
-
-  typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::const_iterator 
-    pwn_iter = neighbor_pwns.begin();
-  for (; pwn_iter != neighbor_pwns.end(); ++pwn_iter)
-  {
-    const Point& np = pwn_iter->position();
-    const Vector& nn = pwn_iter->normal();
-
-    FT dist2 = CGAL::squared_distance(query.position(), np);
-    if (dist2 < radius2)
-    {
-      FT theta = std::exp(dist2 * iradius16);
-      FT psi = std::exp(-std::pow(1 - query.normal() * nn, 2)
-        / sharpness_bandwidth);
-
-      weight = theta * psi;
-
-      project_dist_sum += ((query.position() - np) * nn) * weight;
-      project_weight_sum += weight;
-      normal_sum = normal_sum + nn * weight;
-    }
-  }
-
-  Vector update_normal = normal_sum / project_weight_sum;
-  update_normal = update_normal / sqrt(update_normal.squared_length());
-
-  Point update_point = query.position() - update_normal * 
-                      (project_dist_sum / project_weight_sum); 
-
-  return Pwn(update_point, update_normal);
-}
-
-/// Computes neighbors from kdtree.
-///
-/// \pre `k >= 2`.
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return neighbors pwn of query point.
-template < typename Kernel,
-           typename Tree>
-std::vector<CGAL::Point_with_normal_3<Kernel>,
-            CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > >
-compute_kdtree_neighbors(
-  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point
-  const Tree& tree,                               ///< KD-tree
-  unsigned int k                                  ///< number of neighbors         
-)                       
-{
-  // basic geometric types
-  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
-
-  // types for K nearest neighbors search
-  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
-  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // performs k + 1 queries (if unique the query point is
-  // output first). search may be aborted when k is greater
-  // than number of input points
-  Neighbor_search search(tree, query, k+1);
-  Search_iterator search_iterator = search.begin();
-  ++search_iterator;
-  unsigned int i;
-  std::vector<CGAL::Point_with_normal_3<Kernel>
-    , CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > 
-    > neighbor_pwns;
-
-  for(i = 0; i < (k+1); ++i)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-
-    Pwn pwn = search_iterator->first;
-    neighbor_pwns.push_back(pwn);
-    ++search_iterator;
-  }
-
-  // output 
-  return neighbor_pwns;
-}
-
-
-/// Computes max-spacing of one query point from K nearest neighbors.
-///
-/// \pre `k >= 2`.
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return max spacing.
-template < typename Kernel,
-           typename Tree >
-typename Kernel::FT
-compute_max_spacing(
-  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point
-  Tree& tree,                                     ///< KD-tree
-  unsigned int k)                                 ///< number of neighbors
-{
-  // basic geometric types
-  typedef typename Kernel::FT FT;
-  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
-
-  // types for K nearest neighbors search
-  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
-  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // performs k + 1 queries (if unique the query point is
-  // output first). search may be aborted when k is greater
-  // than number of input points
-  Neighbor_search search(tree,query,k+1);
-  Search_iterator search_iterator = search.begin();
-  ++search_iterator;
-  FT max_distance = (FT)0.0;
-  unsigned int i;
-  for(i = 0; i < (k+1) ; ++i)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-
-    Pwn pwn = search_iterator->first;
-    double dist2 = CGAL::squared_distance(query.position(), pwn.position());
-    max_distance = (CGAL::max)(dist2, max_distance);
-    ++search_iterator;
-  }
-
-  // output max spacing
-  return std::sqrt(max_distance);
-}
-
-} /* namespace internal */
-
-/// \endcond
-
-#ifdef CGAL_LINKED_WITH_TBB
-/// \cond SKIP_IN_MANUAL
-/// This is for parallelization of function: bilateral_smooth_point_set()
-template <typename Kernel, typename Tree>
-class Compute_pwns_neighbors
-{
-  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
-  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
-  typedef typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> > 
-                                                                Pwns_neighbors;
-  typedef typename Kernel::FT FT;
-
-  unsigned int                                              m_k;
-  const Tree                                              & m_tree;
-  const Pwns                                              & m_pwns;
-  Pwns_neighbors                                          & m_pwns_neighbors;
-
-public:
-  Compute_pwns_neighbors(unsigned int k, const Tree &tree,
-                         const Pwns &pwns, Pwns_neighbors &neighbors)
-    : m_k(k), m_tree(tree), m_pwns(pwns), m_pwns_neighbors(neighbors) {} 
-
-  void operator() ( const tbb::blocked_range<size_t>& r ) const 
-  {
-    for (size_t i = r.begin(); i!=r.end(); i++)
-    {
-      m_pwns_neighbors[i] = bilateral_smooth_point_set_internal::
-        compute_kdtree_neighbors<Kernel, Tree>(m_pwns[i], m_tree, m_k);
-    }
-  }
-};
-/// \endcond  
-
-/// \cond SKIP_IN_MANUAL
-/// This is for parallelization of function: compute_denoise_projection()
-template <typename Kernel>
-class Pwn_updater 
-{
-  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
-  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
-  typedef typename Kernel::FT FT;
-
-  FT sharpness_angle;
-  FT radius;
-  Pwns* pwns;
-  Pwns* update_pwns;
-  std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >* pwns_neighbors;
-
-public:
-  Pwn_updater(FT sharpness, 
-    FT r,
-    Pwns *in,
-    Pwns *out, 
-    std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >* neighbors): 
-  sharpness_angle(sharpness), 
-    radius(r),
-    pwns(in),
-    update_pwns(out),
-    pwns_neighbors(neighbors){} 
-
-
-  void operator() ( const tbb::blocked_range<size_t>& r ) const 
-  { 
-    for (size_t i = r.begin(); i != r.end(); ++i) 
-    {
-      (*update_pwns)[i] = bilateral_smooth_point_set_internal::
-        compute_denoise_projection<Kernel>((*pwns)[i], 
-        (*pwns_neighbors)[i], 
-        radius,
-        sharpness_angle);  
-
-    }
-  }
-};
-/// \endcond
-#endif // CGAL_LINKED_WITH_TBB
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-//=============================================================================
-/// \ingroup PkgPointSetProcessing
-/// 
-/// This function smooths an input point set by iteratively projecting each 
-///  point onto the implicit surface patch fitted over its k nearest neighbors.
-///  Bilateral projection preserves sharp features according to the normal
-/// (gradient) information. Both point positions and normals will be modified.  
-/// For more details, please see section 4 in \cgalCite{ear-2013}.  
-///
-/// A parallel version of this function is provided and requires the executable to be 
-/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
-/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
-/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a> 
-/// for more details.
-///
-/// \pre Normals must be unit vectors
-/// \pre k >= 2
-///
-/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
-///                         Possible values are `Sequential_tag`
-///                         and `Parallel_tag`.
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadWritePropertyMap` 
-///         with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
-///         It can be omitted if the value type of `ForwardIterator` is convertible to 
-///         `Kernel::Point_3`.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with the value type of `ForwardIterator` as key
-///         and `Kernel::Vector_3` as value type.
-/// @tparam Kernel Geometric traits class.
-///      It can be omitted and deduced automatically from the value type of  `PointPMap`
-///      using `Kernel_traits`.
-///
-/// @return Average point movement error. It's a convergence criterium for the algorithm.
-///         This value can help the user to decide how many iterations are
-///         sufficient.
-
-// This variant requires all parameters.
-template <typename Concurrency_tag,
-          typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel>
-double
-bilateral_smooth_point_set(
-  ForwardIterator first,    ///< forward iterator on the first input point.
-  ForwardIterator beyond,   ///< past-the-end iterator.
-  PointPMap point_pmap,     ///< point property map.
-  NormalPMap normal_pmap,   ///< normal property map.
-  unsigned int k,           ///< size of the neighborhood for the implicit surface patch fitting.
-                            ///< The larger the value is, the smoother the result will be.
-  typename Kernel::FT sharpness_angle,  ///< controls the sharpness of the result.
-                            ///< The larger the value is, the smoother the result will be.
-                            ///< The range of possible value is [0, 90].
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
-  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-
-  CGAL_point_set_processing_precondition(first != beyond);
-  CGAL_point_set_processing_precondition(k > 1);
-
-  // types for K nearest neighbors search structure
-  typedef bilateral_smooth_point_set_internal::
-                                       Kd_tree_element<Kernel> Kd_tree_element;
-  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
-  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Tree;
-
-  // copy points and normals
-  Pwns pwns;
-  for(ForwardIterator it = first; it != beyond; ++it)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    const Point& p = get(point_pmap, it);
-    const Vector& n = get(normal_pmap, it);
-#else
-    const Point& p = get(point_pmap, *it);
-    const Vector& n = get(normal_pmap, *it);
-#endif
-    CGAL_point_set_processing_precondition(n.squared_length() > 1e-10);
-    
-    pwns.push_back(Pwn(p, n));
-   }
-
-   unsigned int nb_points = pwns.size();
-
-#ifdef CGAL_PSP3_VERBOSE
-   std::cout << "Initialization and compute max spacing: " << std::endl;
-#endif
-   // initiate a KD-tree search for points
-   std::vector<Kd_tree_element,
-     CGAL_PSP3_DEFAULT_ALLOCATOR<Kd_tree_element> > treeElements;
-   treeElements.reserve(pwns.size());
-   typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::iterator 
-     pwn_iter = pwns.begin();
-   for (unsigned int i = 0; pwn_iter != pwns.end(); ++pwn_iter)
-   {
-     treeElements.push_back(Kd_tree_element(*pwn_iter, i));
-   }
-   Tree tree(treeElements.begin(), treeElements.end());
-   // Guess spacing
-#ifdef CGAL_PSP3_VERBOSE
-   CGAL::Timer task_timer;
-   task_timer.start();
-#endif
-   FT guess_neighbor_radius = 0.0; 
-
-   for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); ++pwn_iter)
-   {
-     FT max_spacing = bilateral_smooth_point_set_internal::
-       compute_max_spacing<Kernel,Tree>(*pwn_iter, tree, k);
-     guess_neighbor_radius = (CGAL::max)(max_spacing, guess_neighbor_radius); 
-   }
-   
-#ifdef CGAL_PSP3_VERBOSE
-   task_timer.stop();
-#endif
-   guess_neighbor_radius *= 0.95;
-
-#ifdef CGAL_PSP3_VERBOSE
-   CGAL::Memory_sizer::size_type memory = CGAL::Memory_sizer().virtual_size();
-   std::cout << "done: " << task_timer.time() << " seconds, "
-             << (memory>>20) << " Mb allocated" << std::endl;
-
-   std::cout << "Compute all neighbors: " << std::endl;
-   task_timer.reset();
-   task_timer.start();
-#endif
-   // compute all neighbors
-   std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> > pwns_neighbors;
-   pwns_neighbors.resize(nb_points);
- 
-#ifdef CGAL_LINKED_WITH_TBB
-   if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
-   {
-     Compute_pwns_neighbors<Kernel, Tree> f(k, tree, pwns, pwns_neighbors);
-     tbb::parallel_for(tbb::blocked_range<size_t>(0, nb_points), f);
-   }
-   else
-#endif
-   {
-     typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >::iterator 
-       pwns_iter = pwns_neighbors.begin();
-
-     for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); ++pwn_iter, ++pwns_iter)
-     {
-       *pwns_iter = bilateral_smooth_point_set_internal::
-         compute_kdtree_neighbors<Kernel, Tree>(*pwn_iter, tree, k);
-     }
-   }
-   
-#ifdef CGAL_PSP3_VERBOSE
-   task_timer.stop();
-   memory = CGAL::Memory_sizer().virtual_size();
-   std::cout << "done: " << task_timer.time() << " seconds, "
-             << (memory>>20) << " Mb allocated" << std::endl;
-
-   std::cout << "Compute update points and normals: " << std::endl;
-   task_timer.reset();
-   task_timer.start();
-#endif
-   // update points and normals
-   Pwns update_pwns(nb_points);
-
-#ifdef CGAL_LINKED_WITH_TBB
-   if(boost::is_convertible<Concurrency_tag, CGAL::Parallel_tag>::value)
-   {
-     //tbb::task_scheduler_init init(4);
-     tbb::blocked_range<size_t> block(0, nb_points);
-     Pwn_updater<Kernel> pwn_updater(sharpness_angle,
-                                     guess_neighbor_radius,
-                                     &pwns,
-                                     &update_pwns,
-                                     &pwns_neighbors);
-     tbb::parallel_for(block, pwn_updater);
-   }
-   else
-#endif // CGAL_LINKED_WITH_TBB
-   {
-     typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::iterator 
-       update_iter = update_pwns.begin();
-     typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >::iterator 
-       neighbor_iter = pwns_neighbors.begin();
-     for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); 
-         ++pwn_iter, ++update_iter, ++neighbor_iter)
-     {
-       *update_iter = bilateral_smooth_point_set_internal::
-         compute_denoise_projection<Kernel>
-         (*pwn_iter, 
-          *neighbor_iter, 
-          guess_neighbor_radius, 
-          sharpness_angle);
-     }
-   }
-#ifdef CGAL_PSP3_VERBOSE
-   task_timer.stop(); 
-   memory = CGAL::Memory_sizer().virtual_size();
-   std::cout << "done: " << task_timer.time() << " seconds, "
-             << (memory>>20) << " Mb allocated" << std::endl;
-#endif
-   // save results
-   FT sum_move_error = 0;
-   ForwardIterator it = first;
-   for(unsigned int i = 0 ; it != beyond; ++it, ++i)
-   {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-     Point& p = get(point_pmap, it);
-     Vector& n = get(normal_pmap, it);
-#else
-     Point& p = get(point_pmap, *it);
-     Vector& n = get(normal_pmap, *it);
-#endif
-     sum_move_error += CGAL::squared_distance(p, update_pwns[i].position());
-     p = update_pwns[i].position();
-     n = update_pwns[i].normal();
-   }
-     
-   return sum_move_error / nb_points;
-}
-
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename Concurrency_tag,
-          typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap>
-double
-bilateral_smooth_point_set(
-  ForwardIterator first,      ///< forward iterator to the first input point.
-  ForwardIterator beyond,     ///< past-the-end iterator.
-  PointPMap point_pmap,        ///< property map OutputIterator -> Point_3.
-  NormalPMap normal_pmap,    ///< property map ForwardIterator -> Vector_3.
-  const unsigned int k,      ///< number of neighbors.
-  double sharpness_angle     ///< control sharpness(0-90)
-) ///< property map OutputIterator -> Vector_3.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return bilateral_smooth_point_set<Concurrency_tag>(
-    first, beyond,
-    point_pmap,
-    normal_pmap,
-    k,
-    sharpness_angle,
-    Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Dereference_property_map.
-template <typename Concurrency_tag,
-          typename ForwardIterator,
-          typename NormalPMap>
-double
-bilateral_smooth_point_set(
-  ForwardIterator first,    ///< forward iterator to the first input point.
-  ForwardIterator beyond,   ///< past-the-end iterator.
-  const unsigned int k,     ///< number of neighbors.
-  double sharpness_angle,   ///< control sharpness(0-90)
-  NormalPMap normal_pmap)   ///< property map OutputIterator -> Vector_3.
-{
-  return bilateral_smooth_point_set<Concurrency_tag>(
-    first, beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(first),
-#else
-    make_identity_property_map(
-    typename std::iterator_traits<ForwardIterator>::value_type()),
-#endif
-    normal_pmap, 
-    k,
-    sharpness_angle);
-}
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_BILATERAL_SMOOTH_POINT_SET_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Euler_operations.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Euler_operations.h
deleted file mode 100644
index 84a36cc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Euler_operations.h
+++ /dev/null
@@ -1,1340 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Philipp Moeller
-
-#ifndef CGAL_EULER_OPERATIONS_H
-#define CGAL_EULER_OPERATIONS_H
-
-#include <stdexcept>
-
-#include <boost/graph/graph_traits.hpp>
-
-#include <CGAL/assertions.h>
-#include <CGAL/boost/graph/helpers.h>
-#include <CGAL/boost/graph/internal/helpers.h>
-
-namespace CGAL {
-
-/// \cond SKIP_IN_MANUAL
-
-namespace EulerImpl {
-
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-          Graph& g)
-{
- typedef typename boost::graph_traits<Graph> Traits;
-  typedef typename Traits::halfedge_descriptor           halfedge_descriptor;
-
-  typedef typename Traits::face_descriptor               face_descriptor;
-
-
-  halfedge_descriptor hop = opposite(h,g);
-  halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g);
-  face_descriptor f = face(h, g), f2 = face(hop, g);
-
-  internal::remove_tip(hprev, g);
-
-  internal::remove_tip(gprev, g);
-
-  if(! is_border(hop,g)){
-    remove_face(f2, g);
-  }
-  bool fnull = is_border(h,g);
-
-  
-  halfedge_descriptor hprev2 = hprev;
-  while(hprev2 != gprev) {
-    hprev2 = next(hprev2, g);
-    set_face(hprev2, f, g);
-  }
-  
-  if (! fnull)
-    set_halfedge(f, hprev, g);
-  set_halfedge(target(hprev,g), hprev, g);
-  set_halfedge(target(gprev,g), gprev, g);
-  //  internal::set_constant_vertex_is_border(g, target(h, g));
-  //  internal::set_constant_vertex_is_border(g, target(opposite(h, g), g));
-
-  remove_edge(edge(h, g), g);
-  return hprev;
-
-}
-} // namespace EulerImpl
-
-/// \endcond
-
-  namespace Euler {
-/// \ingroup PkgBGLEulerOperations
-/// @{
-
-template<typename Graph, typename P>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-make_tetrahedron(Graph& g, const P& p0, const P& p1, const P& p2, const P& p3)
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-  typedef typename Traits::vertex_descriptor               vertex_descriptor;
-  typedef typename Traits::face_descriptor               face_descriptor;
-  typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
-
-  Point_property_map ppmap = get(CGAL::vertex_point, g);
-  vertex_descriptor v0, v1, v2, v3, v4;
-  v0 = add_vertex(g);
-  v1 = add_vertex(g);
-  v2 = add_vertex(g);
-  v3 = add_vertex(g);
-
-  ppmap[v0] = p0;
-  ppmap[v1] = p1;
-  ppmap[v2] = p2;
-  ppmap[v3] = p3;
-  halfedge_descriptor h0 = halfedge(add_edge(g),g);
-  halfedge_descriptor h1 = halfedge(add_edge(g),g);
-  halfedge_descriptor h2 = halfedge(add_edge(g),g);
-  set_next(h0, h1, g);
-  set_next(h1, h2, g);
-  set_next(h2, h0, g);
-  set_target(h0, v1, g);
-  set_target(h1, v2, g);
-  set_target(h2, v0, g);
-  set_halfedge(v1, h0, g);
-  set_halfedge(v2, h1, g);
-  set_halfedge(v0, h2, g);
-  face_descriptor f = add_face(g);
-  set_face(h0,f,g);
-  set_face(h1,f,g);
-  set_face(h2,f,g);
-  set_halfedge(f,h0,g);
-  h0 = opposite(h0,g);
-  h1 = opposite(h1,g);
-  h2 = opposite(h2,g);
-  set_target(h0, v0, g);
-  set_target(h1, v1, g);
-  set_target(h2, v2, g);
-  halfedge_descriptor h3 = halfedge(add_edge(g),g);
-  halfedge_descriptor h4 = halfedge(add_edge(g),g);
-  halfedge_descriptor h5 = halfedge(add_edge(g),g);
-  set_target(h3, v3, g);
-  set_target(h4, v3, g);
-  set_target(h5, v3, g);
-  set_halfedge(v3, h3, g);
-  
-  set_next(h0, h3, g);
-  set_next(h1, h4, g);
-  set_next(h2, h5, g);
-
-  set_next(h3, opposite(h4,g), g);
-  set_next(h4, opposite(h5,g), g);
-  set_next(h5, opposite(h3,g), g);
-  set_next(opposite(h4,g), h0, g);
-  set_next(opposite(h5,g), h1, g);
-  set_next(opposite(h3,g), h2, g);
-
-  set_target(opposite(h3,g), v0, g);
-  set_target(opposite(h4,g), v1, g);
-  set_target(opposite(h5,g), v2, g);
-
-  f = add_face(g);
-  set_halfedge(f,h0,g);
-  set_face(h0, f, g);
-  set_face(h3, f, g);
-  set_face(opposite(h4,g), f, g);
-  f = add_face(g);
-  set_halfedge(f,h1,g);
-  set_face(h1, f, g);
-  set_face(h4, f, g);
-  set_face(opposite(h5,g), f, g);
-  f = add_face(g);
-  set_halfedge(f,h2,g);
-  set_face(h2, f, g);
-  set_face(h5, f, g);
-  set_face(opposite(h3,g), f, g);
-  
-  return h0;
-}
-
-
-/**  
- * joins the two vertices incident to `h`, (that is `source(h, g)` and
- * `target(h, g)`) and removes `source(h,g)`. Returns the predecessor
- * of `h` around the vertex, i.e., `prev(opposite(h,g))`.  The
- * invariant `join_vertex(split_vertex(h,g),g)` returns `h`.  The
- * time complexity is linear in the degree of the vertex removed.
- *
- * \image html join_vertex.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \param g the graph
- * \param h the halfedge which incident vertices are joint
- *
- * \returns `prev(opposite(h,g))`
- *
- * \pre The size of the faces incident to `h` and `opposite(h,g)` is at least 4.
- *
- * \post `source(h, g)` is invalidated
- * \post `h` is invalidated 
- * 
- * \sa `split_vertex()`
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-join_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-            Graph& g)
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-  typedef typename Traits::vertex_descriptor               vertex_descriptor;
-  typedef Halfedge_around_target_iterator<Graph>           halfedge_around_vertex_iterator;
-
-  halfedge_descriptor hop = opposite(h, g)
-    , hprev = prev(hop, g)
-    , gprev = prev(h, g)
-    , hnext = next(hop, g)
-    , gnext = next(h, g);
-  vertex_descriptor v_to_remove = target(hop, g)
-    , v = target(h, g);
-
-  // this assertion fires needlessly
-  // CGAL_precondition(std::distance(
-  //                     halfedges_around_face(e, g).first,
-  //                     halfedges_around_face(e, g).second) >= 4);
-
-  CGAL_assertion( halfedge(v_to_remove, v, g).first == h );
-
-  halfedge_around_vertex_iterator ieb, iee;
-  for(boost::tie(ieb, iee) = halfedges_around_target(hop, g); ieb != iee; ++ieb) {
-    CGAL_assertion( target(*ieb,g) == v_to_remove);
-    set_target(*ieb ,v , g);
-  }
-
-  set_next(hprev, hnext, g);
-  set_next(gprev, gnext, g);
-  set_halfedge(v, gprev, g);
-  // internal::set_constant_vertex_is_border(g, v);
-
-  remove_edge(edge(h, g), g);
-  remove_vertex(v_to_remove, g);
-
-  return hprev;
-}
-
-
-
-/** 
- * splits the target vertex `v` of `h1` and `h2`, and connects the new vertex
- * and `v` with a new edge. Let `hnew` be `opposite(next(h1, g), g)` after the
- * split. The split regroups the halfedges around the two vertices. The
- * edge sequence `hnew`, `opposite(next(h2, g), g)`, ..., `h1`
- * remains around the old vertex, while the halfedge sequence
- * `opposite(hnew, g)`, `opposite(next(h1, g), g)` (before the
- * split), ..., `h2` is regrouped around the new vertex. The split
- * returns `hnew`, i.e., the new edge incident to vertex `v`. The
- * time is proportional to the distance from `h1` to `h2` around the
- * vertex.
- *
- * \image html split_vertex.svg
- *
- * \tparam Graph must be a model of  `MutableFaceGraph`
- *
- * \param g the graph
- * \param h1 halfedge descriptor
- * \param h2 halfedge descriptor
- *
- * \returns `hnew`
- *
- * \pre `target(h1, g) == target(h2, g)`, that is  `h1` and `h2` are incident to the same vertex
- * \pre `h1 != h2`, that is no antennas
- *
- * \sa `join_vertex()`
- *
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-split_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-             typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-             Graph& g)
-{
-  CGAL_assertion(h1 != h2);
-  CGAL_assertion(target(h1, g) == target(h2, g));
-
-  typename boost::graph_traits<Graph>::halfedge_descriptor 
-    hnew = halfedge(add_edge(g), g),
-    hnewopp = opposite(hnew, g);
-  typename boost::graph_traits<Graph>::vertex_descriptor
-    vnew = add_vertex(g);
-  internal::insert_halfedge(hnew, h2, g);
-  internal::insert_halfedge(hnewopp, h1, g);
-  set_target(hnew, target(h1, g), g);
-  
-  typename boost::graph_traits<Graph>::halfedge_descriptor 
-    end = hnewopp;
-  do
-  {
-    set_target(hnewopp, vnew, g);
-    hnewopp = opposite(next(hnewopp, g), g);
-  } while (hnewopp != end);
-
-  internal::set_vertex_halfedge(hnew, g);
-  // internal::set_constant_vertex_is_border(g, target(hnew, g));
-  internal::set_vertex_halfedge(hnewopp, g);
-  // internal::set_constant_vertex_is_border(g, target(hnewopp, g));
-  return hnew;
-}
-
-/**
- * splits the halfedge `h` into two halfedges inserting a new vertex that is a copy of `vertex(opposite(h,g),g)`.
- * Is equivalent to `opposite(split_vertex( prev(h,g), opposite(h,g),g), g)`.
- * \returns the new halfedge `hnew` pointing to the inserted vertex. The new halfedge is followed by the old halfedge, i.e., `next(hnew,g) == h`.
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-split_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g)
-{ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); }
-
-
-/**
- * joins the two faces incident to `h` and `opposite(h,g)`. 
- * The faces may be holes.
- *
- * If `Graph` is a model of `MutableFaceGraph`
- * the face incident to `opposite(h,g)` is removed.
- *
- * `join_face()` and `split_face()` are inverse operations, that is
- * `join_face(split_face(h,g),g)` returns `h`.
- *
- * \image html join_face.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`.
- * \param g the graph
- * \param h the halfedge incident to one of the faces to be joined.
- *
- * \returns `prev(h,g)`
- *
- * \pre `out_degree(source(h,g)), g)) >= 3`
- * \pre `out_degree(target(h,g)) >= 3`
- *
- * \sa `split_face()`
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-          Graph& g)
-{
-  return EulerImpl::join_face(h,g);
-}
-
-
-
-/**
- * splits the face incident to `h1` and `h2`.  Creates the opposite
- * halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`.
- * Performs the inverse operation to `join_face()`. 
- *
- * If `Graph` is a model of `MutableFaceGraph` and if the update of faces is not disabled
- * a new face incident to `h4` is added. 
- *
- * \image html split_face.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \param g the graph
- * \param h1
- * \param h2
- *
- * \returns `h3`
- *
- * \pre `h1` and `h2` are incident to the same face
- * \pre `h1 != h2`
- * \pre `next(h1,g) != h2` and `next(h2,g) != h1` (no loop)
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-split_face(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-           typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-           Graph& g)
-{ 
-  typedef typename boost::graph_traits<Graph> Traits;
-  typedef typename Traits::halfedge_descriptor halfedge_descriptor;
-  typedef typename Traits::face_descriptor face_descriptor;
-  halfedge_descriptor hnew = halfedge(add_edge(g), g);
-  face_descriptor fnew = add_face(g);
-  internal::insert_tip( hnew, h2, g);
-  internal::insert_tip( opposite(hnew, g), h1, g);
-  set_face( hnew, face(h1,g), g);
-  internal::set_face_in_face_loop(opposite(hnew,g), fnew, g);
-  set_halfedge(face(hnew,g), hnew, g);
-  set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
-  return hnew; 
-}
-
-  
-/**
- * glues the cycle of halfedges of `h1` and `h2` together.
- * The vertices in the cycle of `h2` get removed.
- * If `h1` or `h2` are not border halfedges their faces get removed.
- * The vertices on the face cycle of `h1` get removed.
- * The invariant `join_loop(h1, split_loop(h1,h2,h3,g), g)` returns `h1` and keeps 
- * the graph unchanged.
- * 
- * \image html join_loop.svg
- *
- * \tparam Graph must be a `MutableFaceGraph`
- *
- * \returns `h1`. 
- *
- * \pre The faces incident to `h` and `g` are different and have equal number of edges.
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-join_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-          typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-          Graph& g)
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-
-  CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g));
-  if (! is_border(h1,g))
-    remove_face(face(h1, g), g);
-  if (! is_border(h2,g))
-    remove_face(face(h2,g), g);
-  halfedge_descriptor hi = h1;
-  halfedge_descriptor gi = h2;
-  CGAL_assertion_code( std::size_t termination_count = 0;)
-  do {
-    CGAL_assertion( ++termination_count != 0);
-    halfedge_descriptor hii = hi;
-    halfedge_descriptor gii = gi;
-    hi = next(hi, g);
-    // gi = find_prev(gi); // Replaced by search around vertex.
-    set_face( hii, face( opposite(gii, g), g), g);
-    set_halfedge(face(hii, g), hii, g);
-    remove_vertex(target(opposite(gii, g), g), g);
-    if ( next(opposite(next(opposite(gii,g), g), g), g) == gii) {
-      gi = opposite(next(opposite(gii,g),g), g);
-    } else {
-      set_next(hii, next(opposite(gii,g), g), g);
-      gii = opposite(next(opposite(gii, g), g), g);
-      set_target( gii, target(hii, g), g);
-      while ( next(opposite(next(gii, g), g), g) != gi) {
-        CGAL_assertion( ++termination_count != 0);
-        gii = opposite(next(gii,g), g);
-        set_target( gii, target(hii, g), g);
-      }
-      gi = opposite(next(gii,g), g);
-      set_next(gii, hi, g);
-    }
-  } while ( hi != h1);
-  CGAL_assertion( gi == h2);
-  do {
-    halfedge_descriptor gii = gi;
-    gi = next(gi, g);
-    remove_edge(edge(gii,g), g);
-  } while ( gi != h2);
-  return h1;
-}
-
-
-/**
- * cuts the graph along the cycle `(h1,h2,h3)` changing the genus 
- * (halfedge `h3` runs on the backside of the three dimensional figure below).
- * Three new vertices, three new pairs of halfedges,
- * and two new triangular faces are created.
- *
- * `h1`, `h2`, and `h3` will be incident to the first new face. 
- *
- * Note that `split_loop()` does not deal with properties of new vertices, halfedges, and faces.
- *
- * \image html split_loop.svg
- * 
- * \tparam Graph must be a `MutableFaceGraph`
- *
- * \returns the halfedge incident to the second new face.
- *
- * \pre `h1`, `h2`, and `h3` denote distinct, consecutive halfedges of the graph 
- * and form a cycle: i.e., `target(h1) == target(opposite(h2,g),g)`, … , 
- * `target(h3,g) == target(opposite(h1,g),g)`. 
- * \pre The six faces incident to `h1`, `h2`, and `h3` are all distinct.
- */
-  template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-split_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-           typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-           typename boost::graph_traits<Graph>::halfedge_descriptor h3,
-           Graph& g)
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-  typedef typename Traits::face_descriptor                 face_descriptor;
-
-  halfedge_descriptor h = h1, i = h2, j = h3;
-   CGAL_precondition( h != i);
-        CGAL_precondition( h != j);
-        CGAL_precondition( i != j);
-        CGAL_precondition( target(h,g) == target(opposite(i,g),g));
-        CGAL_precondition( target(i,g) == target(opposite(j,g),g));
-        CGAL_precondition( target(j,g) == target(opposite(h,g),g));
-        // Create a copy of the triangle.
-        halfedge_descriptor hnew = internal::copy(h,g);
-        halfedge_descriptor inew = internal::copy(i,g);
-        halfedge_descriptor jnew = internal::copy(j,g);
-        internal::close_tip( hnew, add_vertex(g), g);
-        internal::close_tip( inew, add_vertex(g), g);
-        internal::close_tip( jnew, add_vertex(g), g);
-        internal::insert_tip( opposite(inew, g), hnew, g);
-        internal::insert_tip( opposite(jnew, g), inew, g);
-        internal::insert_tip( opposite(hnew, g), jnew, g);
-        // Make the new incidences with the old stucture.
-        CGAL_assertion_code( std::size_t termination_count = 0;)
-          if ( next(h,g) != i) {
-            halfedge_descriptor nh = next(h, g);
-            set_next(h, i, g);
-            set_next(hnew, nh, g);
-            nh = opposite(nh, g);
-            while ( next(nh, g) != i) {
-                CGAL_assertion( ++termination_count != 0);
-                set_target( nh, target(hnew,g), g);
-                nh = opposite(next(nh, g), g);
-            }
-            set_target( nh, target(hnew,g), g);
-            set_next(nh, inew, g);
-        }
-        if ( next(i, g) != j) {
-          halfedge_descriptor nh = next(i, g);
-          set_next(i, j, g);
-          set_next(inew, nh, g);
-          nh = opposite(nh,g);
-          while ( next(nh,g) != j) {
-                CGAL_assertion( ++termination_count != 0);
-                set_target( nh, target(inew, g), g);
-                nh = opposite(next(nh, g), g);
-            }
-          set_target( nh, target(inew, g), g);
-          set_next(nh, jnew, g);
-
-        }
-        if ( next(j,g) != h) {
-          halfedge_descriptor nh = next(j, g);
-          set_next(j, h, g);
-          set_next(jnew, nh, g);
-          nh = opposite(nh, g);
-          while ( next(nh,g) != h) {
-                CGAL_assertion( ++termination_count != 0);
-                set_target( nh, target(jnew, g), g);
-                nh = opposite(next(nh, g), g);
-            }
-          set_target(nh, target(jnew, g), g);
-          set_next(nh, hnew, g);
-        }
-        // Fill the holes with two new faces.
-        face_descriptor f = add_face(g);
-        set_face( h, f, g);
-        set_face( i, f, g);
-        set_face( j, f, g);
-        set_halfedge(face(h,g), h, g);
-        f = add_face(g);
-        set_face( opposite(hnew, g), f, g);
-        set_face( opposite(inew, g), f, g);
-        set_face( opposite(jnew, g), f, g);
-        set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
-        // Take care of maybe changed halfedge pointers.
-        set_halfedge(face(hnew, g), hnew, g);
-        set_halfedge(face(inew, g), inew, g);
-        set_halfedge(face(jnew, g), jnew, g);
-        set_halfedge(target(hnew, g), hnew, g);
-        set_halfedge(target(inew, g), inew, g);
-        set_halfedge(target(jnew, g), jnew, g);
-        return opposite(hnew, g);
-}
-
-
-/**
- * removes the incident face of `h` and changes all halfedges incident to the face into border halfedges 
- * or removes them from the graph if they were already border halfedges.
- *
- * If this creates isolated vertices they get removed as well. 
- *
- * \image html remove_face.svg
- * \image html remove_face_and_vertex.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \pre `h` is not a border halfedge
- *
- * \sa `make_hole()` for a more specialized variant.
- */
-template< typename Graph >
-void remove_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-                 Graph& g)
-{
-  typedef typename boost::graph_traits<Graph>            Traits;
-  typedef typename Traits::halfedge_descriptor           halfedge_descriptor;
-  typedef typename Traits::face_descriptor               face_descriptor;
-
-  CGAL_precondition(! is_border(h,g));
-  face_descriptor f = face(h, g);
-
-  halfedge_descriptor end = h;
-  do {
-    internal::set_border(h,g);
-    halfedge_descriptor nh = next(h, g);
-    bool h_border = is_border(opposite(h, g),g);
-    bool nh_bborder = is_border(opposite(nh, g),g);
-
-    if(h_border && nh_bborder && next(opposite(nh, g), g) == opposite(h, g)) {
-      remove_vertex(target(h, g), g);
-      if(h != end)
-        remove_edge(edge(h, g), g);
-    } else {
-      if(nh_bborder) {
-        internal::set_vertex_halfedge(opposite(next(opposite(nh, g), g), g), g);
-        internal::remove_tip(h, g);
-        //internal::set_constant_vertex_is_border(g, target(h, g));
-      }
-      if(h_border) {
-        internal::set_vertex_halfedge(opposite(next(h, g), g), g);
-        internal::remove_tip(prev(opposite(h, g), g), g);
-        //internal::set_constant_vertex_is_border(g, target(prev(opposite(h, g), g), g));
-        if(h != end)
-          remove_edge(edge(h, g), g);
-      }
-    }
-    h = nh;
-  } while(h != end);
-  remove_face(f, g);
-  if(is_border(opposite(h, g),g))
-    remove_edge(edge(h, g), g);
-}
-
-  /**
-   * removes the incident face of `h` and changes all halfedges incident to the face into border halfedges. See `remove_face(g,h)` for a more generalized variant.
-   * \returns `h`.
-   *
-   * \pre None of the incident halfedges of the face is a border halfedge.
-   */
-template< typename Graph>
-void make_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-               Graph& g)
-{
-  typedef typename boost::graph_traits<Graph>            Traits;
-  typedef typename Traits::face_descriptor               face_descriptor;
-  typedef Halfedge_around_face_iterator<Graph>           halfedge_around_face_iterator;
-
-  CGAL_precondition(! is_border(h,g));
-  face_descriptor fd = face(h, g);
-  halfedge_around_face_iterator hafib, hafie;
-  for(boost::tie(hafib, hafie) = halfedges_around_face(h, g); 
-      hafib != hafie; 
-      ++hafib){
-    CGAL_assertion(! is_border(opposite(*hafib,g),g));
-    internal::set_border(*hafib, g);
-  }
-  remove_face(fd,g);  
-}
-
-
-
-/** 
- * creates a barycentric triangulation of the face incident to `h`. Creates a new
- * vertex and connects it to each vertex incident to `h` and splits `face(h, g)` 
- * into triangular faces.
- * `h` remains incident to
- * the original face. The time complexity is linear in the size of the face.
- *
- * \image html add_center_vertex.svg
- *
- * \returns the halfedge `next(h, g)` after the
- * operation, i.e., a halfedge pointing to the new vertex. 
- *
- * Note that `add_center_vertex()` does not deal with properties of new vertices, 
- * halfedges, and faces. 
- *  \pre `h` is not a border halfedge.
- *
- * \param g the graph
- * \param h halfedge descriptor
- * \tparam Graph must be a model of `MutableFaceGraph`
- * \sa `remove_center_vertex()`
- *
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-add_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-                  Graph& g) 
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::vertex_descriptor               vertex_descriptor;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-  typedef typename Traits::face_descriptor                 face_descriptor;
-
-  halfedge_descriptor hnew = halfedge(add_edge(g),g);
-  vertex_descriptor vnew = add_vertex(g);
-  internal::close_tip(hnew, vnew, g);
-  internal::insert_tip(opposite(hnew, g), h, g);
-  set_face(hnew, face(h, g), g);
-  set_halfedge(face(h,g), h, g);
-  halfedge_descriptor h2 = next(opposite(hnew, g), g);
-  while ( next(h2, g) != hnew) {
-    halfedge_descriptor gnew = halfedge(add_edge(g),g);
-    internal::insert_tip( gnew, hnew, g);
-    internal::insert_tip( opposite(gnew,g), h2, g);
-    face_descriptor fnew = add_face(g);
-    set_face( h2, fnew, g);
-    set_face( gnew, fnew, g);
-    set_face( next(gnew,g), fnew, g);
-    set_halfedge(face(h2, g), h2, g);
-    h2 = next(opposite(gnew, g), g);
-  }
-  set_face(next(hnew,g), face(hnew,g), g);
-  internal::set_vertex_halfedge(hnew, g);
-  return hnew;
-}
-
-/**
- * removes the vertex `target(h, g)` and all incident halfedges thereby merging all
- * incident faces.   The resulting face may not be triangulated. 
- * This function is the inverse operation of `add_center_vertex()`. 
- * The invariant `h == remove_center_vertex(add_center_vertex(h,g),g)` 
- * holds, if `h` is not a border halfedge. 
- *
- * \image html remove_center_vertex.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \param g the graph
- * \param h halfedge descriptor
- *
- * \returns `prev(h, g)`
- *
- * \pre None of the incident faces of `target(h,g)` is a
- * hole. There are at least two distinct faces incident to the faces
- * that are incident to `target(h,g)`. (This prevents the
- * operation from collapsing a volume into two faces glued together
- * with opposite orientations, such as would happen with any vertex of
- * a tetrahedron.)
- *
- * \sa `add_center_vertex()`
- *
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-remove_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-                     Graph& g) 
-{
-  typedef typename boost::graph_traits<Graph>              Traits;
-  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
-
-  // h points to the vertex that gets removed
-  halfedge_descriptor h2    = opposite(next(h, g), g);
-  halfedge_descriptor hret = prev(h, g);
-  while (h2 != h) {
-    halfedge_descriptor gprev = prev(h2, g);
-    internal::set_vertex_halfedge(gprev, g);
-    internal::remove_tip(gprev, g);
-
-    remove_face(face(h2, g), g);
-
-    halfedge_descriptor gnext = opposite(next(h2, g), g);
-    remove_edge(edge(h2,g), g);
-    h2 = gnext;
-  }
-  internal::set_vertex_halfedge(hret, g);
-  internal::remove_tip(hret, g);
-  remove_vertex(target(h, g), g);
-  remove_edge(edge(h, g), g);
-  internal::set_face_in_face_loop(hret, face(hret, g), g);
-  set_halfedge(face(hret, g), hret, g);
-  return hret;
-}
-
-/**
- * appends a new face to the border halfedge `h2` by connecting 
- * the tip of `h2` with the tip of `h1` with two new halfedges and a new vertex 
- * and creating a new face that is incident to `h2`. 
- * Note that `add_vertex_and_face_to_border()` does not deal with properties of new 
- * vertices, halfedges, and faces.
- * 
- * \image html add_vertex_and_face_to_border.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \returns the halfedge of the new edge that is incident to the new face
- * and the new vertex.
- *
- * \pre `h1` and `h2` are border halfedges
- * \pre `h1 != h2`,
- * \pre `h1` and `h2` are on the same border.
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-                              typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-                              Graph& g)
-{
-  typename boost::graph_traits<Graph>::vertex_descriptor v = add_vertex(g);
-  typename boost::graph_traits<Graph>::face_descriptor f = add_face(g);
-  typename boost::graph_traits<Graph>::edge_descriptor e1 = add_edge(g);
-  typename boost::graph_traits<Graph>::edge_descriptor e2 = add_edge(g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor he1= halfedge(e1, g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor he2= halfedge(e2, g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor ohe1= opposite(he1, g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor ohe2= opposite(he2, g);
-
-  set_next(he1, next(h1,g),g);
-  set_next(h1,ohe1,g);
-  set_target(he1,target(h1,g),g);
-  set_target(ohe1,v,g);
-
-  set_next(he2,he1,g);
-  set_next(ohe1,ohe2,g);
-  set_target(he2,v,g);
-  set_halfedge(v,ohe1,g);
-  set_next(ohe2,next(h2,g),g);
-  set_target(ohe2,target(h2,g),g);
-  set_next(h2,he2,g);
-  internal::set_border(ohe1,g);
-  internal::set_border(ohe2,g);
-
-  CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
-  for(boost::tie(hafib, hafie) = halfedges_around_face(he1, g);
-      hafib != hafie;
-      ++hafib){
-    set_face(*hafib, f, g);
-  }
-  set_halfedge(f, he1, g);
-  return ohe2;
-}
-
-
-/**
- * appends a new face incident to the border halfedge `h1` and `h2` by connecting the vertex `target(h2,g)` 
- * and the vertex `target(h1,g)` with a new halfedge, and filling this separated part of the hole 
- * with a new face, such that the new face is incident to `h2`. 
- *
- * \image html add_face_to_border.svg
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- *
- * \returns the halfedge of the new edge that is incident to the new face.
- *
- * \pre  `h1` and `h2` are border halfedges, 
- * \pre `h1 != h2`, 
- * \pre `next(h1,g) != h2`,
- * \pre `h1` and `h2` are on the same border.
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-add_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
-                   typename boost::graph_traits<Graph>::halfedge_descriptor h2,
-                   Graph& g)
-{
-  CGAL_precondition(is_border(h1,g) == true);
-  CGAL_precondition(is_border(h2,g) == true);
-  CGAL_precondition(h1 != h2);
-  CGAL_precondition(next(h1, g) != h2);
-
-  typename boost::graph_traits<Graph>::face_descriptor f = add_face(g);
-  typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor 
-      newh= halfedge(e, g)
-    , newhop = opposite(newh, g);
-
-  set_next(newhop, next(h2, g), g);
-
-  set_next(h2, newh, g);
-  
-  set_next(newh, next(h1, g), g);
-
-  set_next(h1, newhop, g);
-  
-  set_target(newh, target(h1, g), g);
-  set_target(newhop, target(h2, g), g);
-
-  // make the vertices point to the border halfedge
-  set_halfedge(target(h2,g), newhop, g);
-  internal::set_border(newhop, g);
-
-  CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
-  for(boost::tie(hafib, hafie) = halfedges_around_face(newh, g); 
-      hafib != hafie; 
-      ++hafib){
-    set_face(*hafib, f, g);
-  }
-
-  set_halfedge(f, newh, g);
-
-  return newh;
-}
-
-
-/**
- * collapses an edge in a graph.
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- * Let `v0` and `v1` be the source and target vertices, and let `e` and `e'` be the halfedges of edge `v0v1`.
- *
- * For `e`, let `en` and `ep` be the next and previous
- * halfedges, that is `en = next(e, g)`, `ep = prev(e, g)`, and let
- * `eno` and `epo` be their opposite halfedges, that is
- * `eno = opposite(en, g)` and `epo = opposite(ep, g)`.
- * Analoguously, for `e'` define  `en'`, `ep'`, `eno'`, and  `epo'`.
- *
- * Then, after the collapse of edge `v0v1` the following holds for `e` (and analoguously for `e'`)
- *
- * <UL>
- *   <LI>The edge `v0v1` is no longer in `g`.
- *   <LI>The faces incident to edge `v0v1` are no longer in `g`.
- *   <LI>Either `v0`, or `v1` is no longer in `g` while the other remains.
- *       Let `vgone` be the removed vertex and `vkept` be the remaining vertex.
- *   <LI>If `e` was a border halfedge, that is `is_border(e, g) == true`, then `next(ep,g) == en`, and `prev(en,g) == ep`.
- *   <LI>If `e` was not a border halfedge, that is `is_border(e, g) == false`, then `ep` and `epo` are no longer in `g` while `en` and `eno` are kept in `g`.
- *   <LI>For all halfedges `hv` in `halfedges_around_target(vgone, g)`, `target(*hv, g) == vkept` and `source(opposite(*hv, g), g) == vkept`.
- *   <LI>No other incidence information has changed in `g`.
- * </UL>
- * \returns vertex `vkept` (which can be either `v0` or `v1`).
- * \pre g must be a triangulated graph
- * \pre `satisfies_link_condition(v0v1,g) == true`.
- */
-template<typename Graph>
-typename boost::graph_traits<Graph>::vertex_descriptor
-collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
-              Graph& g)
-{
-  typedef boost::graph_traits< Graph > Traits;
-  typedef typename Traits::vertex_descriptor          vertex_descriptor;
-  typedef typename Traits::halfedge_descriptor            halfedge_descriptor;
-
-  halfedge_descriptor pq = halfedge(v0v1,g);
-  halfedge_descriptor qp = opposite(pq, g);
-  halfedge_descriptor pt = opposite(prev(pq, g), g);
-  halfedge_descriptor qb = opposite(prev(qp, g), g);
-  
-  bool lTopFaceExists         = ! is_border(pq,g);
-  bool lBottomFaceExists      = ! is_border(qp,g);
-  bool lTopLeftFaceExists     = lTopFaceExists    && ! is_border(pt,g);
-  bool lBottomRightFaceExists = lBottomFaceExists && ! is_border(qb,g);
-
-  CGAL_precondition( !lTopFaceExists    || (lTopFaceExists    && ( degree(target(pt, g), g) > 2 ) ) ) ;
-  CGAL_precondition( !lBottomFaceExists || (lBottomFaceExists && ( degree(target(qb, g), g) > 2 ) ) ) ;
-
-  vertex_descriptor q = target(pq, g);
-  vertex_descriptor p = source(pq, g);
-#if 0
-  if(lTopLeftFaceExists && lBottomRightFaceExists){
-    std::cerr <<    " // do it low level" << std::endl;
-    halfedge_descriptor qt = next(pq,g);
-    halfedge_descriptor pb = next(qp,g);
-    halfedge_descriptor ppt = prev(pt,g);
-    halfedge_descriptor pqb = prev(qb,g);
-    if(halfedge(q,g) == pq){
-      set_halfedge(q, pqb,g);
-    }
-    vertex_descriptor t = target(qt,g);
-    if(halfedge(t,g) == pt){
-      set_halfedge(t, qt,g);
-    } 
-    vertex_descriptor b = target(pb,g);
-    if(halfedge(b,g) == qb){
-      set_halfedge(t, pb,g);
-    }
-    set_face(qt, face(pt,g),g);
-    set_halfedge(face(qt,g),qt,g);
-    set_face(pb, face(qb,g),g);
-    set_halfedge(face(pb,g),pb,g);
-    set_next(qt, next(pt,g),g);
-    set_next(pb, next(qb,g),g);
-    set_next(ppt, qt,g);
-    set_next(pqb,pb,g);
-    remove_face(face(pq,g),g);
-    remove_face(face(qp,g),g);
-    remove_edge(v0v1,g);
-    remove_edge(edge(pt,g),g);
-    remove_edge(edge(qb,g),g);
-    remove_vertex(p,g);
-    Halfedge_around_target_circulator<Graph> beg(ppt,g), end(pqb,g);
-    while(beg != end){
-      assert(target(*beg,g) == p);
-      set_target(*beg,q,g);
-      --beg;
-    }
-
-    return q;
-    // return the vertex kept
-  }
-#endif
-
-  bool lP_Erased = false, lQ_Erased = false ;
-
-  if ( lTopFaceExists )
-  { 
-    CGAL_precondition( ! is_border(opposite(pt, g),g) ) ; // p-q-t is a face of the mesh
-    if ( lTopLeftFaceExists )
-    {
-      //CGAL_ECMS_TRACE(3, "Removing p-t E" << pt.idx() << " (V" 
-      //                << p.idx() << "->V" << target(pt, g).idx() 
-      //                << ") by joining top-left face" ) ;
-
-      join_face(pt,g);
-    }
-    else
-    {
-      //CGAL_ECMS_TRACE(3, "Removing p-t E" << pt.idx() << " (V" << p.idx() 
-      //                << "->V" << target(pt, g).idx() << ") by erasing top face" ) ;
-
-      remove_face(opposite(pt, g),g);
-
-      if ( !lBottomFaceExists )
-      {
-        //CGAL_ECMS_TRACE(3, "Bottom face doesn't exist so vertex P already removed" ) ;
-
-        lP_Erased = true ;
-      }  
-    } 
-  }
-
-  if ( lBottomFaceExists )
-  {   
-    CGAL_precondition( ! is_border(opposite(qb, g),g) ) ; // p-q-b is a face of the mesh
-    if ( lBottomRightFaceExists )
-    {
-      //CGAL_ECMS_TRACE(3, "Removing q-b E" << qb.idx() << " (V" 
-      //                << q.idx() << "->V" << target(qb, g).idx() 
-      //                << ") by joining bottom-right face" ) ;
-
-      join_face(qb,g);
-    }
-    else
-    {
-      //CGAL_ECMS_TRACE(3, "Removing q-b E" << qb.idx() << " (V" 
-      //                << q.idx() << "->V" << target(qb, g).idx() 
-      //                << ") by erasing bottom face" ) ;
-
-      remove_face(opposite(qb, g),g);
-
-      if ( !lTopFaceExists )
-      {
-        //CGAL_ECMS_TRACE(3, "Top face doesn't exist so vertex Q already removed" ) ;
-        lQ_Erased = true ;
-      }  
-    }
-  }
-
-  CGAL_assertion( !lP_Erased || !lQ_Erased ) ;
-
-  if ( !lP_Erased && !lQ_Erased )
-  {
-    //CGAL_ECMS_TRACE(3, "Removing vertex P by joining pQ" ) ;
-
-    join_vertex(pq,g);
-    lP_Erased = true ;
-  }    
-  
-  CGAL_assertion(is_valid(g));
-
-  return lP_Erased ? q : p ;
-}
-
-/**
- * Collapses the edge `v0v1` replacing it with v0 or v1, as described in the paragraph above
- * and guarantees that an edge `e2`, for which `get(edge_is_constrained_map, e2)==true`, 
- * is not removed after the collapse.
- * 
- *
- * \tparam Graph must be a model of `MutableFaceGraph`
- * \tparam EdgeIsConstrainedMap mut be a model of `ReadablePropertyMap` with the edge descriptor of `Graph` 
- *       as key type and a Boolean as value type. It indicates if an edge is constrained or not. 
- *
- * \pre This function requires `g` to be an oriented 2-manifold with or without boundaries. 
- *       Furthermore, the edge `v0v1` must satisfy the link condition, which guarantees that the surface mesh is also 2-manifold after the edge collapse. 
- * \pre `get(edge_is_constrained_map, v0v1)==false`. 
- * \pre  `v0` and `v1` are not both incident to a constrained edge. 
- */
-
-template<typename Graph, typename EdgeIsConstrainedMap>
-typename boost::graph_traits<Graph>::vertex_descriptor
-collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
-              Graph& g
-              , EdgeIsConstrainedMap Edge_is_constrained_map)
-{
-  typedef boost::graph_traits< Graph > Traits;
-  typedef typename Traits::vertex_descriptor          vertex_descriptor;
-  typedef typename Traits::halfedge_descriptor            halfedge_descriptor;
-
-  halfedge_descriptor pq = halfedge(v0v1,g);
-  CGAL_assertion( !get(Edge_is_constrained_map,v0v1) );
-
-  halfedge_descriptor qp = opposite(pq,g);
-  halfedge_descriptor pt = opposite(prev(pq,g),g);
-  halfedge_descriptor qb = opposite(prev(qp,g),g);
-  halfedge_descriptor tq = opposite(next(pq,g),g);
-  halfedge_descriptor bp = opposite(next(qp,g),g);
-
-  bool lTopFaceExists         = ! is_border(pq,g) ;
-  bool lBottomFaceExists      = ! is_border(qp,g) ;
-
-  vertex_descriptor q = target(pq,g);
-  vertex_descriptor p = source(pq,g);
-
-  //used to collect edges to remove from the surface
-  halfedge_descriptor edges_to_erase[2];
-  halfedge_descriptor* edges_to_erase_ptr=edges_to_erase;
-
-  // If the top facet exists, we need to choose one out of the two edges which one disappears:
-  //   p-t if it is not constrained and t-q otherwise
-  if ( lTopFaceExists )
-  {
-    if ( !get(Edge_is_constrained_map,edge(pt,g)) )
-    {
-      *edges_to_erase_ptr++=pt;
-    }
-    else
-    {
-      *edges_to_erase_ptr++=tq;
-    }
-  }
-
-  // If the bottom facet exists, we need to choose one out of the two edges which one disappears:
-  //   q-b if it is not constrained and b-p otherwise
-  if ( lBottomFaceExists )
-  {
-    if ( !get(Edge_is_constrained_map,edge(qb,g)) )
-    {
-      *edges_to_erase_ptr++=qb;
-    }
-    else{
-      *edges_to_erase_ptr++=bp;
-    }
-  }
-
-  if (lTopFaceExists && lBottomFaceExists)
-  {
-    if ( face(edges_to_erase[0],g) == face(edges_to_erase[1],g)
-         && (! is_border(edges_to_erase[0],g)) )
-    {
-      // the vertex is of valence 3 and we simply need to remove the vertex
-      // and its indicent edges
-      bool lP_Erased = false;
-      halfedge_descriptor edge =
-        next(edges_to_erase[0],g) == edges_to_erase[1]?
-          edges_to_erase[0]:edges_to_erase[1];
-      if (target(edge,g) == p)
-        lP_Erased = true;
-      remove_center_vertex(edge,g);
-      return lP_Erased? q : p;
-    }
-    else
-    {
-      if (!(is_border(edges_to_erase[0],g)))
-        join_face(edges_to_erase[0],g);
-      else
-        remove_face(opposite(edges_to_erase[0],g),g);
-      if (!is_border(edges_to_erase[1],g))
-        join_face(edges_to_erase[1],g);
-      else
-        remove_face(opposite(edges_to_erase[1],g),g);
-      join_vertex(pq,g);
-      return q;
-    }
-  }
-  else
-  {
-      if (lTopFaceExists)
-      {
-        if (!(is_border(edges_to_erase[0],g))){
-          join_face(edges_to_erase[0],g);
-          join_vertex(pq,g);
-          return q;
-        }
-        bool lQ_Erased = is_border(opposite(next(pq,g),g),g);
-        remove_face(opposite(edges_to_erase[0],g),g);
-        return lQ_Erased?p:q;
-      }
-
-      if (! (is_border(edges_to_erase[0],g))){
-        join_face(edges_to_erase[0],g);
-        join_vertex(qp,g);
-        return p;
-      }
-      bool lP_Erased= is_border(opposite(next(qp,g),g),g);
-      remove_face(opposite(edges_to_erase[0],g),g);
-      return lP_Erased?q:p;
-  };
-}
-
-/// performs an edge flip, rotating the edge pointed by
-/// `h` by one vertex in the direction of the face orientation.
-/// \pre Both faces incident to `h` are triangles.
-template<typename Graph>
-void
-flip_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h,
-          Graph& g)
-{
-  typedef boost::graph_traits<Graph> Traits;
-  typedef typename Traits::vertex_descriptor   vertex_descriptor;
-  typedef typename Traits::halfedge_descriptor halfedge_descriptor;
-  typedef typename Traits::face_descriptor     face_descriptor;
-
-  vertex_descriptor s = source(h,g); 
-  vertex_descriptor t = target(h,g); 
-  halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g);
-  vertex_descriptor s2 = target(nh,g), t2 = target(noh,g);
-  face_descriptor fh = face(h,g), foh = face(oh,g);
-
-  assert(fh != Traits::null_face() && foh != Traits::null_face());
-
-  if(halfedge(s,g) == oh){
-    set_halfedge(s,nnh,g);
-  }
-  if(halfedge(t,g) == h){
-    set_halfedge(t,nnoh,g);
-  }
-  set_next(h,nnoh,g);
-  set_next(oh,nnh,g);
-  set_target(h,t2,g);
-  set_target(oh,s2,g);
-  set_next(nh,h,g);
-  set_next(noh,oh,g);
-  set_next(nnoh,nh,g);
-  set_next(nnh,noh,g);
-  set_face(nnoh,fh,g);
-  set_face(nnh,foh,g);
-  set_halfedge(fh,h,g);
-  set_halfedge(foh,oh,g);
-}
-
-/**
- *  \returns `true` if `e` satisfies the *link condition* \cgalCite{degn-tpec-98}, which guarantees that the surface is also 2-manifold after the edge collapse.
- */
-  template<typename Graph>
-bool
-  satisfies_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
-                           Graph& g)
-{
-    typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
-    typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-    typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator;
-
-    halfedge_descriptor v0_v1 = halfedge(e,g);
-    halfedge_descriptor v1_v0 = opposite(v0_v1,g);
-    
-    vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g);
-
-    vertex_descriptor vL = target(next(v0_v1,g),g);
-    vertex_descriptor vR = target(next(v1_v0,g),g);
-
-    out_edge_iterator eb1, ee1 ; 
-    out_edge_iterator eb2, ee2 ; 
-
-
-  // The following loop checks the link condition for v0_v1.
-  // Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh.
-  // 
-  for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ;  eb1 != ee1 ; ++ eb1 )
-  {
-    halfedge_descriptor v0_k = *eb1;
-    
-    if ( v0_k != v0_v1 )
-    {
-      vertex_descriptor k = target(v0_k,g);
-      
-      for ( boost::tie(eb2,ee2) =  halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 )
-      {
-        halfedge_descriptor k_v1 = *eb2;
-
-        if ( target(k_v1,g) == v1 )
-        {
-          // At this point we know p-q-k are connected and we need to determine if this triangle is a face of the mesh.
-          //
-          // Since the mesh is known to be triangular there are at most two faces sharing the edge p-q.
-          //
-          // If p->q is NOT a border edge, the top face is p->q->t where t is target(next(p->q))
-          // If q->p is NOT a border edge, the bottom face is q->p->b where b is target(next(q->p))
-          //
-          // If k is either t or b then p-q-k *might* be a face of the mesh. It won't be if k==t but p->q is border
-          // or k==b but q->b is a border (because in that case even though there exists triangles p->q->t (or q->p->b)
-          // they are holes, not faces)
-          // 
-     
-          bool lIsFace =   ( vL == k && (! is_border(v0_v1,g)) )
-            || ( vR == k && (! is_border(v1_v0,g)) ) ;
-                        
-         
-
-          if ( !lIsFace )
-          {
-            // CGAL_ECMS_TRACE(3,"  k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ;
-            return false ;
-          }  
-          else 
-          {
-            //CGAL_ECMS_TRACE(4,"  k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ;
-          }
-        }
-      }  
-    }
-  }   
-     
-  
-    if ( is_border(v0_v1,g) )
-    {
-      if ( next(next(next(v0_v1,g),g),g) == v0_v1 )
-      {
-        //CGAL_ECMS_TRACE(3,"  p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
-        return false ;
-      }
-    }
-    else if ( is_border(v1_v0,g) )
-    {
-      if ( next(next(next(v1_v0,g),g),g) == v1_v0 )
-      {
-        //CGAL_ECMS_TRACE(3,"  p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
-        return false ;
-      }
-    }
-    else
-    {
-      if ( is_border(v0,g) && is_border(v1,g) )
-      {
-        //CGAL_ECMS_TRACE(3,"  both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ;
-        return false ;
-      }  
-      else
-      {
-        if ( is_tetrahedron(v0_v1,g) )
-        {
-          //CGAL_ECMS_TRACE(3,"  p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
-          return false ;
-        }
-      }
-    }
-
-  
-  return true ;
-}
-
-
-/// @}
-
-} // CGAL
-
-} // CGAL
-
-
-#endif /* CGAL_EULER_OPERATIONS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Graph_geometry.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Graph_geometry.h
deleted file mode 100644
index 9110e9f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/Graph_geometry.h
+++ /dev/null
@@ -1,235 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s) : Andreas Fabri
-
-#ifndef CGAL_GRAPH_GEOMETRY_H
-#define CGAL_GRAPH_GEOMETRY_H
-
-#include <cmath>
-#include <limits>
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/range/distance.hpp>
-
-#include <CGAL/basic.h>
-#include <CGAL/assertions.h>
-#include <CGAL/Kernel/global_functions.h>
-#include <CGAL/Origin.h>
-#include <CGAL/property_map.h>
-#include <CGAL/boost/graph/properties.h>
-#include <CGAL/boost/graph/graph_concepts.h>
-#include <boost/concept/assert.hpp>
-
-namespace CGAL {
-
-/// \ingroup PkgBGLGraphGeometry
-/// @{
-
-template<typename HalfedgeGraph, 
-         typename PositionMap, 
-         typename NormalMap>
-void calculate_face_normals(const HalfedgeGraph& g, 
-                            PositionMap pm, 
-                            NormalMap nm) 
-{
-  typedef boost::graph_traits<HalfedgeGraph> GraphTraits;
-  typedef typename GraphTraits::face_iterator face_iterator;
-  typedef typename GraphTraits::edge_descriptor edge_descriptor;
-  typedef typename GraphTraits::enclosure_iterator enc_iterator;
-  typedef typename boost::property_traits<PositionMap>::value_type position;
-  typedef typename boost::property_traits<NormalMap>::value_type normal;
-
-  face_iterator fb, fe;
-  for(boost::tie(fb, fe) = faces(g); fb != fe; ++fb)
-  {
-    edge_descriptor edg = edge(*fb, g);
-    edge_descriptor edgb = edg;
-    enc_iterator eb, ee;
-    boost::tie(eb, ee) = enclosure(*fb, g);
-
-    position p0 = pm[target(edg, g)];
-    edg = next(edg, g);
-    position p1 = pm[target(edg, g)];
-    edg = next(edg, g);
-    position p2 = pm[target(edg, g)];
-    edg = next(edg, g);
-      
-    if(edg == edgb) {
-      // triangle 
-      nm[*fb] = CGAL::unit_normal(p1, p2, p0);
-    } else {
-      normal n(CGAL::NULL_VECTOR);
-      do {
-        n = n + CGAL::normal(p1, p2, p0);
-        p0 = p1;
-        p1 = p2;
-
-        edg = next(edg, g);
-        p2 = pm[target(edg, g)];
-      } while(edg != edgb);
-        
-      nm[*fb] = n / CGAL::sqrt(n.squared_length());
-    }
-  }
-}
-
-/// \cond SKIP_IN_MANUAL
-namespace internal {
-template<typename T>
-typename Kernel_traits<T>::Kernel::FT
-dot(const T& t1, const T& t2) 
-{
-  return t1[0]*t2[0]
-    + t1[1]*t2[1]
-    + t1[2]*t2[2];
-}
-  
-} // internal
-/// \endcond
-
-template<typename HalfedgeGraph, 
-         typename Position, 
-         typename Normal,
-         typename Boundary>
-void calculate_vertex_normals(const HalfedgeGraph& g, 
-                              Position position_map, 
-                              Normal normal_map,
-                              Boundary boundary_map)
-{
-  typedef boost::graph_traits<HalfedgeGraph> GraphTraits;
-  typedef typename GraphTraits::vertex_iterator vertex_iterator;
-  typedef typename GraphTraits::out_edge_iterator out_edge_iterator;
-    
-  typedef typename boost::property_traits<Normal>::value_type normal;
-  typedef typename boost::property_traits<Position>::value_type position;
-  typedef typename Kernel_traits<normal>::Kernel::FT FT;
-
-  vertex_iterator vb, ve;
-  for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb)
-  {
-    normal nn(CGAL::NULL_VECTOR);
-      
-    position p0 = position_map[*vb];
-    out_edge_iterator oeb, oee;
-      
-    for(boost::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb)
-    {
-      if(!boundary_map[target(*oeb, g)])
-      {
-        position p1 = position_map[target(*oeb, g)];
-        p1 = p1 - (p0 - CGAL::ORIGIN);
-        FT length = CGAL::sqrt((p1 - CGAL::ORIGIN).squared_length());
-        if(length > (std::numeric_limits<FT>::min)())
-          p1 = CGAL::ORIGIN + ((p1 - CGAL::ORIGIN) * 1.0 / length);
-          
-        position p2 = position_map[source(prev(halfedge(*oeb, g), g), g)];
-        p2 = p2 - (p0 - CGAL::ORIGIN);
-        length = CGAL::sqrt((p2 - CGAL::ORIGIN).squared_length());
-        if(length > (std::numeric_limits<FT>::min)())
-          p2 = CGAL::ORIGIN + ((p2 - CGAL::ORIGIN) * 1.0 / length);
-          
-        FT cosine
-          = internal::dot(p1, p2) / CGAL::sqrt(internal::dot(p1, p1) * internal::dot(p2, p2));
-        if(cosine < -1.0) cosine = -1.0;
-        else if(cosine > 1.0) cosine = 1.0;
-
-        FT angle = std::acos(cosine);
-
-        normal n = CGAL::unit_normal(position(CGAL::ORIGIN), p1, p2);
-        n = n * angle;
-        nn = nn + n;
-      }
-    }
-      
-    FT length = CGAL::sqrt(nn.squared_length());
-    if(length > (std::numeric_limits<FT>::min)())
-      nn = nn * (1.0 / length);
-    normal_map[*vb] = nn;
-  }
-}
-
-
-/// Convenience function that calls `triangle()` with the property map
-/// obtained by `get(CGAL::vertex_point, g)`.
-template <typename HalfedgeGraph>
-typename Kernel_traits<
-  typename boost::property_traits< 
-    typename boost::property_map< HalfedgeGraph, CGAL::vertex_point_t>::const_type 
-    >::value_type
-    >::Kernel::Triangle_3
-triangle(const HalfedgeGraph& g,
-         typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h) {
-  return triangle(g, h, get(CGAL::vertex_point, g));
-}
-
-
-/// `triangle()` returns a `Triangle_3` constructed
-/// from the positions of the `vertex_descriptors` around the face
-/// incident to `h` in counter-clockwise direction.
-///
-/// The Kernel of the returned `Triangle_3` is the same as the
-/// Kernel of the `value_type` of the.
-///
-/// \pre The face incident to h is triangular.
-///
-/// \tparam PositionMap must be a model of \ref ReadablePropertyMap. 
-///        Its value_type must be a model of `Kernel::Point_3`
-/// \tparam HalfedgeGraph  must be a model of \ref HalfedgeGraph.
-/// \param g The graph 
-/// \param h The halfedge
-/// \param pm The map used to find the vertices of the triangle.
-template <typename HalfedgeGraph,
-          typename PositionMap>
-typename Kernel_traits<typename boost::property_traits<PositionMap>::value_type>::Kernel::Triangle_3
-triangle(const HalfedgeGraph& g,
-         typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h,
-         const PositionMap& pm)
-{
-  BOOST_CONCEPT_ASSERT((HalfedgeGraphConcept<HalfedgeGraph>));
-
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-  
-  typedef typename Kernel_traits<
-    typename boost::property_traits<PositionMap>::value_type
-    >::Kernel::Triangle_3 Triangle_3;
-  
-  CGAL_assertion_code(
-    typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h2 = h;
-  )
-  vertex_descriptor u = target(h,g);
-  h = next(h,g);
-  vertex_descriptor v = target(h,g);
-  h = next(h,g);
-  vertex_descriptor w = target(h,g);
-  h = next(h,g);
-
-  // are we really looking at a triangle?
-  CGAL_assertion(h == h2);
-
-  return Triangle_3(get(pm, u),
-                    get(pm,v),
-                    get(pm,w));
-}
-
-
-
-
-/// @}
-
-} // CGAL
-
-#endif /* CGAL_GRAPH_GEOMETRY_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.h
deleted file mode 100644
index 84f8001..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sebastien Loriot
-
-
-#ifndef CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
-#define CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
-
-#include <boost/version.hpp>
-#include <climits>
-
-#if BOOST_VERSION == 105400
-  #ifdef BOOST_GRAPH_DIJKSTRA_HPP
-  #    pragma message \
-      "Warning: the header file boost/graph/dijkstra_shortest_paths.hpp "       \
-      "of boost 1.54 contains a bug that may impact some functions in CGAL. "   \
-      "Please consider including CGAL/boost/graph/dijkstra_shortest_paths.hpp "  \
-      "before boost header"
-  #endif
-  #include <CGAL/boost/graph/dijkstra_shortest_paths.hpp>
-#else
-  #include <boost/graph/dijkstra_shortest_paths.hpp>
-#endif
-
-#endif // CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp
deleted file mode 100644
index 84b42a2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp
+++ /dev/null
@@ -1,629 +0,0 @@
-// This file is a copy of the file distributed with boost 1.55
-// It is distributed with CGAL to work around a bug in boost 1.54
-// and must be used only with boost 1.54 by including
-// CGAL/boost/graph/dijkstra_shortest_paths.hpp
-
-
-//=======================================================================
-// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//=======================================================================
-//
-//
-// Revision History:
-//   04 April 2001: Added named parameter variant. (Jeremy Siek)
-//   01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
-//
-#ifndef BOOST_GRAPH_DIJKSTRA_HPP
-#define BOOST_GRAPH_DIJKSTRA_HPP
-
-#include <functional>
-#include <boost/limits.hpp>
-#include <boost/graph/named_function_params.hpp>
-#include <boost/graph/breadth_first_search.hpp>
-#include <boost/graph/relax.hpp>
-#include <boost/pending/indirect_cmp.hpp>
-#include <boost/graph/exception.hpp>
-#include <boost/pending/relaxed_heap.hpp>
-#include <boost/graph/overloading.hpp>
-#include <boost/smart_ptr.hpp>
-#include <boost/graph/detail/d_ary_heap.hpp>
-#include <boost/graph/two_bit_color_map.hpp>
-#include <boost/property_map/property_map.hpp>
-#include <boost/property_map/vector_property_map.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/concept/assert.hpp>
-
-#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
-#  include <boost/pending/mutable_queue.hpp>
-#endif // BOOST_GRAPH_DIJKSTRA_TESTING
-
-namespace boost {
-
-  /**
-   * @brief Updates a particular value in a queue used by Dijkstra's
-   * algorithm.
-   *
-   * This routine is called by Dijkstra's algorithm after it has
-   * decreased the distance from the source vertex to the given @p
-   * vertex. By default, this routine will just call @c
-   * Q.update(vertex). However, other queues may provide more
-   * specialized versions of this routine.
-   *
-   * @param Q             the queue that will be updated.
-   * @param vertex        the vertex whose distance has been updated
-   * @param old_distance  the previous distance to @p vertex
-   */
-  template<typename Buffer, typename Vertex, typename DistanceType>
-  inline void 
-  dijkstra_queue_update(Buffer& Q, Vertex vertex, DistanceType old_distance)
-  {
-    (void)old_distance;
-    Q.update(vertex);
-  }
-
-#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
-  // This is a misnomer now: it now just refers to the "default heap", which is
-  // currently d-ary (d=4) but can be changed by a #define.
-  static bool dijkstra_relaxed_heap = true;
-#endif
-
-  template <class Visitor, class Graph>
-  struct DijkstraVisitorConcept {
-    void constraints() {
-      BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> ));
-      vis.initialize_vertex(u, g);
-      vis.discover_vertex(u, g);
-      vis.examine_vertex(u, g);
-      vis.examine_edge(e, g);
-      vis.edge_relaxed(e, g);
-      vis.edge_not_relaxed(e, g);
-      vis.finish_vertex(u, g);
-    }
-    Visitor vis;
-    Graph g;
-    typename graph_traits<Graph>::vertex_descriptor u;
-    typename graph_traits<Graph>::edge_descriptor e;
-  };
-
-  template <class Visitors = null_visitor>
-  class dijkstra_visitor : public bfs_visitor<Visitors> {
-  public:
-    dijkstra_visitor() { }
-    dijkstra_visitor(Visitors vis)
-      : bfs_visitor<Visitors>(vis) { }
-
-    template <class Edge, class Graph>
-    void edge_relaxed(Edge e, Graph& g) {
-      invoke_visitors(this->m_vis, e, g, on_edge_relaxed());
-    }
-    template <class Edge, class Graph>
-    void edge_not_relaxed(Edge e, Graph& g) {
-      invoke_visitors(this->m_vis, e, g, on_edge_not_relaxed());
-    }
-  private:
-    template <class Edge, class Graph>
-    void tree_edge(Edge /* u */, Graph& /* g */) { }
-  };
-  template <class Visitors>
-  dijkstra_visitor<Visitors>
-  make_dijkstra_visitor(Visitors vis) {
-    return dijkstra_visitor<Visitors>(vis);
-  }
-  typedef dijkstra_visitor<> default_dijkstra_visitor;
-
-  namespace detail {
-
-    template <class UniformCostVisitor, class UpdatableQueue,
-      class WeightMap, class PredecessorMap, class DistanceMap,
-      class BinaryFunction, class BinaryPredicate>
-    struct dijkstra_bfs_visitor
-    {
-      typedef typename property_traits<DistanceMap>::value_type D;
-      typedef typename property_traits<WeightMap>::value_type W;
-
-      dijkstra_bfs_visitor(UniformCostVisitor vis, UpdatableQueue& Q,
-                           WeightMap w, PredecessorMap p, DistanceMap d,
-                           BinaryFunction combine, BinaryPredicate compare,
-                           D zero)
-        : m_vis(vis), m_Q(Q), m_weight(w), m_predecessor(p), m_distance(d),
-          m_combine(combine), m_compare(compare), m_zero(zero)  { }
-
-      template <class Edge, class Graph>
-      void tree_edge(Edge e, Graph& g) {
-        bool decreased = relax(e, g, m_weight, m_predecessor, m_distance,
-                               m_combine, m_compare);
-        if (decreased)
-          m_vis.edge_relaxed(e, g);
-        else
-          m_vis.edge_not_relaxed(e, g);
-      }
-      template <class Edge, class Graph>
-      void gray_target(Edge e, Graph& g) {
-        D old_distance = get(m_distance, target(e, g));
-
-        bool decreased = relax(e, g, m_weight, m_predecessor, m_distance,
-                               m_combine, m_compare);
-        if (decreased) {
-          dijkstra_queue_update(m_Q, target(e, g), old_distance);
-          m_vis.edge_relaxed(e, g);
-        } else
-          m_vis.edge_not_relaxed(e, g);
-      }
-
-      template <class Vertex, class Graph>
-      void initialize_vertex(Vertex u, Graph& g)
-        { m_vis.initialize_vertex(u, g); }
-      template <class Edge, class Graph>
-      void non_tree_edge(Edge, Graph&) { }
-      template <class Vertex, class Graph>
-      void discover_vertex(Vertex u, Graph& g) { m_vis.discover_vertex(u, g); }
-      template <class Vertex, class Graph>
-      void examine_vertex(Vertex u, Graph& g) { m_vis.examine_vertex(u, g); }
-      template <class Edge, class Graph>
-      void examine_edge(Edge e, Graph& g) {
-        // Test for negative-weight edges:
-        //
-        // Reasons that other comparisons do not work:
-        //
-        // m_compare(e_weight, D(0)):
-        //    m_compare only needs to work on distances, not weights, and those
-        //    types do not need to be the same (bug 8398,
-        //    https://svn.boost.org/trac/boost/ticket/8398).
-        // m_compare(m_combine(source_dist, e_weight), source_dist):
-        //    if m_combine is project2nd (as in prim_minimum_spanning_tree),
-        //    this test will claim that the edge weight is negative whenever
-        //    the edge weight is less than source_dist, even if both of those
-        //    are positive (bug 9012,
-        //    https://svn.boost.org/trac/boost/ticket/9012).
-        // m_compare(m_combine(e_weight, source_dist), source_dist):
-        //    would fix project2nd issue, but documentation only requires that
-        //    m_combine be able to take a distance and a weight (in that order)
-        //    and return a distance.
-
-        // W e_weight = get(m_weight, e);
-        // sd_plus_ew = source_dist + e_weight.
-        // D sd_plus_ew = m_combine(source_dist, e_weight);
-        // sd_plus_2ew = source_dist + 2 * e_weight.
-        // D sd_plus_2ew = m_combine(sd_plus_ew, e_weight);
-        // The test here is equivalent to e_weight < 0 if m_combine has a
-        // cancellation law, but always returns false when m_combine is a
-        // projection operator.
-        if (m_compare(m_combine(m_zero, get(m_weight, e)), m_zero)) 
-            boost::throw_exception(negative_edge());
-        // End of test for negative-weight edges.
-
-        m_vis.examine_edge(e, g);
-
-      }
-      template <class Edge, class Graph>
-      void black_target(Edge, Graph&) { }
-      template <class Vertex, class Graph>
-      void finish_vertex(Vertex u, Graph& g) { m_vis.finish_vertex(u, g); }
-
-      UniformCostVisitor m_vis;
-      UpdatableQueue& m_Q;
-      WeightMap m_weight;
-      PredecessorMap m_predecessor;
-      DistanceMap m_distance;
-      BinaryFunction m_combine;
-      BinaryPredicate m_compare;
-      D m_zero;
-    };
-
-  } // namespace detail
-
-  namespace detail {
-    template <class Graph, class IndexMap, class Value, bool KnownNumVertices>
-    struct vertex_property_map_generator_helper {};
-
-    template <class Graph, class IndexMap, class Value>
-    struct vertex_property_map_generator_helper<Graph, IndexMap, Value, true> {
-      typedef boost::iterator_property_map<Value*, IndexMap> type;
-      static type build(const Graph& g, const IndexMap& index, boost::scoped_array<Value>& array_holder) {
-        array_holder.reset(new Value[num_vertices(g)]);
-        std::fill(array_holder.get(), array_holder.get() + num_vertices(g), Value());
-        return make_iterator_property_map(array_holder.get(), index);
-      }
-    };
-
-    template <class Graph, class IndexMap, class Value>
-    struct vertex_property_map_generator_helper<Graph, IndexMap, Value, false> {
-      typedef boost::vector_property_map<Value, IndexMap> type;
-      static type build(const Graph& /* g */, const IndexMap& index, boost::scoped_array<Value>& /* array_holder */) {
-        return boost::make_vector_property_map<Value>(index);
-      }
-    };
-
-    template <class Graph, class IndexMap, class Value>
-    struct vertex_property_map_generator {
-      typedef boost::is_base_and_derived<
-                boost::vertex_list_graph_tag,
-                typename boost::graph_traits<Graph>::traversal_category>
-              known_num_vertices;
-      typedef vertex_property_map_generator_helper<Graph, IndexMap, Value, known_num_vertices::value> helper;
-      typedef typename helper::type type;
-      static type build(const Graph& g, const IndexMap& index, boost::scoped_array<Value>& array_holder) {
-        return helper::build(g, index, array_holder);
-      }
-    };
-  }
-
-  namespace detail {
-    template <class Graph, class IndexMap, bool KnownNumVertices>
-    struct default_color_map_generator_helper {};
-
-    template <class Graph, class IndexMap>
-    struct default_color_map_generator_helper<Graph, IndexMap, true> {
-      typedef boost::two_bit_color_map<IndexMap> type;
-      static type build(const Graph& g, const IndexMap& index) {
-        size_t nv = num_vertices(g);
-        return boost::two_bit_color_map<IndexMap>(nv, index);
-      }
-    };
-
-    template <class Graph, class IndexMap>
-    struct default_color_map_generator_helper<Graph, IndexMap, false> {
-      typedef boost::vector_property_map<boost::two_bit_color_type, IndexMap> type;
-      static type build(const Graph& /* g */, const IndexMap& index) {
-        return boost::make_vector_property_map<boost::two_bit_color_type>(index);
-      }
-    };
-
-    template <class Graph, class IndexMap>
-    struct default_color_map_generator {
-      typedef boost::is_base_and_derived<
-                boost::vertex_list_graph_tag,
-                typename boost::graph_traits<Graph>::traversal_category>
-              known_num_vertices;
-      typedef default_color_map_generator_helper<Graph, IndexMap, known_num_vertices::value> helper;
-      typedef typename helper::type type;
-      static type build(const Graph& g, const IndexMap& index) {
-        return helper::build(g, index);
-      }
-    };
-  }
-
-  // Call breadth first search with default color map.
-  template <class Graph, class SourceInputIter, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistZero>
-  inline void
-  dijkstra_shortest_paths_no_init
-    (const Graph& g,
-     SourceInputIter s_begin, SourceInputIter s_end,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistZero zero,
-     DijkstraVisitor vis)
-  {
-    typedef
-      detail::default_color_map_generator<Graph, IndexMap>
-      ColorMapHelper;
-    typedef typename ColorMapHelper::type ColorMap;
-    ColorMap color =
-      ColorMapHelper::build(g, index_map);
-    dijkstra_shortest_paths_no_init( g, s_begin, s_end, predecessor, distance, weight,
-      index_map, compare, combine, zero, vis,
-        color);
-  }
-
-  // Call breadth first search with default color map.
-  template <class Graph, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistZero>
-  inline void
-  dijkstra_shortest_paths_no_init
-    (const Graph& g,
-     typename graph_traits<Graph>::vertex_descriptor s,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistZero zero,
-     DijkstraVisitor vis)
-  {
-    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
-                                    weight, index_map, compare, combine, zero,
-                                    vis);
-  }
-
-  // Call breadth first search
-  template <class Graph, class SourceInputIter, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistZero, class ColorMap>
-  inline void
-  dijkstra_shortest_paths_no_init
-    (const Graph& g,
-     SourceInputIter s_begin, SourceInputIter s_end,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistZero zero,
-     DijkstraVisitor vis, ColorMap color)
-  {
-    typedef indirect_cmp<DistanceMap, Compare> IndirectCmp;
-    IndirectCmp icmp(distance, compare);
-
-    typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
-
-#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
-    if (!dijkstra_relaxed_heap) {
-      typedef mutable_queue<Vertex, std::vector<Vertex>, IndirectCmp, IndexMap>
-        MutableQueue;
-
-      MutableQueue Q(num_vertices(g), icmp, index_map);
-      detail::dijkstra_bfs_visitor<DijkstraVisitor, MutableQueue, WeightMap,
-        PredecessorMap, DistanceMap, Combine, Compare>
-      bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero);
-
-      breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
-      return;
-    }
-#endif // BOOST_GRAPH_DIJKSTRA_TESTING
-
-#ifdef BOOST_GRAPH_DIJKSTRA_USE_RELAXED_HEAP
-    typedef relaxed_heap<Vertex, IndirectCmp, IndexMap> MutableQueue;
-    MutableQueue Q(num_vertices(g), icmp, index_map);
-#else // Now the default: use a d-ary heap
-      boost::scoped_array<std::size_t> index_in_heap_map_holder;
-      typedef
-        detail::vertex_property_map_generator<Graph, IndexMap, std::size_t>
-        IndexInHeapMapHelper;
-      typedef typename IndexInHeapMapHelper::type IndexInHeapMap;
-      IndexInHeapMap index_in_heap =
-        IndexInHeapMapHelper::build(g, index_map, index_in_heap_map_holder);
-      typedef d_ary_heap_indirect<Vertex, 4, IndexInHeapMap, DistanceMap, Compare>
-        MutableQueue;
-      MutableQueue Q(distance, index_in_heap, compare);
-#endif // Relaxed heap
-
-    detail::dijkstra_bfs_visitor<DijkstraVisitor, MutableQueue, WeightMap,
-      PredecessorMap, DistanceMap, Combine, Compare>
-        bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero);
-
-    breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
-  }
-
-  // Call breadth first search
-  template <class Graph, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistZero, class ColorMap>
-  inline void
-  dijkstra_shortest_paths_no_init
-    (const Graph& g,
-     typename graph_traits<Graph>::vertex_descriptor s,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistZero zero,
-     DijkstraVisitor vis, ColorMap color)
-  {
-    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
-                                    weight, index_map, compare, combine,
-                                    zero, vis, color);
-  }
-
-  // Initialize distances and call breadth first search with default color map
-  template <class VertexListGraph, class SourceInputIter, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero, typename T, typename Tag, 
-            typename Base>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     SourceInputIter s_begin, SourceInputIter s_end,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis,
-     const bgl_named_params<T, Tag, Base>&
-     BOOST_GRAPH_ENABLE_IF_MODELS_PARM(VertexListGraph,vertex_list_graph_tag))
-  {
-    boost::two_bit_color_map<IndexMap> color(num_vertices(g), index_map);
-    dijkstra_shortest_paths(g, s_begin, s_end, predecessor, distance, weight,
-                            index_map, compare, combine, inf, zero, vis,
-                            color);
-  }
-
-  // Initialize distances and call breadth first search with default color map
-  template <class VertexListGraph, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero, typename T, typename Tag, 
-            typename Base>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     typename graph_traits<VertexListGraph>::vertex_descriptor s,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis,
-     const bgl_named_params<T, Tag, Base>&
-     BOOST_GRAPH_ENABLE_IF_MODELS_PARM(VertexListGraph,vertex_list_graph_tag))
-  {
-    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance, weight,
-                            index_map, compare, combine, inf, zero, vis);
-  }
-
-  // Initialize distances and call breadth first search
-  template <class VertexListGraph, class SourceInputIter, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero, class ColorMap>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     SourceInputIter s_begin, SourceInputIter s_end,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis, ColorMap color)
-  {
-    typedef typename property_traits<ColorMap>::value_type ColorValue;
-    typedef color_traits<ColorValue> Color;
-    typename graph_traits<VertexListGraph>::vertex_iterator ui, ui_end;
-    for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
-      vis.initialize_vertex(*ui, g);
-      put(distance, *ui, inf);
-      put(predecessor, *ui, *ui);
-      put(color, *ui, Color::white());
-    }
-    for (SourceInputIter it = s_begin; it != s_end; ++it) {
-      put(distance, *it, zero);
-    }
-
-    dijkstra_shortest_paths_no_init(g, s_begin, s_end, predecessor, distance,
-                            weight, index_map, compare, combine, zero, vis,
-                            color);
-  }
-
-  // Initialize distances and call breadth first search
-  template <class VertexListGraph, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero, class ColorMap>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     typename graph_traits<VertexListGraph>::vertex_descriptor s,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis, ColorMap color)
-  {
-    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance, weight,
-                            index_map, compare, combine, inf, zero,
-                            vis, color);
-  }
-
-  // Initialize distances and call breadth first search
-  template <class VertexListGraph, class SourceInputIter,
-            class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     SourceInputIter s_begin, SourceInputIter s_end,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis)
-  {
-    dijkstra_shortest_paths(g, s_begin, s_end, predecessor, distance,
-                            weight, index_map,
-                            compare, combine, inf, zero, vis,
-                            no_named_parameters());
-  }
-
-  // Initialize distances and call breadth first search
-  template <class VertexListGraph, class DijkstraVisitor,
-            class PredecessorMap, class DistanceMap,
-            class WeightMap, class IndexMap, class Compare, class Combine,
-            class DistInf, class DistZero>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     typename graph_traits<VertexListGraph>::vertex_descriptor s,
-     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
-     IndexMap index_map,
-     Compare compare, Combine combine, DistInf inf, DistZero zero,
-     DijkstraVisitor vis)
-  {
-    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance,
-                            weight, index_map,
-                            compare, combine, inf, zero, vis);
-  }
-
-  namespace detail {
-
-    // Handle defaults for PredecessorMap and
-    // Distance Compare, Combine, Inf and Zero
-    template <class VertexListGraph, class DistanceMap, class WeightMap,
-              class IndexMap, class Params>
-    inline void
-    dijkstra_dispatch2
-      (const VertexListGraph& g,
-       typename graph_traits<VertexListGraph>::vertex_descriptor s,
-       DistanceMap distance, WeightMap weight, IndexMap index_map,
-       const Params& params)
-    {
-      // Default for predecessor map
-      dummy_property_map p_map;
-
-      typedef typename property_traits<DistanceMap>::value_type D;
-      D inf = choose_param(get_param(params, distance_inf_t()),
-                           (std::numeric_limits<D>::max)());
-
-      dijkstra_shortest_paths
-        (g, s,
-         choose_param(get_param(params, vertex_predecessor), p_map),
-         distance, weight, index_map,
-         choose_param(get_param(params, distance_compare_t()),
-                      std::less<D>()),
-         choose_param(get_param(params, distance_combine_t()),
-                      closed_plus<D>(inf)),
-         inf,
-         choose_param(get_param(params, distance_zero_t()),
-                      D()),
-         choose_param(get_param(params, graph_visitor),
-                      make_dijkstra_visitor(null_visitor())),
-         params);
-    }
-
-    template <class VertexListGraph, class DistanceMap, class WeightMap,
-              class IndexMap, class Params>
-    inline void
-    dijkstra_dispatch1
-      (const VertexListGraph& g,
-       typename graph_traits<VertexListGraph>::vertex_descriptor s,
-       DistanceMap distance, WeightMap weight, IndexMap index_map,
-       const Params& params)
-    {
-      // Default for distance map
-      typedef typename property_traits<WeightMap>::value_type D;
-      typename std::vector<D>::size_type
-        n = is_default_param(distance) ? num_vertices(g) : 1;
-      std::vector<D> distance_map(n);
-
-      detail::dijkstra_dispatch2
-        (g, s, choose_param(distance, make_iterator_property_map
-                            (distance_map.begin(), index_map,
-                             distance_map[0])),
-         weight, index_map, params);
-    }
-  } // namespace detail
-
-  // Named Parameter Variant
-  template <class VertexListGraph, class Param, class Tag, class Rest>
-  inline void
-  dijkstra_shortest_paths
-    (const VertexListGraph& g,
-     typename graph_traits<VertexListGraph>::vertex_descriptor s,
-     const bgl_named_params<Param,Tag,Rest>& params)
-  {
-    // Default for edge weight and vertex index map is to ask for them
-    // from the graph.  Default for the visitor is null_visitor.
-    detail::dijkstra_dispatch1
-      (g, s,
-       get_param(params, vertex_distance),
-       choose_const_pmap(get_param(params, edge_weight), g, edge_weight),
-       choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
-       params);
-  }
-
-} // namespace boost
-
-#ifdef BOOST_GRAPH_USE_MPI
-#  include <boost/graph/distributed/dijkstra_shortest_paths.hpp>
-#endif
-
-#endif // BOOST_GRAPH_DIJKSTRA_HPP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_concepts.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_concepts.h
deleted file mode 100644
index bbe3f68..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_concepts.h
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Philipp Moeller
-
-#ifndef CGAL_GRAPH_CONCEPTS_H
-#define CGAL_GRAPH_CONCEPTS_H
-
-#include <boost/graph/graph_concepts.hpp>
-#include <boost/concept/detail/concept_def.hpp>
-
-namespace CGAL {
-namespace concepts {
-
-BOOST_concept(HalfedgeGraph,(G))
-  : boost::concepts::Graph<G>
-{
-  typedef typename boost::graph_traits<G>::halfedge_descriptor             halfedge_descriptor;
-
-  BOOST_CONCEPT_USAGE(HalfedgeGraph)
-  {
-    BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<halfedge_descriptor>));
-    BOOST_CONCEPT_ASSERT((boost::EqualityComparable<halfedge_descriptor>));
-    BOOST_CONCEPT_ASSERT((boost::Assignable<halfedge_descriptor>));
-
-
-    e = edge(h, g);
-    h = halfedge(e, g);
-    h = halfedge(v, g);
-    hp = halfedge(u, v, g);
-    h = opposite(h, g);
-    v = source(h, g);
-    v = target(h, g);
-    h = next(h, g);
-    h = prev(h, g);
-    const_constraints(g);
-  }
-
-  void const_constraints(const G& cg)
-  {
-    e = edge(h, cg);
-    h = halfedge(e, cg);
-    h = halfedge(v, cg);
-    hp = halfedge(u, v, cg);
-    h = opposite(h, cg);
-    v = source(h, cg);
-    v = target(h, cg);
-    h = next(h, cg);
-    h = prev(h, cg);
-  }
-  
-  G g;
-  
-  typename boost::graph_traits<G>::vertex_descriptor v, u;
-  typename boost::graph_traits<G>::edge_descriptor e;
-  typename boost::graph_traits<G>::halfedge_descriptor h;
-  std::pair<halfedge_descriptor, bool> hp;
-};
-
-BOOST_concept(HalfedgeListGraph,(G))
-  : HalfedgeGraph<G>
-{
-  typedef typename boost::graph_traits<G>::halfedge_iterator   halfedge_iterator;
-  typedef typename boost::graph_traits<G>::halfedges_size_type halfedges_size_type;
-  
-  BOOST_CONCEPT_USAGE(HalfedgeListGraph)
-  {
-    // BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<halfedge_iterator>));
-    h_num = num_halfedges(g);
-    p = halfedges(g);
-    this->h = *p.first;
-    const_constraints(g);
-  }
-
-  void const_constraints(const G& cg)
-  {
-    h_num = num_halfedges(cg);
-    p = halfedges(cg);
-    this->h = *p.first;
-  }
-  
-  G g;
-  halfedges_size_type h_num;
-  std::pair<halfedge_iterator, halfedge_iterator> p;
-};
-
-BOOST_concept(FaceGraph,(G))
-  : HalfedgeGraph<G>
-{
-  typedef typename boost::graph_traits<G>::face_descriptor face_descriptor;
-
-  BOOST_CONCEPT_USAGE(FaceGraph)
-  {
-    BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<face_descriptor>));
-    BOOST_CONCEPT_ASSERT((boost::EqualityComparable<face_descriptor>));
-    BOOST_CONCEPT_ASSERT((boost::Assignable<face_descriptor>));
-
-    f = face(h, g);
-    h = halfedge(f, g);
-    boost::graph_traits<G>::null_face();
-    const_constraints(g);
-  }
-
-  void const_constraints(const G& cg)
-  {
-    f = face(h, cg);
-    h = halfedge(f, cg);
-  }
-
-  G g;
-  face_descriptor f;
-  typename boost::graph_traits<G>::halfedge_descriptor h;
-};
-
-BOOST_concept(FaceListGraph,(G))
-  : FaceGraph<G>
-{
-  typedef typename boost::graph_traits<G>::face_iterator face_iterator;
-  typedef typename boost::graph_traits<G>::faces_size_type faces_size_type;
-
-  BOOST_CONCEPT_USAGE(FaceListGraph)
-  {
-    // BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<face_iterator>));
-    p = faces(g);
-    nf = num_faces(g);
-    this->f = *p.first;
-    const_constraints(g);
-  }
-
-  void const_constraints(const G& cg)
-  {
-    p = faces(cg);
-    nf = num_faces(cg);
-    this->f = *p.first;
-  }
-
-  G g;
-  std::pair<face_iterator, face_iterator> p;
-  typename boost::graph_traits<G>::faces_size_type nf;
-};
-
-BOOST_concept(MutableFaceGraph,(G))
-  : FaceGraph<G>
-{
-  BOOST_CONCEPT_USAGE(MutableFaceGraph)
-  {
-    f = add_face(g);
-    remove_face(f, g);
-    set_face(h, f, g);
-    set_halfedge(f, h, g);
-  }
-  G g;
-  typename boost::graph_traits<G>::face_descriptor f;
-  typename boost::graph_traits<G>::halfedge_descriptor h;
-};
-
-BOOST_concept(MutableHalfedgeGraph,(G))
-  : HalfedgeGraph<G>
-{
-  BOOST_CONCEPT_USAGE(MutableHalfedgeGraph)
-  {
-    v = add_vertex(g);
-    remove_vertex(v, g);
-    e = add_edge(g);
-    remove_edge(e, g);
-    set_target(h1, v, g);
-    set_next(h1, h2, g);
-    set_halfedge(v, h1, g);
-  }
-
-  G g;
-  typename boost::graph_traits<G>::edge_descriptor e;
-  typename boost::graph_traits<G>::vertex_descriptor v;
-  typename boost::graph_traits<G>::halfedge_descriptor h1, h2;
-};
-
-} // concepts
-
-using CGAL::concepts::HalfedgeGraphConcept;
-using CGAL::concepts::HalfedgeListGraphConcept;
-using CGAL::concepts::FaceGraphConcept;
-using CGAL::concepts::FaceListGraphConcept;
-using CGAL::concepts::MutableFaceGraphConcept;
-using CGAL::concepts::MutableHalfedgeGraphConcept;
-} // CGAL
-
-#include <boost/concept/detail/concept_undef.hpp>
-
-#endif /* CGAL_GRAPH_CONCEPTS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h
deleted file mode 100644
index 87855cd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Talbot
-
-#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
-#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
-
-#include <utility>
-#include <iterator>
-
-#include <boost/config.hpp>
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-
-#include <CGAL/Combinatorial_map.h>
-#include <CGAL/Dart_iterators.h>
-
-#define CGAL_CMAP_BASE_TEMPLATE_ARGS template<unsigned int d, class Refs, class Items, class Alloc>
-#define CGAL_CMAP_BASE_TYPE CGAL::Combinatorial_map_base<d, Refs, Items, Alloc>
-
-#define CGAL_CMAP_TEMPLATE_ARGS template<unsigned int d, class Items, class Alloc>
-#define CGAL_CMAP_TYPE CGAL::Combinatorial_map<d, Items, Alloc>
-
-#define CGAL_LCC_TEMPLATE_ARGS template < unsigned int d_, unsigned int ambient_dim, \
-             class Traits_, \
-             class Items_, \
-             class Alloc_, \
-             template<unsigned int, class,class,class>\
-             class CMap>
-
-#define CGAL_LCC_TYPE CGAL::Linear_cell_complex<d_, ambient_dim, Traits_, Items_, Alloc_, CMap> 
-
-namespace CGAL {
-
-
-template <class CMap, typename Dart_Iterator>
-class CMap_dart_handle_iterator 
-{
-public:
-  typedef Dart_Iterator Iterator;    
-
-  typedef typename CMap::Dart_handle Dart_handle;
-
-  typedef CMap_dart_handle_iterator<CMap, Dart_Iterator> Self; 
-
-  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
-  typedef typename std::iterator_traits<Iterator>::difference_type   difference_type;
-  typedef Dart_handle                                                value_type;
-  typedef value_type                                                 reference;
-  typedef value_type                                                 pointer;
-
-public:
-
-// OPERATIONS Forward Category
-// ---------------------------
-
-  bool operator==( const Self& i) const { return ( nt == i.nt); }
-  bool operator!=( const Self& i) const { return !(nt == i.nt );}
-  value_type operator*() const { return nt; }
-  value_type operator->() { return nt; }
-
-  Self& operator++() {
-    ++nt;
-    return *this;
-  }
-
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  CMap_dart_handle_iterator(Iterator iter):
-    nt(iter)
-  {}
-
-  // Default constructor
-  CMap_dart_handle_iterator():
-    nt(get_default(), Dart_handle())
-  {}
-
-  CMap_dart_handle_iterator(const CMap_dart_handle_iterator& it)
-  : nt(it.nt)
-  {}
-  
-  CMap_dart_handle_iterator& operator=(const CMap_dart_handle_iterator& it)
-  {
-    nt = const_cast<CMap_dart_handle_iterator&>(it).nt;
-  }
-
-private:
-  Iterator nt;
-  static CMap& get_default()
-  {
-    static CMap* m = new CMap();
-    return *m;
-  }
-};
-
-template <typename Dart_handle>
-struct EdgeHandle : Dart_handle
-{
-  EdgeHandle() : Dart_handle(NULL){}
-  EdgeHandle(const Dart_handle& h): Dart_handle(h)
-  {}
-};
-
-template <class CMap>
-struct CMap_Base_graph_traits
-{
-
-public :  
-  struct CMap_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
-                                        public virtual boost::vertex_list_graph_tag,
-                                        public virtual boost::edge_list_graph_tag
-  {};
-
-  // Expose types required by the boost::Graph concept.
-  typedef typename CMap::Dart_handle vertex_descriptor;
-  typedef EdgeHandle<typename CMap::Dart_handle> edge_descriptor;
-  typedef boost::directed_tag directed_category;
-  typedef boost::allow_parallel_edge_tag edge_parallel_category; 
-  typedef CMap_graph_traversal_category traversal_category;
-
-  // Expose types required by the boost::IncidenceGraph concept.
-  typedef CMap_dart_handle_iterator<CMap, CMap_dart_iterator_of_cell<CMap, 0> > out_edge_iterator;
-  typedef typename CMap::size_type degree_size_type;
-
-  // Expose types required by the boost::BidirectionalGraph concept.
-  typedef CMap_dart_handle_iterator<CMap, CMap_dart_iterator_of_second_vertex<CMap> > in_edge_iterator;
-  typedef typename CMap::size_type edges_size_type;
-
-  // Expose types required by the boost::EdgeListGraph concept.
-  typedef CMap_dart_handle_iterator<CMap, typename CMap::Dart_range::iterator> edge_iterator;
-
-  // Expose types required by the boost::VertexListGraph concept.
-  typedef typename CMap::size_type vertices_size_type;
-  typedef CMap_dart_handle_iterator<CMap, typename CMap::template One_dart_per_cell_range<0>::iterator> vertex_iterator;
-};
-
-} //namespace CGAL
-
-namespace boost{
-
-// Specialization of graph_traits for Combinatorial map.
-CGAL_CMAP_TEMPLATE_ARGS
-struct graph_traits<CGAL_CMAP_TYPE >
-: CGAL::CMap_Base_graph_traits<typename CGAL_CMAP_TYPE::Base >
-{};
-
-CGAL_CMAP_TEMPLATE_ARGS
-struct graph_traits<CGAL_CMAP_TYPE const>
-: CGAL::CMap_Base_graph_traits<typename CGAL_CMAP_TYPE::Base >
-{};
-
-// Specialization of graph_traits for Combinatorial map base.
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-struct graph_traits<CGAL_CMAP_BASE_TYPE >
-: CGAL::CMap_Base_graph_traits<CGAL_CMAP_BASE_TYPE >
-{};
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-struct graph_traits<CGAL_CMAP_BASE_TYPE const>
-: CGAL::CMap_Base_graph_traits<CGAL_CMAP_BASE_TYPE >
-{};
-
-// Specialization of graph_traits for Linear Cell Complex.
-CGAL_LCC_TEMPLATE_ARGS
-struct graph_traits<CGAL_LCC_TYPE >
-: CGAL::CMap_Base_graph_traits<typename CGAL_LCC_TYPE::Base >
-{};
-
-CGAL_LCC_TEMPLATE_ARGS
-struct graph_traits<CGAL_LCC_TYPE const>
-: CGAL::CMap_Base_graph_traits<typename CGAL_LCC_TYPE::Base >
-{};
-
-// Expression required by the boost::IncidenceGraph concept.
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor 
-source(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_descriptor e, const CGAL_CMAP_BASE_TYPE&)
-{
-  return e;
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor 
-target(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_descriptor e, const CGAL_CMAP_BASE_TYPE&)
-{
-  return e->opposite();
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator, 
-          typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator>
-out_edges(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor u, const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator iter_type;
-
-  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
-
-  return std::make_pair(
-            cmap.template darts_of_cell<0>(u).begin(), 
-            cmap.template darts_of_cell<0>(u).end());
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
-out_degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor u, const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator iter_type;
-  std::pair<iter_type, iter_type> iter = out_edges(u, cm);
-
-  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type degree=0;
-  for(;iter.first != iter.second; ++(iter.first))
-    ++degree;
-  return degree;
-}
-
-// Expression required by the boost::BidirectionalGraph concept.
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator>
-in_edges(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator iter_type;
-
-  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
-
-  return std::make_pair<iter_type, iter_type>
-    (cmap.darts_of_second_vertex(v).begin(), cmap.darts_of_second_vertex(v).end());
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
-in_degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator iter_type;
-  std::pair<iter_type, iter_type> iter = in_edges(v, cm);
-
-  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type degree=0;
-  for(;iter.first != iter.second; ++(iter.first))
-    ++degree;
-  return degree;
-}
-
-// We suppose there are no loops.
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
-degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
-{
-  return in_degree(v, cm) + out_degree(v, cm);
-}
-
-// Expression required by the boost::VertexListGraph concept.
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator>
-vertices(const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator iter_type;
-
-  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
-
-  return std::make_pair<iter_type, iter_type>
-    (iter_type(cmap.template one_dart_per_cell<0>().begin()),
-     iter_type(cmap.template one_dart_per_cell<0>().end()));
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertices_size_type
-num_vertices(const CGAL_CMAP_BASE_TYPE& cm)
-{
-  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
-  return cmap.template one_dart_per_cell<0>().size();
-}
-
-// Expression required by the boost::EdgeListGraph concept.
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator>
-edges(const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator iter_type;
-
-  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
-
-  return std::make_pair<iter_type, iter_type>
-    (iter_type(cmap.darts().begin()),
-     iter_type(cmap.darts().end()));
-}
-
-CGAL_CMAP_BASE_TEMPLATE_ARGS
-typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edges_size_type
-num_edges(const CGAL_CMAP_BASE_TYPE& cm)
-{
-  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator iter_type;
-  std::pair<iter_type, iter_type> iter = edges(cm);
-
-  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edges_size_type degree=0;
-  for(;iter.first != iter.second; ++(iter.first))
-    ++degree;
-  return degree;
-}
-
-
-}// namespace boost
-
-#undef CGAL_CMAP_BASE_TEMPLATE_ARGS
-#undef CGAL_CMAP_TEMPLATE_ARGS
-#undef CGAL_CMAP_TYPE
-#undef CGAL_CMAP_BASE_TYPE
-#undef CGAL_LCC_TEMPLATE_ARGS
-#undef CGAL_LCC_TYPE
-
-#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h
deleted file mode 100644
index e1cb667..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h
+++ /dev/null
@@ -1,392 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-
-#ifndef CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
-#define CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
-
-#include <boost/config.hpp>
-#include <boost/iterator_adaptors.hpp>
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-#include <CGAL/boost/graph/graph_traits_Triangulation_2.h>
-
-// The functions and classes in this file allows the user to
-// treat a CGAL Delaunay_triangulation_2 object as a boost graph "as is". No
-// wrapper is needed for the Delaunay_triangulation_2 object.
-
-
-
-namespace boost { 
-
-  template <class GT, class TDS>
-  struct graph_traits< CGAL::Delaunay_triangulation_2<GT,TDS> > {
-
-    struct DT2_graph_traversal_category : 
-      public virtual bidirectional_graph_tag,
-      public virtual adjacency_graph_tag,        
-      public virtual edge_list_graph_tag,
-      public virtual vertex_list_graph_tag { };
-
-    typedef CGAL::Delaunay_triangulation_2<GT,TDS> Delaunay_triangulation;
-
-    typedef typename CGAL::Delaunay_triangulation_2<GT,TDS>::Vertex_handle vertex_descriptor;
-    typedef CGAL::detail::Edge<CGAL::Delaunay_triangulation_2<GT,TDS>, typename CGAL::Delaunay_triangulation_2<GT,TDS>::Edge>  edge_descriptor;
-    typedef typename CGAL::Delaunay_triangulation_2<GT,TDS>::All_edges_iterator  edge_iterator;
-
-    typedef CGAL::detail::boost_all_vertices_iterator<Delaunay_triangulation> vertex_iterator;
-    typedef CGAL::Counting_iterator<CGAL::detail::Out_edge_circulator<typename Delaunay_triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > out_edge_iterator;
-    typedef CGAL::Counting_iterator<CGAL::detail::In_edge_circulator<typename Delaunay_triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > in_edge_iterator;
-    typedef CGAL::Counting_iterator<typename Delaunay_triangulation::Vertex_circulator> Incident_vertices_iterator;
-    typedef Incident_vertices_iterator adjacency_iterator;
-
-    typedef undirected_tag directed_category;
-    typedef disallow_parallel_edge_tag edge_parallel_category; 
-    typedef DT2_graph_traversal_category traversal_category;
-    typedef typename Delaunay_triangulation::size_type size_type;
-    typedef size_type vertices_size_type;
-    typedef size_type edges_size_type;
-    typedef size_type degree_size_type;
-  };
-
-
-} // namespace boost
-
-
-namespace CGAL {
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor
-  source(typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_descriptor e,
-         const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.ccw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor
-  target(typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_descriptor e,
-         const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.cw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  inline std::pair<
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator,
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator >  
-  vertices(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator
-      Iter;
-    return std::make_pair( Iter(g.all_vertices_begin()), Iter(g.all_vertices_end()) );
-  }
-
-
-  template <class Gt, class Tds>
-  inline std::pair<
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_iterator,
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_iterator >  
-  edges(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {    
-    return std::make_pair(g.all_edges_begin(), g.all_edges_end());
-  }
-
-  template <class Gt, class Tds>
-  inline std::pair<
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::out_edge_iterator,
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::out_edge_iterator >  
-  out_edges(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
-      ::out_edge_iterator Iter;
-    
-    return std::make_pair( Iter(ec), Iter(ec,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  inline std::pair<
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::in_edge_iterator,
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::in_edge_iterator >  
-  in_edges(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
-      ::in_edge_iterator Iter;
-    return std::make_pair( Iter(ec), Iter(ec,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  inline std::pair<
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::adjacency_iterator,
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::adjacency_iterator >  
-  adjacent_vertices(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Vertex_circulator vc = out_edge_iterator(u,u.face());
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
-      ::adjacency_iterator Iter;
-    return std::make_pair( Iter(vc), Iter(vc,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertices_size_type
-  num_vertices(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    return g.number_of_vertices()+1;
-  }  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edges_size_type
-  num_edges(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    return  g.number_of_vertices() + 1 + g.number_of_faces() + degree(g.infinite_vertex(), g) - 2;
-  }  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
-  out_degree(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
-  in_degree(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
-  degree(
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-
-  // property maps
-  template <class Gt, class Tds>
-  class DT2_vertex_id_map
-    : public boost::put_get_helper<int, DT2_vertex_id_map<Gt,Tds> >
-  {
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef int value_type;
-    typedef int reference;
-    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Vertex_handle key_type;
-    
-    DT2_vertex_id_map()
-    {}
-    
-    long operator[](key_type vh) const {
-      return vh->id(); 
-    }
-  };
-
-  template <class Gt, class Tds>
-  class DT2_edge_id_map
-    : public boost::put_get_helper<int, DT2_edge_id_map<Gt,Tds> >
-  {
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef int value_type;
-    typedef int reference;
-    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge key_type;
-    
-    DT2_edge_id_map()
-    {}
-    
-    long operator[](key_type e) const {
-      return (3 * e.first.id()) + e.second; 
-    }
-  };
-
-  template <class Gt, class Tds>
-  class DT2_edge_weight_map
-    : public boost::put_get_helper<typename Gt::FT, DT2_edge_weight_map<Gt, Tds> >
-  {
-  private:
-    const CGAL::Delaunay_triangulation_2<Gt,Tds>& tr;
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef typename Gt::FT value_type;
-    typedef value_type reference;
-    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge key_type;
-
-    DT2_edge_weight_map(const CGAL::Delaunay_triangulation_2<Gt,Tds>& tr_) 
-      : tr(tr_) 
-    { }
-
-    typename Gt::FT operator[](key_type e) const {
-      return tr.segment(e).squared_length();
-    }
-  };
-
-
-  template <class Gt, class Tds>
-  inline DT2_vertex_id_map<Gt,Tds>
-  get(boost::vertex_index_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& ) {
-    DT2_vertex_id_map<Gt,Tds> m;
-    return m;
-  }
-
-  template <class Gt, class Tds>
-  inline DT2_edge_id_map<Gt,Tds>
-  get(boost::edge_index_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& ) {
-    DT2_edge_id_map<Gt,Tds> m;
-    return m;
-  }
-
-  template <class Gt, class Tds>
-  inline DT2_edge_weight_map<Gt,Tds>
-  get(boost::edge_weight_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& g) {
-    DT2_edge_weight_map<Gt,Tds> m(g);
-    return m;
-  }
-
-  template <class Tag>
-  struct DT2_property_map { };
-
-  template <>
-  struct DT2_property_map<boost::vertex_index_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef DT2_vertex_id_map<Gt,Tds> type;
-      typedef DT2_vertex_id_map<Gt,Tds> const_type;
-    };
-  };
-
-
-  template <>
-  struct DT2_property_map<boost::edge_index_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef DT2_edge_id_map<Gt,Tds> type;
-      typedef DT2_edge_id_map<Gt,Tds> const_type;
-    };
-  };
-
-
-  template <>
-  struct DT2_property_map<boost::edge_weight_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef DT2_edge_weight_map<Gt,Tds> type;
-      typedef DT2_edge_weight_map<Gt,Tds> const_type;
-    };
-  };
-
-} // namespace CGAL
-
-namespace boost {
-
-  // g++ 'enumeral_type' in template unification not implemented workaround
-  template <class Gt, class Tds, class Tag>
-  struct property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>, Tag> {
-    typedef typename 
-    CGAL::DT2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
-    typedef typename map_gen::type type;
-    typedef typename map_gen::const_type const_type;
-  };
-
-  // see struct property_map in Polyehdron for an explanation
-  template <class Gt, class Tds, class Tag>
-  struct property_map<const CGAL::Delaunay_triangulation_2<Gt,Tds>, Tag> {
-    typedef typename 
-    CGAL::DT2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
-    typedef typename map_gen::type type;
-    typedef typename map_gen::const_type const_type;
-  };
-
-} // namespace boost
-
-namespace CGAL {
-  template <class Gt, class Tds, class PropertyTag, class Key>
-  inline
-  typename boost::property_traits<
-    typename boost::property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>,PropertyTag>::const_type>::value_type
-  get(PropertyTag p, const CGAL::Delaunay_triangulation_2<Gt,Tds>& g, const Key& key) {
-    return get(get(p, g), key);
-  }
-  
-  template <class Gt, class Tds, class PropertyTag, class Key,class Value>
-  inline void
-  put(PropertyTag p, CGAL::Delaunay_triangulation_2<Gt,Tds>& g, 
-      const Key& key, const Value& value)
-  {
-    typedef typename boost::property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>, PropertyTag>::type Map;
-    Map pmap = get(p, g);
-    put(pmap, key, value);
-  }
-
-} // namespace CGAL
-
-namespace boost {
-
-  // What are those needed for ???
-  template <typename Gt, typename Tds>
-  struct edge_property_type<CGAL::Delaunay_triangulation_2<Gt,Tds> > {
-    typedef void type;
-  };  
-
-  template <typename Gt, typename Tds>
-  struct vertex_property_type<CGAL::Delaunay_triangulation_2<Gt,Tds> > {
-    typedef void type;
-  };
-} // namespace boost
-
-//#include <CGAL/graph_traits_Delaunay_delaunay_triangulation_2.h>
-
-#endif // CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h
deleted file mode 100644
index 0356501..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-
-#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
-#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
-
-#include <boost/config.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-
-#include <CGAL/basic.h>
-#include <CGAL/boost/graph/iterator.h>
-
-#include <CGAL/Handle_hash_function.h>
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-#include <CGAL/boost/graph/halfedge_graph_traits.h>
-#endif
-
-namespace CGAL {
-
-namespace internal {
-
-template<typename I>
-class Prevent_deref
-  : public boost::iterator_adaptor<
-  Prevent_deref<I>
-  , I // base
-  , I // value
-  >
-{
-public:
-  typedef boost::iterator_adaptor<
-  Prevent_deref<I>
-  , I // base
-  , I // value
-  > Base;
-  //  typedef typename Prevent_deref::iterator_adaptor_::reference reference;
-  typedef typename Base::reference reference;
-  Prevent_deref() : Base() {};
-  Prevent_deref(const I& i) : Base(i) {};
-private:
-  friend class boost::iterator_core_access;
-  reference dereference() const { return const_cast<typename boost::remove_reference<reference>::type&>(this->base_reference()); }
-};
-
-// a HDS_halfedge pretending to be an Edge
-template<typename Halfedge_handle>
-struct HDS_edge {
-  HDS_edge() : halfedge_() { }
-
-  explicit HDS_edge(const Halfedge_handle& h) : halfedge_(h) {}
-
-  bool operator==(const HDS_edge& other) const {
-    // equality is tricky, we are equal when both halfedges are the
-    // same or when the opposite halfedge of this is the same as
-    // halfedge_.other but we need to be careful not to apply this
-    // should this be the invalid halfedge or opposite is going to
-    // blow up
-    if(halfedge_ == other.halfedge_) {
-      return true;
-    } else if(halfedge_ != Halfedge_handle()) { // not default constructed
-      return halfedge_->opposite() == other.halfedge_;
-    } else {
-      // this is the invalid halfedge, it can only be equal to the
-      // invalid halfedge and this is covered by the first case
-      return false;
-    }
-  }
-
-  bool operator!=(const HDS_edge& other) const {
-    return !(*this == other);
-  }
-
-  friend bool operator<(const HDS_edge& a,const HDS_edge& b)
-  {
-    if(a==b) return false;
-    return a.halfedge_ < b.halfedge_;
-  }
-
-  // forward some function to avoid boilerplate and typedefs inside
-  // the free functions
-
-  HDS_edge next() { return HDS_edge(halfedge_->next()); }
-
-  // this is potentially broken as it does not use the decorator to
-  // find prev, but we cannot instantiate the entire decorator
-  // without the full polyhedron type and taking all necessary
-  // template parameters seems overkill
-  HDS_edge prev() { return HDS_edge(halfedge_->prev()); }
-
-  HDS_edge opposite() { return HDS_edge(halfedge_->opposite()); }
-
-  // this is hacky, we don't know the actual type of the id and if we
-  // start adding decltype special cases we have to do it consistently
-  // up to the property map and maybe back down to Polyhedron.
-  std::size_t id() const { return halfedge_->id() / 2; }
-
-  Halfedge_handle halfedge() const { return halfedge_; }
-
-  // save us some work to do function chaining
-  HDS_edge
-  opposite_next() { return HDS_edge(halfedge_->opposite()->next()); }
-
-  HDS_edge
-  next_opposite() { return HDS_edge(halfedge_->next()->opposite()); }
-
-  HDS_edge
-  prev_opposite() { return HDS_edge(halfedge_->prev()->opposite()); }
-
-  HDS_edge
-  opposite_prev() { return HDS_edge(halfedge_->opposite()->prev()); }
-
-
-private:
-  Halfedge_handle halfedge_;
-};
-
-// make edge_descriptor hashable by default in Unique_hash_map
-namespace handle{
-  template<typename Halfedge_handle>
-  struct Hash_functor< HDS_edge<Halfedge_handle> >
-  {
-    std::size_t
-    operator()(const HDS_edge<Halfedge_handle>& edge)
-    {
-      Halfedge_handle he = edge.halfedge();
-      if ( he < he->opposite() )
-        return Hash_functor<Halfedge_handle>()(he);
-      return Hash_functor<Halfedge_handle>()(he->opposite());
-    }
-  };
-} //end of namespace handle
-
-template<typename Halfedge_handle>
-struct Construct_edge {
-  typedef HDS_edge<Halfedge_handle> result_type;
-  HDS_edge<Halfedge_handle> operator()(const Halfedge_handle& he) const
-  { return HDS_edge<Halfedge_handle>(he); }
-};
-
-template<typename Halfedge_handle>
-struct Construct_edge_opposite {
-  typedef HDS_edge<Halfedge_handle> result_type;
-  HDS_edge<Halfedge_handle> operator()(const Halfedge_handle& he) const
-  { return HDS_edge<Halfedge_handle>(he->opposite()); }
-};
-
-} // internal
-
-template <class HDS>
-struct HDS_graph_traits
-{
-private:
-  struct HDS_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
-                                        public virtual boost::vertex_list_graph_tag,
-                                        public virtual boost::edge_list_graph_tag
-  {};
-
-public:
-  typedef typename HDS::Vertex_handle                                vertex_descriptor;
-  typedef typename internal::HDS_edge<typename HDS::Halfedge_handle> edge_descriptor;
-  typedef typename HDS::Face_handle                                  face_descriptor;
-  typedef typename HDS::Halfedge_handle                              halfedge_descriptor;
-
-  typedef internal::Prevent_deref<typename HDS::Vertex_iterator>     vertex_iterator;
-  typedef internal::Prevent_deref<typename HDS::Face_iterator>       face_iterator;
-  typedef internal::Prevent_deref<typename HDS::Edge_iterator>       edge_iterator_i;
-  typedef internal::Prevent_deref<typename HDS::Halfedge_iterator>   halfedge_iterator;
-
-
-
-  typedef boost::transform_iterator<
-    internal::Construct_edge<typename HDS::Halfedge_handle>,
-    edge_iterator_i,
-    edge_descriptor> edge_iterator;
-
-  typedef Out_edge_iterator<HDS> out_edge_iterator;
-
-  typedef In_edge_iterator<HDS> in_edge_iterator;
-
-  typedef boost::undirected_tag             directed_category;
-  typedef boost::disallow_parallel_edge_tag edge_parallel_category;
-  typedef HDS_graph_traversal_category      traversal_category;
-
-  typedef typename HDS::size_type vertices_size_type;
-  typedef vertices_size_type      edges_size_type;
-  typedef vertices_size_type      halfedges_size_type;
-  typedef vertices_size_type      degree_size_type;
-  typedef vertices_size_type      faces_size_type;
-
-  static vertex_descriptor null_vertex() { return vertex_descriptor(); }
-  static halfedge_descriptor null_halfedge() { return halfedge_descriptor(); }
-  static face_descriptor null_face() { return face_descriptor(); }
-};
-
-
-} //namespace CGAL
-
-#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
deleted file mode 100644
index ddc3f15..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
+++ /dev/null
@@ -1,663 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Philipp Moeller
-
-#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
-#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-
-#include <boost/iterator/transform_iterator.hpp>
-
-#include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
-#include <CGAL/boost/graph/internal/OM_iterator_from_circulator.h>
-#include <CGAL/boost/graph/iterator.h>
-#include <CGAL/Iterator_range.h>
-
-#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
-
-// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4267)
-#endif
-namespace CGAL { namespace internal {
-
-
-template<typename Halfedge_handle>
-class OMesh_edge {
-public:
-  OMesh_edge() : halfedge_() {}
-  explicit OMesh_edge(const Halfedge_handle& h) : halfedge_(h) {}
-  Halfedge_handle halfedge() const { return halfedge_; }
-  bool is_valid() const { return halfedge_.is_valid(); }
-
-  bool
-  operator==(const OMesh_edge& other) {
-    if(halfedge_ == other.halfedge_) {
-      return true;
-    } else if(halfedge_ != Halfedge_handle()) {
-      return opposite() == other.halfedge_;
-    } else {
-      return false;
-    }
-  }
-
-  bool
-  operator!=(const OMesh_edge& other) { return !(*this == other); }
-
-  Halfedge_handle
-  opposite() const { return Halfedge_handle((halfedge_.idx() & 1) ? halfedge_.idx()-1 : halfedge_.idx()+1); }
-
-  OMesh_edge
-  opposite_edge() const { return OMesh_edge(Halfedge_handle((halfedge_.idx() & 1) ? halfedge_.idx()-1 : halfedge_.idx()+1)); }
-
-  unsigned int idx() const { return halfedge_.idx() / 2; }
-private:
-  Halfedge_handle halfedge_;
-};
-
-template <typename Halfedge_handle, typename OMeshEdge>
-struct Convert_omesh_edge
-{
-  typedef OMesh_edge<Halfedge_handle> result_type;
-  result_type operator()(const OMeshEdge& h) const { 
-    return result_type(Halfedge_handle(h.idx() * 2)); 
-  }
-};
-
-template <typename Halfedge_handle>
-struct Construct_omesh_edge
-{
-  typedef OMesh_edge<Halfedge_handle> result_type;
-  template <typename T>
-  result_type operator()(const T& h) const { return result_type(h); }
-};
-
-template <typename Halfedge_handle>
-struct Construct_omesh_edge_opposite
-{
-  typedef OMesh_edge<Halfedge_handle> result_type;
-  template <typename T>
-  result_type operator()(const T& h) const { return result_type(h).opposite_edge(); }
-};
-
-
-} // internal
-} // CGAL
-
-
-namespace boost {
-
-template <class K>
-struct graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >
-{
-private:
-  typedef OpenMesh::PolyMesh_ArrayKernelT<K> SM;
-
-  struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
-                                       public virtual boost::vertex_list_graph_tag,
-                                       public virtual boost::edge_list_graph_tag
-  {};
-
-public:
-  // Graph
-  typedef typename SM::VertexHandle                                        vertex_descriptor;
-  typedef typename SM::Point                                               vertex_property_type;
-  typedef typename CGAL::internal::OMesh_edge<typename SM::HalfedgeHandle> edge_descriptor;
-  typedef boost::undirected_tag                                            directed_category;
-  typedef boost::disallow_parallel_edge_tag                                edge_parallel_category; 
-  typedef SM_graph_traversal_category                                      traversal_category;
-
-  // HalfedgeGraph
-  typedef typename SM::HalfedgeHandle              halfedge_descriptor;
-
-   // FaceGraph
-  typedef typename SM::FaceHandle   face_descriptor;
-  
-  // VertexListGraph
-  typedef typename SM::VertexIter   vertex_iterator;
-  typedef unsigned int              vertices_size_type;
-  // EdgeListGraph
-  typedef boost::transform_iterator<
-    CGAL::internal::Convert_omesh_edge<typename SM::HalfedgeHandle, typename SM::EdgeHandle>,
-    typename SM::EdgeIter,
-    edge_descriptor>                edge_iterator;
-
-  typedef unsigned int              edges_size_type;
-  // HalfEdgeListGraph
-  typedef typename SM::HalfedgeIter halfedge_iterator;
-  typedef unsigned int              halfedges_size_type;
-  // FaceListGraph
-  typedef typename SM::FaceIter     face_iterator;
-  typedef unsigned int              faces_size_type;
-
-  // IncidenceGraph
-  typedef unsigned int              degree_size_type;
-
-  
-  typedef CGAL::In_edge_iterator<SM> in_edge_iterator;
-
-  typedef CGAL::Out_edge_iterator<SM> out_edge_iterator;
-
-  // nulls
-  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
-  static face_descriptor     null_face()   { return face_descriptor(); }
-  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
-};
-
-template<typename K>
-struct graph_traits< const OpenMesh::PolyMesh_ArrayKernelT<K> >  
-  : public graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >
-{ };
-
-} // namespace boost
-
-namespace OpenMesh {
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertices_size_type
-num_vertices(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.n_vertices();
-}
-  
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edges_size_type
-num_edges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.n_edges();
-}
-  
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
-degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.valence(v);
-}
-
-         
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
-out_degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-           const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.valence(v);
-}
-             
-  
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
-in_degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-          const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.valence(v);
-}
-            
-  
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-source(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
-       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.from_vertex_handle(e.halfedge());
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-source(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.from_vertex_handle(h);
-}
-         
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
-       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.to_vertex_handle(e.halfedge());
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.to_vertex_handle(h);
-}
-    
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_iterator>
-vertices(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return CGAL::make_range(sm.vertices_sbegin(), sm.vertices_end()); 
-}
-
- 
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator>
-edges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator iterator;
-  iterator beg(sm.edges_sbegin());
-  iterator end(sm.edges_end());
-  return CGAL::make_range(beg,end); 
-}
-
-  
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::in_edge_iterator>
-in_edges(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::in_edge_iterator Iter;
-
-  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
-}
-
-
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::out_edge_iterator>
-out_edges(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-          const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::out_edge_iterator Iter;
-  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
-}
-
-
-template<typename K>
-std::pair<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor,
-          bool>
-edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u, 
-     typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor 
-    he(sm.find_halfedge(u, v));
-  return std::make_pair(he, he.is_valid());
-}
-
-
-//
-// HalfedgeGraph
-//
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-next(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.next_halfedge_handle(h);
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-prev(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.prev_halfedge_handle(h);
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-opposite(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.opposite_halfedge_handle(h);
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor
-edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& /*sm*/)
-{
-  return typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor(h);
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
-         const OpenMesh::PolyMesh_ArrayKernelT<K>&)
-{
-  return e.halfedge();
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  // prev because OpenMesh stores out-going halfedges
-  return sm.prev_halfedge_handle(sm.halfedge_handle(v));
-}
-
-
-template <typename K>
-std::pair<
-  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor,
-  bool
->
-halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u,
-         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h = sm.find_halfedge(u, v);
-  return std::make_pair(h, h.is_valid());
-}
-
-
-
-//
-// HalfedgeListGraph
-//
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_iterator>
-halfedges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return CGAL::make_range(sm.halfedges_sbegin(), sm.halfedges_end());
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedges_size_type
-num_halfedges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.n_halfedges();
-}
-
-
-
-//
-// MutableHalfedgeGraph
-//
-template<typename K>
-void
-set_next(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h1, 
-         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h2,
-         OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.set_next_halfedge_handle(h1, h2);
-}
-
-
-
-template<typename K>
-void
-set_target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-           typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-           OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.set_vertex_handle(h, v);
-}
-
-
-template<typename K>
-void
-set_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-             typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-             OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.set_halfedge_handle(v, sm.opposite_halfedge_handle(h));
-}
-
-
-template<typename K>
-void
-adjust_border_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
-                       OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.adjust_outgoing_halfedge(v);
-}
-
-template<typename K>
-void
-garbage_collection(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.garbage_collection();
-}
-
-template<typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor
-add_edge(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return edge(sm.new_edge(boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_vertex(),
-                          boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_vertex() ), sm);
-}
-
-
-//
-// FaceGraph
-//
-template<typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
-{
-  return sm.halfedge_handle(f);
-}
-  
-template<typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
-face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
-{
-  return sm.face_handle(h);
-}
-
-
-
-//
-// MutableFaceGraph
-//
-template<typename K>
-void
-set_face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
-         OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.set_face_handle(h, f);
-}
-
-  
-template<typename K>
-void
-set_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
-             typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
-             OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  sm.set_halfedge_handle(f, h);
-}
-
- 
-//
-// FaceListGraph
-//
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::faces_size_type
-num_faces(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.n_faces();
-}
-  
-template <typename K>
-CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_iterator>
-faces(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return CGAL::make_range(sm.faces_sbegin(), sm.faces_end()); 
-}
- 
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-add_vertex(OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-  return sm.new_vertex();
-}
-
-  /*
-
-// MutableGraph
-// add a vertex with a default constructed property
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-add_vertex(OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-  return sm.add_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_property_type());
-}
-
-template <typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
-add_vertex(const typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_property_type& p, OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-  return sm.add_vertex(p);
-}
-
-template <typename K>
-void
-clear_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor, 
-             OpenMesh::PolyMesh_ArrayKernelT<K>&) {
-  assert(false);
-}
-
-  */
-
-template <typename K>
-void
-remove_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
-              OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-
-  sm.request_face_status();
-  sm.request_vertex_status();
-  sm.request_halfedge_status();
-  sm.set_halfedge_handle(v, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor());
-  sm.status(v).set_deleted(true);
-}
-
-  
-template <typename K>
-void
-remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u, 
-            typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
-            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
-{
-  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e = edge(u, v, sm);
-  remove_edge(e,sm);
-}
-
-template <typename K>
-void
-remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e, 
-            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
-{
-  sm.request_face_status();
-  sm.request_vertex_status();
-  sm.request_halfedge_status();
-  sm.request_edge_status();
-
-  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor halfedge_descriptor;
-
-  halfedge_descriptor h1 = halfedge(e,sm);
-  halfedge_descriptor h2 = opposite(halfedge(e,sm),sm);
-  sm.status(sm.edge_handle(h1)).set_deleted(true);
-  sm.status(h1).set_deleted(true);
-  sm.status(h2).set_deleted(true);
-
-}
-
-
-template <typename K>
-void
-remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator eiter, 
-            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
-{
-  remove_edge(*eiter, sm);
-}
-
-template<typename K>
-void
-remove_face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f, 
-            OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-
-  sm.request_face_status();
-  sm.request_vertex_status();
-  sm.request_halfedge_status();
-  set_halfedge(f, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor(), sm);
-  set_halfedge(f, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor(), sm);
-  sm.status(f).set_deleted(true);
-}
-
-
-template<typename K>
-std::pair<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor,
-          bool>
-add_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v1, 
-         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v2, 
-         OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
-  
-  return sm.new_edge(v1, v2);
-}
-
-template<typename K>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
-add_face(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return sm.new_face();
-}
-
-template<typename K, typename InputIterator>
-typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
-add_face(InputIterator begin, InputIterator end, OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  std::vector<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor> 
-    v(begin, end);
-  return sm.add_face(v);
-}
-
-template<typename K>
-bool is_valid(OpenMesh::PolyMesh_ArrayKernelT<K>& sm, bool verbose = false)
-{
-  return true;
-}
-
-} // namespace OpenMesh
-
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-#include <CGAL/boost/graph/backward_compatibility_functions.h>
-
-namespace boost {
-  // The following functions were defined in the namespace boost
-  using OpenMesh::vertices;
-  using OpenMesh::edges;
-  using OpenMesh::num_vertices;
-  using OpenMesh::num_edges;
-  using OpenMesh::out_edges;
-  using OpenMesh::in_edges;
-  using OpenMesh::target;
-  using OpenMesh::source;
-} // namespace boost
-#endif //CGAL_NO_DEPRECATED_CODE
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_BOOST_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h
deleted file mode 100644
index b0a6d16..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-
-#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
-#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
-
-#include <CGAL/boost/graph/graph_traits_HalfedgeDS.h>
-
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Iterator_range.h>
-
-#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
-
-//
-// NOTE: The BGL algorithms are NOT const-correct: i.e., they take a "G const&"
-// but instantiate "graph_traits<G>" instead of "graph_traits<G const>"
-// This is known Boost bug which will eventually be fixed, but in the meantime we need
-// to coerce both const and non-const specializations.
-// That is, HDS_graph_traits<G const> is really the same as HDS_graph_traits<G>
-// so graph_traits<G> is also the same as graph_traits<G const>.
-// Therefore, while, for instance, "graph_traits<G const>::vertex_descriptor"
-// is conceptually const-correct, it actually corresponds to the non-const handle,
-// hence the const_cast<> used below in the functions implementation.
-//
-
-namespace boost
-{
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-struct graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
-   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
-{
-  typedef typename Gt::Point_3 vertex_property_type;
-};
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-struct graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const >
-   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> > // See NOTE above!
-{};
-
-} // namespace boost
-
-namespace CGAL {
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertices_size_type
-num_vertices(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  return p.size_of_vertices();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edges_size_type
-num_edges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  return p.size_of_halfedges() / 2;
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
-degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
-       , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return v->vertex_degree();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
-out_degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
-           , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return v->vertex_degree();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
-in_degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
-          , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return v->vertex_degree();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor
-source(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor e
-       , const CGAL::Polyhedron_3<Gt,I,HDS,A> & )
-{
-  return e.halfedge()->opposite()->vertex();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor
-target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor e
-       , const CGAL::Polyhedron_3<Gt,I,HDS,A> & )
-{
-  return e.halfedge()->vertex();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-std::pair<
-  typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor
-  , bool>
-edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
-     , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
-     , const CGAL::Polyhedron_3<Gt,I,HDS,A> &)
-{
-  typedef CGAL::Polyhedron_3<Gt,I,HDS,A> P;
-  typedef typename P::Halfedge_around_vertex_circulator Circ;
-  typedef boost::graph_traits< P > Traits;
-  typedef typename Traits::edge_descriptor edge;
-
-  // circulate around the inedges of u
-  Circ c(u->halfedge()), d(u->halfedge());
-  if(c != 0) {
-    do {
-      if(c->opposite()->vertex() == v) {
-        return std::make_pair(edge(c->opposite()), true);
-      }
-    } while (++c != d);
-  }
-
-  return std::make_pair(edge(), false);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_iterator>
-vertices( const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_iterator Iter;
-  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
-  return make_range( Iter(ncp.vertices_begin()), Iter(ncp.vertices_end()) );
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator>
-edges( const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator_i Iter_i;
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator Iter;
-  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
-  return make_range( Iter(Iter_i(ncp.halfedges_begin())), Iter(Iter_i(ncp.halfedges_end()) ));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::in_edge_iterator>
-in_edges( typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
-          , const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::in_edge_iterator Iter;
-  return make_range(Iter(halfedge(u,p),p), Iter(halfedge(u,p),p,1));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::out_edge_iterator>
-out_edges( typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
-           , const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::out_edge_iterator Iter;
-  return make_range(Iter(halfedge(u,p),p), Iter(halfedge(u,p),p,1));
-}
-
-//
-// MutableHalfedgeGraph
-// 
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
-add_vertex(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  return g.hds().vertices_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex());
-}
-
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
-add_vertex(const typename boost::graph_traits<CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_property_type& p
-           , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  return g.hds().vertices_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex(p));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-remove_vertex(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-             , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  g.hds().vertices_erase(v);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
-add_edge(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{ 
-  return typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor(
-    g.hds().edges_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge(), 
-                            typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge()));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
-add_edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
-         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-         , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor 
-    e = add_edge(g);
-  set_target(halfedge(e, g), u, g);
-  set_target(opposite(halfedge(e, g), g), v, g);
-  return e;
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-remove_edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor e
-            , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  g.hds().edges_erase(e.halfedge());
-}
-
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-set_target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h1
-         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-         , CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  // set_face has become private in the halfedge provided by
-  // polyhedron for unknown reasons, although it used to be public
-  // once.
-
-  // We sneak in anyway. Inheritance can't keep us out.
-  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
-  static_cast<Sneak&>(*h1).set_vertex(v);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-set_next(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h1
-         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h2
-         , CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
-  static_cast<Sneak&>(*h1).set_next(h2);
-  static_cast<Sneak&>(*h2).set_prev(h1);
-}
-
-//
-// MutableFaceGraph 
-//
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor
-add_face(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  return g.hds().faces_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::HalfedgeDS::Face());
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-remove_face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
-            , CGAL::Polyhedron_3<Gt,I,HDS,A>& g) 
-{
-  g.hds().faces_erase(f);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-set_face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
-  , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  // set_face has become private in the halfedge provided by
-  // polyhedron for unknown reasons, although it used to be public
-  // once.
-
-  // We sneak in anyway. Inheritance can't keep us out.
-  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
-  static_cast<Sneak&>(*h).set_face(f);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-set_halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
-  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-  , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  f->set_halfedge(h);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-void
-set_halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-  , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex::Base Sneak;
-  static_cast<Sneak&>(*v).set_halfedge(h);
-}
-
-
-//
-// HalfedgeGraph
-//
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
-edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{ 
-  return typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor(h);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor e
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{ 
-  return e.halfedge();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{ 
-  return v->halfedge();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-           , bool>
-halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
-         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{ 
-  std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
-             , bool> e = edge(u, v, g);
-  return std::make_pair(e.first.halfedge(), e.second);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-opposite(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return h->opposite();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
-source(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
-{
-  return target(opposite(h, g), g);
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
-target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return h->vertex();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-next(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor outedge
-     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return outedge->next();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-prev(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor outedge
-     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
-{
-  return outedge->prev();
-}
-
-
-//
-// HalfedgeListGraph
-//
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_iterator>
-halfedges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_iterator Iter;
-  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
-  return make_range(Iter(ncp.halfedges_begin()), Iter(ncp.halfedges_end()));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedges_size_type
-num_halfedges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  return p.size_of_halfedges();
-}
-
-// FaceGraph
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor
-face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
-     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&) 
-{
-  return h->face();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
-halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
-         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&) 
-{
-  return f->halfedge();
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::face_iterator >
-faces(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::face_iterator face_iterator;
-  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
-  return make_range( face_iterator(ncp.facets_begin()), face_iterator(ncp.facets_end()));
-}
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::faces_size_type
-num_faces(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
-{
-  return p.size_of_facets();
-}
-
-
-
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-bool is_valid(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p, bool verbose = false)
-{
-  return p.is_valid(verbose);
-}
-} // namespace CGAL
-
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-
-namespace CGAL {
-template<class Gt, class I, CGAL_HDS_PARAM_, class A>
-struct halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
-   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
-{
-  typedef CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> > Base;
-  typedef typename Gt::Point_3 Point;
-  typedef typename Base::edge_iterator undirected_edge_iterator;
-};
-} // namespace CGAL
-#include <CGAL/boost/graph/backward_compatibility_functions.h>
-
-namespace boost {
-  // The following functions were defined in the namespace boost
-  using CGAL::vertices;
-  using CGAL::edges;
-  using CGAL::num_vertices;
-  using CGAL::num_edges;
-  using CGAL::out_edges;
-  using CGAL::in_edges;
-  using CGAL::target;
-  using CGAL::source;
-} // namespace boost
-
-#endif //CGAL_NO_DEPRECATED_CODE
-
-#undef CGAL_HDS_PARAM_
-
-#include <CGAL/boost/graph/properties_Polyhedron_3.h>
-
-#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Surface_mesh.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Surface_mesh.h
deleted file mode 100644
index aa4e388..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Surface_mesh.h
+++ /dev/null
@@ -1,539 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Philipp Moeller
-
-#ifndef CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
-#define CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-
-#include <boost/iterator/transform_iterator.hpp>
-
-#include <CGAL/boost/graph/properties_Surface_mesh.h>
-#include <CGAL/boost/graph/iterator.h>
-
-#include <CGAL/Surface_mesh.h>
-
-
-
-namespace boost {
-
-template <class P>
-struct graph_traits< CGAL::Surface_mesh<P> >
-{
-private:
-  typedef CGAL::Surface_mesh<P> SM;
-
-  struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
-                                       public virtual boost::vertex_list_graph_tag,
-                                       public virtual boost::edge_list_graph_tag
-  {};
-
-public:
-  // Graph
-  typedef typename SM::Vertex_index                                        vertex_descriptor;
-  typedef typename SM::Point                                               vertex_property_type;
-  typedef typename SM::Edge_index  edge_descriptor;
-  typedef boost::undirected_tag                                            directed_category;
-  typedef boost::disallow_parallel_edge_tag                                edge_parallel_category; 
-  typedef SM_graph_traversal_category                                      traversal_category;
-
-  // HalfedgeGraph
-  typedef typename SM::halfedge_index              halfedge_descriptor;
-
-   // FaceGraph
-  typedef typename SM::face_index   face_descriptor;
-  
-  // VertexListGraph
-  typedef typename SM::Vertex_iterator   vertex_iterator;
-  typedef typename SM::size_type              vertices_size_type;
-  // EdgeListGraph
-  typedef typename SM::edge_iterator  edge_iterator;
-
-  typedef typename SM::size_type              edges_size_type;
-  // HalfEdgeListGraph
-  typedef typename SM::Halfedge_iterator halfedge_iterator;
-  typedef typename SM::size_type              halfedges_size_type;
-  // FaceListGraph
-  typedef typename SM::Face_iterator    face_iterator;
-  typedef typename SM::size_type              faces_size_type;
-
-  // IncidenceGraph
-  typedef typename SM::size_type              degree_size_type;
-
-  
-  typedef CGAL::In_edge_iterator<SM> in_edge_iterator;
-
-  typedef CGAL::Out_edge_iterator<SM> out_edge_iterator;
-
-  // nulls
-  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
-  static face_descriptor     null_face()   { return face_descriptor(); }
-  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
-};
-
-template<typename P>
-struct graph_traits< const CGAL::Surface_mesh<P> >  
-  : public graph_traits< CGAL::Surface_mesh<P> >
-{ };
-
-} // namespace boost
-
-namespace CGAL {
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertices_size_type
-num_vertices(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.num_vertices();
-}
-  
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::edges_size_type
-num_edges(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.num_edges();
-}
-  
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
-degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-       const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.degree(v);
-}
-
-         
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
-out_degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-           const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.degree(v);
-}
-             
-  
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
-in_degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-          const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.degree(v);
-}
-            
-  
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-source(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
-       const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.source(e.halfedge());
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-source(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-       const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.source(h);
-}
-         
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
-       const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.target(e.halfedge());
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-       const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.target(h);
-}
-    
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_iterator>
-vertices(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.vertices(); 
-}
-
- 
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_iterator>
-edges(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.edges(); 
-}
-
-
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::in_edge_iterator>
-in_edges(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-         const CGAL::Surface_mesh<P>& sm)
-{
-  typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::in_edge_iterator Iter;
-
-  return make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
-}
-
-
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::out_edge_iterator>
-out_edges(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-          const CGAL::Surface_mesh<P>& sm)
-{
-  typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::out_edge_iterator Iter;
-  return make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
-}
-
-
-template<typename P>
-std::pair<typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor,
-          bool>
-edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u, 
-     typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
-     const CGAL::Surface_mesh<P>& sm) {
-  typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor 
-    he(sm.halfedge(u, v));
-  return std::make_pair(he, he.is_valid());
-}
-
-
-//
-// HalfedgeGraph
-//
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-next(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-     const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.next(h);
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-prev(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-     const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.prev(h);
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-opposite(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-         const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.opposite(h);
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor
-edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-     const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.edge(h);
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
-         const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.halfedge(e);
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-         const CGAL::Surface_mesh<P>& sm)
-{
-  // prev because OpenMesh stores out-going halfedges
-  return sm.halfedge(v);
-}
-
-
-template <typename P>
-std::pair<
-  typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor,
-  bool
->
-halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u,
-         typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-         const CGAL::Surface_mesh<P>& sm)
-{
-  typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h = sm.halfedge(u, v);
-  return std::make_pair(h, h.is_valid());
-}
-
-
-
-//
-// HalfedgeListGraph
-//
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_iterator>
-halfedges(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.halfedges();
-}
-
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedges_size_type
-num_halfedges(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.num_halfedges();
-}
-
-
-
-//
-// MutableHalfedgeGraph
-//
-template<typename P>
-void
-set_next(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h1, 
-         typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h2,
-         CGAL::Surface_mesh<P>& sm)
-{
-  sm.set_next(h1, h2);
-}
-
-
-
-template<typename P>
-void
-set_target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-           typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-           CGAL::Surface_mesh<P>& sm)
-{
-  sm.set_target(h, v);
-}
-
-
-template<typename P>
-void
-set_halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
-             typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-             CGAL::Surface_mesh<P>& sm)
-{
-  sm.set_halfedge(v, h);
-}
-
-
-template<typename P>
-void
-collect_garbage(CGAL::Surface_mesh<P>& sm)
-{
-  sm.collect_garbage();
-}
-
-template<typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor
-add_edge(CGAL::Surface_mesh<P>& sm)
-{
-  return sm.edge(sm.add_edge());
-}
-
-
-//
-// FaceGraph
-//
-template<typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
-halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
-     const CGAL::Surface_mesh<P>& sm) 
-{
-  return sm.halfedge(f);
-}
-  
-template<typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
-face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-     const CGAL::Surface_mesh<P>& sm) 
-{
-  return sm.face(h);
-}
-
-
-
-//
-// MutableFaceGraph
-//
-template<typename P>
-void
-set_face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-         typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
-         CGAL::Surface_mesh<P>& sm)
-{
-  sm.set_face(h, f);
-}
-
-  
-template<typename P>
-void
-set_halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
-             typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
-             CGAL::Surface_mesh<P>& sm)
-{
-  sm.set_halfedge(f, h);
-}
-
- 
-//
-// FaceListGraph
-//
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::faces_size_type
-num_faces(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.num_faces();
-}
-  
-template <typename P>
-Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_iterator>
-faces(const CGAL::Surface_mesh<P>& sm)
-{
-  return sm.faces(); 
-}
- 
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-add_vertex(CGAL::Surface_mesh<P>& sm) {
-  return sm.add_vertex();
-}
-
-  /*
-
-// MutableGraph
-// add a vertex with a default constructed property
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-add_vertex(CGAL::Surface_mesh<P>& sm) {
-  return sm.add_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_property_type());
-}
-
-template <typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
-add_vertex(const typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_property_type& p, CGAL::Surface_mesh<P>& sm) {
-  return sm.add_vertex(p);
-}
-
-template <typename P>
-void
-clear_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor, 
-             CGAL::Surface_mesh<P>&) {
-  assert(false);
-}
-
-  */
-
-template <typename P>
-void
-remove_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
-              CGAL::Surface_mesh<P>& sm) {
-
-  sm.remove_vertex(v);
-}
-
-  
-template <typename P>
-void
-remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u, 
-            typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
-            CGAL::Surface_mesh<P>& sm) 
-{
-  typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e = edge(u, v, sm);
-  remove_edge(e,sm);
-}
-
-template <typename P>
-void
-remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e, 
-            CGAL::Surface_mesh<P>& sm) 
-{
-  sm.remove_edge(e);
-}
-
-
-template <typename P>
-void
-remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_iterator eiter, 
-            CGAL::Surface_mesh<P>& sm) 
-{
-  remove_edge(*eiter, sm);
-}
-
-template<typename P>
-void
-remove_face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f, 
-            CGAL::Surface_mesh<P>& sm)
-{
-
-  sm.remove_face(f);
-}
-
-
-  /* AF: why a bool??
-template<typename P>
-std::pair<typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor,
-          bool>
-add_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v1, 
-         typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v2, 
-         CGAL::Surface_mesh<P>& sm) {
-}
-  */
-
-template<typename P>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
-add_face(CGAL::Surface_mesh<P>& sm)
-{
-  return sm.add_face();
-}
-
-template<typename P, typename InputIterator>
-typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
-add_face(InputIterator begin, InputIterator end, CGAL::Surface_mesh<P>& sm)
-{
-  std::vector<typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor> 
-    v(begin, end);
-  return sm.add_face(v);
-}
-
-template<typename P>
-bool is_valid(CGAL::Surface_mesh<P>& sm, bool verbose = false)
-{
-  return sm.is_valid(verbose);
-}
-
-} // namespace CGAL
-
-
-
-
-
-#endif // CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Triangulation_2.h
deleted file mode 100644
index 4670aad..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Triangulation_2.h
+++ /dev/null
@@ -1,816 +0,0 @@
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-
-#ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
-#define CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
-
-#include <boost/config.hpp>
-#include <boost/iterator_adaptors.hpp>
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-
-#include <CGAL/boost/graph/properties.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Iterator_range.h>
-
-// The functions and classes in this file allows the user to
-// treat a CGAL Triangulation_2 object as a boost graph "as is". No
-// wrapper is needed for the Triangulation_2 object.
-
-
-namespace CGAL {
-
-  namespace detail {
-
-template < class T, class EdgeBase >
-class Edge : public EdgeBase {
-  typedef typename T::Face_handle Face_handle ;
-  public:
-  
-  Edge()
-  {}
-
-  Edge(Face_handle  fh, int i)
-    : EdgeBase(fh,i)
-  {}
-  
-  Edge(const EdgeBase& e)
-    : EdgeBase(e)
-  {}
-
-  Edge(const Edge& e)
-    : EdgeBase(e)
-  {}
-
-  Edge&
-  operator=(const Edge& e)
-  {
-    this->first = e.first;
-    this->second = e.second;
-    return *this;
-}
-
-  bool operator==(const Edge& other) const
-  {
-    if((this->first == other.first)&&(this->second == other.second)) return true;
-    Face_handle fh = this->first->neighbor(this->second);
-    if(other.first != fh) return false;
-    int i = fh->index(this->first);
-    return (other.second == i);
-  }
-
-  bool operator!=(Edge& other) const
-  {
-    return ! (*this == other);
-  }
-};
-
-template <class Circ, class E>
-class Out_edge_circulator : public Circ
-{
-private:
-  mutable E e;
-
-public:
-
-  typedef E value_type;
-  typedef E* pointer;
-  typedef E& reference;
-
-  Out_edge_circulator()
-    : Circ()
-  {}
-
-  Out_edge_circulator(Circ c)
-    : Circ(c)
-  {}
-
-  const E& operator*() const
-  {
-    E ed = static_cast<const Circ*>(this)->operator*();
-    e = E(ed.first->neighbor(ed.second), ed.first->neighbor(ed.second)->index(ed.first));
-    return e;
-  }
-};
- 
-template <class Circ, class E>
-class In_edge_circulator : public Circ
-{
-private:
-  mutable E e;
-
-public:
-
-  typedef E value_type;
-  typedef E* pointer;
-  typedef E& reference;
-
-  In_edge_circulator()
-    : Circ()
-  {}
-
-  In_edge_circulator(Circ c)
-    : Circ(c)
-  {}
-
-  const E& operator*() const
-{
-    typename Circ::value_type ed = static_cast<const Circ*>(this)->operator*();
-    e = E(ed);
-    return e;
-  }
-};
-  
-
-  //  The vertex iterator of the bgl must evaluate to a vertex handle, not to a vertex
-template < class T>
-class boost_all_vertices_iterator {
-protected:
- typename T::All_vertices_iterator nt;
-public:
-  typedef typename T::All_vertices_iterator  Iterator;
-  typedef boost_all_vertices_iterator<T> Self;
-
-  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
-  typedef typename T::Vertex_handle  value_type;
-  typedef typename std::iterator_traits<Iterator>::difference_type           difference_type;
-  typedef value_type      reference;
-  typedef value_type      pointer;
-
-  // CREATION
-  // --------
-
-  boost_all_vertices_iterator()
-  {}
-
-  boost_all_vertices_iterator( Iterator j) : nt(j) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-
-  bool operator==( const Self& i) const { return ( nt == i.nt); }
-  bool operator!=( const Self& i) const { return !(nt == i.nt );   }
-  value_type  operator*() const  { return nt; }
-  value_type    operator->()  { return nt; }
-
-  Self& operator++() {
-    ++nt;
-    return *this;
-  }
-
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  Self& operator--() {
-    --nt;
-    return *this;
-  }
-
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-};
-
-template < class T>
-class boost_all_faces_iterator {
-protected:
- typename T::All_faces_iterator nt;
-public:
-  typedef typename T::All_faces_iterator  Iterator;
-  typedef boost_all_faces_iterator<T> Self;
-
-  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
-  typedef typename T::Face_handle  value_type;
-  typedef typename std::iterator_traits<Iterator>::difference_type           difference_type;
-  typedef value_type      reference;
-  typedef value_type      pointer;
-
-  // CREATION
-  // --------
-
-  boost_all_faces_iterator()
-  {}
-
-  boost_all_faces_iterator( Iterator j) : nt(j) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-
-  bool operator==( const Self& i) const { return ( nt == i.nt); }
-  bool operator!=( const Self& i) const { return !(nt == i.nt );   }
-  value_type  operator*() const  { return nt; }
-  value_type    operator->()  { return nt; }
-
-  Self& operator++() {
-    ++nt;
-    return *this;
-  }
-
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  Self& operator--() {
-    --nt;
-    return *this;
-  }
-
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-};
-
-
-  } // namespace detail
-} // namespace CGAL
-
-namespace boost { 
-
-  template <class GT, class TDS>
-  struct graph_traits< CGAL::Triangulation_2<GT,TDS> > {
-
-    struct T2_graph_traversal_category : 
-      public virtual bidirectional_graph_tag,
-      public virtual adjacency_graph_tag,
-      public virtual edge_list_graph_tag,
-      public virtual vertex_list_graph_tag { };
-
-    typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
-
-    typedef typename CGAL::Triangulation_2<GT,TDS>::Vertex_handle vertex_descriptor;
-    typedef typename CGAL::Triangulation_2<GT,TDS>::Face_handle face_descriptor;
-    typedef CGAL::detail::Edge<CGAL::Triangulation_2<GT,TDS>, typename CGAL::Triangulation_2<GT,TDS>::Edge>  edge_descriptor;
-    typedef typename CGAL::Triangulation_2<GT,TDS>::All_edges_iterator  edge_iterator;
-
-
-    // with just a typedef to Edge VC++ has ambiguities for function `next()`
-    struct halfedge_descriptor
-    {
-      face_descriptor first;
-      int second;
-      operator std::pair<face_descriptor, int>() { return std::make_pair(first,second); }
-      
-      halfedge_descriptor()
-      {}
-      
-      halfedge_descriptor(const typename Triangulation::Edge& e)
-        : first(e.first), second(e.second)
-      {}
-      
-      halfedge_descriptor(face_descriptor fd, int i)
-        : first(fd), second(i)
-      {}
-      
-      bool operator==(const halfedge_descriptor& other) const
-      {
-        return (first == other.first) && (second == other.second);
-      }
-      
-      bool operator!=(const halfedge_descriptor& other) const
-      {
-        return (first != other.first) || (second != other.second);
-      }
-
-      bool operator<(const halfedge_descriptor& other) const
-      {
-        if(first < other.first) return true;
-        if(first > other.first) return false;
-        return second  < other.second;
-      }
-    };
-
-    typedef typename CGAL::Triangulation_2<GT,TDS>::All_halfedges_iterator  halfedge_iterator;
-
-    typedef CGAL::detail::boost_all_vertices_iterator<Triangulation> vertex_iterator;
-    typedef CGAL::detail::boost_all_faces_iterator<Triangulation> face_iterator;
-    typedef CGAL::Counting_iterator<CGAL::detail::Out_edge_circulator<typename Triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > out_edge_iterator;
-    typedef CGAL::Counting_iterator<CGAL::detail::In_edge_circulator<typename Triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > in_edge_iterator;
-    typedef CGAL::Counting_iterator<typename Triangulation::Vertex_circulator> Incident_vertices_iterator;
-    typedef Incident_vertices_iterator adjacency_iterator;
-
-    typedef undirected_tag directed_category;
-    typedef disallow_parallel_edge_tag edge_parallel_category; 
-    typedef T2_graph_traversal_category traversal_category;
-    typedef typename Triangulation::size_type size_type;
-    typedef size_type vertices_size_type;
-    typedef size_type edges_size_type;
-    typedef size_type halfedges_size_type;
-    typedef size_type faces_size_type;
-    typedef size_type degree_size_type;
-
-  // nulls
-  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
-  static face_descriptor     null_face()   { return face_descriptor(); }
-  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
-  };
-
-
-} // namespace boost
-
-
-namespace CGAL {
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  next(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-       const Triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
-    return halfedge_descriptor(e.first, g.ccw(e.second));
-  }
-
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  prev(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-       const Triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
-    return halfedge_descriptor(e.first, g.cw(e.second));
-  }
-
-  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  opposite(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-       const Triangulation_2<Gt,Tds>& g)
-  {
-    
-    return g.mirror_edge(e);
-  }
-  
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
-  source(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
-         const Triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.ccw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
-  target(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
-         const Triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.cw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
-  source(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-         const Triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.ccw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
-  target(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-         const Triangulation_2<Gt,Tds>& g)
-  {
-    return e.first->vertex(g.cw(e.second));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor
-  face(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-         const Triangulation_2<Gt,Tds>&)
-  {
-    return e.first;
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor f,
-           const Triangulation_2<Gt,Tds>&)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
-    return halfedge_descriptor(f,0);
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor v,
-           const Triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor face_descriptor;
-    face_descriptor fd = v->face();
-    int i = fd->index(v);
-    return halfedge_descriptor(fd,g.ccw(i));
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
-  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
-           const Triangulation_2<Gt,Tds>&)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
-    return halfedge_descriptor(e.first,e.second);
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor
-  edge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
-           const Triangulation_2<Gt,Tds>&)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor edge_descriptor;
-    return edge_descriptor(e.first,e.second);
-  }
-
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_iterator>  
-  vertices(const Triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_iterator
-      Iter;
-    return make_range( Iter(g.all_vertices_begin()), Iter(g.all_vertices_end()) );
-  }
-
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_iterator>  
-  edges(const Triangulation_2<Gt,Tds>& g)
-  {    
-    return make_range(g.all_edges_begin(), g.all_edges_end());
-  }
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_iterator >  
-  halfedges(const Triangulation_2<Gt,Tds>& g)
-  {    
-    return make_range(g.all_halfedges_begin(), g.all_halfedges_end());
-  }
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_iterator >  
-  faces(const Triangulation_2<Gt,Tds>& g)
-  {
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_iterator
-      Iter;
-    return make_range( Iter(g.all_faces_begin()), Iter(g.all_faces_end()) );
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
-  out_degree(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::out_edge_iterator >  
-  out_edges(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename Triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
-      ::out_edge_iterator Iter;
-    
-    return make_range( Iter(ec), Iter(ec,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::in_edge_iterator >  
-  in_edges(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename Triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
-      ::in_edge_iterator Iter;
-    return make_range( Iter(ec), Iter(ec,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::adjacency_iterator>  
-  adjacent_vertices(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename Triangulation_2<Gt,Tds>::Vertex_circulator vc = out_edge_iterator(u,u.face());
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
-    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
-      ::adjacency_iterator Iter;
-    return make_range( Iter(vc), Iter(vc,out_deg) );
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertices_size_type
-  num_vertices(const Triangulation_2<Gt,Tds>& g)
-  {
-    return g.tds().number_of_vertices();
-  }  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edges_size_type
-  num_edges(const Triangulation_2<Gt,Tds>& g)
-  {
-
-    return  g.tds().number_of_vertices() + g.tds().number_of_faces() - 2;
-  }  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedges_size_type
-  num_halfedges(const Triangulation_2<Gt,Tds>& g)
-  {
-    return  num_edges(g) * 2;
-  }  
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::faces_size_type
-  num_faces(const Triangulation_2<Gt,Tds>& g)
-  {
-    return  g.tds().number_of_faces();
-  } 
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
-  in_degree(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-  template <class Gt, class Tds>
-  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
-  degree(
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
-    const Triangulation_2<Gt,Tds>& g)
-  {
-    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
-    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
-    if ( c != 0) {
-        do {
-            ++deg;
-        } while (++c != done);
-    }
-    return deg;
-  }
-
-
-  // property maps
-  template <class Gt, class Tds>
-  class T2_vertex_id_map
-    : public boost::put_get_helper<int, T2_vertex_id_map<Gt,Tds> >
-  {
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef int value_type;
-    typedef int reference;
-    typedef typename CGAL::Triangulation_2<Gt,Tds>::Vertex_handle key_type;
-    
-    T2_vertex_id_map()
-    {}
-    
-    long operator[](key_type vh) const {
-      return vh->id(); 
-    }
-  };
-
-  template <class Gt, class Tds>
-  class T2_vertex_point_map
-  {
-  public:
-    typedef boost::lvalue_property_map_tag category;
-    typedef typename Tds::Vertex::Point value_type;
-    typedef value_type& reference;
-    typedef typename CGAL::Triangulation_2<Gt,Tds>::Vertex_handle key_type;
-
-    friend reference get(T2_vertex_point_map<Gt,Tds>, key_type vh)
-    { 
-      return vh->point(); 
-    }
-    friend void put(T2_vertex_point_map<Gt,Tds>, key_type vh, reference v)
-    {
-      vh->point()=v; 
-    }
-    reference operator[](key_type vh) const {
-      return vh->point();
-    }
-  };
-
-
-  template <class Gt, class Tds>
-  class T2_edge_id_map
-    : public boost::put_get_helper<int, T2_edge_id_map<Gt,Tds> >
-  {
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef int value_type;
-    typedef int reference;
-    typedef typename CGAL::Triangulation_2<Gt,Tds>::Edge key_type;
-    
-    T2_edge_id_map()
-    {}
-    
-    long operator[](key_type e) const {
-      return (3 * e.first.id()) + e.second; 
-    }
-  };
-
-  template <class Gt, class Tds>
-  class T2_edge_weight_map
-    : public boost::put_get_helper<typename Gt::FT, T2_edge_weight_map<Gt, Tds> >
-  {
-  private:
-    const CGAL::Triangulation_2<Gt,Tds>& tr;
-  public:
-    typedef boost::readable_property_map_tag category;
-    typedef typename Gt::FT value_type;
-    typedef value_type reference;
-    typedef typename CGAL::Triangulation_2<Gt,Tds>::Edge key_type;
-
-    T2_edge_weight_map(const CGAL::Triangulation_2<Gt,Tds>& tr_) 
-      : tr(tr_) 
-    { }
-
-    value_type operator[](key_type e) const {
-      return tr.segment(e).squared_length();
-    }
-  };
-
-
-  template <class Gt, class Tds>
-  inline T2_vertex_id_map<Gt,Tds>
-  get(boost::vertex_index_t, const Triangulation_2<Gt,Tds>&) {
-    T2_vertex_id_map<Gt,Tds> m;
-    return m;
-  }
-
-  template <class Gt, class Tds>
-  inline T2_vertex_point_map<Gt,Tds>
-  get(boost::vertex_point_t, const Triangulation_2<Gt,Tds>&) {
-    T2_vertex_point_map<Gt,Tds> m;
-    return m;
-  }
-
-  template <class Gt, class Tds>
-  inline T2_edge_id_map<Gt,Tds>
-  get(boost::edge_index_t, const Triangulation_2<Gt,Tds>&) {
-    T2_edge_id_map<Gt,Tds> m;
-    return m;
-  }
-
-  template <class Gt, class Tds>
-  inline T2_edge_weight_map<Gt,Tds>
-  get(boost::edge_weight_t, const Triangulation_2<Gt,Tds>& g) {
-    T2_edge_weight_map<Gt,Tds> m(g);
-    return m;
-  }
-
-  template <class Tag>
-  struct T2_property_map { };
-
-  template <>
-  struct T2_property_map<boost::vertex_index_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef T2_vertex_id_map<Gt,Tds> type;
-      typedef T2_vertex_id_map<Gt,Tds> const_type;
-    };
-  };
-
-
-
-  template <>
-  struct T2_property_map<boost::vertex_point_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef T2_vertex_point_map<Gt,Tds> type;
-      typedef T2_vertex_point_map<Gt,Tds> const_type;
-    };
-  };
-
-
-  template <>
-  struct T2_property_map<boost::edge_index_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef T2_edge_id_map<Gt,Tds> type;
-      typedef T2_edge_id_map<Gt,Tds> const_type;
-    };
-  };
-
-
-  template <>
-  struct T2_property_map<boost::edge_weight_t> {
-    template <class Gt, class Tds>
-    struct bind_ {
-      typedef T2_edge_weight_map<Gt,Tds> type;
-      typedef T2_edge_weight_map<Gt,Tds> const_type;
-    };
-  };
-
-} // namespace CGAL
-
-namespace boost {
-  // g++ 'enumeral_type' in template unification not implemented workaround
-  template <class Gt, class Tds, class Tag>
-  struct property_map<CGAL::Triangulation_2<Gt,Tds>, Tag> {
-    typedef typename 
-    CGAL::T2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
-    typedef typename map_gen::type type;
-    typedef typename map_gen::const_type const_type;
-  };
-
-  // see struct property_map in Polyehdron for an explanation
-  template <class Gt, class Tds, class Tag>
-  struct property_map<const CGAL::Triangulation_2<Gt,Tds>, Tag> {
-    typedef typename 
-    CGAL::T2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
-    typedef typename map_gen::type type;
-    typedef typename map_gen::const_type const_type;
-  };
-
-} // namespace boost
-
-
-namespace CGAL {
-
-  template <class Gt, class Tds, class PropertyTag, class Key>
-  inline
-  typename boost::property_traits<
-    typename boost::property_map<Triangulation_2<Gt,Tds>,PropertyTag>::const_type>::value_type
-  get(PropertyTag p, const Triangulation_2<Gt,Tds>& g, const Key& key) {
-    return get(get(p, g), key);
-  }
-  
-  template <class Gt, class Tds, class PropertyTag, class Key,class Value>
-  inline void
-  put(PropertyTag p, Triangulation_2<Gt,Tds>& g, 
-      const Key& key, const Value& value)
-  {
-    typedef typename boost::property_map<Triangulation_2<Gt,Tds>, PropertyTag>::type Map;
-    Map pmap = get(p, g);
-    put(pmap, key, value);
-  }
-
-} // namespace CGAL 
-
-namespace boost {
-
-  // What are those needed for ???
-  template <typename Gt, typename Tds>
-  struct edge_property_type<CGAL::Triangulation_2<Gt,Tds> > {
-    typedef void type;
-  };  
-
-  template <typename Gt, typename Tds>
-  struct vertex_property_type<CGAL::Triangulation_2<Gt,Tds> > {
-    typedef void type;
-  };
-} // namespace boost
-
-//#include <CGAL/graph_traits_Delaunay_triangulation_2.h>
-
-#endif // CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/helpers.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/helpers.h
deleted file mode 100644
index 5bdb947..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/helpers.h
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright (c) 2014 GeometryFactory (France). All rights reserved.
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s) : Andreas Fabri
-
-#ifndef CGAL_BOOST_GRAPH_HELPERS_H
-#define CGAL_BOOST_GRAPH_HELPERS_H
-
-
-#include <boost/foreach.hpp>
-#include <CGAL/boost/graph/iterator.h>
-
-namespace CGAL {
-
-
-
-template <typename FaceGraph>
-bool is_border(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
-{
-  return face(hd,g) == boost::graph_traits<FaceGraph>::null_face();
-}
-
-template <typename FaceGraph>
-bool is_border_edge(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
-{
-  return is_border(hd, g) || is_border(opposite(hd,g), g);
-}
-
-template <typename FaceGraph>
-bool is_border(typename boost::graph_traits<FaceGraph>::edge_descriptor ed, const FaceGraph& g)
-{
-  return is_border_edge(halfedge(ed,g), g);
-}
-
-template <typename Graph>
-boost::optional<typename boost::graph_traits<Graph>::halfedge_descriptor>
-is_border(typename boost::graph_traits<Graph>::vertex_descriptor v,
-          const Graph& g)
-{
-  CGAL::Halfedge_around_target_iterator<Graph> havib, havie;
-  for(boost::tie(havib, havie) = halfedges_around_target(halfedge(v, g), g); havib != havie; ++havib) {
-    if(is_border(*havib,g)) {
-      typename boost::graph_traits<Graph>::halfedge_descriptor h = *havib;
-      return h;
-    }
-  }
-  // empty
-  return boost::optional<typename boost::graph_traits<Graph>::halfedge_descriptor>();
-}
-
-
- /*!
-    returns `true` if there are no 
-    border edges. 
-  */
-template <typename FaceGraph>
-bool is_closed(const FaceGraph& g)
-{
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  BOOST_FOREACH(halfedge_descriptor hd, halfedges(g)){
-    if(is_border(hd,g)){
-      return false;
-    }
-  }
-  return true;
-}
-
-
-template <typename FaceGraph>
-bool is_bivalent(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
-{
-  return hd == opposite(next(opposite(next(hd,g),g),g),g);
-}
-
-  /*!
-    returns `true` if all 
-    vertices have exactly two incident edges. 
-  */ 
-template <typename FaceGraph>
-  bool is_pure_bivalent(const FaceGraph& g)  
-{
-  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  BOOST_FOREACH(vertex_descriptor vd, vertices(g)){
-    halfedge_descriptor hd = halfedge(vd,g);
-    if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
-       (! is_bivalent(hd,g))){
-      return false;
-    }
-  }
-  return true;
-}
-
-template <typename FaceGraph>
-bool is_trivalent(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
-{
-  return hd == opposite(next(opposite(next(opposite(next(hd,g),g),g),g),g),g);
-}
-	
-  /*!
-    returns `true` if all 
-    vertices have exactly three incident edges. 
-  */ 
-template <typename FaceGraph>
-  bool is_pure_trivalent(const FaceGraph& g)  
-{
-  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  BOOST_FOREACH(vertex_descriptor vd, vertices(g)){
-    halfedge_descriptor hd = halfedge(vd,g);
-    if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
-       (! is_trivalent(hd,g))){
-      return false;
-    }
-  }
-  return true;
-}
-
- /*!
-    returns `true` iff the connected component denoted by `h` is a triangle. 
-    \pre `g` must be valid.
-  */ 
-template <typename FaceGraph>
-  bool is_triangle(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)  
-{ 
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  halfedge_descriptor beg = hd;
-  if(is_border(hd,g)) return false;
-  for(int i=0; i<3;i++){
-    if(! is_border(opposite(hd,g),g)) return false;
-    hd = next(hd,g);
-  }
-  return next(hd,g)== beg;
-}
-
- /*!
-    returns `true` iff the face is a triangle, that is it has three incident halfedges. 
- */
-template <typename FaceGraph>
-bool is_triangle(typename boost::graph_traits<FaceGraph>::face_descriptor fd, const FaceGraph& g)
-{
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  halfedge_descriptor hd = halfedge(fd,g);
-  return hd == next(next(next(hd,g),g),g);
-}
-
-  /*!
-    returns `true` if all faces are triangles. 
-  */ 
-template <typename FaceGraph>
-  bool is_pure_triangle(const FaceGraph& g)  
-{
-  typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
-  BOOST_FOREACH(face_descriptor fd, faces(g)){
-    if(! is_triangle(fd,g)){
-      return false;
-    }
-  }
-  return true;
-}
-
-
-/*!
-    returns `true` iff the connected component denoted by `h` is a quadrilateral. 
-  */
-template <typename FaceGraph>
-bool is_quad(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
-{
- typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  halfedge_descriptor beg = hd;
-  if(is_border(hd,g)) return false;
-  for(int i=0; i<4;i++){
-    if(! is_border(opposite(hd,g),g)) return false;
-    hd = next(hd,g);
-  }
-  return next(hd,g)== beg;
-}
-
-
- /*!
-    returns `true` iff the face is a quad, that is it has four incident halfedges. 
- */
-template <typename FaceGraph>
-bool is_quad(typename boost::graph_traits<FaceGraph>::face_descriptor fd, const FaceGraph& g)
-{
- typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  halfedge_descriptor hd = halfedge(fd,g);
-  return hd == next(next(next(next(hd,g),g),g),g);
-}
-
-  /*!
-    returns `true` if all faces are quadrilaterals. 
-  */ 
-template <typename FaceGraph>
-  bool is_pure_quad(const FaceGraph& g)  
-{
-    typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
-  BOOST_FOREACH(face_descriptor fd, faces(g)){
-    if(! is_quad(fd,g)){
-      return false;
-    }
-  }
-  return true;
-}
- 
-  /*!
-    returns `true` iff the connected component denoted by `h` is a tetrahedron. 
-  */ 
-template <typename FaceGraph>
-bool is_tetrahedron( typename boost::graph_traits<FaceGraph>::halfedge_descriptor h1, const FaceGraph& g)   
-{
-  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
-  halfedge_descriptor h2 = next(h1,g);
-  halfedge_descriptor h3 = next(h2,g);
-  halfedge_descriptor h4 = next(opposite(h1,g),g );
-  halfedge_descriptor h5 = next(opposite(h2,g),g );
-  halfedge_descriptor h6 = next(opposite(h3,g),g );
-  // check halfedge combinatorics.
-  // at least three edges at vertices 1, 2, 3.
-  if ( h4 == opposite(h3,g) ) return false;
-  if ( h5 == opposite(h1,g) ) return false;
-  if ( h6 == opposite(h2,g) ) return false;
-  // exact three edges at vertices 1, 2, 3.
-  if ( next(opposite(h4,g),g) != opposite(h3,g) ) return false;
-  if ( next(opposite(h5,g),g) != opposite(h1,g) ) return false;
-  if ( next(opposite(h6,g),g) != opposite(h2,g) ) return false;
-  // three edges at v4.
-  if ( opposite(next(h4,g),g) != h5 ) return false;
-  if ( opposite(next(h5,g),g) != h6 ) return false;
-  if ( opposite(next(h6,g),g) != h4 ) return false;
-  // All facets are triangles.
-  if ( next(next(next(h1,g),g),g) != h1 ) return false;
-  if ( next(next(next(h4,g),g),g) != h4 ) return false;
-  if ( next(next(next(h5,g),g),g) != h5 ) return false;
-  if ( next(next(next(h6,g),g),g) != h6 ) return false;
-  // all edges are non-border edges.
-  if ( is_border(h1,g) ) return false;  // implies h2 and h3
-  if ( is_border(h4,g) ) return false;
-  if ( is_border(h5,g) ) return false;
-  if ( is_border(h6,g) ) return false;
-  return true;
-  }
-
-
-
-} // namespace CGAL
-
-#endif // CGAL_BOOST_GRAPH_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/internal/helpers.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/internal/helpers.h
deleted file mode 100644
index 9c81823..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/internal/helpers.h
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-// Author(s) : Andread Fabri
-
-#ifndef CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
-#define CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/optional.hpp>
-#include <CGAL/boost/graph/iterator.h>
-
-namespace CGAL {
-
-// breaks a dependency loop between <CGAL/boost/graph/helpers.h>
-// and <CGAL/boost/graph/iterator.h>
-template <typename Graph> class Halfedge_around_target_iterator;
-
-namespace internal {
-
-template <typename Graph>
-void
-set_border(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-          , Graph& g)
-{
-  set_face(h, boost::graph_traits<Graph>::null_face(), g);
-}
-
-template <typename Graph>
-typename boost::graph_traits<Graph>::halfedge_descriptor
-copy(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-                    , Graph& g)
-{
-  typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor res = halfedge(e,g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor ropp = opposite(res, g);
-  typename boost::graph_traits<Graph>::halfedge_descriptor hopp = opposite(h, g);
-  set_target(res, target(h, g), g);
-  set_target(hopp, target(hopp, g), g);
-  set_face(res, face(h, g), g);
-  set_face(ropp, face(hopp, g), g);
-  // note that we cannot call set_next as it then would call set_prev on the  original
-  return res;
- }
-
-
-template <typename Graph>
-void
-set_vertex_halfedge(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-                    , Graph& g)
-{ set_halfedge(target(h, g), h, g); }
-
-
-template <typename Graph>
-void
-close_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-          , Graph& g)
-{
-  // makes `opposite(h,g)' the successor of h.
-  set_next( h, opposite(h, g), g);
-}
-
-
-template <typename Graph>
-void
-close_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-          , typename boost::graph_traits<Graph>::vertex_descriptor const& v
-          , Graph& g)
-{
-  // makes `h->opposite()' the successor of h and sets the incident
-  // vertex of h to v.
-  set_next(h, opposite(h, g), g);
-  set_target(h, v, g);
-  set_halfedge(v, h, g);
-}
-
-template <typename Graph>
-void
-insert_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-           , typename boost::graph_traits<Graph>::halfedge_descriptor const& h2
-           , Graph& g)
-{
-  set_next(h, next(h2,g), g);
-  set_next(h2, opposite(h, g), g);
-  set_target(h, target(h2, g), g);
-}
-
-
-template <typename Graph>
-void
-remove_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-           , Graph& g)
-{ 
-  set_next(h, next(opposite(next(h, g), g), g), g);
-}
-
-
-template <typename Graph>
-void 
-set_face_in_face_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h, 
-                      typename boost::graph_traits<Graph>::face_descriptor f, 
-                      Graph& g) 
-{
-  typename boost::graph_traits<Graph>::halfedge_descriptor end = h;
-  do {
-    set_face(h, f, g);
-    h = next(h, g);
-  } while ( h != end);
-}
-    
-
-template <typename Graph>
-void insert_halfedge(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
-                     , typename boost::graph_traits<Graph>::halfedge_descriptor const& f
-                     , Graph& g)
-{
-  set_next(h, next(f, g), g);
-  set_next(f, h, g);
-  set_face(h, face(f, g), g);
-}
-
-template <typename Graph>
-std::size_t
-exact_num_vertices(const Graph& g)
-{ 
-  typename boost::graph_traits<Graph>::vertex_iterator beg, end;
-  boost::tie(beg,end) = vertices(g);
-  return std::distance(beg,end);
- }
-
-template <typename Graph>
-std::size_t
-exact_num_halfedges(const Graph& g)
-{ 
-  typename boost::graph_traits<Graph>::halfedge_iterator beg, end;
-  boost::tie(beg,end) = halfedges(g);
-  return std::distance(beg,end);
- }
-
-template <typename Graph>
-std::size_t
-exact_num_edges(const Graph& g)
-{ 
-  typename boost::graph_traits<Graph>::edge_iterator beg, end;
-  boost::tie(beg,end) = edges(g);
-  return std::distance(beg,end);
- }
-
-template <typename Graph>
-std::size_t
-exact_num_faces(const Graph& g)
-{ 
-  typename boost::graph_traits<Graph>::face_iterator beg, end;
-  boost::tie(beg,end) = faces(g);
-  return std::distance(beg,end);
- }
-
-
-
-
-} // internal
-} // CGAL
-
-
-#endif // CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/iterator.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/iterator.h
deleted file mode 100644
index d933ee9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/iterator.h
+++ /dev/null
@@ -1,1295 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_BGL_ITERATORS_H
-#define CGAL_BGL_ITERATORS_H
-
-#include <stdexcept>
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-
-#include <CGAL/Iterator_range.h>
-#include <CGAL/assertions.h>
-#include <CGAL/circulator_bases.h>
-#include <CGAL/boost/graph/internal/helpers.h>
-
-namespace CGAL {
-
-/// \cond SKIP_IN_MANUAL
-
-namespace internal {
-
-template <typename G>
-struct Edge {
-  const G* g; 
-
-  Edge()
-    : g(NULL)
-  {}
-
-  Edge(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::edge_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return edge(h, *g);
-  }
-};
-
-template <typename G>
-struct OppositeEdge {
-  const G* g; 
-
-  OppositeEdge()
-    : g(NULL)
-  {}
-
-  OppositeEdge(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::edge_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return edge(opposite(h,*g), *g);
-  }
-};
-
-template <typename G>
-struct OppositeHalfedge {
-  const G* g; 
-
-  OppositeHalfedge()
-    : g(NULL)
-  {}
-
-  OppositeHalfedge(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::halfedge_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return opposite(h,*g);
-  }
-};
-
-template <typename G>
-struct Target {
-  const G* g; 
-
-  Target()
-    : g(NULL)
-  {}
-
-  Target(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::vertex_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return target(h,*g);
-  }
-};
-
-template <typename G>
-struct Source {
-  const G* g; 
-
-  Source()
-    : g(NULL)
-  {}
-
-  Source(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::vertex_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return source(h,*g);
-  }
-};
-
-template <typename G>
-struct Face {
-  const G* g; 
-
-  Face()
-    : g(NULL)
-  {}
-
-  Face(const G& g)
-    : g(&g)
-  {}
-
-  typedef typename boost::graph_traits<G>::face_descriptor result_type;
-  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
-
-  result_type operator()(argument_type h) const
-  {
-    return face(h,*g);
-  }
-};
-
-} // namespace internal
-/// \endcond
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional iterator with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as source.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_iterator` `havi` with `h = *havi;` 
- * the following holds: Either `++havi` is the past the end iterator, or `next(opposite(h,g),g) == *++havi`. 
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalIterator`
- */
-template <typename Graph>
-class Halfedge_around_source_iterator {
-  typedef Halfedge_around_source_iterator Self;
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor vertex_descriptor;
-  typedef std::bidirectional_iterator_tag     iterator_category;
-  typedef halfedge_descriptor                 value_type;
-  typedef value_type*                         pointer;
-  typedef const value_type&                   reference;
-  typedef std::ptrdiff_t                      difference_type;
-
-private:  
-  halfedge_descriptor anchor, pos;
-  const Graph* g;
-  int      winding;
-#endif 
-  
-public:
-  Halfedge_around_source_iterator()
-    : anchor(), pos(), g(0)
-  {}
-
-  Halfedge_around_source_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
-    : anchor(hd), pos(hd), g(&g), winding((hd==halfedge_descriptor())?1:n)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_source_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base() == NULL)) ?
-      &Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator==( const Self& i) const {
-    CGAL_assertion( anchor == anchor);
-    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
-  }
-  
-  bool operator!=( const Self& i) const {
-    return !(*this == i);
-  }
-
-  bool operator== (void* ) const
-  {
-    return g == NULL;
-  }
-
-  reference operator*() const
-  {
-    return pos;
-  }
-
-  pointer operator->() const
-  {
-    return &pos;
-  }
-
-  Self& operator++() {
-    pos = next(opposite(pos,*g),*g);
-    if ( pos == anchor)
-      ++winding;
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-  Self& operator--() {
-    if ( pos == anchor)
-      --winding;
-    pos = opposite(prev(pos,*g),*g);
-    return *this;
-  }
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-#endif
-};
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional iterator with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as target.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_iterator` `havi` with `h = *havi;` 
- * the following holds: Either `++havi` is the past the end iterator, or `opposite(next(h,g),g) == *++havi`. 
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalIterator`
- */
-
-template <typename Graph>
-class Halfedge_around_target_iterator {
-  typedef Halfedge_around_target_iterator Self;
-
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor vertex_descriptor;
-  typedef std::bidirectional_iterator_tag     iterator_category;
-  typedef halfedge_descriptor                 value_type;
-  typedef value_type*                         pointer;
-  typedef const value_type&                   reference;
-  typedef std::ptrdiff_t                      difference_type;
-
-private:  
-  halfedge_descriptor anchor, pos;
-  const Graph* g;
-  int      winding;
-#endif 
-  
-public:
-  Halfedge_around_target_iterator()
-    : anchor(), pos(), g(0)
-  {}
-
-  Halfedge_around_target_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
-    : anchor(hd), pos(hd), g(&g), winding((hd==halfedge_descriptor())?1:n)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_target_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base() == NULL)) ?
-      &Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator==( const Self& i) const {
-    CGAL_assertion( anchor == anchor);
-    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
-  }
-  
-  bool operator!=( const Self& i) const {
-    return !(*this == i);
-  }
-
-  bool operator== (void* ) const
-  {
-    return g == NULL;
-  }
-
-  reference operator*() const
-  {
-    return pos;
-  }
-
-  pointer operator->() const
-  {
-    return &pos;
-  }
-
-  Self& operator++() {
-    pos = opposite(next(pos,*g),*g);
-    if ( pos == anchor)
-      ++winding;
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-  Self& operator--() {
-    if ( pos == anchor)
-      --winding;
-    pos = prev(opposite(pos,*g),*g);
-    return *this;
-  }
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-#endif
-};
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional iterator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges incident to the same face or border.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_iterator` `hafi` with  `h = *hafi` 
- * the following holds: Either `++hafi` is the past the end iterator, or `next(h,g) == *++hafi`.
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalIterator`
- */
-
-template <typename Graph>
-class Halfedge_around_face_iterator {
-#ifndef DOXYGEN_RUNNING 
-  typedef Halfedge_around_face_iterator Self;
-
-public:
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef std::bidirectional_iterator_tag      iterator_category;
-  typedef halfedge_descriptor                 value_type;
-  typedef value_type*                         pointer;
-  typedef value_type&                         reference;
-  typedef std::ptrdiff_t                      difference_type;
-  
-#endif
-  
-  Halfedge_around_face_iterator()
-    : pos(), g(0)
-  {}
-
-  Halfedge_around_face_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
-    : anchor(hd), pos(hd), g(&g), winding((hd == halfedge_descriptor())?1:n)
-  {}
-#ifndef DOXYGEN_RUNNING
-  reference         operator *  ( )       { return  pos; }
-  const value_type& operator *  ( ) const { return  pos; }
-  pointer           operator -> ( )       { return &pos; }
-  const value_type* operator -> ( ) const { return &pos; }
-
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_face_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base() == NULL)) ?
-      &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator==( const Self& i) const {
-    CGAL_assertion( anchor == anchor);
-    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
-  }
-
-  bool operator!=( const Self& i) const {
-    return !(*this == i);
-  }
-
-  Self& operator++() 
-  {
-    CGAL_assertion(g != NULL);
-    pos = next(pos,*g); 
-    if ( pos == anchor)
-      ++winding;
-    return *this;
-  }
-
-  Self operator++(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  Self& operator--() 
-  {
-    CGAL_assertion(g != NULL); 
-    if ( pos == anchor)
-      --winding;
-  
-    pos = prev(pos,*g);
-    return *this;
-  }
-
-  Self operator--(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-#endif
-private:
-  halfedge_descriptor anchor, pos;
-  const Graph* g;
-  int      winding;
-};
-
-
-template <typename Graph>
-class Halfedge_around_target_circulator;
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as source.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_circulator` `havc` with `h = *havc;` 
- * the following holds: `next(opposite(h,g),g) == *++havc`. 
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-template <typename Graph>
-class Halfedge_around_source_circulator
-#ifndef DOXYGEN_RUNNING
- : public boost::iterator_adaptor<
-             Halfedge_around_source_circulator<Graph>                    // Derived
-             , Halfedge_around_target_circulator<Graph>                  // Base
-             , typename boost::graph_traits<Graph>::halfedge_descriptor  // Value
-             , Bidirectional_circulator_tag                              // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::halfedge_descriptor  // Reference
-             >
-#endif
-{
-private:
-  internal::OppositeHalfedge<Graph> opp;
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
-#endif
-
-public:
-
-#ifndef DOXYGEN_RUNNING
-  typedef std::size_t size_type;
-#endif
-
-  Halfedge_around_source_circulator()
-  {}
-
-  Halfedge_around_source_circulator(halfedge_descriptor hd, const Graph& g)
-    : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(hd,g)), opp(g)
-  {}
-
-  Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g)
-    : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(halfedge(vd,g),g)), opp(g)
-  {}
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_source_circulator::*bool_type)() const;
-  
-  void this_type_does_not_support_comparisons() const {}
-  
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Halfedge_around_source_circulator::this_type_does_not_support_comparisons : 0;
-  }
-  
-  bool operator== (void*) const
-  {
-    return this->base_reference() == NULL;
-  }
-  
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::halfedge_descriptor dereference() const { return opp(*this->base_reference()); }
-}; 
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%face_descriptor` over all faces incident to the same vertex.
- * It circulates over the same halfedges as the `Halfedge_around_target_circulator`.
- *
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-
-template <typename Graph>
-class Face_around_target_circulator
-#ifndef DOXYGEN_RUNNING
-  : public boost::iterator_adaptor<
-             Face_around_target_circulator<Graph>                    // Derived
-             , Halfedge_around_target_circulator<Graph>                  // Base
-             , typename boost::graph_traits<Graph>::face_descriptor  // Value
-             , Bidirectional_circulator_tag                              // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
-             >
-#endif
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  internal::Face<Graph> fct;
-
-public:
-
-  Face_around_target_circulator()
-  {}
-
-  Face_around_target_circulator(halfedge_descriptor hd, const Graph& g)
-    : Face_around_target_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(hd,g)), fct(g)
-  {}
-#ifndef DOXYGEN_RUNNING
-  typedef std::size_t size_type;
-
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Face_around_target_circulator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Face_around_target_circulator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator== (void*) const
-  {
-    return this->base_reference() == NULL;
-  }
-
-
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
-#endif
-
-}; 
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as target.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_circulator` `havc` with `h = *havc;` 
- * the following holds: `opposite(next(h,g),g) == *++havc`. 
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-
-
-
-template <typename Graph>
-class Halfedge_around_target_circulator {
-  typedef Halfedge_around_target_circulator Self;
-
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
-  typedef Bidirectional_circulator_tag        iterator_category;
-  typedef halfedge_descriptor                 value_type;
-  typedef value_type*                         pointer;
-  typedef value_type&                         reference;
-  typedef std::ptrdiff_t                      difference_type;
-  typedef std::size_t                         size_type;
-#endif 
-
-  Halfedge_around_target_circulator()
-    : g(0)
-  {}
-
-  Halfedge_around_target_circulator(halfedge_descriptor pos, const Graph& g)
-    : pos(pos), g(&g)
-  {}
-
-  Halfedge_around_target_circulator(vertex_descriptor vd, const Graph& g)
-    : pos(halfedge(vd,g)), g(&g)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  reference         operator *  ( )       { return  pos; }
-  const value_type& operator *  ( ) const { return  pos; }
-  pointer           operator -> ( )       { return &pos; }
-  const value_type* operator -> ( ) const { return &pos; }
-
-  bool       operator == ( const Self& other) const { return  g == other.g && pos == other.pos; }
-  bool       operator != ( const Self& other) const { return  g != other.g || pos != other.pos; }
-
-
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_target_circulator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (g == NULL)) ?
-      &Halfedge_around_target_circulator::this_type_does_not_support_comparisons : 0;
-  }
-
-
-  bool operator== (void* ) const
-  {
-    return g == NULL;
-  }
-
- 
-  Self& operator++() 
-  {
-    CGAL_assertion(g != NULL);
-    pos = opposite(next(pos,*g),*g);
-    return *this;
-  }
-
-  Self operator++(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  Self& operator--() 
-  {
-    CGAL_assertion(g != NULL);
-    pos = prev(opposite(pos,*g),*g);
-    return *this;
-  }
-
-  Self operator--(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-#endif
-
-private:
-  halfedge_descriptor pos;
-  const Graph* g;
-};
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges incident to the same face or border.
- * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_circulator` `hafc` with  `h = *hafc` 
- * the following holds:  `next(h,g) == *++hafc`.
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-
-template <typename Graph>
-class Halfedge_around_face_circulator {
-  typedef Halfedge_around_face_circulator Self;
-
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef Bidirectional_circulator_tag        iterator_category;
-  typedef halfedge_descriptor                 value_type;
-  typedef value_type*                         pointer;
-  typedef value_type&                         reference;
-  typedef std::ptrdiff_t                      difference_type;
-  typedef std::size_t                         size_type;
-#endif 
-  
-  Halfedge_around_face_circulator()
-    : pos(), g(0)
-  {}
-
-  Halfedge_around_face_circulator(halfedge_descriptor pos, const Graph& g)
-    : pos(pos), g(&g)
-  {}
-#ifndef DOXYGEN_RUNNING
-  reference         operator *  ( )       { return  pos; }
-  const value_type& operator *  ( ) const { return  pos; }
-  pointer           operator -> ( )       { return &pos; }
-  const value_type* operator -> ( ) const { return &pos; }
-
-  bool       operator == ( const Self& other) const { return  g == other.g && pos == other.pos; }
-  bool       operator != ( const Self& other) const { return  g != other.g || pos != other.pos; }
- 
-
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Halfedge_around_face_circulator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (g == NULL)) ?
-      &Halfedge_around_face_circulator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator== (void* ) const
-  {
-    return g == NULL;
-  }
-
-  Self& operator++() 
-  {
-    CGAL_assertion(g != NULL);
-    pos = next(pos,*g);
-    return *this;
-  }
-
-  Self operator++(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  Self& operator--() 
-  {
-    CGAL_assertion(g != NULL);
-    pos = prev(pos,*g);
-    return *this;
-  }
-
-  Self operator--(int) 
-  {
-    CGAL_assertion(g != NULL);
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-#endif
-
-private:
-  halfedge_descriptor pos;
-  const Graph* g;
-};
-
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all halfedges with vertex `source(h,g)` as source.
- */
-template<typename Graph>
-Iterator_range<Halfedge_around_source_iterator<Graph> >
-halfedges_around_source(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g)
-{
-  typedef Halfedge_around_source_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all halfedges with vertex `v` as source.
- */
-template<typename Graph>
-Iterator_range<Halfedge_around_source_iterator<Graph> >
-halfedges_around_source(typename boost::graph_traits<Graph>::vertex_descriptor v, Graph& g)
-{
-  return halfedges_around_source(opposite(halfedge(v,g),g),g);
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all halfedges with vertex `target(h,g)` as target. 
- */
-template<typename Graph>
-Iterator_range<Halfedge_around_target_iterator<Graph> >
-halfedges_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Halfedge_around_target_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all halfedges with vertex `v` as target. 
- */
-template<typename Graph>
-Iterator_range<Halfedge_around_target_iterator<Graph> >
-halfedges_around_target(typename boost::graph_traits<Graph>::vertex_descriptor v, Graph& g)
-{
-  return halfedges_around_target(halfedge(v,g),g);
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all halfedges incident to the same face or border as `h`. 
- */
-template<typename Graph>
-Iterator_range<Halfedge_around_face_iterator<Graph> >
-halfedges_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Halfedge_around_face_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-
-template <typename Graph>
-class Face_around_face_iterator
-#ifndef DOXYGEN_RUNNING
-  : public boost::iterator_adaptor<
-            Face_around_face_iterator<Graph>                       // Derived
-             , Halfedge_around_face_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::face_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
-             >
-#endif
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  internal::Face<Graph> fct;
-public:
-
-  Face_around_face_iterator()
-  {}
-
-  Face_around_face_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : Face_around_face_iterator::iterator_adaptor_(Halfedge_around_face_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
-  {}
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
-}; 
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%face_descriptor`.
- * It circulates over the same halfedges as the `Halfedge_around_face_circulator`,
- * and provides the face descriptor associated to the opposite halfedge.  The face descriptor
- * may be the null face, and it may be several times the same face descriptor.
- *
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-
-
-
-template <typename Graph>
-class Face_around_face_circulator
-{};
-
-
-template <typename Graph>
-class Face_around_target_iterator
-#ifndef DOXYGEN_RUNNING  
-  : public boost::iterator_adaptor<
-            Face_around_target_iterator<Graph>                       // Derived
-             , Halfedge_around_target_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::face_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
-             >
-#endif
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-
-  internal::Face<Graph> fct;
-
-public:
-
-  Face_around_target_iterator()
-  {}
-
-  Face_around_target_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : Face_around_target_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
-  {}
-
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
-}; 
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all faces around  vertex `target(h,g)`. 
- */
-template<typename Graph>
-Iterator_range<Face_around_target_iterator<Graph> >
-faces_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Face_around_target_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all edge-adjacent faces to the same face `face(h,g)`.
- */
-template<typename Graph>
-Iterator_range<Face_around_face_iterator<Graph> >
-faces_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Face_around_face_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-template <typename Graph>
-class Vertex_around_face_circulator
-#ifndef DOXYGEN_RUNNING 
-  : public boost::iterator_adaptor<
-             Vertex_around_face_circulator<Graph>                    // Derived
-             , Halfedge_around_face_circulator<Graph>                  // Base
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
-             , Bidirectional_circulator_tag                              // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
-             >
-#endif
-{
-  internal::Target<Graph> fct;
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef std::size_t size_type;
-#endif
-
-  Vertex_around_face_circulator()
-  {}
-
-  Vertex_around_face_circulator(halfedge_descriptor h, const Graph& g)
-    : Vertex_around_face_circulator::iterator_adaptor_(Halfedge_around_face_circulator<Graph>(h,g)), fct(g)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Vertex_around_face_circulator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Vertex_around_face_circulator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator== (void*) const
-  {
-    return this->base_reference()== NULL;
-  }
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
-#endif
-}; 
-
-template <typename Graph>
-class Vertex_around_face_iterator
-#ifndef DOXYGEN_RUNNING
-   : public boost::iterator_adaptor<
-            Vertex_around_face_iterator<Graph>                       // Derived
-             , Halfedge_around_face_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
-             >
-#endif
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-
-  internal::Target<Graph> fct;
-public:
-
-  Vertex_around_face_iterator()
-  {}
-
-  Vertex_around_face_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : Vertex_around_face_iterator::iterator_adaptor_(Halfedge_around_face_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Vertex_around_face_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Vertex_around_face_iterator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator== (void*) const
-  {
-    return this->base_reference()== NULL;
-  }
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
-#endif
-}; 
-
-
-/**
- * \ingroup PkgBGLIterators
- * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%vertex_descriptor` over all vertices adjacent to the same vertex.
- * It circulates over the same halfedges as the `Halfedge_around_target_circulator`.
- *
- * \tparam Graph must be a model of the concept `HalfedgeGraph`
- * \cgalModels `BidirectionalCirculator`
- */
-
-template <typename Graph>
-class Vertex_around_target_circulator
-#ifndef DOXYGEN_RUNNING
-  : public boost::iterator_adaptor<
-            Vertex_around_target_circulator<Graph>                       // Derived
-             , Halfedge_around_target_circulator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
-             , Bidirectional_circulator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
-             >
-#endif
-{
-  internal::Source<Graph> fct;
-public:
-#ifndef DOXYGEN_RUNNING
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  typedef std::size_t size_type;
-#endif
-
-  Vertex_around_target_circulator()
-  {}
-
-  Vertex_around_target_circulator(halfedge_descriptor h, const Graph& g)
-    : Vertex_around_target_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(h,g)), fct(g)
-  {}
-
-#ifndef DOXYGEN_RUNNING  
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Vertex_around_target_circulator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Vertex_around_target_circulator::this_type_does_not_support_comparisons : 0;
-  }
-
-  bool operator== (void*) const
-  {
-    return this->base_reference()== NULL;
-  }
-
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
-#endif
-}; 
-
-
-
-
-template <typename Graph>
-class Vertex_around_target_iterator
-#ifndef DOXYGEN_RUNNING
-  : public boost::iterator_adaptor<
-            Vertex_around_target_iterator<Graph>                       // Derived
-             , Halfedge_around_target_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
-             >
-#endif
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-  internal::Source<Graph> fct;
-
-public:
-
-  Vertex_around_target_iterator()
-  {}
-
-  Vertex_around_target_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : Vertex_around_target_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
-  {}
-
-#ifndef DOXYGEN_RUNNING
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Vertex_around_target_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Vertex_around_target_iterator::this_type_does_not_support_comparisons : 0;
-  }
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
-#endif
-}; 
-
-
-template <typename Graph>
-Iterator_range<Vertex_around_target_iterator<Graph> >
-adjacent_vertices(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Vertex_around_face_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-
-template <typename Graph>
-Iterator_range<Vertex_around_target_iterator<Graph> >
-adjacent_vertices(typename boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g)
-{
-  typedef Vertex_around_face_iterator<Graph> I;
-  return make_range(I(halfedge(v,g),g), I(halfedge(v,g),g,1));
-}
-
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all vertices adjacent to the vertex `target(h,g)`. 
- */
-template <typename Graph>
-Iterator_range<Vertex_around_target_iterator<Graph> >
-vertices_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Vertex_around_target_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-template <typename Graph>
-Iterator_range<Vertex_around_target_iterator<Graph> >
-vertices_around_target(typename boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g)
-{
-  typedef Vertex_around_target_iterator<Graph> I;
-  return make_range(I(halfedge(v,g),g), I(halfedge(v,g),g,1));
-}
-/**  
- * \ingroup PkgBGLIterators
- * returns an iterator range over all vertices adjacent to the face `face(h,g)`. 
- */
-template <typename Graph>
-Iterator_range<Vertex_around_face_iterator<Graph> >
-vertices_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
-{
-  typedef Vertex_around_face_iterator<Graph> I;
-  return make_range(I(h,g), I(h,g,1));
-}
-
-
-template <class Graph>
-class Out_edge_iterator
-  : public boost::iterator_adaptor<
-             Out_edge_iterator<Graph>                                // Derived
-             , Halfedge_around_target_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::edge_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::edge_descriptor  // Reference
-             >
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-private:
-  internal::OppositeEdge<Graph> opp;
-public:
-  Out_edge_iterator()
-  {}
-  
-  Out_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : Out_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), opp(g) {}
-  
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (Out_edge_iterator::*bool_type)() const;
-  
-  void this_type_does_not_support_comparisons() const {}
-  
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &Out_edge_iterator::this_type_does_not_support_comparisons : 0;
-  }
-  
-  
-private:
-  friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::edge_descriptor dereference() const { return opp(*this->base_reference()); }
-};
-
-
-
-
-template <class Graph>
-class In_edge_iterator
-  : public boost::iterator_adaptor<
-             In_edge_iterator<Graph>                                 // Derived
-             , Halfedge_around_target_iterator<Graph>                // Base
-             , typename boost::graph_traits<Graph>::edge_descriptor  // Value
-             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
-             , typename boost::graph_traits<Graph>::edge_descriptor  // Reference
-             >
-{
-  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
-private:
-  internal::Edge<Graph> fct;
-public:
-  In_edge_iterator()
-  {}
-  
-  In_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
-    : In_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
-  {}
-
-  // design patter: "safe bool"
-  // will be replaced by explicit operator bool with C++11
-  typedef void (In_edge_iterator::*bool_type)() const;
-
-  void this_type_does_not_support_comparisons() const {}
-
-  operator bool_type() const
-  {
-    return (! (this->base_reference() == NULL)) ?
-      &In_edge_iterator::this_type_does_not_support_comparisons : 0;
-  }
-
- private:
-    friend class boost::iterator_core_access;
-  typename  boost::graph_traits<Graph>::edge_descriptor dereference() const { return fct(*this->base_reference()); }
-};
-
-
-
-
-
-
-} // CGAL
-
-
-#endif /* CGAL_BGL_ITERATORS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/named_function_params.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/named_function_params.h
deleted file mode 100644
index 067847d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/named_function_params.h
+++ /dev/null
@@ -1,451 +0,0 @@
-//=======================================================================
-// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
-//
-// This file is part of the Boost Graph Library
-//
-// You should have received a copy of the License Agreement for the
-// Boost Graph Library along with the software; see the file LICENSE.
-// If not, contact Office of Research, University of Notre Dame, Notre
-// Dame, IN 46556.
-//
-// Permission to modify the code and to distribute modified code is
-// granted, provided the text of this NOTICE is retained, a notice that
-// the code was modified is included with the above COPYRIGHT NOTICE and
-// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
-// file is distributed with the modified code.
-//
-// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
-// By way of example, but not limitation, Licensor MAKES NO
-// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
-// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
-// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
-// OR OTHER RIGHTS.
-
-//=======================================================================
-// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Fernando Cacciola
-
-
-
-#ifndef CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
-#define CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
-
-#include <CGAL/basic.h>
-#include <boost/graph/properties.hpp>
-#include <boost/graph/named_function_params.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/version.hpp>
-
-// An explanation about the version hackery below: There is no real
-// API to introduce custom properties to the Graph API and the
-// internals have changed with Boost Version 1.51 and changes aren't
-// backward compatible. To work around that we carry around two
-// versions of cgal_bgl_named_params. One imitates the pre 1.51
-// bgl_named_params, the newer one hooks into the API through
-// inheritance and addition of the some partial specializations.
-namespace CGAL {
-
-  enum vertex_is_fixed_t             { vertex_is_fixed             } ;  
-  enum set_cache_policy_t            { set_cache_policy            } ;
-  enum get_cost_policy_t             { get_cost_policy             } ;
-  enum get_cost_policy_params_t      { get_cost_policy_params      } ;
-  enum get_placement_policy_t        { get_placement_policy        } ;
-  enum get_placement_policy_params_t { get_placement_policy_params } ;
-  enum edge_is_constrained_t         { edge_is_constrained        } ;
-  enum edge_is_constrained_params_t  { edge_is_constrained_params } ;
-  
-#if BOOST_VERSION >= 105100
-
-  template <typename T, typename Tag, typename Base = boost::no_property>
-  struct cgal_bgl_named_params : boost::bgl_named_params<T, Tag, Base>
-  {
-    typedef boost::bgl_named_params<T, Tag, Base> base;
-    typedef cgal_bgl_named_params self;
-
-    cgal_bgl_named_params(T v = T()) : base(v) {}
-    cgal_bgl_named_params(T v, const Base& b) : base(v, b) {}
-
-    template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self>
-    vertex_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename PointMap>
-    cgal_bgl_named_params<PointMap, vertex_point_t, self>
-    vertex_point_map(const PointMap& p) const 
-    {
-      typedef cgal_bgl_named_params<PointMap, vertex_point_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename IsFixedMap>
-    cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self>
-    vertex_is_fixed_map(const IsFixedMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::edge_index_t, self>
-    edge_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t, self> Params;
-      return Params(p, *this);
-    }
-
-      template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self>
-    halfedge_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename Visitor>
-    cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self>
-    visitor(const Visitor& p) const 
-    {
-      typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename SetCache>
-    cgal_bgl_named_params<SetCache, set_cache_policy_t, self>
-    set_cache(const SetCache& p) const 
-    {
-      typedef cgal_bgl_named_params<SetCache, set_cache_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetCost>
-    cgal_bgl_named_params<GetCost, get_cost_policy_t, self>
-    get_cost(const GetCost& p) const 
-    {
-      typedef cgal_bgl_named_params<GetCost, get_cost_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetCostParams>
-    cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self>
-    get_cost_params(const GetCostParams& p) const 
-    {
-      typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetPlacement>
-    cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self>
-    get_placement(const GetPlacement& p) const 
-    {
-      typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetPlacementParams>
-    cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self>
-    get_placement_params(const GetPlacementParams& p) const 
-    {
-      typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self> Params;
-      return Params(p, *this);
-    }
-
-    template <typename EdgeIsConstrained>
-    cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self>
-    edge_is_constrained_map(const EdgeIsConstrained& em) const
-    {
-      typedef cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self> Params;
-      return Params(em, *this);
-    }
-
-    template <typename EdgeIsConstrainedParams>
-    cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self>
-    edge_is_constrained_map_params(const EdgeIsConstrainedParams& em) const
-    {
-      typedef cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self> Params;
-      return Params(em, *this);
-    }
-  };
-#else
-  template <typename T, typename Tag, typename Base = boost::no_property>
-  struct cgal_bgl_named_params : public Base
-  {
-    typedef cgal_bgl_named_params self;
-    typedef Base next_type;
-    typedef Tag tag_type;
-    typedef T value_type;
-
-    cgal_bgl_named_params() { }
-
-    cgal_bgl_named_params(T v) : m_value(v) { }
-    cgal_bgl_named_params(T v, const Base& b) : Base(b), m_value(v) { }
-
-    T m_value;
-
-    template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self>
-    vertex_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename PointMap>
-    cgal_bgl_named_params<PointMap, vertex_point_t, self>
-    vertex_point_map(const PointMap& p) const 
-    {
-      typedef cgal_bgl_named_params<PointMap, vertex_point_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename IsFixedMap>
-    cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self>
-    vertex_is_fixed_map(const IsFixedMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::edge_index_t, self>
-    edge_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t, self> Params;
-      return Params(p, *this);
-    }
-
-    template <typename IndexMap>
-    cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self>
-    halfedge_index_map(const IndexMap& p) const 
-    {
-      typedef cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self> Params;
-      return Params(p, *this);
-    }
-
-    template <typename Visitor>
-    cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self>
-    visitor(const Visitor& p) const 
-    {
-      typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename SetCache>
-    cgal_bgl_named_params<SetCache, set_cache_policy_t, self>
-    set_cache(const SetCache& p) const 
-    {
-      typedef cgal_bgl_named_params<SetCache, set_cache_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetCost>
-    cgal_bgl_named_params<GetCost, get_cost_policy_t, self>
-    get_cost(const GetCost& p) const 
-    {
-      typedef cgal_bgl_named_params<GetCost, get_cost_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetCostParams>
-    cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self>
-    get_cost_params(const GetCostParams& p) const 
-    {
-      typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetPlacement>
-    cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self>
-    get_placement(const GetPlacement& p) const 
-    {
-      typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self> Params;
-      return Params(p, *this);
-    }
-    
-    template <typename GetPlacementParams>
-    cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self>
-    get_placement_params(const GetPlacementParams& p) const 
-    {
-      typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self> Params;
-      return Params(p, *this);
-    }
-
-    template <typename EdgeIsConstrained>
-    cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self>
-    edge_is_constrained_map(const EdgeIsConstrained& em) const
-    {
-      typedef cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self> Params;
-      return Params(em, *this);
-    }
-
-    template <typename EdgeIsConstrainedParams>
-    cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self>
-    edge_is_constrained_map_params(const EdgeIsConstrainedParams& em) const
-    {
-      typedef cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self> Params;
-      return Params(em, *this);
-    }
-  };
-
-  template <class Tag1, class Tag2, class T1, class Base>
-  inline
-  typename boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type
-  get_param(const cgal_bgl_named_params<T1,Tag1,Base>& p, Tag2 tag2)
-  {
-    enum { match = boost::detail::same_property<Tag1,Tag2>::value };
-    typedef typename
-      boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type T2;
-    T2* t2 = 0;
-    typedef boost::detail::property_value_dispatch<match> Dispatcher;
-    return Dispatcher::const_get_value(p, t2, tag2);
-  }
-#endif
-
-  template <typename IndexMap>
-  cgal_bgl_named_params<IndexMap, boost::vertex_index_t>
-  vertex_index_map(IndexMap const& p) 
-  {
-    typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t> Params;
-    return Params(p);
-  }
-  
-  template <typename IndexMap>
-  cgal_bgl_named_params<IndexMap, boost::halfedge_index_t>
-  halfedge_index_map(IndexMap const& p) 
-  {
-    typedef cgal_bgl_named_params<IndexMap, boost::halfedge_index_t> Params;
-    return Params(p);
-  }
-  
-  template <typename PointMap>
-  cgal_bgl_named_params<PointMap, vertex_point_t>
-  vertex_point_map(PointMap const& p) 
-  {
-    typedef cgal_bgl_named_params<PointMap, vertex_point_t> Params;
-    return Params(p);
-  }
-
-  template <typename IsFixedMap>
-  cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t>
-  vertex_is_fixed_map(IsFixedMap const& p) 
-  {
-    typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t> Params;
-    return Params(p);
-  }
-  
-  template <typename IndexMap>
-  cgal_bgl_named_params<IndexMap, boost::edge_index_t>
-  edge_index_map(IndexMap const& pmap) 
-  {
-    typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t> Params;
-    return Params(pmap);
-  }
-
-  template <typename Visitor>
-  cgal_bgl_named_params<Visitor, boost::graph_visitor_t>
-  visitor(const Visitor& p) 
-  {
-    typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t> Params;
-    return Params(p);
-  }
-
-  template <typename SetCache>
-  cgal_bgl_named_params<SetCache, set_cache_policy_t>
-  set_cache(const SetCache& p) 
-  {
-    typedef cgal_bgl_named_params<SetCache, set_cache_policy_t> Params;
-    return Params(p);
-  }
-  
-  template <typename GetCost>
-  cgal_bgl_named_params<GetCost, get_cost_policy_t>
-  get_cost(const GetCost& p)
-  {
-    typedef cgal_bgl_named_params<GetCost, get_cost_policy_t> Params;
-     return Params(p);
-  }
-
-  template <typename GetCostParams>
-  cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t>
-  get_cost_params(const GetCostParams& p)
-  {
-    typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t> Params;
-    return Params(p);
-  }
-  
-  template <typename GetPlacement>
-  cgal_bgl_named_params<GetPlacement, get_placement_policy_t>
-  get_placement(const GetPlacement& p) 
-  {
-    typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t> Params;
-    return Params(p);
-  }
-  
-  template <typename GetPlacementParams>
-  cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t>
-  get_placement_params(const GetPlacementParams& p)
-  {
-    typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t> Params;
-    return Params(p);
-  }
-
-  template <typename EdgeIsConstrained>
-  cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t>
-  edge_is_constrained_map(const EdgeIsConstrained& em)
-  {
-    typedef cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t> Params;
-    return Params(em);
-  }
-
-  template <typename EdgeIsConstrainedParams>
-  cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t>
-  edge_is_constrained_map_params(const EdgeIsConstrainedParams& em)
-  {
-    typedef cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t> Params;
-    return Params(em);
-  }
-} //namespace CGAL
-
-#if BOOST_VERSION >= 105100
-// partial specializations hate inheritance and we need to repeat
-// those here. this is rather fragile.
-namespace boost {
-template <typename T, typename Tag, typename Base, typename Def>
-struct lookup_named_param_def<Tag, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
-  typedef T type;
-  static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def&) {
-    return p.m_value;
-  }
-};
-
-template <typename Tag1, typename T, typename Tag, typename Base, typename Def>
-struct lookup_named_param_def<Tag1, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
-  typedef typename lookup_named_param_def<Tag1, Base, Def>::type type;
-  static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def& def) {
-    return lookup_named_param_def<Tag1, Base, Def>::get(p.m_base, def);
-  }
-};
-} // boost
-#endif
-
-#endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h
deleted file mode 100644
index 823b7bc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h
+++ /dev/null
@@ -1,289 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Philipp Möller
-
-
-#ifndef CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H
-#define CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H
-
-#include <CGAL/assertions.h>
-#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
-#include <CGAL/boost/graph/properties.h>
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-
-namespace CGAL {
-
-
-template <typename K>
-class OM_edge_weight_pmap 
-  : public boost::put_get_helper<typename OpenMesh::PolyMesh_ArrayKernelT<K>::Scalar , OM_edge_weight_pmap<K> >
-{
-public:
-  typedef boost::readable_property_map_tag                         category;
-  typedef typename OpenMesh::PolyMesh_ArrayKernelT<K>::Scalar      value_type;
-  typedef value_type                                               reference;
-  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor key_type;
-
-  OM_edge_weight_pmap(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-    : sm_(sm)
-    {}
-
-  value_type operator[](const key_type& e) const
-  {
-    return sm_.calc_edge_length(e.halfedge());
-  }
-
-private:
-  const OpenMesh::PolyMesh_ArrayKernelT<K>& sm_;
-};
-
-template <typename K, typename VEF>
-class OM_index_pmap : public boost::put_get_helper<unsigned int, OM_index_pmap<K,VEF> >
-{
-public:
-  typedef boost::readable_property_map_tag category;
-  typedef unsigned int                      value_type;
-  typedef unsigned int                      reference;
-  typedef VEF                              key_type;
-
-  value_type operator[](const key_type& vd) const
-  {
-    return vd.idx();
-  }
-};
-
-
-  template<typename K, typename P>
-class OM_point_pmap //: public boost::put_get_helper<bool, OM_point_pmap<K> >
-{
-public:
-  typedef boost::read_write_property_map_tag category;
-#if defined(CGAL_USE_OM_POINTS)
-  typedef typename OpenMesh::PolyMesh_ArrayKernelT<K>::Point             value_type;
-  typedef const typename OpenMesh::PolyMesh_ArrayKernelT<K>::Point&      reference;
-#else
-  typedef P value_type;
-  typedef P reference;
-#endif
-  typedef typename boost::graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor key_type;
-    
-  OM_point_pmap()
-    : sm_(NULL)
-  {}
-
-  OM_point_pmap(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-    : sm_(&sm)
-    {}
-    
-  OM_point_pmap(const OM_point_pmap& pm)
-    : sm_(pm.sm_)
-    {}
-
-  inline friend reference get(const OM_point_pmap<K,P>& pm, key_type v)
-  {
-    CGAL_precondition(pm.sm_!=NULL);
-#if defined(CGAL_USE_OM_POINTS)
-    return pm.sm_->point(v);
-#else
-    CGAL_assertion(pm.sm_!=NULL);
-    typename OpenMesh::PolyMesh_ArrayKernelT<K>::Point const& omp = pm.sm_->point(v);
-    return value_type(omp[0], omp[1], omp[2]);
-#endif
-  }
-
-  inline friend void put(const OM_point_pmap<K,P>& pm, key_type v, const value_type& p)
-  {
-    CGAL_precondition(pm.sm_!=NULL);
-#if defined(CGAL_USE_OM_POINTS)
-    const_cast<OpenMesh::PolyMesh_ArrayKernelT<K>&>(*pm.sm_).set_point(v,p);
-#else
-    const_cast<OpenMesh::PolyMesh_ArrayKernelT<K>&>(*pm.sm_).set_point
-      (v, typename OpenMesh::PolyMesh_ArrayKernelT<K>::Point((float)p[0], (float)p[1], (float)p[2]));
-#endif
-  }
-
-  private:
-  const OpenMesh::PolyMesh_ArrayKernelT<K>* sm_;
-};
-
-
-} // CGAL
-
-// overloads and specializations in the boost namespace
-namespace boost {
-
-//
-// edge_weight
-//
-
-
-template <typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_weight_t >
-{
-  typedef CGAL::OM_edge_weight_pmap<K> type;
-  typedef CGAL::OM_edge_weight_pmap<K> const_type;
-};
-
-
-
-//
-// vertex_index
-//
-
-template <typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::vertex_index_t >
-{
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor> type;
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor> const_type;
-};
-
-
-//
-// face_index
-//
-
-template <typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::face_index_t >
-{
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor> type;
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor> const_type;
-};
-
-//
-// edge_index
-//
-
-template <typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_index_t >
-{
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor> type;
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor> const_type;
-};
-
-//
-// halfedge_index
-//
-
-template <typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::halfedge_index_t >
-{
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor> type;
-  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor> const_type;
-};
-
-
-template<typename K>
-struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::vertex_point_t >
-{
-  typedef CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
-  typedef CGAL::OM_point_pmap<K,P> type;
-  typedef type const_type;
-};
-
-} // namespace boost
-
-namespace boost {
-
-
-template <typename K>
-typename boost::property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_weight_t>::const_type
-get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
-{
-  return CGAL::OM_edge_weight_pmap<K>(sm);
-}
-
-template <typename K>
-typename OpenMesh::PolyMesh_ArrayKernelT<K>::Scalar
-get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm, 
-    const typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor& e)
-{
-  return CGAL::OM_edge_weight_pmap<K>(sm)[e];
-}
-
-
-template <typename K>
-CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>
-get(const boost::vertex_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
-{
-  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>();
-}
-
-template <typename K>
-typename boost::property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::face_index_t>::const_type
-get(const boost::face_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
-{
-  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor>();
-}
-
-template <typename K>
-CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor>
-get(const boost::edge_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
-{
-  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor>();
-}
-
-template <typename K>
-CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>
-get(const boost::halfedge_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
-{
-  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>();
-}
-
-template<typename K>
-CGAL::OM_point_pmap<K,typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3>
-get(boost::vertex_point_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g) 
-{
-  typedef typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
-  return CGAL::OM_point_pmap<K,P>(g);
-}
-
-// get for intrinsic properties
-#define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE)                     \
-  template<typename K>                                              \
-  RET                                                                   \
-  get(PROP p, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm,                      \
-      typename boost::graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >::TYPE x) \
-  { return get(get(p, sm), x); }                                        \
-
-  CGAL_OM_INTRINSIC_PROPERTY(int, boost::vertex_index_t, vertex_descriptor)
-  CGAL_OM_INTRINSIC_PROPERTY(int, boost::edge_index_t, edge_descriptor)
-  CGAL_OM_INTRINSIC_PROPERTY(int, boost::halfedge_index_t, halfedge_descriptor)
-  CGAL_OM_INTRINSIC_PROPERTY(int, boost::face_index_t, face_descriptor)
-  //  CGAL_OM_INTRINSIC_PROPERTY(std::size_t, boost::halfedge_index_t, face_descriptor)
-  CGAL_OM_INTRINSIC_PROPERTY(typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3, boost::vertex_point_t, vertex_descriptor)
-
-#undef CGAL_OM_INTRINSIC_PROPERTY
-
-// put for intrinsic properties
-// only available for vertex_point
-
-template<typename K>
-void
-put(boost::vertex_point_t p, OpenMesh::PolyMesh_ArrayKernelT<K>& g,
-    typename boost::graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor vd,
-    const typename K::Point& point) 
-{
-  put(get(p,g), vd, point);
-}
-
-
-} // namespace boost
-
-
-
-#endif /* CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_Surface_mesh.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_Surface_mesh.h
deleted file mode 100644
index 86a0d22..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_Surface_mesh.h
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Philipp Möller
-
-
-#ifndef CGAL_PROPERTIES_SURFACE_MESH_H
-#define CGAL_PROPERTIES_SURFACE_MESH_H
-
-#include <CGAL/assertions.h>
-#include <CGAL/Surface_mesh/Surface_mesh.h>
-#include <CGAL/Kernel_traits.h>
-#include <CGAL/squared_distance_3.h>
-
-#include <CGAL/boost/graph/properties.h>
-
-#include <boost/cstdint.hpp>
-
-namespace CGAL {
-
-template <typename Point>
-class SM_edge_weight_pmap 
-  : public boost::put_get_helper<typename CGAL::Kernel_traits<Point>::type::FT, SM_edge_weight_pmap<Point> >
-{
-  typedef CGAL::Surface_mesh<Point> SM;
-public:
-  typedef boost::readable_property_map_tag                category;
-  typedef typename CGAL::Kernel_traits<Point>::type::FT   value_type;
-  typedef value_type                                      reference;
-  typedef typename SM::Edge_index                        key_type;
-
-  SM_edge_weight_pmap(const CGAL::Surface_mesh<Point>& sm)
-    : pm_(sm. template property_map< 
-            typename SM::Vertex_index,
-            typename SM::Point >("v:point").first),
-      sm_(sm)
-    {}
-
-  value_type operator[](const key_type& e) const
-  {
-    return CGAL::sqrt(CGAL::squared_distance(pm_[source(e, sm_)],
-                                             pm_[target(e, sm_)]));
-  }
-
-private:
-   typename SM::template Property_map< typename SM::Vertex_index, 
-                                       typename SM::Point > pm_;
-  const SM& sm_;
-};
-
-
-template <typename K, typename VEF>
-class SM_index_pmap : public boost::put_get_helper<boost::uint32_t, SM_index_pmap<K,VEF> >
-{
-public:
-  typedef boost::readable_property_map_tag category;
-  typedef boost::uint32_t                  value_type;
-  typedef boost::uint32_t                  reference;
-  typedef VEF                              key_type;
-
-  value_type operator[](const key_type& vd) const
-  {
-    return vd;
-  }
-};
-
-} // CGAL
-
-// overloads and specializations in the boost namespace
-namespace boost {
-#if 1
-template <typename Point, typename T>
-struct property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >
-{
-  typedef CGAL::Surface_mesh<Point> SM;
-  typedef typename SM:: template Property_map<typename SM::vertex_index,T> type;
-  typedef type const_type;
-};
-
-
-#endif
-
-
-//
-// edge_weight
-//
-
-template <typename Point>
-struct property_map<CGAL::Surface_mesh<Point>, boost::edge_weight_t >
-{
-  typedef CGAL::SM_edge_weight_pmap<Point> type;
-  typedef CGAL::SM_edge_weight_pmap<Point> const_type;
-};
-
-template <typename Point>
-typename property_map<CGAL::Surface_mesh<Point>, boost::edge_weight_t>::const_type
-get(boost::edge_weight_t, const CGAL::Surface_mesh<Point>& sm)
-{
-  return CGAL::SM_edge_weight_pmap<Point>(sm);
-}
-
-template <typename Point>
-typename CGAL::Kernel_traits<Point>::type::FT
-get(boost::edge_weight_t, const CGAL::Surface_mesh<Point>& sm, 
-    const typename boost::graph_traits<CGAL::Surface_mesh<Point> >::edge_descriptor& e)
-{
-  return CGAL::SM_edge_weight_pmap<Point>(sm)[e];
-}
-
-//
-// vertex_index
-//
-
-template <typename K>
-struct property_map<CGAL::Surface_mesh<K>, boost::vertex_index_t >
-{
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor> type;
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor> const_type;
-};
-
-template <typename K>
-CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor>
-get(const boost::vertex_index_t&, const CGAL::Surface_mesh<K>&)
-{
-  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor>();
-}
-
-//
-// face_index
-//
-
-template <typename K>
-struct property_map<CGAL::Surface_mesh<K>, boost::face_index_t >
-{
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor> type;
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor> const_type;
-};
-
-template <typename K>
-typename property_map<CGAL::Surface_mesh<K>, boost::face_index_t>::const_type
-get(const boost::face_index_t&, const CGAL::Surface_mesh<K>&)
-{
-  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor>();
-}
-
-//
-// edge_index
-//
-
-template <typename K>
-struct property_map<CGAL::Surface_mesh<K>, boost::edge_index_t >
-{
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor> type;
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor> const_type;
-};
-
-template <typename K>
-CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor>
-get(const boost::edge_index_t&, const CGAL::Surface_mesh<K>&)
-{
-  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor>();
-}
-
-//
-// halfedge_index
-//
-
-template <typename K>
-struct property_map<CGAL::Surface_mesh<K>, boost::halfedge_index_t >
-{
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor> type;
-  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor> const_type;
-};
-
-template <typename K>
-CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor>
-get(const boost::halfedge_index_t&, const CGAL::Surface_mesh<K>&)
-{
-  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor>();
-}
-
-//
-// vertex_point
-// 
-
-template<typename P>
-struct property_map<CGAL::Surface_mesh<P>, CGAL::vertex_point_t >
-{
-  typedef CGAL::Surface_mesh<P> SM; 
-
-  typedef typename
-    SM::template Property_map< typename SM::Vertex_index, 
-                               P
-                               > type;
-  
-  typedef type const_type;
-  
-};
-
-template<typename K>
-typename property_map<CGAL::Surface_mesh<K>, CGAL::vertex_point_t >::const_type
-get(CGAL::vertex_point_t, const CGAL::Surface_mesh<K>& g) {
-  return g.points();
-}
-
-
-// get for intrinsic properties
-#define CGAL_SM_INTRINSIC_PROPERTY(RET, PROP, TYPE)                     \
-  template<typename Point>                                              \
-  RET                                                                   \
-  get(PROP p, const CGAL::Surface_mesh<Point>& sm,                      \
-      typename boost::graph_traits< CGAL::Surface_mesh<Point> >::TYPE x) \
-  { return get(get(p, sm), x); }                                        \
-
-CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::vertex_index_t, vertex_descriptor)
-CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::edge_index_t, edge_descriptor)
-CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::halfedge_index_t, halfedge_descriptor)
-CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::face_index_t, face_descriptor)
-CGAL_SM_INTRINSIC_PROPERTY(Point&, CGAL::vertex_point_t, vertex_descriptor)
-
-#undef CGAL_SM_INTRINSIC_PROPERTY
-
-// put for intrinsic properties
-// only available for vertex_point
-template<typename K>
-void
-put(CGAL::vertex_point_t p, const CGAL::Surface_mesh<K>& g,
-    typename boost::graph_traits< CGAL::Surface_mesh<K> >::vertex_descriptor x,
-    const K& point) {
-  typedef CGAL::Surface_mesh<K> SM;
-  CGAL_assertion(g.is_valid(x));
-  typename SM::template Property_map< typename boost::graph_traits<SM>::vertex_descriptor, 
-                    K> prop = get(p, g);
-  prop[x] = point;
-}
-
-} // boost
-
-#if 0
-// 
-namespace CGAL {
-template <typename Point, typename T>
-typename boost::property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >::const_type
-get(boost::vertex_property_t<T> vprop, const CGAL::Surface_mesh<Point>& sm)
-{
-  return sm.template get_property_map<typename CGAL::Surface_mesh<Point>::Vertex_index, T>(vprop.s).first;
-}
-
-template <typename Point, typename T>
-typename boost::property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >::const_type
-add(boost::vertex_property_t<T> vprop, CGAL::Surface_mesh<Point>& sm)
-{
-  return sm.template add_property_map<typename CGAL::Surface_mesh<Point>::Vertex_index, T>(vprop.s, vprop.t).first;
-}
-
-template <typename Pmap,typename P>
-void
-remove(Pmap pm, CGAL::Surface_mesh<P>& sm)
-{
-  return sm.remove_property_map(pm);
-}
-} // namespace CGAL
-#endif
-
-#endif /* CGAL_PROPERTIES_SURFACE_MESH_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/selection.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/selection.h
deleted file mode 100644
index 01e3169..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/selection.h
+++ /dev/null
@@ -1,398 +0,0 @@
-// Copyright (c) 2015  GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sebastien Loriot
-//
-
-#ifndef CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
-#define CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
-
-#include <boost/graph/graph_traits.hpp>
-#include <boost/foreach.hpp>
-#include <CGAL/boost/graph/iterator.h>
-
-namespace CGAL {
-
-
-/// Operation on faces
-namespace internal{
-// extract edges in non-selected faces (boundary excluded but one)
-template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
-OutputIterator
-extract_selection_boundary(
-  FaceRange& face_range,
-  FaceGraph& graph,
-  IsFaceSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<FaceGraph> GT;
-  typedef typename GT::face_descriptor face_descriptor;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-
-  BOOST_FOREACH(face_descriptor fd, face_range)
-  {
-    BOOST_FOREACH(  halfedge_descriptor h,
-                    halfedges_around_face(halfedge(fd, graph), graph) )
-    {
-      halfedge_descriptor opp_hd = opposite(h, graph);
-      face_descriptor opp_fd = face( opp_hd, graph );
-      if (opp_fd!=GT::null_face())
-      {
-        if ( !get(is_selected, opp_fd) )
-          *out++=opp_hd;
-      }
-      else{
-        opp_hd=opposite( next( opp_hd, graph), graph );
-        if ( !get( is_selected, face(opp_hd, graph) ) )
-          *out++=opp_hd;
-      }
-    }
-  }
-  return out;
-}
-} //end of namespace internal
-
-template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
-OutputIterator
-dilate_face_selection(
-  const FaceRange& selection,
-  FaceGraph& graph,
-  unsigned int k,
-  IsFaceSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<FaceGraph> GT;
-  typedef typename GT::face_descriptor face_descriptor;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-
-  std::vector<face_descriptor> current_selection(selection.begin(), selection.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    //extract faces on the boundary of the selection
-    std::vector<halfedge_descriptor> selection_boundary_halfedges;
-    internal::extract_selection_boundary(current_selection, graph, is_selected,
-                                         std::back_inserter(selection_boundary_halfedges));
-
-    if (selection_boundary_halfedges.empty()) break;
-
-    //collect faces around the target vertex of the selection boundary halfedges
-    std::set<face_descriptor> new_selection_set;
-    BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges)
-    {
-      face_descriptor fd=face(hd, graph);
-      while( !get(is_selected,fd) )
-      {
-        new_selection_set.insert(fd);
-        hd=opposite( next(hd, graph), graph );
-        fd=face(hd, graph);
-        if ( face(hd, graph)==GT::null_face() ) break;
-      }
-    }
-
-    // extract unique selection
-    std::vector<face_descriptor> new_selection;
-    BOOST_FOREACH(face_descriptor fd, new_selection_set)
-    {
-      *out++=fd;
-      new_selection.push_back(fd);
-      put( is_selected, fd, true );
-    }
-    current_selection.swap(new_selection);
-  }
-  return out;
-}
-
-template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
-OutputIterator
-erode_face_selection(
-  const FaceRange& selection,
-  FaceGraph& graph,
-  unsigned int k,
-  IsFaceSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<FaceGraph> GT;
-  typedef typename GT::face_descriptor face_descriptor;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-
-  std::vector<face_descriptor> current_selection(selection.begin(), selection.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    //extract faces on the boundary of the selection
-    std::vector<halfedge_descriptor> selection_boundary_halfedges;
-    internal::extract_selection_boundary(current_selection, graph, is_selected,
-                                         std::back_inserter(selection_boundary_halfedges));
-
-    if (selection_boundary_halfedges.empty()) break;
-
-
-    //collect faces around the target vertex of the selection boundary halfedges
-    std::set<face_descriptor> elements_to_remove;
-    BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges)
-    {
-      hd = opposite(hd, graph);
-      face_descriptor fd=face( hd, graph );
-      while( face(hd, graph)!=GT::null_face() && get(is_selected,fd) )
-      {
-        elements_to_remove.insert(fd);
-        hd=opposite( next(hd, graph), graph );
-        fd=face(hd, graph);
-      }
-    }
-
-    /// update is-selected attribute and output iterator
-    BOOST_FOREACH(face_descriptor fd, elements_to_remove)
-    {
-      *out++=fd;
-      put( is_selected, fd, false );
-    }
-
-    // update the set of currently selected faces
-    std::vector<face_descriptor> new_selection;
-    BOOST_FOREACH(face_descriptor fd, current_selection)
-      if ( !elements_to_remove.count(fd) )
-        new_selection.push_back(fd);
-    current_selection.swap(new_selection);
-  }
-  return out;
-}
-
-// select all faces incident to the target vertex of halfedges in `hedges`
-template <class HalfedgeRange, class FaceGraph, class OutputIterator>
-OutputIterator
-select_incident_faces(
-  const HalfedgeRange& hedges,
-  FaceGraph& graph,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<FaceGraph> GT;
-  typedef typename GT::face_descriptor face_descriptor;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-
-  //collect faces around the target vertex of the selection boundary halfedges
-  std::set<face_descriptor> selection_set;
-  BOOST_FOREACH(halfedge_descriptor hd, hedges)
-  {
-    halfedge_descriptor first = hd;
-    face_descriptor fd=face(hd, graph);
-    do
-    {
-      if ( face(hd, graph)!=GT::null_face() && selection_set.insert(fd).second)
-        *out++=fd;
-      hd=opposite( next(hd, graph), graph );
-      fd=face(hd, graph);
-    }while( hd!=first );
-  }
-
-  return out;
-}
-
-/// Operations on edges
-template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
-OutputIterator
-dilate_edge_selection(
-  const EdgeRange& selection,
-  HalfedgeGraph& graph,
-  unsigned int k,
-  IsEdgeSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<HalfedgeGraph> GT;
-  typedef typename GT::edge_descriptor edge_descriptor;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-  std::vector<edge_descriptor> current_selection(selection.begin(), selection.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    if (current_selection.empty()) break;
-
-    //collect adjacent edges not already selected
-    std::set<edge_descriptor> new_selection_set;
-    BOOST_FOREACH(edge_descriptor ed, current_selection)
-    {
-      halfedge_descriptor hd=halfedge(ed,graph);
-      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hd, graph))
-      {
-        edge_descriptor ned=edge(hd, graph);
-        if (!get(is_selected, ned)) new_selection_set.insert(ned);
-      }
-      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( hd, graph))
-      {
-        edge_descriptor ned=edge(hd, graph);
-        if (!get(is_selected, ned)) new_selection_set.insert(ned);
-      }
-    }
-
-    // extract unique selection
-    std::vector<edge_descriptor> new_selection;
-    BOOST_FOREACH(edge_descriptor ed, new_selection_set)
-    {
-      *out++=ed;
-      new_selection.push_back(ed);
-      put( is_selected, ed, true );
-    }
-    current_selection.swap(new_selection);
-  }
-  return out;
-}
-
-template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
-OutputIterator
-erode_edge_selection(
-  const EdgeRange& selection ,
-  HalfedgeGraph& graph,
-  unsigned int k,
-  IsEdgeSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<HalfedgeGraph> GT;
-  typedef typename GT::halfedge_descriptor halfedge_descriptor;
-  typedef typename GT::edge_descriptor edge_descriptor;
-  typedef typename GT::vertex_descriptor vertex_descriptor;
-
-  // extract the set of vertices on the border
-  std::set<vertex_descriptor> unique_vertex_set;
-  BOOST_FOREACH(edge_descriptor ed, selection)
-  {
-    halfedge_descriptor hd=halfedge(ed,graph);
-    BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_source( hd, graph))
-    {
-      edge_descriptor ned=edge(nhd, graph);
-      if (!get(is_selected, ned)){
-        unique_vertex_set.insert(source(hd,graph));
-        break;
-      }
-    }
-    BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, graph))
-    {
-      edge_descriptor ned=edge(nhd, graph);
-      if (!get(is_selected, ned)){
-        unique_vertex_set.insert(target(hd,graph));
-        break;
-      }
-    }
-  }
-
-  std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    if (current_selection_border.empty()) break;
-
-    //collect incident edges selected
-    std::set<edge_descriptor> edges_to_deselect;
-    unique_vertex_set.clear();
-    BOOST_FOREACH(vertex_descriptor vd, current_selection_border)
-      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( halfedge(vd,graph), graph))
-      {
-        edge_descriptor ed = edge(hd, graph);
-        if (get(is_selected, ed)){
-          edges_to_deselect.insert(ed);
-          unique_vertex_set.insert(source(hd, graph));
-        }
-      }
-
-    // extract unique selection
-    BOOST_FOREACH(edge_descriptor ed, edges_to_deselect)
-    {
-      *out++=ed;
-      put( is_selected, ed, false );
-    }
-
-    current_selection_border.assign(unique_vertex_set.begin(), unique_vertex_set.end());
-  }
-  return out;
-}
-
-/// Operations on vertices
-template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
-OutputIterator
-dilate_vertex_selection(
-  const VertexRange& selection,
-  HalfedgeGraph& graph,
-  unsigned int k,
-  IsVertexSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<HalfedgeGraph> GT;
-  typedef typename GT::vertex_descriptor vertex_descriptor;
-  std::vector<vertex_descriptor> current_selection(selection.begin(), selection.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    if (current_selection.empty()) break;
-
-    //collect adjacent vertices not already selected
-    std::set<vertex_descriptor> new_selection_set;
-    BOOST_FOREACH(vertex_descriptor vd, current_selection)
-      BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph))
-        if (!get(is_selected, nvd)) new_selection_set.insert(nvd);
-
-    // extract unique selection
-    std::vector<vertex_descriptor> new_selection;
-    BOOST_FOREACH(vertex_descriptor vd, new_selection_set)
-    {
-      *out++=vd;
-      new_selection.push_back(vd);
-      put( is_selected, vd, true );
-    }
-    current_selection.swap(new_selection);
-  }
-  return out;
-}
-
-template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
-OutputIterator
-erode_vertex_selection(
-  const VertexRange& selection,
-  HalfedgeGraph& graph,
-  unsigned int k,
-  IsVertexSelectedPMap is_selected,
-  OutputIterator out)
-{
-  typedef boost::graph_traits<HalfedgeGraph> GT;
-  typedef typename GT::vertex_descriptor vertex_descriptor;
-
-  // collect vertices incident to a selected one
-  std::set<vertex_descriptor> unique_vertex_set;
-  BOOST_FOREACH(vertex_descriptor vd, selection)
-    BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph))
-        if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd);
-
-  std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end());
-  for (unsigned int i=0; i<k; ++i)
-  {
-    if (current_selection_border.empty()) break;
-
-    //collect adjacent vertices selected
-    std::set<vertex_descriptor> vertices_to_deselect;
-    BOOST_FOREACH(vertex_descriptor vd, current_selection_border)
-      BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph))
-        if (get(is_selected, nvd)) vertices_to_deselect.insert(nvd);
-
-    // extract unique selection
-    std::vector<vertex_descriptor> new_selection_border;
-    BOOST_FOREACH(vertex_descriptor vd, vertices_to_deselect)
-    {
-      *out++=vd;
-      new_selection_border.push_back(vd);
-      put( is_selected, vd, false );
-    }
-    current_selection_border.swap(new_selection_border);
-  }
-  return out;
-}
-
-} //end of namespace CGAL
-
-#endif //CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/split_graph_into_polylines.h b/3rdparty/CGAL-4.6/include/CGAL/boost/graph/split_graph_into_polylines.h
deleted file mode 100644
index 80d1ae6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/split_graph_into_polylines.h
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Rineau, Xiang Gao
-//
-
-#ifndef CGAL_SPLIT_GRAPH_INTO_POLYLINES
-#define CGAL_SPLIT_GRAPH_INTO_POLYLINES
-
-#include <map> 
-#include <set> 
-#include <boost/foreach.hpp>
-#include <boost/graph/adjacency_list.hpp>
-#include <iostream>
-
-
-namespace CGAL {
-
-struct IsTerminalDefault
-{
-  template <typename VertexDescriptor, typename Graph>
-  bool operator ()(VertexDescriptor& , const Graph& )
-  {
-    return false;
-  }
-};
-
-
-struct Dummy_visitor_for_split_graph_into_polylines
-{
-  void start_new_polyline(){}
-  void add_node(size_t /* node_id */){}
-};
-
-
-namespace internal {
-
-/// Splits a graph at vertices with degree higher than two and at vertices where `is_terminal  returns `true`
-/// The vertices are duplicated, and new incident edges created.
-/// OrigGraph must be undirected
-template <typename Graph,
-          typename OrigGraph,
-          typename IsTerminal>
-void split_graph_into_polylines(Graph& graph,
-                                const OrigGraph& orig,
-                                IsTerminal is_terminal)
-{
-  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
-  typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
-  typedef typename boost::graph_traits<Graph>::vertex_iterator vertex_iterator;
-  typedef typename boost::graph_traits<Graph>::out_edge_iterator out_edge_iterator;
-
-  vertex_iterator b,e;
-  boost::tie(b,e) = vertices(graph);
-  std::vector<vertex_descriptor> V(b,e);
-  for (typename std::vector<vertex_descriptor>::iterator it = V.begin();
-       it != V.end();
-       ++it) {
-    vertex_descriptor v = *it;
-
-    if (degree(v, graph) > 2 || is_terminal(graph[v], orig))
-      {
-        out_edge_iterator b, e;
-        boost::tie(b, e) = out_edges(v, graph);
-        std::vector<edge_descriptor> E(b, e);
-        for (unsigned int i = 1; i < E.size(); ++i)
-          {
-            edge_descriptor e = E[i];
-            vertex_descriptor w = target(e, graph);
-            remove_edge(e, graph);
-            vertex_descriptor vc = add_vertex(graph);
-            graph[vc] = graph[v];
-            add_edge(vc, w, graph);
-          }
-      }
-  }
-
-  // check all vertices are of degree 1 or 2 and that the source
-  // and target of each edge are different vertices with different ids
-  CGAL_assertion_code(
-                      BOOST_FOREACH(vertex_descriptor v, vertices(graph)){
-                        typename boost::graph_traits<Graph>::degree_size_type
-                          n = degree(v, graph);
-                        
-                        CGAL_assertion( n == 0 || n == 1 || n == 2);
-                      }
-                      BOOST_FOREACH(edge_descriptor e, edges(graph)){
-                        vertex_descriptor v = target(e, graph);
-                        vertex_descriptor w = source(e, graph);
-                        CGAL_assertion(v != w);
-                      }
-                      ) // end of CGAL_assertion_code
-    }
-    
-} // namespace internal
-
-  
-/// Split graph into polylines delimited by vertices of degree different from 2,
-/// and vertices for which `is_terminal(v,graph)==true`.
-/// Then the graph is visited and Visitor is called to describe the polylines
-/// Graph must be undirected
-template <typename Graph,
-          typename Visitor,
-          typename IsTerminal>
-void
-split_graph_into_polylines(const Graph& graph,
-                           Visitor& polyline_visitor,
-                           IsTerminal is_terminal)
-{
-  typedef typename boost::graph_traits<Graph>::vertex_descriptor Graph_vertex_descriptor;
-  typedef typename boost::graph_traits<Graph>::edge_descriptor Graph_edge_descriptor;
-  
-  typedef boost::adjacency_list <boost::setS, // this avoids parallel edges
-                                 boost::vecS, 
-                                 boost::undirectedS,
-                                 Graph_vertex_descriptor > G;
-
-  typedef typename boost::graph_traits<G>::vertex_descriptor vertex_descriptor;
-  typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
-  typedef typename boost::graph_traits<G>::out_edge_iterator out_edge_iterator;
-  
-  // we make a copy of the input graph
-  G g;
-  {
-    typedef std::map<typename boost::graph_traits<Graph>::vertex_descriptor,
-                     typename boost::graph_traits<G>::vertex_descriptor> V2vmap;
-    V2vmap v2vmap;
-    
-    BOOST_FOREACH(Graph_vertex_descriptor v, vertices(graph)){
-      vertex_descriptor vc = add_vertex(g);
-      g[vc] = v;
-      v2vmap[v] = vc; 
-    }
-    
-
-    BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){
-      Graph_vertex_descriptor vs = source(e,graph);
-      Graph_vertex_descriptor vt = target(e,graph);
-      vertex_descriptor vsc, vtc;
-      if(vs == vt){
-        std::cerr << "ignore self loop\n";
-      }else{
-        typename V2vmap::iterator it;
-
-        if((it = v2vmap.find(vs)) == v2vmap.end()){
-          vsc = add_vertex(g);
-          g[vsc] = vs;
-          v2vmap[vs] = vsc;
-        }else{
-          vsc = it->second;
-        }
-        if((it = v2vmap.find(vt)) == v2vmap.end()){
-          vtc = add_vertex(g);
-          g[vtc] = vt;
-          v2vmap[vt] = vtc;
-        }else{
-          vtc = it->second;
-        }
-        add_edge(vsc,vtc,g);
-      }
-    }
-  }  
-  // duplicate terminal vertices and vertices of degree more than 2
-  internal::split_graph_into_polylines(g, graph, is_terminal);
-  // put polylines endpoint in a set
-  std::set<vertex_descriptor> terminal;
-
-  BOOST_FOREACH(vertex_descriptor v, vertices(g)){
-    if (degree(v, g) == 1) terminal.insert(v);
-  }
-
-  // go over all polylines and provide the description to the visitor
-  while (!terminal.empty())
-  {
-    typename std::set<vertex_descriptor>::iterator it = terminal.begin();
-    vertex_descriptor u = *it;
-    terminal.erase(it);
-    polyline_visitor.start_new_polyline();
-    polyline_visitor.add_node(g[u]);
-    while (degree(u,g) != 0)
-    {
-      CGAL_assertion(degree(u,g) == 1);
-      out_edge_iterator b = out_edges(u, g).first;
-      vertex_descriptor v = target(*b, g);
-      CGAL_assertion(u!=v);
-      polyline_visitor.add_node(g[v]);
-      remove_edge(b, g);
-      u = v;
-    }
-    terminal.erase(u);
-  }
-
-  // do the same but for cycles
-  while (num_edges(g) != 0)
-  {
-    edge_descriptor first_edge = *edges(g).first;
-    vertex_descriptor u = source(first_edge, g);
-
-    polyline_visitor.start_new_polyline();
-    polyline_visitor.add_node(g[u]);
-
-    u = target(first_edge, g);
-    remove_edge(first_edge, g);
-    polyline_visitor.add_node(g[u]);
-
-    while (degree(u,g) != 0)
-    {
-      CGAL_assertion(degree(u,g) == 1);
-      out_edge_iterator b = out_edges(u, g).first;
-      vertex_descriptor v = target(*b, g);
-      CGAL_assertion(u!=v);
-      polyline_visitor.add_node(g[v]);
-      remove_edge(b, g);
-      u = v;
-    }
-  }
-}
-
-} //end of namespace CGAL
-
-#endif //CGAL_SPLIT_GRAPH_INTO_POLYLINES
diff --git a/3rdparty/CGAL-4.6/include/CGAL/compute_average_spacing.h b/3rdparty/CGAL-4.6/include/CGAL/compute_average_spacing.h
deleted file mode 100644
index 4aa0a72..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/compute_average_spacing.h
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret
-
-#ifndef CGAL_AVERAGE_SPACING_3_H
-#define CGAL_AVERAGE_SPACING_3_H
-
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/squared_distance_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-
-#include <iterator>
-#include <list>
-
-namespace CGAL {
-
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-namespace internal {
-
-
-/// Computes average spacing of one query point from K nearest neighbors.
-///
-/// \pre `k >= 2`.
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return average spacing (scalar).
-template < typename Kernel,
-           typename Tree >
-typename Kernel::FT
-compute_average_spacing(const typename Kernel::Point_3& query, ///< 3D point whose spacing we want to compute
-                        Tree& tree,                            ///< KD-tree
-                        unsigned int k)                        ///< number of neighbors
-{
-  // basic geometric types
-  typedef typename Kernel::FT FT;
-  typedef typename Kernel::Point_3 Point;
-
-  // types for K nearest neighbors search
-  typedef Search_traits_3<Kernel> Tree_traits;
-  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // performs k + 1 queries (if unique the query point is
-  // output first). search may be aborted when k is greater
-  // than number of input points
-  Neighbor_search search(tree,query,k+1);
-  Search_iterator search_iterator = search.begin();
-  FT sum_distances = (FT)0.0;
-  unsigned int i;
-  for(i=0;i<(k+1);i++)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-
-    Point p = search_iterator->first;
-    sum_distances += std::sqrt(CGAL::squared_distance(query,p));
-    search_iterator++;
-  }
-
-  // output average spacing
-  return sum_distances / (FT)i;
-}
-
-} /* namespace internal */
-/// \endcond
-
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// Computes average spacing from k nearest neighbors.
-///
-/// \pre `k >= 2.`
-///
-/// @tparam InputIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
-///        It can be omitted if the value type of `InputIterator`  is convertible to `Point_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return average spacing (scalar).
-
-// This variant requires the kernel.
-template <typename InputIterator,
-          typename PointPMap,
-          typename Kernel
->
-typename Kernel::FT
-compute_average_spacing(
-  InputIterator first,  ///< iterator over the first input point.
-  InputIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
-  unsigned int k, ///< number of neighbors.
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  // types for K nearest neighbors search structure
-  typedef typename Kernel::FT FT;
-  typedef Search_traits_3<Kernel> Tree_traits;
-  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Tree;
-
-  // precondition: at least one element in the container.
-  // to fix: should have at least three distinct points
-  // but this is costly to check
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  // precondition: at least 2 nearest neighbors
-  CGAL_point_set_processing_precondition(k >= 2);
-
-  // Instanciate a KD-tree search.
-  // Note: We have to convert each input iterator to Point_3.
-  std::vector<Point> kd_tree_points; 
-  for(InputIterator it = first; it != beyond; it++)
-  {
-  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      Point point = get(point_pmap, it);
-  #else
-      Point point = get(point_pmap, *it);
-  #endif
-      kd_tree_points.push_back(point);
-  }
-  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
-
-  // iterate over input points, compute and output normal
-  // vectors (already normalized)
-  FT sum_spacings = (FT)0.0;
-  unsigned int nb_points = 0;
-  for(InputIterator it = first; it != beyond; it++)
-  {
-    sum_spacings += internal::compute_average_spacing<Kernel,Tree>(
-      
-  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      get(point_pmap,it),
-  #else
-      get(point_pmap,*it),
-  #endif
-      tree,k);
-    nb_points++;
-  }
-
-  // return average spacing
-  return sum_spacings / (FT)nb_points;
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the iterator type.
-template <typename InputIterator,
-          typename PointPMap
->
-typename Kernel_traits<typename boost::property_traits<PointPMap>::value_type>::Kernel::FT
-compute_average_spacing(
-  InputIterator first,    ///< iterator over the first input point.
-  InputIterator beyond,   ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
-  unsigned int k) ///< number of neighbors
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return compute_average_spacing(
-    first,beyond,
-    point_pmap,
-    k,
-    Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template < typename InputIterator >
-typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel::FT
-compute_average_spacing(
-  InputIterator first,    ///< iterator over the first input point.
-  InputIterator beyond,   ///< past-the-end iterator over the input points.
-  unsigned int k) ///< number of neighbors.
-{
-  return compute_average_spacing(
-    first,beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(first),
-#else
-    make_identity_property_map(
-    typename std::iterator_traits<InputIterator>::value_type()),
-#endif
-    k);
-}
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_AVERAGE_SPACING_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/config.h b/3rdparty/CGAL-4.6/include/CGAL/config.h
deleted file mode 100644
index 721af2b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/config.h
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright (c) 1997-2010  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Wieger Wesselink 
-//                 Michael Hoffmann <hoffmann at inf.ethz.ch>
-//                 Sylvain Pion
-
-#ifndef CGAL_CONFIG_H
-#define CGAL_CONFIG_H
-
-// Workaround for a bug in Boost, that checks WIN64 instead of _WIN64
-//   https://svn.boost.org/trac/boost/ticket/5519
-#if defined(_WIN64) && ! defined(WIN64)
-#  define WIN64
-#endif
-
-#ifdef CGAL_INCLUDE_WINDOWS_DOT_H
-// Mimic users including this file which defines min max macros
-// and other names leading to name clashes
-#include <windows.h>
-#endif
-
-#if defined(CGAL_TEST_SUITE) && defined(NDEBUG)
-#  error The test-suite needs no NDEBUG defined
-#endif // CGAL_TEST_SUITE and NDEBUG
-
-// Workaround to the following bug:
-// https://bugreports.qt-project.org/browse/QTBUG-22829
-#ifdef Q_MOC_RUN
-// When Qt moc runs on CGAL files, do not process
-// <boost/type_traits/has_operator.hpp>
-#  define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
-#  define BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
-#  define BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
-#  define BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
-#  define BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
-#  define BOOST_TT_HAS_GREATER_HPP_INCLUDED
-#  define BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
-#  define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
-#  define BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_LESS_HPP_INCLUDED
-#  define BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
-#  define BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
-#  define BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
-#  define BOOST_TT_HAS_MINUS_HPP_INCLUDED
-#  define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_MODULUS_HPP_INCLUDED
-#  define BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
-#  define BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
-#  define BOOST_TT_HAS_PLUS_HPP_INCLUDED
-#  define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
-#  define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
-#  define BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
-// do not include <boost/random.hpp> either
-// it includes <boost/type_traits/has_binary_operator.hpp>
-#  define BOOST_RANDOM_HPP
-#endif
-
-// The following header file defines among other things  BOOST_PREVENT_MACRO_SUBSTITUTION 
-#include <boost/config.hpp>
-#include <boost/version.hpp>
-
-#include <CGAL/version.h>
-
-//----------------------------------------------------------------------//
-//  platform specific workaround flags (CGAL_CFG_...)
-//----------------------------------------------------------------------//
-
-#include <CGAL/compiler_config.h>
-
-//----------------------------------------------------------------------//
-//  Support for DLL on Windows (CGAL_EXPORT macro)
-//----------------------------------------------------------------------//
-
-#include <CGAL/export/CGAL.h>
-
-//----------------------------------------------------------------------//
-//  Use an implementation of fabs with sse2 on Windows
-//----------------------------------------------------------------------//
-
-#if (_M_IX86_FP >= 2) || defined(_M_X64)
-#define CGAL_USE_SSE2_FABS
-#endif
-
-//----------------------------------------------------------------------//
-//  Detect features at compile-time. Some macros have only been
-//  introduced as of Boost 1.40. In that case, we simply say that the
-//  feature is not available, even if that is wrong.
-//  ----------------------------------------------------------------------//
-
-#if defined(BOOST_NO_CXX11_RANGE_BASED_FOR) || BOOST_VERSION < 105000
-#define CGAL_NO_CPP0X_RANGE_BASED_FOR 1
-#endif
-#if defined(BOOST_NO_0X_HDR_ARRAY) || BOOST_VERSION < 104000
-#define CGAL_CFG_NO_CPP0X_ARRAY 1
-#endif
-#if defined(BOOST_NO_DECLTYPE) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_DECLTYPE 1
-#endif
-#if defined(BOOST_NO_DELETED_FUNCTIONS) || defined(BOOST_NO_DEFAULTED_FUNCTIONS) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS 1
-#endif
-#if defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) || (BOOST_VERSION < 104100)
-#define CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES 1
-#endif
-#if defined(BOOST_NO_INITIALIZER_LISTS) || (BOOST_VERSION < 103900)
-#define CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS 1
-#endif
-#if defined(BOOST_MSVC)
-#define CGAL_CFG_NO_CPP0X_ISFINITE 1
-#endif
-#if defined(BOOST_NO_LONG_LONG) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_LONG_LONG 1
-#endif
-#if defined(BOOST_NO_LAMBDAS) || BOOST_VERSION < 104000
-#define CGAL_CFG_NO_CPP0X_LAMBDAS 1
-#endif
-#if defined(BOOST_NO_RVALUE_REFERENCES) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE 1
-#endif
-#if defined(BOOST_NO_STATIC_ASSERT) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_STATIC_ASSERT 1
-#endif
-#if defined(BOOST_NO_0X_HDR_TUPLE) || (BOOST_VERSION < 104000)
-#define CGAL_CFG_NO_CPP0X_TUPLE 1
-#endif
-#if defined(BOOST_NO_VARIADIC_TEMPLATES) || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES 1
-#endif
-// never use TR1
-#define CGAL_CFG_NO_TR1_ARRAY 1
-// never use TR1
-#define CGAL_CFG_NO_TR1_TUPLE 1
-#if !defined(__GNUC__) || defined(__INTEL_COMPILER)
-#define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1
-#endif
-#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || (BOOST_VERSION < 105100) || _MSC_VER==1800
-#define CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-#if __cplusplus < 201103L && !(_MSC_VER >= 1600)
-#define CGAL_CFG_NO_CPP0X_COPY_N 1
-#define CGAL_CFG_NO_CPP0X_NEXT_PREV 1
-#endif
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATIONS) \
-    || defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) \
-    || defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) \
-    || (BOOST_VERSION < 103600)
-#define CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS 1
-#endif
-
-// Some random list to let us write C++11 without thinking about
-// each feature we are using.
-#if __cplusplus >= 201103L && \
-    !defined CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES && \
-    !defined CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE && \
-    !defined CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS && \
-    !defined CGAL_CFG_NO_CPP0X_TUPLE && \
-    !defined CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX && \
-    !defined CGAL_CFG_NO_CPP0X_STATIC_ASSERT && \
-    !defined CGAL_CFG_NO_CPP0X_DECLTYPE && \
-    !defined CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS && \
-    !defined CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES
-#define CGAL_CXX11
-#endif
-
-//----------------------------------------------------------------------//
-//  auto-link the CGAL library on platforms that support it
-//----------------------------------------------------------------------//
-
-#include <CGAL/auto_link/CGAL.h>
-
-//----------------------------------------------------------------------//
-//  do some post processing for the flags
-//----------------------------------------------------------------------//
-
-#ifdef CGAL_CFG_NO_STL
-#  error "This compiler does not have a working STL"
-#endif
-
-// This macro computes the version number from an x.y.z release number.
-// It only works for public releases.
-#define CGAL_VERSION_NUMBER(x,y,z) (1000001 + 10000*x + 100*y + 10*z) * 1000
-
-#ifndef CGAL_NO_DEPRECATED_CODE
-#define CGAL_BEGIN_NAMESPACE  namespace CGAL { 
-#define CGAL_END_NAMESPACE }
-#endif
-
-
-#ifndef CGAL_CFG_NO_CPP0X_LONG_LONG
-#  define CGAL_USE_LONG_LONG
-#endif
-
-
-#ifndef CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG
-#  define CGAL_TYPENAME_DEFAULT_ARG typename
-#else
-#  define CGAL_TYPENAME_DEFAULT_ARG
-#endif
-
-
-#ifdef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
-#  define CGAL_DELETED
-#  define CGAL_EXPLICITLY_DEFAULTED
-#else
-#  define CGAL_DELETED = delete
-#  define CGAL_EXPLICITLY_DEFAULTED = default
-#endif
-
-
-// Big endian or little endian machine.
-// ====================================
-
-#if defined (__GLIBC__)
-#  include <endian.h>
-#  if (__BYTE_ORDER == __LITTLE_ENDIAN)
-#    define CGAL_LITTLE_ENDIAN
-#  elif (__BYTE_ORDER == __BIG_ENDIAN)
-#    define CGAL_BIG_ENDIAN
-#  else
-#    error Unknown endianness
-#  endif
-#elif defined(__sparc) || defined(__sparc__) \
-   || defined(_POWER) || defined(__powerpc__) \
-   || defined(__ppc__) || defined(__hppa) \
-   || defined(_MIPSEB) || defined(_POWER) \
-   || defined(__s390__)
-#  define CGAL_BIG_ENDIAN
-#elif defined(__i386__) || defined(__alpha__) \
-   || defined(__x86_64) || defined(__x86_64__) \
-   || defined(__ia64) || defined(__ia64__) \
-   || defined(_M_IX86) || defined(_M_IA64) \
-   || defined(_M_ALPHA) || defined(_WIN64)
-#  define CGAL_LITTLE_ENDIAN
-#else
-#  error Unknown endianness
-#endif
-
-
-// Symbolic constants to tailor inlining. Inlining Policy.
-// =======================================================
-#ifndef CGAL_MEDIUM_INLINE
-#  define CGAL_MEDIUM_INLINE inline
-#endif
-
-#ifndef CGAL_LARGE_INLINE
-#  define CGAL_LARGE_INLINE
-#endif
-
-#ifndef CGAL_HUGE_INLINE
-#  define CGAL_HUGE_INLINE
-#endif
-
-
-//----------------------------------------------------------------------//
-// SunPRO specific.
-//----------------------------------------------------------------------//
-#ifdef __SUNPRO_CC
-#  include <iterator>
-#  ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
-#    error "CGAL does not support SunPRO with the old Rogue Wave STL: use STLPort."
-#  endif
-#endif
-
-#ifdef __SUNPRO_CC
-// SunPRO 5.9 emits warnings "The variable tag has not yet been assigned a value"
-// even for empty "tag" variables.  No way to write a config/testfile for this.
-#  define CGAL_SUNPRO_INITIALIZE(C) C
-#else
-#  define CGAL_SUNPRO_INITIALIZE(C)
-#endif
-
-//----------------------------------------------------------------------//
-// MacOSX specific.
-//----------------------------------------------------------------------//
-
-#ifdef __APPLE__
-#  if defined(__GNUG__) && (__GNUG__ == 4) && (__GNUC_MINOR__ == 0) \
-   && defined(__OPTIMIZE__) && !defined(CGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG)
-#    warning "Your configuration may exhibit run-time errors in CGAL code"
-#    warning "This appears with g++ 4.0 on MacOSX when optimizing"
-#    warning "You can disable this warning using -DCGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG"
-#    warning "For more information, see http://www.cgal.org/FAQ.html#mac_optimization_bug"
-#  endif
-#endif
-
-//-------------------------------------------------------------------//
-// When the global min and max are no longer defined (as macros) 
-// because of NOMINMAX flag definition, we define our own global 
-// min/max functions to make the Microsoft headers compile. (afxtempl.h)
-// Users that does not want the global min/max 
-// should define CGAL_NOMINMAX
-//-------------------------------------------------------------------//
-#include <algorithm>
-#if defined NOMINMAX && !defined CGAL_NOMINMAX
-using std::min;
-using std::max;
-#endif
-
-//-------------------------------------------------------------------//
-// Is Geomview usable ?
-#if !defined(_MSC_VER) && !defined(__MINGW32__)
-#  define CGAL_USE_GEOMVIEW
-#endif
-
-
-//-------------------------------------------------------------------//
-// Compilers provide different macros to access the current function name
-#ifdef _MSC_VER
-#  define CGAL_PRETTY_FUNCTION __FUNCSIG__
-#elif defined __GNUG__
-#  define CGAL_PRETTY_FUNCTION __PRETTY_FUNCTION__
-#else 
-#  define CGAL_PRETTY_FUNCTION __func__
-// with sunpro, this requires -features=extensions
-#endif
-
-// Macro to detect GCC versions.
-// It evaluates to 0 if the compiler is not GCC. Be careful that the Intel
-// compilers on Linux, and the LLVM/clang compiler both define GCC version
-// macros.
-#define CGAL_GCC_VERSION (__GNUC__ * 10000       \
-                          + __GNUC_MINOR__ * 100 \
-                          + __GNUC_PATCHLEVEL__)
-
-// Macros to detect features of clang. We define them for the other
-// compilers.
-// See http://clang.llvm.org/docs/LanguageExtensions.html
-#ifndef __has_feature
-  #define __has_feature(x) 0  // Compatibility with non-clang compilers.
-#endif
-#ifndef __has_extension
-  #define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
-#endif
-#ifndef __has_builtin
-  #define __has_builtin(x) 0  // Compatibility with non-clang compilers.
-#endif
-#ifndef __has_attribute
-  #define __has_attribute(x) 0  // Compatibility with non-clang compilers.
-#endif
-#ifndef __has_warning
-  #define __has_warning(x) 0  // Compatibility with non-clang compilers.
-#endif
-
-// Macro to trigger deprecation warnings
-#ifdef CGAL_NO_DEPRECATION_WARNINGS
-#  define CGAL_DEPRECATED
-#elif defined(__GNUC__) || __has_attribute(__deprecated__)
-#  define CGAL_DEPRECATED __attribute__((__deprecated__))
-#elif defined (_MSC_VER) && (_MSC_VER > 1300)
-#  define CGAL_DEPRECATED __declspec(deprecated)
-#else
-#  define CGAL_DEPRECATED
-#endif
-
-
-// Macro to specify a 'noreturn' attribute.
-#if defined(__GNUG__) || __has_attribute(__noreturn__)
-#  define CGAL_NORETURN  __attribute__ ((__noreturn__))
-#else
-#  define CGAL_NORETURN
-#endif
-
-// Macro to specify a 'unused' attribute.
-#if defined(__GNUG__) || __has_attribute(__unused__)
-#  define CGAL_UNUSED  __attribute__ ((__unused__))
-#else
-#  define CGAL_UNUSED
-#endif
-
-// Macro CGAL_ASSUME
-// Call a builtin of the compiler to pass a hint to the compiler
-#if __has_builtin(__builtin_unreachable) || (CGAL_GCC_VERSION >= 40500 && !__STRICT_ANSI__)
-// From g++ 4.5, there exists a __builtin_unreachable()
-// Also in LLVM/clang
-#  define CGAL_ASSUME(EX) if(!(EX)) { __builtin_unreachable(); }
-#elif defined(_MSC_VER)
-// MSVC has __assume
-#  define CGAL_ASSUME(EX) __assume(EX)
-#endif
-// If CGAL_ASSUME is not defined, then CGAL_assume and CGAL_assume_code are
-// defined differently, in <CGAL/assertions.h>
-
-// If CGAL_HAS_THREADS is not defined, then CGAL code assumes
-// it can do any thread-unsafe things (like using static variables).
-#if !defined CGAL_HAS_THREADS && !defined CGAL_HAS_NO_THREADS
-#  if defined BOOST_HAS_THREADS || defined _OPENMP
-#    define CGAL_HAS_THREADS
-#  endif
-#endif
-
-// Support for LEDA with threads
-//   Not that, if CGAL_HAS_THREADS is defined, and you want to use LEDA,
-//   you must link with a version of LEDA libraries that support threads.
-#if defined(CGAL_HAS_THREADS) && CGAL_USE_LEDA
-#  define LEDA_MULTI_THREAD 1
-#endif
-// Support for LEDA_numbers on Windows
-#define LEDA_NUMBERS_DLL 1
-
-// Helper macros to disable macros
-#if defined(__clang__) || (BOOST_GCC >= 40600)
-#  define CGAL_PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
-#  define CGAL_PRAGMA_DIAG_POP  _Pragma("GCC diagnostic pop")
-#else
-#  define CGAL_PRAGMA_DIAG_PUSH
-#  define CGAL_PRAGMA_DIAG_POP
-#endif
-
-namespace CGAL {
-
-// Typedef for the type of NULL.
-typedef const void * Nullptr_t;   // Anticipate C++0x's std::nullptr_t
-
-} //namespace CGAL
-
-#endif // CGAL_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h b/3rdparty/CGAL-4.6/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h
deleted file mode 100644
index aad149c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h
+++ /dev/null
@@ -1,499 +0,0 @@
-// Copyright (c) 2004   INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Mariette Yvinec <Mariette.Yvinec at sophia.inria.fr>
-
-#ifndef CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
-#define CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
-
-namespace CGAL {
-
-template <class FT>
-void
-determinants_for_weighted_circumcenterC3(
-		const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
-                FT &num_x,  FT &num_y, FT &num_z, FT& den)
-{
-  // translate origin to p
-  // and compute determinants for weighted_circumcenter and
-  // circumradius
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz) - qw + pw;
-  FT rpx = rx-px;
-  FT rpy = ry-py;
-  FT rpz = rz-pz;
-  FT rp2 = CGAL_NTS square(rpx) + CGAL_NTS square(rpy) +
-           CGAL_NTS square(rpz) - rw + pw;
-  FT spx = sx-px;
-  FT spy = sy-py;
-  FT spz = sz-pz;
-  FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) +
-           CGAL_NTS square(spz) - sw + pw;
-
-  num_x = determinant(qpy,qpz,qp2,
-			    rpy,rpz,rp2,
-			    spy,spz,sp2);
-  num_y = determinant(qpx,qpz,qp2,
-			    rpx,rpz,rp2,
-			    spx,spz,sp2);
-  num_z = determinant(qpx,qpy,qp2,
-			    rpx,rpy,rp2,
-			    spx,spy,sp2);
-  den   = determinant(qpx,qpy,qpz,
-			    rpx,rpy,rpz,
-			    spx,spy,spz);
-}
-
-
-template < class FT>
-void
-weighted_circumcenterC3(
-		const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
-                FT &x, FT &y, FT &z)
-{
-  // this function  compute the weighted circumcenter point only
-
-  // Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   sx, sy, sz, sw,
-					   num_x,  num_y, num_z,den);
-
-  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
-   FT inv = FT(1)/(FT(2) * den);
-
-  x = px + num_x*inv;
-  y = py - num_y*inv;
-  z = pz + num_z*inv;
-}
-
-template < class FT>
-void
-weighted_circumcenterC3(
-		const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
-                FT &x, FT &y, FT &z, FT &w)
-{
-  // this function  compute the weighted circumcenter point
-  // and the squared weighted circumradius
-
-  // Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   sx, sy, sz, sw,
-					   num_x,  num_y, num_z, den);
-
-  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
-   FT inv = FT(1)/(FT(2) * den);
-
-  x = px + num_x*inv;
-  y = py - num_y*inv;
-  z = pz + num_z*inv;
-
-  w = (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
-      *CGAL_NTS square(inv) - pw;
-}
-
-
-template< class FT >
-FT
-squared_radius_orthogonal_sphereC3(
-  const FT &px, const FT &py, const FT &pz, const FT  &pw,
-  const FT &qx, const FT &qy, const FT &qz, const FT  &qw,
-  const FT &rx, const FT &ry, const FT &rz, const FT  &rw,
-  const FT &sx, const FT &sy, const FT &sz, const FT  &sw)
-{
-
-  // this function  compute the squared weighted circumradius only
-
-  // Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   sx, sy, sz, sw,
-					   num_x, num_y, num_z,den);
-
-  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
-   FT inv = FT(1)/(FT(2) * den);
-
-   return
-    (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
-    *CGAL_NTS square(inv) - pw;
-}
-
-
-template <class FT>
-void
-determinants_for_weighted_circumcenterC3(
-	        const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-		FT &num_x,  FT &num_y, FT &num_z, FT &den)
-{
-  // translate origin to p
-  // and compute determinants for weighted_circumcenter and
-  // circumradius
-
-  // Translate s to origin to simplify the expression.
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz) - qw + pw;
-  FT rpx = rx-px;
-  FT rpy = ry-py;
-  FT rpz = rz-pz;
-  FT rp2 = CGAL_NTS square(rpx) + CGAL_NTS square(rpy) +
-           CGAL_NTS square(rpz) - rw + pw;
-
-  FT sx = qpy*rpz-qpz*rpy;
-  FT sy = qpz*rpx-qpx*rpz;
-  FT sz = qpx*rpy-qpy*rpx;
-
-  // The following determinants can be developped and simplified.
-  //
-  // FT num_x = determinant(qpy,qpz,qp2,
-  //                              rpy,rpz,rp2,
-  //                              sy,sz,FT(0));
-  // FT num_y = determinant(qpx,qpz,qp2,
-  //                              rpx,rpz,rp2,
-  //                              sx,sz,FT(0));
-  // FT num_z = determinant(qpx,qpy,qp2,
-  //                              rpx,rpy,rp2,
-  //                              sx,sy,FT(0));
-
-  num_x = qp2 * determinant(rpy,rpz,sy,sz)
-        - rp2 * determinant(qpy,qpz,sy,sz);
-
-  num_y = qp2 * determinant(rpx,rpz,sx,sz)
-	- rp2 * determinant(qpx,qpz,sx,sz);
-
-  num_z = qp2 * determinant(rpx,rpy,sx,sy)
-	- rp2 * determinant(qpx,qpy,sx,sy);
-
-  den   = determinant(qpx,qpy,qpz,
-			    rpx,rpy,rpz,
-			    sx,sy,sz);
-}
-
-template < class FT >
-void
-weighted_circumcenterC3(
-                  const FT &px, const FT &py, const FT &pz, const FT &pw,
-		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-		  const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-		  FT &x, FT &y, FT &z)
-{
-  // this function  compute the weighted circumcenter point only
-
-// Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   num_x,  num_y, num_z, den);
-
-  CGAL_triangulation_assertion( den != FT(0) );
-  FT inv = FT(1)/(FT(2) * den);
-
-  x = px + num_x*inv;
-  y = py - num_y*inv;
-  z = pz + num_z*inv;
-}
-
-
-template < class FT >
-void
-weighted_circumcenterC3(
-                  const FT &px, const FT &py, const FT &pz, const FT &pw,
-		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-		  const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-		  FT &x, FT &y, FT &z, FT &w)
-{
-  // this function  compute the weighted circumcenter and
-  // the weighted squared circumradius
-
-// Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   num_x,  num_y, num_z, den);
-
-  CGAL_triangulation_assertion( den != FT(0) );
-  FT inv = FT(1)/(FT(2) * den);
-
-  x = px + num_x*inv;
-  y = py - num_y*inv;
-  z = pz + num_z*inv;
-
-  w = (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
-      *CGAL_NTS square(inv)  - pw;
-}
-
-
-template< class FT >
-CGAL_MEDIUM_INLINE
-FT
-squared_radius_smallest_orthogonal_sphereC3(
-  const FT &px, const FT &py, const FT &pz, const FT  &pw,
-  const FT &qx, const FT &qy, const FT &qz, const FT  &qw,
-  const FT &rx, const FT &ry, const FT &rz, const FT  &rw)
-{
-  // this function  compute the weighted squared circumradius only
-
-// Translate p to origin and compute determinants
-  FT num_x, num_y, num_z, den;
-  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   num_x,  num_y, num_z, den);
-
-  CGAL_triangulation_assertion( den != FT(0) );
-  FT inv = FT(1)/(FT(2) * den);
-
- return
-    (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
-     *CGAL_NTS square(inv)  - pw;
-}
-
-
-
-template < class FT >
-void
-weighted_circumcenterC3(
-                  const FT &px, const FT &py, const FT &pz, const FT &pw,
-		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-		  FT &x, FT &y, FT &z)
-{
-// this function  compute the weighted circumcenter point only
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz);
-  FT inv = FT(1)/(FT(2)*qp2);
-  FT alpha = 1/FT(2) + (pw-qw)*inv;
-
-  x = px + alpha * qpx;
-  y = py + alpha * qpy;
-  z = pz + alpha * qpz;
-}
-
-
-template < class FT >
-void
-weighted_circumcenterC3(
-                  const FT &px, const FT &py, const FT &pz, const FT &pw,
-		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-		  FT &x, FT &y, FT &z, FT &w)
-{
- // this function  compute the weighted circumcenter point and
-  // the weighted circumradius
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz);
-  FT inv = FT(1)/(FT(2)*qp2);
-  FT alpha = 1/FT(2) + (pw-qw)*inv;
-
-  x = px + alpha * qpx;
-  y = py + alpha * qpy;
-  z = pz + alpha * qpz;
-
-  w = CGAL_NTS square(alpha)*qp2 - pw;
-}
-
-
-template< class FT >
-CGAL_MEDIUM_INLINE
-FT
-squared_radius_smallest_orthogonal_sphereC3(
-  const FT &px, const FT &py, const FT &pz, const FT  &pw,
-  const FT &qx, const FT &qy, const FT &qz, const FT  &qw)
-{
-  // this function  computes
-  // the weighted circumradius only
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz);
-  FT inv = FT(1)/(FT(2)*qp2);
-  FT alpha = 1/FT(2) + (pw-qw)*inv;
-
-  return  CGAL_NTS square(alpha)*qp2 - pw;
-}
-
-
-template< class FT >
-FT
-power_productC3(
-  const FT &px, const FT &py, const FT &pz, const FT  &pw,
-  const FT &qx, const FT &qy, const FT &qz, const FT  &qw)
-{
-  // computes the power product of two weighted points
-  FT qpx = qx-px;
-  FT qpy = qy-py;
-  FT qpz = qz-pz;
-  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
-           CGAL_NTS square(qpz);
-  return qp2 - pw - qw ;
-}
-
-template < class RT , class We>
-void
-radical_axisC3(const RT &px, const RT &py, const RT &pz, const We & /* pw */,
-	       const RT &qx, const RT &qy, const RT &qz, const We & /* qw */,
-	       const RT &rx, const RT &ry, const RT &rz, const We & /* rw */,
-	       RT &a, RT &b, RT& c )
-{
-  RT dqx=qx-px, dqy=qy-py, dqz=qz-pz, drx=rx-px, dry=ry-py, drz=rz-pz;
-
-  //il manque des tests...
-
-  a= RT(1)*determinant(dqy, dqz, dry, drz);
-  b= - RT(1)*determinant(dqx, dqz, drx, drz);
-  c= RT(1)*determinant(dqx, dqy, drx, dry);
-}
-
-// function used in critical_squared_radiusC3
-// power ( t, tw) with respect to
-// circle orthogonal (p,pw), (q,qw), (r,rw), (s,sw)
-template < class FT>
-FT
-power_to_orthogonal_sphereC3(
-                const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
-                const FT &tx, const FT &ty, const FT &tz, const FT &tw)
-{
-   //to get the value of the determinant
-   // We translate the points so that t  becomes the origin.
-    FT dpx = px - tx;
-    FT dpy = py - ty;
-    FT dpz = pz - tz;
-    FT dpt = CGAL_NTS square(dpx) + CGAL_NTS square(dpy) +
-             CGAL_NTS square(dpz) - pw + tw ;
-    FT dqx = qx - tx;
-    FT dqy = qy - ty;
-    FT dqz = qz - tz;
-    FT dqt = CGAL_NTS square(dqx) + CGAL_NTS square(dqy) +
-             CGAL_NTS square(dqz) - qw + tw;
-    FT drx = rx - tx;
-    FT dry = ry - ty;
-    FT drz = rz - tz;
-    FT drt = CGAL_NTS square(drx) + CGAL_NTS square(dry) +
-             CGAL_NTS square(drz) - rw + tw;
-    FT dsx = sx - tx;
-    FT dsy = sy - ty;
-    FT dsz = sz - tz;
-    FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) +
-             CGAL_NTS square(dsz) - sw + tw;
-
-    return determinant(dpx, dpy, dpz, dpt,
-			     dqx, dqy, dqz, dqt,
-			     drx, dry, drz, drt,
-			     dsx, dsy, dsz, dst);
-
-}
-
-
-
-// compute the critical weight tw
-// where weighted point t is orthogonal to weighted points p, q,r,s
-template < class FT>
-FT
-critical_squared_radiusC3(
-                const FT &px, const FT &py, const FT &pz, const FT &pw,
-                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
-                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
-                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
-                const FT &tx, const FT &ty, const FT &tz, const FT &  )
-{
-  // the 5x5 det  is a linear function of tw ff(tw)= ff(0) + tw ff(1)
-  // the critical value for tw is  - ff(0)/( ff(1) - ff(0))
-
-
-    FT ff0 =  power_to_orthogonal_sphereC3(px, py, pz, pw,
-					   qx, qy, qz, qw,
-					   rx, ry, rz, rw,
-					   sx, sy, sz, sw,
-					   tx, ty, tz, FT(0));
-
-    FT ff1 = power_to_orthogonal_sphereC3(px, py, pz, pw,
-					    qx, qy, qz, qw,
-					    rx, ry, rz, rw,
-					    sx, sy, sz, sw,
-					    tx, ty, tz, FT(1));
-
-    return   -ff0/(ff1 - ff0);
-}
-
-
-
- // I will use this to test if the radial axis of three spheres
-  // intersect the triangle formed by the centers.
-//   // resolution of the system (where we note c the center)
-//   // |       dc^2 = cw + rw
-//   // |  (dp-dc)^2 = pw + cw
-//   // |  (dq-dc)^2 = qw + cw
-//   // |         dc = Lamdba*dp + Mu*dq
-
-//   FT FT2(2);
-//   FT dpx = px-rx;
-//   FT dpy = py-ry;
-//   FT dpz = pz-rz;
-//   FT dp = CGAL_NTS square(dpx)+CGAL_NTS square(dpy)+CGAL_NTS  square(dpz);
-//   FT dpp = dp-pw+rw;
-//   FT dqx = qx-rx;
-//   FT dqy = qy-ry;
-//   FT dqz = qz-rz;
-//   FT dq = CGAL_NTS square(dqx)+CGAL_NTS square(dqy)+CGAL_NTS square(dqz);
-//   FT dqq = dq-qw+rw;
-//   FT dpdq = dpx*dqx+dpy*dqy+dpz*dqz;
-//   FT denom = FT2*(dp*dq-CGAL_NTS square(dpdq));
-//   FT Lambda = (dpp*dq-dqq*dpdq)/denom;
-//   FT Mu = (dqq*dp-dpp*dpdq)/denom;
-
-//   return (CGAL_NTS square(Lambda)*dp+CGAL_NTS square(Mu)*dq
-// 	  +FT2*Lambda*Mu*dpdq - rw);
-
-
-
-
-} //namespace CGAL
-#endif //CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_3.h b/3rdparty/CGAL-4.6/include/CGAL/convex_hull_3.h
deleted file mode 100644
index a93bbe7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_3.h
+++ /dev/null
@@ -1,955 +0,0 @@
-// Copyright (c) 2001,2011  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Susan Hert <hert at mpi-sb.mpg.de>
-//               : Amol Prakash <prakash at mpi-sb.mpg.de>
-//               : Andreas Fabri
-
-#ifndef CGAL_CONVEX_HULL_3_H
-#define CGAL_CONVEX_HULL_3_H
-#include <CGAL/basic.h>
-#include <CGAL/algorithm.h> 
-#include <CGAL/convex_hull_2.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Projection_traits_xy_3.h>
-#include <CGAL/Projection_traits_xz_3.h>
-#include <CGAL/Projection_traits_yz_3.h>
-#include <CGAL/Convex_hull_traits_3.h>
-#include <CGAL/Convex_hull_2/ch_assertions.h>
-#include <CGAL/Triangulation_data_structure_2.h>
-#include <CGAL/Triangulation_vertex_base_with_info_2.h>
-#include <CGAL/Cartesian_converter.h>
-#include <CGAL/Simple_cartesian.h>
-#include <iostream>
-#include <algorithm>
-#include <utility>
-#include <list>
-#include <map>
-#include <vector>
-#include <boost/bind.hpp>
-#include <boost/next_prior.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <CGAL/internal/Exact_type_selector.h>
-
-
-#ifndef CGAL_CH_NO_POSTCONDITIONS
-#include <CGAL/convexity_check_3.h>
-#endif // CGAL_CH_NO_POSTCONDITIONS
-
-
-namespace CGAL {
-
-namespace internal{  namespace Convex_hull_3{
-
-//struct to select the default traits class for computing convex hull
-template< class Point_3,
-          class Is_floating_point=typename boost::is_floating_point<typename Kernel_traits<Point_3>::Kernel::FT>::type,
-          class Has_filtered_predicates_tag=typename Kernel_traits<Point_3>::Kernel::Has_filtered_predicates_tag >
-struct Default_traits_for_Chull_3{
-  typedef typename Kernel_traits<Point_3>::Kernel type;
-};
-
-//FT is a floating point type and Kernel is a filtered kernel
-template <class Point_3>
-struct Default_traits_for_Chull_3<Point_3,boost::true_type,Tag_true>{
-  typedef Convex_hull_traits_3< typename Kernel_traits<Point_3>::Kernel, Tag_true > type;
-};
-
-template <class Traits>
-struct Default_polyhedron_for_Chull_3{
-  typedef CGAL::Polyhedron_3<Traits> type;
-};
-
-template <class K,class Tag>
-struct Default_polyhedron_for_Chull_3<Convex_hull_traits_3<K, Tag> >{
-  typedef typename  Convex_hull_traits_3<K, Tag>::Polyhedron_3 type;
-};
- 
-//utility class to select the right version of internal predicate Is_on_positive_side_of_plane_3
-template <class Traits,
-          class Is_floating_point=
-            typename boost::is_floating_point<typename Kernel_traits<typename Traits::Point_3>::Kernel::FT>::type,
-          class Has_filtered_predicates_tag=typename Kernel_traits<typename Traits::Point_3>::Kernel::Has_filtered_predicates_tag,
-          class Has_cartesian_tag=typename Kernel_traits<typename Traits::Point_3>::Kernel::Kernel_tag,
-          class Has_classical_point_type =
-              typename boost::is_same<
-                typename Kernel_traits<typename Traits::Point_3>::Kernel::Point_3,
-                typename Traits::Point_3  >::type
-         >
-struct Use_advanced_filtering{
-  typedef CGAL::Tag_false type;
-};
-
-template <class Traits>
-struct Use_advanced_filtering<Traits,boost::true_type,Tag_true,Cartesian_tag,boost::true_type>{
-  typedef typename Kernel_traits<typename Traits::Point_3>::Kernel K;
-  typedef CGAL::Boolean_tag<K::Has_static_filters> type;
-};
-
-//Predicates internally used
-template <class Traits,class Tag_use_advanced_filtering=typename Use_advanced_filtering<Traits>::type >
-class Is_on_positive_side_of_plane_3{
-  typedef typename Traits::Point_3 Point_3;
-  typename Traits::Plane_3 plane;
-  typename Traits::Has_on_positive_side_3 has_on_positive_side;
-public:
-  typedef Protect_FPU_rounding<false> Protector;
-
-  Is_on_positive_side_of_plane_3(const Traits& traits,const Point_3& p,const Point_3& q,const Point_3& r)
-  :plane(traits.construct_plane_3_object()(p,q,r)),has_on_positive_side(traits.has_on_positive_side_3_object()) {}
-    
-  bool operator() (const Point_3& s) const 
-  {
-    return has_on_positive_side(plane,s);
-  }
-};
-  
-
-//This predicate uses copy of the code from the statically filtered version of
-//Orientation_3. The rational is that the plane is a member of the functor
-//so optimization are done to avoid doing several time operations on the plane.
-//The main operator() first tries the static version of the predicate, then uses
-//interval arithmetic (the protector must be created before using this predicate)
-//and in case of failure, exact arithmetic is used.
-template <class Kernel>
-class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel, Tag_true>,Tag_true>{
-  typedef Simple_cartesian<CGAL::internal::Exact_field_selector<double>::Type>         PK;
-  typedef Simple_cartesian<Interval_nt_advanced >                               CK;  
-  typedef Convex_hull_traits_3<Kernel, Tag_true>                                Traits;
-  typedef typename Traits::Point_3                                              Point_3;
-  
-  Cartesian_converter<Kernel,CK>                        to_CK;
-  Cartesian_converter<Kernel,PK>                        to_PK;
-
-  const Point_3& p,q,r;
-  mutable typename CK::Plane_3* ck_plane;
-  mutable typename PK::Plane_3* pk_plane;
- 
-  double m10,m20,m21,Maxx,Maxy,Maxz;
-  
-  static const int STATIC_FILTER_FAILURE = 555;
-  
-  //this function is a made from the statically filtered version of Orientation_3
-  int static_filtered(double psx,double psy, double psz) const{
-
-    // Then semi-static filter.
-    double apsx = CGAL::abs(psx);
-    double apsy = CGAL::abs(psy);
-    double apsz = CGAL::abs(psz);
-
-    double maxx = (Maxx < apsx)? apsx : Maxx;
-    double maxy = (Maxy < apsy)? apsy : Maxy;
-    double maxz = (Maxz < apsz)? apsz : Maxz;
-
-    double det =  psx*m10 - m20*psy + m21*psz;
-    
-    // Sort maxx < maxy < maxz.
-    if (maxx > maxz)
-        std::swap(maxx, maxz);
-    if (maxy > maxz)
-        std::swap(maxy, maxz);
-    else if (maxy < maxx)
-        std::swap(maxx, maxy);
-
-    // Protect against underflow in the computation of eps.
-    if (maxx < 1e-97) /* cbrt(min_double/eps) */ {
-      if (maxx == 0)
-        return 0;
-    }
-    // Protect against overflow in the computation of det.
-    else if (maxz < 1e102) /* cbrt(max_double [hadamard]/4) */ {
-      double eps = 5.1107127829973299e-15 * maxx * maxy * maxz;
-      if (det > eps)  return 1;
-      if (det < -eps) return -1;
-    }
-    return STATIC_FILTER_FAILURE;
-  }
-  
-public:
-  typedef typename Interval_nt_advanced::Protector           Protector;
-
-  Is_on_positive_side_of_plane_3(const Traits&,const Point_3& p_,const Point_3& q_,const Point_3& r_)
-  :p(p_),q(q_),r(r_),ck_plane(NULL),pk_plane(NULL)
-  {
-    double pqx = q.x() - p.x();
-    double pqy = q.y() - p.y();
-    double pqz = q.z() - p.z();
-    double prx = r.x() - p.x();
-    double pry = r.y() - p.y();
-    double prz = r.z() - p.z();   
-
-
-    m10 = pqy*prz - pry*pqz;
-    m20 = pqx*prz - prx*pqz;
-    m21 = pqx*pry - prx*pqy;
-    
-    double aprx = CGAL::abs(prx);
-    double apry = CGAL::abs(pry);
-    double aprz = CGAL::abs(prz);
-
-    Maxx = CGAL::abs(pqx);
-    if (Maxx < aprx) Maxx = aprx;
-    Maxy = CGAL::abs(pqy);
-    if (Maxy < apry) Maxy = apry;
-    Maxz = CGAL::abs(pqz);
-    if (Maxz < aprz) Maxz = aprz;
-  }
-
-  ~Is_on_positive_side_of_plane_3(){
-    if (ck_plane!=NULL) delete ck_plane;
-    if (pk_plane!=NULL) delete pk_plane;
-  }
-  
-  bool operator() (const Point_3& s) const 
-  {
-    double psx = s.x() - p.x();
-    double psy = s.y() - p.y();
-    double psz = s.z() - p.z(); 
-    
-    int static_res = static_filtered(psx,psy,psz);
-    if (static_res != STATIC_FILTER_FAILURE)
-      return static_res == 1;
-    
-    try{
-      if (ck_plane==NULL)
-        ck_plane=new typename CK::Plane_3(to_CK(p),to_CK(q),to_CK(r));
-      return ck_plane->has_on_positive_side(to_CK(s));
-    }
-    catch (Uncertain_conversion_exception){
-      if (pk_plane==NULL)
-        pk_plane=new typename PK::Plane_3(to_PK(p),to_PK(q),to_PK(r));
-      return pk_plane->has_on_positive_side(to_PK(s));
-    }
-  }
-};
-
-
-template<class HDS, class ForwardIterator>
-class Build_coplanar_poly : public Modifier_base<HDS> {
- public:
-  Build_coplanar_poly(ForwardIterator i, ForwardIterator j) 
-    {
-      start = i;
-      end = j;
-    }
-  void operator()( HDS& hds) {
-    Polyhedron_incremental_builder_3<HDS> B(hds,true);
-    ForwardIterator iter = start;
-    int count = 0;
-    while (iter != end)
-      {
-	count++;
-	iter++;
-      }
-    B.begin_surface(count, 1, 2*count);
-    iter = start;
-    while (iter != end)
-      {
-	B.add_vertex(*iter);
-	iter++;
-      }
-    iter = start;
-    B.begin_facet();
-    int p = 0;
-    while (p < count)
-      {
-	B.add_vertex_to_facet(p);
-	p++;
-      }
-    B.end_facet();
-    B.end_surface();
-  }
- private:
-  ForwardIterator start;
-  ForwardIterator end;    
-};
-
-
-namespace internal { namespace Convex_hull_3{
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_xy_3,Traits_xy_3,false)
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_yz_3,Traits_xy_3,false)
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_xz_3,Traits_xy_3,false)
-
-template <class T,bool has_projection_traits=
-  Traits_has_typedef_Traits_xy_3<T>::value &&
-  Traits_has_typedef_Traits_yz_3<T>::value &&
-  Traits_has_typedef_Traits_xz_3<T>::value
->
-struct Projection_traits{
-  typedef typename Kernel_traits<typename T::Point_3>::Kernel K;
-  typedef CGAL::Projection_traits_xy_3<K> Traits_xy_3;
-  typedef CGAL::Projection_traits_yz_3<K> Traits_yz_3;
-  typedef CGAL::Projection_traits_xz_3<K> Traits_xz_3;
-};
-
-template <class T>
-struct Projection_traits<T,true>{
-  typedef typename T::Traits_xy_3 Traits_xy_3;
-  typedef typename T::Traits_yz_3 Traits_yz_3;
-  typedef typename T::Traits_xz_3 Traits_xz_3;
-};
-
-} } //end of namespace internal::Convex_hull_3
-
-template <class InputIterator, class Point_3, class Polyhedron_3, class Traits>
-void coplanar_3_hull(InputIterator first, InputIterator beyond,
-                     const Point_3& p1, const Point_3& p2, const Point_3& p3, 
-                     Polyhedron_3& P, const Traits& /* traits */)
-{
-  typedef typename internal::Convex_hull_3::Projection_traits<Traits> PTraits;
-  typedef typename PTraits::Traits_xy_3 Traits_xy_3;
-  typedef typename PTraits::Traits_yz_3 Traits_yz_3;
-  typedef typename PTraits::Traits_xz_3 Traits_xz_3;
-
-  std::list<Point_3> CH_2;
-  typedef typename std::list<Point_3>::iterator  CH_2_iterator;
- 
-  Traits_xy_3 traits_xy;
-  typename Traits_xy_3::Left_turn_2 left_turn_in_xy = traits_xy.left_turn_2_object();
-  if ( left_turn_in_xy(p1,p2,p3) || left_turn_in_xy(p2,p1,p3) )
-     convex_hull_points_2( first, beyond,
-                           std::back_inserter(CH_2),
-                           traits_xy );
-  else{
-    Traits_yz_3 traits_yz;
-    typename Traits_yz_3::Left_turn_2 left_turn_in_yz = traits_yz.left_turn_2_object();
-    if ( left_turn_in_yz(p1,p2,p3) || left_turn_in_yz(p2,p1,p3) )
-       convex_hull_points_2( first, beyond,
-                             std::back_inserter(CH_2),
-                             traits_yz );
-    else{
-      Traits_xz_3 traits_xz;
-      CGAL_assertion_code( typename Traits_xz_3::Left_turn_2 left_turn_in_xz = traits_xz.left_turn_2_object(); )
-      CGAL_assertion( left_turn_in_xz(p1,p2,p3) || left_turn_in_xz(p2,p1,p3) );
-         convex_hull_points_2( first, beyond,
-                               std::back_inserter(CH_2),
-                               traits_xz );
-    }
-  }
-
-  typedef typename Polyhedron_3::Halfedge_data_structure HDS;
-
-  Build_coplanar_poly<HDS,CH_2_iterator> poly(CH_2.begin(),CH_2.end());
-  P.delegate(poly);
-}
-
-
-//
-// visible is the set of facets visible from point  and reachable from
-// start_facet.
-//
-template <class TDS_2, class Traits>
-void
-find_visible_set(TDS_2& tds, 
-                 const typename Traits::Point_3& point, 
-                 typename TDS_2::Face_handle start,
-                 std::list<typename TDS_2::Face_handle>& visible,
-                 std::map<typename TDS_2::Vertex_handle, typename TDS_2::Edge>& outside,
-                 const Traits& traits)
-{
-   typedef typename Traits::Plane_3                   Plane_3;
-   typedef typename TDS_2::Face_handle Face_handle;
-   typedef typename TDS_2::Vertex_handle Vertex_handle;
-   typename Traits::Has_on_positive_side_3 has_on_positive_side =
-            traits.has_on_positive_side_3_object();
-
-   std::vector<Vertex_handle> vertices;
-   vertices.reserve(10);
-   int VISITED=1, BORDER=2;
-   visible.clear();
-   typename std::list<Face_handle>::iterator  vis_it;
-   visible.push_back(start);
-   start->info() = VISITED;
-   vertices.push_back(start->vertex(0));
-   vertices.push_back(start->vertex(1));
-   vertices.push_back(start->vertex(2));
-   start->vertex(0)->info() = start->vertex(1)->info() = start->vertex(2)->info() = VISITED;
- 
-   for (vis_it = visible.begin(); vis_it != visible.end(); vis_it++)
-   {
-      // check all the neighbors of the current face to see if they have 
-      // already been visited or not and if not whether they are visible 
-      // or not.
-
-      for(int i=0; i < 3; i++) {
-        // the facet on the other side of the current halfedge
-        Face_handle f = (*vis_it)->neighbor(i);
-        // if haven't already seen this facet
-        if (f->info() == 0) {
-          f->info() = VISITED;
-          Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
-          int ind = f->index(*vis_it);
-          if ( has_on_positive_side(plane, point) ){  // is visible
-            visible.push_back(f);
-            Vertex_handle vh = f->vertex(ind);
-            if(vh->info() == 0){ vertices.push_back(vh); vh->info() = VISITED;}
-          } else {
-            f->info() = BORDER;
-            f->vertex(TDS_2::cw(ind))->info() = BORDER;            
-            f->vertex(TDS_2::ccw(ind))->info() = BORDER;
-            outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)),
-                                          typename TDS_2::Edge(f,ind)));
-          }
-        } else if(f->info() == BORDER) {
-          int ind = f->index(*vis_it);
-          f->vertex(TDS_2::cw(ind))->info() = BORDER;            
-          f->vertex(TDS_2::ccw(ind))->info() = BORDER;
-          outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)),
-                                        typename TDS_2::Edge(f,ind)));
-        }
-      }
-   }
- 
-   for(typename std::vector<Vertex_handle>::iterator vit =  vertices.begin();
-       vit != vertices.end();
-       ++vit){
-     if((*vit)->info() != BORDER){
-       tds.delete_vertex(*vit);
-     } else {
-       (*vit)->info() = 0;
-     }
-   }
-
-}
-
-// using a third template parameter for the point instead of getting it from
-// the traits class as it should be is required by M$VC6
-template <class Face_handle, class Traits, class Point>
-typename std::list<Point>::iterator
-farthest_outside_point(Face_handle f, std::list<Point>& outside_set,
-                       const Traits& traits)
-{
-
-   typedef typename std::list<Point>::iterator Outside_set_iterator;
-   CGAL_ch_assertion(!outside_set.empty());
-
-   typename Traits::Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
-
-   typename Traits::Less_signed_distance_to_plane_3 less_dist_to_plane =
-            traits.less_signed_distance_to_plane_3_object();
-   Outside_set_iterator farthest_it =
-          std::max_element(outside_set.begin(),
-                           outside_set.end(), 
-                           boost::bind(less_dist_to_plane, plane, _1, _2));
-   return farthest_it;
-}
-
-template <class Face_handle, class Traits, class Point>
-void     
-partition_outside_sets(const std::list<Face_handle>& new_facets,
-                       std::list<Point>& vis_outside_set, 
-                       std::list<Face_handle>& pending_facets,
-                       const Traits& traits)
-{
-  typename std::list<Face_handle>::const_iterator        f_list_it;
-  typename std::list<Point>::iterator  point_it, to_splice;
-   
-  // walk through all the new facets and check each unassigned outside point
-  // to see if it belongs to the outside set of this new facet.
-  for (f_list_it = new_facets.begin(); (f_list_it != new_facets.end()) && (! vis_outside_set.empty());
-        ++f_list_it)
-  {
-    Face_handle f = *f_list_it;
-    Is_on_positive_side_of_plane_3<Traits> is_on_positive_side(
-      traits,f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
-    std::list<Point>& point_list = f->points;
-
-    for (point_it = vis_outside_set.begin();point_it != vis_outside_set.end();){
-      if( is_on_positive_side(*point_it) ) {
-        to_splice = point_it;
-        ++point_it;
-        point_list.splice(point_list.end(), vis_outside_set, to_splice);
-      } else {
-         ++point_it;
-      }
-    }
-    if(! point_list.empty()){
-      pending_facets.push_back(f);
-      f->it = boost::prior(pending_facets.end());
-    } else {
-      f->it = pending_facets.end();
-    }
-  }
-   
-   
-   for (; f_list_it != new_facets.end();++f_list_it)
-    (*f_list_it)->it = pending_facets.end();
-}
-
-
-
-template <class TDS_2, class Traits>
-void
-ch_quickhull_3_scan(TDS_2& tds,
-                    std::list<typename TDS_2::Face_handle>& pending_facets,
-                    const Traits& traits)
-{
-  typedef typename TDS_2::Edge                            Edge;
-  typedef typename TDS_2::Face_handle                     Face_handle;
-  typedef typename TDS_2::Vertex_handle                   Vertex_handle;
-  typedef typename Traits::Point_3			  Point_3;
-  typedef std::list<Point_3>                              Outside_set;
-  typedef typename std::list<Point_3>::iterator           Outside_set_iterator;
-  typedef std::map<typename TDS_2::Vertex_handle, typename TDS_2::Edge> Border_edges;
-
-  std::list<Face_handle>                     visible_set;
-  typename std::list<Face_handle>::iterator  vis_set_it;
-  Outside_set                                vis_outside_set;
-  Border_edges                               border;
-
-  while (!pending_facets.empty())
-  {
-     vis_outside_set.clear();
-
-     Face_handle f_handle = pending_facets.front();
-
-     Outside_set_iterator farthest_pt_it = farthest_outside_point(f_handle, f_handle->points, traits);
-     Point_3 farthest_pt = *farthest_pt_it;
-     f_handle->points.erase(farthest_pt_it);
-     find_visible_set(tds, farthest_pt, f_handle, visible_set, border, traits);
-
-     // for each visible facet
-     for (vis_set_it = visible_set.begin(); vis_set_it != visible_set.end();
-          vis_set_it++)
-     {
-       
-        //   add its outside set to the global outside set list
-       std::list<Point_3>& point_list = (*vis_set_it)->points;
-       if(! point_list.empty()){
-         vis_outside_set.splice(vis_outside_set.end(), point_list, point_list.begin(), point_list.end());
-       }
-
-       if((*vis_set_it)->it != pending_facets.end()){
-         pending_facets.erase((*vis_set_it)->it);
-       }
-       (*vis_set_it)->info() = 0;
-     }
-
-     std::vector<Edge> edges;
-     edges.reserve(border.size());
-     typename Border_edges::iterator it = border.begin();
-     Edge e = it->second;
-     e.first->info() = 0; 
-     edges.push_back(e);
-     border.erase(it);
-     while(! border.empty()){
-       it = border.find(e.first->vertex(TDS_2::ccw(e.second)));
-       assert(it != border.end());
-       e = it->second;
-       e.first->info() = 0; 
-       edges.push_back(e);
-       border.erase(it);
-     }
-
-     // If we want to reuse the faces we must only pass |edges| many, and call delete_face for the others.
-     // Also create facets if necessary
-     std::ptrdiff_t diff = visible_set.size() - edges.size();
-     if(diff < 0){
-       for(int i = 0; i<-diff;i++){
-         visible_set.push_back(tds.create_face());
-       }
-     } else {
-       for(int i = 0; i<diff;i++){
-         tds.delete_face(visible_set.back());
-         visible_set.pop_back();
-       }
-     }
-     Vertex_handle vh = tds.star_hole(edges.begin(), edges.end(), visible_set.begin(), visible_set.end());
-     vh->point() = farthest_pt;
-     vh->info() = 0;     
-  
-     // now partition the set of outside set points among the new facets.
-   
-     partition_outside_sets(visible_set, vis_outside_set, 
-                            pending_facets, traits);
-
-  }
-}
-
-template <class TDS_2, class Traits>
-void non_coplanar_quickhull_3(std::list<typename Traits::Point_3>& points,
-                              TDS_2& tds, const Traits& traits)
-{
-  typedef typename Traits::Point_3                        Point_3;
-
-  typedef typename TDS_2::Face_handle                     Face_handle;
-  typedef typename TDS_2::Face_iterator                     Face_iterator;
-  typedef typename std::list<Point_3>::iterator           P3_iterator;
-
-  std::list<Face_handle> pending_facets;
-
-  typename Is_on_positive_side_of_plane_3<Traits>::Protector p;
-  
-  // for each facet, look at each unassigned point and decide if it belongs
-  // to the outside set of this facet.
-  for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
-    Is_on_positive_side_of_plane_3<Traits> is_on_positive_side(
-      traits,fit->vertex(0)->point(),fit->vertex(1)->point(),fit->vertex(2)->point() );
-    for (P3_iterator point_it = points.begin() ; point_it != points.end(); )
-    {
-      if( is_on_positive_side(*point_it) ) {
-        P3_iterator to_splice = point_it;
-        ++point_it;
-        fit->points.splice(fit->points.end(), points, to_splice);
-      } else {
-       ++point_it;
-      }
-    }
-  }
-  // add all the facets with non-empty outside sets to the set of facets for
-  // further consideration
-  for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
-    if (! fit->points.empty()){
-      pending_facets.push_back(fit);
-      fit->it = boost::prior(pending_facets.end());
-        } else {
-      fit->it =  pending_facets.end();
-    }
-  }
-
-
-  ch_quickhull_3_scan(tds, pending_facets, traits);
-
-  //std::cout << "|V(tds)| = " << tds.number_of_vertices() << std::endl;
-//  CGAL_ch_expensive_postcondition(all_points_inside(points.begin(),
-//                                                    points.end(),P,traits));
-//  CGAL_ch_postcondition(is_strongly_convex_3(P, traits));
-}
-
-
-namespace internal{
-  
-template <class HDS,class TDS>
-class Build_convex_hull_from_TDS_2 : public CGAL::Modifier_base<HDS> {
-  typedef std::map<typename TDS::Vertex_handle,unsigned> Vertex_map;
-  
-  const TDS& t;
-  template <class Builder>
-  static unsigned get_vertex_index( Vertex_map& vertex_map,
-                                    typename TDS::Vertex_handle vh,
-                                    Builder& builder,
-                                    unsigned& vindex)
-  {
-    std::pair<typename Vertex_map::iterator,bool>
-      res=vertex_map.insert(std::make_pair(vh,vindex));
-    if (res.second){
-      builder.add_vertex(vh->point());
-      ++vindex;
-    }
-    return res.first->second;
-  }
-  
-public:
-  Build_convex_hull_from_TDS_2(const TDS& t_):t(t_) 
-  {
-    CGAL_assertion(t.dimension()==2);
-  }
-  void operator()( HDS& hds) {
-    // Postcondition: `hds' is a valid polyhedral surface.
-    
-    CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
-    Vertex_map vertex_map;
-    //start the surface
-    B.begin_surface( t.number_of_vertices(), t.number_of_faces());
-    unsigned vindex=0;
-    for (typename TDS::Face_iterator it=t.faces_begin();it!=t.faces_end();++it)
-    {
-      unsigned i0=get_vertex_index(vertex_map,it->vertex(0),B,vindex);
-      unsigned i1=get_vertex_index(vertex_map,it->vertex(1),B,vindex);
-      unsigned i2=get_vertex_index(vertex_map,it->vertex(2),B,vindex);
-      B.begin_facet();
-      B.add_vertex_to_facet( i0 );
-      B.add_vertex_to_facet( i1 );
-      B.add_vertex_to_facet( i2 );
-      B.end_facet();      
-    }
-    B.end_surface();
-  }
-};
-  
-} //namespace internal
-
-template <class InputIterator, class Polyhedron_3, class Traits>
-void
-ch_quickhull_polyhedron_3(std::list<typename Traits::Point_3>& points,
-                          InputIterator point1_it, InputIterator point2_it,
-                          InputIterator point3_it, Polyhedron_3& P,
-                          const Traits& traits)
-{
-  typedef typename Traits::Point_3	  		  Point_3;  
-  typedef typename Traits::Plane_3		      	  Plane_3;
-  typedef typename std::list<Point_3>::iterator           P3_iterator;
-
-  typedef Triangulation_data_structure_2<
-    Triangulation_vertex_base_with_info_2<int, GT3_for_CH3<Traits> >,
-    Convex_hull_face_base_2<int, Traits> >                           Tds;
-  typedef typename Tds::Vertex_handle                     Vertex_handle;
-  typedef typename Tds::Face_handle                     Face_handle;
-
-  // found three points that are not collinear, so construct the plane defined
-  // by these points and then find a point that has maximum distance from this
-  // plane.   
-  typename Traits::Construct_plane_3 construct_plane =
-         traits.construct_plane_3_object();
-  Plane_3 plane = construct_plane(*point3_it, *point2_it, *point1_it);
-  typedef typename Traits::Less_signed_distance_to_plane_3      Dist_compare; 
-  Dist_compare compare_dist = traits.less_signed_distance_to_plane_3_object();
-  
-  typename Traits::Coplanar_3  coplanar = traits.coplanar_3_object(); 
-  // find both min and max here since using signed distance.  If all points
-  // are on the negative side of the plane, the max element will be on the
-  // plane.
-  std::pair<P3_iterator, P3_iterator> min_max;
-  min_max = CGAL::min_max_element(points.begin(), points.end(), 
-                                  boost::bind(compare_dist, plane, _1, _2),
-                                  boost::bind(compare_dist, plane, _1, _2));
-  P3_iterator max_it;
-  if (coplanar(*point1_it, *point2_it, *point3_it, *min_max.second))
-  {
-     max_it = min_max.first;
-     // want the orientation of the points defining the plane to be positive
-     // so have to reorder these points if all points were on negative side
-     // of plane
-     std::swap(*point1_it, *point3_it);
-  }
-  else
-     max_it = min_max.second;
-
-  // if the maximum distance point is on the plane then all are coplanar
-  if (coplanar(*point1_it, *point2_it, *point3_it, *max_it)) {
-     coplanar_3_hull(points.begin(), points.end(), *point1_it, *point2_it, *point3_it, P, traits);
-  } else {  
-    Tds tds;
-    Vertex_handle v0 = tds.create_vertex(); v0->set_point(*point1_it);
-    Vertex_handle v1 = tds.create_vertex(); v1->set_point(*point2_it);
-    Vertex_handle v2 = tds.create_vertex(); v2->set_point(*point3_it);
-    Vertex_handle v3 = tds.create_vertex(); v3->set_point(*max_it);
-
-    v0->info() = v1->info() = v2->info() = v3->info() = 0;
-    Face_handle f0 = tds.create_face(v0,v1,v2);
-    Face_handle f1 = tds.create_face(v3,v1,v0);
-    Face_handle f2 = tds.create_face(v3,v2,v1);
-    Face_handle f3 = tds.create_face(v3,v0,v2);
-    tds.set_dimension(2);
-    f0->set_neighbors(f2, f3, f1);
-    f1->set_neighbors(f0, f3, f2);
-    f2->set_neighbors(f0, f1, f3);
-    f3->set_neighbors(f0, f2, f1);
-
-    points.erase(point1_it);
-    points.erase(point2_it);
-    points.erase(point3_it);
-    points.erase(max_it);
-    if (!points.empty()){
-      non_coplanar_quickhull_3(points, tds, traits);
-      internal::Build_convex_hull_from_TDS_2<typename Polyhedron_3::HalfedgeDS,Tds> builder(tds);
-      P.delegate(builder);
-    }
-    else
-      P.make_tetrahedron(v0->point(),v1->point(),v2->point(),v3->point());
-  }
-  
-}
-
-} } //namespace internal::Convex_hull_3
-
-template <class InputIterator, class Traits>
-void
-convex_hull_3(InputIterator first, InputIterator beyond, 
-              Object& ch_object, const Traits& traits)
-{  
-  typedef typename Traits::Point_3	  		  Point_3;  
-  typedef std::list<Point_3>                              Point_3_list;
-  typedef typename Point_3_list::iterator                 P3_iterator;
-  typedef std::pair<P3_iterator,P3_iterator>              P3_iterator_pair;
-
-  if (first == beyond)    // No point
-    return;
-
-  // If the first and last point are equal the collinearity test some lines below will always be true.
-  Point_3_list points(first, beyond);
-  std::size_t size = points.size();
-  while((size > 1) && (points.front() == points.back())){
-    points.pop_back();
-    --size;
-  }
-
-  if ( size == 1 )                // 1 point 
-  {
-      ch_object = make_object(*points.begin());
-      return;
-  }
-  else if ( size == 2 )           // 2 points 
-  {
-      typedef typename Traits::Segment_3                 Segment_3;  
-      typename Traits::Construct_segment_3 construct_segment =
-             traits.construct_segment_3_object();
-      Segment_3 seg = construct_segment(*points.begin(), *(++points.begin()));
-      ch_object = make_object(seg);
-      return;
-  }
-  else if ( size == 3 )           // 3 points 
-  {
-      typedef typename Traits::Triangle_3                Triangle_3;  
-      typename Traits::Construct_triangle_3 construct_triangle =
-             traits.construct_triangle_3_object();
-      Triangle_3 tri = construct_triangle(*(points.begin()), 
-                                          *(++points.begin()),
-                                          *(--points.end()));
-      ch_object = make_object(tri);
-      return;
-  }
-
-  // at least 4 points 
-  typename Traits::Collinear_3 collinear = traits.collinear_3_object();
-  
-  P3_iterator point1_it = points.begin();
-  P3_iterator point2_it = points.begin();
-  point2_it++;
-  P3_iterator point3_it = points.end();
-  point3_it--;
-
-  // find three that are not collinear
-  while (point2_it != points.end() && 
-         collinear(*point1_it,*point2_it,*point3_it))
-    point2_it++;
-  
-
-  // all are collinear, so the answer is a segment
-  if (point2_it == points.end())
-  {
-     typedef typename Traits::Less_distance_to_point_3      Less_dist; 
-
-     Less_dist less_dist = traits.less_distance_to_point_3_object();
-     P3_iterator_pair endpoints = 
-      min_max_element(points.begin(), points.end(), 
-                      boost::bind(less_dist, *points.begin(), _1, _2), 
-                      boost::bind(less_dist, *points.begin(), _1, _2));
-
-     typename Traits::Construct_segment_3 construct_segment =
-            traits.construct_segment_3_object();
-     typedef typename Traits::Segment_3                 Segment_3;  
-
-     Segment_3 seg = construct_segment(*endpoints.first, *endpoints.second);
-     ch_object = make_object(seg);
-     return;
-  }
-
-  // result will be a polyhedron
-  typename internal::Convex_hull_3::Default_polyhedron_for_Chull_3<Traits>::type P;
-
-  P3_iterator minx, maxx, miny, it;
-  minx = maxx = miny = it = points.begin();
-  ++it;
-  for(; it != points.end(); ++it){
-    if(it->x() < minx->x()) minx = it;
-    if(it->x() > maxx->x()) maxx = it;
-    if(it->y() < miny->y()) miny = it;
-  }
-  if(! collinear(*minx, *maxx, *miny) ){  
-    internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, minx, maxx, miny, P, traits);
-  } else {
-    internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, P, traits);
-  }
-  CGAL_assertion(P.size_of_vertices()>=3);
-  if (boost::next(P.vertices_begin(),3) == P.vertices_end()){
-    typedef typename Traits::Triangle_3                Triangle_3;
-    typename Traits::Construct_triangle_3 construct_triangle =
-           traits.construct_triangle_3_object();
-    Triangle_3 tri = construct_triangle(P.halfedges_begin()->vertex()->point(), 
-                                        P.halfedges_begin()->next()->vertex()->point(),
-                                        P.halfedges_begin()->opposite()->vertex()->point());
-    ch_object = make_object(tri);
-  }
-  else
-    ch_object = make_object(P);
-}
-
-
-template <class InputIterator>
-void convex_hull_3(InputIterator first, InputIterator beyond, 
-		   Object& ch_object)
-{
-   typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
-   typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
-   convex_hull_3(first, beyond, ch_object, Traits());
-}
-
-
-
-template <class InputIterator, class Polyhedron_3, class Traits>
-void convex_hull_3(InputIterator first, InputIterator beyond,
-                   Polyhedron_3& polyhedron,  const Traits& traits)
-{
-  typedef typename Traits::Point_3                Point_3;  
-  typedef std::list<Point_3>                      Point_3_list;
-  typedef typename Point_3_list::iterator         P3_iterator;
-
-  Point_3_list points(first, beyond);
-  CGAL_ch_precondition(points.size() > 3);
-
-  // at least 4 points 
-  typename Traits::Collinear_3 collinear = traits.collinear_3_object();
-  typename Traits::Equal_3 equal = traits.equal_3_object();
-
-  P3_iterator point1_it = points.begin();
-  P3_iterator point2_it = points.begin();
-  point2_it++;
-
-  // find three that are not collinear
-  while (point2_it != points.end() && equal(*point1_it,*point2_it))
-    ++point2_it;
-
-  CGAL_ch_precondition_msg(point2_it != points.end(), 
-        "All points are equal; cannot construct polyhedron.");
-  
-  P3_iterator point3_it = point2_it;
-  ++point3_it;
-  
-  CGAL_ch_precondition_msg(point3_it != points.end(), 
-        "Only two points with different coordinates; cannot construct polyhedron.");
-  
-  while (point3_it != points.end() && collinear(*point1_it,*point2_it,*point3_it))
-    ++point3_it;
-  
-  CGAL_ch_precondition_msg(point3_it != points.end(), 
-        "All points are collinear; cannot construct polyhedron.");
-  
-  polyhedron.clear();
-  // result will be a polyhedron
-  internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it,
-                                                     polyhedron, traits);
-
-}
-
-
-template <class InputIterator, class Polyhedron_3>
-void convex_hull_3(InputIterator first, InputIterator beyond,
-                   Polyhedron_3& polyhedron)
-{
-   typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
-   typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
-   convex_hull_3(first, beyond, polyhedron, Traits());
-}
-
-} // namespace CGAL
-
-#endif // CGAL_CONVEX_HULL_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_2.h b/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_2.h
deleted file mode 100644
index 652d19d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_2.h
+++ /dev/null
@@ -1,351 +0,0 @@
-// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef CGAL_CREATE_OFFSET_POLYGONS_2_H
-#define CGAL_CREATE_OFFSET_POLYGONS_2_H
-
-#include <CGAL/create_straight_skeleton_2.h>
-#include <CGAL/Polygon_offset_builder_2.h>
-#include <CGAL/Straight_skeleton_converter_2.h>
-#include <CGAL/compute_outer_frame_margin.h>
-#include <CGAL/Polygon_2.h>
-
-namespace CGAL {
-
-namespace CGAL_SS_i
-{
-
-template<class U, class V> struct Is_same_type { typedef Tag_false type ; } ;
-
-template<class U> struct Is_same_type<U,U> { typedef Tag_true type ; } ;
-
-
-template<class FT, class PointIterator, class HoleIterator, class K>
-boost::shared_ptr< Straight_skeleton_2<K> >
-create_partial_interior_straight_skeleton_2 ( FT const&     aMaxTime
-                                            , PointIterator aOuterContour_VerticesBegin
-                                            , PointIterator aOuterContour_VerticesEnd
-                                            , HoleIterator  aHolesBegin
-                                            , HoleIterator  aHolesEnd
-                                            , K const&      
-                                            )
-{
-  typedef Straight_skeleton_2<K> Ss ;
-
-  typedef Straight_skeleton_builder_traits_2<K> SsBuilderTraits;
-  
-  typedef Straight_skeleton_builder_2<SsBuilderTraits,Ss> SsBuilder;
-  
-  typedef typename K::FT KFT ;
-  
-  typedef typename std::iterator_traits<PointIterator>::value_type InputPoint ;
-  typedef typename Kernel_traits<InputPoint>::Kernel InputKernel ;
-  
-  Cartesian_converter<InputKernel, K> Converter ;
-  
-  boost::optional<KFT> lMaxTime( Converter(aMaxTime) ) ;
-  
-  SsBuilder ssb( lMaxTime ) ;
-  
-  ssb.enter_contour( aOuterContour_VerticesBegin, aOuterContour_VerticesEnd, Converter ) ;
-  
-  for ( HoleIterator hi = aHolesBegin ; hi != aHolesEnd ; ++ hi )
-    ssb.enter_contour( CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi), Converter ) ;
-  
-  return ssb.construct_skeleton();
-}
-
-template<class FT, class PointIterator, class K>
-boost::shared_ptr< Straight_skeleton_2<K> >
-create_partial_exterior_straight_skeleton_2 ( FT const&      aMaxOffset
-                                            , PointIterator  aVerticesBegin
-                                            , PointIterator  aVerticesEnd
-                                            , K const&       k
-                                            )
-{
-  typedef typename std::iterator_traits<PointIterator>::value_type Point_2 ;
-    
-  typedef Straight_skeleton_2<K> Ss ;
-  typedef boost::shared_ptr<Ss>  SsPtr ;
-  
-  SsPtr rSkeleton ;
-  
-  boost::optional<FT> margin = compute_outer_frame_margin( aVerticesBegin
-                                                         , aVerticesEnd
-                                                         , aMaxOffset 
-                                                         );
-
-  if ( margin )
-  {
-    
-    Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd);
-
-    FT fxmin = bbox.xmin() - *margin ;
-    FT fxmax = bbox.xmax() + *margin ;
-    FT fymin = bbox.ymin() - *margin ;
-    FT fymax = bbox.ymax() + *margin ;
-
-    Point_2 frame[4] ;
-    
-    frame[0] = Point_2(fxmin,fymin) ;
-    frame[1] = Point_2(fxmax,fymin) ;
-    frame[2] = Point_2(fxmax,fymax) ;
-    frame[3] = Point_2(fxmin,fymax) ;
-
-    typedef std::vector<Point_2> Hole ;
-    
-    Hole lPoly(aVerticesBegin, aVerticesEnd);
-    std::reverse(lPoly.begin(), lPoly.end());
-    
-    std::vector<Hole> holes ;
-    holes.push_back(lPoly) ;
-        
-    rSkeleton = create_partial_interior_straight_skeleton_2(aMaxOffset,frame, frame+4, holes.begin(), holes.end(), k ) ;  
-  }
-  
-  return rSkeleton ;
-}
-
-//
-// Kernel != Skeleton::kernel. The skeleton is converted to Straight_skeleton_2<Kernel>
-//
-template<class OutPolygon, class FT, class Skeleton, class K>
-std::vector< boost::shared_ptr<OutPolygon> > 
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Tag_false )
-{
-  typedef boost::shared_ptr<OutPolygon> OutPolygonPtr ; 
-  typedef std::vector<OutPolygonPtr>    OutPolygonPtrVector ;
-   
-  typedef Straight_skeleton_2<K> OfSkeleton ;
-   
-  typedef Polygon_offset_builder_traits_2<K>                                  OffsetBuilderTraits;
-  typedef Polygon_offset_builder_2<OfSkeleton,OffsetBuilderTraits,OutPolygon> OffsetBuilder;
-  
-  OutPolygonPtrVector rR ;
-  
-  boost::shared_ptr<OfSkeleton> lConvertedSs = convert_straight_skeleton_2<OfSkeleton>(aSs);
-  OffsetBuilder ob( *lConvertedSs );
-  ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ;
-    
-  return rR ;
-}
-
-//
-// Kernel == Skeleton::kernel, no convertion
-//
-template<class OutPolygon, class FT, class Skeleton, class K>
-std::vector< boost::shared_ptr<OutPolygon> > 
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k*/, Tag_true )
-{
-  typedef boost::shared_ptr<OutPolygon> OutPolygonPtr ; 
-  typedef std::vector<OutPolygonPtr>    OutPolygonPtrVector ;
-   
-  typedef Polygon_offset_builder_traits_2<K>                                OffsetBuilderTraits;
-  typedef Polygon_offset_builder_2<Skeleton,OffsetBuilderTraits,OutPolygon> OffsetBuilder;
-  
-  OutPolygonPtrVector rR ;
-  
-  OffsetBuilder ob(aSs);
-  ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ;
-    
-  return rR ;
-}
-
-// Allow failure due to invalid straight skeletons to go through the users
-template<class Skeleton>
-Skeleton const& dereference ( boost::shared_ptr<Skeleton> const& ss )
-{
-  CGAL_precondition(ss.get() != 0);
-  return *ss;
-}
-
-}
-
-template<class Polygon, class FT, class Skeleton, class K>
-std::vector< boost::shared_ptr<Polygon> > 
-inline
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& k )
-{
-  typedef typename Skeleton::Traits SsKernel ;
-  
-  typename CGAL_SS_i::Is_same_type<K,SsKernel>::type same_kernel ;
-  
-  return CGAL_SS_i::create_offset_polygons_2<Polygon>(aOffset,aSs,k,same_kernel);
-}
-
-
-template<class FT, class Skeleton, class K>
-std::vector< boost::shared_ptr< Polygon_2<K> > > 
-inline
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& k )
-{
-  typedef Polygon_2<K> Polygon ;
-  
-  return create_offset_polygons_2<Polygon>(aOffset, aSs, k ) ;
-}
-
-#if !defined(_MSC_VER) || ( _MSC_VER >= 1500 )
-template<class FT, class Skeleton>
-std::vector< boost::shared_ptr< Polygon_2< typename Skeleton::Traits::Kernel > > > 
-inline
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs )
-{
-  typedef typename Skeleton::Traits::Kernel K ;
-  
-  return create_offset_polygons_2(aOffset, aSs, K() ) ;
-}
-#endif
-
-template<class Polygon, class FT, class Skeleton>
-std::vector< boost::shared_ptr<Polygon> > 
-inline
-create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs )
-{
-  return create_offset_polygons_2<Polygon>(aOffset, aSs, typename Polygon::Traits() ) ;
-}
-
-template<class FT, class Polygon, class HoleIterator, class OfK, class SsK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const&      aOffset
-                                               , Polygon const& aOuterBoundary
-                                               , HoleIterator   aHolesBegin
-                                               , HoleIterator   aHolesEnd
-                                               , OfK const&     ofk
-                                               , SsK const&     ssk
-                                               )
-{
-  return create_offset_polygons_2<Polygon>
-          (aOffset
-          ,CGAL_SS_i::dereference
-            ( CGAL_SS_i::create_partial_interior_straight_skeleton_2(aOffset
-                                                                    ,CGAL_SS_i::vertices_begin(aOuterBoundary)
-                                                                    ,CGAL_SS_i::vertices_end  (aOuterBoundary)
-                                                                    ,aHolesBegin
-                                                                    ,aHolesEnd
-                                                                    ,ssk
-                                                                    ) 
-            )
-          ,ofk
-          );
-    
-}
-
-template<class FT, class Polygon, class HoleIterator, class OfK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const&      aOffset
-                                               , Polygon const& aOuterBoundary
-                                               , HoleIterator   aHolesBegin
-                                               , HoleIterator   aHolesEnd
-                                               , OfK const&     ofk
-                                               )
-{
-  return create_interior_skeleton_and_offset_polygons_2(aOffset
-                                                       ,aOuterBoundary
-                                                       ,aHolesBegin
-                                                       ,aHolesEnd
-                                                       ,ofk
-                                                       ,Exact_predicates_inexact_constructions_kernel()
-                                                       );
-}
-
-template<class FT, class Polygon, class OfK, class SsK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk, SsK const& ssk )
-{
-  std::vector<Polygon> no_holes ;
-  return create_interior_skeleton_and_offset_polygons_2(aOffset
-                                                       ,aPoly
-                                                       ,no_holes.begin()
-                                                       ,no_holes.end()
-                                                       ,ofk
-                                                       ,ssk
-                                                       );
-}
-
-template<class FT, class Polygon, class OfK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk )
-{
-  std::vector<Polygon> no_holes ;
-  return create_interior_skeleton_and_offset_polygons_2(aOffset
-                                                       ,aPoly
-                                                       ,no_holes.begin()
-                                                       ,no_holes.end()
-                                                       ,ofk
-                                                       ,Exact_predicates_inexact_constructions_kernel()
-                                                       );
-}
-
-template<class FT, class Polygon>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly )
-{
-  return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly, typename Polygon::Traits() );
-}
-
-template<class FT, class Polygon, class OfK, class SsK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk , SsK const&  ssk)
-{
-  return create_offset_polygons_2<Polygon>
-          (aOffset
-          ,CGAL_SS_i::dereference
-            (CGAL_SS_i::create_partial_exterior_straight_skeleton_2(aOffset
-                                                                   ,CGAL_SS_i::vertices_begin(aPoly)
-                                                                   ,CGAL_SS_i::vertices_end  (aPoly)
-                                                                   ,ssk
-                                                                  )
-            )
-          ,ofk                                    
-          );
-}
-
-template<class FT, class Polygon, class OfK>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk )
-{
-  return create_exterior_skeleton_and_offset_polygons_2(aOffset
-                                                       ,aPoly
-                                                       ,ofk
-                                                       ,Exact_predicates_inexact_constructions_kernel()
-                                                       );
-                                               
-}
-
-template<class FT, class Polygon>
-std::vector< boost::shared_ptr<Polygon> >
-inline
-create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aOuterBoundary )
-{
-  return create_exterior_skeleton_and_offset_polygons_2(aOffset, aOuterBoundary, typename Polygon::Traits() );
-                                               
-}
-
-} // end namespace CGAL
-
-
-#endif
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h
deleted file mode 100644
index 55190c5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef CGAL_CREATE_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H
-#define CGAL_CREATE_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H
-
-#include <CGAL/create_offset_polygons_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-#include <CGAL/arrange_offset_polygons_2.h>
-
-namespace CGAL {
-
-template<class FT, class OfK, class SsK>
-std::vector< boost::shared_ptr< Polygon_2<OfK> > >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon_with_holes_2<OfK> const& aPoly, SsK const& ssk )
-{
-  OfK ofk ;
-  return create_interior_skeleton_and_offset_polygons_2(aOffset
-                                                       ,aPoly.outer_boundary()
-                                                       ,aPoly.holes_begin()
-                                                       ,aPoly.holes_end()
-                                                       ,ofk
-                                                       ,ssk
-                                                       );
-    
-}
-
-template<class FT, class OfK>
-std::vector< boost::shared_ptr< Polygon_2<OfK> > >
-inline
-create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon_with_holes_2<OfK> const& aPoly )
-{
-  return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly, Exact_predicates_inexact_constructions_kernel() );
-}
-
-template<class FT, class OfK>
-std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK> > >
-inline
-create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT const&             aOffset
-                                                          , Polygon_2<OfK> const& aPoly
-                                                          , bool                  aDontReverseOrientation = false
-                                                          )
-{
-  return arrange_offset_polygons_2(create_exterior_skeleton_and_offset_polygons_with_holes_2(aOffset
-                                                                                            ,aPoly
-                                                                                            ,aDontReverseOrientation
-                                                                                            )
-                                  );
-}
-
-template<class FT, class OfK, class SsK>
-std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK> > >
-inline
-create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT const& aOffset, Polygon_with_holes_2<OfK> const& aPoly, SsK const& ssk )
-{
-  return arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(aOffset,aPoly,ssk));
-}
-
-template<class FT, class OfK>
-std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK> > >
-inline
-create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT const& aOffset, Polygon_with_holes_2<OfK> const& aPoly )
-{
-  return arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(aOffset,aPoly));
-}
-
-template<class FT, class OfK, class SsK>
-std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK> > >
-inline
-create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT const&             aOffset
-                                                          , Polygon_2<OfK> const& aPoly
-                                                          , SsK const&            ssk 
-                                                          )
-{
-  return arrange_offset_polygons_2(create_exterior_skeleton_and_offset_polygons_with_holes_2(aOffset
-                                                                                            ,aPoly
-                                                                                            ,ssk
-                                                                                            )
-                                  );
-}
-
-
-
-} // end namespace CGAL
-
-
-#endif 
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/3rdparty/CGAL-4.6/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h
deleted file mode 100644
index 8e64947..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-
-// $URL$
-// $Id$
-//
-// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
-//
-#ifndef CGAL_CREATE_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H
-#define CGAL_CREATE_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H
-
-#include <CGAL/create_straight_skeleton_2.h>
-#include <CGAL/Polygon_with_holes_2.h>
-
-namespace CGAL {
-
-template<class K>
-boost::shared_ptr< Straight_skeleton_2<K> >
-inline
-create_interior_straight_skeleton_2 ( Polygon_with_holes_2<K> const& aPolyWithHoles )
-{
-  return create_interior_straight_skeleton_2(aPolyWithHoles.outer_boundary().vertices_begin()
-                                            ,aPolyWithHoles.outer_boundary().vertices_end  ()
-                                            ,aPolyWithHoles.holes_begin   ()
-                                            ,aPolyWithHoles.holes_end     ()
-                                            ,K()
-                                            );
-}
-
-} // end namespace CGAL
-
-
-#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/edge_aware_upsample_point_set.h b/3rdparty/CGAL-4.6/include/CGAL/edge_aware_upsample_point_set.h
deleted file mode 100644
index 3321f0d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/edge_aware_upsample_point_set.h
+++ /dev/null
@@ -1,651 +0,0 @@
-// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
-
-#ifndef CGAL_UPSAMPLE_POINT_SET_H
-#define CGAL_UPSAMPLE_POINT_SET_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/internal/Rich_grid.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-#include <CGAL/compute_average_spacing.h>
-
-#include <iterator>
-#include <set>
-#include <utility>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-  #include <boost/property_map/property_map.hpp>
-#else
-  #include <boost/property_map.hpp>
-#endif
-
-//#define  CGAL_PSP3_VERBOSE
-
-namespace CGAL {
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-
-namespace upsample_internal{
-
-/// For each query point, select a best "base point" in its neighborhoods.
-/// Then, a new point will be interpolated between query point and "base point".
-/// This is the key part of the upsample algorithm 
-/// 
-/// \pre `radius > 0`
-///
-/// @tparam Kernel Geometric traits class.
-///
-/// @return local density length
-template <typename Kernel>
-typename Kernel::FT
-base_point_selection(
-  const rich_grid_internal::Rich_point<Kernel>& query, ///< 3D point to project
-  const std::vector<rich_grid_internal::Rich_point<Kernel> >& 
-                    neighbor_points,///< neighbor sample points
-  const typename Kernel::FT edge_sensitivity,///< edge senstivity parameter
-  unsigned int& output_base_index ///< base point index
-  )
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
-
-  if (neighbor_points.empty())
-  {
-#ifdef CGAL_PSP3_VERBOSE
-    std::cout << "empty neighborhood" << std::endl;
-#endif
-    output_base_index = query.index;
-    return 0.0;
-  }
-
-  FT best_dist2 = -10.0;
-  const Rich_point& v = query;
-  typename std::vector<Rich_point>::const_iterator iter = neighbor_points.begin();
-  for (; iter != neighbor_points.end(); ++iter)
-  {
-    const Point& t = iter->pt;
-
-    const Vector& vm = v.normal;
-    const Vector& tm = iter->normal;
-
-    Vector diff_v_t = t - v.pt;
-    Point mid_point = v.pt + (diff_v_t * FT(0.5));
-    
-    FT dot_produce = std::pow((FT(2.0) - vm * tm), edge_sensitivity);
-
-    Vector diff_t_mid = mid_point - t;
-    FT project_t = diff_t_mid * tm;
-    FT min_dist2 = diff_t_mid.squared_length() - project_t * project_t;
-
-    typename std::vector<Rich_point>::const_iterator iter_in = neighbor_points.begin();
-    for (; iter_in != neighbor_points.end(); ++iter_in)
-    {
-      Vector diff_s_mid = mid_point - iter_in->pt;
-      FT project_s = diff_s_mid * iter_in->normal;
-
-      FT proj_min2 = diff_s_mid.squared_length() - project_s * project_s;
-
-      if (proj_min2 < min_dist2)
-      {
-        min_dist2 = proj_min2;
-      }
-    }
-    min_dist2 *= dot_produce;
-
-    if (min_dist2 > best_dist2)
-    {
-      best_dist2 = min_dist2;
-      output_base_index = iter->index;
-    }
-  }
-
-  return best_dist2; 
-}
-
-/// For each new inserted point, we need to do the following job
-/// 1, get neighbor information from the two "parent points"
-/// 2, update position and determine normal by bilateral projection 
-/// 3, update neighbor information again
-///
-/// \pre `radius > 0`
-///
-/// @tparam Kernel Geometric traits class.
-///
-template <typename Kernel>
-void
-update_new_point(
-  unsigned int new_point_index, ///< new inserted point
-  unsigned int father_index, ///< father point index
-  unsigned int mother_index, ///< mother point index
-  std::vector<rich_grid_internal::Rich_point<Kernel> >& rich_point_set,
-                                                           ///< all rich points
-  const typename Kernel::FT radius,          ///< accept neighborhood radius
-  const typename Kernel::FT sharpness_bandwidth  ///< control sharpness
-)
-{
-  // basic geometric types
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
-
-  CGAL_assertion_code( unsigned int size = rich_point_set.size() );
-  CGAL_point_set_processing_precondition(father_index >= 0 &&
-                                         father_index < size);
-  CGAL_point_set_processing_precondition(mother_index >= 0 &&
-                                           mother_index < size);
-
-  // 1, get neighbor information from the two "parent points"
-  Rich_point& new_v = rich_point_set[new_point_index];
-  Rich_point& father_v = rich_point_set[father_index];
-  Rich_point& mother_v = rich_point_set[mother_index];
-
-  std::set<int> neighbor_indexes;
-  std::vector<unsigned int>::iterator iter;
-  for (iter = father_v.neighbors.begin();
-       iter != father_v.neighbors.end();
-       ++iter)
-  {
-    neighbor_indexes.insert(*iter);
-  }
-
-  for (iter = mother_v.neighbors.begin();
-       iter != mother_v.neighbors.end();
-       ++iter)
-  {
-    neighbor_indexes.insert(*iter);
-  }
-
-  neighbor_indexes.insert(father_v.index);
-  neighbor_indexes.insert(mother_v.index);
-
-  double radius2 = radius * radius;
-
-  new_v.neighbors.clear();
-  std::set<int>::iterator set_iter;
-  for (set_iter = neighbor_indexes.begin(); 
-       set_iter != neighbor_indexes.end(); ++set_iter)
-  {
-    Rich_point& t = rich_point_set[*set_iter];
-    FT dist2 =  CGAL::squared_distance(new_v.pt, t.pt);
-
-    if (dist2 < radius2)
-    {
-      new_v.neighbors.push_back(t.index);
-    }
-  }
-
-  // 2, update position and normal by bilateral projection 
-  const unsigned int candidate_num = 2; // we have two normal candidates:
-                                        // we say father's is 0
-                                        //        mother's is 1
-  std::vector<Vector> normal_cadidate(candidate_num);
-  normal_cadidate[0] = father_v.normal;
-  normal_cadidate[1] = mother_v.normal;
-
-  std::vector<FT> project_dist_sum(candidate_num, FT(0.0));
-  std::vector<FT> weight_sum(candidate_num, FT(0.0));
-  std::vector<Vector> normal_sum(candidate_num, NULL_VECTOR);
-   
-  FT radius16 = FT(-4.0) / radius2;
-
-  for (unsigned int i = 0; i < new_v.neighbors.size(); ++i)
-  {
-    Rich_point& t = rich_point_set[new_v.neighbors[i]];
-    FT dist2 = CGAL::squared_distance(new_v.pt, t.pt);
-    FT theta = std::exp(dist2 * radius16);
-
-    for (unsigned int j = 0; j < candidate_num; j++)
-    {
-      FT psi = std::exp(-std::pow(1 - normal_cadidate[j] * t.normal, 2)
-                       / sharpness_bandwidth);
-      FT project_diff_t_v = (t.pt - new_v.pt) * t.normal;
-      FT weight = psi * theta;
-
-      project_dist_sum[j] += project_diff_t_v * weight;
-      normal_sum[j] = normal_sum[j] + t.normal * weight;
-      weight_sum[j] += weight;
-    }
-  }
-
-  // select best candidate
-  FT min_project_dist = (FT)(std::numeric_limits<double>::max)();
-  unsigned int best = 0;
-
-  for (unsigned int i = 0; i < candidate_num; ++i)
-  {
-    FT absolute_dist = abs(project_dist_sum[i] / weight_sum[i]);
-    if (absolute_dist < min_project_dist)
-    {
-      min_project_dist = absolute_dist;
-      best = i;
-    }
-  }
-
-  // update position and normal
-  Vector update_normal = normal_sum[best] / weight_sum[best];
-  new_v.normal = update_normal / sqrt(update_normal.squared_length());
-
-  FT project_dist = project_dist_sum[best] / weight_sum[best];
-  new_v.pt = new_v.pt + new_v.normal * project_dist;
-
-
-  // 3, update neighbor information again
-  new_v.neighbors.clear();
-  for (set_iter = neighbor_indexes.begin(); 
-       set_iter != neighbor_indexes.end(); ++set_iter)
-  {
-    Rich_point& t = rich_point_set[*set_iter];
-    FT dist2 =  CGAL::squared_distance(new_v.pt, t.pt);
-
-    if (dist2 < radius2)
-    {
-      new_v.neighbors.push_back(t.index);
-      t.neighbors.push_back(new_v.index);
-    }
-  }
-}
-
-} /* namespace upsample_internal */
-
-/// \endcond
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// This method progressively upsamples the point set while 
-/// approaching the edge singularities (detected by normal variation), which 
-/// generates a denser point set from an input point set. This has applications 
-/// in point-based rendering, hole filling, and sparse surface reconstruction. 
-/// Normals of points are required as input. For more details, please refer to \cgalCite{ear-2013}.
-/// 
-/// @tparam OutputIterator Type of the output iterator. 
-///         The type of the objects put in it is 
-///         `std::pair<Kernel::Point_3, Kernel::Vector_3>`.
-///         Note that the user may use a 
-///         <A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
-///         to match specific needs.
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` 
-///         with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
-///         It can be omitted if the value type of `ForwardIterator` is convertible to 
-///         `Kernel::Point_3`.
-/// @tparam NormalPMap is a model of `ReadablePropertyMap` with the value type of `ForwardIterator` as key
-///         and `Kernel::Vector_3` as value type.
-/// @tparam Kernel Geometric traits class.
-///      It can be omitted and deduced automatically from the value type of  `PointPMap`
-///      using `Kernel_traits`.
-///
-
-// This variant requires all parameters.
-template <typename OutputIterator,
-          typename ForwardIterator, 
-          typename PointPMap, 
-          typename NormalPMap,
-          typename Kernel>
-OutputIterator
-edge_aware_upsample_point_set(
-  ForwardIterator first,  ///< forward iterator on the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator.
-  OutputIterator output,  ///< output iterator where output points and normals 
-                          ///< are put.
-  PointPMap point_pmap,   ///< point property map.
-  NormalPMap normal_pmap, ///< vector property map.
-  const typename Kernel::FT sharpness_angle,  ///< 
-                    ///< controls the preservation of sharp features. 
-                    ///< The larger the value is,
-                    ///< the smoother the result will be.
-                    ///< The range of possible value is [0, 90].
-                    ///< See section \ref Point_set_processing_3Upsample_Parameter2
-                    ///< for an example.
-  typename Kernel::FT edge_sensitivity,  ///<  
-                    ///< larger values of edge-sensitivity give higher priority 
-                    ///< to inserting points along sharp features.
-                    ///< The range of possible values is `[0, 1]`.
-                    ///< See section \ref Point_set_processing_3Upsample_Parameter1
-                    ///< for an example.
-  typename Kernel::FT neighbor_radius, ///< 
-                    ///< indicates the radius of the largest hole that should be filled.
-                    ///< The default value is set to 3 times the average spacing of the point set.
-                    ///< If the value given by user is smaller than the average spacing, 
-                    ///< the function will use the default value instead.
-  const unsigned int number_of_output_points,///< number of output
-                                             ///< points to generate.
-  const Kernel& /*kernel*/ ///< geometric traits.
-)
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
-
-  // preconditions
-  CGAL_point_set_processing_precondition(first != beyond);
-  CGAL_point_set_processing_precondition(sharpness_angle >= 0 
-                                       &&sharpness_angle <= 90);
-  CGAL_point_set_processing_precondition(edge_sensitivity >= 0 
-                                       &&edge_sensitivity <= 1);
-  CGAL_point_set_processing_precondition(neighbor_radius > 0);
-
-  edge_sensitivity *= 10;  // just project [0, 1] to [0, 10].
-
-  std::size_t number_of_input = std::distance(first, beyond);
-  CGAL_point_set_processing_precondition(number_of_output_points > number_of_input);
-
-
-  const unsigned int nb_neighbors = 6; // 1 ring
-  FT average_spacing = CGAL::compute_average_spacing(
-                   first, beyond,
-                   point_pmap,
-                   nb_neighbors);
-
-  if (neighbor_radius < average_spacing * 1.0)
-  {
-    neighbor_radius = average_spacing * 3.0;
-#ifdef CGAL_PSP3_VERBOSE
-    std::cout << "neighbor radius: " << neighbor_radius << std::endl;
-#endif
-  }
-  
-  Timer task_timer;
-
-  // copy rich point set
-  std::vector<Rich_point> rich_point_set(number_of_input);
-  CGAL::Bbox_3 bbox(0., 0., 0., 0., 0., 0.);
-  
-  ForwardIterator it = first; // point iterator
-  for(unsigned int i = 0; it != beyond; ++it, ++i)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    rich_point_set[i].pt = get(point_pmap, it);
-    rich_point_set[i].normal = get(normal_pmap, it);
-#else
-    rich_point_set[i].pt = get(point_pmap, *it);
-    rich_point_set[i].normal = get(normal_pmap, *it);
-#endif
-
-    rich_point_set[i].index = i;
-    bbox += rich_point_set[i].pt.bbox();
-    CGAL_point_set_processing_precondition(rich_point_set[i].normal.squared_length() > 1e-10);
-  }
-
-  // compute neighborhood
-  rich_grid_internal::compute_ball_neighbors_one_self(rich_point_set,
-                                                      bbox,
-                                                      neighbor_radius);
-
-  //
-  FT cos_sigma = std::cos(sharpness_angle / 180.0 * 3.1415926);
-  FT sharpness_bandwidth = std::pow((CGAL::max)((FT)1e-8, (FT)1.0 - cos_sigma), 2);
-
-  FT sum_density = 0.0;
-  unsigned int count_density = 1;
-  double max_iter_time = 20;
-  FT current_radius = neighbor_radius;
-  FT density_pass_threshold = 0.0;
-
-  for (unsigned int iter_time = 0; iter_time < max_iter_time; ++iter_time)
-  {
-  #ifdef CGAL_PSP3_VERBOSE
-     std::cout << std::endl << "iter_time: " << iter_time + 1  << std::endl;
-  #endif
-    if (iter_time > 0)
-    {
-      current_radius *= 0.75;
-      if (current_radius < density_pass_threshold * 3) //3 ring
-      {
-        current_radius = density_pass_threshold * 3;
-      }
-      rich_grid_internal::compute_ball_neighbors_one_self(rich_point_set,
-                                                          bbox,
-                                                          current_radius);
-    }
- #ifdef CGAL_PSP3_VERBOSE
-    std::cout << "current radius: " << current_radius << std::endl; 
- #endif
-
-    unsigned int current_size = rich_point_set.size();
-    std::vector<bool> is_pass_threshold(current_size, false);
-
-    if (iter_time == 0)
-    {
-      //estimate density threshold for the first time
-      for (unsigned int i = 0; i < rich_point_set.size() * 0.05; ++i)
-      {
-        Rich_point& v = rich_point_set[i];
-
-        if (v.neighbors.empty())
-          continue;
-
-        // extract neighbor rich points by index
-        std::vector<Rich_point> neighbor_rich_points(v.neighbors.size());
-        for (unsigned int n = 0; n < v.neighbors.size(); n++)
-        {
-          neighbor_rich_points[n] = rich_point_set[v.neighbors[n]];
-        }
-
-        unsigned int base_index = 0;
-        double density2 = upsample_internal::
-                              base_point_selection(v,
-                                                   neighbor_rich_points,
-                                                   edge_sensitivity,
-                                                   base_index);
-
-        if (density2 < 0)
-        {
-          continue;
-        }
-
-        sum_density += density2;
-        count_density++;
-      }
-    }
-
-    density_pass_threshold = sqrt(sum_density / count_density) * 0.65;
-    sum_density = 0.;
-    count_density = 1;
-
-    FT density_pass_threshold2 = density_pass_threshold * 
-                                 density_pass_threshold;
- #ifdef CGAL_PSP3_VERBOSE
-    std::cout << "pass_threshold:  " << density_pass_threshold << std::endl;
- #endif
-    // insert new points until all the points' density pass the threshold
-    unsigned int max_loop_time = 3;
-    unsigned int loop = 0;
-    while (true)
-    {
-   #ifdef CGAL_PSP3_VERBOSE
-      std::cout << "loop_time: " << loop + 1 << std::endl;
-   #endif
-      unsigned int count_not_pass = 0;
-      loop++;
-      for (unsigned int i = 0; i < rich_point_set.size(); ++i)
-      {
-        if (is_pass_threshold[i])
-        {
-          continue;
-        }
-
-        Rich_point& v = rich_point_set[i];
-
-        if (v.neighbors.empty())
-          continue;
-
-        // extract neighbor rich points by index
-        std::vector<Rich_point> neighbor_rich_points(v.neighbors.size());
-        for (unsigned int n = 0; n < v.neighbors.size(); ++n)
-        {
-          neighbor_rich_points[n] = rich_point_set[v.neighbors[n]];
-        }
-
-        // select base point 
-        unsigned int base_index = 0;
-        FT density2 = upsample_internal::
-                              base_point_selection(v,
-                                                   neighbor_rich_points,
-                                                   edge_sensitivity,
-                                                   base_index);
-
-        // test if it pass the density threshold
-        if (density2 < density_pass_threshold2)
-        {
-          is_pass_threshold[i] = true;
-          continue;
-        }
-        count_not_pass++;
-
-        sum_density += density2;
-        count_density++;
-
-        // insert a new rich point
-        unsigned int father_index = v.index;
-        unsigned int mother_index = base_index;
-
-        Rich_point new_v;
-        Rich_point& base = rich_point_set[mother_index];
-        Vector diff_v_base = base.pt - v.pt;
-        new_v.pt = v.pt + (diff_v_base * FT(0.5));
-        new_v.index = rich_point_set.size();
-
-        unsigned int new_point_index = new_v.index;
-        rich_point_set.push_back(new_v);
-        is_pass_threshold.push_back(false);
-
-        //update new rich point
-        upsample_internal::update_new_point(new_point_index, 
-                                            father_index, 
-                                            mother_index, 
-                                            rich_point_set, 
-                                            current_radius,
-                                            sharpness_bandwidth);
-
-        if (rich_point_set.size() >= number_of_output_points)
-        {
-          break;
-        }
-      }
-   #ifdef CGAL_PSP3_VERBOSE
-      std::cout << "current size: " << rich_point_set.size() << std::endl;
-   #endif
-      if (count_not_pass == 0 || 
-          loop >= max_loop_time || 
-          rich_point_set.size() >= number_of_output_points)
-      {
-        break;
-      }
-
-    }
-
-    if (rich_point_set.size() >= number_of_output_points)
-    {
-      break;
-    }
-  }
-
-  for (unsigned int i = number_of_input; i < rich_point_set.size(); ++i)
-  {
-    Rich_point& v = rich_point_set[i];
-    Point point = v.pt;
-    Vector normal = v.normal;
-    *output++ = std::make_pair(point, normal);
-  }
- 
-  return output;
-}
-
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename OutputIterator,
-          typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap>
-OutputIterator
-edge_aware_upsample_point_set(
-  ForwardIterator first,    ///< forward iterator to the first input point.
-  ForwardIterator beyond,   ///< past-the-end iterator.
-  OutputIterator output, ///< output iterator over points.
-  PointPMap point_pmap, ///< property map: `ForwardIterator` -> Point_3.
-  NormalPMap normal_pmap, ///< property map: `ForwardIterator` -> Vector_3.
-  double sharpness_angle,  ///< control sharpness(0-90)
-  double edge_sensitivity,  ///< edge senstivity(0-5)
-  double neighbor_radius, ///< initial size of neighbors.
-  const unsigned int number_of_output_points///< number of iterations.   
-  )
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  return edge_aware_upsample_point_set(
-    first, beyond,
-    output,
-    point_pmap,
-    normal_pmap,
-    sharpness_angle, 
-    edge_sensitivity,
-    neighbor_radius, 
-    number_of_output_points,
-    Kernel());
-}
-/// @endcond
-
-
-/// @cond SKIP_IN_MANUAL
-template <typename OutputIterator,
-          typename ForwardIterator,
-          typename NormalPMap>
-OutputIterator
-edge_aware_upsample_point_set(
-  ForwardIterator first, ///< iterator over the first input point
-  ForwardIterator beyond, ///< past-the-end iterator
-  OutputIterator output, ///< output iterator over points.
-  NormalPMap normal_pmap, ///< property map:  OutputIterator -> Vector_3.
-  double sharpness_angle = 30,  ///< control sharpness(0-90)
-  double edge_sensitivity = 1,  ///< edge senstivity(0-5)
-  double neighbor_radius = -1, ///< initial size of neighbors.
-  const unsigned int number_of_output_points = 1000///< number of output points.     
-  )
-{
-  // just deduce value_type of OutputIterator
-  return edge_aware_upsample_point_set
-    <typename value_type_traits<OutputIterator>::type>(
-    first, beyond,
-    output,
-    normal_pmap,
-    sharpness_angle, 
-    edge_sensitivity,
-    neighbor_radius, 
-    number_of_output_points);
-}
-/// @endcond
-
-} //namespace CGAL
-
-#endif // CGAL_UPSAMPLE_POINT_SET_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/eigen.h b/3rdparty/CGAL-4.6/include/CGAL/eigen.h
deleted file mode 100644
index 92064d2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/eigen.h
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Bruno Levy, Pierre Alliez
-
-#ifndef CGAL_EIGEN_H
-#define CGAL_EIGEN_H
-
-#include <cmath>
-#include <CGAL/number_utils.h>
-
-namespace CGAL {
-
-namespace internal {
-
-template <class FT>
-void eigen_symmetric(const FT *mat, 
-                     const int n, 
-                     FT *eigen_vectors, 
-                     FT *eigen_values,
-                     const int MAX_ITER = 100) 
-{
-  static const FT EPSILON = (FT)0.00001;
-      
-  // number of entries in mat
-  int nn = (n*(n+1))/2;
-      
-  // copy matrix
-  FT *a = new FT[nn];
-  int ij;
-  for(ij=0; ij<nn; ij++) 
-    a[ij] = mat[ij];
-  // Fortran-porting
-  a--;
-      
-  // init diagonalization matrix as the unit matrix
-  FT *v = new FT[n*n];
-  ij = 0;
-  int i;
-  for(i=0; i<n; i++)
-    for(int j=0; j<n; j++) 
-      if(i==j)
-        v[ij++] = 1.0;
-      else
-        v[ij++] = 0.0;
-  // Fortran-porting
-  v--;
-      
-  // compute weight of the non diagonal terms 
-  ij = 1;
-  FT a_norm = 0.0;
-  for(i=1; i<=n; i++)
-    for(int j=1; j<=i; j++) 
-    {
-      if( i!=j ) 
-      {
-        FT a_ij = a[ij];
-        a_norm += a_ij * a_ij;
-      }
-      ij++;
-    }
-      
-  if(a_norm != 0.0) 
-  {
-    FT a_normEPS = a_norm * EPSILON;
-    FT thr = a_norm;
-  
-    // rotations
-    int nb_iter = 0;
-    while(thr > a_normEPS && nb_iter < MAX_ITER) 
-    {
-      nb_iter++;
-      FT thr_nn = thr / nn;
-          
-      for(int l=1; l< n; l++) 
-      {
-        for(int m=l+1; m<=n; m++) 
-        {
-          // compute sinx and cosx 
-          int lq = (l*l-l)/2;
-          int mq = (m*m-m)/2;
-          
-          int lm = l + mq;
-          FT a_lm = a[lm];
-          FT a_lm_2 = a_lm * a_lm;
-          
-          if(a_lm_2 < thr_nn)
-            continue;
-          
-          int ll   = l + lq;
-          int mm   = m + mq;
-          FT a_ll = a[ll];
-          FT a_mm = a[mm];
-          
-          FT delta = a_ll - a_mm;
-          
-          FT x;
-          if(delta == 0.0)
-            x = (FT) - CGAL_PI / 4; 
-          else 
-            x = (FT)(- std::atan( (a_lm+a_lm) / delta ) / 2.0);
-
-          FT sinx    = std::sin(x);
-          FT cosx    = std::cos(x);
-          FT sinx_2  = sinx * sinx;
-          FT cosx_2  = cosx * cosx;
-          FT sincos  = sinx * cosx;
-          
-          // rotate L and M columns 
-          int ilv = n*(l-1);
-          int imv = n*(m-1);
-          
-          int i;
-          for( i=1; i<=n;i++ ) 
-          {
-            if( (i!=l) && (i!=m) ) 
-            {
-              int iq = (i*i-i)/2;
-              
-              int im;
-              if( i<m )  
-                im = i + mq; 
-              else
-                im = m + iq;
-              FT a_im = a[im];
-              
-              int il;
-              if( i<l ) 
-                il = i + lq; 
-              else 
-                il = l + iq;
-              FT a_il = a[il];
-              
-              a[il] = a_il * cosx - a_im * sinx;
-              a[im] = a_il * sinx + a_im * cosx;
-            }
-            
-            ilv++;
-            imv++;
-            
-            FT v_ilv = v[ilv];
-            FT v_imv = v[imv];
-            
-            v[ilv] = cosx * v_ilv - sinx * v_imv;
-            v[imv] = sinx * v_ilv + cosx * v_imv;
-          } 
-          
-          x = a_lm * sincos; 
-          x += x;
-          
-          a[ll] =  a_ll * cosx_2 + a_mm * sinx_2 - x;
-          a[mm] =  a_ll * sinx_2 + a_mm * cosx_2 + x;
-          a[lm] =  0.0;
-          
-          thr = CGAL::abs(thr - a_lm_2);
-        }
-      }
-    }         
-  }
-      
-  // convert indices and copy eigen values 
-  a++;
-  for(i=0; i<n; i++) 
-  {
-    int k = i + (i*(i+1))/2;
-    eigen_values[i] = a[k];
-  }
-  delete [] a;
-      
-  // sort eigen values and vectors 
-  int *index = new int[n];
-  for(i=0; i<n; i++)
-    index[i] = i;
-      
-  for(i=0; i<(n-1); i++)
-  {
-    FT x = eigen_values[i];
-    int k = i;
-        
-    for(int j=i+1; j<n; j++) 
-      if(x < eigen_values[j]) 
-      {
-        k = j;
-        x = eigen_values[j];
-      }
-        
-    eigen_values[k] = eigen_values[i];
-    eigen_values[i] = x;
-      
-    int jj = index[k];
-    index[k] = index[i];
-    index[i] = jj;
-  }
-
-
-  // save eigen vectors 
-  v++; // back to C++
-  ij = 0;
-  for(int k=0; k<n; k++ ) 
-  {
-    int ik = index[k]*n;
-    for(int i=0; i<n; i++) 
-      eigen_vectors[ij++] = v[ik++];
-  }
-  
-  delete [] v;
-  delete [] index;
-}
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_EIGEN_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/eigen_2.h b/3rdparty/CGAL-4.6/include/CGAL/eigen_2.h
deleted file mode 100644
index 16bb3c6..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/eigen_2.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s) : Pierre Alliez
-
-#ifndef CGAL_EIGEN_2_H
-#define CGAL_EIGEN_2_H
-
-#include <cmath>
-#include <utility>
-#include <CGAL/assertions.h>
-
-namespace CGAL {
-
-namespace internal {
-
-  // extract eigenvalues and eigenvectors from a 2x2 symmetric
-  // positive definite matrix. 
-  // Note: computations involve a square root.
-  // Matrix numbering:
-  // a b
-  // b c 
-  // Eigen values and vectors are sorted in descendent order.
-  template <typename K>
-  void eigen_symmetric_2(const typename K::FT *matrix, // a b c
-                         std::pair<typename K::Vector_2,
-                                   typename K::Vector_2>& eigen_vectors,
-                         std::pair<typename K::FT,
-                                   typename K::FT>& eigen_values) 
-  {
-    // types
-    typedef typename K::FT FT;
-    typedef typename K::Vector_2 Vector;
-
-    // for better reading
-    FT a = matrix[0];
-    FT b = matrix[1];
-    FT c = matrix[2];
-    FT p = c*c - 2*a*c + 4*b*b + a*a;
-    CGAL_assertion(a >= 0.0 && c >= 0.0);
-
-    // degenerate or isotropic case
-    if(p == 0.0) 
-    {
-      // unit eigen values by default
-      eigen_values.first = eigen_values.second = (FT)1.0;
-
-      // any vector is eigen vector
-      // the 2D canonical frame is output by default
-      eigen_vectors.first  = Vector((FT)1.0,(FT)0.0);
-      eigen_vectors.second = Vector((FT)0.0,(FT)1.0);
-    }
-    else 
-    {
-      if(b == 0.0) 
-      {
-	if(a>=c) 
-	{
-	  eigen_values.first  = a;
-	  eigen_values.second = c;
-	  eigen_vectors.first  = Vector((FT)1.0, (FT)0.0);
-	  eigen_vectors.second  = Vector((FT)0.0, (FT)1.0);
-	}
-	else
-	{
-	  eigen_values.first  = c;
-	  eigen_values.second = a;
-	  eigen_vectors.first  = Vector((FT)0.0, (FT)1.0);
-	  eigen_vectors.second  = Vector((FT)1.0, (FT)0.0);
-	}
-      }
-      else // generic case
-      {
-        FT l1 = (FT)(0.5 * ( -1*std::sqrt(p) + c + a));
-        FT l2 = (FT)(0.5 * (    std::sqrt(p) + c + a));
-
-        // all eigen values of a symmetric positive
-        // definite matrix must be real and positive
-        // we saturate the values if this is not the 
-        // case for floating point computations.
-        l1 = (l1 < (FT)0.0) ? (FT)0.0 : l1;
-        l2 = (l2 < (FT)0.0) ? (FT)0.0 : l2;
-
-        // sort eigen values and vectors in descendent order.
-        if(l1 >= l2)
-        {
-          eigen_values.first  = l1;
-          eigen_values.second = l2;
-          eigen_vectors.first  = Vector((FT)1.0, (FT)(-(std::sqrt(p)-c+a) / (2*b)));
-          eigen_vectors.second = Vector((FT)1.0, (FT)( (std::sqrt(p)+c-a) / (2*b)));
-        }
-        else
-        {
-          eigen_values.first  = l2;
-          eigen_values.second = l1;
-          eigen_vectors.first  = Vector((FT)1.0, (FT)( (std::sqrt(p)+c-a) / (2*b)));
-          eigen_vectors.second = Vector((FT)1.0, (FT)(-(std::sqrt(p)-c+a) / (2*b)));
-        }
-      } // end generic case
-    } // end non-degenerate case
-  } // end eigen_symmetric_2
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_EIGEN_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/export/CORE.h b/3rdparty/CGAL-4.6/include/CGAL/export/CORE.h
deleted file mode 100644
index d077617..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/export/CORE.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Expr.h
- * Synopsis: a class of Expression in Level 3
- * 
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *       Vikram Sharma<sharma at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_CORE_EXPORT_H
-#define CGAL_CORE_EXPORT_H
-
-#include <CGAL/config.h>
-#include <CGAL/export/helpers.h>
-
-// If CGAL_EXPORTS is defined, one are building the CGAL library, and we do
-// not want artificial dll-imports of Core symbols (because of
-// auto-linking).
-#if ( ! defined(CGAL_EXPORTS) ) && defined(CGAL_BUILD_SHARED_LIBS)
-
-#  if defined(CGAL_Core_EXPORTS) // defined by CMake or in cpp files of the dll
-
-#    define CGAL_CORE_EXPORT CGAL_DLL_EXPORT
-#    define CGAL_CORE_EXPIMP_TEMPLATE
-
-#  else // not CGAL_Core_EXPORTS
-
-#    define CGAL_CORE_EXPORT CGAL_DLL_IMPORT
-#    define CGAL_CORE_EXPIMP_TEMPLATE extern
-
-#  endif // not CGAL_CORE_EXPORTS
-
-#else // not CGAL_BUILD_SHARED_LIBS
-
-#  define CGAL_CORE_EXPORT
-#  define CGAL_CORE_EXPIMP_TEMPLATE
-
-#endif // not CGAL_BUILD_SHARED_LIBS
-
-#endif //  CGAL_CORE_EXPORT_H
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/export/Qt4.h b/3rdparty/CGAL-4.6/include/CGAL/export/Qt4.h
deleted file mode 100644
index d8ae4fd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/export/Qt4.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#ifndef CGAL_QT4_EXPORT_H
-#define CGAL_QT4_EXPORT_H
-
-#include <CGAL/config.h>
-#include <CGAL/export/helpers.h>
-
-#if defined(CGAL_BUILD_SHARED_LIBS)
-
-#  if defined(CGAL_Qt4_EXPORTS) // defined by CMake or in cpp files of the dll
-
-#    define CGAL_QT4_EXPORT CGAL_DLL_EXPORT
-#    define CGAL_QT4_EXPIMP_TEMPLATE
-
-#  else // not CGAL_Qt4_EXPORTS
-
-#    define CGAL_QT4_EXPORT CGAL_DLL_IMPORT
-#    define CGAL_QT4_EXPIMP_TEMPLATE extern
-
-#  endif // not CGAL_QT4_EXPORTS
-
-#else // not CGAL_BUILD_SHARED_LIBS
-
-#  define CGAL_QT4_EXPORT
-#  define CGAL_QT4_EXPIMP_TEMPLATE
-
-#endif // not CGAL_BUILD_SHARED_LIBS
-
-#endif //  CGAL_QT4_EXPORT_H
-
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/export/helpers.h b/3rdparty/CGAL-4.6/include/CGAL/export/helpers.h
deleted file mode 100644
index 0c6bd9e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/export/helpers.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_EXPORT_HELPERS_H
-#define CGAL_EXPORT_HELPERS_H
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-#  define CGAL_DLL_IMPORT __declspec(dllimport)
-#  define CGAL_DLL_EXPORT __declspec(dllexport)
-#  define CGAL_DLL_LOCAL
-#else
-  #if __GNUC__ >= 4
-    #define CGAL_DLL_IMPORT __attribute__ ((visibility ("default")))
-    #define CGAL_DLL_EXPORT __attribute__ ((visibility ("default")))
-    #define CGAL_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
-  #else
-    #define CGAL_DLL_IMPORT
-    #define CGAL_DLL_EXPORT
-    #define CGAL_DLL_LOCAL
-  #endif
-#endif
-
-#endif // CGAL_EXPORT_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/extremal_polygon_2.h b/3rdparty/CGAL-4.6/include/CGAL/extremal_polygon_2.h
deleted file mode 100644
index 63962b3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/extremal_polygon_2.h
+++ /dev/null
@@ -1,752 +0,0 @@
-// Copyright (c) 1998-2003  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-
-#ifndef CGAL_EXTREMAL_POLYGON_2_H
-#define CGAL_EXTREMAL_POLYGON_2_H 1
-
-#include <CGAL/Optimisation/assertions.h>
-#include <CGAL/monotone_matrix_search.h>
-#include <CGAL/Dynamic_matrix.h>
-#include <CGAL/Transform_iterator.h>
-#include <CGAL/Polygon_2_algorithms.h>
-#include <vector>
-#include <functional>
-#include <algorithm>
-#include <CGAL/Extremal_polygon_traits_2.h>
-
-namespace CGAL {
-
-//!!! This will eventually be integrated into function_objects.h
-template < class Array, class Index, class Element >
-struct Index_operator
-: public std::binary_function< Array, Index, Element >
-{
-
-  Element&
-  operator()( Array& a, const Index& i) const
-  { return a[i]; }
-
-  const Element&
-  operator()( const Array& a, const Index& i) const
-  { return a[i]; }
-};
-
-template < class RandomAccessIC_object_,
-           class RandomAccessIC_value_,
-           class Operation_ >
-// This class describes the kind of matrices used for the
-// computation of extremal polygons.
-//
-// RandomAccessIC_object is a random access iterator or circulator
-//   with value type Object
-// RandomAccessIC_value is a random access iterator or circulator
-//   with value type Value
-// Operation is an adatable binary function:
-//   Object x Object -> Value
-//
-// objects can be constructed using the helper function
-// extremal_polygon_matrix.
-//
-class Extremal_polygon_matrix {
-public:
-  typedef RandomAccessIC_object_ RandomAccessIC_object;
-  typedef RandomAccessIC_value_  RandomAccessIC_value;
-  typedef Operation_             Operation;
-
-  typedef typename
-    std::iterator_traits< RandomAccessIC_object >::value_type
-  Object;
-  typedef typename
-    std::iterator_traits< RandomAccessIC_value >::value_type
-  Value;
-
-  Extremal_polygon_matrix(
-    RandomAccessIC_object begin_row,
-    RandomAccessIC_object end_row,
-    RandomAccessIC_object begin_col,
-    RandomAccessIC_object end_col,
-    RandomAccessIC_value  begin_value,
-    RandomAccessIC_value  CGAL_optimisation_precondition_code(end_value),
-    const Operation&      o)
-  // initialization with two ranges [begin_row, end_row) and
-  // [begin_col, end_col) of Objects, a range [begin_value, end_value)
-  // of Values and an Operation o.
-  //
-  // an entry (r, c) of this matrix is then defined as:
-  //   begin_value[c] + op( begin_row[r], begin_col[c]).
-  //
-  : op( o),
-    begin_row_( begin_row),
-    begin_col_( begin_col),
-    begin_value_( begin_value),
-    n_rows( static_cast<int>(iterator_distance( begin_row, end_row))),
-    n_cols( static_cast<int>(iterator_distance( begin_col, end_col)))
-  {
-    CGAL_optimisation_precondition(
-      iterator_distance( begin_value, end_value) == n_cols);
-    CGAL_optimisation_assertion( n_rows > 0 && n_cols > 0);
-  }
-
-  int
-  number_of_rows() const
-  { return n_rows; }
-
-  int
-  number_of_columns() const
-  { return n_cols; }
-
-  Value
-  operator()( int r, int c) const
-  {
-    CGAL_optimisation_precondition( r >= 0 && r < n_rows);
-    CGAL_optimisation_precondition( c >= 0 && c < n_cols);
-    return begin_value_[c] + op( begin_row_[r], begin_col_[c]);
-  }
-
-private:
-  Operation              op;
-  RandomAccessIC_object  begin_row_;
-  RandomAccessIC_object  begin_col_;
-  RandomAccessIC_value   begin_value_;
-  int                    n_rows;
-  int                    n_cols;
-};
-
-template < class RandomAccessIC_object,
-           class RandomAccessIC_value,
-           class Operation >
-inline
-Extremal_polygon_matrix< RandomAccessIC_object,
-                         RandomAccessIC_value,
-                         Operation >
-extremal_polygon_matrix(
-  RandomAccessIC_object begin_row,
-  RandomAccessIC_object end_row,
-  RandomAccessIC_object begin_col,
-  RandomAccessIC_object end_col,
-  RandomAccessIC_value  begin_value,
-  RandomAccessIC_value  end_value,
-  const Operation&      o)
-{
-  return Extremal_polygon_matrix< RandomAccessIC_object,
-                                  RandomAccessIC_value,
-                                  Operation >
-  ( begin_row, end_row,
-    begin_col, end_col,
-    begin_value, end_value,
-    o);
-}
-
-
-template < class RandomAccessIC, class Outputiterator, class Traits >
-Outputiterator
-CGAL_maximum_inscribed_rooted_k_gon_2(
-  RandomAccessIC points_begin,
-  RandomAccessIC points_end,
-  int k,
-  typename Traits::FT& max_area,
-  Outputiterator o,
-  const Traits& t)
-//
-// preconditions:
-// --------------
-//  * Traits fulfills the requirements for an extremal polygon
-//    traits class
-//  * the range [points_begin, points_end) of size n > 0
-//    describes the vertices of a convex polygon $P$
-//    enumerated clock- or counterclockwise
-// n > k,
-//  * k >= t.min_k()
-//  * value_type of RandomAccessIC is Traits::Point_2
-//  * OutputIterator accepts Traits::Point_2 as value_type 
-//
-// functionality:
-// --------------
-// computes maximum (as specified by t) inscribed k-gon $P_k$
-// of the polygon $P$,
-// that is rooted at points_begin[0],
-// sets max_area to its associated value (as specified by t)
-// writes the indices (relative to points_begin)
-// of $P_k$'s vertices to o and
-// returns the past-the-end iterator of that sequence.
-{
-  // check preconditions:
-  CGAL_optimisation_precondition( k >= t.min_k());
-  int number_of_points(
-                       static_cast<int>(iterator_distance( points_begin, 
-                                                           points_end)));
-  CGAL_optimisation_precondition( number_of_points > k);
-
-  typedef std::vector< int > Index_cont;
-
-  if ( k == t.min_k())
-    // compute min_k gon:
-    return t.compute_min_k_gon(
-      points_begin, points_end, max_area, o);
-
-  // current i-gon (i = 2/3...k)
-  Index_cont gon( k + 1);
-
-  // compute initial min_k-gon:
-  int i( t.min_k());
-  t.compute_min_k_gon(
-    points_begin, points_end, max_area, gon.rbegin() + k + 1 - i);
-  
-  for (;;) {
-    CGAL_optimisation_assertion( gon[0] == 0);
-    gon[i] = number_of_points - 1;
-    if ( ++i >= k)
-      break;
-    CGAL_maximum_inscribed_rooted_k_gon_2(
-      points_begin,
-      points_end,
-      0,
-      gon.begin(),
-      gon.begin() + i - 1,
-      gon.begin() + 1,
-      gon.begin() + i,
-      max_area,
-      gon.rbegin() + k + 1 - i,
-      t);
-  } // for (;;)
-  
-  return CGAL_maximum_inscribed_rooted_k_gon_2(
-    points_begin,
-    points_end,
-    0,
-    gon.begin(),
-    gon.begin() + k - 1,
-    gon.begin() + 1,
-    gon.begin() + k,
-    max_area,
-    o,
-    t);
-
-} // CGAL_maximum_inscribed_rooted_k_gon_2( ... )
-template < class RandomAccessIC_point,
-           class RandomAccessIC_int,
-           class OutputIterator,
-           class Traits >
-OutputIterator
-CGAL_maximum_inscribed_rooted_k_gon_2(
-  RandomAccessIC_point points_begin,
-  RandomAccessIC_point points_end,
-  int root,
-  RandomAccessIC_int left_c_begin,
-  RandomAccessIC_int CGAL_optimisation_precondition_code(left_c_end),
-  RandomAccessIC_int right_c_begin,
-  RandomAccessIC_int right_c_end,
-  typename Traits::FT& max_area,
-  OutputIterator o,
-  const Traits& t)
-//
-// preconditions:
-// --------------
-//  * Traits fulfills the requirements for an extremal polygon
-//    traits class
-//  * the range [points_begin, points_end) of size n > 0
-//    describes the vertices of a convex polygon $P$
-//    enumerated clock- or counterclockwise
-//  * value_type of RandomAccessIC_point is Traits::Point
-//  * value_type of RandomAccessIC_int is int
-//  * OutputIterator accepts int as value type
-//  * length := right_c_end - right_c_begin == left_c_end - left_c_begin
-//    >= t.min_k() - 1 (the root is already fixed)
-//  * [left_c_begin, left_c_end) resp. [right_c_begin, right_c_end)
-//    describe two subpolygons of $P$ by giving the indices of its
-//    vertices relative to points_begin and for any 0 <= i < length:
-//    left_c_begin[i] <= right_c_begin[i]
-//  * for any 0 <= i < length: o + i must not be contained in
-//    the range [right_c_begin, right_c_begin + length - i - 2].
-//    (NOT checked!)
-//
-// functionality:
-// --------------
-// computes maximum (as specified by t) inscribed k-gon $P_k$
-// of the polygon $P$,
-// that is rooted at points_begin[left_c_begin[0]]
-// such that for any 0 <= i < length:
-//    left_c_begin[i] <= vertex i of $P_k$ <= right_c_begin[i],
-// sets max_area to its associated value (as specified by t),
-// writes the indices (relative to points_begin)
-// of $P_k$'s vertices to o and
-// returns the past-the-end iterator of that sequence.
-{
-  using std::max_element;
-
-  // counter :)
-  int i;
-
-  // compute size of ranges:
-  int number_of_points = static_cast<int>(iterator_distance( points_begin, 
-                                                             points_end));
-  int size_of_gon = static_cast<int>(iterator_distance( right_c_begin,
-                                                        right_c_end));
-
-  // check preconditions:
-  CGAL_optimisation_precondition( number_of_points > t.min_k());
-  CGAL_optimisation_precondition( size_of_gon >= t.min_k() - 1);
-  CGAL_optimisation_precondition(
-    iterator_distance( left_c_begin, left_c_end) ==
-    iterator_distance( right_c_begin, right_c_end));
-  CGAL_optimisation_precondition( left_c_begin[0] >= 0);
-  CGAL_optimisation_precondition( right_c_begin[0] >= 0);
-  CGAL_optimisation_precondition(
-    left_c_begin[size_of_gon-1] < number_of_points);
-  CGAL_optimisation_precondition(
-    right_c_begin[size_of_gon-1] < number_of_points);
-  CGAL_optimisation_expensive_precondition_code(
-    for ( i = 0; i < size_of_gon; ++i) {
-      CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0);
-      CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0);
-      CGAL_optimisation_expensive_precondition(
-        left_c_begin[i] < number_of_points);
-      CGAL_optimisation_expensive_precondition(
-        right_c_begin[i] < number_of_points);
-      CGAL_optimisation_expensive_precondition(
-        left_c_begin[i] <= right_c_begin[i]);
-    })
-
-  typedef typename Traits::FT               FT;
-  typedef std::vector< FT >                 FT_cont;
-  typedef std::vector< int >                Index_cont;
-  typedef typename Traits::Operation        Operation;
-  //!!! static ???
-  // area container:
-  FT_cont area( number_of_points);
-  
-  // last vertex container:
-  Index_cont last_vertex( number_of_points);
-  
-  // matrix operation:
-  Operation op( t.operation( points_begin[root]));
-  // initialize area and last vertex containers:
-  for ( i = left_c_begin[0]; i <= right_c_begin[0]; ++i) {
-    area[i] = t.init( points_begin[i], points_begin[root]);
-    last_vertex[i] = root;
-  }
-  
-  
-  for ( i = 1; i < size_of_gon; ++i) {
-  
-    monotone_matrix_search(
-      dynamic_matrix(
-        extremal_polygon_matrix(
-          points_begin + left_c_begin[i],
-          points_begin + right_c_begin[i] + 1,
-          points_begin + left_c_begin[i-1],
-          points_begin + right_c_begin[i-1] + 1,
-          area.begin() + left_c_begin[i-1],
-          area.begin() + right_c_begin[i-1] + 1,
-          op)),
-          last_vertex.begin() + left_c_begin[i]);
-  
-    // compute new area values and adjust last_vertex values
-    // (they are relative to left_c_begin[i-1] now)
-    int j;
-    for ( j = right_c_begin[i]; j >= left_c_begin[i]; --j) {
-      last_vertex[j] += left_c_begin[i-1];
-      area[j] = area[last_vertex[j]] +
-        op( points_begin[j], points_begin[last_vertex[j]]);
-    }
-  
-  } // for ( i = 1; i < size_of_gon; ++i)
-  
-  // find maximum in last range:
-  int maxi =
-    static_cast<int>(iterator_distance(
-      area.begin(),
-      max_element( area.begin() + left_c_begin[size_of_gon - 1],
-                   area.begin() + right_c_begin[size_of_gon - 1] + 1)));
-  // set max_area:
-  max_area = area[maxi];
-  
-  // construct gon:
-  *o++ = maxi;
-  maxi = last_vertex[maxi];
-  for ( i = size_of_gon - 1; i > 0; --i) {
-    // We must not place the "*o++ = maxi" here,
-    // since o might be the same as left_c_begin + i ...
-    if ( maxi != right_c_begin[i-1]) {
-      *o++ = maxi;
-      maxi = last_vertex[maxi];
-    }
-    else {
-      *o++ = maxi;
-      maxi = right_c_begin[i-2];
-    }
-  } // for ( i = size_of_gon - 1; i > 0; --i)
-  
-  *o++ = root;
-  return o;
-  
-
-} // CGAL_maximum_inscribed_rooted_k_gon_2( p, k, result)
-
-
-template < class RandomAccessIC,
-           class OutputIterator,
-           class Traits >
-inline
-OutputIterator
-extremal_polygon_2(
-  RandomAccessIC points_begin,
-  RandomAccessIC points_end,
-  int k,
-  OutputIterator o,
-  const Traits& t)
-//
-// preconditions:
-// --------------
-//  * Traits fulfills the requirements for an extremal polygon
-//    traits class
-//  * the range [points_begin, points_end) of size n > 0
-//    describes the vertices of a convex polygon $P$
-//    enumerated clock- or counterclockwise
-//  * k >= t.min_k()
-//  * value_type of RandomAccessIC is Traits::Point_2
-//  * OutputIterator accepts Traits::Point_2 as value_type 
-//
-// functionality:
-// --------------
-// computes maximum (as specified by t) inscribed k-gon $P_k$
-// of the polygon $P$,
-// writes the indices (relative to points_begin)
-// of $P_k$'s vertices to o and
-// returns the past-the-end iterator of that sequence.
-{
-  using std::bind1st;
-
-  // check preconditions:
-  CGAL_optimisation_precondition_code(
-    int number_of_points(
-                         static_cast<int>(iterator_distance( points_begin, 
-                                                             points_end)));)
-  CGAL_optimisation_precondition( number_of_points >= t.min_k());
-  CGAL_optimisation_expensive_precondition(
-    is_convex_2( points_begin, points_end, t));
-
-  typedef typename Traits::Point_2 Point_2;
-  return CGAL_maximum_inscribed_k_gon_2(
-    points_begin,
-    points_end,
-    k,
-    transform_iterator(
-      o,
-      bind1st(
-        Index_operator< RandomAccessIC, int, Point_2 >(),
-        points_begin)),
-    t);
-}
-
-// backwards compatibility
-template < class RandomAccessIC,
-           class OutputIterator,
-           class Traits >
-inline
-OutputIterator
-extremal_polygon(
-  RandomAccessIC points_begin,
-  RandomAccessIC points_end,
-  int k,
-  OutputIterator o,
-  const Traits& t)
-{ return extremal_polygon_2(points_begin, points_end, k, o, t); }
-template < class RandomAccessIC,
-           class OutputIterator,
-           class Traits >
-OutputIterator
-CGAL_maximum_inscribed_k_gon_2(
-  RandomAccessIC points_begin,
-  RandomAccessIC points_end,
-  int k,
-  OutputIterator o,
-  const Traits& t)
-//
-// preconditions:
-// --------------
-//  * Traits fulfills the requirements for an extremal polygon
-//    traits class
-//  * the range [points_begin, points_end) of size n > 0
-//    describes the vertices of a convex polygon $P$
-//    enumerated clock- or counterclockwise
-//  * k >= t.min_k()
-//  * value_type of RandomAccessIC is Traits::Point_2
-//  * OutputIterator accepts Traits::Point_2 as value_type 
-//
-// functionality:
-// --------------
-// computes maximum (as specified by t) inscribed k-gon $P_k$
-// of the polygon $P$,
-// writes the indices (relative to points_begin)
-// of $P_k$'s vertices to o and
-// returns the past-the-end iterator of that sequence.
-{
-  // check preconditions:
-  CGAL_optimisation_precondition( k >= t.min_k());
-  int number_of_points(
-                       static_cast<int>(iterator_distance( points_begin, 
-                                                           points_end)));
-  CGAL_optimisation_precondition( number_of_points > 0);
-
-  using std::copy;
-
-  typedef typename Traits::FT   FT;
-  typedef std::vector< int >    Index_cont;
-
-  if ( number_of_points <= k) {
-    for ( int j( k - 1); j >= 0; --j)
-      *o++ = (std::min)( j, number_of_points - 1);
-    return o;
-  }
-  // compute k-gon rooted at points_begin[0]
-  Index_cont P_0( k + 1);
-  FT area_0;
-  CGAL_maximum_inscribed_rooted_k_gon_2(
-    points_begin,
-    points_end,
-    k,
-    area_0,
-    P_0.rbegin() + 1,
-    t);
-  P_0[k] = number_of_points - 1;
-  CGAL_optimisation_assertion( P_0[0] == 0);
-  // compute k-gon rooted at points_begin[P_0[1]]
-  Index_cont P_1( k);
-  FT area_1;
-  
-  CGAL_maximum_inscribed_rooted_k_gon_2(
-    points_begin,
-    points_end,
-    P_0[1],
-    P_0.begin() + 1,
-    P_0.begin() + k,
-    P_0.begin() + 2,
-    P_0.begin() + k + 1,
-    area_1,
-    P_1.rbegin(),
-    t);
-  
-  CGAL_optimisation_assertion( P_1[0] == P_0[1]);
-  
-  
-  // start recursive computation:
-  FT area_r( 0);
-  Index_cont P_r( k);
-  if ( P_0[1] - P_0[0] > 1) {
-    CGAL_maximum_inscribed_k_gon_2(
-      points_begin,
-      points_end,
-      P_0[0] + 1,
-      P_0[1] - 1,
-      P_0.begin() + 1,
-      P_0.begin() + k,
-      P_0.begin() + 2,
-      P_0.begin() + k + 1,
-      k,
-      area_r,
-      P_r.rbegin(),
-      t);
-  }
-  
-  if ( area_r > area_0)
-    if ( area_r > area_1)
-      // recursive is maximum
-      copy( P_r.begin(), P_r.end(), o);
-    else
-      // P_1 is maximum
-      copy( P_1.begin(), P_1.end(), o);
-  else if ( area_0 > area_1)
-    // P_0 is maximum
-    copy( P_0.begin(), P_0.begin() + k, o);
-  else
-    // P_1 is maximum
-    copy( P_1.begin(), P_1.end(), o);
-
-  return o;
-} // CGAL_maximum_inscribed_k_gon_2( ... )
-template < class RandomAccessIC_point,
-           class RandomAccessIC_int,
-           class OutputIterator,
-           class Traits >
-OutputIterator
-CGAL_maximum_inscribed_k_gon_2(
-  RandomAccessIC_point points_begin,
-  RandomAccessIC_point points_end,
-  int left_index,
-  int right_index,
-  RandomAccessIC_int left_c_begin,
-  RandomAccessIC_int left_c_end,
-  RandomAccessIC_int right_c_begin,
-  RandomAccessIC_int right_c_end,
-  int k,
-  typename Traits::FT& max_area,
-  OutputIterator o,
-  const Traits& t)
-//
-// preconditions:
-// --------------
-//  * Traits fulfills the requirements for an extremal polygon
-//    traits class
-//  * the range [points_begin, points_end) of size n > 0
-//    describes the vertices of a convex polygon $P$
-//    enumerated clock- or counterclockwise
-//  * value_type of RandomAccessIC_point is Traits::Point
-//  * value_type of RandomAccessIC_int is int
-//  * OutputIterator accepts int as value type
-//  * 0 <= left_index <= right_index < |points_end - points_begin|
-//  * |left_c_end - left_c_begin| == |right_c_end - right_c_begin| == k - 1
-//  * [left_c_begin, left_c_end) resp. [right_c_begin, right_c_end)
-//    describe two subpolygons $P_l$ resp $P_r$ of $P$ by giving
-//    the indices of its vertices relative to points_begin and
-//    for any 0 <= i < k - 1:
-//      left_c_begin[i] <= right_c_begin[i]
-//  * k >= t.min_k()
-//
-// functionality:
-// --------------
-// computes maximum (as specified by t) inscribed k-gon $P_k$
-// of the polygon $P$,
-//  * that is rooted at one of the vertices [points_begin[left_index],
-//    points_begin[right_index]] and
-//  * interleaves with both $P_l$ and $P_r$,
-// sets max_area to its associated value (as specified by t),
-// writes the indices (relative to points_begin)
-// of $P_k$'s vertices to o and
-// returns the past-the-end iterator of that sequence.
-{
-  // typedefs
-  typedef typename Traits::FT               FT;
-  typedef std::vector< int >        Index_cont;
-
-  using std::copy;
-
-  // check preconditions:
-  CGAL_optimisation_precondition( k >= t.min_k());
-  CGAL_optimisation_precondition( left_index <= right_index);
-  CGAL_optimisation_precondition( left_index >= 0);
-  CGAL_optimisation_precondition( right_index >= 0);
-  CGAL_optimisation_precondition_code(
-    int number_of_points(
-                         static_cast<int>(iterator_distance( points_begin, 
-                                                             points_end)));)
-  CGAL_optimisation_precondition( left_index < number_of_points);
-  CGAL_optimisation_precondition( right_index < number_of_points);
-  CGAL_optimisation_precondition(
-    iterator_distance( left_c_begin, left_c_end) == k - 1);
-  CGAL_optimisation_precondition(
-    iterator_distance( right_c_begin, right_c_end) == k - 1);
-  CGAL_optimisation_expensive_precondition_code(
-    for ( int i( 0); i < k - 1; ++i) {
-      CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0);
-      CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0);
-      CGAL_optimisation_expensive_precondition(
-        left_c_begin[i] < number_of_points);
-      CGAL_optimisation_expensive_precondition(
-        right_c_begin[i] < number_of_points);
-      CGAL_optimisation_expensive_precondition(
-        left_c_begin[i] <= right_c_begin[i]);
-    })
-
-
-  int middle_index( (left_index + right_index) >> 1);
-  Index_cont P_m( k);
-  FT area_middle;
-  CGAL_maximum_inscribed_rooted_k_gon_2(
-    points_begin,
-    points_end,
-    middle_index,
-    left_c_begin,
-    left_c_end,
-    right_c_begin,
-    right_c_end,
-    area_middle,
-    P_m.rbegin(),
-    t);
-  CGAL_optimisation_assertion( P_m[0] == middle_index);
-  // left recursive branch:
-  FT area_left( 0);
-  Index_cont P_l( k);
-  if ( left_index < middle_index) {
-    CGAL_maximum_inscribed_k_gon_2(
-      points_begin,
-      points_end,
-      left_index,
-      middle_index - 1,
-      left_c_begin,
-      left_c_end,
-      P_m.begin() + 1,
-      P_m.end(),
-      k,
-      area_left,
-      P_l.rbegin(),
-      t);
-  } // if ( left_index < middle_index)
-  
-  
-  // right recursive branch:
-  FT area_right( 0);
-  Index_cont P_r( k);
-  if ( right_index > middle_index) {
-    CGAL_maximum_inscribed_k_gon_2(
-      points_begin,
-      points_end,
-      middle_index + 1,
-      right_index,
-      P_m.begin() + 1,
-      P_m.end(),
-      right_c_begin,
-      right_c_end,
-      k,
-      area_right,
-      P_r.rbegin(),
-      t);
-  } // if ( right_index > middle_index)
-  
-  
-
-  if ( area_left > area_right)
-    if ( area_left > area_middle) {
-      // left is maximum
-      max_area = area_left;
-      copy( P_l.begin(), P_l.end(), o);
-    }
-    else {
-      // middle is maximum
-      max_area = area_middle;
-      copy( P_m.begin(), P_m.end(), o);
-    }
-  else if ( area_right > area_middle) {
-    // right is maximum
-    max_area = area_right;
-    copy( P_r.begin(), P_r.end(), o);
-  }
-  else {
-    // middle is maximum
-    max_area = area_middle;
-    copy( P_m.begin(), P_m.end(), o);
-  }
-
-  return o;
-} // CGAL_maximum_inscribed_k_gon_2( ... )
-
-} //namespace CGAL
-
-#endif // ! (CGAL_EXTREMAL_POLYGON_2_H)
diff --git a/3rdparty/CGAL-4.6/include/CGAL/exude_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/exude_mesh_3.h
deleted file mode 100644
index de3eecf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/exude_mesh_3.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : exude_mesh_3 function definition.
-//******************************************************************************
-
-#ifndef CGAL_EXUDE_MESH_3_H
-#define CGAL_EXUDE_MESH_3_H
-
-#include <CGAL/Mesh_3/sliver_criteria.h>
-#include <CGAL/Mesh_3/Slivers_exuder.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/parameters_defaults.h>
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <boost/parameter.hpp>
-
-namespace CGAL {
-
-BOOST_PARAMETER_FUNCTION(
-  (Mesh_optimization_return_code),
-  exude_mesh_3,
-  parameters::tag,
-  (required (in_out(c3t3),*) )
-  (optional
-    (time_limit_, *, 0 )
-    (sliver_bound_, *, parameters::default_values::exude_sliver_bound )
-  )
-)
-{
-  return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_);
-}
-
-
-
-template <typename C3T3>
-Mesh_optimization_return_code
-exude_mesh_3_impl(C3T3& c3t3,
-                  const double time_limit,
-                  const double sliver_bound)
-{
-  typedef typename C3T3::Triangulation Tr;
-  typedef Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
-  //typedef Mesh_3::Radius_radio_criterion<Tr> Sc;
-  typedef typename Mesh_3::Slivers_exuder<C3T3, Sc> Exuder;
-  
-  // Create exuder
-  Sc criterion(sliver_bound, c3t3.triangulation());
-  Exuder exuder(c3t3, criterion);
-
-  // Set time_limit
-  exuder.set_time_limit(time_limit);
-  
-  // Launch exudation
-  return exuder();
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_EXUDE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/generators.h b/3rdparty/CGAL-4.6/include/CGAL/generators.h
deleted file mode 100644
index 3e38f59..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/generators.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
-
-#ifndef CGAL_GENERATORS_H
-#define CGAL_GENERATORS_H 1
-
-#include <CGAL/basic.h>
-#include <cstddef>
-#include <cmath>
-#include <iterator>
-#include <algorithm>
-#include <CGAL/function_objects.h>
-#include <CGAL/Random.h>
-
-namespace CGAL {
-template < class T >
-class Generator_base {
-protected:
-    T       d_item;
-    double  d_range;
-public:
-    typedef std::input_iterator_tag iterator_category;
-    typedef T                       value_type;
-    typedef std::ptrdiff_t          difference_type;
-    typedef const T*                pointer;
-    typedef const T&                reference;
-    typedef Generator_base<T>      This;
-
-    Generator_base() {}
-    Generator_base( double range) : d_range( range) {}
-    Generator_base( const T& item, double range)
-        : d_item(item), d_range(range) {}
-
-    bool operator==( const This& base) const {
-        return ( d_item == base.d_item);
-    }
-    bool operator!=( const This& base) const { return ! operator==(base);}
-    double    range()      const { return d_range; }
-    reference operator*()  const { return d_item; }
-    pointer   operator->() const { return & operator*(); }
-};
-
-template < class T >
-class Random_generator_base : public Generator_base<T> {
-protected:
-    Random& _rnd;
-public:
-    typedef  Random_generator_base<T> This;
-
-    Random_generator_base() : _rnd( default_random) {}
-    Random_generator_base( double range, Random& rnd)
-        : Generator_base<T>( range), _rnd( rnd) {}
-    Random_generator_base( const T& item, double range, Random& rnd)
-        : Generator_base<T>( item, range), _rnd( rnd) {}
-    bool operator==( const This& rb) const {
-        return ( _rnd == rb._rnd && Generator_base<T>::operator==(rb));
-    }
-    bool operator!=( const This& rb) const { return ! operator==(rb); }
-};
-
-class Random_double_in_interval : public Random_generator_base<double> {
-
- public:
-  typedef Random_double_in_interval This;
-  Random_double_in_interval(double a = 1, Random& rnd = default_random)
-    // g is an input iterator creating points of type `P' uniformly
-    // distributed in the half-open square with side length a,
-    // centered around the origin, i.e. \forall p = `*g': -\frac{a}{2}
-    // <= p.x() < \frac{a}{2} and -\frac{a}{2} <= p.y() < \frac{a}{2}
-    // . Two random numbers are needed from `rnd' for each point.
-    : Random_generator_base<double>( a, rnd)
-    { 
-      this->d_item = this->d_range * (2 * this->_rnd.get_double() - 1.0);
-    }
-  
-  This& operator++() {
-    this->d_item = this->d_range * (2 * this->_rnd.get_double() - 1.0);
-    return *this;
-  }
-  This  operator++(int) {
-    This tmp = *this;
-    ++(*this);
-    return tmp;
-  }
-};
-
-} //namespace CGAL
-#endif // CGAL_GENERATORS_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/gl.h b/3rdparty/CGAL-4.6/include/CGAL/gl.h
deleted file mode 100644
index b15dad9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/gl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
-//  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-
-#ifndef CGAL_GL_H
-#define CGAL_GL_H
-
-#ifdef _MSC_VER
-#  include <wtypes.h>
-#  include <wingdi.h>
-#endif
-
-#ifdef __APPLE__
-#  include <OpenGL/gl.h>
-#else
-#  include <GL/gl.h>
-#endif
-
-#endif // CGAL_GL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Arrangement_2.h b/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Arrangement_2.h
deleted file mode 100644
index b9d4d17..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Arrangement_2.h
+++ /dev/null
@@ -1,606 +0,0 @@
-// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein <wein at post.tau.ac.il>
-//                 Efi Fogel <efif at post.tau.ac.il>
-
-#ifndef CGAL_BOOST_GRAPH_TRAITS_ARRANGEMENT_2_H
-#define CGAL_BOOST_GRAPH_TRAITS_ARRANGEMENT_2_H
-
-/*! \file
- * Definition of the specialized boost::graph_traits<Arrangement_2> class.
- */
-
-#include <boost/graph/graph_concepts.hpp>
-#include <boost/iterator/counting_iterator.hpp>
-#include <CGAL/Arrangement_on_surface_2.h>
-#include <CGAL/Arrangement_2.h>
-#include <CGAL/Arr_accessor.h>
-
-namespace boost {
-
-/*! \class
- * Specialization of the BGL graph-traits template, which serves as a (primal)
- * adapter for Arrangment_on_surface_2, where the valid arrangement vertices
- * correspond to graph verices and arrangement halfedges correspond to
- * arrangement edges.
- * Note that non-fictitious vertices at infinity are also considered as graph
- * vertices, as they have incident non-fictitious edges.
- * As halfedges are directed, we consider the graph as directed. We also allow
- * parallel edges, as two or more different arrangement edges (halfedge pairs)
- * may connect two adjacent vertices.
- */
-template <class GeomTraits, class TopTraits>
-class graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-{
-public:
-  
-  typedef GeomTraits                                 Geometry_traits_2;
-  typedef TopTraits                                  Topology_traits;
-  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
-                                                     Arrangement_on_surface_2;
-
-private:
-
-  typedef CGAL::Arr_accessor<Arrangement_on_surface_2>       Arr_accessor;
-  typedef typename Arrangement_on_surface_2::Vertex_handle   Vertex_handle;
-  typedef typename Arr_accessor::Valid_vertex_iterator       Vertex_iterator;
-  typedef typename Arrangement_on_surface_2::Halfedge_handle Halfedge_handle;
-  typedef typename Arrangement_on_surface_2::Halfedge_iterator
-                                                             Halfedge_iterator;
-  typedef typename Arrangement_on_surface_2::Halfedge_around_vertex_circulator
-                                             Halfedge_around_vertex_circulator;
-
-  /*! \struct
-   * Define the arrangement traversal category, which indicates the arrangement
-   * models the BidirectionalGraph concept as well as the VertexListGraph and
-   * EdgeListGraph concepts.
-   */
-  struct Arr_traversal_category : 
-    public virtual boost::bidirectional_graph_tag,   // This tag refines the
-                                                     // incidence_graph_tag.
-    public virtual boost::vertex_list_graph_tag,  // Can iterate over vertices.
-    public virtual boost::edge_list_graph_tag     // Can iterate over edges.
-  {};
-
-  /*! \class
-   * Iteratator over all outgoing halfedges around a given vertex., skipping
-   * fictitious halfedges.
-   * This is by adapting the Halfegde_around_vertex_circulator type to an
-   * iterator. Moreover, as the circulator goes over all ingoing halfedges
-   * of the vertex, the iterator adapter may return their twin halfedges, if
-   * we need the outgoing halfedges.  
-   */
-  class Halfedge_around_vertex_iterator
-  {
-  public:
-
-    // Type definitions:
-    typedef Halfedge_around_vertex_iterator       Self;
-
-    typedef std::forward_iterator_tag             iterator_category;
-    typedef Halfedge_handle                       value_type;
-    typedef value_type                            reference;
-    typedef value_type*                           pointer;
-    typedef int                                   difference_type;
-
-  protected:
-
-    Halfedge_around_vertex_circulator  _circ;     // The circulator.
-    bool                               _out;      // Do we need the out edges.
-    int                                _counter;  // Counter for the edges.
-    int                                _cend;     // The end counter.
-    Halfedge_handle                    _hh;       // The current halfedge.
-
-public:
-
-    /*! Default constructor. */
-    Halfedge_around_vertex_iterator () :
-      _counter(-1),
-      _cend(-1)
-    {}
-
-    /*!
-     * Constructor. 
-     * \param circ A ciruclator for the halfedges around a vertex.
-     * \param out_edges Do we need the outgoing or the ingoing halfedges.
-     * \param counter A counter associated with the iterator.
-     * \param cend The past-the-end counter value.
-     */
-    Halfedge_around_vertex_iterator (Halfedge_around_vertex_circulator circ,
-                                     bool out_edges,
-                                     int counter,
-                                     int cend) :
-      _circ (circ),
-      _out (out_edges),
-      _counter (counter),
-      _cend (cend)
-    {
-      if (_circ->is_fictitious() && _counter < _cend)
-        ++(*this);
-
-      if (out_edges)
-        _hh = _circ->twin();
-      else
-        _hh = _circ;
-    }
-
-    /*! Equality operators. */
-    bool operator== (const Self& it) const
-    {
-      return (_circ == it._circ && _out == it._out && _counter == it._counter);
-    }
-    
-    bool operator!= (const Self& it) const
-    {
-      return (_circ != it._circ || _out != it._out || _counter != it._counter);
-    }
-    
-    /*! Dereference operators. */
-    reference operator* () const
-    {
-      return _hh;
-    }
-
-    pointer operator-> () const
-    {
-      return &_hh;
-    }
-    
-    /* Increment operators. */
-    Self& operator++()
-    {
-      do
-      {
-        ++_circ;
-        ++_counter;
-        
-        if (_out)
-          _hh = _circ->twin();
-        else
-          _hh = _circ;
-
-      } while (_circ->is_fictitious() && _counter < _cend);
-
-      return (*this);
-    }
-
-    Self operator++ (int )
-    {
-      Self tmp = *this;
-      
-      do
-      {
-        ++_circ;
-        ++_counter;
-        
-        if (_out)
-          _hh = _circ->twin();
-        else
-          _hh = _circ;
-
-      } while (_circ->is_fictitious() && _counter < _cend);
-
-      return tmp;
-    }
-  };
-
-  // Data members:
-  Arrangement_on_surface_2    *p_arr;
-  Arr_accessor                 arr_access;
-
-public:
-
-  // Types required of the Graph concept:
-  typedef typename Arrangement_on_surface_2::Vertex_handle
-                                                        vertex_descriptor;
-  typedef boost::directed_tag                           directed_category;
-  typedef boost::allow_parallel_edge_tag                edge_parallel_category;
-
-  typedef Arr_traversal_category                        traversal_category;
-
-  // Types required by the IncidenceGraph concept:
-  typedef typename Arrangement_on_surface_2::Halfedge_handle
-                                                        edge_descriptor;
-  typedef Halfedge_around_vertex_iterator               out_edge_iterator;
-  typedef typename Arrangement_on_surface_2::Size       degree_size_type;
-
-  // Types required by the BidirectionalGraph concept:
-  typedef Halfedge_around_vertex_iterator               in_edge_iterator;
-
-  // Types required by the VertexListGraph concept:
-  typedef boost::counting_iterator<Vertex_iterator>     vertex_iterator;
-  typedef typename Arrangement_on_surface_2::Size       vertices_size_type;
-
-  // Types required by the EdgeListGraph concept:
-  typedef boost::counting_iterator<Halfedge_iterator>   edge_iterator;
-  typedef typename Arrangement_on_surface_2::Size       edges_size_type;
-
-  // Types not required by any of these concepts:
-  typedef void                                          adjacency_iterator;
-
-  /*! Constructor. */
-  graph_traits (const Arrangement_on_surface_2& arr) :
-    p_arr (const_cast<Arrangement_on_surface_2 *> (&arr)),
-    arr_access (const_cast<Arrangement_on_surface_2&> (arr))
-  {}
-
-  /*! Traverse the vertices. */
-  vertices_size_type number_of_vertices()
-  {
-    return arr_access.number_of_valid_vertices();
-  }
-
-  vertex_iterator vertices_begin()
-  {
-    return arr_access.valid_vertices_begin();
-  }
-
-  vertex_iterator vertices_end()
-  {
-    return arr_access.valid_vertices_end();
-  }
-
-  /*! Traverse the edges. */
-  edge_iterator edges_begin()
-  {
-    return p_arr->halfedges_begin();
-  }
-
-  edge_iterator edges_end()
-  {
-    return p_arr->halfedges_end();
-  }
-
-  /*! Get the vertex degree (in degree or out degree). */
-  degree_size_type degree (vertex_descriptor v)
-  {
-    if (v->is_isolated())
-      return 0;
-
-    Halfedge_around_vertex_circulator   first = v->incident_halfedges();
-    Halfedge_around_vertex_circulator   circ = first;
-    degree_size_type                    deg = 0;
-    
-    do
-    {
-      if (! circ->is_fictitious())
-        deg++;
-
-      ++circ;
-    } while (circ != first);
-
-    return deg;
-  }
-
-  /*! Traverse the outgoing halfedges of a given vertex. */
-  out_edge_iterator out_edges_begin (vertex_descriptor v)
-  {
-    if (v->is_isolated())
-      return out_edge_iterator();
-
-    return out_edge_iterator (v->incident_halfedges(), true, 0, static_cast<int>(v->degree()));
-  }
-
-  out_edge_iterator out_edges_end (vertex_descriptor v)
-  {
-    if (v->is_isolated())
-      return out_edge_iterator ();
-
-    const int  deg = static_cast<int>(v->degree());
-    return out_edge_iterator (v->incident_halfedges(), true, deg, deg);
-  }
-
-  /*! Traverse the ingoing halfedges of a given vertex. */
-  in_edge_iterator in_edges_begin (vertex_descriptor v)
-  {
-    if (v->is_isolated())
-      return in_edge_iterator();
-
-    return in_edge_iterator (v->incident_halfedges(), false, 0, v->degree());
-  }
-
-  in_edge_iterator in_edges_end (vertex_descriptor v)
-  {
-    if (v->is_isolated())
-      return in_edge_iterator ();
-
-    const int  deg = v->degree();
-    return in_edge_iterator (v->incident_halfedges(), false, deg, deg);
-  }
-};
-
-/*! \class
- * Specialization of the BGL graph-traits template, which serves as a (primal)
- * adapter for Arrangment_2, where the arrangement vertices correspond to graph
- * verices and arrangement halfedges correspond to arrangement edges.
- */
-template <class Traits_, class Dcel_>
-class graph_traits<CGAL::Arrangement_2<Traits_, Dcel_> > :
-    public graph_traits<CGAL::Arrangement_on_surface_2<
-      typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
-      typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> >
-{
-  typedef Traits_                                                     Traits_2;
-  typedef Dcel_                                                       Dcel;
-  typedef graph_traits<CGAL::Arrangement_on_surface_2<
-    typename CGAL::Arrangement_2<Traits_2, Dcel>::Geometry_traits_2,
-    typename CGAL::Arrangement_2<Traits_2, Dcel>::Topology_traits> >  Base;
-
-public:
-
-  /*! Constructor. */
-  graph_traits (const CGAL::Arrangement_2<Traits_2, Dcel>& arr) :
-    Base (arr)
-  {}
-};
-
-} // namespace boost
-
-namespace CGAL {
-
-// Functions required by the IncidenceGraph concept:
-// -------------------------------------------------
-
-/*!
- * Get the out-degree of a vertex in a given arrangement.
- * \param v The vertex.
- * \param arr The arrangement.
- * \param Number of outgoing halfedges from v.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                              degree_size_type
-out_degree (typename
-            boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                               TopTraits> >::
-                                                           vertex_descriptor v,
-            const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return gt_arr.degree (v);
-}
-
-/*!
- * Return a range of the out-edges of a vertex given by its descriptor and the
- * arrangement it belongs to.
- * \param v The vertex.
- * \param arr The arrangement.
- * \return A pair of out-edges iterators.
- */
-template <class GeomTraits, class TopTraits>
-std::pair<typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                         out_edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                         out_edge_iterator>
-out_edges (typename
-           boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                              TopTraits> >::
-                                                          vertex_descriptor v,
-           const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return std::make_pair (gt_arr.out_edges_begin (v), gt_arr.out_edges_end (v));
-}
-
-/*!
- * Get the source vertex of an arrangement edge.
- * \param e The edge.
- * \param arr The arrangement.
- * \return The source vertex of e.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                           vertex_descriptor
-source (typename
-        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                           TopTraits> >::
-                                                           edge_descriptor e,
-        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& /* arr */)
-{
-  return e->source();
-}
-
-/*!
- * Get the target vertex of an arrangement edge.
- * \param e The edge.
- * \param arr The arrangement.
- * \return The source vertex of e.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                           vertex_descriptor
-target (typename
-        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                           TopTraits> >::
-                                                           edge_descriptor e,
-        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& /* arr */)
-{
-  return e->target();
-}
-
-// Functions required by the BidirectionalGraph concept:
-// -----------------------------------------------------
-
-/*!
- * Get the in-degree of a vertex in a given arrangement.
- * \param v The vertex.
- * \param arr The arrangement.
- * \param Number of ingoing halfedges to v.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                           degree_size_type
-in_degree (typename
-           boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                              TopTraits> >::
-                                                           vertex_descriptor v,
-           const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return gt_arr.degree (v);
-}
-
-/*!
- * Return a range of the in-edges of a vertex given by its descriptor and the
- * arrangement it belongs to.
- * \param v The vertex.
- * \param arr The arrangement.
- * \return A pair of in-edges iterators.
- */
-template <class GeomTraits, class TopTraits>
-std::pair<typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             in_edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             in_edge_iterator>
-in_edges (typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                           vertex_descriptor v,
-          const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return std::make_pair (gt_arr.in_edges_begin (v), gt_arr.in_edges_end (v));
-}
-
-/*!
- * Get the degree of a vertex in a given arrangement.
- * \param v The vertex.
- * \param arr The arrangement.
- * \param Number of ingoing and outgoing halfedges incident to v.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                             degree_size_type
-degree (typename
-        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                           TopTraits> >::
-                                                           vertex_descriptor v,
-        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return (2 * gt_arr.degree (v));
-}
-
-// Functions required by the VertexListGraph concept:
-// --------------------------------------------------
-
-/*!
- * Get the number of vertices in the given arrangement. 
- * \param arr The arrangement.
- * \return Number of vertices.
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                            vertices_size_type
-num_vertices (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return gt_arr.number_of_vertices(); 
-}
-
-/*!
- * Get the range of vertices of the given arrangement.
- * \param arr The arrangement.
- * \return A pair of vertex iterators.
- */
-template <class GeomTraits, class TopTraits>
-std::pair<typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             vertex_iterator,
-          typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             vertex_iterator>
-vertices (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return std::make_pair (gt_arr.vertices_begin(), gt_arr.vertices_end());
-}
-
-// Functions required by the EdgeListGraph concept:
-// ------------------------------------------------
-
-/*!
- * Get the number of halfedges in the given arrangement. 
- * \param arr The arrangement.
- * \return Number of halfedges (graph edges).
- */
-template <class GeomTraits, class TopTraits>
-typename
-boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
-                                                               edges_size_type
-num_edges (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  return arr.number_of_halfedges(); 
-}
-
-/*!
- * Get the range of halfedges of the given arrangement.
- * \param arr The arrangement.
- * \return A pair of halfedge iterators.
- */
-template <class GeomTraits, class TopTraits>
-std::pair<typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
-                                                             TopTraits> >::
-                                                             edge_iterator>
-edges (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
-{
-  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
-    gt_arr (arr);
-
-  return std::make_pair (gt_arr.edges_begin(), gt_arr.edges_end());
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Dual_Arrangement_2.h b/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Dual_Arrangement_2.h
deleted file mode 100644
index 0fc0ca3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/graph_traits_Dual_Arrangement_2.h
+++ /dev/null
@@ -1,745 +0,0 @@
-// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
-//                 Ophir Setter <ophirset at post.tau.ac.il>
-
-#ifndef CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
-#define CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
-
-/*! \file
- * Definition of the specialized Dual<Arrangement_2> class,
- * and the specialized boost::graph_traits<Dual<Arrangement_2> >class.
- */
-
-#include <CGAL/Arrangement_on_surface_2.h>
-#include <CGAL/Arrangement_2.h>
-
-namespace CGAL {
-
-// Forward declaration.
-template <class Type> class Dual;
-
-/*! \class
- * Specilaization of the Dual<> template for Arrangement_on_surface_2.
- */
-template <class GeomTraits_, class TopTraits_>
-class Dual<Arrangement_on_surface_2<GeomTraits_,TopTraits_> >
-{
-public:
-  
-  typedef GeomTraits_                          Geometry_traits_2;
-  typedef TopTraits_                           Topology_traits;
-  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
-                                               Arrangement_on_surface_2;
-
-  typedef typename Arrangement_on_surface_2::Size              Size;
-  typedef typename Arrangement_on_surface_2::Face_handle       Vertex_handle;
-  typedef typename Arrangement_on_surface_2::Halfedge_handle   Edge_handle;
-
-  typedef typename Arrangement_on_surface_2::Face_iterator     Vertex_iterator;
-  typedef typename Arrangement_on_surface_2::Halfedge_iterator Edge_iterator;
-
-protected:
-
-  typedef typename Arrangement_on_surface_2::Face_handle       Face_handle;
-  typedef typename Arrangement_on_surface_2::Ccb_halfedge_circulator
-                                                      Ccb_halfedge_circulator;
-  typedef typename Arrangement_on_surface_2::Outer_ccb_iterator
-                                                      Outer_ccb_iterator;
-  typedef typename Arrangement_on_surface_2::Inner_ccb_iterator
-                                                      Inner_ccb_iterator;
-
-  /*! \class
-   * Iterator over the neighbors of a dual vertex (a face in the primal
-   * arrangement).
-   * These neighbors are the adjacent faces along the outer boundaries of the
-   * face and its inner boundaries.
-   */
-  class Face_neighbor_iterator
-  {
-    typedef Face_neighbor_iterator               Self;
-
-  public:
-
-    typedef std::forward_iterator_tag            iterator_category;
-    typedef Edge_handle                          value_type;
-    typedef value_type                           reference;
-    typedef value_type*                          pointer;
-    typedef int                                  difference_type;
-
-  private:
-
-    Outer_ccb_iterator       _outer_ccb_iter;
-    Inner_ccb_iterator       _inner_ccb_iter;
-    Ccb_halfedge_circulator  _ccb_curr;
-    Ccb_halfedge_circulator  _ccb_first;
-    Face_handle              _face;
-    bool                     _out;
-    Edge_handle              _hh;
-    bool                     _end;
-
-  public:
-
-    /*! Default constructor. */
-    Face_neighbor_iterator () :
-      _end (true)
-    {}
-
-    /*!
-     * Constructor.
-     * \param face The face (dual vertex).
-     * \param out_edges Do we need the outgoing or the ingoing halfedges.
-     * \param start Should we start traversing the edges.
-     *              If false, we construct a past-the-end iterator.
-     */
-    Face_neighbor_iterator (Face_handle face, 
-                            bool out_edges,
-                            bool start) :
-      _face (face),
-      _out (out_edges),
-      _end (! start)
-    {
-      CGAL_precondition (! face->is_fictitious());
-
-      if (start)
-      {
-        _outer_ccb_iter = _face->outer_ccbs_begin();
-        _inner_ccb_iter = _face->inner_ccbs_begin();
-
-        if (_outer_ccb_iter != _face->outer_ccbs_end())
-        {
-          // Start from the first outer CCB, if one exists.
-          _ccb_curr = _ccb_first = *_outer_ccb_iter;
-        }
-        else if (_inner_ccb_iter != face->inner_ccbs_end())
-        {
-          // Otherwise, start from the first inner CCB.
-          _ccb_curr = _ccb_first = *_inner_ccb_iter;
-        }
-        else
-        {
-          // In this case there are no CCBs to traverse:
-          _end = true;
-          return;
-        }
-
-        _hh = this->_dereference();
-
-        // In case the incident face of the twin halfedge is fictitious,
-        // skip it and proceed to the next edge.
-        if (_hh->is_fictitious())
-          ++(*this);
-      }
-      else // end iterator.
-      {
-        _outer_ccb_iter = _face->outer_ccbs_end();
-        _inner_ccb_iter = _face->inner_ccbs_end();
-      }
-    }  
-
-    /*! Equality operators. */
-    bool operator== (const Self& it) const
-    {
-      return (this->_equal(it));
-    }
-    
-    bool operator!= (const Self& it) const
-    {
-      return (! this->_equal(it));
-    }
-    
-    /*! Dereference operators. */
-    reference operator* () const
-    {
-      return (_hh);
-    }
-
-    pointer operator-> () const
-    {
-      return (&_hh);
-    }
-    
-    /* Increment operators. */
-    Self& operator++ ()
-    {
-      do
-      {
-        this->_increment();
-        if (_end)
-          return (*this);
-
-        _hh = this->_dereference();
-
-      } while (_hh->is_fictitious());
-
-      return (*this);
-    }
-
-    Self operator++ (int )
-    {
-      Self tmp = *this;
-
-      do
-      {
-        this->_increment();
-        if (_end)
-          return (tmp);
-
-        _hh = this->_dereference();
-
-      } while (_hh->is_fictitious());
-
-      return (tmp);
-    }
-
-  private:
-
-    /*! Check two iterators for equality. */
-    bool _equal (const Self& it) const
-    {
-      return (_out == it._out && _face == it._face &&
-              ((_end && it._end) ||
-               (_outer_ccb_iter == it._outer_ccb_iter &&
-                _inner_ccb_iter == it._inner_ccb_iter &&
-                _ccb_curr == it._ccb_curr)));
-    }
-
-    /*! Derefernce the current circulator. */
-    Edge_handle _dereference () const
-    {
-      if (_out)
-        return (_ccb_curr);
-      else
-        return (_ccb_curr->twin());
-    }
-
-    // Increments of the iterator.
-    void _increment ()
-    {
-      CGAL_assertion (! _end);
-
-      // If we have not traversed the entire CCB in full, move to the next
-      // halfedge along the current CCB.
-      ++_ccb_curr;
-
-      if (_ccb_curr != _ccb_first)
-        return;
-
-      // In this case we have completed the current CCB and we have to move
-      // to the next one.
-      if (_outer_ccb_iter != _face->outer_ccbs_end())
-      {
-        // Try to move to the next outer CCB.
-        ++_outer_ccb_iter;
-        if (_outer_ccb_iter != _face->outer_ccbs_end())
-        {
-          _ccb_curr = _ccb_first = *_outer_ccb_iter;
-          return;
-        }
-
-        // In this case we start traversing the inner CCBs.
-        if (_inner_ccb_iter != _face->inner_ccbs_end())
-        {
-          CGAL_assertion (_inner_ccb_iter == _face->inner_ccbs_begin());
-
-          // Otherwise, start from the first inner CCB.
-          _ccb_curr = _ccb_first = *_inner_ccb_iter;
-          return;
-        }
-      }
-      else if (_inner_ccb_iter != _face->inner_ccbs_end())
-      {
-
-        // In this case we have already traversed all outer CCBs (and at least
-        // one inner CCB), so we try to move to the next inner CCB.
-        ++_inner_ccb_iter;
-        if (_inner_ccb_iter != _face->inner_ccbs_end())
-        {
-          // Otherwise, start from the first inner CCB.
-          _ccb_curr = _ccb_first = *_inner_ccb_iter;
-          return;
-        }
-      }
-
-      // In this case we finished traversing all outer and inner CCBs:
-      _end = true;
-      return;
-    }
-
-  };
-
-  // Data members:
-  mutable Arrangement_on_surface_2    *p_arr;    // The primal arrangement.
-  
-public:
-
-  typedef Face_neighbor_iterator            Incident_edge_iterator;
-
-  /*! Default constructor. */
-  Dual () :
-    p_arr (NULL)
-  {}
-
-  /*! Constructor from an arrangement. */
-  Dual (const Arrangement_on_surface_2& arr) :
-    p_arr (const_cast<Arrangement_on_surface_2 *> (&arr))
-  {}
-
-  /*! Get the primal arrangement (const version). */
-  const Arrangement_on_surface_2* arrangement () const
-  {
-    return (p_arr);
-  }
-
-  /*! Get the primal arrangement (non-const version). */
-  Arrangement_on_surface_2* arrangement ()
-  {
-    return (p_arr);
-  }
-
-  /*! Get the number of vertices (face of the primal arrangement). */
-  Size number_of_vertices () const
-  {
-    return (p_arr->number_of_faces());
-  }
-
-  /*! Traverse the vertices (faces of the primal arrangement). */
-  Vertex_iterator vertices_begin () const
-  {
-    return (p_arr->faces_begin());
-  }
-
-  Vertex_iterator vertices_end () const
-  {
-    return (p_arr->faces_end());
-  }
-
-  /*! Get the number of edges. */
-  Size number_of_edges () const
-  {
-    return (p_arr->number_of_halfedges());
-  }
-
-  /*! Traverse the edges. */
-  Edge_iterator edges_begin () const
-  {
-    return (p_arr->halfedges_begin());
-  }
-
-  Edge_iterator edges_end () const
-  {
-    return (p_arr->halfedges_end());
-  }
-
-  /*!
-   * Get the dual vertex-degree (number of edges forming the face boundary).
-   */
-  Size degree (Vertex_handle v) const
-  {
-    Incident_edge_iterator   begin = Incident_edge_iterator (v, true, true);
-    Incident_edge_iterator   end = Incident_edge_iterator (v, false, true);
-    Size                     deg = 0;
-
-    while (begin != end)
-    {
-      deg++;
-      ++begin;
-    }
-
-    return (deg);
-  }
-
-  /*! Traverse the outgoing edges of a given vertex. */
-  Incident_edge_iterator out_edges_begin (Vertex_handle v) const
-  {
-    return (Incident_edge_iterator (v, true, true));
-  }
-
-  Incident_edge_iterator out_edges_end (Vertex_handle v) const
-  {
-    return (Incident_edge_iterator (v, true, false));
-  }
-
-  /*! Traverse the ingoing edges of a given vertex. */
-  Incident_edge_iterator in_edges_begin (Vertex_handle v) const
-  {
-    return (Incident_edge_iterator (v, false, true));
-  }
-
-  Incident_edge_iterator in_edges_end (Vertex_handle v) const
-  {
-    return (Incident_edge_iterator (v, false, false));
-  }
-};
-
-/*! \class
- * Specilaization of the Dual<> template for Arrangement_2.
- */
-template <class Traits_, class Dcel_>
-class Dual<Arrangement_2<Traits_, Dcel_> > :
-  public Dual<Arrangement_on_surface_2<
-    typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
-    typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> >
-{
-  typedef Traits_                                                     Traits_2;
-  typedef Dcel_                                                       Dcel;
-  typedef Dual<CGAL::Arrangement_on_surface_2<
-    typename CGAL::Arrangement_2<Traits_2, Dcel>::Geometry_traits_2,
-    typename CGAL::Arrangement_2<Traits_2, Dcel>::Topology_traits> >  Base;
-
-public:
-
-  /*! Default constructor. */
-  Dual () :
-    Base()
-  {}
-
-  /*! Constructor from an arrangement. */
-  Dual (const CGAL::Arrangement_2<Traits_2, Dcel>& arr) :
-    Base (arr)
-  {}
-};
-
-} //namespace CGAL
-
-#include <boost/graph/graph_concepts.hpp>
-#include <boost/iterator/counting_iterator.hpp>
-
-namespace boost {
-
-/*! \class
- * Specialization of the BGL graph-traits template, which serve as a dual
- * adapter for Arrangment_on_surface_2, where the valid arrangement faces
- * correspond to graph verices, and two graph vertices are connected if the
- * two corrsponding faces are adjacent.
- * We consider the graph as directed. We also allow parallel edges, as two
- * faces may have more than one common edges.
- */
-template <class GeomTraits_, class TopTraits_>
-class graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2<GeomTraits_,
-                                                             TopTraits_> > >
-{
-public:
-  
-  typedef GeomTraits_                           Geometry_traits_2;
-  typedef TopTraits_                            Topology_traits;
-  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
-                                                Arrangement_on_surface_2;
-  typedef CGAL::Dual<Arrangement_on_surface_2>  Dual_arr_2;
-
-private:
-
-  typedef typename Dual_arr_2::Vertex_iterator         Vertex_iterator;
-  typedef typename Dual_arr_2::Edge_iterator           Edge_iterator;
-  typedef typename Dual_arr_2::Incident_edge_iterator  Incident_edge_iterator;
- 
-  /*! \struct
-   * Define the arrangement traversal category, which indicates the arrangement
-   * models the BidirectionalGraph concept and the VertexListGraph and
-   * EdgeListGraph concepts.
-   */
-  struct Dual_arr_traversal_category : 
-    public virtual boost::bidirectional_graph_tag,   // This tag refines the
-                                                     // incidence_graph_tag.
-    public virtual boost::vertex_list_graph_tag,  // Can iterate over vertices.
-    public virtual boost::edge_list_graph_tag     // Can iterate over edges.
-  {};
-  
-public:
-
-  // Types required of the Graph concept:
-  typedef typename Dual_arr_2::Vertex_handle            vertex_descriptor;
-  typedef boost::directed_tag                           directed_category;
-  typedef boost::allow_parallel_edge_tag                edge_parallel_category;
-
-  typedef Dual_arr_traversal_category                   traversal_category;
-
-  // Types required by the IncidenceGraph concept:
-  typedef typename Dual_arr_2::Edge_handle              edge_descriptor;
-  typedef Incident_edge_iterator                        out_edge_iterator;
-  typedef typename Dual_arr_2::Size                     degree_size_type;
-
-  // Types required by the BidirectionalGraph concept:
-  typedef Incident_edge_iterator                        in_edge_iterator;
-
-  // Types required by the VertexListGraph concept:
-  typedef boost::counting_iterator<Vertex_iterator>     vertex_iterator;
-  typedef typename Dual_arr_2::Size                     vertices_size_type;
-
-  // Types required by the EdgeListGraph concept:
-  typedef boost::counting_iterator<Edge_iterator>       edge_iterator;
-  typedef typename Dual_arr_2::Size                     edges_size_type;
-
-  // Types not required by any of these concepts:
-  typedef void                                          adjacency_iterator;
-
-};
-
-/*! \class
- * Specialization of the BGL graph-traits template, which serve as a dual
- * adapter for Arrangment_2.
- */
-template <class Traits_, class Dcel_>
-class graph_traits<CGAL::Dual<CGAL::Arrangement_2<Traits_, Dcel_> > > :
-    public graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2<
-      typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
-      typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> > >
-{};
-
-} // namespace boost
-
-namespace CGAL {
-
-// Functions required by the IncidenceGraph concept:
-// -------------------------------------------------
-
-/*!
- * Get the out-degree of a vertex in a given dual arrangement.
- * \param v The vertex.
- * \param darr The dual arrangement.
- * \param Number of halfedges around the boundary of the primal face.
- */
-template <class GeomTraits_, class TopTraits_>
-typename 
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
-out_degree(typename 
-           boost::graph_traits<CGAL::Dual<CGAL::
-           Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           vertex_descriptor v,
-           const CGAL::Dual<CGAL::
-             Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return darr.degree (v);
-}
-
-/*!
- * Return a range of the out-edges of a vertex given by its descriptor and the
- * dual arrangement it belongs to.
- * \param v The vertex.
- * \param darr The dual arrangement.
- * \return A pair of out-edges iterators.
- */
-template <class GeomTraits_, class TopTraits_>
-std::pair<typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                             out_edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                             out_edge_iterator>
-out_edges(typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-          Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           vertex_descriptor v,
-          const CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return std::make_pair (darr.out_edges_begin (v), darr.out_edges_end (v));
-}
-
-/*!
- * Get the source vertex of a dual arrangement edge.
- * \param e The edge.
- * \param darr The dual arrangement.
- * \return The incident face of e in the primal arrangement.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertex_descriptor
-source(typename
-       boost::graph_traits<CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           edge_descriptor e,
-       const CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& /* darr */)
-{
-  return e->face();
-}
-
-/*!
- * Get the target vertex of a dual arrangement edge.
- * \param e The edge.
- * \param darr The dual arrangement.
- * \return The incident face of e's twin in the primal arrangement.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertex_descriptor
-target(typename
-       boost::graph_traits<CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           edge_descriptor e,
-       const CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& /* darr */)
-{
-  return e->twin()->face();
-}
-
-// Functions required by the BidirectionalGraph concept:
-// -----------------------------------------------------
-
-/*!
- * Get the in-degree of a vertex in a given dual arrangement.
- * \param v The vertex.
- * \param darr The dual arrangement.
- * \param Number of halfedges around the boundary of the primal face.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
-in_degree(typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           vertex_descriptor v,
-          const CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return darr.degree (v);
-}
-
-/*!
- * Return a range of the in-edges of a vertex given by its descriptor and the
- * dual arrangement it belongs to.
- * \param v The vertex.
- * \param darr The dual arrangement.
- * \return A pair of in-edges iterators.
- */
-template <class GeomTraits_, class TopTraits_>
-std::pair<typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                             in_edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                             in_edge_iterator>
-in_edges(typename
-         boost::graph_traits<CGAL::Dual<CGAL::
-           Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           vertex_descriptor v,
-         const CGAL::Dual<CGAL::
-           Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return std::make_pair (darr.in_edges_begin (v), darr.in_edges_end (v));
-}
-
-/*!
- * Get the degree of a vertex in a given dual arrangement.
- * \param v The vertex.
- * \param darr The dual arrangement.
- * \param Number of ingoing and outgoing halfedges incident to v.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
-degree(typename
-       boost::graph_traits<CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                           vertex_descriptor v,
-       const CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return (2 * darr.degree (v));
-}
-
-// Functions required by the VertexListGraph concept:
-// --------------------------------------------------
-
-/*!
- * Get the number of vertices in the given dual arrangement. 
- * \param darr The dual arrangement.
- * \return Number of faces in the primal arrangement.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertices_size_type
-num_vertices(const CGAL::Dual<CGAL::
-               Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return darr.number_of_vertices();
-}
-
-/*!
- * Get the range of vertices of the given dual arrangement.
- * \param darr The dual arrangement.
- * \return A pair of vertex iterators.
- */
-template <class GeomTraits_, class TopTraits_>
-std::pair<typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                               vertex_iterator,
-          typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                               vertex_iterator>
-vertices (const CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return std::make_pair (darr.vertices_begin(), darr.vertices_end());
-}
-
-// Functions required by the EdgeListGraph concept:
-// ------------------------------------------------
-
-/*!
- * Get the number of edges in the given dual arrangement. 
- * \param darr The dual arrangement.
- * \return Number of halfedges in the primal arrangement.
- */
-template <class GeomTraits_, class TopTraits_>
-typename
-boost::graph_traits<CGAL::Dual<CGAL::
-  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::edges_size_type
-num_edges(const CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return darr.number_of_edges(); 
-}
-
-/*!
- * Get the range of edges of the given dual arrangement.
- * \param darr The dual arrangement.
- * \return A pair of edge iterators.
- */
-template <class GeomTraits_, class TopTraits_>
-std::pair<typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                               edge_iterator,
-          typename
-          boost::graph_traits<CGAL::Dual<CGAL::
-            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
-                                                               edge_iterator>
-edges (const CGAL::Dual<CGAL::
-         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
-{
-  return std::make_pair (darr.edges_begin(), darr.edges_end());
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/hilbert_sort.h b/3rdparty/CGAL-4.6/include/CGAL/hilbert_sort.h
deleted file mode 100644
index e417242..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/hilbert_sort.h
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) 2007-2011  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Christophe Delage
-//               : Olivier Devillers
-
-#ifndef CGAL_HILBERT_SORT_H
-#define CGAL_HILBERT_SORT_H
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Hilbert_policy_tags.h>
-#include <CGAL/Hilbert_sort_2.h>
-#include <CGAL/Hilbert_sort_3.h>
-#include <CGAL/Hilbert_sort_d.h>
-#include <CGAL/algorithm.h>
-
-#include <boost/random/random_number_generator.hpp>
-#include <boost/random/linear_congruential.hpp>
-
-#include <algorithm>
-
-namespace CGAL {
-
-
-namespace internal {
-
-  template <class RandomAccessIterator, class Kernel, class Policy>
-    void hilbert_sort (RandomAccessIterator begin, 
-		       RandomAccessIterator end,
-                       const Kernel &k, 
-		       Policy /*policy*/,
-		       typename Kernel::Point_2 *)
-    {
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end, rng);
-#else
-        std::random_shuffle(begin,end, rng);
-#endif
-	(Hilbert_sort_2<Kernel, Policy> (k))(begin, end);
-    }
-    
-    template <class RandomAccessIterator, class Kernel, class Policy>
-      void hilbert_sort (RandomAccessIterator begin, 
-			 RandomAccessIterator end,
-                         const Kernel &k, 
-			 Policy /*policy*/,
-			 typename Kernel::Point_3 *)
-    {
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end, rng);
-#else
-        std::random_shuffle(begin,end, rng);
-#endif
-        (Hilbert_sort_3<Kernel, Policy> (k))(begin, end);
-    }
-
-    template <class RandomAccessIterator, class Kernel, class Policy>
-      void hilbert_sort (RandomAccessIterator begin,
-			 RandomAccessIterator end,
-                         const Kernel &k, 
-			 Policy /*policy*/,
-			 typename Kernel::Point_d *)
-    {
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end, rng);
-#else
-        std::random_shuffle(begin,end, rng);
-#endif
-        (Hilbert_sort_d<Kernel, Policy> (k))(begin, end);
-    }
-    
-
-
-}
-
-template <class RandomAccessIterator>
-void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end)
-{
-
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-    typedef CGAL::Kernel_traits<value_type>            KTraits;
-    typedef typename KTraits::Kernel                   Kernel;
-
-    internal::hilbert_sort(begin, end, Kernel(), Hilbert_sort_median_policy(),
-				  static_cast<value_type *> (0));
-
-}
-
-template <class RandomAccessIterator, class Kernel>
-void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   const Kernel &k)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-  
-    internal::hilbert_sort(begin, end, k, Hilbert_sort_median_policy(),
-				  static_cast<value_type *> (0));
-}
-
-  template <class RandomAccessIterator>
-void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   Hilbert_sort_median_policy policy)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-    typedef CGAL::Kernel_traits<value_type>            KTraits;
-    typedef typename KTraits::Kernel                   Kernel;
-
-    internal::hilbert_sort(begin, end, Kernel(), policy,
-				  static_cast<value_type *> (0));
-
-}
-
-
-  template <class RandomAccessIterator>
-void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   Hilbert_sort_middle_policy policy)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-    typedef CGAL::Kernel_traits<value_type>            KTraits;
-    typedef typename KTraits::Kernel                   Kernel;
-
-    internal::hilbert_sort(begin, end, Kernel(), policy,
-				  static_cast<value_type *> (0));
-
-}
-
-
-  template <class RandomAccessIterator, class Kernel, class Policy>
-void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   const Kernel &k, Policy policy)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-
-    internal::hilbert_sort(begin, end, 
-			   k, policy, static_cast<value_type *> (0));
-}
-
-} // namespace CGAL
-
-#endif//CGAL_HILBERT_SORT_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h b/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h
deleted file mode 100644
index 26893bd..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  Camille Wormser, Pierre Alliez
-
-#ifndef CGAL_AABB_DRAWING_TRAITS_H
-#define CGAL_AABB_DRAWING_TRAITS_H
-
-#include <CGAL/Bbox_3.h>
-#include <CGAL/gl.h>
-
-namespace CGAL {
-
-template<typename Primitive, typename Node>
-struct AABB_drawing_traits
-{
-  typedef CGAL::Bbox_3 Bbox;
-  bool go_further() { return true; }
-
-  bool intersection(const int&, const Primitive&)
-  {
-    return true;
-  }
-
-  bool do_intersect(const int&, // unused
-                    const Node& node)
-  {
-    gl_draw(node.bbox());
-    return true;
-  }
-
-  // draw bbox
-  static void gl_draw(const Bbox& bb)
-  {
-    ::glBegin(GL_LINES);
-    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
-                 bb.xmax(), bb.ymin(), bb.zmin());
-    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
-                 bb.xmin(), bb.ymax(), bb.zmin());
-    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
-                 bb.xmin(), bb.ymin(), bb.zmax());
-
-    gl_draw_edge(bb.xmax(), bb.ymin(), bb.zmin(),
-                 bb.xmax(), bb.ymax(), bb.zmin());
-    gl_draw_edge(bb.xmax(), bb.ymin(), bb.zmin(),
-                 bb.xmax(), bb.ymin(), bb.zmax());
-
-    gl_draw_edge(bb.xmin(), bb.ymax(), bb.zmin(),
-                 bb.xmax(), bb.ymax(), bb.zmin());
-    gl_draw_edge(bb.xmin(), bb.ymax(), bb.zmin(),
-                 bb.xmin(), bb.ymax(), bb.zmax());
-
-    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmax(),
-                 bb.xmax(), bb.ymin(), bb.zmax());
-    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmax(),
-                 bb.xmin(), bb.ymax(), bb.zmax());
-
-    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
-                 bb.xmin(), bb.ymax(), bb.zmax());
-    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
-                 bb.xmax(), bb.ymin(), bb.zmax());
-    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
-                 bb.xmax(), bb.ymax(), bb.zmin());
-    ::glEnd();
-  }
-
-  static void gl_draw_edge(double px, double py, double pz,
-                           double qx, double qy, double qz)
-  {
-    ::glVertex3d(px,py,pz);
-    ::glVertex3d(qx,qy,qz);
-  }
-}; // AABB_drawing_traits
-
-} // end namespace CGAL
-
-#endif // CGAL_AABB_DRAWING_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_copy_functors.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_copy_functors.h
deleted file mode 100644
index fc85644..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_copy_functors.h
+++ /dev/null
@@ -1,413 +0,0 @@
-// Copyright (c) 2010-2013 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
-#define CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
-
-#include <CGAL/internal/Combinatorial_map_utility.h>
-#include <CGAL/internal/Combinatorial_map_internal_functors.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/Kernel_traits.h>
-#include <CGAL/Cartesian_converter.h>
-
-/* Definition of functors used internally to copy combinatorial maps attributes
- * (we need functors as attributes are stored in tuple, thus all the access
- *  must be done at compiling time).
- */
-namespace CGAL
-{
-template< typename Map1, typename Map2, unsigned int i>
-struct Default_converter_cmap_attributes;
-template< typename Map1, typename Map2>
-struct Default_converter_cmap_0attributes_with_point;
-// ****************************************************************************
-namespace internal
-{
-// ****************************************************************************
-// Map1 is the existing map, to convert into map2.
-// Functor called only when both i-attributes have non void info.
-// General cases when both info are differents.
-template< typename Map1, typename Map2, unsigned int i,
-          typename Info1=typename Map1::template
-          Attribute_type<i>::type::Info,
-          typename Info2=typename Map2::template
-          Attribute_type<i>::type::Info >
-struct Create_attribute_if_same_info_cmap
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run(Map2&, const Info1& )
-  { return Map2::null_handle; }
-};
-
-// Special case when both attributes have the same info.
-template< typename Map1, typename Map2, unsigned int i, typename Info >
-struct Create_attribute_if_same_info_cmap<Map1, Map2, i, Info, Info>
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run(Map2& map2, const Info& info)
-  { typename Map2::template Attribute_handle<i>::type
-        res = map2.template create_attribute<i>();
-    map2.template get_attribute<i>(res).info()=info;
-    return res;
-  }
-};
-// ****************************************************************************
-// Functor allowing to set the value of a point if point exist, have
-// same dimension. For dim>3, if type of points are the same
-// (because no converter).
-template<typename Point1, typename Point2,
-         typename T1=typename Ambient_dimension<Point1>::type,
-         typename T2=typename Ambient_dimension<Point2>::type>
-struct Set_point_if_possible_cmap
-{
-  static void run(const Point1&, Point2&)
-  {}
-};
-
-template<typename Point1, typename Point2>
-struct Set_point_if_possible_cmap<Point1, Point2,
-    Dimension_tag<2>, Dimension_tag<2> >
-{
-  static void run(const Point1& p1, Point2& p2)
-  {
-    p2 = Cartesian_converter<typename Kernel_traits<Point1>::Kernel,
-        typename Kernel_traits<Point2>::Kernel>(p1);
-  }
-};
-
-template<typename Point1>
-struct Set_point_if_possible_cmap<Point1, Point1,
-    Dimension_tag<2>, Dimension_tag<2> >
-{
-  static void run(const Point1& p1, Point1& p2)
-  {
-    p2 = p1;
-  }
-};
-
-template<typename Point1, typename Point2>
-struct Set_point_if_possible_cmap<Point1, Point2,
-    Dimension_tag<3>, Dimension_tag<3> >
-{
-  static void run(const Point1& p1, Point2& p2)
-  {
-    p2 = Cartesian_converter<typename Kernel_traits<Point1>::Kernel,
-        typename Kernel_traits<Point2>::Kernel>()(p1);
-  }
-};
-
-template<typename Point1>
-struct Set_point_if_possible_cmap<Point1, Point1,
-    Dimension_tag<3>, Dimension_tag<3> >
-{
-  static void run(const Point1& p1, Point1& p2)
-  {
-    p2 = p1;
-  }
-};
-
-template<typename Point1>
-struct Set_point_if_possible_cmap<Point1, Point1,
-    Dynamic_dimension_tag, Dynamic_dimension_tag >
-{
-  static void run(const Point1& p1, Point1& p2)
-  {
-    p2 = p1;
-  }
-};
-// ****************************************************************************
-// Get the ith functor of the converters tuple if i<length of the tuple,
-// otherwise get the default converter.
-template<typename Map1, typename Map2, unsigned int i, typename Converters,
-         bool t=((int)i>=My_length<Converters>::value)>
-struct Get_convert_attribute_functor
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run( const Map1* cmap1, Map2* cmap2, typename Map1::Dart_const_handle dh1,
-       typename Map2::Dart_handle dh2, const Converters& /*converters*/)
-  {
-    return
-        CGAL::Default_converter_cmap_attributes<Map1, Map2, i>()
-        (*cmap1, *cmap2, dh1, dh2);
-  }
-};
-
-template<typename Map1, typename Map2, unsigned int i, typename Converters>
-struct Get_convert_attribute_functor<Map1,Map2,i,Converters,false>
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run( const Map1* cmap1, Map2* cmap2, typename Map1::Dart_const_handle dh1,
-       typename Map2::Dart_handle dh2, const Converters& converters)
-  {
-    return CGAL::cpp11::get<i>(converters) (*cmap1, *cmap2, dh1, dh2);
-  }
-};
-// ****************************************************************************
-// Call a given functor if both i-attribute have an non void info
-template< typename Map1, typename Map2, unsigned int i,
-          typename Converters,
-          bool Withinfo1=CGAL::internal::template
-          Is_attribute_has_non_void_info
-          <typename Map1::template Attribute_type<i>::type>::value,
-          bool Withinfo2=CGAL::internal::template
-          Is_attribute_has_non_void_info
-          <typename Map2::template Attribute_type<i>::type>::value >
-struct Call_functor_if_both_attributes_have_info
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run( const Map1*,
-       Map2*,
-       typename Map1::Dart_const_handle,
-       typename Map2::Dart_handle,
-       const Converters&)
-  { return Map2::null_handle; }
-};
-
-template< typename Map1, typename Map2, unsigned int i, typename Converters >
-struct Call_functor_if_both_attributes_have_info<Map1, Map2, i,
-    Converters, true, true>
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run( const Map1* cmap1,
-       Map2* cmap2,
-       typename Map1::Dart_const_handle dh1,
-       typename Map2::Dart_handle dh2,
-       const Converters& converters )
-  {
-    return Get_convert_attribute_functor<Map1,Map2,i,Converters>::
-        run(cmap1, cmap2, dh1, dh2, converters);
-  }
-};
-// ****************************************************************************
-// Call a given functor only if both 0-attribute have a point.
-// general case i!=0 or one attribute without point.
-template< typename Map1, typename Map2, unsigned int i,
-          typename Pointconverter,
-          bool Withpoint1=CGAL::internal::template Is_attribute_has_point
-          <typename Map1::template Attribute_type<i>::type>::value,
-          bool Withpoint2=CGAL::internal::template Is_attribute_has_point
-          <typename Map2::template Attribute_type<i>::type>::value >
-struct Call_functor_if_both_attributes_have_point
-{
-  static typename Map2::template Attribute_handle<i>::type
-  run( const Map1*,
-       Map2*,
-       typename Map1::Dart_const_handle,
-       typename Map2::Dart_handle,
-       const Pointconverter&)
-  { return Map2::null_handle; }
-};
-// Specialisation with i==0 and both attributes have points.
-template< typename Map1, typename Map2, typename Pointconverter >
-struct Call_functor_if_both_attributes_have_point<Map1, Map2, 0,
-    Pointconverter, true, true>
-{
-  static typename Map2::template Attribute_handle<0>::type
-  run( const Map1* cmap1,
-       Map2* cmap2,
-       typename Map1::Dart_const_handle dh1,
-       typename Map2::Dart_handle dh2,
-       const Pointconverter& pointconverter )
-  { return pointconverter(*cmap1, *cmap2, dh1, dh2); }
-};
-// ****************************************************************************
-// Copy attribute when if both i-attributes are non void.
-// (note Attr2 could not be Void as copy functor is called only for
-// non void attributes)
-// General case with both attributes non void.
-template<typename Map1, typename Map2, typename Converters,
-         typename Pointconverter, unsigned int i,
-         typename Attr1=typename Map1::template Attribute_type<i>::type,
-         typename Attr2=typename Map2::template Attribute_type<i>::type >
-struct Copy_attribute_functor_if_nonvoid
-{
-  static void run( const Map1* cmap1,
-                   Map2* cmap2,
-                   typename Map1::Dart_const_handle dh1,
-                   typename Map2::Dart_handle dh2,
-                   const Converters& converters,
-                   const Pointconverter& pointconverter)
-  {
-    // If dh1 has no i-attribute, nothing to copy.
-    if ( cmap1->template attribute<i>(dh1)==Map1::null_handle ) return;
-
-    // If dh2 has already an i-attribute, it was already copied.
-    if ( cmap2->template attribute<i>(dh2)!=Map2::null_handle ) return;
-
-    // Otherwise we copy the info if both attribute have non void info.
-    typename Map2::template Attribute_handle<i>::type
-        res=Call_functor_if_both_attributes_have_info
-        <Map1, Map2, i, Converters>::
-        run(cmap1, cmap2, dh1, dh2, converters);
-
-    if ( res!=Map2::null_handle )
-      cmap2->template set_attribute<i>(dh2, res);
-
-    // And the point if both attributes have points (and only for 0-attributes)
-    res=Call_functor_if_both_attributes_have_point
-        <Map1, Map2, i, Pointconverter>::
-        run(cmap1, cmap2, dh1, dh2, pointconverter);
-
-    if ( res!=Map2::null_handle &&
-         cmap2->template attribute<i>(dh2)==Map2::null_handle )
-      cmap2->template set_attribute<i>(dh2, res);
-  }
-};
-// Specialisation when attr1 is void, and attr2 is non void i==0. Nothing to
-// copy, but if 0-attributes has point and i==0, we need to create
-// vertex attributes.
-template<typename Map1, typename Map2, typename Converters,
-         typename Pointconverter, typename Attr2>
-struct Copy_attribute_functor_if_nonvoid<Map1, Map2, Converters,
-    Pointconverter, 0, CGAL::Void, Attr2>
-{
-  static void run( const Map1*,
-                   Map2* cmap2,
-                   typename Map1::Dart_const_handle,
-                   typename Map2::Dart_handle dh2,
-                   const Converters&,
-                   const Pointconverter&)
-  {
-    // If dh2 has already an 0-attribute, it was already created.
-    if ( cmap2->template attribute<0>(dh2)!=Map2::null_handle ) return;
-
-    // Create the point if 0-attributes has Point.
-    if ( CGAL::internal::template Is_attribute_has_point
-         <typename Map2::template Attribute_type<0>::type>::value )
-      cmap2->template
-          set_attribute<0>(dh2, cmap2->template create_attribute<0>());
-  }
-};
-// Specialisation when attr1 is void, and attr2 is non void i!=0.
-// Nothing to do.
-template<typename Map1, typename Map2, typename Converters, unsigned int i,
-         typename Pointconverter, typename Attr2>
-struct Copy_attribute_functor_if_nonvoid<Map1, Map2, Converters,
-    Pointconverter, i, CGAL::Void, Attr2>
-{
-  static void run( const Map1*,
-                   Map2*,
-                   typename Map1::Dart_const_handle,
-                   typename Map2::Dart_handle,
-                   const Converters&,
-                   const Pointconverter&)
-  {}
-};
-// ****************************************************************************
-/// Copy enabled attributes from one cmap to other. General case called
-/// by copy function in Combinatorial_map on all the non void attributes
-/// of Map2. Map1 is the existing map, to convert into map2.
-template<typename Map1, typename Map2, typename Converters,
-         typename Pointconverter>
-struct Copy_attributes_functor
-{
-  template<unsigned int i>
-  static void run( const Map1* cmap1,
-                   Map2* cmap2,
-                   typename Map1::Dart_const_handle dh1,
-                   typename Map2::Dart_handle dh2,
-                   const Converters& converters,
-                   const Pointconverter& pointconverter)
-  { Copy_attribute_functor_if_nonvoid
-        <Map1, Map2, Converters, Pointconverter, i>::
-        run(cmap1, cmap2, dh1, dh2, converters, pointconverter);
-   }
-};
-// ****************************************************************************
-} // namespace internal
-// ****************************************************************************
-// "Converters" called during the copy of attributes, to copy Info.
-// Users can replace them by their own converters.
-// Info converter are called only if both i-attributes have non void info,
-// if dh1 has an i-attribute and if dh2 does not already has an i-attribute.
-// Map1 is the existing map, to convert into map2.
-// ****************************************************************************
-// Default converter copy only attributes if they have same info types.
-template< typename Map1, typename Map2, unsigned int i>
-struct Default_converter_cmap_attributes
-{
-  typename Map2::template Attribute_handle<i>::type operator()
-  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
-   typename Map2::Dart_handle dh2) const
-  {
-    CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
-    CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
-    return internal::Create_attribute_if_same_info_cmap
-      <Map1,Map2,i>::run(map2, map1.template info<i>(dh1));
-  }
-};
-// ****************************************************************************
-// Cast converter always copy attributes, doing a cast. This can work only
-// if both types are convertible and this is user responsability
-// to use it only in this case.
-template< typename Map1, typename Map2, unsigned int i>
-struct Cast_converter_cmap_attributes
-{
-  typename Map2::template Attribute_handle<i>::type operator()
-  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
-   typename Map2::Dart_handle dh2) const
-  {
-    CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
-    CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
-    typename Map2::template Attribute_handle<i>::type
-      res = map2.template create_attribute<i>();
-    map2.template get_attribute<i>(res).info() =
-      (typename Map2::template Attribute_type<i>::type::Info)
-        map1.template info<i>(dh1);
-    return res;
-  }
-};
-// ****************************************************************************
-// "Converters" called during the copy of attributes, to copy Point (for
-// attributes having such type defined).
-// Users can replace them by their own converters.
-// Point converter is called after Info converters; thus it is possible that
-// attribute<0> was already created for dh2.
-// Point converter is only called if both types of 0-attributes have
-// Point type defined, and if dh1 has a 0-attribute.
-// Map1 is the existing map, to convert into map2.
-// ****************************************************************************
-// Default converter for points. Point are copied only if they have same
-// types, or in 2D/3D we use Cartesian_converter.
-template< typename Map1, typename Map2>
-struct Default_converter_cmap_0attributes_with_point
-{
-  typename Map2::template Attribute_handle<0>::type operator()
-  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
-   typename Map2::Dart_handle dh2) const
-  {
-    CGAL_assertion( map1.template attribute<0>(dh1)!=Map1::null_handle );
-
-    typename Map2::template Attribute_handle<0>::type
-      res = map2.template attribute<0>(dh2);
-    if ( res==Map2::null_handle )
-    {
-      res = map2.template create_attribute<0>();
-    }
-    internal::Set_point_if_possible_cmap
-        <typename Map1::template Attribute_type<0>::type::Point,
-        typename Map2::template Attribute_type<0>::type::Point>::
-      run(map1.point(dh1), map2.template get_attribute<0>(res).point());
-    return res;
-  }
-};
-// ****************************************************************************
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_group_functors.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_group_functors.h
deleted file mode 100644
index 2a408a9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_group_functors.h
+++ /dev/null
@@ -1,973 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
-#define CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
-
-#include <CGAL/Unique_hash_map.h>
-#include <CGAL/internal/Combinatorial_map_internal_functors.h>
-#include <CGAL/Combinatorial_map_functors.h>
-
-/* Definition of functors used to group/ungroup attributes (we need functors
- * as attributes are stored in tuple, thus all the access must be done at
- * compiling time). Some of these functors are used with
- * Foreach_enabled_attributes to iterate through all the non void attribs.
- * These functors used other functors defined in Combinatorial_map_functors.h
- *
- * Group_attribute_functor_of_dart<CMap> to group the <i>-attributes of two
- *    given darts (except for j-dim). Only the attributes of the two given
- *    darts are possibly modified.
- *
- * Group_attribute_functor_of_dart_run<CMap,i> same than
- *   Group_attribute_functor_of_dart<CMap>::run<i>, with i template argument
- *   given in the struct to enable specialization.
- *
- * Group_attribute_functor<CMap> to group the <i>-attributes of two
- *    given i-cells (except for j-adim). If one i-attribute is NULL, we set the
- *    darts of its i-cell to the second attribute. If both i-attributes are
- *    non NULL, we overide all the i-attribute of the second i-cell to the
- *    first i-attribute.
- *
- * Degroup_attribute_functor_run<CMap> to degroup one i-attributes in two
- *   (except for j-adim).
- *
- * Test_split_attribute_functor<CMap,i> to test if there is some i-attributes
- *   that are split after an operation. Modified darts are given in a
- *   std::deque.
- */
-namespace CGAL
-{
-namespace internal
-{
-// ************************************************************************
-/// Functor used for link_beta to update the i-attributes of
-/// dh2 on the attributes of dh1 dart, except if i=j.
-///    (j is the dimension of the beta modified between dh1 and dh2,
-///     so that after the modification we will have beta_j(dh1)==dh2)
-/// Only attributes of dh1 or dh2 can be modified. If one dart as its
-/// attribute equal to null, it takes the attributes of the second dart.
-/// If both attributes are non null, dh2 takes the attribute of dh1.
-template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
-         typename T=typename CMap::template Attribute_type<i>::type>
-struct Group_attribute_functor_of_dart_run
-{
-  /// Group the i-attribute of dh1 and dh2.
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle dh1,
-                  typename CMap::Dart_handle dh2)
-  {
-    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
-    CGAL_static_assertion( i!=j && (i!=1 || j!=0) );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<i>::value>=0,
-                              "Group_attribute_functor_of_dart_run<i> but "
-                              "i-attributes are disabled");
-    typename CMap::template Attribute_handle<i>::type
-        a1=amap->template attribute<i>(dh1);
-    typename CMap::template Attribute_handle<i>::type
-        a2=amap->template attribute<i>(dh2);
-
-    // If the two attributes are equal, nothing to do.
-    if ( a1==a2 ) return;
-
-    if ( a1==CMap::null_handle ) amap->template set_dart_attribute<i>(dh1, a2);
-    else amap->template set_dart_attribute<i>(dh2, a1);
-  }
-};
-// Specialization for i=0 and 2<=j. We modify 0-attribute for beta_j j>=2.
-template<typename CMap, unsigned int j, typename T>
-struct Group_attribute_functor_of_dart_run<CMap, 0, j, T>
-{
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle dh1,
-                  typename CMap::Dart_handle dh2)
-  {
-    CGAL_static_assertion(j!=0 && j!=1);
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Group_attribute_functor_of_dart_run<0> but "
-                              "0-attributes are disabled");
-    typename CMap::template Attribute_handle<0>::type
-        a1=CMap::null_handle, a2=CMap::null_handle;
-
-    // First extremity
-    typename CMap::Dart_handle od = amap->other_extremity(dh2);
-    if ( od!=amap->null_handle )
-    {
-      a1=amap->template attribute<0>(dh1);
-      a2=amap->template attribute<0>(od);
-
-      if ( a1==CMap::null_handle && a2!=CMap::null_handle )
-        amap->template set_dart_attribute<0>(dh1, a2);
-    }
-
-    // Second extremity
-    od = amap->other_extremity(dh1);
-    if ( od!=amap->null_handle )
-    {
-      a1=amap->template attribute<0>(od);
-      if ( a1!=CMap::null_handle )
-        amap->template set_dart_attribute<0>(dh2, a1);
-    }
-  }
-};
-// Specialization for i=0 and j=0. We modify 0-attribute for beta_0.
-template<typename CMap, typename T>
-struct Group_attribute_functor_of_dart_run<CMap, 0, 0, T>
-{
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle dh1,
-                  typename CMap::Dart_handle dh2)
-  {
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Group_attribute_functor_of_dart_run<0> but "
-                              "0-attributes are disabled");
-    typename CMap::Dart_handle od = amap->other_extremity(dh2);
-    if ( od!=amap->null_handle )
-    {
-      typename CMap::template Attribute_handle<0>::type
-          a1=amap->template attribute<0>(dh1);
-      typename CMap::template Attribute_handle<0>::type
-          a2=amap->template attribute<0>(od);
-
-      if ( a1==CMap::null_handle && a2!=CMap::null_handle )
-        amap->template set_dart_attribute<0>(dh1, a2);
-    }
-  }
-};
-// Specialization for i=0 and j=1. We modify 0-attribute for beta_1.
-template<typename CMap, typename T>
-struct Group_attribute_functor_of_dart_run<CMap, 0, 1, T>
-{
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle dh1,
-                  typename CMap::Dart_handle dh2)
-  {
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Group_attribute_functor_of_dart_run<0> but "
-                              "0-attributes are disabled");
-    typename CMap::Dart_handle od = amap->other_extremity(dh1);
-    if ( od!=amap->null_handle )
-    {
-      typename CMap::template Attribute_handle<0>::type
-          a1=amap->template attribute<0>(od);
-
-      if ( a1!=CMap::null_handle )
-        amap->template set_dart_attribute<0>(dh2, a1);
-    }
-  }
-};
-// Specialization for void attributes.
-template<typename CMap, unsigned int i, unsigned int j>
-struct Group_attribute_functor_of_dart_run<CMap, i, j, CGAL::Void>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// Specialization for i=j. Do nothing as j is the dimension to not consider.
-template<typename CMap, unsigned int i, typename T>
-struct Group_attribute_functor_of_dart_run<CMap,i,i,T>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// Specialization for i=1 and j=0. Do nothing as edges attributes are not
-// modify when we modify beta_0.
-template<typename CMap, typename T>
-struct Group_attribute_functor_of_dart_run<CMap,1,0,T>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// ************************************************************************
-/// Functor used for link_beta to update the attributes of
-/// adart2 on the attributes of this dart, except for j-attributes.
-///    (j is the dimension of the beta modified between adart1 and adart2,
-///     so that after the modification we will have beta_j(adart1)==adart2)
-/// We define run<i> to allows to use this functor with
-/// Foreach_enabled_attributes.
-///   If you know i at compiling time, use directly
-///   Group_attribute_functor_of_dart_run.
-template<typename CMap, unsigned int j=CMap::dimension+1>
-struct Group_attribute_functor_of_dart
-{
-  template <unsigned int i>
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle adart1,
-                  typename CMap::Dart_handle adart2)
-  {
-    CGAL::internal::Group_attribute_functor_of_dart_run<CMap,i,j>::
-        run(amap,adart1,adart2);
-  }
-};
-// ************************************************************************
-// Functor used to group the two i-attributes of the two i-cells, except
-// the attribute of j
-//    (j is the dimension of the beta modified between adart1 and adart2).
-template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
-         typename T=typename CMap::template Attribute_type<i>::type>
-struct Group_attribute_functor_run
-{
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle adart1,
-                  typename CMap::Dart_handle adart2)
-  {
-    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
-    CGAL_static_assertion( i!=j );
-    CGAL_static_assertion_msg
-        ( CMap::Helper::template Dimension_index<i>::value>=0,
-          "Group_attribute_functor_run<i> but i-attributes are disabled" );
-    typename CMap::template Attribute_handle<i>::type
-        a1=amap->template attribute<i>(adart1);
-    typename CMap::template Attribute_handle<i>::type
-        a2=amap->template attribute<i>(adart2);
-
-    // If the two attributes are equal, nothing to do.
-    if ( a1 == a2 ) return;
-
-    typename CMap::Dart_handle toSet = amap->null_handle;
-
-    // If the attribute associated to adart1 is NULL, set it with
-    // the attribute associated to adart2 (necessarily != NULL)
-    if (a1 == CMap::null_handle)
-    { toSet  = adart1; a1 = a2; }
-    else
-    {
-      toSet = adart2;
-      if (a2 != CMap::null_handle)
-      {
-        CGAL::internal::Call_merge_functor<CMap, i>::run(amap, a1, a2);
-      }
-    }
-    amap->template set_attribute<i>(toSet, a1);
-  }
-};
-// Specialization for i=0 and 2<=j. We update 0-attributes for beta_j j>=2.
-// We need to update both extremities of the edge dh1.
-template<typename CMap, unsigned int j, typename T>
-struct Group_attribute_functor_run<CMap, 0, j, T>
-{
-  static void run( CMap* amap,
-                   typename CMap::Dart_handle dh1,
-                   typename CMap::Dart_handle dh2 )
-  {
-    CGAL_static_assertion_msg
-        ( CMap::Helper::template Dimension_index<0>::value>=0,
-          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
-    CGAL_static_assertion(j!=0 && j!=1);
-
-    typename CMap::template Attribute_handle<0>::type
-        a1=CMap::null_handle, a2=CMap::null_handle;
-    typename CMap::Dart_handle toSet=amap->null_handle;
-    // First extremity
-    typename CMap::Dart_handle od=amap->other_extremity(dh2);
-    if ( od!=amap->null_handle )
-    {
-      a1=amap->template attribute<0>(dh1);
-      a2=amap->template attribute<0>(od);
-      if ( a1!=a2 )
-      {
-        if ( a1==CMap::null_handle )
-        { toSet=dh1; a1=a2; }
-        else
-        {
-          toSet=od;
-          if ( a2!=CMap::null_handle )
-          {
-            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
-          }
-        }
-        amap->template set_attribute<0>(toSet, a1);
-      }
-    }
-    // Second extremity
-    od = amap->other_extremity(dh1);
-    if ( od!=amap->null_handle )
-    {
-      a1=amap->template attribute<0>(od);
-      a2=amap->template attribute<0>(dh2);
-      if ( a1!=a2 )
-      {
-        if ( a1==CMap::null_handle )
-        { toSet=od; a1=a2; }
-        else
-        {
-          toSet=dh2;
-          if ( a2!=CMap::null_handle )
-          {
-            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
-          }
-        }
-        amap->template set_attribute<0>(toSet, a1);
-      }
-    }
-  }
-};
-// Specialization for i=0 and j=0. We update 0-attributes for beta_0.
-// We need to update the first extremity of the edge dh1.
-template<typename CMap, typename T>
-struct Group_attribute_functor_run<CMap, 0, 0, T>
-{
-  static void run( CMap* amap,
-                   typename CMap::Dart_handle dh1,
-                   typename CMap::Dart_handle dh2 )
-  {
-    CGAL_static_assertion_msg
-        ( CMap::Helper::template Dimension_index<0>::value>=0,
-          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
-    typename CMap::Dart_handle od=amap->other_extremity(dh2);
-    if ( od!=amap->null_handle )
-    {
-      typename CMap::Dart_handle toSet=amap->null_handle;
-      typename CMap::template Attribute_handle<0>::type
-          a1=amap->template attribute<0>(dh1);
-      typename CMap::template Attribute_handle<0>::type
-          a2=amap->template attribute<0>(od);
-      if ( a1!=a2 )
-      {
-        if ( a1==CMap::null_handle )
-        { toSet=dh1; a1=a2; }
-        else
-        {
-          toSet=od;
-          if ( a2!=CMap::null_handle )
-          {
-            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
-          }
-        }
-        amap->template set_attribute<0>(toSet, a1);
-      }
-    }
-  }
-};
-// Specialization for i=0 and j=1. We update 0-attributes for beta_1.
-// We need to update the second extremity of the edge dh1.
-template<typename CMap, typename T>
-struct Group_attribute_functor_run<CMap, 0, 1, T>
-{
-  static void run( CMap* amap,
-                   typename CMap::Dart_handle dh1,
-                   typename CMap::Dart_handle dh2 )
-  {
-    CGAL_static_assertion_msg
-        ( CMap::Helper::template Dimension_index<0>::value>=0,
-          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
-    typename CMap::Dart_handle od =amap->other_extremity(dh1);
-    if ( od!=amap->null_handle )
-    {
-      typename CMap::Dart_handle toSet=amap->null_handle;
-      typename CMap::template Attribute_handle<0>::type
-          a1=amap->template attribute<0>(od);
-      typename CMap::template Attribute_handle<0>::type
-          a2=amap->template attribute<0>(dh2);
-      if ( a1!=a2 )
-      {
-        if ( a1==CMap::null_handle )
-        { toSet=od; a1=a2; }
-        else
-        {
-          toSet=dh2;
-          if ( a2!=CMap::null_handle )
-          {
-            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
-          }
-        }
-        amap->template set_attribute<0>(toSet, a1);
-      }
-    }
-  }
-};
-// Specialization for void attributes.
-template<typename CMap, unsigned int i, unsigned int j>
-struct Group_attribute_functor_run<CMap, i, j, CGAL::Void>
-{
-  static void run( CMap*,
-                   typename CMap::Dart_handle,
-                   typename CMap::Dart_handle )
-  {}
-};
-// Specialization for i=j. Do nothing as j is the dimension to not consider.
-template<typename CMap, unsigned int i, typename T>
-struct Group_attribute_functor_run<CMap,i,i,T>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// Specialization for i=1 and j=0. Do nothing as edges attributes are not
-// modify when we modify beta_0.
-template<typename CMap, typename T>
-struct Group_attribute_functor_run<CMap,1,0,T>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// ************************************************************************
-/// Functor used for sew to update the attributes of
-/// adart2 on the attributes of this dart, except for j-attributes.
-///    (j is the dimension of the beta modified between adart1 and adart2,
-///     so that after the modification we will have beta_j(adart1)==adart2)
-/// We define run<i> to allows to use this functor with
-/// Foreach_enabled_attributes.
-///   If you know i at compiling time, use directly
-///   Group_attribute_functor_run.
-template<typename CMap, unsigned int j=CMap::dimension+1>
-struct Group_attribute_functor
-{
-  template <unsigned int i>
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle adart1,
-                  typename CMap::Dart_handle adart2)
-  { CGAL::internal::Group_attribute_functor_run<CMap,i,j>::
-        run(amap,adart1,adart2); }
-};
-// ************************************************************************
-// Functor used to degroup one i-attribute of one i-cell in two, except the
-// attribute of j.
-template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
-         typename T=typename CMap::template Attribute_type<i>::type>
-struct Degroup_attribute_functor_run
-{
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle adart1,
-                  typename CMap::Dart_handle adart2)
-  {
-    CGAL_static_assertion( i<=CMap::dimension );
-    CGAL_static_assertion( i!=j );
-    CGAL_static_assertion_msg
-        ( CMap::Helper::template Dimension_index<i>::value>=0,
-          "Degroup_attribute_functor_run<i> but i-attributes are disabled" );
-
-    typename CMap::template Attribute_handle<i>::type
-        a1=amap->template attribute<i>(adart1);
-
-    // If there is no first attribute, nothing to degroup.
-    if ( a1==CMap::null_handle ) return;
-
-    // If the second attribute is non null and already different from a1,
-    // nothing to do.
-    if ( a1!=amap->template attribute<i>(adart2) &&
-         amap->template attribute<i>(adart2)!=CMap::null_handle ) return;
-
-    CGAL_assertion( (!CGAL::belong_to_same_cell<CMap,i>
-                     (*amap, adart1, adart2)) );
-
-    // As we split, we set the dart of the first attribute to adart1 for which
-    // we are sure it belongs to the first i-cell.
-    amap->template get_attribute<i>(a1).set_dart(adart1);
-
-    typename CMap::template Attribute_handle<i>::type
-      a2 = amap->template
-      create_attribute<i>(amap->template get_attribute<i>(a1));
-
-    amap->template set_attribute<i>(adart2, a2);
-    CGAL::internal::Call_split_functor<CMap, i>::run(amap, a1, a2);
-  }
-};
-// Specialization for void attributes.
-template<typename CMap, unsigned int i, unsigned int j>
-struct Degroup_attribute_functor_run<CMap, i, j, CGAL::Void>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// Specialization for i==j.
-template<typename CMap, unsigned int i, typename T>
-struct Degroup_attribute_functor_run<CMap, i, i, T>
-{
-  static void run(CMap*,
-                  typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// ************************************************************************
-// Function used by Test_split_attribute_functor_run to process one dart.
-// Test the split of the i-cell containing the given dart adart.
-// When we process a dart, we search in the Unique_hash_map if its
-// i-attribute was already found. If yes, it means that we already
-// found an i-cell with this attribute, thus this attribute is split.
-// We mark (with mark) all the darts of the i-cell containing adart to
-// process them exactly once.
-template<typename CMap, unsigned int i>
-void test_split_attribute_functor_one_dart
-( CMap* amap, typename CMap::Dart_handle adart,
-  CGAL::Unique_hash_map<typename CMap::template Attribute_handle<i>::type,
-                        unsigned int, typename CMap::Hash_function> &
-  found_attributes, int mark )
-{
-  CGAL_assertion( amap!=NULL );
-  CGAL_static_assertion_msg(CMap::Helper::template
-                            Dimension_index<i>::value>=0,
-                            "Test_split_attribute_functor_one_dart<i> but "
-                            "i-attributes are disabled");
-
-  typedef typename CMap::template Attribute_handle<i>::type
-      Attribute_handle_i;
-
-  // If the current dart has no attribute, or if it is aldready marked,
-  // nothing to do.
-  if ( amap->template attribute<i>(adart)==CMap::null_handle ||
-       amap->is_marked(adart, mark) )
-    return;
-
-  Attribute_handle_i a1 = amap->template attribute<i>(adart);
-  if ( found_attributes.is_defined(a1) )
-  {  // Here the attribute was already present in the hash_map
-    Attribute_handle_i a2 = amap->template
-      create_attribute<i>(amap->template get_attribute<i>(a1));
-
-    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap, i>
-          itj(*amap, adart, mark); itj.cont(); ++itj )
-    {
-      amap->template set_dart_attribute<i>(itj, a2);
-      amap->mark(itj, mark);
-    }
-    CGAL::internal::Call_split_functor<CMap, i>::run(amap, a1, a2);
-  }
-  else
-  {
-    // Here the attribute was not in the hash_map.
-    found_attributes[a1]=1;
-    amap->template set_dart_of_attribute<i>(a1, adart);
-
-    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap, i>
-          itj(*amap, adart, mark); itj.cont(); ++itj )
-    {
-      CGAL_assertion( amap->template attribute<i>(itj)==a1 );
-      amap->mark(itj, mark);
-    }
-  }
-}
-// ************************************************************************
-/// Functor used for unsew to test if i-attributes are split after an
-/// operation, except for j-attributes.
-///   (j is the dimension of the beta modified for darts in modified_darts,
-///    if j==0 modified_darts2 are the darts modified for beta_1).
-template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
-         typename T=typename CMap::template Attribute_type<i>::type>
-struct Test_split_attribute_functor_run
-{
-  // modified_darts is the set of modified darts for beta_j
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   int mark_modified_darts=-1)
-  {
-    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
-    CGAL_assertion( i!=j );
-    CGAL_assertion( amap!=NULL );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<i>::value>=0,
-                              "Test_split_attribute_functor_run<i> but "
-                              "i-attributes are disabled");
-
-    typedef typename CMap::template Attribute_handle<i>::type
-        Attribute_handle_i;
-
-    CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
-                          typename CMap::Hash_function> found_attributes;
-
-    int mark = amap->get_new_mark(); // to mark incident cells.
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it=modified_darts.begin();
-    for ( ; it!=modified_darts.end(); ++it )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
-          (amap, *it, found_attributes, mark);
-    }
-
-    // Now we unmark all the marked darts.
-    amap->negate_mark(mark);
-    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it, mark_modified_darts);
-
-      if ( !amap->is_marked(*it, mark) )
-        CGAL::mark_cell<CMap, i>(*amap, *it, mark);
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-  }
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts2,
-                   int mark_modified_darts=-1)
-  {
-    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
-    CGAL_assertion( i!=j );
-    CGAL_assertion( amap!=NULL );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<i>::value>=0,
-                              "Test_split_attribute_functor_run<i> but "
-                              "i-attributes are disabled");
-
-    typedef typename CMap::template Attribute_handle<i>::type
-        Attribute_handle_i;
-
-    CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
-                          typename CMap::Hash_function> found_attributes;
-
-    int mark = amap->get_new_mark(); // to mark incident cells.
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it=modified_darts.begin();
-    for ( ; it!=modified_darts.end(); ++it )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
-          (amap, *it, found_attributes, mark);
-    }
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it2=modified_darts2.begin();
-    for ( ; it2!=modified_darts2.end(); ++it2 )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
-          (amap, *it2, found_attributes, mark);
-    }
-
-    // Now we unmark all the marked darts.
-    amap->negate_mark(mark);
-    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it, mark_modified_darts);
-
-      if ( !amap->is_marked(*it, mark) )
-        CGAL::mark_cell<CMap, i>(*amap, *it, mark);
-    }
-    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it2, mark_modified_darts);
-
-      if ( !amap->is_marked(*it2, mark) )
-        CGAL::mark_cell<CMap, i>(*amap, *it2, mark);
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-  }
-};
-// Specialization for i=0 and 2<=j.
-template<typename CMap, unsigned int j, typename T>
-struct Test_split_attribute_functor_run<CMap, 0, j, T>
-{
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   int mark_modified_darts=-1)
-  {
-    CGAL_assertion( j!=0 && j!=1 );
-    CGAL_assertion( amap!=NULL );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Test_split_attribute_functor_run<0> but "
-                              "0-attributes are disabled");
-
-    typedef typename CMap::template Attribute_handle<0>::type
-        Attribute_handle_0;
-
-    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
-                          typename CMap::Hash_function> found_attributes;
-    typename CMap::Dart_handle od=amap->null_handle;
-
-    int mark = amap->get_new_mark(); // to mark incident cells.
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it=modified_darts.begin();
-    for ( ; it!=modified_darts.end(); ++it )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-          (amap, *it, found_attributes, mark);
-
-      od=amap->other_extremity(*it);
-      if ( od!=amap->null_handle )
-        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-            (amap, od, found_attributes, mark);
-    }
-
-    // Now we unmark all the marked darts.
-    amap->negate_mark(mark);
-    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it, mark_modified_darts);
-
-      if ( !amap->is_marked(*it, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
-
-      od=amap->other_extremity(*it);
-      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-  }
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts2,
-                   int mark_modified_darts=-1)
-  {
-    CGAL_assertion( j!=0 && j!=1 );
-    CGAL_assertion( amap!=NULL );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Test_split_attribute_functor_run<0> but "
-                              "0-attributes are disabled");
-
-    typedef typename CMap::template Attribute_handle<0>::type
-        Attribute_handle_0;
-
-    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
-                          typename CMap::Hash_function> found_attributes;
-    typename CMap::Dart_handle od=amap->null_handle;
-
-    int mark = amap->get_new_mark(); // to mark incident cells.
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it=modified_darts.begin();
-    for ( ; it!=modified_darts.end(); ++it )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-          (amap, *it, found_attributes, mark);
-
-      od=amap->other_extremity(*it);
-      if ( od!=amap->null_handle )
-        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-            (amap, od, found_attributes, mark);
-    }
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it2=modified_darts2.begin();
-    for ( ; it2!=modified_darts2.end(); ++it2 )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-          (amap, *it2, found_attributes, mark);
-
-      od=amap->other_extremity(*it2);
-      if ( od!=amap->null_handle )
-        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-            (amap, od, found_attributes, mark);
-    }
-
-    // Now we unmark all the marked darts.
-    amap->negate_mark(mark);
-    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it, mark_modified_darts);
-
-      if ( !amap->is_marked(*it, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
-
-      od=amap->other_extremity(*it);
-      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
-    }
-    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it2, mark_modified_darts);
-
-      if ( !amap->is_marked(*it2, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, *it2, mark);
-
-      od=amap->other_extremity(*it2);
-      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-  }
-};
-// Specialization for i=0 and j=0.
-// For j==0 or j==1, we use only the version with two list of darts,
-// modified_darts are darts modified for beta0, and
-// modified_darts2 are darts modified for beta1.
-template<typename CMap, typename T>
-struct Test_split_attribute_functor_run<CMap, 0, 0, T>
-{
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   int =-1)
-  { CGAL_assertion(false); }
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts2,
-                   int mark_modified_darts=-1)
-  {
-    CGAL_assertion( amap!=NULL );
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<0>::value>=0,
-                              "Test_split_attribute_functor_run<0> but "
-                              "0-attributes are disabled");
-
-    typedef typename CMap::template Attribute_handle<0>::type
-        Attribute_handle_0;
-
-    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
-                          typename CMap::Hash_function> found_attributes;
-    typename CMap::Dart_handle od=amap->null_handle;
-
-    int mark = amap->get_new_mark(); // to mark incident cells.
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it=modified_darts.begin();
-    for ( ; it!=modified_darts.end(); ++it )
-    {
-      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-          (amap, *it, found_attributes, mark);
-    }
-    typename std::deque<typename CMap::Dart_handle>::const_iterator
-        it2=modified_darts2.begin();
-    for ( ; it2!=modified_darts2.end(); ++it2 )
-    {
-      od=amap->other_extremity(*it2);
-      if ( od!=amap->null_handle )
-        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
-            (amap, od, found_attributes, mark);
-    }
-
-    // Now we unmark all the marked darts.
-    amap->negate_mark(mark);
-    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it, mark_modified_darts);
-
-      if ( !amap->is_marked(*it, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
-    }
-    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
-    {
-      if ( mark_modified_darts!=-1 )
-        amap->unmark(*it2, mark_modified_darts);
-
-      od=amap->other_extremity(*it2);
-      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
-        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(mark) );
-    amap->free_mark(mark);
-  }
-};
-// Specialization for i=0 and j=1.
-// Equivalent to i=0 and j=0.
-template<typename CMap, typename T>
-struct Test_split_attribute_functor_run<CMap, 0, 1, T>
-{
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   int =-1)
-  { CGAL_assertion(false); }
-  static void run( CMap* amap, const std::deque<typename CMap::Dart_handle>&
-                   modified_darts,
-                   const std::deque<typename CMap::Dart_handle>&
-                   modified_darts2, int mark_modified_darts=-1)
-  { CGAL::internal::Test_split_attribute_functor_run<CMap, 0, 0, T>::
-        run(amap, modified_darts, modified_darts2, mark_modified_darts); }
-};
-// Specialization for void attributes.
-template<typename CMap, unsigned int i, unsigned int j>
-struct Test_split_attribute_functor_run<CMap, i, j, CGAL::Void>
-{
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   int=-1)
-  {}
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   const std::deque<typename CMap::Dart_handle>&, int=-1)
-  {}
-};
-// Specialization for i=j.
-template<typename CMap, unsigned int i, typename T>
-struct Test_split_attribute_functor_run<CMap, i, i, T>
-{
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   int=-1)
-  {}
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   const std::deque<typename CMap::Dart_handle>&, int=-1)
-  {}
-};
-// Specialization for i=1 and j=0 (edge attributes are not modified
-// when we modify beta_0).
-template<typename CMap, typename T>
-struct Test_split_attribute_functor_run<CMap, 1, 0, T>
-{
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   int=-1)
-  {}
-  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
-                   const std::deque<typename CMap::Dart_handle>&, int=-1)
-  {}
-};
-// ************************************************************************
-/// Functor used for unsew to test if i-attributes are split after an
-/// operation, except for j-attributes.
-/// We define run<i> to allows to use this functor with
-/// Foreach_enabled_attributes.
-template<typename CMap, unsigned int j=CMap::dimension+1>
-struct Test_split_attribute_functor
-{
-  // Test the split of i-attributes, for all modified darts given in
-  // modified_darts, and marked with mark_modified_darts.
-  // For each split attribute, create a new i-attribute, associate
-  // it with the new i-cell and call onsplit functors.
-  template <unsigned int i>
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   int mark_modified_darts=-1)
-  {
-    CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
-        run(amap, modified_darts, mark_modified_darts);
-  }
-  template <unsigned int i>
-  static void run( CMap* amap,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts,
-                   const std::deque<typename CMap::Dart_handle>
-                   &modified_darts2,
-                   int mark_modified_darts=-1)
-  {
-    CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
-        run(amap, modified_darts, modified_darts2, mark_modified_darts);
-  }
-};
-// ************************************************************************
-} // namespace internal
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_internal_functors.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_internal_functors.h
deleted file mode 100644
index bcf4b0c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_internal_functors.h
+++ /dev/null
@@ -1,951 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
-#define CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
-
-#include <CGAL/Dart_const_iterators.h>
-#include <CGAL/Combinatorial_map_basic_operations.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/Kernel_traits.h>
-#include <vector>
-#include <boost/mpl/has_xxx.hpp>
-
-/* Definition of functors used internally to manage attributes (we need
- * functors as attributes are stored in tuple, thus all the access must be
- * done at compiling time). Some of these functors are used with
- * Foreach_enabled_attributes to iterate through all the non void attribs.
- * Functors allowing to group/ungroup attributes are defined in
- * internal/Combinatorial_map_group_functors.h. Public functions are defined
- * in Combinatorial_map_functors.h.
- *
- * internal::Call_split_functor<CMap,i> to call the OnSplit functors on two
- *    given i-attributes.
- *
- * internal::Call_merge_functor<CMap,i> to call the OnMerge functors on two
- *    given i-attributes.
- *
- * internal::Test_is_valid_attribute_functor<CMap> to test if a given i-cell is
- *    valid (all its darts are linked to the same attribute, no other dart is
- *    linked with this attribute).
- *
- * internal::Count_cell_functor<CMap> to count the nuber of i-cells.
- *
- * internal::Count_bytes_one_attribute_functor<CMap> to count the memory
- *    occupied by i-attributes.
- *
- * internal::Decrease_attribute_functor<CMap> to decrease by one the ref
- *    counting of a given i-attribute.
- *
- * internal::Beta_functor<Dart, i...> to call several beta on the given dart.
- *   Indices are given as parameter of the run function.
- *
- * internal::Beta_functor_static<Dart, i...> to call several beta on the given
- *   dart. Indices are given as template arguments.
- *
- * internal::Set_i_attribute_of_dart_functor<CMap, i> to set the i-attribute
- *   of a given dart.
- *
- * internal::Test_is_same_attribute_functor<Map1, Map2> to test if two
- *   i-attributes of two darts are isomorphic.
- *
- * internal::Is_attribute_has_non_void_info<Attr> to test if the attribute
- *   Attr is non Void and has an non void Info as inner type
- *
- * internal::Is_attribute_has_point<Attr> to test if the attribute
- *   Attr is non Void and has a Point inner type
- *
- * internal::Reverse_orientation_of_map_functor<CMap> to reverse the
- *   orientation of a whole combinatorial map
- *
- * internal::Reverse_orientation_of_connected_component_functor to reverse
- *   the orientation of a connected component in a cmap
- *
- * internal::Init_attribute_functor to initialize all attributes to NULL.
- *
- */
-
-namespace CGAL
-{
-// ****************************************************************************
-namespace internal
-{
-// ****************************************************************************
-// Functor which call Functor::operator() on the two given cell_attributes
- template<typename CMap, typename Cell_attribute, typename Functor>
-struct Apply_cell_functor
-{
-  static void run(Cell_attribute& acell1, Cell_attribute& acell2)
-  {
-    Functor() (acell1, acell2);
-  }
-};
-//...except for Null_functor.
-template<typename CMap, typename Cell_attribute>
-struct Apply_cell_functor<CMap, Cell_attribute, CGAL::Null_functor>
-{
-  static void run(Cell_attribute&, Cell_attribute&)
-  {}
-};
-// ****************************************************************************
-// Functor used to call the On_split functor between the two given darts.
-template<typename CMap, unsigned int i,
-         typename Enabled=typename CMap::
-       #ifndef CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG
-         template
-       #endif
-         Attribute_type<i>::type>
-struct Call_split_functor
-{
-  typedef typename CMap::template Attribute_type<i>::type Attribute;
-  typedef typename Attribute::On_split On_split;
-
-  static void
-  run(CMap* amap, typename CMap::template Attribute_handle<i>::type a1,
-      typename CMap::template Attribute_handle<i>::type a2)
-  {
-    // Static version
-    CGAL::internal::Apply_cell_functor<CMap, Attribute, On_split>::
-      run(amap->template get_attribute<i>(a1),
-          amap->template get_attribute<i>(a2));
-    // Dynamic version
-    if ( CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
-         (amap->m_onsplit_functors) )
-      CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
-        (amap->m_onsplit_functors) (amap->template get_attribute<i>(a1),
-                                    amap->template get_attribute<i>(a2));
-  }
-};
-// Specialization for disabled attributes.
-template<typename CMap,unsigned int i>
-struct Call_split_functor<CMap, i, CGAL::Void>
-{
-  static void run(typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// ****************************************************************************
-// Functor used to call the On_merge functor between the two given darts.
-template<typename CMap,unsigned int i,
-         typename Enabled=typename CMap::
-       #ifndef CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG
-         template
-       #endif
-         Attribute_type<i>::type>
-struct Call_merge_functor
-{
-  typedef typename CMap::template Attribute_type<i>::type Attribute;
-  typedef typename Attribute::On_merge On_merge;
-
-  static void
-  run(CMap* amap, typename CMap::template Attribute_handle<i>::type a1,
-      typename CMap::template Attribute_handle<i>::type a2)
-  {
-    // Static version
-    CGAL::internal::Apply_cell_functor<CMap, Attribute, On_merge>::
-      run(amap->template get_attribute<i>(a1),
-          amap->template get_attribute<i>(a2));
-    // Dynamic version
-    if ( CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
-         (amap->m_onmerge_functors) )
-      CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
-        (amap->m_onmerge_functors) (amap->template get_attribute<i>(a1),
-                                    amap->template get_attribute<i>(a2));
-  }
-};
-// Specialization for disabled attributes.
-template<typename CMap,unsigned int i>
-struct Call_merge_functor<CMap, i, CGAL::Void>
-{
-  static void run(CMap*, typename CMap::Dart_handle,
-                  typename CMap::Dart_handle)
-  {}
-};
-// ****************************************************************************
-/// Functor used to test if a cell is valid
-template<typename CMap>
-struct Test_is_valid_attribute_functor
-{
-  /** Test the validity of a i-cell-attribute.
-   * ie all the darts belonging to a i-cell are linked to the same attribute.
-   * @param adart a dart.
-   * @param amark a mark used to mark darts of the i-cell.
-   * @return true iff all the darts of the i-cell link to the same attribute.
-   */
-  template <unsigned int i>
-  static void run(const CMap* amap,
-                  typename CMap::Dart_const_handle adart,
-                  std::vector<int>* marks, bool *ares)
-  {
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<i>::value>=0,
-                              "Test_is_valid_attribute_functor<i> but "
-                              " i-attributes are disabled");
-
-    int amark = (*marks)[i];
-    if ( amap->is_marked(adart, amark) ) return; // dart already test.
-
-    bool valid = true;
-    bool found_dart = false;
-
-    typename CMap::template Attribute_const_handle<i>::type
-        a=amap->template attribute<i>(adart);
-
-    unsigned int nb = 0;
-    for ( typename
-            CMap::template Dart_of_cell_basic_const_range<i>::const_iterator
-            it=amap->template darts_of_cell_basic<i>(adart, amark).begin();
-          it.cont(); ++it )
-    {
-      if ( amap->template attribute<i>(it) != a )
-      {
-        std::cout<<"ERROR: an attribute of the "<<i<<"-cell is different. cur:";
-        amap->template display_attribute<i>(a);
-        std::cout<<" != first:";
-        amap->template display_attribute<i>(amap->template attribute<i>(it));
-        std::cout<<" for dart ";
-        amap->display_dart(it);
-        std::cout<<std::endl;
-        valid=false;
-      }
-
-      if ( a!=amap->null_handle && it==amap->template dart_of_attribute<i>(a) )
-        found_dart=true;
-
-      amap->mark(it, amark);
-      ++nb;
-    }
-
-    if ( a!=amap->null_handle )
-    {
-      if ( amap->template get_attribute<i>(a).get_nb_refs()!=nb )
-      {
-        std::cout<<"ERROR: the number of reference of an "<<i
-                <<"-attribute is not correct. Count: "<<nb
-               <<" != Store in the attribute: "
-              <<amap->template get_attribute<i>(a).get_nb_refs()
-             <<" for dart ";
-        amap->display_dart(adart); std::cout<<std::endl;
-        valid=false;
-      }
-      if ( !amap->template get_attribute<i>(a).is_valid() )
-      {
-        std::cout<<"ERROR: the dart associated with an "<<i
-                <<"-attribute is NULL for dart ";
-        amap->display_dart(adart); std::cout<<std::endl;
-        valid=false;
-      }
-      if ( amap->template dart_of_attribute<i>(a)!=amap->null_handle &&
-           !found_dart )
-      {
-        std::cout<<"ERROR: the non NULL dart of an "<<i
-                <<"-attribute does not belong to the cell."<<std::endl;
-        valid=false;
-      }
-    }
-
-    if ( !valid ) (*ares)=false;
-  }
-};
-// ****************************************************************************
-/// Functor used to correct invalid attributes in an i-cell
-template<typename CMap>
-struct Correct_invalid_attributes_functor
-{
-  template <unsigned int i>
-  static void run(CMap* amap,
-                  typename CMap::Dart_handle adart,
-                  std::vector<int>* marks)
-  {
-    // std::cout << "Correct_invalid_attributes_functor for " << i << "-cell" << std::endl;
-    CGAL_static_assertion_msg(CMap::Helper::template
-                              Dimension_index<i>::value>=0,
-                              "Correct_invalid_attributes_functor<i> but "
-                              " i-attributes are disabled");
-
-    int amark = (*marks)[i];
-    typename CMap::template Attribute_handle<i>::type
-        a=amap->template attribute<i>(adart);
-
-    // dart already test, or without i-attribute
-    if ( amap->is_marked(adart, amark) ) return;
-    if ( a==amap->null_handle) { amap->mark(adart, amark); return; }
-
-    // We search if all the darts of the i-cell has the same i-attrib, and we count
-    // the number of darts of the i-cell.
-    unsigned int nb=0;
-    bool found_dart = false;
-
-    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i>
-            it(*amap, adart, amark); it.cont(); ++it, ++nb )
-    {
-      if ( a!=amap->template attribute<i>(it) )
-      {
-        // If two different i-attributes, we could call on_split ?
-        amap->template set_dart_attribute<i>(it, a);
-      }
-      if (it==amap->template dart_of_attribute<i>(a))
-      {
-        found_dart = true;
-      }
-      amap->mark(it, amark);
-    }
-
-    if (!found_dart)
-    {
-      // the current i-attrib does not belong to the i-cell
-      // so we affect it to the first dart of the i-cell
-      amap->template set_dart_of_attribute<i>(a,adart);
-    }
-
-    // If the i-cell has less darts than the ref counter of the i-attribute,
-    // the i-attribute is shared by different cells => we duplicate it.
-    if ( nb!=amap->template get_attribute<i>(a).get_nb_refs() )
-    {
-      typename CMap::template Attribute_handle<i>::type
-        a2=amap->template create_attribute<i>(amap->template get_attribute<i>(a));
-      amap->template set_attribute<i>(adart, a2);
-    }
-  }
-};
-// ****************************************************************************
-/// Functor for counting i-cell
-template<typename CMap>
-struct Count_cell_functor
-{
-  template <unsigned int i>
-  static void run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart,
-                   std::vector<int>* amarks,
-                   std::vector<unsigned int>* ares )
-  {
-    if ( (*amarks)[i]!=-1 && !amap->is_marked(adart, (*amarks)[i]) )
-    {
-      ++ (*ares)[i];
-      CGAL::mark_cell<CMap,i>(*amap, adart, (*amarks)[i]);
-    }
-  }
-};
-// ****************************************************************************
-/// Functor for counting the memory occupation of attributes
-/// Be careful not reentrant !!! TODO a  Foreach_enabled_attributes
-/// taking an instance of a functor as argument allowing to compute
-/// and return values.
-template<typename CMap>
-struct Count_bytes_one_attribute_functor
-{
-  template <unsigned int i>
-  static void run( const CMap* amap )
-  {
-    res += amap->template attributes<i>().capacity()*
-      sizeof(typename CMap::template Attribute_type<i>::type);
-  }
-
-  static typename CMap::size_type res;
-};
-template<typename CMap>
-typename CMap::size_type Count_bytes_one_attribute_functor<CMap>::res = 0;
-
-template<typename CMap>
-struct Count_bytes_all_attributes_functor
-{
-  static typename CMap::size_type run( const CMap& amap )
-  {
-    CGAL::internal::Count_bytes_one_attribute_functor<CMap>::res = 0;
-    CMap::Helper::template Foreach_enabled_attributes
-      <CGAL::internal::Count_bytes_one_attribute_functor<CMap> >::run(&amap);
-    return CGAL::internal::Count_bytes_one_attribute_functor<CMap>::res;
-  }
-};
-// ****************************************************************************
-/// Decrease the cell attribute reference counting of the given dart.
-/// The attribute is removed if there is no more darts linked with it.
-template<typename CMap, unsigned int i, typename T=
-         typename CMap::template Attribute_type<i>::type>
-struct Decrease_attribute_functor_run
-{
-  static void run(CMap* amap, typename CMap::Dart_handle adart)
-  {
-    if ( amap->template attribute<i>(adart)!=CMap::null_handle )
-    {
-      amap->template get_attribute<i>(amap->template attribute<i>(adart)).
-        dec_nb_refs();
-      if ( amap->template get_attribute<i>(amap->template attribute<i>(adart)).
-           get_nb_refs()==0 )
-        amap->template erase_attribute<i>(amap->template attribute<i>(adart));
-    }
-  }
-};
-/// Specialization for void attributes.
-template<typename CMap, unsigned int i>
-struct Decrease_attribute_functor_run<CMap, i, CGAL::Void>
-{
-  static void run(CMap*, typename CMap::Dart_handle)
-  {}
-};
-// ****************************************************************************
-/// Functor used to call decrease_attribute_ref_counting<i>
-/// on each i-cell attribute enabled
-template<typename CMap>
-struct Decrease_attribute_functor
-{
-  template <unsigned int i>
-  static void run(CMap* amap, typename CMap::Dart_handle adart)
-  { CGAL::internal::Decrease_attribute_functor_run<CMap,i>::run(amap, adart); }
-};
-// ****************************************************************************
-/// Functor used to initialize all attributes to NULL.
-template<typename CMap>
-struct Init_attribute_functor
-{
-  template <int i>
-  static void run(CMap* amap, typename CMap::Dart_handle adart)
-  { amap->template set_dart_attribute<i>(adart, CMap::null_handle); }
-};
-// ****************************************************************************
-/// Functor used to set the i-attribute of a given dart.
-template<typename CMap, unsigned int i, typename T=
-         typename CMap::template Attribute_type<i>::type>
-struct Set_i_attribute_of_dart_functor
-{
-  static void run( CMap* amap, typename CMap::Dart_handle dh,
-                   typename CMap::template Attribute_handle<i>::type ah )
-  {
-    amap->template set_dart_attribute<i>(dh, ah);
-  }
-};
-/// Specialization for void attributes.
-template<typename CMap, unsigned int i>
-struct Set_i_attribute_of_dart_functor<CMap, i, CGAL::Void>
-{
-  static void run( CMap*, typename CMap::Dart_handle,
-                   typename CMap::template Attribute_handle<i>::type)
-  {}
-};
-// ****************************************************************************
-// Functor allowing to test if two info are the same or not
-template<typename Map1, typename Map2, unsigned int i,
-         typename Attr1Info1=typename Map1::template Attribute_type<i>::type::Info,
-         typename Info2=typename Map2::template Attribute_type<i>::type::Info>
-struct Is_same_info
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::template Attribute_const_handle<i>::type,
-                  typename Map2::template Attribute_const_handle<i>::type)
-  { return false; }
-};
-
-template<typename Map1, typename Map2, unsigned int i, typename Info1>
-struct Is_same_info<Map1, Map2, i, Info1, void>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::template Attribute_const_handle<i>::type,
-                  typename Map2::template Attribute_const_handle<i>::type)
-  { return false; }
-};
-
-template<typename Map1, typename Map2, unsigned int i, typename Info2>
-struct Is_same_info<Map1, Map2, i, void, Info2>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::template Attribute_const_handle<i>::type,
-                  typename Map2::template Attribute_const_handle<i>::type)
-  { return false; }
-};
-
-template<typename Map1, typename Map2, unsigned int i>
-struct Is_same_info<Map1, Map2, i, void, void>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::template Attribute_const_handle<i>::type,
-                  typename Map2::template Attribute_const_handle<i>::type)
-  { return true; }
-};
-
-template<typename Map1, typename Map2, unsigned int i, typename Info>
-struct Is_same_info<Map1, Map2, i, Info, Info>
-{
-  static bool run(const Map1* m1, const Map2* m2,
-                  typename Map1::template Attribute_const_handle<i>::type a1,
-                  typename Map2::template Attribute_const_handle<i>::type a2)
-  { return m1->template info_of_attribute<i>(a1)==
-      m2->template info_of_attribute<i>(a2); }
-};
-
-// Case of two non void type
-template<typename Map1, typename Map2, unsigned int i,
-         typename T1=typename Map1::template Attribute_type<i>::type,
-         typename T2=typename Map2::template Attribute_type<i>::type>
-struct Is_same_attribute_info_functor
-{
-  static bool run(const Map1* m1, const Map2* m2,
-                  typename Map1::Dart_const_handle dh1,
-                  typename Map2::Dart_const_handle dh2)
-  {
-    if (m1->template attribute<i>(dh1)==Map1::null_handle &&
-        m2->template attribute<i>(dh2)==Map2::null_handle)
-      return true;
-
-    if (m1->template attribute<i>(dh1)==Map1::null_handle ||
-        m2->template attribute<i>(dh2)==Map2::null_handle)
-      return false;
-
-    return
-      Is_same_info<Map1, Map2, i>::run(m1, m2,
-                                       m1->template attribute<i>(dh1),
-                                       m2->template attribute<i>(dh2));
-  }
-};
-
-// Case T1==void
-template <typename Map1, typename Map2, unsigned int i, typename T2>
-struct Is_same_attribute_info_functor<Map1, Map2, i, Void, T2>
-{
-  static bool run(const Map1*, const Map2* m2,
-                  typename Map1::Dart_const_handle,
-                  typename Map2::Dart_const_handle dh2)
-  { return m2->template attribute<i>(dh2)==Map2::null_handle; }
-};
-
-// Case T2==void
-template <typename Map1, typename Map2, unsigned int i, typename T1>
-struct Is_same_attribute_info_functor<Map1, Map2, i, T1, Void>
-{
-  static bool run(const Map1* m1, const Map2*,
-                  typename Map1::Dart_const_handle dh1,
-                  typename Map2::Dart_const_handle)
-  { return m1->template attribute<i>(dh1)==Map1::null_handle; }
-};
-
-// Case T1==T2==void
-template <typename Map1, typename Map2, unsigned int i>
-struct Is_same_attribute_info_functor<Map1, Map2, i, Void, Void>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::Dart_const_handle,
-                  typename Map2::Dart_const_handle)
-  { return true; }
-};
-
-// ****************************************************************************
-// Functor allowing to test if two points are the same or not.
-// Here we know both attributes have points.
-template< typename Attr1, typename Attr2,
-          typename Point1=typename Attr1::Point,
-          typename Point2=typename Attr2::Point,
-          typename T1=typename Ambient_dimension<Point1>::type >
-struct Is_same_point
-{
-  static bool run(const Attr1&, const Attr2&)
-  { return false; }
-};
-
-template< typename Attr1, typename Attr2, typename Point>
-struct Is_same_point<Attr1, Attr2, Point, Point, Dimension_tag<2> >
-{
-  static bool run(const Attr1& a1, const Attr2& a2)
-  { return typename Kernel_traits<Point>::Kernel::Equal_2()
-        (a1.point(),a2.point()); }
-};
-
-template< typename Attr1, typename Attr2, typename Point>
-struct Is_same_point<Attr1, Attr2, Point, Point, Dimension_tag<3> >
-{
-  static bool run(const Attr1& a1, const Attr2& a2)
-  { return typename Kernel_traits<Point>::Kernel::Equal_3()
-        (a1.point(),a2.point()); }
-};
-
-template< typename Attr1, typename Attr2, typename Point>
-struct Is_same_point<Attr1, Attr2, Point, Point, Dynamic_dimension_tag >
-{
-  static bool run(const Attr1& a1, const Attr2& a2)
-  { return typename Kernel_traits<Point>::Kernel::Equal_d()
-        (a1.point(),a2.point()); }
-};
-
-// Case of two non void type, with two points
-template<typename Map1, typename Map2,
-         typename T1, typename T2, bool Withpoint1, bool Withpoint2, int i>
-struct Is_same_attribute_point_functor
-{
-  static bool run(const Map1* m1, const Map2* m2,
-                  typename Map1::Dart_const_handle dh1,
-                  typename Map2::Dart_const_handle dh2)
-  {
-    CGAL_static_assertion( Withpoint1==true && Withpoint2==true );
-    if (m1->template attribute<i>(dh1)==Map1::null_handle &&
-        m2->template attribute<i>(dh2)==Map2::null_handle)
-      return true;
-
-    if (m1->template attribute<i>(dh1)==Map1::null_handle ||
-        m2->template attribute<i>(dh2)==Map2::null_handle)
-      return false;
-
-    return
-      Is_same_point<T1,T2>::run
-      (m1->template get_attribute<i>(m1->template attribute<i>(dh1)),
-       m2->template get_attribute<i>(m2->template attribute<i>(dh2)));
-  }
-};
-
-// Case of two non void type, first without point
-template<typename Map1, typename Map2,
-         typename T1, typename T2, int i>
-struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, false, true, i>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::Dart_const_handle,
-                  typename Map2::Dart_const_handle)
-  { return false; }
-};
-
-// Case of two non void type, second without point
-template<typename Map1, typename Map2,
-         typename T1, typename T2, int i>
-struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, true, false, i>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::Dart_const_handle,
-                  typename Map2::Dart_const_handle)
-  { return false; }
-};
-
-// Case of two non void type, both without point
-template<typename Map1, typename Map2,
-         typename T1, typename T2, int i>
-struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, false, false, i>
-{
-  static bool run(const Map1*, const Map2*,
-                  typename Map1::Dart_const_handle,
-                  typename Map2::Dart_const_handle)
-  { return true; }
-};
-// ****************************************************************************
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_point,Point,false)
-
-template<typename Attr, typename Info=typename Attr::Info>
-struct Is_nonvoid_attribute_has_non_void_info
-{
-  static const bool value=true;
-};
-template<typename Attr>
-struct Is_nonvoid_attribute_has_non_void_info<Attr, void>
-{
-  static const bool value=false;
-};
-
-template<typename Attr>
-struct Is_attribute_has_non_void_info
-{
-  static const bool value=Is_nonvoid_attribute_has_non_void_info<Attr>::value;
-};
-template<>
-struct Is_attribute_has_non_void_info<CGAL::Void>
-{
-  static const bool value=false;
-};
-// ****************************************************************************
-template<typename Attr>
-struct Is_attribute_has_point
-{ static const bool value=Has_point<Attr>::value; };
-// ****************************************************************************
-/// Test if the two darts are associated with the same attribute.
-template<typename Map1, typename Map2>
-struct Test_is_same_attribute_functor
-{
-  template<unsigned int i>
-  static void run(const Map1* m1, const Map2* m2,
-                  typename Map1::Dart_const_handle dh1,
-                  typename Map2::Dart_const_handle dh2 )
-  {
-    if (value)
-    {
-      value = Is_same_attribute_info_functor
-        <Map1, Map2, i>::run(m1, m2, dh1, dh2);
-    }
-    if (value)
-    {
-      value = Is_same_attribute_point_functor
-          <Map1, Map2,
-          typename Map1::template Attribute_type<i>::type,
-          typename Map2::template Attribute_type<i>::type,
-          Is_attribute_has_point<typename Map1::template
-          Attribute_type<i>::type>::value,
-          Is_attribute_has_point<typename Map2::template
-          Attribute_type<i>::type>::value, i>::run(m1, m2, dh1, dh2);
-    }
-  }
-  static bool value;
-};
-template<typename Map1, typename Map2>
-bool Test_is_same_attribute_functor<Map1, Map2>::value = true;
-// ****************************************************************************
-/// Functor to reverse the orientation of a combinatorial map,
-/// when 0-attributes are non void.
-template <typename CMap, typename Attrib =
-          typename CMap::Helper::template Attribute_type<0>::type>
-struct Reverse_orientation_of_map_functor
-{
-  static void run(CMap *amap)
-  {
-    int mark = amap->get_new_mark();
-    CGAL_precondition(amap->is_whole_map_unmarked(mark));
-    CGAL_precondition(amap->is_valid());
-    for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
-           last_dart = amap->darts().end(); current_dart!=last_dart;
-         ++current_dart)
-    {
-      if (amap->is_marked(current_dart, mark)) continue;
-      typename CMap::Dart_handle first_dart_in_cell= current_dart;
-      typename CMap::Dart_handle current_dart_in_cell=
-        amap->beta(first_dart_in_cell,1);
-      typename CMap::Helper::template Attribute_handle<0>::type
-        attribute_for_first_dart=amap->template attribute<0>(current_dart_in_cell);
-      amap->template get_attribute<0>(attribute_for_first_dart).inc_nb_refs();
-      do {
-        amap->mark(current_dart_in_cell, mark);
-        typename CMap::Dart_handle previous_dart_in_cell=
-          amap->beta(current_dart_in_cell,0);
-        typename CMap::Dart_handle next_dart_in_cell=
-          amap->beta(current_dart_in_cell,1);
-        typename CMap::Helper::template Attribute_handle<0>::type
-          next_attribute=amap->template attribute<0>(next_dart_in_cell);
-        // One line error???
-        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-          run(amap, current_dart_in_cell, next_attribute);
-        amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
-        amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
-        current_dart_in_cell = amap->beta(current_dart_in_cell,0);
-      }
-      while (current_dart_in_cell != first_dart_in_cell);
-      amap->mark(current_dart_in_cell, mark);
-      typename CMap::Dart_handle previous_dart_in_cell=
-        amap->beta(current_dart_in_cell,0);
-      typename CMap::Dart_handle next_dart_in_cell=
-        amap->beta(current_dart_in_cell,1);
-      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-        run(amap, current_dart_in_cell, attribute_for_first_dart);
-      amap->template get_attribute<0>(attribute_for_first_dart).dec_nb_refs();
-      amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
-      amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
-    }
-    amap->negate_mark(mark);
-    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
-    CGAL_postcondition(amap->is_valid());
-    amap->free_mark(mark);
-  }
-};
-// ****************************************************************************
-// Specialization for void 0-attributes
-template <typename CMap>
-struct Reverse_orientation_of_map_functor<CMap, CGAL::Void>
-{
-  static void run(CMap *amap)
-  {
-    int mark = amap->get_new_mark();
-    CGAL_precondition(amap->is_whole_map_unmarked(mark));
-    CGAL_precondition(amap->is_valid());
-    for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
-         last_dart = amap->darts().end(); current_dart!=last_dart;
-         ++current_dart)
-    {
-      if (amap->is_marked(current_dart, mark)) continue;
-      for (typename CMap::template Dart_of_cell_range<2>::iterator
-             current_dart_in_cell=amap->template darts_of_cell<2>(current_dart).
-             begin(), last_dart_in_cell=amap->template darts_of_cell<2>
-             (current_dart).end(); current_dart_in_cell!=last_dart_in_cell;
-           ++current_dart_in_cell)
-      {
-        amap->mark(current_dart_in_cell, mark);
-        typename CMap::Dart_handle previous_dart_in_cell=
-          current_dart_in_cell->beta(0);
-        typename CMap::Dart_handle next_dart_in_cell=
-          current_dart_in_cell->beta(1);
-        current_dart_in_cell->basic_link_beta(previous_dart_in_cell, 1);
-        current_dart_in_cell->basic_link_beta(next_dart_in_cell, 0);
-      }
-    }
-    amap->negate_mark(mark);
-    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
-    CGAL_postcondition(amap->is_valid());
-    amap->free_mark(mark);
-  }
-};
-// ****************************************************************************
-/// Functor to reverse the orientation of a connected component in a given map
-template <typename CMap, typename Attrib=
-          typename CMap::Helper::template Attribute_type<0>::type>
-struct Reverse_orientation_of_connected_component_functor
-{
-  static void run(CMap *amap, typename CMap::Dart_handle adart)
-  {
-    int mark = amap->get_new_mark();
-    CGAL_precondition(amap->is_whole_map_unmarked(mark));
-    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
-           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
-           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
-           (adart).end(); current_dart!=last_dart; ++current_dart)
-    {
-      if (amap->is_marked(current_dart, mark)) continue;
-      typename CMap::Dart_handle first_dart_in_cell=current_dart;
-      typename CMap::Dart_handle current_dart_in_cell=
-        amap->beta(first_dart_in_cell,1);
-      typename CMap::Helper::template Attribute_handle<0>::type
-        attribute_for_first_dart=amap->template attribute<0>(current_dart_in_cell);
-      amap->template get_attribute<0>(attribute_for_first_dart).inc_nb_refs();
-      do {
-        amap->mark(current_dart_in_cell, mark);
-        typename CMap::Dart_handle previous_dart_in_cell=
-          amap->beta(current_dart_in_cell,0);
-        typename CMap::Dart_handle next_dart_in_cell=
-          amap->beta(current_dart_in_cell,1);
-        typename CMap::Helper::template Attribute_handle<0>::type
-          next_attribute=amap->template attribute<0>(next_dart_in_cell);
-
-        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-          run(amap, current_dart_in_cell, next_attribute);
-        amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
-        amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
-        current_dart_in_cell = amap->beta(current_dart_in_cell,0);
-      }
-      while (current_dart_in_cell != first_dart_in_cell);
-      amap->mark(current_dart_in_cell, mark);
-      typename CMap::Dart_handle previous_dart_in_cell=
-        amap->beta(current_dart_in_cell,0);
-      typename CMap::Dart_handle next_dart_in_cell=
-        amap->beta(current_dart_in_cell,1);
-      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
-          run(amap, current_dart_in_cell, attribute_for_first_dart);
-      amap->template get_attribute<0>(attribute_for_first_dart).dec_nb_refs();
-      amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
-      amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
-    }
-    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
-           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
-           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
-           (adart).end(); current_dart!=last_dart; ++current_dart)
-    {
-      amap->unmark(current_dart, mark);
-    }
-    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
-    amap->free_mark(mark);
-  }
-};
-// ****************************************************************************
-// Specialization for void 0-attributes
-template <typename CMap>
-struct Reverse_orientation_of_connected_component_functor<CMap, CGAL::Void>
-{
-  static void run(CMap *amap, typename CMap::Dart_handle adart)
-  {
-    int mark = amap->get_new_mark();
-    CGAL_precondition(amap->is_whole_map_unmarked(mark));
-    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
-           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
-           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
-           (adart).end(); current_dart!=last_dart; ++current_dart)
-    {
-      if (amap->is_marked(current_dart, mark)) continue;
-      for (typename CMap::template Dart_of_cell_range<2>::iterator
-             current_dart_in_cell=amap->template darts_of_cell<2>(current_dart).
-             begin(), last_dart_in_cell=amap->template darts_of_cell<2>
-             (current_dart).end(); current_dart_in_cell!=last_dart_in_cell;
-           ++current_dart_in_cell)
-      {
-        amap->mark(current_dart_in_cell, mark);
-        typename CMap::Dart_handle previous_dart_in_cell=
-          current_dart_in_cell->beta(0);
-        typename CMap::Dart_handle next_dart_in_cell=
-          current_dart_in_cell->beta(1);
-        current_dart_in_cell->basic_link_beta(previous_dart_in_cell, 1);
-        current_dart_in_cell->basic_link_beta(next_dart_in_cell, 0);
-      }
-    }
-    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
-           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
-           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
-           (adart).end(); current_dart!=last_dart; ++current_dart)
-    {
-      amap->unmark(current_dart, mark);
-    }
-    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
-    amap->free_mark(mark);
-  }
-};
-// ****************************************************************************
-// Beta functor, used to combine several beta.
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-template<typename CMap, typename Dart_handle, typename ... Betas>
-struct Beta_functor;
-
-template<typename CMap, typename Dart_handle>
-struct Beta_functor<CMap, Dart_handle, int>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart, int B)
-  { return AMap->get_beta(ADart, B); }
-};
-
-template<typename CMap, typename Dart_handle>
-struct Beta_functor<CMap, Dart_handle, unsigned int>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart, unsigned int B)
-  { return  AMap->get_beta(ADart, B); }
-};
-
-template<typename CMap, typename Dart_handle, typename ... Betas>
-struct Beta_functor<CMap, Dart_handle, int, Betas...>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart, int B, Betas... betas)
-  { return Beta_functor<CMap, Dart_handle, Betas...>::
-      run(AMap, AMap->get_beta(ADart, B), betas...); }
-};
-
-template<typename CMap, typename Dart_handle, typename ... Betas>
-struct Beta_functor<CMap, Dart_handle, unsigned int, Betas...>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart, unsigned int B,
-                         Betas... betas)
-  { return Beta_functor<CMap, Dart_handle, Betas...>::
-      run(AMap, AMap->get_beta(ADart, B), betas...); }
-};
-// ****************************************************************************
-template<typename CMap, typename Dart_handle, int ... Betas>
-struct Beta_functor_static;
-
-template<typename CMap, typename Dart_handle, int B>
-struct Beta_functor_static<CMap, Dart_handle, B>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart)
-  { return AMap->template get_beta<B>(ADart); }
-};
-
-template<typename CMap, typename Dart_handle, int B, int ... Betas>
-struct Beta_functor_static<CMap, Dart_handle, B, Betas...>
-{
-  static Dart_handle run(CMap* AMap, Dart_handle ADart)
-  { return Beta_functor_static<CMap, Dart_handle, Betas...>::
-        run(AMap, AMap->template get_beta<B>(ADart)); }
-};
-#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-// ****************************************************************************
-} // namespace internal
-} // namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_sewable.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_sewable.h
deleted file mode 100644
index e375327..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_sewable.h
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
-//
-#ifndef CGAL_COMBINATORIAL_MAP_SEWABLE_H
-#define CGAL_COMBINATORIAL_MAP_SEWABLE_H
-
-#include <CGAL/Dart_const_iterators.h>
-#include <CGAL/Unique_hash_map.h>
-
-/* Definition of functor used to test if two darts are i-sewable
- * (we use functors as there are different specializations).
- */
-namespace CGAL
-{
-#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
-namespace internal
-{
-// Generic case for 1<=i<=dimension, and 3<dim.
-template<typename CMap, unsigned int i, unsigned int dim=CMap::dimension>
-struct Is_sewable_functor
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    CGAL_assertion( 1<=i && i<=CMap::dimension );
-    CGAL_assertion( 3<dim );
-    if ( !amap->template is_free<i>(adart1) ||
-         !amap->template is_free<CGAL_BETAINV(i)>(adart2) )
-      return false;
-
-    if ( adart1==adart2 )
-    {
-      if ( i==1 ) return true;
-      return false;
-    }
-
-    // hash map to build the isomorphism between the two i-cells.
-    CGAL::Unique_hash_map<typename CMap::Dart_const_handle,
-        typename CMap::Dart_const_handle,
-        typename CMap::Hash_function> bijection;
-
-    int m1 = amap->get_new_mark();
-    int m2 = amap->get_new_mark();
-    CGAL::CMap_dart_const_iterator_basic_of_involution<CMap,i>
-        I1(*amap, adart1, m1);
-    CGAL::CMap_dart_const_iterator_basic_of_involution_inv<CMap,i>
-        I2(*amap, adart2, m2);
-    bool res = true;
-    int mbijection = amap->get_new_mark();
-
-    while ( res && I1.cont() && I2.cont() )
-    {
-      amap->mark(I1, mbijection);
-      bijection[I1]=I2;
-
-      CGAL_assertion( amap->template is_free<i>(I1) );
-      CGAL_assertion( amap->template is_free<CGAL_BETAINV(i)>(I2) );
-
-      // We can remove this constraint which is not required for
-      // combinatorial map definition, but which is quite "normal"
-      // Indeed in this case we try to i-sew an i-cell with itself (case
-      // of folded cells).
-      if ( i>1 && (I1==adart2 || I2==adart1) ) res=false;
-
-      if ( i>2)
-      {
-        if ( amap->template is_free<1>(I1) )
-        {
-          if ( !amap->template is_free<0>(I2) ) res=false;
-        }
-        else
-        {
-          if ( amap->template is_free<0>(I2) ) res=false;
-          else if ( amap->is_marked(amap->template beta<1>(I1), mbijection) )
-          {
-            if ( bijection[amap->template beta<1>(I1)]!=
-                 amap->template beta<0>(I2) )
-              res=false;
-          }
-        }
-      }
-
-      for ( unsigned int j=2; res && j<=CMap::dimension; ++j )
-      {
-        if ( j+1!=i && j!=i && j!=i+1 )
-        {
-          if ( amap->is_free(I1,j) )
-          {
-            if ( !amap->is_free(I2,j) ) res=false;
-          }
-          else
-          {
-            if ( amap->is_free(I2,j) ) res=false;
-            else if ( amap->is_marked(amap->beta(I1,j), mbijection) )
-            {
-              if ( bijection[amap->beta(I1,j)]!=amap->beta(I2,j) ) res=false;
-            }
-          }
-        }
-      }
-      ++I1; ++I2;
-    }
-    if ( I1.cont()!=I2.cont() )
-      res = false;
-
-    amap->negate_mark(m1);
-    amap->negate_mark(m2);
-    I1.rewind(); I2.rewind();
-    while ( amap->number_of_marked_darts(mbijection)>0 )
-    {
-      amap->unmark(I1, mbijection);
-      ++I1; ++I2;
-    }
-
-    CGAL_assertion( amap->is_whole_map_marked(m1) );
-    CGAL_assertion( amap->is_whole_map_marked(m2) );
-    CGAL_assertion( amap->is_whole_map_unmarked(mbijection) );
-    amap->free_mark(m1);
-    amap->free_mark(m2);
-    amap->free_mark(mbijection);
-
-    return res;
-  }
-};
-
-// Specialization for i=0 and 3<dim.
-template<typename CMap, unsigned int dim>
-struct Is_sewable_functor<CMap, 0, dim>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  { return Is_sewable_functor<CMap,1, dim>::run(amap, adart2, adart1); }
-};
-
-// Specialization for i=0 and dim=1.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 0, 1>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<0>(adart1) ||
-         !amap->template is_free<1>(adart2) )
-      return false;
-    return true;
-  }
-};
-// Specialization for i=1 and dim=1.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 1, 1>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<1>(adart1) ||
-         !amap->template is_free<0>(adart2) )
-      return false;
-    return true;
-  }
-};
-
-// Specialization for i=0 and dim=2.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 0, 2>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<0>(adart1) ||
-         !amap->template is_free<1>(adart2) )
-      return false;
-    return true;
-  }
-};
-// Specialization for i=1 and dim=2.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 1, 2>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<1>(adart1) ||
-         !amap->template is_free<0>(adart2) )
-      return false;
-    return true;
-  }
-};
-// Specialization for i=2 and dim=2.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 2, 2>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<2>(adart1) ||
-         !amap->template is_free<2>(adart2) || adart1==adart2 )
-      return false;
-    return true;
-  }
-};
-
-// Specialization for i=0 and dim=3.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 0, 3>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<0>(adart1) ||
-         !amap->template is_free<1>(adart2) )
-      return false;
-
-    if ( amap->template is_free<3>(adart1) )
-    {
-      if ( !amap->template is_free<3>(adart2) ) return false;
-      return true;
-    }
-
-    // Here adart1 is not 3-free
-    if ( amap->template is_free<3>(adart2) ) return false;
-
-    CGAL_assertion( amap->template is_free<1>(amap->template beta<3>(adart1)) &&
-                    amap->template is_free<0>(amap->template beta<3>(adart2)) );
-    return true;
-  }
-};
-// Specialization for i=1 and dim=3.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 1, 3>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<1>(adart1) ||
-         !amap->template is_free<0>(adart2) )
-      return false;
-
-    if ( amap->template is_free<3>(adart1) )
-    {
-      if ( !amap->template is_free<3>(adart2) ) return false;
-      return true;
-    }
-
-    // Here adart1 is not 3-free
-    if ( amap->template is_free<3>(adart2) ) return false;
-
-    CGAL_assertion( amap->template is_free<0>(amap->template beta<3>(adart1)) &&
-                    amap->template is_free<1>(amap->template beta<3>(adart2)) );
-    return true;
-  }
-};
-// Specialization for i=2 and dim=3.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 2, 3>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<2>(adart1) ||
-         !amap->template is_free<2>(adart2) || adart1==adart2 )
-      return false;
-    return true;
-  }
-};
-// Specialization for i=3 and dim=3.
-template<typename CMap>
-struct Is_sewable_functor<CMap, 3, 3>
-{
-  static bool run( const CMap* amap,
-                   typename CMap::Dart_const_handle adart1,
-                   typename CMap::Dart_const_handle adart2 )
-  {
-    if ( !amap->template is_free<3>(adart1) ||
-         !amap->template is_free<3>(adart2) )
-      return false;
-
-    CGAL::CMap_dart_const_iterator_basic_of_orbit<CMap,1> I1(*amap, adart1);
-    CGAL::CMap_dart_const_iterator_basic_of_orbit<CMap,0> I2(*amap, adart2);
-    bool res=true;
-    while (res && I1.cont() && I2.cont())
-    {
-      CGAL_assertion( amap->template is_free<3>(I1) ||
-                      amap->template is_free<3>(I2) );
-
-      // We can remove this constraint which is not required for
-      // combinatorial map definition, but which is quite "normal" as it avoid
-      // fold cells.
-      if ( I1==adart2 || I2==adart1 ) res=false;
-      else if ( I1.prev_operation()!=I2.prev_operation() ) res=false;
-
-      ++I1; ++I2;
-    }
-    if ( I1.cont()!=I2.cont() )
-      res=false;
-
-    return res;
-  }
-};
-
-} //namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_COMBINATORIAL_MAP_SEWABLE_H
-//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_2.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_2.h
deleted file mode 100644
index 07504bb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_2.h
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sébastien Loriot <sebastien.loriot at geometryfactory.com>
-
-#ifndef CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
-#define CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
-
-#include <CGAL/Weighted_alpha_shape_euclidean_traits_2.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/type_traits.hpp>
-#include <iostream>
-
-namespace CGAL {
-
-namespace internal{
-
-//non-weighted case  
-template <class Weighted_tag,class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
-struct Types_for_alpha_nt_2
-{
-//Converter types
-  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_approx>    To_approx;
-  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_exact>     To_exact;
-//Traits types
-  
-//Point types
-  typedef typename Kernel_approx::Point_2                          Approx_point;
-  typedef typename Kernel_exact::Point_2                           Exact_point;
-  typedef typename Kernel_input::Point_2                           Input_point;
-//Constructions 
-  typedef typename Kernel_approx::Compute_squared_radius_2         Approx_squared_radius;
-  typedef typename Kernel_exact::Compute_squared_radius_2          Exact_squared_radius;
-};
-  
-  
-//weighted case
-template <class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
-struct Types_for_alpha_nt_2< ::CGAL::Tag_true,Input_traits,Kernel_input,Kernel_approx,Kernel_exact>
-{
-//Converter types
-  typedef CGAL::Weighted_converter_2< CGAL::Cartesian_converter<Kernel_input,Kernel_approx> >  To_approx;
-  typedef CGAL::Weighted_converter_2< CGAL::Cartesian_converter<Kernel_input,Kernel_exact> >   To_exact;
-//Traits types
-  typedef ::CGAL::Weighted_alpha_shape_euclidean_traits_2<Kernel_approx>                       Approx_traits;
-  typedef ::CGAL::Weighted_alpha_shape_euclidean_traits_2<Kernel_exact>                        Exact_traits;
-//Point types
-  typedef typename Approx_traits::Weighted_point                                               Approx_point;
-  typedef typename Exact_traits::Weighted_point                                                Exact_point;
-  typedef typename Input_traits::Weighted_point                                                Input_point;
-//Constructions 
-  typedef typename Approx_traits::Compute_squared_radius_2                                     Approx_squared_radius;
-  typedef typename Exact_traits::Compute_squared_radius_2                                      Exact_squared_radius; 
-};
-
-
-template<class Input_traits, bool mode, class Weighted_tag>
-class Lazy_alpha_nt_2{
-//NT & kernels
-  typedef CGAL::Interval_nt<mode>                                                               NT_approx;
-  //Gmpq or Quotient<MP_float>
-  typedef Exact_field_selector<double>::Type                                                    NT_exact;
-  typedef CGAL::Simple_cartesian<NT_approx>                                                     Kernel_approx;
-  typedef CGAL::Simple_cartesian<NT_exact>                                                      Kernel_exact;
-  typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel                        Kernel_input;
-//Helper class for weighted and non-weighted case  
-  typedef Types_for_alpha_nt_2<Weighted_tag,Input_traits,Kernel_input,Kernel_approx,Kernel_exact> Types;  
-  
-//Converters
-  typedef typename Types::To_approx                                                             To_approx;
-  typedef typename Types::To_exact                                                              To_exact;
- 
-//Constructions class
-  typedef typename Types::Approx_squared_radius                                                 Approx_squared_radius;
-  typedef typename Types::Exact_squared_radius                                                  Exact_squared_radius;
-  
-//Point
-  typedef typename Types::Approx_point                                                          Approx_point;
-  typedef typename Types::Exact_point                                                           Exact_point;
-  typedef typename Types::Input_point                                                           Input_point;
-//Convertion functions
-  Approx_point to_approx(const Input_point& wp) const {
-    To_approx converter;
-    return converter(wp);
-  }
-  
-  Exact_point to_exact(const Input_point& wp) const {
-    To_exact converter;
-    return converter(wp);
-  }
-
-
-//members  
-  unsigned nb_pt;
-  //the members can be updated when calling method exact()
-  mutable bool updated;
-  mutable NT_exact exact_;
-  mutable NT_approx approx_;
-  typedef std::vector<const Input_point*> Data_vector;
-  boost::shared_ptr<Data_vector> inputs_ptr;
-
-//private functions  
-  const Data_vector& data() const{ return *inputs_ptr;}
-
-  Data_vector& 
-  data(){ return *inputs_ptr;}  
-  
-  
-public:
-
-  typedef NT_exact               Exact_nt;
-  typedef NT_approx              Approximate_nt;
-
-  void update_exact() const{
-    switch (nb_pt){
-      case 1:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]) );
-      break;
-      case 2:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]) );
-      break;
-      case 3:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]) );
-      break;
-      default:
-        assert(false);
-    }
-    updated=true;
-  }
-  
-  void set_approx(){
-    switch (nb_pt){
-      case 1:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]) );
-      break;
-      case 2:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]) );
-      break;
-      case 3:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]) );
-      break;
-      default:
-        assert(false);
-    }    
-  }
-
-  const NT_exact& exact() const {
-    if (!updated){
-      update_exact();
-      approx_=to_interval(exact_);
-    }
-    return exact_;
-  }
-
-  const NT_approx& approx() const{
-    return approx_;
-  }
-//Constructors  
-  Lazy_alpha_nt_2():nb_pt(0),updated(true),exact_(0),approx_(0){}
-  
-  Lazy_alpha_nt_2(double d):nb_pt(0),updated(true),exact_(d),approx_(d){}
-  
-  Lazy_alpha_nt_2(const Input_point& wp1):nb_pt(1),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    set_approx();
-  }
-
-  Lazy_alpha_nt_2(const Input_point& wp1,
-           const Input_point& wp2):nb_pt(2),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    data().push_back(&wp2);
-    set_approx();
-  }
-
-  Lazy_alpha_nt_2(const Input_point& wp1,
-           const Input_point& wp2,
-           const Input_point& wp3):nb_pt(3),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    data().push_back(&wp2);
-    data().push_back(&wp3);
-    set_approx();
-  }
-  
-  #define CGAL_LANT_COMPARE_FUNCTIONS(CMP) \
-  bool \
-  operator CMP (const Lazy_alpha_nt_2<Input_traits,mode,Weighted_tag> &other) const \
-  { \
-    try{ \
-      return this->approx() CMP other.approx(); \
-    } \
-    catch(CGAL::Uncertain_conversion_exception&){ \
-      return this->exact() CMP other.exact(); \
-    } \
-  } \
-  \
-
-  CGAL_LANT_COMPARE_FUNCTIONS(<)
-  CGAL_LANT_COMPARE_FUNCTIONS(>)
-  CGAL_LANT_COMPARE_FUNCTIONS(>=)
-  CGAL_LANT_COMPARE_FUNCTIONS(<=)
-  CGAL_LANT_COMPARE_FUNCTIONS(==)
-  CGAL_LANT_COMPARE_FUNCTIONS(!=)
-
-  #undef CGAL_LANT_COMPARE_FUNCTIONS  
-};
-
-template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
-std::ostream&
-operator<< (std::ostream& os,const Lazy_alpha_nt_2<Input_traits,mode,Weighted_tag>& a){
-  return os << ::CGAL::to_double(a.approx());
-}
-
-template <class Type_of_alpha>
-struct Lazy_compute_squared_radius_2 {
-  typedef typename Type_of_alpha::Input_point Point;
-  Type_of_alpha operator() (const Point& p, 
-                 const Point& q , 
-                 const Point& r, 
-                 const Point& s)
-  {return Type_of_alpha(p,q,r,s);}
-
-  Type_of_alpha operator() ( const Point& p, 
-                  const Point& q , 
-                  const Point& r)
-  {return Type_of_alpha(p,q,r); }
-
-  Type_of_alpha operator() (const Point& p, 
-                 const Point& q )
-  {return Type_of_alpha(p,q); }
-
-  Type_of_alpha operator() (const Point& p) 
-  {return Type_of_alpha(p);}
-};
-
-
-template <class GeomTraits,class ExactAlphaComparisonTag>
-struct Alpha_nt_selector_impl_2;
-
-template <class GeomTraits>
-struct Alpha_nt_selector_impl_2<GeomTraits,Tag_false>
-{
-  typedef typename GeomTraits::FT Type_of_alpha;
-  typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_2;
-};
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_typedef_Weighted_point,Weighted_point,false)
-
-template <class GeomTraits>
-struct Alpha_nt_selector_impl_2<GeomTraits,Tag_true>
-{
-  //This is not very satisfactory but we can improve it if some user complains.
-  typedef Boolean_tag<
-    Has_typedef_Weighted_point<GeomTraits>::value &&
-    !boost::is_same<
-      typename Kernel_traits<typename GeomTraits::Point_2>::Kernel::Compute_squared_radius_2,
-      typename GeomTraits::Compute_squared_radius_2 >::value 
-  >   Weighted_tag;
-  typedef Lazy_alpha_nt_2<GeomTraits,true,Weighted_tag> Type_of_alpha;
-  typedef Lazy_compute_squared_radius_2<Type_of_alpha> Compute_squared_radius_2;
-};
-
-template <class GeomTraits,class ExactAlphaComparisonTag>
-struct Alpha_nt_selector_2:
-  public Alpha_nt_selector_impl_2<GeomTraits,
-              Boolean_tag< boost::is_floating_point<typename GeomTraits::FT>::value && ExactAlphaComparisonTag::value > >
-{};
-
-
-} //namespace internal
-
-} //namespace CGAL
-
-#endif //CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_3.h
deleted file mode 100644
index 7ded7ec..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Lazy_alpha_nt_3.h
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sébastien Loriot <sebastien.loriot at geometryfactory.com>
-
-#ifndef CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
-#define CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
-
-#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/type_traits.hpp>
-#include <iostream>
-
-namespace CGAL {
-
-namespace internal{
-
-//non-weighted case  
-template <class Weighted_tag,class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
-struct Types_for_alpha_nt_3
-{
-//Converter types
-  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_approx>    To_approx;
-  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_exact>     To_exact;
-//Traits types
-  
-//Point types
-  typedef typename Kernel_approx::Point_3                          Approx_point;
-  typedef typename Kernel_exact::Point_3                           Exact_point;
-  typedef typename Kernel_input::Point_3                           Input_point;
-//Constructions 
-  typedef typename Kernel_approx::Compute_squared_radius_3         Approx_squared_radius;
-  typedef typename Kernel_exact::Compute_squared_radius_3          Exact_squared_radius;
-};
-  
-  
-//weighted case
-template <class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
-struct Types_for_alpha_nt_3< ::CGAL::Tag_true,Input_traits,Kernel_input,Kernel_approx,Kernel_exact>
-{
-//Converter types
-  typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter<Kernel_input,Kernel_approx> >   To_approx;
-  typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter<Kernel_input,Kernel_exact> >    To_exact;
-//Traits types
-  typedef ::CGAL::Regular_triangulation_euclidean_traits_3<Kernel_approx>                       Approx_traits;
-  typedef ::CGAL::Regular_triangulation_euclidean_traits_3<Kernel_exact>                        Exact_traits;
-//Point types
-  typedef typename Approx_traits::Weighted_point Approx_point;
-  typedef typename Exact_traits::Weighted_point  Exact_point;
-  typedef typename Input_traits::Weighted_point  Input_point;
-//Constructions 
-  typedef typename Approx_traits::Compute_squared_radius_smallest_orthogonal_sphere_3           Approx_squared_radius;
-  typedef typename Exact_traits::Compute_squared_radius_smallest_orthogonal_sphere_3            Exact_squared_radius; 
-};
-
-
-template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
-class Lazy_alpha_nt_3{
-//NT & kernels
-  typedef CGAL::Interval_nt<mode>                                                               NT_approx;
-  //Gmpq or Quotient<MP_float>
-  typedef Exact_field_selector<double>::Type                                                    NT_exact;
-  typedef CGAL::Simple_cartesian<NT_approx>                                                     Kernel_approx;
-  typedef CGAL::Simple_cartesian<NT_exact>                                                      Kernel_exact;
-//Helper class for weighted and non-weighted case  
-  typedef Types_for_alpha_nt_3<Weighted_tag,Input_traits,Kernel_input,Kernel_approx,Kernel_exact> Types;  
-  
-//Converters
-  typedef typename Types::To_approx                                                             To_approx;
-  typedef typename Types::To_exact                                                              To_exact;
- 
-//Constructions class
-  typedef typename Types::Approx_squared_radius                                                 Approx_squared_radius;
-  typedef typename Types::Exact_squared_radius                                                  Exact_squared_radius;
-  
-//Point
-  typedef typename Types::Approx_point                                                          Approx_point;
-  typedef typename Types::Exact_point                                                           Exact_point;
-  typedef typename Types::Input_point                                                           Input_point;
-//Convertion functions
-  Approx_point to_approx(const Input_point& wp) const {
-    To_approx converter;
-    return converter(wp);
-  }
-  
-  Exact_point to_exact(const Input_point& wp) const {
-    To_exact converter;
-    return converter(wp);
-  }
-
-
-//members  
-  unsigned nb_pt;
-  //the members can be updated when calling method exact()
-  mutable bool updated;
-  mutable NT_exact exact_;
-  mutable NT_approx approx_;
-  typedef std::vector<const Input_point*> Data_vector;
-  boost::shared_ptr<Data_vector> inputs_ptr;
-
-//private functions  
-  const Data_vector& data() const{ return *inputs_ptr;}
-
-  Data_vector& 
-  data(){ return *inputs_ptr;}  
-  
-  
-public:
-
-  typedef NT_exact               Exact_nt;
-  typedef NT_approx              Approximate_nt;
-
-  void update_exact() const{
-    switch (nb_pt){
-      case 1:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]) );
-      break;
-      case 2:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]) );
-      break;
-      case 3:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]) );
-      break;
-      case 4:
-        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]),to_exact(*data()[3]) );
-      break;
-      default:
-        assert(false);
-    }
-    updated=true;
-  }
-  
-  void set_approx(){
-    switch (nb_pt){
-      case 1:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]) );
-      break;
-      case 2:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]) );
-      break;
-      case 3:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]) );
-      break;
-      case 4:
-        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]),to_approx(*data()[3]) );
-      break;
-      default:
-        assert(false);
-    }    
-  }
-
-  const NT_exact& exact() const {
-    if (!updated){
-      update_exact();
-      approx_=to_interval(exact_);
-    }
-    return exact_;
-  }
-
-  const NT_approx& approx() const{
-    return approx_;
-  }
-//Constructors  
-  Lazy_alpha_nt_3():nb_pt(0),updated(true),exact_(0),approx_(0){}
-  
-  Lazy_alpha_nt_3(double d):nb_pt(0),updated(true),exact_(d),approx_(d){}
-  
-  Lazy_alpha_nt_3(const Input_point& wp1):nb_pt(1),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    set_approx();
-  }
-
-  Lazy_alpha_nt_3(const Input_point& wp1,
-           const Input_point& wp2):nb_pt(2),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    data().push_back(&wp2);
-    set_approx();
-  }
-
-  Lazy_alpha_nt_3(const Input_point& wp1,
-           const Input_point& wp2,
-           const Input_point& wp3):nb_pt(3),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    data().push_back(&wp2);
-    data().push_back(&wp3);
-    set_approx();
-  }
-
-  Lazy_alpha_nt_3(const Input_point& wp1,
-           const Input_point& wp2,
-           const Input_point& wp3,
-           const Input_point& wp4):nb_pt(4),updated(false),inputs_ptr(new Data_vector())
-  {
-    data().reserve(nb_pt);
-    data().push_back(&wp1);
-    data().push_back(&wp2);
-    data().push_back(&wp3);
-    data().push_back(&wp4);
-    set_approx();
-  }
-    
-  #define CGAL_LANT_COMPARE_FUNCTIONS(CMP) \
-  bool \
-  operator CMP (const Lazy_alpha_nt_3<Input_traits,Kernel_input,mode,Weighted_tag> &other) const \
-  { \
-    try{ \
-      return this->approx() CMP other.approx(); \
-    } \
-    catch(CGAL::Uncertain_conversion_exception&){ \
-      return this->exact() CMP other.exact(); \
-    } \
-  } \
-
-  CGAL_LANT_COMPARE_FUNCTIONS(<)
-  CGAL_LANT_COMPARE_FUNCTIONS(>)
-  CGAL_LANT_COMPARE_FUNCTIONS(>=)
-  CGAL_LANT_COMPARE_FUNCTIONS(<=)
-  CGAL_LANT_COMPARE_FUNCTIONS(==)
-  CGAL_LANT_COMPARE_FUNCTIONS(!=)
-
-  #undef CGAL_LANT_COMPARE_FUNCTIONS  
-};
-
-template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
-std::ostream&
-operator<< (std::ostream& os,const Lazy_alpha_nt_3<Input_traits,Kernel_input,mode,Weighted_tag>& a){
-  return os << ::CGAL::to_double(a.approx());
-}
-  
-//small class to select predicate in weighted and unweighted case
-template <class GeomTraits,class Weighted_tag>
-struct iCompute_squared_radius_3;
-
-template <class GeomTraits>
-struct iCompute_squared_radius_3<GeomTraits,Tag_false>
-{
-  template <class As>
-  typename GeomTraits::Compute_squared_radius_3
-  operator()(const As& as) const{
-    return static_cast<const typename As::Triangulation&>(as).geom_traits().compute_squared_radius_3_object();
-  }
-};
-
-template <class GeomTraits>
-struct iCompute_squared_radius_3<GeomTraits,Tag_true>
-{
-  template <class As>
-  typename GeomTraits::Compute_squared_radius_smallest_orthogonal_sphere_3
-  operator()(const As& as) const{
-    return static_cast<const typename As::Triangulation&>(as).geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object();
-  }
-};
-
-template <class Type_of_alpha,class Point>
-struct Lazy_compute_squared_radius_3 {
-  Type_of_alpha operator() (const Point& p, 
-                 const Point& q , 
-                 const Point& r, 
-                 const Point& s)
-  {return Type_of_alpha(p,q,r,s);}
-
-  Type_of_alpha operator() ( const Point& p, 
-                  const Point& q , 
-                  const Point& r)
-  {return Type_of_alpha(p,q,r); }
-
-  Type_of_alpha operator() (const Point& p, 
-                 const Point& q )
-  {return Type_of_alpha(p,q); }
-
-  Type_of_alpha operator() (const Point& p) 
-  {return Type_of_alpha(p);}
-};
-
-
-template <class GeomTraits,class ExactAlphaComparisonTag,class Weighted_tag>
-struct Alpha_nt_selector_impl_3;
-
-template <class GeomTraits,class Weighted_tag>
-struct Alpha_nt_selector_impl_3<GeomTraits,Tag_false,Weighted_tag>
-{
-  typedef typename GeomTraits::FT Type_of_alpha;
-  typedef iCompute_squared_radius_3<GeomTraits,Weighted_tag> Compute_squared_radius_3;
-};
-
-template <class GeomTraits,class Weighted_tag>
-struct Alpha_nt_selector_impl_3<GeomTraits,Tag_true,Weighted_tag>
-{
-  typedef Lazy_alpha_nt_3<GeomTraits,GeomTraits,true,Tag_false> Type_of_alpha;
-  typedef Lazy_compute_squared_radius_3<Type_of_alpha,typename GeomTraits::Point_3> Functor;
-  struct Compute_squared_radius_3{
-    template<class As>
-    Functor operator()(const As&){return Functor();}    
-  };
-};
-
-template <class GeomTraits>
-struct Alpha_nt_selector_impl_3<GeomTraits,Tag_true,Tag_true>
-{
-  typedef Lazy_alpha_nt_3<GeomTraits,typename GeomTraits::Kernel,true,Tag_true> Type_of_alpha;
-  typedef Lazy_compute_squared_radius_3<Type_of_alpha,typename GeomTraits::Weighted_point> Functor;
-  struct Compute_squared_radius_3{
-    template<class As>
-    Functor operator()(const As&){return Functor();}    
-  };
-};
-
-template <class GeomTraits,class ExactAlphaComparisonTag,class Weighted_tag>
-struct Alpha_nt_selector_3:
-  public Alpha_nt_selector_impl_3<GeomTraits,
-              Boolean_tag< boost::is_floating_point<typename GeomTraits::FT>::value && ExactAlphaComparisonTag::value >,
-              Weighted_tag>
-{};
-
-
-} //namespace internal
-
-} //namespace CGAL
-
-#endif //CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Point_inside_vertical_ray_cast.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Point_inside_vertical_ray_cast.h
deleted file mode 100644
index 9e8165d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Point_inside_vertical_ray_cast.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ilker O. Yaz and Sebastien Loriot
-
-
-#ifndef CGAL_POINT_INSIDE_POLYHEDRON_POINT_INSIDE_VERTICAL_RAY_CAST_H
-#define CGAL_POINT_INSIDE_POLYHEDRON_POINT_INSIDE_VERTICAL_RAY_CAST_H
-
-#include <CGAL/internal/Operations_on_polyhedra/Ray_3_Triangle_3_traversal_traits.h>
-#include <CGAL/point_generators_3.h>
-#include <CGAL/Origin.h>
-
-#include <boost/optional.hpp>
-
-namespace CGAL {
-namespace internal {
-
-// internal class for point inside test, using existing AABB tree
-template<class Kernel, class AABBTree>
-class Point_inside_vertical_ray_cast 
-{
-  typedef typename Kernel::Point_3       Point;
-  typedef typename Kernel::Ray_3         Ray;
-  typedef typename AABBTree::AABB_traits Traits;
-
-  static const unsigned int seed = 1340818006;
-
-public:
-  Bounded_side operator()(
-    const Point& point,
-    const AABBTree& tree,
-    typename Kernel::Construct_ray_3 ray_functor = Kernel().construct_ray_3_object(),
-    typename Kernel::Construct_vector_3 vector_functor = Kernel().construct_vector_3_object() ) const
-  {
-    const typename Traits::Bounding_box& bbox = tree.bbox();
-
-    if(   point.x() < bbox.xmin() || point.x() > bbox.xmax()
-      || point.y() < bbox.ymin() || point.y() > bbox.ymax()
-      || point.z() < bbox.zmin() || point.z() > bbox.zmax() )
-    {
-      return ON_UNBOUNDED_SIDE;
-    }
-
-    //the direction of the vertical ray depends on the position of the point in the bbox
-    //in order to limit the expected number of nodes visited.
-    Ray query = ray_functor(point, vector_functor(0,0,(2*point.z() <  tree.bbox().zmax()+tree.bbox().zmin()?-1:1)));
-    boost::optional<Bounded_side> res = is_inside_ray_tree_traversal<true>(query, tree);
-
-    if(!res) {
-      CGAL::Random rg(seed); // seed some value for make it easy to debug
-      Random_points_on_sphere_3<Point> random_point(1.,rg);
-
-      do { //retry with a random ray
-        query = ray_functor(point, vector_functor(CGAL::ORIGIN,*random_point++));
-        res = is_inside_ray_tree_traversal<false>(query, tree);
-      } while (!res);
-    }
-    return *res;
-  }
-
-private:
-  template<bool ray_is_vertical>
-  boost::optional<Bounded_side>
-  is_inside_ray_tree_traversal(const Ray& ray, const AABBTree& tree) const
-  {
-    std::pair<boost::logic::tribool,std::size_t> status( boost::logic::tribool(boost::logic::indeterminate), 0);
-
-    Ray_3_Triangle_3_traversal_traits<Traits, Kernel, Boolean_tag<ray_is_vertical> > traversal_traits(status);
-    tree.traversal(ray, traversal_traits);
-
-    if ( !boost::logic::indeterminate(status.first) )
-    {
-      if (status.first) {
-        return (status.second&1) == 1 ? ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
-      }
-      //otherwise the point is on the facet
-      return ON_BOUNDARY;
-    }
-    return boost::optional<Bounded_side>(); // indeterminate
-  }
-};
-
-}// namespace internal
-}// namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Ray_3_Triangle_3_traversal_traits.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Ray_3_Triangle_3_traversal_traits.h
deleted file mode 100644
index c06b133..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/Ray_3_Triangle_3_traversal_traits.h
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright (c) 2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sebastien Loriot
-
-
-#ifndef CGAL_POINT_INSIDE_POLYHEDRON_RAY_3_TRIANGLE_3_TRAVERSAL_TRAITS_H
-#define CGAL_POINT_INSIDE_POLYHEDRON_RAY_3_TRIANGLE_3_TRAVERSAL_TRAITS_H
-
-#include <boost/logic/tribool.hpp>
-#include <CGAL/tags.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Triangle_3_Ray_3_do_intersect.h>
-
-namespace CGAL {
-namespace internal {
-
-template<typename AABBTraits, class Kernel, class Tag_ray_is_vertical=Tag_false>
-class Ray_3_Triangle_3_traversal_traits
-{
-protected:
-  //the status indicates whether the query point is strictly inside the polyhedron, and the number of intersected triangles if yes
-  std::pair<boost::logic::tribool,std::size_t>& m_status;
-  bool m_stop;
-  typedef typename AABBTraits::Primitive Primitive;
-
-public:
-  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status)
-    :m_status(status),m_stop(false)
-  {m_status.first=true;}
-
-  bool go_further() const { return !m_stop; }
-
-  template<class Query>
-  void intersection(const Query& query, const Primitive& primitive)
-  {
-    internal::r3t3_do_intersect_endpoint_position_visitor visitor;
-    std::pair<bool,internal::R3T3_intersection::type> res=
-      internal::do_intersect(primitive.datum(),query,Kernel(),visitor);
-    
-    if (res.first){
-      switch (res.second){
-        case internal::R3T3_intersection::CROSS_FACET:
-          ++m_status.second;
-        break;
-        case internal::R3T3_intersection::ENDPOINT_IN_TRIANGLE:
-          m_status.first=false;
-          m_stop=true;
-        break;
-        default:
-          m_status.first=boost::logic::indeterminate;
-          m_stop=true;
-      }
-    }
-  }
-  
-  template<class Query,class Node>
-  bool do_intersect(const Query& query, const Node& node) const
-  {
-    return AABBTraits().do_intersect_object()(query, node.bbox());
-  }
-};
-
-
-//specialization for vertical ray
-template<typename AABBTraits, class Kernel>
-class Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_true>: 
-  public Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_false>
-{
-  typedef Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_false> Base;
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Base::Primitive Primitive;
-public:
-  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status):Base(status){}
-
-  template <class Query>
-  bool do_intersect(const Query& query, const Bbox_3& bbox) const
-  {
-    const Point& source=query.point(0);
-    const Point& target=query.point(1);
-    
-    bool inc_z=target.z()>source.z();
-    
-    //the ray does not intersect the z-slab
-    if ( ( inc_z && source.z()>bbox.zmax() )|| (!inc_z && source.z()<bbox.zmin()) ) return false;
-    
-    //the source is not in the x-slab
-    if (source.x() > bbox.xmax() || source.x()<bbox.xmin()) return false;
-    //check if the source is not in the y-slab
-    return source.y() <= bbox.ymax() && source.y()>=bbox.ymin();
-  }
-
-  template <class Query,class Node>
-  bool do_intersect(const Query& query, const Node& node) const
-  {
-    return do_intersect(query,node.bbox());
-  }
-
-private:
-  typename Kernel::Point_2 x_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.y(),p.z());
-  }
-  typename Kernel::Point_2 y_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.x(),p.z());
-  }
-  typename Kernel::Point_2 z_project(const typename Kernel::Point_3& p) const{
-    return typename Kernel::Point_2(p.x(),p.y());
-  }
-public:
-  template<class Query>
-  void intersection(const Query& query, const Primitive& primitive)
-  {
-    typename Kernel::Triangle_3 t=primitive.datum();
-    if ( !do_intersect(query,t.bbox()) ) return;
-    
-    typename Kernel::Point_2 p0=z_project(t[0]);
-    typename Kernel::Point_2 p1=z_project(t[1]);
-    typename Kernel::Point_2 p2=z_project(t[2]);
-    int indices[3]={0,1,2}; //to track whether triangle points have been swapt
-    typename Kernel::Point_2 q=z_project( query.source() );
-    
-    Orientation orient_2=orientation(p0,p1,p2);
-    
-    //check whether the face has a normal vector in the xy-plane
-    if (orient_2==COLLINEAR){
-      //in that case the projection of the triangle along the z-axis is a segment.
-      const typename Kernel::Point_2& other_point = p0!=p1?p1:p2;
-      //~ if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
-      if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
-      
-      //check if the ray source is above or below the triangle and compare it 
-      //with the direction of the ray
-      //TODO and if yes return
-      //this is just an optimisation, the current code is valid
-      
-      this->m_status.first=boost::logic::indeterminate;
-      this->m_stop=true;
-      return;
-    }
-    
-    
-    //regular case
-    if (orient_2==NEGATIVE){
-      std::swap(p1,p2);
-      std::swap(indices[1],indices[2]);
-    }
-    
-    //check whether the ray intersect the supporting plane
-    Orientation orient_3 = orientation(t[indices[0]],t[indices[1]],t[indices[2]],query.source());
-    if ( orient_3!=COPLANAR && 
-          (
-            //indicates whether the ray is oriented toward the positive side of the plane
-            ( POSITIVE == sign( query.to_vector().z() )  )
-              ==
-            //indicates whether the source of the ray is in the positive side of the plane
-            (orient_3==POSITIVE)
-          )
-    ) return; //no intersection
-    
-
-    //position against first segment
-    switch( orientation(p0,p1,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-    //position against second segment
-    switch( orientation(p1,p2,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-    //position against third segment
-    switch( orientation(p2,p0,q) ){
-      case COLLINEAR:
-        this->m_status.first=boost::logic::indeterminate;
-        this->m_stop=true;
-      case NEGATIVE:
-        return;
-      default:
-      {}
-    }
-
-    if (orient_3==COPLANAR){
-      //the endpoint is inside the triangle
-      this->m_status.first=false;
-      this->m_stop=true;
-    }
-    else
-      ++(this->m_status.second);
-  }
-};
-
-}// namespace internal
-}// namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/compute_normal.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/compute_normal.h
deleted file mode 100644
index bd5076c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/compute_normal.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2013 INRIA Sophia-Anitpolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Pierre Alliez
-
-
-#ifndef CGAL_INTERNAL_OPERATIONS_ON_POLYHEDRA_COMPUTE_NORMAL_H
-#define CGAL_INTERNAL_OPERATIONS_ON_POLYHEDRA_COMPUTE_NORMAL_H
-
-#include <CGAL/circulator.h>
-
-template <class Facet, class Kernel>
-typename Kernel::Vector_3 compute_facet_normal(const Facet& f)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Facet::Halfedge_around_facet_const_circulator HF_circulator;
-  Vector normal = CGAL::NULL_VECTOR;
-  HF_circulator he = f.facet_begin();
-  HF_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    const Point& prev = he->prev()->vertex()->point();
-    const Point& curr = he->vertex()->point();
-    const Point& next = he->next()->vertex()->point();
-    Vector n = CGAL::cross_product(next-curr,prev-curr);
-    normal = normal + n;
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-template <class Vertex, class Kernel>
-typename Kernel::Vector_3 compute_vertex_normal(const Vertex& v)
-{
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Vertex::Halfedge_around_vertex_const_circulator HV_circulator;
-  typedef typename Vertex::Facet Facet;
-  Vector normal = CGAL::NULL_VECTOR;
-  HV_circulator he = v.vertex_begin();
-  HV_circulator end = he;
-  CGAL_For_all(he,end)
-  {
-    if(!he->is_border())
-    {
-      Vector n = compute_facet_normal<Facet,Kernel>(*he->facet());
-      normal = normal + (n / std::sqrt(n*n));
-    }
-  }
-  return normal / std::sqrt(normal * normal);
-}
-
-#endif // CGAL_INTERNAL_OPERATIONS_ON_POLYHEDRA_COMPUTE_NORMAL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Projection_traits_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Projection_traits_3.h
deleted file mode 100644
index 930e18f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Projection_traits_3.h
+++ /dev/null
@@ -1,723 +0,0 @@
-// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Mariette Yvinec, Sebastien Loriot
-
-#ifndef CGAL_INTERNAL_PROJECTION_TRAITS_3_H
-#define CGAL_INTERNAL_PROJECTION_TRAITS_3_H
-
-#include <CGAL/assertions.h>
-
-#include <CGAL/Point_3.h>
-#include <CGAL/Segment_3.h>
-#include <CGAL/Triangle_3.h>
-
-#include <CGAL/Kernel/global_functions_2.h>
-
-namespace CGAL { 
-
-namespace internal {
-
-//project Point_3 along coordinate dim
-template <class R,int dim>
-struct Projector;
-
-//project onto yz
-template <class R>
-struct Projector<R,0>
-{
-  typedef typename R::Less_y_3                Less_x_2;
-  typedef typename R::Less_z_3                Less_y_2;
-  typedef typename R::Compare_y_3             Compare_x_2;
-  typedef typename R::Compare_z_3             Compare_y_2;
-  typedef typename R::Equal_y_3               Equal_x_2;
-  typedef typename R::Equal_z_3               Equal_y_2;  
-  
-  static typename R::FT x(const typename R::Point_3& p) {return p.y();}
-  static typename R::FT y(const typename R::Point_3& p) {return p.z();}
-  static typename R::FT x(const typename R::Vector_3& p) {return p.y();}
-  static typename R::FT y(const typename R::Vector_3& p) {return p.z();}
-  static const int x_index=1;
-  static const int y_index=2;
-};
-//project onto xz
-template <class R>
-struct Projector<R,1>
-{
-  typedef typename R::Less_x_3                Less_x_2;
-  typedef typename R::Less_z_3                Less_y_2;
-  typedef typename R::Compare_x_3             Compare_x_2;
-  typedef typename R::Compare_z_3             Compare_y_2;  
-  typedef typename R::Equal_x_3               Equal_x_2;
-  typedef typename R::Equal_z_3               Equal_y_2;    
-  static typename R::FT x(const typename R::Point_3& p) {return p.x();}
-  static typename R::FT y(const typename R::Point_3& p) {return p.z();}
-  static typename R::FT x(const typename R::Vector_3& p) {return p.x();}
-  static typename R::FT y(const typename R::Vector_3& p) {return p.z();}
-  static const int x_index=0;
-  static const int y_index=2;  
-};
-
-//project onto xy
-template <class R>
-struct Projector<R,2>
-{
-  typedef typename R::Less_x_3                Less_x_2;
-  typedef typename R::Less_y_3                Less_y_2;
-  typedef typename R::Compare_x_3             Compare_x_2;
-  typedef typename R::Compare_y_3             Compare_y_2;  
-  typedef typename R::Equal_x_3               Equal_x_2;
-  typedef typename R::Equal_y_3               Equal_y_2;    
-  static typename R::FT x(const typename R::Point_3& p) {return p.x();}
-  static typename R::FT y(const typename R::Point_3& p) {return p.y();}
-  static typename R::FT x(const typename R::Vector_3& p) {return p.x();}
-  static typename R::FT y(const typename R::Vector_3& p) {return p.y();}
-  static const int x_index=0;
-  static const int y_index=1;  
-};
-  
-
-
-template <class R,int dim>
-class Orientation_projected_3 
-{
-public:
-  typedef typename R::Point_3     Point; 
-  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
-
-  typename R::Point_2 project(const Point& p) const
-  {
-    return typename R::Point_2(x(p),y(p));
-  }
-
-  CGAL::Orientation operator()(const Point& p,
-			       const Point& q,
-			       const Point& r) const
-    {
-      return CGAL::orientation(project(p), project(q), project(r));
-    }
-};
-
-template <class R,int dim>
-class Side_of_oriented_circle_projected_3 
-{
-public:
-  typedef typename R::Point_3     Point; 
-  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
-
-
-  typename R::Point_2 project(const Point& p) const
-  {
-    return typename R::Point_2(x(p),y(p));
-  }
-  CGAL::Oriented_side operator() (const Point &p, 
-				  const Point &q,
-				  const Point &r, 
-				  const Point &s) const
-    {
-      return CGAL::side_of_oriented_circle(project(p),project(q),project(r),project(s) );
-    }
-};
-
-template <class R,int dim>
-class Side_of_bounded_circle_projected_3 
-{
-public:
-  typedef typename R::Point_3     Point; 
-  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
-
-
-  typename R::Point_2 project(const Point& p) const
-  {
-    return typename R::Point_2(x(p),y(p));
-  }
-  CGAL::Bounded_side operator() (const Point &p, 
-				  const Point &q,
-				  const Point &r, 
-				  const Point &s) const
-    {
-      return CGAL::side_of_bounded_circle(project(p),project(q),project(r),project(s) );
-    }
-
-    CGAL::Bounded_side operator() (const Point &p, 
-				  const Point &q,
-				  const Point &r) const
-    {
-      return CGAL::side_of_bounded_circle(project(p),project(q),project(r));
-    }
-};
-
-template <class R,int dim>
-class Compare_distance_projected_3
-{
-public:
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Point_2   Point_2;   
-  typedef typename R::FT        RT;
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  Comparison_result operator()(const Point_3& p,const Point_3& q,const Point_3& r) const
-  {
-    Point_2 p2 = project(p);
-    Point_2 q2 = project(q);
-    Point_2 r2 = project(r);
-    return compare_distance_to_point(p2,q2,r2);
-  }
-};
-
-template <class R,int dim>
-class Collinear_are_ordered_along_line_projected_3
-{
-public:
-  typedef typename R::Point_3   Point_3;
-  typedef typename R::Point_2   Point_2;
-  typedef typename R::FT        FT;
-  FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  bool operator()(const Point_3& p,const Point_3& q,const Point_3& r) const
-  {
-    Point_2 p2 = project(p);
-    Point_2 q2 = project(q);
-    Point_2 r2 = project(r);
-    return collinear_are_ordered_along_line(p2,q2,r2);
-  }
-};
-
-template <class R, int dim>
-class Less_signed_distance_to_line_projected_3
-{
-public:
-  typedef typename R::Point_3   Point_3;
-  typedef typename R::Point_2   Point_2;
-  typedef typename R::FT        RT;
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-  typedef bool result_type;
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  result_type operator()(const Point_3& p,
-                               const Point_3& q,
-                               const Point_3& r,
-                               const Point_3& s) const
-  {
-    return typename R::Less_signed_distance_to_line_2()
-      (  project(p), project(q), project(r), project(s) );
-  }
-};
-
-
-template <class R,int dim>
-class Squared_distance_projected_3
-{
-public:
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Point_2   Point_2; 
-  typedef typename R::Line_3    Line_3; 
-  typedef typename R::Line_2    Line_2;
-  typedef typename R::FT        RT;
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  RT operator()(const Point_3& p, const Point_3& q) const
-  {
-	  Point_2 p2(project(p));
-	  Point_2 q2(project(q));
-	  return squared_distance(p2, q2);
-  }
-
-  RT operator()(const Line_3& l, const Point_3& p) const
-  {
-    Point_2 p2(project(p));
-    Line_2 l2(project(l.point(0)), project(l.point(1)));
-    return squared_distance(p2, l2);
-  }
-};
-
-template <class R,int dim>
-class  Intersect_projected_3
-{
-public:
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Segment_3 Segment_3;
-  typedef typename R::Point_2   Point_2; 
-  typedef typename R::Vector_2  Vector_2; 
-  typedef typename R::Segment_2 Segment_2;
-  typedef typename R::FT        FT;
-  
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  FT alpha(const Point_2& p, const Point_2& source, const Point_2& target) const
-  {
-    FT dx = target.x() - source.x();
-    FT dy = target.y() - source.y();
-    return (CGAL::abs(dx)>CGAL::abs(dy)) ? ( p.x()-source.x() ) / dx : (p.y()-source.y() ) / dy;
-  }
-
-  Object operator()(const Segment_3& s1, const Segment_3& s2) const
-  {
-    Point_2 s1_source = project(s1.source());
-    Point_2 s1_target = project(s1.target());
-    Point_2 s2_source = project(s2.source());
-    Point_2 s2_target = project(s2.target());    
-    Segment_2 s1_2(s1_source, s1_target);
-    Segment_2 s2_2(s2_source, s2_target);
-    CGAL_precondition(!s1_2.is_degenerate());
-    CGAL_precondition(!s2_2.is_degenerate());
-    
-    //compute intersection points in projected plane
-    //We know that none of the segment is degenerate
-    Object o = intersection(s1_2,s2_2);
-    const Point_2* pi=CGAL::object_cast<Point_2>(&o);
-    if (pi==NULL) { //case of segment or empty
-      const Segment_2* si=CGAL::object_cast<Segment_2>(&o);
-      if (si==NULL) return Object();
-      FT src[3],tgt[3];
-      //the third coordinate is the midpoint between the points on s1 and s2
-      FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
-      FT z2 = s2.source()[dim] + ( alpha(si->source(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
-      src[dim] = (z1+z2) / FT(2);
-
-
-      z1 = s1.source()[dim] + ( alpha(si->target(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
-      z2 = s2.source()[dim] + ( alpha(si->target(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
-
-      tgt[dim] = (z1+z2) / FT(2);
-
-
-      src[Projector<R,dim>::x_index] = si->source().x();
-      src[Projector<R,dim>::y_index] = si->source().y();
-      tgt[Projector<R,dim>::x_index] = si->target().x();
-      tgt[Projector<R,dim>::y_index] = si->target().y();      
-      return make_object( Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) );
-    }
-    FT coords[3];
-    //compute the third coordinate of the projected intersection point onto 3D segments
-    FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
-    FT z2 = s2.source()[dim] + ( alpha(*pi, s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
-
-    coords[dim] = (z1+z2) / FT(2);
-    coords[Projector<R,dim>::x_index] = pi->x();
-    coords[Projector<R,dim>::y_index] = pi->y();
-    
-    Point_3 res(coords[0],coords[1],coords[2]);
-    CGAL_assertion(x(res)==pi->x() && y(res)==pi->y());
-    return make_object(res);
-  }
-};
-
-template <class R, int dim>
-class Circumcenter_center_projected
-{
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Point_2   Point_2;
-
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-  
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-  
-  Point_3 embed (const Point_2& p) const 
-  {
-    typename R::FT coords[3];
-    coords[Projector<R,dim>::x_index]=p.x();
-    coords[Projector<R,dim>::y_index]=p.y();
-    coords[dim]=typename R::FT(0);
-    return Point_3(coords[0],coords[1],coords[2]);
-  }
-  
-public:
-  Point_3 operator() (const Point_3& p1,const Point_3& p2) const
-  {
-    return embed( circumcenter(project(p1),project(p2)) );
-  }
-
-  Point_3 operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
-  {
-    return embed( circumcenter(project(p1),project(p2),project(p3)) );
-  }
-};
-
-template <class R, int dim>
-class Compute_area_projected
-{
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Point_2   Point_2;
-
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-  
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  
-public:
-  typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
-  {
-    return R().compute_area_2_object() ( project(p1),project(p2),project(p3) );
-  }
-};
-
-template <class R, int dim>
-class Compute_squared_radius_projected
-{
-  typedef typename R::Point_3   Point_3; 
-  typedef typename R::Point_2   Point_2;
-
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-  
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  
-public:
-  typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
-  {
-    return R().compute_squared_radius_2_object() ( project(p1),project(p2),project(p3) );
-  }
-  typename R::FT operator() (const Point_3& p1,const Point_3& p2) const
-  {
-    return R().compute_squared_radius_2_object() ( project(p1),project(p2) );
-  }
-
-  typename R::FT operator() (const Point_3& p1) const
-  {
-    return R().compute_squared_radius_2_object() ( project(p1) );
-  }
-};
-
-template <class R,int dim>
-class Compute_scalar_product_projected_3
-{
-public:
-  typedef typename R::Vector_3    Vector_3;
-  typedef typename R::FT          FT;
-  FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); }
-  FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); }
-
-  FT operator()(const Vector_3& v1, const Vector_3& v2) const
-  {
-    return x(v1)*x(v2) + y(v1)*y(v2);
-  }
-};
-
-template <class R,int dim>
-class Compute_squared_length_projected_3
-{
-  typedef typename R::Vector_3    Vector_3;
-  typedef typename R::FT          FT;
-
-  typedef FT result_type;
-
-  FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); }
-  FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); }
-
-public:
-  FT operator()(const Vector_3& v) const
-  {
-    return CGAL::square(x(v)) + CGAL::square(y(v));
-  }
-};
-
-template <class R, int dim>
-struct Angle_projected_3{
-  typedef typename R::Point_3   Point_3;
-  typedef typename R::Point_2   Point_2;
-
-  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
-  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
-
-  Point_2 project(const Point_3& p) const
-  {
-    return Point_2(x(p),y(p));
-  }
-
-  CGAL::Angle operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
-  {
-    return CGAL::angle(project(p), project(q), project(r));
-  }
-};
-
-template < class R, int dim >
-class Projection_traits_3 {
-public:
-  typedef Projection_traits_3<R,dim>   Traits;
-  typedef R                                                   Rp;
-  typedef typename R::FT                                      FT;
-  typedef typename Rp::Point_3                                Point_2;
-  typedef typename Rp::Segment_3                              Segment_2;
-  typedef typename Rp::Vector_3                               Vector_2;
-  typedef typename Rp::Triangle_3                             Triangle_2;
-  typedef typename Rp::Line_3                                 Line_2;
-
-  typedef typename Projector<R,dim>::Less_x_2                 Less_x_2;
-  typedef typename Projector<R,dim>::Less_y_2                 Less_y_2;
-  typedef typename Projector<R,dim>::Compare_x_2              Compare_x_2;
-  typedef typename Projector<R,dim>::Compare_y_2              Compare_y_2;
-  typedef Orientation_projected_3<Rp,dim>                     Orientation_2;
-  typedef Angle_projected_3<Rp,dim>                           Angle_2;
-  typedef Side_of_oriented_circle_projected_3<Rp,dim>         Side_of_oriented_circle_2;
-  typedef Less_signed_distance_to_line_projected_3<Rp,dim>    Less_signed_distance_to_line_2;
-  typedef Side_of_bounded_circle_projected_3<Rp,dim>          Side_of_bounded_circle_2;
-  typedef Compare_distance_projected_3<Rp,dim>                Compare_distance_2;
-  typedef Collinear_are_ordered_along_line_projected_3<Rp,dim> Collinear_are_ordered_along_line_2;
-  typedef Squared_distance_projected_3<Rp,dim>                Compute_squared_distance_2;
-  typedef Intersect_projected_3<Rp,dim>                       Intersect_2;
-  typedef Compute_squared_radius_projected<Rp,dim>            Compute_squared_radius_2;
-  typedef Compute_scalar_product_projected_3<Rp,dim>          Compute_scalar_product_2;
-  typedef Compute_squared_length_projected_3<Rp,dim>          Compute_squared_length_2;
-  typedef typename Rp::Construct_segment_3                    Construct_segment_2;
-  typedef typename Rp::Construct_translated_point_3           Construct_translated_point_2;
-  typedef typename Rp::Construct_midpoint_3                   Construct_midpoint_2;
-  typedef typename Rp::Construct_vector_3                     Construct_vector_2;
-  typedef typename Rp::Construct_scaled_vector_3              Construct_scaled_vector_2;
-  typedef typename Rp::Construct_triangle_3                   Construct_triangle_2;
-  typedef typename Rp::Construct_line_3                       Construct_line_2;
-
-  struct Less_xy_2 {
-    typedef bool result_type;
-    bool operator()(const Point_2& p, const Point_2& q) const
-    {
-      Compare_x_2 cx;
-      Comparison_result crx = cx(p,q);
-      if(crx == SMALLER){ return true;}
-      if(crx == LARGER){return false;}
-      Less_y_2 ly;
-      return ly(p,q);
-    }
-  };
-
-
-  struct Less_yx_2 {
-    typedef bool result_type;
-    bool operator()(const Point_2& p, const Point_2& q) const
-    {
-      Compare_y_2 cy;
-      Comparison_result cry = cy(p,q);
-      if(cry == SMALLER){ return true;}
-      if(cry == LARGER){return false;}
-      Less_x_2 lx;
-      return lx(p,q);
-    }
-  };
-
-  struct Equal_2 {
-    typedef bool result_type;
-    bool operator()(const Point_2& p, const Point_2& q) const
-    {
-      
-      Equal_x_2 eqx;
-      Equal_y_2 eqy;
-      return eqx(p,q) & eqy(p,q);
-    }
-  };
-
-  struct Left_turn_2 {
-    typedef bool result_type;
-    bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
-    {
-      
-      Orientation_2 ori;
-      return ori(p,q,r) == LEFT_TURN;
-    }
-  };
-
-  struct Collinear_2 {
-    typedef bool result_type;
-    bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
-    {
-      Orientation_2 ori;
-      return ori(p,q,r) == COLLINEAR;
-    }
-  };
-
-  //for natural_neighbor_coordinates_2
-  typedef typename Projector<R,dim>::Equal_x_2                Equal_x_2;
-  typedef typename Projector<R,dim>::Equal_y_2                Equal_y_2;
-  typedef Circumcenter_center_projected<Rp,dim>               Construct_circumcenter_2;
-  typedef Compute_area_projected<Rp,dim>                      Compute_area_2;
-  Construct_circumcenter_2 construct_circumcenter_2_object () const {return Construct_circumcenter_2();}
-  Compute_area_2 compute_area_2_object () const {return Compute_area_2();}  
-  
-
-  // for compatibility with previous versions
-  typedef Point_2      Point;
-  typedef Segment_2    Segment;
-  typedef Triangle_2   Triangle;
-
-  Projection_traits_3(){}
-  Projection_traits_3(
-		   const Projection_traits_3&){}
-  Projection_traits_3 &operator=(
-	    const Projection_traits_3&){return *this;}
-
-  typename Rp::FT x(const Point_2 &p) const { return Projector<R,dim>::x(p); }
-  typename Rp::FT y(const Point_2 &p) const { return Projector<R,dim>::y(p); }
-    
- 
- Equal_2
-  equal_2_object() const
-    { return Equal_2();}
-
-  Left_turn_2
-  left_turn_2_object() const
-    { return Left_turn_2();}
-
-  Less_x_2
-  less_x_2_object() const
-    { return Less_x_2();}
-
-  Less_xy_2
-  less_xy_2_object() const
-    { return Less_xy_2();}
-
-  Less_yx_2
-  less_yx_2_object() const
-    { return Less_yx_2();}
-
-  Less_signed_distance_to_line_2
-    less_signed_distance_to_line_2_object() const
-    {return Less_signed_distance_to_line_2();}
-
-  Less_y_2
-  less_y_2_object() const
-    { return Less_y_2();}
-  Compare_x_2
-  compare_x_2_object() const
-    { return Compare_x_2();}
-  Angle_2
-  angle_2_object() const {
-	  return Angle_2();
-  }
-
-  Compare_y_2
-  compare_y_2_object() const
-    { return Compare_y_2();}
-
-  Orientation_2
-  orientation_2_object() const
-    { return Orientation_2();}
-
-  Side_of_oriented_circle_2
-  side_of_oriented_circle_2_object() const
-    {return Side_of_oriented_circle_2();}
-
-  Side_of_bounded_circle_2
-  side_of_bounded_circle_2_object() const
-    {return Side_of_bounded_circle_2();}
-
-  Compare_distance_2
-  compare_distance_2_object() const
-  {
-    return Compare_distance_2();
-  }
-
-  Compute_squared_distance_2
-  compute_squared_distance_2_object () const
-  {
-    return Compute_squared_distance_2();
-  }
-
-  Compute_squared_radius_2
-  compute_squared_radius_2_object () const
-  {
-    return Compute_squared_radius_2();
-  }
-
-  Intersect_2
-  intersect_2_object () const
-  {
-    return Intersect_2();
-  }
-
-  Construct_segment_2  construct_segment_2_object() const
-    {return Construct_segment_2();}
-
-  Construct_translated_point_2  construct_translated_point_2_object() const
-    {return Construct_translated_point_2();}
-
-  Construct_midpoint_2  construct_midpoint_2_object() const
-    {return Construct_midpoint_2();}
-
-  Construct_vector_2  construct_vector_2_object() const
-    {return Construct_vector_2();}
-
-  Construct_scaled_vector_2  construct_scaled_vector_2_object() const
-    {return Construct_scaled_vector_2();}
-
-  Construct_triangle_2  construct_triangle_2_object() const
-    {return Construct_triangle_2();}
-    
-  Construct_line_2  construct_line_2_object() const
-    {return Construct_line_2();}
-
-  Compute_scalar_product_2 compute_scalar_product_2_object() const
-    {return Compute_scalar_product_2();}
-
-  Collinear_2 collinear_2_object() const
-    {return Collinear_2();}
-
-  Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const
-    {return Collinear_are_ordered_along_line_2();}
-
-  Compute_squared_length_2 compute_squared_length_2_object() const
-    {return Compute_squared_length_2();}
-
-};
-  
-
-} } //namespace CGAL::internal
-
-#endif // CGAL_INTERNAL_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Rich_grid.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Rich_grid.h
deleted file mode 100644
index d2da5aa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Rich_grid.h
+++ /dev/null
@@ -1,514 +0,0 @@
-// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez  
-
-#ifndef CGAL_RICH_GRID_H
-#define CGAL_RICH_GRID_H
-
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/Point_3.h>
-#include <CGAL/Vector_3.h>
-#include <CGAL/Origin.h>
-#include <CGAL/value_type_traits.h>
-
-#include <iterator>
-#include <algorithm>
-#include <cmath>
-#include <ctime>
-
-namespace CGAL {
-
-/// \cond SKIP_IN_MANUAL
-
-// ----------------------------------------------------------------------------
-// Rich Grid section
-// ----------------------------------------------------------------------------
-//namespace rich_grid_internal{
-
-namespace rich_grid_internal{
- 
-/// The Rich_point class represents a 3D point with inedxes of neighbor points;
-/// - a position,
-/// - an index.
-/// - self point set neighbors.
-/// - other point set neighbors.
-///
-/// @heading Parameters:
-/// @param Kernel       Geometric traits class.
-template <typename Kernel>
-class Rich_point
-{
-public:
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-
-public:
-  Rich_point(const Point& p = CGAL::ORIGIN,
-             int i = 0,
-             const Vector& n = CGAL::NULL_VECTOR
-             ):pt(p), index(i), normal(n){} 
-  
-  ~Rich_point()
-  {
-    neighbors.clear();
-    original_neighbors.clear();
-  }
-
-public:
-  Point pt;
-  unsigned int index;
-  Vector normal;
-  std::vector<unsigned int> neighbors;
-  std::vector<unsigned int> original_neighbors;//it's not necessary
-};
-
-template <typename Kernel>
-class Rich_grid 
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::FT FT;
-  typedef std::vector<Rich_point<Kernel>*> Point_ptr_vector;
-  typedef typename Point_ptr_vector::iterator iterator;
-
-public:
-
-  Rich_grid() {}
-
-  void init(std::vector<Rich_point<Kernel> > &vert,
-            CGAL::Bbox_3 bbox,
-            const FT _radius); 
-
-  // Travel for the point set itself 
-  void travel_itself(void (*self)(iterator starta, iterator enda, FT radius),
-                    void (*other)(iterator starta, iterator enda, 
-                    iterator startb, iterator endb, FT radius));
-
-  // Travel other self between two point set(original and samples) 
-  void travel_others(Rich_grid &points, 
-                     void (*travel_others)(iterator starta, 
-                                           iterator enda, 
-                                           iterator startb, 
-                                           iterator endb, 
-                                           FT radius));
-
-
-  // functions for neighborhood searching
-  static void find_original_neighbors(iterator starta, 
-                                              iterator enda, 
-                                              iterator startb,
-                                              iterator endb, 
-                                              FT radius);
-
-  static void find_self_neighbors(iterator start, 
-                                           iterator end, 
-                                           FT radius);
- 
-  static void find_other_neighbors(iterator starta, 
-                                            iterator enda, 
-                                            iterator startb, 
-                                            iterator endb, 
-                                            FT radius);
-
-private:
-  
-  std::vector<Rich_point<Kernel>*> rich_points;  
-  std::vector<int> indices;   
-  int x_side, y_side, z_side;
-  FT radius;
-
-  int cell(int x, int y, int z) { return x + x_side * (y + y_side * z); }
-  bool is_empty(int cell) { return indices[cell+1] == indices[cell]; }
-
-  iterator get_start_iter(int origin) 
-  { 
-    return rich_points.begin() + indices[origin]; 
-  }  
-
-  iterator get_end_iter(int origin) 
-  { 
-    return rich_points.begin() + indices[origin+1]; 
-  }
-};
-
-
-template <typename Kernel>
-class X_Sort {
-public:
-  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
-    return a->pt.x() < b->pt.x();
-  }
-};
-
-template <typename Kernel>
-class Y_Sort {
-public:
-  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
-    return a->pt.y() < b->pt.y();
-  }
-};
-
-template <typename Kernel>
-class Z_Sort {
-public:
-  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
-    return a->pt.z() < b->pt.z();
-  }
-};
-
-
-// divide spoints into some grids
-// and each grid has their points index in the index vector of sample.
-template <typename Kernel>
-void Rich_grid<Kernel>::init(std::vector<Rich_point<Kernel> > &vert, 
-                             CGAL::Bbox_3 bbox,
-                             const typename Kernel::FT _radius) 
-{
-  typedef typename Kernel::FT FT;
-
-  rich_points.resize(vert.size());
-  for(size_t i = 0; i < rich_points.size(); ++i)
-  {
-    rich_points[i] = &vert[i];
-  }
-
-  radius = _radius;
-
-  x_side = (unsigned int)ceil((bbox.xmax() - bbox.xmin()) / radius);
-  y_side = (unsigned int)ceil((bbox.ymax() - bbox.ymin()) / radius);
-  z_side = (unsigned int)ceil((bbox.zmax() - bbox.zmin()) / radius);
-
-  x_side = (x_side > 0) ? x_side : 1;
-  y_side = (y_side > 0) ? y_side : 1;
-  z_side = (z_side > 0) ? z_side : 1;
-
-  indices.resize(x_side * y_side * z_side + 1, -1);  
-
-  std::sort(rich_points.begin(), rich_points.end(), Z_Sort<Kernel>()); 
-
-  unsigned int start_z = 0;
-  for(int z = 0; z < z_side; z++) 
-  {
-    unsigned int end_z = start_z;
-    FT max_z = bbox.zmin() + FT(z+1)*radius;
-    while(end_z < rich_points.size() && rich_points[end_z]->pt.z() < max_z)
-      ++end_z; 
-
-    sort(rich_points.begin() + start_z, 
-         rich_points.begin() + end_z, Y_Sort<Kernel>());
-
-    unsigned int start_y = start_z;
-    for(int y = 0; y < y_side; y++) 
-    {
-      unsigned int end_y = start_y;        
-      FT max_y = bbox.ymin() + FT(y+1) * radius;
-      while(end_y < end_z && rich_points[end_y]->pt.y() < max_y)
-        ++end_y;
-
-      sort(rich_points.begin() + start_y, 
-           rich_points.begin() + end_y, X_Sort<Kernel>());
-
-      unsigned int start_x = start_y;
-      for(int x = 0; x < x_side; x++) 
-      {
-        unsigned int end_x = start_x;
-        indices[x + x_side * y + x_side * y_side * z] = end_x;          
-        FT max_x = bbox.xmin() + FT(x+1) * radius;
-        while(end_x < end_y && rich_points[end_x]->pt.x() < max_x)
-          ++end_x;
-
-        start_x = end_x;
-      }
-      start_y = end_y;
-    }
-    start_z = end_z;
-  }
-
-  //compute the last grid's range
-  indices[x_side * y_side * z_side] = start_z;
-}
-
-/// define how to travel in the same gird 
-template <typename Kernel>
-void Rich_grid<Kernel>::travel_itself(
-  void (*self)(iterator starta, iterator enda, 
-               const typename Kernel::FT radius),
-  void (*other)(iterator starta, iterator enda, 
-  iterator startb, iterator endb, FT radius)
-) 
-{
-  static int corner[8*3] = { 0, 0, 0,  1, 0, 0,  0, 1, 0,  0, 0, 1,
-    0, 1, 1,  1, 0, 1,  1, 1, 0,  1, 1, 1 };
-
-  static int diagonals[14*2] = { 0, 0, //remove this to avoid self intesextion
-    0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
-    2, 3, 1, 3, 1, 2,                       
-    1, 4, 2, 5, 3, 6 };
-
-  for(int z = 0; z < z_side; z++) {
-    for(int y = 0; y < y_side; y++) {
-      for(int x = 0; x < x_side; x++) {
-        int origin = cell(x, y, z);
-        self(get_start_iter(origin), get_end_iter(origin), radius);   
-        // compute between other girds
-        for(int d = 2; d < 28; d += 2) { // skipping self
-          int *cs = corner + 3*diagonals[d];
-          int *ce = corner + 3*diagonals[d+1];
-          if((x + cs[0] < x_side) && (y + cs[1] < y_side) && (z + cs[2] < z_side) 
-          && (x + ce[0] < x_side) && (y + ce[1] < y_side) && (z + ce[2] < z_side)) 
-          {
-            origin = cell(x+cs[0], y+cs[1], z+cs[2]);
-            int dest = cell(x+ce[0], y+ce[1], z+ce[2]);
-            other(get_start_iter(origin), get_end_iter(origin), 
-                  get_start_iter(dest),   get_end_iter(dest), radius);        
-          }
-        }   
-      }
-    }
-  }
-}
-
-/// define how to travel in other gird 
-template <typename Kernel>
-void Rich_grid<Kernel>::travel_others(
-  Rich_grid &points, 
-  void (*travel_others)(iterator starta, iterator enda, 
-                        iterator startb, iterator endb, 
-                        const typename Kernel::FT radius)
-) 
-{
-  static int corner[8*3] = { 0, 0, 0,  1, 0, 0,  0, 1, 0,  0, 0, 1,
-    0, 1, 1,  1, 0, 1,  1, 1, 0,  1, 1, 1 };
-
-  static int diagonals[14*2] = { 0, 0, //remove this to avoid self intesextion
-    0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
-    2, 3, 1, 3, 1, 2,                       
-    1, 4, 2, 5, 3, 6 };
-
-  for(int z = 0; z < z_side; z++) {
-    for(int y = 0; y < y_side; y++) {
-      for(int x = 0; x < x_side; x++) {     
-        int origin = cell(x, y, z);  
-
-
-        if(!is_empty(origin) && !points.is_empty(origin)) 
-          travel_others(get_start_iter(origin), get_end_iter(origin), 
-          points.get_start_iter(origin), points.get_end_iter(origin), radius);  
-
-
-        for(int d = 2; d < 28; d += 2) { //skipping self
-          int *cs = corner + 3*diagonals[d];
-          int *ce = corner + 3*diagonals[d+1];
-          if((x+cs[0] < x_side) && (y+cs[1] < y_side) && (z+cs[2] < z_side) &&
-            (x+ce[0] < x_side) && (y+ce[1] < y_side) && (z+ce[2] < z_side)) {
-
-              origin   = cell(x+cs[0], y+cs[1], z+cs[2]);
-
-              int dest = cell(x+ce[0], y+ce[1], z+ce[2]);
-
-              if(!is_empty(origin) && !points.is_empty(dest))        
-                  travel_others(get_start_iter(origin), 
-                                get_end_iter(origin), 
-                                points.get_start_iter(dest),   
-                                points.get_end_iter(dest), 
-                                radius); 
-
-              if(!is_empty(dest) && !points.is_empty(origin))  
-                  travel_others(get_start_iter(dest), 
-                                get_end_iter(dest), 
-                                points.get_start_iter(origin),   
-                                points.get_end_iter(origin), 
-                                radius);        
-          }
-        }      
-      }
-    }
-  }
-}
-
-/// grid travel function to find the neighbors in the original point set
-template <typename Kernel>
-void Rich_grid<Kernel>::find_original_neighbors(
-    iterator starta, 
-    iterator enda, 
-    iterator startb, 
-    iterator endb,
-    FT radius
-)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::FT FT;
-  FT radius2 = radius*radius;
-
-  iterator dest;
-  for(dest = starta; dest != enda; dest++) 
-  {
-    Rich_point<Kernel> &v = *(*dest);
-
-    Point &p = v.pt;
-
-    iterator origin;
-    for(origin = startb; origin != endb; origin++)
-    {
-      Rich_point<Kernel> &t = *(*origin);
-      Point &q = t.pt;
-
-      FT dist2 = CGAL::squared_distance(p, q);
-
-      if(dist2 < radius2) 
-      {                          
-        v.original_neighbors.push_back((*origin)->index);
-      }
-    }
-  }
-}
-
-/// grid travel function to find the neighbors in the same point set
-template <typename Kernel>
-void Rich_grid<Kernel>::find_self_neighbors(
-    iterator start, iterator end, FT radius)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::FT FT;
-  FT radius2 = radius*radius;
-  for(iterator dest = start; dest != end; dest++)
-  {
-    Rich_point<Kernel> &v = *(*dest);
-    Point &p = v.pt;
-
-    for(iterator origin = dest+1; origin != end; origin++)
-    {
-      Rich_point<Kernel> &t = *(*origin);
-      Point &q = t.pt;
-
-      FT dist2 = CGAL::squared_distance(p, q);
-
-      if(dist2 < radius2) 
-      {   
-        v.neighbors.push_back((*origin)->index);
-        t.neighbors.push_back((*dest)->index);
-      }
-    }
-  }
-}
-
-/// grid travel function to find the neighbors in the same point set
-template <typename Kernel>
-void Rich_grid<Kernel>::find_other_neighbors(
-  iterator starta, iterator enda, 
-  iterator startb, iterator endb, FT radius)
-{
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::FT FT;
-  FT radius2 = radius*radius;
-  for(iterator dest = starta; dest != enda; dest++)
-  {
-    Rich_point<Kernel> &v = *(*dest);
-    Point &p = v.pt;
-
-    for(iterator origin = startb; origin != endb; origin++)
-    {
-      Rich_point<Kernel> &t = *(*origin);
-      Point &q = t.pt;
-
-      FT dist2 = CGAL::squared_distance(p, q);
-
-      if(dist2 < radius2) 
-      {   
-        v.neighbors.push_back((*origin)->index);
-        t.neighbors.push_back((*dest)->index);
-      }
-    }
-  }
-}
-
-
-
-
-/// Compute ball neighbors for each point in the same point set.
-/// 
-/// \pre `radius > 0`
-///
-/// @tparam Kernel Geometric traits class.
-///
-/// @return 
-template <typename Kernel>
-void compute_ball_neighbors_one_self(
-  std::vector<Rich_point<Kernel> >& points, ///< sample point set
-  CGAL::Bbox_3 bbox, ///< bounding box
-  const typename Kernel::FT radius)
-{
-  CGAL_point_set_processing_precondition(radius > 0);
-
-  for (unsigned int i = 0; i < points.size(); ++i)
-  {
-    points[i].neighbors.clear();
-  }
-
-  Rich_grid<Kernel> points_grid;
-  points_grid.init(points, bbox, radius);
-  points_grid.travel_itself(Rich_grid<Kernel>::find_self_neighbors, 
-                            Rich_grid<Kernel>::find_other_neighbors);
-}
-
-/// Compute ball neighbors for each (sample)points in the other point set
-/// 
-/// \pre `radius > 0`
-///
-/// @tparam Kernel Geometric traits class.
-///
-/// @return 
-template <typename Kernel>
-void compute_ball_neighbors_one_to_another(
-  std::vector<Rich_point<Kernel> >& samples, ///< sample point set
-  std::vector<Rich_point<Kernel> >& original,///< original point set
-  CGAL::Bbox_3 bbox, ///< bounding box
-  const typename Kernel::FT radius ///< neighbor radius
-)
-{
-  typedef typename Kernel::FT FT;
-  if (radius < FT(0.0))
-  {
-    return;
-  }
-
-  for (unsigned int i = 0; i < samples.size(); ++i)
-  {
-    samples[i].original_neighbors.clear();
-  }
-
-  Rich_grid<Kernel> samples_grid;
-  samples_grid.init(samples, bbox, radius);
-
-  // here can be initial the original grid just one time ?
-  Rich_grid<Kernel> original_grid;
-  original_grid.init(original, bbox, radius);
-
-  samples_grid.travel_others(original_grid, 
-                             Rich_grid<Kernel>::find_original_neighbors);
-}
-
-
-} //namespace rich_grid_internal
-
-/// \endcond
-
-} //namespace CGAL
-
-#endif // CGAL_RICH_GRID_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h
deleted file mode 100644
index 22b6042..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h
+++ /dev/null
@@ -1,420 +0,0 @@
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sebastien Loriot
-// This predicates was generated using the fpg tool written by Andreas Meyer.
-//
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
-#define CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-#include <CGAL/internal/Static_filters/tools.h>
-#include <cmath>
-
-namespace CGAL { namespace internal { namespace Static_filters_predicates {
-  
-  template <typename K_base>
-  class Compare_squared_radius_3
-    : public K_base::Compare_squared_radius_3
-  {
-    typedef typename K_base::Point_3 Point_3;
-    typedef typename K_base::FT FT;
-    typedef typename K_base::Compare_squared_radius_3 Base;
-  public:
-    typedef typename Base::result_type result_type;
-  
-    #ifndef CGAL_CFG_MATCHING_BUG_6
-    using Base::operator();
-    #else 
-    result_type
-    operator()(const Point_3& p, const FT& w) const
-    { 
-      return Base::operator()(p,w);
-    }
-    #endif
-    
-    
-    result_type operator() (
-        const Point_3& p, 
-        const Point_3& q, 
-        const Point_3& r, 
-        const Point_3& s,
-        const FT& w
-    ) const {
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 4 points", tmp);
-
-      Get_approx<Point_3> get_approx; // Identity functor for all points
-                                      // but lazy ones.
-      Get_approx<FT> get_approx_ft; // Identity functor for all FT
-                                    // but Lazy ones.
-
-      double px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, alpha;
-
-      if( fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py)      &&
-          fit_in_double(get_approx(p).z(), pz) && 
-          fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy)      &&
-          fit_in_double(get_approx(q).z(), qz) && 
-          fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry)      &&
-          fit_in_double(get_approx(r).z(), rz) && 
-          fit_in_double(get_approx(s).x(), sx) && fit_in_double(get_approx(s).y(), sy)      &&
-          fit_in_double(get_approx(s).z(), sz) && 
-          fit_in_double(get_approx_ft(w), alpha)
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        double qpx;
-        qpx = (qx - px);
-        double qpy;
-        qpy = (qy - py);
-        double qpz;
-        qpz = (qz - pz);
-        double qp2;
-        qp2 = ((square( qpx ) + square( qpy )) + square( qpz ));
-        double rpx;
-        rpx = (rx - px);
-        double rpy;
-        rpy = (ry - py);
-        double rpz;
-        rpz = (rz - pz);
-        double rp2;
-        rp2 = ((square( rpx ) + square( rpy )) + square( rpz ));
-        double spx;
-        spx = (sx - px);
-        double spy;
-        spy = (sy - py);
-        double spz;
-        spz = (sz - pz);
-        double sp2;
-        sp2 = ((square( spx ) + square( spy )) + square( spz ));
-        double num_x;
-        num_x = CGAL::determinant( qpy, qpz, qp2, rpy, rpz, rp2, spy, spz, sp2 );
-        double num_y;
-        num_y = CGAL::determinant( qpx, qpz, qp2, rpx, rpz, rp2, spx, spz, sp2 );
-        double num_z;
-        num_z = CGAL::determinant( qpx, qpy, qp2, rpx, rpy, rp2, spx, spy, sp2 );
-        double den;
-        den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, spx, spy, spz );
-        int int_tmp_result;
-        double double_tmp_result;
-        double eps;
-        double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den )));
-        double max1;
-        double aqpx = CGAL::abs(qpx);
-        double aqpz = CGAL::abs(qpz);
-
-        double arpx = CGAL::abs(rpx);
-        double arpy = CGAL::abs(rpy);
-        double arpz = CGAL::abs(rpz);
-
-        double aspx = CGAL::abs(spx);
-        double aspy = CGAL::abs(spy);
-        double aspz = CGAL::abs(spz);
-
-        double max2 = CGAL::abs(qpy);
-        if( (max2 < aqpz) )
-        {
-            max2 = aqpz;
-        } 
-        if( (max2 < arpy) )
-        {
-            max2 = arpy;
-        } 
-        if( (max2 < arpz) )
-        {
-            max2 = arpz;
-        } 
-        if( (max2 < aspy) )
-        {
-            max2 = aspy;
-        } 
-        if( (max2 < aspz) )
-        {
-            max2 = aspz;
-        } 
-        max1 = max2;
-        if( (max1 < aqpx) )
-        {
-            max1 = aqpx;
-        } 
-        if( (max1 < arpx) )
-        {
-            max1 = arpx;
-        } 
-        if( (max1 < aspx) )
-        {
-            max1 = aspx;
-        } 
-        double max3 = CGAL::abs(alpha);
-        double lower_bound_1;
-        double upper_bound_1;
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max2 < lower_bound_1) )
-        {
-            lower_bound_1 = max2;
-        } 
-        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
-        //if( ((lower_bound_1 < 1.00913582207214915294e-37) || (max3 < 1.01835510738923227819e-74)) )
-        if( ((lower_bound_1 < 1.00913582207214915294e-37) || (max3 < 1.01835510738923227819e-74 && max3!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,s,w);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 2.59614842926741294957e+33) || (max3 > 6.73998666678765545893e+66)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,s,w);
-            } 
-            eps = (2.92119946853791784711e-12 * ((((((max1 * max1) * max1) * max1) * max1) * max2) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = 1;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,s,w);
-                } 
-            } 
-        } 
-        return static_cast<Sign>(int_tmp_result);
-      }
-      else
-        return Base::operator()(p,q,r,s,w);
-    }
-    
-    result_type operator() (
-        const Point_3& p, 
-        const Point_3& q, 
-        const Point_3& s,
-        const FT& w
-    ) const {
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 3 points", tmp);
-      
-      double px, py, pz, qx, qy, qz, sx, sy, sz, alpha;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
-          fit_in_double(p.z(), pz) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
-          fit_in_double(q.z(), qz) && 
-          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)      &&
-          fit_in_double(s.z(), sz) && 
-          fit_in_double(w, alpha)
-        )
-      {   
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        double psx;
-        psx = (px - sx);
-        double psy;
-        psy = (py - sy);
-        double psz;
-        psz = (pz - sz);
-        double ps2;
-        ps2 = ((square( psx ) + square( psy )) + square( psz ));
-        double qsx;
-        qsx = (qx - sx);
-        double qsy;
-        qsy = (qy - sy);
-        double qsz;
-        qsz = (qz - sz);
-        double qs2;
-        qs2 = ((square( qsx ) + square( qsy )) + square( qsz ));
-        double rsx;
-        rsx = ((psy * qsz) - (psz * qsy));
-        double rsy;
-        rsy = ((psz * qsx) - (psx * qsz));
-        double rsz;
-        rsz = ((psx * qsy) - (psy * qsx));
-        double num_x;
-        num_x = ((ps2 * CGAL::determinant( qsy, qsz, rsy, rsz )) - (qs2 * CGAL::determinant( psy, psz, rsy, rsz )));
-        double num_y;
-        num_y = ((ps2 * CGAL::determinant( qsx, qsz, rsx, rsz )) - (qs2 * CGAL::determinant( psx, psz, rsx, rsz )));
-        double num_z;
-        num_z = ((ps2 * CGAL::determinant( qsx, qsy, rsx, rsy )) - (qs2 * CGAL::determinant( psx, psy, rsx, rsy )));
-        double den;
-        den = CGAL::determinant( psx, psy, psz, qsx, qsy, qsz, rsx, rsy, rsz );
-        int int_tmp_result;
-        double double_tmp_result;
-        double eps;
-        double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den )));
-        double max1;
-        double max2 = CGAL::abs(psx);
-        double apsy = CGAL::abs(psy);
-        double apsz = CGAL::abs(psz);
-
-        double aqsx = CGAL::abs(qsx);
-        double aqsy = CGAL::abs(qsy);
-        double aqsz = CGAL::abs(qsz);
-
-        if( (max2 < apsy) )
-        {
-            max2 = apsy;
-        } 
-        if( (max2 < aqsx) )
-        {
-            max2 = aqsx;
-        } 
-        if( (max2 < aqsy) )
-        {
-            max2 = aqsy;
-        } 
-        max1 = max2;
-        if( (max1 < apsz) )
-        {
-            max1 = apsz;
-        } 
-        if( (max1 < aqsz) )
-        {
-            max1 = aqsz;
-        } 
-        double max3 = CGAL::abs(alpha);
-        double lower_bound_1;
-        double upper_bound_1;
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max2 < lower_bound_1) )
-        {
-            lower_bound_1 = max2;
-        }
-
-        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
-        //if( ((lower_bound_1 < 2.26156385701827020260e-30) || (max3 < 5.11467107937135531427e-60)) )
-        if( ((lower_bound_1 < 2.26156385701827020260e-30) || (max3 < 5.11467107937135531427e-60 && max3!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,s,w);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 1.23794003928538000002e+27) || (max3 > 1.53249554086588817779e+54)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,s,w);
-            } 
-            eps = (6.35705373458387935514e-12 * ((((((((max1 * max1) * max2) * max1) * max1) * max1) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = 1;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,s,w);
-                } 
-            } 
-        } 
-        return static_cast<result_type>(int_tmp_result);
-      }
-      else
-        return Base::operator()(p,q,s,w);
-    }
-
-
-    result_type operator() (
-        const Point_3& p, 
-        const Point_3& q, 
-        const FT& w
-    ) const {
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 2 points", tmp);
-      
-      double px, py, pz, qx, qy, qz, alpha;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
-          fit_in_double(p.z(), pz) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
-          fit_in_double(q.z(), qz) && 
-          fit_in_double(w, alpha)
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        double px_qx = (px - qx);
-        double py_qy = (py - qy);
-        double pz_qz = (pz - qz);
-        int int_tmp_result;
-        double double_tmp_result;
-        double eps;
-        double_tmp_result = (((square( px_qx ) + square( py_qy )) + square( pz_qz )) - (alpha * 4.00000000000000000000e+00));
-        double max1 = CGAL::abs(px_qx);
-        double apy_qy = CGAL::abs(py_qy);
-        double apz_qz = CGAL::abs(pz_qz);
-        if( (max1 < apy_qy) )
-        {
-            max1 = apy_qy;
-        } 
-        if( (max1 < apz_qz) )
-        {
-            max1 = apz_qz;
-        } 
-        double max2 = CGAL::abs(alpha);
-        
-        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
-        //if( ((max1 < 8.85464260923320109378e-147) || (max2 < 7.84046957372481590760e-293)) )
-        if( ((max1 < 8.85464260923320109378e-147) || (max2 < 7.84046957372481590760e-293 && max2!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,w);
-        } 
-        else 
-        {
-            if( ((max1 > 2.23974474217780371323e+102) || (max2 > 5.01645651011311642768e+204)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,w);
-            } 
-            eps = (2.11094186805729591487e-15 * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max2, (max1 * max1) ));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = 1;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,w);
-                } 
-            } 
-        } 
-        return static_cast<Sign>(int_tmp_result);
-      }
-      else
-        return Base::operator()(p,q,w);
-    }
-    
-  };
-
-} } } // namespace CGAL::internal::Static_filters_predicates
- 
-#endif // CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h
deleted file mode 100644
index 1a5a6fa..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sebastien Loriot
-// This predicates was generated using the fpg tool written by Andreas Meyer.
-//
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
-#define CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-#include <cmath>
-
-
-namespace CGAL { namespace internal { namespace Static_filters_predicates {
-  
-  
-  template <typename K_base>
-  class Compare_weighted_squared_radius_3:
-    public K_base::Compare_weighted_squared_radius_3
-  {
-    typedef typename K_base::Weighted_point_3 Weighted_point_3;
-    typedef typename K_base::FT FT;
-    typedef typename K_base::Compare_weighted_squared_radius_3 Base;
-  public:
-    typedef typename Base::result_type result_type;
-  
-    #ifndef CGAL_CFG_MATCHING_BUG_6
-    using Base::operator();
-    #else 
-    result_type
-    operator()(const Weighted_point_3& p, const FT& w) const
-    { 
-      return Base::operator()(p,w);
-    }
-    #endif
-    
-    
-    result_type operator() (
-        const Weighted_point_3& p, 
-        const Weighted_point_3& q, 
-        const Weighted_point_3& r, 
-        const Weighted_point_3& s,
-        const FT& w
-    ) const {
-
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 4 wpoints", tmp);
-      
-      double px, py, pz, pw, qx, qy, qz, qw, rx, ry, rz, rw, sx, sy, sz, sw, alpha;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
-          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)      &&
-          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rw) &&
-          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)      &&
-          fit_in_double(s.z(), sz) && fit_in_double(s.weight(), sw) && 
-          fit_in_double(w, alpha)
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        
-        double qpx = (qx - px);
-        double qpy = (qy - py);
-        double qpz = (qz - pz);
-        double pw_qw = (pw - qw);
-        double qp2 = (((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz )) + pw_qw);
-        double rpx = (rx - px);
-        double rpy = (ry - py);
-        double rpz = (rz - pz);
-        double pw_rw = (pw - rw);
-        double rp2 = (((CGAL::square( rpx ) + CGAL::square( rpy )) + CGAL::square( rpz )) + pw_rw);
-        double spx = (sx - px);
-        double spy = (sy - py);
-        double spz = (sz - pz);
-        double pw_sw = (pw - sw);
-        double sp2 = (((CGAL::square( spx ) + CGAL::square( spy )) + CGAL::square( spz )) + pw_sw);
-        double num_x = CGAL::determinant( qpy, qpz, qp2, rpy, rpz, rp2, spy, spz, sp2 );
-        double num_y = CGAL::determinant( qpx, qpz, qp2, rpx, rpz, rp2, spx, spz, sp2 );
-        double num_z = CGAL::determinant( qpx, qpy, qp2, rpx, rpy, rp2, spx, spy, sp2 );
-        double den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, spx, spy, spz );
-        double alpha_pw = (alpha + pw);
-        CGAL::Sign int_tmp_result;
-        double eps;
-        double double_tmp_result = (((alpha_pw * 4.00000000000000000000e+00) * CGAL::square( den )) - ((CGAL::square( num_x ) + CGAL::square( num_y )) + CGAL::square( num_z )));
-        double max4 = CGAL::abs(qpy);
-
-        double aqpx = CGAL::abs(qpx);
-
-        double arpx = CGAL::abs(rpx);
-        double arpy = CGAL::abs(rpy);
-        double arpz = CGAL::abs(rpz);
-
-        double aspx = CGAL::abs(spx);
-        double aspy = CGAL::abs(spy);
-        double aspz = CGAL::abs(spz);
-
-        double apw_rw = CGAL::abs(pw_rw);
-        double apw_sw = CGAL::abs(pw_sw);
-
-        double aalpha_pw = CGAL::abs(alpha_pw);
-
-        if( max4 < arpy ) max4 = arpy;
-        if( max4 < aspy ) max4 = aspy; 
-        double max2 = max4;
-        if( max2 < aqpx ) max2 = aqpx; 
-        if( max2 < arpx ) max2 = arpx; 
-        if( max2 < aspx ) max2 = aspx; 
-        double max1 = max2;
-        double max3 = max4;
-        double max5 = CGAL::abs(qpz);
-        if( max5 < arpz ) max5 = arpz;  
-        if( max5 < aspz ) max5 = aspz;  
-        if( max3 < max5 )      max3 = max5;       
-        if( max1 < max3 )      max1 = max3;       
-        if( max1 < max4 )      max1 = max4;       
-        if( max1 < max5 )      max1 = max5;      
-        double max6 = CGAL::abs(pw_qw);
-        if( max6 < apw_rw ) max6 = apw_rw;
-        if( max6 < apw_sw ) max6 = apw_sw;
-        double max7 = max6;
-        if( max7 < aalpha_pw ) max7 = aalpha_pw; 
-        double lower_bound_1;
-        double upper_bound_1;
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( max2 < lower_bound_1 ) lower_bound_1 = max2;
-        if( max3 < lower_bound_1 ) lower_bound_1 = max3;
-        if( max4 < lower_bound_1 ) lower_bound_1 = max4;
-        if( max5 < lower_bound_1 ) lower_bound_1 = max5;
-        double lower_bound_2;
-        double upper_bound_2;
-        lower_bound_2 = max6;
-        upper_bound_2 = max6;
-        if( max7 < lower_bound_2 ) lower_bound_2 = max7;
-        else 
-        {
-            if( max7 > upper_bound_2 ) upper_bound_2 = max7;
-        } 
-        if( ((lower_bound_1 < 8.99995159231796093217e-38) || (lower_bound_2 < 8.09991286640666077573e-75)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,s,w);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 2.59614842926741294957e+33) || (upper_bound_2 > 6.73998666678765545893e+66)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,s,w);
-            } 
-            eps = (5.16919651938288206243e-12 * (((((max2 * max3) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max7, (max1 * max1) )) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max6, (max4 * max5) ), (max1 * max1) )));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = CGAL::NEGATIVE;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = CGAL::POSITIVE;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,s,w);
-                } 
-            } 
-        } 
-        return int_tmp_result;
-      }
-      else
-        return Base::operator()(p,q,r,s,w);
-    }
-
-    result_type
-    operator() (
-      const Weighted_point_3& p, 
-      const Weighted_point_3& q , 
-      const Weighted_point_3& r,
-      const FT& w
-    ) const {
-      
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 3 wpoints", tmp);
-      
-      double px, py, pz, pw, qx, qy, qz, qw, rx, ry, rz, rw, alpha;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
-          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)      &&
-          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rw) &&
-          fit_in_double(w, alpha)
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        
-        double qpx = (qx - px);
-        double qpy = (qy - py);
-        double qpz = (qz - pz);
-        double pw_qw = (pw - qw);
-        double qp2 = (((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz )) + pw_qw);
-        double rpx = (rx - px);
-        double rpy = (ry - py);
-        double rpz = (rz - pz);
-        double pw_rw = (pw - rw);
-        double rp2 = (((CGAL::square( rpx ) + CGAL::square( rpy )) + CGAL::square( rpz )) + pw_rw);
-        double sx = ((qpy * rpz) - (qpz * rpy));
-        double sy = ((qpz * rpx) - (qpx * rpz));
-        double sz = ((qpx * rpy) - (qpy * rpx));
-        double num_x = ((qp2 * CGAL::determinant( rpy, rpz, sy, sz )) - (rp2 * CGAL::determinant( qpy, qpz, sy, sz )));
-        double num_y = ((qp2 * CGAL::determinant( rpx, rpz, sx, sz )) - (rp2 * CGAL::determinant( qpx, qpz, sx, sz )));
-        double num_z = ((qp2 * CGAL::determinant( rpx, rpy, sx, sy )) - (rp2 * CGAL::determinant( qpx, qpy, sx, sy )));
-        double den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, sx, sy, sz );
-        double alpha_pw = (alpha + pw);
-        CGAL::Sign int_tmp_result;
-        double eps;
-        double double_tmp_result = ((alpha_pw * CGAL::square( den )) - (2.50000000000000000000e-01 * ((CGAL::square( num_x ) + CGAL::square( num_y )) + CGAL::square( num_z ))));
-        double max2 = CGAL::abs(qpx);
-
-        double aqpy = CGAL::abs(qpy);
-        double aqpz = CGAL::abs(qpz);
-
-        double arpx = CGAL::abs(rpx);
-        double arpy = CGAL::abs(rpy);
-        double arpz = CGAL::abs(rpz);
-
-        double apw_rw = CGAL::abs(pw_rw);
-
-        double aalpha_pw = CGAL::abs(alpha_pw);
-
-        if( max2 < aqpy )  max2 = aqpy;
-        if( max2 < arpx )  max2 = arpx;
-        if( max2 < arpy )  max2 = arpy;
-        double max1 = max2;
-        if( max1 < aqpz )  max1 = aqpz;
-        if( max1 < arpz )  max1 = arpz;
-        double max3 = CGAL::abs(pw_qw);
-        if( max3 < apw_rw ) max3 = apw_rw;
-        double max4 = max3;
-        if( max4 < aalpha_pw ) max4 = aalpha_pw;
-        double lower_bound_1;
-        double upper_bound_1;
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( max2 < lower_bound_1 ) lower_bound_1 = max2;
-        double lower_bound_2;
-        double upper_bound_2;
-        lower_bound_2 = max3;
-        upper_bound_2 = max3;
-        if( max4 < lower_bound_2 )  lower_bound_2 = max4;
-        else 
-        {
-          if( max4 > upper_bound_2 ) upper_bound_2 = max4;
-        } 
-        if( ((lower_bound_1 < 2.13354839219409151500e-30) || (lower_bound_2 < 4.55202874183399304187e-60)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,w);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 1.23794003928538000002e+27) || (upper_bound_2 > 1.53249554086588817779e+54)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,w);
-            } 
-            eps = (1.13846439714120896721e-11 * (((((((max1 * max2) * max1) * max1) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max4, (max1 * max1) )) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = CGAL::NEGATIVE;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = CGAL::POSITIVE;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,w);
-                } 
-            } 
-        } 
-        return int_tmp_result;
-      }
-      else
-        return Base::operator()(p,q,r,w);
-    }
-
-    result_type
-    operator() (
-      const Weighted_point_3& p, 
-      const Weighted_point_3& q,
-      const FT& w
-    ) const {
-      
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 2 wpoints", tmp);
-      
-      double px, py, pz, pw, qx, qy, qz, qw, alpha;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
-          fit_in_double(w, alpha)
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        
-        double qpx = (qx - px);
-        double qpy = (qy - py);
-        double qpz = (qz - pz);
-        double qp2 = ((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz ));
-        double alpha_pw = (alpha + pw);
-        double pw_qw = (pw - qw);
-        CGAL::Sign int_tmp_result;
-        double eps;
-        double double_tmp_result = (((4.00000000000000000000e+00 * qp2) * alpha_pw) - CGAL::square( (qp2 + pw_qw) ));
-        double max1 = CGAL::abs(qpx);
-
-        double aqpy = CGAL::abs(qpy);
-        double aqpz = CGAL::abs(qpz);
-        double aalpha_pw = CGAL::abs(alpha_pw);
-
-        if( max1 < aqpy ) max1 = aqpy;
-        if( max1 < aqpz ) max1 = aqpz;
-        double max2;
-        double max3 = CGAL::abs(pw_qw);
-        max2 = max3;
-        if( max2 < aalpha_pw ) max2 = aalpha_pw;
-        double lower_bound_2;
-        double upper_bound_2;
-        lower_bound_2 = max2;
-        upper_bound_2 = max2;
-        if( (max3 < lower_bound_2) ) lower_bound_2 = max3;
-        if( ((max1 < 3.12497063152273477754e-74) || (lower_bound_2 < 9.76544144787960039738e-148)) ){
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,w);
-        }
-        else 
-        {
-            if( ((max1 > 6.42775217703595896130e+60) || (upper_bound_2 > 4.13159980493905099125e+121)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,w);
-            } 
-            eps = (2.33324675561911025753e-14 * (CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max2, (max1 * max1) ) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
-            if( (double_tmp_result > eps) )
-            {
-                int_tmp_result = CGAL::NEGATIVE;
-            } 
-            else 
-            {
-                if( (double_tmp_result < -eps) )
-                {
-                    int_tmp_result = CGAL::POSITIVE;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,w);
-                } 
-            } 
-        } 
-        return int_tmp_result;        
-      }
-      else
-        return Base::operator()(p,q,w);
-    }
-    
-  };
-  
-  
-    } } }//namespace CGAL::internal::Static_filters_predicates
-
-
-#endif //CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Equal_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Equal_3.h
deleted file mode 100644
index c711669..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Equal_3.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2011 GeometryFactory Sarl (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri
-
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
-#define CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
-
-#include <CGAL/Bbox_3.h>
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/tools.h>
-#include <cmath>
-#include <iostream>
-
-namespace CGAL {
-
-namespace internal {
-
-namespace Static_filters_predicates {
-
-
-template < typename K_base >
-class Equal_3
-  : public K_base::Equal_3
-{
-  typedef typename K_base::Point_3   Point_3;
-  typedef typename K_base::Equal_3   Base;
-
-public:
-
-  typedef typename Base::result_type  result_type;
-
-
-#ifndef CGAL_CFG_MATCHING_BUG_6
-  using Base::operator();
-#else // CGAL_CFG_MATCHING_BUG_6
-  template <typename T>
-  result_type
-  operator()(const T& t1, const T& t2) const
-  {
-    return Base()(t1,t2);
-  }
-#endif // CGAL_CFG_MATCHING_BUG_6
-
-
-  result_type operator()(const Point_3 &p, const Point_3& q) const
-  {
-    CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to   : ") +
-                           std::string(CGAL_PRETTY_FUNCTION), tmp);
-
-    Get_approx<Point_3> get_approx; // Identity functor for all points
-                                    // but lazy points
-    double px, py, pz, qx, qy, qz;
-
-    if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
-        fit_in_double(get_approx(p).z(), pz) &&
-        fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) &&
-        fit_in_double(get_approx(q).z(), qz) )      
-    {
-      CGAL_BRANCH_PROFILER_BRANCH(tmp);
-      return px == qx && py == qy && pz == qz;
-    }
-    return Base::operator()(p, q);
-  }
-
-
-}; // end class Equal_3
-
-} // end namespace Static_filters_predicates
-
-} // end namespace internal
-
-} // end namespace CGAL
-
-#endif  // CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h
deleted file mode 100644
index 23400d2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright (c) 1997-2013 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Nico Kruithof <Nico at nghk.nl>
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
-#define CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/Orientation_2.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-
-#include <CGAL/Periodic_2_offset_2.h>
-
-#include <cmath>
-
-/*
-  Current implementation: Just take the 3D predicates and set z to
-  zero. The epsilon bounds should still hold, although they might be
-  too high.
-
-  First attempt tried to generate the predicates using the following
-  code:
-  Predicates are generated using mcc from the Filtered Predicate
-  Generator (fpg) using:
-
-  double
-  det2x2( double a00, double a01,
-  double a10, double a11 )
-  {
-  return a00*a11 - a10*a01;
-  }
-
-  int
-  orientationC2( double px, double py,
-                 double qx, double qy,
-                 double rx, double ry )
-  group px qx rx;
-  group py qy ry;
-  {
-  return sign( det2x2( qx-px, qy-py ,
-  rx-px, ry-py ) );
-  }
-
-  int
-  orientationC2_offset( double px, double py, int opx, int opy,
-                        double qx, double qy, int oqx, int oqy,
-                        double rx, double ry, int orx, int ory,
-                        double domxmax, double domxmin,
-                        double domymax, double domymin
-  )
-  group px qx rx domxmax domxmin opx oqx orx;
-  group py qy ry domymax domymin opy oqy ory;
-  {
-  double domx = domxmax-domxmin;
-  double domy = domymax-domymin;
-
-  double pqx = 1*(qx - px) + (oqx-opx)*domx;
-  double pqy = 1*(qy - py) + (oqy-opy)*domy;
-  double prx = 1*(rx - px) + (orx-opx)*domx;
-  double pry = 1*(ry - py) + (ory-opy)*domy;
-
-  return sign( det2x2(pqx, pqy, prx, pry) );
-  }
-*/
-
-namespace CGAL
-{
-namespace internal
-{
-namespace Static_filters_predicates
-{
-
-template < typename K_base >
-class Periodic_2_orientation_2 : public K_base::Orientation_2
-{
-  typedef typename K_base::Point_2          Point_2;
-  typedef typename K_base::Vector_2         Vector_2;
-  typedef typename K_base::Circle_2         Circle_2;
-  typedef typename K_base::Offset_2         Offset_2;
-  typedef typename K_base::Iso_rectangle_2  Iso_rectangle_2;
-
-  typedef typename K_base::Orientation_2    Base;
-
-public:
-  const Iso_rectangle_2 * const _dom;
-
-public:
-  typedef typename Base::result_type  result_type;
-
-  template <class EX, class AP>
-  Periodic_2_orientation_2(const Iso_rectangle_2 * const dom,
-                           const EX * dom_e, const AP * dom_f) : Base(dom_e, dom_f), _dom(dom)
-  {
-  }
-
-#ifndef CGAL_CFG_MATCHING_BUG_6
-  using Base::operator();
-#else
-  result_type
-  operator()(const Vector_2& u, const Vector_2& v) const
-  {
-    return Base::operator()(u, v);
-  }
-
-  result_type
-  operator()(const Circle_2& c) const
-  {
-    return Base::operator()(c);
-  }
-#endif
-
-  /// Normal static orientation test, copied from Orientation_2
-  result_type operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r) const
-  {
-    CGAL_PROFILER("Periodic_2_orientation_2 calls");
-
-    double px, py, qx, qy, rx, ry;
-
-    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
-        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
-        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry))
-      {
-        CGAL_PROFILER("Periodic_2_orientation_2 semi-static attempts");
-
-        double pqx = qx - px;
-        double pqy = qy - py;
-        double prx = rx - px;
-        double pry = ry - py;
-
-        // Then semi-static filter.
-        double maxx = CGAL::abs(pqx);
-        double maxy = CGAL::abs(pqy);
-
-        double aprx = CGAL::abs(prx);
-        double apry = CGAL::abs(pry);
-
-        if (maxx < aprx) maxx = aprx;
-        if (maxy < apry) maxy = apry;
-        double eps = 5.1107127829973299e-15 * maxx * maxy;
-        double det = CGAL::determinant(pqx, pqy,
-                                       prx, pry);
-
-        // Sort maxx < maxy
-        if (maxx > maxy)
-          std::swap(maxx, maxy);
-
-        // Protect against underflow in the computation of eps.
-        if (maxx < 1e-97) /* cbrt(min_double/eps) */
-          {
-            if (maxx == 0)
-              return ZERO;
-          }
-        // Protect against overflow in the computation of det.
-        else if (maxy < 1e102) /* cbrt(max_double [hadamard]/4) */
-          {
-            if (det > eps)  return POSITIVE;
-            if (det < -eps) return NEGATIVE;
-          }
-
-        CGAL_PROFILER("Periodic_2_orientation_2 semi-static failures");
-      }
-
-    return Base::operator()(p, q, r);
-  }
-
-
-  /// Static orientation test with offsets
-  result_type operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r,
-                         const Offset_2 &o_p, const Offset_2 &o_q, const Offset_2 &o_r) const
-  {
-
-    CGAL_PROFILER("Periodic_2_orientation_2 with offset calls");
-
-    double px, py, qx, qy, rx, ry;
-    double domxmax, domxmin, domymax, domymin;
-    int opx = o_p.x();
-    int opy = o_p.y();
-
-    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
-        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
-        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry) &&
-        fit_in_double(_dom->xmax(), domxmax) &&
-        fit_in_double(_dom->xmin(), domxmin) &&
-        fit_in_double(_dom->ymax(), domymax) &&
-        fit_in_double(_dom->ymin(), domymin))
-      {
-        CGAL_PROFILER("Periodic_2_orientation_2 with offset semi-static attempts");
-
-        double domx = domxmax - domxmin;
-        double domy = domymax - domymin;
-
-        double pqx = qx - px + domx * ( o_q.x() - opx );
-        double pqy = qy - py + domy * ( o_q.y() - opy );
-        double prx = rx - px + domx * ( o_r.x() - opx );
-        double pry = ry - py + domy * ( o_r.y() - opy );
-
-        // Then semi-static filter.
-        double maxx = CGAL::abs(pqx);
-        double maxy = CGAL::abs(pqy);
-
-        double aprx = CGAL::abs(prx);
-        double apry = CGAL::abs(pry);
-
-        if (maxx < aprx) maxx = aprx;
-        if (maxy < apry) maxy = apry;
-        double eps = 4.111024169857068197e-15 * maxx * maxy;
-        double det = CGAL::determinant(pqx, pqy,
-                                       prx, pry);
-
-        // Sort maxx < maxy.
-        if (maxx > maxy)
-          std::swap(maxx, maxy);
-
-        // Protect against underflow in the computation of eps.
-        if (maxx < 1e-97) /* cbrt(min_double/eps) */
-          {
-            if (maxx == 0)
-              return ZERO;
-          }
-        // Protect against overflow in the computation of det.
-        else if (maxy < 1e102) /* cbrt(max_double [hadamard]/4) */
-          {
-            if (det > eps)  return POSITIVE;
-            if (det < -eps) return NEGATIVE;
-          }
-
-        CGAL_PROFILER("Periodic_2_orientation_2 with offset semi-static failures");
-      }
-
-    return Base::operator()(p, q, r, o_p, o_q, o_r);
-  }
-
-  // Computes the epsilon for Periodic_2_orientation_2.
-  static double compute_epsilon()
-  {
-    typedef Static_filter_error F;
-    F t1 = F(1, F::ulp() / 4);       // First translation
-    F det = CGAL::determinant(t1, t1, t1,
-                              t1, t1, t1,
-                              t1, t1, t1); // Full det
-    double err = det.error();
-    err += err * 2 * F::ulp(); // Correction due to "eps * maxx * maxy...".
-    std::cerr << "*** epsilon for Periodic_2_orientation_2 = " << err
-              << std::endl;
-    return err;
-  }
-};
-
-}
-}
-} // namespace CGAL::internal::Static_filters_predicates
-
-#endif // CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h
deleted file mode 100644
index 64c3c35..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright (c) 1997-2013 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
-//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
-//                 Nico Kruithof <Nico at nghk.nl>
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
-#define CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-
-#include <CGAL/Periodic_2_offset_2.h>
-
-namespace CGAL
-{
-namespace internal
-{
-namespace Static_filters_predicates
-{
-
-template < typename K_base >
-class Periodic_2_side_of_oriented_circle_2
-  : public K_base::Side_of_oriented_circle_2
-{
-  typedef typename K_base::Side_of_oriented_circle_2    Base;
-
-  typedef typename K_base::Point_2                      Point_2;
-  typedef typename K_base::Iso_rectangle_2              Iso_rectangle_2;
-  typedef CGAL::Periodic_2_offset_2                     Offset;
-
-public:
-  const Iso_rectangle_2 * _dom;
-
-public:
-  typedef typename Base::result_type  result_type;
-
-  template <class EX, class AP>
-  Periodic_2_side_of_oriented_circle_2(const Iso_rectangle_2 * dom,
-                                       const EX * dom_e,
-                                       const AP * dom_f)
-    : Base(dom_e, dom_f), _dom(dom) { }
-
-  Oriented_side
-  operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r,
-             const Point_2 &t) const
-  {
-    CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Periodic_2_side_of_oriented_circle_2", tmp);
-
-    Get_approx<Point_2> get_approx; // Identity functor for all points
-    // but lazy points.
-
-    double px, py, qx, qy, rx, ry, tx, ty;
-
-    if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
-        fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) &&
-        fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) &&
-        fit_in_double(get_approx(t).x(), tx) && fit_in_double(get_approx(t).y(), ty))
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-
-        double qpx = qx - px;
-        double qpy = qy - py;
-        double rpx = rx - px;
-        double rpy = ry - py;
-        double tpx = tx - px;
-        double tpy = ty - py;
-
-        double tqx = tx - qx;
-        double tqy = ty - qy;
-        double rqx = rx - qx;
-        double rqy = ry - qy;
-
-        double det = CGAL::determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy,
-                                       qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);
-
-        // We compute the semi-static bound.
-        double maxx = CGAL::abs(qpx);
-        double maxy = CGAL::abs(qpy);
-
-        double arpx = CGAL::abs(rpx);
-        double arpy = CGAL::abs(rpy);
-
-        double atqx = CGAL::abs(tqx);
-        double atqy = CGAL::abs(tqy);
-
-        double atpx = CGAL::abs(tpx);
-        double atpy = CGAL::abs(tpy);
-
-        double arqx = CGAL::abs(rqx);
-        double arqy = CGAL::abs(rqy);
-
-        if (maxx < arpx) maxx = arpx;
-        if (maxx < atpx) maxx = atpx;
-        if (maxx < atqx) maxx = atqx;
-        if (maxx < arqx) maxx = arqx;
-
-        if (maxy < arpy) maxy = arpy;
-        if (maxy < atpy) maxy = atpy;
-        if (maxy < atqy) maxy = atqy;
-        if (maxy < arqy) maxy = arqy;
-
-        if (maxx > maxy)  std::swap(maxx, maxy);
-
-        // Protect against underflow in the computation of eps.
-        if (maxx < 1e-73)
-          {
-            if (maxx == 0)
-              return ON_ORIENTED_BOUNDARY;
-          }
-        else if (maxy < 1e76) /* sqrt(sqrt(max_double/16 [hadamard])) */
-          {
-            double eps = 8.8878565762001373e-15 * maxx * maxy * (maxy * maxy);
-            if (det > eps)  return ON_POSITIVE_SIDE;
-            if (det < -eps) return ON_NEGATIVE_SIDE;
-          }
-
-        CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-      }
-
-    return Base::operator()(p, q, r, t);
-  }
-
-  Oriented_side
-  operator()(const Point_2 &p, const Point_2 &q,
-             const Point_2 &r, const Point_2 &s,
-             const Offset &o_p, const Offset &o_q,
-             const Offset &o_r, const Offset &o_s) const
-  {
-
-    CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 calls");
-
-    double px, py, qx, qy, rx, ry, sx, sy;
-    double domxmax, domxmin, domymax, domymin;
-    int osx = o_s.x();
-    int osy = o_s.y();
-
-    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
-        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
-        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry) &&
-        fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy) &&
-        fit_in_double(_dom->xmax(), domxmax) &&
-        fit_in_double(_dom->xmin(), domxmin) &&
-        fit_in_double(_dom->ymax(), domymax) &&
-        fit_in_double(_dom->ymin(), domymin))
-      {
-
-        CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 with offset semi-static attempts");
-
-        double domx = domxmax - domxmin;
-        double domy = domymax - domymin;
-
-        double psx = px - sx + domx * (o_p.x() - osx);
-        double psy = py - sy + domy * (o_p.y() - osy);
-        double pt2 = CGAL_NTS square(psx) + CGAL_NTS square(psy);
-        double qsx = qx - sx + domx * (o_q.x() - osx);
-        double qsy = qy - sy + domy * (o_q.y() - osy);
-        double qt2 = CGAL_NTS square(qsx) + CGAL_NTS square(qsy);
-        double rsx = rx - sx + domx * (o_r.x() - osx);
-        double rsy = ry - sy + domy * (o_r.y() - osy);
-        double rt2 = CGAL_NTS square(rsx) + CGAL_NTS square(rsy);
-
-        // Compute the semi-static bound.
-        double maxx = CGAL::abs(psx);
-        double maxy = CGAL::abs(psy);
-
-        double aqsx = CGAL::abs(qsx);
-        double aqsy = CGAL::abs(qsy);
-
-        double arsx = CGAL::abs(rsx);
-        double arsy = CGAL::abs(rsy);
-
-        if (maxx < aqsx) maxx = aqsx;
-        if (maxx < arsx) maxx = arsx;
-
-        if (maxy < aqsy) maxy = aqsy;
-        if (maxy < arsy) maxy = arsy;
-
-        // Sort maxx < maxy.
-        if (maxx > maxy)
-          std::swap(maxx, maxy);
-
-        double eps = 1.0466759304746772485e-13 * maxx * maxy * (maxy * maxy);
-
-        double det = CGAL::determinant(psx, psy, pt2,
-                                       qsx, qsy, qt2,
-                                       rsx, rsy, rt2);
-
-        // Protect against underflow in the computation of eps.
-        if (maxx < 1e-58) /* sqrt^5(min_double/eps) */
-          {
-            if (maxx == 0)
-              return ON_ORIENTED_BOUNDARY;
-          }
-        // Protect against overflow in the computation of det.
-        else if (maxy < 1e61) /* sqrt^5(max_double/4 [hadamard]) */
-          {
-            if (det > eps)  return ON_POSITIVE_SIDE;
-            if (det < -eps) return ON_NEGATIVE_SIDE;
-          }
-
-        CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 with offset semi-static failures");
-      }
-    return Base::operator()(p, q, r, s, o_p, o_q, o_r, o_s);
-  }
-
-  // Computes the epsilon for Periodic_2_side_of_oriented_circle_2.
-  static double compute_epsilon()
-  {
-    typedef Static_filter_error F;
-    F t1 = F(1, F::ulp() / 4); // First translations
-    F sq = t1 * t1 + t1 * t1 + t1 * t1; // squares
-    F det = CGAL::determinant(t1, t1, t1, sq,
-                              t1, t1, t1, sq,
-                              t1, t1, t1, sq,
-                              t1, t1, t1, sq); // Full det
-    double err = det.error();
-    err += err * 3 * F::ulp(); // Correction due to "eps * maxx * ...".
-
-    std::cerr << "*** epsilon for Periodic_2_side_of_oriented_circle_2 = "
-              << err << std::endl;
-    return err;
-  }
-};
-
-}
-}
-} // namespace CGAL::internal::Static_filters_predicates
-
-#endif // CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Power_test_3.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Power_test_3.h
deleted file mode 100644
index 7354ddc..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Power_test_3.h
+++ /dev/null
@@ -1,789 +0,0 @@
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sebastien Loriot
-// This predicates was generated using the fpg tool written by Andreas Meyer.
-//
-
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
-#define CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
-
-#include <CGAL/Profile_counter.h>
-#include <CGAL/internal/Static_filters/Static_filter_error.h>
-#include <cmath>
-
-
-namespace CGAL { namespace internal { namespace Static_filters_predicates {
-  
-  template <typename K_base>
-  class Power_test_3:
-    public K_base::Power_test_3
-  {
-    typedef typename K_base::Weighted_point_3 Weighted_point_3;
-    typedef typename K_base::FT FT;
-    typedef typename K_base::Power_test_3 Base;
-  public:
-    typedef typename Base::result_type result_type;
-  
-    #ifndef CGAL_CFG_MATCHING_BUG_6
-    using Base::operator();
-    #else 
-    result_type
-    operator()(const Weighted_point_3& p, const Weighted_point_3& q) const
-    { 
-      return Base::operator()(p,q);
-    }
-    #endif
-
-
-    void
-    msvc_workaround(double& max1, double& max2, double& max3, double& max4, double& max5, double&  RT_tmp_result, 
-                    double px, double  py, double  pz, double  pwt, 
-                    double qx, double  qy, double  qz, double  qwt, 
-                    double  rx, double  ry, double  rz, double  rwt, 
-                    double  sx, double  sy, double  sz, double  swt, 
-                    double  tx, double  ty, double  tz, double  twt) const
-    {
-      double dpx = (px - tx);
-      double dpy = (py - ty);
-      double dpz = (pz - tz);
-      double twt_pwt = (twt - pwt);
-      double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
-      double dqx = (qx - tx);
-      double dqy = (qy - ty);
-      double dqz = (qz - tz);
-      double twt_qwt = (twt - qwt);
-      double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
-      double drx = (rx - tx);
-      double dry = (ry - ty);
-      double drz = (rz - tz);
-      double twt_rwt = (twt - rwt);
-      double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
-      double dsx = (sx - tx);
-      double dsy = (sy - ty);
-      double dsz = (sz - tz);
-      double twt_swt = (twt - swt);
-      double dst = (((square( dsx ) + square( dsy )) + square( dsz )) + twt_swt);
-
-      //        double 
-      RT_tmp_result = CGAL::determinant( dpx, dpy, dpz, dpt, dqx, dqy, dqz, dqt, drx, dry, drz, drt, dsx, dsy, dsz, dst );
-
-      //        double
-      max2 = CGAL::abs(dpx);
-     
-
-      double adqx = CGAL::abs(dqx);
-      double adqy = CGAL::abs(dqy);
-      double adqz = CGAL::abs(dqz);
-
-      double adrx = CGAL::abs(drx);
-      double adry = CGAL::abs(dry);
-      double adrz = CGAL::abs(drz);
-
-      double adsx = CGAL::abs(dsx);
-      double adsy = CGAL::abs(dsy);
-      double adsz = CGAL::abs(dsz);
-
-      double atwt_qwt = CGAL::abs(twt_qwt);
-      double atwt_rwt = CGAL::abs(twt_rwt);
-      double atwt_swt = CGAL::abs(twt_swt);
-
-      if( (max2 < adqx) ) max2 = adqx;
-      if( (max2 < adrx) ) max2 = adrx;
-      if( (max2 < adsx) ) max2 = adsx;
-      max1 = max2; 
-      max3 = CGAL::abs(dpy);
-      if( (max3 < adqy) ) max3 = adqy;
-      if( (max3 < adry) ) max3 = adry;
-      if( (max3 < adsy) ) max3 = adsy;
-      if( (max1 < max3) )      max1 = max3;
-      max4 = CGAL::abs(dpz);
-      if( (max4 < adqz) ) max4 = adqz;
-      if( (max4 < adrz) ) max4 = adrz;
-      if( (max4 < adsz) ) max4 = adsz;
-      if( (max1 < max4) )      max1 = max4;
-      max5 = CGAL::abs(twt_pwt);
-      if( (max5 < atwt_qwt) ) max5 = atwt_qwt;
-      if( (max5 < atwt_rwt) ) max5 = atwt_rwt;
-      if( (max5 < atwt_swt) ) max5 = atwt_swt;
-    }    
-
-    
-    result_type operator() ( const Weighted_point_3 & p,
-                             const Weighted_point_3 & q,
-                             const Weighted_point_3 & r,
-                             const Weighted_point_3 & s,
-                             const Weighted_point_3 & t) const
-    {
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 4+1 wpoints", tmp);
-      
-      double px, py, pz, pwt, qx, qy, qz, qwt, rx, ry, rz, rwt, sx, sy, sz, swt, tx, ty, tz, twt;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
-          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)       &&
-          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rwt) &&
-          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)       &&
-          fit_in_double(s.z(), sz) && fit_in_double(s.weight(), swt) && 
-          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
-          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);        
-
-        // We split the operator as we get an ICE with VC9 and VC10 
-        // when we compile 64 bit code 
-#if defined (BOOST_MSVC) && defined ( _WIN64)
-        double max1,max2,max3,max4,max5;
-        double RT_tmp_result;
-        msvc_workaround(max1,max2,max3,max4,max5, RT_tmp_result,
-                        px, py, pz, pwt, 
-                        qx, qy, qz, qwt, 
-                        rx, ry, rz, rwt, 
-                        sx, sy, sz, swt, 
-                        tx, ty, tz, twt);
-
-#else
-        double dpx = (px - tx);
-        double dpy = (py - ty);
-        double dpz = (pz - tz);
-        double twt_pwt = (twt - pwt);
-        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
-        double dqx = (qx - tx);
-        double dqy = (qy - ty);
-        double dqz = (qz - tz);
-        double twt_qwt = (twt - qwt);
-        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
-        double drx = (rx - tx);
-        double dry = (ry - ty);
-        double drz = (rz - tz);
-        double twt_rwt = (twt - rwt);
-        double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
-        double dsx = (sx - tx);
-        double dsy = (sy - ty);
-        double dsz = (sz - tz);
-        double twt_swt = (twt - swt);
-        double dst = (((square( dsx ) + square( dsy )) + square( dsz )) + twt_swt);
-
-        double RT_tmp_result = CGAL::determinant( dpx, dpy, dpz, dpt, dqx, dqy, dqz, dqt, drx, dry, drz, drt, dsx, dsy, dsz, dst );
-
-        
-        double max2 = CGAL::abs(dpx);
-        double adqx = CGAL::abs(dqx);
-        double adqy = CGAL::abs(dqy);
-        double adqz = CGAL::abs(dqz);
-
-        double adrx = CGAL::abs(drx);
-        double adry = CGAL::abs(dry);
-        double adrz = CGAL::abs(drz);
-
-        double adsx = CGAL::abs(dsx);
-        double adsy = CGAL::abs(dsy);
-        double adsz = CGAL::abs(dsz);
-
-        double atwt_qwt = CGAL::abs(twt_qwt);
-        double atwt_rwt = CGAL::abs(twt_rwt);
-        double atwt_swt = CGAL::abs(twt_swt);
-
-        if( (max2 < adqx) ) max2 = adqx;
-        if( (max2 < adrx) ) max2 = adrx;
-        if( (max2 < adsx) ) max2 = adsx;
-        double max1 = max2; 
-        double max3 = CGAL::abs(dpy);
-        if( (max3 < adqy) ) max3 = adqy;
-        if( (max3 < adry) ) max3 = adry;
-        if( (max3 < adsy) ) max3 = adsy;
-        if( (max1 < max3) )      max1 = max3;
-        double max4 = CGAL::abs(dpz);
-        if( (max4 < adqz) ) max4 = adqz;
-        if( (max4 < adrz) ) max4 = adrz;
-        if( (max4 < adsz) ) max4 = adsz;
-        if( (max1 < max4) )      max1 = max4;
-        double max5 = CGAL::abs(twt_pwt);
-        if( (max5 < atwt_qwt) ) max5 = atwt_qwt;
-        if( (max5 < atwt_rwt) ) max5 = atwt_rwt;
-        if( (max5 < atwt_swt) ) max5 = atwt_swt;
-#endif
-        double lower_bound_1 = max1;
-        double upper_bound_1 = max1;
-        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
-        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
-        if( (max4 < lower_bound_1) ) lower_bound_1 = max4;
-        //handwritten workaround to handle case where all weights are equal
-        //if( ((lower_bound_1 < 1.05893684636332247212e-59) || (max5 < 1.12134724458589890404e-118)) )
-        if( ((lower_bound_1 < 1.05893684636332247212e-59) || (max5 < 1.12134724458589890404e-118 && max5!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,s,t);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 3.21387608851797948065e+60) || (max5 > 1.03289995123476274781e+121)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,s,t);
-            } 
-
-            result_type int_tmp_result;
-
-            double eps = (1.67106803095990471147e-13 * (((max2 * max3) * max4) * (CGAL::max) ( max5, (max1 * max1) )));
-
-
-            if( (RT_tmp_result > eps) )
-            {
-                int_tmp_result = NEGATIVE;
-            } 
-            else 
-            {
-                if( (RT_tmp_result < -eps) )
-                {
-                    int_tmp_result = POSITIVE;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,s,t);
-                } 
-            } 
-            return int_tmp_result;
-        } 
-      }
-      else
-        return Base::operator()(p,q,r,s,t);
-    }
-
-    result_type operator() ( const Weighted_point_3 & p,
-                             const Weighted_point_3 & q,
-                             const Weighted_point_3 & r,
-                             const Weighted_point_3 & t) const
-    {
-
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 3+1 wpoints", tmp);
-
-      double px, py, pz, pwt, qx, qy, qz, qwt, rx, ry, rz, rwt, tx, ty, tz, twt;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
-          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)       &&
-          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rwt) &&
-          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
-          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-        
-        double dpx = (px - tx);
-        double dpy = (py - ty);
-        double dpz = (pz - tz);
-        double twt_pwt = (twt - pwt);
-        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
-        double dqx = (qx - tx);
-        double dqy = (qy - ty);
-        double dqz = (qz - tz);
-        double twt_qwt = (twt - qwt);
-        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
-        double drx = (rx - tx);
-        double dry = (ry - ty);
-        double drz = (rz - tz);
-        double twt_rwt = (twt - rwt);
-        double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
-        int cmp;
-        int int_tmp_result;
-        double eps;
-        double RT_tmp_result = CGAL::determinant( dpx, dpy, dpt, dqx, dqy, dqt, drx, dry, drt );
-
-        double max7 = CGAL::abs(dpz);
-        double adqx = CGAL::abs(dqx);
-        double adqy = CGAL::abs(dqy);
-        double adqz = CGAL::abs(dqz);
-
-        double adrx = CGAL::abs(drx);
-        double adry = CGAL::abs(dry);
-        double adrz = CGAL::abs(drz);
-
-        double atwt_qwt = CGAL::abs(twt_qwt);
-        double atwt_rwt = CGAL::abs(twt_rwt);
-
-        if( (max7 < adqz) ) max7 = adqz;
-        if( (max7 < adrz) ) max7 = adrz;
-        double max1 = max7;
-        double max2 = CGAL::abs(dpx);
-        if( (max2 < adqx) ) max2 = adqx;
-        if( (max2 < adrx) ) max2 = adrx;
-        if( (max1 < max2) )      max1 = max2;
-        double max3 = CGAL::abs(dpy);
-        if( (max3 < adqy) ) max3 = adqy;
-        if( (max3 < adry) ) max3 = adry;
-        if( (max1 < max3) )      max1 = max3;
-        double max4 = CGAL::abs(twt_pwt);
-        if( (max4 < atwt_qwt) ) max4 = atwt_qwt;
-        if( (max4 < atwt_rwt) ) max4 = atwt_rwt;
-        double lower_bound_1;
-        double upper_bound_1;
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
-        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
-        //handwritten workaround to handle case where all weights are equal        
-        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
-        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,t);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            double eps = (3.04426660386257731823e-14 * ((max2 * max3) * (CGAL::max)( max4, (max1 * max1) )));
-            if( (RT_tmp_result > eps) )
-            {
-                int_tmp_result = 1;
-            } 
-            else 
-            {
-                if( (RT_tmp_result < -eps) )
-                {
-                    int_tmp_result = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-            } 
-        } 
-        cmp = int_tmp_result;
-        double px_rx = (px - rx);
-        double qy_ry = (qy - ry);
-        double qx_rx = (qx - rx);
-        double py_ry = (py - ry);
-        double max5 = CGAL::abs(px_rx);
-        double aqx_rx =CGAL::abs(qx_rx);
-        double apy_ry =CGAL::abs(py_ry);
-        if( max5 < aqx_rx ) max5 = aqx_rx;
-        double max6 = CGAL::abs(qy_ry);
-        if( max6 < apy_ry ) max6 = apy_ry;
-        if( (cmp != 0) )
-        {
-            int int_tmp_result_FFWKCAA;
-            double double_tmp_result;
-            double_tmp_result = ((px_rx * qy_ry) - (qx_rx * py_ry));
-            lower_bound_1 = max5;
-            upper_bound_1 = max5;
-            if( (max6 < lower_bound_1) ) lower_bound_1 = max6;
-            else 
-            {
-                if( (max6 > upper_bound_1) ) upper_bound_1 = max6;
-            } 
-            if( (lower_bound_1 < 5.00368081960964690982e-147) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            else 
-            {
-                if( (upper_bound_1 > 7.23700557733225980357e+75) )
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-                double eps = (8.88720573725927976811e-16 * (max5 * max6));
-                if( (double_tmp_result > eps) ) int_tmp_result_FFWKCAA = 1;
-                else 
-                {
-                    if( (double_tmp_result < -eps) )
-                    {
-                        int_tmp_result_FFWKCAA = -1;
-                    } 
-                    else 
-                    {
-                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                      return Base::operator()(p,q,r,t);
-                    } 
-                } 
-            } 
-            return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA);
-        } 
-        int int_tmp_result_k60Ocge;
-        double RT_tmp_result_3SPBwDj = CGAL::determinant( dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt );
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max7 < lower_bound_1) ) lower_bound_1 = max7;
-        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
-        //handwritten workaround to handle case where all weights are equal
-        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
-        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,t);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            eps = (3.04426660386257731823e-14 * ((max2 * max7) * (CGAL::max)( max4, (max1 * max1) )));
-            if( (RT_tmp_result_3SPBwDj > eps) )
-            {
-                int_tmp_result_k60Ocge = 1;
-            } 
-            else 
-            {
-                if( (RT_tmp_result_3SPBwDj < -eps) )
-                {
-                    int_tmp_result_k60Ocge = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-            } 
-        } 
-        cmp = int_tmp_result_k60Ocge;
-        double qz_rz = (qz - rz);
-        double pz_rz = (pz - rz);
-        double max8 = CGAL::abs(qz_rz);
-        double apz_rz =  CGAL::abs(pz_rz);
-        if( max8 < apz_rz ) max8 = apz_rz;
-        if( (cmp != 0) )
-        {
-            int int_tmp_result_k3Lzf6g;
-            double double_tmp_result_Gx4H;
-            double_tmp_result_Gx4H = ((px_rx * qz_rz) - (qx_rx * pz_rz));
-            lower_bound_1 = max5;
-            upper_bound_1 = max5;
-            if( (max8 < lower_bound_1) ) lower_bound_1 = max8;
-            else 
-            {
-                if( (max8 > upper_bound_1) ) upper_bound_1 = max8;
-            } 
-            if( (lower_bound_1 < 5.00368081960964690982e-147) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            else 
-            {
-                if( (upper_bound_1 > 7.23700557733225980357e+75) )
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-                eps = (8.88720573725927976811e-16 * (max5 * max8));
-                if( (double_tmp_result_Gx4H > eps) )
-                {
-                    int_tmp_result_k3Lzf6g = 1;
-                } 
-                else 
-                {
-                    if( (double_tmp_result_Gx4H < -eps) )
-                    {
-                        int_tmp_result_k3Lzf6g = -1;
-                    } 
-                    else 
-                    {
-                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                      return Base::operator()(p,q,r,t);
-                    } 
-                } 
-            } 
-            return static_cast<result_type>(cmp * int_tmp_result_k3Lzf6g);
-        } 
-        int int_tmp_result_AvrrXBP;
-        double RT_tmp_result_feLwnHn = CGAL::determinant( dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt );
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max7 < lower_bound_1) ) lower_bound_1 = max7;
-        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
-        //handwritten workaround to handle case where all weights are equal
-        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
-        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,t);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            eps = (3.04426660386257731823e-14 * ((max3 * max7) * (CGAL::max)( max4, (max1 * max1) )));
-            if( (RT_tmp_result_feLwnHn > eps) )
-            {
-                int_tmp_result_AvrrXBP = 1;
-            } 
-            else 
-            {
-                if( (RT_tmp_result_feLwnHn < -eps) )
-                {
-                    int_tmp_result_AvrrXBP = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-            } 
-        } 
-        cmp = int_tmp_result_AvrrXBP;
-        int int_tmp_result_agX3WsT;
-        double double_tmp_result_Dw20Kqh = ((py_ry * qz_rz) - (qy_ry * pz_rz));
-        lower_bound_1 = max8;
-        upper_bound_1 = max8;
-        if( (max6 < lower_bound_1) )
-        {
-            lower_bound_1 = max6;
-        } 
-        else 
-        {
-            if( (max6 > upper_bound_1) ) upper_bound_1 = max6;
-        } 
-        if( (lower_bound_1 < 5.00368081960964690982e-147) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,r,t);
-        } 
-        else 
-        {
-            if( (upper_bound_1 > 7.23700557733225980357e+75) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,r,t);
-            } 
-            eps = (8.88720573725927976811e-16 * (max6 * max8));
-            if( (double_tmp_result_Dw20Kqh > eps) )
-            {
-                int_tmp_result_agX3WsT = 1;
-            } 
-            else 
-            {
-                if( (double_tmp_result_Dw20Kqh < -eps) )
-                {
-                    int_tmp_result_agX3WsT = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,r,t);
-                } 
-            } 
-        } 
-        return static_cast<result_type>(cmp * int_tmp_result_agX3WsT);        
-      }
-      else
-        return Base::operator()(p,q,r,t);
-    }
-
-    result_type operator() ( const Weighted_point_3 & p,
-                             const Weighted_point_3 & q,
-                             const Weighted_point_3 & t) const
-    {
-
-      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 2+1 wpoints", tmp);
-      
-      double px, py, pz, pwt, qx, qy, qz, qwt, tx, ty, tz, twt;
-      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
-          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
-          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
-          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
-          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
-          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
-        )
-      {
-        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
-          
-        double dpx = (px - tx);
-        double dpy = (py - ty);
-        double dpz = (pz - tz);
-        double twt_pwt = (twt - pwt);
-        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
-        double dqx = (qx - tx);
-        double dqy = (qy - ty);
-        double dqz = (qz - tz);
-        double twt_qwt = (twt - qwt);
-        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
-        int cmp = ((px > qx) ? 1 : ((px < qx) ? -1 : 0));
-        double eps;
-        double max1;
-        double max4 = CGAL::abs(dpy);
-
-        double adqx = CGAL::abs(dqx);
-        double adqy = CGAL::abs(dqy);
-        double adqz = CGAL::abs(dqz);
-
-        double atwt_qwt = CGAL::abs(twt_qwt);
-
-        if( max4 < adqy ) max4 = adqy;
-        max1 = max4;
-        double max5 = CGAL::abs(dpz); 
-        if( max5 < adqz ) max5 = adqz;
-        if( max1 < max5 ) max1 = max5;
-        double max2 = CGAL::abs(dpx);
-        if( max2 < adqx ) max2 = adqx;
-        if( max1 < max2 ) max1 = max2;
-        double max3 = CGAL::abs(twt_pwt);
-        if( max3 < atwt_qwt ) max3 = atwt_qwt;
-        double lower_bound_1;
-        double upper_bound_1;
-        if( (cmp != 0) )
-        {
-            int int_tmp_result;
-            double double_tmp_result;
-            double_tmp_result = ((dpx * dqt) - (dqx * dpt));
-            lower_bound_1 = max1;
-            upper_bound_1 = max1;
-            if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
-            //handwritten workaround to handle case where all weights are equal
-            //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
-            if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,t);
-            } 
-            else 
-            {
-                if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,t);
-                } 
-                eps = (6.88858782307641768480e-15 * (max2 * (CGAL::max)( max3, (max1 * max1) )));
-                if( (double_tmp_result > eps) )
-                {
-                    int_tmp_result = 1;
-                } 
-                else 
-                {
-                    if( (double_tmp_result < -eps) )
-                    {
-                        int_tmp_result = -1;
-                    } 
-                    else 
-                    {
-                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                      return Base::operator()(p,q,t);
-                    } 
-                } 
-            } 
-            return static_cast<result_type>(cmp * int_tmp_result);
-        } 
-        cmp = ((py > qy) ? 1 : ((py < qy) ? -1 : 0));
-        if( (cmp != 0) )
-        {
-          int int_tmp_result_FFWKCAA;
-          double double_tmp_result_k60Ocge;
-          double_tmp_result_k60Ocge = ((dpy * dqt) - (dqy * dpt));
-          lower_bound_1 = max1;
-          upper_bound_1 = max1;
-          if( (max4 < lower_bound_1) ) lower_bound_1 = max4;
-          //handwritten workaround to handle case where all weights are equal
-          //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
-          if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
-          {
-            CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-            return Base::operator()(p,q,t);
-          } 
-          else 
-          {
-              if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
-              {
-                CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                return Base::operator()(p,q,t);
-              } 
-              eps = (6.88858782307641768480e-15 * (max4 * (CGAL::max)( max3, (max1 * max1) )));
-              if( (double_tmp_result_k60Ocge > eps) )
-              {
-                  int_tmp_result_FFWKCAA = 1;
-              } 
-              else 
-              {
-                  if( (double_tmp_result_k60Ocge < -eps) )
-                  {
-                      int_tmp_result_FFWKCAA = -1;
-                  } 
-                  else 
-                  {
-                    CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                    return Base::operator()(p,q,t);
-                  } 
-              } 
-          } 
-          return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA);
-        } 
-        cmp = ((pz > qz) ? 1 : ((pz < qz) ? -1 : 0));
-        int int_tmp_result_3SPBwDj;
-        double double_tmp_result_k3Lzf6g = ((dpz * dqt) - (dqz * dpt));
-        lower_bound_1 = max1;
-        upper_bound_1 = max1;
-        if( (max5 < lower_bound_1) )
-        {
-            lower_bound_1 = max5;
-        } 
-        //handwritten workaround to handle case where all weights are equal
-        //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
-        if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
-        {
-          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-          return Base::operator()(p,q,t);
-        } 
-        else 
-        {
-            if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
-            {
-              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-              return Base::operator()(p,q,t);
-            } 
-            eps = (6.88858782307641768480e-15 * (max5 * (CGAL::max)( max3, (max1 * max1) )));
-            if( (double_tmp_result_k3Lzf6g > eps) )
-            {
-                int_tmp_result_3SPBwDj = 1;
-            } 
-            else 
-            {
-                if( (double_tmp_result_k3Lzf6g < -eps) )
-                {
-                    int_tmp_result_3SPBwDj = -1;
-                } 
-                else 
-                {
-                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
-                  return Base::operator()(p,q,t);
-                } 
-            } 
-        } 
-        return static_cast<result_type>(cmp * int_tmp_result_3SPBwDj);           
-      }
-      else
-        return Base::operator()(p,q,t);
-    }
-  
-      };
-  
-} } }//namespace CGAL::internal::Static_filters_predicates
-
-#endif //CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filter_error.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filter_error.h
deleted file mode 100644
index 7adb0c2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filter_error.h
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright (c) 1999,2000  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
-
-#ifndef CGAL_INTERNAL_STATIC_FILTER_ERROR_H
-#define CGAL_INTERNAL_STATIC_FILTER_ERROR_H
-
-// This file contains the description of the class Static_filter_error.
-// The goal of this class is to be run by some overloaded predicates,
-// to compute error bound done in these functions.
-// 
-// The original idea is from Olivier Devillers.
-
-// It is still EXPERIMENTAL.
-
-// TODO:
-// - I need to add some missing operators and functions, min/max...
-// - Remove the degree stuff, it's only meant for debug (?).
-// - Add __attribute__((const)) for optimizing ?
-
-#include <CGAL/basic.h>
-#include <CGAL/FPU.h>
-
-namespace CGAL { namespace internal {
-
-struct Static_filter_error
-{
-  typedef Static_filter_error Sfe;
-
-  Static_filter_error () {}
-
-  Static_filter_error (const int &i, const double &e = 0, const int &d = 1)
-      : _b(i), _e(e), _d(d) {}
-
-  Static_filter_error (const double &b, const double &e = 0, const int &d = 1)
-      : _b(b), _e(e), _d(d) {}
-
-  static double ulp ()
-  {
-      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
-      double e = ulp(1);
-      FPU_set_cw(backup);
-      return e;
-  }
-
-  static double ulp (double d)
-  {
-      // You are supposed to call this function with rounding towards
-      // +infinity, and on a positive number.
-      d = CGAL_IA_FORCE_TO_DOUBLE(d); // stop constant propagation.
-      CGAL_assertion(d>=0);
-      double u;
-      if (d == 1) // I need to special case to prevent infinite recursion.
-          u = (d + CGAL_IA_MIN_DOUBLE) - d;
-      else {
-          // We need to use the d*ulp formula, in order for the formal proof
-          // of homogeneisation to work.
-          // u = (d + CGAL_IA_MIN_DOUBLE) - d;
-          u = d * ulp();
-      }
-
-      // Then add extra bonus, because of Intel's extended precision feature.
-      // (ulp can be 2^-53 + 2^-64)
-      u += u / (1<<11);
-      CGAL_assertion(u!=0);
-      return u;
-  }
-
-  Sfe operator+ (const Sfe &f) const
-  {
-      CGAL_warning_msg( _d == f._d ,
-	      "you are adding variables of different homogeneous degree");
-      // We have to add an ulp, since the homogeneization could induce such
-      // an error.
-      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
-      double b = _b + f._b;
-      double u = ulp(b) / 2;
-      b += u;
-      double e = u + _e + f._e;
-      FPU_set_cw(backup);
-      return Sfe(b, e, _d);
-  }
-
-  Sfe operator* (const Sfe &f) const
-  {
-      // We have to add an ulp, since the homogeneization could induce such
-      // an error.
-      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
-      double b = _b * f._b;
-      double u = ulp(b) / 2;
-      b += u;
-      double e = u + _e * f._e + _e * f._b + _b * f._e;
-      FPU_set_cw(backup);
-      return Sfe(b, e, _d+f._d);
-  }
-
-  Sfe operator- (const Sfe &f) const { return *this + f; }
-  Sfe operator- ()             const { return *this; }
-  // Sfe operator/ (const Sfe &) const { CGAL_error(); }
-  // Division not supported.
-
-  Sfe& operator+=(const Sfe &f) { return *this = *this + f; }
-  Sfe& operator-=(const Sfe &f) { return *this = *this - f; }
-  Sfe& operator*=(const Sfe &f) { return *this = *this * f; }
-  // Sfe& operator/=(const Sfe &f) { return *this = *this / f; }
-
-  double error()  const { return _e; }
-  double bound()  const { return _b; }
-  int    degree() const { return _d; }
-
-  bool operator< (const Sfe &f) const
-  {
-      Sfe e = *this + f;
-      std::cerr << "Static error is : " << e.error() << std::endl;
-      CGAL_error();
-      return false;
-  }
-  bool operator> (const Sfe &f) const { return *this < f; }
-  bool operator<=(const Sfe &f) const { return *this < f; }
-  bool operator>=(const Sfe &f) const { return *this < f; }
-  bool operator==(const Sfe &f) const { return *this < f; }
-  bool operator!=(const Sfe &f) const { return *this < f; }
-
-private:
-  // _b is a bound on the absolute value of the _double_ value of the
-  //    variable.
-  // _e is a bound on the absolute error (difference between _b and the
-  //    _real_ value of the variable.
-  // _d is the degree of the variable, it allows some additionnal checks.
-  double _b, _e;
-  int _d;
-};
-
-inline
-Static_filter_error
-sqrt(const Static_filter_error &f)
-{
-  CGAL_warning_msg( (f.degree() & 1) == 0,
-	            "Do you really want a non integral degree ???");
-  // We have to add an ulp, since the homogeneization could induce such
-  // an error.
-  FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
-  double b = std::sqrt(f.bound());
-  double u = Static_filter_error::ulp(b) / 2;
-  b += u;
-  double e = std::sqrt(f.error()) + u;
-  FPU_set_cw(backup);
-  return Static_filter_error(b, e, f.degree()/2);
-}
-
-} } // namespace CGAL::internal
-
-#endif // CGAL_INTERNAL_STATIC_FILTER_ERROR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filters.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filters.h
deleted file mode 100644
index 5fee6d0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Static_filters.h
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright (c) 2001,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
- 
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_H
-#define CGAL_INTERNAL_STATIC_FILTERS_H
-
-// This kernel wrapper gathers optimized predicates written by hand, using
-// a few steps of filtering.  It should work if the initial traits has
-// cartesian coordinates which fit exactly in doubles.
-//
-// Purely static filters code has been removed, since it requires additional
-// logic and is not plug'n play (requires users providing bounds).
-// If it should be provided again, it should probably be separate.
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kernel/function_objects.h>
-#include <CGAL/Cartesian/function_objects.h>
-
-#include <CGAL/internal/Static_filters/tools.h>
-#include <CGAL/internal/Static_filters/Orientation_2.h>
-#include <CGAL/internal/Static_filters/Orientation_3.h>
-
-// for static filters added nov./dec. 2011
-#ifdef CGAL_DISABLE_STATIC_FILTERS_ADDED_2011
-#  define CGAL_NO_EQUAL_3_STATIC_FILTERS 1
-#  define CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS 1
-#  define CGAL_NO_ANGLE_3_STATIC_FILTERS 1
-#  define CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS 1
-#endif // CGAL_DISABLE_STATIC_FILTERS_ADDED_2011
-
-
-#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
-#  include <CGAL/internal/Static_filters/Equal_3.h>
-#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
-#  include <CGAL/internal/Static_filters/Is_degenerate_3.h>
-#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
-#  include <CGAL/internal/Static_filters/Angle_3.h>
-#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-#  include <CGAL/internal/Static_filters/Do_intersect_3.h>
-#endif // NOT NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-
-#include <CGAL/internal/Static_filters/Compare_y_at_x_2.h>
-#include <CGAL/internal/Static_filters/Side_of_oriented_circle_2.h>
-#include <CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h>
-#include <CGAL/internal/Static_filters/Compare_squared_radius_3.h>
-
-// #include <CGAL/internal/Static_filters/Coplanar_orientation_3.h>
-// #include <CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h>
-
-// TODO :
-// - add more predicates :
-//   - all lexicographical comparisons
-//   - left_turn (via generic adapter to orientation)
-//   - power_tests
-//   - others ?
-// - benchmark on more algorithms.
-// - improve fit_in_double() for other NTs (MP_Float, Lazy). cf tools.h.
-// - try to automatize : have a struct a la Static_filter_error, with one part
-//   which is runtime, and the other which can be constant-propagated by the
-//   compiler.  g++ 4.0 should be able to cprop the second part...
-
-
-// Note about the second parameter of Static_filters<K,bool>:
-// - if the access to Cartesian exact coordinates is cheap
-//   (Simple_cartesian, Cartesian), then one can implement predicates that
-//   just compare coordinates without filtering, using unfiltered
-//   predicates defined in the namespace CartesianKernelFunctors.
-// 
-// - in the case of Lazy_kernel, where the access to p.x(), for a point p,
-//   triggers the construction of a Lazy_exact_nt object, one does not want
-//   to use the functors from the namespace CartesianKernelFunctors.
-
-namespace CGAL { namespace internal {
-
-// Here is the case when has_cheap_access_to_cartesian_coordinates is
-// false, used by Lazy_kernel
-// The K_base argument is supposed to provide exact primitives.
-template < typename K_base, 
-           bool has_cheap_access_to_cartesian_coordinates = true>
-class Static_filters : public K_base {
-
-
-  typedef Static_filters<K_base, 
-                         has_cheap_access_to_cartesian_coordinates>         Self;
-
-public:
-#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Equal_3<K_base>                        Equal_3;
-#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Is_degenerate_3<K_base, Self>          Is_degenerate_3;
-#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Orientation_2<K_base>                  Orientation_2;
-  typedef Static_filters_predicates::Orientation_3<K_base>                  Orientation_3;
-#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Angle_3<K_base>                        Angle_3;
-#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
-#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Do_intersect_3<K_base,Self>            Do_intersect_3;
-#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-  typedef Static_filters_predicates::Side_of_oriented_circle_2<K_base>      Side_of_oriented_circle_2;
-  typedef Static_filters_predicates::Side_of_oriented_sphere_3<K_base>      Side_of_oriented_sphere_3;
-  typedef Static_filters_predicates::Compare_squared_radius_3<K_base>       Compare_squared_radius_3;
-
-  Orientation_2
-  orientation_2_object() const
-  { return Orientation_2(); }
-
-  Orientation_3
-  orientation_3_object() const
-  { return Orientation_3(); }
-
-#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
- Equal_3
-  equal_3_object() const
-  { return Equal_3(); }
-#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
- Is_degenerate_3
-  is_degenerate_3_object() const
-  { return Is_degenerate_3(); }
-#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
-  Angle_3
-  angle_3_object() const
-  { return Angle_3(); }
-#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
-
-#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-  Do_intersect_3
-  do_intersect_3_object() const
-  { return Do_intersect_3(); }
-#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
-
-  Side_of_oriented_circle_2
-  side_of_oriented_circle_2_object() const
-  { return Side_of_oriented_circle_2(); }
-
-  Side_of_oriented_sphere_3
-  side_of_oriented_sphere_3_object() const
-  { return Side_of_oriented_sphere_3(); }
-
-  Compare_squared_radius_3
-  compare_squared_radius_3_object() const
-  { return Compare_squared_radius_3(); }
-}; // end of class template Static_filters<K_base, false>
-
-
-// Here is the case when has_cheap_access_to_cartesian_coordinates is true,
-// the default, used by Filtered_kernel<CK>.
-// The K_base argument is supposed to provide exact primitives.
-template < typename K_base>
-class Static_filters<K_base, true> // has_cheap_access_to_cartesian_coordinates==true
-  : public Static_filters<K_base, false>
-{
-  typedef Static_filters<K_base, true>              Self;
-
-public:
-
-  typedef Static_filters_predicates::Compare_y_at_x_2<K_base,Self>          Compare_y_at_x_2;
-
-  // The following do not require filtering as they only do
-  // comparisons.  We must be careful that *all* their function
-  // operators must not do any comparisons.
-  // In case we would like to avoid filtering only some of
-  // the function operators, we need to make a new functors.
-  typedef CommonKernelFunctors::Left_turn_2<Self>   Left_turn_2;
-
-  typedef CartesianKernelFunctors::Less_x_2<Self>   Less_x_2;
-  typedef CartesianKernelFunctors::Less_y_2<Self>   Less_y_2;
-  typedef CartesianKernelFunctors::Less_xy_2<Self>  Less_xy_2;
-  typedef CartesianKernelFunctors::Less_yx_2<Self>  Less_yx_2;
-
-  typedef CartesianKernelFunctors::Less_x_3<Self>   Less_x_3;
-  typedef CartesianKernelFunctors::Less_y_3<Self>   Less_y_3;
-  typedef CartesianKernelFunctors::Less_z_3<Self>   Less_z_3;
-  typedef CartesianKernelFunctors::Less_xy_3<Self>  Less_xy_3;
-  typedef CartesianKernelFunctors::Less_xyz_3<Self> Less_xyz_3;
-
-  typedef CartesianKernelFunctors::Compare_xy_2<Self>  Compare_xy_2;
-  typedef CartesianKernelFunctors::Compare_x_3<Self>   Compare_x_3;
-  typedef CartesianKernelFunctors::Compare_y_3<Self>   Compare_y_3;
-  typedef CartesianKernelFunctors::Compare_z_3<Self>   Compare_z_3;
-  typedef CartesianKernelFunctors::Compare_xy_3<Self>  Compare_xy_3;
-  typedef CartesianKernelFunctors::Compare_xyz_3<Self> Compare_xyz_3;
-
-  Compare_xy_2
-  compare_xy_2_object() const
-  { return Compare_xy_2(); }
-
-  Compare_x_3
-  compare_x_3_object() const
-  { return Compare_x_3(); }
-
-  Compare_y_3
-  compare_y_3_object() const
-  { return Compare_y_3(); }
-
-  Compare_z_3
-  compare_z_3_object() const
-  { return Compare_z_3(); }
-
-  Compare_xy_3
-  compare_xy_3_object() const
-  { return Compare_xy_3(); }
-
-  Compare_xyz_3
-  compare_xyz_3_object() const
-  { return Compare_xyz_3(); }
-
-  Left_turn_2
-  left_turn_2_object() const
-  { return Left_turn_2(); }
-
-  Less_x_2
-  less_x_2_object() const
-  { return Less_x_2(); }
-
-  Less_y_2
-  less_y_2_object() const
-  { return Less_y_2(); }
-
-  Less_xy_2
-  less_xy_2_object() const
-  { return Less_xy_2(); }
-
-  Less_yx_2
-  less_yx_2_object() const
-  { return Less_yx_2(); }
-
-  Less_x_3
-  less_x_3_object() const
-  { return Less_x_3(); }
-
-  Less_y_3
-  less_y_3_object() const
-  { return Less_y_3(); }
-
-  Less_z_3
-  less_z_3_object() const
-  { return Less_z_3(); }
-
-  Less_xy_3
-  less_xy_3_object() const
-  { return Less_xy_3(); }
-
-  Less_xyz_3
-  less_xyz_3_object() const
-  { return Less_xyz_3(); }
-
-  Compare_y_at_x_2
-  compare_y_at_x_2_object() const
-  { return Compare_y_at_x_2(); }
-
-  // The two following are for degenerate cases, so I'll update them later.
-  //
-  // typedef Static_filters_predicates::Coplanar_orientation_3<Point_3, Orientation_2>
-  //                                                   Coplanar_orientation_3;
-  // typedef Static_filters_predicates::Side_of_bounded_circle_3<Point_3>
-  //                                         Coplanar_side_of_bounded_circle_3;
-
-  // Coplanar_orientation_3
-  // coplanar_orientation_3_object() const
-  // { return Coplanar_orientation_3(); }
-
-  // Coplanar_side_of_bounded_circle_3
-  // coplanar_side_of_bounded_circle_3_object() const
-  // { return Coplanar_side_of_bounded_circle_3(); }
-};
-
-} } // namespace CGAL::internal
-
-#endif // CGAL_INTERNAL_STATIC_FILTERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/tools.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/tools.h
deleted file mode 100644
index 5b249be..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/tools.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2001,2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
- 
-#ifndef CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
-#define CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
-
-#include <CGAL/basic.h>
-#include <CGAL/function_objects.h>
-#include <boost/mpl/has_xxx.hpp>
-
-namespace CGAL {
-
-template < typename ET >
-class Lazy_exact_nt;
-
-namespace internal {
-
-// Utility function to check a posteriori that a subtraction was performed
-// without rounding error.
-inline bool diff_was_exact(double a, double b, double ab)
-{
-    return ab+b == a && a-ab == b;
-}
-
-// Auxiliary function to check if static filters can be applied, that is,
-// if to_double() does not add roundoff errors.
-// TODO :
-// - generalize it to other number types.
-// - promote it as a number type requirement ?
-// - naming : is_representable_in_double() ?
-//            is_representable<T>() for representable in T ?
-
-// Current semantics :  bool fit_in_double(const NT& n, double &)
-//
-// - returns true means that "n" is exactly representable by a double,
-//   _and_ then "returns" it in the reference.
-// - it is fine to return false conservatively.
-
-template < typename T >
-inline bool fit_in_double(const T&, double&) { return false; }
-
-inline bool fit_in_double(const double& d, double& r) { r = d; return true; }
-
-inline bool fit_in_double(const float& f, double& r) { r = f; return true; }
-
-inline bool fit_in_double(const int& i, double& r) { r = i; return true; }
-
-template < typename ET >
-inline bool fit_in_double(const Lazy_exact_nt<ET>&, double&);
-
-
-// Auxiliary functor, to get the approximation of a kernel object:
-//   - for a Point_3 of the Lazy_kernel<...>, one needs to call approx(),
-//   - for a Point_3 of Simple_cartesian<double>, for example, the
-//     approximation is the object itself.
-
-namespace Static_filters_predicates {
-
-BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Kernel_object_has_approx, \
-                                  Approximate_type, \
-                                  false)
-
-template <typename T, bool has_approx = Kernel_object_has_approx<T>::value>
-struct Get_approx : public CGAL::Identity<T> {
-  // If has_approx==false, this functor is the identity.
-};
-
-template <typename T>
-struct Get_approx<T, true> {
-  // If has_approx==false, this functor get .approx() on its argument.
-  const typename T::Approximate_type& operator()(const T& x) const { return x.approx(); }
-  typename T::Approximate_type& operator()(T& x) const { return x.approx(); }
-};
-
-} // end namespace Static_filters_predicates
-
-} } // namespace CGAL::internal
-
-#endif // CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h
deleted file mode 100644
index 5539139..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#ifndef CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
-// Copyright (c) 2014  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-
-#define CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
-
-#include <CGAL/AABB_traits.h>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits.hpp>
-
-namespace CGAL
-{
-
-/// @cond CGAL_DOCUMENT_INTERNAL
-template<typename GeomTraits, typename AABB_primitive, bool fast_bbox_intersection>
-class AABB_traits_SDF :
-  public AABB_traits<GeomTraits, AABB_primitive>
-{
-public:
-  typedef AABB_traits<GeomTraits, AABB_primitive> Base_traits;
-  typedef typename Base_traits::Bounding_box Bounding_box;
-  typedef typename Base_traits::Point_3 Point_3;
-
-  class Do_intersect
-    : public Base_traits::Do_intersect
-  {
-  public:
-    Do_intersect(const AABB_traits<GeomTraits,AABB_primitive>& traits)
-      :Base_traits::Do_intersect(traits) {}
-
-    // not sure is it safe on templated funcs ? may be do not inherit and repeat functions...
-    using Base_traits::Do_intersect::operator ();
-
-    // activate functions below if K::FT is floating point and fast_bbox_intersection = true
-    template <class K>
-    typename boost::enable_if<
-    boost::type_traits::ice_and<
-    boost::is_floating_point<typename K::FT>::value,
-          fast_bbox_intersection>,
-          bool >::type
-    operator()(const CGAL::Segment_3<K>& segment, const Bounding_box& bbox) const {
-      const Point_3& p = segment.source();
-      const Point_3& q = segment.target();
-
-      return internal::do_intersect_bbox_segment_aux
-             <double,
-             true, // bounded at t=0
-             true, // bounded at t=1
-             false> // do not use static filters
-             (p.x(), p.y(), p.z(),
-              q.x(), q.y(), q.z(),
-              bbox);
-    }
-
-    template <class K>
-    typename boost::enable_if<
-    boost::type_traits::ice_and<
-    boost::is_floating_point<typename K::FT>::value,
-          fast_bbox_intersection>,
-          bool >::type
-    operator()(const CGAL::Ray_3<K>& ray, const Bounding_box& bbox) const {
-      const Point_3& p = ray.source();
-      const Point_3& q = ray.second_point();
-
-      return internal::do_intersect_bbox_segment_aux
-             <double,
-             true, // bounded at t=0
-             false,// not bounded at t=1
-             false> // do not use static filters
-             (p.x(), p.y(), p.z(),
-              q.x(), q.y(), q.z(),
-              bbox);
-    }
-
-  };
-
-  Do_intersect do_intersect_object() const {
-    return Do_intersect(*this);
-  }
-};
-/// @endcond
-
-} //namespace CGAL
-#endif //CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h
deleted file mode 100644
index 4ec78c7..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h
+++ /dev/null
@@ -1,686 +0,0 @@
-#ifndef CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
-// Copyright (c) 2014  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-
-#define CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
-
-/// @cond CGAL_DOCUMENT_INTERNAL
-
-/**
- * @file Alpha_expansion_graph_cut.h
- * @brief This file contains 3 graph-cut algorithms, which can be used as a template parameter for CGAL::internal::Surface_mesh_segmentation.
- *
- * Main differences between implementations are underlying max-flow algorithm and graph type (i.e. results are the same, performance differs).
- *
- * By default, we use MAXFLOW and the class Alpha_expansion_graph_cut_boykov_kolmogorov.
- * For deactivating MAXFLOW software and using boost implementation instead, define CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE.
- * It deactivates Alpha_expansion_graph_cut_boykov_kolmogorov, activate boost versions
- * and makes CGAL::internal::Surface_mesh_segmentation using Alpha_expansion_graph_cut_boost
- * as default implementation for the graph-cut.
- *
- * Also algorithms can be used by their-own for applying alpha-expansion graph-cut on any graph.
- *
- */
-#include <CGAL/assertions.h>
-#ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-#include <CGAL/Timer.h>
-#endif
-#include <CGAL/trace.h>
-
-#include <boost/version.hpp>
-#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
-#include <boost/graph/adjacency_list.hpp>
-#include <boost/graph/compressed_sparse_row_graph.hpp>
-#if BOOST_VERSION >= 104400 // at this version kolmogorov_max_flow become depricated.
-#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
-#else
-#include <boost/graph/kolmogorov_max_flow.hpp>
-#endif
-#else
-namespace MaxFlow
-{
-#include <CGAL/internal/auxiliary/graph.h>
-}
-#endif
-
-#include <vector>
-
-
-
-
-namespace CGAL
-{
-namespace internal
-{
-
-////////////////////////////////////////////////////////////////////////////////////////
-//   Comments about performance:
-//
-// 1) With BGL:
-//     * Using adjacency_list:
-//     ** Without pre-allocating vertex-list
-//       | OutEdgeList | VertexList | Performance |
-//       |    listS    |   listS    |     25.2    |
-//       |    vecS     |   listS    |     22.7    |
-//       |    listS    |   vecS     |     30.7    |
-//       |    vecS     |   vecS     |     26.1    |
-//
-//     ** With pre-allocating vertex-list with max-node size
-//        (Note: exact number of vertices are not certain at the beginning)
-//       | OutEdgeList | VertexList | Performance |
-//       |    listS    |   vecS     |     25.2    |
-//       |    vecS     |   vecS     |     23.4    |
-//
-//     * Didn't try adjacency_matrix since our graph is sparse
-//     ( Also one can check BGL book, performance section )
-//
-//    Decision:
-//     * Alpha_expansion_graph_cut_boost: use adjacency_list<vecS, listS> without
-//       pre-allocating vertex-list.
-//
-// 2) With Boykov-Kolmogorov MAXFLOW software:
-//   (http://pub.ist.ac.at/~vnk/software/maxflow-v2.21.src.tar.gz)
-//                                  | Performance |
-//                                  |     3.1     |
-//     * Alpha_expansion_graph_cut_boykov_kolmogorov provides an implementation.
-//       MAXFLOW does not provide any option for pre-allocation (It is possible with v_3.02 though).
-//
-// Typical Benchmark result provided by Ilker
-//                                 | construction of vertices  |  construction of edges    | graph cut  | Total
-//   -----------------------------------------------------------------------------------------------------------
-//   boost with an adjacency list  |         1.53              | 1.51                      |  3.00      | 6.04
-//   boost with CSR                | 0.11 (gather in a vector) | 0.15 (gather in a vector) |  2.67      | 2.93
-//   MaxFlow                       |       0.042               | 0.076                     |  1.043     | 1.161
-//
-// The main issue for now with CSR is the construction of the opposite edge map that is too costly,
-// since it is done by exploring all edges to find opposite
-////////////////////////////////////////////////////////////////////////////////////////
-
-#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
-/**
- * @brief Implements alpha-expansion graph cut algorithm.
- *
- * For representing graph, it uses adjacency_list with OutEdgeList = vecS, VertexList = listS.
- * Also no pre-allocation is made for vertex-list.
- */
-class Alpha_expansion_graph_cut_boost
-{
-private:
-  typedef boost::adjacency_list_traits<boost::vecS, boost::listS, boost::directedS>
-  Adjacency_list_traits;
-
-  typedef boost::adjacency_list<boost::vecS, boost::listS, boost::directedS,
-          // 4 vertex properties
-          boost::property<boost::vertex_index_t, std::size_t,
-          boost::property<boost::vertex_color_t, boost::default_color_type,
-          boost::property<boost::vertex_distance_t, double,
-          boost::property<boost::vertex_predecessor_t, Adjacency_list_traits::edge_descriptor >
-          > > >,
-          // 3 edge properties
-          boost::property<boost::edge_capacity_t, double,
-          boost::property<boost::edge_residual_capacity_t, double,
-          boost::property<boost::edge_reverse_t, Adjacency_list_traits::edge_descriptor> >
-          > > Graph;
-
-  typedef boost::graph_traits<Graph> Traits;
-  typedef boost::color_traits<boost::default_color_type> ColorTraits;
-
-  typedef Traits::vertex_descriptor Vertex_descriptor;
-  typedef Traits::vertex_iterator   Vertex_iterator;
-  typedef Traits::edge_descriptor   Edge_descriptor;
-  typedef Traits::edge_iterator     Edge_iterator;
-
-  /**
-   * Adds two directional edges between @a v1 and @a v2
-   * @param v1 first vertex
-   * @param v2 second vertex
-   * @param w1 weight for edge from v1 to v2 (v1->v2)
-   * @param w2 weight for edge from v2 to v1 (v2->v1)
-   * @param graph to be added
-   * @return pair of added edges, first: v1->v2 and second: v2->v1
-   */
-  boost::tuple<Edge_descriptor, Edge_descriptor>
-  add_edge_and_reverse(Vertex_descriptor& v1, Vertex_descriptor& v2, double w1,
-                       double w2, Graph& graph) const {
-    Edge_descriptor v1_v2, v2_v1;
-    bool v1_v2_added, v2_v1_added;
-
-    boost::tie(v1_v2, v1_v2_added) = boost::add_edge(v1, v2, graph);
-    boost::tie(v2_v1, v2_v1_added) = boost::add_edge(v2, v1, graph);
-
-    CGAL_assertion(v1_v2_added && v2_v1_added);
-    //put edge capacities
-    boost::put(boost::edge_reverse, graph, v1_v2, v2_v1);
-    boost::put(boost::edge_reverse, graph, v2_v1, v1_v2);
-
-    //map reverse edges
-    boost::put(boost::edge_capacity, graph, v1_v2, w1);
-    boost::put(boost::edge_capacity, graph, v2_v1, w2);
-
-    return boost::make_tuple(v1_v2, v2_v1);
-  }
-
-public:
-  /**
-   * Applies alpha-expansion graph-cut for energy minimization.
-   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
-   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
-   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
-   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
-   * and as output it returns final labeling of vertices (i.e. assigned cluster-id to each facet)
-   * @return result of energy function
-   */
-  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
-                    edges,
-                    const std::vector<double>& edge_weights,
-                    const std::vector<std::vector<double> >& probability_matrix,
-                    std::vector<std::size_t>& labels) const {
-    const double tolerance = 1e-10;
-
-    double min_cut = (std::numeric_limits<double>::max)();
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    double vertex_creation_time, edge_creation_time, cut_time;
-    vertex_creation_time = edge_creation_time = cut_time = 0.0;
-    #endif
-
-    std::vector<Vertex_descriptor> inserted_vertices;
-    inserted_vertices.resize(labels.size());
-
-    Graph graph;
-
-    bool success;
-    do {
-      success = false;
-      std::size_t alpha = 0;
-
-      for(std::vector<std::vector<double> >::const_iterator it =
-            probability_matrix.begin();
-          it != probability_matrix.end(); ++it, ++alpha) {
-        graph.clear();
-
-        Vertex_descriptor cluster_source = boost::add_vertex(graph);
-        Vertex_descriptor cluster_sink = boost::add_vertex(graph);
-
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        Timer timer;
-        timer.start();
-        #endif
-
-        // For E-Data
-        // add every facet as a vertex to the graph, put edges to source & sink vertices
-        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
-          Vertex_descriptor new_vertex = boost::add_vertex(graph);
-          inserted_vertices[vertex_i] = new_vertex;
-          double source_weight = probability_matrix[alpha][vertex_i];
-          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
-          // making sink_weight 'infinity' guarantee this.
-          double sink_weight = (labels[vertex_i] == alpha) ?
-                               (std::numeric_limits<double>::max)()
-                               : probability_matrix[labels[vertex_i]][vertex_i];
-
-          add_edge_and_reverse(cluster_source, new_vertex, source_weight, 0.0, graph);
-          add_edge_and_reverse(new_vertex, cluster_sink, sink_weight, 0.0, graph);
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        vertex_creation_time += timer.time();
-        timer.reset();
-        #endif
-
-        // For E-Smooth
-        // add edge between every vertex,
-        std::vector<double>::const_iterator weight_it = edge_weights.begin();
-        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
-              edges.begin(); edge_it != edges.end();
-            ++edge_it, ++weight_it) {
-          Vertex_descriptor v1 = inserted_vertices[edge_it->first],
-                            v2 = inserted_vertices[edge_it->second];
-          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
-          if(label_1 == label_2) {
-            if(label_1 != alpha) {
-              add_edge_and_reverse(v1, v2, *weight_it, *weight_it, graph);
-            }
-          } else {
-            Vertex_descriptor inbetween = boost::add_vertex(graph);
-
-            double w1 = (label_1 == alpha) ? 0 : *weight_it;
-            double w2 = (label_2 == alpha) ? 0 : *weight_it;
-            add_edge_and_reverse(inbetween, v1, w1, w1, graph);
-            add_edge_and_reverse(inbetween, v2, w2, w2, graph);
-            add_edge_and_reverse(inbetween, cluster_sink, *weight_it, 0.0, graph);
-          }
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        edge_creation_time += timer.time();
-        #endif
-
-        // initialize vertex indices, it is neccessary since we are using VertexList = listS
-        Vertex_iterator v_begin, v_end;
-        Traits::vertices_size_type index = 0;
-        for(boost::tie(v_begin, v_end) = vertices(graph); v_begin != v_end; ++v_begin) {
-          boost::put(boost::vertex_index, graph, *v_begin, index++);
-        }
-
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        timer.reset();
-        #endif
-#if BOOST_VERSION >= 104400
-        double flow = boost::boykov_kolmogorov_max_flow(graph, cluster_source,
-                      cluster_sink);
-#else
-        double flow = boost::kolmogorov_max_flow(graph, cluster_source, cluster_sink);
-#endif
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        cut_time += timer.time();
-        #endif
-
-        if(min_cut - flow < flow * tolerance) {
-          continue;
-        }
-        min_cut = flow;
-        success = true;
-        //update labeling
-        for(std::size_t vertex_i = 0; vertex_i < inserted_vertices.size(); ++vertex_i) {
-          boost::default_color_type color = boost::get(boost::vertex_color, graph,
-                                            inserted_vertices[vertex_i]);
-          if(labels[vertex_i] != alpha
-              && color == ColorTraits::white()) { //new comers (expansion occurs)
-            labels[vertex_i] = alpha;
-          }
-        }
-      }
-    } while(success);
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
-                      std::endl;
-    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
-    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
-    #endif
-
-    return min_cut;
-  }
-};
-
-// another implementation using compressed_sparse_row_graph
-// for now there is a performance problem while setting reverse edges
-// if that can be solved, it is faster than Alpha_expansion_graph_cut_boost
-class Alpha_expansion_graph_cut_boost_CSR
-{
-private:
-  // CSR only accepts bundled props
-  struct VertexP {
-    boost::default_color_type vertex_color;
-    double vertex_distance_t;
-    // ? do not now there is another way to take it, I think since edge_descriptor does not rely on properties
-    // this should be fine...
-    boost::compressed_sparse_row_graph<boost::directedS>::edge_descriptor
-    vertex_predecessor;
-  };
-
-  struct EdgeP {
-    double edge_capacity;
-    double edge_residual_capacity;
-    boost::compressed_sparse_row_graph<boost::directedS>::edge_descriptor
-    edge_reverse;
-  };
-
-  typedef boost::compressed_sparse_row_graph<boost::directedS,
-          VertexP, EdgeP> Graph;
-
-  typedef boost::graph_traits<Graph> Traits;
-  typedef boost::color_traits<boost::default_color_type> ColorTraits;
-
-  typedef Traits::vertex_descriptor Vertex_descriptor;
-  typedef Traits::vertex_iterator   Vertex_iterator;
-  typedef Traits::edge_descriptor   Edge_descriptor;
-  typedef Traits::edge_iterator     Edge_iterator;
-
-  void
-  add_edge_and_reverse(std::size_t v1 , std::size_t v2, double w1, double w2,
-                       std::vector<std::pair<std::size_t, std::size_t> >& edge_map,
-                       std::vector<EdgeP>& edge_weights) const {
-    edge_map.push_back(std::make_pair(v1, v2));
-    EdgeP p1;
-    p1.edge_capacity = w1;
-    edge_weights.push_back(p1);
-
-    edge_map.push_back(std::make_pair(v2, v1));
-    EdgeP p2;
-    p2.edge_capacity = w2;
-    edge_weights.push_back(p2);
-  }
-
-public:
-  /**
-   * Applies alpha-expansion graph-cut for energy minimization.
-   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
-   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
-   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
-   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
-   * and as output it returns final labeling of vertices (i.e. assigned cluster-id to each facet)
-   * @return result of energy function
-   */
-  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
-                    edges,
-                    const std::vector<double>& edge_weights,
-                    const std::vector<std::vector<double> >& probability_matrix,
-                    std::vector<std::size_t>& labels) const {
-    const double tolerance = 1e-10;
-
-    double min_cut = (std::numeric_limits<double>::max)();
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    double vertex_creation_time, edge_creation_time, graph_creation_time,
-           reverse_mapping_time, cut_time;
-    vertex_creation_time = edge_creation_time = graph_creation_time =
-                             reverse_mapping_time = cut_time = 0.0;
-    #endif
-
-    Graph graph;
-
-    bool success;
-    do {
-      success = false;
-      std::size_t alpha = 0;
-
-      for(std::vector<std::vector<double> >::const_iterator it =
-            probability_matrix.begin();
-          it != probability_matrix.end(); ++it, ++alpha) {
-        std::vector<std::pair<std::size_t, std::size_t> > edge_map;
-        std::vector<EdgeP>                edge_map_weights;
-        edge_map.reserve(labels.size() *
-                         8); // there is no way to know exact edge count, it is a heuristic value
-        edge_map_weights.reserve(labels.size() * 8);
-
-        std::size_t cluster_source = 0;
-        std::size_t cluster_sink = 1;
-
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        Timer timer;
-        timer.start();
-        #endif
-        // For E-Data
-        // add every facet as a vertex to the graph, put edges to source & sink vertices
-        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
-          double source_weight = probability_matrix[alpha][vertex_i];
-          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
-          // making sink_weight 'infinity' guarantee this.
-          double sink_weight = (labels[vertex_i] == alpha) ?
-                               (std::numeric_limits<double>::max)()
-                               : probability_matrix[labels[vertex_i]][vertex_i];
-
-          add_edge_and_reverse(cluster_source, vertex_i + 2, source_weight, 0.0, edge_map,
-                               edge_map_weights);
-          add_edge_and_reverse(vertex_i + 2, cluster_sink, sink_weight, 0.0, edge_map,
-                               edge_map_weights);
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        vertex_creation_time += timer.time();
-        timer.reset();
-        #endif
-        // For E-Smooth
-        // add edge between every vertex,
-        std::size_t num_vert = labels.size() + 2;
-        std::vector<double>::const_iterator weight_it = edge_weights.begin();
-        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
-              edges.begin(); edge_it != edges.end();
-            ++edge_it, ++weight_it) {
-          std::size_t v1 = edge_it->first + 2, v2 = edge_it->second + 2;
-          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
-          if(label_1 == label_2) {
-            if(label_1 != alpha) {
-              add_edge_and_reverse(v1, v2, *weight_it, *weight_it, edge_map,
-                                   edge_map_weights);
-            }
-          } else {
-            std::size_t inbetween = num_vert++;
-
-            double w1 = (label_1 == alpha) ? 0 : *weight_it;
-            double w2 = (label_2 == alpha) ? 0 : *weight_it;
-            add_edge_and_reverse(inbetween, v1, w1, w1, edge_map, edge_map_weights);
-            add_edge_and_reverse(inbetween, v2, w2, w2, edge_map, edge_map_weights);
-            add_edge_and_reverse(inbetween, cluster_sink, *weight_it, 0.0, edge_map,
-                                 edge_map_weights);
-          }
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        edge_creation_time += timer.time();
-        timer.reset();
-        #endif
-#if BOOST_VERSION >= 104000
-        Graph graph(boost::edges_are_unsorted, edge_map.begin(), edge_map.end(),
-                    edge_map_weights.begin(), num_vert);
-#else
-        Graph graph(edge_map.begin(), edge_map.end(),
-                    edge_map_weights.begin(), num_vert);
-#endif
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        graph_creation_time += timer.time();
-        timer.reset();
-        #endif
-
-        // PERFORMANCE PROBLEM
-        // need to set reverse edge map, I guess there is no way to do that before creating the graph
-        // since we do not have edge_descs
-        // however from our edge_map, we know that each (2i, 2i + 1) is reverse pairs, how to facilitate that ?
-        // will look it back
-        Graph::edge_iterator ei, ee;
-        for(boost::tie(ei, ee) = boost::edges(graph); ei != ee; ++ei) {
-          Graph::vertex_descriptor v1 = boost::source(*ei, graph);
-          Graph::vertex_descriptor v2 = boost::target(*ei, graph);
-          std::pair<Graph::edge_descriptor, bool> opp_edge = boost::edge(v2, v1, graph);
-
-          CGAL_assertion(opp_edge.second);
-          graph[opp_edge.first].edge_reverse =
-            *ei; // and edge_reverse of *ei will be (or already have been) set by the opp_edge
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        reverse_mapping_time += timer.time();
-        timer.reset();
-        #endif
-
-#if BOOST_VERSION >= 104400
-        // since properties are bundled, defaults does not work need to specify them
-        double flow = boost::boykov_kolmogorov_max_flow(graph,
-                      boost::get(&EdgeP::edge_capacity, graph),
-                      boost::get(&EdgeP::edge_residual_capacity, graph),
-                      boost::get(&EdgeP::edge_reverse, graph),
-                      boost::get(&VertexP::vertex_predecessor, graph),
-                      boost::get(&VertexP::vertex_color, graph),
-                      boost::get(&VertexP::vertex_distance_t, graph),
-                      boost::get(boost::vertex_index,
-                                 graph), // this is not bundled, get it from graph (CRS provides one)
-                      cluster_source,
-                      cluster_sink
-                                                       );
-#else
-        double flow = boost::kolmogorov_max_flow(graph,
-                      boost::get(&EdgeP::edge_capacity, graph),
-                      boost::get(&EdgeP::edge_residual_capacity, graph),
-                      boost::get(&EdgeP::edge_reverse, graph),
-                      boost::get(&VertexP::vertex_predecessor, graph),
-                      boost::get(&VertexP::vertex_color, graph),
-                      boost::get(&VertexP::vertex_distance_t, graph),
-                      boost::get(boost::vertex_index,
-                                 graph), // this is not bundled, get it from graph
-                      cluster_source,
-                      cluster_sink
-                                                );
-#endif
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        cut_time += timer.time();
-        #endif
-
-        if(min_cut - flow < flow * tolerance) {
-          continue;
-        }
-        min_cut = flow;
-        success = true;
-        //update labeling
-        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
-          boost::default_color_type color =  graph[vertex_i + 2].vertex_color;
-          if(labels[vertex_i] != alpha
-              && color == ColorTraits::white()) { //new comers (expansion occurs)
-            labels[vertex_i] = alpha;
-          }
-        }
-      }
-    } while(success);
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
-                      std::endl;
-    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
-    CGAL_TRACE_STREAM << "graph creation time: " << graph_creation_time <<
-                      std::endl;
-    CGAL_TRACE_STREAM << "reverse mapping time: " << reverse_mapping_time <<
-                      std::endl;
-    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
-    #endif
-    return min_cut;
-  }
-};
-#endif
-
-#ifndef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
-/**
- * @brief Implements alpha-expansion graph cut algorithm.
- *
- * For underlying max-flow algorithm, it uses the MAXFLOW software implemented by Boykov & Kolmogorov.
- *  Also no pre-allocation is made.
- */
-class Alpha_expansion_graph_cut_boykov_kolmogorov
-{
-public:
-  /**
-   * Applies alpha-expansion graph-cut for energy minimization.
-   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
-   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
-   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
-   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
-   * and as output it returns final labeling of vertices
-   * @return result of energy function
-   */
-  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
-                    edges,
-                    const std::vector<double>& edge_weights,
-                    const std::vector<std::vector<double> >& probability_matrix,
-                    std::vector<std::size_t>& labels) const {
-    const double tolerance = 1e-10;
-
-    double min_cut = (std::numeric_limits<double>::max)();
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    double vertex_creation_time, edge_creation_time, cut_time;
-    vertex_creation_time = edge_creation_time = cut_time = 0.0;
-    #endif
-
-    std::vector<MaxFlow::Graph::node_id> inserted_vertices;
-    inserted_vertices.resize(labels.size());
-    bool success;
-    do {
-      success = false;
-      std::size_t alpha = 0;
-      for(std::vector<std::vector<double> >::const_iterator it =
-            probability_matrix.begin();
-          it != probability_matrix.end(); ++it, ++alpha) {
-        MaxFlow::Graph graph;
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        Timer timer;
-        timer.start();
-        #endif
-        // For E-Data
-        // add every facet as a vertex to graph, put edges to source-sink vertices
-        for(std::size_t vertex_i = 0; vertex_i <  labels.size(); ++vertex_i) {
-          MaxFlow::Graph::node_id new_vertex = graph.add_node();
-          inserted_vertices[vertex_i] = new_vertex;
-
-          double source_weight = probability_matrix[alpha][vertex_i];
-          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
-          // making sink_weight 'infinity' guarantee this.
-          double sink_weight = (labels[vertex_i] == alpha) ?
-                               (std::numeric_limits<double>::max)()
-                               : probability_matrix[labels[vertex_i]][vertex_i];
-          graph.add_tweights(new_vertex, source_weight, sink_weight);
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        vertex_creation_time += timer.time();
-        timer.reset();
-        #endif
-        // For E-Smooth
-        // add edge between every vertex,
-        std::vector<double>::const_iterator weight_it = edge_weights.begin();
-        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
-              edges.begin(); edge_it != edges.end();
-            ++edge_it, ++weight_it) {
-          MaxFlow::Graph::node_id v1 = inserted_vertices[edge_it->first];
-          MaxFlow::Graph::node_id v2 = inserted_vertices[edge_it->second];
-          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
-          if(label_1 == label_2) {
-            if(label_1 != alpha) {
-              graph.add_edge(v1, v2, *weight_it, *weight_it);
-            }
-          } else {
-            MaxFlow::Graph::node_id inbetween = graph.add_node();
-
-            double w1 = (label_1 == alpha) ? 0 : *weight_it;
-            double w2 = (label_2 == alpha) ? 0 : *weight_it;
-            graph.add_edge(inbetween, v1, w1, w1);
-            graph.add_edge(inbetween, v2, w2, w2);
-
-            graph.add_tweights(inbetween, 0.0, *weight_it);
-          }
-        }
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        edge_creation_time += timer.time();
-        timer.reset();
-        #endif
-
-        double flow = graph.maxflow();
-        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-        cut_time += timer.time();
-        #endif
-
-        if(min_cut - flow < flow * tolerance) {
-          continue;
-        }
-
-        min_cut = flow;
-        success = true;
-        //update labeling
-        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
-          if(labels[vertex_i] != alpha
-              && graph.what_segment(inserted_vertices[vertex_i]) == MaxFlow::Graph::SINK) {
-            labels[vertex_i] = alpha;
-          }
-        }
-      }
-    } while(success);
-
-    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
-    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
-                      std::endl;
-    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
-    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
-    #endif
-    return min_cut;
-  }
-};
-#endif //CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
-}//namespace internal
-/// @endcond
-}//namespace CGAL
-#endif //CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_modeling/Weights.h b/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_modeling/Weights.h
deleted file mode 100644
index 406a099..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_modeling/Weights.h
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright (c) 2014 GeometryFactory
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ilker O. Yaz
-
-#ifndef CGAL_SURFACE_MODELING_WEIGHTS_H
-#define CGAL_SURFACE_MODELING_WEIGHTS_H
-/// @cond CGAL_DOCUMENT_INTERNAL
-
-#include <CGAL/boost/graph/helpers.h>
-#include <CGAL/Simple_cartesian.h>
-
-
-namespace CGAL {
-namespace internal {
-
-namespace Surface_modeling{
-typedef CGAL::Simple_cartesian<double>::Vector_3 Vector;
-} //end of namespace Surface_modeling
-
-template<class Point>
-Surface_modeling::Vector to_vector(const Point& b, const Point& a) {
-  return Surface_modeling::Vector(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
-}
-
-// Returns the cotangent value of half angle v0 v1 v2
-// using formula in -[Meyer02] Discrete Differential-Geometry Operators for- page 19
-// The potential problem with previous one (Cotangent_value) is that it does not produce symmetric results
-// (i.e. for v0, v1, v2 and v2, v1, v0 returned cot weights can be slightly different)
-// This one provides stable results.
-template<class HalfedgeGraph>
-class Cotangent_value_Meyer
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-
-  typedef HalfedgeGraph Halfedge_graph;
-
-  template<class VertexPointMap>
-  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, VertexPointMap vpm)
-  {
-    const Surface_modeling::Vector& a = to_vector(get(vpm, v1), get(vpm, v0));
-    const Surface_modeling::Vector& b = to_vector(get(vpm, v1), get(vpm, v2));
-
-    double dot_ab = a*b;
-    Surface_modeling::Vector cross_ab = CGAL::cross_product(a, b);
-    double divider = std::sqrt(cross_ab*cross_ab);
-
-    if(divider == 0 /*|| divider != divider*/)
-    {
-      this->collinear(get(vpm, v0), get(vpm, v1), get(vpm, v2)) ?
-        CGAL_warning(!"Infinite Cotangent value with degenerate triangle!") :
-        CGAL_warning(!"Infinite Cotangent value due to floating point arithmetic!");
-
-      return dot_ab > 0 ? (std::numeric_limits<double>::max)() :
-        -(std::numeric_limits<double>::max)();
-    }
-
-    return dot_ab / divider;
-  }
-
-  ///////////////////////////////////////////////////////////////////////////////////////
-  // WARNING: this two functions are just used when cotangent weight turns out to be +-inf,
-  //          just for raising a proper warning message (i.e nothing functional)
-  template<class Point>
-  bool collinear(const Point&, const Point&, const Point&) {
-    return true;
-  }
-  template<class Kernel>
-  bool collinear(const CGAL::Point_3<Kernel>& a, const CGAL::Point_3<Kernel>& b, const CGAL::Point_3<Kernel>& c) {
-    return CGAL::collinear(a, b, c);
-  }
-  ///////////////////////////////////////////////////////////////////////////////////////
-
-};
-
-// Returns the cotangent value of half angle v0 v1 v2 by clamping between [1, 89] degrees
-// as suggested by -[Friedel] Unconstrained Spherical Parameterization-
-template<class HalfedgeGraph, class CotangentValue = Cotangent_value_Meyer<HalfedgeGraph> >
-class Cotangent_value_clamped : CotangentValue
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-
-  typedef HalfedgeGraph Halfedge_graph;
-
-  template<class VertexPointMap>
-  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, VertexPointMap vpm)
-  {
-    const double cot_1 = 57.289962;
-    const double cot_89 = 0.017455;
-    double value = CotangentValue::operator()(v0, v1, v2, vpm);
-    return (std::max)(cot_89, (std::min)(value, cot_1));
-  }
-};
-
-template<class HalfedgeGraph, class CotangentValue = Cotangent_value_Meyer<HalfedgeGraph> >
-class Cotangent_value_minimum_zero : CotangentValue
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-
-  template<class VertexPointMap>
-  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, VertexPointMap vpm)
-  {
-    double value = CotangentValue::operator()(v0, v1, v2, vpm);
-    return (std::max)(0.0, value);
-  }
-};
-
-
-///////////////////////////// Halfedge Weight Calculators ///////////////////////////////////
-// Cotangent weight calculator
-// Cotangent_value:               as suggested by -[Sorkine07] ARAP Surface Modeling-
-// Cotangent_value_area_weighted: as suggested by -[Mullen08] Spectral Conformal Parameterization-
-template<class HalfedgeGraph,
-         class CotangentValue = Cotangent_value_minimum_zero<HalfedgeGraph> >
-class Cotangent_weight : CotangentValue
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor   halfedge_descriptor;
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-  typedef HalfedgeGraph Halfedge_graph;
-  // Returns the cotangent weight of specified halfedge_descriptor
-  // Edge orientation is trivial
-  template<class VertexPointMap>
-  double operator()(halfedge_descriptor he, HalfedgeGraph& halfedge_graph, VertexPointMap vpm)
-  {
-     vertex_descriptor v0 = target(he, halfedge_graph);
-     vertex_descriptor v1 = source(he, halfedge_graph);
-     // Only one triangle for border edges
-     if ( is_border(he, halfedge_graph) ||
-          is_border(opposite(he, halfedge_graph), halfedge_graph) )
-     {
-       halfedge_descriptor he_cw = opposite( next(he, halfedge_graph), halfedge_graph );
-       vertex_descriptor v2 = source(he_cw, halfedge_graph);
-       if ( is_border(he_cw, halfedge_graph) ||
-            is_border(opposite(he_cw, halfedge_graph), halfedge_graph) )
-       {
-          halfedge_descriptor he_ccw = prev( opposite(he, halfedge_graph), halfedge_graph );
-          v2 = source(he_ccw, halfedge_graph);
-       }
-       return ( CotangentValue::operator()(v0, v2, v1, vpm)/2.0 );
-     }
-     else
-     {
-        halfedge_descriptor he_cw = opposite( next(he, halfedge_graph), halfedge_graph );
-        vertex_descriptor v2 = source(he_cw, halfedge_graph);
-        halfedge_descriptor he_ccw = prev( opposite(he, halfedge_graph), halfedge_graph );
-        vertex_descriptor v3 = source(he_ccw, halfedge_graph);
-
-        return ( CotangentValue::operator()(v0, v2, v1, vpm)/2.0 + CotangentValue::operator()(v0, v3, v1, vpm)/2.0 );
-     }
-  }
-};
-
-// Single cotangent from -[Chao10] Simple Geometric Model for Elastic Deformation
-template<class HalfedgeGraph,
-         class CotangentValue = Cotangent_value_Meyer<HalfedgeGraph> >
-class Single_cotangent_weight : CotangentValue
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor   halfedge_descriptor;
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-  typedef HalfedgeGraph Halfedge_graph;
-
-  // Returns the cotangent of the opposite angle of the halfedge
-  // 0 for border edges (which does not have an opposite angle)
-  template<class VertexPointMap>
-  double operator()(halfedge_descriptor he, HalfedgeGraph& halfedge_graph, VertexPointMap vpm)
-  {
-     if(is_border(he, halfedge_graph)) { return 0.0;}
-
-     vertex_descriptor v0 = target(he, halfedge_graph);
-     vertex_descriptor v1 = source(he, halfedge_graph);
-
-     vertex_descriptor v_op = target(next(he, halfedge_graph), halfedge_graph);
-     return CotangentValue::operator()(v0, v_op, v1, vpm);
-  }
-};
-
-// Mean value calculator described in -[Floater04] Mean Value Coordinates-
-// WARNING: Need to be updated to use point pmap
-template<class HalfedgeGraph>
-class Mean_value_weight
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor   halfedge_descriptor;
-  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
-  typedef HalfedgeGraph Halfedge_graph;
-
-  // Returns the mean-value coordinate of specified halfedge_descriptor
-  // Returns different value for different halfedge orientation (which is a normal behaviour according to formula)
-  double operator()(halfedge_descriptor he, HalfedgeGraph& halfedge_graph)
-  {
-    vertex_descriptor v0 = target(he, halfedge_graph);
-    vertex_descriptor v1 = source(he, halfedge_graph);
-    Surface_modeling::Vector vec(v1->point(), v0->point());
-    double norm = std::sqrt( vec.squared_length() );
-
-    // Only one triangle for border edges
-    if ( is_border(he, halfedge_graph) ||
-         is_border( opposite(he, halfedge_graph), halfedge_graph) )
-    {
-      halfedge_descriptor he_cw = opposite( next(he, halfedge_graph), halfedge_graph );
-      vertex_descriptor v2 = source(he_cw, halfedge_graph);
-      if ( is_border(he_cw, halfedge_graph) ||
-           is_border(opposite(he_cw, halfedge_graph), halfedge_graph) )
-      {
-        halfedge_descriptor he_ccw = prev( opposite(he, halfedge_graph), halfedge_graph );
-        v2 = source(he_ccw, halfedge_graph);
-      }
-
-      return ( half_tan_value_2(v1, v0, v2)/norm);
-    }
-    else
-    {
-      halfedge_descriptor he_cw = opposite( next(he, halfedge_graph), halfedge_graph );
-      vertex_descriptor v2 = source(he_cw, halfedge_graph);
-      halfedge_descriptor he_ccw = prev( opposite(he, halfedge_graph), halfedge_graph );
-      vertex_descriptor v3 = source(he_ccw, halfedge_graph);
-
-      return ( half_tan_value_2(v1, v0, v2)/norm + half_tan_value_2(v1, v0, v3)/norm);
-    }
-  }
-
-private:
-  // Returns the tangent value of half angle v0_v1_v2/2
-  double half_tan_value(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
-  {
-    Surface_modeling::Vector vec0(v2->point(), v1->point());
-    Surface_modeling::Vector vec1(v0->point(), v2->point());
-    Surface_modeling::Vector vec2(v1->point(), v0->point());
-    double e0_square = vec0.squared_length();
-    double e1_square = vec1.squared_length();
-    double e2_square = vec2.squared_length();
-    double e0 = std::sqrt(e0_square);
-    double e2 = std::sqrt(e2_square);
-    double cos_angle = ( e0_square + e2_square - e1_square ) / 2.0 / e0 / e2;
-    cos_angle = (std::max)(-1.0, (std::min)(1.0, cos_angle)); // clamp into [-1, 1]
-    double angle = acos(cos_angle);
-
-    return ( tan(angle/2.0) );
-  }
-
-  // My deviation built on Meyer_02
-  double half_tan_value_2(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
-  {
-    Surface_modeling::Vector a(v1->point(), v0->point());
-    Surface_modeling::Vector b(v1->point(), v2->point());
-    double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
-    double dot_aa = a.squared_length();
-    double dot_bb = b.squared_length();
-    double dot_aa_bb = dot_aa * dot_bb;
-
-    double cos_rep = dot_ab;
-    double sin_rep = std::sqrt(dot_aa_bb  - dot_ab * dot_ab);
-    double normalizer = std::sqrt(dot_aa_bb); // |a|*|b|
-
-    return (normalizer - cos_rep) / sin_rep; // formula from [Floater04] page 4
-                                             // tan(Q/2) = (1 - cos(Q)) / sin(Q)
-  }
-};
-
-template< class HalfedgeGraph,
-          class PrimaryWeight = Cotangent_weight<HalfedgeGraph>,
-          class SecondaryWeight = Mean_value_weight<HalfedgeGraph> >
-class Hybrid_weight : public PrimaryWeight, SecondaryWeight
-{
-public:
-  typedef typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor   halfedge_descriptor;
-  typedef HalfedgeGraph Halfedge_graph;
-
-  double operator()(halfedge_descriptor he, HalfedgeGraph& halfedge_graph)
-  {
-    double weight = PrimaryWeight::operator()(he, halfedge_graph);
-    //if(weight < 0) { std::cout << "Negative weight" << std::endl; }
-    return (weight >= 0) ? weight : SecondaryWeight::operator()(he, halfedge_graph);
-  }
-};
-
-// Trivial uniform weights (created for test purposes)
-template<class HalfedgeGraph>
-class Uniform_weight
-{
-public:
-  typedef HalfedgeGraph Halfedge_graph;
-  typedef typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor   halfedge_descriptor;
-
-  double operator()(halfedge_descriptor /*he*/, HalfedgeGraph& /*halfedge_graph*/)
-  { return 1.0; }
-};
-
-
-
-}//namespace internal
-/// @endcond
-}//namespace CGAL
-#endif //CGAL_SURFACE_MODELING_WEIGHTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/auxiliary/graph.h b/3rdparty/CGAL-4.6/include/CGAL/internal/auxiliary/graph.h
deleted file mode 100644
index 22b115a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/auxiliary/graph.h
+++ /dev/null
@@ -1,1749 +0,0 @@
-// Copyright (c) 2001  Yuri Boykov
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-/*
-###################################################################
-#                                                                 #
-#    MAXFLOW - software for computing mincut/maxflow in a graph   #
-#                        Version 2.21                             #
-#    http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/software.html     #
-#                                                                 #
-#    Yuri Boykov (yuri at csd.uwo.ca)                                #
-#    Vladimir Kolmogorov (v.kolmogorov at cs.ucl.ac.uk)              #
-#    2001                                                         #
-#                                                                 #
-###################################################################
-
-1. Introduction.
-
-This software library implements the maxflow algorithm
-described in
-
-	An Experimental Comparison of Min-Cut/Max-Flow Algorithms
-	for Energy Minimization in Vision.
-	Yuri Boykov and Vladimir Kolmogorov.
-	In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI),
-	September 2004
-
-This algorithm was developed by Yuri Boykov and Vladimir Kolmogorov
-at Siemens Corporate Research. To make it available for public use,
-it was later reimplemented by Vladimir Kolmogorov based on open publications.
-
-If you use this software for research purposes, you should cite
-the aforementioned paper in any resulting publication.
-
-Tested under windows, Visual C++ 6.0 compiler and unix (SunOS 5.8
-and RedHat Linux 7.0, GNU c++ compiler).
-
-##################################################################
-
-2. Licence.
-
-Copyright UCL Business PLC
-
-This program is available under dual licence:
-
-1) Under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-Note that any program that incorporates the code under this licence must, under the terms of the GNU GPL, be released under a licence compatible with the GPL. GNU GPL does not permit incorporating this program into proprietary programs. If you wish to do this, please see the alternative licence available below.
-GNU General Public License can be found at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-
-2) Proprietary Licence from UCL Business PLC.
-To enable programers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html
-
-##################################################################
-
-3. Graph representation.
-
-There are two versions of the algorithm using different
-graph representations (adjacency list and forward star).
-The former one uses more than twice as much memory as the
-latter one but is 10-20% faster.
-
-Memory allocation (assuming that all capacities are 'short' - 2 bytes):
-
-                 |   Nodes    |   Arcs
-------------------------------------------
-Adjacency list   | *24 bytes  | *14 bytes
-Forward star     | *28 bytes  |  6 bytes
-
-(* means that often it should be rounded up to be a multiple of 4
-- some compilers (e.g. Visual C++) seem to round up elements
-of arrays unless the are structures containing only char[].)
-
-Note that arcs are always added in pairs - in forward and reverse directions.
-Arcs between nodes and terminals (the source and the sink) are
-not stored as arcs, but rather as a part of nodes.
-
-The assumption for the forward star representation is that
-the maximum number of arcs per node (except the source
-and the sink) is much less than ARC_BLOCK_SIZE (1024 by default).
-
-Both versions have the same interface.
-
-##################################################################
-
-4. Example usage.
-
-This section shows how to use the library to compute
-a minimum cut on the following graph:
-
-		        SOURCE
-		       /       \
-		     1/         \2
-		     /      3    \
-		   node0 -----> node1
-		     |   <-----   |
-		     |      4     |
-		     \            /
-		     5\          /6
-		       \        /
-		          SINK
-
-///////////////////////////////////////////////////
-
-#include <stdio.h>
-#include "graph.h"
-
-void main()
-{
-	Graph::node_id nodes[2];
-	Graph *g = new Graph();
-
-	nodes[0] = g -> add_node();
-	nodes[1] = g -> add_node();
-	g -> set_tweights(nodes[0], 1, 5);
-	g -> set_tweights(nodes[1], 2, 6);
-	g -> add_edge(nodes[0], nodes[1], 3, 4);
-
-	Graph::flowtype flow = g -> maxflow();
-
-	printf("Flow = %d\n", flow);
-	printf("Minimum cut:\n");
-	if (g->what_segment(nodes[0]) == Graph::SOURCE)
-		printf("node0 is in the SOURCE set\n");
-	else
-		printf("node0 is in the SINK set\n");
-	if (g->what_segment(nodes[1]) == Graph::SOURCE)
-		printf("node1 is in the SOURCE set\n");
-	else
-		printf("node1 is in the SINK set\n");
-
-	delete g;
-}
-
-///////////////////////////////////////////////////
-*/
-
-/* block.h */
-/*
-	Template classes Block and DBlock
-	Implement adding and deleting items of the same type in blocks.
-
-	If there there are many items then using Block or DBlock
-	is more efficient than using 'new' and 'delete' both in terms
-	of memory and time since
-	(1) On some systems there is some minimum amount of memory
-	    that 'new' can allocate (e.g., 64), so if items are
-	    small that a lot of memory is wasted.
-	(2) 'new' and 'delete' are designed for items of varying size.
-	    If all items has the same size, then an algorithm for
-	    adding and deleting can be made more efficient.
-	(3) All Block and DBlock functions are inline, so there are
-	    no extra function calls.
-
-	Differences between Block and DBlock:
-	(1) DBlock allows both adding and deleting items,
-	    whereas Block allows only adding items.
-	(2) Block has an additional operation of scanning
-	    items added so far (in the order in which they were added).
-	(3) Block allows to allocate several consecutive
-	    items at a time, whereas DBlock can add only a single item.
-
-	Note that no constructors or destructors are called for items.
-
-	Example usage for items of type 'MyType':
-
-	///////////////////////////////////////////////////
-	#include "block.h"
-	#define BLOCK_SIZE 1024
-	typedef struct { int a, b; } MyType;
-	MyType *ptr, *array[10000];
-
-	...
-
-	Block<MyType> *block = new Block<MyType>(BLOCK_SIZE);
-
-	// adding items
-	for (int i=0; i<sizeof(array); i++)
-	{
-		ptr = block -> New();
-		ptr -> a = ptr -> b = rand();
-	}
-
-	// reading items
-	for (ptr=block->ScanFirst(); ptr; ptr=block->ScanNext())
-	{
-		printf("%d %d\n", ptr->a, ptr->b);
-	}
-
-	delete block;
-
-	...
-
-	DBlock<MyType> *dblock = new DBlock<MyType>(BLOCK_SIZE);
-
-	// adding items
-	for (int i=0; i<sizeof(array); i++)
-	{
-		array[i] = dblock -> New();
-	}
-
-	// deleting items
-	for (int i=0; i<sizeof(array); i+=2)
-	{
-		dblock -> Delete(array[i]);
-	}
-
-	// adding items
-	for (int i=0; i<sizeof(array); i++)
-	{
-		array[i] = dblock -> New();
-	}
-
-	delete dblock;
-
-	///////////////////////////////////////////////////
-
-	Note that DBlock deletes items by marking them as
-	empty (i.e., by adding them to the list of free items),
-	so that this memory could be used for subsequently
-	added items. Thus, at each moment the memory allocated
-	is determined by the maximum number of items allocated
-	simultaneously at earlier moments. All memory is
-	deallocated only when the destructor is called.
-*/
-
-#ifndef __BLOCK_H__
-#define __BLOCK_H__
-
-#include <stdlib.h>
-
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-
-template <class Type> class Block
-{
-public:
-  /* Constructor. Arguments are the block size and
-     (optionally) the pointer to the function which
-     will be called if allocation failed; the message
-     passed to this function is "Not enough memory!" */
-  Block(int size, void (*err_function)(const char *) = NULL) {
-    first = last = NULL;
-    block_size = size;
-    error_function = err_function;
-  }
-
-  /* Destructor. Deallocates all items added so far */
-  ~Block() {
-    while (first) {
-      block *next = first -> next;
-      delete[] ((char*)first);
-      first = next;
-    }
-  }
-
-  /* Allocates 'num' consecutive items; returns pointer
-     to the first item. 'num' cannot be greater than the
-     block size since items must fit in one block */
-  Type *New(int num = 1) {
-    Type *t;
-
-    if (!last || last->current + num > last->last) {
-      if (last && last->next) last = last -> next;
-      else {
-        block *next = (block *) new char [sizeof(block) + (block_size-1)*sizeof(Type)];
-        if (!next) {
-          if (error_function) (*error_function)("Not enough memory!");
-          exit(1);
-        }
-        if (last) last -> next = next;
-        else first = next;
-        last = next;
-        last -> current = & ( last -> data[0] );
-        last -> last = last -> current + block_size;
-        last -> next = NULL;
-      }
-    }
-
-    t = last -> current;
-    last -> current += num;
-    return t;
-  }
-
-  /* Returns the first item (or NULL, if no items were added) */
-  Type *ScanFirst() {
-    for (scan_current_block=first; scan_current_block;
-         scan_current_block = scan_current_block->next) {
-      scan_current_data = & ( scan_current_block -> data[0] );
-      if (scan_current_data < scan_current_block -> current) return scan_current_data
-            ++;
-    }
-    return NULL;
-  }
-
-  /* Returns the next item (or NULL, if all items have been read)
-     Can be called only if previous ScanFirst() or ScanNext()
-     call returned not NULL. */
-  Type *ScanNext() {
-    while (scan_current_data >= scan_current_block -> current) {
-      scan_current_block = scan_current_block -> next;
-      if (!scan_current_block) return NULL;
-      scan_current_data = & ( scan_current_block -> data[0] );
-    }
-    return scan_current_data ++;
-  }
-
-  /* Marks all elements as empty */
-  void Reset() {
-    block *b;
-    if (!first) return;
-    for (b=first; ; b=b->next) {
-      b -> current = & ( b -> data[0] );
-      if (b == last) break;
-    }
-    last = first;
-  }
-
-  /***********************************************************************/
-
-private:
-
-  typedef struct block_st {
-    Type					*current, *last;
-    struct block_st			*next;
-    Type					data[1];
-  } block;
-
-  int		block_size;
-  block	*first;
-  block	*last;
-
-  block	*scan_current_block;
-  Type	*scan_current_data;
-
-  void	(*error_function)(const char *);
-};
-
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-
-template <class Type> class DBlock
-{
-public:
-  /* Constructor. Arguments are the block size and
-     (optionally) the pointer to the function which
-     will be called if allocation failed; the message
-     passed to this function is "Not enough memory!" */
-  DBlock(int size, void (*err_function)(const char *) = NULL) {
-    first = NULL;
-    first_free = NULL;
-    block_size = size;
-    error_function = err_function;
-  }
-
-  /* Destructor. Deallocates all items added so far */
-  ~DBlock() {
-    while (first) {
-      block *next = first -> next;
-      delete[] ((char*)first);
-      first = next;
-    }
-  }
-
-  /* Allocates one item */
-  Type *New() {
-    block_item *item;
-
-    if (!first_free) {
-      block *next = first;
-      first = (block *) new char [sizeof(block) + (block_size-1)*sizeof(block_item)];
-      if (!first) {
-        if (error_function) (*error_function)("Not enough memory!");
-        exit(1);
-      }
-      first_free = & (first -> data[0] );
-      for (item=first_free; item<first_free+block_size-1; item++)
-        item -> next_free = item + 1;
-      item -> next_free = NULL;
-      first -> next = next;
-    }
-
-    item = first_free;
-    first_free = item -> next_free;
-    return (Type *) item;
-  }
-
-  /* Deletes an item allocated previously */
-  void Delete(Type *t) {
-    ((block_item *) t) -> next_free = first_free;
-    first_free = (block_item *) t;
-  }
-
-  /***********************************************************************/
-
-private:
-
-  typedef union block_item_st {
-    Type			t;
-    block_item_st	*next_free;
-  } block_item;
-
-  typedef struct block_st {
-    struct block_st			*next;
-    block_item				data[1];
-  } block;
-
-  int			block_size;
-  block		*first;
-  block_item	*first_free;
-
-  void	(*error_function)(const char *);
-};
-
-
-#endif
-
-
-
-/* graph.h */
-/*
-	This software library implements the maxflow algorithm
-	described in
-
-		An Experimental Comparison of Min-Cut/Max-Flow Algorithms
-		for Energy Minimization in Vision.
-		Yuri Boykov and Vladimir Kolmogorov.
-		In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI),
-		September 2004
-
-	This algorithm was developed by Yuri Boykov and Vladimir Kolmogorov
-	at Siemens Corporate Research. To make it available for public use,
-	it was later reimplemented by Vladimir Kolmogorov based on open publications.
-
-	If you use this software for research purposes, you should cite
-	the aforementioned paper in any resulting publication.
-
-	----------------------------------------------------------------
-
-	For description, license, example usage, discussion of graph representation	and memory usage see README.TXT.
-*/
-
-#ifndef __GRAPH_H__
-#define __GRAPH_H__
-
-//#include "block.h"
-#include <stdio.h>
-/*
-	Nodes, arcs and pointers to nodes are
-	added in blocks for memory and time efficiency.
-	Below are numbers of items in blocks
-*/
-#define NODE_BLOCK_SIZE 512
-#define ARC_BLOCK_SIZE 1024
-#define NODEPTR_BLOCK_SIZE 128
-
-template <std::size_t size>
-struct Int_to_ptr;
-
-template<> struct Int_to_ptr<sizeof(int)> {
-  typedef int type;
-};
-#if INT_MAX != LONG_MAX
-template<> struct Int_to_ptr<sizeof(long)> {
-  typedef long type;
-};
-#else
-template<> struct Int_to_ptr<sizeof(long long)> {
-  typedef long long type;
-};
-#endif
-
-
-class Graph
-{
-public:
-  typedef enum {
-    SOURCE	= 0,
-    SINK	= 1
-  } termtype; /* terminals */
-
-  /* Type of edge weights.
-     Can be changed to char, int, float, double, ... */
-  typedef double captype;
-  /* Type of total flow */
-  typedef double flowtype;
-
-  typedef void * node_id;
-
-  /* interface functions */
-
-  /* Constructor. Optional argument is the pointer to the
-     function which will be called if an error occurs;
-     an error message is passed to this function. If this
-     argument is omitted, exit(1) will be called. */
-  Graph(void (*err_function)(const char *) = NULL);
-
-  /* Destructor */
-  ~Graph();
-
-  /* Adds a node to the graph */
-  node_id add_node();
-
-  /* Adds a bidirectional edge between 'from' and 'to'
-     with the weights 'cap' and 'rev_cap' */
-  void add_edge(node_id from, node_id to, captype cap, captype rev_cap);
-
-  /* Sets the weights of the edges 'SOURCE->i' and 'i->SINK'
-     Can be called at most once for each node before any call to 'add_tweights'.
-     Weights can be negative */
-  void set_tweights(node_id i, captype cap_source, captype cap_sink);
-
-  /* Adds new edges 'SOURCE->i' and 'i->SINK' with corresponding weights
-     Can be called multiple times for each node.
-     Weights can be negative */
-  void add_tweights(node_id i, captype cap_source, captype cap_sink);
-
-  /* After the maxflow is computed, this function returns to which
-     segment the node 'i' belongs (Graph::SOURCE or Graph::SINK) */
-  termtype what_segment(node_id i);
-
-  /* Computes the maxflow. Can be called only once. */
-  flowtype maxflow();
-
-  /***********************************************************************/
-  /***********************************************************************/
-  /***********************************************************************/
-
-private:
-  /* internal variables and functions */
-
-  struct arc_forward_st;
-  struct arc_reverse_st;
-
-  typedef Int_to_ptr< sizeof(void*) >::type INTEGER;
-#define IS_ODD(a) ((INTEGER)(a) & 1)
-#define MAKE_ODD(a)  ((arc_forward *) ((INTEGER)(a) | 1))
-#define MAKE_EVEN(a) ((arc_forward *) ((INTEGER)(a) & (~1)))
-#define MAKE_ODD_REV(a)  ((arc_reverse *) ((INTEGER)(a) | 1))
-#define MAKE_EVEN_REV(a) ((arc_reverse *) ((INTEGER)(a) & (~1)))
-#define POINTER_TO_INTEGER(ptr) ((INTEGER) ptr)
-
-
-
-  /* node structure */
-  typedef struct node_st {
-    /*
-    	Usually i->first_out is the first outgoing
-    	arc, and (i+1)->first_out-1 is the last outgoing arc.
-    	However, it is not always possible, since
-    	arcs are allocated in blocks, so arcs corresponding
-    	to two consecutive nodes may be in different blocks.
-
-    	If outgoing arcs for i are last in the arc block,
-    	then a different mechanism is used. i->first_out
-    	is odd in this case; the first outgoing arc
-    	is (a+1), and the last outgoing arc is
-    	((arc_forward *)(a->shift))-1, where
-    	a = (arc_forward *) (((char *)(i->first_out)) + 1);
-
-    	Similar mechanism is used for incoming arcs.
-    */
-    arc_forward_st	*first_out;	/* first outcoming arc */
-    arc_reverse_st	*first_in;	/* first incoming arc */
-
-    arc_forward_st	*parent;	/* describes node's parent
-									   if IS_ODD(parent) then MAKE_EVEN(parent) points to 'arc_reverse',
-									   otherwise parent points to 'arc_forward' */
-
-    node_st			*next;		/* pointer to the next active node
-									   (or to itself if it is the last node in the list) */
-
-    int				TS;			/* timestamp showing when DIST was computed */
-    int				DIST;		/* distance to the terminal */
-    short			is_sink;	/* flag showing whether the node is in the source or in the sink tree */
-
-    captype			tr_cap;		/* if tr_cap > 0 then tr_cap is residual capacity of the arc SOURCE->node
-									   otherwise         -tr_cap is residual capacity of the arc node->SINK */
-  } node;
-
-  /* arc structures */
-#define NEIGHBOR_NODE(i, shift) ((node *) ((char *)(i) + (shift)))
-#define NEIGHBOR_NODE_REV(i, shift) ((node *) ((char *)(i) - (shift)))
-  typedef struct arc_forward_st {
-    INTEGER			shift;		/* node_to = NEIGHBOR_NODE(node_from, shift) */
-    captype			r_cap;		/* residual capacity */
-    captype			r_rev_cap;	/* residual capacity of the reverse arc*/
-  } arc_forward;
-
-  typedef struct arc_reverse_st {
-    arc_forward		*sister;	/* reverse arc */
-  } arc_reverse;
-
-  /* 'pointer to node' structure */
-  typedef struct nodeptr_st {
-    node_st			*ptr;
-    nodeptr_st		*next;
-  } nodeptr;
-
-  typedef struct node_block_st {
-    node					*current;
-    struct node_block_st	*next;
-    node					nodes[NODE_BLOCK_SIZE];
-  } node_block;
-
-#define last_node LAST_NODE.LAST_NODE
-
-  typedef struct arc_for_block_st {
-    char					*start;		/* the actual start address of this block.
-											   May be different from 'this' since 'this'
-											   must be at an even address. */
-    arc_forward				*current;
-    struct arc_for_block_st	*next;
-    arc_forward
-    arcs_for[ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */
-    union {
-      arc_forward			dummy;
-      node				*LAST_NODE;	/* used in graph consruction */
-    }						LAST_NODE;
-  } arc_for_block;
-
-  typedef struct arc_rev_block_st {
-    char					*start;		/* the actual start address of this block.
-											   May be different from 'this' since 'this'
-											   must be at an even address. */
-    arc_reverse				*current;
-    struct arc_rev_block_st	*next;
-    arc_reverse
-    arcs_rev[ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */
-    union {
-      arc_reverse			dummy;
-      node				*LAST_NODE;	/* used in graph consruction */
-    }						LAST_NODE;
-  } arc_rev_block;
-
-  node_block			*node_block_first;
-  arc_for_block		*arc_for_block_first;
-  arc_rev_block		*arc_rev_block_first;
-  DBlock<nodeptr>		*nodeptr_block;
-
-  void	(*error_function)(const char
-                          *);	/* this function is called if a error occurs,
-										   with a corresponding error message
-										   (or exit(1) is called if it's NULL) */
-
-  flowtype			flow;		/* total flow */
-
-  /***********************************************************************/
-
-  node				*queue_first[2], *queue_last[2];	/* list of active nodes */
-  nodeptr				*orphan_first, *orphan_last;		/* list of pointers to orphans */
-  int					TIME;								/* monotonically increasing global counter */
-
-  /***********************************************************************/
-
-  /* functions for processing active list */
-  void set_active(node *i);
-  node *next_active();
-
-  void prepare_graph();
-  void maxflow_init();
-  void augment(node *s_start, node *t_start, captype *cap_middle,
-               captype *rev_cap_middle);
-  void process_source_orphan(node *i);
-  void process_sink_orphan(node *i);
-};
-/* graph.cpp */
-
-
-//#include <stdio.h>
-//#include "graph.h"
-
-inline Graph::Graph(void (*err_function)(const char *))
-{
-  error_function = err_function;
-  node_block_first = NULL;
-  arc_for_block_first = NULL;
-  arc_rev_block_first = NULL;
-  flow = 0;
-}
-
-inline Graph::~Graph()
-{
-  while (node_block_first) {
-    node_block *next = node_block_first -> next;
-    delete node_block_first;
-    node_block_first = next;
-  }
-
-  while (arc_for_block_first) {
-    arc_for_block *next = arc_for_block_first -> next;
-    delete[] arc_for_block_first -> start;
-    arc_for_block_first = next;
-  }
-
-  while (arc_rev_block_first) {
-    arc_rev_block *next = arc_rev_block_first -> next;
-    delete[] arc_rev_block_first -> start;
-    arc_rev_block_first = next;
-  }
-}
-
-inline Graph::node_id Graph::add_node()
-{
-  node *i;
-
-  if (!node_block_first
-      || node_block_first->current+1 > &node_block_first->nodes[NODE_BLOCK_SIZE-1]) {
-    node_block *next = node_block_first;
-    node_block_first = (node_block *) new node_block;
-    if (!node_block_first) {
-      if (error_function) (*error_function)("Not enough memory!");
-      exit(1);
-    }
-    node_block_first -> current = & ( node_block_first -> nodes[0] );
-    node_block_first -> next = next;
-  }
-
-  i = node_block_first -> current ++;
-  i -> first_out = (arc_forward *) 0;
-  i -> first_in = (arc_reverse *) 0;
-
-  i -> tr_cap = 0;
-
-  return (node_id) i;
-}
-
-inline void Graph::add_edge(node_id from, node_id to, captype cap,
-                            captype rev_cap)
-{
-  arc_forward *a_for;
-  arc_reverse *a_rev;
-
-  if (!arc_for_block_first
-      || arc_for_block_first->current+1 >
-      &arc_for_block_first->arcs_for[ARC_BLOCK_SIZE]) {
-    arc_for_block *next = arc_for_block_first;
-    char *ptr = new char[sizeof(arc_for_block)+1];
-    if (!ptr) {
-      if (error_function) (*error_function)("Not enough memory!");
-      exit(1);
-    }
-    if (IS_ODD(ptr)) arc_for_block_first = (arc_for_block *) (ptr + 1);
-    else              arc_for_block_first = (arc_for_block *) ptr;
-    arc_for_block_first -> start = ptr;
-    arc_for_block_first -> current = & ( arc_for_block_first -> arcs_for[0] );
-    arc_for_block_first -> next = next;
-  }
-
-  if (!arc_rev_block_first
-      || arc_rev_block_first->current+1 >
-      &arc_rev_block_first->arcs_rev[ARC_BLOCK_SIZE]) {
-    arc_rev_block *next = arc_rev_block_first;
-    char *ptr = new char[sizeof(arc_rev_block)+1];
-    if (!ptr) {
-      if (error_function) (*error_function)("Not enough memory!");
-      exit(1);
-    }
-    if (IS_ODD(ptr)) arc_rev_block_first = (arc_rev_block *) (ptr + 1);
-    else              arc_rev_block_first = (arc_rev_block *) ptr;
-    arc_rev_block_first -> start = ptr;
-    arc_rev_block_first -> current = & ( arc_rev_block_first -> arcs_rev[0] );
-    arc_rev_block_first -> next = next;
-  }
-
-  a_for = arc_for_block_first -> current ++;
-  a_rev = arc_rev_block_first -> current ++;
-
-  a_rev -> sister = (arc_forward *) from;
-  a_for -> shift  = POINTER_TO_INTEGER(to);
-  a_for -> r_cap = cap;
-  a_for -> r_rev_cap = rev_cap;
-
-  ((node *)from) -> first_out =
-    (arc_forward *) (POINTER_TO_INTEGER(((node *)from) -> first_out) + 1);
-  ((node *)to) -> first_in =
-    (arc_reverse *) (POINTER_TO_INTEGER(((node *)to) -> first_in) + 1);
-}
-
-inline void Graph::set_tweights(node_id i, captype cap_source, captype cap_sink)
-{
-  flow += (cap_source < cap_sink) ? cap_source : cap_sink;
-  ((node*)i) -> tr_cap = cap_source - cap_sink;
-}
-
-inline void Graph::add_tweights(node_id i, captype cap_source, captype cap_sink)
-{
-  register captype delta = ((node*)i) -> tr_cap;
-  if (delta > 0) cap_source += delta;
-  else           cap_sink   -= delta;
-  flow += (cap_source < cap_sink) ? cap_source : cap_sink;
-  ((node*)i) -> tr_cap = cap_source - cap_sink;
-}
-
-/*
-	Converts arcs added by 'add_edge()' calls
-	to a forward star graph representation.
-
-	Linear time algorithm.
-	No or little additional memory is allocated
-	during this process
-	(it may be necessary to allocate additional
-	arc blocks, since arcs corresponding to the
-	same node must be contiguous, i.e. be in one
-	arc block.)
-*/
-inline void Graph::prepare_graph()
-{
-  node *i;
-  arc_for_block *ab_for, *ab_for_first;
-  arc_rev_block *ab_rev, *ab_rev_first, *ab_rev_scan;
-  arc_forward *a_for;
-  arc_reverse *a_rev, *a_rev_scan, *a_rev_tmp=new arc_reverse;
-  node_block *nb;
-  bool for_flag = false, rev_flag = false;
-  INTEGER k;
-
-  if (!arc_rev_block_first) {
-    node_id from = add_node(), to = add_node();
-    add_edge(from, to, 1, 0);
-  }
-
-  /* FIRST STAGE */
-  a_rev_tmp->sister = NULL;
-  for (a_rev=arc_rev_block_first->current;
-       a_rev<&arc_rev_block_first->arcs_rev[ARC_BLOCK_SIZE]; a_rev++) {
-    a_rev -> sister = NULL;
-  }
-
-  ab_for = ab_for_first = arc_for_block_first;
-  ab_rev = ab_rev_first = ab_rev_scan = arc_rev_block_first;
-  a_for = &ab_for->arcs_for[0];
-  a_rev = a_rev_scan = &ab_rev->arcs_rev[0];
-
-  for (nb=node_block_first; nb; nb=nb->next) {
-    for (i=&nb->nodes[0]; i<nb->current; i++) {
-      /* outgoing arcs */
-      k = POINTER_TO_INTEGER(i -> first_out);
-      if (a_for + k > &ab_for->arcs_for[ARC_BLOCK_SIZE]) {
-        if (k > ARC_BLOCK_SIZE) {
-          if (error_function) (*error_function)("# of arcs per node exceeds block size!");
-          exit(1);
-        }
-        if (for_flag) ab_for = NULL;
-        else          {
-          ab_for = ab_for -> next;
-          ab_rev_scan = ab_rev_scan -> next;
-        }
-        if (ab_for == NULL) {
-          arc_for_block *next = arc_for_block_first;
-          char *ptr = new char[sizeof(arc_for_block)+1];
-          if (!ptr) {
-            if (error_function) (*error_function)("Not enough memory!");
-            exit(1);
-          }
-          if (IS_ODD(ptr)) arc_for_block_first = (arc_for_block *) (ptr + 1);
-          else              arc_for_block_first = (arc_for_block *) ptr;
-          arc_for_block_first -> start = ptr;
-          arc_for_block_first -> current = & ( arc_for_block_first -> arcs_for[0] );
-          arc_for_block_first -> next = next;
-          ab_for = arc_for_block_first;
-          for_flag = true;
-        } else a_rev_scan = &ab_rev_scan->arcs_rev[0];
-        a_for = &ab_for->arcs_for[0];
-      }
-      if (ab_rev_scan) {
-        a_rev_scan += k;
-        i -> parent = (arc_forward *) a_rev_scan;
-      } else i -> parent = (arc_forward *) a_rev_tmp;
-      a_for += k;
-      i -> first_out = a_for;
-      ab_for -> last_node = i;
-
-      /* incoming arcs */
-      k = POINTER_TO_INTEGER(i -> first_in);
-      if (a_rev + k > &ab_rev->arcs_rev[ARC_BLOCK_SIZE]) {
-        if (k > ARC_BLOCK_SIZE) {
-          if (error_function) (*error_function)("# of arcs per node exceeds block size!");
-          exit(1);
-        }
-        if (rev_flag) ab_rev = NULL;
-        else          ab_rev = ab_rev -> next;
-        if (ab_rev == NULL) {
-          arc_rev_block *next = arc_rev_block_first;
-          char *ptr = new char[sizeof(arc_rev_block)+1];
-          if (!ptr) {
-            if (error_function) (*error_function)("Not enough memory!");
-            exit(1);
-          }
-          if (IS_ODD(ptr)) arc_rev_block_first = (arc_rev_block *) (ptr + 1);
-          else              arc_rev_block_first = (arc_rev_block *) ptr;
-          arc_rev_block_first -> start = ptr;
-          arc_rev_block_first -> current = & ( arc_rev_block_first -> arcs_rev[0] );
-          arc_rev_block_first -> next = next;
-          ab_rev = arc_rev_block_first;
-          rev_flag = true;
-        }
-        a_rev = &ab_rev->arcs_rev[0];
-      }
-      a_rev += k;
-      i -> first_in = a_rev;
-      ab_rev -> last_node = i;
-    }
-    /* i is the last node in block */
-    i -> first_out = a_for;
-    i -> first_in  = a_rev;
-  }
-
-  /* SECOND STAGE */
-  for (ab_for=arc_for_block_first; ab_for; ab_for=ab_for->next) {
-    ab_for -> current = ab_for -> last_node -> first_out;
-  }
-
-  for ( ab_for=ab_for_first, ab_rev=ab_rev_first;
-        ab_for;
-        ab_for=ab_for->next, ab_rev=ab_rev->next )
-    for ( a_for=&ab_for->arcs_for[0], a_rev=&ab_rev->arcs_rev[0];
-          a_for<&ab_for->arcs_for[ARC_BLOCK_SIZE];
-          a_for++, a_rev++ ) {
-      arc_forward *af;
-      arc_reverse *ar;
-      node *from;
-      INTEGER shift = 0, shift_new;
-      captype r_cap=0, r_rev_cap=0, r_cap_new, r_rev_cap_new;
-
-      if (!(from=(node *)(a_rev->sister))) continue;
-      af = a_for;
-      ar = a_rev;
-
-      do {
-        ar -> sister = NULL;
-
-        shift_new = ((char *)(af->shift)) - (char *)from;
-        r_cap_new = af -> r_cap;
-        r_rev_cap_new = af -> r_rev_cap;
-        if (shift) {
-          af -> shift = shift;
-          af -> r_cap = r_cap;
-          af -> r_rev_cap = r_rev_cap;
-        }
-        shift = shift_new;
-        r_cap = r_cap_new;
-        r_rev_cap = r_rev_cap_new;
-
-        af = -- from -> first_out;
-        if ((arc_reverse *)(from->parent) != a_rev_tmp) {
-          from -> parent = (arc_forward *)(((arc_reverse *)(from -> parent)) - 1);
-          ar = (arc_reverse *)(from -> parent);
-        }
-      } while ( (from=(node *)(ar->sister)) );
-
-      af -> shift = shift;
-      af -> r_cap = r_cap;
-      af -> r_rev_cap = r_rev_cap;
-    }
-
-  for (ab_for=arc_for_block_first; ab_for; ab_for=ab_for->next) {
-    i = ab_for -> last_node;
-    a_for = i -> first_out;
-    ab_for -> current -> shift     = a_for -> shift;
-    ab_for -> current -> r_cap     = a_for -> r_cap;
-    ab_for -> current -> r_rev_cap = a_for -> r_rev_cap;
-    a_for -> shift = POINTER_TO_INTEGER(ab_for -> current + 1);
-    i -> first_out = (arc_forward *) (((char *)a_for) - 1);
-  }
-
-  /* THIRD STAGE */
-  for (ab_rev=arc_rev_block_first; ab_rev; ab_rev=ab_rev->next) {
-    ab_rev -> current = ab_rev -> last_node -> first_in;
-  }
-
-  for (nb=node_block_first; nb; nb=nb->next)
-    for (i=&nb->nodes[0]; i<nb->current; i++) {
-      arc_forward *a_for_first, *a_for_last;
-
-      a_for_first = i -> first_out;
-      if (IS_ODD(a_for_first)) {
-        a_for_first = (arc_forward *) (((char *)a_for_first) + 1);
-        a_for_last = (arc_forward *) ((a_for_first ++) -> shift);
-      } else a_for_last = (i + 1) -> first_out;
-
-      for (a_for=a_for_first; a_for<a_for_last; a_for++) {
-        node *to = NEIGHBOR_NODE(i, a_for -> shift);
-        a_rev = -- to -> first_in;
-        a_rev -> sister = a_for;
-      }
-    }
-
-  for (ab_rev=arc_rev_block_first; ab_rev; ab_rev=ab_rev->next) {
-    i = ab_rev -> last_node;
-    a_rev = i -> first_in;
-    ab_rev -> current -> sister = a_rev -> sister;
-    a_rev -> sister = (arc_forward *) (ab_rev -> current + 1);
-    i -> first_in = (arc_reverse *) (((char *)a_rev) - 1);
-  }
-  delete a_rev_tmp;
-}
-
-/* maxflow.cpp */
-
-//#include <stdio.h>
-//#include "graph.h"
-
-/*
-	special constants for node->parent
-*/
-#define TERMINAL ( (arc_forward *) 1 )		/* to terminal */
-#define ORPHAN   ( (arc_forward *) 2 )		/* orphan */
-
-#define INFINITE_D 1000000000		/* infinite distance to the terminal */
-
-/***********************************************************************/
-
-/*
-	Functions for processing active list.
-	i->next points to the next node in the list
-	(or to i, if i is the last node in the list).
-	If i->next is NULL iff i is not in the list.
-
-	There are two queues. Active nodes are added
-	to the end of the second queue and read from
-	the front of the first queue. If the first queue
-	is empty, it is replaced by the second queue
-	(and the second queue becomes empty).
-*/
-
-inline void Graph::set_active(node *i)
-{
-  if (!i->next) {
-    /* it's not in the list yet */
-    if (queue_last[1]) queue_last[1] -> next = i;
-    else               queue_first[1]        = i;
-    queue_last[1] = i;
-    i -> next = i;
-  }
-}
-
-/*
-	Returns the next active node.
-	If it is connected to the sink, it stays in the list,
-	otherwise it is removed from the list
-*/
-inline Graph::node * Graph::next_active()
-{
-  node *i;
-
-  while ( 1 ) {
-    if (!(i=queue_first[0])) {
-      queue_first[0] = i = queue_first[1];
-      queue_last[0]  = queue_last[1];
-      queue_first[1] = NULL;
-      queue_last[1]  = NULL;
-      if (!i) return NULL;
-    }
-
-    /* remove it from the active list */
-    if (i->next == i) queue_first[0] = queue_last[0] = NULL;
-    else              queue_first[0] = i -> next;
-    i -> next = NULL;
-
-    /* a node in the list is active iff it has a parent */
-    if (i->parent) return i;
-  }
-}
-
-/***********************************************************************/
-
-inline void Graph::maxflow_init()
-{
-  node *i;
-  node_block *nb;
-
-  queue_first[0] = queue_last[0] = NULL;
-  queue_first[1] = queue_last[1] = NULL;
-  orphan_first = NULL;
-
-  for (nb=node_block_first; nb; nb=nb->next)
-    for (i=&nb->nodes[0]; i<nb->current; i++) {
-      i -> next = NULL;
-      i -> TS = 0;
-      if (i->tr_cap > 0) {
-        /* i is connected to the source */
-        i -> is_sink = 0;
-        i -> parent = TERMINAL;
-        set_active(i);
-        i -> TS = 0;
-        i -> DIST = 1;
-      } else if (i->tr_cap < 0) {
-        /* i is connected to the sink */
-        i -> is_sink = 1;
-        i -> parent = TERMINAL;
-        set_active(i);
-        i -> TS = 0;
-        i -> DIST = 1;
-      } else {
-        i -> parent = NULL;
-      }
-    }
-  TIME = 0;
-}
-
-/***********************************************************************/
-
-inline void Graph::augment(node *s_start, node *t_start, captype *cap_middle,
-                           captype *rev_cap_middle)
-{
-  node *i;
-  arc_forward *a;
-  captype bottleneck;
-  nodeptr *np;
-
-
-  /* 1. Finding bottleneck capacity */
-  /* 1a - the source tree */
-  bottleneck = *cap_middle;
-  for (i=s_start; ; ) {
-    a = i -> parent;
-    if (a == TERMINAL) break;
-    if (IS_ODD(a)) {
-      a = MAKE_EVEN(a);
-      if (bottleneck > a->r_cap) bottleneck = a -> r_cap;
-      i = NEIGHBOR_NODE_REV(i, a -> shift);
-    } else {
-      if (bottleneck > a->r_rev_cap) bottleneck = a -> r_rev_cap;
-      i = NEIGHBOR_NODE(i, a -> shift);
-    }
-  }
-  if (bottleneck > i->tr_cap) bottleneck = i -> tr_cap;
-  /* 1b - the sink tree */
-  for (i=t_start; ; ) {
-    a = i -> parent;
-    if (a == TERMINAL) break;
-    if (IS_ODD(a)) {
-      a = MAKE_EVEN(a);
-      if (bottleneck > a->r_rev_cap) bottleneck = a -> r_rev_cap;
-      i = NEIGHBOR_NODE_REV(i, a -> shift);
-    } else {
-      if (bottleneck > a->r_cap) bottleneck = a -> r_cap;
-      i = NEIGHBOR_NODE(i, a -> shift);
-    }
-  }
-  if (bottleneck > - i->tr_cap) bottleneck = - i -> tr_cap;
-
-
-  /* 2. Augmenting */
-  /* 2a - the source tree */
-  *rev_cap_middle += bottleneck;
-  *cap_middle -= bottleneck;
-  for (i=s_start; ; ) {
-    a = i -> parent;
-    if (a == TERMINAL) break;
-    if (IS_ODD(a)) {
-      a = MAKE_EVEN(a);
-      a -> r_rev_cap += bottleneck;
-      a -> r_cap -= bottleneck;
-      if (!a->r_cap) {
-        /* add i to the adoption list */
-        i -> parent = ORPHAN;
-        np = nodeptr_block -> New();
-        np -> ptr = i;
-        np -> next = orphan_first;
-        orphan_first = np;
-      }
-      i = NEIGHBOR_NODE_REV(i, a -> shift);
-    } else {
-      a -> r_cap += bottleneck;
-      a -> r_rev_cap -= bottleneck;
-      if (!a->r_rev_cap) {
-        /* add i to the adoption list */
-        i -> parent = ORPHAN;
-        np = nodeptr_block -> New();
-        np -> ptr = i;
-        np -> next = orphan_first;
-        orphan_first = np;
-      }
-      i = NEIGHBOR_NODE(i, a -> shift);
-    }
-  }
-  i -> tr_cap -= bottleneck;
-  if (!i->tr_cap) {
-    /* add i to the adoption list */
-    i -> parent = ORPHAN;
-    np = nodeptr_block -> New();
-    np -> ptr = i;
-    np -> next = orphan_first;
-    orphan_first = np;
-  }
-  /* 2b - the sink tree */
-  for (i=t_start; ; ) {
-    a = i -> parent;
-    if (a == TERMINAL) break;
-    if (IS_ODD(a)) {
-      a = MAKE_EVEN(a);
-      a -> r_cap += bottleneck;
-      a -> r_rev_cap -= bottleneck;
-      if (!a->r_rev_cap) {
-        /* add i to the adoption list */
-        i -> parent = ORPHAN;
-        np = nodeptr_block -> New();
-        np -> ptr = i;
-        np -> next = orphan_first;
-        orphan_first = np;
-      }
-      i = NEIGHBOR_NODE_REV(i, a -> shift);
-    } else {
-      a -> r_rev_cap += bottleneck;
-      a -> r_cap -= bottleneck;
-      if (!a->r_cap) {
-        /* add i to the adoption list */
-        i -> parent = ORPHAN;
-        np = nodeptr_block -> New();
-        np -> ptr = i;
-        np -> next = orphan_first;
-        orphan_first = np;
-      }
-      i = NEIGHBOR_NODE(i, a -> shift);
-    }
-  }
-  i -> tr_cap += bottleneck;
-  if (!i->tr_cap) {
-    /* add i to the adoption list */
-    i -> parent = ORPHAN;
-    np = nodeptr_block -> New();
-    np -> ptr = i;
-    np -> next = orphan_first;
-    orphan_first = np;
-  }
-
-
-  flow += bottleneck;
-}
-
-/***********************************************************************/
-
-inline void Graph::process_source_orphan(node *i)
-{
-  node *j;
-  arc_forward *a0_for, *a0_for_first, *a0_for_last;
-  arc_reverse *a0_rev, *a0_rev_first, *a0_rev_last;
-  arc_forward *a0_min = NULL, *a;
-  nodeptr *np;
-  int d, d_min = INFINITE_D;
-
-  /* trying to find a new parent */
-  a0_for_first = i -> first_out;
-  if (IS_ODD(a0_for_first)) {
-    a0_for_first = (arc_forward *) (((char *)a0_for_first) + 1);
-    a0_for_last = (arc_forward *) ((a0_for_first ++) -> shift);
-  } else a0_for_last = (i + 1) -> first_out;
-  a0_rev_first = i -> first_in;
-  if (IS_ODD(a0_rev_first)) {
-    a0_rev_first = (arc_reverse *) (((char *)a0_rev_first) + 1);
-    a0_rev_last  = (arc_reverse *) ((a0_rev_first ++) -> sister);
-  } else a0_rev_last = (i + 1) -> first_in;
-
-
-  for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++)
-    if (a0_for->r_rev_cap) {
-      j = NEIGHBOR_NODE(i, a0_for -> shift);
-      if (!j->is_sink && (a=j->parent)) {
-        /* checking the origin of j */
-        d = 0;
-        while ( 1 ) {
-          if (j->TS == TIME) {
-            d += j -> DIST;
-            break;
-          }
-          a = j -> parent;
-          d ++;
-          if (a==TERMINAL) {
-            j -> TS = TIME;
-            j -> DIST = 1;
-            break;
-          }
-          if (a==ORPHAN) {
-            d = INFINITE_D;
-            break;
-          }
-          if (IS_ODD(a))
-            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-          else
-            j = NEIGHBOR_NODE(j, a -> shift);
-        }
-        if (d<INFINITE_D) { /* j originates from the source - done */
-          if (d<d_min) {
-            a0_min = a0_for;
-            d_min = d;
-          }
-          /* set marks along the path */
-          for (j=NEIGHBOR_NODE(i, a0_for->shift); j->TS!=TIME; ) {
-            j -> TS = TIME;
-            j -> DIST = d --;
-            a = j->parent;
-            if (IS_ODD(a))
-              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-            else
-              j = NEIGHBOR_NODE(j, a -> shift);
-          }
-        }
-      }
-    }
-  for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
-    a0_for = a0_rev -> sister;
-    if (a0_for->r_cap) {
-      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
-      if (!j->is_sink && (a=j->parent)) {
-        /* checking the origin of j */
-        d = 0;
-        while ( 1 ) {
-          if (j->TS == TIME) {
-            d += j -> DIST;
-            break;
-          }
-          a = j -> parent;
-          d ++;
-          if (a==TERMINAL) {
-            j -> TS = TIME;
-            j -> DIST = 1;
-            break;
-          }
-          if (a==ORPHAN) {
-            d = INFINITE_D;
-            break;
-          }
-          if (IS_ODD(a))
-            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-          else
-            j = NEIGHBOR_NODE(j, a -> shift);
-        }
-        if (d<INFINITE_D) { /* j originates from the source - done */
-          if (d<d_min) {
-            a0_min = MAKE_ODD(a0_for);
-            d_min = d;
-          }
-          /* set marks along the path */
-          for (j=NEIGHBOR_NODE_REV(i,a0_for->shift); j->TS!=TIME; ) {
-            j -> TS = TIME;
-            j -> DIST = d --;
-            a = j->parent;
-            if (IS_ODD(a))
-              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-            else
-              j = NEIGHBOR_NODE(j, a -> shift);
-          }
-        }
-      }
-    }
-  }
-
-  if ( (i->parent = a0_min) ) {
-    i -> TS = TIME;
-    i -> DIST = d_min + 1;
-  } else {
-    /* no parent is found */
-    i -> TS = 0;
-
-    /* process neighbors */
-    for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++) {
-      j = NEIGHBOR_NODE(i, a0_for -> shift);
-      if (!j->is_sink && (a=j->parent)) {
-        if (a0_for->r_rev_cap) set_active(j);
-        if (a!=TERMINAL && a!=ORPHAN && IS_ODD(a)
-            && NEIGHBOR_NODE_REV(j, MAKE_EVEN(a)->shift)==i) {
-          /* add j to the adoption list */
-          j -> parent = ORPHAN;
-          np = nodeptr_block -> New();
-          np -> ptr = j;
-          if (orphan_last) orphan_last -> next = np;
-          else             orphan_first        = np;
-          orphan_last = np;
-          np -> next = NULL;
-        }
-      }
-    }
-    for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
-      a0_for = a0_rev -> sister;
-      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
-      if (!j->is_sink && (a=j->parent)) {
-        if (a0_for->r_cap) set_active(j);
-        if (a!=TERMINAL && a!=ORPHAN && !IS_ODD(a) && NEIGHBOR_NODE(j, a->shift)==i) {
-          /* add j to the adoption list */
-          j -> parent = ORPHAN;
-          np = nodeptr_block -> New();
-          np -> ptr = j;
-          if (orphan_last) orphan_last -> next = np;
-          else             orphan_first        = np;
-          orphan_last = np;
-          np -> next = NULL;
-        }
-      }
-    }
-  }
-}
-
-inline void Graph::process_sink_orphan(node *i)
-{
-  node *j;
-  arc_forward *a0_for, *a0_for_first, *a0_for_last;
-  arc_reverse *a0_rev, *a0_rev_first, *a0_rev_last;
-  arc_forward *a0_min = NULL, *a;
-  nodeptr *np;
-  int d, d_min = INFINITE_D;
-
-  /* trying to find a new parent */
-  a0_for_first = i -> first_out;
-  if (IS_ODD(a0_for_first)) {
-    a0_for_first = (arc_forward *) (((char *)a0_for_first) + 1);
-    a0_for_last = (arc_forward *) ((a0_for_first ++) -> shift);
-  } else a0_for_last = (i + 1) -> first_out;
-  a0_rev_first = i -> first_in;
-  if (IS_ODD(a0_rev_first)) {
-    a0_rev_first = (arc_reverse *) (((char *)a0_rev_first) + 1);
-    a0_rev_last  = (arc_reverse *) ((a0_rev_first ++) -> sister);
-  } else a0_rev_last = (i + 1) -> first_in;
-
-
-  for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++)
-    if (a0_for->r_cap) {
-      j = NEIGHBOR_NODE(i, a0_for -> shift);
-      if (j->is_sink && (a=j->parent)) {
-        /* checking the origin of j */
-        d = 0;
-        while ( 1 ) {
-          if (j->TS == TIME) {
-            d += j -> DIST;
-            break;
-          }
-          a = j -> parent;
-          d ++;
-          if (a==TERMINAL) {
-            j -> TS = TIME;
-            j -> DIST = 1;
-            break;
-          }
-          if (a==ORPHAN) {
-            d = INFINITE_D;
-            break;
-          }
-          if (IS_ODD(a))
-            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-          else
-            j = NEIGHBOR_NODE(j, a -> shift);
-        }
-        if (d<INFINITE_D) { /* j originates from the sink - done */
-          if (d<d_min) {
-            a0_min = a0_for;
-            d_min = d;
-          }
-          /* set marks along the path */
-          for (j=NEIGHBOR_NODE(i, a0_for->shift); j->TS!=TIME; ) {
-            j -> TS = TIME;
-            j -> DIST = d --;
-            a = j->parent;
-            if (IS_ODD(a))
-              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-            else
-              j = NEIGHBOR_NODE(j, a -> shift);
-          }
-        }
-      }
-    }
-  for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
-    a0_for = a0_rev -> sister;
-    if (a0_for->r_rev_cap) {
-      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
-      if (j->is_sink && (a=j->parent)) {
-        /* checking the origin of j */
-        d = 0;
-        while ( 1 ) {
-          if (j->TS == TIME) {
-            d += j -> DIST;
-            break;
-          }
-          a = j -> parent;
-          d ++;
-          if (a==TERMINAL) {
-            j -> TS = TIME;
-            j -> DIST = 1;
-            break;
-          }
-          if (a==ORPHAN) {
-            d = INFINITE_D;
-            break;
-          }
-          if (IS_ODD(a))
-            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-          else
-            j = NEIGHBOR_NODE(j, a -> shift);
-        }
-        if (d<INFINITE_D) { /* j originates from the sink - done */
-          if (d<d_min) {
-            a0_min = MAKE_ODD(a0_for);
-            d_min = d;
-          }
-          /* set marks along the path */
-          for (j=NEIGHBOR_NODE_REV(i,a0_for->shift); j->TS!=TIME; ) {
-            j -> TS = TIME;
-            j -> DIST = d --;
-            a = j->parent;
-            if (IS_ODD(a))
-              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
-            else
-              j = NEIGHBOR_NODE(j, a -> shift);
-          }
-        }
-      }
-    }
-  }
-
-  if ( (i->parent = a0_min) ) {
-    i -> TS = TIME;
-    i -> DIST = d_min + 1;
-  } else {
-    /* no parent is found */
-    i -> TS = 0;
-
-    /* process neighbors */
-    for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++) {
-      j = NEIGHBOR_NODE(i, a0_for -> shift);
-      if (j->is_sink && (a=j->parent)) {
-        if (a0_for->r_cap) set_active(j);
-        if (a!=TERMINAL && a!=ORPHAN && IS_ODD(a)
-            && NEIGHBOR_NODE_REV(j, MAKE_EVEN(a)->shift)==i) {
-          /* add j to the adoption list */
-          j -> parent = ORPHAN;
-          np = nodeptr_block -> New();
-          np -> ptr = j;
-          if (orphan_last) orphan_last -> next = np;
-          else             orphan_first        = np;
-          orphan_last = np;
-          np -> next = NULL;
-        }
-      }
-    }
-    for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
-      a0_for = a0_rev -> sister;
-      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
-      if (j->is_sink && (a=j->parent)) {
-        if (a0_for->r_rev_cap) set_active(j);
-        if (a!=TERMINAL && a!=ORPHAN && !IS_ODD(a) && NEIGHBOR_NODE(j, a->shift)==i) {
-          /* add j to the adoption list */
-          j -> parent = ORPHAN;
-          np = nodeptr_block -> New();
-          np -> ptr = j;
-          if (orphan_last) orphan_last -> next = np;
-          else             orphan_first        = np;
-          orphan_last = np;
-          np -> next = NULL;
-        }
-      }
-    }
-  }
-}
-
-/***********************************************************************/
-
-inline Graph::flowtype Graph::maxflow()
-{
-  node *i, *j, *current_node = NULL, *s_start, *t_start=NULL;
-  captype *cap_middle=NULL, *rev_cap_middle=NULL;
-  arc_forward *a_for, *a_for_first, *a_for_last;
-  arc_reverse *a_rev, *a_rev_first, *a_rev_last;
-  nodeptr *np, *np_next;
-
-  prepare_graph();
-  maxflow_init();
-  nodeptr_block = new DBlock<nodeptr>(NODEPTR_BLOCK_SIZE, error_function);
-
-  while ( 1 ) {
-    if ( (i=current_node) ) {
-      i -> next = NULL; /* remove active flag */
-      if (!i->parent) i = NULL;
-    }
-    if (!i) {
-      if (!(i = next_active())) break;
-    }
-
-    /* growth */
-    s_start = NULL;
-
-    a_for_first = i -> first_out;
-    if (IS_ODD(a_for_first)) {
-      a_for_first = (arc_forward *) (((char *)a_for_first) + 1);
-      a_for_last = (arc_forward *) ((a_for_first ++) -> shift);
-    } else a_for_last = (i + 1) -> first_out;
-    a_rev_first = i -> first_in;
-    if (IS_ODD(a_rev_first)) {
-      a_rev_first = (arc_reverse *) (((char *)a_rev_first) + 1);
-      a_rev_last = (arc_reverse *) ((a_rev_first ++) -> sister);
-    } else a_rev_last = (i + 1) -> first_in;
-
-    if (!i->is_sink) {
-      /* grow source tree */
-      for (a_for=a_for_first; a_for<a_for_last; a_for++)
-        if (a_for->r_cap) {
-          j = NEIGHBOR_NODE(i, a_for -> shift);
-          if (!j->parent) {
-            j -> is_sink = 0;
-            j -> parent = MAKE_ODD(a_for);
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-            set_active(j);
-          } else if (j->is_sink) {
-            s_start = i;
-            t_start = j;
-            cap_middle     = & ( a_for -> r_cap );
-            rev_cap_middle = & ( a_for -> r_rev_cap );
-            break;
-          } else if (j->TS <= i->TS &&
-                     j->DIST > i->DIST) {
-            /* heuristic - trying to make the distance from j to the source shorter */
-            j -> parent = MAKE_ODD(a_for);
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-          }
-        }
-      if (!s_start)
-        for (a_rev=a_rev_first; a_rev<a_rev_last; a_rev++) {
-          a_for = a_rev -> sister;
-          if (a_for->r_rev_cap) {
-            j = NEIGHBOR_NODE_REV(i, a_for -> shift);
-            if (!j->parent) {
-              j -> is_sink = 0;
-              j -> parent = a_for;
-              j -> TS = i -> TS;
-              j -> DIST = i -> DIST + 1;
-              set_active(j);
-            } else if (j->is_sink) {
-              s_start = i;
-              t_start = j;
-              cap_middle     = & ( a_for -> r_rev_cap );
-              rev_cap_middle = & ( a_for -> r_cap );
-              break;
-            } else if (j->TS <= i->TS &&
-                       j->DIST > i->DIST) {
-              /* heuristic - trying to make the distance from j to the source shorter */
-              j -> parent = a_for;
-              j -> TS = i -> TS;
-              j -> DIST = i -> DIST + 1;
-            }
-          }
-        }
-    } else {
-      /* grow sink tree */
-      for (a_for=a_for_first; a_for<a_for_last; a_for++)
-        if (a_for->r_rev_cap) {
-          j = NEIGHBOR_NODE(i, a_for -> shift);
-          if (!j->parent) {
-            j -> is_sink = 1;
-            j -> parent = MAKE_ODD(a_for);
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-            set_active(j);
-          } else if (!j->is_sink) {
-            s_start = j;
-            t_start = i;
-            cap_middle     = & ( a_for -> r_rev_cap );
-            rev_cap_middle = & ( a_for -> r_cap );
-            break;
-          } else if (j->TS <= i->TS &&
-                     j->DIST > i->DIST) {
-            /* heuristic - trying to make the distance from j to the sink shorter */
-            j -> parent = MAKE_ODD(a_for);
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-          }
-        }
-      for (a_rev=a_rev_first; a_rev<a_rev_last; a_rev++) {
-        a_for = a_rev -> sister;
-        if (a_for->r_cap) {
-          j = NEIGHBOR_NODE_REV(i, a_for -> shift);
-          if (!j->parent) {
-            j -> is_sink = 1;
-            j -> parent = a_for;
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-            set_active(j);
-          } else if (!j->is_sink) {
-            s_start = j;
-            t_start = i;
-            cap_middle     = & ( a_for -> r_cap );
-            rev_cap_middle = & ( a_for -> r_rev_cap );
-            break;
-          } else if (j->TS <= i->TS &&
-                     j->DIST > i->DIST) {
-            /* heuristic - trying to make the distance from j to the sink shorter */
-            j -> parent = a_for;
-            j -> TS = i -> TS;
-            j -> DIST = i -> DIST + 1;
-          }
-        }
-      }
-    }
-
-    TIME ++;
-
-    if (s_start) {
-      i -> next = i; /* set active flag */
-      current_node = i;
-
-      /* augmentation */
-      augment(s_start, t_start, cap_middle, rev_cap_middle);
-      /* augmentation end */
-
-      /* adoption */
-      while ( (np=orphan_first) ) {
-        np_next = np -> next;
-        np -> next = NULL;
-
-        while ( (np=orphan_first) ) {
-          orphan_first = np -> next;
-          i = np -> ptr;
-          nodeptr_block -> Delete(np);
-          if (!orphan_first) orphan_last = NULL;
-          if (i->is_sink) process_sink_orphan(i);
-          else            process_source_orphan(i);
-        }
-
-        orphan_first = np_next;
-      }
-      /* adoption end */
-    } else current_node = NULL;
-  }
-
-  delete nodeptr_block;
-
-  return flow;
-}
-
-/***********************************************************************/
-
-inline Graph::termtype Graph::what_segment(node_id i)
-{
-  if (((node*)i)->parent && !((node*)i)->is_sink) return SOURCE;
-  return SINK;
-}
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/boost/array_binary_tree.hpp b/3rdparty/CGAL-4.6/include/CGAL/internal/boost/array_binary_tree.hpp
deleted file mode 100644
index a3ec338..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/boost/array_binary_tree.hpp
+++ /dev/null
@@ -1,190 +0,0 @@
-//
-//=======================================================================
-// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//=======================================================================
-//
-// $URL$
-// $Id$
-//
-// NOTE: this file have been taken from boost 1.46.1 for using
-//       with Modificable_priority_queue (to enhance the 
-//       non-documented mutable_queue).
-//       original file is <boost/graph/detail/array_binary_tree.hpp>
-//
-#ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
-#define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
-
-#include <iterator>
-#include <functional>
-#include <boost/config.hpp>
-
-namespace CGAL { namespace internal {
-namespace boost_ {
-
-/*
- * Note: array_binary_tree is a completey balanced binary tree.
- */
-#if !defined BOOST_NO_STD_ITERATOR_TRAITS
-  template <class RandomAccessIterator, class ID>
-#else
-  template <class RandomAccessIterator, class ValueType, class ID>
-#endif
-class array_binary_tree_node {
-public:
-  typedef array_binary_tree_node ArrayBinaryTreeNode;
-  typedef RandomAccessIterator rep_iterator;
-#if !defined BOOST_NO_STD_ITERATOR_TRAITS
-  typedef typename std::iterator_traits<RandomAccessIterator>::difference_type
-          difference_type;
-  typedef typename std::iterator_traits<RandomAccessIterator>::value_type
-          value_type;
-#else
-  typedef int difference_type;
-  typedef ValueType value_type;
-#endif
-  typedef difference_type size_type;
-
-  struct children_type {
-    struct iterator
-        : ::boost::iterator<std::bidirectional_iterator_tag, ArrayBinaryTreeNode,
-                       difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
-    { // replace with iterator_adaptor implementation -JGS
-
-      inline iterator() : i(0), n(0) { }
-      inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { }
-      inline iterator& operator=(const iterator& x) {
-        r = x.r; i = x.i; n = x.n;
-        /*egcs generate a warning*/
-        id = x.id;
-        return *this;
-      }
-      inline iterator(rep_iterator rr,
-                      size_type ii,
-                      size_type nn,
-                      const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
-      inline array_binary_tree_node operator*() {
-        return ArrayBinaryTreeNode(r, i, n, id); }
-      inline iterator& operator++() { ++i; return *this; }
-      inline iterator operator++(int)
-        { iterator t = *this; ++(*this); return t; }
-      inline bool operator==(const iterator& x) const { return i == x.i; }
-      inline bool operator!=(const iterator& x) const
-        { return !(*this == x); }
-      rep_iterator r;
-      size_type i;
-      size_type n;
-      ID id;
-    };
-    inline children_type() : i(0), n(0) { }
-    inline children_type(const children_type& x)
-      : r(x.r), i(x.i), n(x.n), id(x.id) { }
-    inline children_type& operator=(const children_type& x) {
-      r = x.r; i = x.i; n = x.n;
-      /*egcs generate a warning*/
-      id = x.id;
-      return *this;
-    }
-    inline children_type(rep_iterator rr,
-                         size_type ii,
-                         size_type nn,
-                         const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
-    inline iterator begin() { return iterator(r, 2 * i + 1, n, id); }
-    inline iterator end() { return iterator(r, 2 * i + 1 + size(), n, id); }
-    inline size_type size() const {
-      size_type c = 2 * i + 1;
-      size_type s;
-      if      (c + 1 < n) s = 2;
-      else if (c < n)     s = 1;
-      else                s = 0;
-      return s;
-    }
-    rep_iterator r;
-    size_type i;
-    size_type n;
-    ID id;
-  };
-  inline array_binary_tree_node() : i(0), n(0) { }
-  inline array_binary_tree_node(const array_binary_tree_node& x)
-    : r(x.r), i(x.i), n(x.n), id(x.id) { }
-  inline ArrayBinaryTreeNode& operator=(const ArrayBinaryTreeNode& x) {
-    r = x.r;
-    i = x.i;
-    n = x.n;
-    /*egcs generate a warning*/
-    id = x.id;
-    return *this;
-  }
-  inline array_binary_tree_node(rep_iterator start,
-                                rep_iterator end,
-                                rep_iterator pos, const ID& _id)
-    : r(start), i(pos - start), n(end - start), id(_id) { }
-  inline array_binary_tree_node(rep_iterator rr,
-                                size_type ii,
-                                size_type nn, const ID& _id)
-    : r(rr), i(ii), n(nn), id(_id) { }
-  inline value_type& value() { return *(r + i); }
-  inline const value_type& value() const { return *(r + i); }
-  inline ArrayBinaryTreeNode parent() const {
-    return ArrayBinaryTreeNode(r, (i - 1) / 2, n, id);
-  }
-  inline bool has_parent() const { return i != 0; }
-  inline children_type children() { return children_type(r, i, n, id); }
-  /*
-  inline void swap(array_binary_tree_node x) {
-    value_type tmp = x.value();
-    x.value() = value();
-    value() = tmp;
-    i = x.i;
-  }
-  */
-  template <class ExternalData>
-  inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) {
-    using ::boost::get;
-
-    value_type tmp = x.value();
-
-    /*swap external data*/
-    edata[ get(id, tmp) ]     = i;
-    edata[ get(id, value()) ] = x.i;
-
-    x.value() = value();
-    value() = tmp;
-    i = x.i;
-  }
-   inline const children_type children() const {
-    return children_type(r, i, n);
-  }
-  inline size_type index() const { return i; }
-  rep_iterator r;
-  size_type i;
-  size_type n;
-  ID id;
-};
-
-template <class RandomAccessContainer,
-       class Compare = std::less<typename RandomAccessContainer::value_type> >
-struct compare_array_node {
-  typedef typename RandomAccessContainer::value_type value_type;
-  compare_array_node(const Compare& x) : comp(x) {}
-  compare_array_node(const compare_array_node& x) : comp(x.comp) {}
-
-  template< class node_type >
-  inline bool operator()(const node_type& x, const node_type& y) {
-    return comp(x.value(), y.value());
-  }
-
-  template< class node_type >
-  inline bool operator()(const node_type& x, const node_type& y) const {
-    return comp(x.value(), y.value());
-  }
-  Compare comp;
-};
-
-} } } //namespace CGAL::internal::boost_
-
-#endif /* CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Polyhedron_subset_extraction.h b/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Polyhedron_subset_extraction.h
deleted file mode 100644
index 7d49227..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Polyhedron_subset_extraction.h
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sebastien Loriot
-
-#ifndef CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
-#define CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
-
-#include <CGAL/Polyhedron_3.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Union_find.h>
-#include <CGAL/tuple.h>
-#include <CGAL/internal/corefinement/Polyhedron_constness_types.h>
-
-namespace CGAL {
- namespace internal{
-
-template <class Polyhedron>
-struct Compare_handle_ptr{
-  typedef typename Polyhedron::Facet_const_handle  Facet_const_handle;
-  typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
-  
-  bool operator()(Facet_const_handle f1,Facet_const_handle f2) const {
-    return &(*f1) < &(*f2);
-  }
-
-  bool operator()(Vertex_const_handle v1,Vertex_const_handle v2) const {
-    return &(*v1) < &(*v2);
-  }
-};
-
-struct Dummy_true{
-  template <class T>
-  bool operator()(T) const  {return true;}
-};
-
-template <class Polyhedron,class HDS=typename Polyhedron::HalfedgeDS>
-class Build_polyhedron_subset : public ::CGAL::Modifier_base<HDS> {
-  typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
-  typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
-  typedef typename Polyhedron::Halfedge_const_handle Halfedge_const_handle;       
-  
-  typedef typename HDS::Vertex::Point Point;
-  std::list<Vertex_const_handle> points;
-  std::list< std::vector<unsigned int> > facets;
-    
-  template <class Facet_iterator>
-  typename Polyhedron::Halfedge_const_handle get_facet_halfedge(Facet_iterator facet_it) const
-  {
-    return (*facet_it)->halfedge();
-  }
-
-  typename Polyhedron::Halfedge_const_handle get_facet_halfedge(typename Polyhedron::Facet_const_handle facet) const
-  {
-    return facet->halfedge();
-  }
-  
-public:
-  template <class Facets_const_iterator>
-  Build_polyhedron_subset(const Polyhedron&,Facets_const_iterator begin,Facets_const_iterator end) 
-  {
-    typedef std::map<Vertex_const_handle,unsigned int,Compare_handle_ptr<Polyhedron> > Vertices;
-    Vertices vertices;
-    unsigned int index=0;
-    //get vertices and get face description relatively to the restricted set of vertices
-    for (Facets_const_iterator it=begin;it!=end;++it)
-    {
-      Halfedge_const_handle start=get_facet_halfedge(it);
-      Halfedge_const_handle curr=start;
-      facets.push_back(std::vector<unsigned int>());
-      std::vector<unsigned int>& indices = facets.back();
-      do{
-        bool is_new_vertex;
-        typename Vertices::iterator it_vertex;
-        ::CGAL::cpp11::tie(it_vertex,is_new_vertex)=vertices.insert(std::make_pair(curr->vertex(),index));
-        if (is_new_vertex) {
-          ++index;
-          points.push_back(curr->vertex());
-        }
-        indices.push_back(it_vertex->second);
-        curr=curr->next();
-      }while(curr!=start);
-    }
-  }
-  
-  void operator()( HDS& hds) {
-    ::CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
-    B.begin_surface( points.size(), facets.size() );
-    for (typename std::list<Vertex_const_handle>::iterator it=points.begin();it!=points.end();++it)
-      B.add_vertex((*it)->point());
-    for (typename std::list< std::vector<unsigned int> >::iterator
-         it=facets.begin();it!=facets.end();++it)
-    {
-      B.begin_facet();
-      for (std::vector<unsigned int>::iterator it_i=it->begin();it_i!=it->end();++it_i)
-        B.add_vertex_to_facet(*it_i);
-      B.end_facet();
-    }
-    B.end_surface();
-  }
-};
-
-
-
-template <class Polyhedron,class Adjacency_criterium,class Face_to_UF_handle_map,class Result>
-void extract_connected_components(
-  Polyhedron& P,
-  const Adjacency_criterium& adjacent,
-  CGAL::Union_find<typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_handle>& uf,
-  Face_to_UF_handle_map& map_f2h,
-  Result&  result
-  )
-{
-  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_handle Facet_handle;
-  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_iterator Facet_iterator;
-  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Halfedge_handle Halfedge_handle;
-  typedef ::CGAL::Union_find<Facet_handle> UF;
-  typedef typename UF::handle UF_handle;
-  typedef typename UF::iterator UF_iterator;
-
-//init union-find: each facet is in its own set  
-  for (Facet_iterator it=P.facets_begin();it!=P.facets_end();++it){
-    map_f2h.insert(std::make_pair(it,uf.make_set(it)));
-  }
-//merge 2 facets if they share a common edge  
-  for (Facet_iterator it=P.facets_begin();it!=P.facets_end();++it){
-    Facet_handle facet=it;
-    
-    UF_handle current=map_f2h.find(it)->second;
-    std::vector<Halfedge_handle> neighbors;
-    Halfedge_handle hedge=facet->halfedge();
-    do
-    {
-      neighbors.push_back( hedge->opposite() );
-      hedge=hedge->next();
-    }
-    while(hedge!=facet->halfedge());
-
-    std::size_t nb_edges=neighbors.size();
-    for (std::size_t i=0;i<nb_edges;++i){
-      if ( neighbors[i]->is_border() ) continue;
-      UF_handle neigh=map_f2h.find(neighbors[i]->facet())->second;
-      if ( adjacent(neighbors[i]) && !uf.same_set(current,neigh) ){
-        uf.unify_sets(current,neigh);
-      }
-    }
-  }
-  
-//recover merged sets
-  for (UF_iterator it=uf.begin();it!=uf.end();++it){
-    UF_handle master=uf.find(it);
-    result[*master].push_back(*it);
-  }
-}
-
-template <class Polyhedron,class Adjacency_criterium,class Output_iterator>
-void extract_connected_components(const Polyhedron& P,const Adjacency_criterium& adjacent,Output_iterator out)
-{
-  typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
-  typedef ::CGAL::Union_find<Facet_const_handle> UF;
-  typedef typename UF::handle UF_handle;
-  typedef std::map<Facet_const_handle,std::list<Facet_const_handle>,Compare_handle_ptr<Polyhedron> > Result;
-  typedef std::map<Facet_const_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
-  
-  UF uf;
-  Facet_to_handle_map map_f2h;
-  Result result;
-  
-  extract_connected_components(P,adjacent,uf,map_f2h,result);
-  
-  for (typename Result::iterator it=result.begin();it!=result.end();++it)
-  {
-    typedef std::list<Facet_const_handle> Facets;
-    const Facets& facets=it->second;
-    Polyhedron new_poly;
-    Build_polyhedron_subset<Polyhedron> modifier(new_poly,facets.begin(),facets.end());
-    new_poly.delegate(modifier);
-    *out++=new_poly;
-  }
-}
-
-template <class Polyhedron, class Adjacency_criterium, class Face_marker>
-void mark_connected_components(Polyhedron& P, const Adjacency_criterium& adjacent, Face_marker& face_marker)
-{
-  typedef typename Polyhedron::Facet_handle Facet_handle;
-  typedef ::CGAL::Union_find<Facet_handle> UF;
-  typedef typename UF::handle UF_handle;
-  typedef std::map<Facet_handle,std::list<Facet_handle>,Compare_handle_ptr<Polyhedron> > Result;
-  typedef std::map<Facet_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
-  
-  UF uf;
-  Facet_to_handle_map map_f2h;
-  Result result;
-  
-  extract_connected_components(P,adjacent,uf,map_f2h,result);
-  
-  for (typename Result::iterator it=result.begin();it!=result.end();++it)
-  {
-    face_marker.start_new_connected_component();
-    typedef std::list<Facet_handle> Facets;
-    const Facets& facets=it->second;
-    face_marker.mark(facets.begin(),facets.end());
-  }
-}
-
-template <class Polyhedron, class Adjacency_criterium, class Face_marker, class OutputIterator>
-OutputIterator
-mark_connected_components(Polyhedron& P, const Adjacency_criterium& adjacent, Face_marker& face_marker, OutputIterator out)
-{
-  typedef typename Polyhedron::Facet_handle Facet_handle;
-  typedef ::CGAL::Union_find<Facet_handle> UF;
-  typedef typename UF::handle UF_handle;
-  typedef std::map<Facet_handle,std::list<Facet_handle>,Compare_handle_ptr<Polyhedron> > Result;
-  typedef std::map<Facet_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
-
-  UF uf;
-  Facet_to_handle_map map_f2h;
-  Result result;
-
-  extract_connected_components(P,adjacent,uf,map_f2h,result);
-
-  for (typename Result::iterator it=result.begin();it!=result.end();++it)
-  {
-    face_marker.start_new_connected_component();
-    typedef std::list<Facet_handle> Facets;
-    const Facets& facets=it->second;
-    face_marker.mark(facets.begin(),facets.end());
-    *out++=*facets.begin();
-  }
-  return out;
-}
-
-template <class Polyhedron,class Output_iterator>
-void extract_connected_components(const Polyhedron& P,Output_iterator out)
-{
-  extract_connected_components(P,Dummy_true(),out);
-}
-
-} } //namespace CGAL::internal
-
-#endif //CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3.h b/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3.h
deleted file mode 100644
index 4f4159d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3.h
+++ /dev/null
@@ -1,1999 +0,0 @@
-// Copyright (c) 2010-2012 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Sebastien Loriot
-
-#ifndef CGAL_INTERSECTION_OF_POLYHEDRA_3_H
-#define CGAL_INTERSECTION_OF_POLYHEDRA_3_H
-
-#define CGAL_CMAP_DEPRECATED 1
-
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Cartesian_converter.h>
-#include <CGAL/box_intersection_d.h>
-#include <CGAL/Bbox_3.h>
-#include <CGAL/intersections.h>
-
-#include <boost/next_prior.hpp>
-#include <set>
-#include <vector>
-#include <list>
-#include <algorithm>
-#include <CGAL/tuple.h>
-#include <CGAL/iterator.h>
-
-#include <CGAL/Modifier_base.h>
-#include <CGAL/internal/corefinement/Polyhedron_constness_types.h>
-#include <CGAL/internal/corefinement/intersection_triangle_segment_3.h>
-#include <CGAL/internal/corefinement/intersection_coplanar_triangles_3.h>
-#include <CGAL/use.h>
-
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-
-#ifdef CGAL_COREFINEMENT_DEBUG
-#warning look at CGAL/Mesh_3/Robust_intersection_traits.h and the statically filtered decision tree
-#endif
-
-namespace CGAL{
-
-//This functor computes the pairwise intersection of polyhedral surfaces.
-//Intersection are given as a set of polylines
-//The algorithm works as follow:
-//From each polyhedral surface we can get it as a set of segments or as a set of triangles.
-//We first use Box_intersection_d to filter intersection between all polyhedral
-//surface segments and polyhedral triangles.
-//From this filtered set, for each pair (segment,triangle), we look at the
-//intersection type. If not empty, we can have three different cases
-//  1)the segment intersect the interior of the triangle:
-//        We compute the intersection point and for each triangle incident
-//        to the segment, we write the fact that the point belong to the intersection
-//        of these two triangles.
-//  2)the segment intersect the triangle on an edge
-//        We do the same thing as described above but
-//        for all triangle incident to the edge intersected
-//  3)the segment intersect the triangle at a vertex
-//        for each edge incident to the vertex, we do
-//        the same operations as in 2)
-//
-//In case the segment intersect the triangle at one of the segment endpoint,  
-//we repeat the same procedure for each segment incident to this
-//endpoint.
-//
-//Note that given a pair (segment,triangle)=(S,T), if S belongs 
-//to the plane of T, we have nothing to do in the following cases:
-//  -- no triangle T' contains S such that T and T' are coplanar
-//  -- at least one triangle contains S
-// Indeed, the intersection points of S and T will be found using segments
-// of T or segments adjacent to S.
-//
-// -- Sebastien Loriot, 2010/04/07
-
-namespace internal_IOP {
-  //an enum do decide which kind of intersection points are needed
-  struct No_predicates_on_constructions{};
-  struct Predicates_on_constructions{};
-} // namespace internal_IOP
-
-template<class Polyhedron>
-struct Empty_node_visitor{
-  typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle;
-  void new_node_added(int,internal_IOP::Intersection_type,Halfedge_handle,Halfedge_handle,bool,bool){}
-  template<class Iterator>
-  void annotate_graph(Iterator,Iterator){}
-  void update_terminal_nodes(std::vector<bool>&){}
-  void set_number_of_intersection_points_from_coplanar_facets(int){};
-  void add_filtered_intersection(Halfedge_handle,Halfedge_handle,const Polyhedron&,const Polyhedron&){}
-  void start_new_polyline(int,int){}
-  void add_node_to_polyline(int){}
-  void new_input_polyhedron(const Polyhedron&){}
-  template<class T>
-  void finalize(T&){}
-  typedef internal_IOP::No_predicates_on_constructions Node_storage_type;
-  typedef Tag_true Is_polyhedron_const;
-  static const bool do_need_vertex_graph = false;
-};
-
-namespace internal_IOP{
-  
-template <class Polyhedron,class Is_const>
-struct Compare_handles{
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge_handle   Halfedge_handle;
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge          Halfedge;
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Vertex            Vertex;
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet             Facet;
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet_handle      Facet_handle;
-  typedef std::pair<const Vertex*,const Vertex*>                            Vertex_handle_pair;
-  
-  static inline Vertex_handle_pair 
-  make_sorted_pair_of_vertices(Halfedge_handle h) {
-    const Vertex* v1=&(* h->vertex() );
-    const Vertex* v2=&(* h->opposite()->vertex() );
-    if ( v1 < v2 )
-      return Vertex_handle_pair(v1,v2);
-    return Vertex_handle_pair(v2,v1);
-  }
-  
-  bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
-    Vertex_handle_pair p1=make_sorted_pair_of_vertices(h1);
-    Vertex_handle_pair p2=make_sorted_pair_of_vertices(h2);
-    return  p1 < p2; 
-  }
-  
-  bool operator()(Facet_handle f1,Facet_handle f2) const {
-    return &(*f1) < &(*f2);
-  }
-  
-  bool operator()(const std::pair<Halfedge_handle,Polyhedron*>& p1, const std::pair<Halfedge_handle,Polyhedron*>& p2) const{
-    Halfedge* h1= (std::min) ( &(*(p1.first)), &(*(p1.first->opposite())) );
-    Halfedge* h2= (std::min) ( &(*(p2.first)), &(*(p2.first->opposite())) );
-    return h1<h2;
-  }
-};
-
-//could not put it in the above struct (gcc complains about an ambiguous call)
-template <class Polyhedron,class Is_const>
-struct Compare_handle_pairs{
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet             Facet;
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet_handle      Facet_handle;  
-  typedef std::pair<Facet_handle,Facet_handle>                              Facet_pair;
-  typedef std::pair<Facet_pair,int>                                         Facet_pair_and_int;
-  
-  bool operator()(const Facet_pair& p1, const Facet_pair& p2) const{
-    Facet* f1=&(*p1.first);
-    Facet* f2=&(*p2.first);
-    if (f1==f2){
-      f1=&(*p1.second);
-      f2=&(*p2.second);
-    }
-    return f1<f2;
-  }
-
-  bool operator()(const Facet_pair_and_int& p1, const Facet_pair_and_int& p2) const{
-    Facet* f1=&(*p1.first.first);
-    Facet* f2=&(*p2.first.first);
-    if (f1==f2){
-      f1=&(*p1.first.second);
-      f2=&(*p2.first.second);
-    }
-    if (f1<f2) return true;
-    if (f1>f2) return false;
-    return p1.second<p2.second;
-  }
-};
-
-template<class Polyhedron,class Nodes_vector,class Is_const>
-struct Order_along_a_halfedge{
-  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge_handle Halfedge_handle;
-  const Nodes_vector& nodes;
-  Halfedge_handle hedge;
-  
-  Order_along_a_halfedge(Halfedge_handle hedge_,const Nodes_vector& nodes_):nodes(nodes_),hedge(hedge_){}
-  bool operator()(int i,int j) const {
-    //returns true, iff q lies strictly between p and r.
-    typename Nodes_vector::Protector p;
-    try{
-      CGAL::internal::use(p);
-
-      return CGAL::collinear_are_strictly_ordered_along_line(nodes.to_interval(hedge->vertex()->point()),
-                                                             nodes.interval_node(j),
-                                                             nodes.interval_node(i));
-    }
-    catch(CGAL::Uncertain_conversion_exception&){
-      return CGAL::collinear_are_strictly_ordered_along_line(nodes.to_exact(hedge->vertex()->point()),
-                                                             nodes.exact_node(j),
-                                                             nodes.exact_node(i));      
-    }
-  }
-};
-
-
-template <class HDS>
-class Split_halfedge_at_point : public CGAL::Modifier_base<HDS> {
-  typedef typename HDS::Halfedge_handle Halfedge_handle;
-  typedef typename HDS::Vertex_handle   Vertex_handle;
-  typedef typename HDS::Vertex          Vertex;
-  Halfedge_handle hedge;
-  Vertex          vertex;
-  
-  typename HDS::Halfedge::Base*
-  unlock_halfedge(Halfedge_handle h){
-    return static_cast<typename HDS::Halfedge::Base*>(&(*h));
-  }
-  
-public:
-  
-  template <class Point_3>
-  Split_halfedge_at_point( Halfedge_handle h,const Point_3& point):hedge(h),vertex(point){}
-
-  //   new_hedge    hedge
-  //  ----------->   ----------->
-  //               v
-  //  <-----------   <-----------
-  //   new_opposite     opposite 
-  //  
-  void operator()( HDS& hds) {
-    
-    Vertex_handle v=hds.vertices_push_back(vertex);
-    Halfedge_handle opposite=hedge->opposite();
-    
-    Halfedge_handle new_hedge=hds.edges_push_back(*hedge);
-    Halfedge_handle new_opposite=new_hedge->opposite();
-    
-    //update next relations
-    unlock_halfedge(new_hedge)->set_next(hedge);
-    unlock_halfedge(new_hedge->prev())->set_next(new_hedge);
-    unlock_halfedge(hedge)->set_prev(new_hedge);
-
-    unlock_halfedge(opposite)->set_next(new_opposite);
-    unlock_halfedge(new_opposite)->set_prev(opposite);    
-    unlock_halfedge(new_opposite->next())->set_prev(new_opposite);
-
-    unlock_halfedge(opposite)->set_vertex(v);
-    unlock_halfedge(new_hedge)->set_vertex(v);
-
-    v->set_halfedge(new_hedge);
-    new_opposite->vertex()->set_halfedge(new_opposite);
-  }
-};
-
-
-
-} //namespace internal_IOP
-
-
-
-//WARNING THIS IS DONE ONLY FOR POLYHEDRON
-template<class Polyhedron,class Halfedge_predicate,
-         class Set_vertex_corner, class Kernel=typename Polyhedron::Traits::Kernel>
-class Node_visitor_for_polyline_split{
-//typedefs  
-  typedef typename Polyhedron::Halfedge_handle                         Halfedge_handle;
-  typedef typename Polyhedron::Halfedge                                Halfedge;
-  typedef typename Polyhedron::Vertex_handle                           Vertex_handle;
-  //Info stores information about a particular intersection on an
-  //edge or a vertex of a polyhedron. The two first elements in 
-  //the template describe the intersected simplex of the considered 
-  //polyhedron; the two last elements describe the element of the 
-  //second polyhedron (can be either a vertex, an edge of a facet)
-  //involved in the intersection
-  typedef CGAL::cpp11::tuple<internal_IOP::Intersection_type,
-                             Halfedge_handle,
-                             internal_IOP::Intersection_type,
-                             Halfedge_handle>                          Info;
-  typedef std::map<Halfedge*,Polyhedron*>                              Hedge_to_polyhedron_map;
-  typedef std::vector<Info>                                            Infos;
-  typedef std::map<int,Infos >                                         Node_to_infos_map;
-//data members
-  Node_to_infos_map   node_infos;
-  Hedge_to_polyhedron_map hedge_to_polyhedron;
-  Halfedge_predicate is_on_polyline;
-  Set_vertex_corner set_as_corner;
-//functions  
-  void handle_principal_edge(int node_id,
-                             internal_IOP::Intersection_type type,
-                             Halfedge_handle principal_edge,
-                             Halfedge_handle additional_edge,
-                             bool is_vertex_coplanar,
-                             bool is_vertex_opposite_coplanar)
-  {
-    bool coplanar_v=false;
-    if (is_vertex_coplanar) coplanar_v=true;
-    else if (is_vertex_opposite_coplanar){
-      principal_edge=principal_edge->opposite();
-      coplanar_v=true;
-    }
-    
-    if (coplanar_v)
-      handle_on_vertex(node_id,principal_edge,type,additional_edge);
-    else{
-      if ( is_on_polyline(principal_edge) ){
-        typename Node_to_infos_map::iterator it_res=
-          node_infos.insert(std::make_pair(node_id,Infos())).first; 
-          it_res->second.push_back( Info(internal_IOP::EDGE,principal_edge,type,additional_edge) );
-      }
-    }
-  }
-  
-  void handle_on_vertex(int node_id,Halfedge_handle edge,internal_IOP::Intersection_type type,Halfedge_handle additional_edge){
-    Halfedge_handle current=edge;
-    do{
-      if (is_on_polyline(current)){
-        typename Node_to_infos_map::iterator it_res=
-          node_infos.insert(std::make_pair(node_id,Infos())).first; 
-          it_res->second.push_back( Info(internal_IOP::VERTEX,current,type,additional_edge) );        
-        break;
-      }
-      current=current->next()->opposite();
-    }
-    while(current!=edge);    
-  }
-  
-  Halfedge* make_unique_key(Halfedge_handle h){
-    if (&(*h) < &(*h->opposite()))
-      return &(*h);
-    else
-      return &(*h->opposite());
-  }
-  
-  //   new_hedge    hedge
-  //  ----------->   ----------->
-  //               v
-  //  <-----------   <-----------
-  //   new_opposite     opposite 
-  //  
-  void split_edge_and_retriangulate(Halfedge_handle hedge,const typename Kernel::Point_3& point,Polyhedron& P){
-    internal_IOP::Split_halfedge_at_point<typename Polyhedron::HalfedgeDS> delegated(hedge,point);
-    P.delegate( delegated );
-    CGAL_assertion(P.is_valid());
-    //triangulate the two adjacent facets
-    if (!hedge->is_border())
-      P.split_facet(hedge->prev(),hedge->next());
-    if (!hedge->opposite()->is_border())
-      P.split_facet(hedge->opposite(),hedge->opposite()->next()->next());
-    CGAL_assertion(P.is_valid());
-  }
-
-  //sort node ids so that we can split the hedge
-  //consecutively
-  template <class Nodes_vector>
-  void sort_vertices_along_hedge(std::vector<int>& node_ids,Halfedge_handle hedge,const Nodes_vector& nodes)
-  {
-    std::sort(node_ids.begin(),
-              node_ids.end(),
-              internal_IOP::Order_along_a_halfedge<Polyhedron,Nodes_vector,Is_polyhedron_const>(hedge,nodes)
-    );
-  }
-  
-public:
-  static const bool do_need_vertex_graph = false;  
-  typedef internal_IOP::Predicates_on_constructions  Node_storage_type;  
-  typedef Tag_false Is_polyhedron_const;
-
-  Node_visitor_for_polyline_split(){}
-  Node_visitor_for_polyline_split(const Halfedge_predicate& getting,
-                                  const Set_vertex_corner& setting)
-    :is_on_polyline(getting),set_as_corner(setting){}
-
-  void new_node_added(int node_id,
-                      internal_IOP::Intersection_type type,
-                      Halfedge_handle principal_edge,
-                      Halfedge_handle additional_edge,
-                      bool is_vertex_coplanar,
-                      bool is_vertex_opposite_coplanar)
-  {
-    switch(type)
-    {
-      case internal_IOP::FACET: //Facet intersected by an edge
-        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
-        break;
-      case internal_IOP::EDGE: //Edge intersected by an edge
-        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
-        if ( is_on_polyline(additional_edge) ){
-          typename Node_to_infos_map::iterator it_res=
-            node_infos.insert(std::make_pair(node_id,Infos())).first; 
-            it_res->second.push_back( Info(type,additional_edge,
-                                           ( is_vertex_coplanar||is_vertex_opposite_coplanar ) ? internal_IOP::VERTEX:internal_IOP::EDGE,
-                                           is_vertex_opposite_coplanar?principal_edge->opposite():principal_edge) );
-        }
-        break;
-      case internal_IOP::VERTEX://Vertex intersected by an edge
-        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
-        handle_on_vertex( node_id,additional_edge,
-                          ( is_vertex_coplanar||is_vertex_opposite_coplanar ) ? internal_IOP::VERTEX:internal_IOP::EDGE,
-                          is_vertex_opposite_coplanar?principal_edge->opposite():principal_edge);
-        break;
-      default:
-        break;
-    }
-  }
-  
-  template<class Iterator>
-  void annotate_graph(Iterator begin,Iterator end){
-    for(Iterator it=begin;it!=end;++it){
-      typename Node_to_infos_map::iterator it_res=node_infos.find(it->first);
-      if (it_res!=node_infos.end())
-        it->second.make_terminal();
-    }
-  }
-  
-  void update_terminal_nodes(std::vector<bool>& terminal_bools){
-    for (typename Node_to_infos_map::iterator it=node_infos.begin();it!=node_infos.end();++it){
-      terminal_bools[it->first]=true;
-    }
-  }
-  
-  void new_input_polyhedron(const Polyhedron&){}
-  void start_new_polyline(int,int){}
-  void add_node_to_polyline(int){}
-  void set_number_of_intersection_points_from_coplanar_facets(int){}
-  
-  void add_filtered_intersection(Halfedge_handle eh,Halfedge_handle fh,Polyhedron& Pe,Polyhedron& Pf){
-    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(eh),&Pe));
-    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh),&Pf));
-    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh->next()),&Pf));
-    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh->next()->next()),&Pf));
-  }
-    
-  //split_halfedges
-  template <class Nodes_vector>
-  void finalize(const Nodes_vector& nodes){
-    typedef std::map<std::pair<Halfedge_handle,Polyhedron*>,
-                     std::vector<int>,internal_IOP::Compare_handles<Polyhedron,Is_polyhedron_const> >  Halfedges_to_split;
-    
-    Halfedges_to_split halfedges_to_split;
-    
-    for (typename Node_to_infos_map::iterator it=node_infos.begin();it!=node_infos.end();++it){
-      int node_id=it->first;
-      const Infos& infos=it->second;
-      std::map<Polyhedron*,std::vector<Halfedge_handle> > hedges_to_split;
-      
-      //collect information about halfedge to split
-      typename Infos::const_iterator it_info=infos.begin();
-      for (;it_info!=infos.end();++it_info)
-      {
-        typename Hedge_to_polyhedron_map::iterator  it_poly=
-          hedge_to_polyhedron.find(make_unique_key(CGAL::cpp11::get<1>(*it_info)));
-        CGAL_assertion(it_poly!=hedge_to_polyhedron.end());
-        //associate information to an intersection point:
-        //we give which simplex of the other polyhedron intersect the simplex considered
-        set_as_corner.add_info_to_node(node_id,it_poly->second,*it_info);
-        switch(CGAL::cpp11::get<0>(*it_info))
-        {
-          case internal_IOP::EDGE:
-          {
-            halfedges_to_split.insert(
-              std::make_pair( std::make_pair(CGAL::cpp11::get<1>(*it_info),&(*(it_poly->second))),std::vector<int>() )
-            ).first->second.push_back(node_id);
-          break;
-          }
-          case internal_IOP::VERTEX:
-            set_as_corner(CGAL::cpp11::get<1>(*it_info)->vertex(),node_id,it_poly->second);
-          break;
-          default:
-            CGAL_assertion(false);
-            //should never be here
-        }
-      }
-    }
-    
-    
-    //do the split
-    for(typename Halfedges_to_split::iterator it=halfedges_to_split.begin();it!=halfedges_to_split.end();++it){
-      Halfedge_handle hedge=it->first.first;
-      Polyhedron* P=it->first.second;
-      std::vector<int>& node_ids=it->second;
-      
-      sort_vertices_along_hedge(node_ids,hedge,nodes);
-      for (std::vector<int>::iterator it_id=node_ids.begin();it_id!=node_ids.end();++it_id){
-        split_edge_and_retriangulate(hedge,nodes[*it_id],*P);
-        set_as_corner(hedge->opposite()->vertex(),*it_id,(Polyhedron*)(0));
-      }
-    }
-  }
-};
-
-
-namespace internal_IOP{
-  
-  template <class Polyhedron,class In_kernel,class Exact_kernel>
-  typename Exact_kernel::Point_3
-  compute_triangle_segment_intersection_point(
-    typename Polyhedron::Vertex_const_handle vh1,typename Polyhedron::Vertex_const_handle vh2,
-    typename Polyhedron::Vertex_const_handle vf1,typename Polyhedron::Vertex_const_handle vf2,typename Polyhedron::Vertex_const_handle vf3,
-    const Exact_kernel& ek)       
-  {
-    CGAL::Cartesian_converter<In_kernel,Exact_kernel> to_exact;
-    typename Exact_kernel::Triangle_3 t(to_exact( vf1->point() ),
-                                        to_exact( vf2->point() ),
-                                        to_exact( vf3->point() )
-    );
-    
-    typename Exact_kernel::Segment_3 s (to_exact( vh1->point() ),
-                                        to_exact( vh2->point() )
-    );
-    
-    typename Exact_kernel::Intersect_3 exact_intersect=ek.intersect_3_object();
-    CGAL::Object inter=exact_intersect(t,s);
-    CGAL_assertion(CGAL::do_intersect(t,s));
-    const typename Exact_kernel::Point_3* e_pt=CGAL::object_cast<typename Exact_kernel::Point_3>(&inter);
-    CGAL_assertion(e_pt!=NULL);
-    return *e_pt;
-  }
-  
-  template <class Polyhedron,class In_kernel,class Exact_kernel>
-  typename Exact_kernel::Point_3
-  compute_triangle_segment_intersection_point(
-    typename Polyhedron::Halfedge_const_handle edge,
-    typename Polyhedron::Facet_const_handle facet,
-    const Exact_kernel& ek) 
-  {
-    return compute_triangle_segment_intersection_point<Polyhedron,In_kernel,Exact_kernel>(
-            edge->vertex(),edge->opposite()->vertex(),
-            facet->halfedge()->vertex(),facet->halfedge()->next()->vertex(),facet->halfedge()->opposite()->vertex(),
-            ek);
-            
-  }    
-    
-  
-  //A class containing a vector of the intersection points.
-  //The third template parameter indicates whether an
-  //exact representation is required
-  template <class Polyhedron,class Kernel,class Node_storage,bool Has_exact_constructions=!boost::is_floating_point<typename Kernel::FT>::value>
-  class Triangle_segment_intersection_points;
-  
-  
-  //Store only the double version of the intersection points.
-  template <class Polyhedron,class Kernel>
-  class Triangle_segment_intersection_points<Polyhedron,Kernel,No_predicates_on_constructions,false>
-  {
-  //typedefs
-    typedef std::vector <typename Kernel::Point_3>             Nodes_vector;
-    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
-    typedef typename Polyhedron::Facet_const_handle            Facet_handle;
-    typedef CGAL::Exact_predicates_exact_constructions_kernel  Exact_kernel;
-    typedef CGAL::Cartesian_converter<Exact_kernel,Kernel>     Exact_to_double;    
-  //members
-    Nodes_vector nodes;
-    Exact_kernel ek;
-    Exact_to_double exact_to_double;
-  public:
-    typedef CGAL::Interval_nt<true>::Protector                 Protector;
-  
-    const typename Kernel::Point_3&
-    operator[](int i) const {
-      return nodes[i];
-    }
-    
-    const typename Kernel::Point_3& exact_node(int i) const {return nodes[i];}
-    const typename Kernel::Point_3& interval_node(int i) const {return nodes[i];}
-    const typename Kernel::Point_3& to_exact(const typename Kernel::Point_3& p) const {return p;}
-    const typename Kernel::Point_3& to_interval(const typename Kernel::Point_3& p) const {return p;}
-    
-    size_t size() const {return nodes.size();}
-    
-    //add a new node in the final graph.
-    //it is the intersection of the triangle with the segment
-    void add_new_node(Halfedge_handle edge,Facet_handle facet)
-    {
-      nodes.push_back (  exact_to_double(
-        compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,ek)
-      ));
-    }
-    
-    void add_new_node(const typename Exact_kernel::Point_3& p)
-    {
-      nodes.push_back(  exact_to_double(p) );
-    }    
-
-    void add_new_node(const typename Kernel::Point_3& p)
-    {
-      nodes.push_back(p);
-    }    
-  }; // end specialization
-     // Triangle_segment_intersection_points<Polyhedron,Kernel,No_predicates_on_constructions,false>
-
-
-  //second specializations: store an exact copy of the points so that we can answer exactly predicates
-  //FYI, it used to have two specializations (one in the case the polyhedron
-  //can be edited and on if it cannot) building exact representation on demand.
-  //In the former case, we were using facet and halfedge while in the latter
-  //triple of vertex_handle and pair of vertex_handle
-  template <class Polyhedron,class Kernel>
-  class Triangle_segment_intersection_points<Polyhedron,Kernel,Predicates_on_constructions,false>
-  {
-  //typedefs
-  public: 
-    typedef CGAL::Simple_cartesian<CGAL::Interval_nt<false> >  Ikernel;
-    typedef CGAL::Exact_predicates_exact_constructions_kernel  Exact_kernel;
-  private:
-    typedef CGAL::Cartesian_converter<Ikernel,Kernel>          Interval_to_double;
-    typedef CGAL::Cartesian_converter<Kernel,Ikernel>          Double_to_interval;
-    typedef CGAL::Cartesian_converter<Exact_kernel,Ikernel>    Exact_to_interval;
-    typedef CGAL::Cartesian_converter<Kernel,Exact_kernel>     Double_to_exact;
-  
-    typedef typename Polyhedron::Vertex_const_handle           Vertex_handle;
-    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
-    typedef typename Polyhedron::Facet_const_handle            Facet_handle; 
-    
-    typedef std::vector <Ikernel::Point_3>      Interval_nodes;
-    typedef std::vector <Exact_kernel::Point_3> Exact_nodes;
- 
-        
-  //members
-    Interval_nodes  inodes;
-    Exact_nodes enodes;
-  
-    Interval_to_double  interval_to_double;
-    Exact_to_interval   exact_to_interval;
-    Double_to_interval  double_to_interval;
-    Double_to_exact double_to_exact;
-    Exact_kernel        ek;
-    
-  public:
-    typedef CGAL::Interval_nt<false>::Protector                 Protector;  
-  
-    typename Kernel::Point_3
-    operator[](int i) const {
-      return interval_to_double(inodes[i]);
-    }
-    
-    const typename Ikernel::Point_3&
-    interval_node(int i) const {
-      return inodes[i];
-    }
-    
-    typename Ikernel::Point_3
-    to_interval(const typename Kernel::Point_3& p) const {
-      return double_to_interval(p);
-    }
-    
-    const Exact_kernel::Point_3
-    exact_node(int i) const {
-      return enodes[i];
-    }
-
-    typename Exact_kernel::Point_3
-    to_exact(const typename Kernel::Point_3& p) const {
-      return double_to_exact(p);
-    }    
-    
-    
-    size_t size() const {return enodes.size();}
-
-    void add_new_node(Halfedge_handle edge,Facet_handle facet)
-    {
-      enodes.push_back(compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,ek) );
-      inodes.push_back( exact_to_interval(enodes.back()) );
-    }
-
-    void add_new_node(const Exact_kernel::Point_3& p){
-      enodes.push_back(p);
-      inodes.push_back( exact_to_interval(p) );
-    }
-
-    //the point is an input
-    void add_new_node(const typename Kernel::Point_3& p){
-      enodes.push_back(to_exact(p));
-      inodes.push_back( double_to_interval(p) );
-    }
-  }; // end specialization
-     // Triangle_segment_intersection_points<Polyhedron,Kernel,Predicates_on_constructions,false>
-  
-  //Third specialization: The kernel already has exact constructions.
-  template <class Polyhedron,class Kernel,class Node_storage>
-  class Triangle_segment_intersection_points<Polyhedron,Kernel,Node_storage,true>
-  {
-  //typedefs
-    typedef std::vector <typename Kernel::Point_3>             Nodes_vector;
-    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
-    typedef typename Polyhedron::Facet_const_handle            Facet_handle;
-  //members
-    Nodes_vector nodes;
-    Kernel k;
-  public:
-    typedef Kernel Ikernel;
-    typedef Kernel Exact_kernel;
-    typedef void* Protector;
-    const typename Kernel::Point_3&
-    operator[](int i) const {
-      return nodes[i];
-    }
-   
-    size_t size() const {return nodes.size();}
-    const typename Kernel::Point_3& exact_node(int i) const {return nodes[i];}
-    const typename Kernel::Point_3& interval_node(int i) const {return nodes[i];}
-    
-    //add a new node in the final graph.
-    //it is the intersection of the triangle with the segment
-    void add_new_node(Halfedge_handle edge,Facet_handle facet)
-    {
-      nodes.push_back (  
-        compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,k)
-      );
-    }
-
-    void add_new_node(const typename Kernel::Point_3& p)
-    {
-      nodes.push_back(p);
-    }
-    
-    const typename Kernel::Point_3& to_interval(const typename Kernel::Point_3& p) const { return p; }
-    const typename Kernel::Point_3& to_exact(const typename Kernel::Point_3& p) const { return p; }
-
-  }; // end specialization
-     // Triangle_segment_intersection_points<Polyhedron,Kernel,Node_storage,true>
-  
-}
-
-//TODO an important requirement is that the Polyhedron should be based on a list-based
-//HDS. We use a lot of maps that use the address of Facet,Halfedge and a reallocation would
-//be dramatic.
-
-template< class Polyhedron,
-          class Kernel=typename Polyhedron::Traits::Kernel,
-          class Node_visitor=Empty_node_visitor<Polyhedron>,
-          class Node_storage_type=typename Node_visitor::Node_storage_type,
-          class Use_const_polyhedron=typename Node_visitor::Is_polyhedron_const
-         >
-class Intersection_of_Polyhedra_3{
-
-//typedefs  
-  typedef typename Kernel::Triangle_3                        Triangle;
-  typedef typename Kernel::Segment_3                         Segment;
-  typedef internal_IOP::
-    Polyhedron_types<Polyhedron,Use_const_polyhedron>        Polyhedron_types;
-  
-  typedef typename Polyhedron_types::Polyhedron_ref          Polyhedron_ref;
-  typedef typename Polyhedron_types::Halfedge_handle         Halfedge_handle;
-  typedef typename Polyhedron_types::Halfedge_iterator       Halfedge_iterator;
-  typedef typename Polyhedron_types::Facet_iterator          Facet_iterator;
-  typedef typename Polyhedron_types::Facet_handle            Facet_handle;
-  typedef typename Polyhedron_types::Vertex_handle           Vertex_handle;
-  typedef typename Polyhedron_types::Vertex                  Vertex;
-  typedef typename Polyhedron_types::Facet                   Facet;
-  typedef CGAL::Box_intersection_d::Box_with_handle_d<
-            double, 3, Halfedge_handle>                      Box;
-  typedef std::pair<Facet_handle,Facet_handle>               Facet_pair;
-  typedef std::pair<Facet_pair,int>                          Facet_pair_and_int;
-  
-  typedef internal_IOP::
-            Compare_handles<Polyhedron,Use_const_polyhedron> Compare_handles;
-
-  typedef internal_IOP::
-       Compare_handle_pairs<Polyhedron,Use_const_polyhedron> Compare_handle_pairs;
-  
-
-  typedef std::map<Facet_pair_and_int,                                           //we use Facet_pair_and_int and not Facet_pair to handle coplanar case.
-                   std::set<int>,Compare_handle_pairs>       Facets_to_nodes_map;//Indeed the boundary of the intersection of two coplanar triangles may contain several segments.
-  typedef std::set<Facet_pair,Compare_handle_pairs>          Coplanar_facets_set;//any insertion should be done with make_sorted_pair_of_facets
-  typedef typename Kernel::Point_3                           Node;
-  typedef internal_IOP::Triangle_segment_intersection_points
-            <Polyhedron,Kernel,Node_storage_type>            Nodes_vector;
-
-  typedef typename internal_IOP::
-    Intersection_types<Polyhedron,Use_const_polyhedron>
-      ::Intersection_result                                  Intersection_result;
-
-  typedef std::set<Facet_handle,Compare_handles>             Facet_set;
-
-  typedef std::map
-            <Halfedge_handle,Facet_set,Compare_handles>      Edge_to_intersected_facets;
-  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  typedef std::set<Facet_pair,Compare_handle_pairs>          Coplanar_duplicated_intersection_set;
-  #endif
-//helper functions
-  static inline Facet_pair 
-  make_sorted_pair_of_facets(Facet_handle fh1,Facet_handle fh2) {
-    const Facet* f1=&(*fh1);
-    const Facet* f2=&(*fh2);
-    if (f1 < f2)
-      return Facet_pair(fh1,fh2);
-    return Facet_pair(fh2,fh1);
-  }
-
-  static inline Facet_pair_and_int
-  make_sorted_pair_of_facets_with_int(Facet_handle fh1,Facet_handle fh2,int i) {
-    return std::make_pair(make_sorted_pair_of_facets(fh1,fh2),i);
-  }
-
-  static inline std::pair<void*,void*> make_sorted_void_pair(void* v1,void* v2){
-    if (v1<v2) return std::make_pair(v1,v2);
-    return std::make_pair(v2,v1);
-  }
-
-  static inline Halfedge_handle smaller_handle(Halfedge_handle h){
-    if ( &(*h)<&(*h->opposite()) ) return h;
-    return h->opposite();
-  }
-  
-//member variables
-  Edge_to_intersected_facets  edge_to_sfacet; //Associate a segment to a filtered set of facets that may be intersected
-  Facets_to_nodes_map         f_to_node;      //Associate a pair of triangle to their intersection points
-  Coplanar_facets_set         coplanar_facets;//Contains all pairs of triangular facets intersecting that are coplanar
-  Nodes_vector                nodes;          //Contains intersection points of polyhedra
-  Node_visitor*               visitor;
-  bool                        is_default_visitor; //indicates whether the visitor need to be deleted
-  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  //this does not occur only when one extremity of an edge is inside a face.
-  // The problem occur every time an edge or a part of an edge with two incident triangles
-  // is on the intersection polyline, I choose to direcly filter the output by removing duplicated edges
-  Coplanar_duplicated_intersection_set coplanar_duplicated_intersection;//Set containing edges that are duplicated because of edges (partially) included in a triangle
-  #endif
-  
-//functions that should come from a traits class
-  bool has_at_least_two_incident_faces(Halfedge_handle edge)
-  {
-    return !edge->is_border_edge();
-  }
-  
-  template <class Output_iterator>
-  void get_incident_facets(Halfedge_handle edge,Output_iterator out){
-    if (!edge->is_border()) *out++=edge->facet();
-    if (!edge->opposite()->is_border()) *out++=edge->opposite()->facet();
-  }
-
-  template <class Output_iterator>
-  void get_incident_edges_to_vertex(Halfedge_handle edge,Output_iterator out){
-    Halfedge_handle current=edge;
-    do{
-      *out++=current;
-      current=current->next()->opposite();
-    }
-    while(current!=edge);
-  }
-
-//internal functions
-  
-  class Map_edge_facet_bbox_intersection {
-    Edge_to_intersected_facets& edge_to_sfacet;
-    Polyhedron_ref polyhedron_triangle;
-    Polyhedron_ref polyhedron_edge;
-    Node_visitor& visitor;
-  public:
-    Map_edge_facet_bbox_intersection(Edge_to_intersected_facets& map_,
-                                     Polyhedron_ref  P,
-                                     Polyhedron_ref Q,
-                                     Node_visitor& visitor_)
-      :edge_to_sfacet(map_),polyhedron_triangle(P),polyhedron_edge(Q),visitor(visitor_){}
-
-    void operator()( const Box* fb, const Box* eb) const {
-      Halfedge_handle fh = fb->handle();
-      Halfedge_handle eh = eb->handle();
-
-      // The following call to map::insert() attempts an insertion of a pair
-      // into 'edge_to_sfacet'. If 'eh' is already inserted in the map,
-      // then the result 'res' is the current entry in the map for 'eh'.
-      typename Edge_to_intersected_facets::iterator res=
-        edge_to_sfacet.insert(std::make_pair(eh,Facet_set())).first;
-
-      res->second.insert(fh->facet());
-      // That could have been shortened to:
-      //
-      //       edge_to_sfacet[eh].insert(fh->facet())
-      //
-      // -- Laurent Rineau, 2012/11/01
-
-      visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
-    }
-  };
-
-  class Map_edge_facet_bbox_intersection_extract_coplanar {
-    Edge_to_intersected_facets& edge_to_sfacet;
-    Coplanar_facets_set& coplanar_facets;
-    Polyhedron_ref polyhedron_triangle;
-    Polyhedron_ref polyhedron_edge;
-    Node_visitor& visitor;
-  public:
-    Map_edge_facet_bbox_intersection_extract_coplanar(
-      Edge_to_intersected_facets& map_,
-      Coplanar_facets_set& coplanar_facets_,
-      Polyhedron_ref  P,
-      Polyhedron_ref Q,
-      Node_visitor& visitor_)
-      :edge_to_sfacet(map_),coplanar_facets(coplanar_facets_),polyhedron_triangle(P),polyhedron_edge(Q),visitor(visitor_)
-    {}
-
-    void operator()( const Box* fb, const Box* eb) const {
-      Halfedge_handle fh = fb->handle(); //handle for the face
-      Halfedge_handle eh = eb->handle(); //handle for the edge
-      if(eh->is_border()) eh = eh->opposite();
-      CGAL_assertion(!eh->is_border());
-      
-      //check if the segment intersects the plane of the facet or if it is included in the plane
-      const typename Kernel::Point_3 & a = fh->vertex()->point();
-      const typename Kernel::Point_3 & b = fh->next()->vertex()->point();
-      const typename Kernel::Point_3 & c = fh->next()->next()->vertex()->point();
-      const Orientation abcp = orientation(a,b,c,eh->vertex()->point());
-      const Orientation abcq = orientation(a,b,c,eh->opposite()->vertex()->point());
-      if (abcp==abcq){
-        if (abcp!=COPLANAR){
-//          std::cout << "rejected " << &(*fh->facet()) << "{" << &(*eh->facet()) << " " <<&(*eh->opposite()->facet()) << " "<< eh->vertex()->point() << " " << eh->opposite()->vertex()->point() << "}" <<std::endl;
-          return; //no intersection
-        }
-        //WARNING THIS IS DONE ONLY FOR POLYHEDRON (MAX TWO INCIDENT FACETS TO EDGE)
-        if (/* !eh->is_border() && */ orientation(a,b,c,eh->next()->vertex()->point())==COPLANAR){
-          coplanar_facets.insert(make_sorted_pair_of_facets(eh->facet(),fh->facet()));
-        }
-        if (!eh->opposite()->is_border() && orientation(a,b,c,eh->opposite()->next()->vertex()->point())==COPLANAR){
-          coplanar_facets.insert(make_sorted_pair_of_facets(eh->opposite()->facet(),fh->facet()));
-        }
-        visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
-        //in case only the edge is coplanar, the intersection points will be detected using an incident facet 
-        //(see remark at the beginning of the file)
-        return; 
-      }
-      
-      typename Edge_to_intersected_facets::iterator res=
-        edge_to_sfacet.insert(std::make_pair(eh,Facet_set())).first;
-      res->second.insert(fh->facet());
-      visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
-    }
-  };
-  
-  // This function tests the intersection of the faces of P with the edges of Q
-  void filter_intersections( Polyhedron_ref P, Polyhedron_ref Q) {
-    std::vector<Box> facet_boxes, edge_boxes;
-    facet_boxes.reserve( P.size_of_facets());
-    for ( Facet_iterator i = P.facets_begin(); i != P.facets_end(); ++i){
-        facet_boxes.push_back(
-            Box( i->halfedge()->vertex()->point().bbox()
-               + i->halfedge()->next()->vertex()->point().bbox()
-               + i->halfedge()->next()->next()->vertex()->point().bbox(),
-                 i->halfedge()));
-    }
-    std::vector<const Box*> facet_box_ptr;
-    facet_box_ptr.reserve( P.size_of_facets());
-    for ( typename std::vector<Box>::iterator j = facet_boxes.begin(); j != facet_boxes.end(); ++j){
-        facet_box_ptr.push_back( &*j);
-    }
-      
-    for ( Halfedge_iterator i = Q.halfedges_begin(); i != Q.halfedges_end(); ++i){
-      if(&*i < &*(i->opposite())){
-        edge_boxes.push_back(
-            Box( i->vertex()->point().bbox()
-                 + i->opposite()->vertex()->point().bbox(),
-                 i));
-      }
-   }
-   
-    std::vector<const Box*> edge_box_ptr;
-    edge_box_ptr.reserve( Q.size_of_halfedges()/2);
-    for ( typename std::vector<Box>::iterator j = edge_boxes.begin(); j != edge_boxes.end(); ++j){
-        edge_box_ptr.push_back( &*j);
-    }
-
-    CGAL::box_intersection_d( facet_box_ptr.begin(), facet_box_ptr.end(),
-                              edge_box_ptr.begin(), edge_box_ptr.end(),
-    #ifdef DO_NOT_HANDLE_COPLANAR_FACETS
-                              // Note that 'edge_to_sfacet' is passed by
-                              // non-const reference, here, to be filled.
-                              Map_edge_facet_bbox_intersection(edge_to_sfacet,P,Q,*visitor),
-    #else // not DO_NOT_HANDLE_COPLANAR_FACETS
-                              Map_edge_facet_bbox_intersection_extract_coplanar(edge_to_sfacet,coplanar_facets,P,Q,*visitor),
-    #endif // not DO_NOT_HANDLE_COPLANAR_FACETS
-                              std::ptrdiff_t(2000)
-    );
-  }
-
-
-  void add_intersection_point_to_facet_and_all_edge_incident_facets(Facet_handle facet,
-                                                                    Halfedge_handle edge,
-                                                                    int node_id)
-  {
-    std::vector<Facet_handle> incident_facets;
-    get_incident_facets(edge,std::back_inserter(incident_facets));
-    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
-         it!=incident_facets.end();++it)
-    {
-      CGAL_assertion(cgal_do_intersect_debug(facet,*it));
-      
-      Facet_pair facet_pair = make_sorted_pair_of_facets(facet,*it);
-      if ( !coplanar_facets.empty() && coplanar_facets.find(facet_pair)!=coplanar_facets.end() ) continue;
-      typename Facets_to_nodes_map::iterator it_list=
-        f_to_node.insert( std::make_pair( Facet_pair_and_int(facet_pair,0),std::set<int>()) ).first;
-      it_list->second.insert(node_id);
-    }
-  }
-
-  void cip_handle_case_edge(int node_id,
-                            Facet_set* fset,
-                            Halfedge_handle edge,
-                            Halfedge_handle edge_intersected)
-  {
-    //associate the intersection point to all facets incident to the intersected edge using edge
-    std::vector<Facet_handle> incident_facets;
-    get_incident_facets(edge_intersected,std::back_inserter(incident_facets));
-    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
-         it!=incident_facets.end();++it)
-    {
-      add_intersection_point_to_facet_and_all_edge_incident_facets(*it,edge,node_id);
-      if (fset!=NULL) fset->erase(*it);
-    }
-    incident_facets.clear();
-
-    //associate the intersection point to all facets incident to edge using the intersected edge
-    //at least one pair of facets is already handle above
-    
-    typename Edge_to_intersected_facets::iterator it_fset=edge_to_sfacet.find(edge_intersected);
-    if (it_fset==edge_to_sfacet.end()) return;
-    Facet_set& fset_bis=it_fset->second;
-    get_incident_facets(edge,std::back_inserter(incident_facets));
-    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
-         it!=incident_facets.end();++it)
-    {
-//      add_intersection_point_to_facet_and_all_edge_incident_facets(*it,edge_intersected,node_id); //this call is not needed, already done in the first loop
-      fset_bis.erase(*it);
-    }
-  }
-
-  void cip_handle_case_vertex(int node_id,
-                              Facet_set* fset,
-                              Halfedge_handle edge,
-                              Halfedge_handle vertex_intersected)
-  {
-    std::vector<Halfedge_handle> incident_halfedges;
-    get_incident_edges_to_vertex(vertex_intersected,std::back_inserter(incident_halfedges));
-    for (typename std::vector<Halfedge_handle>::iterator 
-      it=incident_halfedges.begin();it!=incident_halfedges.end();++it)
-    {
-      cip_handle_case_edge(node_id,fset,edge,*it);
-    }
-  }
-
-  //add a new node in the final graph.
-  //it is the intersection of the triangle with the segment
-  void add_new_node(Halfedge_handle edge,
-                    Facet_handle facet,
-                    const Intersection_result& inter_res,
-                    Nodes_vector& nodes)
-  {
-    bool is_vertex_coplanar = CGAL::cpp11::get<2>(inter_res);
-    if (is_vertex_coplanar)
-      nodes.add_new_node(edge->vertex()->point());
-    else{
-      bool is_opposite_vertex_coplanar = CGAL::cpp11::get<3>(inter_res);
-      if (is_opposite_vertex_coplanar)
-        nodes.add_new_node(edge->opposite()->vertex()->point());
-      else
-        nodes.add_new_node(edge,facet);
-    }
-  }
-
-  //either the exact or input point can be used to create a node
-  //with this function
-  template<class Point>
-  void add_new_node(const Point& pt)
-  {
-    nodes.add_new_node(pt);
-  }
-
-  
-  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  void check_coplanar_edge(Halfedge_handle hedge,Facet_handle facet)
-  {
-    const typename Kernel::Point_3& p0=facet->halfedge()->vertex()->point();
-    const typename Kernel::Point_3& p1=facet->halfedge()->next()->vertex()->point();
-    const typename Kernel::Point_3& p2=facet->halfedge()->opposite()->vertex()->point();
-    CGAL_precondition( orientation( p0,p1,p2,hedge->vertex()->point() ) == COPLANAR );
-
-    if ( has_at_least_two_incident_faces(hedge) &&  orientation( p0,p1,p2,hedge->opposite()->vertex()->point() ) == COPLANAR )
-    {
-      //In case two facets are incident along such this edge, the intersection
-      //will be reported twice. We keep track of this so that at the end, we can remove one intersecting edge out of the two
-      //choose the smaller of the two faces (only one need to de deleted)
-      Facet_handle smaller=make_sorted_pair_of_facets(hedge->face(),hedge->opposite()->face()).first;
-      coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(smaller,facet));
-    }    
-  }
-  
-  bool are_incident_facets_coplanar(Halfedge_handle hedge){
-    const typename Kernel::Point_3& p0=hedge->vertex()->point();
-    const typename Kernel::Point_3& p1=hedge->next()->vertex()->point();
-    const typename Kernel::Point_3& p2=hedge->opposite()->vertex()->point();
-    const typename Kernel::Point_3& p3=hedge->opposite()->next()->vertex()->point();
-    return orientation( p0,p1,p2,p3 ) == COPLANAR;
-  }
-
-  void check_coplanar_edge(Halfedge_handle hedge,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
-  {
-    switch(type){
-      case internal_IOP::FACET:
-        check_coplanar_edge(hedge,additional_edge->face());
-      break;
-      
-      case internal_IOP::EDGE:
-        if ( !additional_edge->is_border() ){
-          check_coplanar_edge(hedge,additional_edge->face());
-        }
-        if (!additional_edge->opposite()->is_border())
-          check_coplanar_edge(hedge,additional_edge->opposite()->face());
-      break;        
-      case internal_IOP::VERTEX:
-      {
-        //consider  all incident faces
-        Halfedge_handle current=additional_edge;
-        do{
-          if( !current->is_border() )
-          check_coplanar_edge(hedge,current->face());
-          current=current->next()->opposite();
-        }
-        while(current!=additional_edge);
-      }
-      break;
-      
-      default:
-        CGAL_assertion(type==internal_IOP::COPLNR);
-      break;
-    }    
-  }
-  
-  void check_coplanar_edge_old(Halfedge_handle hedge,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
-  {
-    switch(type){
-      case internal_IOP::FACET:
-        check_coplanar_edge(hedge,additional_edge->face());
-      break;
-      
-      case internal_IOP::EDGE:
-      {
-        if ( !additional_edge->is_border() ){
-          if (!additional_edge->opposite()->is_border()){
-            if ( are_incident_facets_coplanar(additional_edge) )
-            {
-              Facet_handle facet=additional_edge->face();
-              const typename Kernel::Point_3& p0=facet->halfedge()->vertex()->point();
-              const typename Kernel::Point_3& p1=facet->halfedge()->next()->vertex()->point();
-              const typename Kernel::Point_3& p2=facet->halfedge()->opposite()->vertex()->point();
-              CGAL_precondition( orientation( p0,p1,p2,hedge->vertex()->point() ) == COPLANAR );
-
-              if ( has_at_least_two_incident_faces(hedge) &&  orientation( p0,p1,p2,hedge->opposite()->vertex()->point() ) == COPLANAR )
-              {
-                //In case two facets are incident along a common edge of two coplanar triangles.
-                //We need to remove three out of the four reported pair
-                Facet_handle smaller=make_sorted_pair_of_facets(hedge->face(),hedge->opposite()->face()).first;
-                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->face(),facet));
-                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->opposite()->face(),facet));
-                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->opposite()->face(),additional_edge->opposite()->face()));
-              }              
-            }
-            else
-            {
-              check_coplanar_edge(hedge,additional_edge->face());
-              check_coplanar_edge(hedge,additional_edge->opposite()->face());
-            }
-          }
-          else
-            check_coplanar_edge(hedge,additional_edge->face());
-        }
-        else{
-          CGAL_assertion(!additional_edge->opposite()->is_border());
-          check_coplanar_edge(hedge,additional_edge->opposite()->face());
-        }
-      }
-      break;        
-      case internal_IOP::VERTEX:
-        
-      break;
-      
-      default:
-        CGAL_assertion(type==internal_IOP::COPLNR);
-      break;
-    }    
-  }
-  
-  template <class Hedge_iterator>
-  void check_coplanar_edges(Hedge_iterator begin,Hedge_iterator end,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
-  {
-    for (Hedge_iterator it=begin;it!=end;++it)
-      check_coplanar_edge(*it,additional_edge,type);
-  }
-  #endif // USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  
-  void print_type_debug(internal_IOP::Intersection_type type,bool cpl,bool opp_cpl)
-  {
-    switch(type){
-      case internal_IOP::COPLNR:
-        std::cout << "COPLNR " << cpl << " " <<  opp_cpl << std::endl;
-      break;
-      case internal_IOP::EMPTY:
-        std::cout << "EMPTY " << cpl << " " <<  opp_cpl << std::endl;
-      break;
-      
-      case internal_IOP::FACET:
-        std::cout << "FACET " << cpl << " " <<  opp_cpl << std::endl;
-      break;
-      
-      case internal_IOP::EDGE:
-        std::cout << "EDGE " << cpl << " " <<  opp_cpl << std::endl;
-      break;        
-      case internal_IOP::VERTEX:
-        std::cout << "VERTEX " << cpl << " " <<  opp_cpl << std::endl;
-      break;
-    }
-  }
-  
-
-  void handle_coplanar_case_VERTEX_FACET(Halfedge_handle vertex,Halfedge_handle facet,int node_id){
-    visitor->new_node_added(node_id,internal_IOP::FACET,vertex,facet,true,false);
-    std::vector<Halfedge_handle> all_edges;
-    get_incident_edges_to_vertex(vertex,std::back_inserter(all_edges));
-    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
-    for (;it_edge!=all_edges.end();++it_edge){
-      add_intersection_point_to_facet_and_all_edge_incident_facets(facet->facet(),*it_edge,node_id);
-      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-      if (it_ets!=edge_to_sfacet.end()) it_ets->second.erase(facet->facet());
-    }
-  }
-  
-  void handle_coplanar_case_VERTEX_EDGE(Halfedge_handle vertex,Halfedge_handle edge,int node_id){
-    visitor->new_node_added(node_id,internal_IOP::VERTEX,edge,vertex,false,false);
-    std::vector<Halfedge_handle> all_edges;
-    get_incident_edges_to_vertex(vertex,std::back_inserter(all_edges));
-    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
-    for (;it_edge!=all_edges.end();++it_edge){
-      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-      Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
-      cip_handle_case_edge(node_id,fset,*it_edge,edge);
-    }
-  }
-
-  void handle_coplanar_case_VERTEX_VERTEX(Halfedge_handle vertex1,Halfedge_handle vertex2,int node_id){
-    visitor->new_node_added(node_id,internal_IOP::VERTEX,vertex2,vertex1,true,false);
-    std::vector<Halfedge_handle> all_edges;
-    get_incident_edges_to_vertex(vertex1,std::back_inserter(all_edges));
-    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();          
-    for (;it_edge!=all_edges.end();++it_edge){
-      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-      Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
-      cip_handle_case_vertex(node_id,fset,*it_edge,vertex2);
-    }
-  }
-  
-  
-  template<class Cpl_inter_pt,class Coplanar_node_map>
-  int get_or_create_node(Cpl_inter_pt& ipt,int& current_node,Coplanar_node_map& coplanar_node_map){
-    void *v1, *v2;
-    switch(ipt.type_1){
-      case internal_IOP::VERTEX: v1=(void*)( &(*(ipt.info_1->vertex()))     );  break;
-      case internal_IOP::EDGE  : v1=(void*)( &(*smaller_handle(ipt.info_1)) );  break;
-      case internal_IOP::FACET : v1=(void*)( &(*(ipt.info_1->facet()))      );  break;
-      default: CGAL_error_msg("Should not get there!");
-    }
-
-    switch(ipt.type_2){
-      case internal_IOP::VERTEX: v2=(void*)( &(*(ipt.info_2->vertex()))     );  break;
-      case internal_IOP::EDGE  : v2=(void*)( &(*smaller_handle(ipt.info_2)) );  break;
-      case internal_IOP::FACET : v2=(void*)( &(*(ipt.info_2->facet()))      );  break;
-      default: CGAL_error_msg("Should not get there!");
-    }
-
-    std::pair<void*,void*> key=make_sorted_void_pair(v1,v2);
-
-    std::pair<typename Coplanar_node_map::iterator,bool> res=coplanar_node_map.insert(std::make_pair(key,current_node+1));
-    if (res.second){ //insert a new node
-      
-      if (ipt.type_1==internal_IOP::VERTEX)
-        add_new_node(ipt.info_1->vertex()->point());
-      else{
-        if(ipt.type_2==internal_IOP::VERTEX)
-          add_new_node(ipt.info_2->vertex()->point());
-        else
-          add_new_node(ipt.point);
-      }
-      return ++current_node;
-    }
-    return res.first->second;
-  }
-  
-  void compute_intersection_of_coplanar_facets(int& current_node){
-    typedef std::map<std::pair<void*,void*>,int> Coplanar_node_map;
-    Coplanar_node_map coplanar_node_map;
-    
-    for (typename Coplanar_facets_set::iterator it=coplanar_facets.begin();it!=coplanar_facets.end();++it){
-      Facet_handle f1=it->first;
-      Facet_handle f2=it->second;
-      typedef internal_IOP::Intersection_point_with_info<Kernel,Halfedge_handle> Cpl_inter_pt;
-      std::list<Cpl_inter_pt> inter_pts;
-      internal_IOP::intersection_coplanar_facets<Kernel>(f1->halfedge(),f2->halfedge(),inter_pts);
-//      std::cout << "found " << inter_pts.size() << " inter pts: "; 
-      std::size_t nb_pts=inter_pts.size();
-      std::vector<int> cpln_nodes; cpln_nodes.reserve(nb_pts);
-      for (typename std::list<Cpl_inter_pt>::iterator iti=inter_pts.begin();iti!=inter_pts.end();++iti){
-        #ifdef CGAL_COREFINEMENT_DEBUG
-        //iti->print_debug();
-        #endif
-        CGAL_assertion(iti->is_valid());
-        int node_id=get_or_create_node(*iti,current_node,coplanar_node_map);
-        cpln_nodes.push_back(node_id);
-
-        switch(iti->type_1){
-          case internal_IOP::VERTEX:
-          {
-            switch(iti->type_2){
-              case internal_IOP::VERTEX: handle_coplanar_case_VERTEX_VERTEX(iti->info_1,iti->info_2,node_id); break;
-              case internal_IOP::EDGE  : handle_coplanar_case_VERTEX_EDGE(iti->info_1,iti->info_2,node_id);   break;
-              case internal_IOP::FACET : handle_coplanar_case_VERTEX_FACET(iti->info_1,iti->info_2,node_id);  break;
-              default: CGAL_error_msg("Should not get there!");
-            }
-          }
-          break;
-          case internal_IOP::EDGE:{
-            switch(iti->type_2){
-              case internal_IOP::VERTEX:handle_coplanar_case_VERTEX_EDGE(iti->info_2,iti->info_1,node_id);break;
-              case internal_IOP::EDGE:
-              {
-                visitor->new_node_added(node_id,internal_IOP::EDGE,iti->info_1,iti->info_2,false,false);
-                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(iti->info_1);
-                Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
-                cip_handle_case_edge(node_id,fset,iti->info_1,iti->info_2);                
-              }
-              break;
-              default: CGAL_error_msg("Should not get there!");
-            }
-          }            
-          break;
-          
-          case internal_IOP::FACET:
-          {
-            CGAL_assertion(iti->type_2==internal_IOP::VERTEX);
-            handle_coplanar_case_VERTEX_FACET(iti->info_2,iti->info_1,node_id);
-          }
-          break;
-          
-          default: CGAL_error_msg("Should not get there!");
-        }
-      }
-      switch (nb_pts){
-        case 0: break;
-        case 1:
-        {
-          typename Facets_to_nodes_map::iterator it_list=  
-            f_to_node.insert( std::make_pair( Facet_pair_and_int(*it,1),std::set<int>()) ).first;
-          it_list->second.insert(cpln_nodes[0]);
-        }
-        break;
-        default:
-        {
-          int i=0;
-          std::size_t stop=nb_pts + (nb_pts<3?-1:0);
-          for (std::size_t k=0;k<stop;++k){
-            typename Facets_to_nodes_map::iterator it_list=
-              f_to_node.insert( std::make_pair( Facet_pair_and_int(*it,++i),std::set<int>()) ).first;
-            it_list->second.insert( cpln_nodes[k] );
-            it_list->second.insert( cpln_nodes[(k+1)%nb_pts] );
-          }
-        }
-      }
-//      std::cout << std::endl;
-    }
-  }
-  
-  void compute_intersection_points(int& current_node){
-    for(typename Edge_to_intersected_facets::iterator it=edge_to_sfacet.begin();it!=edge_to_sfacet.end();++it){
-      Halfedge_handle edge=it->first;
-      Facet_set& fset=it->second;
-      while (!fset.empty()){
-        Facet_handle facet=*fset.begin();
-        
-        Intersection_result res=internal_IOP::do_intersect<Polyhedron,Kernel,Use_const_polyhedron>(edge,facet);
-        internal_IOP::Intersection_type type=CGAL::cpp11::get<0>(res);
-        
-        //handle degenerate case: one extremity of edge below to facet
-        std::vector<Halfedge_handle> all_edges;
-        if ( CGAL::cpp11::get<2>(res) )
-          get_incident_edges_to_vertex(edge,std::back_inserter(all_edges));
-        else{
-          if ( CGAL::cpp11::get<3>(res) )
-            get_incident_edges_to_vertex(edge->opposite(),std::back_inserter(all_edges));
-          else
-            all_edges.push_back(edge);
-        }
-        
-        CGAL_precondition(*all_edges.begin()==edge || *all_edges.begin()==edge->opposite());
-//        print_type_debug(type,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
-       
-        #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
-        check_coplanar_edges(boost::next(all_edges.begin()),all_edges.end(),CGAL::cpp11::get<1>(res),type);
-        #endif
-        
-        typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
-        switch(type){
-          case internal_IOP::COPLNR:
-            #ifndef DO_NOT_HANDLE_COPLANAR_FACETS
-            assert(!"COPLNR : this point should never be reached!");
-            #else
-            //nothing need to be done, cf. comments at the beginning of the file
-            #endif
-          break;
-          case internal_IOP::EMPTY:
-            fset.erase(fset.begin());
-            CGAL_assertion(!cgal_do_intersect_debug(edge,facet));
-          break;
-
-          // Case when the edge pierces the facet in its interior.
-          case internal_IOP::FACET:
-          {
-            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
-            CGAL_assertion(facet==CGAL::cpp11::get<1>(res)->face());
-
-            int node_id=++current_node;
-            add_new_node(edge,facet,res,nodes);
-            visitor->new_node_added(node_id,internal_IOP::FACET,edge,facet->halfedge(),CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
-            for (;it_edge!=all_edges.end();++it_edge){
-              add_intersection_point_to_facet_and_all_edge_incident_facets(facet,*it_edge,node_id);
-              //erase facet from the list to test intersection with it_edge
-              if ( it_edge==all_edges.begin() )
-                fset.erase(fset.begin());
-              else
-              {
-                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-                if(it_ets!=edge_to_sfacet.end()) it_ets->second.erase(facet);
-              }
-            }
-          } // end case FACET
-          break;
-
-          // Case when the edge intersect one edge of the facet.
-          case internal_IOP::EDGE:
-          {
-            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
-            int node_id=++current_node;
-            add_new_node(edge,facet,res,nodes);
-            Halfedge_handle edge_intersected=CGAL::cpp11::get<1>(res);
-            visitor->new_node_added(node_id,internal_IOP::EDGE,edge,edge_intersected,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
-            for (;it_edge!=all_edges.end();++it_edge){
-              if ( it_edge!=all_edges.begin() ){
-                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-                Facet_set* fset_bis = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
-                cip_handle_case_edge(node_id,fset_bis,*it_edge,edge_intersected);
-              }
-              else
-                cip_handle_case_edge(node_id,&fset,*it_edge,edge_intersected);
-            }
-          } // end case EDGE
-          break;
-
-          case internal_IOP::VERTEX:
-          {
-            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
-            int node_id=++current_node;
-            Halfedge_handle vertex_intersected=CGAL::cpp11::get<1>(res);
-            add_new_node(vertex_intersected->vertex()->point()); //we use the original vertex to create the node
-            //before it was internal_IOP::FACET but do not remember why, probably a bug...
-            visitor->new_node_added(node_id,internal_IOP::VERTEX,edge,vertex_intersected,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
-            for (;it_edge!=all_edges.end();++it_edge){
-              if ( it_edge!=all_edges.begin() ){
-                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
-                Facet_set* fset_bis = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;                
-                cip_handle_case_vertex(node_id,fset_bis,*it_edge,vertex_intersected);
-              }
-              else
-                cip_handle_case_vertex(node_id,&fset,*it_edge,vertex_intersected);
-            }
-          } // end case VERTEX
-          break;
-
-        } // end switch on the type of the intersection
-      } // end loop on all facets that intersect the edge
-    } // end loop on all entries (edges) in 'edge_to_sfacet'
-    CGAL_assertion(nodes.size()==unsigned(current_node+1));
-  }
-  
-  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  void remove_duplicated_intersecting_edges()
-  {
-    for (typename Coplanar_duplicated_intersection_set::iterator 
-        it=coplanar_duplicated_intersection.begin();
-        it!=coplanar_duplicated_intersection.end();
-        ++it)
-    {
-      typename Facets_to_nodes_map::iterator res=f_to_node.find(*it);
-      //CGAL_assertion(res!=f_to_node.end());
-      //we cannot use a precondition here: in some cases the coplanarity test is not sufficient.
-      //if on surface1 we have to coplanar triangle incident along edge e. Then in surface2, take a triangle
-      //with one edge inside one triangle of surface1 such that one vertex in on e. Then the collinearity test
-      //return true for both faces but only one implies a duplicated edge
-      if(res!=f_to_node.end())
-        f_to_node.erase(res);
-    }
-  }
-  #else // not USE_DETECTION_MULTIPLE_DEFINED_EDGES
-  void remove_duplicated_intersecting_edges()
-  {
-    std::set< std::pair<int,int> > already_seen;
-    std::list<typename Facets_to_nodes_map::iterator> to_erase;
-    for (typename Facets_to_nodes_map::iterator 
-          it=f_to_node.begin();
-          it!=f_to_node.end();
-          ++it
-    )
-    {
-      if (it->second.size()==1) continue;
-      CGAL_precondition(it->second.size()==2);
-      //it->second is a set so int are already sorted
-      bool is_new=already_seen.insert(  std::make_pair(
-                                       *(it->second.begin()),
-                                       *boost::next(it->second.begin()) )
-      ).second;
-      
-      if (!is_new)
-        to_erase.push_back(it);
-    }
-    
-    for ( typename std::list<typename Facets_to_nodes_map::iterator>::iterator
-          it=to_erase.begin();it!=to_erase.end();++it
-    )
-      f_to_node.erase(*it);
-  }
-  #endif // not USE_DETECTION_MULTIPLE_DEFINED_EDGES
-
-
-  struct Graph_node{
-    std::set<int> neighbors;
-    unsigned size;
-    
-    Graph_node():size(0){}
-    
-    void insert(int i){
-      ++size;
-      CGAL_assertion(neighbors.find(i)==neighbors.end());
-      neighbors.insert(i);
-    }
-    
-    void erase(int i){
-      CGAL_assertion(neighbors.find(i)!=neighbors.end());
-      neighbors.erase(i);
-    }
-    void make_terminal() {size=45;}
-    bool is_terminal()const {return size!=2;}
-    bool empty() const {return neighbors.empty();}
-    int top() const {return *neighbors.begin();}
-    void pop() {
-      CGAL_assertion(!neighbors.empty());
-      neighbors.erase(neighbors.begin());
-    }
-  };
-
-
-  template <class Output_iterator>
-  void construct_polylines(Nodes_vector& nodes,Output_iterator out){
-    typedef std::map<int,Graph_node> Graph;
-    Graph graph;
-    
-    //counts the number of time each node has been seen
-    std::size_t nb_nodes=nodes.size();
-    std::vector<int> node_mult(nb_nodes,0);
-    bool isolated_point_seen=false;
-    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
-      const std::set<int>& segment=it->second;
-      CGAL_assertion(segment.size()==2 || segment.size()==1);
-      if (segment.size()==2){
-        int i=*segment.begin();
-        int j=*boost::next(segment.begin());
-        typename Graph::iterator ins_res=graph.insert(std::make_pair(i,Graph_node())).first;
-        ins_res->second.insert(j);
-        ins_res=graph.insert(std::make_pair(j,Graph_node())).first;
-        ins_res->second.insert(i);
-        ++(node_mult[i]);
-        ++(node_mult[j]);
-      }
-      else{
-        CGAL_assertion(segment.size()==1);
-        isolated_point_seen=true;
-      }
-    }
-    
-    //add isolated points
-    if (isolated_point_seen){
-      for (unsigned index=0;index<nb_nodes;++index)
-        if (node_mult[index]==0){
-          *out++=std::vector<typename Kernel::Point_3>(1,nodes[index]);
-          visitor->start_new_polyline(index,index);
-        }
-    }
-    
-    //visitor call
-    visitor->annotate_graph(graph.begin(),graph.end());
-    
-    bool only_cycle=false;
-    while (!graph.empty()){
-      typename Graph::iterator it=graph.begin();
-      for (;!only_cycle && it!=graph.end();++it){
-        if (it->second.is_terminal()) break;
-      }
-      
-      std::vector<typename Kernel::Point_3> polyline;
-      
-      if(!only_cycle && it!=graph.end()){
-        //this is a polyline
-        int i=it->first;
-        int j=it->second.top();
-        visitor->start_new_polyline(i,j);
-        CGAL_assertion(i!=j);
-        it->second.pop();
-        if (it->second.empty())
-          graph.erase(it);
-        polyline.push_back(nodes[i]);
-        visitor->add_node_to_polyline(i);
-        while(true){
-          it=graph.find(j);
-          CGAL_assertion(it!=graph.end());
-          it->second.erase(i);
-          i=j;
-          polyline.push_back(nodes[i]);
-          visitor->add_node_to_polyline(i);
-          if (it->second.empty()){
-            graph.erase(it);
-            break;
-          }
-          if (it->second.is_terminal()) break;
-          j=it->second.top();
-          it->second.pop();
-          if (it->second.empty())
-            graph.erase(it);
-        }
-        *out++=polyline;
-      }
-      else{
-        //it remains only cycles
-        only_cycle=true;
-        it=graph.begin();
-        int i=it->first;
-        int j=it->second.top();
-        visitor->start_new_polyline(i,j);
-        graph.erase(it);
-        polyline.push_back(nodes[i]);
-        visitor->add_node_to_polyline(i);
-        int first=i;
-        do{
-          it=graph.find(j);
-          it->second.erase(i);
-          i=j;
-          polyline.push_back(nodes[i]);
-          visitor->add_node_to_polyline(i);
-          j=it->second.top();
-          graph.erase(it);
-        }while(j!=first);
-        polyline.push_back(nodes[j]);// we duplicate first point for cycles
-        visitor->add_node_to_polyline(j);
-        *out++=polyline;      
-      }
-    }
-  }
-  
-  int get_other_int(const std::set<int>& s,int i) const {
-    if (*s.begin()!=i) return *s.begin();
-    return *boost::next(s.begin());
-  }
-  
-  template <class T,class Dispatch_out_it>
-  bool is_grabbed(const Dispatch_out_it&) const{
-    return CGAL::Is_in_tuple<T,typename Dispatch_out_it::Value_type_tuple>::value;
-  }
-  
-  
-  template <class OutputIterator>
-  struct Is_dispatch_based_ouput_iterator{
-    typedef  boost::false_type type;
-  };
-
-  template <template<class V_,class O_> class Dispatch_based_output_it,class V,class O>
-  struct Is_dispatch_based_ouput_iterator<Dispatch_based_output_it<V,O> >{
-    typedef typename boost::is_base_of< Dispatch_output_iterator<V,O>,
-                                        Dispatch_based_output_it<V,O>  >::type type;
-  };
-  
-  template <class Output_iterator>
-  inline void construct_polylines_with_info(Nodes_vector& nodes,Output_iterator out){
-    return construct_polylines_with_info(nodes,out,typename Is_dispatch_based_ouput_iterator<Output_iterator>::type());
-  }
-    
-  template <class Output_iterator>
-  void construct_polylines_with_info(Nodes_vector& nodes,Output_iterator out,boost::false_type){
-    construct_polylines_with_info(nodes,
-                                  dispatch_or_drop_output<std::vector<typename Kernel::Point_3> >(out),boost::true_type());
-  }
-  
-  template <template<class V_,class O_> class Dispatch_based_output_it,class V,class O>
-  void construct_polylines_with_info(Nodes_vector& nodes,
-                                     Dispatch_based_output_it<V,O> out,boost::true_type)
-  {
-    typedef typename Facets_to_nodes_map::value_type Edge;
-    typedef std::list<Facet_pair> Polyline_info;
-    
-    
-    std::size_t nb_nodes=nodes.size();
-    std::vector<int> node_mult(nb_nodes,0);
-    std::vector<bool> terminal_bools(nb_nodes,false);
-    std::vector< std::set<Edge*> > connections(nb_nodes);
-    // --counts the number of time each node has been seen
-    // --associate to each node its incident edges. An edge = a pair of Facet_handle+2 indices of intersection points
-    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
-      const std::set<int>& segment=it->second;
-      CGAL_assertion(segment.size()==2 || segment.size()==1);
-      if (segment.size()==2){
-        int i=*segment.begin();
-        int j=*boost::next(segment.begin());
-        connections[i].insert(&(*it));
-        connections[j].insert(&(*it));
-        ++(node_mult[i]);
-        ++(node_mult[j]);
-      }
-    }
-
-    //detect terminal nodes and isolated nodes
-    for (unsigned k=0;k<nb_nodes;++k){
-      if (node_mult[k]!=2) terminal_bools[k]=true;
-      if (node_mult[k]==0){
-        *out++=std::vector<typename Kernel::Point_3>(1,nodes[k]);
-        if ( is_grabbed<std::vector<Facet_pair> >(out))
-          *out++=std::vector<Facet_pair>();
-      }
-    }
-   
-    //visitor call
-    visitor->update_terminal_nodes(terminal_bools);
-    
-    //We start from a node N and recursively walk one edge to find other
-    // node. If this is a cycle we stop when we are back at the node N;
-    //otherwise we stop at a terminal node and restart a walk from N
-    //following another edge (if N is not terminal) until finding a terminal
-    //node. With this we can associate to each edge the pair of facet_handle
-    //intersecting that define this edge.
-    unsigned current_node=0;
-    while (current_node!=nb_nodes){
-      if (connections[current_node].empty()){
-        ++current_node;
-        continue;
-      }
-      
-      Edge* edge=*connections[current_node].begin();
-      connections[current_node].erase(connections[current_node].begin());
-      
-      Polyline_info polyline_info;
-      std::list<typename Kernel::Point_3> polyline_embedding;
-      
-      if ( is_grabbed<std::vector<Facet_pair> >(out))
-        polyline_info.push_back(edge->first.first);
-      polyline_embedding.push_back(nodes[current_node]);
-      
-      unsigned i=current_node;
-      unsigned start_node=current_node;
-      bool reverse=false;
-      while (true){
-        i=get_other_int(edge->second,i);
-        connections[i].erase(edge);
-        
-        if (reverse) polyline_embedding.push_front(nodes[i]);
-        else         polyline_embedding.push_back(nodes[i]);
-        
-        if (i==start_node) break;
-        if (terminal_bools[i]){
-          if (reverse || terminal_bools[current_node]) break;
-          reverse=true;
-          i=current_node;
-          if ( connections[i].empty() ) break;
-        }
-        
-        edge=*connections[i].begin();
-        connections[i].erase(connections[i].begin());
-        
-        if ( is_grabbed<std::vector<Facet_pair> >(out)){
-          if (reverse) polyline_info.push_front(edge->first.first);
-          else         polyline_info.push_back(edge->first.first);
-        }
-          
-      }
-      
-      *out++=std::vector<typename Kernel::Point_3>(polyline_embedding.begin(),polyline_embedding.end());
-      if ( is_grabbed<std::vector<Facet_pair> >(out)){
-        CGAL_assertion(polyline_embedding.size()==polyline_info.size()+1);
-        *out++=std::vector<Facet_pair>(polyline_info.begin(),polyline_info.end());
-      }
-    }
-  }
-  
-//debug functions
-  
-  bool cgal_do_intersect_debug(Halfedge_handle eh,Facet_handle fh){
-    Triangle t( fh->halfedge()->vertex()->point(),
-                fh->halfedge()->next()->vertex()->point(),
-                fh->halfedge()->next()->next()->vertex()->point());
-
-    Segment s( eh->vertex()->point(),
-               eh->opposite()->vertex()->point());
-
-    return CGAL::do_intersect( s, t);
-  }
-
-  bool cgal_do_intersect_debug(Facet_handle fh1,Facet_handle fh2){
-    Triangle t1( fh1->halfedge()->vertex()->point(),
-                 fh1->halfedge()->next()->vertex()->point(),
-                 fh1->halfedge()->next()->next()->vertex()->point());
-    Triangle t2( fh2->halfedge()->vertex()->point(),
-                 fh2->halfedge()->next()->vertex()->point(),
-                 fh2->halfedge()->next()->next()->vertex()->point());
-
-
-    return CGAL::do_intersect( t1, t2);
-  }
-  
-  void print_f_to_node_debug(){
-    std::cout << "print_f_to_node_debug " << &f_to_node << std::endl;
-    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
-      std::cout << &(*(it->first.first.first)) << " " << &(*(it->first.first.second)) << " " << it->first.second << " -> {";
-      std::copy(it->second.begin(),it->second.end(),std::ostream_iterator<int>(std::cout,","));
-      std::cout << "}" <<std::endl;
-    }
-  }
-  
-  void print_graph_debug(const std::map<int,Graph_node>& graph){
-    for (typename std::map<int,Graph_node>::const_iterator it=graph.begin();it!=graph.end();++it){
-      std::cout << it->first << " -> {";
-      std::copy(it->second.neighbors.begin(),it->second.neighbors.end(),std::ostream_iterator<int>(std::cout,","));
-      std::cout << "}" <<std::endl;      
-    }
-  }
-  
-  void print_edge_to_sfacet_debug(){
-    std::cout << "Potential intersection "<< edge_to_sfacet.size() << std::endl;
-    for(typename Edge_to_intersected_facets::iterator it=edge_to_sfacet.begin();it!=edge_to_sfacet.end();++it){
-      Facet_set& fset=it->second;
-      std::cout << &fset << " fset size " << fset.size() << std::endl;
-    }
-  }
-  
-  
-  template <class OutputIterator>
-  OutputIterator main_run(OutputIterator out,bool build_polylines=true){
-    // std::cout << edge_to_sfacet.size() << std::endl;
-    int current_node=-1;
-    
-    //print_edge_to_sfacet_debug();
-    #ifndef DO_NOT_HANDLE_COPLANAR_FACETS
-    //first handle coplanar triangles
-    compute_intersection_of_coplanar_facets(current_node);
-    visitor->set_number_of_intersection_points_from_coplanar_facets(current_node+1);
-    #endif // not DO_NOT_HANDLE_COPLANAR_FACETS
-    //print_edge_to_sfacet_debug();
-    //compute intersection points of segments and triangles.
-    //build node of the graph
-    //build connectivity info
-    compute_intersection_points(current_node); // 'current_node' is passed by
-                                               // non-const reference
-    
-    if (!build_polylines){
-      visitor->finalize(nodes);
-      return out;
-    }
-    //remove duplicated intersecting edges:      
-    //  In case two facets are incident along such an edge coplanar in a facet of another polyhedron (and one extremity inside the facet), the intersection
-    //  will be reported twice. We kept track (check_coplanar_edge(s)) of this so that, we can remove one intersecting edge out of the two
-    //print_f_to_node_debug();
-    remove_duplicated_intersecting_edges();
-    
-    //std::cout << "f_to_node "<< f_to_node.size() << std::endl;
-    //print_f_to_node_debug();
-    //collect connectivity infos and create polylines
-    if ( Node_visitor::do_need_vertex_graph )
-      construct_polylines(nodes,out); //using the graph approach (at some point we know all connections between intersection points)
-    else
-      construct_polylines_with_info(nodes,out); //direct construction by propagation
-    
-    visitor->finalize(nodes);    
-    
-    return out;
-  }
-  
-public:
-  Intersection_of_Polyhedra_3():visitor(new Node_visitor()),is_default_visitor(true){}
-  Intersection_of_Polyhedra_3(Node_visitor& v):visitor(&v),is_default_visitor(false){}
-  ~Intersection_of_Polyhedra_3(){if (is_default_visitor) delete visitor;}
-  //pairwise intersection between all elements in the range
-  template <class InputIterator, class OutputIterator>
-  OutputIterator
-  operator()(InputIterator begin, InputIterator end, OutputIterator out) {
-    for(InputIterator it1=begin;it1!=end;++it1){
-      CGAL_precondition( it1->is_pure_triangle() );
-      Polyhedron_ref P=*it1;
-      visitor->new_input_polyhedron(P);
-      for(InputIterator it2=boost::next(it1);it2!=end;++it2){  
-        CGAL_precondition( it2->is_pure_triangle() );
-        Polyhedron_ref Q=*it2;
-        filter_intersections(P, Q);
-        filter_intersections(Q, P);
-      }
-    }
-    
-    return main_run(out);
-  }
-  
-  //pairwise intersection between all elements in the range
-  //(pointers version)
-  template <class InputIterator, class OutputIterator>
-  OutputIterator
-  operator()(InputIterator begin, InputIterator end, OutputIterator out, int) {
-    for(InputIterator it1=begin;it1!=end;++it1){
-      CGAL_precondition( (*it1)->is_pure_triangle() );
-      Polyhedron_ref P=**it1;
-      visitor->new_input_polyhedron(P);
-      for(InputIterator it2=boost::next(it1);it2!=end;++it2){  
-        CGAL_precondition( (*it2)->is_pure_triangle() );
-        Polyhedron_ref Q=**it2;
-        filter_intersections(P, Q);
-        filter_intersections(Q, P);
-      }
-    }
-    
-    return main_run(out);
-  }
-  
-  //intersection between P and each element in the range
-  template <class InputIterator, class OutputIterator>
-  OutputIterator
-  operator()( Polyhedron_ref P, InputIterator begin, InputIterator end, OutputIterator out) {
-    CGAL_precondition( P.is_pure_triangle() );
-    visitor->new_input_polyhedron(P);
-    for(InputIterator it=begin;it!=end;++it){
-      CGAL_precondition( it->is_pure_triangle() );
-      Polyhedron_ref Q=*it;
-      visitor->new_input_polyhedron(Q);
-      filter_intersections(P, Q);
-      filter_intersections(Q, P);
-    }
-    return main_run(out);
-  }
-  
-  //intersection between P and each element in the range
-  //(pointers version)
-  template <class InputIterator, class OutputIterator>
-  OutputIterator
-  operator()(Polyhedron_ref P, InputIterator begin, InputIterator end, OutputIterator out, int) {
-    CGAL_precondition( P.is_pure_triangle() );
-    visitor->new_input_polyhedron(P);
-    for(InputIterator it=begin;it!=end;++it){
-      CGAL_precondition( (*it)->is_pure_triangle() );
-      Polyhedron_ref Q=**it;
-      visitor->new_input_polyhedron(Q);
-      filter_intersections(P, Q);
-      filter_intersections(Q, P);
-    }
-    return main_run(out);
-  }
-  
-  //intersection between P and Q
-  template <class OutputIterator>
-  OutputIterator
-  operator()(Polyhedron_ref P, Polyhedron_ref Q, OutputIterator out) {
-    visitor->new_input_polyhedron(P);
-    visitor->new_input_polyhedron(Q);
-    filter_intersections(P, Q);
-    filter_intersections(Q, P);
-    return main_run(out);
-  }
-
-  //intersection between P and Q, only visitor called not polyline is constructed
-  void operator()(Polyhedron_ref P, Polyhedron_ref Q) {
-    visitor->new_input_polyhedron(P);
-    visitor->new_input_polyhedron(Q);
-    filter_intersections(P, Q);
-    filter_intersections(Q, P);
-    main_run(Emptyset_iterator(),false);
-  }
-};
-
-template <typename Polyhedron, typename OutputIterator>
-OutputIterator
-intersection_Polyhedron_3_Polyhedron_3(const Polyhedron& P, const Polyhedron& Q, OutputIterator out)
-{
-  return Intersection_of_Polyhedra_3<Polyhedron>()(P,Q,out);
-}
-
-}// namespace CGAL
-
-#endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_H
-
-/*
-  // Local variables for Emacs:
-  //   - set special indentation of case labels, compared to usual C/C++
-  //     indentation styles.
-  Local Variables:
-  c-file-offsets:((case-label . +))
-  End:
-*/
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h b/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h
deleted file mode 100644
index 9332d6d..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h
+++ /dev/null
@@ -1,2265 +0,0 @@
-// Copyright (c) 2011 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $UR$
-// $Id$
-//
-//
-// Author(s)     : Sebastien Loriot
-
-#ifndef CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
-#define CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
-
-#include <CGAL/intersection_of_Polyhedra_3.h>
-#include <CGAL/internal/corefinement/Polyhedron_subset_extraction.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Triangulation_vertex_base_with_info_2.h>
-#include <CGAL/Default.h>
-
-#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h> 
-
-#include <CGAL/Point_inside_polyhedron_3.h>
-#include <CGAL/property_map.h>
-#include <boost/optional.hpp>
-#include <boost/next_prior.hpp>
-
-#include <fstream>
-#include <sstream>
-
-//  TODOCUMENT
-//  --We suppose that the two input polyhedra are triangulated orientable surfaces.
-//  --Any polyhedron defines two bounding volumes: one inside and one outside.
-//    The convention used is the following: the normal of a triangle always indicates
-//    the outside of the object.
-//  --The  input polyhedra should not touch at only one point locally. If so, the current
-//    implementation just ignore it (TAG SL001)
-//  --Polyhedron type should be list-based or should guarantee no reallocation. We use maps
-//    on pointer of halfedges,facets and vertices
-//  --Polyhedral_mesh_domain requires the domain tp be closed: do not provided as input
-//    an open polyhedral surface and a polyhedron with a connected component free from intersection
-//OPTIMIZATIONS
-//  --cdt: try using intervals? in that case, only points inside the face should be considered
-//         and points on edge should be handled by hand (simply start using the point opposite to the edge)
-//  --filtered_order_around_edge: can be done using the original supporting planes
-//  --in intersection_of_Polyhedra_3: upon call to Triangle_segment_intersection_point::add_new_node, interval and exact nodes are
-//    inserted into a vector. Since we do not know the final size of vector this lead to reallocation of data.   
-//  --in Triangle_segment_intersection_point, try using EPEC instead of Interval_nt+SC<Gmpq>
-//  --use a sorted pair of indices in edge_to_hedge+simplify the code TAG_SLXX1
-//  --in sew_2_marked_darts arrange how darts are passed to avoid comparing to a Point_3
-//TODO:
-//  --validity of the embedding: points inserted in polyhedron are approximation of the real
-//    intersection points. It may happen that because of the approximation, the embedding gets
-//    wrong. To avoid this, for each new triangle created, we should make an orientation test
-//    with the approximated point to check if this is correct. If not, points must be moved
-//    within their double interval so that all triangles incident to each of these points are correctly
-//    oriented. This is probably an expensive test that can be activated only with a template parameter
-//    of something similar.
-namespace CGAL
-{
-  
-  namespace internal_IOP
-  {
-    template <class Polyhedron>
-    struct Compare_unik_address{
-      typedef typename Polyhedron::Halfedge_handle        Halfedge_handle;
-      typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
-      typedef typename Polyhedron::Halfedge               Halfedge;
-      
-      bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
-        Halfedge* ph1=&(*h1) < &(*h1->opposite()) ? &(*h1) : &(*h1->opposite());
-        Halfedge* ph2=&(*h2) < &(*h2->opposite()) ? &(*h2) : &(*h2->opposite());
-        return  ph1 < ph2; 
-      }
-
-      bool operator()(Halfedge_const_handle h1,Halfedge_const_handle h2) const {
-        const Halfedge* ph1=&(*h1) < &(*h1->opposite()) ? &(*h1) : &(*h1->opposite());
-        const Halfedge* ph2=&(*h2) < &(*h2->opposite()) ? &(*h2) : &(*h2->opposite());
-        return  ph1 < ph2; 
-      }
-    };
-
-  template <class Polyhedron>
-  struct Compare_address{
-    typedef typename Polyhedron::Halfedge_handle        Halfedge_handle;
-    typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
-    typedef typename Polyhedron::Halfedge               Halfedge;
-    
-    bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
-      return  &(*h1) < &(*h2); 
-    }
-
-    bool operator()(Halfedge_const_handle h1,Halfedge_const_handle h2) const {
-      return  &(*h1) < &(*h2); 
-    }
-  };
-
-  template <class Polyhedron>
-  class Non_intersection_halfedge{
-    typedef std::map< typename Polyhedron::Halfedge_const_handle,
-                      std::pair<int,int>,
-                      Compare_unik_address<Polyhedron> 
-                    >  Intersection_hedges_set;
-    Intersection_hedges_set intersection_hedges_;
-  public:  
-    Non_intersection_halfedge(const Intersection_hedges_set& the_set) : intersection_hedges_(the_set){}
-  
-  
-    bool operator()(typename Polyhedron::Halfedge_const_handle h) const
-    {
-      return intersection_hedges_.find(h)==intersection_hedges_.end();
-    }
-  };
-
-    
-  template <class HDS, class NestedFacetConstruct, class NewNodeVertexVisitor>
-  class Triangulate_a_face : public CGAL::Modifier_base<HDS> {
-    typedef typename HDS::Halfedge_handle Halfedge_handle;
-    typedef typename HDS::Vertex_handle   Vertex_handle;
-    typedef typename HDS::Face_handle     Face_handle;
-    typedef typename HDS::Vertex          Vertex;
-    typedef typename HDS::Halfedge        Halfedge;
-    typedef typename HDS::Face            Face;
-    
-    //data members
-    Face_handle current_face;
-    std::map<int,typename Vertex::Point >                  nodes_;
-    std::map<int,Vertex_handle>&                           node_to_polyhedron_vertex_;
-    std::map<std::pair<int,int>,Halfedge_handle>&          edge_to_hedge_;
-    std::vector<std::pair<int,int> >                       edges_to_create_;
-    std::vector<CGAL::cpp11::tuple<int,int,int> >          faces_to_create_;
-    NestedFacetConstruct facet_construct;
-    NewNodeVertexVisitor& node_vertex_visitor;
-
-    typename HDS::Halfedge::Base*
-    unlock_halfedge(Halfedge_handle h){
-      return static_cast<typename HDS::Halfedge::Base*>(&(*h));
-    }
-    
-    typename HDS::Face::Base*
-    unlock_face(Face_handle f){
-      return static_cast<typename HDS::Face::Base*>(&(*f));
-    }    
-    
-  public:
-    
-    template <class Nodes_vector,class Triangulation>
-    Triangulate_a_face( Face_handle face,
-                        const Nodes_vector& nodes,
-                        const std::vector<int>& node_ids,
-                        std::map<int,Vertex_handle>& node_to_polyhedron_vertex,
-                        std::map<std::pair<int,int>,Halfedge_handle>& edge_to_hedge,
-                        const Triangulation& triangulation,
-                        const NestedFacetConstruct& fc,
-                        NewNodeVertexVisitor& nv)
-    :current_face(face), node_to_polyhedron_vertex_(node_to_polyhedron_vertex), edge_to_hedge_(edge_to_hedge), facet_construct(fc), node_vertex_visitor(nv)
-    {
-      //grab vertices to be inserted to copy them from the vector
-      for (std::vector<int>::const_iterator it=node_ids.begin();it!=node_ids.end();++it)
-      {
-        nodes_.insert(std::make_pair(*it,nodes[*it]));
-      }
-      //grab edges that are not on the convex hull (these have already been created)
-      for (typename Triangulation::Finite_edges_iterator 
-        it=triangulation.finite_edges_begin();
-        it!=triangulation.finite_edges_end();
-        ++it)
-      {
-        typename Triangulation::Vertex_handle v0=it->first->vertex((it->second+1)%3);
-        typename Triangulation::Vertex_handle v1=it->first->vertex((it->second+2)%3);
-        //warning in degenerate cases you can insert outsite expected convex hull edges: need exact here.
-        //an alternative is to test if one the incident faces are infinite (cf assertion below)
-        if ( edge_to_hedge_.find(std::make_pair(v0->info(),v1->info()))==edge_to_hedge_.end() &&
-             edge_to_hedge_.find(std::make_pair(v1->info(),v0->info()))==edge_to_hedge_.end()    )
-        {
-          edges_to_create_.push_back( std::make_pair(v0->info(),v1->info()) );
-        }
-        else
-            CGAL_assertion( triangulation.is_infinite(it->first->vertex(it->second)) || triangulation.is_infinite( triangulation.mirror_vertex(it->first,it->second)) );
-      }
-      //grab triangles.
-      for (typename Triangulation::Finite_faces_iterator 
-        it=triangulation.finite_faces_begin();
-        it!=triangulation.finite_faces_end();
-        ++it)
-      {
-        typename Triangulation::Vertex_handle v0=it->vertex(0);
-        typename Triangulation::Vertex_handle v1=it->vertex(1);
-        typename Triangulation::Vertex_handle v2=it->vertex(2);
-        //warning in degenerate case we can have non wanted triangles: need exact here
-        faces_to_create_.push_back( CGAL::cpp11::make_tuple( v0->info(),v1->info(),v2->info() ) );
-      }
-    }
-
-
-  
-    void operator()( HDS& hds) {
-//      std::cerr << "node_to_polyhedron_vertex_"<< std::endl;
-//      for (typename std::map<int,Vertex_handle>::iterator it=node_to_polyhedron_vertex_.begin();it!=node_to_polyhedron_vertex_.end();++it)
-//        std::cerr << it->first << " " << &(*(it->second)) << std::endl;
-      
-      //insert the intersection point interior to the face inside the polyhedron and
-      //save their Polyhedron::vertex_handle 
-      for (typename std::map<int,typename Vertex::Point>::iterator it=nodes_.begin();it!=nodes_.end();++it)
-      {
-        Vertex_handle v=hds.vertices_push_back(Vertex(it->second));
-        node_vertex_visitor.new_vertex_added(it->first, v);
-        CGAL_assertion( node_to_polyhedron_vertex_.find( it->first ) == node_to_polyhedron_vertex_.end());
-        node_to_polyhedron_vertex_.insert( std::make_pair(it->first,v) );
-//        std::cerr << "vertices " << it->first  << " " << &(*v) << std::endl;
-      }
-      
-      //insert the new halfedge and set their incident vertex
-      for (typename std::vector<std::pair<int,int> >::iterator 
-        it=edges_to_create_.begin();it!=edges_to_create_.end();++it)
-      {
-        Halfedge_handle he=hds.edges_push_back(Halfedge(),Halfedge());
-        
-        //associate edge <i,j> to halfedge going from i to j with j as incident vertex
-        CGAL_assertion(node_to_polyhedron_vertex_.find(it->second)!= node_to_polyhedron_vertex_.end());
-        Vertex_handle v=node_to_polyhedron_vertex_.find(it->second)->second;
-        unlock_halfedge(he)->set_vertex( v );
-        v->set_halfedge(he);
-//        std::cerr << "  --in edge " << &(*v) << std::endl;
-        edge_to_hedge_.insert( std::make_pair(*it,he) ); 
-        v=node_to_polyhedron_vertex_.find(it->first)->second;
-//        std::cerr << "  --in edge " << &(*v) << std::endl;
-        unlock_halfedge( he->opposite() )->set_vertex( v );
-        v->set_halfedge(he->opposite());
-        edge_to_hedge_.insert( std::make_pair(std::make_pair(it->second,it->first),he->opposite()) );
-//        std::cerr << "edges " << it->first <<  " " << it->second << std::endl;
-      }
-      
-      std::vector<CGAL::cpp11::tuple<int,int,int> >::iterator it=faces_to_create_.begin();
-      Face_handle face_triangulated = current_face;
-      //create the new faces and update adjacencies
-      while (true)
-      {
-        int i=cpp11::get<0>(*it),j=cpp11::get<1>(*it),k=cpp11::get<2>(*it);
-//        std::cerr << "faces " << i <<  " " << j  << " " << k<< std::endl;        
-        Halfedge_handle current  = edge_to_hedge_.find(std::make_pair(i,j))->second;
-        Halfedge_handle next     = edge_to_hedge_.find(std::make_pair(j,k))->second;
-        Halfedge_handle previous = edge_to_hedge_.find(std::make_pair(k,i))->second;
- 
-
-        CGAL_assertion (edge_to_hedge_.find(std::make_pair(i,j))!=edge_to_hedge_.end());
-        CGAL_assertion (edge_to_hedge_.find(std::make_pair(j,k))!=edge_to_hedge_.end());
-        CGAL_assertion (edge_to_hedge_.find(std::make_pair(k,i))!=edge_to_hedge_.end());
-        
-        CGAL_assertion(current->vertex()==node_to_polyhedron_vertex_.find(j)->second);
-        CGAL_assertion(next->vertex()==node_to_polyhedron_vertex_.find(k)->second);
-        CGAL_assertion(previous->vertex()==node_to_polyhedron_vertex_.find(i)->second);
-        
-        unlock_halfedge(current)->set_next(next);
-        unlock_halfedge(next)->set_next(previous);
-        unlock_halfedge(previous)->set_next(current);
-        
-        unlock_halfedge(current)->set_prev(previous);
-        unlock_halfedge(next)->set_prev(current);
-        unlock_halfedge(previous)->set_prev(next);
-        
-        //update face halfedge
-        unlock_face(current_face)->set_halfedge(current);
-        
-        //update face of halfedges
-        unlock_halfedge(current)  ->set_face(current_face);
-        unlock_halfedge(next)     ->set_face(current_face);
-        unlock_halfedge(previous) ->set_face(current_face);        
-        
-        if ( ++it!=faces_to_create_.end() )
-          current_face=hds.faces_push_back( facet_construct(*face_triangulated) );
-        else
-          break;
-      }
-    }
-  };    
- 
-  } //namespace internal_IOP
-
-  
-//Considering the plane with normal vector [O_prime,O] and containing O. 
-//We define the counterclockwise order around O when looking from the side of the plane 
-//into which the vector [O_prime,O] is pointing.
-//We consider the portion of the plane defined by rotating a ray starting at O
-//from the planar projection of P1 to the planar projection of P2 in counterclockwise order.
-//The predicates indicates whether the planar projection of point Q lies in this portion of the plane.
-//Preconditions:
-//  O_prime,O,P1 are not collinear
-//  O_prime,O,P2 are not collinear
-//  O_prime,O,Q are not collinear
-//  O_prime,O,P1,Q are not coplanar or coplanar_orientation(O,O_prime,P1,Q)==NEGATIVE
-//  O_prime,O,P2,Q are not coplanar or coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE
-template <class Kernel>
-bool  is_in_interior_of_object(
-    const typename Kernel::Point_3& O_prime,const typename Kernel::Point_3& O,
-    const typename Kernel::Point_3& P1,const typename Kernel::Point_3& P2,
-    const typename Kernel::Point_3& Q)
-{
-  //guarantee to have non-flat triangles
-  CGAL_precondition( !collinear(O_prime,O,P1) );
-  CGAL_precondition( !collinear(O_prime,O,P2) );
-  CGAL_precondition( !collinear(O_prime,O,Q)  );
-
-  //no two triangles are coplanar and on the same side of their common edge
-  CGAL_precondition( !coplanar(O_prime,O,P1,Q) || coplanar_orientation(O,O_prime,P1,Q)==NEGATIVE );
-  CGAL_precondition( !coplanar(O_prime,O,P2,Q) || coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE );
-  
-  Sign s0 = sign( determinant(O-O_prime,P1-O,P2-O) );
-  
-  if ( s0==ZERO ){
-    //O, O_prime, P1 and P2 are coplanar
-    Orientation o=orientation(O_prime,O,P1,Q);
-    CGAL_precondition(o!=COPLANAR);
-    return o==POSITIVE;
-  }
-  
-  //O, O_prime, P1 and P2 are not coplanar
-  Sign s1 = sign( determinant(O-O_prime,P1-O,Q -O) );
-  Sign s2 = sign( determinant(O-O_prime,Q -O,P2-O) );
-
-  if (s0 == POSITIVE) // the angle P1,O,P2 is smaller that Pi.
-    return ( s1 == POSITIVE ) && ( s2 ==POSITIVE ); //true if the angles P1,O,Q and Q,O,P2 are smaller than Pi
-  else
-    return ( s1 != NEGATIVE ) || ( s2 != NEGATIVE ); //true if the angle P1,O,Q or the angle Q,O,P2 is smaller than or equal to Pi
-}
-
-//import into the combinatorial map facets in the given range.
-//they are supposed to be in the same connected component.
-//two volume are created (each facets gives two opposite orientation 2-cell in the map)
-template<class Polyhedron, class Map, class Face_iterator, class Non_special_edge_predicate,class Halfedge_to_dart_map_ >
-typename Map::Dart_handle import_from_polyhedron_subset(  Map& amap,
-                                                          Face_iterator faces_begin,
-                                                          Face_iterator faces_end,
-                                                          const Non_special_edge_predicate& is_non_special_edge,
-                                                          Halfedge_to_dart_map_& selected_hedge_to_dart,
-                                                          int mark_index
-  )
-{
-  typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
-  typedef std::map < Halfedge_const_handle, typename Map::Dart_handle,internal_IOP::Compare_address<Polyhedron> > Halfedge_to_dart_map;
-   
-  Halfedge_to_dart_map hedge_to_dart;
-  typename Map::Dart_handle first_dart = NULL;
-  // First traversal to build the darts and link them.
-  for (Face_iterator it_face = faces_begin; it_face != faces_end; ++it_face)
-  {
-    Halfedge_const_handle start=(*it_face)->halfedge();
-    
-    CGAL_precondition(start->next()!=start);
-    
-    Halfedge_const_handle current=start;
-    typename Map::Dart_handle prev = NULL;
-    typename Map::Dart_handle first_dart_of_face = NULL;
-    do
-    {
-      typename Map::Dart_handle d = amap.create_dart();
-      amap.template link_beta<3>(d,amap.create_dart()); //for opposite volume
-      hedge_to_dart[current] = d;
-             
-      if (prev != NULL){
-        amap.template link_beta<1>(prev, d);
-        amap.template link_beta<1>(d->beta(3),prev->beta(3));//for opposite volume
-      }
-      else 
-      {
-        first_dart_of_face = d;
-        if (first_dart==NULL) first_dart=d;
-      }
-      
-      if ( is_non_special_edge (current) ){
-        if ( !current->is_border_edge() ){
-          CGAL_assertion(current != current->opposite());
-          typename Halfedge_to_dart_map::iterator it = hedge_to_dart.find(current->opposite());
-          if (it != hedge_to_dart.end()){ //link the opposites halfedges only when both corresponding darts have been created
-            amap.template link_beta<2>(d, it->second);
-            amap.template link_beta<2>(d->beta(3), it->second->beta(3));//for opposite volume
-          }
-        }
-      }
-      else{
-        typename Halfedge_to_dart_map_::iterator it_hedge_map=selected_hedge_to_dart.find(current);
-         //all marked hedges are not the selected one for its polyline
-        if ( it_hedge_map!=selected_hedge_to_dart.end() ) it_hedge_map->second=d;
-        //darts d and d->beta(3) are special edges
-        amap.mark(d,mark_index);
-        amap.mark(d->beta(3),mark_index);
-      }
-      prev = d;
-      current=current->next();
-    }
-    while (current != start);
-    amap.template link_beta<1>(prev, first_dart_of_face);
-    amap.template link_beta<1>(first_dart_of_face->beta(3),prev->beta(3));//for opposite volume
-  }
-
-  // Second traversal to update the geometry.
-  // We run one again through the facets of the HDS.
-  for (Face_iterator it_face = faces_begin; it_face != faces_end; ++it_face)
-  {
-    Halfedge_const_handle start=(*it_face)->halfedge();
-    Halfedge_const_handle current=start;
-    do
-    {
-      typename Map::Dart_handle d = hedge_to_dart[current]; // Get the dart associated to the Halfedge
-      if (d->template attribute<0>() == NULL)
-      {	    
-        amap.template set_attribute<0>(d,
-           amap.template create_attribute<0>(current->opposite()->vertex()->point()));
-      }
-      current=current->next();
-    }
-    while (current != start);
-  }
-  
-  return first_dart;
-}
-
- //turn around the target vertex of dart to find a marked dart
-template <class Combinatorial_map_3>
-boost::optional<typename Combinatorial_map_3::Dart_handle> 
-next_marked_dart_around_target_vertex(
-  const Combinatorial_map_3& final_map,
-  typename Combinatorial_map_3::Dart_handle dart,
-  int mark_index)
-{
-  CGAL_precondition(final_map.is_marked(dart,mark_index));
-  typename Combinatorial_map_3::Dart_handle next=dart->beta(1);
-  while ( ! final_map.is_marked(next,mark_index) ){
-    if (next->is_free(2) )//we reach a boundary
-      return  boost::optional<typename Combinatorial_map_3::Dart_handle>();
-    next=next->beta(2)->beta(1);
-  }
-  if (next == dart) //no new dart have been found  
-    return  boost::optional<typename Combinatorial_map_3::Dart_handle>();
-  CGAL_precondition(&dart->beta(1)->template attribute<0>()->point() == &next->template attribute<0>()->point());
-  return boost::optional<typename Combinatorial_map_3::Dart_handle> (next);
-}
-
-//turn around the target vertex of dart to find a marked dart
-//with expected_target as target vertex
-template <class Combinatorial_map_3>
-typename Combinatorial_map_3::Dart_handle
-get_next_marked_dart_around_target_vertex(
-  const Combinatorial_map_3& final_map,
-  typename Combinatorial_map_3::Dart_handle dart,
-  int mark_index)
-{
-  CGAL_precondition(final_map.is_marked(dart,mark_index));
-  typename Combinatorial_map_3::Dart_handle next=dart->beta(1);
-  while ( !final_map.is_marked(next,mark_index) ){
-    CGAL_assertion( !next->is_free(2) );
-    next=next->beta(2)->beta(1);
-    CGAL_assertion(next != dart);
-  }
-  CGAL_precondition(&dart->beta(1)->template attribute<0>()->point() == &next->template attribute<0>()->point());
-  return next;
-}
-
-//turn around the source vertex of dart to find a marked dart
-//with expected_source as source vertex
-template <class Combinatorial_map_3>
-typename Combinatorial_map_3::Dart_handle 
-get_next_marked_dart_around_source_vertex(  
-  const Combinatorial_map_3& final_map,
-  typename Combinatorial_map_3::Dart_handle dart,
-  int mark_index)
-{
-  CGAL_precondition(final_map.is_marked(dart,mark_index));
-  typename Combinatorial_map_3::Dart_handle next=dart->beta(0);
-  while ( ! final_map.is_marked(next,mark_index) ){ 
-    CGAL_assertion( !next->is_free(2) );
-    next=next->beta(2)->beta(0);
-    CGAL_assertion(next != dart);
-  }
-  CGAL_precondition(&dart->template attribute<0>()->point() == &next->beta(1)->template attribute<0>()->point());
-  return next;
-}
-
-//given two marked darts, this function links these two darts with beta<2>
-//but in addition it follows the marked darts connected to the same vertex
-//(there should be only one) to connect them all together
-//( this function is a kind of zipper ;) )
-template <class Combinatorial_map_3,class Nodes_vector>
-void sew_2_marked_darts( Combinatorial_map_3& final_map,
-                         typename Combinatorial_map_3::Dart_handle dart_1 , 
-                         typename Combinatorial_map_3::Dart_handle dart_2 ,
-                         int mark_index,
-                         const Nodes_vector& nodes,
-                         const std::pair<int,int>& indices,
-                         const std::pair<bool,int>& polyline_info)
-{
-  CGAL_precondition( dart_1->is_free(2) );
-  CGAL_precondition( dart_2->is_free(2) );
-  CGAL_precondition( final_map.is_marked(dart_1,mark_index) );
-  CGAL_precondition( final_map.is_marked(dart_2,mark_index) );
-  CGAL_precondition( dart_1->template attribute<0>()->point() == dart_2->beta(1)->template attribute<0>()->point() );
-  CGAL_precondition( dart_1->beta(1)->template attribute<0>()->point() == dart_2->template attribute<0>()->point() );
-  
-  int src_index = ( ( indices.first < indices.second) ==  polyline_info.first )
-                  ? indices.second:indices.first;
-  
-  if ( dart_1->template attribute<0>()->point() != nodes[ src_index ] ) std::swap(dart_1,dart_2);
-  
-  int nb_segs=polyline_info.second-1,k=1;
-  
-  do{
-    CGAL_precondition( final_map.template is_sewable<2>(dart_1,dart_2) );
-    final_map.template sew<2>(dart_1,dart_2);
-    
-    if (k==nb_segs) break;
-      
-    dart_1=get_next_marked_dart_around_target_vertex(final_map,dart_1,mark_index);
-    dart_2=get_next_marked_dart_around_source_vertex(final_map,dart_2,mark_index);
-  }
-  while(++k);
-}
-
-//not_top and not_down are two darts from volumes that get merged with an existing
-//other one because of a set of identical coplanar triangles.
-//top and down is the dart of the volumes "replacing" that of not_top and not down respectively, 
-//The function is considering all triangles that are bounded by a cycle of marked edges.
-//The volume not_top and not_down are part of are those that will disappear at the
-//end of the main algorithm.
-//( this function is a kind of facet gluer ;) )
-template <class Combinatorial_map_3>
-void sew_3_marked_darts( Combinatorial_map_3& final_map,
-                         typename Combinatorial_map_3::Dart_handle not_top , 
-                         typename Combinatorial_map_3::Dart_handle not_down ,
-                         typename Combinatorial_map_3::Dart_handle top , 
-                         typename Combinatorial_map_3::Dart_handle down ,
-                         int mark_index,
-                         std::set<typename Combinatorial_map_3::Dart_handle>& darts_to_remove)
-{
-  typedef boost::optional<typename Combinatorial_map_3::Dart_handle> O_Dart_handle;
-
-  if ( not_top->template attribute<3>()->info().is_empty ){
-    CGAL_assertion(not_down->template attribute<3>()->info().is_empty);
-    return;
-  }
-   
-  CGAL_assertion(!not_down->template attribute<3>()->info().is_empty);
-
-  //merge attribute of the two volumes:
-  internal_IOP::Volume_on_merge merge_attributes;
-  merge_attributes(*top->template attribute<3>(),*not_top->template attribute<3>());
-  merge_attributes(*down->template attribute<3>(),*not_down->template attribute<3>());
-  
-  //set volume attributes as empty to avoid double sew_3 of the same topological disk of triangles
-  not_top->template attribute<3>()->info().is_empty=true;
-  not_down->template attribute<3>()->info().is_empty=true;
-  
-  CGAL_precondition( final_map.is_marked(not_top,mark_index) && final_map.is_marked(top,mark_index) );
-  CGAL_precondition( final_map.is_marked(not_down,mark_index) && final_map.is_marked(down,mark_index) );
-  CGAL_precondition( not_top->template attribute<0>()->point() == not_down->beta(1)->template attribute<0>()->point() );
-  CGAL_precondition( not_top->beta(1)->template attribute<0>()->point() == not_down->template attribute<0>()->point() );
-  CGAL_precondition( not_top->template attribute<0>()->point() == top->template attribute<0>()->point() );
-  CGAL_precondition( not_down->template attribute<0>()->point() == down->template attribute<0>()->point() );
-  
-  CGAL_assertion( top->beta(3)==down );
-
-  //set to be removed the darts of the two no longer used volumes
-  typename Combinatorial_map_3::Dart_handle start=not_top;
-  do
-  {
-    CGAL_assertion(!not_top->is_free(3));
-    darts_to_remove.insert(not_top);   darts_to_remove.insert(not_top->beta(1)); darts_to_remove.insert(not_top->beta(1)->beta(1));
-    darts_to_remove.insert(not_top->beta(3));   darts_to_remove.insert(not_top->beta(3)->beta(1)); darts_to_remove.insert(not_top->beta(3)->beta(1)->beta(1));
-    O_Dart_handle current_1=next_marked_dart_around_target_vertex(final_map,not_top,mark_index);
-    CGAL_precondition(bool(current_1));
-    not_top=*current_1;
-  }
-  while(not_top!=start);
-}
-
-template<class Polyhedron>
-struct Dummy_edge_mark_property_map{
-  typedef bool value_type;
-  typedef value_type reference;
-  typedef std::pair<typename Polyhedron::Halfedge_handle,Polyhedron*> key_type;
-  typedef boost::read_write_property_map_tag category;  
-
-  Dummy_edge_mark_property_map(){}
-
-  friend reference get(Dummy_edge_mark_property_map,key_type) {return false;}
-  friend void put(Dummy_edge_mark_property_map,key_type,value_type) {}
-};
-
-template <class Polyhedron>
-struct Default_facet_construct{
-  typename Polyhedron::Facet operator()( const typename Polyhedron::Facet& )
-  { return typename Polyhedron::Facet(); }
-};
-
-template <class Polyhedron>
-struct Default_node_vertex_visitor{
-  void new_node_added(  int /* node_id */,
-                        internal_IOP::Intersection_type /* type */,
-                        typename Polyhedron::Halfedge_handle /* principal_edge */,
-                        typename Polyhedron::Halfedge_handle /* additional_edge */,
-                        bool /* is_vertex_coplanar */,
-                        bool /* is_vertex_opposite_coplanar */ )
-  {}
-
-  void new_vertex_added(int /* node_id */, typename Polyhedron::Vertex_handle /* vh */){}
-};
-
-template< class Polyhedron,
-          class Kernel_=Default,
-          class EdgeMarkPropertyMap_=Default,
-          class NestedFacetConstruct_=Default,
-          class NewNodeVertexVisitor_=Default
-        >
-class Node_visitor_refine_polyhedra{
-//Default typedefs
-  typedef typename Default::Get<Kernel_, typename Polyhedron::Traits::Kernel>::type Kernel;
-  typedef typename Default::Get<EdgeMarkPropertyMap_, Dummy_edge_mark_property_map<Polyhedron> >::type EdgeMarkPropertyMap;
-  typedef typename Default::Get<NestedFacetConstruct_, Default_facet_construct<Polyhedron > >::type NestedFacetConstruct;
-  typedef typename Default::Get<NewNodeVertexVisitor_, Default_node_vertex_visitor<Polyhedron> >::type NewNodeVertexVisitor;
-//typedefs  
-  typedef typename Polyhedron::Halfedge_handle                         Halfedge_handle;
-  typedef typename Polyhedron::Halfedge_const_handle                   Halfedge_const_handle;
-  typedef typename Polyhedron::Face_handle                             Face_handle;
-  typedef typename Polyhedron::Halfedge                                Halfedge;
-  typedef typename Polyhedron::Vertex_handle                           Vertex_handle;
-  typedef internal_IOP::Compare_handles<Polyhedron,CGAL::Tag_false>    Cmp_handle; //This ensures uniqueness of edges when comparing halfedges
-  typedef internal_IOP::Compare_unik_address<Polyhedron>               Cmp_unik_ad; //This ensures uniqueness of edges when comparing halfedges
-  
-  //constrained triangulation used for triangulation interior of faces
-  #ifdef DO_NO_USE_EXACT_CDT 
-  typedef CGAL::Triangulation_vertex_base_with_info_2<int,Kernel>       Vbi;
-  typedef CGAL::Constrained_triangulation_face_base_2<Kernel>           Fb;
-  typedef CGAL::Triangulation_data_structure_2<Vbi,Fb>                  TDS_2;
-  typedef CGAL::Constrained_Delaunay_triangulation_2<Kernel,TDS_2,CGAL::No_intersection_tag> CDT;  //DO WE NEED DELAUNAY????
-  #else
-  /// \todo change this, use it only if not already exact
-  typedef CGAL::Exact_predicates_exact_constructions_kernel             Exact_kernel;
-  typedef CGAL::Triangulation_vertex_base_with_info_2<int,Exact_kernel> Vbi;
-  typedef CGAL::Constrained_triangulation_face_base_2<Exact_kernel>           Fb;
-  typedef CGAL::Triangulation_data_structure_2<Vbi,Fb>                  TDS_2;
-  typedef CGAL::Constrained_Delaunay_triangulation_2<Exact_kernel,TDS_2,CGAL::No_intersection_tag> CDT;  //DO WE NEED DELAUNAY????  
-  #endif
-  
-  typedef std::map<Halfedge_handle,Polyhedron*,Cmp_unik_ad>            Hedge_to_polyhedron_map;
-
-  typedef std::vector<int>                                             Node_ids;
-  typedef std::set<int>                                                Node_id_set; //avoid having duplicated node on edge of coplanar triangles
-  typedef std::map< Face_handle,Node_ids,Cmp_handle >                  In_face_map; 
-  typedef std::map< Halfedge_handle,Node_id_set,Cmp_unik_ad >          In_halfedge_map;
-  //to keep the correspondance between node_id and vertex_handle in each polyhedron
-  typedef std::map<int,Vertex_handle> Node_to_polyhedron_vertex_map;
-  typedef std::map<Polyhedron*, Node_to_polyhedron_vertex_map > Poly_to_map_node;
-  //to maintain an polyhedron halfedge on each polyline + pair<bool,int>
-  //with first = "is the key (pair<int,int>) was reversed?" and second is the number of edges +1 in the polyline
-  typedef std::map< std::pair<int,int>, std::pair< std::map<Polyhedron*,Halfedge_handle>,std::pair<bool,int> > > An_edge_per_polyline_map;  
-  //to handle coplanar halfedge of polyhedra that are full in the intersection
-  typedef std::map< int,Halfedge_handle >                              Node_to_target_of_hedge_map;
-  typedef std::map< Polyhedron*,Node_to_target_of_hedge_map>           Poly_to_vertices_on_intersection_map;
-
-  //Combinatorial map typedefs
-  typedef internal_IOP::Item_with_points_and_volume_info<Kernel,Polyhedron> Items;
-  typedef CGAL::Combinatorial_map<3,Items> Combinatorial_map_3_;
-  typedef typename Combinatorial_map_3_::Dart_handle Dart_handle;
-  
-//data members
-  Hedge_to_polyhedron_map               hedge_to_polyhedron;
-  In_face_map                           in_face;
-  In_halfedge_map                       in_hedge;
-  std::map< int,std::set<int> >         graph_of_constraints;
-  std::map< int,std::set<int> >         coplanar_constraints;
-  An_edge_per_polyline_map              an_edge_per_polyline;
-  typename An_edge_per_polyline_map::iterator last_polyline;
-  Poly_to_vertices_on_intersection_map  poly_to_vertices_on_inter;
-  Poly_to_map_node                      polyhedron_to_map_node_to_polyhedron_vertex;
-  std::set<int>                         non_manifold_nodes; //contain nodes that are original vertices of input polyhedron and that neighborhood is not a topological disk
-  std::map<Vertex_handle,int>           nodes_that_are_original_vertices;//to keep the correspondance between original polyhedron vertices that are also nodes
-  
-  Combinatorial_map_3_*                 final_map_ptr;
-  Combinatorial_map_3_&                 final_map() {return *final_map_ptr;}
-  bool final_map_comes_from_outside;
-  //   new_hedge    hedge
-  //  ----------->   ----------->
-  //               v
-  //  <-----------   <-----------
-  //   new_opposite     opposite 
-  //  
-  Vertex_handle split_edge( Halfedge_handle hedge,
-                            const typename Kernel::Point_3& point,
-                            Polyhedron& P)
-  {
-    internal_IOP::Split_halfedge_at_point<typename Polyhedron::HalfedgeDS> delegated(hedge,point);
-    P.delegate( delegated );
-    CGAL_assertion(P.is_valid());
-    
-    //update marker tags. If the edge was marked, then the resulting edges in the split must be marked
-    if ( get(m_edge_mark_pmap,std::make_pair(hedge,&P)) )
-    {
-      CGAL_assertion( get(m_edge_mark_pmap,std::make_pair(hedge->opposite(),&P)) );
-      put(m_edge_mark_pmap,std::make_pair(hedge->prev(),&P),true);
-      put(m_edge_mark_pmap,std::make_pair(hedge->prev()->opposite(),&P),true);
-      put(m_edge_mark_pmap,std::make_pair(hedge->opposite()->next(),&P),true);
-      put(m_edge_mark_pmap,std::make_pair(hedge->opposite()->next()->opposite(),&P),true);
-    }
-    
-    Vertex_handle v=boost::prior(P.vertices_end());
-    CGAL_assertion(v->point()==point);
-    return v;
-  }
-
-  //sort node ids so that we can split the hedge
-  //consecutively
-  template <class Nodes_vector>
-  void sort_vertices_along_hedge(std::vector<int>& node_ids,Halfedge_handle hedge,const Nodes_vector& nodes)
-  {
-    std::sort(node_ids.begin(),
-              node_ids.end(),
-              internal_IOP::Order_along_a_halfedge<Polyhedron,Nodes_vector,Is_polyhedron_const>(hedge,nodes)
-    );
-  }
-  
-  //insert intersection as constrained edges  in a CDT triangulation
-  template <class CDT>
-  void insert_constrained_edges_coplanar_case(int node_id,
-                                              CDT& triangulation,
-                                              std::map<int,typename CDT::Vertex_handle>& id_to_CDT_vh)
-  {
-    if (node_id < number_coplanar_vertices){
-      //XSL_TAG_CPL_VERT
-      //Insert constrained edges from coplanar facets that have been retriangulated. This ensure that triangulations are compatible
-      std::map< int,std::set<int> >::iterator it_neighbors=coplanar_constraints.find(node_id);
-      if (it_neighbors!=coplanar_constraints.end())
-      {
-        typename CDT::Vertex_handle vh=id_to_CDT_vh.find(node_id)->second;
-        for (std::set<int>::iterator it_n=it_neighbors->second.begin();it_n!=it_neighbors->second.end();++it_n){
-          typename std::map<int,typename CDT::Vertex_handle>::iterator it_vh=id_to_CDT_vh.find(*it_n);
-          // this condition ensures to consider only graph edges that are in the same triangle (not in a neighbor one when involving node on a triangle edge)
-          // here we can't make the difference between a point on the interior or the boundary, so points_on_triangle is not used.
-          if ( it_vh!=id_to_CDT_vh.end() ){
-            triangulation.insert_constraint(vh,id_to_CDT_vh.find(*it_n)->second);
-          }
-        }
-      }
-    }
-  }
-  //insert intersection as constrained edges  in a CDT triangulation
-  template <class CDT,class Constrained_edges_map>
-  void insert_constrained_edges(Node_ids& node_ids, //index of vertices we are interested in
-                                CDT& triangulation,
-                                std::map<int,typename CDT::Vertex_handle>& id_to_CDT_vh,
-                                Constrained_edges_map& constrained_edges, //list of pair of int to indicate edges that are constrained
-                                bool points_on_triangle=false)
-  {
-    for (Node_ids::iterator it_node_id=node_ids.begin();it_node_id!=node_ids.end();++it_node_id){
-      std::map< int,std::set<int> >::iterator it_neighbors=graph_of_constraints.find(*it_node_id);
-      if (it_neighbors!=graph_of_constraints.end())
-      {
-        typename CDT::Vertex_handle vh=id_to_CDT_vh.find(*it_node_id)->second;
-        for (std::set<int>::iterator it_n=it_neighbors->second.begin();it_n!=it_neighbors->second.end();++it_n){
-          typename std::map<int,typename CDT::Vertex_handle>::iterator it_vh=id_to_CDT_vh.find(*it_n);
-          // this condition ensures to consider only graph edges that are in the same triangle (not in a neighbor one when involving node on a triangle edge)
-          if ( !points_on_triangle || it_vh!=id_to_CDT_vh.end() ){ 
-            CGAL_assertion(it_vh!=id_to_CDT_vh.end());
-            triangulation.insert_constraint(vh,id_to_CDT_vh.find(*it_n)->second);
-            constrained_edges.push_back(std::make_pair(*it_node_id,*it_n));
-          }
-        }
-      }
-      #ifdef CGAL_COREFINEMENT_DEBUG
-      else
-      {
-        std::cout << "X0: Found an isolated point" << std::endl;
-      }
-      #endif
-      
-      insert_constrained_edges_coplanar_case(*it_node_id,triangulation,id_to_CDT_vh);
-    }
-  }
-  
-  std::pair<int,int> make_sorted_pair(int i,int j) const {return i<j ? std::make_pair(i,j):std::make_pair(j,i);} 
-  
-  void update_edge_per_polyline(Polyhedron* P,std::pair<int,int> indices,typename Polyhedron::Halfedge_handle hedge)
-  {
-    std::pair<int,int> sorted_pair=make_sorted_pair(indices.first,indices.second);
-    typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.find(sorted_pair);
-    if (it!=an_edge_per_polyline.end()){
-      it->second.first.insert(std::make_pair( P,sorted_pair.first==indices.first?hedge:hedge->opposite() ));
-    }
-  }
-
-  int node_index_of_incident_vertex(Halfedge_const_handle h,
-                                    const std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad >& border_halfedges)
-  {
-    //WARNING this may be expensive
-    typedef std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad > Border_halfedges_map;
-
-    Halfedge_const_handle start=h;
-    Halfedge_const_handle curr=start;
-    do{
-      typename Border_halfedges_map::const_iterator it_border=border_halfedges.find( curr );
-      if (it_border!=border_halfedges.end())
-        return it_border->first==curr?it_border->second.second:it_border->second.first;      
-      curr=curr->next()->opposite();
-    }while(curr!=start);
-    
-    return -1;
-  }
-  
-  template <class Nodes_vector>
-  bool filtered_order_around_edge(int O_prime_index,
-                                  int O_index,
-                                  int P1_index,
-                                  int P2_index,
-                                  int Q_index,
-                                  Vertex_handle P1,
-                                  Vertex_handle P2,
-                                  Vertex_handle Q,
-                                  const Nodes_vector& nodes)
-  {
-    try{
-      return is_in_interior_of_object<typename Nodes_vector::Ikernel>(
-        nodes.interval_node(O_prime_index),
-        nodes.interval_node(O_index),
-        P1_index == -1 ? nodes.to_interval(P1->point()): nodes.interval_node(P1_index),
-        P2_index == -1 ? nodes.to_interval(P2->point()): nodes.interval_node(P2_index),
-        Q_index  == -1 ? nodes.to_interval(Q->point()) : nodes.interval_node(Q_index )
-      );
-    }
-    catch(Uncertain_conversion_exception&){
-      return is_in_interior_of_object<typename Nodes_vector::Exact_kernel>(
-        nodes.exact_node(O_prime_index),
-        nodes.exact_node(O_index),
-        P1_index == -1 ? nodes.to_exact(P1->point()): nodes.exact_node(P1_index),
-        P2_index == -1 ? nodes.to_exact(P2->point()): nodes.exact_node(P2_index),
-        Q_index  == -1 ? nodes.to_exact(Q->point()) : nodes.exact_node(Q_index )
-      );
-    }
-  }
-
-//keep track of the fact that a polyhedron original vertex is a node
-void all_incident_faces_got_a_node_as_vertex(Halfedge_handle incident_to_vertex_edge,int node_id)
-{
-  nodes_that_are_original_vertices.insert(std::make_pair(incident_to_vertex_edge->vertex(),node_id));
-}
-
-//if an original polyhedron vertex is also a node, do no use a fake id
-void set_triangle_boundary_indices(
-  Vertex_handle* triangle_boundary,
-  int* triangle_boundary_indices)
-{
-  triangle_boundary_indices[0]=-1;
-  triangle_boundary_indices[1]=-2;
-  triangle_boundary_indices[2]=-3;
-  
-  for (int k=0;k<3;++k){
-    typename std::map<Vertex_handle,int>::iterator it=nodes_that_are_original_vertices.find(triangle_boundary[k]);
-    if (it!=nodes_that_are_original_vertices.end())
-      triangle_boundary_indices[k]=it->second;
-  }
-}
-
-//======================================================================//
-//functions internally used to glue piece of the final combinatorial map//
-//======================================================================//
-
-
-  //-----first polyhedron
-template <class Halfedge_to_dart_map>
-inline Dart_handle get_associated_dart(Halfedge_handle hedge,Halfedge_to_dart_map& selected_hedge_to_dart){
-  typename Halfedge_to_dart_map::iterator it_saved_dart=selected_hedge_to_dart.find(hedge);
-  CGAL_assertion(it_saved_dart!=selected_hedge_to_dart.end());
-  return it_saved_dart->second;
-}
-
-//first_hedge defines four volumes, second_hedge only two
-//first_poly is not needed as inside/outside volume is update during the merge
-//of the sew. Only second_poly is needed
-template <class Nodes_vector,class Border_halfedges_map,class Halfedge_to_dart_map>
-void sew_2_three_volumes_case(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
-                                const std::pair<int,int>& indices,
-                                const Nodes_vector& nodes,
-                                Border_halfedges_map& border_halfedges,
-                                Halfedge_to_dart_map& selected_hedge_to_dart, 
-                                Polyhedron* /*first_poly*/, Polyhedron* second_poly,
-                                int mark_index,
-                                std::set<Dart_handle>& darts_to_remove,
-                                const std::pair<bool,int>& polyline_info)
-{
-  bool took_opposite=second_hedge->is_border();
-  if (took_opposite) second_hedge=second_hedge->opposite();
-  
-  Vertex_handle P1=first_hedge->opposite()->next()->vertex();
-  Vertex_handle P2=first_hedge->next()->vertex();
-  //    when looking from the side of indices.second, the interior of the first polyhedron is described 
-  //    by turning counterclockwise from P1 to P2
-  
-  Vertex_handle Q = second_hedge->next()->vertex();
-  
-  //check if the third point of each triangular face is an original point (stay -1)
-  //or a intersection point (in that case we need the index of the corresponding node to
-  //have the exact value of the point)      
-  int index_p1=node_index_of_incident_vertex(first_hedge->opposite()->next(),border_halfedges);
-  int index_p2=node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
-  int index_q =node_index_of_incident_vertex(second_hedge->next(),border_halfedges);      
-
-  //Recover the dart that will be the start point of the different sewing
-  //  dof_X_outside = dart of face of , meaning the triangle containing the
-  //  point X and part of the volume outside of the corresponding polyhedron      
-  //-----first polyhedron
-  Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
-  Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-  //-----second polyhedron
-  Dart_handle dof_Q_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);
-  
-  if (index_p1!=-1 && index_p1==index_q){
-    Dart_handle top=dof_P1_outside->beta(3), not_top=took_opposite?dof_Q_outside->beta(3):dof_Q_outside;
-    Dart_handle down=dof_P1_outside, not_down=took_opposite?dof_Q_outside:dof_Q_outside->beta(3);
-
-    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
-    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
-    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
-    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
-
-    sew_2_marked_darts( final_map(),top             , dof_P2_outside->beta(3)     ,mark_index, nodes, indices, polyline_info); //P1P2 or QP2      
-    sew_2_marked_darts( final_map(),dof_P2_outside  , down                        ,mark_index, nodes, indices, polyline_info); //P2Q or P2P1
-    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
-    
-    return;
-  }
-
-  if (index_p2!=-1 && index_p2==index_q){
-    Dart_handle top=dof_P2_outside->beta(3), not_top=took_opposite?dof_Q_outside:dof_Q_outside->beta(3);
-    Dart_handle down=dof_P2_outside, not_down=took_opposite?dof_Q_outside->beta(3):dof_Q_outside;
-
-    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
-    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
-    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
-    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
-
-    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , top              ,mark_index, nodes, indices, polyline_info); //P1Q or P1P2      
-    sew_2_marked_darts( final_map(),down                    , dof_P1_outside   ,mark_index, nodes, indices, polyline_info); //QP1 or P2P1
-    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
-    
-    return;
-  }
-  
-  bool Q_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q,P1,P2,Q,nodes);
-
-
-  if (Q_is_between_P1P2)
-  {
-    // poly_first  - poly_second            = took_opposite?P1Q:QP2
-    // poly_second - poly_first             = {0}
-    // poly_first \cap poly_second          = took_opposite?QP2:P1Q
-    // opposite( poly_first U poly_second ) = P2P1
-    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3)                            , took_opposite?dof_Q_outside:dof_Q_outside->beta(3)  ,mark_index, nodes, indices, polyline_info); //P1Q
-    sew_2_marked_darts( final_map(),took_opposite?dof_Q_outside->beta(3):dof_Q_outside , dof_P2_outside->beta(3)                             ,mark_index, nodes, indices, polyline_info); //QP2
-    sew_2_marked_darts( final_map(),dof_P2_outside                                     , dof_P1_outside                                      ,mark_index, nodes, indices, polyline_info); //P2P1
-    dof_P1_outside->template attribute<3>()->info().outside.insert(second_poly); //update P2P1 outside poly
-  }
-  else
-  {
-    // poly_first  - poly_second            = P1P2
-    // poly_second - poly_first             = took_opposite?QP1:P2Q
-    // poly_first \cap poly_second          = {0}
-    // opposite( poly_first U poly_second ) = took_opposite?P2Q:QP1
-    sew_2_marked_darts( final_map(),dof_P2_outside                                     , took_opposite?dof_Q_outside:dof_Q_outside->beta(3)  ,mark_index, nodes, indices, polyline_info); //P2Q
-    sew_2_marked_darts( final_map(),took_opposite?dof_Q_outside->beta(3):dof_Q_outside , dof_P1_outside                                      ,mark_index, nodes, indices, polyline_info); //QP1
-    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3)                            , dof_P2_outside->beta(3)                             ,mark_index, nodes, indices, polyline_info); //P1P2
-    dof_P1_outside->beta(3)->template attribute<3>()->info().outside.insert(second_poly); //update P1P2 outside poly
-  }
-}
-
-//first_hedge defines two volumes, second_hedge only two
-template <class Halfedge_to_dart_map,class Border_halfedges_map,class Nodes_vector>
-void sew_2_two_volumes_case(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
-                              Border_halfedges_map& border_halfedges,
-                              Halfedge_to_dart_map& selected_hedge_to_dart,
-                              int mark_index,
-                              std::set<Dart_handle>& darts_to_remove,
-                              const Nodes_vector& nodes,
-                              const std::pair<int,int>& indices,
-                              const std::pair<bool,int>& polyline_info)
-{
-  bool first_took_opposite=first_hedge->is_border();
-  if (first_took_opposite) first_hedge=first_hedge->opposite();
-  bool second_took_opposite=second_hedge->is_border();
-  if (second_took_opposite) second_hedge=second_hedge->opposite();
-  
-    //-----first polyhedron
-  Dart_handle dof_P_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-  //-----second polyhedron
-  Dart_handle dof_Q_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);
-  
-  
-  
-  
-  int index_p =node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
-  int index_q =node_index_of_incident_vertex(second_hedge->next(),border_halfedges);
-
-  if (index_p!=-1 && index_q!=-1 && index_p==index_q){
-    Dart_handle top=dof_P_outside, not_top=dof_Q_outside->beta(3);
-    Dart_handle down=dof_P_outside->beta(3), not_down=dof_Q_outside;
-    
-    if (first_took_opposite==second_took_opposite)
-    {
-      top=dof_P_outside->beta(3); not_top=dof_Q_outside->beta(3);
-      down=dof_P_outside; not_down=dof_Q_outside;
-    }
-    
-    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
-    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
-    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
-    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
-
-    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
-    
-    return;
-  }
-  
-  
-  
-  //since the edge is shared, the inside of each polyhedron must be on opposite orientation halfedges
-  if (first_took_opposite==second_took_opposite)
-  {
-    //sew out with in
-    sew_2_marked_darts( final_map(),dof_P_outside->beta(3)  , dof_Q_outside  ,mark_index, nodes, indices, polyline_info); //PQ
-    sew_2_marked_darts( final_map(),dof_Q_outside->beta(3)  , dof_P_outside  ,mark_index, nodes, indices, polyline_info); //QP
-  }
-  else
-  {
-    //sew in with in
-  sew_2_marked_darts( final_map(),dof_P_outside         , dof_Q_outside          ,mark_index, nodes, indices, polyline_info); //PQ
-  sew_2_marked_darts( final_map(),dof_Q_outside->beta(3), dof_P_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //QP
-  }
-}
-
-//4 volume case with 2 identical volume
-//Q2 is supposed to be identical to P2
-template <class Nodes_vector,class Halfedge_to_dart_map>
-void sew_2_four_volumes_case_1(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
-                                 const std::pair<int,int>& indices,
-                                 const Nodes_vector& nodes,
-                                 int index_p1, int index_p2, int index_q1,
-                                 Halfedge_to_dart_map& selected_hedge_to_dart,
-                                 int mark_index,
-                                 std::set<Dart_handle>& darts_to_remove,
-                                 const std::pair<bool,int>& polyline_info,
-                                 bool swap_in_out_Q=false)
-{
-  Vertex_handle P1=first_hedge->opposite()->next()->vertex();
-  Vertex_handle P2=first_hedge->next()->vertex();
-  //    when looking from the side of indices.second, the interior of the first polyhedron is described 
-  //    by turning counterclockwise from P1 to P2
-  Vertex_handle Q1=second_hedge->opposite()->next()->vertex();
-  // Vertex_handle Q2=second_hedge->next()->vertex();  
-  bool Q1_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q1,P1,P2,Q1,nodes);
-  
-  
-  //Recover the dart that will be the start point of the different sewing
-  //  dof_X_outside = dart of face of , meaning the triangle containing the
-  //  point X and part of the volume outside of the corresponding polyhedron      
-  //-----first polyhedron
-  Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
-  Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-  //-----second polyhedron
-  Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
-  Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);  
-  
-  if( swap_in_out_Q ){
-    dof_Q1_outside=dof_Q1_outside->beta(3);
-    dof_Q2_outside=dof_Q2_outside->beta(3);
-  }
-  
-  if (Q1_is_between_P1P2){
-      Dart_handle top=dof_Q2_outside->beta(3), not_top=dof_P2_outside->beta(3);
-      Dart_handle down=dof_Q2_outside, not_down=dof_P2_outside;
-      if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
-      if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
-      CGAL_assertion( !top->template attribute<3>()->info().is_empty );
-      CGAL_assertion( !down->template attribute<3>()->info().is_empty );
-    
-      // poly_first  - poly_second            = P1Q1
-      // poly_second - poly_first             = {0}
-      // poly_first \cap poly_second          = Q1P2 or Q1Q2
-      // opposite( poly_first U poly_second ) = Q2P1 or P2P1
-      sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1      
-      sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , top                     ,mark_index, nodes, indices, polyline_info); //Q1P2 or Q1Q2
-      sew_2_marked_darts( final_map(),down                    , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1 or P2P1
-      sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
-
-  }
-  else{
-      Dart_handle top=dof_Q2_outside->beta(3), not_top=dof_P2_outside->beta(3);
-      Dart_handle down=dof_Q2_outside, not_down=dof_P2_outside;
-      if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
-      if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
-      CGAL_assertion( !top->template attribute<3>()->info().is_empty );
-      CGAL_assertion( !down->template attribute<3>()->info().is_empty );
-
-      // poly_first  - poly_second            = {0}
-      // poly_second - poly_first             = Q1P1
-      // poly_first \cap poly_second          = P1P2 or P1Q2
-      // opposite( poly_first U poly_second ) = Q2Q1 or P2Q1
-      sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
-      sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , top                     ,mark_index, nodes, indices, polyline_info); //P1P2 or P1Q2
-      sew_2_marked_darts( final_map(),down                    , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1 or P2Q1
-      sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
-  }  
-}
-
-template <class Nodes_vector,class Halfedge_to_dart_map>
-bool coplanar_triangles_case_handled(Halfedge_handle first_hedge,Halfedge_handle second_hedge,
-                                     const std::pair<int,int>& indices,
-                                     const Nodes_vector& nodes,
-                                     int index_p1, int index_p2, int index_q1,int index_q2,
-                                     Halfedge_to_dart_map& selected_hedge_to_dart,
-                                     int mark_index,
-                                     std::set<Dart_handle>& darts_to_remove,
-                                     const std::pair<bool,int>& polyline_info)
-{
-  if( index_p1!=-1 ){
-    if (index_p1==index_q1){
-      if(index_p2!=-1){
-        CGAL_assertion(index_p2!=index_q1);
-        if(index_p2==index_q2){
-          //-----first polyhedron
-          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-          //-----second polyhedron
-          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);      
-    
-          Dart_handle top_1=dof_P1_outside->beta(3), not_top_1=dof_Q1_outside->beta(3);
-          Dart_handle top_2=dof_P2_outside->beta(3), not_top_2=dof_Q2_outside->beta(3);
-          Dart_handle down_1=dof_P1_outside, not_down_1=dof_Q1_outside;
-          Dart_handle down_2=dof_P2_outside, not_down_2=dof_Q2_outside;
-          if ( top_1->template attribute<3>()->info().is_empty ) std::swap(top_1,not_top_1);
-          if ( top_2->template attribute<3>()->info().is_empty ) std::swap(top_2,not_top_2);
-          if ( down_1->template attribute<3>()->info().is_empty ) std::swap(down_1,not_down_1);
-          if ( down_2->template attribute<3>()->info().is_empty ) std::swap(down_2,not_down_2);
-          CGAL_assertion( !top_1->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !top_2->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !down_1->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !down_2->template attribute<3>()->info().is_empty );
-          
-          // poly_first  - poly_second            = {0}
-          // poly_second - poly_first             = {0}
-          // poly_first \cap poly_second          = P1P2 or Q1Q2 or P1Q1 or Q1P2
-          // opposite( poly_first U poly_second ) = P2P1 or Q2Q1 or P2Q1 or Q2P1
-          sew_2_marked_darts( final_map(),top_1    , top_2     ,mark_index, nodes, indices, polyline_info); //P1P2 or Q1Q2 or P1Q1 or Q1P2
-          sew_2_marked_darts( final_map(),down_2   , down_1    ,mark_index, nodes, indices, polyline_info); //P2P1 or Q2Q1 or P2Q1 or Q2P1
-          sew_3_marked_darts( final_map(),not_top_1, not_down_1 ,top_1,down_1,mark_index,darts_to_remove);
-          sew_3_marked_darts( final_map(),not_top_2, not_down_2 ,top_2,down_2,mark_index,darts_to_remove);
-          return true;
-        }
-      }
-      sew_2_four_volumes_case_1(first_hedge->opposite(),second_hedge->opposite(),std::make_pair(indices.second,indices.first),nodes,index_p2,index_p1,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info);
-      return true;
-    }
-    if (index_p1==index_q2){
-      if(index_p2!=-1){
-        CGAL_assertion(index_p2!=index_q2);
-        if(index_p2==index_q1){
-          //-----first polyhedron
-          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-          //-----second polyhedron
-          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);  
-          
-          Dart_handle top_1=dof_P1_outside->beta(3), not_top_1=dof_Q2_outside;
-          Dart_handle top_2=dof_P2_outside->beta(3), not_top_2=dof_Q1_outside;
-          Dart_handle down_1=dof_P1_outside, not_down_1=dof_Q2_outside->beta(3);
-          Dart_handle down_2=dof_P2_outside, not_down_2=dof_Q1_outside->beta(3);
-          if ( top_1->template attribute<3>()->info().is_empty ) std::swap(top_1,not_top_1);
-          if ( top_2->template attribute<3>()->info().is_empty ) std::swap(top_2,not_top_2);
-          if ( down_1->template attribute<3>()->info().is_empty ) std::swap(down_1,not_down_1);
-          if ( down_2->template attribute<3>()->info().is_empty ) std::swap(down_2,not_down_2);
-          CGAL_assertion( !top_1->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !top_2->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !down_1->template attribute<3>()->info().is_empty );
-          CGAL_assertion( !down_2->template attribute<3>()->info().is_empty );          
-          
-          // poly_first  - poly_second            = P1P2 or P1Q1 or Q2P2 or Q2Q1
-          // poly_second - poly_first             = Q1Q2 or Q1P1 or P2P1 or P2Q2
-          // poly_first \cap poly_second          = {0}
-          // opposite( poly_first U poly_second ) = all space
-          sew_2_marked_darts( final_map(),top_1    , top_2     ,mark_index, nodes, indices, polyline_info); //P1P2 or Q1Q2 or P1Q1 or Q1P2
-          sew_2_marked_darts( final_map(),down_2   , down_1    ,mark_index, nodes, indices, polyline_info); //P2P1 or Q2Q1 or P2Q1 or Q2P1
-          sew_3_marked_darts( final_map(),not_top_1, not_down_1 ,top_1,down_1,mark_index,darts_to_remove);
-          sew_3_marked_darts( final_map(),not_top_2, not_down_2 ,top_2,down_2,mark_index,darts_to_remove);
-          return true;           
-        }
-      }
-      sew_2_four_volumes_case_1(first_hedge->opposite(),second_hedge,std::make_pair(indices.second,indices.first),nodes,index_p2,index_p1,index_q1,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info,true);              
-      return true;
-    }
-  }
-  
-  if(index_p2!=-1){
-    if (index_p2==index_q1){
-      sew_2_four_volumes_case_1(first_hedge,second_hedge->opposite(),indices,nodes,index_p1,index_p2,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info,true);
-      return true;
-    }
-    if(index_p2==index_q2){
-      sew_2_four_volumes_case_1(first_hedge,second_hedge,indices,nodes,index_p1,index_p2,index_q1,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info);
-      return true;
-    }
-  }
-  
-  
-  return false;
-}
-
-//===//
-//end//
-//===//
-  bool do_not_build_cmap; //set to true in the case only the corefinement must be done
-  int number_coplanar_vertices; //number of intersection points between coplanar facets, see fixes XSL_TAG_CPL_VERT
-  EdgeMarkPropertyMap m_edge_mark_pmap;     //property map to mark halfedge of the original polyhedra that are on the intersection
-  NestedFacetConstruct facet_construct;  // functor called to create new triangular faces inside a given face
-  NewNodeVertexVisitor node_vertex_visitor; // functor called when a new node is created and when a new vertex is added
-public:
-  Node_visitor_refine_polyhedra (
-    Combinatorial_map_3_* ptr=NULL,
-    bool do_not_build_cmap_=false,
-    EdgeMarkPropertyMap pmap=EdgeMarkPropertyMap(),
-    const NestedFacetConstruct& fc = NestedFacetConstruct(),
-    const NewNodeVertexVisitor& nv = NewNodeVertexVisitor()
-  ):do_not_build_cmap(do_not_build_cmap_), m_edge_mark_pmap(pmap), facet_construct(fc), node_vertex_visitor(nv)
-  {
-    if (ptr!=NULL){
-      final_map_comes_from_outside=true;
-      final_map_ptr=ptr;
-    }
-    else{
-      final_map_comes_from_outside=false;
-      final_map_ptr=new Combinatorial_map_3_();
-    }
-  }
-  
-  ~Node_visitor_refine_polyhedra(){
-    if(!final_map_comes_from_outside) delete final_map_ptr;
-  }
-
-  
-  typedef internal_IOP::Predicates_on_constructions Node_storage_type;
-  typedef Tag_false Is_polyhedron_const;
-  static const bool do_need_vertex_graph = true;  //because we need to know which edges are constrained
-
-  typedef Combinatorial_map_3_ Combinatorial_map_3;
-  typedef internal_IOP::Volume_info<Polyhedron> Volume_info;
-
-  const Combinatorial_map_3& combinatorial_map() const {return *final_map_ptr;}
-  
-  void set_number_of_intersection_points_from_coplanar_facets(int n){
-    number_coplanar_vertices=n;
-  }
-  
-  void check_node_on_non_manifold_vertex(int node_id,Halfedge_handle hedge){
-    //we turn around the hedge and check no halfedge is a border halfedge
-    Halfedge_handle curr=hedge;
-    do{
-      if ( curr->is_border_edge() ){
-        non_manifold_nodes.insert(node_id);
-        return;
-      }
-      curr=curr->next()->opposite();
-    }
-    while(curr!=hedge);
-  }  
-  
-  void check_node_on_non_manifold_edge(int node_id,Halfedge_handle hedge){
-    if ( hedge->is_border_edge() ) non_manifold_nodes.insert(node_id);
-  }
-  
-  void new_node_added(int node_id,
-                      internal_IOP::Intersection_type type,
-                      Halfedge_handle principal_edge,
-                      Halfedge_handle additional_edge,
-                      bool is_vertex_coplanar,
-                      bool is_vertex_opposite_coplanar)
-  {
-    //forward to the visitor
-    node_vertex_visitor.new_node_added(node_id, type, principal_edge, additional_edge, is_vertex_coplanar, is_vertex_opposite_coplanar);
-    switch(type)
-    {
-      case internal_IOP::FACET: //Facet intersected by an edge
-      {
-        typename In_face_map::iterator it_fmap=in_face.insert(std::make_pair(additional_edge->face(), Node_ids())).first;
-        it_fmap->second.push_back(node_id);
-      }
-      break;
-      case internal_IOP::EDGE: //Edge intersected by an edge
-      {
-        typename In_halfedge_map::iterator it_hedge_map=in_hedge.insert(std::make_pair(additional_edge,Node_id_set())).first;
-        it_hedge_map->second.insert(node_id);
-        check_node_on_non_manifold_edge(node_id,additional_edge);
-      }
-      break;
-      case internal_IOP::VERTEX:
-      {
-        //grab original vertex that is on commom intersection
-        typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(additional_edge->facet()->halfedge());
-        CGAL_assertion(it!=hedge_to_polyhedron.end());
-        poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,additional_edge));
-        polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,additional_edge->vertex()));
-        all_incident_faces_got_a_node_as_vertex(additional_edge,node_id);
-        check_node_on_non_manifold_vertex(node_id,additional_edge);
-      }
-      break;
-      default:
-      return;
-    }
-    
-    CGAL_assertion(!is_vertex_coplanar || !is_vertex_opposite_coplanar); //coplanar edge are not forwarded
-    
-    
-    if ( is_vertex_coplanar )
-    {
-      //grab original vertex that is on commom intersection
-      typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(principal_edge->facet()->halfedge());
-      poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,principal_edge));
-      polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,principal_edge->vertex()));
-      all_incident_faces_got_a_node_as_vertex(principal_edge,node_id);
-      check_node_on_non_manifold_vertex(node_id,principal_edge);
-    }
-    else{
-      if ( is_vertex_opposite_coplanar ){
-        //grab original vertex that is on commom intersection
-        typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(principal_edge->facet()->halfedge());
-        poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,principal_edge->opposite()));
-        polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,principal_edge->opposite()->vertex()));
-        all_incident_faces_got_a_node_as_vertex(principal_edge->opposite(),node_id);
-        check_node_on_non_manifold_vertex(node_id,principal_edge->opposite());
-      }
-      else{
-        //handle intersection on principal edge
-        typename In_halfedge_map::iterator it_hedge_map=in_hedge.insert(std::make_pair(principal_edge,Node_id_set())).first;
-        it_hedge_map->second.insert(node_id);
-        check_node_on_non_manifold_edge(node_id,principal_edge);
-      }
-    }
-  }
-  
-  template<class Iterator>
-  void annotate_graph(Iterator begin,Iterator end)
-  {
-//    std::cout << "Annotation graph..." << std::endl;
-    for (Iterator it=begin;it!=end;++it)
-    {
-      int node_id=it->first;
-      if (non_manifold_nodes.find(node_id)!=non_manifold_nodes.end()) it->second.make_terminal();
-      const std::set<int>& neighbors = it->second.neighbors;
-      graph_of_constraints.insert(std::make_pair(node_id,neighbors));
-    }
-  }
-  
-  void update_terminal_nodes(std::vector<bool>&)
-  {
-    CGAL_assertion(!"Must not call this function");
-  }
-  
-  void add_filtered_intersection(Halfedge_handle eh,Halfedge_handle fh,Polyhedron& Pe,Polyhedron& Pf){
-    //use the representant halfedge of the facet as key
-    //--set polyhedron for the two facets incident to the edge
-    CGAL_assertion(!eh->is_border());
-    hedge_to_polyhedron.insert(std::make_pair(eh->facet()->halfedge(),&Pe));
-    if ( !eh->opposite()->is_border() )
-      hedge_to_polyhedron.insert(std::make_pair(eh->opposite()->facet()->halfedge(),&Pe));
-    //--set polyhedron for the facet intersected by the edge
-    hedge_to_polyhedron.insert(std::make_pair(fh->facet()->halfedge(),&Pf));
-  }
-  
-
-  struct Polyhedron_face_boundary{
-    std::vector<int> node_ids_array[3]; // the node_ids on each halfedges
-    std::map<Halfedge_handle,int,Cmp_unik_ad> hedges_ids;
-    Halfedge_handle halfedges[3]; //the three halfedges of the original face
-    Vertex_handle   vertices[3];  //the three vertices  of the original face
-    //node_ids_array[0] corresponds to the original edge vertices[0],vertices[1] = halfedges[0]
-    //node_ids_array[1] corresponds to the original edge vertices[1],vertices[2] = halfedges[1]
-    //node_ids_array[2] corresponds to the original edge vertices[2],vertices[0] = halfedges[2]
-    Polyhedron_face_boundary(Halfedge_handle first)
-    {
-      CGAL_assertion(first->next()->next()->next()==first); //the face is a triangle
-      hedges_ids.insert(std::make_pair(first,0));
-      hedges_ids.insert(std::make_pair(first->next(),1));
-      hedges_ids.insert(std::make_pair(first->next()->next(),2));
-      halfedges[0]=first;
-      halfedges[1]=first->next();
-      halfedges[2]=first->next()->next();
-      
-      vertices[0]=halfedges[0]->opposite()->vertex();
-      vertices[1]=halfedges[1]->opposite()->vertex();
-      vertices[2]=halfedges[2]->opposite()->vertex();
-    }
-    
-    //used when object was create with hedge but opposite was used to split the original face
-    void update_original_halfedge(Halfedge_handle original,Halfedge_handle new_hedge)
-    {
-      typename std::map<Halfedge_handle,int,Cmp_unik_ad>::iterator it_id=hedges_ids.find(original);
-      CGAL_assertion(it_id!=hedges_ids.end());
-      int index=it_id->second;
-      CGAL_assertion(halfedges[index]==original);
-      hedges_ids.erase(it_id);
-      hedges_ids.insert(std::make_pair(new_hedge,index));
-      halfedges[index]=new_hedge;
-    }
-    
-    template <class Iterator>
-    void copy_node_ids(Halfedge_handle hedge,Iterator begin,Iterator end)
-    {
-      typename std::map<Halfedge_handle,int,Cmp_unik_ad>::iterator it_id=hedges_ids.find(hedge);
-      CGAL_assertion(it_id!=hedges_ids.end());
-      std::copy(begin,end,std::back_inserter(node_ids_array[it_id->second]));
-    }
-  };
-  
-  
-  void start_new_polyline(int i, int j)
-  {
-    if ( i==j ) //case of a single point
-    {
-      //TAG SL001
-      //nothing is done
-      return;
-    }
-    std::pair<typename An_edge_per_polyline_map::iterator,bool> res=
-      an_edge_per_polyline.insert( 
-        std::make_pair( make_sorted_pair(i,j),
-          std::make_pair( std::map<Polyhedron*,Halfedge_handle>(),std::make_pair(false,0))  )
-      );
-    CGAL_assertion(res.second);
-    last_polyline=res.first;
-    if ( i !=last_polyline->first.first ) 
-      last_polyline->second.second.first=true;
-  }
-  
-  void add_node_to_polyline(int){
-    ++(last_polyline->second.second.second);
-  }
-  
-  void new_input_polyhedron(Polyhedron& P)
-  {
-    typedef std::pair<typename Poly_to_map_node::iterator,bool> Res;
-    CGAL_USE_TYPE(Res);
-    CGAL_assertion_code(Res res = )
-      polyhedron_to_map_node_to_polyhedron_vertex.insert(std::make_pair( &P,Node_to_polyhedron_vertex_map() ));
-    CGAL_assertion(res.second == true);
-  }
-  
-  //1) split_halfedges and retriangulate faces with no intersection point interior to the facet
-  //2) retriangulate using a constrained Delaunay triangulation each triangle in each Polyhedron that contains at least
-  //   one intersection point inside the facet
-  //3) mark polyhedron edges that are on the intersection
-  //4) create one output polyhedron per connected component of polyhedron, connected by an edge which is not an intersection edge   
-  //5) import each piece into a common combinatorial map
-  //6) glue all the pieces together
-  template <class Nodes_vector>
-  void finalize(const Nodes_vector& nodes){
-    //mark halfedge that are on the intersection
-    //SL: I needed to use a map because to get the orientation around the edge,
-    //    I need to know in the case the third vertex is a node its index (for exact construction)
-    typedef std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad > Border_halfedges_map;
-    Border_halfedges_map border_halfedges;
-    
-    //store for each triangle facet which boundary is intersected by the other surface,
-    //original vertices (and halfedges in the refined mesh pointing on these vertices)
-    typedef std::map<Face_handle,Polyhedron_face_boundary,Cmp_handle> Faces_boundary;
-    Faces_boundary faces_boundary; 
-    
-    //0) For each polyhedron, collect original vertices that belongs to the intersection.
-    //   From the graph of constaints, extract intersection edges that are incident to such vertices. In case
-    //   there exists another original vertex adjacent to the first one found, this halfedge must be
-    //   marked on the boundary (and possibly update an_edge_per_polyline).
-    //   This is done first to avoid halfedges stored to be modified in the steps following.
-    for (typename Poly_to_vertices_on_intersection_map::iterator 
-      it=poly_to_vertices_on_inter.begin();
-      it!=poly_to_vertices_on_inter.end();
-      ++it)
-    {
-      Polyhedron* poly=it->first;
-      std::set<std::pair<int,int> > already_done;
-      Node_to_target_of_hedge_map& nodes_to_hedge=it->second;
-      for(typename Node_to_target_of_hedge_map::iterator 
-        it_node_2_hedge=nodes_to_hedge.begin();
-        it_node_2_hedge!=nodes_to_hedge.end();
-        ++it_node_2_hedge)
-      {
-        int node_id_of_first=it_node_2_hedge->first;
-        std::map< int,std::set<int> >::iterator it_neighbors=graph_of_constraints.find(node_id_of_first);
-        if ( it_neighbors!=graph_of_constraints.end() )
-        {
-          std::set<int>& neighbors=it_neighbors->second;
-          for (std::set<int>::iterator it_id=neighbors.begin();it_id!=neighbors.end();++it_id){
-            if ( already_done.find(std::make_pair(*it_id,node_id_of_first))!=already_done.end() ) continue;//already done for the opposite
-            typename Node_to_target_of_hedge_map::iterator it_node_2_hedge_two=nodes_to_hedge.find(*it_id);
-            if ( it_node_2_hedge_two!=nodes_to_hedge.end() ) //a full edge is on intersection
-            {
-              //get the corresponding halfedge with vertex corresponding to node_id_of_first
-              Halfedge_handle hedge=it_node_2_hedge->second;
-              #ifndef NDEBUG
-              Halfedge_handle start=hedge;
-              #endif
-              while ( hedge->opposite()->vertex()!=it_node_2_hedge_two->second->vertex() ){
-                hedge=hedge->next()->opposite();
-                #ifndef NDEBUG
-                CGAL_assertion(hedge!=start);
-                #endif
-              }
-              std::pair<int,int> edge_pair(*it_id,node_id_of_first);
-              border_halfedges.insert( std::make_pair(hedge,edge_pair) );
-              put(m_edge_mark_pmap,std::make_pair(hedge,poly),true);
-              put(m_edge_mark_pmap,std::make_pair(hedge->opposite(),poly),true);
-              update_edge_per_polyline(poly,edge_pair,hedge); 
-              //save the fact that we already handle this edge
-              already_done.insert(std::make_pair(node_id_of_first,*it_id));
-            }
-          }
-        }
-        #ifdef CGAL_COREFINEMENT_DEBUG
-        else
-        {
-          std::cout << "X1: Found an isolated point" << std::endl;
-        }
-        #endif
-      }
-    }
-    
-    //1) First split halfedges cut by the intersection polyline(s)
-    for (typename In_halfedge_map::iterator it=in_hedge.begin();it!=in_hedge.end();++it)
-    {
-      Halfedge_handle hedge=it->first; //the halfedge to be split (and its opposite too)
-      Node_ids node_ids;   //indices of the intersection points to be inserted
-      //we used a set to avoid having duplicated nodes reported on an edge of two coplanar triangles
-      std::copy(it->second.begin(),it->second.end(),std::back_inserter(node_ids));
-      typename Hedge_to_polyhedron_map::iterator  it_poly=hedge_to_polyhedron.find( hedge->facet()->halfedge() );
-      CGAL_assertion(it_poly!=hedge_to_polyhedron.end());
-      Polyhedron* P=it_poly->second;  //the polyhedron in which vertices should be added
-      
-      sort_vertices_along_hedge(node_ids,hedge,nodes);
-
-      //save original face and nodes for face of hedge (1)
-      if ( !hedge->is_border() ){
-        typename Faces_boundary::iterator it_face=faces_boundary.find(hedge->face());
-        if (it_face==faces_boundary.end())
-          it_face=faces_boundary.insert(std::make_pair(hedge->face(),Polyhedron_face_boundary(hedge))).first;
-        it_face->second.copy_node_ids(hedge,node_ids.begin(),node_ids.end());
-      }
-      
-      //save original face and nodes for face of hedge->opposite (2)
-      typename Faces_boundary::iterator opposite_original_info=faces_boundary.end();
-      if ( !hedge->opposite()->is_border() ){
-        opposite_original_info=faces_boundary.find(hedge->opposite()->face());
-        if (opposite_original_info==faces_boundary.end()) 
-          opposite_original_info=faces_boundary.insert(std::make_pair(hedge->opposite()->face(),Polyhedron_face_boundary(hedge->opposite()))).first;
-        opposite_original_info->second.copy_node_ids(hedge->opposite(),node_ids.rbegin(),node_ids.rend());      
-      }      
-      
-      typename Poly_to_map_node::iterator it_map=polyhedron_to_map_node_to_polyhedron_vertex.find(P);
-      CGAL_assertion(it_map!=polyhedron_to_map_node_to_polyhedron_vertex.end());
-      //a map to identify the vertex in the polyhedron corresponding to an intersection point
-      Node_to_polyhedron_vertex_map& node_to_polyhedron_vertex=it_map->second; 
-            
-      #ifndef NDEBUG
-      Vertex_handle original_vertex=hedge->opposite()->vertex();
-      #endif
-      
-      //We need an edge incident to the source vertex of hedge. This is the first opposite edge created.      
-      bool first=true; Halfedge_handle hedge_incident_to_src;
-      //do split the edges
-      for (std::vector<int>::const_iterator it_id=node_ids.begin();it_id!=node_ids.end();++it_id){
-        Vertex_handle v=split_edge(hedge,nodes[*it_id],*P);
-        node_vertex_visitor.new_vertex_added(*it_id, v);
-        node_to_polyhedron_vertex.insert(std::make_pair(*it_id,v));
-        if (first){
-          first=false;
-          hedge_incident_to_src=hedge->opposite()->next();
-        }
-      }
-      
-      #ifndef NDEBUG
-      CGAL_assertion(hedge_incident_to_src->vertex()==original_vertex);
-      CGAL_assertion(hedge_incident_to_src->face()==hedge->opposite()->face());
-      #endif
-
-      //save original face and nodes for face of hedge->opposite (2)
-      if ( !hedge->opposite()->is_border() ){
-        CGAL_assertion(opposite_original_info!=faces_boundary.end());
-        opposite_original_info->second.update_original_halfedge(hedge->opposite(),hedge_incident_to_src);
-      }
-      
-      //insert the two incident faces in in_face map so that they will be triangulated.
-      if (!hedge->is_border()) in_face.insert(std::make_pair(hedge->face(),Node_ids()));
-      if (!hedge->opposite()->is_border()) in_face.insert(std::make_pair(hedge->opposite()->face(),Node_ids()));
-    }
-    
-    //2)triangulation of the triangle faces containing intersection point in their interior
-    //  and also those with intersection points only on the boundary.
-    for (typename In_face_map::iterator it=in_face.begin();it!=in_face.end();++it)
-    {
-      Face_handle f = it->first; //the face to be retriangulated
-      Node_ids& node_ids  = it->second; //the index of the intersection point that are interior to the face
-      typename Faces_boundary::iterator it_fb=faces_boundary.find(f);
-
-      
-      typename Hedge_to_polyhedron_map::iterator it_polyhedron = hedge_to_polyhedron.find (f->halfedge()); //we can do this because the halfedge is still the same (at least its address)+no Face::set_halfedge called
-      CGAL_assertion(it_polyhedron != hedge_to_polyhedron.end());
-      Polyhedron* P=it_polyhedron->second;
-      typename Poly_to_map_node::iterator it_map=polyhedron_to_map_node_to_polyhedron_vertex.find(P);
-      CGAL_assertion(it_map!=polyhedron_to_map_node_to_polyhedron_vertex.end());
-      //a map to identify the vertex in the polyhedron corresponding to an intersection point
-      Node_to_polyhedron_vertex_map& node_to_polyhedron_vertex=it_map->second;
-      
-      std::map<int,typename CDT::Vertex_handle> id_to_CDT_vh;
-      
-      //associate an edge of the triangulation to a halfedge in a given polyhedron
-      std::map<std::pair<int,int>,Halfedge_handle> edge_to_hedge;
-      
-      Vertex_handle triangle_boundary[3];
-      int triangle_boundary_indices[3]; //the node_id of the triangle original vertex or a fake id
-      if (it_fb!=faces_boundary.end()){ //the boundary of the triangle face was refined
-        triangle_boundary[0]=it_fb->second.vertices[0];
-        triangle_boundary[1]=it_fb->second.vertices[1];
-        triangle_boundary[2]=it_fb->second.vertices[2];
-        set_triangle_boundary_indices(triangle_boundary,triangle_boundary_indices);
-      }
-      else{
-        triangle_boundary[0]=f->halfedge()->vertex(); //-1
-        triangle_boundary[1]=f->halfedge()->next()->vertex(); //-2
-        triangle_boundary[2]=f->halfedge()->next()->next()->vertex(); //-3
-        CGAL_assertion(f->halfedge()->next()->next()->next()==f->halfedge());//check this is a triangle
-        set_triangle_boundary_indices(triangle_boundary,triangle_boundary_indices);        
-        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[2],triangle_boundary_indices[0] ) , f->halfedge() ) );
-        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[0],triangle_boundary_indices[1] ) , f->halfedge()->next() ) );
-        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[1],triangle_boundary_indices[2] ) , f->halfedge()->next()->next() ) );
-      }
-
-      
-      #ifdef DO_NO_USE_EXACT_CDT
-      typename Kernel::Plane_3 plane(triangle_boundary[0]->point(),triangle_boundary[1]->point(),triangle_boundary[2]->point());
-      #else
-      CGAL::Cartesian_converter<Kernel,Exact_kernel> convert;
-      typename Exact_kernel::Plane_3 plane(convert(triangle_boundary[0]->point()),convert(triangle_boundary[1]->point()),convert(triangle_boundary[2]->point()));
-      #endif
-      CDT triangulation;
-      //insert point inside face
-      for (std::vector<int>::iterator it_node_id=node_ids.begin();it_node_id!=node_ids.end();++it_node_id){
-        #ifdef DO_NO_USE_EXACT_CDT
-        typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes[*it_node_id]));
-        #else
-        typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes.exact_node(*it_node_id)));
-        #endif
-        vh->info()=*it_node_id;
-        id_to_CDT_vh.insert(std::make_pair(*it_node_id,vh));
-      }
-      
-      
-      typename CDT::Vertex_handle triangle_vertices[3];
-      #ifdef DO_NO_USE_EXACT_CDT
-      triangle_vertices[0]=triangulation.insert(plane.to_2d(triangle_boundary[0]->point()));
-      triangle_vertices[1]=triangulation.insert(plane.to_2d(triangle_boundary[1]->point()));
-      triangle_vertices[2]=triangulation.insert(plane.to_2d(triangle_boundary[2]->point()));
-      #else
-      //we can do this because these are input points.
-      triangle_vertices[0]=triangulation.insert(plane.to_2d(convert(triangle_boundary[0]->point())));
-      triangle_vertices[1]=triangulation.insert(plane.to_2d(convert(triangle_boundary[1]->point())));
-      triangle_vertices[2]=triangulation.insert(plane.to_2d(convert(triangle_boundary[2]->point())));      
-      #endif
-      
-      triangle_vertices[0]->info()=triangle_boundary_indices[0];
-      triangle_vertices[1]->info()=triangle_boundary_indices[1];
-      triangle_vertices[2]->info()=triangle_boundary_indices[2];
-      //insert face_extremities: we use operator[] because indice -1,-2,-3 are used in each loop and are specific to the current face
-      node_to_polyhedron_vertex[-1]=triangle_boundary[0];
-      node_to_polyhedron_vertex[-2]=triangle_boundary[1];
-      node_to_polyhedron_vertex[-3]=triangle_boundary[2];
-      
-      //if one of the triangle original vertex is also a node
-      for (int ik=0;ik<3;++ik){
-        if ( triangle_boundary_indices[ik]>=0 )
-          id_to_CDT_vh.insert(std::make_pair(triangle_boundary_indices[ik],triangle_vertices[ik]));
-      }
-      //insert points on edges 
-      #ifdef DO_NO_USE_EXACT_CDT
-      //and constrains these edges
-      #endif
-      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
-      {
-        //in the following loop, for each original edge of the triangle, we insert the constrained edges
-        // and we recover the halfedge_handle corresponding to these constrained (they are already in the polyhedron)
-        for (int i=0;i<3;++i){
-//          std::cerr << "Boundary edges" << std::endl;
-//          std::cerr <<  "  " << -1-i <<std::endl;
-          //handle case of halfedge starting at triangle_vertices[i] and ending at triangle_vertices[(i+1)%3]
-          Node_ids& bounding_ids=it_fb->second.node_ids_array[i];
-          typename CDT::Vertex_handle previous=triangle_vertices[i];
-          int previous_index=triangle_boundary_indices[i]; //index of original Polyhedron vertex
-          Halfedge_handle hedge = it_fb->second.halfedges[ (i+2) % 3]->next();
-          CGAL_assertion( hedge->opposite()->vertex()==it_fb->second.vertices[i] );
-          if (!bounding_ids.empty()){ //is there al least one intersection point on this edge?
-            for (Node_ids::iterator it_id=bounding_ids.begin();it_id!=bounding_ids.end();++it_id){
-//              std::cerr << "  "<<  *it_id << std::endl;
-              #ifdef DO_NO_USE_EXACT_CDT
-              typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes[*it_id]));
-              #else
-              typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes.exact_node(*it_id))); 
-              #endif
-              vh->info()=*it_id;
-              id_to_CDT_vh.insert(std::make_pair(*it_id,vh));
-              #ifdef DO_NO_USE_EXACT_CDT
-              triangulation.insert_constraint(previous,vh);
-              #endif
-              edge_to_hedge.insert (std::make_pair( std::make_pair(previous_index,*it_id),hedge) );
-              previous=vh;
-              hedge=hedge->next();
-              previous_index=*it_id;
-            }
-          }
-          else{
-            CGAL_assertion( it_fb->second.halfedges[i]->vertex() == it_fb->second.vertices[ (i+1) % 3 ] );
-            CGAL_assertion( it_fb->second.halfedges[i]->opposite()->vertex() == it_fb->second.vertices[ i ] );
-          }
-          CGAL_assertion(hedge==it_fb->second.halfedges[i]);
-          edge_to_hedge.insert (std::make_pair( std::make_pair(previous_index,triangle_boundary_indices[(i+1) % 3]) , it_fb->second.halfedges[i] ) );
-//          std::cerr <<  "  " << -1 - ( (i+1) % 3 ) <<std::endl;
-          #ifdef DO_NO_USE_EXACT_CDT
-          triangulation.insert_constraint(previous,triangle_vertices[(i+1)%3]);
-          #endif
-        }
-      }
-      
-      std::list<std::pair<int,int> > constrained_edges;
-      
-      //insert constraints that are interior to the triangle (in the case no edges are collinear in the meshes)
-      insert_constrained_edges(node_ids,triangulation,id_to_CDT_vh,constrained_edges);
-      
-      //insert constraints between points that are on the boundary (not a contrained on the triangle boundary)
-      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
-      {
-        for (int i=0;i<3;++i){
-          Node_ids& bounding_ids=it_fb->second.node_ids_array[i];  
-          insert_constrained_edges(bounding_ids,triangulation,id_to_CDT_vh,constrained_edges,true);
-        }
-      }
-      
-      //insert coplanar edges for endpoints of triangles
-      for (int i=0;i<3;++i){
-        int nindex=triangle_vertices[i]->info();
-        if ( nindex >=0 )
-          insert_constrained_edges_coplanar_case(nindex,triangulation,id_to_CDT_vh);
-      }
-      
-      //XSL_TAG_CPL_VERT
-      //collect edges incident to a point that is the intersection of two coplanar faces.
-      //This ensure that triangulations are compatible.
-      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
-      {
-        for (typename CDT::Finite_vertices_iterator vit=triangulation.finite_vertices_begin(),
-                                                vit_end=triangulation.finite_vertices_end();vit_end!=vit;++vit)
-        {
-          //skip original vertices (that are not nodes) and non-coplanar facet issued vertices 
-          //(this is working because intersection points between coplanar facets are the first inserted)
-          if ( vit->info() < 0 || vit->info() >= number_coplanar_vertices) continue;
-          std::map< int,std::set<int> >::iterator res=coplanar_constraints.insert(std::make_pair(vit->info(),std::set<int>())).first;
-          //turn around the vertex and get incident edge
-          typename CDT::Edge_circulator  start=triangulation.incident_edges(vit);
-          typename CDT::Edge_circulator  curr=start;
-          do{
-            if (triangulation.is_infinite(*curr) ) continue;
-            typename CDT::Edge mirror_edge=triangulation.mirror_edge(*curr);
-            if ( triangulation.is_infinite( curr->first->vertex(curr->second) ) ||
-                 triangulation.is_infinite( mirror_edge.first->vertex(mirror_edge.second) ) )            
-              continue; //skip edges that are on the boundary of the triangle (these are already constrained)
-            //insert edges in the set of constraints
-            int nindex = 
-              curr->first->vertex( (curr->second+1)%3 )==static_cast<typename CDT::Vertex_handle>(vit)?
-              (curr->second+2)%3:(curr->second+1)%3;
-            typename CDT::Vertex_handle vn=curr->first->vertex(nindex);
-            if ( vit->info() > vn->info() ) continue; //take only one out of the two edges + skip negative vn->info()
-            CGAL_assertion(vn->info()>=0);            
-            res->second.insert( vn->info() );
-          }while(start!=++curr);
-        }
-        
-// this is a working alternative that should be slower        
-//        for (typename CDT::Finite_edges_iterator eit=triangulation.finite_edges_begin(),
-//                                             eit_end=triangulation.finite_edges_end();eit_end!=eit;++eit)
-//        {
-//          typename CDT::Edge mirror_edge=triangulation.mirror_edge(*eit);
-//          if ( triangulation.is_infinite( eit->first->vertex(eit->second) ) ||
-//              triangulation.is_infinite( mirror_edge.first->vertex(mirror_edge.second) ) )
-//            continue; //skip edges that are on the boundary of the triangle (these are already constrained)
-//          typename CDT::Vertex_handle v1=eit->first->vertex( (eit->second+1)%3 ),
-//                                      v2=eit->first->vertex( (eit->second+2)%3 );
-//          if (v1->info()<0 || v2->info()<0) continue;
-//          if ( v1->info() > v2->info() ) std::swap(v1,v2);
-//          coplanar_constraints.insert(std::make_pair(v1->info(),std::set<int>())).first->second.insert(v2->info());
-//        }
-      }
-      
-      
-      //create a modifier to insert nodes and copy the triangulation of the face
-      //inside the polyhedron
-      internal_IOP::Triangulate_a_face<typename Polyhedron::HalfedgeDS, NestedFacetConstruct, NewNodeVertexVisitor> modifier(
-        f, nodes, node_ids, node_to_polyhedron_vertex, edge_to_hedge, triangulation, facet_construct, node_vertex_visitor);
-      
-      CGAL_assertion(P->is_valid());
-      P->delegate(modifier);
-      CGAL_assertion(P->is_valid());
-      
-      //3) mark halfedges that are common to two polyhedral surfaces
-      //recover halfedges inserted that are on the intersection
-      for (std::list<std::pair<int,int> >::iterator it_cst=constrained_edges.begin();it_cst!=constrained_edges.end();++it_cst)
-      {
-        typename std::map<std::pair<int,int>,Halfedge_handle>::iterator it_poly_hedge=edge_to_hedge.find(*it_cst);
-        //we cannot have an assertion here in the case an edge or part of an edge is a constraints.
-        //Indeed, the graph_of_constraints report an edge 0,1 and 1,0 for example while only one of the two
-        //is defined as one of them defines an adjacent face
-        //CGAL_assertion(it_poly_hedge!=edge_to_hedge.end());
-        if( it_poly_hedge!=edge_to_hedge.end() ){
-          border_halfedges.insert( std::make_pair(Halfedge_const_handle(it_poly_hedge->second),*it_cst) );
-          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second,P),true);
-          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second->opposite(),P),true); //setting the opposite is only needed for border edges (done in adjacent triangle otherwise)
-          update_edge_per_polyline(P,it_poly_hedge->first,it_poly_hedge->second);
-        }
-        else{
-          //WARNING: in few case this is needed if the marked edge is on the border
-          //to optimize it might be better to only use sorted pair. TAG_SLXX1
-          std::pair<int,int> opposite_pair(it_cst->second,it_cst->first);
-          it_poly_hedge=edge_to_hedge.find(opposite_pair);
-          CGAL_assertion( it_poly_hedge!=edge_to_hedge.end() );
-
-          border_halfedges.insert( std::make_pair(Halfedge_const_handle(it_poly_hedge->second),opposite_pair) );
-          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second,P),true);
-          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second->opposite(),P),true); //setting the opposite is only needed for border edges (done in adjacent triangle otherwise)
-          update_edge_per_polyline(P,it_poly_hedge->first,it_poly_hedge->second);          
-        }
-      }
-    }
-   
-    if (do_not_build_cmap) return;
-    
-    //4) create one output polyhedron per connected component of polyhedron,
-    //   connected by an edge which is not an intersection edge  
-    //5) import into a Combinatorial map
-    #ifdef CGAL_COREFINEMENT_DEBUG
-    std::cout << "Nb marked edges " << border_halfedges.size() << std::endl;
-//    for (typename Border_halfedges_map::iterator it=border_halfedges.begin();it!=border_halfedges.end();++it)
-//      std::cout << it->first->opposite()->vertex()->point() << " " << it->first->vertex()->point() << " is constrained " << std::endl;
-    std::cout << "Nb polylines " << an_edge_per_polyline.size() << std::endl;
-    #endif
-    
-    internal_IOP::Non_intersection_halfedge<Polyhedron> criterium(border_halfedges);
-
-    int mark_index=final_map().get_new_mark(); //mark used to tag dart that are on an intersection
-    
-    //define a map that will contain the correspondance between selected halfedges of the boundary and
-    //their corresponding Dart_handle in the cmap.
-    typedef std::map<Halfedge_const_handle,typename Combinatorial_map_3::Dart_handle,internal_IOP::Compare_address<Polyhedron> > Halfedge_to_dart_map;
-    Halfedge_to_dart_map selected_hedge_to_dart;
-    for (typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.begin();it!=an_edge_per_polyline.end();++it)
-    {
-      CGAL_assertion(it->second.first.size()==2);
-      //orientation of faces around the edge (to be sure we can do it)
-      Halfedge_handle first_hedge=it->second.first.begin()->second;
-      Halfedge_handle second_hedge=boost::next(it->second.first.begin())->second;
-      
-      if (!first_hedge->is_border())               selected_hedge_to_dart.insert(std::make_pair(first_hedge,Dart_handle(NULL)));
-      if (!first_hedge->opposite()->is_border())   selected_hedge_to_dart.insert(std::make_pair(first_hedge->opposite(),Dart_handle(NULL)));
-      if (!second_hedge->is_border())              selected_hedge_to_dart.insert(std::make_pair(second_hedge,Dart_handle(NULL)));
-      if (!second_hedge->opposite()->is_border())  selected_hedge_to_dart.insert(std::make_pair(second_hedge->opposite(),Dart_handle(NULL)));
-    }
-    
-    #ifdef CGAL_COREFINEMENT_DEBUG
-    int polynb=0;
-    #endif
-    for (typename Poly_to_map_node::iterator 
-          it=polyhedron_to_map_node_to_polyhedron_vertex.begin();
-          it!=polyhedron_to_map_node_to_polyhedron_vertex.end();
-          ++it
-        )
-    {
-      typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
-      typedef ::CGAL::Union_find<Facet_const_handle> UF;
-      typedef typename UF::handle UF_handle;
-      typedef std::map<Facet_const_handle,std::list<Facet_const_handle>,internal::Compare_handle_ptr<Polyhedron> > Result;
-      typedef std::map<Facet_const_handle,UF_handle,internal::Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
-      
-      UF uf;
-      Facet_to_handle_map map_f2h;
-      Result result;
-      Polyhedron* current_poly=it->first;
-      
-      #ifdef CGAL_COREFINEMENT_DEBUG
-      std::cout << "writing poly debug"<< std::endl;
-      std::stringstream ss; 
-      ss << "output_debug-" << ++polynb << ".off";
-      std::ofstream output_debug(ss.str().c_str());
-      output_debug << *current_poly;
-      #endif
-      
-      extract_connected_components(*(static_cast<Polyhedron const *> (current_poly) ),criterium,uf,map_f2h,result);
-
-      
-      //add each connected component in the map with 2 volumes per component.
-      for (typename Result::iterator it_res=result.begin();it_res!=result.end();++it_res)
-      {
-        //create in the final Cmap a 2D component containing faces of a connected component 
-        //(twice: one with same orientation and one with the opposite orientation to model the other volume)
-        Dart_handle d = import_from_polyhedron_subset<Polyhedron>(final_map(),it_res->second.begin(),it_res->second.end(),criterium,selected_hedge_to_dart,mark_index);
-        //set an attribute to one volume represented by this component to indicates 
-        //a part outside of the polyhedron current_poly
-        typename Combinatorial_map_3_::template Attribute_range<3>::type::iterator attrib=final_map().template create_attribute<3>();
-        attrib->info().outside.insert(current_poly);
-        final_map().template set_attribute<3>(d,attrib);
-        //set the attribute for the opposite volume: represent a part inside current_poly
-        attrib=final_map().template create_attribute<3>();
-        attrib->info().inside.insert(current_poly);
-        final_map().template set_attribute<3>(d->beta(3),attrib);        
-        
-        #ifdef CGAL_COREFINEMENT_DEBUG
-        final_map().display_characteristics(std::cout);
-        std::cout << std::endl;
-        #endif
-      }
-    }
-    #ifndef NDEBUG
-    for(typename Halfedge_to_dart_map::iterator it=selected_hedge_to_dart.begin();it!=selected_hedge_to_dart.end();++it)
-      CGAL_assertion(it->second!=Dart_handle(NULL));
-    #endif
-    
-    CGAL_assertion(final_map().is_valid());
-
-    std::set<Dart_handle> darts_to_remove;
-    
-    //6) Glue pieces together
-    //   using one edge per intersection polyline, we merge the different volumes
-    for (typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.begin();it!=an_edge_per_polyline.end();++it)
-    {
-      CGAL_assertion(it->second.first.size()==2);
-      //orientation of faces around the edge (to be sure we can do it)
-      std::pair<int,int> indices = it->first;
-      const std::pair<bool,int>& polyline_info=it->second.second;
-
-      //get the two halfedges incident to the edge [indices.first,indices.second]
-      Halfedge_handle first_hedge=it->second.first.begin()->second;
-      Halfedge_handle second_hedge=boost::next(it->second.first.begin())->second;
-
-      CGAL_assertion(nodes[indices.second]==first_hedge->vertex()->point());
-      CGAL_assertion(nodes[indices.first]==first_hedge->opposite()->vertex()->point());
-      CGAL_assertion(nodes[indices.second]==second_hedge->vertex()->point());
-      CGAL_assertion(nodes[indices.first]==second_hedge->opposite()->vertex()->point());
-      
-      Polyhedron* first_poly  = it->second.first.begin()->first;
-      Polyhedron* second_poly = boost::next(it->second.first.begin())->first;
-      
-      //different handling depending on the number of incident triangles to the edge.
-      //After sewing there are two,three or four volumes if there are two,three or four incident triangles respectively
-      if ( first_hedge->is_border() || first_hedge->opposite()->is_border() ){
-        if (second_hedge->is_border()  || second_hedge->opposite()->is_border())
-          sew_2_two_volumes_case(first_hedge,second_hedge,border_halfedges,selected_hedge_to_dart,mark_index,darts_to_remove,nodes,indices,polyline_info);
-        else
-          sew_2_three_volumes_case(second_hedge, first_hedge,indices,nodes,border_halfedges,selected_hedge_to_dart,second_poly,first_poly,mark_index,darts_to_remove,polyline_info);
-      }
-      else
-        if (second_hedge->is_border()  || second_hedge->opposite()->is_border())
-          sew_2_three_volumes_case(first_hedge, second_hedge,indices,nodes,border_halfedges,selected_hedge_to_dart,first_poly,second_poly,mark_index,darts_to_remove,polyline_info);
-        else
-        {
-          //Sort the four triangle facets around their common edge
-          //  we suppose that the exterior of the polyhedron is indicated by
-          //  counterclockwise oriented facets.
-          Vertex_handle P1=first_hedge->opposite()->next()->vertex();
-          Vertex_handle P2=first_hedge->next()->vertex();
-          //    when looking from the side of indices.second, the interior of the first polyhedron is described 
-          //    by turning counterclockwise from P1 to P2
-          Vertex_handle Q1=second_hedge->opposite()->next()->vertex();
-          Vertex_handle Q2=second_hedge->next()->vertex();
-          //    when looking from the side of indices.second, the interior of the second polyhedron is described 
-          //    by turning from Q1 to Q2
-          
-          //check if the third point of each triangular face is an original point (stay -1)
-          //or a intersection point (in that case we need the index of the corresponding node to
-          //have the exact value of the point)      
-          int index_p1=node_index_of_incident_vertex(first_hedge->opposite()->next(),border_halfedges);
-          int index_p2=node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
-          int index_q1=node_index_of_incident_vertex(second_hedge->opposite()->next(),border_halfedges);
-          int index_q2=node_index_of_incident_vertex(second_hedge->next(),border_halfedges);      
-          
-          #ifdef CGAL_COREFINEMENT_DEBUG
-          std::cout << index_p1 << " " << index_p2 << " " << index_q1 << " " <<index_q2 << std::endl;
-          std::cout << nodes[indices.first] << " | " << nodes[indices.second] << std::endl;
-          std::cout << P1->point() << " | " << P2->point() << " | " << Q1->point() << " | " <<Q2->point() << std::endl;
-          #endif
-          
-          if ( coplanar_triangles_case_handled(first_hedge,second_hedge,indices,nodes,index_p1,index_p2,index_q1,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info) )
-            continue;
-          
-          CGAL_assertion(P1->point() !=Q1->point() && P1->point()!=Q2->point() && P2->point() !=Q1->point() && P2->point()!=Q2->point());
-          
-          bool Q1_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q1,P1,P2,Q1,nodes);
-          bool Q2_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q2,P1,P2,Q2,nodes);
-          
-          
-          //Recover the dart that will be the start point of the different sewing
-          //  dof_X_outside = dart of face of , meaning the triangle containing the
-          //  point X and part of the volume outside of the corresponding polyhedron      
-          //-----first polyhedron
-          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
-          //-----second polyhedron
-          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
-          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);   
-          
-          if ( Q1_is_between_P1P2 ){
-            if( Q2_is_between_P1P2 )
-            {
-              bool P1_is_between_Q1Q2 = filtered_order_around_edge(indices.first,indices.second,index_q1,index_q2,index_p1,Q1,Q2,P1,nodes);
-              if (!P1_is_between_Q1Q2){
-                // poly_first  - poly_second            = P1Q1 U Q2P2
-                // poly_second - poly_first             = {0}
-                // poly_first \cap poly_second          = Q1Q2
-                // opposite( poly_first U poly_second ) = P2P1
-                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1
-                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q2P2
-                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1Q2
-                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //P2P1
-                //update inside outside info (because darts from the same volume have been merged)
-                dof_Q1_outside->beta(3)->template attribute<3>()->info().inside.insert(first_poly); //update Q1Q2 inside poly
-                dof_P2_outside->template attribute<3>()->info().outside.insert(second_poly);//update P2P1 outside poly
-              }
-              else{
-                // poly_first  - poly_second            = Q2Q1
-                // poly_second - poly_first             = P2P1
-                // poly_first \cap poly_second          = P1Q2 U Q1P2
-                // opposite( poly_first U poly_second ) = {O}
-                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1
-                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //P2P1
-                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1P2
-                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1Q2
-                //update inside outside info (because darts from the same volume have been merged)
-                dof_Q2_outside->template attribute<3>()->info().inside.insert(first_poly); //update Q2Q1 inside poly
-                dof_P2_outside->template attribute<3>()->info().inside.insert(second_poly);//update P2P1 inside poly            
-              }
-            }
-            else
-            {
-              // poly_first  - poly_second            = P1Q1
-              // poly_second - poly_first             = P2Q2
-              // poly_first \cap poly_second          = Q1P2
-              // opposite( poly_first U poly_second ) = Q2P1
-              sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1
-              sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P2Q2
-              sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1P2
-              sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1
-            }        
-          }
-          else
-          {
-            if( Q2_is_between_P1P2 )
-            {
-              // poly_first  - poly_second            = Q2P2
-              // poly_second - poly_first             = Q1P1
-              // poly_first \cap poly_second          = P1Q2
-              // opposite( poly_first U poly_second ) = P2Q1
-              sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q2P2
-              sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
-              sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1Q2
-              sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P2Q1
-            }
-            else
-            {
-              bool P1_is_between_Q1Q2 = filtered_order_around_edge(indices.first,indices.second,index_q1,index_q2,index_p1,Q1,Q2,P1,nodes);
-              if (!P1_is_between_Q1Q2){
-                // poly_first  - poly_second            = P1P2
-                // poly_second - poly_first             = Q1Q2
-                // poly_first \cap poly_second          = {0}
-                // opposite( poly_first U poly_second ) = P2Q1 U Q2P1
-                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1P2
-                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1Q2
-                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P2Q1
-                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1
-                //update inside outside info (because darts from the same volume have been merged)
-                dof_Q1_outside->beta(3)->template attribute<3>()->info().outside.insert(first_poly); //update Q1Q2 outside poly
-                dof_P1_outside->beta(3)->template attribute<3>()->info().outside.insert(second_poly);//update P2P1 outside poly            
-              }
-              else{
-                // poly_first  - poly_second            = {0}
-                // poly_second - poly_first             = Q1P1 U P2Q2
-                // poly_first \cap poly_second          = P1P2
-                // opposite( poly_first U poly_second ) = Q2Q1
-                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
-                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P2Q2
-                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1P2
-                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1
-                //update inside outside info (because darts from the same volume have been merged)
-                dof_P1_outside->beta(3)->template attribute<3>()->info().inside.insert(second_poly); //update P1P2 inside poly
-                dof_Q2_outside->template attribute<3>()->info().outside.insert(first_poly);//update Q2Q1 outside poly            
-              }
-            }
-          }
-        }      
-    }
-    
-    #ifdef CGAL_COREFINEMENT_DEBUG
-    std::cout << "number of darts to remove: " << darts_to_remove.size() <<std::endl;
-    #endif
-    //remove darts from empty volumes
-    for (typename std::set<Dart_handle>::iterator itdart=darts_to_remove.begin(),end=darts_to_remove.end();itdart!=end;++itdart){
-      final_map().erase_dart(*itdart);
-    }
-    
-    //remove empty volumes
-    typedef typename Combinatorial_map_3_::template Attribute_range<3>::type Volume_attribute_range;
-    Volume_attribute_range& ratrib=final_map().template attributes<3>();     
-    typename Volume_attribute_range::iterator curr=ratrib.begin(),end=ratrib.end();
-    do{
-      if (curr->info().is_empty)
-        final_map().template erase_attribute<3>(curr++);
-      else
-        ++curr;
-    }
-    while(curr!=end);
-    
-    CGAL_assertion(final_map().is_valid());
-    
-    //update the info of each volume knowing about only one polyhedron:
-    //this happens when one polyhedron has a connected component
-    //that do not intersect the other polyhedron
-
-    typedef Point_inside_polyhedron_3<Polyhedron, Kernel> Inside_poly_test;
-
-    CGAL_precondition(polyhedron_to_map_node_to_polyhedron_vertex.size()==2);
-    Polyhedron* Poly_A = polyhedron_to_map_node_to_polyhedron_vertex.begin()->first;
-    Polyhedron* Poly_B = boost::next(polyhedron_to_map_node_to_polyhedron_vertex.begin())->first;
-    Inside_poly_test* inside_A_test_ptr=NULL;
-    Inside_poly_test* inside_B_test_ptr=NULL;
-    bool Poly_A_is_closed = Poly_A->is_closed();
-    bool Poly_B_is_closed = Poly_B->is_closed();
-
-    #ifdef CGAL_COREFINEMENT_DEBUG
-    final_map().display_characteristics(std::cout); std::cout << "\n";
-    #endif
-
-    typename Combinatorial_map_3::template  One_dart_per_cell_range<3> cell_range=final_map().template one_dart_per_cell<3>();
-    for (typename Combinatorial_map_3::template  One_dart_per_cell_range<3>::iterator
-      it = cell_range.begin(), it_end=cell_range.end();
-      it_end!= it;
-      ++it )
-    {
-      internal_IOP::Volume_info<Polyhedron>& info=it->template attribute<3>()->info();
-      std::size_t inside_size=info.inside.size();
-      std::size_t outside_size=info.outside.size();
-
-      // if a volume is not classified wrt the two polyhedra, it means the component we look at does not
-      // is a disjoint (but maybe at a vertex TAG SL001)
-      if ( inside_size + outside_size == 1)
-      {
-        bool is_inside = (inside_size==1);
-        Polyhedron* current_poly= is_inside? (*info.inside.begin()):(*info.outside.begin());
-        Polyhedron* test_poly;
-        Inside_poly_test* inside_test_ptr;
-        if ( current_poly==Poly_A)
-        {
-          // is the polyhedron is not closed, we set Poly_A to be outside by default
-          if (!Poly_B_is_closed){
-            info.outside.insert(Poly_B);
-            continue;
-          }
-          test_poly=Poly_B;
-          if (inside_B_test_ptr == NULL) inside_B_test_ptr=new Inside_poly_test(*Poly_B);
-          inside_test_ptr=inside_B_test_ptr;
-        }
-        else
-        {
-          // is the polyhedron is not closed, we set Poly_B to be outside by default
-          if (!Poly_A_is_closed){
-            info.outside.insert(Poly_A);
-            continue;
-          }
-          test_poly=Poly_A;
-          if (inside_A_test_ptr == NULL) inside_A_test_ptr=new Inside_poly_test(*Poly_A);
-          inside_test_ptr=inside_A_test_ptr;
-        }
-
-        // We need to find a point of the volume that is not on the boundary of the other volume.
-        // Then the position of this point give the position of the volume. If all the points are on
-        // the bounday, we take the mid-point of an edge (which must not be on the boundary otherwise
-        // it contradicts the fact that volumes are disjoint
-        // We first use the dart we have since one_dart_per_incident_cell has a non-negligeable cost.
-        typename Kernel::Point_3 query=it->template attribute<0>()->point();
-        CGAL::Bounded_side res = (*inside_test_ptr)(query);
-        if (res==ON_BOUNDARY)
-        {
-          typedef typename Combinatorial_map_3::
-            template One_dart_per_incident_cell_range<0,3> Vertex_range;
-
-          Vertex_range vertex_range =
-            final_map().template one_dart_per_incident_cell<0,3>(it);
-          typename Vertex_range::iterator vit = vertex_range.begin();
-
-          CGAL_assertion( typename Combinatorial_map_3::Dart_handle(vit) ==
-                          typename Combinatorial_map_3::Dart_handle(it) );
-          ++vit;
-          for ( ; vit!=vertex_range.end(); ++vit)
-          {
-            query=vit->template attribute<0>()->point();
-            res = (*inside_test_ptr)(query);
-            if ( res != ON_BOUNDARY ) break;
-          }
-
-          //take edge midpoint
-          if (res == ON_BOUNDARY)
-          {
-            /// \todo see do a better test here. At least the construction cannot fail
-            ///  but the mid-point can fall outside of the volume...
-            #ifdef CGAL_COREFINEMENT_DEBUG
-            #warning this is not exact!!!
-            #endif
-            typename Kernel::Point_3 p1=it->template attribute<0>()->point();
-            typename Kernel::Point_3 p2=it->beta(1)->template attribute<0>()->point();
-            query=midpoint(p1,p2);
-            res = (*inside_test_ptr)(query);
-          }
-
-          CGAL_assertion( res!= ON_BOUNDARY );
-        }
-
-        if (res  == ON_BOUNDED_SIDE )
-          info.inside.insert(test_poly);
-        else
-          info.outside.insert(test_poly);
-      }
-
-      #ifdef CGAL_COREFINEMENT_DEBUG
-      std::cout << "This volume has inside: ";
-      for (typename std::set<Polyhedron*>::iterator itpoly=info.inside.begin();itpoly!=info.inside.end();++itpoly)
-        std::cout << " " << *itpoly;
-      std::cout << " and outside: ";
-      for (typename std::set<Polyhedron*>::iterator itpoly=info.outside.begin();itpoly!=info.outside.end();++itpoly)
-        std::cout << " " << *itpoly;
-      std::cout << std::endl;
-      #endif
-    }
-    if (inside_A_test_ptr!=NULL) delete inside_A_test_ptr;
-    if (inside_B_test_ptr!=NULL) delete inside_B_test_ptr;
-  }
-};
-
-}//namespace CGAL
-  
-
-
-#endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/iterator.h b/3rdparty/CGAL-4.6/include/CGAL/iterator.h
deleted file mode 100644
index 92d177b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/iterator.h
+++ /dev/null
@@ -1,2500 +0,0 @@
-// Copyright (c) 2003  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-//                 Sylvain Pion
-
-#ifndef CGAL_ITERATOR_H
-#define CGAL_ITERATOR_H 1
-
-#include <CGAL/circulator.h>
-#include <CGAL/assertions.h>
-#include <CGAL/use.h>
-#include <vector>
-#include <map>
-#include <CGAL/tuple.h>
-#include <boost/variant.hpp>
-#include <boost/optional.hpp>
-
-#include <boost/config.hpp>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(push)
-#  pragma warning(disable:4396)
-
-#  pragma warning(disable:4522)  // multiple assignment operators specified
-// The warning, with VC12, was:
-// include\CGAL/iterator.h(1251) : warning C4522: 'CGAL::internal::Derivator<D,std::tuple<double,char>,std::tuple<std::back_insert_iterator<std::vector<double,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<char,std::allocator<char>>>>>' : multiple assignment operators specified
-
-#endif
-namespace CGAL {
-
-// +----------------------------------------------------------------+
-// | Emptyset_iterator
-// +----------------------------------------------------------------+
-// |  sends everything to /dev/null
-// +----------------------------------------------------------------+
-
-struct Emptyset_iterator
-  : public std::iterator< std::output_iterator_tag, void, void, void, void >
-{
-  template< class T >
-  Emptyset_iterator& operator=(const T&) { return *this; }
-
-  Emptyset_iterator& operator++()        { return *this; }
-  Emptyset_iterator& operator++(int)     { return *this; }
-
-  Emptyset_iterator& operator*()         { return *this; }
-};
-
-// +---------------------------------------------------------------------+
-// | Insert_iterator
-// +---------------------------------------------------------------------+
-// | Insert output iterator, which calls insert(value) on the container.
-// | Similar to std::insert_iterator<> except it doesn't pass an iterator.
-// +---------------------------------------------------------------------+
-
-template < class Container >
-class Insert_iterator
-  : public std::iterator< std::output_iterator_tag, void, void, void, void >
-{
-protected:
-  Container *container;
-public:
-  typedef Container container_type;
-
-  explicit Insert_iterator(Container &c)
-  : container(&c) {}
-
-  Insert_iterator&
-  operator=(typename Container::const_reference value)
-  {
-    container->insert(value);
-    return *this;
-  }
-
-  Insert_iterator&
-  operator*() { return *this; }
-
-  Insert_iterator&
-  operator++() { return *this; }
-
-  Insert_iterator
-  operator++(int) { return *this; }
-};
-
-template < class Container >
-inline Insert_iterator<Container>
-inserter(Container &x)
-{ return Insert_iterator<Container>(x); }
-
-// +----------------------------------------------------------------+
-// | Oneset_iterator
-// +----------------------------------------------------------------+
-// |  stores a pointer to an object of type T
-// |  which will be affected by operator*().
-// +----------------------------------------------------------------+
-
-template < class T >
-class Oneset_iterator
-  : public std::iterator< std::bidirectional_iterator_tag,
-			  void, void, void, void >
-{
-  T* t;
-  
-public:
-  // types
-  typedef Oneset_iterator<T> Self;
-  
-public:
-  Oneset_iterator(T& t) : t(&t) {}
-
-  T&       operator*()        { return *t; }
-  const T& operator*()  const { return *t; }
-  T*       operator->()       { return t; }
-  const T* operator->() const { return t; }
-
-  Self&    operator++()       { return *this; }
-  Self&    operator++(int)    { return *this; }
-
-  Self&    operator--()       { return *this; }
-  Self&    operator--(int)    { return *this; }
-};
-
-// +----------------------------------------------------------------+
-// | Const_oneset_iterator
-// +----------------------------------------------------------------+
-// |  stores an object of type T
-// |  which will be affected by operator*().
-// +----------------------------------------------------------------+
-
-template < typename T >
-class Const_oneset_iterator {
-public:
-  
-  // types
-  typedef  std::random_access_iterator_tag    iterator_category;
-  typedef  std::ptrdiff_t                     difference_type;
-  typedef  T                                  value_type;
-  typedef  value_type*                        pointer;
-  typedef  value_type&                        reference;
-  
-  typedef  Const_oneset_iterator<T>           Self;
-  typedef  difference_type                    Diff;
-  typedef  value_type                         Val;
-  typedef  pointer                            Ptr;
-  typedef  reference                          Ref;
-  
-  // construction
-  Const_oneset_iterator( const T& t = T(), Diff n = 0)
-    : value( t), index( n)
-  { }
-  
-  // access
-  Ref               operator *  ( )       { return  value; }
-  const value_type& operator *  ( ) const { return  value; }
-  Ptr               operator -> ( )       { return &value; }
-  const value_type* operator -> ( ) const { return &value; }
-  
-  // equality operator
-  bool       operator == ( const Self& x) const { return ( index==x.index); }
-  bool       operator != ( const Self& x) const { return ( index!=x.index); }
-  
-  // forward operations
-  // ------------------
-  Self&      operator ++ (    ) {                   ++index; return *this; }
-  Self       operator ++ ( int) { Self tmp = *this; ++index; return tmp;   }
-  
-  // bidirectional operations
-  // ------------------------
-  Self&      operator -- (    ) {                   --index; return *this; }
-  Self       operator -- ( int) { Self tmp = *this; --index; return tmp;   }
-  
-  // random access operations
-  // ------------------------
-  // access
-  Ref               operator [] ( Diff )       { return value;}
-  const value_type& operator [] ( Diff ) const { return value;}
-  
-  // less operator
-  bool       operator <  ( const Self& x) const { return ( index < x.index);}
-  
-  // arithmetic operations
-  Self&      operator += ( Diff n) { index += n; return *this; }
-  Self&      operator -= ( Diff n) { index -= n; return *this; }
-  
-  Self       operator +  ( Diff n) const { Self tmp = *this; return tmp+=n; }
-  Self       operator -  ( Diff n) const { Self tmp = *this; return tmp-=n; }
-  
-  Diff       operator -  ( const Self& x) const { return index - x.index; }
-  
-private:
-  
-  // data members
-  Val   value;
-  Diff  index;
-};
-
-// +----------------------------------------------------------------+
-// | Counting_output_iterator
-// +----------------------------------------------------------------+
-// |  stores a pointer to an int,
-// |  which will be incremented by operator=().
-// +----------------------------------------------------------------+
-
-// Undocumented, because there is some hope to merge it into Counting_iterator
-class Counting_output_iterator
-  : public std::iterator< std::output_iterator_tag, void, void, void, void >
-{
-  std::size_t *c;
-public:
-  Counting_output_iterator(std::size_t *cc) : c(cc) { *c = 0; }
-
-  Counting_output_iterator& operator++()    { return *this; }
-  Counting_output_iterator& operator++(int) { return *this; }
-
-  Counting_output_iterator& operator*() { return *this; }
-
-  template <typename T>
-  void operator=(const T&) { ++*c; }
-
-  std::size_t current_counter() const { return *c; }
-};
-
-template < class I,
-           class Val = typename std::iterator_traits<I>::value_type >
-class Counting_iterator {
-protected:
-  I            nt;    // The internal iterator.
-  std::size_t  d_i;   // The internal counter.
-public:
-  typedef I  Iterator;
-  typedef Counting_iterator<I,Val> Self;
-
-  typedef std::input_iterator_tag  iterator_category;
-  typedef Val                      value_type;
-  typedef std::ptrdiff_t           difference_type;
-  typedef const value_type&        reference;
-  typedef const value_type*        pointer;
-
-  // CREATION
-  // --------
-
-  Counting_iterator( std::size_t i = 0)             : d_i(i) {}
-  Counting_iterator( Iterator j, std::size_t i = 0) : nt(j), d_i(i) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-  Iterator    current_iterator() const { return nt;}
-  std::size_t current_counter()  const { return d_i;}
-
-  bool operator==( const Self& i) const { return ( d_i == i.d_i); }
-  bool operator!=( const Self& i) const { return !(*this == i);   }
-  reference  operator*()  const { return *nt; }
-  pointer    operator->() const { return nt.operator->(); }
-  Self& operator++() {
-    ++nt;
-    ++d_i;
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-};
-
-template < class I, int N,
-           class Ref  = typename std::iterator_traits<I>::reference,
-           class Ptr  = typename std::iterator_traits<I>::pointer,
-           class Val  = typename std::iterator_traits<I>::value_type,
-           class Dist = typename std::iterator_traits<I>::difference_type,
-           class Ctg  = typename std::iterator_traits<I>::iterator_category >
-class N_step_adaptor {
-protected:
-  I        nt;    // The internal iterator.
-  bool     empty;
-public:
-  typedef I                                        Iterator;
-  typedef N_step_adaptor<I,N>                      Self;
-  typedef std::iterator_traits<I>          ITI;
-  typedef typename ITI::reference          reference;
-  typedef typename ITI::pointer            pointer;
-  typedef typename ITI::value_type         value_type;
-  typedef typename ITI::difference_type    difference_type;
-  typedef typename ITI::iterator_category  iterator_category;
-  // Special for circulators.
-  typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
-  typedef typename  C_S_Traits::size_type               size_type;
-
-  // CREATION
-  // --------
-
-  N_step_adaptor(): empty(true) {}
-  N_step_adaptor( Iterator j) : nt(j), empty(false) {}
-
-  template <class II>
-  N_step_adaptor( const N_step_adaptor<II,N>& j)
-    : nt( j.current_iterator()), empty(j.empty) {}
-
-  // OPERATIONS Forward Category
-  // ---------------------------
-
-  // Circulator stuff.
-  typedef  I  Circulator;
-  Circulator  current_circulator() const { return nt;}
-
-  Iterator  current_iterator() const { return nt;}
-  bool operator==( Nullptr_t p) const {
-    CGAL_USE(p);
-    CGAL_assertion( p == 0);
-    return empty;
-  }
-  bool  operator!=( Nullptr_t p) const { return !(*this == p); }
-  bool  operator==( const Self& i) const { return (empty && i.empty) ||( nt == i.nt); }
-  bool  operator!=( const Self& i) const { return !(*this == i); }
-  reference operator*()  const { return *nt; }
-  pointer   operator->() const { return nt.operator->(); }
-  Self& operator++() {
-    std::advance( nt, N);
-    return *this;
-  }
-  Self  operator++(int) {
-    Self tmp = *this;
-    ++*this;
-    return tmp;
-  }
-
-  // OPERATIONS Bidirectional Category
-  // ---------------------------------
-
-  Self& operator--() {
-    std::advance( nt, -N);
-    return *this;
-  }
-  Self  operator--(int) {
-    Self tmp = *this;
-    --*this;
-    return tmp;
-  }
-
-  // OPERATIONS Random Access Category
-  // ---------------------------------
-
-  Self  min_circulator() const { return Self( nt.min_circulator()); }
-  Self& operator+=( difference_type n) {
-    nt += difference_type(N * n);
-    return *this;
-  }
-  Self  operator+( difference_type n) const {
-    Self tmp = *this;
-    tmp.nt += difference_type(N * n);
-    return tmp;
-  }
-  Self& operator-=( difference_type n) {
-    return operator+=( -n);
-  }
-  Self  operator-( difference_type n) const {
-    Self tmp = *this;
-    return tmp += -n;
-  }
-  difference_type  operator-( const Self& i) const { return (nt-i.nt)/N;}
-  reference operator[]( difference_type n) const {
-    Self tmp = *this;
-    tmp += n;
-    return tmp.operator*();
-  }
-  bool operator<( const Self& i) const { return ( nt < i.nt); }
-  bool operator>( const Self& i) const { return i < *this; }
-  bool operator<=( const Self& i) const { return !(i < *this); }
-  bool operator>=( const Self& i) const { return !(*this < i); }
-};
-
-// Microsoft 1300 cannot handle the default template parameters. Hence, ...
-template < class I, int N, class Ref, class Ptr, 
-	   class Val, class Dist, class Ctg >
-inline
-N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg>
-operator+(typename N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg>::difference_type n,
-	  N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg> i)
-{ return i += n; }
-
-template < class I, int N>
-class N_step_adaptor_derived : public I {
-public:
-    typedef I                               Iterator;
-    typedef I                               Circulator;
-    typedef N_step_adaptor_derived<I,N>     Self;
-    typedef typename I::iterator_category   iterator_category;
-    typedef typename I::value_type          value_type;
-    typedef typename I::difference_type     difference_type;
-    typedef typename I::reference           reference;
-    typedef typename I::pointer             pointer;
-    // Special for circulators.
-    typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
-    typedef typename  C_S_Traits::size_type               size_type;
-
-// CREATION
-// --------
-
-    N_step_adaptor_derived() {}
-    N_step_adaptor_derived( Iterator j) : I(j) {}
-
-    template <class II>
-    N_step_adaptor_derived( const N_step_adaptor_derived<II,N>& j)
-        : I( j.current_iterator()) {}
-
-// OPERATIONS Forward Category
-// ---------------------------
-
-    Circulator current_circulator() const { return *this;}
-    Iterator   current_iterator()   const { return *this;}
-
-    Self& operator++() {
-        std::advance( (I&)*this, N);
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-
-// OPERATIONS Bidirectional Category
-// ---------------------------------
-
-    Self& operator--() {
-        std::advance( (I&)*this, -N);
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-
-// OPERATIONS Random Access Category
-// ---------------------------------
-
-    Self  min_circulator() const { return Self( I::min_circulator()); }
-    Self& operator+=( difference_type n) {
-        I::operator+=( difference_type(N * n));
-        return *this;
-    }
-    Self  operator+( difference_type n) const {
-        Self tmp = *this;
-        tmp += n;
-        return tmp;
-    }
-    Self& operator-=( difference_type n) {
-        return operator+=( -n);
-    }
-    Self  operator-( difference_type n) const {
-        Self tmp = *this;
-        return tmp += -n;
-    }
-    difference_type  operator-( const Self& i) const {
-        return (I::operator-(i)) / N;
-    }
-    reference  operator[]( difference_type n) const {
-        Self tmp = *this;
-        tmp += n;
-        return tmp.operator*();
-    }
-};
-
-template < class I, int N >
-inline
-N_step_adaptor_derived<I,N>
-operator+( typename N_step_adaptor_derived<I,N>::difference_type n,
-           N_step_adaptor_derived<I,N> i)
-{ return i += n; }
-
-template < class I, class P > struct Filter_iterator;
-
-template < class I, class P >
-bool operator==(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
-template < class I, class P >
-bool operator<(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
-
-template < class I, class P >
-struct Filter_iterator {
-  typedef I                                Iterator;
-  typedef P                                Predicate;
-  typedef Filter_iterator<I,P>             Self;
-  typedef std::iterator_traits<I>          ITI;
-  typedef typename ITI::reference          reference;
-  typedef typename ITI::pointer            pointer;
-  typedef typename ITI::value_type         value_type;
-  typedef typename ITI::difference_type    difference_type;
-  typedef typename ITI::iterator_category  iterator_category;
-  // Special for circulators.
-  typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
-  typedef typename  C_S_Traits::size_type               size_type;
-
-protected:
-  Iterator e_;       // past-the-end position.
-  Iterator c_;       // current position.
-  Predicate p_;      // Leave out x <==> p_(x).
-public:
-
-  Filter_iterator() {}
-
-  Filter_iterator(Iterator e, const Predicate& p)
-  : e_(e), c_(e), p_(p) {}
-
-  Filter_iterator(Iterator e, const Predicate& p, Iterator c)
-  : e_(e), c_(c), p_(p)
-  {
-    while (c_ != e_ && p_(c_))
-      ++c_;
-  }
-
-  Self& operator++() {
-    do { ++c_; } while (c_ != e_ && p_(c_));
-    return *this;
-  }
-
-  Self& operator--() {
-    do {
-      --c_;
-    } while (p_(c_));
-    return *this;
-  }
-
-  Self operator++(int) {
-    Self tmp(*this);
-    ++(*this);
-    return tmp;
-  }
-
-  Self operator--(int) {
-    Self tmp(*this);
-    --(*this);
-    return tmp;
-  }
-  
-  reference operator*() const { return *c_;  }
-  pointer operator->() const  { return &*c_; }
-  const Predicate& predicate() const { return p_; }
-  Iterator base() const { return c_; }
-
-  Iterator end() const { return e_; }
-  bool is_end() const { return (c_ == e_); }
-
-  friend bool operator== <>(const Self&, const Self&);
-  friend bool operator< <>(const Self&, const Self&);
-};
-
-template < class I, class P >
-inline Filter_iterator< I, P >
-filter_iterator(I e, const P& p)
-{ return Filter_iterator< I, P >(e, p); }
-
-template < class I, class P >
-inline Filter_iterator< I, P >
-filter_iterator(I e, const P& p, I c)
-{ return Filter_iterator< I, P >(e, p, c); }
-
-template < class I, class P >
-inline
-bool operator==(const Filter_iterator<I,P>& it1,
-                const Filter_iterator<I,P>& it2)
-{
-  CGAL_precondition(it1.e_ == it2.e_);
-  return it1.base() == it2.base();
-}
-
-template < class I, class P >
-inline
-bool operator<(const Filter_iterator<I,P>& it1,
-                const Filter_iterator<I,P>& it2)
-{
-  return it1.base() < it2.base();
-}
-
-template < class I, class P >
-inline
-bool operator!=(const Filter_iterator<I,P>& it1,
-                const Filter_iterator<I,P>& it2)
-{ return !(it1 == it2); }
-
-template <class I1,class Op>
-class Join_input_iterator_1 : public 
-std::iterator<typename std::iterator_traits<I1>::iterator_category, 
-	      typename Op::result_type, 
-	      typename std::iterator_traits<I1>::difference_type, 
-	      typename Op::result_type*,
-	      typename Op::result_type&>
-{ 
-public: 
-  typedef Join_input_iterator_1<I1,Op> Self;
-  typedef typename Op::result_type value_type;
-  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
-  typedef value_type* pointer;
-  typedef value_type& reference; 
-  
-protected:
-  I1 i1;
-  Op op;
-  mutable value_type val;  // Note: mutable is needed because we want to
-                           // return a reference in operator*() and
-                           // operator[](int) below.
-
-public:
-  Join_input_iterator_1() {}
-  Join_input_iterator_1(const Join_input_iterator_1& it)
-    : i1(it.i1), op(it.op) {}
-  Join_input_iterator_1(I1 i,const Op& o=Op())
-    : i1(i), op(o) {}
-  
-  I1 current_iterator1() const { return i1; }
-  
-  bool operator==(const Self& i) const {
-    return i1 == i.i1;
-  }
-  bool operator!=(const Self& i) const { return !(*this == i); }
-  bool operator< (const Self& i) const {
-    return i1 < i.i1;
-  }
-
-  Join_input_iterator_1& operator=(const Join_input_iterator_1& it)
-  {
-    i1 = it.i1;
-    op = it.op;
-    return *this;
-  }
-  
-  const value_type& operator*() const { 
-    val = op(*i1);
-    return val;
-  }
-  
-  Self& operator++(   ) {
-    ++i1;
-    return *this;
-  }
-  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
-  Self& operator--(   ) {
-    --i1;
-    return *this;
-  }
-  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
-  
-  const value_type& operator[](difference_type i) const {
-    val = op(i1[i]);
-    return val;
-  }
-  
-  Self& operator+=(difference_type n) {
-    i1 += n;
-    return *this;
-  }
-  Self& operator-=(difference_type n) {
-    i1 -= n;
-    return *this;
-  }
-  Self  operator+ (difference_type n) const {
-    Self tmp = *this;
-    return tmp += n;
-  }
-  Self  operator- (difference_type n) const {
-    Self tmp = *this;
-    return tmp -= n;
-  }
-  difference_type operator-(const Self& i) const { return i1 - i.i1; }
-};
-
-template <class I1,class I2,class Op>
-class Join_input_iterator_2 : public 
-std::iterator<typename std::iterator_traits<I1>::iterator_category, 
-	      typename Op::result_type, 
-	      typename std::iterator_traits<I1>::difference_type, 
-	      typename Op::result_type*,
-	      typename Op::result_type&>
-{ 
-public: 
-  typedef Join_input_iterator_2<I1,I2,Op> Self;
-  typedef typename Op::result_type value_type;
-  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
-  typedef value_type* pointer;
-  typedef value_type& reference; 
-  
-protected:
-  I1 i1;
-  I2 i2;
-  Op op;
-  mutable value_type val;  // Note: mutable is needed because we want to
-                           // return a reference in operator*() and
-                           // operator[](int) below.
-  
-public:
-  Join_input_iterator_2() {}
-  Join_input_iterator_2(const Join_input_iterator_2& it)
-    : i1(it.i1), i2(it.i2), op(it.op) {}
-  Join_input_iterator_2(I1 i1,I2 i2,const Op& op=Op())
-    : i1(i1), i2(i2), op(op) {}
-  
-  I1 current_iterator1() const { return i1; }
-  I2 current_iterator2() const { return i2; }
-  
-  bool operator==(const Self& i) const {
-    return i1 == i.i1 && i2 == i.i2;
-  }
-  bool operator!=(const Self& i) const { return !(*this == i); }
-  bool operator< (const Self& i) const {
-    return i1 < i.i1 && i2 < i.i2;
-  }
-  
-  Join_input_iterator_2& operator=(const Join_input_iterator_2& it)
-  {
-    i1 = it.i1;
-    i2 = it.i2;
-    op = it.op;
-    return *this;
-  }
-
-  const value_type& operator*() const { 
-    val = op(*i1,*i2);
-    return val;
-  }
-  
-  Self& operator++(   ) {
-    ++i1;
-    ++i2;
-    return *this;
-  }
-  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
-  Self& operator--(   ) {
-    --i1;
-    --i2;
-    return *this;
-  }
-  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
-  
-  const value_type& operator[](difference_type i) const {
-    val = op(i1[i],i2[i]);
-    return val;
-  }
-  
-  Self& operator+=(difference_type n) {
-    i1 += n;
-    i2 += n;
-    return *this;
-  }
-  Self& operator-=(difference_type n) {
-    i1 -= n;
-    i2 -= n;
-    return *this;
-  }
-  Self  operator+ (difference_type n) const {
-    Self tmp = *this;
-    return tmp += n;
-  }
-  Self  operator- (difference_type n) const {
-    Self tmp = *this;
-    return tmp -= n;
-  }
-  difference_type operator-(const Self& i) const { return i1 - i.i1; }
-};
-
-template <class I1,class I2,class I3,class Op>
-class Join_input_iterator_3 : public 
-std::iterator<typename std::iterator_traits<I1>::iterator_category, 
-	      typename Op::result_type, 
-	      typename std::iterator_traits<I1>::difference_type, 
-	      typename Op::result_type*,
-	      typename Op::result_type&>
-{ 
-public: 
-  typedef Join_input_iterator_3<I1,I2,I3,Op> Self;
-  typedef typename Op::result_type value_type;
-  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
-  typedef value_type* pointer;
-  typedef value_type& reference; 
-  
-protected:
-  I1 i1;
-  I2 i2;
-  I3 i3;
-  Op op;
-  mutable value_type val;  // Note: mutable is needed because we want to
-                           // return a reference in operator*() and
-                           // operator[](int) below.
-  
-public:
-  Join_input_iterator_3() {}
-  Join_input_iterator_3(const Join_input_iterator_3& it)
-    : i1(it.i1), i2(it.i2), i3(it.i3), op(it.op) {}
-  Join_input_iterator_3(I1 i1,I2 i2,I3 i3,const Op& op=Op())
-    : i1(i1), i2(i2), i3(i3), op(op) {}
-  
-  I1 current_iterator1() const { return i1; }
-  I2 current_iterator2() const { return i2; }
-  I2 current_iterator3() const { return i3; }
-  
-  bool operator==(const Self& i) const {
-    return i1 == i.i1 && i2 == i.i2 && i3 == i.i3;
-  }
-  bool operator!=(const Self& i) const { return !(*this == i); }
-  bool operator< (const Self& i) const {
-    return i1 < i.i1 && i2 < i.i2 && i3 < i.i3;
-  }
-  
-  Join_input_iterator_3& operator=(const Join_input_iterator_3& it)
-  {
-    i1 = it.i1;
-    i2 = it.i1;
-    i3 = it.i3;
-    op = it.op;
-    return *this;
-  }
-
-  const value_type& operator*() const { 
-    val = op(*i1,*i2,*i3);
-    return val;
-  }
-  
-  Self& operator++(   ) {
-    ++i1;
-    ++i2;
-    ++i3;
-    return *this;
-  }
-  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
-  Self& operator--(   ) {
-    --i1;
-    --i2;
-    --i3;
-    return *this;
-  }
-  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
-  
-  const value_type& operator[](difference_type i) const {
-    val = op(i1[i],i2[i],i3[i]);
-    return val;
-  }
-  
-  Self& operator+=(difference_type n) {
-    i1 += n;
-    i2 += n;
-    i3 += n;
-    return *this;
-  }
-  Self& operator-=(difference_type n) {
-    i1 -= n;
-    i2 -= n;
-    i3 -= n;
-    return *this;
-  }
-  Self  operator+ (difference_type n) const {
-    Self tmp = *this;
-    return tmp += n;
-  }
-  Self  operator- (difference_type n) const {
-    Self tmp = *this;
-    return tmp -= n;
-  }
-  difference_type operator-(const Self& i) const { return i1 - i.i1; }
-};
-
-template < class IC>
-class Inverse_index {
-
-  // DEFINITION
-  //
-  // The class Inverse_index<IC,T> constructs an inverse index for a
-  // given range [i,j) of two iterators or circulators of type `IC' with the
-  // value type `T'. The first element I in the
-  // range [i,j) has the index 0. Consecutive elements are numbered
-  // incrementally. The inverse index provides a query for a given iterator
-  // or circulator k to retrieve its index number. For random access
-  // iterators or circulators, it is done in constant time by subtracting i.
-  // For other iterator categories, an STL `map' is used, which results in a
-  // log j-i query time. A comparison operator `operator<' is needed for
-  // `T*'.
-  //
-  // CREATION
-
-protected:
-  typedef std::map< const void*, std::size_t >  Index;
-  Index   idx;
-  IC      start;
-  typedef typename Index::iterator        Index_iterator;
-  typedef typename Index::const_iterator  Index_const_iterator;
-  typedef typename Index::value_type      Item;
-
-protected:
-  void ini_idx( IC i, const IC& j, std::input_iterator_tag);
-  void ini_idx( const IC& i, const IC& j, std::forward_iterator_tag){
-    ini_idx( i, j, std::input_iterator_tag());
-  }
-  void ini_idx(const IC& i,const IC& j, std::bidirectional_iterator_tag){
-    ini_idx( i, j, std::input_iterator_tag());
-  }
-  void ini_idx( const IC& i, const IC& j, Forward_circulator_tag) {
-    ini_idx( i, j, std::input_iterator_tag());
-  }
-  void ini_idx( const IC& i, const IC& j, Bidirectional_circulator_tag){
-    ini_idx( i, j, std::input_iterator_tag());
-  }
-  void ini_idx( const IC&, const IC&, std::random_access_iterator_tag){}
-  void ini_idx( const IC&, const IC&, Random_access_circulator_tag){}
-
-public:
-  void init_index( const IC& i, const IC& j) {
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    ini_idx( i, j, ICC());
-  }
-
-protected:
-  void push_back( const IC& k, std::input_iterator_tag) {
-    std::size_t d = idx.size();
-    idx[ &*k] = d;
-  }
-  void push_back( const IC& k, std::forward_iterator_tag){
-    push_back( k, std::input_iterator_tag());
-  }
-  void push_back( const IC& k, std::bidirectional_iterator_tag){
-    push_back( k, std::input_iterator_tag());
-  }
-  void push_back( const IC& k, Forward_circulator_tag){
-    push_back( k, std::input_iterator_tag());
-  }
-  void push_back( const IC& k, Bidirectional_circulator_tag){
-    push_back( k, std::input_iterator_tag());
-  }
-  void push_back( const IC&, std::random_access_iterator_tag){}
-  void push_back( const IC&, Random_access_circulator_tag){}
-
-public:
-  void push_back( const IC& k) {
-    // adds k at the end of the indices.
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    push_back( k, ICC());
-  }
-
-  std::size_t find( const IC& k, std::random_access_iterator_tag) const {
-    return std::size_t(k - start);
-  }
-  std::size_t find( const IC& k, Random_access_circulator_tag) const {
-    return std::size_t(k - start);
-  }
-  std::size_t find( const IC& k, std::input_iterator_tag) const {
-    // returns inverse index of k.
-    Index_const_iterator i = idx.find( &*k);
-    CGAL_assertion( i != idx.end());
-    return (*i).second;
-  }
-  std::size_t find( const IC& k, std::forward_iterator_tag) const {
-    return find( k, std::input_iterator_tag());
-  }
-  std::size_t find( const IC& k, std::bidirectional_iterator_tag) const {
-    return find( k, std::input_iterator_tag());
-  }
-  std::size_t find( const IC& k, Forward_circulator_tag) const {
-    return find( k, std::input_iterator_tag());
-  }
-  std::size_t find( const IC& k, Bidirectional_circulator_tag) const {
-    return find( k, std::input_iterator_tag());
-  }
-
-  typedef IC           iterator;
-  typedef IC           Circulator;
-  typedef std::size_t  size_type;
-
-  Inverse_index() : start(IC()) {}
-  // invalid index.
-
-  Inverse_index( const IC& i) : start(i) {};
-  // empty inverse index initialized to start at i.
-
-  Inverse_index( const IC& i, const IC& j) : start(i) {
-    // inverse index initialized with range [i,j).
-    init_index( i, j);
-  }
-
-  // OPERATIONS
-
-  std::size_t operator[]( const IC& k) const {
-    // returns inverse index of k.
-    typedef typename std::iterator_traits<IC>::iterator_category
-      category;
-    return find( k, category());
-  }
-};
-
-template < class IC>
-void
-Inverse_index< IC>::ini_idx( IC i, const IC& j, std::input_iterator_tag) {
-  std::size_t n = 0;
-  Index_iterator hint = idx.begin();
-  if ( ! is_empty_range( i, j)) {
-    do {
-      hint = idx.insert( hint, Item( &*i, n));
-      n++;
-    } while ((++i) != (j));
-  }
-}
-
-template < class IC>
-class Random_access_adaptor {
-
-  // DEFINITION
-  //
-  // The class Random_access_adaptor<IC> provides a random access
-  // for data structures. Either the data structure supports random access
-  // iterators or circulators where this class maps function calls to the
-  // iterator or circulator, or a STL `vector' is used to provide the random
-  // access. The iterator or circulator of the data structure are of type
-  // `IC'.
-  //
-  // CREATION
-
-protected:
-  typedef std::vector< IC> Index;
-  Index   index;
-  IC      start;
-
-public:
-  typedef typename Index::size_type  size_type;
-
-  void init_index( IC i, const IC& j, std::forward_iterator_tag);
-  void init_index( const IC& i, const IC& j,
-                   std::bidirectional_iterator_tag){
-    init_index( i, j, std::forward_iterator_tag());
-  }
-  void init_index( const IC& i, const IC&,
-                   std::random_access_iterator_tag){
-    start = i;
-  }
-  void init_index( const IC& i, const IC& j) {
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    init_index( i, j, ICC());
-  }
-
-
-  void reserve( size_type r, std::forward_iterator_tag) {
-    index.reserve( r);
-  }
-  void reserve( size_type r, std::bidirectional_iterator_tag){
-    reserve( r, std::forward_iterator_tag());
-  }
-  void reserve( size_type, std::random_access_iterator_tag){}
-
-
-  void push_back( const IC& k, std::forward_iterator_tag) {
-    index.push_back(k);
-  }
-  void push_back( const IC& k, std::bidirectional_iterator_tag){
-    push_back( k, std::forward_iterator_tag());
-  }
-  void push_back( const IC&, std::random_access_iterator_tag){}
-
-
-  const IC& find( size_type n, std::forward_iterator_tag) const {
-    // returns inverse index of k.
-    CGAL_assertion( n < index.size());
-    return index[n];
-  }
-  const IC& find( size_type n, std::bidirectional_iterator_tag) const {
-    return find( n, std::forward_iterator_tag());
-  }
-  IC  find( size_type n, std::random_access_iterator_tag) const {
-    return start + n;
-  }
-
-  typedef IC   iterator;
-  typedef IC   Circulator;
-
-  Random_access_adaptor() : start(IC()) {}
-  // invalid index.
-
-  Random_access_adaptor( const IC& i) : start(i) {}
-  // empty random access index initialized to start at i.
-
-  Random_access_adaptor( const IC& i, const IC& j) : start(i) {
-    // random access index initialized with range [i,j).
-    init_index( i, j);
-  }
-
-  void reserve( size_type r) {
-    // reserve r entries, if a `vector' is used internally.
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    reserve( r, ICC());
-  }
-
-  // OPERATIONS
-
-  IC  find( size_type n) const {
-    // returns inverse index of k.
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    return find( n, ICC());
-  }
-
-  IC  operator[]( size_type n) const { return find(n); }
-
-  void push_back( const IC& k) {
-    // adds k at the end of the indices.
-    typedef typename std::iterator_traits<IC>::iterator_category ICC;
-    push_back( k, ICC());
-  }
-};
-
-template < class IC>
-void
-Random_access_adaptor< IC>::init_index( IC i, const IC& j,
-                                        std::forward_iterator_tag) {
-  if ( ! is_empty_range( i, j)) {
-    do {
-      index.push_back( i);
-    } while ((++i) != (j));
-  }
-}
-
-template < class IC, class T >
-class Random_access_value_adaptor : public Random_access_adaptor<IC> {
-public:
-  typedef typename Random_access_adaptor<IC>::size_type size_type;
-
-  Random_access_value_adaptor() {}
-  // invalid index.
-
-  Random_access_value_adaptor( const IC& i)
-  : Random_access_adaptor<IC>(i) {}
-  // empty random access index initialized to start at i.
-
-  Random_access_value_adaptor( const IC& i, const IC& j)
-  : Random_access_adaptor<IC>(i,j) {}
-  // random access index initialized with range [i,j).
-
-  // OPERATIONS
-
-  T& operator[]( size_type n) const {
-    // returns inverse index of k.
-    return *(Random_access_adaptor<IC>::operator[](n));
-  }
-};
-
-template<typename _Iterator, typename Predicate>
-    class Filter_output_iterator
-    : public std::iterator<std::output_iterator_tag, void, void, void, void>
-    {
-    protected:
-      _Iterator iterator;
-      Predicate predicate;
-
-    public:
-      typedef _Iterator          iterator_type;
-
-      explicit Filter_output_iterator(_Iterator& __x, const Predicate& pred) 
-	: iterator(__x), predicate(pred) 
-      {}
-
-      template <typename T>
-      Filter_output_iterator&
-      operator=(const T& t)
-      {
-	if(! predicate(t))
-	  *iterator = t;
-	return *this;
-      }
-
-      Filter_output_iterator&
-      operator*()
-      { return *this; }
-
-      Filter_output_iterator&
-      operator++()
-      { 
-        ++iterator;
-        return *this; 
-      }
-
-      Filter_output_iterator
-      operator++(int)
-      {
-        Filter_output_iterator res(*this);
-        ++iterator;
-        return res; 
-      }
-    };
-
-template < class I, class P >
-inline Filter_output_iterator< I, P >
-filter_output_iterator(I e, const P& p)
-{ return Filter_output_iterator< I, P >(e, p); }
-
-namespace internal {
-
-template<typename OutputIterator>
-struct Output_visitor : boost::static_visitor<OutputIterator&> {
-  Output_visitor(OutputIterator* it) : out(it) {}
-  OutputIterator* out;
-  
-  template<typename T>
-  OutputIterator& operator()(const T& t) {
-    *(*out)++ = t;
-    return *out;
-  }
-};
-
-} // internal
-
-
-#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE)
-
-namespace internal {
-
-template < typename D, typename V = cpp11::tuple<>, typename O = cpp11::tuple<> >
-struct Derivator
-{
-#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
-  typedef Derivator<D, V, O> Self;
-  Self& operator=(const Self&) = delete;
-#endif
-  template <class Tuple>
-  void tuple_dispatch(const Tuple&)
-  {}
-};
-
-template < typename D, typename V1, typename O1, typename... V, typename... O>
-struct Derivator<D, cpp11::tuple<V1, V...>, cpp11::tuple<O1, O...> >
-  : public Derivator<D, cpp11::tuple<V...>, cpp11::tuple<O...> >
-{
-  typedef Derivator<D, cpp11::tuple<V1, V...>, cpp11::tuple<O1, O...> > Self;
-  typedef Derivator<D, cpp11::tuple<V...>, cpp11::tuple<O...> > Base;
-
-#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
-  Self& operator=(const Self&) = delete;
-#endif
-
-  using Base::operator=;
-  
-  D& operator=(const V1& v)
-  {
-    * cpp11::get< D::size - sizeof...(V) - 1 >(static_cast<typename D::Iterator_tuple&>(static_cast<D&>(*this))) ++ = v;
-    return static_cast<D&>(*this);
-  }
-
-  template <class Tuple>
-  void tuple_dispatch(const Tuple& t)
-  {
-    * cpp11::get< D::size - sizeof...(V) - 1 >(static_cast<typename D::Iterator_tuple&>(static_cast<D&>(*this))) ++ = 
-        cpp11::get< D::size - sizeof...(V) - 1 >(t);
-    static_cast<Base&>(*this).tuple_dispatch(t);
-  }
-};
-
-} // internal
-
-
-// OutputIterator which accepts several types in *o++= and dispatches,
-// wraps several other outputiterators, and dispatches accordingly.
-template < typename V, typename O >
-class Dispatch_output_iterator;
-
-template < typename... V, typename... O >
-class Dispatch_output_iterator < cpp11::tuple<V...>, cpp11::tuple<O...> >
- : private internal::Derivator<Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> >, cpp11::tuple<V...>, cpp11::tuple<O...> >
- , public cpp11::tuple<O...>
-{
-  CGAL_static_assertion_msg(sizeof...(V) == sizeof...(O),
-                "The number of explicit template parameters has to match the number of arguments");
-
-  static const int size = sizeof...(V);
-
-  template <typename D, typename V_, typename O_>
-  friend struct internal::Derivator;
-
-public:
-
-  typedef cpp11::tuple<O...>               Iterator_tuple;
-  typedef cpp11::tuple<V...>               Value_type_tuple;
-
-  typedef std::output_iterator_tag  iterator_category;
-  typedef void                      value_type;
-  typedef void                      difference_type;
-  typedef void                      pointer;
-  typedef void                      reference;
-
-private:
-
-  typedef Dispatch_output_iterator Self;
-  typedef internal::Derivator<Self, Value_type_tuple, Iterator_tuple > Base;
-
-public:
-
-  using Base::operator=;
-  using Base::tuple_dispatch;
-
-  Dispatch_output_iterator(O... o) : cpp11::tuple<O...>(o...) {}
-
-  Self& operator=(const Self& s)
-  {
-    static_cast<Iterator_tuple&>(*this) = static_cast<const Iterator_tuple&>(s);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  Self& operator++() { return *this; }
-  Self& operator++(int) { return *this; }
-  Self& operator*() { return *this; }
-
-  const Iterator_tuple& get_iterator_tuple() const { return *this; }
-  
-  Self& operator=(const cpp11::tuple<V...>& t)
-  {
-    tuple_dispatch(t);
-    return *this;
-  }
-};
-
-template < typename... V, typename... O>
-Dispatch_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >
-dispatch_output(O... o)
-{
-  return Dispatch_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> > (o...);
-}
-
-
-// Same as Dispatch_output_iterator, but has a dummy *o++= for all other types
-// that drops the data (same as Emptyset_iterator).
-
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-template < typename... V, typename... O >
-class Dispatch_or_drop_output_iterator < cpp11::tuple<V...>, cpp11::tuple<O...> >
- : public Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> > Base;
-
-  template <typename D, typename V_, typename O_>
-  friend struct internal::Derivator;
-
-public:
-
-  Dispatch_or_drop_output_iterator(O... o) : Base(o...) {}
-
-  using Base::operator=;
-
-  Self& operator*() { return *this; }
-  Self& operator++() { return *this; }
-  Self& operator++(int) { return *this; }
-
-  template <class T>
-  Self& operator=(const T&) { return *this; }
-};
-
-
-template < typename... V, typename... O>
-inline
-Dispatch_or_drop_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >
-dispatch_or_drop_output(O... o)
-{
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >(o...);
-}
-
-#else
-
-// Non-variadic version
-
-template < typename V, typename O >
-class Dispatch_output_iterator;
-
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-// Version with 1 parameters
-template<class V1,class O1>
-class Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >:public cpp11::tuple<O1>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1> Value_type_tuple;
-  typedef cpp11::tuple<O1> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1):Iterator_tuple(out1){}
-    
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}
-  
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    return *this;
-  }
-
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-  
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class O1>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
-dispatch_output(O1 out1){
-  return Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >(out1);
-}
-
-//Version with DROP
-
-template<class V1,class O1>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1):Base(out1){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class O1>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
-dispatch_or_drop_output(O1 out1){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >(out1);
-}
-
-// Version with 2 parameters
-template<class V1,class O1,class V2,class O2>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >:public cpp11::tuple<O1,O2>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2):Iterator_tuple(out1,out2){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}
-
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1, V2>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    return *this;
-  }
-
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class O1,class O2>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
-dispatch_output(O1 out1,O2 out2){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >(out1,out2);
-}
-
-//Version with DROP
-
-template<class V1,class O1,class V2,class O2>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2):Base(out1,out2){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class O1,class O2>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
-dispatch_or_drop_output(O1 out1,O2 out2){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >(out1,out2);
-}
-
-//Version with 3 parameters
-template<class V1,class O1,class V2,class O2,class V3, class O3>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >:public cpp11::tuple<O1,O2,O3>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2,V3> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2,O3> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3):Iterator_tuple(out1,out2,out3){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}  
-
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const cpp11::tuple<V1, V2, V3>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
-    return *this;
-  }
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class V3,class O1,class O2,class O3>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
-dispatch_output(O1 out1,O2 out2,O3 out3){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >(out1,out2,out3);
-}
-
-//Version with DROP
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-template<class V1,class O1,class V2,class O2,class V3,class O3>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3):Base(out1,out2,out3){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2,O3> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2,V3>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class V3,class O1,class O2,class O3>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
-dispatch_or_drop_output(O1 out1,O2 out2,O3 out3){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >(out1,out2,out3);
-}
-
-//Version with 4 parameters
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >:public cpp11::tuple<O1,O2,O3,O4>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2,V3,V4> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2,O3,O4> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Iterator_tuple(out1,out2,out3,out4){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}  
-  
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const cpp11::tuple<V1, V2, V3, V4>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
-    return *this;
-  }
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class V3,class V4,class O1,class O2,class O3,class O4>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
-dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >(out1,out2,out3,out4);
-}
-
-//Version with DROP
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Base(out1,out2,out3,out4){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2,O3,O4> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2,V3,V4>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class V3,class V4,class O1,class O2,class O3,class O4>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
-dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >(out1,out2,out3,out4);
-}
-
-//Version with 5 parameters
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >:public cpp11::tuple<O1,O2,O3,O4,O5>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2,V3,V4,V5> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2,O3,O4,O5> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Iterator_tuple(out1,out2,out3,out4,out5){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}  
-  
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
-    return *this;
-  }
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class V3,class V4,class V5,class O1,class O2,class O3,class O4,class O5>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
-dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >(out1,out2,out3,out4,out5);
-}
-
-//Version with DROP
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Base(out1,out2,out3,out4,out5){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2,O3,O4,O5> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class V3,class V4,class V5,class O1,class O2,class O3,class O4,class O5>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
-dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >(out1,out2,out3,out4,out5);
-}
-
-//Version with 6 parameters
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >:public cpp11::tuple<O1,O2,O3,O4,O5,O6>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2,V3,V4,V5,V6> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Iterator_tuple(out1,out2,out3,out4,out5,out6){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}  
-  
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V6& obj){
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5, V6>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<5>(obj);
-    return *this;
-  }
-
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class V3,class V4,class V5,class V6,class O1,class O2,class O3,class O4,class O5,class O6>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
-dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >(out1,out2,out3,out4,out5,out6);
-}
-
-//Version with DROP
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Base(out1,out2,out3,out4,out5,out6){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V6& obj){
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5,V6>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class V3,class V4,class V5,class V6,class O1,class O2,class O3,class O4,class O5,class O6>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
-dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >(out1,out2,out3,out4,out5,out6);
-}
-
-//Version with 7 parameters
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6,class V7,class O7>
-class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >:public cpp11::tuple<O1,O2,O3,O4,O5,O6,O7>{
-  typedef Dispatch_output_iterator Self;
-  
-public:
-  typedef cpp11::tuple<V1,V2,V3,V4,V5,V6,V7> Value_type_tuple;
-  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> Iterator_tuple;
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Iterator_tuple(out1,out2,out3,out4,out5,out6,out7){}
-
-  //Added because required by MSVC10
-  Dispatch_output_iterator(const Self& other):
-    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
-  {}  
-  
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V6& obj){
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-   Self& operator=(const V7& obj){
-    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5, V6, V7>& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<5>(obj);
-    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<6>(obj);
-    return *this;
-  }
-
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-  
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    boost::apply_visitor(visitor, t);
-    return *this;
-  }
-
-  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
-  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
-    internal::Output_visitor<Self> visitor(this);
-    if(t) boost::apply_visitor(visitor, *t);
-    return *this;
-  }
-
-  const Iterator_tuple& get_iterator_tuple() const
-  { return *this; }
-  
-};
-
-
-template<class V1,class V2,class V3,class V4,class V5,class V6,class V7,class O1,class O2,class O3,class O4,class O5,class O6,class O7>
-inline 
-Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
-dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){
-  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >(out1,out2,out3,out4,out5,out6,out7);
-}
-
-//Version with DROP
-template < typename V, typename O >
-class Dispatch_or_drop_output_iterator;
-
-
-template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6,class V7,class O7>
-class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >:
-        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
-{
-  typedef Dispatch_or_drop_output_iterator Self;
-  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> > Base;
-  
-public:
-
-  Self& operator*(){ return *this; }
-  Self& operator++(){ return *this; } 
-  Self& operator++(int){ return *this; }  
-  
-  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Base(out1,out2,out3,out4,out5,out6,out7){}
-  
-  #if defined(__EDG__)  
-  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> Iterator_tuple;
-    
-  Self& operator=(const V1& obj){
-    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }
-  
-  Self& operator=(const V2& obj){
-    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V3& obj){
-    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V4& obj){
-    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V5& obj){
-    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const V6& obj){
-    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-
-  Self& operator=(const V7& obj){
-    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=obj;
-    return *this;
-  }  
-  
-  Self& operator=(const Self& s){
-    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
-    return *this;
-  }
-
-  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>& t){
-    static_cast< Base& >(*this) = t;
-    return *this;
-  }
-  #else
-  using Base::operator=;
-  #endif //defined(__EDG__)
-  
-  
-  template <class T>
-  Self& operator=(const T&){
-    return *this;
-  }
-};
-
-template<class V1,class V2,class V3,class V4,class V5,class V6,class V7,class O1,class O2,class O3,class O4,class O5,class O6,class O7>
-inline 
-Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
-dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){
-  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >(out1,out2,out3,out4,out5,out6,out7);
-}
-
-#endif
-
-} //namespace CGAL
-
-#if defined(BOOST_MSVC)
-#  pragma warning(pop)
-#endif
-
-#endif // CGAL_ITERATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/jet_estimate_normals.h b/3rdparty/CGAL-4.6/include/CGAL/jet_estimate_normals.h
deleted file mode 100644
index 7b2dfdb..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/jet_estimate_normals.h
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret and Marc Pouget and Frederic Cazals
-
-#ifndef CGAL_JET_ESTIMATE_NORMALS_H
-#define CGAL_JET_ESTIMATE_NORMALS_H
-
-#include <CGAL/trace.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Monge_via_jet_fitting.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <iterator>
-#include <list>
-
-namespace CGAL {
-
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-namespace internal {
-
-
-/// Estimates normal direction using jet fitting
-/// on the k nearest neighbors.
-///
-/// \pre `k >= 2`
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return Computed normal. Orientation is random.
-template < typename Kernel,
-           typename SvdTraits,
-           typename Tree
->
-typename Kernel::Vector_3
-jet_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute the normal at
-                    Tree& tree, ///< KD-tree
-                    unsigned int k, ///< number of neighbors
-                    unsigned int degree_fitting)
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3  Point;
-
-  // types for K nearest neighbors search
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // types for jet fitting
-  typedef Monge_via_jet_fitting< Kernel,
-                                 Simple_cartesian<double>,
-                                 SvdTraits> Monge_jet_fitting;
-  typedef typename Monge_jet_fitting::Monge_form Monge_form;
-
-  // Gather set of (k+1) neighboring points.
-  // Perform k+1 queries (as in point set, the query point is
-  // output first). Search may be aborted if k is greater
-  // than number of input points.
-  std::vector<Point> points; points.reserve(k+1);
-  Neighbor_search search(tree,query,k+1);
-  Search_iterator search_iterator = search.begin();
-  unsigned int i;
-  for(i=0;i<(k+1);i++)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-    points.push_back(search_iterator->first);
-    search_iterator++;
-  }
-  CGAL_point_set_processing_precondition(points.size() >= 1);
-
-  // performs jet fitting
-  Monge_jet_fitting monge_fit;
-  const unsigned int degree_monge = 1; // we seek for normal and not more.
-  Monge_form monge_form = monge_fit(points.begin(), points.end(),
-                                    degree_fitting, degree_monge);
-
-  // output normal vector (already normalized in monge form)
-  return monge_form.normal_direction();
-}
-
-} /* namespace internal */
-/// \endcond
-
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// Estimates normal directions of the `[first, beyond)` range of points
-/// using jet fitting on the k nearest neighbors.
-/// The output normals are randomly oriented.
-///
-/// \pre `k >= 2`
-///
-///
-/// @tparam ForwardIterator iterator model of the concept of the same name over input points and able to store output normals.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with  value type `Point_3<Kernel>`.
-///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
-///         can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
-
-// This variant requires all parameters.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel,
-          typename SvdTraits
->
-void
-jet_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k, ///< number of neighbors.
-  const Kernel& /*kernel*/, ///< geometric traits.
-  unsigned int degree_fitting = 2) ///< fitting degree
-{
-  CGAL_TRACE("Calls jet_estimate_normals()\n");
-
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  // Input points types
-  typedef typename boost::property_traits<NormalPMap>::value_type Vector;
-
-  // types for K nearest neighbors search structure
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Tree;
-
-  // precondition: at least one element in the container.
-  // to fix: should have at least three distinct points
-  // but this is costly to check
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  // precondition: at least 2 nearest neighbors
-  CGAL_point_set_processing_precondition(k >= 2);
-
-  std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("  Creates KD-tree\n");
-
-  ForwardIterator it;
-
-  // Instanciate a KD-tree search.
-  // Note: We have to convert each input iterator to Point_3.
-  std::vector<Point> kd_tree_points; 
-  for(it = first; it != beyond; it++)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    Point point = get(point_pmap, it);
-#else
-    Point point = get(point_pmap, *it);
-#endif
-    kd_tree_points.push_back(point);
-  }
-  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
-
-  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("  Computes normals\n");
-
-  // iterate over input points, compute and output normal
-  // vectors (already normalized)
-  for(it = first; it != beyond; it++)
-  {
-    Vector normal = internal::jet_estimate_normal<Kernel,SvdTraits,Tree>(
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      get(point_pmap,it), 
-#else
-      get(point_pmap,*it), 
-#endif      
-      tree, k, degree_fitting);
-
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    put(normal_pmap, it, normal); // normal_pmap[it] = normal
-#else
-    put(normal_pmap, *it, normal); // normal_pmap[it] = normal
-#endif 
-    
-  }
-
-  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("End of jet_estimate_normals()\n");
-}
-
-#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
-/// @cond SKIP_IN_MANUAL
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-void
-jet_estimate_normals(
-  ForwardIterator first,
-  ForwardIterator beyond,
-  PointPMap point_pmap,
-  NormalPMap normal_pmap,
-  unsigned int k,
-  const Kernel& kernel,
-  unsigned int degree_fitting = 2)
-{
-  #ifdef CGAL_EIGEN3_ENABLED
-  typedef Eigen_svd SvdTraits;
-  #else
-  typedef Lapack_svd SvdTraits;
-  #endif
-  jet_estimate_normals<ForwardIterator,PointPMap,NormalPMap,Kernel,SvdTraits>(
-    first, beyond, point_pmap, normal_pmap, k,  kernel, degree_fitting);
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-void
-jet_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k, ///< number of neighbors.
-  unsigned int degree_fitting = 2)
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  jet_estimate_normals(
-    first,beyond,
-    point_pmap, 
-    normal_pmap,
-    k,
-    Kernel(),
-    degree_fitting);
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename ForwardIterator,
-          typename NormalPMap
->
-void
-jet_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k, ///< number of neighbors.
-  unsigned int degree_fitting = 2)
-{
-  jet_estimate_normals(
-    first,beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(first),
-#else
-    make_identity_property_map(
-    typename std::iterator_traits<ForwardIterator>::value_type()),
-#endif
-    normal_pmap,
-    k,
-    degree_fitting);
-}
-/// @endcond
-#endif
-
-} //namespace CGAL
-
-#endif // CGAL_JET_ESTIMATE_NORMALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/jet_smooth_point_set.h b/3rdparty/CGAL-4.6/include/CGAL/jet_smooth_point_set.h
deleted file mode 100644
index b456662..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/jet_smooth_point_set.h
+++ /dev/null
@@ -1,277 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez, Marc Pouget and Laurent Saboret
-
-#ifndef CGAL_JET_SMOOTH_POINT_SET_H
-#define CGAL_JET_SMOOTH_POINT_SET_H
-
-#include <CGAL/trace.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Monge_via_jet_fitting.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-
-#include <iterator>
-#include <list>
-
-namespace CGAL {
-
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-
-namespace internal {
-
-
-/// Smoothes one point position using jet fitting on the k
-/// nearest neighbors and reprojection onto the jet.
-///
-/// \pre `k >= 2`
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return computed point
-template <typename Kernel,
-          typename SvdTraits,
-          typename Tree
-          >
-typename Kernel::Point_3
-jet_smooth_point(
-  const typename Kernel::Point_3& query, ///< 3D point to project
-  Tree& tree, ///< KD-tree
-  const unsigned int k, ///< number of neighbors.
-  const unsigned int degree_fitting,
-  const unsigned int degree_monge)
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  // types for K nearest neighbors search
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // types for jet fitting
-  typedef Monge_via_jet_fitting< Kernel,
-                                 Simple_cartesian<double>,
-                                 SvdTraits> Monge_jet_fitting;
-  typedef typename Monge_jet_fitting::Monge_form Monge_form;
-
-  // Gather set of (k+1) neighboring points.
-  // Performs k + 1 queries (if unique the query point is
-  // output first). Search may be aborted if k is greater
-  // than number of input points.
-  std::vector<Point> points; points.reserve(k+1);
-  Neighbor_search search(tree,query,k+1);
-  Search_iterator search_iterator = search.begin();
-  unsigned int i;
-  for(i=0;i<(k+1);i++)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-    points.push_back(search_iterator->first);
-    search_iterator++;
-  }
-  CGAL_point_set_processing_precondition(points.size() >= 1);
-
-  // performs jet fitting
-  Monge_jet_fitting monge_fit;
-  Monge_form monge_form = monge_fit(points.begin(), points.end(),
-                                    degree_fitting, degree_monge);
-
-  // output projection of query point onto the jet
-  return monge_form.origin();
-}
-
-} /* namespace internal */
-
-/// \endcond
-
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// Smoothes the `[first, beyond)` range of points using jet fitting on the k
-/// nearest neighbors and reprojection onto the jet.
-/// As this method relocates the points, it
-/// should not be called on containers sorted w.r.t. point locations.
-///
-/// \pre `k >= 2`
-///
-/// @tparam InputIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadWritePropertyMap` with value type `Point_3<Kernel>`.
-///        It can be omitted if  the value type of `InputIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
-///         can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
-
-// This variant requires all parameters.
-template <typename InputIterator,
-          typename PointPMap,
-          typename Kernel,
-          typename SvdTraits
->
-void
-jet_smooth_point_set(
-  InputIterator first,  ///< iterator over the first input point.
-  InputIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3.
-  unsigned int k, ///< number of neighbors.
-  const Kernel& /*kernel*/, ///< geometric traits.
-  unsigned int degree_fitting = 2, ///< fitting degree
-  unsigned int degree_monge = 2)  ///< Monge degree
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  // types for K nearest neighbors search structure
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Tree;
-
-  // precondition: at least one element in the container.
-  // to fix: should have at least three distinct points
-  // but this is costly to check
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  // precondition: at least 2 nearest neighbors
-  CGAL_point_set_processing_precondition(k >= 2);
-  
-  InputIterator it;
-  
-  // Instanciate a KD-tree search.
-  // Note: We have to convert each input iterator to Point_3.
-  std::vector<Point> kd_tree_points; 
-  for(it = first; it != beyond; it++)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    Point point = get(point_pmap, it);
-#else
-    Point point = get(point_pmap, *it);
-#endif  
-    kd_tree_points.push_back(point);
-  }
-  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
-  
-  // Iterates over input points and mutates them.
-  // Implementation note: the cast to Point& allows to modify only the point's position.
-  for(it = first; it != beyond; it++)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    const Point& p = get(point_pmap, it);
-    put(point_pmap, it ,
-        internal::jet_smooth_point<Kernel, SvdTraits>(
-          p,tree,k,degree_fitting,degree_monge) );
-#else
-    const Point& p = get(point_pmap, *it);
-    put(point_pmap, *it ,
-        internal::jet_smooth_point<Kernel, SvdTraits>(
-          p,tree,k,degree_fitting,degree_monge) );
-#endif  
-  }
-}
-
-
-#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
-/// @cond SKIP_IN_MANUAL
-template <typename InputIterator,
-          typename PointPMap,
-          typename Kernel
->
-void
-jet_smooth_point_set(
-  InputIterator first,  ///< iterator over the first input point.
-  InputIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3.
-  unsigned int k, ///< number of neighbors.
-  const Kernel& kernel, ///< geometric traits.
-  unsigned int degree_fitting = 2, ///< fitting degree
-  unsigned int degree_monge = 2)  ///< Monge degree
-{
-  #ifdef CGAL_EIGEN3_ENABLED
-  typedef Eigen_svd SvdTraits;
-  #else
-  typedef Lapack_svd SvdTraits;
-  #endif
-  jet_smooth_point_set<InputIterator, PointPMap, Kernel, SvdTraits>(
-    first, beyond, point_pmap, k, kernel, degree_fitting, degree_monge);
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename InputIterator,
-          typename PointPMap
->
-void
-jet_smooth_point_set(
-  InputIterator first, ///< iterator over the first input point
-  InputIterator beyond, ///< past-the-end iterator
-  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
-  unsigned int k, ///< number of neighbors.
-  const unsigned int degree_fitting = 2,
-  const unsigned int degree_monge = 2)
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  jet_smooth_point_set(
-    first,beyond,
-    point_pmap,
-    k,
-    Kernel(),
-    degree_fitting,degree_monge);
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename InputIterator
->
-void
-jet_smooth_point_set(
-  InputIterator first, ///< iterator over the first input point
-  InputIterator beyond, ///< past-the-end iterator
-  unsigned int k, ///< number of neighbors.
-  const unsigned int degree_fitting = 2,
-  const unsigned int degree_monge = 2)
-{
-  jet_smooth_point_set(
-    first,beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(first),
-#else
-    make_identity_property_map(
-    typename std::iterator_traits<InputIterator>::value_type()),
-#endif
-    k,
-    degree_fitting,degree_monge);
-}
-/// @endcond
-#endif
-
-} //namespace CGAL
-
-#endif // CGAL_JET_SMOOTH_POINT_SET_H
-
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_rational.h b/3rdparty/CGAL-4.6/include/CGAL/leda_rational.h
deleted file mode 100644
index 8123576..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/leda_rational.h
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright (c) 1999,2007  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Michael Hemmer
-
-#ifndef CGAL_LEDA_RATIONAL_H
-#define CGAL_LEDA_RATIONAL_H
-
-#include <CGAL/number_type_basic.h>
-
-#include <CGAL/leda_coercion_traits.h>
-#include <CGAL/Interval_nt.h>
-
-#include <CGAL/Needs_parens_as_product.h>
-
-#include <utility>
-#include <limits>
-
-#include <CGAL/LEDA_basic.h>
-#if CGAL_LEDA_VERSION < 500
-#  include <LEDA/rational.h>
-#  include <LEDA/interval.h>
-#else
-#  include <LEDA/numbers/rational.h>
-#  if defined(  _MSC_VER )
-#    pragma push_macro("ERROR")  
-#    undef ERROR
-#  endif // _MSC_VER
-#  include <LEDA/numbers/interval.h>
-#  if defined(  _MSC_VER )
-#    pragma pop_macro("ERROR")  
-#  endif
-#endif
-
-#include <CGAL/leda_integer.h> // for GCD in Fraction_traits
-
-namespace CGAL {
-
-template <> class Algebraic_structure_traits< leda_rational >
-  : public Algebraic_structure_traits_base< leda_rational,
-                                            Field_tag >  {
-  public:
-    typedef Tag_true            Is_exact;
-    typedef Tag_false           Is_numerical_sensitive;
-
-//    TODO: How to implement this without having sqrt?
-//    typedef INTERN_AST::Is_square_per_sqrt< Type >
-//                                                                 Is_square;
-
-    class Simplify
-      : public std::unary_function< Type&, void > {
-      public:
-        void operator()( Type& x) const {
-            x.normalize();
-        }
-    };
-
-};
-
-template <> class Real_embeddable_traits< leda_rational >
-  : public INTERN_RET::Real_embeddable_traits_base< leda_rational , CGAL::Tag_true > {
-  public:
-  
-    class Abs
-      : public std::unary_function< Type, Type > {
-      public:
-        Type operator()( const Type& x ) const {
-            return CGAL_LEDA_SCOPE::abs( x );
-        }
-    };
-
-    class Sgn
-      : public std::unary_function< Type, ::CGAL::Sign > {
-      public:
-        ::CGAL::Sign operator()( const Type& x ) const {
-            return (::CGAL::Sign) CGAL_LEDA_SCOPE::sign( x );
-        }
-    };
-
-    class Compare
-      : public std::binary_function< Type, Type,
-                                Comparison_result > {
-      public:
-        Comparison_result operator()( const Type& x,
-                                      const Type& y ) const {
-          return (Comparison_result) CGAL_LEDA_SCOPE::compare( x, y );
-        }
-        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT(Type,Comparison_result)
-    };
-
-    class To_double
-      : public std::unary_function< Type, double > {
-      public:
-        double operator()( const Type& x ) const {
-          return x.to_double();
-        }
-    };
-
-    class To_interval
-      : public std::unary_function< Type, std::pair< double, double > > {
-      public:
-        std::pair<double, double> operator()( const Type& x ) const {
-
-#if CGAL_LEDA_VERSION >= 501
-          CGAL_LEDA_SCOPE::interval temp(x);
-          std::pair<double, double> result(temp.lower_bound(),temp.upper_bound());
-          CGAL_assertion_code( double infinity=std::numeric_limits<double>::infinity(); )
-          CGAL_postcondition(result.first  == -infinity || Type(result.first)<=x);
-          CGAL_postcondition(result.second ==  infinity || Type(result.second)>=x);
-          return result;
-#else
-          CGAL_LEDA_SCOPE::bigfloat xnum = x.numerator();
-          CGAL_LEDA_SCOPE::bigfloat xden = x.denominator();
-          CGAL_LEDA_SCOPE::bigfloat xupp =
-                                    div(xnum,xden,53,CGAL_LEDA_SCOPE::TO_P_INF);
-          CGAL_LEDA_SCOPE::bigfloat xlow =
-                                    div(xnum,xden,53,CGAL_LEDA_SCOPE::TO_N_INF);
-
-          // really smallest positive double
-          double MinDbl = CGAL_LEDA_SCOPE::fp::compose_parts(0,0,0,1);
-
-          double low = xlow.to_double();
-          while(Type(low) > x) low = low - MinDbl;
-
-          double upp = xupp.to_double();
-          while(Type(upp) < x) upp = upp + MinDbl;
-
-          std::pair<double, double> result(low,upp);
-          CGAL_postcondition(Type(result.first)<=x);
-          CGAL_postcondition(Type(result.second)>=x);
-          return result;
-#endif
-          // Original CGAL to_interval (seemed to be inferior)
-          //  // There's no guarantee about the error of to_double(), so I add
-          //  //  3 ulps...
-          //  Protect_FPU_rounding<true> P (CGAL_FE_TONEAREST);
-          //  Interval_nt_advanced approx (z.to_double());
-          //  FPU_set_cw(CGAL_FE_UPWARD);
-          //
-          //  approx += Interval_nt<false>::smallest();
-          //  approx += Interval_nt<false>::smallest();
-          //  approx += Interval_nt<false>::smallest();
-          //  return approx.pair();
-
-        }
-    };
-};
-
-/*! \ingroup NiX_Fraction_traits_spec
- *  \brief Specialization of Fraction_traits for ::leda::rational
- */
-template <>
-class Fraction_traits< leda_rational > {
-public:
-    typedef leda_rational Type;
-    typedef ::CGAL::Tag_true Is_fraction;
-    typedef leda_integer Numerator_type;
-    typedef Numerator_type Denominator_type;
-
-    typedef Algebraic_structure_traits< Numerator_type >::Gcd Common_factor;
-
-    class Decompose {
-    public:
-        typedef Type first_argument_type;
-        typedef Numerator_type& second_argument_type;
-        typedef Numerator_type& third_argument_type;
-        void operator () (
-                const Type& rat,
-                Numerator_type& num,
-                Numerator_type& den) {
-            num = rat.numerator();
-            den = rat.denominator();
-        }
-    };
-
-    class Compose {
-    public:
-        typedef Numerator_type first_argument_type;
-        typedef Numerator_type second_argument_type;
-        typedef Type result_type;
-        Type operator ()(
-                const Numerator_type& num ,
-                const Numerator_type& den ) {
-            Type result(num, den);
-            result.normalize();
-            return result;
-        }
-    };
-};
-
-template <class F>
-class Output_rep< leda_rational, F> {
-    const leda_rational& t;
-public:
-    //! initialize with a const reference to \a t.
-    Output_rep( const leda_rational& tt) : t(tt) {}
-    //! perform the output, calls \c operator\<\< by default.
-    std::ostream& operator()( std::ostream& out) const {
-        switch (get_mode(out)) {
-        case IO::PRETTY:{
-            if(t.denominator() == leda_integer(1))
-                return out <<t.numerator();
-            else
-                return out << t.numerator()
-                           << "/"
-                           << t.denominator();
-            break;
-        }
-
-        default:
-            return out << t.numerator()
-                       << "/"
-                       << t.denominator();
-        }
-    }
-};
-
-template <>
-struct Needs_parens_as_product< leda_rational >{
-    bool operator()( leda_rational t){
-        if (t.denominator() != 1 )
-            return true;
-        else
-            return needs_parens_as_product(t.numerator()) ;
-    }
-};
-
-template <>
-class Output_rep< leda_rational, Parens_as_product_tag > {
-    const leda_rational& t;
-public:
-    // Constructor
-    Output_rep( const leda_rational& tt) : t(tt) {}
-    // operator
-    std::ostream& operator()( std::ostream& out) const {
-        Needs_parens_as_product< leda_rational > needs_parens_as_product;
-        if (needs_parens_as_product(t))
-            return out <<"("<< oformat(t) <<")";
-        else
-            return out << oformat(t);
-    }
-};
-
-template < >
-class Benchmark_rep< leda_rational > {
-    const leda_rational& t;
-public:
-    //! initialize with a const reference to \a t.
-    Benchmark_rep( const leda_rational& tt) : t(tt) {}
-    //! perform the output, calls \c operator\<\< by default.
-    std::ostream& operator()( std::ostream& out) const { 
-            return 
-                out << "Rational(" << t.numerator() << "," 
-                    << t.denominator() << ")";
-    }
-
-    static std::string get_benchmark_name() {
-        return "Rational";
-    }
-
-};
-
-
-} //namespace CGAL
-
-// Unary + is missing for leda::rational
-namespace leda{
-inline rational operator+( const rational& i) { return i; }
-}
-
-//since types are included by LEDA_coercion_traits.h:
-#include <CGAL/leda_integer.h>
-#include <CGAL/leda_bigfloat.h>
-#include <CGAL/leda_real.h>
-#include <CGAL/LEDA_arithmetic_kernel.h>
-
-#endif  // CGAL_LEDA_RATIONAL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_2.h
deleted file mode 100644
index 3ef8b8c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_2.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
-
-#include <CGAL/basic.h>
-//#include <CGAL/Algebraic_structure_traits.h>
-//#include <CGAL/IO/io.h>
-#include <CGAL/linear_least_squares_fitting_points_2.h>
-#include <CGAL/linear_least_squares_fitting_segments_2.h>
-#include <CGAL/linear_least_squares_fitting_triangles_2.h>
-#include <CGAL/linear_least_squares_fitting_circles_2.h>
-#include <CGAL/linear_least_squares_fitting_rectangles_2.h>
-#include <CGAL/Dimension.h>
-
-#include <iterator>
-
-namespace CGAL {
-
-template < typename InputIterator, 
-           typename Kernel,
-					 typename Tag>
-inline
-typename Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename Kernel::Line_2& line,
-                               typename Kernel::Point_2& centroid,
-                               const Tag& tag,
-															 const Kernel& kernel)
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  return internal::linear_least_squares_fitting_2(first, beyond, line,
-                                               centroid,(Value_type*)NULL,kernel,tag);
-}
-
-// deduces the kernel from the points in container.
-template < typename InputIterator, 
-           typename Line,
-           typename Point,
-	         typename Tag>
-inline
-typename Kernel_traits<Line>::Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               Line& line,
-                               Point& centroid,
-			                         const Tag& tag)
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
-	return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel());
-}
-
-
-template < typename InputIterator, 
-           typename Line,
-					 typename Tag >
-inline
-typename Kernel_traits<Line>::Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               Line& line,
-                               const Tag& tag)
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
-  typename Kernel::Point_2 centroid; // unused
-  return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel());
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_3.h
deleted file mode 100644
index 553fb28..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_3.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
-
-#include <CGAL/basic.h>
-//#include <CGAL/Algebraic_structure_traits.h>
-//#include <CGAL/IO/io.h>
-
-#include <CGAL/linear_least_squares_fitting_points_3.h>
-#include <CGAL/linear_least_squares_fitting_segments_3.h>
-#include <CGAL/linear_least_squares_fitting_triangles_3.h>
-#include <CGAL/linear_least_squares_fitting_cuboids_3.h>
-#include <CGAL/linear_least_squares_fitting_tetrahedra_3.h>
-#include <CGAL/linear_least_squares_fitting_spheres_3.h>
-
-#include <CGAL/Dimension.h>
-
-#include <iterator>
-#include <string>
-
-namespace CGAL {
-
-// complete set of parameters
-template < typename InputIterator, 
-           typename Object,
-           typename Kernel,
-           typename Tag >
-inline
-typename Kernel::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               Object& object, // plane or line
-                               typename Kernel::Point_3& centroid, 
-                               const Tag& tag, // dimension tag, ranges from 0 to 3
-			                         const Kernel& kernel)
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  return internal::linear_least_squares_fitting_3(first, beyond, object,
-                                               centroid, (Value_type*) NULL, kernel, tag);
-}
-
-// deduces kernel from value type of input iterator
-template < typename InputIterator, 
-           typename Object,
-					 typename Point,
-           typename Tag>
-inline
-typename Kernel_traits<Object>::Kernel::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               Object& object,  // plane or line
-                               Point& centroid,
-			                         const Tag& tag) // dimension tag, ranges from 0 to 3
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
-  return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel());
-}
-
-// deduces kernel and does not write centroid
-template < typename InputIterator, 
-           typename Object,
-           typename Tag>
-inline
-typename Kernel_traits<Object>::Kernel::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               Object& object, // plane or line
-			                         const Tag& tag) // dimension tag, ranges from 0 to 3
-{
-  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
-  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
-  typename Kernel::Point_3 centroid; // not used by caller
-  return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_circles_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_circles_2.h
deleted file mode 100644
index dd9bc67..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_circles_2.h
+++ /dev/null
@@ -1,260 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen_2.h>
-#include <CGAL/eigen.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-#include <vector>
-#include <cmath>
-
-namespace CGAL {
-
-namespace internal {
-// Fits a line to a 2D circle set.
-// Returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best  (zero variance orthogonally to the fitting line);
-//  0 is worst (isotropic case, returns a line with horizontal
-//              direction by default)
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Circle_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  // types
-  typedef typename K::FT       FT;
-  typedef typename K::Line_2   Line;
-  typedef typename K::Vector_2 Vector;
-  typedef typename K::Circle_2 Circle;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // ::::::::::DISK:::::::::::::::
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  //Final combined covariance matrix for all circles and their combined mass
-  FT mass = 0.0;
-  FT covariance[3] = {0.0,0.0,0.0};
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[4] = {0.25, 0.0,
-		0.0, 0.25};
-  Matrix moment = init_matrix<K>(2,temp);
-  //  Matrix moment = Matrix(2,true,PI);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each circle, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Circle& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT radius = std::sqrt(t.squared_radius());
-    FT delta[4] = {radius, 0.0, 
-		   0.0, radius};
-    Matrix transformation = init_matrix<K>(2,delta);
-    FT area = t.squared_radius();
-    CGAL_assertion(area != 0.0);
-
-    // Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = area * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the circle.
-    FT x0 = t.center().x();
-    FT y0 = t.center().y();
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + area * x0*x0;
-    covariance[1] += transformation[0][1] + area * x0*y0;
-    covariance[2] += transformation[1][1] + area * y0*y0;
-
-    mass += area;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  //  internal::eigen_symmetric_2<K>(final_cov, eigen_vectors, eigen_values);
-  FT eigen_vectors1[4];
-  FT eigen_values1[2];
-  eigen_symmetric<FT>(covariance,2, eigen_vectors1, eigen_values1);
-  eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]);
-  eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3]));
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(1.0, 0.0));
-    return (FT)0.0;
-  } 
-  
-} // end linear_least_squares_fitting_2 for circle set with 2D tag
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Circle_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  // types
-  typedef typename K::FT       FT;
-  typedef typename K::Line_2   Line;
-  typedef typename K::Vector_2 Vector;
-  typedef typename K::Circle_2 Circle;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  //Final combined covariance matrix for all circles and their combined mass
-  FT mass = 0.0;
-  FT covariance[3] = {0.0,0.0,0.0};
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[4] = {1.0, 0.0,
-		0.0, 1.0};
-  Matrix moment = init_matrix<K>(2,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each circle, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Circle& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT radius = std::sqrt(t.squared_radius());
-    FT delta[4] = {radius, 0.0, 
-		   0.0, radius};
-    Matrix transformation = init_matrix<K>(2,delta);
-    FT length = 2 * radius;
-    CGAL_assertion(length != 0.0);
-
-    // Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = 0.5 * length * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the circle.
-    FT x0 = t.center().x();
-    FT y0 = t.center().y();
-
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + length * x0*x0;
-    covariance[1] += transformation[0][1] + length * x0*y0;
-    covariance[2] += transformation[1][1] + length * y0*y0;
-
-    mass += length;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  //  internal::eigen_symmetric_2<K>(final_cov, eigen_vectors, eigen_values);
-  FT eigen_vectors1[4];
-  FT eigen_values1[2];
-  eigen_symmetric<FT>(covariance,2, eigen_vectors1, eigen_values1);
-  eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]);
-  eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3]));
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(1.0, 0.0));
-    return (FT)0.0;
-  } 
-} // end linear_least_squares_fitting_2 for circle set with 1D tag
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_cuboids_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_cuboids_3.h
deleted file mode 100644
index 4bfcbdf..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_cuboids_3.h
+++ /dev/null
@@ -1,328 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-#include <CGAL/PCA_util.h>
-#include <CGAL/linear_least_squares_fitting_points_3.h>
-#include <CGAL/linear_least_squares_fitting_segments_3.h>
-
-#include <list>
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-
-// fits a plane to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT FT;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag);
-
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a plane to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT FT;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag);
-
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a plane to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Segment_3 Segment;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Segment> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_cuboid& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[2],t[3]));    
-    segments.push_back(Segment(t[3],t[0]));
-    segments.push_back(Segment(t[4],t[5]));
-    segments.push_back(Segment(t[5],t[6]));
-    segments.push_back(Segment(t[6],t[7]));
-    segments.push_back(Segment(t[7],t[4]));
-    segments.push_back(Segment(t[5],t[0]));
-    segments.push_back(Segment(t[1],t[6]));
-    segments.push_back(Segment(t[2],t[7]));
-    segments.push_back(Segment(t[3],t[4]));
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a plane to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Point_3 Point;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_cuboid& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]);    
-    points.push_back(t[3]);
-    points.push_back(t[4]);
-    points.push_back(t[5]);
-    points.push_back(t[6]);    
-    points.push_back(t[7]);
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a line to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,     // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT FT;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag);
-  
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-  
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a line to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT FT;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag);
-  
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a line to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Segment_3 Segment;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Segment> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_cuboid& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[2],t[3]));    
-    segments.push_back(Segment(t[3],t[0]));
-    segments.push_back(Segment(t[4],t[5]));
-    segments.push_back(Segment(t[5],t[6]));
-    segments.push_back(Segment(t[6],t[7]));
-    segments.push_back(Segment(t[7],t[4]));
-    segments.push_back(Segment(t[5],t[0]));
-    segments.push_back(Segment(t[1],t[6]));
-    segments.push_back(Segment(t[2],t[7]));
-    segments.push_back(Segment(t[3],t[4]));
-  }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_cuboids_3
-
-// fits a line to a 3D cuboid set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Iso_cuboid_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Point_3 Point;
-  typedef typename K::Iso_cuboid_3 Iso_cuboid;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_cuboid& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]);    
-    points.push_back(t[3]);
-    points.push_back(t[4]);
-    points.push_back(t[5]);
-    points.push_back(t[6]);    
-    points.push_back(t[7]);
-  }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_cuboids_3
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_2.h
deleted file mode 100644
index 7d1d6a9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_2.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen_2.h>
-
-#include <iterator>
-#include <cmath>
-
-namespace CGAL {
-
-namespace internal {
-
-// Fits a line to a 2D point set.
-// Returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best  (zero variance orthogonally to the fitting line);
-//  0 is worst (isotropic case, returns a line with horizontal
-//              direction by default).
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Point_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  // types
-  typedef typename K::FT       FT;
-  typedef typename K::Line_2   Line;
-  typedef typename K::Point_2  Point;
-  typedef typename K::Vector_2 Vector;
-
-	// if internally double, declare a kernel
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  FT covariance[3] = {0,0,0};
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Point& p = *it;
-    Vector d = p - c; // centered data point
-    covariance[0] += d.x() * d.x();
-    covariance[1] += d.x() * d.y();
-    covariance[2] += d.y() * d.y();
-  }
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  internal::eigen_symmetric_2<K>(covariance, eigen_vectors, eigen_values);
-
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(FT(1), FT(0)));
-    return (FT)0.0;
-  } 
-} // end linear_least_squares_fitting_2 for point set
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_3.h
deleted file mode 100644
index 1535592..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_points_3.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-// fits a plane to a 3D point set
-// returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best (zero variance orthogonally to the fitting line)
-//  0 is worst (isotropic case, returns a plane with default direction)
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane, // best fit plane
-                               typename K::Point_3& c,     // centroid
-                               const typename K::Point_3*, // used for indirection
-                               const K& k,                 // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::FT       FT;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6];
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag);
-
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-} // end fit plane to point set
-
-// fits a line to a 3D point set
-// returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best (zero variance orthogonally to the fitting line)
-//  0 is worst (isotropic case, returns a line along x axis)
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,  // best fit line
-                               typename K::Point_3& c,    // centroid
-                               const typename K::Point_3*, // used for indirection
-                               const K& k,                // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::FT       FT;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6];
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag);
-
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-} // end fit line to point set
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_rectangles_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_rectangles_2.h
deleted file mode 100644
index a187915..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_rectangles_2.h
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen_2.h>
-#include <CGAL/eigen.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-#include <list>
-#include <cmath>
-
-namespace CGAL {
-
-namespace internal {
-// Fits a line to a 2D rectangle set.
-// Returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best  (zero variance orthogonally to the fitting line);
-//  0 is worst (isotropic case, returns a line with horizontal
-//              direction by default)
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Iso_rectangle_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  // types
-  typedef typename K::FT       FT;
-  typedef typename K::Line_2   Line;
-  typedef typename K::Vector_2 Vector;
-  typedef typename K::Iso_rectangle_2 Iso_rectangle;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  //Final combined covariance matrix for all rectangles and their combined mass
-  FT mass = 0.0;
-  FT covariance[3] = {0.0,0.0,0.0};
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[4] = {1/3.0, 0.25,
-		0.25,  1/3.0};
-  Matrix moment = init_matrix<K>(2,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each rectangle, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Iso_rectangle& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT x0 = t.xmin();
-    FT y0 = t.ymin();
-    FT x1 = t.xmax();
-    FT y2 = t.ymax();
-
-    FT delta[4] = {x1-x0, 0.0, 
-		   0.0, y2-y0};
-
-    Matrix transformation = init_matrix<K>(2,delta);
-    FT area = (x1-x0)*(y2-y0);
-
-    CGAL_assertion(area != 0.0);
-
-    // Find the 2nd order moment for the rectangle wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = area * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to the center of the rectangle.
-    FT xav0 = (x1-x0)/2.0;
-    FT yav0 = (y2-y0)/2.0;
-    // and add to covariance matrix
-    covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
-    covariance[1] += transformation[0][1] + area * (x0*yav0 + xav0*y0 + x0*y0);
-    covariance[2] += transformation[1][1] + area * (y0*yav0*2 + y0*y0);
-
-    mass += area;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  FT eigen_vectors1[4];
-  FT eigen_values1[2];
-  eigen_symmetric<FT>(covariance,2, eigen_vectors1, eigen_values1);
-  eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]);
-  eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3]));
-
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(1.0, 0.0));
-    return (FT)0.0;
-  } 
-} // end linear_least_squares_fitting_2 for rectangle set with 2D tag
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Iso_rectangle_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  // types
-  typedef typename K::Iso_rectangle_2 Iso_rectangle;
-  typedef typename K::Segment_2         Segment_2;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Segment_2> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_rectangle& t = *it;
-    segments.push_back(Segment_2(t[0],t[1]));
-    segments.push_back(Segment_2(t[1],t[2]));
-    segments.push_back(Segment_2(t[2],t[3]));      
-    segments.push_back(Segment_2(t[3],t[0]));      
-  }    
-
-  return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,K(),tag);
-
-} // end linear_least_squares_fitting_2 for rectangle set with 1D tag
-
-
-template < typename InputIterator,
-           typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Iso_rectangle_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  // types
-  typedef typename K::Iso_rectangle_2 Iso_rectangle;
-  typedef typename K::Point_2         Point_2;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Point_2> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Iso_rectangle& t = *it;
-    points.push_back(Point_2(t[0]));
-    points.push_back(Point_2(t[1]));
-    points.push_back(Point_2(t[2]));      
-    points.push_back(Point_2(t[3]));      
-  }    
-
-  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,K(),tag);
-
-} // end linear_least_squares_fitting_2 for rectangle set with 0D tag
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_2.h
deleted file mode 100644
index e2c3029..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_2.h
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen_2.h>
-#include <CGAL/eigen.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-#include <list>
-#include <cmath>
-
-namespace CGAL {
-
-namespace internal {
-// Fits a line to a 2D segment set.
-// Returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best  (zero variance orthogonally to the fitting line);
-//  0 is worst (isotropic case, returns a line with horizontal
-//              direction by default)
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Segment_2*,// used for indirection
-                               const K&,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag = CGAL::Dimension_tag<1>())   
-{
-  // types
-  typedef typename K::FT       FT;
-  typedef typename K::Line_2   Line;
-  typedef typename K::Vector_2 Vector;
-  typedef typename K::Segment_2 Segment;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  //Final combined covariance matrix for all segments and their combined mass
-  FT mass = 0.0;
-  FT covariance[3] = {0.0,0.0,0.0};
-
-  // assemble 2nd order moment about the origin.  
-  FT temp[4] = {1.0, 0.5, 0.5, 1.0};
-  Matrix moment = (1.0/3.0) * init_matrix<K>(2,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each segment, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Segment& t = *it;
-
-    // defined for convenience.
-    // FT example = CGAL::to_double(t[0].x());
-    FT delta[4] = {t[0].x(), t[1].x(), 
-		   t[0].y(), t[1].y()};
-    Matrix transformation = init_matrix<K>(2,delta);
-    FT length = std::sqrt(t.squared_length());
-    CGAL_assertion(length != 0.0);
-
-    // Find the 2nd order moment for the segment wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = length * transformation * moment * LA::transpose(transformation);
-    
-    // add to covariance matrix
-    covariance[0] += transformation[0][0];
-    covariance[1] += transformation[0][1];
-    covariance[2] += transformation[1][1];
-
-    mass += length;
-  }
-
-  // Translate the 2nd order moment calculated about the origin to
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  //  internal::eigen_symmetric_2<K>(covariance, eigen_vectors, eigen_values);
-    FT eigen_vectors1[4];
-    FT eigen_values1[2];
-    eigen_symmetric<FT>(covariance,2, eigen_vectors1, eigen_values1);
-    eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]);
-    eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3]));
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(1.0, 0.0));
-    return (FT)0.0;
-  } 
-} // end linear_least_squares_fitting_2 for segment set with 1D tag
-
-template < typename InputIterator, typename K >
-typename K::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_2& line,   // best fit line
-                               typename K::Point_2& c,     // centroid
-                               const typename K::Segment_2*,// used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)   
-{
-  // types
-  typedef typename K::Point_2  Point;
-  typedef typename K::Segment_2 Segment;
- 
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Point> points;  
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Segment& s = *it;
-    points.push_back(s[0]);
-    points.push_back(s[1]);
-  } 
-  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,k,(Point*)NULL,tag);
-
-} // end linear_least_squares_fitting_2 for segment set with 1D tag
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_3.h
deleted file mode 100644
index 1be447a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_segments_3.h
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-#include <CGAL/PCA_util.h>
-#include <CGAL/linear_least_squares_fitting_points_3.h>
-
-#include <list>
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-
-// fits a plane to a 3D segment set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Segment_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Segment_3  Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag);
-
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-} // end linear_least_squares_fitting_segments_3
-
-// fits a plane to a 3D segment set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Segment_3*, // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Segment_3  Segment;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Segment& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_segments_3
-
-// fits a line to a 3D segment set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,      // best fit line
-                               typename K::Point_3& c,        // centroid
-                               const typename K::Segment_3*,  // used for indirection
-                               const K& k,                    // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Segment_3  Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,k,tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag);
-
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-  
-} // end linear_least_squares_fitting_segments_3
-
-// fits a plane to a 3D segment set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,      // best fit line
-                               typename K::Point_3& c,        // centroid
-                               const typename K::Segment_3*,  // used for indirection
-                               const K& k,                    // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Segment_3  Segment;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Segment& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_segments_3
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_spheres_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_spheres_3.h
deleted file mode 100644
index 1ae42e2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_spheres_3.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-
-// fits a plane to a set of 3D balls (3D)
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Sphere_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3    Sphere;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag);
-  
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-} // end linear_least_squares_fitting_spheres_3
-
-// fits a plane to a 3D sphere set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Sphere_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3    Sphere;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag);
-  
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-} // end linear_least_squares_fitting_spheres_3
-
-
-// fits a line to a 3D ball set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,     // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Sphere_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3  Sphere;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-  
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag);
-
-
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-  
-} // end linear_least_squares_fitting_spheres_3
-
-// fits a line to a 3D sphere set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,     // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Sphere_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Sphere_3  Sphere;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-  
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag);
-
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-
-} // end linear_least_squares_fitting_spheres_3
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h
deleted file mode 100644
index c87fcd3..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h
+++ /dev/null
@@ -1,316 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-
-#include <CGAL/PCA_util.h>
-#include <CGAL/linear_least_squares_fitting_points_3.h>
-#include <CGAL/linear_least_squares_fitting_segments_3.h>
-#include <CGAL/linear_least_squares_fitting_triangles_3.h>
-
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-
-// fits a plane to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag);
-  
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a plane to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Triangle_3 Triangle;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Triangle> triangles;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    triangles.push_back(Triangle(t[0],t[1],t[2]));
-    triangles.push_back(Triangle(t[0],t[2],t[3]));
-    triangles.push_back(Triangle(t[0],t[3],t[1])); 
-    triangles.push_back(Triangle(t[3],t[1],t[2]));
- }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,c,(Triangle*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a plane to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Segment_3 Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Segment> segments;
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[1],t[3]));
-    segments.push_back(Segment(t[2],t[3])); 
-    segments.push_back(Segment(t[0],t[2]));
-    segments.push_back(Segment(t[0],t[3]));
- }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a plane to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Point_3 Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]); 
-    points.push_back(t[3]);
- }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a line to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,     // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<3>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag);
-    
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-  
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a line to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Triangle_3 Triangle;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Triangle> triangles;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    triangles.push_back(Triangle(t[0],t[1],t[2]));
-    triangles.push_back(Triangle(t[0],t[2],t[3]));
-    triangles.push_back(Triangle(t[0],t[3],t[1])); 
-    triangles.push_back(Triangle(t[3],t[1],t[2]));
- }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,c,(Triangle*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a line to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Segment_3 Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Segment> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[1],t[3]));
-    segments.push_back(Segment(t[2],t[3])); 
-    segments.push_back(Segment(t[0],t[2]));
-    segments.push_back(Segment(t[0],t[3]));
- }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedrons_3
-
-// fits a line to a 3D tetrahedron set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Tetrahedron_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Tetrahedron_3    Tetrahedron;
-  typedef typename K::Point_3 Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Tetrahedron& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]); 
-    points.push_back(t[3]);
- }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_tetrahedra_3
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_2.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_2.h
deleted file mode 100644
index 7bd3d77..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_2.h
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen_2.h>
-#include <CGAL/eigen.h>
-#include <CGAL/Linear_algebraCd.h>
-#include <CGAL/PCA_util.h>
-
-#include <iterator>
-#include <vector>
-#include <cmath>
-
-namespace CGAL {
-
-namespace internal {
-// Fits a line to a 2D triangle set.
-// Returns a fitting quality (1 - lambda_min/lambda_max):
-//  1 is best  (zero variance orthogonally to the fitting line);
-//  0 is worst (isotropic case, returns a line with horizontal
-//              direction by default)
-
-template < typename InputIterator,
-           typename Kernel >
-typename Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename Kernel::Line_2& line,   // best fit line
-                               typename Kernel::Point_2& c,     // centroid
-                               const typename Kernel::Triangle_2*,// used for indirection
-                               const Kernel&,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  // types
-  typedef typename Kernel::FT       FT;
-  typedef typename Kernel::Line_2   Line;
-  typedef typename Kernel::Vector_2 Vector;
-  typedef typename Kernel::Triangle_2 Triangle;
-  typedef typename CGAL::Linear_algebraCd<FT> LA;
-  typedef typename LA::Matrix Matrix;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-
-  // compute centroid
-  c = centroid(first,beyond,Kernel(),tag);
-
-  // assemble covariance matrix as a semi-definite matrix. 
-  // Matrix numbering:
-  // 0
-  // 1 2
-  //Final combined covariance matrix for all triangles and their combined mass
-  FT mass = 0.0;
-  FT covariance[3] = {0.0, 0.0, 0.0};
-
-  // assemble the 2nd order moment about the origin.  
-  FT temp[4] = {1/12.0, 1/24.0,
-		1/24.0, 1/12.0};
-
-  Matrix moment = init_matrix<Kernel>(2,temp);
-
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    // Now for each triangle, construct the 2nd order moment about the origin.
-    // assemble the transformation matrix.
-    const Triangle& t = *it;
-
-    // defined for convenience.
-    FT x0 = t[0].x();
-    FT y0 = t[0].y();
-    FT delta[4] = {t[1].x() - x0, t[2].x() - x0,
-		   t[1].y() - y0, t[2].y() - y0};
-
-    Matrix transformation = init_matrix<Kernel>(2,delta);
-    FT area = 0.5 * std::abs(LA::determinant(transformation));
-    CGAL_assertion(area!=0);
-
-    // Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
-    
-    // Transform the standard 2nd order moment using the transformation matrix
-    transformation = 2 * area * transformation * moment * LA::transpose(transformation);
-    
-    // Translate the 2nd order moment to (x0,y0).
-    FT xav0 = (delta[0]+delta[1])/3.0;
-    FT yav0 = (delta[2]+delta[3])/3.0;
-    
-    // and add to the covariance matrix
-    covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
-    covariance[1] += transformation[0][1] + area * (x0*yav0 + xav0*y0 + x0*y0);
-    covariance[2] += transformation[1][1] + area * (y0*yav0*2 + y0*y0);
-
-    mass += area;
-  }
-  
-  // Translate the 2nd order moment calculated about the origin to 
-  // the center of mass to get the covariance.
-  covariance[0] += mass * (-1.0 * c.x() * c.x());
-  covariance[1] += mass * (-1.0 * c.x() * c.y());
-  covariance[2] += mass * (-1.0 * c.y() * c.y());
-
-  //  std::cout<<"cov: "<<covariance[0]*covariance[2]<<" =? "<<covariance[1]*covariance[1]<<std::endl;
-
-  // solve for eigenvalues and eigenvectors.
-  // eigen values are sorted in descending order, 
-  // eigen vectors are sorted in accordance.
-  std::pair<FT,FT> eigen_values;
-  std::pair<Vector,Vector> eigen_vectors;
-  FT eigen_vectors1[4];
-  FT eigen_values1[2];
-  eigen_symmetric<FT>(covariance,2, eigen_vectors1, eigen_values1);
-  eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]);
-  eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3]));
-  // check unicity and build fitting line accordingly
-  if(eigen_values.first != eigen_values.second)
-  {
-    // regular case
-    line = Line(c, eigen_vectors.first);
-    return (FT)1.0 - eigen_values.second / eigen_values.first;
-  } 
-  else
-  {
-    // isotropic case (infinite number of directions)
-    // by default: assemble a line that goes through 
-    // the centroid and with a default horizontal vector.
-    line = Line(c, Vector(1.0, 0.0));
-    return (FT)0.0;
-  } 
-} // end linear_least_squares_fitting_2 for triangle set with 2D tag
-
-template < typename InputIterator,
-           typename Kernel >
-typename Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename Kernel::Line_2& line,   // best fit line
-                               typename Kernel::Point_2& c,     // centroid
-                               const typename Kernel::Triangle_2*,// used for indirection
-                               const Kernel&,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  // types
-  typedef typename Kernel::Triangle_2 Triangle;
-  typedef typename Kernel::Segment_2  Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Segment> segments;  
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[2],t[0]));      
-  }    
-  
-  return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,tag,Kernel());
-  
-} // end linear_least_squares_fitting_2 for triangle set with 1D tag
-
-template < typename InputIterator,
-           typename Kernel >
-typename Kernel::FT
-linear_least_squares_fitting_2(InputIterator first,
-                               InputIterator beyond, 
-                               typename Kernel::Line_2& line,   // best fit line
-                               typename Kernel::Point_2& c,     // centroid
-                               const typename Kernel::Triangle_2*,// used for indirection
-                               const Kernel&,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  // types
-
-  typedef typename Kernel::Triangle_2 Triangle;
-  typedef typename Kernel::Point_2 Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Point> points;  
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    points.push_back(Point(t[0]));
-    points.push_back(Point(t[1]));
-    points.push_back(Point(t[2]));      
-  }    
-  
-  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,tag,Kernel());
-  
-} // end linear_least_squares_fitting_2 for triangle set with 0D tag
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_3.h b/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_3.h
deleted file mode 100644
index aca731b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/linear_least_squares_fitting_triangles_3.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
-
-#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
-#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
-
-#include <CGAL/basic.h>
-#include <CGAL/centroid.h>
-#include <CGAL/eigen.h>
-#include <CGAL/PCA_util.h>
-
-#include <list>
-#include <iterator>
-
-namespace CGAL {
-
-namespace internal {
-
-// fits a plane to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Triangle_3  Triangle;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag);
-  
-  // compute fitting plane
-  return fitting_plane_3(covariance,c,plane,k);
-
-} // end linear_least_squares_fitting_triangles_3
-
-// fits a plane to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Triangle_3  Triangle;
-  typedef typename K::Segment_3  Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Segment> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[2],t[0]));    
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_triangles_3
-
-// fits a plane to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Plane_3& plane,   // best fit plane
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Triangle_3  Triangle;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]);    
-  }
-
-  // compute fitting plane
-  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_triangles_3
-
-// fits a line to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,     // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<2>& tag)
-{
-  typedef typename K::FT          FT;
-  typedef typename K::Triangle_3  Triangle;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  // compute centroid
-  c = centroid(first,beyond,K(),tag);
-
-  // assemble covariance matrix
-  FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
-  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag);
-
-  // compute fitting line
-  return fitting_line_3(covariance,c,line,k);
-  
-} // end linear_least_squares_fitting_triangles_3
-
-// fits a line to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-			                         const CGAL::Dimension_tag<1>& tag)
-{
-  typedef typename K::Triangle_3  Triangle;
-  typedef typename K::Segment_3  Segment;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  
-  std::list<Segment> segments;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    segments.push_back(Segment(t[0],t[1]));
-    segments.push_back(Segment(t[1],t[2]));
-    segments.push_back(Segment(t[2],t[0]));    
-  }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_triangles_3
-
-// fits a line to a 3D triangle set
-template < typename InputIterator, 
-           typename K >
-typename K::FT
-linear_least_squares_fitting_3(InputIterator first,
-                               InputIterator beyond, 
-                               typename K::Line_3& line,   // best fit line
-                               typename K::Point_3& c,       // centroid
-                               const typename K::Triangle_3*,  // used for indirection
-                               const K& k,                   // kernel
-                               const CGAL::Dimension_tag<0>& tag)
-{
-  typedef typename K::Triangle_3  Triangle;
-  typedef typename K::Point_3  Point;
-
-  // precondition: at least one element in the container.
-  CGAL_precondition(first != beyond);
-  std::list<Point> points;
-  for(InputIterator it = first;
-      it != beyond;
-      it++)
-  {
-    const Triangle& t = *it;
-    points.push_back(t[0]);
-    points.push_back(t[1]);
-    points.push_back(t[2]);    
-  }
-
-  // compute fitting line
-  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag);
-
-} // end linear_least_squares_fitting_triangles_3
-
-} // end namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/lloyd_optimize_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/lloyd_optimize_mesh_3.h
deleted file mode 100644
index 8fda47e..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/lloyd_optimize_mesh_3.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : lloyd_optimize_mesh_3 function definition.
-//******************************************************************************
-
-#ifndef CGAL_LLOYD_OPTIMIZE_MESH_3_H
-#define CGAL_LLOYD_OPTIMIZE_MESH_3_H
-
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <CGAL/Mesh_3/Mesh_global_optimizer.h>
-#include <CGAL/Mesh_3/Lloyd_move.h>
-#include <CGAL/Mesh_3/Mesh_sizing_field.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/parameters_defaults.h>
-
-namespace CGAL {
-  
-BOOST_PARAMETER_FUNCTION(
-  (Mesh_optimization_return_code),
-  lloyd_optimize_mesh_3,
-  parameters::tag,
-  (required (in_out(c3t3),*) (domain,*) )
-  (optional
-    (time_limit_, *, 0 )
-    (max_iteration_number_, *, 0 )
-    (convergence_, *, parameters::default_values::lloyd_convergence_ratio )
-    (freeze_bound_, *, parameters::default_values::lloyd_freeze_ratio )
-    (do_freeze_, *, parameters::default_values::do_freeze ))
-)
-{
-  return lloyd_optimize_mesh_3_impl(c3t3, domain,
-                                    time_limit_, max_iteration_number_,
-                                    convergence_, freeze_bound_
-                                    , do_freeze_);
-} 
-
-  
-  
-template <typename C3T3, typename MeshDomain> 
-Mesh_optimization_return_code
-lloyd_optimize_mesh_3_impl(C3T3& c3t3,
-                           const MeshDomain& domain,
-                           const double time_limit,
-                           std::size_t max_iteration_number,
-                           const double convergence,
-                           const double freeze_bound
-                           , const bool do_freeze)
-{
-  typedef typename C3T3::Triangulation  Tr;
-  
-  typedef Mesh_3::Mesh_sizing_field<Tr>               Sizing;
-  typedef typename Mesh_3::Lloyd_move<C3T3,Sizing>    Move;
-  
-  typedef typename
-    Mesh_3::Mesh_global_optimizer<C3T3,MeshDomain,Move> Lloyd_optimizer;
-  
-  // Create optimizer
-  Lloyd_optimizer opt (c3t3,
-                       domain,
-                       freeze_bound,
-                       do_freeze,
-                       convergence);
-  
-  // Set max time
-  opt.set_time_limit(time_limit);
-  
-  // 1000 iteration max to avoid infinite loops
-  if ( 0 == max_iteration_number )
-    max_iteration_number = 1000;
-  
-  // Launch optimization
-  return opt(static_cast<int>(max_iteration_number));
-}
-  
-  
-}  // end namespace CGAL
-
-
-#endif // CGAL_LLOYD_OPTIMIZE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/make_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/make_mesh_3.h
deleted file mode 100644
index de9d649..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/make_mesh_3.h
+++ /dev/null
@@ -1,437 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stéphane Tayeb
-//
-//******************************************************************************
-// File Description : make_mesh_3 function definition.
-//******************************************************************************
-
-#ifndef CGAL_MAKE_MESH_3_H
-#define CGAL_MAKE_MESH_3_H
-
-#include <CGAL/Mesh_3/config.h>
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <CGAL/refine_mesh_3.h>
-#include <CGAL/tags.h>
-#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
-#include <CGAL/Mesh_3/Has_features.h>
-
-#include <boost/mpl/has_xxx.hpp>
-
-namespace CGAL {
-  
-namespace parameters {
-  namespace internal {
-    // Features
-    struct Features_options
-    {
-      Features_options(bool b) : b_(b) {}
-      bool features() const { return b_; }
-    private:
-      bool b_;
-    };
-    
-    // -----------------------------------
-    // Features generator
-    // -----------------------------------
-    // struct Features_option_generator
-    template <typename HasFeatures>
-    struct Features_options_generator {};
-    
-    template<>
-    struct Features_options_generator<CGAL::Tag_true>
-    {
-      Features_options operator()() { return Features_options(true); }
-    };
-    
-    template<>
-    struct Features_options_generator<CGAL::Tag_false>
-    {
-      Features_options operator()() { return Features_options(false); }
-    };
-    
-    // struct Domain_features_generator is designed to handle cases where
-    // MeshDomain::Has_features is not a valid type
-    template< typename MeshDomain, bool MeshDomainHasHasFeatures >
-    struct Domain_features_generator {};
-    
-    template< typename MeshDomain >
-    struct Domain_features_generator< MeshDomain, false >
-    {
-      Features_options operator()()
-      { 
-        return Features_options_generator<CGAL::Tag_false>()();
-      }
-    };
-    
-    template< typename MeshDomain >
-    struct Domain_features_generator< MeshDomain, true >
-    {
-      Features_options operator()()
-      { 
-        return Features_options_generator<typename MeshDomain::Has_features>()();
-      }
-    };
-
-  } // end namespace internal
-
-  // -----------------------------------
-  // Features_options
-  // -----------------------------------
-  inline internal::Features_options
-  features() { return internal::Features_options(true); }
-
-  inline internal::Features_options
-  no_features() { return internal::Features_options(false); }
-  
-  template < typename MeshDomain >
-  inline internal::Features_options
-  features(const MeshDomain& /*domain*/)
-  {
-    typedef typename internal::Domain_features_generator<
-      MeshDomain,
-      CGAL::internal::Mesh_3::has_Has_features<MeshDomain>::value > Generator;
-    
-    return Generator()();
-  }
-  
-  // -----------------------------------
-  // Parameters
-  // -----------------------------------
-
-// see <CGAL/config.h>
-CGAL_PRAGMA_DIAG_PUSH
-// see <CGAL/Mesh_3/config.h>
-CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
-
-  BOOST_PARAMETER_NAME( features_param )
-
-CGAL_PRAGMA_DIAG_POP
-  
-} // end namespace parameters::internal
-
-
-// -----------------------------------
-// Initialize c3t3 stuff
-// -----------------------------------
-namespace internal {
-namespace Mesh_3 {
-
-template < typename C3T3, typename MeshDomain, typename MeshCriteria >
-void
-init_c3t3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria&)
-{
-  typedef typename MeshDomain::Point_3 Point_3;
-  typedef typename MeshDomain::Index Index;
-  typedef std::vector<std::pair<Point_3, Index> > Initial_points_vector;
-  typedef typename Initial_points_vector::iterator Ipv_iterator;
-  typedef typename C3T3::Vertex_handle Vertex_handle;
-  
-  // Mesh initialization : get some points and add them to the mesh
-  Initial_points_vector initial_points;
-  domain.construct_initial_points_object()(std::back_inserter(initial_points));
-
-  // Insert points and set their index and dimension
-  for ( Ipv_iterator it = initial_points.begin() ;
-       it != initial_points.end() ;
-       ++it )
-  {
-    Vertex_handle v = c3t3.triangulation().insert(it->first);
-    
-    // v could be null if point is hidden
-    if ( v != Vertex_handle() )
-    {
-      c3t3.set_dimension(v,2); // by construction, points are on surface
-      c3t3.set_index(v,it->second);      
-    }
-  }
-}
-
-template < typename EdgeCriteria >
-struct Edge_criteria_sizing_field_wrapper
-{
-  typedef typename EdgeCriteria::Index    Index;
-  typedef typename EdgeCriteria::FT       FT;
-  typedef typename EdgeCriteria::Point_3  Point_3;
-  
-  Edge_criteria_sizing_field_wrapper(const EdgeCriteria& ec) : ec_(ec) {}
-  FT operator()(const Point_3& p, const int dim, const Index& index) const
-  { return ec_.sizing_field(p,dim,index); }
-
-private:
-  // No need to copy EdgeCriteria here
-  const EdgeCriteria& ec_;
-};
-
-template < typename C3T3, typename MeshDomain, typename MeshCriteria >
-void
-init_c3t3_with_features(C3T3& c3t3,
-                        const MeshDomain& domain,
-                        const MeshCriteria& criteria)
-{
-  typedef typename MeshCriteria::Edge_criteria Edge_criteria;
-  typedef Edge_criteria_sizing_field_wrapper<Edge_criteria> Sizing_field;
-
-  CGAL::Mesh_3::Protect_edges_sizing_field<C3T3,MeshDomain,Sizing_field>     
-    protect_edges(c3t3, domain, Sizing_field(criteria.edge_criteria_object()));
-  
-  protect_edges(true);
-}
-  
-
-// C3t3_initializer: initialize c3t3
-template < typename C3T3,
-           typename MeshDomain,
-           typename MeshCriteria,
-           bool MeshDomainHasHasFeatures,
-           typename HasFeatures = int>
-struct C3t3_initializer {};
-  
-// Partial specialization of C3t3_initializer
-// Handle cases where MeshDomain::Has_features is not a valid type
-template < typename C3T3, typename MD, typename MC, typename HasFeatures >
-struct C3t3_initializer < C3T3, MD, MC, false, HasFeatures >
-{
-  void operator()(C3T3& c3t3,
-                  const MD& domain,
-                  const MC& criteria,
-                  bool with_features)
-  {
-    if ( with_features )
-    {
-      std::cerr << "Warning: you requested a mesh with features from a domain"
-                << " without features !" << std::endl;
-    }
-    
-    init_c3t3(c3t3,domain,criteria);
-  }
-};
-
-// Partial specialization of C3t3_initializer
-// Handles cases where MeshDomain::Has_features is a valid type
-template < typename C3T3, typename MD, typename MC, typename HasFeatures >
-struct C3t3_initializer < C3T3, MD, MC, true, HasFeatures >
-{
-  void operator()(C3T3& c3t3,
-                  const MD& domain,
-                  const MC& criteria,
-                  bool with_features)
-  {
-    C3t3_initializer < C3T3, MD, MC, true, typename MD::Has_features >()
-      (c3t3,domain,criteria,with_features);
-  }  
-};
-
-// Partial specialization of C3t3_initializer
-// Handles cases where MeshDomain::Has_features is a valid type and is defined
-// to CGAL::Tag_true
-template < typename C3T3, typename MD, typename MC >
-struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true >
-{
-  void operator()(C3T3& c3t3,
-                  const MD& domain,
-                  const MC& criteria,
-                  bool with_features)
-  {
-    if ( with_features ) { init_c3t3_with_features(c3t3,domain,criteria); }
-    else { init_c3t3(c3t3,domain,criteria); }
-  }
-};
-  
-// Partial specialization of C3t3_initializer
-// Handles cases where MeshDomain::Has_features is a valid type and is defined
-// to CGAL::Tag_false
-template < typename C3T3, typename MD, typename MC >
-struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false >
-{
-  void operator()(C3T3& c3t3,
-                  const MD& domain,
-                  const MC& criteria,
-                  bool with_features)
-  {
-    if ( with_features )
-    {
-      std::cerr << "Warning: you requested a mesh with features from a domain"
-                << " without features !" << std::endl;
-    }
-    
-    init_c3t3(c3t3,domain,criteria);
-  }
-};
-
-}} // end namespace internal::Mesh_3
-  
-
-// -----------------------------------
-// make_mesh_3 stuff
-// -----------------------------------
-
-// Manual redirections
-// boost::parameter can't handle make_mesh_3 return_type alone...
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-template <typename C3T3, typename MD, typename MC, typename ... T>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const T& ...t)
-{
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc,t...);
-  return c3t3;  
-}
-
-#else
-
-template <typename C3T3, typename MD, typename MC>
-C3T3 make_mesh_3(const MD& md, const MC& mc)
-{ 
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc);
-  return c3t3;
-}
-  
-template <typename C3T3, typename MD, typename MC,
-  typename Arg1>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1)
-{ 
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc,a1);
-  return c3t3;
-}
-
-template <typename C3T3, typename MD, typename MC,
-  typename Arg1, typename Arg2>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2)
-{
-  C3T3 c3t3; 
-  make_mesh_3_bp(c3t3,md,mc,a1,a2);
-  return c3t3;
-}
-
-template <typename C3T3, typename MD, typename MC,
-  typename Arg1, typename Arg2, typename Arg3>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
-                 const Arg3& a3)
-{ 
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3);
-  return c3t3;
-}
-
-template <typename C3T3, typename MD, typename MC,
-  typename Arg1, typename Arg2, typename Arg3, typename Arg4>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
-                 const Arg3& a3, const Arg4& a4)
-{ 
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3,a4);
-  return c3t3;
-}
-
-template <typename C3T3, typename MD, typename MC,
-  typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
-C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
-                 const Arg3& a3, const Arg4& a4, const Arg5& a5)
-{ 
-  C3T3 c3t3;
-  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3,a4,a5);
-  return c3t3;
-}
-
-#endif  
-  
-
-BOOST_PARAMETER_FUNCTION(
-  (void),
-  make_mesh_3_bp,
-  parameters::tag,
-  (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced
-  (deduced 
-    (optional
-      (features_param, (parameters::internal::Features_options), parameters::features(domain))
-      (exude_param, (parameters::internal::Exude_options), parameters::exude())
-      (perturb_param, (parameters::internal::Perturb_options), parameters::perturb())
-      (odt_param, (parameters::internal::Odt_options), parameters::no_odt())
-      (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
-      (mesh_options_param, (parameters::internal::Mesh_3_options), 
-                           parameters::internal::Mesh_3_options())
-    )
-  )
-)
-{
-  make_mesh_3_impl(c3t3, domain, criteria,
-                   exude_param, perturb_param, odt_param, lloyd_param,
-                   features_param.features(), mesh_options_param);
-}
-  
-
-/**
- * @brief This function meshes the domain defined by mesh_traits
- * (respecting criteria), and outputs the mesh to c3t3
- *
- * @param domain the domain to be discretized
- * @param criteria the criteria
- * @param exude if it is set to \c true, an exudation step will be done at
- *   the end of the Delaunay refinement process
- *
- * @return The mesh as a C3T3 object
- */
-template<class C3T3, class MeshDomain, class MeshCriteria>
-void make_mesh_3_impl(C3T3& c3t3,
-                      const MeshDomain&   domain,
-                      const MeshCriteria& criteria,
-                      const parameters::internal::Exude_options& exude,
-                      const parameters::internal::Perturb_options& perturb,
-                      const parameters::internal::Odt_options& odt,
-                      const parameters::internal::Lloyd_options& lloyd,
-                      const bool with_features,
-                      const parameters::internal::Mesh_3_options& 
-                        mesh_options = parameters::internal::Mesh_3_options())
-{
-#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
-  CGAL::default_random = CGAL::Random(0);
-#endif
-
-  // Initialize c3t3
-  internal::Mesh_3::C3t3_initializer< 
-    C3T3,
-    MeshDomain,
-    MeshCriteria,
-    internal::Mesh_3::has_Has_features<MeshDomain>::value > () (c3t3,
-                                                                domain,
-                                                                criteria,
-                                                                with_features);
-  
-  // If c3t3 initialization is not sufficient (may happen if there is only
-  // a planar curve as feature for example), add some surface points
-  if ( c3t3.triangulation().dimension() != 3 )
-  {
-    internal::Mesh_3::init_c3t3(c3t3, domain, criteria);
-  }
-  CGAL_assertion( c3t3.triangulation().dimension() == 3 );
-  
-  // Build mesher and launch refinement process
-  // Don't reset c3t3 as we just created it
-  refine_mesh_3(c3t3, domain, criteria,
-                exude, perturb, odt, lloyd, parameters::no_reset_c3t3(), mesh_options);
-}
-
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_MAKE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_2.h b/3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_2.h
deleted file mode 100644
index e781a65..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_2.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_MINKOWSKI_SUM_2_H
-#define CGAL_MINKOWSKI_SUM_2_H
-
-#include <CGAL/basic.h>
-#include <CGAL/Polygon_with_holes_2.h>
-
-#include <CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h>
-#include <CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h>
-#include <list>
-
-namespace CGAL {
-
-/*!
- * Compute the Minkowski sum of two simple polygons using the convolution
- * method.
- * Note that as the input polygons may not be convex, their Minkowski sum may
- * not be a simple polygon. The result is therefore represented as a polygon
- * with holes.
- * \param pgn1 The first polygon.
- * \param pgn2 The second polygon.
- * \return The resulting polygon with holes, representing the sum.
- */
-
-template <class Kernel, class Container>
-Polygon_with_holes_2<Kernel,Container>
-minkowski_sum_2 (const Polygon_2<Kernel,Container>& pgn1,
-                 const Polygon_2<Kernel,Container>& pgn2)
-{
-  Minkowski_sum_by_convolution_2<Kernel, Container>  mink_sum;
-  Polygon_2<Kernel,Container>                        sum_bound;
-  std::list<Polygon_2<Kernel,Container> >            sum_holes;
-
-  if (pgn1.size() > pgn2.size())
-    mink_sum (pgn1, pgn2, sum_bound, std::back_inserter(sum_holes));
-  else
-    mink_sum (pgn2, pgn1, sum_bound, std::back_inserter(sum_holes));
-
-  return (Polygon_with_holes_2<Kernel,Container> (sum_bound,
-                                                  sum_holes.begin(),
-                                                  sum_holes.end()));
-}
-
-/*!
- * Compute the Minkowski sum of two simple polygons by decomposing each
- * polygon to convex sub-polygons and computing the union of the pairwise
- * Minkowski sums of the sub-polygons.
- * Note that as the input polygons may not be convex, their Minkowski sum may
- * not be a simple polygon. The result is therefore represented as a polygon
- * with holes.
- * \param pgn1 The first polygon.
- * \param pgn2 The second polygon.
- * \param decomp A functor for decomposing polygons.
- * \param sum Output: The resulting polygon with holes, representing the sum.
- */
-template <class Kernel, class Container, class DecompositionStrategy>
-Polygon_with_holes_2<Kernel,Container>
-minkowski_sum_2 (const Polygon_2<Kernel,Container>& pgn1,
-                 const Polygon_2<Kernel,Container>& pgn2,
-                 const DecompositionStrategy&)
-{
-  Minkowski_sum_by_decomposition_2<DecompositionStrategy,Container>        mink_sum;
-
-  typedef Polygon_with_holes_2<Kernel,Container>                 Polygon_with_holes_2;
-  
-  Polygon_with_holes_2 sum;
-
-  sum = mink_sum (pgn1, pgn2);
-  
-  return (sum);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mst_orient_normals.h b/3rdparty/CGAL-4.6/include/CGAL/mst_orient_normals.h
deleted file mode 100644
index f152db4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/mst_orient_normals.h
+++ /dev/null
@@ -1,716 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Laurent Saboret and Andreas Fabri
-
-#ifndef CGAL_MST_ORIENT_NORMALS_H
-#define CGAL_MST_ORIENT_NORMALS_H
-
-#include <CGAL/trace.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/Search_traits_vertex_handle_3.h>
-#include <CGAL/property_map.h>
-#include <CGAL/Index_property_map.h>
-#include <CGAL/Memory_sizer.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/use.h>
-
-#include <iterator>
-#include <list>
-#include <climits>
-#include <math.h>
-
-#include <CGAL/property_map.h>
-#include <boost/graph/adjacency_list.hpp>
-#include <CGAL/boost/graph/dijkstra_shortest_paths.h> // work around a bug in boost 1.54
-#include <boost/graph/prim_minimum_spanning_tree.hpp>
-
-namespace CGAL {
-
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-namespace internal {
-
-/// Generalization of std::distance() to compute the distance between 2 integers
-inline std::size_t
-distance(std::size_t _First, std::size_t _Last)
-{
-  // return int difference
-  return _Last - _First;
-}
-
-// Bring std::distance() to scope
-using std::distance;
-
-
-/// Helper class: Riemannian graph.
-///
-/// This class is used internally by mst_orient_normals()
-/// to encode:
-/// - the adjacency relations of vertices in a K-neighboring.
-/// - vertices contain the corresponding input point iterator.
-/// - the edge weight = edge weight = 1 - | normal1 * normal2 |
-///   where normal1 and normal2 are the normal at the edge extremities.
-
-template <typename ForwardIterator> ///< Input point iterator
-struct Riemannian_graph_vertex_properties {
-    ForwardIterator input_point; ///< Input point
-};
-template <typename ForwardIterator> ///< Input point iterator
-class Riemannian_graph
-  : public boost::adjacency_list< boost::vecS, boost::vecS,
-                                  boost::undirectedS,
-                                  Riemannian_graph_vertex_properties<ForwardIterator>,
-                                  boost::property<boost::edge_weight_t, float> >
-{
-};
-
-
-/// Helper class: MST graph
-///
-/// This class is used internally by mst_orient_normals()
-/// to encode:
-/// - the adjacency relations of vertices in a Minimum Spanning Tree.
-/// - vertices contain the corresponding input point iterator
-//    and a boolean indicating if the normal is oriented.
-
-template <typename ForwardIterator> ///< Input point iterator
-struct MST_graph_vertex_properties {
-    ForwardIterator input_point; ///< Input point
-    bool is_oriented; ///< Is input point's normal oriented?
-};
-template <typename ForwardIterator, ///< Input point iterator
-          typename NormalPMap, ///< property map: value_type of ForwardIterator -> Normal
-          typename Kernel ///< Geometric traits class
->
-class MST_graph
-  : public boost::adjacency_list< boost::vecS, boost::vecS,
-                                  boost::directedS,
-                                  MST_graph_vertex_properties<ForwardIterator> >
-{
-public:
-    MST_graph(NormalPMap normal_pmap) : m_normal_pmap(normal_pmap) {}
-
-// Public data
-    const NormalPMap m_normal_pmap;
-};
-
-
-/// Helper class: Propagate_normal_orientation
-///
-/// This class is used internally by mst_orient_normals()
-/// to propage the normal orientation, starting from a source point
-/// and following the adjacency relations of vertices in a Minimum Spanning Tree.
-/// It does not orient normals that are already oriented.
-/// It does not propagate the orientation if the angle between 2 normals > angle_max.
-///
-/// \pre Normals must be unit vectors
-/// \pre `0 < angle_max <= PI/2`
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap`.
-/// @tparam Kernel Geometric traits class.
-
-template <typename ForwardIterator, ///< Input point iterator
-          typename NormalPMap, ///< property map: value_type of ForwardIterator -> Normal
-          typename Kernel
->
-struct Propagate_normal_orientation
-  : public boost::base_visitor< Propagate_normal_orientation<ForwardIterator, NormalPMap, Kernel> >
-{
-    typedef internal::MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
-    typedef boost::on_examine_edge event_filter;
-
-    Propagate_normal_orientation(double angle_max = CGAL_PI/2.) ///< max angle to propagate the normal orientation (radians)
-    : m_angle_max(angle_max)
-    {
-        // Precondition: 0 < angle_max <= PI/2
-        CGAL_point_set_processing_precondition(0 < angle_max && angle_max <= CGAL_PI/2.);
-    }
-
-    template <class Edge>
-    void operator()(Edge& edge, const MST_graph& mst_graph)
-    {
-        typedef typename boost::property_traits<NormalPMap>::value_type Vector;
-        typedef typename MST_graph::vertex_descriptor vertex_descriptor;
-
-        // Gets source normal
-        vertex_descriptor source_vertex = boost::source(edge, mst_graph);
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        const Vector source_normal = get(mst_graph.m_normal_pmap, mst_graph[source_vertex].input_point);
-#else
-        const Vector source_normal = get(mst_graph.m_normal_pmap, *(mst_graph[source_vertex].input_point) );
-#endif
-        const bool source_normal_is_oriented = mst_graph[source_vertex].is_oriented;
-        // Gets target normal
-        vertex_descriptor target_vertex = boost::target(edge, mst_graph);
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        const Vector& target_normal = get( mst_graph.m_normal_pmap, mst_graph[target_vertex].input_point);
-#else
-        const Vector& target_normal = get( mst_graph.m_normal_pmap, *(mst_graph[target_vertex].input_point) );
-#endif
-        bool& target_normal_is_oriented = ((MST_graph&)mst_graph)[target_vertex].is_oriented;
-        if ( ! target_normal_is_oriented )
-        {
-          //             ->                        ->
-          // Orients target_normal parallel to source_normal
-          double normals_dot = source_normal * target_normal;
-          if (normals_dot < 0)
-          {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-            put( mst_graph.m_normal_pmap, mst_graph[target_vertex].input_point, -target_normal);
-#else
-            put( mst_graph.m_normal_pmap, *(mst_graph[target_vertex].input_point), -target_normal );
-#endif
-          }
-
-          // Is orientation robust?
-          target_normal_is_oriented
-            = source_normal_is_oriented &&
-              (std::abs(normals_dot) >= std::cos(m_angle_max)); // oriented iff angle <= m_angle_max
-        }
-    }
-
-// Data
-// Implementation note: boost::breadth_first_search() makes copies of this object => data must be constant or shared.
-private:
-    const double m_angle_max; ///< max angle to propagate the normal orientation (radians).
-};
-
-/// Orients the normal of the point with maximum Z towards +Z axis.
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
-/// @tparam Kernel Geometric traits class.
-///
-/// @return iterator over the top point.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-ForwardIterator
-mst_find_source(
-    ForwardIterator first,   ///< iterator over the first input point.
-    ForwardIterator beyond,  ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
-    const Kernel& /*kernel*/)    ///< geometric traits.
-{
-    CGAL_TRACE("  mst_find_source()\n");
-
-    // Input points types
-    typedef typename boost::property_traits<NormalPMap>::value_type Vector;
-
-    // Precondition: at least one element in the container
-    CGAL_point_set_processing_precondition(first != beyond);
-
-    // Find top point
-    ForwardIterator top_point = first;
-    for (ForwardIterator v = ++first; v != beyond; v++)
-    {
-      
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      double top_z = get(point_pmap,top_point).z(); // top_point's Z coordinate
-      double z = get(point_pmap,v).z();
-#else
-      double top_z = get(point_pmap,*top_point).z(); // top_point's Z coordinate
-      double z = get(point_pmap,*v).z();
-#endif  
-      
-      if (top_z < z)
-        top_point = v;
-    }
-
-    // Orients its normal towards +Z axis
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    const Vector& normal = get(normal_pmap,top_point);
-#else
-    const Vector& normal = get(normal_pmap,*top_point);
-#endif
-    const Vector Z(0, 0, 1);
-    if (Z * normal < 0) {
-      CGAL_TRACE("  Flip top point normal\n");
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    put(normal_pmap,top_point, -normal);
-#else
-    put(normal_pmap,*top_point, -normal);
-#endif
-    }
-
-    return top_point;
-}
-
-/// Iterates over input points and creates Riemannian Graph:
-/// - vertices are numbered like the input points index.
-/// - vertices contain the corresponding input point iterator.
-/// - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
-///   or vertex j is in the k-neighborhood of vertex i.
-///
-/// \pre Normals must be unit vectors.
-/// \pre `k >= 2`
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam IndexPMap is a model of `ReadablePropertyMap` with an integral value_type.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
-/// @tparam Kernel Geometric traits class.
-///
-/// @return the Riemannian graph
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename IndexPMap,
-          typename Kernel
->
-Riemannian_graph<ForwardIterator>
-create_riemannian_graph(
-    ForwardIterator first,  ///< iterator over the first input point.
-    ForwardIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
-    IndexPMap index_pmap, ///< property map ForwardIterator -> index
-    unsigned int k, ///< number of neighbors
-    const Kernel& /*kernel*/) ///< geometric traits.
-{
-    // Input points types
-    typedef typename boost::property_traits<PointPMap>::value_type Point;
-    typedef typename boost::property_traits<NormalPMap>::value_type Vector;
-
-    // Types for K nearest neighbors search structure
-    typedef Point_vertex_handle_3<ForwardIterator> Point_vertex_handle_3;
-    typedef Search_traits_vertex_handle_3<ForwardIterator> Traits;
-    typedef Euclidean_distance_vertex_handle_3<ForwardIterator> KDistance;
-    typedef Orthogonal_k_neighbor_search<Traits,KDistance> Neighbor_search;
-    typedef typename Neighbor_search::Tree Tree;
-    typedef typename Neighbor_search::iterator Search_iterator;
-
-    // Riemannian_graph types
-    typedef internal::Riemannian_graph<ForwardIterator> Riemannian_graph;
-    typedef typename boost::property_map<Riemannian_graph, boost::edge_weight_t>::type Riemannian_graph_weight_map;
-
-    // Precondition: at least one element in the container.
-    CGAL_point_set_processing_precondition(first != beyond);
-
-    // Precondition: at least 2 nearest neighbors
-    CGAL_point_set_processing_precondition(k >= 2);
-
-    // Number of input points
-    const std::size_t num_input_points = distance(first, beyond);
-
-    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Creates KD-tree\n");
-
-    // Instanciate a KD-tree search.
-    // Notes: We have to wrap each input point by a Point_vertex_handle_3.
-    //        The KD-tree is allocated dynamically to recover RAM as soon as possible.
-    std::vector<Point_vertex_handle_3> kd_tree_points; kd_tree_points.reserve(num_input_points);
-    for (ForwardIterator it = first; it != beyond; it++)
-    {
-        
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        Point point = get(point_pmap, it);
-#else
-        Point point = get(point_pmap, *it);
-#endif  
-        Point_vertex_handle_3 point_wrapper(point.x(), point.y(), point.z(), it);
-        kd_tree_points.push_back(point_wrapper);
-    }
-    boost::shared_ptr<Tree> tree( new Tree(kd_tree_points.begin(), kd_tree_points.end()) );
-
-    // Recover RAM
-    kd_tree_points.clear();
-
-    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Creates Riemannian Graph\n");
-
-    // Iterates over input points and creates Riemannian Graph:
-    // - vertices are numbered like the input points index.
-    // - vertices contain the corresponding input point iterator.
-    // - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
-    //   or vertex j is in the k-neighborhood of vertex i.
-    Riemannian_graph riemannian_graph;
-    //
-    // add vertices
-    for (ForwardIterator it = first; it != beyond; it++)
-    {
-        typename Riemannian_graph::vertex_descriptor v = add_vertex(riemannian_graph);
-        CGAL_point_set_processing_assertion(v == get(index_pmap,it));
-        riemannian_graph[v].input_point = it;
-    }
-    //
-    // add edges
-    Riemannian_graph_weight_map riemannian_graph_weight_map = get(boost::edge_weight, riemannian_graph);
-    for (ForwardIterator it = first; it != beyond; it++)
-    {
-        std::size_t it_index = get(index_pmap,it);
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        Vector it_normal_vector = get(normal_pmap,it);
-#else
-        Vector it_normal_vector = get(normal_pmap,*it);
-#endif  
-        
-        // Gather set of (k+1) neighboring points.
-        // Perform k+1 queries (as in point set, the query point is
-        // output first). Search may be aborted if k is greater
-        // than number of input points.
-        
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-        Point point = get(point_pmap, it);
-#else
-        Point point = get(point_pmap, *it);
-#endif  
-        Point_vertex_handle_3 point_wrapper(point.x(), point.y(), point.z(), it);
-        Neighbor_search search(*tree, point_wrapper, k+1);
-        Search_iterator search_iterator = search.begin();
-        for(std::size_t i=0;i<(k+1);i++)
-        {
-            if(search_iterator == search.end())
-                break; // premature ending
-
-            ForwardIterator neighbor = search_iterator->first;
-            std::size_t neighbor_index = get(index_pmap,neighbor);
-            if (neighbor_index > it_index) // undirected graph
-            {
-                // Add edge
-                typename boost::graph_traits<Riemannian_graph>::edge_descriptor e;
-                bool inserted;
-                boost::tie(e, inserted) = boost::add_edge(boost::vertex(it_index, riemannian_graph),
-                                                          boost::vertex(neighbor_index, riemannian_graph),
-                                                          riemannian_graph);
-                CGAL_point_set_processing_assertion(inserted);
-
-                //                               ->        ->
-                // Computes edge weight = 1 - | normal1 * normal2 |
-                // where normal1 and normal2 are the normal at the edge extremities.
-                
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-                Vector neighbor_normal_vector = get(normal_pmap,neighbor);
-#else
-                Vector neighbor_normal_vector = get(normal_pmap,*neighbor);
-#endif  
-                double weight = 1.0 - std::abs(it_normal_vector * neighbor_normal_vector);
-                if (weight < 0)
-                    weight = 0; // safety check
-                riemannian_graph_weight_map[e] = (float)weight;
-            }
-
-            search_iterator++;
-        }
-    }
-
-    return riemannian_graph;
-}
-
-/// Computes Minimum Spanning Tree and store it in a Boost graph:
-/// - vertices are numbered like the input points index.
-/// - vertices contain the corresponding input point iterator.
-/// - we add the edge (predecessor[i], i) for each element of the MST.
-///
-/// \pre Normals must be unit vectors.
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam IndexPMap is a model of `ReadablePropertyMap` with an integral value_type.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
-/// @tparam Kernel Geometric traits class.
-///
-/// @return the MST graph.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename IndexPMap,
-          typename Kernel
->
-MST_graph<ForwardIterator, NormalPMap, Kernel>
-create_mst_graph(
-    ForwardIterator first,  ///< iterator over the first input point.
-    ForwardIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
-    IndexPMap index_pmap, ///< property map ForwardIterator -> index
-    unsigned int k, ///< number of neighbors
-    const Kernel& kernel, ///< geometric traits.
-    const Riemannian_graph<ForwardIterator>& riemannian_graph, ///< graph connecting each vertex to its knn
-    ForwardIterator source_point) ///< source point (with an oriented normal)
-{
-    // prevents warnings
-    CGAL_USE(point_pmap);
-    CGAL_USE(k);
-    CGAL_USE(kernel);
-
-    // Bring private stuff to scope
-    using namespace internal;
-
-    // Riemannian_graph types
-    typedef internal::Riemannian_graph<ForwardIterator> Riemannian_graph;
-    typedef typename boost::property_map<Riemannian_graph, boost::edge_weight_t>::const_type Riemannian_graph_weight_map;
-
-    // MST_graph types
-    typedef internal::MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
-
-    // Precondition: at least one element in the container.
-    CGAL_point_set_processing_precondition(first != beyond);
-
-    // Number of input points
-    const std::size_t num_input_points = boost::num_vertices(riemannian_graph);
-
-    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Calls boost::prim_minimum_spanning_tree()\n");
-
-    // Computes Minimum Spanning Tree.
-    std::size_t source_point_index = get(index_pmap, source_point);
-    Riemannian_graph_weight_map riemannian_graph_weight_map = get(boost::edge_weight, riemannian_graph);
-    typedef std::vector<typename Riemannian_graph::vertex_descriptor> PredecessorMap;
-    PredecessorMap predecessor(num_input_points);
-    boost::prim_minimum_spanning_tree(riemannian_graph, &predecessor[0],
-                                      weight_map( riemannian_graph_weight_map )
-                                     .root_vertex( boost::vertex(source_point_index, riemannian_graph) ));
-
-    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Creates MST Graph\n");
-
-    // Converts predecessor map to a MST graph:
-    // - vertices are numbered like the input points index.
-    // - vertices contain the corresponding input point iterator.
-    // - we add the edge (predecessor[i], i) for each element of the predecessor map.
-    MST_graph mst_graph(normal_pmap);
-    //
-    // Add vertices. source_point is the unique point marked "oriented".
-    for (ForwardIterator it = first; it != beyond; it++)
-    {
-        // With C++11, the following line triggers a bug in Boost versions
-        // 1.56 and 1.57:
-        //   https://svn.boost.org/trac/boost/ticket/10382
-        typename MST_graph::vertex_descriptor v = add_vertex(mst_graph);
-        CGAL_point_set_processing_assertion(v == get(index_pmap,it));
-        mst_graph[v].input_point = it;
-        mst_graph[v].is_oriented = (it == source_point);
-    }
-    // add edges
-    for (std::size_t i=0; i < predecessor.size(); i++) // add edges
-    {
-        if (i != predecessor[i])
-        {
-            // check that bi-directed graph is useless
-            CGAL_point_set_processing_assertion(predecessor[predecessor[i]] != i);
-
-            boost::add_edge(boost::vertex(predecessor[i], mst_graph),
-                            boost::vertex(i,     mst_graph),
-                            mst_graph);
-        }
-    }
-
-    return mst_graph;
-}
-
-} /* namespace internal */
-/// \endcond
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// Orients the normals of the `[first, beyond)` range of points using the propagation
-/// of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
-///
-/// This method modifies the order of input points so as to pack all sucessfully oriented points first,
-/// and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
-/// For this reason it should not be called on sorted containers.
-/// \warning This function may fail when Boost version 1.54 is used,
-/// because of the following bug: https://svn.boost.org/trac/boost/ticket/9012
-///
-/// \pre Normals must be unit vectors
-/// \pre `k >= 2`
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type  `Point_3<Kernel>`.
-///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with value type `Vector_3<Kernel>` .
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-///
-/// @return iterator over the first point with an unoriented normal.
-
-// This variant requires all parameters.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-ForwardIterator
-mst_orient_normals(
-    ForwardIterator first,  ///< iterator over the first input point.
-    ForwardIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-    unsigned int k, ///< number of neighbors
-    const Kernel& kernel) ///< geometric traits.
-{
-    CGAL_TRACE("Calls mst_orient_normals()\n");
-
-    // Bring private stuff to scope
-    using namespace internal;
-
-    // Input points types
-    typedef typename std::iterator_traits<ForwardIterator>::value_type Enriched_point; // actual type of input points
-    // Property map ForwardIterator -> index
-    typedef Index_property_map<ForwardIterator> IndexPMap;
-
-    // Riemannian_graph types
-    typedef Riemannian_graph<ForwardIterator> Riemannian_graph;
-
-    // MST_graph types
-    typedef MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
-
-    // Precondition: at least one element in the container.
-    CGAL_point_set_processing_precondition(first != beyond);
-
-    // Precondition: at least 2 nearest neighbors
-    CGAL_point_set_processing_precondition(k >= 2);
-
-    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Create Index_property_map\n");
-
-    // Create a property map Iterator -> index.
-    // - if ForwardIterator is a random access iterator (typically vector and deque),
-    // get() just calls std::distance() and is very efficient;
-    // - else, the property map allocates a std::map to store indices
-    // and get() requires a lookup in the map.
-    IndexPMap index_pmap(first, beyond);
-
-    // Orients the normal of the point with maximum Z towards +Z axis.
-    ForwardIterator source_point
-      = mst_find_source(first, beyond,
-                        point_pmap, normal_pmap,
-                        kernel);
-
-    // Iterates over input points and creates Riemannian Graph:
-    // - vertices are numbered like the input points index.
-    // - vertices are empty.
-    // - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
-    //   or vertex j is in the k-neighborhood of vertex i.
-    Riemannian_graph riemannian_graph
-      = create_riemannian_graph(first, beyond,
-                                point_pmap, normal_pmap, index_pmap,
-                                k,
-                                kernel);
-
-    // Creates a Minimum Spanning Tree starting at source_point
-    MST_graph mst_graph = create_mst_graph(first, beyond,
-                                           point_pmap, normal_pmap, index_pmap,
-                                           k,
-                                           kernel,
-                                           riemannian_graph,
-                                           source_point);
-
-    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("  Calls boost::breadth_first_search()\n");
-
-    // Traverse the point set along the MST to propagate source_point's orientation
-    Propagate_normal_orientation<ForwardIterator, NormalPMap, Kernel> orienter;
-    std::size_t source_point_index = get(index_pmap, source_point);
-    boost::breadth_first_search(mst_graph,
-                                boost::vertex(source_point_index, mst_graph), // source
-                                visitor(boost::make_bfs_visitor(orienter)));
-
-    // Copy points with robust normal orientation to oriented_points[], the others to unoriented_points[].
-    std::deque<Enriched_point> oriented_points, unoriented_points;
-    for (ForwardIterator it = first; it != beyond; it++)
-    {
-        std::size_t it_index = get(index_pmap,it);
-        typename MST_graph::vertex_descriptor v = boost::vertex(it_index, mst_graph);
-        if (mst_graph[v].is_oriented)
-          oriented_points.push_back(*it);
-        else
-          unoriented_points.push_back(*it);
-    }
-
-    // Replaces [first, beyond) range by the content of oriented_points[], then unoriented_points[].
-    ForwardIterator first_unoriented_point =
-      std::copy(oriented_points.begin(), oriented_points.end(), first);
-    std::copy(unoriented_points.begin(), unoriented_points.end(), first_unoriented_point);
-
-    // At this stage, we have typically 0 unoriented normals if k is large enough
-    CGAL_TRACE("  => %u normals are unoriented\n", unoriented_points.size());
-
-    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-    CGAL_TRACE("End of mst_orient_normals()\n");
-
-    return first_unoriented_point;
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-ForwardIterator
-mst_orient_normals(
-    ForwardIterator first,  ///< iterator over the first input point.
-    ForwardIterator beyond, ///< past-the-end iterator over the input points.
-    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-    unsigned int k) ///< number of neighbors
-{
-    typedef typename boost::property_traits<PointPMap>::value_type Point;
-    typedef typename Kernel_traits<Point>::Kernel Kernel;
-    return mst_orient_normals(
-      first,beyond,
-      point_pmap,
-      normal_pmap,
-      k,
-      Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename ForwardIterator,
-          typename NormalPMap
->
-ForwardIterator
-mst_orient_normals(
-    ForwardIterator first,  ///< iterator over the first input point.
-    ForwardIterator beyond, ///< past-the-end iterator over the input points.
-    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-    unsigned int k) ///< number of neighbors
-{
-    return mst_orient_normals(
-      first,beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      make_dereference_property_map(first),
-#else
-      make_identity_property_map(
-      typename std::iterator_traits<ForwardIterator>::value_type()),
-#endif
-      normal_pmap,
-      k);
-}
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_MST_ORIENT_NORMALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/number_type_basic.h b/3rdparty/CGAL-4.6/include/CGAL/number_type_basic.h
deleted file mode 100644
index bc71689..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/number_type_basic.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 1999,2007  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stefan Schirra, Michael Hemmer
-
-
-#ifndef CGAL_NUMBER_TYPE_BASIC_H
-#define CGAL_NUMBER_TYPE_BASIC_H
-
-#include <CGAL/number_type_config.h>
-
-#include <CGAL/basic.h>
-
-// basic tools needed in several files
-#include <boost/type_traits/is_same.hpp>
-#include <functional>
-
-#include <CGAL/Quotient_fwd.h>
-
-#include <CGAL/Kernel/mpl.h>      // First_if_different
-#include <CGAL/enum.h>            // CGAL::Sign etc.
-#include <CGAL/tags.h>            // Tag_true / Tag_false
-
-#include <CGAL/Coercion_traits.h>
-#include <CGAL/Algebraic_structure_traits.h>
-#include <CGAL/Real_embeddable_traits.h>
-
-#include <CGAL/Fraction_traits.h>
-#include <CGAL/Rational_traits.h>
-
-#include <CGAL/Scalar_factor_traits.h>       // not part of CGAL 3.3
-#include <CGAL/Algebraic_extension_traits.h> // not part of CGAL 3.3 
-
-#include <CGAL/Needs_parens_as_product.h>
-
-#include <CGAL/utils_classes.h>
-#include <CGAL/utils.h>
-#include <CGAL/FPU.h>
-
-#include <CGAL/float.h>
-#include <CGAL/double.h>
-#include <CGAL/long_double.h>
-
-#include <CGAL/Interval_nt.h> // needed by To_interval(long double), To_interval(long), To_interval(long long)
-
-#include <CGAL/int.h>
-#ifdef CGAL_USE_LONG_LONG
-#include <CGAL/long_long.h>
-#endif
-
-
-
-#ifdef CGAL_USE_GMP
-#ifdef CGAL_USE_GMPXX
-#include <CGAL/gmpxx.h>
-#endif // CGAL_USE_GMPXX
-#endif // CGAL_USE_GMP
-
-#include <CGAL/number_utils.h>
-#include <CGAL/number_utils_classes.h>
-
-#endif // CGAL_NUMBER_TYPE_BASIC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/odt_optimize_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/odt_optimize_mesh_3.h
deleted file mode 100644
index c098dd2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/odt_optimize_mesh_3.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : odt_optimize_mesh_3 function definition.
-//******************************************************************************
-
-#ifndef CGAL_ODT_OPTIMIZE_MESH_3_H
-#define CGAL_ODT_OPTIMIZE_MESH_3_H
-
-
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <CGAL/Mesh_3/Mesh_global_optimizer.h>
-#include <CGAL/Mesh_3/Odt_move.h>
-#include <CGAL/Mesh_3/Mesh_sizing_field.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/parameters_defaults.h>
-
-namespace CGAL {
-  
-BOOST_PARAMETER_FUNCTION(
-  (Mesh_optimization_return_code),
-  odt_optimize_mesh_3,
-  parameters::tag,
-  (required (in_out(c3t3),*) (domain,*) )
-  (optional
-    (time_limit_, *, 0 )
-    (max_iteration_number_, *, 0 )
-    (convergence_, *, parameters::default_values::odt_convergence_ratio )
-    (freeze_bound_, *, parameters::default_values::odt_freeze_ratio )
-    (do_freeze_, *, parameters::default_values::do_freeze ))
-)
-{
-  return odt_optimize_mesh_3_impl(c3t3, domain,
-                                  time_limit_, max_iteration_number_,
-                                  convergence_, freeze_bound_
-                                  , do_freeze_ );
-} 
-
-
-
-template <typename C3T3, typename MeshDomain> 
-Mesh_optimization_return_code
-odt_optimize_mesh_3_impl(C3T3& c3t3,
-                         const MeshDomain& domain,
-                         const double time_limit,
-                         std::size_t max_iteration_number,
-                         const double convergence,
-                         const double freeze_ratio,
-                         const bool do_freeze )
-{
-  typedef typename C3T3::Triangulation  Tr;
-  
-  typedef Mesh_3::Mesh_sizing_field<Tr>             Sizing;
-  typedef typename Mesh_3::Odt_move<C3T3,Sizing>    Move;
-  
-  typedef typename
-    Mesh_3::Mesh_global_optimizer<C3T3,MeshDomain,Move> Odt_optimizer;
-
-  // Create optimizer
-  Odt_optimizer opt(c3t3,
-                    domain,
-                    freeze_ratio,
-                    do_freeze,
-                    convergence);
-  
-  // Set max time
-  opt.set_time_limit(time_limit);
-  
-  // 1000 iteration max to avoid infinite loops
-  if ( 0 == max_iteration_number )
-    max_iteration_number = 1000;
-  
-  // Launch optimization
-  return opt(static_cast<int>(max_iteration_number));
-}
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_ODT_OPTIMIZE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/offset_polygon_2.h b/3rdparty/CGAL-4.6/include/CGAL/offset_polygon_2.h
deleted file mode 100644
index 803ace2..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/offset_polygon_2.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2006  Tel-Aviv University (Israel).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
-
-#ifndef CGAL_OFFSET_POLYGON_H
-#define CGAL_OFFSET_POLYGON_H
-
-#include <CGAL/Minkowski_sum_2/Exact_offset_base_2.h>
-#include <CGAL/Minkowski_sum_2/Offset_conv_2.h>
-#include <CGAL/Minkowski_sum_2/Offset_decomp_2.h>
-
-namespace CGAL {
-
-/*!
- * Compute the offset of a given simple polygon by a given radius,
- * using the convolution method.
- * Note that as the input polygon may not be convex, its offset may not be 
- * simply connected. The result is therefore represented as a polygon with
- * holes.
- * \param pgn The polygon.
- * \param r The offset radius.
- * \return The offset polygon.
- */
-template <class ConicTraits, class Container>
-typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-offset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
-                                  Container>& pgn,
-                  const typename ConicTraits::Rat_kernel::FT& r,
-                  const ConicTraits& )
-{
-  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
-  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
-  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
-
-  Base                                               base;
-  Exact_offset_2                                     exact_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  exact_offset (pgn, r, 
-                offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Compute the offset of a given polygon with holes by a given radius,
- * using the convolution method.
- * The result is represented as a polygon with holes whose edges are line
- * segments and circular arcs.
- * \param pwh The polygon with holes.
- * \param r The offset radius.
- * \pre The polygon is bounded (has a valid outer boundary).
- * \return The offset polygon.
- */
-template <class ConicTraits, class Container>
-typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-offset_polygon_2 (const Polygon_with_holes_2<typename ConicTraits::Rat_kernel,
-                                             Container>& pwh,
-                  const typename ConicTraits::Rat_kernel::FT& r,
-                  const ConicTraits& )
-{
-  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
-  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
-  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
-
-  Base                                               base;
-  Exact_offset_2                                     exact_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  exact_offset (pwh, r, 
-                offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Compute the offset of a given simple polygon by a given radius,
- * by decomposing it to convex sub-polygons and computing the union of their
- * offsets.
- * Note that as the input polygon may not be convex, its offset may not be 
- * simply connected. The result is therefore represented as a polygon with
- * holes.
- * \param pgn The polygon.
- * \param r The offset radius.
- * \param decomp A functor for decomposing polygons.
- * \return The offset polygon.
- */
-template <class ConicTraits, class Container, class DecompositionStrategy>
-typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-offset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
-                                  Container>& pgn,
-                  const typename ConicTraits::Rat_kernel::FT& r,
-                  const DecompositionStrategy&,
-                  const ConicTraits& )
-{
-  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
-  typedef Offset_by_decomposition_2<Base, DecompositionStrategy>
-                                                             Exact_offset_2;
-  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
-
-  Base                                               base;
-  Exact_offset_2                                     exact_offset (base);
-  Offset_polygon_2                                   offset_bound;
-  std::list<Offset_polygon_2>                        offset_holes;
-
-  exact_offset (pgn, r,
-                offset_bound, std::back_inserter(offset_holes));
-
-  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
-          (offset_bound, offset_holes.begin(), offset_holes.end()));
-}
-
-/*!
- * Compute the inset of a given simple polygon by a given radius, using the
- * convolution method.
- * Note that as the input polygon may not be convex, its inset may not be 
- * simply connected. The result is therefore represented as a set of polygons.
- * \param pgn The polygon.
- * \param r The inset radius.
- * \param oi An output iterator for the inset polygons.
- *           Its value-type must be Gps_traits_2<ConicTraits>::Polygon_2.
- * \return A past-the-end iterator for the inset polygons.
- */
-template <class ConicTraits, class Container, class OutputIterator>
-OutputIterator
-inset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
-                                 Container>& pgn,
-                 const typename ConicTraits::Rat_kernel::FT& r,
-                 const ConicTraits& ,
-                 OutputIterator oi)
-{
-  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
-  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
-
-  Base                                               base;
-  Exact_offset_2                                     exact_offset (base);
-
-  oi = exact_offset.inset (pgn, r,
-                           oi);
-
-  return (oi);
-}
-
-} //namespace CGAL
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/orient_polygon_soup.h b/3rdparty/CGAL-4.6/include/CGAL/orient_polygon_soup.h
deleted file mode 100644
index 196e07f..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/orient_polygon_soup.h
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright (c) 2009-2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau and Sebastien Loriot
-
-
-#ifndef CGAL_ORIENT_POLYGON_SOUP
-#define CGAL_ORIENT_POLYGON_SOUP
-
-#include <boost/foreach.hpp>
-
-#include <set>
-#include <map>
-#include <stack>
-#include <algorithm>
-#include <iostream>
-
-namespace CGAL {
-
-namespace internal {
-
-template<class Point_3, class Polygon_3>
-class Polygon_soup_orienter
-{
-/// Index types
-  typedef typename std::iterator_traits<
-            typename Polygon_3::iterator >::value_type                     V_ID;
-  typedef typename std::vector<Polygon_3>::size_type                       P_ID;
-//  typedef int                                                             CC_ID;
-  typedef std::pair<V_ID, V_ID>                                       V_ID_pair;
-/// Container types
-  typedef std::vector<Point_3>                                           Points;
-  typedef std::vector<Polygon_3>                                       Polygons;
-  typedef std::map<V_ID_pair, std::set<P_ID> >                         Edge_map;
-  typedef typename Edge_map::iterator                         Edge_map_iterator;
-  typedef std::set<V_ID_pair>                                      Marked_edges;
-
-/// Data members
-  Points& points;             //< the set of input points
-  Polygons& polygons;         //< the set of input polygons
-  Edge_map edges;             //< the set of edges of the input polygons
-  Marked_edges marked_edges;  //< the set of singular edges or edges incident
-                              //<   to non-compatible orientation polygons
-
-  /// for each polygon referenced by its position in `polygons`, indicates
-  /// the connected component it belongs too after orientation.
-//  std::vector< CC_ID > polygon_cc_id;
-  /// for each vertex, indicates the list of polygon containing it
-  std::vector< std::vector<P_ID> > incident_polygons_per_vertex;
-
-/// Utility functions
-  V_ID_pair canonical_edge(V_ID i, V_ID j)
-  {
-    return i<j ? V_ID_pair(i,j):V_ID_pair(j,i);
-  }
-
-  bool is_edge_marked(V_ID i, V_ID j)
-  {
-    return marked_edges.count(canonical_edge(i,j));
-  }
-
-  void set_edge_marked(V_ID i, V_ID j)
-  {
-    marked_edges.insert(canonical_edge(i,j));
-  }
-
-  cpp11::array<V_ID,3>
-  get_neighbor_vertices(V_ID v_id, P_ID polygon_index)
-  {
-    std::size_t nbv = polygons[polygon_index].size(), pvid=0;
-    for (; pvid!=nbv; ++pvid)
-      if (v_id==polygons[polygon_index][pvid]) break;
-    CGAL_assertion( pvid!=nbv );
-    V_ID prev = polygons[polygon_index][ (pvid+nbv-1)%nbv ];
-    V_ID next = polygons[polygon_index][ (pvid+1)%nbv ];
-    return make_array(prev,v_id,next);
-  }
-
-  std::pair<V_ID,P_ID>
-  next_cw_vertex_around_source(V_ID src, V_ID tgt)
-  {
-    typedef std::pair<V_ID,P_ID> VID_and_PID;
-    if ( is_edge_marked(src,tgt) ) return VID_and_PID(src,300612);
-    Edge_map_iterator em_it=edges.find(V_ID_pair(tgt, src));
-    if ( em_it==edges.end() ) return VID_and_PID(src,300612);// the vertex is on the border
-    CGAL_assertion(em_it->second.size()==1);
-    P_ID p_id = *(em_it->second.begin());
-    return VID_and_PID(get_neighbor_vertices(src, p_id)[2], p_id);
-  }
-
-  std::pair<V_ID,P_ID>
-  next_ccw_vertex_around_target(V_ID src, V_ID tgt)
-  {
-    typedef std::pair<V_ID,P_ID> VID_and_PID;
-    if ( is_edge_marked(src,tgt) ) return VID_and_PID(tgt,300612);
-    Edge_map_iterator em_it=edges.find(V_ID_pair(tgt, src));
-    if ( em_it==edges.end() ) return VID_and_PID(tgt,300612);// the vertex is on the border
-    CGAL_assertion(em_it->second.size()==1);
-    P_ID p_id = *(em_it->second.begin());
-    return VID_and_PID(get_neighbor_vertices(tgt, p_id)[0], p_id);
-  }
-
-  void inverse_orientation(const std::size_t index) {
-    std::reverse(polygons[index].begin(), polygons[index].end());
-  }
-
-  void replace_vertex_index_in_polygon(
-    std::size_t polygon_id,
-    V_ID old_index,
-    V_ID new_index)
-  {
-    BOOST_FOREACH(V_ID& i, polygons[polygon_id])
-      if( i==old_index )
-        i=new_index;
-  }
-
-/// Functions filling containers
-  void fill_edge_map() {
-    // Fill edges
-    edges.clear();
-    for(P_ID i = 0; i < polygons.size(); ++i)
-    {
-      const P_ID size = polygons[i].size();
-      for(P_ID j = 0; j < size; ++j) {
-        V_ID i0 = polygons[i][j];
-        V_ID i1 = polygons[i][ (j+1)%size];
-        edges[V_ID_pair(i0, i1)].insert(i);
-      }
-    }
-
-    // Fill non-manifold edges
-    marked_edges.clear();
-    for(P_ID i = 0; i < polygons.size(); ++i)
-    {
-      const P_ID size = polygons[i].size();
-      for(P_ID j = 0; j < size; ++j) {
-        V_ID i0 = polygons[i][j];
-        V_ID i1 = polygons[i][ (j+1)%size ];
-
-        std::size_t nb_edges = 0;
-        Edge_map_iterator em_it = edges.find( V_ID_pair(i0, i1) );
-        if ( em_it!=edges.end() ) nb_edges += em_it->second.size();
-        em_it = edges.find( V_ID_pair(i1, i0) );
-        if ( em_it!=edges.end() ) nb_edges += em_it->second.size();
-
-        if( nb_edges > 2 ) set_edge_marked(i0,i1);
-      }
-    }
-  }
-
-  void fill_incident_polygons_per_vertex()
-  {
-    incident_polygons_per_vertex.resize(points.size());
-
-    P_ID nb_polygons=polygons.size();
-    for(P_ID ip=0; ip<nb_polygons; ++ip)
-    {
-      BOOST_FOREACH(V_ID iv, polygons[ip])
-        incident_polygons_per_vertex[iv].push_back(ip);
-    }
-  }
-
-public:
-
-  Polygon_soup_orienter(Points& points, Polygons& polygons)
-    : points(points), polygons(polygons)
-  {
-    fill_edge_map();
-  }
-
-  /// We try to orient polygon consistently by walking in the dual graph, from
-  /// a not yet re-oriented polygon.
-  /// We have an edge between two polygons if they share an edge, and this edge
-  /// is shared by exactly two polygons. While walking along an edge, we reorient
-  /// the polygon we walked in if its orientation is not compatible with the one
-  /// we come from.
-  /// If the polygon was already marked as oriented, then we cut the dual edge
-  /// in the graph and the primal edge is marked.
-  /// At the same time, we assign an id to each polygon in the same connected
-  /// componenet of the dual graph.
-  void orient()
-  {
-    std::vector<bool> oriented;
-    std::stack<std::size_t> stack;
-//    polygon_cc_id.resize(polygons.size(), -1);
-
-    // We first consider all polygons as non-oriented
-    oriented.resize(polygons.size());
-
-    P_ID polygon_index = 0;
-
-//    CC_ID current_cc_index=-1;
-    while (polygon_index != polygons.size())
-    {
-      // We look for the first polygon not already oriented
-      while ( polygon_index != polygons.size() && oriented[polygon_index] ) {
-        ++polygon_index;
-      }
-      if(polygon_index == polygons.size()) break;
-
-//      ++ current_cc_index; // visit a new connected component
-
-      // we visit the connected component by crossing edges manifold edges
-      oriented[polygon_index] = true;
-      stack.push(polygon_index);
-      while(! stack.empty() )
-      {
-        const P_ID to_be_oriented_index = stack.top();
-        stack.pop();
-
-//        CGAL_assertion(polygon_cc_id[to_be_oriented_index]==-1);
-//        polygon_cc_id[to_be_oriented_index]=current_cc_index;
-
-        const P_ID size = polygons[to_be_oriented_index].size();
-        for(P_ID ih = 0 ; ih < size ; ++ih) {
-          P_ID ihp1 = (ih+1)%size;
-          const V_ID i1 = polygons[to_be_oriented_index][ih];
-          const V_ID i2 = polygons[to_be_oriented_index][ihp1];
-
-          if( is_edge_marked(i1,i2) ) continue;
-
-          // edge (i1,i2)
-          Edge_map_iterator it_same_orient = edges.find(V_ID_pair(i1, i2));
-          // edges (i2,i1)
-          Edge_map_iterator it_other_orient = edges.find(V_ID_pair(i2, i1));
-
-          CGAL_assertion(it_same_orient != edges.end());
-          CGAL_assertion(it_other_orient == edges.end() ||
-                         it_other_orient->second.size()==1);
-
-          if (it_same_orient->second.size() > 1)
-          {
-            CGAL_assertion(it_other_orient == edges.end());
-            // one neighbor but with the same orientation
-            P_ID index = *(it_same_orient->second.begin());
-            if(index == to_be_oriented_index)
-              index = *(++it_same_orient->second.begin());
-            if(oriented[index])
-            {
-              // polygon already oriented but its orientation is not compatible ---> mark the edge and continue
-              set_edge_marked(i1,i2);
-              continue; // next edge
-            }
-
-            // reverse the orientation
-            const P_ID size = polygons[index].size();
-            for(P_ID j = 0; j < size; ++j) {
-              V_ID i0 = polygons[index][j];
-              V_ID i1 = polygons[index][(j+1)%size];
-              Edge_map_iterator em_it = edges.find(V_ID_pair(i0, i1));
-              CGAL_assertion_code(const bool r = )
-                em_it->second.erase(index)
-              CGAL_assertion_code(!= 0);
-              CGAL_assertion(r);
-              if ( em_it->second.empty() ) edges.erase(em_it);
-            }
-            inverse_orientation(index);
-            for(P_ID j = 0; j < size; ++j) {
-              V_ID i0 = polygons[index][j];
-              V_ID i1 = polygons[index][(j+1)%size];
-              edges[V_ID_pair(i0, i1)].insert(index);
-            }
-            // "inverse the orientation of polygon #index
-            oriented[index] = true;
-            stack.push(index);
-          }
-          else{
-            if( it_other_orient != edges.end() ){
-              CGAL_assertion(it_same_orient->second.size() == 1);
-              CGAL_assertion(it_other_orient->second.size() == 1);
-              // one polygon, same orientation
-              const P_ID index = *(it_other_orient->second.begin());
-              if(oriented[index]) continue; //nothing todo already processed and correctly oriented
-              oriented[index] = true;
-              // "keep the orientation of polygon #index
-              stack.push(index);
-            }
-          }
-        } // end for on all edges of one
-      } // end while loop on the polygons of the connected component
-    } // end while loop on all non-oriented polygons remaining
-  }
-
-  /// A vertex is said to be singular if its link is neither a cycle nor a chain,
-  /// but several cycles and chains.
-  /// For each such vertex v, we consider each set of polygons incident to v
-  /// and sharing a non-marked edge incident to v. A copy of v is assigned to
-  /// each but one set of incident polygons.
-  void duplicate_singular_vertices()
-  {
-    fill_incident_polygons_per_vertex();
-    std::vector< std::pair<V_ID, std::vector<P_ID> > > vertices_to_duplicate;
-
-    V_ID nbv = static_cast<V_ID>( points.size() );
-    for (V_ID v_id = 0; v_id < nbv; ++v_id)
-    {
-      const std::vector< P_ID >& incident_polygons = incident_polygons_per_vertex[v_id];
-
-      if ( incident_polygons.empty() ) continue; //isolated vertex
-      std::set<P_ID> visited_polygons;
-
-      bool first_pass = true;
-      BOOST_FOREACH(P_ID p_id, incident_polygons)
-      {
-        if ( !visited_polygons.insert(p_id).second ) continue; // already visited
-
-        if (!first_pass)
-        {
-          vertices_to_duplicate.push_back(std::pair<V_ID, std::vector<P_ID> >());
-          vertices_to_duplicate.back().first=v_id;
-        }
-
-        const cpp11::array<V_ID,3>& neighbors = get_neighbor_vertices(v_id,p_id);
-
-        V_ID next = neighbors[2];
-
-        if( !first_pass)
-          vertices_to_duplicate.back().second.push_back(p_id);
-
-        do{
-          P_ID other_p_id;
-          cpp11::tie(next, other_p_id) = next_cw_vertex_around_source(v_id, next);
-          if (next==v_id) break;
-          visited_polygons.insert(other_p_id);
-          if( !first_pass)
-            vertices_to_duplicate.back().second.push_back(other_p_id);
-        }
-        while(next!=neighbors[0]);
-
-        if (next==v_id){
-          /// turn the otherway round
-          next = neighbors[0];
-          do{
-            P_ID other_p_id;
-            cpp11::tie(next, other_p_id) = next_ccw_vertex_around_target(next, v_id);
-            if (next==v_id) break;
-            visited_polygons.insert(other_p_id);
-            if( !first_pass)
-              vertices_to_duplicate.back().second.push_back(other_p_id);
-          }
-          while(true);
-        }
-        first_pass=false;
-      }
-    }
-
-    /// now duplicate the vertices
-    typedef std::pair<V_ID, std::vector<P_ID> > V_ID_and_Polygon_ids;
-    BOOST_FOREACH(const V_ID_and_Polygon_ids& vid_and_pids, vertices_to_duplicate)
-    {
-      V_ID new_index = static_cast<V_ID>(points.size());
-      points.push_back( points[vid_and_pids.first] );
-      BOOST_FOREACH(P_ID polygon_id, vid_and_pids.second)
-        replace_vertex_index_in_polygon(polygon_id, vid_and_pids.first, new_index);
-    }
-  }
-};
-} // namespace internal
-
-/**
- * Tries to consistently orient a soup of polygons in 3D space.
- * If it is not possible to produce a combinatorial manifold surface, some points will be
- * duplicated. These points are either an endpoint of edges incident to more than
- * two polygons, or an endpoint of an edge between two polygons with incompatible orientations
- * (during the re-orientation process), or a point shared by at least two polygons that do not
- * share an edge this point is incident to.
- * @tparam Point_3 the point type
- * @tparam Polygon_3 the Polygon type, being a container of indices
- *
- * @param[in,out] points points of the soup of polygons. Some points might be pushed back to resolve
- *                non-manifold or non-orientability issues.
- * @param[in, out] polygons each element in the vector describes a polygon using the index of the points in `points`.
- *
- * @return return false if some points where duplicated, thus producing a self-intersecting polyhedron
- *
- */
-template <class Point_3, class Polygon_3>
-bool orient_polygon_soup(std::vector<Point_3>& points,
-                         std::vector< Polygon_3 >& polygons)
-{
-  std::size_t inital_nb_pts = points.size();
-  internal::Polygon_soup_orienter<Point_3, Polygon_3> orienter(points, polygons);
-  orienter.orient();
-  orienter.duplicate_singular_vertices();
-
-  return inital_nb_pts==points.size();
-}
-
-}// namespace CGAL
-
-#endif // CGAL_ORIENT_POLYGON_SOUP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/orient_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/orient_polyhedron_3.h
deleted file mode 100644
index 541c06a..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/orient_polyhedron_3.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Ilker O. Yaz
-
-
-#ifndef CGAL_ORIENT_POLYHEDRON_3
-#define CGAL_ORIENT_POLYHEDRON_3
-
-#include <algorithm>
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-namespace CGAL{
-
-namespace internal{
-  template <class Less_xyz>
-  struct Compare_vertex_points_xyz_3{
-    Less_xyz less;
-
-    typedef bool result_type;
-    template <class Vertex>
-    bool operator()(const Vertex& v1, const Vertex& v2) const
-    {
-      return less(v1.point(), v2.point());
-    }
-
-  };
-} // end of namespace internal
-
-/**
- * Tests whether a closed polyhedron has a positive orientation.
- * A polyhedron is considered to have positive orientation if the normal vectors
- * of the facets point outside of the polyhedron. For each facet, its normal vector
- * is considered to point on the side of the facet where the sequence of vertices of
- * the facet is seen counterclockwise.
- * @pre @a `polyhedron`.is_closed()
- * @pre @a `polyhedron` is consistently oriented
- *
- * @tparam Polyhedron a %CGAL polyhedron
- *
- * @param polyhedron a closed polyhedron to be tested
- *
- * \todo The following only handle polyhedron with one connected component
- *       the code, the sample example and the plugin must be updated.
- * @code
- * // use inside out to fix orientation
- * if(!is_oriented(polyhedron)) {
- *   polyhedron.inside_out();
- * }
- * @endcode
- */
-template<class Polyhedron>
-bool is_oriented(const Polyhedron& polyhedron)
-{
-  typedef typename Polyhedron::Traits K;
-  internal::Compare_vertex_points_xyz_3< typename K::Less_xyz_3 > less_xyz;
-
-  typename Polyhedron::Vertex_const_iterator v_min
-    = std::min_element(polyhedron.vertices_begin(), polyhedron.vertices_end(), less_xyz);
-
-  const typename K::Vector_3& normal_v_min = compute_vertex_normal<typename Polyhedron::Vertex, K>(*v_min);
-
-  return normal_v_min[0] < 0 || (
-            normal_v_min[0] == 0 && (
-              normal_v_min[1] < 0  ||
-              ( normal_v_min[1]==0  && normal_v_min[2] < 0 )
-            )
-         );
-}
-
-} // namespace CGAL
-#endif // CGAL_ORIENT_POLYHEDRON_3
diff --git a/3rdparty/CGAL-4.6/include/CGAL/pca_estimate_normals.h b/3rdparty/CGAL-4.6/include/CGAL/pca_estimate_normals.h
deleted file mode 100644
index 75ef2b5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/pca_estimate_normals.h
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Pierre Alliez and Laurent Saboret
-
-#ifndef CGAL_PCA_ESTIMATE_NORMALS_H
-#define CGAL_PCA_ESTIMATE_NORMALS_H
-
-#include <CGAL/trace.h>
-#include <CGAL/Dimension.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/linear_least_squares_fitting_3.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/Memory_sizer.h>
-
-#include <iterator>
-#include <list>
-
-namespace CGAL {
-
-
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-namespace internal {
-
-
-/// Estimates normal direction using linear least
-/// squares fitting of a plane on the K nearest neighbors.
-///
-/// \pre `k >= 2`
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree KD-tree.
-///
-/// @return Computed normal. Orientation is random.
-template < typename Kernel,
-           typename Tree
->
-typename Kernel::Vector_3
-pca_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute the normal at
-                    Tree& tree, ///< KD-tree
-                    unsigned int k) ///< number of neighbors
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3  Point;
-  typedef typename Kernel::Plane_3  Plane;
-
-  // types for K nearest neighbors search
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::iterator Search_iterator;
-
-  // Gather set of (k+1) neighboring points.
-  // Perform k+1 queries (as in point set, the query point is
-  // output first). Search may be aborted if k is greater
-  // than number of input points.
-  std::vector<Point> points; points.reserve(k+1);
-  Neighbor_search search(tree,query,k+1);
-  Search_iterator search_iterator = search.begin();
-  unsigned int i;
-  for(i=0;i<(k+1);i++)
-  {
-    if(search_iterator == search.end())
-      break; // premature ending
-    points.push_back(search_iterator->first);
-    search_iterator++;
-  }
-  CGAL_point_set_processing_precondition(points.size() >= 1);
-
-  // performs plane fitting by point-based PCA
-  Plane plane;
-  linear_least_squares_fitting_3(points.begin(),points.end(),plane,Dimension_tag<0>());
-
-  // output normal vector (already normalized by PCA)
-  return plane.orthogonal_vector();
-}
-
-} /* namespace internal */
-/// \endcond
-
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-/// \ingroup PkgPointSetProcessing
-/// Estimates normal directions of the `[first, beyond)` range of points
-/// by linear least squares fitting of a plane over the k nearest neighbors.
-/// The output normals are randomly oriented.
-///
-/// \pre `k >= 2`
-///
-/// @tparam ForwardIterator iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
-///        It can be omitted if the value type of  `ForwardIterator` is convertible to `Point_3<Kernel>`.
-/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type  `Vector_3<Kernel>`.
-/// @tparam Kernel Geometric traits class.
-///        It can be omitted and deduced automatically from the value type of `PointPMap`.
-
-// This variant requires all parameters.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap,
-          typename Kernel
->
-void
-pca_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k, ///< number of neighbors.
-  const Kernel& /*kernel*/) ///< geometric traits.
-{
-  CGAL_TRACE("Calls pca_estimate_normals()\n");
-
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-
-  // Input points types
-  typedef typename boost::property_traits<NormalPMap>::value_type Vector;
-
-  // types for K nearest neighbors search structure
-  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
-  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Tree;
-
-  // precondition: at least one element in the container.
-  // to fix: should have at least three distinct points
-  // but this is costly to check
-  CGAL_point_set_processing_precondition(first != beyond);
-
-  // precondition: at least 2 nearest neighbors
-  CGAL_point_set_processing_precondition(k >= 2);
-
-  std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("  Creates KD-tree\n");
-
-  ForwardIterator it;
-
-  // Instanciate a KD-tree search.
-  // Note: We have to convert each input iterator to Point_3.
-  std::vector<Point> kd_tree_points; 
-  for(it = first; it != beyond; it++)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    Point point = get(point_pmap, it);
-#else
-    Point point = get(point_pmap, *it);
-#endif  
-    kd_tree_points.push_back(point);
-  }
-  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
-
-  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("  Computes normals\n");
-
-  // iterate over input points, compute and output normal
-  // vectors (already normalized)
-  for(it = first; it != beyond; it++)
-  {
-    Vector normal = internal::pca_estimate_normal<Kernel,Tree>(      
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      get(point_pmap,it),
-#else
-      get(point_pmap,*it),
-#endif  
-      tree,
-      k);
-
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    put(normal_pmap, it, normal); // normal_pmap[it] = normal
-#else
-    put(normal_pmap, *it, normal); // normal_pmap[it] = normal
-#endif 
-  }
-
-  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
-  CGAL_TRACE("End of pca_estimate_normals()\n");
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the point property map.
-template <typename ForwardIterator,
-          typename PointPMap,
-          typename NormalPMap
->
-void
-pca_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k) ///< number of neighbors.
-{
-  typedef typename boost::property_traits<PointPMap>::value_type Point;
-  typedef typename Kernel_traits<Point>::Kernel Kernel;
-  pca_estimate_normals(
-    first,beyond,
-    point_pmap,
-    normal_pmap,
-    k,
-    Kernel());
-}
-/// @endcond
-
-/// @cond SKIP_IN_MANUAL
-// This variant creates a default point property map = Identity_property_map.
-template <typename ForwardIterator,
-          typename NormalPMap
->
-void
-pca_estimate_normals(
-  ForwardIterator first,  ///< iterator over the first input point.
-  ForwardIterator beyond, ///< past-the-end iterator over the input points.
-  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
-  unsigned int k) ///< number of neighbors.
-{
-  pca_estimate_normals(
-    first,beyond,
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    make_dereference_property_map(first),
-#else
-    make_identity_property_map(
-    typename std::iterator_traits<ForwardIterator>::value_type()),
-#endif
-    normal_pmap,
-    k);
-}
-/// @endcond
-
-
-} //namespace CGAL
-
-#endif // CGAL_PCA_ESTIMATE_NORMALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/perturb_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/perturb_mesh_3.h
deleted file mode 100644
index 120fce8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/perturb_mesh_3.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : perturb_mesh_3 function definition.
-//******************************************************************************
-
-#ifndef CGAL_PERTURB_MESH_3_H
-#define CGAL_PERTURB_MESH_3_H
-
-
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <CGAL/Mesh_3/sliver_criteria.h>
-#include <CGAL/Mesh_3/Sliver_perturber.h>
-#include <CGAL/Mesh_optimization_return_code.h>
-#include <CGAL/Mesh_3/parameters_defaults.h>
-#include <vector>
-#include <CGAL/use.h>
-
-namespace CGAL {
-
-BOOST_PARAMETER_FUNCTION(
-  (Mesh_optimization_return_code),
-  perturb_mesh_3,
-  parameters::tag,
-  (required (in_out(c3t3),*) (domain,*) )
-  (optional
-    (time_limit_, *, 0 )
-    (sliver_bound_, *, parameters::default_values::perturb_sliver_bound )
-    (sliver_criterion_, *, 
-       parameters::default_values::default_sliver_criterion(c3t3,sliver_bound_))
-    (perturbation_vector_, *, 
-       default_perturbation_vector(c3t3,domain,sliver_criterion_))
-  )
-)
-{
-  CGAL_USE(sliver_bound_);
-  return perturb_mesh_3_impl(c3t3, domain, time_limit_, sliver_criterion_,
-                             perturbation_vector_);
-}
-
-
-template <typename C3T3, 
-          typename MeshDomain, 
-          typename SliverCriterion>
-std::vector<typename Mesh_3::Sliver_perturber<C3T3,MeshDomain,SliverCriterion>::Perturbation*>
-default_perturbation_vector(const C3T3&,
-                            const MeshDomain&,
-                            const SliverCriterion&)
-{
-  typedef MeshDomain Md;
-  typedef SliverCriterion Sc;
-  typedef Mesh_3::Sliver_perturber<C3T3,Md,Sc>            Perturber;
-  typedef typename Perturber::Perturbation                Perturbation;
-
-  typedef Mesh_3::Sq_radius_perturbation<C3T3,Md,Sc>      Sq_radius;
-  typedef Mesh_3::Volume_perturbation<C3T3,Md,Sc>         Volume;
-  typedef Mesh_3::Dihedral_angle_perturbation<C3T3,Md,Sc> Dihedral_angle;
-  typedef Mesh_3::Li_random_perturbation<C3T3,Md,Sc>      Li_random;
-  
-  std::vector<Perturbation*> perturbation_vect;
-  perturbation_vect.push_back(new Sq_radius(40,0.05));
-  perturbation_vect.push_back(new Volume(40,0.05));
-  perturbation_vect.push_back(new Dihedral_angle(40,0.05));
-  perturbation_vect.push_back(new Li_random(100,0.15));
-
-  return perturbation_vect;
-}
-
-
-template <typename C3T3, 
-          typename MeshDomain, 
-          typename SliverCriterion,
-          typename PPerturbationVector> 
-Mesh_optimization_return_code
-perturb_mesh_3_impl(C3T3& c3t3,
-                    const MeshDomain& domain,
-                    const double time_limit,
-                    const SliverCriterion& sliver_criterion,
-                    const PPerturbationVector& perturbation_vector)
-{
-  typedef MeshDomain Md;
-  typedef SliverCriterion Sc;
-  
-  typedef Mesh_3::Sliver_perturber<C3T3,Md,Sc> Perturber;
-  
-  // Build perturber
-  Perturber perturber(c3t3, domain, sliver_criterion);
-
-  // Add perturbations
-  for(std::size_t i = 0; i < perturbation_vector.size(); ++i)
-    perturber.add_perturbation( perturbation_vector[i] );
-  
-  // Set max time
-  perturber.set_time_limit(time_limit);
- 
-  // Launch perturber
-  return perturber();
-}
-  
-  
-  
-} //namespace CGAL
-
-
-#endif // CGAL_PERTURB_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/point_generators_2.h b/3rdparty/CGAL-4.6/include/CGAL/point_generators_2.h
deleted file mode 100644
index cce5d76..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/point_generators_2.h
+++ /dev/null
@@ -1,499 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
-
-#ifndef CGAL_POINT_GENERATORS_2_H
-#define CGAL_POINT_GENERATORS_2_H 1
-#include <CGAL/generators.h>
-#include <iterator>
-#include <CGAL/number_type_basic.h>
-
-namespace CGAL {
-
-template < class P, class Creator = 
-                  Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_in_disc_2 : public Random_generator_base<P>{
-    void generate_point();
-public:
-    typedef Random_points_in_disc_2<P,Creator> This;
-    Random_points_in_disc_2( double r = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed in the open disc with radius r, i.e. |`*g'| < r .
-        // Two random numbers are needed from `rnd' for each point.
-    : Random_generator_base<P>(r, rnd) { generate_point(); }
-    This& operator++() {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_in_disc_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type T;
-    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
-    double r = this->d_range * std::sqrt( this->_rnd.get_double());
-    Creator creator;
-    this->d_item = creator( T(r * std::cos(alpha)), 
-                            T(r * std::sin(alpha)));
-}
-
-
-template < class P, class Creator = 
-                  Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT, P> >
-class Random_points_on_circle_2 : public Random_generator_base<P> {
-    void generate_point();
-public:
-    typedef Random_points_on_circle_2<P,Creator> This;
-    Random_points_on_circle_2( double r = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed on the circle with radius r, i.e. |`*g'| == r . A
-        // single random number is needed from `rnd' for each point.
-    : Random_generator_base<P>(r, rnd) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_on_circle_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type T;
-    double a = this->_rnd.get_double() * 2.0 * CGAL_PI;
-    Creator creator;
-    this->d_item = creator( T(this->d_range * std::cos(a)), 
-                            T(this->d_range * std::sin(a)));
-}
-
-
-template < class P, class Creator = 
-                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_in_square_2 : public Random_generator_base<P> {
-    void generate_point();
-public:
-    typedef Random_points_in_square_2<P,Creator> This;
-    Random_points_in_square_2( double a = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed in the half-open square with side length a,
-        // centered around the origin, i.e. \forall p = `*g': -\frac{a}{2}
-        // <= p.x() < \frac{a}{2} and -\frac{a}{2} <= p.y() < \frac{a}{2}
-        // . Two random numbers are needed from `rnd' for each point.
-    : Random_generator_base<P>( a, rnd) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_in_square_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type  T;
-    Creator creator;
-    this->d_item =
-	    creator( T(this->d_range * (2 * this->_rnd.get_double() - 1.0)),
-                     T(this->d_range * (2 * this->_rnd.get_double() - 1.0)));
-}
-
-
-template < class P, class Creator = 
-                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_on_square_2 : public Random_generator_base<P> {
-    void generate_point();
-public:
-    typedef Random_points_on_square_2<P,Creator> This;
-    Random_points_on_square_2( double a = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed on the boundary of the square with side length a,
-        // centered around the origin, i.e. \forall p = `*g': one
-        // coordinate is either \frac{a}{2} or -\frac{a}{2} and for the
-        // other coordinate c holds -\frac{a}{2} <= c < \frac{a}{2} . A
-        // single random number is needed from `rnd' for each point.
-    : Random_generator_base<P>( a, rnd)  { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_on_square_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type  T;
-    double d = this->_rnd.get_double() * 4.0;
-    int    k = int(d);
-    d = this->d_range * (2 * (d - k) - 1.0);
-    CGAL_assertion( - this->d_range <= d && d < this->d_range);
-    Creator creator;
-    switch (k) {
-    case 0:
-        this->d_item = creator(              T(d), T(-this->d_range));
-        break;
-    case 1:
-        this->d_item = creator(              T(d),  T(this->d_range));
-        break;
-    case 2:
-        this->d_item = creator( T(-this->d_range),        T(d));
-        break;
-    case 3:
-        this->d_item = creator( T( this->d_range),        T(d));
-        break;
-    }
-}
-
-
-template < class P, class Creator = 
-                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_in_iso_rectangle_2 : public Random_generator_base<P> {
-  double left, right, top, bottom;
-    void generate_point();
-public:
-    typedef Random_points_in_iso_rectangle_2<P,Creator> This;
-    Random_points_in_iso_rectangle_2( const P&p, const P& q, Random& rnd = default_random)
-      : Random_generator_base<P>( 1.0 , rnd)
-  {
-    left = (std::min)(to_double(p.x()), to_double(q.x()));
-    right = (std::max)(to_double(p.x()), to_double(q.x()));
-    top = (std::min)(to_double(p.y()), to_double(q.y()));
-    bottom = (std::max)(to_double(p.y()), to_double(q.y()));
-    generate_point(); 
-  }
-
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_in_iso_rectangle_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type  T;
-    Creator creator;
-    this->d_item =
-	    creator( T(this->_rnd.get_double(left,right)),
-                     T(this->_rnd.get_double(top,bottom)));
-}
-
-
-
-template < class P, class Creator = 
-                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_on_segment_2 : public Random_generator_base<P> {
-    P _p;
-    P _q;
-    void generate_point();
-public:
-    typedef Random_points_on_segment_2<P,Creator> This;
-    Random_points_on_segment_2( const P& p = P( -1, 0),
-                                const P& q = P(  1, 0),
-                                Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed on the segment from p to q except q, i.e. `*g' ==
-        // \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single
-        // random number is needed from `rnd' for each point.
-      : Random_generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
-                                              (std::max)( to_double(p.y()),
-                                                          to_double(q.y()))),
-                                  rnd) , _p(p), _q(q)
-    {
-        generate_point();
-    }
-    const P&  source() const { return _p; }
-    const P&  target() const { return _q; }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_on_segment_2<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type  T;
-    double la = this->_rnd.get_double();
-    double mu = 1.0 - la;
-    Creator creator;
-    this->d_item = creator(T(mu * to_double(_p.x()) + la * to_double(_q.x())),
-                           T(mu * to_double(_p.y()) + la * to_double(_q.y())));
-}
-
-template < class P >
-class Points_on_segment_2 : public Generator_base<P> {
-    P _p;
-    P _q;
-    std::size_t  d_i;
-    std::size_t  d_mx;
-    void generate_point();
-public:
-    typedef Points_on_segment_2<P> This;
-    Points_on_segment_2() {}
-    Points_on_segment_2( const P& p, const P& q,
-                         std::size_t mx, std::size_t i = 0)
-      : Generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
-                                       (std::max)( to_double(p.y()), to_double(q.y())))),
-        _p(p), _q(q), d_i(i), d_mx(mx) 
-    {
-        generate_point();
-    }
-    const P&  source() const { return _p; }
-    const P&  target() const { return _q; }
-    // Sufficient equality test.
-    bool operator==( const This& base) const { return ( d_i == base.d_i); }
-    bool operator!=( const This& base) const { return ! operator==(base); }
-    This& operator++()    {
-        d_i++;
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P >
-void
-Points_on_segment_2<P>::
-generate_point() { this->d_item = _p + (_q-_p) * static_cast<double>(d_i) / (static_cast<double>(d_mx)-1); }
-
-template <class OutputIterator, class Creator>
-OutputIterator
-points_on_square_grid_2( double a, std::size_t n, OutputIterator o,
-                         Creator creator)
-{
-    typedef typename Creator::argument_type T;
-    if  (n == 0)
-        return o;
-    int m = int(std::ceil(std::sqrt(static_cast<double>(n))));
-    double base = -a;  // Left and bottom boundary.
-    double step = (2*a)/(m - 1);
-    int j = 0;
-    double px = base;
-    double py = base;
-    *o++ = creator( T(px), T(py));
-    for (std::size_t i = 1; i < n; i++) {
-        j++;
-        if ( j == m) {
-            px = base;
-            py = py + step;
-            j = 0;
-        } else {
-            px = px + step;
-        }
-        *o++ = creator( T(px), T(py));
-    }
-    return o;
-}
-
-template <class OutputIterator>
-OutputIterator
-points_on_square_grid_2( double a, std::size_t n, OutputIterator o)
-{
-    typedef std::iterator_traits<OutputIterator> ITraits;
-    typedef typename ITraits::value_type         P;
-    return points_on_square_grid_2(a, n, o, 
-                Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
-}
-
-template <class P, class OutputIterator>
-OutputIterator
-points_on_segment_2( const P& p, const P& q, std::size_t n,
-                     OutputIterator o)
-    // creates n points regular spaced on the segment from p to q, i.e.
-    // \forall i: 0 <= i < n: o[i] := \frac{n-i-1}{n-1} p + \frac{i}{n-1
-    // } q.
-{
-    for (std::size_t i = 0; i < n; i++) {
-      *o++ = p + (q-p) * static_cast<typename Kernel_traits<P>::Kernel::FT>(static_cast<double>(i) / (static_cast<double>(n)-1));
-    }
-    return o;
-}
-
-template <class ForwardIterator, class Creator>
-void perturb_points_2( ForwardIterator first,
-                       ForwardIterator last,
-                       double xeps,
-                       double yeps,
-                       Random& rnd,
-                       Creator creator)
-    // perturbs the points in the range [`first',`last') by replacing
-    // each point with a random point from the rectangle `xeps' \times
-    // `yeps' centered around the original point. Two random numbers are
-    // needed from `rnd' for each point. Precondition:
-    // The expression `to_double((*first).x())' and `to_double((
-    // *begin).y())' must be legal.
-{
-    typedef typename Creator::argument_type T;
-    xeps *= 2.0;
-    yeps *= 2.0;
-    for ( ; first != last; ++first) {
-        double x = to_double( (*first).x());
-        double y = to_double( (*first).y());
-        x += xeps * (rnd.get_double() - 0.5);
-        y += yeps * (rnd.get_double() - 0.5);
-        *first = creator( T(x), T(y));
-    }
-}
-
-template <class ForwardIterator>
-void perturb_points_2( ForwardIterator first,
-                       ForwardIterator last,
-                       double xeps,
-                       double yeps,
-                       Random& rnd)
-{
-    typedef std::iterator_traits<ForwardIterator> ITraits;
-    typedef typename ITraits::value_type          P;
-    perturb_points_2( first, last, xeps, yeps, rnd,
-                 Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
-}
-
-template <class ForwardIterator>
-inline
-void perturb_points_2( ForwardIterator first,
-                       ForwardIterator last,
-                       double xeps,
-                       Random& rnd)
-{
-    perturb_points_2( first, last, xeps, xeps, rnd);
-}
-
-template <class ForwardIterator>
-void perturb_points_2( ForwardIterator first,
-                       ForwardIterator last,
-                       double xeps,
-                       double yeps)
-{
-    perturb_points_2( first, last, xeps, yeps, default_random);
-}
-
-template <class ForwardIterator>
-void perturb_points_2( ForwardIterator first,
-                       ForwardIterator last,
-                       double xeps)
-{
-    perturb_points_2( first, last, xeps, xeps, default_random);
-}
-template <class RandomAccessIterator, class OutputIterator, class Creator>
-OutputIterator random_collinear_points_2(
-                       RandomAccessIterator first,
-                       RandomAccessIterator last,
-                       std::size_t n,
-                       OutputIterator first2,
-                       Random& rnd,
-                       Creator creator)
-{
-    typedef typename Creator::result_type   Point;
-    typedef typename Creator::argument_type T;
-
-    std::ptrdiff_t m = last - first;
-    for ( std::size_t i = 0; i < n; i++) {
-      const Point& p = first[ rnd.uniform_int<std::ptrdiff_t>( 0, m-1)];
-        const Point& q = first[ rnd.uniform_int<std::ptrdiff_t>( 0, m-1)];
-        double la = rnd.get_double();
-        double mu = 1.0 - la;
-        *first2++ = creator(T(mu * to_double(p.x()) +
-                              la * to_double(q.x())),
-                            T(mu * to_double(p.y()) +
-                              la * to_double(q.y())));
-    }
-    return first2;
-}
-
-template <class RandomAccessIterator, class OutputIterator>
-OutputIterator random_collinear_points_2(
-                       RandomAccessIterator first,
-                       RandomAccessIterator last,
-                       std::size_t n,
-                       OutputIterator first2,
-                       Random& rnd)
-    // choose two random points from the range [`first',`last'), create a
-    // random third point on the segment connecting this two points, and
-    // write it to `first2'. Repeat this n times, thus writing n points to
-    // `first2' that are collinear with points in the range [`first',
-    // `last'). Three random numbers are needed from `rnd' for each point.
-    // Returns the value of `first2' after inserting the n points.
-    // Precondition: The expression `to_double((*first).x()
-    // )' and `to_double((*first).y())' must be legal.
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               P;
-    return random_collinear_points_2( first, last, n, first2, rnd,
-                 Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
-}
-
-template <class RandomAccessIterator, class OutputIterator>
-OutputIterator random_collinear_points_2(
-                       RandomAccessIterator first,
-                       RandomAccessIterator last,
-                       std::size_t n,
-                       OutputIterator first2)
-{
-    return  random_collinear_points_2( first, last, n, first2,
-                                       default_random);
-}
-
-
-
-} //namespace CGAL
-#endif // CGAL_POINT_GENERATORS_2_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/point_generators_3.h b/3rdparty/CGAL-4.6/include/CGAL/point_generators_3.h
deleted file mode 100644
index 7a262e5..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/point_generators_3.h
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
-
-#ifndef CGAL_POINT_GENERATORS_3_H
-#define CGAL_POINT_GENERATORS_3_H 1
-#include <CGAL/generators.h>
-#include <CGAL/point_generators_2.h>
-#include <CGAL/number_type_basic.h>
-
-namespace CGAL {
-
-template < class P, class Creator = 
-                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_in_sphere_3 : public Random_generator_base<P> {
-    void generate_point();
-public:
-    typedef Random_points_in_sphere_3<P,Creator> This;
-    Random_points_in_sphere_3( double r = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed in the open sphere with radius r, i.e. |`*g'| < r .
-        // Three random numbers are needed from `rnd' for each point
-    : Random_generator_base<P>( r, rnd) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_in_sphere_3<P,Creator>::
-generate_point() {
-  // A strip between z and z+dz has an area independant of z
-    typedef typename Creator::argument_type T;
-    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
-    double z     = 2 * this->_rnd.get_double() - 1.0;
-    double r     = std::sqrt( 1 - z * z);
-    r *= std::pow( this->_rnd.get_double() , 1.0/3.0 );  
-    Creator creator;
-    this->d_item = creator( T(this->d_range * r * std::cos(alpha)),
-                            T(this->d_range * r * std::sin(alpha)),
-                            T(this->d_range * z));
-}
-
-
-template < class P, class Creator = 
-                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_on_sphere_3 : public Random_generator_base<P> {
-    void generate_point();
-public:
-    typedef Random_points_on_sphere_3<P,Creator> This;
-    Random_points_on_sphere_3( double r = 1, Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed on the sphere with radius r, i.e. |`*g'| == r . A
-        // two random numbers are needed from `rnd' for each point.
-    : Random_generator_base<P>( r, rnd) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_on_sphere_3<P,Creator>::
-generate_point() {
-  // A strip between z and z+dz has an area independant of z
-    typedef typename Creator::argument_type T;
-    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
-    double z     = 2 * this->_rnd.get_double() - 1.0;
-    double r     = std::sqrt( 1 - z * z);
-    Creator creator;
-    this->d_item = creator( T(this->d_range * r * std::cos(alpha)),
-                            T(this->d_range * r * std::sin(alpha)),
-                            T(this->d_range * z));
-}
-
-
-template < class P, class Creator = 
-                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
-class Random_points_in_cube_3 : public Random_generator_base<P>{
-    void generate_point();
-public:
-    typedef Random_points_in_cube_3<P,Creator> This;
-    Random_points_in_cube_3( double a = 1, Random& rnd = default_random)
-    : Random_generator_base<P>( a, rnd) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P, class Creator >
-void
-Random_points_in_cube_3<P,Creator>::
-generate_point() {
-    typedef typename Creator::argument_type T;
-    Creator creator;
-    this->d_item =
-	     creator( T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)),
-                      T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)),
-                      T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)));
-}
-
-
-template <class OutputIterator, class Creator>
-OutputIterator
-points_on_cube_grid_3( double a, std::size_t n, 
-                         OutputIterator o, Creator creator)
-{
-    if  (n == 0)
-        return o;
-
-    int m = int(std::ceil(
-                  std::sqrt(std::sqrt(static_cast<double>(n)))));
-
-    while (m*m*m < int(n)) m++;
-
-    double base = -a;  // Left and bottom boundary.
-    double step = 2*a/(m-1);
-    int j = 0;
-    int k = 0;
-    double px = base;
-    double py = base;
-    double pz = base;
-    *o++ = creator( px, py, pz);
-    for (std::size_t i = 1; i < n; i++) {
-        j++;
-        if ( j == m) {
-           k++;
-           if ( k == m) {
-              py = base;
-              px = base;
-              pz = pz + step;
-              k = 0;
-           }
-           else {
-              px = base;
-              py = py + step;
-           }
-           j = 0;
-        } else {
-           px = px + step;
-        }
-        *o++ = creator( px, py, pz);
-    }
-    return o;
-}
-
-template <class OutputIterator>
-OutputIterator
-points_on_cube_grid_3( double a, std::size_t n, OutputIterator o)
-{
-    typedef std::iterator_traits<OutputIterator> ITraits;
-    typedef typename ITraits::value_type         P;
-    return points_on_square_grid_3(a, n, o, 
-                 Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P>());
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_POINT_GENERATORS_3_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/point_generators_d.h b/3rdparty/CGAL-4.6/include/CGAL/point_generators_d.h
deleted file mode 100644
index f946ea1..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/point_generators_d.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 2010  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Olivier Devillers
-
-
-
-#ifndef CGAL_POINT_GENERATORS_D_H
-#define CGAL_POINT_GENERATORS_D_H 1
-#include <CGAL/generators.h>
-#include <CGAL/number_type_basic.h>
-#include <cmath>
-
-namespace CGAL {
-
-
-template < class P >
-class Random_points_in_ball_d : public Random_generator_base<P>{
-    void generate_point();
-    int dimension;
-public:
-    typedef Random_points_in_ball_d<P> This;
- Random_points_in_ball_d( int dim, double a = 1, 
-			       Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed in the open sphere with radius r, i.e. |`*g'| < r .
-   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P >
-void
-Random_points_in_ball_d<P>::
-generate_point() {
-  double norm = 0;
-  std::vector< double > coord(dimension);
-  
-  for(int i=0; i<dimension; ++i) {
-    // normal distribution 
-    //( a product of normal distib is a normal distrib in higher dim)
-    const double pi = 3.141592653589793238462643;
-    double a=this->_rnd.get_double();
-    a = std::sqrt( -2* std::log(1-a) );
-    double b=this->_rnd.get_double();
-    b = std::cos(2*pi*b);
-    coord[i]= a*b;
-    norm += coord[i]*coord[i];
-  }
-  norm = this->d_range  * std::pow(this->_rnd.get_double(),1.0/dimension)
-           /std::sqrt(norm);
-  for(int i=0; i<dimension; ++i) coord[i] *= norm;
-  this->d_item = P(dimension, coord.begin(), coord.end() );
-}
-
-
-
-
-template < class P >
-class Random_points_on_sphere_d : public Random_generator_base<P>{
-    void generate_point();
-    int dimension;
-public:
-    typedef Random_points_on_sphere_d<P> This;
- Random_points_on_sphere_d( int dim, double a = 1, 
-			       Random& rnd = default_random)
-        // g is an input iterator creating points of type `P' uniformly
-        // distributed on the sphere with radius r, i.e. |`*g'| == r .
-   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P >
-void
-Random_points_on_sphere_d<P>::
-generate_point() {
-  double norm = 0;
-  std::vector< double > coord(dimension);
-  
-  for(int i=0; i<dimension; ++i) {
-    // normal distribution
-    const double pi = 3.141592653589793238462643;
-    double a=this->_rnd.get_double();
-    a = std::sqrt( -2* std::log(1-a) );
-    double b=this->_rnd.get_double();
-    b = std::cos(2*pi*b);
-    coord[i]= a*b;
-    norm += coord[i]*coord[i];
-  }
-  norm = this->d_range /std::sqrt(norm);
-  for(int i=0; i<dimension; ++i) coord[i] *= norm;
-  this->d_item = P(dimension, coord.begin(), coord.end() );
-}
-
-
-template < class P >
-class Random_points_in_cube_d : public Random_generator_base<P>{
-    void generate_point();
-    int dimension;
-public:
-    typedef Random_points_in_cube_d<P> This;
- Random_points_in_cube_d( int dim, double a = 1, 
-			       Random& rnd = default_random)
-   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
-    This& operator++()    {
-        generate_point();
-        return *this;
-    }
-    This  operator++(int) {
-        This tmp = *this;
-        ++(*this);
-        return tmp;
-    }
-};
-
-template < class P >
-void
-Random_points_in_cube_d<P>::
-generate_point() {
-    typedef typename Kernel_traits<P>::Kernel::RT RT;
-    std::vector<RT> coord(dimension);
-    for(int i=0; i<dimension; ++i)
-      coord[i]=RT(this->d_range * ( 2 * this->_rnd.get_double() - 1.0));
-
-    P p(dimension, coord.begin(), coord.end() );
-    this->d_item = p;
-}
-
-
-template <class OutputIterator, class Creator>
-OutputIterator
-points_on_cube_grid_d( int dimension, double a, 
-			    std::size_t n, OutputIterator o, Creator creator)
-{
-  //  typedef typename OutputIterator::container_type::value_type Point;
-
-    if  (n == 0)
-        return o;
-    
-    // take m smallest such that m^dimension > n
-    int m=int(std::floor(std::pow(static_cast<double>(n),1/(double)dimension)));
-    while(true) { 
-      int nn=1;
-      for (int i=0; i<dimension; ++i) nn*=m;
-      if (std::size_t(nn)>=n) break;
-      ++m;
-    }
-
-    double base = -a;  // Left and bottom boundary.
-    double step = 2*a/(m-1);
-    std::vector<int> indices(dimension);
-    std::vector<double> coord(dimension);
-
-    //initialize indices
-    int j;
-    for(j=0; j< dimension; ++j) { indices[j]=0; }
-
-    std::size_t i=0;
-    while (true) {
-      //compute point
-      for(j=0; j< dimension; ++j) { 
-	coord[j]=base+step*indices[j]; 
-      }
-      *o = creator(coord.begin(), coord.end() );
-      ++i;
-      if (i==n) break;
-      ++o;
-      // find index to increment
-      for ( j=0; j < dimension; ++j) if ( indices[j]<m-1 ) break;
-      // increment and reset smaller indices
-      CGAL_assertion(j<dimension);
-      indices[j]++;
-      while(j>0) { --j; indices[j]=0; } 
-    }
-    return o;
-}
-
-
-} //namespace CGAL
-
-#endif // CGAL_POINT_GENERATORS_D_H //
-// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/polygon_soup_to_polyhedron_3.h b/3rdparty/CGAL-4.6/include/CGAL/polygon_soup_to_polyhedron_3.h
deleted file mode 100644
index 5ec4f7c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/polygon_soup_to_polyhedron_3.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2009-2013 GeometryFactory (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau and Sebastien Loriot
-
-#ifndef CGAL_POLYGON_SOUP_TO_POLYHEDRON_3_H
-#define CGAL_POLYGON_SOUP_TO_POLYHEDRON_3_H
-
-#include <CGAL/IO/generic_print_polyhedron.h>
-#include <CGAL/Polyhedron_incremental_builder_3.h>
-#include <CGAL/Modifier_base.h>
-
-namespace CGAL{
-
-namespace internal{
-/**
-  * Modifier to build a polyhedron from a soup of polygons.
-  */
-template <class HDS, class Point, class Polygon>
-class Polygon_soup_to_polyhedron_3: public CGAL::Modifier_base<HDS>
-{
-  const std::vector<Point>& points;
-  const std::vector<Polygon>& polygons;
-  typedef typename HDS::Vertex::Point Point_3;
-public:
-  /**
-   * The constructor for modifier object.
-   * @param points points of the soup of polygons.
-   * @param polygons each element in the vector describes a polygon using the index of the points in the vector.
-   */
-  Polygon_soup_to_polyhedron_3(
-    const std::vector<Point>& points,
-    const std::vector<Polygon>& polygons)
-    : points(points), polygons(polygons)
-  { }
-
-  void operator()(HDS& out_hds)
-  {
-    Polyhedron_incremental_builder_3<HDS> builder(out_hds);
-
-    builder.begin_surface(points.size(), polygons.size());
-
-    for(std::size_t i = 0, end = points.size(); i < end; ++i)
-      builder.add_vertex( Point_3(points[i][0], points[i][1], points[i][2]) );
-
-    for(std::size_t i = 0, end = polygons.size(); i < end; ++i)
-    {
-      const Polygon& polygon = polygons[i];
-      const std::size_t size = polygon.size();
-
-      builder.begin_facet();
-      for(std::size_t j = 0; j < size; ++j)
-        builder.add_vertex_to_facet(polygon[j]);
-      builder.end_facet();
-    }
-    builder.end_surface();
-  }
-};
-
-} //namespace internal
-
-/**
-  * Append a soup of polygons in a Polyhedron
-  */
-template <class Polyhedron, class Point, class Polygon>
-void polygon_soup_to_polyhedron_3(Polyhedron& P,
-                                  const std::vector<Point>& points,
-                                  const std::vector<Polygon>& polygons)
-{
-  internal::Polygon_soup_to_polyhedron_3< typename Polyhedron::HalfedgeDS,
-                                          Point, Polygon > modifier(points, polygons);
-  P.delegate(modifier);
-}
-
-} //end of namespace CGAL
-
-#endif //CGAL_POLYGON_SOUP_TO_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/primes.h b/3rdparty/CGAL-4.6/include/CGAL/primes.h
deleted file mode 100644
index c79c4c0..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/primes.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Michael Hemmer    <hemmer at mpi-inf.mpg.de>
-//
-// =============================================================================
-
-#ifndef CGAL_PRIMES_H
-#define CGAL_PRIMES_H
-
-#include <CGAL/basic.h>
-
-namespace CGAL { 
-namespace internal {
-CGAL_EXPORT extern const int primes[2000];
-
-static inline 
-int get_next_lower_prime(int current_prime){
-    bool is_prime = false;
-    
-    int i;
-    CGAL_precondition_msg(current_prime != 2 ," primes definitely exhausted ");
-
-    if((current_prime <= 7) && (current_prime > 2)){
-        if(current_prime <= 5){
-            if(current_prime == 3)
-                return 2;
-            return 3;
-        }
-        return 5;
-    }                
-    for(i=current_prime-2;(i>1 && !is_prime);i=i-2){
-        int r = 1;
-        for(int j=3; (j <= i/2 && (r != 0)); j++){
-            r = i % j;
-//                std::cout<<"i " <<i<<std::endl;
-//                std::cout<<"j " <<j<<std::endl;
-//                std::cout<<"i%j " <<i%j<<std::endl;
-            if(j==i/2 && r != 0)
-                is_prime = true;
-        }
-    }
-//    CGAL_precondition_msg(is_prime," primes definitely exhausted ");
-    return i+2;
-}
-
-
-}
-}
-
-#endif // CGAL_PRIMES_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/property_map.h b/3rdparty/CGAL-4.6/include/CGAL/property_map.h
deleted file mode 100644
index a6bd747..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/property_map.h
+++ /dev/null
@@ -1,361 +0,0 @@
-// Copyright (c) 2008-2009 GeometryFactory and INRIA
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Andreas Fabri and Laurent Saboret
-
-#ifndef CGAL_POINT_SET_PROPERTY_MAP_H
-#define CGAL_POINT_SET_PROPERTY_MAP_H
-
-#include <CGAL/value_type_traits.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-  #include <boost/property_map/property_map.hpp>
-#else
-  #include <boost/property_map.hpp>
-  #include <boost/vector_property_map.hpp>
-
-#endif
-#include <boost/tuple/tuple.hpp>
-
-#include <utility> // defines std::pair
-
-namespace CGAL {
-
-/// \cond SKIP_DOXYGEN
-/// Property map that accesses a value from an iterator
-///
-/// \cgalModels `ReadablePropertyMap`
-///
-/// \tparam InputIterator an input iterator
-/// \endcond
-template<class InputIterator>
-struct Input_iterator_property_map{
-  typedef InputIterator key_type;
-  typedef typename std::iterator_traits<InputIterator>::value_type value_type;
-  typedef typename std::iterator_traits<InputIterator>::reference reference;
-  typedef boost::readable_property_map_tag category;
-
-  /// Free function to use a get the value from an iterator using Input_iterator_property_map.
-  inline friend
-  typename std::iterator_traits<InputIterator>::reference
-  get(Input_iterator_property_map<InputIterator>,InputIterator it){ return *it; }
-};
-
-/// \ingroup PkgProperty_map
-/// Property map that converts a `T*` pointer (or in general an iterator
-/// over `T` elements) to the `T` object.
-///
-/// \cgalModels `LvaluePropertyMap`
-template <typename T>
-struct Dereference_property_map
-  : public boost::put_get_helper<T&, Dereference_property_map<T> >
-{
-  typedef T* key_type; ///< typedef to 'T*'
-  typedef T value_type; ///< typedef to 'T'
-  typedef value_type& reference; ///< typedef to 'T&'
-  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
-
-  /// Access a property map element.
-  ///
-  /// @tparam Iter Type convertible to `key_type`.
-  template <class Iter>
-  reference operator[](Iter it) const { return reference(*it); }
-};
-
-/// Free function to create a `Dereference_property_map` property map.
-///
-/// \relates Dereference_property_map 
-template <class Iter> // Type convertible to `key_type`
-Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>
-make_dereference_property_map(Iter)
-{
-  // value_type_traits is a workaround as back_insert_iterator's `value_type` is void
-  return Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>();
-}
-
-/// \ingroup PkgProperty_map
-/// A `LvaluePropertyMap` property map mapping a key to itself (by reference).
-///
-/// \cgalModels `LvaluePropertyMap`
-template <typename T>
-struct Identity_property_map
-{
-  typedef T key_type; ///< typedef to `T`
-  typedef T value_type; ///< typedef to `T`
-  typedef T& reference; ///< typedef to `T&`
-  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
-  /// Access a property map element.
-  /// @param k a key which is returned as mapped value.
-  reference operator[](key_type& k) const { return k; }
-
-  typedef Identity_property_map<T> Self;
-  /// \name Put/get free functions
-  /// @{
-  friend const value_type& get(const Self&,const key_type& k) {return k;}
-  friend         reference get(const Self&,      key_type& k) {return k;}
-  friend void put(const Self&,key_type& k, const value_type& v) {k=v;}
-  /// @}
-};
-
-/// Free function to create a `Identity_property_map` property map.
-///
-/// \relates Identity_property_map 
-template <class T> // Key and value type
-Identity_property_map<T>
-  make_identity_property_map(T)
-{
-  return Identity_property_map<T>();
-}
-
-
-//=========================================================================
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-/// \ingroup PkgProperty_map
-/// Property map that accesses the first item of a `std::pair`. 
-/// \tparam Pair Instance of `std::pair`. 
-/// \cgalModels `LvaluePropertyMap`
-///
-/// \sa `CGAL::Second_of_pair_property_map<Pair>`
-template <typename Pair>
-struct First_of_pair_property_map
-  : public boost::put_get_helper<typename Pair::first_type&,
-                                 First_of_pair_property_map<Pair> >
-{
-  typedef Pair* key_type; ///< typedef to `Pair*`
-  typedef typename Pair::first_type value_type; ///< typedef to `Pair::first_type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
-
-  /// Access a property map element.
-  ///
-  /// @tparam Iter Type convertible to `key_type`.
-  template <class Iter>
-  reference operator[](Iter pair) const { return reference(pair->first); }
-};
-
-/// Free function to create a `First_of_pair_property_map` property map. 
-///
-/// \relates First_of_pair_property_map 
-template <class Iter> // Type convertible to key_type
-First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
-  make_first_of_pair_property_map(Iter)
-{
-  // value_type_traits is a workaround as back_insert_iterator's value_type is void
-  return First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
-}
-#else
-/// \ingroup PkgProperty_map
-/// Property map that accesses the first item of a `std::pair`. 
-/// \tparam Pair Instance of `std::pair`. 
-/// \cgalModels `LvaluePropertyMap`
-///
-/// \sa `CGAL::Second_of_pair_property_map<Pair>`
-template <typename Pair>
-struct First_of_pair_property_map
-{
-  typedef Pair key_type; ///< typedef to `Pair`
-  typedef typename Pair::first_type value_type; ///< typedef to `Pair::first_type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
-
-  /// Access a property map element.
-  /// @param pair a key whose first item is accessed
-  reference operator[](key_type& pair) const { return pair.first; }
-
-  typedef First_of_pair_property_map<Pair> Self;
-  /// \name Put/get free functions
-  /// @{
-  friend const value_type& get(const Self&,const key_type& k) {return k.first;}
-  friend         reference get(const Self&,      key_type& k) {return k.first;}
-  friend void put(const Self&,key_type& k, const value_type& v) {k.first=v;}
-  /// @}
-};
-
-/// Free function to create a `First_of_pair_property_map` property map. 
-///
-/// \relates First_of_pair_property_map 
-template <class Pair> // Pair type
-First_of_pair_property_map<Pair>
-  make_first_of_pair_property_map(Pair)
-{
-  return First_of_pair_property_map<Pair>();
-}
-#endif
-
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-/// \ingroup PkgProperty_map
-/// 
-/// Property map that accesses the second item of a `std::pair`. 
-/// 
-/// \tparam Pair Instance of `std::pair`. 
-/// 
-/// \cgalModels `LvaluePropertyMap`
-/// 
-/// \sa `CGAL::First_of_pair_property_map<Pair>`
-template <typename Pair>
-struct Second_of_pair_property_map
-  : public boost::put_get_helper<typename Pair::second_type&,
-                                 Second_of_pair_property_map<Pair> >
-{
-  typedef Pair* key_type; ///< typedef to `Pair*`
-  typedef typename Pair::second_type value_type; ///< typedef to `Pair::second_type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
-
-  /// Access a property map element.
-  ///
-  /// @tparam Iter Type convertible to `key_type`.
-  template <class Iter>
-  reference operator[](Iter pair) const { return reference(pair->second); }
-};
-
-/// Free function to create a Second_of_pair_property_map property map.
-///
-/// \relates Second_of_pair_property_map 
-template <class Iter> // Type convertible to key_type
-Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
-  make_second_of_pair_property_map(Iter)
-{
-  // value_type_traits is a workaround as back_insert_iterator's value_type is void
-  return Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
-}
-#else
-/// \ingroup PkgProperty_map
-/// 
-/// Property map that accesses the second item of a `std::pair`. 
-/// 
-/// \tparam Pair Instance of `std::pair`. 
-/// 
-/// \cgalModels `LvaluePropertyMap`
-/// 
-/// \sa `CGAL::First_of_pair_property_map<Pair>`
-template <typename Pair>
-struct Second_of_pair_property_map
-{
-  typedef Pair key_type; ///< typedef to `Pair`
-  typedef typename Pair::second_type value_type; ///< typedef to `Pair::first_type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
-
-  /// Access a property map element.
-  /// @param pair a key whose second item is accessed
-  reference operator[](key_type& pair) const { return pair.second; }
-
-  typedef Second_of_pair_property_map<Pair> Self;
-  /// \name Put/get free functions
-  /// @{
-  friend const value_type& get(const Self&,const key_type& k) {return k.second;}
-  friend         reference get(const Self&,      key_type& k) {return k.second;}
-  friend void put(const Self&,key_type& k, const value_type& v) {k.second=v;}
-  /// @}
-};
-
-/// Free function to create a Second_of_pair_property_map property map.
-///
-/// \relates Second_of_pair_property_map 
-template <class Pair> // Pair type
-Second_of_pair_property_map<Pair>
-  make_second_of_pair_property_map(Pair)
-{
-  return Second_of_pair_property_map<Pair>();
-}
-#endif
-
-
-
-//=========================================================================
-
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-/// \ingroup PkgProperty_map
-/// 
-/// Property map that accesses the Nth item of a `boost::tuple`. 
-/// 
-/// \tparam N Index of the item to access.
-/// \tparam Tuple Instance of `boost::tuple`.
-/// 
-/// \cgalModels `LvaluePropertyMap`
-template <int N, typename Tuple>
-struct Nth_of_tuple_property_map
-  : public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
-                                 Nth_of_tuple_property_map<N,Tuple> >
-{
-  typedef Tuple* key_type; ///< typedef to `Tuple*`
-  typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to `boost::tuples::element<N,Tuple>::%type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
-
-  /// Access a property map element.
-  ///
-  /// @tparam Iter Type convertible to `key_type`.
-  template <class Iter>
-  reference operator[](Iter tuple) const { return (reference) tuple->template get<N>(); }
-};
-
-/// Free function to create a Nth_of_tuple_property_map property map.
-///
-/// \relates Nth_of_tuple_property_map
-template <int N, class Iter> // Type convertible to key_type
-Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>
-  make_nth_of_tuple_property_map(Iter)
-{
-  // value_type_traits is a workaround as back_insert_iterator's `value_type` is void
-  return Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>();
-}
-#else
-/// \ingroup PkgProperty_map
-/// 
-/// Property map that accesses the Nth item of a `boost::tuple`. 
-/// 
-/// \tparam N Index of the item to access.
-/// \tparam Tuple Instance of `boost::tuple`.
-/// 
-/// \cgalModels `LvaluePropertyMap`
-template <int N, typename Tuple>
-struct Nth_of_tuple_property_map
-{
-  typedef Tuple key_type; ///< typedef to `Tuple`
-  typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to `boost::tuples::element<N,Tuple>::%type`
-  typedef value_type& reference; ///< typedef to `value_type&`
-  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
-  /// Access a property map element.
-  /// @param tuple a key whose Nth item is accessed
-  reference operator[](key_type& tuple) const { return tuple.template get<N>(); }
-
-  typedef Nth_of_tuple_property_map<N,Tuple> Self;
-  /// \name Put/get free functions
-  /// @{
-  friend const value_type& get(const Self&,const key_type& k) {return k.template get<N>();}
-  friend         reference get(const Self&,      key_type& k) {return k.template get<N>();}
-  friend void put(const Self&,key_type& k, const value_type& v) {k.template get<N>()=v;}
-  /// @}
-};
-
-/// Free function to create a Nth_of_tuple_property_map property map.
-///
-/// \relates Nth_of_tuple_property_map
-template <int N, class Tuple> // Tuple type
-Nth_of_tuple_property_map<N, Tuple>
-  make_nth_of_tuple_property_map(Tuple)
-{
-  return Nth_of_tuple_property_map<N, Tuple>();
-}
-#endif
-
-} // namespace CGAL
-
-#endif // CGAL_POINT_SET_PROPERTY_MAP_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/random_convex_set_2.h b/3rdparty/CGAL-4.6/include/CGAL/random_convex_set_2.h
deleted file mode 100644
index c31f9f8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/random_convex_set_2.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 1998  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-
-#ifndef CGAL_RANDOM_CONVEX_SET_2_H
-#define CGAL_RANDOM_CONVEX_SET_2_H 1
-
-#include <CGAL/basic.h>
-#include <CGAL/algorithm.h>
-#include <vector>
-#include <algorithm>
-#include <numeric>
-#include <CGAL/Random_convex_set_traits_2.h>
-#include <CGAL/centroid.h>
-
-namespace CGAL {
-
-template < class OutputIterator, class Point_generator, class Traits >
-OutputIterator
-random_convex_set_2( std::size_t n,
-                     OutputIterator o,
-                     const Point_generator& pg,
-                     Traits t)
-{
-  CGAL_precondition( n >= 3);
-
-  using std::vector;
-  using std::back_inserter;
-  using std::accumulate;
-  using std::transform;
-  using std::bind2nd;
-  using std::sort;
-  using std::partial_sum;
-  using std::less;
-  using std::max_element;
-  using CGAL::cpp11::copy_n;
-
-  typedef typename Traits::Point_2         Point_2;
-  typedef typename Traits::FT              FT;
-  typedef vector< Point_2 >                Container;
-  typedef typename Traits::Sum             Sum;
-  typedef typename Traits::Scale           Scale;
-  typedef typename Traits::Angle_less      Angle_less;
-  typedef typename Traits::Max_coordinate  Max_coordinate;
-
-  // GCC 2.8 and egcs-1.0.1 require these:
-  // (does not accept s.l. Scale()( p, 1))
-  Scale scale;
-  Max_coordinate max_coordinate;
-  Sum sum;
-
-  // build random point set:
-  Container points;
-  points.reserve( n);
-  CGAL::cpp11::copy_n( pg, n, back_inserter( points));
-
-  // compute centroid of points:
-  Point_2 centroid = CGAL::centroid( points.begin(), points.end(), t );
-
-  // translate s.t. centroid == origin:
-  transform(
-    points.begin(),
-    points.end(),
-    points.begin(),
-    bind2nd( Sum(), scale( centroid, FT( -1))));
-
-  // sort them according to their direction's angle
-  // w.r.t. the positive x-axis:
-  sort( points.begin(), points.end(), Angle_less());
-
-  // construct polygon:
-  partial_sum(
-    points.begin(), points.end(), points.begin(), Sum());
-
-  // and compute its centroid:
-  Point_2 new_centroid = CGAL::centroid( points.begin(), points.end(), t );
-
-  // translate s.t. centroids match:
-  transform(
-    points.begin(),
-    points.end(),
-    points.begin(),
-    bind2nd( Sum(), sum( centroid,
-                         scale( new_centroid, FT( -1)))));
-
-  // compute maximal coordinate:
-  FT maxcoord( max_coordinate(
-    *max_element( points.begin(),
-                  points.end(),
-                  compose2_2( less< FT >(),
-                                   Max_coordinate(),
-                                   Max_coordinate()))));
-
-  // and finally scale to fit into original grid:
-  return transform(
-    points.begin(),
-    points.end(),
-    o,
-    bind2nd( Scale(), FT( pg.range()) / maxcoord));
-
-} // random_convex_set_2( n, o, pg, t)
-
-} //namespace CGAL
-
-#endif // ! (CGAL_RANDOM_CONVEX_SET_2_H)
diff --git a/3rdparty/CGAL-4.6/include/CGAL/random_selection.h b/3rdparty/CGAL-4.6/include/CGAL/random_selection.h
deleted file mode 100644
index 0a4283b..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/random_selection.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
-
-#ifndef CGAL_RANDOM_SELECTION_H
-#define CGAL_RANDOM_SELECTION_H 1
-
-#include <cstddef>
-#include <iterator>
-#include <CGAL/Random.h>
-
-namespace CGAL {
-
-template <class RandomAccessIterator, class Size, class OutputIterator,
-          class Random>
-OutputIterator random_selection( RandomAccessIterator first,
-                                 RandomAccessIterator last,
-                                 Size n,
-                                 OutputIterator result,
-                                 Random& rnd)
-    // choose a random item from the range [`first',`last') and write it
-    // to `result', each item from the range with equal probability.
-    // Repeat this n times, thus writing n items to `result'. A single
-    // random number is needed from `rnd' for each item. Returns the
-    // value of `result' after inserting the n items.
-{
-    std::ptrdiff_t m = last - first;
-    for ( Size i = 0; i < n; i++) {
-        *result++ = first[ rnd(m)];
-    }
-    return result;
-}
-
-template <class RandomAccessIterator, class Size, class OutputIterator>
-OutputIterator random_selection( RandomAccessIterator first,
-                                 RandomAccessIterator last,
-                                 Size n,
-                                 OutputIterator result)
-{
-    return random_selection( first, last, n, result, default_random);
-}
-
-} //namespace CGAL    
-
-#endif // CGAL_RANDOM_SELECTION_H //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/refine_mesh_3.h b/3rdparty/CGAL-4.6/include/CGAL/refine_mesh_3.h
deleted file mode 100644
index 17c63c9..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/refine_mesh_3.h
+++ /dev/null
@@ -1,493 +0,0 @@
-// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Stephane Tayeb
-//
-//******************************************************************************
-// File Description : refine_mesh_3 function declaration and implementation.
-//******************************************************************************
-
-#ifndef CGAL_REFINE_MESH_3_H
-#define CGAL_REFINE_MESH_3_H
-
-#include <CGAL/config.h>
-#include <CGAL/Mesh_3/config.h>
-#include <CGAL/Mesh_3/Dump_c3t3.h>
-#include <CGAL/Mesh_3/global_parameters.h>
-#include <CGAL/Mesh_3/Mesher_3.h>
-#include <CGAL/optimize_mesh_3.h>
-
-namespace CGAL {
-
-  namespace details {
-    
-    /**
-     * @class Insert_vertex_in_c3t3
-     *
-     * A functor designed to insert unweighted points into the triangulation
-     * of a C3T3 from C3T3::Tr::Vertex , keeping the dimension and indices.
-     */
-    template <typename C3T3>
-    class Insert_vertex_in_c3t3
-    {
-    private:
-      typedef typename C3T3::Vertex_handle          Vertex_handle;
-      typedef typename C3T3::Index                  Index;
-      
-      typedef typename C3T3::Triangulation          Tr;
-      typedef typename Tr::Vertex                   Vertex;
-      typedef typename Tr::Point                    Weighted_point;
-      typedef typename Tr::Point::Weight            Weight;
-      
-    public:
-      Insert_vertex_in_c3t3(C3T3& c3t3)
-        : r_c3t3_(c3t3) {}
-      
-      void operator()(const Vertex& vertex) const
-      {
-        // Get vh properties
-        int dimension = vertex.in_dimension();
-        Weight w = (dimension < 2) ? vertex.point().weight() : 0;
-        Weighted_point point(vertex.point().point(),w);
-        Index index = vertex.index();
-
-        // Insert point and restore handle properties
-        Vertex_handle new_vertex = r_c3t3_.triangulation().insert(point);
-        r_c3t3_.set_index(new_vertex, index);
-        r_c3t3_.set_dimension(new_vertex, dimension);
-
-#if defined(CGAL_LINKED_WITH_TBB)\
- && !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE)
-        if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Parallel_tag>::value)
-        {
-          if (dimension == -1)
-            r_c3t3_.add_far_point(new_vertex);
-        }
-#endif
-#ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
-        if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Sequential_tag>::value)
-        {
-          if (dimension == -1)
-            r_c3t3_.add_far_point(new_vertex);
-        }
-#endif
-      }
-
-    private:
-      C3T3& r_c3t3_;
-    };
-  }
-  
-  
-namespace parameters {
-  
-  namespace internal {
-    
-    const int undef_parameter = -1;
-    
-    // Helpers
-    struct Optimization_options_base
-    {
-      Optimization_options_base(bool b)
-      : b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {}
-      
-      operator bool() const { return b_; }
-      
-      bool is_time_limit_set() const { return time_limit_ != undef_parameter; }
-      void set_time_limit(double d) { time_limit_ = d; }
-      double time_limit() const { return time_limit_; }
-      
-      bool is_bound_set() const { return bound_ != undef_parameter; }
-      void set_bound(double d) { bound_ = d; }
-      double bound() const { return bound_; }
-      
-    private:
-      bool b_;
-      double time_limit_;
-      double bound_;
-    };
-    
-    struct Global_optimization_options_base
-    {
-      Global_optimization_options_base()
-      : convergence_(undef_parameter), max_it_nb_(undef_parameter) {}
-      
-      bool is_convergence_set() const { return convergence_ != undef_parameter; }
-      void set_convergence(double d) { convergence_ = d; }
-      double convergence() const { return convergence_; }
-      
-      bool is_max_iteration_number_set() const { return max_it_nb_ != undef_parameter; }
-      void set_max_iteration_number(int i) { max_it_nb_ = i; }
-      int max_iteration_number() const { return max_it_nb_; }
-      
-    private:
-      double convergence_;
-      int max_it_nb_; 
-    };
-    
-    // Perturb
-    struct Perturb_options : public Optimization_options_base
-    {
-      Perturb_options(bool b) : Optimization_options_base(b) {}
-    };
-    
-    // Exude
-    struct Exude_options : public Optimization_options_base
-    {
-      Exude_options(bool b) : Optimization_options_base(b) {}
-    };
-    
-    // Odt
-    struct Odt_options : public Optimization_options_base
-    , public Global_optimization_options_base
-    {
-      Odt_options(bool b) : Optimization_options_base(b)
-      , Global_optimization_options_base() {}
-    };
-    
-    // Lloyd
-    struct Lloyd_options : public Optimization_options_base
-    , public Global_optimization_options_base
-    {
-      Lloyd_options(bool b) : Optimization_options_base(b)
-      , Global_optimization_options_base() {}
-    };
-
-    // Various Mesh_3 option
-    struct Mesh_3_options {
-      Mesh_3_options() 
-        : dump_after_init_prefix()
-        , dump_after_refine_surface_prefix()
-        , dump_after_refine_prefix()
-        , dump_after_glob_opt_prefix()
-        , dump_after_perturb_prefix()
-        , dump_after_exude_prefix()
-      {}
-
-      std::string dump_after_init_prefix;
-      std::string dump_after_refine_surface_prefix;
-      std::string dump_after_refine_prefix;
-      std::string dump_after_glob_opt_prefix;
-      std::string dump_after_perturb_prefix;
-      std::string dump_after_exude_prefix;
-
-    }; // end struct Mesh_3_options
-
-  } // end namespace internal
-#if defined(__clang__) || defined(__GNUC__) && CGAL_GCC_VERSION >= 40600
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-// remove a warning about an unused parameter "args" in the definition of
-// BOOST_PARAMETER_FUNCTION
-#endif
-  // -----------------------------------
-  // Perturb
-  // -----------------------------------
-  BOOST_PARAMETER_FUNCTION((internal::Perturb_options), perturb, tag,
-                           (optional (time_limit_, *, internal::undef_parameter )
-                                     (sliver_bound_, *, default_values::perturb_sliver_bound )))
-  { 
-    internal::Perturb_options options(true);
-    
-    if ( internal::undef_parameter != time_limit_ )
-      options.set_time_limit(time_limit_);
-    
-    options.set_bound(sliver_bound_);
-    
-    return options;
-  }
-  
-  inline internal::Perturb_options no_perturb() { return internal::Perturb_options(false); }
-  
-  // -----------------------------------
-  // Exude
-  // -----------------------------------
-  BOOST_PARAMETER_FUNCTION((internal::Exude_options), exude, tag,
-                           (optional (time_limit_, *, internal::undef_parameter )
-                                     (sliver_bound_, *, default_values::exude_sliver_bound )))
-  { 
-    internal::Exude_options options(true);
-    
-    if ( internal::undef_parameter != time_limit_ )
-      options.set_time_limit(time_limit_);
-
-    options.set_bound(sliver_bound_);
-    
-    return options;
-  }
-  
-  inline internal::Exude_options no_exude() { return internal::Exude_options(false); }
-  
-  // -----------------------------------
-  // Odt
-  // -----------------------------------
-  BOOST_PARAMETER_FUNCTION((internal::Odt_options), odt, tag,
-                           (optional (time_limit_, *, 0 )
-                                     (max_iteration_number_, *, 0 )
-                                     (convergence_, *, default_values::odt_convergence_ratio )
-                                     (freeze_bound_, *, default_values::odt_freeze_ratio )))
-  { 
-    internal::Odt_options options(true);
-
-    options.set_time_limit(time_limit_);
-    options.set_bound(freeze_bound_);
-    options.set_convergence(convergence_);
-    options.set_max_iteration_number(max_iteration_number_);
-    
-    return options;
-  }
-  
-  inline internal::Odt_options no_odt() { return internal::Odt_options(false); }
-  
-  // -----------------------------------
-  // Lloyd
-  // -----------------------------------
-  BOOST_PARAMETER_FUNCTION((internal::Lloyd_options), lloyd, tag,
-                           (optional (time_limit_, *, 0 )
-                                     (max_iteration_number_, *, 0 )
-                                     (convergence_, *, default_values::lloyd_convergence_ratio )
-                                     (freeze_bound_, *, default_values::lloyd_freeze_ratio )))
-  { 
-    internal::Lloyd_options options(true);
-    
-    options.set_time_limit(time_limit_);
-    options.set_bound(freeze_bound_);
-    options.set_convergence(convergence_);
-    options.set_max_iteration_number(max_iteration_number_);
-    
-    return options;
-  }
-  
-  inline internal::Lloyd_options no_lloyd() { return internal::Lloyd_options(false); }
-  
-  // Mesh options
-  // -----------------------------------
-
-  // Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
-  // Allows to dump the mesh at given stage of the mesh generation
-  // algorithm.
-  BOOST_PARAMETER_FUNCTION((internal::Mesh_3_options), mesh_3_options, tag,
-                           (optional 
-                            (dump_after_init_prefix_, (std::string), "" )
-                            (dump_after_refine_surface_prefix_, (std::string), "" )
-                            (dump_after_refine_prefix_, (std::string), "" )
-                            (dump_after_glob_opt_prefix_, (std::string), "" )
-                            (dump_after_perturb_prefix_, (std::string), "" )
-                            (dump_after_exude_prefix_, (std::string), "" )
-                            )
-                           )
-  { 
-    internal::Mesh_3_options options;
-
-    options.dump_after_init_prefix=dump_after_init_prefix_;
-    options.dump_after_refine_surface_prefix=dump_after_refine_surface_prefix_;
-    options.dump_after_refine_prefix=dump_after_refine_prefix_;
-    options.dump_after_glob_opt_prefix=dump_after_glob_opt_prefix_;
-    options.dump_after_perturb_prefix=dump_after_perturb_prefix_;
-    options.dump_after_exude_prefix=dump_after_exude_prefix_;
-    
-    return options;
-  }
-  
-  // Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
-  // Default Mesh_3_options: dump at every stage of the mesh generation.
-  inline internal::Mesh_3_options mesh_3_dump()
-  {
-    internal::Mesh_3_options options;
-
-    options.dump_after_init_prefix="mesh_dump_after_init";
-    options.dump_after_refine_surface_prefix="mesh_dump_after_refine_surface";
-    options.dump_after_refine_prefix="mesh_dump_after_refine";
-    options.dump_after_glob_opt_prefix="mesh_dump_after_glob_opt";
-    options.dump_after_perturb_prefix="mesh_dump_after_perturb";
-    options.dump_after_exude_prefix="mesh_dump_after_exude";
-    
-    return options;
-  }
-
-#if defined(__clang__) || defined(__GNUC__) && CGAL_GCC_VERSION >= 40600
-//#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ > 5
-#pragma GCC diagnostic pop
-#endif
-  
-  // -----------------------------------
-  // Reset_c3t3 (undocumented)
-  // -----------------------------------
-  CGAL_MESH_BOOLEAN_PARAMETER(Reset,reset_c3t3,no_reset_c3t3)
-  // CGAL_MESH_BOOLEAN_PARAMETER defined in <CGAL/Mesh_3/global_parameters.h>
-  
-// see <CGAL/config.h>
-CGAL_PRAGMA_DIAG_PUSH
-// see <CGAL/Mesh_3/config.h>
-CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
-
-  // -----------------------------------
-  // Parameters
-  // -----------------------------------
-  BOOST_PARAMETER_NAME( exude_param )
-  BOOST_PARAMETER_NAME( perturb_param )
-  BOOST_PARAMETER_NAME( odt_param )
-  BOOST_PARAMETER_NAME( lloyd_param )
-  BOOST_PARAMETER_NAME( reset_param )
-  BOOST_PARAMETER_NAME( mesh_options_param )
-
-CGAL_PRAGMA_DIAG_POP
-} // end namespace parameters
-  
-  
-BOOST_PARAMETER_FUNCTION(
-  (void),
-  refine_mesh_3,
-  parameters::tag,
-  (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced
-  (deduced 
-    (optional
-      (exude_param, (parameters::internal::Exude_options), parameters::exude())
-      (perturb_param, (parameters::internal::Perturb_options), parameters::perturb())
-      (odt_param, (parameters::internal::Odt_options), parameters::no_odt())
-      (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
-      (reset_param, (parameters::Reset), parameters::reset_c3t3())
-      (mesh_options_param, (parameters::internal::Mesh_3_options), 
-                           parameters::internal::Mesh_3_options())
-    )
-  )
-)
-{
-  return refine_mesh_3_impl(c3t3,
-                            domain,
-                            criteria,
-                            exude_param,
-                            perturb_param,
-                            odt_param,
-                            lloyd_param,
-                            reset_param(),
-                            mesh_options_param);
-}
-  
-  
-/**
- * @brief This function refines the mesh c3t3 wrt domain & criteria
- *
- * @param c3t3 the mesh to be refined.
- * @param domain the domain to be discretized
- * @param criteria the criteria
- * @param exude if \c true, an exudation step will be done at
- *   the end of the Delaunay refinement process
- * @param perturb if \c true, an explicit vertex perturbation step will be
- *   done at the end of refinement process
- * @param reset_c3t3 if \c true, a new C3T3 will be construct from param c3t3.
- *   The new c3t3 keeps only the vertices (as NON-weighted points with their
- *   dimension and Index) of the triangulation. That allows to refine a mesh
- *   which has been exuded.
- * @param mesh_3_various_options is a struct object used to pass
- * non-documented options, for debugging purpose.
- */
-template<class C3T3, class MeshDomain, class MeshCriteria>
-void refine_mesh_3_impl(C3T3& c3t3,
-                        const MeshDomain&   domain,
-                        const MeshCriteria& criteria,
-                        const parameters::internal::Exude_options& exude,
-                        const parameters::internal::Perturb_options& perturb,
-                        const parameters::internal::Odt_options& odt,
-                        const parameters::internal::Lloyd_options& lloyd,
-                        bool reset_c3t3,
-                        const parameters::internal::Mesh_3_options& 
-                          mesh_options = parameters::internal::Mesh_3_options())
-{
-  typedef Mesh_3::Mesher_3<C3T3, MeshCriteria, MeshDomain> Mesher;
-
-  // Reset c3t3 (i.e. remove weights) if needed
-  if ( reset_c3t3 )
-  {
-    C3T3 tmp_c3t3;
-    std::for_each(c3t3.triangulation().finite_vertices_begin(),
-                  c3t3.triangulation().finite_vertices_end(),
-                  details::Insert_vertex_in_c3t3<C3T3>(tmp_c3t3));
-    // TODO: corners and edges are not restored
-    c3t3.swap(tmp_c3t3);
-  }
-  
-  dump_c3t3(c3t3, mesh_options.dump_after_init_prefix);
-
-  // Build mesher and launch refinement process
-  Mesher mesher (c3t3, domain, criteria);
-  double refine_time = mesher.refine_mesh(mesh_options.dump_after_refine_surface_prefix);
-
-  dump_c3t3(c3t3, mesh_options.dump_after_refine_prefix);
-
-  // Odt
-  if ( odt )
-  {
-    odt_optimize_mesh_3(c3t3,
-                        domain,
-                        parameters::time_limit = odt.time_limit(),
-                        parameters::max_iteration_number = odt.max_iteration_number(),
-                        parameters::convergence = odt.convergence(),
-                        parameters::freeze_bound = odt.bound());
-  }
-  
-  // Lloyd
-  if ( lloyd )
-  {
-    lloyd_optimize_mesh_3(c3t3,
-                          domain,
-                          parameters::time_limit = lloyd.time_limit(),
-                          parameters::max_iteration_number = lloyd.max_iteration_number(),
-                          parameters::convergence = lloyd.convergence(),
-                          parameters::freeze_bound = lloyd.bound());
-  }
-    
-  dump_c3t3(c3t3, mesh_options.dump_after_glob_opt_prefix);
-
-  // Perturbation
-  if ( perturb )
-  {
-    double perturb_time_limit = refine_time;
-    
-    if ( perturb.is_time_limit_set() )
-      perturb_time_limit = perturb.time_limit();
-
-    perturb_mesh_3(c3t3,
-                   domain,
-                   parameters::time_limit = perturb_time_limit,
-                   parameters::sliver_bound = perturb.bound());
-  }
-  
-  dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
-
-  // Exudation
-  if ( exude )
-  {
-    double exude_time_limit = refine_time;
-    
-    if ( exude.is_time_limit_set() )
-      exude_time_limit = exude.time_limit();
-    
-    exude_mesh_3(c3t3,
-                 parameters::time_limit = exude_time_limit,
-                 parameters::sliver_bound = exude.bound());
-  }
-  
-  dump_c3t3(c3t3, mesh_options.dump_after_exude_prefix);
-
-}
-
-}  // end namespace CGAL
-
-
-#endif // CGAL_REFINE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/sorted_matrix_search.h b/3rdparty/CGAL-4.6/include/CGAL/sorted_matrix_search.h
deleted file mode 100644
index af2dc01..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/sorted_matrix_search.h
+++ /dev/null
@@ -1,415 +0,0 @@
-// Copyright (c) 1998-2003  ETH Zurich (Switzerland).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
-
-#ifndef CGAL_SORTED_MATRIX_SEARCH_H
-#define CGAL_SORTED_MATRIX_SEARCH_H 1
-
-#include <CGAL/basic.h>
-#include <CGAL/Optimisation/assertions.h>
-#include <boost/bind.hpp>
-#include <algorithm>
-#include <vector>
-#include <CGAL/Sorted_matrix_search_traits_adaptor.h>
-
-namespace CGAL {
-template < class Matrix >
-class Padded_matrix {
-public:
-  typedef typename Matrix::Value Value;
-
-  Padded_matrix( const Matrix& m) : matrix( &m) {}
-
-  Value
-  operator()( int x, int y) const
-  // padded access operator
-  {
-    return matrix->operator()(
-      x < matrix->number_of_columns() ?
-        x : matrix->number_of_columns() - 1,
-      y < matrix->number_of_rows() ?
-        y : matrix->number_of_rows() - 1);
-  }
-
-  bool
-  is_sorted()
-  // tests iff this matrix is sorted, i.e. in each column/row
-  // the elements appear in increasing order
-  // time complexity is proportional to the number of elements
-  {
-    for ( int i = 0; i < matrix->number_of_columns(); ++i)
-      for ( int j = 0; j < matrix->number_of_rows(); ++j) {
-        if ( i > 0 && (*matrix)( i - 1, j) > (*matrix)( i, j))
-          return false;
-        if ( j > 0 && (*matrix)( i, j - 1) > (*matrix)( i, j))
-          return false;
-      }
-    return true;
-  }
-
-private:
-  const Matrix* matrix;
-};
-template < class PaddedMatrix >
-class Matrix_cell {
-public:
-  typedef typename PaddedMatrix::Value Value;
-
-  Matrix_cell(PaddedMatrix m, int xpos = 0, int ypos = 0)
-  : base_matrix(m), x(xpos), y(ypos)
-  {}
-
-  Value
-  min
-  BOOST_PREVENT_MACRO_SUBSTITUTION
-  () const
-  { return base_matrix(x, y); }
-
-  Value
-  max
-  BOOST_PREVENT_MACRO_SUBSTITUTION
-  (int offset) const
-  // offset denotes the cell's dimension
-  { return base_matrix(x + offset - 1, y + offset - 1); }
-
-  int          x_min() const  { return x; }
-  int          y_min() const  { return y; }
-  PaddedMatrix matrix() const { return base_matrix; }
-
-  void
-  output(std::ostream& o, int dim) const
-  {
-    for (int i = 0; i < dim; ++i) {
-      for (int j = 0; j < dim; ++j)
-        o << base_matrix(x + i, y + j) << " ";
-      o << std::endl;
-    }
-  }
-
-  bool
-  check_for(Value v, int dim) const {
-    for (int i = 0; i < dim; ++i)
-      for (int j = 0; j < dim; ++j) {
-        if (CGAL_NTS abs(base_matrix(x + i, y + j) - v) < Value(1E-10))
-          std::cerr << "***" << base_matrix(x + i, y + j) << std::endl;
-        if (base_matrix(x + i, y + j) == v)
-          return true;
-      }
-    return false;
-  }
-
-private:
-  PaddedMatrix base_matrix;
-  int x;
-  int y;
-};
-template < class Cell >
-struct Cell_min
-: public std::unary_function< Cell, typename Cell::Value >
-{
-  typename Cell::Value
-  operator()( const Cell& c) const
-  { return (c.min)(); }
-};
-
-template < class Cell >
-struct Cell_max
-: public std::unary_function< Cell, typename Cell::Value > {
-
-  Cell_max( int offset) : ofs( offset) {}
-
-  typename Cell::Value
-  operator()( const Cell& c) const
-  { return (c.max)( ofs); }
-
-private:
-  int ofs;
-};
-
-
-template < class InputIterator, class Traits >
-typename Traits::Value
-sorted_matrix_search(InputIterator f, InputIterator l, Traits t)
-{
-  BOOST_USING_STD_MAX();
-  using std::iter_swap;
-  using std::find_if;
-  using std::remove_if;
-  using std::logical_or;
-  using std::equal_to;
-  
-  typedef typename Traits::Matrix                   Matrix;
-  typedef typename Traits::Value                    Value;
-  typedef Padded_matrix< Matrix >                   PaddedMatrix;
-  typedef Matrix_cell< PaddedMatrix >               Cell;
-  typedef std::vector< Cell >                       Cell_container;
-  typedef typename Cell_container::iterator         Cell_iterator;
-  // typedef typename Cell_container::reverse_iterator Cell_reverse_iterator;
-  
-  Cell_container active_cells;
-  
-  // set of input matrices must not be empty:
-  CGAL_optimisation_precondition( f != l);
-  
-  // for each input matrix insert a cell into active_cells:
-  InputIterator i( f);
-  int maxdim( -1);
-  while ( i != l) {
-    CGAL_optimisation_expensive_precondition(
-      PaddedMatrix( *i).is_sorted());
-    active_cells.push_back( Cell( PaddedMatrix( *i)));
-    maxdim = max BOOST_PREVENT_MACRO_SUBSTITUTION ( max BOOST_PREVENT_MACRO_SUBSTITUTION ( (*i).number_of_columns(),
-                       (*i).number_of_rows()),
-                  maxdim);
-    ++i;
-  }
-  CGAL_optimisation_precondition( maxdim > 0);
-  
-  
-  // current cell dimension:
-  int ccd( 1);
-  // set ccd to a power of two >= maxdim:
-  while ( ccd < maxdim)
-    ccd <<= 1;
-  
-  
-  
-
-  // now start the search:
-
-  for (;;) {
-  
-    if ( ccd > 1) {
-      // ------------------------------------------------------
-      // divide cells:
-      ccd >>= 1;
-    
-    
-      // reserve is required here!
-      // otherwise one of the insert operations might cause
-      // a reallocation invalidating j
-      // (should typically result in a segfault)
-      // active_cells.reserve( 4 * active_cells.size());
-  
-      for ( int j = static_cast<int>(active_cells.size()) - 1 ; j >= 0 ; -- j )
-      {
-      //for ( Cell_reverse_iterator j( active_cells.rbegin());
-      //      j != active_cells.rend();
-      //      ++j) {
-
-        Cell lRefCell = active_cells.at(j) ;
-        
-        // upper-left quarter:
-        // Cell( (*j).matrix(),
-        //       (*j).x_min(),
-        //       (*j).y_min()) remains in active_cells,
-        // since it is implicitly shortened by decreasing ccd
-    
-        // lower-left quarter:
-        active_cells.push_back(
-          Cell( lRefCell.matrix(),
-                lRefCell.x_min(),
-                lRefCell.y_min() + ccd));
-    
-        // upper-right quarter:
-        active_cells.push_back(
-          Cell( lRefCell.matrix(),
-                lRefCell.x_min() + ccd,
-                lRefCell.y_min()));
-    
-        // lower-right quarter:
-        active_cells.push_back(
-          Cell( lRefCell.matrix(),
-                lRefCell.x_min() + ccd,
-                lRefCell.y_min() + ccd));
-    
-      } // for all active cells
-    } // if ( ccd > 1)
-    else if ( active_cells.size() <= 1) //!!! maybe handle <= 3
-      break;
-      
-    // there has to be at least one cell left:
-    CGAL_optimisation_assertion( active_cells.size() > 0);
-    
-    // ------------------------------------------------------
-    // compute medians of smallest and largest elements:
-    
-    
-    int lower_median_rank = static_cast<int>((active_cells.size() - 1) >> 1);
-    int upper_median_rank = static_cast<int>(active_cells.size() >> 1);
-    
-
-    // compute upper median of cell's minima:
-    std::nth_element(active_cells.begin(),
-                active_cells.begin() + upper_median_rank,
-                active_cells.end(),
-                boost::bind(
-                  t.compare_strictly(),
-                  boost::bind(Cell_min<Cell>(), _1),
-		  boost::bind(Cell_min<Cell>(), _2)));
-    
-    Cell_iterator lower_median_cell =
-      active_cells.begin() + upper_median_rank;
-    Value lower_median = (lower_median_cell->min)();
-    
-    // compute lower median of cell's maxima:
-    std::nth_element(active_cells.begin(),
-                active_cells.begin() + lower_median_rank,
-                active_cells.end(),
-                boost::bind(
-                  t.compare_strictly(),
-                  boost::bind(Cell_max< Cell >(ccd), _1),
-                  boost::bind(Cell_max< Cell >(ccd), _2)));
-    
-    Cell_iterator upper_median_cell =
-      active_cells.begin() + lower_median_rank;
-    Value upper_median = (upper_median_cell->max)(ccd);
-    
-    // restore lower_median_cell, if it has been displaced
-    // by the second search
-    if ((lower_median_cell->min)() != lower_median)
-      lower_median_cell =
-        find_if(active_cells.begin(),
-                active_cells.end(),
-                boost::bind(
-		  equal_to< Value >(), 
-		  lower_median,
-		  boost::bind(Cell_min< Cell >(), _1)));
-    CGAL_optimisation_assertion(lower_median_cell != active_cells.end());
-    // ------------------------------------------------------
-    // test feasibility of medians and remove cells accordingly:
-    Cell_iterator new_end;
-    
-    
-    if ( t.is_feasible( lower_median))
-      if ( t.is_feasible( upper_median)) {
-        // lower_median and upper_median are feasible
-    
-        // discard cells with all entries greater than
-        // min( lower_median, upper_median) except for
-        // one cell defining this minimum
-    
-        Cell_iterator min_median_cell;
-        Value min_median;
-        if ( lower_median < upper_median) {
-          min_median_cell = lower_median_cell;
-          min_median = lower_median;
-        }
-        else {
-          min_median_cell = upper_median_cell;
-          min_median = upper_median;
-        }
-    
-        // save min_median_cell:
-        iter_swap( min_median_cell, active_cells.begin());
-    
-        new_end =
-          remove_if(
-            active_cells.begin() + 1,
-            active_cells.end(),
-            boost::bind(
-              t.compare_non_strictly(), 
-	      min_median,
-              boost::bind(Cell_min< Cell >(), _1)));
-    
-      } // lower_median and upper_median are feasible
-      else { // lower_median is feasible, but upper_median is not
-    
-        // discard cells with all entries greater than
-        // lower_median or all entries smaller than
-        // upper_median except for the lower median cell
-    
-        // save lower_median_cell:
-        iter_swap( lower_median_cell, active_cells.begin());
-    
-        new_end =
-          remove_if(
-            active_cells.begin() + 1,
-            active_cells.end(),
-            boost::bind(
-              logical_or< bool >(),
-	      boost::bind(
-	        t.compare_non_strictly(),
-		lower_median,
-                boost::bind(Cell_min< Cell >(), _1)),
-	      boost::bind(
-                  t.compare_non_strictly(),
-                  boost::bind(Cell_max< Cell >( ccd), _1),
-		  upper_median)));
-    
-      } // lower_median is feasible, but upper_median is not
-    else
-      if ( t.is_feasible( upper_median)) {
-        // upper_median is feasible, but lower_median is not
-    
-        // discard cells with all entries greater than
-        // upper_median or all entries smaller than
-        // lower_median except for the upper median cell
-    
-        // save upper_median_cell:
-        iter_swap( upper_median_cell, active_cells.begin());
-    
-        new_end =
-          remove_if(
-            active_cells.begin() + 1,
-            active_cells.end(),
-	    boost::bind(
-              logical_or< bool >(),
-	      boost::bind(
-		t.compare_non_strictly(),
-		upper_median,
-                boost::bind(Cell_min< Cell >(), _1)),
-	      boost::bind(
-                t.compare_non_strictly(),
-		boost::bind(Cell_max< Cell >( ccd), _1),
-		lower_median)));
-    
-      } // upper_median is feasible, but lower_median is not
-      else { // both upper_median and lower_median are infeasible
-    
-        // discard cells with all entries smaller than
-        // max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median)
-    
-        new_end =
-          remove_if(
-            active_cells.begin(),
-            active_cells.end(),
-            boost::bind(
-              t.compare_non_strictly(),
-	      boost::bind(Cell_max< Cell >( ccd), _1),
-	      max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median)));
-    
-      } // both upper_median and lower_median are infeasible
-    
-      active_cells.erase( new_end, active_cells.end());
-  } // for (;;)
-
-  // there must be only one cell left:
-  CGAL_optimisation_assertion( active_cells.size() == 1);
-  CGAL_optimisation_assertion( ccd == 1);
-
-  return ((*active_cells.begin()).min)();
-}
-
-} //namespace CGAL
-
-#endif // ! (CGAL_SORTED_MATRIX_SEARCH_H)
-// ----------------------------------------------------------------------------
-// ** EOF
-// ----------------------------------------------------------------------------
diff --git a/3rdparty/CGAL-4.6/include/CGAL/spatial_sort.h b/3rdparty/CGAL-4.6/include/CGAL/spatial_sort.h
deleted file mode 100644
index 45c6635..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/spatial_sort.h
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright (c) 2007-2011  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Christophe Delage
-//               : Olivier Devillers
-
-#ifndef CGAL_SPATIAL_SORT_H
-#define CGAL_SPATIAL_SORT_H
-
-#include <CGAL/basic.h>
-
-#include <CGAL/hilbert_sort.h>
-#include <CGAL/Multiscale_sort.h>
-
-#include <boost/random/random_number_generator.hpp>
-#include <CGAL/algorithm.h>
-#include <boost/random.hpp>
-#include <boost/random/linear_congruential.hpp>
-
-#include <algorithm>
-
-namespace CGAL {
-
-
-namespace internal {
-
-    template <class RandomAccessIterator, class Policy, class Kernel>
-    void spatial_sort (
-                       RandomAccessIterator begin, RandomAccessIterator end,
-                       const Kernel &k, 
-		       Policy /*policy*/,
-		       typename Kernel::Point_2 *,
-		       std::ptrdiff_t threshold_hilbert,
-		       std::ptrdiff_t threshold_multiscale,
-		       double ratio)
-    {
-      typedef Hilbert_sort_2<Kernel, Policy> Sort;
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end,rng);
-#else
-        std::random_shuffle(begin,end,rng);
-#endif
-
-	if (threshold_hilbert==0) threshold_hilbert=4;
-	if (threshold_multiscale==0) threshold_multiscale=16;
-	if (ratio==0.0) ratio=0.25;
-
-        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
-				threshold_multiscale, ratio)) (begin, end);
-    }
-
-    template <class RandomAccessIterator, class Policy, class Kernel>
-    void spatial_sort (
-                       RandomAccessIterator begin, RandomAccessIterator end,
-                       const Kernel &k, 
-		       Policy /*policy*/,
-		       typename Kernel::Point_3 *,
-		       std::ptrdiff_t threshold_hilbert,
-		       std::ptrdiff_t threshold_multiscale,
-		       double ratio)
-    {
-      typedef Hilbert_sort_3<Kernel, Policy> Sort;
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end, rng);
-#else
-        std::random_shuffle(begin,end, rng);
-#endif
-
-	if (threshold_hilbert==0) threshold_hilbert=8;
-	if (threshold_multiscale==0) threshold_multiscale=64;
-	if (ratio==0.0) ratio=0.125;
-
-        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
-				threshold_multiscale, ratio)) (begin, end);
-    }
-
-    template <class RandomAccessIterator, class Policy, class Kernel>
-    void spatial_sort (
-		       RandomAccessIterator begin, RandomAccessIterator end,
-                       const Kernel &k, 
-		       Policy /*policy*/,
-		       typename Kernel::Point_d *,
-		       std::ptrdiff_t threshold_hilbert,
-		       std::ptrdiff_t threshold_multiscale,
-		       double ratio)
-    {
-      typedef Hilbert_sort_d<Kernel, Policy> Sort;
-        boost::rand48 random;
-        boost::random_number_generator<boost::rand48> rng(random);
-#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
-        CGAL::random_shuffle(begin,end, rng);
-#else
-        std::random_shuffle(begin,end, rng);
-#endif	
-
-	if (threshold_hilbert==0) threshold_hilbert=10;
-	if (threshold_multiscale==0) threshold_multiscale=500;
-	if (ratio==0.0) ratio=0.05;
-
-        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
-				threshold_multiscale, ratio)) (begin, end);
-    }
-
-}
-
-
-template <class RandomAccessIterator, class Policy, class Kernel>
-void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
-                   const Kernel &k,
-		   Policy policy,
-		   std::ptrdiff_t threshold_hilbert=0,
-		   std::ptrdiff_t threshold_multiscale=0,
-		   double ratio=0.0)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-
-    internal::spatial_sort(begin, end, k, policy, static_cast<value_type *> (0),
-			   threshold_hilbert,threshold_multiscale,ratio);
-}
-
-template <class RandomAccessIterator>
-void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   Hilbert_sort_median_policy policy,
-		   std::ptrdiff_t threshold_hilbert=0,
-		   std::ptrdiff_t threshold_multiscale=0,
-		   double ratio=0.0)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-    typedef CGAL::Kernel_traits<value_type>            KTraits;
-    typedef typename KTraits::Kernel                   Kernel;
-
-    spatial_sort (begin, end, Kernel(), policy,
-		  threshold_hilbert,threshold_multiscale,ratio);
-}
-template <class RandomAccessIterator>
-void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   Hilbert_sort_middle_policy policy,
-		   std::ptrdiff_t threshold_hilbert=0,
-		   std::ptrdiff_t threshold_multiscale=0,
-		   double ratio=0.0)
-{
-    typedef std::iterator_traits<RandomAccessIterator> ITraits;
-    typedef typename ITraits::value_type               value_type;
-    typedef CGAL::Kernel_traits<value_type>            KTraits;
-    typedef typename KTraits::Kernel                   Kernel;
-
-    spatial_sort (begin, end, Kernel(), policy,
-		  threshold_hilbert,threshold_multiscale,ratio);
-}
-
-
-template <class RandomAccessIterator, class Kernel>
-void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
-                   const Kernel &k,
-		   std::ptrdiff_t threshold_hilbert=0,
-		   std::ptrdiff_t threshold_multiscale=0,
-		   double ratio=0.0)
-{
-    spatial_sort (begin, end, k,
-		  Hilbert_sort_median_policy(),
-		  threshold_hilbert,threshold_multiscale,ratio);
-}
-
-template <class RandomAccessIterator>
-void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
-		   std::ptrdiff_t threshold_hilbert=0,
-		   std::ptrdiff_t threshold_multiscale=0,
-		   double ratio=0.0)
-{
-    spatial_sort (begin, end,
-		  Hilbert_sort_median_policy(),
-		  threshold_hilbert,threshold_multiscale,ratio);
-}
-
-} // namespace CGAL
-
-#endif//CGAL_SPATIAL_SORT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/sse2.h b/3rdparty/CGAL-4.6/include/CGAL/sse2.h
deleted file mode 100644
index 37208ad..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/sse2.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 1999,2007  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  Andreas Fabri
-
-#ifndef CGAL_SSE2_H
-#define CGAL_SSE2_H
-
-#include <emmintrin.h>
-
-#if defined ( _WIN32 )
-#define CGAL_ALIGN_16  __declspec(align(16))
-#elif defined( __GNU__ ) || defined(__MINGW64__)
-#define  CGAL_ALIGN_16 __attribute__((aligned(16))) 
-#endif
-
-#endif // CGAL_SSE2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/surface_reconstruction_points_assertions.h b/3rdparty/CGAL-4.6/include/CGAL/surface_reconstruction_points_assertions.h
deleted file mode 100644
index f34cfd8..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/surface_reconstruction_points_assertions.h
+++ /dev/null
@@ -1,368 +0,0 @@
-// Copyright (c) 2007  INRIA (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman, Sven Schoenherr, Laurent Saboret
-//
-// Generated from script create_assertions.sh
-
-/// \cond SKIP_IN_MANUAL
-
-/// @file surface_reconstruction_points_assertions.h
-/// Define checking macros for the Surface_reconstruction_points_3 package
-
-// Note that this header file is intentionnaly not protected with a
-// macro (as <cassert>). Calling it a second time with another value
-// for NDEBUG for example must make a difference.
-
-#include <CGAL/assertions.h>
-
-// macro definitions
-// =================
-// assertions
-// ----------
-
-#undef CGAL_surface_reconstruction_points_assertion
-#undef CGAL_surface_reconstruction_points_assertion_msg
-#undef CGAL_surface_reconstruction_points_assertion_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_assertion(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_assertion_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_assertion_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_assertions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
-
-
-#undef CGAL_surface_reconstruction_points_exactness_assertion
-#undef CGAL_surface_reconstruction_points_exactness_assertion_msg
-#undef CGAL_surface_reconstruction_points_exactness_assertion_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_exactness_assertion(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_assertion_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_exactness_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_exactness_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_exactness_assertion_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_exactness_assertions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_assertion
-#undef CGAL_surface_reconstruction_points_expensive_assertion_msg
-#undef CGAL_surface_reconstruction_points_expensive_assertion_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) \
-  || defined(CGAL_NO_ASSERTIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_assertion(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_assertion_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_assertion_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_assertions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion
-#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg
-#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_exactness_assertions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
-
-
-// preconditions
-// -------------
-
-#undef CGAL_surface_reconstruction_points_precondition
-#undef CGAL_surface_reconstruction_points_precondition_msg
-#undef CGAL_surface_reconstruction_points_precondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_precondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_precondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_precondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_preconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_exactness_precondition
-#undef CGAL_surface_reconstruction_points_exactness_precondition_msg
-#undef CGAL_surface_reconstruction_points_exactness_precondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_exactness_precondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_precondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_exactness_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_exactness_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_exactness_precondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_exactness_preconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_precondition
-#undef CGAL_surface_reconstruction_points_expensive_precondition_msg
-#undef CGAL_surface_reconstruction_points_expensive_precondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_precondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_precondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_precondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_preconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition
-#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg
-#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_exactness_preconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
-
-
-// postconditions
-// --------------
-
-#undef CGAL_surface_reconstruction_points_postcondition
-#undef CGAL_surface_reconstruction_points_postcondition_msg
-#undef CGAL_surface_reconstruction_points_postcondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_postcondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_postcondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_postconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_exactness_postcondition
-#undef CGAL_surface_reconstruction_points_exactness_postcondition_msg
-#undef CGAL_surface_reconstruction_points_exactness_postcondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_exactness_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_postcondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_exactness_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_exactness_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_exactness_postcondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_exactness_postconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_postcondition
-#undef CGAL_surface_reconstruction_points_expensive_postcondition_msg
-#undef CGAL_surface_reconstruction_points_expensive_postcondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_postcondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_postcondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_postconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition
-#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg
-#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_exactness_postconditions 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
-
-
-// warnings
-// --------
-
-#undef CGAL_surface_reconstruction_points_warning
-#undef CGAL_surface_reconstruction_points_warning_msg
-#undef CGAL_surface_reconstruction_points_warning_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_warning(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_warning_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_warning_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_warnings 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
-
-
-#undef CGAL_surface_reconstruction_points_exactness_warning
-#undef CGAL_surface_reconstruction_points_exactness_warning_msg
-#undef CGAL_surface_reconstruction_points_exactness_warning_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_exactness_warning(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_exactness_warning_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_exactness_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_exactness_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_exactness_warning_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_exactness_warnings 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_warning
-#undef CGAL_surface_reconstruction_points_expensive_warning_msg
-#undef CGAL_surface_reconstruction_points_expensive_warning_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_warning(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_warning_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_warning_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_warnings 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
-
-
-#undef CGAL_surface_reconstruction_points_expensive_exactness_warning
-#undef CGAL_surface_reconstruction_points_expensive_exactness_warning_msg
-#undef CGAL_surface_reconstruction_points_expensive_exactness_warning_code
-
-#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
-  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
-  || defined(NDEBUG)
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning(EX) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_code(CODE)
-#else
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning(EX) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_msg(EX,MSG) \
-   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_code(CODE) CODE
-#  define CGAL_surface_reconstruction_points_expensive_exactness_warnings 1
-#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
-
-/// \endcond
diff --git a/3rdparty/CGAL-4.6/include/CGAL/transforming_pair_iterator.h b/3rdparty/CGAL-4.6/include/CGAL/transforming_pair_iterator.h
deleted file mode 100644
index db4bf5c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/transforming_pair_iterator.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2014
-// INRIA Saclay-Ile de France (France)
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Marc Glisse
-
-#ifndef CGAL_TRANSFORMING_PAIR_ITERATOR_H
-#define CGAL_TRANSFORMING_PAIR_ITERATOR_H
-// Should be a combination of transform_iterator and zip_iterator,
-// but boost's iterator_category games are a pain.
-
-#include <CGAL/transforming_iterator.h>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/static_assert.hpp>
-
-
-
-namespace CGAL {
-namespace internal {
-template <class Cat1, class Cat2, bool=boost::is_convertible<Cat1,Cat2>::value>
-struct Min_category {
-	BOOST_STATIC_ASSERT((boost::is_convertible<Cat2,Cat1>::value));
-	typedef Cat1 type;
-};
-
-template <class Cat1, class Cat2>
-struct Min_category<Cat1,Cat2,true> {
-	typedef Cat2 type;
-};
-
-
-template <typename Derived, typename F, typename It1, typename It2, typename Ref, typename Val>
-class transforming_pair_iterator_helper
-{
-	typedef typename Min_category<
-		typename std::iterator_traits<It1>::iterator_category,
-		typename std::iterator_traits<It1>::iterator_category>
-			::type iterator_category;
-
-	typedef typename Default::Get<Ref,
-#ifdef CGAL_CXX11
-		decltype(std::declval<F>()(std::declval<typename std::iterator_traits<It1>::reference>(),std::declval<typename std::iterator_traits<It2>::reference>()))
-#else
-		typename boost::result_of<F(typename std::iterator_traits<It1>::value_type,typename std::iterator_traits<It2>::value_type)>::type
-	// should be reference instead of value_type
-#endif
-			>::type reference;
-
-	typedef typename Default::Get<Val,typename boost::remove_cv<typename boost::remove_reference<reference>::type>::type>::type value_type;
-
-	public:
-	typedef boost::iterator_facade<
-		Derived,
-		value_type,
-		iterator_category,
-		reference
-	// expect ptrdiff_t is good enough for difference
-			> type;
-};
-}
-
-template <typename F, typename It1, typename It2, typename Ref=Default, typename Val=Default>
-class transforming_pair_iterator
-: public internal::transforming_pair_iterator_helper<transforming_pair_iterator<F,It1,It2,Ref,Val>,F,It1,It2,Ref,Val>::type,
-private internal::Functor_as_base<F>
-{
-	It1 iter1; It2 iter2;
-	friend class boost::iterator_core_access;
-	typedef typename internal::transforming_pair_iterator_helper<transforming_pair_iterator,F,It1,It2,Ref,Val>::type Base;
-	typedef internal::Functor_as_base<F> Functor_base;
-	typename Base::reference dereference()const{
-		return functor()(*iter1,*iter2);
-	}
-	bool equal(transforming_pair_iterator const&i)const{
-		bool b=(iter1==i.iter1);
-		CGAL_assertion(b==(iter2==i.iter2));
-		//FIXME: or do we want only one driving iterator
-		return b;
-	}
-	void increment(){ ++iter1; ++iter2; }
-	void decrement(){ --iter1; --iter2; }
-	void advance(std::ptrdiff_t n){
-		std::advance(iter1,n);
-		std::advance(iter2,n);
-	}
-	std::ptrdiff_t distance_to(transforming_pair_iterator const&i)const{
-		std::ptrdiff_t dist=std::distance(iter1,i.iter1);
-		CGAL_assertion(dist==std::distance(iter2,i.iter2));
-		return dist;
-	}
-	public:
-	using Functor_base::functor;
-	transforming_pair_iterator(){}
-	explicit transforming_pair_iterator(It1 i1,It2 i2,F const& f=F())
-		:Functor_base(f),iter1(i1),iter2(i2){}
-	template<class F2,class J1,class J2,class R2,class V2>
-	transforming_pair_iterator(
-		transforming_pair_iterator<F2,J1,J2,R2,V2> const&i,
-		typename boost::enable_if_convertible<J1, It1>::type* = 0,
-		typename boost::enable_if_convertible<J2, It2>::type* = 0,
-		typename boost::enable_if_convertible<F2, F>::type* = 0)
-		: Functor_base(i.functor()),iter1(i.iter1),iter2(i.iter2) {}
-
-};
-
-template <typename F, typename It1, typename It2> inline
-transforming_pair_iterator<F,It1,It2> make_transforming_pair_iterator(It1 i1, It2 i2, F const&f=F()) {
-	return transforming_pair_iterator<F,It1,It2>(i1,i2,f);
-}
-
-}
-
-#endif // CGAL_TRANSFORMING_PAIR_ITERATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/triangulate_mixed_complex_3.h b/3rdparty/CGAL-4.6/include/CGAL/triangulate_mixed_complex_3.h
deleted file mode 100644
index 2b9cb20..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/triangulate_mixed_complex_3.h
+++ /dev/null
@@ -1,1324 +0,0 @@
-// Copyright (c) 2005 Rijksuniversiteit Groningen (Netherlands)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Nico Kruithof <Nico at cs.rug.nl>
-
-#ifndef CGAL_TRIANGULATE_MIXED_COMPLEX_3
-#define CGAL_TRIANGULATE_MIXED_COMPLEX_3
-
-// #include <CGAL/Unique_hash_map.h>
-#include <CGAL/Compute_anchor_3.h>
-
-#include <CGAL/Triangulation_data_structure_3.h>
-#include <CGAL/Triangulated_mixed_complex_observer_3.h>
-#include <CGAL/Triangulation_incremental_builder_3.h>
-
-#include <CGAL/Skin_surface_base_3.h>
-#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
-
-// NGHK: move this one to SkinSurfaceTraits
-#include <CGAL/Compute_anchor_3.h>
-
-#include <CGAL/Union_find.h>
-
-namespace CGAL {
-
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3 =
-  Triangulated_mixed_complex_observer_3<TriangulatedMixedComplex_3,
-					RegularTriangulation_3> >
-class Mixed_complex_triangulator_3 {
-public:
-  typedef typename RegularTriangulation_3::Geom_traits
-  Regular_traits;
-  typedef typename TriangulatedMixedComplex_3::Geom_traits
-  Triangulated_mixed_complex_traits;
-
-  typedef RegularTriangulation_3                   Regular;
-  typedef TriangulatedMixedComplex_3               Triangulated_mixed_complex;
-  typedef TriangulatedMixedComplexObserver_3
-  Triangulated_mixed_complex_observer;
-private:
-  typedef typename Regular::Vertex_handle            Rt_Vertex_handle;
-  typedef typename Regular::Edge                     Rt_Edge;
-  typedef typename Regular::Facet                    Rt_Facet;
-  typedef typename Regular::Cell_handle              Rt_Cell_handle;
-	
-  typedef typename Regular::Finite_vertices_iterator Rt_Finite_vertices_iterator;
-  typedef typename Regular::Finite_edges_iterator    Rt_Finite_edges_iterator;
-  typedef typename Regular::Finite_facets_iterator   Rt_Finite_facets_iterator;
-  typedef typename Regular::All_cells_iterator       Rt_All_cells_iterator;
-  typedef typename Regular::Finite_cells_iterator    Rt_Finite_cells_iterator;
-	
-  typedef typename Regular::Cell_circulator          Rt_Cell_circulator;
-
-  typedef Triangulation_simplex_3<Regular>           Rt_Simplex;
-  typedef typename Regular::Bare_point               Rt_Point;
-  typedef typename Regular_traits::FT                Rt_FT;
-  typedef typename Regular::Weighted_point           Rt_Weighted_point;
-
-  typedef typename Triangulated_mixed_complex::Vertex_handle    Tmc_Vertex_handle;
-  typedef typename Triangulated_mixed_complex::Edge             Tmc_Edge;
-  typedef typename Triangulated_mixed_complex::Facet            Tmc_Facet;
-  typedef typename Triangulated_mixed_complex::Cell_handle      Tmc_Cell_handle;
-
-  typedef typename Triangulated_mixed_complex::Finite_vertices_iterator
-  Tmc_Finite_vertices_iterator;
-  typedef typename Triangulated_mixed_complex::Finite_edges_iterator
-  Tmc_Finite_edges_iterator;
-  typedef typename Triangulated_mixed_complex::Finite_facets_iterator
-  Tmc_Finite_facets_iterator;
-  typedef typename Triangulated_mixed_complex::All_cells_iterator
-  Tmc_All_cells_iterator;
-  typedef typename Triangulated_mixed_complex::Finite_cells_iterator
-  Tmc_Finite_cells_iterator;
-  typedef typename Triangulated_mixed_complex::Cell_circulator
-  Tmc_Cell_circulator;
-	
-  typedef typename TriangulatedMixedComplex_3::Geom_traits  Tmc_traits;
-  typedef typename Tmc_traits::Point_3                      Tmc_Point;
-  typedef typename Tmc_traits::RT                           Tmc_RT;
-
-  typedef Triangulation_incremental_builder_3<Triangulated_mixed_complex>
-  Triangulation_incremental_builder;
-
-  typedef Compute_anchor_3<Regular>                       Compute_anchor;
-  typedef std::pair<Rt_Simplex,Rt_Simplex>                Symb_anchor;
-
-  // You might get type differences here:
-  // The map that maps a Rt_Simplex to an iterator of the map 
-  // (used as union_find_structure)
-//  struct Anchor_map_iterator_tmp;
-//  typedef std::map<Rt_Simplex, Anchor_map_iterator_tmp>     Anchor_map;
-//  struct Anchor_map_iterator_tmp : Anchor_map::iterator {
-//    Anchor_map_iterator_tmp() 
-//      : Anchor_map::iterator() {}
-//    Anchor_map_iterator_tmp(typename Anchor_map::iterator const &it) 
-//      : Anchor_map::iterator(it) {}
-//  };
-//  typedef typename Anchor_map::iterator                     Anchor_map_iterator;
-
-  typedef Union_find<Rt_Simplex>                            Union_find_anchor;
-  typedef std::map<Rt_Simplex,
-                   typename Union_find_anchor::handle> Simplex_UF_map;
-
-
-public:
-  Mixed_complex_triangulator_3(Regular &regular,
-			       Rt_FT const &shrink,
-			       Triangulated_mixed_complex
-			       &triangulated_mixed_complex,
-			       Triangulated_mixed_complex_observer &observer,
-			       bool verbose)
-    : regular(regular),
-      shrink(shrink),
-      _tmc(triangulated_mixed_complex),
-      observer(observer),
-      triangulation_incr_builder(triangulated_mixed_complex), 
-      construct_anchor_point_3_obj(r2t_converter_object(shrink)),
-      compute_anchor_obj(regular),
-      verbose(verbose)  {
-    
-    build();
-  }
-
-private:
-  void build() {
-
-    triangulation_incr_builder.begin_triangulation(3);
-
-    if (verbose) std::cout << "Construct vertices" << std::endl;
-    construct_vertices();
-
-    // mixed cells corresponding to regular vertices
-    if (verbose) std::cout << "Construct 0 cells" << std::endl;
-    for (Rt_Finite_vertices_iterator vit = regular.finite_vertices_begin();
-	 vit != regular.finite_vertices_end(); vit ++) {
-      construct_0_cell(vit);
-    }
-
-    // mixed cells corresponding to regular edges
-    if (verbose) std::cout << "Construct 1 cells" << std::endl;
-    for (Rt_Finite_edges_iterator eit = regular.finite_edges_begin();
-	 eit != regular.finite_edges_end(); eit ++) {
-      construct_1_cell(eit);
-    }
-
-    // mixed cells corresponding to regular facets
-    if (verbose) std::cout << "Construct 2 cells" << std::endl;
-    for (Rt_Finite_facets_iterator fit = regular.finite_facets_begin();
-	 fit != regular.finite_facets_end(); fit ++) {
-      construct_2_cell(fit);
-    }
-    
-    // mixed cells corresponding to regular cells
-    if (verbose) std::cout << "Construct 3 cells" << std::endl;
-    for (Rt_Finite_cells_iterator cit = regular.finite_cells_begin();
-	 cit != regular.finite_cells_end();
-	 cit++) {
-      construct_3_cell(cit);
-    }
-
-    triangulation_incr_builder.end_triangulation();
-    
-    anchors.clear();
-
-  }
-
-  Tmc_Vertex_handle add_vertex(Symb_anchor const &anchor); 
-  Tmc_Cell_handle add_cell(Tmc_Vertex_handle vh[], int orient, Rt_Simplex s);
-	
-  Tmc_Vertex_handle get_vertex(Rt_Simplex &sDel, Rt_Simplex &sVor);
-
-
-  void construct_anchor_del(Rt_Simplex const &sDel);
-  void construct_anchor_vor(Rt_Simplex const &sVor);
-  void construct_anchors();
-  Rt_Simplex &get_anchor_del(Rt_Simplex const &sDel) {
-    typename Simplex_UF_map::iterator it = anchor_del_map.find(sDel);
-    CGAL_assertion(it != anchor_del_map.end());
-    return *anchor_del_uf.find(it->second);
-  }
-  Rt_Simplex &get_anchor_vor(Rt_Simplex const &sVor) {
-    typename Simplex_UF_map::iterator it = anchor_vor_map.find(sVor);
-    CGAL_assertion(it != anchor_vor_map.end());
-    return *anchor_vor_uf.find(it->second);
-  }  
-//  Anchor_map_iterator find_anchor(Anchor_map &a_map, Rt_Simplex const&s) {
-//    return find_anchor(a_map, a_map.find(s));
-//  }
-//  Anchor_map_iterator find_anchor(Anchor_map &a_map,
-//				  Anchor_map_iterator const&it) {
-//    CGAL_assertion(it != a_map.end());
-//    Anchor_map_iterator it2 = it->second;
-//    while (it2 != it2->second) {
-//      it->second = it2->second;
-//      // NGHK: changed the type for the map-iterator-hack
-//      it2->second = it;
-//      it2 = it->second;
-//    }
-//    return it2;
-//  }
-  void construct_vertices();
-  
-  Tmc_Point get_weighted_circumcenter(Rt_Simplex const &s);
-  Tmc_Point get_anchor(Rt_Simplex const &sDel, Rt_Simplex const &sVor);
-  template <class Point>
-  Point construct_anchor_point(const Point &center_del, 
-                               const Point &center_vor) {
-    return construct_anchor_point_3_obj(center_del,center_vor);
-  }
- 
-  void construct_0_cell(Rt_Vertex_handle rt_vh);
-  void construct_1_cell(const Rt_Finite_edges_iterator &eit);
-  void construct_2_cell(const Rt_Finite_facets_iterator &fit);
-  void construct_3_cell(Rt_Cell_handle rt_ch);
-	
-  void remove_small_edges();
-  bool is_collapsible(Tmc_Vertex_handle vh, 
-		      Tmc_Vertex_handle &vh_collapse_to,
-		      Tmc_RT sq_length);
-  void do_collapse(Tmc_Vertex_handle vh, Tmc_Vertex_handle vh_collapse_to);
-  
-
-  Sign orientation(Tmc_Cell_handle ch);
-
-
-
-private:
-
-  Regular const ®ular;
-  Rt_FT const &shrink;
-  Triangulated_mixed_complex &_tmc;
-  Triangulated_mixed_complex_observer &observer;
-
-  Triangulation_incremental_builder triangulation_incr_builder;
-
-  Construct_weighted_circumcenter_3<
-    Regular_triangulation_euclidean_traits_3<
-    Triangulated_mixed_complex_traits> >                weighted_circumcenter_obj;
-
-  Construct_anchor_point_3<
-    Regular_triangulation_euclidean_traits_3<
-    Triangulated_mixed_complex_traits> >                construct_anchor_point_3_obj;
-
-  Compute_squared_radius_smallest_orthogonal_sphere_3<
-    Regular_triangulation_euclidean_traits_3<
-    Triangulated_mixed_complex_traits> >       orthoweight_obj;
-  Compute_anchor_3<Regular> compute_anchor_obj;
-  bool verbose;
-
-  Weighted_converter_3<
-    Cartesian_converter<typename Regular_traits::Bare_point::R, 
-			Triangulated_mixed_complex_traits > >
-  r2t_converter_object;
-    
-
-  static const int edge_index[4][4];
-  struct Index_c4 { Tmc_Vertex_handle V[4]; };
-  struct Index_c6 { Tmc_Vertex_handle V[6]; };
-  struct Index_c44 { Tmc_Vertex_handle V[4][4]; };
-  struct Index_v {
-    Unique_hash_map < Rt_Vertex_handle, Tmc_Vertex_handle > V;
-  };
-
-  // index to vertex
-  Unique_hash_map < Rt_Cell_handle, Index_c4 > index_03;
-  
-  Union_find_anchor                            anchor_del_uf, anchor_vor_uf;
-  Simplex_UF_map                               anchor_del_map, anchor_vor_map;
-                   
-//  Anchor_map                                     anchor_del2, anchor_vor2;
-  std::map<Symb_anchor, Tmc_Vertex_handle>        anchors;
-};
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-const int Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-edge_index[4][4] = {{-1,0,1,2},{0,-1,3,4},{1,3,-1,5},{2,4,5,-1}};
-
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_anchor_del(Rt_Simplex const &sDel) {
-  Rt_Simplex s = compute_anchor_obj.anchor_del(sDel);
-  
-  typename Union_find_anchor::handle sDel_handle, s_handle;
-  sDel_handle = anchor_del_uf.make_set(sDel);
-  anchor_del_map[sDel] = sDel_handle;
-  
-  typename Simplex_UF_map::iterator s_it = anchor_del_map.find(s); 
-  CGAL_assertion(s_it != anchor_del_map.end());
-
-  anchor_del_uf.unify_sets(sDel_handle, s_it->second);
-
-  // degenerate simplices:
-  if (compute_anchor_obj.is_degenerate()) {
-    typename Compute_anchor::Simplex_iterator degenerate_it;
-    typename Simplex_UF_map::iterator deg_map_it;
-    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
-         degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
-         degenerate_it++) {
-      deg_map_it = anchor_del_map.find(*degenerate_it); 
-      CGAL_assertion(deg_map_it != anchor_del_map.end());
-      
-      anchor_del_uf.unify_sets(sDel_handle, deg_map_it->second);
-    }
-  }
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_anchor_vor(Rt_Simplex const &sVor) {
-  Rt_Simplex s = compute_anchor_obj.anchor_vor(sVor);
-  
-  typename Union_find_anchor::handle sVor_handle, s_handle;
-  sVor_handle = anchor_vor_uf.make_set(sVor);
-  anchor_vor_map[sVor] = sVor_handle;
-  
-  typename Simplex_UF_map::iterator s_it = anchor_vor_map.find(s); 
-  CGAL_assertion(s_it != anchor_vor_map.end());
-
-  anchor_vor_uf.unify_sets(sVor_handle, s_it->second);
-
-  // degenerate simplices:
-  if (compute_anchor_obj.is_degenerate()) {
-    typename Compute_anchor::Simplex_iterator degenerate_it;
-    typename Simplex_UF_map::iterator deg_map_it;
-    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
-         degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
-         degenerate_it++) {
-      deg_map_it = anchor_vor_map.find(*degenerate_it); 
-      
-      // Possibly not found for 2 Voronoi vertices with the same center,
-      // If the first vertex is inserted and the second is already found.
-      // see compute_anchor_obj.anchor_vor(Cell_handle)
-      if (deg_map_it != anchor_vor_map.end()) {
-        anchor_vor_uf.unify_sets(sVor_handle, deg_map_it->second);
-      }
-    }
-  }
-//  Rt_Simplex s = compute_anchor_obj.anchor_vor(sVor);
-//  anchor_vor2[sVor] = Anchor_map_iterator();
-//
-//  Anchor_map_iterator it = anchor_vor2.find(sVor);
-//  Anchor_map_iterator it2 = anchor_vor2.find(s);
-//  CGAL_assertion(it != anchor_vor2.end());
-//  CGAL_assertion(it2 != anchor_vor2.end());
-//  it->second = it2;
-//
-//  // degenerate simplices:
-//  if (compute_anchor_obj.is_degenerate()) {
-//    it = find_anchor(anchor_vor2, it);
-//    typename Compute_anchor::Simplex_iterator degenerate_it;
-//    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
-//	 degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
-//	 degenerate_it++) {
-//      Anchor_map_iterator tmp;
-//      it2 = anchor_vor2.find(*degenerate_it);
-//      // Possibly not found for 2 Voronoi vertices with the same center,
-//      // If the first vertex is inserted and the second is already found.
-//      // see compute_anchor_obj.anchor_vor(Cell_handle)
-//      if (it2 != anchor_vor2.end()) {
-//	CGAL_assertion(it2 != anchor_vor2.end());
-//	// Merge sets:
-//	while (it2 != it2->second) {
-//	  tmp = it2->second;
-//	  it2->second = it->second;
-//	  it2 = tmp;
-//	  CGAL_assertion(it2 != anchor_vor2.end());
-//	}
-//	it2->second = it->second;
-//      }
-//    }
-//  }
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_anchors() {
-  Rt_Finite_vertices_iterator vit;
-  Rt_Finite_edges_iterator eit;
-  Rt_Finite_facets_iterator fit;
-  Rt_Finite_cells_iterator cit;
-  Rt_Simplex s;
-  
-  // Compute anchor points:
-  for (vit=regular.finite_vertices_begin();
-       vit!=regular.finite_vertices_end(); vit++) {
-    construct_anchor_del(Rt_Simplex(vit));
-  }  
-  for (eit=regular.finite_edges_begin();
-       eit!=regular.finite_edges_end(); eit++) {
-    s = Rt_Simplex(*eit);
-    construct_anchor_del(s);
-    CGAL_assertion(s.dimension() == 1);
-  }
-  for (fit=regular.finite_facets_begin();
-       fit!=regular.finite_facets_end(); fit++) {
-    s = Rt_Simplex(*fit);
-    construct_anchor_del(s);
-    CGAL_assertion(s.dimension() == 2);
-  }
-  for (cit=regular.finite_cells_begin();
-       cit!=regular.finite_cells_end(); cit++) {
-    s = Rt_Simplex(cit);
-    construct_anchor_del(s);
-    construct_anchor_vor(s);
-    CGAL_assertion(s.dimension() == 3);
-  }
-  for (fit=regular.finite_facets_begin();
-       fit!=regular.finite_facets_end(); fit++) {
-    s = Rt_Simplex(*fit);
-    construct_anchor_vor(s);
-    CGAL_assertion(s.dimension() == 2);
-  }
-  for (eit=regular.finite_edges_begin();
-       eit!=regular.finite_edges_end(); eit++) {
-    s = Rt_Simplex(*eit);
-    construct_anchor_vor(s);
-    CGAL_assertion(s.dimension() == 1);
-  }
-  for (vit=regular.finite_vertices_begin();
-       vit!=regular.finite_vertices_end(); vit++) {
-    CGAL_assertion(vit->cell() != Rt_Cell_handle());
-    s = Rt_Simplex(vit);
-    construct_anchor_vor(s);
-    CGAL_assertion(s.dimension() == 0);
-  }
-}
-
-
-// Constructs the vertices of the simplicial complex
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_vertices() {
-  Rt_All_cells_iterator acit;
-  Rt_Finite_cells_iterator cit;
-  Rt_Finite_facets_iterator fit;
-  Rt_Finite_edges_iterator eit;
-  Rt_Finite_vertices_iterator vit;
-  Rt_Cell_circulator ccir, cstart;
-  Rt_Vertex_handle v1, v2, v3;
-  Rt_Edge e;
-  Rt_Cell_handle c1, c2;
-  Rt_Simplex sDel, sVor;
-  Tmc_Vertex_handle vh;
-
-  if (verbose) std::cout << "construct_anchors" << std::endl;
-  construct_anchors();
-
-  if (verbose) std::cout << "9 ";
-  // anchor dimDel=0, dimVor=3
-  for (cit=regular.finite_cells_begin();
-       cit!=regular.finite_cells_end(); cit++) {
-    sVor = get_anchor_vor(Rt_Simplex(cit));
-    for (int i=0; i<4; i++) {
-      sDel = get_anchor_del(Rt_Simplex(cit->vertex(i)));
-      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	vh = add_vertex(Symb_anchor(sDel,sVor));
-	anchors[Symb_anchor(sDel,sVor)] = vh;
-	CGAL_assertion(vh == get_vertex(sDel, sVor));
-      }
-    }
-  }
-
-  if (verbose) std::cout << "8 ";
-  // anchor dimDel=1, dimVor=3
-  for (cit=regular.finite_cells_begin(); cit!=regular.finite_cells_end(); cit++) {
-    sVor = get_anchor_vor(Rt_Simplex(cit));
-    for (int i=0; i<3; i++) {
-      for (int j=i+1; j<4; j++) {
-	sDel = get_anchor_del(Rt_Simplex(Rt_Edge(cit,i,j)));
-	if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	  vh = add_vertex(Symb_anchor(sDel,sVor));
-	  anchors[Symb_anchor(sDel,sVor)] = vh;
-	  CGAL_assertion(vh == get_vertex(sDel, sVor));
-	}
-      }
-    }
-  }
-
-  if (verbose) std::cout << "7 ";
-  // anchor dimDel=2, dimVor=3 and dimDel=0, dimVor=2
-  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
-    // anchor dimDel=2, dimVor=3
-    c1 = fit->first;
-    c2 = c1->neighbor(fit->second);
-
-    sDel = get_anchor_del(*fit);
-    if (!regular.is_infinite(c1)) {
-      sVor = get_anchor_vor(c1);
-      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	vh = add_vertex(Symb_anchor(sDel,sVor));
-	anchors[Symb_anchor(sDel,sVor)] = vh;
-	CGAL_assertion(vh == get_vertex(sDel, sVor));
-      }
-    }
-    if (!regular.is_infinite(c2)) {
-      sVor = get_anchor_vor(c2);
-      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	vh = add_vertex(Symb_anchor(sDel,sVor));
-	anchors[Symb_anchor(sDel,sVor)] = vh;
-	CGAL_assertion(vh == get_vertex(sDel, sVor));
-      }
-    }
-    // anchor dimDel=0, dimVor=2
-    sVor = get_anchor_vor(*fit);
-    for (int i=1; i<4; i++) {
-      sDel = get_anchor_del(Rt_Simplex(c1->vertex((fit->second+i)&3)));
-      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	vh = add_vertex(Symb_anchor(sDel,sVor));
-	anchors[Symb_anchor(sDel,sVor)] = vh;
-	CGAL_assertion(vh == get_vertex(sDel, sVor));
-      } else {
-        vh = get_vertex(sDel, sVor);
-      }
-    }
-  }
-	
-  if (verbose) std::cout << "6 ";
-  // anchor dimDel=0, dimVor=1
-  for (eit=regular.finite_edges_begin(); eit!=regular.finite_edges_end(); eit++) {
-    sVor = get_anchor_vor(*eit);
-
-    v1 = eit->first->vertex(eit->second);
-    v2 = eit->first->vertex(eit->third);
-    sDel = get_anchor_del(v1);
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-			
-    sDel = get_anchor_del(v2);
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-  }
-	
-  if (verbose) std::cout << "5 ";
-  // anchor dimDel=3, dimVor=3
-  for (cit=regular.finite_cells_begin(); cit!=regular.finite_cells_end(); cit++) {
-    sDel = get_anchor_del(Rt_Simplex(cit));
-    sVor = get_anchor_vor(Rt_Simplex(cit));
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-  }
-
-
-  if (verbose) std::cout << "4 ";
-  // anchor dimDel=0, dimVor=0
-  for (vit=regular.finite_vertices_begin(); vit!=regular.finite_vertices_end(); vit++) {
-    sDel = get_anchor_del(Rt_Simplex(vit));
-    sVor = get_anchor_vor(Rt_Simplex(vit));
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-  }
-	
-  if (verbose) std::cout << "3 ";
-  // anchor dimDel=1, dimVor=2
-  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
-    c1 = fit->first;
-    c2 = c1->neighbor(fit->second);
-
-    sVor = get_anchor_vor(Rt_Simplex(*fit));
-    for (int i=1; i<3; i++) {
-      for (int j=i+1; j<4; j++) {
-        e.first = c1;
-        e.second = (fit->second+i)&3;
-        e.third = (fit->second+j)&3;
-        sDel = get_anchor_del(Rt_Simplex(e));
-	if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-	  vh = add_vertex(Symb_anchor(sDel,sVor));
-	  anchors[Symb_anchor(sDel,sVor)] = vh;
-	  CGAL_assertion(vh == get_vertex(sDel, sVor));
-	}
-      }
-    }
-  }
-	
-  if (verbose) std::cout << "2 ";
-  // anchor dimDel=2, dimVor=2
-  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
-    c1 = fit->first;
-    c2 = c1->neighbor(fit->second);
-
-    sVor = get_anchor_vor(Rt_Simplex(*fit));
-    sDel = get_anchor_del(Rt_Simplex(*fit));
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-  }
-	
-  if (verbose) std::cout << "1" << std::endl;
-  // anchor dimDel=1, dimVor=1
-  for (eit=regular.finite_edges_begin(); eit!=regular.finite_edges_end(); eit++) {
-    v1 = eit->first->vertex(eit->second);
-    v2 = eit->first->vertex(eit->third);
-
-    sVor = get_anchor_vor(Rt_Simplex(*eit));
-    sDel = get_anchor_del(Rt_Simplex(*eit));
-
-    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
-      vh = add_vertex(Symb_anchor(sDel,sVor));
-      anchors[Symb_anchor(sDel,sVor)] = vh;
-      CGAL_assertion(vh == get_vertex(sDel, sVor));
-    }
-  }
-}
-
-// Constructs the cells of the mixed complex corresponding
-// to Regular vertices
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_0_cell(Rt_Vertex_handle rt_vh) {
-  Rt_Simplex sDel_v, sVor_v, sVor_e, sVor_f, sVor_c;
-  Tmc_Vertex_handle vh[4];
-  
-  Rt_Simplex simplex(rt_vh);
-  sDel_v = get_anchor_del(Rt_Simplex(rt_vh));
-  sVor_v = get_anchor_vor(Rt_Simplex(rt_vh));
-  vh[0] = get_vertex(sDel_v,sVor_v);
-    
-  std::list<Rt_Cell_handle> adj_cells;
-  typename std::list<Rt_Cell_handle>::iterator adj_cell;
-  regular.incident_cells(rt_vh, std::back_inserter(adj_cells));
-    
-  // Construct cells:
-  for (adj_cell = adj_cells.begin();
-       adj_cell != adj_cells.end();
-       adj_cell ++) {
-    if (!regular.is_infinite(*adj_cell)) {
-      sVor_c = get_anchor_vor(Rt_Simplex(*adj_cell));
-      vh[3] = get_vertex(sDel_v,sVor_c);
-      int index = (*adj_cell)->index(rt_vh);
-      for (int i=1; i<4; i++) {
-	sVor_f = get_anchor_vor(Rt_Simplex(Rt_Facet(*adj_cell,(index+i)&3)));
-	vh[2] = get_vertex(sDel_v,sVor_f);
-	  
-	for (int j=1; j<4; j++) {
-	  if (j!=i) {
-	    sVor_e = get_anchor_vor(
-				    Rt_Simplex(Rt_Edge(*adj_cell,index,(index+j)&3)));
-	    vh[1] = get_vertex(sDel_v,sVor_e);
-	    if ((vh[0] != vh[1]) && (vh[1] != vh[2]) && (vh[2] != vh[3])) {
-	      CGAL_assertion(sVor_v != sVor_e);
-	      CGAL_assertion(sVor_e != sVor_f);
-	      CGAL_assertion(sVor_f != sVor_c);
-	      // Tmc_Cell_handle ch =
-		add_cell(vh,(index + (j==(i%3+1)? 1:0))&1,simplex);
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-// Constructs 1-cells of the mixed complex corresponding to edges
-// of the regular triangulation
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_1_cell(const Rt_Finite_edges_iterator &e) {
-  Rt_Simplex sDel_v, sDel_e, sVor_e, sVor_f, sVor_c;
-  Tmc_Vertex_handle vh[4];
-  Rt_Vertex_handle v[2];
-  Tmc_Cell_handle ch;
-  
-  Rt_Simplex mixed_cell_simplex(*e);
-  sDel_e = get_anchor_del(Rt_Simplex(*e));
-  sVor_e = get_anchor_vor(Rt_Simplex(*e));
-    
-  v[0] = e->first->vertex(e->second);
-  v[1] = e->first->vertex(e->third);
-    
-  // Construct cells on the side of v[vi]:
-  for (int vi=0; vi<2; vi++) {
-    sDel_v = get_anchor_del(Rt_Simplex(v[vi]));
-    if (!(sDel_v == sDel_e)) {
-      Rt_Cell_circulator ccir, cstart;
-      ccir = cstart = regular.incident_cells(*e);
-      do {
-	if (!regular.is_infinite(ccir)) {
-	  int index0 = ccir->index(v[vi]);
-	  int index1 = ccir->index(v[1-vi]);
-
-	  sVor_c = get_anchor_vor(Rt_Simplex(ccir));
-
-	  for (int fi=1; fi<4; fi++) {
-	    if (((index0+fi)&3) != index1) {
-	      sVor_f =
-		get_anchor_vor(Rt_Simplex(Rt_Facet(ccir,(index0+fi)&3)));
-	      if ((sVor_c != sVor_f) && (sVor_f != sVor_e)) {
-		vh[0] = get_vertex(sDel_v, sVor_e);
-		vh[1] = get_vertex(sDel_e, sVor_e);
-		vh[2] = get_vertex(sDel_e, sVor_f);
-		vh[3] = get_vertex(sDel_e, sVor_c);
-		int orient;
-		if (((4+index1-index0)&3) == 1) {
-		  orient = (index1 + (fi==2))&1;
-		} else {
-		  orient = (index1 + (fi==1))&1;
-		}
-		// vh: dimension are (01,11,12,13)
-		ch = add_cell(vh,orient,mixed_cell_simplex);
-									
-		vh[1] = get_vertex(sDel_v, sVor_f);
-		// vh: dimension are (01,02,12,13)
-		ch = add_cell(vh,1-orient,mixed_cell_simplex);
-									
-		vh[2] = get_vertex(sDel_v, sVor_c);
-		// vh: dimension are (01,02,03,13)
-		ch = add_cell(vh,orient,mixed_cell_simplex);
-	      }
-	    }
-	  }
-	}
-	ccir ++;
-      } while (ccir != cstart);
-    }
-  }
-}
-
-
-// Constructs 2-cells of the mixed complex corresponding to facets
-// of the regular triangulation
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_2_cell(const Rt_Finite_facets_iterator &fit) {
-  Rt_Simplex sDel_v, sDel_e, sDel_f, sVor_f, sVor_c;
-  Tmc_Vertex_handle vh[4]; // Implicit function over vLabels is increasing ...
-  Rt_Cell_handle rt_ch;
-  int index;
-	
-  rt_ch = fit->first;
-  index = fit->second;
-  Rt_Simplex simplex(*fit);
-  sDel_f = get_anchor_del(Rt_Simplex(*fit));
-  sVor_f = get_anchor_vor(Rt_Simplex(*fit));
-		
-  for (int i=0; i<2; i++) { // Do this twice
-    if (!regular.is_infinite(rt_ch)) {
-      sVor_c = get_anchor_vor(Rt_Simplex(rt_ch));
-	
-      vh[3] = get_vertex(sDel_f, sVor_c);
-      Tmc_Vertex_handle vh2 = get_vertex(sDel_f, sVor_f);
-      if (vh2 != vh[3]) {
-	// Facet and cell do not coincide ..
-	for (int vi=1; vi<4; vi++) {
-	  sDel_v = get_anchor_del(Rt_Simplex(rt_ch->vertex((index+vi)&3)));
-	  //index_02[rt_ch].V[index][(index+vi)&3];
-	  vh[0] = get_vertex(sDel_v, sVor_f);
-	  for (int ei=1; ei<4; ei++) {
-	    if (vi != ei) {
-	      vh[2] = vh2;
-	      int index0 = (index+vi)&3;
-	      int index1 = (index+ei)&3;
-	      int fi = (6+index-vi-ei)&3;//6-index-index0-index1;
-	      sDel_e =
-		get_anchor_del(Rt_Simplex(Rt_Edge(rt_ch, index0, index1)));
-	      vh[1] = get_vertex(sDel_e, sVor_f);
-	      //index_12[rt_ch].V[index][(6+index-vi-ei)&3];
-	      if ((vh[0] != vh[1]) && (vh[1] != vh[2])) {
-		// index0: v0
-		// index1: v1
-		// index0+fi&3 == facet
-		int orient;
-									
-		if (((4+index1-index0)&3) == 3) {
-		  orient = (index1 + (((4+index0-fi)&3)==2))&1;
-		} else {
-		  orient = (index1 + (((4+index0-fi)&3)==1))&1;
-		}
-
-		add_cell(vh,orient,simplex);
-									
-		vh[2] = get_vertex(sDel_e, sVor_c);
-		add_cell(vh,1-orient,simplex);
-									
-		vh[1] = get_vertex(sDel_v, sVor_c);
-		add_cell(vh,orient,simplex);
-	      } 
-	    }
-	  }
-	}
-      }
-    }
-    // swap to the other cell
-    Rt_Cell_handle ch_old = rt_ch;
-    rt_ch = rt_ch->neighbor(index);
-    index = rt_ch->index(ch_old);
-  }
-
-  CGAL_assertion(rt_ch == fit->first);
-  CGAL_assertion(index == fit->second);
-}
-
-
-// Constructs 3-cells of the mixed complex corresponding to cells
-// of the regular triangulation
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-construct_3_cell(Rt_Cell_handle rt_ch) {
-  Rt_Simplex sDel_v, sDel_e, sDel_f, sDel_c, sVor_c;
-  Tmc_Vertex_handle vh[4];
-  Tmc_Cell_handle ch;
-
-  // construct the tetrahedron:
-  //   C[ch], C[Facet(ch,fi)], C[Edge(ch,ei,vi)], C[ch->vertex(vi)]
-  sDel_c = get_anchor_del(Rt_Simplex(rt_ch));
-  sVor_c = get_anchor_vor(Rt_Simplex(rt_ch));
-  Rt_Simplex simplex = Rt_Simplex(rt_ch);
-  vh[0] = get_vertex(sDel_c, sVor_c); 
-  for (int fi=0; fi<4; fi++) {
-    sDel_f = get_anchor_del(Rt_Simplex(Rt_Facet(rt_ch, fi)));
-    vh[1] = get_vertex(sDel_f, sVor_c);
-    if (vh[0] != vh[1]) {
-      for (int vi=1; vi<4; vi++) {
-	int index0 = (fi+vi)&3;
-	sDel_v = get_anchor_del(Rt_Simplex(rt_ch->vertex(index0)));
-	for (int ei=1; ei<4; ei++) {
-	  int index1 = (fi+ei)&3;
-	  if (vi != ei) {
-	    sDel_e = get_anchor_del(Rt_Simplex(Rt_Edge(rt_ch, index0, index1)));
-	    vh[2] = get_vertex(sDel_e, sVor_c);
-	    // index_13[rt_ch].V[edge_index[index0][index1]];
-	    vh[3] = get_vertex(sDel_v, sVor_c);
-	    // index_03[rt_cit].V[index0];
-	    if ((vh[1] != vh[2]) && (vh[2] != vh[3])) {
-	      int orient;
-								
-	      if (((4+index1-index0)&3) == 1) {
-		orient = (index1 + (vi==2))&1;
-	      } else {
-		orient = (index1 + (vi==3))&1;
-	      }
-	      ch = add_cell(vh, orient, simplex);
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-// Adds a vertex to the simplicial complex
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-typename Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::Tmc_Vertex_handle
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-add_vertex (Symb_anchor const &anchor)
-{
-  Tmc_Vertex_handle vh;
-  vh = triangulation_incr_builder.add_vertex();
-  observer.after_vertex_insertion(anchor.first, anchor.second, vh); 
-  
-  Protect_FPU_rounding<true> P;
-  vh->point() = get_anchor(anchor.first, anchor.second);
-
-//   std::cout << "@ [" 
-//             << vh->info().first << " - " 
-//             << vh->info().second << "] -- [" 
-//             << vh->point() << "] -- ["
-//             << get_weighted_circumcenter(vh->info().first) << " - "
-//             << get_weighted_circumcenter(vh->info().second) 
-//             << "]" << std::endl;
-
-  return vh;
-}
-
-// Gets a vertex from the simplicial complex based on the anchors
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-typename Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::Tmc_Vertex_handle
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::get_vertex (
-						   Rt_Simplex &sDel, Rt_Simplex &sVor)
-{
-  Rt_Simplex sDel2 = get_anchor_del(sDel);
-  Rt_Simplex sVor2 = get_anchor_vor(sVor);
-  CGAL_assertion(sDel == sDel2);
-  CGAL_assertion(sVor == sVor2);
-  Tmc_Vertex_handle vh = anchors[Symb_anchor(sDel2,sVor2)];
-  CGAL_assertion(vh != Tmc_Vertex_handle());
-  return vh;
-}
-
-// Adds a cell to the simplicial complex
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-typename Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::Tmc_Cell_handle
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-add_cell(Tmc_Vertex_handle vh[], int orient, Rt_Simplex s) {
-  CGAL_assertion((orient==0) || (orient==1));
-  CGAL_assertion(vh[0] != Tmc_Vertex_handle()); 
-  CGAL_assertion(vh[1] != Tmc_Vertex_handle());
-  CGAL_assertion(vh[2] != Tmc_Vertex_handle()); 
-  CGAL_assertion(vh[3] != Tmc_Vertex_handle());
-  CGAL_assertion(vh[0] != vh[1]); 
-  CGAL_assertion(vh[0] != vh[2]); 
-  CGAL_assertion(vh[0] != vh[3]); 
-  CGAL_assertion(vh[1] != vh[2]); 
-  CGAL_assertion(vh[1] != vh[3]); 
-  CGAL_assertion(vh[2] != vh[3]);
-
-  Tmc_Cell_handle ch;
-
-  if (orient) {
-    ch = triangulation_incr_builder.add_cell(vh[0], vh[1], vh[2], vh[3]);
-  } else {
-    ch = triangulation_incr_builder.add_cell(vh[0], vh[1], vh[3], vh[2]);
-  }
-  CGAL_assertion(orientation(ch) == POSITIVE);
-  observer.after_cell_insertion(s, ch);
-  return ch;
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-typename Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::Tmc_Point
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-get_weighted_circumcenter(Rt_Simplex const &s) {
-  Rt_Vertex_handle vh;
-  Rt_Edge           e;
-  Rt_Facet          f;
-  Rt_Cell_handle   ch;
-  
-  Tmc_Point result;
-  switch (s.dimension()) {
-  case 0:
-    vh=s;
-    result = r2t_converter_object(vh->point());
-    break;
-  case 1:
-    e=s;
-    result = weighted_circumcenter_obj(
-			     r2t_converter_object(e.first->vertex(e.second)->point()),
-			     r2t_converter_object(e.first->vertex(e.third)->point()));
-    break;
-  case 2:
-    f=s;
-    result = weighted_circumcenter_obj(
-			     r2t_converter_object(f.first->vertex((f.second+1)&3)->point()),
-			     r2t_converter_object(f.first->vertex((f.second+2)&3)->point()),
-			     r2t_converter_object(f.first->vertex((f.second+3)&3)->point()));
-    break;
-  case 3:
-    ch=s;
-    result = weighted_circumcenter_obj(
-           r2t_converter_object(ch->vertex(0)->point()),
-           r2t_converter_object(ch->vertex(1)->point()),
-           r2t_converter_object(ch->vertex(2)->point()),
-           r2t_converter_object(ch->vertex(3)->point()));
-    break;
-  default:
-    CGAL_error();
-  }
-  return result;
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-typename Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::Tmc_Point
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-get_anchor(Rt_Simplex const &sDel, Rt_Simplex const &sVor)
-{
-  Protect_FPU_rounding<true> P;
-
-  Tmc_Point dfoc = get_weighted_circumcenter(sDel);
-  Tmc_Point vfoc = get_weighted_circumcenter(sVor);
-	
-  return construct_anchor_point(dfoc, vfoc);
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-remove_small_edges()
-{
-  Bbox_3 bbox;
-  for (Tmc_Finite_vertices_iterator vit = _tmc.finite_vertices_begin();
-       vit != _tmc.finite_vertices_end(); vit++) {
-    bbox = bbox+vit->point().bbox();
-  }
-  // Tmc_RT sq_length = ((bbox.xmax()-bbox.xmin())*(bbox.xmax()-bbox.xmin()) + 
-  //    (bbox.ymax()-bbox.ymin())*(bbox.ymax()-bbox.ymin()) + 
-  //    (bbox.zmax()-bbox.zmin())*(bbox.zmax()-bbox.zmin()))/100000000;
-
-  Tmc_RT sq_length = 1e-6;
-  // NGHK: This may intrudoce rounding errors, since the quadratic surface
-  // may change:
-  Tmc_Vertex_handle vh, vh_collapse_to;
-  for (Tmc_Finite_vertices_iterator vit = _tmc.finite_vertices_begin();
-       vit != _tmc.finite_vertices_end(); ) {
-    vh = vit;
-    vit++;
-    if (is_collapsible(vh, vh_collapse_to,sq_length)) {
-      do_collapse(vh,vh_collapse_to);
-    }
-  }
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-bool
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-is_collapsible(Tmc_Vertex_handle vh,
-	       Tmc_Vertex_handle &vh_collapse_to,
-	       Tmc_RT sq_length)
-{
-  std::vector<Tmc_Cell_handle> incident_cells;
-  CGAL_assertion(_tmc.is_vertex(vh));
-  incident_cells.reserve(64);
-  _tmc.incident_cells(vh, std::back_inserter(incident_cells));
-
-  std::set<Tmc_Vertex_handle> incident_vertices;
-  for(typename std::vector<Tmc_Cell_handle>::iterator 
-	cit = incident_cells.begin();
-      cit != incident_cells.end(); ++cit) {
-    // Put all incident vertices in incident_vertices.
-    for (int j=0; j<4; ++j)
-      if ((*cit)->vertex(j) != vh)
-	incident_vertices.insert((*cit)->vertex(j));
-  }
-  
-  for (typename std::set<Tmc_Vertex_handle>::iterator 
-	 it = incident_vertices.begin(); 
-       it != incident_vertices.end(); it++) {
-    if ((_tmc.geom_traits().compute_squared_distance_3_object()(vh->point(),
-								(*it)->point())
-	 < sq_length) &&
-	(vh->cell()->surf == (*it)->cell()->surf) &&
-	(vh->sign() == (*it)->sign())) {
-      bool ok = true;
-      for (typename std::vector<Tmc_Cell_handle>::iterator 
-	     cit = incident_cells.begin();
-	   ok && (cit != incident_cells.end()); cit++) {
-	if (!(*cit)->has_vertex(*it)) {
-	  const Tmc_Point* pts[4] = { &((*cit)->vertex(0)->point()),
-				      &((*cit)->vertex(1)->point()),
-				      &((*cit)->vertex(2)->point()),
-				      &((*cit)->vertex(3)->point()) };
-	  pts[(*cit)->index(vh)] = &(*it)->point();
-	  
-	  ok = (_tmc.geom_traits().orientation_3_object()
-		(*pts[0],*pts[1],*pts[2],*pts[3]) == CGAL::POSITIVE);
-	}
-      }
-      if (ok) {
-	vh_collapse_to = *it;
-	return true;
-      } 
-    }
-  }
-  return false;
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-do_collapse(Tmc_Vertex_handle vh, 
-	    Tmc_Vertex_handle vh_collapse_to)
-{
-  std::vector<Tmc_Cell_handle> incident_cells;
-  incident_cells.reserve(32);
-  _tmc.incident_cells(vh, std::back_inserter(incident_cells));
-  int i,i2;
-  for (typename std::vector<Tmc_Cell_handle>::iterator
-	 it = incident_cells.begin(); it != incident_cells.end(); it++) {
-    i = (*it)->index(vh);
-    if ((*it)->has_vertex(vh_collapse_to,i2)) {
-      // This cell is collapsed, set neighbor information of the new facet
-      // and set the cell-pointer of the incident vertices.
-      Tmc_Cell_handle ch1 = (*it)->neighbor(i);
-      Tmc_Cell_handle ch2 = (*it)->neighbor(i2);
-      ch1->set_neighbor(ch1->index((*it)), ch2);
-      ch2->set_neighbor(ch2->index((*it)), ch1);
-      for (int i=0; i<4; i++) {
-	// Try to point to a cell with the same surface:
-	if ((*it)->vertex(i)->cell() == (*it)) {
-	  if ((*it)->surf == ch1->surf) {
-	    (*it)->vertex(i)->set_cell(ch1);
-	  } else {
-	    (*it)->vertex(i)->set_cell(ch2);
-	  }
-	}
-      }
-      _tmc.tds().delete_cell((*it));
-    } else {
-      // This cell is changed, set pointer to the new vertex
-      (*it)->set_vertex(i,vh_collapse_to);
-    }
-  }
-  _tmc.tds().delete_vertex(vh);
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-Sign 
-Mixed_complex_triangulator_3<
-  RegularTriangulation_3,
-  TriangulatedMixedComplex_3,
-  TriangulatedMixedComplexObserver_3>::
-orientation(Tmc_Cell_handle ch) {
-    Orientation o;
-    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
-    Protect_FPU_rounding<true> P;
-    try {
-    Tmc_Point pts[4];
-    for (int i=0; i<4; i++) pts[i] = ch->vertex(i)->point();
-
-    
-    // filtered kernel
-    o = _tmc.geom_traits().orientation_3_object()(pts[0], pts[1], 
-                                                  pts[2], pts[3]);
-  } catch (Uncertain_conversion_exception) {
-    Protect_FPU_rounding<false> P(CGAL_FE_TONEAREST);
-    typedef Exact_predicates_exact_constructions_kernel EK;
-    typedef Cartesian_converter<EK, Tmc_traits>         Exact_converter;
-    typedef Skin_surface_traits_3<EK>                   Exact_traits;
-
-    Exact_converter converter;
-    Exact_traits    exact_traits(shrink);
-    typename EK::Point_3 e_pts[4];
-
-    for (int k=0; k<4; k++) {
-      e_pts[k] = 
-        Skin_surface_base_3<Regular_traits>::
-        get_anchor_point(ch->vertex(k)->info(), exact_traits);
-      // Store the more precise point
-      ch->vertex(k)->point() = converter(e_pts[k]);
-    }
-    o = exact_traits.orientation_3_object()(e_pts[0], e_pts[1], 
-                                            e_pts[2], e_pts[3]);
-  }
-  return o;
-}
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3,
-  class TriangulatedMixedComplexObserver_3>
-void 
-triangulate_mixed_complex_3(RegularTriangulation_3 &rt,
-			    typename RegularTriangulation_3::Geom_traits::FT
-			    const & shrink_factor,
-			    TriangulatedMixedComplex_3 &tmc,
-			    TriangulatedMixedComplexObserver_3 &observer,
-			    bool verbose) 
-{
-  typedef Mixed_complex_triangulator_3<
-    RegularTriangulation_3,
-    TriangulatedMixedComplex_3,
-    TriangulatedMixedComplexObserver_3>  Mixed_complex_triangulator;
-  Mixed_complex_triangulator(rt, shrink_factor, tmc, observer, verbose);
-}
-
-
-template < 
-  class RegularTriangulation_3,
-  class TriangulatedMixedComplex_3>
-void 
-triangulate_mixed_complex_3(RegularTriangulation_3 const &regular, 
-			    typename RegularTriangulation_3::Geom_traits::FT
-			    const &shrink_factor,
-			    TriangulatedMixedComplex_3 &tmc,
-			    bool verbose)
-{
-  Triangulated_mixed_complex_observer_3<
-    TriangulatedMixedComplex_3, const RegularTriangulation_3> 
-    observer(shrink_factor);
-  triangulate_mixed_complex_3(regular, shrink_factor, tmc, observer, verbose);
-}
-
-} //namespace CGAL
-
-#endif // CGAL_TRIANGULATE_MIXED_COMPLEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/triangulate_polyhedron.h b/3rdparty/CGAL-4.6/include/CGAL/triangulate_polyhedron.h
deleted file mode 100644
index c731778..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/triangulate_polyhedron.h
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (c) 2010-2011  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_TRIANGULATE_POLYHEDRON_H
-
-#include <CGAL/Modifier_base.h>
-#include <CGAL/HalfedgeDS_decorator.h>
-
-#include <CGAL/Triangulation_vertex_base_with_info_2.h>
-#include <CGAL/Triangulation_face_base_with_info_2.h>
-#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#include <CGAL/Constrained_triangulation_plus_2.h>
-#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
-
-#include <CGAL/internal/Operations_on_polyhedra/compute_normal.h>
-
-#include <queue>
-#include <vector>
-#include <utility>
-
-namespace CGAL {
-
-template <class Polyhedron>
-class Triangulate_modifier
-  : public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS> 
-{
-  typedef typename Polyhedron::HalfedgeDS HDS;
-  typedef typename Polyhedron::Traits Traits;
-
-  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
-  typedef typename Polyhedron::Facet Facet;
-  typedef typename Polyhedron::Facet_iterator Facet_iterator;
-  typedef typename Polyhedron::Facet_handle Facet_handle;
-
-  typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits>   P_traits;
-
-  typedef CGAL::Triangulation_vertex_base_with_info_2<Halfedge_handle,
-                                                      P_traits>        Vb;
-
-  struct Face_info {
-    typename Polyhedron::Halfedge_handle e[3];
-    bool is_external;
-  };
-
-  typedef CGAL::Triangulation_face_base_with_info_2<Face_info,
-                                                    P_traits>          Fb1;
-
-  typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>   Fb;
-  typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                  TDS;
-  typedef CGAL::No_intersection_tag                                    Itag;
-  typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits,
-                                                     TDS,
-                                                     Itag>             CDTbase;
-  typedef CGAL::Constrained_triangulation_plus_2<CDTbase>              CDT;
-
-public:
-  Triangulate_modifier() 
-  {
-  }
-
-  bool is_external(typename CDT::Face_handle fh) const {
-    return fh->info().is_external;
-  }
-
-  void operator()(HDS& hds) {
-    CGAL::HalfedgeDS_decorator<HDS> decorator(hds);
-    typedef typename HDS::Halfedge Halfedge;
-
-    // One need to store facet handles into a vector, because the list of
-    // facets of the polyhedron will be modified during the loop, and
-    // that invalidates the range [facets_begin(), facets_end()[.
-    std::vector<Facet_handle> facets;
-    facets.reserve(hds.size_of_faces());
-    for(Facet_iterator 
-          fit = hds.faces_begin(),
-          end = hds.faces_end();
-        fit != end; ++fit) {
-      facets.push_back(fit);
-    }
-
-    // Iterates on the vector of facet handles
-    for(typename std::vector<Facet_handle>::iterator 
-          fit_it = facets.begin(),
-          end = facets.end();
-        fit_it != end; ++fit_it)
-    {
-      Facet_handle fit = *fit_it;
-      typename Traits::Vector_3 normal = 
-        compute_facet_normal<Facet,Traits>(*fit);
-
-      P_traits cdt_traits(normal);
-      CDT cdt(cdt_traits);
-
-      typename Facet::Halfedge_around_facet_circulator 
-        he_circ = fit->facet_begin(),
-        he_circ_end(he_circ);
-      typename CDT::Vertex_handle previous, first;
-      do {
-        typename CDT::Vertex_handle vh = cdt.insert(he_circ->vertex()->point());
-        if(first == 0) {
-          first = vh;
-        }
-        vh->info() = he_circ;
-        if(previous != 0 && previous != vh) {
-          cdt.insert_constraint(previous, vh);
-        }
-        previous = vh;
-      } while( ++he_circ != he_circ_end );
-      cdt.insert_constraint(previous, first);
-
-      // sets mark is_external
-      for(typename CDT::All_faces_iterator
-            fit = cdt.all_faces_begin(),
-            end = cdt.all_faces_end();
-          fit != end; ++fit)
-      {
-        fit->info().is_external = false;
-      }
-      std::queue<typename CDT::Face_handle> face_queue;
-      face_queue.push(cdt.infinite_vertex()->face());
-      while(! face_queue.empty() ) {
-        typename CDT::Face_handle fh = face_queue.front();
-        face_queue.pop();
-        if(fh->info().is_external) continue;
-        fh->info().is_external = true;
-        for(int i = 0; i <3; ++i) {
-          if(!cdt.is_constrained(std::make_pair(fh, i)))
-          {
-            face_queue.push(fh->neighbor(i));
-          }
-        }
-      }
-
-      // then modify the polyhedron
-      decorator.make_hole(fit->halfedge());
-      for(typename CDT::Finite_edges_iterator
-            eit = cdt.finite_edges_begin(),
-            end = cdt.finite_edges_end();
-          eit != end; ++eit)
-      {
-        typename CDT::Face_handle fh = eit->first;
-        const int index = eit->second;
-        typename CDT::Face_handle opposite_fh = fh->neighbor(eit->second);
-        const int opposite_index = opposite_fh->index(fh);
-        const typename CDT::Vertex_handle va = fh->vertex(cdt. cw(index));
-        const typename CDT::Vertex_handle vb = fh->vertex(cdt.ccw(index));
-
-        if( ! (is_external(fh) && is_external(opposite_fh)) && 
-            ! cdt.is_constrained(*eit) ) 
-        {
-          // strictly internal edge
-          Halfedge_handle h = hds.edges_push_back(Halfedge(),
-                                                  Halfedge());
-          fh->info().e[index] = h;
-          opposite_fh->info().e[opposite_index] = h->opposite();
-
-          decorator.set_vertex(h, va->info()->vertex());
-          decorator.set_vertex(h->opposite(), vb->info()->vertex());
-        }
-        if( cdt.is_constrained(*eit) )
-        {
-          if(!is_external(fh)) {
-            fh->info().e[index] = va->info();
-          }
-          if(!is_external(opposite_fh)) {
-            opposite_fh->info().e[opposite_index] = vb->info();
-          }
-        }
-      }
-      for(typename CDT::Finite_faces_iterator
-            fit = cdt.finite_faces_begin(),
-            end = cdt.finite_faces_end();
-          fit != end; ++fit)
-      {
-        if(!is_external(fit)) 
-        {
-          Halfedge_handle h0 = fit->info().e[0];
-          Halfedge_handle h1 = fit->info().e[1];
-          Halfedge_handle h2 = fit->info().e[2];
-          CGAL_assertion( h0 != Halfedge_handle() );
-          CGAL_assertion( h1 != Halfedge_handle() );
-          CGAL_assertion( h2 != Halfedge_handle() );
-
-          typedef typename Halfedge::Base HBase;
-          h0->HBase::set_next(h1);
-          decorator.set_prev(h1, h0);
-          h1->HBase::set_next(h2);
-          decorator.set_prev(h2, h1);
-          h2->HBase::set_next(h0);
-          decorator.set_prev(h0, h2);
-
-          decorator.fill_hole(h0);        
-        }
-      }
-    } // end loop on facets of the input polyhedron
-  }
-}; // end class Triangulate_modifier
-
-template <typename Polyhedron>
-void triangulate_polyhedron(Polyhedron& p)
-{
-  CGAL::Triangulate_modifier<Polyhedron> modifier;
-  p.delegate(modifier);
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_TRIANGULATE_POLYHEDRON_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/tuple.h b/3rdparty/CGAL-4.6/include/CGAL/tuple.h
deleted file mode 100644
index 300cc06..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/tuple.h
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Sebastien Loriot, Sylvain Pion
-
-#ifndef CGAL_TUPLE_H
-#define CGAL_TUPLE_H
-
-// A wrapper around C++0x, TR1 or Boost tuple<>.
-// Together with the Is_in_tuple<> tool.
-
-#include <CGAL/config.h>
-
-// workaround issue in the tuple implementation of libc++
-// by falling back onto boost's
-#ifndef CGAL_CFG_NO_CPP0X_TUPLE
-  #include <cstddef>
-  #if defined( _LIBCPP_VERSION ) // check if libc++ is used
-    #define CGAL_CFG_NO_CPP0X_TUPLE
-  #endif
-#endif
-
-#ifndef CGAL_CFG_NO_CPP0X_TUPLE
-#  include <tuple>
-#else
-#  include <boost/tuple/tuple.hpp>
-#  include <boost/tuple/tuple_comparison.hpp>
-#  include <utility>
-#endif
-
-namespace CGAL {
-
-namespace cpp11 {
-
-#ifndef CGAL_CFG_NO_CPP0X_TUPLE
-using std::tuple;
-using std::make_tuple;
-using std::tie;
-using std::get;
-using std::tuple_size;
-using std::tuple_element;
-#else
-using boost::tuple;
-using boost::make_tuple;
-using boost::tie;
-using boost::get;
-  
-//tuple_size
-template <class T>
-struct tuple_size:public boost::tuples::length<T> {};
-  
-//tuple_element
-template <int N,class T>
-struct tuple_element: public boost::tuples::element<N,T>{};
-  
-#endif
-
-
-#if defined(CGAL_CFG_NO_CPP0X_TUPLE)
-// If not C++11 tuple, we need to add get<N>(std::pair).
-
-////////////////////////////////////////////////////////////
-//                                                        //
-// Allow CGAL::cpp11::get<N>(std::pair), if N==0 or N==1. //
-//                                                        //
-// That is already in TR1 and C++11, but not in Boost.    //
-//                                                        //
-////////////////////////////////////////////////////////////
-template <std::size_t N, typename T1, typename T2>
-struct pair_get;
-
-template <typename T1, typename T2>
-struct pair_get<0, T1, T2> {
-  static T1& get(std::pair<T1, T2>& pair) { return pair.first; }
-  static const T1& get(const std::pair<T1, T2>& pair) { return pair.first; }
-}; // end specialization struct pair_get<0, T2, T2>
-
-template <typename T1, typename T2>
-struct pair_get<1, T1, T2> {
-  static T2& get(std::pair<T1, T2>& pair) { return pair.second; }
-  static const T2& get(const std::pair<T1, T2>& pair) { return pair.second; }
-}; // end specialization struct pair_get<0, T2, T2>
-
-template <std::size_t N, typename T1, typename T2>
-inline typename boost::tuples::element<N, boost::tuple<T1, T2> >::type&
-get(std::pair<T1, T2>& pair) {
-  return pair_get<N, T1, T2>::get(pair);
-}
-
-template <std::size_t N, typename T1, typename T2>
-inline const typename boost::tuples::element<N, boost::tuple<T1, T2> >::type&
-get(const std::pair<T1, T2>& pair) { 
-  return pair_get<N, T1, T2>::get(pair);
-}
-
-#endif // end if not C++11 tuple
-
-
-} // cpp11
-
-namespace cpp0x = cpp11;
-
-#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
-
-// Tool to test whether a type V is among the types of a tuple<...> = T.
-template <typename V, typename T>
-struct Is_in_tuple;
-
-template <typename V, typename T0, typename... T>
-struct Is_in_tuple <V, cpp11::tuple<T0, T...> >
-{
-  static const bool value = Is_in_tuple<V, cpp11::tuple<T...> >::value;
-};
-
-template <typename V, typename... T>
-struct Is_in_tuple <V, cpp11::tuple<V, T...> >
-{
-  static const bool value = true;
-};
-
-template <typename V>
-struct Is_in_tuple <V, cpp11::tuple<> >
-{
-  static const bool value = false;
-};
-
-#else
-
-// Non-variadic version
-
-template <typename V,typename T>
-struct Is_in_tuple;
-
-template <typename V,typename T0,typename T1>
-struct Is_in_tuple <V,cpp11::tuple<T0,T1> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1> >::value;
-};
-
-template <typename V, typename T0,typename T1,typename T2>
-struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2> >::value;
-};
-
-template <typename V, typename T0,typename T1,typename T2,typename T3>
-struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3> >::value;
-};
-
-template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4>
-struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4> >::value;
-};
-
-template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4,typename T5>
-struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4,T5> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4,T5> >::value;
-};
-
-template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
-struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4,T5,T6> >
-{
-  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4,T5,T6> >::value;
-};
-
-
-//Conclusions
-
-template <typename V,typename T1>
-struct Is_in_tuple <V,cpp11::tuple<T1> >
-{
-  static const bool value = false;
-};
-
-template <typename V>
-struct Is_in_tuple <V,cpp11::tuple<V> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1>
-struct Is_in_tuple <V,cpp11::tuple<V,T1> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1,typename T2>
-struct Is_in_tuple <V,cpp11::tuple<V,T1,T2> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1,typename T2,typename T3>
-struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1,typename T2,typename T3,typename T4>
-struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1,typename T2,typename T3,typename T4,typename T5>
-struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4,T5> >
-{
-  static const bool value = true;
-};
-
-template <typename V,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
-struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4,T5,T6> >
-{
-  static const bool value = true;
-};
-
-
-#endif 
-
-} //namespace CGAL
-
-#endif // CGAL_TUPLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/vector.h b/3rdparty/CGAL-4.6/include/CGAL/vector.h
deleted file mode 100644
index 8be7fde..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/vector.h
+++ /dev/null
@@ -1,620 +0,0 @@
-// Copyright (c) 1997, 1998, 1999, 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
-//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
-
-#ifndef CGAL_VECTOR_H
-#define CGAL_VECTOR_H 1
-
-#include <CGAL/basic.h>
-#include <CGAL/memory.h>
-#include <iterator>
-#include <algorithm>
-#include <memory>
-#include <cstddef>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-
-namespace CGAL {
-
-namespace internal {
-
-// We give the vector container class a class based iterator implementation.
-// It ensures that iterator_traits work on compilers not supporting
-// partial specializations and it guarantees that default initialization
-// initializes the internal pointer to 0. Allows explicit construction 
-// from a pointer.
-
-template < class T, class Ref, class Ptr>
-class vector_iterator {
-private:
-    Ptr ptr;
-public:
-    typedef vector_iterator< T, Ref, Ptr>      Self;
-    typedef T                                  value_type;
-    typedef Ref                                reference;
-    typedef Ptr                                pointer;
-    typedef std::ptrdiff_t                     difference_type;
-    typedef std::random_access_iterator_tag    iterator_category;
-
-    // CREATION
-    // --------
-    vector_iterator() : ptr(0) {}                // explicitly set to 0
-    explicit vector_iterator( Ptr p) : ptr(p) {} // construction from pointer
-
-    // Allows construction of const_iterator from iterator
-    template < class A, class B, class C>
-    vector_iterator( const vector_iterator<A,B,C>& i) : ptr( &*i) {}
-
-    // OPERATIONS Forward Category
-    // ---------------------------
-
-    bool      operator==( const Self& i) const { return ( ptr == i.ptr); }
-    bool      operator!=( const Self& i) const { return !(*this == i); }
-    reference operator*()                const { return *ptr; }
-    pointer   operator->()               const { return ptr; }
-    Self& operator++() {
-        ++ptr;
-        return *this;
-    }
-    Self  operator++(int) {
-        Self tmp = *this;
-        ++*this;
-        return tmp;
-    }
-
-    // OPERATIONS Bidirectional Category
-    // ---------------------------------
-    Self& operator--() {
-        --ptr;
-        return *this;
-    }
-    Self  operator--(int) {
-        Self tmp = *this;
-        --*this;
-        return tmp;
-    }
-
-    // OPERATIONS Random Access Category
-    // ---------------------------------
-    Self& operator+=( difference_type n) {
-        ptr += n;
-        return *this;
-    }
-    Self  operator+( difference_type n) const {
-        Self tmp = *this;
-        return tmp += n;
-    }
-    Self& operator-=( difference_type n) { return operator+=( -n); }
-    Self  operator-( difference_type n) const {
-        Self tmp = *this;
-        return tmp += -n;
-    }
-    difference_type  operator-( const Self& i) const { return ptr - i.ptr; }
-    reference  operator[]( difference_type n) const {
-        Self tmp = *this;
-        tmp += n;
-        return tmp.operator*();
-    }
-    bool operator< ( const Self& i) const { return ( ptr < i.ptr); }
-    bool operator> ( const Self& i) const { return i < *this;    }
-    bool operator<=( const Self& i) const { return !(i < *this); }
-    bool operator>=( const Self& i) const { return !(*this < i); }
-
-    vector_iterator<  T,
-                      typename boost::remove_const<
-                        typename boost::remove_reference<Ref>::type
-                      >::type&,
-                      typename boost::remove_const<
-                          typename boost::remove_pointer<Ptr>::type
-                      >::type* >
-    remove_const() const
-    {
-      typedef typename boost::remove_const<
-                typename boost::remove_pointer<Ptr>::type
-              >::type* Ptr_no_c;
-      return  vector_iterator< T,
-                     typename boost::remove_const<typename boost::remove_reference<Ref>::type>::type&,
-                     Ptr_no_c>
-              ( const_cast<Ptr_no_c>(ptr) );
-    }
-};
-
-template < class T, class Ref, class Ptr> inline
-vector_iterator<T,Ref,Ptr> 
-operator+( std::ptrdiff_t n, vector_iterator<T,Ref,Ptr> i) {
-    return i += n;
-}
-
-
-template < class T, class Alloc = CGAL_ALLOCATOR(T)>
-class vector {
-public:
-    typedef Alloc           Allocator;
-    typedef Alloc           allocator_type; // STL compliant
-
-    // Note: the standard requires the following types to be equivalent
-    // to T, T*, const T*, T&, const T&, size_t, and ptrdiff_t, respectively.
-    // So we don't pass these types to the iterators explicitly.
-    typedef typename Allocator::value_type           value_type;
-    typedef typename Allocator::pointer              pointer;
-    typedef typename Allocator::const_pointer        const_pointer;
-    typedef typename Allocator::reference            reference;
-    typedef typename Allocator::const_reference      const_reference;
-    typedef typename Allocator::size_type            size_type;
-    typedef typename Allocator::difference_type      difference_type;
-    typedef std::random_access_iterator_tag          iterator_category;
-    typedef vector_iterator< T, reference, pointer>  iterator;
-    typedef vector_iterator< T, const_reference, const_pointer>
-                                                     const_iterator;
-    typedef vector< T, Alloc>                        Self;
-
-    typedef std::reverse_iterator<iterator>          reverse_iterator;
-    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
-
-protected:
-#ifndef _MSC_VER
-    // Somehow the static initialization does not work correctly for MSVC
-    // ---> strange linker errors
-    static
-#endif // _MSC_VER
-    Allocator alloc;
-
-    iterator start_;
-    iterator finish;
-    iterator end_of_storage;
-
-    // ALLOCATION AND CONSTRUCTION HELPERS
-    void construct( iterator i, const T& x) { alloc.construct( &*i, x);}
-    void destroy( iterator i) { alloc.destroy( &*i); }
-    void destroy( iterator first, iterator last) {
-        // destroy in reverse order than construction
-        while ( last != first) {
-            --last;
-            destroy( last);
-        }
-    }
-    void deallocate() {
-        if ( &*start_)
-            alloc.deallocate( &*start_, end_of_storage - start_ );
-    }
-
-protected:
-    // pointer versions of begin()/end() to call the various
-    // standard algorithms with the (possibly) more efficient pointers.
-    pointer         pbegin()         { return &*start_; }
-    const_pointer   pbegin()   const { return &*start_; }
-    pointer         pend()           { return &*finish; }
-    const_pointer   pend()     const { return &*finish; }
-
-public:
-    // ACCESS
-    // ------
-    iterator        begin()          { return start_; }
-    const_iterator  begin()    const { return start_; }
-    iterator        end()            { return finish; }
-    const_iterator  end()      const { return finish; }
-    size_type       size()     const { return size_type(end() - begin()); }
-    size_type       max_size() const { return size_type(-1) / sizeof(T); }
-    size_type       capacity() const {
-                        return size_type(end_of_storage - start_);
-    }
-    bool            empty()    const { return begin() == end(); }
-
-    reference       front()          { return *begin(); }
-    const_reference front()    const { return *begin(); }
-    reference       back()           { return *(end() - 1); }
-    const_reference back()     const { return *(end() - 1); }
-    reference       operator[] ( size_type n)       { return *(begin() + n); }
-    const_reference operator[] ( size_type n) const { return *(begin() + n); }
-    reference       at( size_type n)                { return *(begin() + n); }
-    const_reference at( size_type n)          const { return *(begin() + n); }
-
-    Allocator       get_allocator() const { return alloc; }
-
-    reverse_iterator       rbegin() { return reverse_iterator(end()); }
-    const_reverse_iterator rbegin() const {
-        return const_reverse_iterator(end());
-    }
-    reverse_iterator       rend() { return reverse_iterator(begin()); }
-    const_reverse_iterator rend() const {
-        return const_reverse_iterator(begin());
-    }
-
-
-    // COMPARISON
-    // ----------
-    bool      operator==( const Self& y) const {
-        return size() == y.size() && std::equal( pbegin(), pend(), y.pbegin());
-    }
-    bool      operator!=( const Self& y) const { return !(*this == y); }
-    bool operator< ( const Self& y) const {
-        return std::lexicographical_compare( pbegin(),   pend(),
-                                             y.pbegin(), y.pend());
-    }
-    bool operator> ( const Self& y) const { return y < *this;    }
-    bool operator<=( const Self& y) const { return !(y < *this); }
-    bool operator>=( const Self& y) const { return !(*this < y); }
-
-    // CREATION
-    // --------
-    explicit vector()
-        : start_(0), finish(0), end_of_storage(0) {}
-    explicit vector( const Alloc& a)
-        : start_(0), finish(0), end_of_storage(0) { alloc = a; }
-    explicit vector( size_type n, const T& val) { fill_initialize(n, val); }
-    explicit vector( size_type n) { fill_initialize(n, T()); }
-
-    vector( const Self& x) {
-        start_ = allocate_and_copy( x.end() - x.begin(), x.begin(), x.end());
-        finish = start_ + (x.end() - x.begin());
-        end_of_storage = finish;
-    }
-
-    template <class InputIterator>
-    vector( InputIterator first, InputIterator last, const Alloc& a = Alloc())
-        : start_(0), finish(0), end_of_storage(0)
-    {
-        alloc = a;
-        typedef std::iterator_traits<InputIterator> Traits;
-        typedef typename Traits::iterator_category  iterator_category;
-        range_initialize( first, last, iterator_category());
-    }
-
-    ~vector() { 
-        destroy( start_, finish);
-        deallocate();
-    }
-
-    vector<T, Alloc>& operator=(const Self& x) {
-        if (&x != this) {
-            if ( x.size() > capacity()) {
-                iterator tmp = allocate_and_copy( x.end() - x.begin(),
-                                                  x.begin(),
-                                                  x.end());
-                destroy( start_, finish);
-                deallocate();
-                start_ = tmp;
-                end_of_storage = start_ + (x.end() - x.begin());
-            } else if (size() >= x.size()) {
-                iterator i = std::copy( x.begin(), x.end(), begin());
-                destroy( i, finish);
-            } else {
-                std::copy( x.begin(), x.begin() + size(), begin());
-                std::uninitialized_copy(x.pbegin() + size(), x.pend(), pend());
-            }
-            finish = start_ + x.size();
-        }
-        return *this;
-    }
-
-    void swap( Self& x) {
-        std::swap( start_, x.start_);
-        std::swap( finish, x.finish);
-        std::swap( end_of_storage, x.end_of_storage);
-    }
-
-    void reserve( size_type n) {
-        if ( capacity() < n) {
-            const size_type old_size = size();
-            iterator tmp = allocate_and_copy( n, start_, finish);
-            destroy(start_, finish);
-            deallocate();
-            start_ = tmp;
-            finish = tmp + old_size;
-            end_of_storage = start_ + n;
-        }
-    }
-
-    // INSERTION
-    // ---------
-    void push_back( const T& x) {
-        if ( finish != end_of_storage) {
-            construct( finish, x);
-            ++finish;
-        } else {
-            insert_aux( end(), x);
-        }
-    }
-
-    iterator insert( iterator position, const T& x) {
-        size_type n = position - begin();
-        if (finish != end_of_storage && position == end()) {
-            construct( finish, x);
-            ++finish;
-        } else {
-            insert_aux( position, x);
-        }
-        return begin() + n;
-    }
-    iterator insert(iterator position) { return insert( position, T()); }
-
-    template <class InputIterator>
-    void insert( iterator position, InputIterator first, InputIterator last) {
-        typedef std::iterator_traits<InputIterator> Traits;
-        typedef typename Traits::iterator_category  iterator_category;
-        range_insert( position, first, last, iterator_category());
-    }
-    void insert( iterator pos, size_type n, const T& x);
-
-    // REMOVAL
-    // -------
-    void pop_back() {
-        --finish;
-        destroy( finish);
-    }
-    iterator erase( iterator position) {
-        if (position + 1 != end())
-            std::copy( position + 1, finish, position);
-        --finish;
-        destroy(finish);
-        return position;
-    }
-    iterator erase( iterator first, iterator last) {
-        iterator i = std::copy( last, finish, first);
-        destroy( i, finish);
-        finish = finish - (last - first);
-        return first;
-    }
-    void clear() { erase( begin(), end()); }
-
-    // ASSIGNMENT
-    // ----------
-    template <class InputIterator>
-    void assign( InputIterator first, InputIterator last) {
-        clear();
-        insert( begin(), first, last);
-    }
-    void assign( size_type n, const T& u) {
-        clear();
-        insert( begin(), n, u);
-    }
-
-    void resize( size_type new_size, const T& x) {
-        if (new_size < size()) 
-            erase( begin() + new_size, end());
-        else
-            insert( end(), new_size - size(), x);
-    }
-    void resize( size_type new_size) { resize( new_size, T()); }
-
-protected:
-    // INTERNAL
-    // --------
-    void insert_aux( iterator position, const T& x);
-
-    void fill_initialize( size_type n, const T& value) {
-        start_ = allocate_and_fill(n, value);
-        finish = start_ + n;
-        end_of_storage = finish;
-    }
-
-    iterator allocate_and_fill( size_type n, const T& x) {
-        iterator result = iterator( alloc.allocate(n));
-        try {
-            std::uninitialized_fill_n( &*result, n, x);
-            return result;
-        }
-        catch(...) { 
-            alloc.deallocate( &*result, n);
-            throw;
-        }
-    }
-
-    template <class ForwardIterator>
-    iterator allocate_and_copy( size_type n,
-                                ForwardIterator first,
-                                ForwardIterator last) {
-        iterator result = iterator( alloc.allocate(n));
-        try {
-            std::uninitialized_copy( first, last, &*result);
-            return result;
-        }
-        catch(...) { 
-            alloc.deallocate( &*result, n);
-            throw;
-        }
-    }
-
-    template <class InputIterator>
-    void range_initialize(InputIterator first,
-                          InputIterator last,
-                          std::input_iterator_tag) {
-        for ( ; first != last; ++first)
-            push_back(*first);
-    }
-
-    // This function is only called by the constructor.  We have to worry
-    //  about resource leaks, but not about maintaining invariants.
-    template <class ForwardIterator>
-    void range_initialize( ForwardIterator first,
-                           ForwardIterator last,
-                           std::forward_iterator_tag) {
-        size_type n = std::distance( first, last);
-        start_ = allocate_and_copy( n, first, last);
-        finish = start_ + n;
-        end_of_storage = finish;
-    }
-
-    template <class InputIterator>
-    void range_insert( iterator pos,
-                       InputIterator first,
-                       InputIterator last,
-                       std::input_iterator_tag) {
-        for ( ; first != last; ++first) {
-            pos = insert( pos, *first);
-            ++pos;
-        }
-    }
-
-    template <class ForwardIterator>
-    void range_insert( iterator position,
-                       ForwardIterator first,
-                       ForwardIterator last,
-                       std::forward_iterator_tag) {
-        if (first != last) {
-            size_type n = std::distance(first, last);
-            if ( size_type(end_of_storage - finish) >= n) {
-                const size_type elems_after = finish - position;
-                iterator old_finish = finish;
-                if (elems_after > n) {
-                    std::uninitialized_copy( pend() - n, pend(), pend());
-                    finish += n;
-                    std::copy_backward( position, old_finish - n, old_finish);
-                    std::copy( first, last, position);
-                } else {
-                    ForwardIterator mid = first;
-                    std::advance( mid, elems_after);
-                    std::uninitialized_copy( mid, last, pend());
-                    finish += n - elems_after;
-                    std::uninitialized_copy( position, old_finish, pend());
-                    finish += elems_after;
-                    std::copy( first, mid, position);
-                }
-            } else {
-                const size_type old_size = size();
-                const size_type len = old_size + (std::max)( old_size, n);
-                iterator new_start = iterator( alloc.allocate(len));
-                iterator new_finish = new_start;
-                try {
-                    new_finish = iterator( 
-                        std::uninitialized_copy(start_, position,&*new_start));
-                    new_finish = iterator(
-                        std::uninitialized_copy( first, last, &*new_finish));
-                    new_finish = iterator( 
-                        std::uninitialized_copy(position,finish,&*new_finish));
-                }
-                catch(...) {
-                    destroy( new_start, new_finish);
-                    alloc.deallocate( &*new_start, len);
-                    throw;
-                }
-                destroy( start_, finish);
-                deallocate();
-                start_ = new_start;
-                finish = new_finish;
-                end_of_storage = new_start + len;
-            }
-        }
-    }
-}; // class vector
-
-#ifndef _MSC_VER
-// init static member allocator object
-template <class T, class Alloc>
-Alloc vector< T, Alloc>::alloc = Alloc();
-#endif // _MSC_VER
-
-
-template <class T, class Alloc>
-inline void swap( vector<T, Alloc>& x, vector<T, Alloc>& y) {
-    x.swap(y);
-}
-
-template <class T, class Alloc>
-void vector<T, Alloc>::insert_aux( iterator position, const T& x) {
-    if ( finish != end_of_storage) {
-        construct( finish, *(finish - 1));
-        ++finish;
-        T x_copy = x;
-        std::copy_backward( position, finish - 2, finish - 1);
-        *position = x_copy;
-    } else {
-        const size_type old_size = size();
-        const size_type len = old_size != 0 ? 2 * old_size : 1;
-        iterator new_start = iterator( alloc.allocate(len));
-        iterator new_finish = new_start;
-        try {
-            new_finish = iterator(
-                std::uninitialized_copy(start_, position, &*new_start));
-            construct( new_finish, x);
-            ++new_finish;
-            new_finish = iterator(
-                std::uninitialized_copy(position,finish,&*new_finish));
-        }
-        catch(...) {
-            destroy( new_start, new_finish); 
-            alloc.deallocate( &*new_start, len);
-            throw;
-        }
-        destroy( begin(), end());
-        deallocate();
-        start_ = new_start;
-        finish = new_finish;
-        end_of_storage = new_start + len;
-    }
-}
-
-
-template <class T, class Alloc>
-void vector<T, Alloc>::insert( iterator position, size_type n, const T& x) {
-    if (n != 0) {
-        if ( size_type(end_of_storage - finish) >= n) {
-            T x_copy = x;
-            const size_type elems_after = finish - position;
-            iterator old_finish = finish;
-            if (elems_after > n) {
-                std::uninitialized_copy( pend() - n, pend(), pend());
-                finish += n;
-                std::copy_backward( position, old_finish - n, old_finish);
-                std::fill( position, position + n, x_copy);
-            } else {
-                std::uninitialized_fill_n( pend(), n - elems_after, x_copy);
-                finish += n - elems_after;
-                std::uninitialized_copy( position, old_finish, pend());
-                finish += elems_after;
-                std::fill(position, old_finish, x_copy);
-            }
-        } else {
-            const size_type old_size = size();        
-            const size_type len = old_size + (std::max)(old_size, n);
-            iterator new_start = iterator( alloc.allocate(len));
-            iterator new_finish = new_start;
-            try {
-                new_finish = iterator(
-                    std::uninitialized_copy( start_, position, &*new_start));
-                std::uninitialized_fill_n( &*new_finish, n, x);
-                new_finish += n;
-                new_finish = iterator( 
-                    std::uninitialized_copy( position, finish, &*new_finish));
-            }
-            catch(...) {
-                destroy( new_start, new_finish);
-                alloc.deallocate( &*new_start, len);
-                throw;
-            }
-            destroy( start_, finish);
-            deallocate();
-            start_ = new_start;
-            finish = new_finish;
-            end_of_storage = new_start + len;
-        }
-    }
-}
-
-} // namespace internal
-
-} //namespace CGAL
-
-#endif // CGAL_VECTOR_H //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/version.h b/3rdparty/CGAL-4.6/include/CGAL/version.h
deleted file mode 100644
index a9da7b4..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/version.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2006  Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// Author(s)     : -
-
-// This file is automatically created by create_internal_release.
-// Do not edit manually.
-
-#ifndef CGAL_VERSION_H
-#define CGAL_VERSION_H
-
-#define CGAL_xstr(s) #s
-#define CGAL_str(s) CGAL_xstr(s)
-
-#define CGAL_VERSION 4.6
-#define CGAL_VERSION_NR 1040601000
-#define CGAL_SVN_REVISION 99999
-#define CGAL_GIT_HASH 5b8ada41308c96d3989f7cb890f6457de626cff4
-#define CGAL_VERSION_STR CGAL_str(CGAL_VERSION)
-
-#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/wlop_simplify_and_regularize_point_set.h b/3rdparty/CGAL-4.6/include/CGAL/wlop_simplify_and_regularize_point_set.h
deleted file mode 100644
index 582c70c..0000000
--- a/3rdparty/CGAL-4.6/include/CGAL/wlop_simplify_and_regularize_point_set.h
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
-
-#ifndef CGAL_wlop_simplify_and_regularize_point_set_H
-#define CGAL_wlop_simplify_and_regularize_point_set_H
-
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Orthogonal_k_neighbor_search.h>
-#include <CGAL/property_map.h>
-#include <CGAL/point_set_processing_assertions.h>
-#include <CGAL/Timer.h>
-#include <CGAL/Memory_sizer.h>
-#include <CGAL/compute_average_spacing.h>
-
-#include <iterator>
-#include <set>
-#include <algorithm>
-#include <cmath>
-#include <ctime>
-
-#ifdef CGAL_LINKED_WITH_TBB
-#include <tbb/parallel_for.h>
-#include <tbb/blocked_range.h>
-#endif // CGAL_LINKED_WITH_TBB
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Fuzzy_sphere.h>
-#include <CGAL/Search_traits_3.h>
-#include <CGAL/Bbox_3.h>
-
-namespace CGAL {
-// ----------------------------------------------------------------------------
-// Private section
-// ----------------------------------------------------------------------------
-/// \cond SKIP_IN_MANUAL
-
-namespace simplify_and_regularize_internal{
-
-// Item in the Kd-tree: position (Point_3) + index
-template <typename Kernel>
-class Kd_tree_element : public Kernel::Point_3
-{
-public:
-  unsigned int index;
-
-  // basic geometric types
-  typedef typename CGAL::Origin Origin;
-  typedef typename Kernel::Point_3 Base;
-
-  Kd_tree_element(const Origin& o = ORIGIN, unsigned int id=0)
-    : Base(o), index(id)
-  {}
-  Kd_tree_element(const Base& p, unsigned int id=0)
-    : Base(p), index(id)
-  {}
-  Kd_tree_element(const Kd_tree_element& other)
-    : Base(other), index(other.index)
-  {}
-};
-
-// Helper class for the Kd-tree
-template <typename Kernel>
-class Kd_tree_gt : public Kernel
-{
-public:
-  typedef Kd_tree_element<Kernel> Point_3;
-};
-
-template <typename Kernel>
-class Kd_tree_traits : public CGAL::Search_traits_3<Kd_tree_gt<Kernel> >
-{
-public:
-  typedef typename Kernel::Point_3 PointType;
-};
-
-/// Compute average and repulsion term, then 
-/// compute and update sample point locations
-/// 
-/// \pre `radius > 0`
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree Kd-tree.
-///
-/// @return average term vector
-template <typename Kernel,
-          typename Tree,
-          typename RandomAccessIterator>
-typename Kernel::Point_3
-compute_update_sample_point(
-  const typename Kernel::Point_3& query, ///< 3D point to project
-  const Tree& original_kd_tree,          ///< original Kd-tree
-  const Tree& sample_kd_tree,            ///< sample Kd-tree
-  const typename Kernel::FT radius,      ///< neighborhood radius square
-  const std::vector<typename Kernel::FT>& original_densities, ///<  
-  const std::vector<typename Kernel::FT>& sample_densities ///< 
-)
-{
-  CGAL_point_set_processing_precondition(radius > 0);
-  bool is_original_densities_empty = original_densities.empty();
-  bool is_sample_densities_empty = sample_densities.empty();
-
-  // basic geometric types
-  typedef typename Kernel::Point_3 Point;
-  typedef typename Kernel::Vector_3 Vector;
-  typedef typename Kernel::FT FT;
-
-  //types for range search
-  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
-  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
-  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
-
-  //range search for original neighborhood
-  Fuzzy_sphere fs(query, radius, 0.0);
-  std::vector<Kd_tree_point> neighbor_original_points;
-  original_kd_tree.search(std::back_inserter(neighbor_original_points), fs);
-
-  //Compute average term
-  FT radius2 = radius * radius;
-  Vector average = CGAL::NULL_VECTOR; 
-  FT weight = (FT)0.0, average_weight_sum = (FT)0.0;
-  FT iradius16 = -(FT)4.0 / radius2;
-
-  typename std::vector<Kd_tree_point>::iterator iter;
-  iter = neighbor_original_points.begin();
-  for (; iter != neighbor_original_points.end(); ++iter)
-  {
-    const Point& np = *iter;
-
-    Kd_tree_point& kp = *iter;
-    int original_index = kp.index;
-
-    FT dist2 = CGAL::squared_distance(query, np);
-    if (dist2 < 1e-10) continue;
-
-    weight = exp(dist2 * iradius16);
-
-    if (!is_original_densities_empty)
-    {
-      weight *= original_densities[original_index];
-    }
-    average_weight_sum += weight;
-    average = average + (np - CGAL::ORIGIN) * weight;
-  }
-
-  if (neighbor_original_points.empty() || average_weight_sum < FT(1e-10))
-  {
-    average = query - CGAL::ORIGIN;
-  }
-  else
-  {
-    average = average / average_weight_sum; 
-  }
-  neighbor_original_points.clear();
-  
-
-  //Compute repulsion term
-
-  Fuzzy_sphere fs2(query, radius, 0.0);
-  std::vector<Kd_tree_point> neighbor_sample_points;
-  sample_kd_tree.search(std::back_inserter(neighbor_sample_points), fs2);
-
-  weight = (FT)0.0;
-  FT repulsion_weight_sum = (FT)0.0;
-  Vector repulsion = CGAL::NULL_VECTOR; 
-
-  iter = neighbor_sample_points.begin();
-  for(; iter != neighbor_sample_points.end(); ++iter)
-  {
-    const Point& np = *iter;
-
-    Kd_tree_point& kp = *iter;
-    int sample_index = kp.index;
-
-    FT dist2 = CGAL::squared_distance(query, np);
-    if (dist2 < 1e-10) continue;
-    FT dist = std::sqrt(dist2);
-    
-    weight = std::exp(dist2 * iradius16) * std::pow(FT(1.0) / dist, 2); // L1
-   
-    if (!is_sample_densities_empty)
-    {
-      weight *= sample_densities[sample_index];
-    }
-
-    Vector diff = query - np;
-
-    repulsion_weight_sum += weight;
-    repulsion = repulsion + diff * weight;
-  }
-
-  if (neighbor_sample_points.size() < 3 || repulsion_weight_sum < FT(1e-10))
-  {
-    repulsion = CGAL::NULL_VECTOR;
-  }
-  else
-  {
-    repulsion = repulsion / repulsion_weight_sum; 
-  }
-  neighbor_sample_points.clear();
-
-  // Compute update sample point
-  Point update_sample = CGAL::ORIGIN + average + FT(0.45) * repulsion;
-  return update_sample;
-}
-
-
-/// Compute density weight for each original points,
-/// according to their neighbor original points
-/// 
-/// \pre `k >= 2`, radius > 0
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree Kd-tree.
-///
-/// @return computed point
-template <typename Kernel, typename Tree>
-typename Kernel::FT
-compute_density_weight_for_original_point(
-  const typename Kernel::Point_3& query, ///< 3D point to project
-  Tree& original_kd_tree,                       ///< Kd-tree
-  const typename Kernel::FT radius       ///< neighbor radius square
-)
-{
-  CGAL_point_set_processing_precondition(radius > 0);
-
-  // basic geometric types
-  typedef typename Kernel::Point_3                         Point;
-  typedef typename Kernel::FT                              FT;
-                                                          
-  //types for range search
-  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
-  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
-  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
-
-  //range search for original neighborhood
-  Fuzzy_sphere fs(query, radius, 0.0);
-  std::vector<Kd_tree_point> neighbor_original_points;
-
-  original_kd_tree.search(std::back_inserter(neighbor_original_points), fs);
-
-  //Compute density weight
-  FT radius2 = radius * radius;
-  FT density_weight = (FT)1.0;
-  FT iradius16 = -(FT)4.0 / radius2;
-
-  typename std::vector<Kd_tree_point>::iterator iter;
-  iter = neighbor_original_points.begin();
-
-  for (; iter != neighbor_original_points.end(); iter++)
-  {
-    const Point& np = *iter;
-
-    FT dist2 = CGAL::squared_distance(query, np);
-    if (dist2 < 1e-8) continue;
-    
-    density_weight += std::exp(dist2 * iradius16);
-  }
-
-  // output
-  return FT(1.0) / density_weight;
-}
-
-
-/// Compute density weight for sample point,
-/// according to their neighbor sample points
-/// 
-/// \pre `k >= 2`, radius > 0
-///
-/// @tparam Kernel Geometric traits class.
-/// @tparam Tree Kd-tree.
-///
-/// @return computed point
-template <typename Kernel, typename Tree>
-typename Kernel::FT
-compute_density_weight_for_sample_point(
-  const typename Kernel::Point_3& query, ///< 3D point to project
-  Tree& sample_kd_tree,                ///< Kd-tree
-  const typename Kernel::FT radius       ///< neighbor radius square
-)
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3                          Point;
-  typedef typename Kernel::FT                               FT;
-
-  //types for range search
-  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
-  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
-  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
-
-  //range search for original neighborhood
-  Fuzzy_sphere fs(query, radius, 0.0);
-  std::vector<Kd_tree_point> neighbor_sample_points;
-  sample_kd_tree.search(std::back_inserter(neighbor_sample_points), fs);
-
-  //Compute density weight
-  FT radius2 = radius * radius;
-  FT density_weight = (FT)1.0;
-  FT iradius16 = -(FT)4.0 / radius2;
-
-  typename std::vector<Kd_tree_point>::iterator iter;
-  iter = neighbor_sample_points.begin();
-
-  for (; iter != neighbor_sample_points.end(); iter++)
-  {
-    const Point& np = *iter;
-
-    FT dist2 = CGAL::squared_distance(query, np);
-    density_weight += std::exp(dist2 * iradius16);
-  }
-  
-  return density_weight;
-}
-
-} // namespace simplify_and_regularize_internal
-
-/// \endcond
-
-#ifdef CGAL_LINKED_WITH_TBB
-/// \cond SKIP_IN_MANUAL
-/// This is for parallelization of function: compute_denoise_projection()
-template <typename Kernel, typename Tree, typename RandomAccessIterator>
-class Sample_point_updater 
-{
-  typedef typename Kernel::Point_3   Point;
-  typedef typename Kernel::FT        FT;
-
-  std::vector<Point> &update_sample_points;
-  std::vector<Point> &sample_points;
-  const Tree &original_kd_tree;            
-  const Tree &sample_kd_tree;              
-  const typename Kernel::FT radius;  
-  const std::vector<typename Kernel::FT> &original_densities;
-  const std::vector<typename Kernel::FT> &sample_densities; 
-
-public:
-  Sample_point_updater(
-    std::vector<Point> &out,
-    std::vector<Point> &in,
-    const Tree &_original_kd_tree,            
-    const Tree &_sample_kd_tree,              
-    const typename Kernel::FT _radius,
-    const std::vector<typename Kernel::FT> &_original_densities,
-    const std::vector<typename Kernel::FT> &_sample_densities): 
-  update_sample_points(out), 
-    sample_points(in),
-    original_kd_tree(_original_kd_tree),
-    sample_kd_tree(_sample_kd_tree),
-    radius(_radius),
-    original_densities(_original_densities),
-    sample_densities(_sample_densities){} 
-
-
-  void operator() ( const tbb::blocked_range<size_t>& r ) const 
-  { 
-    for (size_t i = r.begin(); i != r.end(); ++i) 
-    {
-      update_sample_points[i] = simplify_and_regularize_internal::
-        compute_update_sample_point<Kernel, Tree, RandomAccessIterator>(
-        sample_points[i], 
-        original_kd_tree,
-        sample_kd_tree,
-        radius, 
-        original_densities,
-        sample_densities);
-    }
-  }
-};
-/// \endcond  
-#endif // CGAL_LINKED_WITH_TBB
-
-
-// ----------------------------------------------------------------------------
-// Public section
-// ----------------------------------------------------------------------------
-
-//=============================================================================
-/// \ingroup PkgPointSetProcessing
-/// This is an implementation of the Weighted Locally Optimal Projection (WLOP) simplification algorithm.
-/// The WLOP simplification algorithm can produce a set of 
-/// denoised, outlier-free and evenly distributed particles over the original 
-/// dense point cloud. 
-/// The core of the algorithm is a Weighted Locally Optimal Projection operator
-/// with a density uniformization term. 
-/// For more details, please refer to \cgalCite{wlop-2009}.
-///
-/// A parallel version of WLOP is provided and requires the executable to be 
-/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
-/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
-/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a> 
-/// for more details.
-///
-/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
-///                         Possible values are `Sequential_tag`
-///                         and `Parallel_tag`.
-/// @tparam OutputIterator Type of the output iterator. 
-///         It must accept objects of type `Kernel::Point_3`.
-/// @tparam RandomAccessIterator Iterator over input points.
-/// @tparam PointPMap is a model of `ReadablePropertyMap` 
-///         with the value type of `ForwardIterator` as key type and `Kernel::Point_3` as value type.
-///         It can be omitted if the value type of ` RandomAccessIterator` is convertible  
-///         to `Kernel::Point_3`.
-/// @tparam Kernel Geometric traits class.
-///      It can be omitted and deduced automatically from the value type of `PointPMap`
-///      using `Kernel_traits`.
-
-// This variant requires all parameters.
-template <typename Concurrency_tag,
-          typename OutputIterator,
-          typename RandomAccessIterator,
-          typename PointPMap,
-          typename Kernel>
-OutputIterator
-wlop_simplify_and_regularize_point_set(
-  RandomAccessIterator first,  ///< random-access iterator to the first input point.
-  RandomAccessIterator beyond, ///< past-the-end iterator.
-  OutputIterator output,       ///< output iterator where output points are put.
-  PointPMap point_pmap,        ///< point property map.
-  double select_percentage,    ///< percentage of points to retain. 
-                               ///< The default value is set to 5 (\%).
-  double radius,               ///< spherical neighborhood radius.
-                               ///< This is a key parameter that needs to be finely tuned.  
-                               ///< The result will be irregular if too small, but a larger
-                               ///< value will impact the runtime.
-                               ///< In practice, choosing a radius such that the neighborhood of each sample point
-                               ///< includes at least two rings of neighboring sample points
-                               ///< gives satisfactory result.
-                               ///< The default value is set to 8 times the average spacing of the point set.
-  unsigned int iter_number,    ///< number of iterations to solve the optimsation problem. The default value is 35.
-                               ///< More iterations give a more regular result but increase the runtime.
-  bool require_uniform_sampling,///< an optional preprocessing, which will give better result
-                               ///< if the distribution of the input points is highly non-uniform. 
-                               ///< The default value is `false`. 
-  const Kernel&                ///< geometric traits.
-)
-{
-  // basic geometric types
-  typedef typename Kernel::Point_3   Point;
-  typedef typename Kernel::FT        FT;
-
-  // types for K nearest neighbors search structure
-  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_element;
-  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Tree_traits;
-  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
-  typedef typename Neighbor_search::Tree Kd_Tree;
-
-  // precondition: at least one element in the container.
-  // to fix: should have at least three distinct points
-  // but this is costly to check
-  CGAL_point_set_processing_precondition(first != beyond);
-  CGAL_point_set_processing_precondition(select_percentage >= 0 
-                                         && select_percentage <= 100);
-
-  // Random shuffle
-  std::random_shuffle (first, beyond);
-
-  // Computes original(input) and sample points size 
-  std::size_t number_of_original = std::distance(first, beyond);
-  std::size_t number_of_sample = (std::size_t)(FT(number_of_original) * 
-                                 (select_percentage / FT(100.0)));
-  std::size_t first_index_to_sample = number_of_original - number_of_sample;
-
-  // The first point iter of original and sample points
-  RandomAccessIterator it;                             // point iterator
-  RandomAccessIterator first_original_iter = first;
-  RandomAccessIterator first_sample_iter = first;
-  std::advance(first_sample_iter, first_index_to_sample);
-
-  //Copy sample points
-  std::vector<Point> sample_points;
-  sample_points.reserve(number_of_sample);
-  unsigned int i;                                     
-
-  for(it = first_sample_iter; it != beyond; ++it)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-    sample_points.push_back(get(point_pmap, it));
-#else
-    sample_points.push_back(get(point_pmap, *it));
-#endif
-  }
-  
-  //compute default neighbor_radius, if no radius in
-  if (radius < 0)
-  {
-    const unsigned int nb_neighbors = 6; // 1 ring
-    FT average_spacing = CGAL::compute_average_spacing(
-                               first, beyond,
-                               point_pmap,
-                               nb_neighbors);
-    radius = average_spacing * 8.0;
-
-#ifdef CGAL_PSP3_VERBOSE
-    std::cout << "The estimated radius size is: " << radius << std::endl;
-    std::cout << "Be careful! Using this radius estimation may not be able to have good performance/result for different input" << std::endl;
-#endif
-  }
-
-  FT radius2 = radius * radius;
-  CGAL_point_set_processing_precondition(radius > 0);
-
-  // Initiate a KD-tree search for original points
-  std::vector<Kd_tree_element> original_treeElements;
-  for (it = first_original_iter, i=0 ; it != beyond ; ++it, ++i)
-  {
-#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-      Point& p0 = get(point_pmap, it);
-#else
-      Point& p0 = get(point_pmap, *it);
-#endif 
-    
-    original_treeElements.push_back(Kd_tree_element(p0, i));
-  }
-  Kd_Tree original_kd_tree(original_treeElements.begin(), 
-                           original_treeElements.end());
-
-
-  std::vector<Point> update_sample_points(number_of_sample);
-  typename std::vector<Point>::iterator sample_iter;
-  
-  // Compute original density weight for original points if user needed
-  std::vector<FT> original_density_weights;
-
-  if (require_uniform_sampling)//default value is false
-  {
-    //todo: this part could also be parallelized if needed
-    for (it = first_original_iter, i = 0; it != beyond ; ++it, ++i)
-    {
-      FT density = simplify_and_regularize_internal::
-                   compute_density_weight_for_original_point<Kernel, Kd_Tree>
-                                         (
-                                         #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-                                           get(point_pmap, it),
-                                         #else
-                                           get(point_pmap, *it),
-                                         #endif  
-                                           original_kd_tree, 
-                                           radius);
-
-      original_density_weights.push_back(density);
-    }
-  }
-
-  for (unsigned int iter_n = 0; iter_n < iter_number; ++iter_n)
-  {
-    // Initiate a KD-tree search for sample points
-    std::vector<Kd_tree_element> sample_treeElements;
-    for (i=0 ; i < sample_points.size(); i++)
-    {
-      Point& p0 = sample_points[i];
-      sample_treeElements.push_back(Kd_tree_element(p0,i));
-    }
-    Kd_Tree sample_kd_tree(sample_treeElements.begin(), sample_treeElements.end());
-
-    // Compute sample density weight for sample points
-    std::vector<FT> sample_density_weights;
-
-    for (sample_iter = sample_points.begin();
-         sample_iter != sample_points.end(); ++sample_iter)
-    {
-      FT density = simplify_and_regularize_internal::
-                   compute_density_weight_for_sample_point<Kernel, Kd_Tree>
-                   (*sample_iter, 
-                    sample_kd_tree, 
-                    radius);
-
-      sample_density_weights.push_back(density);
-    }
-    
-
-    typename std::vector<Point>::iterator update_iter = update_sample_points.begin();
-    //parallel
-#ifdef CGAL_LINKED_WITH_TBB
-    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
-    {
-      tbb::blocked_range<size_t> block(0, number_of_sample);
-      Sample_point_updater<Kernel, Kd_Tree, RandomAccessIterator> sample_updater(
-                           update_sample_points,
-                           sample_points,          
-                           original_kd_tree,
-                           sample_kd_tree,
-                           radius, 
-                           original_density_weights,
-                           sample_density_weights);
-
-       tbb::parallel_for(block, sample_updater);
-    }else
-#endif
-    {
-      //sequential
-      for (sample_iter = sample_points.begin();
-        sample_iter != sample_points.end(); ++sample_iter, ++update_iter)
-      {
-        *update_iter = simplify_and_regularize_internal::
-          compute_update_sample_point<Kernel,
-                                      Kd_Tree,
-                                      RandomAccessIterator>
-                                      (*sample_iter,
-                                       original_kd_tree,
-                                       sample_kd_tree,
-                                       radius2,
-                                       original_density_weights,
-                                       sample_density_weights);
-      }
-    }
-    
-    sample_iter = sample_points.begin();
-    for (update_iter = update_sample_points.begin();
-         update_iter != update_sample_points.end();
-         ++update_iter, ++sample_iter)
-    {
-      *sample_iter = *update_iter;
-    }
-  }
-
-  // final output
-  for(sample_iter = sample_points.begin(); 
-      sample_iter != sample_points.end(); ++sample_iter)
-  {
-    *output++ = *sample_iter;
-  }
-
-  return output;
-}
-
-/// @cond SKIP_IN_MANUAL
-// This variant deduces the kernel from the iterator type.
-template <typename Concurrency_tag,
-          typename OutputIterator,     
-          typename RandomAccessIterator, 
-          typename PointPMap>
-OutputIterator 
-wlop_simplify_and_regularize_point_set(
-  RandomAccessIterator  first,  ///< iterator over the first input point
-  RandomAccessIterator  beyond, ///< past-the-end iterator
-  OutputIterator output,        ///< add back-inserter
-  PointPMap point_pmap, ///< property map RandomAccessIterator  -> Point_3
-  const double select_percentage,     ///< percentage of points to retain
-  double neighbor_radius,       ///< size of neighbors.
-  const unsigned int max_iter_number, ///< number of iterations.
-  const bool require_uniform_sampling     ///< if needed to compute density 
-                                      ///  to generate more rugularized result.                                 
-) 
-{
-  typedef typename boost::property_traits<PointPMap>::value_type  Point;
-  typedef typename Kernel_traits<Point>::Kernel                   Kernel;
-  
-  return wlop_simplify_and_regularize_point_set<Concurrency_tag>(
-      first, beyond,
-      output,
-      point_pmap,
-      select_percentage,
-      neighbor_radius,
-      max_iter_number,
-      require_uniform_sampling,
-      Kernel());
-}
-/// @endcond
-
-
-
-/// @cond SKIP_IN_MANUAL
-/// This variant creates a default point property map=Dereference_property_map.
-template <typename Concurrency_tag, 
-          typename OutputIterator,     
-          typename RandomAccessIterator >
-OutputIterator
-wlop_simplify_and_regularize_point_set(
-  RandomAccessIterator  first,  ///< iterator to the first input point.
-  RandomAccessIterator  beyond, ///< past-the-end iterator.
-  OutputIterator output,        ///< add back-inserter.
-  const double select_percentage = 5, ///< percentage of points to retain
-  double neighbor_radius = -1,  ///< size of neighbors.
-  const unsigned int max_iter_number = 35, ///< number of iterations.
-  const bool require_uniform_sampling = false ///< if needed to compute density   
-                                           ///to generate a more uniform result. 
-)
-{
-  return wlop_simplify_and_regularize_point_set<Concurrency_tag>(
-          first, beyond,
-          output,
-        #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
-          make_dereference_property_map(first),
-        #else
-          make_identity_property_map(typename std::iterator_traits
-                                     <RandomAccessIterator >::
-                                     value_type()),
-        #endif
-          select_percentage, 
-          neighbor_radius, 
-          max_iter_number, 
-          require_uniform_sampling);
-}
-/// @endcond
-
-} //namespace CGAL
-
-#endif // CGAL_wlop_simplify_and_regularize_point_set_H
diff --git a/3rdparty/CGAL-4.6/scripts/cgal_create_CMakeLists b/3rdparty/CGAL-4.6/scripts/cgal_create_CMakeLists
deleted file mode 100755
index 4304fa7..0000000
--- a/3rdparty/CGAL-4.6/scripts/cgal_create_CMakeLists
+++ /dev/null
@@ -1,709 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 1999,2000,2002-2007,2009,2011,2012
-# Utrecht University (The Netherlands),
-# ETH Zurich (Switzerland),
-# INRIA Sophia-Antipolis (France),
-# Max-Planck-Institute for Informatics Saarbruecken (Germany), 
-# and Tel-Aviv University (Israel).  All rights reserved.
-#
-# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 3 of the License,
-# or (at your option) any later version.
-#
-# Licensees holding a valid commercial license may use this file in
-# accordance with the commercial license agreement provided with the software.
-#
-# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Scripts/scripts/cgal_create_makefile $
-# $Id: cgal_create_makefile 36976 2007-03-09 22:53:24Z reichel $
-#
-# Author(s)     : various
-
-# This script creates a CGAL cmake script with entries for .C and .cpp
-# files in the current directory - some options can be given or specified in a file
-
-
-#LEDA
-#GMP
-#GMPXX
-#MPFR
-#MPFI
-#RS
-#BLAS
-#LAPACK
-#OPENNL
-#QGLViewer (or implied by Qt4?)
-#ESBTL
-#NTL
-
-#Core (implies GMP+GMPXX)
-#Qt3 (implies QT3)
-#Qt4 (implies QT4)
-#ImageIO
-
-#not (yet) supported
-#F2C (comes with BLAS/LAPACK - something like that)
-#IPE (ask Laurent)
-#MKL (ask Andreas)
-
-create_cmake_script_with_options()
-{
-  qt3='n'
-  qt4='n'
-
-  # parse options file
-  if [ -e "$OPTIONS_FILE" ]; then
-
-    OLDIFS="$IFS"
-    IFS=$'\n'
-    for LINE in `cat $OPTIONS_FILE`; do 
-
-      # CGAL components
-      if [ -z "$CGAL_COMPONENTS_GIVEN" ]; then # read file only if not given!
-        next_cgal_component=`echo $LINE | grep -v "#" | grep CGAL_COMPONENT`
-        if [ ! -z "$next_cgal_component" ]; then
-          next_cgal_component=${next_cgal_component/CGAL_COMPONENT /}
-          if [ -z "$CGAL_COMPONENTS" ]; then 
-            CGAL_COMPONENTS=$next_cgal_component
-          else
-            CGAL_COMPONENTS=$CGAL_COMPONENTS":"$next_cgal_component
-          fi
-        fi
-      fi
-
-      # Boost components
-      if [ -z "$BOOST_COMPONENTS_GIVEN" ]; then # read file only if not given!
-        next_boost_component=`echo $LINE | grep -v "#" | grep BOOST_COMPONENT`
-        if [ ! -z "$next_boost_component" ]; then
-          next_boost_component=${next_boost_component/BOOST_COMPONENT /}
-          if [ -z "$BOOST_COMPONENTS" ]; then 
-            BOOST_COMPONENTS=$next_boost_component
-          else
-            BOOST_COMPONENTS=$BOOST_COMPONENTS":"$next_boost_component
-          fi
-        fi
-      fi
-
-    done
-    IFS="$OLDIFS"
-  fi
-
-
-  # print makefile header
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-# Created by the script cgal_create_CMakeLists
-# This is the CMake script for compiling a set of CGAL applications.
-
-EOF
-  #---------------------------------------------------------------------------
-  if [ "$SINGLE_SOURCE" = "n" ]; then
-    echo "project( ${PROJECT} )"
-  else 
-    echo "project( ${SOURCE} )"
-  fi
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
- 
-if ( COMMAND cmake_policy )
-
-  cmake_policy( SET CMP0003 NEW )  
-
-endif()
-
-# CGAL and its components
-EOF
-if [ -n "$ENABLE_CTEST" ]; then
-  echo "enable_testing()"
-fi
-  #---------------------------------------------------------------------------
-  # echo "CGAL_COMPONENTS: $CGAL_COMPONENTS"
-  # echo "CGAL_PRECONFIGURED_LIBS: $CGAL_PRECONFIGURED_LIBS"
-  if [ ! -z "$CGAL_COMPONENTS" ]; then
-    # ensure capitalization
-
-    # CGAL: Core, Qt3, Qt4, PDB, ImageIO
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]3/Qt3}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO}
-  
-    # external libs
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P]/GMP}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P][x|X][x|X]/GMPXX}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[m|M][p|P][f|F][r|R]/MPFR}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[l|L][e|E][d|D][a|A]/LEDA}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[m|M][p|P][f|F][i|I]/MPFI}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[r|R][s|S]/RS}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[o|O][p|P][e|E][n|N][n|N][l|L]/OpenNL}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[b|B][l|L][a|A][s|S]/BLAS}
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[l|L][a|A][p|P][a|A][c|C][k|K]/LAPACK}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][g|G][l|L][v|V][i|I][e|E][w|W][e|E][r|R]/QGLViewer}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[z|Z][l|L][i|I][b|B]/zlib}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[e|E][s|S][b|B][t|T][l|L]/ESBTL}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[n|N][t|T][l|L]/NTL}
-
-    CGAL_COMPONENTS=${CGAL_COMPONENTS//[o|O][p|P][e|E][n|N][g|G][l|L]/OpenGL}
-
-
-#F2C?
-#IPE?
-#MKL?
-
-    OLDIFS="$IFS"
-    IFS=':'
-    for cgal_component in $CGAL_COMPONENTS; do
-      COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
-
-      # for qtmoc
-      if [ "$COMPONENT" = "qt3" ]; then
-        qt3='y'
-      fi
-      if [ "$COMPONENT" = "qt4" ]; then
-        qt4='y'
-      fi
-
-    done
-    IFS=$OLDIFS
-
-  fi
-
-  if [ "$CGAL_PRECONFIGURED_LIBS" = "y" ]; then
-    CGAL_COMPONENTS=${CGAL_COMPONENTS}" ALL_PRECONFIGURED_LIBS"
-  fi
-
-  echo "find_package( CGAL QUIET COMPONENTS ${CGAL_COMPONENTS//:/ } )"
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-if ( NOT CGAL_FOUND )
-
-  message(STATUS "This project requires the CGAL library, and will not be compiled.")
-  return()  
-
-endif()
-
-# include helper file
-include( ${CGAL_USE_FILE} )
-
-EOF
-  #---------------------------------------------------------------------------
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-# Boost and its components
-EOF
-  #---------------------------------------------------------------------------
-
-  if [ ! -z "$BOOST_COMPONENTS" ]; then
-
-    echo "find_package( Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS//:/ } )"
-
-  else
-
-    echo "find_package( Boost REQUIRED )"
-
-  fi # additional Boost components
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-if ( NOT Boost_FOUND )
-
-  message(STATUS "This project requires the Boost library, and will not be compiled.")
-
-  return()  
-
-endif()
-EOF
-  #---------------------------------------------------------------------------
-
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-# include for local directory
-EOF
-  #---------------------------------------------------------------------------
-
-  if [ -d include ] ; then
-    echo 'include_directories( BEFORE include )'
-  fi		
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-
-# include for local package
-EOF
-  #---------------------------------------------------------------------------
-
-  # includes for local package
-  if [ -d ../../include ] ; then
-    echo 'include_directories( BEFORE ../../include )'
-  fi
-  if [ -d ../include ] ; then
-    echo 'include_directories( BEFORE ../include )'
-  fi
-
-  if [ ! -z "$PACKAGES" ]; then
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-
-# include of additional packages
-EOF
-    #-------------------------------------------------------------------------
-  fi
-
-  # Qt3 or Qt4
-  if [ "$qt3" = "y" ]; then
-
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-
-# Qt3
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-find_package(Qt3-patched QUIET )
-
-if ( NOT QT3_FOUND )
-
-  message(STATUS "This project requires the Qt3 library, and will not be compiled.")
-  return()  
-
-endif()
-
-if ( CGAL_Qt3_FOUND )
-  
-  include( Qt3Macros-patched )
-
-endif()
-EOF
-    #-------------------------------------------------------------------------
-  fi # qt3
-
-  if [ "$qt4" = "y" ]; then
-
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-
-# Qt4
-set( QT_USE_QTXML     true )
-set( QT_USE_QTMAIN    true )
-set( QT_USE_QTSCRIPT  true )
-set( QT_USE_QTOPENGL  true )
-
-find_package(Qt4)  
-
-if ( NOT QT_FOUND )
-
-  message(STATUS "This project requires the Qt4 library, and will not be compiled.")
-  return()  
-
-endif()
-EOF
-    #-------------------------------------------------------------------------
-
-  fi #qt4
-
-  if [ ! -z "$BOOST_COMPONENTS" ]; then
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-
-# Boost linking
-EOF
-    #-------------------------------------------------------------------------
-
-    OLDIFS="$IFS"
-    IFS=':'
-    for boost_component in $BOOST_COMPONENTS; do
-      BOOST_COMPONENT=`echo $boost_component | tr '[:lower:]' '[:upper:]'`
-      echo "add_definitions( \"-DCGAL_USE_BOOST_${BOOST_COMPONENT}\" )"
-      echo "list(APPEND CGAL_3RD_PARTY_LIBRARIES \${Boost_${BOOST_COMPONENT}_LIBRARY} )"
-    done
-    IFS=$OLDIFS
-
-  fi # additional Boost components
-
-
-  # All Files or Single Source
-
-  if [ "$SINGLE_SOURCE" = "n" ]; then #=======================================
-
-    ###############
-    # ALL SOURCES #
-    ###############
-
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-
-
-# Creating entries for all .cpp/.C files with "main" routine
-# ##########################################################
-
-EOF
-    #-------------------------------------------------------------------------
-
-
-    if [ "$qt4" = "y" ]; then
-
-      echo "include( CGAL_CreateSingleSourceCGALProgramQt4 )"
-
-    else
- 
-      echo "include( CGAL_CreateSingleSourceCGALProgram )"
-
-    fi
-    # add a new line
-    echo
-
-    # Qt3
-    if [ "$qt3" = "y" ]; then
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-if ( CGAL_Qt3_FOUND AND QT3_FOUND )
-
-EOF
-      #-----------------------------------------------------------------------
-
-      for file in `ls *.C *.cpp 2> /dev/null | sort` ; do
-        # Create an executable for each cpp that  contains a function "main()"
-        BASE=`basename $file .C`
-        BASE=`basename $BASE .cpp`
-        egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
-        if [ $? -eq 0 ]; then
-          echo "qt3_automoc( ${file} )"
-        fi
-      done
-
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-  # Make sure the compiler can find generated .moc files
-  include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
-  
-  include_directories( ${QT3_INCLUDE_DIR} )
-
-  list(APPEND CGAL_3RD_PARTY_LIBRARIES ${QT3_LIBRARIES} )
-
-endif()
-
-EOF
-      #-----------------------------------------------------------------------
-
-    fi # qt3
-
-    # Qt4
-    if [ "$qt4" = "y" ]; then
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-if ( CGAL_Qt4_FOUND AND QT_FOUND )
-
-  include( ${QT_USE_FILE} )
-  include_directories( ${QT_INCLUDE_DIR} )  
-
-endif()
-
-EOF
-      #-----------------------------------------------------------------------
-    fi # qt4
-
-    for file in `ls *.C *.cpp 2> /dev/null | sort`; do
-      # Create an executable for each cpp that  contains a function "main()"
-      BASE=`basename $file .C`
-      BASE=`basename $BASE .cpp`
-      egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
-      if [ $? -eq 0 ]; then
-        if [ "$qt4" = "y" ]; then
-          echo "create_single_source_cgal_program_qt4( \"$file\" )"
-        else
-          echo "create_single_source_cgal_program( \"$file\" )"
-        fi
-        if [ -n "$ENABLE_CTEST" ]; then 
-          if [ -f "$BASE.cin" ] ; then
-            CIN=" < $BASE.cin"
-          else
-            CIN=
-          fi
-          cat <<EOF
-add_test( "$BASE" \${CMAKE_CTEST_COMMAND}
-  --build-and-test "\${CMAKE_CURRENT_SOURCE_DIR}"
-                   "\${CMAKE_CURRENT_BINARY_DIR}"
-  --build-generator "\${CMAKE_GENERATOR}"
-  --build-makeprogram "\${CMAKE_MAKE_PROGRAM}"
-  --build-target $BASE
-  --build-no-clean
-  --build-run-dir "\${CMAKE_CURRENT_SOURCE_DIR}"
-  --test-command sh -c "\${CMAKE_CURRENT_BINARY_DIR}/$BASE$CIN" )
-EOF
-        fi
-      fi
-      #add a new line
-      echo 
-    done
-    
-  else #======================================================================
-
-    #################
-    # SINGLE_SOURCE #
-    #################
-
-    target_name=$SOURCE
-
-    echo
-    echo
-    echo "# Creating entries for target: $target_name"
-    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-    cat << 'EOF'
-# ############################
-EOF
-    #-------------------------------------------------------------------------
-
-    for file in `ls *.C *.cpp 2> /dev/null | sort`; do
-      all="$all $file"
-    done
-
-    # Qt3
-    if [ "$qt3" = "y" ]; then
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-if ( CGAL_Qt3_FOUND AND QT3_FOUND )
-
-EOF
-      #-----------------------------------------------------------------------
-
-      echo "qt3_automoc( ${all} )"
-
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-  # Make sure the compiler can find generated .moc files
-  include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
- 
-  include_directories( ${QT3_INCLUDE_DIR} )
-
-endif()
-EOF
-      #-----------------------------------------------------------------------
-    fi # qt3
-
-    # Qt4
-    if [ "$qt4" = "y" ]; then
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-if ( CGAL_Qt4_FOUND AND QT_FOUND )
-
-  include( ${QT_USE_FILE} )
-  include_directories( ${QT_INCLUDE_DIR} )  
-
-EOF
-      #-----------------------------------------------------------------------
-
-      echo "  # UI files (Qt Designer files)"
-      for file in `ls *.ui 2> /dev/null | sort`; do
-        echo "  qt4_wrap_ui( DT_UI_FILES $file )"
-      done
-      echo
-      echo "  # qrc files (resources files, that contain icons, at least)"
-      for file in `ls *.qrc 2> /dev/null | sort`; do
-        echo "  qt4_add_resources ( DT_RESOURCE_FILES ./$file )"
-      done
-      echo
-      MOC_FILES=""
-      echo "  # use the Qt MOC preprocessor on classes that derives from QObject"
-      for file in `ls include/*.h 2> /dev/null | sort`; do
-        BASE=`basename $file .h`
-        egrep 'Q_OBJECT' $file >/dev/null 2>&1
-        if [ $? -eq 0 ]; then
-          echo "  qt4_generate_moc( include/${BASE}.h ${BASE}.moc )"
-          MOC_FILES="${BASE}.moc $MOC_FILES"
-        fi
-      done
-      for file in `ls *.h 2> /dev/null | sort`; do
-        BASE=`basename $file .h`
-        egrep 'Q_OBJECT' $file >/dev/null 2>&1
-        if [ $? -eq 0 ]; then
-          echo "  qt4_generate_moc( ${BASE}.h ${BASE}.moc )"
-          MOC_FILES="${BASE}.moc $MOC_FILES"
-        fi
-      done
-      for file in `ls *.cpp 2> /dev/null | sort`; do
-        BASE=`basename $file .cpp`
-        egrep 'Q_OBJECT' $file >/dev/null 2>&1
-        if [ $? -eq 0 ]; then
-          echo "  qt4_generate_moc( ${BASE}.cpp ${BASE}.moc )"
-          MOC_FILES="${BASE}.moc $MOC_FILES"
-        fi
-      done
-
-      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-      cat << 'EOF'
-
-endif()
-EOF
-      #-----------------------------------------------------------------------
-
-      all="${all} ${MOC_FILES} \${DT_UI_FILES} \${DT_RESOURCE_FILES}"
-
-    fi # qt4
-
-    # no 'cat' here, as variable substitution required
-    echo
-    echo "add_executable( ${target_name} ${all} )"
-    echo
-    echo "add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )"
-    echo
-    echo "# Link the executable to CGAL and third-party libraries"
-    LIBS=""
-    if [ "$qt3" = "y" ]; then
-      LIBS="\${QT3_LIBRARIES}"
-    fi
-    if [ "$qt4" = "y" ]; then
-      LIBS="\${QT_LIBRARIES}" 
-    fi
-    LIBS=$LIBS" \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES}"
-    echo "target_link_libraries(${target_name}  $LIBS )"
-
-  fi # single source or all files #===========================================
-
-  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-  cat << 'EOF'
-EOF
-  #---------------------------------------------------------------------------
-
-echo
-
-}
-
-usage()
-{
-  echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2
-  echo >&2
-  echo "  -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2
-  echo "  cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt3','Qt4' ('benchmark', 'symbolic')." >&2
-  echo "  boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2
-  echo "  -p use all of CGAL's preconfigured libraries" >&2
-  echo "  -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
-  echo "  -v the version" >&2
-  echo "  -h this info screen" >&2
-  echo  >&2
-}
-
-
-SINGLE_SOURCE='n'
-SOURCE=""
-
-CGAL_COMPONENTS_GIVEN=""
-CGAL_COMPONENTS=""
-
-CGAL_PRECONFIGURED_LIBS='n'
-
-BOOST_COMPONENTS_GIVEN=""
-BOOST_COMPONENTS=""
-
-OPTIONS_FILE=`pwd`"/cgal_cmake_options"
-
-if [ ! -e "$OPTIONS_FILE" ]; then
-  OPTIONS_FILE="${HOME}/.cgal_cmake_options_rc"
-fi
-
-# parse command line arguments
-while getopts s:c:b:o:phvt OPT; do
-  case "$OPT" in
-    s)  SINGLE_SOURCE='y'
-        SOURCE=$OPTARG
-        if [ "${SOURCE:(-4)}" = ".cpp" ]; then
-           echo "Error: Source must not end with '.cpp'!" >&2
-           echo
-           usage
-           exit 2
-        fi
-        if [ "${SOURCE:(-2)}" = ".C" ]; then
-           echo "Error: Source must not end with '.C'!" >&2
-           echo
-           usage
-           exit 2
-        fi
-
-        ;;
-
-    c)  CGAL_COMPONENTS_GIVEN='y'
-        CGAL_COMPONENTS=$OPTARG
-        ;;
-    b)  BOOST_COMPONENTS_GIVEN='y'
-        BOOST_COMPONENTS=$OPTARG
-        ;;
-
-    o)  OPTIONS_FILE=$OPTARG
-        if [ ! -e "$OPTIONS_FILE" ]; then
-          echo "Options-file '$OPTIONS_FILE' does not exist." >&2
-          exit 1
-        fi
-        ;;
-    p)  CGAL_PRECONFIGURED_LIBS='y'
-        ;;
-    t)  ENABLE_CTEST='y'
-        ;;
-    h)  usage
-        exit 0
-        ;;
-    v)  echo "`basename $0` version 0.1"
-        exit 0
-        ;;
-    \?) # getopts issues an error message
-        usage
-        exit 1
-        ;;
-  esac
-done
-
-shift `expr $OPTIND - 1`
-
-#echo "FILE: $OPTIONS_FILE"
-#echo "BOOST_COMPONENTS: $BOOST_COMPONENTS"
-echo "CGAL_COMPONENTS: $CGAL_COMPONENTS"
-#echo "SINGLE_SOURCE: $SINGLE_SOURCE"
-#echo "SOURCE: $SOURCE"
-
-OUTPUTFILE=CMakeLists.txt
-PROJECT=`basename $PWD`
-
-if [ -f ${OUTPUTFILE} ] ; then
-  echo "moving $OUTPUTFILE to ${OUTPUTFILE}.bak ..."
-  echo
-  mv -f $OUTPUTFILE ${OUTPUTFILE}.bak
-fi
-
-create_cmake_script_with_options | tee $OUTPUTFILE
-
-echo
-echo "created $OUTPUTFILE in $PWD ..."
diff --git a/3rdparty/CGAL-4.6/scripts/cgal_create_cmake_script b/3rdparty/CGAL-4.6/scripts/cgal_create_cmake_script
deleted file mode 100755
index 4e2f124..0000000
--- a/3rdparty/CGAL-4.6/scripts/cgal_create_cmake_script
+++ /dev/null
@@ -1,242 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 1999,2000,2002-2007
-# Utrecht University (The Netherlands),
-# ETH Zurich (Switzerland),
-# INRIA Sophia-Antipolis (France),
-# Max-Planck-Institute Saarbruecken (Germany),
-# and Tel-Aviv University (Israel).  All rights reserved.
-#
-# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; version 3 of the License,
-# or (at your option) any later version.
-#
-# Licensees holding a valid commercial license may use this file in
-# accordance with the commercial license agreement provided with the software.
-#
-# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Scripts/scripts/cgal_create_makefile $
-# $Id: cgal_create_makefile 36976 2007-03-09 22:53:24Z reichel $
-#
-# Author(s)     : various
-
-# This script creates a CGAL cmake script with entries for all .C and .cpp
-# files in the current directory.
-#
-# Usage: cgal_create_cmake_script TYPE
-#
-#  echo "  TYPE can be any of "demo", "example" or "test".. any other value is ignored"
-
-#VERSION=2.0
-
-create_cmake_script()
-{
-  # print makefile header
-  cat <<EOF
-# Created by the script cgal_create_cmake_script
-# This is the CMake script for compiling a CGAL application.
-
-
-project( ${PROJECT}_${TYPE} )
-EOF
-  cat <<'EOF'
-
-cmake_minimum_required(VERSION 2.6.2)
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
-  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
-    cmake_policy(VERSION 2.8.4)
-  else()
-    cmake_policy(VERSION 2.6)
-  endif()
-endif()
-
-EOF
-
-  if [ "${TYPE}" = "demo" ] ; then
-    target_name="${PROJECT}_${TYPE}"
-    
-    for file in `ls "$SOURCE_DIR"*.C "$SOURCE_DIR"*.cpp 2>/dev/null | sort` ; do
-      all="$all $file"
-    done
-    if [ -z "${all}" ]; then return; fi
-    cat <<'EOF'  
-find_package(CGAL QUIET COMPONENTS Core Qt3 )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-  
-  find_package(Qt3-patched QUIET )
-  # FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-  # that it can be used together with FindQt4: all its variables are prefixed
-  # by "QT3_" instead of "QT_".
-  
-  if(CGAL_Qt3_FOUND AND QT3_FOUND)
-  
-    include( Qt3Macros-patched )
-EOF
-    echo "    qt3_automoc( ${all} )"
-    cat<<'EOF'
-
-    # Make sure the compiler can find generated .moc files
-    include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-  
-    include_directories( ${QT3_INCLUDE_DIR} )
-
-EOF
-    
-    if [ -d "${SOURCE_DIR}../../include" ] ; then
-      echo "  include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
-      echo
-    fi
-    if [ -d "${SOURCE_DIR}../include" ] ; then
-      echo "  include_directories (BEFORE \"${SOURCE_DIR}../include\")"
-      echo
-    fi
-    if [ -d "${SOURCE_DIR}include" ] ; then
-      echo "    include_directories (BEFORE \"${SOURCE_DIR}include\")"
-      echo
-    fi
-    echo "Adding a target ${target_name}..." >&3
-    cat <<EOF
-    add_executable  (${target_name} ${all})
-  
-    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )
-  
-  
-    # Link the executable to CGAL and third-party libraries
-    target_link_libraries(${target_name} \${QT3_LIBRARIES} \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES} )
-  else()
-  
-    message(STATUS "NOTICE: This demo requires Qt3 and the CGAL Qt3 library, and will not be compiled.")
-  
-  endif()
-  
-else()
-  
-    message(STATUS "NOTICE: This demo requires the CGAL library, and will not be compiled.")
-  
-endif()
-EOF
-    
-  else
-  
-    cat <<'EOF'
-find_package(CGAL QUIET COMPONENTS Core )
-
-if ( CGAL_FOUND )
-
-  include( ${CGAL_USE_FILE} )
-
-  include( CGAL_CreateSingleSourceCGALProgram )
-
-EOF
-    if [ -d "${SOURCE_DIR}../../include" ] ; then
-      echo "  include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
-      echo
-    fi
-    if [ -d "${SOURCE_DIR}../include" ] ; then
-      echo "  include_directories (BEFORE \"${SOURCE_DIR}../include\")"
-      echo
-    fi
-    if [ -d "${SOURCE_DIR}include" ] ; then
-      echo "    include_directories (BEFORE \"${SOURCE_DIR}include\")"
-      echo
-    fi
-    
-    for file in `ls "$SOURCE_DIR"*.C "$SOURCE_DIR"*.cpp 2>/dev/null | sort` ; do
-      # Create an executable for each cpp that  contains a function "main()"
-      BASE=`basename $file .C`
-      BASE=`basename $BASE .cpp`
-      egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
-      if [ $? -eq 0 ]; then
-        echo "  create_single_source_cgal_program( \"$file\" )"
-        echo "Adding a target ${BASE}..." >&3
-      fi
-    done
-    
-    cat <<'EOF'
-
-else()
-  
-    message(STATUS "This program requires the CGAL library, and will not be compiled.")
-  
-endif()
-EOF
-
-  fi
-  
-  echo
-
-}
-
-
-usage()
-{
-  echo "Usage: cgal_create_cmake_script [TYPE] [--source_dir <source directory>]"
-  echo
-  echo "  Create a CMakeLists.txt file in the current working directory."
-  echo
-  echo "  TYPE must be any of example, demo or test. The default is example."
-  echo
-  echo "  If the option --source_dir is specified with a directory, the "
-  echo "  CMakeLists.txt uses source files from that directory, otherwise "
-  echo "  the source directory is supposed to be the current directory."
-}
-
-SOURCE_DIR=
-
-while [ $1 ]; do
-    case "$1" in
-        -h|-help|--h|--help)
-            usage; exit
-        ;;
-        example) 
-            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
-        ;;
-        demo) 
-            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
-        ;;
-        test) 
-            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
-        ;;
-        --source_dir)
-            if [ -d "$2" ]; then 
-                SOURCE_DIR=$2; 
-                shift;
-                shift;
-            else
-                if [ -z "$2" ]; then
-                    echo "Error: you must specify a directory after the --source_dir option!"
-                    echo
-                else
-                    echo "Error: \"$2\" is not a directory!"
-                    echo
-                fi
-                usage; exit 1; 
-            fi
-        ;;
-        *) 
-            echo "Unknown option: $1"
-            usage; exit 1
-        ;;
-    esac
-done
-
-OUTPUTFILE=CMakeLists.txt
-if [ -n "$SOURCE_DIR" ]; then
-    PROJECT=`basename $SOURCE_DIR`
-    SOURCE_DIR=$SOURCE_DIR/
-else
-    PROJECT=`basename $PWD`
-fi
-
-if [ -f ${OUTPUTFILE} ] ; then
-  echo "moving $OUTPUTFILE to ${OUTPUTFILE}.bak ..."
-  mv -f $OUTPUTFILE ${OUTPUTFILE}.bak
-fi
-create_cmake_script 3>&1 > $OUTPUTFILE
-echo "created $OUTPUTFILE in $PWD ..."
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Bbox_2_intersections.cpp b/3rdparty/CGAL-4.6/src/CGAL/Bbox_2_intersections.cpp
deleted file mode 100644
index baa4bf5..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Bbox_2_intersections.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-// Copyright (c) 2000  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman
-
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Bbox_2_Line_2_intersection.h>
-#include <CGAL/Ray_2_Bbox_2_intersection.h>
-typedef CGAL::Simple_cartesian<double> Rcart;
-
-
-namespace CGAL {
-
-class Bbox_2_Line_2_pair_impl
-{
-public:
-    Bbox_2_Line_2_pair_impl() {}
-    Bbox_2_Line_2_pair_impl(Bbox_2 const &bb, Rcart::Line_2 const &line)
-        : _bbox(bb), _line(line), _known(false) {}
-    Bbox_2 _bbox;
-    Rcart::Line_2 _line;
-    mutable bool                     _known;
-    mutable Bbox_2_Line_2_pair::Intersection_results     _result;
-    mutable double                   _min, _max;
-};
-
-Bbox_2_Line_2_pair::~Bbox_2_Line_2_pair()
-{
-    delete pimpl;
-}
-
-Bbox_2_Line_2_pair::Bbox_2_Line_2_pair()
-{
-    pimpl = new Bbox_2_Line_2_pair_impl;
-    pimpl->_known = false;
-}
-
-Bbox_2_Line_2_pair::Bbox_2_Line_2_pair(Bbox_2_Line_2_pair const &o)
-{
-    pimpl = new Bbox_2_Line_2_pair_impl(*o.pimpl);
-}
-
-Bbox_2_Line_2_pair::Bbox_2_Line_2_pair(
-    Bbox_2 const &bbox, double line_a, double line_b, double line_c)
-{
-    pimpl = new Bbox_2_Line_2_pair_impl(bbox,
-              Rcart::Line_2(line_a, line_b, line_c));
-}
-
-Bbox_2_Line_2_pair &
-Bbox_2_Line_2_pair::operator=(Bbox_2_Line_2_pair const &o)
-{
-    *pimpl = *o.pimpl;
-    return *this;
-}
-
-
-Bbox_2_Line_2_pair::Intersection_results
-Bbox_2_Line_2_pair::intersection_type() const
-{
-    if (pimpl->_known)
-        return pimpl->_result;
-    // The non const this pointer is used to cast away const.
-    pimpl->_known = true;
-    const Rcart::Point_2 &ref_point = pimpl->_line.point();
-    const Rcart::Vector_2 &dir =
-                               pimpl->_line.direction().to_vector();
-    bool to_infinity = true;
-// first on x value
-    if (dir.x() == 0.0) {
-        if (ref_point.x() < pimpl->_bbox.xmin()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        if (ref_point.x() > pimpl->_bbox.xmax()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-    } else {
-        double newmin, newmax;
-        if (dir.x() > 0.0) {
-            newmin = (pimpl->_bbox.xmin()-ref_point.x())/dir.x();
-            newmax = (pimpl->_bbox.xmax()-ref_point.x())/dir.x();
-        } else {
-            newmin = (pimpl->_bbox.xmax()-ref_point.x())/dir.x();
-            newmax = (pimpl->_bbox.xmin()-ref_point.x())/dir.x();
-        }
-        if (to_infinity) {
-            pimpl->_min = newmin;
-            pimpl->_max = newmax;
-        } else {
-            if (newmin > pimpl->_min)
-                pimpl->_min = newmin;
-            if (newmax < pimpl->_max)
-                pimpl->_max = newmax;
-            if (pimpl->_max < pimpl->_min) {
-                pimpl->_result = NO_INTERSECTION;
-                return pimpl->_result;
-            }
-        }
-        to_infinity = false;
-    }
-// now on y value
-    if (dir.y() == 0.0) {
-        if (ref_point.y() < pimpl->_bbox.ymin()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        if (ref_point.y() > pimpl->_bbox.ymax()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-    } else {
-        double newmin, newmax;
-        if (dir.y() > 0.0) {
-            newmin = (pimpl->_bbox.ymin()-ref_point.y())/dir.y();
-            newmax = (pimpl->_bbox.ymax()-ref_point.y())/dir.y();
-        } else {
-            newmin = (pimpl->_bbox.ymax()-ref_point.y())/dir.y();
-            newmax = (pimpl->_bbox.ymin()-ref_point.y())/dir.y();
-        }
-        if (to_infinity) {
-            pimpl->_min = newmin;
-            pimpl->_max = newmax;
-        } else {
-            if (newmin > pimpl->_min)
-                pimpl->_min = newmin;
-            if (newmax < pimpl->_max)
-                pimpl->_max = newmax;
-            if (pimpl->_max < pimpl->_min) {
-                pimpl->_result = NO_INTERSECTION;
-                return pimpl->_result;
-            }
-        }
-        to_infinity = false;
-    }
-    CGAL_kernel_assertion(!to_infinity);
-    if (pimpl->_max == pimpl->_min) {
-        pimpl->_result = POINT;
-        return pimpl->_result;
-    }
-    pimpl->_result = SEGMENT;
-    return pimpl->_result;
-}
-
-
-bool
-Bbox_2_Line_2_pair::intersection(
-    double &x1, double &y1, double &x2, double &y2) const
-{
-    if (!pimpl->_known)
-        intersection_type();
-    if (pimpl->_result != SEGMENT)
-        return false;
-    Rcart::Point_2 p1(pimpl->_line.point()
-                + pimpl->_min*pimpl->_line.direction().to_vector());
-    Rcart::Point_2 p2(pimpl->_line.point()
-                + pimpl->_max*pimpl->_line.direction().to_vector());
-    x1 = p1.x();
-    y1 = p1.y();
-    x2 = p2.x();
-    y2 = p2.y();
-    return true;
-}
-
-bool
-Bbox_2_Line_2_pair::intersection(
-    double &x, double &y) const
-{
-    if (!pimpl->_known)
-        intersection_type();
-    if (pimpl->_result != POINT)
-        return false;
-    Rcart::Point_2 pt(pimpl->_line.point()
-        + pimpl->_min*pimpl->_line.direction().to_vector());
-    x = pt.x();
-    y = pt.y();
-    return true;
-}
-
-
-class Bbox_2_Ray_2_pair_impl
-{
-public:
-    Bbox_2_Ray_2_pair_impl():_known(false) {}
-    Bbox_2_Ray_2_pair_impl(Bbox_2 const &bbox, Rcart::Point_2 const &pt,
-                Rcart::Vector_2 const &dir)
-        :_box(bbox), _known(false), _ref_point(pt), _dir(dir), _min(0.0) {}
-    Ray_2< Rcart > _ray;
-    Bbox_2 _box;
-    bool _known;
-    Bbox_2_Ray_2_pair::Intersection_results _result;
-    Rcart::Point_2 _ref_point;
-    Rcart::Vector_2 _dir;
-    double _min, _max;
-};
-
-Bbox_2_Ray_2_pair::~Bbox_2_Ray_2_pair()
-{
-    delete pimpl;
-}
-
-Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair()
-{
-    pimpl = new Bbox_2_Ray_2_pair_impl;
-}
-
-Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair(Bbox_2_Ray_2_pair const &o)
-{
-    pimpl = new Bbox_2_Ray_2_pair_impl(*o.pimpl);
-}
-
-Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair(
-    Bbox_2 const &bbox, double x, double y, double dx, double dy)
-{
-    pimpl = new Bbox_2_Ray_2_pair_impl(bbox,
-                    Rcart::Point_2(x,y), Rcart::Vector_2(dx,dy));
-}
-
-Bbox_2_Ray_2_pair &
-Bbox_2_Ray_2_pair::operator=(Bbox_2_Ray_2_pair const &o)
-{
-    *pimpl = *o.pimpl;
-    return *this;
-}
-
-
-Bbox_2_Ray_2_pair::Intersection_results
-Bbox_2_Ray_2_pair::intersection_type() const
-{
-    if (pimpl->_known)
-        return pimpl->_result;
-    pimpl->_known = true;
-    bool to_infinity = true;
-// first on x value
-    if (pimpl->_dir.x() == 0.0) {
-        if (pimpl->_ref_point.x() < pimpl->_box.xmin()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        if (pimpl->_ref_point.x() > pimpl->_box.xmax()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-    } else {
-        double newmin, newmax;
-        if (pimpl->_dir.x() > 0.0) {
-            newmin =(pimpl->_box.xmin()-pimpl->_ref_point.x())/pimpl->_dir.x();
-            newmax =(pimpl->_box.xmax()-pimpl->_ref_point.x())/pimpl->_dir.x();
-        } else {
-            newmin =(pimpl->_box.xmax()-pimpl->_ref_point.x())/pimpl->_dir.x();
-            newmax =(pimpl->_box.xmin()-pimpl->_ref_point.x())/pimpl->_dir.x();
-        }
-        if (newmin > pimpl->_min)
-            pimpl->_min = newmin;
-        if (to_infinity) {
-            pimpl->_max = newmax;
-        } else {
-            if (newmax < pimpl->_max)
-                pimpl->_max = newmax;
-        }
-        if (pimpl->_max < pimpl->_min){
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        to_infinity = false;
-    }
-// now on y value
-    if (pimpl->_dir.y() == 0.0) {
-        if (pimpl->_ref_point.y() < pimpl->_box.ymin()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        if (pimpl->_ref_point.y() > pimpl->_box.ymax()) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-    } else {
-        double newmin, newmax;
-        if (pimpl->_dir.y() > 0.0) {
-            newmin =(pimpl->_box.ymin()-pimpl->_ref_point.y())/pimpl->_dir.y();
-            newmax =(pimpl->_box.ymax()-pimpl->_ref_point.y())/pimpl->_dir.y();
-        } else {
-            newmin =(pimpl->_box.ymax()-pimpl->_ref_point.y())/pimpl->_dir.y();
-            newmax =(pimpl->_box.ymin()-pimpl->_ref_point.y())/pimpl->_dir.y();
-        }
-        if (newmin > pimpl->_min)
-            pimpl->_min = newmin;
-        if (to_infinity) {
-            pimpl->_max = newmax;
-        } else {
-            if (newmax < pimpl->_max)
-                pimpl->_max = newmax;
-        }
-        if (pimpl->_max < pimpl->_min) {
-            pimpl->_result = NO_INTERSECTION;
-            return pimpl->_result;
-        }
-        to_infinity = false;
-    }
-    CGAL_kernel_assertion(!to_infinity);
-    if (pimpl->_max == pimpl->_min) {
-        pimpl->_result = POINT;
-        return pimpl->_result;
-    }
-    pimpl->_result = SEGMENT;
-    return pimpl->_result;
-}
-
-
-bool Bbox_2_Ray_2_pair::
-intersection(double &x1, double &y1, double &x2, double &y2) const
-{
-    if (!pimpl->_known)
-        intersection_type();
-    if (pimpl->_result != SEGMENT)
-        return false;
-    Rcart::Point_2 p1(pimpl->_ref_point + pimpl->_min*pimpl->_dir);
-    Rcart::Point_2 p2(pimpl->_ref_point + pimpl->_max*pimpl->_dir);
-    x1 = p1.x();
-    y1 = p1.y();
-    x2 = p2.x();
-    y2 = p2.y();
-    return true;
-}
-
-bool Bbox_2_Ray_2_pair::intersection(double &x, double &y) const
-{
-    if (!pimpl->_known)
-        intersection_type();
-    if (pimpl->_result != POINT)
-        return false;
-    Rcart::Point_2 pt = pimpl->_ref_point + pimpl->_min*pimpl->_dir;
-    x = pt.x();
-    y = pt.y();
-    return true;
-}
-
-
-bool do_intersect_ray_2(
-    const Bbox_2 &box, double x, double y, double dx, double dy)
-{
-    Bbox_2_Ray_2_pair pair(box, x, y, dx, dy);
-    return pair.intersection_type() != Bbox_2_Ray_2_pair::NO_INTERSECTION;
-}
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Color.cpp b/3rdparty/CGAL-4.6/src/CGAL/Color.cpp
deleted file mode 100644
index 55bc10a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Color.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Hervé Brönnimann
-
-#include <CGAL/IO/Color.h>
-
-
-namespace CGAL {
-
-const Color BLACK  = Color(0, 0, 0);
-const Color WHITE  = Color(255, 255, 255);
-const Color GRAY   = Color(100,100,100);
-
-const Color GREEN  = Color(0, 255, 0);
-
-const Color DEEPBLUE   = Color(10, 0, 100);
-const Color BLUE   = Color(0, 0, 255);
-const Color VIOLET = Color(255, 0, 255);
-const Color PURPLE = Color(100, 0, 70);
-
-const Color RED    = Color(255, 0, 0);
-const Color ORANGE = Color(235, 150, 0);
-const Color YELLOW = Color(255, 255, 0);
-
-} //namespace CGAL
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_header_OFF.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_header_OFF.cpp
deleted file mode 100644
index 71112bb..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_header_OFF.cpp
+++ /dev/null
@@ -1,392 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-#include <cstdlib>
-#include <cctype>
-#include <cstring>
-#include <iostream>
-#include <CGAL/IO/binary_file_io.h>
-#include <CGAL/IO/File_header_OFF.h>
-#include <algorithm>
-#include <boost/cstdint.hpp>
-
-namespace CGAL {
-
-File_header_OFF::File_header_OFF( bool verbose)
-:   File_header_extended_OFF( verbose),
-    n_vertices(0),
-    n_facets(0),
-    m_skel(false),
-    m_binary(false),
-    m_no_comments(false),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{}
-File_header_OFF::File_header_OFF(
-                     bool binary, bool noc, bool skel, bool verbose)
-:   File_header_extended_OFF( verbose),
-    n_vertices(0),
-    n_facets(0),
-    m_skel(skel),
-    m_binary(binary),
-    m_no_comments(noc),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{}
-//File_header_OFF::File_header_OFF( int v, int h, int f,
-//                                          bool verbose)
-//:   File_header_extended_OFF( verbose),
-//    n_vertices(v),
-//    n_facets(f),
-//    m_skel(false),
-//    m_binary(false),
-//    m_no_comments(false),
-//    m_offset(0),
-//    m_colors(false),
-//    m_normals(false),
-//    m_tag4(false),
-//    m_tagDim(false),
-//    m_dim(3)
-//{
-//    set_halfedges(h);
-//}
-File_header_OFF::File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
-                     bool binary, bool noc, bool skel, bool verbose)
-:   File_header_extended_OFF( verbose),
-    n_vertices(v),
-    n_facets(f),
-    m_skel(skel),
-    m_binary(binary),
-    m_no_comments(noc),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{
-    set_halfedges(h);
-}
-File_header_OFF::File_header_OFF(
-                     const File_header_extended_OFF& ext_header)
-:   File_header_extended_OFF( ext_header),
-    n_vertices(0),
-    n_facets(0),
-    m_skel(false),
-    m_binary(false),
-    m_no_comments(false),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{}
-File_header_OFF::File_header_OFF(
-                     const File_header_extended_OFF& ext_header,
-                     bool binary, bool noc, bool skel)
-:   File_header_extended_OFF( ext_header),
-    n_vertices(0),
-    n_facets(0),
-    m_skel(skel),
-    m_binary(binary),
-    m_no_comments(noc),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{}
-File_header_OFF::File_header_OFF(
-                                 std::size_t v, std::size_t h, std::size_t f,
-                     const File_header_extended_OFF& ext_header)
-:   File_header_extended_OFF( ext_header),
-    n_vertices(v),
-    n_facets(f),
-    m_skel(false),
-    m_binary(false),
-    m_no_comments(false),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{
-    set_halfedges(h);
-}
-File_header_OFF::File_header_OFF(
-                                 std::size_t v, std::size_t h, std::size_t f,
-                     const File_header_extended_OFF& ext_header,
-                     bool binary, bool noc, bool skel)
-:   File_header_extended_OFF( ext_header),
-    n_vertices(v),
-    n_facets(f),
-    m_skel(skel),
-    m_binary(binary),
-    m_no_comments(noc),
-    m_offset(0),
-    m_colors(false),
-    m_normals(false),
-    m_tag4(false),
-    m_tagDim(false),
-    m_dim(3)
-{
-    set_halfedges(h);
-}
-
-File_header_OFF& File_header_OFF::
-operator+=( const File_header_OFF& header) {
-    (File_header_extended_OFF&)(*this) = header;
-    n_vertices += header.n_vertices;
-    n_facets   += header.n_facets;
-    return *this;
-}
-
-// Write header.
-std::ostream& operator<<( std::ostream& out, const File_header_OFF& h) {
-    if ( h.comments()) {
-        out << "# Output of a CGAL tool\n";
-        out << static_cast<const File_header_extended_OFF&>( h);
-    }
-    if ( h.has_normals())
-        out << 'N';
-    if ( h.skel())
-        out << "SKEL";
-    else
-        out << "OFF";
-    if ( h.binary()) {
-        out << " BINARY\n";
-        I_Binary_write_big_endian_integer32( out, static_cast<int>(h.size_of_vertices()));
-        I_Binary_write_big_endian_integer32( out, static_cast<int>(h.size_of_facets()));
-        if ( h.off())
-            I_Binary_write_big_endian_integer32( out, 0);
-    } else {
-        out << '\n';
-        out << h.size_of_vertices() << ' '<< h.size_of_facets();
-        if ( h.off())
-            out << " 0";
-        if ( h.comments()) {
-            out << "\n\n# " << h.size_of_vertices() << " vertices\n";
-            out << "# ------------------------------------------\n";
-        }
-        out << std::endl;
-    }
-    return out;
-}
-
-// Scan header. Marks streams badbit if not in SKEL format nor in OFF.
-std::istream& operator>>( std::istream& in, File_header_OFF& h) {
-    // read in the first character and scan for comments, `OFF', or `NOFF',
-    // or `SKEL', or `4SKEL'.
-    h.set_off_header( false);
-    char c;
-    while ( (in >> c) && c == '#') {
-        if ( in.get(c) && c == 'C' &&
-             in.get(c) && c == 'B' &&
-             in.get(c) && c == 'P') {
-            in >> static_cast<File_header_extended_OFF&>( h);
-        } else if ( c != '\n')
-            in >> skip_until_EOL;
-    }
-    if ( ! in)
-        return in;
-    h.set_skel( false);
-    h.set_binary( false);
-    h.set_index_offset( 1);
-    h.set_colors( false);
-    h.set_normals( false);
-    h.set_homogeneous( false);
-    h.set_dimensional( false);
-    h.set_dimension( 3);
-
-    const int max_keyword = 42;
-    char keyword[max_keyword] = "";
-    int i = 0;
-    keyword[i++] = c;
-    while( i < max_keyword - 1 && in.get(c) && std::isalnum(c))
-        keyword[i++] = c;
-    keyword[i] = '\0';
-    if ( i < 2 || (std::isdigit(keyword[0]) && keyword[0] != '4')
-               || std::isdigit(keyword[1])) {
-        h.set_vertices( std::atoi( keyword));
-    } else {
-        h.set_index_offset( 0);
-        int j = 0;
-        if ( j < i && keyword[j] == 'C') {
-            h.set_colors( true);
-            j++;
-        }
-        if ( j < i && keyword[j] == 'N') {
-            h.set_normals( true);
-            j++;
-        }
-        if ( j < i && keyword[j] == '4') {
-            h.set_homogeneous( true);
-            j++;
-        }
-        if ( j < i && keyword[j] == 'n') {
-            h.set_dimensional( true);
-            j++;
-        }
-        if ( i-j != 3 || keyword[j]   != 'O'
-                      || keyword[j+1] != 'F'
-                      || keyword[j+2] != 'F') {
-            if ( i-j != 4 || keyword[j]   != 'S'
-                          || keyword[j+1] != 'K'
-                          || keyword[j+2] != 'E'
-                          || keyword[j+3] != 'L') {
-                in.clear( std::ios::badbit);
-                if ( h.verbose()) {
-                    std::cerr << " " << std::endl;
-                    std::cerr << "error: File_header_OFF: "
-                                  "wrong format: neither OFF nor SKEL."
-                              << std::endl;
-                }
-                return in;
-            } else {
-                h.set_skel( true);
-            }
-        }
-        in >> skip_comment_OFF >> c;
-        if ( std::isdigit(c)) {
-            in.putback(c);
-            int n;
-            in >> n;
-            h.set_vertices(n);
-        } else {
-            i = 0;
-            keyword[i++] = c;
-            while( i < max_keyword - 1 && in.get(c) &&
-                   std::isalnum(c))
-                keyword[i++] = c;
-            keyword[i] = '\0';
-            if ( std::strcmp( keyword, "BINARY") == 0) {
-                h.set_binary( true);
-                if ( c != '\n')
-                    in >> skip_until_EOL;
-            } else {
-                in.clear( std::ios::badbit);
-                if ( h.verbose()) {
-                    std::cerr << " " << std::endl;
-                    std::cerr << "error: File_header_OFF(): "
-                                 "wrong format: neither OFF nor SKEL."
-                              << std::endl;
-                }
-                return in;
-            }
-        }
-    }
-    // Read remaining size value(s).
-    int n_h;
-    if ( h.binary()) {
-        boost::int32_t a, b, c;
-        I_Binary_read_big_endian_integer32( in, a);
-        if ( h.n_dimensional()) {
-            h.set_dimension( a);
-            I_Binary_read_big_endian_integer32( in, a);
-        }
-        I_Binary_read_big_endian_integer32( in, b);
-        if ( h.off())
-            I_Binary_read_big_endian_integer32( in, c);
-        else
-            c = 0;
-        h.set_vertices( a);
-        if (b<0){
-          in.clear( std::ios::badbit );
-          if ( h.verbose()) {
-              std::cerr << " " << std::endl;
-              std::cerr << "error: File_header_OFF(): File contains < 0 facets."
-                        << std::endl;
-          }
-          return in;
-        }
-        h.set_facets( b);
-        n_h = c;
-    } else {
-        int n;
-        if ( h.n_dimensional()) {
-            h.set_dimension( static_cast<int>(h.size_of_vertices()));
-            in >> n;
-            h.set_vertices(n);
-        }
-        in >> n;
-        if (n < 0){
-          in.clear( std::ios::badbit );
-          if ( h.verbose()) {
-              std::cerr << " " << std::endl;
-              std::cerr << "error: File_header_OFF(): File contains < 0 facets."
-                        << std::endl;
-          }
-          return in;          
-        }
-        h.set_facets(n);
-        if ( h.off())
-            in >> n_h;
-        else
-            n_h = 0;
-    }
-    if ( n_h == 0)
-        h.set_index_offset( 0);
-    if ( ! in || h.size_of_vertices() <= 0 ) {
-        in.clear( std::ios::badbit);
-        if ( h.verbose()) {
-            std::cerr << " " << std::endl;
-            std::cerr << "error: File_header_OFF(): File contains <= 0 vertices."
-                      << std::endl;
-        }
-        return in;
-    }
-    if ( h.size_of_halfedges() == 0) {
-        // be careful, because border edges count twice
-        h.set_halfedges( 2 * n_h);
-        // check against the Eulerian equation for connected planar graphs.
-        // We do not know the number of holes we must represent as dummy
-        // facets and we do not know the genus of the surface.
-        // So we add 12 and a factor of 5 percent.
-        if (    h.size_of_halfedges() == 0
-             || h.size_of_halfedges() > (h.size_of_vertices()
-                + h.size_of_facets() - 2 + 12) * 2.1
-             || h.size_of_halfedges() < (h.size_of_vertices()
-                + h.size_of_facets() - 2) * 2
-        )
-            h.set_halfedges( int((h.size_of_vertices() +
-                                  h.size_of_facets() - 2 + 12) * 2.1));
-    }
-    h.set_off_header( h.off());
-    return in;
-}
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_header_extended_OFF.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_header_extended_OFF.cpp
deleted file mode 100644
index 3f709ff..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_header_extended_OFF.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/IO/File_header_extended_OFF.h>
-#include <CGAL/basic.h>
-
-#include <cstdlib>
-#include <cctype>
-#include <cstring>
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-
-
-namespace CGAL {
-
-bool File_header_extended_OFF::
-is_POL()  const {
-    return is_OFF() && polyhedral_surface();
-}
-
-bool File_header_extended_OFF::
-is_CBP()  const {
-    return is_POL() && triangulated() && non_empty_facets() &&
-        normalized_to_sphere() && radius() <= 1.0;
-}
-
-bool File_header_extended_OFF::
-is_TRN()  const { return is_CBP() && terrain(); }
-
-int  File_header_extended_OFF::
-is_CBPn() const {
-    if ( is_POL() && triangulated() && non_empty_facets() &&
-         normalized_to_sphere() && rounded() &&
-         (radius() <= ( 1l << rounded_bits())))
-        return rounded_bits();
-    else
-        return 0;
-}
-
-int  File_header_extended_OFF::
-is_TRNn() const { return ( terrain() ? is_CBPn() : 0); }
-
-
-// The proper file suffix with respect to file format.
-std::string File_header_extended_OFF::
-suffix() const {
-    if ( is_TRNn()) {
-        std::ostringstream out;
-        out << "trn" << m_rounded_bits << '\0';
-        return out.str();
-    }
-    if ( is_TRN())
-        return std::string("trn");
-    if ( is_CBPn()) {
-        std::ostringstream out;
-        out << "cbp" << m_rounded_bits << '\0';
-        return out.str();
-    }
-    if ( is_CBP())
-        return std::string("cbp");
-    if ( is_POL())
-        return std::string("pol");
-    return std::string("off");
-}
-
-// The proper format name.
-std::string File_header_extended_OFF::
-format_name() const {
-    if ( is_TRNn()) {
-        std::ostringstream out;
-        out << "TRN" << m_rounded_bits << '\0';
-        return out.str();
-    }
-    if ( is_TRN())
-        return std::string("TRN");
-    if ( is_CBPn()) {
-        std::ostringstream out;
-        out << "CBP" << m_rounded_bits << '\0';
-        return out.str();
-    }
-    if ( is_CBP())
-        return std::string("CBP");
-    if ( is_POL())
-        return std::string("POL");
-    return std::string("OFF");
-}
-
-File_header_extended_OFF& File_header_extended_OFF::
-operator+=( const File_header_extended_OFF& header) {
-    m_verbose              = m_verbose || header.m_verbose;
-    m_polyhedral_surface   = m_polyhedral_surface &&
-                             header.m_polyhedral_surface;
-    m_halfedges           += header.m_halfedges;
-    m_triangulated         = m_triangulated && header.m_triangulated;
-    m_non_empty_facets     = m_non_empty_facets &&
-                             header.m_non_empty_facets;
-    m_terrain              = m_terrain && header.m_terrain;
-    m_normalized_to_sphere = m_normalized_to_sphere &&
-                             header.m_normalized_to_sphere;
-    m_radius               = (std::max)(m_radius, header.m_radius);
-    m_rounded              = m_rounded && header.m_rounded;
-    m_rounded_bits         = (std::max)( m_rounded_bits,
-                                       header.m_rounded_bits);
-    m_off_header           = m_off_header && header.m_off_header;
-    return *this;
-}
-
-#define CGAL_OUT(item)     out << "# " #item " " << h.item() << '\n'
-#define CGAL_OUTBOOL(item) out << "# " #item " " <<(h.item() ? '1':'0') << '\n'
-
-// Write extended header incl. CGAL/ENDCBP keywords.
-std::ostream& operator<<( std::ostream& out,
-                          const File_header_extended_OFF& h) {
-    out << "#CBP\n";
-    CGAL_OUTBOOL( polyhedral_surface);
-    CGAL_OUT(     halfedges);
-    CGAL_OUTBOOL( triangulated);
-    CGAL_OUTBOOL( non_empty_facets);
-    CGAL_OUTBOOL( terrain);
-    CGAL_OUTBOOL( normalized_to_sphere);
-    CGAL_OUT(     radius);
-    CGAL_OUTBOOL( rounded);
-    CGAL_OUT(     rounded_bits);
-    out << "# ENDCBP\n" << std::endl;
-    return out;
-}
-#undef CGAL_OUT
-#undef OUTBOOL
-
-#define CGAL_IN(item,type)                         \
-    else if ( std::strcmp( keyword, #item) == 0) { \
-        type t;                               \
-        in >> t;                              \
-        h.set_##item( t);                     \
-    }
-
-#define CGAL_INBOOL(item)                          \
-    else if ( std::strcmp( keyword, #item) == 0) { \
-        in >> c;                              \
-        h.set_##item( c == '1');              \
-    }
-
-// Scan extended header. The CBP keyword must be read already.
-std::istream& operator>>( std::istream& in, File_header_extended_OFF& h) {
-    const int max_keyword = 42;
-    char c;
-    char keyword[max_keyword] = "";
-    in >> keyword;
-    while ( in && std::strcmp( keyword, "ENDCBP") != 0) {
-        if ( std::strcmp( keyword, "#") == 0)
-            ;
-        CGAL_INBOOL( polyhedral_surface)
-        CGAL_IN(     halfedges, int)
-        CGAL_INBOOL( triangulated)
-        CGAL_INBOOL( non_empty_facets)
-        CGAL_INBOOL( terrain)
-        CGAL_INBOOL( normalized_to_sphere)
-        CGAL_IN(     radius, double)
-        CGAL_INBOOL( rounded)
-        CGAL_IN(     rounded_bits, int)
-        else if ( h.verbose()) {
-            std::cerr << "warning: File_header_extended_OFF: unknown key '"
-                      << keyword << "'." << std::endl;
-        }
-        in >> keyword;
-    }
-    in >> skip_until_EOL >> skip_comment_OFF;
-    return in;
-}
-#undef CGAL_IN
-#undef CGAL_INBOOL
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_scanner_OFF.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_scanner_OFF.cpp
deleted file mode 100644
index 3361a45..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_scanner_OFF.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-#include <cstdlib>
-#include <iostream>
-#include <CGAL/IO/binary_file_io.h>
-#include <CGAL/IO/File_scanner_OFF.h>
-
-namespace CGAL {
-
-void
-File_scanner_OFF::
-skip_to_next_vertex( std::size_t current_vertex) {
-    CGAL_assertion( current_vertex < size_of_vertices());
-    if ( binary()) {
-        float f;
-        if ( has_normals() && ! normals_read) {
-            I_Binary_read_big_endian_float32( m_in, f);
-            I_Binary_read_big_endian_float32( m_in, f);
-            I_Binary_read_big_endian_float32( m_in, f);
-            if ( is_homogeneous())
-                I_Binary_read_big_endian_float32( m_in, f);
-        }
-        if ( has_colors()) {
-            // It is not well stated in the Geomview manual
-            // how color is coded following a vertex. It is
-            // parsed similar to the optional color for facets.
-	    boost::int32_t k;
-            I_Binary_read_big_endian_integer32( m_in, k);
-            if (k<0 || k>4) {
-                m_in.clear( std::ios::badbit);
-                if ( verbose()) {
-                    std::cerr << " " << std::endl;
-                    std::cerr << "File_scanner_OFF::" << std::endl;
-                    std::cerr << "skip_to_next_vertex(): input error: bad "
-                                 " number of color indices at vertex "
-                              << current_vertex << "." << std::endl;
-                }
-                set_off_header( false);
-                return;
-            }
-            while (k--) {
-                float dummy;
-                I_Binary_read_big_endian_float32( m_in, dummy);
-            }
-        }
-    } else {
-        if ( has_normals() && ! normals_read) {
-            double dummy;
-            if ( is_homogeneous()) {
-                m_in >> dummy >> dummy >> dummy >> dummy;
-            } else {
-                m_in >> dummy >> dummy >> dummy;
-            }
-        }
-        if ( has_colors()) { // skip color entries (1 to 4)
-            m_in >> skip_until_EOL;
-        }
-    }
-    if( ! m_in) {
-        if ( verbose()) {
-            std::cerr << " " << std::endl;
-            std::cerr << "File_scanner_OFF::" << std::endl;
-            std::cerr << "skip_to_next_vertex(): input error: cannot read "
-                         "OFF file beyond vertex " << current_vertex << "."
-                      << std::endl;
-        }
-        set_off_header( false);
-        return;
-    }
-    normals_read = false;
-}
-
-void
-File_scanner_OFF::
-skip_to_next_facet( std::size_t current_facet) {
-    // Take care of trailing informations like color triples.
-    if ( binary()) {
-        boost::int32_t k;
-        I_Binary_read_big_endian_integer32( m_in, k);
-        if (k<0 || k>4) {
-            m_in.clear( std::ios::badbit);
-            if ( verbose()) {
-                std::cerr << " " << std::endl;
-                std::cerr << "File_scanner_OFF::" << std::endl;
-                std::cerr << "skip_to_next_facet(): input error: bad "
-                             "number of color indices at vertex "
-                          << current_facet << "." << std::endl;
-            }
-            set_off_header( false);
-            return;
-        }
-        while (k--) {
-            float dummy;
-            I_Binary_read_big_endian_float32( m_in, dummy);
-        }
-    } else {
-        m_in >> skip_until_EOL;
-    }
-}
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_writer_OFF.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_writer_OFF.cpp
deleted file mode 100644
index cb288f2..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_writer_OFF.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <CGAL/IO/File_writer_OFF.h>
-
-namespace CGAL {
-
-void
-File_writer_OFF::
-write_header( std::ostream& o,
-              std::size_t   vertices,
-              std::size_t   halfedges,
-              std::size_t   facets,
-              bool          normals) {
-    m_out = &o;
-    m_header.set_vertices(  vertices);
-    // Don't. This halfdges aren't trusted:
-    // m_header.set_halfedges( halfedges);
-    (void)halfedges;
-    m_header.set_facets(  facets);
-    m_header.set_normals( normals);
-    // Print header.
-    out() << m_header;
-}
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_writer_VRML_2.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_writer_VRML_2.cpp
deleted file mode 100644
index ecec30c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_writer_VRML_2.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <CGAL/IO/File_writer_VRML_2.h>
-
-namespace CGAL {
-
-void
-File_writer_VRML_2::
-write_header( std::ostream& o,
-              std::size_t   vertices,
-              std::size_t   halfedges,
-              std::size_t   facets) {
-    m_out    = &o;
-    m_facets = facets;
-
-    out() << "        #-- Begin of Polyhedron_3\n";
-    out() << "        # " << vertices  << " vertices\n";
-    out() << "        # " << halfedges << " halfedges\n";
-    out() << "        # " << facets    << " facets\n";
-    out() << "        Group {\n"
-             "            children [\n"
-             "                Shape {\n"
-             "                    appearance Appearance { material "
-                                               "USE Material }\n"
-             "                    geometry IndexedFaceSet {\n"
-             "                        convex FALSE\n"
-             "                        solid  FALSE\n"
-             "                        coord  Coordinate {\n"
-             "                            point [" << std::endl;
-}
-
-void
-File_writer_VRML_2::
-write_facet_header() const {
-    out() << "                            ] #point\n"
-             "                        } #coord Coordinate\n"
-             "                        coordIndex  [" << std::endl;
-}
-
-void
-File_writer_VRML_2::
-write_footer() const {
-    out() << "                        ] #coordIndex\n"
-             "                    } #geometry\n"
-             "                } #Shape\n"
-             "            ] #children\n"
-             "        } #Group" << std::endl;
-}
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_writer_inventor.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_writer_inventor.cpp
deleted file mode 100644
index e40a1d0..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_writer_inventor.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/IO/File_writer_inventor.h>
-
-namespace CGAL {
-
-void
-File_writer_inventor::
-write_header( std::ostream& o,
-              std::size_t   vertices,
-              std::size_t   halfedges,
-              std::size_t   facets){
-    m_out    = &o;
-    m_facets = facets;
-    out() << "# " << vertices  << " vertices\n";
-    out() << "# " << halfedges << " halfedges\n";
-    out() << "# " << facets    << " facets\n\n";
-    out() << "Separator {\n"
-             "    Coordinate3 {\n"
-             "        point   [" << std::endl;
-}
-
-void
-File_writer_inventor::
-write_facet_header() const {
-    out() << "        ] #point\n"
-             "    } #Coordinate3\n"
-             "    # " << m_facets << " facets\n"
-             "    IndexedFaceSet {\n"
-             "        coordIndex [\n";
-}
-
-void
-File_writer_inventor::
-write_footer() const {
-    out() << "        ] #coordIndex\n"
-             "    } #IndexedFaceSet\n"
-             "} #Separator" << std::endl;
-}
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/File_writer_wavefront.cpp b/3rdparty/CGAL-4.6/src/CGAL/File_writer_wavefront.cpp
deleted file mode 100644
index 2fee734..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/File_writer_wavefront.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-#include <iostream>
-#include <CGAL/IO/File_writer_wavefront.h>
-
-namespace CGAL {
-
-void
-File_writer_wavefront::
-write_header( std::ostream& o,
-              std::size_t   vertices,
-              std::size_t   halfedges,
-              std::size_t   facets){
-    m_out    = &o;
-    m_facets = facets;
-    // Print header.
-    out() << "# file written from a CGAL tool in Wavefront obj format\n";
-    out() << "# " << vertices  << " vertices\n";
-    out() << "# " << halfedges << " halfedges\n";
-    out() << "# " << facets    << " facets\n\n";
-
-    out() << "\n# " << vertices << " vertices\n";
-    out() << "# ------------------------------------------\n\n";
-}
-
-} //namespace CGAL
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Geomview_stream.cpp b/3rdparty/CGAL-4.6/src/CGAL/Geomview_stream.cpp
deleted file mode 100644
index a34af8c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Geomview_stream.cpp
+++ /dev/null
@@ -1,571 +0,0 @@
-// Copyright (c) 1999-2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     : Andreas Fabri, Herve Bronnimann, Sylvain Pion
-
-#include <CGAL/basic.h>
-
-#ifdef CGAL_USE_GEOMVIEW
-
-#include <sstream>
-#include <csignal>
-#include <cerrno>
-#include <cstring>
-#include <cstdlib>
-#include <unistd.h>
-
-#include <sys/types.h> // kill() on SunPro requires these 2 #includes.
-#include <signal.h>
-
-#include <CGAL/IO/Geomview_stream.h>
-#include <CGAL/IO/binary_file_io.h>
-
-namespace CGAL {
-
-Geomview_stream::Geomview_stream(const Bbox_3 &bbox,
-				 const char *machine,
-				 const char *login)
-    : bb(bbox), vertex_color(BLACK), edge_color(BLACK), face_color(BLACK),
-      wired_flag(false), echo_flag(true), raw_flag(false),
-      trace_flag(false), binary_flag(false),
-      line_width(1)
-{
-    setup_geomview(machine, login);
-    frame(bbox);
-    pickplane(bbox);
-    set_vertex_radius((bbox.xmax() - bbox.xmin())/100.0);
-}
-
-Geomview_stream::~Geomview_stream()
-{
-    kill(pid, SIGKILL);  // kills geomview
-}
-
-void Geomview_stream::setup_geomview(const char *machine, const char *login)
-{
-    int pipe_out[2], pipe_in[2];
-
-    // Communication between CGAL and geomview should be possible
-    // in two directions. To achieve this we open two pipes
-
-    std::cout << "Starting Geomview..." << std::flush;
-    if (pipe(pipe_out) < 0) {
-        CGAL_error_msg( "out pipe failed" );
-    }
-
-    if (pipe(pipe_in) < 0) {
-        CGAL_error_msg(  "in pipe failed" );
-    }
-
-    switch (pid = fork()){
-    case -1:
-        CGAL_error_msg( "fork failed" );
-    case 0:               // The child process
-        close(pipe_out[1]); // does not write to the out pipe,
-        close(pipe_in[0]);  // does not read from the in pipe.
-
-	if (dup2(pipe_out[0], 0) != 0)
-	    std::cerr << "Connect pipe to stdin failed." << std::endl;
-	if (dup2(pipe_in[1], 1) != 1)
-	    std::cerr << "Connect pipe to stdout failed." << std::endl;
-
-        if (machine && (std::strlen(machine)>0)) {
-	    std::string s (" rgeomview ");
-	    s += machine;
-	    s += ":0.0";
-            execlp("rsh", "rsh", machine, "-l", login, s.data(),
-                   static_cast<void *>(NULL)); // cast to stop gcc warning
-        } else {
-            execlp("geomview", "geomview", "-c", "-",
-                   static_cast<void *>(NULL)); // cast to stop gcc warning
-        }
-
-        // if we get to this point something went wrong.
-        std::cerr << "execl geomview failed" << std::endl;
-        switch(errno) {
-        case EACCES:
-            std::cerr << "please check your environment variable PATH"
-		      << std::endl;
-            std::cerr << "make sure the file `geomview' is contained in it"
-		      << std::endl;
-            std::cerr << "and is executable" << std::endl;
-            break;
-        case ELOOP:
-            std::cerr << "too many links for filename `geomview'" << std::endl;
-            break;
-        default:
-            std::cerr << "error number " << errno << " (check `man execlp')"
-		      << std::endl;
-        };
-        CGAL_error();
-    default:              // The parent process
-        close(pipe_out[0]); // does not read from the out pipe,
-        close(pipe_in[1]);  // does not write to the in pipe.
-
-        in = pipe_in[0];
-        out = pipe_out[1];
-
-	// Necessary to wait a little bit for Geomview,
-        // otherwise you won't be able to ask for points...
-        sleep(1);
-
-#if 1
-        // We want to get rid of the requirement in the CGAL doc about
-	// (echo "started").  But we want to be backward compatible, that is,
-	// people who have this echo in their .geomview must still have CGAL
-	// working, at least for a few public releases.
-        // So the plan is to send, from CGAL, the command : (echo "CGAL-3D")
-        // It's the same length as "started", 7.
-        // Then we read 7 chars from Geomview, and test which string it is.
-        // If it's "CGAL-3D", then fine, the user doesn't have .geomview with
-        // the back-compatible echo command.
-        // In the very long run, we'll be able to get rid of all this code as
-        // well.
-	// Maybe we should simply read the pipe, till we find "CGAL-3D" ?
-
-        *this << "(echo \"CGAL-3D\")";
-
-        char inbuf[10];
-        std::size_t retread=::read(in, inbuf, 7);
-        (void)retread;
-
-        if (std::strncmp(inbuf, "started", 7) == 0)
-        {
-            // std::cerr << "You still have a .geomview file with the\n"
-                   // << "(echo \"started\") command. Note that this is not\n"
-                   // << "compulsory anymore, since CGAL 2.3" << std::endl;
-
-            // Then the next one is supposed to be CGAL-3D.
-            retread=::read(in, inbuf, 7);
-            (void)retread;
-            if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
-                std::cerr << "Unexpected string from Geomview !" << std::endl;
-        }
-        else if (std::strncmp(inbuf, "CGAL-3D", 7) == 0)
-        {
-            // std::cerr << "Good, you don't have a .geomview file with the\n"
-                      // << "(echo \"started\") command" << std::endl;
-        }
-        else
-        {
-            std::cerr << "Unexcepted string from Geomview at initialization!\n"
-                      << "Going on nevertheless !" << std::endl;
-        }
-#else
-        // Old original version
-        char inbuf[10];
-        // Waits for "started" from the .geomview file.
-        retread=::read(in, inbuf, 7);
-        (void)retread;
-#endif
-
-        std::cout << "done." << std::endl;
-
-        (*this) << "(normalization g* none)(bbox-draw g* no)";
-    }
-}
-
-void
-Geomview_stream::pickplane(const Bbox_3 &bbox)
-{
-    bool bin_bak = set_binary_mode();
-    (*this) << "(geometry pickplane {QUAD BINARY\n"
-            << 1
-    // here are the four corners
-            << bbox.xmin() << bbox.ymin() << bbox.zmin()
-            << bbox.xmin() << bbox.ymax() << bbox.zmin()
-            << bbox.xmax() << bbox.ymax() << bbox.zmin()
-            << bbox.xmax() << bbox.ymin() << bbox.zmin()
-
-    // close the text bracket
-            << "}) (pickable pickplane no)";
-    set_ascii_mode(bin_bak);
-}
-
-void
-Geomview_stream::clear()
-{
-    (*this) << "(delete World)";
-    id.clear();
-}
-
-void
-Geomview_stream::look_recenter()
-{
-    (*this) << "(look-recenter World)";
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(const std::string & s)
-{
-    if ((int)s.length() != ::write(out, s.data(), s.length())) {
-        CGAL_error_msg( "write problem in the pipe while sending data to geomview" );
-    }
-    trace(s);
-
-    return *this;
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(int i)
-{
-    // Depending on the mode chosen
-    if (get_binary_mode()) {
-        // we write raw binary data to the stream.
-        int num = i;
-        I_swap_to_big_endian(num);
-        std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
-        (void)retwrite;
-        trace(i);
-    } else {
-        // transform the int in a character sequence and put whitespace around
-        std::ostringstream str;
-        str << i << ' ' << std::ends;
-        *this << str.str().c_str();
-    }
-
-    return *this;
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(unsigned int i)
-{
-    // Depending on the mode chosen
-    if (get_binary_mode()) {
-        // we write raw binary data to the stream.
-        unsigned int num = i;
-        I_swap_to_big_endian(num);
-        std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
-        (void)retwrite;
-        trace(i);
-    } else {
-        // transform the int in a character sequence and put whitespace around
-        std::ostringstream str;
-        str << i << ' ' << std::ends;
-        *this << str.str().c_str();
-    }
-
-    return *this;
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(long i)
-{
-    return operator<<((int) i);
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(unsigned long i)
-{
-    return operator<<((unsigned int) i);
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(double d)
-{
-    float f = d;
-    if (get_binary_mode()) {
-        float num = d;
-        I_swap_to_big_endian(num);
-        std::size_t retwrite= ::write(out, (char*)&num, sizeof(num));
-        (void)retwrite;
-        trace(f);
-    } else {
-        // 'copy' the float in a string and append a blank
-        std::ostringstream str;
-        str << f << ' ' << std::ends;
-        *this << str.str().c_str();
-    }
-    return *this;
-}
-
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Bbox_2 &bbox)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Bbox")
-       << " {VECT 1 5 0 5 0 ";
-    // here are the four corners
-
-    gv << bbox.xmin() << bbox.ymin() << 0.0
-       << bbox.xmin() << bbox.ymax() << 0.0
-       << bbox.xmax() << bbox.ymax() << 0.0
-       << bbox.xmax() << bbox.ymin() << 0.0
-       << bbox.xmin() << bbox.ymin() << 0.0;
-
-    // close the text bracket
-    gv << "})";
-    gv.set_ascii_mode(ascii_bak);
-
-    return gv;
-}
-
-Geomview_stream&
-operator<<(Geomview_stream &gv, const Bbox_3 &bbox)
-{
-    bool ascii_bak = gv.set_ascii_mode();
-    gv << "(geometry " << gv.get_new_id("Bbox")
-       << " {appearance {material {edgecolor "
-       << gv.ecr() << gv.ecg() << gv.ecb() <<  "}}{SKEL 8 4 "
-    // here are the corners
-       << bbox.xmin() << bbox.ymin() << bbox.zmin()
-       << bbox.xmin() << bbox.ymax() << bbox.zmin()
-       << bbox.xmax() << bbox.ymax() << bbox.zmin()
-       << bbox.xmax() << bbox.ymin() << bbox.zmin()
-       << bbox.xmax() << bbox.ymin() << bbox.zmax()
-       << bbox.xmax() << bbox.ymax() << bbox.zmax()
-       << bbox.xmin() << bbox.ymax() << bbox.zmax()
-       << bbox.xmin() << bbox.ymin() << bbox.zmax()
-
-       << "10 0 1 2 3 4 5 6 7 0 3\n"
-       << "2 1 6\n"
-       << "2 2 5\n"
-       << "2 4 7\n"
-
-    // close the text bracket
-       << "}})";
-    gv.set_ascii_mode(ascii_bak);
-
-    return gv;
-}
-
-void
-Geomview_stream::set_bg_color(const Color &c)
-{
-    bool ascii_bak = set_ascii_mode();
-    *this << "(backcolor \"Camera\" "
-          << double(c.r())/255.0
-          << double(c.g())/255.0
-          << double(c.b())/255.0
-          << ")";
-    set_ascii_mode(ascii_bak);
-}
-
-Geomview_stream&
-Geomview_stream::operator<<(const Color &c)
-{
-    vertex_color = edge_color = face_color = c;
-    return (*this);
-}
-
-Color
-Geomview_stream::get_vertex_color() const
-{
-    return vertex_color;
-}
-
-Color
-Geomview_stream::get_edge_color() const
-{
-    return edge_color;
-}
-
-Color
-Geomview_stream::get_face_color() const
-{
-    return face_color;
-}
-
-Color
-Geomview_stream::set_vertex_color(const Color &c)
-{
-    Color old = vertex_color;
-    vertex_color = c;
-    return old;
-}
-
-Color
-Geomview_stream::set_edge_color(const Color &c)
-{
-    Color old = edge_color;
-    edge_color = c;
-    return old;
-}
-
-Color
-Geomview_stream::set_face_color(const Color &c)
-{
-    Color old = face_color;
-    face_color = c;
-    return old;
-}
-
-double
-Geomview_stream::vcr() const
-{
-    return double(vertex_color.r())/255.0;
-}
-
-double
-Geomview_stream::vcg() const
-{
-    return double(vertex_color.g())/255.0;
-}
-
-double
-Geomview_stream::vcb() const
-{
-    return double(vertex_color.b())/255.0;
-}
-
-double
-Geomview_stream::ecr() const
-{
-    return double(edge_color.r())/255.0;
-}
-
-double
-Geomview_stream::ecg() const
-{
-    return double(edge_color.g())/255.0;
-}
-
-double
-Geomview_stream::ecb() const
-{
-    return double(edge_color.b())/255.0;
-}
-
-double
-Geomview_stream::fcr() const
-{
-    return double(face_color.r())/255.0;
-}
-
-double
-Geomview_stream::fcg() const
-{
-    return double(face_color.g())/255.0;
-}
-
-double
-Geomview_stream::fcb() const
-{
-    return double(face_color.b())/255.0;
-}
-
-void
-Geomview_stream::frame(const Bbox_3 &bbox)
-{
-    (*this) << bbox << "(look-recenter g0 c0)";
-}
-
-Geomview_stream&
-Geomview_stream::operator>>(char *expr)
-{
-    // Skip whitespaces
-    do {
-      std::size_t retread=::read(in, expr, 1);
-      (void)retread;
-    } while (expr[0] != '(');
-
-    int pcount = 1;
-    int i = 1;
-    while (1) {
-        std::size_t retread=::read(in, &expr[i], 1);
-        (void)retread;
-        if (expr[i] == ')'){
-            pcount--;
-        } else if (expr[i] == '('){
-            pcount++;
-        }
-        if (pcount == 0){
-            expr[i+1]='\0';
-            break;  // we encountered a balanced number of parantheses
-        }
-        i++;
-    }
-    return *this;
-}
-
-// Parse a Lisp expression, return a pointer to the beginning of the
-// nth subexpression, and terminate it by '\0'.
-// It's either a word terminated by ' ' or ')', or a well parenthesed
-// expression, or a quoted "string".
-char*
-Geomview_stream::nth(char* s, int count)
-{
-    s++; // skip first character (always a parenthesis)
-
-    // Skip "count" words.
-    for(; count != 0; count--) {
-        while (*s == ' ')       // skip whitespaces
-            s++;
-        s++;
-        while (*s != ' ')       // skip a word
-            s++;
-    }
-    while (*s == ' ')           // skip whitespaces
-        s++;
-
-    // Now we have the beginning of the searched sub-expression.
-    int j = 1;
-    if (*s == '(')              // Case of a well-parenthesed expression.
-        for (int pcount = 1; pcount != 0;) {
-            if (s[j] == ')') pcount--;
-            if (s[j] == '(') pcount++;
-            j++;
-        }
-    else if (*s == '"') {       // Case of a quoted "string".
-        while (s[j] != '"')
-            j++;
-        j++;
-    }
-    else                        // Case of a word terminated by ' ' or ')'.
-        while (s[j] != ' ' && s[j] != ')')
-            j++;
-
-    s[j] = '\0';
-    return s;
-}
-
-void
-Geomview_stream::parse_point(const char* pickpoint,
-		     double &x, double &y, double &z, double &w)
-{
-    std::stringstream ss;
-    ss << pickpoint << std::ends;
-
-    char parenthesis;
-    ss >> parenthesis >> x >> y >> z >> w;
-}
-
-std::string
-Geomview_stream::get_new_id(const std::string & s)
-{
-    std::ostringstream str;
-    str << s << id[s]++ << std::ends;
-    return str.str();
-}
-
-} //namespace CGAL
-
-#else
-
-// Add a dummy symbol to prevent warnings of empty translation unit.
-namespace CGAL {
-namespace {
-int dummy;
-}
-} //namespace CGAL
-
-#endif // CGAL_USE_GEOMVIEW
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Interval_arithmetic.cpp b/3rdparty/CGAL-4.6/src/CGAL/Interval_arithmetic.cpp
deleted file mode 100644
index 50f643c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Interval_arithmetic.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 1999-2004  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sylvain Pion
- 
-#include <CGAL/basic.h>
-#include <CGAL/FPU.h>
-
-namespace CGAL {
-
-#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG
-// For compilers which bug on denormalized values at compile time.
-// We generate CGAL_IA_MIN_DOUBLE at run time.
-namespace {
-double init_min_double()
-{
-    double d = 1;
-    double e = 1;
-    do {
-	d = e;
-	e = CGAL_IA_FORCE_TO_DOUBLE(e/2);
-    } while (e != 0);
-    return d;
-}
-} // anonymous namespace
-
-namespace internal {
-double minimin = init_min_double();
-}
-#endif
-
-#ifdef _MSC_VER
-namespace {
-int dummy_symbol_for_stopping_VC_linker_warning;
-} // namespace
-#endif
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/JAMA_numeric_solver.cpp b/3rdparty/CGAL-4.6/src/CGAL/JAMA_numeric_solver.cpp
deleted file mode 100644
index f602104..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/JAMA_numeric_solver.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
-#include <CGAL/Polynomial/internal/numeric_solvers.h>
-
-#ifdef CGAL_HAVE_TNT
-#include <TNT/tnt_array2d.h>
-#include <TNT/tnt_array1d.h>
-#include <TNT/jama_eig.h>
-#endif
-
-#include <algorithm>
-#include <functional>
-#include <iterator>
-
-//#include <iomanip>
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-#if CGAL_HAVE_TNT
-//static const double max_error_value =0.00005;
-
-template <bool CLEAN, class NT>
-static void jama_compute_roots(const NT *begin, const NT *end,  NT lb,
-NT ub, std::vector<NT> &roots)
-{
-    int degree= end-begin-1;
-    TNT::Array2D<NT> arr(degree, degree, 0.0);
-    for (int i=0; i< degree; ++i) {
-        arr[0][i]=-begin[degree-i-1]/begin[degree];
-    }
-    for (int i=0; i+1< degree; ++i) {
-        arr[i+1][i]=1;
-    }
-
-    JAMA::Eigenvalue<NT> ev(arr);
-    TNT::Array1D<NT> real, imag;
-    ev.getImagEigenvalues(imag);
-    ev.getRealEigenvalues(real);
-    CGAL_Polynomial_assertion(imag.dim1()== real.dim1());
-
-    /*NT tol;
-    if (CLEAN) tol=.00005;
-    else tol=0;*/
-
-    for (int i=0; i< real.dim1(); ++i) {
-        if (root_is_good(real[i], imag[i], lb-tol, ub)) {
-            roots.push_back(real[i]/*polish_root(begin, end, real[i])*/);
-        } else {
-        }
-    }
-    std::sort(roots.begin(), roots.end(), std::greater<NT>());
-    if (CLEAN) filter_roots(begin, end, lb, roots);
-}
-
-#endif
-
-
-
-void jama_polynomial_compute_roots(const double *begin, const double *end,
-double lb, double ub,
-std::vector<double> &roots)
-{
-  std::ptrdiff_t degree= end-begin-1;
-    switch( degree) {
-        case -1:
-        case 0:
-            break;
-        case 1:
-            compute_linear_roots(begin,end, lb, ub, roots);
-            break;
-        case 2:
-            compute_quadratic_roots(begin, end, lb, ub, roots);
-            break;
-        default:
-#ifdef CGAL_HAVE_TNT
-	  jama_compute_roots<false>(begin, end, lb, ub, roots);
-#else
-	  CGAL_error();
-#endif
-	  //jama_compute_roots<false>(begin, end, lb, ub, roots);
-    }
-}
-
-
-void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end,
-double lb, double ub,
-std::vector<double> &roots)
-{
-  std::ptrdiff_t degree= end-begin-1;
-    switch( degree) {
-        case -1:
-        case 0:
-            break;
-        case 1:
-            compute_linear_cleaned_roots(begin,end, lb, ub, roots);
-            break;
-        case 2:
-            compute_quadratic_cleaned_roots(begin, end, lb, ub, roots);
-            break;
-        default:
-#ifdef CGAL_HAVE_TNT
-	  jama_compute_roots<true>(begin, end, lb, ub, roots);
-#else
-	  CGAL_error();
-#endif
-    }
-}
-
-
-} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL/KDS_Log.cpp b/3rdparty/CGAL-4.6/src/CGAL/KDS_Log.cpp
deleted file mode 100644
index a2d296c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/KDS_Log.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <boost/config.hpp>
-
-#if defined(BOOST_MSVC)
-#  pragma warning(disable:4251)
-#endif
-
-#include <CGAL/Tools/Log.h>
-#include <CGAL/Kinetic/internal/debug_counters.h>
-#include <iostream>
-namespace CGAL {
-Log::State Log::state_;
-} //namespace CGAL
-namespace CGAL { namespace Kinetic { namespace internal {
-
-  unsigned int function_degeneracies__=0;
-  unsigned int zero_certificates__=0;
-  unsigned int io_errors__=0;
-  unsigned int audit_failures__=0;
-
-  void write_debug_counters(std::ostream &out) {
-    out << "Degeneracies " << function_degeneracies__ << std::endl;
-    out << "Zero functions " << zero_certificates__ << std::endl;
-    if (io_errors__ != 0) out << "I/O errors " << io_errors__ << std::endl;
-    if (audit_failures__ != 0) out << "Audit failures " << audit_failures__ << std::endl;
-  }
-
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL/NefPolynomial.cpp b/3rdparty/CGAL-4.6/src/CGAL/NefPolynomial.cpp
deleted file mode 100644
index 2610748..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/NefPolynomial.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel
-//                 Andreas Fabri
-
-#include <CGAL/Nef_2/Polynomial.h>
-
-namespace CGAL{
-
-  namespace Nef {
-
-void Polynomial<int>::euclidean_div(
-  const Polynomial<int>& f, const Polynomial<int>& g,
-  Polynomial<int>& q, Polynomial<int>& r)
-{
-  r = f; r.copy_on_write();
-  int rd=r.degree(), gd=g.degree(), qd;
-  if ( rd < gd ) { q = Polynomial<int>(int(0)); }
-  else { qd = rd-gd+1; q = Polynomial<int>(std::size_t(qd)); }
-  while ( rd >= gd && !(r.is_zero())) {
-    int S = r[rd] / g[gd];
-    qd = rd-gd;
-    q.coeff(qd) += S;
-    r.minus_offsetmult(g,S,qd);
-    rd = r.degree();
-  }
-  CGAL_postcondition( f==q*g+r );
-}
-
-
-
-void Polynomial<int>::pseudo_div(
-  const Polynomial<int>& f, const Polynomial<int>& g, 
-  Polynomial<int>& q, Polynomial<int>& r, int& D)
-{
-  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
-  int fd=f.degree(), gd=g.degree();
-  if ( fd<gd ) 
-  { q = Polynomial<int>(0); r = f; D = 1; 
-    CGAL_postcondition(Polynomial<int>(D)*f==q*g+r); return; 
-  }
-  // now we know fd >= gd and f>=g
-  int qd=fd-gd, delta=qd+1, rd=fd;
-  { q = Polynomial<int>( std::size_t(delta) ); }; // workaround for SUNPRO
-  int G = g[gd]; // highest order coeff of g
-  D = G; while (--delta) D*=G; // D = G^delta
-  Polynomial<int> res = Polynomial<int>(D)*f;
-  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
-  while (qd >= 0) {
-    int F = res[rd]; // highest order coeff of res
-    int t = F/G;     // ensured to be integer by multiplication of D
-    q.coeff(qd) = t;    // store q coeff
-    res.minus_offsetmult(g,t,qd); 
-    if (res.is_zero()) break;
-    rd = res.degree();
-    qd = rd - gd;
-  }
-  r = res;
-  CGAL_postcondition(Polynomial<int>(D)*f==q*g+r);
-  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
-}
-
-
-
-Polynomial<int> Polynomial<int>::gcd(
-  const Polynomial<int>& p1, const Polynomial<int>& p2)
-{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
-  if ( p1.is_zero() ) {
-    if ( p2.is_zero() ) return Polynomial<int>(int(1));
-    else return p2.abs();
-  }
-  if ( p2.is_zero() )
-    return p1.abs();
-
-  Polynomial<int> f1 = p1.abs();
-  Polynomial<int> f2 = p2.abs();
-  int f1c = f1.content(), f2c = f2.content();
-  f1 /= f1c; f2 /= f2c;
-  int F = CGAL::gcd(f1c,f2c);
-  Polynomial<int> q,r; int M=1,D;
-  bool first = true;
-  while ( ! f2.is_zero() ) { 
-    Polynomial<int>::pseudo_div(f1,f2,q,r,D);
-    if (!first) M*=D;
-    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
-    r /= r.content();
-    f1=f2; f2=r;
-    first=false;
-  }
-  CGAL_NEF_TRACEV(f1.content());
-  return Polynomial<int>(F)*f1.abs();
-}
-
-
-
-
-void Polynomial<double>::euclidean_div(
-  const Polynomial<double>& f, const Polynomial<double>& g,
-  Polynomial<double>& q, Polynomial<double>& r)
-{
-  r = f; r.copy_on_write();
-  int rd=r.degree(), gd=g.degree(), qd;
-  if ( rd < gd ) { q = Polynomial<double>(double(0)); }
-  else { qd = rd-gd+1; q = Polynomial<double>(std::size_t(qd)); }
-  while ( rd >= gd && !(r.is_zero())) {
-    double S = r[rd] / g[gd];
-    qd = rd-gd;
-    q.coeff(qd) += S;
-    r.minus_offsetmult(g,S,qd);
-    rd = r.degree();
-  }
-  CGAL_postcondition( f==q*g+r );
-}
-
-
-
-void Polynomial<double>::pseudo_div(
-  const Polynomial<double>& f, const Polynomial<double>& g, 
-  Polynomial<double>& q, Polynomial<double>& r, double& D)
-{
-  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
-  int fd=f.degree(), gd=g.degree();
-  if ( fd<gd ) 
-  { q = Polynomial<double>(0); r = f; D = 1; 
-    CGAL_postcondition(Polynomial<double>(D)*f==q*g+r); return; 
-  }
-  // now we know fd >= gd and f>=g
-  int qd=fd-gd, delta=qd+1, rd=fd;
-  q = Polynomial<double>( std::size_t(delta) );
-  double G = g[gd]; // highest order coeff of g
-  D = G; while (--delta) D*=G; // D = G^delta
-  Polynomial<double> res = Polynomial<double>(D)*f;
-  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
-  while (qd >= 0) {
-    double F = res[rd]; // highest order coeff of res
-    double t = F/G;     // ensured to be integer by multiplication of D
-    q.coeff(qd) = t;    // store q coeff
-    res.minus_offsetmult(g,t,qd); 
-    if (res.is_zero()) break;
-    rd = res.degree();
-    qd = rd - gd;
-  }
-  r = res;
-  CGAL_postcondition(Polynomial<double>(D)*f==q*g+r);
-  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
-}
-
-Polynomial<double> Polynomial<double>::gcd(
-  const Polynomial<double>& p1, const Polynomial<double>& p2)
-{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
-  if ( p1.is_zero() ) {
-    if ( p2.is_zero() ) return Polynomial<double>(double(1));
-    else return p2.abs();
-  }
-  if ( p2.is_zero() )
-    return p1.abs();
-
-  Polynomial<double> f1 = p1.abs();
-  Polynomial<double> f2 = p2.abs();
-  double f1c = f1.content(), f2c = f2.content();
-  f1 /= f1c; f2 /= f2c;
-  Polynomial<double> q,r; double M=1,D;
-  bool first = true;
-  while ( ! f2.is_zero() ) { 
-    Polynomial<double>::pseudo_div(f1,f2,q,r,D);
-    if (!first) M*=D;
-    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
-    r /= r.content();
-    f1=f2; f2=r;
-    first=false;
-  }
-  CGAL_NEF_TRACEV(f1.content());
-  return Polynomial<double>(1)*f1.abs();
-}
-
-
-} // end namespace Nef
-}//end namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Random.cpp b/3rdparty/CGAL-4.6/src/CGAL/Random.cpp
deleted file mode 100644
index 9a5887a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Random.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 1997-2001  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Sven Schönherr <sven at inf.ethz.ch>
-
-#include <CGAL/Random.h>
-#include <ctime>
-#include <sstream>
-
-namespace CGAL {
-
-// Class implementation (continued)
-// ================================
-
-// constructors
-Random::
-Random( )
-    :  val(0)
-{
-    // get system's time
-    std::time_t s;
-    std::time( &s);
-    seed = (unsigned int)s;
-
-    // initialize random numbers generator
-    rng.seed(static_cast<boost::int32_t>(seed));
-    random_value = get_int(0, 1<<15);
-}
-
-Random::
-Random( unsigned int  seed)
-    : val(0), seed(seed)
-{
-    // initialize random numbers generator
-    rng.seed(static_cast<boost::int32_t>(seed));
-    random_value = get_int(0, 1<<15);
-}
-
-// seed
-unsigned int
-Random::get_seed () const
-{ 
-  return seed; 
-}
-
-// state
-void 
-Random::save_state( Random::State& state) const
-{
-  std::ostringstream os;
-  os << rng;
-  state = Random::State(os.str(),random_value, val, seed);
-}
-
-void 
-Random::restore_state( const Random::State& state)
-{
-  std::istringstream is(state.rng);
-  is >> rng;
-  random_value = state.random_value;
-  val = state.val;
-  seed = state.seed;
-}
-
-// Global variables
-// ================
-Random  default_random;
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Real_timer.cpp b/3rdparty/CGAL-4.6/src/CGAL/Real_timer.cpp
deleted file mode 100644
index e0a258b..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Real_timer.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
-//                 Matthias Baesken <baesken at informatik.uni-halle.de>
-
-#include <CGAL/Real_timer.h>
-
-#if defined (_MSC_VER)
-#  include <sys/timeb.h>
-#  include <sys/types.h>
-
-#elif defined (__MINGW32__)
-#  include <sys/timeb.h>
-#  include <sys/types.h>
-
-#else
-// If none of the above PC compilers, use POSIX fct. gettimeofday()
-#  include <sys/time.h>
-#endif
-
-namespace CGAL {
-
-// Static member variable for Real_timer
-// =====================================
-
-bool Real_timer::m_failed = false;
-
-// Member functions for Real_timer
-// =====================================
-
-double Real_timer::get_real_time() const {
-    // Depends on the operating system.
-    // Returns a (weakly ;-) monotone increasing time in seconds (with
-    // possible wrap-around in case of overflow, see max()), or 0.0
-    // if the system call for the time failed. If the system call
-    // failed the static flag 'm_failed' is set and can be used
-    // by the caller.
-#if   defined(_MSC_VER)
-    struct _timeb  t;
-    _ftime(&t);  
-    return double(t.time) + double(t.millitm) / 1000.0;
-#elif defined (__MINGW32__)
-    struct timeb t;
-    ftime(&t);
-    return double(t.time) + double(t.millitm) / 1000.0;
-#else // ! _MSC_VER && ! __MINGW32__//
-    struct timeval t;
-    int ret = gettimeofday( &t, NULL);
-    CGAL_warning_msg( ret == 0, "Call to gettimeofday() in class "
-                      "CGAL::Real_timer failed - timings will be 0.");
-    if ( ret == 0) {
-        return double(t.tv_sec) + double(t.tv_usec) / 1000000;
-    }
-    m_failed = true;
-    return 0.0;
-#endif // ! _MSC_VER && ! __MINGW32__//
-}
-
-double Real_timer::compute_precision() const {
-    // Computes timer precision in seconds dynamically. Note that
-    // the timer system call is probably non-trivial and will show
-    // up in this time here (probably for one call). But that is just
-    // fine that the call to the timer itself if reported as noise 
-    // in the precision.
-    double min_res = DBL_MAX;
-    for ( int i = 0; i < 5; ++i) {
-        double current = get_real_time();
-        if ( m_failed)
-            return -1.0;
-        double next    = get_real_time();
-        while ( current >= next) { // wait until timer increases
-            next = get_real_time();
-            if ( m_failed)
-                return -1.0;
-        }
-        // Get the minimum timing difference of all runs.
-        if ( min_res > next - current)
-            min_res = next - current;
-    }
-    return min_res;
-}
-
-double Real_timer::precision() const {
-    // computes precision upon first call
-    // returns -1.0 if timer system call fails.
-    static double prec = compute_precision();
-    return prec;
-}
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Residue_type.cpp b/3rdparty/CGAL-4.6/src/CGAL/Residue_type.cpp
deleted file mode 100644
index e221b51..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Residue_type.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Michael Hemmer
-
-
-#include <CGAL/Residue.h>
-
-namespace CGAL{
-#ifdef CGAL_HAS_THREADS
-boost::thread_specific_ptr<int>    Residue::prime_int_;
-boost::thread_specific_ptr<double> Residue::prime_;
-boost::thread_specific_ptr<double> Residue::prime_inv_;
-#else
-int Residue::prime_int = 67111067;
-double Residue::prime = 67111067.0;
-double Residue::prime_inv =1/67111067.0;
-
-#endif
-
-const double Residue::CST_CUT = std::ldexp( 3., 51 );
-
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Timer.cpp b/3rdparty/CGAL-4.6/src/CGAL/Timer.cpp
deleted file mode 100644
index 290d4f1..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Timer.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
-//                 Matthias Baesken <baesken at informatik.uni-halle.de>
-
-#include <CGAL/Timer.h>
-
-// Determine if the POSIX function getrusage is available, otherwise
-// use the previous solution based on std::clock().
-// First, detect POSIX. We cannot reliably use "unistd.h", 
-// but limits.h is part of the C standard.
-#include <climits>
-#ifdef _POSIX_ARG_MAX // now that should be POSIX
-#include <unistd.h>
-#ifdef _POSIX_VERSION
-#ifdef _XOPEN_UNIX // XSI: X/Open System Interfaces Extension
-#define CGAL__GETRUSAGE 1
-#endif
-#endif
-#endif
-
-
-#ifdef CGAL__GETRUSAGE
-// types, function prototype and constants for the POSIX function
-// int getrusage (int who, struct rusage *usage);
-#include <sys/resource.h>
-// For the numerical limits
-#else //  CGAL__GETRUSAGE //
-// used for clock()
-#include <ctime>
-#endif //  CGAL__GETRUSAGE //
-
-// For the numerical limits
-#include <cfloat>
-
-
-namespace CGAL {
-
-
-// Static member variable for Timer
-// =====================================
-
-bool Timer::m_failed = false;
-
-// Member functions for Timer
-// =====================================
-
-double Timer::user_process_time() const {
-    // Depends on the operating system.
-    // Returns a (weakly ;-) monotone increasing time in seconds (with
-    // possible wrap-around in case of overflow, see max()), or 0.0
-    // if the system call for the time failed. If the system call
-    // failed the static flag 'm_failed' is set and can be used
-    // by the caller.
-#ifdef CGAL__GETRUSAGE
-    struct rusage usage;
-    int ret = getrusage( RUSAGE_SELF, &usage);
-    CGAL_warning_msg( ret == 0, "Call to getrusage() in class CGAL::Timer "
-                      "failed - timings will be 0.");
-    if ( ret == 0) {
-        return double( usage.ru_utime.tv_sec)               // seconds
-             + double( usage.ru_utime.tv_usec) / 1000000.0; // microseconds
-    }
-#else // CGAL__GETRUSAGE //
-    std::clock_t clk = std::clock();
-    CGAL_warning_msg( clk != (std::clock_t)-1,
-        "Call to clock() in class CGAL::Timer failed - timings will be 0.");
-    if ( clk != (std::clock_t)-1) {
-        return double(clk) / CLOCKS_PER_SEC;
-    }        
-#endif // CGAL__GETRUSAGE //
-    m_failed = true;
-    return 0.0;
-}
-
-double Timer::compute_precision() const {
-    // Computes timer precision in seconds dynamically. Note that
-    // the timer system call is probably non-trivial and will show
-    // up in this time here (probably for one call). But that is just
-    // fine that the call to the timer itself if reported as noise 
-    // in the precision.
-    double min_res = DBL_MAX;
-    for ( int i = 0; i < 5; ++i) {
-        double current = user_process_time();
-        if ( m_failed)
-            return -1.0;
-        double next    = user_process_time();
-        while ( current >= next) { // wait until timer increases
-            next = user_process_time();
-            if ( m_failed)
-                return -1.0;
-        }
-        // Get the minimum timing difference of all runs.
-        if ( min_res > next - current)
-            min_res = next - current;
-    }
-    return min_res;
-}
-
-double Timer::precision() const {
-    // computes precision upon first call
-    // returns -1.0 if timer system call fails.
-    static double prec = compute_precision();
-    return prec;
-}
-
-double Timer::max BOOST_PREVENT_MACRO_SUBSTITUTION () const { 
-    // Depends on the operating system.
-#ifdef CGAL__GETRUSAGE
-    return DBL_MAX;
-#else // CGAL__GETRUSAGE //
-    return 2146.0;
-#endif // CGAL__GETRUSAGE //
-}
-
-} //namespace CGAL
-
-// EOF //
diff --git a/3rdparty/CGAL-4.6/src/CGAL/Turkowski_numeric_solver.cpp b/3rdparty/CGAL-4.6/src/CGAL/Turkowski_numeric_solver.cpp
deleted file mode 100644
index 419aa40..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/Turkowski_numeric_solver.cpp
+++ /dev/null
@@ -1,461 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
-#include <CGAL/Polynomial/internal/numeric_solvers.h>
-
-/*#ifdef _MSC_VER
-#pragma warning(disable:1572)
-#endif*/
-
-
-//#include "numeric_solvers_support.C"
-
-// Taken from http://www.worldserver.com/turk/opensource/
-
-/* Copyright (C) 1978-1999 Ken Turkowski. <turk_at_computer.org>
- *
- * All rights reserved.
- *
- * Warranty Information
- *  Even though I have reviewed this software, I make no warranty
- *  or representation, either express or implied, with respect to this
- *  software, its quality, accuracy, merchantability, or fitness for a
- *  particular purpose.  As a result, this software is provided "as is,"
- *  and you, its user, are assuming the entire risk as to its quality
- *  and accuracy.
- *
- * This code may be used and freely distributed as long as it includes
- * this copyright notice and the above warranty information.
- */
-
-#include <cmath>
-#include <iomanip>
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-
-# define FLOAT double
-
-static const unsigned int MAXN= 55;
-//# define PARAMFLOAT double_t
-
-/*******************************************************************************
- * FindCubicRoots
- *
- *	Solve:
- *		coeff[3] * x^3 + coeff[2] * x^2 + coeff[1] * x + coeff[0] = 0
- *
- *	returns:
- *		3 - 3 real roots
- *		1 - 1 real root (2 complex conjugate)
- *******************************************************************************/
-
-static long
-FindCubicRoots(const FLOAT coeff[4], FLOAT x[3])
-{
-  FLOAT a1 = coeff[2] / coeff[3];
-  FLOAT a2 = coeff[1] / coeff[3];
-  FLOAT a3 = coeff[0] / coeff[3];
-
-  double Q = (a1 * a1 - 3 * a2) / 9;
-  double R = (2 * a1 * a1 * a1 - 9 * a1 * a2 + 27 * a3) / 54;
-  double Qcubed = Q * Q * Q;
-  double d = Qcubed - R * R;
-
-  /* Three real roots */
-  if (d >= 0) {
-    double theta = std::acos(R / std::sqrt(Qcubed));
-    double sqrtQ = std::sqrt(Q);
-    x[0] = -2 * sqrtQ * std::cos( theta           / 3) - a1 / 3;
-    x[1] = -2 * sqrtQ * std::cos((theta + 2 * CGAL_PI) / 3) - a1 / 3;
-    x[2] = -2 * sqrtQ * std::cos((theta + 4 * CGAL_PI) / 3) - a1 / 3;
-    return (3);
-  }
-
-  /* One real root */
-  else {
-    double e = std::pow(std::sqrt(-d) + ::CGAL::abs(R), 1. / 3.);
-    if (R > 0)
-      e = -e;
-    x[0] = (e + Q / e) - a1 / 3.;
-    return (1);
-  }
-}
-
-
-/*******************************************************************************
- * FindPolynomialRoots
- *
- * The Bairstow and Newton correction formulae are used for a simultaneous
- * linear and quadratic iterated synthetic division.  The coefficients of
- * a polynomial of degree n are given as a[i] (i=0,i,..., n) where a[0] is
- * the constant term.  The coefficients are scaled by dividing them by
- * their geometric mean.  The Bairstow or Newton iteration method will
- * nearly always converge to the number of figures carried, fig, either to
- * root values or to their reciprocals.  If the simultaneous Newton and
- * Bairstow iteration fails to converge on root values or their
- * reciprocals in maxiter iterations, the convergence requirement will be
- * successively reduced by one decimal figure.  This program anticipates
- * and protects against loss of significance in the quadratic synthetic
- * division.  (Refer to "On Programming the Numerical Solution of
- * Polynomial Equations," by K. W. Ellenberger, Commun. ACM 3 (Dec. 1960),
- * 644-647.)  The real and imaginary part of each root is stated as u[i]
- * and v[i], respectively, together with the corresponding constant,
- * conv[i], used in the convergence test.  This program has been used
- * successfully for over a year on the Bendix G15-D (Intercard System) and
- * has recently been coded for the IBM 709 (Fortran system).
- *
- * ACM algorithm #30 - Numerical Solution of the Polynomial Equation
- * K. W. Ellenberger
- * Missle Division, North American Aviation, Downey, California
- * Converted to C, modified, optimized, and structured by
- * Ken Turkowski
- * CADLINC, Inc., Palo Alto, California
- *******************************************************************************/
-
-static void
-FindPolynomialRoots(
-		    const FLOAT     *a,                               /* Coefficients */
-		    FLOAT           *u,                               /* Real component of each root */
-		    FLOAT           *v,                               /* Imaginary component of each root */
-		    FLOAT           *conv,                            /* Convergence constant associated with each root */
-		    register long   n,                                /* Degree of polynomial (order-1) */
-		    long            maxiter,                          /* Maximum number of iterations */
-		    long            fig                               /* The number of decimal figures to be computed */
-		    )
-{
-  int number_of_ITERATE=0;
-  int number_of_INIT=0;
-  CGAL_precondition(static_cast<unsigned int>(fig) < MAXN);
-  int i;
-  register int j;
-  FLOAT h[MAXN + 3], b[MAXN + 3], c[MAXN + 3], d[MAXN + 3], e[MAXN + 3];
-  /* [-2 : n] */
-  FLOAT K, ps, qs, pt, qt, s, rev, r= std::numeric_limits<double>::infinity();
-  int t;
-  FLOAT p=std::numeric_limits<double>::infinity(), q=std::numeric_limits<double>::infinity();
-
-  /* Zero elements with negative indices */
-  b[2 + -1] = b[2 + -2] =
-    c[2 + -1] = c[2 + -2] =
-    d[2 + -1] = d[2 + -2] =
-    e[2 + -1] = e[2 + -2] =
-    h[2 + -1] = h[2 + -2] = 0.0;
-
-  /* Copy polynomial coefficients to working storage */
-  for (j = n; j >= 0; j--)
-    h[2 + j] = *a++;                          /* Note reversal of coefficients */
-
-  t = 1;
-  K = std::pow(10.0, (double)(fig));            /* Relative accuracy */
-
-  for (; h[2 + n] == 0.0; n--) {                /* Look for zero high-order coeff. */
-    *u++ = 0.0;
-    *v++ = 0.0;
-    *conv++ = K;
-  }
-
- INIT:
-  ++number_of_INIT;
-  if (number_of_INIT > 1000) {
-    std::cerr << "Too many INITs" << std::flush;
-    return;
-  }
-
-  if (n == 0)
-    return;
-
-  ps = qs = pt = qt = s = 0.0;
-  rev = 1.0;
-  K = std::pow(10.0, (double)(fig));
-
-  if (n == 1) {
-    r = -h[2 + 1] / h[2 + 0];
-    goto LINEAR;
-  }
-
-  for (j = n; j >= 0; j--)                      /* Find geometric mean of coeff's */
-    if (h[2 + j] != 0.0)
-      s += std::log( ::CGAL::abs(h[2 + j]));
-  s = std::exp(s / (n + 1));
-
-  for (j = n; j >= 0; j--)                      /* Normalize coeff's by mean */
-    h[2 + j] /= s;
-
-  if ( ::CGAL::abs(h[2 + 1] / h[2 + 0]) < ::CGAL::abs(h[2 + n - 1] / h[2 + n])) {
-  REVERSE:
-    t = -t;
-    for (j = (n - 1) / 2; j >= 0; j--) {
-      s = h[2 + j];
-      h[2 + j] = h[2 + n - j];
-      h[2 + n - j] = s;
-    }
-  }
-  if (qs != 0.0) {
-    p = ps;
-    q = qs;
-  }
-  else {
-    if (h[2 + n - 2] == 0.0) {
-      q = 1.0;
-      p = -2.0;
-    }
-    else {
-      q = h[2 + n] / h[2 + n - 2];
-      p = (h[2 + n - 1] - q * h[2 + n - 3]) / h[2 + n - 2];
-    }
-    if (n == 2)
-      goto QADRTIC;
-    r = 0.0;
-  }
- ITERATE:
-  ++number_of_ITERATE;
-  if (number_of_ITERATE > 1000) {
-    std::cerr << "Too many ITERATEs" << std::flush;
-    return;
-  }
-  for (i = maxiter; i > 0; i--) {
-
-    for (j = 0; j <= n; j++) {                /* BAIRSTOW */
-      b[2 + j] = h[2 + j] - p * b[2 + j - 1] - q * b[2 + j - 2];
-      c[2 + j] = b[2 + j] - p * c[2 + j - 1] - q * c[2 + j - 2];
-    }
-    if ((h[2 + n - 1] != 0.0) && (b[2 + n - 1] != 0.0)) {
-      if ( ::CGAL::abs(h[2 + n - 1] / b[2 + n - 1]) >= K) {
-	b[2 + n] = h[2 + n] - q * b[2 + n - 2];
-      }
-      if (b[2 + n] == 0.0)
-	goto QADRTIC;
-      if (K < ::CGAL::abs(h[2 + n] / b[2 + n]))
-	goto QADRTIC;
-    }
-
-    for (j = 0; j <= n; j++) {                /* NEWTON */
-      /* Calculate polynomial at r */
-      d[2 + j] = h[2 + j] + r * d[2 + j - 1];
-      /* Calculate derivative at r */
-      e[2 + j] = d[2 + j] + r * e[2 + j - 1];
-    }
-    if (d[2 + n] == 0.0)
-      goto LINEAR;
-    if (K < ::CGAL::abs(h[2 + n] / d[2 + n]))
-      goto LINEAR;
-
-    c[2 + n - 1] = -p * c[2 + n - 2] - q * c[2 + n - 3];
-    s = c[2 + n - 2] * c[2 + n - 2] - c[2 + n - 1] * c[2 + n - 3];
-    if (s == 0.0) {
-      p -= 2.0;
-      q *= (q + 1.0);
-    }
-    else {
-      p += (b[2 + n - 1] * c[2 + n - 2] - b[2 + n] * c[2 + n - 3]) / s;
-      q += (-b[2 + n - 1] * c[2 + n - 1] + b[2 + n] * c[2 + n - 2]) / s;
-    }
-    if (e[2 + n - 1] == 0.0)
-      r -= 1.0;                             /* Minimum step */
-    else
-      r -= d[2 + n] / e[2 + n - 1];         /* Newton's iteration */
-  }
-  ps = pt;
-  qs = qt;
-  pt = p;
-  qt = q;
-  if (rev < 0.0)
-    K /= 10.0;
-  rev = -rev;
-  goto REVERSE;
-
- LINEAR:
-  if (t < 0)
-    r = 1.0 / r;
-  n--;
-  *u++ = r;
-  *v++ = 0.0;
-  *conv++ = K;
-
-  for (j = n; j >= 0; j--) {                    /* Polynomial deflation by lin-nomial */
-    if ((d[2 + j] != 0.0) && ( ::CGAL::abs(h[2 + j] / d[2 + j]) < K))
-      h[2 + j] = d[2 + j];
-    else
-      h[2 + j] = 0.0;
-  }
-
-  if (n == 0)
-    return;
-  goto ITERATE;
-
- QADRTIC:
-  if (t < 0) {
-    p /= q;
-    q = 1.0 / q;
-  }
-  n -= 2;
-
-  if (0.0 < (q - (p * p / 4.0))) {              /* Two complex roots */
-    *(u + 1) = *u = -p / 2.0;
-    u += 2;
-    s = sqrt(q - (p * p / 4.0));
-    *v++ = s;
-    *v++ = -s;
-  }                                             /* Two real roots */
-  else {
-    s = std::sqrt(((p * p / 4.0)) - q);
-    if (p < 0.0)
-      *u++ = -p / 2.0 + s;
-    else
-      *u++ = -p / 2.0 - s;
-    *u = q / u[-1];
-    ++u;                                      // moved from lhs of before
-    *v++ = 0.0;
-    *v++ = 0.0;
-  }
-  *conv++ = K;
-  *conv++ = K;
-
-  for (j = n; j >= 0; j--) {                    /* Polynomial deflation by quadratic */
-    if ((b[2 + j] != 0.0) && ( ::CGAL::abs(h[2 + j] / b[2 + j]) < K))
-      h[2 + j] = b[2 + j];
-    else
-      h[2 + j] = 0.0;
-  }
-  goto INIT;
-}
-
-
-#undef MAXN
-
-template <bool CLEAN>
-static void Turkowski_polynomial_compute_roots_t(const double *begin, 
-						 const double *end,
-						 double lb, double ub,
-						 std::vector<double> &roots)
-{
-  std::size_t numc= end-begin;
-  double rp[MAXN];
-  double cp[MAXN];
-  double cc[MAXN];
-
-  /*for (unsigned int i=0; i< numc; ++i){
-    rp[i]= std::numeric_limits<double>::infinity();
-    }*/
-
-  for (unsigned int i=0; i< MAXN; ++i){
-    cc[i]=std::numeric_limits<double>::infinity();
-    rp[i]=std::numeric_limits<double>::infinity();
-    cc[i]=std::numeric_limits<double>::infinity();
-  }
-
-  FindPolynomialRoots(begin, rp, cp, cc, static_cast<long>(numc)-1, 10*static_cast<long>(numc), 40);
-
-  /*if (CLEAN) {
-    lb-= .000005;
-    }*/
-  double last= -std::numeric_limits<double>::infinity();
-  for (std::size_t i=0; i< numc-1; ++i) {
-    /* std::cout << "Trying " <<  rp[i] << "+" << std::setprecision(10) <<  cp[i] << "i "
-       << cc[i] << "\n";*/
-    if (cc[i] > 10000 && root_is_good(rp[i], cp[i], lb, ub)) {
-      roots.push_back(rp[i]);
-      /*std::cout << "Good was " <<  rp[i] << "+" <<std::setprecision(10) <<  cp[i] << "i "
-	<< cc[i] << "\n";*/
-    } else if (CLEAN && root_is_good(rp[i], cp[i], last, ub) && last < rp[i] && rp[i] <= lb) {
-      last= rp[i];
-    }
-    /*else {
-      std::cout << "Rejected " << rp[i] << "+" << cp[i] << "i\n";
-      }*/
-  }
-  std::sort(roots.begin(), roots.end(), std::greater<double>());
-  
-  if (CLEAN) filter_solver_roots(begin, end, lb, ub, last, roots);
-}
-
-
-void Turkowski_polynomial_compute_roots(const double *begin, const double *end, 
-					double lb, double ub, 
-					std::vector<double> &roots)
-{
-
-  std::ptrdiff_t degree= end-begin-1;
-  switch( degree) {
-  case -1:
-  case 0:
-    break;
-  case 1:
-    compute_linear_roots(begin,end, lb, ub, roots);
-    break;
-  case 2:
-    compute_quadratic_roots(begin, end, lb, ub, roots);
-    break;
-  case 3:
-    {
-      double rd[3];
-      int numr= FindCubicRoots(begin, rd);
-      for (int i=numr-1; i>=0; --i) {
-	if (rd[i] >= lb && rd[i] < ub) roots.push_back(rd[i]);
-      }
-      std::sort(roots.begin(), roots.end(), std::greater<double>());
-      break;
-    }
-  default:
-    Turkowski_polynomial_compute_roots_t<false>(begin, end, lb, ub, roots);
-
-  }
-
-}
-
-
-void Turkowski_polynomial_compute_cleaned_roots(const double *begin, const double *end, 
-						double lb, double ub,
-						std::vector<double> &roots)
-{
-  std::ptrdiff_t degree= end-begin-1;
-  switch( degree) {
-  case -1:
-  case 0:
-    break;
-  case 1:
-    compute_linear_cleaned_roots(begin,end, lb, ub, roots);
-    break;
-  case 2:
-    compute_quadratic_cleaned_roots(begin, end, lb, ub, roots);
-    break;
-  case 3:
-    {
-      double rd[3];
-      int numr= FindCubicRoots(begin, rd);
-      double last=-std::numeric_limits<double>::infinity();
-      for (int i=numr-1; i>=0; --i) {
-	if (rd[i]< ub && rd[i] >= lb) roots.push_back(rd[i]);
-	if (rd[i] < lb && rd[i] > last){
-	  last=rd[i];
-	}
-      }
-      std::sort(roots.begin(), roots.end(), std::greater<double>());
-      filter_solver_roots(begin, end, lb, ub, last, roots);
-      break;
-    }
-  default:
-    Turkowski_polynomial_compute_roots_t<true>(begin, end, lb, ub, roots);
-  }
-}
-
-
-} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL/assertions.cpp b/3rdparty/CGAL-4.6/src/CGAL/assertions.cpp
deleted file mode 100644
index 44e187d..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/assertions.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Geert-Jan Giezeman and Sven Schönherr
-
-#include <CGAL/config.h>
-#include <CGAL/assertions.h>
-#include <CGAL/assertions_behaviour.h>
-#include <CGAL/exceptions.h>
-
-#include <cstdlib>
-#include <iostream>
-
-namespace CGAL {
-
-namespace {
-
-// behaviour variables
-// -------------------
-
-Failure_behaviour _error_behaviour   = THROW_EXCEPTION;
-Failure_behaviour _warning_behaviour = CONTINUE;
-
-// standard error handlers
-// -----------------------
-void
-_standard_error_handler(
-        const char* what,
-        const char* expr,
-        const char* file,
-        int         line,
-        const char* msg )
-{
-#if defined(__GNUG__) && !defined(__llvm__)
-    // After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
-    if (_error_behaviour == THROW_EXCEPTION)
-        return;
-#endif
-    std::cerr << "CGAL error: " << what << " violation!" << std::endl
-         << "Expression : " << expr << std::endl
-         << "File       : " << file << std::endl
-         << "Line       : " << line << std::endl
-         << "Explanation: " << msg << std::endl
-         << "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
-	 << std::endl;
-}
-
-
-// standard warning handler
-// ------------------------
-void
-_standard_warning_handler( const char *,
-                          const char* expr,
-                          const char* file,
-                          int         line,
-                          const char* msg )
-{
-#if defined(__GNUG__) && !defined(__llvm__)
-    // After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
-    if (_warning_behaviour == THROW_EXCEPTION)
-        return;
-#endif
-    std::cerr << "CGAL warning: check violation!" << std::endl
-         << "Expression : " << expr << std::endl
-         << "File       : " << file << std::endl
-         << "Line       : " << line << std::endl
-         << "Explanation: " << msg << std::endl
-         << "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
-	 << std::endl;
-}
-
-// default handler settings
-// ------------------------
-Failure_function _error_handler   = _standard_error_handler;
-Failure_function _warning_handler = _standard_warning_handler;
-
-} // anonymous namespace
-
-// failure functions
-// -----------------
-void
-assertion_fail( const char* expr,
-                const char* file,
-                int         line,
-                const char* msg)
-{
-    _error_handler("assertion", expr, file, line, msg);
-    switch (_error_behaviour) {
-    case ABORT:
-        std::abort();
-    case EXIT:
-        std::exit(1);  // EXIT_FAILURE
-    case EXIT_WITH_SUCCESS:
-        std::exit(0);  // EXIT_SUCCESS
-    case CONTINUE: // The CONTINUE case should not be used anymore.
-    case THROW_EXCEPTION:
-    default:
-        throw Assertion_exception("CGAL", expr, file, line, msg);
-    }
-}
-
-void
-precondition_fail( const char* expr,
-                   const char* file,
-                   int         line,
-                   const char* msg)
-{
-    _error_handler("precondition", expr, file, line, msg);
-    switch (_error_behaviour) {
-    case ABORT:
-        std::abort();
-    case EXIT:
-        std::exit(1);  // EXIT_FAILURE
-    case EXIT_WITH_SUCCESS:
-        std::exit(0);  // EXIT_SUCCESS
-    case CONTINUE:
-    case THROW_EXCEPTION:
-    default:
-        throw Precondition_exception("CGAL", expr, file, line, msg);
-    }
-}
-
-void
-postcondition_fail(const char* expr,
-                   const char* file,
-                   int         line,
-                   const char* msg)
-{
-    _error_handler("postcondition", expr, file, line, msg);
-    switch (_error_behaviour) {
-    case ABORT:
-        std::abort();
-    case EXIT:
-        std::exit(1);  // EXIT_FAILURE
-    case EXIT_WITH_SUCCESS:
-        std::exit(0);  // EXIT_SUCCESS
-    case CONTINUE:
-    case THROW_EXCEPTION:
-    default:
-        throw Postcondition_exception("CGAL", expr, file, line, msg);
-    }
-}
-
-
-// warning function
-// ----------------
-void
-warning_fail( const char* expr,
-              const char* file,
-              int         line,
-              const char* msg)
-{
-    _warning_handler("warning", expr, file, line, msg);
-    switch (_warning_behaviour) {
-    case ABORT:
-        std::abort();
-    case EXIT:
-        std::exit(1);  // EXIT_FAILURE
-    case EXIT_WITH_SUCCESS:
-        std::exit(0);  // EXIT_SUCCESS
-    case THROW_EXCEPTION:
-        throw Warning_exception("CGAL", expr, file, line, msg);
-    case CONTINUE:
-        ;
-    }
-}
-
-
-// error handler set functions
-// ---------------------------
-Failure_function
-set_error_handler( Failure_function handler)
-{
-    Failure_function result = _error_handler;
-    _error_handler = handler;
-    return result;
-}
-
-Failure_function
-set_warning_handler( Failure_function handler)
-{
-    Failure_function result = _warning_handler;
-    _warning_handler = handler;
-    return result;
-}
-
-Failure_behaviour
-set_error_behaviour(Failure_behaviour eb)
-{
-    Failure_behaviour result = _error_behaviour;
-    _error_behaviour = eb;
-    return result;
-}
-
-Failure_behaviour
-set_warning_behaviour(Failure_behaviour eb)
-{
-    Failure_behaviour result = _warning_behaviour;
-    _warning_behaviour = eb;
-    return result;
-}
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/io.cpp b/3rdparty/CGAL-4.6/src/CGAL/io.cpp
deleted file mode 100644
index 955ed6a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/io.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 1997  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri
-
-#include <CGAL/basic.h>
-#include <CGAL/IO/io.h>
-#include <CGAL/assertions.h>
-
-#include <sstream>
-#include <string>
-
-namespace CGAL {
-
-int IO::mode = std::ios::xalloc();
-
-
-IO::Mode
-get_mode(std::ios& i)
-{
-    return static_cast<IO::Mode>(i.iword(IO::mode));
-}
-
-IO::Mode
-set_ascii_mode(std::ios& i)
-{
-    IO::Mode m = get_mode(i);
-    i.iword(IO::mode) = IO::ASCII;
-    return m;
-}
-
-
-IO::Mode
-set_binary_mode(std::ios& i)
-{
-    IO::Mode m = get_mode(i);
-    i.iword(IO::mode) = IO::BINARY;
-    return m;
-}
-
-
-IO::Mode
-set_pretty_mode(std::ios& i)
-{
-    IO::Mode m = get_mode(i);
-    i.iword(IO::mode) = IO::PRETTY;
-    return m;
-}
-
-IO::Mode
-set_mode(std::ios& i, IO::Mode m)
-{
-    IO::Mode old = get_mode(i);
-    i.iword(IO::mode) = m;
-    return old;
-}
-
-bool
-is_pretty(std::ios& i)
-{
-    return i.iword(IO::mode) == IO::PRETTY;
-}
-
-bool
-is_ascii(std::ios& i)
-{
-    return i.iword(IO::mode) == IO::ASCII;
-}
-
-
-bool
-is_binary(std::ios& i)
-{
-    return i.iword(IO::mode) == IO::BINARY;
-}
-
-const char* 
-mode_name( IO::Mode m) {
-    static const char* const names[] = {"ASCII", "PRETTY", "BINARY" };
-    CGAL_assertion( IO::ASCII <= m && m <= IO::BINARY );
-    return names[m];
-}
-
-void 
-swallow(std::istream &is, char d) {
-    char c;
-    do is.get(c); while (isspace(c));
-    if (c != d) {
-      std::stringstream msg;
-      msg << "input error: expected '" << d << "' but got '" << c << "'";
-      CGAL_error_msg( msg.str().c_str() );
-    }
-}
-
-void 
-swallow(std::istream &is, const std::string& s ) {
-    std::string t;
-    is >> t;
-    if (s != t) {
-      std::stringstream msg;
-      msg << "input error: expected '" << s << "' but got '" << t << "'";
-      CGAL_error_msg( msg.str().c_str() );
-    }
-}
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/kernel.cpp b/3rdparty/CGAL-4.6/src/CGAL/kernel.cpp
deleted file mode 100644
index 27d0dfa..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/kernel.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 1999  
-// Utrecht University (The Netherlands),
-// ETH Zurich (Switzerland),
-// INRIA Sophia-Antipolis (France),
-// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel).  All rights reserved. 
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri, Stefan Schirra
- 
-#include <CGAL/Origin.h>
-#include <CGAL/aff_transformation_tags.h>
-
-namespace CGAL {
-
-const Translation             TRANSLATION = Translation();
-const Rotation                ROTATION = Rotation();
-const Scaling                 SCALING = Scaling();
-const Reflection              REFLECTION = Reflection();
-const Identity_transformation IDENTITY = Identity_transformation();
-
-const Origin      ORIGIN = Origin();
-const Null_vector NULL_VECTOR = Null_vector();
-
-} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/numeric_solvers_support.cpp b/3rdparty/CGAL-4.6/src/CGAL/numeric_solvers_support.cpp
deleted file mode 100644
index 1616cb6..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/numeric_solvers_support.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-
-#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
-#include <CGAL/Polynomial/internal/numeric_solvers.h>
-
-#include <CGAL/Polynomial/Polynomial.h>
-#include <CGAL/Polynomial/internal/Rational/Derivative.h>
-#include <CGAL/Polynomial/Interval_polynomial.h>
-
-/*#ifdef _MSC_VER
-#pragma warning(disable:1572)
-#endif*/
-
-namespace CGAL { namespace POLYNOMIAL { namespace internal {
-
-static double max_error_value=.00005;
-
-namespace {
-template <bool CLEAN, class NT>
-inline void compute_quadratic_roots_t(const NT *begin, const NT * /*end*/,  NT lb, NT ub,
-std::vector<NT> &roots)
-{
-  NT max_error=0;
-  if (CLEAN) max_error=max_error_value;
-  CGAL_Polynomial_assertion(begin[2] != 0);
-  
-  NT desc= begin[1]*begin[1]-4*begin[0]*begin[2];
-  if (desc <= 0) return;
-  
-  NT ur= (-begin[1]+sqrt(desc))/(2*begin[2]);
-  NT lr= (-begin[1]-sqrt(desc))/(2*begin[2]);
-  if (begin[2]< 0) std::swap(lr, ur);
-  if (lr > lb-max_error && lr < ub) {
-    roots.push_back(ur);
-    if (lr > lb-max_error && lr < ub && (!CLEAN || /*lr > lb+max_error ||*/ begin[2] >0)){
-      roots.push_back(lr);
-    }
-  } else {
-    // only upper
-    if (ur > lb-max_error && ur < ub && (!CLEAN || /*ur > lb+max_error ||*/ begin[2] <0)){
-      roots.push_back(ur);
-    }
-
-
-  }
-
-  // drop even roots
-  /*if (ur >lb-max_error && ur < ub){
-    if (!CLEAN || sign(begin[2]) != POSITIVE){
-    roots.push_back(ur);
-    if (lr >lb-max_error && lr < ub){
-    roots.push_back(lr);
-    }
-    }
-    } else {
-    if (lr > lb-max_error && lr <ub){
-    if (!CLEAN || sign(begin[2]) != NEGATIVE){
-    roots.push_back(lr);
-    }
-    }
-    }*/
-}
-}
-
-
-void compute_quadratic_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots)
-{
-    return compute_quadratic_roots_t<false>(begin, end, lb, ub, roots);
-}
-
-
-void compute_quadratic_cleaned_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots)
-{
-    return compute_quadratic_roots_t<true>(begin, end, lb, ub, roots);
-}
-
-namespace {
-template <bool CLEAN, class NT>
-inline void compute_linear_roots_t(const NT *begin, const NT *,
-					  NT lb, NT ub,
-					  std::vector<NT> &roots)
-{
-    if (CLEAN &&  begin[1]>0 ) return;
-    //NT max_error=0;
-    //if (CLEAN) max_error=max_error_value;
-    NT r= -to_double(begin[0]/begin[1]);
-    if ((CLEAN || r > lb) && r < ub) {
-        roots.push_back(r);
-    }
-}
-}
-
-void compute_linear_roots(const double *begin, const double *end,
-double lb, double ub, std::vector<double> &roots)
-{
-    return compute_linear_roots_t<false>(begin, end, lb, ub, roots);
-}
-
-
-void compute_linear_cleaned_roots(const double *begin, const double *end,
-				  double lb, double ub, std::vector<double> &roots)
-{
-    return compute_linear_roots_t<true>(begin, end, lb, ub, roots);
-}
-
-
-namespace {
-template <class NT>
- inline void filter_roots_t(const NT *begin, const NT *end,
-				  NT lb, NT ub, NT last_root, std::vector<NT> &roots)
-{
-// if we are not close to the current time, then we are fine
-    if (roots.empty()) return;
-    //if (roots.back() > lb+ .0005) return;
-
-    //double eps= .0005;
-    /*double last_root=-std::numeric_limits<double>::infinity();
-
-    while (roots.back() < lb) {
-      last_root= roots.back();
-      roots.pop_back();
-      }*/
-    //if (roots.back() > lb+eps) return;
-
-    //typedef CGAL_POLYNOMIAL_NS::Polynomial<NT> Fn;
-
-    typedef CGAL_POLYNOMIAL_NS::Interval_polynomial IFn;
-    typedef CGAL_POLYNOMIAL_NS::internal::Derivative<IFn> Diff;
-    typedef typename IFn::NT INT;
-    
-
-    /*bool popped=false;*/
-    // if the last valid root is closer than last, consider it as doubtful instead
-    if (lb-last_root > roots.back()-lb) {
-      last_root= roots.back();
-      roots.pop_back();
-      /*popped=true;*/
-    } /*else {
-      last_root=lb;
-      }*/
-
-    INT vi;
-    if (last_root== -std::numeric_limits<double>::infinity()){
-      if ((end-begin)%2==1) {
-	vi= std::numeric_limits<double>::infinity();
-      } else {
-	vi = -*(end-1);
-      }
-    } else {
-      IFn fi(begin, end);
-      if (roots.empty()) {
-	Interval_arithmetic_guard guard;
-        if (ub== std::numeric_limits<double>::infinity()) {
-          vi = 10*lb + 1000;
-        } else {
-          vi = fi((INT(lb)+INT(ub))/2.0);
-        }
-      } else {
-	Interval_arithmetic_guard guard;
-	vi = fi((INT(last_root)+INT(roots.back()))/2.0);
-      }
-    }
-    
-    if (vi.inf() > 0) {
-      return;
-    } else if (vi.sup() < 0){
-      roots.push_back(last_root);
-    
-      /*if (!popped) {
-	IFn f(begin, end);
-	std::cout << "Adding last due to sign of " << vi << std::endl;
-	std::cout << "last " << last_root << " lb " << lb << " poly " << f << std::endl;
-	}*/
-      return;
-    }
-    Interval_arithmetic_guard guard;
-    Diff dx;
-    IFn f(begin, end);
-    IFn d= dx(f);
-
-    INT dv= d(roots.back());
-    // switch
-    //while (sign(d(roots.back().representation()))== ZERO) d= dx_(d);
-    while (dv.inf() <= 0 && dv.sup() >= 0) {
-      d= dx(d);
-      dv= d(roots.back());
-    }
-    // switch
-    //if (sign(d(roots.back().representation()))==POSITIVE){
-    if (dv.sup() < 0) {
-        roots.push_back(last_root);
-	/*if (!popped) {
-	  IFn f(begin, end);
-	  std::cout << "Adding last due to deriv of " << vi << std::endl;
-	  std::cout << "last " << last_root << " lb " << lb << " poly " << f << std::endl;
-	  }*/
-    }
-}
-}
-
-void filter_solver_roots(const double *begin, const double *end,
-			 double lb, double ub, double last,
-			 std::vector<double> &roots)
-{
-  filter_roots_t(begin, end, lb, ub, last, roots);
-}
-
-
-/*void polynomial_compute_roots(const double *begin, const double *end,  double lb,
-                  double ub, std::vector<double> &roots){
-#ifdef POLYNOMIAL_USE_GSL
-    gsl_polynomial_compute_roots(begin, end, lb, ub, roots);
-#else
-    jama_polynomial_compute_roots(begin, end, lb, ub, roots);
-#endif
-}
-
-void polynomial_compute_cleaned_roots(const double *begin, const double *end,  double lb,
-                      double ub, std::vector<double> &roots){
-#ifdef POLYNOMIAL_USE_GSL
-gsl_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
-#else
-jama_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
-#endif
-}*/
-
-double evaluate_polynomial(const double *b, const double *e, double t)
-{
-#ifdef POLYNOMIAL_USE_GSL
-    return gsl_evaluate_polynomial(b, e, t);
-#else
-    if (b==e) return 0.0;
-
-    const double *rit=e-1;
-    double result = *rit;
-    --rit;
-    for (; rit != b-1; --rit) {
-        result *= t;
-        result += (*rit);
-    }
-    return result;
-#endif
-}
-
-
-} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL/primes.cpp b/3rdparty/CGAL-4.6/src/CGAL/primes.cpp
deleted file mode 100644
index bc2cff7..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/primes.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Michael Hemmer, Alexander Kobel
-
-#include <CGAL/basic.h>
-#include <CGAL/primes.h>
-
-namespace CGAL { 
-namespace internal {
-
-const int primes [2000] = {
-  /*
-   * Generated in SAGE with:
-   *
-   * N = 2000
-   * p = 2^26
-   * L = []
-   * while len(L) < N:
-   *   p = previous_prime(p)
-   *   if GF(p)(2).is_primitive_root():
-   *     L.append(p)
-   * k = 8
-   * for i in range(N/k):
-   *   print '  ' + ', '.join (str(p) for p in L[k*i:k*(i+1)]) + ','
-  */
-  67108859, 67108819, 67108763, 67108757, 67108747, 67108739, 67108709, 67108693,
-  67108669, 67108667, 67108661, 67108597, 67108579, 67108507, 67108493, 67108453,
-  67108387, 67108373, 67108331, 67108219, 67108187, 67108109, 67108037, 67108003,
-  67107941, 67107797, 67107787, 67107773, 67107757, 67107749, 67107707, 67107643,
-  67107541, 67107539, 67107533, 67107461, 67107427, 67107389, 67107323, 67107317,
-  67107301, 67107253, 67107203, 67107149, 67107043, 67106987, 67106821, 67106813,
-  67106797, 67106749, 67106717, 67106693, 67106483, 67106477, 67106357, 67106339,
-  67106323, 67106243, 67106213, 67106189, 67106107, 67106099, 67106093, 67106059,
-  67105963, 67105933, 67105877, 67105867, 67105811, 67105771, 67105763, 67105699,
-  67105691, 67105517, 67105459, 67105453, 67105373, 67105349, 67105267, 67105187,
-  67105141, 67105133, 67105061, 67104997, 67104931, 67104923, 67104893, 67104883,
-  67104859, 67104803, 67104757, 67104707, 67104691, 67104589, 67104581, 67104571,
-  67104563, 67104539, 67104517, 67104437, 67104419, 67104379, 67104341, 67104293,
-  67104277, 67104251, 67104227, 67104139, 67104061, 67104053, 67103963, 67103909,
-  67103867, 67103851, 67103837, 67103821, 67103731, 67103669, 67103653, 67103587,
-  67103579, 67103549, 67103507, 67103483, 67103219, 67103173, 67103149, 67103147,
-  67103107, 67103083, 67103051, 67103027, 67103021, 67102963, 67102949, 67102901,
-  67102843, 67102733, 67102627, 67102613, 67102531, 67102499, 67102459, 67102397,
-  67102333, 67102331, 67102283, 67102237, 67102181, 67102163, 67102099, 67102093,
-  67102069, 67102067, 67102019, 67101997, 67101989, 67101899, 67101883, 67101877,
-  67101779, 67101739, 67101691, 67101637, 67101613, 67101509, 67101493, 67101491,
-  67101469, 67101443, 67101413, 67101341, 67101323, 67101299, 67101187, 67101173,
-  67101053, 67100987, 67100981, 67100963, 67100947, 67100939, 67100909, 67100899,
-  67100861, 67100851, 67100827, 67100773, 67100731, 67100699, 67100669, 67100659,
-  67100653, 67100587, 67100459, 67100357, 67100347, 67100179, 67100141, 67100123,
-  67100101, 67099987, 67099957, 67099931, 67099861, 67099853, 67099829, 67099819,
-  67099699, 67099589, 67099547, 67099541, 67099517, 67099499, 67099397, 67099387,
-  67099363, 67099339, 67099267, 67099213, 67099141, 67099133, 67099037, 67098931,
-  67098923, 67098917, 67098907, 67098827, 67098821, 67098739, 67098653, 67098589,
-  67098419, 67098389, 67098347, 67098341, 67098323, 67098299, 67098277, 67098259,
-  67098203, 67098197, 67098179, 67098149, 67098067, 67098029, 67097917, 67097819,
-  67097813, 67097803, 67097747, 67097699, 67097669, 67097659, 67097579, 67097413,
-  67097363, 67097339, 67097333, 67097291, 67097269, 67097123, 67097053, 67096987,
-  67096979, 67096973, 67096907, 67096867, 67096837, 67096693, 67096669, 67096507,
-  67096499, 67096483, 67096411, 67096387, 67096373, 67096301, 67096109, 67096067,
-  67096021, 67096013, 67095989, 67095971, 67095893, 67095869, 67095797, 67095731,
-  67095701, 67095683, 67095667, 67095659, 67095629, 67095499, 67095421, 67095419,
-  67095349, 67095317, 67095173, 67095139, 67095131, 67095101, 67095037, 67095011,
-  67094987, 67094981, 67094917, 67094899, 67094891, 67094837, 67094827, 67094723,
-  67094717, 67094707, 67094701, 67094581, 67094557, 67094507, 67094501, 67094459,
-  67094437, 67094411, 67094389, 67094309, 67094299, 67094267, 67094141, 67094123,
-  67094099, 67093979, 67093933, 67093931, 67093861, 67093853, 67093757, 67093723,
-  67093699, 67093627, 67093619, 67093613, 67093603, 67093597, 67093547, 67093349,
-  67093307, 67093181, 67093171, 67093163, 67093157, 67093109, 67093069, 67093043,
-  67093003, 67092997, 67092947, 67092869, 67092821, 67092787, 67092757, 67092749,
-  67092709, 67092691, 67092643, 67092611, 67092563, 67092539, 67092491, 67092461,
-  67092419, 67092331, 67092323, 67092301, 67092227, 67092203, 67092197, 67092107,
-  67091987, 67091939, 67091933, 67091923, 67091797, 67091779, 67091771, 67091669,
-  67091611, 67091491, 67091477, 67091443, 67091357, 67091341, 67091243, 67091203,
-  67091149, 67091107, 67091029, 67090979, 67090973, 67090939, 67090861, 67090763,
-  67090627, 67090613, 67090589, 67090579, 67090549, 67090547, 67090523, 67090459,
-  67090451, 67090411, 67090403, 67090307, 67090259, 67090229, 67090189, 67090117,
-  67090099, 67090091, 67090043, 67090027, 67090013, 67089949, 67089829, 67089739,
-  67089733, 67089707, 67089683, 67089587, 67089541, 67089461, 67089299, 67089283,
-  67089277, 67089221, 67089059, 67088963, 67088821, 67088797, 67088779, 67088717,
-  67088683, 67088653, 67088627, 67088621, 67088603, 67088597, 67088573, 67088509,
-  67088501, 67088453, 67088429, 67088381, 67088347, 67088267, 67088117, 67088093,
-  67088059, 67087973, 67087957, 67087901, 67087883, 67087859, 67087723, 67087717,
-  67087637, 67087571, 67087547, 67087459, 67087451, 67087421, 67087277, 67087259,
-  67087243, 67087187, 67087123, 67087019, 67086949, 67086931, 67086917, 67086893,
-  67086869, 67086827, 67086757, 67086667, 67086637, 67086629, 67086611, 67086589,
-  67086421, 67086347, 67086323, 67086317, 67086307, 67086293, 67086259, 67086109,
-  67086067, 67086053, 67086043, 67086013, 67085939, 67085933, 67085899, 67085869,
-  67085867, 67085861, 67085819, 67085813, 67085803, 67085771, 67085741, 67085677,
-  67085531, 67085443, 67085437, 67085429, 67085357, 67085341, 67085267, 67085189,
-  67085173, 67085171, 67085099, 67085093, 67085003, 67084981, 67084973, 67084931,
-  67084861, 67084789, 67084757, 67084709, 67084643, 67084637, 67084603, 67084547,
-  67084517, 67084483, 67084427, 67084349, 67084333, 67084331, 67084309, 67084189,
-  67084187, 67084139, 67084013, 67083883, 67083859, 67083811, 67083803, 67083787,
-  67083739, 67083707, 67083629, 67083619, 67083613, 67083539, 67083517, 67083461,
-  67083437, 67083371, 67083323, 67083221, 67083197, 67083067, 67082989, 67082987,
-  67082963, 67082933, 67082909, 67082891, 67082861, 67082843, 67082779, 67082707,
-  67082699, 67082579, 67082549, 67082531, 67082453, 67082363, 67082339, 67082227,
-  67082189, 67082131, 67082123, 67082101, 67082003, 67081957, 67081829, 67081811,
-  67081787, 67081741, 67081733, 67081709, 67081691, 67081661, 67081579, 67081499,
-  67081477, 67081429, 67081283, 67081237, 67081213, 67081211, 67081139, 67081123,
-  67081051, 67080971, 67080947, 67080917, 67080859, 67080821, 67080803, 67080763,
-  67080701, 67080653, 67080557, 67080491, 67080437, 67080413, 67080323, 67080179,
-  67080173, 67080131, 67080107, 67080061, 67079981, 67079963, 67079941, 67079933,
-  67079917, 67079693, 67079587, 67079491, 67079459, 67079429, 67079347, 67079333,
-  67079323, 67079317, 67079267, 67079237, 67079219, 67079213, 67079203, 67079149,
-  67079141, 67079123, 67079083, 67079027, 67078981, 67078931, 67078877, 67078819,
-  67078813, 67078789, 67078763, 67078643, 67078573, 67078469, 67078387, 67078331,
-  67078309, 67078301, 67078283, 67078213, 67078181, 67078139, 67078133, 67078069,
-  67078061, 67078013, 67077947, 67077917, 67077851, 67077827, 67077797, 67077757,
-  67077643, 67077611, 67077541, 67077539, 67077419, 67077403, 67077379, 67077349,
-  67077341, 67077299, 67077293, 67077259, 67077181, 67077173, 67077133, 67076899,
-  67076869, 67076851, 67076843, 67076803, 67076773, 67076741, 67076693, 67076683,
-  67076677, 67076651, 67076629, 67076627, 67076573, 67076539, 67076413, 67076411,
-  67076357, 67076341, 67076291, 67076189, 67076147, 67076117, 67076077, 67076069,
-  67076029, 67075973, 67075949, 67075933, 67075907, 67075867, 67075787, 67075691,
-  67075669, 67075573, 67075493, 67075373, 67075363, 67075277, 67075243, 67075147,
-  67075109, 67075091, 67075069, 67075067, 67075037, 67074947, 67074901, 67074859,
-  67074853, 67074851, 67074829, 67074691, 67074619, 67074613, 67074611, 67074587,
-  67074523, 67074467, 67074317, 67074307, 67074277, 67074269, 67074179, 67073947,
-  67073917, 67073899, 67073803, 67073731, 67073707, 67073701, 67073683, 67073651,
-  67073603, 67073597, 67073579, 67073533, 67073459, 67073387, 67073339, 67073333,
-  67073323, 67073309, 67073261, 67073197, 67073189, 67073107, 67073051, 67073003,
-  67072997, 67072979, 67072909, 67072877, 67072781, 67072757, 67072739, 67072693,
-  67072541, 67072373, 67072363, 67072339, 67072309, 67072283, 67072277, 67072253,
-  67072139, 67072037, 67071997, 67071989, 67071947, 67071923, 67071899, 67071883,
-  67071877, 67071821, 67071707, 67071637, 67071547, 67071419, 67071413, 67071317,
-  67071299, 67071293, 67071157, 67071149, 67071139, 67071061, 67070989, 67070981,
-  67070909, 67070869, 67070837, 67070827, 67070813, 67070803, 67070749, 67070699,
-  67070621, 67070573, 67070539, 67070459, 67070357, 67070317, 67070291, 67070261,
-  67070251, 67070203, 67070053, 67070027, 67069979, 67069819, 67069813, 67069787,
-  67069781, 67069763, 67069669, 67069661, 67069549, 67069531, 67069469, 67069427,
-  67069397, 67069339, 67069157, 67069133, 67069109, 67069099, 67069043, 67069021,
-  67068971, 67068931, 67068787, 67068653, 67068643, 67068629, 67068571, 67068557,
-  67068539, 67068509, 67068493, 67068371, 67068301, 67068269, 67068259, 67068227,
-  67068203, 67068187, 67068181, 67068173, 67068163, 67068101, 67067971, 67067933,
-  67067909, 67067789, 67067779, 67067773, 67067723, 67067629, 67067597, 67067501,
-  67067453, 67067437, 67067389, 67067387, 67067339, 67067293, 67067269, 67067213,
-  67067173, 67067171, 67067069, 67067059, 67067029, 67066907, 67066861, 67066859,
-  67066771, 67066757, 67066723, 67066709, 67066667, 67066619, 67066613, 67066379,
-  67066277, 67066243, 67066211, 67066157, 67066093, 67066061, 67066019, 67065979,
-  67065931, 67065917, 67065883, 67065827, 67065787, 67065667, 67065659, 67065653,
-  67065643, 67065619, 67065563, 67065461, 67065437, 67065389, 67065373, 67065293,
-  67065283, 67065227, 67065211, 67065157, 67065091, 67064843, 67064827, 67064819,
-  67064773, 67064771, 67064741, 67064717, 67064693, 67064611, 67064597, 67064587,
-  67064579, 67064549, 67064467, 67064299, 67064267, 67064237, 67064213, 67064197,
-  67064171, 67064147, 67064131, 67064093, 67064059, 67063853, 67063813, 67063723,
-  67063643, 67063637, 67063523, 67063517, 67063397, 67063349, 67063307, 67063189,
-  67063163, 67063133, 67063123, 67063099, 67063093, 67063069, 67063043, 67063037,
-  67063019, 67062923, 67062893, 67062883, 67062859, 67062659, 67062629, 67062613,
-  67062539, 67062509, 67062469, 67062461, 67062379, 67062349, 67062299, 67062221,
-  67062179, 67062157, 67062067, 67062029, 67062011, 67061987, 67061947, 67061933,
-  67061909, 67061867, 67061861, 67061789, 67061747, 67061693, 67061627, 67061597,
-  67061563, 67061531, 67061333, 67061299, 67061227, 67061219, 67061179, 67061173,
-  67061147, 67061003, 67060997, 67060957, 67060949, 67060933, 67060837, 67060813,
-  67060627, 67060549, 67060523, 67060517, 67060507, 67060451, 67060421, 67060373,
-  67060333, 67060307, 67060277, 67060261, 67060229, 67060187, 67060171, 67060141,
-  67060109, 67060067, 67060043, 67060027, 67060013, 67059989, 67059907, 67059899,
-  67059869, 67059779, 67059757, 67059749, 67059731, 67059709, 67059701, 67059637,
-  67059613, 67059581, 67059547, 67059533, 67059523, 67059437, 67059427, 67059259,
-  67059173, 67059061, 67058963, 67058941, 67058909, 67058899, 67058891, 67058867,
-  67058843, 67058723, 67058699, 67058669, 67058627, 67058531, 67058389, 67058347,
-  67058339, 67058323, 67058309, 67058269, 67058227, 67058213, 67058141, 67058003,
-  67057883, 67057853, 67057819, 67057813, 67057763, 67057733, 67057723, 67057717,
-  67057709, 67057643, 67057499, 67057493, 67057387, 67057381, 67057379, 67057363,
-  67057307, 67057147, 67057141, 67056989, 67056971, 67056917, 67056877, 67056763,
-  67056677, 67056667, 67056659, 67056637, 67056611, 67056581, 67056461, 67056419,
-  67056371, 67056259, 67056251, 67056179, 67056107, 67056083, 67056053, 67056043,
-  67056013, 67055957, 67055909, 67055843, 67055789, 67055771, 67055629, 67055539,
-  67055491, 67055477, 67055467, 67055347, 67055309, 67055299, 67055291, 67055267,
-  67055243, 67055203, 67055179, 67055147, 67054997, 67054979, 67054907, 67054877,
-  67054859, 67054763, 67054733, 67054717, 67054541, 67054523, 67054483, 67054411,
-  67054387, 67054301, 67054213, 67054051, 67054037, 67053997, 67053971, 67053941,
-  67053893, 67053787, 67053733, 67053659, 67053653, 67053643, 67053629, 67053619,
-  67053563, 67053557, 67053523, 67053517, 67053419, 67053397, 67053373, 67053317,
-  67053251, 67053229, 67053197, 67053179, 67053149, 67053037, 67053029, 67052963,
-  67052939, 67052933, 67052819, 67052813, 67052779, 67052723, 67052677, 67052509,
-  67052477, 67052467, 67052243, 67052021, 67051979, 67051949, 67051909, 67051883,
-  67051861, 67051813, 67051811, 67051781, 67051709, 67051651, 67051643, 67051573,
-  67051571, 67051547, 67051493, 67051379, 67051373, 67051331, 67051253, 67051189,
-  67051181, 67051099, 67051069, 67051021, 67050979, 67050931, 67050917, 67050869,
-  67050827, 67050749, 67050707, 67050701, 67050619, 67050611, 67050541, 67050509,
-  67050443, 67050421, 67050419, 67050371, 67050301, 67050299, 67050251, 67050187,
-  67050101, 67050077, 67049987, 67049981, 67049963, 67049909, 67049891, 67049867,
-  67049837, 67049813, 67049747, 67049707, 67049693, 67049629, 67049627, 67049603,
-  67049573, 67049539, 67049453, 67049413, 67049267, 67049261, 67049251, 67049179,
-  67049149, 67049141, 67049093, 67049027, 67048963, 67048859, 67048819, 67048757,
-  67048733, 67048693, 67048627, 67048621, 67048523, 67048469, 67048411, 67048349,
-  67048277, 67048259, 67048141, 67048123, 67048109, 67047989, 67047859, 67047787,
-  67047763, 67047749, 67047733, 67047731, 67047683, 67047619, 67047613, 67047611,
-  67047581, 67047517, 67047509, 67047413, 67047397, 67047283, 67047131, 67047077,
-  67047061, 67047059, 67047053, 67047037, 67047011, 67046989, 67046939, 67046899,
-  67046797, 67046779, 67046731, 67046549, 67046531, 67046477, 67046467, 67046437,
-  67046429, 67046411, 67046387, 67046363, 67046341, 67046333, 67046261, 67046197,
-  67046107, 67046069, 67046059, 67046051, 67045973, 67045949, 67045907, 67045877,
-  67045723, 67045613, 67045579, 67045571, 67045549, 67045541, 67045507, 67045403,
-  67045339, 67045301, 67045267, 67045261, 67045211, 67045189, 67045133, 67045117,
-  67045109, 67045061, 67045037, 67045019, 67044973, 67044907, 67044829, 67044797,
-  67044779, 67044773, 67044763, 67044739, 67044541, 67044427, 67044371, 67044347,
-  67044301, 67044283, 67044203, 67044157, 67044083, 67044077, 67044067, 67044053,
-  67043981, 67043939, 67043909, 67043813, 67043797, 67043707, 67043507, 67043477,
-  67043443, 67043243, 67043147, 67043107, 67043083, 67043069, 67043059, 67043051,
-  67043027, 67042979, 67042973, 67042949, 67042931, 67042709, 67042643, 67042637,
-  67042589, 67042571, 67042541, 67042523, 67042501, 67042453, 67042427, 67042363,
-  67042307, 67042301, 67042259, 67042211, 67042091, 67042043, 67041907, 67041893,
-  67041869, 67041797, 67041749, 67041731, 67041701, 67041613, 67041581, 67041563,
-  67041547, 67041539, 67041509, 67041467, 67041461, 67041419, 67041371, 67041307,
-  67041283, 67041269, 67041203, 67041187, 67041179, 67041043, 67040917, 67040893,
-  67040789, 67040773, 67040723, 67040629, 67040627, 67040621, 67040587, 67040549,
-  67040509, 67040443, 67040387, 67040381, 67040317, 67040291, 67040261, 67040243,
-  67040219, 67040203, 67040069, 67040021, 67039997, 67039957, 67039883, 67039877,
-  67039867, 67039853, 67039811, 67039757, 67039723, 67039699, 67039669, 67039627,
-  67039613, 67039571, 67039547, 67039501, 67039499, 67039309, 67039307, 67039253,
-  67039187, 67039139, 67039051, 67039003, 67038947, 67038941, 67038877, 67038869,
-  67038827, 67038787, 67038739, 67038637, 67038589, 67038557, 67038539, 67038533,
-  67038427, 67038371, 67038341, 67038299, 67038277, 67038221, 67038197, 67038173,
-  67038149, 67038133, 67038131, 67038067, 67038029, 67038011, 67037843, 67037837,
-  67037819, 67037797, 67037771, 67037723, 67037683, 67037627, 67037603, 67037563,
-  67037483, 67037459, 67037429, 67037389, 67037261, 67037227, 67037213, 67037107,
-  67037101, 67037053, 67036979, 67036909, 67036901, 67036877, 67036867, 67036843,
-  67036819, 67036811, 67036747, 67036643, 67036589, 67036547, 67036507, 67036469,
-  67036397, 67036379, 67036357, 67036259, 67036243, 67036187, 67036181, 67036157,
-  67036093, 67036027, 67036019, 67035989, 67035949, 67035931, 67035901, 67035803,
-  67035707, 67035659, 67035653, 67035643, 67035589, 67035499, 67035491, 67035469,
-  67035413, 67035349, 67035347, 67035307, 67035277, 67035149, 67035107, 67035077,
-  67034987, 67034819, 67034699, 67034683, 67034677, 67034477, 67034419, 67034381,
-  67034339, 67034309, 67034293, 67034171, 67034117, 67034069, 67034021, 67033859,
-  67033763, 67033741, 67033709, 67033699, 67033667, 67033619, 67033613, 67033597,
-  67033541, 67033507, 67033469, 67033429, 67033403, 67033357, 67033331, 67033283,
-  67033277, 67033229, 67033157, 67033117, 67033061, 67032997, 67032941, 67032811,
-  67032803, 67032701, 67032661, 67032653, 67032613, 67032587, 67032541, 67032523,
-  67032517, 67032491, 67032461, 67032451, 67032443, 67032421, 67032389, 67032349,
-  67032347, 67032299, 67032221, 67032179, 67032101, 67031941, 67031933, 67031893,
-  67031851, 67031819, 67031813, 67031749, 67031693, 67031509, 67031483, 67031443,
-  67031429, 67031387, 67031243, 67031219, 67031203, 67031189, 67031149, 67031147,
-  67031123, 67031101, 67031059, 67030963, 67030933, 67030907, 67030867, 67030853,
-  67030757, 67030741, 67030739, 67030693, 67030669, 67030597, 67030517, 67030451,
-  67030427, 67030333, 67030331, 67030181, 67030069, 67030013, 67029947, 67029931,
-  67029923, 67029917, 67029901, 67029811, 67029779, 67029763, 67029749, 67029709,
-  67029707, 67029581, 67029541, 67029509, 67029491, 67029451, 67029437, 67029427,
-  67029421, 67029373, 67029341, 67029323, 67029293, 67029269, 67029253, 67029229,
-  67029077, 67029059, 67029043, 67029013, 67028981, 67028917, 67028771, 67028669,
-  67028653, 67028651, 67028597, 67028557, 67028539, 67028477, 67028413, 67028387,
-  67028243, 67028197, 67028083, 67028069, 67028021, 67027997, 67027963, 67027949,
-  67027931, 67027867, 67027861, 67027811, 67027693, 67027627, 67027619, 67027547,
-  67027507, 67027453, 67027427, 67027339, 67027283, 67027237, 67027189, 67027187,
-  67027069, 67027027, 67027019, 67027013, 67026979, 67026907, 67026829, 67026811,
-  67026803, 67026787, 67026643, 67026613, 67026539, 67026469, 67026467, 67026451,
-  67026437, 67026403, 67026307, 67026299, 67026227, 67026187, 67026139, 67026131,
-  67026109, 67026107, 67026083, 67026067, 67025971, 67025963, 67025957, 67025843,
-  67025779, 67025773, 67025723, 67025701, 67025683, 67025669, 67025579, 67025573,
-  67025531, 67025501, 67025459, 67025411, 67025363, 67025219, 67025213, 67025173,
-  67025107, 67025051, 67025029, 67024987, 67024957, 67024901, 67024891, 67024733,
-  67024637, 67024621, 67024613, 67024499, 67024483, 67024429, 67024411, 67024339,
-  67024157, 67024141, 67024003, 67023989, 67023899, 67023893, 67023779, 67023763,
-  67023667, 67023653, 67023493, 67023443, 67023421, 67023419, 67023371, 67023349,
-  67023347, 67023331, 67023293, 67023259, 67023227, 67023211, 67023179, 67023157,
-  67023139, 67023133, 67023091, 67023059, 67023053, 67023043, 67023037, 67023029,
-  67022869, 67022819, 67022797, 67022723, 67022707, 67022701, 67022699, 67022693,
-  67022539, 67022507, 67022477, 67022467, 67022387, 67022261, 67022243, 67022237,
-  67022213, 67022147, 67022077, 67022027, 67021979, 67021963, 67021901, 67021861,
-  67021741, 67021739, 67021723, 67021637, 67021621, 67021613, 67021499, 67021469,
-  67021459, 67021363, 67021301, 67021237, 67021147, 67021139, 67021099, 67021067,
-  67021043, 67020979, 67020973, 67020917, 67020893, 67020869, 67020797, 67020763,
-  67020683, 67020589, 67020587, 67020557, 67020491, 67020397, 67020323, 67020299,
-  67020251, 67020179, 67020077, 67020053, 67020013, 67019963, 67019867, 67019837,
-  67019819, 67019747, 67019741, 67019653, 67019587, 67019549, 67019483, 67019437,
-  67019371, 67019299, 67019123, 67019077, 67019027, 67019003, 67018997, 67018843,
-  67018837, 67018771, 67018733, 67018717, 67018667, 67018613, 67018499, 67018493,
-  67018429, 67018397, 67018387, 67018309, 67018181, 67018163, 67018141, 67018139,
-  67018069, 67018051, 67017971, 67017931, 67017803, 67017763, 67017733, 67017707,
-  67017677, 67017661, 67017659, 67017571, 67017563, 67017547, 67017413, 67017371,
-  67017299, 67017277, 67017227, 67017211, 67017163, 67017157, 67017107, 67017059,
-  67016869, 67016821, 67016813, 67016723, 67016717, 67016707, 67016693, 67016627,
-  67016611, 67016483, 67016437, 67016387, 67016269, 67016197, 67016189, 67016179,
-};
-
-} // namespace internal
-} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL/test_FPU_rounding_mode.cpp b/3rdparty/CGAL-4.6/src/CGAL/test_FPU_rounding_mode.cpp
deleted file mode 100644
index 8f34779..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL/test_FPU_rounding_mode.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2008  GeometryFactory (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau
-
-#ifndef CGAL_NDEBUG
-
-#include <CGAL/basic.h>
-#include <CGAL/FPU.h>
-#include <CGAL/assertions.h>
-
-namespace CGAL {
-
-
-struct Check_FPU_rounding_mode_is_restored {
-  FPU_CW_t mode;
-
-  Check_FPU_rounding_mode_is_restored()
-    : mode( FPU_get_cw()) {}
-
-  ~Check_FPU_rounding_mode_is_restored()
-  {
-    CGAL_assertion_msg( FPU_get_cw() == mode, 
-		      "The default FPU rounding mode has not been restored "
-		      " before the exit of the program. "
-		      "That may be a bug in some CGAL kernel code.");
-  }
-};
-
-// A global object that emits a warning if the rounding mode at the
-// beginning and the end of the program are not the same.
-static const Check_FPU_rounding_mode_is_restored check_fpu_rounding_mode_is_restored;
-
-} // end namespace CGAL
-
-#endif // #ifnedef CGAL_NDEBUG
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/BigFloat.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/BigFloat.cpp
deleted file mode 100644
index 6cd7da5..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/BigFloat.cpp
+++ /dev/null
@@ -1,1287 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: BigFloat.cpp
- * Synopsis:
- *       BigFloat numbers with error bounds 
- *
- *       EXACTNESS PROPERTY:
- *       ==================
- *       For BigFloats that are exact (i.e., error=0),
- *       addition/subtraction and multiplication return the
- *       exact result (i.e., error=0).  We also introduce the operation
- *       div2(), which simply divides a BigFloat by 2,
- *       but this again preserves exactness.  Such exactness
- *       properties are used in our Newton iteration/Sturm Sequences.
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include <ctype.h>
-#include <CGAL/CORE/BigFloat.h>
-#include <CGAL/CORE/Expr.h>
-
-namespace CORE { 
-
-
-////////////////////////////////////////////////////////////
-// Misc Helper Functions
-////////////////////////////////////////////////////////////
-
-BigInt FiveTo(unsigned long exp) {
-  if (exp == 0)
-    return BigInt(1);
-  else if (exp == 1)
-    return BigInt(5);
-  else {
-    BigInt x = FiveTo(exp / 2);
-
-    x = x * x;
-
-    if (exp & 1)
-      x *= 5;
-
-    return x;
-  }
-}
-
-////////////////////////////////////////////////////////////
-//  class BigFloat
-////////////////////////////////////////////////////////////
-
-// STATIC BIGFLOAT CONSTANTS
-// ZERO
-const BigFloat& BigFloat::getZero() {
-  static BigFloat Zero(0);
-  return Zero;
-}
-// ONE
-const BigFloat& BigFloat::getOne() {
-  static BigFloat One(1);
-  return One;
-}
-
-// A special constructor for BigFloat from Expr
-// -- this method is somewhat of an anomaly (we normally do not expect
-//    BigFloats to know about Expr).
-BigFloat::BigFloat(const Expr& E, const extLong& r, const extLong& a)
-  : RCBigFloat(new BigFloatRep()) {
-  *this = E.approx(r, a).BigFloatValue(); // lazy implementaion, any other way?
-}
-
-////////////////////////////////////////////////////////////
-//  class BigFloatRep
-////////////////////////////////////////////////////////////
-
-BigFloatRep::BigFloatRep(double d) : m(0), err(0), exp(0) {
-  if (d != 0.0) {
-    int isNegative = 0;
-
-    if (d < 0.0) {
-      isNegative = 1;
-      d          = - d;
-    }
-
-    int    binExp;
-    double f = frexp(d, &binExp);
-
-    exp = chunkFloor(binExp);
-
-    long s = binExp - bits(exp);
-
-    long   stop = 0;
-    double intPart;
-
-    // convert f into a BigInt
-    while (f != 0.0 && stop < DBL_MAX_CHUNK) {
-      f =   ldexp(f, (int)CHUNK_BIT);
-      f =   modf(f, &intPart);
-      m <<= CHUNK_BIT;
-      m +=  (long)intPart;
-      exp--;
-      stop++;
-    }
-#ifdef CORE_DEBUG
-    assert (s >= 0);
-#endif
-
-    if (s)
-      m <<= s;
-    if (isNegative)
-      negate(m);
-  }
-}//BigFloatRep constructor
-
-//  approximation
-void BigFloatRep::trunc(const BigInt& I, const extLong& r, const extLong& a) {
-  if (sign(I)) {
-    long tr = chunkFloor((- r + bitLength(I)).asLong());
-    long ta = chunkFloor(- a.asLong());
-    long t;
-
-    if (r.isInfty() || a.isTiny())
-      t = ta;
-    else if (a.isInfty())
-      t = tr;
-    else
-      t = ta < tr ? tr : ta;
-
-    if (t > 0) {  // BigInt remainder;
-      m   = chunkShift(I, - t);
-      err = 1;
-      exp = t;
-    } else { //  t <= 0
-      m   = I;
-      err = 0;
-      exp = 0;
-    }
-  } else {//  I == 0
-    m   = 0;
-    err = 0;
-    exp = 0;
-  }
-}
-
-void BigFloatRep :: truncM(const BigFloatRep& B, const extLong& r, const extLong& a) {
-  if (sign(B.m)) {
-    long tr = chunkFloor((- 1 - r + bitLength(B.m)).asLong());
-    long ta = chunkFloor(- 1 - a.asLong()) - B.exp;
-    long t;
-
-    if (r.isInfty() || a.isTiny())
-      t = ta;
-    else if (a.isInfty())
-      t = tr;
-    else
-      t = ta < tr ? tr : ta;
-
-    if (t >= chunkCeil(clLg(B.err))) {
-      m   = chunkShift(B.m, - t);
-      err = 2;
-      exp = B.exp + t;
-    } else //  t < chunkCeil(clLg(B.err))
-      core_error(std::string("BigFloat error: truncM called with stricter")
-	  + "precision than current error.", __FILE__, __LINE__, true);
-  } else {//  B.m == 0
-    long t = chunkFloor(- a.asLong()) - B.exp;
-
-    if (t >= chunkCeil(clLg(B.err))) {
-      m   = 0;
-      err = 1;
-      exp = B.exp + t;
-    } else //  t < chunkCeil(clLg(B.err))
-      core_error(std::string("BigFloat error: truncM called with stricter")
-	  + "precision than current error.", __FILE__, __LINE__, true);
-  }
-}
-
-// This is the main approximation function
-// REMARK: would be useful to have a self-modifying version
-// 		of this function (e.g., for Newton).
-void BigFloatRep::approx(const BigFloatRep& B,
-              const extLong& r, const extLong& a) {
-  if (B.err) {
-    if (1 + clLg(B.err) <= bitLength(B.m))
-      truncM(B, r + 1, a);
-    else //  1 + clLg(B.err) > lg(B.m)
-      truncM(B, CORE_posInfty, a);
-  } else {//  B.err == 0
-    trunc(B.m, r, a - bits(B.exp));
-    exp += B.exp;
-  }
-  // Call normalization globally     -- IP 10/9/98
-  normal();
-}
-
-void BigFloatRep::div(const BigInt& N, const BigInt& D,
-              const extLong& r, const extLong& a) {
-  if (sign(D)) {
-    if (sign(N)) {
-      long tr = chunkFloor((- r + bitLength(N) - bitLength(D) - 1).asLong());
-      long ta = chunkFloor(- a.asLong());
-
-      if (r.isInfty() || a.isTiny())
-        exp = ta;
-      else if (a.isInfty())
-        exp = tr;
-      else
-        exp = ta < tr ? tr : ta;
-
-      BigInt remainder;
-
-      // divide(chunkShift(N, - exp), D, m, remainder);
-      div_rem(m, remainder, chunkShift(N, - exp), D);
-
-      if (exp <= 0 && sign(remainder) == 0)
-        err = 0;
-      else
-        err = 1;
-    } else {//  N == 0
-      m   = 0;
-      err = 0;
-      exp = 0;
-    }
-  } else //  D == 0
-    core_error( "BigFloat error: zero divisor.", __FILE__, __LINE__, true);
-
-  // Call normalization globally     -- IP 10/9/98
-  normal();
-}//div
-
-//  error-normalization
-void BigFloatRep::normal() {
-  long le = flrLg(err);
-
-  if (le >= CHUNK_BIT + 2) { // so we do not carry more than 16 = CHUNK_BIT + 2
-	                     // bits of error
-    long f = chunkFloor(--le); // f is roughly equal to floor(le/CHUNK_BIT)
-    long bits_f = bits(f);   // f chunks will have bits_f many bits
-#ifdef CORE_DEBUG
-    assert (bits_f >= 0);
-#endif
-
-    m   >>= bits_f;  // reduce mantissa by bits_f many bits
-    err >>= bits_f;  // same for err
-    err +=  2;       // why 2?
-    exp +=  f;       
-  }
-  if (err == 0)      // unlikely, if err += 2 above
-    eliminateTrailingZeroes();
-}
-
-// bigNormal(err) 
-//     convert a bigInt error value (=err) into an error that fits into
-//     a long number.  This is done by
-//     by increasing the exponent, and corresponding decrease
-//     in the bit lengths of the mantissa and error.
-//
-void BigFloatRep::bigNormal(BigInt& bigErr) {
-  long le = bitLength(bigErr);
-
-  if (le < CHUNK_BIT + 2) {
-    err = ulongValue(bigErr);
-  } else {
-    long f = chunkFloor(--le);
-    long bits_f = bits(f);
-#ifdef CORE_DEBUG
-    assert(bits_f >= 0);
-#endif
-
-    m      >>= bits_f;
-    bigErr >>= bits_f;
-    err    = ulongValue(bigErr) + 2; // you need to add "2" because "1" comes
-    		// from truncation error in the mantissa, and another
-		// "1" comes from the truncation error in the bigErr.
-		// (But there is danger of overflow...)
-    exp    += f;
-  }
-
-  if (err == 0)
-    eliminateTrailingZeroes();
-}
-
-// ARITHMETIC:
-//  Addition
-void BigFloatRep::add(const BigFloatRep& x, const BigFloatRep& y) {
-  long expDiff = x.exp - y.exp;
-
-  if (expDiff > 0) {//  x.exp > y.exp
-    if (!x.err) {
-      m   = chunkShift(x.m, expDiff) + y.m;
-      err = y.err;
-      exp = y.exp;
-    } else {//  x.err > 0
-      m   = x.m + chunkShift(y.m, - expDiff); // negative shift!
-      err = x.err + 5; // To account for y.err (but why 5?)
-      exp = x.exp;     // 
-      // normal();
-    }
-  } else if (!expDiff) {//  x.exp == y.exp
-    m   = x.m + y.m;
-    err = x.err + y.err;
-    exp = x.exp;
-    // normal();
-  } else {//  x.exp < y.exp
-    if (!y.err) {
-      m   = x.m + chunkShift(y.m, - expDiff);
-      err = x.err;
-      exp = x.exp;
-    } else {//  y.err > 0
-      m   = chunkShift(x.m, expDiff) + y.m;
-      err = y.err + 5;
-      exp = y.exp;
-      // normal();
-    }
-  }
-  // Call normalization globally     -- IP 10/9/98
-  normal();
-}
-
-//  Subtraction
-void BigFloatRep::sub(const BigFloatRep& x, const BigFloatRep& y) {
-  long expDiff = x.exp - y.exp;
-
-  if (expDiff > 0) {//  x.exp > y.exp
-    if (!x.err) {
-      m   = chunkShift(x.m, expDiff) - y.m;
-      err = y.err;
-      exp = y.exp;
-    } else {//  x.err > 0
-      m   = x.m - chunkShift(y.m, - expDiff);
-      err = x.err + 5;
-      exp = x.exp;
-      // normal();
-    }
-  } else if (!expDiff) {
-    m   = x.m - y.m;
-    err = x.err + y.err;
-    exp = x.exp;
-    // normal();
-  } else { //  x.exp < y.exp
-    if (!y.err) {
-      m   = x.m - chunkShift(y.m, - expDiff);
-      err = x.err;
-      exp = x.exp;
-    } else {//  y.err > 0
-      m   = chunkShift(x.m, expDiff) - y.m;
-      err = y.err + 5;
-      exp = y.exp;
-      // normal();
-    }
-  }
-  // Call normalization globally     -- IP 10/9/98
-  normal();
-}
-
-void BigFloatRep::mul(const BigFloatRep& x, const BigFloatRep& y) {
-  m = x.m * y.m;
-  exp = x.exp + y.exp;
-  // compute error (new code, much faster. Zilin Du, Nov 2003)
-  if (x.err == 0 && y.err == 0) {
-    err = 0;
-    eliminateTrailingZeroes();
-  } else {
-    BigInt bigErr(0);
-    if (y.err != 0)
-      bigErr += abs(x.m)*y.err;
-    if (x.err != 0)
-      bigErr += abs(y.m)*x.err;
-    if (x.err !=0 && y.err != 0)
-      bigErr += x.err*y.err;
-    bigNormal(bigErr);
-  }
-}
-// BigFloat div2 will half the value of x, exactly with NO error
-// 	REMARK: should generalize this to dividing by any power of 2
-// 	We need this in our use of BigFloats to maintain isolation
-// 	intervals (e.g., in Sturm sequences)	--Chee/Vikram 4/2003
-//
-void BigFloatRep :: div2(const BigFloatRep& x) {
-  if (isEven(x.m)) {
-    m = (x.m >> 1);
-    exp = x.exp ;
-  } else {
-    m = (x.m << static_cast<unsigned long>(CHUNK_BIT-1));
-    exp = x.exp -1;
-  }
-}
-
-// Converts a BigFloat interval into one BigFloat with almost same error bound
-// This routine ignores the errors in inputs a and b.
-// But you cannot really ignore them since, they are taken into account
-// when you compute "r.sub(a,b)"...
-void BigFloatRep::centerize(const BigFloatRep& a, const BigFloatRep& b) {
-  if ((a.m == b.m) && (a.err == b.err) && (a.exp == b.exp)) {
-    m = a.m;
-    err = a.err;
-    exp = a.exp;
-    return;
-  }
-
-  BigFloatRep r;
-  r.sub(a, b);
-  r.div2(r);
-
-  //setup mantissa and exponent, but not error bits
-  // But this already sets the error bits? Chee
-  add(a,b);
-  div2(*this);
-  // error bits = ceil ( B^{-exp}*|a-b|/2 )
-
-  // bug fixed: possible overflow on converting
-  // Zilin & Vikram, 08/24/04
-  // err = 1 + longValue(chunkShift(r.m, r.exp - exp));
-  BigInt E = chunkShift(r.m, r.exp - exp);
-  bigNormal(E);
-}
-
-// BigFloat Division, computing x/y:
-//      Unlike +,-,*, this one takes a relative precision bound R
-//	Note that R is only used when x and y are error-free!
-//	(This remark means that we may be less efficient than we could be)
-//
-//  	Assert( R>0  && R< CORE_Infty )
-//
-void BigFloatRep :: div(const BigFloatRep& x, const BigFloatRep& y,
-                        const extLong& R) {
-  if (!y.isZeroIn()) { //  y.m > y.err, so we are not dividing by 0
-    if (!x.err && !y.err) {
-      if (R < 0 || R.isInfty()) //Oct 9, 2002: fixed major bug! [Zilin/Chee]
-        div(x.m, y.m, defBFdivRelPrec, CORE_posInfty);
-      else
-        div(x.m, y.m, R, CORE_posInfty);
-      exp += x.exp - y.exp; // chen: adjust exp.
-    } else {//  x.err > 0 or y.err > 0
-      BigInt bigErr, errRemainder;
-
-      if (x.isZeroIn()) { //  x.m <= x.err
-        m   = 0;
-        exp = x.exp - y.exp;
-
-        div_rem(bigErr, errRemainder, abs(x.m) + static_cast<long>(x.err),
-                abs(y.m) - static_cast<long>(y.err));
-      } else { //  x.m > x.err
-        long lx = bitLength(x.m);
-        long ly = bitLength(y.m);
-        long r;
-
-        if (!x.err) //  x.err == 0 and y.err > 0
-          r = ly + 2;
-        else if(!y.err)  //  x.err > 0 and y.err == 0
-          r = lx + 2;
-        else  //  x.err > 0 and y.err > 0
-          r = lx < ly ? lx + 2: ly + 2;
-
-        long   t = chunkFloor(- r + lx - ly - 1);
-        BigInt remainder;
-
-        div_rem(m, remainder, chunkShift(x.m, - t), y.m);
-        exp = t + x.exp - y.exp;
-
-        long delta = ((t > 0) ? 2 : 0);
-
-        // Chen Li: 9/9/99
-        // here again, it use ">>" operator with a negative
-        // right operand. So the result is not well defined.
-        // Erroneous code:
-        //   divide(abs(remainder) + (static_cast<long>(x.err) >> bits(t))
-        //                     + delta + static_cast<long>(y.err) * abs(m),
-        //                     abs(y.m) - static_cast<long>(y.err),
-        //                     bigErr,
-        //                     errRemainder);
-        // New code:
-        BigInt errx_over_Bexp = x.err;
-        long bits_Bexp = bits(t);
-        if (bits_Bexp >= 0) {
-          errx_over_Bexp >>= bits_Bexp;
-        } else {
-          errx_over_Bexp <<= (-bits_Bexp);
-        }
-
-        // divide(abs(remainder) + errx_over_Bexp
-        //        + delta + static_cast<long>(y.err) * abs(m),
-        //        abs(y.m) - static_cast<long>(y.err),
-        //        bigErr,
-        //        errRemainder);
-        div_rem(bigErr, errRemainder,
-                abs(remainder) + errx_over_Bexp + delta + static_cast<long>(y.err) * abs(m),
-                abs(y.m) - static_cast<long>(y.err));
-      }
-
-      if (sign(errRemainder))
-        ++bigErr;
-
-      bigNormal(bigErr);
-    }
-  } else {//  y.m <= y.err
-    core_error("BigFloat error: possible zero divisor.",
-		    __FILE__, __LINE__, true);
-  }
-
-  // Call normalization globally     -- IP 10/9/98
-  // normal(); -- Chen: after calling bigNormal, this call is redundant.
-}// BigFloatRep::div
-
-//  squareroot for BigInt argument, without initial approximation
-//  sqrt(x,a) computes sqrt of x to absolute precision a.
-//      -- this is where Newton is applied
-//      -- this is called by BigFloatRep::sqrt(BigFloat, extLong)
-void BigFloatRep::sqrt(const BigInt& x, const extLong& a) {
-  sqrt(x, a, BigFloat(x, 0, 0));
-} // sqrt(BigInt x, extLong a) , without initial approx
-
-//  sqrt(x,a,A) where
-//      x = bigInt whose sqrt is to be computed
-//      a = absolute precision bound
-//      A = initial approximation in BigFloat
-//  -- this is where Newton is applied
-//  -- it is called by BigFloatRep::sqrt(BigFloatRep, extLong, BigFloat)
-void BigFloatRep::sqrt(const BigInt& x, const extLong& a, const BigFloat& A) {
-  if (sign(x) == 0) {
-    m = 0;
-    err = 0;
-    exp = 0;
-  } else if (x == 1) {
-    m = 1;
-    err = 0;
-    exp = 0;
-  } else  {// main case
-    // here is where we use the initial approximation
-    m = A.m();
-    err = 0;
-    exp = A.exp();
-
-    BigFloatRep q, z;
-    extLong     aa;
-    // need this to make sure that in case the
-    // initial approximation A is less than sqrt(x)
-    // then Newton iteration will still proceed at
-    // least one step.
-    bool firstTime = true;
-    for (;;) {
-      aa    = a - bits(exp);
-      q.div(x, m, CORE_posInfty, aa);
-      q.err = 0;
-      q.exp -= exp;
-
-      z.sub(*this, q);  // this=current approximation, so z = this - q
-      /*if (sign(z.m) <= 0 || z.MSB() < - a)  // justification: see Koji's
-          break;                              // thesis (p. 28) which states
-                                              // that we can exit when
-                                              // " (*this) <= q + 2**(-a)"
-      */
-      // The preceding code is replaced by what follows:
-      if (z.MSB() < -a)
-        break;
-      if (sign(z.m) <= 0) {
-        if (firstTime)
-          firstTime = false;
-        else
-          break;
-      }
-
-      z.add(*this, q);
-      // Chen Li: a bug fixed here.
-      //      m   = z.m >> 1;
-      //      err = 0;
-      //      exp = z.exp;
-      if ((z.m > 1) && isEven(z.m)) {
-        m = z.m >> 1;               // exact division by 2
-        err = 0;
-        exp = z.exp;
-      } else {                      // need to shift left before division by 2
-        m = chunkShift(z.m, 1) >> 1;
-        err = 0;
-        exp = z.exp - 1;
-      }//else
-    }//for
-  }//else
-} // sqrt of BigInt, with initial approx
-
-// MAIN ENTRY INTO SQRT FUNCTION (BIGFLOAT ARGUMENT, WITHOUT INITIAL APPROX)
-void BigFloatRep::sqrt(const BigFloatRep& x, const extLong& a) {
-  sqrt(x, a, BigFloat(x.m, 0, x.exp));
-} //sqrt(BigFloat, extLong a)
-
-// MAIN ENTRY INTO SQRT FUNCTION (BIGFLOAT ARGUMENT WITH INITIAL APPROXIMATION)
-void BigFloatRep::sqrt(const BigFloatRep& x, const extLong& a, const BigFloat& A) {
-  // This computes the sqrt of x to absolute precision a, starting with
-  // the initial approximation A
-  if (sign(x.m) >= 0) {          //  x.m >= 0
-    int delta = x.exp & 1;    // delta=0 if x.exp is even, otherwise delta=1
-
-    if (x.isZeroIn()) {         //  x.m <= x.err
-      m = 0;
-      if (!x.err)
-        err = 0;
-      else {                  //  x.err > 0
-        err = (long)(std::sqrt((double)x.err));
-        err++;
-        err <<= 1;
-        if (delta)
-          err <<= HALF_CHUNK_BIT;
-      }
-      exp = x.exp >> 1;
-      normal();
-    } else {
-      long aExp = A.exp() - (x.exp >> 1);
-      BigFloat AA( chunkShift(A.m(), delta), 0, aExp);
-
-      if (!x.err) {             //  x.m > x.err = 0 (ERROR FREE CASE)
-        BigFloatRep z;
-        extLong ppp;
-        if (a.isInfty())        //Oct 9, 2002: fixed major bug! [Zilin/Chee]
-          ppp = defBFsqrtAbsPrec;
-        else
-          ppp = a + EXTLONG_ONE;
-        extLong absp  = ppp + bits(x.exp >> 1);
-
-        z.sqrt(chunkShift(x.m, delta), absp, AA); // call sqrt(BigInt, a, AA)
-
-        long p = (absp + bits(z.exp)).asLong();
-
-        // Next, normalize the error:
-        if (p <= 0) {
-          m = z.m;
-          // Chen Li: a bug fixed
-          //    BigInt bigErr = 1 << (-p);
-          BigInt bigErr(1);
-          bigErr = bigErr << static_cast<unsigned long>(-p);
-          exp = z.exp + (x.exp >> 1);
-          bigNormal(bigErr);
-        } else {                  //  p > 0
-          m = chunkShift(z.m, chunkCeil(p));
-          long r = CHUNK_BIT - 1 - (p + CHUNK_BIT - 1) % CHUNK_BIT;
-#ifdef CORE_DEBUG
-          assert(r >= 0);
-#endif
-
-          err = 1 >> r;
-          exp = - chunkCeil(ppp.asLong());
-          normal();
-        }
-      } else {                      //  x.m > x.err > 0 (mantissa has error)
-        BigFloatRep z;
-        extLong absp=-flrLg(x.err)+bitLength(x.m)-(bits(delta) >> 1)+EXTLONG_FOUR;
-
-        z.sqrt(chunkShift(x.m, delta), absp, AA);
-
-        long qqq = - 1 + (bitLength(x.m) >> 1) - delta * HALF_CHUNK_BIT;
-        long qq  = qqq - clLg(x.err);
-        long q   = qq + bits(z.exp);
-
-        if (q <= 0) {
-          m = z.m;
-          long   qqqq   = - qqq - bits(z.exp);
-          // Chen Li (09/08/99), a bug fixed here:
-          //        BigInt bigErr = x.err << - qqqq;
-          // when (-qqqq) is negative, the result is not correct.
-          // how "<<" and ">>" process negative second operand is
-          // not well defined. Seems it just take it as a unsigned
-          // integer and extract the last few bits.
-          // x.err is a long number which easily overflows.
-          // From page 22 of Koji's paper, I think the exponent is
-          // wrong here. So I rewrote it as:
-          BigInt bigErr = x.err;
-          if (qqqq >= 0) {
-            bigErr <<= qqqq;
-          } else {
-            bigErr >>= (-qqqq);
-            ++bigErr; // we need to keep its ceiling.
-          }
-
-          exp = z.exp + (x.exp >> 1);
-          bigNormal(bigErr);
-        } else {         //  q > 0
-          m = chunkShift(z.m, chunkCeil(q));
-          long r = CHUNK_BIT - 1 - (q + CHUNK_BIT - 1) % CHUNK_BIT;
-#ifdef CORE_DEBUG
-          assert(r >= 0);
-#endif
-
-          err = 1 >> r;
-          exp = (x.exp >> 1) - chunkCeil(qq);
-          normal();
-        }
-      }  // end of case with error in mantissa
-    }//else
-  } else
-    core_error("BigFloat error: squareroot called with negative operand.",
-		    __FILE__, __LINE__, true);
-} //sqrt with initial approximation
-
-//  compareMExp(x)
-//    returns  1 if *this > x
-//             0 if *this = x,
-//            -1 if *this < x,
-//
-//      Main comparison method for BigFloat
-//      This is called by BigFloat::compare()
-//      BE CAREFUL:  The error bits are ignored!
-//      Need another version if we want to take care of error bits
-
-int BigFloatRep :: compareMExp(const BigFloatRep& x) const {
-  int st = sign(m);
-  int sx = sign(x.m);
-
-  if (st > sx)
-    return 1;
-  else if (st == 0 && sx == 0)
-    return 0;
-  else if (st < sx)
-    return - 1;
-  else { //  need to compare m && exp
-    long expDiff = exp - x.exp;
-
-    if (expDiff > 0) //  exp > x.exp
-      return cmp(chunkShift(m, expDiff), x.m);
-    else if (!expDiff)
-      return cmp(m, x.m);
-    else  //  exp < x.exp
-      return cmp(m, chunkShift(x.m, - expDiff));
-  }
-}
-
-// 3/6/2000:
-// This is a private function used by BigFloatRep::operator<<
-// to get the exact value
-// of floor(log10(M * 2^ e)) where E is an initial guess.
-// We will return the correct E which satisfies
-//              10^E <= M * 2^e < 10^{E+1}
-// But we convert this into
-//              mm <= M < 10.mm
-
-long BigFloatRep :: adjustE( long E, BigInt M, long ee) const {
-  if (M<0)
-    M=-M;
-  BigInt mm(1);
-  if (ee > 0)
-    M = (M<<static_cast<unsigned long>(ee));
-  else
-    mm = (mm << static_cast<unsigned long>(-ee));
-  if (E > 0)
-    mm *= (FiveTo(E)<< static_cast<unsigned long>(E));
-  else
-    M *= (FiveTo(-E) << static_cast<unsigned long>(-E));
-
-  if (M < mm) {
-    do {
-      E--;
-      M *= 10;
-    } while (M < mm);
-  } else if (M >= 10*mm) {
-    mm *= 10;
-    do {
-      E++;
-      mm *= 10;
-    } while (M >= mm);
-  }
-  return E;
-}
-
-BigFloatRep::DecimalOutput
-BigFloatRep::toDecimal(unsigned int width, bool Scientific) const {
-  BigFloatRep::DecimalOutput decOut;                // to be returned
-  if (err > 0) {
-    decOut.isExact = false;
-  } else { // err == 0
-    decOut.isExact = true;
-  }
-
-  if (err > 0 && err >= abs(m)) {
-    // if err is larger than mantissa, sign and significant values
-    // can not be determined.
-    core_error("BigFloat error: Error is too big!",
-		    __FILE__, __LINE__, false);
-    decOut.rep = "0.0e0";          // error is too big
-    decOut.isScientific = false;
-    decOut.noSignificant = 0;
-    decOut.errorCode = 1;          // sign of this number is unknown
-    return decOut;
-  }
-
-  decOut.sign = sign(m);
-  decOut.errorCode = 0;
-
-  BigInt M(m);                  // temporary mantissa
-  long lm = bitLength(M);       // binary length of mantissa
-  long e2 = bits(exp);          // binary shift length represented by exponent
-  long le = clLg(err);          // binary length of err
-  if (le == -1)
-    le = 0;
-
-  long L10 = 0;
-  if (M != 0) {
-    L10 = (long)std::floor((lm + e2) / lgTenM);
-    L10 = adjustE(L10, m, e2);     // L10: floor[log10(M 2^(e2))], M != 0
-  } else {
-    L10 = 0;
-  }
-  // Convention: in the positional format, when the output is
-  // the following string of 8 characters:
-  //             (d0, d1, d2, d3, ".", d4, d5, d6, d7)
-  // then the decimal point is said to be in the 4th position.
-  // E.g., (d0, ".", d1, d2) has the decimal point in the 1st position.
-  // The value of L10 says that the decimal point of output should be at
-  // the (L10 + 1)st position. This is
-  // true regardingless of whether M = 0 or not. For zero, we output
-  // {0.0*} so L10=0.  In general, the |value| is less than 10
-  // if and only if L10 is 0 and the
-  // decimal point is in the 1st place.  Note that L10 is defined even if
-  // the output is an integer (in which case it does not physically appear
-  // but conceptually terminates the sequence of digits).
-
-  // First, get the decimal representaion of (m * B^(exp)).
-  if (e2 < 0) {
-    M *= FiveTo(-e2); // M = x * 10^(-e2)
-  } else if (e2 > 0) {
-    M <<= e2;         // M = x * 2^(e2)
-  }
-
-  std::string decRep = M.get_str();
-  // Determine the "significant part" of this string, i.e. the part which
-  // is guaranteed to be correct in the presence of error,
-  // except that the last digit which might be subject to +/- 1.
-
-  if (err != 0) {     // valid = number of significant digits
-    unsigned long valid = floorlg10(m) - (long)std::floor(std::log10(float(err)));
-    if (decRep.length() > valid) {
-      decRep.erase(valid);
-    }
-  }
-
-  // All the digits in decM are correct, except the last one might
-  // subject to an error +/- 1.
-
-  if ((decRep[0] == '+') || (decRep[0] == '-')) {
-    decRep.erase(0, 1);
-  }
-
-  // Second, make choice between positional representation
-  // and scientific notation.  Use scientific notation when:
-  // 0) if scientific notation flag is on
-  // 1) err * B^exp >= 1, the error contribute to the integral part.
-  // 2) (1 + L10) >= width, there is not have enough places to hold the
-  //    positional representation, not including decimal point.
-  // 3) The distance between the first significant digit and decimal
-  //    point is too large for the width limit. This is equivalent to
-  //            Either ((L10 >= 0 and (L10 + 1) > width))
-  //            Or  ((L10 < 0) and (-L10 + 1) > width).
-
-  if (Scientific ||
-      ((err > 0) && (le + e2) >= 0) ||          // if err*B^exp >= 1
-      ((L10 >= 0) && (L10 + 1 >= (long)width )) ||
-      ((L10 < 0) && (-L10 + 1 > (long)width ))) {
-    // use scientific notation
-    decRep = round(decRep, L10, width);
-    decOut.noSignificant = width;
-    decRep.insert(1, ".");
-    if (L10 != 0) {
-      decRep += 'e';
-      if (L10 > 0) {
-        decRep += '+';
-      } else { // L10 < 0
-        decRep += '-';
-      }
-      char eBuf[48]; // enought to hold long number L10
-      int ne = 0;
-      if ((ne = sprintf(eBuf, "%ld", labs(L10))) >= 0) {
-        eBuf[ne] = '\0';
-      } else {
-        //perror("BigFloat.cpp: Problem in outputing the exponent!");
-        core_error("BigFloat error: Problem in outputing the exponent",
-			__FILE__, __LINE__, true);
-      }
-      decRep += eBuf;
-      decOut.isScientific = true;
-    }
-  } else {
-    // use conventional positional notation.
-    if (L10 >= 0) { // x >= 1 or x == 0 and L10 + 1 <= width
-      // round when necessary
-      if (decRep.length() > width ) {
-        decRep = round(decRep, L10, width );
-        if (decRep.length() > width ) {
-          // overflow happens! use scientific notation
-          return toDecimal(width, true);
-        }
-      }
-      decOut.noSignificant = decRep.length();
-      if (L10 + 1 < (long)width ) {
-        decRep.insert(L10 + 1, ".");
-      } else { // L10 + 1 == width
-        // do nothing
-      }
-    } else { // L10 < 0, 0 < x < 1
-      // (-L10) leading zeroes, including one to the left of decimal dot
-      // need to be added in beginning.
-      decRep = std::string(-L10, '0') + decRep;
-      // then round when necessary
-      if (decRep.length() > width ) {
-        decRep = round(decRep, L10, width );
-        // cannot overflow since there are L10 leading zeroes.
-      }
-      decOut.noSignificant = decRep.length() - (-L10);
-      decRep.insert(1, ".");
-    }
-    decOut.isScientific = false;
-  }
-#ifdef CORE_DEBUG
-  assert(decOut.noSignificant >= 0);
-#endif
-
-  decOut.rep = decRep;
-  return decOut;
-}//toDecimal
-
-std::string BigFloatRep::round(std::string inRep, long& L10, unsigned int width) const {
-  // round inRep so that the length would not exceed width.
-  if (inRep.length() <= width)
-    return inRep;
-
-  int i = width; // < length
-  bool carry = false;
-
-  if ((inRep[i] >= '5') && (inRep[i] <= '9')) {
-    carry = true;
-    i--;
-    while ((i >= 0) && carry) {
-      if (carry) {
-        inRep[i] ++;
-        if (inRep[i] > '9') {
-          inRep[i] = '0';
-          carry = true;
-        } else {
-          carry = false;
-        }
-      }
-      i-- ;
-    }
-
-    if ((i < 0) && carry) { // overflow
-      inRep.insert(inRep.begin(), '1');
-      L10 ++;
-      width ++;
-    }
-  }
-
-  return inRep.substr(0, width);
-}//round(string,width)
-
-
-// This function fromString(str, prec) is similar to the
-//      constructor Real(char * str, extLong prec)
-// See the file Real.cc for the differences
-
-void BigFloatRep :: fromString(const char *str, const extLong & prec ) {
-  // NOTE: prec defaults to defBigFloatInputDigits (see BigFloat.h)
-  // check that prec is not INFTY
-  if (prec.isInfty())
-    core_error("BigFloat error: infinite precision not allowed",
-			__FILE__, __LINE__, true);
-
-  const char *e = strchr(str, 'e');
-  int dot = 0;
-  long e10 = 0;
-  if (e != NULL)
-    e10 = atol(e+1);    // e10 is decimal precision of the input string
-  // i.e., input is A/10^{e10}.
-  else {
-    e = str + strlen(str);
-#ifdef CORE_DEBUG
-    assert(*e == '\0');
-#endif
-
-  }
-
-  const char *p = str;
-  if (*p == '-' || *p == '+')
-    p++;
-  m = 0;
-  exp = 0;
-
-  for (; p < e; p++) {
-    if (*p == '.') {
-      dot = 1;
-      continue;
-    }
-    m = m * 10 + (*p - '0');
-    if (dot)
-      e10--;
-  }
-
-  BigInt one = 1;
-  long t = (e10 < 0) ? -e10 : e10;
-  BigInt ten = FiveTo(t) * (one << static_cast<unsigned long>(t));
-
-  // HERE IS WHERE WE USE THE SYSTEM CONSTANT
-  //           defBigFloatInputDigits
-  // Note: this constant is rather similar to defInputDigits which
-  //     is used by Real and Expr for controlling
-  //     input accuracy.  The difference is that defInputDigits can
-  //     be CORE_INFTY, but defBigFloatInputDigits must be finite.
-
-  if (e10 < 0)
-    div(m, ten, CORE_posInfty, 4 * prec);
-  else
-    m *= ten;
-  if (*str == '-')
-    m = -m;
-}//BigFloatRep::fromString
-
-std::istream& BigFloatRep :: operator >>(std::istream& i) {
-  int size = 20;
-  char *str = new char[size];
-  char *p = str;
-  char c;
-  int d = 0, e = 0, s = 0;
-  // d=1 means dot is found
-  // e=1 means 'e' or 'E' is found
-  //  int done = 0;
-
-  // Chen Li: fixed a bug, the original statement is
-  //  for (i.get(c); c == ' '; i.get(c));
-  // use isspace instead of testing c == ' ', since it must also
-  // skip tab, catridge/return, etc.
-  // Change to:
-  //  int status;
-  do {
-    c = i.get();
-  } while (isspace(c)); /* loop if met end-of-file, or
-                               char read in is white-space. */
-  // Chen Li, "if (c == EOF)" is unsafe since c is of char type and
-  // EOF is of int tyep with a negative value -1
-  if (i.eof()) {
-    i.clear(std::ios::eofbit | std::ios::failbit);
-    return i;
-  }
-
-  // the current content in "c" should be the first non-whitespace char
-  if (c == '-' || c == '+') {
-    *p++ = c;
-    i.get(c);
-  }
-
-  for (; isdigit(c) || (!d && c=='.') ||
-       (!e && ((c=='e') || (c=='E'))) || (!s && (c=='-' || c=='+')); i.get(c)) {
-    if (!e && (c == '-' || c == '+'))
-      break;
-    // Chen Li: put one more rule to prohibite input like
-    //  xxxx.xxxe+xxx.xxx:
-    if (e && (c == '.'))
-      break;
-    if (p - str == size) {
-      char *t = str;
-      str = new char[size*2];
-      memcpy(str, t, size);
-      delete [] t;
-      p = str + size;
-      size *= 2;
-    }
-#ifdef CORE_DEBUG
-    assert((p-str) < size);
-#endif
-
-    *p++ = c;
-    if (c == '.')
-      d = 1;
-    // Chen Li: fix a bug -- the sign of exponent can not happen before
-    // the character "e" appears! It must follow the "e' actually.
-    //    if (e || c == '-' || c == '+') s = 1;
-    if (e)
-      s = 1;
-    if ((c == 'e') || (c=='E'))
-      e = 1;
-  }
-
-  // chenli: make sure that the p is still in the range
-  if (p - str >= size) {
-    int len = p - str;
-    char *t = str;
-    str = new char[len + 1];
-    memcpy(str, t, len);
-    delete [] t;
-    p = str + len;
-  }
-
-#ifdef CORE_DEBUG
-  assert(p - str < size);
-#endif
-
-  *p = '\0';
-  i.putback(c);
-  fromString(str);
-  delete [] str;
-  return i;
-}//operator >>
-
-
-// BigFloatRep::toDouble()
-//      converts the BigFloat to a machine double
-//      This is a dangerous function as the method
-//      is silent when it does not fit into a machine double!
-// ToDo: fix this by return a machine NaN, +/- Infinity, +/- 0,
-//      when appropriate.
-//      Return NaN when error is larger than mantissa
-//      Return +/- Infinity if BigFloat is too big
-//      Return +/- 0 if BigFloat is too small
-#ifdef _MSC_VER
-#pragma warning(disable: 4723)
-#endif
-double BigFloatRep :: toDouble() const {
-  if (m == 0)
-    return (sign(m) * 0.0);
-
-  long e2 = bits(exp);
-  long le = clLg(err);  // if err=0, le will be -1
-  if (le == -1)
-    le = 0;
-
-  BigInt M = m >> static_cast<unsigned long>(le);// remove error bits in mantissa
-
-  // Below, we want to return NaN by computing 0.0/0.0.
-  // To avoid compiler warnings about divide by zero, we do this:
-
-  double foolCompilerZero;
-  foolCompilerZero = 0.0;
-
-  // COMMENT: we should directly store the
-  //    special IEEE values NaN, +/-Infinity, +/-0 in the code!!
-
-  if (M == 0)
-    return ( 0.0/foolCompilerZero ) ; // return NaN
-
-  e2 += le;             // adjust exponent corresponding to error bits
-
-  int len = bitLength(M) - 53;  // this is positive if M is too large
-
-  if (len > 0) {
-    M >>= len;
-    e2 += len;
-  }
-
-  double tt = doubleValue(M);
-
-  int ee = e2 + bitLength(M) - 1; // real exponent.
-
-  if (ee >= 1024)       // overflow!
-    return (  sign(m)/foolCompilerZero  );      // return a signed infinity
-
-  if (ee <= -1075)      // underflow!
-    // NOTE: if (-52 < ee <= 0) get denormalized number
-    return ( sign(m) * 0.0 );  // return signed zero.
-
-  // Execute this loop if e2 < 0;
-  for (int i = 0; i > e2; i--)
-    tt /= 2;
-
-  // Execute this loop if e2 > 0;
-  for (int j = 0; j < e2; j++)
-    tt *= 2;
-
-  return tt;
-}//toDouble
-#ifdef _MSC_VER
-#pragma warning(default: 4723)
-#endif
-BigInt BigFloatRep::toBigInt() const {
-  long e2 = bits(exp);
-  long le = clLg(err);
-  if (le == -1)
-    le = 0;
-#ifdef CORE_DEBUG
-  assert (le >= 0);
-#endif
-
-  BigInt M = m >> static_cast<unsigned long>(le); // discard the contaminated bits.
-  e2 += le;           // adjust the exponent
-
-  if (e2 < 0)
-    return M >> static_cast<unsigned long>(-e2);
-  else if (e2 > 0)
-    return M << static_cast<unsigned long>(e2);
-  else
-    return M;
-}
-
-long BigFloatRep :: toLong() const {
-  // convert a BigFloat to a long integer, rounded toward -\infty.
-  long e2 = bits(exp);
-  long le = clLg(err);
-#ifdef CORE_DEBUG
-  assert (le >= 0);
-#endif
-
-  BigInt M = m >> static_cast<unsigned long>(le); // discard the contaminated bits.
-  e2 += le;           // adjust the exponent
-  long t;
-  if (e2 < 0)
-    t = ulongValue(M >> static_cast<unsigned long>(-e2));
-  else if (e2 > 0)
-    t = ulongValue(M << static_cast<unsigned long>(e2));
-  else
-    t = ulongValue(M);
-  // t = M.as_long();
-  // Note: as_long() will return LONG_MAX in case of overflow.
-
-  return t;
-}
-
-// pow(r,n) function for BigFloat
-// Note: power(r,n) calls pow(r,n)
-BigFloat pow(const BigFloat& r, unsigned long n) {
-  if (n == 0)
-    return BigFloat(1);
-  else if (n == 1)
-    return r;
-  else {
-    BigFloat x = r;
-    while ((n % 2) == 0) { // n is even
-      x *= x;
-      n >>= 1;
-    }
-    BigFloat u = x;
-    while (true) {
-      n >>= 1;
-      if (n == 0)
-        return u;
-      x *= x;
-      if ((n % 2) == 1) // n is odd
-        u *= x;
-    }
-    //return u; // unreachable
-  }
-}//pow
-
-// experimental
-BigFloat root(const BigFloat& x, unsigned long k,
-         const extLong& a, const BigFloat& A) {
-  if (x.sign() == 0) {
-    return BigFloat(0);
-  } else if (x == 1) {
-    return BigFloat(1);
-  } else  {
-    BigFloat q, del, zz;
-    BigFloat z = A;
-    BigFloat bk = long(k);
-    for (; ;) {
-      zz = pow(z, k-1);
-      q = x.div(zz, a);
-      q.makeExact();
-      del = z - q;
-      del.makeExact();
-      if (del.MSB() < -a)
-        break;
-      z = ((bk-1)*z + q).div(bk, a);
-          // newton's iteration: z_{n+1}=((k-1)z_n+x/z_n^{k-1})/k
-      z.makeExact();
-    }
-    return z;
-  }
-}//root
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/CMakeLists.txt b/3rdparty/CGAL-4.6/src/CGAL_Core/CMakeLists.txt
deleted file mode 100644
index 02b5103..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-message("Configuring libCGAL_Core")
- 
-use_essential_libs()
-
-include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS})
-
-add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
-
-link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
-
-collect_cgal_library(CGAL_Core "")
- 
-target_link_libraries( CGAL_Core ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
-
-add_dependencies( CGAL_Core CGAL )
-
-message("libCGAL_Core is configured")
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreAux.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/CoreAux.cpp
deleted file mode 100644
index 8d0c801..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreAux.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CoreAux.cpp
- * Synopsis:
- *       Auxiliary routines such as ceiling of log_2, etc. 
- *       they are not specific to any Core classes.
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include "CGAL/CORE/CoreAux.h"
-#include <gmp.h>
-
-namespace CORE { 
-
-////////////////////////////////////////////////////////////
-//  More useful functions to implement:
-//
-//  To convert digits into bits:
-//      given X, compute X * log_2(10)
-//  To convert bits into digits:
-//      given X, compute X * log_10(2)
-//
-////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////
-// flrLg(x)
-//      returns floor log base 2 of abs(x)
-// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
-////////////////////////////////////////////////////////////
-int flrLg(long x) {
-  if (x == LONG_MIN) {
-    // special treatment as -LONG_MIN would be not representable as "long"
-    return LONG_BIT - 1;
-  } else {
-    //  1 <= |x| <= LONG_MAX
-    if (x < 0)
-      x = - x;
-
-    int lg = -1;
-    while (x > 0) {
-      lg++;
-      x >>= 1;
-    }
-    return lg;
-  }
-}
-
-////////////////////////////////////////////////////////////
-// floor log base 2 of unsigned long x
-// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
-////////////////////////////////////////////////////////////
-int flrLg(unsigned long x) {
-  int lg = -1;
-  while (x > 0) {
-    lg++;
-    x >>= 1;
-  }
-  return lg;
-}
-
-////////////////////////////////////////////////////////////
-// ceiling log base 2 of abs(x)
-// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
-////////////////////////////////////////////////////////////
-int clLg(long x) {
-  if (x == LONG_MIN)
-    return LONG_BIT - 1;
-  if (x < 0)
-    x = -x; 		// use absolute value
-  if (x > (LONG_MAX >> 1)) 	// the leading data bit is 1
-    return (LONG_BIT - 1);	// exclude the sign bit
-  if (x >= 2)
-    return flrLg((unsigned long)((x << 1) - 1));
-  // SINCE ceilLog_2(x) = floorLog_2(2x-1) for x>=2
-  if (x == 1)
-    return 0;
-  return -1;			// x must be 0 here
-}
-
-////////////////////////////////////////////////////////////
-// ceiling log base 2 of unsigned long x
-// CONVENTION lg(0) = -1
-////////////////////////////////////////////////////////////
-int clLg(unsigned long x) {
-  if (x > (ULONG_MAX >> 1))	// the leading bit is 1
-    return LONG_BIT;
-  if (x >= 2)
-    return flrLg((x << 1) - 1);
-  // SINCE ceilLog_2(x) = floorLog_2(2x-1) for x>=2.
-  if (x == 1)
-    return 0;
-  return -1;	// x must be equal to 0
-}
-
-/// gcd for machine type long
-/** This is needed when we construct Polynomials with int or long coefficients */
-long gcd(long m, long n) {
-  if (m == 0)
-    return core_abs(n);
-  if (n == 0)
-    return core_abs(m);
-  long p = core_abs(m);
-  long q = core_abs(n);
-  if (p<q)
-    core_swap(p, q);
-  while (q>0) {
-    long r = p % q;
-    p = q;
-    q = r;
-  }
-  return p;
-}
-
-// return a gmp_randstate_t structure
-gmp_randstate_t* getRandstate() {
-  static gmp_randstate_t rstate;
-  static bool initialized = false;
-  if (!initialized) {
-    gmp_randinit(rstate, GMP_RAND_ALG_DEFAULT, 32L);
-    initialized = true;
-  }
-  return &rstate;
-}
-
-// char* core_itoa(int n, char* buffer)
-//      returns a pointer to the null-terminated string in buffer
-// NOTES:
-// 0. Buffer size should be 17 bytes (resp., 33 bytes, 65 bytes) on 16-bit
-//      (resp., 32-bit, 64-bit) machines.  Formula: 1+sizeof(int)*8 bytes.
-// 1. itoa(...) is available on some stdlib.h, but it is
-//      not defined by ANSI-C and so not all compilers support it.
-// 2. Our use of sprintf(...) to do the job is known to
-//      be inefficient, but this is hardly critical for our usage.
-// 3. A more general program should take a 3rd argument (the radix of
-//      output number).  We assume radix 10.
-char * core_itoa(int n, char* buffer) {
-	std::sprintf(buffer, "%d", n);
-	return buffer;
-}
-
-/// implements the "integer mantissa" function
-//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
-double IntMantissa(double d) {
-	int e;
-	return std::ldexp(std::frexp(d, &e), 53);
-}
-
-/// implements the "integer exponent" function
-//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
-int IntExponent(double d) {
-	int e;
-	std::frexp(d, &e);
-	return e-53;
-}
-
-/// CORE_DIAGFILE is file name for core_error(..) output.
-const char* CORE_DIAGFILE = "Core_Diagnostics";  // global file name 
-
-/// core_error is the method to write Core Library warning or error messages
-/** 	Both warnings and errors are written to a file called CORE_DIAGFILE.
- *	But errors are also written on std:cerr (similar to std::perror()).
- * */
-// Usage: core_error(message, file_with_error, line_number, err_type)
-//   where err_type=0 means WARNING, error_type=0 means ERROR
-void core_error(std::string msg, std::string file, int lineno, bool err) {
-  std::ofstream outFile(CORE_DIAGFILE, std::ios::app);  // open to append
-  if (!outFile) {
-     // perror("CORE ERROR: cannot open Core Diagnostics file");
-     std::cerr << "CORE ERROR: can't open Core Diagnostics file"<<std::endl;
-     std::exit(1); //Note: do not call abort()
-  }
-  outFile << "CORE " << (err? "ERROR" : "WARNING")
-     << " (at " << file << ": " << lineno << "): "
-     << msg << std::endl;
-  outFile.close();
-  if (err) {
-     char buf[65];
-     // perror((std::string("CORE ERROR") + " (file " + file + ", line "
-     //        + core_itoa(lineno,buf) +"):" + msg + "\n").c_str());
-     std::cerr << (std::string("CORE ERROR") + " (file " + file + ", line "
-             + core_itoa(lineno,buf) +"):" + msg + "\n").c_str();
-     std::exit(1); //Note: do not call abort()
-  }
-}
-
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreDefs.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/CoreDefs.cpp
deleted file mode 100644
index 3bc8ec0..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreDefs.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CoreDefs.cpp
- * Synopsis:
- *	 Useful parameters for Core Library which users may change
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include "CGAL/CORE/CoreDefs.h"
-
-namespace CORE { 
-
-//  Default Values
-
-/* ************************************************************
- * ERROR FLAGS
- * ************************************************************ */
-
-/** I/O error flag (Default value 0, indicating no error)
- *  User's responsibility to check and reset value to 0. */
-// This is currently used in geom2d/points2d.cpp for I/O of points
-
-int IOErrorFlag = 0;
-
-/**
- * If AbortFlag is true when invalid expression is constructed, system will abort
- */
-
-bool AbortFlag = true;
-
-/**
- * InvalidFlag is set to negative whenever an invalid expression is constructed.
- * The user has the responsibility to reset to non-negative value.
- */
-
-int InvalidFlag = 0;
-
-/* ************************************************************
- * PRECISION PARAMETERS 
- * ************************************************************ */
-
-/**
- *  Default BigFloat Division Relative Precision
- *  -- this is used by BigFloat division when the arguments are error-free.
- */
-
-extLong defBFdivRelPrec = 54;
-
-/**
- *  Default BigFloat Sqrt Absolute Precision
- *  -- this is used by BigFloat sqrt when the argument is error-free.
- */
-
-extLong defBFsqrtAbsPrec = 54;
-
-/**
- * Escape Precision 
- *   -- we will not compare a number to precision higher than this
- *   -- if this is infinity, there there is no escape precision */
-extLong EscapePrec  = CORE_posInfty;
-
-/** this flag becomes negative if the EscapePrec is used. */
-long EscapePrecFlag = 0;
-
-/// Escape Precision Warning Flag
-/** this flag is true by default, and will cause a warning to be printed
-    when EscapePrec is reached */
-bool EscapePrecWarning = true;
-
-/** The Composite Precision [defAbsPrec, defRelPrec]
- *  determines the precision to which an Expr evaluates its 
- *  (exact, implicit) constant value. */
-
-/**  absolute precision  = 2^31 - 1 */
-extLong defAbsPrec = CORE_posInfty;
-/** default relative precision is 60 relative bits.
- *  Why 60?  We would really like this to be 54, so that the default
- *  conversion duplicates the IEEE double precision.  But it turns out
- *  (see README file under BUGS), we need 59 to ensure this.
- *  Chee Yap (7/1/01) */
-extLong defRelPrec = 60;
-
-/**  number of BigFloat digits to print out */
-long defBigFloatOutputDigits = 10;
-
-/**  NORMALLY, we like to make this equal to defBigFloatOutputDigits
-  *  8/3/01, Chee: re-introduced this parameter */
-long defOutputDigits = defBigFloatOutputDigits;
-
-/** String Input Precision */
-
-/** Set this to 16 if you want machine precision. This controls the
- *  absolute error in string decimal inputs to Real or Expr.
- *  If defInputDigits is finite, then the absolute error will be 
- *  at most 10^{-defInputDigits}.  Otherwise, the input is exactly 
- *  represented by some BigFloat or BigRat value. */
-extLong defInputDigits = CORE_posInfty;
-
-/** This controls the absolute error in converting from string to BigFloat
- *  The absolute error will be at most 10^{-defInputDigits} */
-long defBigFloatInputDigits = 16;
-
-/* ************************************************************
- * EVALUATION FLAGS
- * ************************************************************ */
-
-/** Floating Point filter
- *  true = turn on floating point filter */
-bool fpFilterFlag = true;
-
-/** IncrementaL evaluation flag
- *  incremental evaluation is requested, This means, we try to use previous
- *  approximate values to improve an approximation */
-bool incrementalEvalFlag = true;
-
-/** Progressive evaluation flag
- *  true = turn on progressive evaluation flag */
-bool progressiveEvalFlag = true;
-
-/** Initial progressive evaluation precision
- *  Used by AddSubRep */
-long defInitialProgressivePrec = 64;
-
-/** RATIONAL REDUCTION FLAG
- *  true = turn on rational reduction */
-bool rationalReduceFlag = false;
-
-} //namespace CORE
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreIO.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/CoreIO.cpp
deleted file mode 100644
index a0ae400..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/CoreIO.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: CoreIO.cpp
- *
- * Written by 
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include <CGAL/CORE/BigFloatRep.h>
-#include <CGAL/CORE/BigFloat.h>
-
-namespace CORE { 
-
-void core_io_error_handler(const char *f, const char *m) {
-  std::cout << "\n error_handler";
-  std::cout << "::" << f << "::" << m << "\n";
-  std::cout.flush();
-  std::abort();
-}
-
-void core_io_memory_handler(char *t, const char *f, const char *m) {
-  if (t == NULL) {
-    std::cout << "\n memory_handler";
-    std::cout << "::" << f << "::" << m;
-    std::cout << "memory exhausted\n";
-    std::cout.flush();
-    std::abort();
-  }
-}
-
-// s has size old_size and will be resized to new_size.
-void allocate (char * &s, int old_size, int new_size) {
-  if (old_size > new_size)
-    old_size = new_size;
-
-  if (s == NULL)
-    old_size = 0;
-
-  char *t = new char[new_size];
-  core_io_memory_handler(t, "CoreIO", "allocate::out of memory error");
-
-  int i;
-  for (i = 0; i < old_size; i++)
-    t[i] = s[i];
-
-  delete[] s;
-  s = t;
-}
-
-// appends c to s at position pos.
-// sz is the size of s
-void append_char (char * &s, int & sz, int pos, char c) {
-  if (pos > sz)
-    core_io_error_handler("CoreIO", "append_char::invalid argument");
-
-  if (pos == sz) {
-    allocate(s, sz, 2*sz);
-    sz *= 2;
-  }
-
-  s[pos] = c;
-}
-
-// skip blanks, tabs, line breaks and comment lines
-int skip_comment_line (std::istream & in) {
-  int c;
-
-  do {
-    c = in.get();
-    while ( c == '#' ) {
-      do {
-        c = in.get();
-      } while ( c != '\n' );
-      c = in.get();
-    }
-  } while (c == ' ' || c == '\t' || c == '\n');
-
-  if (c == EOF)
-    core_io_error_handler("CoreIO::read_from_file()","unexpected end of file.");
-
-  in.putback(c);
-  return c;
-}
-
-// skips '\\' followed by '\n'
-int skip_backslash_new_line (std::istream & in) {
-  int c = in.get();
-
-  while (c == '\\') {
-    c = in.get();
-
-    if (c == '\n')
-      c = in.get();
-    else
-      core_io_error_handler("CoreIO::operator>>", "\\ must be immediately followed by new line.");
-  }
-
-  return c;
-}
-
-void read_string(std::istream& in, char* &buffer, int sz) {
-  int c, pos=0;
-  skip_comment_line(in);
-
-  while ( (c = in.get()) != EOF ) {
-    if ( c == ' ' || c == '\t' || c == '\n' || c == '#')
-      break;
-    else
-      append_char(buffer, sz, pos++, c);
-  }
-  append_char(buffer, sz, pos, '\0');
-}
-
-void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) {
-  char *buffer;
-  int size, offset;
-  int base;
-  bool is_negate;
-
-  int c, pos = 0;
-  skip_comment_line(in);
-
-  // read sign
-  c = in.get();
-  if (c == '-') {
-    is_negate = true;
-    c = in.get();
-  } else
-    is_negate = false;
-
-  // read base and compute digits
-  if (c == '0') {
-    c = in.get();
-    if (c == 'b') {
-      base = 2;
-      size = (maxBits == 0 || maxBits > length) ? length : maxBits;
-      offset = length - size;
-    } else if (c == 'x') {
-      base = 16;
-      size = (maxBits == 0) ? length : (maxBits+3) >> 2;
-      size = (size > length) ? length : size;
-      offset = (length - size) << 2;
-    } else {
-      base = 8;
-      size = (maxBits == 0) ? length : (maxBits+2) / 3;
-      size = (size > length) ? length : size;
-      offset = (length - size) * 3;
-      in.putback(c);
-    }
-  } else {
-    base = 10;
-    size = (maxBits == 0) ? length : (int)std::ceil(maxBits*std::log(2.0)/std::log(10.0));
-    size = (size > length) ? length : size;
-    offset = length - size;
-    in.putback(c);
-  }
-
-  buffer = new char[size+2];
-  // read digits
-  for (int i=0; (i<size)&&((c=skip_backslash_new_line(in)) != EOF ); i++) {
-    if (c != ' ' && c != '\t' && c != '\n')
-      append_char(buffer, size, pos++, c);
-  }
-  if (base == 10) {
-    for(int j=0; j<offset; j++)
-      append_char(buffer, size, pos++, '0');
-  }
-  append_char(buffer, size, pos, '\0');
-
-  // convert string to bigint.
-  if (m.set_str(buffer, base) < 0)
-    core_io_error_handler("CoreIO::read_from_file()","bad big number format.");
-  delete[] buffer;
-
-  // shift left if neccessary
-  if (offset > 0 && base != 10) {
-    m <<= offset;
-  }
-
-  if (is_negate)
-    negate(m);
-}
-
-
-void write_base_number(std::ostream& out, char* buffer, int length, int base, int charsPerLine) {
-  // write big number in a format that gmp's mpz_set_str() can
-  // automatically recognize with argument base = 0.
-  if (base == 2)
-    out << "0b";
-  else if (base == 16)
-    out << "0x";
-  else if (base == 8)
-    out << '0';
-
-  // write big number in charsPerLine.
-  char* start, *end, c;
-  for (int i=0; i<length; i += charsPerLine) {
-    start = buffer + i;
-    if (i + charsPerLine >= length)
-      out << start;
-    else {
-      end = start + charsPerLine;
-      c = *end;
-      *end = '\0';
-
-      out << start << "\\\n";
-      *end = c;
-    }
-  }
-}
-
-void readFromFile(BigInt& z, std::istream& in, long maxLength) {
-  char *buffer;
-  long length;
-
-  // check type name whether it is Integer or not.
-  buffer = new char[8];
-  read_string(in, buffer, sizeof(buffer));
-  if ( std::strcmp(buffer, "Integer") != 0)
-    core_io_error_handler("BigInt::read_from_file()","type name expected.");
-  delete[] buffer;
-
-  // read the bit length field.
-  buffer = new char[100];
-  read_string(in, buffer, sizeof(buffer));
-  length = std::atol(buffer);
-  delete[] buffer;
-
-  // read bigint
-  read_base_number(in, z, length, maxLength);
-}
-
-void writeToFile(const BigInt& z, std::ostream& out, int base, int charsPerLine) {
-  BigInt c = abs(z);
-
-  // get the absoulte value string
-  char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2];
-  mpz_get_str(buffer, base, c.get_mp());
-  int length = std::strlen(buffer);
-
-  // write type name of big number and length
-  //out << "# This is an experimental big number format.\n";
-  out << "Integer " << length << "\n";
-
-  // if bigint is negative, then write an sign '-'.
-  if ( sign(z) < 0  )
-    out << '-';
-
-  write_base_number(out, buffer, length, base, charsPerLine);
-  out << "\n";
-  delete[] buffer;
-}
-
-void readFromFile(BigFloat& bf, std::istream& in, long maxLength) {
-  char *buffer;
-  long length;
-  long exponent;
-  BigInt mantissa;
-
-  // check type name whether it is Float
-  buffer = new char[6];
-  read_string(in, buffer, sizeof(buffer));
-  if (std::strcmp(buffer, "Float") != 0)
-    core_io_error_handler("BigFloat::read_from_file()", "type name expected");
-  delete[] buffer;
-
-  // read base (default is 16384)
-  buffer = new char[8];
-  read_string(in, buffer, sizeof(buffer));
-  if (std::strcmp(buffer, "(16384)") != 0)
-    core_io_error_handler("BigFloat::read_from_file()", "base expected");
-  delete[] buffer;
-
-  // read the bit length field.
-  buffer = new char[100];
-  read_string(in, buffer, sizeof(buffer));
-  length = std::atol(buffer);
-  delete[] buffer;
-
-  // read exponent
-  buffer = new char[100];
-  read_string(in, buffer, sizeof(buffer));
-  exponent = std::atol(buffer);
-  delete[] buffer;
-
-  // read mantissa
-  read_base_number(in, mantissa, length, maxLength);
-
-  // construct BigFloat
-  bf = BigFloat(mantissa, 0, exponent);
-}
-
-void writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLine) {
-  BigInt c(CORE::abs(bf.m()));
-
-  // get the absoulte value string
-  char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2];
-  mpz_get_str(buffer, base, c.get_mp());
-  int length = std::strlen(buffer);
-
-
-  // write type name, base, length
-  //out << "# This is an experimental Big Float format." << std::endl;
-  out << "Float (16384) " << length << std::endl;
-  // write exponent
-  out << bf.exp() << std::endl;
-
-  // write mantissa
-  if ( CORE::sign(bf.m()) < 0 )
-    out << '-';
-
-  write_base_number(out, buffer, length, base, charsPerLine);
-  out << '\n';
-  delete[] buffer;
-}
-
-/* Underconstruction ----
-void BigFloat::read_from_file2(std::istream& in, long maxLength) {
-  long length = 1024;
-  char *buffer;
-  
-  // check type name whether it is Float
-  buffer = new char[7];
-  BigInt::read_string(in, buffer, sizeof(buffer));
-  if (strcmp(buffer, "NFloat") != 0)
-    core_io_error_handler("BigFloat::read_from_file2()", "type name expected");
-  delete[] buffer;
- 
-  // read base (default is 16) 
-  buffer = new char[5];
-  BigInt::read_string(in, buffer, sizeof(buffer));
-  if (strcmp(buffer, "(16)") != 0)
-    core_io_error_handler("BigFloat::read_from_file2()", "base expected");
-  delete[] buffer;
-  
-  // read length field
-  buffer = new char[100];
-  BigInt::read_string(in, buffer, sizeof(buffer));
-  
-  // get the length field if it is not null.
-  if (buffer[0] != '\0') {
-    length = atol(buffer);
-    if (maxLength > 0 && length >= maxLength)
-      length = maxLength;
-  }
-  delete[] buffer;
- 
-  // read exponent
-  buffer = new char[100];
-  BigInt::read_string(in, buffer, sizeof(buffer));
-  long exp16 = atol(buffer);
-  delete[] buffer;
- 
-  // read mantissa
-  buffer = new char[length+2];
-  //BigInt::read_base_number(in, buffer, length);
- 
-  BigInt m16(buffer);
-  delete[] buffer;
-  
-  // convert to base CHUNK_BIT
-  exp16 = exp16 - length + 1; 
-  if ( m16.is_negative() )
-    exp16 ++;
- 
-  long tmp_exp = exp16 * 4;
-  long q = tmp_exp / CHUNK_BIT;
-  long r = tmp_exp % CHUNK_BIT;
-  if ( r < 0 ) {
-    r += CHUNK_BIT;
-    q --;
-  }
-  
-  BigInt mantissa = m16 << r;
-  long exponent = q;
- 
-  // construct BigFloat
-  if (--rep->refCount == 0)
-    delete rep;
-  
-  rep = new BigFloatRep(mantissa, 0, exponent);
-  rep->refCount++;
-  
-}
- 
-// write normal float
-// now it assumed to write in hex base, i.e. B=2^4=16
-// (note: our default base B=2^(CHUNK_BIT)=2^14=16384
-void BigFloat::write_to_file2(std::ostream& out, int base, int charsPerLine) {
-  // convert to base 16.
-  long new_base = 4; // 2^4 = 16
-  long tmp_exp = (rep->exp) * CHUNK_BIT;
-  long q = tmp_exp / new_base;
-  long r = tmp_exp % new_base;
-  std::cout << "CORE_DEBUG: q=" << q << ", r=" << r << std::endl;
-  if ( r < 0 ) {
-    r += new_base;
-    q--;
-  }
-  std::cout << "CORE_DEBUG: q=" << q << ", r=" << r << std::endl;
-  
-  BigInt m16 = (rep->m) << r;
- 
-  int size = mpz_sizeinbase(m16.I, base) + 2;
-  std::cout << "size=" << size << std::endl;
-  char* buffer = new char[size];
- 
-  int length = bigint_to_string(m16, buffer, base);
-  std::cout << "length=" << length << std::endl;
- 
-  long exp16 = q + length - 1; 
-  if ( m16.is_negative() )
-    exp16 --;
- 
-  // write type name, base, length
-  out << "# This is an experimental Big Float format." << std::endl;
-  out << "NFloat (16) " << length << std::endl;
-  
-  // write exponent
-  out << exp16 << std::endl;
-  
-  // write mantissa
-  if ( m16.is_negative() ) {
-    out << '-';
-    buffer ++;
-  }
-  
-  BigInt::write_base_number(out, buffer, length, base, charsPerLine);
-  out << '\n';
-  delete[] buffer;
-}
-*/
-
-} //namespace CORE
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/Expr.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/Expr.cpp
deleted file mode 100644
index 89751cd..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/Expr.cpp
+++ /dev/null
@@ -1,1152 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Expr.cpp
- *
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
- *       Vijay Karamcheti <vijayk at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include <CGAL/CORE/Expr.h>
-#include <cmath>
-
-namespace CORE { 
-
-#ifdef CORE_DEBUG_BOUND
-unsigned int BFMSS_counter = 0;
-unsigned int BFMSS_only_counter = 0;
-unsigned int Measure_counter = 0;
-unsigned int Measure_only_counter = 0;
-unsigned int Cauchy_counter = 0;
-unsigned int Cauchy_only_counter = 0;
-unsigned int LiYap_counter = 0;
-unsigned int LiYap_only_counter = 0;
-unsigned int rootBoundHitCounter = 0;
-unsigned int computeBoundCallsCounter = 0;
-#endif
-
-const char* Add::name = "+";
-const char* Sub::name = "-";
-
-/********************************************************
- *  class Expr
- ********************************************************/
-const Expr& Expr::getZero() {
-  static Expr Zero(0);
-  return Zero;
-}
-const Expr& Expr::getOne() {
-  static Expr One(1);
-  return One;
-}
-
-// computes an interval comprising a pair of doubles
-// Note:
-//
-// This function returns are two consecutive representable binary
-// IEEE double values whichs contain the real value, but when you print out
-// them, you might be confused by the decimal represention due to round.
-//
-void Expr::doubleInterval(double & lb, double & ub) const {
-  double d = doubleValue();
-  if (! CGAL_CORE_finite(d)) {	// if overflow, underflow or NaN
-    lb = ub = d;
-    return;
-  }
-  int sign = ((* this) -Expr(d)).sign();
-  // Seems like doubleValue() always give a lower bound,
-  // 	so sign = 0 or 1 (never -1).
-  //std::cout << "Sign = " << sign << std::endl;
-  if (sign == 0) {
-    lb = ub = d;
-    return;
-  }
-  int exp;
-  frexp(d, & exp);  	// get the exponent of d
-  exp--;		// the exp from frexp satisfies
-  //     2^{exp-1} <= d < 2^{exp}
-  // But, we want exp to satisfy
-  //     2^{exp} <= d < 2^{exp+1}
-  if (sign > 0) {
-    lb = d;
-    ub = d + ldexp(1.0, -52+exp);
-    return;
-  } else {
-    ub = d;
-    lb = d - ldexp(1.0, -52+exp);
-    return;
-  }
-}
-
-// floor(e, sub) returns the floor(e), and puts the
-//      remainder into sub.
-BigInt floor(const Expr& e, Expr &sub) {
-  if (e==0) {
-	  return 0;
-  }
-  BigInt f = e.approx(CORE_INFTY, 2).BigIntValue();
-  sub = e-f;
-  // Adjustment
-  if (sub<0)
-    ++sub, --f;
-  if (sub>=1)
-    --sub, ++f;
-  assert(sub >=0 && sub<1); // got an assertion error? (Chee 3/24/04)
-  return f;
-}
-
-// Chenli: implemented algorithm from Goldberg's article.
-// 7/01: Thanks to Serge Pashkov for fixing infinite loop when n=0.
-Expr pow(const Expr& e, unsigned long n) {
-  if (n == 0)
-    return Expr(1);
-  else if (n == 1)
-    return e;
-  else {
-    Expr x = e;
-    while ((n % 2) == 0) { // n is even
-      x *= x;
-      n >>= 1;
-    }
-    Expr u = x;
-    while (true) {
-      n >>= 1;
-      if (n == 0)
-        return u;
-      x *= x;
-      if ((n % 2) == 1) // n is odd
-        u *= x;
-    }
-    //return u; // unreachable
-  }
-}//pow
-
-NodeInfo::NodeInfo() : appValue(CORE_REAL_ZERO), appComputed(false),
-    flagsComputed(false), knownPrecision(CORE_negInfty),
-#ifdef CORE_DEBUG
-    relPrecision(EXTLONG_ZERO), absPrecision(CORE_negInfty), numNodes(0),
-#endif
-    // Most of the following data members don't need to be
-    // initialized here.
-    d_e(EXTLONG_ZERO), visited(false), sign(0),
-    uMSB(CORE_negInfty), lMSB(CORE_negInfty),
-    // length(0),
-    measure(EXTLONG_ZERO), high(EXTLONG_ZERO), low(EXTLONG_ONE),
-    lc(EXTLONG_ZERO), tc(EXTLONG_ZERO),
-    v2p(EXTLONG_ZERO), v2m(EXTLONG_ZERO),
-    v5p(EXTLONG_ZERO), v5m(EXTLONG_ZERO),
-    u25(EXTLONG_ZERO), l25(EXTLONG_ZERO),
-    ratFlag(0), ratValue(NULL) { }
-
-/********************************************************
- *  class ExprRep
- ********************************************************/
-//  constructor
-ExprRep::ExprRep() : refCount(1), nodeInfo(NULL), ffVal(0.0) { }
-
-// Computes the root bit bound of the expression.
-// In effect, computeBound() returns the current value of low.
-extLong ExprRep::computeBound() {
-  extLong measureBd = measure();
-  // extLong cauchyBd = length();
-  extLong ourBd = (d_e() - EXTLONG_ONE) * high() + lc();
-  // BFMSS[2,5] bound.
-  extLong bfmsskBd;
-  if (v2p().isInfty() || v2m().isInfty())
-    bfmsskBd = CORE_INFTY;
-  else
-    bfmsskBd = l25() + u25() * (d_e() - EXTLONG_ONE) - v2() - ceilLg5(v5());
-
-  // since we might compute \infty - \infty for this bound
-  if (bfmsskBd.isNaN())
-    bfmsskBd = CORE_INFTY;
-
-  extLong bd = core_min(measureBd,
-                        // core_min(cauchyBd,
-                        core_min(bfmsskBd, ourBd));
-#ifdef CORE_SHOW_BOUNDS
-    std::cout << "Bounds (" << measureBd <<
-                    "," << bfmsskBd << ", " << ourBd << "),  ";
-    std::cout << "MIN = " << bd << std::endl;
-    std::cout << "d_e= " << d_e() << std::endl;
-#endif
-
-#ifdef CORE_DEBUG_BOUND
-  // Some statistics about which one is/are the winner[s].
-  computeBoundCallsCounter++;
-  int number_of_winners = 0;
-  std::cerr << " New contest " << std::endl;
-  if (bd == bfmsskBd) {
-    BFMSS_counter++;
-    number_of_winners++;
-    std::cerr << " BFMSS is the winner " << std::endl;
-  }
-  if (bd == measureBd) {
-    Measure_counter++;
-    number_of_winners++;
-    std::cerr << " measureBd is the winner " << std::endl;
-  }
-  /*  if (bd == cauchyBd) {
-      Cauchy_counter++;
-      number_of_winners++;
-      std::cerr << " cauchyBd is the winner " << std::endl;
-    }
-   */
-  if (bd == ourBd) {
-    LiYap_counter++;
-    number_of_winners++;
-    std::cerr << " ourBd is the winner " << std::endl;
-  }
-
-  assert(number_of_winners >= 1);
-
-  if (number_of_winners == 1) {
-    if (bd == bfmsskBd) {
-      BFMSS_only_counter++;
-      std::cerr << " BFMSSBd is the only winner " << std::endl;
-    } else if (bd == measureBd) {
-      Measure_only_counter++;
-      std::cerr << " measureBd is the only winner " << std::endl;
-    }
-    /* else if (bd == cauchyBd) {
-      Cauchy_only_counter++;
-      std::cerr << " cauchyBd is the only winner " << std::endl;
-    } */
-    else if (bd == ourBd) {
-      LiYap_only_counter++;
-      std::cerr << " ourBd is the only winner " << std::endl;
-    }
-  }
-#endif
-
-  return bd;
-}//computeBound()
-
-void ExprRep::reduceToBigRat(const BigRat& rat) {
-  Real value(rat);
-
-  //appValue() = value;
-  appComputed() = false; // since appValue is not assigned until approx() is called
-  flagsComputed() = true;
-  knownPrecision() = CORE_negInfty;
-
-#ifdef CORE_DEBUG
-  relPrecision() = EXTLONG_ZERO;
-  absPrecision() = CORE_negInfty;
-  //numNodes() = numNodes();
-#endif
-
-  d_e() = EXTLONG_ONE;
-  //visited() = e->visited();
-  sign() = value.sign();
-  uMSB() = value.MSB();
-  lMSB() = value.MSB();
-  // length() = value.length(); 	// fixed? original = 1
-  measure() = value.height();		// measure <= height for rational value
-
-  // BFMSS[2,5] bound.
-  value.ULV_E(u25(), l25(), v2p(), v2m(), v5p(), v5m());
-
-  extLong u_e = u25() + v2p();
-  extLong l_e = l25() + v2m();
-
-  u_e = u_e + ceilLg5(v5p());
-  l_e = l_e + ceilLg5(v5m());
-
-  if (l_e == EXTLONG_ZERO) {           // no divisions introduced
-    high() = u_e;
-    low() = EXTLONG_ONE - u_e; // - (u_e - 1)
-  } else {
-    high() = u_e - l_e + EXTLONG_ONE;
-    low() = 2 - high();
-  }
-
-  lc() = l_e;
-  tc() = u_e;
-
-  if (ratValue() == NULL)
-    ratValue() = new BigRat(rat);
-  else
-    *(ratValue()) = rat;
-}
-
-// This only copies the current information of the argument e to
-// 	*this ExprRep.
-void ExprRep::reduceTo(const ExprRep *e) {
-  if (e->appComputed()) {
-    appValue() = e->appValue();
-    appComputed() = true;
-    flagsComputed() = true;
-    knownPrecision() = e->knownPrecision();
-#ifdef CORE_DEBUG
-    relPrecision() = e->relPrecision();
-    absPrecision() = e->absPrecision();
-    numNodes() = e->numNodes();
-#endif
-
-  }
-  d_e() = e->d_e();
-  //visited() = e->visited();
-  sign() = e->sign();
-  uMSB() = e->uMSB();
-  lMSB() = e->lMSB();
-  // length() = e->length(); 	// fixed? original = 1
-  measure() = e->measure();
-
-  // BFMSS[2,5] bound.
-  u25() = e->u25();
-  l25() = e->l25();
-  v2p() = e->v2p();
-  v2m() = e->v2m();
-  v5p() = e->v5p();
-  v5m() = e->v5m();
-
-  high() = e->high();
-  low() = e->low();		// fixed? original = 0
-  lc() = e->lc();
-  tc() = e->tc();
-
-  // Chee (Mar 23, 2004), Notes on ratFlag():
-  // ===============================================================
-  // For more information on the use of this flag, see progs/pentagon.
-  // This is an integer valued member of the NodeInfo class.
-  // Its value is used to determine whether
-  // we can ``reduce'' an Expression to a single node containing
-  // a BigRat value.  This reduction is done if the global variable
-  // rationalReduceFlag=true.  The default value is false.
-  // This is the intepretation of ratFlag:
-  //	ratFlag < 0 means irrational
-  //	ratFlag = 0 means not initialized
-  //	ratFlag > 0 means rational
-  // Currently, ratFlag>0 is an upper bound on the size of the expression,
-  // since we recursively compute
-  // 		ratFlag(v) = ratFlag(v.lchild)+ratFlag(v.rchild) + 1.
-  // PROPOSAL: if ratFlag() > RAT_REDUCE_THRESHHOLD
-  // 	then we automatically do a reduction.  We must determine
-  // 	an empirical value for RAT_REDUCE_THRESHOLD
-
-  if (rationalReduceFlag) {
-    ratFlag() = e->ratFlag();
-
-    if (e->ratFlag() > 0 && e->ratValue() != NULL) {
-      ratFlag() ++;
-      if (ratValue() == NULL)
-        ratValue() = new BigRat(*(e->ratValue()));
-      else
-        *(ratValue()) = *(e->ratValue());
-    } else
-      ratFlag() = -1;
-  }
-}
-
-void ExprRep::reduceToZero() {
-  appValue() = CORE_REAL_ZERO;
-  appComputed() = true;
-  flagsComputed() = true;
-  knownPrecision() = CORE_negInfty;
-#ifdef CORE_DEBUG
-  relPrecision() = EXTLONG_ZERO;
-  absPrecision() = CORE_negInfty;
-  //  numNodes() = 0;
-#endif
-
-  d_e() = EXTLONG_ONE;
-  visited() = false;
-  sign() = 0;
-  uMSB() = CORE_negInfty;
-  lMSB() = CORE_negInfty;
-  // length() = 0; 	// fixed? original = 1
-  measure() = EXTLONG_ZERO;
-
-  // BFMSS[2,5] bound.
-  u25() = l25() = v2p() = v2m() = v5p() = v5m() = EXTLONG_ZERO;
-
-  low() = EXTLONG_ONE;		// fixed? original = 0
-  high() = lc() = tc() = EXTLONG_ZERO;
-
-  if (rationalReduceFlag) {
-    if (ratFlag() > 0) {
-      ratFlag() ++;
-      if (ratValue() == NULL)
-        ratValue() = new BigRat(0);
-      else
-        *(ratValue()) = 0;
-    } else
-      ratFlag() = 1;
-  }
-}
-
-////////////////////////////////////////////////////////////
-//  Test whether the current approximate value satisfies
-//  the composite precision requirements [relPrec, absPrec].
-////////////////////////////////////////////////////////////
-
-bool ExprRep::withinKnownPrecision(const extLong& relPrec,
-                                   const extLong& absPrec) {
-  if (appComputed()) { // an approximate value has been evaluated.
-    if (appValue().isExact()) {
-      return true;
-    } else { // approximation has certain error.
-      // decide to which position it is required to compute correctly.
-      extLong required = core_max(-absPrec, appValue().lMSB()-relPrec);
-      // see whether the existing error is smaller than the requirement.
-      return (knownPrecision() <= required);
-    }
-  } else
-    return false;
-}//withinKnownPrecision(a, r)
-
-// approximate the expression to certain precisions when
-// necessary (either no approximate value available or
-// the existing one is not accurate enough).
-void ExprRep::approx(const extLong& relPrec = defRelPrec,
-                     const extLong& absPrec = defAbsPrec) {
-  if (!getSign())
-    return; // if it is exactly zero...
-
-  // NOTE: The Filter might give a precise enough approximation already.
-  if (!getExactSign())
-    return;
-
-  if (!appComputed() || (!withinKnownPrecision(relPrec, absPrec))) {
-    // it's necessary to re-evaluate.
-    // to avoid huge lMSB which would cause long time and problems.
-
-    // if it is a rational node
-    if (rationalReduceFlag && ratFlag() > 0 && ratValue() != NULL)
-      appValue() = Real(*(ratValue())).approx(relPrec, absPrec); //< shouldn't
-                         // this case be done by computeApproxValue()?
-    else
-      computeApproxValue(relPrec, absPrec);
-
-    // update flags
-    appComputed() = true;
-    knownPrecision() = appValue().clLgErr();
-#ifdef CORE_DEBUG
-    if (relPrecision() < relPrec)
-      relPrecision() = relPrec;
-    if (absPrecision() < absPrec)
-      absPrecision() = absPrec;
-#endif
-
-  }
-}
-
-// return an approximate value to certain precision.
-const Real& ExprRep::getAppValue(const extLong& relPrec,
-		const extLong& absPrec) {
-  if (getSign()) {
-    approx(relPrec, absPrec);
-    return appValue();
-  } else
-    return CORE_REAL_ZERO;
-}
-
-std::ostream& operator<<(std::ostream& o, ExprRep& rep) {
-  if (rep.getSign()) {
-    rep.approx(defRelPrec, defAbsPrec);
-    o << rep.appValue();
-  } else {
-    o << "0";
-  }
-  return o;
-}
-
-// Chee, Zilin: July 17, 2002
-//  Original algorithm is wrongly implemented, and can take time
-//	 exponential in the size of the dag.
-//
-//  METHOD:
-//	Inductively assume that all "visited" flags are false.
-//	This calls for a reimplementation of "count()" and "clearFlag()".
-//	Actually, we did not have to fix the count() function.
-//
-//  (1) First recursively compute d_e for each node
-//		by calling the count() function.
-//	Important thing is count() will turn the "visited" flags
-//		to be true, so that there is no double counting.
-//	Furthermore, if d_e had already been computed, the
-//		arithmetic for d_e can be avoided (in this case,
-//		it is only the setting of "visited" flag that we
-//		are interested in!
-//  (2) At the end of count(), we have set all reachable nodes
-//		to "visited", and their d_e have been computed.
-//  (3) Now, call clearFlag() to recursively clear all reachable
-//		nodes.  NOTE THAT PREVIOUSLY, clearFlag() was called
-//		first!  This obvious is wrong
-
-extLong ExprRep::degreeBound() {
-  if (d_e() == EXTLONG_ONE) // no radical nodes below
-    return EXTLONG_ONE;
-  count();
-  clearFlag();
-  return d_e();
-}
-//  class ConstRealRep
-//  constructor
-ConstRealRep::ConstRealRep(const Real & r) : value(r) {
-  if (!value.isExact()) {
-    // clone the BigFloat and set its error to zero.
-    value = value.BigFloatValue().makeExact();
-  }
-  ffVal = filteredFp(value);
-}
-
-// initialize nodeInfo
-void ConstRep::initNodeInfo() {
-  nodeInfo = new NodeInfo();
-  d_e() = EXTLONG_ONE;
-}
-void UnaryOpRep::initNodeInfo() {
-  if (child->nodeInfo == NULL)
-    child->initNodeInfo();
-  nodeInfo = new NodeInfo();
-}
-void BinOpRep::initNodeInfo() {
-  if (first->nodeInfo == NULL)
-    first->initNodeInfo();
-  if (second->nodeInfo == NULL)
-    second->initNodeInfo();
-  nodeInfo = new NodeInfo();
-}
-
-#ifdef CORE_DEBUG
-unsigned long ConstRep::dagSize() {
-  if (!visited()) {
-    visited() = true;
-    numNodes() = 1;
-  } else
-    numNodes() = 0;
-  return numNodes();
-}
-
-unsigned long UnaryOpRep::dagSize() {
-  if (!visited()) {
-    visited() = true;
-    numNodes() = child->dagSize() + 1;
-  } else
-    numNodes() = 0;
-  return numNodes();
-}
-
-unsigned long BinOpRep::dagSize() {
-  if (!visited()) {
-    visited() = true;
-    numNodes() = first->dagSize() + second->dagSize() + 1;
-  } else
-    numNodes() = 0;
-  return numNodes();
-}
-
-void ConstRep::fullClearFlag() {
-  if (visited())
-    visited() = false;
-}
-
-void UnaryOpRep::fullClearFlag() {
-  if (visited()) {
-    child->fullClearFlag();
-    visited() = false;
-  }
-}
-
-void BinOpRep::fullClearFlag() {
-  if (visited()) {
-    first->fullClearFlag();
-    second->fullClearFlag();
-    visited() = false;
-  }
-}
-#endif
-
-//
-// clear visited flag
-//
-/* see Expr.h
-  void ConstRep::clearFlag()
-  { visited = false; }
-*/
-void UnaryOpRep::clearFlag() {
-  if (d_e() == EXTLONG_ONE)
-    return; // no radicals below.
-  if (visited()) {
-    visited() = false;
-    child->clearFlag();
-  }
-}
-//  class BinOpRep
-void BinOpRep::clearFlag() {
-  if (d_e() == EXTLONG_ONE)
-    return; // rational below
-  if (visited()) {
-    visited() = false;
-    first->clearFlag();
-    second->clearFlag();
-  }
-}
-
-//
-// count # of squareroot
-//
-extLong ConstRep::count() {
-  if (visited())
-    return EXTLONG_ONE;
-  visited() = true;
-  return d_e();
-}
-
-extLong NegRep::count() {
-  if (d_e() == EXTLONG_ONE)
-    return EXTLONG_ONE;
-  if (visited())
-    return EXTLONG_ONE;
-  visited() = true;
-  d_e() = child->count();
-  return d_e();
-}
-
-extLong SqrtRep::count() {
-  if (d_e() == EXTLONG_ONE)
-    return EXTLONG_ONE;
-  if (visited())
-    return EXTLONG_ONE;
-  visited() = true;
-  d_e() = child->count() * EXTLONG_TWO;
-  return d_e();
-}
-
-extLong BinOpRep::count() {
-  if (d_e() == EXTLONG_ONE)
-    return EXTLONG_ONE;
-  if (visited())
-    return EXTLONG_ONE;
-  visited() = true;
-  d_e() = first->count() * second->count();
-  return d_e();
-}
-
-//
-// compute exact flags functions
-//
-//  exact value
-
-void computeExactFlags_temp(ConstRep* t, const Real &value) {
-  // Chen Li: the following is incorrect:
-  //    uMSB = lMSB = value.MSB();
-  // because the value could be a BigFloat which is an interval.
-  if (value.isExact()) {
-    t->uMSB() = t->lMSB() = value.MSB();
-  } else {
-    t->uMSB() = value.uMSB();
-    t->lMSB() = value.lMSB();
-    core_error("Leaves in DAG is not exact!", __FILE__, __LINE__, true);
-  }
-
-  t->sign() = value.sign();
-  // t->length() = value.length();
-  t->measure() = value.height(); // for rationals and integers,
-  // measure = height.
-
-  // BFMSS[2,5] bound.
-  value.ULV_E(t->u25(), t->l25(), t->v2p(), t->v2m(), t->v5p(), t->v5m());
-
-  // The original BFMSS parameters can be set from the BFMSS[2,5] parameters.
-  // Here we just need them locally.
-  extLong u_e = t->u25() + t->v2p() + ceilLg5(t->v5p());
-  extLong l_e = t->l25() + t->v2m() + ceilLg5(t->v5m());
-
-#ifdef ORIGINAL_BFMSS
-  // To go back to the original BFMSS :
-  t->u25() = u_e;
-  t->l25() = l_e;
-  t->v2p() = t->v2m() = t->v5p() = t->v5m() = EXTLONG_ZERO;
-#elif defined BFMSS_2_ONLY
-  // To go back to BFMSS[2] only :
-  t->u25() = t->u25() + ceilLg5(t->v5p());
-  t->l25() = t->l25() + ceilLg5(t->v5m());
-  t->v5p() = t->v5m() = EXTLONG_ZERO;
-#endif
-
-  if (l_e == EXTLONG_ZERO) {           // no divisions introduced
-    t->high() = u_e;
-    t->low() = EXTLONG_ONE - u_e; // - (u_e - 1)
-  } else {
-    t->high() = u_e - l_e + EXTLONG_ONE;
-    t->low() = EXTLONG_TWO - t->high();
-  }
-
-  t->lc() = l_e;
-  t->tc() = u_e;
-
-  // set BigRat value
-  if (rationalReduceFlag) {
-    t->ratFlag() = 1;
-    t->ratValue() = new BigRat(value.BigRatValue());
-  }
-
-  t->flagsComputed() = true;
-}
-
-void ConstDoubleRep::computeExactFlags() {// can be made more efficient
-  computeExactFlags_temp(this, Real(ffVal.getValue()));
-}
-
-void ConstRealRep::computeExactFlags() {
-  computeExactFlags_temp(this, value);
-}
-
-void NegRep::computeExactFlags() {
-  if (!child->flagsComputed())
-    child->computeExactFlags();
-
-  if (child->sign() == 0) {
-    reduceToZero();
-    return;
-  }
-
-  if (rationalReduceFlag) {
-    if (child->ratFlag()>0 && child->ratValue() != NULL) {
-      BigRat val = -(*(child->ratValue()));
-      reduceToBigRat(val);
-      ratFlag() = child->ratFlag()+1;
-      return;
-    } else
-      ratFlag() = -1;
-  }
-
-  sign() = -child->sign();
-  uMSB() = child->uMSB();
-  lMSB() = child->lMSB();
-
-  // length() = child->length();
-  measure() = child->measure();
-  u25() = child->u25();
-  l25() = child->l25();
-  v2p() = child->v2p();
-  v2m() = child->v2m();
-  v5p() = child->v5p();
-  v5m() = child->v5m();
-  high() = child->high();
-  low() = child->low();
-  lc()  = child->lc();
-  tc()  = child->tc();
-  flagsComputed() = true;
-}//NegRep::computeExactFlags
-
-void SqrtRep::computeExactFlags() {
-  if (!child->flagsComputed())
-    child->computeExactFlags();
-
-  if (rationalReduceFlag)
-    ratFlag() = -1;
-
-  sign() = child->sign();
-  if (sign() < 0)
-    core_error("squareroot is called with negative operand.",
-               __FILE__, __LINE__, true);
-
-  uMSB() = child->uMSB() / EXTLONG_TWO;
-  lMSB() = child->lMSB() / EXTLONG_TWO;
-
-  // length() = child->length();
-  measure() = child->measure();
-
-  // BFMSS[2,5] bound.
-  if (child->v2p() + ceilLg5(child->v5p()) + child->u25() >=
-      child->v2m() + ceilLg5(child->v5m()) + child->l25()) {
-    extLong vtilda2 = child->v2p() + child->v2m();
-    v2p() = vtilda2 / EXTLONG_TWO;
-    v2m() = child->v2m();
-    extLong vmod2;
-    if (v2p().isInfty())
-      vmod2 = CORE_INFTY;
-    else
-      vmod2 = vtilda2 - EXTLONG_TWO*v2p(); // == vtilda2 % 2
-    extLong vtilda5 = child->v5p() + child->v5m();
-    v5p() = vtilda5 / EXTLONG_TWO;
-    v5m() = child->v5m();
-    extLong vmod5;
-    if (v5p().isInfty())
-      vmod5 = CORE_INFTY;
-    else
-      vmod5 = vtilda5 - EXTLONG_TWO*v5p(); // == vtilda5 % 2
-    u25() = (child->u25() + child->l25() + vmod2 + ceilLg5(vmod5) + EXTLONG_ONE) / EXTLONG_TWO;
-    l25() = child->l25();
-  } else {
-    extLong vtilda2 = child->v2p() + child->v2m();
-    v2p() = child->v2p();
-    v2m() = vtilda2 / EXTLONG_TWO;
-    extLong vmod2;
-    if (v2m().isInfty())
-      vmod2 = CORE_INFTY;
-    else
-      vmod2 = vtilda2 - EXTLONG_TWO*v2m(); // == vtilda2 % 2
-    extLong vtilda5 = child->v5p() + child->v5m();
-    v5p() = child->v5p();
-    v5m() = vtilda5 / EXTLONG_TWO;
-    u25() = child->u25();
-    extLong vmod5;
-    if (v5m().isInfty())
-      vmod5 = CORE_INFTY;
-    else
-      vmod5 = vtilda5 - EXTLONG_TWO*v5m(); // == vtilda5 % 2
-    l25() = (child->u25() + child->l25() + vmod2 + ceilLg5(vmod5) + EXTLONG_ONE) / EXTLONG_TWO;
-  }
-
-  high() = (child->high() +EXTLONG_ONE)/EXTLONG_TWO;
-  low() = child->low() / EXTLONG_TWO;
-  lc() = child->lc();
-  tc() = child->tc();
-  flagsComputed() = true;
-}// SqrtRep::computeExactFlags
-
-void MultRep::computeExactFlags() {
-  if (!first->flagsComputed())
-    first->computeExactFlags();
-  if (!second->flagsComputed())
-    second->computeExactFlags();
-
-  if ((!first->sign()) || (!second->sign())) {
-    // value must be exactly zero.
-    reduceToZero();
-    return;
-  }
-  // rational node
-  if (rationalReduceFlag) {
-    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
-      BigRat val = (*(first->ratValue()))*(*(second->ratValue()));
-      reduceToBigRat(val);
-      ratFlag() = first->ratFlag() + second->ratFlag();
-      return;
-    } else
-      ratFlag() = -1;
-  }
-
-  // value is irrational.
-  uMSB() = first->uMSB() + second->uMSB() + EXTLONG_ONE;
-  lMSB() = first->lMSB() + second->lMSB();
-  sign() = first->sign() * second->sign();
-
-  extLong df = first->d_e();
-  extLong ds = second->d_e();
-  // extLong lf = first->length();
-  // extLong ls = second->length();
-
-  // length() = df * ls + ds * lf;
-  measure() = (first->measure()) * ds+(second->measure()) * df;
-
-  // BFMSS[2,5] bound.
-  v2p() = first->v2p() + second->v2p();
-  v2m() = first->v2m() + second->v2m();
-  v5p() = first->v5p() + second->v5p();
-  v5m() = first->v5m() + second->v5m();
-  u25() = first->u25() + second->u25();
-  l25() = first->l25() + second->l25();
-
-  high() = first->high() + second->high();
-  low() = first->low() + second->low();
-
-  lc() = ds * first->lc() + df * second->lc();
-  tc() = core_min(ds * first->tc() + df * second->tc(), measure());
-
-  flagsComputed() = true;
-}// MultRep::computeExactFlags
-
-void DivRep::computeExactFlags() {
-  if (!first->flagsComputed())
-    first->computeExactFlags();
-  if (!second->flagsComputed())
-    second->computeExactFlags();
-
-  if (!second->sign())
-    core_error("zero divisor.", __FILE__, __LINE__, true);
-
-  if (!first->sign()) {// value must be exactly zero.
-    reduceToZero();
-    return;
-  }
-
-  // rational node
-  if (rationalReduceFlag) {
-    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
-      BigRat val = (*(first->ratValue()))/(*(second->ratValue()));
-      reduceToBigRat(val);
-      ratFlag() = first->ratFlag() + second->ratFlag();
-      return;
-    } else
-      ratFlag() = -1;
-  }
-
-  // value is irrational.
-  uMSB() = first->uMSB() - second->lMSB();
-  lMSB() = first->lMSB() - second->uMSB() - EXTLONG_ONE;
-  sign() = first->sign() * second->sign();
-
-  extLong df = first->d_e();
-  extLong ds = second->d_e();
-  // extLong lf = first->length();
-  // extLong ls = second->length();
-
-  // length() = df * ls + ds * lf;
-  measure() = (first->measure())*ds + (second->measure())*df;
-
-  // BFMSS[2,5] bound.
-  v2p() = first->v2p() + second->v2m();
-  v2m() = first->v2m() + second->v2p();
-  v5p() = first->v5p() + second->v5m();
-  v5m() = first->v5m() + second->v5p();
-  u25() = first->u25() + second->l25();
-  l25() = first->l25() + second->u25();
-
-  high() = first->high() + second->low();
-  low() = first->low() + second->high();
-
-  lc() = ds * first->lc() + df * second->tc();
-  tc() = core_min(ds * first->tc() + df * second->lc(), measure());
-
-  flagsComputed() = true;
-}
-
-//
-//  approximation functions
-//
-void ConstDoubleRep::computeApproxValue(const extLong& /*relPrec*/,
-                                        const extLong& /*absPrec*/)
-// can ignore precision bounds since ffVal.getValue() returns exact value
-{
-  appValue() = Real(ffVal.getValue());
-}
-
-void ConstRealRep::computeApproxValue(const extLong& relPrec,
-                                      const extLong& absPrec) {
-  appValue() = value.approx(relPrec, absPrec);
-}
-
-void NegRep::computeApproxValue(const extLong& relPrec,
-                                const extLong& absPrec) {
-  appValue() = -child->getAppValue(relPrec, absPrec);
-}
-
-void SqrtRep::computeApproxValue(const extLong& relPrec,
-                                 const extLong& absPrec) {
-  extLong r = relPrec + relPrec + EXTLONG_EIGHT; // chenli: ???
-  extLong a = absPrec + absPrec + EXTLONG_EIGHT;
-  extLong pr = - lMSB() + r;
-  extLong p  = pr < a ? pr : a;
-
-  Real val = child->getAppValue(r, a);
-  if (incrementalEvalFlag) {
-    if (appValue() == CORE_REAL_ZERO)
-      appValue() = val;
-    appValue() = val.sqrt(p, appValue().BigFloatValue());
-  } else
-    appValue() = val.sqrt(p);
-}
-
-void MultRep::computeApproxValue(const extLong& relPrec,
-                                 const extLong& absPrec) {
-  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
-    extLong r   = relPrec + EXTLONG_FOUR;
-    extLong  afr = - first->lMSB() + EXTLONG_ONE;
-    extLong  afa = second->uMSB() + absPrec + EXTLONG_FIVE;
-    extLong  af  = afr > afa ? afr : afa;
-    extLong  asr = - second->lMSB() + EXTLONG_ONE;
-    extLong  asa = first->uMSB() + absPrec + EXTLONG_FIVE;
-    extLong  as  = asr > asa ? asr : asa;
-    appValue() = first->getAppValue(r, af)*second->getAppValue(r, as);
-  } else {
-    std::cerr << "lMSB = " << lMSB() << std::endl;
-    core_error("a huge lMSB in MulRep", __FILE__, __LINE__, false);
-  }
-}
-
-void DivRep::computeApproxValue(const extLong& relPrec,
-                                const extLong& absPrec) {
-  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
-    extLong rr  = relPrec + EXTLONG_SEVEN;		// These rules come from
-    extLong ra  = uMSB() + absPrec + EXTLONG_EIGHT;	// Koji's Master Thesis, page 65
-    extLong ra2 = core_max(ra, EXTLONG_TWO);
-    extLong r   = core_min(rr, ra2);
-    extLong  af  = - first->lMSB() + r;
-    extLong  as  = - second->lMSB() + r;
-
-    extLong pr = relPrec + EXTLONG_SIX;
-    extLong pa = uMSB() + absPrec + EXTLONG_SEVEN;
-    extLong p  = core_min(pr, pa);	// Seems to be an error:
-    // p can be negative here!
-    // Also, this does not conform to
-    // Koji's thesis which has a default
-    // relative precision (p.65).
-
-    appValue() = first->getAppValue(r, af).div(second->getAppValue(r, as), p);
-  } else {
-    std::cerr << "lMSB = " << lMSB() << std::endl;
-    core_error("a huge lMSB in DivRep", __FILE__, __LINE__, false);
-  }
-}
-
-//
-// Debug Help Functions
-//
-void Expr::debug(int mode, int level, int depthLimit) const {
-  std::cout << "-------- Expr debug() -----------" << std::endl;
-  std::cout << "rep = " << rep << std::endl;
-  if (mode == Expr::LIST_MODE)
-    rep->debugList(level, depthLimit);
-  else if (mode == Expr::TREE_MODE)
-    rep->debugTree(level, 0, depthLimit);
-  else
-    core_error("unknown debugging mode", __FILE__, __LINE__, false);
-  std::cout << "---- End Expr debug(): " << std::endl;
-}
-
-
-const std::string ExprRep::dump(int level) const {
-  std::ostringstream ost;
-  if (level == OPERATOR_ONLY) {
-    ost << op();
-  } else if (level == VALUE_ONLY) {
-    ost << appValue();
-  } else if (level == OPERATOR_VALUE) {
-    ost << op() << "[val: " << appValue() << "]";
-  } else if (level == FULL_DUMP) {
-    ost << op()
-    << "[val: "  << appValue() << "; "
-    << "kp: " << knownPrecision() << "; "
-#ifdef CORE_DEBUG
-    << "r: " << relPrecision() << "; "
-    << "a: " << absPrecision() << "; "
-#endif
-    << "lMSB: " << lMSB() << "; "
-    << "uMSB: " << uMSB() << "; "
-    << "sign: " << sign() << "; "
-    // << "length: " << length() << "; "
-    << "measure: " << measure() << "; "
-    << "d_e: " << d_e() << "; "
-    << "u25: " << u25() << "; "
-    << "l25: " << l25() << "; "
-    << "v2p: " << v2p() << "; "
-    << "v2m: " << v2m() << "; "
-    << "v5p: " << v5p() << "; "
-    << "v5m: " << v5m() << "; "
-    << "high: " << high() << "; "
-    << "low: " << low() << "; "
-    << "lc: " << lc() << "; "
-    << "tc: " << tc()
-    << "]";
-  }
-  return std::string(ost.str());
-  // note that str() return an array not properly terminated!
-}
-
-
-void UnaryOpRep::debugList(int level, int depthLimit) const {
-  if (depthLimit <= 0)
-    return;
-  if (level == Expr::SIMPLE_LEVEL) {
-    std::cout << "(" << dump(OPERATOR_VALUE);
-    child->debugList(level, depthLimit - 1);
-    std::cout << ")";
-  } else if (level == Expr::DETAIL_LEVEL) {
-    std::cout << "(" << dump(FULL_DUMP);
-    child->debugList(level, depthLimit - 1);
-    std::cout << ")";
-  }
-}
-
-void UnaryOpRep::debugTree(int level, int indent, int depthLimit) const {
-  if (depthLimit <= 0)
-    return;
-  for (int i = 0; i<indent; i++ )
-    std::cout << "  ";
-  std::cout << "|_";
-  if (level == Expr::SIMPLE_LEVEL)
-    std::cout << dump(OPERATOR_VALUE);
-  else if (level == Expr::DETAIL_LEVEL)
-    std::cout << dump(FULL_DUMP);
-  std::cout << std::endl;
-  child->debugTree(level, indent + 2, depthLimit - 1);
-}
-
-void ConstRep::debugList(int level, int depthLimit) const {
-  if (depthLimit <= 0)
-    return;
-  if (level == Expr::SIMPLE_LEVEL) {
-    std::cout << "(" << dump(OPERATOR_VALUE) << ")";
-  } else if (level == Expr::DETAIL_LEVEL) {
-    std::cout << "(" << dump(FULL_DUMP) << ")";
-  }
-}
-
-void ConstRep::debugTree(int level, int indent, int depthLimit) const {
-  if (depthLimit <= 0)
-    return;
-  for (int i=0; i<indent; i++)
-    std::cout << "  ";
-  std::cout << "|_";
-  if (level == Expr::SIMPLE_LEVEL)
-    std::cout << dump(OPERATOR_VALUE);
-  else if (level == Expr::DETAIL_LEVEL)
-    std::cout << dump(FULL_DUMP);
-  std::cout << std::endl;
-}
-
-void BinOpRep::debugList(int level, int depthLimit) const {
-  if (depthLimit <= 0 )
-    return;
-  std::cout << "(";
-  if (level == Expr::SIMPLE_LEVEL) {
-    std::cout << dump(OPERATOR_VALUE);
-  } else if (level == Expr::DETAIL_LEVEL) {
-    std::cout << dump(FULL_DUMP);
-  }
-  first->debugList(level, depthLimit - 1);
-  std::cout << ", ";
-  second->debugList(level, depthLimit - 1);
-  std::cout << ")" ;
-}
-
-void BinOpRep::debugTree(int level, int indent, int depthLimit) const {
-  if (depthLimit <= 0)
-    return;
-  for (int i=0; i<indent; i++)
-    std::cout << "  ";
-  std::cout << "|_";
-  if (level == Expr::SIMPLE_LEVEL) {
-    std::cout << dump(OPERATOR_VALUE);
-  } else if (level == Expr::DETAIL_LEVEL) {
-    std::cout << dump(FULL_DUMP);
-  }
-  std::cout << std::endl;
-  first->debugTree(level, indent + 2, depthLimit - 1);
-  second->debugTree(level, indent + 2, depthLimit - 1);
-}
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/GmpIO.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/GmpIO.cpp
deleted file mode 100644
index 3d66536..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/GmpIO.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * file: GmpIO.cpp
- * 		Adapted from multi-files under /cxx in GMP's source distribution
- *
- * Zilin Du, 2003
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-/* Auxiliary functions for C++-style input of GMP types. 
-
-Copyright 2001 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-MA 02110-1301, USA. */
-
-#include <CGAL/CORE/Gmp.h>
-#include <cctype>
-#include <iostream>
-#include <string>
-#include <cstdio>
-
-using namespace std;
-
-namespace CORE { 
-
-int
-__gmp_istream_set_base (istream &i, char &c, bool &zero, bool &showbase)
-{
-  int base;
-
-  zero = showbase = false;
-  switch (i.flags() & ios::basefield)
-    {
-    case ios::dec:
-      base = 10;
-      break;
-    case ios::hex:
-      base = 16;
-      break;
-    case ios::oct:
-      base = 8;
-      break;
-    default:
-      showbase = true; // look for initial "0" or "0x" or "0X"
-      if (c == '0')
-	{
-	  if (! i.get(c))
-	    c = 0; // reset or we might loop indefinitely
-
-	  if (c == 'x' || c == 'X')
-	    {
-	      base = 16;
-	      i.get(c);
-	    }
-	  else
-	    {
-	      base = 8;
-	      zero = true; // if no other digit is read, the "0" counts
-	    }
-	}
-      else
-	base = 10;
-      break;
-    }
-
-  return base;
-}
-
-void
-__gmp_istream_set_digits (string &s, istream &i, char &c, bool &ok, int base)
-{
-  switch (base)
-    {
-    case 10:
-      while (isdigit(c))
-	{
-	  ok = true; // at least a valid digit was read
-	  s += c;
-	  if (! i.get(c))
-	    break;
-	}
-      break;
-    case 8:
-      while (isdigit(c) && c != '8' && c != '9')
-	{
-	  ok = true; // at least a valid digit was read
-	  s += c;
-	  if (! i.get(c))
-	    break;
-	}
-      break;
-    case 16:
-      while (isxdigit(c))
-	{
-	  ok = true; // at least a valid digit was read
-	  s += c;
-	  if (! i.get(c))
-	    break;
-	}
-      break;
-    }
-}
-
-istream &
-//operator>> (istream &i, mpz_ptr z)
-io_read (istream &i, mpz_ptr z)
-{
-  int base;
-  char c = 0;
-  string s;
-  bool ok = false, zero, showbase;
-
-  i.get(c); // start reading
-
-  if (i.flags() & ios::skipws) // skip initial whitespace
-    while (isspace(c) && i.get(c))
-      ;
-
-  if (c == '-' || c == '+') // sign
-    {
-      if (c == '-') // mpz_set_str doesn't accept '+'
-	s = "-";
-      i.get(c);
-    }
-
-  while (isspace(c) && i.get(c)) // skip whitespace
-    ;
-
-  base = __gmp_istream_set_base(i, c, zero, showbase); // select the base
-  __gmp_istream_set_digits(s, i, c, ok, base);         // read the number
-
-  if (i.good()) // last character read was non-numeric
-    i.putback(c);
-  else if (i.eof() && (ok || zero)) // stopped just before eof
-    i.clear();
-
-  if (ok)
-    mpz_set_str(z, s.c_str(), base); // extract the number
-  else if (zero)
-    mpz_set_ui(z, 0);
-  else
-    i.setstate(ios::failbit); // read failed
-
-  return i;
-}
-
-istream &
-//operator>> (istream &i, mpq_ptr q)
-io_read (istream &i, mpq_ptr q)
-{
-  int base;
-  char c = 0;
-  string s;
-  bool ok = false, zero, showbase;
-
-  i.get(c); // start reading
-
-  if (i.flags() & ios::skipws) // skip initial whitespace
-    while (isspace(c) && i.get(c))
-      ;
-
-  if (c == '-' || c == '+') // sign
-    {
-      if (c == '-')
-	s = "-";
-      i.get(c);
-    }
-
-  while (isspace(c) && i.get(c)) // skip whitespace
-    ;
-
-  base = __gmp_istream_set_base(i, c, zero, showbase); // select the base
-  __gmp_istream_set_digits(s, i, c, ok, base);         // read the numerator
-
-  if (! ok && zero) // the only digit read was "0"
-    {
-      base = 10;
-      s += '0';
-      ok = true;
-    }
-
-  if (i.flags() & ios::skipws)
-    while (isspace(c) && i.get(c)) // skip whitespace
-      ;
-
-  if (c == '/') // there's a denominator
-    {
-      bool zero2 = false;
-      int base2 = base;
-
-      s += '/';
-      ok = false; // denominator is mandatory
-      i.get(c);
-
-      while (isspace(c) && i.get(c)) // skip whitespace
-	;
-
-      if (showbase) // check base of denominator
-	base2 = __gmp_istream_set_base(i, c, zero2, showbase);
-
-      if (base2 == base || base2 == 10) // read the denominator
-	__gmp_istream_set_digits(s, i, c, ok, base);
-
-      if (! ok && zero2) // the only digit read was "0"
-	{                // denominator is 0, but that's your business
-	  s += '0';
-	  ok = true;
-	}
-    }
-
-  if (i.good()) // last character read was non-numeric
-    i.putback(c);
-  else if (i.eof() && ok) // stopped just before eof
-    i.clear();
-
-  if (ok)
-    mpq_set_str(q, s.c_str(), base); // extract the number
-  else
-    i.setstate(ios::failbit); // read failed
-
-  return i;
-}
-
-ostream&
-//operator<< (ostream &o, mpz_srcptr z)
-io_write (ostream &o, mpz_srcptr z)
-{ 
-  char *str = new char [mpz_sizeinbase(z,10) + 2];
-  str = mpz_get_str(str, 10, z);
-  o << str ;
-  delete[] str;
-  return o; 
-}
-
-ostream&
-//operator<< (ostream &o, mpq_srcptr q)
-io_write (ostream &o, mpq_srcptr q)
-{ 
-  // size according to GMP documentation
-  char *str = new char [mpz_sizeinbase(mpq_numref(q), 10) +
-                        mpz_sizeinbase (mpq_denref(q), 10) + 3];
-  str = mpq_get_str(str, 10, q);
-  o << str ;
-  delete[] str;
-  return o;
-}
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/Real.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/Real.cpp
deleted file mode 100644
index 477c02a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/Real.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: Real.cpp
- * Synopsis: The Real class is a superclass for all the number 
- *           systems in the Core Library (int, long, float, double,
- *           BigInt, BigRat, BigFloat, etc)
- *           
- * Written by 
- *       Koji Ouchi <ouchi at simulation.nyu.edu>
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include <ctype.h>
-#include <CGAL/CORE/Real.h>
-
-namespace CORE { 
-
-const Real& Real::getZero() {
-  static Real Zero(0);
-  return Zero;
-}
-
-BigInt floor(const Real& r, Real &sub) {
-  BigInt f = r.approx(CORE_INFTY, 2).BigIntValue();
-  sub = r-f;
-  // Adjustment
-  if (sub<0)
-    ++sub, --f;
-  if (sub>=1)
-    --sub, ++f;
-  assert(sub >=0 && sub<1);
-  return f;
-}
-
-// pow(r,n) and power(r, n) are the same function
-//
-Real pow(const Real& r, unsigned long n) {
-  if (n == 0)
-    return Real(1);
-  else if (n == 1)
-    return r;
-  else {
-    Real x = r;
-    while ((n % 2) == 0) { // n is even
-      x *= x;
-      n >>= 1;
-    }
-    Real u = x;
-    while (true) {
-      n >>= 1;
-      if (n == 0)
-        return u;
-      x *= x;
-      if ((n % 2) == 1) // n is odd
-        u *= x;
-    }
-    //return u; // unreachable
-  }
-}//pow
-
-extern BigInt FiveTo(unsigned long exp);
-
-// Construct Real from String
-// Note:
-// 	-- Zilin Du: 06/03/2003
-// 	-- Original it is the code for Real's constructor for "const char*".
-// 	   I change it to a function so that two constrcutors can share the code.
-// 	   now it is private and no default value.
-//
-//   --Default value of the argument "prec" is defInputDigits
-//   --If prec is CORE_posInfty, then the input is
-//	read in exactly.  Otherwise, we convert to a RealBigFloat
-//	with absolute error at most 10^{-prec}
-
-// Constructor Real( char *str, extLong& prec)
-//	is very similar to
-//		BigFloatRep::fromString( char *str, extLong& prec);
-// Differences:
-//	In BigFloat(str, prec), the value of prec cannot be infinity, and
-//		it defaults to defBigFloatInputDigits;
-//	In Real(str, prec), the value of prec is allowed to be infinity, and
-//		it defaults to defInputDigits.
-//
-// Why do we have the two versions?  It allows us to use the BigFloat class
-//	directly, without relying on Real class.
-
-void Real::constructFromString(const char *str, const extLong& prec )
-// NOTE: prec defaults to defInputDigits (see Real.h)
-{
-  //	8/8/01, Chee and Zilin: add a new rational string format:
-  //		this format is indicated by the presence of a slash "/"
-  //		Moreover, the value of prec is ignored (basically
-  //		assumed to be infinity).
-
-  if (std::strchr(str, '/') != NULL) {	// this is a rational number
-    rep = new RealBigRat(BigRat(str));
-    return;
-  }
-
-  const char *e = std::strchr(str, 'e');
-  int dot = 0;
-  long e10 = 0;
-  if (e != NULL)
-    e10 = std::atol(e+1);	// e10 is decimal precision of the input string
-  // i.e., input is A/10^{e10}.
-  else {
-    e = str + std::strlen(str);
-#ifdef CORE_DEBUG
-    assert(*e == '\0');
-#endif
-  }
-
-  const char *p = str;
-  if (*p == '-' || *p == '+')
-    p++;
-  BigInt m(0);
-
-  for (; p < e; p++) {
-    if (*p == '.') {
-      dot = 1;
-      continue;
-    }
-    m = m * 10 + (*p - '0');
-    if (dot)
-      e10--;
-  }
-
-  long t = (e10 < 0) ? -e10 : e10;
-  BigInt one(1);
-  BigInt ten = FiveTo(t) * (one << static_cast<unsigned long>(t));
-  if (*str == '-')
-    m = -m;
-  if (e10 >= 0) {
-    // convert exactly from integer numbers
-    m *= ten;
-    rep = new RealBigInt(m);
-  } else { // e10 < 0,  fractional numbers
-    // HERE IS WHERE WE USE THE SYSTEM CONSTANT
-    //	       defInputDigits
-    // Note: defInputDigits should be at least log_2(10).
-    //       We default defInputDigits to 4.
-    //std::cout << "(m,ten)=" << m << "," << ten << std::endl;
-    BigRat r(m, ten);
-    if (prec.isInfty()) { // convert exactly! to a big rational
-      rep = new RealBigRat(r);
-    } else {
-      // convert approximately, to a BigFloat within the
-      // specified precision:
-      // BigFloat bf(r, CORE_posInfty, prec * lgTenM) ;
-      BigFloat bf(r, CORE_posInfty, prec * 4) ;
-      rep = new RealBigFloat(bf);
-    }
-  }
-}// Real(str, prec)
-
-// The operator >>(i,x) calls the constructor Real(char*)
-std::istream& operator >>(std::istream& i, Real& x) {
-  int size = 20;
-  char *str = new char[size];
-  char *p = str;
-  char c;
-  int d = 0, e = 0, s = 0;
-  //  int done = 0;
-
-  // Chen Li: fixed a bug, the original statement is
-  //  for (i.get(c); c == ' '; i.get(c));
-  // use isspace instead of testing c == ' ', since it must also
-  // skip tab, catridge/return, etc.
-  // Change to:
-  //  int status;
-  do {
-    i.get(c);
-  } while (!i.eof() && isspace(c)); /* loop if met end-of-file, or
-  			   char read in is white-space. */
-  // Chen Li,
-  // original "if (c == EOF) ..." is unsafe since c is of char type and
-  // EOF is of int tyep with a negative value -1
-
-  if (i.eof()) {
-    i.clear(std::ios::eofbit | std::ios::failbit);
-    delete [] str;
-    return i;
-  }
-
-  // the current content in "c" should be the first non-whitespace char
-  if (c == '-' || c == '+') {
-    *p++ = c;
-    i.get(c);
-  }
-
-  for (; isdigit(c) || (!d && c=='.') ||
-       (!e && c=='e') || (!s && (c=='-' || c=='+')); i.get(c)) {
-    if (!i) break;
-    if (!e && (c == '-' || c == '+'))
-      break;
-    // Chen Li: put one more rule to prohibite input like
-    //  xxxx.xxxe+xxx.xxx:
-    if (e && (c == '.'))
-      break;
-    if (p - str == size) {
-      char *t = str;
-      str = new char[size*2];
-      std::memcpy(str, t, size);
-      delete [] t;
-      p = str + size;
-      size *= 2;
-    }
-#ifdef CORE_DEBUG
-    assert((p-str) < size);
-#endif
-
-    *p++ = c;
-    if (c == '.')
-      d = 1;
-    // Chen Li: fix a bug -- the sign of exponent can not happen before
-    // the character "e" appears! It must follow the "e' actually.
-    //    if (e || c == '-' || c == '+') s = 1;
-    if (e)
-      s = 1;
-    if (c == 'e')
-      e = 1;
-  }
-
-  if (!i && !i.eof()) {
-    delete [] str;
-    return i;
-  }
-  // chenli: make sure that the p is still in the range
-  if (p - str >= size) {
-    int len = p - str;
-    char *t = str;
-    str = new char[len + 1];
-    std::memcpy(str, t, len);
-    delete [] t;
-    p = str + len;
-  }
-
-#ifdef CORE_DEBUG
-  assert(p - str < size);
-#endif
-
-  *p = '\0';
-  i.putback(c);
-  i.clear();
-  // old: x = Real(str, i.precision()); // use precision of input stream.
-  x = Real(str);  // default precision = defInputDigits
-  delete [] str;
-  return i;
-}//operator >> (std::istream&, Real&)
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Core/extLong.cpp b/3rdparty/CGAL-4.6/src/CGAL_Core/extLong.cpp
deleted file mode 100644
index a4fdccb..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Core/extLong.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
- * Core Library Version 1.7, August 2004
- * Copyright (c) 1995-2004 Exact Computation Project
- * All rights reserved.
- *
- * This file is part of CORE (http://cs.nyu.edu/exact/core/).
- * You can redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
- * software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * File: extLong.cpp
- * Synopsis:
- *      The class extLong is basically a wrapper around the machine
- *      type long.  It is an important class to provide several
- *      additional facilities to detect overflows and undefined values.
- *      Future development includes extensions to level arithmetic
- *      (i.e., if a number overflows level i, we will go to level i+1).
- *      Level i representation of a number n is just i iterations
- *      of log_2 applied to n.
- *
- * Written by 
- *       Chee Yap <yap at cs.nyu.edu>
- *       Chen Li <chenli at cs.nyu.edu>
- *       Zilin Du <zilin at cs.nyu.edu>
- *       Sylvain Pion <pion at cs.nyu.edu> 
- *
- * WWW URL: http://cs.nyu.edu/exact/
- * Email: exact at cs.nyu.edu
- *
- * $URL$
- * $Id$
- ***************************************************************************/
-
-#include <CGAL/CORE/extLong.h>
-
-namespace CORE { 
-
-const extLong& extLong::getNaNLong() {
-  static extLong NaNLong(true);
-  return NaNLong;
-}
-
-const extLong& extLong::getPosInfty() {
-  static extLong posInfty(EXTLONG_MAX);
-  return posInfty;
-}
-
-const extLong& extLong::getNegInfty() {
-  static extLong negInfty(EXTLONG_MIN);
-  return negInfty;
-}
-
-void extLong::add(extLong& z, long x, long y) {
-  if (x > 0 && y > 0 && x >= EXTLONG_MAX - y) {
-    z.val = EXTLONG_MAX;
-    z.flag = 1;
-  } else if (x < 0 && y < 0 && x <= EXTLONG_MIN - y) {
-    z.val = EXTLONG_MIN;
-    z.flag = -1;
-  } else {
-    z.val = x + y;
-    z.flag = 0;
-  }
-}
-
-//  arithmetic and assignment operators
-extLong& extLong::operator+= (const extLong& y) {
-  if (flag == 2 || y.flag == 2 || (flag * y.flag < 0)) {
-#ifdef CORE_DEBUG
-    if (flag * y.flag < 0) //want a message at the first creation of NaN
-      core_error("extLong NaN Error in addition.", __FILE__, __LINE__, false);
-#endif
-
-    *this = CORE_NaNLong;
-  } else if (flag == 1 || y.flag == 1) { // one of them is +Inf
-    *this = CORE_posInfty;
-  } else if (flag == -1 || y.flag == -1) { // one of them is -Inf
-    *this = CORE_negInfty;
-  } else { // x and y are normal now
-    add(*this, val, y.val);
-  }
-  return *this;
-}
-
-extLong& extLong::operator-= (const extLong& y) {
-  if (flag == 2 || y.flag == 2 || (flag * y.flag > 0)) {
-#ifdef CORE_DEBUG
-    if (flag * y.flag > 0) //want a message at the first creation of NaN
-      core_error("extLong NaN Error in subtraction.", __FILE__, __LINE__, false);
-#endif
-
-    *this = CORE_NaNLong;
-  } else if (flag == 1 || y.flag == -1) {
-    *this = CORE_posInfty;
-  } else if (flag == -1 || y.flag == 1) {
-    *this = CORE_negInfty;
-  } else {
-    add(*this, val, -y.val);
-  }
-  return *this;
-}
-
-extLong& extLong::operator*= (const extLong& y) {
-  if (flag == 2 || y.flag == 2) {
-    *this = CORE_NaNLong;
-  } else if ((flag != 0) || (y.flag != 0)) {
-    if (sign() * y.sign() > 0)
-      *this = CORE_posInfty;
-    else
-      *this = CORE_negInfty;
-  } else { // flag == 0 and y.flag == 0
-    double d = double(val) * double(y.val);
-    long   p = val * y.val;
-    if (std::fabs(d - p) <= std::fabs(d) * relEps) {
-      val = p;
-      flag = 0;
-    } else if (d > EXTLONG_MAX) {
-      *this = CORE_posInfty;
-    } else if (d < EXTLONG_MIN) {
-      *this = CORE_negInfty;
-    } else {
-#ifdef CORE_DEBUG
-      core_error("extLong NaN Error in multiplication.",__FILE__,__LINE__,false);
-#endif
-      *this = CORE_NaNLong;
-    }
-  }
-  return *this;
-}
-
-extLong& extLong::operator/= (const extLong& y) {
-  if (flag==2 || y.flag==2 || ((flag != 0) && (y.flag != 0)) || (y.val == 0)) {
-#ifdef CORE_DEBUG
-    if (y.val == 0)
-      core_error("extLong NaN Error, Divide by Zero.", __FILE__, __LINE__, false);
-    else if ((flag !=0) && (y.flag !=0))
-      core_error("extLong NaN Error, +/-Inf/Inf.", __FILE__, __LINE__, false);
-#endif
-
-    *this = CORE_NaNLong;
-  } else if ((flag != 0) || (y.flag != 0)) { // y.flag == 0 now and y != 0
-    if (sign() * y.sign() > 0)
-      *this = CORE_posInfty;
-    else
-      *this = CORE_negInfty;
-  } else { // flag == 0 and y.flag == 0
-    val /= y.val; // no overflow in divisions
-    flag = 0;
-  }
-  return *this;
-}
-
-//  unary minus
-extLong extLong::operator- () const {
-  if (flag == 0)
-    return extLong(-val);
-  else if (flag == 1)
-    return CORE_negInfty;
-  else if (flag == -1)
-    return CORE_posInfty;
-  else // NaN
-    return CORE_NaNLong;
-}
-
-// sign
-//    You should check "flag" before calling this, otherwise
-//    you cannot interprete the returned value!
-int extLong::sign() const {
-  if (flag == 2)
-    core_error("NaN Sign can not be determined!", __FILE__, __LINE__, false);
-  return ((val == 0) ? 0 : ((val > 0) ? 1 : -1));
-}
-
-//  stream operators
-std::ostream& operator<< (std::ostream& o, const extLong& x) {
-  if (x.flag == 1)
-    o << " infty ";
-  else if (x.flag == - 1)
-    o << " tiny ";
-  else if (x.flag == 2)
-    o << " NaN ";
-  else
-    o << x.val;
-  return o;
-}
-
-} //namespace CORE
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt
deleted file mode 100644
index c9cce72..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-message("Configuring libCGAL_ImageIO")
-
-find_package( OpenGL )
-find_package( ZLIB )
-
-#option(WITH_VTK "Add VTK support to libCGAL_ImageIO." OFF)
-
-if(WITH_VTK)
-  find_package(VTK QUIET)
-endif(WITH_VTK)
-
-if(OPENGL_FOUND)
-  message( STATUS "OpenGL include:     ${OPENGL_INCLUDE_DIR}" )
-  message( STATUS "OpenGL libraries:   ${OPENGL_LIBRARIES}" )
-  
-  cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} )
-  cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES    ${OPENGL_LIBRARIES}   )
-
-  if(ZLIB_FOUND)
-    get_dependency_version(ZLIB)
-    cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
-    cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES    ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ${ZLIB_LIBRARY} )
-    cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS  "-DCGAL_USE_ZLIB")
-    cache_set(CGAL_ImageIO_USE_ZLIB "ON")
-  endif(ZLIB_FOUND)
-
-  set( CGAL_ImageIO_BASENAME CGAL_ImageIO)
-  
-  if(WITH_VTK)
-    if( VTK_FOUND )
-      
-      message(STATUS "VTK-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION} found. Build VTK support in ${CGAL_ImageIO_BASENAME}.")
-      include( ${VTK_USE_FILE} )
-      cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS  ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} -DCGAL_USE_VTK ${VTK_REQUIRED_CXX_FLAGS})
-      cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} )
-      cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS ${CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS} ${VTK_LIBRARY_DIRS} )
-      cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES    ${CGAL_ImageIO_3RD_PARTY_LIBRARIES}   ${VTK_LIBRARIES}  )
-      
-    else()
-      message(STATUS "VTK not found.")
-    endif()
-  endif()
-  
-  if(COMMAND add_config_flag)
-    set( CGAL_HAS_IMAGEIO TRUE ) 
-    add_config_flag( CGAL_HAS_IMAGEIO )
-  endif()
-
-  use_essential_libs()
-
-  include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} )
-  
-  link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
-
-  collect_cgal_library( CGAL_ImageIO "")
-  
-  add_dependencies( CGAL_ImageIO CGAL )
-  
-  add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
-  
-  target_link_libraries( CGAL_ImageIO ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
-  
-message("libCGAL_ImageIO is configured")
-    
-else(OPENGL_FOUND)
-  message( STATUS "libCGAL_ImageIO needs OpenGL, cannot be configured.")
-endif(OPENGL_FOUND)
-  
-if(NOT ZLIB_FOUND)
-  message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
-endif(NOT ZLIB_FOUND) 
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/ImageIO.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/ImageIO.cpp
deleted file mode 100644
index 9198b14..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/ImageIO.cpp
+++ /dev/null
@@ -1,1586 +0,0 @@
-// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) 
-// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) 
-// All rights reserved.
-//
-// The files in this directory are part of the ImageIO Library.
-// You can redistribute them and/or  modify them under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE.
-//
-// $URL$
-// $Id$
-//
-
-#ifdef _MSC_VER
-// Suppress deprecated warning for fileno and strdup
-#  pragma warning(disable:4996) 
-
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <io.h>
-#include <stdio.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <CGAL/ImageIO.h>
-
-/* formats actuellement lus 
-
-   format     |   extension(s)   |  lecture  | ecriture 
-   INRIMAGE   |  .inr[.gz]       |     X     |     X     -> + .gradient[.gz] + .gradient_direction[.gz]
-   GIS        |  .dim, .ima[.gz] |     X     |     X
-   ANALYZE    |  .hdr, .img[.gz] |     X     |     X
-   PNM        |  .ppm, .pgm      |     X     |     X
-   GIF        |  .gif            |     X     |     
-   BMP        |  .gif            |     X     |     
-*/
-#include "inr.h"
-#include "gif.h"
-#include "gis.h"
-#include "pnm.h"
-#include "bmp.h"
-#include "iris.h"
-#include "analyze.h"
-#ifdef MINC_FILES
-#  include "mincio.h"
-#endif
-
-
-
-/** the first file format is initialized to null */
-static PTRIMAGE_FORMAT firstFormat=NULL;
-
-/** the Inrimage file format (default format) is initialized to null */
-static PTRIMAGE_FORMAT InrimageFormat=NULL;
-
-
-
-
-
-/*--------------------------------------------------
- *
- * mimics standard routines
- *
- --------------------------------------------------*/
-
-
-
-extern "C" {
-  /* default allocation routine */
-  static void *(*allocRoutine)(size_t) = 0;
-  /* default deallocation routine */
-  static void (*deleteRoutine)(void *) = 0;
-}
-
-void *ImageIO_alloc(size_t s) {
-  if(!allocRoutine) allocRoutine = malloc;
-  return ( (*allocRoutine)(s) );
-}
-/* call allocation routine */
-void ImageIO_free(void *m) {
-  if(!deleteRoutine) deleteRoutine = free;
-  (*deleteRoutine)(m);
-}
-/* call deallocation routine */
-
-
-
-/* mimics fwrite() function.
-   According to _openWriteImage(), openMode will has one 
-   of the following value:
-   - OM_STD (for stdout)
-   - OM_GZ 
-   - OM_FILE
-*/
-size_t ImageIO_write(const _image *im, const void *buf, size_t len) {
-
-  switch(im->openMode) {
-  default :
-  case OM_CLOSE :
-    return 0;
-  case OM_STD :
-#ifdef CGAL_USE_ZLIB
-    return gzwrite(im->fd, (void *) buf, len);
-#else 
-    return fwrite(buf, 1, len, im->fd);
-#endif
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ :
-    return gzwrite(im->fd, (void *) buf, len);
-#endif
-  case OM_FILE:
-    return fwrite(buf, 1, len, (FILE*)im->fd);
-  }
-  //return 0;
-}
-
-
-
-/* mimics fread() function.
-   According to _openReadImage(), openMode will has one 
-   of the following value:
-   - OM_STD (for stdin)
-   - OM_GZ *or* OM_FILE
-*/
-size_t ImageIO_read(const _image *im, void *buf, size_t len) 
-{
-  size_t to_be_read = len;
-  int l = -1;
-  char *b = (char*)buf;
-
-  switch(im->openMode) {
-  default :
-  case OM_CLOSE :
-    return 0;
-  case OM_STD :
-#ifdef CGAL_USE_ZLIB
-    while ( (to_be_read > 0) && ((l = gzread(im->fd, (void *) b, to_be_read)) > 0) ) {
-      to_be_read -= l;
-      b += l;
-    }
-#else 
-    while ( (to_be_read > 0) && ((l = fread( b, 1, to_be_read, im->fd )) > 0) ) {
-      to_be_read -= l;
-      b += l;
-    }
-#endif
-    return ( len - to_be_read );
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ :
-    while ( (to_be_read > 0) && ((l = gzread(im->fd, (void *) b, to_be_read)) > 0) ) {
-      to_be_read -= l;
-      b += l;
-    }
-    if(l<0)
-    {
-      int errnum;
-      fprintf(stderr, "zlib error: %s\n", gzerror(im->fd, &errnum));
-    }
-    return ( len - to_be_read );
-#else
-  case OM_FILE :
-    while ( (to_be_read > 0) && ((l = fread( b, 1, to_be_read, im->fd )) > 0) ) {
-      to_be_read -= l;
-      b += l;
-    }
-    return ( len - to_be_read );
-#endif
-  }
-
-  //return 0;
-}
-
-
-
-/* mimics fgets() function.
-   According to _openReadImage(), openMode will has one 
-   of the following value:
-   - OM_STD (for stdout)
-   - OM_GZ *or* OM_FILE
-*/
-char *ImageIO_gets( const _image *im, char *str, int size )
-{
-  char *ret = NULL;
-  switch(im->openMode) {
-  default :
-  case OM_CLOSE :
-    return NULL;
-  case OM_STD :
-#ifdef CGAL_USE_ZLIB
-    ret = (char *) gzgets(im->fd, str, size );
-#else
-    ret = fgets(str, size, im->fd);
-#endif
-    break;
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ :
-    ret = (char *) gzgets(im->fd, str, size);
-    break;
-#else
-  case OM_FILE :
-    ret = fgets(str, size, im->fd);
-    break;
-#endif
-  }
-  return ret;
-}
-
-
-
-int ImageIO_seek( const _image *im, long offset, int whence ) {
-  switch(im->openMode) {
-  case OM_CLOSE :
-  default :
-    return -1;
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ:
-    return gzseek(im->fd, offset, whence );
-#endif
-  case OM_FILE:
-    return fseek( (FILE*)im->fd, offset, whence );
-  }
-}
-
-/* return non 0 in case of error
- */
-int ImageIO_error( const _image *im )
-{
-  switch(im->openMode) {
-  case OM_CLOSE :
-  default :
-    return 0;
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ :
-    static int errnum;
-    (void)gzerror(im->fd, &errnum);
-    return( (errnum != Z_OK) || gzeof(im->fd) );
-#endif
-  case OM_FILE :
-    return( ferror( (FILE*)im->fd ) || feof( (FILE*)im->fd ) );
-  }
-  //return 0;
-}
-
-
-
-/* Upon successful completion 0 is returned.
-   
-   Closing the standard output with gzclose()
-   is necessary as it will flush the pending output.
- */
-int ImageIO_close( _image* im )
-{
-  int ret=0;
-  
-  switch ( im->openMode ) {
-  default :
-  case OM_CLOSE :
-    break;
-#ifdef CGAL_USE_ZLIB
-  case OM_GZ :
-  case OM_STD :
-    ret = gzclose( im->fd );
-    break;
-#else 
-  case OM_STD :
-    break;
-#endif
-  case OM_FILE :
-    ret = fclose( (FILE*)im->fd );
-  }
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-  
-  return ret;
-}
-
-
-
-
-
-
-
-/* given an initialized file descriptor and a file name, 
-   open file from stdin (if name == NULL, or name == "-", or name == "<"), 
-   or a standard/gzipped file otherwise (gzipped files are handled assuming
-   that it is compiled and linked with zlib). 
-   openMode will have one of the following value:
-   - OM_STD (for stdin)
-   - OM_GZ *or* OM_FILE
-*/
-void _openReadImage(_image* im, const char *name) {
-  if(im->openMode == OM_CLOSE) {
-
-    /* open from stdin */
-    if( name == NULL || name[0] == '\0' 
-	|| (name[0] == '-' && name[1] == '\0') 
-	|| (name[0] == '<' && name[1] == '\0') ) {
-#ifdef CGAL_USE_ZLIB      
-      im->fd = gzdopen(fileno(stdin), "rb");
-#else
-      im->fd = fdopen(fileno(stdin), "rb");
-#endif
-      im->openMode = OM_STD;
-    }
-
-    else {
-#ifdef CGAL_USE_ZLIB     
-      im->fd = gzopen(name, "rb");
-      if(im->fd) im->openMode = OM_GZ;
-#else
-      im->fd = fopen(name, "rb");
-      if(im->fd) im->openMode = OM_FILE;
-#endif
-
-    }
-
-  }
-}
-
-
-
-
-
-/* given an initialized file descriptor and a file name, 
-   open file from stdout (if name == NULL, or name == "-", or name == ">"), 
-   a gzipped pipe (if name got the extension ".gz")
-   or a standard file otherwise.
-   openMode will have one of the following value:
-   - OM_STD (for stdout)
-   - OM_GZ 
-   - OM_FILE
-*/
-void _openWriteImage(_image* im, const char *name) 
-{
-  im->openMode = OM_CLOSE;
-
-  if( name == NULL || name[0] == '\0' 
-      || (name[0] == '-' && name[1] == '\0') 
-      || (name[0] == '>' && name[1] == '\0') ) {
-
-#ifdef CGAL_USE_ZLIB
-#if (defined _LINUX_) || (defined _SOLARIS_) || (defined _SGI_)
-    im->fd = gzdopen(1, "wb");
-#else
-    im->fd = gzdopen(fileno(stdout), "wb");
-#endif
-#else    
-    im->fd = (_ImageIO_file) stdout;
-#endif
-    im->openMode = OM_STD;
-  }
-
-  else{
-#ifdef CGAL_USE_ZLIB      
-    
-    /* from gzopen() doc:
-       ... The mode parameter is as in fopen ("rb" or "wb") but can
-       also include a compression level ("wb9") or a strategy: 'f' for
-       filtered data as in "wb6f", 'h' for Huffman only compression as
-       in "wb1h" ...
-       However, a small .gz header will be written ... thus gz(d)open can not
-       be used for rgular files.
-    */
-    
-    if( !strncmp(name+strlen(name)-3, ".gz", 3) )
-      {
-#ifdef _MSC_VER
-	int ffd=_open(name,_O_RDWR | _O_CREAT| _O_TRUNC | _O_BINARY, _S_IREAD|_S_IWRITE);
-	im->fd = gzdopen( ffd, "wb" );
-#else
-	im->fd = gzopen( name, "wb" );
-#endif
-	im->openMode = OM_GZ;
-      }
-    else 
-#endif
-    {
-      im->fd = (_ImageIO_file) fopen(name, "wb");
-      im->openMode = OM_FILE;
-    }
-  }
-}
-
-
-
-/* set allocation and deallocation routines */
-void setImageIOAllocationRoutines(ALLOCATION_FUNCTION alloc,
-				  DEALLOCATION_FUNCTION del) {
-  if(alloc != NULL) allocRoutine = alloc;
-  if(del != NULL) deleteRoutine = del;
-}
-
-
-
-
-
-/*--------------------------------------------------
- *
- *
- *
- --------------------------------------------------*/
-
-
-
-
-
-ENDIANNESS _getEndianness()
-{
-  union {
-    unsigned char uc[2];
-    unsigned short us;
-  } twobytes;
-  twobytes.us = 255;
-  /* on linux or dec
-   */
-  if ( twobytes.uc[1] == 0 ) return( END_LITTLE );
-  /* on solaris or sgi
-   */
-  return( END_BIG );
-}
-
-
-
-
-
-
-
-/* Allocates and initializes an image descriptor */
-_image *_initImage() {
-  _image *im;
-
-  im = (_image *) ImageIO_alloc(sizeof(_image));
-  if ( im == NULL ) return( im );
-
-  /* default image size is 1*1*1 */
-  im->xdim = im->ydim = im->zdim = im->vdim = 1;
-  /* default image voxel size is 1.0*1.0*1.0 */
-  im->vx = im->vy = im->vz = 1.0;
-
-  /* default image center  is 0 0 0 */
-  im->cx = im->cy = im->cz = 0;
-
-  /* default image offset  is 0 0 0 */
-  im->tx = im->ty = im->tz = 0.0;
-
-  /* default image rotation  is 0 0 0 */
-  im->rx = im->ry = im->rz = 0.0;
-
-  /* no data yet */
-  im->data = NULL;
-
-  /* no file associated to image */
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-  im->endianness = END_UNKNOWN;
-
-  /* unknown data kind
-     default is binary
-   */
-  im->dataMode = DM_BINARY;
-
-  /* no user string */
-  im->user = NULL;
-  im->nuser = 0;
-
-  /* unknown word kind */
-  im->wdim = 0;
-  im->wordKind = WK_UNKNOWN;
-  im->vectMode = VM_SCALAR;
-  im->sign = SGN_UNKNOWN;
-  im->imageFormat = NULL;
-
-  /** eventually initializes the supported file formats */
-  if (firstFormat==NULL)
-    initSupportedFileFormat();
-  /* return image descriptor */
-  return im;
-}
-
-_image *_createImage(int x, int y, int z, int v,
-		     float vx, float vy, float vz, int w,
-		     WORD_KIND wk, SIGN sgn)
-{
-  _image *im;
-  
-  im = (_image *) ImageIO_alloc(sizeof(_image));
-  if ( im == NULL ) return( im );
-  
-  im->xdim = x;
-  im->ydim = y;
-  im->zdim = z;
-  im->vdim = v;
-  im->vx = vx;
-  im->vy = vy;
-  im->vz = vz;
-
-  /* default image center  is 0 0 0 */
-  im->cx = im->cy = im->cz = 0;
-
-  /* default image offset  is 0 0 0 */
-  im->tx = im->ty = im->tz = 0.0;
-
-  /* default image rotation  is 0 0 0 */
-  im->rx = im->ry = im->rz = 0.0;
-
-  /* no data yet */
-  im->data = ImageIO_alloc(x*y*z*v*w);
-
-  /* no file associated to image */
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-  im->endianness = END_UNKNOWN;
-
-  /* unknown data kind
-     default is binary
-   */
-  im->dataMode = DM_BINARY;
-
-  /* no user string */
-  im->user = NULL;
-  im->nuser = 0;
-
-  /* unknown word kind */
-  im->wdim = w;
-  im->wordKind = wk;
-  im->vectMode = VM_SCALAR;
-  im->sign = sgn;
-  im->imageFormat = NULL;
-
-  /** eventually initializes the supported file formats */
-  if (firstFormat==NULL)
-    initSupportedFileFormat();
-  /* return image descriptor */
-  return im;
-}
-
-/* return the bounding box of the image */
-void _get_image_bounding_box(_image* im,
-			     double* x_min, double* y_min, double* z_min,
-			     double* x_max, double* y_max, double* z_max) {
-  *x_min = im->tx;
-  *y_min = im->ty;
-  *z_min = im->tz;
-  *x_max = (im->xdim - 1.0f)*(im->vx) + *x_min ;
-  *y_max = (im->ydim - 1.0f)*(im->vy) + *y_min ;
-  *z_max = (im->zdim - 1.0f)*(im->vz) + *z_min ;
-}
-
-/* Free an image descriptor */
-void _freeImage(_image *im) {
-  unsigned int i;
-
-  if ( im == NULL ) return;
-
-  /* close image if opened */
-  if(im->openMode != OM_CLOSE) ImageIO_close(im);
-
-  /* free data if any */
-  if(im->data != NULL) ImageIO_free(im->data);
-  im->data = NULL;
-
-  /* free user string array if any */
-  if( (im->nuser > 0) && (im->user != NULL) ) {
-    for(i = 0; i < im->nuser; i++)
-      if ( im->user[i] != NULL ) ImageIO_free(im->user[i]);
-    ImageIO_free(im->user);
-  }
-  im->nuser = 0;
-  im->user = NULL;
-
-  /* free given descriptor */
-  ImageIO_free(im);
-}
-
-
-
-
-
-/* Reads an image from a file and returns an image descriptor or NULL if
-   reading failed.
-   Reads from stdin if image name is NULL. */
-_image* _readImage(const char *name) {
-  _image *im;
-
-
-  /* read header */
-  im = _readImageHeader( name );
-
-  if(im != NULL && im->openMode != OM_CLOSE) {
-    /* read body */
-    if(_readImageData(im) < 0) {
-      fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
-	      name);
-      _freeImage(im);
-      return NULL;
-    }
-    ImageIO_close(im);
-  }
-
-  return im;
-}
-
-// raw
-_image* _readImage_raw(const char *name,
-                       const unsigned int rx,
-                       const unsigned int ry,
-                       const unsigned int rz,
-                       const double vx,
-                       const double vy,
-                       const double vz,
-		       const unsigned int offset)
-{
-  _image *im = NULL;
-  im = (_image *) ImageIO_alloc(sizeof(_image));
-  if ( im == NULL )
-    return NULL;
-
-  im->xdim = rx;
-  im->ydim = ry;
-  im->zdim = rz;
-  im->vdim = 1;
-  im->vx = vx;
-  im->vy = vy;
-  im->vz = vz;
-
-  // image center
-  im->cx = im->cy = im->cz = 0;
-
-  // image offset
-  im->tx = im->ty = im->tz = 0.0;
-
-  // image rotation
-  im->rx = im->ry = im->rz = 0.0;
-
-
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-  im->endianness = END_UNKNOWN;
-
-  im->dataMode = DM_BINARY;
-
-  // no user string
-  im->user = NULL;
-  im->nuser = 0;
-
-  // word type (unsigned byte)
-  im->wdim = 1;
-  im->wordKind = WK_FIXED;
-  im->vectMode = VM_SCALAR;
-  im->sign = SGN_UNSIGNED;
-  im->imageFormat = NULL;
-
-  // read file
-  ::_openReadImage(im, name);
-  if(!im->fd) {
-    fprintf(stderr, "_readImage_raw: error: unable to open file \'%s\'\n", name);
-    _freeImage(im);
-    return NULL;
-  }
-
-  // read offset
-  if(offset > 0) {
-    im->data = ImageIO_alloc(offset+1);
-    ImageIO_read(im, im->data, offset);
-    ImageIO_free(im->data);
-  }
-  // allocate memory
-  im->data = ImageIO_alloc(rx*ry*rz);
-  if(im->data == NULL)
-    return NULL;
-
-  // read
-  ImageIO_read(im, im->data, rx*ry*rz);
-
-  ImageIO_close(im);
-  /*
-    unsigned int i,j,k;
-    unsigned char *data = (unsigned char *)im->data;
-    int dimxy = rx * ry;
-    for(i=0;i<rx;i++)
-    for(j=0;j<ry;j++)
-    for(k=0;k<rz;k++)
-    {
-    unsigned char voxel;
-    fread(&voxel,1,1,pFile);
-    data[k * dimxy + j * rx + i] = voxel;
-    }
-  */
-
-  return im;
-}
-
-/* Reads an image from a file and returns an image descriptor or NULL if<br>
-   reading failed.<br>
-   Reads from stdin if image name is NULL.
-   If the image is vectorial, it is uninterlaced. */
-_image* _readNonInterlacedImage(const char *name) {
-  _image *im;
-
-  /* read header */
-  im = _readImageHeader(name);
-
-  if(im && im->openMode != OM_CLOSE) {
-    /* read scalar image body */
-    if(im->vdim == 1) {
-      if(_readImageData(im) < 0) {
-	fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
-		name);
-	_freeImage(im);
-	return NULL;
-      }
-    }
-    /* read vectorial image body */
-    else {
-      im->vectMode = VM_NON_INTERLACED;
-      if(_readNonInterlacedImageData(im) < 0) {
-	fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
-		name);
-	_freeImage(im);
-	return NULL;
-      }
-    }
-    ImageIO_close(im);
-   }
-
-  return im;
-}
-
-
-
-
-
-
-
-
-
-
-
-/* Write inrimage given in inr in file name. If file name's suffix is
-   .gz, the image is gziped. If file name's suffix is .hdr, the image
-   is written in ANALYZE format. If file name is NULL, image is written
-   on stdout */
-int _writeImage(_image *im, const char *name_to_be_written ) {
-
-  int r = ImageIO_NO_ERROR;
-  int length = 0;
-  char *name = NULL;
-  char *baseName = NULL;
-
-  if ( im == NULL ) return -1;
-
-  /* different conventions for the standard input
-   */
-  if ( name_to_be_written == NULL || name_to_be_written[0] == '\0' 
-       || (name_to_be_written[0] == '-' && name_to_be_written[1] == '\0') 
-       || (name_to_be_written[0] == '>' && name_to_be_written[1] == '\0') ) {
-    name = NULL;
-  }
-  else {
-    name = strdup( name_to_be_written );
-  }
-
-  initSupportedFileFormat();
-
-  /* what is the wanted format
-   */
-  if ( name == NULL ) {
-    im->imageFormat = InrimageFormat;
-  } else {
-    int i,extLength;
-    PTRIMAGE_FORMAT f;
-    char ext[IMAGE_FORMAT_NAME_LENGTH];
-    char *ptr;
-    
-    
-    /* scan all formats; */
-    im->imageFormat=NULL;
-    length=strlen(name);
-
-    for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
-      /* scan all extensions for that format */
-      ptr=&f->fileExtension[0];
-
-      do {
-	/* get next file extension */
-	i=0;
-	for(i=0;((*ptr)!=',' && (*ptr)!='\0');i++,ptr++) {
-	  ext[i]=(*ptr);
-	}
-	if ((*ptr)==',') {
-	  ext[i]='\0';
-	  ptr++;
-	}
-	else {
-	  ext[i]='\0';
-	}
-	extLength=strlen(ext);
-
-	/* test if the tail of name matches the extension */
-	if ( (length > extLength) && (!strcmp( name + length - extLength, ext)) ) {
-	  im->imageFormat=f;
-	  /* copy original name and removes extension */
-	  baseName=strdup(name);
-	  for(i= length - extLength;i<length;++i)
-	    baseName[i]='\0';
-	}
-
-      } while (((*ptr)!='\0') && (im->imageFormat==NULL));
-    }
-
-    if (!im->imageFormat) { 
-      fprintf(stderr, "_writeImage: warning : unknown extension in %s = assuming Inrimage\n",name);
-      im->imageFormat=InrimageFormat;
-      baseName=strdup(name);
-    }
-  }
-
-
-  /* open file descriptor */
-  /* _openWriteImage( im, name ) ; 
-  
-  
-
-  if(!im->fd) {
-     fprintf(stderr, "_writeImage: error: open failed\n");
-     if ( name != NULL ) free( name );
-     if ( baseName != NULL ) free( baseName );
-     return ImageIO_OPENING;
-  }
-  */
-
-  if (im->imageFormat) {
-
-    if (im->imageFormat->writeImage==NULL) {
-      im->imageFormat=InrimageFormat;
-    }
-
-    if ( 0 ) {
-      fprintf(stderr, "_writeImage: will write '%s' with '%s' format\n",
-	      name, im->imageFormat->realName );
-    }
-
-    if ((*im->imageFormat->writeImage)(name, im)<0) {
-      fprintf(stderr, "_writeImage: error: unable to write \'%s\'\n",
-	      name);
-      r = ImageIO_WRITING_HEADER;
-    } 
-    
-  }
-  
-
-
-  /* close file descriptor */
-  ImageIO_close( im );
-
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-
-  if ( baseName != NULL ) free( baseName );
-  if ( name != NULL ) free( name );
- 
-  return r;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-/* read header from an image file 
-   
-   if standard input, it's an inrimage
-   if not, get a magic string
-   and try to find the good format
-
-   if data are in a separate file,
-   the header reading procedure will open
-   the data file.
-
-   error:
-   0  success
-   -1 unknown image type
-   -2 error while opening
-   -3 error while reading header
-   -4 error while reading header or data
- */
-_image *_readImageHeader( const char *name ) {
-  int error = 0;
-  return( _readImageHeaderAndGetError( name, &error ) );
-}
-
-
-
-_image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
-{
-  _image *im;
-  char magic[5];
-  char *name = NULL;
-  PTRIMAGE_FORMAT f;
-  int res;
-
-  *error = ImageIO_NO_ERROR;
-  
-  /* open image file */
-  im = _initImage();
-  if ( name_to_be_read == NULL || name_to_be_read[0] == '\0' 
-       || (name_to_be_read[0] == '-' && name_to_be_read[1] == '\0') 
-       || (name_to_be_read[0] == '<' && name_to_be_read[1] == '\0') ) {
-    name = NULL;
-  }
-  else {
-    name = strdup( name_to_be_read );
-  }
-
-
-  _openReadImage(im, name);	
-
-  if(!im->fd) {
-    fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name);
-    _freeImage(im);
-    *error = ImageIO_OPENING;
-    if ( name != NULL ) free( name );
-    return NULL;
-  }
-
-  initSupportedFileFormat();
-  
-  /* what is the wanted format ?
-     assume that stdin is inrimage
-   */
-  if(im->openMode == OM_STD) {
-    im->imageFormat=InrimageFormat;
-  }
-  else {
-   /* get magic string for disk files
-    */
-    ImageIO_read(im, magic, 4);
-    magic[4] = '\0';
-    ImageIO_seek(im, 0L, SEEK_SET);
-    /** test each format */
-    for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
-      /* test if it is the correct format based on magic and file extension */
-      if (((*f->testImageFormat)(magic, name)) >=0) {
-	im->imageFormat=f;
-      }
-    }
-  }
-
-  if ( im->imageFormat == NULL ) {
-    fprintf(stderr, "_readImageHeaderAndGetError: does not find image format for \'%s\'\n", name);
-    ImageIO_close( im );
-    _freeImage(im);
-    *error = ImageIO_UNKNOWN_TYPE;
-    if ( name != NULL ) free( name );
-    return NULL;
-  }
-
-  /* now tests if the header can be read correctly */
-	
-  res=(*(im->imageFormat)->readImageHeader)(name,im);
-  /* could read header only */ 
-  if (res == 0) {
-    if ( name != NULL ) free( name );
-    return( im );
-  } 
-  /* could read header and data */
-  else if ( res > 0 ) {
-    ImageIO_close(im);
-    if ( name != NULL ) free( name );
-    return im;
-  }  
-
-  /* could not read error : throw error */
-  fprintf(stderr, "_readImageHeaderAndGetError: an error occurs when reading image\n" );
-  if ( name == NULL || im->openMode == OM_STD) {
-    fprintf(stderr, "\t from \'standard input\'" );
-  }
-  else {
-    fprintf(stderr, "\t from file \'%s\'", name );
-  }
-  fprintf(stderr, " using format \'%s\'\n", (im->imageFormat)->realName );
-  ImageIO_close( im );
-  _freeImage(im);
-  *error = ImageIO_READING_HEADER;
-  if ( name != NULL ) free( name );
-  return NULL;
-
-}
-
-
-
-
-
-
-
-static void _swapImageData( _image *im ) 
-{
-  unsigned char *ptr1, *ptr2, b[8];
-  unsigned short int si, *ptr3, *ptr4;
-  unsigned int        i, *ptr5, *ptr6;
-  int size, length;
-  
-  if( _getEndianness() != im->endianness) {
-
-    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-    if ( size <= 0 ) return;
-
-    length = size / im->wdim;
-    ptr1 = ptr2 = (unsigned char *) im->data;
-    
-    /* 2 bytes swap */
-    if(im->wdim == 2) {
-      /*
-	while(length--) {
-	b[0] = *ptr1++;
-	b[1] = *ptr1++;
-	*ptr2++ = b[1];
-	*ptr2++ = b[0];
-	}
-      */
-      ptr3 = ptr4 = (unsigned short int *) im->data;
-      while( length-- ) {
-	si = *ptr3++;
-	*ptr4++ = ((si >> 8) & 0xff) | (si << 8);
-      }
-    }
-    
-    /* 4 bytes swap */
-    else if(im->wdim == 4) {
-      /*
-	while(length--) {
-	b[0] = *ptr1++;
-	b[1] = *ptr1++;
-	b[2] = *ptr1++;
-	b[3] = *ptr1++;
-	*ptr2++ = b[3];
-	*ptr2++ = b[2];
-	*ptr2++ = b[1];
-	*ptr2++ = b[0];
-	}
-      */
-      ptr5 = ptr6 = (unsigned int *) im->data;
-      while( length-- ) {
-	i = *ptr5++;
-	*ptr6++ =  (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | ((i >> 24) & 0xff);
-      }
-    }
-    /* 8 bytes swap */
-    else if(im->wdim == 8) {
-      while(length--) {
-	b[0] = *ptr1++;
-	b[1] = *ptr1++;
-	b[2] = *ptr1++;
-	b[3] = *ptr1++;
-	b[4] = *ptr1++;
-	b[5] = *ptr1++;
-	b[6] = *ptr1++;
-	b[7] = *ptr1++;
-	*ptr2++ = b[7];
-	*ptr2++ = b[6];
-	*ptr2++ = b[5];
-	*ptr2++ = b[4];
-	*ptr2++ = b[3];
-	*ptr2++ = b[2];
-	*ptr2++ = b[1];
-	*ptr2++ = b[0];
-      }
-    }
-  }
-}
-
-
-
-
-
-
-/* Read data of an inrimage.
-   If im->data is not NULL, assume that the buffer was previously allocated
-   Swap bytes depending on the endianness and the current architecture  */
-int _readImageData(_image *im) {
-  unsigned long size, nread;
-
-  if(im->openMode != OM_CLOSE) {
-    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-    
-    if ( size <= 0 ) return -3;
-
-    if(!im->data) {
-      im->data = (unsigned char *) ImageIO_alloc(size);
-      if(!im->data) return -2;
-    }
-
-    nread = ImageIO_read(im, im->data, size);
-    if(nread != size) return -1;
-
-
-    /* architecture is big endian and data little endian 
-       length = nb of points
-     */
-    _swapImageData( im );
-
-
-  }
-
-  return 1;
-}
-
-
-
-
-
-/* Read data of a vectorial inrimage, making the resulting buffer non-
-   inerlaced.
-   If im->data is not NULL, assume that the buffer was previously allocated
-   Swap bytes depending on the endianness and the current architecture. */
-int _readNonInterlacedImageData(_image *im) {
-  unsigned long size, nread;
-  unsigned char **vp, *buf;
-  unsigned int i, j, k, v, w;
-
-  if(im->vdim == 1) return _readImageData(im);
-  
-  if(im->openMode != OM_CLOSE) {
-    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-
-    if ( size <= 0 ) return -3;
-
-    if(!im->data) {
-      im->data = (unsigned char *) ImageIO_alloc(size);
-      if(!im->data) return -2;
-    }
-
-    vp = (unsigned char **) ImageIO_alloc(im->vdim * sizeof(unsigned char *));
-    buf = (unsigned char *) ImageIO_alloc(im->vdim * im->wdim);
-    size = im->xdim * im->ydim * im->zdim * im->wdim;
-    for(v = 0; v < im->vdim; v++)
-      vp[v] = (unsigned char *) im->data + v * size;
-
-    for(k = 0; k < im->zdim; k++) {
-      for(j = 0; j < im->ydim; j++) {
-	for(i = 0; i < im->xdim; i++) {
-	  nread = ImageIO_read(im, buf, im->vdim * im->wdim);
-	  if(nread != im->vdim * im->wdim) return -1;
-	  for(v = 0; v < im->vdim; v++)
-	    for(w = 0; w < im->wdim; w++)
-	      *vp[v]++ = *buf++;
-	  buf -= im->vdim * im->wdim;
-	}
-      }
-    }
-
-    ImageIO_free(buf);
-    ImageIO_free(vp);
-
-    /* architecture is big endian and data little endian */
-    _swapImageData( im );
-
-    
-    /* reorder lines */
-    /* no non-interlaced data for ANALYZE. But if ever... */
-/*     if( im->imageFormat == IF_ANALYZE ) { */
-/*        int v ; */
-/*        int vdim = im->vdim ; */
-/*        int lineSize = im->wdim * im->xdim ; */
-/*        int vsize = lineSize * im->ydim * im->zdim ; */
-/*        char* swapped = ImageIO_alloc(lineSize) ; */
-/*        for( v = 0 ; v < vdim ; ++v ) */
-/*        { */
-/* 	  char* buf1 = (char*)im->data + v*vsize ; */
-/* 	  char* buf2 = buf1 + vsize - lineSize ; */
-	  
-/* 	  while( buf1 < buf2 ) */
-/* 	  { */
-/* 	     memcpy( swapped, buf1, lineSize ) ; */
-/* 	     memcpy( buf1, buf2, lineSize ) ; */
-/* 	     memcpy( buf2, swapped, lineSize ) ; */
-/* 	     buf1 += lineSize ; */
-/* 	     buf2 -= lineSize ; */
-/* 	  } */
-
-/* 	  ImageIO_free( swapped ) ; */
-/*        } */
-/*     } */
-  }
-
-  return 1;
-}
-
-
-/* Reads body from a non-interlaced vectorial inrimage whose header has
-   been read by _readImageHeader. The image buffer is interlaced. */
-int _readNonInterlacedFileData(_image *im) {
-  unsigned long size, nread;
-  unsigned char *ptr1, *vp, *buf;
-  unsigned int i, j, k, v, w;
-
-  if(im->vdim == 1) return _readImageData(im);
-
-  if(im->openMode != OM_CLOSE) {
-    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-
-    if ( size <= 0 ) return -3;
-
-    if(!im->data) {
-      im->data = (unsigned char *) ImageIO_alloc(size);
-      if(!im->data) return -2;
-    }
-
-    size = im->xdim * im->ydim * im->zdim * im->wdim;
-    buf = ptr1 = (unsigned char *) ImageIO_alloc(size);
-
-    for(v = 0; v < im->vdim; v++) {
-      buf = ptr1;
-      nread = ImageIO_read(im, buf, size);
-      if(nread != size) return -1;
-      vp = (unsigned char *) im->data + (v * im->wdim);
-      for(k = 0; k < im->zdim; k++) {
-	for(j = 0; j < im->ydim; j++) {
-	  for(i = 0; i < im->xdim; i++) {
-	    for(w = 0; w < im->wdim; w++) *vp++ = *buf++;
-	    vp += (im->vdim - 1) * im->wdim;
-	  }
-	}
-      }
-    }
-
-    ImageIO_free(buf);
-
-    /* architecture is big endian and data little endian */
-    _swapImageData( im );
-    
-    
-    /* reorder lines */
-    /* no non-interlaced data for ANALYZE. But if ever... */
-/*     if( im->imageFormat == IF_ANALYZE ) { */
-/*        int v ; */
-/*        int vdim = im->vdim ; */
-/*        int lineSize = im->wdim * im->xdim ; */
-/*        int vsize = lineSize * im->ydim * im->zdim ; */
-/*        char* swapped = ImageIO_alloc(lineSize) ; */
-/*        for( v = 0 ; v < vdim ; ++v ) */
-/*        { */
-/* 	  char* buf1 = (char*)im->data + v*vsize ; */
-/* 	  char* buf2 = buf1 + vsize - lineSize ; */
-	  
-/* 	  while( buf1 < buf2 ) */
-/* 	  { */
-/* 	     memcpy( swapped, buf1, lineSize ) ; */
-/* 	     memcpy( buf1, buf2, lineSize ) ; */
-/* 	     memcpy( buf2, swapped, lineSize ) ; */
-/* 	     buf1 += lineSize ; */
-/* 	     buf2 -= lineSize ; */
-/* 	  } */
-
-/* 	  ImageIO_free( swapped ) ; */
-/*        } */
-/*     } */
-  }
-
-  return 1;  
-}
-
-
-
-
-
-
-
-
-
-
-/*--------------------------------------------------
- *
- * ?????
- *
- --------------------------------------------------*/
-
-
-
-
-
-/* check the type of image in fileName */
-PTRIMAGE_FORMAT imageType(const char *fileName) {
-  _ImageIO_file f;
-  char magic[5];
-  PTRIMAGE_FORMAT format;
-
-  if(!fileName) {
-#ifdef CGAL_USE_ZLIB    
-    f = gzdopen(fileno(stdin), "rb");
-#else
-    f = fdopen(fileno(stdin), "rb");
-#endif
-  }
-  else {
-#ifdef CGAL_USE_ZLIB      
-    f = gzopen(fileName, "rb");
-#else
-    f = fopen(fileName, "rb");
-#endif
-  }
-
-  if(!f) return NULL;
-  
-#ifdef CGAL_USE_ZLIB
-  gzread( f, (void *) magic, 4);
-#else
-  fread( (void *) magic, 1, 4, f );
-#endif
-
-
-  magic[4] = '\0';
-
-#ifdef CGAL_USE_ZLIB 
-  gzclose( f );
-#else
-  if(fileName) fclose( f );
-#endif
-
-  if (firstFormat==NULL)
-    initSupportedFileFormat();
-
-  for(format=firstFormat;(format!=NULL);format=format->next) {
-    /* test if it is the correct header based on magic and file extension */
-    if (((*format->testImageFormat)(magic,fileName)) >=0) {
-      return format;
-    }
-  }
-  return 0;
-
-}
-
-
-
-
-
-/*--------------------------------------------------
- *
- * Image Format Management
- *
- --------------------------------------------------*/
-
-
-
-
-
-/** adds a format at the beginning of the list of image formats. 
-    Test if all mandatory fields have been filled */
-int addImageFormat( PTRIMAGE_FORMAT format) 
-{
-  if ( (format->testImageFormat) &&
-       (format->readImageHeader) &&
-       (strlen(format->fileExtension)>0) &&
-       (strlen(format->realName)>0) ) {
-
-    format->next=firstFormat;
-    firstFormat=format;
-    
-    return 0;
-
-  } 
-  else {
-    fprintf(stderr,"addImageFormat: information missing in file format %s\n",
-	    format->realName);
-    return -1;
-  }
-}
-
-/** adds a format at the end of the list of image formats. 
-    Test if all mandatory fields have been filled */
-int addImageFormatAtEnd( PTRIMAGE_FORMAT format) 
-{
-  PTRIMAGE_FORMAT f;
-  if ( (format->testImageFormat) &&
-       (format->readImageHeader) &&
-       (strlen(format->fileExtension)>0) &&
-       (strlen(format->realName)>0) ) {
-
-    format->next = NULL;
-    
-    if (firstFormat == NULL) {
-      firstFormat=format;
-    }
-    else {
-      for(f=firstFormat;(f->next!=NULL);f=f->next)
-	;
-      f->next=format;    
-    }
-    
-    return 0;
-
-  } 
-  else {
-    fprintf(stderr,"addImageFormatAtEnd: information missing in file format %s\n",
-	    format->realName);
-    return -1;
-  }
-}
-
-
-/** creates supported image formats */
-void initSupportedFileFormat() 
-{
-  PTRIMAGE_FORMAT f;
-  if ( InrimageFormat == NULL ) {
-    f = createAnalyzeFormat();
-    addImageFormatAtEnd( f );
-    f = createBMPFormat();
-    addImageFormatAtEnd( f );
-    f = createGifFormat();
-    addImageFormatAtEnd( f );
-    f = createGisFormat();
-    addImageFormatAtEnd( f );
-    f = createIrisFormat();
-    addImageFormatAtEnd( f );
-    f = createPgmFormat();
-    addImageFormatAtEnd( f );
-    f = createPgmAscIIFormat();
-    addImageFormatAtEnd( f );
-    f = createPpmFormat();
-    addImageFormatAtEnd( f );
-    InrimageFormat = createInrimageFormat();
-    addImageFormat( InrimageFormat );
-  }
-}
-
-
-
-PTRIMAGE_FORMAT firstImageFormat() {
-  return firstFormat;
-}
-
-
-
-/** prints supported image formats */
-void printSupportedFileFormat() {    
-  PTRIMAGE_FORMAT f;
-  int i;
-
-  initSupportedFileFormat();
-
-  for(i=0, f=firstFormat;(f!=NULL);i++, f=f->next) {
-    if ( (f->testImageFormat) &&
-	 (f->readImageHeader) &&
-	 (strlen(f->fileExtension)>0) &&
-	 (strlen(f->realName)>0)) {
-      fprintf( stderr, "#%2d: format name ='%s', extensions='%s'",
-	      i, f->realName, f->fileExtension );
-      if (f->readImageHeader) 
-	fprintf( stderr, ", read" );
-      if (f->writeImage) 
-	fprintf( stderr, ", write" );
-      fprintf( stderr, "\n" );
-    }
-  }
-}
-
-
-/** remove supported image formats */
-void removeSupportedFileFormat() {    
-  PTRIMAGE_FORMAT f=firstFormat;
-  
-  while( f != NULL) {
-    PTRIMAGE_FORMAT f_old = f;
-    f = f->next;
-    ImageIO_free( f_old);
-  }
-  InrimageFormat=NULL;
-
-}
-
-
-/** trilinear interpolation in an _image float type
- */
-float triLinInterp(const _image* image,
-                   float posx, 
-                   float posy, 
-                   float posz,
-                   float value_outside /*= 0.f */)
-{
-  const int dimx = image->xdim;
-  const int dimy = image->ydim;
-  const int dimz = image->zdim;
-  const int dimxy = dimx*dimy;
-  
-  if(posx < 0.f || posy < 0.f || posz < 0.f )
-    return value_outside;
-
-  posx = static_cast<float>(posx /(image->vx));
-  posy = static_cast<float>(posy /(image->vy));
-  posz = static_cast<float>(posz /(image->vz));
-
-  //patch suggested by J.Cugnoni to prevent integer overflow
-  if(posz >= dimz-1 || posy >= dimy-1 || posx >= dimx-1)
-    return value_outside;
-  
-  const int i1 = (int)(posz);
-  const int j1 = (int)(posy);
-  const int k1 = (int)(posx);
-
-  const int i2 = i1 + 1;
-  const int j2 = j1 + 1;
-  const int k2 = k1 + 1;
-
-  const float KI2 = i2-posz;
-  const float KI1 = posz-i1;
-  const float KJ2 = j2-posy;
-  const float KJ1 = posy-j1;
-
-  CGAL_IMAGE_IO_CASE
-    (image,
-     Word *array = (Word *) image->data;
-     return (((float)array[i1 * dimxy + j1 * dimx + k1] * KI2 +
-              (float)array[i2 * dimxy + j1 * dimx + k1] * KI1) * KJ2 +
-             ((float)array[i1 * dimxy + j2 * dimx + k1] * KI2 +
-              (float)array[i2 * dimxy + j2 * dimx + k1] * KI1) * KJ1) * (k2-posx)+
-     (((float)array[i1 * dimxy + j1 * dimx + k2] * KI2 +
-       (float)array[i2 * dimxy + j1 * dimx + k2] * KI1) * KJ2 +
-      ((float)array[i1 * dimxy + j2 * dimx + k2] * KI2 +
-       (float)array[i2 * dimxy + j2 * dimx + k2] * KI1) * KJ1) * (posx-k1);
-     );
-  return 0.f;
-}
-
-// Gives the value of the image at pixel (i,j,k), converted in float.
-float evaluate(const _image* image,
-               const std::size_t i,
-               const std::size_t j,
-               const std::size_t k)
-{
-  using CGAL::IMAGEIO::static_evaluate;
-
-  CGAL_IMAGE_IO_CASE(image, return (float)static_evaluate<Word>(image, i, j, k); );
-
-  return 0.f;
-}
-
-/** convert the data of the image to float 
-*/
-void convertImageTypeToFloat(_image* image){ 
-  if(image->wordKind == WK_FLOAT && image->wdim == 4)
-    return;
-
-  const unsigned int dimx = image->xdim;
-  const unsigned int dimy = image->ydim;
-  const unsigned int dimz = image->zdim;
-  
-  float * array = (float*)ImageIO_alloc (dimx * dimy * dimz *sizeof(float));
-  if (array == NULL ) {
-    fprintf ( stderr, "allocation error\n" );
-    return;
-  }
-
-  CGAL_IMAGE_IO_CASE
-    (image, 
-     Word * typedArray  = (Word *)(image->data);
-     for(unsigned int i = 0; i<dimx * dimy * dimz;++i)
-       array[i] = (float)(typedArray[i]);
-     );
-
-  ImageIO_free ( image->data );
-  image->data = array;
-  
-  image->wordKind = WK_FLOAT;
-  image->wdim = 4;
-}
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/Image_3.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/Image_3.cpp
deleted file mode 100644
index f0f5e02..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/Image_3.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
-//               2008 GeometryFactory, Sophia Antipolis (France)
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-// Author(s)     : Laurent Rineau, Pierre Alliez
-
-#include <CGAL/Image_3.h>
-#include <CGAL/gl.h>
-
-namespace CGAL {
-
-bool Image_3::private_read(_image* im)
-{
-  if(im != 0)
-  {
-    if(image() != 0)
-    {
-      ::_freeImage(image());
-    }
-    image_ptr = Image_shared_ptr(im, Image_deleter());
-
-//     std::cerr << 
-//       boost::format("image=%1% (xdim=%2%, ydim=%3%, zdim=%4%)\n")
-//       % image_ptr.get() % image_ptr->xdim % image_ptr->ydim % image_ptr->zdim;
-
-  }
-  return im != 0;
-}
-
-void Image_3::gl_draw(const float point_size,
-                      const unsigned char r,
-                      const unsigned char g,
-                      const unsigned char b)
-{
-  if(image_ptr.get() == NULL)
-    return;
-
-  glPointSize(point_size);
-  glColor3ub(r,g,b);
-  glBegin(GL_POINTS);
-  unsigned char *pData = (unsigned char*)image_ptr->data;
-  unsigned int xy = image_ptr->xdim * image_ptr->ydim;
-  for(unsigned int i=0;i<image_ptr->xdim;i+=5)
-    for(unsigned int j=0;j<image_ptr->ydim;j+=5)
-      for(unsigned int k=0;k<image_ptr->zdim;k+=5)
-      {
-        unsigned char value = pData[xy*k + j*image_ptr->xdim + i];
-        if(value > 0)
-        {
-          double x = image_ptr->vx * i;
-          double y = image_ptr->vy * j;
-          double z = image_ptr->vz * k;
-          glVertex3d(x,y,z);
-        }
-      }
-  glEnd();
-} // end Image_3::gl_draw
-
-
-void Image_3::gl_draw_bbox(const float line_width,
-                           const unsigned char red,
-                           const unsigned char green,
-                           const unsigned char blue)
-{
-  if(!image_ptr)
-    return;
-
-  glLineWidth(line_width);
-  glColor3ub(red,green,blue);
-  glBegin(GL_LINES);
-
-  struct Point {
-    double x_;
-    double y_;
-    double z_;
-    Point(double x, double y, double z) : x_(x), y_(y), z_(z) {};
-
-    double x() const { return x_; }
-    double y() const { return y_; }
-    double z() const { return z_; }
-  };
-
-  const double xmax = (image_ptr->xdim - 1.0)*(image_ptr->vx);
-  const double ymax = (image_ptr->ydim - 1.0)*(image_ptr->vy);
-  const double zmax = (image_ptr->zdim - 1.0)*(image_ptr->vz);
-
-  Point a(0.0, 0.0,    0.0);
-  Point b(0.0, ymax, 0.0);
-  Point c(0.0, ymax, zmax);
-  Point d(0.0, 0.0,    zmax);
-  Point e(xmax, 0.0,    0.0);
-  Point f(xmax, ymax, 0.0);
-  Point g(xmax, ymax, zmax);
-  Point h(xmax, 0.0,    zmax);
-
-  glVertex3d(a.x(),a.y(),a.z());
-  glVertex3d(b.x(),b.y(),b.z());
-
-  glVertex3d(b.x(),b.y(),b.z());
-  glVertex3d(c.x(),c.y(),c.z());
-
-  glVertex3d(c.x(),c.y(),c.z());
-  glVertex3d(d.x(),d.y(),d.z());
-
-  glVertex3d(d.x(),d.y(),d.z());
-  glVertex3d(a.x(),a.y(),a.z());
-
-  glVertex3d(e.x(),e.y(),e.z());
-  glVertex3d(f.x(),f.y(),f.z());
-
-  glVertex3d(f.x(),f.y(),f.z());
-  glVertex3d(g.x(),g.y(),g.z());
-
-  glVertex3d(g.x(),g.y(),g.z());
-  glVertex3d(h.x(),h.y(),h.z());
-
-  glVertex3d(h.x(),h.y(),h.z());
-  glVertex3d(e.x(),e.y(),e.z());
-
-  glVertex3d(a.x(),a.y(),a.z());
-  glVertex3d(e.x(),e.y(),e.z());
-
-  glVertex3d(d.x(),d.y(),d.z());
-  glVertex3d(h.x(),h.y(),h.z());
-
-  glVertex3d(c.x(),c.y(),c.z());
-  glVertex3d(g.x(),g.y(),g.z());
-
-  glVertex3d(b.x(),b.y(),b.z());
-  glVertex3d(f.x(),f.y(),f.z());
-
-  glEnd();
-} // end Image_3::gl_draw_bbox
-
-} // end namespace CGAL
-
-#ifdef CGAL_USE_VTK
-
-#include <vtkImageData.h>
-#include <CGAL/Image_3_vtk_interface.h>
-
-namespace CGAL {
-
-namespace {
-
-struct VTK_to_ImageIO_type_mapper {
-  WORD_KIND wordKind;
-  SIGN sign;
-  unsigned int wdim;
-};
-
-static const VTK_to_ImageIO_type_mapper VTK_to_ImageIO_type[VTK_ID_TYPE] = 
-  { { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  0=VTK_VOID
-    { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  1=VTK_BIT
-    { WK_FIXED,   SGN_SIGNED,   1}, //  2=VTK_CHAR
-    { WK_FIXED,   SGN_UNSIGNED, 1}, //  3=VTK_UNSIGNED_CHAR
-    { WK_FIXED,   SGN_SIGNED,   2}, //  4=VTK_SHORT 
-    { WK_FIXED,   SGN_UNSIGNED, 2}, //  5=VTK_UNSIGNED_SHORT
-    { WK_FIXED,   SGN_SIGNED,   4}, //  6=VTK_INT
-    { WK_FIXED,   SGN_UNSIGNED, 4}, //  7=VTK_UNSIGNED_INT
-    { WK_FIXED,   SGN_SIGNED,   8}, //  8=VTK_LONG
-    { WK_FIXED,   SGN_UNSIGNED, 8}, //  9=VTK_UNSIGNED_LONG
-    { WK_FLOAT,   SGN_SIGNED,   4}, // 10=VTK_FLOAT
-    { WK_FIXED,   SGN_SIGNED,   8}  // 11=VTK_DOUBLE
- }; 
-
-} //end anonymous namespace
-
-bool
-Image_3::read_vtk_image_data(vtkImageData* vtk_image)
-{
-  if(!vtk_image)
-    return false;
-
-  _image* image = ::_initImage();
-  const int* dims = vtk_image->GetDimensions();
-  const double* spacing = vtk_image->GetSpacing();
-  image->vectMode = VM_SCALAR;
-  image->xdim = dims[0];
-  image->ydim = dims[1];
-  image->zdim = dims[2];
-  image->vdim = 1;
-  image->vx = spacing[0];
-  image->vy = spacing[1];
-  image->vz = spacing[2];
-  vtk_image->Update();
-  image->endianness = ::_getEndianness();
-  int vtk_type = vtk_image->GetScalarType();
-  if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR;
-  if(vtk_type < 0 || vtk_type > VTK_DOUBLE)
-    vtk_type = VTK_DOUBLE;
-  const VTK_to_ImageIO_type_mapper& imageio_type = 
-    VTK_to_ImageIO_type[vtk_type];
-  image->wdim = imageio_type.wdim;
-  image->wordKind = imageio_type.wordKind;
-  image->sign = imageio_type.sign;
-  image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim);
-  std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
-            << "\nimage->size()=" << dims[0]*dims[1]*dims[2]
-            << "\nwdim=" << image->wdim << '\n';
-  assert(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
-  vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
-
-  return this->private_read(image);
-}
-
-} // end namespace CGAL
-
-#endif // CGAL_USE_VTK
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.cpp
deleted file mode 100644
index fbc0964..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.cpp
+++ /dev/null
@@ -1,838 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <string.h>
-
-#include "analyze.h"
-
-/* compile time endianness */
-/* replaced by _getEndianness()
-   see below
-#if (defined (_ALPHA_) || defined (_LINUX_))
-#define ARCHITECTURE_ENDIANNESS END_LITTLE
-#else
-#define ARCHITECTURE_ENDIANNESS END_BIG
-#endif
-*/
-
-/** Magic header for ANALYZE files written in little endian format */
-#define ANALYZE_LE_MAGIC "\000\000\001\134"
-/** Magic header for ANALYZE files written in big endian format */
-#define ANALYZE_BE_MAGIC "\134\001\000\000"
-
-#define DT_NONE			0 
-#define DT_UNKNOWN              0 /*Unknown data type*/ 
-#define DT_BINARY               1 /*Binary (1 bit per voxel)*/ 
-#define DT_UNSIGNED_CHAR        2 /*Unsigned character (8 bits per voxel)*/ 
-#define DT_SIGNED_SHORT         4 /*Signed short (16 bits per voxel)*/ 
-#define DT_SIGNED_INT           8 /*Signed integer (32 bits per voxel)*/ 
-#define DT_FLOAT                16 /*Floating point (32 bits per voxel)*/ 
-#define DT_COMPLEX              32 /*Complex (64 bits per voxel; 2 floating point numbers) */
-#define DT_DOUBLE               64 /*Double precision (64 bits per voxel)*/ 
-#define DT_RGB                  128 /* */
-#define DT_ALL                  255 /* */
-
-struct header_key                       /*      header_key       */
-    {                                           /* off + size*/
-        int sizeof_hdr;                         /* 0 + 4     */
-        char data_type[10];                     /* 4 + 10    */
-        char db_name[18];                       /* 14 + 18   */
-        int extents;                            /* 32 + 4    */
-        short int session_error;                /* 36 + 2    */
-        char regular;                           /* 38 + 1    */
-        char hkey_un0;                          /* 39 + 1    */
-    };                                          /* total=40  */
-
-struct image_dimension                  /*      image_dimension  */
-    {                                           /* off + size*/
-        short int dim[8];                       /* 0 + 16    */
-        char vox_units[4];                      /* 16 + 4    */
-        char cal_units[8];                      /* 20 + 4    */
-        short int unused1;                      /* 24 + 2    */
-        short int datatype;                     /* 30 + 2    */
-        short int bitpix;                       /* 32 + 2    */
-        short int dim_un0;                      /* 34 + 2    */
-        float pixdim[8];                        /* 36 + 32   */
-                        /* 
-                                pixdim[] specifies the voxel dimensions:
-                                pixdim[1] - voxel width
-                                pixdim[2] - voxel height
-                                pixdim[3] - interslice distance
-                                        ..etc
-                        */
-        float vox_offset;                       /* 68 + 4    */
-        float funused1;                         /* 72 + 4    */
-        float funused2;                         /* 76 + 4    */
-        float funused3;                         /* 80 + 4    */
-        float cal_max;                          /* 84 + 4    */
-        float cal_min;                          /* 88 + 4    */
-        int compressed;                         /* 92 + 4    */
-        int verified;                           /* 96 + 4    */
-        int glmax, glmin;                       /* 100 + 8   */
-    };                                          /* total=108 */
-         
-struct data_history                     /*      data_history     */
-    {                                           /* off + size*/
-        char descrip[80];                       /* 0 + 80    */
-        char aux_file[24];                      /* 80 + 24   */
-        char orient;                            /* 104 + 1   */
-        char originator[10];                    /* 105 + 10  */
-        char generated[10];                     /* 115 + 10  */
-        char scannum[10];                       /* 125 + 10  */
-        char patient_id[10];                    /* 135 + 10  */
-        char exp_date[10];                      /* 145 + 10  */
-        char exp_time[10];                      /* 155 + 10  */
-        char hist_un0[3];                       /* 165 + 3   */
-        int views;                              /* 168 + 4   */
-        int vols_added;                         /* 172 + 4   */
-        int start_field;                        /* 176 + 4   */
-        int field_skip;                         /* 180 + 4   */
-        int omax,omin;                          /* 184 + 8   */
-        int smax,smin;                          /* 192 + 8   */
-    };                                        
-
-
-struct dsr                                   /*      dsr              */
-   {                                         /* off + size*/
-     struct header_key hk;                   /* 0 + 40    */
-     struct image_dimension dime;            /* 40 + 108  */
-     struct data_history hist;               /* 148 + 200 */
-   };                                        /* total=348 */
-
- 
-
-
-/*---------------- _swapLong ------------------------------------------------*/
-
-static void _swapLong( unsigned char *pntr)
-{
-  unsigned char b0, b1, b2, b3;
-  
-  b0 = *pntr;
-  b1 = *(pntr+1);
-  b2 = *(pntr+2);
-  b3 = *(pntr+3);
-  
-  *pntr = b3;
-  *(pntr+1) = b2;
-  *(pntr+2) = b1;
-  *(pntr+3) = b0;
-}
-        
-/*---------------- _swapShort -----------------------------------------------*/
-
-static void _swapShort( unsigned char *pntr)
-{
-  unsigned char b0, b1;
-  
-  b0 = *pntr;
-  b1 = *(pntr+1);
-
-  *pntr = b1;
-  *(pntr+1) = b0;
-}
-
-/*---------------- _swapAnalyzeHdr ------------------------------------------*/
-
-static void _swapAnalyzeHdr( struct dsr *pntr)
-{
-  
-  _swapLong((unsigned char*) &pntr->hk.sizeof_hdr) ;
-  _swapLong((unsigned char*) &pntr->hk.extents) ;
-  _swapShort((unsigned char*) &pntr->hk.session_error) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[0]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[1]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[2]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[3]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[4]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[5]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[6]) ;
-  _swapShort((unsigned char*) &pntr->dime.dim[7]) ;
-  _swapShort((unsigned char*) &pntr->dime.unused1) ;
-  _swapShort((unsigned char*) &pntr->dime.datatype) ;
-  _swapShort((unsigned char*) &pntr->dime.bitpix) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[0]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[1]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[2]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[3]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[4]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[5]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[6]) ;
-  _swapLong((unsigned char*) &pntr->dime.pixdim[7]) ;
-  _swapLong((unsigned char*) &pntr->dime.vox_offset) ;
-  _swapLong((unsigned char*) &pntr->dime.funused1) ;
-  _swapLong((unsigned char*) &pntr->dime.funused2) ;
-  _swapLong((unsigned char*) &pntr->dime.cal_max) ;
-  _swapLong((unsigned char*) &pntr->dime.cal_min) ;
-  _swapLong((unsigned char*) &pntr->dime.compressed) ;
-  _swapLong((unsigned char*) &pntr->dime.verified) ;
-  _swapShort((unsigned char*) &pntr->dime.dim_un0) ;
-  _swapLong((unsigned char*) &pntr->dime.glmax) ;
-  _swapLong((unsigned char*) &pntr->dime.glmin) ;
-}
-PTRIMAGE_FORMAT createAnalyzeFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testAnalyzeHeader;
-  f->readImageHeader=&readAnalyzeHeader;
-  f->writeImage=&writeAnalyze;
-  strcpy(f->fileExtension,".hdr,.hdr.gz,.img,.img.gz");
-  strcpy(f->realName,"Analyze");
-  return f;
-}
-
-int testAnalyzeHeader(char *magic,const char *) {
-   /* opened image is an ANALYZE */
-  if( !memcmp(magic,ANALYZE_LE_MAGIC,4) ||
-      !memcmp(magic,ANALYZE_BE_MAGIC,4)) 
-    return 0;
-  else 
-    return -1;
-}
-
-int writeAnalyze( char *name, _image* im) {
-  char *outputName;
-  int length, extLength=0, res;
-
-
-  length=strlen(name);
-  outputName= (char *)ImageIO_alloc(length+8);
-  
-  if ( strncmp( name+length-4, ".hdr", 4 ) == 0 ) {
-    extLength = 4;
-  }
-  else if ( strncmp( name+length-4, ".img", 4 ) == 0 ) {
-    extLength = 4;
-  }
-  else if ( strncmp( name+length-7, ".img.gz", 7 ) == 0 ) {
-    extLength = 7;
-  }
-  else if ( strncmp( name+length-7, ".hdr.gz", 7 ) == 0 ) {
-    extLength = 7;
-  }
-
-  strncpy( outputName, name, length-extLength );
-  if ( strncmp( name+length-7, ".hdr.gz", 7 ) == 0 )
-    strcpy( outputName+length-extLength, ".hdr.gz" );
-  else
-    strcpy( outputName+length-extLength, ".hdr" );
-  
-  _openWriteImage(im, outputName);
-  if( !im->fd ) {
-    fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    return ImageIO_OPENING;
-  }
-
-  res = writeAnalyzeHeader(im);
-  if ( res < 0 ) {
-    fprintf(stderr, "writeAnalyze: error: unable to write header of \'%s\'\n",
-	    outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    ImageIO_close( im );
-    im->fd = NULL;
-    im->openMode = OM_CLOSE;
-    return( res );
-  }
-  
-  ImageIO_close(im);
-  
-  strncpy( outputName, name, length-extLength );
-  if ( strncmp( name+length-3, ".gz", 3 ) == 0 ) {
-    strcpy( outputName+length-extLength, ".img.gz" );
-  }
-  else {
-    strcpy( outputName+length-extLength, ".img" );
-  }
-
-  _openWriteImage(im, outputName);
-
-  if( !im->fd ) {
-    fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    return ImageIO_OPENING;
-  }
-
-  res = writeAnalyzeData(im);
-  if (res < 0) {
-    fprintf(stderr, "writeAnalyze: error: unable to write data in \'%s\'\n",
-	    outputName );
-    ImageIO_close( im );
-    im->fd = NULL;
-    im->openMode = OM_CLOSE;
-    return( res );
-  }
-
-  if ( outputName != NULL ) ImageIO_free( outputName );
-  ImageIO_close( im );
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-
-  return ( res );
-}
-
-/* 
-   return:
-   -1: error
-   0: success
- */
-
-int _readAnalyzeHeader( _image* im, const char* name, 
-			struct dsr *analyzeHeader )
-{
-
-   unsigned int i ;
-   /* compile time endianness */
-   ENDIANNESS ARCHITECTURE_ENDIANNESS = _getEndianness();
-
-   if(im->openMode != OM_CLOSE) {
-      
-     ImageIO_read( im, analyzeHeader, sizeof(struct dsr) );
-      
-      if( analyzeHeader->hk.sizeof_hdr == sizeof(struct dsr) )
-      {
-	 im->endianness = ARCHITECTURE_ENDIANNESS ;
-      }
-      else
-      {
-	_swapAnalyzeHdr( analyzeHeader );
-	 if( analyzeHeader->hk.sizeof_hdr != sizeof(struct dsr) )
-	 {
-	    fprintf (stderr,
-		     "_readAnalyzeHeader: error: unknown magic (%d)...\n",
-		     analyzeHeader->hk.sizeof_hdr );
-	    return -1;
-	 }
-	 if( ARCHITECTURE_ENDIANNESS == END_LITTLE )
-	 {
-	    im->endianness = END_BIG;
-	 }
-	 else
-	 {
-	    im->endianness = END_LITTLE;
-	 }
-      }
-      
-      if ( analyzeHeader->dime.dim[0] > 4 ) {
-	 fprintf (stderr,
-		  "_readAnalyzeHeader: error: dimensionality not supported (%d)...\n",
-		  analyzeHeader->dime.dim[0] );
-	 return -1;
-      }
-      
-      im->xdim = analyzeHeader->dime.dim[1];
-      im->ydim = analyzeHeader->dime.dim[2];
-      im->zdim = analyzeHeader->dime.dim[3];
-
-      /* 0 time-points is a convention for one volume only at MNI */
-      /* Corrected by X. Pennec following a bug report by Irina Kezele at MNI */
-      if( analyzeHeader->dime.dim[4] == 0 ){
-	fprintf (stderr,
-		 "_readAnalyzeHeader: warning: time dimension / number if volume (dim[4]) is 0. Assuming this means 1 (otherwise there would be no image...). \n");
-	analyzeHeader->dime.dim[4] = 1; 
-      }
-
-      /* Analyze doesn't support vector images.
-	 The forth dimension relates to time. */
-      if( analyzeHeader->dime.dim[4] != 1 )
-      {
-	 fprintf (stderr,
-		  "_readAnalyzeHeader: error: time dimension not supported (%d)...\n",
-		  analyzeHeader->dime.dim[4] );
-	 return -1;
-      }
-      im->vectMode = VM_SCALAR;
-      
-      im->vx = analyzeHeader->dime.pixdim[1];
-      im->vy = analyzeHeader->dime.pixdim[2];
-      im->vz = analyzeHeader->dime.pixdim[3];
-
-      if( im->vx == 0.0 ) im->vx = 1.0 ;
-      if( im->vy == 0.0 ) im->vy = im->vx ;
-      if( im->vz == 0.0 ) im->vz = im->vy ;
-      
-      switch(analyzeHeader->dime.datatype)
-      {
-	 case DT_BINARY:
-	 case DT_UNSIGNED_CHAR:
-	 case DT_SIGNED_SHORT:
-	 case DT_SIGNED_INT:
-	 case DT_FLOAT:
-	 case DT_COMPLEX:
-	 case DT_DOUBLE:
-	    im->vdim = 1;
-	    break ;
-	    
-	 case DT_RGB:
-	    im->vdim = 3;
-	    break ;
-	    
-	 default:
-	    fprintf (stderr,
-		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
-		     analyzeHeader->dime.datatype );
-	    return -1;
-      }
-      
-      switch(analyzeHeader->dime.datatype)
-      {
-	 case DT_BINARY:
-	 case DT_UNSIGNED_CHAR:
-	 case DT_SIGNED_SHORT:
-	 case DT_SIGNED_INT:
-	 case DT_RGB:
-	    im->wordKind = WK_FIXED;
-	    break ;
-	    
-	 case DT_FLOAT:
-	 case DT_COMPLEX:
-	 case DT_DOUBLE:
-	    im->wordKind = WK_FLOAT;
-	    break ;
-	    
-	 default:
-	    fprintf (stderr,
-		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
-		     analyzeHeader->dime.datatype );
-	    return -1;
-      }
-      
-      switch(analyzeHeader->dime.datatype)
-      {
-	 case DT_BINARY:
-	 case DT_UNSIGNED_CHAR:
-	 case DT_RGB:
-	    im->sign = SGN_UNSIGNED;
-	    break ;
-	    
-	 case DT_SIGNED_SHORT:
-	 case DT_SIGNED_INT:
-	 case DT_FLOAT:
-	 case DT_COMPLEX:
-	 case DT_DOUBLE:
-	    im->sign = SGN_SIGNED;
-	    break ;
-	    
-	 default:
-	    fprintf (stderr,
-		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
-		     analyzeHeader->dime.datatype );
-	    return -1;
-      }
-      
-      im->wdim = analyzeHeader->dime.bitpix;
-      if( analyzeHeader->dime.datatype == DT_RGB )
-      {
-	 im->wdim /= 3 ;
-      }
-      if(im->wdim != 8 && im->wdim != 16 && im->wdim != 32 && im->wdim != 64)
-      {
-	 fprintf (stderr,
-		  "_readAnalyzeHeader: error: pixel size not supported (%d)...\n",
-		  analyzeHeader->dime.bitpix );
-	 return -1;
-      }
-      im->wdim >>= 3 ;
-      
-      /* There are 17 optional data fields 
-	 be careful in the allocation
-       */
-      im->nuser = 1 + 17 ;
-      im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
-      for ( i=0; i<im->nuser; i++ ) im->user[i] = NULL;
-      i = 0 ;
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("Data lost in the Analyze -> ImageIO conversion:") + 1));
-      sprintf( im->user[i++], "Data lost in the Analyze -> ImageIO conversion:" );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  descrip: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
-      sprintf( im->user[i++], "  descrip: %s", analyzeHeader->hist.descrip );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  aux_file: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
-      sprintf( im->user[i++], "  aux_file: %s", analyzeHeader->hist.descrip );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  orient: ") + 1+ 2));
-      sprintf( im->user[i++], "  orient: %d", analyzeHeader->hist.orient );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  originator: ") + 1 + strlen(analyzeHeader->hist.originator) ));
-      sprintf( im->user[i++], "  originator: %s", analyzeHeader->hist.originator );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  generated: ") + 1 + strlen(analyzeHeader->hist.generated) ));
-      sprintf( im->user[i++], "  generated: %s", analyzeHeader->hist.generated );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  scannum: ") + 1 + strlen(analyzeHeader->hist.scannum) ));
-      sprintf( im->user[i++], "  scannum: %s", analyzeHeader->hist.scannum );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  patient_id: ") + 1 + strlen(analyzeHeader->hist.patient_id) ));
-      sprintf( im->user[i++], "  patient_id: %s", analyzeHeader->hist.patient_id );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  exp_date: ") + 1 + strlen(analyzeHeader->hist.exp_date) ));
-      sprintf( im->user[i++], "  exp_date: %s", analyzeHeader->hist.exp_date );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  exp_time: ") + 1 + strlen(analyzeHeader->hist.exp_time) ));
-      sprintf( im->user[i++], "  exp_time: %s", analyzeHeader->hist.exp_time );
-
-      /* A 32 bit int doesn't print on more than 11 chars */
-      im->user[i] = (char *) ImageIO_alloc((strlen("  views: ") + 11 + 1));
-      sprintf( im->user[i++], "  views: %d", analyzeHeader->hist.views );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  vols_added: ") + 11 + 1));
-      sprintf( im->user[i++], "  vols_added: %d", analyzeHeader->hist.vols_added );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  start_field: ") + 11 + 1));
-      sprintf( im->user[i++], "  start_field: %d", analyzeHeader->hist.start_field );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  field_skip: ") + 11 + 1));
-      sprintf( im->user[i++], "  field_skip: %d", analyzeHeader->hist.field_skip );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  omax: ") + 11 + 1));
-      sprintf( im->user[i++], "  omax: %d", analyzeHeader->hist.omax );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  omin: ") + 11 + 1));
-      sprintf( im->user[i++], "  omin: %d", analyzeHeader->hist.omin );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  smax: ") + 11 + 1));
-      sprintf( im->user[i++], "  smax: %d", analyzeHeader->hist.smax );
-      
-      im->user[i] = (char *) ImageIO_alloc((strlen("  smin: ") + 11 + 1));
-      sprintf( im->user[i++], "  smin: %d", analyzeHeader->hist.smin );
-
-
-      /* header is read. close header file and open data file. */
-      if( name != NULL ) {
-
-	int length = strlen(name) ;
-	char* data_filename = (char *) ImageIO_alloc(length+4) ;
-	
-	if( strcmp( name+length-4, ".hdr" ) )
-	  {
-	    fprintf (stderr,
-		     "_readAnalyzeHeader: error: file header extension must be .hdr\n");
-	    ImageIO_free( data_filename );
-	    return -1;
-	  }
-	 
-	ImageIO_close(im);
-	
-	strcpy(data_filename,name);
-	strcpy(data_filename+length-3, "img.gz");
-	_openReadImage(im,data_filename);
-	
-	if(!im->fd) {
-
-	  strcpy(data_filename,name);
-	  strcpy(data_filename+length-3, "img");
-	  _openReadImage(im,data_filename);
-	  if(!im->fd) {
-	    fprintf(stderr, "_readAnalyzeHeader: error: unable to open data file \'%s\'\n", data_filename);
-	    ImageIO_free( data_filename );
-	    return -1;
-	    
-	  }
-	}
-	ImageIO_free( data_filename );
-      }
-      
-      /* check header validity */
-      if(im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
-	 im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
-	 (im->wordKind == WK_FLOAT || (im->wordKind == WK_FIXED &&
-				       im->sign != SGN_UNKNOWN)) &&
-	 im->endianness != END_UNKNOWN) {
-	 return 0;
-      }
-      else return -1;
-   }
-   else return -1;
-}
-
-
-
-
-
-
-
-int readAnalyzeHeader( const char* name, _image* im)
-{
-  struct dsr analyzeHeader ;
-  return( _readAnalyzeHeader( im, name, &analyzeHeader ) );
-}
-
-
-
-int
-writeAnalyzeHeader( const _image* im )
-{
-  const char *proc = "writeAnalyzeHeader";
-  struct dsr hdr;
-  int i ;
-  int imin = 0;
-  int imax = 0;
- 
-   memset(&hdr,0, sizeof(struct dsr));
-   
-   for(i=0;i<8;i++) {
-      hdr.dime.pixdim[i] = 0.0;
-   }
-   hdr.dime.vox_offset  = 0.0;
-   hdr.dime.funused1    = 0.0;
-   hdr.dime.funused2    = 0.0;
-   hdr.dime.funused3    = 0.0;
-   hdr.dime.cal_max     = 0.0;
-   hdr.dime.cal_min     = 0.0;
-
-   hdr.dime.dim[0] = 4;
-   hdr.dime.dim[1] = im->xdim;
-   hdr.dime.dim[2] = im->ydim;
-   hdr.dime.dim[3] = im->zdim;
-   hdr.dime.dim[4] = 1 ;
-
-   if ( im->wordKind == WK_FIXED && im->sign == SGN_UNSIGNED ) {
-     if( im->wdim == 1 ) {
-       
-	if ( im->vdim == 1 ) {
-	  hdr.dime.datatype = DT_UNSIGNED_CHAR ;
-	}
-	else if ( im->vdim == 3 ) {
-	  hdr.dime.datatype = DT_RGB ;
-	}
-	else {
-	  fprintf( stderr, "%s: unsupported image type\n", proc );
-	  return -1;
-	}
-	
-	{
-	  unsigned char *buf = (unsigned char *)im->data;
-	  int size = im->xdim * im->ydim * im->zdim * im->vdim;
-	  imin = imax = *buf;
-	  for (i=0; i<size; i++, buf++) {
-	    if ( imax < *buf ) imax = *buf;
-	    if ( imin > *buf ) imin = *buf;
-	  }
-	}
-	
-      }
-      else if ( im->wdim == 2 ) {
-	if ( im->vdim == 1 ) {
-	  unsigned short int *buf = (unsigned short int*)im->data;
-	  int size = im->xdim * im->ydim *im->zdim;
-	  int i;
-	  imin = imax = *buf;
-	  for (i=0; i<size; i++, buf++) {
-	    if ( imax < *buf ) imax = *buf;
-	    if ( imin > *buf ) imin = *buf;
-	  }
-	  if ( imax < 32768 ) {
-	    hdr.dime.datatype = DT_SIGNED_SHORT ;
-	  } 
-	  else {
-	    fprintf( stderr, "%s: conversion from unsigned short to short impossible, max=%d\n", proc, imax );
-	    return -1;
-	  }
-	}
-	else {
-	  fprintf( stderr, "%s: unsupported image type\n", proc );
-	  return -1;
-	}
-      }
-      
-      else {
-	  fprintf( stderr, "%s: unsupported image type\n", proc );
-	  return -1;
-      }
-      
-   } /* if ( im->wordKind == WK_FIXED && im->sign == SGN_UNSIGNED ) */
-
-   else if( im->wordKind == WK_FIXED && im->sign == SGN_SIGNED ) {
-     if ( im->vdim != 1 ) {
-       fprintf( stderr, "%s: unsupported image type\n", proc );
-       return -1;
-     }
-     if( im->wdim == 2 ) {
-       short int *buf = (short int*)im->data;
-       int size = im->xdim * im->ydim *im->zdim;
-       int i;
-       imin = imax = *buf;
-       for (i=0; i<size; i++, buf++) {
-	 if ( imax < *buf ) imax = *buf;
-	 if ( imin > *buf ) imin = *buf;
-       }
-       hdr.dime.datatype = DT_SIGNED_SHORT ;
-     }
-     else if( im->wdim == 4 ) {
-       int *buf = (int*)im->data;
-       int size = im->xdim * im->ydim *im->zdim;
-       int i;
-       imin = imax = *buf;
-       for (i=0; i<size; i++, buf++) {
-	 if ( imax < *buf ) imax = *buf;
-	 if ( imin > *buf ) imin = *buf;
-       }
-       hdr.dime.datatype = DT_SIGNED_INT ;
-     }
-     else {
-       fprintf( stderr, "%s: unsupported image type\n", proc );
-       return -1;
-     }
-   }
-   else if( im->wordKind == WK_FLOAT ) {
-     if ( im->vdim != 1 ) {
-       fprintf( stderr, "%s: unsupported image type\n", proc );
-       return -1;
-     }
-     if( im->wdim == 4 ) {
-       hdr.dime.datatype = DT_FLOAT ;
-     }
-     else if( im->wdim == 8 ) {
-       hdr.dime.datatype = DT_DOUBLE ;
-     }
-     else {
-       fprintf( stderr, "%s: unsupported image type\n", proc );
-       return -1;
-     }
-   }
-   else
-   {
-      fprintf( stderr, "%s: unsupported image type\n", proc );
-      return -1;
-   }
-	 
-   hdr.dime.bitpix = 8*im->wdim*im->vdim ;
-
-   hdr.hk.regular = 'r';
-   hdr.hk.sizeof_hdr = sizeof(struct dsr);
-
-   /* this is probably bad and should be changed to the
-      real values, but I'm too lazy to do it now. AG */
-   hdr.dime.glmax  = 0 ;  /* maximum voxel value  */
-   hdr.dime.glmin  = 0 ;  /* minimum voxel value */
-   
-   /* corrected GM
-    */
-   hdr.dime.glmax  = imax ;  /* maximum voxel value  */
-   hdr.dime.glmin  = imin ;  /* minimum voxel value */
-    
-/*     Set the voxel dimension fields: 
-       A value of 0.0 for these fields implies that the value is unknown.
-         Change these values to what is appropriate for your data
-         or pass additional command line arguments     */      
-         
-    hdr.dime.pixdim[1] = (float)im->vx;
-    hdr.dime.pixdim[2] = (float)im->vy;
-    hdr.dime.pixdim[3] = (float)im->vz;
-    
-/*   Assume zero offset in .img file, byte at which pixel
-       data starts in the image file */
-
-    hdr.dime.vox_offset = 0.0; 
-    
-/*   Planar Orientation;    */
-/*   Movie flag OFF: 0 = transverse, 1 = coronal, 2 = sagittal
-     Movie flag ON:  3 = transverse, 4 = coronal, 5 = sagittal  */  
-
-    hdr.hist.orient     = 0;  
-    
-/*   up to 3 characters for the voxels units label; i.e. mm., um., cm. */
-
-    strcpy(hdr.dime.vox_units,"mm.");
-   
-/*   up to 7 characters for the calibration units label; i.e. HU */
-
-    strcpy(hdr.dime.cal_units," ");  
-    
-/*     Calibration maximum and minimum values;  
-       values of 0.0 for both fields imply that no 
-       calibration max and min values are used    */
-
-    hdr.dime.cal_max = 0.0; 
-    hdr.dime.cal_min = 0.0;
-
-    if(ImageIO_write(im, &hdr, sizeof(struct dsr)) !=sizeof(struct dsr) )
-       return -1;
-
-    return 1 ;
-}
-
-
-
-
-
-/* Writes the given image body in an already opened file.*/
-int writeAnalyzeData(const _image *im) {
-  unsigned int lineSize = im->wdim * im->xdim * im->vdim ;
-  unsigned long size = lineSize * im->ydim * im->zdim;
-  unsigned int nwrt ;
-
-  if(im->openMode != OM_CLOSE) {
-
-#ifdef _REVERSE_LINES_IN_ANALYZE_
-    char* data = (char *)im->data ;
-    char* buf = data + size - lineSize ;
-    
-    while( buf >= data )
-      {
-	nwrt = ImageIO_write(im, buf, lineSize);
-	if(nwrt != lineSize) return -1;
-	buf -= lineSize ;
-      }
-#else
-    nwrt = ImageIO_write(im, im->data, size);
-    if(nwrt != size) return -1;
-#endif    
-
-    return 1 ;
-  }
-  else return -1;
-}
-
-
-/* Writes the given image body in an already opened file.*/
-int printAnalyzeHeader( const char* name )
-{
-  _image *im;
-  struct dsr analyzeHeader ;
-
-  im = _initImage();
-  _openReadImage(im, name);
-  if(!im->fd) {
-    fprintf(stderr, "printAnalyzeHeader: error: unable to open file \'%s\'\n", name);
-    _freeImage(im);
-    return -1;
-  }
-
-  if ( _readAnalyzeHeader( im, name, &analyzeHeader ) != 1 ) {
-    fprintf(stderr, "printAnalyzeHeader: error: unable to read header in file \'%s\'\n", name);
-    _freeImage(im);
-    return -1;
-  }
-
-
-  
-
-
-  ImageIO_close(im);
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-  _freeImage(im);
-  return( 1 );
-
-
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.h
deleted file mode 100644
index c4d8854..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/analyze.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef ANALYZE_H
-#define ANALYZE_H
-
-#ifdef _MSC_VER
-#pragma warning ( disable : 4068 4786 4081 4267 )
-#endif
-
-
-
-#include <CGAL/ImageIO.h>
-
-/* read analyse format header
-
-   return:
-   -1: error
-   0: success
- */
-int readAnalyzeHeader(const char* name,_image *im);
-
-int testAnalyzeHeader(char *magic,const char *name);
-
-/** creates an return the file format structure associated with the Analyze file format */
-PTRIMAGE_FORMAT createAnalyzeFormat();
-
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeAnalyze( char *basename, _image* im ) ;
-
-
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeAnalyzeHeader( const _image* im ) ;
-
-
-
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeAnalyzeData( const _image* im ) ;
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.cpp
deleted file mode 100644
index 739fd21..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.cpp
+++ /dev/null
@@ -1,505 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "bmptypes.h"
-#include "bmpendian.h"
-#include "bmpread.h"
-
-
-
-#include "bmp.h"
-
-
-
-/** Magic header for bmp */
-#define BMP_MAGIC "BM"
-
-
-
-static int _VERBOSE_BMP_ = 1;
-
-
-
-int testBmpHeader(char *magic,const char *) {
-  if( !strncmp(magic, BMP_MAGIC, strlen(BMP_MAGIC)))
-    return 0;
-  else 
-    return -1;
-}
-
-PTRIMAGE_FORMAT createBMPFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testBmpHeader;
-  f->readImageHeader=&readBmpImage;
-  f->writeImage=0;
-  strcpy(f->fileExtension,".bmp");
-  strcpy(f->realName,"BMP");
-  return f;
-}
-
-int readBmpImage( const char *name,_image *im)
-{
-  int dimx, dimy, dimv;
-
-  im->data = _readBmpImage( name, &dimx,  &dimy,  &dimv );
-  if ( im->data == NULL ) {
-    fprintf( stderr, "readBmpImage: unable to read \'%s\'\n", name );
-    return( -1 );
-  }
-
-  im->xdim = dimx;
-  im->ydim = dimy;
-  im->vdim = dimv;
-
-  im->zdim = 1;
-
-  im->wdim = 1;
-  im->wordKind = WK_FIXED;
-  im->sign = SGN_UNSIGNED;
-
-  return 1;
-}
-
-
-
-void *_readBmpImage( const char *name, 
-		     int *dimx, int *dimy, int *dimz )
-{
-  const char *proc="_readBmpImage";
-  void *buf = (void*)NULL;
-  unsigned char *myBuf;
-
-  FILE *fp;
-  RGB **argbs;
-  char **xorMasks, **andMasks;
-  CGAL_UINT32 *heights, *widths, row, col;
-  CGAL_UINT16 fileType;
-  long filePos;
-  int numImages, i;
-  int rc;
-    
-    fp = fopen(name, "rb");
-    if (fp == NULL) {
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: error in opening %s\n", proc, name );
-      return( (void*)NULL );
-    }
-
-
-    /*
-     * Read the first two bytes as little-endian to determine the file type.
-     * Preserve the file position.
-     */
-    filePos = ftell(fp);
-    rc = readUINT16little(fp, &fileType);
-    if (rc != 0) {
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: error in getting file type %s\n", proc, name );
-      return( (void*)NULL );
-    }
-    fseek(fp, filePos, SEEK_SET);
-
-    /*
-     * Read the images.
-     */
-    switch (fileType) {
-    case TYPE_ARRAY:
-	/*
-	 * If this is an array of images, read them.  All the arrays we need
-	 * will be allocated by the reader function.
-	 */
-	rc = readMultipleImage(fp, &argbs, &xorMasks, &andMasks, &heights,
-			       &widths, &numImages);
-	break;
-    case TYPE_BMP:
-    case TYPE_ICO:
-    case TYPE_ICO_COLOR:
-    case TYPE_PTR:
-    case TYPE_PTR_COLOR:
-	/*
-	 * If this is a single-image file, we've a little more work.  In order
-	 * to make the output part of this test program easy to write, we're
-	 * going to allocate dummy arrays that represent what
-	 * readMultipleImage would have allocated.  We'll read the data into
-	 * those arrays.
-	 */
-	argbs = (RGB **)calloc(1, sizeof(RGB *));
-	if (argbs == NULL)
-	{
-	    rc = 1005;
-	    break;
-	}
-	xorMasks = (char **)calloc(1, sizeof(char *));
-	if (xorMasks == NULL)
-	{
-	    free(argbs);
-	    rc = 1005;
-	    break;
-	}
-	andMasks = (char **)calloc(1, sizeof(char *));
-	if (andMasks == NULL)
-	{
-	    free(argbs);
-	    free(xorMasks);
-	    rc = 1005;
-	    break;
-	}
-	heights = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
-	if (heights == NULL)
-	{
-	    free(argbs);
-	    free(xorMasks);
-	    free(andMasks);
-	    rc = 1005;
-	    break;
-	}
-	widths = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
-	if (widths == NULL)
-	{
-	    free(argbs);
-	    free(xorMasks);
-	    free(andMasks);
-	    free(heights);
-	    rc = 1005;
-	    break;
-	}
-	numImages = 1;
-
-	/*
-	 * Now that we have our arrays allocted, read the image into them.
-	 */
-	switch (fileType) {
-	case TYPE_BMP:
-	    rc = readSingleImageBMP(fp, argbs, widths, heights);
-	    break;
-	case TYPE_ICO:
-	case TYPE_PTR:
-	    rc = readSingleImageICOPTR(fp, xorMasks, andMasks, widths,
-				       heights);
-	    break;
-	case TYPE_ICO_COLOR:
-	case TYPE_PTR_COLOR:
-	    rc = readSingleImageColorICOPTR(fp, argbs, xorMasks, andMasks,
-					    widths, heights);
-	    break;
-	}
-	break;
-    default:
-	rc = 1000;
-    }
-    fclose(fp);
-
-
-  
-    /*
-     * At this point, everything's been read.  Display status messages based
-     * on the return values.
-     */
-    switch (rc) {
-    case 1000:
-    case 1006:
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: File is not a valid bitmap file\n", proc );
-      break;
-    case 1001:
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: Illegal information in an image\n", proc );
-      break;
-    case 1002:
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: Legal information that I can't handle yet in an image\n", proc );
-      break;
-    case 1003:
-    case 1004:
-    case 1005:
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: Ran out of memory\n", proc );
-      break;
-    case 0:
-      if ( _VERBOSE_BMP_ > 1 ) 
-	fprintf( stderr, "%s: Got good data from file, writing results\n", proc );
-      break;
-    default:
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: Error reading file rc=%d\n", proc,rc );
-      break;
-    }
-
-    /*
-     * If the return value wasn't 0, something went wrong.
-     */
-    if (rc != 0)
-    {
-	if (rc != 1000 && rc != 1005)
-	{
-	    for (i=0; i<numImages; i++)
-	    {
-		if (argbs[i] != NULL)
-		    free(argbs[i]);
-		if (andMasks[i] != NULL)
-		    free(andMasks[i]);
-		if (xorMasks[i] != NULL)
-		    free(xorMasks[i]);
-	    }
-	    free(argbs);
-	    free(andMasks);
-	    free(xorMasks);
-	    free(widths);
-	    free(heights);
-	}
-	return( (void*)NULL );
-    }
-    
-    
-    /*
-     * Dump the images.
-     */
-    if ( _VERBOSE_BMP_ > 1 ) 
-      fprintf (stderr, "%s: There are %d images in the file\n", proc, numImages);
-
-    if ( numImages >= 2 ) 
-      fprintf (stderr, "%s: read only first image among %d\n", proc, numImages );
-    
-    /*
-     * my stuff:
-     * just reading one bmp image
-     */
-    if ( (numImages > 0) &&
-	 (argbs[0] != NULL) ) {
-
-      buf = (void*)malloc( widths[0]*heights[0]*3 * sizeof( unsigned char ) );
-      if ( buf == (void*)NULL ) {
-	if ( _VERBOSE_BMP_ ) 
-	  fprintf( stderr, "%s: error in allocating data buffer for %s\n", proc, name );
-
-	for (i=0; i<numImages; i++) {
-	  if (argbs[i] != NULL)
-	    free(argbs[i]);
-	  if (andMasks[i] != NULL)
-	    free(andMasks[i]);
-	  if (xorMasks[i] != NULL)
-	    free(xorMasks[i]);
-	}
-	free(argbs);
-	free(andMasks);
-	free(xorMasks);
-	free(widths);
-	free(heights);
-
-	return( (void*)NULL );
-      }
-
-      myBuf = (unsigned char*)buf;
-      i = 0;
-      for (row = 0; row < heights[0]; row++)
-      for (col = 0; col < widths[0]; col++,i+=3) {
-	myBuf[i  ] = argbs[0][row * widths[0] + col].red;
-	myBuf[i+1] = argbs[0][row * widths[0] + col].green;
-	myBuf[i+2] = argbs[0][row * widths[0] + col].blue;
-      }
-      
-      *dimx = widths[0];
-      *dimy = heights[0];
-      *dimz = 3;
-
-    } else {
-      if ( _VERBOSE_BMP_ ) 
-	fprintf( stderr, "%s: no image or null image\n", proc );
-      
-      for (i=0; i<numImages; i++) {
-	if (argbs[i] != NULL)
-	  free(argbs[i]);
-	if (andMasks[i] != NULL)
-	  free(andMasks[i]);
-	if (xorMasks[i] != NULL)
-	  free(xorMasks[i]);
-      }
-      free(argbs);
-      free(andMasks);
-      free(xorMasks);
-      free(widths);
-      free(heights);
-      
-      return( (void*)NULL );
-    }
-
-
-
-    for (i=0; i<numImages; i++) {
-      if (argbs[i] != NULL)
-	free(argbs[i]);
-      if (andMasks[i] != NULL)
-	free(andMasks[i]);
-      if (xorMasks[i] != NULL)
-	free(xorMasks[i]);
-    }
-    free(argbs);
-    free(andMasks);
-    free(xorMasks);
-    free(widths);
-    free(heights);
-    
-    return( buf );
-
-
-
-
-
-#if 0
-    /*
-     * old stuff from test.c
-     */
-
-    for (i=0; i<numImages; i++)
-    {
-	/*
-	 * Loop through all the images that were returned.
-	 */
-      if ( _VERBOSE_BMP_ ) {
-	fprintf (stderr, "%s: Doing image number %d\n\n", proc, i+1);
-	fprintf (stderr, "%s: Image dimensions: (%ld,%ld)\n", proc, widths[i], heights[i]);
-      }
-
-      if (argbs[i] != NULL) {
-	/*
-	 * If the image has colors, dump them (BMP, color ICO and color
-	 * PTR files
-	 */
-	fprintf(stderr, "Colors");
-	for (row = 0; row < heights[i]; row++)
-	  {
-	    fprintf (stderr, "\n\nRow %ld pixels (R,G,B), hex values:\n",
-		     row);
-	    for (col = 0; col < widths[i]; col++)
-	      {
-		fprintf (stderr, "(%2.2x,%2.2x,%2.2x)",
-			 argbs[i][row * widths[i] + col].red,
-			 argbs[i][row * widths[i] + col].green,
-			 argbs[i][row * widths[i] + col].blue);
-	      }
-	  }
-      } else {
-	/*
-	 * If there image has no colors, say so.  (monochrome ICO and PTR
-	 * files) 
-	 */
-	fprintf (stderr, "No color image\n");
-      }
-
-
-      
-      if (xorMasks[i] != NULL) {
-	/*
-	 * If the image has an xor mask, dump it.  (ICO and PTR files)
-	 */
-	fprintf (stderr, "\nXOR mask\n");
-	for (row = 0; row < heights[i]; row++)
-	  {
-	    for (col = 0; col < widths[i]; col++)
-	      {
-		fprintf (stderr, "%c",
-			 xorMasks[i][row * widths[i] + col] ? '@' : '.');
-	      }
-	    fprintf (stderr, "\n");
-	  }
-      } else {
-	/*
-	 * If the image has no xor mask, say so.  (BMP files).
-	 */
-	fprintf (stderr, "No xor mask\n");
-      }
-      
-
-
-      if (andMasks[i] != NULL) {
-	/*
-	 * If the image has an and mask, dump it.  (ICO and PTR files)
-	 */
-	fprintf (stderr, "\nAND mask\n");
-	for (row = 0; row < heights[i]; row++)
-	  {
-	    for (col = 0; col < widths[i]; col++)
-	      {
-		fprintf (stderr, "%c",
-			 andMasks[i][row * widths[i] + col] ? '@' : '.');
-	      }
-	    fprintf (stderr, "\n");
-	  }
-      } else {
-	/*
-	 * If the image has noand mask, say so.  (BMP files)
-	 */
-	fprintf (stderr, "No and mask\n");
-      }
-      
-
-      if (i != numImages-1)
-	fprintf (stderr, "\n------------------------------------------\n\n");
-      
-    }
-    
-    /*
-     * Dumping is complete.  Free all the arrays and quit
-     */
-    for (i=0; i<numImages; i++)
-    {
-	if (argbs[i] != NULL)
-	    free(argbs[i]);
-	if (andMasks[i] != NULL)
-	    free(andMasks[i]);
-	if (xorMasks[i] != NULL)
-	    free(xorMasks[i]);
-    }
-    free(argbs);
-    free(andMasks);
-    free(xorMasks);
-    free(widths);
-    free(heights);
-    
-    return( buf );
-#endif
-}
-
-
-
-
-
-
-
-
-void IoBmp_verbose ( )
-{
-  if ( _VERBOSE_BMP_ <= 0 )
-    _VERBOSE_BMP_ = 1;
-  else 
-    _VERBOSE_BMP_ += 1;
-}
-
-void IoBmp_noverbose ( )
-{
-  _VERBOSE_BMP_ = 0;
-}
-
-
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.h
deleted file mode 100644
index 4cfd33f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * iobmp.h - I procedures for BMP raw images
- *
- * $Id$
- *
- * Copyright INRIA
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- * Wed Oct  6 17:03:48 MET DST 1999
- *
- * ADDITIONS, CHANGES
- *
- *
- */
-
-#ifndef _bmp_h_
-#define _bmp_h_
-
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h> /* open, close */
-#include <sys/stat.h> /* open, close */
-#include <sys/types.h> /* open, close */
-#include <string.h>
-#include <CGAL/ImageIO.h>
-extern int readBmpImage(const char *name, _image *im);
-extern void *_readBmpImage( const char *name, int *dimx, int *dimy, int *dimz );
-int testBmpHeader(char *magic,const char *name);
-/** creates an return the file format structure associated with the BMP file format */
-PTRIMAGE_FORMAT createBMPFormat();
-
-extern void IoBmp_verbose ( );
-extern void IoBmp_noverbose ( );
-
-
-#endif /* _bmp_h_ */
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.cpp
deleted file mode 100644
index 8ca9373..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-
-/*
- * These functions read and write our basic integer types from a little-endian
- * file.  The endian and word-size of the host machine will not affect this
- * code.  The only assumption made is that the C data type (char) is one byte
- * long.  This should be a safe assumption.
- */
-
-#include <stdio.h>
-#include "bmptypes.h"
-#include "bmpendian.h"
-
-/*****************************************************************************
-*
-* Read functions.  All read functions take an open file pointer as the first
-* parameter and a pointer to data as the second parameter.  The return value
-* will be 0 on success, and EOF on failure.  If successful, the second
-* parameter will point to the data read.
-*/
-
-/*
- * The CGAL_INT8 and CGAL_UINT8 types are stored as a single byte on disk.  The INT8
- * type is a signed integer with range (-128..127).  The CGAL_UINT8 type is an
- * unsigned integer with range (0..255).
- */
-int readINT8little(FILE *f, CGAL_INT8 *i)
-{
-    int rc;
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    *i = (rc & 0xff);
-    return 0;
-}
-
-int readUINT8little(FILE *f, CGAL_UINT8 *i)
-{
-    int  rc;
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    *i = (rc & 0xff);
-    return 0;
-}
-
-
-/*
- * The CGAL_INT16 and CGAL_UINT16 types are stored as two bytes on disk.  The INT16 type
- * is a signed integer with range (-32768..32767).  The CGAL_UINT16 type is an
- * unisgned integer with range (0..65535).
- */
-int readINT16little(FILE *f, CGAL_INT16 *i)
-{
-    int rc;
-    CGAL_INT16 temp = 0;
-    
-    temp = (fgetc(f) & 0xff);
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    temp |= ((rc & 0xff) << 8);
-    *i = temp;
-    return 0;
-}
-
-int readUINT16little(FILE *f, CGAL_UINT16 *i)
-{
-    int rc;
-    CGAL_UINT16 temp = 0;
-    
-    temp = (fgetc(f) & 0xff);
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    temp |= ((rc & 0xff) << 8);
-    *i = temp;
-    return 0;
-}
-
-/*
- * The CGAL_INT32 and CGAL_UINT32 types are stored as four bytes on disk.  The INT32
- * type is a signed integer with range (-2147483648..2147483647).  The CGAL_UINT32
- * type is an unisgned integer with range (0..4294967295).
- */
-int readINT32little(FILE *f, CGAL_INT32 *i)
-{
-    int rc;
-    CGAL_INT32 temp = 0;
-    
-    temp = ((long)fgetc(f) & 0xff);
-    temp |= (((long)fgetc(f) & 0xff) << 8);
-    temp |= (((long)fgetc(f) & 0xff) << 16);
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    temp |= (((long)rc & 0xff) << 24);
-    *i = temp;
-    return 0;
-}
-
-int readUINT32little(FILE *f, CGAL_UINT32 *i)
-{
-    int rc;
-    CGAL_UINT32 temp = 0;
-    
-    temp = ((long)fgetc(f) & 0xff);
-    temp |= (((long)fgetc(f) & 0xff) << 8);
-    temp |= (((long)fgetc(f) & 0xff) << 16);
-    
-    rc = fgetc(f);
-    if (rc == EOF)
-	return rc;
-    
-    temp |= (((long)rc & 0xff) << 24);
-    *i = temp;
-    return 0;
-}
-
-/*****************************************************************************
-*
-* Write functions.  All write functions take an open file pointer as the first
-* parameter and a data as the second parameter.  The return value will be 0 on
-* success, and EOF on failure.  If successful, the second parameter will have
-* been written to the open file.
-*/
-
-int writeINT8little(FILE *f, CGAL_INT8 i)
-{
-    return fputc(i, f);
-}
-
-int writeUINT8little(FILE *f, CGAL_UINT8 i)
-{
-    return fputc(i, f);
-}
-
-int writeINT16little(FILE *f, CGAL_INT16 i)
-{
-    int rc;
-    
-    rc = fputc((i & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    return fputc(((i >> 8) & 0xff), f);
-}
-
-int writeUINT16little(FILE *f, CGAL_UINT16 i)
-{
-    int rc;
-    
-    rc = fputc((i & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    return fputc(((i >> 8) & 0xff), f);
-}
-
-int writeINT32little(FILE *f, CGAL_INT32 i)
-{
-    int rc;
-    
-    rc = fputc((i & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    rc = fputc(((i >> 8) & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    rc = fputc(((i >> 16) & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    return fputc(((i >> 24) & 0xff), f);
-}
-
-
-int writeUINT32little(FILE *f, CGAL_UINT32 i)
-{
-    int rc;
-    
-    rc = fputc((i & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    rc = fputc(((i >> 8) & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    rc = fputc(((i >> 16) & 0xff), f);
-    if (rc == EOF)
-	return rc;
-    
-    return fputc(((i >> 24) & 0xff), f);
-}
-
-/*
- * Formatting information for emacs in c-mode
- *
- * Local Variables:
- * c-indent-level:4
- * c-continued-statement-offset:4
- * c-brace-offset:-4
- * c-brace-imaginary-offset:0
- * c-argdecl-indent:4
- * c-label-offset:-4
- * End:
- */
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.h
deleted file mode 100644
index 76a7fb6..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpendian.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*
- * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
- * author Dr. Dobb's
- */
-
-/*
- * This is the header for endian.c - functions to read/write our
- * CGAL_INT8, CGAL_INT16 and CGAL_INT32 types from/to a little-endian file.
- */
-
-#ifndef __ENDIAN_H_INCLUDED__
-#define __ENDIAN_H_INCLUDED__
- 
-/*
- * Read the basic types as little-endian values.  The return value will be
- * zero if successful, EOF, otherwise.
- */
-extern int readINT8little(FILE *f, CGAL_INT8 *i);
-extern int readINT16little(FILE *f, CGAL_INT16 *i);
-extern int readINT32little(FILE *f, CGAL_INT32 *i);
-extern int readUINT8little(FILE *f, CGAL_UINT8 *i);
-extern int readUINT16little(FILE *f, CGAL_UINT16 *i);
-extern int readUINT32little(FILE *f, CGAL_UINT32 *i);
-
-/*
- * Write the basic types as little-endian values.  The return value will be
- * zero if successful, EOF otherwise.
- */
-int writeINT8little(FILE *f, CGAL_INT8 i);
-int writeINT16little(FILE *f, CGAL_INT16 i);
-int writeINT32little(FILE *f, CGAL_INT32 i);
-int writeUINT8little(FILE *f, CGAL_UINT8 i);
-int writeUINT16little(FILE *f, CGAL_UINT16 i);
-int writeUINT32little(FILE *f, CGAL_UINT32 i);
-
-#endif  /* __ENDIAN_H_INCLUDED__ */
-
-
-/*
- * Formatting information for emacs in c-mode
- *
- * Local Variables:
- * c-indent-level:4
- * c-continued-statement-offset:4
- * c-brace-offset:-4
- * c-brace-imaginary-offset:0
- * c-argdecl-indent:4
- * c-label-offset:-4
- * End:
- */
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.cpp
deleted file mode 100644
index 2e7d28f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.cpp
+++ /dev/null
@@ -1,1225 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*
- * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
- * author Dr. Dobb's
- */
-
-/*
- * This file contains mid-level functions for reading bitmap structures and
- * high-level functions that read bitmap files.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "bmptypes.h"
-#include "bmpendian.h"
-#include "bmpread.h"
-
-/*****************************************************************************
- *
- * Mid-level functions.
- *
- * These functions read in the various structures defined in bmptypes.h.  Each
- * function assumes that the file pointer is positioned at the start of the
- * given structure.  Upon completion, each function will leave the file
- * pointer positioned on the byte immediately following the structure.  Return
- * values will be 0 for success and non-zero for failure.  In all cases, a
- * return value of non-zero means that the file position has been left in an
- * indeterminate state and further reading should not be attempted.
- */
-
-/*
- * Read a Bitmapfileheader structure.
- */
-int readBitmapFileHeader(FILE *fp, Bitmapfileheader *bfh)
-{
-    int rc;
-  
-    rc = readUINT16little(fp, &(bfh->type));
-    if (rc != 0)
-	return rc;
-    
-    rc = readUINT32little(fp, &(bfh->size));
-    if (rc != 0)
-	return rc;
-    
-    rc = readINT16little(fp, &(bfh->xHotspot));
-    if (rc != 0)
-	return rc;
-    
-    rc = readINT16little(fp, &(bfh->yHotspot));
-    if (rc != 0)
-	return rc;
-    
-    rc = readUINT32little(fp, &(bfh->offsetToBits));
-    return rc;
-}
-
-/*
- * Read a BITMAPARRAYHEADER
- */
-int readBitmapArrayHeader(FILE *fp, BITMAPARRAYHEADER *bah)
-{
-    int rc;
-    
-    rc = readUINT16little(fp, &(bah->type));
-    if (rc != 0)
-	return rc;
-    rc = readUINT32little(fp, &(bah->size));
-    if (rc != 0)
-	return rc;
-    rc = readUINT32little(fp, &(bah->next));
-    if (rc != 0)
-	return rc;
-    rc = readUINT16little(fp, &(bah->screenWidth));
-    if (rc != 0)
-	return rc;
-    rc = readUINT16little(fp, &(bah->screenHeight));
-    return rc;
-}
-
-/*
- * Read the BITMAPHEADER structure.  This one requires a bit of sanity
- * checking.  The length of the structure on the disk is specified in the
- * first field.  We must stop reading after that many bytes, and if that value
- * is longer than sizeof(BITMAPHEADER), we must skip over any leftover bytes.
- * Finally, if size is 12, then width an height are really 16-bit values, and
- * we have to read them differently so they'll be properly stored in the
- * 32-bit fields BITMAPHEADER uses.
- */
-int readBitmapHeader(FILE *fp, BITMAPHEADER *bh)
-{
-    int    rc, oldFormat;
-	unsigned int bytesRead;
-    CGAL_UINT16 tempVal;
-    
-    /*
-     * Clear the structure.  Default values for all fields are zeros.  This
-     * will prevent garbage from being returned if the structure is truncated
-     * on disk.
-     */
-    memset(bh, 0, sizeof(BITMAPHEADER));
-    
-    /*
-     * Read the size of the structure.  From here on in, we'll have to be sure
-     * we don't read more bytes than this value.
-     */
-    rc = readUINT32little(fp, &(bh->size));
-    if (rc != 0)
-	return rc;
-    bytesRead = 4;
-    
-    /*
-     * If the size is 12 bytes or less, than this is an "old format"
-     * structure.  So the width and height fields will have to be read
-     * differently.
-     */
-    if (bh->size <= 12)
-	oldFormat = 1;
-    else
-	oldFormat = 0;
-    
-    /*
-     * Width and height are read differently for old and new format files.  In
-     * the old format, they're 16-bit values.  In the new format, they're
-     * 32-bits long.
-     */
-    if (oldFormat)
-    {
-	rc = readUINT16little(fp, &tempVal);
-	if (rc != 0)
-	    return rc;
-	bh->width = tempVal;
-	bytesRead += 2;
-    }
-    else
-    {
-	rc = readINT32little(fp, &(bh->width));
-	if (rc != 0)
-	    return rc;
-	bytesRead += 4;
-    }
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    if (oldFormat)
-    {
-	rc = readUINT16little(fp, &tempVal);
-	if (rc != 0)
-	    return rc;
-	bh->height = tempVal;
-	bytesRead += 2;
-    }
-    else
-    {
-	rc = readINT32little(fp, &(bh->height));
-	if (rc != 0)
-	    return rc;
-	bytesRead += 4;
-    }
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    /*
-     * From this point on, old and new formats are identical to each other,
-     * and we can proceed as if there was no difference.  For each field, we
-     * read it in and increment the count of bytes read.  If at any time we
-     * have read the amount we got earlier (in the size field), then stop and
-     * leave the rest of the fields as zeros.
-     */
-    rc = readUINT16little(fp, &(bh->numBitPlanes));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT16little(fp, &(bh->numBitsPerPlane));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-  
-    /*
-     * Old format stop here.  But we don't have to check, because in that
-     * format, 12 bytes have been read and the function will have exited 
-     * without any extra checking.
-     */
-    rc = readUINT32little(fp, &(bh->compressionScheme));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->sizeOfImageData));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->xResolution));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->yResolution));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->numColorsUsed));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->numImportantColors));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT16little(fp, &(bh->resolutionUnits));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT16little(fp, &(bh->padding));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT16little(fp, &(bh->origin));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT16little(fp, &(bh->halftoning));
-    if (rc != 0)
-	return rc;
-    bytesRead += 2;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->halftoningParam1));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->halftoningParam2));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-  
-    rc = readUINT32little(fp, &(bh->colorEncoding));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    rc = readUINT32little(fp, &(bh->identifier));
-    if (rc != 0)
-	return rc;
-    bytesRead += 4;
-    if (bytesRead >= bh->size)
-	return 0;
-    
-    /*
-     * If there are more bytes in the file than this, then the file is using a
-     * future format that doesn't exist yet.  Skip over the bytes.  Assuming
-     * this future format somewhat resembles what we know now, ignoring the
-     * fields will be safe.  We _MUST_ skip them, though, since the color
-     * table begins on the byte after this structure, and we have to position
-     * the file pointer there.
-     */
-    return fseek(fp, (bh->size - bytesRead), SEEK_CUR);
-}
-
-
-/*
- * readRgb reads in a single RGB structure from the disk.  The numBytes field
- * indicates how many bytes the field occupies on the disk.  It assumes that
- * each component is one byte on disk and the rest is padding.  This will
- * compensate for the old/new differences in color tables.  (Old format
- * bitmaps use 3 bytes per entry, while new format bitmaps use 4.)  Note how
- * it will never read more than the number of bytes requested.
- */
-int readRgb(FILE *fp, RGB *rgb, int numBytes)
-{
-    int rc;
-    
-    if (numBytes == 0)
-	return 0;
-    rc = readUINT8little(fp, &(rgb->blue));
-    if (rc != 0)
-	return rc;
-    
-    if (numBytes == 1)
-	return 0;
-    rc = readUINT8little(fp, &(rgb->green));
-    if (rc != 0)
-	return rc;
-    
-    if (numBytes == 2)
-	return 0;
-    rc = readUINT8little(fp, &(rgb->red));
-    if (rc != 0)
-	return rc;
-    
-    if (numBytes == 3)
-	return 0;
-    
-    /* Skip over extra bytes if more than three were requested */
-    return fseek(fp, (numBytes - 3), SEEK_CUR);
-}
-
-/*
- * A color table is a block of RGB structures, all the same size.  Read it by
- * calling readRgb repeatedly.
- */
-int readColorTable(FILE *fp, RGB *rgb, int numEntries, int numBytesPerEntry)
-{
-    int i, rc;
-    
-    for (i=0; i<numEntries; i++)
-    {
-	rc = readRgb(fp, &(rgb[i]), numBytesPerEntry);
-	if (rc != 0)
-	    return rc;
-    }
-    return 0;
-}
-
-
-/*
- * ReadBitsUncompressed.  Reads pixel values into an array of RGB
- * values.  It assmes that there is no compression.  Note that there we're
- * only handling bit depths of 1, 4, 8, 16, and 24. Note that OS/2 bitmaps
- * can (in theory) have any number of bits per pixel, so you might find a
- * strange bitmap file that this can't handle, but the chances of finding such
- * a file this are nearly zero.
- *
- * Each row of pixels is always padded to a 4-byte boundary.
- */
-int readBitsUncompressed(FILE *fp, RGB *image, int width, int height,
-			 int depth, RGB *colorTable)
-{
-    CGAL_UINT8 temp;
-    int   rc, padBytes, i;
-    long  row, column, pixel, value;
-    
-    switch (depth) {
-    case 1:
-	/*
-	 * For 1 bit per pixel, each byte is 8 pixels.  Each one is an index
-	 * into the color table (1 or 0).  Most significant byte first.  All
-	 * is padded to 32-bit boundaries as well.
-	 */
-	pixel = 0;
-	if (((width % 32) == 0) || ((width % 32) > 24))
-	    padBytes = 0;
-	else if ((width % 32) <= 8)
-	    padBytes = 3;
-	else if ((width % 32) <= 16)
-	    padBytes = 2;
-	else
-	    padBytes = 1;
-
-	for (row = height; row > 0; row--)
-	{
-	    for (column = width; column > 0; column -= 8)
-	    {
-		rc = readUINT8little(fp, &temp);
-		if (rc != 0)
-		    return rc;
-		for (i=0; i < ((column < 8) ? column : 8); i++)
-		{
-		    /*
-		     * For each byte read, bit-decompose it.  Note that the
-		     * last byte on a row could have less than 8 bits used.
-		     * Most significant bits come first.
-		     */
-		    value = ((temp & (1 << (7-i))) == 0) ? 0 : 1;
-		    image[pixel].red   = colorTable[value].red;
-		    image[pixel].green = colorTable[value].green;
-		    image[pixel].blue  = colorTable[value].blue;
-		    pixel++;
-		}
-	    }
-	    if (padBytes != 0)
-	    {
-		rc = fseek(fp, padBytes, SEEK_CUR);
-		if (rc != 0)
-		    return rc;
-	    }
-	}
-	break;
-
-    case 4:
-	/*
-	 * For 4 bits per pixel, each byte is two pixels.  The upper half go to
-	 * the first pixel, and the lower half to the second.
-	 */
-	pixel = 0;
-	if (((width % 8) == 0) || ((width % 8) > 6))
-	    padBytes = 0;
-	else if ((width % 8) <= 2)
-	    padBytes = 3;
-	else if ((width % 8) <= 4)
-	    padBytes = 2;
-	else
-	    padBytes = 1;
-	
-	for (row = height; row > 0; row--)
-	{
-	    for (column = width; column > 0; column -= 2)
-	    {
-		/*
-		 * Each byte here is two pixels.  Note that the last byte on a
-		 * row may only contain one pixel.
-		 */
-		rc = readUINT8little(fp, &temp);
-		if (rc != 0)
-		    return rc;
-		/*
-		 * First pixel is the upper 4 bits
-		 */
-		value = temp >> 4;
-		image[pixel].red   = colorTable[value].red;
-		image[pixel].green = colorTable[value].green;
-		image[pixel].blue  = colorTable[value].blue;
-		pixel++;
-
-		/*
-		 * Second pixel is lower 4 bits.  If this is the last byte in
-		 * the row, and there are an odd number of pixels per row, then
-		 * this is not valid data.
-		 */
-		if (column == 1)
-		{
-		    value = temp & 0x0f;
-		    image[pixel].red   = colorTable[value].red;
-		    image[pixel].green = colorTable[value].green;
-		    image[pixel].blue  = colorTable[value].blue;
-		    pixel++;
-		}
-	    }
-	    if (padBytes != 0)
-	    {
-		rc = fseek(fp, padBytes, SEEK_CUR);
-		if (rc != 0)
-		    return rc;
-	    }
-	}
-	break;
-
-    case 8:
-	/*
-	 * For 8 bits per pixel, each byte is one pixel.
-	 */
-	pixel = 0;
-	padBytes = ((width % 4) == 0) ? 0 : (4 - (width % 4));
-
-	for (row=height; row > 0; row--)
-	{
-	    for (column=width; column > 0; column--)
-	    {
-		rc = readUINT8little(fp, &temp);
-		if (rc != 0)
-		    return rc;
-		image[pixel].red   = colorTable[temp].red;
-		image[pixel].green = colorTable[temp].green;
-		image[pixel].blue  = colorTable[temp].blue;
-		pixel++;
-	    }
-	    if (padBytes != 0)
-	    {
-		rc = fseek(fp, padBytes, SEEK_CUR);
-		if (rc != 0)
-		    return rc;
-	    }
-	}
-	break;
-
-    case 16:
-	/*
-	 * For 16 bits per pixel, you must read two bytes per pixel.  But
-	 * there's a catch. The data is big endian!  This is because all pixel
-	 * data (for all formats, actually) is stored as a packed array,
-	 * stored in pixel order.
-	 */
-	pixel = 0;
-	padBytes = ((width % 2) == 0) ? 0 : 2;
-	for (row=height; row > 0; row--)
-	{
-	    for (column=width; column > 0; column--)
-	    {
-		/*
-		 * Read a 16-bit integer as big endian.  Do this by reading
-		 * two bytes and mathematically combine them.  After that,
-		 * proceed as usual.
-		 */
-		rc = readUINT8little(fp, &temp);
-		if (rc != 0)
-		    return rc;
-		value = ((long)temp) << 8;
-		rc = readUINT8little(fp, &temp);
-		if (rc != 0)
-		    return rc;
-		value |= temp;
-
-		image[pixel].red   = colorTable[value].red;
-		image[pixel].green = colorTable[value].green;
-		image[pixel].blue  = colorTable[value].blue;
-		pixel++;
-	    }
-	    if (padBytes != 0)
-	    {
-		rc = fseek(fp, padBytes, SEEK_CUR);
-		if (rc != 0)
-		    return rc;
-	    }
-	}
-	break;
-
-    case 24:
-	/*
-	 * For 24 bits per pixel, it's an RGB structure.  Note that the color
-	 * table is ignore for bit depths greater than 24 bits.
-	 */
-	pixel = 0;
-	padBytes = width % 4;
-
-	for (row=height; row > 0; row--)
-	{
-	    for (column=width; column > 0; column--)
-	    {
-		rc = readRgb(fp, image+pixel, 3);
-		pixel++;
-	    }
-	    if (padBytes != 0)
-	    {
-		rc = fseek(fp, padBytes, SEEK_CUR);
-		if (rc != 0)
-		    return rc;
-	    }
-	}          
-	break;
-    }
-    
-    return 0;
-}
-
-
-/*
- * ReadMaskBitsUncompressed.  Reads a monochrome mask into an array of
- * characters.  It assmes that there is no compression.  This is very similar
- * (internally) to the readBitsUncompressed function.  Note that if the data
- * read isn't really one-bit-deep data, you'll probably get garbage back.
- */
-int readMaskBitsUncompressed(FILE *fp, char *image, int width, int height)
-{
-    CGAL_UINT8 temp;
-    int   rc, padBytes, i;
-    long  row, column, pixel;
-    char value;
-    
-    /*
-     * see the one-bit-depth part of readBitsUncompressed for comments
-     */
-    pixel = 0;
-    if (((width % 32) == 0) || ((width % 32) > 24))
-	padBytes = 0;
-    else if ((width % 32) <= 8)
-	padBytes = 3;
-    else if ((width % 32) <= 16)
-	padBytes = 2;
-    else
-	padBytes = 1;
-
-    for (row = height; row > 0; row--)
-    {
-	for (column = width; column > 0; column -= 8)
-	{
-	    rc = readUINT8little(fp, &temp);
-	    if (rc != 0)
-		return rc;
-	    for (i=0; i < ((column < 8) ? column : 8); i++)
-	    {
-		value = ((temp & (1 << (7-i))) == 0) ? 0 : 1;
-		image[pixel] = value;
-		pixel++;
-	    }
-	}
-	if (padBytes != 0)
-	{
-	    rc = fseek(fp, padBytes, SEEK_CUR);
-	    if (rc != 0)
-		return rc;
-	}
-    }
-
-    return 0;
-}
-
-
-/*
- * reflectYRGB takes an array of RGB vales and the dimensions they represent
- * and flips it vertically.  This will convert a bottom-left origin array to a
- * top-left origin array.
- */
-void reflectYRGB(RGB *image, int width, int height)
-{
-    int row, col;
-    RGB temp;
-    
-    for (row = 0; row < (height / 2); row++)
-    {
-	for (col = 0; col < width; col++)
-	{
-	    /* Swap pixels at (x,y) with (x,height-y) */
-	    memcpy(&temp, image+(row * width + col), sizeof(RGB));
-	    memcpy(image+(row * width + col),
-		   image+((height - row - 1) * width + col), sizeof(RGB));
-	    memcpy(image+((height - row - 1) * width + col), &temp,
-		   sizeof(RGB));
-	}
-    }
-}
-/*
- * reflectYchar takes an array of char values and the dimensions they
- * represent and flips it vertically.  This will convert a bottom-left origin
- * array to a top-left origin array.
- */
-void reflectYchar(char *image, int width, int height)
-{
-    int row, col;
-    char temp;
-    
-    for (row = 0; row < (height / 2); row++)
-    {
-	for (col = 0; col < width; col++)
-	{
-	    /* Swap values at (x,y) with (x,height-y) */
-	    temp = image[row * width + col];
-	    image[row * width + col]=image[(height - row - 1) * width + col];
-	    image[(height - row - 1) * width + col] = temp;
-	}
-    }
-}
-
-/*****************************************************************************
- *
- * High-level functions
- *
- * These functions read in specific types of bitmap files.  Each assumes that
- * the file pointer is positioned at the appropriate place in a bitmap file.
- * (At the start of a Bitmapfileheader for all functions except
- * readMultipleImages, which assumes the file pointer to be positioned on the
- * start of a BITMAPARRAYHEADER.  These functions will leave the file pointer
- * on the byte after the image's color table.
- *
- * The coordinate speaces in the returned arrays will have an upper-left
- * origin.   As before, a non-zero return value indicates that something went
- * wrong.
- *
- * Note that the BMP and mono-ICO functions will not return 1000 if the image
- * is of type color-icon.  This is because a color icon consists of a bitmap
- * and a monochrome icon.
- *
- * return values:
- *	   0 - success
- *	1000 - incorrect file type for the routine called
- *	1001 - image data out of range or damaged file
- *	1002 - good data, but the routine called can't handle it (yet)
- *	1003 - out of memory allocating color table
- *	1004 - out of memory allocating image
- *	1005 - out of memory allocating image arrays
- *	1006 - Illegal image type in a multi-image array
- *
- *     other - I/O error of some kind
- */
-
-
-/*
- * readSingleImageBMP will read a single BMP image and generate an array of RGB
- * triples that contain the RGB values for every pixel.  It will also return
- * the dimensions of the image.
- */
-int readSingleImageBMP(FILE *fp, RGB **argb, CGAL_UINT32 *width, CGAL_UINT32 *height)
-{
-    Bitmapfileheader  bfh;
-    BITMAPHEADER      bh;
-    RGB              *colorTable = (RGB*)NULL;
-    RGB              *image = (RGB*)NULL;
-    int               rc, depth, inverted;
-    long              numColors, numPixels, endPos;
-    
-    /*
-     * First, get the file header and sanity check it.  The type field must be
-     * TYPE_BMP or we're aborting.
-     */
-    rc = readBitmapFileHeader(fp, &bfh);
-    if (rc != 0)
-	return rc;
-    if ((bfh.type != TYPE_BMP) &&
-	(bfh.type != TYPE_ICO_COLOR) &&
-	(bfh.type != TYPE_PTR_COLOR))
-	return 1000;
-    
-    /*
-     * Immediately following a file header is always the bitmap header.  Read
-     * it.  Sanity check any values we might need.  Specifically, less than
-     * 32-bit depth, known compression scheme, known origin, and known color
-     * encoding, and valid height/width.  Note that negative height is OK,
-     * that indicates an upper-left origin for a Windows bitmap.
-     */
-    rc = readBitmapHeader(fp, &bh);
-    if (rc != 0)
-	return rc;
-    depth = bh.numBitPlanes * bh.numBitsPerPlane;
-    if ((depth > 32) ||
-	(bh.compressionScheme > COMPRESSION_LAST) ||
-	(bh.origin > ORIGIN_LAST) ||
-	(bh.colorEncoding > COLOR_ENCODING_LAST) ||
-	(bh.width < 1) ||
-	(bh.height == 0))
-	return 1001;
-    
-    /*
-     * If the height is negative, then this is a Windows bitmap whose origin
-     * is the upper-left corner and not the lower-left.  The inverted flag
-     * indicates a lower-left origin.  Our code will be outputting an
-     * upper-left origin pixel array.
-     */
-    if (bh.height < 0)
-    {
-	inverted = 0;
-	bh.height = -bh.height;
-    }
-    else
-	inverted = 1;
-    
-    /*
-     * Now, sanity check a few fields that are valid, but I don't have code to
-     * deal with them yet.  This includes: more than one bit plane, any
-     * compression scheme, and bit depths that are not 1, 4, 8, 16, or 24.
-     */
-    if ((bh.numBitPlanes > 1) ||
-	((bh.numBitsPerPlane != 1) &&
-	 (bh.numBitsPerPlane != 4) &&
-	 (bh.numBitsPerPlane != 8) &&
-	 (bh.numBitsPerPlane != 16) &&
-	 (bh.numBitsPerPlane != 24)) ||
-	(bh.compressionScheme != COMPRESSION_NONE))
-	return 1002;
-    
-    /*
-     * Allocate and read the color table.  The file pointer has been
-     * positioned in the right place by the readBitmapHeader function.  Note
-     * that images with 24-bits or more color depth have no color table.  They
-     * are  already RGB.  When reading the color table, be sure to check for
-     * old/new format bitmaps. 
-     */
-    if (depth < 24)
-    {
-	numColors = 1 << depth;
-	colorTable = (RGB *)calloc(numColors, sizeof(RGB));
-	if (colorTable == NULL)
-	    return 1003;
-	if (bh.size <= 12)
-	    rc = readColorTable(fp, colorTable, numColors, 3);
-	else
-	    rc = readColorTable(fp, colorTable, numColors, 4);
-	if (rc != 0)
-	{
-	    free(colorTable);
-	    return rc;
-	}
-    }
-    
-    /*
-     * We're at the end of the color table.  Preserve this position.  We'll
-     * need to leave the file pointer there before returning from this
-     * function. 
-     */
-    endPos = ftell(fp);
-
-    /*
-     * Allocate the array of pixels and fill it in.
-     */
-    numPixels = bh.width * bh.height;
-    image = (RGB *)calloc(numPixels, sizeof(RGB));
-    if (image == NULL)
-    {
-	free (colorTable);
-	return 1004;
-    }
-    
-    /*
-     * Seek to the bits
-     */
-    rc = fseek(fp, bfh.offsetToBits, SEEK_SET);
-    if (rc != 0)
-    {
-	free (colorTable);
-	free (image);
-	return rc;
-    }
-    
-    /*
-     * Read the bits.  If code for decompressing bits should be written,
-     * insert the call here.
-     */
-    switch ((int)bh.compressionScheme) {
-    case COMPRESSION_NONE:
-	rc = readBitsUncompressed(fp, image, bh.width, bh.height, depth,
-				  colorTable);
-	break;
-    }
-    
-    if (rc != 0)
-    {
-	free(image);
-	return rc;
-    }
-    
-    /*
-     * If the origin is lower-left, flip the image upside down
-     */
-    if (inverted)
-	reflectYRGB(image, bh.width, bh.height);
-
-    /*
-     * Return the output values.  Set the file pointer to the byte after the
-     * color table.
-     */
-    *argb = image;
-    *width = bh.width;
-    *height = bh.height;
-    fseek(fp, endPos, SEEK_SET);
-
-    /*
-     * Clean up and return.  Note that we don't return the color table.  This
-     * is because we're returning an array of RGB values for the image - such
-     * a table would be redundant.
-     */
-    if (colorTable != NULL)
-	free(colorTable);
-
-    return 0;
-}
-
-
-/*
- * Read in a monochrome OS/2 icon/pointer.  return two arrays of bytes
- * (interpreted as booleans) for the XOR and AND masks.
- */
-int readSingleImageICOPTR(FILE *fp, char **xorMask, char **andMask,
-		          CGAL_UINT32 *width, CGAL_UINT32 *height) 
-{
-    Bitmapfileheader  bfh;
-    BITMAPHEADER      bh;
-    char             *mask1, *mask2;
-    int               rc;
-    long              numPixels, endPos;
-
-    /*
-     * Read and sanity check the header.  Monochrom OS/2 icons are TYPE_ICO.
-     * Monochrome pointers are TYPE_PTR.  Color ICO and PTR is also allowed,
-     * because monochrome masks are part of those images.
-     */
-    rc = readBitmapFileHeader(fp, &bfh);
-    if (rc != 0)
-	return rc;
-    if ((bfh.type != TYPE_ICO) &&
-	(bfh.type != TYPE_PTR) &&
-	(bfh.type != TYPE_ICO_COLOR) &&
-	(bfh.type != TYPE_PTR_COLOR))
-	return 1000;
-
-    /*
-     * Now read the bitmap data and sanity check it.  Since this is a
-     * monochrome icon, bit depth must be 1.  Additionally, a known
-     * compression scheme, known origin, known color encoding, and valid
-     * height/width.  Height can't be less than 0, as it can with color
-     * images, since this code is only used on for OS/2-type images.
-     */
-    rc = readBitmapHeader(fp, &bh);
-    if (rc != 0)
-	return rc;
-    if ((bh.numBitPlanes != 1) ||
-	(bh.numBitsPerPlane != 1) ||
-	(bh.compressionScheme > COMPRESSION_LAST) ||
-	(bh.origin > ORIGIN_LAST) ||
-	(bh.colorEncoding > COLOR_ENCODING_LAST) ||
-	(bh.width < 1) ||
-	(bh.height < 1))
-	return 1001;
-
-    /*
-     * Sanity check some valid fields that I can't deal with yet.
-     */
-    if (bh.compressionScheme != COMPRESSION_NONE)
-	return 1002;
-
-    /*
-     * Skip over the color table, since this is a monochrome mask.  Note that
-     * the size is already known - 2 entries - which is 6 or 8 bytes.
-     * this isn't, and we don't.
-     */
-    if (bh.size <= 12)
-	rc = fseek(fp, 6, SEEK_CUR);
-    else
-	rc = fseek(fp, 8, SEEK_CUR);
-    if (rc != 0)
-    {
-	return rc;
-    }
-
-    /*
-     * Save this file position.  we'll have to seek back to it after reading
-     * in the image data.
-     */
-    endPos = ftell(fp);
-
-    /*
-     * The image is actually two images.  The top half is an AND mask and the
-     * bottom half is an XOR mask.  Allocate the images.
-     */
-    numPixels = bh.width * bh.height / 2;
-    mask1 = (char *)malloc(numPixels);
-    if (mask1 == NULL)
-	return 1004;
-    mask2 = (char *)malloc(numPixels);
-    if (mask2 == NULL)
-    {
-	free(mask1);
-	return 1004;
-    }
-
-    /*
-     * Seek to the bit data
-     */
-    rc = fseek(fp, bfh.offsetToBits, SEEK_SET);
-    if (rc != 0)
-    {
-	free (mask1);
-	free (mask2);
-	return rc;
-    }
-
-    /*
-     * Read in the bits.  Note: since these are really two images, two calls
-     * to readMaskBitsUncompressed are made, and the height used is 1/2 the
-     * height mentioned in the header.
-     */
-    switch ((int) bh.compressionScheme) {
-    case COMPRESSION_NONE:
-	rc = readMaskBitsUncompressed(fp, mask1, bh.width, bh.height/2);
-	if (rc == 0)
-	    rc = readMaskBitsUncompressed(fp, mask2, bh.width, bh.height/2);
-	break;
-    }
-
-    if (rc != 0)
-    {
-	free (mask1);
-	free (mask2);
-	return rc;
-    }
-
-    /*
-     * A mask will never have an upper-left origin, since Windows will never
-     * produce one in a bitmap file.
-     */
-    reflectYchar(mask1, bh.width, bh.height / 2);
-    reflectYchar(mask2, bh.width, bh.height / 2);
-
-    /*
-     * Return everything we've read.
-     */
-    *xorMask = mask1;
-    *andMask = mask2;
-    *width = bh.width;
-    *height = bh.height / 2;
-    fseek(fp, endPos, SEEK_SET);
-    
-    return 0;
-}
-
-
-/*
- * Read in a color OS/2 icon.  return an array of RGBs for the colors.
- * and two arrays of bytes (interpreted as booleans) for the XOR and AND
- * masks.
- */
-int readSingleImageColorICOPTR(FILE *fp, RGB **argb, char **xorMask,
-			       char **andMask, CGAL_UINT32 *width, CGAL_UINT32 *height)
-{
-    CGAL_UINT32 width1, height1, width2, height2;
-    int rc;
-
-    /*
-     * Color icons consist of a monochrome icon followed by a bitmap.  This
-     * makes reading them easy - first do a monochrome mask read, and then do
-     * a color bitmap read.  We should probably add some more descriptive
-     * error codes here.
-     *
-     * First read the mask.
-     */
-    rc = readSingleImageICOPTR(fp, xorMask, andMask, &width2, &height2);
-    if (rc != 0)
-    {
-	return rc;
-    }
-
-    /*
-     * Next, read the color bitmap part
-     */
-    rc = readSingleImageBMP(fp, argb, &width1, &height1);
-    if (rc != 0)
-    {
-	return rc;
-    }
-
-    /*
-     * Now, just sanity check the image - the dimensions for the image should
-     * match the dimensions of the masks.
-     */
-    if ((width1 != width2) || (height1 != height2))
-	return 1001;
-
-    *width = width1;
-    *height = height1;
-    return 0;
-}
-
-
-/*
- * readMultipleImage runs down the list of images in a file and returns them
- * all.  ImageCount is the number of images in the file.  The other returned
- * values are parallel arrays.  If an element in aargb, axorMask, or aandMask
- * is NULL, then that image has no such array.  (Bitmaps have no xor or and
- * masks, monochrome icons have no color arrays.
- *
- * Note that on errors other than 1000 and 1005, the arrays will contain good
- * data - the images that have been read properly will be in the arrays.
- * Images that have not yet been read will consist of NULL pointers in the
- * arrays. 
- */
-int readMultipleImage(FILE *fp, RGB ***argbs, char ***xorMasks,
-		      char ***andMasks, CGAL_UINT32 **widths, CGAL_UINT32 **heights,
-		      int *imageCount)
-{
-    int rc;
-    long filePos;
-    BITMAPARRAYHEADER bah;
-    CGAL_UINT16 imageType;
-    int count;
-    
-    /*
-     * First count the images.  Preserve the file position for later.  If some
-     * structure in the list isn't an array header, return 1000.
-     */
-    filePos = ftell(fp);
-    count = 0;
-    do
-    {
-	rc = readBitmapArrayHeader(fp, &bah);
-	if (rc != 0)
-	    return rc;
-	if (bah.type != TYPE_ARRAY)
-	    return 1000;
-	fseek(fp, bah.next, SEEK_SET);
-	count++;
-    } while (bah.next != 0);
-    fseek(fp, filePos, SEEK_SET);
-    
-    /*
-     * Allocate the arrays.  Return 1005 on any failures
-     */
-    *argbs = (RGB **)calloc(count, sizeof(RGB *));
-    if (*argbs == NULL)
-	return 1005;
-    *xorMasks = (char **)calloc(count, sizeof(char *));
-    if (*xorMasks == NULL)
-    {
-	free(*argbs);
-	return 1005;
-    }
-    *andMasks = (char **)calloc(count, sizeof(char *));
-    if (*andMasks == NULL)
-    {
-	free(*argbs);
-	free(*xorMasks);
-	return 1005;
-    }
-    *widths = (CGAL_UINT32 *)calloc(count, sizeof(CGAL_UINT32));
-    if (*widths == NULL)
-    {
-	free(*argbs);
-	free(*xorMasks);
-	free(*andMasks);
-	return 1005;
-    }
-    *heights = (CGAL_UINT32 *)calloc(count, sizeof(CGAL_UINT32));
-    if (*heights == NULL)
-    {
-	free(*argbs);
-	free(*xorMasks);
-	free(*andMasks);
-	free(*widths);
-	return 1005;
-    }
-    *imageCount = count;
-
-    /*
-     * Loop through the images again.  This time, read each image
-     */
-    count = 0;
-    do
-    {
-	rc = readBitmapArrayHeader(fp, &bah);
-	if (rc != 0)
-	    return rc;
-	/*
-	 * Get the image type.  Preserve the position, since we're reading
-	 * into the next structure.
-	 */
-	filePos = ftell(fp);
-	rc = readUINT16little(fp, &imageType);
-	if (rc != 0)
-	    return rc;
-	rc = fseek(fp, filePos, SEEK_SET);
-
-	/*
-	 * Now that we know what kind of image we're about to read, read it. 
-	 */
-	switch(imageType) {
-	case TYPE_BMP:
-	    rc = readSingleImageBMP(fp, (*argbs)+count, (*widths)+count,
-				    (*heights)+count);
-	    break;
-	case TYPE_ICO:
-	case TYPE_PTR:
-	    rc = readSingleImageICOPTR(fp, (*xorMasks)+count,
-				       (*andMasks)+count, (*widths)+count,
-				       (*heights)+count);
-	    break;
-	case TYPE_ICO_COLOR:
-	case TYPE_PTR_COLOR:
-	    rc = readSingleImageColorICOPTR(fp, (*argbs)+count,
-					    (*xorMasks)+count,
-					    (*andMasks)+count,
-					    (*widths)+count,
-					    (*heights)+count);
-	    break;
-	default:
-	    return 1006;
-	}
-	if (rc != 0)
-	    return rc;
-	
-	fseek(fp, bah.next, SEEK_SET);
-	count++;
-    } while (bah.next != 0);
-
-    return 0;
-}
-
-
-/*
- * Formatting information for emacs in c-mode
- *
- * Local Variables:
- * c-indent-level:4
- * c-continued-statement-offset:4
- * c-brace-offset:-4
- * c-brace-imaginary-offset:0
- * c-argdecl-indent:4
- * c-label-offset:-4
- * End:
- */
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.h
deleted file mode 100644
index 71b3d2f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmpread.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*
- * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
- * author Dr. Dobb's
- */
-
-/*
- * This is the header for readbmp.c - functions to read the bitmap file
- * structures.  See readbmp.c for details.
- */
-
-#ifndef __READBMP_H_INCLUDED__
-#define __READBMP_H_INCLUDED__
-
-/*
- * Mid-level functions
- */
-int readBitmapFileHeader(FILE *fp, Bitmapfileheader *bfh);
-int readBitmapArrayHeader(FILE *fp, BITMAPARRAYHEADER *bah);
-int readBitmapHeader(FILE *fp, BITMAPHEADER *bh);
-int readRgb(FILE *fp, RGB *rgb, int numBytes);
-int readColorTable(FILE *fp, RGB *rgb, int numEntries, int numBytesPerEntry);
-
-int readBitsUncompressed(FILE *fp, RGB *image, int width, int height,
-			 int depth, RGB* colorTable);
-int readMaskBitsUncompressed(FILE *fp, char *image, int width, int height);
-
-void reflectYRGB(RGB *image, int width, int height);
-void reflectYchar(char *image, int width, int height);
-
-/*
- * High level functions.
- */
-int readSingleImageBMP(FILE *fp, RGB **argb, CGAL_UINT32 *width, CGAL_UINT32 *height);
-int readSingleImageICOPTR(FILE *fp, char **xorMask, char **andMask,
-		          CGAL_UINT32 *width, CGAL_UINT32 *height);
-int readSingleImageColorICOPTR(FILE *fp, RGB **argb, char **xorMask,
-			       char **andMask, CGAL_UINT32 *width, CGAL_UINT32 *height);
-int readMultipleImage(FILE *fp, RGB ***argbs, char ***xorMasks,
-		      char ***andMasks, CGAL_UINT32 **widths, CGAL_UINT32 **heights,
-		      int *imageCount);
-
-#endif
-
-/*
- * Formatting information for emacs in c-mode
- *
- * Local Variables:
- * c-indent-level:4
- * c-continued-statement-offset:4
- * c-brace-offset:-4
- * c-brace-imaginary-offset:0
- * c-argdecl-indent:4
- * c-label-offset:-4
- * End:
- */
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.cpp
deleted file mode 100644
index b1223ca..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.cpp
+++ /dev/null
@@ -1,481 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * convert.c - conversion between types
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * ADDITIONS, CHANGES
- *
- * - Tue Feb 22 11:25:39 MET 2000 (G. Malandain)
- *   add in ConvertBuffer():
- *       USHORT to UCHAR
- *       USHORT to SHORT
- *
- */
-
-#include "convert.h"
-
-void ConvertBuffer( void *bufferIn,
-		    bufferType typeIn,
-		    void *bufferOut,
-		    bufferType typeOut,
-		    int bufferLength )
-{
-  const char *proc = "ConvertBuffer";
-  register int i, min, max;
-  register u8 *u8buf;
-  register s8 *s8buf;
-  register u16 *u16buf;
-  register s16 *s16buf;
-  register s32 *s32buf;
-  register r32 *r32buf;
-  register r64 *r64buf;
-
-  if ( (typeOut == typeIn) && (bufferOut == bufferIn) )
-    return;
-
-  if ( bufferLength <= 0 ) {
-    fprintf( stderr, " Fatal error in %s: buffer length is negative or zero.\n", 
-	     proc );
-    return;
-  }
-  if ( (bufferIn == (void*)NULL) || (bufferOut == (void*)NULL) ) {
-    fprintf( stderr, " Fatal error in %s: NULL buffer(s).\n", 
-	     proc );
-    return;
-  }
-  
-  switch ( typeOut ) {
-  case CGAL_SCHAR :
-    s8buf = (s8*)bufferOut;
-    min = -128; max = 127;
-    switch( typeIn ) {
-    case CGAL_SCHAR :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s8) );
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, s8buf++, r32buf++ ) {
-	if ( *r32buf < min ) *s8buf = min;
-	else if ( *r32buf < 0.0 ) *s8buf = (int)(*r32buf - 0.5);
-	else if ( *r32buf < max ) *s8buf = (int)(*r32buf + 0.5);
-	else *s8buf = max;
-      }
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, s8buf++, r64buf++ ) {
-	if ( *r64buf < min ) *s8buf = min;
-	else if ( *r64buf < 0.0 ) *s8buf = (int)(*r64buf - 0.5);
-	else if ( *r64buf < max ) *s8buf = (int)(*r64buf + 0.5);
-	else *s8buf = max;
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_SCHAR */
-
-
-
-
-    
-  case CGAL_UCHAR :
-    u8buf = (u8*)bufferOut;
-    min = 0; max = 255;
-    switch( typeIn ) {
-    case CGAL_UCHAR :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(u8) );
-      break;
-    case CGAL_USHORT :
-      u16buf = (u16*)bufferIn;
-      for (i=bufferLength; i>0; i--, u8buf++, u16buf++ ) {
-	if ( *u16buf < max ) *u8buf = (u8)*u16buf;
-	else *u8buf = max;
-      }
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, u8buf++, r32buf++ ) {
-	if ( *r32buf < min ) *u8buf = min;
-	else if ( *r32buf < max ) *u8buf = (int)(*r32buf + 0.5);
-	else *u8buf = max;
-      }
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, u8buf++, r64buf++ ) {
-	if ( *r64buf < min ) *u8buf = min;
-	else if ( *r64buf < max ) *u8buf = (int)(*r64buf + 0.5);
-	else *u8buf = max;
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_UCHAR */
-
-
-
-
-
-    
-  case CGAL_SSHORT :
-    s16buf = (s16*)bufferOut;
-    min = -32768; max = 32767;
-    switch( typeIn ) {
-    case CGAL_SSHORT :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s16) );
-      break;
-    case CGAL_USHORT :
-      u16buf = (u16*)bufferIn;
-      for (i=bufferLength; i>0; i--, s16buf++, u16buf++ ) {
-	if ( *u16buf < max ) *s16buf = (s16)*u16buf;
-	else *s16buf = max;
-      }
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, s16buf++, r32buf++ ) {
-	if ( *r32buf < min ) *s16buf = min;
-	else if ( *r32buf < 0.0 ) *s16buf = (int)(*r32buf - 0.5);
-	else if ( *r32buf < max ) *s16buf = (int)(*r32buf + 0.5);
-	else *s16buf = max;
-      }
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, s16buf++, r64buf++ ) {
-	if ( *r64buf < min ) *s16buf = min;
-	else if ( *r64buf < 0.0 ) *s16buf = (int)(*r64buf - 0.5);
-	else if ( *r64buf < max ) *s16buf = (int)(*r64buf + 0.5);
-	else *s16buf = max;
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_SSHORT */
-
-
-
-
-    
-  case CGAL_USHORT :
-    u16buf = (u16*)bufferOut;
-    min = 0; max = 65535;
-    switch( typeIn ) {
-    case CGAL_USHORT :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(u16) );
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, u16buf++, r32buf++ ) {
-	if ( *r32buf < min ) *u16buf = min;
-	else if ( *r32buf < 0.0 ) *u16buf = (int)(*r32buf - 0.5);
-	else if ( *r32buf < max ) *u16buf = (int)(*r32buf + 0.5);
-	else *u16buf = max;
-      }
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, u16buf++, r64buf++ ) {
-	if ( *r64buf < min ) *u16buf = min;
-	else if ( *r64buf < 0.0 ) *u16buf = (int)(*r64buf - 0.5);
-	else if ( *r64buf < max ) *u16buf = (int)(*r64buf + 0.5);
-	else *u16buf = max;
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_USHORT */
-
-
-
-
-
-    
-  case CGAL_INT :
-    s32buf = (s32*)bufferOut;
-    switch( typeIn ) {
-    case CGAL_INT :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s32) );
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, s32buf++, r32buf++ ) {
-	*s32buf = (int)(*r32buf);
-      }
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, s32buf++, r64buf++ ) {
-	*s32buf = (int)(*r64buf);
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_INT */
-
-
-
-
-
-    
-  case CGAL_FLOAT :
-    r32buf = (r32*)bufferOut;
-    switch( typeIn ) {
-    case CGAL_UCHAR :
-      u8buf = (u8*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, u8buf++ ) {
-	*r32buf = (float)(*u8buf);
-      }
-      break;
-    case CGAL_SCHAR :
-      s8buf = (s8*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, s8buf++ ) {
-	*r32buf = (float)(*s8buf);
-      }
-      break;
-    case CGAL_USHORT :
-      u16buf = (u16*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, u16buf++ ) {
-	*r32buf = (float)(*u16buf);
-      }
-      break;
-    case CGAL_SSHORT :
-      s16buf = (s16*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, s16buf++ ) {
-	*r32buf = (float)(*s16buf);
-      }
-      break;
-    case CGAL_INT :
-      s32buf = (s32*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, s32buf++ ) {
-	*r32buf = (float)(*s32buf);
-      }
-      break;
-    case CGAL_FLOAT :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(r32) );
-      break;
-    case CGAL_DOUBLE :
-      r64buf = (r64*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, r64buf++ ) {
-	*r32buf = (float)(*r64buf);
-      }
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_FLOAT */
-
-
-
-
-    
-  case CGAL_DOUBLE :
-    r64buf = (r64*)bufferOut;
-    switch( typeIn ) {
-    case CGAL_UCHAR :
-      u8buf = (u8*)bufferIn;
-      for (i=bufferLength; i>0; i--, r64buf++, u8buf++ ) {
-	*r64buf = (double)(*u8buf);
-      }
-      break;
-    case CGAL_SCHAR :
-      s8buf = (s8*)bufferIn;
-      for (i=bufferLength; i>0; i--, r64buf++, s8buf++ ) {
-	*r64buf = (double)(*s8buf);
-      }
-      break;
-    case CGAL_USHORT :
-      u16buf = (u16*)bufferIn;
-      for (i=bufferLength; i>0; i--, r64buf++, u16buf++ ) {
-	*r64buf = (double)(*u16buf);
-      }
-      break;
-    case CGAL_SSHORT :
-      s16buf = (s16*)bufferIn;
-      for (i=bufferLength; i>0; i--, r64buf++, s16buf++ ) {
-	*r64buf = (double)(*s16buf);
-      }
-      break;
-    case CGAL_INT :
-      s32buf = (s32*)bufferIn;
-      for (i=bufferLength; i>0; i--, r64buf++, s32buf++ ) {
-	*r64buf = (double)(*s32buf);
-      }
-      break;
-    case CGAL_FLOAT :
-      r32buf = (r32*)bufferIn;
-      for (i=bufferLength; i>0; i--, r32buf++, r64buf++ ) {
-	*r64buf = (double)(*r32buf);
-      }
-      break;
-    case CGAL_DOUBLE :
-      if ( bufferOut == bufferIn ) return;
-      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(r64) );
-      break;
-    default :
-      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
-	       proc );
-      return;
-    }
-    break; /* end case typeOut = CGAL_DOUBLE */
-
-
-
-   
-  default :
-    fprintf( stderr, " Error in %s: such output type not yet handled.\n",
-	     proc );
-    return;
-  }
-}
-
-
-
-
-
-void Convert_r32_to_s8( r32 *theBuf,
-			s8 *resBuf,
-			int size )
-{
-  register int i;
-  register r32* tb = theBuf;
-  register s8* rb = resBuf;
-  
-  for ( i=0; i<size; i++, tb++, rb++ ) {
-    if ( *tb < -128.0 ) {
-      *rb = -128;
-    } else if ( *tb < 0.0 ) {
-      *rb = (int)(*tb - 0.5);
-    } else if ( *tb < 127.0 ) {
-      *rb = (int)(*tb + 0.5);
-    } else {
-      *rb = 127;
-    }
-  }
-}
-
-
-
-
-
-void Convert_r32_to_u8( r32 *theBuf,
-			u8 *resBuf,
-			int size )
-{
-  register int i;
-  register r32* tb = theBuf;
-  register u8* rb = resBuf;
-  
-  for ( i=0; i<size; i++, tb++, rb++ ) {
-    if ( *tb < 0.0 ) {
-      *rb = 0;
-    } else if ( *tb < 255.0 ) {
-      *rb = (int)(*tb + 0.5);
-    } else {
-      *rb = 255;
-    }
-  }
-}
-
-
-
-
-
-void Convert_r32_to_s16( r32 *theBuf,
-			 s16 *resBuf,
-			 int size )
-{
-  register int i;
-  register r32* tb = theBuf;
-  register s16* rb = resBuf;
-  
-  for ( i=0; i<size; i++, tb++, rb++ ) {
-    if ( *tb < -32768.0 ) {
-      *rb = -32768;
-    } else if ( *tb < 0.0 ) {
-      *rb = (int)(*tb - 0.5);
-    } else if ( *tb < 32767.0 ) {
-      *rb = (int)(*tb + 0.5);
-    } else {
-      *rb = 32767;
-    }
-  }
-}
-
-
-
-
-
-void Convert_r32_to_u16( r32 *theBuf,
-			 u16 *resBuf,
-			 int size )
-{
-  register int i;
-  register r32* tb = theBuf;
-  register u16* rb = resBuf;
-  
-  for ( i=0; i<size; i++, tb++, rb++ ) {
-    if ( *tb < 0.0 ) {
-      *rb = 0;
-    } else if ( *tb < 65535.0 ) {
-      *rb = (int)(*tb + 0.5);
-    } else {
-      *rb = 65535;
-    }
-  }
-}
-
-
-      
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.h
deleted file mode 100644
index eaaa3af..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/convert.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * convert.h - conversion between types
- *
- * $Id$
- *
- * Copyright©INRIA 1998
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * http://www.inria.fr/epidaure/personnel/malandain/
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * ADDITIONS, CHANGES
- *
- */
-
-#ifndef _convert_h_
-#define _convert_h_
-
-
-
-
-
-
-
-#include <stdio.h> /* memcpy */
-#include <string.h> /* memcpy */
-#include "typedefs.h"
-
-
-
-
-
-
-/* Converts buffers from one type into another.
- *
- * DESCRIPTION:
- *
- * Conversions from types DOUBLE or FLOAT to 
- * others types are all implemented. I hope
- * I do not make mistakes.
- *
- * - When a real value is converted into an integer
- *   one, we take the nearest integer, i.e.
- *   (int)(real value - 0.5) for negative
- *   numbers, and (int)(real value + 0.5) for 
- *   positive ones.
- *
- * - Some conversions are not yet implemented.
- *
- * - When types and pointers are equal, nothing is
- *   done.
- */
-extern void ConvertBuffer( void *bufferIn, /* buffer to be converted */
-			   bufferType typeIn, /* type of this buffer */
-			   void *bufferOut, /* result buffer */
-			   bufferType typeOut, /* type of this buffer */
-			   int bufferLength /* buffers' length */
-			   );
-
-extern void Convert_r32_to_s8( r32 *theBuf,
-			       s8 *resBuf,
-			       int size );
-
-extern void Convert_r32_to_u8( r32 *theBuf,
-			       u8 *resBuf,
-			       int size );
-
-extern void Convert_r32_to_s16( r32 *theBuf,
-				s16 *resBuf,
-				int size );
-
-extern void Convert_r32_to_u16( r32 *theBuf,
-				u16 *resBuf,
-				int size );
-
-
-
-
-
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.cpp
deleted file mode 100644
index 31fe741..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <string.h>
-
-#include "gis.h" 
-#include "inr.h"
-
-/* get a string from a file and discard the ending newline character
-   if any */
-char *fgetns(char *str, int n,  _image *im ) {
-  char *ret;
-  int l;
-
-  memset( str, 0, n );
-  ret = ImageIO_gets( im, str, n );
-
-  if(!ret) return NULL;
-
-  l = strlen(str);
-  if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
-  return ret;
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.h
deleted file mode 100644
index 8cb1764..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/fgetns.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <string.h>
-
-#include "gis.h" 
-#include "inr.h"
-
-/* get a string from a file and discard the ending newline character
-   if any */
-char *fgetns(char *str, int n,  _image *im );
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.cpp
deleted file mode 100644
index ffb865a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.cpp
+++ /dev/null
@@ -1,658 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <string.h>
-
-#include "gif.h"
-
-#ifdef WIN32
-#include <io.h>
-#endif
-
-
-
-/** Magic header for GIF files */
-#define GIF_MAGIC "GIF8"
-
-
-
-typedef unsigned char byte;
-#define TRUE 1
-#define FALSE 0
-
-#define NEXTBYTE      (*ptr++)
-#define EXTENSION     0x21
-#define IMAGESEP      0x2c
-#define TRAILER       0x3b
-#define INTERLACEMASK 0x40
-#define COLORMAPMASK  0x80
-
-
-#define DEBUG 0
-
-FILE *fp;
-int   gif89 = 0;
-const char *id87 = "GIF87a";
-const char *id89 = "GIF89a";
-
-static int EGApalette[16][3] = {
-  {0,0,0},       {0,0,128},     {0,128,0},     {0,128,128}, 
-  {128,0,0},     {128,0,128},   {128,128,0},   {200,200,200},
-  {100,100,100}, {100,100,255}, {100,255,100}, {100,255,255},
-  {255,100,100}, {255,100,255}, {255,255,100}, {255,255,255} };
-  
-
-static int  ReadCode();
-static void DoInterlace(byte);
-static int GifError(const char *);
-
-
-byte *Raster;			/* The raster data stream, unblocked */
-byte *RawGIF;
-byte *r,*g,*b;                  /* The colormap */
-int BitOffset = 0,		/* Bit Offset of next code */
-  XC = 0, YC = 0,		/* Output X and Y coords of current pixel */
-  CodeSize,			/* Code size, read from GIF header */
-  ReadMask,			/* Code AND mask for current code size */
-  Pass = 0,			/* Used by output routine if interlaced pic */
-  Width, Height;		/* image dimensions */
-
-unsigned char *org, *buf;
-
-int testGifHeader(char *magic,const char *) {
-  if (!strcmp(magic, GIF_MAGIC))
-    return 0;
-  else 
-    return -1;
-}
-PTRIMAGE_FORMAT createGifFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testGifHeader;
-  f->readImageHeader=&readGifImage;
-  f->writeImage=0;
-  strcpy(f->fileExtension,".gif");
-  strcpy(f->realName,"Gif");
-  return f;
-}
-
-void use(int) {} // warning killer
-
-/*****************************/
-int readGifImage(const char *name,_image *im) {
-  register byte ch, ch1;
-  register byte *ptr, *ptr1;
-  register int i, block;
-  int npixels, maxpixels, aspect, filesize;
-  float normaspect;
-  int OutCount = 0,		/* Decompressor output 'stack count' */
-    RWidth, RHeight,		/* screen dimensions */
-    /*LeftOfs, TopOfs,		 image offset */
-    BitsPerPixel,		/* Bits per pixel, read from GIF header */
-    ColorMapSize,		/* number of colors */
-    Background,		         /* background color */
-    InitCodeSize,		/* Starting code size, used during Clear */
-    Code,			/* Value returned by ReadCode */
-    MaxCode,			/* limiting value for current code size */
-    ClearCode,			/* GIF clear code */
-    EOFCode,			/* GIF end-of-information code */
-    CurCode, OldCode=0, InCode,	/* Decompressor variables */
-    FirstFree,			/* First free code, generated per GIF spec */
-    FreeCode,			/* Decompressor,next free slot in hash table */
-    FinChar=0,			/* Decompressor variable */
-    BitMask,			/* AND mask for data size */
-    Misc;                       /* miscellaneous bits (interlace, local cmap)*/
-  int Interlace, HasColormap;
-  /* not used
-   */
-  /* char header[10]; */
-
-  /* The hash table used by the decompressor */
-  int Prefix[4096];
-  int Suffix[4096];
-  /* An output array used by the decompressor */
-  int OutCode[4097];
-
-  /* initialize variables */
-  BitOffset = XC = YC = Pass = OutCount = npixels = maxpixels = 0;
-  RawGIF = Raster = NULL;
-  gif89 = 0;
-
-#ifdef WIN32
- fp = fopen(name,"rb");
-#else
-  fp = fopen(name,"r");
-#endif
-  fp = fopen(name,"rb");
-  if (!fp) {
-    return(GifError("could not open a GIF file"));
-  }
-  /* find the size of the file */
-  fseek(fp, 0L, 2);
-  filesize = ftell(fp);
-  fseek(fp, 0L, 0);
-
- /* the +256's are so we can read truncated GIF files without fear of 
-     segmentation violation */
-  if (!(ptr = RawGIF = (byte *) ImageIO_alloc(filesize+256)))
-    return( GifError("not enough memory to read gif file") );
-  
-  if (!(Raster = (byte *) ImageIO_alloc(filesize+256)))    
-    return( GifError("not enough memory to read gif file") );
-  
-  if (fread(ptr, filesize, 1, fp) != 1)
-    return( GifError("GIF data read failed") );
-   if      (strncmp((char *) ptr, id87, 6)==0) gif89 = 0;
-  else if (strncmp((char *) ptr, id89, 6)==0) gif89 = 1;
-  else    return( GifError("not a GIF file"));
-  
-  ptr += 6;
- /* Get variables from the GIF screen descriptor */
-  
-  ch = NEXTBYTE;
-  RWidth = ch + 0x100 * NEXTBYTE;	/* screen dimensions... not used. */
-  ch = NEXTBYTE;
-  RHeight = ch + 0x100 * NEXTBYTE;
-  use(RWidth);
-  use(RHeight);
-  
-  ch = NEXTBYTE;
-  HasColormap = ((ch & COLORMAPMASK) ? TRUE : FALSE);
-  
-  BitsPerPixel = (ch & 7) + 1;
-  ColorMapSize = 1 << BitsPerPixel;
-  BitMask = ColorMapSize - 1;
-  
-  Background = NEXTBYTE;		/* background color... not used. */
-  use(Background);
-
-
-  aspect = NEXTBYTE;
-  if (aspect) {
-    if (!gif89) return(GifError("corrupt GIF file (screen descriptor)"));
-    else normaspect = (float) (aspect + 15) / 64.0f;   /* gif89 aspect ratio */
-    if (DEBUG) fprintf(stderr,"GIF89 aspect = %f\n", normaspect);
-  }
-
-
-  /* Read in global colormap. */
-  if (HasColormap)
-    {
-      r = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
-      g = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
-      b = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
-
-      for (i = 0; i < ColorMapSize; i++) {
-	r[i] = NEXTBYTE;
-	g[i] = NEXTBYTE;
-	b[i] = NEXTBYTE;
-      }
-    }
-  else {
-    /* no colormap in GIF file */
-    /* put std EGA palette (repeated 16 times) into colormap, for lack of
-       anything better to do */
-    ColorMapSize = 256;
-    r = (byte *) ImageIO_alloc(256 * sizeof(byte));
-    g = (byte *) ImageIO_alloc(256 * sizeof(byte));
-    b = (byte *) ImageIO_alloc(256 * sizeof(byte));
-   
-    for (i = 0; i < 256; i++) {
-      r[i] = EGApalette[i&15][0];
-      g[i] = EGApalette[i&15][1];
-      b[i] = EGApalette[i&15][2];
-    }
-  }
-
-  /* possible things at this point are:
-   *   an application extension block
-   *   a comment extension block
-   *   an (optional) graphic control extension block
-   *       followed by either an image
-   *	   or a plaintext extension
-   */
-  while (1) {
-    block = NEXTBYTE;
-   
-    if (block == EXTENSION) {  /* parse extension blocks */
-      int i, fn, blocksize, aspnum, aspden;
-	  
-      /* read extension block */
-      fn = NEXTBYTE;
-	  
-      if (DEBUG) fprintf(stderr,"GIF extension type 0x%02x\n", fn);
-	  
-      if (fn == 'R') {                  /* GIF87 aspect extension */
-	blocksize = NEXTBYTE;
-	if (blocksize == 2) {
-	  aspnum = NEXTBYTE;
-	  aspden = NEXTBYTE;
-	  if (aspden>0 && aspnum>0) 
-	    normaspect = (float) aspnum / (float) aspden;
-	  else { normaspect = 1.0;  aspnum = aspden = 1; }
-			
-	  if (DEBUG) fprintf(stderr,"GIF87 aspect extension: %d:%d = %f\n\n", 
-			     aspnum, aspden,normaspect);
-	}
-	else {
-	  for (i=0; i<blocksize; i++) (void)NEXTBYTE;
-	}
-      }
-	  
-      else if (fn == 0xFE) {  /* Comment Extension.  just eat it */
-	int ch, j, sbsize;
-		 
-	if (DEBUG) fprintf(stderr,"Comment extension:  ");
-	/* read (and ignore) data sub-blocks */
-	do {
-	  j = 0;  sbsize = NEXTBYTE;
-	  while (j<sbsize) {
-	    ch = NEXTBYTE;  j++;
-	    if (DEBUG) fprintf(stderr,"%c", ch);
-	  }
-	} while (sbsize);
-	if (DEBUG) fprintf(stderr,"\n\n");
-      }
-	  
-      else if (fn == 0x01) {  /* PlainText Extension */
-	int j,sbsize,ch;
-	int tgLeft, tgTop, tgWidth, tgHeight, cWidth, cHeight, fg, bg;
-		 
-	/*	SetISTR(ISTR_WARNING, 
-		"PlainText extension found in GIF file.  Ignored.");*/
-		 
-	sbsize   = NEXTBYTE;
-	tgLeft   = NEXTBYTE;  tgLeft   += (NEXTBYTE)<<8;
-	tgTop    = NEXTBYTE;  tgTop    += (NEXTBYTE)<<8;
-	tgWidth  = NEXTBYTE;  tgWidth  += (NEXTBYTE)<<8;
-	tgHeight = NEXTBYTE;  tgHeight += (NEXTBYTE)<<8;
-	cWidth   = NEXTBYTE;
-	cHeight  = NEXTBYTE;
-	fg       = NEXTBYTE;
-	bg       = NEXTBYTE;
-	i=12;
-	for ( ; i<sbsize; i++) (void)NEXTBYTE;   /* read rest of first subblock */
-		 
-	if (DEBUG) fprintf(stderr,
-			   "PlainText: tgrid=%d,%d %dx%d  cell=%dx%d  col=%d,%d\n",
-			   tgLeft, tgTop, tgWidth, tgHeight, cWidth, cHeight,
-			   fg, bg);
-		 
-	/* read (and ignore) data sub-blocks */
-	do {
-	  j = 0;
-	  sbsize = NEXTBYTE;
-	  while (j<sbsize) {
-	    ch = NEXTBYTE;  j++;
-	    if (DEBUG) fprintf(stderr,"%c", ch);
-	  }
-	} while (sbsize);
-	if (DEBUG) fprintf(stderr,"\n\n");
-      }
-	  
-	  
-      else if (fn == 0xF9) {  /* Graphic Control Extension */
-	int j, sbsize;
-		 
-	if (DEBUG) fprintf(stderr,"Graphic Control extension\n\n");
-		 
-	/*	SetISTR(ISTR_WARNING, 
-		"Graphic Control Extension in GIF file.  Ignored.");*/
-		 
-	/* read (and ignore) data sub-blocks */
-	do {
-	  j = 0; sbsize = NEXTBYTE;
-	  while (j<sbsize) { (void)NEXTBYTE;  j++; }
-	} while (sbsize);
-      }
-      
-	  
-      else { /* unknown extension */
-	int j, sbsize;
-		 
-	if (DEBUG) fprintf(stderr,"unknown GIF extension 0x%02x\n\n", fn);
-		 
-	/*	SetISTR(ISTR_WARNING, 
-		"Unknown extension 0x%02x in GIF file.  Ignored.",fn);*/
-		 
-	/* read (and ignore) data sub-blocks */
-	do {
-	  j = 0; sbsize = NEXTBYTE;
-	  while (j<sbsize) { (void)NEXTBYTE;  j++; }
-	} while (sbsize);
-      }
-    }
-   
-    else if (block == IMAGESEP) break;   /* read an image */
-
-    else if (block == TRAILER) {
-      return( GifError("no image data found in GIF file") );
-    }
-   
-    else return (GifError("Unknown block type found in file."));
-  }
-
-
-  /* read in values from the image descriptor */
-  ch = NEXTBYTE;
-  /* LeftOfs = ch + 0x100 * NEXTBYTE;*/
-  ch = NEXTBYTE;
-  /* TopOfs = ch + 0x100 * NEXTBYTE; */
-  ch = NEXTBYTE;
-  ch = NEXTBYTE;
-  ch = NEXTBYTE;
-  Width = ch + 0x100 * NEXTBYTE;
-  ch = NEXTBYTE;
-  Height = ch + 0x100 * NEXTBYTE;
-
-  Misc = NEXTBYTE;
-  Interlace = ((Misc & INTERLACEMASK) ? TRUE : FALSE);
-
-  if (Misc & 0x80) {
-    for (i=0; i< 1 << ((Misc&7)+1); i++) {
-      r[i] = NEXTBYTE;
-      g[i] = NEXTBYTE;
-      b[i] = NEXTBYTE;
-    }
-  }
-
-
-  if (!HasColormap && !(Misc&0x80)) {
-    /* no global or local colormap */
-    /*    SetISTR(ISTR_WARNING,
-	  "No colormap in this GIF file.  Assuming EGA colors.");*/
-  }
-
-
-
-  /* Start reading the raster data. First we get the intial code size
-   * and compute decompressor constant values, based on this code size.
-   */
-  
-  /*  SetISTR(ISTR_FORMAT, "GIF%s, %d bits per pixel, %sinterlaced.  (%d bytes)",
-      (gif89) ? "89" : "87", BitsPerPixel, 
-      Interlace ? "" : "non-", filesize);*/
-
-  CodeSize = NEXTBYTE;
-
-  ClearCode = (1 << CodeSize);
-  EOFCode = ClearCode + 1;
-  FreeCode = FirstFree = ClearCode + 2;
-
-  /* The GIF spec has it that the code size is the code size used to
-   * compute the above values is the code size given in the file, but the
-   * code size used in compression/decompression is the code size given in
-   * the file plus one. (thus the ++).
-   */
-  CodeSize++;
-  InitCodeSize = CodeSize;
-  MaxCode = (1 << CodeSize);
-  ReadMask = MaxCode - 1;
-
-  /* UNBLOCK:
-   * Read the raster data.  Here we just transpose it from the GIF array
-   * to the Raster array, turning it from a series of blocks into one long
-   * data stream, which makes life much easier for ReadCode().
-   */
-  
-  ptr1 = Raster;
-  do {
-    ch = ch1 = NEXTBYTE;
-    while (ch--) { 
-		*ptr1 = NEXTBYTE; 
-		ptr1++; }
-    if ((ptr - RawGIF) > filesize) {
-      /*      SetISTR(ISTR_WARNING,
-	      "This GIF file seems to be truncated.  Winging it.");*/
-      break;
-    }
-  } while(ch1);
-  ImageIO_free(RawGIF);  RawGIF = NULL;
-
-
-  if (DEBUG) {
-    fprintf(stderr,"xv: LoadGIF() - picture is %dx%d, %d bits, %sinterlaced\n",
-	    Width, Height, BitsPerPixel, Interlace ? "" : "non-");
-  }
-  
-
-  /* Allocate the 'pic' */
-  maxpixels = Width*Height;
-  im->xdim = Width;
-  im->ydim = Height;
-  im->zdim = 1;
-  im->vdim = 3;
-  im->wdim = 1;
-  im->wordKind = WK_FIXED;
-  im->sign = SGN_UNSIGNED;
-  im->data = ImageIO_alloc(Width * Height * 3);
-  org = buf = (unsigned char *) im->data;
-
-  if (!org)
-    return( GifError("not enough memory for image buffer") );
-
-
-  /* Decompress the file, continuing until you see the GIF EOF code.
-   * One obvious enhancement is to add checking for corrupt files here.
-   */
-  Code = ReadCode();
-  while (Code != EOFCode) {
-   /* Clear code sets everything back to its initial value, then reads the
-     * immediately subsequent code as uncompressed data.
-     */
-   
-	  if (Code == ClearCode) { 
-      CodeSize = InitCodeSize;
-      MaxCode = (1 << CodeSize);
-      ReadMask = MaxCode - 1;
-      FreeCode = FirstFree;
-      Code = ReadCode();
-      CurCode = OldCode = Code;
-      FinChar = CurCode & BitMask;
-      if (!Interlace) {
-	*buf++ = r[FinChar];
-	*buf++ = g[FinChar];
-	*buf++ = b[FinChar];
-      }
-      else DoInterlace((byte)FinChar);
-      npixels++;
-    }
-
-    else {
-      /* If not a clear code, must be data: save same as CurCode and InCode */
-	   
-      /* if we're at maxcode and didn't get a clear, stop loading */
-      if (FreeCode>=4096) { 
-		  printf("freecode blew up\n"); 
-	      break;
-	  }
-	   
-      CurCode = InCode = Code;
-	   
-      /* If greater or equal to FreeCode, not in the hash table yet;
-       * repeat the last character decoded
-       */
-	   
-      if (CurCode >= FreeCode) {
-	CurCode = OldCode;
-	if (OutCount > 4096) {   
-		printf("outcount1 blew up\n");  break; }
-	OutCode[OutCount++] = FinChar;
-      }
-	   
-      /* Unless this code is raw data, pursue the chain pointed to by CurCode
-       * through the hash table to its end; each code in the chain puts its
-       * associated output code on the output queue.
-       */
-	   
-      while (CurCode > BitMask) {
-		  if (OutCount > 4096) {
-			  fprintf(stderr,"outcount2 blew up\n"); break;}   /* corrupt file */
-	OutCode[OutCount++] = Suffix[CurCode];
-	CurCode = Prefix[CurCode];
-      }
-	   
-      if (OutCount > 4096) {  
-		  printf("outcount blew up\n");  break; }
-	   
-      /* The last code in the chain is treated as raw data. */
-	   
-      FinChar = CurCode & BitMask;
-      OutCode[OutCount++] = FinChar;
-	   
-      /* Now we put the data out to the Output routine.
-       * It's been stacked LIFO, so deal with it that way...
-       */
-
-      /* safety thing:  prevent exceeding range of 'pic' */
-      if (npixels + OutCount > maxpixels) OutCount = maxpixels-npixels;
-	   
-      npixels += OutCount;
-      if (!Interlace) for (i=OutCount-1; i>=0; i--) {
-	*buf++ = r[OutCode[i]];
-	*buf++ = g[OutCode[i]];
-	*buf++ = b[OutCode[i]];
-      }
-      else  for (i=OutCount-1; i>=0; i--) DoInterlace((byte)OutCode[i]);
-      OutCount = 0;
-	   
-      /* Build the hash table on-the-fly. No table is stored in the file. */
-      
-      Prefix[FreeCode] = OldCode;
-      Suffix[FreeCode] = FinChar;
-      OldCode = InCode;
-	   
-      /* Point to the next slot in the table.  If we exceed the current
-       * MaxCode value, increment the code size unless it's already 12.  If it
-       * is, do nothing: the next code decompressed better be CLEAR
-       */
-	   
-      FreeCode++;
-      if (FreeCode >= MaxCode) {
-	if (CodeSize < 12) {
-	  CodeSize++;
-	  MaxCode *= 2;
-	  ReadMask = (1 << CodeSize) - 1;
-	}
-      }
-    }
-    Code = ReadCode();
-    if (npixels >= maxpixels) break;
-  }
-  ImageIO_free(Raster);  Raster = NULL;
-
-  if (npixels != maxpixels) {
-    /*    SetISTR(ISTR_WARNING,"This GIF file seems to be truncated.  Winging it.");*/
-    if (!Interlace)
-      memset(buf, 0, 3*(maxpixels-npixels)); /* clear to EOBuffer */
-  }
-  /*  SetDirRButt(F_FORMAT, F_GIF);
-      SetDirRButt(F_COLORS, F_FULLCOLOR);*/
-  return 1;
-}
-
-
-/* Fetch the next code from the raster data stream.  The codes can be
- * any length from 3 to 12 bits, packed into 8-bit bytes, so we have to
- * maintain our location in the Raster array as a BIT Offset.  We compute
- * the byte Offset into the raster array by dividing this by 8, pick up
- * three bytes, compute the bit Offset into our 24-bit chunk, shift to
- * bring the desired code to the bottom, then mask it off and return it. 
- */
-
-static int ReadCode()
-{
-  int RawCode, ByteOffset;
-  
-  ByteOffset = BitOffset / 8;
-  RawCode = Raster[ByteOffset] + (Raster[ByteOffset + 1] << 8);
-  if (CodeSize >= 8)
-    RawCode += ( ((int) Raster[ByteOffset + 2]) << 16);
-  RawCode >>= (BitOffset % 8);
-  BitOffset += CodeSize;
-
-  return(RawCode & ReadMask);
-}
-
-
-/***************************/
-static void DoInterlace(byte Index) {
-  static byte *ptr = NULL;
-  static int   oldYC = -1;
-  
-  if (oldYC != YC) {
-    ptr = org + 3 * YC * Width;
-    oldYC = YC;
-  }
-  
-  if (YC < Height) {
-    *ptr++ = r[Index];
-    *ptr++ = g[Index];
-    *ptr++ = b[Index];
-  }
-  
-  /* Update the X-coordinate, and if it overflows, update the Y-coordinate */
-  if (++XC == Width) {
-    
-    /* deal with the interlace as described in the GIF
-     * spec.  Put the decoded scan line out to the screen if we haven't gone
-     * past the bottom of it
-     */
-    
-    XC = 0;
-    
-    switch (Pass) {
-    case 0:
-      YC += 8;
-      if (YC >= Height) { Pass++; YC = 4; }
-      break;
-      
-    case 1:
-      YC += 8;
-      if (YC >= Height) { Pass++; YC = 2; }
-      break;
-      
-    case 2:
-      YC += 4;
-      if (YC >= Height) { Pass++; YC = 1; }
-      break;
-      
-    case 3:
-      YC += 2;  break;
-      
-    default:
-      break;
-    }
-  }
-}
-
-
-      
-/*****************************/
-static int GifError(const char *st) {
-  fprintf(stderr,"readGifImage: error: %s\n",st);
-
-  if (RawGIF != NULL) ImageIO_free(RawGIF);
-  if (Raster != NULL) ImageIO_free(Raster);
-  
-  return -1;
-}
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.h
deleted file mode 100644
index a361220..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gif.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef GIF_H
-#define GIF_H
-
-
-#include <stdio.h>
-#include <CGAL/ImageIO.h>
-int readGifImage(const char *name,_image *im);
-
-int testGifHeader(char *magic,const char *name);
-/** creates an return the file format structure associated with the Gif file format */
-PTRIMAGE_FORMAT createGifFormat();
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.cpp
deleted file mode 100644
index 80ede0f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.cpp
+++ /dev/null
@@ -1,718 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include <string>
-#include <sstream>
-
-#include "gis.h" 
-#include "inr.h"
-#include "fgetns.h"
-
-#define _LGTH_STRING_ 1024
-
-PTRIMAGE_FORMAT createGisFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testGisHeader;
-  f->readImageHeader=&readGisHeader;
-  f->writeImage=&writeGis;
-  strcpy(f->fileExtension,".dim,.dim.gz,.ima,.ima.gz");
-  strcpy(f->realName,"Gis");
-  return f;
-}
-int writeGis( char *name, _image* im) {
-  char *outputName;
-  int length, extLength=0, res;
-
-
-  length=strlen(name);
-  outputName= (char *)ImageIO_alloc(length+8);
-  
-  if ( strncmp( name+length-4, ".dim", 4 ) == 0 ) {
-    extLength = 4;
-  }
-  else if ( strncmp( name+length-4, ".ima", 4 ) == 0 ) {
-    extLength = 4;
-  }
-  else if ( strncmp( name+length-7, ".ima.gz", 7 ) == 0 ) {
-    extLength = 7;
-  }
-  else if ( strncmp( name+length-7, ".dim.gz", 7 ) == 0 ) {
-    extLength = 7;
-  }
-
-  strncpy( outputName, name, length-extLength );
-  if ( strncmp( name+length-7, ".dim.gz", 7 ) == 0 )
-    strcpy( outputName+length-extLength, ".dim.gz" );
-  else
-    strcpy( outputName+length-extLength, ".dim" );
-
-  _openWriteImage(im, outputName);
-  if( !im->fd ) {
-    fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    return ImageIO_OPENING;
-  }
-
-  res = writeGisHeader(im);
-  if (res < 0 ) {
-    fprintf(stderr, "writeGis: error: unable to write header of \'%s\'\n",
-	    outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    ImageIO_close( im );
-    im->fd = NULL;
-    im->openMode = OM_CLOSE;
-    return( res );
-  }
-
-  ImageIO_close(im);
-  
-  strncpy( outputName, name, length-extLength );
-  if ( strncmp( name+length-3, ".gz", 3 ) == 0 ) {
-    strcpy( outputName+length-extLength, ".ima.gz" );
-  }
-  else {
-    strcpy( outputName+length-extLength, ".ima" );
-  }
-
-  _openWriteImage(im, outputName);
-
-  if( !im->fd ) {
-    fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
-    if ( outputName != NULL ) ImageIO_free( outputName );
-    return ImageIO_OPENING;
-  }
-
-  if ( im->dataMode == DM_ASCII ) {
-    int i, j, n, size;
-    char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
-    size = im->xdim * im->ydim * im->zdim * im->vdim;
-    n = ( im->xdim < 16 ) ? im->xdim : 16;
-    i = 0;
-
-    switch( im->wordKind ) {
-    default :
-      fprintf(stderr, "writeGis: such word kind not handled in ascii mode for file \'%s\'\n", outputName);
-      if ( outputName != NULL ) ImageIO_free( outputName );
-      return( -3 );
-    case WK_FIXED :
-      switch ( im->wdim ) {
-      default :
-	fprintf(stderr, "writeGis: such word dim not handled in ascii mode for file \'%s\'\n", outputName);
-	if ( outputName != NULL ) ImageIO_free( outputName );
-	return( -3 );
-      case 1 :
-	switch ( im->sign ) {
-	default :
-	  fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
-	  if ( outputName != NULL ) ImageIO_free( outputName );
-	  return( -3 );
-	case SGN_UNSIGNED :
-	  {
-	    unsigned char *theBuf = ( unsigned char * )im->data;
-	    do {
-	      memset( str, 0, _LGTH_STRING_ );
-	      for ( j=0; j<n && i<size; j++, i++ ) {
-		sprintf( str+strlen(str), "%d", theBuf[i] );
-		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	      }
-	      sprintf( str+strlen(str), "\n" );
-	      res = ImageIO_write( im, str, strlen( str )  );
-	      if ( res  <= 0 ) {
-		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
-		if ( outputName != NULL ) ImageIO_free( outputName );
-		return( -3 );
-	      }
-	    } while ( i < size );
-	  }
-	  break;
-	case SGN_SIGNED :
-	  {
-	    char *theBuf = ( char * )im->data;
-	    do {
-	      memset( str, 0, _LGTH_STRING_ );
-	      for ( j=0; j<n && i<size; j++, i++ ) {
-		sprintf( str+strlen(str), "%d", theBuf[i] );
-		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	      }
-	      sprintf( str+strlen(str), "\n" );
-	      res = ImageIO_write( im, str, strlen( str )  );
-	      if ( res  <= 0 ) {
-		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
-		if ( outputName != NULL ) ImageIO_free( outputName );
-		return( -3 );
-	      }
-	    } while ( i < size );
-	  }
-	  break;
-	} /* end of switch ( im->sign ) */
-	break;
-      case 2 :
-	switch ( im->sign ) {
-	default :
-	  fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
-	  if ( outputName != NULL ) ImageIO_free( outputName );
-	  return( -3 );
-	case SGN_UNSIGNED :
-	  {
-	    unsigned short int *theBuf = ( unsigned short int * )im->data;
-	    do {
-	      memset( str, 0, _LGTH_STRING_ );
-	      for ( j=0; j<n && i<size; j++, i++ ) {
-		sprintf( str+strlen(str), "%d", theBuf[i] );
-		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	      }
-	      sprintf( str+strlen(str), "\n" );
-	      res = ImageIO_write( im, str, strlen( str )  );
-	      if ( res  <= 0 ) {
-		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
-		if ( outputName != NULL ) ImageIO_free( outputName );
-		return( -3 );
-	      }
-	    } while ( i < size );
-	  }
-	  break;
-	case SGN_SIGNED :
-	  {
-	    short int *theBuf = ( short int * )im->data;
-	    do {
-	      memset( str, 0, _LGTH_STRING_ );
-	      for ( j=0; j<n && i<size; j++, i++ ) {
-		sprintf( str+strlen(str), "%d", theBuf[i] );
-		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	      }
-	      sprintf( str+strlen(str), "\n" );
-	      res = ImageIO_write( im, str, strlen( str )  );
-	      if ( res  <= 0 ) {
-		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
-		if ( outputName != NULL ) ImageIO_free( outputName );
-		return( -3 );
-	      }
-	    } while ( i < size );
-	  }
-	  break;
-	} /* end of switch ( im->sign ) */
-	break;	
-      } /* end of switch ( im->wdim ) */
-    } /* end of switch( im->wordKind ) */
-
-    ImageIO_free( str ); 
-  }
-  else {
-    res = _writeInrimageData(im);
-  }
-  if ( outputName != NULL ) ImageIO_free( outputName );
-  return res;
-  
-}
-
-int testGisHeader(char *,const char *name) {
-   if (( !strncmp(name+strlen(name)-4, ".dim", 4)) || 
-       ( !strncmp(name+strlen(name)-4, ".ima", 4)) || 
-       ( !strncmp(name+strlen(name)-7, ".ima.gz", 7)) || 
-       ( !strncmp(name+strlen(name)-7, ".dim.gz", 7)) )
-     return 0;
-  else 
-    return -1;
-}
-
-
-
-int readGisHeader( const char* name,_image* im)
-{
-  char *s, *str = NULL;
-  int status;
-  int n=0, nusermax = 20;
-
-  str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
-  
-  if ( !fgetns(str, _LGTH_STRING_, im) ) 
-    { ImageIO_free( str ); return -1; }
-
-  std::istringstream iss;
-  iss.str(str);
-  iss >> im->xdim >> im->ydim >> im->zdim >> im->vdim;
-
-  status = iss.str().length();
-  switch ( status ) {
-  case 2 :    im->zdim = 1;
-  case 3 :    im->vdim = 1;
-  case 4 :    break;
-  default :
-    fprintf( stderr, "readGisHeader: unable to read dimensions in '%s'\n", name );
-    ImageIO_free( str ); 
-    return -1;
-  }
-  if ( im->vdim > 1 ) {
-    im->vectMode = VM_INTERLACED;
-  } 
-  else {
-    im->vectMode = VM_SCALAR;
-  }
-#define ADD_USER_STRING { \
-    if ( n == 0 ) { \
-      im->user = (char**)ImageIO_alloc( nusermax * sizeof( char*) ); \
-      for ( n=0; n<nusermax; n++ ) im->user[n] = NULL; \
-      n = 0; \
-    } \
-    im->user[n] = (char*)ImageIO_alloc( 1+strlen( s ) ); \
-    strcpy( im->user[n++], s ); \
-  }
-
-
-
-  while( fgetns( str, _LGTH_STRING_, im ) != 0 ) {
-    s = str;
-    do {
-
-      while ( *s == ' ' || *s == '\t' ) s++;
-
-      if ( !strncmp( s, "-dx ", 4 ) ) {
-	s += 4;
-	status = sscanf( s, "%lf", &(im->vx) );
-	if ( status != 1 ) {
-	  fprintf( stderr, "readGisHeader: error while reading -dx in '%s'\n", s-4 );
-	  *s = '\0';
-	} 
-	else {
-	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
-	}
-      }
-      else if ( !strncmp( s, "-dy ", 4 ) ) {
-	s += 4;
-	status = sscanf( s, "%lf", &(im->vy) );
-	if ( status != 1 ) {
-	  fprintf( stderr, "readGisHeader: error while reading -dy in '%s'\n", s-4 );
-	  *s = '\0';
-	} 
-	else {
-	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
-	}
-      }
-      else if ( !strncmp( s, "-dz ", 4 ) ) {
-	s += 4;
-	status = sscanf( s, "%lf", &(im->vz) );
-	if ( status != 1 ) {
-	  fprintf( stderr, "readGisHeader: error while reading -dz in '%s'\n", s-4 );
-	  *s = '\0';
-	} 
-	else {
-	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
-	}
-      }
-      else if ( !strncmp( s, "-dt ", 4 ) ) {
-	ADD_USER_STRING
-	s += 4; 
-	while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++; 
-      }
-
-      else if ( !strncmp( s, "-type ", 6 ) ) {
-	s += 6; 
-	if ( !strncmp( s, "U8", 2 ) ) {
-	  im->wdim     = 1;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_UNSIGNED;
-	  s += 2;
-	}
-	else if ( !strncmp( s, "S8", 2 ) ) {
-	  im->wdim     = 1;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_SIGNED;
-	  s += 2;
-	} 
-	else if ( !strncmp( s, "U16", 3 ) ) {
-	  im->wdim     = 2;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_UNSIGNED;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "S16", 3 ) ) {
-	  im->wdim     = 2;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_SIGNED;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "U32", 3 ) ) {
-	  im->wdim     = 4;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_UNSIGNED;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "S32", 3 ) ) {
-	  im->wdim     = 4;
-	  im->wordKind = WK_FIXED;
-	  im->sign     = SGN_SIGNED;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "FLOAT", 5 ) ) {
-	  im->wdim     = sizeof( float );
-	  im->wordKind = WK_FLOAT;
-	  im->sign     = SGN_UNKNOWN;
-	  s += 5;
-	}
-	else if ( !strncmp( s, "DOUBLE", 6 ) ) {
-	  im->wdim     = sizeof( double );
-	  im->wordKind = WK_FLOAT;
-	  im->sign     = SGN_UNKNOWN;
-	  s += 6;
-	}
-	else {
-	  fprintf( stderr, "readGisHeader: unknown type '%s'\n", s-6 );
-	  *s = '\0'; 
-	}
-      }
-
-      else if ( !strncmp( s, "-bo ", 4 ) ) {
-	s += 4;
-	if ( !strncmp( s, "ABCD", 4 ) ) {
-	  im->endianness = END_BIG;
-	  s += 4;
-	}
-	else if ( !strncmp( s, "SUN", 3 ) ) {
-	  im->endianness = END_BIG;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "DCBA", 4 ) ) {
-	  im->endianness = END_LITTLE;
-	  s += 4;
-	}
-	else if ( !strncmp( s, "ALPHA", 5 ) ) {
-	  im->endianness = END_LITTLE;
-	  s += 5;
-	}
-	else {
-	  fprintf( stderr, "readGisHeader: unknown byte order '%s'\n", s-4 );
-	  *s = '\0'; 
-	}
-      }
-
-      else if ( !strncmp( s, "-ar ", 4 ) ) {
-	s += 4;
-	if ( !strncmp( s, "SUN", 3 ) ) {
-	  im->endianness = END_BIG;
-	  s += 3;
-	}
-	else if ( !strncmp( s, "ALPHA", 5 ) ) {
-	  im->endianness = END_LITTLE;
-	  s += 5;
-	}
-	else {
-	  fprintf( stderr, "readGisHeader: unknown architecture '%s'\n", s-4 );
-	  *s = '\0'; 
-	}
-      }
-
-      else if ( !strncmp( s, "-om ", 4 ) ) {
-	s += 4;
-	if ( !strncmp( s, "binar", 5 ) ) {
-	  im->dataMode = DM_BINARY;
-	  s += 5;
-	} 
-	else if ( !strncmp( s, "ascii", 5 ) ) {
-	  im->dataMode = DM_ASCII;
-	  s += 5;
-	} 
-	else {
-	  fprintf( stderr, "readGisHeader: unknown data type '%s'\n", s-4 );
-	  ImageIO_free( str );
-	  return -1;
-	}
-      }
-      
-      
-      else {
-	fprintf( stderr, "readGisHeader: unknown indentifier '%s'\n", s );
-	ADD_USER_STRING
-	*s = '\0'; 
-      }
-
-    } while( *s != '\0' && *s != '\n' );
-
-  }
-  ImageIO_free( str );
-  
-
-  if ( im->endianness == END_UNKNOWN ) {
-    im->endianness = _getEndianness();
-  }
-
-
-  /* header is read. close header file and open data file. */
-  if( name != NULL ) {
-    
-    int length = strlen(name) ;
-    char* data_filename = (char *) ImageIO_alloc(length+4) ;
-    
-    if( strcmp( name+length-4, ".dim" ) ) {
-      fprintf (stderr,
-	       "readGisHeader: error: file header extension must be .dim\n");
-      ImageIO_free( data_filename );
-      return -1;
-    }
-    
-    ImageIO_close(im);
-
-
-    /* open data file
-     */
-    
-    strcpy(data_filename,name);
-    strcpy(data_filename+length-3, "ima.gz");
-    _openReadImage(im,data_filename);
-    
-    if(!im->fd) {
-      
-      strcpy(data_filename,name);
-      strcpy(data_filename+length-3, "ima");
-      _openReadImage(im,data_filename);
-      if(!im->fd) {
-	fprintf(stderr, "readGisHeader: error: unable to open data file \'%s\'\n", data_filename);
-	ImageIO_free( data_filename );
-	return -1;
-	
-      }
-    }
-    ImageIO_free( data_filename );
-
-
-
-
-
-    /* read data if ascii
-       only U8 and S8
-     */
-    if ( im->dataMode == DM_ASCII ) {
-      int size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-      unsigned int n;
-      char *tmp;
-      int ret, iv=0;
-      
-      if ( im->wdim != 1 || im->wordKind != WK_FIXED ) {
-	fprintf(stderr, "readGisHeader: error: unable to read such ascii type\n" );
-	return -1;
-      }
-
-      n = 0 ;
-      if ( size <= 0 ) return -1;
-      if(!im->data) {
-	im->data = ( void*) ImageIO_alloc(size);
-	if(!im->data) return -1;
-      }
-      
-      n = 0;
-      str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
-      while( fgetns( str, _LGTH_STRING_, im ) != 0 &&
-	     n < im->xdim * im->ydim * im->zdim * im->vdim ) {
-	tmp = str;
-	while ( *tmp != '\n' && *tmp != '\0' && *tmp != EOF &&
-		n < im->xdim * im->ydim * im->zdim * im->vdim ) {
-	  /* skip trailing whitespace
-	   */
-	  while ( *tmp == ' ' || *tmp == '\t' )
-	    tmp++;
-	  if ( *tmp == '\0' || *tmp == '\n' || *tmp == EOF )
-	    continue;
-	  
-	  /* read a number
-	   */
-	  switch ( im->wordKind ) {
-	  case WK_FIXED :
-	    ret = sscanf( tmp, "%d", &iv );
-	  break;
-	  default :
-	    ImageIO_free( im->data ); im->data = NULL;
-	    ImageIO_free( str );
-	    return -1;
-	  }
-	  
-	  if ( ret != 1 ) {
-	    fprintf( stderr, "readGisHeader: error in reading ascii data\n" );
-	    ImageIO_free( im->data ); im->data = NULL;
-	    ImageIO_free( str );
-	    return -1;	
-	  }
-	  
-	  if ( im->wordKind == WK_FIXED 
-	       && im->sign == SGN_UNSIGNED 
-	       && im->wdim == 1 ) {
-	    unsigned char *buf = (unsigned char *)im->data;
-	    buf += n;
-	    if ( iv < 0 )        *buf = (unsigned char)0;
-	    else if ( iv > 255 ) *buf = (unsigned char)255;
-	    else                 *buf = (unsigned char)iv;
-	    n ++;
-	  }
-	  else if ( im->wordKind == WK_FIXED 
-		    && im->sign == SGN_SIGNED 
-		    && im->wdim == 1 ) {
-	    char *buf = (char *)im->data;
-	    buf += n;
-	    if ( iv < -128 )     *buf = (char)-128;
-	    else if ( iv > 127 ) *buf = (char)127;
-	    else                 *buf = (char)iv;
-	    n ++;
-	  }
-	  else if ( im->wordKind == WK_FIXED 
-		    && im->sign == SGN_UNSIGNED 
-		    && im->wdim == 2 ) {
-	    unsigned short int *buf = (unsigned short int *)im->data;
-	    buf += n;
-	    if ( iv < 0 )          *buf = (unsigned short int)0;
-	    else if ( iv > 65535 ) *buf = (unsigned short int)65535;
-	    else                   *buf = (unsigned short int)iv;
-	    n ++;
-	  }
-	  else if ( im->wordKind == WK_FIXED 
-		    && im->sign == SGN_SIGNED 
-		    && im->wdim == 2 ) {
-	    short int *buf = (short int *)im->data;
-	    buf += n;
-	    if ( iv < -32768 )     *buf = (short int)-32768;
-	    else if ( iv > 32767 ) *buf = (short int)32767;
-	    else                   *buf = (short int)iv;
-	    n ++;
-	  }
-	  else {
-	    ImageIO_free( im->data ); im->data = NULL;
-	    ImageIO_free( str );
-	    return -1;
-	  }
-	  
-
-
-	  /* skip a number 
-	   */
-	  while ( (*tmp >= '0' && *tmp <= '9') || *tmp == '.' || *tmp == '-' )
-	    tmp++;
-	}
-      }
-      ImageIO_free( str );
-      ImageIO_close(im);
-    }
-
-  }
-
-  
-  /* check header validity */
-  if ( im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
-       im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
-       ( im->wordKind == WK_FLOAT ||
-	 (im->wordKind == WK_FIXED && im->sign != SGN_UNKNOWN) ) &&
-       im->endianness != END_UNKNOWN ) {
-    return 0;
-  }
-
-  return -1;
-}
-
-
-
-int writeGisHeader( const _image* inr )
-{
-  const char *proc = "writeGisHeader";
-  std::ostringstream oss;
-
-  if ( inr->vectMode == VM_NON_INTERLACED ) {
-    fprintf( stderr, "%s: can not write non interlaced data\n", proc );
-    return -1;
-  }
-
-  /* dimensions
-   */
-  oss << " " << inr->xdim << " " << inr->ydim;
-  if ( inr->vdim > 1 ) {
-    oss << " " << inr->zdim << " " << inr->vdim;
-  }
-  else if ( inr->zdim > 1 ) {
-    oss << " " << inr->zdim;
-  }
-  oss << "\n";
-
-  /* type
-   */
-  oss << "-type ";
-  switch ( inr->wordKind ) {
-  case WK_FIXED :
-    switch( inr->sign ) {
-    case SGN_UNSIGNED :
-      oss << "U" << 8*inr->wdim;
-      break;
-    case SGN_SIGNED :
-      oss << "S" << 8*inr->wdim;
-      break;
-    default :
-      fprintf( stderr, "%s: unknown wordSign\n", proc );
-      return -1;    
-    }
-    break;
-  case WK_FLOAT :
-    if ( inr->wdim == sizeof( float ) ) {
-      oss << "FLOAT";
-    }
-    else if ( inr->wdim  == sizeof( double ) ) {
-      oss << "DOUBLE";
-    }
-    else {
-      fprintf( stderr, "%s: unknown WK_FLOAT word dim\n", proc );
-      return -1;    
-    }
-    break;
-  default :
-    fprintf( stderr, "%s: unknown wordKind for image\n", proc );
-    return -1;  
-  }
-  oss << "\n";
-  
-  oss << "-dx "<< inr->vx <<"\n";
-  oss << "-dy "<< inr->vy <<"\n";
-  if ( inr->zdim > 1 )
-    oss << "-dz " << inr->vz << "\n";
-
-  if ( inr->wdim > 1 ) {
-    oss << "-bo ";
-    switch ( _getEndianness() ) {
-    default :
-    case END_LITTLE :
-      oss << "DCBA"; break;
-    case END_BIG :
-      oss << "ABCD"; break;
-    }
-    oss << "\n";
-  }
-  switch ( inr->dataMode ) {
-  default :
-  case DM_BINARY :
-    oss << "-om binar\n";
-    break;
-  case DM_ASCII :
-    oss << "-om ascii\n";
-  }
-  if( ImageIO_write( inr, oss.str().data(), oss.str().length()) == 0) {
-    return -1;
-  }
-  return 1;
-}
-
-
-int writeGisData( const _image*) 
-{
-  return -1;
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.h
deleted file mode 100644
index 1bfabb6..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/gis.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef GIS_H
-#define GIS_H
-
-
-#include <CGAL/ImageIO.h>
-
-
-
-
-/* read gis format header
-
-   Format du fichier texte associe aux fichiers binaires (images)
-
-exemple :
-         512 512 100 2
-	 -type U16
-	 -dx 1. 
-	 -dy 2.
-	 -dz .5
-	 -z2 5
-         -ar SUN
-	 -mod MR
-         -txt image acquise sur SIGNA 1.5T au CHRU de Caen
-         donnees brutes sans traitement  -endtxt
-	
-- la première ligne comporte les dimensions de l'image, respectivement, le nombre de colonnes, de lignes, de coupes et de temps; ces deux, trois ou quatre entiers doivent être strictement positifs et rester inférieurs à 4096.
-
-- les lignes suivantes comportent des champs indiques par des mots clefs:
-			
-   -type typespecifier
-
-   U8 entier non signé codé sur 8 bit (unsigned char) 
-   S8  entier signé codé sur 8 bit (signed char)
-   U16  entier non signé codé sur 16 bit (unsigned short)
-   S16  entier signé codé sur 16 bit (signed short)	
-   U32  entier non signé codé sur 32 bit (unsigned int)
-   S32  entier signé codé sur 32 bit (signed int)
-   FLOAT  flottant simple précision (float)
-   DOUBLE  flottant double précision (double)
-			
-   -dx double  (taille du voxel en x)
-   -dy double  (taille du voxel en y)
-   -dz double  (taille du voxel en z)
-               (les tailles sont donnees en millimetres)
-   -dt double  (taille du voxel en t)
-               (taille donnee en secondes)
-
-   (spécification d'un sous-volume)
-   -x1 entier  	
-   -x2 entier  	
-   -y1 entier  
-   -y2 entier  
-   -z1 entier  
-   -z2 entier  
-   -ref nom x y z t   
-        (origine d'un sous-volume : fichier correspondant a une
-         sous-image de "nom")
-
-   -ar architecture (string)
-   -mod modalite (string) : MR, PET, fMR, etc.
-   -dir plan de coupe (string) : sagittal, frontal, axial
-   -min double (valeur physique correspondant au minimum des voxels)
-   -max double (valeur physique correspondant au maximum des voxels)
-   -ca x y z (3 entiers pour la position de CA)
-   -cp x y z (3 entiers pour la position de CP)
-   -ip a b c d (4 double pour les coefficients du plan inter-hemispherique
-                equation de la forme ax+by+cz+d = 0)
-   -td d1 d2 d3 d4 d5 d6 (6 entiers pour les distances au repere de
-		Talairach, en voxels :
-		d1 : Talairach anterior plane-CA distance
-		d2 : Talairach posterior plane-CP distance
-		d3 : Talairach left plane-IP distance
-		d4 : Talairach right plane-IP distance
-   		d5 : Talairach bottom plane-CACP distance
-   		d6 : Talairach top plane-CACP distance
-   -a age (entier)
-   -s sexe (1/2)
-   -l lateralite
-   -txt texte libre (ascii)
-   -endtxt (fin du texte)
-
-
-   return:
-   -1: error
-   0: success
- */
-int readGisHeader(const char* name,_image *im);
-
-
-int testGisHeader(char *magic,const char *name);
-
-/** creates an return the file format structure associated with the Gis file format */
-PTRIMAGE_FORMAT createGisFormat();
-
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeGis( char *basename, _image* im ) ;
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeGisHeader( const _image* im ) ;
-
-
-/* 
-   return:
-   -1: error
-    1: success
- */
-int writeGisData( const _image* im ) ;
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.cpp
deleted file mode 100644
index 94d5571..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.cpp
+++ /dev/null
@@ -1,506 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#include "inr.h"
-#include "fgetns.h"
-
-#include <string>
-#include <sstream>
-
-/* Magic header for inrimages v4 */
-#define INR4_MAGIC "#INRIMAGE-4#{"
-
-
-/** Magic header for inrimages */
-#define INR_MAGIC "#INR"
-
-typedef struct stringListElementStruct {
-  char *string;
-  struct stringListElementStruct *next;
-} stringListElement;
-/* list element with a pointer on a string */
-
-typedef struct {
-  stringListElement *begin, *end;
-} stringListHead;
-/* string list descriptor */
-
-#include <clocale>
-class Set_numeric_locale {
-  const char * old_locale;
-public:
-  Set_numeric_locale(const char* locale) 
-    : old_locale(std::setlocale(LC_NUMERIC, locale))
-  {
-  }
-
-  ~Set_numeric_locale() {
-    std::setlocale(LC_NUMERIC, old_locale);
-  }
-};
-
-static void addStringElement(stringListHead *strhead,
-			     const char *str);
-/* add a string element at the tail of given list */
-
-static void concatStringElement(const stringListHead *strhead,
-				const char *str);
-/* concat given string at the last element of given list */
-
-
-/* Writes the given inrimage header in an already opened file.*/
-int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
-  unsigned int pos, i;
-  char type[30], endianness[5], buf[257], scale[20];
-  std::ostringstream oss;
-
-  Set_numeric_locale num_locale("C");
-
-  if(im->openMode != OM_CLOSE) {
-    /* fix word kind */
-    switch(im->wordKind) {
-
-    case WK_FLOAT:
-      sprintf(type, "float");
-      scale[0] = '\0';
-      break;
-
-    case WK_FIXED:
-      switch(im->sign) {
-      case SGN_SIGNED:
-	sprintf(type, "signed fixed");
-	break;
-      case SGN_UNSIGNED:
-	sprintf(type, "unsigned fixed");
-	break;
-      default:
-	return -1;
-      }
-      sprintf(scale, "SCALE=2**0\n");
-      break;
-      
-    default:
-      return -1;
-    }
-    
-    switch(end) {
-    case END_LITTLE:
-      sprintf(endianness, "decm");
-      break;
-    case END_BIG:
-      sprintf(endianness, "sun");
-      break;
-    default:
-      /* fix architecture endianness */
-      if( _getEndianness() == END_LITTLE)
-	sprintf(endianness, "decm");
-      else
-	sprintf(endianness, "sun");
-      break;
-    }
-
-    /* write header information */
-    oss << INR4_MAGIC << "\n";
-    oss << "XDIM=" << im->xdim << "\n";
-    oss << "YDIM=" << im->ydim << "\n";
-    oss << "ZDIM=" << im->zdim << "\n";
-    oss << "VDIM=" << im->vdim << "\n";
-    oss << "TYPE=" << type << "\n";
-    oss << "PIXSIZE=" << im->wdim*8 <<" bits\n";
-    oss << scale << "CPU=" << endianness << "\n";
-    oss << "VX=" << im->vx << "\n";
-    oss << "VY=" << im->vy << "\n";
-    oss << "VZ=" << im->vz << "\n";
-
-    if ( im->cx != 0 ) 
-      oss << "XO="<< im->cx << "\n";
-    if ( im->cy != 0 ) 
-      oss << "YO="<< im->cy << "\n";
-    if ( im->cz != 0 ) 
-      oss << "ZO="<< im->cz << "\n";
-    if ( im->tx != 0.0 ) 
-      oss << "TX="<< im->tx << "\n";
-    if ( im->ty != 0.0 ) 
-      oss << "TY="<< im->ty << "\n";
-    if ( im->tz != 0.0 ) 
-      oss << "TZ="<< im->tz << "\n";
-    if ( im->rx != 0.0 ) 
-      oss << "RX="<< im->rx <<"\n";
-    if ( im->ry != 0.0 ) 
-      oss << "RY="<< im->ry << "\n";
-    if ( im->rz != 0.0 ) 
-      oss << "RZ=" << im->rz <<"\n";
-
-    pos = oss.str().length();
-    
-    if(ImageIO_write(im, oss.str().data(), oss.str().length()) == 0)
-      return -1;
-    
-    
-    /* write user strings */
-    if ( im->user != NULL ) {
-      for(i = 0; i < im->nuser; i++) {
-	if ( im->user[i] == NULL ) continue;
-	pos += strlen(im->user[i]) + 2;
-	if(ImageIO_write(im, "#", 1) == 0) return -1;
-	if(ImageIO_write(im, im->user[i], strlen(im->user[i])) == 0) return -1;
-	if(ImageIO_write(im, "\n", 1) == 0) return -1;
-      }
-    }
-    /* write end of header */
-    pos = pos % 256;
-    if(pos > 252) {
-      for(i = pos; i < 256; i++)
-	if(ImageIO_write(im, "\n", 1) != 1) return -1;
-      pos = 0;
-    }
-    buf[0] = '\0';
-    for(i = pos; i < 252; i++) strcat(buf, "\n");
-    strcat(buf, "##}\n");
-    
-    if(ImageIO_write(im, buf, strlen(buf)) == 0) return -1;
-    else return 1;
-  }
-
-  else return -1;
-}
-
-
-
-/* Writes the given image body in an already opened file.*/
-int _writeInrimageData(const _image *im) {
-  unsigned long size, nbv, nwrt, i;
-  unsigned int v;
-  unsigned char **vp;
-  
-  if(im->openMode != OM_CLOSE) {
-
-    /* scalar or interlaced vectors */
-    if(im->vectMode != VM_NON_INTERLACED) {
-      size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
-      nwrt = ImageIO_write(im, im->data, size);
-      if(nwrt != size) return -1;
-      else return 1;
-    }
-
-    /* non interlaced vectors: interlace for saving */
-    else {
-      nbv = im->xdim * im->ydim * im->zdim;
-      size = im->xdim * im->ydim * im->zdim * im->wdim;
-      vp = (unsigned char **) ImageIO_alloc(im->vdim * sizeof(unsigned char *));
-      for(v = 0; v < im->vdim; v++)
-	vp[v] = (unsigned char *) im->data + v * size;
-      for(i = 0; i < nbv; i++)
-	for(v = 0; v < im->vdim; v++) {
-	  if(ImageIO_write(im, (const void *) vp[v], im->wdim) != im->wdim)
-	    return -1;
-	  vp[v] += im->wdim;
-	}
-      ImageIO_free(vp);
-      return 1;
-    }
-  }
-  else return -1;
-}
-
-
-
-
-/* read header of an opened inrimage */
-int readInrimageHeader(const char *,_image *im) {
-  char str[257];
-  int n, nusr;
-  stringListHead strl = { NULL, NULL };
-  stringListElement *oel, *el;
-
-  Set_numeric_locale num_locale("C");
-
-  if(im->openMode != OM_CLOSE) {
-    /* read image magic number */
-    if(!fgetns(str, 257, im )) return -1;
-    if(strcmp(str, INR4_MAGIC)) return -1;
-
-
-    /* while read line does not begin with '#' or '\n', read line
-       and decode field */
-    if(!fgetns(str, 257, im)) return -1;
-
-    while(str[0] != '#' && str[0] != '\0') {
-
-      if(!strncmp(str, "XDIM=", 5)) {
-        std::istringstream iss(str+5);
-        if(!(iss >> im->xdim)) return -1;
-      }
-      else if(!strncmp(str, "YDIM=", 5)) {
-        std::istringstream iss(str+5);
-        if(!(iss >> im->ydim)) return -1;
-      }
-      else if(!strncmp(str, "ZDIM=", 5)) {
-        std::istringstream iss(str+5);
-        if(!(iss >> im->zdim)) return -1;
-      }
-      else if(!strncmp(str, "VDIM=", 5)) {
-        std::istringstream iss(str+5);
-        if(!(iss >> im->vdim)) return -1;
-	if(im->vdim == 1) im->vectMode = VM_SCALAR;
-	else im->vectMode = VM_INTERLACED;
-      }
-      else if(!strncmp(str, "VX=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->vx)) return -1;
-      }
-      else if(!strncmp(str, "VY=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->vy)) return -1;
-      }
-      else if(!strncmp(str, "VZ=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->vz)) return -1;
-      }
-      else if(!strncmp(str, "TYPE=", 5)) {
-	if(!strncmp(str+5, "float", 5)) im->wordKind = WK_FLOAT;
-	else {
-	  if(!strncmp(str+5, "signed fixed", 12)) {
-	    im->wordKind = WK_FIXED;
-	    im->sign = SGN_SIGNED;
-	  }
-	  else if(!strncmp(str+5, "unsigned fixed", 14)) {
-	    im->wordKind = WK_FIXED;
-	    im->sign = SGN_UNSIGNED;
-	  }
-	  else return -1;
-	}
-      }
-      /* before "sscanf(str+8, "%i %n", &im->wdim, &n) != 1"
-	 was used. 
-	 However the man said 
-         ...
-	 n      Nothing is expected; instead, the number of charac­
-              ters consumed thus far from  the  input  is  stored
-              through  the  next pointer, which must be a pointer
-              to int.  This is not a conversion, although it  can
-              be  suppressed  with  the  *  flag.  The C standard
-              says: `Execution of a %n directive does not  incre­
-              ment  the  assignment count returned at the comple­
-              tion of execution' but  the  Corrigendum  seems  to
-              contradict  this.  Probably  it is wise not to make
-              any assumptions on the effect of %n conversions  on
-              the return value.
-	 ...
-	 Thus I change it. It was yielding a RETURN_FAILURE with 
-	 insight (GM).
-      */
-      else if(!strncmp(str, "PIXSIZE=", 8)) {
-        std::istringstream iss(str+8);
-        if(!(iss >> im->wdim)) return -1;
-	if(im->wdim != 8 && im->wdim != 16 && im->wdim != 32 &&
-	   im->wdim != 64) return -1;
-	
-	if ( im->wdim <= 9 ) {
-	  if(strncmp(str+8+1, " bits", 5)) return -1;
-	}
-	else if ( im->wdim <= 99 ) {
-	  if(strncmp(str+8+2, " bits", 5)) return -1;
-	}
-	else {
-	  return -1;
-	}
-
-	im->wdim >>= 3;
-      }
-      else if(!strncmp(str, "SCALE=", 6)) ;
-      else if(!strncmp(str, "CPU=", 4)) {
-	if(!strncmp(str+4, "decm", 4)) im->endianness = END_LITTLE;
-	else if(!strncmp(str+4, "alpha", 5)) im->endianness = END_LITTLE;
-	else if(!strncmp(str+4, "pc", 2)) im->endianness = END_LITTLE;
-	else if(!strncmp(str+4, "sun", 3)) im->endianness = END_BIG;
-	else if(!strncmp(str+4, "sgi", 3)) im->endianness = END_BIG;
-	else return -1;
-      }
-
-      else if(!strncmp(str, "XO=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->cx)) return -1;
-      }
-      else if(!strncmp(str, "YO=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->cy)) return -1;
-      }
-      else if(!strncmp(str, "ZO=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->cz)) return -1;
-      }
-
-      else if(!strncmp(str, "TX=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->tx)) return -1;
-      }
-      else if(!strncmp(str, "TY=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->ty)) return -1;
-      }
-      else if(!strncmp(str, "TZ=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->tz)) return -1;
-      }
-      else if(!strncmp(str, "RX=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->rx)) return -1;
-      }
-      else if(!strncmp(str, "RY=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->ry)) return -1;
-      }
-      else if(!strncmp(str, "RZ=", 3)) {
-        std::istringstream iss(str+3);
-        if(!(iss >> im->rz)) return -1;
-      }
-
-      if(!fgetns(str, 257, im)) return -1;
-    }
-
-    /* parse user strings */
-    im->nuser = nusr = 0;
-    while(str[0] == '#' && strncmp(str, "##}", 3)) {
-      addStringElement(&strl, str + 1);
-      while(strlen(str) == 256) {
-	if(!fgetns(str, 257, im)) return -1;
-	concatStringElement(&strl, str);
-      }
-      nusr++;
-      if(!fgetns(str, 257, im)) return -1;      
-    }
-    
-    /* go to end of header */
-    while(strncmp(str, "##}", 3)) {
-      if(!fgetns(str, 257, im)) return -1;
-    }
-    
-
-    /* check header validity */
-    if(im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
-       im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
-       (im->wordKind == WK_FLOAT || (im->wordKind == WK_FIXED &&
-				     im->sign != SGN_UNKNOWN)) &&
-       im->endianness != END_UNKNOWN) {
-      if(nusr > 0) {
-	im->nuser = nusr;
-	im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
-	oel = NULL;
-	for(el = strl.begin, n = 0; el != NULL; el = oel, n++) {
-	  im->user[n] = el->string;
-	  oel = el->next;
-	  ImageIO_free(el);
-	}
-      }
-      return 0;
-    }
-    else return -1;
-
-  }
-  else return -1;
-}
-
-
-
-/* add a string element at the tail of given list */
-static void addStringElement(stringListHead *strhead, const char *str) {
-  stringListElement *el;
-
-  el = (stringListElement *) ImageIO_alloc(sizeof(stringListElement));
-  /* was strdup(str); */
-  el->string = (char*)ImageIO_alloc( strlen(str)+1);
-  memcpy(el->string, str,  strlen(str)+1);
-  el->next = NULL;
-  if(strhead->begin == NULL)
-    strhead->begin = strhead->end = el;
-  else {
-    strhead->end->next = el;
-    strhead->end = el;
-  }
-}
-
-
-/* concat given string at the last element of given list */
-static void concatStringElement(const stringListHead *strhead,
-				const char *str) {
-  stringListElement *el;
-
-  el = strhead->end;
-  el->string = (char *) realloc(el->string,
-				strlen(el->string) + strlen(str) + 1);
-  strcat(el->string, str);
-}
-
-int testInrimageHeader(char *magic,const char *) {
-  if (!strcmp(magic, INR_MAGIC))
-    return 0;
-  else 
-    return -1;
-}
-
-int writeInrimage(char *name,_image *im) {
-  int res;
-
-  _openWriteImage( im, name );
-
-  if(!im->fd) {
-    fprintf(stderr, "writeInrimage: error: unable to open file \'%s\'\n", name );
-    return ImageIO_OPENING;
-  }
-
-  res = _writeInrimageHeader(im, END_UNKNOWN);
-  if (res < 0) {
-    fprintf(stderr, "writeInrimage: error: unable to write header of \'%s\'\n",
-	    name);
-    ImageIO_close( im );
-    im->fd = NULL;
-    im->openMode = OM_CLOSE;
-    return( res );
-  }
-  
-  res = _writeInrimageData( im );
-  if (res < 0) {
-    fprintf(stderr, "writeInrimage: error: unable to write data of \'%s\'\n",
-	    name);
-    ImageIO_close( im );
-    im->fd = NULL;
-    im->openMode = OM_CLOSE;
-    return( res );
-  }
-
-  ImageIO_close( im );
-  im->fd = NULL;
-  im->openMode = OM_CLOSE;
-
-  return ( res );  
-}
-
-PTRIMAGE_FORMAT createInrimageFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testInrimageHeader;
-  f->readImageHeader=&readInrimageHeader;
-  f->writeImage=&writeInrimage;
-  strcpy(f->fileExtension,".inr,.inr.gz,.gradient,.gradient.gz,.gradient_direction,.gradient_direction.gz");
-  strcpy(f->realName,"Inrimage");
-  return f;
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.h
deleted file mode 100644
index 1a5e638..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/inr.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-
-#ifndef INR_H
-#define INR_H
-
-
-#include <CGAL/ImageIO.h>
-
-
-
-/** Writes the given inrimage header in an already opened file.
-    @param im image descriptor
-    @param end image data endianness (END_UNKNOWN to use architecture endianness) */
-int _writeInrimageHeader(const _image *im,
-			 ENDIANNESS end);
-
-/** Writes the given image body in an already opened file.
-    @param im image descriptor */
-int _writeInrimageData(const _image *im);
-
-/** read header from an opened inrimage file
-    @param im opened inrmage descriptor */
-int readInrimageHeader(const char *,_image *im);
-
-/** test if an image file has the Inrimage format, given the magic string
-    and filename
-    @param magic this string is of size 5 and corresponds to the first 4 characters of the file (terminated with a null character)
-    @param filename the file name
-    @return -1 if it is not an Inrimage file and 0 otherwise */
-int testInrimageHeader(char *magic,const char *filename); 
-
-/** calls _writeInrimageHeader and _writeInrimageData
-    @param basename the file name without any extension 
-    @param im structure
-    @return same as  _writeInrimageHeader*/
-int writeInrimage(char *basename,_image *im);
-/** creates an return the file format structure associated with the Inrimage file format */
-PTRIMAGE_FORMAT createInrimageFormat();
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.cpp
deleted file mode 100644
index 2cce058..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.cpp
+++ /dev/null
@@ -1,491 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*
- * xviris.c - load routine for IRIS 'rgb' format pictures
- *
- * LoadIRIS()
- * WriteIRIS()
- */
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include "iris.h"
-
-
-
-/** Magic header for RGB files */
-#define IRIS_MAGIC 0732
-
-
-
-typedef unsigned char byte;
-
-#define BPPMASK			0x00ff
-#define ITYPE_VERBATIM		0x0000
-#define ITYPE_RLE		0x0100
-#define ISRLE(type)		(((type) & 0xff00) == ITYPE_RLE)
-#define ISVERBATIM(type)	(((type) & 0xff00) == ITYPE_VERBATIM)
-#define BPP(type)		((type) & BPPMASK)
-#define RLE(bpp)		(ITYPE_RLE | (bpp))
-#define VERBATIM(bpp)		(ITYPE_VERBATIM | (bpp))
-
-
-
-
-
-
-#define TAGLEN	(5)
-
-#define RINTLUM (79)
-#define GINTLUM (156)
-#define BINTLUM (21)
-
-#define OFFSET_R	3	/* this is byte order dependent */
-#define OFFSET_G	2
-#define OFFSET_B	1
-#define OFFSET_A	0
-
-#define ILUM(r,g,b)     ((int)(RINTLUM*(r)+GINTLUM*(g)+BINTLUM*(b))>>8)
-#define CHANOFFSET(z)	(3-(z))	/* this is byte order dependent */
-
-static byte    *getimagedata  (const _image *im, unsigned short, int, int, int);
-static void     interleaverow (byte *, byte *, int, int);
-static void     expandrow     (byte *, byte *, int);
-static void     readtab       (const _image *im, unsigned long *, int);
-static void     addimgtag     (byte *, int, int);
-
-
-static unsigned short  getshort      (const _image *im);
-static unsigned long   getlong       (const _image *im);
-
-
-
-int testIrisHeader(char *magic,const char *) {
-  if((((unsigned char *)magic)[0]<<8) + ((unsigned char *)magic)[1]
-     == IRIS_MAGIC)
-    return 0;
-  else 
-    return -1;
-}
-
-PTRIMAGE_FORMAT createIrisFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testIrisHeader;
-  f->readImageHeader=&readIrisImage;
-  f->writeImage=0;
-  strcpy(f->fileExtension,".rgb");
-  strcpy(f->realName,"IRIS");
-  return f;
-}
-
-
-
-/******************************************/
-static void interleaverow(byte *lptr, byte *cptr, int z, int n)
-{
-  lptr += z;
-  while(n--) {
-    *lptr = *cptr++;
-    lptr += 4;
-  }
-}
-
-
-/******************************************/
-static void expandrow(byte *optr, byte *iptr, int z)
-{
-  byte pixel, count;
-
-  optr += z;
-  while (1) {
-    pixel = *iptr++;
-    if ( !(count = (pixel & 0x7f)) ) return;
-    if (pixel & 0x80) {
-      while (count>=8) {
-	optr[0*4] = iptr[0];
-	optr[1*4] = iptr[1];
-	optr[2*4] = iptr[2];
-	optr[3*4] = iptr[3];
-	optr[4*4] = iptr[4];
-	optr[5*4] = iptr[5];
-	optr[6*4] = iptr[6];
-	optr[7*4] = iptr[7];
-	optr += 8*4;
-	iptr += 8;
-	count -= 8;
-      }
-      while(count--) {
-	*optr = *iptr++;
-	optr+=4;
-      }
-    }
-    else {
-      pixel = *iptr++;
-      while(count>=8) {
-	optr[0*4] = pixel;
-	optr[1*4] = pixel;
-	optr[2*4] = pixel;
-	optr[3*4] = pixel;
-	optr[4*4] = pixel;
-	optr[5*4] = pixel;
-	optr[6*4] = pixel;
-	optr[7*4] = pixel;
-	optr += 8*4;
-	count -= 8;
-      }
-      while(count--) {
-	*optr = pixel;
-	optr+=4;
-      }
-    }
-  }
-}
-
-/****************************************************/
-static void readtab(const _image *im, unsigned long *tab, int n)
-{
-  while (n) {
-    *tab++ = getlong(im);
-    n--;
-  }
-}
-
-
-/*****************************************************/
-static void addimgtag(byte *dptr, int xsize, int ysize)
-{
-  /* this is used to extract image data from core dumps. 
-     I doubt this is necessary...  --jhb */
-
-  dptr    = dptr + (xsize * ysize * 4);
-  dptr[0] = 0x12;  dptr[1] = 0x34;  dptr[2] = 0x56;  dptr[3] = 0x78;
-  dptr += 4;
-
-  dptr[0] = 0x59;  dptr[1] = 0x49;  dptr[2] = 0x33;  dptr[3] = 0x33;
-  dptr += 4;
-
-  dptr[0] = 0x69;  dptr[1] = 0x43;  dptr[2] = 0x42;  dptr[3] = 0x22;
-  dptr += 4;
-
-  dptr[0] = (xsize>>24)&0xff;
-  dptr[1] = (xsize>>16)&0xff;
-  dptr[2] = (xsize>> 8)&0xff;
-  dptr[3] = (xsize    )&0xff;
-  dptr += 4;
-
-  dptr[0] = (ysize>>24)&0xff;
-  dptr[1] = (ysize>>16)&0xff;
-  dptr[2] = (ysize>> 8)&0xff;
-  dptr[3] = (ysize    )&0xff;
-}
-
-/* byte order independent read/write of shorts and longs. */
-/*****************************************************/
-static unsigned short getshort( const _image *im)
-{
-  byte buf[2];
-  ImageIO_read( im, buf, (size_t) 2);
-  return (buf[0]<<8)+(buf[1]<<0);
-}
-
-/*****************************************************/
-static unsigned long getlong( const _image *im )
-{
-  byte buf[4];
-  ImageIO_read( im, buf, (size_t) 4);
-  return (((unsigned long) buf[0])<<24) + (((unsigned long) buf[1])<<16)
-       + (((unsigned long) buf[2])<<8) + buf[3];
-}
-
-/*****************************************************/
-int readIrisImage( const char *, _image *im ) {
-  byte   *rawdata, *rptr;
-  byte   *pic824,  *bptr, *iptr;
-  int     i, j, size;
-  unsigned short imagic, type;
-  int xsize, ysize, zsize;
-
-
-  /* read header information from file */
-  imagic = getshort( im );
-  type   = getshort( im );
-  getshort( im );
-  xsize  = getshort( im );
-  ysize  = getshort( im );
-  zsize  = getshort( im );
-
-  if ( ImageIO_error(im) ) return( 0 );
-
-  if (imagic != IRIS_MAGIC) return( 0 );
-
-  rawdata = getimagedata(im, type, xsize, ysize, zsize);
-  if (!rawdata) return( 0 );
-
-  if ( ImageIO_error(im) ) return( 0 );   /* probably truncated file */
-
-
-  /*  t1=texture_alloc();
-  (void) strcpy(t1->name,fname);
-  t1->type=IRIS;
-  
-  t1->nrows = ysize;
-  t1->ncols = xsize;
-    
-  t1->image = create_int_array(t1->nrows,t1->ncols);*/
-
-  /* got the raw image data.  Convert to an XV image (1,3 bytes / pix) */
-  if (zsize < 3) 
-    {  /* grayscale */
-      im->xdim = xsize;
-      im->ydim = ysize;
-      im->zdim = 1;
-      im->vdim = 1;
-      im->wdim = 1;
-      im->wordKind = WK_FIXED;
-      im->sign = SGN_UNSIGNED;
-      im->data = ImageIO_alloc(xsize * ysize);
-
-      pic824 = (byte *) ImageIO_alloc((size_t) xsize * ysize);
-      if (!pic824) exit(-1);
-      
-      /* copy plane 3 from rawdata into pic824, inverting pic vertically */
-      for (i = 0, bptr = pic824; i < (int) ysize; i++) 
-	{
-	  rptr = rawdata + 3 + ((ysize - 1) - i) * (xsize * 4);
-	  for (j = 0; j < (int) xsize; j++, bptr++, rptr += 4)
-	    *bptr = *rptr;
-	}
-      
-      
-      size = im->xdim * im->ydim;
-      for (bptr = pic824, iptr = (unsigned char *) im->data,
-	     i = 0; i < size; ++i, ++iptr, ++bptr)
-	{
-	  *iptr = *bptr;
-	}
-      
-      ImageIO_free(pic824);
-    
-  }
-
-  else {  /* truecolor */
-    im->xdim = xsize;
-    im->ydim = ysize;
-    im->zdim = zsize / 3;
-    im->vdim = 4;
-    im->wdim = 1;
-    im->wordKind = WK_FIXED;
-    im->sign = SGN_UNSIGNED;
-    im->data = ImageIO_alloc(xsize * ysize * im->zdim * 4);
-
-    pic824 = (byte *) ImageIO_alloc((size_t) xsize * ysize * 3);
-    if (!pic824) 
-      exit(1);
-    
-    /* copy plane 3 from rawdata into pic824, inverting pic vertically */
-    for (i = 0, bptr = pic824; i<(int) ysize; i++) 
-      {
-	rptr = rawdata + ((ysize - 1) - i) * (xsize * 4);
-
-	for (j=0; j<(int) xsize; j++, rptr += 4) {
-	  *bptr++ = rptr[3];
-	  *bptr++ = rptr[2];
-	  *bptr++ = rptr[1];
-	}
-      }
-    
-    
-    size = im->xdim * im->ydim;
-    for (bptr = pic824, iptr = (unsigned char *) im->data, i = 0;
-	 i < size; ++i, iptr += 4, bptr += 3)
-      {
-	if ( _getEndianness() == END_LITTLE ) {
-	  iptr[0] = 0xFF;
-	  iptr[1] = bptr[2];
-	  iptr[2] = bptr[1];
-	  iptr[3] = bptr[0];
-	}
-	else {
-	  iptr[0] = bptr[0];
-	  iptr[1] = bptr[1];
-	  iptr[2] = bptr[2];
-	  iptr[3] = 0xFF;
-	}
-      }
-      ImageIO_free(pic824);
-  }
-
-  ImageIO_free(rawdata);
-
-  return 1;
-}     
-
-
-
-
-/****************************************************/
-static byte *getimagedata(const _image *im, unsigned short type, int xsize, int ysize,
-			  int zsize)
-{
-  /* read in a B/W RGB or RGBA iris image file and return a 
-     pointer to an array of 4-byte pixels, arranged ABGR, NULL on error */
-
-  byte   *base, *lptr;
-  byte   *verdat;
-  int     y, z, tablen;
-  int     bpp, rle, badorder;
-  int     rlebuflen;
-  byte *rledat;
-  unsigned long *starttab, *lengthtab, cur;
-
-
-  rle     = ISRLE(type);
-  bpp     = BPP(type);
-
-  if (bpp != 1) {
-    return (byte *) NULL;
-  }
-
-  if (rle) {
-
-    rlebuflen = 2 * xsize + 10;
-    tablen    = ysize * zsize;
-    starttab  = (unsigned long *) ImageIO_alloc((size_t) tablen * sizeof(long));
-    lengthtab = (unsigned long *) ImageIO_alloc((size_t) tablen * sizeof(long));
-    rledat    = (byte *)   ImageIO_alloc((size_t) rlebuflen);
-
-    if (!starttab || !lengthtab || !rledat) 
-      exit(1);
-
-    ImageIO_seek( im, 512L, SEEK_SET );
-    readtab(im, starttab,  tablen);
-    readtab(im, lengthtab, tablen);
-
-    if ( ImageIO_error(im) ) {
-      ImageIO_free(starttab);  ImageIO_free(lengthtab);  ImageIO_free(rledat);
-      return (byte *) NULL;
-    }
-
-
-    /* check data order */
-    cur = 0;
-    badorder = 0;
-    for (y=0; y<ysize && !badorder; y++) {
-      for (z=0; z<zsize && !badorder; z++) {
-	if (starttab[y+z*ysize] < cur) badorder = 1;
-	else cur = starttab[y+z*ysize];
-      }
-    }
-
-    ImageIO_seek( im, (long) (512 + 2*tablen*4), 0);
-
-    cur = 512 + 2*tablen*4;
-
-    base = (byte *) ImageIO_alloc((size_t) (xsize*ysize+TAGLEN) * 4);
-    if (!base) 
-      exit(1);
-
-    addimgtag(base,xsize,ysize);
-
-    if (badorder) {
-      for (z=0; z<zsize; z++) {
-	lptr = base;
-	for (y=0; y<ysize; y++) {
-	  if (cur != starttab[y+z*ysize]) {
-	    ImageIO_seek( im, (long) starttab[y+z*ysize], 0);
-	    cur = starttab[y+z*ysize];
-	  }
-
-	  if (lengthtab[y+z*ysize]>(unsigned long)rlebuflen) {
-	    ImageIO_free(starttab); ImageIO_free(lengthtab); ImageIO_free(rledat); ImageIO_free(base);
-	    return (byte *) NULL;
-	  }
-	  ImageIO_read(im, rledat, (size_t) lengthtab[y+z*ysize]);
-	  cur += lengthtab[y+z*ysize];
-	  expandrow(lptr,rledat,3-z);
-	  lptr += (xsize * 4);
-	}
-      }
-    }
-    else {
-      lptr = base;
-      for (y=0; y<ysize; y++) {
-	for (z=0; z<zsize; z++) {
-	  if (cur != starttab[y+z*ysize]) {
-	    ImageIO_seek( im, (long) starttab[y+z*ysize], 0);
-	    cur = starttab[y+z*ysize];
-	  }
-	  
-	  ImageIO_read(im, rledat, (size_t) lengthtab[y+z*ysize]);
-	  cur += lengthtab[y+z*ysize];
-	  expandrow(lptr,rledat,3-z);
-	}
-	lptr += (xsize * 4);
-      }
-    }
-
-    ImageIO_free(starttab);
-    ImageIO_free(lengthtab);
-    ImageIO_free(rledat);
-    return base;
-  }      /* end of RLE case */
-
-  else {  /* not RLE */
-    verdat = (byte *) ImageIO_alloc((size_t) xsize);
-    base   = (byte *) ImageIO_alloc((size_t) (xsize*ysize+TAGLEN) * 4);
-    if (!base || !verdat) 
-      exit(1);
-
-    addimgtag(base,xsize,ysize);
-
-    ImageIO_seek( im, 512L,0);
-
-    for (z=0; z<zsize; z++) {
-      lptr = base;
-      for (y=0; y<ysize; y++) {
-	ImageIO_read(im, verdat, (size_t) xsize);
-	interleaverow(lptr,verdat,3-z,xsize);
-	lptr += (xsize * 4);
-      }
-    }
-
-    ImageIO_free(verdat);
-    return base;
-  }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.h
deleted file mode 100644
index 4a19faf..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/iris.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef IRIS_H
-#define IRIS_H
-
-#include <CGAL/ImageIO.h>
-
-
-
-PTRIMAGE_FORMAT createIrisFormat();
-int readIrisImage( const char *name, _image *im );
-int testIrisHeader(char *magic,const char *name);
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.cpp
deleted file mode 100644
index 19a2215..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifdef _MSC_VER
-#pragma warning ( disable : 4068 4786 4081 )
-#endif
-
-#ifdef MINC_FILES
-
-#include "mincio.h"
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-
-
-/** Magic header for MINC (MNI NetCDF) file format */
-#ifdef MINC_FILES
-#  define MINC_MAGIC "CDF"
-#endif
-
-
-
-int readMincHeader(_image *im, const char* filename,
-		   double *startx, double *starty, double *startz,
-		   double *stepx, double *stepy, double *stepz,
-		   double *Xcosines, double *Ycosines, double *Zcosines) {
-  int fin, varid, minc_icv, id, ndims, i, dim[256], length,
-    minfound = 0, maxfound = 0;
-  long start[3] = {0, 0, 0}, count[3];
-  unsigned int plane1, plane2, line, shift[3], ct[3];
-  nc_type type;
-  char sign_type[MI_MAX_ATTSTR_LEN], name[MAX_NC_NAME];
-  void *data;
-  double range[2], swap;
-
-  /* open minc file */
-  fin = miopen((char *) filename, NC_NOWRITE);
-  if(fin == MI_ERROR) return 0;
-
-  /* get number of dimensions and type */
-  id = ncvarid(fin, MIimage);
-  (void) ncvarinq(fin, id, NULL, &type, &ndims, dim, NULL);
-  if(ndims != 3) {
-    fprintf(stderr, "unsupported %i dimensional minc file\n", ndims);
-    return 0;
-  }
-
-  /* get sign */
-  if ((miattgetstr(fin, id, MIsigntype, MI_MAX_ATTSTR_LEN, sign_type)
-       == NULL) || ((strcmp(sign_type, MI_UNSIGNED)!=0) && 
-		    (strcmp(sign_type, MI_SIGNED)!=0))) {
-    if (type == NC_BYTE)
-      (void) strcpy(sign_type, MI_UNSIGNED);
-    else
-      (void) strcpy(sign_type, MI_SIGNED);
-  }
-  im->sign = (!strcmp(sign_type, MI_UNSIGNED)) ? SGN_UNSIGNED : SGN_SIGNED;
-  
-  switch(type) {
-  case NC_CHAR:
-  case NC_BYTE:
-    im->wdim = 1;
-    im->wordKind = WK_FIXED;
-    im->sign = SGN_UNSIGNED;
-    break;
-  case NC_SHORT:
-    im->wdim = 2;
-    im->wordKind = WK_FIXED;
-    break;
-  case NC_LONG:
-    im->wdim = 4;
-    im->wordKind = WK_FIXED;
-    break;
-  case NC_FLOAT:
-    im->wdim = 4;
-    im->wordKind = WK_FLOAT;
-    im->sign = SGN_UNKNOWN;
-    break;
-  case NC_DOUBLE:
-    im->wdim = 8;
-    im->wordKind = WK_FLOAT;
-    im->sign = SGN_UNKNOWN;
-    break;
-  default:
-    fprintf(stderr, "unsupported minc type\n");
-    return 0;
-    break;
-  }
-
-
-  /* get dimensions length and voxel size */
-  ncopts = 0;
-  for(i = 0; i < ndims; i++) {
-    (void) ncdiminq(fin, dim[i], name, &count[i]);
-    varid = ncvarid(fin, name);
-    if(!strcmp(name, MIxspace)) {
-      im->xdim = count[i];
-      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepx) == MI_ERROR)
-	*stepx = 1.0;
-      im->vx = fabs(*stepx);
-      if(miattget1(fin, varid, MIstart, NC_DOUBLE, startx) == MI_ERROR)
-	*startx = 0.0;
-      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
-		  (void *) Xcosines, (int *) 0) == MI_ERROR ) {
-	Xcosines[0] = 0.0;
-	Xcosines[1] = 0.0;
-	Xcosines[2] = 0.0;
-      }
-    }
-    else if(!strcmp(name, MIyspace)) {
-      im->ydim = count[i];
-      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepy) == MI_ERROR)
-	*stepy = 1.0;
-      im->vy = fabs(*stepy);
-      if(miattget1(fin, varid, MIstart, NC_DOUBLE, starty) == MI_ERROR)
-	*starty = 0.0;
-      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
-		  (void *) Ycosines, (int *) 0) == MI_ERROR ) {
-	Ycosines[0] = 0.0;
-	Ycosines[1] = 0.0;
-	Ycosines[2] = 0.0;
-      }
-    }
-    else if(!strcmp(name, MIzspace)) {
-      im->zdim = count[i];
-      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepz) == MI_ERROR)
-	*stepz = 1.0;
-      im->vz = fabs(*stepz);
-      if(miattget1(fin, varid, MIstart, NC_DOUBLE, startz) == MI_ERROR)
-	*startz = 0.0;
-      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
-		  (void *) Zcosines, (int *) 0) == MI_ERROR ) {
-	Zcosines[0] = 0.0;
-	Zcosines[1] = 0.0;
-	Zcosines[2] = 0.0;
-      }
-    } else {
-      fprintf(stderr, "unsupported dimension %s\n", name);
-      return 0;
-    }
-  }
-
-
-  if( miattget( fin, id, MIvalid_range, NC_DOUBLE, 2,
-		(void *) range, &length) == MI_ERROR || length != 2 ) {
-    if( miattget1( fin, id, MIvalid_min, NC_DOUBLE,
-		   (void *) &range[0] ) != MI_ERROR )
-      minfound = 1;
-    if( miattget1( fin, id, MIvalid_max, NC_DOUBLE,
-		   (void *) &range[1] ) != MI_ERROR )
-      maxfound = 1;
-  }
-  else {
-    if( range[0] > range[1] ) {
-      swap = range[0];
-      range[0] = range[1];
-      range[1] = swap;
-    }
-    minfound = 1;
-    maxfound = 1;
-  }
-  
-  if(!minfound) {
-    switch(type) {
-    case NC_CHAR:
-    case NC_BYTE:
-      range[0] = 0;
-      break;
-    case NC_SHORT:
-      if(im->sign == SGN_SIGNED) range[0] = -32768.0;
-      else range[0] = 0;
-      break;
-    case NC_LONG:
-      if(im->sign == SGN_SIGNED) range[0] = -2147483648.0;
-      else range[0] = 0;
-      break;
-    default:
-      range[0] = 0.0;
-      break;
-    }
-  }
-  if(!maxfound) {
-    switch(type) {
-    case NC_CHAR:
-    case NC_BYTE:
-      range[1] = 255.0;
-      break;
-    case NC_SHORT:
-      if(im->sign == SGN_SIGNED) range[1] = 32767.0;
-      else range[1] = 65535.0;
-      break;
-    case NC_LONG:
-      if(im->sign == SGN_SIGNED) range[1] = 2147483647.0;
-      else range[1] = 4294967295.0;
-      break;
-    default:
-      range[1] = 1.0;
-      break;
-    }
-  }
-
-  ncopts = NC_VERBOSE | NC_FATAL;
-  im->vdim = 1;
-
-  /* read data bytes */
-  im->data = ImageIO_alloc(im->xdim * im->ydim * im->zdim * im->vdim *
-			   im->wdim);
-
-  minc_icv = miicv_create();
-  (void) miicv_setint( minc_icv, MI_ICV_TYPE, type );
-  (void) miicv_setstr( minc_icv, MI_ICV_SIGN, sign_type );
-  (void) miicv_setint( minc_icv, MI_ICV_DO_NORM, 1 );
-  (void) miicv_setint( minc_icv, MI_ICV_DO_FILLVALUE, 1 );
-  (void) miicv_setdbl( minc_icv, MI_ICV_VALID_MIN, range[0] );
-  (void) miicv_setdbl( minc_icv, MI_ICV_VALID_MAX, range[1] );
-
-  (void) miicv_attach( minc_icv, fin, id );
-
-  if(miicv_get(minc_icv, start, count, im->data) ==  MI_ERROR) {
-    fprintf(stderr, "error while reading file\n");
-    return 0;
-  }
-  (void) miicv_detach( minc_icv );
-  (void) miicv_free( minc_icv );
-
-  ImageIO_closeImage(im);
-
-  /* order data in ZYX */
-  (void) ncdiminq(fin, dim[0], name, NULL);
-  if(!strcmp(name, MIzspace)) {
-    (void) ncdiminq(fin, dim[1], name, NULL);
-    /* file is ZYX */
-    if(!strcmp(name, MIyspace)) {
-      miclose(fin);
-      return 1;
-    }
-  }
-
-  (void) ncdiminq(fin, dim[0], name, NULL);
-  /* file is ZXY */
-  if(!strcmp(name, MIzspace)) {
-    shift[0] = 0;
-    shift[1] = 2;
-    shift[2] = 1;
-    plane2 = im->xdim * im->ydim;
-    line = im->ydim;
-  }
-  /* file is Y first */
-  else if(!strcmp(name, MIyspace)) {
-    shift[0] = 1;
-    plane2 = im->xdim * im->zdim;
-    (void) ncdiminq(fin, dim[1], name, NULL);
-    /* file is YXZ */
-    if(!strcmp(name, MIxspace)) {
-      shift[1] = 2;
-      shift[2] = 0;
-      line = im->zdim;
-    }
-    /* file is YZX */
-    else {
-      shift[1] = 0;
-      shift[2] = 2;
-      line = im->xdim;
-    }
-  }
-  /* file is X first */
-  else {
-    shift[0] = 2;
-    plane2 = im->ydim * im->zdim;
-    (void) ncdiminq(fin, dim[1], name, NULL);
-    /* file is XYZ */
-    if(!strcmp(name, MIyspace)) {
-      shift[1] = 1;
-      shift[2] = 0;
-      line = im->zdim;
-    }
-    /* file is XZY */
-    else {
-      shift[1] = 0;
-      shift[2] = 1;
-      line = im->ydim;
-    }
-  }
-  
-  data = ImageIO_alloc(im->xdim * im->ydim * im->zdim * im->vdim * im->wdim);
-  plane1 = im->xdim * im->ydim;
-  
-  for(ct[0] = 0; ct[0] < im->zdim; ct[0]++) {
-    for(ct[1] = 0; ct[1] < im->ydim; ct[1]++) {
-      for(ct[2] = 0; ct[2] < im->xdim; ct[2]++) {
-	memcpy((unsigned char *) data +
-	       (ct[0] * plane1 + ct[1] * im->xdim + ct[2]) * im->wdim,
-	       (unsigned char *) im->data +
-	       (ct[shift[0]] * plane2 + ct[shift[1]] * line + ct[shift[2]])
-	       * im->wdim, im->wdim);
-      }
-    }
-  }
-
-  ImageIO_free(im->data);
-  im->data = data;
-
-  /* close file */
-  miclose(fin);
-  return 1;
-}
-
-
-
-
-int writeMincFile( const _image* im, const char *filename,
-		   const char *sourcename,
-		   double startx, double starty, double startz,
-		   double stepx, double stepy, double stepz,
-		   const double *Xcosine, const double *Ycosine,
-		   const double *Zcosine, const double *range ) {
-  int i, cdfid, minc_icv, dim_vars[3], dim_ids[3], img_var_id, min_id, max_id,
-    src_cdfid, src_img_var, varid, n_excluded, excluded_vars[10],
-    src_min_id, src_max_id, src_root_id, old_att_length, same_file = 0;
-  long org[3] = {0, 0, 0}, count[3] = { im->zdim, im->ydim, im->xdim };
-  char *dim_names[3] = { MIzspace, MIyspace, MIxspace }, *history,
-       *excluded_list[3] = { MIxspace, MIyspace, MIzspace }, *newname;
-  nc_type type, datatype;
-  double start[3] = { startz, starty, startx },
-	    vx[3] = { stepz, stepy, stepx };
-
-  /* if filename is the same file that sourcename, it is needed to create
-     a temporary file for output */
-  newname = (char *) filename;
-  if(sourcename) {
-    struct stat out, org;
-    same_file = (stat(sourcename, &org) == 0) && (stat(filename, &out) == 0)
-      && (org.st_ino == out.st_ino);
-    if(same_file) {
-      newname = (char *) malloc((strlen(filename) + 10) * sizeof(char));
-      for(i = strlen(filename) - 1; i > 0 && filename[i] != '/'; i--) ;
-      if(filename[i] == '/') {
-	strncpy(newname, filename, i + 1);
-	newname[i+1] = '\0';
-	strcat(newname, "#TMP#");
-	strcat(newname, filename + i + 1);
-      }
-      else
-	sprintf(newname, "#TMP#%s", filename);
-    } 
-  }
-
-  /* open file */
-  cdfid = micreate( (char *) newname, NC_CLOBBER );
-  if( cdfid == MI_ERROR ) {
-    fprintf(stderr, "Error: opening MINC file \"%s\".\n", filename );
-    return -1;
-  }
-
-  /* set word type */
-  switch(im->wordKind) {
-  case WK_FIXED:
-    if(im->wdim == 1) type = NC_BYTE;
-    else if(im->wdim == 2) type = NC_SHORT;
-    else type = NC_LONG;
-    break;
-  case WK_FLOAT:
-  default:
-    if(im->wdim == 4) type = NC_FLOAT;
-    else type = NC_DOUBLE;    
-    break;
-  }
-
-  /* create dimensions variables */
-  for(i = 0; i < 3; i++)
-    dim_vars[i] = ncdimdef( cdfid, dim_names[i], count[i] );
-
-  for(i = 0; i < 3; i++ ) {
-    dim_ids[i] = micreate_std_variable( cdfid, dim_names[i], NC_DOUBLE,
-					0, NULL);
-    if( dim_ids[i] < 0 ) return -1;
-    (void) miattputdbl( cdfid, dim_ids[i], MIstep, vx[i]);
-    (void) miattputdbl( cdfid, dim_ids[i], MIstart, start[i]);
-  }
-  if(Zcosine[0] != 0.0 || Zcosine[1] != 0.0 || Zcosine[2] != 0.0)
-    (void) ncattput(cdfid, dim_ids[0], MIdirection_cosines, NC_DOUBLE, 3,
-		    Zcosine);
-  if(Ycosine[0] != 0.0 || Ycosine[1] != 0.0 || Ycosine[2] != 0.0)
-    (void) ncattput(cdfid, dim_ids[1], MIdirection_cosines, NC_DOUBLE, 3,
-		    Ycosine);
-  if(Xcosine[0] != 0.0 || Xcosine[1] != 0.0 || Xcosine[2] != 0.0)
-    (void) ncattput(cdfid, dim_ids[2], MIdirection_cosines, NC_DOUBLE, 3,
-		    Xcosine);
-
-  /* create image variable */
-  img_var_id = micreate_std_variable( cdfid, MIimage, type, 3, dim_vars );
-  (void) miattputstr( cdfid, img_var_id, MIcomplete, MI_FALSE );
-  if(im->sign == SGN_SIGNED)
-    (void) miattputstr( cdfid, img_var_id, MIsigntype, MI_SIGNED );
-  else
-    (void) miattputstr( cdfid, img_var_id, MIsigntype, MI_UNSIGNED );
-  (void) ncattput(cdfid, img_var_id, MIvalid_range ,NC_DOUBLE, 2, range);
-    
-  min_id = micreate_std_variable(cdfid, MIimagemin, NC_DOUBLE, 0, 0 );
-  max_id = micreate_std_variable(cdfid, MIimagemax, NC_DOUBLE, 0, 0 );
-
-  /* if the image comes from a minc file, duplicate all minc attributes */
-  if(sourcename) {
-    if( (src_cdfid = miopen((char *) sourcename, NC_NOWRITE)) == MI_ERROR ) {
-      fprintf(stderr, "Error opening %s\n", sourcename );
-      return -1;
-    }
-
-    n_excluded = 0;
-    for( i = 0; i < 3; i++ ) {
-      if( (varid = ncvarid(src_cdfid, excluded_list[i] )) != MI_ERROR )
-	excluded_vars[n_excluded++] = varid;
-    }
-    
-    if( (src_img_var = ncvarid(src_cdfid, MIimage )) != MI_ERROR )
-      excluded_vars[n_excluded++] = src_img_var;
-    if( (src_max_id = ncvarid(src_cdfid, MIimagemax )) != MI_ERROR )
-      excluded_vars[n_excluded++] = src_max_id;
-    if( (src_min_id = ncvarid(src_cdfid, MIimagemin )) != MI_ERROR )
-      excluded_vars[n_excluded++] = src_min_id;
-    if( (src_root_id = ncvarid(src_cdfid, MIrootvariable )) != MI_ERROR )
-      excluded_vars[n_excluded++] = src_root_id;
-    
-    (void) micopy_all_var_defs( src_cdfid, cdfid, n_excluded, excluded_vars );
-    
-    if( src_img_var != MI_ERROR )
-      (void) micopy_all_atts( src_cdfid, src_img_var, cdfid, img_var_id );
-    if( src_root_id != MI_ERROR )
-      (void) micopy_all_atts( src_cdfid, src_root_id, cdfid,
-			      ncvarid( cdfid, MIrootvariable) );
-
-    ncopts = 0;
-    if(ncattinq(cdfid, NC_GLOBAL, MIhistory, &datatype, &old_att_length)
-       == MI_ERROR || datatype != NC_CHAR )
-      old_att_length = 0;
-   
-    history = (char *) malloc(sizeof(char) * old_att_length);
-    history[0] = (char) 0;
-    (void) miattgetstr( cdfid, NC_GLOBAL, MIhistory, old_att_length+1,
-			history );
-    ncopts = NC_VERBOSE | NC_FATAL;
-    (void) miattputstr( cdfid, NC_GLOBAL, MIhistory, history );
-    free(history);
-    
-    (void) miclose( src_cdfid );
-  }
-
-
-  /* write data */
-  if(ncendef(cdfid) == MI_ERROR) return -1;
-  minc_icv = miicv_create();
-  (void) miicv_setint( minc_icv, MI_ICV_TYPE, type);
-  (void) miicv_setstr( minc_icv, MI_ICV_SIGN,
-		       (im->sign == SGN_SIGNED) ? MI_SIGNED : MI_UNSIGNED );
-  (void) miicv_setint( minc_icv, MI_ICV_DO_NORM, 1 );
-  (void) miicv_setint( minc_icv, MI_ICV_USER_NORM, 1 );
-  (void) miicv_attach( minc_icv, cdfid, img_var_id );
-
-  if( miicv_put(minc_icv, org, count, im->data) == MI_ERROR )
-    return -1;
-
-  (void) miattputstr( cdfid, img_var_id, MIcomplete, MI_TRUE);
-  (void) miclose( cdfid );
-  (void) miicv_free( minc_icv );
-
-  if(same_file) {
-    unlink(filename);
-    link(newname, filename);
-    unlink(newname);
-    free(newname);
-  }
-
-  return 0;
-}
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.h
deleted file mode 100644
index 53c33a5..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/mincio.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef MINCIO_H
-#define MINCIO_H
-
-#ifdef MINC_FILES
-
-#include <CGAL/ImageIO.h>
-#include <minc.h>
-
-
-/** read an image from a minc file
-    @param im image structure
-    @param name image file name
-    @param startx returned X coordinate of origin vertor
-    @param starty returned Y coordinate of origin vertor
-    @param startz returned Z coordinate of origin vertor
-    @param stepx returned X coordinate of step vertor
-    @param stepy returned Y coordinate of step vertor
-    @param stepz returned Z coordinate of step vertor
-    @param Xcosine 3 dimensional array containing X axis cosine directions
-    @param Ycosine 3 dimensional array containing Y axis cosine directions
-    @param Zcosine 3 dimensional array containing Z axis cosine directions
-    @return a negative value in case of failure */
-int readMincHeader(_image *im, const char* name,
-		   double *startx, double *starty, double *startz,
-		   double *stepx, double *stepy, double *stepz,
-		   double *Xcosine, double *Ycosine, double *Zcosine);
-
-/** write an image in a minc file
-    @param im image structure
-    @param name image file name
-    @param sourceName original minc file name
-    @param startx origin X coordinate
-    @param starty origin Y coordinate
-    @param startz origin Z coordinate
-    @param stepx returned X coordinate of step vertor
-    @param stepy returned Y coordinate of step vertor
-    @param stepz returned Z coordinate of step vertor
-    @param Xcosine 3 dimensional array containing X axis cosine directions
-    @param Ycosine 3 dimensional array containing Y axis cosine directions
-    @param Zcosine 3 dimensional array containing Z axis cosine directions
-    @param range 2 dimensional array containing min an max image intensity
-    @return a negative value in case of failure */
-int writeMincFile( const _image* im, const char *name, const char *sourceName,
-		   double startx, double starty, double startz,
-		   double stepx, double stepy, double stepz,
-		   const double *Xcosine, const double *Ycosine,
-		   const double *Zcosine, const double *range );
-
-
-#endif
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.cpp
deleted file mode 100644
index ad0c5a5..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.cpp
+++ /dev/null
@@ -1,630 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifdef _MSC_VER
-#pragma warning ( disable : 4068 4786 4081 )
-#endif
-
-#include <string.h>
-#include <sstream>
-
-#include "pnm.h"
-#include "fgetns.h"
-
-
-
-
-/** pnm - portable anymap file format */
-/** Magic header for pgm - portable graymap file format */
-#define PGM_ASCII_MAGIC "P2"
-#define PGM_MAGIC "P5"
-
-/** Magic header for ppm - portable pixmap file format */
-#define PPM_MAGIC "P6"
-
-
-
-#define _LGTH_STRING_ 1024
-
-
-
-int testPpmHeader(char *magic,const char *) {
-  if( !strncmp(magic, PPM_MAGIC, strlen(PPM_MAGIC))) 
-    return 0;
-  else 
-    return -1;
-}
-int testPgmHeader(char *magic,const char *) {
-  if (( !strncmp(magic, PGM_MAGIC, strlen(PGM_MAGIC))))
-    return 0;
-  else 
-    return -1;
-}
-int testPgmAsciiHeader(char *magic,const char *) {
-  if  ( !strncmp(magic, PGM_ASCII_MAGIC, strlen(PGM_ASCII_MAGIC)))
-    return 0;
-  else 
-    return -1;
-}
-
-PTRIMAGE_FORMAT createPgmFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testPgmHeader;
-  f->readImageHeader=&readPgmImage;
-  f->writeImage=&writePgmImage;
-  strcpy(f->fileExtension,".pgm,.pgm.gz");
-  strcpy(f->realName,"Pgm");
-  return f;
-}
-
-PTRIMAGE_FORMAT createPgmAscIIFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testPgmAsciiHeader;
-  f->readImageHeader=&readPgmAsciiImage;
-  f->writeImage=&writePgmImage;
-  strcpy(f->fileExtension,".pgm,.pgm.gz");
-  strcpy(f->realName,"Pgm-ASCII");
-  return f;
-}
-
-PTRIMAGE_FORMAT createPpmFormat() {
-  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
-
-  f->testImageFormat=&testPpmHeader;
-  f->readImageHeader=&readPpmImage;
-  f->writeImage=&writePpmImage;
-  strcpy(f->fileExtension,".ppm,.ppm.gz");
-  strcpy(f->realName,"Ppm");
-  return f;
-}
-
-
-/*
-       The  portable pixmap format is a lowest common denominator
-       color image file format.
-
-       The definition is as follows:
-
-       - A  "magic  number" for identifying the file type.  A pgm
-         file's magic number is the two characters "P6".
-
-       - Whitespace (blanks, TABs, CRs, LFs).
-
-       - A width, formatted as ASCII characters in decimal.
-
-       - Whitespace.
-
-       - A height, again in ASCII decimal.
-       - Whitespace.
-
-       - The maximum color value (Maxval), again in  ASCII  deci-
-         mal.  Must be less than 65536.
-
-       - Newline or other single whitespace character.
-
-       - A  raster  of  Width * Height pixels, proceeding through
-         the image in normal English reading order.   Each  pixel
-         is  a  triplet  of red, green, and blue samples, in that
-         order.  Each sample is represented  in  pure  binary  by
-         either 1 or 2 bytes.  If the Maxval is less than 256, it
-         is 1 byte.  Otherwise, it is 2 bytes.  The most signifi-
-         cant byte is first.
-
-       - In the raster, the sample values are proportional to the
-         intensity of the CIE Rec. 709 red, green,  and  blue  in
-         the pixel.  A value of Maxval for all three samples rep-
-         resents CIE D65 white and the most intense color in  the
-         color  universe  of  which  the image is part (the color
-         universe is all the colors in all images to  which  this
-         image might be compared).
-
-       - Characters  from  a  "#" to the next end-of-line, before
-         the maxval line, are comments and are ignored.
-
-*/
-int readPpmImage(const char *name,_image *im)
-{
-  char string[256];
-  int x=0, y=0;
-  int max=0;
-  
-  fgetns( string, 255, im );
-  if ( strncmp(string, PPM_MAGIC, strlen(PPM_MAGIC) ) ) {
-    fprintf( stderr, "readPpmImage: bad magic string in \'%s\'\n", name );
-    return( -1 );
-  }
-  
-  do {
-    fgetns( string, 255, im );
-
-    if ( string[0] != '#' ) {
-      if ( x == 0 && y == 0 ) {
-	sscanf( string, "%d %d", &x, &y );
-      }
-      else if ( max == 0 ) {
-	sscanf( string, "%d", &max );
-      }
-    }
-  } while ( max == 0 );
-
-
-  im->xdim = static_cast<std::size_t>(x);
-  im->ydim = static_cast<std::size_t>(y);
-  im->zdim = 1;
-  im->vdim = 3;
-
-  im->wordKind = WK_FIXED;
-  im->sign = SGN_UNSIGNED;
-
-  if ( max < 256 ) im->wdim = 1;
-  else if ( max < 65536 ) {
-    im->wdim = 2;
-    fprintf( stderr, "readPpmImage: Warning, data of \'%s\' may have to be swapped\n", name );
-  }
-  else {
-    fprintf( stderr, "readPpmImage: max value too large (%d) in \'%s\'\n", max, name );
-    return( -1 );
-  }
-  im->data = ImageIO_alloc( x*y*3 );		     
-  
-  ImageIO_read( im, im->data,  x*y*3 );
-  
-  return 1;
-}
-
-
-int writePpmImage( char *name,_image *im )
-{
-  std::ostringstream string;
-  int max;
-  unsigned int i;
-
-  if ( im->xdim <= 0 || im->ydim <= 0 || im->zdim != 1 || im->vdim != 3 ) {
-    fprintf( stderr, "writePpmImage: bad dimensions, unable to write '%s'\n", name );
-    return -1;
-  }
-  if ( im->wordKind != WK_FIXED || im->sign != SGN_UNSIGNED 
-       || ( im->wdim != 1 && im->wdim != 2 ) ) {
-    fprintf( stderr, "writePpmImage: bad type, unable to write '%s'\n", name );
-    return -1;  
-  }
-  
-  _openWriteImage( im, name );
-  
-  if(!im->fd) {
-    fprintf(stderr, "writeInrimage: error: unable to open file \'%s\'\n", name );
-    return ImageIO_OPENING;
-  }
-
-  string << PPM_MAGIC << "\n";
-  string << "# CREATOR: pnm.c $Revision$ $Date$\n";
-  string << im->xdim << " " << im->ydim << "\n";
-
-  max = 0;
-  switch ( im->wdim ) {
-  case 1 :
-    {
-      unsigned char *buf = (unsigned char *)im->data;
-      for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
-	if ( max < *buf ) max = *buf;
-    }
-    break;
-  case 2 :
-    {
-      unsigned short *buf = (unsigned short *)im->data;
-      for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
-	if ( max < *buf ) max = *buf;
-    }
-    break;
-  }
-
-  if ( max == 0 ) max = 1;
-  string << max << "\n";
-  ImageIO_write(im, string.str().data(), string.str().length());
-
-  if ( im->wdim == 1 || ( im->wdim == 2 && max > 255 ) ) {
-    ImageIO_write( im, im->data, im->xdim*im->ydim*3*im->wdim );
-  }
-  else {
-    /* 2 octets, but max <= 255
-       has to be converted on one octet
-    */
-    unsigned short *buf = (unsigned short *)im->data;
-    unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim*3 );
-    if ( tmp == NULL ) {
-      fprintf( stderr, "writePpmImage: unable to allocate auxiliary buffer\n" );
-      return -1; 
-    }
-    for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
-      tmp[i] = (unsigned char)*buf;
-    ImageIO_write( im, tmp, im->xdim*im->ydim*3 );
-    ImageIO_free( tmp );
-  }
-  ImageIO_close( im );
-  im->openMode = OM_CLOSE;
-  return 1;
-}
-
-
-
-/*
-       The portable graymap format is a lowest common denominator
-       grayscale file format.  The definition is as follows:
-
-       - A "magic number" for identifying the file type.   A  pgm
-         file's magic number is the two characters "P2".
-
-       - Whitespace (blanks, TABs, CRs, LFs).
-
-       - A width, formatted as ASCII characters in decimal.
-
-       - Whitespace.
-       - A height, again in ASCII decimal.
-
-       - Whitespace.
-
-       - The maximum gray value (Maxval), again in ASCII decimal.
-         Must be less than 65536.
-
-       - Newline or other single whitespace character.
-
-       - A raster of  Width  *  Height  gray  values,  proceeding
-         through the image in normal English reading order.  Each
-         gray value is a number from 0  through  Maxval,  with  0
-         being  black and Maxval being white.  Each gray value is
-         represented in pure binary by either 1 or 2  bytes.   If
-         the  Maxval  is less than 256, it is 1 byte.  Otherwise,
-         it is 2 bytes.  The most significant byte is first.
-
-       - Characters from a "#" to the  next  end-of-line,  before
-         the maxval line, are comments and are ignored.
-*/
-int readPgmAsciiImage(const char *name,_image *im)
-{
-  char string[256];
-  int x=0, y=0;
-  int max=0;
-
-  int n;
-  char *tmp;
-  int iv;
-
-  fgetns( string, 255, im );
-  if ( strncmp(string, PGM_ASCII_MAGIC, strlen(PGM_ASCII_MAGIC) ) ) {
-    fprintf( stderr, "readAsciiPgmImage: bad magic string in \'%s\'\n", name );
-    return( -1 );
-  }
-  
-  do {
-    fgetns( string, 255, im );
-
-    if ( string[0] != '#' ) {
-      if ( x == 0 && y == 0 ) {
-	sscanf( string, "%d %d", &x, &y );
-      }
-      else if ( max == 0 ) {
-	sscanf( string, "%d", &max );
-      }
-    }
-  } while ( max == 0 );
-
-  im->xdim = x;
-  im->ydim = y;
-  im->zdim = 1;
-  im->vdim = 1;
-
-  im->wordKind = WK_FIXED;
-  im->sign = SGN_UNSIGNED;
-
-  if ( max < 256 ) im->wdim = 1;
-  else if ( max < 65536 ) {
-    im->wdim = 2;
-  }
-  else {
-    fprintf( stderr, "readAsciiPgmImage: max value too large (%d) in \'%s\'\n", max, name );
-    return( -1 );
-  }
-  im->data = ImageIO_alloc( x*y );		     
-  
-  n=0;
-
-  while( fgetns( string, 255, im ) != 0 && n < x*y ) {
-    tmp = string;
-    while ( *tmp != '\n' && *tmp != '\0' && *tmp != EOF && n < x*y ) {
-      /* skip trailing whitespace
-       */
-      while ( *tmp == ' ' || *tmp == '\t' )
-	tmp++;
-      if ( *tmp == '\0' || *tmp == '\n' || *tmp == EOF )
-	continue;
-      
-      /* read a number
-       */
-      switch ( im->wordKind ) {
-      case WK_FIXED :
-	if ( sscanf( tmp, "%d", &iv ) != 1 ) {
-	  fprintf( stderr, "readAsciiPgmImage: error in reading ascii data\n" );
-	  ImageIO_free( im->data ); im->data = NULL;
-	  return 0;
-	}
-	break;
-      default :
-	ImageIO_free( im->data ); im->data = NULL;
-	return 0;
-      }
-	  
-      if ( im->wdim == 1 ) {
-	unsigned char *buf = (unsigned char *)im->data;
-	buf += n;
-	if ( iv < 0 )        *buf = (unsigned char)0;
-	else if ( iv > 255 ) *buf = (unsigned char)255;
-	else                 *buf = (unsigned char)iv;
-	n ++;
-      }
-      else if ( im->wdim == 2 ) {
-	unsigned short int *buf = (unsigned short int *)im->data;
-	buf += n;
-	if ( iv < 0 )          *buf = (unsigned short int)0;
-	else if ( iv > 65535 ) *buf = (unsigned short int)65535;
-	else                   *buf = (unsigned short int)iv;
-	n ++;
-      }
-      else {
-	fprintf( stderr, "readAsciiPgmImage: word im not handled\n" );
-	ImageIO_free( im->data ); im->data = NULL;
-	return 0;
-      }
-      
-      /* skip a number 
-       */
-      while ( (*tmp >= '0' && *tmp <= '9') || *tmp == '.' || *tmp == '-' )
-	tmp++;
-    }
-  }
-
-  
-  return 1;
-}
-
-
-
-
-/*
-       The portable graymap format is a lowest common denominator
-       grayscale file format.  The definition is as follows:
-
-       - A "magic number" for identifying the file type.   A  pgm
-         file's magic number is the two characters "P5".
-
-       - Whitespace (blanks, TABs, CRs, LFs).
-
-       - A width, formatted as ASCII characters in decimal.
-
-       - Whitespace.
-       - A height, again in ASCII decimal.
-
-       - Whitespace.
-
-       - The maximum gray value (Maxval), again in ASCII decimal.
-         Must be less than 65536.
-
-       - Newline or other single whitespace character.
-
-       - A raster of  Width  *  Height  gray  values,  proceeding
-         through the image in normal English reading order.  Each
-         gray value is a number from 0  through  Maxval,  with  0
-         being  black and Maxval being white.  Each gray value is
-         represented in pure binary by either 1 or 2  bytes.   If
-         the  Maxval  is less than 256, it is 1 byte.  Otherwise,
-         it is 2 bytes.  The most significant byte is first.
-
-       - Characters from a "#" to the  next  end-of-line,  before
-         the maxval line, are comments and are ignored.
-*/
-int readPgmImage(const char *name,_image *im)
-{
-  
-  char string[256];
-  int x=0, y=0;
-  int max=0;
-  
-  fgetns( string, 255, im );
-  if ( strncmp(string, PGM_MAGIC, strlen(PGM_MAGIC) ) ) {
-    fprintf( stderr, "readPgmImage: bad magic string in \'%s\'\n", name );
-    return( -1 );
-  }
-  
-  do {
-    fgetns( string, 255, im );
-
-    if ( string[0] != '#' ) {
-      if ( x == 0 && y == 0 ) {
-	sscanf( string, "%d %d", &x, &y );
-      }
-      else if ( max == 0 ) {
-	sscanf( string, "%d", &max );
-      }
-    }
-  } while ( max == 0 );
-
-
-  im->xdim = x;
-  im->ydim = y;
-  im->zdim = 1;
-  im->vdim = 1;
-
-  im->wordKind = WK_FIXED;
-  im->sign = SGN_UNSIGNED;
-
-  if ( max < 256 ) im->wdim = 1;
-  else if ( max < 65536 ) {
-    im->wdim = 2;
-    fprintf( stderr, "readPgmImage: Warning, data of \'%s\' may have to be swapped\n", name );
-  }
-  else {
-    fprintf( stderr, "readPgmImage: max value too large (%d) in \'%s\'\n", max, name );
-    return( -1 );
-  }
-  im->data = ImageIO_alloc( x*y );		     
-  
-  ImageIO_read( im, im->data,  x*y );
-  
-  return 1;
-}
-
-
-int writePgmImage(char *name,_image *im  )
-{
-  char string[256];
-  int max;
-  unsigned int i;
-
-  if ( im->xdim <= 0 || im->ydim <= 0 || im->zdim != 1 || im->vdim != 1 ) {
-    fprintf( stderr, "writePgmImage: bad dimensions, unable to write '%s'\n", name );
-    return -1;
-  }
-  if ( im->wordKind != WK_FIXED || im->sign != SGN_UNSIGNED 
-       || ( im->wdim != 1 && im->wdim != 2 ) ) {
-    fprintf( stderr, "writePgmImage: bad type, unable to write '%s'\n", name );
-    return -1;  
-  }
-
-  if ( 0 )
-    im->dataMode = DM_ASCII;
-  
-  _openWriteImage( im, name );
-  
-  if(!im->fd) {
-    fprintf(stderr, "writePgmImage: error: unable to open file \'%s\'\n", name );
-    return ImageIO_OPENING;
-  }
-  
-  if ( im->dataMode == DM_ASCII ) 
-    sprintf( string, "%s\n", PGM_ASCII_MAGIC );
-  else 
-    sprintf( string, "%s\n", PGM_MAGIC );
-  
-  ImageIO_write( im, string, strlen( string ) );
-  sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" );
-  ImageIO_write( im, string, strlen( string ) );
-  sprintf( string, "%zu %zu\n", im->xdim, im->ydim );
-  ImageIO_write( im, string, strlen( string ) );
-  max = 0;
-  switch ( im->wdim ) {
-  case 1 :
-    {
-      unsigned char *buf = (unsigned char *)im->data;
-      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
-	if ( max < *buf ) max = *buf;
-    }
-    break;
-  case 2 :
-    {
-      unsigned short *buf = (unsigned short *)im->data;
-      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
-	if ( max < *buf ) max = *buf;
-    }
-    break;
-  }
-  /* max == 0 causes problems for xv */
-  if ( max == 0 ) max = 1;
-  sprintf( string, "%d\n", max );
-  ImageIO_write( im, string, strlen( string ) );
-
-  if ( im->dataMode == DM_ASCII ) {
-    int i, j, n, size;
-    char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
-    size = im->xdim * im->ydim * im->zdim * im->vdim;
-    n = ( im->xdim < 16 ) ? im->xdim : 16;
-    i = 0;
-    switch( im->wdim ) {
-    default :
-      /* can not occur */
-      fprintf( stderr, "writePgmImage: bad type, unable to write '%s'\n", name );
-      ImageIO_close( im );
-      im->openMode = OM_CLOSE;
-      return -1;
-    case 1 :
-      {
-	unsigned char *theBuf = ( unsigned char * )im->data;
-	do {
-	  memset( str, 0, _LGTH_STRING_ );
-	  for ( j=0; j<n && i<size; j++, i++ ) {
-	    sprintf( str+strlen(str), "%d", theBuf[i] );
-	    if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	  }
-	  sprintf( str+strlen(str), "\n" );
-	  if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
-	    fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
-	    return( -3 );
-	  }
-	} while ( i < size );
-      }
-      break;
-    case 2 :
-      {
-	unsigned short int *theBuf = ( unsigned short int * )im->data;
-	do {
-	  memset( str, 0, _LGTH_STRING_ );
-	  for ( j=0; j<n && i<size; j++, i++ ) {
-	    sprintf( str+strlen(str), "%d", theBuf[i] );
-	    if ( j<n && i<size ) sprintf( str+strlen(str), " " );
-	  }
-	  sprintf( str+strlen(str), "\n" );
-	  if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
-	    fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
-	    return( -3 );
-	  }
-	} while ( i < size );
-      }
-      break;
-    }
-  }
-  else {
-    if ( im->wdim == 1 || ( im->wdim == 2 && max > 255 ) ) {
-      ImageIO_write( im, im->data, im->xdim*im->ydim*im->wdim );
-    }
-    else {
-      /* 2 octets, but max <= 255
-	 has to be converted on one octet
-      */
-      unsigned short *buf = (unsigned short *)im->data;
-      unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim );
-      if ( tmp == NULL ) {
-	fprintf( stderr, "writePgmImage: unable to allocate auxiliary buffer\n" );
-	return -1; 
-      }
-      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
-	tmp[i] = (unsigned char)*buf;
-      ImageIO_write( im, tmp, im->xdim*im->ydim );
-      ImageIO_free( tmp );
-    }
-  }
-
-  ImageIO_close( im );
-  im->openMode = OM_CLOSE;
-  return 1;
-}
-
-
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.h
deleted file mode 100644
index 55ee237..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/pnm.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-#ifndef PNM_H
-#define PNM_H
-
-#include <stdio.h>
-
-#include <CGAL/ImageIO.h>
-
-
-int readPpmImage(const char *name,_image *im);
-int writePpmImage(char *name, _image *im);
-int readPgmAsciiImage(const char *name,_image *im);
-int readPgmImage(const char *name,_image *im);
-int writePgmImage(char *name,  _image *im);
-int testPgmAsciiHeader(char *magic,const char *name);
-int testPgmHeader(char *magic,const char *name);
-int testPpmHeader(char *magic,const char *name);
-PTRIMAGE_FORMAT createPgmFormat();
-PTRIMAGE_FORMAT createPgmAscIIFormat();
-PTRIMAGE_FORMAT createPpmFormat();
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.cpp
deleted file mode 100644
index 64f5f5e..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.cpp
+++ /dev/null
@@ -1,1737 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * recbuffer.c - tools for recursive filtering of 3D and 2D image buffers
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * DESCRIPTION: 
- *
- * recursive filtering of a buffer (a [1,2,3]D array)
- * according that the filtering is separable
- *
- *
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * Copyright Gregoire Malandain, INRIA
- *
- * ADDITIONS, CHANGES
- *
- * * Jul 6 1999 (Gregoire Malandain)
- *   a bug in RecursiveFilterOnBuffer (*&%^@$^ cut and paste)
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-
-
-#include "convert.h"
-#include "recbuffer.h"
-
-static int _VERBOSE_ = 0;
-
-#define EXIT_ON_FAILURE 0
-#define EXIT_ON_SUCCESS 1
-
-
-
-
-
-
-
-
-
-
-/*
- *
- * Gradient modulus
- *
- *
- */
-
-int GradientModulus( void *bufferIn,
-		     bufferType typeIn,
-		     void *bufferOut,
-		     bufferType typeOut,
-		     int *bufferDims,
-		     int *borderLengths,
-		     float *filterCoefs,
-		     recursiveFilterType filterType )
-{
-  const char *proc = "GradientModulus";
-  float *auxBuf = NULL;
-  float *tmpBuf = NULL, *grdBuf = NULL;
-  int sizeAuxBuf = 0;
-  derivativeOrder derivatives[3];
-  int i;
-
-
-  sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
-  if ( typeOut != CGAL_FLOAT || bufferIn == bufferOut )
-    sizeAuxBuf *= 2;
-
-
-  /* allocation des buffers de calcul
-   */
-  auxBuf = (float*)malloc( sizeAuxBuf * sizeof(float) );
-  if ( auxBuf == NULL ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, "%s: unable to allocate auxiliary buffer\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  tmpBuf = auxBuf;
-  if ( typeOut != CGAL_FLOAT || bufferIn == bufferOut ) {
-    grdBuf  = tmpBuf;
-    grdBuf += bufferDims[0] * bufferDims[1] * bufferDims[2];
-  } else {
-    grdBuf  = (float*)bufferOut;
-  }
-  
-  /* cas 2D
-   */
-  if ( bufferDims[2] == 1 ) {
-
-    derivatives[0] = DERIVATIVE_1; 
-    derivatives[1] = DERIVATIVE_0;
-    derivatives[2] = NODERIVATIVE;
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)grdBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute X derivative (2D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-
-    derivatives[0] = DERIVATIVE_0; 
-    derivatives[1] = DERIVATIVE_1;
-    derivatives[2] = NODERIVATIVE;
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute Y derivative (2D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-    
-    sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
-    for ( i = 0; i < sizeAuxBuf; i++ )
-      grdBuf[i] = (float)sqrt( grdBuf[i]*grdBuf[i] + tmpBuf[i]*tmpBuf[i] );
-    
-  } else {
-    
-    derivatives[0] = NODERIVATIVE;
-    derivatives[1] = NODERIVATIVE;
-    derivatives[2] = DERIVATIVE_0;
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute Z smoothing (3D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-
-    derivatives[0] = DERIVATIVE_1; 
-    derivatives[1] = DERIVATIVE_0;
-    derivatives[2] = NODERIVATIVE;
-    if ( RecursiveFilterOnBuffer( (void*)tmpBuf, CGAL_FLOAT, (void*)grdBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute X derivative (3D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-
-    derivatives[0] = DERIVATIVE_0; 
-    derivatives[1] = DERIVATIVE_1;
-    derivatives[2] = NODERIVATIVE;
-    if ( RecursiveFilterOnBuffer( (void*)tmpBuf, CGAL_FLOAT, (void*)tmpBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute Y derivative (3D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-
-    sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
-    for ( i = 0; i < sizeAuxBuf; i++ )
-      grdBuf[i] = grdBuf[i]*grdBuf[i] + tmpBuf[i]*tmpBuf[i];
-    
-    derivatives[0] = DERIVATIVE_0;
-    derivatives[1] = DERIVATIVE_0;
-    derivatives[2] = DERIVATIVE_1;
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
-				  bufferDims, borderLengths, derivatives,
-				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
-      if ( _VERBOSE_ ) 
-	fprintf( stderr, "%s: unable to compute Z derivative (3D)\n", proc );
-      free( auxBuf );
-      return( EXIT_ON_FAILURE );
-    }
-    
-    for ( i = 0; i < sizeAuxBuf; i++ )
-      grdBuf[i] = (float)sqrt( grdBuf[i] + tmpBuf[i]*tmpBuf[i] );
-    
-  }
-
-  if ( grdBuf != bufferOut ) 
-    ConvertBuffer( grdBuf, CGAL_FLOAT, bufferOut, typeOut,
-		   bufferDims[0]*bufferDims[1]*bufferDims[2] );
-  free( auxBuf );
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
- *
- * Laplacian
- *
- *
- */
-int Laplacian_2D ( void *bufferIn,
-		   bufferType typeIn,
-		   void *bufferOut,
-		   bufferType typeOut,
-		   int *bufferDims,
-		   int *borderLengths,
-		   float *filterCoefs,
-		   recursiveFilterType filterType )
-{
-  const char *proc = "Laplacian_2D";
-  float *theXX = NULL;
-  float *theYY = NULL;
-
-  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
-  derivativeOrder YYderiv[3] = { SMOOTHING, DERIVATIVE_2, NODERIVATIVE };
-  int sliceDims[3];
-  int z, i, dimxXdimy;
-
-  void *sliceOut = NULL;
-
-
-
-  /* 
-   * We check the buffers' dimensions.
-   */
-  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  /*
-   * test of the coefficients
-   */
-  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
-       (filterCoefs[2] < 0.0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-  /*
-   *
-   */
-  dimxXdimy = bufferDims[0] * bufferDims[1];
-  sliceDims[0] = bufferDims[0];
-  sliceDims[1] = bufferDims[1];
-  sliceDims[2] = 1;
-  
-
-  if ( typeOut == CGAL_FLOAT ) {
-    theXX = (float*)malloc( dimxXdimy * sizeof( float ) );
-  } else {
-    theXX = (float*)malloc( 2 * dimxXdimy * sizeof( float ) );
-  }
-  
-  if ( theXX == NULL ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
-    }
-    return( EXIT_ON_FAILURE );
-  }
-
-  if ( typeOut != CGAL_FLOAT ) {
-    theYY  = theXX;
-    theYY += dimxXdimy;
-  }
-  
-  
-  
-  for ( z=0; z<bufferDims[2]; z++ ) {
-
-    if ( typeOut == CGAL_FLOAT ) {
-      theYY = ((float*)bufferOut) + z * dimxXdimy;
-    }
-    
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theXX, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  XXderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^2 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theYY, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  YYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-    
-    
-    for ( i=0; i<dimxXdimy; i++ ) theYY[i] += theXX[i];
-    if ( typeOut != CGAL_FLOAT ) {
-      switch ( typeOut ) {
-      case CGAL_UCHAR :
-	sliceOut = (((u8*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_SCHAR :
-	sliceOut = (((s8*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_SSHORT :
-	sliceOut = (((s16*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_DOUBLE :
-	sliceOut = (((r64*)bufferOut) + z * dimxXdimy);
-	break;
-      default :
-	if ( _VERBOSE_ > 0 )
-	  fprintf( stderr, " Error in %s: such output type not handled.\n", proc );
-	free( theXX );
-	return( EXIT_ON_FAILURE );
-      }
-      ConvertBuffer( theYY, CGAL_FLOAT, sliceOut, typeOut, dimxXdimy );
-    }
-  }
-
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-int Laplacian ( void *bufferIn,
-		   bufferType typeIn,
-		   void *bufferOut,
-		   bufferType typeOut,
-		   int *bufferDims,
-		   int *borderLengths,
-		   float *filterCoefs,
-		   recursiveFilterType filterType )
-{
-  const char *proc = "Laplacian";
-  float *theSL = NULL;
-  float *theZZ = NULL;
-  float *theZ0 = NULL;
-
-
-  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
-  derivativeOrder YYderiv[3] = { SMOOTHING, DERIVATIVE_2, NODERIVATIVE };
-  derivativeOrder Zsmooth[3] = { NODERIVATIVE, NODERIVATIVE, SMOOTHING };
-  derivativeOrder ZZderiv[3] = { SMOOTHING, SMOOTHING, DERIVATIVE_2 };
-  
-  int sliceDims[3];
-  int z, i, j, dimxXdimy;
-
-
-
-
-  /* 
-   * We check the buffers' dimensions.
-   */
-  if ( bufferDims[2] == 1 ) {
-    return( Laplacian_2D ( bufferIn, typeIn, bufferOut, typeOut,
-			   bufferDims, borderLengths, filterCoefs, filterType ) );
-  }
-
-  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  /*
-   * test of the coefficients
-   */
-  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
-       (filterCoefs[2] < 0.0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-  /*
-   *
-   */
-  dimxXdimy = bufferDims[0] * bufferDims[1];
-  sliceDims[0] = bufferDims[0];
-  sliceDims[1] = bufferDims[1];
-  sliceDims[2] = 1;
-
-  
-
-  if ( typeOut == CGAL_FLOAT ) {
-    theSL = (float*)malloc( (1+bufferDims[2]) * dimxXdimy * sizeof( float ) );
-  } else {
-    theSL = (float*)malloc( (1+2*bufferDims[2]) * dimxXdimy * sizeof( float ) );
-  }
-
-
-  
-  if ( theSL == NULL ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
-    }
-    return( EXIT_ON_FAILURE );
-  }
-
-
-
-  theZ0 = theSL;
-  theZ0 += dimxXdimy;
-
-
-  
-  if ( typeOut == CGAL_FLOAT ) {
-    theZZ = (float*) bufferOut;
-  } else {
-    theZZ  = theZ0;
-    theZZ += dimxXdimy * bufferDims[2];
-  }
-  
-  
-  
-  /*
-   *
-   * 3D filtering / filtering along Z
-   *
-   */
-
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ0, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				Zsmooth, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^0 derivative.\n" );
-    }
-    free( theSL );
-    return( EXIT_ON_FAILURE );
-  }
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZZ, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				ZZderiv, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^2 derivative.\n" );
-    }
-    free( theSL );
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-
-
-
-
-  for ( z=0; z<bufferDims[2]; z++ ) {
-
-    /*
-     *
-     * 2D filtering / filtering along X and Y
-     *
-     */
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theSL, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  XXderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^2 derivative.\n" );
-      }
-      free( theSL );
-      return( EXIT_ON_FAILURE );
-    }
-
-    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
-      theZZ[j] += theSL[i];
-    }
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theSL, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  YYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
-      }
-      free( theSL );
-      return( EXIT_ON_FAILURE );
-    }
-    
-    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
-      theZZ[j] += theSL[i];
-    }
-
-  }
-
-  if ( typeOut != CGAL_FLOAT ) {
-    ConvertBuffer( theZZ, CGAL_FLOAT, bufferOut, typeOut, bufferDims[2]*dimxXdimy );
-  }
-
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
- *
- * Gradient . Hessian * Gradient
- *
- *
- */
-int GradientHessianGradient_2D ( void *bufferIn,
-		   bufferType typeIn,
-		   void *bufferOut,
-		   bufferType typeOut,
-		   int *bufferDims,
-		   int *borderLengths,
-		   float *filterCoefs,
-		   recursiveFilterType filterType )
-{
-  const char *proc = "GradientHessianGradient_2D";
-  float *theXX = NULL;
-  float *theYY = NULL;
-  float *theXY = NULL;
-  float *theX  = NULL;
-  float *theY  = NULL;
-
-  derivativeOrder Xsmooth[3] = { SMOOTHING,          NODERIVATIVE,       NODERIVATIVE };
-  derivativeOrder Yderiv[3]  = { NODERIVATIVE,       DERIVATIVE_1_EDGES, NODERIVATIVE };
-  derivativeOrder YYderiv[3] = { NODERIVATIVE,       DERIVATIVE_2,       NODERIVATIVE };
-
-  derivativeOrder Ysmooth[3] = { NODERIVATIVE,       SMOOTHING,          NODERIVATIVE };
-  derivativeOrder Xderiv[3]  = { DERIVATIVE_1_EDGES, NODERIVATIVE,       NODERIVATIVE };
-  derivativeOrder XXderiv[3] = { DERIVATIVE_2,       NODERIVATIVE,       NODERIVATIVE };
-
-  derivativeOrder XYderiv[3] = { DERIVATIVE_1,       DERIVATIVE_1,       NODERIVATIVE };
-
-  int sliceDims[3];
-  int z, i, dimxXdimy;
-
-  void *sliceIn = NULL;
-  void *sliceOut = NULL;
-
-  double gx, gy, g;
-
-  /* 
-   * We check the buffers' dimensions.
-   */
-  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  /*
-   * test of the coefficients
-   */
-  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
-       (filterCoefs[2] < 0.0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-  /*
-   *
-   */
-  dimxXdimy = bufferDims[0] * bufferDims[1];
-  sliceDims[0] = bufferDims[0];
-  sliceDims[1] = bufferDims[1];
-  sliceDims[2] = 1;
-  
-
-  if ( typeOut == CGAL_FLOAT ) {
-    theXX = (float*)malloc( 4 * dimxXdimy * sizeof( float ) );
-  } else {
-    theXX = (float*)malloc( 5 * dimxXdimy * sizeof( float ) );
-  }
-  
-  if ( theXX == NULL ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
-    }
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-
-  theX = theY = theYY = theXX;
-  theYY +=   dimxXdimy;
-  theX  += 2*dimxXdimy;
-  theY  += 3*dimxXdimy;
-
-
-
-  if ( typeOut != CGAL_FLOAT ) {
-    theXY  =   theXX;
-    theXY += 4*dimxXdimy;
-  }
-  
-  
-  
-  for ( z=0; z<bufferDims[2]; z++ ) {
-
-    switch( typeIn ) {
-    default :
-      break;
-    case CGAL_UCHAR :
-    case CGAL_SCHAR :
-      sliceIn = (void*)( ((u8*)bufferIn) + z*dimxXdimy ); break;
-    case CGAL_USHORT :
-    case CGAL_SSHORT :
-      sliceIn = (void*)( ((u16*)bufferIn) + z*dimxXdimy ); break;
-    case CGAL_FLOAT :
-      sliceIn = (void*)( ((float*)bufferIn) + z*dimxXdimy ); break;
-    case CGAL_DOUBLE :
-      sliceIn = (void*)( ((double*)bufferIn) + z*dimxXdimy ); break;
-    }
-    if ( typeOut == CGAL_FLOAT ) {
-      theXY = ((float*)bufferOut) + z * dimxXdimy;
-    }
-    
-    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theX, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  Ysmooth, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^0 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theY, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  Xsmooth, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^0 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-
-
-    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theXY, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  XYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^1Y^1 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-
-
-    if ( RecursiveFilterOnBuffer( theX, CGAL_FLOAT, theXX, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  XXderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^2 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theY, CGAL_FLOAT, theYY, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  YYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-
-
-    if ( RecursiveFilterOnBuffer( theX, CGAL_FLOAT, theX, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  Xderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^1 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theY, CGAL_FLOAT, theY, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  Yderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^1 derivative.\n" );
-      }
-      free( theXX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-    
-    
-    for ( i=0; i<dimxXdimy; i++ ) {
-      gx = theX[i];
-      gy = theY[i];
-      g = (gx*gx + gy*gy);
-      theXY[i] = (float)(gx * ( theXX[i] * gx + theXY[i] * gy ) +
-			 gy * ( theXY[i] * gx + theYY[i] * gy ));
-      if ( g > 1e-10 ) theXY[i] = (float)(theXY[i] / g);
-    }
-
-    if ( typeOut != CGAL_FLOAT ) {
-      switch ( typeOut ) {
-      case CGAL_UCHAR :
-	sliceOut = (((u8*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_SCHAR :
-	sliceOut = (((s8*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_SSHORT :
-	sliceOut = (((s16*)bufferOut) + z * dimxXdimy);
-	break;
-      case CGAL_DOUBLE :
-	sliceOut = (((r64*)bufferOut) + z * dimxXdimy);
-	break;
-      default :
-	if ( _VERBOSE_ > 0 )
-	  fprintf( stderr, " Error in %s: such output type not handled.\n", proc );
-	free( theXX );
-	return( EXIT_ON_FAILURE );
-      }
-      ConvertBuffer( theXY, CGAL_FLOAT, sliceOut, typeOut, dimxXdimy );
-    }
-  }
-
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-int GradientHessianGradient ( void *bufferIn,
-		   bufferType typeIn,
-		   void *bufferOut,
-		   bufferType typeOut,
-		   int *bufferDims,
-		   int *borderLengths,
-		   float *filterCoefs,
-		   recursiveFilterType filterType )
-{
-  const char *proc = "GradientHessianGradient";
-
-
-
-  float *theZZ = NULL;
-  float *theZ  = NULL;
-  float *theZ1 = NULL;
-  float *theZ0 = NULL;
-
-  float *theXZ = NULL;
-  float *theYZ = NULL;
-
-  float *theXX = NULL;
-  float *theYY = NULL;
-  float *theXY = NULL;
-
-  float *theX  = NULL;
-  float *theY  = NULL;
-
-
-  derivativeOrder ZZderiv[3] = { SMOOTHING,    SMOOTHING,    DERIVATIVE_2 };
-  derivativeOrder Zderiv[3]  = { SMOOTHING,    SMOOTHING,    DERIVATIVE_1 };
-  derivativeOrder Z1deriv[3] = { NODERIVATIVE, NODERIVATIVE, DERIVATIVE_1 };
-  derivativeOrder Z0deriv[3] = { NODERIVATIVE, NODERIVATIVE, SMOOTHING };
-
-  derivativeOrder XZderiv[3] = { DERIVATIVE_1, SMOOTHING,    NODERIVATIVE };
-  derivativeOrder YZderiv[3] = { SMOOTHING,    DERIVATIVE_1, NODERIVATIVE };
-
-  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING,    NODERIVATIVE };
-  derivativeOrder YYderiv[3] = { SMOOTHING,    DERIVATIVE_2, NODERIVATIVE };
-  derivativeOrder XYderiv[3] = { DERIVATIVE_1, DERIVATIVE_1, NODERIVATIVE };
-
-  derivativeOrder Xderiv[3]  = { DERIVATIVE_1, SMOOTHING,    NODERIVATIVE };
-  derivativeOrder Yderiv[3]  = { SMOOTHING,    DERIVATIVE_1, NODERIVATIVE };
-
-  int sliceDims[3];
-  int z, i, j, dimxXdimy;
-
-  double gx, gy, gz, g;
-
-  /* 
-   * We check the buffers' dimensions.
-   */
-  if ( bufferDims[2] == 1 ) {
-    return( GradientHessianGradient_2D ( bufferIn, typeIn, bufferOut, typeOut,
-			   bufferDims, borderLengths, filterCoefs, filterType ) );
-  }
-
-  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  /*
-   * test of the coefficients
-   */
-  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
-       (filterCoefs[2] < 0.0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  
-
-  /*
-   *
-   */
-  dimxXdimy = bufferDims[0] * bufferDims[1];
-  sliceDims[0] = bufferDims[0];
-  sliceDims[1] = bufferDims[1];
-  sliceDims[2] = 1;
-  
-
-  if ( typeOut == CGAL_FLOAT ) {
-    theX  = (float*)malloc( (7+3*bufferDims[2]) * dimxXdimy * sizeof( float ) );
-  } else {
-    theX = (float*)malloc( (7+4*bufferDims[2]) * dimxXdimy * sizeof( float ) );
-  }
-
-  
-  if ( theX == NULL ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
-    }
-    return( EXIT_ON_FAILURE );
-  }
-  
-  /*
-   * BUFFERS
-   *
-   * slices  : theX  theY  theXY theYY theXX theYZ theXZ
-   *
-   * volumes : theZ0 theZ1 theZ  theZZ
-   *
-   */
-
-  theY  = theXX = theXY = theYY = theYZ = theXZ = theX;
-  theZ0 = theZ1 = theZ  = theX;
-
-  theY  +=   dimxXdimy;
-  theXY += 2*dimxXdimy;
-  theYY += 3*dimxXdimy;
-  theXX += 4*dimxXdimy;
-  theYZ += 5*dimxXdimy;
-  theXZ += 6*dimxXdimy;
- 
-  theZ0 += 7*dimxXdimy;
-  theZ1 += 7*dimxXdimy +   bufferDims[2]*dimxXdimy;
-  theZ  += 7*dimxXdimy + 2*bufferDims[2]*dimxXdimy;
-
-  if ( typeOut == CGAL_FLOAT ) {
-    theZZ  = (float*)bufferOut;
-  } else {
-    theZZ  = theX;
-    theZZ += 7*dimxXdimy + 3*bufferDims[2]*dimxXdimy;
-  }
-  
-  
-  
-  /*
-   *
-   * 3D filtering / filtering along Z
-   *
-   */
-
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ0, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				Z0deriv, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^0 derivative.\n" );
-    }
-    free( theX );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ1, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				Z1deriv, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^1 derivative.\n" );
-    }
-    free( theX );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				Zderiv, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^1 derivative (edge).\n" );
-    }
-    free( theX );
-    return( EXIT_ON_FAILURE );
-  }
-  
-  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZZ, CGAL_FLOAT, 
-				bufferDims, borderLengths,
-				ZZderiv, filterCoefs, filterType ) == 0 ) {
-    if ( _VERBOSE_ > 0 ) {
-      fprintf( stderr, " Fatal error in %s:", proc );
-      fprintf( stderr, " unable to compute Z^2 derivative.\n" );
-    }
-    free( theX );
-    return( EXIT_ON_FAILURE );
-  }
-
-
-  /*
-   * theZ0 : smoothed         along Z
-   * theZ1 : first derivative along Z
-   * theZ  : first derivative along Z, smoothed along X and Y
-   * theZZ : second derivative along Z, smoothed along X and Y
-   */
-
-
-
-  for ( z=0; z<bufferDims[2]; z++ ) {
-    fprintf( stderr, "%s: processing slice %3d/%d\r",
-	     proc, z, bufferDims[2] );
-    /*
-     *
-     * 2D filtering / filtering along X and Y
-     *
-     */
-    
-    if ( RecursiveFilterOnBuffer( theZ1+z*dimxXdimy, CGAL_FLOAT, theXZ, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  XZderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^1Z^1 derivative.\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theZ1+z*dimxXdimy, CGAL_FLOAT, theYZ, CGAL_FLOAT, 
-				  sliceDims, borderLengths,
-				  YZderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^1Z^1 derivative.\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theXX, CGAL_FLOAT,
-				  sliceDims, borderLengths,
-				  XXderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^2 derivative.\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theYY, CGAL_FLOAT,
-				  sliceDims, borderLengths,
-				  YYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theXY, CGAL_FLOAT,
-				  sliceDims, borderLengths,
-				  XYderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^1Y^1 derivative.\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theX, CGAL_FLOAT,
-				  sliceDims, borderLengths,
-				  Xderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute X^1 derivative (edge).\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theY, CGAL_FLOAT,
-				  sliceDims, borderLengths,
-				  Yderiv, filterCoefs, filterType ) == 0 ) {
-      if ( _VERBOSE_ > 0 ) {
-	fprintf( stderr, " Fatal error in %s:", proc );
-	fprintf( stderr, " unable to compute Y^1 derivative (edge).\n" );
-      }
-      free( theX );
-      return( EXIT_ON_FAILURE );
-    }
-
-    
-    
-    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
-      gx = theX[i];
-      gy = theY[i];
-      gz = theZ[j];
-      g = gx*gx + gy*gy + gz*gz;
-      theZZ[j] = (float)(gx * ( theXX[i] * gx + theXY[i] * gy  + theXZ[i] * gz ) +
-			 gy * ( theXY[i] * gx + theYY[i] * gy  + theYZ[i] * gz ) +
-			 gz * ( theXZ[i] * gx + theYZ[i] * gy  + theZZ[j] * gz ));
-      if ( g > 1e-10 ) theZZ[j] = (float)(theZZ[j] / g);
-
-    }
-
-  }
-
-  if ( typeOut != CGAL_FLOAT ) {
-    ConvertBuffer( theZZ, CGAL_FLOAT, bufferOut, typeOut, bufferDims[2]*dimxXdimy );
-  }
-  
-  free( theX );
-
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
- *
- * 
- *
- *
- */
-
-int RecursiveFilterOnBuffer( void *bufferIn,
-			     bufferType typeIn,
-			     void *bufferOut,
-			     bufferType typeOut,
-			     int *bufferDims,
-			     int *borderLengths,
-			     derivativeOrder *derivatives,
-			     float *filterCoefs,
-			     recursiveFilterType filterType )
-{
-  const char *proc = "RecursiveFilterOnBuffer";
-  register int dimx, dimxXdimy;
-  int dimy, dimz;
-  register int x, y, z;
-  /* 
-   *obviously, we need to perform the computation 
-   * with float or double values. For this reason,
-   * we allocate an auxiliary buffer if the output buffer
-   * is not of type float or double.
-   */
-  void *bufferToBeProcessed = (void*)NULL;
-  bufferType typeToBeProcessed = TYPE_UNKNOWN;
-  void *bufferResult = (void*)NULL;
-  bufferType typeResult = TYPE_UNKNOWN;
-  /*
-   * lines' lengths
-   */
-  int lengthX = 0;
-  int lengthY = 0;
-  int lengthZ = 0;
-  int maxLengthline = 0;
-  int borderXlength = 0;
-  int borderYlength = 0;
-  int borderZlength = 0;
-  /*
-   * 1D arrays for computations.
-   */
-  double *theLine = (double*)NULL;
-  double *resLine = (double*)NULL;
-  double *tmpLine = (double*)NULL;
-  /*
-   * pointers for computations;
-   */
-  register r32 *r32firstPoint = (r32*)NULL;
-  register r64 *r64firstPoint = (r64*)NULL;
-  register r32 *r32_pt = (r32*)NULL;
-  register r64 *r64_pt = (r64*)NULL;
-  register double *dbl_pt1 = (double*)NULL;
-  register double *dbl_pt2 = (double*)NULL;
-  register double dbl_first = 0.0;
-  register double dbl_last = 0.0;
-  int offsetLastPoint = 0;
-  int offsetNextFirstPoint = 0;
-  register r32 *r32firstPointResult = (r32*)NULL;
-  register r64 *r64firstPointResult = (r64*)NULL;
-  double *theLinePlusBorder = (double*)NULL;
-  double *resLinePlusBorder = (double*)NULL;
-
-  RFcoefficientType *RFC = NULL;
-
-  /* 
-   * We check the buffers' dimensions.
-   */
-  dimx = bufferDims[0];   dimy = bufferDims[1];   dimz = bufferDims[2];
-  dimxXdimy = dimx * dimy;
-  if ( (dimx <= 0) || (dimy <= 0) || (dimz <= 0) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  /*
-   * We check the pointers.
-   */
-  if ( (bufferIn == (void*)NULL) || (bufferOut == (void*)NULL) ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: NULL pointer on buffer.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-
-  /* 
-   * May we use the buffer bufferOut as the bufferResult?
-   * If its type is CGAL_FLOAT or CGAL_DOUBLE, then yes.
-   * If not, we have to allocate an auxiliary buffer.
-   */
-  if ( (typeOut == CGAL_FLOAT) || (typeOut == CGAL_DOUBLE) ) {
-    bufferResult = bufferOut;
-    typeResult = typeOut;
-  } else {
-    bufferResult = (void*)malloc( (dimx*dimy*dimz) * sizeof(r32) );
-    if ( bufferResult == (void*)NULL ) {
-      if ( _VERBOSE_ > 0 )
-	fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary buffer.\n", proc );
-      return( EXIT_ON_FAILURE );
-    }
-    typeResult = CGAL_FLOAT;
-  }
-  
-  /* 
-   * May we consider the buffer bufferIn as the bufferToBeProcessed?
-   * If its type is CGAL_FLOAT or CGAL_DOUBLE, then yes.
-   * If not, we convert it into the buffer bufferResult, and this
-   * last buffer is the bufferToBeProcessed.
-   */
-  if ( (typeIn == CGAL_FLOAT) || (typeIn == CGAL_DOUBLE) ) {
-    bufferToBeProcessed = bufferIn;
-    typeToBeProcessed = typeIn;
-  } else {
-    ConvertBuffer( bufferIn, typeIn, bufferResult, typeResult, (dimx*dimy*dimz) );
-    bufferToBeProcessed = bufferResult;
-    typeToBeProcessed = typeResult;
-  }
-
-  /*
-   * Estimation of the lines' length along each direction.
-   */
-  if ( borderLengths != NULL ) {
-    borderXlength = borderLengths[0];
-    borderYlength = borderLengths[1];
-    borderZlength = borderLengths[2];
-    if ( borderXlength < 0 ) borderXlength = 0;
-    if ( borderYlength < 0 ) borderYlength = 0;
-    if ( borderZlength < 0 ) borderZlength = 0;
-  }
-
-  /*
-   * Tue Jul  6 19:15:15 MET DST 1999 (gregoire Malandain)
-   * changes 3 x dimx -> dimx, dimy, dimz
-   */
-  lengthX = dimx + 2 * borderXlength;
-  lengthY = dimy + 2 * borderYlength;
-  lengthZ = dimz + 2 * borderZlength;
-  maxLengthline = lengthX;
-  if ( maxLengthline < lengthY ) maxLengthline = lengthY;
-  if ( maxLengthline < lengthZ ) maxLengthline = lengthZ;
-  if ( maxLengthline <= 0 ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Error in %s: unable to deal with dimensions = 0.\n", proc );
-    if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-      free( bufferResult );
-    return( EXIT_ON_FAILURE );
-  }
-  /*
-   * Allocations of work arrays. 
-   * We will use them to process each line.
-   */
-  theLine = (double*)malloc( 3 * maxLengthline * sizeof(double) );
-  if ( theLine == (double*)NULL ) {
-    if ( _VERBOSE_ > 0 )
-      fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary work arrays.\n", proc );
-    if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-      free( bufferResult );
-    return( EXIT_ON_FAILURE );
-  }
-  resLine = theLine + maxLengthline;
-  tmpLine = resLine + maxLengthline;
-
-  /*
-   * From now,
-   * typeToBeProcessed is either CGAL_FLOAT or CGAL_DOUBLE
-   * so is typeResult.
-   */
-
-
-  /*
-   * Processing along X.
-   */
-  if ( dimx > 4 )
-  if (derivatives[0] != NODERIVATIVE)
-  if (filterCoefs[0] > 0.0) {
-
-    if ( _VERBOSE_ != 0 )
-      fprintf( stderr, " %s: processing along X.\n", proc );
-
-    RFC = InitRecursiveCoefficients( (double)filterCoefs[0], filterType, derivatives[0] );
-
-    if ( RFC == NULL ) {
-      if ( _VERBOSE_ != 0 )
-	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
-      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	free( bufferResult );
-      return( EXIT_ON_FAILURE );
-    }
-    
-    r64firstPoint = (r64*)bufferToBeProcessed;
-    r32firstPoint = (r32*)bufferToBeProcessed;
-
-    r64firstPointResult = (r64*)bufferResult;
-    r32firstPointResult = (r32*)bufferResult;
-
-    offsetLastPoint = borderXlength + dimx - 1;
-
-    theLinePlusBorder = theLine + borderXlength;
-    resLinePlusBorder = resLine + borderXlength;
-
-    /*
-     * There are dimz*dimy X lines to be processed.
-     */
-    for ( z=0; z<dimz; z++ )
-    for ( y=0; y<dimy; y++ ) {
-      /*
-       * Acquiring a X line.
-       */ 
-      dbl_pt1 = theLinePlusBorder;
-      switch ( typeToBeProcessed ) {
-      case CGAL_DOUBLE :
-	(void)memcpy( (void*)dbl_pt1, (void*)r64firstPoint, dimx * sizeof(r64) );
-	r64firstPoint += dimx;
-	break;
-      case CGAL_FLOAT :
-      default :
-	for ( x=0; x<dimx; x++, dbl_pt1++, r32firstPoint++ ) *dbl_pt1 = *r32firstPoint;
-      }
-      /*
-       * Adding points at both ends of the line.
-       */
-      if ( borderXlength > 0 ) {
-	dbl_pt1 = theLine + borderXlength;   dbl_first = *dbl_pt1;
-	dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
-	for ( x=0; x<borderXlength; x++ ) {
-	  *--dbl_pt1 = dbl_first;
-	  *++dbl_pt2 = dbl_last;
-	}
-      }
-      /*
-       * Processing the line.
-       */
-      if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthX ) == 0 ) {
-	if ( _VERBOSE_ != 0 ) 
-	  fprintf(stderr," Error in %s: unable to process X line (y=%d,z=%d).\n", proc, y, z);
-	if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	  free( bufferResult );
-	free( (void*)theLine );
-	return( EXIT_ON_FAILURE );
-      }
-      /*
-       * Copy the result into the buffer bufferResult.
-       */
-      dbl_pt1 = resLinePlusBorder;
-      switch ( typeResult ) {
-      case CGAL_DOUBLE :
-	(void)memcpy( (void*)r64firstPointResult, (void*)dbl_pt1, dimx * sizeof(r64) );
-	r64firstPointResult += dimx;
-	break;
-      case CGAL_FLOAT :
-      default :
-	for ( x=0; x<dimx; x++, dbl_pt1++, r32firstPointResult++ )
-	  *r32firstPointResult = (r32)(*dbl_pt1);
-      }
-    }
-    
-    /*
-     * The next buffer to be processed is the buffer
-     * bufferResult.
-     */
-    bufferToBeProcessed = bufferResult;
-    typeToBeProcessed = typeResult;
-    
-    free( RFC );
-    RFC = NULL;
-
-  } /* end of Processing along X. */
-  
-  /*
-   * Processing along Y.
-   */
-  if ( dimy > 4 )
-  if (derivatives[1] != NODERIVATIVE)
-  if (filterCoefs[1] > 0.0) {
-
-    if ( _VERBOSE_ != 0 )
-      fprintf( stderr, " %s: processing along Y.\n", proc );
-
-    RFC = InitRecursiveCoefficients( (double)filterCoefs[1], filterType, derivatives[1] );
-
-    if ( RFC == NULL ) {
-      if ( _VERBOSE_ != 0 )
-	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
-      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	free( bufferResult );
-      return( EXIT_ON_FAILURE );
-    }
-
-    r64firstPoint = (r64*)bufferToBeProcessed;
-    r32firstPoint = (r32*)bufferToBeProcessed;
-
-    r64firstPointResult = (r64*)bufferResult;
-    r32firstPointResult = (r32*)bufferResult;
-
-    offsetLastPoint = borderYlength + dimy - 1;
-    offsetNextFirstPoint = dimx * dimy - dimx;
-
-    theLinePlusBorder = theLine + borderYlength;
-    resLinePlusBorder = resLine + borderYlength;
-
-    /*
-     * There are dimz*dimx Y lines to be processed.
-     */
-    for ( z=0; z<dimz; z++ ) {
-      for ( x=0; x<dimx; x++ ) {
-      /*
-       * Acquiring a Y line.
-       */ 
-	dbl_pt1 = theLinePlusBorder;
-	switch ( typeToBeProcessed ) {
-	case CGAL_DOUBLE :
-	  r64_pt = r64firstPoint;
-	  for ( y=0; y<dimy; y++, dbl_pt1++, r64_pt += dimx ) *dbl_pt1 = *r64_pt;
-	  /*
-	   * Going to the first point of the next Y line
-	   */
-	  r64firstPoint ++;
-	  break;
-	case CGAL_FLOAT :
-	default :
-	  r32_pt = r32firstPoint;
-	  for ( y=0; y<dimy; y++, dbl_pt1++, r32_pt += dimx ) *dbl_pt1 = *r32_pt;
-	  r32firstPoint ++;
-	}
-	/*
-	 * Adding points at both ends of the line.
-	 */
-	if ( borderYlength > 0 ) {
-	  dbl_pt1 = theLine + borderYlength;   dbl_first = *dbl_pt1;
-	  dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
-	  for ( y=0; y<borderYlength; y++ ) {
-	    *--dbl_pt1 = dbl_first;
-	    *++dbl_pt2 = dbl_last;
-	  }
-	}
-	/*
-	 * Processing the line.
-	 */
-	if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthY ) == 0 ) {
-	  if ( _VERBOSE_ != 0 ) 
-	    fprintf(stderr," Error in %s: unable to process Y line (x=%d,z=%d).\n", proc, x, z);
-	  if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	    free( bufferResult );
-	  free( (void*)theLine );
-	  return( EXIT_ON_FAILURE );
-	}
-	/*
-	 * Copy the result into the buffer bufferResult.
-	 */
-	dbl_pt1 = resLinePlusBorder;
-	switch ( typeResult ) {
-	case CGAL_DOUBLE :
-	  r64_pt = r64firstPointResult;
-	  for ( y=0; y<dimy; y++, dbl_pt1++, r64_pt += dimx ) *r64_pt = *dbl_pt1;
-	  r64firstPointResult ++;
-	  break;
-	case CGAL_FLOAT :
-	default :
-	  r32_pt = r32firstPointResult;
-	  for ( y=0; y<dimy; y++, dbl_pt1++, r32_pt += dimx ) 
-	    *r32_pt = (float)*dbl_pt1;
-	  r32firstPointResult ++;
-	}
-      }
-      /*
-       * Going to the first point of the next Y line
-       * which is the first Y line of the next slice.
-       *
-       * The pointer r[32,64]firstPoint[Result] has
-       * already been increased by dimx. To reach
-       * the first point of the next slice, we
-       * have to increase it by (dimx*dimy)-dimx.
-       */
-      switch ( typeToBeProcessed ) {
-      case CGAL_DOUBLE :
-	r64firstPoint += offsetNextFirstPoint;
-	break;
-      case CGAL_FLOAT :
-      default :
-	r32firstPoint += offsetNextFirstPoint;
-      }
-      switch ( typeResult ) {
-      case CGAL_DOUBLE :
-	r64firstPointResult += offsetNextFirstPoint;
-	break;
-      case CGAL_FLOAT :
-      default :
-	r32firstPointResult += offsetNextFirstPoint;
-      }
-    }
-    
-    /*
-     * The next buffer to be processed is the buffer
-     * bufferResult.
-     */
-    bufferToBeProcessed = bufferResult;
-    typeToBeProcessed = typeResult;
-  
-    free( RFC );
-    RFC = NULL;
-
-  } /* end of Processing along Y. */
-  
-
-  /*
-   * Processing along Z.
-   */
-  if ( dimz > 4 )
-  if (derivatives[2] != NODERIVATIVE)
-  if (filterCoefs[2] > 0.0) {
-
-    if ( _VERBOSE_ != 0 )
-      fprintf( stderr, " %s: processing along Z.\n", proc );
-    
-    RFC = InitRecursiveCoefficients( (double)filterCoefs[2], filterType, derivatives[2] );
-    
-    if ( RFC == NULL ) {
-      if ( _VERBOSE_ != 0 )
-	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
-      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	free( bufferResult );
-      return( EXIT_ON_FAILURE );
-    }
-
-    r64firstPoint = (r64*)bufferToBeProcessed;
-    r32firstPoint = (r32*)bufferToBeProcessed;
-
-    offsetLastPoint = borderZlength + dimz - 1;
-
-    r64firstPointResult = (r64*)bufferResult;
-    r32firstPointResult = (r32*)bufferResult;
-
-    offsetLastPoint = borderZlength + dimz - 1;
-
-    theLinePlusBorder = theLine + borderYlength;
-    resLinePlusBorder = resLine + borderYlength;
-
-    /*
-     * There are dimy*dimx Z lines to be processed.
-     */
-    for ( y=0; y<dimy; y++ )
-    for ( x=0; x<dimx; x++ ) {
-      /*
-       * Acquiring a Z line.
-       */ 
-      dbl_pt1 = theLinePlusBorder;
-      switch ( typeToBeProcessed ) {
-      case CGAL_DOUBLE :
-	r64_pt = r64firstPoint;
-	for ( z=0; z<dimz; z++, dbl_pt1++, r64_pt += dimxXdimy ) *dbl_pt1 = *r64_pt;
-	/*
-	 * Going to the first point of the next Z line
-	 */
-	r64firstPoint ++;
-	break;
-      case CGAL_FLOAT :
-      default :
-	r32_pt = r32firstPoint;
-	for ( z=0; z<dimz; z++, dbl_pt1++, r32_pt += dimxXdimy ) *dbl_pt1 = *r32_pt;
-	r32firstPoint ++;
-      }
-      /*
-       * Adding points at both ends of the line.
-       */
-      if ( borderZlength > 0 ) {
-	dbl_pt1 = theLine + borderZlength;   dbl_first = *dbl_pt1;
-	dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
-	for ( z=0; z<borderZlength; z++ ) {
-	  *--dbl_pt1 = dbl_first;
-	  *++dbl_pt2 = dbl_last;
-	}
-      }
-      /*
-       * Processing the line.
-       */
-      if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthZ ) == 0 ) {
-	if ( _VERBOSE_ != 0 ) 
-	  fprintf(stderr," Error in %s: unable to process Z line (x=%d,y=%d).\n", proc, x, y);
-	if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-	  free( bufferResult );
-	free( (void*)theLine );
-	return( EXIT_ON_FAILURE );
-      }
-      
-      /*
-       * Copy the result into the buffer bufferResult.
-       */
-      dbl_pt1 = resLinePlusBorder;
-      switch ( typeResult ) {
-      case CGAL_DOUBLE :
-	r64_pt = r64firstPointResult;
-	for ( z=0; z<dimz; z++, dbl_pt1++, r64_pt += dimxXdimy ) 
-	  *r64_pt = *dbl_pt1;
-	r64firstPointResult ++;
-	break;
-      case CGAL_FLOAT :
-      default :
-	r32_pt = r32firstPointResult;
-	for ( z=0; z<dimz; z++, dbl_pt1++, r32_pt += dimxXdimy ) 
-	  *r32_pt = (float)*dbl_pt1;
-	r32firstPointResult ++;
-      }
-    }
-
-    free( RFC );
-    RFC = NULL;
-
-  } /* end of Processing along Z. */
-  
-
-
-
-  /*
-   * From bufferResult to bufferOut
-   */
-  ConvertBuffer( bufferResult, typeResult, bufferOut, typeOut, (dimx*dimy*dimz) );
-
-  /*
-   * Releasing the buffers.
-   */
-  if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
-    free( bufferResult );
-  free( (void*)theLine );
-  
-  return( EXIT_ON_SUCCESS );
-}
-
-
-
-
-
-
-void Recbuffer_verbose ( )
-{
-  _VERBOSE_ = 1;
-  Recline_verbose ( );
-}
-
-
-
-
-
-void Recbuffer_noverbose ( )
-{
-  _VERBOSE_ = 0;
-  Recline_noverbose ( );
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.h
deleted file mode 100644
index c394977..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recbuffer.h
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * recbuffer.h - tools for recursive filtering of 3D and 2D image buffers
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * DESCRIPTION: 
- *
- *
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * http://www.inria.fr/epidaure/personnel/malandain/
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * Copyright Gregoire Malandain, INRIA
- *
- * ADDITIONS, CHANGES
- *
- *
- */
-
-
-#ifndef _recbuffer_h_
-#define _recbuffer_h_
-
-
-#include "typedefs.h"
-#include "recline.h"
-
-
-
-
-
-extern int GradientModulus( void *bufferIn, bufferType typeIn,
-			    void *bufferOut, bufferType typeOut,
-			    int *bufferDims, int *borderLengths,
-			    float *filterCoefs, recursiveFilterType filterType );
-extern int Laplacian_2D( void *bufferIn, bufferType typeIn,
-			 void *bufferOut, bufferType typeOut,
-			 int *bufferDims, int *borderLengths,
-			 float *filterCoefs, recursiveFilterType filterType );
-extern int Laplacian( void *bufferIn, bufferType typeIn,
-		      void *bufferOut, bufferType typeOut,
-		      int *bufferDims, int *borderLengths,
-		      float *filterCoefs, recursiveFilterType filterType );
-
-extern int GradientHessianGradient_2D( void *bufferIn, bufferType typeIn,
-			 void *bufferOut, bufferType typeOut,
-			 int *bufferDims, int *borderLengths,
-			 float *filterCoefs, recursiveFilterType filterType );
-extern int GradientHessianGradient( void *bufferIn, bufferType typeIn,
-		      void *bufferOut, bufferType typeOut,
-		      int *bufferDims, int *borderLengths,
-		      float *filterCoefs, recursiveFilterType filterType );
-
-
-
-
-
-/* Recursive filtering on 3D buffers.
- *
- * DESCRIPTION:
- * Performs recursive filtering on 3D buffers.
- * Each direction (X, Y or Z) is performed 
- * independently (separability).
- *
- * A direction is filtered if there are enough
- * points along this direction (at least 5),
- * if the coefficient along this direction is 
- * positive, and if the derivative's order along
- * this direction is not NODERIVATIVE (see
- * derivativeOrder).
- *
- * Once a line along a direction is extracted for
- * filtering, one may want to add points at both 
- * ends of the line to avoid cut-off effects. The
- * value of each endpoint is repeated n times.
- * Thus the length of the line is increased by 
- * 2*n.
- *
- * PARAMETERS:
- *
- * - bufferDims[0] is the dimension along X,
- *
- *   bufferDims[1] is the dimension along Y,
- *
- *   bufferDims[2] is the dimension along Y.
- *
- * - borderLengths[0] is the number of points to be
- *   added at both ends of each X line (if
- *   positive). The value of each endpoint is 
- *   repeated borderLengths[0] times to produce
- *   a line of length 
- *   bufferDims[0] + 2 * borderLengths[0].
- *
- *   borderLengths[1] is the number of points to be
- *   added at both ends of each Y line.
- *
- *   borderLengths[2] is the number of points to be
- *   added at both ends of each Z line.
- *
- * - derivatives[0] is the order of the derivative 
- *   to be computed along direction X. 
- *
- *   derivatives[1] is the order of the derivative 
- *   to be computed along direction Y. 
- *
- *   derivatives[2] is the order of the derivative 
- *   to be computed along direction Z. 
- *
- * - filterCoefs[0] is the coefficient of the filter
- *   to be applied along direction X. 
- *
- *   filterCoefs[1] is the coefficient of the filter
- *   to be applied along direction Y. 
- *
- *   filterCoefs[2] is the coefficient of the filter
- *   to be applied along direction Z. 
- *
- * - filterType is the type of recursive filter to
- *   be applied to the 3D buffer.
- *
- * RETURN:
- *
- * - 0 in case of error
- *
- * - 1 if successful
- *
- * SEE ALSO:
- *
- * - bufferType.
- *
- * - derivativeOrder.
- *
- * - recursiveFilterType.
- *
- * - InitRecursiveCoefficients
- */
-extern int RecursiveFilterOnBuffer( void *bufferIn, /* input buffer */
-				    bufferType typeIn, /* type of the input buffer */
-				    void *bufferOut, /* output buffer */
-				    bufferType typeOut, /* type of the output buffer */
-				    int *bufferDims, /* buffers' dimensions */
-				    int *borderLengths, /* number of points to be added at both ends */
-				    derivativeOrder *derivatives, /* order of derivatives to be computed */
-				    float *filterCoefs, /* coefficients of the filters to be applied */
-				    recursiveFilterType filterType /* type of the recursive filter to be applied */
-				    );
-
-
-
-/* Turn on verbose mode.
- *
- * DESCRIPTION:
- * Some information will be written on stderr when processing.
- * It will turn on the verbose mode of recline too, by 
- * calling Recline_verbose();
- */
-extern void Recbuffer_verbose ( );
-
-
-
-/* Turn off verbose mode.
- *
- * DESCRIPTION:
- * Nothing will be written on stderr when processing.
- * Exactly the contrary of Recbuffer_verbose ().
- * It will turn off the verbose mode of recline too.
- */
-extern void Recbuffer_noverbose ( );
-
-
-
-#endif /* _recbuffer_h_ */
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.cpp
deleted file mode 100644
index fd7893f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.cpp
+++ /dev/null
@@ -1,675 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * recline.c - tools for recursive filtering of 1D lines
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * DESCRIPTION: 
- *
- * Recursive filtering of a line (a 1D array)
- * Filter coefficient are static variables.
- *
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * Copyright Gregoire Malandain, INRIA
- *
- * ADDITIONS, CHANGES
- *
- */
-
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-
-
-#include "recline.h"
-
-static int _VERBOSE_RECLINE_ = 0;
-
-#define EXIT_ON_FAILURE 0
-#define EXIT_ON_SUCCESS 1
-
-
-
-void printRecursiveCoefficients( RFcoefficientType *RFC )
-{
-  printf( "denominator:\n" );
-  printf( "%f %f %f %f\n", RFC->sd1, RFC->sd2, RFC->sd3, RFC->sd4 );
-  printf( "positive numerator:\n" );
-  printf( "%f %f %f %f\n", RFC->sp0, RFC->sp1, RFC->sp2, RFC->sp3 );
-  printf( "negative numerator:\n" );
-  printf( "%f %f %f %f %f\n", RFC->sn0, RFC->sn1, RFC->sn2, RFC->sn3, RFC->sn4 );
-  printf( "\n" );
-}
-
-
-RFcoefficientType * InitRecursiveCoefficients( double x, 
-					       recursiveFilterType type_filter, 
-					       derivativeOrder derivative )
-{
-  const char *proc="InitRecursiveCoefficients";
-  double ex, k1, k2;
-  double a0, a1, c0, c1, omega0, omega1, b0, b1;
-  double cos0, sin0, cos1, sin1;
-  double sumA=0.0, sumC=0.0, aux;
-
-  RFcoefficientType *RFC = NULL;
-  RFC = (RFcoefficientType *)malloc( sizeof(RFcoefficientType) );
-  if ( RFC == NULL ) {
-    if ( _VERBOSE_RECLINE_ != 0 ) 
-      fprintf( stderr, "%s: allocation failed\n", proc );
-    return( NULL );
-  }
-  
-  RFC->sd1 = RFC->sd2 = RFC->sd3 = RFC->sd4 = 0.0;
-  RFC->sp0 = RFC->sp1 = RFC->sp2 = RFC->sp3 = 0.0;
-  RFC->sn0 = RFC->sn1 = RFC->sn2 = RFC->sn3 = RFC->sn4 = 0.0;
-  
-  RFC->type_filter = UNKNOWN_FILTER;
-  RFC->derivative  = NODERIVATIVE;
-  
-  ex = k1 = k2 = 0.0;
-  a0 = a1 = c0 = c1 = 0.0;
-  b0 = b1 = omega0 = omega1 = 0.0;
-  
-  /*--- Selon le type de filtrage (filtres de Deriche,
-    ou approximation de la gaussienne), x designe
-    soit alpha, soit sigma                         ---*/
-  
-  switch ( type_filter ) {
-
-  case GAUSSIAN_FIDRICH :
-    
-    if ( x < 0.1 ) {
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
-      }
-      free( RFC );
-      return( NULL );
-    }
-
-    switch ( derivative ) {
-    default :
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: improper value of derivative order.\n", proc );
-      }
-      free( RFC );
-      return( NULL );
-    case DERIVATIVE_0 :
-      a0 =  0.6570033214 / x;
-      a1 =  1.978946687  / x;
-      c0 = -0.2580640608 / x;
-      c1 = -0.2391206463 / x;
-      omega0 = 0.6512453378;
-      omega1 = 2.05339943;
-      b0 = 1.906154352;
-      b1 = 1.881305409;
-      break;
-    case DERIVATIVE_1 :
-    case DERIVATIVE_1_CONTOURS :
-      a0 = -0.1726729496 / x;
-      a1 = -2.003565572  / x;
-      c0 =  0.1726730777 / x;
-      c1 =  0.4440126835 / x;
-      b0 = 1.560644213;
-      b1 = 1.594202256;
-      omega0 = 0.6995461735;
-      omega1 = 2.144671764;
-      break;
-    case DERIVATIVE_2 :
-      a0 = -0.7241334169 / x;
-      a1 =  1.688628765  / x;
-      c0 =  0.3251949838 / x;
-      c1 = -0.7211796018 / x;
-      b0 = 1.294951143;
-      b1 = 1.427007123;
-      omega0 = 0.7789803775;
-      omega1 = 2.233566862;
-      break;
-    case DERIVATIVE_3 :
-      a0 =  1.285774106  / x;
-      a1 = -0.2896378408 / x;
-      c0 = -1.28577129   / x;
-      c1 =  0.26249833   / x;
-      b0 = 1.01162886;
-      b1 = 1.273344739;
-      omega0 = 0.9474270928;
-      omega1 = 2.337607006;
-      break;
-    }
-    
-    omega0 /= x;   sin0 = sin( omega0 );   cos0 = cos( omega0 ); 
-    omega1 /= x;   sin1 = sin( omega1 );   cos1 = cos( omega1 ); 
-    b0 /= x;
-    b1 /= x;
-
-    RFC->sp0  = a0 + c0;
-    RFC->sp1  = exp( -b1 ) * (c1 * sin1 - (c0 + 2 * a0) * cos1);
-    RFC->sp1 += exp( -b0 ) * (a1 * sin0 - (2 * c0 + a0) * cos0);
-    RFC->sp2  = 2.0 * exp( -b0 - b1 ) 
-      * ((a0 + c0) * cos1 * cos0 - cos1 * a1 * sin0 - cos0 * c1 * sin1);
-    RFC->sp2 += c0 * exp( -2.0 * b0 ) + a0 * exp( -2.0 * b1 );
-    RFC->sp3  = exp( -b1 - 2.0 * b0 ) * (c1 * sin1 - c0 * cos1);
-    RFC->sp3 += exp( -b0 - 2.0 * b1 ) * (a1 * sin0 - a0 * cos0);
-    
-    RFC->sd1  = -2.0 * exp( -b1 ) * cos1 - 2.0 * exp( -b0 ) * cos0;
-    RFC->sd2  = 4.0 * cos1 * cos0 * exp( -b0 - b1 ) 
-      + exp( -2.0 * b1 ) + exp( -2.0 * b0 );
-    RFC->sd3 = -2.0 * cos0 * exp( -b0 - 2.0 * b1 ) 
-      - 2.0 * cos1 * exp( -b1 - 2.0 * b0 );
-    RFC->sd4 = exp( -2.0 * b0 - 2.0 * b1 );
-    
-    switch ( derivative ) {
-    default :
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: improper value of derivative order.\n", proc );
-      }
-      free( RFC );
-      return( NULL );
-    case DERIVATIVE_0 :
-    case DERIVATIVE_2 :
-      RFC->sn1 =   RFC->sp1 - RFC->sd1 * RFC->sp0;
-      RFC->sn2 =   RFC->sp2 - RFC->sd2 * RFC->sp0;
-      RFC->sn3 =   RFC->sp3 - RFC->sd3 * RFC->sp0;
-      RFC->sn4 = - RFC->sd4 * RFC->sp0;
-      break;
-    case DERIVATIVE_1 :
-    case DERIVATIVE_1_CONTOURS :
-    case DERIVATIVE_3 :
-      RFC->sn1 = - RFC->sp1 + RFC->sd1 * RFC->sp0;
-      RFC->sn2 = - RFC->sp2 + RFC->sd2 * RFC->sp0;
-      RFC->sn3 = - RFC->sp3 + RFC->sd3 * RFC->sp0;
-      RFC->sn4 =   RFC->sd4 * RFC->sp0;
-    }
-    
-    RFC->type_filter = type_filter;
-    RFC->derivative  = derivative;
-    break;
-    
-  case GAUSSIAN_DERICHE :
-    
-    if ( x < 0.1 ) {
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
-      }
-      free( RFC );
-      return( NULL );
-    }
-
-    switch ( derivative ) {
-    default :
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
-      }
-      derivative = DERIVATIVE_0;
-    case DERIVATIVE_0 :
-      a0     =  1.68;
-      omega0 =  0.6318;
-      a1     =  3.735;
-      b0     =  1.783;
-      c0     = -0.6803;
-      omega1 =  1.997;
-      c1     = -0.2598;
-      b1     =  1.723;
-      break;
-    case DERIVATIVE_1 :
-    case DERIVATIVE_1_CONTOURS :
-      a0     =  -0.6472;
-      omega0 =  0.6719;
-      a1     =  -4.531;
-      b0     =  1.527;
-      c0     =  0.6494;
-      omega1 =  2.072;
-      c1     =  0.9557;
-      b1     =  1.516;
-      break;
-    case DERIVATIVE_2 :
-      a0     = -1.331;
-      omega0 =  0.748;
-      a1     =  3.661;
-      b0     =  1.24;
-      c0     =  0.3225;
-      omega1 =  2.166;
-      c1     = -1.738;
-      b1     =  1.314;
-    }
-	 
-    omega0 /= x;   sin0 = sin( omega0 );   cos0 = cos( omega0 ); 
-    omega1 /= x;   sin1 = sin( omega1 );   cos1 = cos( omega1 ); 
-    b0 /= x;
-    b1 /= x;
-
-    /*--- normalisation ---*/
-    switch ( derivative ) {
-    default :
-    case DERIVATIVE_0 :
-      sumA  = 2.0 * a1 * exp( b0 ) * cos0 * cos0 - a0 * sin0 * exp( 2.0 * b0 );
-      sumA += a0 * sin0 - 2.0 * a1 * exp( b0 );
-      sumA /= ( 2.0 * cos0 * exp( b0 ) - exp( 2.0 * b0 ) - 1 ) * sin0;
-      sumC  = 2.0 * c1 * exp( b1 ) * cos1 * cos1 - c0 * sin1 * exp( 2.0 * b1 );
-      sumC += c0 * sin1 - 2.0 * c1 * exp( b1 );
-      sumC /= ( 2.0 * cos1 * exp( b1 ) - exp( 2.0 * b1 ) - 1 ) * sin1;
-      break;
-    case DERIVATIVE_1 :
-      aux   = exp( 4.0 * b0 ) - 4.0 * cos0 * exp( 3.0 * b0 );
-      aux  += 2.0 * exp( 2.0 * b0 ) + 4.0 * cos0 * cos0 * exp( 2.0 * b0 );
-      aux  += 1.0 - 4.0 * cos0 * exp( b0 );
-      sumA  = a0 * cos0 - a1 * sin0 + a1 * sin0 * exp( 2.0 * b0 );
-      sumA += a0 * cos0 * exp( 2.0 * b0 ) - 2.0 * a0 * exp( b0 );
-      sumA *= exp( b0 ) / aux;
-      aux   = exp( 4.0 * b1 ) - 4.0 * cos1 * exp( 3.0 * b1 );
-      aux  += 2.0 * exp( 2.0 * b1 ) + 4.0 * cos1 * cos1 * exp( 2.0 * b1 );
-      aux  += 1.0 - 4.0 * cos1 * exp( b1 );
-      sumC  = c0 * cos1 - c1 * sin1 + c1 * sin1 * exp( 2.0 * b1 );
-      sumC += c0 * cos1 * exp( 2.0 * b1 ) - 2.0 * c0 * exp( b1 );
-      sumC *= exp( b1 ) / aux;
-      /*--- on multiplie les sommes par 2 car on n'a calcule que des demi-sommes 
-	et on change le signe car la somme doit etre egale a -1              ---*/
-      sumA *= (-2.0);
-      sumC *= (-2.0);
-      break;
-    case DERIVATIVE_1_CONTOURS :
-      /*--- la somme de 1 a l'infini est egale a 1 : cela introduit
-	un petit biais (reponse un rien superieur a la hauteur du step).
-	Avec une somme de 0 a l'infini, c'est pire                       ---*/
-      sumA  = a1 * exp( b0 ) - a1 * cos0 * cos0 * exp( b0 );
-      sumA += a0 * cos0 * sin0 * exp( b0 ) - a0 * sin0;
-      sumA /= sin0 * ( 2.0 * cos0 * exp( b0 ) - exp( 2.0 * b0 ) - 1 );
-      sumC  = c1 * exp( b1 ) - c1 * cos1 * cos1 * exp( b1 );
-      sumC += c0 * cos1 * sin1 * exp( b1 ) - c0 * sin1;
-      sumC /= sin1 * ( 2.0 * cos1 * exp( b1 ) - exp( 2.0 * b1 ) - 1 );
-      break;
-    case DERIVATIVE_2 :
-      aux   = 12.0 * cos0 * exp( 3.0 * b0 ) - 3.0 * exp( 2.0 * b0 );
-      aux  += 8.0 * cos0 * cos0 * cos0 * exp( 3.0 * b0 ) 
-	- 12.0 * cos0 * cos0 * exp( 4.0 * b0 );
-      aux  -= 3.0 * exp( 4.0 * b0 );
-      aux  += 6.0 * cos0 * exp( 5.0 * b0 ) -  exp( 6.0 * b0 ) 
-	+ 6.0 * cos0 * exp( b0 );
-      aux  -= ( 1.0 + 12.0 * cos0 * cos0 * exp( 2.0 * b0 ) );
-      sumA  = 4.0 * a0 * sin0 * exp( 3.0 * b0 ) 
-	+ a1 * cos0 * cos0 * exp( 4.0 * b0 );
-      sumA -= ( 4.0 * a0 * sin0 * exp( b0 ) 
-		+ 6.0 * a1 * cos0 * cos0 * exp( 2.0 * b0 ) );
-      sumA += 2.0 * a1 * cos0 * cos0 * cos0 * exp( b0 ) 
-	- 2.0 * a1 * cos0 * exp( b0 );
-      sumA += 2.0 * a1 * cos0 * cos0 * cos0 * exp( 3.0 * b0 ) 
-	- 2.0 * a1 * cos0 * exp( 3.0 * b0 );
-      sumA += a1 * cos0 * cos0 - a1 * exp( 4.0 * b0 );
-      sumA += 2.0 * a0 * sin0 * cos0 * cos0 * exp( b0 ) 
-	- 2.0 * a0 * sin0 * cos0 * cos0 * exp( 3.0 * b0 );
-      sumA -= ( a0 * sin0 * cos0 * exp( 4.0 * b0 ) + a1 );
-      sumA += 6.0 * a1 * exp( 2.0 * b0 ) + a0 * cos0 * sin0;
-      sumA *= 2.0 * exp( b0 ) / ( aux * sin0 );
-      aux   = 12.0 * cos1 * exp( 3.0 * b1 ) - 3.0 * exp( 2.0 * b1 );
-      aux  += 8.0 * cos1 * cos1 * cos1 * exp( 3.0 * b1 ) 
-	- 12.0 * cos1 * cos1 * exp( 4.0 * b1 );
-      aux  -= 3.0 * exp( 4.0 * b1 );
-      aux  += 6.0 * cos1 * exp( 5.0 * b1 ) -  exp( 6.0 * b1 ) 
-	+ 6.0 * cos1 * exp( b1 );
-      aux  -= ( 1.0 + 12.0 * cos1 * cos1 * exp( 2.0 * b1 ) );
-      sumC  = 4.0 * c0 * sin1 * exp( 3.0 * b1 ) 
-	+ c1 * cos1 * cos1 * exp( 4.0 * b1 );
-      sumC -= ( 4.0 * c0 * sin1 * exp( b1 ) 
-		+ 6.0 * c1 * cos1 * cos1 * exp( 2.0 * b1 ) );
-      sumC += 2.0 * c1 * cos1 * cos1 * cos1 * exp( b1 ) 
-	- 2.0 * c1 * cos1 * exp( b1 );
-      sumC += 2.0 * c1 * cos1 * cos1 * cos1 * exp( 3.0 * b1 ) 
-	- 2.0 * c1 * cos1 * exp( 3.0 * b1 );
-      sumC += c1 * cos1 * cos1 - c1 * exp( 4.0 * b1 );
-      sumC += 2.0 * c0 * sin1 * cos1 * cos1 * exp( b1 ) 
-	- 2.0 * c0 * sin1 * cos1 * cos1 * exp( 3.0 * b1 );
-      sumC -= ( c0 * sin1 * cos1 * exp( 4.0 * b1 ) + c1 );
-      sumC += 6.0 * c1 * exp( 2.0 * b1 ) + c0 * cos1 * sin1;
-      sumC *= 2.0 * exp( b1 ) / ( aux * sin1 );
-      /*--- on divise les sommes par 2 (la somme doit etre egale a 2) ---*/
-      sumA /= 2;
-      sumC /= 2;
-    }
-    a0 /= ( sumA + sumC );
-    a1 /= ( sumA + sumC );
-    c0 /= ( sumA + sumC );
-    c1 /= ( sumA + sumC );
-    
-    /*--- coefficients du calcul recursif ---*/
-    RFC->sp0  = a0 + c0;
-    RFC->sp1  = exp( -b1 ) * (c1 * sin1 - (c0 + 2 * a0) * cos1);
-    RFC->sp1 += exp( -b0 ) * (a1 * sin0 - (2 * c0 + a0) * cos0);
-    RFC->sp2  = 2.0 * exp( -b0 - b1 ) 
-      * ((a0 + c0) * cos1 * cos0 - cos1 * a1 * sin0 - cos0 * c1 * sin1);
-    RFC->sp2 += c0 * exp( -2.0 * b0 ) + a0 * exp( -2.0 * b1 );
-    RFC->sp3  = exp( -b1 - 2.0 * b0 ) * (c1 * sin1 - c0 * cos1);
-    RFC->sp3 += exp( -b0 - 2.0 * b1 ) * (a1 * sin0 - a0 * cos0);
-    
-    RFC->sd1  = -2.0 * exp( -b1 ) * cos1 - 2.0 * exp( -b0 ) * cos0;
-    RFC->sd2  = 4.0 * cos1 * cos0 * exp( -b0 - b1 ) 
-      + exp( -2.0 * b1 ) + exp( -2.0 * b0 );
-    RFC->sd3 = -2.0 * cos0 * exp( -b0 - 2.0 * b1 ) 
-      - 2.0 * cos1 * exp( -b1 - 2.0 * b0 );
-    RFC->sd4 = exp( -2.0 * b0 - 2.0 * b1 );
-    
-    switch ( derivative ) {
-    default :
-    case DERIVATIVE_0 :
-    case DERIVATIVE_2 :
-      RFC->sn1 =   RFC->sp1 - RFC->sd1 * RFC->sp0;
-      RFC->sn2 =   RFC->sp2 - RFC->sd2 * RFC->sp0;
-      RFC->sn3 =   RFC->sp3 - RFC->sd3 * RFC->sp0;
-      RFC->sn4 = - RFC->sd4 * RFC->sp0;
-      break;
-    case DERIVATIVE_1 :
-    case DERIVATIVE_1_CONTOURS :
-    case DERIVATIVE_3 :
-      RFC->sn1 = - RFC->sp1 + RFC->sd1 * RFC->sp0;
-      RFC->sn2 = - RFC->sp2 + RFC->sd2 * RFC->sp0;
-      RFC->sn3 = - RFC->sp3 + RFC->sd3 * RFC->sp0;
-      RFC->sn4 =   RFC->sd4 * RFC->sp0;
-    }
-    
-    RFC->type_filter = type_filter;
-    RFC->derivative  = derivative;
-    break;
-
-
-
-  default :
-    if ( _VERBOSE_RECLINE_ != 0 ) {
-      fprintf( stderr, "%s: switch to default recursive filter (Deriche's filters).\n", proc );
-    }
-    type_filter = ALPHA_DERICHE;
-  case ALPHA_DERICHE :
-
-    if ( (x < 0.1) || (x > 1.9) ) {
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1 and <= 1.9).\n", proc );
-      }
-      free( RFC );
-      return( NULL );
-    }
-    ex = exp( (-x) );
-    
-    switch ( derivative ) {
-    default :
-      if ( _VERBOSE_RECLINE_ != 0 ) {
-	fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
-      }
-      derivative = DERIVATIVE_0;
-    case DERIVATIVE_0 :
-      RFC->sp0 = (1.0 - ex) * (1.0 - ex) / (1.0 + 2.0 * x * ex - ex * ex);
-      RFC->sp1 = RFC->sp0 * (x - 1.0) * ex;
-      RFC->sn1 = RFC->sp0 * (x + 1.0) * ex;
-      RFC->sn2 = (- RFC->sp0) * ex * ex;
-      RFC->sd1 = (- 2.0) * ex;
-      RFC->sd2 = ex * ex;
-      break;
-    case DERIVATIVE_1 :
-      RFC->sp1 = - (1.0 - ex) * (1.0 - ex) * (1.0 - ex) / (2.0 * (1.0 + ex));
-      RFC->sn1 = (- RFC->sp1);
-      RFC->sd1 = (- 2.0) * ex;
-      RFC->sd2 = ex * ex;	    
-      break;
-    case DERIVATIVE_1_CONTOURS :
-      RFC->sp1 = - (1.0 - ex) * (1.0 - ex);
-      RFC->sn1 = (- RFC->sp1);
-      RFC->sd1 = (- 2.0) * ex;
-      RFC->sd2 = ex * ex;	    
-      break;
-    case DERIVATIVE_2 :
-      k1 = (- 2.0) * (1.0 - ex) * (1.0 - ex) * (1.0 - ex);
-      k1 /= (1.0 + ex) * (1.0 + ex) * (1.0 + ex);
-      k2 = (1.0 - ex * ex) / (2.0 * ex);
-      RFC->sp0 = k1;
-      RFC->sp1 = (- k1) * (1.0 + k2) * ex;
-      RFC->sn1 = k1 * (1.0 - k2) * ex;
-      RFC->sn2 = (- k1) * ex * ex;
-      RFC->sd1 = (- 2.0) * ex;
-      RFC->sd2 = ex * ex;
-      break;
-    case DERIVATIVE_3 :
-      k1 = (1.0 + x) * ex + (x - 1.0);
-      k2 = (1.0 - ex) / k1;
-      k1 *= (1.0 - ex) * (1.0 - ex) * (1.0 - ex) * (1.0 - ex);
-      k1 /= 2.0 * x * x * ex * ex;
-      k1 /= ex + 1.0;
-      RFC->sp0 = k1 * x * (k2 + 1.0);
-      RFC->sp1 = (- k1) * x * (1.0 + k2 + k2*x) * ex;
-      RFC->sn0 = (- RFC->sp0);
-      RFC->sn1 = (- RFC->sp1);
-      RFC->sd1 = (- 2.0) * ex;
-      RFC->sd2 = ex * ex;
-    }
-    RFC->type_filter = type_filter;
-    RFC->derivative  = derivative;
-  }
-
-  return( RFC );
-}
-
-
-
-int RecursiveFilter1D( RFcoefficientType *RFC,
-		       double *in, 
-		       double *out, 
-		       double *work1, 
-		       double *work2, 
-		       int dim )
-{
-  const char *proc="RecursiveFilter1D";
-  register double rp0, rp1, rp2, rp3;
-  register double rd1, rd2, rd3, rd4;
-  register double rn0, rn1, rn2, rn3, rn4;
-  register int i;
-  register double *w0, *w1, *w2, *w3, *w4;
-  register double *d0, *d1, *d2, *d3, *d4;
-
-  if ( RFC->type_filter == UNKNOWN_FILTER ) {
-    if ( _VERBOSE_RECLINE_ != 0 )
-      fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-  if ( RFC->derivative == NODERIVATIVE ) {
-    if ( _VERBOSE_RECLINE_ != 0 )
-      fprintf( stderr, "%s: unknown type of derivative.\n", proc );
-    return( EXIT_ON_FAILURE );
-  }
-
-  rd1 = rd2 = rd3 = rd4 = 0.0;
-  rp0 = rp1 = rp2 = rp3 = 0.0;
-  rn0 = rn1 = rn2 = rn3 = rn4 = 0.0;
-  
-  switch( RFC->type_filter ) {
-  default :
-    if ( _VERBOSE_RECLINE_ != 0 )
-      fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
-    return( EXIT_ON_FAILURE );
-  case GAUSSIAN_FIDRICH :
-  case GAUSSIAN_DERICHE :
-    /*--- filtrage generique d'ordre 4 ---*/
-    rp0 = RFC->sp0;   rp1 = RFC->sp1;   rp2 = RFC->sp2;   rp3 = RFC->sp3;
-    rd1 = RFC->sd1;   rd2 = RFC->sd2;   rd3 = RFC->sd3;   rd4 = RFC->sd4;
-    rn1 = RFC->sn1;   rn2 = RFC->sn2;   rn3 = RFC->sn3;   rn4 = RFC->sn4;
-    
-    /* on positionne les pointeurs 
-     */
-    w4 = work1;   w3 = w4+1;   w2 = w3+1;   w1 = w2+1;   w0 = w1+1;
-    d3 = in+1;    d2 = d3+1;   d1 = d2+1;   d0 = d1+1;
-    /*--- calcul de y+ ---*/
-    *(w4) = rp0 * *(in);
-    *(w3) = rp0 * *(d3) + rp1 * *(in)
-          - rd1 * *(w4);   
-    *(w2) = rp0 * *(d2) + rp1 * *(d3) + rp2 * *(in)
-          - rd1 * *(w3) - rd2 * *(w4);
-    *(w1) = rp0 * *(d1) + rp1 * *(d2) + rp2 * *(d3) + rp3 * *(in)
-          - rd1 * *(w2) - rd2 * *(w3) - rd3 * *(w4);
-    for (i=4; i<dim; i++,w0++,w1++,w2++,w3++,w4++,d0++,d1++,d2++,d3++) 
-      *(w0) = rp0 * *(d0) + rp1 * *(d1) + rp2 * *(d2) + rp3 * *(d3)
-            - rd1 * *(w1) - rd2 * *(w2) - rd3 * *(w3) - rd4 * *(w4);
-    
-    /* on positionne les pointeurs 
-     */
-    w4 = work2+dim-1;   w3 = w4-1;   w2 = w3-1;   w1 = w2-1;   w0 = w1-1;
-    d4 = in+dim-1;      d3 = d4-1;   d2 = d3-1;   d1 = d2-1;
-    /*--- calcul de y- ---*/
-    *(w4) = 0;
-    *(w3) = rn1 * *(d4);
-    *(w2) = rn1 * *(d3) + rn2 * *(d4) 
-          - rd1 * *(w3);
-    *(w1) = rn1 * *(d2) + rn2 * *(d3) + rn3 * *(d4) 
-          - rd1 * *(w2) - rd2 * *(w3);
-    for (i=dim-5; i>=0; i--,w0--,w1--,w2--,w3--,w4--,d1--,d2--,d3--,d4--)
-      *(w0) = rn1 * *(d1) + rn2 * *(d2) + rn3 * *(d3) + rn4 * *(d4)
-	    - rd1 * *(w1) - rd2 * *(w2) - rd3 * *(w3) - rd4 * *(w4);
-
-    /*--- calcul final ---*/
-    w1 = work1;   w2 = work2;   d0 = out;
-    for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
-      *d0 = *w1 + *w2;
-    
-    break;
-
-  case ALPHA_DERICHE :
-    
-    switch( RFC->derivative ) {
-    default :
-    case DERIVATIVE_0 :
-    case DERIVATIVE_2 :
-
-      rp0 = RFC->sp0;   rp1 = RFC->sp1;
-      rd1 = RFC->sd1;   rd2 = RFC->sd2;
-      rn1 = RFC->sn1;   rn2 = RFC->sn2;
-      
-      /* on positionne les pointeurs 
-       */
-      w2 = work1;   w1 = w2+1;   w0 = w1+1;
-      d1 = in+1;    d0 = d1+1;
-      /*--- calcul de y+ ---*/
-      *(w2) = rp0 * *(in);
-      *(w1) = rp0 * *(d1) + rp1 * *(in) 
-	    - rd1 * *(w2);     
-      for (i=2;  i<dim; i++,w0++,w1++,w2++,d0++,d1++)
-	*(w0) = rp0 * *(d0) + rp1 * *(d1)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
-      d2 = in+dim-1;      d1 = d2-1;
-      /*--- calcul de y- ---*/
-      *(w2) = 0.0;
-      *(w1) = rn1 * *(d2);
-      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d1--,d2--)
-	*(w0) = rn1 * *(d1) + rn2 * *(d2)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      /*--- calcul final ---*/
-      w1 = work1;   w2 = work2;   d0 = out;
-      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
-	*d0 = *w1 + *w2;
-      
-      break;
-      
-    case DERIVATIVE_1 :
-    case DERIVATIVE_1_CONTOURS :
-      rp1 = RFC->sp1;
-      rn1 = RFC->sn1;
-      rd1 = RFC->sd1;   rd2 = RFC->sd2;
-      
-      /* on positionne les pointeurs 
-       */
-      w2 = work1;   w1 = w2+1;   w0 = w1+1;
-      d1 = in+1;
-      /*--- calcul de y+ ---*/
-      *(w2) = 0.0;
-      *(w1) = rp1 * *(in);     
-      for (i=2;  i<dim; i++,w0++,w1++,w2++,d1++)
-	*(w0) = rp1 * *(d1)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      
-      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
-      d2 = in+dim-1;      d1 = d2-1;
-      /*--- calcul de y- ---*/
-      *(w2) = 0.0;
-      *(w1) = rn1 * *(d2);
-      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d1--)
-	*(w0) = rn1 * *(d1)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      /*--- calcul final ---*/
-      w1 = work1;   w2 = work2;   d0 = out;
-      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
-	*d0 = *w1 + *w2;
-      
-      break;
-
-    case DERIVATIVE_3 :
-      rp0 = RFC->sp0;   rp1 = RFC->sp1;
-      rd1 = RFC->sd1;   rd2 = RFC->sd2;
-      rn0 = RFC->sn0;   rn1 = RFC->sn1;
-      
-      w2 = work1;   w1 = w2+1;   w0 = w1+1;
-      d1 = in+1;   d0 = d1+1;
-      /*--- calcul de y+ ---*/
-      *(w2) = rp0 * *(in);
-      *(w1) = rp0 * *(d1) + rp1 * *(in) 
-	    - rd1 * *(w2);     
-      for (i=2;  i<dim; i++,w0++,w1++,w2++,d0++,d1++)
-	*(w0) = rp0 * *(d0) + rp1 * *(d1)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
-      d2 = in+dim-1;      d1 = d2-1;   d0 = d1-1;
-      /*--- calcul de y- ---*/
-      *(w2) = rn0 * *(d2);
-      *(w1) = rn0 * *(d1) + rn1 * *(d2) 
-	    - rd1 * *(w2);
-      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d0--,d1--)
-	*(w0) = rn0 * *(d0) + rn1 * *(d1)
-	      - rd1 * *(w1) - rd2 * *(w2);
-      
-      /*--- calcul final ---*/
-      w1 = work1;   w2 = work2;   d0 = out;
-      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
-	*d0 = *w1 + *w2;
-      
-    }
-  }
-  return( EXIT_ON_SUCCESS );
-}
-
-void Recline_verbose ( )
-{
-  _VERBOSE_RECLINE_ = 1;
-}
-void Recline_noverbose ( )
-{
-  _VERBOSE_RECLINE_ = 0;
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.h
deleted file mode 100644
index 44ccf6d..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/recline.h
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * recline.h - tools for recursive filtering of 1D lines
- *
- * $Id$
- *
- * Copyright©INRIA 1998
- *
- * DESCRIPTION: 
- *
- * Recursive filtering of a line (a 1D array)
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * http://www.inria.fr/epidaure/personnel/malandain/
- * 
- * CREATION DATE: 
- * June, 9 1998
- *
- * Copyright Gregoire Malandain, INRIA
- *
- * ADDITIONS, CHANGES
- *
- */
-
-/*
- * recursive filtering of a line (a 1D array)
- */
-
-#ifndef _recline_h_
-#define _recline_h_
-
-
-
-/* The different recursive filter's types.
- *
- * DESCRIPTION:
- *
- * - ALPHA_DERICHE is the first recurvise filter designed
- *   by R. Deriche. See REFERENCES.
- *
- * - with ALPHA_DERICHE's filters, one can either compute
- *   derivatives from order 0 (smoothing) to 3, or extract edges.
- *
- * - GAUSSIAN_DERICHE is a 4th order recursive filter which
- *   approximates the gaussien. See
- *   "Recursively Implementing The Gaussian and Its Derivatives",
- *   R. Deriche, International Conference On Image Processing,
- *   pp 263-267, Singapore, September 1992. Also INRIA research
- *   report.
- *
- * - with GAUSSIAN_DERICHE's filters, one can either compute
- *   derivatives from order 0 (smoothing) to 2, or extract edges.
- *
- * - Extracting edges with ALPHA_DERICHE's filters is faster but
- *   the modulus of the gradient (the estimated height of the step 
- *   edge) depens on the gradient orientation because the filter
- *   is not isotropic. Heights are better estimated with 
- *   GAUSSIAN_DERICHE's filters but they seem not be perfectly
- *   symmetrical.
- *
- * REFERENCES:
- *
- * - "Optimal edge detection using recursive filtering", R. Deriche,
- *   International Journal of Computer Vision, pp 167-187, 1987.
- *
- * - "Recursive filtering and edge tracking: two primary tools
- *    for 3-D edge detection", O. Monga, R. Deriche,
- *   G. Malandain and J.-P. Cocquerez, Image and Vision
- *   Computing 4:9, pp 203-214, August 1991.
- */
-typedef enum {
-  UNKNOWN_FILTER = 0 /* unknown filter type */,
-  ALPHA_DERICHE = 1 /* Deriche's filter (exponential (- alpha |X|)) */,
-  GAUSSIAN_DERICHE = 2 /* gaussian approximation (Deriche's coefficients) */,
-  GAUSSIAN_FIDRICH = 3 /* gaussian approximation (Fidrich's coefficients) */
-} recursiveFilterType;
-
-
-
-/* Order of the derivative to be computed.
- *
- * DESCRIPTION:
- *
- * - NODERIVATIVE nothing will be done.
- *
- * - DERIVATIVE_0 means smoothing.
- *
- * - DERIVATIVE_1 first derivative. The normalization
- *   of the filter is made so that the response to the
- *   signal i=x will be 1.
- *
- * - DERIVATIVE_1_CONTOURS first derivative but adapted
- *   to edge detections. The normalization of the filter 
- *   is made so that the response to a step edge is 
- *   the step edge height.
- *
- * - DERIVATIVE_2 second derivative. The normalization
- *   of the filter is made so that the response to the
- *   signal i=x*2/2 will be 1.
- *
- * - DERIVATIVE_3 third derivative. The normalization
- *   of the filter is made so that the response to the
- *   signal i=x*3/6 will be 1.
- */
-typedef enum {
-  NODERIVATIVE  = -1 /* no derivative (no filtering) */,
-  DERIVATIVE_0  = 0 /* smoothing */,
-  SMOOTHING     = 0 /* smoothing */,
-  DERIVATIVE_1  = 1 /* derivative of order 1 */,
-  DERIVATIVE_2  = 2 /* derivative of order 2 */,
-  DERIVATIVE_3  = 3 /* derivative of order 3 */,
-  DERIVATIVE_1_CONTOURS = 11 /* derivative of order 1, normalization adapted to
-				contours. The response to a step-edge is the 
-				height of the step. */,
-  DERIVATIVE_1_EDGES = 11 /* derivative of order 1, normalization adapted to
-				contours. The response to a step-edge is the 
-				height of the step. */
-} derivativeOrder;
-
-
-
-typedef struct {
-  /*--- denominateur       ---*/
-  double sd1;
-  double sd2;
-  double sd3;
-  double sd4;
-  /*--- numerateur positif ---*/
-  double sp0;
-  double sp1;
-  double sp2;
-  double sp3;
-  /*--- numerateur negatif ---*/
-  double sn0;
-  double sn1;
-  double sn2;
-  double sn3;
-  double sn4;
-  /*--- type de filtre en cours ---*/
-  recursiveFilterType type_filter;
-  derivativeOrder derivative;
-} RFcoefficientType;
-
-
-
-/* Initialization of coefficients for recursive filtering.
- *
- * PARAMETERS:
- *
- * - the coefficient is the sigma's value in case of
- *   gaussian filtering, or the alpha's value in case
- *   of Deriche's filters.
- *
- * - the coefficient's value must be larger than 0.1
- *   in case of gaussian filtering, and in the
- *   [0.1,1.9] range in case of Deriche's filters.
- *
- * SEE:
- *
- * - recursiveFilterType
- *
- * - derivativeOrder
- */
-extern RFcoefficientType * InitRecursiveCoefficients( double x, /* coefficient's value */
-				       recursiveFilterType filterType, /* filter's type */
-				       derivativeOrder derivative /* derivative's order */ );
-
-
-
-/* 1D recursive filtering along a line.
- *
- * WARNING:
- * Coefficients should already be initialized.
- *
- * SEE:
- *
- * - recursiveFilterType
- *
- * - derivativeOrder
- *
- * RETURN:
- *
- * - 0 in case of error
- *
- * - 1 if successful
- */
-extern int RecursiveFilter1D( RFcoefficientType *RFC,
-			      double *in, /* input line */ 
-			      double *out, /* output line */
-			      double *work1, /* first work array */
-			      double *work2, /* second work array, 
-						could be out if out is different from in */
-			      int dim /* lines' length */ );
-
-
-/* Turn on verbose mode.
- *
- * DESCRIPTION:
- * Some information will be written on stderr when processing.
- */
-extern void Recline_verbose ( );
-
-/* Turn off verbose mode.
- *
- * DESCRIPTION:
- * Nothing will be written on stderr when processing.
- */
-extern void Recline_noverbose ( );
-
-
-#endif /* _recline_h_ */
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.cpp b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.cpp
deleted file mode 100644
index 13f6bc4..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.cpp
+++ /dev/null
@@ -1,3126 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * reech4x4.c -
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- *
- *
- * ADDITIONS, CHANGES
- *	
- *	
- *	
- *
- */
-
-
-/* CAUTION
-   DO NOT EDIT THIS FILE,
-   UNLESS YOU HAVE A VERY GOOD REASON 
- */
-
-#include "reech4x4.h"
-#include <stdio.h>
-#include "typedefs.h"
-
-#define _CONVERTR_(R) ( R )
-#define _CONVERTI_(R) ( (R) >= 0.0 ? ((int)((R)+0.5)) : ((int)((R)-0.5)) )
-static int _VERBOSE_REECH_ = 0;
-
-
-
-
-
-
-
-/* Resampling procedure.
-
-   Work for 3D images, not for vectorial ones.
-   
-   (double* mat) is the matrix which permits to get
-   from resBuf into theBuf. 
-   If one only have the matrix from theBuf into resBuf,
-   it must be inverted first.
-
-   Soit x le point transforme et ix=(int)x;
-   nous allons distinguer les cas suivants :
-    x < -0.5               => resultat = 0
-    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
-    0.0 < x && ix < dimx-1 => on interpole selon X
-    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
-    x >= dimx-0.5          => resultat = 0
-
-*/
-
-void Reech3DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *tpt;
-  register u8 *rbuf = (u8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (u8 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    *rbuf = *tpt;
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      *rbuf = (u8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *tpt;
-  register u8 *rbuf = (u8*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (u8 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	res = res * g + b;
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    res = (double)(*tpt) * g + b;
-	    *rbuf = (u8)_CONVERTI_( res );
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  res = res * g + b;
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  res = res * g + b;
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	res = res * g + b;
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  res = res * g + b;
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	res = res * g + b;
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      res = res * g + b;
-      *rbuf = (u8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *rbuf = (u8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      iz = (int)(z+0.5);
-      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
-    }
-  }
-}
-
-void Reech2DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *tpt;
-  register u8 *rbuf = (u8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (u8 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  *rbuf = *tpt;
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      *rbuf = (u8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *tpt;
-  register u8 *rbuf = (u8*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (u8 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	res = res * g + b;
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  res = (double)(*tpt) * g + b;
-	  *rbuf = (u8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	res = (double)(*tpt) * g + b;
-	*rbuf = (u8)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      res = res * g + b;
-            *rbuf = (u8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy;
-  register double x, y;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register u8 *tbuf = (u8*)theBuf;
-  register u8 *rbuf = (u8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx ];
-    }
-  }
-}
-
-
-
-
-
-
-/* Resampling procedure.
-
-   Work for 3D images, not for vectorial ones.
-   
-   (double* mat) is the matrix which permits to get
-   from resBuf into theBuf. 
-   If one only have the matrix from theBuf into resBuf,
-   it must be inverted first.
-
-   Soit x le point transforme et ix=(int)x;
-   nous allons distinguer les cas suivants :
-    x < -0.5               => resultat = 0
-    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
-    0.0 < x && ix < dimx-1 => on interpole selon X
-    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
-    x >= dimx-0.5          => resultat = 0
-
-*/
-
-void Reech3DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *tpt;
-  register s8 *rbuf = (s8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (s8 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    *rbuf = *tpt;
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      *rbuf = (s8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *tpt;
-  register s8 *rbuf = (s8*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (s8 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	res = res * g + b;
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    res = (double)(*tpt) * g + b;
-	    *rbuf = (s8)_CONVERTI_( res );
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  res = res * g + b;
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  res = res * g + b;
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	res = res * g + b;
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  res = res * g + b;
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	res = res * g + b;
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      res = res * g + b;
-      *rbuf = (s8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *rbuf = (s8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      iz = (int)(z+0.5);
-      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
-    }
-  }
-}
-
-void Reech2DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *tpt;
-  register s8 *rbuf = (s8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (s8 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  *rbuf = *tpt;
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      *rbuf = (s8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *tpt;
-  register s8 *rbuf = (s8*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (s8 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	res = res * g + b;
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  res = (double)(*tpt) * g + b;
-	  *rbuf = (s8)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	res = (double)(*tpt) * g + b;
-	*rbuf = (s8)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      res = res * g + b;
-            *rbuf = (s8)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy;
-  register double x, y;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register s8 *tbuf = (s8*)theBuf;
-  register s8 *rbuf = (s8*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s8*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx ];
-    }
-  }
-}
-
-
-
-
-
-
-/* Resampling procedure.
-
-   Work for 3D images, not for vectorial ones.
-   
-   (double* mat) is the matrix which permits to get
-   from resBuf into theBuf. 
-   If one only have the matrix from theBuf into resBuf,
-   it must be inverted first.
-
-   Soit x le point transforme et ix=(int)x;
-   nous allons distinguer les cas suivants :
-    x < -0.5               => resultat = 0
-    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
-    0.0 < x && ix < dimx-1 => on interpole selon X
-    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
-    x >= dimx-0.5          => resultat = 0
-
-*/
-
-void Reech3DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *tpt;
-  register u16 *rbuf = (u16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (u16 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    *rbuf = *tpt;
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      *rbuf = (u16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *tpt;
-  register u16 *rbuf = (u16*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (u16 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	res = res * g + b;
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    res = (double)(*tpt) * g + b;
-	    *rbuf = (u16)_CONVERTI_( res );
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  res = res * g + b;
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  res = res * g + b;
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	res = res * g + b;
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  res = res * g + b;
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	res = res * g + b;
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      res = res * g + b;
-      *rbuf = (u16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *rbuf = (u16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      iz = (int)(z+0.5);
-      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
-    }
-  }
-}
-
-void Reech2DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *tpt;
-  register u16 *rbuf = (u16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (u16 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  *rbuf = *tpt;
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      *rbuf = (u16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *tpt;
-  register u16 *rbuf = (u16*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (u16 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	res = res * g + b;
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  res = (double)(*tpt) * g + b;
-	  *rbuf = (u16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	res = (double)(*tpt) * g + b;
-	*rbuf = (u16)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      res = res * g + b;
-            *rbuf = (u16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy;
-  register double x, y;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register u16 *tbuf = (u16*)theBuf;
-  register u16 *rbuf = (u16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (u16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx ];
-    }
-  }
-}
-
-
-
-
-
-
-/* Resampling procedure.
-
-   Work for 3D images, not for vectorial ones.
-   
-   (double* mat) is the matrix which permits to get
-   from resBuf into theBuf. 
-   If one only have the matrix from theBuf into resBuf,
-   it must be inverted first.
-
-   Soit x le point transforme et ix=(int)x;
-   nous allons distinguer les cas suivants :
-    x < -0.5               => resultat = 0
-    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
-    0.0 < x && ix < dimx-1 => on interpole selon X
-    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
-    x >= dimx-0.5          => resultat = 0
-
-*/
-
-void Reech3DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *tpt;
-  register s16 *rbuf = (s16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (s16 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    *rbuf = *tpt;
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      *rbuf = (s16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *tpt;
-  register s16 *rbuf = (s16*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (s16 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	res = res * g + b;
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    res = (double)(*tpt) * g + b;
-	    *rbuf = (s16)_CONVERTI_( res );
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  res = res * g + b;
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  res = res * g + b;
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	res = res * g + b;
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  res = res * g + b;
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	res = res * g + b;
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      res = res * g + b;
-      *rbuf = (s16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech3DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *rbuf = (s16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      iz = (int)(z+0.5);
-      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
-    }
-  }
-}
-
-void Reech2DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *tpt;
-  register s16 *rbuf = (s16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (s16 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  *rbuf = *tpt;
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      *rbuf = (s16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *tpt;
-  register s16 *rbuf = (s16*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (s16 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	res = res * g + b;
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  res = (double)(*tpt) * g + b;
-	  *rbuf = (s16)_CONVERTI_( res );
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	res = (double)(*tpt) * g + b;
-	*rbuf = (s16)_CONVERTI_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      res = res * g + b;
-            *rbuf = (s16)_CONVERTI_( res );
-    }
-  }
-}
-
-void Reech2DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy;
-  register double x, y;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register s16 *tbuf = (s16*)theBuf;
-  register s16 *rbuf = (s16*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (s16*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx ];
-    }
-  }
-}
-
-
-
-
-
-
-/* Resampling procedure.
-
-   Work for 3D images, not for vectorial ones.
-   
-   (double* mat) is the matrix which permits to get
-   from resBuf into theBuf. 
-   If one only have the matrix from theBuf into resBuf,
-   it must be inverted first.
-
-   Soit x le point transforme et ix=(int)x;
-   nous allons distinguer les cas suivants :
-    x < -0.5               => resultat = 0
-    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
-    0.0 < x && ix < dimx-1 => on interpole selon X
-    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
-    x >= dimx-0.5          => resultat = 0
-
-*/
-
-void Reech3DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *tpt;
-  register r32 *rbuf = (r32*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (r32 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    *rbuf = *tpt;
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      *rbuf = (r32)_CONVERTR_( res );
-    }
-  }
-}
-
-void Reech3DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
-  register double res;
-  double v6, v5, v4;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register double ddimz = (double)tdimz-0.5;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *tpt;
-  register r32 *rbuf = (r32*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;
-      iy = (int)y;
-      iz = (int)z;
-      tpt = (r32 *)tbuf;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) &&
-	   (z > 0.0) && (iz < t1dimz) ) {
-	/* the corresponding point is in the box defined 
-	   by (ix[+1],iy[+1],iz[+1]) */
-	dx = x - ix;
-	dy = y - iy;
-	dz = z - iz;
-	dxdy = dx*dy;
-	dxdz = dx*dz;
-	dydz = dy*dz;
-	dxdydz = dxdy*dz;
-
-	/* we have
-	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
-	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
-	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
-	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
-	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
-	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
-	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
-	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
-	*/
-	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
-	v6 = dxdz-dxdydz;
-	v5 = dxdy-dxdydz;
-	v4 = dx-dxdy-v6;
-
-	res = 0;
-	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
-	tpt --;
-	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
-	tpt -= t1dimx;
-	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
-	tpt --;
-	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
-	tpt -= toffset2;
-	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
-	tpt --;
-	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
-	tpt -= t1dimx;
-	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
-	tpt --;
-	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
-	res = res * g + b;
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here, we are sure we are on some border */
-      tpt += ix + iy * tdimx + iz * tdimxy;
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  if ( (z < 0.0) || (iz == t1dimz) ) {
-	    res = (double)(*tpt) * g + b;
-	    *rbuf = (r32)_CONVERTR_( res );
-	    continue;
-	  }
-	  dz = z - iz;
-	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
-	  tpt += tdimxy;
-	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
-	  res = res * g + b;
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
-	}
-	dy = y - iy;
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
-	  tpt += tdimx;
-	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
-	  res = res * g + b;
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
- 	}
-	dz = z - iz;
-	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt += tdimx;
-	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
-	tpt += toffset2+1;
-	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt += tdimx;
-	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
-	res = res * g + b;
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here we are sure that the border is either
-	 along the Y or the Z axis */
-      dx = x - ix;
-      if ( (y < 0.0) || (iy == t1dimy) ) {
-	if ( (z < 0.0) || (iz == t1dimz) ) {
-	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
-	  tpt ++;
-	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	  res = res * g + b;
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
-	}
-	dz = z - iz;
-	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
-	tpt ++;
-	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-	tpt += tdimxy-1;
-	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
-	tpt ++;
-	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
-	res = res * g + b;
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      /* here we are sure that the border is along the Z axis */
-      dy = y - iy;
-      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
-      tpt ++;
-      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
-      tpt += t1dimx;
-      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
-      tpt ++;
-      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
-      res = res * g + b;
-      *rbuf = (r32)_CONVERTR_( res );
-    }
-  }
-}
-
-void Reech3DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy, iz;
-  register double x, y, z;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
-  int tdimxy=tdimx*tdimy;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *rbuf = (r32*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
-      iz = (int)(z+0.5);
-      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
-    }
-  }
-}
-
-void Reech2DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *tpt;
-  register r32 *rbuf = (r32*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (r32*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (r32 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  *rbuf = *tpt;
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      *rbuf = (r32)_CONVERTR_( res );
-    }
-  }
-}
-
-void Reech2DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias )
-{
-  register int i, j, k, ix, iy;
-  register double x, y, dx, dy, dxdy;
-  register double res, v;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  int toffset=tdimx-1;
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *tpt;
-  register r32 *rbuf = (r32*)resBuf;
-  register double b=bias;
-  register double g=gain;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (r32*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j +              mat[3];
-      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j +              mat[7];
-      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
-
-      /* here, the point lies on the borders or completely inside
-	 the image */
-      ix = (int)x;      
-      iy = (int)y;
-      tpt = (r32 *)tbuf;
-      tpt += ix + iy * tdimx;
-      
-      /* are we on the border or not ? */
-      if ( (x > 0.0) && (ix < t1dimx) &&
-	   (y > 0.0) && (iy < t1dimy) ) {
-	dx = x - ix;
-	dy = y - iy;
-	dxdy = dx*dy;
-	/* we have
-	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
-	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
-	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
-	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
-	*/
-	v = dy-dxdy;
-	res = 0;
-	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
-	tpt ++;
-	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
-	tpt += toffset;
-	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
-	tpt ++;
-	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
-	res = res * g + b;
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-
-      /* here, we are sure we are on some border */
-      if ( (x < 0.0) || (ix == t1dimx) ) {
-	/* we just look at y */
-	if ( (y < 0.0) || (iy == t1dimy) ) {
-	  res = (double)(*tpt) * g + b;
-	  *rbuf = (r32)_CONVERTR_( res );
-	  continue;
-	}
-	dy = y - iy;
-	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
-	tpt += tdimx;
-	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
-	res = (double)(*tpt) * g + b;
-	*rbuf = (r32)_CONVERTR_( res );
-	continue;
-      }
-      dx = x - ix;
-      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
-      tpt ++;
-      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
-      res = res * g + b;
-            *rbuf = (r32)_CONVERTR_( res );
-    }
-  }
-}
-
-void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      )
-{
-  register int i, j, k, ix, iy;
-  register double x, y;
-  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
-  int tdimx=theDim[0], tdimy=theDim[1];
-  register int t1dimx=tdimx-1, t1dimy=tdimy-1;
-  register r32 *tbuf = (r32*)theBuf;
-  register r32 *rbuf = (r32*)resBuf;
-
-  for ( k = 0; k < rdimz; k ++ ) {
-    if ( _VERBOSE_REECH_ != 0 )
-      fprintf( stderr, "Processing slice %d\r", k );
-    /* tbuf represente le premier point du plan */
-    tbuf  = (r32*)theBuf;
-    tbuf += k*(tdimx * tdimy);
-    for ( j = 0; j < rdimy; j ++ )
-    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
-      /* computation of the corresponding point coordinates in theBuf */
-      x = mat[0] * i +  mat[1] * j + mat[3];
-      ix = (int)(x+0.5);
-      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
-      y = mat[4] * i +  mat[5] * j + mat[7];
-      iy = (int)(y+0.5);
-      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
-      
-      *rbuf = tbuf[ ix + iy * tdimx ];
-    }
-  }
-}
-
-
-
-
-
-
-void Reech4x4_verbose ( )
-{
-  _VERBOSE_REECH_ = 1;
-}
-
-void Reech4x4_noverbose ( )
-{
-  _VERBOSE_REECH_ = 0;
-}
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.h b/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.h
deleted file mode 100644
index 78b465f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/reech4x4.h
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
-// All rights reserved.
-//
-// This file is part of the ImageIO Library, and as been adapted for
-// CGAL (www.cgal.org).
-// You can redistribute it and/or  modify it under the terms of the
-// GNU Lesser General Public License as published by the Free Software Foundation;
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-//
-//
-// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
-
-/*************************************************************************
- * reech4x4.h -
- *
- * $Id$
- *
- * Copyright©INRIA 1999
- *
- * AUTHOR:
- * Gregoire Malandain (greg at sophia.inria.fr)
- * 
- * CREATION DATE: 
- *
- *
- * ADDITIONS, CHANGES
- *	
- *	
- *	
- *
- */
-
-
-/* CAUTION
-   DO NOT EDIT THIS FILE,
-   UNLESS YOU HAVE A VERY GOOD REASON 
- */
-
-#ifndef _reech4x4_h_
-#define _reech4x4_h_
-
-
-
-
-
-
-
-
-
-extern void Reech3DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech3DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech3DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-extern void Reech2DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech2DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech2DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-
-
-
-
-
-
-extern void Reech3DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech3DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech3DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-extern void Reech2DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech2DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech2DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-
-
-
-
-
-
-extern void Reech3DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech3DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech3DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-extern void Reech2DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech2DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech2DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-
-
-
-
-
-
-extern void Reech3DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech3DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech3DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-extern void Reech2DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech2DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech2DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-
-
-
-
-
-
-extern void Reech3DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech3DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech3DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-extern void Reech2DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim,  /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat   /* transformation matrix */
-			     );
-extern void Reech2DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
-			     int *theDim, /* dimensions of this buffer */
-			     void* resBuf, /* result buffer */
-			     int *resDim,  /* dimensions of this buffer */
-			     double* mat,   /* transformation matrix */
-			     float gain,
-			     float bias );
-extern void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
-			      int *theDim,  /* dimensions of this buffer */
-			      void* resBuf, /* result buffer */
-			      int *resDim,  /* dimensions of this buffer */
-			      double* mat   /* transformation matrix */
-			      );
-
-
-
-
-
-
-
-extern void Reech4x4_verbose ( );
-extern void Reech4x4_noverbose ( );
-
-
-#endif
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt b/3rdparty/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt
deleted file mode 100644
index ef24865..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-message("Configuring libCGAL_Qt3")
-
-# added as ometimes CMake will refuse to compile files 
-# that one would think it would automatically know what to do with (e.g. C files):
-ENABLE_LANGUAGE(C)
-# see also http://david-web.appspot.com/cnt/CMakeProblemsSolutions/
-
-find_package(OpenGL QUIET )
-find_package(Qt3-patched QUIET )
-# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
-# that it can be used together with FindQt4: all its variables are prefixed
-# by "QT3_" instead of "QT_".
-
-if( QT3_FOUND )
-
-  if( OPENGL_FOUND )
-
-    get_dependency_version(QT QT3)
-    
-    if(COMMAND add_config_flag)
-      set( CGAL_HAS_QT3 TRUE ) 
-      add_config_flag( CGAL_HAS_QT3 )
-    endif()
-    
-    message( STATUS "OpenGL include:     ${OPENGL_INCLUDE_DIR}" )
-    message( STATUS "OpenGL libraries:   ${OPENGL_LIBRARIES}" )
-    message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
-    message( STATUS "Qt3 include:        ${QT3_INCLUDE_DIR}" )
-    message( STATUS "Qt3 libraries:      ${QT3_LIBRARIES}" )
-    message( STATUS "Qt3 definitions:    ${QT3_DEFINITIONS}" )
-    message( STATUS "moc executable:     ${QT3_MOC_EXECUTABLE}" )
-    message( STATUS "uic executable:     ${QT3_UIC_EXECUTABLE}" )
-    
-    cache_set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS ${QT3_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
-    cache_set(CGAL_Qt3_3RD_PARTY_LIBRARIES    ${QT3_LIBRARIES}   ${OPENGL_LIBRARIES}   )
-    cache_set(CGAL_Qt3_3RD_PARTY_DEFINITIONS  ${QT3_DEFINITIONS} ${OPENGL_DEFINITIONS} )
-    
-    include(Qt3Macros-patched)
-
-    use_essential_libs()
-       
-    include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
-
-    link_directories   ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
-
-    # Make sure QT3_AUTOMOC compiler can find CGAL_Qt3 include files
-    include_directories( BEFORE ${CGAL_INCLUDE_DIRS} )
-       
-    # Make sure the compiler can find generated .moc files
-    include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-
-    # needed for dependency (collected in package-specific CMakeLists.${packagename}.qtmoc)
-    set(CGAL_Qt3_MOC_FILES "")  
-
-    foreach (package ${CGAL_CONFIGURED_PACKAGES} )
-      file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt3/*.qtmoc.cmake")
-      foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES})
-         # includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib)
-        include(${package_qtmoc_file}) 
-#        message(STATUS QTMOC------------FILE: ${package_qtmoc_file})      
-      endforeach()
-    endforeach()
-  
-#    message(STATUS QT3-mocfiles: ${CGAL_Qt3_MOC_FILES})
-
-    collect_cgal_library( CGAL_Qt3 "${CGAL_Qt3_MOC_FILES}")
-
-    foreach(mocfile ${CGAL_Qt3_MOC_FILES})
-      add_file_dependencies(${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp ${CMAKE_CURRENT_BINARY_DIR}/${mocfile})
-    endforeach()
-
-    add_dependencies( CGAL_Qt3 CGAL )
-
-    target_link_libraries( CGAL_Qt3 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt3_3RD_PARTY_LIBRARIES} )
-        
-    add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt3_3RD_PARTY_DEFINITIONS} )
-    
-    message("libCGAL_Qt3 is configured")
-
-
-  else()
-    message( STATUS "libCGAL_Qt3 needs OpenGL, cannot be configured.")
-  endif()  
-else()
-  message( STATUS "libCGAL_Qt3 needs Qt3, cannot be configured.")
-endif()
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_core.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_core.cpp
deleted file mode 100644
index 0170513..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_core.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kinetic/IO/internal/Qt_core.h>
-
-#include "Kinetic_Qt_core.moc"
-
-namespace CGAL { namespace Kinetic { namespace internal {
-
-Qt_core::Qt_core() {
-  //playable_=NULL;
-  mode_=STOP;
-}
-
-void Qt_core::play_button() {
-  CGAL_LOG(Log::SOME, "Play button pushed.\n");
-  mode_=RUN;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-
-void Qt_core::pause_button() {
-  CGAL_LOG(Log::SOME, "Pause button pushed.\n");
-  mode_=PAUSE;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-
-void Qt_core::stop_button() {
-  CGAL_LOG(Log::SOME, "Stop button pushed.\n");
-  mode_=STOP;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-
-void Qt_core::play_to_button() {
-  CGAL_LOG(Log::SOME, "Play_to button pushed.\n");
-  mode_=RUN_TO;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-
-void Qt_core::play_through_button() {
-  CGAL_LOG(Log::SOME, "Play through button pushed.\n");
-  mode_= RUN_THROUGH;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-void Qt_core::reverse_button() {
-  CGAL_LOG(Log::SOME, "Reverse button pushed.\n");
-  mode_=REVERSE;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-void Qt_core::faster_button() {
-  CGAL_LOG(Log::SOME, "Faster button pushed.\n");
-  mode_=FASTER;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-void Qt_core::slower_button() {
-  CGAL_LOG(Log::SOME, "Slower button pushed.\n");
-  mode_=SLOWER;
-  CGAL_KINETIC_NOTIFY(LAST_BUTTON_PRESSED);
-}
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_timer.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_timer.cpp
deleted file mode 100644
index 9405be4..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_timer.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/IO/internal/Qt_timer.h>
-
-#include "Kinetic_Qt_timer.moc"
-
-namespace CGAL { namespace Kinetic { namespace internal {
-
-Qt_timer::Qt_timer(): tick_(0), id_(-1) {
-  connect( &timer_, SIGNAL(timeout()),
-	   this, SLOT(timerDone()) );
-
-}
-
-void Qt_timer::run(double time_in_seconds) {
-  id_=timer_.start(static_cast<int>(time_in_seconds*1000), true);
-  //CGAL_postcondition(id_ != -1);
-}
-
-void Qt_timer::timerDone() {
-  ++tick_;
-  CGAL_KINETIC_NOTIFY(TICKS);
-  //cb_->new_notification(Listener::TICKS);
-}
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp
deleted file mode 100644
index f3c5630..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/basic.h>
-#include <CGAL/Kinetic/IO/internal/Qt_widget_2_core.h>
-
-#include "Kinetic_Qt_widget_2_core.moc"
-
-namespace CGAL { namespace Kinetic { namespace internal {
-void Qt_widget_2_core::redraw() {
-  lock();
-  clear();
-  //std::cout << "size of drawables = " << drawable_s.size() << std::endl;
-  is_drawn_=false;
-  CGAL_KINETIC_NOTIFY(PICTURE_IS_CURRENT);
-  //if (drawable_!= NULL) drawable_->new_notification(Listener::PICTURE_IS_CURRENT);
-  is_drawn_=true;
-  unlock();
-  //::CGAL::Qt_widget::redraw();
-}
-
-Qt_widget_2_core::Qt_widget_2_core(QMainWindow *parent): ::CGAL::Qt_widget(parent) {
-  //drawable_=NULL;
-  is_drawn_=false;
-}
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp
deleted file mode 100644
index 087ddc3..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kinetic/IO/internal/Qt_window_2.h>
-#include <CGAL/Kinetic/IO/internal/pixmaps.h>
-#include "Kinetic_Qt_window_2.moc"
-
-namespace CGAL { namespace Kinetic { namespace internal {
-        
-Qt_window_2::Qt_window_2(int xmin, int xmax, int ymin, int ymax) {
-  widget_= new Qt_widget_2_core(this);
-  setCentralWidget(widget_);
-  resize(800,800);
-  widget()->show();
-  widget()->set_window(xmin, xmax, ymin, ymax);
-
-  //How to attach the standard toolbar
-  _std_toolbar = new CGAL::Qt_widget_standard_toolbar(widget(), this, "toolbar");
-  this->addToolBar(_std_toolbar->toolbar(), Top, FALSE);
-
-  /*connect(_widget, SIGNAL(custom_redraw()),
-    this, SLOT(redraw_win()) );*/
-
-  new QToolButton(QPixmap( (const char**)play_xpm ),
-                  "Play",
-                  0,
-                  &core_,
-                  SLOT(play_button()),
-                  _std_toolbar,
-                  "Play");
-
-  new QToolButton(QPixmap( (const char**)pause_xpm ),
-                  "Pause",
-                  0,
-                  &core_,
-                  SLOT(pause_button()),
-                  _std_toolbar,
-                  "Pause");
-
-  new QToolButton(QPixmap( (const char**)stop_xpm ),
-                  "Stop",
-                  0,
-                  &core_,
-                  SLOT(stop_button()),
-                  _std_toolbar,
-                  "Stop");
-
-  new QToolButton(QPixmap( (const char**)play_to_xpm ),
-                  "Play to",
-                  0,
-                  &core_,
-                  SLOT(play_to_button()),
-                  _std_toolbar,
-                  "Play to");
-
-  new QToolButton(QPixmap( (const char**)play_through_xpm ),
-                  "Play through",
-                  0,
-                  &core_,
-                  SLOT(play_through_button()),
-                  _std_toolbar,
-                  "Play through");
-
-  new QToolButton(QPixmap( (const char**)reverse_xpm ),
-                  "Reverse",
-                  0,
-                  &core_,
-                  SLOT(reverse_button()),
-                  _std_toolbar,
-                  "Reverse");
- 
-  new QToolButton(QPixmap( (const char**)faster_xpm ),
-                  "Faster",
-                  0,
-                  &core_,
-                  SLOT(faster_button()),
-                  _std_toolbar,
-                  "Faster");
-  new QToolButton(QPixmap( (const char**)slower_xpm ),
-                  "Slower",
-                  0,
-                  &core_,
-                  SLOT(slower_button()),
-                  _std_toolbar,
-                  "Slower");
-
-  new QToolButton(QPixmap( (const char**)print_xpm ),
-                  "Print", 0,
-                  widget_,
-                  SLOT(print_to_ps()),
-                  _std_toolbar,
-                  "Print");
-
-
-}
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake
deleted file mode 100644
index 6c78df1..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-QT3_GENERATE_MOC(${package}/include/CGAL/Kinetic/IO/internal/Qt_core.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Kinetic_Qt_core.moc
-                )
-                          
-QT3_GENERATE_MOC(${package}/include/CGAL/Kinetic/IO/internal/Qt_timer.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Kinetic_Qt_timer.moc
-                )
-                        
-QT3_GENERATE_MOC(${package}/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Kinetic_Qt_widget_2_core.moc
-                )
- 
-QT3_GENERATE_MOC(${package}/include/CGAL/Kinetic/IO/internal/Qt_window_2.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Kinetic_Qt_window_2.moc
-                 )
-
-set(CGAL_Qt3_MOC_FILES ${CGAL_Qt3_MOC_FILES} Kinetic_Qt_core.moc Kinetic_Qt_timer.moc Kinetic_Qt_widget_2_core.moc Kinetic_Qt_window_2.moc)
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_faster.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_faster.xpm
deleted file mode 100644
index 8ff3240..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_faster.xpm
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * faster_xpm[] = {
-"27 27 10 1",
-" 	c None",
-".	c #CCCCCC",
-"+	c #4C4C4C",
-"@	c #B3B3B3",
-"#	c #1A1A1A",
-"$	c #000000",
-"%	c #666666",
-"&	c #808080",
-"*	c #333333",
-"=	c #999999",
-"                           ",
-"                           ",
-"                           ",
-"            .++.           ",
-"           @#$$#@          ",
-"          %$$$$$$%         ",
-"        .#$$$$$$$$#.       ",
-"       &$$$$$$$$$$$$&      ",
-"     .*$$$$$$$$$$$$$$*.    ",
-"    =#$$$$$$#==#$$$$$$#=   ",
-"    +$$$$$$*.  .*$$$$$$+   ",
-"     #$$$$%      %$$$$#    ",
-"     .$$#@        @#$$.    ",
-"      =+    .++.    +=     ",
-"           @#$$#@          ",
-"          %$$$$$$%         ",
-"        .#$$$$$$$$#.       ",
-"       &$$$$$$$$$$$$&      ",
-"     .*$$$$$$$$$$$$$$*.    ",
-"    =#$$$$$$#==#$$$$$$#=   ",
-"    +$$$$$$*.  .*$$$$$$+   ",
-"     #$$$$%      %$$$$#    ",
-"     .$$#@        @#$$.    ",
-"      =+            +=     ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pause.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pause.xpm
deleted file mode 100644
index 5e5ba31..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pause.xpm
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * pause_xpm[] = {
-"27 27 2 1",
-" 	c None",
-".	c #000000",
-"                           ",
-"                           ",
-"                           ",
-"                           ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"    ........   ........    ",
-"                           ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pixmaps.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pixmaps.cpp
deleted file mode 100644
index 2a00e7c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_pixmaps.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2005  Stanford University (USA).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/Kinetic/basic.h>
-#include <CGAL/Kinetic/IO/internal/pixmaps.h>
-
-namespace CGAL { namespace Kinetic { namespace internal {
-namespace pixmaps {
-#include "Kinetic_play.xpm"
-#include "Kinetic_pause.xpm"
-#include "Kinetic_stop.xpm"
-#include "Kinetic_play_to.xpm"
-#include "Kinetic_play_through.xpm"
-#include "Kinetic_reverse.xpm"
-#include "Kinetic_faster.xpm"
-#include "Kinetic_slower.xpm"
-#include "Kinetic_print.xpm"
-}
-const char ** play_xpm= pixmaps::play_xpm;
-const char ** faster_xpm= pixmaps::faster_xpm;
-const char ** play_through_xpm= pixmaps::play_through_xpm;
-const char ** slower_xpm= pixmaps::slower_xpm;
-const char ** pause_xpm= pixmaps::pause_xpm;
-const char ** play_to_xpm= pixmaps::play_to_xpm;
-const char ** reverse_xpm= pixmaps::reverse_xpm;
-const char ** stop_xpm= pixmaps::stop_xpm;
-const char ** print_xpm= pixmaps::print_xpm;
-
-} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play.xpm
deleted file mode 100644
index 39fe7a5..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play.xpm
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * play_xpm[] = {
-"27 27 9 1",
-" 	c None",
-".	c #333333",
-"+	c #B3B3B3",
-"@	c #000000",
-"#	c #999999",
-"$	c #1A1A1A",
-"%	c #808080",
-"&	c #CCCCCC",
-"*	c #666666",
-"                           ",
-"                           ",
-"                           ",
-"                           ",
-"    .+                     ",
-"    @@.#                   ",
-"    @@@@$%                 ",
-"    @@@@@@$%               ",
-"    @@@@@@@@$%&            ",
-"    @@@@@@@@@@@*&          ",
-"    @@@@@@@@@@@@@*&        ",
-"    @@@@@@@@@@@@@@@*+      ",
-"    @@@@@@@@@@@@@@@@@.+    ",
-"    @@@@@@@@@@@@@@@@@.+    ",
-"    @@@@@@@@@@@@@@@$+      ",
-"    @@@@@@@@@@@@@$%        ",
-"    @@@@@@@@@@@$%          ",
-"    @@@@@@@@@@%            ",
-"    @@@@@@@@*&             ",
-"    @@@@@@*&               ",
-"    @@@@*&                 ",
-"    @@.&                   ",
-"    .+                     ",
-"                           ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_through.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_through.xpm
deleted file mode 100644
index 8a37b28..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_through.xpm
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * play_through_xpm[] = {
-"27 27 10 1",
-" 	c None",
-".	c #4C4C4C",
-"+	c #000000",
-"@	c #CCCCCC",
-"#	c #1A1A1A",
-"$	c #999999",
-"%	c #A3A3A3",
-"&	c #141414",
-"*	c #040404",
-"=	c #C4C4C4",
-"                           ",
-"                           ",
-"                           ",
-"   .              +++++    ",
-"   +.@            +++++    ",
-"   ++#@           +++++    ",
-"   +++#$          +++++    ",
-"   +++++$         +++++    ",
-"   ++++++.        +++++    ",
-"   +++++++.@      +++++    ",
-"   ++++++++#@     +++++    ",
-"   +++++++++#%    +++++    ",
-"   ++++++++++&@   +++++    ",
-"   ++++++++++*=   +++++    ",
-"   ++++++++++$    +++++    ",
-"   +++++++++$     +++++    ",
-"   +++++++#$      +++++    ",
-"   ++++++#@       +++++    ",
-"   +++++#@        +++++    ",
-"   ++++#@         +++++    ",
-"   +++.@          +++++    ",
-"   ++.            +++++    ",
-"   +.             +++++    ",
-"   .              +++++    ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_to.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_to.xpm
deleted file mode 100644
index d1a1570..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_play_to.xpm
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-
-/* a c comment*/
-static const char * play_to_xpm[] = {
-"27 27 11 1",
-" 	c None",
-".	c #4C4C4C",
-"+	c #828282",
-"@	c #000000",
-"#	c #CCCCCC",
-"$	c #1A1A1A",
-"%	c #999999",
-"&	c #A3A3A3",
-"*	c #141414",
-"=	c #040404",
-"-	c #C4C4C4",
-"                           ",
-"                           ",
-"                           ",
-"   .              +++++    ",
-"   @.#            +++++    ",
-"   @@$#           +++++    ",
-"   @@@$%          +++++    ",
-"   @@@@@%         +++++    ",
-"   @@@@@@.        +++++    ",
-"   @@@@@@@.#      +++++    ",
-"   @@@@@@@@$#     +++++    ",
-"   @@@@@@@@@$&    +++++    ",
-"   @@@@@@@@@@*#   +++++    ",
-"   @@@@@@@@@@=-   +++++    ",
-"   @@@@@@@@@@%    +++++    ",
-"   @@@@@@@@@%     +++++    ",
-"   @@@@@@@$%      +++++    ",
-"   @@@@@@$#       +++++    ",
-"   @@@@@$#        +++++    ",
-"   @@@@$#         +++++    ",
-"   @@@.#          +++++    ",
-"   @@.            +++++    ",
-"   @.             +++++    ",
-"   .              +++++    ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_print.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_print.xpm
deleted file mode 100644
index f14314c..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_print.xpm
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Kinetic_data_structures/src/CGALQt/Kinetic_play.xpm $
- * $Id: Kinetic_play.xpm 28588 2006-02-16 20:53:46Z reichel $
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char *print_xpm[] = {
-"    16    14        6            1",
-". c #000000",
-"# c #848284",
-"a c #c6c3c6",
-"b c #ffff00",
-"c c #ffffff",
-"d c None",
-"ddddd.........dd",
-"dddd.cccccccc.dd",
-"dddd.c.....c.ddd",
-"ddd.cccccccc.ddd",
-"ddd.c.....c....d",
-"dd.cccccccc.a.a.",
-"d..........a.a..",
-".aaaaaaaaaa.a.a.",
-".............aa.",
-".aaaaaa###aa.a.d",
-".aaaaaabbbaa...d",
-".............a.d",
-"d.aaaaaaaaa.a.dd",
-"dd...........ddd"
-};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_reverse.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_reverse.xpm
deleted file mode 100644
index ea4c485..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_reverse.xpm
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * reverse_xpm[] = {
-"27 27 21 1",
-" 	c None",
-".	c #000000",
-"+	c #101010",
-"@	c #404040",
-"#	c #8A8A8A",
-"$	c #272727",
-"%	c #ADADAD",
-"&	c #9D9D9D",
-"*	c #060606",
-"=	c #C1C1C1",
-"-	c #454545",
-";	c #B1B1B1",
-">	c #C0C0C0",
-",	c #5A5A5A",
-"'	c #656565",
-")	c #2D2D2D",
-"!	c #0B0B0B",
-"~	c #4D4D4D",
-"{	c #CCCCCC",
-"]	c #1B1B1B",
-"^	c #999999",
-"                           ",
-"                           ",
-"                           ",
-"                           ",
-"     ...........+@#        ",
-"     ..............$%      ",
-"     ................&     ",
-"     ................*=    ",
-"     .................-    ",
-"     ..................;   ",
-"                >,.....'   ",
-"                  ,....)   ",
-"                  >....!   ",
-"                   .....   ",
-"                  >....!   ",
-"         ~        ,....)   ",
-"       {~.      >,.....'   ",
-"      {]...............;   ",
-"     ^]...............-    ",
-"    ^................*=    ",
-"    ^................&     ",
-"     ^]............$%      ",
-"      {]........+@#        ",
-"       {~.                 ",
-"         ~                 ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_slower.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_slower.xpm
deleted file mode 100644
index c322386..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_slower.xpm
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * slower_xpm[] = {
-"27 27 10 1",
-" 	c None",
-".	c #999999",
-"+	c #4C4C4C",
-"@	c #CCCCCC",
-"#	c #000000",
-"$	c #1A1A1A",
-"%	c #B3B3B3",
-"&	c #666666",
-"*	c #333333",
-"=	c #808080",
-"                           ",
-"                           ",
-"                           ",
-"     .+            +.      ",
-"    @##$%        %$##@     ",
-"    $####&      &####$     ",
-"   +######*@  @*######+    ",
-"   .$######$..$######$.    ",
-"    @*##############*@     ",
-"      =############=       ",
-"       @$########$@        ",
-"         &######&          ",
-"          %$##$%           ",
-"     .+    @++@    +.      ",
-"    @##$%        %$##@     ",
-"    $####&      &####$     ",
-"   +######*@  @*######+    ",
-"   .$######$..$######$.    ",
-"    @*##############*@     ",
-"      =############=       ",
-"       @$########$@        ",
-"         &######&          ",
-"          %$##$%           ",
-"           @++@            ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_stop.xpm b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_stop.xpm
deleted file mode 100644
index f1c1dfc..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Kinetic_stop.xpm
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2005,2006  Stanford University (USA).
- * All rights reserved.
- *
- * This file is part of CGAL (www.cgal.org); you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the License,
- * or (at your option) any later version.
- *
- * Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $URL$
- * $Id$
- *
- * Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
- */
-
-/* XPM */
-static const char * stop_xpm[] = {
-"27 27 2 1",
-" 	c None",
-".	c #000000",
-"                           ",
-"                           ",
-"                           ",
-"                           ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"    ...................    ",
-"                           ",
-"                           ",
-"                           ",
-"                           "};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Nef_S2.qtmoc.cmake b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Nef_S2.qtmoc.cmake
deleted file mode 100644
index 8ace4e8..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Nef_S2.qtmoc.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_OpenGL.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_OpenGL.moc
-                 )
-
-set(CGAL_Qt3_MOC_FILES ${CGAL_Qt3_MOC_FILES} Qt_widget_OpenGL.moc)
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_help_window.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_help_window.cpp
deleted file mode 100644
index da7db75..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_help_window.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/basic.h>
-
-#include <CGAL/IO/Qt_help_window.h>
-
-/* XPM */
-/* Drawn  by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static const char*backb[]={
-"16 16 5 1",
-"# c #000000",
-"a c #ffffff",
-"c c #808080",
-"b c #c0c0c0",
-". c None",
-"................",
-".......#........",
-"......##........",
-".....#a#........",
-"....#aa########.",
-"...#aabaaaaaaa#.",
-"..#aabbbbbbbbb#.",
-"...#abbbbbbbbb#.",
-"...c#ab########.",
-"....c#a#ccccccc.",
-".....c##c.......",
-"......c#c.......",
-".......cc.......",
-"........c.......",
-"................",
-"......................"};
-
-/* XPM */
-/* Drawn  by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static const char*forwardb[]={
-"16 16 5 1",
-"# c #000000",
-"a c #ffffff",
-"c c #808080",
-"b c #c0c0c0",
-". c None",
-"................",
-"................",
-".........#......",
-".........##.....",
-".........#a#....",
-"..########aa#...",
-"..#aaaaaaabaa#..",
-"..#bbbbbbbbbaa#.",
-"..#bbbbbbbbba#..",
-"..########ba#c..",
-"..ccccccc#a#c...",
-"........c##c....",
-"........c#c.....",
-"........cc......",
-"........c.......",
-"................",
-"................"};
-
-/* XPM */
-/* Drawn  by Mark Donohoe for the K Desktop Environment */
-/* See http://www.kde.org */
-static const char*homeb[]={
-"16 16 4 1",
-"# c #000000",
-"a c #ffffff",
-"b c #c0c0c0",
-". c None",
-"........... ....",
-"   ....##.......",
-"..#...####......",
-"..#..#aabb#.....",
-"..#.#aaaabb#....",
-"..##aaaaaabb#...",
-"..#aaaaaaaabb#..",
-".#aaaaaaaaabbb#.",
-"###aaaaaaaabb###",
-"..#aaaaaaaabb#..",
-"..#aaa###aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#aaa#.#aabb#..",
-"..#####.######..",
-"................"};
-
-namespace CGAL{
-
-Qt_help_window::Qt_help_window( const QString& home_, const QString& _path,
-			QWidget* parent, const char *name )
-  : QMainWindow( parent, name, WDestructiveClose ),
-            pathCombo( 0 )
-{
-  readHistory();
-  browser = new QTextBrowser( this );
-  browser->mimeSourceFactory()->setFilePath( _path );
-  //  browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
-  setCentralWidget( browser );
-  if ( !home_.isEmpty() )
-       browser->setSource( home_ );
-
-  connect( browser, SIGNAL( highlighted( const QString&) ),
-           statusBar(), SLOT( message( const QString&)) );
-
-  // The same three icons are used twice each.
-  QIconSet icon_back( QPixmap((const char**)backb) );
-  QIconSet icon_forward( QPixmap((const char**)forwardb) );
-  QIconSet icon_home( QPixmap((const char**)homeb) );
-
-
-  QPopupMenu* file = new QPopupMenu( this );
-  file->insertItem( "&Print", this, SLOT( print() ), CTRL+Key_P );
-  file->insertSeparator();
-  file->insertItem( "&Close", this, SLOT( close() ), CTRL+Key_Q );
-
-  QPopupMenu* go = new QPopupMenu( this );
-  backwardId = go->insertItem( icon_back,
-				 "&Backward", browser, SLOT( backward() ),
-				 CTRL+Key_Left );
-  forwardId = go->insertItem( icon_forward,
-				"&Forward", browser, SLOT( forward() ),
-				CTRL+Key_Right );
-  go->insertItem( icon_home, "&Home", browser, SLOT( home() ) );
-
-  menuBar()->insertItem("&File", file);
-  menuBar()->insertItem("&Go", go); 
-
-  QToolBar* toolbar = new QToolBar( "Toolbar", this, this);
-
-  QToolButton* button;
-
-
-  button = new QToolButton( icon_back, "Backward", "", 
-                            browser, SLOT(backward()), toolbar );
-  connect( browser, SIGNAL( backwardAvailable(bool) ), 
-           button, SLOT( setEnabled(bool) ) );
-  button->setEnabled( FALSE );
-  button = new QToolButton( icon_forward, "Forward", "", 
-                            browser, SLOT(forward()), toolbar );
-  connect( browser, SIGNAL( forwardAvailable(bool) ), 
-	   button, SLOT(setEnabled(bool) ) );
-  button->setEnabled( FALSE );
-  button = new QToolButton( icon_home, "Home", "", browser,
-			    SLOT(home()), toolbar );
-  toolbar->addSeparator();
-
-  pathCombo = new QComboBox( TRUE, toolbar );
-  connect( pathCombo, SIGNAL( activated( const QString & ) ),
-	     this, SLOT( pathSelected( const QString & ) ) );
-  toolbar->setStretchableWidget( pathCombo );
-  setRightJustification( TRUE );
-  pathCombo->insertItem( home_ );
-}
-
-Qt_help_window::~Qt_help_window(){}
-
-void Qt_help_window::setBackwardAvailable( bool b)
-{
-    menuBar()->setItemEnabled( backwardId, b);
-}
-
-void Qt_help_window::setForwardAvailable( bool b)
-{
-    menuBar()->setItemEnabled( forwardId, b);
-}
-
-
-
-void Qt_help_window::print()
-{
-#ifndef QT_NO_PRINTER
-    QPrinter printer;
-    printer.setFullPage(TRUE);
-    if ( printer.setup( this ) ) {
-	QPainter p( &printer );
-	QPaintDeviceMetrics metrics(p.device());
-	int dpix = metrics.logicalDpiX();
-	int dpiy = metrics.logicalDpiY();
-	const int margin = 72; // pt
-	QRect body(margin*dpix/72, margin*dpiy/72,
-		   metrics.width()-margin*dpix/72*2,
-		   metrics.height()-margin*dpiy/72*2 );
-	QSimpleRichText richText( browser->text(), QFont(), browser->context(), browser->styleSheet(),
-				  browser->mimeSourceFactory(), body.height() );
-	richText.setWidth( &p, body.width() );
-	QRect view( body );
-	int page = 1;
-	do {
-	    richText.draw( &p, body.left(), body.top(), view, colorGroup() );
-	    view.moveBy( 0, body.height() );
-	    p.translate( 0 , -body.height() );
-	    p.drawText( view.right() - p.fontMetrics().width( QString::number(page) ),
-			view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page) );
-	    if ( view.top()  >= richText.height() )
-		break;
-	    printer.newPage();
-	    page++;
-	} while (TRUE);
-    }
-    #endif
-}
-
-void Qt_help_window::pathSelected( const QString &_path )
-{
-    browser->setSource( _path );
-}
-void Qt_help_window::histChosen( int i )
-{
-  if ( mHistory.contains( i ) )
-    browser->setSource( mHistory[ i ] );
-}
-
-void Qt_help_window::readHistory()
-{
-    if ( QFile::exists( QDir::currentDirPath() + "/.history" ) ) {
-	QFile f( QDir::currentDirPath() + "/.history" );
-	f.open( IO_ReadOnly );
-	QDataStream s( &f );
-	s >> history;
-	f.close();
-	while ( history.count() > 20 )
-	    history.remove( history.begin() );
-    }
-}
-} //end CGAL namespace
-
-#include "Qt_help_window.moc"
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.cpp
deleted file mode 100644
index 93ebc2d..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.cpp
+++ /dev/null
@@ -1,571 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau and Radu Ursu
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/Bbox_2.h>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_layer.h>
-
-namespace CGAL {
-
-Qt_widget::Qt_widget(QWidget *parent, const char *name) :
-  QWidget(parent, name), set_scales_to_be_done(false), Locked(0),
-  _pointSize(4), _pointStyle(DISC) 
-{ 
-  setCaption("CGAL::Qt_widget");
-
-  // initialize ranges and scales
-  xmin_old = xmin = -1;
-  xmax_old = xmax = 1;
-  ymin_old = ymin = -1;
-  ymax_old = ymax = 1;
-  constranges=false;
-  set_scales();
-  emit(rangesChanged());
-
-  // initialize the pixmap and the painter
-  painter = new QPainter;
-  printer = new QPrinter;
-  pixmap = new QPixmap;
-  matrix = new QWMatrix;
-
-  pixmap->resize(size());
-  painter->begin(pixmap);
-  painter->setWorldMatrix(*matrix);
-
-  // set properties
-  painter->setRasterOp(CopyROP);
-  setBackgroundColor(Qt::white);
-  painter->setPen(QPen(Qt::black,2));
-
-  clear();
-}
-
-void Qt_widget::set_scales()
-{
-  if( ! isVisible() )
-    {
-      set_scales_to_be_done = true;
-      return;
-    };
-  set_scales_to_be_done = false;
-
-  if(!constranges)
-    {
-      xscal = yscal = min( width() / (xmax - xmin),
-			   height() / (ymax - ymin) );
-      double xcenter = xmin + (xmax - xmin) / 2;
-      double ycenter = ymin + (ymax - ymin) / 2;
-
-      if(xscal<1) {
-        // if xscal < 1, width()/xscal > width(). then we can round it 
-        // with loosing precision.
-	      xmin = xcenter - (int)(width()/xscal)/2;
-	      xmax = xcenter + (int)(width()/xscal)/2;
-	      ymin = ycenter - (int)(height()/yscal)/2;
-	      ymax = ycenter + (int)(height()/yscal)/2;
-      } else {
-	      xmin = xcenter - (width()/xscal)/2;
-	      xmax = xcenter + (width()/xscal)/2;
-	      ymin = ycenter - (height()/yscal)/2;
-	      ymax = ycenter + (height()/yscal)/2;
-      }
-    }
-    else
-    {
-      xscal=width()/(xmax-xmin);
-      yscal=height()/(ymax-ymin);
-    }
-}
-
-void Qt_widget::move_center(const double distx, const double disty)
-{
-  xmin += distx; xmin_old += distx;
-  xmax += distx; xmax_old += distx;
-  ymin += disty; ymin_old += disty;
-  ymax += disty; ymax_old += disty;
-  redraw();
-  emit(rangesChanged());
-}
-void Qt_widget::set_center(const double x, const double y)
-{
-  if (set_scales_to_be_done) return;
-
-  if(xscal<1) {
-    xmin = x - (int)(width()/xscal)/2;
-    xmax = x + (int)(width()/xscal)/2;
-    ymin = y - (int)(height()/yscal)/2;
-    ymax = y + (int)(height()/yscal)/2;
-  } else {
-    xmin = x - (width()/xscal)/2;
-    xmax = x + (width()/xscal)/2;
-    ymin = y - (height()/yscal)/2;
-    ymax = y + (height()/yscal)/2;
-  }
-  xmin_old = xmin;
-  xmax_old = xmax;
-  ymin_old = ymin;
-  ymax_old = ymax;  
-  redraw();
-  emit(rangesChanged());
-}
-
-void Qt_widget::resize_pixmap()
-{
-  // save paint state
-  QFont f=painter->font();
-  QBrush b=painter->brush();
-  QPen p=painter->pen();
-  QColor bc=painter->backgroundColor();
-  QWMatrix bm = painter->worldMatrix();
-
-  painter->end();  // end painting on pixmap
-  pixmap->resize(size());
-  painter->begin(pixmap); // begin again painting on pixmap
-  clear();
-
-  // restore paint state
-  painter->setFont(f);
-  painter->setBrush(b);
-  painter->setPen(p);
-  painter->setBackgroundColor(bc);
-  painter->setWorldMatrix(bm);
-}
-
-void Qt_widget::resizeEvent(QResizeEvent*)
-{
-  resize_pixmap();
-  xmin = xmin_old;
-  xmax = xmax_old;
-  ymin = ymin_old;
-  ymax = ymax_old;
-  set_scales();
-  redraw();
-}
-
-void Qt_widget::showEvent(QShowEvent* e)
-{
-  if( set_scales_to_be_done )
-    set_scales();
-
-  return QWidget::showEvent(e);
-}
-
-void Qt_widget::paintEvent(QPaintEvent*)
-{
-  // save paint state
-  QFont f=painter->font();
-  QBrush b=painter->brush();
-  QPen p=painter->pen();
-  QColor bc=painter->backgroundColor();
-  QWMatrix bm = painter->worldMatrix();
-
-  painter->end();  // end painting on pixmap
-  bitBlt(this, 0, 0, pixmap); // copy pixmap to the Qt_widget
-  painter->begin(pixmap); // begin again painting on pixmap
-  painter->setWorldMatrix(bm);
-
-  // restore paint state
-  painter->setFont(f);
-  painter->setBrush(b);
-  painter->setPen(p);
-  painter->setBackgroundColor(bc);
-}
-
-void Qt_widget::mousePressEvent(QMouseEvent *e)
-{
-  emit(s_mousePressEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mousePressEvent(e);
-  } 
-  if(is_standard_active()){
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mousePressEvent(e);
-  }
-}
-
-void Qt_widget::mouseReleaseEvent(QMouseEvent *e)
-{
-  emit(s_mouseReleaseEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseReleaseEvent(e);
-  }
-  if(is_standard_active()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseReleaseEvent(e);
-  }
-}
-
-void Qt_widget::mouseMoveEvent(QMouseEvent *e)
-{
-  emit(s_mouseMoveEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseMoveEvent(e);
-  }
-  if(is_standard_active()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseMoveEvent(e);
-  }
-}
-
-void Qt_widget::wheelEvent(QWheelEvent *e)
-{
-  emit(s_wheelEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->wheelEvent(e);
-  }
-  if(is_standard_active()){
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->wheelEvent(e);
-  }
-}
-
-void Qt_widget::mouseDoubleClickEvent(QMouseEvent *e)
-{
-  emit(s_mouseDoubleClickEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseDoubleClickEvent(e);
-  }
-  if(is_standard_active()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->mouseDoubleClickEvent(e);
-  }
-}
-
-void Qt_widget::keyPressEvent(QKeyEvent *e)
-{
-  emit(s_keyPressEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->keyPressEvent(e);
-  }
-  if(is_standard_active()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->keyPressEvent(e);
-  }
-}
-
-void Qt_widget::keyReleaseEvent(QKeyEvent *e)
-{
-  emit(s_keyReleaseEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->keyReleaseEvent(e);
-  }
-  if(is_standard_active()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->keyReleaseEvent(e);
-  }
-}
-
-void Qt_widget::enterEvent(QEvent *e)
-{
-  emit(s_enterEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->enterEvent(e);
-  }
-  if(is_standard_active()){
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->enterEvent(e);
-  }
-}
-
-void Qt_widget::leaveEvent(QEvent *e)
-{
-  emit(s_leaveEvent(e));
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->leaveEvent(e);
-  }
-  if(is_standard_active()){
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->leaveEvent(e);
-  }
-}
-
-bool Qt_widget::event(QEvent *e)
-{
-  emit(s_event(e));
-  QWidget::event(e);
-  if(!does_standard_eat_events()) {
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->event(e);
-  }
-  if(is_standard_active()){
-    std::list<Qt_widget_layer*>::iterator it;
-    for(it = qt_standard_layers.begin();
-    it!= qt_standard_layers.end(); it++)
-      if((*it)->is_active())
-        (*it)->event(e);
-  }
-  return true;
-}
-
-void Qt_widget::set_window(const double x_min, const double x_max,
-			   const double y_min, const double y_max,
-			   bool const_ranges)
-{
-  xmin_old = xmin = x_min;
-  xmax_old = xmax = x_max;
-  ymin_old = ymin = y_min;
-  ymax_old = ymax = y_max;
-  constranges = const_ranges;
-  set_scales();
-  redraw();
-  emit(rangesChanged());
-}
-
-
-void Qt_widget::zoom(double ratio, double xc, double yc)
-{  
-  xscal = xscal*ratio; yscal = yscal*ratio;
-  set_center(xc, yc);
-}
-
-void Qt_widget::zoom(double ratio)
-{
-  zoom(ratio,
-       xmin + (xmax - xmin) / 2 ,
-       ymin + (ymax - ymin) / 2 );
-}
-
-double Qt_widget::x_real(int x) const
-{
-  if(xscal<1)
-    return(xmin+(int)(x/xscal));
-  else
-    return (xmin+x/xscal);
-}
-
-double Qt_widget::y_real(int y) const
-{
-    if(yscal<1)
-      return(ymax-(int)(y/yscal));
-    else
-      return (ymax-y/yscal);
-}
-
-
-
-double Qt_widget::x_real_dist(double d) const
-{
-  return(d/xscal);
-}
-
-double Qt_widget::y_real_dist(double d) const
-{
-  return(d/yscal);
-}
-
-int Qt_widget::x_pixel(double x) const
-{
-  return( static_cast<int>((x-xmin)*xscal) );
-}
-
-int Qt_widget::y_pixel(double y) const
-{
-  return( - static_cast<int>((y-ymax)*yscal) );
-}
-
-int Qt_widget::x_pixel_dist(double d) const
-{
-  if (d>0)
-    return( static_cast<int>(d*xscal) );
-  else
-    return( static_cast<int>(d*xscal) );
-}
-
-int Qt_widget::y_pixel_dist(double d) const
-{
-  if (d>0)
-    return( static_cast<int>(d*yscal) );
-  else
-    return( static_cast<int>(d*yscal) );
-}
-
-Qt_widget& Qt_widget::operator<<(const Color& c)
-{
-  setColor(CGAL2Qt_Color(c));
-  return *this;
-}
-
-Qt_widget& Qt_widget::operator<<(const PointStyle& ps)
-{
-  setPointStyle(ps);
-  return *this;
-}
-	
-void Qt_widget::clear() {
-  painter->eraseRect(rect());
-}
-
-  Qt_widget& operator<<(Qt_widget& w, const Bbox_2& r)
-  {
-    int
-      xmin = w.x_pixel(r.xmin()),
-      ymin = w.y_pixel(r.ymin()),
-      xmax = w.x_pixel(r.xmax()),
-      ymax = w.y_pixel(r.ymax());
-
-    w.get_painter().drawWinFocusRect(xmin, ymin, xmax-xmin, ymax-ymin);
-    w.do_paint();
-    return w;
-  }
-
-  void Qt_widget::attach(Qt_widget_layer *layer) {
-    qt_layers.push_back(layer);
-    layer->attach(this);
-    layer->activate();
-  }
-
-  void Qt_widget::attach_standard(Qt_widget_layer *layer) {
-    qt_standard_layers.push_back(layer);
-    layer->attach(this);
-    layer->activate();
-    layer->does_eat_events = true;
-  }
-
-  bool Qt_widget::is_standard_active() {
-    std::list<Qt_widget_layer*>::iterator it;
-      for(it = qt_standard_layers.begin();
-        it!= qt_standard_layers.end(); it++)
-		  if((*it)->is_active())
-        return true;
-    return false;
-  }
-  
-  bool Qt_widget::does_standard_eat_events() {
-    std::list<Qt_widget_layer*>::iterator it;
-      for(it = qt_standard_layers.begin();
-        it!= qt_standard_layers.end(); it++)
-	  if((*it)->is_active())
-	    if((*it)->does_eat_events == true)
-              return true;
-    return false;
-  }
-
-  void Qt_widget::print_to_ps(){
-    if(printer->setup(this)){
-      QPainter *ptemp = new QPainter();
-      ptemp = painter;
-      QPainter *painter_for_printer = new QPainter(printer);
-      painter = painter_for_printer;
-      painter->setClipping(true);
-      painter->setClipRect(rect());
-      lock();
-        emit(redraw_on_back());
-        std::list<Qt_widget_layer*>::iterator it;
-		    for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-		      if((*it)->is_active())
-			      (*it)->draw();
-        emit(custom_redraw()); //deprecated, should use the following:
-	emit(redraw_on_front());
-      unlock();
-      delete painter;
-      painter = ptemp;
-    }
-  }
-
-  void Qt_widget::redraw()
-  {
-    if(isVisible())
-    {
-      clear();
-      lock();
-        emit(redraw_on_back());
-        std::list<Qt_widget_layer*>::iterator it;
-          for(it = qt_layers.begin(); it!= qt_layers.end(); it++)
-            if((*it)->is_active())
-              (*it)->draw();
-        for(it = qt_standard_layers.begin();
-            it!= qt_standard_layers.end(); it++)
-          if((*it)->is_active())
-            (*it)->draw();
-        emit(custom_redraw()); //deprecated, should use the following:
-        emit(redraw_on_front());
-      unlock();
-    }
-  }
-  
-  void Qt_widget::detach(Qt_widget_layer* s)
-  {
-    qt_layers.erase(std::find(qt_layers.begin(),qt_layers.end(),s));
-  }
-
-} // namespace CGAL
-
-// moc_source_file: ../../include/CGAL/IO/Qt_widget.h
-#include "Qt_widget.moc"
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.qtmoc.cmake b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.qtmoc.cmake
deleted file mode 100644
index 0c48479..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget.qtmoc.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget.moc
-                 )
-
-
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_layer.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_layer.moc
-                 )
-
-
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_standard_toolbar.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_standard_toolbar.moc
-                 )
-
-
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_help_window.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_help_window.moc
-                 )
-
-
-QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_history.h
-                 ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_history.moc
-                 )
-
-set(CGAL_Qt3_MOC_FILES ${CGAL_Qt3_MOC_FILES} Qt_widget.moc Qt_widget_layer.moc Qt_widget_standard_toolbar.moc Qt_help_window.moc Qt_widget_history.moc)
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_OpenGL.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_OpenGL.cpp
deleted file mode 100644
index 1d8dc22..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_OpenGL.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-// Copyright (c) 1999  Max-Planck-Institute Saarbruecken (Germany).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Michael Seel       <seel at mpi-sb.mpg.de>
-//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
-
-#include <CGAL/basic.h>
-
-#include <CGAL/IO/Qt_widget_OpenGL.h>
-#include <cmath>
-
-namespace CGAL {
-
-Qt_widget_OpenGL::Qt_widget_OpenGL(int width, int height, double scale) :
-  window_width(width),
-  window_height(height),
-  motion_mode(ROTATE),
-  dx(0),
-  dy(0),
-  dz(0),
-  s(scale),
-  init_s(scale),
-  rotation(CGAL::IDENTITY){}
-  
-CGAL::OGL::OGL_base_object::Affine_3
-Qt_widget_OpenGL::virtual_sphere_transformation( double old_x, double old_y, 
-						 double new_x, double new_y) {
-
-  if ( old_x == new_x && old_y == new_y)// zero rotation.
-	return Affine_3( CGAL::IDENTITY);
-    // Determine the projected vectors on the `sphere'.
-    double dd = old_x * old_x + old_y * old_y;
-    Double_vector v_old( old_x, old_y, 
-                         ((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd)));
-    dd = new_x * new_x + new_y * new_y;
-    Double_vector v_new( new_x, new_y, 
-                         ((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd)));
-    Double_vector axis  = cross_product( v_old, v_new);
-    double angle = 0.0;
-    double norm = std::sqrt( (v_old*v_old)*(v_new*v_new));
-    if ( norm != 0) {
-        double x = v_old*v_new/ norm;
-        if ( x <= -1)
-        angle = CGAL_PI;
-        if ( x < 1)
-            angle = std::acos(x);
-    }
-    double len = std::sqrt( double(axis * axis));
-    double s   = std::sin( angle / 2.0) / len;
-    double q1 = axis.x() * s; // quaternion
-    double q2 = axis.y() * s;
-    double q3 = axis.z() * s;
-    double q0 = std::cos( angle / 2.0);
-    double a   = q1 * q2;
-    double b   = q0 * q3;
-    double c   = q1 * q3;
-    double d   = q0 * q2;
-    double e   = q2 * q3;
-    double f   = q0 * q1;
-    double qq0 = q0 * q0;
-    double qq1 = q1 * q1;
-    double qq2 = q2 * q2;
-    double qq3 = q3 * q3;
-    return Affine_3( qq0 + qq1 - qq2 - qq3, 2 * (a-b), 2 * (c+d),
-		     2 * (a+b), qq0 - qq1 + qq2 - qq3, 2 * (e-f),
-		     2 * (c-d), 2 * (e+f), qq0 - qq1 - qq2 + qq3);
-}
-
-void Qt_widget_OpenGL::mouseMoveEvent(QMouseEvent* event) {
-  int x = event->x();
-  int y = event->y();
-  switch ( interaction) {
-  case SCALE:
-    s *= std::exp( (x - mouse_x + mouse_y -y) * factor_s );
-    break;
-  case ROTATE: {
-    double old_x =   1.2 * (mouse_x -  window_width/2) / window_radius;
-    double old_y = - 1.2 * (mouse_y - window_height/2) / window_radius;
-    double new_x =   1.2 * (x -  window_width/2) / window_radius;
-    double new_y = - 1.2 * (y - window_height/2) / window_radius;
-    rotation =  virtual_sphere_transformation( old_x, old_y, new_x, new_y)
-      * rotation;
-  }
-    break;
-  case TRANSLATE:
-    dx += (x - mouse_x) * 2.0 / window_radius;
-    dy -= (y - mouse_y) * 2.0 / window_radius;
-    break;
-  case TRANS_Z:
-    dz += (x - mouse_x + mouse_y -y) * 2.0 / window_radius;
-    break;
-  default:
-    break;
-  }
-  mouse_x = x;
-  mouse_y = y;
-
-  updateGL();
-}
-
-void Qt_widget_OpenGL::mousePressEvent(QMouseEvent* event) {
-  mouse_x = event->x();
-  mouse_y = event->y();
-  interaction = 0;
-  if (event->stateAfter() & QMouseEvent::LeftButton) {
-    if (event->stateAfter() & QMouseEvent::ShiftButton)
-      interaction = SCALE;
-    else
-      interaction = motion_mode;
-  }
-  if(event->stateAfter() & QMouseEvent::MidButton) {
-    if (event->stateAfter() & QMouseEvent::ShiftButton)
-      interaction = TRANS_Z;
-    else
-      interaction = TRANSLATE;
-  }
-  if(event->stateAfter() & QMouseEvent::RightButton)
-    main->exec(QPoint(event->globalX(),event->globalY()));
-}
-
-void Qt_widget_OpenGL::mouseReleaseEvent(QMouseEvent* event) {
-  mousePressEvent(event);
-}
-
-void Qt_widget_OpenGL::paintGL() {
-  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-  glPushMatrix();
-  glTranslated(dx,dy,dz);
-  //  glTranslated(0,0,1);
-  GLdouble M[16] = { rotation.m(0,0), rotation.m(1,0), rotation.m(2,0), 0.0,
-                     rotation.m(0,1), rotation.m(1,1), rotation.m(2,1), 0.0,
-                     rotation.m(0,2), rotation.m(1,2), rotation.m(2,2), 0.0,
-                     rotation.m(0,3), rotation.m(1,3), rotation.m(2,3), 1.0};
-  glMultMatrixd( M);
-  glScaled(s,s,s);
-  object_->draw();
-  glPopMatrix();
-}
-
-void Qt_widget_OpenGL::initializeGL() {
-  GLfloat mat_diffuse[4] = { 0.7f, 0.7f, 0.7f, 1.0f };
-  GLfloat mat_specular[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
-  GLfloat mat_shininess[] = { 100.0f };
-  GLfloat ambient_light[] = { 0.2f, 0.2f, 0.2f, 1.0f };
-  
-  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient_light);
-  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse );
-  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular );
-  glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess );
-#ifdef SCREENSHOTS
-  GLfloat mat_emission[] = { 0.1, 0.1, 0.2, 0.0 };
-  glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission);
-  //for screenshots enable this section
-#endif
-
-  GLfloat light0[4] = { 4.0, 4.0, 10.0, 1.0 };
-  glLightfv (GL_LIGHT0, GL_POSITION, light0);
-  glEnable (GL_LIGHT0);
- 
-  glEnable(GL_DEPTH_TEST);
-  glEnable(GL_AUTO_NORMAL);
-  glEnable(GL_NORMALIZE);
-}
-
-void Qt_widget_OpenGL::resizeGL(int width, int height) {
-  window_width = width;
-  window_height = height;
-  window_radius = (std::min)( width, height) / 2;
-
-  glViewport(0, 0, (GLint)width, (GLint)height);
-  glMatrixMode(GL_PROJECTION);
-  glLoadIdentity();
-
-  if (width>height)
-    {
-      long double w = (long double) width / (long double) height;
-      glOrtho( -2*w, 2*w, -w, w, -4.0, 4.0 );
-      factor_d =  2.0   / (height/2.0);           
-      // halbe Fensterhoehe soll 2 LE entsprechen
-      factor_w = 90.0   / (height/2.0);           
-      // halbe Fensterhoehe soll 90 Grad entsprechen
-      factor_s = std::log(4.0) / (height/2.0);           
-      // halbe Fensterhoehe soll Faktor 4 entsprechen
-    }  
-  else
-    {
-      long double h = (long double) height / (long double) width;
-      glOrtho( -2.0, 2.0, -2*h, 2*h, -4.0, 4.0 );
-      factor_d =  2.0   / (width/2.0);            
-      // halbe Fensterbreite soll 2 LE entsprechen
-      factor_w = 90.0   / (width/2.0);            
-      // halbe Fensterbreite soll 90 Grad entsprechen
-      factor_s = std::log(4.0) / (height/2.0);           
-      // halbe Fensterhoehe soll Faktor 4 entsprechen
-    }
-
-  glMatrixMode(GL_MODELVIEW);
-  glLoadIdentity();
-}
-
-void Qt_widget_OpenGL::slotControlMenu(int index) {
-  if(index == RESET_CONTROL) {
-    dx = dy = dz = 0.0;
-    s = init_s;
-    rotation = Affine_3(CGAL::IDENTITY);
-    motion_mode = ROTATE;
-    object_->init();
-    updateGL();
-  } else 
-    motion_mode = index;
-}
-
-void Qt_widget_OpenGL::slotRenderMenu(int index) {
-  object_->set_style(index);
-  updateGL();
-}
-
-void Qt_widget_OpenGL::slotOptionsMenu(int index) {
-  object_->toggle(index);
-  updateGL();
-}
-
-void Qt_widget_OpenGL::slotFullscreen() {
-  if(fullscreen) {
-    showNormal();
-  } else {
-    showMaximized();
-  }
-  fullscreen = !fullscreen;
-}
-
-void Qt_widget_OpenGL::slotPerspective() {
-  perspective = !perspective;
-}
-
-} // namespace CGAL
-#include "Qt_widget_OpenGL.moc"
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_history.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_history.cpp
deleted file mode 100644
index 471c8e8..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_history.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu and Laurent Rineau
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/IO/Qt_widget_history.h>
-
-namespace CGAL {
-
-Qt_widget_history::Qt_widget_history(Qt_widget* parent, const char* name):
-  QObject(parent, name), widget(parent)
-{
-  it = history_list.begin();
-
-  connect(widget, SIGNAL(rangesChanged()),
-	  this, SLOT(save()));
-  
-  // backward compatibility with CGAL-2.4
-  connect(parent, SIGNAL(internal_back()),
-	  this, SLOT(backward()));
-  connect(parent, SIGNAL(internal_forth()),
-	  this, SLOT(forward()));
-  connect(parent, SIGNAL(internal_add_to_history()),
-	  this, SLOT(save()));
-  connect(parent, SIGNAL(internal_clear_history()),
-	  this, SLOT(clear()));
-}
-
-void Qt_widget_history::backward()
-{
-  if( (! history_list.empty()) && it!=history_list.begin() )
-    {
-      it--;
-      restore();
-    }
-  emit forwardAvaillable(true);
-  if(it == history_list.begin())
-    emit backwardAvaillable(false);
-}
-
-void Qt_widget_history::forward()
-{
-  if( it != history_list.end() ) 
-  {
-    if( ++it != history_list.end() )
-      restore();
-    else 
-      --it;
-  }
-  emit backwardAvaillable(true);
-  if(it == --history_list.end())
-    emit forwardAvaillable(false);
-}
-
-void Qt_widget_history::save()
-{
-  if( it != history_list.end() )
-  {
-    ++it;
-    history_list.erase(it, history_list.end());
-  }
-  
-  History_atom* atom = new History_atom();
-  atom->save(*widget);
-  history_list.push_back(atom);
-  
-  it = history_list.end();
-  it--;
-
-  if( it != history_list.begin() )
-    emit backwardAvaillable(true);
-  emit forwardAvaillable(false);
-}
-
-} // end namespace
-#include "Qt_widget_history.moc"
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_layer.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_layer.cpp
deleted file mode 100644
index d2e718f..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_layer.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau and Radu Ursu
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/IO/Qt_widget_layer.h>
-
-namespace CGAL {
-  void	Qt_widget_layer::attach(Qt_widget *w) {
-    widget=w;
-    if(activate())
-      emit(activated(this));
-  }
-  void Qt_widget_layer::stateChanged(int i){
-    if(i==2)
-      activate();
-    else if(i == 0)
-      deactivate();
-  }
-
-  void Qt_widget_layer::toggle(bool b) {
-    if(b)
-      activate();
-    else
-      deactivate();
-  }
-
-  bool Qt_widget_layer::activate(){
-    if(active)
-      return false;
-    else {
-      active = true;
-      activating();
-      emit(activated(this));
-      return true;
-    }
-  }
-  bool Qt_widget_layer::deactivate(){
-    if(!active)
-      return false;
-    else {
-      active = false;
-      deactivating();
-      emit(deactivated(this));
-      return true;
-    }
-      
-  }
-} // namespace CGAL
-
-#include "Qt_widget_layer.moc"
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp
deleted file mode 100644
index 218f636..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu
-
-#include <CGAL/basic.h>
-
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_standard_toolbar.h>
-
-// icons
-#include <CGAL/IO/pixmaps/zoom_in_rect.xpm>
-#include <CGAL/IO/pixmaps/zoom_out.xpm>
-#include <CGAL/IO/pixmaps/zoom_in.xpm>
-#include <CGAL/IO/pixmaps/focus.xpm>
-#include <CGAL/IO/pixmaps/arrow.xpm>
-#include <CGAL/IO/pixmaps/back.xpm>
-#include <CGAL/IO/pixmaps/forward.xpm>
-#include <CGAL/IO/pixmaps/mouse_coord.xpm>
-
-#include <qbuttongroup.h>
-#include <qiconset.h>
-#include <qmainwindow.h>
-#include <qtoolbutton.h>
-#include <qstring.h>
-#include <qvariant.h>
-
-#include <CGAL/IO/Qt_widget.h>
-#include <CGAL/IO/Qt_widget_history.h>
-#include <CGAL/IO/Qt_widget_focus.h>
-#include <CGAL/IO/Qt_widget_zoomrect.h>
-#include <CGAL/IO/Qt_widget_handtool.h>
-#include <CGAL/IO/Qt_widget_show_mouse_coordinates.h>
-
-namespace CGAL {
-  Qt_widget_standard_toolbar::
-  Qt_widget_standard_toolbar(Qt_widget *w, QMainWindow *parent,
-			     const char* name) :
-    QToolBar(parent, name),
-    widget(w)
-  {
-    setLabel("Qt_widget standard toolbar");
-    fill_toolbar(parent);
-  }
-  
-  Qt_widget_standard_toolbar::
-  Qt_widget_standard_toolbar(Qt_widget *w, QMainWindow *mw,
-			     QWidget* parent,
-			     bool newLine,
-			     const char* name) :
-    QToolBar("Qt_widget standard toolbar", mw, parent, newLine, name),
-    widget(w)
-  {
-    fill_toolbar(mw);
-  }
-  
-  void Qt_widget_standard_toolbar::fill_toolbar(QMainWindow *mw)
-  {
-    Qt_widget_focus* focuslayer = 
-      new Qt_widget_focus(this, "focuslayer");
-    Qt_widget_zoomrect* zoomrectlayer = 
-      new Qt_widget_zoomrect(this, "zoomrectlayer");
-    Qt_widget_handtool* handtoollayer = 
-      new Qt_widget_handtool(this, "handtoollayer");
-    Qt_widget_show_mouse_coordinates* showcoordlayer = 0; // created below
-
-    widget->attach_standard(focuslayer);
-    widget->attach_standard(zoomrectlayer);
-    widget->attach_standard(handtoollayer);
-    focuslayer->deactivate();
-    zoomrectlayer->deactivate();
-    handtoollayer->deactivate();
-
-    if (mw)
-      {
-	mw->statusBar();
-	showcoordlayer = 
-	  new Qt_widget_show_mouse_coordinates(*mw, this,
-					       "showcoordlayer");
-	widget->attach_standard(showcoordlayer);
-	showcoordlayer->does_eat_events = false;
-	widget->setMouseTracking(true);
-      }
-
-    const QPixmap p1(arrow_small_xpm), p2(arrow_xpm);
-    const QIconSet arrow_pixmap(p1, p2);
-
-    const QPixmap p3(back_small_xpm), p4(back_xpm);
-    const QIconSet back_pixmap(p3, p4);
-
-    const QPixmap p5(forward_small_xpm), p6(forward_xpm);
-    const QIconSet forward_pixmap(p5, p6);
-
-    QToolButton* backBt = new QToolButton(this, "History Back");
-    backBt->setIconSet(back_pixmap);
-    backBt->setTextLabel("History Back");
-
-    QToolButton* forwardBt = new QToolButton(this, "History Forward");
-    forwardBt->setIconSet(forward_pixmap);
-    forwardBt->setTextLabel("History Forward");
-  
-    addSeparator();
-
-    QToolButton* zoominBt =
-      new QToolButton(QPixmap(zoomin_xpm ),
-			       "Zoom in", 
-			       0, 
-			       this, 
-			       SLOT(zoomin()), 
-			       this, 
-			       "Zoom in");
-    zoominBt->setTextLabel("Scaling factor X2");
-
-    QToolButton* zoomoutBt = 
-      new QToolButton(QPixmap(zoomout_xpm ),
-				"Zoom out", 
-				0, 
-				this, 
-				SLOT(zoomout()), 
-				this, 
-				"Zoom out");
-    zoomoutBt->setTextLabel("Scaling factor 1/2");
-
-    addSeparator();
-
-    nolayerBt = new QToolButton(this, "nolayer");
-    nolayerBt->setIconSet(arrow_pixmap);
-    nolayerBt->setTextLabel("Deactivate Standard Layer");
-
-    QToolButton* zoomrectBt = new QToolButton(this, "focus on region");
-    zoomrectBt->setPixmap(QPixmap(zoomin_rect_xpm ));
-    zoomrectBt->setTextLabel("Focus on region");
-
-    QToolButton* focusBt = new QToolButton(this, "focus");
-    focusBt->setPixmap(QPixmap(focus_xpm ));
-    focusBt->setTextLabel("Focus on point");
-
-    QToolButton* handtoolBt = new QToolButton(this, "handtool");
-    handtoolBt->setPixmap(QPixmap(hand_xpm ));
-    handtoolBt->setTextLabel("Pan tool");
-
-    addSeparator();
-
-    QToolButton* showcoordBt = new QToolButton(this, "mouse");
-    showcoordBt->setPixmap(QPixmap(mouse_coord_xpm) );
-    showcoordBt->setTextLabel("Mouse Coordinates");
-
-    button_group = new QButtonGroup(0, "My_group");
-    // this button has no parent and is destroyed manually in the
-    // destructor
-
-    // below is the list of buttons in the group
-    QToolButton* const button_group_list[] = { nolayerBt,
-					       zoomrectBt,
-					       focusBt,
-					       handtoolBt };
-    for(int i=0; i<4; ++i)
-      {
-	button_group_list[i]->setToggleButton(true);
-	button_group->insert(button_group_list[i]);
-      }
-    button_group->setExclusive(true);
-    connect(button_group, SIGNAL(clicked(int)),
-	    this, SLOT(group_clicked(int)));
-
-    nolayerBt->setOn(true);
-
-    showcoordBt->setToggleButton(true);
-    showcoordBt->toggle();
-
-    connect(zoomrectBt, SIGNAL(stateChanged(int)),
-	    zoomrectlayer, SLOT(stateChanged(int)));
-    connect(focusBt, SIGNAL(stateChanged(int)),
-	    focuslayer, SLOT(stateChanged(int)));
-    connect(handtoolBt, SIGNAL(stateChanged(int)),
-	    handtoollayer, SLOT(stateChanged(int)));
-    connect(showcoordBt, SIGNAL(stateChanged(int)),
-	    showcoordlayer, SLOT(stateChanged(int)));
-
-
-    // history setting
-    history = new Qt_widget_history(widget, "standard history");
-    connect(backBt, SIGNAL(clicked()),
-	    history, SLOT(backward()));
-    connect(forwardBt, SIGNAL(clicked()),
-	    history, SLOT(forward()));
-
-    connect(history, SIGNAL(backwardAvaillable(bool)),
-            backBt, SLOT(setEnabled(bool)));
-    connect(history, SIGNAL(forwardAvaillable(bool)),
-            forwardBt, SLOT(setEnabled(bool)));
-    history->clear();
-  }
-
-  void Qt_widget_standard_toolbar::group_clicked(int i)
-  {
-    static int id = 0; 
-    // This id is here to keep track of the button from the group that
-    // is on (if all toolbuttons are down, nolayer is on. At the
-    // beginning, it is set to 0, because
-    // button_group.id(nolayerBt)==0.
-
-    if( i == id )
-      {
-	if( i == 0) return;
-	// nolayer is on and cannot be set off like that.
-
-	QToolButton* tBt = 
-	  static_cast<QToolButton*>(button_group->find(i));
-	if( tBt != 0)
-	  tBt->setOn(false);
-
-	nolayerBt->setOn(true);
-	id = 0;
-      }
-    else
-      id = i;
-  }
-
-  void Qt_widget_standard_toolbar::zoomin()
-  {
-    widget->zoom(2); //
-  }
-  void Qt_widget_standard_toolbar::zoomout()
-  {
-    widget->zoom(0.5);
-  }
-  void Qt_widget_standard_toolbar::back()
-  {
-    history->backward();
-  }
-  void Qt_widget_standard_toolbar::forward()
-  {
-    history->forward();
-  }
-  void Qt_widget_standard_toolbar::clear_history()
-  {
-    history->clear();
-  }
-
-}//end namespace
-#include "Qt_widget_standard_toolbar.moc"
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp
deleted file mode 100644
index a734499..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp
+++ /dev/null
@@ -1,2101 +0,0 @@
-// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 3 of the License,
-// or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Radu Ursu <rursu at geometryfactory.com>
-
-#include <CGAL/basic.h>
-
-
-
-/* XPM */
-const char *  alpha_shape_xpm[] = {
-"32 32 3 1",
-"       c None",
-".      c #000080",
-"+      c #09F971",
-"                                ",
-"                                ",
-"                                ",
-"          .............         ",
-"         .+          ...        ",
-"         . +        . + .       ",
-"        .  +       . +  .       ",
-"        .   +     .  +   .      ",
-"        .   +    .   +    .     ",
-"       .     +  .    +     .    ",
-"       .      +.    +    ++.    ",
-"      .       .++   +  ++ ..    ",
-"      .     .... ++++++  . .    ",
-"      .    . . .    .    . .    ",
-"     .   ..  .  .   .   .  .    ",
-"     .  .    .  .   .   .   .   ",
-"     ...     .   .  .  .    .   ",
-"    ..      .     . .  .    .   ",
-"    .++     .     . . .     .   ",
-"    .  ++++++      .. .     .   ",
-"    .       .....  ..........   ",
-"    .     .. .   ....+    .     ",
-"    .    .    .      +   .      ",
-"    .   .      .     +  .       ",
-"    . ..        .   +  .        ",
-"    ..           .  +  .        ",
-"    .....         . + .         ",
-"         ........  .+.          ",
-"                 ....           ",
-"                                ",
-"                                ",
-"                                "};
-
-
-/* XPM */
-const char *  alpha_shape_small_xpm[] = {
-"16 16 3 1",
-"       c None",
-".      c #35E8D9",
-"+      c #000000",
-"    ........    ",
-"   ..........   ",
-"  .+++++......  ",
-" ......+...++.. ",
-".......+.+++....",
-".......+++......",
-"....+++++.......",
-"....+...++......",
-".........+......",
-".........++.....",
-"........+++++++.",
-".......++.......",
-" .....++....... ",
-"  ...++++.....  ",
-"   .....+++..   ",
-"    ......+.    "};
-
-/* XPM */
-const char * arrow_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c #808080",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX  XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX   XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX    XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX     XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX      XXXXXXXXXXXXX",
-"XXXXXXXXXXXXX       XXXXXXXXXXXX",
-"XXXXXXXXXXXXX    .XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX  . .XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX XX. XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXX .XXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXX. XXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  arrow_small_xpm[] = {
-"16 16 2 1",
-" 	c None",
-".	c #000000",
-"                ",
-"                ",
-"    .           ",
-"    ..          ",
-"    ...         ",
-"    ....        ",
-"    .....       ",
-"    ......      ",
-"    .......     ",
-"    .. .        ",
-"    .   .       ",
-"    .   .       ",
-"         .      ",
-"         .      ",
-"                ",
-"                "};
-
-/* XPM */
-const char * back_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 6 1",
-"  c opaque",
-". c blue",
-"X c cyan",
-"o c magenta",
-"O c #c0c0c0",
-"+ c None",
-/* pixels */
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++",
-"++++              ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++ oooooooooooo ++++++++++++++",
-"++++              +++++ ++++++++",
-"++++++++++++++++++++++. ++++++++",
-"+++++++++++++++++++++.O ++++++++",
-"++++++++++++++++++++.OO ...... +",
-"+++++++++++++++++++.OOOOOOOOOX +",
-"+++++++++++++++++++ XXXXXXXXXX +",
-"++++++++++++++++++++ XX        +",
-"+++++++++++++++++++++ X ++++++++",
-"++++++++++++++++++++++  ++++++++",
-"+++++++++++++++++++++++ ++++++++",
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++"
-};
-
-/* XPM */
-const char *  back_small_xpm[] = {
-"16 16 2 1",
-" 	c None",
-".	c #000000",
-"                ",
-"                ",
-"                ",
-"        ...     ",
-"       .   .    ",
-"      .     .   ",
-"     .      .   ",
-"  .  .      .   ",
-"  . .       .   ",
-"  ... ..    .   ",
-"  .....         ",
-"  ....          ",
-"  ...           ",
-"  ..            ",
-"  .             ",
-"                "};
-
-/* XPM */
-const char * circle_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c navy",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXX       XXXXXXXX",
-"XXXXXXXXXXXXXXX           XXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXX   XXXXX",
-"XXXXXXXXXXXXX   XXXXXXXXX   XXXX",
-"XXXXXXXXXXXXX   XXXXXXXXX   XXXX",
-"XXXXXXXXXXXX   XXXXXXXXXXX   XXX",
-"XXXXXXXXXXXX   XXXXXXXXXXX   XXX",
-"XXXXXXXXXXXX   XXXXXXXXXXX   XXX",
-"XXXXXXXXXXXX   XXXXXXXXXXX   XXX",
-"XXXXXXXXXXXX   XXXXXXXXXXX   XXX",
-"XXXXXXXXXXXXX   XXXXXXXXX   XXXX",
-"XXXXXXXXXXXXX   XXXXXXXXX   XXXX",
-"XXXXXXXXXXXXXX   XXXXXXX   XXXXX",
-"XXXXXXXXXXXXXXX           XXXXXX",
-"XXXXXXXXXXXXXXXXX       XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXX........XXXXXXXXXXXXXXXXXXX",
-"XXXXXXX......XXXXXXXXXXXXXXXXXXX",
-"XXXXXXX......XXXXXXXXXXXXXXXXXXX",
-"XXXXXX.......XXXXXXXXXXXXXXXXXXX",
-"XXXXX........XXXXXXXXXXXXXXXXXXX",
-"XXXX.........XXXXXXXXXXXXXXXXXXX",
-"XXX.......XX.XXXXXXXXXXXXXXXXXXX",
-"XXX......XXX.XXXXXXXXXXXXXXXXXXX",
-"XXX.....XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX....XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  circle_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #EDA1A1",
-"+	c #000000",
-"@	c #1F0670",
-"    ........    ",
-"   ..........   ",
-"  .....+++++..  ",
-" .....++...++.. ",
-"......+.....+...",
-"......+.....+...",
-"......+.....+...",
-"......++...++...",
-".......+++++....",
-"..@@@@@.........",
-"...@@@@.........",
-"...@@@@.........",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-/* XPM */
-const char * constrained_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX...........................XX",
-"XXX...........................XX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.....................XXXXXXXX",
-"XXX.....................XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.............XXXXXXXXXXXXXXXX",
-"XXX.............XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.....XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.....XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.............XXXXXXXXXXXXXXXX",
-"XXX.............XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX.....................XXXXXXXX",
-"XXX.....................XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  constrained_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #F40C3A",
-"@	c #000000",
-"    ........    ",
-"   ..........   ",
-"  .....+++++..  ",
-" ...++++..++ at .. ",
-"..++++...++.. at ..",
-".+++.....++... at .",
-". at .++...++....@.",
-".. at .++..++..@@@.",
-".. at ..++++.@@.. at .",
-"... at ..++@@... at ..",
-"... at ...@.... at ...",
-".... at ..@... at ....",
-" ... at ..@.. at .... ",
-"  ... at .@. at ....  ",
-"   .. at .@@....   ",
-"    ..@@....    "};
-
-
-/* XPM */
-const char * focus_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c None",
-/* pixels */
-"................................",
-"................................",
-"...............  ...............",
-"...............  ...............",
-"...............  ...............",
-"...............  ...............",
-"...........          ...........",
-".........              .........",
-"........    ........    ........",
-".......   ............   .......",
-"......   ..............   ......",
-"......  ................  ......",
-".....  ..................  .....",
-".....  ........  ........  .....",
-".....  ........  ........  .....",
-"..     ......      ......     ..",
-"..     ......      ......     ..",
-".....  ........  ........  .....",
-".....  ........  ........  .....",
-".....  ..................  .....",
-"......  ................  ......",
-"......   ..............   ......",
-".......   ............   .......",
-"........    ........    ........",
-".........              .........",
-"...........          ...........",
-"...............  ...............",
-"...............  ...............",
-"...............  ...............",
-"...............  ...............",
-"................................",
-"................................"
-};
-
-
-/* XPM */
-const char * focus1_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"          ............          ",
-" ........ ............ ........ ",
-" ........ ............ ........ ",
-" ..      ..............      .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-"   ..........................   ",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-".............................   ",
-"   ......................... .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" .. ........................ .. ",
-" ..      ..............      .. ",
-" ........ ............ ........ ",
-" ........ ............ ........ ",
-"          ............          "
-};
-
-/* XPM */
-const char * focus1_mask_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"          ............          ",
-"          ............          ",
-"          ............          ",
-"         ..............         ",
-"    ........................    ",
-"    ........................    ",
-"    ........................    ",
-"    ........................    ",
-"    ........................    ",
-"   ..........................   ",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-".............................   ",
-"   .........................    ",
-"    ........................    ",
-"    ........................    ",
-"    ........................    ",
-"    ........................    ",
-"         ..............         ",
-"          ............          ",
-"          ............          ",
-"          ............          "
-};
-
-/* XPM */
-const char * focus2_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"................................",
-"................................",
-"................................",
-"................................",
-"....          ....          ....",
-".... ........ .... ........ ....",
-".... ........ .... ........ ....",
-".... ..      ......      .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-"....   ..................   ....",
-"................................",
-"................................",
-"................................",
-"................................",
-".........................   ....",
-"....   ................. .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... .. ................ .. ....",
-".... ..      ......      .. ....",
-".... ........ .... ........ ....",
-".... ........ .... ........ ....",
-"....          ....          ....",
-"................................",
-"................................",
-"................................",
-"................................"
-};
-
-/* XPM */
-const char * focus2_mask_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"................................",
-"................................",
-"................................",
-"................................",
-"....          ....          ....",
-"....          ....          ....",
-"....          ....          ....",
-"....         ......         ....",
-"....    ................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....   ..................   ....",
-"................................",
-"................................",
-"................................",
-"................................",
-".........................   ....",
-"....   .................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....    ................    ....",
-"....         ......         ....",
-"....          ....          ....",
-"....          ....          ....",
-"....          ....          ....",
-"................................",
-"................................",
-"................................",
-"................................"
-};
-
-/* XPM */
-const char * focus3_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"......                    ......",
-"...... ........  ........ ......",
-"...... ........  ........ ......",
-"...... ..      ..      .. ......",
-"...... .. ............ .. ......",
-"...... .. ............ .. ......",
-"...... .. .....  ..... .. ......",
-"...... .. .....  ..... .. ......",
-"...... .. .....  ..... .. ......",
-"......   ...   ..   ...   ......",
-"......   ...   ..   .. .. ......",
-"...... .. .....  ..... .. ......",
-"...... .. .....  ..... .. ......",
-"...... .. .....  ..... .. ......",
-"...... .. ............ .. ......",
-"...... ..      ..      .. ......",
-"...... ........  ........ ......",
-"...... ........  ........ ......",
-"......                    ......",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"
-};
-
-/* XPM */
-const char * focus3_mask_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c white",
-/* pixels */
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"......         ..         ......",
-"......    ............    ......",
-"......    ............    ......",
-"......    .....  .....    ......",
-"......    .....  .....    ......",
-"......    .....  .....    ......",
-"......   ...        ...   ......",
-"......   ...        ..    ......",
-"......    .....  .....    ......",
-"......    .....  .....    ......",
-"......    .....  .....    ......",
-"......    ............    ......",
-"......         ..         ......",
-"......                    ......",
-"......                    ......",
-"......                    ......",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"
-};
-
-/* XPM */
-const char * forward_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 7 1",
-"  c opaque",
-". c blue",
-"X c cyan",
-"o c magenta",
-"O c #c0c0c0",
-"+ c white",
-"@ c None",
-/* pixels */
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@              @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@@@@@@@ oooooooooooo @@@@",
-"@@@@@@@@.@@@@@ oooooooooooo @@@@",
-"@@@@@@@@. @@@@              @@@@",
-"@@@@@@@@.X @@@@@@@@@@@@@@@@@@@@@",
-"@........+X @@@@@@@@@@@@@@@@@@@@",
-"@.++++++++OX @@@@@@@@@@@@@@@@@@@",
-"@.XXXXXXXXX. @@@@@@@@@@@@@@@@@@@",
-"@        X. @@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@ . @@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-};
-
-/* XPM */
-const char *  forward_small_xpm[] = {
-"16 16 2 1",
-" 	c None",
-".	c #000000",
-"                ",
-"                ",
-"                ",
-"     ...        ",
-"    .   .       ",
-"   .     .      ",
-"   .      .     ",
-"   .      .  .  ",
-"   .       . .  ",
-"   .    .. ...  ",
-"         .....  ",
-"          ....  ",
-"           ...  ",
-"            ..  ",
-"             .  ",
-"                "};
-
-
-/* XPM */
-const char * greene_approx_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c green",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX                 XXXXXXXXXXXX",
-"XXX                  XXXXXXXXXXX",
-"XXX  ..............   XXXXXXXXXX",
-"XXX  ............  .    XXXXXXXX",
-"XXX  ..........  ....    XXXXXXX",
-"XXX  ......... ........   XXXXXX",
-"XXX  .......  ..........   XXXXX",
-"XXX         .............  XXXXX",
-"XXX         .............  XXXXX",
-"XXXXXXXXXX  ............   XXXXX",
-"XXXXXXXXXX  ...........   XXXXXX",
-"XXXXXXXXXX               XXXXXXX",
-"XXXXXXXXXX  ..........  XXXXXXXX",
-"XXXXXXXXXX  .........   XXXXXXXX",
-"XXXXXXXXXX  ......     XXXXXXXXX",
-"XXXXXXXXXX  ..    ...   XXXXXXXX",
-"XXXXXXXXX     ........    XXXXXX",
-"XXXXXXX    ............    XXXXX",
-"XXXXXX    ...............   XXXX",
-"XXXXX   ..................   XXX",
-"XXXX       ...............  XXXX",
-"XXXX  .....      .........  XXXX",
-"XXXX  ...........    ....   XXXX",
-"XXXX  ...........      ..  XXXXX",
-"XXXX  .........         .  XXXXX",
-"XXXX              XXXX     XXXXX",
-"XXXX            XXXXXXX    XXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  greene_approx_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"@	c #26F70E",
-"    ........    ",
-"   ++++++++..   ",
-"  .+@@@@@@++..  ",
-" ..+@@@@++@@+.. ",
-"...+@@@+@@@@@+..",
-"...++++@@@@@@+..",
-"......++++++++..",
-"......+@@@+.....",
-"......++@@+.....",
-"......+ at +++.....",
-".....+@@@@++....",
-"....+@@@+++ at +...",
-" ..+ at +++@@@@+.. ",
-"  .++@@@@@@@+.  ",
-"   .++++++++.   ",
-"    ........    "};
-
-
-/* XPM */
-const char * hand_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 5 1",
-"  c black",
-". c #808080",
-"X c #c0c0c0",
-"o c white",
-"O c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOO  OOOOOOOOOOOOOOO",
-"OOOOOOOOOOO  O Xo   OOOOOOOOOOOO",
-"OOOOOOOOOO oo  Xo Xo OOOOOOOOOOO",
-"OOOOOOOOOO Xo  Xo Xo . OOOOOOOOO",
-"OOOOOOOOOOO oo Xo Xo  X OOOOOOOO",
-"OOOOOOOOOOO Xo Xo Xo Xo OOOOOOOO",
-"OOOOOOOOO  X ooooooo Xo OOOOOOOO",
-"OOOOOOOO oo  ooXXoXoooo OOOOOOOO",
-"OOOOOOOO Xoo XooooooXo OOOOOOOOO",
-"OOOOOOOOO XooXoooooooo OOOOOOOOO",
-"OOOOOOOOOO ooooooooooo OOOOOOOOO",
-"OOOOOOOOOO Xooooooooo OOOOOOOOOO",
-"OOOOOOOOOOO Xoooooooo OOOOOOOOOO",
-"OOOOOOOOOOOO Xoooooo OOOOOOOOOOO",
-"OOOOOOOOOOOOO Oooooo OOOOOOOOOOO",
-"OOOOOOOOOOOOO Oooooo OOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
-
-
-/* XPM */
-const char * handtool_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XX  XXXXXXXXXXXXXXXXXXXXXX   XXX",
-"XX     XXXXXXXXXXXXXXXX     XXXX",
-"XXX  XXXXXXXXXXXXXXXXXXXX   XXXX",
-"XXX X XXXXXXXXXXXXXXXXXX X XXXXX",
-"XXXXXX XXXXXXXXXXXXXXX  XX XXXXX",
-"XXXXXXX  XXXXXXXXXXXX XXXXXXXXXX",
-"XXXXXXXXX XXXXXXXXX  XXXXXXXXXXX",
-"XXXXXXXXXX XXXXXXX XXXXXXXXXXXXX",
-"XXXXXXXXXXX X..X. XXXXXXXXXXXXXX",
-"XXXXXXXXXXXX.... XXXXXXXXXXXXXXX",
-"XXXXXXXXXXX.......XXXXXXXXXXXXXX",
-"XXXXXXXXXXXX....XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXX.....XXXXXXXXXXXXXXX",
-"XXXXXXXXXXX. .XX. XXXXXXXXXXXXXX",
-"XXXXXXXXXXX XXXXXX XXXXXXXXXXXXX",
-"XXXXXXXXXX XXXXXXXX XXXXXXXXXXXX",
-"XXXXXXXXX XXXXXXXXXX XXXXXXXXXXX",
-"XXXXXXXXX XXXXXXXXXX XXXXXXXXXXX",
-"XXXXXXXX XXXXXXXXXXXX XXXXXXXXXX",
-"XXXXXXX XXXXXXXXXXXXXX XXXXXXXXX",
-"XXXXXX XXXXXXXXXXXXXXXX XXXXXXXX",
-"XXXXXX XXXXXXXXXXXXXXXXX XX XXXX",
-"XXXXX XXXXXXXXXXXXXXXXXXX   XXXX",
-"XX X XXXXXXXXXXXXXXXXXX     XXXX",
-"XX  XXXXXXXXXXXXXXXXXXXXX   XXXX",
-"XX    XXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XX  XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char * holddown_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 4 1",
-"  c black",
-". c #c0c0c0",
-"X c white",
-"o c None",
-/* pixels */
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"ooooooooooooo       oooooooooooo",
-"ooooooo ooo    .X .X  oooooooooo",
-"oooooooo  o .X .X .X . ooo   ooo",
-"oooooooooo o XXXXXXX .    oooooo",
-"oooooooo     XX..X.XXX oo  ooooo",
-"oooooo  oo X .XXXXXX.X oooo  ooo",
-"oooooooooo XX.XXXXXXXX ooooooooo",
-"oooooooooo XXXXXXXXXXX ooooooooo",
-"oooooooooo .XXXXXXXXX oooooooooo",
-"ooooooooooo .XXXXXXXX oooooooooo",
-"oooooooooooo .XXXXXX ooooooooooo",
-"ooooooooooooo oXXXXX ooooooooooo",
-"ooooooooooooo oXXXXX ooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo"
-};
-
-/* XPM */
-const char *  iso_rectangle_small_xpm[] = {
-"16 16 4 1",
-"       c None",
-".      c #EDA1A1",
-"+      c #000000",
-"@      c #1F0670",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" ....++++++++.. ",
-".....+......+...",
-".....+......+...",
-".....+......+...",
-".....++++++++...",
-"................",
-"..@@@@@.........",
-"...@@@@.........",
-"...@@@@.........",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-/* XPM */
-const char *  iso_rectangle_xpm[] = {
-"16 16 4 1",
-"       c None",
-".      c #EDA1A1",
-"+      c #000000",
-"@      c #1F0670",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" ....++++++++.. ",
-".....+......+...",
-".....+......+...",
-".....+......+...",
-".....++++++++...",
-"................",
-"..@@@@@.........",
-"...@@@@.........",
-"...@@@@.........",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-/* XPM */
-const char * line_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c opaque",
-". c navy",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXX   XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX   XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX   XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX   XXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXX   XXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX   XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXX   XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX   XXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX   XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX   XXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX   XXXXXX",
-"XXXXX........XXXXXXXXXXX XXXXXXX",
-"XXXXXXX......XXXXXXXXXXXXXXXXXXX",
-"XXXXXXX......XXXXXXXXXXXXXXXXXXX",
-"XXXXXX.......XXXXXXXXXXXXXXXXXXX",
-"XXXXX........XXXXXXXXXXXXXXXXXXX",
-"XXXX.........XXXXXXXXXXXXXXXXXXX",
-"XXX.......XX.XXXXXXXXXXXXXXXXXXX",
-"XXX......XXX.XXXXXXXXXXXXXXXXXXX",
-"XXX.....XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX....XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  line_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #EDA1A1",
-"+	c #000000",
-"@	c #1F0670",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" .....+........ ",
-".......+........",
-"........+.......",
-".........+......",
-"..........+.....",
-"...........+....",
-"..@@@@@.....+...",
-"...@@@@.........",
-"...@@@@.........",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-
-
-/* XPM */
-const char * min_parallelogram_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 5 1",
-"  c black",
-". c navy",
-"X c cyan",
-"o c #808080",
-"O c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOXXXXXXXXXXXXXXXXXXOOOOOOOOOOOO",
-"OOXooooooooooooooooXOOOOOOOOOOOO",
-"OOOXoo..ooo..oooooooXOOOOOOOOOOO",
-"OOOXoo..ooo..oooooooXOOOOOOOOOOO",
-"OOOOXoooooooooooo..ooXOOOOOOOOOO",
-"OOOOXooooo..ooooo..ooXOOOOOOOOOO",
-"OOOOXooooo..ooooooooooXOOOOOOOOO",
-"OOOOOXooooooooo..oooooXOOOOOOOOO",
-"OOOOOXooo..oooo..oooooXOOOOOOOOO",
-"OOOOOXooo..ooooooooooooXOOOOOOOO",
-"OOOOOOXoooooooooooo..ooXOOOOOOOO",
-"OOOOOOXoooooooooooo..oooXOOOOOOO",
-"OOOOOOOXooooooooooooooooXOOOOOOO",
-"OOOOOOOXo..oooooooooooooXOOOOOOO",
-"OOOOOOOXo..ooooooooooooooXOOOOOO",
-"OOOOOOOOXooooooooooooooooXOOOOOO",
-"OOOOOOOOXoooooooooooooooooXOOOOO",
-"OOOOOOOOOXoooooooooooo..ooXOOOOO",
-"OOOOOOOOOXo..ooooooooo..oooXOOOO",
-"OOOOOOOOOXo..ooooooooooooooXOOOO",
-"OOOOOOOOOOXooooooooooooooooXOOOO",
-"OOOOOOOOOOXoooooooooooooooooXOOO",
-"OOOOOOOOOOXooo..oooo..ooooooXOOO",
-"OOOOOOOOOOOXoo..oooo..oo..oooXOO",
-"OOOOOOOOOOOXoooooooooooo..oooXOO",
-"OOOOOOOOOOOOXoooooooooooooooooXO",
-"OOOOOOOOOOOOXXXXXXXXXXXXXXXXXXXO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
-
-/* XPM */
-const char *  min_parallelogram_small_xpm[] = {
-"16 16 3 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" .............. ",
-"..++++++++++....",
-"..+........+....",
-"..+........+....",
-"...+........+...",
-"...+........+...",
-"....+........+..",
-"....+........+..",
-".....++++++++++.",
-" .............. ",
-"  ............  ",
-"   ..........   ",
-"    ........    "};
-
-/* XPM */
-const char * min_rectangle_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 5 1",
-"  c black",
-". c navy",
-"X c green",
-"o c cyan",
-"O c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OooooooooooooooooooooooooooooooO",
-"Oo............................oO",
-"Oo............................oO",
-"Oo..XX...................XX...oO",
-"Oo..XX...................XX...oO",
-"Oo...........XX.....XX........oO",
-"Oo...........XX.....XX........oO",
-"Oo............................oO",
-"Oo............................oO",
-"Oo.......................XX...oO",
-"Oo....XX.....XX..........XX...oO",
-"Oo....XX.....XX.....XX........oO",
-"Oo..................XX........oO",
-"Oo............................oO",
-"Oo............................oO",
-"Oo.............XX.............oO",
-"Oo.............XX.............oO",
-"Oo.....XX.................XX..oO",
-"Oo.....XX.................XX..oO",
-"Oo............................oO",
-"Oo............................oO",
-"Oo............................oO",
-"Oo..XX........................oO",
-"Oo..XX.......XX..XX..XX...XX..oO",
-"Oo...........XX..XX..XX...XX..oO",
-"Oo............................oO",
-"Oo............................oO",
-"OooooooooooooooooooooooooooooooO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
-
-/* XPM */
-const char *  min_rectangle_small_xpm[] = {
-"16 16 3 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" .............. ",
-"................",
-"...++++++++++...",
-"...+........+...",
-"...+........+...",
-"...+........+...",
-"...+........+...",
-"...+........+...",
-"...++++++++++...",
-" .............. ",
-"  ............  ",
-"   ..........   ",
-"    ........    "};
-
-/* XPM */
-const char * mouse_coord_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c None",
-/* pixels */
-"................................",
-"................................",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-".............       ............",
-"............. ..... ............",
-"............. ..... ............",
-".             .....            .",
-"............. ..... ............",
-".............       ............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................ ...............",
-"................................"
-};
-
-/* XPM */
-const char * movepoint_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXX  XXXXXXX...XXXXXXXX  XXXXX",
-"XXXX        XX...XX         XXXX",
-"XXXXX  XXXXXXX...XXXXXXXX  XXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX   XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  movepoint_small_xpm[] = {
-"16 16 3 1",
-" 	c None",
-".	c #EDA1A1",
-"+	c #000000",
-"    ...+....    ",
-"   ....+.....   ",
-"  .....+......  ",
-" .............. ",
-"................",
-"................",
-".......+........",
-".......+........",
-"+++..+++++...+++",
-".......+........",
-".......+........",
-"................",
-" .............. ",
-"  .....+......  ",
-"   ....+.....   ",
-"    ...+....    "};
-
-/* XPM */
-const char * nearest_vertex_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX  XXXXXXXXXXXXXXX",
-"XXXX               XXXXXXXXXXXXX",
-"XXX                  XXXXXXXXXXX",
-"XXX     XXXXXXX  X    XXXXXXXXXX",
-"XXX         XXX  XXX    XXXXXXXX",
-"XXX  XXX         XXXX     XXXXXX",
-"XXX  XXXXXXX               XXXXX",
-"XXX  XXXXXXXXX XX         XXXXXX",
-"XXX  XXXXXXXX  XX  XXXXX  XXXXXX",
-"XXX  XXXXXXX  XXXX  XXXX  XXXXXX",
-"XXX  XXXXXXX XXXXXX XXXX  XXXXXX",
-"XXX  XXXXXX  XXXXXX  XXX  XXXXXX",
-"XXX  XXXXXX XXXXXXXX XXX  XXXXXX",
-"XXX  XXXXX  XXXXXXXX  XX  XXXXXX",
-"XXX  XXXXX XXXXXXXXXX XX  XXXXXX",
-"XXX  XXXX  XXXXXXXXXX  X  XXXXXX",
-"XXX  XXXX XXXXXXXXXXXX X  XXXXXX",
-"XXX ...X  XXXXXXXXXXXX    XXXXXX",
-"XXX..... XXXXXXXXXXXXXX   XXXXXX",
-"XX.......XXXXXXXXXXXXXXX  XXXXXX",
-"XX.......XXXXXXXXXXXXXXX  XXXXXX",
-"XX.......                 XXXXXX",
-"XXX.....                  XXXXXX",
-"XXXX...XXXXXXXXXXXXXXXXXX XXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  nearest_vertex_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #E00BD2",
-"@	c #000000",
-"    ........    ",
-"   ......+++.   ",
-"  ...... at +++..  ",
-" ....@@@.+++ at .. ",
-"..@@@..... at ..@..",
-".@@...... at ....@.",
-". at .@@.... at ....@.",
-".. at ..@.. at ...@@@.",
-".. at ...@. at .@@.. at .",
-"... at ...@@@... at ..",
-"... at ...@.... at ...",
-".... at ..@... at ....",
-" ... at ..@.. at .... ",
-"  ... at .@. at ....  ",
-"   .. at .@@....   ",
-"    ..@@....    "};
-
-/* XPM */
-const char * notool_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXX..........XXXXXXXXXXX",
-"XXXXXXXXXX............XXXXXXXXXX",
-"XXXXXXXX................XXXXXXXX",
-"XXXXXXX.....XXXXXXXX.....XXXXXXX",
-"XXXXXXX....XXXXXXXX......XXXXXXX",
-"XXXXXX....XXXXXXXX........XXXXXX",
-"XXXXX....XXXXXXXX....XX....XXXXX",
-"XXXXX...XXXXXXXX....XXXX...XXXXX",
-"XXXXX...XXXXXXX....XXXXX...XXXXX",
-"XXXXX...XXXXXX....XXXXXX...XXXXX",
-"XXXXX...XXXXX....XXXXXXX...XXXXX",
-"XXXXX...XXXX....XXXXXXXX...XXXXX",
-"XXXXX...XXX....XXXXXXXXX...XXXXX",
-"XXXXX...XX....XXXXXXXXXX...XXXXX",
-"XXXXX........XXXXXXXXXX....XXXXX",
-"XXXXXX......XXXXXXXXXX....XXXXXX",
-"XXXXXXX....XXXXXXXXXX....XXXXXXX",
-"XXXXXXX.....XXXXXXXX.....XXXXXXX",
-"XXXXXXXX................XXXXXXXX",
-"XXXXXXXXXX............XXXXXXXXXX",
-"XXXXXXXXXXX..........XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char * notool_small_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXX..........XXXXXXXXXXX",
-"XXXXXXXXXX............XXXXXXXXXX",
-"XXXXXXXX................XXXXXXXX",
-"XXXXXXX.....XXXXXXXX.....XXXXXXX",
-"XXXXXXX....XXXXXXXX......XXXXXXX",
-"XXXXXX....XXXXXXXX........XXXXXX",
-"XXXXX....XXXXXXXX....XX....XXXXX",
-"XXXXX...XXXXXXXX....XXXX...XXXXX",
-"XXXXX...XXXXXXX....XXXXX...XXXXX",
-"XXXXX...XXXXXX....XXXXXX...XXXXX",
-"XXXXX...XXXXX....XXXXXXX...XXXXX",
-"XXXXX...XXXX....XXXXXXXX...XXXXX",
-"XXXXX...XXX....XXXXXXXXX...XXXXX",
-"XXXXX...XX....XXXXXXXXXX...XXXXX",
-"XXXXX........XXXXXXXXXX....XXXXX",
-"XXXXXX......XXXXXXXXXX....XXXXXX",
-"XXXXXXX....XXXXXXXXXX....XXXXXXX",
-"XXXXXXX.....XXXXXXXX.....XXXXXXX",
-"XXXXXXXX................XXXXXXXX",
-"XXXXXXXXXX............XXXXXXXXXX",
-"XXXXXXXXXXX..........XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-
-
-/* XPM */
-const char * optimal_convex_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c yellow",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX                 XXXXXXXXXXXX",
-"XXX                  XXXXXXXXXXX",
-"XXX  ..............   XXXXXXXXXX",
-"XXX  ............  .    XXXXXXXX",
-"XXX  ..........  ....    XXXXXXX",
-"XXX  ......... ........   XXXXXX",
-"XXX  .......  ..........   XXXXX",
-"XXX         .............  XXXXX",
-"XXX         .............  XXXXX",
-"XXXXXXXXXX  ............   XXXXX",
-"XXXXXXXXXX  ...........   XXXXXX",
-"XXXXXXXXXX               XXXXXXX",
-"XXXXXXXXXX  ..........  XXXXXXXX",
-"XXXXXXXXXX  .........   XXXXXXXX",
-"XXXXXXXXXX  ......     XXXXXXXXX",
-"XXXXXXXXXX  ..    ...   XXXXXXXX",
-"XXXXXXXXX     ........    XXXXXX",
-"XXXXXXX    ............    XXXXX",
-"XXXXXX    ...............   XXXX",
-"XXXXX   ..................   XXX",
-"XXXX       ...............  XXXX",
-"XXXX  .....      .........  XXXX",
-"XXXX  ...........    ....   XXXX",
-"XXXX  ...........      ..  XXXXX",
-"XXXX  .........         .  XXXXX",
-"XXXX              XXXX     XXXXX",
-"XXXX            XXXXXXX    XXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  optimal_convex_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"@	c #F1F907",
-"    ........    ",
-"   ++++++++..   ",
-"  .+@@@@@@++..  ",
-" ..+@@@@++@@+.. ",
-"...+@@@+@@@@@+..",
-"...++++@@@@@@+..",
-"......++++++++..",
-"......+@@@+.....",
-"......++@@+.....",
-"......+ at +++.....",
-".....+@@@@++....",
-"....+@@@+++ at +...",
-" ..+ at +++@@@@+.. ",
-"  .++@@@@@@@+.  ",
-"   .++++++++.   ",
-"    ........    "};
-
-
-/* XPM */
-const char * point_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 4 1",
-"  c opaque",
-". c navy",
-"X c green",
-"o c None",
-/* pixels */
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"oooooooooooooooo     XX     oooo",
-"oooooooooooooooo     XX     oooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"ooooooooooooooooooooo  ooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"ooooo........ooooooooooooooooooo",
-"ooooooo......ooooooooooooooooooo",
-"ooooooo......ooooooooooooooooooo",
-"oooooo.......ooooooooooooooooooo",
-"ooooo........ooooooooooooooooooo",
-"oooo.........ooooooooooooooooooo",
-"ooo.......oo.ooooooooooooooooooo",
-"ooo......ooo.ooooooooooooooooooo",
-"ooo.....oooooooooooooooooooooooo",
-"ooo....ooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo"
-};
-
-/* XPM */
-const char *  point_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #EDA1A1",
-"+	c #000000",
-"@	c #1F0670",
-"    ........    ",
-"   ..........   ",
-"  ............  ",
-" .............. ",
-".........+......",
-".........+......",
-".......+++++....",
-".........+......",
-".........+......",
-"..@@@@@.........",
-"...@@@@.........",
-"...@@@@.........",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-/* XPM */
-const char * points_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 2 1",
-"  c black",
-". c None",
-/* pixels */
-"................................",
-".  ......  ..................  .",
-".  ......  ..................  .",
-"................................",
-"................................",
-".......................  .......",
-".......  ......  ......  .......",
-".......  ......  ...............",
-"................................",
-"................................",
-".........  .....................",
-".........  ...............  ....",
-"....  ..........  ........  ....",
-"....  ..........  ..............",
-"................................",
-"........  ...........  .........",
-"........  ...........  .........",
-"................................",
-"............................  ..",
-".....  .........  ..........  ..",
-".....  .........  ..............",
-"................................",
-"................................",
-"..........  ....................",
-"..........  ............  ......",
-"....................  ..  ......",
-"....................  ..........",
-"................................",
-"................................",
-".  ............  ............  .",
-".  ............  ............  .",
-"................................"
-};
-
-/* XPM */
-const char *  points_small_xpm[] = {
-"16 16 3 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"    ....+...    ",
-"   ....+++...   ",
-"  ......+.....  ",
-" .............. ",
-"...+.........+..",
-"..+++.......+++.",
-"...+....+....+..",
-".......+++......",
-"........+.......",
-"............+...",
-"..+........+++..",
-".+++...+....+...",
-" .+...+++...... ",
-"  .....+......  ",
-"   ..........   ",
-"    ........    "};
-
-/* XPM */
-const char * polygon_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 4 1",
-"  c opaque",
-". c navy",
-"X c #c0c0c0",
-"o c None",
-/* pixels */
-"oooooooooooooooooooooooooooooooo",
-"oooooo                        oo",
-"oooooo XXXXXXXXXXXXXXXXXXXXXX oo",
-"oooooo XXXXXXXXXXXXXXXXXXXXXX oo",
-"oooooo XXXXXXXXXXXXXXXXXXXXXX oo",
-"oooooo XXXXXXXXXXXXXXXXXXXXXX oo",
-"oooooo XXXXXXXXXXXX           oo",
-"oooooo XXXXXXXXXXXX oooooooooooo",
-"oooooo XXXXXXXXXXXX oooooooooooo",
-"oooooo         XXXX oooooooooooo",
-"oooooooooooooo XXXX oooooooooooo",
-"oooooooooooooo XXXX         oooo",
-"oooooooooooooo XXXXXXXXXXXX oooo",
-"oooooooooooooo XXXXXXXXXXXX oooo",
-"oooooooooooooo XXXXXXXXXXXX oooo",
-"oooooooooooooo XXXXXXXXXXXX oooo",
-"oooooooooooooo      XXXXXXX oooo",
-"ooooooooooooooooooo XXXXXXX oooo",
-"ooooooooooooooooooo XXXXXXX oooo",
-"ooooo........oooooo XXXXXXX oooo",
-"ooooooo......oooooo XXXXXXX oooo",
-"ooooooo......oooooo         oooo",
-"oooooo.......ooooooooooooooooooo",
-"ooooo........ooooooooooooooooooo",
-"oooo.........ooooooooooooooooooo",
-"ooo.......oo.ooooooooooooooooooo",
-"ooo......ooo.ooooooooooooooooooo",
-"ooo.....oooooooooooooooooooooooo",
-"ooo....ooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo"
-};
-
-/* XPM */
-const char *  polygon_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #EDA1A1",
-"+	c #000000",
-"@	c #1F0670",
-"    ........    ",
-"   ..+++++++.   ",
-"  ...+.....+..  ",
-" ....+.....+++. ",
-".....++++....+..",
-"........+....+..",
-"........+....+..",
-"........+++..+..",
-"..........+..+..",
-"..@@@@@...+..+..",
-"...@@@@...+..+..",
-"...@@@@...++++..",
-" .@@@@@........ ",
-" @@@.. at .......  ",
-"@@@..........   ",
-"@@  ........    "};
-
-/* XPM */
-const char * show_polygon_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 4 1",
-"  c black",
-". c navy",
-"X c white",
-"o c None",
-/* pixels */
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo",
-"ooo.................oooooooooooo",
-"ooo.XXXXXXXXXXXXXXX..ooooooooooo",
-"ooo.XooooooooooooooX..oooooooooo",
-"ooo.XoooooooooooooooX...oooooooo",
-"ooo.XooooooooooooooooX...ooooooo",
-"ooo.XoooooooooooooooooXX..oooooo",
-"ooo.XoooooooooooooooooooX..ooooo",
-"ooo.XXXXXXXXoooooooooooooX.ooooo",
-"ooo........XoooooooooooooX.ooooo",
-"oooooooooo.XooooooooooooX..ooooo",
-"oooooooooo.XoooooooooooX..oooooo",
-"oooooooooo.XooooooooooX..ooooooo",
-"oooooooooo.XooooooooooX.oooooooo",
-"oooooooooo.XoooooooooX..oooooooo",
-"oooooooooo.XooooooooX..ooooooooo",
-"oooooooooo.XoooooooooX..oooooooo",
-"ooooooooo..XooooooooooX...oooooo",
-"ooooooo...XooooooooooooXX..ooooo",
-"oooooo..XXoooooooooooooooX..oooo",
-"ooooo..XooooooooooooooooooX..ooo",
-"oooo..XoooooooooooooooooooX.oooo",
-"oooo.XoooooooooooooooooooX..oooo",
-"oooo.XoooooooooooooooooooX..oooo",
-"oooo.XooooooooooXXXXXX.ooX.ooooo",
-"oooo.Xooooooooo.X.....XXoX.ooooo",
-"oooo.XXXXXXXXXXX..oooo..XX.ooooo",
-"oooo............ooooooo....ooooo",
-"ooooooooooooooooooooooooo.oooooo",
-"oooooooooooooooooooooooooooooooo",
-"oooooooooooooooooooooooooooooooo"
-};
-
-/* XPM */
-const char *  show_polygon_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #1709E2",
-"@	c #FFFFFF",
-"    ........    ",
-"   ++++++++..   ",
-"  .+@@@@@@++..  ",
-" ..+ at .....@@+.. ",
-"...+@@@..... at +..",
-"...++++ at .@@@@+..",
-"......+ at .@++++..",
-"......+ at .@+.....",
-"......+ at .@+.....",
-"......+ at .@+.....",
-".....+ at ..@++....",
-"....+ at ...@@@+...",
-" ..+ at ......@+.. ",
-"  .++@@@@@@@+.  ",
-"   .++++++++.   ",
-"    ........    "};
-
-
-/* XPM */
-const char * triangulation_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c navy",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXX.............XXXXXXXXX",
-"XXXXXXXXX..XXXXXXXXXX...XXXXXXXX",
-"XXXXXXXXX.X.XXXXXXXX.X.X.XXXXXXX",
-"XXXXXXXX.XX.XXXXXXX.X.XX.XXXXXXX",
-"XXXXXXXX.XXX.XXXXX.XX.XXX.XXXXXX",
-"XXXXXXXX.XXX.XXXX.XXX.XXXX.XXXXX",
-"XXXXXXX.XXXXX.XX.XXXX.XXXXX.XXXX",
-"XXXXXXX.XXXXXX..XXXX.XXXX...XXXX",
-"XXXXXX.XXXXXXX...XXX.XX..X..XXXX",
-"XXXXXX.XXXXX....X......XX.X.XXXX",
-"XXXXXX.XXXX.X.X.XXXX.XXXX.X.XXXX",
-"XXXXX.XXX..XX.XX.XXX.XXX.XX.XXXX",
-"XXXXX.XX.XXXX.XX.XXX.XXX.XXX.XXX",
-"XXXXX...XXXXX.XXX.XX.XX.XXXX.XXX",
-"XXXX..XXXXXX.XXXXX.X.XX.XXXX.XXX",
-"XXXX...XXXXX.XXXXX.X.X.XXXXX.XXX",
-"XXXX.XX......XXXXXX..X.XXXXX.XXX",
-"XXXX.XXXXXXX.....XX..........XXX",
-"XXXX.XXXXX..X.XXX.....XXXX.XXXXX",
-"XXXX.XXXX.XXXX.XXXXXX.XXX.XXXXXX",
-"XXXX.XXX.XXXXXX.XXXXX.XX.XXXXXXX",
-"XXXX.X..XXXXXXXX.XXX.XX.XXXXXXXX",
-"XXXX..XXXXXXXXXXX.XX.XX.XXXXXXXX",
-"XXXX.....XXXXXXXXX.X.X.XXXXXXXXX",
-"XXXXXXXXX........XX...XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXX....XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  triangulation_small_xpm[] = {
-"16 16 3 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"    ........    ",
-"   ..........   ",
-"  ......++++..  ",
-" ....+++..+.+.. ",
-"..+++.....+..+..",
-".++......+....+.",
-".+.++....+....+.",
-"..+..+..+...+++.",
-"..+...+.+.++..+.",
-"...+...+++...+..",
-"...+...+....+...",
-"....+..+...+....",
-" ...+..+..+.... ",
-"  ...+.+.+....  ",
-"   ..+.++....   ",
-"    ..++....    "};
-
-/* XPM */
-const char * voronoi_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXX",
-"XXXXXXXXXXXXX  XXXXXXX.XXXXXXXXX",
-"XXXXXXXXXXXX     XXXX.XXXXXXXXXX",
-".XXXXXXXXXXX  X    X..XXXXXXXXXX",
-"..XXXXXXXXX X XXX   .XXXXXXXXXXX",
-"X..XXXXXXX  X XXXXX.. XXXXXXXXXX",
-"XX..XXXXXX XX XXXX..X   XXXXXXXX",
-"XXX...XXX XXX XXXX..XXX  XXXXXXX",
-"XXXX...X  XXX XXX..XXXX XXXXXXXX",
-"XXXXXX.. XXXX XXX..XXXX XXXXXXXX",
-"XXXXXXX..XXXX XX..XXXX XXXXXXXXX",
-"XXXXXX  ..........XXX XXXXXXXXXX",
-"XXXXX  XX..........X  XXXXXXXXXX",
-"XXXXX XXX..XX XXXX.. XXXXXXXXXXX",
-"XXXX  XXX.XXX XXXXX...XXXXXXXXXX",
-"XXXX  XX..XXX XXXX  ...XXXXXXXXX",
-"XXXXX  ..XXXX XXX  XXX..XXXXXXXX",
-"XXXXXX . XXXX XXX XXXXX..XXXXXXX",
-"XXXXXX..  XXX XX  XXXXXX..XXXXXX",
-"XXXXXX.XX   X X  XXXXXXXX..XXXXX",
-"XXXXX.XXXX      XXXXXXXXXX..XXXX",
-"XXXX..XXXXXX    XXXXXXXXXXX...XX",
-"XXXX.XXXXXXXX  XXXXXXXXXXXXX...X",
-"XXX.XXXXXXXXXXXXXXXXXXXXXXXXXX..",
-"XX..XXXXXXXXXXXXXXXXXXXXXXXXXXX.",
-"XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  voronoi_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"@	c #E2364D",
-"    ........    ",
-"   ..........   ",
-"  .....+++....  ",
-" . at ...+.+.+.@@. ",
-"..@@..+.+..@@...",
-"...@@+..+.. at +...",
-"....@@..+.@@.+..",
-"....+@@.+@@..+..",
-"....+.@@@@..+...",
-"...+..@@@@@.+...",
-"...+.@@.+.@@....",
-"....@@..+..@@...",
-" ..@@+..+.+.@@. ",
-"  . at ..+.+.+...  ",
-"   ....+++...   ",
-"    ....+...    "};
-
-/* XPM */
-const char * ymonotone_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 3 1",
-"  c black",
-". c red",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXX                 XXXXXXXXXXXX",
-"XXX                  XXXXXXXXXXX",
-"XXX  ..............   XXXXXXXXXX",
-"XXX  ............  .    XXXXXXXX",
-"XXX  ..........  ....    XXXXXXX",
-"XXX  ......... ........   XXXXXX",
-"XXX  .......  ..........   XXXXX",
-"XXX         .............  XXXXX",
-"XXX         .............  XXXXX",
-"XXXXXXXXXX  ............   XXXXX",
-"XXXXXXXXXX  ...........   XXXXXX",
-"XXXXXXXXXX               XXXXXXX",
-"XXXXXXXXXX  ..........  XXXXXXXX",
-"XXXXXXXXXX  .........   XXXXXXXX",
-"XXXXXXXXXX  ......     XXXXXXXXX",
-"XXXXXXXXXX  ..    ...   XXXXXXXX",
-"XXXXXXXXX     ........    XXXXXX",
-"XXXXXXX    ............    XXXXX",
-"XXXXXX    ...............   XXXX",
-"XXXXX   ..................   XXX",
-"XXXX       ...............  XXXX",
-"XXXX  .....      .........  XXXX",
-"XXXX  ...........    ....   XXXX",
-"XXXX  ...........      ..  XXXXX",
-"XXXX  .........         .  XXXXX",
-"XXXX              XXXX     XXXXX",
-"XXXX            XXXXXXX    XXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-};
-
-/* XPM */
-const char *  ymonotone_small_xpm[] = {
-"16 16 4 1",
-" 	c None",
-".	c #35E8D9",
-"+	c #000000",
-"@	c #F72B07",
-"    ........    ",
-"   ++++++++..   ",
-"  .+@@@@@@++..  ",
-" ..+@@@@++@@+.. ",
-"...+@@@+@@@@@+..",
-"...++++@@@@@@+..",
-"......++++++++..",
-"......+@@@+.....",
-"......++@@+.....",
-"......+ at +++.....",
-".....+@@@@++....",
-"....+@@@+++ at +...",
-" ..+ at +++@@@@+.. ",
-"  .++@@@@@@@+.  ",
-"   .++++++++.   ",
-"    ........    "};
-
-
-/* XPM */
-const char * zoomin_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 5 1",
-"  c black",
-". c #808080",
-"X c #c0c0c0",
-"o c white",
-"O c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOO       XXOOOOOOOOOOOOO",
-"OOOOOOOX  OOOOOOX  XOOOOOOOOOOOO",
-"OOOOOOX OOOOOOOOOOX XOOOOOOOOOOO",
-"OOOOOX OOOOOOOOOOOOX XOOOOOOOOOO",
-"OOOOX OOOOOOOOOOOOOOX XOOOOOOOOO",
-"OOOO XOOOOOOO  OOOOOOX OOOOOOOOO",
-"OOOO OOOOOOOO  OOOOOOO OOOOOOOOO",
-"OOO .OOOOOOOO  OOOOOOOX OOOOOOOO",
-"OOO OOOOOOOOO  OOOOOOOO OOOOOOOO",
-"OOO OOOOO          OOOO OOOOOOOO",
-"OO. OOOOO          OOOO OOOOOOOO",
-"OO. OOOOOOOOO  OOOOOOOO OOOOOOOO",
-"OO. OOOOOOOOO  OOOOOOOO OOOOOOOO",
-"OOO. OOOOOOOO  OOOOOOOO OOOOOOOO",
-"OOO. .OOOOOOO  OOOOOO.  OOOOOOOO",
-"OOOO. OOOOOOOOOOOOOOO   OOOOOOOO",
-"OOOO.. OOOOOOOOOOOOO  o  OOOOOOO",
-"OOOOO.. OOOOOOOOOOO    o  OOOOOO",
-"OOOOOO..  OOOOOOX       oX OOOOO",
-"OOOOOOO...       X..   XXoX OOOO",
-"OOOOOOOOO.......OO... XXXXoX OOO",
-"OOOOOOOOOOOOOOOOOOO... XXXXoX OO",
-"OOOOOOOOOOOOOOOOOOOO... XXXXo  O",
-"OOOOOOOOOOOOOOOOOOOOO... XX    O",
-"OOOOOOOOOOOOOOOOOOOOOO...     OO",
-"OOOOOOOOOOOOOOOOOOOOOOO...   OOO",
-"OOOOOOOOOOOOOOOOOOOOOOOO..OOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
-
-/* XPM */
-const char * zoomin_rect_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 6 1",
-"  c black",
-". c magenta",
-"X c #808080",
-"o c #c0c0c0",
-"O c white",
-"+ c None",
-/* pixels */
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++",
-"+++++++++       oo++++++++++++++",
-"++++++o  ++++++o  o+++++++++++++",
-"+++++o ++++++++++o o++++++++++++",
-"++++o ++++++++++++o o+++++++++++",
-"+++o ++++++++++++++o o++++++++++",
-"+++ o+++++++++++++++o ++++++++++",
-"+++ +++++++++++++++++ ++++++++++",
-"++ X+++++++++++++++++o +++++++++",
-"++                ++++ +++++++++",
-"++  ............. ++++ +++++++++",
-"+X  ............. ++++ +++++++++",
-"+X  ............. ++++ +++++++++",
-"+X  ............. ++++ +++++++++",
-"++X ............. ++++ +++++++++",
-"++X X............ ++X  +++++++++",
-"+++X ............ ++   +++++++++",
-"+++XX ........... +  O  ++++++++",
-"+++ XX ..........     O  +++++++",
-"+++ .XX  ......o       Oo ++++++",
-"+++ ..XXX       oXX   ooOo +++++",
-"+++ ....XXXXXXX..XXX ooooOo ++++",
-"+++ ............. XXX ooooOo +++",
-"+++ ............. +XXX ooooO  ++",
-"+++ ............. ++XXX oo    ++",
-"+++ ............. +++XXX     +++",
-"+++               ++++XXX   ++++",
-"+++++++++++++++++++++++XX+++++++",
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++",
-"++++++++++++++++++++++++++++++++"
-};
-
-/* XPM */
-const char * zoomout_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 5 1",
-"  c black",
-". c #808080",
-"X c #c0c0c0",
-"o c white",
-"O c None",
-/* pixels */
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOO       XXOOOOOOOOOOOOO",
-"OOOOOOOX  OOOOOOX  XOOOOOOOOOOOO",
-"OOOOOOX OOOOOOOOOOX XOOOOOOOOOOO",
-"OOOOOX OOOOOOOOOOOOX XOOOOOOOOOO",
-"OOOOX OOOOOOOOOOOOOOX XOOOOOOOOO",
-"OOOO XOOOOOOOOOOOOOOOX OOOOOOOOO",
-"OOOO OOOOOOOOOOOOOOOOO OOOOOOOOO",
-"OOO .OOOOOOOOOOOOOOOOOX OOOOOOOO",
-"OOO OOOOOOOOOOOOOOOOOOO OOOOOOOO",
-"OOO OOOOO         OOOOO OOOOOOOO",
-"OO. OOOOO         OOOOO OOOOOOOO",
-"OO. OOOOOOOOOOOOOOOOOOO OOOOOOOO",
-"OO. OOOOOOOOOOOOOOOOOOO OOOOOOOO",
-"OOO. OOOOOOOOOOOOOOOOOO OOOOOOOO",
-"OOO. .OOOOOOOOOOOOOOO.  OOOOOOOO",
-"OOOO. OOOOOOOOOOOOOOO   OOOOOOOO",
-"OOOO.. OOOOOOOOOOOOO  o  OOOOOOO",
-"OOOOO.. OOOOOOOOOOO    o  OOOOOO",
-"OOOOOO..  OOOOOOX       oX OOOOO",
-"OOOOOOO...       X..   XXoX OOOO",
-"OOOOOOOOO.......OO... XXXXoX OOO",
-"OOOOOOOOOOOOOOOOOOO... XXXXoX OO",
-"OOOOOOOOOOOOOOOOOOOO... XXXXo  O",
-"OOOOOOOOOOOOOOOOOOOOO... XX    O",
-"OOOOOOOOOOOOOOOOOOOOOO...     OO",
-"OOOOOOOOOOOOOOOOOOOOOOO...   OOO",
-"OOOOOOOOOOOOOOOOOOOOOOOO..OOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
-"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-};
-
-/* XPM */
-const char * demoicon_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 3 1",
-" 	c None",
-".	c #FFFF00",
-"+	c #000000",
-/* pixels */
-"................",
-"...++++...++++..",
-"..+....+.+....+.",
-"..+......+......",
-"..+......+..+++.",
-"..+......+....+.",
-"..+....+.+....+.",
-"...++++...++++..",
-"................",
-"...++++...+.....",
-"..+....+..+.....",
-"..+....+..+.....",
-"..++++++..+.....",
-"..+....+..+.....",
-"..+....+..+++++.",
-"................"};
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt b/3rdparty/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt
deleted file mode 100644
index c3ed523..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-message("Configuring libCGAL_Qt4")
-
-set( QT_USE_QTMAIN   TRUE )
-set( QT_USE_QTOPENGL TRUE )
-set( QT_USE_QTSVG    TRUE )
-find_package(Qt4 QUIET)
-
-find_package(OpenGL QUIET )
-
-if( QT4_FOUND )
-
-  if( OPENGL_FOUND )
-    
-    include_directories (BEFORE ../../include)
-    
-    include(${QT_USE_FILE})
-
-    get_dependency_version(OPENGL)
-    
-    get_dependency_version(QT4 QT)
-
-    if(COMMAND add_config_flag)
-      set( CGAL_HAS_QT4 TRUE ) 
-      add_config_flag( CGAL_HAS_QT4 )
-    endif()
-    
-    message( STATUS "OpenGL include:     ${OPENGL_INCLUDE_DIR}" )
-    message( STATUS "OpenGL libraries:   ${OPENGL_LIBRARIES}" )
-    message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
-    message( STATUS "Qt4 include:        ${QT_INCLUDE_DIR}" )
-    message( STATUS "Qt4 libraries:      ${QT_LIBRARIES}" )
-    message( STATUS "Qt4 definitions:    ${QT_DEFINITIONS}" )
-    message( STATUS "moc executable:     ${QT_MOC_EXECUTABLE}" )
-    message( STATUS "uic executable:     ${QT_UIC_EXECUTABLE}" )
-
-    cache_set(CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
-    cache_set(CGAL_Qt4_3RD_PARTY_LIBRARIES    ${QT_LIBRARIES}   ${OPENGL_LIBRARIES}   )
-    cache_set(CGAL_Qt4_3RD_PARTY_DEFINITIONS  ${QT_DEFINITIONS} ${OPENGL_DEFINITIONS} )
-
-    set(mocfiles "")
-    set(RESOURCE_FILES "")
-
-    foreach (package ${CGAL_CONFIGURED_PACKAGES} )
-      file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt4/*.qtmoc.cmake")
-      foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES})
-         # includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib)
-        include(${package_qtmoc_file}) 
-#        message(STATUS QTMOC------------FILE: ${package_qtmoc_file})      
-      endforeach()
-    endforeach()
-  
-    foreach(mocfile ${mocfiles})
-      list(APPEND additional_files ${mocfile})
-    endforeach()
-    foreach(resfile ${RESOURCE_FILES})
-      list(APPEND additional_files ${resfile})
-    endforeach()
-
-#    message(STATUS "Additional input files: ${additional_files}")
-
-    use_essential_libs()
-
-    include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} )
-
-    link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
-
-    collect_cgal_library( CGAL_Qt4 "${additional_files}")
-
-    add_dependencies( CGAL_Qt4 CGAL )
-
-    target_link_libraries( CGAL_Qt4 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt4_3RD_PARTY_LIBRARIES} )
-
-    add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt4_3RD_PARTY_DEFINITIONS} )
-
-    if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
-      add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE )
-    endif()
-    
-    message("libCGAL_Qt4 is configured")
-
-  else()
-    message( STATUS "libCGAL_Qt4 needs OpenGL, cannot be configured.")
-  endif()  
-  
-else()
-  message( STATUS "libCGAL_Qt4 needs Qt4, cannot be configured.")
-endif()
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/DemosMainWindow.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/DemosMainWindow.cpp
deleted file mode 100644
index 843bcd9..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/DemosMainWindow.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <CGAL/Qt/GraphicsViewNavigation.h>
-#include <QApplication>
-#include <QLabel>
-#include <QFile>
-#include <QFileDialog>
-#include <QFileInfo>
-#include <QMenu>
-#include <QMenuBar>
-#include <QAction>
-#include <QMessageBox>
-#include <QStatusBar>
-#include <QGraphicsView>
-#include <QGLWidget>
-#include <QTextStream>
-#include <QSettings>
-#include <QUrl>
-#include <QDesktopWidget>
-#include <QRegExp>
-#include <QSvgGenerator>
-
-#include <CGAL/config.h> // needed to get CGAL_VERSION_STR
-#include <CGAL/Qt/DemosMainWindow.h>
-#include <iostream>
-
-namespace CGAL {
-namespace Qt {
-
-DemosMainWindow::DemosMainWindow(QWidget * parent, ::Qt::WindowFlags flags)
-  : QMainWindow(parent, flags),
-    maxNumRecentFiles(10),
-    recentFileActs(maxNumRecentFiles)
-{
-  // prepare the QLabel xycoord for inclusion in the statusBar()
-  xycoord = new QLabel(" -0.00000 , -0.00000 ", this);
-  xycoord->setAlignment(::Qt::AlignHCenter);
-  xycoord->setMinimumSize(xycoord->sizeHint());
-  xycoord->clear();
-
-  actionUse_OpenGL = new QAction(this);
-  actionUse_OpenGL->setObjectName("actionUse_OpenGL");
-  actionUse_OpenGL->setCheckable(true);
-  actionUse_OpenGL->setText(tr("Use &OpenGL"));
-  actionUse_OpenGL->setStatusTip(tr("Make Qt use OpenGL to display the graphical items, instead of its native painting system."));
-  actionUse_OpenGL->setShortcut(tr("Ctrl+G"));
-
-  actionUse_Antialiasing = new QAction(this);
-  actionUse_Antialiasing->setObjectName("actionUse_Antialiasing");
-  actionUse_Antialiasing->setCheckable(true);
-  actionUse_Antialiasing->setText(tr("Use &anti-aliasing"));
-  actionUse_Antialiasing->setStatusTip(tr("Make Qt use anti-aliasing when displaying the graphical items."));
-  actionUse_Antialiasing->setShortcut(tr("Ctrl+A"));
-
-  actionAboutCGAL = new QAction(this);
-  actionAboutCGAL->setObjectName("actionAboutCGAL");
-  actionAboutCGAL->setText(tr("About &CGAL..."));
-
-  actionAbout = new QAction(this);
-  actionAbout->setObjectName("actionAbout");
-  actionAbout->setText(tr("&About..."));
-
-  setAcceptDrops(true);
-}
-
-
-void 
-DemosMainWindow::dragEnterEvent(QDragEnterEvent *event)
-{
-  if (event->mimeData()->hasFormat("text/uri-list"))
-    event->acceptProposedAction();
-}
-
-void 
-DemosMainWindow::dropEvent(QDropEvent *event)
-{
-  Q_FOREACH(QUrl url, event->mimeData()->urls()) {
-    QString filename = url.toLocalFile();
-    this->open(filename);
-  }
-  event->acceptProposedAction();
-}
-
-void
-DemosMainWindow::addNavigation(QGraphicsView* graphicsView)
-{
-  navigation = new CGAL::Qt::GraphicsViewNavigation();
-  graphicsView->viewport()->installEventFilter(navigation);
-  graphicsView->installEventFilter(navigation);
-  QObject::connect(navigation, SIGNAL(mouseCoordinates(QString)),
-		   xycoord, SLOT(setText(QString)));
-  view = graphicsView;
-}
-
-void
-DemosMainWindow::setupStatusBar()
-{
-  this->statusBar()->addWidget(new QLabel(this), 1);
-  this->statusBar()->addWidget(xycoord, 0);
-}
-
-void
-DemosMainWindow::setupOptionsMenu(QMenu* menuOptions)
-{
-  // search for the Options menu
-  if(!menuOptions) {
-    menuOptions = getMenu("menuOptions", tr("&Options"));
-  }
-
-  // if not found, then create it
-  if(!menuOptions) {
-    menuOptions = new QMenu(this->menuBar());
-    menuOptions->setTitle(tr("&Options"));
-    this->menuBar()->addAction(menuOptions->menuAction());
-    menuOptions->setObjectName("menuOptions");
-  }
-
-  if(!menuOptions->isEmpty()) {
-    menuOptions->addSeparator();
-  }
-  menuOptions->addAction(actionUse_OpenGL);
-  menuOptions->addAction(actionUse_Antialiasing);
-  connect(actionUse_Antialiasing, SIGNAL(toggled(bool)),
-          this, SLOT(setUseAntialiasing(bool)));
-  connect(actionUse_OpenGL, SIGNAL(toggled(bool)),
-          this, SLOT(setUseOpenGL(bool)));
-  actionUse_Antialiasing->setChecked(true);
-}
-
-void
-DemosMainWindow::setupExportSVG(QAction* action, QGraphicsView* view)
-{
-  this->view = view;
-  connect(action, SIGNAL(triggered(bool)),
-	  this, SLOT(exportSVG()));
-}
-
-void DemosMainWindow::exportSVG()
-{
-  QString fileName = QFileDialog::getSaveFileName(this,
-						  tr("Export to SVG"),
-						  ".",
-						  tr("SVG (*.svg)\n"));
-
-  QSvgGenerator svg;
-  svg.setFileName(fileName);
-
-  svg.setSize(this->view->size());
-  svg.setViewBox(this->view->sceneRect());
-  svg.setTitle(tr("%1 drawing").arg(qApp->applicationName()));
-  svg.setDescription(tr("Generated using %1").arg(qApp->applicationName()));
-
-  QPainter painter;
-  painter.begin(&svg);
-  this->view->render(&painter);
-  painter.end();
-}
-
-void
-DemosMainWindow::setUseAntialiasing(bool checked)
-{
-  view->setRenderHint(QPainter::Antialiasing, checked);
-#if QT_VERSION >= 0x040300
-  view->setRenderHint(QPainter::HighQualityAntialiasing, checked);
-#endif
-  statusBar()->showMessage(tr("Antialiasing %1activated").arg(checked?"":"de-"),
-                           1000);
-}
-
-void
-DemosMainWindow::setUseOpenGL(bool checked)
-{ 
-  if(checked) {
-    QGLWidget* new_viewport = new QGLWidget;
-
-    // Setup the format to allow antialiasing with OpenGL:
-    // one need to activate the SampleBuffers, if the graphic driver allows
-    // this.
-    QGLFormat glformat = new_viewport->format();
-    glformat.setOption(QGL::SampleBuffers);
-    new_viewport->setFormat(glformat);
-
-    view->setViewport(new_viewport);
-  }
-  else {
-    view->setViewport(new QWidget);
-  }
-  statusBar()->showMessage(tr("OpenGL %1activated").arg(checked?"":"de-"),
-                           1000);
-  view->viewport()->installEventFilter(navigation);
-  view->setFocus();
-}
-
-QMenu* 
-DemosMainWindow::getMenu(QString objectName, QString title)
-{
-  QMenu* menu = NULL;
-
-  QString title2 = title;
-  title2.remove('&');
-  // search if a menu has objectName()==objectName
-  menu = this->findChild<QMenu*>(objectName);
-
-  // then search if a menu has title()==title
-  if(menu) {
-    return menu;
-  } else {
-    Q_FOREACH(menu, this->findChildren<QMenu*>()) {
-      if(menu->title() == title ||
-         menu->title() == title2) {
-        return menu;
-      }
-    }
-  }
-  return NULL;
-}
-
-void 
-DemosMainWindow::popupAboutBox(QString title, QString html_resource_name)
-{
-  QFile about_CGAL(html_resource_name);
-  about_CGAL.open(QIODevice::ReadOnly);
-  QString about_CGAL_txt = QTextStream(&about_CGAL).readAll();
-#ifdef CGAL_VERSION_STR
-  QString cgal_version(CGAL_VERSION_STR);
-#  ifdef CGAL_FAKE_PUBLIC_RELEASE
-  cgal_version.replace(QRegExp("-Ic?.*"), "");
-#  endif
-  about_CGAL_txt.replace("<!--CGAL_VERSION-->",
-                         QString(" (version %1)")
-                         .arg(cgal_version));
-#endif
-  QMessageBox mb(QMessageBox::NoIcon,
-                 title,
-                 about_CGAL_txt,
-                 QMessageBox::Ok,
-                 this);
-
-  QLabel* mb_label = mb.findChild<QLabel*>("qt_msgbox_label");
-  if(mb_label) {
-    mb_label->setTextInteractionFlags(mb_label->textInteractionFlags() | 
-                                      ::Qt::LinksAccessibleByMouse | 
-                                      ::Qt::LinksAccessibleByKeyboard);
-  }
-  else {
-    std::cerr << "Cannot find child \"qt_msgbox_label\" in QMessageBox\n"
-              << "  with Qt version " << QT_VERSION_STR << "!\n";
-  }
-  mb.exec();
-}
-
-QMenu* DemosMainWindow::getHelpMenu()
-{
-  QMenu* menuHelp = getMenu("menuHelp", tr("&Help"));
-  if(!menuHelp) {
-    menuHelp = new QMenu(this->menuBar());
-    menuHelp->setTitle(tr("&Help"));
-    this->menuBar()->addAction(menuHelp->menuAction());
-    menuHelp->setObjectName("menuHelp");
-  }
-  return menuHelp;
-}
-
-void 
-DemosMainWindow::addAboutCGAL(QMenu* menuHelp)
-{
-  if(!menuHelp) {
-    menuHelp = getHelpMenu();
-  }
-  menuHelp->addAction(actionAboutCGAL);
-
-  connect(actionAboutCGAL, SIGNAL(triggered()),
-          this, SLOT(popupAboutCGAL()));
-}
-
-void 
-DemosMainWindow::addAboutDemo(QString htmlResourceName, QMenu* menuHelp)
-{
-  if(!menuHelp) {
-    menuHelp = getHelpMenu();
-  }
-  menuHelp->addAction(actionAbout);
-  aboutHtmlResource = htmlResourceName;
-
-  connect(actionAbout, SIGNAL(triggered()),
-          this, SLOT(popupAboutDemo()));
-}
-
-void
-DemosMainWindow::popupAboutCGAL()
-{
-  popupAboutBox(tr("About CGAL..."),
-                ":/cgal/help/about_CGAL.html");
-}
-
-void
-DemosMainWindow::popupAboutDemo()
-{
-  popupAboutBox(tr("About the demo..."),
-                aboutHtmlResource);
-}
-
-void
-DemosMainWindow::setMaxNumberOfRecentFiles(const unsigned int i)
-{
-  maxNumRecentFiles = i;
-  recentFileActs.resize(maxNumRecentFiles);
-}
-
-unsigned int 
-DemosMainWindow::maxNumberOfRecentFiles() const
-{
-  return maxNumRecentFiles;
-}
-
-void 
-DemosMainWindow::openRecentFile_aux()
-{
-  QAction *action = qobject_cast<QAction *>(sender());
-  if (action)
-    emit openRecentFile(action->data().toString());
-}
-
-void 
-DemosMainWindow::addToRecentFiles(QString fileName)
-{
-  QSettings settings;
-  QStringList files = settings.value("recentFileList").toStringList();
-  files.removeAll(fileName);
-  files.prepend(fileName);
-  while (files.size() > (int)maxNumberOfRecentFiles())
-    files.removeLast();
-
-  settings.setValue("recentFileList", files);
-
-  updateRecentFileActions();
-}
-
-void
-DemosMainWindow::addRecentFiles(QMenu* menu, QAction* insertBeforeAction)
-{
-  if(!insertBeforeAction) {
-    recentFilesSeparator = menu->addSeparator();
-  }
-
-  for (unsigned int i = 0; i < maxNumberOfRecentFiles(); ++i) {
-    recentFileActs[i] = new QAction(this);
-    recentFileActs[i]->setVisible(false);
-    connect(recentFileActs[i], SIGNAL(triggered()),
-            this, SLOT(openRecentFile_aux()));
-    if(insertBeforeAction)
-      menu->insertAction(insertBeforeAction, recentFileActs[i]);
-    else
-      menu->addAction(recentFileActs[i]);
-  }
-
-  if(insertBeforeAction) {
-    recentFilesSeparator = menu->insertSeparator(insertBeforeAction);
-  }
-
-  recentFilesSeparator->setVisible(false);
-
-  updateRecentFileActions();
-}
-
-void 
-DemosMainWindow::updateRecentFileActions()
-{
-  QSettings settings;
-  QStringList files = settings.value("recentFileList").toStringList();
-
-  int numRecentFiles = qMin(files.size(), (int)this->maxNumberOfRecentFiles());
-  
-  for (int i = 0; i < numRecentFiles; ++i) {
-    QString strippedName = QFileInfo(files[i]).fileName();
-    QString text = tr("&%1 %2").arg(i).arg(strippedName);
-    recentFileActs[i]->setText(text);
-    recentFileActs[i]->setData(files[i]);
-    recentFileActs[i]->setVisible(true);
-  }
-  for (unsigned int j = numRecentFiles; j < maxNumberOfRecentFiles(); ++j)
-    recentFileActs[j]->setVisible(false);
-  
-  recentFilesSeparator->setVisible(numRecentFiles > 0);
-}
-
-void DemosMainWindow::writeState(QString groupname)
-{
-  QSettings settings;
-
-  settings.beginGroup(groupname);
-  settings.setValue("size", size());
-  settings.setValue("pos", pos());
-  settings.setValue("state", saveState());
-  settings.endGroup();
-}
-
-void DemosMainWindow::readState(QString groupname, Options /*what_to_save*/)
-{
-  QSettings settings;
-  
-  settings.beginGroup(groupname);
-  resize(settings.value("size", this->size()).toSize());
-
-  QDesktopWidget* desktop = qApp->desktop();
-  QPoint pos = settings.value("pos", this->pos()).toPoint();
-  if(desktop->availableGeometry(pos).contains(pos)) {
-    move(pos);
-  }
-  QByteArray mainWindowState = settings.value("state").toByteArray();
-  if(!mainWindowState.isNull()) {
-    this->restoreState(mainWindowState);
-  }
-  settings.endGroup();
-}
-
-
-} // namespace Qt
-} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsView.qtmoc.cmake b/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsView.qtmoc.cmake
deleted file mode 100644
index 784dc09..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsView.qtmoc.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-# moc files that are compiled directly as cpp files
-qt4_wrap_cpp(mocfiles ../../include/CGAL/Qt/GraphicsViewNavigation.h 
-                      ../../include/CGAL/Qt/DemosMainWindow.h
-                      ../../include/CGAL/Qt/GraphicsItem.h
-                      ../../include/CGAL/Qt/GraphicsViewInput.h)
-
-# qrc files (resources files, that contain icons, at least)
-qt4_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc)
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewNavigation.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewNavigation.cpp
deleted file mode 100644
index 712c4bb..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewNavigation.cpp
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <CGAL/Qt/GraphicsViewNavigation.h>
-#include <CGAL/Qt/utility.h> // for mapToScene(QGraphicsView*, QRect)
-#include <cmath>
-#include <iostream>
-#include <boost/format.hpp>
-
-#include <QEvent>
-#include <QMouseEvent>
-#include <QWheelEvent>
-#include <QGraphicsView>
-#include <QGraphicsScene>
-#include <QGraphicsRectItem>
-#include <QFlags>
-#include <QScrollBar>
-
-namespace CGAL {
-namespace Qt {
-
-  GraphicsViewNavigation::GraphicsViewNavigation()
-    : rectItem(new QGraphicsRectItem),
-      dragging(false)
-  {
-    QColor rect_color(250, 221, 0);
-    rect_color.setAlpha(50);
-    rectItem->setBrush(rect_color);
-    rect_color.setAlpha(255);
-    rectItem->setPen(QPen(rect_color, 0, ::Qt::DashLine));
-    rectItem->hide();
-    rectItem->setZValue(10000);
-  }
-
-  GraphicsViewNavigation::~GraphicsViewNavigation()
-  {
-    delete rectItem;
-  }
-
-  bool 
-  GraphicsViewNavigation::eventFilter(QObject *obj, QEvent *event)
-  {
-    QGraphicsView* v = qobject_cast<QGraphicsView*>(obj);
-    if(v == NULL) {
-      QWidget* viewport = qobject_cast<QWidget*>(obj);
-      if(viewport == NULL) {
-        return false;
-      }
-      v = qobject_cast<QGraphicsView*>(viewport->parent());
-      if(v == NULL) {
-        return false;
-      }
-    }
-    switch(event->type()) 
-    {
-    case QEvent::KeyPress: {
-      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
-      int offset = 10;
-      if( (keyEvent->modifiers() & ::Qt::ShiftModifier)
-          || (keyEvent->modifiers() & ::Qt::ControlModifier) ) {
-        offset = 20;
-      }
-      switch (keyEvent->key()) {
-      case ::Qt::Key_Up:
-        translateView(v, 0, -offset);
-        break;
-      case ::Qt::Key_Down:
-        translateView(v, 0, offset);
-        break;
-      case ::Qt::Key_Left:
-        translateView(v, -offset, 0);
-        break;
-      case ::Qt::Key_Right:
-        translateView(v, offset, 0);
-        break;
-      case ::Qt::Key_PageUp:
-        v->rotate(-6);
-        break;
-      case ::Qt::Key_PageDown:
-        v->rotate(6);
-        break;
-      case ::Qt::Key_Plus:
-        scaleView(v, 1.2);
-        break;
-      case ::Qt::Key_Minus:
-        scaleView(v, 1 / 1.2);
-        break;
-      case ::Qt::Key_Control:
-        cursor_backup = v->cursor();
-        v->setCursor(::Qt::CrossCursor);
-      default:
-        return false;
-      }
-      //         display_parameters();
-      return true;
-      break;
-    } // end case KeyPress
-    case QEvent::KeyRelease: {
-      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
-      if(keyEvent->key() == ::Qt::Key_Control) {
-        if(rectItem->isVisible() ) {
-          dragging = false;
-          v->scene()->removeItem(rectItem);
-          rectItem->hide();
-        }
-        v->setCursor(cursor_backup);
-        return true;
-      }
-      return false;
-      break;
-    } // end case KeyRelease
-    case QEvent::Wheel: {
-      QWheelEvent *wheelEvent = static_cast<QWheelEvent*>(event);
-      if(wheelEvent->orientation() != ::Qt::Vertical) {
-        return false;
-      }
-      double zoom_ratio = 240.0;
-      if( (wheelEvent->modifiers() & ::Qt::ShiftModifier)
-          || (wheelEvent->modifiers() & ::Qt::ControlModifier) ) {
-        zoom_ratio = 120.0;
-      }
-      scaleView(v, pow((double)2, -wheelEvent->delta() / zoom_ratio));
-
-      //         display_parameters();
-      return true;
-      break;
-    } // end case Wheel
-    case QEvent::MouseButtonPress: {
-      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
-      if( (mouseEvent->modifiers() == (::Qt::ControlModifier | ::Qt::ShiftModifier))
-          && mouseEvent->button() == ::Qt::RightButton )
-      {
-        QPoint offset = mouseEvent->pos() - v->viewport()->rect().center();
-        translateView(v, offset.x(), offset.y());
-        return true;
-      }
-      else if( mouseEvent->modifiers() == ::Qt::ControlModifier ) {
-        if(mouseEvent->button() == ::Qt::LeftButton) {
-          rect_first_point = v->mapToScene(mouseEvent->pos());
-          rectItem->setRect(QRectF(rect_first_point, QSizeF(0.,0.)));
-          rectItem->show();
-          v->scene()->addItem(rectItem);
-          return true;
-        }
-        else if( mouseEvent->button() == ::Qt::RightButton) {
-          dragging = true;
-          dragging_start = v->mapToScene(mouseEvent->pos());
-          v->setCursor(::Qt::ClosedHandCursor);
-          return true;
-        }
-      }
-      return false;
-      break;
-    } // end case MouseRelease
-    case QEvent::MouseMove: {
-      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
-      QPointF pos = v->mapToScene(mouseEvent->pos());
-      QString xy = QString(" ") + QString::number(pos.x(),'g', 6) + " , " + QString::number(pos.y(),'g', 6) + " ";
-      emit mouseCoordinates(xy);
-      if(rectItem->isVisible()) {
-	QPointF size = v->mapToScene(mouseEvent->pos());
-	size = size - rect_first_point;
-        rectItem->setRect(rect_first_point.x(),
-			  rect_first_point.y(),
-			  size.x(),
-			  size.y());
-      }
-      if( dragging )
-      {
-//         std::cerr << boost::format("mouseMove: globalpos=(%1%, %2%)\n"
-//                                    "           pos=(%3%, %4%)\n"
-//                                    "           sender=%5% (class %6%), parent class %7%\n")
-//           % mouseEvent->globalPos().x()
-//           % mouseEvent->globalPos().y()
-//           % mouseEvent->pos().x()
-//           % mouseEvent->pos().y()
-//           % (&*obj)
-//           % obj->metaObject()->className()
-//           % obj->parent()->metaObject()->className();
-
-//         drag_to(mouseEvent->pos());
-      }
-      break;
-    } // end MouseMove
-    case QEvent::MouseButtonRelease: {
-      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
-      if(rectItem->isVisible() && mouseEvent->button() == ::Qt::LeftButton){
-        v->setSceneRect(v->sceneRect() | rectItem->rect());
-        v->fitInView(rectItem->rect(), ::Qt::KeepAspectRatio);
-        v->scene()->removeItem(rectItem);
-        rectItem->hide();
-        return true;
-      }
-      else if(  mouseEvent->button() == ::Qt::RightButton ) {
-        if(dragging) {
-          dragging = false;
-          drag_to(v, mouseEvent->pos());
-          v->setCursor(cursor_backup);
-          return true;
-        }
-      }
-      return false;
-      break;
-    } // end MouseRelease
-    default:
-      return false;
-    } // end switch
-    return false;
-  }
-
-
-  void 
-  GraphicsViewNavigation::scaleView(QGraphicsView* v, qreal scaleFactor)
-  {
-    QPointF center = v->mapToScene(v->viewport()->rect().center());
-//     qreal factor = v->matrix().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width();
-    //if (factor < 0.001 || factor > 2000)
-    //    return;
-
-    v->scale(scaleFactor, scaleFactor);
-    QPoint offset = v->mapFromScene(center) - v->viewport()->rect().center();
-    translateView(v, offset.x(), offset.y());
-  }
-
-  void GraphicsViewNavigation::drag_to(QGraphicsView* v, QPoint new_pos)
-  {
-    QPoint dragging_start_in_view = v->mapFromScene(dragging_start);
-    QPoint offset = new_pos - dragging_start_in_view;
-//     std::cerr << boost::format("drag_to: origin=(%1%, %2%)\n"
-//                                "         offset=(%3%, %4%)\n")
-//       % dragging_start_in_view.x() % dragging_start_in_view.y()
-//       % offset.x() % offset.y();
-    translateView(v, -offset.x(), -offset.y());
-    dragging_start_in_view = v->mapFromScene(dragging_start);
-//     std::cerr << boost::format("         after=(%1%, %2%)\n")
-//       % dragging_start_in_view.x() % dragging_start_in_view.y();
-  }
-
-  void GraphicsViewNavigation::translateView(QGraphicsView* v, int dx,  int dy)
-  {
-    if( dx == 0 && dy == 0 ) {
-      return;
-    }
-
-    int horizontalScrollBarValue = v->horizontalScrollBar()->value();
-    int verticalScrollBarValue = v->verticalScrollBar()->value();
-
-    if( (horizontalScrollBarValue + dx <= 
-         v->horizontalScrollBar()->maximum()) &&
-        (horizontalScrollBarValue + dx >=
-         v->horizontalScrollBar()->minimum()) &&
-        (verticalScrollBarValue + dy <= 
-         v->verticalScrollBar()->maximum()) &&
-        (verticalScrollBarValue + dy >=
-         v->verticalScrollBar()->minimum()) )
-    {
-      v->horizontalScrollBar()->setValue(horizontalScrollBarValue + dx);
-      v->verticalScrollBar()->setValue(verticalScrollBarValue + dy);
-    }
-    else
-    {
-      QRect vp_rect = v->viewport()->rect();
-      QPointF new_center = v->mapToScene(vp_rect.center() + QPoint(dx, dy));
-      vp_rect |= vp_rect.translated(dx, dy);
-      QRectF rect = mapToScene(v, vp_rect);
-      v->setSceneRect(v->sceneRect() | rect);
-      v->centerOn(new_center);
-
-      // QGraphicsView::centerOn makes rounding errors.
-      // The following two "if" make them unnoticable when dx==0 or dy==0.
-      if(dx == 0) {
-        v->horizontalScrollBar()->setValue(horizontalScrollBarValue);
-      }
-      if(dy == 0) {
-        v->verticalScrollBar()->setValue(verticalScrollBarValue);
-      }
-    }
-//     display_parameters();
-  }
-
-  void GraphicsViewNavigation::display_parameters(QGraphicsView* v)
-  {
-    std::cerr << 
-      boost::format("matrix translation=(%1%, %2%)\n"
-                    "       rotation=(%3% - %4% )\n"
-                    "                (%5% - %6% )\n")
-      % v->matrix().dx()
-      % v->matrix().dy()
-      % v->matrix().m11()
-      % v->matrix().m12()
-      % v->matrix().m21()
-      % v->matrix().m22();
-
-    QRect vp_rect = v->viewport()->rect();
-    QPoint vp_top_left = vp_rect.topLeft();
-    QPoint vp_bottom_right = vp_rect.bottomRight();
-    QPointF top_left = v->mapToScene(vp_top_left);
-    QPointF bottom_right = v->mapToScene(vp_bottom_right);
-
-    std::cerr <<
-      boost::format("view=(%1% - %2%) x (%3% - %4%)\n")
-      % top_left.x() % bottom_right.x()
-      % top_left.y() % bottom_right.y();
-    std::cerr <<
-      boost::format("viewport=(%1% - %2%) x (%3% - %4%)\n")
-      % vp_top_left.x() % vp_bottom_right.x()
-      % vp_top_left.y() % vp_bottom_right.y();
-    std::cerr <<
-      boost::format("scrollbars=(%1% <= %2% <= %3%) x (%4% <= %5% <= %6%)\n")
-      % v->horizontalScrollBar()->minimum() 
-      % v->horizontalScrollBar()->value()
-      % v->horizontalScrollBar()->maximum()
-      % v->verticalScrollBar()->minimum() 
-      % v->verticalScrollBar()->value()
-      % v->verticalScrollBar()->maximum();
-  }
-
-} // namespace Qt
-} // namespace CGAL
-
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewPolylineInput.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewPolylineInput.cpp
deleted file mode 100644
index 7780ef0..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/GraphicsViewPolylineInput.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <QGraphicsItem>
-#include <QGraphicsPathItem> 
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
-#include <QPainter>
-#include <QPolygonF>
-#include <QPainterPath>
-#include <QEvent>
-#include <QKeyEvent>
-
-#include <CGAL/Qt/GraphicsViewPolylineInput.h>
-
-namespace CGAL {
-namespace Qt {
-
-GraphicsViewPolylineInput_non_templated_base::
-GraphicsViewPolylineInput_non_templated_base(QObject* parent,
-                                   QGraphicsScene* s,
-                                   int n,
-                                   bool closed)
-  : GraphicsViewInput(parent), closed_(closed), path_item(NULL), b(NULL), e(NULL), n_(n), scene_(s)
-{}
-
-
-bool
-GraphicsViewPolylineInput_non_templated_base::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{ 
-  if( event->modifiers() ){
-    return false;
-  }
-  if( event->button() != ::Qt::RightButton
-      && event->button() != ::Qt::LeftButton ){
-    return false;
-  }
-  polygon.push_back(event->scenePos());
-  if(path_item){
-    scene_->removeItem(path_item);
-    delete path_item;
-    path_item = NULL;
-  }
-  if( (event->button() == ::Qt::RightButton) || (polygon.size() == n_) ){
-    // call the virtual function generate_polygon(), that emit a
-    // CGAL::Object containing a list of points
-    generate_polygon();
-    polygon.clear();
-    if(b){
-      scene_->removeItem(b);
-      delete b;
-      b = NULL;
-    }
-    if(e){
-      scene_->removeItem(e);
-      delete e;
-      e = NULL;
-    }
-    return true;
-  }
-  if(event->button() == ::Qt::LeftButton){
-    QPainterPath qpp;
-    qpp.addPolygon(polygon);
-    path_item = new QGraphicsPathItem(qpp);
-    path_item->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
-    scene_->addItem(path_item);
-    return true;
-  }
-  return false;
-}
-
-
-void 
-GraphicsViewPolylineInput_non_templated_base::rubberbands(const QPointF& p)
-{
-  if(polygon.empty()){
-    return;
-  }
-  if(!b && closed_ ){
-    b = new QGraphicsLineItem();
-    b->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
-    scene_->addItem(b);
-  }
-  if( !e){
-    e = new QGraphicsLineItem();    
-    e->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
-    scene_->addItem(e);
-  }
-  if(closed_){
-    QLineF bLine(polygon.front(), p);
-    b->setLine(bLine);
-  }
-  QLineF eLine(polygon.back(), p);
-  e->setLine(eLine); 
-}
-
-
-void 
-GraphicsViewPolylineInput_non_templated_base::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
-  sp = event->scenePos();
-  rubberbands(sp);
-}
-
-
-bool
-GraphicsViewPolylineInput_non_templated_base::keyPressEvent ( QKeyEvent * event ) 
-{
-  if( event->modifiers() )
-    return false;
-
-  switch(event->key())
-  {
-  case ::Qt::Key_Delete:
-  case ::Qt::Key_Escape:
-  case ::Qt::Key_Backspace:
-    break;
-  default:
-    return false;
-  }
-  if(polygon.empty()){
-    return true;
-  }
-  polygon.pop_back();
-  if(polygon.empty()){
-    if(b){
-      scene_->removeItem(b);
-      delete b;
-      b = NULL;
-    }
-    if(e){
-      scene_->removeItem(e);
-      delete e;
-      e = NULL;
-    }
-    return true;
-  }
-  if(path_item){
-    scene_->removeItem(path_item);
-    delete path_item;
-    path_item = NULL;
-  }
-  QPainterPath qpp;
-  qpp.addPolygon(polygon);
-  path_item = new QGraphicsPathItem(qpp);
-  path_item->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
-  scene_->addItem(path_item);
-  rubberbands(sp);
-  return true;
-}
-
-
-
-bool 
-GraphicsViewPolylineInput_non_templated_base::eventFilter(QObject *obj, QEvent *event)
-{
-  if (event->type() == QEvent::GraphicsSceneMousePress) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    if(!mousePressEvent(mouseEvent)) {
-      // standard event processing if mousePressEvent has returned false
-      return QObject::eventFilter(obj, event);
-    }
-  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
-    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
-    mouseMoveEvent(mouseEvent);
-    return QObject::eventFilter(obj, event);
-  } else if (event->type() == QEvent::KeyPress) {
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-    if(!keyPressEvent(keyEvent)) {
-      return QObject::eventFilter(obj, event);
-    }
-  }
-  // standard event processing if keyPressEvent has returned false
-  return QObject::eventFilter(obj, event);
-}
-
-} // namespace Qt
-} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/debug.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/debug.cpp
deleted file mode 100644
index 6d7712a..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/debug.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <CGAL/Qt/debug.h>
-#include <QDir>
-
-#include <iostream>
-
-namespace CGAL {
-namespace Qt {
-
-
-void traverse_resources(const QString& name, const QString& dirname, int indent)
-{
-  std::cerr << qPrintable(QString(indent, ' '))
-            << qPrintable(name);
-  QString fullname = 
-    dirname.isEmpty() ?
-    name :
-    dirname + "/" + name;
-  QDir dir(fullname);
-  if(dir.exists()) {
-    std::cerr << "/\n";
-    Q_FOREACH(QString path, dir.entryList())
-    {
-      traverse_resources(path, fullname, indent + 2);
-    }
-  }
-  else {
-    std::cerr << "\n";
-  }
-}
-
-} // namesapce Qt
-} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/resources.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/resources.cpp
deleted file mode 100644
index e15cc66..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/resources.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <QDir>
-#include <CGAL/Qt/resources.h>
-
-// cannot use namespaces because of the Q_INIT_RESOURCE macro
-void CGAL_Qt4_init_resources() {
-  Q_INIT_RESOURCE(File);
-  Q_INIT_RESOURCE(Triangulation_2); 
-  Q_INIT_RESOURCE(Input);
-  Q_INIT_RESOURCE(CGAL);
-}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_Qt4/utility.cpp b/3rdparty/CGAL-4.6/src/CGAL_Qt4/utility.cpp
deleted file mode 100644
index caa1ea3..0000000
--- a/3rdparty/CGAL-4.6/src/CGAL_Qt4/utility.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2008  GeometryFactory Sarl (France).
-// All rights reserved.
-//
-// This file is part of CGAL (www.cgal.org).
-// You can redistribute it and/or modify it under the terms of the GNU
-// General Public License as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// Licensees holding a valid commercial license may use this file in
-// accordance with the commercial license agreement provided with the software.
-//
-// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-//
-// $URL$
-// $Id$
-// 
-//
-// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
-//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
-
-#include <CGAL/Qt/utility.h>
-#include <QGraphicsScene>
-#include <QGraphicsView>
-#include <QList>
-#include <QPoint>
-#include <QPointF>
-
-namespace CGAL {
-namespace Qt {
-
-QRectF mapToScene(const QGraphicsView* v, const QRect rect)
-{
-  QPointF top_left = v->mapToScene(rect.topLeft());
-  QPointF size = v->mapToScene(rect.bottomRight());
-  size -= top_left;
-  return QRectF(top_left.x(),
-		top_left.y(),
-		size.x(),
-		size.y());
-}
-
-QRectF viewportsBbox(const QGraphicsScene* scene) {
-   QRectF rect;
-   Q_FOREACH(QGraphicsView* view, scene->views())
-   {
-     rect |= mapToScene(view, view->viewport()->rect());
-   }
-   rect = rect.normalized();
-   return rect;
-}
-
-} // namespace Qt
-} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/src/CMakeLists.txt b/3rdparty/CGAL-4.6/src/CMakeLists.txt
deleted file mode 100644
index 2cfbf2b..0000000
--- a/3rdparty/CGAL-4.6/src/CMakeLists.txt
+++ /dev/null
@@ -1,167 +0,0 @@
-function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
-  # IMPORTANT: First delete all_files.cpp
-  if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
-    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
-  endif()
-
-  # THEN collect *.cpp
-  foreach (package ${CGAL_CONFIGURED_PACKAGES} )
-    file(GLOB CGAL_LIBRARY_SOURCE_FILES_TMP ${package}/src/${LIBRARY_NAME}/*.cpp)
-    list(APPEND CGAL_LIBRARY_SOURCE_FILES ${CGAL_LIBRARY_SOURCE_FILES_TMP})
-  endforeach()
-
-  foreach(source ${CGAL_LIBRARY_SOURCE_FILES})
-    # It may happen that a file all_files.cpp had been created in-source by
-    # a previous in-source build. We certainly do not want to include that
-    # file in the new all_files.cpp because .cpp files would be included
-    # twice, and that breaks the one-definition rule (ODR).
-    if(NOT source MATCHES ".*/all_files.cpp")
-      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp "\#include \"${source}\"\n")
-    endif()
-  endforeach()
-
-  if(CGAL_BUILD_SHARED_LIBS)
-    set(CGAL_LIB_PREFIX "")
-  else()
-    set(CGAL_LIB_PREFIX "lib")
-  endif()
-
-  set(RELEASE_MANGLED_NAME        "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}" ) 
-  set(DEBUG_MANGLED_NAME          "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}" ) 
-
-  if(CGAL_BUILD_SHARED_LIBS AND WIN32)
-    configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/src/CGAL_libs_verinfo.rc.in ${LIBRARY_NAME}_verinfo.rc @ONLY)
-    set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_verinfo.rc)
-  else()
-    set(rc_file )
-  endif()
-
-  add_library (${LIBRARY_NAME}
-    ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp 
-    ${rc_file}
-    ${ADDITIONAL_FILES})
-#  add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp
-  if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
-    set_target_properties(${LIBRARY_NAME} PROPERTIES 
-      VERSION "${CGAL_SOVERSION}" 
-      SOVERSION "${CGAL_SONAME_VERSION}")
-  endif()
-
-  if (NOT CGAL_AUTO_LINK_ENABLED )
-    get_target_property( ${LIBRARY_NAME}_LIBRARY_FULL_PATH ${LIBRARY_NAME} LOCATION  )
-  
-    set(${LIBRARY_NAME}_LIBRARY ${${LIBRARY_NAME}_LIBRARY_FULL_PATH} CACHE STRING "The ${LIBRARY_NAME} library" FORCE)
-    mark_as_advanced(${LIBRARY_NAME}_LIBRARY)
-  else(NOT CGAL_AUTO_LINK_ENABLED)
-    set(${LIBRARY_NAME}_LIBRARY)
-
-    set_target_properties( ${LIBRARY_NAME} PROPERTIES 
-      OUTPUT_NAME_DEBUG          "${DEBUG_MANGLED_NAME}" 
-      OUTPUT_NAME_RELEASE        "${RELEASE_MANGLED_NAME}" 
-      OUTPUT_NAME_MINSIZEREL     "${RELEASE_MANGLED_NAME}" 
-      OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}" 
-      )
-    
-    if ( HAS_CFG_INTDIR )
-      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y \"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\" )
-      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y \"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\" )
-      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy /Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" \"$(SolutionDir)lib\" )
-    endif()
-  endif(NOT CGAL_AUTO_LINK_ENABLED)
-
-  install(TARGETS ${LIBRARY_NAME}
-          RUNTIME DESTINATION ${CGAL_INSTALL_BIN_DIR}
-          LIBRARY DESTINATION ${CGAL_INSTALL_LIB_DIR}
-          ARCHIVE DESTINATION ${CGAL_INSTALL_LIB_DIR})
-endfunction()
-
-function( configure_component DIR COMPONENT )
-  option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ON)
-  if ( WITH_${COMPONENT})
-    add_subdirectory( ${DIR} ${COMPONENT} )
-  endif()
-endfunction()
-
-# Output directory of libraries (.so, .dylib, non-static .lib)
-set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
-# Output directory of static libraries (.a, static .lib)
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
-
-# For output directory of DLLs (.dll files)
-set(CGAL_RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CGAL_RUNTIME_DIR})
-
-## Prevent use of intermediate directory with MSVC, because we use name
-## mangling
-#foreach(Conf_type ${CMAKE_CONFIGURATION_TYPES})
-#  # Conf_type is Debug, Release, DebWithDebInfo...
-#  string(TOUPPER ${Conf_type} CONF_TYPE)
-#  # CONF_TYPE is DEBUG, RELEASE, DEBWITHDEBINFO
-#  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
-#  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
-#  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
-#endforeach()
-
-# TODO: Seems useless, because it is called again in ../CMakeLists.txt
-#       Should probably be removed. -- Laurent Rineau, 2014/07/22
-create_CGALconfig_files()
-
-set(CGAL_DIR ${CMAKE_BINARY_DIR})
-
-add_subdirectory(CGAL)
-
-# search libs
-set(CGAL_CONFIGURED_LIBRARIES "")
- 
-foreach(package ${CGAL_CONFIGURED_PACKAGES}) 
-  file(GLOB CONFIGURED_LIBS_IN_PACKAGE ${package}/src/CGAL_*/CMakeLists.txt)
-  foreach (libconfigfile ${CONFIGURED_LIBS_IN_PACKAGE})
-    string(REPLACE "${package}/src/" "" libconfigfile ${libconfigfile})
-    string(REPLACE "//CMakeLists.txt" "" CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile})
-    if (NOT ${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL")
-
-     message(STATUS "Sources for CGAL component library '${CGAL_CONFIGURED_LIBRARY_NAME}' detected")
-      list(APPEND CGAL_CONFIGURED_LIBRARIES ${CGAL_CONFIGURED_LIBRARY_NAME})
-      #message(STATUS "Library config detected: ${CGAL_CONFIGURED_LIBRARIES}")
-
-      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY                  "" )
-      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS    "" )
-      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS   "" )
-      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES      "" )
-      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" ) 
-      if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core") 
-        if (NOT CGAL_NO_CORE)
-          configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
-        else(NOT CGAL_NO_CORE)
-          message( STATUS "CGAL_Core is not being configured (missing GMP, or 64bit architecture).")
-        endif(NOT CGAL_NO_CORE)
-      else()
-        configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
-      endif()
-
-     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY)
-
-     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS   )
-     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS  )
-     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES     )
-     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS) 
-
-    else() 
- 
-      list(APPEND CGAL_CONFIGURED_LIBRARIES CGAL)
-
-    endif()
-  endforeach()
-endforeach()
-
-if (NOT CGAL_CONFIGURED_LIBRARIES) 
-   message(FATAL_ERROR "No component library in configured packages found. Please fix package-file.")
-endif()
-
-list(REMOVE_DUPLICATES CGAL_CONFIGURED_LIBRARIES)
-list(SORT CGAL_CONFIGURED_LIBRARIES)
-cache_set(CGAL_CONFIGURED_LIBRARIES "${CGAL_CONFIGURED_LIBRARIES}")
-
-message(STATUS "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected")
-
diff --git a/3rdparty/CGAL-4.6/AUTHORS b/3rdparty/CGAL-4.8/AUTHORS
similarity index 100%
rename from 3rdparty/CGAL-4.6/AUTHORS
rename to 3rdparty/CGAL-4.8/AUTHORS
diff --git a/3rdparty/CGAL-4.8/CHANGES b/3rdparty/CGAL-4.8/CHANGES
new file mode 100644
index 0000000..0a7c233
--- /dev/null
+++ b/3rdparty/CGAL-4.8/CHANGES
@@ -0,0 +1,4448 @@
+
+-------------------------------- Release 4.8 --------------------------------
+
+Release date: April 2016
+
+
+* General
+
+  - The support for Qt3 is dropped and all demos using it got removed.
+
+
+* Installation
+
+  - Starting with Visual C++ 2015 we no longer require Boost.Thread as we use
+    the C++11 keyword thread_local and the C+11 class std::mutex .
+
+  - The same holds for g++ 4.8 or later when the C++11 standard is used.
+
+
+* Optimal Transportation Curve Reconstruction (new package)
+
+  - This package implements a method to reconstruct and simplify 2D point sets.
+    The input is a set of 2D points with mass attributes, possibly hampered by
+    noise and outliers. The output is a set of line segments and isolated
+    points which approximate the input points.
+
+
+* 2D Regularized Boolean Set-Operations
+
+  - Improve the performance of operations in some settings.
+    Breaking change: This improvement requires changes of the face and halfedge
+    type of the underlying arrangement Dcel. See the concepts
+    GeneralPolygonSetDcelHalfedge and GeneralPolygonSetDcelFace for more
+    details. If you use a different simplex types, inheriting your simplices
+    from CGAL::Gps_face_base and CGAL::Gps_halfedge_base is sufficient to
+    accommodate for the update.
+
+
+* 3D Boolean Operations on Nef Polyhedra
+
+  - Add 3 new constructors: from a point range, from a point, and from a
+    segment.
+
+
+* Combinatorial Maps
+
+  - Breaking change: Change the type of Boolean marks, old type is int, new
+    type is size_type. If no more mark is available, get_new_mark throws an
+    exception, instead of returning -1.
+
+
+* 2D Arrangements
+
+  - Speed up the edge removal in case the incident faces contains many holes.
+
+  - Set the format of polylines and polycurves. The format of a general
+    polyline or polycurve consists of the sequence of subcurves that comprise
+    the original curve. The format of a polyline of linear segments consists of
+    the sequence of points that define the original curve. (The latter restores
+    the format used before polycurves were introduced in 4.7.) Fix the
+    extraction from istream and insertion into ostream operators of polylines
+    and polycurves accordingly.
+
+  - Fix the traits class that handles Bezier curves. In particular, fix the
+    case where the curve is closed (i.e, the first and last control points
+    coincide).
+
+
+* 3D Mesh Generation
+
+  - Add support of 3D gray level images as input for the tetrahedral mesh
+    generation.
+
+  - Breaking change: All models of the concept MeshDomain_3 must now provide a
+    member function bbox().
+
+
+* Advancing Front Surface Reconstruction
+
+  - Optional template functor Filter is replaced by another optional template
+    functor Priority. This allows to change the way facets are prioritized by
+    the algorithm instead of having a simple option to reject some facets.
+    Breaking change: Programs using the old Filter API will not compile anymore
+    as it must be replaced with the Priority API as described in the manual.
+    Codes using the default behavior are not impacted.
+
+
+* Polygon Mesh Processing
+
+  - Add a new triangle-based isotropic remeshing algorithm for triangulated
+    surface meshes, CGAL::Polygon_mesh_processing::isotropic_remeshing() and a
+    helper function for isotropic remeshing : CGAL::Polygon_mesh_processing::
+    split_long_edges()
+
+  - Add the function CGAL::Polygon_mesh_processing::border_halfedges() to
+    collect the border of a given face range
+
+  - Add the function CGAL::Polygon_mesh_processing::remove_isolated_vertices()
+    to be used on any polygon mesh
+
+  - Add the function CGAL::Polygon_mesh_processing::triangulate_face() to
+    triangulate a single face of a polygon mesh
+
+  - Add an overload for CGAL::Polygon_mesh_processing::triangulate_faces() to
+    triangulate a range of faces of a polygon mesh
+
+  - Add function keep_large_connected_components()
+
+  - Add measuring functions for polygon meshes, to compute length, area, and
+    volume of simplices or group of simplices of a polygon mesh.
+
+  - Add function bbox_3() to compute the bounding box of a polygon mesh.
+
+
+* Surface Mesh Parameterization
+
+  - LSCM_parameterizer_3 now uses by default Eigen instead of OpenNL as a model
+    of SparseLinearAlgebraTraits_d.
+
+
+* Point Set Processing
+
+  - Breaking change: new template parameter Concurrency_tag for the functions
+    compute_average_spacing(), edge_aware_upsample_point_set(),
+    jet_estimate_normals(), jet_smooth_point_set(), and pca_estimate_normals().
+    To update your code simply add as first template parameter CGAL::
+    Sequential_tag or CGAL::Parallel_tag when calling one of these functions.
+
+  - CGAL::Parallel_tag can no longer be used in Point Set Processing algorithms
+    if TBB is not available.
+
+  - Add a new simplification algorithm based on hierarchical clustering: CGAL::
+    hierarchy_simplify_point_set(). It allows either to uniformly simplify the
+    point set or to automatically adapt the local density of points to the
+    local variation of the input computed by principal component analysis.
+
+  - New IO functions for PLY format (Polygon File Format): CGAL::
+    read_ply_points(), CGAL::read_ply_points_and_normals(), CGAL::
+    write_ply_points() and CGAL::write_ply_points_and_normals().
+
+
+* Surface Mesh Parameterization
+
+  - LSCM_parameterizer_3 now uses by default Eigen instead of OpenNL as a model
+    of SparseLinearAlgebraTraits_d.
+
+
+* Spatial Searching
+
+  - Add function to find any point in a range query, that is neither all
+    points, nor the closest one.
+
+
+* Principal Component Analysis
+
+  - Add a template parameter DiagonalizeTraits for functions CGAL::
+    linear_least_squares_fitting_2() and CGAL::linear_least_squares_fitting_3
+    (). This allows to either choose the legacy internal diagonalization code
+    from CGAL or the Eigen implementation (or any class that is a model of
+    DiagonalizeTraits). Variants of the function that automatically deduce the
+    kernel also automatically select the diagonalizer, so the API is mostly
+    preserved.
+
+
+* CGAL and Solvers
+
+  - This package now includes all CGAL concepts for solvers with models using
+    the third party Eigen library.
+
+
+* CGAL and the Boost Graph Library (BGL)
+
+  - Add function CGAL::split_graph_into_polylines() that allows to extract from
+    a soup of segments given as a graph, polylines with nodes of degree at most
+    2. In addition a functor can be passed to the function to specify
+    additional polyline endpoints.
+
+  - New functions to manipulate selection of faces, edges and vertices in a
+    halfedge graph are added: CGAL::expand_face_selection(), CGAL::
+    reduce_face_selection(), CGAL::expand_edge_selection(), CGAL::
+    reduce_edge_selection() CGAL::expand_vertex_selection(), CGAL::
+    reduce_vertex_selection() and CGAL::select_incident_faces().
+
+  - Add a helper function CGAL::clear which clears a MutableFaceGraph
+    efficiently and generically.
+
+
+
+
+-------------------------------- Release 4.7 --------------------------------
+
+Release date: October 2015
+
+
+* Installation
+
+  - The minimum required version of CMake is now 2.8.11. CMake versions 3.1,
+    3.2, and 3.3 are supported.
+
+  - All Qt4 demos have been updated and now require Qt5 to be compiled. Qt5
+    version 5.3 or higher is required. The support for Qt4 is dropped. To
+    compile libCGAL_Qt5 and demos, you must set the cmake or environment
+    variable Qt5_DIR to point to the path to the directory containing the file
+    Qt5Config.cmake created by your Qt5 installation. If you are using the open
+    source edition it should be /path-to/qt-everywhere-opensource-src-
+    <version>/qtbase/lib/cmake/Qt5.
+
+  - The code of the 3D demos now uses modern OpenGL, with shaders, instead of
+    the fixed pipeline API of OpenGL-1.
+
+  - The Microsoft Windows Visual C++ compiler 2015 (VC14) is now supported.
+    However, since this compiler is not officially supported by Intel TBB 4.4
+    and Qt 5.5 (the latest versions available at the time of this release), the
+    parallelism features of CGAL and Qt5 demos will not work.
+
+
+* L Infinity Segment Delaunay Graphs (new package)
+
+  - The package provides the geometric traits for constructing the segment
+    Delaunay graph in the max-norm (L Infinity). The traits also contain
+    methods to draw the edges of the dual of the segment Delaunay graph in the
+    max-norm i.e., the segment Voronoi diagram in the max-norm. The algorithm
+    and traits rely on the segment Delaunay graph algorithm and traits under
+    the Euclidean distance. The segment Voronoi diagram in the max-norm has
+    applications in VLSI CAD.
+
+
+* Advancing Front Surface Reconstruction (new package)
+
+  - This package provides a greedy algorithm for surface reconstruction from an
+    unorganized point set. Starting from a seed facet, a piecewise linear
+    surface is grown by adding Delaunay triangles one by one. The most
+    plausible triangles are added first, in a way that avoids the appearance of
+    topological singularities.
+
+
+* Triangulated Surface Mesh Shortest Paths (new package)
+
+  - The package provides methods for computing shortest path on triangulated
+    surface meshes. Given a set of source points on the surface, this package
+    provides a data structure that can efficiently provides the shortest path
+    from any point on the surface to the sources points. There is no
+    restriction on the genus or the number of connected components of the mesh.
+
+
+* Triangulated Surface Mesh Skeletonization (new package)
+
+  - This package provides a (1D) curve skeleton extraction algorithm for a
+    triangulated polygonal mesh without borders based on the mean curvature
+    flow. The particularity of this skeleton is that it captures the topology
+    of the input. For each skeleton vertex one can obtain its location and its
+    corresponding vertices from the input mesh. The code is generic and works
+    with any model of the `FaceListGraph` concept.
+
+
+* 3D Point-Set Shape Detection (new package)
+
+  - This package implements the efficient RANSAC method for shape detection,
+    contributed by Schnabel et al. From an unstructured point set with
+    unoriented normals, the algorithm detects a set of shapes. Five types of
+    primitive shapes are provided by this package: plane, sphere, cylinder,
+    cone and torus. Detecting other types of shapes is possible by implementing
+    a class derived from a base shape.
+
+
+* 2D Visibility (new package)
+
+  - This package provides several variants to compute the visibility area of a
+    point within polygonal regions in two dimensions.
+
+
+* Polygon Mesh Processing (new package)
+
+  - This package implements a collection of methods and classes for polygon
+    mesh processing, ranging from basic operations on simplices, to complex
+    geometry processing algorithms. The implementation of this package mainly
+    follows algorithms and references given in Botsch et al.'s book on polygon
+    mesh processing.
+
+
+* General
+
+  - Support for unordered sets and maps of the stdlib and of boost for handle
+    and index classes.
+
+
+
+
+* Approximation of Ridges and Umbilics on Triangulated Surface Meshes
+
+  - This package now supports any model of the concept FaceGraph.
+
+  - Breaking change: The package no longer supports models of
+    TriangulatedSurfaceMesh which are not at the same time models of the
+    concept FaceGraph.
+
+
+* dD Geometry Kernel
+
+  - Epick_d gains 3 new functors: Construct_circumcenter_d,
+    Compute_squared_radius_d, Side_of_bounded_sphere_d. Those are essential for
+    the computation of alpha-shapes.
+
+
+* 2D Arrangements
+
+  - Introduced a new traits class, called
+    Arr_polycurve_traits_2<SubcurveTraits>, which handles general piece-wise
+    (polycurve) curves. The pieces do not necessarily have to be linear.
+
+  - Introduced two new concepts called ArrangementApproximateTraits_2 and
+    ArrangementConstructXMonotoneCurveTraits_2.
+
+      - The existing ArrangementLandmarkTraits_2 concept, which has two
+        requirements, now refines the two respective concepts above.
+
+      - The template parameter of the existing
+        Arr_polyline_traits_2<SegmentTraits> template must be substituted with
+        a traits class that is a model of the
+        ArrangementConstructXMonotoneTraits_2 concept among the other when
+        Arr_polyline_traits_2 is instantiated.
+
+
+
+* 2D Minkowski Sums
+
+  - Added support for polygons with holes and optimized the construction of
+    Minkowski sums.
+
+      - Introduced an implementation of the "reduced convolution" method, a
+        variant of the method described in "2D Minkowski Sum of Polygons Using
+        Reduced Convolution" by Behar and Lien. The new method supports
+        polygons with holes and in many cases out pergorms the implementation
+        of the exsisting (full) convolution method.
+
+      - Introduced two new classes that decompose polygons into convex pieces
+        (models of the PolygonConvexDecomposition_2 concept) based on vertical
+        decomposition and constrained Delaunay triangulation, respectively.
+        These new models also support the convex decomposition of polygons with
+        holes.
+
+
+
+* 3D Periodic Triangulations
+
+  - Rename Periodic_3_triangulation_traits_3 to
+    Periodic_3_Delaunay_triangulation_traits_3.
+
+  - Rename the concept Periodic_3TriangulationTraits_3 to
+    Periodic_3DelaunayTriangulationTraits_3.
+
+  - Create Periodic_3_triangulation_traits_3 and the concept
+    Periodic_3TriangulationTraits_3.
+
+
+* 2D Conforming Triangulations and Meshes
+
+  - Add an optimization method CGAL::lloyd_optimize_mesh_2() that implements
+    the Lloyd (or Centroidal Voronoi Tesselation) optimization algorithm in a
+    Constrained Delaunay Triangulation. For optimization, the triangulation
+    data structure on which the mesher relies needs its VertexBase template
+    parameter to be a model of the new concept DelaunayMeshVertexBase_2.
+
+
+* Point Set Processing and Surface Reconstruction from Point Sets
+
+  - Add the function CGAL::compute_vcm() for computing the Voronoi Covariance
+    Measure (VCM) of a point set. The output of this function can be used with
+    the function CGAL::vcm_is_on_feature_edge() to determine whether a point is
+    on or close to a feature edge. The former function is also internally used
+    by CGAL::vcm_estimate_normals() to estimate the normals of a point set and
+    it is particularly suited to point sets with noise.
+
+
+* Spatial Sorting
+
+  - Add the possibility to sort points on a sphere along a space-filling curve
+    using the functions CGAL::hilbert_sort_on_sphere and CGAL::
+    spatial_sort_on_sphere.
+
+
+* Geometric Object Generators
+
+  - Add new random generator of points in a 2D and 3D triangle and in a
+    tetrahedron (CGAL::Random_points_in_triangle_2, CGAL::
+    Random_points_in_triangle_3, CGAL::Random_points_in_tetrahedron_3).
+
+
+-------------------------------- Release 4.6.2 --------------------------------
+
+Release date: August 2015
+
+This release only fixes bugs. See the list of fixed bugs on Github:
+
+https://github.com/CGAL/cgal/issues?q=milestone%3A4.6.2
+
+
+-------------------------------- Release 4.6.1 --------------------------------
+
+Release date: June 2015
+
+This release only fixes bugs. See the list of fixed bugs on Github:
+
+https://github.com/CGAL/cgal/issues?q=milestone%3A4.6.1+-label%3Ainvalid
+
+
+-------------------------------- Release 4.6 --------------------------------
+
+Release date: April 2015
+
+
+* Installation
+
+  - The required version of Boost is now 1.48 or higher.
+
+
+* 2D Polyline Simplification (new package)
+
+  - This package enables to simplify polylines with the guarantee that the
+    topology of the polylines does not change. This can be done for a single
+    polyline as well as for a set of polyline constraints in a constrained
+    triangulation. The simplification can be controlled with cost and stop
+    functions.
+
+
+* 2D Generalized Barycentric Coordinates (new package)
+
+  - This package offers an efficient and robust implementation of two-
+    dimensional closed-form generalized barycentric coordinates defined for
+    simple two-dimensional polygons.
+
+
+* Scale-Space Surface Reconstruction (new package)
+
+  - This new package provides a class gathering a dedicated smoothing algorithm
+    and some convenience functions to help the creation of a surface out of a
+    point set using the 3D Alpha Shapes package. The particularity of this
+    reconstruction pipeline is that the input point are in the output and no
+    new points are created. Note that in the current version, the output is a
+    triangle soup that is not necessarily a valid (manifold) polyhedral
+    surface.
+
+
+* Surface Mesh (new package)
+
+  - The surface mesh class provided by this package is an implementation of the
+    halfedge data structure allowing to represent polyhedral surfaces. It is an
+    alternative to the packages CGAL::Polyhedron_3 and CGAL::HalfedgeDS.
+
+
+* dD Triangulation (new package)
+
+  - This new package provides classes for manipulating triangulations in
+    Euclidean spaces whose dimension can be specified at compile-time or at
+    run-time. It also provides a class that represents Delaunay triangulations.
+
+
+* dD Convex Hulls and Delaunay Triangulations
+
+  - This package is deprecated and the new package Triangulation should be used
+    instead.
+
+
+
+
+* dD Geometry Kernel
+
+  - It has been reported that the recently introduced Epick_d kernel may not
+    work with Intel C++ Compiler prior to version 15. Documentation has been
+    updated.
+
+
+* 3D Convex Hulls
+
+  - Add functions halfspace_intersection_3 and
+    halfspace_intersection_with_constructions_3 to compute the intersection of
+    halfspaces defining a closed polyhedron.
+
+  - Fix a bug introduced in CGAL 4.5 that can appear while computing the convex
+    hull of coplanar points.
+
+  - Fix a robustness issue in Convex_hull_traits_3. This traits is used by
+    default with the kernel Exact_predicates_inexact_constructions_kernel.
+
+  - The function CGAL::convex_hull_incremental_3 is deprecated and the function
+    convex_hull_3 should be used instead.
+
+
+
+
+* Combinatorial Maps and Linear Cell Complex
+
+  - Added correct_invalid_attributes, set_automatic_attributes_management and
+    are_attributes_automatically_managed methods in CombinatorialMap concept.
+    This allows high level operations to not update non void attributes during
+    massive calls of these operations, but only after the end of their
+    executions.
+
+
+
+
+* 2D Triangulations
+
+  - The class Constrained_triangulation_plus_2 now can handle polylines as
+    constraints.
+
+  - As a consequence a Constraint_id has been introduced which replaces
+    pair<Vertex_handle,Vertex_handle> as identifier of a constraint.
+
+
+
+
+* 3D Mesh Generation
+
+  - Add member functions output_boundary_to_off and
+    output_facets_in_complex_to_off in the class CGAL::
+    Mesh_complex_3_in_triangulation_3 to export the boundary of a domain or a
+    subdomain.
+
+
+
+
+* 3D Fast Intersection and Distance Computation
+
+  - Add new constructors to AABB_halfedge_graph_segment_primitive and
+    AABB_face_graph_triangle_primitive in order to be able to build primitives
+    one by one.
+
+
+* Spatial Searching
+
+  - Fixed a bug in CGAL::Splitters.h sliding midpoint rule, where degenerated
+    point sets (e.g.,points on segment) caused the kd-tree to get linear.
+
+  - Improved performance of Orthogonal_k_neighbor_search. Note that VC 2013
+    does not compile boost::container::deque of Boost 1_55 and does hence have
+    a workaround which does not have the improvement.
+
+  - Breaking change: The concept OrthogonalDistance has new function overloads
+    for min_distance_to_rectangle and max_distance_to_rectangle with an
+    additional reference parameter std::vector.
+
+  - Breaking change: The order of the points in the iterator range [tree.begin
+    (),tree.end()] is not the order of insertion of the points into the tree.
+    This was not guaranteed before but might have been observed and exploited
+    by users.
+
+  - Derived kd_tree_leaf_node and kd_tree_internal_node from kd_tree_node to
+    save memory.
+
+
+
+
+* Geometric Object Generators
+
+  - Add a new function random_convex_hull_in_disc_2 that efficiently generates
+    a random polygon as the convex hull of uniform random points chosen in a
+    disc.
+
+
+-------------------------------- Release 4.5.2 --------------------------------
+
+Release date: February 2015
+
+
+* General
+
+  - Fix a bug that prevented the compilation with recent versions of Boost
+    (>=1.56) when explicit conversions operators (from C++11) are supported.
+    That prevented the compilation with Microsoft Visual Studio 2013.
+
+
+* 3D Convex Hulls
+
+  - Fix a non-robust predicate bug that was showing up when input points where
+    lexicographically sorted.
+
+
+* 3D Mesh Generation
+
+  - Fix a bug in the sliver perturbation optimization method. It could create
+    some holes on the surface of the mesh.
+
+
+-------------------------------- Release 4.5.1 --------------------------------
+
+Release date: December 2014
+
+
+* 3D Mesh Generation
+
+  - Fix a bug in the sliver exudation preservation of boundaries.
+
+
+-------------------------------- Release 4.5 --------------------------------
+
+Release date: October 2014
+
+
+* Installation
+
+  - Changes in the set of supported platforms:
+
+      - The Microsoft Windows Visual C++ compiler 2008 (VC9) is no longer
+        supported since CGAL-4.5.
+
+
+  - Since CGAL version 4.0, Eigen was the recommended third-party library to
+    use with Planar Parameterization of Triangulated Surface Meshes, Surface
+    Reconstruction from Point Sets, Approximation of Ridges and Umbilics on
+    Triangulated Surface Meshes, and Estimation of Local Differential
+    Properties of Point-Sampled Surfaces packages. From CGAL version 4.5,
+    Taucs, Blas and Lapack are no longer supported.
+
+  - CGAL is now compatible with the new CMake version 3.0.
+
+
+* Triangulated Surface Mesh Deformation (new package)
+
+  - This package allows to deform a triangulated surface mesh under positional
+    constraints of some of its vertices without requiring any additional
+    structure other than the surface mesh itself. The methods provided
+    implements an as-rigid-as-possible deformation. Note that the main class
+    name has changed between the 4.5-beta1 and the 4.5 releases to better match
+    the CGAL naming conventions (from CGAL::Deform_mesh to CGAL::
+    Surface_mesh_deformation).
+
+
+* CGAL and the Boost Graph Library (major changes)
+
+  - Cleanup of the HalfedgeGraph concept. In particular:
+
+      - Introduction of the notion of halfedge_descriptor in the specialization
+        of the class boost::graph_traits.
+
+      - Deprecation of halfedge_graph_traits.
+
+      - A model of HalfedgeGraph is considered as an undirected graph. Thus any
+        call to edges() should be replaced by halfedges() and num_edges() now
+        returns the number of (undirected) edges.
+
+      - Breaking change: is_border_edge and is_border_halfedge properties are
+        removed. The free functions is_border() and is_border_edge() should be
+        used instead.
+
+      - Renaming of HalfedgeGraph specific free functions.
+
+
+  - Introduction of the FaceGraph concept.
+
+  - Adaptation of the package Triangulated Surface Mesh Simplification and of
+    the class AABB_halfedge_graph_segment_primitive from the package 3D Fast
+    Intersection and Distance Computation to the API change.
+
+  - Update of the package Triangulated Surface Mesh Segmentation and of the
+    class AABB_face_graph_triangle_primitive from the package 3D Fast
+    Intersection and Distance Computation to accept model of the newly
+    introduced concepts.
+
+  - Offer Euler operations as free functions for models of the graph concepts
+    provided by CGAL.
+
+  - Specialization of boost::graph_traits for OpenMesh::PolyMesh_ArrayKernelT
+    as proof of concept. A OpenMesh::PolyMesh_ArrayKernelT becomes a model of
+    the aforementioned concepts when including CGAL/boost/graph/
+    graph_traits_PolyMesh_ArrayKernelT.h.
+
+
+* dD Geometry Kernel
+
+  - A new model Epick_d of the Kernel_d concept is introduced. It provides
+    better performance through arithmetic filtering and specializations for
+    fixed dimensions. It may not work with compilers as old as gcc-4.2, but was
+    tested with gcc-4.4.
+
+
+* 3D Convex Hulls
+
+  - Clean up the documentation of the concepts
+
+
+* 2D Arrangements
+
+  - Fixed a bug in removing an unbounded curve (e.g., a ray) from an
+    arrangement induced by unbounded curves.
+
+
+* 2D Snap Rounding
+
+  - Replaced use of private kd_tree with CGAL's official Kd_tree from
+    Spatial_searching package; results in a small performance gain. Removed the
+    private kd_tree package.
+
+
+* 3D Triangulations
+
+  - Add an experimental parallel version of the Delaunay triangulation and the
+    regular triangulation algorithms, which allows parallel insertion and
+    removal of point ranges.
+
+  - Add caching of circumcenters to Regular_triangulation_cell_base_3. The
+    cache value is computed when cell->circumcenter() or rt.dual(cell)
+    functions are called.
+
+
+* 3D Periodic Triangulations
+
+  - Add a method to locate point with inexact predicates.
+
+
+* 3D Mesh Generation
+
+  - Add a new constructor for the class Labeled_mesh_domain_3 which takes an
+    Iso_cuboid_3.
+
+  - Add a new labeling function wrapper for meshing multi-domain.
+
+  - The meshing functionality in the Qt demos in demo/Polyhedron/ and demo/
+    Mesh_3/ can now use the handling of 1d-features, that exists in CGAL since
+    version 3.8.
+
+  - Add an experimental parallel version of the 3D mesh refinement and mesh
+    optimization methods.
+
+
+* Point Set Processing and Surface Reconstruction from Point Sets
+
+  - The former demo has been removed and is fully merge in the Polyhedron demo.
+
+
+* Point Set Processing
+
+  - Workaround a bug in dijsktra shortest path of boost 1.54 by shipping and
+    using the boost header from the 1.55 release. This header will be used only
+    if you are using the version 1.54 of boost.
+
+
+* Triangulated Surface Mesh Simplification
+
+  - Breaking change: Due to the cleanup of the concepts of the package CGAL and
+    the Boost Graph Library, the named parameter edge_is_border_map has been
+    removed, and the named parameter edge_is_constrained_map now expects a
+    property map with an edge descriptor as key type (vs. halfedge descriptor
+    before).
+
+  - Add some optimization in the code making the implementation faster
+    (depending on the cost and the placement chosen). However, for an edge
+    which collapse is not topologically valid, the vector of vertices of the
+    link provided by its profile might contains duplicates, thus also breaking
+    the orientation guarantee in the vector. This must not be a problem for
+    users as the edge is not collapsible anyway but if it is a absolute
+    requirement for user defined cost/placement, defining the macro
+    CGAL_SMS_EDGE_PROFILE_ALWAYS_NEED_UNIQUE_VERTEX_IN_LINK will restore the
+    former behavior.
+
+
+* dD Spatial Searching
+
+  - Added methods reserve(size_t size) and size_t capacity() to class Kd_tree
+    to allocate memory to store size points and to report that number (STL
+    compliance).
+
+
+* STL Extensions for CGAL
+
+  - Add Compact_container::operator[], allowing a direct access to the ith
+    element of a compact container.
+
+  - Add Concurrent_compact_container, a compact container which allows
+    concurrent insertion and removal.
+
+
+-------------------------------- Release 4.4 --------------------------------
+
+Release date: April 2014
+
+
+* Installation
+
+  - Additional supported platforms:
+
+      - The Apple Clang compiler version 5.0 is now supported on
+        OS X Mavericks.
+
+      - The Microsoft Windows Visual C++ compiler 2013 (VC12) is now supported.
+
+
+
+* Triangulated Surface Mesh Segmentation (new package)
+
+  - This package implements the segmentation of triangulated surface meshes
+    based on the Shape Diameter Function (SDF). In addition, it also provides
+    functions to generate segmentations based on a user defined alternative to
+    the SDF.
+
+
+* Number Types
+
+  - A new class CGAL::Mpzf is introduced on some platforms for exact ring
+    operations. It is used to improve the speed of the evaluation of predicates
+    in degenerate situations.
+
+
+* 2D and 3D Geometry Kernel
+
+  - Fix a bug introduced in CGAL 4.3 when computing the intersection of two 3D
+    triangles.
+
+
+* 2D Polygon Partitioning
+
+  - Bug fix to make the partition algorithms working with a Lazy kernel such as
+    Exact_predicates_exact_constructions_kernel.
+
+
+* 2D Regularized Boolean Set-Operations
+
+  - Fix two memory leaks in CGAL::General_polygon_set_2.
+
+
+* Combinatorial Maps and Linear Cell Complex
+
+  - null_dart_handle is no longer a static data member in the CombinatorialMap
+    concept. This implies to move the following methods of Dart concept into
+    CombinatorialMap concept: is_free, highest_nonfree_dimension, opposite and
+    other_extremity. We also transform the static methods vertex_attribute and
+    point of Linear_cell_complex class into non static methods. You can define
+    the CGAL_CMAP_DEPRECATED macro to keep the old behavior.
+
+
+* 2D Arrangements
+
+  - Revise the API of polylines. In particular, construction is now done using
+    functors and iteration is possible only on the segments of a polyline.
+
+  - Fix a bug in the Landmark point-location strategy.
+
+
+* 2D Snap Rounding
+
+  - Fix a memory leak
+
+
+* 2D Triangulations
+
+  - Add different overloads of the function insert_constraints that inserts a
+    range of points and segments, or a range of segments. These functions uses
+    the spatial sorting in order to speed up the time needed for the insertion.
+
+
+* 3D Alpha Shapes
+
+  - Add member functions in CGAL::Alpha_shape_3 to give access to the alpha
+    status of edges and facets (get_alpha_status()).
+
+  - Add another filtration method (filtration_with_alpha_values()) that reports
+    the alpha value at which each face appears in the filtration.
+
+
+* 3D Mesh Generation
+
+  - Fix the access to functions number_of_facets and number_of_cells in
+    Mesh_complex_3_in_triangulation_3.
+
+  - Change the internal API of the sliver perturber, to make possible for
+    developers to optimize another criterion than the (default) minimal
+    dihedral angle. Developers can also define a new perturbation vector (for
+    angles we had gradient of squared circumradius, gradient of volume,
+    gradient of minimal dihedral angle, and random) which is better suitable to
+    optimize their criterion.
+
+  - Improve the use of cache values in Mesh_cell_base_3 to (re)compute
+    circumcenters and sliver criterion values only when needed.
+
+
+* Triangulated Surface Mesh Simplification
+
+  - Fix a bug in the way edges can be marked as non-removable by adding a
+    named-parameter edge_is_constrained_map to the function edge_collapse
+
+
+* dD Spatial Searching
+
+  - Fix a documentation bug: The property map passed as template parameter to
+    the classes Search_traits_adapter and Distance_adapter must be a lvalue
+    property map. To avoid incorrect usage, a static assertion has been added
+    in the CGAL code to prevent the user from instantiating these classes with
+    an incorrect property map type.
+
+
+* CGAL ipelets
+
+  - Better description of the demo ipelets in the user manual
+
+  - New ipelet for pencils of circles
+
+  - New ipelet for hyperbolic geometry in Poincaré model
+
+  - The generator ipelet now generates point in a selected zone
+
+  - Hilbert sort ipelet implements two policies
+
+
+-------------------------------- Release 4.3 --------------------------------
+
+Release date: October 2013
+
+
+* The CGAL Manual
+
+  - The documentation of CGAL is now generated with Doxygen.
+
+
+* 2D Periodic Triangulations (new package)
+
+  - This package allows to build and handle triangulations of point sets in the
+    two dimensional flat torus. Triangulations are built incrementally and can
+    be modified by insertion or removal of vertices. They offer point location
+    facilities. The package provides Delaunay triangulations and offers nearest
+    neighbor queries and primitives to build the dual Voronoi diagrams.
+
+
+* API Changes
+
+ ** 2D and 3D Geometry Kernel
+
+  - The intersection functions and functors used to return a CGAL::Object in
+    order to deal with the different possible return types. However, depending
+    on the arguments it is possible to reduce the possible return types to a
+    small set. For this reason and to take advantage of the type safety, we
+    decided to use boost::variant instead of CGAL::Object. The result_of
+    protocol is now even more useful to determine the return type of the
+    intersection functions and functors. The change should be relatively
+    transparent to the user thanks to the implicit constructor added to CGAL::
+    Object. However, it is recommended to upgrade your code. The previous
+    behavior can be restored by defining the macro CGAL_INTERSECTION_VERSION
+    to 1.
+
+
+ ** 2D Arrangements
+
+  - The type of the result of point location queries changed to boost::variant
+    (from CGAL::Object). For convenience, the previous behavior can be restored
+    by defining the macro CGAL_ARR_POINT_LOCATION_VERSION to 1.
+
+  - Introduced an optimization for operations on large and dense arrangements.
+
+
+ ** 3D Fast Intersection and Distance Computation
+
+  - Following the intersection API change, Object_and_primitive_id has been
+    replaced by a template class Intersection_and_primitive_id<Query> to
+    determine the type depending on the query object type.
+
+
+ ** CGAL and Boost Property Maps
+
+  - The key_type of the property maps provided by CGAL used to be an iterator.
+    In order to be more easily re-used, the key_type has been changed to be the
+    value_type of the iterator. The packages that have been updated to match
+    these changes are Point Set Processing and Surface Reconstruction from
+    Point Sets. However, for most users this change should be transparent if
+    the default property maps were used. For convenience, the former behavior
+    can be enabled by defining the macro CGAL_USE_PROPERTY_MAPS_API_V1.
+
+
+* Algebraic Foundations
+
+  - For convenience, add an overload of make_rational() taking a pair of
+    numbers.
+
+
+* 2D and 3D Geometry Kernel
+
+  - A Iso_rectangle_2 can now be constructed from a Bbox_2 and an Iso_cuboid_3
+    from a Bbox_3.
+
+  - The implementation of CGAL::Object has been updated and now uses boost::
+    shared_ptr and boost::any. This implementation is faster.
+
+  - Add to Bbox_2 and Bbox_3 a += operator as well as free functions to get the
+    bounding box of a range of geometric objects.
+
+
+* Combinatorial Maps
+
+  - Two bug fixes: do not use the 2 least significant bits for cell attribute
+    without dart support; share the mark when copying a CMap_cell_iterator.
+
+  - Add a constructor taking a given combinatorial map as argument, possibly
+    with different dimension and/or different attributes. This allows to
+    transform a combinatorial map.
+
+  - Add operator= and swap method.
+
+  - Add dynamic onmerge/onsplit functions that can be associated dynamically to
+    i-attributes and which are automatically called when i-cells are split/
+    merged.
+
+  - Add a function allowing to reverse the orientation of a combinatorial map,
+    and another one to reverse one connected component of a combinatorial map.
+
+
+* 3D Boolean Operations on Nef Polyhedra
+
+  - Bug-fix in IO when using Lazy_exact_nt as number type or
+    Exact_predicates_exact_constructions_kernel as kernel.
+
+
+* 2D Triangulations
+
+  - Extend the concept TriangulationDataStructure_2 to require a more general
+    copy_tds function that allows a copy between TDS of different types. The
+    CGAL model has been updated.
+
+  - Add a way to efficiently insert a range of points with information into the
+    2D constrained Delaunay triangulations.
+
+
+* 3D Triangulations
+
+  - Extend the concept TriangulationDataStructure_3 to require a more general
+    copy_tds function that allows a copy between TDS of different types. The
+    CGAL model has been updated.
+
+  - Add an advanced function to set the infinite vertex of the triangulation
+    for low level operations
+
+  - Fix a bug in the function inserting a range of points with info when the
+    Fast_location tag is used
+
+
+* 2D Segment Delaunay Graph
+
+  - Add functions insert_points and insert_segments to insert a range of points
+    and segments. These functions uses the spatial sorting in order to speed up
+    the time needed for the insertion. The function insert(Input_iterator
+    first, Input_iterator beyond, Tag_true) has been updated to dispatch the
+    input when possible to these functions.
+
+
+* 2D Apollonius Graphs
+
+  - Modified insertion algorithm so that the code can handle pseudo-circles as
+    well.
+
+  - Updated implementation of the vertex conflict predicate by a faster
+    version.
+
+
+* 3D Mesh Generation
+
+  - Speed-up Mesh_3 and in particular the global optimizers (Lloyd and ODT) by
+    introducing a parameter do_freeze to prevent from moving vertices which
+    would move of very small displacements.
+
+  - Introduce new data structures and options for speed-up and compacity. Note
+    that Compact_mesh_cell_base_3 and Mesh_vertex_base_3 are now our favoured
+    implementations of the concepts MeshCellBase_3 and MeshVertexBase_3.
+
+  - Introduce a new constructor for Polyhedral_mesh_domain_3 that takes a
+    bounding polyhedron to be meshed along with a polyhedral surface entirely
+    included in it. This allows the user to mesh a polyhedral domain with
+    internal surface(s) which can be non-watertight and even non-manifold.
+
+  - Several documentation bug fixes.
+
+  - Provide the ability to plug in custom cell_base/vertex_base classes into
+    the Mesh_triangulation_3 class.
+
+
+* Triangulated Surface Mesh Simplification
+
+  - Fix a segmentation fault that was happening when some edges of length 0
+    were in the input mesh.
+
+
+* 3D Fast Intersection and Distance Computation
+
+  - Following the intersection API change, Object_and_primitive_id has been
+    replaced by a template class Intersection_and_primitive_id<Query> to
+    determine the type depending on the query object type.
+
+  - Introduce the class AABB_halfedge_graph_segment_primitive, which replaces
+    the class AABB_polyhedron_segment_primitive (which is now deprecated). The
+    new class is more general and can be used with any model of HalfedgeGraph.
+
+  - Introduce the class AABB_face_graph_triangle_primitive which replaces the
+    class AABB_polyhedron_triangle_primitive (which is now deprecated).
+
+  - Document the classes AABB_segment_primitive and AABB_triangle_primitive
+    that were already used in some examples.
+
+  - Add a generic primitive class AABB_primitive that allows to define a
+    primitive type by defining only two property maps.
+
+  - Introduce a new concept of primitive AABBPrimitiveWithSharedData. It allows
+    to have some data shared between the primitives stored in a AABB_tree. With
+    this you can, for example have a primitive wrapping an integer which refers
+    to the position of a geometric object in a std::vector. Only one reference
+    to this vector will be stored in the traits of the tree. The concept
+    AABBTraits, its model AABB_traits and the class AABB_tree have been updated
+    accordingly. However, everything is backward compatible.
+
+  - Fix a memory leak in the destructor of the class AABB-tree
+
+
+* STL Extensions for CGAL
+
+  - Add to Dispatch_output_iterator and Dispatch_or_drop_output_iterator an
+    operator to accept and dispatch a tuple of values.
+
+
+* Concurrency in CGAL
+
+  - Add a FindTBB CMake module so that one can easily link with TBB to write
+    shared-memory parallel code.
+
+  - Introduce two new tags: Sequential_tag and Parallel_tag
+
+
+-------------------------------- Release 4.2 --------------------------------
+
+Release date: March 2013
+
+
+* Installation
+
+  - Additional supported platforms:
+
+      - The Microsoft Windows Visual C++ compiler 2012 (VC11) is now supported.
+
+
+  - With Microsoft Visual C++ (all supported versions), the compiler flags /
+    bigobj and /wd4503 are added by CGAL CMake scripts.
+
+  - This is the last release whose "UseCGAL.cmake" file (if using CGAL in a
+    CMake build environment) contains the line
+      link_libraries(${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS})
+    as this is a deprecated CMake command. The correct way to link with CGAL's
+    libraries (as for required 3rd party libraries) is to use
+    'target_link_libraries' which specifies for each build target which
+    libraries should be linked. The following serves as example:
+      find_package(CGAL)
+      include(${CGAL_USE_FILE})
+      add_executable(myexe main.cpp)
+      target_link_libraries(myexe ${CGAL_LIBRARIES}
+                                  ${CGAL_3RD_PARTY_LIBRARIES})
+    We also expect further changes in CGAL's CMake setup (change of variable
+    names, consistency of filename and output, removing essential libraries,
+    building executables, removal of '${CGAL_3RD_PARTY_LIBRARIES}').
+
+
+* 2D Arrangements
+
+  - Enhanced the 2D-arrangements demonstration program and ported it to Qt4.
+    The new demonstration program makes use of the CGAL Graphics View
+    framework, in which the 2D primitives are individually represented as
+    objects in a scene. (The implementations of several demos in CGAL already
+    make use of this framework.) This project was carried out as part of the
+    2012 Google Summer of Code program.
+
+  - Fixed a bug in the Walk-Along-A-Line point location strategy for
+    arrangements induced by unbounded curves.
+
+
+* 2D Circular Geometry Kernel
+
+  - Fix the intersection type computed when intersecting two identical circles.
+
+  - Forward correctly the result type of the linear kernel functors
+
+
+* 2D Triangulations
+
+  - Add mechanism to avoid call stack overflow in Delaunay_triangulation_2 and
+    Constrained_Delaunay_triangulation_2.
+
+  - Add a constructor for Regular_triangulation_2 and Delaunay_triangulation_2
+    from a range of points or a range of points with info.
+
+
+* 2D Voronoi Diagram Adaptor
+
+  - Bug-fix: Add ccb() method in face type as documented.
+
+
+* 3D Minkowski Sum of Polyhedra
+
+  - Fix a memory leak.
+
+
+* 3D Fast Intersection and Distance Computation
+
+  - Update requirements of the concepts AABBTraits and AABBGeomTraits to match
+    the implementation of the package.
+
+
+* Generator
+
+  - Addition of the Combination_enumerator
+
+
+* STL Extensions
+
+  - Introduction of CGAL::cpp11::result_of as an alias to the tr1
+    implementation from boost of the result_of mechanism. When all compilers
+    supported by CGAL will have a Standard compliant implemention of the C++11
+    decltype feature, it will become an alias to std::result_of.
+
+
+* Surface Reconstruction from Point Sets
+
+  - Performance improvements and addition of an option to better reconstruct
+    undersampled zones. The poisson reconstruction plugin of the Polyhedron
+    demo has an option to switch it on.
+
+
+-------------------------------- Release 4.1 --------------------------------
+
+Release date: October 2012
+
+
+* Installation
+
+  - Additional supported platforms:
+
+      - The Apple Clang compiler versions 3.1 and 3.2 are now supported on
+        Mac OS X.
+
+
+  - Improved configuration for essential and optional external third party
+    software
+
+  - Added more general script to create CMakeLists.txt files:
+    cgal_create_CMakeLists
+
+  - Availability tests for C++11 features are now performed with the help of
+    Boost.Config. A Boost version of 1.40.0 or higher is needed to use C++11
+    features.
+
+
+* 2D Arrangement
+
+  - Improved the implementation of the incremental randomized trapezoidal
+    decomposition point-location strategy. The new implementation enables point
+    location in unbounded arrangements. It constructs a search structure of
+    guaranteed linear size with guaranteed logarithmic query time.
+
+
+* 2D Convex Hulls and Extreme Points
+
+  - Speed up the preprocessing stage of the Akl-Toussaint implementation (used
+    by the free function convex_hull_2 when forward iterators are provided as
+    input).
+
+
+* Combinatorial Maps
+
+  - Minor bugfix; replace some functors by methods.
+
+
+* Linear Cell Complex
+
+  - Improve the demo: add a widget showing all the volumes and an operation to
+    create a Menger sponge.
+
+
+* Kernels
+
+  - All Kernel functors now support the result_of protocol.
+
+
+* STL_Extensions for CGAL
+
+  - The namespace cpp0x has been renamed cpp11. The old name is still available
+    for backward compatibility.
+
+
+-------------------------------- Release 4.0.2 --------------------------------
+
+Release date: Jul 2012
+
+This is a bug fix release. It fixes a bug in the CMakeLists.txt for CGAL-4.0.1,
+that prevented even building the libraries.
+
+
+-------------------------------- Release 4.0.1 --------------------------------
+
+Release date: Jul 2012
+
+This is a bug fix release. Apart various minor fixes in the documentation, the
+following has been changed since CGAL-4.0:
+
+
+* 2D Voronoi Diagram Adaptor (re-added)
+
+  - The package 2D Voronoi Diagram Adaptor was temporarily removed from the
+    CGAL distribution because of license issues. That package is now back into
+    CGAL.
+
+
+* 2D and 3D Geometry Kernel
+
+  - Fix a bug in the Segment_3-Triangle_3 intersection function in the case the
+    segment is collinear with a triangle edge.
+
+  - Fix a bug in the Projection_traits_.._3 class in the case a segment was
+    parallel to the x-axis.
+
+
+* Algebraic Kernel
+
+  - Avoid the linking error "duplicate symbols" when two compilation units
+    using the algebraic kernel are linked.
+
+
+* 3D Boolean Operations on Nef Polygons Embedded on the Sphere
+
+  - Fix a memory leak due to the usage of an internal mechanism that has been
+    replaced by boost::any. This also influences the packages 2D Boolean
+    Operations on Nef Polygons, 3D Boolean Operations on Nef Polyhedra, Convex
+    Decomposition of Polyhedra, and 3D Minkowski Sum of Polyhedra.
+
+
+* 2D Arrangement
+
+  - Fix several memory leaks.
+
+
+* 2D Mesh Generation
+
+  - Fix a compilation error in the header <CGAL/Mesh_2/Do_not_refine_edges.h>
+    when g++ version 4.7 is used.
+
+
+* Surface Mesh Generation and 3D Mesh Generation
+
+  - Fix an important bug in the CGAL_ImageIO library, that could lead to wrong
+    result when meshing from a 3D image.
+
+  - Fix the compilation of the demo in demo/Surface_mesher, when Boost version
+    1.48 or 1.49 is used.
+
+
+* Surface Mesh Parameterization
+
+  - Fix a memory leak.
+
+  - Fix a compatibility issue with Eigen-3.1 of Eigen_solver_traits. This fix
+    also affects the usage of that class in the package Surface Reconstruction
+    from Point Sets.
+
+
+-------------------------------- Release 4.0 --------------------------------
+
+Release date: March 2012
+
+CGAL 4.0 offers the following improvements and new functionality :
+
+
+* License Changes
+The whole CGAL-3.x series was released under a combination of LGPLv2 (for the
+foundations of CGAL), and QPL (for the high-level packages). QPL was the former
+license of the graphical toolkit Qt, but that license is not supported by any
+major free software project. Furthermore, the terms of the LGPLv2 license are
+ambiguous for a library of C++ templates, like CGAL.
+
+The CGAL project, driven by the CGAL Editorial Board, has decided to change the
+license scheme of CGAL. We increased the major number of the CGAL version to
+'4' in order to reflect this license change. The CGAL-4.x series is released
+under:
+
+
+  - LGPLv3+ (that is LGPL "either version 3 of the License, or (at your option)
+    any later version"), for the foundations of CGAL, instead of LGPLv2,
+
+  - GPLv3+ for the high-level packages, instead of QPL.
+
+
+* General
+
+  - On Windows, CGAL libraries are now built by default as shared libraries
+    (also called DLL). To run applications that use .dll files of CGAL, you
+    must either copy the .dll files into the directory of the application, or
+    add the path of the directory that contains those .dll files into the PATH
+    environment variable.
+
+  - On Windows, the CMake scripts of CGAL now search for shared version of the
+    Boost libraries. You must ensure that the .dll files of Boost are found by
+    the dynamic linker. You can, for example, add the path to the Boost .dll
+    files to the PATH environment variable.
+
+  - On Windows, CMake version 2.8.6 or higher is now required.
+
+  - Eigen version 3.1 or later is now the recommended third party library to
+    use in Planar Parameterization of Triangulated Surface Meshes, Surface
+    Reconstruction from Point Sets, Approximation of Ridges and Umbilics on
+    Triangulated Surface Meshes, and Estimation of Local Differential
+    Properties of Point-Sampled Surfaces packages. If you use Eigen you no
+    longer need Taucs, Lapack or Blas to use those packages (and any other in
+    CGAL).
+
+
+* Linear Cell Complex (new package)
+
+  - This package implements linear cell complexes, objects in d-dimension with
+    linear geometry. The combinatorial part of objects is described by a
+    combinatorial map, representing all the cells of the object plus the
+    incidence and adjacency relations between cells. Geometry is added to
+    combinatorial maps simply by associating a point to each vertex of the map.
+    This data structure can be seen as the generalization in dD of the
+    Polyhedron_3.
+
+
+* 2D Voronoi Diagram Adaptor (temporarily removed)
+
+  - As the copyright holder of this package has not granted the right to switch
+    from QPL to GPL, this package is removed from the distribution. Note that
+    it is "only" an adapter, that is the functionality of point/segment/disk
+    Voronoi diagram is offered through the Delaunay triangulation, segment
+    Delaunay graph, and Apollonius graph.
+
+
+* AABB Tree
+
+  - Document constness of member functions of the AABB_tree class.
+
+  - The class AABB_tree is now guaranteed to be read-only thread-safe. As usual
+    in CGAL, this small overhead introduced for thread-safety can be
+    deactivated by defining CGAL_HAS_NO_THREADS.
+
+
+* 2D Alpha Shapes
+
+  - Add an extra template parameter to the class Alpha_shape_2 that allows a
+    certified construction using a traits class with exact predicates and
+    inexact constructions.
+
+  - An object of type Alpha_shape_2 can now be constructed from a
+    triangulation.
+
+
+* 3D Alpha Shapes
+
+  - Add an extra template parameter to the class Alpha_shape_3 that allows a
+    certified construction using a traits class with exact predicates and
+    inexact constructions.
+
+
+* Geometric Object Generators
+
+  - Random_points_in_iso_box_d (deprecated since 3.8) has been removed. Use
+    Random_points_in_cube_d instead.
+
+
+* Linear and Quadratic Programming Solver
+
+  - Minor bugfix.
+
+
+* Spatial Searching
+
+  - The const-correctness of this package have been worked out. The transition
+    for users should be smooth in general, however adding few const in user
+    code might be needed in some cases.
+
+  - The class Kd_tree is now guaranteed to be read-only thread-safe. As usual
+    in CGAL, this small overhead introduced for thread-safety can be
+    deactivated by defining CGAL_HAS_NO_THREADS.
+
+  - Bug-fix in Orthogonal_incremental_neighbor_search and
+    Incremental_neighbor_search classes. Several calls to begin() now allow to
+    make several nearest neighbor search queries independently.
+
+
+* STL Extension
+
+  - CGAL::copy_n is now deprecated for CGAL::cpp0x::copy_n which uses std::
+    copy_n, if available on the platform.
+
+  - CGAL::successor and CGAL::predecessor are now deprecated for CGAL::cpp0x::
+    next and CGAL::cpp0x::prev. These functions use the standard versions if
+    available on the platform. Otherwise, boost::next and boost::prior are
+    used.
+
+
+* Triangulation_2
+
+  - Fix a thread-safety issue in Delaunay_triangulation_2 remove functions. As
+    usual in CGAL, the small overhead introduced for thread-safety can be
+    deactivated by defining CGAL_HAS_NO_THREADS.
+
+  - Add extraction operator for the class Constrained_triangulation_2 (and thus
+    to all inheriting classes).
+
+
+-------------------------------- Release 3.9 --------------------------------
+
+Release date: September 2011
+
+CGAL 3.9 offers the following improvements and new functionality :
+
+
+* General
+
+  - The class Root_of_2 is now deprecated. It is recommended to use the class
+    Sqrt_extension instead.
+
+  - The class Sqrt_extension is now used everywhere in CGAL where an algebraic
+    number of degree 2 is needed. This change has been done in the
+    Root_of_traits mechanism (indirectly packages 2D Circular kernel and 3D
+    Spherical kernel) and the packages 2D Segment Delaunay Graphs and 2D
+    Arrangements.
+
+  - Various fixes in the manual.
+
+
+* Combinatorial Maps (new package)
+
+  - This package provides a new combinatorial data structure allowing to
+    describe any orientable subdivided object whatever its dimension. It
+    describes all cells of the subdivision and all the incidence and adjacency
+    relations between these cells. For example it allows to describe a 3D
+    object subdivided in vertices, edges, faces and volumes. This data
+    structure can be seen as the generalization in dD of the halfedge data
+    structure.
+
+
+* 3D Convex Hull (major performance improvement)
+
+  - The quickhull implementation of CGAL (CGAL::convex_hull_3) has been worked
+    out to provide very better performances.
+
+  - The function CGAL::convex_hull_3 no longer computes the plane equations of
+    the facets of the output polyhedron. However an example is provided to show
+    how to compute them easily.
+
+  - A global function convex_hull_3_to_polyhedron_3 is now provided to extract
+    the convex hull of a 3D points set from a triangulation of these points.
+
+
+* dD Spatial Searching (major new feature added)
+
+  - A traits-class and distance adapter that together with a point property
+    map, allow to make nearest neighbor queries on keys instead of points have
+    been added.
+
+  - Few bug fixes in the documentation have revealed some inconsistencies that
+    have been corrected. Two traits class concept are now documented
+    (RangeSearchTraits and SearchTraits). Most other changes concerns only
+    classes documented as advanced. One issue that user can encounter is due to
+    an additional requirement on the nested class
+    Construct_cartesian_const_iterator_d defined in the concept SearchTraits
+    that must provide a nested type result_type.
+
+
+* Spatial Sorting (major new feature added)
+
+  - General dimension is now supported.
+
+  - Hilbert sorting admits now two policies: splitting at median or at middle
+    (see user manual).
+
+  - Using a property map, sorting on keys instead of points is now easier
+
+
+* dD Kernel
+
+  - The d-dimensional kernel concept and models have been modified to
+    additionally provide two new functors Less_coordinate_d and
+    Point_dimension_d.
+
+
+* 2D Arrangements
+
+  - A new geometry-traits class that handles rational arcs, namely
+    Arr_rational_function_traits_2, has been introduced. It replaced an old
+    traits class, which handled the same family of curves, but it was less
+    efficient. The new traits exploits CGAL algebraic kernels and polynomials,
+    which were not available at the time the old traits class was developed.
+
+  - A new geometry traits concept called ArrangementOpenBoundaryTraits_2 has
+    been introduced. A model of this concept supports curves that approach the
+    open boundary of an iso-rectangular area called parameter space, which can
+    be unbounded or bounded. The general code of the package, however, supports
+    only the unbounded parameter space. We intend to enhance the general code
+    to support also bounded parameter spaces in a future release.
+
+  - The deprecated member function is_at_infinity() of Arrangement_2::Vertex
+    has been removed. It has been previously replaced new function
+    is_at_open_boundary().
+
+  - The tags in the geometry traits that indicate the type of boundary of the
+    embedding surface were replaced by the following new tags:
+             Left_side_category
+             Bottom_side_category
+             Top_side_category
+             Right_side_category
+    It is still possible not to indicate the tags at all. Default values are
+    assumed. This however will produce warning messages, and should be avoided.
+
+
+-------------------------------- Release 3.8 --------------------------------
+
+Release date: April 2011
+
+CGAL 3.8 offers the following improvements and new functionality :
+
+
+* General
+
+  - Boost version 1.39 at least is now required.
+
+  - Initial support for the LLVM Clang compiler (prereleases of version 2.9).
+
+  - Full support for the options -strict-ansi of the Intel Compiler 11, and -
+    ansi of the GNU g++ compiler.
+
+  - Adding a concept of ranges. In the following releases, it will be the way
+    to provide a set of objects (vs. a couple of iterators).
+
+  - Fix a memory leak in CORE polynomials.
+
+  - Various fixes in the manual.
+
+
+* 3D Mesh Generation (major new feature added)
+
+  - Adding the possibility to handle sharp features: the 3D Mesh generation
+    package now offers the possibility to get in the final mesh an accurate
+    representation of 1-dimensional sharp features present in the description
+    of the input domain.
+
+
+* 2D Triangulations (major new feature added)
+
+  - Add a way to efficiently insert a range of points with information into a
+    2D Delaunay and regular triangulation.
+
+  - Add member function mirror_edge taking an edge as parameter.
+
+  - Fix an infinite loop in constrained triangulation.
+
+
+* 3D Triangulations (major new feature added)
+
+  - Add a way to efficiently insert a range of points with information into a
+    3D Delaunay and regular triangulation.
+
+  - Add a member function to remove a cluster of points from a Delaunay or
+    regular triangulation.
+
+  - function vertices_in_conflict is renamed vertices_on_conflict_zone_boundary
+    for Delaunay and regular triangulation. Function
+    vertices_inside_conflict_zone is added to regular triangulation.
+
+  - Structural filtering is now internally used in locate function of Delaunay
+    and regular triangulation. It improves average construction time by 20%.
+
+  - Added demo.
+
+
+* 3D Alpha Shapes (major new feature added)
+
+  - The new class Fixed_alpha_shape_3 provides a robust and faster way to
+    compute one alpha shape (with a fixed value of alpha).
+
+
+* AABB tree
+
+  - Adding the possibility to iteratively add primitives to an existing tree
+    and to build it only when no further insertion is needed.
+
+
+* 2D and 3D Kernel
+
+  - Better handling of 2D points with elevation (3D points projected onto
+    trivial planes). More general traits classes (Projection_traits_xy_3,
+    Projection_traits_yz_3,Projection_traits_yz_3) are provided to work with
+    triangulations, algorithms on polygons, alpha-shapes, convex hull
+    algorithm... Usage of former equivalent traits classes in different
+    packages is now deprecated.
+
+  - Exact_predicates_exact_constructions_kernel now better use the static
+    filters which leads to performance improvements.
+
+  - Add an overload for the global function angle, taking three 3D points.
+
+  - In the 2D and 3D kernel concept, the constant Boolean
+    Has_filtered_predicates is now deprecated. It is now required to use
+    Has_filtered_predicates_tag (being either Tag_true or Tag_false).
+
+  - Compare_distance_2 and Compare_distance_3 provide additional operators for
+    3 and 4 elements.
+
+  - Add intersection test and intersection computation capabilities between an
+    object of type Ray_3 and either an object of type Line_3, Segment_3 or
+    Ray_3.
+
+  - Improve intersection test performance between an object of type Bbox_3 and
+    an object of type Plane_3 or Triangle_3 by avoiding arithmetic filter
+    failures.
+
+
+* 2D Envelope
+
+  - Env_default_diagram_1 is deprecated, Envelope_diagram_1 should be used
+    instead.
+
+
+* 3D Envelope
+
+  - A new demo program called L1_Voronoi_diagram_2 has been introduced. It
+    demonstrates how 2D Voronoi diagrams of points under the L1 metric are
+    constructed using lower envelopes.
+
+
+* dD Kernel
+
+  - Add functor Compute_coordinate_d to Kernel_d concept.
+
+
+* Geometric Object Generators
+
+  - CGAL::Random uses boost::rand48 instead of std::rand.
+
+  - Adding to CGAL::Random a way to generate random integers.
+
+  - Adding generators for dD points.
+
+
+* Algebraic Foundations
+
+  - Algebraic_structure_traits now provides an Inverse functor for Fields.
+    There is also a new global function inverse.
+
+
+* Bounding Volumes
+
+  - dD Min sphere of spheres has a new traits class for the min sphere of
+    points.
+
+
+* Triangulated Surface Mesh Simplification
+
+  - The priority queue internally used to prioritize edge simplifications is no
+    longer a relaxed heap but a binomial heap. This fix guarantees that all
+    edges satisfying a simplification criteria are removed (if possible).
+
+
+* 3D Boolean Operations on Nef Polyhedra
+
+  - Allow construction of a 3D nef polyhedron from a 3D polyhedron with
+    normals.
+
+
+* 2D Arrangements
+
+  - Fix a bug in the method insert_at_vertices of the Arrangement_2 class.
+
+  - Fix several bugs in the traits class Arr_Bezier_curve_traits_2 for
+    arrangement of Bezier curves.
+
+
+* 2D Minkowski Sums
+
+  - A bug in the convolution method was fixed.
+
+
+-------------------------------- Release 3.7 --------------------------------
+
+Release date: October 2010
+
+CGAL 3.7 offers the following improvements and new functionality :
+
+
+* General
+
+  - The configuration of CGAL libraries now requires CMake>=2.6.
+
+  - Changes in the set of supported platforms:
+
+      - GNU g++ 4.5 supported (with or without the compilation option -
+        std=c++0x).
+
+      - Initial support for the option -strict-ansi of the Intel Compiler 11.
+        The CGAL libraries compile with that option, and most CGAL headers have
+        been fixed. The packages "3D Boolean Operations on Nef Polyhedra"
+        (Nef_3), "Convex Decomposition of Polyhedra" (Convex_decomposition_3),
+        and "3D Minkowski Sum of Polyhedra" (Minkowski_sum_3) are known to
+        still fail to compile with that compiler flag.
+
+      - The Microsoft Windows Visual C++ compiler 2010 (VC10), that was
+        experimentally supported by CGAL-3.6.1, is now fully supported. Note
+        that CMake>=2.8.2 is required for that support.
+
+      - The Microsoft Windows Visual C++ compiler 2005 (VC8) is no longer
+        supported by the CGAL project since CGAL-3.7.
+
+      - With Microsoft Windows Visual C++ (VC9 and VC10), the optional
+        dependencies Gmp, Mpfr, Blas, Lapack, Taucs no longer use Boost-style
+        name mangling. Only one variant is now provided by the CGAL Windows
+        installer (release, with dynamic runtime).
+
+
+  - Some demos now require a version of Qt4 >= 4.3.
+
+  - CGAL_PDB is no longer provided with CGAL. An alternative solution for
+    people interested in reading PDB files is to use ESBTL (http://
+    esbtl.sourceforge.net/).
+
+  - Fix issues of the CGAL wrappers around the CORE library, on 64 bits
+    platforms.
+
+
+* Arithmetic and Algebra
+
+  - New models Algebraic_kernel_d_1 and Algebraic_kernel_d_2 for the
+    corresponding concepts. They provide generic support for various
+    coefficient types
+
+
+* Arrangements
+
+  - A new model Arr_algebraic_segment_traits_2 of ArrangementTraits_2 that
+    supports algebraic curves of arbitrary degree in the plane
+
+
+* 2D Triangulations
+
+  - The Delaunay and regular 2D triangulations now use a symbolic perturbation
+    to choose a particular triangulation in co-circular cases.
+
+  - The return type of the template member function insert(It beg, It end),
+    taking an iterator range of points, has been changed from int to std::
+    ptrdiff_t.
+
+  - Classes Triangulation_euclidean_traits_xy_3,
+    Triangulation_euclidean_traits_yz_3 and Triangulation_euclidean_traits_xz_3
+    are now model of the concept ConstrainedTriangulationTraits_2. They can be
+    used with and without intersection of constraints.
+
+  - 2D Delaunay and basic triangulations now provide vertex relocation by the
+    mean of these two new methods: move and move_if_no_collision. The methods
+    are also available for the hierarchy (Triangulation_hierarchy_2).
+
+
+* 3D Triangulations
+
+  - The return type of the template member function insert(It beg, It end),
+    taking an iterator range of points, has been changed from int to std::
+    ptrdiff_t.
+
+  - 3D Delaunay triangulations now provide vertex relocation by the mean of
+    these two new methods: move and move_if_no_collision. This works in both
+    Compact_policy and Fast_policy.
+
+
+* 2D and 3D Alpha Shapes
+
+  - The type int in the API has been changed to std::size_t so that CGAL can
+    deal with large data sets (64 bit addresses).
+
+
+* 2D Mesh Generation
+
+  - The execution of the 2D mesh generator is now deterministic (same at each
+    run).
+
+
+* 3D Mesh Generation
+
+  - The efficiency of the 3D mesh generator has been improved (the number of
+    calls to the oracle per inserted vertex has globally decrease). This is
+    achieved through a slight change of the mesh generator strategy which
+    implies that a surface component that is not detected at the surface mesher
+    level will never be discovered by chance, owing to the refinement of some
+    tetrahedra, as it could happen before. Please note that defining the macro
+    CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE switches back to the
+    old behavior.
+
+  - A demo program is now available.
+
+
+* Surface Reconstruction from Point Sets
+
+  - Improved performance and minor bug fix.
+
+
+* 2D Range and Neighbor Search
+
+  - The type int in the API has been changed to std::size_t so that CGAL can
+    deal with large data sets (64 bit addresses).
+
+
+-------------------------------- Release 3.6.1 --------------------------------
+
+Release date: June 2010
+
+This is a bug fix release. The following has been changed since CGAL-3.6:
+
+
+* General
+
+  - Fix compilation errors with recent Boost versions (since 1.40).
+
+  - Initial support for the Microsoft Visual C++ compiler 10.0 (MSVC 2010). For
+    that support, CMake>=2.8.2 is required. Note also that the compiler option
+    "/bigobj" is necessary to compile some CGAL programs with MSVC 2010.
+
+
+* Polynomial
+
+  - Fix compilation errors with the Microsoft Visual C++ compiler and the Intel
+    C++ compiler.
+
+
+* Polyhedron
+
+  - Fix a compilation errors in demo/Polyhedron/:
+
+  - issue with the location of qglobal.h of Qt4 on MacOS X,
+
+  - missing texture.cpp, if TAUCS is used,
+
+  - Fix the location of built plugins of demo/Polyhedron/, when CGAL is
+    configured with WITH_demos=ON
+
+
+* 3D Periodic Triangulations
+
+  - Fixed bug in the triangulation hierarchy for periodic triangulations.
+
+
+* 2D Mesh Generation
+
+  - Fix a bug that lead to precondition violation.
+
+  - Improve the user manual about the member function is_in_domain() of the
+    Face type.
+
+  - The 2D meshing process is now deterministic (sorting of bad faces no longer
+    relies on pointers comparisons).
+
+
+* 3D Mesh Generation
+
+  - Fix a linking errors (duplicate symbols) when <CGAL/refine_mesh_3.h> is
+    included in different compilation units.
+
+
+* Spatial Searching
+
+  - Fix a bug in <CGAL/Orthogonal_k_neighbor_search.h> when several nearest
+    neighbors are at the same distance from the query point.
+
+
+* IO Streams
+
+  - Fix a bug in <CGAL/IO/VRML_2_ostream.h> that generated VRML 2 files with an
+    invalid syntax for IndexedFaceSet nodes.
+
+
+* Triangulation_2
+
+  - Add missing Compare_distance_2 functor in trait classes
+    Triangulation_euclidean_traits_xy_3 Triangulation_euclidean_traits_yz_3 and
+    Triangulation_euclidean_traits_xz_3. This was preventing calling member
+    function nearest_vertex of Delaunay_triangulation_2 instantiated with one
+    of these traits.
+
+
+-------------------------------- Release 3.6 --------------------------------
+
+Release date: March 2010
+
+CGAL 3.6 offers the following improvements and new functionality :
+
+
+* General
+
+  - Boost version 1.34.1 at least is now required.
+
+
+* Arithmetic and Algebra
+
+ ** Algebraic Kernel (new package)
+
+  - This new package is targeted to provide black-box implementations of state-
+    of-the-art algorithms to determine, compare and approximate real roots of
+    univariate polynomials and bivariate polynomial systems. It includes models
+    of the univariate algebraic kernel concept, based on the library RS.
+
+
+ ** Number Types
+
+  - Two new arbitrary fixed-precision floating-point number types have been
+    added: the scalar type Gmpfr and the interval type Gmpfi, based on the MPFR
+    and MPFI libraries respectively.
+
+
+* Geometry Kernels
+
+ ** 2D and 3D Geometry Kernel
+
+  - Add new do_intersect() and intersection() overloads:
+
+      - do_intersect(Bbox_3, Bbox_3/Line_3/Ray_3/Segment_3)
+
+      - intersection(Triangle_3, Line_3/Ray_3/Segment_3)
+
+
+
+* Polygons
+
+ ** 2D Regularized Boolean Set-Operations
+
+  - Fixed General_polygon_set_2::arrangement() to return the proper type of
+    object.
+
+
+* Arrangement
+
+ ** 2D Arrangements
+
+  - Fixed passing a (const) traits object to the constructor of Arrangement_2.
+
+  - Introduced Arrangement_2::fictitious_face(), which returns the fictitious
+    face in case of an unbounded arrangement.
+
+  - Fixed a bug in Bezier-curve handling.
+
+  - Added (back) iterator, number_of_holes(), holes_begin(), and holes_end() to
+    the default DCEL for backward compatibility.
+
+  - Added (simple) versions of the free overlay() function. It employs the
+    default overlay-traits, which practically does nothing.
+
+
+* Polyhedron
+
+  - Fix a compilation errors in demo/Polyhedron/:
+
+      - issue with the location of qglobal.h of Qt4 on MacOS X,
+
+      - missing texture.cpp, if TAUCS is used,
+
+
+  - Fix the location of built plugins of demo/Polyhedron/, when CGAL is
+    configured with WITH_demos=ON
+
+  - Fix a bug in test_facet function of the incremental builder: the function
+    did not test if while a new facet makes a vertex manifold, no other facet
+    incident to that vertex breaks the manifold property.
+
+
+* Triangulations and Delaunay Triangulations
+
+ ** 2D/3D Regular Triangulations
+
+  - Weighted_point now has a constructor from Cartesian coordinates.
+
+
+ ** 3D Triangulations
+
+  - Regular_triangulation_3 : semi-static floating-point filters are now used
+    in its predicates, which can speed up its construction by a factor of about
+    3 when Exact_predicates_inexact_constructions_kernel is used.
+
+  - The class Regular_triangulation_filtered_traits_3 is deprecated, the class
+    Regular_triangulation_euclidean_traits_3 must be used instead. The
+    predicates of that traits will be filtered if the kernel given as template
+    parameter of that traits is itself a filtered kernel.
+
+  - Triangulation_hierarchy_3 is now deprecated, and replaced by a simpler
+    CGAL::Fast_location policy template parameter of Delaunay_triangulation_3.
+
+  - The old version of remove() (enabled with CGAL_DELAUNAY_3_OLD_REMOVE) has
+    been deleted.
+
+
+ ** 3D Periodic Triangulations
+
+  - New demo: 3D periodic Lloyd algorithm.
+
+  - New functionality for Voronoi diagrams: dual of an edge and of a vertex,
+    volume and centroid of the dual of a vertex.
+
+  - The package can now be used with the 3D Alpha Shapes package to compute
+    periodic alpha shapes.
+
+
+ ** 3D Alpha shapes
+
+  - The class Weighted_alpha_shape_euclidean_traits_3 is deprecated, the class
+    Regular_triangulation_euclidean_traits_3 must be used instead.
+
+  - The package can now be used together with the 3D Periodic Triangulation
+    package to compute periodic alpha shapes.
+
+
+ ** 2D/3D Triangulations, 2D Segment Delaunay Graph, 2D Apollonius Graph, and
+3D Periodic Triangulations
+
+  - The constructor and insert function taking ranges now produce structures
+    whose iterator orders is now deterministic (same at each run).
+
+
+* Mesh Generation
+
+ ** 2D Mesh Generation
+
+  - The 2D mesh generator can now be used with a constrained Delaunay
+    triangulation with constraints hierarchy
+    (Constrained_triangulation_plus_2).
+
+  - In some cases (refinement of a constrained edge that is on the convex
+    hull), the 2D mesh generator from CGAL-3.4 and CGAL-3.5 could create
+    invalid triangulations. This bug is now fixed.
+
+
+ ** 3D Mesh Generation
+
+  - The mesh generator has been enriched with an optimization phase to provide
+    3D meshes with well shaped tetrahedra (and in particular no slivers). The
+    optimization phase involves four different optimization processes: two
+    global optimization processes (ODT and Lloyd), a perturber and an exuder.
+    Each of these processes can be activated or not, and tuned to the users
+    needs and to available computer resources.
+
+
+* Support library
+
+ ** CGAL ipelets
+
+  - Add support for version 7 of Ipe.
+
+
+-------------------------------- Release 3.5.1 --------------------------------
+
+Release date: December 2009
+
+This is a bug fix release.
+
+
+* Documentation
+
+  - Fixes in the documentation (the online documentation of CGAL-3.5 is now
+    based on CGAL-3.5.1).
+
+  - Fixes to the bibliographic references.
+
+
+* Windows installer
+
+  - The Windows installer of CGAL-3.5.1 fixes an issue with downloading of
+    precompiled binaries of the external library TAUCS.
+
+
+* Bug fixes in the following CGAL packages
+
+ ** AABB tree
+
+  - Fix a linker issue in do_intersect(Bbox_3,Bbox_3).
+
+  - Fix compilation issue in do_intersect(Bbox_3,Ray_3) when using the
+    parameters in this order.
+
+
+ ** 3D Mesh Generation
+
+  - Fix a bug in initial points construction of a polyhedral surface.
+
+
+-------------------------------- Release 3.5 --------------------------------
+
+Release date: October 2009
+
+CGAL releases will now be published about every six months. As a transition
+release, CGAL-3.5 has been developed during 9 months from the release CGAL-3.4.
+
+Version 3.5 differs from version 3.4 in the platforms that are supported and in
+functionality. There have also been a number of bug fixes for this release.
+
+
+* General
+
+  - Additional supported platforms:
+
+      - GNU g++ 4.4 supported.
+
+      - Intel Compiler 11 supported on Linux
+
+
+  - Fixed ABI incompatibilities when mixing CGAL and Boost Program Options on
+    Windows/Visual C++ (the compilation flag -D_SECURE_SCL=0 is not longer use
+    in Debug mode).
+
+
+* Geometry Kernels
+
+ ** 3D Spherical Geometry Kernel
+
+  - Add functionalities to manipulate circles, circular arcs and points that
+    belong to the same sphere.
+
+
+* Polygons
+
+ ** 2D Regularized Boolean Set-Operations
+
+  - The polygon validation operations were enhanced and their interface was
+    improved. They are now offered as free functions and applied properly.
+
+
+ ** 2D Straight Skeleton and Polygon Offsetting
+
+  - Updated the manual to document the new partial skeletons feature (already
+    in the code since 3.4)
+
+
+* Arrangements
+
+ ** 2D Arrangements
+
+  - The member function is_at_infinity() of Arrangement_2::Vertex was replaced
+    by the new function is_at_open_boundary(). The former is deprecated. While
+    still supported in version 3.5, It will not be supported in future
+    releases. The member functions boundary_type_in_x() and boundary_type_in_y
+    () were permanently replaced by the functions parameter_space_in_x() and
+    parameter_space_in_y(), respectively. The 2 new functions return an
+    enumeration of a new type, namely Arr_parameter_space.
+
+  - The tags in the geometry traits that indicate the type of boundary of the
+    embedding surface were replaced by the following new tags:
+    Arr_left_side_tag Arr_bottom_side_tag Arr_top_side_tag Arr_right_side_tag
+    In addition, the code was change, and now it is possible not to indicate
+    the tags at all. Default values are assumed. This however will produce
+    warning messages, and should be avoided.
+
+  - All operations of the geometry traits-class were made 'const'. This change
+    was reflected in the code of this package and all other packages that are
+    based on it. Traits classes that maintain state, should declare the data
+    members that store the state as mutable.
+
+
+ ** Envelopes of Surfaces in 3D
+
+  - A few bugs in the code that computes envelopes were fixed, in particular in
+    the code that computes the envelopes of planes.
+
+
+* Triangulations and Delaunay Triangulations
+
+ ** 3D Periodic Triangulations (new package)
+
+  - This package allows to build and handle triangulations of point sets in the
+    three dimensional flat torus. Triangulations are built incrementally and
+    can be modified by insertion or removal of vertices. They offer point
+    location facilities.
+
+
+* Mesh Generation
+
+ ** Surface Reconstruction from Point Sets (new package)
+
+  - This CGAL package implements an implicit surface reconstruction method:
+    Poisson Surface Reconstruction. The input is an unorganized point set with
+    oriented normals.
+
+
+ ** 3D Mesh Generation (new package)
+
+  - This package generates 3 dimensional meshes. It computes isotropic
+    simplicial meshes for domains or multidomains provided that a domain
+    descriptor, able to answer queries from a few different types on the
+    domain, is given. In the current version, Mesh_3 generate meshes for domain
+    described through implicit functional, 3D images or polyhedral boundaries.
+    The output is a 3D mesh of the domain volume and conformal surface meshes
+    for all the boundary and subdividing surfaces.
+
+
+* Geometry Processing
+
+ ** Triangulated Surface Mesh Simplification
+
+  - BREAKING API change in the passing of the visitor object.
+
+  - Fixed a bug in the link_condition test
+
+  - Added a geometric test to avoid folding of facets
+
+  - Fixed a bug in the handling of overflow in the LindstromTurk computations
+
+  - Updated the manual to account for the new visitor interface
+
+
+ ** Point Set Processing (new package)
+
+  - This packages implements a set of algorithms for analysis, processing, and
+    normal estimation and orientation of point sets.
+
+
+* Spatial Searching and Sorting
+
+ ** AABB tree (new package)
+
+  - This package implements a hierarchy of axis-aligned bounding boxes (a AABB
+    tree) for efficient intersection and distance computations between 3D
+    queries and sets of input 3D geometric objects.
+
+
+* Support Library
+
+ ** CGAL_ipelets (new package):
+
+  - Object that eases the writing of Ipe's plugins that use CGAL. Plugins for
+    CGAL main 2D algorithm are provided as demo.
+
+
+-------------------------------- Release 3.4 --------------------------------
+
+Release date: January 2009
+
+Version 3.4 differs from version 3.3.1 in the platforms that are supported and
+in functionality. There have also been a number of bug fixes for this release.
+
+
+* General
+
+  - GNU g++ 4.3 supported. Support for g++ 3.3 is dropped.
+
+  - Visual 9 supported. Support for Visual 7 is dropped.
+
+  - Boost version 1.33 at least is now required.
+
+  - CGAL now depends on Boost.Threads, which implies to link against a compiled
+    part of Boost.
+
+  - The new macro CGAL_NO_DEPRECATED_CODE can be defined to disable deprecated
+    code, helping users discover if they rely on code that may be removed in
+    subsequent releases.
+
+  - Assertion behaviour: It is not possible anymore to set the CONTINUE mode
+    for assertion failures. Functions that allow to change the assertion
+    behaviour are now declared in <CGAL/assertions_behaviour.h>.
+
+  - Qt3 based demos are still there but the documentation has been removed as
+    the CGAL::Qt_Widget will be deprecated.
+
+  - Qt4 based demos use the Qt GraphicsView framework and the libQGLViewer.
+
+
+* Installation
+
+  - install_cgal has been replaced by CMake.
+
+
+* Polynomial (new package)
+
+  - This package introduces a concept Polynomial_d, a concept for multivariate
+    polynomials in d variables.
+
+
+* Modular Arithmetic (new package)
+
+  - This package provides arithmetic over finite fields.
+
+
+* Number Types
+
+  - the counter Interval_nt::number_of_failures() has been removed, replaced by
+    a profiling counter enabled with CGAL_PROFILE.
+
+  - Fix of a bug in CORE/Expr.h; as a consequence, the arrangement demo works
+    properly when handling arrangements of conics, for example, when defining
+    an arc with 5 points.
+
+
+* 3D Spherical Geometry Kernel (new package)
+
+  - This package is an extension of the linear CGAL Kernel. It offers
+    functionalities on spheres, circles, circular arcs and line segments in the
+    3D space.
+
+
+* Linear Kernel
+
+  - We recommend that you use the object_cast() function instead of assign() to
+    extract an object from a CGAL::Object, for efficiency reasons.
+
+  - The Kernel archetypes provided by the 2D/3D linear kernel have been
+    removed.
+
+  - The deprecated linear kernel functors Construct_supporting_line_2 and
+    Construct_supporting_line_3 have been removed.
+
+  - Ambiant_dimension and Feature_dimenison have been added to retrieve the
+    potentially compile-time dimension of a space or of an object.
+
+  - barycenter() functions have been added.
+
+  - The geometric object Circle_3 as well as predicates and constructions have
+    been added to the kernel
+
+  - The missing intersection/do_intersect between Line_3 and Line_3 has been
+    added as well.
+
+
+* 3D Triangulations
+
+  - Removed the deprecated functions Cell:mirror_index() and Cell::
+    mirror_vertex().
+
+  - Derecursification of two functions that in some cases lead to stack
+    overflows
+
+
+* 3D Nef Polyhedron
+
+  - n-ary union/intersection
+
+  - intersection with halfspace under standard kernel
+
+  - constructor for polylines
+
+
+* CGAL and the Qt4 GraphicsView (new package)
+
+  - 2D CGAL Kernel objects and many data structures have can be rendered in a
+    QGraphicsView
+
+
+* STL Extensions:
+
+  - The functor adaptors for argument binding and composition (bind_*, compose,
+    compose_shared, swap_*, negate, along with the helper functions set_arity_*
+    and Arity class and Arity_tag typedefs) which were provided by <CGAL/
+    functional.h> have been removed. Please use the better boost::bind mecanism
+    instead. The concept AdaptableFunctor has been changed accordingly such
+    that only a nested result_type is required.
+
+  - The accessory classes Twotuple, Threetuple, Fourtuple and Sixtuple are also
+    deprecated (use CGAL::array instead).
+
+  - CGAL::Triple and CGAL::Quadruple are in the process of being replaced by
+    boost::tuple. As a first step, we strongly recommend that you replace the
+    direct access to the data members (.first, .second, .third, .fourth), by
+    the get<i>() member function; and replace the make_triple and
+    make_quadruple maker functions by make_tuple.
+    This way, in a further release, we will be able to switch to boost::tuple
+    more easily.
+
+  - The class CGAL::Uncertain<> has been documented. It is typically used to
+    report uncertain results for predicates using interval arithmetic, and
+    other filtering techniques.
+
+
+* 2D Arrangements
+
+  - Changed the name of the arrangement package from Arrangement_2 to
+    Arrangement_on_surface_2 to reflect the potential capabilities of the
+    package to construct and maintain arrangements induced by curves embedded
+    on two dimensional surfaces in three space. Most of these capabilities will
+    become available only in future releases though.
+
+  - Enhanced the geometry traits concept to handle arrangements embedded on
+    surfaces. Each geometry-traits class must now define the
+    'Boundary_category' tag.
+
+  - Fixed a bug in Arr_polyline_traits_2.h, where the operator that compares
+    two curves failed to evaluate the correct result (true) when the curves are
+    different, but their graphs are identical.
+
+  - Permanently removed IO/Arr_postscript_file_stream.h and IO/
+    Polyline_2_postscript_file_stream.h, as they depend on obsolete features
+    and LEDA.
+
+  - Fixed several bugs in the arrangement demo and enhanced it. e.g., fixed
+    background color change, allowed vertex coloring , enabled "smart" color
+    selection, etc.
+
+  - Enhanced the arrangement demo with new features, such as allowing the
+    abortion of the merge function (de-select), updated the how-to description,
+    etc.
+
+  - Replace the functions CGAL::insert_curve(), CGAL::insert_curves(), CGAL::
+    insert_x_monotone_curve(), and CGAL::insert_x_monotone_curves() with a
+    single overloaded function CGAL::insert(). The former 4 functions are now
+    deprecated, and may no longer be supported in future releases.
+
+
+* Envelopes of Surfaces in 3D
+
+  - Fixed a bug in the computation of the envelope of unbounded planes caused
+    by multiple removals of vertices at infinity.
+
+
+* 2D Regularized Boolean Set-Operations
+
+  - Fixed a bug in connect_holes() that caused failures when connecting holes
+    touching the outer boundary.
+
+  - Fixed the concept GeneralPolygonSetTraits_2. Introduced two new concepts
+    GpsTraitsGeneralPolygon_2 and GpsTraitsGeneralPolygonWithHoles_2. Fixed the
+    definition of the two nested required types Polygon_2 and
+    Polygon_with_holes_2 of the GeneralPolygonSetTraits_2 concept. They must
+    model now the two new concepts above.
+
+  - Added a default template parameter to 'General_polygon_set_2' to allow
+    users to pass their specialized DCEL used to instantiate the underlying
+    arrangement.
+
+  - Enhanced the BOP demo to use multiple windows.
+
+
+* 2D Minkowski Sums
+
+  - Fixed a few bugs in the approximate offset function, making it robust to
+    highly degenerate inputs.
+
+  - Fixed a bug in the exact Minkowski sum computation when processing
+    degenerate inputs that induce overlapping of contiguous segments in the
+    convolution cycles.
+
+  - Optimized the approximate offset function (reduced time consumption up to a
+    factor of 2 in some cases).
+
+  - Added functionality to compute the offset (or to approximate the offset) of
+    a Polygon_with_holes_2 (and not just of a Polygon_2).
+
+  - Added the functionality to compute (or to approximate) the inner offset of
+    a polygon.
+
+
+-------------------------------- Release 3.3.1 --------------------------------
+
+Release date: August 2007
+
+This is a bug fix release.
+
+
+* General
+
+  - Intel C++ 9 was wrongly recognized as unsupported by install_cgal.
+
+  - Added autolink (for Visual C++) for the CGALImageIO and CGALPDB libraries.
+
+  - Fixed bug in Memory_sizer when using more than 4GB of memory (64bit).
+
+
+* Number Types
+
+  - Fixed bug in FPU rounding mode macros (affected only the alpha
+    architecture).
+
+  - Fixed bug in MP_Float constructor from double for some particular values.
+
+  - Fixed bug in to_double(Lazy_exact_nt) sometimes returning NaN.
+
+
+* Kernel
+
+  - Fixed forgotten derivation in Circular_kernel_2::Has_on_2
+
+  - Added some missing functions in Bbox_3 compared to Bbox_2.
+
+
+* Skin Surface Meshing
+
+  - The new Skin Surface Meshing package had been forgotten in the list of
+    changes and the release announcement of CGAL 3.3: This package allows to
+    build a triangular mesh of a skin surface. Skin surfaces are used for
+    modeling large molecules in biological computing.
+
+
+* Arrangements
+
+  - Fixed a bug in the Arrangement_2 package in dual arrangement representation
+    for Boost graphs when reporting all halfedges of a face.
+
+  - Fixed a bug in the Arrangement sweep-line when using a specific polyline
+    configuration.
+
+  - Fixed bug in Arrangement_2 in walk along a line point location for
+    unbounded curves.
+
+  - Fixed bug in aggregated insertion to Arrangement_2.
+
+  - Fixed bug in Arrangment_2 class when inserting an unbounded curve from an
+    existing vertex.
+
+  - Fixed bug when dealing with a degenerate conic arc in Arr_conic_traits_2 of
+    the Arrangment package, meaning a line segment which is part of a
+    degenerate parabola/hyperbola.
+
+  - Fixed bug in the Bezier traits-class: properly handle line segments.
+    properly handle comparison near a vertical tangency.
+
+
+* 2D Polygon
+
+  - Fixed bug in degenerate case of Polygon_2::is_convex() for equal points.
+
+
+* 2D Triangulations
+
+  - Fixed bug in Regular_triangulation_2.
+
+
+* 3D Triangulations
+
+  - Added a circumcenter() function in the default Cell type parameter
+    Triangulation_ds_cell_base_3, so that the .dual() member function of
+    Delaunay still work as before, without requiring the explicit use of
+    Triangulation_cell_base.
+
+  - Added missing operator->() to Facet_circulator.
+
+
+* Interpolation
+
+  - Fixed bug in Interpolation 3D about the normalization coefficient
+    initialization.
+
+
+* 3D Boolean Operations on Nef Polyhedra
+
+  - Fixed bug in construction of Nef_polyhedron_3 from off-file. Now, always
+    the inner volume is selected.
+
+  - Fixed bug in conversion from Nef_polyhedron_3 to Polyhedron_3. Polyhedron_3
+    was not cleared at the beginning.
+
+  - Fixed bug in Nef_polyhedron_3 in update of indexes for construction of
+    external structure.
+
+
+* Third Party Libraries Shipped with CGAL
+
+  - TAUCS supports now 64 bits platforms.
+
+  - CAUTION: Since version 3.3.1, CGAL is no longer compatible with the
+    official release of TAUCS (currently 2.2). Make sure to use the version
+    modified by the CGAL project and available from the download section of
+    http://www.cgal.org.
+
+
+-------------------------------- Release 3.3 --------------------------------
+
+Release date: May 2007
+
+Version 3.3 differs from version 3.2.1 in the platforms that are supported and
+in functionality. There have also been a number of bug fixes for this release.
+
+Additional supported platforms
+
+  - GNU g++ 4.1 and 4.2
+
+  - Intel C++ compiler 9
+
+  - Microsoft Visual C++ compiler 8.0
+
+
+The following platforms are no longer supported:
+
+  - Intel 8
+
+
+CGAL now supports Visual C++ "Checked iterators" as well as the debug mode of
+GNU g++'s STL (-D_GLIBCXX_DEBUG).
+
+CGAL now works around the preprocessor macros 'min' and 'max' defined in
+<windows.h> which were clashing with min/max functions.
+
+
+* Installation
+
+  - On Windows the libraries built in Developer Studio now have names which
+    encode the compiler version, the runtime and whether it was built in
+    release or debug mode. The libraries to link against are chosen with linker
+    pragmas in header files.
+
+  - On all platforms but Windows shared and static versions of the libraries
+    are generated
+
+
+* Manuals
+
+  - The Package Overview page now also hosts the precompiled demos.
+
+
+* Algebraic Foundations
+
+  - Algebraic Foundations (new package)
+    This package defines what algebra means for CGAL, in terms of concepts,
+    classes and functions. The main features are: (i) explicit concepts for
+    interoperability of types (ii) separation between algebraic types (not
+    necessarily embeddable into the reals), and number types (embeddable into
+    the reals).
+
+  - Number Types
+    Fixed_precision_nt and Filtered_exact number types have been removed.
+
+
+
+* Kernels
+
+  - 2D Circular Kernel
+    Efficiency improved through geometric filtering of predicates, introduced
+    with the filtered kernel Filtered_bbox_circular_kernel_2<.>, and also
+    chosen for the predefined kernel Exact_circular_kernel_2.
+
+  - Linear Kernel
+    Exact_predicates_exact_constructions_kernel memory and run-time
+    improvements through usage of lazy geometric constructions instead of lazy
+    arithmetic.
+
+
+
+* Data Structures and Algorithms
+
+  - Surface Mesh Simplification (new package)
+    This package provides a mesh simplification framework using edge collapse
+    operations, and provides the Turk/Lindstrom simplification algorithm.
+
+  - Skin Surface Meshing (new package)
+    This package allows to build a triangular mesh of a skin surface. Skin
+    surfaces are used for modeling large molecules in biological computing. The
+    surface is defined by a set of balls, representing the atoms of the
+    molecule, and a shrink factor that determines the size of the smooth
+    patches gluing the balls together.
+
+  - Estimation of Local Differential Properties (new package)
+    This package allows to compute local differential quantities of a surface
+    from a point sample
+
+  - Approximation of Ridges and Umbilics on Triangulated Surface Meshes (new
+    package)
+    This package enables the approximation of differential features on
+    triangulated surface meshes. Such curvature related features are lines:
+    ridges or crests, and points: umbilics.
+
+  - Envelopes of Curves in 2D (new package)
+    This package contains two sets of functions that construct the lower and
+    upper envelope diagram for a given range of bounded or unbounded curves.
+
+  - Envelopes of Surfaces in 3D (new package)
+    This package contains two sets of functions that construct the lower and
+    upper envelope diagram for a given range of bounded or unbounded surfaces.
+    The envelope diagram is realized as a 2D arrangement.
+
+  - Minkowski Sums in 2D (new package)
+    This package contains functions for computing planar Minkowski sums of two
+    closed polygons, and for a polygon and a disc (an operation also known as
+    offsetting or dilating a polygon). The package also contains an efficient
+    approximation algorithm for the offset computation, which provides a
+    guaranteed approximation bound while significantly expediting the running
+    times w.r.t. the exact computation procedure.
+
+  - Surface Mesh Parametrization
+    Added Jacobi and SSOR preconditioners to OpenNL solver, which makes it much
+    faster and more stable.
+
+  - 2D Arrangements
+
+      - Added support for unbounded curves.
+
+      - Added a traits class that supports bounded and unbounded linear
+        objects, namely lines, rays and line segments.
+
+      - Added traits classes that handle circular arcs based on the circular
+        kernel.
+
+      - Added a traits class that supports Bezier curves.
+
+      - Enhanced the traits class that supports rational functions to handle
+        unbounded (as well as bounded) arcs
+
+      - Added a free function called decompose() that produces the symbolic
+        vertical decomposition of a given arrangement, performing a batched
+        vertical ray-shooting query from all arrangement vertices.
+
+      - Fixed a memory leak in the sweep-line code.
+
+      - Fixed a bug in computing the minor axis of non-degenerate hyperbolas.
+
+
+  - Boolean Set Operations
+
+      - Added the DCEL as a default template parameter to the
+        General_polygon_set_2 and Polygon_set_2 classes. This allows users to
+        extend the DCEL of the underlying arrangement.
+
+      - Added a function template called connect_holes() that connects the
+        holes in a given polygon with holes, turning it into a sequence of
+        points, where the holes are connceted to the outer boundary using zero-
+        width passages.
+
+      - Added a non-const function member to General_polygon_set_2 that obtains
+        the underlying arrangement.
+
+
+  - 2D and 3D Triangulations
+
+      - The constructors and insert member functions which take an iterator
+        range perform spatial sorting in order to speed up the insertion.
+
+
+  - Optimal Distances
+
+      - Polytope_distance_d: has support for homogeneous points; bugfix in fast
+        exact version.
+
+
+  - Bounding Volumes
+
+      - Min_annulus_d has support for homogeneous points; bugfix in fast exact
+        version.
+
+
+
+
+* Support Library
+
+  - CGAL and the Boost Graph Library (BGL) (new package)
+    This package provides the glue layer for several CGAL data structures such
+    that they become models of the BGL graph concept.
+
+  - Spatial Sorting (new package)
+    This package allows to sort points and other objects along a Hilbert curve
+    which can improve the performance of algorithms like triangulations. It is
+    used by the constructors of the triangulation package which have an
+    iterator range of points as argument.
+
+  - Linear and Quadratic Programming Solver (new package)
+    This package contains algorithms for minimizing linear and convex quadratic
+    functions over polyhedral domains, described by linear equations and
+    inequalities.
+
+
+-------------------------------- Release 3.2.1 --------------------------------
+
+Release date: July 2006
+
+This is a bug fix release
+
+
+* Number Types
+
+  - Fix MP_Float constructor which crashed for some values.
+
+
+* Kernel
+
+  - Rename Bool to avoid a clash with a macro in X11 headers.
+
+
+* Arrangement
+
+  - Derived the Arr_segment_traits_2 Arrangement_2 traits class from the
+    parameterized Kernel. This allows the use of this traits class in an
+    extended range of applications that require kernel objects and operations
+    on these objects beyond the ones required by the Arrangement_2 class
+    itself.
+
+  - Fixed a compilation bug in the code that handles overlay of arrangements
+    instantiated with different DCEL classes.
+
+  - Fixed a couple of bugs in the implementation of the Trapezoidal RIC point-
+    location strategy
+
+
+* Triangulation, Alpha Shapes
+
+  - Qualify calls to filter_iterator with "CGAL::" to avoid overload
+    ambiguities with Boost's filter_iterator.
+
+
+* Surface Mesher
+
+  - Fixed a bug in iterators of the class template
+    Surface_mesh_complex_2_in_triangulation_3
+
+
+* Surface Mesh Parametrisation
+
+  - Updated the precompiled taucs lib
+
+
+* Kinetic Data Structures
+
+  - Fixed problems caused by old versions of gcc being confused by operator!
+    and operator int()
+
+  - Added point removal support to the Active_objects_vector
+
+
+-------------------------------- Release 3.2 --------------------------------
+
+Release date: May 2006
+
+Version 3.2 differs from version 3.1 in the platforms that are supported and in
+functionality. There have also been a number of bug fixes for this release.
+
+The following platforms are no longer supported:
+
+  - SunPro CC versions 5.4 and 5.5 on Solaris
+
+  - SGI Mips Pro
+
+
+For Visual C++ the installation scripts choose the multi-threaded dynamically
+linked runtime (/MD). Before it was the single-threaded static runtime (/ML).
+
+
+* Installation
+
+  - The install tool tries to find third party libraries at "standard"
+    locations.
+
+  - Installers for Apple, Windows, and rpms.
+
+
+* Manuals
+
+  - User and Reference manual pages of a package are in the same chapter
+
+
+* Kernels
+
+  - 2D Circular Kernel (new package)
+    This package is an extension of the linear CGAL Kernel. It offers
+    functionalities on circles, circular arcs and line segments in the plane.
+
+
+
+* Data Structures and Algorithms
+
+  - 2D Regularized Boolean Set-Operations (new package)
+    This package consists of the implementation of Boolean set-operations on
+    point sets bounded by weakly x-monotone curves in 2-dimensional Euclidean
+    space. In particular, it contains the implementation of regularized Boolean
+    set-operations, intersection predicates, and point containment predicates.
+
+  - 2D Straight Skeleton and Polygon Offsetting (new package)
+    This package implements an algorithm to construct a halfedge data structure
+    representing the straight skeleton in the interior of 2D polygons with
+    holes and an algorithm to construct inward offset polygons at any offset
+    distance given a straight skeleton.
+
+  - 2D Voronoi Diagram Adaptor (new package)
+    This package provides an adaptor that adapts a 2-dimensional triangulated
+    Delaunay graph to the corresponding Voronoi diagram, represented as a
+    doubly connected edge list (DCEL) data structure. The adaptor has the
+    ability to automatically eliminate, in a consistent manner, degenerate
+    features of the Voronoi diagram, that are artifacts of the requirement that
+    Delaunay graphs should be triangulated even in degenerate configurations.
+    Depending on the type of operations that the underlying Delaunay graph
+    supports, the adaptor allows for the incremental or dynamic construction of
+    Voronoi diagrams and can support point location queries.
+
+  - 3D Surface Mesher (new package)
+    This package provides functions to generate surface meshes that interpolate
+    smooth surfaces. The meshing algorithm is based on Delaunay refinement and
+    provides some guarantees on the resulting mesh: the user is able to control
+    the size and shape of the mesh elements and the accuracy of the surface
+    approximation. There is no restriction on the topology and number of
+    components of input surfaces. The surface mesher may also be used for non
+    smooth surfaces but without guarantee.
+    Currently, implementations are provided for implicit surfaces described as
+    the zero level set of some function and surfaces described as a gray level
+    set in a three-dimensional image.
+
+
+  - 3D Surface Subdivision Methods (new package)
+    Subdivision methods recursively refine a control mesh and generate points
+    approximating the limit surface. This package consists of four popular
+    subdivision methods and their refinement hosts. Supported subdivision
+    methods include Catmull-Clark, Loop, Doo-Sabin and sqrt(3) subdivisions.
+    Their respective refinement hosts are PQQ, PTQ, DQQ and sqrt(3)
+    refinements. Variations of those methods can be easily extended by
+    substituting the geometry computation of the refinement host.
+
+  - Planar Parameterization of Triangulated Surface Meshes (new package)
+    Parameterizing a surface amounts to finding a one-to-one mapping from a
+    suitable domain to the surface. In this package, we focus on triangulated
+    surfaces that are homeomorphic to a disk and on piecewise linear mappings
+    into a planar domain. This package implements some of the state-of-the-art
+    surface mesh parameterization methods, such as least squares conformal
+    maps, discrete conformal map, discrete authalic parameterization, Floater
+    mean value coordinates or Tutte barycentric mapping.
+
+  - Principal Component Analysis (new package)
+    This package provides functions to compute global informations on the shape
+    of a set of 2D or 3D objects such as points. It provides the computation of
+    axis-aligned bounding boxes, centroids of point sets, barycenters of
+    weighted point sets, as well as linear least squares fitting for point sets
+    in 2D, and point sets as well as triangle sets in 3D.
+
+  - 2D Placement of Streamlines (new package)
+    Visualizing vector fields is important for many application domains. A good
+    way to do it is to generate streamlines that describe the flow behaviour.
+    This package implements the "Farthest Point Seeding" algorithm for placing
+    streamlines in 2D vector fields. It generates a list of streamlines
+    corresponding to an input flow using a specified separating distance. The
+    algorithm uses a Delaunay triangulation to model objects and adress
+    different queries, and relies on choosing the centers of the biggest empty
+    circles to start the integration of the streamlines.
+
+  - Kinetic Data Structures (new package)
+    Kinetic data structures allow combinatorial structures to be maintained as
+    the primitives move. The package provides implementations of kinetic data
+    structures for Delaunay triangulations in two and three dimensions, sorting
+    of points in one dimension and regular triangulations in three dimensions.
+    The package supports exact or inexact operations on primitives which move
+    along polynomial trajectories.
+
+  - Kinetic Framework (new package)
+    Kinetic data structures allow combinatorial geometric structures to be
+    maintained as the primitives move. The package provides a framework to ease
+    implementing and debugging kinetic data structures. The package supports
+    exact or inexact operations on primitives which move along polynomial
+    trajectories.
+
+  - Smallest Enclosing Ellipsoid (new package)
+    This algorithm is new in the chapter Geometric Optimisation.
+
+  - 2D Arrangement (major revision)
+    This package can be used to construct, maintain, alter, and display
+    arrangements in the plane. Once an arrangement is constructed, the package
+    can be used to obtain results of various queries on the arrangement, such
+    as point location. The package also includes generic implementations of two
+    algorithmic frameworks, that are, computing the zone of an arrangement, and
+    line-sweeping the plane, the arrangements is embedded on.
+    Arrangements and arrangement components can also be extended to store
+    additional data. An important extension stores the construction history of
+    the arrangement, such that it is possible to obtain the originating curve
+    of an arrangement subcurve.
+
+
+  - Geometric Optimisation (major revision)
+    The underlying QP solver which is the foundation for several algorithms in
+    the Geometric Optimisation chapter has been completely rewritten.
+
+  - 3D Triangulation (new functionality)
+    Regular_triangulation_3 now offers vertex removal.
+
+
+
+-------------------------------- Release 3.1 --------------------------------
+
+Release date: December 2004
+
+Version 3.1 differs from version 3.0 in the platforms that are supported and in
+functionality. There have also been a number of bug fixes for this release.
+
+Additional supported platforms:
+
+  - MS Visual C++, version 7.3. and 8.0
+
+  - Intel 8.0
+
+  - SunPro CC versions 5.4 and 5.5 on Solaris
+
+  - GNU g++ versions 3.4 on Linux, Solaris, Irix, cygwin, FreeBSD, and MacOS X
+
+  - Darwin (MacOS X) and IA64/Linux support.
+
+
+The following platforms are no longer supported:
+
+  - MS Visual C++, version 7.0
+
+
+The following functionality has been added or changed:
+
+
+
+* All
+
+  - The CORE 1.7 library for exact real arithmetic.
+
+  - Updated GMP to 4.1.3.
+
+  - Added Mpfr a library for multiple-precision floating-point computations
+    with exact rounding.
+
+  - Added Boost 1.32.0 (only include files).
+
+
+* Installation
+
+  - new option --disable-shared to omit building libCGAL.so.
+
+
+* Manuals
+
+  - Merged all major manuals in one multi-part manual, which provides now
+    cross-links between the CGAL Kernel, the CGAL Basic Library, and the CGAL
+    Support Library HTML manuals.
+
+  - Improved layout.
+
+
+* Kernels
+
+  - Improved efficiency of filtered kernels.
+
+  - More predicates and constructions.
+
+
+* Basic Library
+
+  - 2D Segment Voronoi Diagram (new package)
+    A data structure for Voronoi diagrams of segments in the plane under the
+    Euclidean metric. The Voronoi edges are arcs of straight lines and
+    parabolas. The algorithm provided in this package is incremental.
+
+  - 2D Conforming Triangulations and Meshes (new package)
+    An implementation of Shewchuk's algorithm to construct conforming
+    triangulations and 2D meshes.
+
+  - 3D Boolean Operations on Nef Polyhedra (new package)
+    A new class (Nef_polyhedron_3) representing 3D Nef polyhedra, a boundary
+    representation for cell-complexes bounded by halfspaces that supports
+    boolean operations and topological operations in full generality including
+    unbounded cells, mixed dimensional cells (e.g., isolated vertices and
+    antennas). Nef polyhedra distinguish between open and closed sets and can
+    represent non-manifold geometry.
+
+  - 2D and Surface Function Interpolation (new package)
+    This package implements different methods for scattered data interpolation:
+    Given measures of a function on a set of discrete data points, the task is
+    to interpolate this function on an arbitrary query point. The package
+    further offers functions for natural neighbor interpolation.
+
+  - Planar Nef polyhedra embedded on the sphere (new package)
+    A new class (Nef_polyhedron_S2) designed and supported mainly to represent
+    sphere neighborhoods around vertices of the three- dimensional Nef
+    polyhedra.
+
+  - Box_intersection_d (new package)
+    A new efficient algorithm for finding all intersecting pairs for large
+    numbers of iso-oriented boxes, i.e., typically these will be bounding boxes
+    of more complicated geometries. Useful for (self-) intersection tests of
+    surfaces etc.
+
+  - 2D Snap Rounding (new package)
+    Snap Rounding is a well known method for converting arbitrary-precision
+    arrangements of segments into a fixed-precision representation. In the
+    study of robust geometric computing, it can be classified as a finite
+    precision approximation technique. Iterated Snap Roundingis a modification
+    of Snap Rounding in which each vertex is at least half-the-width-of-a-pixel
+    away from any non-incident edge. This package supports both methods.
+
+  - 3D Triangulations
+
+      - Triangulation_3: added operator==(),removed push_back() and
+        copy_triangulation().
+
+      - Delaunay_3 : added nearest_vertex(), move_point(), vertices_in_conflict
+        ().
+
+      - Regular_3 : added filtered traits class, and nearest_power_vertex().
+
+
+  - Planar_map and Arrangement_2
+
+      - The interface of the two traits functions that compute the intersection
+        of two given curves changed. The functions
+        nearest_intersection_to_right() and nearest_intersection_to_left()
+        return an object of type CGAL::Object that represents either an empty
+        intersection, a point, or an overlapping subcurve.
+
+      - Requirements to define two binary tags were added to the traits concept
+        of the Planar_map as follows: Has_left_category - indicates whether the
+        functions curves_compare_y_at_x_left() and nearest_intersection_to_left
+        () are implemented in the traits model. Has_reflect_category -
+        indicates whether the functions point_reflect_in_x_and_y() and
+        curve_reflect_in_x_and_y() are implemented in the traits model. They
+        can be used as an alternative to the two function in the previous item.
+
+      - A new constructor of the Segment_cached_2 type that represents a
+        segment in the Arr_segment_cached_traits_2 traits class was introduced.
+        The new constructor accepts the segment endpoints as well as the
+        coefficients of the underlying line.
+
+      - A new version of the conic-arc traits, based on CORE version 1.7 was
+        introduced. This new traits class makes use of CORE's rootOf() operator
+        to compute the intersection points in the arrangement, making its code
+        much simpler and more elegant than the previous version. In addition,
+        new constructors for conic arcs are provided. The new traits class
+        usually performs about 30% faster than the version included in CGAL 3.0
+
+      - The traits class that handles continuous piecewise linear curves,
+        namely Arr_polyline_traits_2, was rewritten. The new class is
+        parametrized with a traits class that handles segments, say
+        Segment_traits. The polyline curve defined within the
+        Arr_polyline_traits_2 class is implemented as a vector of segments of
+        type Segment_traits::Curve_2.
+
+      - A meta traits class, namely Arr_curve_data_traits_2, that extends the
+        curve type of the planar-map with arbitrary additional data was
+        introduced. It should be instantiated with a regular traits-class and a
+        class that contains all extraneous data associated with a curve.
+
+      - The class that represents the trapezoidal-decomposition point location
+        strategy was renamed to Pm_trapezoid_ric_point_location.
+
+      - The Arrangement demo was rewritten. It covers many more features, has a
+        much better graphical user interface, and comes with online
+        documentation.
+
+      - Few bugs in the sweep-line module related to overlapping vertical
+        segments were fixed. This module is used by the aggregate insert method
+        that inserts a collection of curves at once.
+
+
+  - Triangulation_2
+
+      - added a filtered trait class in the regular triangulation
+
+      - added split and join operations in the triangulation data structure
+        class
+
+
+  - Alpha_shapes_3
+
+      - major changes in the implementation of the class Alpha_shapes_3.
+
+      - New implementation results in a true GENERAL mode allowing null and
+        negative alpha-values. It also fixed the edges classification bug and
+        introduces a classification of vertices.
+
+
+  - Min_ellipse_2
+
+      - made access to approximate double representation public
+
+      - fixed bugs in conversion to double representation
+
+      - added is_circle() method
+
+      - minor performance improvements
+
+
+  - Min_sphere_of_spheres_d:
+
+      - The models Min_sphere_of_spheres_d_traits_2<K,FT,UseSqrt,Algorithm>,
+        Min_sphere_of_spheres_d_traits_3<K,FT,UseSqrt,Algorithm>, and
+        Min_sphere_of_spheres_d_traits_d<K,FT,Dim,UseSqrt,Algorithm> of concept
+        MinSphereOfSpheresTraits now represent a sphere as a std::
+        pair<Point,Radius> (and not any more as a CGAL::
+        Weighted_point<Point,Weight>)
+
+      - Internal code cleanup; in particular, implementation details don't
+        pollute the namespace CGAL anymore
+
+
+  - Polyhedron_3
+
+      - New Tutorial on CGAL Polyhedron for Subdivision Algorithms with
+        interactive demo viewer in source code available.
+
+      - Added example program for efficient self-intersection test. - Added
+        small helper functions, such as vertex_degree, facet_degree, edge_flip,
+        and is_closed.
+
+
+  - Apollonius Graph (Voronoi of Circles)
+
+      - Reduced memory requirements by approximately a factor of two.
+
+
+
+-------------------------------- Release 3.0.1 --------------------------------
+
+Release date: February 2004
+
+This is a bug-fix release. No new features have been added in 3.0.1. Here is
+the list of bug-fixes.
+
+
+* Polyhedral Surface
+
+  - Fixed wrong include files for output support. Added example.
+
+
+* Planar_map
+
+  - Fixed the so called "Walk-along-a-line" point-location strategy to
+    correctly handle a degenerate case.
+
+
+* 2D Triangulation
+
+  - added missing figure in html doc
+
+  - in Line_face_circulator_2.h:
+    Fixed changes made to support handles with a typedef to iterator. The fix
+    concerns operator== and !=.
+
+
+* Alpha_shapes_3
+
+  - fixed classify member function for edges.
+
+
+* Number types
+
+  - Lazy_exact_nt:
+
+      - added the possibility to select the relative precision of to_double()
+        (by default 1e-5). This should fix reports that some circumcenters
+        computations have poor coordinates, e.g. nan).
+
+      - when exact computation is triggered, the interval is recomputed, this
+        should speed up some kinds of computations.
+
+
+  - to_interval(Quotient<MP_Float>): avoid spurious overflows.
+
+
+* Kernel
+
+  - missing acknowledgment in the manual and minor clarification of
+    intersection() documentation.
+
+
+-------------------------------- Release 3.0 --------------------------------
+
+Release date: October 2003
+
+Version 3.0 differs from version 2.4 in the platforms that are supported and in
+functionality. There have also been a number of bug fixes for this release.
+
+The license has been changed to either the LGPL (GNU Lesser General Public
+License v2.1) or the QPL (Q Public License v1.0) depending on each package. So
+CGAL remains free of use for you, if your usage meets the criteria of these
+licenses, otherwise, a commercial license has to be purchased from
+GeometryFactory.
+
+Additional supported platforms:
+
+  - MS Visual C++, version 7.1.
+
+  - SunPro CC versions 5.4 and 5.5 on Solaris
+
+  - GNU g++ versions 3.2 and 3.3 on Linux, Solaris, Irix, cygwin, and FreeBSD.
+
+  - MipsPRO CC 7.30 and 7.40 with both the n32 and n64 ABIs.
+
+
+The following platforms are no longer supported:
+
+  - MS Visual C++, version 6.
+
+  - GNU g++ 2.95.2 (2.95.3 is still supported)
+
+  - Kai C++ and Borland C++, all versions
+
+
+The following functionality has been added or changed:
+
+All
+
+  - The CORE library for exact computations is now distributed as part of CGAL
+    as well.
+
+
+
+* Kernels
+
+  - 3 typedefs have been added to ease the choice of a robust and fast kernel:
+
+      - Exact_predicates_inexact_constructions_kernel
+
+      - Exact_predicates_exact_constructions_kernel
+
+      - Exact_predicates_exact_constructions_kernel_with_sqrt
+
+
+  - Progress has been made towards the complete adaptability and extensibility
+    of our kernels.
+
+  - New faster Triangle_3 intersection test routines.
+    (see Erratum)
+
+  - Added a Kernel concept archetype to check that generic algorithms don't use
+    more functionality than they should.
+
+  - A few more miscellaneous functions.
+
+
+* Basic Library
+
+  - 2D Apollonius Graph (new package)
+    Algorithms for computing the Apollonius graph in two dimensions. The
+    Apollonius graph is the dual of the Apollonius diagram, also known as the
+    additively weighted Voronoi diagram. The latter can be thought of as the
+    Voronoi diagram of a set of circles under the Euclidean metric, and it is a
+    generalization of the standard Voronoi diagram for points. The algorithms
+    provided are dynamic.
+
+  - dD Min Sphere of Spheres (new package)
+    Algorithms to compute the smallest enclosing sphere of a given set of
+    spheres in Rd. The package provides an algorithm with maximal expected
+    running time O(2O(d) n) and a fast and robust heuristic (for dimension less
+    than 30).
+
+  - Spatial Searching (new package)
+    Provides exact and approximate distance browsing in a set of points in d-
+    dimensional space using implementations of algorithms supporting:
+
+      - both nearest and furthest neighbor searching
+
+      - both exact and approximate searching
+
+      - (approximate) range searching
+
+      - (approximate) k-nearest and k-furthest neighbor searching
+
+      - (approximate) incremental nearest and incremental furthest neighbor
+        searching
+
+      - query items representing points and spatial objects.
+
+
+  - Kd-tree
+    this package is deprecated, its documentation is removed. It is replaced by
+    the Spatial Searching package.
+
+  - Largest_empty_rectangle_2
+    Given a set of points P in the plane, the class
+    Largest_empty_iso_rectangle_2 is a data structure that maintains an iso-
+    rectangle with the largest area among all iso-rectangles that are inside a
+    given iso-rectangle bounding box, and that do not contain any point of the
+    point set P.
+
+  - 2D Triangulation and 3D Triangulation
+
+      - The classes Triangulation_data_structure_2 (and 3), which implements
+        the data structure for 2D triangulation class, now makes use of CGAL::
+        Compact_container (see Support Library section below).
+
+      - The triangulation classes use a Rebind mecanism to provide the full
+        flexibility on Vertex and Face base classes. This means that it is
+        possible for the user to derive its own Face of Vertex base class,
+        adding a functionality that makes use of types defined by the
+        triangulation data structure like Face_handle or Vertex_handle.
+
+      - New classes Triangulation_vertex_base_with_info_2 (and 3) and
+        Triangulation_face_base_with_info_2 (and 3) to make easier the
+        customisation of base classes in most cases.
+
+
+  - 2D Triangulation
+
+      - Regular triangulation provides an easy access to hidden points.
+
+      - The Triangulation_hierarchy_2, which provide an efficient location data
+        structure, can now be used with any 2D triangulation class plugged in
+        (including Regular triangulations).
+
+
+  - 3D Triangulation
+
+      - faster vertex removal function in Delaunay_triangulation_3.
+
+      - Delaunay_triangulation_3 is now independent of the order of insertions
+        of the points (in case of degenerate cosphericity).
+
+      - Regular_triangulation_3 now hides vertices (and updates itself) when
+        inserting a coinciding point with greater weight. This required a new
+        predicate.
+
+      - deprecated functions: copy_triangulation(), push_back(),
+        set_number_of_vertices().
+
+      - Triangulation_3 now gives non-const access to the data structure.
+
+
+  - Interval Skip List (new package)
+    An interval skip list is a data strucure for finding all intervals that
+    contain a point, and for stabbing queries, that is for answering the
+    question whether a given point is contained in an interval or not.
+
+  - Planar Maps and Arrangements
+    The changes concern mainly the traits classes.
+       1. New traits hierarchy and interface: The set of requirements was made
+          sound and complete. A couple of requirements were eliminated, few
+          others were redefined, and some were renamed. A hierarchy of three
+          traits classes for the Planar_map_2, Planar_map_with_intersections_2,
+          and Arrangement_2 types was established to include only the necessary
+          requirements at each level. It was determined that for the aggregate
+          insertion- operation based on a sweep-line algorithm only a subset of
+          the requirements is needed. Preconditions were added where
+          appropriate to tighten the requirements further.
+          The following functions have been renamed:
+
+            - point_is_same() renamed to point_equal()
+
+            - curve_is_same() renamed to curve_equal()
+
+            - curve_is_in_x_range() renamed to point_in_x_range()
+
+            - curve_compare_at_x() renamed to curves_compare_y_at_x()
+              Furthermore, a precondition has been added that the reference
+              point is in the x-range of both curves.
+
+            - curve_compare_at_x_right() renamed to
+              curves_compare_y_at_x_to_right(). Furthermore, a precondition has
+              been added that both curves are equal at the reference point and
+              defined to its right.
+
+            - curve_compare_at_x_left() renamed to
+              curves_compare_y_at_x_to_left(). Furthermore, a precondition has
+              been added that both curves are equal at the reference point and
+              defined to its right.
+
+            - curve_get_point_status() renamed to curve_compare_y_at_x().
+              Furthermore, a precondition has been added that the point is in
+              the x-range of the curve. Consequently, the function now returns
+              a Comparison_result (instead of a special enum).
+
+            - make_x_monotone() renamed to curve_make_x_monotone() See more
+              details below.
+
+            - curve_flip() renamed to curve_opposite()
+
+          The following functions have been removed:
+
+            - curve_is_between_cw()
+
+            - point_to_left()
+
+            - point_to_right()
+
+            - is_x_monotone()
+
+            - point_reflect_in_x_and_y()
+
+            - curve_reflect_in_x_and_y()
+
+            - do_intersect_to_right()
+
+            - do_intersect_to_left()
+
+          Most functions, are required by the PlanarMapTraits_2 concept, except
+          for the make_x_monotone(), nearest_intersection_to_right(),
+          nearest_intersection_to_left(), curves_overlap() and curve_opposite
+          (). PlanarMapWithIntersectionsTraits_2 requires all these functions,
+          except curve_opposite(), needed only by the ArrangementTraits_2
+          concept.
+
+          Furthermore, the two functions curve_compare_at_x_left() and
+          nearest_intersection_to_left() can be omitted, if the two functions
+          point_reflect_in_x() and curve_reflect_in_x() are implemented.
+          Reflection can be avoided, if the two _left functions are supplied.
+
+       2. The type X_curve_2 of the PlanarMapWithIntersectionsTraits_2 concept
+          was renamed to X_monotone_curve_2, and the distinction between this
+          type and the Curve_2 type was made firm. The method is_x_monotone()
+          of the PlanarMapWithIntersectionsTraits_2 concept was removed. The
+          related method curve_make_x_monotone() is now called for each input
+          curve of type Curve_2 when curves are inserted into a
+          Planar_map_with_intersections_2 to subdivide the input curve into x-
+          monotone sub-curves (and in case the curve is already x-monotone,
+          this function is responsible for casting it to an x-monotone curve).
+       3. New and improved traits classes:
+       4. Conic traits - Arr_conic_traits_2 Support finite segments of
+          ellipses, hyperbolas and parabolas, as well as line segments. The
+          traits require an exact real number- type, such as leda_real or
+          CORE::Expr.
+       5. Segment cached traits - Arr_segment_cached_traits_2 This class uses
+          an improved representation for segments that helps avoiding cascaded
+          computations, thus achieving faster running times. To work properly,
+          an exact rational number-type should be used.
+       6. Polyline traits - Arr_polyline_traits_2 The polyline traits class has
+          been reimplemented to work in a more efficient, generic manner. The
+          new class replaces the obsolete Arr_polyline_traits class. It is
+          parameterized with a segment traits class.
+       7. Hyperbola and segment traits - Arr_hyper_segment_traits_2 Supports
+          line segments and segments of canonical hyperbolas. This is the type
+          of curves that arise when projecting segments in three-space
+          rotationally around a line onto a plane containing the line. Such
+          projections are often useful in CAD/CAM problems.
+       8. Removed old traits class:
+
+            - The models of the PlanarMapWithIntersectionsTraits_2 concept
+              below became obsolete, as the new conic traits, namely
+              Arr_conic_traits_2, supports the same functionality and is much
+              more efficient.
+
+                - Arr_circles_real_traits
+
+                - Arr_segment_circle_traits
+
+
+            - The segment traits class and the new polyline traits class were
+              reimplemented using standard CGAL-kernel calls. This essentially
+              eliminated the corresponding leda traits classes, namely:
+
+                - Pm_leda_segment_traits_2
+
+                - Arr_leda_segment_traits_2
+
+                - Arr_leda_polyline_traits
+
+              With the use of the Leda_rat_kernel new external package the same
+              functionality can be achieved with less overhead and more
+              efficiency.
+
+       9. Sweep Line
+
+            - The Sweep_line_2 package was reimplemented. As a consequence it
+              is much more efficient, its traits is tighter (namely neither the
+              two _left nor the reflection functions are required), and its
+              interface has changed a bit.
+                 1. The following global functions have been removed:
+
+                      - sweep_to_produce_subcurves_2()
+
+                      - sweep_to_produce_points_2()
+
+                      - sweep_to_construct_planar_map_2()
+
+                    Instead, the public methods of the Sweep_line_2 class
+                    listed below were introduced:
+
+                      - get_subcurves() - Given a container of curves, this
+                        function returns a list of curves that are created by
+                        intersecting the input curves.
+
+                      - get_intersection_points() - Given a range of curves,
+                        this function returns a list of points that are the
+                        intersection points of the curves.
+
+                      - get_intersecting_curves() - Given a range of curves,
+                        this function returns an iterator to the beginning of a
+                        range that contains the list of curves for each
+                        intersection point between any two curves in the
+                        specified range.
+
+                 2. It is possible to construct a planar map with intersections
+                    (or an arrangement) by inserting a range of curves into an
+                    empty map. This will invoke the sweep-line process to
+                    construct the map more efficiently.
+
+            - New interface functions to the Planar_map_with_intersections_2
+              class. The Planar_map_with_intersections_2 class maintains a
+              planar map of input curves that possibly intersect each other and
+              are not necessarily x-monotone. If an input curve, or a set of
+              input curves, are known to be x-monotone and pairwise disjoint,
+              the new functions below can be used to insert them into the map
+              efficiently.
+
+
+  - Polyhedral Surface
+
+      - The old design that was deprecated since CGAL 2.3 has been removed.
+
+      - Class Polyhedron_incremental_builder_3:
+
+          - Renamed local enum ABSOLUTE to ABSOLUTE_INDEXING, and RELATIVE to
+            RELATIVE_INDEXING to avoid conflicts with similarly named macros of
+            another library.
+
+          - Changed member functions add_vertex(), begin_facet(), and end_facet
+            () to return useful handles.
+
+          - Added test_facet() to check facets for validity before adding them.
+
+          - Added vertex( size_t i) to return Vertex_handle for index i.
+
+
+
+  - Halfedge Data Structure
+
+      - The old design that was deprecated since CGAL 2.3 has been removed.
+
+
+
+* Support Library
+
+  - New container class Compact_container, which (roughly) provides the
+    flexibility of std::list, with the memory compactness of std::vector.
+
+  - Geomview_stream: added a function gv.draw_triangles(InputIterator begin,
+    InputIterator end) which draws a set of triangles much more quickly than
+    one by one.
+
+  - Number types:
+
+      - number types are now required to provide a function: std::pair<double,
+        double> to_interval(const NT &).
+
+      - number types are now required to provide mixed operators with "int".
+
+      - CLN support removed.
+
+      - faster square() for MP_Float.
+
+      - added Gmp_q.
+
+
+  - Qt_widget:
+
+      - New classes:
+
+          - Qt_help_window: provides a simple way to show some helpful
+            information about a demo as an HTML page.
+
+          - Qt_widget_history: provides basic functionality to manipulate
+            intervals of Qt_widget class. The current visible area of Qt_widget
+            is mapped to an interval. Each interval could be stored in the
+            Qt_widget_history object. So you can use this object to navigate in
+            history. It is mostly used by Qt_widget_standard_toolbar.
+
+
+      - Changes:
+
+          - Qt_widget_standard_toolbar: is derived from QToolBar class, so pay
+            attention to modify your code, if you used this class. Some public
+            methods were introduced to control the history object that the
+            toolbar use to navigate.
+
+          - the icons are now part of libCGALQt.
+
+
+      - Deprecated members of Qt_widget:
+
+          - add_to_history(), clear_history(), back(), forth(): use forward(),
+            back() and clear_history() of the Qt_widget_standard_toolbar
+            instead.
+
+          - custom_redraw(): use redraw_on_back() and redraw_on_front()
+            instead.
+
+
+      - Optimizations: the output operators of the following classes have been
+        optimized:
+
+          - CGAL::Segment_2 (now tests for intersection with the drawing area)
+
+          - CGAL::Triangle_2 (now tests for intersection with the drawing area)
+
+          - CGAL::Triangulation_2 (is optimized for faster display on zooming)
+
+
+
+
+* Erratum in the Kernel manual
+
+  - Intersection test routines
+    The documentation of CGAL::do_intersect should mention, for the 3D case:
+    Also, in three-dimensional space Type1 can be
+
+      - either Plane_3<Kernel>
+
+      - or Triangle_3<Kernel>
+
+    and Type2 any of
+
+      - Plane_3<Kernel>
+
+      - Line_3<Kernel>
+
+      - Ray_3<Kernel>
+
+      - Segment_3<Kernel>
+
+      - Triangle_3<Kernel>
+
+
+    In the same way, for Kernel::DoIntersect_3:
+    for all pairs Type1 and Type2, where the type Type1 is
+
+      - either Kernel::Plane_3
+
+      - or Kernel::Triangle_3
+
+    and Type2 can be any of the following:
+
+      - Kernel::Plane_3
+
+      - Kernel::Line_3
+
+      - Kernel::Ray_3
+
+      - Kernel::Segment_3
+
+      - Kernel::Triangle_3
+
+
+    Philippe Guigue (INRIA Sophia-Antipolis) should be mentioned as one of the
+    authors.
+
+
+
+-------------------------------- Release 2.4 --------------------------------
+
+Release date: May 2002
+
+Version 2.4 differs from version 2.3 in the platforms that are supported and in
+functionality. There have also been a number of bug fixes for this release.
+
+Additional supported platforms:
+
+  - Microsoft Visual C++, version 7.
+
+  - SunPro 5.3 (with patch 111685-05) on Solaris
+
+  - g++ 3.1 on Linux and Solaris
+
+
+The following functionality has been added or changed:
+
+
+
+* Kernels
+
+  - Point_d has been removed from the 2D and 3D kernels. This type is now
+    available from the d-dimensional kernel only.
+
+
+* Basic Library
+
+  - 2D Polygon Partitioning
+    Traits requirements for optimal partitioning have been changed slightly.
+
+
+  - 2D Sweep line
+    A new package that implements a sweep-line algorithm to compute
+    arrangements of curves for different families of curves, which are not
+    necessarily line segments (e.g., it also works for circular arcs). The
+    resulting output can be the list of vertex points, the resulting subcurves
+    or a planar map.
+
+
+  - Planar Maps and Arrangements
+
+      - New quicker insertion functions of Planar_map_2 for cases where more
+        precomputed information is available regarding the position of the
+        inserted curve in the map.
+
+      - New query function for planar maps that determines whether a given
+        point is within a given face of the planar map.
+
+      - New iterator over edges of planar maps in addition to the existing
+        iterator over halfedges.
+
+      - New copy constructor and assignment operator for arrangements.
+
+
+
+
+  - Polyhedral Surface
+
+      - new design introduced with release 2.3 now supported by VC7 compiler
+
+      - Extended functionality of Polyhedron_incremental_builder: absolute
+        indexing allows one to add new surfaces to existing ones.
+
+
+
+
+  - 2D Triangulation
+
+      - There is a new triangulation data structure replacing the two previous
+        ones. This new data structure is coherent with the 3d triangulation
+        data structure and offer the advantages of both previous ones. Backward
+        compatibility is ensured and this change is transparent for the user of
+        triangulation classes.
+
+      - Constrained and Delaunay constrained triangulations are now able to
+        handle intersecting input constraints. The behavior of constrained
+        triangulations with repect to intersection of input constraints can be
+        customized using an intersection tag.
+
+      - A new class Constrained_triangulation_plus offers a constrained
+        hierarchy on top of a constrained triangulations. This additionnal data
+        structure describes the subdivision of the original constraints into
+        edges of the triangulations.
+
+
+
+
+  - 3D Triangulation
+
+      - Running time improved by a better and more compact management of memory
+        allocation
+
+      - Various improvements and small functionalities added:
+
+          - Triangulation_3<GT,Tds>::triangle() returns a triangle oriented
+            towards the outside of the cell c for facet (c,i)
+
+          - New function insert(Point, Locate_type, Cell_handle, int, int)
+            which avoids the location step.
+
+          - New function to get access to cells in conflict in a Delaunay
+            insertion : find_conflicts() and insert_in_hole()
+
+          - New function TDS::delete_cells(begin, end).
+
+          - New functions : degree(v), reorient(), remove_decrease_dimension(),
+            remove_from_simplex().
+
+
+      - Changes of interface:
+
+          - vertices and cells are the same for the triangulation data
+            structure and the geometric triangulation
+
+          - the triangulation data structure uses Vertex_handle (resp
+            Cell_handle) instead of Vertex* (resp Cell*).
+
+          - incident_cells() and incident_vertices() are templated by output
+            iterators
+
+          - changes in the iterators and circulators interface:
+
+              - Iterators and circulators are convertible to handles
+                automatically, no need to call "->handle()" anymore.
+
+              - Vertex_iterator split into All_vertices_iterator and
+                Finite_vertices_iterator (and similar for cells...).
+
+              - TDS::Edge/Facet iterators now support operator->.
+
+
+
+
+
+
+  - 2D Search structures
+    Additional range search operations taking a predicate functor have been
+    added
+
+
+* Support Library
+
+  - Qt_widget
+
+      - We have added a new class for visualization of 2D CGAL objects. It is
+        derived from Trolltech's Qt class QWidget and privdes a used to scale
+        and pan.
+
+      - Some demos were developed for the following packages: 2D Alpha shapes,
+        2D Convex Hull, Largest empty 2D rectangle, Maximum k-gon, Minimum
+        ellipse, Minimum 2D quadrilateral, 2D polygon partitioning 2D regular
+        and constrained triangulation.
+
+      - Tutorials are available to help users get used to Qt_widget
+
+
+
+
+  - Timer
+    Fixed Timer class (for user process time) to have no wrap-around anymore on
+    Posix-compliant systems.
+
+The following functionality is no longer supported:
+
+  - Planar maps of infinite curves (the so-called planar map bounding-box).
+
+
+Bugs in the following packages have been fixed: 3D Convex hull, 2D Polygon
+partition, simple polygon generator
+
+Also attempts have been made to assure compatability with the upcoming LEDA
+release that introduces the leda namespace.
+
+
+* Known problems
+
+  - 2D Nef Polyhedra contains a memory leak. Memory problems are also the
+    likely cause of occasional run-time errors on some platforms.
+
+  - The d-dimensional convex hull computation produces run-time errors on some
+    platforms because of memory management bugs.
+
+  - The new Halfedge Data Structure design introduced with release 2.3 does not
+    work on VC6. See the release notes in the manual for more information.
+
+  - The following deficiencies relate to planar maps, planar maps of
+    intersecting curves (pmwx), arrangements and sweep line.
+
+      - On KCC, Borland and SunPro we guarantee neither compilation nor correct
+        execution for all of the packages above.
+
+      - On VC6 and VC7 we guarantee neither compilation nor correct execution
+        of the sweep line package.
+
+      - On CC (on Irix 6.5) the trapezoidal decomposition point location
+        strategy is problematic when used with planar maps, pmwx, or
+        arrangements (mind that this is the default for planar maps).
+
+      - On CC (on Irix 6.5) sweep line with polyline traits does not compile
+        (mind that the so-called leda polyline traits does compile).
+
+      - On g++ (on Irix 6.5) the segment-circle (Arr_segment_circle_traits_2)
+        traits does not compile for either of the above packages.
+
+
+
+-------------------------------- Release 2.3 --------------------------------
+
+Release date: August 2001
+
+Version 2.3 differs from version 2.2 in the platforms that are supported and in
+functionality.
+
+Additional supported platform:
+
+  - Gnu g++ 3.0 on Solaris and Linux
+
+
+The following functionality has been added:
+
+
+
+* Kernels
+
+  - The 2D and 3D kernels now serve as models of the new kernel concept
+    described in the recent paper, "An Adaptable and Extensible Geometry
+    Kernel" by Susan Hert, Micheal Hoffmann, Lutz Kettner, Sylvain Pion, and
+    Michael Seel to be presented at WAE 2001 (and soon available as a technical
+    report). This new kernel is completely compatible with the previous design
+    but is more flexible in that it allows geometric predicates as well as
+    objects to be easily exchanged and adapted individually to users' needs.
+
+  - A new kernel called Simple_homogeneous is available. It is equivalent to
+    Homogeneous but without reference-counted objects.
+
+  - A new kernel called Filtered_kernel is available that allows one to build
+    kernel traits classes that use exact and efficient predicates.
+
+  - There are two classes, Cartesian_converter and Homogeneous_converter that
+    allows one to convert objects between different Cartesian and homogeneous
+    kernels, respectively.
+
+  - A new d-dimensional kernel, Kernel_d is available. It provides diverse
+    kernel objects, predicates and constructions in d dimensions with two
+    representations based on the kernel families Cartesean_d and Homogeneous_d
+
+
+* Basic Library
+Almost all packages in the basic library have been adapted to the new kernel
+design to realize the flexibility this design makes possible. In several
+packages, this means that the traits class requirements have changed to conform
+to the function objects offered in the kernels so the kernels themselves can be
+used as traits classes in many instances.
+
+
+  - 2D Convex Hull
+    The traits requirements have changed slightly to bring them in line with
+    the CGAL kernels.
+
+  - 3D Convex Hull
+
+      - The function convex_hull_3 now uses a new implementation of the
+        quickhull algorithm and no longer requires LEDA.
+
+      - A new convex_hull_incremental_3 function based on the new d-dimensional
+        convex hull class is available for comparison purposes.
+
+
+
+  - Convex_hull_d, Delaunay_d
+    Two new application classes offering the calculation of d-dimensional
+    convex hulls and delaunay triangulations
+
+
+  - Polygons and Polygon Operations
+
+      - The traits class requirements have been changed.
+
+      - The simplicity test has a completely new implementation.
+
+      - Properties like convexity, simplicity and area can now be cached by
+        polygons. You need to set a flag to select this behaviour.
+
+
+
+
+
+  - Planar Nef Polyhedra
+    A new class (Nef_polyhedron_2) representing planar Nef polyhedra =
+    rectilinearly bounded points sets that are the result of binary and
+    topological operations starting from halfplanes.
+
+
+  - A new package offering functions to partition planar polygons into convex
+    and y-monotone pieces is available.
+
+
+  - Planar Maps and Arrangements
+
+      - A new class Planar_map_with_intersections_2<Planar_map> for planar maps
+        of possibly intersecting, possibly non-x-monotone, possibly overlapping
+        curves (like Arrangement_2 but without the hierarchy tree).
+
+      - I/O utilities for planar maps and arrangements for textual and
+        graphical streams. (It is possible to save and later reload built
+        planar maps or arrangements.)
+
+      - New arrangement traits class for line segments and circular arcs
+        (Arr_segment_circle_traits<NT>).
+
+      - New faster traits for polylines specialized for using the LEDA rational
+        kernel (Arr_leda_polylines_traits). The LEDA traits for segments was
+        also made faster.
+
+      - A new point location strategy (Pm_simple_point_location<Planar_map>).
+
+
+
+
+  - Halfedge Data Structure
+
+    The halfedge data structure has been completely revised. The new design is
+    more in line with the STL naming scheme and it provides a safe and coherent
+    type system throughout the whole design (no void* pointers anymore), which
+    allows for better extendibility. A user can add new incidences in the mesh
+    easily. The new design also uses standard allocators with a new template
+    parameter that has a suitable default.
+
+    The old design is still available, but its use is deprecated, see the
+    manual of deprecated packages for its documentation. Reported bugs in
+    copying the halfedge data structure (and therefore also polyhedral
+    surfaces) have been fixed in both designs. Copying a list-based
+    representation is now based on hash maps instead of std::map and is
+    therefore considerably faster.
+
+
+  - Polyhedral Surface
+
+    The polyhedral surface has been rewritten to work with the new halfedge
+    data structure design. The user level interface of the CGAL::Polyhedron_3
+    class is almost backwards compatible with the previous class. The
+    exceptions are the template parameter list, everything that relies on the
+    flexibility of the underlying halfedge data structure, such as a self-
+    written facet class, and that the distinction between supported normals and
+    supported planes has been removed. Only planes are supported. See the
+    manuals for suggestions how to handle normals instead of planes.
+
+    More example programs are provided with polyhedral surfaces, for example,
+    one about Euler operator and one computing a subdivision surface given a
+    control mesh as input.
+
+    The old design is still available for backwards compatibility and to
+    support older compiler, such as MSVC++6.0. For the polyhedral surface, old
+    and new design cannot be used simultaneously (they have identical include
+    file names and class names). The include files select automatically the old
+    design for MSVC++6.0 and the new design otherwise. This automatism can be
+    overwritten by defining appropriate macros before the include files. The
+    old design is selected with the CGAL_USE_POLYHEDRON_DESIGN_ONE macro. The
+    new design is selected with the CGAL_USE_POLYHEDRON_DESIGN_TWO macro.
+
+
+  - 2D Triangulation
+
+      - The geometric traits class requirements have been changed to conform to
+        the new CGAL kernels. CGAL kernel classes can be used as traits classes
+        for all 2D triangulations except for regular triangulations.
+
+      - Additionnal functionality:
+
+          - dual method for regular triangulations (to build a power diagram)
+
+          - unified names and signatures for various "find_conflicts()" member
+            functions in Delaunay and constrained Delaunay triangulation.
+
+          - As an alternative to the simple insert() member function, insertion
+            of points in those triangulation can be performed using the
+            combination of find_conflicts() and star_hole() which eventually
+            allows the user to keep track of deleted faces.
+
+
+      - More demos and examples
+
+
+
+  - 3D Triangulation
+
+      - Major improvements
+
+          - A new class Triangulation_hierarchy_3 that allows a faster point
+            location, and thus construction of the Delaunay triangulation
+
+          - A new method for removing a vertex from a Delaunay triangulation
+            that solves all degenerate cases
+
+          - Running time of the usual location and insertion methods improved
+
+
+      - A bit more functionality, such as
+
+          - New geomview output
+
+          - dual methods in Delaunay triangulations to draw the Voronoi diagram
+
+
+      - More demos and examples
+
+      - Changes in interface
+
+          - Traits classes requirements have been modified
+
+          - The kernel can be used directly as a traits class (except for
+            regular triangulation)
+
+          - insert methods in Triangulation_data_structure have a new interface
+
+
+
+
+  - A new class (Alpha_shapes_3) that computes Alpha shapes of point sets in 3D
+    is available.
+
+
+  - The traits requirements for matrix search and minimum quadrilaterals have
+    been changed to bring them in line with the CGAL kernels.
+
+
+  - Point_set_2
+
+      - now independent of LEDA; based on the CGAL Delaunay triangulation
+
+      - traits class requirements adapted to new kernel concept.
+
+      - function template versions of the provided query operations are
+        available
+
+
+
+* Support Library
+
+  - Number types:
+
+      - Lazy_exact_nt<NT> is a new number type wrapper to speed up exact number
+        types.
+
+      - MP_Float is a new multiprecision floating point number type. It can do
+        exact additions, subtractions and multiplications over floating point
+        values.
+
+
+  - In_place_list has a new third template parameter (with a suitable default)
+    for an STL-compliant allocator.
+
+  - Unique_hash_map is a new support class.
+
+  - Union_find is a new support class.
+
+  - Geomview_stream :
+
+      - Geomview version 1.8.1 is now required.
+
+      - no need to have a ~/.geomview file anymore.
+
+      - new output operators for triangulations.
+
+      - new output operators for Ray_2, Line_2, Ray_3, Line_3, Sphere_3.
+
+      - various new manipulators.
+
+
+  - Window stream In cooperation with Algorithmic Solutions, GmBH (distributors
+    of the LEDA library), we can now offer a visualization package downloadable
+    in binary form that supports visualization on a ported version of the LEDA
+    window lib.
+
+
+-------------------------------- Release 2.2 --------------------------------
+
+Release date: October 2000
+
+Version 2.2 differs from version 2.1 in the platforms that are supported and in
+functionality.
+
+Additional supported platforms:
+
+  - the KAI compiler (4.0) on Solaris 5.8
+
+  - Borland C++ (5.5)
+
+
+The following functionality has been added:
+
+  - There is a new, non-reference-counted kernel, Simple_cartesian. Because
+    reference counting is not used, and thus coordinates are stored within a
+    class, debugging is easier using this kernel. This kernel can also be
+    faster in some cases than the reference-counted Cartesian kernel.
+
+  - New optimisation algorithms
+
+      - Min_annulus_d - Algorithm for computing the smallest enclosing annulus
+        of points in arbitrary dimension
+
+      - Polytope_distance_d - Algorithm for computing the (squared) distance
+        between two convex polytopes in arbitrary dimension
+
+      - Width_3 - Algorithm for computing the (squared) width of points sets in
+        three dimensions
+
+
+  - 2D Triangulations
+
+      - There are now two triangulation data structures available in CGAL. The
+        new one uses a list to store the faces and allows one to represent two-
+        dimensional triangulations embedded in three spaces as well as planar
+        triangulations.
+
+      - The triangulation hierarchy which allows fast location query is now
+        available.
+
+
+  - Inifinite objects can now be included in planar maps.
+
+  - Removal as well as insertions of vertices for 3D Delaunay triangulations is
+    now possible.
+
+  - A generator for ``random'' simple polygons is now available.
+
+  - In directory demo/Robustness, programs that demonstrate typical robustness
+    problems in geometric computing are presented along with the solutions to
+    these problems that CGAL provides.
+
+
+The following functionality has been removed:
+
+  - The binary operations on polygons (union, intersection ...) have been
+    removed. Those operations were not documented in the previous release
+    (2.1). Arrangements can often be used as a substitute.
+
+
+
+-------------------------------- Release 2.1 --------------------------------
+
+Release date: January 2000
+
+Version 2.1 differs from version 2.0 in the platforms that are supported and in
+functionality.
+
+Supported platforms:
+
+  - the newest gnu compiler (2.95.2) on Sun, SGI, Linux and Windows.
+
+  - the Microsoft Visual C++ compiler, version 6.
+
+  - the mips CC compiler version 7.3 under Irix.
+
+Support for the old g++ compiler (2.8) and for mips CC 7.2 has been dropped.
+
+The following functionality has been added:
+
+  - Alpha shapes and weighted alpha shapes in 2D. Alpha shapes are a
+    generalization of the convex hull of a point set.
+
+  - Arrangements in 2D. Arrangements are related to and based on planar maps.
+    The major difference between the two is that curves are allowed to
+    intersect in the case of arrangements.
+
+  - Extensions to triangulations in 2D. Constrained triangulations are now
+    dynamic: they support insertions of new constraint as well as removal of
+    existing constraints. There are also constrained Delaunay triangulations.
+
+  - Triangulations in 3D were added, both Delaunay triangulations and regular
+    triangulations.
+
+  - Min_quadrilateral optimisations have been added. These are algorithms to
+    compute the minimum enclosing rectangle/parallelogram (arbitrary
+    orientation) and the minimum enclosing strip of a convex point set.
+
+  - 2d Point_set is a package for 2d range search operations, Delaunay
+    triangulation, nearest neighbor queries. This package works only if LEDA is
+    installed.
+
+  - Support for GeoWin visualization library. This also depends on LEDA.
+
+  - Support for using the CLN number type together with CGAL.
+
+
+
+-------------------------------- Release 2.0 --------------------------------
+
+Release date: June 1999
+
+The main difference from release 1.2 is the introduction of namespaces -
+- namespace std for code from the standard library and namespace CGAL for the
+CGAL library.
+
+
+-------------------------------- Release 1.2 --------------------------------
+
+Release date: January 1999
+
+Additions to release 1.1 include:
+
+
+  - topological map
+
+  - planar map overlay
+
+  - regular and constrained triangulations
+
+
+-------------------------------- Release 1.1 --------------------------------
+
+Release date: July 1998
+
+Additions to release 1.0 include:
+
+  - 3D intersections
+
+  - kD points
+
+  - 3D convex hull
+
+  - kD smallest enclosing sphere
+
+
+
+-------------------------------- Release 1.0 --------------------------------
+
+Release date: April 1998
+
+Additions to release 0.9 include:
+
+  - Polyhedral surfaces
+
+  - Halfedge Data Structure
+
+  - Planar maps
+
+
+
+-------------------------------- Release 0.9 --------------------------------
+
+Release date: June 1997
+
+Initial (beta) release of the CGAL library.
+
diff --git a/3rdparty/CGAL-4.8/CMakeLists.txt b/3rdparty/CGAL-4.8/CMakeLists.txt
new file mode 100644
index 0000000..be4b013
--- /dev/null
+++ b/3rdparty/CGAL-4.8/CMakeLists.txt
@@ -0,0 +1,1036 @@
+# Top level CMakeLists.txt for CGAL
+# The name of our project is "CGAL".  CMakeLists files in this project can
+# refer to the root source directory of the project as ${CMAKE_SOURCE_DIR} or
+# ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
+# ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
+project(CGAL CXX C)
+
+# Minimal version of CMake:
+cmake_minimum_required(VERSION 2.8.11)
+
+# Tested version:
+cmake_policy(VERSION 2.8.11)
+
+#
+# Compatibility with CMake 3.0
+#
+if(POLICY CMP0042)
+  # Do not enable the use of MACOSX_RPATH
+  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
+  cmake_policy(SET CMP0042 OLD)
+endif()
+
+# Compatibility with CMake 3.1
+if(POLICY CMP0054)
+  # http://www.cmake.org/cmake/help/v3.1/policy/CMP0054.html
+  # See the discussion https://github.com/CGAL/cgal/issues/189
+  cmake_policy(SET CMP0054 NEW)
+endif()
+
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= PACKAGE SETUP =-
+#
+#--------------------------------------------------------------------------------------------------
+
+message( "== Setting paths ==" )
+
+if ( CGAL_BRANCH_BUILD )
+
+  message( STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}" )
+
+  # list packages
+  file(GLOB CGAL_CONFIGURED_PACKAGES RELATIVE ${CMAKE_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/*")
+  list(REMOVE_ITEM CGAL_CONFIGURED_PACKAGES copyright CMakeLists.txt .svn .git)
+
+  # detect and remove not existing package-directories
+  foreach (package ${CGAL_CONFIGURED_PACKAGES})
+    if (NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}")
+      list(APPEND CGAL_WRONG_PACKAGES ${package})
+    elseif(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}/package_info")
+      list(APPEND CGAL_WRONG_PACKAGES ${package})
+    endif()
+  endforeach()
+
+  find_program(CGAL_CREATE_CMAKE_SCRIPT cgal_create_cmake_script
+               HINT ${CMAKE_SOURCE_DIR}/Scripts/scripts
+	       DOC "Script cgal_create_cmake_script, that creates CMakeLists.txt files"
+	       NO_DEFAULT_PATH
+	       NO_CMAKE_ENVIRONMENT_PATH)
+
+  if (DEFINED CGAL_WRONG_PACKAGES)
+    message(STATUS "Removed not-a-package: ${CGAL_WRONG_PACKAGES}")
+    list(REMOVE_ITEM CGAL_CONFIGURED_PACKAGES ${CGAL_WRONG_PACKAGES})
+  endif()
+
+  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_CONFIGURED_PACKAGES})
+  set(CGAL_CONFIGURED_PACKAGES)
+  foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
+    list(APPEND CGAL_CONFIGURED_PACKAGES "${CMAKE_SOURCE_DIR}/${package}")
+  endforeach()
+
+
+  set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Installation" CACHE INTERNAL "Directory containing the Installation package")
+  set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Maintenance" CACHE INTERNAL "Directory containing the Maintenance package")
+  set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/Core" CACHE INTERNAL "Directory containing the Core package")
+
+  message(STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}")
+  message(STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}")
+  message(STATUS "Core package directory: ${CGAL_CORE_PACKAGE_DIR}")
+
+else ( CGAL_BRANCH_BUILD )
+
+  # get release name
+  file(TO_CMAKE_PATH ${CMAKE_SOURCE_DIR} CMAKE_SOURCE_CDIR)
+  string(REGEX REPLACE "^/" "" CMAKE_SOURCE_DDIR ${CMAKE_SOURCE_CDIR})
+  string(REPLACE "/" ";" CMAKE_SOURCE_PDIR ${CMAKE_SOURCE_DDIR})
+  list(GET CMAKE_SOURCE_PDIR -1 CGAL_RELEASE_NAME)
+  message( STATUS "Build CGAL from release in directory ${CGAL_RELEASE_NAME}" )
+
+  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_RELEASE_NAME})
+
+  # list packages
+  set(CGAL_CONFIGURED_PACKAGES "${CMAKE_SOURCE_DIR}")
+
+  set(CGAL_INSTALLATION_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Installation package")
+  set(CGAL_MAINTENANCE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Maintenance package")
+  set(CGAL_CORE_PACKAGE_DIR "${CMAKE_SOURCE_DIR}" CACHE INTERNAL "Directory containing the Core package")
+
+endif (CGAL_BRANCH_BUILD )
+
+#message(STATUS "Packages found: ${CGAL_CONFIGURED_PACKAGES}")
+
+list(SORT CGAL_CONFIGURED_PACKAGES_NAMES)
+if(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/Documentation")
+  # Rescope CGAL_CONFIGURED_PACKAGES_NAMES
+  # We need this variable in the Doxygen configuration process. Reset it
+  # and change the scope to the parent scope.
+  # Philipp Moeller, 2013-05-302013-05-302013-05-30
+  set(CGAL_CONFIGURED_PACKAGES_NAMES ${CGAL_CONFIGURED_PACKAGES_NAMES} PARENT_SCOPE)
+endif()
+
+message(STATUS "Packagenames: ${CGAL_CONFIGURED_PACKAGES_NAMES}")
+message( "== Setting paths (DONE) ==\n" )
+
+message( "== Generate version files ==")
+
+if ( CGAL_BRANCH_BUILD ) 
+    
+  #
+  # Create version files
+  #
+
+  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/MAJOR_NUMBER" CGAL_MAJOR_VERSION REGEX "[0-9]*")
+  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/MINOR_NUMBER" CGAL_MINOR_VERSION REGEX "[0-9]*")
+  file(STRINGS "${CGAL_MAINTENANCE_PACKAGE_DIR}/release_building/BUGFIX_NUMBER" CGAL_BUGFIX_VERSION REGEX "[0-9]*")
+
+  file(REMOVE ${CMAKE_BINARY_DIR}/VERSION)
+  if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0)  
+    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}")
+  else()
+    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
+  endif()
+
+  # Accessed in the documentation.
+  set(CGAL_CREATED_VERSION_NUM ${CGAL_CREATED_VERSION_NUM} PARENT_SCOPE)
+
+  # TODO EBEB set number of internal release (replace "900")
+  set(CGAL_BUILD_VERSION 900)
+  set(CGAL_CREATED_VERSION "${CGAL_CREATED_VERSION_NUM}-I-${CGAL_BUILD_VERSION}")
+  set(CGAL_VERSION "${CGAL_CREATED_VERSION_NUM}-I-${CGAL_BUILD_VERSION}")
+
+  file(WRITE "${CMAKE_BINARY_DIR}/VERSION" "${CGAL_CREATED_VERSION_NUM}")
+
+  message(STATUS "CGAL_VERSION is ${CGAL_CREATED_VERSION}")
+  set(CGAL_FULL_VERSION ${CGAL_CREATED_VERSION} CACHE INTERNAL "CGAL version")
+
+
+  #define CGAL_VERSION_NR 1030500135
+  string (LENGTH "${CGAL_MAJOR_VERSION}" CGAL_MAJOR_LEN)
+  if ("${CGAL_MAJOR_LEN}" EQUAL 1) 
+    set(CGAL_TMP_MAJOR "0${CGAL_MAJOR_VERSION}")
+  endif()
+  string (LENGTH "${CGAL_MINOR_VERSION}" CGAL_MINOR_LEN)
+  if ("${CGAL_MINOR_LEN}" EQUAL 1) 
+    set(CGAL_TMP_MINOR "0${CGAL_MINOR_VERSION}")
+  else()
+    set(CGAL_TMP_MINOR "${CGAL_MINOR_VERSION}")
+  endif()
+
+  set(CGAL_TMP_BUILD "${CGAL_BUILD_VERSION}")
+  string(LENGTH "${CGAL_TMP_BUILD}" CGAL_BUILD_LEN)
+
+  while(CGAL_BUILD_LEN LESS 4)
+    set(CGAL_TMP_BUILD "0${CGAL_TMP_BUILD}")
+    string(LENGTH "${CGAL_TMP_BUILD}" CGAL_BUILD_LEN)
+  endwhile()
+
+  set(CGAL_CREATED_VERSION_NR "1${CGAL_TMP_MAJOR}${CGAL_TMP_MINOR}${CGAL_BUGFIX_VERSION}${CGAL_TMP_BUILD}")
+  message(STATUS "CGAL_VERSION_NR is ${CGAL_CREATED_VERSION_NR}")
+
+  message(STATUS "CGAL_GIT_HASH is ${CGAL_GIT_HASH}")
+  message(STATUS "CGAL_CREATED_SVN_REVISION is ${CGAL_CREATED_SVN_REVISION} (dummy)")
+
+  file(REMOVE ${CMAKE_BINARY_DIR}/include/CGAL/version.h)
+  configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/config/version.h.in ${CMAKE_BINARY_DIR}/include/CGAL/version.h @ONLY)
+
+  #
+  # Duplicate files
+  #
+
+  if (CGAL_REPORT_DUPLICATE_FILES) 
+
+    message("== Searching for duplicate files ==")
+
+    foreach (package ${CGAL_CONFIGURED_PACKAGES})
+
+      file(GLOB_RECURSE CGAL_PACKAGE_HEADER_FILES FOLLOW_SYMLINKS ${package}/*.h)
+      foreach (file ${CGAL_PACKAGE_HEADER_FILES})
+        string(REPLACE "${package}/" "" pure_file ${file})
+        if (NOT ${pure_file} MATCHES ".*CMakeFiles.*")
+          list(APPEND CGAL_HEADER_FILES ${pure_file})
+        endif()
+      endforeach()
+
+      file(GLOB_RECURSE CGAL_PACKAGE_CPP_FILES FOLLOW_SYMLINKS ${package}/*.cpp)
+      foreach (file ${CGAL_PACKAGE_CPP_FILES})
+        string(REPLACE "${package}/" "" pure_file ${file})
+        if (NOT ${pure_file} MATCHES ".*CMakeFiles.*")
+          list(APPEND CGAL_CPP_FILES ${pure_file})
+        endif()
+      endforeach()
+
+    endforeach()
+
+    list(SORT CGAL_HEADER_FILES)
+    set(CGAL_UNIQUE_HEADER_FILES ${CGAL_HEADER_FILES})
+    set(CGAL_DUPLICATE_HEADER_FILES ${CGAL_HEADER_FILES})
+    list(REMOVE_DUPLICATES CGAL_UNIQUE_HEADER_FILES)
+    #message(STATUS "Headers: ${CGAL_HEADER_FILES}")
+    foreach (file ${CGAL_UNIQUE_HEADER_FILES})
+      list(FIND CGAL_DUPLICATE_HEADER_FILES "${file}" CGAL_FILE_IDX)
+      list(REMOVE_AT CGAL_DUPLICATE_HEADER_FILES ${CGAL_FILE_IDX})
+    endforeach()
+    message(STATUS "Duplicate header files (will be repeated at end): ${CGAL_DUPLICATE_HEADER_FILES}")
+
+    list(SORT CGAL_CPP_FILES)
+    set(CGAL_UNIQUE_CPP_FILES ${CGAL_CPP_FILES})
+    set(CGAL_DUPLICATE_CPP_FILES ${CGAL_CPP_FILES})
+    list(REMOVE_DUPLICATES CGAL_UNIQUE_CPP_FILES)
+    #message(STATUS "CPPs: ${CGAL_CPP_FILES}")
+    foreach (file ${CGAL_UNIQUE_CPP_FILES})
+      list(FIND CGAL_DUPLICATE_CPP_FILES "${file}" CGAL_FILE_IDX)
+      list(REMOVE_AT CGAL_DUPLICATE_CPP_FILES ${CGAL_FILE_IDX})
+    endforeach()
+    message(STATUS "Duplicate cpp files (will be repeated at end): ${CGAL_DUPLICATE_CPP_FILES}")
+
+  endif(CGAL_REPORT_DUPLICATE_FILES)
+
+else()
+
+  if (NOT EXISTS "${CMAKE_SOURCE_DIR}/VERSION" OR NOT EXISTS "${CMAKE_SOURCE_DIR}/include/CGAL/version.h")
+    message(FATAL_ERROR "File VERSION or include/CGAL/version.h are missing, required by release-build.")
+  endif()
+
+  # 
+  # Read and parse CGAL version number from VERSION file
+  #
+
+  file( READ "${CMAKE_SOURCE_DIR}/VERSION" CGAL_VERSION )
+  # Comment from Laurent Rineau, 2012/06/28:
+  #   file(READ ..) should be replace by file(STRINGS ..), and then we take
+  #   the first line. That would avoid parsing errors when the VERSION file
+  #   contains a CR character!
+
+  set(CGAL_FULL_VERSION ${CGAL_VERSION})
+  string( REPLACE "-" "." CGAL_VERSION_TOKENS1 ${CGAL_VERSION} )
+  string( REPLACE "." ";" CGAL_VERSION_TOKENS ${CGAL_VERSION_TOKENS1} )
+  list( LENGTH CGAL_VERSION_TOKENS CGAL_VERSION_TOKENS_LEN )
+  list( GET CGAL_VERSION_TOKENS 0 CGAL_MAJOR_VERSION )
+
+  set(CGAL_MINOR_VERSION)
+  set(CGAL_BUGFIX_VERSION)
+  set(CGAL_BUILD_VERSION 1000)
+
+  if ( CGAL_VERSION_TOKENS_LEN GREATER 1 )
+    list( GET CGAL_VERSION_TOKENS 1 CGAL_MINOR_VERSION )
+  endif()
+
+  if ( CGAL_VERSION_TOKENS_LEN GREATER 2 )
+    list( GET CGAL_VERSION_TOKENS 2 CGAL_BUGFIX_VERSION )
+
+    # The following condition will be true the token #2 is not a number (if
+    # it is for example "I" or "Ic"):
+    if(NOT CGAL_BUGFIX_VERSION GREATER 0 AND NOT CGAL_BUGFIX_VERSION EQUAL 0)
+      set(CGAL_BUGFIX_VERSION 0)
+      if( CGAL_VERSION_TOKENS_LEN GREATER 3 )
+        list( GET CGAL_VERSION_TOKENS 3 CGAL_BUILD_VERSION )
+      endif()
+    else()
+      if( CGAL_VERSION_TOKENS_LEN GREATER 4 )
+        list( GET CGAL_VERSION_TOKENS 4 CGAL_BUILD_VERSION )
+      endif()
+    endif()
+    # If CGAL_BUILD_VERSION is not a strictly positive number, error
+    if(NOT CGAL_BUILD_VERSION GREATER 0)
+      message(WARNING 
+        "Error parsing VERSION file: CGAL_BUILD_VERSION is not a number.\n"
+        "The content of the VERSION file is:\n${CGAL_VERSION}\n"
+        "CGAL_BUILD_VERSION was set to:\n${CGAL_BUILD_VERSION}")
+      set(CGAL_BUILD_VERSION 1000)
+    endif()
+  endif()
+
+  if(NOT CGAL_BUGFIX_VERSION)
+    set(CGAL_BUGFIX_VERSION 0)
+  endif()
+
+  if(CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0)
+    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}")
+  else()
+    set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
+  endif()
+endif()
+
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= BASIC SETUP =-
+#
+#--------------------------------------------------------------------------------------------------
+
+message( STATUS "CGAL_MAJOR_VERSION=${CGAL_MAJOR_VERSION}" )
+message( STATUS "CGAL_MINOR_VERSION=${CGAL_MINOR_VERSION}" )
+message( STATUS "CGAL_BUGFIX_VERSION=${CGAL_BUGFIX_VERSION}" )
+if(CGAL_BUILD_VERSION LESS 1000)
+  message( STATUS "CGAL_BUILD_VERSION=${CGAL_BUILD_VERSION}" )
+endif()
+
+# SONAME, SOVERSION
+#
+# The rule is that each new release or bug fix release should increse the soversion.
+#
+# SOVERSION is $(SONAME_VERSION).$(SOVERSION_MINOR).$(SOVERSION_RELEASE)
+#
+# - If the binary interface of libraries do not change from previous release
+#   (example: most bug fix releases), increase SOVERSION_RELEASE (this third number).
+# - If the binary interface is changed, but remains compatible with
+#   previous release (example: only addition of new functions), then increase
+#   SOVERSION_MINOR (second number) and set SOVERSION_RELEASE to 0.
+# - If the binary interface is changed in an incompatible way to previous
+#   release, then increase the SONAME_VERSION, and set the two other
+#   numbers to 0.
+# 
+# SOVERSION history: 
+#   CGAL<=3.5  : (unversionned)
+#   CGAL-3.5   : 4.0.0
+#   CGAL-3.5.1 : 4.0.1
+#   CGAL-3.6   : 5.0.0
+#   CGAL-3.6.1 : 5.0.0 (should have been 5.0.1)
+#   CGAL-3.7   : 6.0.0 (certainly: some types have been turned from int to
+#                        std::size_t, which is different on some platforms)
+#   CGAL-3.8   : 7.0.0 (At least CGAL::Random has changed its member fields.)
+#   CGAL-3.9   : 8.0.0 (No way to check the binary compatibility.)
+#   CGAL-4.0   : 9.0.0 (No way to check the binary compatibility.)
+#   CGAL-4.1   : 10.0.0 (No way to check the binary compatibility.)
+#   CGAL-4.2   : 10.0.1 (Nothing different in CGAL compiled libraries¹.)
+#   CGAL-4.3   : 10.0.2 (Nothing different in CGAL compiled libraries¹.)
+#   CGAL-4.4   : 10.0.3 (Nothing different in CGAL compiled libraries¹.)
+#   CGAL-4.5   : 10.0.4 (Nothing different in CGAL compiled libraries¹.)
+#   CGAL-4.6   : 11.0.0 (int->size_t in CGAL_ImageIO)
+#   CGAL-4.7   : 11.0.1 (Nothing different in CGAL compiled libraries.)
+#   CGAL-4.8   : 11.0.2 (Nothing different in CGAL compiled libraries.)
+# ¹) According to http://upstream-tracker.org/versions/cgal.html
+
+set( CGAL_SONAME_VERSION "11" )
+set( CGAL_SOVERSION      "11.0.2" )
+
+message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" )
+message( STATUS "CGAL_SOVERSION     =${CGAL_SOVERSION}" )
+set( CGAL_BUILDING_LIBS TRUE )
+
+set( CGAL_VERSION_DIR     CGAL-${CGAL_VERSION} )
+set( CGAL_MODULES_REL_DIR cmake/modules )
+set( CGAL_MODULES_DIR     ${CGAL_INSTALLATION_PACKAGE_DIR}/${CGAL_MODULES_REL_DIR} )
+
+include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
+cgal_setup_module_path()
+
+message( STATUS "CGAL_REFERENCE_CACHE_DIR=${CGAL_REFERENCE_CACHE_DIR}" )
+
+if ( RUNNING_CGAL_AUTO_TEST )
+  message(STATUS "Operating system:")
+  execute_process(COMMAND uname -a
+    TIMEOUT 5
+    OUTPUT_VARIABLE uname_a
+    ERROR_VARIABLE uname_a)
+  message(STATUS "${uname_a}")
+  CGAL_display_compiler_version()
+  if ( NOT "${CGAL_REFERENCE_CACHE_DIR}" STREQUAL "" )
+    if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR} )
+      if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR}/CMakeCache.txt )
+        message( STATUS "Loading reference cache from ${CGAL_REFERENCE_CACHE_DIR}" )
+        load_cache( ${CGAL_REFERENCE_CACHE_DIR} 
+          EXCLUDE CGAL_Core_LIBRARY 
+                  CGAL_CORE_PACKAGE_DIR
+                  WITH_CGAL_Core
+                  CGAL_INSTALLATION_PACKAGE_DIR
+                  CGAL_MAINTENANCE_PACKAGE_DIR
+                  CGAL_PDB_BINARY_DIR
+                  CGAL_PDB_SOURCE_DIR
+                  CGAL_BINARY_DIR
+                  CGAL_SOURCE_DIR)
+#        message("List of cache variables:")
+
+        ## The following lines removes nasty loaded cache values. We do not
+        ## want that the current build tree depends on binaries that were
+        ## build in the reference build tree.
+        get_property(cache_variables DIRECTORY PROPERTY CACHE_VARIABLES)
+        foreach(var ${cache_variables}) 
+#          get_property(var_value CACHE ${var} PROPERTY VALUE)
+#          get_property(type CACHE ${var} PROPERTY TYPE)
+          string(REGEX MATCH "^CGAL(_.*_(DEPENDS|BINARY_DIR)|_.*LIBRARY)$" var_name_matches ${var})
+          if(var_name_matches)
+            unset(${var} CACHE)
+#          else()
+#            message("${var}:${var_type}=${var_value}")
+          endif()
+        endforeach()
+
+
+      endif()
+    endif()
+  endif()
+endif()
+
+include(CGAL_Common)
+include(CGAL_GeneratorSpecificSettings)
+include(CGAL_CheckCXXFileRuns)
+
+mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
+
+message( STATUS "USING CMake version: ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" )
+message( STATUS "System: ${CMAKE_SYSTEM_NAME}" )
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= FLAGS =-
+#
+#--------------------------------------------------------------------------------------------------
+
+if( MSVC )
+  
+  uniquely_add_flags ( CGAL_CXX_FLAGS "-D_CRT_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_DEPRECATE;-D_CRT_SECURE_NO_WARNINGS;-D_SCL_SECURE_NO_WARNINGS" )
+  uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:strict" )
+  uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:except-" )
+  uniquely_add_flags ( CGAL_CXX_FLAGS "/wd4503" ) # Suppress warnings C4503 about "decorated name length exceeded"
+  uniquely_add_flags ( CGAL_CXX_FLAGS "/bigobj" ) # Use /bigobj by default
+
+  if ( RUNNING_CGAL_AUTO_TEST )
+    set(CMAKE_CXX_WARNING_LEVEL 2 CACHE STRING "MSVC C++ compiler warning level" FORCE)
+    mark_as_advanced(CMAKE_CXX_WARNING_LEVEL)
+  endif()
+    
+endif()
+
+if( "\"${CMAKE_CXX_COMPILER_ID}\"" MATCHES "SunPro" )
+  message( STATUS "Using SunPro compiler, using STLPort 4." )
+  
+  uniquely_add_flags( CGAL_CXX_FLAGS "-features=extensions;-library=stlport4;-D_GNU_SOURCE" )
+  uniquely_add_flags( CGAL_SHARED_LINKER_FLAGS "-library=stlport4" )
+  uniquely_add_flags( CGAL_EXE_LINKER_FLAGS    "-library=stlport4" )
+endif()
+
+if( "${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
+  message( STATUS "Intel compiler is detected." )
+  set( IntelCompiler_FOUND TRUE )
+
+  get_dependency_version(IntelCompiler)
+
+  if( "${IntelCompiler_VERSION}" LESS "1100" )
+    message("Intel Compiler version ${IntelCompiler_VERSION} is not supported by CGAL-${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}! (too old, must be 11.0 or after)")
+  else()
+    message( STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict" )
+    if(WIN32)
+      uniquely_add_flags( CGAL_CXX_FLAGS "/fp:strict" )
+    else()
+      uniquely_add_flags( CGAL_CXX_FLAGS "-fp-model strict" )
+    endif()
+  endif()
+endif()
+
+
+if ( CMAKE_COMPILER_IS_GNUCXX )
+
+  set( GCC_FOUND TRUE )
+  
+  get_dependency_version(GCC)
+  
+  if ( "${GCC_VERSION}" MATCHES "Not" OR "${GCC_VERSION}" MATCHES "Unknown" )
+    set( GCC_FOUND FALSE )
+  endif()
+  
+  if ( GCC_FOUND )
+  
+    if ( RUNNING_CGAL_AUTO_TEST )
+      uniquely_add_flags( CGAL_CXX_FLAGS "-Wall" )
+      # Remove -g from the relevant CMAKE_CXX_FLAGS. This will also
+      # propagate to the rest of the tests, since we overwrite those
+      # flags with the ones used to build CGAL.
+      string(REGEX REPLACE "-g( |$)" ""
+        CMAKE_CXX_FLAGS
+        "${CMAKE_CXX_FLAGS}")
+      # We only allow the release types DEBUG and RELEASE, but handle
+      # all possible values just to be sure.
+      foreach(release_type DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+        string(REGEX REPLACE "-g( |$)" ""
+          CMAKE_CXX_FLAGS_${release_type}
+          "${CMAKE_CXX_FLAGS_${release_type}}")
+      endforeach()
+
+    endif()
+    
+    if ( "${GCC_VERSION}" MATCHES "^[4-9]." )
+      message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
+      uniquely_add_flags( CGAL_CXX_FLAGS "-frounding-math" )
+    endif()
+    
+    if ( "${GCC_VERSION}" MATCHES "^4.2" )
+      message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" )
+      uniquely_add_flags( CGAL_CXX_FLAGS "-fno-strict-aliasing" )
+    endif()
+    
+    if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" )
+      message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" )
+      uniquely_add_flags( CGAL_CXX_FLAGS "-mieee -mfp-rounding-mode=d" )
+    endif()
+    
+  endif()
+  
+endif()
+
+message( "== Generate version files (DONE) ==\n")
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= External libraries =-
+#
+#--------------------------------------------------------------------------------------------------
+ 
+message("== Set up flags ==")
+
+include(CGAL_SetupFlags)
+
+message("== Set up flags (DONE) ==\n")
+
+message("== Detect external libraries ==")
+
+# this is the place to tell which external libs are supporting
+# Remarks: 
+#  External libs configured when Qt5 lib of cgal are required
+#  Coin is used in KDS, but no FindCoin or FindCOIN exists
+#  There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs
+list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
+if (NOT WIN32)
+  # GMPXX is not supported on WIN32 machines
+  list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 1 GMPXX)
+endif()
+
+# Where CMake is run several times, to avoid duplicates
+list(REMOVE_DUPLICATES CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
+hide_variable(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES)
+
+# set some to have special prefix
+macro( set_special_prefix library prefix)
+set(SPECIAL_PREFIXES "${SPECIAL_PREFIXES}set(CGAL_EXT_LIB_${library}_PREFIX \"${prefix}\")\n")
+set(CGAL_EXT_LIB_${library}_PREFIX ${prefix})
+endmacro()
+
+set_special_prefix(Qt5 QT)
+set_special_prefix(Eigen3 EIGEN3)
+set_special_prefix(QGLViewer QGLVIEWER)
+set_special_prefix(Coin3D COIN3D)
+
+# some libraries are essential (stl and Boost.Thread are treated in another way) 
+if($ENV{CGAL_DISABLE_GMP})
+  set(CGAL_DISABLE_GMP ON CACHE INTERNAL "")
+endif()
+if(CGAL_DISABLE_GMP)
+  message("Disable the GMP support")
+  list(LENGTH CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES CGAL_ESSENTIAL_LENGTH)
+  if(NOT CGAL_ESSENTIAL_LENGTH EQUAL 0)
+    list(REMOVE_ITEM CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
+  endif()
+  unset(CGAL_CONFIGURED_LIBRARIES)
+  unset(CGAL_CONFIGURED_LIBRARIES CACHE)
+  unset(GMP_FOUND)
+  unset(GMP_FOUND CACHE)
+  unset(GMPXX_FOUND)
+  unset(GMPXX_FOUND CACHE)
+  unset(MPFR_FOUND)
+  unset(MPFR_FOUND CACHE)
+  unset(WITH_CGAL_Core)
+  unset(WITH_CGAL_Core CACHE)
+  unset(WITH_GMP)
+  unset(WITH_GMP CACHE)
+  unset(WITH_GMPXX)
+  unset(WITH_GMPXX CACHE)
+  unset(WITH_MPFR)
+  unset(WITH_MPFR CACHE)
+
+  # Nasty trick to make sure <gmp.h> is not used when CGAL_DISABLE_GMP is TRUE
+  file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h"
+    "#error GMP is disabled by the CMake option CGAL_DISABLE_GMP")
+else()
+  list(APPEND      CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
+  # Where CMake is run several times, to avoid duplicates
+  list (REMOVE_DUPLICATES CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
+  file(REMOVE "${CMAKE_BINARY_DIR}/include/gmp.h")
+endif()
+hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
+
+foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) 
+
+  # set standard prefix
+  if(NOT DEFINED CGAL_EXT_LIB_${lib}_PREFIX)
+    set(CGAL_EXT_LIB_${lib}_PREFIX ${lib})
+  endif()
+  hide_variable(CGAL_EXT_LIB_${lib}_PREFIX)
+
+  # add option
+  list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION )
+  if ( "${POSITION}" STRGREATER "-1" ) # if lib is essential
+   option(WITH_${lib} "Select external library ${lib}" ON)
+  else()
+    option(WITH_${lib} "Select external library ${lib}" OFF)
+  endif()
+
+endforeach()
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= DEPENDENCIES =-
+#
+#--------------------------------------------------------------------------------------------------
+
+#
+# The following variables are in the cache just so subdirectories can set them persistently.
+# But they are not intended to persist from run to run as normal cache variables.
+# Similar variables are created when a library is detected.
+#
+cache_set(CGAL_3RD_PARTY_PRECONFIGURED  "" )
+
+cache_set(CGAL_3RD_PARTY_DEFINITIONS    "" )
+cache_set(CGAL_3RD_PARTY_INCLUDE_DIRS   "" )
+cache_set(CGAL_3RD_PARTY_LIBRARIES      "" )
+cache_set(CGAL_3RD_PARTY_LIBRARIES_DIRS "" ) 
+
+# default is on, but some use-cases need to set it to off, e.g., debian packages
+option( CGAL_ENABLE_PRECONFIG "Select to allow to preconfiguration of external libraries" ON)
+
+# additional info: some header files in CGAL add additional code if
+# certain optional libs are installed, and some examples/tests rely on
+# this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL
+# and the example/test must be configured with MPFI (just one is not sufficient)
+
+option( CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "Select to allow to use all preconfigured external libraries" OFF)
+ 
+include(CGAL_SetupDependencies)
+
+message("== Detect external libraries (DONE) ==\n")
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= Generation of compiler_config.h =-
+#
+#--------------------------------------------------------------------------------------------------
+
+# The variables set are the #defines expected by compiler_config.h
+# Note: CMake will not notice when files are added or removed
+# but this is probably OK for the installation procedure.
+
+message("== Write compiler_config.h ==")
+
+macro(add_config_flag flag)
+  if(${flag})
+      file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "#define ${flag} 1\n\n")
+    else()
+      file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "//#define ${flag} 1\n\n")
+    endif()
+endmacro()
+
+file(GLOB all_config_tests "${CGAL_INSTALLATION_PACKAGE_DIR}/config/testfiles/*.cpp")
+list(SORT all_config_tests)
+
+file(WRITE ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "//\n// compiler_config.h is included by CGAL headers to load the needed compiler settings.\n//\n// DO NOT EDIT compiler_config.h. It is generated by CMake.\n//\n\n")
+
+foreach(config_test_cpp ${all_config_tests})
+  # Test's name is .cpp's base name
+  get_filename_component(config_test_name ${config_test_cpp} NAME_WE)
+
+  # Compile and run ${config_test_cpp}. Exit code is stored in ${config_test_name}.
+  CHECK_CXX_FILE_RUNS(${config_test_cpp} ${config_test_name} ${config_test_name})
+  if(${config_test_name})
+    set(${config_test_name} 0)
+  else()
+    set(${config_test_name} 1)
+  endif()
+
+  add_config_flag(${config_test_name} ${config_test_name})
+endforeach()
+
+add_config_flag(CGAL_USE_GMP)
+add_config_flag(CGAL_USE_MPFR)
+add_config_flag(CGAL_USE_GMPXX)
+add_config_flag(CGAL_USE_LEDA)
+add_config_flag(CGAL_USE_MPFI)
+add_config_flag(CGAL_USE_RS)
+add_config_flag(CGAL_USE_NTL)
+
+add_config_flag( CGAL_BUILD_SHARED_LIBS )
+
+if (NOT ${WITH_CGAL_Core}) 
+  set(CGAL_USE_CORE FALSE)
+else()
+  set(CGAL_USE_CORE ${CGAL_USE_GMP})
+endif()
+add_config_flag( CGAL_USE_CORE )
+# ^^ there is CGAL_USE_CORE and not CGAL_HAS_CORE, as CORE is considered
+# as external lib and not as CGAL component (EBEB: 24 Jan 2012)
+
+if ( RUNNING_CGAL_AUTO_TEST AND MSVC )
+  file( APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h" "#include <CGAL/Testsuite/vc_debug_hook.h>\n\n" )
+endif()
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= Installation Setup =-
+#
+#--------------------------------------------------------------------------------------------------
+
+set ( CGAL_INSTALL_INC_DIR "include" CACHE STRING "The folder where CGAL header files will be installed, relative to CMAKE_INSTALL_PREFIX" )
+set ( CGAL_INSTALL_LIB_DIR "lib"     CACHE STRING "The folder where CGAL libraries will be installed, relative to CMAKE_INSTALL_PREFIX" )
+
+if ( CGAL_WIN32_CMAKE_ON_CYGWIN )
+  exec_program(cygpath ARGS -w "${CMAKE_INSTALL_PREFIX}" OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX2 )
+  file ( TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX2} CMAKE_INSTALL_PREFIX )
+endif()
+
+set ( CGAL_INSTALL_BIN_DIR    "bin"                     
+  CACHE STRING "The folder where CGAL user-side scripts will be installed, relative to CMAKE_INSTALL_PREFIX" 
+  )
+
+set ( CGAL_INSTALL_CMAKE_DIR "${CGAL_INSTALL_LIB_DIR}/CGAL"
+  CACHE STRING "The folder where CGAL CMake modules will be installed, relative to CMAKE_INSTALL_PREFIX" 
+  )
+
+set ( CGAL_INSTALL_DOC_DIR "share/doc/${CGAL_VERSION_DIR}"  
+  CACHE STRING "The folder where CGAL documentation and license files will be installed, relative to CMAKE_INSTALL_PREFIX" 
+  )
+
+set ( CGAL_INSTALL_MAN_DIR "share/man/man1"  
+  CACHE STRING "The folder where manual pages for CGAL scripts will be installed, relative to CMAKE_INSTALL_PREFIX" 
+  )
+
+message("== Write compiler_config.h (DONE) ==\n")
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= Build =-
+#
+#--------------------------------------------------------------------------------------------------
+
+message("== Generating build files ==")
+
+set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
+
+set(CGAL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
+
+foreach (package ${CGAL_CONFIGURED_PACKAGES})
+  set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include)
+endforeach()
+
+include_directories (${CGAL_INCLUDE_DIRS})
+
+cache_get(CGAL_3RD_PARTY_PRECONFIGURED )
+
+cache_get(CGAL_3RD_PARTY_DEFINITIONS   )
+cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS  )
+cache_get(CGAL_3RD_PARTY_LIBRARIES     )
+cache_get(CGAL_3RD_PARTY_LIBRARIES_DIRS) 
+
+add_subdirectory(src)
+
+#
+# Repeat some problems
+#
+message("== Generating build files (DONE) ==\n")
+
+if (CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES )
+
+  message( STATUS "Problems: ")
+
+  if (CGAL_DUPLICATE_HEADER_FILES)
+    message(WARNING "WARNING: Duplicate header files")
+    foreach(hfile ${CGAL_DUPLICATE_HEADER_FILES})
+      message(STATUS "  File '${hfile}' multiply found in ")
+      foreach (package ${CGAL_CONFIGURED_PACKAGES})
+        file(GLOB_RECURSE CGAL_PACKAGE_HEADER_FILES FOLLOW_SYMLINKS ${package}/*.h)
+        foreach (file ${CGAL_PACKAGE_HEADER_FILES})
+          string(REPLACE "${package}/" "" pure_file ${file})
+          if ("${pure_file}" STREQUAL "${hfile}")
+            message(STATUS "    ${package}")
+          endif()
+        endforeach()
+      endforeach()
+    endforeach()
+  endif()
+
+  if (CGAL_DUPLICATE_CPP_FILES)
+    message(WARNING "WARNING: Duplicate cpp files")
+    foreach(cfile ${CGAL_DUPLICATE_CPP_FILES})
+      message(STATUS "  File '${cfile}' multiply found in ")
+      foreach (package ${CGAL_CONFIGURED_PACKAGES})
+        file(GLOB_RECURSE CGAL_PACKAGE_CPP_FILES FOLLOW_SYMLINKS ${package}/*.cpp)
+        foreach (file ${CGAL_PACKAGE_CPP_FILES})
+          string(REPLACE "${package}/" "" pure_file ${file})
+          if ("${pure_file}" STREQUAL "${cfile}")
+            message(STATUS "    ${package}")
+          endif()
+        endforeach()
+      endforeach()
+    endforeach()
+  endif()
+
+endif()
+
+create_CGALconfig_files()
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= Installation Commands =-
+#
+#--------------------------------------------------------------------------------------------------
+
+# DESTINATION option is mandatory; skipping it breaks CPack!
+
+if(CGAL_INSTALL_DOC_DIR)
+  install(FILES AUTHORS CHANGES LICENSE LICENSE.FREE_USE LICENSE.GPL LICENSE.LGPL DESTINATION ${CGAL_INSTALL_DOC_DIR} )
+endif()
+
+#install all includes collected in trunk et cetera
+
+
+foreach (dir ${CGAL_CONFIGURED_PACKAGES})
+  if (EXISTS ${dir}/include/CGAL) 
+    install(DIRECTORY ${dir}/include/CGAL              DESTINATION ${CGAL_INSTALL_INC_DIR} PATTERN ".svn" EXCLUDE)
+  endif()
+endforeach()
+install(DIRECTORY ${CMAKE_BINARY_DIR}/include/CGAL     DESTINATION ${CGAL_INSTALL_INC_DIR} PATTERN ".svn" EXCLUDE)
+
+file(GLOB scripts "scripts/*")
+list(REMOVE_ITEM scripts 
+  ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cgal_create_assertions.sh 
+  ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cgal_create_cmake_script_with_options)
+install(PROGRAMS ${scripts} DESTINATION ${CGAL_INSTALL_BIN_DIR})
+
+install(DIRECTORY ${CGAL_MODULES_REL_DIR}/                DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
+install(FILES     ${CGAL_MODULES_REL_DIR}/UseCGAL.cmake   DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
+
+if ( GMP_IN_AUXILIARY )
+  install(DIRECTORY auxiliary/gmp/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
+  install(DIRECTORY auxiliary/gmp/lib/     DESTINATION ${CGAL_INSTALL_LIB_DIR} )
+endif()
+
+if ( ZLIB_IN_AUXILIARY )
+  install(DIRECTORY auxiliary/zlib/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
+  install(DIRECTORY auxiliary/zlib/lib/     DESTINATION ${CGAL_INSTALL_LIB_DIR} )
+endif()
+
+
+install(FILES ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake DESTINATION ${CGAL_INSTALL_CMAKE_DIR} )
+
+if(CGAL_INSTALL_MAN_DIR)
+  install(FILES auxiliary/cgal_create_cmake_script.1 DESTINATION ${CGAL_INSTALL_MAN_DIR} )
+endif()
+
+#--------------------------------------------------------------------------------------------------
+#
+#              -= Special installation commands to copy FindCGAL to the cmake directory =-
+#
+#--------------------------------------------------------------------------------------------------
+
+# Installing FindCGAL into cmake itself is implemented as a custom target
+# because it requires superuser privileges
+
+if ( NOT "${CMAKE_ROOT}" STREQUAL "" )
+  if ( EXISTS ${CMAKE_ROOT}/Modules )
+    add_custom_target( install_FindCGAL
+                      COMMAND ${CMAKE_COMMAND} -E copy ${CGAL_MODULES_DIR}/FindCGAL.cmake ${CMAKE_ROOT}/Modules
+                    ) 
+  endif()
+endif()  
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                    -= APPLICATIONS =-
+#
+#--------------------------------------------------------------------------------------------------
+
+macro( add_programs subdir target ON_OFF )
+
+  cache_set( CGAL_EXECUTABLE_TARGETS "" )
+  
+  add_custom_target( ${target} )
+  
+  option( WITH_${target} "Select ${target}" ${ON_OFF} )
+  if ( WITH_${target} )
+    add_subdirectory( ${subdir} EXCLUDE_FROM_ALL )
+  endif()
+  
+  cache_get( CGAL_EXECUTABLE_TARGETS )
+  
+  foreach( CGAL_EXECUTABLE_TARGET ${CGAL_EXECUTABLE_TARGETS} )
+    add_dependencies( ${target} ${CGAL_EXECUTABLE_TARGET} )
+  endforeach()
+     
+endmacro()
+
+# This allows programs to locate CGALConfig.cmake
+set(CGAL_DIR ${CMAKE_BINARY_DIR} )
+
+if ( NOT RUNNING_CGAL_AUTO_TEST )
+
+  add_programs(examples examples OFF )
+  add_programs(demo     demos    OFF )
+  if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
+    add_programs(test     tests    OFF )
+  endif()
+endif()
+
+#--------------------------------------------------------------------------------------------------
+#
+#                                            -= CPack =-
+#
+#--------------------------------------------------------------------------------------------------
+
+#option( WITH_CPACK "Create package generation rules")
+if( WITH_CPACK AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
+
+    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CGAL - Computational Geometry Algorithms Library")
+    set(CPACK_PACKAGE_VENDOR "CGAL Open Source Project")
+    set(CPACK_PACKAGE_DESCRIPTION_FILE "${CGAL_INSTALLATION_PACKAGE_DIR}/README")
+    set(CPACK_RESOURCE_FILE_LICENSE "${CGAL_INSTALLATION_PACKAGE_DIR}/LICENSE")
+    set(CPACK_PACKAGE_VERSION_MAJOR "${CGAL_MAJOR_VERSION}")
+    set(CPACK_PACKAGE_VERSION_MINOR "${CGAL_MINOR_VERSION}")
+    set(CPACK_PACKAGE_VERSION_PATCH "${CGAL_BUGFIX_VERSION}")
+    set(CPACK_PACKAGE_INSTALL_DIRECTORY "CGAL ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
+    set(CPACK_SOURCE_PACKAGE_FILE_NAME "CGAL-${CGAL_VERSION}")
+    set(CPACK_RESOURCE_FILE_LICENSE "${CGAL_INSTALLATION_PACKAGE_DIR}/LICENSE")
+    
+    if(NOT DEFINED CPACK_SYSTEM_NAME)
+      set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
+    endif()
+    
+    if(${CPACK_SYSTEM_NAME} MATCHES "Windows")
+      if(CMAKE_CL_64)
+        set(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
+      else()
+        set(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
+      endif()
+    endif()
+    
+    if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
+      set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
+    endif()
+    
+    set(CPACK_PACKAGE_EXECUTABLES "CGAL" "CGAL")
+
+    if(WIN32 AND NOT UNIX)
+        set(CPACK_GENERATOR "NSIS")
+        # There is a bug in NSI that does not handle full unix paths properly. Make
+        # sure there is at least one set of four (4) backlasshes.
+        #set(CPACK_PACKAGE_ICON "${CGAL_INSTALLATION_PACKAGE_DIR}\\\\cgal_install.gif")
+        #set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\CGAL.exe")
+        set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Computational Geometry Algorithms Library")
+        set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.cgal.org")
+        set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.cgal.org")
+        set(CPACK_NSIS_CONTACT "info at cgal.org")
+        set(CPACK_NSIS_MODIfY_PATH ON)
+    else()
+        set(CPACK_STRIP_FILES "")
+        set(CPACK_SOURCE_STRIP_FILES "")
+    endif()
+
+    include(CPack)
+    
+endif()
+
+
+if ( CGAL_BRANCH_BUILD )
+  option(CGAL_ENABLE_CHECK_HEADERS 
+    "Enable the special targets \"check_pkg_headers\", and \"check_pkg_<package>_headers\" for each package"
+    FALSE)
+
+  if(CGAL_ENABLE_CHECK_HEADERS)
+
+    if(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
+      execute_process(COMMAND 
+        ${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CMAKE_CURRENT_SOURCE_DIR}/config/support/test_syntaxonly.cpp
+        ERROR_QUIET
+        RESULT_VARIABLE ok)
+      if(ok EQUAL 0)
+        set(CGAL_CHECK_SYNTAX_ONLY ON CACHE INTERNAL "")
+      else()
+        set(CGAL_CHECK_SYNTAX_ONLY OFF CACHE INTERNAL "")
+      endif()
+    endif(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
+
+    if(NOT CGAL_CHECK_SYNTAX_ONLY)
+      message(FATAL_ERROR "Your compiler does not seem to support -fsyntax-only.
+You must disable CGAL_ENABLE_CHECK_HEADERS.")
+    endif()
+
+    ## Fill the variable include_options with all the -I and -isystem options
+    set(include_options)
+    foreach (incdir ${CGAL_INCLUDE_DIRS})
+      list(APPEND include_options "-I${incdir}")
+    endforeach()
+    foreach (incdir ${CGAL_3RD_PARTY_INCLUDE_DIRS})
+      list(APPEND include_options "-isystem${incdir}")
+    endforeach()
+    include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
+
+    ## Loop on package and headers
+    set(check_pkg_target_list)
+    foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
+      if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
+        set(depends "")
+        file(GLOB ${package}_HEADERS 
+          RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" 
+          "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h")
+        foreach(header ${${package}_HEADERS})
+          string(REPLACE "/" "__" header2 "${header}")
+          string(REPLACE "." "_" header2 "${header2}")
+          add_custom_command(OUTPUT check_${header2}
+            COMMAND ${CMAKE_CXX_COMPILER} ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ${include_options} -x c++ -fsyntax-only "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
+            COMMAND ${CMAKE_COMMAND} -E touch check_${header2}
+            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
+            VERBATIM
+            COMMENT "Check header ${header}"
+            )
+          list(APPEND depends check_${header2})
+        endforeach() # look on headers
+        add_custom_target(check_pkg_${package}_headers DEPENDS ${depends})
+        list(APPEND check_pkg_target_list check_pkg_${package}_headers)
+      endif() # if the package has an include directory
+    endforeach() # loop on packages
+    add_custom_target(check_headers DEPENDS ${check_pkg_target_list})
+  endif()
+endif( CGAL_BRANCH_BUILD )
+
+if(NOT CGAL_BRANCH_BUILD AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doc")
+  # in a non-branch build this is the top-level CMakeLists.txt
+  add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/doc")
+endif()
diff --git a/3rdparty/CGAL-4.8/INSTALL.md b/3rdparty/CGAL-4.8/INSTALL.md
new file mode 100644
index 0000000..11fa35c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/INSTALL.md
@@ -0,0 +1,211 @@
+INTRODUCTION
+============
+
+This file describes how to install CGAL. The instructions in this file
+are for the most common use cases, and cover the command line tools.
+
+For further information, or in case of problems, please see the
+detailed installation instructions, which can be found in this
+distribution in the file ./doc_html/index.html or on the CGAL website
+http://doc.cgal.org/latest/Manual/installation.html
+
+The documentation of CGAL is available in PDF and HTML formats.
+It is not bundled with the software but can be downloaded separately
+at <http://www.cgal.org/Manual>.
+
+For more information about CGAL, see the <http://www.cgal.org/>.
+
+In the current file, x.y is an implicit replacement for the current version
+of CGAL (3.5.1, 3.6, and so on).
+
+
+PREREQUISITES
+=============
+
+To install CGAL, you need 'cmake' and several third-party libraries.
+Some are essential for entire CGAL, some are mandatory for particular
+CGAL packages, some are only needed for demos.
+
+   * CMake (>= 2.8.11), the build system used by CGAL
+     Required for building CGAL
+
+   * Boost (>= 1.48)
+     Required for building CGAL and for applications using CGAL
+     Required compiled Boost library: Boost.Thread, Boost.System
+     Optional compiled Boost library: Boost.Program_options
+     http://www.boost.org/   or   http://www.boostpro.com/products/free/
+     You need the former if you plan to compile the boost libraries yourself,
+     for example because you target 64 bit applications for XP64
+
+   * Exact Arithmetic
+     CGAL combines floating point arithmetic with exact arithmetic, in order
+     to be fast and reliable. CGAL offers support for GMP and MPFR, for LEDA
+     exact number types, as well as a built-in exact number type used when
+     none of the other two is installed.
+     Required by several examples which have hard coded the number type.
+
+     - GMP (>= 4.1.4)
+       http://gmplib.org/
+       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
+       based on http://fp.gladman.plus.com/computing/gmp4win.htm
+
+     - MPFR (>= 2.2.1)
+       http://www.mpfr.org/
+       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
+       based on http://fp.gladman.plus.com/computing/gmp4win.htm
+
+     - LEDA (>= 6.2)
+       http://www.algorithmic-solutions.com/leda/index.htm
+
+   * Visualization
+     Required for most demos
+
+     - Qt5 (>= 5.3)
+       http://qt-project.org/
+
+     - libQGLViewer
+       http://www.libqglviewer.com/
+
+     - Geomview
+       http://www.geomview.org/
+       Not supported with Visual C++
+
+   * Numerical Libraries
+     - EIGEN (>=3.1)
+       Required by the packages:
+       o Estimation of Local Differential Properties of Point-Sampled Surfaces
+       o Approximation of Ridges and Umbilics on Triangulated Surface Meshes
+       o Planar Parameterization of Triangulated Surface Meshes
+       o Surface Reconstruction from Point Sets
+       http://eigen.tuxfamily.org
+
+     - BLAS, LAPACK, ATLAS
+       Required by the packages (if EIGEN is not available):
+       o Estimation of Local Differential Properties of Point-Sampled Surfaces
+       o Approximation of Ridges and Umbilics on Triangulated Surface Meshes
+       o Planar Parameterization of Triangulated Surface Meshes
+       http://www.netlib.org/blas/, http://www.netlib.org/lapack/
+       or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
+
+     - MPFI
+       Required by the package:
+       o Algebraic Kernel
+       https://gforge.inria.fr/projects/mpfi/
+       (or shipped with RS http://vegas.loria.fr/rs/)
+
+     - RS (root isolation)
+       Required by the package:
+       o Algebraic Kernel
+       http://vegas.loria.fr/rs/
+
+     - NTL (Number Type Theory)
+       Optional for the packages:
+       o Polynomial
+       o Algebraic Kernel
+       http://www.shoup.net/ntl/
+
+   * Miscellaneous
+
+     - zlib
+       Optional for the package:
+       o Surface Mesh Generator can read compressed images directly
+       http://www.zlib.net/
+
+     - ESBTL
+       Optional to read PDB files:
+       o Import data from a PDB file as CGAL points or weighted points.
+         An example is given in package Skin_surface (see example skin_surface_pdb_reader.cpp)
+       http://esbtl.sourceforge.net/
+
+CONFIGURATION
+=============
+
+To configure CGAL, type
+```
+  cmake .
+```
+in the directory that contains this INSTALL file. You can add several options
+to this command. The most important ones are
+
+* `-DCMAKE_INSTALL_PREFIX=<dir>`          installation directory [/usr/local]
+* `-DCMAKE_BUILD_TYPE=<Debug|Release>`    build type [Release]
+* `-DBUILD_SHARED_LIBS=<TRUE|FALSE>`      shared or static libraries [TRUE]
+* `-DCMAKE_C_COMPILER=<program>`          C compiler [gcc]
+* `-DCMAKE_CXX_COMPILER=<program>`        C++ compiler [g++]
+
+In case you want to add additional compiler and linker flags, you can use
+
+* `-DCGAL_CXX_FLAGS`                      additional compiler flags
+* `-DCGAL_MODULE_LINKER_FLAGS`            add. linker flags (static libraries)
+* `-DCGAL_SHARED_LINKER_FLAGS`            add. linker flags (shared libraries)
+* `-DCGAL_EXE_LINKER_FLAGS`               add. linker flags (executables)
+
+Variants with the additional suffix "_DEBUG" and "_RELEASE" allow to set
+separate values for debug and release builds. In case you do not want to add
+additional flags, but to override the default flags, replace "CGAL" by
+"CMAKE" in the variable names above.
+
+By default demos and examples are not configured. If you want to configure
+them at the same time as the CGAL library, you can use
+
+*  `-DWITH_examples=true`
+*  `-DWITH_demos=true`
+
+Note that CMake maintains a cache name `CMakeCache.txt`. If you change options
+(or your environment changes), it is best to remove that file to avoid
+problems.
+
+
+BUILDING
+========
+
+To build the CGAL libraries, type
+```
+  make
+```
+(or nmake in a Windows command prompt).
+If you want, you can install the CGAL header and libraries. To do so, type
+```
+  make install
+```
+You can build all demos or examples by typing
+```
+  make demos
+  make examples
+```
+If you are interested in the demos or examples of just a particular module,
+you can build them in the following way:
+```
+  make -C demo/Alpha_shapes_2        (or: cd demo/Alpha_shapes_2; make)
+  make -C examples/Alpha_shapes_2    (or: cd examples/Alpha_shapes_2; make)
+```
+A list of all available make targets can be obtained by
+```
+  make help
+```
+
+OUT-OF-SOURCE BUILDS
+====================
+
+The above instructions build the CGAL library in the same directory tree as
+the CGAL sources. Sometimes it is advisable to place all the generated files
+somewhere else. For example, if you want to build the library in several
+configurations (debug and release, different compilers, and so on). Using
+different build directories keeps all the generated files separated for each
+configuration.
+
+In the following, `$CGAL_SRC` denotes the directory with the CGAL sources;
+`$CGAL_BUILD` is an arbitrary directory where the generated files will be
+placed. You can perform an out-of-source build as follows:
+```
+  mkdir $CGAL_BUILD
+  cd $CGAL_BUILD
+  cmake [options] $CGAL_SRC
+  make
+  make install                       (if desired)
+  make demos                         (if desired)
+  make examples                      (if desired)
+```
+Basically, the only difference is the last parameter of the `cmake` command:
+`$CGAL_SRC` instead of `.` .
+
diff --git a/3rdparty/CGAL-4.8/LICENSE b/3rdparty/CGAL-4.8/LICENSE
new file mode 100644
index 0000000..c13ee28
--- /dev/null
+++ b/3rdparty/CGAL-4.8/LICENSE
@@ -0,0 +1,42 @@
+LICENSE
+----------------------------------------------------------------------------
+
+The CGAL software consists of several parts, each of which is licensed under
+an open source license. It is also possible to obtain commercial licenses
+from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL.
+
+The source code of the CGAL library can be found in the directories
+"src/CGAL", "src/CGALQt", "src/CGALQt5" and "include/CGAL" (with the
+exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
+It is specified in each file of the CGAL library which
+license applies to it. This is either the GNU General Public License
+or the GNU Lesser General Public License (as published by the Free Software
+Foundation; either version 3 of the License or (at your option) any later
+version). The texts of both licenses can be found in the files LICENSE.GPL
+and LICENSE.LGPL.
+
+The following files are modified versions taken from Boost and are licensed
+under the Boost Software License (see LICENSE.BSL).
+- include/CGAL/auto_link/auto_link.h
+- include/CGAL/internal/container_fwd_fixed.hpp
+- include/CGAL/internal/boost/array_binary_tree.hpp
+- include/CGAL/internal/boost/mutable_heap.hpp
+- include/CGAL/internal/boost/mutable_queue.hpp
+
+Distributed along with CGAL (for the users' convenience), but not part of
+CGAL, are the following third-party libraries, available under their own
+licenses:
+
+- CORE, in the directories "include/CGAL/CORE" and "src/CGAL_Core", is
+  licensed under the LGPL (see LICENSE.LGPL).
+- ImageIO, in the directory "src/CGAL_ImageIO", is licensed under the LGPL
+  (see LICENSE.LGPL).
+- OpenNL, in the directory "include/CGAL/OpenNL", is licensed under the LGPL
+  (see LICENSE.LGPL).
+
+All other files that do not have an explicit copyright notice (e.g., all
+examples and some demos) are licensed under a very permissive license. The
+exact license text can be found in the file LICENSE.FREE_USE.
+
+More information on the CGAL license can be found at
+http://www.cgal.org/license.html
diff --git a/3rdparty/CGAL-4.6/LICENSE.BSL b/3rdparty/CGAL-4.8/LICENSE.BSL
similarity index 100%
rename from 3rdparty/CGAL-4.6/LICENSE.BSL
rename to 3rdparty/CGAL-4.8/LICENSE.BSL
diff --git a/3rdparty/CGAL-4.6/LICENSE.FREE_USE b/3rdparty/CGAL-4.8/LICENSE.FREE_USE
similarity index 100%
rename from 3rdparty/CGAL-4.6/LICENSE.FREE_USE
rename to 3rdparty/CGAL-4.8/LICENSE.FREE_USE
diff --git a/3rdparty/CGAL-4.6/LICENSE.GPL b/3rdparty/CGAL-4.8/LICENSE.GPL
similarity index 100%
rename from 3rdparty/CGAL-4.6/LICENSE.GPL
rename to 3rdparty/CGAL-4.8/LICENSE.GPL
diff --git a/3rdparty/CGAL-4.6/LICENSE.LGPL b/3rdparty/CGAL-4.8/LICENSE.LGPL
similarity index 100%
rename from 3rdparty/CGAL-4.6/LICENSE.LGPL
rename to 3rdparty/CGAL-4.8/LICENSE.LGPL
diff --git a/3rdparty/CGAL-4.6/README b/3rdparty/CGAL-4.8/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/README
rename to 3rdparty/CGAL-4.8/README
diff --git a/3rdparty/CGAL-4.8/VERSION b/3rdparty/CGAL-4.8/VERSION
new file mode 100644
index 0000000..b6afe80
--- /dev/null
+++ b/3rdparty/CGAL-4.8/VERSION
@@ -0,0 +1 @@
+4.8
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.6/auxiliary/cgal_app.icns b/3rdparty/CGAL-4.8/auxiliary/cgal_app.icns
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/cgal_app.icns
rename to 3rdparty/CGAL-4.8/auxiliary/cgal_app.icns
diff --git a/3rdparty/CGAL-4.8/auxiliary/cgal_create_cmake_script.1 b/3rdparty/CGAL-4.8/auxiliary/cgal_create_cmake_script.1
new file mode 100644
index 0000000..4267dfe
--- /dev/null
+++ b/3rdparty/CGAL-4.8/auxiliary/cgal_create_cmake_script.1
@@ -0,0 +1,42 @@
+.TH CGAL_CREATE_CMAKE_SCRIPT "1" "April 2016" "CGAL 4.8" "User Commands"
+.SH NAME
+cgal_create_cmake_script \- create a cmake script for applications using CGAL
+.SH SYNOPSIS
+.B cgal_create_cmake_script
+.BR [ example | demo | test ]
+.SH DESCRIPTION
+The script
+.B cgal_create_cmake_script
+allows the simple creation of cmake scripts for applications which use the CGAL
+library. The parameter selects one of three script types, the default type
+is
+.BR example .
+.SH OPTIONS
+.PP
+.TP
+.B example
+Create a cmake script for several simple applications. Each
+.I C
+and
+.IR cpp
+file in the current directory containing a
+.I main()
+function is compiled and linked as a separate executable.
+.TP
+.B demo
+Create a cmake script for a single application. All
+.I C
+and
+.IR cpp
+files in the current directory are compiled and linked into one executable.
+.TP
+.B test
+Create a cmake script that is suited for the testsuite used by the CGAL developers.
+.SH AUTHOR
+The CGAL project (http://www.cgal.org/).
+.SH "REPORTING BUGS"
+Report bugs to <cgal-discuss at inria.fr> (see http://www.cgal.org/
+for further instructions).
+.SH "SEE ALSO"
+The full documentation for CGAL is available at http://www.cgal.org/ in PDF and
+HTML format.
diff --git a/3rdparty/CGAL-4.6/auxiliary/gdb/python/CGAL/__init__.py b/3rdparty/CGAL-4.8/auxiliary/gdb/python/CGAL/__init__.py
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/gdb/python/CGAL/__init__.py
rename to 3rdparty/CGAL-4.8/auxiliary/gdb/python/CGAL/__init__.py
diff --git a/3rdparty/CGAL-4.6/auxiliary/gdb/python/CGAL/printers.py b/3rdparty/CGAL-4.8/auxiliary/gdb/python/CGAL/printers.py
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/gdb/python/CGAL/printers.py
rename to 3rdparty/CGAL-4.8/auxiliary/gdb/python/CGAL/printers.py
diff --git a/3rdparty/CGAL-4.6/auxiliary/gdb/test-gdb.py b/3rdparty/CGAL-4.8/auxiliary/gdb/test-gdb.py
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/gdb/test-gdb.py
rename to 3rdparty/CGAL-4.8/auxiliary/gdb/test-gdb.py
diff --git a/3rdparty/CGAL-4.6/auxiliary/gdb/test.cpp b/3rdparty/CGAL-4.8/auxiliary/gdb/test.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/gdb/test.cpp
rename to 3rdparty/CGAL-4.8/auxiliary/gdb/test.cpp
diff --git a/3rdparty/CGAL-4.6/auxiliary/gmp/README b/3rdparty/CGAL-4.8/auxiliary/gmp/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/auxiliary/gmp/README
rename to 3rdparty/CGAL-4.8/auxiliary/gmp/README
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_binary.cmake.in b/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_binary.cmake.in
new file mode 100644
index 0000000..4f0ad5d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_binary.cmake.in
@@ -0,0 +1,167 @@
+#
+# This files contains definitions needed to use CGAL in a program.
+# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time.
+# This file is loaded by cmake via the command "find_package(CGAL)"
+#
+# This file correspond to a possibly out-of-sources CGAL configuration, thus the actual location
+# must be given by the cmake variable or enviroment variable CGAL_DIR. 
+
+set(CGAL_CONFIG_LOADED TRUE)
+
+get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+# The code for including exported targets is different from
+# CGAL_Config_install.cmake. We do not have separate export files in
+# an installed version and we need to make sure that we are not
+# currently building CGAL. Note that for CMake<=2.8.11 (detected by
+# the absence of CMP0024), the else() condition is never used.
+if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS)
+  include("${CGAL_CONFIG_DIR}/CGALExports.cmake")
+
+  macro(CGAL_get_property_optional VAR TARGET PROPERTY)
+    if(TARGET ${TARGET})
+      get_property(${VAR} TARGET ${TARGET} PROPERTY ${PROPERTY})
+    else()
+      set(${VAR} "")
+    endif()
+  endmacro()
+
+  if(NOT MSVC)
+    CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
+    CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
+    CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
+    CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION)
+  else()
+    set(CGAL_LIBRARY         "")
+    set(CGAL_Core_LIBRARY    "")
+    set(CGAL_ImageIO_LIBRARY "")
+    set(CGAL_Qt5_LIBRARY     "")
+  endif()
+else()
+  # We are currently in a CGAL Build and CGALExports.cmake has not
+  # necessarily been created yet. Just alias the targets. Also don't
+  # access the LOCATION property here to set lib_LIBRARY, since those
+  # targets are not imported and this is disallowed by CMP0026. Just
+  # set it to the target name.
+  macro(CGAL_alias_library lib)
+    if(TARGET ${lib} AND NOT TARGET CGAL::${lib})
+      add_library(CGAL::${lib} ALIAS ${lib})
+      set(${lib}_LIBRARY CGAL::${lib})
+    else()
+      set(${lib}_LIBRARY "")
+    endif()
+  endmacro()
+
+  CGAL_alias_library(CGAL)
+  CGAL_alias_library(CGAL_Core)
+  CGAL_alias_library(CGAL_ImageIO)
+  CGAL_alias_library(CGAL_Qt5)
+endif()
+
+# Check for possible config files of our libraries and include them.
+file(GLOB CGAL_CONFIG_FILES LIST_DIRECTORIES false
+  RELATIVE "${CGAL_CONFIG_DIR}" "${CGAL_CONFIG_DIR}/*LibConfig.cmake")
+foreach(configfile ${CGAL_CONFIG_FILES})
+  include("${CGAL_CONFIG_DIR}/${configfile}")
+endforeach()
+
+set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@")
+set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@")
+
+set(CGAL_MAJOR_VERSION    "@CGAL_MAJOR_VERSION@" )
+set(CGAL_MINOR_VERSION    "@CGAL_MINOR_VERSION@" )
+set(CGAL_BUILD_VERSION    "@CGAL_BUILD_VERSION@" )
+set(CGAL_SCM_BRANCH_NAME  "@CGAL_SCM_BRANCH_NAME@")
+set(CGAL_GIT_SHA1         "@CGAL_GIT_SHA1@")
+
+set(CGAL_BUILD_SHARED_LIBS        "@CGAL_BUILD_SHARED_LIBS@" )
+set(CGAL_Boost_USE_STATIC_LIBS    "@CGAL_Boost_USE_STATIC_LIBS@" )
+
+set(CGAL_CXX_FLAGS_INIT                   "@CMAKE_CXX_FLAGS@" )
+set(CGAL_CXX_FLAGS_RELEASE_INIT           "@CMAKE_CXX_FLAGS_RELEASE@" )
+set(CGAL_CXX_FLAGS_DEBUG_INIT             "@CMAKE_CXX_FLAGS_DEBUG@" )
+set(CGAL_MODULE_LINKER_FLAGS_INIT         "@CMAKE_MODULE_LINKER_FLAGS@" )
+set(CGAL_MODULE_LINKER_FLAGS_RELEASE_INIT "@CMAKE_MODULE_LINKER_FLAGS_RELEASE@" )
+set(CGAL_MODULE_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_MODULE_LINKER_FLAGS_DEBUG@" )
+set(CGAL_SHARED_LINKER_FLAGS_INIT         "@CMAKE_SHARED_LINKER_FLAGS@" )
+set(CGAL_SHARED_LINKER_FLAGS_RELEASE_INIT "@CMAKE_SHARED_LINKER_FLAGS_RELEASE@" )
+set(CGAL_SHARED_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_SHARED_LINKER_FLAGS_DEBUG@" )
+set(CGAL_BUILD_TYPE_INIT                  "@CMAKE_BUILD_TYPE@" )
+
+set(CGAL_INCLUDE_DIRS      "@CGAL_INCLUDE_DIRS@" )
+set(CGAL_MODULES_DIR       "@CGAL_MODULES_DIR@" )
+set(CGAL_LIBRARIES_DIR     "@CGAL_LIBRARIES_DIR@" )
+
+# If CGAL_ImageIO is built, tell if it was linked with Zlib.
+set(CGAL_ImageIO_USE_ZLIB                 "@CGAL_ImageIO_USE_ZLIB@" )
+
+set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
+
+set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" )
+
+set(CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "@CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT@")
+
+if ( CGAL_FIND_REQUIRED )
+  set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE        )
+  set( CHECK_CGAL_COMPONENT_ERROR_TYPE   FATAL_ERROR )
+  set( CHECK_CGAL_COMPONENT_ERROR_TITLE  "ERROR:"    )
+else()
+  if ( NOT CGAL_FIND_QUIETLY )
+    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE      )
+    set( CHECK_CGAL_COMPONENT_ERROR_TYPE   STATUS    )
+    set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
+  else()  
+    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
+  endif()
+endif()
+
+set(CGAL_CONFIGURED_LIBRARIES "@CGAL_CONFIGURED_LIBRARIES@")
+
+macro(check_cgal_component COMPONENT)
+
+  set( CGAL_LIB ${COMPONENT} )
+  #message("LIB: ${CGAL_LIB}")
+
+  if ( "${CGAL_LIB}" STREQUAL "CGAL" )
+    set( CGAL_FOUND TRUE )
+    set( CHECK_CGAL_ERROR_TAIL "" )
+  else() 
+    if ( WITH_${CGAL_LIB} )
+      if(TARGET CGAL::${CGAL_LIB})
+        set( ${CGAL_LIB}_FOUND TRUE )
+      else()
+        set( ${CGAL_LIB}_FOUND FALSE )
+        set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )
+      endif()
+    else()
+      set( ${CGAL_LIB}_FOUND FALSE )
+      set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
+    endif()
+  endif()  
+
+  if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
+    message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
+  endif()
+  
+endmacro()
+
+check_cgal_component("CGAL")
+
+foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
+  list (FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${CGAL_COMPONENT}" POSITION)
+  if ("${POSITION}" STRGREATER "-1") # means: CGAL_COMPONENT is contained in list
+    check_cgal_component("CGAL_${CGAL_COMPONENT}")
+# TODO EBEB do something for supporting lib in check_component?
+  endif()
+endforeach()
+
+# Starting with cmake 2.6.3, CGAL_FIND_COMPONENTS is cleared out when find_package returns.
+# But we need it within UseCGAL.cmake, so we save it aside into another variable
+set( CGAL_REQUESTED_COMPONENTS ${CGAL_FIND_COMPONENTS} )
+
+# for preconfigured libs
+set(CGAL_ENABLE_PRECONFIG "@CGAL_ENABLE_PRECONFIG@")
+set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@")
+set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@")
+
+set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@")
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_install.cmake.in b/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_install.cmake.in
new file mode 100644
index 0000000..72d1e4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGALConfig_install.cmake.in
@@ -0,0 +1,122 @@
+#
+# This files contains definitions needed to use CGAL in a program.
+# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time.
+# This file is loaded by cmake via the command "find_package(CGAL)"
+#
+# This file correspond to a CGAL installation with "make install", thus the actual location
+# must be given by the cmake variable or enviroment variable CGAL_DIR. 
+
+set(CGAL_CONFIG_LOADED TRUE)
+
+get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+# CGAL_DIR is the directory where this CGALConfig.cmake is installed
+set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
+
+set(CGAL_MAJOR_VERSION    "@CGAL_MAJOR_VERSION@" )
+set(CGAL_MINOR_VERSION    "@CGAL_MINOR_VERSION@" )
+set(CGAL_BUILD_VERSION    "@CGAL_BUILD_VERSION@" )
+set(CGAL_SCM_BRANCH_NAME  "@CGAL_SCM_BRANCH_NAME@")
+set(CGAL_GIT_SHA1         "@CGAL_GIT_SHA1@")
+
+set(CGAL_BUILD_SHARED_LIBS        "@CGAL_BUILD_SHARED_LIBS@" )
+set(CGAL_Boost_USE_STATIC_LIBS    "@CGAL_Boost_USE_STATIC_LIBS@" )
+
+set(CGAL_CXX_FLAGS_INIT                   "@CMAKE_CXX_FLAGS@" )
+set(CGAL_CXX_FLAGS_RELEASE_INIT           "@CMAKE_CXX_FLAGS_RELEASE@" )
+set(CGAL_CXX_FLAGS_DEBUG_INIT             "@CMAKE_CXX_FLAGS_DEBUG@" )
+set(CGAL_MODULE_LINKER_FLAGS_INIT         "@CMAKE_MODULE_LINKER_FLAGS@" )
+set(CGAL_MODULE_LINKER_FLAGS_RELEASE_INIT "@CMAKE_MODULE_LINKER_FLAGS_RELEASE@" )
+set(CGAL_MODULE_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_MODULE_LINKER_FLAGS_DEBUG@" )
+set(CGAL_SHARED_LINKER_FLAGS_INIT         "@CMAKE_SHARED_LINKER_FLAGS@" )
+set(CGAL_SHARED_LINKER_FLAGS_RELEASE_INIT "@CMAKE_SHARED_LINKER_FLAGS_RELEASE@" )
+set(CGAL_SHARED_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_SHARED_LINKER_FLAGS_DEBUG@" )
+set(CGAL_BUILD_TYPE_INIT                  "@CMAKE_BUILD_TYPE@" )
+
+set(CGAL_INCLUDE_DIRS  "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_INC_DIR@" )
+set(CGAL_MODULES_DIR   "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_CMAKE_DIR@" )
+set(CGAL_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_LIB_DIR@" )
+
+# If CGAL_ImageIO is built, tell if it was linked with Zlib.
+set(CGAL_ImageIO_USE_ZLIB                 "@CGAL_ImageIO_USE_ZLIB@" )
+
+set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
+
+set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" )
+
+set(CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT "@CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT@")
+
+if ( CGAL_FIND_REQUIRED )
+  set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE        )
+  set( CHECK_CGAL_COMPONENT_ERROR_TYPE   FATAL_ERROR )
+  set( CHECK_CGAL_COMPONENT_ERROR_TITLE  "ERROR:"    )
+else()
+  if ( NOT CGAL_FIND_QUIETLY )
+    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR TRUE      )
+    set( CHECK_CGAL_COMPONENT_ERROR_TYPE   STATUS    )
+    set( CHECK_CGAL_COMPONENT_ERROR_TITLE "NOTICE:" )
+  else()  
+    set( CHECK_CGAL_COMPONENT_MSG_ON_ERROR FALSE )
+  endif()
+endif()
+
+set(CGAL_CONFIGURED_LIBRARIES "@CGAL_CONFIGURED_LIBRARIES@")
+
+macro(check_cgal_component COMPONENT)
+
+  set( CGAL_LIB ${COMPONENT} )
+  #message("LIB: ${CGAL_LIB}")
+
+  if ( "${CGAL_LIB}" STREQUAL "CGAL" )
+    set( CGAL_FOUND TRUE )
+    # include CGAL export file
+    include(${CGAL_CONFIG_DIR}/CGALExports.cmake)
+    # include config file
+    include(${CGAL_CONFIG_DIR}/CGALLibConfig.cmake)
+    set( CHECK_CGAL_ERROR_TAIL "" )
+  else() 
+    if (EXISTS ${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
+      # include export files for requested component
+      include(${CGAL_CONFIG_DIR}/${CGAL_LIB}Exports.cmake)
+      # include config file (defining WITH_${CGAL_LIB})
+      include(${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
+    endif()
+    if ( WITH_${CGAL_LIB} )
+      if(TARGET CGAL::${CGAL_LIB})
+        set( ${CGAL_LIB}_FOUND TRUE )
+      else()
+        set( ${CGAL_LIB}_FOUND FALSE )
+        set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )
+      endif()
+    else()
+      set( ${CGAL_LIB}_FOUND FALSE )
+      set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
+    endif()
+  endif()  
+
+  if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR )
+    message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" )
+  endif()
+  
+endmacro()
+
+check_cgal_component("CGAL")
+
+foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
+  list (FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${CGAL_COMPONENT}" POSITION)
+  if ("${POSITION}" STRGREATER "-1") # means: CGAL_COMPONENT is contained in list
+    check_cgal_component("CGAL_${CGAL_COMPONENT}")
+# TODO EBEB do something for supporting lib in check_component?
+  endif()
+endforeach()
+
+# Starting with cmake 2.6.3, CGAL_FIND_COMPONENTS is cleared out when find_package returns.
+# But we need it within UseCGAL.cmake, so we save it aside into another variable
+set( CGAL_REQUESTED_COMPONENTS ${CGAL_FIND_COMPONENTS} )
+
+# for preconfigured libs
+set(CGAL_ENABLE_PRECONFIG "@CGAL_ENABLE_PRECONFIG@")
+set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@")
+set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@")
+
+set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@")
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGALLibConfig.cmake.in b/3rdparty/CGAL-4.8/cmake/modules/CGALLibConfig.cmake.in
new file mode 100644
index 0000000..cfbbf2b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGALLibConfig.cmake.in
@@ -0,0 +1,32 @@
+set(WITH_ at LIBRARY_NAME@ "ON")
+
+# The else condition of this code is never used in an installed
+# version since it cannot happen there. Note also that for
+# CMake<=2.8.11 (detected by the absence of CMP0024), the else()
+# condition is never used.
+if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS)
+  if(NOT MSVC)
+    get_property(@LIBRARY_NAME at _LIBRARY TARGET CGAL::@LIBRARY_NAME@ PROPERTY LOCATION)
+  else()
+    set(@LIBRARY_NAME at _LIBRARY "")
+  endif()
+else()
+  # We are currently in a CGAL Build and CGALExports.cmake has not
+  # necessarily been created yet. Just alias the targets. Also don't
+  # access the LOCATION property here to set lib_LIBRARY, since those
+  # targets are not imported and this is disallowed by CMP0026. Just
+  # set it to the target name.
+  if(TARGET @LIBRARY_NAME@ AND NOT TARGET CGAL::@LIBRARY_NAME@)
+    add_library(CGAL::@LIBRARY_NAME@ ALIAS @LIBRARY_NAME@)
+    set(@LIBRARY_NAME at _LIBRARY CGAL::@LIBRARY_NAME@)
+  else()
+    set(@LIBRARY_NAME at _LIBRARY "")
+  endif()
+endif()
+
+
+# 3RD_PARTY variables.
+set(@LIBRARY_NAME at _3RD_PARTY_INCLUDE_DIRS   "@@LIBRARY_NAME at _3RD_PARTY_INCLUDE_DIRS@")
+set(@LIBRARY_NAME at _3RD_PARTY_DEFINITIONS    "@@LIBRARY_NAME at _3RD_PARTY_DEFINITIONS@")
+set(@LIBRARY_NAME at _3RD_PARTY_LIBRARIES_DIRS "@@LIBRARY_NAME at _3RD_PARTY_LIBRARIES_DIRS@")
+set(@LIBRARY_NAME at _3RD_PARTY_LIBRARIES      "@@LIBRARY_NAME at _3RD_PARTY_LIBRARIES@")
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_CheckCXXFileRuns.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_CheckCXXFileRuns.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_CheckCXXFileRuns.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_CheckCXXFileRuns.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_Common.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_Common.cmake
new file mode 100644
index 0000000..ad652ed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_Common.cmake
@@ -0,0 +1,58 @@
+include(CGAL_Macros)
+
+if(RUNNING_CGAL_AUTO_TEST)
+# Just to avoid a warning from CMake if that variable is set on the command line...
+endif()
+
+# Common settings for CGAL cmake scripts
+if( NOT CGAL_COMMON_FILE_INCLUDED )
+  set(CGAL_COMMON_FILE_INCLUDED 1 )
+
+  # CMAKE_ROOT must be properly configured, but is not by the CMake windows installer, so check here
+  if (NOT CMAKE_ROOT)
+    message( FATAL_ERROR "CMAKE_ROOT environment variable not set. It should point to the directory where CMake is installed.")
+  endif()
+
+  # CMAKE_VERSION was introduced in 2.6.3 so we use it to detect the fact
+  if ( CMAKE_VERSION )
+    set( CMAKE_2_6_3_OR_ABOVE TRUE )
+  else()
+    set( CMAKE_2_6_3_OR_ABOVE FALSE )
+  endif()
+    
+  if ( CGAL_BUILDING_LIBS )
+    option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+    set(CGAL_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+
+    if ( BUILD_SHARED_LIBS )
+      message( STATUS "Building shared libraries" )
+    else()
+      message( STATUS "Building static libraries" )
+    endif()
+  endif()
+  
+  if ( WIN32 )
+    find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
+    if(CMAKE_UNAME)
+      exec_program(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
+      if ( CMAKE_SYSTEM_NAME2 MATCHES "CYGWIN" )
+        message( STATUS "This is the Windows CMake running within the cygwin platform." )
+        set( CGAL_WIN32_CMAKE_ON_CYGWIN TRUE CACHE INTERNAL "This is the cygwin platform." )
+      endif()
+    endif()
+    hide_variable(CMAKE_UNAME)
+
+    # Optionally setup the Visual Leak Detector
+    include(CGAL_SetupVLD)
+    CGAL_SetupVLD()
+    if(VLD_FOUND)
+      message(STATUS "Visual Leak Detector (VLD) is enabled.")
+    else()
+      message(STATUS "Visual Leak Detector (VLD) is not found.")
+    endif()
+  endif()
+
+  # set minimal version of some optional libraries:
+  set( Eigen3_FIND_VERSION "3.1.0")
+  
+endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_GeneratorSpecificSettings.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_GeneratorSpecificSettings.cmake
new file mode 100644
index 0000000..9aaed8d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_GeneratorSpecificSettings.cmake
@@ -0,0 +1,56 @@
+if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
+  set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 )
+
+  message( STATUS "Targetting ${CMAKE_GENERATOR}")
+
+  if ( MSVC )
+    message( STATUS "Target build enviroment supports auto-linking" )
+    set(CGAL_AUTO_LINK_ENABLED TRUE)
+  endif()
+
+  if     ( MSVC15 )
+    set(CGAL_TOOLSET "vc150")
+    message( STATUS "Using VC15 compiler." )
+  elseif ( MSVC14 )
+    set(CGAL_TOOLSET "vc140")
+    message( STATUS "Using VC14 compiler." )
+  elseif ( MSVC12 )
+    set(CGAL_TOOLSET "vc120")
+    message( STATUS "Using VC12 compiler." )
+  elseif ( MSVC11 )
+    set(CGAL_TOOLSET "vc110")
+    message( STATUS "Using VC11 compiler." )
+  elseif ( MSVC10 )
+    set(CGAL_TOOLSET "vc100")
+    message( STATUS "Using VC10 compiler." )
+  elseif ( MSVC90 )
+    set(CGAL_TOOLSET "vc90")
+    message( STATUS "Using VC90 compiler." )
+  elseif ( MSVC80 )
+    set(CGAL_TOOLSET "vc80")
+    message( STATUS "Using VC80 compiler." )
+  elseif ( MSVC71 )
+    set(CGAL_TOOLSET "vc71")
+    message( STATUS "Using VC71 compiler." )
+  else()
+    message( STATUS "Using ${CMAKE_CXX_COMPILER} compiler." )
+  endif()
+
+
+  # From james Bigler, in the cmake users list.
+  IF (APPLE)
+    exec_program(uname ARGS -v  OUTPUT_VARIABLE DARWIN_VERSION)
+    string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
+    message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}")
+    if (DARWIN_VERSION GREATER 8)
+       message(STATUS "Mac Leopard detected")
+      set(CGAL_APPLE_LEOPARD 1)
+    endif()
+  endif()
+
+  if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." )
+    set(HAS_CFG_INTDIR TRUE CACHE INTERNAL "Generator uses intermediate configuration directory" )
+    message( STATUS "Generator uses intermediate configuration directory: ${CMAKE_CFG_INTDIR}" )
+  endif()
+
+endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_Macros.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_Macros.cmake
new file mode 100644
index 0000000..28c810e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_Macros.cmake
@@ -0,0 +1,724 @@
+if( NOT CGAL_MACROS_FILE_INCLUDED )
+  set(CGAL_MACROS_FILE_INCLUDED 1 )
+
+  include("${CGAL_MODULES_DIR}/CGAL_VersionUtils.cmake")
+
+  # Probably unused. -- Laurent Rineau, 2011/07/21
+  macro(assert _arg )
+    if ( NOT ${_arg} )
+      message( FATAL_ERROR "Variable ${_arg} must be defined" )
+    endif()
+  endmacro()
+
+  macro( hide_variable var )
+    set ( ${var} ${${var}} CACHE INTERNAL "Variable hidden from user" FORCE )
+  endmacro()
+
+  macro( cache_set var )
+    set ( ${var} ${ARGN} CACHE INTERNAL "" )
+    set ( ${var} ${ARGN} CACHE INTERNAL "" )
+  endmacro()
+
+  macro( typed_cache_set type doc var )
+    set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE )
+    set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE )
+  endmacro()
+
+  macro( cache_get var )
+    set ( ${var} )
+  endmacro()
+
+  # Splits inlist in the first element (head) and the rest (tail)
+  macro( list_split head tail )
+    set( ${head} )
+    set( ${tail} )
+    set( _LS_is_head TRUE )
+    foreach( _LS_item ${ARGN} )
+      if ( _LS_is_head )
+        set( ${head} ${_LS_item} )
+        set( _LS_is_head FALSE )
+      else()
+        list( APPEND ${tail} ${_LS_item} )
+      endif()
+    endforeach()
+  endmacro()
+
+  # adds elements to an internal cached list
+  macro( add_to_cached_list listname )
+    cache_get ( ${listname} )
+    set( _ATC_${listname}_tmp  ${${listname}} )
+    if ( NOT "${ARGN}" STREQUAL "" )
+      list( APPEND _ATC_${listname}_tmp ${ARGN} )
+    endif()
+    cache_set ( ${listname} ${_ATC_${listname}_tmp} )
+  endmacro()
+
+  # adds elements to an in-memory variable named 'listname'
+  macro( add_to_memory_list listname )
+    if ( NOT "${ARGN}" STREQUAL "" )
+      list( APPEND ${listname} ${ARGN} )
+    endif()
+  endmacro()
+
+  # adds elements to a list.
+  # If the first argument after 'listname' is PERSISTENT then 'listname'
+  # is a persistent internal cached variable, otherwise is a memory variable.
+  macro( add_to_list listname )
+    list_split( _ATL_ARGN_HEAD _ATL_ARGN_TAIL ${ARGN} )
+    if ( "${_ATL_ARGN_HEAD}" STREQUAL "PERSISTENT" )
+      add_to_cached_list( ${listname} ${_ATL_ARGN_TAIL} )
+    else()
+      add_to_memory_list( ${listname} ${ARGN} )
+    endif()
+  endmacro()
+
+  # Probably unused. -- Laurent Rineau, 2011/07/21
+  macro( at list idx var )
+    list( LENGTH ${list} ${list}_length )
+    if ( ${idx} LESS ${${list}_length} )
+      list( GET ${list} ${idx} ${var} )
+    else()
+      set( ${var} "NOTFOUND" )
+    endif()
+  endmacro()
+
+  macro( found_in_list item_list item result )
+    set( ${result} "FALSE" )
+    foreach( element ${${item_list}} )
+      if ( "${element}" STREQUAL "${item}" )
+        set( ${result} "TRUE" )
+      endif()
+    endforeach()
+  endmacro()
+
+  macro( uniquely_add_flags target_var )
+    if ( "${ARGC}" GREATER "1"  )
+      set( target_list "${${target_var}}" )
+      set( source_list "${ARGN}" )
+      separate_arguments( target_list )
+      separate_arguments( source_list )
+      foreach( flag ${source_list} )
+        found_in_list( target_list ${flag} ${flag}_FOUND )
+        if ( NOT ${flag}_FOUND )
+          typed_cache_set( STRING "User-defined flags" ${target_var} "${${target_var}} ${flag}" )
+        endif()
+      endforeach()
+    endif()
+  endmacro()
+
+  function( CGAL_display_compiler_version )
+    set(search_dirs "")
+    message("Compiler version:")
+    set(version "Unknown compiler. Cannot display its version")
+    if(MSVC)
+      execute_process(COMMAND "${CMAKE_CXX_COMPILER}"
+        RESULT_VARIABLE ok
+        ERROR_VARIABLE out_version
+        TIMEOUT 5)
+      if(ok EQUAL 0)
+        set(version "${out_version}")
+      endif()
+    else()
+      foreach(flag "-V" "--version" "-v")
+        execute_process(COMMAND "${CMAKE_CXX_COMPILER}" ${flag}
+          RESULT_VARIABLE ok
+          OUTPUT_VARIABLE out_version
+          ERROR_VARIABLE out_version
+          TIMEOUT 5)
+        if(ok EQUAL 0)
+          if("${out_version}" MATCHES "^clang")
+            execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -print-search-dirs
+              RESULT_VARIABLE ok
+              OUTPUT_VARIABLE out_search_dirs
+              TIMEOUT 5)
+            if(ok EQUAL 0)
+              set(search_dirs "${out_search_dirs}")
+            endif()
+          endif()
+          set(version "${out_version}")
+          break()
+        endif()
+      endforeach()
+    endif()
+    message("${version}")
+    if(search_dirs)
+      message("Search dirs:")
+      message("${search_dirs}")
+    endif()
+  endfunction()
+
+  macro( get_dependency_version LIB )
+
+    if ( "${ARGC}" GREATER "1" )
+      set( PKG ${ARGV1} )
+    else()
+      set( PKG ${LIB} )
+    endif()
+
+    if ( ${PKG}_FOUND )
+
+      set ( ${LIB}_VERSION "unknown" )
+
+      try_run( ${LIB}_RUN_RES
+               ${LIB}_COMPILE_RES
+               "${CMAKE_BINARY_DIR}"
+               "${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/print_${LIB}_version.cpp"
+               CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}"
+                           "-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}"
+                           "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}"
+               OUTPUT_VARIABLE ${LIB}_OUTPUT
+            )
+
+      if ( ${LIB}_COMPILE_RES )
+
+        if ( ${LIB}_RUN_RES EQUAL "0" )
+
+          string( REGEX MATCH "version=.*\$" ${LIB}_VERSION_LINE ${${LIB}_OUTPUT}  )
+          string( REPLACE "\n" "" ${LIB}_VERSION_LINE2 ${${LIB}_VERSION_LINE} )
+          string( REPLACE "\r" "" ${LIB}_VERSION_LINE3 ${${LIB}_VERSION_LINE2} )
+          string( REPLACE "version=" "" ${LIB}_VERSION ${${LIB}_VERSION_LINE3} )
+
+        else()
+
+          message( STATUS "WARNING: ${LIB} found but print_${LIB}_version.cpp exited with error condition: ${${LIB}_RUN_RES}" )
+          message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
+          message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
+          message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
+          message( STATUS "${${LIB}_OUTPUT}" )
+
+        endif()
+
+      else()
+
+        message( STATUS "WARNING: ${LIB} found but could not compile print_${LIB}_version.cpp:")
+        message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
+        message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
+        message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
+        message( STATUS "${${LIB}_OUTPUT}" )
+
+      endif()
+
+      message( STATUS "USING ${LIB}_VERSION = '${${LIB}_VERSION}'" )
+
+    endif()
+
+  endmacro()
+
+  macro( use_lib )
+
+    set (lib "${ARGV0}")
+
+    set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
+
+    if ( ${vlib}_FOUND AND (NOT TARGET CGAL OR WITH_${lib}))
+
+      if ( NOT ${vlib}_SETUP ) # avoid double usage
+
+        if ( "${ARGC}" EQUAL "2" )
+
+          set (usefile "${ARGV1}")
+
+          include( ${usefile} )
+          message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}")
+
+          # UseLIB-file has to set ${vlib}_SETUP to TRUE
+          # TODO EBEB what about Qt5, zlib?
+
+        else()
+
+          ####message( STATUS "${lib} include:     ${${vlib}_INCLUDE_DIR}" )
+          include_directories ( SYSTEM ${${vlib}_INCLUDE_DIR} )
+
+          # TODO EBEB remove definitions?
+          ####message( STATUS "${lib} definitions: ${${vlib}_DEFINITIONS}" )
+          add_definitions( ${${vlib}_DEFINITIONS} "-DCGAL_USE_${vlib}" )
+
+          if ( ${vlib}_LIBRARIES )
+            ####message( STATUS "${lib} libraries:   ${${vlib}_LIBRARIES}" )
+            link_libraries( ${${vlib}_LIBRARIES} )
+          endif()
+
+          ####message (STATUS "Configured ${lib} in standard way")
+
+          set( ${vlib}_SETUP TRUE )
+
+        endif()
+
+      endif()
+
+      if (NOT ${vlib}_SETUP )
+
+         message( WARNING "${vlib} has not been set up" )
+
+      endif()
+
+    else()
+
+      if ( WITH_${lib} )
+        message( SEND_ERROR "Try to use ${lib} that is not found")
+      endif()
+
+    endif()
+
+  endmacro()
+
+
+  macro( use_component component)
+
+    message (STATUS "Requested component: ${component}")
+
+    if(WITH_CGAL_${component})
+      if(TARGET CGAL_${component})
+        add_to_list( CGAL_LIBRARIES CGAL_${component} )
+      else()
+        add_to_list( CGAL_LIBRARIES ${CGAL_${component}_LIBRARY} )
+      endif()
+      add_to_list( CGAL_3RD_PARTY_LIBRARIES  ${CGAL_${component}_3RD_PARTY_LIBRARIES}  )
+
+      add_to_list( CGAL_3RD_PARTY_INCLUDE_DIRS   ${CGAL_${component}_3RD_PARTY_INCLUDE_DIRS}   )
+      add_to_list( CGAL_3RD_PARTY_DEFINITIONS    ${CGAL_${component}_3RD_PARTY_DEFINITIONS}    )
+      add_to_list( CGAL_3RD_PARTY_LIBRARIES_DIRS ${CGAL_${component}_3RD_PARTY_LIBRARIES_DIRS} )
+
+      # Nothing to add for Core
+
+      if (${component} STREQUAL "ImageIO")
+        find_package( OpenGL QUIET )
+        find_package( ZLIB QUIET )
+      endif()
+
+      if (${component} STREQUAL "Qt5")
+        find_package( OpenGL QUIET )
+        find_package( Qt5 QUIET COMPONENTS OpenGL Svg )
+      endif()
+
+    else(WITH_CGAL_${component})
+
+      # now we are talking about 3rd party libs
+
+      if ( ${component} STREQUAL "ALL_PRECONFIGURED_LIBS" )
+
+        if (CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT)
+          message( STATUS "External libraries are all used")
+          foreach ( CGAL_3RD_PARTY_LIB ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
+            if (${CGAL_3RD_PARTY_LIB}_FOUND)
+              use_lib( ${CGAL_3RD_PARTY_LIB} ${${CGAL_3RD_PARTY_LIB}_USE_FILE})
+            endif()
+          endforeach()
+        else()
+          message( SEND_ERROR "Component ALL_PRECONFIGURED_LIBS only allow with CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT=ON")
+        endif()
+
+      else()
+
+        list( FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${component}" POSITION )
+        if ( "${POSITION}" EQUAL "-1" ) # if component is not a CGAL_<lib>
+
+          if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX)
+            set(CGAL_EXT_LIB_${component}_PREFIX ${component})
+          endif()
+
+          set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" )
+
+          if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND)
+
+            ####message( STATUS "External library ${component} has been preconfigured")
+            use_lib( ${component} ${${vlib}_USE_FILE})
+
+          else()
+
+            ####message( STATUS "External library ${component} has not been preconfigured")
+      if (${component} STREQUAL "ImageIO")
+        find_package( OpenGL )
+        find_package( ZLIB )
+      endif()
+
+      if (${component} STREQUAL "Qt5")
+                set(CGAL_${component}_FOUND TRUE)
+                find_package( OpenGL )
+                find_package (Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools)
+      endif()
+            ####message( STATUS "External library ${vlib} after find")
+            if (${vlib}_FOUND)
+              ####message( STATUS "External library ${vlib} about to be used")
+              use_lib( ${component} ${${vlib}_USE_FILE})
+            endif()
+
+          endif()
+        else()
+
+          if (NOT WITH_CGAL_${component}) 
+            message(STATUS "NOTICE: The CGAL_${component} library seems to be required but is not build. Thus, it is expected that some executables will not be compiled.")
+          endif()
+
+        endif()
+
+      endif()
+
+    endif(WITH_CGAL_${component})
+
+  endmacro()
+
+  macro( use_essential_libs )
+
+    # Comment: This is subject to be changed in the future
+    #          - either more specific (giving precise include_dir- and link-order)
+    #          - or even less specific if order becomes less relevant
+    # Eric Berberich 2012/06/29
+
+    if(NOT CGAL_DISABLE_GMP)
+      if(RS_FOUND)
+        use_component( RS )
+      endif()
+
+      if(MPFI_FOUND)
+        use_component( MPFI )
+      endif()
+
+      if(MPFR_FOUND)
+        use_component( MPFR )
+      endif()
+
+      if (GMPXX_FOUND)
+        use_component( GMPXX )
+      endif()
+
+      if(GMP_FOUND)
+        use_component( GMP )
+      endif()
+    endif(NOT CGAL_DISABLE_GMP)
+
+    if(LEDA_FOUND)
+      use_component( LEDA )
+    endif()
+
+    if(NTL_FOUND)
+      use_component( NTL )
+    endif()
+  endmacro()
+
+
+  function( cgal_setup_module_path )
+    # Avoid to modify the modules path twice
+    if(NOT CGAL_MODULE_PATH_IS_SET)
+      # Where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
+      set(CGAL_CMAKE_MODULE_PATH ${CGAL_MODULES_DIR})
+
+      set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
+
+      set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CGAL_CMAKE_MODULE_PATH})
+
+      # Export those variables to the parent scope (the scope that calls the function)
+      set(CGAL_MODULE_PATH_IS_SET TRUE PARENT_SCOPE)
+      set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
+      set(CGAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
+      set(ORIGINAL_CMAKE_MODULE_PATH "${ORIGINAL_CMAKE_MODULE_PATH}" PARENT_SCOPE)
+    endif()
+  endfunction()
+
+  macro( create_CGALconfig_files )
+
+    # CGALConfig.cmake is platform specific so it is generated and stored in the binary folder.
+    configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary.cmake.in"  "${CMAKE_BINARY_DIR}/CGALConfig.cmake"        @ONLY)
+
+    # There is also a version of CGALConfig.cmake that is prepared in case CGAL in installed in CMAKE_INSTALL_PREFIX.
+    configure_file("${CGAL_MODULES_DIR}/CGALConfig_install.cmake.in" "${CMAKE_BINARY_DIR}/config/CGALConfig.cmake" @ONLY)
+
+    #write prefix exceptions
+    file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n")
+    file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}")
+
+     foreach( lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES} )
+
+       list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION )
+       # if lib is essential or preconfiguration for an activated library ...
+       if ( ("${POSITION}" STRGREATER "-1") OR ( CGAL_ENABLE_PRECONFIG AND WITH_${lib} ))
+
+         set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
+         #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_FOUND           \"${${vlib}_FOUND}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_USE_FILE        \"${${vlib}_USE_FILE}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_INCLUDE_DIR     \"${${vlib}_INCLUDE_DIR}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_LIBRARIES       \"${${vlib}_LIBRARIES}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "  set( ${vlib}_DEFINITIONS     \"${${vlib}_DEFINITIONS}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "endif()\n\n")
+
+
+         #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_FOUND           \"${${vlib}_FOUND}\")\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_USE_FILE        \"${${vlib}_USE_FILE}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_INCLUDE_DIR     \"${${vlib}_INCLUDE_DIR}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_LIBRARIES       \"${${vlib}_LIBRARIES}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "  set( ${vlib}_DEFINITIONS     \"${${vlib}_DEFINITIONS}\" )\n")
+         file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "endif()\n\n")
+       endif()
+
+     endforeach()
+
+  endmacro()
+
+  macro ( fetch_env_var VAR )
+    if ( "${${VAR}}" STREQUAL "" )
+      set( ${VAR}_env_value "$ENV{${VAR}}" )
+      if ( NOT "${${VAR}_env_value}" STREQUAL "" )
+        # Convert Windows path to Unix-style
+        FILE(TO_CMAKE_PATH ${${VAR}_env_value} ${VAR})
+      endif()
+    endif()
+  endmacro()
+
+
+## All the following macros are probably unused. -- Laurent Rineau, 2011/07/21
+
+  # Composes a tagged list of libraries: a list with interpersed keywords or tags
+  # indicating that all following libraries, up to the next tag, are to be linked only for the
+  # corresponding build type. The 'general' tag indicates libraries that corresponds to all build types.
+  # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitve and
+  # the inital range of libraries listed before any tag is implicitely 'general'
+  #
+  # This macro takes 3 lists of general, optimized and debug libraries, resp, and populates the list
+  # given in the fourth argument.
+  #
+  # The first three parameters must be strings containing a semi-colon separated list of elements.
+  # All three lists must be passed, but any of them can be an empty string "".
+  # The fourth parameter, corresponding to the result, must be a variable name and it will be APPENDED
+  # (retaining any previous contents)
+  #
+  # If there is a last parameter whose value is "PERSISTENT" then the result is an internal cached variable,
+  # otherwise it is an in-memory variable
+  #
+  macro( compose_tagged_libraries libs_general libs_optimized libs_debug libs )
+
+    if ( "${ARGN}" STREQUAL "PERSISTENT" )
+      set( _CTL_IN_CACHE "PERSISTENT" )
+    else()
+      set( _CTL_IN_CACHE )
+    endif()
+
+    if ( NOT "${libs_general}" STREQUAL "" )
+      add_to_list( ${libs} ${_CTL_IN_CACHE} ${libs_general} )
+    endif()
+
+    if ( NOT "${libs_optimized}" STREQUAL "" )
+      add_to_list( ${libs} ${_CTL_IN_CACHE} optimized ${libs_optimized} )
+    endif()
+
+    if ( NOT "${libs_debug}" STREQUAL "" )
+      add_to_list( ${libs} ${_CTL_IN_CACHE} debug ${libs_debug} )
+    endif()
+
+  endmacro()
+
+  # Decomposes a tagged list of libraries (see macro compose_tagged_libraries).
+  # The first argument is the tagged list and the next 3 arguments are the lists
+  # where the general, optimized and debug libraries are collected.
+  #
+  # The first parameter must be a string containing a semi-colon separated list of elements.
+  # It cannot be ommitted, but it can be an empty string ""
+  #
+  # TThe next three arguments must be the names of the variables containing the result, and they
+  # will be APPENDED (retaining any previous contents)
+  #
+  # If there is a last parameter whose value is "PERSISTENT" then the result variables are internal in the cache,
+  # otherwise they are in-memory.
+  #
+  macro( decompose_tagged_libraries libs libs_general libs_optimized libs_debug )
+
+    if ( "${ARGN}" STREQUAL "PERSISTENT" )
+      set( _DTL_IN_CACHE "PERSISTENT" )
+    else()
+      set( _DTL_IN_CACHE )
+    endif()
+
+    set( _DTL_tag general )
+
+    foreach( _DTL_lib ${libs} )
+
+      if ( "${_DTL_lib}" STREQUAL "general" OR "${_DTL_lib}" STREQUAL "optimized" OR "${_DTL_lib}" STREQUAL "debug" )
+
+        set( _DTL_tag "${_DTL_lib}" )
+
+      else()
+
+        if (     "${_DTL_tag}" STREQUAL "general"   )
+                                                       set( _DTL_target ${libs_general}   )
+        elseif ( "${_DTL_tag}" STREQUAL "optimized" )
+                                                       set( _DTL_target ${libs_optimized} )
+        else()
+                                                       set( _DTL_target ${libs_debug}     )
+        endif()
+
+        add_to_list( ${_DTL_target} ${_DTL_IN_CACHE} ${_DTL_lib} )
+
+      endif()
+
+    endforeach()
+
+  endmacro()
+
+  # Given lists of optimized and debug libraries, creates a tagged list which will
+  # contain the libraries listed in the 'general' section if any of the two lists is empty,
+  #
+  # All arguments are variable names (not values), thus the input list can be undefined or empty.
+  # The return variable ('libs') will be APPENDED the result (retaining any previous contents)
+  #
+  # If there is a last parameter whose value is "PERSISTENT" then the result is an internal cached variable,
+  # otherwise it is an in-memory variable
+  #
+  # Example:
+  #
+  #   set( LIBS_1 libA.so libB.so )
+  #   set( LIBS_2 libC.so )
+  #
+  #   tag_libraries( LIBS_1 LIBS_2 LIBS_R )
+  #
+  # LIBS_R -> optimized;libA.so;libB.so;debug;libC.so
+  #
+  #   tag_libraries( LIBS_1 SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_R )
+  #
+  # LIBS_R -> libA.so;libB.so  (implicitely 'general' since there is no tag)
+  #
+  #   tag_libraries( SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_2 LIBS_R )
+  #
+  # LIBS_R -> libC.so  (implicitely 'general' since there is no tag)
+  #
+  macro( tag_libraries libs_general_or_optimized libs_general_or_debug libs )
+
+    list( LENGTH ${libs_general_or_optimized} _TL_libs_general_or_optimized_len )
+    list( LENGTH ${libs_general_or_debug}     _TL_libs_general_or_debug_len     )
+
+    if ( _TL_libs_general_or_optimized_len EQUAL 0 )
+                                                     compose_tagged_libraries( "${${libs_general_or_debug}}"     ""                                 ""                           ${libs} ${ARGN} )
+    elseif ( _TL_libs_general_or_debug_len EQUAL 0 )
+                                                     compose_tagged_libraries( "${${libs_general_or_optimized}}" ""                                 ""                           ${libs} ${ARGN} )
+    else()
+                                                     compose_tagged_libraries( ""                                "${${libs_general_or_optimized}}" "${${libs_general_or_debug}}" ${libs} ${ARGN} )
+    endif()
+
+  endmacro()
+
+  # add_to_tagged_libraries( libsR ${libsA} <PERSISTENT> )
+  #
+  # Appends the list of tagged libraries contained in the variable 'libA' to the list
+  # of tagged libraries contained in the variable 'libR', properly redistributing each tagged subsequence.
+  #
+  # The first argument is the name of the variable recieving the list. It will be APPENDED
+  # (retaining any previous contents).
+  # The second parameter is a single string value containing the tagged
+  # lists of libraries to append (as a semi-colon separated list). It can be empty, in which case noting is added.
+  #
+  # If there is a third parameter whose value is PERSISTENT, then 'libR' is an internal cached variable, otherwise
+  # it is an in-memory variable.
+  #
+  # It is not possible to append more than one list in the same call.
+  #
+  # Example:
+  #
+  #   set( LIBS_1 libG0.so libG1.so optimized libO0.so)
+  #   set( LIBS_2 libG2.so debug libD0.so)
+  #   set( LIBS_3 debug libD1.so optimized libO1.so libO2.so )
+  #
+  #   concat_tagged_libraries( LIBS_R ${LIBS_1} PERSISTENT )
+  #   concat_tagged_libraries( LIBS_R ${LIBS_2} PERSISTENT )
+  #   concat_tagged_libraries( LIBS_R ${LIBS_3} PERSISTENT )
+  #
+  # LIBS_R -> libG0.so;libG1.so;libG2.so;optimized;libO0.so;libO1.so;libO2.so;debug;libD0.so;libD1.so, in the cache
+  #
+  macro( add_to_tagged_libraries libsR in_cache libsA  )
+
+    if ( "${in_cache}" STREQUAL "PERSISTENT" )
+      set( _CTL_IN_CACHE "PERSISTENT" )
+    else()
+      set( _CTL_IN_CACHE )
+    endif()
+
+    set( _CTL_general_0   )
+    set( _CTL_optimized_0 )
+    set( _CTL_debug_0     )
+    set( _CTL_general_1   )
+    set( _CTL_optimized_1 )
+    set( _CTL_debug_0     )
+
+    decompose_tagged_libraries( "${${libsR}}" _CTL_general_0 _CTL_optimized_0 _CTL_debug_0 )
+    decompose_tagged_libraries( "${libsA}"    _CTL_general_1 _CTL_optimized_1 _CTL_debug_1 )
+
+    add_to_list( _CTL_general_0   ${_CTL_general_1}   )
+    add_to_list( _CTL_optimized_0 ${_CTL_optimized_1} )
+    add_to_list( _CTL_debug_0     ${_CTL_debug_1}     )
+
+    if ( "${_CTL_IN_CACHE}" STREQUAL "PERSISTENT" )
+      cache_set( ${libsR} )
+    else()
+      set( ${libsR} )
+    endif()
+
+    compose_tagged_libraries( "${_CTL_general_0}" "${_CTL_optimized_0}" "${_CTL_debug_0}" ${libsR} ${_CTL_IN_CACHE} )
+
+  endmacro()
+
+
+  macro( add_to_persistent_tagged_libraries libsR )
+    add_to_tagged_libraries( ${libsR} PERSISTENT "${ARGN}" )
+  endmacro()
+
+  macro( add_to_in_memory_tagged_libraries libsR )
+    add_to_tagged_libraries( ${libsR} NOT_PERSISTENT "${ARGN}" )
+  endmacro()
+
+
+endif()
+
+
+function(process_CGAL_subdirectory entry subdir type_name)
+  # For example, subdir can be "examples", type_name "example", and entry "Mesh_2"
+
+  if ( CGAL_BRANCH_BUILD )
+    string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/${subdir}/" "" ENTRY_DIR_NAME "${entry}" )
+  else()
+    string( REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" ENTRY_DIR_NAME "${entry}" )
+  endif()
+
+  if( NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") # out-of-source
+    make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
+  endif()
+
+  set(ADD_SUBDIR TRUE)
+
+  if(EXISTS ${entry}/../../dont_submit)
+    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${ENTRY_DIR_NAME}/?\$")
+    if(dont_submit_grep)
+      set(ADD_SUBDIR FALSE)
+    endif()
+    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/${ENTRY_DIR_NAME}/?\$")
+    if(dont_submit_grep)
+      set(ADD_SUBDIR FALSE)
+    endif()
+    file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/?\$")
+    if(dont_submit_grep)
+      set(ADD_SUBDIR FALSE)
+    endif()
+  endif()
+
+  if(ADD_SUBDIR)
+    message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}")
+    if(EXISTS ${entry}/CMakeLists.txt)
+      add_subdirectory( ${entry} ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME} )
+    else()
+      if(CGAL_CREATE_CMAKE_SCRIPT)
+#        message("bah ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir ${entry}")
+        execute_process(
+          COMMAND bash ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir "${entry}"
+          WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}"
+          RESULT_VARIABLE RESULT_VAR OUTPUT_QUIET)
+        if(NOT RESULT_VAR)
+#          message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
+          add_subdirectory( "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
+        endif()
+      endif()
+    endif()
+  else()
+    message(STATUS "${subdir}/${ENTRY_DIR_NAME} is in dont_submit")
+  endif()
+endfunction()
+
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SCM.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SCM.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_SCM.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_SCM.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupBoost.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupBoost.cmake
new file mode 100644
index 0000000..0d5b557
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupBoost.cmake
@@ -0,0 +1,59 @@
+if ( NOT CGAL_Boost_Setup )
+
+  include(CGAL_TweakFindBoost)
+
+  set ( CGAL_requires_Boost_libs TRUE )
+  if ( DEFINED  MSVC_VERSION AND "${MSVC_VERSION}" GREATER 1800)
+    set ( CGAL_requires_Boost_libs FALSE )
+  endif()
+  if ( CMAKE_COMPILER_IS_GNUCXX
+      AND(
+        #GCC 4.8+ with c++11 on
+        ( NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8
+          AND CMAKE_CXX_FLAGS MATCHES "\\-std=(c|gnu)\\+\\+[01][14yxz]")
+        #GCC 6.0+ without c++03 on
+        OR ( NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0
+             AND NOT CMAKE_CXX_FLAGS MATCHES "\\-std=(c|gnu)\\+\\+[90][83]")
+      ) )
+    set ( CGAL_requires_Boost_libs FALSE )
+  endif()
+
+  # In the documentation, we say we require Boost-1.48, but technically we
+  # require 1.39. Some packages may require more recent versions, though.
+  if (CGAL_requires_Boost_libs)
+    find_package( Boost 1.39 REQUIRED thread system )
+  else()
+    find_package( Boost 1.39 REQUIRED )
+  endif()
+
+  if(Boost_FOUND)
+    if(DEFINED Boost_DIR AND NOT Boost_DIR)
+      # Unset that cache variable that is set in the cache by FindBoost
+      # (while it was searching for boost-cmake).
+      unset(Boost_DIR CACHE)
+      set(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "Avoid future search of boost-cmake")
+    endif()
+  endif()
+  
+  message( STATUS "Boost include:     ${Boost_INCLUDE_DIRS}" )
+  message( STATUS "Boost libraries:   ${Boost_LIBRARIES}" )
+  message( STATUS "Boost definitions: ${Boost_DEFINITIONS}" )
+  
+  set ( CGAL_USE_BOOST 1 )
+  
+  include(CGAL_Macros)
+  
+  add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS   ${Boost_INCLUDE_DIRS} )
+  add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${Boost_LIBRARY_DIRS} )
+  add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS    ${Boost_DEFINITIONS}  )
+  
+  if ( NOT MSVC )
+    add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES} )
+  endif()
+  
+  message( STATUS "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" )
+  
+  set ( CGAL_Boost_Setup TRUE )
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupDependencies.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupDependencies.cmake
new file mode 100644
index 0000000..6575cdf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupDependencies.cmake
@@ -0,0 +1,85 @@
+include(CGAL_Macros)
+
+message ( STATUS "External libraries supported: ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}")
+
+foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
+
+  # Part 1: Try to find lib
+
+  set (vlib "${CGAL_EXT_LIB_${lib}_PREFIX}")
+
+  # Check whether lib is essential or WITH_<lib> is given:
+
+  list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION)
+
+  if ("${POSITION}" STRGREATER "-1" OR WITH_${lib})
+
+    # In both cases CGAL_USE_<lib> will be finally set.
+  
+    #message (STATUS "With ${lib} given or essential: pos=${POSITION}")
+
+    if ( CGAL_ENABLE_PRECONFIG )
+      message (STATUS "Preconfiguring library: ${lib} ...")
+    else()
+      message (STATUS "Configuring library: ${lib} ...")
+    endif()
+  
+    find_package( ${lib} )
+   
+    if ( ${vlib}_FOUND ) 
+      if ( CGAL_ENABLE_PRECONFIG )
+        message( STATUS "${lib} has been preconfigured:") 
+        message( STATUS "  Use${lib}-file:      ${${vlib}_USE_FILE}") 
+        message( STATUS "  ${lib} include:      ${${vlib}_INCLUDE_DIR}" )
+        message( STATUS "  ${lib} libraries:    ${${vlib}_LIBRARIES}" )
+        message( STATUS "  ${lib} definitions:  ${${vlib}_DEFINITIONS}" )
+      else() 
+        message( STATUS "${lib} has been configured") 
+        use_lib( ${vlib} ${${vlib}_USE_FILE})
+      endif()
+   
+      # TODO EBEB what about Qt5, zlib etc?
+      set ( CGAL_USE_${vlib} TRUE )
+
+
+      # Part 2: Add some lib-specific definitions or obtain version
+   
+      if (${lib} STREQUAL "GMP") 
+        get_dependency_version(GMP)
+      endif()
+
+      if (${lib} STREQUAL "MPFR") 
+        set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
+        set( MPFR_DEPENDENCY_LIBRARIES   ${GMP_LIBRARIES} )
+        get_dependency_version(MPFR)
+      endif()
+
+      if (${lib} STREQUAL "LEDA") 
+        # special case for LEDA - add a flag
+        message( STATUS "LEDA cxx flags:   ${LEDA_CXX_FLAGS}" )
+        uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} )
+      endif()
+
+    else() 
+   
+      if ("${POSITION}" STRGREATER "-1") # if lib is essential
+        message( FATAL_ERROR "CGAL requires ${lib} to be found" )
+      endif()
+
+    endif()
+
+  endif()
+
+endforeach()
+
+if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) )
+  message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.")
+endif()
+
+if( NOT GMP_FOUND )
+  set(CGAL_NO_CORE ON)
+  message( STATUS "CGAL_Core needs GMP, cannot be configured.")
+endif( NOT GMP_FOUND )
+
+# finally setup Boost
+include(CGAL_SetupBoost)
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupFlags.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupFlags.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_SetupFlags.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupFlags.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupVLD.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupVLD.cmake
new file mode 100644
index 0000000..c3ed7d2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_SetupVLD.cmake
@@ -0,0 +1,37 @@
+function(CGAL_setupVLD)
+
+  if(DEFINED ENV{CGAL_ENABLE_VLD} AND NOT DEFINED CGAL_ENABLE_VLD)
+    set(CGAL_ENABLE_VLD $ENV{CGAL_ENABLE_VLD})
+  endif()
+
+  if(CGAL_ENABLE_VLD)
+    find_path(VLD_INCLUDE_DIR vld.h
+      HINTS $ENV{VLD_INCLUDE_DIR}
+            $ENV{VLD_HOME}/include
+            $ENV{VLD_HOME}
+      DOC "Path of the Visual Leak Detector header vld.h"
+    )
+
+    find_library(VLD_LIBRARY
+      NAMES vld-x86 vld
+      HINTS ${VLD_LIBRARY_DIR}
+            $ENV{VLD_LIBRARY_DIR}
+            $ENV{VLD_HOME}/lib
+            $ENV{VLD_HOME}
+            ${VLD_INCLUDE_DIR}
+            ${VLD_INCLUDE_DIR}/lib
+      DOC "Path of the Visual Leak Detector library vld.lib"
+    )
+    if(VLD_LIBRARY)
+      get_filename_component(VLD_LIBRARY_DIR "${VLD_LIBRARY}" PATH CACHE)
+    endif()
+
+    if(VLD_INCLUDE_DIR AND VLD_LIBRARY_DIR)
+      set(VLD_FOUND 1 PARENT_SCOPE)
+      include_directories(${VLD_INCLUDE_DIR})
+      link_directories(${VLD_LIBRARY_DIR})
+      add_definitions(-DCGAL_ENABLE_VLD)
+    endif()
+
+  endif(CGAL_ENABLE_VLD)
+endfunction()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_TweakFindBoost.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_TweakFindBoost.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_TweakFindBoost.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_TweakFindBoost.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseBLAS.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseBLAS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseBLAS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseBLAS.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseLAPACK.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseLAPACK.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseLAPACK.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseLAPACK.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseLEDA.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseLEDA.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseLEDA.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseLEDA.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseMKL.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseMKL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseMKL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseMKL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseMPFI.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseMPFI.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseMPFI.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseMPFI.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseRS.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseRS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseRS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseRS.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseRS3.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseRS3.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseRS3.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseRS3.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/CGAL_UseTAUCS.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_UseTAUCS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/CGAL_UseTAUCS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/CGAL_UseTAUCS.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/CGAL_VersionUtils.cmake b/3rdparty/CGAL-4.8/cmake/modules/CGAL_VersionUtils.cmake
new file mode 100644
index 0000000..4ec40a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/CGAL_VersionUtils.cmake
@@ -0,0 +1,228 @@
+if ( NOT CGAL_VERSION_UTILS_FILE_INCLUDED )
+  set( CGAL_VERSION_UTILS_FILE_INCLUDED 1 )
+
+#  
+# Given a version string of the form "major.[minor.[patch.[tweak]]]"
+# decomposes it into components
+#
+macro( VERSION_DECOMPOSE v major minor patch tweak )
+
+  string(REPLACE "." ";" VERSION_DECOMPOSE_LIST ${v} )
+
+  list( LENGTH VERSION_DECOMPOSE_LIST VERSION_DECOMPOSE_LIST_LEN )
+  
+  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 0 )
+    list( GET VERSION_DECOMPOSE_LIST 0 ${major} )
+  else()
+    set ( ${major} -1 )
+  endif()  
+  
+  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 1 )
+    list( GET VERSION_DECOMPOSE_LIST 1 ${minor} )
+  else()
+    set ( ${minor} -1 )
+  endif()  
+  
+  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 2 )
+    list( GET VERSION_DECOMPOSE_LIST 2 ${patch} )
+  else()
+    set ( ${patch} -1 )
+  endif()  
+  
+  if ( VERSION_DECOMPOSE_LIST_LEN GREATER 3 )
+    list( GET VERSION_DECOMPOSE_LIST 3 ${tweak} )
+  else()
+    set ( ${tweak} -1 )
+  endif()  
+  
+endmacro()
+
+#  
+# Given two version string of the form "major.[minor.[patch.[tweak]]]"
+# returns TRUE if they are equal, FALSE otherwise.
+#
+macro( IS_VERSION_EQUAL a b r )
+
+  VERSION_DECOMPOSE( ${a} _IVE_a_major _IVE_a_minor _IVE_a_patch _IVE_a_tweak )
+  VERSION_DECOMPOSE( ${b} _IVE_b_major _IVE_b_minor _IVE_b_patch _IVE_b_tweak )
+  
+  set ( ${r} FALSE )  
+  
+  if ( _IVE_a_major EQUAL ${_IVE_b_major} )
+    if ( _IVE_a_minor EQUAL ${_IVE_b_minor} )
+      if ( _IVE_a_patch EQUAL ${_IVE_b_patch} )
+        if ( _IVE_a_tweak EQUAL ${_IVE_b_tweak} )
+          set ( ${r} TRUE )  
+        endif()  
+      endif()
+    endif()
+  endif()
+
+endmacro()
+
+#  
+# Given two version string of the form "major.[minor.[patch.[tweak]]]"
+# returns TRUE if the first is smaller than the second, FALSE otherwise.
+#
+macro( IS_VERSION_LESS a b r )
+
+  VERSION_DECOMPOSE( ${a} _IVL_a_major _IVL_a_minor _IVL_a_patch _IVL_a_tweak )
+  VERSION_DECOMPOSE( ${b} _IVL_b_major _IVL_b_minor _IVL_b_patch _IVL_b_tweak )
+  
+  set ( ${r} FALSE )  
+  
+  if ( _IVL_a_major LESS ${_IVL_b_major} )
+    set ( ${r} TRUE )  
+  elseif( _IVL_a_major EQUAL ${_IVL_b_major})  
+    if ( _IVL_a_minor LESS ${_IVL_b_minor} )
+      set ( ${r} TRUE )  
+    elseif( _IVL_a_minor EQUAL ${_IVL_b_minor} )  
+      if ( _IVL_a_patch LESS ${_IVL_b_patch} )
+        set ( ${r} TRUE )  
+      elseif( _IVL_a_patch EQUAL ${_IVL_b_patch} )   
+        if ( _IVL_a_tweak LESS ${_IVL_b_tweak} )
+          set ( ${r} TRUE )  
+        endif()  
+      endif()
+    endif()
+  endif()
+
+endmacro()
+
+#  
+# Given two version string of the form "major.[minor.[patch.[tweak]]]"
+# returns TRUE if the first is greater than the second, FALSE otherwise.
+#
+macro( IS_VERSION_GREATER a b r )
+
+  IS_VERSION_LESS( ${a} ${b} _IVG_less )
+  
+  if ( _IVG_less )
+    set( ${r} FALSE )
+  else()
+  
+    IS_VERSION_EQUAL( ${a} ${b} _IVG_eq )
+    
+    if ( _IVG_eq )
+      set( ${r} FALSE )
+    else()
+      set( ${r} TRUE )
+    endif()
+    
+  endif()  
+  
+endmacro()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+#                                    -= TESTING =-
+#
+
+
+macro ( TEST_VERSION_DECOMPOSE v expected_major expected_minor expected_patch expected_tweak )
+
+  VERSION_DECOMPOSE( ${v} major minor patch tweak )
+  
+  set ( OK 0 )
+  
+  if ( major EQUAL "${expected_major}" )
+    if ( minor EQUAL "${expected_minor}" )  
+      if ( patch EQUAL "${expected_patch}" ) 
+        if ( tweak EQUAL "${expected_tweak}" ) 
+          set ( OK 1 )
+        endif()  
+      endif()  
+    endif()  
+  endif()  
+
+  if ( OK )
+    message( STATUS "correct - ${v} -> ${major}, ${minor}, ${patch}, ${tweak} " ) 
+  else()
+    message( STATUS "FAILED  - ${v} -> ${major}, ${minor}, ${patch}, ${tweak} " ) 
+  endif()
+  
+endmacro()
+
+macro ( TEST_VERSION_COMPARISON op v0 v1 expected )
+
+  if ( "${op}" STREQUAL "<" )
+    IS_VERSION_LESS( ${v0} ${v1} result )
+  elseif ( "${op}" STREQUAL ">" )
+    IS_VERSION_GREATER( ${v0} ${v1} result )
+  else()
+    IS_VERSION_EQUAL( ${v0} ${v1} result )
+  endif()  
+  
+  if ( result STREQUAL ${expected} )
+    message( STATUS "correct - ${v0} ${op} ${v1} => ${result}" )   
+  else()
+    message( STATUS "FAILED  - ${v0} ${op} ${v1} => ${result}" ) 
+  endif()
+
+endmacro()
+
+if ( UNIT_TEST_VERSION_UTILS )
+
+  TEST_VERSION_DECOMPOSE("1.2.3.4" 1 2 3 4 )
+  TEST_VERSION_DECOMPOSE("1.2.3" 1 2 3 -1 )
+  TEST_VERSION_DECOMPOSE("1.2" 1 2 -1 -1 )
+  TEST_VERSION_DECOMPOSE("1" 1 -1 -1 -1 )
+  
+  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3.4" TRUE )
+  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2.3"   TRUE )
+  TEST_VERSION_COMPARISON( "==" "1.2"     "1.2"     TRUE )
+  TEST_VERSION_COMPARISON( "==" "1"       "1"       TRUE )
+  
+  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3"  FALSE )
+  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2"    FALSE )
+  TEST_VERSION_COMPARISON( "==" "1.2"     "1"      FALSE )
+  
+  TEST_VERSION_COMPARISON( "==" "1.2.3.4" "1.2.3.5" FALSE )
+  TEST_VERSION_COMPARISON( "==" "1.2.3"   "1.2.4"   FALSE )
+  TEST_VERSION_COMPARISON( "==" "1.2"     "1.3"     FALSE )
+  TEST_VERSION_COMPARISON( "==" "1"       "2"       FALSE )
+  
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.3.4" FALSE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3"   "1.2.3"   FALSE )
+  TEST_VERSION_COMPARISON( "<" "1.2"     "1.2"     FALSE )
+  TEST_VERSION_COMPARISON( "<" "1"       "1"       FALSE )
+  
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.3.5" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.4.5" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.3.4.5" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "2.3.4.5" TRUE )
+  
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.2.4" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "1.3"   TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.3.4" "2"     TRUE )
+  
+  TEST_VERSION_COMPARISON( "<" "1.2.3" "1.2.4" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2"   "1.3"   TRUE )
+  TEST_VERSION_COMPARISON( "<" "1"     "2"     TRUE )
+  
+  TEST_VERSION_COMPARISON( "<" "1.2.3.6" "1.2.4.5" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.2.5.6" "1.3.4.5" TRUE )
+  TEST_VERSION_COMPARISON( "<" "1.4.5.6" "2.3.4.5" TRUE )
+
+  TEST_VERSION_COMPARISON( ">" "1.2.3.4" "1.2.3.4" FALSE )
+  TEST_VERSION_COMPARISON( ">" "1.2.3"   "1.2.3"   FALSE )
+  TEST_VERSION_COMPARISON( ">" "1.2"     "1.2"     FALSE )
+  TEST_VERSION_COMPARISON( ">" "1"       "1"       FALSE )
+  
+  TEST_VERSION_COMPARISON( ">" "1.2.3.5" "1.2.3.4" TRUE )
+  
+endif()
+
+endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindBLAS.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindBLAS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindBLAS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindBLAS.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/FindCGAL.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindCGAL.cmake
new file mode 100644
index 0000000..f09b28c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/FindCGAL.cmake
@@ -0,0 +1,89 @@
+#
+# The following module is based on FindVTK.cmake
+#
+
+# - Find a CGAL installation or binary tree.
+# The following variables are set if CGAL is found.  If CGAL is not
+# found, CGAL_FOUND is set to false.
+#
+#  CGAL_FOUND         - Set to true when CGAL is found.
+#  CGAL_USE_FILE      - CMake file to use CGAL.
+#
+
+# Construct consitent error messages for use below.
+set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
+set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")
+ 
+if ( NOT CGAL_DIR )
+  
+  # Get the system search path as a list.
+  if(UNIX)
+    string(REGEX MATCHALL "[^:]+" CGAL_DIR_SEARCH1 "$ENV{PATH}")
+  else()
+    string(REGEX REPLACE "\\\\" "/" CGAL_DIR_SEARCH1 "$ENV{PATH}")
+  endif()
+  
+  string(REGEX REPLACE "/;" ";" CGAL_DIR_SEARCH2 "${CGAL_DIR_SEARCH1}")
+
+  # Construct a set of paths relative to the system search path.
+  set(CGAL_DIR_SEARCH "")
+  
+  foreach(dir ${CGAL_DIR_SEARCH2})
+  
+    set(CGAL_DIR_SEARCH ${CGAL_DIR_SEARCH} ${dir}/../lib/CGAL )
+      
+  endforeach()
+
+
+  #
+  # Look for an installation or build tree.
+  #
+  find_path(CGAL_DIR CGALConfig.cmake
+
+    # Look for an environment variable CGAL_DIR.
+    $ENV{CGAL_DIR}
+
+    # Look in places relative to the system executable search path.
+    ${CGAL_DIR_SEARCH}
+
+    # Look in standard UNIX install locations.
+    /usr/local/lib/CGAL
+    /usr/lib/CGAL
+
+    # Read from the CMakeSetup registry entries.  It is likely that
+    # CGAL will have been recently built.
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
+    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
+
+    # Help the user find it if we cannot.
+    DOC "The ${CGAL_DIR_DESCRIPTION}"
+  )
+  
+endif()
+
+if ( CGAL_DIR )
+  
+  if ( EXISTS "${CGAL_DIR}/CGALConfig.cmake" )
+    include( "${CGAL_DIR}/CGALConfig.cmake" )
+    set( CGAL_FOUND TRUE )
+  endif()
+
+endif()
+
+if( NOT CGAL_FOUND)
+  if(CGAL_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR ${CGAL_DIR_MESSAGE})
+  else()
+    if(NOT CGAL_FIND_QUIETLY)
+      MESSAGE(STATUS ${CGAL_DIR_MESSAGE})
+    endif()
+  endif()
+endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindCGAL_CORE.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindCGAL_CORE.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindCGAL_CORE.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindCGAL_CORE.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindCORE.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindCORE.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindCORE.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindCORE.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindESBTL.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindESBTL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindESBTL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindESBTL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindEigen3.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindEigen3.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindEigen3.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindEigen3.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindF2C.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindF2C.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindF2C.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindF2C.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/FindGLEW.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindGLEW.cmake
new file mode 100644
index 0000000..43d2de7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/FindGLEW.cmake
@@ -0,0 +1,108 @@
+# Copyright (c) 2009 Boudewijn Rempt <boud at valdyas.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+# - try to find glew library and include files
+#  GLEW_INCLUDE_DIR, where to find GL/glew.h, etc.
+#  GLEW_LIBRARIES, the libraries to link against
+#  GLEW_FOUND, If false, do not try to use GLEW.
+# Also defined, but not for general use are:
+#  GLEW_GLEW_LIBRARY = the full path to the glew library.
+
+IF (WIN32)
+
+  IF(CYGWIN)
+
+    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h)
+
+    FIND_LIBRARY( GLEW_GLEW_LIBRARY glew32
+      ${OPENGL_LIBRARY_DIR}
+      /usr/lib/w32api
+      /usr/X11R6/lib
+    )
+
+
+  ELSE(CYGWIN)
+
+    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
+      $ENV{GLEW_ROOT_PATH}/include
+    )
+
+    FIND_LIBRARY( GLEW_GLEW_LIBRARY
+      NAMES glew glew32
+      PATHS
+      $ENV{GLEW_ROOT_PATH}/lib
+      ${OPENGL_LIBRARY_DIR}
+    )
+
+  ENDIF(CYGWIN)
+
+ELSE (WIN32)
+
+  IF (APPLE)
+# These values for Apple could probably do with improvement.
+    FIND_PATH( GLEW_INCLUDE_DIR glew.h
+      /System/Library/Frameworks/GLEW.framework/Versions/A/Headers
+      ${OPENGL_LIBRARY_DIR}
+    )
+    SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
+    SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
+  ELSE (APPLE)
+
+    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
+      /usr/include
+      /usr/include/GL
+      /usr/openwin/share/include
+      /usr/openwin/include
+      /usr/X11R6/include
+      /usr/include/X11
+      /opt/graphics/OpenGL/include
+      /opt/graphics/OpenGL/contrib/libglew
+    )
+
+    FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
+      /usr/openwin/lib
+      /usr/X11R6/lib
+      /usr/lib
+      /usr/lib/x86_64-linux-gnu
+    )
+
+  ENDIF (APPLE)
+
+ENDIF (WIN32)
+
+SET( GLEW_FOUND "NO" )
+IF(GLEW_INCLUDE_DIR)
+  IF(GLEW_GLEW_LIBRARY)
+    # Is -lXi and -lXmu required on all platforms that have it?
+    # If not, we need some way to figure out what platform we are on.
+    SET( GLEW_LIBRARIES
+      ${GLEW_GLEW_LIBRARY}
+      ${GLEW_cocoa_LIBRARY}
+    )
+    SET( GLEW_FOUND "YES" )
+
+#The following deprecated settings are for backwards compatibility with CMake1.4
+    SET (GLEW_LIBRARY ${GLEW_LIBRARIES})
+    SET (GLEW_INCLUDE_PATH ${GLEW_INCLUDE_DIR})
+
+  ENDIF(GLEW_GLEW_LIBRARY)
+ENDIF(GLEW_INCLUDE_DIR)
+
+IF(GLEW_FOUND)
+  IF(NOT GLEW_FIND_QUIETLY)
+    MESSAGE(STATUS "Found Glew: ${GLEW_LIBRARIES}")
+  ENDIF(NOT GLEW_FIND_QUIETLY)
+ELSE(GLEW_FOUND)
+  IF(GLEW_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find Glew")
+  ENDIF(GLEW_FIND_REQUIRED)
+ENDIF(GLEW_FOUND)
+
+MARK_AS_ADVANCED(
+  GLEW_INCLUDE_DIR
+  GLEW_GLEW_LIBRARY
+  GLEW_Xmu_LIBRARY
+  GLEW_Xi_LIBRARY
+)
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindGMP.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindGMP.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindGMP.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindGMP.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindGMPXX.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindGMPXX.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindGMPXX.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindGMPXX.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindIPE.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindIPE.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindIPE.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindIPE.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindLAPACK.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindLAPACK.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindLAPACK.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindLAPACK.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindLEDA.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindLEDA.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindLEDA.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindLEDA.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindMKL.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindMKL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindMKL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindMKL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindMPFI.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindMPFI.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindMPFI.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindMPFI.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindMPFR.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindMPFR.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindMPFR.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindMPFR.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindNTL.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindNTL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindNTL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindNTL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindOpenGL.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindOpenGL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindOpenGL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindOpenGL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindOpenMesh.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindOpenMesh.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindOpenMesh.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindOpenMesh.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/FindQGLViewer.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindQGLViewer.cmake
new file mode 100644
index 0000000..e769d9e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/FindQGLViewer.cmake
@@ -0,0 +1,75 @@
+# - Try to find QGLViewer
+# Once done this will define
+#
+#  QGLVIEWER_FOUND - system has QGLViewer
+#  QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
+#  QGLVIEWER_LIBRARIES - Link these to use QGLViewer
+#  QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
+#
+
+# first look in user defined locations
+find_path(QGLVIEWER_INCLUDE_DIR
+          NAMES QGLViewer/qglviewer.h
+          NO_DEFAULT_PATH
+          PATHS ENV QGLVIEWERROOT
+                /usr/local/include
+         )
+
+find_library(QGLVIEWER_LIBRARY_RELEASE
+             NAMES qglviewer-qt5 qglviewer QGLViewer-qt5 QGLViewer QGLViewer2-qt5 QGLViewer2
+             NO_DEFAULT_PATH
+             PATHS ENV QGLVIEWERROOT
+                   ENV LD_LIBRARY_PATH
+                   ENV LIBRARY_PATH
+                   /usr/local/lib
+             PATH_SUFFIXES QGLViewer QGLViewer/release
+            )
+
+find_library(QGLVIEWER_LIBRARY_DEBUG
+             NAMES dqglviewer dQGLViewer-qt5 dQGLViewer dQGLViewer2-qt5 dQGLViewer2 QGLViewerd2-qt5 QGLViewerd2
+             NO_DEFAULT_PATH
+             PATHS /usr/local/lib
+                   ENV QGLVIEWERROOT
+                   ENV LD_LIBRARY_PATH
+                   ENV LIBRARY_PATH
+             PATH_SUFFIXES QGLViewer QGLViewer/debug
+            )
+
+#now try the standard paths
+if (NOT QGLVIEWER_INCLUDE_DIR OR NOT QGLVIEWER_LIBRARY_RELEASE OR NOT QGLVIEWER_LIBRARY_DEBUG)
+find_path(QGLVIEWER_INCLUDE_DIR
+          NAMES QGLViewer/qglviewer.h)
+
+find_library(QGLVIEWER_LIBRARY_RELEASE
+             NAMES qglviewer-qt5 qglviewer QGLViewer-qt5 QGLViewer QGLViewer2-qt5 QGLViewer2)
+
+find_library(QGLVIEWER_LIBRARY_DEBUG
+             NAMES dqglviewer dQGLViewer-qt5 dQGLViewer dQGLViewer2-qt5 dQGLViewer2 QGLViewerd2-qt5 QGLViewerd2)
+
+endif()
+
+if(QGLVIEWER_LIBRARY_RELEASE)
+  if(QGLVIEWER_LIBRARY_DEBUG)
+    set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
+  else()
+    set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE})
+  endif()
+
+  set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library")
+
+endif()
+
+IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+   SET(QGLVIEWER_FOUND TRUE)
+ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+
+IF(QGLVIEWER_FOUND)
+  IF(NOT QGLViewer_FIND_QUIETLY)
+    MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}")
+  ENDIF(NOT QGLViewer_FIND_QUIETLY)
+ELSE(QGLVIEWER_FOUND)
+  IF(QGLViewer_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find QGLViewer")
+  ENDIF(QGLViewer_FIND_REQUIRED)
+ENDIF(QGLVIEWER_FOUND)
+
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindRS.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindRS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindRS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindRS.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindRS3.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindRS3.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindRS3.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindRS3.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/FindTAUCS.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindTAUCS.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/FindTAUCS.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/FindTAUCS.cmake
diff --git a/3rdparty/CGAL-4.8/cmake/modules/FindTBB.cmake b/3rdparty/CGAL-4.8/cmake/modules/FindTBB.cmake
new file mode 100644
index 0000000..a29c6d9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/FindTBB.cmake
@@ -0,0 +1,433 @@
+# Locate Intel Threading Building Blocks include paths and libraries
+# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
+# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
+# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
+#   Florian Uhlig <F.Uhlig _at_ gsi.de>,
+#   Jiri Marsik <jiri.marsik89 _at_ gmail.com>
+
+# The MIT License
+#
+# Copyright (c) 2011 Hannes Hofmann
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
+#   e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
+#   TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
+#   in the TBB installation directory (TBB_INSTALL_DIR).
+#
+# GvdB: Mac OS X distribution places libraries directly in lib directory.
+#
+# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
+# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
+#   which architecture to use
+# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
+#   which compiler to use (detected automatically on Windows)
+
+# This module respects
+# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
+
+# This module defines
+# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
+# TBB_LIBRARY_DIRS, where to find TBB libraries
+# TBB_INSTALL_DIR, the base TBB install directory.
+# TBB_LIBRARIES, all the following TBB libraries (both release and debug versions, using "optimized" and "debug" CMake keywords). Note that if the debug versions are not found, the release versions will be used instead for the debug mode.
+#   TBB_RELEASE_LIBRARY, the TBB release library
+#   TBB_MALLOC_RELEASE_LIBRARY, the TBB release malloc library
+#   TBB_DEBUG_LIBRARY, the TBB debug library
+#   TBB_MALLOC_DEBUG_LIBRARY, the TBB debug malloc library
+# TBB_FOUND, If false, don't try to use TBB.
+# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
+# TBB_MALLOCPROXY_DEBUG_LIBRARY, the TBB debug malloc_proxy library (not included in TBB_LIBRARIES since it's optionnal)
+# TBB_MALLOCPROXY_RELEASE_LIBRARY, the TBB release malloc_proxy library (not included in TBB_LIBRARIES since it's optionnal)
+
+include(CheckCXXSourceCompiles)
+
+# Usage:
+#   try_TBB_with_pthread(<result_var_name> [additional linker args...])
+function(try_TBB_with_pthread result_var)
+    set(TBB_try_ts_source "
+          #include <tbb/enumerable_thread_specific.h>
+          int main() {
+            tbb::enumerable_thread_specific<
+              bool*,
+              tbb::cache_aligned_allocator<bool*>,
+              tbb::ets_key_per_instance> grid;
+          }
+          ")
+    set(CMAKE_REQUIRED_LIBRARIES ${ALL_TBB_LIBRARIES} ${ARGN})
+    set(CMAKE_REQUIRED_INCLUDES ${TBB_INCLUDE_DIR})
+    check_cxx_source_compiles("${TBB_try_ts_source}" ${result_var})
+    set(${result_var} ${${result_var}} PARENT_SCOPE)
+endfunction(try_TBB_with_pthread)
+
+if (WIN32)
+    # has em64t/vc8 em64t/vc9
+    # has ia32/vc7.1 ia32/vc8 ia32/vc9
+    set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
+    set(_TBB_LIB_RELEASE_NAME "tbb")
+    set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
+    set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
+    set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
+    set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
+    set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
+    if (MSVC71)
+        set (_TBB_COMPILER "vc7.1")
+    endif(MSVC71)
+    if (MSVC80)
+        set(_TBB_COMPILER "vc8")
+    endif(MSVC80)
+    if (MSVC90)
+        set(_TBB_COMPILER "vc9")
+    endif(MSVC90)
+    if(MSVC10)
+        set(_TBB_COMPILER "vc10")
+    endif(MSVC10)
+    if(MSVC11)
+        set(_TBB_COMPILER "vc11")
+    endif(MSVC11)
+    if(MSVC12)
+	set(_TBB_COMPILER "vc12")
+    endif(MSVC12)
+    #note there was no MSVC13
+    if(MSVC14)
+	if(RUNNING_CGAL_AUTO_TEST)
+	    set (TBB_FOUND "NO")
+	    return()#binaries for TBB not publicly available when CGAL-4.7 is published
+	endif(RUNNING_CGAL_AUTO_TEST)
+	message(STATUS "[Warning] FindTBB.cmake: TBB 4.4 (latest available when CGAL-4.7 is published) does not provide support for MSVC 2015.")
+    endif(MSVC14)
+    # Todo: add other Windows compilers such as ICL.
+    set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
+endif (WIN32)
+
+if (UNIX)
+    if (APPLE)
+        # MAC
+        set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
+        # libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
+        set(_TBB_LIB_RELEASE_NAME "tbb")
+        set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
+        #set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
+        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
+        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
+        #set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
+        # default flavor on apple: ia32/cc4.0.1_os10.4.9
+        # Jiri: There is no reason to presume there is only one flavor and
+        #       that user's setting of variables should be ignored.
+        if(NOT TBB_COMPILER)
+            set(_TBB_COMPILER "cc4.0.1_os10.4.9")
+        elseif (NOT TBB_COMPILER)
+            set(_TBB_COMPILER ${TBB_COMPILER})
+        endif(NOT TBB_COMPILER)
+        if(NOT TBB_ARCHITECTURE)
+            set(_TBB_ARCHITECTURE "ia32")
+        elseif(NOT TBB_ARCHITECTURE)
+            set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
+        endif(NOT TBB_ARCHITECTURE)
+    else (APPLE)
+        # LINUX
+        set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
+        set(_TBB_LIB_RELEASE_NAME "tbb")
+        set(_TBB_LIB_MALLOC_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc")
+        set(_TBB_LIB_MALLOCPROXY_RELEASE_NAME "${_TBB_LIB_RELEASE_NAME}malloc_proxy")
+        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_RELEASE_NAME}_debug")
+        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_RELEASE_NAME}_debug")
+        set(_TBB_LIB_MALLOCPROXY_DEBUG_NAME "${_TBB_LIB_MALLOCPROXY_RELEASE_NAME}_debug")
+        # has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
+        # has ia32/*
+        # has itanium/*
+        set(_TBB_COMPILER ${TBB_COMPILER})
+        set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
+    endif (APPLE)
+endif (UNIX)
+
+if (CMAKE_SYSTEM MATCHES "SunOS.*")
+# SUN
+# not yet supported
+# has em64t/cc3.4.3_kernel5.10
+# has ia32/*
+endif (CMAKE_SYSTEM MATCHES "SunOS.*")
+
+
+#-- Clear the public variables
+set (TBB_FOUND "NO")
+
+
+#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
+# first: use CMake variable TBB_INSTALL_DIR
+if (TBB_INSTALL_DIR)
+    set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
+endif (TBB_INSTALL_DIR)
+# second: use environment variable
+if (NOT _TBB_INSTALL_DIR)
+    if (NOT "$ENV{TBBROOT}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBBROOT})
+    endif (NOT "$ENV{TBBROOT}" STREQUAL "")
+    if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
+    endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
+    # Intel recommends setting TBB21_INSTALL_DIR
+    if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
+    endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
+    if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
+    endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
+    if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
+    endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
+endif (NOT _TBB_INSTALL_DIR)
+# third: try to find path automatically
+if (NOT _TBB_INSTALL_DIR)
+    if (_TBB_DEFAULT_INSTALL_DIR)
+        set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
+    endif (_TBB_DEFAULT_INSTALL_DIR)
+endif (NOT _TBB_INSTALL_DIR)
+# sanity check
+if (NOT _TBB_INSTALL_DIR)
+    message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
+else (NOT _TBB_INSTALL_DIR)
+# finally: set the cached CMake variable TBB_INSTALL_DIR
+if (NOT TBB_INSTALL_DIR)
+    set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
+    mark_as_advanced(TBB_INSTALL_DIR)
+endif (NOT TBB_INSTALL_DIR)
+
+
+#-- A macro to rewrite the paths of the library. This is necessary, because
+#   find_library() always found the em64t/vc9 version of the TBB libs
+macro(TBB_CORRECT_LIB_DIR var_name)
+#    if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
+        string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
+#    endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
+    string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
+    string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc11 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+endmacro(TBB_CORRECT_LIB_DIR var_content)
+
+
+#-- Look for include directory and set ${TBB_INCLUDE_DIR}
+set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
+# Jiri: tbbvars now sets the CPATH environment variable to the directory
+#       containing the headers.
+#  LR: search first with NO_DEFAULT_PATH...
+find_path(TBB_INCLUDE_DIR
+    tbb/task_scheduler_init.h
+    PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
+    NO_DEFAULT_PATH
+)
+if(NOT TBB_INCLUDE_DIR)
+#  LR: ... and then search again with NO_DEFAULT_PATH if nothing was found in
+#  hinted paths
+  find_path(TBB_INCLUDE_DIR
+      tbb/task_scheduler_init.h
+      PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
+  )
+endif()
+mark_as_advanced(TBB_INCLUDE_DIR)
+
+
+#-- Look for libraries
+# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
+if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
+    set (_TBB_LIBRARY_DIR
+         ${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
+         ${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
+        )
+endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
+# Jiri: This block isn't mutually exclusive with the previous one
+#       (hence no else), instead I test if the user really specified
+#       the variables in question.
+if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
+    # HH: deprecated
+    message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
+    # Jiri: It doesn't hurt to look in more places, so I store the hints from
+    #       ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
+    #       variables and search them both.
+    set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
+endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
+
+# GvdB: Mac OS X distribution places libraries directly in lib directory.
+list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
+
+# Jiri: No reason not to check the default paths. From recent versions,
+#       tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
+#       variables, which now point to the directories of the lib files.
+#       It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
+#       argument instead of the implicit PATHS as it isn't hard-coded
+#       but computed by system introspection. Searching the LIBRARY_PATH
+#       and LD_LIBRARY_PATH environment variables is now even more important
+#       that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
+#       the use of TBB built from sources.
+#  LR: search first with NO_DEFAULT_PATH...
+find_library(TBB_RELEASE_LIBRARY ${_TBB_LIB_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+find_library(TBB_MALLOC_RELEASE_LIBRARY ${_TBB_LIB_MALLOC_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+find_library(TBB_MALLOCPROXY_RELEASE_LIBRARY ${_TBB_LIB_MALLOCPROXY_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+if(NOT TBB_RELEASE_LIBRARY OR NOT TBB_MALLOC_RELEASE_LIBRARY OR NOT TBB_MALLOCPROXY_RELEASE_LIBRARY)
+# LR: ... and then search again with NO_DEFAULT_PATH if nothing was found
+#  in hinted paths
+    find_library(TBB_RELEASE_LIBRARY ${_TBB_LIB_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+    find_library(TBB_MALLOC_RELEASE_LIBRARY ${_TBB_LIB_MALLOC_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+    find_library(TBB_MALLOCPROXY_RELEASE_LIBRARY ${_TBB_LIB_MALLOCPROXY_RELEASE_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+endif()
+
+#Extract path from TBB_RELEASE_LIBRARY name
+get_filename_component(TBB_RELEASE_LIBRARY_DIR ${TBB_RELEASE_LIBRARY} PATH)
+
+#TBB_CORRECT_LIB_DIR(TBB_RELEASE_LIBRARY)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOC_RELEASE_LIBRARY)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOCPROXY_RELEASE_LIBRARY)
+mark_as_advanced(TBB_RELEASE_LIBRARY TBB_MALLOC_RELEASE_LIBRARY TBB_MALLOCPROXY_RELEASE_LIBRARY)
+
+#-- Look for debug libraries
+# Jiri: Changed the same way as for the release libraries.
+find_library(TBB_DEBUG_LIBRARY ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+find_library(TBB_MALLOC_DEBUG_LIBRARY ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+find_library(TBB_MALLOCPROXY_DEBUG_LIBRARY ${_TBB_LIB_MALLOCPROXY_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+if(NOT TBB_DEBUG_LIBRARY OR NOT TBB_MALLOC_DEBUG_LIBRARY OR NOT TBB_MALLOCPROXY_DEBUG_LIBRARY)
+    find_library(TBB_DEBUG_LIBRARY ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+    find_library(TBB_MALLOC_DEBUG_LIBRARY ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+    find_library(TBB_MALLOCPROXY_DEBUG_LIBRARY ${_TBB_LIB_MALLOCPROXY_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+            PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+endif()
+
+# Jiri: Self-built TBB stores the debug libraries in a separate directory.
+#       Extract path from TBB_DEBUG_LIBRARY name
+get_filename_component(TBB_DEBUG_LIBRARY_DIR ${TBB_DEBUG_LIBRARY} PATH)
+
+#TBB_CORRECT_LIB_DIR(TBB_DEBUG_LIBRARY)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOC_DEBUG_LIBRARY)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOCPROXY_DEBUG_LIBRARY)
+mark_as_advanced(TBB_DEBUG_LIBRARY TBB_MALLOC_DEBUG_LIBRARY TBB_MALLOCPROXY_DEBUG_LIBRARY)
+
+if (TBB_INCLUDE_DIR)
+    if (TBB_RELEASE_LIBRARY)
+        set (TBB_FOUND "YES")
+
+        # NOTE: Removed because we don't want to link with the malloc_proxy by default
+        #if (NOT "${TBB_MALLOCPROXY_RELEASE_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_RELEASE_LIBRARY-NOTFOUND")
+        #    mark_as_advanced(TBB_MALLOCPROXY_RELEASE_LIBRARY)
+        #    set (_TBB_MALLOCPROXY optimized ${TBB_MALLOCPROXY_RELEASE_LIBRARY})
+        #endif (NOT "${TBB_MALLOCPROXY_RELEASE_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_RELEASE_LIBRARY-NOTFOUND")
+        #if (NOT "${TBB_MALLOCPROXY_DEBUG_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_DEBUG_LIBRARY-NOTFOUND")
+        #    mark_as_advanced(TBB_MALLOCPROXY_DEBUG_LIBRARY)
+        #    set (_TBB_MALLOCPROXY ${_TBB_MALLOCPROXY} debug ${TBB_MALLOCPROXY_DEBUG_LIBRARY})
+        #endif (NOT "${TBB_MALLOCPROXY_DEBUG_LIBRARY}" STREQUAL "TBB_MALLOCPROXY_DEBUG_LIBRARY-NOTFOUND")
+
+        # TBB release library
+        set (ALL_TBB_LIBRARIES optimized ${TBB_RELEASE_LIBRARY})
+
+        # TBB debug library found?
+        if (TBB_DEBUG_LIBRARY)
+            list(APPEND ALL_TBB_LIBRARIES debug ${TBB_DEBUG_LIBRARY})
+        else (TBB_DEBUG_LIBRARY)
+            # Otherwise, link with the release library even in debug mode
+            list(APPEND ALL_TBB_LIBRARIES debug ${TBB_RELEASE_LIBRARY})
+        endif (TBB_DEBUG_LIBRARY)
+
+        # TBB malloc - release
+        if (TBB_MALLOC_RELEASE_LIBRARY)
+            list(APPEND ALL_TBB_LIBRARIES optimized ${TBB_MALLOC_RELEASE_LIBRARY})
+
+            # TBB malloc - debug
+            if (TBB_MALLOC_DEBUG_LIBRARY)
+                list(APPEND ALL_TBB_LIBRARIES debug ${TBB_MALLOC_DEBUG_LIBRARY})
+            else (TBB_MALLOC_DEBUG_LIBRARY)
+                list(APPEND ALL_TBB_LIBRARIES debug ${TBB_MALLOC_RELEASE_LIBRARY})
+            endif (TBB_MALLOC_DEBUG_LIBRARY)
+        endif (TBB_MALLOC_RELEASE_LIBRARY)
+
+        if(UNIX AND NOT APPLE)
+            # On Fedora, code using TBB might need -pthread
+
+            # First check without pthread
+            try_TBB_with_pthread(TBB_without_pthread)
+
+            if(NOT TBB_without_pthread)
+                # Then check with -pthread
+                try_TBB_with_pthread(TBB_with_pthread -pthread)
+                if(TBB_with_pthread)
+                    list(APPEND ALL_TBB_LIBRARIES general -pthread)
+                endif(TBB_with_pthread)
+                endif(NOT TBB_without_pthread)
+        endif(UNIX AND NOT APPLE)
+
+        set (TBB_LIBRARIES ${ALL_TBB_LIBRARIES}
+             CACHE PATH "TBB libraries" FORCE)
+
+        # Include dirs
+        set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
+
+        # Library dirs
+        if( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
+            set (TBB_LIBRARY_DIRS
+                ${TBB_RELEASE_LIBRARY_DIR}
+                CACHE PATH "TBB library directories" FORCE)
+        else( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
+            set (TBB_LIBRARY_DIRS
+                ${TBB_RELEASE_LIBRARY_DIR} ${TBB_DEBUG_LIBRARY_DIR}
+                CACHE PATH "TBB library directories" FORCE)
+        endif( "${TBB_DEBUG_LIBRARY_DIR}" STREQUAL "" OR "${TBB_RELEASE_LIBRARY_DIR}" STREQUAL "${TBB_DEBUG_LIBRARY_DIR}" )
+
+        message(STATUS "Found Intel TBB")
+    endif (TBB_RELEASE_LIBRARY)
+endif (TBB_INCLUDE_DIR)
+
+if (NOT TBB_FOUND)
+    if(NOT TBB_FIND_QUIETLY)
+        message("ERROR: Intel TBB NOT found! Please define the TBBROOT (or TBB_INSTALL_DIR) and/or TBB_ARCH_PLATFORM environment variables.")
+        message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
+    endif(NOT TBB_FIND_QUIETLY)
+    SET(TBB_INSTALL_DIR "TBB_INSTALL_DIR_NOT_FOUND" CACHE STRING "Intel TBB install directory")
+    # do only throw fatal, if this pkg is REQUIRED
+    if (TBB_FIND_REQUIRED)
+        message(FATAL_ERROR "Could NOT find TBB library.")
+    endif (TBB_FIND_REQUIRED)
+endif (NOT TBB_FOUND)
+
+endif (NOT _TBB_INSTALL_DIR)
+
+if (TBB_FOUND)
+    set(TBB_INTERFACE_VERSION 0)
+    FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
+    STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
+    set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
+endif (TBB_FOUND)
+
+set(TBB_USE_FILE "UseTBB")
+
+### ** Emacs settings **
+### Local Variables:
+### cmake-tab-width: 4
+### End:
diff --git a/3rdparty/CGAL-4.8/cmake/modules/UseCGAL.cmake b/3rdparty/CGAL-4.8/cmake/modules/UseCGAL.cmake
new file mode 100644
index 0000000..a3e5236
--- /dev/null
+++ b/3rdparty/CGAL-4.8/cmake/modules/UseCGAL.cmake
@@ -0,0 +1,60 @@
+#
+# UseCGAL.cmake can be included in a project to set the needed compiler and linker
+# settings to use CGAL in a program.
+#
+# The variables used here are defined in the CGALConfig.cmake generated when CGAL was installed.
+#
+#
+include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
+
+cgal_setup_module_path()
+
+if(NOT USE_CGAL_FILE_INCLUDED)
+  set(USE_CGAL_FILE_INCLUDED 1)
+
+  include(CGAL_Common)
+  include(CGAL_SetupFlags)
+  include(CGAL_GeneratorSpecificSettings)
+  include(CGAL_TweakFindBoost)
+
+  set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME})
+  set(CGAL_SCM_BRANCH_NAME "")
+
+  if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" )
+    include(CGAL_SCM)
+    if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" )
+      message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}" )
+      if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}")
+        message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider rebuilding CGAL from this branch.")
+      endif()
+    endif()
+  endif()
+
+  set( CGAL_LIBRARIES )
+
+  foreach ( component ${CGAL_REQUESTED_COMPONENTS} )
+    use_component( ${component} )
+  endforeach()
+
+  use_essential_libs()
+
+  include_directories( "${CMAKE_CURRENT_BINARY_DIR}" )
+
+  if(TARGET CGAL)
+    add_to_list( CGAL_LIBRARIES CGAL )
+  else()
+    add_to_list( CGAL_LIBRARIES ${CGAL_LIBRARY} )
+  endif()
+
+  #message (STATUS "LIB: ${CGAL_LIBRARY}")
+  #message (STATUS "LIBS: ${CGAL_LIBRARIES}")
+
+  include_directories ( ${CGAL_INCLUDE_DIRS})
+  include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
+  add_definitions     ( ${CGAL_3RD_PARTY_DEFINITIONS}  ${CGAL_DEFINITIONS}  )
+
+  link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
+  link_libraries      ( ${CGAL_LIBRARIES}     ${CGAL_3RD_PARTY_LIBRARIES}      )
+
+
+endif()
diff --git a/3rdparty/CGAL-4.6/cmake/modules/UseESBTL.cmake b/3rdparty/CGAL-4.8/cmake/modules/UseESBTL.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/UseESBTL.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/UseESBTL.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/UseEigen3.cmake b/3rdparty/CGAL-4.8/cmake/modules/UseEigen3.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/UseEigen3.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/UseEigen3.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/UseOpenMesh.cmake b/3rdparty/CGAL-4.8/cmake/modules/UseOpenMesh.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/UseOpenMesh.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/UseOpenMesh.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/UseTBB.cmake b/3rdparty/CGAL-4.8/cmake/modules/UseTBB.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/UseTBB.cmake
rename to 3rdparty/CGAL-4.8/cmake/modules/UseTBB.cmake
diff --git a/3rdparty/CGAL-4.6/cmake/modules/test_MPFI.cpp b/3rdparty/CGAL-4.8/cmake/modules/test_MPFI.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/cmake/modules/test_MPFI.cpp
rename to 3rdparty/CGAL-4.8/cmake/modules/test_MPFI.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_BOOST_version.cpp b/3rdparty/CGAL-4.8/config/support/print_BOOST_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_BOOST_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_BOOST_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_GCC_version.cpp b/3rdparty/CGAL-4.8/config/support/print_GCC_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_GCC_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_GCC_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_GMP_version.cpp b/3rdparty/CGAL-4.8/config/support/print_GMP_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_GMP_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_GMP_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_IntelCompiler_version.cpp b/3rdparty/CGAL-4.8/config/support/print_IntelCompiler_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_IntelCompiler_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_IntelCompiler_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_LEDA_version.cpp b/3rdparty/CGAL-4.8/config/support/print_LEDA_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_LEDA_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_LEDA_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_MPFI_version.cpp b/3rdparty/CGAL-4.8/config/support/print_MPFI_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_MPFI_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_MPFI_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_MPFR_version.cpp b/3rdparty/CGAL-4.8/config/support/print_MPFR_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_MPFR_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_MPFR_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_OPENGL_version.cpp b/3rdparty/CGAL-4.8/config/support/print_OPENGL_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_OPENGL_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_OPENGL_version.cpp
diff --git a/3rdparty/CGAL-4.8/config/support/print_QT4_version.cpp b/3rdparty/CGAL-4.8/config/support/print_QT4_version.cpp
new file mode 100644
index 0000000..b472210
--- /dev/null
+++ b/3rdparty/CGAL-4.8/config/support/print_QT4_version.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+
+// Tests if QT5 is available and prints its version string.
+
+#include <iostream>
+#include <QtCore/QtGlobal>
+
+int main()
+{
+    std::cout << "version=" << QT_VERSION_STR << std::endl;
+
+    return 0;
+}
diff --git a/3rdparty/CGAL-4.6/config/support/print_QT_version.cpp b/3rdparty/CGAL-4.8/config/support/print_QT_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_QT_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_QT_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/print_ZLIB_version.cpp b/3rdparty/CGAL-4.8/config/support/print_ZLIB_version.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/print_ZLIB_version.cpp
rename to 3rdparty/CGAL-4.8/config/support/print_ZLIB_version.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_ATLAS.cpp b/3rdparty/CGAL-4.8/config/support/test_ATLAS.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_ATLAS.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_ATLAS.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_BLAS.cpp b/3rdparty/CGAL-4.8/config/support/test_BLAS.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_BLAS.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_BLAS.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_BOOST.cpp b/3rdparty/CGAL-4.8/config/support/test_BOOST.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_BOOST.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_BOOST.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_BOOST_PROGRAM_OPTIONS.cpp b/3rdparty/CGAL-4.8/config/support/test_BOOST_PROGRAM_OPTIONS.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_BOOST_PROGRAM_OPTIONS.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_BOOST_PROGRAM_OPTIONS.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_BOOST_THREAD.cpp b/3rdparty/CGAL-4.8/config/support/test_BOOST_THREAD.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_BOOST_THREAD.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_BOOST_THREAD.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_GMP.cpp b/3rdparty/CGAL-4.8/config/support/test_GMP.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_GMP.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_GMP.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_GMPXX.cpp b/3rdparty/CGAL-4.8/config/support/test_GMPXX.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_GMPXX.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_GMPXX.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_LAPACK.cpp b/3rdparty/CGAL-4.8/config/support/test_LAPACK.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_LAPACK.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_LAPACK.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_LEDA.cpp b/3rdparty/CGAL-4.8/config/support/test_LEDA.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_LEDA.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_LEDA.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_LEDAWIN.cpp b/3rdparty/CGAL-4.8/config/support/test_LEDAWIN.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_LEDAWIN.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_LEDAWIN.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_LIDIA.cpp b/3rdparty/CGAL-4.8/config/support/test_LIDIA.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_LIDIA.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_LIDIA.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_MPFR.cpp b/3rdparty/CGAL-4.8/config/support/test_MPFR.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_MPFR.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_MPFR.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_OPENGL.cpp b/3rdparty/CGAL-4.8/config/support/test_OPENGL.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_OPENGL.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_OPENGL.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_QT.cpp b/3rdparty/CGAL-4.8/config/support/test_QT.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_QT.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_QT.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_X11.cpp b/3rdparty/CGAL-4.8/config/support/test_X11.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_X11.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_X11.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_ZLIB.cpp b/3rdparty/CGAL-4.8/config/support/test_ZLIB.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_ZLIB.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_ZLIB.cpp
diff --git a/3rdparty/CGAL-4.6/config/support/test_syntaxonly.cpp b/3rdparty/CGAL-4.8/config/support/test_syntaxonly.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/support/test_syntaxonly.cpp
rename to 3rdparty/CGAL-4.8/config/support/test_syntaxonly.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_BOOST_VARIANT_SWAP_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_BOOST_VARIANT_SWAP_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_BOOST_VARIANT_SWAP_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_BOOST_VARIANT_SWAP_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_LIMITS.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_LIMITS.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_LIMITS.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_LIMITS.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_STL.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_STL.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NO_STL.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NO_STL.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp
diff --git a/3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp b/3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp
rename to 3rdparty/CGAL-4.8/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp
diff --git a/3rdparty/CGAL-4.6/config/version.h.in b/3rdparty/CGAL-4.8/config/version.h.in
similarity index 100%
rename from 3rdparty/CGAL-4.6/config/version.h.in
rename to 3rdparty/CGAL-4.8/config/version.h.in
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.cpp b/3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.cpp
new file mode 100644
index 0000000..82dcc7d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.cpp
@@ -0,0 +1,70 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Pierre Alliez, Camille Wormser
+//
+//******************************************************************************
+// File Description : demo of AABB tree on polyhedral edge and facet primitives
+//
+//******************************************************************************
+
+#include "MainWindow.h"
+#include <QApplication>
+#include <CGAL/Qt/resources.h>
+#include <QMimeData>
+
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+  app.setOrganizationDomain("inria.fr");
+  app.setOrganizationName("INRIA");
+  app.setApplicationName("AABB tree demo");
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  app.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGALQt (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  QStringList args = app.arguments();
+  args.removeAt(0);
+
+  if(!args.empty() && args[0] == "--use-meta")
+  {
+    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
+    args.removeAt(0);
+  }
+
+  Q_FOREACH(QString filename, args)
+    mainWindow.open(filename);
+
+  return app.exec();
+}
+
+#  include "Scene.cpp"
+#  include "Scene_moc.cpp"
+#  include "benchmarks.cpp"
+#  include "Viewer.cpp"
+#  include "Viewer_moc.cpp"
+#  include "MainWindow.cpp"
+#  include "MainWindow_moc.cpp"
+
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.pdf b/3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.pdf
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.pdf
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.qrc b/3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/AABB_demo.qrc
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/AABB_demo.qrc
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/AABB_tree/CMakeLists.txt
new file mode 100644
index 0000000..0b47164
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/CMakeLists.txt
@@ -0,0 +1,94 @@
+# This is the CMake script for compiling the AABB tree demo.
+
+project( AABB_demo )
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Include this package's headers first
+include_directories( BEFORE ./ ./include ../../include )
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5 )
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find QGLViewer
+if(Qt5_FOUND)
+  find_package(QGLViewer )
+endif(Qt5_FOUND)
+
+if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
+
+  qt5_wrap_ui( UI_FILES MainWindow.ui )
+
+  include(AddFileDependencies)
+
+  qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
+  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
+
+  qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
+  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
+
+  qt5_generate_moc( "Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
+  add_file_dependencies( Scene_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Scene.h" )
+
+  qt5_add_resources ( RESOURCE_FILES AABB_demo.qrc )
+
+  add_file_dependencies( AABB_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
+                                       "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp"
+                                       "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" )
+
+  add_executable  ( AABB_demo AABB_demo.cpp ${UI_FILES} ${RESOURCE_FILES} )
+  qt5_use_modules(AABB_demo Gui OpenGL Xml Script Svg )
+  # Link with Qt libraries
+  target_link_libraries( AABB_demo ${QT_LIBRARIES} )
+
+  # Link with CGAL
+  target_link_libraries( AABB_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+  # Link with libQGLViewer, OpenGL
+  target_link_libraries( AABB_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo )
+
+
+else (CGAL_FOUND AND CGAL_CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  set(AABB_MISSING_DEPS "")
+
+  if(NOT CGAL_FOUND)
+    set(AABB_MISSING_DEPS "the CGAL library, ${AABB_MISSING_DEPS}")
+  endif()
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(AABB_MISSING_DEPS "the CGAL Qt5 library, ${AABB_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(AABB_MISSING_DEPS "OpenGL, ${AABB_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(AABB_MISSING_DEPS "QGLViewer, ${AABB_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled.")
+
+endif (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Color_ramp.h b/3rdparty/CGAL-4.8/demo/AABB_tree/Color_ramp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/Color_ramp.h
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/Color_ramp.h
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.cpp
new file mode 100644
index 0000000..260cc59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.cpp
@@ -0,0 +1,434 @@
+#include "MainWindow.h"
+#include "Scene.h"
+#include <CGAL/Qt/debug.h>
+
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QTextStream>
+#include <QUrl>
+#include <QFileDialog>
+#include <QSettings>
+#include <QHeaderView>
+#include <QClipboard>
+
+#include "ui_MainWindow.h"
+
+MainWindow::MainWindow(QWidget* parent)
+: CGAL::Qt::DemosMainWindow(parent)
+{
+	ui = new Ui::MainWindow;
+	ui->setupUi(this);
+
+	// saves some pointers from ui, for latter use.
+	m_pViewer = ui->viewer;
+
+	// does not save the state of the viewer 
+	m_pViewer->setStateFileName(QString::null);
+
+	// accepts drop events
+	setAcceptDrops(true);
+	// setups scene
+        m_pScene = new Scene();
+	m_pViewer->setScene(m_pScene);
+        m_pViewer->setManipulatedFrame(m_pScene->manipulatedFrame());
+
+	// connects actionQuit (Ctrl+Q) and qApp->quit()
+	connect(ui->actionQuit, SIGNAL(triggered()),
+		this, SLOT(quit()));
+
+	this->addRecentFiles(ui->menuFile, ui->actionQuit);
+	connect(this, SIGNAL(openRecentFile(QString)),
+		this, SLOT(open(QString)));
+
+	readSettings();
+}
+
+MainWindow::~MainWindow()
+{
+	delete ui;
+}
+
+void MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+	if (event->mimeData()->hasFormat("text/uri-list"))
+		event->acceptProposedAction();
+}
+
+void MainWindow::dropEvent(QDropEvent *event)
+{
+	Q_FOREACH(QUrl url, event->mimeData()->urls()) {
+		QString filename = url.toLocalFile();
+		if(!filename.isEmpty()) {
+			QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
+			open(filename);
+		}
+	}
+	event->acceptProposedAction();
+}
+
+void MainWindow::updateViewerBBox()
+{
+	m_pScene->update_bbox();
+	const Scene::Bbox bbox = m_pScene->bbox();
+	const double xmin = bbox.xmin();
+	const double ymin = bbox.ymin();
+	const double zmin = bbox.zmin();
+	const double xmax = bbox.xmax();
+	const double ymax = bbox.ymax();
+	const double zmax = bbox.zmax();
+	qglviewer::Vec 
+		vec_min(xmin, ymin, zmin),
+		vec_max(xmax, ymax, zmax);
+	m_pViewer->setSceneBoundingBox(vec_min,vec_max);
+	m_pViewer->camera()->showEntireScene();
+}
+
+void MainWindow::open(QString filename)
+{
+	QFileInfo fileinfo(filename);
+	if(fileinfo.isFile() && fileinfo.isReadable())
+	{
+		int index = m_pScene->open(filename);
+		if(index >= 0)
+		{
+			QSettings settings;
+			settings.setValue("OFF open directory",
+				fileinfo.absoluteDir().absolutePath());
+			this->addToRecentFiles(filename);
+
+			// update bbox
+			updateViewerBBox();
+      m_pViewer->update();
+		}
+	}
+}
+
+void MainWindow::readSettings()
+{
+	this->readState("MainWindow", Size|State);
+}
+
+void MainWindow::writeSettings()
+{
+	this->writeState("MainWindow");
+	std::cerr << "Write setting... done.\n";
+}
+
+void MainWindow::quit()
+{
+	writeSettings();
+	close();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+	writeSettings();
+	event->accept();
+}
+
+void MainWindow::on_actionLoadPolyhedron_triggered()
+{
+	QSettings settings;
+	QString directory = settings.value("OFF open directory",
+		QDir::current().dirName()).toString();
+	QStringList filenames = 
+		QFileDialog::getOpenFileNames(this,
+		tr("Load polyhedron..."),
+		directory,
+		tr("OFF files (*.off)\n"
+		"All files (*)"));
+	if(!filenames.isEmpty()) {
+		Q_FOREACH(QString filename, filenames) {
+			open(filename);
+		}
+	}
+}
+
+
+void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
+{
+	m_pViewer->setAddKeyFrameKeyboardModifiers(m);
+}
+
+void MainWindow::on_actionInside_points_triggered()
+{
+	bool ok;
+	
+	const unsigned int nb_points = (unsigned)
+		QInputDialog::getInt(NULL, "#Points",
+		"#Points:",10000,1,100000000,9,&ok);
+
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->generate_inside_points(nb_points);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionPoints_in_interval_triggered()
+{
+	bool ok;
+	
+	const unsigned int nb_points = (unsigned)
+                QInputDialog::getInt(NULL, "#Points",
+		"#Points:",10000,1,100000000,9,&ok);
+
+	if(!ok)
+		return;
+
+  const double min = 
+		QInputDialog::getDouble(NULL, "min",
+		"Min:",-0.1,-1000.0,1000.0,9,&ok);
+	if(!ok)
+		return;
+  const double max = 
+		QInputDialog::getDouble(NULL, "max",
+		"Max:",0.1,-1000.0,1000.0,9,&ok);
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->generate_points_in(nb_points,min,max);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionBoundary_segments_triggered()
+{
+	bool ok;
+	
+	const unsigned int nb_slices = (unsigned)
+		QInputDialog::getInt(NULL, "#Slices",
+		"Slices:",100,1,1000000,8,&ok);
+
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->generate_boundary_segments(nb_slices);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionBoundary_points_triggered()
+{
+	bool ok;
+
+	const unsigned int nb_points = (unsigned)
+		QInputDialog::getInt(NULL, "#Points",
+		"Points:",1000,1,10000000,8,&ok);
+
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->generate_boundary_points(nb_points);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionEdge_points_triggered()
+{
+	bool ok;
+
+	const unsigned int nb_points = (unsigned)
+		QInputDialog::getInt(NULL, "#Points",
+		"Points:",1000,1,10000000,8,&ok);
+
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->generate_edge_points(nb_points);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionBench_distances_triggered()
+{
+	bool ok;
+	const double duration = QInputDialog::getDouble(NULL, "Duration",
+		"Duration (s):",1.0,0.01,1000,8,&ok);
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	std::cout << std::endl << "Benchmark distances" << std::endl;
+	m_pScene->benchmark_distances(duration);
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionBench_intersections_triggered()
+{
+	bool ok;
+	const double duration = QInputDialog::getDouble(NULL, "Duration",
+		"Duration (s):",1.0,0.01,1000.0,8,&ok);
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	std::cout << std::endl << "Benchmark intersections" << std::endl;
+	m_pScene->benchmark_intersections(duration);
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionUnsigned_distance_function_to_facets_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+    m_pScene->activate_cutting_plane();
+	m_pScene->unsigned_distance_function();
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionUnsigned_distance_function_to_edges_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+    m_pScene->activate_cutting_plane();
+	m_pScene->unsigned_distance_function_to_edges();
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionSigned_distance_function_to_facets_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+    m_pScene->activate_cutting_plane();
+	m_pScene->signed_distance_function();
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionIntersection_cutting_plane_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_pScene->activate_cutting_plane();
+  m_pScene->cut_segment_plane();
+  QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionCutting_plane_none_triggered()
+{
+  m_pScene->clear_cutting_plane();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionView_polyhedron_triggered()
+{
+	m_pScene->toggle_view_poyhedron();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionView_points_triggered()
+{
+	m_pScene->toggle_view_points();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionView_segments_triggered()
+{
+	m_pScene->toggle_view_segments();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionView_cutting_plane_triggered()
+{
+  m_pScene->toggle_view_plane();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionClear_points_triggered()
+{
+	m_pScene->clear_points();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionClear_segments_triggered()
+{
+	m_pScene->clear_segments();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionClear_cutting_plane_triggered()
+{
+  m_pScene->clear_cutting_plane();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionRefine_bisection_triggered()
+{
+	bool ok;
+	const double max_len = 
+		QInputDialog::getDouble(NULL, "Max edge len",
+		"Max edge len:",0.1,0.001,100.0,9,&ok);
+	if(!ok)
+		return;
+
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->refine_bisection(max_len * max_len);
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionBench_memory_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->bench_memory();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionBench_construction_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->bench_construction();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionBench_intersections_vs_nbt_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->bench_intersections_vs_nbt();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionBench_distances_vs_nbt_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->bench_distances_vs_nbt();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionRefine_loop_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->refine_loop();
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionSave_snapshot_triggered()
+{
+	// save snapshot to file
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+  QString filename = QFileDialog::getSaveFileName(this,tr("Save snapshot to file..."),"snapshot00.png","*.png");
+  m_pViewer->saveSnapshot(filename);
+	QApplication::restoreOverrideCursor();
+}
+void MainWindow::on_actionCopy_snapshot_triggered()
+{
+  // copy snapshot to clipboard
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+  QClipboard *qb = QApplication::clipboard();
+  m_pViewer->makeCurrent();
+  m_pViewer->raise();
+  QImage snapshot = m_pViewer->grabFrameBuffer(true);
+  qb->setImage(snapshot);
+	QApplication::restoreOverrideCursor();
+}
+
+
+
+
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.h b/3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.h
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.h
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.ui b/3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/MainWindow.ui
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/Refiner.h b/3rdparty/CGAL-4.8/demo/AABB_tree/Refiner.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/Refiner.h
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/Refiner.h
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.cpp b/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.cpp
new file mode 100644
index 0000000..5edece4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.cpp
@@ -0,0 +1,1339 @@
+#include "Scene.h"
+
+#include <iostream>
+#include <fstream>
+
+#include <QtCore/qglobal.h>
+#include <QString>
+#include <QTextStream>
+#include <QFileInfo>
+#include <QInputDialog>
+
+#include "Refiner.h"
+//#include "render_edges.h"
+
+#include <CGAL/Timer.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Subdivision_method_3.h>
+
+#include <QOpenGLShader>
+#include <QDebug>
+#include "Viewer.h"
+
+
+// constants
+const int slow_distance_grid_size = 100;
+const int fast_distance_grid_size = 20;
+#define _SIGNED 0
+#define _UNSIGNED 1
+
+Scene::Scene()
+    : m_frame (new ManipulatedFrame())
+    , m_view_plane(false)
+    , m_grid_size(slow_distance_grid_size)
+    , m_cut_plane(NONE)
+{
+    m_pPolyhedron = NULL;
+
+    // view options
+    m_view_points = true;
+    m_view_segments = true;
+    m_view_polyhedron = true;
+
+    // distance function
+    m_red_ramp.build_red();
+    m_blue_ramp.build_blue();
+    m_max_distance_function = (FT)0.0;
+    texture = new Texture(m_grid_size,m_grid_size);
+    startTimer(0);
+    ready_to_cut = false;
+    are_buffers_initialized = false;
+    gl_init = false;
+
+}
+
+Scene::~Scene()
+{
+    delete m_pPolyhedron;
+    delete m_frame;
+
+    buffers[0].destroy();
+    buffers[1].destroy();
+    buffers[2].destroy();
+    buffers[3].destroy();
+    buffers[4].destroy();
+    buffers[5].destroy();
+    buffers[6].destroy();
+    buffers[7].destroy();
+    vao[0].destroy();
+    vao[1].destroy();
+    vao[2].destroy();
+    vao[3].destroy();
+    vao[4].destroy();
+    vao[5].destroy();
+    vao[6].destroy();
+
+
+}
+
+void Scene::compile_shaders()
+{
+    if(! buffers[0].create() || !buffers[1].create() || !buffers[2].create() || !buffers[3].create() || !buffers[4].create() || !buffers[5].create() || !buffers[6].create() || !buffers[7].create())
+    {
+        std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() || !vao[2].create() || !vao[3].create() || !vao[4].create() || !vao[5].create() || !vao[6].create())
+    {
+        std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * f_matrix * vertex;\n"
+        "}"
+    };
+    //Vertex source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform highp vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+
+    //Vertex source code
+    const char tex_vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec2 tex_coord; \n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix;\n"
+        "varying highp vec2 texc;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * f_matrix * vertex;\n"
+        "    texc = tex_coord;\n"
+        "}"
+    };
+    //Vertex source code
+    const char tex_fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform sampler2D texture;\n"
+        "varying highp vec2 texc;\n"
+        "void main(void) { \n"
+        "gl_FragColor = texture2D(texture, texc.st);\n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *tex_vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!tex_vertex_shader->compileSourceCode(tex_vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *tex_fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!tex_fragment_shader->compileSourceCode(tex_fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!tex_rendering_program.addShader(tex_vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!tex_rendering_program.addShader(tex_fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!tex_rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    tex_rendering_program.bind();
+
+}
+
+void Scene::initialize_buffers()
+{
+    //Points
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(pos_points.data(),
+                        static_cast<int>(pos_points.size()*sizeof(float)));
+    points_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(points_vertexLocation);
+    rendering_program.setAttributeBuffer(points_vertexLocation,GL_FLOAT,0,3);
+    buffers[0].release();
+    rendering_program.release();
+    vao[0].release();
+
+    //Lines
+    vao[1].bind();
+    buffers[1].bind();
+    buffers[1].allocate(pos_lines.data(),
+                        static_cast<int>(pos_lines.size()*sizeof(float)));
+    lines_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.setAttributeBuffer(lines_vertexLocation,GL_FLOAT,0,3);
+    buffers[1].release();
+    rendering_program.enableAttributeArray(lines_vertexLocation);
+    rendering_program.release();
+    vao[1].release();
+
+    //Polyhedron's edges
+    vao[2].bind();
+    buffers[2].bind();
+    buffers[2].allocate(pos_poly.data(),
+                        static_cast<int>(pos_poly.size()*sizeof(float)));
+    poly_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    rendering_program.enableAttributeArray(poly_vertexLocation);
+    buffers[2].release();
+    rendering_program.release();
+    vao[2].release();
+
+    //cutting segments
+    vao[3].bind();
+    buffers[3].bind();
+    buffers[3].allocate(pos_cut_segments.data(),
+                        static_cast<int>(pos_cut_segments.size()*sizeof(float)));
+    poly_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    rendering_program.enableAttributeArray(poly_vertexLocation);
+    buffers[3].release();
+    rendering_program.release();
+    vao[3].release();
+
+    //cutting plane
+    vao[4].bind();
+    buffers[4].bind();
+    buffers[4].allocate(pos_plane.data(), static_cast<int>(pos_plane.size()*sizeof(float)));
+    poly_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    rendering_program.enableAttributeArray(poly_vertexLocation);
+    buffers[4].release();
+    rendering_program.release();
+
+    vao[4].release();
+
+    //grid
+    vao[5].bind();
+    buffers[5].bind();
+    buffers[5].allocate(pos_grid.data(), static_cast<int>(pos_grid.size()*sizeof(float)));
+    poly_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    rendering_program.enableAttributeArray(poly_vertexLocation);
+    buffers[5].release();
+    rendering_program.release();
+    vao[5].release();
+
+    //cutting plane
+    vao[6].bind();
+    buffers[6].bind();
+    buffers[6].allocate(pos_plane.data(), static_cast<int>(pos_plane.size()*sizeof(float)));
+    poly_vertexLocation = tex_rendering_program.attributeLocation("vertex");
+    tex_rendering_program.bind();
+    tex_rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    tex_rendering_program.enableAttributeArray(poly_vertexLocation);
+    buffers[6].release();
+    tex_rendering_program.release();
+
+    buffers[7].bind();
+    buffers[7].allocate(tex_map.data(), static_cast<int>(tex_map.size()*sizeof(float)));
+    tex_Location = tex_rendering_program.attributeLocation("tex_coord");
+    tex_rendering_program.bind();
+    tex_rendering_program.setAttributeBuffer(tex_Location,GL_FLOAT,0,2);
+    tex_rendering_program.enableAttributeArray(tex_Location);
+    buffers[7].release();
+    tex_rendering_program.release();
+
+    gl->glBindTexture(GL_TEXTURE_2D, textureId);
+    gl->glTexImage2D(GL_TEXTURE_2D,
+                 0,
+                 GL_RGB,
+                 texture->getWidth(),
+                 texture->getHeight(),
+                 0,
+                 GL_RGB,
+                 GL_UNSIGNED_BYTE,
+                 texture->getData());
+    gl->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    gl->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    gl->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE );
+    gl->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE );
+    vao[6].release();
+
+    are_buffers_initialized = true;
+
+
+
+}
+
+void Scene::compute_elements(int mode)
+{
+    pos_points.resize(0);
+    pos_lines.resize(0);
+    pos_poly.resize(0);
+    pos_cut_segments.resize(0);
+    tex_map.resize(0);
+    pos_grid.resize(66);
+    pos_plane.resize(18);
+    float diag = .6f * float(bbox_diag());
+    //The Points
+    {
+        std::list<Point>::iterator pit;
+        for(pit = m_points.begin(); pit != m_points.end(); pit++)
+        {
+            const Point& p = *pit;
+            pos_points.push_back(p.x());
+            pos_points.push_back(p.y());
+            pos_points.push_back(p.z());
+        }
+    }
+    //The Segements
+    {
+        std::list<Segment>::iterator sit;
+        for(sit = m_segments.begin(); sit != m_segments.end(); sit++)
+        {
+            const Segment& s = *sit;
+            const Point& p = s.source();
+            const Point& q = s.target();
+
+            pos_lines.push_back(p.x());
+            pos_lines.push_back(p.y());
+            pos_lines.push_back(p.z());
+
+            pos_lines.push_back(q.x());
+            pos_lines.push_back(q.y());
+            pos_lines.push_back(q.z());
+        }
+    }
+    //The Polygon's edges
+    {
+        Polyhedron::Edge_iterator he;
+        for(he = m_pPolyhedron->edges_begin();
+            he != m_pPolyhedron->edges_end();
+            he++)
+        {
+            const Point& a = he->vertex()->point();
+            const Point& b = he->opposite()->vertex()->point();
+            pos_poly.push_back(a.x());
+            pos_poly.push_back(a.y());
+            pos_poly.push_back(a.z());
+
+            pos_poly.push_back(b.x());
+            pos_poly.push_back(b.y());
+            pos_poly.push_back(b.z());
+        }
+    }
+    //The cutting segments
+    {
+        for ( std::vector<Segment>::const_iterator csit = m_cut_segments.begin(),
+              end = m_cut_segments.end() ; csit != end ; ++csit )
+        {
+            const Point& a = csit->source();
+            const Point& b = csit->target();
+
+            pos_cut_segments.push_back(a.x());
+            pos_cut_segments.push_back(a.y());
+            pos_cut_segments.push_back(a.z());
+
+            pos_cut_segments.push_back(b.x());
+            pos_cut_segments.push_back(b.y());
+            pos_cut_segments.push_back(b.z());
+        }
+    }
+    //The cutting plane
+    {
+
+        pos_plane[0]= -diag; pos_plane[1]=-diag; pos_plane[2]=0.0;
+        pos_plane[3]= -diag; pos_plane[4]= diag; pos_plane[5]=0.;
+        pos_plane[6]=  diag; pos_plane[7]= diag; pos_plane[8]=0.;
+        pos_plane[9]= -diag; pos_plane[10]= -diag; pos_plane[11]=0.;
+        pos_plane[12]= diag;    pos_plane[13]= diag; pos_plane[14]= 0.;
+        pos_plane[15]= diag;    pos_plane[16]= -diag; pos_plane[17]= 0.;
+
+        //UV Mapping
+        tex_map.push_back(-0.11f);
+        tex_map.push_back(-0.11f);
+
+        tex_map.push_back(-0.11f);
+        tex_map.push_back(1.11f);
+
+        tex_map.push_back(1.11f);
+        tex_map.push_back(1.11f);
+
+        tex_map.push_back(-0.11f);
+        tex_map.push_back(-0.11f);
+
+        tex_map.push_back(1.11f);
+        tex_map.push_back(1.11f);
+
+        tex_map.push_back(1.11f);
+        tex_map.push_back(-0.11f);
+
+
+
+
+
+    }
+    //The grid
+    {
+        float z = 0;
+        float x = (2 * diag)/10.0;
+        float y = (2 * diag)/10.0;
+        for(int u = 0; u < 11; u++)
+        {
+
+            pos_grid.push_back(-diag + x* u);
+            pos_grid.push_back(-diag);
+            pos_grid.push_back(z);
+
+            pos_grid.push_back(-diag + x* u);
+            pos_grid.push_back(diag);
+            pos_grid.push_back(z);
+        }
+        for(int v=0; v<11; v++)
+        {
+
+            pos_grid.push_back(-diag);
+            pos_grid.push_back(-diag + v * y);
+            pos_grid.push_back(z);
+
+            pos_grid.push_back(diag);
+            pos_grid.push_back(-diag + v * y);
+            pos_grid.push_back(z);
+
+        }
+
+    }
+    //The texture
+    switch(mode)
+    {
+    case _SIGNED:
+        for( int i=0 ; i < texture->getWidth(); i++ )
+        {
+            for( int j=0 ; j < texture->getHeight() ; j++)
+            {
+                compute_texture(i,j,m_red_ramp,m_blue_ramp);
+            }
+        }
+        break;
+    case _UNSIGNED:
+        for( int i=0 ; i < texture->getWidth(); i++ )
+        {
+            for( int j=0 ; j < texture->getHeight() ; j++)
+            {
+                compute_texture(i,j,m_thermal_ramp,m_thermal_ramp);
+            }
+        }
+        break;}
+    sampler_location = tex_rendering_program.attributeLocation("texture");
+}
+
+void Scene::compute_texture(int i, int j,Color_ramp pos_ramp ,Color_ramp neg_ramp)
+{
+
+
+    const FT& d00 = m_distance_function[i][j].second;
+    // determines grey level
+    unsigned int i00 = 255-(unsigned)(255.0 * (double)std::fabs(d00) / m_max_distance_function);
+
+    if(d00 > 0.0)
+        texture->setData(i,j,pos_ramp.r(i00),pos_ramp.g(i00),pos_ramp.b(i00));
+    else
+        texture->setData(i,j,neg_ramp.r(i00),neg_ramp.g(i00),neg_ramp.b(i00));
+
+
+}
+
+void Scene::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    rendering_program.bind();
+    mvpLocation = rendering_program.uniformLocation("mvp_matrix");
+    fLocation = rendering_program.uniformLocation("f_matrix");
+    colorLocation = rendering_program.uniformLocation("color");
+    rendering_program.setUniformValue(mvpLocation, mvpMatrix);
+    rendering_program.release();
+
+    tex_rendering_program.bind();
+    tex_mvpLocation = tex_rendering_program.uniformLocation("mvp_matrix");
+    tex_fLocation = tex_rendering_program.uniformLocation("f_matrix");
+    tex_rendering_program.setUniformValue(tex_mvpLocation, mvpMatrix);
+    tex_rendering_program.release();
+}
+
+void Scene::changed()
+{
+    if(m_cut_plane == UNSIGNED_FACETS || m_cut_plane == UNSIGNED_EDGES)
+        compute_elements(_UNSIGNED);
+    else
+        compute_elements(_SIGNED);
+    are_buffers_initialized = false;
+
+}
+
+int Scene::open(QString filename)
+{
+    QTextStream cerr(stderr);
+    cerr << QString("Opening file \"%1\"\n").arg(filename);
+    QApplication::setOverrideCursor(QCursor(::Qt::WaitCursor));
+
+    QFileInfo fileinfo(filename);
+    std::ifstream in(filename.toUtf8());
+
+    if(!in || !fileinfo.isFile() || ! fileinfo.isReadable())
+    {
+        std::cerr << "unable to open file" << std::endl;
+        QApplication::restoreOverrideCursor();
+        return -1;
+    }
+
+    if(m_pPolyhedron != NULL)
+        delete m_pPolyhedron;
+
+    // allocate new polyhedron
+    m_pPolyhedron = new Polyhedron;
+    in >> *m_pPolyhedron;
+    if(!in)
+    {
+        std::cerr << "invalid OFF file" << std::endl;
+        QApplication::restoreOverrideCursor();
+
+        delete m_pPolyhedron;
+        m_pPolyhedron = NULL;
+
+        return -1;
+    }
+
+    // clear tree
+    clear_internal_data();
+
+    QApplication::restoreOverrideCursor();
+    changed();
+    return 0;
+}
+
+void Scene::update_bbox()
+{
+    std::cout << "Compute bbox...";
+    m_bbox = Bbox();
+
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "failed (no polyhedron)." << std::endl;
+        return;
+    }
+
+    if(m_pPolyhedron->empty())
+    {
+        std::cout << "failed (empty polyhedron)." << std::endl;
+        return;
+    }
+
+    Polyhedron::Point_iterator it = m_pPolyhedron->points_begin();
+    m_bbox = (*it).bbox();
+    for(; it != m_pPolyhedron->points_end();it++)
+        m_bbox = m_bbox + (*it).bbox();
+    std::cout << "done (" << m_pPolyhedron->size_of_facets()
+              << " facets)" << std::endl;
+}
+
+void Scene::draw(QGLViewer* viewer)
+{       
+    if(!gl_init)
+        initGL();
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+    QMatrix4x4 fMatrix;
+    fMatrix.setToIdentity();
+    if(m_view_polyhedron && pos_poly.size()>0)
+    {
+        vao[2].bind();
+        attrib_buffers(viewer);
+        rendering_program.bind();
+        color.setRgbF(0.0,0.0,0.0);
+        rendering_program.setUniformValue(colorLocation, color);
+        rendering_program.setUniformValue(fLocation, fMatrix);
+        gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_poly.size()/3));
+        rendering_program.release();
+        vao[2].release();
+    }
+    if(m_view_points && pos_points.size()>0)
+    {
+        gl->glPointSize(2.0f);
+        vao[0].bind();
+        attrib_buffers(viewer);
+        rendering_program.bind();
+        color.setRgbF(0.7,0.0,0.0);
+        rendering_program.setUniformValue(colorLocation, color);
+        rendering_program.setUniformValue(fLocation, fMatrix);
+        gl->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+        rendering_program.release();
+        vao[0].release();
+    }
+
+    if(m_view_segments && pos_lines.size()>0)
+    {
+        vao[1].bind();
+        attrib_buffers(viewer);
+        rendering_program.bind();
+        color.setRgbF(0.0,0.7,0.0);
+        rendering_program.setUniformValue(colorLocation, color);
+        rendering_program.setUniformValue(fLocation, fMatrix);
+        gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
+        rendering_program.release();
+        vao[1].release();
+    }
+    if (m_view_plane && pos_plane.size()>0)
+    {
+        switch( m_cut_plane )
+        {
+        case UNSIGNED_EDGES:
+        case UNSIGNED_FACETS:
+        case SIGNED_FACETS:
+
+            gl->glActiveTexture(GL_TEXTURE0);
+            gl->glBindTexture(GL_TEXTURE_2D, textureId);
+
+            for(int i=0; i< 16 ; i++)
+                fMatrix.data()[i] =  m_frame->matrix()[i];
+            vao[6].bind();
+            attrib_buffers(viewer);
+            tex_rendering_program.bind();
+            tex_rendering_program.setUniformValue(tex_fLocation, fMatrix);
+
+            gl->glDrawArrays(GL_TRIANGLES, 0,static_cast<GLsizei>(pos_plane.size()/3));
+            tex_rendering_program.release();
+            vao[6].release();
+            break;
+
+        case CUT_SEGMENTS:
+
+            //cutting_segments
+            fMatrix.setToIdentity();
+            ::glLineWidth(2.0f);
+            vao[3].bind();
+            attrib_buffers(viewer);
+            rendering_program.bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation, color);
+            rendering_program.setUniformValue(fLocation, fMatrix);
+            gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_cut_segments.size()/3));
+            ::glLineWidth(1.0f);
+            rendering_program.release();
+            vao[3].release();
+            //grid
+            for(int i=0; i< 16 ; i++)
+                fMatrix.data()[i] =  m_frame->matrix()[i];
+            vao[5].bind();
+            attrib_buffers(viewer);
+            rendering_program.bind();
+            color.setRgbF(.6f, .6f, .6f);
+            rendering_program.setUniformValue(colorLocation, color);
+            rendering_program.setUniformValue(fLocation, fMatrix);
+            gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_grid.size()/3));
+            rendering_program.release();
+            vao[5].release();
+
+            //cutting_plane
+            // for(int i=0; i< 16 ; i++)
+            //     fMatrix.data()[i] =  m_frame->matrix()[i];
+            ::glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+            ::glEnable(GL_BLEND);
+            vao[4].bind();
+            attrib_buffers(viewer);
+            rendering_program.bind();
+            color.setRgbF(.6f, .85f, 1.f, .65f);
+            rendering_program.setUniformValue(colorLocation, color);
+            rendering_program.setUniformValue(fLocation, fMatrix);
+            gl->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_plane.size()/3));
+            ::glDisable(GL_BLEND);
+            rendering_program.release();
+            vao[4].release();
+
+            break;
+        case NONE: // do nothing
+            break;
+        }
+    }
+
+
+}
+
+FT Scene::random_in(const double a,
+                    const double b)
+{
+    double r = rand() / (double)RAND_MAX;
+    return (FT)(a + (b - a) * r);
+}
+
+Point Scene::random_point(const CGAL::Bbox_3& bbox)
+{
+    FT x = random_in(bbox.xmin(),bbox.xmax());
+    FT y = random_in(bbox.ymin(),bbox.ymax());
+    FT z = random_in(bbox.zmin(),bbox.zmax());
+    return Point(x,y,z);
+}
+
+Vector Scene::random_vector()
+{
+    FT x = random_in(0.0,1.0);
+    FT y = random_in(0.0,1.0);
+    FT z = random_in(0.0,1.0);
+    return Vector(x,y,z);
+}
+
+Ray Scene::random_ray(const CGAL::Bbox_3& bbox)
+{
+    Point p = random_point(bbox);
+    Point q = random_point(bbox);
+    return Ray(p,q);
+}
+
+Segment Scene::random_segment(const CGAL::Bbox_3& bbox)
+{
+    Point p = random_point(bbox);
+    Point q = random_point(bbox);
+    return Segment(p,q);
+}
+
+Line Scene::random_line(const CGAL::Bbox_3& bbox)
+{
+    Point p = random_point(bbox);
+    Point q = random_point(bbox);
+    return Line(p,q);
+}
+
+Plane Scene::random_plane(const CGAL::Bbox_3& bbox)
+{
+    Point p = random_point(bbox);
+    Vector vec = random_vector();
+    return Plane(p,vec);
+}
+
+Plane Scene::frame_plane() const
+{
+    const qglviewer::Vec& pos = m_frame->position();
+    const qglviewer::Vec& n = m_frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+
+    return Plane(n[0], n[1],  n[2], - n * pos);
+}
+
+Aff_transformation Scene::frame_transformation() const
+{
+    const ::GLdouble* m = m_frame->matrix();
+
+    // OpenGL matrices are row-major matrices
+    return Aff_transformation (m[0], m[4], m[8], m[12],
+            m[1], m[5], m[9], m[13],
+            m[2], m[6], m[10], m[14]);
+}
+
+FT Scene::bbox_diag() const
+{
+    double dx = m_bbox.xmax()-m_bbox.xmin();
+    double dy = m_bbox.ymax()-m_bbox.ymin();
+    double dz = m_bbox.zmax()-m_bbox.zmin();
+
+    return FT(std::sqrt(dx*dx + dy*dy + dz*dz));
+}
+
+void Scene::build_facet_tree()
+{
+    if ( NULL == m_pPolyhedron )
+    {
+        std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
+        return;
+    }
+
+    // Don't rebuild tree if it is already built
+    if ( !m_facet_tree.empty() ) { return; }
+
+    // build tree
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Construct Facet AABB tree...";
+    m_facet_tree.rebuild(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
+    m_facet_tree.accelerate_distance_queries();
+    std::cout << "done (" << timer.time() << " s)" << std::endl;
+}
+
+void Scene::build_edge_tree()
+{
+    if ( NULL == m_pPolyhedron )
+    {
+        std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
+        return;
+    }
+
+    // Don't rebuild tree if it is already built
+    if ( !m_edge_tree.empty() ) { return; }
+
+    // build tree
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Construct Edge AABB tree...";
+    m_edge_tree.rebuild(edges(*m_pPolyhedron).first,edges(*m_pPolyhedron).second,*m_pPolyhedron);
+    m_edge_tree.accelerate_distance_queries();
+    std::cout << "done (" << timer.time() << " s)" << std::endl;
+}
+
+void Scene::clear_internal_data()
+{
+    m_facet_tree.clear();
+    m_edge_tree.clear();
+
+    clear_points();
+    clear_segments();
+    clear_cutting_plane();
+}
+
+void Scene::clear_cutting_plane()
+{
+    m_cut_segments.clear();
+    m_cut_plane = NONE;
+
+    deactivate_cutting_plane();
+    changed();
+}
+
+void Scene::update_grid_size()
+{
+    m_grid_size = m_fast_distance ? fast_distance_grid_size
+                                  : slow_distance_grid_size;
+    texture = new Texture(m_grid_size,m_grid_size);
+}
+
+void Scene::generate_points_in(const unsigned int nb_points,
+                               const double min,
+                               const double max)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+
+    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+    typedef CGAL::AABB_tree<Traits> Tree;
+
+    std::cout << "Construct AABB tree...";
+    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second, *m_pPolyhedron);
+    std::cout << "done." << std::endl;
+
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Generate " << nb_points << " points in interval ["
+              << min << ";" << max << "]";
+
+    unsigned int nb_trials = 0;
+    Vector vec = random_vector();
+    while(m_points.size() < nb_points)
+    {
+        Point p = random_point(tree.bbox());
+
+        // measure distance
+        FT signed_distance = std::sqrt(tree.squared_distance(p));
+
+        // measure sign
+        Ray ray(p,vec);
+        int nb_intersections = (int)tree.number_of_intersected_primitives(ray);
+        if(nb_intersections % 2 != 0)
+            signed_distance *= -1.0;
+
+        if(signed_distance >= min &&
+                signed_distance <= max)
+        {
+            m_points.push_back(p);
+            if(m_points.size()%(nb_points/10) == 0)
+                std::cout << "."; // ASCII progress bar
+        }
+        nb_trials++;
+    }
+    double speed = (double)nb_trials / timer.time();
+    std::cout << "done (" << nb_trials << " trials, "
+              << timer.time() << " s, "
+              << speed << " queries/s)" << std::endl;
+    changed();
+}
+
+
+void Scene::generate_inside_points(const unsigned int nb_points)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+
+    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+    typedef CGAL::AABB_tree<Traits> Tree;
+
+    std::cout << "Construct AABB tree...";
+    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
+    std::cout << "done." << std::endl;
+
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Generate " << nb_points << " inside points";
+
+    unsigned int nb_trials = 0;
+    Vector vec = random_vector();
+    while(m_points.size() < nb_points)
+    {
+        Point p = random_point(tree.bbox());
+        Ray ray(p,vec);
+        int nb_intersections = (int)tree.number_of_intersected_primitives(ray);
+        if(nb_intersections % 2 != 0)
+        {
+            m_points.push_back(p);
+            if(m_points.size()%(nb_points/10) == 0)
+                std::cout << "."; // ASCII progress bar
+        }
+        nb_trials++;
+    }
+    double speed = (double)nb_trials / timer.time();
+    std::cout << "done (" << nb_trials << " trials, "
+              << timer.time() << " s, "
+              << speed << " queries/s)" << std::endl;
+    changed();
+}
+
+void Scene::generate_boundary_segments(const unsigned int nb_slices)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+
+    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+    typedef CGAL::AABB_tree<Traits> Tree;
+    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
+
+    std::cout << "Construct AABB tree...";
+    Tree tree(faces(*m_pPolyhedron).first,faces(*m_pPolyhedron).second,*m_pPolyhedron);
+    std::cout << "done." << std::endl;
+
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Generate boundary segments from " << nb_slices << " slices: ";
+
+    Vector normal((FT)0.0,(FT)0.0,(FT)1.0);
+    unsigned int i;
+
+    const double dz = m_bbox.zmax() - m_bbox.zmin();
+    for(i=0;i<nb_slices;i++)
+    {
+        FT z = m_bbox.zmin() + (FT)i / (FT)nb_slices * dz;
+        Point p((FT)0.0, (FT)0.0, z);
+        Plane plane(p,normal);
+
+        std::list<Object_and_primitive_id> intersections;
+        tree.all_intersections(plane,std::back_inserter(intersections));
+
+        std::list<Object_and_primitive_id>::iterator it;
+        for(it = intersections.begin();
+            it != intersections.end();
+            it++)
+        {
+            Object_and_primitive_id op = *it;
+            CGAL::Object object = op.first;
+            Segment segment;
+            if(CGAL::assign(segment,object))
+                m_segments.push_back(segment);
+        }
+    }
+    std::cout << m_segments.size() << " segments, " << timer.time() << " s." << std::endl;
+    changed();
+}
+
+void Scene::generate_boundary_points(const unsigned int nb_points)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+
+    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+    typedef CGAL::AABB_tree<Traits> Tree;
+    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
+
+    std::cout << "Construct AABB tree...";
+    Tree tree(faces(*m_pPolyhedron).first, faces(*m_pPolyhedron).second,*m_pPolyhedron);
+    std::cout << "done." << std::endl;
+
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Generate boundary points: ";
+
+    unsigned int nb = 0;
+    unsigned int nb_lines = 0;
+    while(nb < nb_points)
+    {
+        Line line = random_line(tree.bbox());
+
+        std::list<Object_and_primitive_id> intersections;
+        tree.all_intersections(line,std::back_inserter(intersections));
+        nb_lines++;
+
+        std::list<Object_and_primitive_id>::iterator it;
+        for(it = intersections.begin();
+            it != intersections.end();
+            it++)
+        {
+            Object_and_primitive_id op = *it;
+            CGAL::Object object = op.first;
+            Point point;
+            if(CGAL::assign(point,object))
+            {
+                m_points.push_back(point);
+                nb++;
+            }
+        }
+    }
+    std::cout << nb_lines << " line queries, " << timer.time() << " s." << std::endl;
+    changed();
+}
+
+void Scene::generate_edge_points(const unsigned int nb_points)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+
+    typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron> Primitive;
+    typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+    typedef CGAL::AABB_tree<Traits> Tree;
+    typedef Tree::Object_and_primitive_id Object_and_primitive_id;
+
+    std::cout << "Construct AABB tree...";
+    Tree tree( CGAL::edges(*m_pPolyhedron).first,
+               CGAL::edges(*m_pPolyhedron).second,
+               *m_pPolyhedron);
+    std::cout << "done." << std::endl;
+
+    CGAL::Timer timer;
+    timer.start();
+    std::cout << "Generate edge points: ";
+
+    unsigned int nb = 0;
+    unsigned int nb_planes = 0;
+    while(nb < nb_points)
+    {
+        Plane plane = random_plane(tree.bbox());
+
+        std::list<Object_and_primitive_id> intersections;
+        tree.all_intersections(plane,std::back_inserter(intersections));
+        nb_planes++;
+
+        std::list<Object_and_primitive_id>::iterator it;
+        for(it = intersections.begin();
+            it != intersections.end();
+            it++)
+        {
+            Object_and_primitive_id op = *it;
+            CGAL::Object object = op.first;
+            Point point;
+            if(CGAL::assign(point,object))
+            {
+                m_points.push_back(point);
+                nb++;
+            }
+        }
+    }
+    std::cout << nb_planes << " plane queries, " << timer.time() << " s." << std::endl;
+    changed();
+}
+
+
+template <typename Tree>
+void Scene::compute_distance_function(const Tree& tree)
+{
+    // Get transformation
+    Aff_transformation t = frame_transformation();
+
+    m_max_distance_function = FT(0);
+    FT diag = bbox_diag();
+
+    const FT dx = diag;
+    const FT dy = diag;
+    const FT z (0);
+    const FT fd =  FT(2);
+    for(int i=0 ; i<m_grid_size ; ++i)
+    {
+        FT x = -diag/fd + FT(i)/FT(m_grid_size) * dx;
+
+        for(int j=0 ; j<m_grid_size ; ++j)
+        {
+            FT y = -diag/fd + FT(j)/FT(m_grid_size) * dy;
+
+            Point query = t( Point(x,y,z) );
+            FT dist = CGAL::sqrt( tree.squared_distance(query) );
+
+            m_distance_function[i][j] = Point_distance(query,dist);
+            m_max_distance_function = (std::max)(dist, m_max_distance_function);
+        }
+    }
+}
+
+template <typename Tree>
+void Scene::sign_distance_function(const Tree& tree)
+{
+    typedef typename Tree::size_type size_type;
+    Vector random_vec = random_vector();
+
+    for(int i=0 ; i<m_grid_size ; ++i)
+    {
+        for(int j=0 ; j<m_grid_size ; ++j)
+        {
+            const Point& p = m_distance_function[i][j].first;
+            const FT unsigned_distance = m_distance_function[i][j].second;
+
+            // get sign through ray casting (random vector)
+            Ray ray(p, random_vec);
+            size_type nbi = tree.number_of_intersected_primitives(ray);
+
+            FT sign ( (nbi&1) == 0 ? 1 : -1);
+            m_distance_function[i][j].second = sign * unsigned_distance;
+        }
+    }
+    changed();
+}
+
+
+void Scene::unsigned_distance_function()
+{
+    // Build tree (if build fail, exit)
+    build_facet_tree();
+    if ( m_facet_tree.empty() ) { return; }
+
+    compute_distance_function(m_facet_tree);
+
+    m_cut_plane = UNSIGNED_FACETS;
+    changed();
+}
+
+
+void Scene::unsigned_distance_function_to_edges()
+{
+    // Build tree (if build fail, exit)
+    build_edge_tree();
+    if ( m_edge_tree.empty() ) { return; }
+
+    compute_distance_function(m_edge_tree);
+
+    m_cut_plane = UNSIGNED_EDGES;
+    changed();
+}
+
+
+void Scene::signed_distance_function()
+{
+    // Build tree (if build fail, exit)
+    build_facet_tree();
+    if ( m_facet_tree.empty() ) { return; }
+
+    compute_distance_function(m_facet_tree);
+    sign_distance_function(m_facet_tree);
+
+    m_cut_plane = SIGNED_FACETS;
+    changed();
+}
+
+
+void Scene::cut_segment_plane()
+{
+    // Build tree (if build fail, exit)
+    build_facet_tree();
+    if ( m_facet_tree.empty() ) { return; }
+
+    Plane plane = frame_plane();
+
+    // Compute intersections
+    typedef std::vector<Facet_tree::Object_and_primitive_id> Intersections;
+    Intersections intersections;
+    m_facet_tree.all_intersections(plane, std::back_inserter(intersections));
+
+    // Fill data structure
+    m_cut_segments.clear();
+    for ( Intersections::iterator it = intersections.begin(),
+          end = intersections.end() ; it != end ; ++it )
+    {
+        const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
+
+        if ( NULL != inter_seg )
+        {
+            m_cut_segments.push_back(*inter_seg);
+        }
+    }
+
+    m_cut_plane = CUT_SEGMENTS;
+    changed();
+}
+
+void Scene::cutting_plane(bool override)
+{
+    if(ready_to_cut || override)
+    {
+        ready_to_cut = false;
+        switch( m_cut_plane )
+        {
+        case UNSIGNED_FACETS:
+            return unsigned_distance_function();
+        case SIGNED_FACETS:
+            return signed_distance_function();
+        case UNSIGNED_EDGES:
+            return unsigned_distance_function_to_edges();
+        case CUT_SEGMENTS:
+            return cut_segment_plane();
+        case NONE: // do nothing
+            return;
+        }
+
+        // Should not be here
+        std::cerr << "Unknown cut_plane type" << std::endl;
+        CGAL_assertion(false);
+    }
+}
+
+void Scene::toggle_view_poyhedron()
+{
+    m_view_polyhedron = !m_view_polyhedron;
+}
+
+void Scene::toggle_view_segments()
+{
+    m_view_segments = !m_view_segments;
+}
+
+void Scene::toggle_view_points()
+{
+    m_view_points = !m_view_points;
+}
+
+void Scene::toggle_view_plane()
+{
+    m_view_plane = !m_view_plane;
+}
+
+void Scene::refine_bisection(const FT max_sqlen)
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+    std::cout << "Refine through recursive longest edge bisection...";
+    Refiner<Kernel,Polyhedron> refiner(m_pPolyhedron);
+    refiner(max_sqlen);
+    std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
+
+    clear_internal_data();
+}
+
+void Scene::refine_loop()
+{
+    if(m_pPolyhedron == NULL)
+    {
+        std::cout << "Load polyhedron first." << std::endl;
+        return;
+    }
+    std::cout << "Loop subdivision...";
+    CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron, 1);
+    std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
+
+    clear_internal_data();
+}
+
+
+void Scene::activate_cutting_plane()
+{
+    connect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane()));
+    m_view_plane = true;
+}
+
+void Scene::deactivate_cutting_plane()
+{
+    disconnect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane()));
+    m_view_plane = false;
+}
+void Scene::initGL()
+{
+    gl = new QOpenGLFunctions_2_1();
+   if(!gl->initializeOpenGLFunctions())
+    {
+        qFatal("ERROR : OpenGL Functions not initialized. Check your OpenGL Verison (should be >=3.3)");
+        exit(1);
+    }
+
+    gl->glGenTextures(1, &textureId);
+    compile_shaders();
+    gl_init = true;
+}
+
+void Scene::timerEvent(QTimerEvent *)
+{
+    if(manipulatedFrame()->isSpinning())
+        set_fast_distance(true);
+    ready_to_cut = true;
+}
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.h b/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.h
new file mode 100644
index 0000000..f63cdb8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/Scene.h
@@ -0,0 +1,264 @@
+#ifndef SCENE_H
+#define SCENE_H
+
+#include <QtOpenGL/qgl.h>
+#include <iostream>
+#include <cmath>
+
+#include <CGAL/AABB_intersections.h> 
+#include "types.h"
+#include "Color_ramp.h"
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+
+#include <QtCore/qglobal.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <QOpenGLTexture>
+
+class Texture{
+private:
+     int Width;
+     int Height;
+     int size;
+    GLubyte *data;
+public:
+    Texture(int w, int h)
+    {
+        Width = w;
+        Height = h;
+        size = 3*Height*Width;
+        data = new GLubyte[Height*Width*3];
+    }
+    int getWidth() const {return Width;}
+    int getHeight() const {return Height;}
+    int getSize() const {return size;}
+    void setData(int i, int j, int r, int g, int b){
+        data[3*(Width*j+i) + 0] = r;
+        data[3*(Width*j+i) + 1] = g;
+        data[3*(Width*j+i) + 2] = b;
+    }
+
+    GLubyte* getData(){return data; }
+
+};
+class Viewer;
+class Scene : public QObject
+{
+    Q_OBJECT
+public:
+    Scene();
+    virtual ~Scene();
+public:
+    // types
+    typedef CGAL::Bbox_3 Bbox;
+    
+private:
+    typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron>         Facet_Primitive;
+    typedef CGAL::AABB_traits<Kernel, Facet_Primitive>                  Facet_Traits;
+    typedef CGAL::AABB_tree<Facet_Traits>                               Facet_tree;
+  
+    typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron>     Edge_Primitive;
+    typedef CGAL::AABB_traits<Kernel, Edge_Primitive>                   Edge_Traits;
+    typedef CGAL::AABB_tree<Edge_Traits>                                Edge_tree;
+    
+    typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+    
+    enum Cut_planes_types {
+        NONE, UNSIGNED_FACETS, SIGNED_FACETS, UNSIGNED_EDGES, CUT_SEGMENTS
+    };
+  
+public:
+    QGLContext* context;
+    void draw(QGLViewer*);
+    void update_bbox();
+    Bbox bbox() { return m_bbox; }
+    ManipulatedFrame* manipulatedFrame() const { return m_frame; }
+    void initGL();
+
+private:
+    // member data
+    QOpenGLFunctions_2_1 *gl;
+    Bbox m_bbox;
+    Polyhedron *m_pPolyhedron;
+    std::list<Point> m_points;
+    std::list<Segment> m_segments;
+    std::vector<Segment> m_cut_segments;
+    bool ready_to_cut;
+    bool gl_init;
+
+    // distance functions (simple 2D arrays)
+    Color_ramp m_red_ramp;
+    Color_ramp m_blue_ramp;
+    Color_ramp m_thermal_ramp;
+    FT m_max_distance_function;
+    typedef std::pair<Point,FT> Point_distance;
+    Point_distance m_distance_function[100][100];
+  
+    // frame
+    ManipulatedFrame* m_frame;
+    bool m_view_plane;
+    int m_grid_size;
+    bool m_fast_distance;
+
+    // An aabb_tree indexing polyhedron facets/segments
+    Facet_tree m_facet_tree;
+    Edge_tree m_edge_tree;
+    
+    Cut_planes_types m_cut_plane;
+    bool are_buffers_initialized;
+  
+private:
+    // utility functions
+    Vector random_vector();
+    Ray random_ray(const Bbox& bbox);
+    Line random_line(const Bbox& bbox);
+    Point random_point(const Bbox& bbox);
+    Plane random_plane(const Bbox& bbox);
+    Segment random_segment(const Bbox& bbox);
+    FT random_in(const double a,const double b);
+    Plane frame_plane() const;
+    Aff_transformation frame_transformation() const;
+    FT bbox_diag() const;
+    void build_facet_tree();
+    void build_edge_tree();
+    void clear_internal_data();
+    void update_grid_size();
+
+    template <typename Tree>
+    void compute_distance_function(const Tree& tree);
+    
+    template <typename Tree>
+    void sign_distance_function(const Tree& tree);
+
+    //Shaders elements
+
+    int poly_vertexLocation;
+    int tex_Location;
+    int points_vertexLocation;
+    int lines_vertexLocation;
+    int mvpLocation;
+    int tex_mvpLocation;
+    int fLocation;
+    int tex_fLocation;
+    int colorLocation;
+
+
+
+    std::vector<float> pos_points;
+    std::vector<float> pos_grid;
+    std::vector<float> pos_lines;
+    std::vector<float> pos_poly;
+    std::vector<float> pos_plane;
+    std::vector<float> pos_cut_segments;
+    std::vector<float> tex_map;
+    GLuint textureId;
+
+    Texture *texture;
+    GLint sampler_location;
+    QOpenGLBuffer buffers[10];
+    QOpenGLVertexArrayObject vao[10];
+    QOpenGLShaderProgram tex_rendering_program;
+    QOpenGLShaderProgram rendering_program;
+    void initialize_buffers();
+    void compute_elements(int mode);
+    void attrib_buffers(QGLViewer*);
+    void compile_shaders();
+    void compute_texture(int, int, Color_ramp, Color_ramp);
+
+public:
+    // file menu
+    int open(QString filename);
+
+    // edit menu
+    void clear_points() { m_points.clear(); changed(); }
+    void clear_segments() { m_segments.clear(); changed(); }
+    void clear_cutting_plane();
+    
+    // fast distance setter
+    void set_fast_distance(bool b) { m_fast_distance = b; update_grid_size(); }
+
+    // algorithms
+    void generate_edge_points(const unsigned int nb_points);
+    void generate_inside_points(const unsigned int nb_points);
+    void generate_boundary_points(const unsigned int nb_points);
+    void generate_boundary_segments(const unsigned int nb_slices);
+    void generate_points_in(const unsigned int nb_points,
+        const double min, const double max);
+
+    // algorithms/refine
+    void refine_loop();
+    void refine_bisection(const FT max_sqlen);
+
+    // distance functions 
+    void signed_distance_function();
+    void unsigned_distance_function();
+    void unsigned_distance_function_to_edges();
+    void cut_segment_plane();
+
+    // toggle view options
+    void toggle_view_points();
+    void toggle_view_segments();
+    void toggle_view_poyhedron();
+    void toggle_view_plane();
+
+    // view options
+    bool m_view_points;
+    bool m_view_segments;
+    bool m_view_polyhedron;
+
+    // benchmarks 
+    enum {DO_INTERSECT,
+        ANY_INTERSECTION,
+        NB_INTERSECTIONS,
+        ALL_INTERSECTIONS,
+        ANY_INTERSECTED_PRIMITIVE,
+        ALL_INTERSECTED_PRIMITIVES};
+    void bench_memory();
+    void bench_construction();
+    void bench_distances_vs_nbt();
+    void bench_intersections_vs_nbt();
+    void benchmark_intersections(const double duration);
+    std::size_t nb_digits(const std::size_t value);
+
+    template <class Query>
+    void bench_intersection(Facet_tree& tree,const int function,const double duration,
+        const char *query_name, const std::vector<Query>& queries, const int nb_queries);
+    void bench_intersections(Facet_tree& tree, const double duration, const int function,
+        const char *function_name, const std::vector<Ray>& rays,
+        const std::vector<Line>& lines, const std::vector<Plane>& planes,
+        const std::vector<Segment>& segments, const int nb_queries);
+
+    // distance benchmarks
+    enum {SQ_DISTANCE,
+        CLOSEST_POINT,
+        CLOSEST_POINT_AND_PRIMITIVE_ID};
+    void benchmark_distances(const double duration);
+    void bench_closest_point(Facet_tree& tree,const double duration);
+    void bench_squared_distance(Facet_tree& tree,const double duration);
+    void bench_closest_point_and_primitive(Facet_tree& tree,const double duration);
+    void bench_distance(Facet_tree& tree,const int function,const double duration);
+
+    // cutting plane activation/deactivation
+    void activate_cutting_plane();
+    void deactivate_cutting_plane();
+
+    //timer sends a top when all the events are finished
+    void timerEvent(QTimerEvent *);
+
+  
+public slots:
+    // cutting plane
+    void cutting_plane(bool override = false);
+    void changed();
+}; // end class Scene
+
+#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.cpp b/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.cpp
new file mode 100644
index 0000000..2f411de
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.cpp
@@ -0,0 +1,65 @@
+#include "Viewer.h"
+#include "Scene.h"
+#include <QMouseEvent>
+#include <QGLFunctions>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+Viewer::Viewer(QWidget* parent)
+  : QGLViewer(CGAL::Qt::createOpenGLContext(),parent),
+    m_pScene(NULL),
+    m_custom_mouse(false)
+{
+}
+
+void Viewer::setScene(Scene* pScene)
+{
+  this->m_pScene = pScene;
+}
+
+void Viewer::draw()
+{
+  glEnable(GL_DEPTH_TEST);
+  QGLViewer::draw();
+  if(m_pScene != NULL)
+  {
+      m_pScene->draw(this);
+  }
+
+}
+
+void Viewer::initializeGL()
+{
+  QGLViewer::initializeGL();
+  setBackgroundColor(::Qt::white);
+  //m_pScene->initGL(this);
+}
+
+void Viewer::mousePressEvent(QMouseEvent* e)
+{
+  if ( e->modifiers() == Qt::ControlModifier )
+  {
+    m_pScene->set_fast_distance(true);
+    // Refresh distance function
+    m_pScene->cutting_plane(true);
+    m_custom_mouse = true;
+  }
+  
+  QGLViewer::mousePressEvent(e);
+}
+
+void Viewer::mouseReleaseEvent(QMouseEvent* e)
+{
+  if ( m_custom_mouse )
+  {
+    m_pScene->set_fast_distance(false);
+    // Recompute distance function
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    m_pScene->cutting_plane(true);
+    QApplication::restoreOverrideCursor();
+      
+    m_custom_mouse = false;
+  }
+  
+  QGLViewer::mouseReleaseEvent(e);
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.h b/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.h
new file mode 100644
index 0000000..5361bc1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/AABB_tree/Viewer.h
@@ -0,0 +1,31 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <QGLViewer/qglviewer.h>
+
+
+// forward declarations
+class QWidget;
+class Scene;
+class Viewer : public QGLViewer{
+
+  Q_OBJECT
+
+public:
+  Viewer(QWidget * parent);
+
+  // overload several QGLViewer virtual functions
+  void draw();
+  void initializeGL();
+  void setScene(Scene* pScene);
+
+protected:
+  virtual void mousePressEvent(QMouseEvent* e);
+  virtual void mouseReleaseEvent(QMouseEvent* e);
+  
+private:
+  Scene* m_pScene;
+  bool m_custom_mouse;
+}; // end class Viewer
+
+#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/benchmarks.cpp b/3rdparty/CGAL-4.8/demo/AABB_tree/benchmarks.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/benchmarks.cpp
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/benchmarks.cpp
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/data/hand.off b/3rdparty/CGAL-4.8/demo/AABB_tree/data/hand.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/data/hand.off
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/data/hand.off
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/data/knot.off b/3rdparty/CGAL-4.8/demo/AABB_tree/data/knot.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/data/knot.off
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/data/knot.off
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/data/part.off b/3rdparty/CGAL-4.8/demo/AABB_tree/data/part.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/data/part.off
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/data/part.off
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/data/u.off b/3rdparty/CGAL-4.8/demo/AABB_tree/data/u.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/data/u.off
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/data/u.off
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/resources/about.html b/3rdparty/CGAL-4.8/demo/AABB_tree/resources/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/resources/about.html
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/resources/about.html
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/resources/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/AABB_tree/resources/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/resources/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/resources/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/types.h b/3rdparty/CGAL-4.8/demo/AABB_tree/types.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/types.h
rename to 3rdparty/CGAL-4.8/demo/AABB_tree/types.h
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.cpp b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.cpp
new file mode 100644
index 0000000..4d85393
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.cpp
@@ -0,0 +1,309 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+#include <CGAL/Alpha_shape_2.h>
+
+#include <CGAL/point_generators_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/AlphaShapeGraphicsItem.h>
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Alpha_shapes_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef CGAL::Alpha_shape_vertex_base_2<K> Vb;
+typedef CGAL::Alpha_shape_face_base_2<K>  Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
+typedef CGAL::Delaunay_triangulation_2<K, Tds> Delaunay;
+
+typedef CGAL::Alpha_shape_2<Delaunay> Alpha_shape_2;
+
+typedef Alpha_shape_2::Alpha_iterator Alpha_iterator;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Alpha_shapes_2
+{
+  Q_OBJECT
+  
+private:  
+  double alpha;
+  std::vector<Point_2> points;
+  Alpha_shape_2 as; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::AlphaShapeGraphicsItem<Alpha_shape_2> * agi;
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void alphaChanged(int i);
+
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the alpha shape
+  agi = new CGAL::Qt::AlphaShapeGraphicsItem<Alpha_shape_2>(&as);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   agi, SLOT(modelChanged()));
+
+  agi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  agi->setEdgesPen(QPen(Qt::lightGray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  agi->setRegularEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  agi->setSingularEdgesPen(QPen(Qt::cyan, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  agi->setRegularFacesBrush(QBrush(Qt::cyan));
+  scene.addItem(agi);
+
+  // 
+  // Manual handling of actions
+  //
+
+
+  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
+		   this, SLOT(alphaChanged(int)));
+
+  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)),
+		   this, SLOT(alphaChanged(int)));
+
+  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
+		   this->alphaBox, SLOT(setValue(int)));
+
+  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)), 
+		   this->alphaSlider, SLOT(setValue(int)));
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1, false); // inputs a list with one point
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+   
+  scene.installEventFilter(pi);
+  //this->actionShowAlphaShape->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Alpha_shapes_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::list<Point_2> input;
+  if(CGAL::assign(input, o)){
+    if(input.size() == 1) {
+      points.push_back(input.front());
+      as.make_alpha_shape(points.begin(), points.end());
+      as.set_alpha(alpha);
+    }
+    Q_EMIT( changed());
+  }
+}
+
+void MainWindow::alphaChanged(int i)
+{
+  if (as.number_of_alphas() > 0){
+    if(i < 100){
+      int n = static_cast<int>((i * as.number_of_alphas())/ 100);
+      if(n == 0) n++;
+      alpha = as.get_nth_alpha(n);
+      as.set_alpha(alpha);
+    } else {
+      Alpha_iterator alpha_end_it = as.alpha_end();
+      alpha = (*(--alpha_end_it))+1;
+      as.set_alpha(alpha);
+    }
+  } else {
+    alpha = 0;
+    as.set_alpha(0);
+  }
+  Q_EMIT( changed());
+}
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  as.clear();
+  points.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;  
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     100,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  points.reserve(points.size() + number_of_points);
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(*pg++);
+  }
+  as.make_alpha_shape(points.begin(), points.end());
+  as.set_alpha(alpha);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+
+void
+MainWindow::open(QString fileName)
+{
+  std::cerr << "open " << std::endl;
+  std::cerr << qPrintable(fileName) << std::endl;
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  while(ifs >> p) {
+    points.push_back(p);
+  }
+  as.make_alpha_shape(points.begin(), points.end());
+  as.set_alpha(alpha);
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(agi->boundingRect());
+  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Alpha_shapes_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Alpha_shape_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.qrc b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.ui b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/Alpha_shapes_2.ui
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_2/Alpha_shapes_2.ui
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/CMakeLists.txt
new file mode 100644
index 0000000..66675dd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Alpha_shapes_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# The "Delaunay" demo: Alpha_shapes_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Alpha_shapes_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Alpha_shapes_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc )
+
+# The executable itself.
+add_executable  ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 )
+
+# Link with Qt libraries
+target_link_libraries( Alpha_shapes_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/about_Alpha_shapes_2.html b/3rdparty/CGAL-4.8/demo/Alpha_shapes_2/about_Alpha_shapes_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/about_Alpha_shapes_2.html
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_2/about_Alpha_shapes_2.html
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.cpp b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.cpp
new file mode 100644
index 0000000..6b03dd5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.cpp
@@ -0,0 +1,31 @@
+
+#include "MainWindow.h"
+#include "typedefs.h"
+#include <QApplication>
+
+
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char** argv)
+{
+ QApplication application(argc,argv);
+ 
+  application.setOrganizationDomain("geometryfactory.com");
+  application.setOrganizationName("GeometryFactory");
+  application.setApplicationName("Alpha Shape Reconstruction");
+  //for Windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  application.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGALQt (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Alpha_shape_3);
+  
+  MainWindow mw;
+  mw.show();
+
+  return application.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.qrc b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/Alpha_shape_3.qrc
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Alpha_shape_3.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/CMakeLists.txt
new file mode 100644
index 0000000..6613a77
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Alpha_shape_3)
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+find_package(OpenGL)
+find_package(QGLViewer)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+
+ # include(${QT_USE_FILE})
+
+  include_directories (${QGLVIEWER_INCLUDE_DIR})
+  include_directories (BEFORE ../../include ./ )
+
+  # ui file, created wih Qt Designer
+  qt5_wrap_ui( uis MainWindow.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( RESOURCE_FILES ./Alpha_shape_3.qrc )
+
+  add_executable  ( Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis}  ${RESOURCE_FILES} )
+  qt5_use_modules(Alpha_shape_3 Xml Script OpenGL Svg)
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shape_3 )
+
+  target_link_libraries( Alpha_shape_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+  target_link_libraries( Alpha_shape_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
+  target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.cpp
new file mode 100644
index 0000000..a189679
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.cpp
@@ -0,0 +1,112 @@
+
+#include "MainWindow.h"
+
+MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent)
+{
+  setupUi(this);
+  this->viewer->setScene(&scene);
+  connectActions();
+  this->addAboutDemo(":/cgal/help/about_Alpha_shapes_3.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::connectActions()
+{
+  QObject::connect(this->actionLoad_New_File, SIGNAL(triggered()), 
+		   this, SLOT(open_file()));
+
+  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
+		   this, SLOT(alphaChanged(int)));
+
+  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)),
+		   this, SLOT(alphaChanged(int)));
+
+  QObject::connect(this->alphaSlider, SIGNAL(valueChanged(int)), 
+		   this->alphaBox, SLOT(setValue(int)));
+
+  QObject::connect(this->alphaBox, SIGNAL(valueChanged(int)), 
+		   this->alphaSlider, SLOT(setValue(int)));
+
+  QObject::connect(this, SIGNAL(sceneChanged()), 
+		   this->viewer, SLOT(sceneChanged()));
+
+  QObject::connect(this, SIGNAL(alphaChanged()), 
+		   this->viewer, SLOT(update()));
+
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   qApp, SLOT(quit()));
+}
+
+void
+MainWindow::open_file()
+{
+
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points File"),
+						  "./data",
+						  tr("pts files (*.pts)"));
+
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void 
+MainWindow::alphaChanged(int i)
+{
+  if (scene.alpha_shape.number_of_alphas() > 0){
+    if(i < 100){
+      int n = static_cast<int>((i * scene.alpha_shape.number_of_alphas())/ 100);
+      if(n == 0) n++;
+      scene.alpha_shape.set_alpha(scene.alpha_shape.get_nth_alpha(n));
+    } else {
+      Alpha_iterator alpha_end_it = scene.alpha_shape.alpha_end();
+      scene.alpha_shape.set_alpha((*(--alpha_end_it))+1);
+    }
+  } else {
+    scene.alpha_shape.set_alpha(0);
+  }
+  viewer->alphaChanged();  
+  Q_EMIT(alphaChanged());
+}
+
+void
+MainWindow::open(QString fileName)
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  scene.alpha_shape.clear();
+  scene.points.clear();
+  std::ifstream ifs(qPrintable(fileName));
+  int n;
+  ifs >> n;
+  Point_3 p;
+  for(int i=0; i<n; i++){
+    ifs >> p;
+    scene.points.push_back(p);
+  }
+  timer.reset();
+  timer.start();
+  scene.alpha_shape.make_alpha_shape(scene.points.begin(), scene.points.end());
+  scene.alpha_shape.set_alpha(16);
+  timer.stop();
+  
+
+  alphaSlider->setRange(0,100);
+  alphaSlider->setSliderPosition(50);
+
+  this->addToRecentFiles(fileName);
+  QApplication::restoreOverrideCursor();
+  viewer->changed();
+  Q_EMIT(sceneChanged());
+}
+
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.h b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.h
new file mode 100644
index 0000000..9aee5f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.h
@@ -0,0 +1,40 @@
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include "typedefs.h"
+#include "ui_MainWindow.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+#include <QSlider>
+#include <QFileDialog>
+class QWidget;
+
+
+
+
+class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
+{
+  Q_OBJECT
+
+  public:
+  MainWindow(QWidget* parent = 0);
+
+  void connectActions();
+
+
+  Scene scene;
+  Timer timer;
+
+public Q_SLOTS:
+  virtual void open(QString fileName);
+  void open_file();
+  void alphaChanged(int i);
+
+  Q_SIGNALS:
+  void sceneChanged();
+  void alphaChanged();
+};
+
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/MainWindow.ui
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.cpp
new file mode 100644
index 0000000..a5a0dd2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.cpp
@@ -0,0 +1,389 @@
+#include "Viewer.h"
+#include <vector>
+#include <CGAL/bounding_box.h>
+#include <QGLViewer/vec.h>
+#include "CGAL/Qt/CreateOpenGLContext.h"
+
+Viewer::Viewer(QWidget* parent)
+  : QGLViewer(CGAL::Qt::createOpenGLContext(),parent)
+{
+  are_buffers_initialized = false;
+}
+
+
+void Viewer::compile_shaders()
+{
+    initializeOpenGLFunctions();
+    if(! buffers[0].create() || !buffers[1].create() || !buffers[2].create()  )
+    {
+        std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() )
+    {
+        std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+
+    //Facets
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+         "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex;\n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform highp vec4 color; \n"
+        "uniform vec4 light_pos;  \n"
+        "uniform vec4 light_diff; \n"
+        "uniform vec4 light_spec; \n"
+        "uniform vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = abs(dot(N,L)) * light_diff * color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+        "gl_FragColor = light_amb*color + diffuse + specular ; \n"
+        "} \n"
+        "\n"
+    };
+QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+if(!vertex_shader->compileSourceCode(vertex_source))
+{
+    std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+}
+
+QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+if(!fragment_shader->compileSourceCode(fragment_source))
+{
+    std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+}
+
+if(!rendering_program.addShader(vertex_shader))
+{
+    std::cerr<<"adding vertex shader FAILED"<<std::endl;
+}
+if(!rendering_program.addShader(fragment_shader))
+{
+    std::cerr<<"adding fragment shader FAILED"<<std::endl;
+}
+if(!rendering_program.link())
+{
+    std::cerr<<"linking Program FAILED"<<std::endl;
+}
+rendering_program.bind();
+
+//Points
+
+//Vertex source code
+const char vertex_source_points[] =
+{
+    "#version 120 \n"
+    "attribute highp vec4 vertex;\n"
+
+    "uniform highp mat4 mvp_matrix;\n"
+    "void main(void)\n"
+    "{\n"
+    "   gl_Position = mvp_matrix * vertex;\n"
+    "}"
+};
+//Vertex source code
+const char fragment_source_points[] =
+{
+    "#version 120 \n"
+    "uniform highp vec4 color; \n"
+
+    "void main(void) { \n"
+    "gl_FragColor = color; \n"
+    "} \n"
+    "\n"
+};
+vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+if(!vertex_shader->compileSourceCode(vertex_source_points))
+{
+std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+}
+
+fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+if(!fragment_shader->compileSourceCode(fragment_source_points))
+{
+std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+}
+
+if(!rendering_program_points.addShader(vertex_shader))
+{
+std::cerr<<"adding vertex shader FAILED"<<std::endl;
+}
+if(!rendering_program_points.addShader(fragment_shader))
+{
+std::cerr<<"adding fragment shader FAILED"<<std::endl;
+}
+if(!rendering_program_points.link())
+{
+std::cerr<<"linking Program FAILED"<<std::endl;
+}
+rendering_program_points.bind();
+
+
+}
+
+void Viewer::initialize_buffers()
+{
+
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(pos_poly.data(),
+                        static_cast<int>(pos_poly.size()*sizeof(float)));
+    poly_vertexLocation = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(poly_vertexLocation);
+    rendering_program.setAttributeBuffer(poly_vertexLocation,GL_FLOAT,0,3);
+    buffers[0].release();
+
+    buffers[1].bind();
+    buffers[1].allocate(normals.data(), 
+                        static_cast<int>(normals.size()*sizeof(float)));
+    normalsLocation = rendering_program.attributeLocation("normal");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(normalsLocation);
+    rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3);
+    buffers[1].release();
+
+
+    rendering_program.release();
+    vao[0].release();
+
+    vao[1].bind();
+    buffers[2].bind();
+    buffers[2].allocate(pos_points.data(),
+                        static_cast<int>(pos_points.size()*sizeof(float)));
+    points_vertexLocation = rendering_program_points.attributeLocation("vertex");
+    rendering_program_points.bind();
+    rendering_program_points.enableAttributeArray(points_vertexLocation);
+    rendering_program_points.setAttributeBuffer(points_vertexLocation,GL_FLOAT,0,3);
+    buffers[2].release();
+
+
+    rendering_program_points.release();
+    vao[0].release();
+
+    are_buffers_initialized = true;
+}
+
+
+void Viewer::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    // define material
+     QVector4D	ambient(0.25f, 0.20725f, 0.20725f, 0.922f);
+     QVector4D	diffuse( 1.0f,
+                            0.829f,
+                            0.829f,
+                            0.922f );
+
+    QVector4D	specular(  0.6f,
+                            0.6f,
+                            0.6f,
+                            1.0f );
+
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+     GLfloat shininess =  11.264f;
+
+
+    rendering_program.bind();
+    mvpLocation = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation = rendering_program.uniformLocation("mv_matrix");
+    colorLocation = rendering_program.uniformLocation("color");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+    rendering_program.setUniformValue(mvpLocation, mvpMatrix);
+    rendering_program.setUniformValue(mvLocation, mvMatrix);
+
+
+    rendering_program.release();
+
+    rendering_program_points.bind();
+
+    mvpLocation_points = rendering_program_points.uniformLocation("mvp_matrix");
+    colorLocation_points = rendering_program_points.uniformLocation("color");
+    rendering_program_points.setUniformValue(mvpLocation_points, mvpMatrix);
+
+    rendering_program_points.release();
+}
+
+void Viewer::initializeGL()
+{
+  QGLViewer::initializeGL();
+  compile_shaders();
+}
+
+
+void
+Viewer::sceneChanged()
+{
+
+  Iso_cuboid_3 bb = CGAL::bounding_box(scene->points.begin(), scene->points.end());
+   
+  this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(), bb.ymin(), bb.zmin()),
+				      qglviewer::Vec(bb.xmax(),
+						     bb.ymax(),
+						     bb.zmax()));
+
+  this->showEntireScene();
+
+}
+
+void Viewer::compute_elements()
+{
+
+    normals.resize(0);
+    pos_points.resize(0);
+    pos_poly.resize(0);
+    for(std::list<Point_3>::iterator it = scene->points.begin();
+        it != scene->points.end();
+        ++it){
+        pos_points.push_back(it->x()); pos_points.push_back(it->y()); pos_points.push_back(it->z());
+    }
+
+    std::list<Facet> facets;
+    scene->alpha_shape.get_alpha_shape_facets(std::back_inserter(facets), Alpha_shape_3::REGULAR);
+
+    for(std::list<Facet>::iterator fit = facets.begin();
+        fit != facets.end();
+        ++fit) {
+      const Cell_handle& ch = fit->first;
+      const int index = fit->second;
+
+      //const Vector_3& n = ch->normal(index); // must be unit vector
+
+      const Point_3& a = ch->vertex((index+1)&3)->point();
+      const Point_3& b = ch->vertex((index+2)&3)->point();
+      const Point_3& c = ch->vertex((index+3)&3)->point();
+
+      Vector_3 v = CGAL::unit_normal(a,b,c);
+
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      pos_poly.push_back(a.x()); pos_poly.push_back(a.y()); pos_poly.push_back(a.z());
+      pos_poly.push_back(b.x()); pos_poly.push_back(b.y()); pos_poly.push_back(b.z());
+      pos_poly.push_back(c.x()); pos_poly.push_back(c.y()); pos_poly.push_back(c.z());
+
+    }
+
+
+}
+
+void
+Viewer::draw()
+{
+    glEnable(GL_DEPTH_TEST);
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+    //points
+    vao[1].bind();
+    attrib_buffers(this);
+    rendering_program_points.bind();
+    color.setRgbF(1.0f, 0.0f, 0.0f);
+    glPointSize(5);
+    ::glEnable(GL_POINT_SMOOTH);
+    rendering_program_points.setUniformValue(colorLocation_points, color);
+    glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+    rendering_program_points.release();
+    vao[1].release();
+    //facets
+    vao[0].bind();
+    attrib_buffers(this);
+    rendering_program.bind();
+    color.setRgbF(0.5f, 1.0f, 0.5f);
+    rendering_program.setUniformValue(colorLocation, color);
+    glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_poly.size()/3));
+    rendering_program.release();
+    vao[0].release();
+
+}
+
+void Viewer::alphaChanged()
+{
+
+    normals.resize(0);
+    pos_poly.resize(0);
+
+    std::list<Facet> facets;
+    scene->alpha_shape.get_alpha_shape_facets(std::back_inserter(facets), Alpha_shape_3::REGULAR);
+
+    for(std::list<Facet>::iterator fit = facets.begin();
+        fit != facets.end();
+        ++fit) {
+      const Cell_handle& ch = fit->first;
+      const int index = fit->second;
+
+      //const Vector_3& n = ch->normal(index); // must be unit vector
+
+      const Point_3& a = ch->vertex((index+1)&3)->point();
+      const Point_3& b = ch->vertex((index+2)&3)->point();
+      const Point_3& c = ch->vertex((index+3)&3)->point();
+
+      Vector_3 v = CGAL::unit_normal(a,b,c);
+
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      normals.push_back(v.x()); normals.push_back(v.y()); normals.push_back(v.z());
+      pos_poly.push_back(a.x()); pos_poly.push_back(a.y()); pos_poly.push_back(a.z());
+      pos_poly.push_back(b.x()); pos_poly.push_back(b.y()); pos_poly.push_back(b.z());
+      pos_poly.push_back(c.x()); pos_poly.push_back(c.y()); pos_poly.push_back(c.z());
+
+    }
+
+    initialize_buffers();
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.h b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.h
new file mode 100644
index 0000000..5280aa6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/Viewer.h
@@ -0,0 +1,76 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include "typedefs.h"
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+
+class Viewer : public QGLViewer, protected QOpenGLFunctions_2_1{
+  Q_OBJECT
+
+  CGAL::Timer timer;
+  Scene* scene;
+
+  int nr_of_facets;
+public:
+  Viewer(QWidget* parent);
+  ~Viewer()
+  {
+    buffers[0].destroy();
+    buffers[1].destroy();
+    buffers[2].destroy();
+    vao[0].destroy();
+    vao[1].destroy();
+  }
+  void setScene(Scene* scene_)
+  {
+    scene = scene_;
+  }
+
+  void clear();
+
+public:
+  void draw();
+
+private:
+  bool are_buffers_initialized;
+  //Shaders elements
+    int poly_vertexLocation;
+    int points_vertexLocation;
+    int normalsLocation;
+    int mvpLocation;
+    int mvpLocation_points;
+    int mvLocation;
+    int colorLocation;
+    int colorLocation_points;
+    int lightLocation[5];
+
+
+    std::vector<float> pos_points;
+    std::vector<float> pos_poly;
+    std::vector<float> normals;
+
+    QOpenGLBuffer buffers[3];
+    QOpenGLVertexArrayObject vao[2];
+    QOpenGLShaderProgram rendering_program;
+    QOpenGLShaderProgram rendering_program_points;
+    void initialize_buffers();
+    void compute_elements();
+    void attrib_buffers(QGLViewer*);
+    void compile_shaders();
+ public Q_SLOTS:
+    void initializeGL();
+    void sceneChanged();
+    void changed(){
+        compute_elements();
+        are_buffers_initialized = false;
+    }
+    void alphaChanged();
+
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/about_Alpha_shapes_3.html b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/about_Alpha_shapes_3.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/about_Alpha_shapes_3.html
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/about_Alpha_shapes_3.html
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_3/typedefs.h b/3rdparty/CGAL-4.8/demo/Alpha_shapes_3/typedefs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_3/typedefs.h
rename to 3rdparty/CGAL-4.8/demo/Alpha_shapes_3/typedefs.h
diff --git a/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.cpp b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.cpp
new file mode 100644
index 0000000..06b6664
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.cpp
@@ -0,0 +1,294 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Apollonius_graph_2.h>
+#include <CGAL/Apollonius_graph_hierarchy_2.h>
+#include <CGAL/Apollonius_graph_filtered_traits_2.h>
+#include <CGAL/point_generators_2.h>
+
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_real.hpp>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/ApolloniusGraphGraphicsItem.h>
+#include <CGAL/Qt/GraphicsViewCircleInput.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Apollonius_graph_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef K::Point_2 Point_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef CGAL::Apollonius_graph_filtered_traits_2<K,CGAL::Integral_domain_without_division_tag>  Gt;
+
+typedef Gt::Point_2                           Point_2;
+typedef K::Circle_2                         Circle_2;
+typedef Gt::Site_2                            Apollonius_site_2;
+typedef Gt::Site_2::Weight                    Weight;
+
+typedef CGAL::Apollonius_graph_2<Gt> Apollonius;
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Apollonius_graph_2
+{
+  Q_OBJECT
+  
+private:  
+  Apollonius ag; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::ApolloniusGraphGraphicsItem<Apollonius,K> * agi;
+  CGAL::Qt::GraphicsViewCircleInput<K> * ci;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+  
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  virtual void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  agi = new CGAL::Qt::ApolloniusGraphGraphicsItem<Apollonius, K>(&ag);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   agi, SLOT(modelChanged()));
+
+  agi->setSitesPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  agi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(agi);
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+
+  ci = new CGAL::Qt::GraphicsViewCircleInput<K>(this, &scene);
+  QObject::connect(ci, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  scene.installEventFilter(ci);
+
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Apollonius_graph_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::pair<Point_2, double> center_and_sr;
+  if(CGAL::assign(center_and_sr, o)){
+    ag.insert(Apollonius_site_2(center_and_sr.first, sqrt(center_and_sr.second)));
+    Q_EMIT( changed());
+  }
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  ag.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;  
+  Iso_rectangle_2 isor = convert(rect);
+  double width = isor.xmax() - isor.xmin();
+  
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+							 100,
+							 0,
+							(std::numeric_limits<int>::max)(),
+							1,
+							&ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::vector<Apollonius_site_2> points;
+  points.reserve(number_of_points);
+  boost::rand48 rng;
+  boost::uniform_real<> dist(0.005*width, 0.05*width);
+  boost::variate_generator<boost::rand48&, boost::uniform_real<> > radius(rng,dist);
+
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(Apollonius_site_2(*pg++,radius()));
+  }
+      ag.insert(points.begin(), points.end());
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  std::vector<K::Point_2> points;
+  while(ifs >> p) {
+    points.push_back(p);
+  }
+  //  ag.insert(points.begin(), points.end());
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  /*
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    for(Delaunay::Finite_vertices_iterator 
+          vit = ag.finite_vertices_begin(),
+          end = ag.finite_vertices_end();
+        vit!= end; ++vit)
+    {
+      ofs << vit->point() << std::endl;
+    }
+  }
+  */
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(agi->boundingRect());
+  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Apollonius_graph_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Apollonius_graph_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Apollonius_graph_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.qrc b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.ui b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Apollonius_graph_2/Apollonius_graph_2.ui
rename to 3rdparty/CGAL-4.8/demo/Apollonius_graph_2/Apollonius_graph_2.ui
diff --git a/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/CMakeLists.txt
new file mode 100644
index 0000000..4b6589b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Apollonius_graph_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Apollonius_graph_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Apollonius_graph_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc )
+
+# The executable itself.
+add_executable  ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 )
+
+# Link with Qt libraries
+target_link_libraries( Apollonius_graph_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Apollonius_graph_2/about_Apollonius_graph_2.html b/3rdparty/CGAL-4.8/demo/Apollonius_graph_2/about_Apollonius_graph_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Apollonius_graph_2/about_Apollonius_graph_2.html
rename to 3rdparty/CGAL-4.8/demo/Apollonius_graph_2/about_Apollonius_graph_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementCurveInputCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementCurveInputCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementCurveInputCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementCurveInputCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp
new file mode 100644
index 0000000..f38de59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.cpp
@@ -0,0 +1,241 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: $
+// $Id: $
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#include "ArrangementDemoPropertiesDialog.h"
+#include "ui_ArrangementDemoPropertiesDialog.h"
+#include "ArrangementDemoWindow.h"
+#include "PropertyValueDelegate.h"
+#include "DeleteCurveMode.h"
+#include "ArrangementDemoGraphicsView.h"
+
+ArrangementDemoPropertiesDialog::
+ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_,
+                                 Qt::WindowFlags f ) :
+  QDialog( parent_, f ),
+  parent( parent_ ),
+  ui( new Ui::ArrangementDemoPropertiesDialog )
+{
+  this->setupUi( );
+}
+
+QVariant ArrangementDemoPropertiesDialog::property( int index )
+{
+  // return invalid variant if something goes wrong
+  QVariant res;
+  if ( index < 0 || index >= this->ui->tableWidget->rowCount( ) )
+  {
+    return res;
+  }
+
+  QTableWidgetItem* item = this->ui->tableWidget->item( index, 0 );
+  if ( item == 0 )
+  {
+    return res;
+  }
+
+  // return user data, if it is set
+  QVariant myData = item->data( Qt::UserRole );
+ /*
+  if ( qVariantCanConvert< QColor >( myData ) ||
+       qVariantCanConvert< DeleteCurveMode >( myData ) )
+  {
+    return myData;
+  }
+  else
+  {
+    res = item->data( Qt::DisplayRole );
+  }
+ */
+
+  if ( myData.canConvert<QColor>() ||
+       myData.canConvert<DeleteCurveMode>())
+  {
+    return myData;
+  }
+  else
+  {
+    res = item->data( Qt::DisplayRole );
+  }
+  return res;
+}
+
+void ArrangementDemoPropertiesDialog::setupUi( )
+{
+  this->ui->setupUi( this );
+  PropertyValueDelegate* myDelegate = new PropertyValueDelegate;
+  this->ui->tableWidget->setItemDelegate( myDelegate );
+
+  // populate the table widget with items
+  QTableWidgetItem* edgeColorItem = new QTableWidgetItem;
+  QTableWidgetItem* vertexColorItem = new QTableWidgetItem;
+  QTableWidgetItem* edgeWidthItem = new QTableWidgetItem;
+  QTableWidgetItem* vertexRadiusItem = new QTableWidgetItem;
+  QTableWidgetItem* envelopeEdgeColorItem = new QTableWidgetItem;
+  QTableWidgetItem* envelopeVertexColorItem = new QTableWidgetItem;
+  QTableWidgetItem* envelopeEdgeWidthItem = new QTableWidgetItem;
+  QTableWidgetItem* envelopeVertexRadiusItem = new QTableWidgetItem;
+  QTableWidgetItem* verticalRayEdgeColorItem = new QTableWidgetItem;
+  QTableWidgetItem* verticalRayEdgeWidthItem = new QTableWidgetItem;
+  QTableWidgetItem* deleteCurveModeItem = new QTableWidgetItem;
+  QTableWidgetItem* gridSizeItem = new QTableWidgetItem;
+  QTableWidgetItem* gridColorItem = new QTableWidgetItem;
+
+  this->ui->tableWidget->setItem( int(EDGE_COLOR_KEY), 0, edgeColorItem );
+  this->ui->tableWidget->setItem( int(VERTEX_COLOR_KEY), 0, vertexColorItem );
+  this->ui->tableWidget->setItem( int(EDGE_WIDTH_KEY), 0, edgeWidthItem );
+  this->ui->tableWidget->setItem( int(VERTEX_RADIUS_KEY), 0, vertexRadiusItem );
+  this->ui->tableWidget->setItem( int(ENVELOPE_EDGE_COLOR_KEY), 0,
+                                  envelopeEdgeColorItem );
+  this->ui->tableWidget->setItem( int(ENVELOPE_VERTEX_COLOR_KEY), 0,
+                                  envelopeVertexColorItem );
+  this->ui->tableWidget->setItem( int(ENVELOPE_EDGE_WIDTH_KEY), 0,
+                                  envelopeEdgeWidthItem );
+  this->ui->tableWidget->setItem( int(ENVELOPE_VERTEX_RADIUS_KEY), 0,
+                                  envelopeVertexRadiusItem );
+  this->ui->tableWidget->setItem( int(VERTICAL_RAY_EDGE_COLOR_KEY), 0,
+                                  verticalRayEdgeColorItem );
+  this->ui->tableWidget->setItem( int(VERTICAL_RAY_EDGE_WIDTH_KEY), 0,
+                                  verticalRayEdgeWidthItem );
+  this->ui->tableWidget->setItem( int(DELETE_CURVE_MODE_KEY), 0,
+                                  deleteCurveModeItem );
+  this->ui->tableWidget->setItem( int(GRID_SIZE_KEY), 0, gridSizeItem );
+  this->ui->tableWidget->setItem( int(GRID_COLOR_KEY), 0, gridColorItem );
+
+  // fill in the items with data
+  this->updateUi( );
+}
+
+void ArrangementDemoPropertiesDialog::updateUi( )
+{
+  if ( this->parent == NULL )
+  {
+    return;
+  }
+  ArrangementDemoTabBase* currentTab = this->parent->getCurrentTab( );
+  if ( currentTab == NULL )
+  {
+    return;
+  }
+  CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
+  if ( agi == NULL )
+  {
+    return;
+  }
+
+  ArrangementDemoGraphicsView* view = currentTab->getView( );
+  EnvelopeCallbackBase* envelopeCallback = currentTab->getEnvelopeCallback( );
+  VerticalRayShootCallbackBase* verticalRayShootCallback =
+    currentTab->getVerticalRayShootCallback( );
+
+  QPen vertexPen = agi->getVerticesPen( );
+  QPen edgePen = agi->getEdgesPen( );
+  QBrush vertexPenBrush = vertexPen.brush( );
+  QBrush edgePenBrush = edgePen.brush( );
+  QColor vertexColor = vertexPenBrush.color( );
+  QColor edgeColor = edgePenBrush.color( );
+  unsigned int edgeWidth = edgePen.width( );
+  unsigned int vertexRadius = vertexPen.width( );
+  unsigned int gridSize = view->getGridSize( );
+  QColor gridColor = view->getGridColor( );
+  unsigned int envelopeEdgeWidth = envelopeCallback->getEnvelopeEdgeWidth( );
+  unsigned int envelopeVertexRadius =
+    envelopeCallback->getEnvelopeVertexRadius( );
+  QColor envelopeEdgeColor = envelopeCallback->getEnvelopeEdgeColor( );
+  QColor envelopeVertexColor = envelopeCallback->getEnvelopeVertexColor( );
+  unsigned int verticalRayEdgeWidth = verticalRayShootCallback->edgeWidth( );
+  QColor verticalRayEdgeColor = verticalRayShootCallback->edgeColor( );
+
+  QTableWidgetItem* edgeColorItem =
+    this->ui->tableWidget->item( int(EDGE_COLOR_KEY), 0 );
+  QTableWidgetItem* edgeWidthItem =
+    this->ui->tableWidget->item( int(EDGE_WIDTH_KEY), 0 );
+  QTableWidgetItem* vertexColorItem =
+    this->ui->tableWidget->item( int(VERTEX_COLOR_KEY), 0 );
+  QTableWidgetItem* vertexRadiusItem =
+    this->ui->tableWidget->item( int(VERTEX_RADIUS_KEY), 0 );
+  QTableWidgetItem* deleteCurveModeItem =
+    this->ui->tableWidget->item( int(DELETE_CURVE_MODE_KEY), 0 );
+  QTableWidgetItem* gridSizeItem =
+    this->ui->tableWidget->item( int( GRID_SIZE_KEY ), 0 );
+  QTableWidgetItem* gridColorItem =
+    this->ui->tableWidget->item( int( GRID_COLOR_KEY ), 0 );
+  QTableWidgetItem* envelopeEdgeColorItem =
+    this->ui->tableWidget->item( int(ENVELOPE_EDGE_COLOR_KEY), 0 );
+  QTableWidgetItem* envelopeEdgeWidthItem =
+    this->ui->tableWidget->item( int(ENVELOPE_EDGE_WIDTH_KEY), 0 );
+  QTableWidgetItem* envelopeVertexColorItem =
+    this->ui->tableWidget->item( int(ENVELOPE_VERTEX_COLOR_KEY), 0 );
+  QTableWidgetItem* envelopeVertexRadiusItem =
+    this->ui->tableWidget->item( int(ENVELOPE_VERTEX_RADIUS_KEY), 0 );
+  QTableWidgetItem* verticalRayEdgeColorItem =
+    this->ui->tableWidget->item( int(VERTICAL_RAY_EDGE_COLOR_KEY), 0 );
+  QTableWidgetItem* verticalRayEdgeWidthItem =
+    this->ui->tableWidget->item( int(VERTICAL_RAY_EDGE_WIDTH_KEY), 0 );
+
+  // arrangement properties
+  edgeColorItem->setData( Qt::DisplayRole, edgeColor );
+  edgeColorItem->setData( Qt::DecorationRole, edgeColor );
+  edgeColorItem->setData( Qt::UserRole, QVariant::fromValue( edgeColor ) );
+
+  edgeWidthItem->setData( Qt::DisplayRole, edgeWidth );
+
+  vertexColorItem->setData( Qt::DisplayRole, vertexColor );
+  vertexColorItem->setData( Qt::DecorationRole, vertexColor );
+  vertexColorItem->setData( Qt::UserRole, QVariant::fromValue( vertexColor ) );
+
+  vertexRadiusItem->setData( Qt::DisplayRole, vertexRadius );
+
+  // envelope properties
+  envelopeEdgeColorItem->setData( Qt::DisplayRole, envelopeEdgeColor );
+  envelopeEdgeColorItem->setData( Qt::DecorationRole, envelopeEdgeColor );
+  envelopeEdgeColorItem->setData( Qt::UserRole,
+                                  QVariant::fromValue( envelopeEdgeColor ) );
+
+  envelopeEdgeWidthItem->setData( Qt::DisplayRole, envelopeEdgeWidth );
+
+  envelopeVertexColorItem->setData( Qt::DisplayRole, envelopeVertexColor );
+  envelopeVertexColorItem->setData( Qt::DecorationRole, envelopeVertexColor );
+  envelopeVertexColorItem->setData( Qt::UserRole,
+                                    QVariant::fromValue(envelopeVertexColor));
+
+  envelopeVertexRadiusItem->setData( Qt::DisplayRole, envelopeVertexRadius );
+
+  // vertical ray properties
+  verticalRayEdgeColorItem->setData( Qt::DisplayRole, verticalRayEdgeColor );
+  verticalRayEdgeColorItem->setData( Qt::DecorationRole, verticalRayEdgeColor );
+  verticalRayEdgeColorItem->setData( Qt::UserRole,
+                                     QVariant::fromValue(verticalRayEdgeColor));
+
+  verticalRayEdgeWidthItem->setData( Qt::DisplayRole, verticalRayEdgeWidth );
+
+  // delete curve properties
+  DeleteCurveMode deleteCurveMode;
+  deleteCurveModeItem->setData( Qt::DisplayRole,
+                                DeleteCurveMode::ToString( deleteCurveMode ) );
+  deleteCurveModeItem->setData( Qt::UserRole,
+                                QVariant::fromValue( deleteCurveMode ) );
+
+  // grid properties
+  gridSizeItem->setData( Qt::DisplayRole, gridSize );
+
+  gridColorItem->setData( Qt::DisplayRole, gridColor );
+  gridColorItem->setData( Qt::DecorationRole, gridColor );
+  gridColorItem->setData( Qt::UserRole, QVariant::fromValue( gridColor ) );
+
+}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.ui b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.ui
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoPropertiesDialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoTab.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoTab.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoTab.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoTab.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoTab.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoTab.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoTab.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoTab.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp
new file mode 100644
index 0000000..8adfd13
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp
@@ -0,0 +1,1255 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#include "ArrangementDemoWindow.h"
+#include "NewTabDialog.h"
+#include "OverlayDialog.h"
+#include "ArrangementDemoPropertiesDialog.h"
+#include "ArrangementDemoTab.h"
+#include "Conic_reader.h"
+
+#include "DeleteCurveMode.h"
+#include "ArrangementGraphicsItem.h"
+
+#include <boost/math/special_functions/fpclassify.hpp>
+
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QColorDialog>
+
+#include <CGAL/IO/Arr_with_history_iostream.h>
+#include <CGAL/IO/Arr_text_formatter.h>
+#include <CGAL/IO/Arr_with_history_text_formatter.h>
+
+ArrangementDemoWindow::ArrangementDemoWindow(QWidget* parent) :
+  CGAL::Qt::DemosMainWindow( parent ),
+  lastTabIndex(static_cast<unsigned int>(-1)),
+  ui( new Ui::ArrangementDemoWindow )
+{
+  this->setupUi( );
+
+  // set up the demo window
+  // ArrangementDemoTabBase* demoTab =
+  this->makeTab( SEGMENT_TRAITS );
+  this->setupStatusBar( );
+  this->setupOptionsMenu( );
+  this->addAboutDemo( ":/help/about.html" );
+  this->addAboutCGAL( );
+
+  // set up callbacks
+  QObject::connect( this->modeGroup, SIGNAL( triggered( QAction* ) ),
+                    this, SLOT( updateMode( QAction* ) ) );
+  QObject::connect( this->envelopeGroup, SIGNAL( triggered( QAction* ) ),
+                    this, SLOT( updateEnvelope( QAction* ) ) );
+  QObject::connect( this->snapGroup, SIGNAL( triggered( QAction* ) ),
+                    this, SLOT( updateSnapping( QAction* ) ) );
+
+  QObject::connect( this->conicTypeGroup, SIGNAL( triggered( QAction* ) ),
+                    this, SLOT( updateConicType( QAction* ) ) );
+}
+
+ArrangementDemoWindow::~ArrangementDemoWindow() {}
+
+ArrangementDemoTabBase* ArrangementDemoWindow::makeTab( TraitsType tt )
+{
+  static int tabLabelCounter = 1;
+  QString tabLabel;
+
+  ArrangementDemoTabBase* demoTab;
+  Seg_arr* seg_arr;
+  Pol_arr* pol_arr;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic_arr;
+#endif
+
+  Lin_arr* lin_arr;
+  Arc_arr* arc_arr;
+  // Alg_seg_arr* alg_seg_arr;
+  CGAL::Object arr;
+
+  switch ( tt )
+  {
+   default:
+   case SEGMENT_TRAITS:
+    seg_arr = new Seg_arr;
+    demoTab = new ArrangementDemoTab< Seg_arr >( seg_arr, 0 );
+    arr = CGAL::make_object( seg_arr );
+    tabLabel = QString( "%1 - Segment" ).arg( tabLabelCounter++ );
+    break;
+   case POLYLINE_TRAITS:
+    pol_arr = new Pol_arr;
+    demoTab = new ArrangementDemoTab< Pol_arr >( pol_arr, 0 );
+    arr = CGAL::make_object( pol_arr );
+    tabLabel = QString( "%1 - Polyline" ).arg( tabLabelCounter++ );
+    break;
+
+#ifdef CGAL_USE_CORE
+   case CONIC_TRAITS:
+    conic_arr = new Conic_arr;
+    demoTab = new ArrangementDemoTab< Conic_arr >( conic_arr, 0 );
+    arr = CGAL::make_object( conic_arr );
+    tabLabel = QString( "%1 - Conic" ).arg( tabLabelCounter++ );
+    break;
+#endif
+
+   case LINEAR_TRAITS:
+    lin_arr = new Lin_arr;
+    demoTab = new ArrangementDemoTab< Lin_arr >( lin_arr, 0 );
+    arr = CGAL::make_object( lin_arr );
+    tabLabel = QString( "%1 - Linear" ).arg( tabLabelCounter++ );
+    break;
+   case CIRCULAR_ARC_TRAITS:
+    arc_arr = new Arc_arr;
+    demoTab = new ArrangementDemoTab< Arc_arr >( arc_arr, 0 );
+    arr = CGAL::make_object( arc_arr );
+    tabLabel = QString( "%1 - Circular Arc" ).arg( tabLabelCounter++ );
+    break;
+   // case ALGEBRAIC_TRAITS:
+   //  alg_seg_arr = new Alg_seg_arr;
+   //  demoTab = new ArrangementDemoTab< Alg_seg_arr >( alg_seg_arr, 0 );
+   //  arr = CGAL::make_object( alg_seg_arr );
+   //  tabLabel = QString( "%1 - Algebraic" ).arg( tabLabelCounter++ );
+   //  break;
+  }
+
+  this->arrangements.push_back( arr );
+  this->tabs.push_back( demoTab );
+
+  QGraphicsView* view = demoTab->getView( );
+  this->addNavigation( view );
+  this->ui->tabWidget->addTab( demoTab, tabLabel );
+  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
+  this->ui->tabWidget->setCurrentWidget( demoTab );
+
+  this->resetCallbackState( this->ui->tabWidget->currentIndex( ) );
+  this->removeCallback( this->ui->tabWidget->currentIndex( ) );
+  this->updateMode( this->modeGroup->checkedAction( ) );
+  this->updateFillColorSwatch( );
+
+  return demoTab;
+}
+
+ArrangementDemoTabBase* ArrangementDemoWindow::getTab( unsigned int tabIndex )
+  const
+{
+  if (tabIndex > this->tabs.size()) return NULL;
+  return this->tabs[tabIndex];
+}
+
+ArrangementDemoTabBase* ArrangementDemoWindow::getCurrentTab( ) const
+{
+  int currentIndex = this->ui->tabWidget->currentIndex( );
+  if ( currentIndex == -1 )
+    return NULL;
+
+  ArrangementDemoTabBase* res = this->tabs[ currentIndex ];
+  return res;
+}
+
+std::vector< QString > ArrangementDemoWindow::getTabLabels( ) const
+{
+  std::vector< QString > res;
+  for ( int i = 0; i < this->ui->tabWidget->count( ); ++i )
+  {
+    res.push_back( this->ui->tabWidget->tabText( i ) );
+  }
+  return res;
+}
+
+std::vector< CGAL::Object > ArrangementDemoWindow::getArrangements( ) const
+{
+  std::vector< CGAL::Object > res;
+  for ( unsigned int i = 0; i < this->arrangements.size( ); ++i )
+  {
+    res.push_back( this->arrangements[ i ] );
+  }
+  return res;
+}
+
+void ArrangementDemoWindow::setupUi( )
+{
+  this->ui->setupUi( this );
+
+  this->modeGroup = new QActionGroup( this );
+  this->modeGroup->addAction( this->ui->actionDrag );
+  this->modeGroup->addAction( this->ui->actionInsert );
+  this->modeGroup->addAction( this->ui->actionDelete );
+  this->modeGroup->addAction( this->ui->actionPointLocation );
+  this->modeGroup->addAction( this->ui->actionRayShootingUp );
+  this->modeGroup->addAction( this->ui->actionRayShootingDown );
+  this->modeGroup->addAction( this->ui->actionMerge );
+  this->modeGroup->addAction( this->ui->actionSplit );
+  this->modeGroup->addAction( this->ui->actionFill );
+  this->activeModes.push_back( this->ui->actionInsert );
+
+  this->envelopeGroup = new QActionGroup( this );
+  this->envelopeGroup->addAction( this->ui->actionLowerEnvelope );
+  this->envelopeGroup->addAction( this->ui->actionUpperEnvelope );
+  this->envelopeGroup->setExclusive( false );
+
+  this->snapGroup = new QActionGroup( this );
+  this->snapGroup->addAction( this->ui->actionSnapMode );
+  this->snapGroup->addAction( this->ui->actionGridSnapMode );
+  this->snapGroup->setExclusive( false );
+  this->ui->actionGridSnapMode->setEnabled( false );
+
+  this->conicTypeGroup = new QActionGroup( this );
+  this->conicTypeGroup->addAction( this->ui->actionConicSegment );
+  this->conicTypeGroup->addAction( this->ui->actionConicCircle );
+  this->conicTypeGroup->addAction( this->ui->actionConicEllipse );
+  this->conicTypeGroup->addAction( this->ui->actionConicThreePoint );
+  this->conicTypeGroup->addAction( this->ui->actionConicFivePoint );
+  this->conicTypeGroup->addAction( this->ui->actionCurveRay );
+  this->conicTypeGroup->addAction( this->ui->actionCurveLine );
+
+  this->updateFillColorSwatch( );
+}
+
+void ArrangementDemoWindow::updateMode( QAction* newMode )
+{
+  // QWidget* widget = this->ui->tabWidget->currentWidget( );
+  // ArrangementDemoTabBase* demoTab =
+  //   static_cast< ArrangementDemoTabBase* >( widget );
+  const unsigned int TabIndex = this->ui->tabWidget->currentIndex( );
+  if (TabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* activeTab = this->tabs[ TabIndex ];
+  QGraphicsScene* activeScene = activeTab->getScene( );
+  QGraphicsView* activeView = activeTab->getView( );
+
+  this->resetCallbackState( TabIndex );
+  this->removeCallback( TabIndex );
+
+  // update the active mode
+  this->activeModes.at( 0 ) = newMode;
+
+  // hook up the new active mode
+  if ( newMode == this->ui->actionInsert )
+  {
+    activeScene->installEventFilter( activeTab->getCurveInputCallback( ) );
+  }
+  else if ( newMode == this->ui->actionDrag )
+  {
+    activeView->setDragMode( QGraphicsView::ScrollHandDrag );
+  }
+  else if ( newMode == this->ui->actionDelete )
+  {
+    activeScene->installEventFilter( activeTab->getDeleteCurveCallback( ) );
+  }
+  else if ( newMode == this->ui->actionPointLocation )
+  {
+    activeScene->installEventFilter( activeTab->getPointLocationCallback( ) );
+  }
+  else if ( newMode == this->ui->actionRayShootingUp )
+  {
+    // -y is up for Qt, so we shoot down
+    activeTab->getVerticalRayShootCallback( )->setShootingUp( true );
+    activeScene->installEventFilter( activeTab->getVerticalRayShootCallback());
+  }
+  else if ( newMode == this->ui->actionRayShootingDown )
+  {
+    // the bottom of the viewport for Qt is +y, so we shoot up
+    activeTab->getVerticalRayShootCallback( )->setShootingUp( false );
+    activeScene->installEventFilter( activeTab->getVerticalRayShootCallback());
+  }
+  else if ( newMode == this->ui->actionMerge )
+  {
+    activeScene->installEventFilter( activeTab->getMergeEdgeCallback( ) );
+  }
+  else if ( newMode == this->ui->actionSplit )
+  {
+    activeScene->installEventFilter( activeTab->getSplitEdgeCallback( ) );
+  }
+  else if ( newMode == this->ui->actionFill )
+  {
+    activeScene->installEventFilter( activeTab->getFillFaceCallback( ) );
+  }
+  this->updateFillColorSwatch( );
+}
+
+void ArrangementDemoWindow::resetCallbackState( unsigned int tabIndex )
+{
+  if (tabIndex == static_cast<unsigned int>(-1)
+      || tabIndex >= this->tabs.size( )) return;
+
+  ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
+
+  QAction* activeMode = this->activeModes.at( 0 );
+
+  // unhook the old active mode
+  if ( activeMode == this->ui->actionInsert )
+  {  }
+  else if ( activeMode == this->ui->actionDrag )
+  {  }
+  else if ( activeMode == this->ui->actionDelete )
+  {
+    activeTab->getDeleteCurveCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionPointLocation )
+  {
+    activeTab->getPointLocationCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionRayShootingUp )
+  {
+    activeTab->getVerticalRayShootCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionRayShootingDown )
+  {
+    activeTab->getVerticalRayShootCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionMerge )
+  {
+    activeTab->getMergeEdgeCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionSplit )
+  {
+    activeTab->getSplitEdgeCallback( )->reset( );
+  }
+  else if ( activeMode == this->ui->actionFill )
+  {
+    activeTab->getFillFaceCallback( )->reset( );
+  }
+}
+
+void ArrangementDemoWindow::removeCallback( unsigned int tabIndex )
+{
+  if (tabIndex == static_cast<unsigned int>(-1)) return;
+
+  ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
+  QGraphicsScene* activeScene = activeTab->getScene( );
+  QGraphicsView* activeView = activeTab->getView( );
+#if 0
+  QAction* activeMode = this->activeModes[ tabIndex ];
+#endif
+
+  activeScene->removeEventFilter( activeTab->getCurveInputCallback( ) );
+  activeView->setDragMode( QGraphicsView::NoDrag );
+  activeScene->removeEventFilter( activeTab->getDeleteCurveCallback( ) );
+  activeScene->removeEventFilter( activeTab->getPointLocationCallback( ) );
+  activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
+  activeScene->removeEventFilter( activeTab->getMergeEdgeCallback( ) );
+  activeScene->removeEventFilter( activeTab->getSplitEdgeCallback( ) );
+  activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
+  activeScene->removeEventFilter( activeTab->getFillFaceCallback( ) );
+
+  // unhook the old active mode
+#if 0
+  if ( activeMode == this->ui->actionInsert )
+  {
+    activeScene->removeEventFilter( activeTab->getCurveInputCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionDrag )
+  {
+    activeView->setDragMode( QGraphicsView::NoDrag );
+  }
+  else if ( activeMode == this->ui->actionDelete )
+  {
+    activeScene->removeEventFilter( activeTab->getDeleteCurveCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionPointLocation )
+  {
+    activeScene->removeEventFilter( activeTab->getPointLocationCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionRayShootingUp )
+  {
+    activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionRayShootingDown )
+  {
+    activeScene->removeEventFilter( activeTab->getVerticalRayShootCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionMerge )
+  {
+    activeScene->removeEventFilter( activeTab->getMergeEdgeCallback( ) );
+  }
+  else if ( activeMode == this->ui->actionSplit )
+  {
+    activeScene->removeEventFilter( activeTab->getSplitEdgeCallback( ) );
+  }
+#endif
+}
+
+void ArrangementDemoWindow::updateFillColorSwatch( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
+  FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
+  QColor fillColor = fillFaceCallback->getColor( );
+  if ( !fillColor.isValid( ) )
+  {
+    fillColor = ::Qt::black;
+  }
+
+  QPixmap fillColorPixmap( 16, 16 );
+  fillColorPixmap.fill( fillColor );
+  QIcon fillColorIcon( fillColorPixmap );
+  this->ui->actionFillColor->setIcon( fillColorIcon );
+}
+
+void ArrangementDemoWindow::openArrFile( QString filename )
+{
+  int index = this->ui->tabWidget->currentIndex( );
+  if ( index == -1 )
+  {
+    QMessageBox::information( this, "Oops", "Create a new tab first" );
+    return;
+  }
+  if ( filename.isNull( ) )
+  {
+    return;
+  }
+
+  std::ifstream ifs( filename.toStdString( ).c_str( ) );
+  CGAL::Object arr = this->arrangements[ index ];
+  Seg_arr* seg;
+  Pol_arr* pol;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic;
+#endif
+
+  // Alg_seg_arr* alg;
+  if ( CGAL::assign( seg, arr ) )
+  {
+    typedef CGAL::Arr_text_formatter<Seg_arr>           Seg_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
+      ArrFormatter;
+    typedef ArrangementDemoTab<Seg_arr>                 TabType;
+
+    ArrFormatter arrFormatter;
+    CGAL::read( *seg, ifs, arrFormatter );
+    this->arrangements[ index ] = CGAL::make_object( seg );
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+    tab->setArrangement( seg );
+  }
+  else if ( CGAL::assign( pol, arr ) )
+  {
+    typedef CGAL::Arr_text_formatter< Pol_arr >         Pol_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Pol_text_formatter>
+      ArrFormatter;
+    typedef ArrangementDemoTab< Pol_arr >               TabType;
+
+    ArrFormatter arrFormatter;
+    CGAL::read( *pol, ifs, arrFormatter );
+    this->arrangements[ index ] = CGAL::make_object( pol );
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+    tab->setArrangement( pol );
+  }
+
+#ifdef CGAL_USE_CORE
+  else if (CGAL::assign(conic, arr)) {
+#if 0
+    typedef CGAL::Arr_text_formatter<Conic_arr>         Conic_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Conic_text_formatter>
+      ArrFormatter;
+    ArrFormatter                                        arrFormatter;
+    CGAL::read( *conic, ifs, arrFormatter );
+    this->arrangements[ index ] = CGAL::make_object( conic );
+    tab->setArrangement( conic );
+#endif
+    typedef ArrangementDemoTab< Conic_arr > TabType;
+    Conic_reader< Conic_arr::Geometry_traits_2 > conicReader;
+    std::vector< Conic_arr::Curve_2 > curve_list;
+    CGAL::Bbox_2 bbox;
+    conicReader.read_data( filename.toStdString( ).c_str( ),
+                           std::back_inserter( curve_list ), bbox );
+    this->arrangements[ index ] = CGAL::make_object( conic );
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+
+    CGAL::insert( *conic, curve_list.begin(), curve_list.end() );
+    tab->setArrangement( conic );
+    //QMessageBox::information( this, "Oops",
+    //  "Reading conic arrangement not supported" );
+  }
+#endif
+
+  // else if ( CGAL::assign( alg, arr ) )
+  // {
+  //   typedef CGAL::Arr_text_formatter< Alg_seg_arr >     Seg_text_formatter;
+  //   typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
+  //     ArrFormatter;
+  //   typedef ArrangementDemoTab< Alg_seg_arr >           TabType;
+
+  //   ArrFormatter arrFormatter;
+  //   CGAL::read( *alg, ifs, arrFormatter );
+  //   this->arrangements[ index ] = CGAL::make_object( alg );
+  //   TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+  //   tab->setArrangement( alg );
+  // }
+  ifs.close( );
+}
+
+void ArrangementDemoWindow::openDatFile( QString filename )
+{
+  int index = this->ui->tabWidget->currentIndex( );
+  if ( index == -1 )
+  {
+    QMessageBox::information( this, "Oops", "Create a new tab first" );
+    return;
+  }
+  if ( filename.isNull( ) )
+  {
+    return;
+  }
+
+  std::ifstream inputFile( filename.toStdString( ).c_str( ) );
+  CGAL::Object arr = this->arrangements[ index ];
+  Seg_arr* seg;
+  Pol_arr* pol;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic;
+#endif
+
+  // Alg_seg_arr* alg;
+
+  // Creates an ofstream object named inputFile
+  if (! inputFile.is_open() ) // Always test file open
+  {
+    std::cerr << "Error opening input file" << std::endl;
+    return;
+  }
+
+  Pol_traits traits;
+  Pol_traits::Construct_curve_2 poly_const =
+    traits.construct_curve_2_object();
+
+
+  if ( CGAL::assign( pol, arr ) )
+  {
+    pol->clear( );
+
+    std::vector<Arr_pol_point_2> points;
+
+    unsigned int num_polylines;
+    inputFile >> num_polylines;
+    std::list<Arr_pol_2> pol_list;
+
+    unsigned int i;
+    for (i = 0; i < num_polylines; i++)
+    {
+      unsigned int num_segments;
+      inputFile >> num_segments;
+      points.clear();
+      unsigned int j;
+      for (j = 0; j < num_segments; j++)
+      {
+        int ix, iy;
+        inputFile >> ix >> iy;
+        points.push_back (Arr_pol_point_2(NT(ix),NT(iy)));
+      }
+
+      Arr_pol_2 curve = poly_const(points.begin(), points.end());
+      pol_list.push_back(curve);
+    }
+    CGAL::insert(*pol, pol_list.begin(), pol_list.end());
+
+    typedef ArrangementDemoTab< Pol_arr > TabType;
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+    tab->setArrangement( pol );
+  }
+  else if ( CGAL::assign( seg, arr ) )
+  {
+    seg->clear( );
+
+    int count;
+    inputFile >> count;
+    int i;
+    std::list<Arr_seg_2> seg_list;
+    for (i = 0; i < count; i++)
+    {
+      NT x0, y0, x1, y1;
+      inputFile >> x0 >> y0 >> x1 >> y1;
+
+      Arr_seg_point_2 p1(x0, y0);
+      Arr_seg_point_2 p2(x1, y1);
+
+      Arr_seg_2 curve(p1, p2);
+
+      seg_list.push_back(curve);
+    }
+
+    CGAL::insert(*(seg), seg_list.begin(), seg_list.end());
+
+    typedef ArrangementDemoTab< Seg_arr > TabType;
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+    tab->setArrangement( seg );
+  }
+
+#ifdef CGAL_USE_CORE
+  else if (CGAL::assign( conic, arr)) {
+    conic->clear( );
+    Conic_reader< Conic_arr::Geometry_traits_2 > reader;
+    std::list<Arr_conic_2> curve_list;
+    CGAL::Bbox_2 bbox;
+    reader.read_data( filename.toStdString().c_str(),
+                      std::back_inserter(curve_list), bbox );
+    CGAL::insert (*conic, curve_list.begin(), curve_list.end());
+
+    typedef ArrangementDemoTab< Conic_arr > TabType;
+    TabType* tab = static_cast< TabType* >( this->tabs[ index ] );
+    tab->setArrangement( conic );
+  }
+#endif
+
+  inputFile.close();
+}
+
+void ArrangementDemoWindow::updateEnvelope( QAction* newMode )
+{
+  if ( this->ui->tabWidget->currentIndex( ) == -1 ) return;
+  ArrangementDemoTabBase* activeTab =
+    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
+  // QGraphicsScene* activeScene = activeTab->getScene( );
+  // QGraphicsView* activeView = activeTab->getView( );
+
+  bool show = newMode->isChecked( );
+  if ( newMode == this->ui->actionLowerEnvelope )
+  {
+    activeTab->getEnvelopeCallback( )->showLowerEnvelope( show );
+  }
+  else if ( newMode == this->ui->actionUpperEnvelope )
+  {
+    activeTab->getEnvelopeCallback( )->showUpperEnvelope( show );
+  }
+}
+
+void ArrangementDemoWindow::updateSnapping( QAction* newMode )
+{
+  ArrangementDemoTabBase* activeTab =
+    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
+  QGraphicsScene* activeScene = activeTab->getScene( );
+  ArrangementDemoGraphicsView* activeView = activeTab->getView( );
+
+  bool enabled = newMode->isChecked( );
+  if ( newMode == this->ui->actionSnapMode )
+  {
+    activeTab->getCurveInputCallback( )->setSnappingEnabled( enabled );
+    activeTab->getSplitEdgeCallback( )->setSnappingEnabled( enabled );
+    if ( ! enabled )
+    {
+      this->ui->actionGridSnapMode->setChecked( false );
+      this->ui->actionGridSnapMode->setEnabled( false );
+      activeTab->getCurveInputCallback( )->setSnapToGridEnabled( false );
+      activeTab->getSplitEdgeCallback( )->setSnapToGridEnabled( false );
+    }
+    else
+    {
+      this->ui->actionGridSnapMode->setEnabled( true );
+    }
+  }
+  else if ( newMode == this->ui->actionGridSnapMode )
+  {
+    activeTab->getCurveInputCallback( )->setSnapToGridEnabled( enabled );
+    activeTab->getSplitEdgeCallback( )->setSnapToGridEnabled( enabled );
+    activeView->setShowGrid( enabled );
+  }
+  activeScene->update( );
+}
+
+void ArrangementDemoWindow::updateConicType( QAction* newType )
+{
+  ArrangementDemoTabBase* activeTab =
+    this->tabs[ this->ui->tabWidget->currentIndex( ) ];
+  // QGraphicsScene* activeScene = activeTab->getScene( );
+  // ArrangementDemoGraphicsView* activeView = activeTab->getView( );
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic_arr;
+  bool isConicArr =
+    CGAL::assign( conic_arr,
+                  this->arrangements[ this->ui->tabWidget->currentIndex( ) ] );
+#endif
+
+  Lin_arr* lin_arr;
+  bool isLinearArr =
+    CGAL::assign( lin_arr,
+                  this->arrangements[ this->ui->tabWidget->currentIndex( ) ] );
+
+  if ( isLinearArr )
+  {
+    typedef Lin_arr::Geometry_traits_2         Line_geom_traits;
+    typedef CGAL::Qt::GraphicsViewCurveInput<Line_geom_traits>
+      LinearCurveInputCallback;
+    LinearCurveInputCallback* curveInputCallback =
+      ( LinearCurveInputCallback* ) activeTab->getCurveInputCallback( );
+    if ( newType == this->ui->actionConicSegment )
+    {
+      curveInputCallback->setCurveType( LinearCurveInputCallback::SEGMENT );
+    }
+    else if ( newType == this->ui->actionCurveRay )
+  {
+      curveInputCallback->setCurveType( LinearCurveInputCallback::RAY );
+    }
+    else if ( newType == this->ui->actionCurveLine )
+    {
+      curveInputCallback->setCurveType( LinearCurveInputCallback::LINE );
+    }
+    //std::cout << "do nothing" << std::endl;
+  }
+
+#ifdef CGAL_USE_CORE
+  else if (isConicArr) {
+    // std::cout << "do something conic arr related" << std::endl;
+    typedef Conic_arr::Geometry_traits_2       Conic_geom_traits;
+    typedef CGAL::Qt::GraphicsViewCurveInput<Conic_geom_traits>
+      ConicCurveInputCallback;
+    ConicCurveInputCallback* curveInputCallback =
+      ( ConicCurveInputCallback* ) activeTab->getCurveInputCallback( );
+    if ( newType == this->ui->actionConicSegment )
+    {
+      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_SEGMENT);
+    }
+    else if ( newType == this->ui->actionConicCircle )
+    {
+      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_CIRCLE);
+    }
+    else if ( newType == this->ui->actionConicEllipse )
+    {
+      curveInputCallback->setConicType(ConicCurveInputCallback::CONIC_ELLIPSE);
+    }
+    else if ( newType == this->ui->actionConicThreePoint )
+    {
+      curveInputCallback->setConicType( ConicCurveInputCallback::
+                                        CONIC_THREE_POINT );
+    }
+    else if ( newType == this->ui->actionConicFivePoint )
+    {
+      curveInputCallback->setConicType( ConicCurveInputCallback::
+                                        CONIC_FIVE_POINT );
+    }
+  }
+#endif
+}
+
+void ArrangementDemoWindow::on_actionSaveAs_triggered( )
+{
+  int index = this->ui->tabWidget->currentIndex( );
+  if ( index == -1 )
+    return;
+  QString filename =
+    QFileDialog::getSaveFileName( this, tr( "Save file" ),
+                                  "", "Arrangement (*.arr)" );
+  if ( filename.isNull( ) )
+    return;
+
+  std::ofstream ofs( filename.toStdString( ).c_str( ) );
+  CGAL::Object arr = this->arrangements[ index ];
+  Seg_arr* seg;
+  Pol_arr* pol;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic;
+#endif
+
+  if ( CGAL::assign( seg, arr ) )
+  {
+    typedef CGAL::Arr_text_formatter<Seg_arr>           Seg_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Seg_text_formatter>
+      ArrFormatter;
+    ArrFormatter                                        arrFormatter;
+    CGAL::write( *seg, ofs, arrFormatter );
+  }
+  else if ( CGAL::assign( pol, arr ) )
+  {
+    typedef CGAL::Arr_text_formatter<Pol_arr>           Pol_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Pol_text_formatter>
+      ArrFormatter;
+    ArrFormatter                                        arrFormatter;
+    CGAL::write( *pol, ofs, arrFormatter );
+  }
+
+#ifdef CGAL_USE_CORE
+  else if (CGAL::assign(conic, arr)) {
+#if 0
+    typedef CGAL::Arr_text_formatter<Conic_arr>         Conic_text_formatter;
+    typedef CGAL::Arr_with_history_text_formatter<Conic_text_formatter>
+      ArrFormatter;
+    ArrFormatter                                        arrFormatter;
+    CGAL::write( *conic, ofs, arrFormatter );
+#endif
+    ofs << conic->number_of_curves( ) << std::endl;
+    for ( Conic_arr::Curve_iterator it = conic->curves_begin( );
+          it != conic->curves_end( ); ++it )
+    {
+      if ( it->is_full_conic( ) )
+      {
+        ofs << "F ";
+        ofs << it->r( ) << " ";
+        ofs << it->s( ) << " ";
+        ofs << it->t( ) << " ";
+        ofs << it->u( ) << " ";
+        ofs << it->v( ) << " ";
+        ofs << it->w( ) << " ";
+        ofs << std::endl;
+      }
+      else if ( it->orientation( ) == CGAL::COLLINEAR )
+      {
+        ofs << "S ";
+        ofs << it->source( ) << " ";
+        ofs << it->target( ) << " ";
+        ofs << std::endl;
+      }
+      else
+      {
+        ofs << "A ";
+        ofs << it->r( ) << " ";
+        ofs << it->s( ) << " ";
+        ofs << it->t( ) << " ";
+        ofs << it->u( ) << " ";
+        ofs << it->v( ) << " ";
+        ofs << it->w( ) << " ";
+        if ( it->orientation( ) == CGAL::COUNTERCLOCKWISE )
+          ofs << "1 ";
+        else if ( it->orientation( ) == CGAL::CLOCKWISE )
+          ofs << "-1 ";
+        else
+          ofs << "0 ";
+        ofs << it->source( ) << " ";
+        ofs << it->target( ) << " ";
+        ofs << std::endl;
+      }
+    }
+  }
+#endif
+
+  ofs.close( );
+}
+
+void ArrangementDemoWindow::on_actionOpen_triggered( )
+{
+  int index = this->ui->tabWidget->currentIndex( );
+  if ( index == -1 )
+  {
+    QMessageBox::information( this, "Oops", "Create a new tab first" );
+    return;
+  }
+  QString filename =
+    QFileDialog::getOpenFileName( this, tr( "Open file" ),
+                                  "", "Arrangement files (*.arr *.dat);;All files (*.*)" );
+  if ( filename.isNull( ) )
+    return;
+
+  if ( filename.endsWith( ".arr" ) )
+  {
+    this->openArrFile( filename );
+  }
+  else
+  {
+    this->openDatFile( filename );
+  }
+
+  ArrangementDemoTabBase* currentTab = this->tabs[ index ];
+  CGAL::Qt::ArrangementGraphicsItemBase* agi =
+    currentTab->getArrangementGraphicsItem( );
+  QRectF bb = agi->boundingRect( );
+  QGraphicsView* view = currentTab->getView( );
+  // std::cout << bb.left( ) << " " << bb.bottom( ) << ", " << bb.right( )
+  //           << " " << bb.top( ) << std::endl;
+  if ( boost::math::isinf(bb.left( )) ||
+       boost::math::isinf(bb.right( )) ||
+       boost::math::isinf(bb.top( )) ||
+       boost::math::isinf(bb.bottom( )) )
+  {
+    // std::cout << "unbounded; using default bb" << std::endl;
+    bb = QRectF( -100, -100, 200, 200 );
+    view->setSceneRect( bb );
+  }
+  else
+  {
+    view->fitInView( bb, ::Qt::KeepAspectRatio );
+    view->setSceneRect( bb );
+  }
+#if 0
+  view->centerOn( bb.center( ) );
+#endif
+}
+
+void ArrangementDemoWindow::on_actionQuit_triggered( )
+{
+  qApp->exit( );
+}
+
+void ArrangementDemoWindow::on_actionNewTab_triggered( )
+{
+  NewTabDialog* newTabDialog = new NewTabDialog;
+  if ( newTabDialog->exec( ) == QDialog::Accepted )
+  {
+    int id = newTabDialog->checkedId( );
+    if ( id == SEGMENT_TRAITS )
+    {
+      this->makeTab( SEGMENT_TRAITS );
+    }
+    else if ( id == POLYLINE_TRAITS )
+    {
+      this->makeTab( POLYLINE_TRAITS );
+    }
+    else if ( id == CONIC_TRAITS )
+    {
+      this->makeTab( CONIC_TRAITS );
+    }
+    else if ( id == LINEAR_TRAITS )
+    {
+      this->makeTab( LINEAR_TRAITS );
+    }
+    else if ( id == CIRCULAR_ARC_TRAITS )
+    {
+      this->makeTab( CIRCULAR_ARC_TRAITS );
+    }
+    // else if ( id == ALGEBRAIC_TRAITS )
+    // {
+    //   this->makeTab( ALGEBRAIC_TRAITS );
+    // }
+    else
+    {
+      std::cout << "Sorry, this trait is not yet supported" << std::endl;
+    }
+  }
+  delete newTabDialog;
+}
+
+void ArrangementDemoWindow::on_tabWidget_currentChanged( )
+{
+  // std::cout << "Tab changed" << std::endl;
+  // disable the callback for the previously active tab
+  this->resetCallbackState( this->lastTabIndex );
+  this->removeCallback( this->lastTabIndex );
+  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
+
+  this->updateMode( this->modeGroup->checkedAction( ) );
+
+  CGAL::Object arr;
+  if ( this->ui->tabWidget->currentIndex( ) != -1 )
+    arr = this->arrangements[ this->ui->tabWidget->currentIndex( ) ];
+
+  // Seg_arr* seg;
+  // Pol_arr* pol;
+  Lin_arr* lin;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic;
+#endif
+
+  if ( CGAL::assign( lin, arr ) )
+  {
+    this->ui->actionConicSegment->setChecked( true );
+
+    this->ui->actionCurveRay->setVisible( true );
+    this->ui->actionCurveLine->setVisible( true );
+
+    this->ui->actionConicCircle->setVisible( false );
+    this->ui->actionConicEllipse->setVisible( false );
+    this->ui->actionConicThreePoint->setVisible( false );
+    this->ui->actionConicFivePoint->setVisible( false );
+
+    this->conicTypeGroup->setEnabled( true );
+  }
+
+#ifdef CGAL_USE_CORE
+  else if (CGAL::assign( conic, arr)) {
+    this->ui->actionConicSegment->setChecked( true );
+
+    this->ui->actionCurveRay->setVisible( false );
+    this->ui->actionCurveLine->setVisible( false );
+
+    this->ui->actionConicCircle->setVisible( true );
+    this->ui->actionConicEllipse->setVisible( true );
+    this->ui->actionConicThreePoint->setVisible( true );
+    this->ui->actionConicFivePoint->setVisible( true );
+
+    this->conicTypeGroup->setEnabled( true );
+  }
+#endif
+
+  else { // segment or polyline
+    this->ui->actionConicSegment->setChecked( true );
+
+    this->ui->actionCurveRay->setVisible( false );
+    this->ui->actionCurveLine->setVisible( false );
+
+    this->ui->actionConicCircle->setVisible( false );
+    this->ui->actionConicEllipse->setVisible( false );
+    this->ui->actionConicThreePoint->setVisible( false );
+    this->ui->actionConicFivePoint->setVisible( false );
+
+    this->conicTypeGroup->setEnabled( true );
+  }
+}
+
+void ArrangementDemoWindow::on_actionOverlay_triggered( )
+{
+  OverlayDialog* overlayDialog = new OverlayDialog( this );
+  if ( overlayDialog->exec( ) == QDialog::Accepted )
+  {
+    std::vector< CGAL::Object > arrs = overlayDialog->selectedArrangements( );
+    if ( arrs.size( ) == 2 )
+    {
+      Seg_arr* seg_arr;
+      Seg_arr* seg_arr2;
+      Pol_arr* pol_arr;
+      Pol_arr* pol_arr2;
+
+#ifdef CGAL_USE_CORE
+      Conic_arr* conic_arr;
+      Conic_arr* conic_arr2;
+#endif
+
+      Lin_arr* lin_arr;
+      Lin_arr* lin_arr2;
+      Arc_arr* arc_arr;
+      Arc_arr* arc_arr2;
+      // Alg_seg_arr* alg_arr;
+      // Alg_seg_arr* alg_arr2;
+      if ( CGAL::assign( seg_arr, arrs[ 0 ] ) &&
+           CGAL::assign( seg_arr2, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab( seg_arr, seg_arr2 );
+      }
+      if ( CGAL::assign( pol_arr, arrs[ 0 ] ) &&
+           CGAL::assign( pol_arr2, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab( pol_arr, pol_arr2 );
+      }
+
+#ifdef CGAL_USE_CORE
+      if (CGAL::assign(conic_arr, arrs[0]) && CGAL::assign(conic_arr2, arrs[1]))
+      {
+        this->makeOverlayTab( conic_arr, conic_arr2 );
+      }
+#endif
+
+      if ( CGAL::assign( lin_arr, arrs[ 0 ] ) &&
+           CGAL::assign( lin_arr2, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab( lin_arr, lin_arr2 );
+      }
+      if ( CGAL::assign( arc_arr, arrs[ 0 ] ) &&
+           CGAL::assign( arc_arr2, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab( arc_arr, arc_arr2 );
+      }
+      // if ( CGAL::assign( alg_arr, arrs[ 0 ] ) &&
+      //      CGAL::assign( alg_arr2, arrs[ 1 ] ) )
+      // {
+      //   this->makeOverlayTab( alg_arr, alg_arr2 );
+      // }
+
+#if 0
+      if ( CGAL::assign( conic_arr, arrs[ 0 ] ) ||
+           CGAL::assign( conic_arr, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab< Conic_arr >( arrs[ 0 ], arrs[ 1 ] );
+      }
+      else if ( CGAL::assign( pol_arr, arrs[ 0 ] ) ||
+                CGAL::assign( pol_arr, arrs[ 1 ] ) )
+      {
+        this->makeOverlayTab< Pol_arr >( arrs[ 0 ], arrs[ 1 ] );
+      }
+      else
+      {
+        this->makeOverlayTab< Seg_arr >( arrs[ 0 ], arrs[ 1 ] );
+      }
+#endif
+    }
+  }
+  delete overlayDialog;
+}
+
+void ArrangementDemoWindow::on_actionCloseTab_triggered( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (! this->ui->tabWidget->count() ||
+      (currentTabIndex == static_cast<unsigned int>(-1)))
+    return;
+
+  // delete the tab
+  this->ui->tabWidget->removeTab( currentTabIndex );
+  this->tabs.erase( this->tabs.begin( ) + currentTabIndex );
+
+  // delete the arrangement
+  this->arrangements.erase( this->arrangements.begin( ) + currentTabIndex );
+}
+
+void ArrangementDemoWindow::on_actionPrintConicCurves_triggered( )
+{
+  // int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  // Conic_arr* arr;
+  // if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  // CGAL::Object o = this->arrangements[ currentTabIndex ];
+  // if ( ! CGAL::assign( arr, o ) )
+  //     return;
+  // typedef typename Conic_arr::Curve_iterator Curve_iterator;
+  // // std::cout << arr->number_of_curves( ) << std::endl;
+  // Curve_iterator it;
+  // for (it = arr->curves_begin(); it != arr->curves_end(); ++it) {
+  //     std::cout << *it << std::endl;
+  //     if ( it->is_full_conic( ) )
+  //     {
+  //         std::cout << "F ";
+  //         std::cout << it->r( ) << " ";
+  //         std::cout << it->s( ) << " ";
+  //         std::cout << it->t( ) << " ";
+  //         std::cout << it->u( ) << " ";
+  //         std::cout << it->v( ) << " ";
+  //         std::cout << it->w( ) << " ";
+  //         std::cout << std::endl;
+  //     }
+  //     else if ( it->orientation( ) == CGAL::COLLINEAR )
+  //     {
+  //         std::cout << "S ";
+  //         std::cout << it->source( ) << " ";
+  //         std::cout << it->target( ) << " ";
+  //         std::cout << std::endl;
+  //     }
+  //     else
+  //     {
+  //         std::cout << "A ";
+  //         std::cout << it->r( ) << " ";
+  //         std::cout << it->s( ) << " ";
+  //         std::cout << it->t( ) << " ";
+  //         std::cout << it->u( ) << " ";
+  //         std::cout << it->v( ) << " ";
+  //         std::cout << it->w( ) << " ";
+  //         if ( it->orientation( ) == CGAL::COUNTERCLOCKWISE )
+  //             std::cout << "1 ";
+  //         else if ( it->orientation( ) == CGAL::CLOCKWISE )
+  //             std::cout << "-1 ";
+  //         else
+  //             std::cout << "0 ";
+  //         std::cout << it->source( ) << " ";
+  //         std::cout << it->target( ) << " ";
+  //         std::cout << std::endl;
+  //     }
+  // }
+}
+
+void ArrangementDemoWindow::on_actionZoomIn_triggered( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
+  QGraphicsView* view = currentTab->getView( );
+  view->scale( 2.0, 2.0 );
+}
+
+void ArrangementDemoWindow::on_actionZoomOut_triggered( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
+  QGraphicsView* view = currentTab->getView( );
+  view->scale( 0.5, 0.5 );
+}
+
+void ArrangementDemoWindow::on_actionPreferences_triggered( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
+  CGAL::Qt::ArrangementGraphicsItemBase* agi =
+    currentTab->getArrangementGraphicsItem( );
+  ArrangementDemoGraphicsView* view = currentTab->getView( );
+  EnvelopeCallbackBase* envelopeCallback = currentTab->getEnvelopeCallback( );
+  VerticalRayShootCallbackBase* verticalRayShootCallback =
+    currentTab->getVerticalRayShootCallback( );
+  SplitEdgeCallbackBase* splitEdgeCallback = currentTab->getSplitEdgeCallback( );
+
+#if 0
+  QPen vertexPen = agi->getVerticesPen( );
+  QPen edgePen = agi->getEdgesPen( );
+  QBrush vertexPenBrush = vertexPen.brush( );
+  QColor vertexColor = vertexPenBrush.color( );
+  QBrush edgePenBrush = edgePen.brush( );
+  QColor edgeColor = edgePenBrush.color( );
+#endif
+
+  ArrangementDemoPropertiesDialog* dialog =
+    new ArrangementDemoPropertiesDialog( this );
+  if ( dialog->exec( ) == QDialog::Accepted )
+  {
+    typedef ArrangementDemoPropertiesDialog Dialog;
+
+    QColor edgeColor =  dialog->property(Dialog::EDGE_COLOR_KEY).value<QColor>();
+
+    unsigned int edgeWidth = dialog->property(Dialog::EDGE_WIDTH_KEY).value<unsigned int>();
+
+    QColor vertexColor = dialog->property(Dialog::VERTEX_COLOR_KEY).value<QColor>();
+
+    unsigned int vertexRadius = dialog->property(Dialog::VERTEX_RADIUS_KEY).value<unsigned int>();
+
+    QColor envelopeEdgeColor = dialog->property(Dialog::ENVELOPE_EDGE_COLOR_KEY).value<QColor>();
+
+    unsigned int envelopeEdgeWidth = dialog->property(Dialog::ENVELOPE_EDGE_WIDTH_KEY).value<unsigned int>();
+
+    QColor envelopeVertexColor = dialog->property(Dialog::ENVELOPE_VERTEX_COLOR_KEY).value<QColor>();
+
+    unsigned int envelopeVertexRadius = dialog->property(Dialog::ENVELOPE_VERTEX_RADIUS_KEY).value<unsigned int>();
+
+    QColor verticalRayEdgeColor = dialog->property(Dialog::VERTICAL_RAY_EDGE_COLOR_KEY).value<QColor>();
+
+    unsigned int verticalRayEdgeWidth = dialog->property(Dialog::VERTICAL_RAY_EDGE_WIDTH_KEY).value<unsigned int>();
+
+    DeleteCurveMode mode = dialog->property(Dialog::DELETE_CURVE_MODE_KEY).value<DeleteCurveMode>();
+
+    unsigned int gridSize = dialog->property(Dialog::GRID_SIZE_KEY).value<unsigned int>();
+
+    QColor gridColor = dialog->property(Dialog::GRID_COLOR_KEY).value<QColor>();
+    //end new for Qt5 version !
+
+
+    QPen edgesPen(QBrush(edgeColor), edgeWidth);
+    QPen verticesPen(QBrush(vertexColor), vertexRadius);
+    agi->setEdgesPen( edgesPen );
+    agi->setVerticesPen( verticesPen );
+    agi->modelChanged( );
+    view->setGridSize( gridSize );
+    view->setGridColor( gridColor );
+    envelopeCallback->setEnvelopeEdgeColor( envelopeEdgeColor );
+    envelopeCallback->setEnvelopeEdgeWidth( envelopeEdgeWidth );
+    envelopeCallback->setEnvelopeVertexColor( envelopeVertexColor );
+    envelopeCallback->setEnvelopeVertexRadius( envelopeVertexRadius );
+    verticalRayShootCallback->setEdgeColor( verticalRayEdgeColor );
+    verticalRayShootCallback->setEdgeWidth( verticalRayEdgeWidth );
+    splitEdgeCallback->setColor( edgeColor );
+
+#if 0
+    std::cout << edgeColor.name( ).toStdString( ) << std::endl;
+    std::cout << edgeWidth << std::endl;
+    std::cout << vertexColor.name( ).toStdString( ) << std::endl;
+    std::cout << vertexRadius << std::endl;
+    std::cout << DeleteCurveMode::ToString( mode ).toStdString( ) << std::endl;
+#endif
+
+  }
+}
+
+void ArrangementDemoWindow::on_actionFillColor_triggered( )
+{
+  unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
+  if (currentTabIndex == static_cast<unsigned int>(-1)) return;
+  ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
+  FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
+  QColor fillColor = fillFaceCallback->getColor( );
+
+  QColor selectedColor = QColorDialog::getColor( fillColor );
+  if ( selectedColor.isValid( ) )
+  {
+    fillFaceCallback->setColor( selectedColor );
+    this->updateFillColorSwatch( );
+  }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h
new file mode 100644
index 0000000..6add7c1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h
@@ -0,0 +1,145 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef ARRANGEMENT_DEMO_WINDOW_H
+#define ARRANGEMENT_DEMO_WINDOW_H
+
+#include "ArrangementGraphicsItem.h"
+#include "ArrangementTypes.h"
+#include "DeleteCurveCallback.h"
+#include "PointLocationCallback.h"
+#include "VerticalRayShootCallback.h"
+#include "MergeEdgeCallback.h"
+#include "SplitEdgeCallback.h"
+#include "EnvelopeCallback.h"
+#include "ArrangementDemoTab.h"
+
+#include <CGAL/Arr_overlay_2.h>
+#include <CGAL/Arr_default_overlay_traits.h>
+#include <CGAL/Qt/DemosMainWindow.h>
+
+extern const char * hand_xpm[];
+
+#include <Qt>
+
+#include "ui_ArrangementDemoWindow.h"
+
+//#include <QFileDialog>
+//#include <QInputDialog>
+//#include <QMessageBox>
+//#include <QtGui>
+
+namespace Ui { class ArrangementDemoWindow; }
+
+class QActionGroup;
+
+class ArrangementDemoWindow : public CGAL::Qt::DemosMainWindow
+{
+  Q_OBJECT
+  public:
+#if 0
+  typedef Seg_traits::Point_2 Point;
+  typedef Seg_traits::Segment_2 Segment;
+#endif
+  typedef enum TraitsType {
+    SEGMENT_TRAITS,
+    POLYLINE_TRAITS,
+    CONIC_TRAITS,
+    LINEAR_TRAITS,
+    CIRCULAR_ARC_TRAITS
+    // ALGEBRAIC_TRAITS
+  } TraitsType;
+
+  ArrangementDemoWindow(QWidget* parent = 0);
+  ~ArrangementDemoWindow();
+
+  ArrangementDemoTabBase* makeTab( TraitsType tt );
+  ArrangementDemoTabBase* getTab( unsigned int tabIndex ) const;
+  ArrangementDemoTabBase* getCurrentTab( ) const;
+
+  std::vector< QString > getTabLabels( ) const;
+  std::vector< CGAL::Object > getArrangements( ) const;
+
+  template < class ArrType >
+  void makeOverlayTab( ArrType* arr1, ArrType* arr2 );
+
+public slots:
+  void updateMode( QAction* a );
+  void updateEnvelope( QAction* a );
+  void updateSnapping( QAction* a );
+  void updateConicType( QAction* a );
+  void on_actionNewTab_triggered( );
+  void on_actionSaveAs_triggered( );
+  void on_actionOpen_triggered( );
+  void on_actionQuit_triggered( );
+  void on_tabWidget_currentChanged( );
+  void on_actionOverlay_triggered( );
+  void on_actionCloseTab_triggered( );
+  void on_actionPrintConicCurves_triggered( );
+  void on_actionZoomIn_triggered( );
+  void on_actionZoomOut_triggered( );
+  void on_actionPreferences_triggered( );
+  void on_actionFillColor_triggered( );
+
+
+signals:
+  void modelChanged( );
+
+protected:
+  void setupUi( );
+  void resetCallbackState( unsigned int tabIndex );
+  void removeCallback( unsigned int tabIndex );
+  void updateFillColorSwatch( );
+
+  void openArrFile( QString filename );
+  void openDatFile( QString filename );
+
+  std::vector< ArrangementDemoTabBase* > tabs;
+  std::vector< CGAL::Object > arrangements;
+  std::vector< QAction* > activeModes; // for the current tab; always size 1
+  unsigned int lastTabIndex;
+
+  Ui::ArrangementDemoWindow* ui;
+  QActionGroup* modeGroup;
+  QActionGroup* envelopeGroup;
+  QActionGroup* snapGroup;
+  QActionGroup* conicTypeGroup;
+};
+
+template < class ArrType >
+void
+ArrangementDemoWindow::
+makeOverlayTab( ArrType* arr1, ArrType* arr2 )
+{
+  QString tabLabel = QString( "Overlay Tab" );
+
+  ArrangementDemoTabBase* demoTab;
+  ArrType* overlayArr = new ArrType;
+  CGAL::Arr_default_overlay_traits< ArrType > defaultTraits;
+
+  CGAL::overlay( *arr1, *arr2, *overlayArr, defaultTraits );
+
+  demoTab = new ArrangementDemoTab< ArrType >( overlayArr, 0 );
+  this->arrangements.push_back( CGAL::make_object( overlayArr ) );
+  this->tabs.push_back( demoTab );
+
+  QGraphicsView* view = demoTab->getView( );
+  this->addNavigation( view );
+  this->ui->tabWidget->addTab( demoTab, tabLabel );
+  this->lastTabIndex = this->ui->tabWidget->currentIndex( );
+}
+
+#endif // ARRANGEMENT_DEMO_WINDOW_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.qrc b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.qrc
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.ui b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementDemoWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.ui
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h
new file mode 100644
index 0000000..7986a5d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h
@@ -0,0 +1,1308 @@
+// Copyright (c) 2008, 2012  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
+#define CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+//#include <CGAL/apply_to_range.h>
+// TODO: should be included in PainterOstream.h
+//#include <CGAL/Kernel/global_functions.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Arr_circular_arc_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_algebraic_segment_traits_2.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+//#include <QStyleOption>
+
+#include "ArrangementPainterOstream.h"
+#include "Utils.h"
+
+#include <iostream>
+#ifdef _MSC_VER
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+
+class QGraphicsScene;
+
+namespace CGAL {
+namespace Qt {
+
+class ArrangementGraphicsItemBase :
+    public GraphicsItem, public QGraphicsSceneMixin
+{
+public:
+  ArrangementGraphicsItemBase( );
+
+  const QPen& getVerticesPen( ) const;
+  const QPen& getEdgesPen( ) const;
+  void setVerticesPen( const QPen& pen );
+  void setEdgesPen( const QPen& pen );
+  bool visibleVertices( ) const;
+  void setVisibleVertices( const bool b );
+  bool visibleEdges( ) const;
+  void setVisibleEdges( const bool b );
+  void setBackgroundColor( QColor color );
+  // void setScene( QGraphicsScene* scene_ );
+
+protected:
+  // QRectF getViewportRect( ) const;
+
+  CGAL::Bbox_2 bb;
+  bool bb_initialized;
+
+  QPen verticesPen;
+  QPen edgesPen;
+  bool visible_edges;
+  bool visible_vertices;
+
+  QGraphicsScene* scene;
+
+  QColor backgroundColor;
+
+}; // class ArrangementGraphicsItemBase
+
+template <typename Arr_, typename ArrTraits = typename Arr_::Geometry_traits_2>
+class ArrangementGraphicsItem : public ArrangementGraphicsItemBase
+{
+  typedef Arr_ Arrangement;
+  typedef typename Arrangement::Geometry_traits_2       Traits;
+  typedef typename Arrangement::Vertex_iterator         Vertex_iterator;
+  typedef typename Arrangement::Curve_iterator          Curve_iterator;
+  typedef typename Arrangement::Edge_iterator           Edge_iterator;
+  typedef typename Arrangement::Halfedge                Halfedge;
+  typedef typename Arrangement::Halfedge_handle         Halfedge_handle;
+  typedef typename Arrangement::Face_handle             Face_handle;
+  typedef typename Arrangement::Face_iterator           Face_iterator;
+  typedef typename Arrangement::Hole_iterator           Holes_iterator;
+  typedef typename Arrangement::Ccb_halfedge_circulator Ccb_halfedge_circulator;
+
+  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+  typedef typename Kernel::Point_2                      Kernel_point_2;
+  typedef typename Traits::Point_2                      Point_2;
+  //typedef typename Kernel::Segment_2 Segment_2;
+
+  typedef ArrangementGraphicsItemBase                   Superclass;
+  typedef typename Kernel::Segment_2                    Segment_2;
+
+public:
+  /*! Constructor */
+  ArrangementGraphicsItem( Arrangement* t_ );
+
+  /*! Destructor (virtual) */
+  ~ArrangementGraphicsItem() {}
+
+public:
+  void modelChanged( );
+  QRectF boundingRect( ) const;
+  virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
+                     QWidget* widget);
+
+protected:
+  template < typename TTraits >
+  void paint( QPainter* painter, TTraits traits );
+
+  template < typename Kernel_ >
+  void paint( QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > traits );
+
+  template < typename CircularKernel >
+  void paint( QPainter* painter,
+              CGAL::Arr_circular_arc_traits_2< CircularKernel > traits );
+
+  // template < typename Coefficient_ >
+  // void paint( QPainter* painter,
+  //             CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > traits );
+
+
+  void paintFaces( QPainter* painter )
+  {
+    typename Traits::Left_side_category category;
+    this->paintFaces( painter, category );
+  }
+
+  void paintFaces( QPainter* painter, CGAL::Arr_oblivious_side_tag )
+  {
+    for( Face_iterator fi = this->arr->faces_begin( );
+         fi != this->arr->faces_end( ); ++fi )
+    {
+      fi->set_visited( false );
+    }
+
+    Face_handle unboundedFace = this->arr->unbounded_face( );
+    this->paintFace( unboundedFace, painter );
+  }
+
+  void paintFaces( QPainter* painter, CGAL::Arr_open_side_tag )
+  {
+    for( Face_iterator fi = this->arr->faces_begin( );
+         fi != this->arr->faces_end( ); ++fi )
+    {
+      // if ( fi->is_fictitious( ) )
+      // {
+      //     std::cout << "setting fictitious face not visited" << std::endl;
+      // }
+      fi->set_visited( false );
+    }
+
+    Face_handle fictitiousFace = this->arr->fictitious_face( );
+    this->paintFace( fictitiousFace, painter );
+  }
+
+#if 0
+  template < typename TTraits >
+  void paintFaces( QPainter* painter, TTraits traits ) { }
+
+  template < typename Kernel_ >
+  void paintFaces(QPainter* painter, CGAL::Arr_segment_traits_2<Kernel_>) {}
+
+  template < typename Kernel_ >
+  void paintFaces(QPainter* painter, CGAL::Arr_polyline_traits_2<Kernel_>) {}
+
+  template < typename RatKernel, class AlgKernel, class NtTraits >
+  void paintFaces(QPainter* painter,
+                  CGAL::Arr_conic_traits_2<RatKernel, AlgKernel, NtTraits >)
+  {}
+
+  template < typename CircularKernel >
+  void paintFaces(QPainter* painter,
+                  CGAL::Arr_circular_arc_traits_2<CircularKernel > traits) {}
+
+  template < typename Coefficient_ >
+  void paintFaces(QPainter* painter,
+                  CGAL::Arr_algebraic_segment_traits_2<Coefficient_> traits) {}
+#endif
+
+  void paintFace( Face_handle f, QPainter* painter )
+  {
+    if (! f->visited( ) )
+    {
+      int holes = 0;
+      int inner_faces = 0;
+      Holes_iterator hit; // holes iterator
+      this->paintFace( f, painter, Traits( ) );
+      f->set_visited( true );
+      for ( hit = f->holes_begin(); hit != f->holes_end(); ++hit )
+      {
+        Ccb_halfedge_circulator cc = *hit;
+        do {
+          Halfedge_handle he = cc;
+          Halfedge_handle he2 = he->twin();
+          Face_handle inner_face = he2->face();
+          if ( this->antenna( he ) )
+            continue;
+
+          // move on to next hole
+          if ( ! inner_face->visited( ) )
+            inner_faces++;
+          this->visit_ccb_faces( inner_face, painter );
+        } while ( ++cc != *hit );
+        holes++;
+      }// for
+      // if ( f->is_unbounded( ) )
+      // {
+      //   std::cout << "unbounded face has " << holes << " holes" << std::endl;
+      //   std::cout << "unbounded face has " << inner_faces << " inner faces"
+      //             << std::endl;
+      // }
+      // if ( f->is_fictitious( ) )
+      // {
+      //   std::cout << "fictitious face has " << holes << " holes"
+      //             << std::endl;
+      //   std::cout << "fictitious face has " << inner_faces << " inner faces"
+      //             << std::endl;
+      // }
+    }
+  }
+
+  void visit_ccb_faces( Face_handle & fh, QPainter* painter )
+  {
+    this->paintFace( fh, painter );
+
+    Ccb_halfedge_circulator cc=fh->outer_ccb();
+    do {
+      Halfedge he = *cc;
+      if (! he.twin()->face()->visited())
+      {
+        Face_handle nei = (Face_handle) he.twin()->face();
+        this->visit_ccb_faces( nei , painter );
+      }
+      //created from the outer boundary of the face
+    } while (++cc != fh->outer_ccb());
+  }
+
+  /*! antenna - return true if the halfedge and its
+   *  twin point to the same face.
+   */
+  bool antenna(Halfedge_handle h)
+  {
+    Halfedge_handle twin = h->twin();
+    return (twin->face() == h->face());
+  }
+
+  template < typename Traits >
+  void paintFace(Face_handle /* f */, QPainter* /* painter */,
+                 Traits /* traits */)
+  { }
+
+  template < typename Kernel_ >
+  void paintFace( Face_handle f, QPainter* painter,
+                  CGAL::Arr_segment_traits_2< Kernel_ > )
+  {
+    if (!f->is_unbounded())  // f is not the unbounded face
+    {
+      QVector< QPointF > pts; // holds the points of the polygon
+
+      /* running with around the outer of the face and generate from it
+       * polygon
+       */
+      Ccb_halfedge_circulator cc=f->outer_ccb();
+      do {
+        double x = CGAL::to_double(cc->source()->point().x());
+        double y = CGAL::to_double(cc->source()->point().y());
+        QPointF coord_source(x , y);
+        pts.push_back(coord_source );
+        //created from the outer boundary of the face
+      } while (++cc != f->outer_ccb());
+
+      // make polygon from the outer ccb of the face 'f'
+      QPolygonF pgn (pts);
+
+      // FIXME: get the bg color
+      QColor color = this->backgroundColor;
+      if ( f->color().isValid() )
+      {
+        color = f->color();
+      }
+      QBrush oldBrush = painter->brush( );
+      painter->setBrush( color );
+      painter->drawPolygon( pgn );
+      painter->setBrush( oldBrush );
+    }
+    else
+    {
+      QRectF rect = this->viewportRect( );
+      QColor color = this->backgroundColor;
+      painter->fillRect( rect, color );
+    }
+  }
+
+  template < typename Kernel_ >
+  void paintFace( Face_handle f, QPainter* painter,
+                  CGAL::Arr_polyline_traits_2< Kernel_ > )
+  {
+    if (!f->is_unbounded())  // f is not the unbounded face
+    {
+      typedef typename CGAL::Arr_polyline_traits_2<Kernel_> Arr_poly_traits;
+      typedef typename Arr_poly_traits::Compare_endpoints_xy_2 Comp_end_pts_2;
+      typedef typename Arr_poly_traits::Construct_min_vertex_2 Poly_const_min_v;
+      typedef typename Arr_poly_traits::Construct_max_vertex_2 Poly_const_max_v;
+
+      // Obtain a polyline traits class and construct the needed functors
+      Arr_poly_traits poly_tr;
+      Comp_end_pts_2 comp_end_pts = poly_tr.compare_endpoints_xy_2_object();
+      Poly_const_min_v poly_const_min_v=poly_tr.construct_min_vertex_2_object();
+      Poly_const_max_v poly_const_max_v=poly_tr.construct_max_vertex_2_object();
+
+      // Construct needed functors from the segment traits
+      typedef typename Arr_poly_traits::Subcurve_traits_2      Subcurve_traits;
+      typedef typename Subcurve_traits::Construct_min_vertex_2 Seg_const_min_v;
+      typedef typename Subcurve_traits::Construct_max_vertex_2 Seg_const_max_v;
+      Seg_const_min_v construct_min_v = poly_tr.subcurve_traits_2()->
+        construct_min_vertex_2_object();
+      Seg_const_max_v construct_max_v = poly_tr.subcurve_traits_2()->
+        construct_max_vertex_2_object();
+
+      // Iterator of the segments of an x-monotone polyline
+      typename X_monotone_curve_2::Subcurve_const_iterator seg_it;
+
+      QVector< QPointF > pts; // holds the points of the polygon
+      X_monotone_curve_2 cv;
+
+      /* running with around the outer of the face and generate from it
+       * polygon
+       */
+      Ccb_halfedge_circulator cc = f->outer_ccb();
+      do {
+        cv = cc->curve();
+
+        // Determine the direction of cv (left-to-right or right-to-left)
+        Comparison_result dir = comp_end_pts(cv);
+
+        for (seg_it = cv.subcurves_begin();
+             seg_it != cv.subcurves_end() ; ++seg_it)
+          {
+            if (dir == SMALLER)
+              {
+                // cv is directed from left-to-right
+                // Adding the left-min vertex of the current segment
+                double x = CGAL::to_double((construct_min_v(*seg_it)).x());
+                double y = CGAL::to_double((construct_min_v(*seg_it)).y());
+                QPointF coord_source(x , y);
+                pts.push_back(coord_source );
+              }
+            else
+              {
+                // cv is directed from right-to-left
+                // Adding the right-max vertex of the current segment
+                double x = CGAL::to_double((construct_max_v(*seg_it)).x());
+                double y = CGAL::to_double((construct_max_v(*seg_it)).y());
+                QPointF coord_source(x , y);
+                pts.push_back(coord_source );
+              }
+          }
+
+        if (dir == SMALLER)
+          {
+            // Add the right-most point of cv
+            double x = CGAL::to_double((poly_const_max_v(cv)).x());
+            double y = CGAL::to_double((poly_const_max_v(cv)).y());
+            QPointF coord_source(x , y);
+            pts.push_back(coord_source );
+          }
+        else
+          {
+            // Add the left-most point of cv
+            double x = CGAL::to_double((poly_const_min_v(cv)).x());
+            double y = CGAL::to_double((poly_const_min_v(cv)).y());
+            QPointF coord_source(x , y);
+            pts.push_back(coord_source );
+          }
+        //created from the outer boundary of the face
+      } while (++cc != f->outer_ccb());
+
+      // make polygon from the outer ccb of the face 'f'
+      QPolygonF pgn( pts );
+
+      // fill the face according to its color (stored at any of her
+      // incidents curves)
+      QBrush oldBrush = painter->brush( );
+      QColor def_bg_color = this->backgroundColor;
+      if (! f->color().isValid())
+      {
+        painter->setBrush( def_bg_color );
+      }
+      else
+      {
+        painter->setBrush( f->color( ) );
+      }
+      painter->drawPolygon( pgn );
+      painter->setBrush( oldBrush );
+    }
+    else
+    {
+      QRectF rect = this->viewportRect( );
+      QColor color = this->backgroundColor;
+      painter->fillRect( rect, color );
+    }
+  }
+
+#ifdef CGAL_USE_CORE
+  template < typename RatKernel, typename AlgKernel, typename NtTraits >
+  void paintFace( Face_handle f, QPainter* painter,
+                  CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > )
+  {
+    if (! f->is_unbounded())  // f is not the unbounded face
+    {
+      QVector< QPointF > pts; // holds the points of the polygon
+      /* running with around the outer of the face and generate from it
+       * polygon
+       */
+      Ccb_halfedge_circulator cc=f->outer_ccb();
+      do
+      {
+        if (this->antenna(cc))
+          continue;
+
+        Halfedge_handle he = cc;
+        X_monotone_curve_2 c = he->curve();
+        // Get the co-ordinates of the curve's source and target.
+        double sx = CGAL::to_double(he->source()->point().x()),
+          sy = CGAL::to_double(he->source()->point().y()),
+          tx = CGAL::to_double(he->target()->point().x()),
+          ty = CGAL::to_double(he->target()->point().y());
+
+        QPointF coord_source(sx, sy);
+        QPointF coord_target(tx, ty);
+        QPoint coord_source_viewport = this->fromScene( coord_source );
+        QPoint coord_target_viewport = this->fromScene( coord_target );
+
+        if (c.orientation() == CGAL::COLLINEAR)
+          pts.push_back(coord_source );
+        else
+        {
+          // If the curve is monotone, than its source and its target has the
+          // extreme x co-ordinates on this curve.
+          bool is_source_left = (sx < tx);
+          int  x_min = is_source_left ?
+            coord_source_viewport.x( ) : coord_target_viewport.x( );
+          int  x_max = is_source_left ?
+            coord_target_viewport.x( ) : coord_source_viewport.x( );
+          double curr_x, curr_y;
+          int x;
+
+          Arr_conic_point_2 px;
+
+          pts.push_back(coord_source );
+
+          const int DRAW_FACTOR = 5;
+          if (is_source_left)
+          {
+            for (x = x_min + DRAW_FACTOR; x < x_max; x+=DRAW_FACTOR)
+            {
+              //= COORD_SCALE)
+              curr_x = this->toScene( x );
+              Alg_kernel   ker;
+              Arr_conic_point_2 curr_p(curr_x, 0);
+              if (!(ker.compare_x_2_object()(curr_p, c.left()) !=
+                    CGAL::SMALLER &&
+                    ker.compare_x_2_object()(curr_p, c.right()) !=
+                    CGAL::LARGER))
+                continue;
+              px = c.point_at_x (curr_p);
+              curr_y = CGAL::to_double(px.y());
+              QPointF curr( curr_x, curr_y );
+              pts.push_back( curr );
+            }// for
+          }
+          else
+          {
+            for (x = x_max; x > x_min; x-=DRAW_FACTOR)
+            {
+              curr_x = this->toScene( x );
+              Alg_kernel   ker;
+              Arr_conic_point_2 curr_p(curr_x, 0);
+              if (!(ker.compare_x_2_object() (curr_p, c.left()) !=
+                    CGAL::SMALLER &&
+                    ker.compare_x_2_object() (curr_p, c.right()) !=
+                    CGAL::LARGER))
+                continue;
+              px = c.point_at_x (curr_p);
+              curr_y = CGAL::to_double(px.y());
+              QPointF curr( curr_x, curr_y );
+              pts.push_back( curr );
+            }// for
+          }// else
+          pts.push_back(coord_target );
+        }
+        //created from the outer boundary of the face
+      } while (++cc != f->outer_ccb());
+
+      // make polygon from the outer ccb of the face 'f'
+      QPolygonF pgn( pts );
+
+      // fill the face according to its color (stored at any of her
+      // incidents curves)
+      QBrush oldBrush = painter->brush( );
+      QColor def_bg_color = this->backgroundColor;
+      if (! f->color().isValid())
+      {
+        painter->setBrush( def_bg_color );
+      }
+      else
+      {
+        painter->setBrush( f->color( ) );
+      }
+      painter->drawPolygon( pgn );
+      painter->setBrush( oldBrush );
+    }
+    else
+    {
+      QRectF rect = this->viewportRect( );
+      QColor color = this->backgroundColor;
+      painter->fillRect( rect, color );
+    }
+  }
+#endif
+
+  template < typename CircularKernel >
+  void paintFace(Face_handle f, QPainter* painter,
+                 CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
+  {
+    if ( f->is_unbounded( ) )
+    {
+      QRectF rect = this->viewportRect( );
+      QColor color = this->backgroundColor;
+      if ( f->color().isValid() )
+        color = f->color();
+      painter->fillRect( rect, color );
+      return;
+    }
+    QPainterPath path;
+    bool isFirstArc = true;
+    Ccb_halfedge_circulator cc=f->outer_ccb();
+    do
+    {
+      if ( this->antenna( cc ) )
+        continue;
+
+      if ( isFirstArc )
+      {
+        isFirstArc = false;
+        X_monotone_curve_2 c = cc->curve( );
+
+        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
+        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
+        if ( ! this->isProperOrientation( cc ) )
+        {
+          std::swap( source, target );
+        }
+
+        QPointF circleCenter( to_double(c.supporting_circle().center().x()),
+                              to_double(c.supporting_circle().center().y()) );
+        //this->drawDiagnosticArc( circleCenter, source, target, painter );
+
+        std::swap( source, target );
+        double asource = atan2( -(source - circleCenter).y(),
+                                (source - circleCenter).x() );
+        double atarget = atan2( -(target - circleCenter).y(),
+                                (target - circleCenter).x() );
+        double aspan = atarget - asource;
+        std::swap( source, target );
+
+        path.moveTo( source );
+        path.arcTo( convert(c.supporting_circle().bbox()), asource * 180/M_PI,
+                    aspan * 180/M_PI );
+        path.lineTo( target );
+      }
+      else
+      {
+        X_monotone_curve_2 c = cc->curve( );
+        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
+        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
+        if ( ! this->pathTouchingSource( path, c ) )
+          std::swap( source, target );
+
+        QPointF circleCenter( to_double(c.supporting_circle().center().x()),
+                              to_double(c.supporting_circle().center().y()) );
+        //this->drawDiagnosticArc( circleCenter, source, target, painter );
+
+        std::swap( source, target );
+        double asource = atan2( -(source - circleCenter).y(),
+                                (source - circleCenter).x() );
+        double atarget = atan2( -(target - circleCenter).y(),
+                                (target - circleCenter).x() );
+        double aspan = atarget - asource;
+        std::swap( source, target );
+
+        path.arcTo( convert(c.supporting_circle().bbox()), asource * 180/M_PI,
+                    aspan * 180/M_PI );
+        path.lineTo( target );
+      }
+    } while (++cc != f->outer_ccb());
+
+    if ( f->color().isValid() )
+    {
+      QPen savePen = painter->pen();
+      QBrush saveBrush = painter->brush();
+      QPen pen = painter->pen();
+      pen.setColor( f->color() );
+
+      painter->setPen( pen );
+      painter->setBrush( f->color() );
+      painter->drawPath( path );
+      painter->setPen( savePen );
+      painter->setBrush( saveBrush );
+    }
+  }
+
+  void drawDiagnosticArc( QPointF c, QPointF s, QPointF t, QPainter* qp )
+  {
+    QBrush saveBrush = qp->brush( );
+    double r = QLineF( c, s ).length();
+    QRectF bb( c.x() - r, c.y() - r, 2*r, 2*r );
+
+    QPainterPath path;
+    // because we flipped the y-axis in our view, we need to flip our angles
+    // with respect to the y-axis. we can do this by flipping s and t, then
+    // negating their y-values
+    std::swap( s, t );
+    double as = atan2( -(s - c).y(), (s - c).x() );
+    double at = atan2( -(t - c).y(), (t - c).x() );
+    double aspan = at - as;
+
+    path.moveTo( c );
+    path.lineTo( s );
+    path.arcTo( bb, as * 180/M_PI, aspan * 180/M_PI );
+    path.closeSubpath( );
+    qp->drawEllipse( bb );
+
+    qp->setBrush( ::Qt::red );
+    qp->fillPath( path, qp->brush() );
+    qp->setBrush( saveBrush );
+
+  }
+
+  /**
+     Return false if the tip of the given curve doesn't align with either of the
+     endpoints of the next curve.
+  */
+  bool isProperOrientation( Ccb_halfedge_circulator cc )
+  {
+    Ccb_halfedge_circulator ccnext = cc;
+    Halfedge_handle he = cc;
+    X_monotone_curve_2 thisCurve = he->curve( );
+    ccnext++;
+    while ( this->antenna( ccnext ) ) ccnext++;
+    Halfedge_handle next_he = ccnext;
+    X_monotone_curve_2 nextCurve = next_he->curve( );
+
+    QPointF thisTarget( to_double(thisCurve.target().x()),
+                        to_double(thisCurve.target().y()) );
+    QPointF nextSource( to_double(nextCurve.source().x()),
+                        to_double(nextCurve.source().y()) );
+    QPointF nextTarget( to_double(nextCurve.target().x()),
+                        to_double(nextCurve.target().y()) );
+    double dist1 = QLineF( thisTarget, nextSource ).length();
+    double dist2 = QLineF( thisTarget, nextTarget ).length();
+    bool res = ( dist1 < 1e-2 || dist2 < 1e-2 );
+
+    return res;
+  }
+
+  bool pathTouchingSource( const QPainterPath& path, X_monotone_curve_2 c )
+  {
+    QPointF a = path.currentPosition( );
+    QPointF b( to_double(c.source().x()), to_double(c.source().y()) );
+    // QPointF d( to_double(c.target().x()), to_double(c.target().y()) );
+    bool res = (QLineF( a, b ).length() < 1e-2);
+
+    return res;
+  }
+
+#if 0
+  template < typename CircularKernel >
+  void paintFace(Face_handle f, QPainter* painter,
+                 CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
+  {
+    // std::cout << "face begin" << std::endl;
+    if (! f->is_unbounded())  // f is not the unbounded face
+    {
+      QBrush oldBrush = painter->brush( );
+      QColor def_bg_color = this->backgroundColor;
+      if (! f->color().isValid())
+      {
+        painter->setBrush( def_bg_color );
+      }
+      else
+      {
+        painter->setBrush( f->color( ) );
+      }
+
+      // approach: draw a closed path with arcs
+      QPainterPath path;
+      //path.setFillRule( ::Qt::WindingFill );
+
+      bool isFirstArc = true;
+      Ccb_halfedge_circulator cc=f->outer_ccb();
+      do
+      {
+        if (this->antenna(cc))
+          continue;
+
+        Halfedge_handle he = cc;
+        X_monotone_curve_2 c = he->curve(); // circular arc
+
+        const typename CircularKernel::Circle_2& circ = c.supporting_circle();
+        const typename CircularKernel::Point_2& center = circ.center();
+        QPointF source( to_double(c.source().x()), to_double(c.source().y()) );
+        QPointF target( to_double(c.target().x()), to_double(c.target().y()) );
+
+        if ( isFirstArc )
+        {
+          isFirstArc = false;
+          // make sure we are going the right way
+          Ccb_halfedge_circulator ccnext = cc;
+          ccnext++;
+          while ( this->antenna( ccnext ) ) ccnext++;
+          Halfedge_handle next_he = ccnext;
+          X_monotone_curve_2 next_c = next_he->curve( );
+          QPointF next_source( to_double(next_c.source().x()),
+                               to_double(next_c.source().y()) );
+          QPointF next_target( to_double(next_c.target().x()),
+                               to_double(next_c.target().y()) );
+          // std::cout << "next curve's points: " << std::endl
+          //           << "  s: " << next_source.x( )
+          //           << " " << next_source.y( ) << std::endl
+          //           << "  t: " << next_target.x( )
+          //           << " " << next_target.y( ) << std::endl;
+          double dist1 = QLineF( target, next_source ).length();
+          double dist2 = QLineF( target, next_target ).length();
+          if ( dist1 > 1e-2 && dist2 > 1e-2 )
+          {
+            std::cout << "swapping first curve points" << std::endl;
+            std::swap( source, target );
+          }
+
+          path.moveTo( source );
+        }
+        else
+        {
+          //bool source_is_left = (source.x() < target.x());
+          double dist = QLineF( path.currentPosition(), source ).length( );
+          // if ( dist > 1e-2 )
+          // {
+          //     std::cout << "swapping source and target " << dist
+          //               << std::endl;
+          //     std::swap( source, target );
+          // }
+        }
+        // std::cout << "currentPosition: " << path.currentPosition().x()
+        //           << ", " << path.currentPosition().y() << std::endl;
+        std::stringstream ss;
+        ss << "  source: " << to_double(source.x( )) << ", "
+           << to_double(source.y()) << std::endl
+           << "  target: " << to_double(target.x( )) << ", "
+           << to_double(target.y()) << std::endl;
+
+#if 0
+        source = QPointF( to_double(c.source().x()), to_double(c.source().y()));
+        target = QPointF( to_double(c.target().x()), to_double(c.target().y()));
+        double asource = std::atan2( -to_double(source.y() - center.y()),
+                                     to_double(source.x() - center.x()));
+        double atarget = std::atan2( -to_double(target.y() - center.y()),
+                                     to_double(target.x() - center.x()));
+#endif
+        double asource = std::atan2( to_double(source.y() - center.y()),
+                                     to_double(source.x() - center.x()) );
+        double atarget = std::atan2( to_double(target.y() - center.y()),
+                                     to_double(target.x() - center.x()) );
+
+        ss << "  asource: " << (asource * 180/M_PI) << std::endl
+           << "  atarget: " << (atarget * 180/M_PI) << std::endl;
+
+        //std::swap(asource, atarget);
+        double aspan = atarget - asource;
+        ss << "  aspan: " << (aspan * 180/M_PI) << std::endl;
+
+        if(aspan < 0.)
+          aspan += 2 * CGAL_PI;
+
+        const double coeff = 180*16/CGAL_PI;
+        double circR = sqrt(to_double(circ.squared_radius()));
+
+#if 0
+        painter->drawEllipse( to_double( center.x() - circR ),
+                              to_double( center.y() - circR ),
+                              2*circR, 2*circR );
+#endif
+        QPointF curPos = path.currentPosition( );
+        //path.lineTo( to_double(target.x( )), to_double(target.y()) );
+
+#if 0
+        ss << "drawing line from " << curPos.x( ) << ", " << curPos.y( )
+           << " to "
+           << to_double(target.x( )) << ", " << to_double(target.y());
+#endif
+        // std::cout << ss.str( ) << std::endl;
+        path.arcTo( convert(circ.bbox()), asource * 180/CGAL_PI,
+                    aspan *180/CGAL_PI );
+#if 0
+        qp->drawArc(convert(circ.bbox()),
+                    (int)(asource * coeff),
+                    (int)(aspan * coeff));
+#endif
+      } while (++cc != f->outer_ccb());
+
+      // fill the face according to its color (stored at any of her
+      // incidents curves)
+#if 0
+      painter->drawPolygon( pgn );
+#endif
+      path.closeSubpath( );
+#if 0
+      QPainterPathStroker stroker;
+      QPainterPath fillablePath = stroker.createStroke( path );
+#endif
+      painter->fillPath( path, painter->brush() );
+#if 0
+      QPolygonF fillIt = path.toFillPolygon( );
+      painter->drawPolygon( fillIt );
+#endif
+      //painter->drawPath( path );
+      //painter->fillPath( path, painter->brush() );
+      painter->setBrush( oldBrush );
+    }
+    else
+    {
+      QRectF rect = this->viewportRect( );
+      QColor color = this->backgroundColor;
+      painter->fillRect( rect, color );
+    }
+  }
+#endif
+
+  //void cacheCurveBoundingRects( );
+
+  void updateBoundingBox();
+
+  template < typename TTraits>
+  void updateBoundingBox(TTraits traits );
+
+  template < typename Kernel_>
+  void updateBoundingBox(CGAL::Arr_linear_traits_2<Kernel_> traits);
+
+  // template < typename Coefficient_>
+  // void updateBoundingBox(CGAL::Arr_algebraic_segment_traits_2<Coefficient_>
+  //                        traits);
+
+  Arrangement* arr;
+  ArrangementPainterOstream< Traits > painterostream;
+  CGAL::Qt::Converter< Kernel > convert;
+  std::map< Curve_iterator, CGAL::Bbox_2 > curveBboxMap;
+}; // class ArrangementGraphicsItem
+
+  template < typename Arr_, class ArrTraits >
+  ArrangementGraphicsItem< Arr_, ArrTraits >::
+  ArrangementGraphicsItem( Arrangement* arr_ ):
+    arr( arr_ ),
+    painterostream( 0 )
+  {
+    if ( this->arr->number_of_vertices( ) == 0 ) {
+      this->hide( );
+    }
+    this->updateBoundingBox( );
+    this->setZValue( 3 );
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  QRectF
+  ArrangementGraphicsItem< Arr_, ArrTraits >::
+  boundingRect( ) const
+  {
+    QRectF rect = this->convert( this->bb );
+    return rect;
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  void
+  ArrangementGraphicsItem< Arr_, ArrTraits >::
+  paint(QPainter* painter,
+        const QStyleOptionGraphicsItem* /* option */,
+        QWidget*  /*widget*/)
+  {
+    this->paint( painter, ArrTraits( ) );
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  template < typename TTraits >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  paint(QPainter* painter, TTraits /* traits */)
+  {
+    this->paintFaces( painter );
+
+    painter->setPen( this->verticesPen );
+    this->painterostream =
+      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
+    this->painterostream.setScene( this->scene );
+
+    for ( Vertex_iterator it = this->arr->vertices_begin( );
+          it != this->arr->vertices_end( ); ++it )
+    {
+      Point_2 p = it->point( );
+      Kernel_point_2 pt( p.x( ), p.y( ) );
+      this->painterostream << pt;
+    }
+    painter->setPen( this->edgesPen );
+    for ( Edge_iterator it = this->arr->edges_begin( );
+          it != this->arr->edges_end( ); ++it )
+    {
+      X_monotone_curve_2 curve = it->curve( );
+      this->painterostream << curve;
+    }
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  template < typename Kernel_ >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  paint(QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
+  {
+    this->updateBoundingBox( );
+    this->paintFaces( painter );
+    painter->setPen( this->verticesPen );
+
+    this->painterostream =
+      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
+    this->painterostream.setScene( this->scene );
+
+    for ( Vertex_iterator it = this->arr->vertices_begin( );
+          it != this->arr->vertices_end( ); ++it )
+    {
+      Point_2 pt = it->point( );
+      this->painterostream << pt;
+    }
+    painter->setPen( this->edgesPen );
+    for ( Edge_iterator it = this->arr->edges_begin( );
+          it != this->arr->edges_end( ); ++it )
+    {
+      X_monotone_curve_2 curve = it->curve( );
+      this->painterostream << curve;
+    }
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  template < typename CircularKernel >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  paint(QPainter* painter,
+        CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
+  {
+    typedef Kernel_point_2 Non_arc_point_2;
+    typedef typename Traits::Point_2 Arc_point_2;
+
+    this->paintFaces( painter );
+
+    painter->setPen( this->verticesPen );
+    this->painterostream =
+      ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
+    this->painterostream.setScene( this->scene );
+
+    for ( Vertex_iterator it = this->arr->vertices_begin( );
+          it != this->arr->vertices_end( ); ++it )
+    {
+      Arc_point_2 pt = it->point( );
+      Non_arc_point_2 pt2(CGAL::to_double(pt.x( )), CGAL::to_double(pt.y()) );
+      this->painterostream << pt2;
+    }
+    painter->setPen( this->edgesPen );
+    for ( Edge_iterator it = this->arr->edges_begin( );
+          it != this->arr->edges_end( ); ++it )
+    {
+      X_monotone_curve_2 curve = it->curve( );
+      this->painterostream << curve;
+    }
+  }
+
+#if 0
+  template < typename Arr_, typename ArrTraits >
+  template < typename Coefficient_ >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  paint(QPainter* painter,
+        CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > /* traits */)
+  {
+    painter->setPen( this->verticesPen );
+    QRectF clipRect = this->boundingRect( );
+    if ( std::isinf(clipRect.left( )) ||
+         std::isinf(clipRect.right( )) ||
+         std::isinf(clipRect.top( )) ||
+         std::isinf(clipRect.bottom( )) )
+    {
+      clipRect = this->viewportRect( );
+    }
+
+    this->painterostream =
+      ArrangementPainterOstream< Traits >( painter, clipRect );
+    this->painterostream.setScene( this->scene );
+
+    for ( Vertex_iterator it = this->arr->vertices_begin( );
+          it != this->arr->vertices_end( ); ++it )
+    {
+      Point_2 p = it->point( );
+      //std::pair< double, double > approx = p.to_double( );
+      //Kernel_point_2 pt( approx.first, approx.second );
+      //this->painterostream << pt;
+      this->painterostream << p;
+    }
+    painter->setPen( this->edgesPen );
+    for ( Edge_iterator it = this->arr->edges_begin( );
+          it != this->arr->edges_end( ); ++it )
+    {
+      X_monotone_curve_2 curve = it->curve( );
+      this->painterostream << curve;
+    }
+  }
+#endif
+
+  // We let the bounding box only grow, so that when vertices get removed
+  // the maximal bbox gets refreshed in the GraphicsView
+  template < typename Arr_, typename ArrTraits >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::updateBoundingBox( )
+  {
+    this->updateBoundingBox( ArrTraits( ) );
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  template < typename TTraits >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  updateBoundingBox(TTraits /* traits */)
+  {
+    this->prepareGeometryChange( );
+    if ( this->arr->number_of_vertices( ) == 0 )
+    {
+      this->bb = Bbox_2( 0, 0, 0, 0 );
+      this->bb_initialized = false;
+      return;
+    }
+    else
+    {
+      this->bb = this->arr->vertices_begin( )->point( ).bbox( );
+      this->bb_initialized = true;
+    }
+
+    for ( Curve_iterator it = this->arr->curves_begin( );
+          it != this->arr->curves_end( );
+          ++it )
+    {
+      if ( this->curveBboxMap.count( it ) == 0 )
+      {
+        this->curveBboxMap[ it ] = it->bbox( );
+      }
+      this->bb = this->bb + this->curveBboxMap[ it ];
+    }
+  }
+
+  template < typename Arr_, typename ArrTraits >
+  template < typename Kernel_ >
+  void
+  ArrangementGraphicsItem< Arr_, ArrTraits >::
+  updateBoundingBox(CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
+  {
+    this->prepareGeometryChange( );
+    QRectF clipRect = this->viewportRect( );
+    this->convert = Converter<Kernel>( clipRect );
+
+    if ( ! clipRect.isValid( ) /*|| this->arr->number_of_vertices( ) == 0*/ )
+    {
+      this->bb = Bbox_2( 0, 0, 0, 0 );
+      this->bb_initialized = false;
+      return;
+    }
+    else
+    {
+      this->bb = this->convert( clipRect ).bbox( );
+      this->bb_initialized = true;
+    }
+
+    for ( Curve_iterator it = this->arr->curves_begin( );
+          it != this->arr->curves_end( );
+          ++it )
+    {
+      if ( it->is_segment( ) )
+      {
+        this->bb = this->bb + it->segment( ).bbox( );
+      }
+      else if ( it->is_ray( ) )
+      {
+        QLineF qclippedRay = this->convert( it->ray( ) );
+        Segment_2 clippedRay = this->convert( qclippedRay );
+        this->bb = this->bb + clippedRay.bbox( );
+      }
+      else // ( it->is_line( ) )
+      {
+        QLineF qclippedLine = this->convert( it->line( ) );
+        Segment_2 clippedLine = this->convert( qclippedLine );
+        this->bb = this->bb + clippedLine.bbox( );
+      }
+    }
+  }
+
+#if 0
+  template < typename Arr_, typename ArrTraits >
+  template < typename Coefficient_ >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::
+  updateBoundingBox(CGAL::Arr_algebraic_segment_traits_2<Coefficient_> traits)
+  {
+    this->prepareGeometryChange( );
+    if ( this->arr->number_of_vertices( ) == 0 )
+    {
+      this->bb = Bbox_2( 0, 0, 0, 0 );
+      this->bb_initialized = false;
+      return;
+    }
+    else
+    {
+      //std::pair< double, double > approx =
+      //  this->arr->vertices_begin( )->point( ).to_double( );
+      //this->bb = CGAL::Bbox_2( approx.first, approx.second,
+      //                         approx.first, approx.second );
+      this->bb = CGAL::Bbox_2( 0, 0, 0, 0 );
+      this->bb_initialized = true;
+    }
+    typename Traits::Make_x_monotone_2 make_x_monotone_2 =
+      traits.make_x_monotone_2_object( );
+    for ( Curve_iterator it = this->arr->curves_begin( );
+          it != this->arr->curves_end( );
+          ++it )
+    {
+      std::vector< CGAL::Object > cvs;
+      make_x_monotone_2( *it, std::back_inserter( cvs ) );
+      for ( unsigned int i = 0 ; i < cvs.size( ); ++i )
+      {
+        X_monotone_curve_2 cv;
+        CGAL::assign( cv, cvs[ i ] );
+        this->bb = this->bb + cv.bbox( );
+      }
+    }
+  }
+#endif
+
+  template < typename Arr_, typename ArrTraits >
+  void ArrangementGraphicsItem< Arr_, ArrTraits >::modelChanged( )
+  {
+    if ( this->arr->is_empty( ) )
+    {
+      this->hide( );
+    }
+    else
+    {
+      this->show( );
+    }
+    this->updateBoundingBox( );
+    this->update( );
+  }
+
+  /**
+     Specialized methods:
+     updateBoundingBox
+  */
+#if 0
+  template < typename Arr_, typename Kernel_ >
+  class ArrangementGraphicsItem< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > > :
+    public ArrangementGraphicsItemBase
+  {
+    typedef Arr_ Arrangement;
+    typedef ArrangementGraphicsItemBase Superclass;
+    typedef typename Arrangement::Geometry_traits_2     Traits;
+    typedef typename Arrangement::Vertex_iterator       Vertex_iterator;
+    typedef typename Arrangement::Curve_iterator        Curve_iterator;
+    typedef typename Arrangement::Edge_iterator         Edge_iterator;
+    typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
+    typedef typename Traits::X_monotone_curve_2         X_monotone_curve_2;
+    typedef typename Kernel::Point_2                    Point_2;
+    typedef typename Kernel::Segment_2                  Segment_2;
+
+  public:
+    ArrangementGraphicsItem( Arrangement* arr_ ):
+      arr( arr_ ),
+      painterostream( 0 )
+    {
+      if ( this->arr->number_of_vertices( ) == 0 ) {
+        this->hide( );
+      }
+      this->updateBoundingBox( );
+      this->setZValue( 3 );
+    }
+
+  public: // methods
+#if 0
+    void modelChanged( )
+    {
+      if ( this->arr->is_empty( ) )
+      {
+        this->hide( );
+      }
+      else
+      {
+        this->show( );
+      }
+      this->updateBoundingBox( );
+      this->update( );
+    }
+
+    // @override QGraphicsItem::boundingRect
+    QRectF boundingRect( ) const
+    {
+      QRectF rect = this->convert( this->bb );
+      return rect;
+    }
+#endif
+
+    // @override QGraphicsItem::paint
+#if 0
+    virtual void paint( QPainter* painter,
+                        const QStyleOptionGraphicsItem* option,
+                        QWidget* widget )
+    {
+      this->updateBoundingBox( );
+      painter->setPen( this->verticesPen );
+      this->painterostream =
+        ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
+      this->painterostream.setScene( this->scene );
+
+      for ( Vertex_iterator it = this->arr->vertices_begin( );
+            it != this->arr->vertices_end( ); ++it )
+      {
+        Point_2 pt = it->point( );
+        this->painterostream << pt;
+      }
+      painter->setPen( this->edgesPen );
+      for ( Edge_iterator it = this->arr->edges_begin( );
+            it != this->arr->edges_end( ); ++it )
+      {
+        X_monotone_curve_2 curve = it->curve( );
+        this->painterostream << curve;
+      }
+    }
+#endif
+
+  protected: // methods
+#if 0
+    void updateBoundingBox( )
+    {
+      this->prepareGeometryChange( );
+      QRectF clipRect = this->viewportRect( );
+      this->convert = Converter<Kernel>( clipRect );
+
+      if ( ! clipRect.isValid( ) /*|| this->arr->number_of_vertices( ) == 0*/ )
+      {
+        this->bb = Bbox_2( 0, 0, 0, 0 );
+        this->bb_initialized = false;
+        return;
+      }
+      else
+      {
+        this->bb = this->convert( clipRect ).bbox( );
+        this->bb_initialized = true;
+      }
+
+      for ( Curve_iterator it = this->arr->curves_begin( );
+            it != this->arr->curves_end( );
+            ++it )
+      {
+        if ( it->is_segment( ) )
+        {
+          this->bb = this->bb + it->segment( ).bbox( );
+        }
+        else if ( it->is_ray( ) )
+        {
+          QLineF qclippedRay = this->convert( it->ray( ) );
+          Segment_2 clippedRay = this->convert( qclippedRay );
+          this->bb = this->bb + clippedRay.bbox( );
+        }
+        else // ( it->is_line( ) )
+        {
+          QLineF qclippedLine = this->convert( it->line( ) );
+          Segment_2 clippedLine = this->convert( qclippedLine );
+          this->bb = this->bb + clippedLine.bbox( );
+        }
+      }
+    }
+#endif
+
+  protected: // fields
+    Arrangement* arr;
+    ArrangementPainterOstream< Traits > painterostream;
+    CGAL::Qt::Converter< Kernel > convert;
+  }; // class ArrangementGraphicsItem
+#endif
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_ARRANGEMENT_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h
new file mode 100644
index 0000000..b585d0a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h
@@ -0,0 +1,1006 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
+#define CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
+
+#include <QRectF>
+#include <vector>
+
+// TODO: should be included in PainterOstream.h
+#include <CGAL/Kernel/global_functions.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arr_algebraic_segment_traits_2.h>
+
+#include "Utils.h"
+
+// #include <CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h>
+
+class QPainter;
+
+namespace CGAL {
+namespace Qt {
+
+template < typename ArrTraits >
+class ArrangementPainterOstreamBase : public QGraphicsSceneMixin
+{
+public:
+  // typedefs
+  typedef ArrTraits Traits;
+  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Kernel::Segment_2                    Segment_2;
+  typedef typename Kernel::Ray_2                        Ray_2;
+  typedef typename Kernel::Line_2                       Line_2;
+  typedef typename Kernel::Triangle_2                   Triangle_2;
+  typedef typename Kernel::Iso_rectangle_2              Iso_rectangle_2;
+  typedef typename Kernel::Circle_2                     Circle_2;
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstreamBase( QPainter* p,
+                                 QRectF clippingRectangle = QRectF( ) ) :
+    painterOstream( p, clippingRectangle ),
+    qp( p ),
+    convert( clippingRectangle ),
+    // scene( NULL ),
+    clippingRect( QRectF( ) ), // null rectangle
+    scale( 1.0 )
+  {
+    if ( p != 0 )
+    {
+      this->scale = p->worldTransform( ).m11( );
+    }
+  }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstreamBase() {}
+
+  // methods
+  template < typename T >
+  ArrangementPainterOstreamBase& operator<<( const T& t )
+  {
+    this->painterOstream << t;
+    return *this;
+  }
+
+  void setScene( QGraphicsScene* scene_ )
+  {
+    this->scene = scene_;
+
+    // set the clipping rectangle
+    if ( scene_ == NULL )
+    {
+      return;
+    }
+    this->clippingRect = this->viewportRect( );
+    this->convert = Converter< Kernel >( this->clippingRect );
+  }
+
+#if 0
+  void setScene( QGraphicsScene* scene_ )
+  {
+    this->scene = scene_;
+
+    // set the clipping rectangle
+    if ( scene_ == NULL )
+    {
+      return;
+    }
+    this->clippingRect = this->getViewportRect( );
+  }
+#endif
+
+protected: // methods
+#if 0
+  QRectF getViewportRect( ) const
+  {
+    // assumes scene is not null and attached to exactly one view
+    QGraphicsView* view = this->scene->views( ).first( );
+    QPointF p1 = view->mapToScene( 0, 0 );
+    QPointF p2 = view->mapToScene( view->width( ), view->height( ) );
+    QRectF clipRect = QRectF( p1, p2 );
+
+    return clipRect;
+  }
+#endif
+
+protected:
+  // fields
+  PainterOstream< Kernel > painterOstream;
+  QPainter* qp;
+  Converter< Kernel > convert;
+  // QGraphicsScene* scene;
+  QRectF clippingRect;
+  double scale;
+
+}; // class ArrangementPainterOstreamBase
+
+template < typename ArrTraits >
+class ArrangementPainterOstream :
+    public ArrangementPainterOstreamBase< ArrTraits >
+{
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
+    ArrangementPainterOstreamBase< ArrTraits >( p, clippingRectangle )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+};
+
+template < typename Kernel_ >
+class ArrangementPainterOstream<CGAL::Arr_segment_traits_2< Kernel_> >:
+  public ArrangementPainterOstreamBase<CGAL::Arr_segment_traits_2<Kernel_> >
+{
+public: // typedefs
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_segment_traits_2< Kernel > Traits;
+  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
+  typedef typename Superclass::Point_2                  Point_2;
+  typedef typename Superclass::Segment_2                Segment_2;
+  typedef typename Superclass::Ray_2                    Ray_2;
+  typedef typename Superclass::Line_2                   Line_2;
+  typedef typename Superclass::Triangle_2               Triangle_2;
+  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
+  typedef typename Superclass::Circle_2                 Circle_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
+    Superclass(p, clippingRectangle)
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    const Point_2& p1 = curve.source( );
+    const Point_2& p2 = curve.target( );
+    Segment_2 seg( p1, p2 );
+
+    // skip segments outside our view
+    QRectF seg_bb = this->convert( seg.bbox( ) );
+    if ( this->clippingRect.isValid( ) &&
+         ! this->clippingRect.intersects( seg_bb ) )
+    {
+      return *this;
+    }
+
+    this->painterOstream << seg;
+    return *this;
+  }
+
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    QPointF qpt = this->convert( p );
+    // clip the point if possible
+    if ( this->clippingRect.isValid( ) &&
+         ! this->clippingRect.contains( qpt ) )
+    {
+      return *this;
+    }
+
+    QPen savePen = this->qp->pen( );
+    this->qp->setBrush( QBrush( savePen.color( ) ) );
+    double radius = savePen.width( ) / 2.0;
+    radius /= this->scale;
+
+    this->qp->drawEllipse( qpt, radius, radius );
+
+    this->qp->setBrush( QBrush( ) );
+    this->qp->setPen( savePen );
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+};
+
+template < typename SegmentTraits >
+class ArrangementPainterOstream<CGAL::Arr_polyline_traits_2<SegmentTraits> > :
+  public ArrangementPainterOstreamBase<CGAL::Arr_polyline_traits_2<
+                                         SegmentTraits> >
+{
+public: // typedefs
+  typedef ArrangementPainterOstreamBase<CGAL::Arr_polyline_traits_2<
+                                          SegmentTraits> > Superclass;
+  typedef typename Superclass::Traits                   Traits;
+  typedef typename Superclass::Kernel                   Kernel;
+  typedef typename Superclass::Point_2                  Point_2;
+  typedef typename Superclass::Segment_2                Segment_2;
+  typedef typename Superclass::Ray_2                    Ray_2;
+  typedef typename Superclass::Line_2                   Line_2;
+  typedef typename Superclass::Triangle_2               Triangle_2;
+  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
+  typedef typename Superclass::Circle_2                 Circle_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
+    Superclass( p, clippingRectangle )
+  { }
+
+    /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    for (typename X_monotone_curve_2::Subcurve_const_iterator it =
+           curve.subcurves_begin();
+         it != curve.subcurves_end(); ++it)
+      {
+        this->painterOstream << *it;
+      }
+    // TODO: implement polyline painting
+#if 0
+    const Point_2& p1 = curve.source( );
+    const Point_2& p2 = curve.target( );
+    Segment_2 seg( p1, p2 );
+    this->painterOstream << seg;
+#endif
+    return *this;
+  }
+
+  // cloned from segtraits painter
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    QPointF qpt = this->convert( p );
+    QPen savePen = this->qp->pen( );
+    this->qp->setBrush( QBrush( savePen.color( ) ) );
+    double radius = savePen.width( ) / 2.0;
+    radius /= this->scale;
+
+    this->qp->drawEllipse( qpt, radius, radius );
+
+    this->qp->setBrush( QBrush( ) );
+    this->qp->setPen( savePen );
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+};
+
+template < typename RatKernel, class AlgKernel, class NtTraits >
+class ArrangementPainterOstream<CGAL::Arr_conic_traits_2<RatKernel, AlgKernel,
+                                                         NtTraits > >:
+  public ArrangementPainterOstreamBase< CGAL::Arr_conic_traits_2<RatKernel,
+                                                                 AlgKernel,
+                                                                 NtTraits> >
+{
+public: // typedefs
+  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > Traits;
+  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
+  typedef typename Superclass::Point_2                  Point_2;
+  typedef typename Superclass::Segment_2                Segment_2;
+  typedef typename Superclass::Ray_2                    Ray_2;
+  typedef typename Superclass::Line_2                   Line_2;
+  typedef typename Superclass::Triangle_2               Triangle_2;
+  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
+  typedef typename Superclass::Circle_2                 Circle_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+  typedef typename Traits::Construct_x_monotone_curve_2
+    Construct_x_monotone_curve_2;
+  typedef typename Traits::Point_2                      Intersection_point_2;
+  typedef typename Traits::Intersect_2                  Intersect_2;
+  typedef typename Traits::Multiplicity                 Multiplicity;
+  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
+  typedef typename Kernel::FT                           FT;
+
+public: // inner classes
+  // utility class to use with std::sort on an Intersect_2 result set.
+  class Compare_intersection_point_result
+  {
+  public:
+    typedef std::pair< Intersection_point_2, Multiplicity > Result;
+    // returns whether the point1 < point2, using x-coord to compare
+    bool operator()( const Result& o1, const Result& o2 )
+    {
+      Point_2 p1 = o1.first;
+      Point_2 p2 = o2.first;
+      return ( p1.x( ) < p2.x( ) );
+    }
+  };
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
+    Superclass( p, clippingRectangle ),
+    //intersect_2( this->traits.intersect_2_object( ) ),
+    // Why doesn't this work?
+    construct_x_monotone_curve_2(this->
+                                 traits.construct_x_monotone_curve_2_object())
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    CGAL::Bbox_2 bb = curve.bbox( );
+    QRectF qbb = this->convert( bb );
+    // quick cull
+    if ( this->clippingRect.isValid( ) &&
+         ! this->clippingRect.intersects( qbb ) )
+    {
+      //std::cout << "quick culled curve" << std::endl;
+      return *this;
+    }
+
+#if 0
+    std::cout << "bottom: ("
+              << this->clippingRect.bottomLeft( ).x( )
+              << " "
+              << this->clippingRect.bottomLeft( ).y( )
+              << " "
+              << this->clippingRect.bottomRight( ).x( )
+              << " "
+              << this->clippingRect.bottomRight( ).y( )
+              << ")"
+              << std::endl;
+#endif
+
+    if ( this->clippingRect.isValid( ) )
+    {
+      std::vector< X_monotone_curve_2 > visibleParts;
+      if ( this->clippingRect.contains( qbb ) )
+      {
+        visibleParts.push_back( curve );
+      }
+      else
+      {
+        visibleParts = this->visibleParts( curve );
+      }
+      for ( unsigned int i = 0; i < visibleParts.size( ); ++i )
+      {
+        X_monotone_curve_2 subcurve = visibleParts[ i ];
+        int n;
+        if ( this->scene == NULL )
+          n = 100; // TODO: get an adaptive approximation
+        else
+        {
+          QGraphicsView* view = this->scene->views( ).first( );
+          int xmin, xmax;
+          xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
+          xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
+          n = xmax - xmin;
+        }
+        if ( n == 0 )
+        {
+          return *this;
+        }
+
+        std::pair<double, double>* app_pts =
+          new std::pair<double, double>[n + 1];
+        std::pair<double, double>* end_pts =
+          subcurve.polyline_approximation(n, app_pts);
+        std::pair<double, double>* p_curr = app_pts;
+        std::pair<double, double>* p_next = p_curr + 1;
+        int count = 0;
+        do
+        {
+          QPointF p1( p_curr->first, p_curr->second );
+          QPointF p2( p_next->first, p_next->second );
+#if 0
+          Segment_2 seg( p1, p2 );
+          this->painterOstream << seg;
+#endif
+          this->qp->drawLine( p1, p2 );
+          p_curr++;
+          p_next++;
+          ++count;
+        }
+        while ( p_next != end_pts );
+      }
+    }
+    else
+    { // draw the whole curve
+      int n;
+      if ( this->scene == NULL )
+        n = 100; // TODO: get an adaptive approximation
+      else
+      {
+        QGraphicsView* view = this->scene->views( ).first( );
+        int xmin, xmax;
+        xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
+        xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
+        n = xmax - xmin;
+      }
+      if ( n == 0 )
+      {
+        return *this;
+      }
+
+      std::pair<double, double>* app_pts = new std::pair<double, double>[n + 1];
+      std::pair<double, double>* end_pts =
+        curve.polyline_approximation(n, app_pts);
+      std::pair<double, double>* p_curr = app_pts;
+      std::pair<double, double>* p_next = p_curr + 1;
+      int count = 0;
+      do
+      {
+        QPointF p1( p_curr->first, p_curr->second );
+        QPointF p2( p_next->first, p_next->second );
+#if 0
+        Segment_2 seg( p1, p2 );
+        this->painterOstream << seg;
+#endif
+        this->qp->drawLine( p1, p2 );
+        p_curr++;
+        p_next++;
+        ++count;
+      }
+      while ( p_next != end_pts );
+      //std::cout << count << " approximation points" << std::endl;
+    }
+
+    return *this;
+  }
+
+  // cloned from segtraits painter
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    QPointF qpt = this->convert( p );
+    QPen savePen = this->qp->pen( );
+    this->qp->setBrush( QBrush( savePen.color( ) ) );
+    double radius = savePen.width( ) / 2.0;
+    radius /= this->scale;
+
+    this->qp->drawEllipse( qpt, radius, radius );
+
+    this->qp->setBrush( QBrush( ) );
+    this->qp->setPen( savePen );
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+
+protected: // methods
+  // Returns subcurves of curve that are actually visible in the view.
+  // Assumes that clippingRect is valid.
+  std::vector< X_monotone_curve_2 > visibleParts( X_monotone_curve_2 curve )
+  {
+    // see if we intersect the bottom edge of the viewport
+    Intersect_2 intersect_2 = this->traits.intersect_2_object( );
+    Point_2 bottomLeft = this->convert( this->clippingRect.bottomLeft( ) );
+    Point_2 bottomRight = this->convert( this->clippingRect.bottomRight( ) );
+    Point_2 topLeft = this->convert( this->clippingRect.topLeft( ) );
+    Point_2 topRight = this->convert( this->clippingRect.topRight( ) );
+    X_monotone_curve_2 bottom =
+      this->construct_x_monotone_curve_2( bottomLeft, bottomRight );
+    X_monotone_curve_2 left =
+      this->construct_x_monotone_curve_2( bottomLeft, topLeft );
+    X_monotone_curve_2 top =
+      this->construct_x_monotone_curve_2( topLeft, topRight );
+    X_monotone_curve_2 right =
+      this->construct_x_monotone_curve_2( topRight, bottomRight );
+
+    std::vector< CGAL::Object > bottomIntersections;
+    std::vector< CGAL::Object > leftIntersections;
+    std::vector< CGAL::Object > topIntersections;
+    std::vector< CGAL::Object > rightIntersections;
+    std::vector< CGAL::Object > intersections;
+
+    intersect_2( bottom, curve, std::back_inserter( bottomIntersections ) );
+    intersect_2( left, curve, std::back_inserter( leftIntersections ) );
+    intersect_2( top, curve, std::back_inserter( topIntersections ) );
+    intersect_2( right, curve, std::back_inserter( rightIntersections ) );
+    // int total = bottomIntersections.size( )
+    //   + leftIntersections.size( )
+    //   + topIntersections.size( )
+    //   + rightIntersections.size( );
+
+    intersect_2( bottom, curve, std::back_inserter( intersections ) );
+    intersect_2( left, curve, std::back_inserter( intersections ) );
+    intersect_2( top, curve, std::back_inserter( intersections ) );
+    intersect_2( right, curve, std::back_inserter( intersections ) );
+
+    this->filterIntersectionPoints( intersections );
+    //std::cout << "total intersections: " << intersections.size( )
+    //          << std::endl;
+    //this->printIntersectResult( intersections );
+
+    Point_2 leftEndpt = curve.source( );
+    Point_2 rightEndpt = curve.target( );
+    if ( leftEndpt.x( ) > rightEndpt.x( ) )
+    {
+      std::swap( leftEndpt, rightEndpt );
+    }
+    QPointF qendpt1 = this->convert( leftEndpt );
+    QPointF qendpt2 = this->convert( rightEndpt );
+    std::list< Point_2 > pointList;
+    for ( unsigned int i = 0; i < intersections.size( ); ++i )
+    {
+      CGAL::Object o = intersections[ i ];
+      std::pair< Intersection_point_2, Multiplicity > pair;
+      if ( CGAL::assign( pair, o ) )
+      {
+        Point_2 pt = pair.first;
+        pointList.push_back( pt );
+      }
+    }
+    bool includeLeftEndpoint = this->clippingRect.contains( qendpt1 );
+    bool includeRightEndpoint = this->clippingRect.contains( qendpt2 );
+    if ( includeLeftEndpoint )
+      pointList.push_front( leftEndpt );
+    if ( includeRightEndpoint )
+      pointList.push_back( rightEndpt );
+
+    Construct_x_monotone_subcurve_2< Traits > construct_x_monotone_subcurve_2;
+    std::vector< X_monotone_curve_2 > clippings;
+    typename std::list< Point_2 >::iterator pointListItr = pointList.begin( );
+    for ( unsigned int i = 0; i < pointList.size( ); i += 2 )
+    {
+      Point_2 p1 = *pointListItr++;
+      Point_2 p2 = *pointListItr++;
+      X_monotone_curve_2 subcurve =
+        construct_x_monotone_subcurve_2( curve, p1, p2 );
+      clippings.push_back( subcurve );
+    }
+
+#if 0
+    // std::cout << "pointList size: " << pointList.size( ) << std::endl;
+    // if ( intersections.size( ) % 2 == 0 )
+    // {
+    //   // either both curve endpoints are in view or both are out
+    //     if ( this->clippingRect.contains( qendpt1 ) )
+    //     {
+    //         if ( this->clippingRect.contains( qendpt2 ) )
+    //         {
+    //             std::cout << "both endpoints are in view" << std::endl;
+    //         }
+    //     }
+    //     else if ( !this->clippingRect.contains( qendpt2 ) )
+    //     {
+    //         std::cout << "both endpoints are out of view" << std::endl;
+    //     }
+    // }
+    // else
+    // { // one curve endpoint is in view
+    //     if ( this->clippingRect.contains( qendpt1 ) )
+    //     {
+    //         std::cout << "left endpoint is in view" << std::endl;
+    //     }
+    //     else if ( this->clippingRect.contains( qendpt2 ) )
+    //     {
+    //         std::cout << "right endpoint is in view" << std::endl;
+    //     }
+    // }
+
+    std::vector< X_monotone_curve_2 > res;
+    res.push_back( curve );
+    return res;
+#endif
+    return clippings;
+  }
+
+  // keep only the intersection points ie. throw out overlapping curve segments
+  void filterIntersectionPoints( std::vector< CGAL::Object >& res )
+  {
+    std::vector< std::pair< Intersection_point_2, Multiplicity > > tmp;
+
+    // filter out the non-intersection point results
+    for ( unsigned int i = 0; i < res.size( ); ++i )
+    {
+      CGAL::Object obj = res[ i ];
+      std::pair< Intersection_point_2, Multiplicity > pair;
+      if ( CGAL::assign( pair, obj ) )
+      {
+        tmp.push_back( pair );
+      }
+    }
+    res.clear( );
+
+    // sort the intersection points by x-coord
+    Compare_intersection_point_result compare_intersection_point_result;
+    std::sort( tmp.begin( ), tmp.end( ), compare_intersection_point_result );
+
+    // box up the sorted elements
+    for ( unsigned int i = 0; i < tmp.size( ); ++i )
+    {
+      std::pair< Intersection_point_2, Multiplicity > pair = tmp[ i ];
+      CGAL::Object o = CGAL::make_object( pair );
+      res.push_back( o );
+    }
+  }
+
+  void printIntersectResult( const std::vector< CGAL::Object >& res )
+  {
+    for ( std::vector< CGAL::Object >::const_iterator it = res.begin( );
+          it != res.end( ); ++it )
+    {
+      CGAL::Object obj = *it;
+      std::pair< Intersection_point_2, Multiplicity > pair;
+      if ( CGAL::assign( pair, obj ) )
+      {
+        Point_2 pt = pair.first;
+        /* QPointF qpt = */ this->convert( pt );
+        // std::cout << "(" << pt.x( ) << " " << pt.y( ) < ")" << std::endl;
+      }
+    }
+  }
+
+protected: // members
+  Traits traits;
+  //Intersect_2 intersect_2;
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2;
+};
+
+template < typename Kernel_ >
+class ArrangementPainterOstream< CGAL::Arr_linear_traits_2< Kernel_ > >:
+  public ArrangementPainterOstreamBase< CGAL::Arr_linear_traits_2< Kernel_ > >
+{
+public: // typedefs
+  typedef Kernel_                                       Kernel;
+  typedef CGAL::Arr_linear_traits_2< Kernel >           Traits;
+  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
+  typedef typename Superclass::Point_2                  Point_2;
+  typedef typename Superclass::Segment_2                Segment_2;
+  typedef typename Superclass::Ray_2                    Ray_2;
+  typedef typename Superclass::Line_2                   Line_2;
+  typedef typename Superclass::Triangle_2               Triangle_2;
+  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
+  typedef typename Superclass::Circle_2                 Circle_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()) :
+    Superclass( p, clippingRectangle )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    if ( curve.is_segment( ) )
+    {
+      Segment_2 seg = curve.segment( );
+
+      // skip segments outside our view
+      QRectF seg_bb = this->convert( seg.bbox( ) );
+      if ( this->clippingRect.isValid( ) &&
+           ! this->clippingRect.intersects( seg_bb ) )
+      {
+        return *this;
+      }
+
+      this->painterOstream << seg;
+    }
+    else if ( curve.is_ray( ) )
+    {
+      Ray_2 ray = curve.ray( );
+      QLineF qseg = this->convert( ray );
+      if ( qseg.isNull( ) )
+      { // it's out of view
+        return *this;
+      }
+      Segment_2 seg = this->convert( qseg );
+      this-> painterOstream << seg;
+    }
+    else // curve.is_line( )
+    {
+      Line_2 line = curve.line( );
+      QLineF qseg = this->convert( line );
+      if ( qseg.isNull( ) )
+      { // it's out of view
+        return *this;
+      }
+      Segment_2 seg = this->convert( qseg );
+      this-> painterOstream << seg;
+    }
+    return *this;
+  }
+
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    QPointF qpt = this->convert( p );
+    // clip the point if possible
+    if ( this->clippingRect.isValid( ) &&
+         ! this->clippingRect.contains( qpt ) )
+    {
+      return *this;
+    }
+
+    QPen savePen = this->qp->pen( );
+    this->qp->setBrush( QBrush( savePen.color( ) ) );
+    double radius = savePen.width( ) / 2.0;
+    radius /= this->scale;
+
+    this->qp->drawEllipse( qpt, radius, radius );
+
+    this->qp->setBrush( QBrush( ) );
+    this->qp->setPen( savePen );
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+};
+
+template < typename CircularKernel >
+class ArrangementPainterOstream< CGAL::Arr_circular_arc_traits_2<
+                                   CircularKernel > >:
+  public ArrangementPainterOstreamBase< CGAL::Arr_circular_arc_traits_2<
+                                          CircularKernel > >
+{
+public:
+  typedef CircularKernel                                Kernel;
+  typedef CGAL::Arr_circular_arc_traits_2< Kernel >     Traits;
+  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
+  typedef typename Superclass::Point_2                  Point_2;
+  typedef typename Superclass::Segment_2                Segment_2;
+  typedef typename Superclass::Ray_2                    Ray_2;
+  typedef typename Superclass::Line_2                   Line_2;
+  typedef typename Superclass::Triangle_2               Triangle_2;
+  typedef typename Superclass::Iso_rectangle_2          Iso_rectangle_2;
+  typedef typename Superclass::Circle_2                 Circle_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
+    Superclass( p, clippingRectangle )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    this->painterOstream << curve;
+    return *this;
+  }
+
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    QPointF qpt = this->convert( p );
+    // clip the point if possible
+    if ( this->clippingRect.isValid( ) &&
+         ! this->clippingRect.contains( qpt ) )
+    {
+      return *this;
+    }
+
+    QPen savePen = this->qp->pen( );
+    this->qp->setBrush( QBrush( savePen.color( ) ) );
+    double radius = savePen.width( ) / 2.0;
+    radius /= this->scale;
+
+    this->qp->drawEllipse( qpt, radius, radius );
+
+    this->qp->setBrush( QBrush( ) );
+    this->qp->setPen( savePen );
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+};
+
+#if 0
+template < typename Coefficient_ >
+class ArrangementPainterOstream< CGAL::Arr_algebraic_segment_traits_2<
+                                   Coefficient_ > >:
+  public ArrangementPainterOstreamBase< CGAL::Arr_algebraic_segment_traits_2<
+                                          Coefficient_ > >
+{
+public:
+  typedef Coefficient_                                  Coefficient;
+  typedef typename CGAL::Arr_algebraic_segment_traits_2< Coefficient >
+                                                        Traits;
+  typedef ArrangementPainterOstreamBase< Traits >       Superclass;
+  typedef typename Traits::CKvA_2                       CKvA_2;
+  typedef typename Traits::Point_2                      Point_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public:
+  /*! Constructor */
+  ArrangementPainterOstream(QPainter* p, QRectF clippingRectangle = QRectF()):
+    Superclass( p, clippingRectangle )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~ArrangementPainterOstream() {}
+
+public: // methods
+  ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
+  {
+    //std::cout << "paint curve stub (alg traits)" << std::endl;
+    typedef Curve_renderer_facade<CKvA_2> Facade;
+    typedef std::pair< int, int > Coord_2;
+    typedef std::vector< Coord_2 > Coord_vec_2;
+    this->setupFacade( );
+
+    boost::optional < Coord_2 > p1, p2;
+    std::list<Coord_vec_2> points;
+
+    Facade::instance().draw( curve, points, &p1, &p2 );
+    if(points.empty())
+      return *this;
+
+    // QPainter *ppnt = this->qp;
+    QGraphicsView* view = this->scene->views( ).first( );
+    // int height = view->height();
+    // std::cerr << ws.width() << " and " <<  ws.height() << "\n";
+    typename std::list<Coord_vec_2>::const_iterator lit = points.begin();
+    //ppnt->moveTo((*p1).first, height - (*p1).second);
+    while(lit != points.end()) {
+
+      const Coord_vec_2& vec = *lit;
+      typename Coord_vec_2::const_iterator vit = vec.begin();
+      //std::cerr << "(" << vit->first << "; " << vit->second << ")\n";
+      //         if(lit == points.begin() &&*/ vit != vec.end()) {
+      //             ppnt->lineTo(vit->first, height - vit->second);
+      //             vit++;
+      //         }
+#if 0
+      if(vit != vec.end())
+        ppnt->moveTo(vit->first, height - vit->second);
+
+      while(vit != vec.end()) {
+        ppnt->lineTo(vit->first, height - vit->second);
+        vit++;
+        //std::cerr << "(" << vit->e0 << "; " << vit->e1 << "\n";
+      }
+      lit++;
+#endif
+      QPainterPath path;
+      QPoint coord( vit->first, vit->second );
+      QPointF qpt = view->mapToScene( coord );
+      if ( vit != vec.end() )
+      {
+        path.moveTo( qpt );
+      }
+      while ( vit != vec.end() )
+      {
+        path.lineTo( qpt );
+        vit++;
+        coord = QPoint( vit->first, vit->second );
+        qpt = view->mapToScene( coord );
+        //std::cout << vit->first << " " << vit->second << std::endl;
+      }
+      this->qp->drawPath( path );
+
+      lit++;
+    }
+    //ppnt->lineTo((*p2).first, height - (*p2).second);
+
+#if 0
+    QPen old_pen = ppnt->pen();
+    ppnt->setPen(QPen(Qt::NoPen)); // avoid drawing outlines
+    // draw with the current brush attributes
+
+    //std::cerr << "endpts1: (" << (*p1).first << "; " << (*p1).second << "\n";
+    //std::cerr << "endpts2: (" << (*p2).first << "; " << (*p2).second << "\n";
+
+    unsigned sz = CGAL_REND_PT_RADIUS;
+    ppnt->drawEllipse((*p1).first - sz, height-(*p1).second - sz, sz*2, sz*2);
+    ppnt->drawEllipse((*p2).first - sz, height-(*p2).second - sz, sz*2, sz*2);
+    ppnt->setPen(old_pen);
+#endif
+
+    return *this;
+  }
+
+  ArrangementPainterOstream& operator<<( const Point_2& p )
+  {
+    typedef Curve_renderer_facade<CKvA_2> Facade;
+    std::pair< int, int > coord;
+    //std::cout << "draw point stub" << std::endl;
+
+    this->setupFacade( );
+
+    if(!Facade::instance().draw(p, coord)) {
+      return *this;
+    }
+    else
+    {
+      //std::cout << coord.first << " " << coord.second << std::endl;
+      QPoint coords( coord.first, coord.second );
+      QGraphicsView* view = this->scene->views( ).first( );
+      QPointF qpt = view->mapToScene( coords );
+
+      QPen savePen = this->qp->pen( );
+      this->qp->setBrush( QBrush( savePen.color( ) ) );
+      double radius = savePen.width( ) / 2.0;
+      radius /= this->scale;
+
+      this->qp->drawEllipse( qpt, radius, radius );
+
+      this->qp->setBrush( QBrush( ) );
+      this->qp->setPen( savePen );
+
+    }
+#if 0
+
+    QPainter *ppnt = &ws.get_painter();
+    QPen old_pen = ppnt->pen();
+    ppnt->setPen(QPen(Qt::NoPen));
+
+    unsigned sz = CGAL_REND_PT_RADIUS;
+    ppnt->drawEllipse(coord.first - sz, ws.height() - coord.second - sz,
+                      sz*2, sz*2);
+    ppnt->setPen(old_pen);
+#endif
+
+    return *this;
+  }
+
+  template < typename T >
+  ArrangementPainterOstream& operator<<( const T& p )
+  {
+    (*(static_cast< Superclass* >(this)) << p);
+    return *this;
+  }
+
+protected:
+  void setupFacade( )
+  {
+    typedef Curve_renderer_facade<CKvA_2> Facade;
+    QGraphicsView* view = this->scene->views( ).first( );
+    QRectF viewport = this->viewportRect( );
+    CGAL::Bbox_2 bbox = this->convert( viewport ).bbox( );
+    Facade::setup(bbox, view->width(), view->height());
+  }
+};
+#endif
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementSegmentInputCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementSegmentInputCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ArrangementSegmentInputCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementSegmentInputCallback.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementTypes.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementTypes.h
new file mode 100644
index 0000000..a876744
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ArrangementTypes.h
@@ -0,0 +1,324 @@
+// Copyright (c) 2005,2012 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef ARRANGEMENT_DEMO_TYPES_H
+#define ARRANGEMENT_DEMO_TYPES_H
+
+#include <CGAL/basic.h>
+
+/*
+#include <CGAL/IO/Qt_widget.h>
+#include <CGAL/IO/Qt_widget_Polygon_2.h>
+#include <CGAL/IO/Qt_help_window.h>
+*/
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Arr_default_dcel.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_algebraic_segment_traits_2.h>
+#include <CGAL/Arrangement_with_history_2.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arr_trapezoid_ric_point_location.h>
+#include <CGAL/Arr_simple_point_location.h>
+#include <CGAL/Arr_walk_along_line_point_location.h>
+#include <CGAL/Arr_landmarks_point_location.h>
+#include <CGAL/squared_distance_2.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Bbox_2.h>
+
+#include <CGAL/Arr_observer.h>
+#include <CGAL/Polygon_2.h>
+
+// Coordinate related typedef - using inexact number type
+typedef float                                           Coord_type;
+typedef CGAL::Cartesian<Coord_type>                     Coord_kernel;
+typedef Coord_kernel::Point_2                           Coord_point;
+typedef Coord_kernel::Segment_2                         Coord_segment;
+typedef Coord_kernel::Circle_2                          Coord_circle;
+
+
+typedef CGAL::Polygon_2<Coord_kernel> My_polygon;
+                                      // polygon is usefull for filling faces
+
+#ifdef CGAL_USE_GMP
+  #include <CGAL/Gmpq.h>
+  typedef CGAL::Gmpq                                    NT;
+#else
+  #include <CGAL/MP_Float.h>
+  #include <CGAL/Quotient.h>
+  typedef CGAL::Quotient<CGAL::MP_Float>                NT;
+#endif
+// instead of
+//typedef CGAL::Cartesian<NT>                           Kernel;
+// workaround for VC++
+struct Kernel : public CGAL::Cartesian<NT> {};
+
+class Face_with_color : public CGAL::Arr_face_base
+{
+  QColor    m_color;
+  bool      m_visited;
+
+public:
+  Face_with_color() : CGAL::Arr_face_base(), m_color(), m_visited(false) { }
+
+  QColor color() const { return m_color; }
+  void set_color(const QColor& c) { m_color = c; }
+  bool visited() const{ return m_visited; }
+  void set_visited(bool b) { m_visited = b; }
+};
+
+template <class Traits>
+class Dcel :
+  public CGAL::Arr_dcel_base<CGAL::Arr_vertex_base<typename Traits::Point_2>,
+                             CGAL::Arr_halfedge_base<
+                               typename Traits::X_monotone_curve_2>,
+                             Face_with_color>
+{
+public:
+   /*! \struct
+   * An auxiliary structure for rebinding the DCEL with a new traits class.
+   */
+  template <typename T>
+  struct rebind
+  {
+    typedef Dcel<T> other;
+  };
+
+  // CREATION
+  Dcel() {}
+};
+
+// Segments:
+typedef CGAL::Arr_segment_traits_2<Kernel>              Seg_traits;
+typedef Seg_traits::Curve_2                             Arr_seg_2;
+typedef Seg_traits::X_monotone_curve_2                  Arr_xseg_2;
+typedef Seg_traits::Point_2                             Arr_seg_point_2;
+typedef Dcel<Seg_traits>                                Seg_dcel;
+typedef CGAL::Arrangement_with_history_2<Seg_traits, Seg_dcel>
+                                                        Seg_arr;
+typedef Seg_arr::Halfedge                               Seg_halfedge;
+typedef Seg_arr::Halfedge_handle                        Seg_halfedge_handle;
+typedef Seg_arr::Face_handle                            Seg_face_handle;
+typedef Seg_arr::Ccb_halfedge_circulator
+  Seg_ccb_halfedge_circulator;
+typedef Seg_arr::Hole_iterator                          Seg_holes_iterator;
+typedef Seg_arr::Face_iterator                          Seg_face_iterator;
+typedef std::list<Arr_seg_2*>                           Arr_seg_list;
+typedef Arr_seg_list::const_iterator                    Arr_seg_const_iter;
+typedef Arr_seg_list::iterator                          Arr_seg_iter;
+
+
+// point location
+typedef CGAL::Arr_trapezoid_ric_point_location<Seg_arr>
+  Seg_trap_point_location;
+typedef CGAL::Arr_simple_point_location<Seg_arr>
+  Seg_simple_point_location;
+typedef CGAL::Arr_walk_along_line_point_location<Seg_arr>
+  Seg_walk_point_location;
+typedef CGAL::Arr_landmarks_point_location<Seg_arr>
+  Seg_lanmarks_point_location;
+
+// Polyline
+typedef CGAL::Arr_polyline_traits_2<Seg_traits>         Pol_traits;
+
+typedef Pol_traits::Curve_2                             Arr_pol_2;
+typedef Pol_traits::X_monotone_curve_2                  Arr_xpol_2;
+
+typedef Pol_traits::Point_2                             Arr_pol_point_2;
+typedef Dcel<Pol_traits>                                Pol_dcel;
+typedef CGAL::Arrangement_with_history_2<Pol_traits,
+                                         Pol_dcel>      Pol_arr;
+typedef Pol_arr::Halfedge_handle                        Pol_halfedge_handle;
+typedef Pol_arr::Face_handle                            Pol_face_handle;
+typedef Pol_arr::Ccb_halfedge_circulator
+  Pol_ccb_halfedge_circulator;
+typedef Pol_arr::Hole_iterator                          Pol_holes_iterator;
+typedef Pol_arr::Halfedge                               Pol_halfedge;
+typedef Pol_arr::Face_iterator                          Pol_face_iterator;
+
+typedef std::list<Arr_pol_2*>                            Arr_pol_list;
+typedef Arr_pol_list::const_iterator                     Arr_pol_const_iter;
+typedef Arr_pol_list::iterator                           Arr_pol_iter;
+
+// point location
+typedef CGAL::Arr_trapezoid_ric_point_location<Pol_arr>
+  Pol_trap_point_location;
+typedef CGAL::Arr_simple_point_location<Pol_arr>
+  Pol_simple_point_location;
+typedef CGAL::Arr_walk_along_line_point_location<Pol_arr>
+  Pol_walk_point_location;
+typedef CGAL::Arr_landmarks_point_location<Pol_arr>
+  Pol_lanmarks_point_location;
+
+
+// Conics
+
+#ifdef CGAL_USE_CORE
+
+#include <CGAL/CORE_algebraic_number_traits.h>
+
+typedef CGAL::CORE_algebraic_number_traits              Nt_traits;
+typedef Nt_traits::Rational                             Rational;
+typedef Nt_traits::Algebraic                            Algebraic;
+typedef CGAL::Cartesian<Rational>                       Rat_kernel;
+typedef CGAL::Cartesian<Algebraic>                      Alg_kernel;
+
+// instead of
+typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
+                                                        Conic_traits;
+// workaround for VC++
+/*
+struct Conic_traits: public CGAL::Arr_conic_traits_2<Rat_kernel,
+                                                     Alg_kernel,
+                                                     Nt_traits>   {};
+*/
+
+typedef  Conic_traits::Curve_2                          Arr_conic_2;
+typedef  Conic_traits::Rat_point_2                      Rat_point_2;
+typedef  Conic_traits::Rat_segment_2                    Rat_segment_2;
+typedef  Conic_traits::Rat_circle_2                     Rat_circle_2;
+typedef  Conic_traits::Rat_line_2                       Rat_line_2;
+
+typedef Conic_traits::X_monotone_curve_2                Arr_xconic_2;
+typedef Conic_traits::Point_2                           Arr_conic_point_2;
+typedef Dcel<Conic_traits>                              Conic_dcel;
+typedef CGAL::Arrangement_with_history_2<Conic_traits, Conic_dcel>
+                                                        Conic_arr;
+typedef Conic_arr::Halfedge_handle                      Conic_halfedge_handle;
+typedef Conic_arr::Face_handle                          Conic_face_handle;
+typedef Conic_arr::Ccb_halfedge_circulator
+  Conic_ccb_halfedge_circulator;
+typedef Conic_arr::Hole_iterator                        Conic_holes_iterator;
+//typedef CGAL::Arr_file_scanner<Conic_arr>                Arr_scanner;
+typedef Conic_arr::Halfedge                             Conic_halfedge;
+typedef Conic_arr::Face_iterator                        Conic_face_iterator;
+
+typedef std::list<Arr_xconic_2*>                        Arr_xconic_list;
+typedef Arr_xconic_list::const_iterator                 Arr_xconic_const_iter;
+typedef Arr_xconic_list::iterator                       Arr_xconic_iter;
+
+// point location
+typedef CGAL::Arr_trapezoid_ric_point_location<Conic_arr>
+  Conic_trap_point_location;
+typedef CGAL::Arr_simple_point_location<Conic_arr>
+  Conic_simple_point_location;
+typedef CGAL::Arr_walk_along_line_point_location<Conic_arr>
+  Conic_walk_point_location;
+typedef CGAL::Arr_landmarks_point_location<Conic_arr>
+ Conic_lanmarks_point_location;
+
+typedef Nt_traits::Integer                                Coefficient;
+typedef CGAL::Arr_algebraic_segment_traits_2<Coefficient> Alg_seg_traits;
+typedef Dcel< Alg_seg_traits >                            Alg_seg_dcel;
+typedef CGAL::Arrangement_with_history_2< Alg_seg_traits, Alg_seg_dcel >
+                                                          Alg_seg_arr;
+
+#endif
+
+// Linear:
+typedef CGAL::Arr_linear_traits_2<Kernel>               Lin_traits;
+typedef Lin_traits::Curve_2                             Arr_lin_2;
+typedef Lin_traits::X_monotone_curve_2                  Arr_xlin_2;
+typedef Lin_traits::Point_2                             Arr_lin_point_2;
+typedef Dcel<Lin_traits>                                Lin_dcel;
+typedef CGAL::Arrangement_with_history_2<Lin_traits, Lin_dcel>
+                                                        Lin_arr;
+typedef Lin_arr::Halfedge                               Lin_halfedge;
+typedef Lin_arr::Halfedge_handle                        Lin_halfedge_handle;
+typedef Lin_arr::Face_handle                            Lin_face_handle;
+typedef Lin_arr::Ccb_halfedge_circulator
+  Lin_ccb_halfedge_circulator;
+typedef Lin_arr::Hole_iterator                          Lin_holes_iterator;
+typedef Lin_arr::Face_iterator                          Lin_face_iterator;
+typedef std::list<Arr_lin_2*>                           Arr_lin_list;
+typedef Arr_lin_list::const_iterator                    Arr_lin_const_iter;
+typedef Arr_lin_list::iterator                          Arr_lin_iter;
+
+//point location
+typedef CGAL::Arr_trapezoid_ric_point_location<Lin_arr>
+  Lin_trap_point_location;
+typedef CGAL::Arr_simple_point_location<Lin_arr>
+  Lin_simple_point_location;
+typedef CGAL::Arr_walk_along_line_point_location<Lin_arr>
+  Lin_walk_point_location;
+typedef CGAL::Arr_landmarks_point_location<Lin_arr>
+  Lin_landmarks_point_location;
+
+
+#include <CGAL/Exact_circular_kernel_2.h>
+#include <CGAL/Arr_circular_arc_traits_2.h>
+
+// Circular arcs:
+typedef CGAL::Exact_circular_kernel_2                     CircularKernel;
+typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Arc_traits;
+typedef Arc_traits::Curve_2                               Arr_arc_2;
+typedef Arc_traits::X_monotone_curve_2                    Arr_xarc_2;
+typedef Arc_traits::Point_2                               Arr_arc_point_2;
+typedef Dcel<Arc_traits>                                  Arc_dcel;
+typedef CGAL::Arrangement_with_history_2<Arc_traits, Arc_dcel>
+                                                          Arc_arr;
+typedef Arc_arr::Halfedge                                 Arc_halfedge;
+typedef Arc_arr::Halfedge_handle                          Arc_halfedge_handle;
+typedef Arc_arr::Face_handle                              Arc_face_handle;
+typedef Arc_arr::Ccb_halfedge_circulator
+  Arc_ccb_halfedge_circulator;
+typedef Arc_arr::Hole_iterator                            Arc_holes_iterator;
+typedef Arc_arr::Face_iterator                            Arc_face_iterator;
+typedef std::list<Arr_arc_2*>                             Arr_arc_list;
+typedef Arr_arc_list::const_iterator                      Arr_arc_const_iter;
+typedef Arr_arc_list::iterator                            Arr_arc_iter;
+
+//point location
+typedef CGAL::Arr_trapezoid_ric_point_location<Arc_arr>
+  Arc_trap_point_location;
+typedef CGAL::Arr_simple_point_location<Arc_arr>
+  Arc_simple_point_location;
+typedef CGAL::Arr_walk_along_line_point_location<Arc_arr>
+  Arc_walk_point_location;
+#if 0 // not supported
+typedef CGAL::Arr_landmarks_point_location<Arc_arr>
+  Arc_landmarks_point_location;
+#endif
+
+template <class Arrangement_>
+class My_observer : public CGAL::Arr_observer<Arrangement_>
+{
+public:
+
+  typedef Arrangement_                                  Arrangement;
+  typedef CGAL::Arr_observer<Arrangement>               Arr_observer;
+  typedef typename Arrangement::Face_handle             Face_handle;
+
+  My_observer (Arrangement& arr) : Arr_observer (arr) {}
+
+  virtual void after_split_face (Face_handle  f ,
+                                 Face_handle  new_f ,
+                                 bool         /* is_hole */)
+  {
+    new_f ->set_color(f->color());
+  }
+};
+
+//Q_DECLARE_METATYPE( Seg_arr )
+//Q_DECLARE_METATYPE( Pol_arr )
+//Q_DECLARE_METATYPE( Conic_arr )
+Q_DECLARE_METATYPE( CGAL::Object )
+
+#endif // ARRANGEMENT_DEMO_TYPES_H
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/CMakeLists.txt
new file mode 100644
index 0000000..b6843be
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/CMakeLists.txt
@@ -0,0 +1,83 @@
+# This is the CMake script for compiling a CGAL application.
+
+project( Arrangement_2 ) 
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Core Qt5 )
+include( ${CGAL_USE_FILE} )
+
+find_package( Qt5 QUIET COMPONENTS Script Widgets )
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
+  include_directories( ./ )
+  # Arrangement package includes
+  include_directories( BEFORE ../../include )
+
+  qt5_wrap_ui( arrangement_2_uis
+    ArrangementDemoWindow.ui
+    NewTabDialog.ui
+    OverlayDialog.ui
+    ArrangementDemoPropertiesDialog.ui
+  )
+  qt5_wrap_cpp( arrangement_2_mocs
+    ArrangementDemoWindow.h
+    ArrangementDemoTab.h
+    Callback.h
+#    NewTabDialog.h
+    OverlayDialog.h
+    ArrangementDemoPropertiesDialog.h
+    ColorItemEditor.h
+    DeleteCurveModeItemEditor.h
+    PropertyValueDelegate.h
+    #PropertyValueDelegate.cpp
+  )
+  qt5_add_resources( arrangement_2_resources
+    ArrangementDemoWindow.qrc
+  )
+  add_executable( arrangement_2
+    arrangement_2.cpp
+    ArrangementGraphicsItem.cpp
+    ArrangementDemoWindow.cpp
+    ArrangementDemoTab.cpp
+    ArrangementDemoGraphicsView.cpp
+    Callback.cpp
+    VerticalRayShootCallback.cpp
+    EnvelopeCallback.cpp
+    SplitEdgeCallback.cpp
+    FillFaceCallback.cpp
+    GraphicsViewSegmentInput.cpp
+    GraphicsViewCurveInput.cpp
+    Utils.cpp
+    NewTabDialog.cpp
+    OverlayDialog.cpp
+    ArrangementDemoPropertiesDialog.cpp
+    ColorItemEditor.cpp
+    PropertyValueDelegate.cpp
+    DeleteCurveMode.cpp
+    DeleteCurveModeItemEditor.cpp
+    PointsGraphicsItem.cpp
+    VerticalRayGraphicsItem.cpp
+   ${arrangement_2_mocs}
+   ${arrangement_2_uis}
+   ${arrangement_2_resources}
+  )
+  qt5_use_modules(arrangement_2 Widgets Script)
+  target_link_libraries( arrangement_2
+    ${CGAL_LIBRARIES}
+    ${CGAL_3RD_PARTY_LIBRARIES}
+    ${QT_LIBRARIES}
+  )
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS arrangement_2 )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
+
+# add_subdirectory( tests )
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Callback.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Callback.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Callback.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Callback.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Callback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Callback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Callback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Callback.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ColorItemEditor.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
new file mode 100644
index 0000000..368e44a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (qt-info at nokia.com)
+ **
+ ** This file is part of the examples of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+ ** Commercial Usage
+ ** Licensees holding valid Qt Commercial licenses may use this file in
+ ** accordance with the Qt Commercial License Agreement provided with the
+ ** Software or, alternatively, in accordance with the terms contained in
+ ** a written agreement between you and Nokia.
+ **
+ ** GNU Lesser General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights.  These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU
+ ** General Public License version 3.0 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.GPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU General Public License version 3.0 requirements will be
+ ** met: http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** If you have questions regarding the use of this file, please contact
+ ** Nokia at qt-info at nokia.com.
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+#include <QtGui>
+#include <iostream>
+#include <QColorDialog>
+
+
+#include "ColorItemEditor.h"
+
+ColorItemEditor::ColorItemEditor( QWidget* widget ) : QPushButton( widget )
+{
+  this->setText( tr("Select a color") );
+}
+
+QColor ColorItemEditor::color( ) const
+{
+  return this->m_color;
+}
+
+void ColorItemEditor::setColor( QColor color )
+{
+  this->m_color = color;
+}
+
+void ColorItemEditor::mousePressEvent(QMouseEvent* /* e */)
+{
+  QColor selectedColor = QColorDialog::getColor(this->m_color);
+  if (selectedColor.isValid()) {
+    // std::cout << selectedColor.name().toStdString() << std::endl;
+    this->setColor( selectedColor );
+  }
+
+  emit confirmed();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ColorItemEditor.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ColorItemEditor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ColorItemEditor.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ColorItemEditor.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Conic_reader.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Conic_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Conic_reader.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Conic_reader.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/CurveGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/CurveGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/CurveGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/CurveGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveMode.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveMode.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveMode.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveMode.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveMode.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveMode.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveMode.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveMode.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp
new file mode 100644
index 0000000..4e0f8ad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.cpp
@@ -0,0 +1,49 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: $
+// $Id: $
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#include "DeleteCurveModeItemEditor.h"
+
+DeleteCurveModeItemEditor::DeleteCurveModeItemEditor( QWidget* parent ) :
+  QComboBox( parent )
+{
+  this->setFrame( false );
+
+  QVariant deleteCurveOption = QVariant::fromValue( DeleteCurveMode( ) );
+  QVariant deleteEdgeOption =
+    QVariant::fromValue( DeleteCurveMode( DeleteCurveMode::DELETE_EDGE ) );
+  this->insertItem( 0, "Delete Curve", deleteCurveOption );
+  this->insertItem( 1, "Delete Edge", deleteEdgeOption );
+}
+
+DeleteCurveMode DeleteCurveModeItemEditor::mode( ) const
+{
+  return this->itemData(this->currentIndex( ), Qt::UserRole ).value< DeleteCurveMode >();
+}
+
+void DeleteCurveModeItemEditor::setMode( DeleteCurveMode m )
+{
+  if ( m.mode( ) == DeleteCurveMode::DELETE_CURVE )
+  {
+    this->setCurrentIndex( 0 );
+  }
+  else
+  {
+    this->setCurrentIndex( 1 );
+  }
+}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/DeleteCurveModeItemEditor.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/EnvelopeCallback.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/EnvelopeCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/EnvelopeCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/EnvelopeCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/EnvelopeCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/FillFaceCallback.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/FillFaceCallback.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/FillFaceCallback.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/FillFaceCallback.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/FillFaceCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/FillFaceCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/FillFaceCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/FillFaceCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewCurveInput.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/GraphicsViewSegmentInput.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ISnappable.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ISnappable.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/ISnappable.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/ISnappable.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/MergeEdgeCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/MergeEdgeCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/MergeEdgeCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/MergeEdgeCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.ui b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/NewTabDialog.ui
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/NewTabDialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.cpp
new file mode 100644
index 0000000..66cd8f8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.cpp
@@ -0,0 +1,307 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#include "OverlayDialog.h"
+#include "ArrangementDemoWindow.h"
+#include "ArrangementTypes.h"
+
+#include <QListWidgetItem>
+#include <QString>
+#include <QItemSelectionModel>
+
+#include "ui_OverlayDialog.h"
+
+// TODO: Don't color the text, but set an icon for each arrangement type...
+// TODO: Or maybe don't bother
+OverlayDialog::OverlayDialog( ArrangementDemoWindow* parent,
+                              Qt::WindowFlags f ) :
+  QDialog( parent, f ),
+  ui( new Ui::OverlayDialog )
+{
+  // An extra parenthesis around QColor to avoid the
+  // http://en.wikipedia.org/wiki/Most_vexing_parse
+  // on clang
+  QBrush segColor( ( QColor( ::Qt::red ) ) );
+  QBrush polyColor( ( QColor( ::Qt::darkGreen ) ) );
+  QBrush conicColor( ( QColor( ::Qt::blue ) ) );
+  this->ui->setupUi( this );
+
+  std::vector< QString > labels = parent->getTabLabels( );
+  std::vector< CGAL::Object > arrangements = parent->getArrangements( );
+
+  for ( unsigned int i = 0; i < labels.size( ); ++i )
+  {
+    QListWidgetItem* item =
+      new QListWidgetItem( this->ui->arrangementsListWidget );
+    item->setText( labels[ i ] );
+    item->setData( ARRANGEMENT, QVariant::fromValue( arrangements[ i ] ) );
+    QIcon icon;
+    Seg_arr* seg;
+    Pol_arr* pol;
+
+#ifdef CGAL_USE_CORE
+    Conic_arr* conic;
+#endif
+
+    Lin_arr* lin;
+    Arc_arr* arc;
+    // Alg_seg_arr* alg;
+    if ( CGAL::assign( seg, arrangements[ i ] ) )
+    {
+      icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(),
+                   QIcon::Normal, QIcon::Off);
+    }
+    else if ( CGAL::assign( pol, arrangements[ i ] ) )
+    {
+      icon.addFile(QString::fromUtf8(":/icons/yellow_icon.xpm"), QSize(),
+                   QIcon::Normal, QIcon::Off);
+    }
+
+#ifdef CGAL_USE_CORE
+    else if ( CGAL::assign( conic, arrangements[ i ] ) )
+    {
+      icon.addFile(QString::fromUtf8(":/icons/red_icon.xpm"), QSize(),
+                   QIcon::Normal, QIcon::Off);
+    }
+#endif
+
+    else if ( CGAL::assign( lin, arrangements[ i ] ) )
+    {
+      icon.addFile(QString::fromUtf8(":/icons/blue_icon.xpm"), QSize(),
+                   QIcon::Normal, QIcon::Off);
+    }
+    else if ( CGAL::assign( arc, arrangements[ i ] ) )
+    {
+      icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(),
+                   QIcon::Normal, QIcon::Off);
+    }
+    // else if ( CGAL::assign( alg, arrangements[ i ] ) )
+    // {
+    //   icon.addFile(QString::fromUtf8(":/icons/yellow_icon.xpm"), QSize(),
+    //                QIcon::Normal, QIcon::Off);
+    // }
+    item->setIcon( icon );
+  }
+}
+
+std::vector< CGAL::Object >
+OverlayDialog::selectedArrangements( ) const
+{
+  std::vector< CGAL::Object > res;
+  for ( int i = 0; i < this->ui->overlayListWidget->count( ); ++i )
+  {
+    QListWidgetItem* item = this->ui->overlayListWidget->item( i );
+    QVariant data = item->data( ARRANGEMENT );
+    CGAL::Object arr = data.value< CGAL::Object >( );
+    res.push_back( arr );
+  }
+  return res;
+}
+
+void OverlayDialog::on_pickPushButton_pressed( )
+{
+  int currentIndex = this->ui->arrangementsListWidget->currentRow( );
+  if ( currentIndex == -1 )
+    return;
+
+  if ( !(this->ui->arrangementsListWidget->item( currentIndex )->flags( ) &
+         Qt::ItemIsEnabled) )
+  {
+    return;
+  }
+  QListWidgetItem* takenItem =
+    this->ui->arrangementsListWidget->takeItem( currentIndex );
+  this->ui->overlayListWidget->addItem( takenItem );
+
+  if ( this->ui->overlayListWidget->count( ) == 2 )
+  {
+    this->ui->pickPushButton->setEnabled( false );
+  }
+  else
+  {
+    this->ui->pickPushButton->setEnabled( true );
+  }
+  QItemSelectionModel* selectionModel =
+    this->ui->arrangementsListWidget->selectionModel( );
+  selectionModel->clearSelection( );
+  this->restrictSelection( takenItem );
+}
+
+void OverlayDialog::on_unpickPushButton_pressed( )
+{
+  int currentIndex = this->ui->overlayListWidget->currentRow( );
+  if ( currentIndex == -1 )
+    return;
+
+  QListWidgetItem* takenItem =
+    this->ui->overlayListWidget->takeItem( currentIndex );
+  this->ui->arrangementsListWidget->addItem( takenItem );
+
+  if ( this->ui->overlayListWidget->count( ) == 2 )
+  {
+    this->ui->pickPushButton->setEnabled( false );
+  }
+  else
+  {
+    this->ui->pickPushButton->setEnabled( true );
+  }
+  if ( this->ui->overlayListWidget->count( ) == 0 )
+    this->unrestrictSelection( );
+}
+
+void OverlayDialog::restrictSelection( QListWidgetItem* item )
+{
+  CGAL::Object o = item->data( ARRANGEMENT ).value< CGAL::Object >( );
+  Seg_arr* seg;
+  Pol_arr* pol;
+
+#ifdef CGAL_USE_CORE
+  Conic_arr* conic;
+#endif
+
+  Lin_arr* lin;
+  Arc_arr* arc;
+  // Alg_seg_arr* alg;
+  if ( CGAL::assign( seg, o ) )
+  {
+    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+    {
+      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+      bool enabled = CGAL::assign( seg, o2 );
+      Qt::ItemFlags flags = otherItem->flags( );
+      if ( ! enabled )
+      {
+        flags &= ~( Qt::ItemIsEnabled );
+      }
+      else
+      {
+        flags |= Qt::ItemIsEnabled;
+      }
+      otherItem->setFlags( flags );
+    }
+  }
+  else if ( CGAL::assign( pol, o ) )
+  {
+    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+    {
+      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+      bool enabled = CGAL::assign( pol, o2 );
+      Qt::ItemFlags flags = otherItem->flags( );
+      if ( ! enabled )
+      {
+        flags &= ~( Qt::ItemIsEnabled );
+      }
+      else
+      {
+        flags |= Qt::ItemIsEnabled;
+      }
+      otherItem->setFlags( flags );
+    }
+  }
+
+#ifdef CGAL_USE_CORE
+  else if ( CGAL::assign( conic, o ) )
+  {
+    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+    {
+      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+      bool enabled = CGAL::assign( conic, o2 );
+      Qt::ItemFlags flags = otherItem->flags( );
+      if ( ! enabled )
+      {
+        flags &= ~( Qt::ItemIsEnabled );
+      }
+      else
+      {
+        flags |= Qt::ItemIsEnabled;
+      }
+      otherItem->setFlags( flags );
+    }
+  }
+#endif
+
+  else if ( CGAL::assign( lin, o ) )
+  {
+    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+    {
+      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+      bool enabled = CGAL::assign( lin, o2 );
+      Qt::ItemFlags flags = otherItem->flags( );
+      if ( ! enabled )
+      {
+        flags &= ~( Qt::ItemIsEnabled );
+      }
+      else
+      {
+        flags |= Qt::ItemIsEnabled;
+      }
+      otherItem->setFlags( flags );
+    }
+  }
+  else if ( CGAL::assign( arc, o ) )
+  {
+    for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+    {
+      QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+      CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+      bool enabled = CGAL::assign( arc, o2 );
+      Qt::ItemFlags flags = otherItem->flags( );
+      if ( ! enabled )
+      {
+        flags &= ~( Qt::ItemIsEnabled );
+      }
+      else
+      {
+        flags |= Qt::ItemIsEnabled;
+      }
+      otherItem->setFlags( flags );
+    }
+  }
+  // else if ( CGAL::assign( alg, o ) )
+  // {
+  //   for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+  //   {
+  //     QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+  //     CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( );
+  //     bool enabled = CGAL::assign( alg, o2 );
+  //     Qt::ItemFlags flags = otherItem->flags( );
+  //     if ( ! enabled )
+  //     {
+  //       flags &= ~( Qt::ItemIsEnabled );
+  //     }
+  //     else
+  //     {
+  //       flags |= Qt::ItemIsEnabled;
+  //     }
+  //     otherItem->setFlags( flags );
+  //   }
+  // }
+}
+
+void OverlayDialog::unrestrictSelection( )
+{
+  for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i )
+  {
+    QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i );
+    Qt::ItemFlags flags = otherItem->flags( );
+    flags |= Qt::ItemIsEnabled;
+    otherItem->setFlags( flags );
+  }
+}
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.ui b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/OverlayDialog.ui
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/OverlayDialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointLocationCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointLocationCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointLocationCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointLocationCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointsGraphicsItem.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointsGraphicsItem.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointsGraphicsItem.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointsGraphicsItem.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointsGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointsGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/PointsGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PointsGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp
new file mode 100644
index 0000000..b8f8f32
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.cpp
@@ -0,0 +1,163 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: $
+// $Id: $
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#include "ColorItemEditor.h"
+#include "DeleteCurveModeItemEditor.h"
+#include "PropertyValueDelegate.h"
+#include "DeleteCurveMode.h"
+
+#include <iostream>
+#include <QItemEditorFactory>
+
+
+PropertyValueDelegate::PropertyValueDelegate( QObject* parent ):
+  QItemDelegate( parent )
+{ 
+  QItemEditorFactory* factory = new QItemEditorFactory;
+  QItemEditorCreatorBase* creator =
+    new QStandardItemEditorCreator< PositiveSpinBox >( );
+  factory->registerEditor( QVariant::UInt, creator );
+  this->setItemEditorFactory( factory );
+}
+
+QWidget* PropertyValueDelegate::
+createEditor( QWidget* parent, const QStyleOptionViewItem& option,
+              const QModelIndex& index ) const
+{
+  QWidget* editor;
+  QVariant myData = index.data( Qt::UserRole );
+
+  // check for data types we need to handle ourselves
+ /*
+  if ( qVariantCanConvert< QColor >( myData ) )
+  {
+    ColorItemEditor* colorEditor = new ColorItemEditor( parent );
+    editor = colorEditor;
+
+    QObject::connect( colorEditor, SIGNAL(confirmed()), this, SLOT(commit()));
+  }
+  else if ( qVariantCanConvert< DeleteCurveMode >( myData ) )
+  {
+    DeleteCurveModeItemEditor* modeEditor =
+      new DeleteCurveModeItemEditor( parent );
+    modeEditor->setMode( qVariantValue< DeleteCurveMode >( myData ) );
+    editor = modeEditor;
+
+    QObject::connect( modeEditor, SIGNAL( currentIndexChanged( int ) ), this,
+                      SLOT( commit( ) ) );
+  }
+  else
+  { // default handler
+    editor = QItemDelegate::createEditor( parent, option, index );
+  }*/
+
+ if ( myData.canConvert< QColor >() )
+  {
+    ColorItemEditor* colorEditor = new ColorItemEditor( parent );
+    editor = colorEditor;
+
+    QObject::connect( colorEditor, SIGNAL(confirmed()), this, SLOT(commit()));
+  }
+  else if ( myData.canConvert< DeleteCurveMode >() )
+  {
+    DeleteCurveModeItemEditor* modeEditor =
+      new DeleteCurveModeItemEditor( parent );
+    modeEditor->setMode( myData.value< DeleteCurveMode >() );
+    editor = modeEditor;
+
+    QObject::connect( modeEditor, SIGNAL( currentIndexChanged( int ) ), this,
+                      SLOT( commit( ) ) );
+  }
+  else
+  { // default handler
+    editor = QItemDelegate::createEditor( parent, option, index );
+  }
+
+  return editor;
+}
+
+void PropertyValueDelegate::setModelData( QWidget* editor,
+                                          QAbstractItemModel* model,
+                                          const QModelIndex& index ) const
+{
+  ColorItemEditor* colorEditor = qobject_cast<ColorItemEditor*>(editor);
+  if (colorEditor)
+  {
+    // std::cout << "set color model data" << std::endl;
+    model->setData(index, colorEditor->color(), Qt::DisplayRole);
+    model->setData(index, colorEditor->color(), Qt::DecorationRole);
+    model->setData(index, QVariant::fromValue(colorEditor->color()),
+                    Qt::UserRole);
+    return;
+  }
+  DeleteCurveModeItemEditor* modeEditor =
+    qobject_cast<DeleteCurveModeItemEditor*>(editor);
+  if (modeEditor) {
+    model->setData(index, DeleteCurveMode::ToString(modeEditor->mode()),
+                   Qt::DisplayRole);
+    model->setData(index, QVariant::fromValue(modeEditor->mode()),
+                   Qt::UserRole);
+    return;
+  }
+  QItemDelegate::setModelData(editor, model, index);
+}
+
+bool PropertyValueDelegate::eventFilter( QObject* object, QEvent* event )
+{
+  QWidget* editor = qobject_cast<QWidget*>(object);
+  if ((event->type() == QEvent::FocusOut) ||
+      (event->type() == QEvent::Hide && editor->isWindow()))
+  {
+    ColorItemEditor* colorEditor = qobject_cast<ColorItemEditor*>(editor);
+    if (colorEditor)
+      return false;
+    DeleteCurveModeItemEditor* modeEditor =
+      qobject_cast<DeleteCurveModeItemEditor*>(editor);
+    if (modeEditor)
+      return false;
+  }
+  return QItemDelegate::eventFilter( object, event );
+}
+
+void PropertyValueDelegate::commit( )
+{
+  // std::cout << "commit selection" << std::endl;
+  QWidget* editor = qobject_cast< QWidget* >( sender( ) );
+  if ( editor )
+  {
+    emit( commitData( editor ) );
+    emit( closeEditor( editor ) );
+  }
+}
+
+PositiveSpinBox::PositiveSpinBox( QWidget* parent ) :
+  QSpinBox( parent )
+{
+  this->setMinimum( 1 );
+}
+
+void PositiveSpinBox::setValue( unsigned int val )
+{
+  QSpinBox::setValue( val );
+}
+
+unsigned int PositiveSpinBox::value( ) const
+{
+  return QSpinBox::value( );
+}
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.h
new file mode 100644
index 0000000..3f587c5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/PropertyValueDelegate.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: $
+// $Id: $
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef PROPERTY_VALUE_DELEGATE_H
+#define PROPERTY_VALUE_DELEGATE_H
+
+#include <QtGui>
+#include <QItemDelegate>
+#include <QSpinBox>
+
+
+class PropertyValueDelegate : public QItemDelegate
+{
+  Q_OBJECT
+
+  public:
+  PropertyValueDelegate( QObject* parent = 0 );
+
+public:
+  QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,
+                         const QModelIndex& index ) const;
+  void setModelData( QWidget* editor, QAbstractItemModel* model,
+                     const QModelIndex& index ) const;
+  bool eventFilter( QObject* object, QEvent* event );
+
+public slots:
+  void commit( );
+
+};
+
+class PositiveSpinBox : public QSpinBox
+{
+  Q_OBJECT
+  Q_PROPERTY( unsigned int value READ value WRITE setValue USER true )
+
+    public:
+    PositiveSpinBox( QWidget* parent );
+  void setValue( unsigned int );
+  unsigned int value( ) const;
+};
+
+#endif // PROPERTY_VALUE_DELEGATE_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/SplitEdgeCallback.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/SplitEdgeCallback.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/SplitEdgeCallback.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/SplitEdgeCallback.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/SplitEdgeCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/SplitEdgeCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/SplitEdgeCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/SplitEdgeCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Utils.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Utils.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/Utils.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Utils.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Utils.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Utils.h
new file mode 100644
index 0000000..3ea7941
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/Utils.h
@@ -0,0 +1,1627 @@
+// Copyright (c) 2012  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Alex Tsui <alextsui05 at gmail.com>
+
+#ifndef CGAL_ARRANGEMENTS_DEMO_UTILS_H
+#define CGAL_ARRANGEMENTS_DEMO_UTILS_H
+
+#include <CGAL/iterator.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arr_circular_arc_traits_2.h>
+#include <CGAL/Arr_algebraic_segment_traits_2.h>
+#include <CGAL/Arr_walk_along_line_point_location.h>
+
+#include "ArrangementTypes.h"
+
+class QGraphicsScene;
+
+class QGraphicsSceneMixin
+{
+public:
+  /*! Costructor */
+  QGraphicsSceneMixin( ) : scene( 0 ) { }
+
+  /*! Destructor (virtual) */
+  virtual ~QGraphicsSceneMixin() {}
+
+  virtual void setScene( QGraphicsScene* scene_ ) { this->scene = scene_; }
+
+  virtual QGraphicsScene* getScene( ) const { return this->scene; }
+
+  virtual QRectF viewportRect( ) const
+  {
+    QRectF res;
+    if ( this->scene == NULL )
+    {
+      return res;
+    }
+
+    QList< QGraphicsView* > views = this->scene->views( );
+    if ( views.size( ) == 0 )
+    {
+      return res;
+    }
+    // assumes the first view is the right one
+    QGraphicsView* viewport = views.first( );
+    QPointF p1 = viewport->mapToScene( 0, 0 );
+    QPointF p2 = viewport->mapToScene(viewport->width(), viewport->height());
+
+    double xmin = (std::min)(p1.x(), p2.x());
+    double xmax = (std::max)(p1.x(), p2.x());
+    double ymin = (std::min)(p1.y(), p2.y());
+    double ymax = (std::max)(p1.y(), p2.y());
+
+    res = QRectF( QPointF( xmin, ymin ), QPointF( xmax, ymax ) );
+
+    return res;
+  }
+
+  QPoint fromScene( QPointF p, bool* ok = 0 )
+  {
+    QPoint res;
+    if ( this->scene == NULL )
+    {
+      if ( ok ) { *ok = false; }
+      return res;
+    }
+    QList< QGraphicsView* > views = this->scene->views( );
+    if ( views.size( ) == 0 )
+    {
+      if ( ok ) { *ok = false; }
+      return res;
+    }
+
+    // assumes the first view is the right one
+    QGraphicsView* viewport = views.first( );
+
+    if ( ok ) { *ok = true; }
+    res = viewport->mapFromScene( p );
+    return res;
+  }
+
+  QPointF toScene( QPoint p, bool* ok = 0 )
+  {
+    QPointF res;
+    if ( this->scene == NULL )
+    {
+      if ( ok ) { *ok = false; }
+      return res;
+    }
+    QList< QGraphicsView* > views = this->scene->views( );
+    if ( views.size( ) == 0 )
+    {
+      if ( ok ) { *ok = false; }
+      return res;
+    }
+
+    // assumes the first view is the right one
+    QGraphicsView* viewport = views.first( );
+
+    if ( ok ) { *ok = true; }
+    res = viewport->mapToScene( p );
+    return res;
+  }
+
+  int fromScene( double d, bool* ok = 0 )
+  {
+    QPointF p( d, 0 );
+    QPoint pp = this->fromScene( p, ok );
+    return pp.x( );
+  }
+
+  double toScene( int i, bool* ok = 0 )
+  {
+    QPoint p( i, 0 );
+    QPointF pp = this->toScene( p, ok );
+    return pp.x( );
+  }
+
+protected: // fields
+  QGraphicsScene* scene;
+};
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF( Approximate_2 )
+
+template < class Arr_, bool b = has_Approximate_2< Arr_ >::value >
+struct Supports_landmarks
+{
+  typedef CGAL::Boolean_tag< b > Tag;
+  struct LandmarksType { };
+};
+
+template < class Arr_ >
+struct Supports_landmarks< Arr_, true >
+{
+  typedef CGAL::Tag_true Tag;
+  typedef CGAL::Arr_landmarks_point_location< Arr_ > LandmarksType;
+};
+
+/**
+   Support for new ArrTraits should specify types:
+
+   * Kernel - a not-necessarily-exact kernel to represent the arrangement
+   graphically. We'll use the Point_2 type provided by this kernel for
+   computing distances
+   * Point_2 - the point type used in the particular arrangement
+   * CoordinateType - the coordinate type used by the point type
+   */
+template < class ArrTraits >
+class ArrTraitsAdaptor
+{ };
+
+template < class Kernel_ >
+class ArrTraitsAdaptor< CGAL::Arr_segment_traits_2< Kernel_ > >
+{
+public:
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_segment_traits_2< Kernel > ArrTraits;
+  typedef typename ArrTraits::Point_2 Point_2;
+  typedef typename Kernel::FT CoordinateType;
+};
+
+template < class Kernel_ >
+class ArrTraitsAdaptor< CGAL::Arr_linear_traits_2< Kernel_ > >
+{
+public:
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_linear_traits_2< Kernel > ArrTraits;
+  typedef typename ArrTraits::Point_2 Point_2;
+  typedef typename Kernel::FT CoordinateType;
+};
+
+template < class SegmentTraits >
+class ArrTraitsAdaptor< CGAL::Arr_polyline_traits_2< SegmentTraits > >
+{
+public:
+  typedef CGAL::Arr_polyline_traits_2< SegmentTraits > ArrTraits;
+  typedef typename SegmentTraits::Kernel Kernel;
+  typedef typename ArrTraits::Point_2 Point_2;
+  typedef typename Kernel::FT CoordinateType;
+};
+
+template < class CircularKernel >
+class ArrTraitsAdaptor< CGAL::Arr_circular_arc_traits_2< CircularKernel > >
+{
+public:
+  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > ArrTraits;
+  typedef CircularKernel Kernel;
+  typedef typename ArrTraits::Point_2 Point_2;
+  typedef typename Kernel::Root_of_2 CoordinateType;
+};
+
+template < class RatKernel, class AlgKernel, class NtTraits >
+class ArrTraitsAdaptor< CGAL::Arr_conic_traits_2< RatKernel, AlgKernel,
+                                                  NtTraits > >
+{
+public:
+  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > ArrTraits;
+  typedef AlgKernel Kernel;
+  typedef typename ArrTraits::Point_2 Point_2;
+  typedef typename Kernel::FT CoordinateType;
+};
+
+template < class Coefficient_ >
+class ArrTraitsAdaptor< CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > >
+{
+public:
+  typedef Coefficient_ Coefficient;
+  typedef typename CGAL::Arr_algebraic_segment_traits_2<Coefficient>
+                                                        ArrTraits;
+  typedef typename ArrTraits::Point_2                   Point_2; // CKvA_2
+  typedef typename ArrTraits::Algebraic_real_1          CoordinateType;
+  typedef CGAL::Cartesian< typename ArrTraits::Bound >  Kernel;
+  //typedef typename ArrTraits::CKvA_2                  Kernel;
+};
+
+template < class ArrTraits >
+class Compute_squared_distance_2_base : public QGraphicsSceneMixin
+{
+public:
+  typedef CGAL::Cartesian< double > InexactKernel;
+
+public:
+  // ctors
+  Compute_squared_distance_2_base( ) { }
+
+public: // methods
+
+  template < class T1, class T2 >
+  double operator() ( const T1& t1, const T2& t2 )
+  {
+    return this->squaredDistance( t1, t2 );
+  }
+
+protected: // fields
+  typename Kernel::Compute_squared_distance_2 squared_distance;
+  InexactKernel::Compute_squared_distance_2 squaredDistance;
+};
+
+template < class ArrTraits >
+class Compute_squared_distance_2 :
+  public Compute_squared_distance_2_base< ArrTraits >
+{ };
+
+template < class Kernel_ >
+class Compute_squared_distance_2< CGAL::Arr_segment_traits_2< Kernel_ > > :
+  public Compute_squared_distance_2_base<CGAL::Arr_segment_traits_2<Kernel_> >
+{
+public:
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_segment_traits_2< Kernel > Traits;
+  typedef Compute_squared_distance_2_base< Traits > Superclass;
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
+
+  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
+  {
+    Point_2 p1 = c.source( );
+    Point_2 p2 = c.target( );
+    Segment_2 seg( p1, p2 );
+
+    return CGAL::to_double( this->squared_distance( p, seg ) );
+  }
+};
+
+template < class Kernel_ >
+class Compute_squared_distance_2< CGAL::Arr_linear_traits_2< Kernel_ > > :
+  public Compute_squared_distance_2_base<CGAL::Arr_linear_traits_2<Kernel_> >
+{
+public:
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_linear_traits_2< Kernel > Traits;
+  typedef Compute_squared_distance_2_base< Traits > Superclass;
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+  typedef typename Kernel::Ray_2 Ray_2;
+  typedef typename Kernel::Line_2 Line_2;
+  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
+
+  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
+  {
+    Segment_2 seg;
+    Ray_2 ray;
+    Line_2 line;
+    FT res;
+    if ( c.is_segment( ) )
+    {
+      seg = c.segment( );
+      res = this->squared_distance( p, seg );
+    }
+    else if ( c.is_ray( ) )
+    {
+      ray = c.ray( );
+      res = this->squared_distance( p, ray );
+    }
+    else // ( c.is_line( ) )
+    {
+      line = c.line( );
+      res = this->squared_distance( p, line );
+    }
+    return CGAL::to_double( res );
+  }
+};
+
+template < class Kernel_ >
+class Compute_squared_distance_2< CGAL::Arr_polyline_traits_2< Kernel_ > > :
+  public Compute_squared_distance_2_base<CGAL::Arr_polyline_traits_2<Kernel_> >
+{
+public:
+  typedef Kernel_ Kernel;
+  typedef CGAL::Arr_polyline_traits_2< Kernel > Traits;
+  typedef Compute_squared_distance_2_base< Traits > Superclass;
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+  typedef typename Traits::Curve_2 Curve_2;
+  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
+  typedef typename Curve_2::Subcurve_const_iterator Seg_const_it;
+
+  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
+  {
+    Seg_const_it seg_it_s = c.subcurves_begin();
+
+    bool first = true;
+    FT min_dist = 0;
+
+    while (seg_it_s != c.subcurves_end())
+      {
+        Segment_2 seg = *seg_it_s;
+        FT dist = this->squared_distance( p, seg );
+
+        if ( first || dist < min_dist )
+          {
+            first = false;
+            min_dist = dist;
+          }
+        seg_it_s++;
+      }
+
+    return CGAL::to_double( min_dist );
+  }
+};
+
+template < class CircularKernel >
+class Compute_squared_distance_2< CGAL::Arr_circular_arc_traits_2<
+                                    CircularKernel > > :
+  public Compute_squared_distance_2_base< CGAL::Arr_circular_arc_traits_2<
+                                            CircularKernel > >
+{
+public: // typedefs
+  typedef CircularKernel Kernel;
+  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Traits;
+  typedef Compute_squared_distance_2_base< Traits > Superclass;
+  typedef typename Traits::Point_2 Point_2;
+  typedef typename Traits::Point_2 Arc_point_2;
+  typedef typename Kernel::Point_2 Non_arc_point_2;
+  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
+  typedef typename Kernel::FT FT;
+
+public: // methods
+  double operator() ( const Point_2& p, const X_monotone_curve_2& c )
+  {
+    // TODO: implement it correctly
+    Non_arc_point_2 center = c.center( );
+    Non_arc_point_2 pp( CGAL::to_double(p.x()), CGAL::to_double(p.y()) );
+    FT res = CGAL::squared_distance( pp, center );
+    return CGAL::to_double( res );
+  }
+};
+
+template < class RatKernel, class AlgKernel, class NtTraits >
+class Compute_squared_distance_2< CGAL::Arr_conic_traits_2< RatKernel,
+                                                            AlgKernel,
+                                                            NtTraits > > :
+  public Compute_squared_distance_2_base< CGAL::Arr_conic_traits_2< RatKernel,
+                                                                    AlgKernel,
+                                                                    NtTraits > >
+{
+public:
+  typedef AlgKernel                                     Kernel;
+  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > Traits;
+  typedef Compute_squared_distance_2_base< Traits >     Superclass;
+  // _Conic_point_2< AlgKernel > : public AlgKernel::Point_2
+  typedef typename Traits::Point_2                      Conic_point_2;
+  typedef typename Kernel::FT                           FT;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Kernel::Segment_2                    Segment_2;
+  typedef typename Traits::Curve_2                      Curve_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public: // methods
+  double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
+  {
+    // Get the co-ordinates of the curve's source and target.
+    // double sx = CGAL::to_double( c.source( ).x( ) );
+    // double sy = CGAL::to_double( c.source( ).y( ) );
+    // double tx = CGAL::to_double( c.target( ).x( ) );
+    // double ty = CGAL::to_double( c.target( ).y( ) );
+
+    if ( c.orientation( ) == CGAL::COLLINEAR )
+    {
+      Point_2 ps = c.source( );
+      Point_2 pt = c.target( );
+      Segment_2 seg( ps, pt );
+
+      FT res = CGAL::squared_distance( p, seg );
+      return CGAL::to_double( res );
+    }
+    else
+    {
+      // If the curve is monotone, than its source and its target has the
+      // extreme x co-ordinates on this curve.
+      // bool is_source_left = (sx < tx);
+      //int  x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
+      //int  x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
+      //double   prev_x = is_source_left ? sx : tx;
+      //double   prev_y = is_source_left ? sy : ty;
+      //double   curr_x, curr_y;
+      //int      x;
+      //Arr_conic_point_2 px;
+
+      bool first = true;
+      FT min_dist( 100000000 );
+      // AlgKernel ker;
+
+      int n = 100;
+      if ( this->scene != NULL && this->scene->views( ).size( ) != 0 )
+      { // use the scene to approximate the resolution of the curve
+        QGraphicsView* view = this->scene->views( ).first( );
+        CGAL::Bbox_2 bb = c.bbox( ); // assumes bounded curve
+        int xmin = view->mapFromScene( bb.xmin( ), bb.ymin( ) ).x( );
+        int xmax = view->mapFromScene( bb.xmax( ), bb.ymin( ) ).x( );
+        n = xmax - xmin;
+        if ( n < 2 )
+        {
+          n = 2;
+        }
+      }
+
+      std::pair<double, double>* app_pts =
+        new std::pair< double, double >[ n + 1 ];
+      std::pair<double, double>* end_pts = c.polyline_approximation(n, app_pts);
+      std::pair<double, double>* p_curr = app_pts;
+      std::pair<double, double>* p_next = p_curr + 1;
+      do
+      {
+        Point_2 p1( p_curr->first, p_curr->second );
+        Point_2 p2( p_next->first, p_next->second );
+        Segment_2 seg( p1, p2 );
+
+        FT dist = CGAL::squared_distance( p, seg );
+        if ( first || dist < min_dist )
+        {
+          first = false;
+          min_dist = dist;
+        }
+
+        p_curr++;
+        p_next++;
+      } while ( p_next != end_pts );
+
+      return CGAL::to_double( min_dist );
+    }
+  }
+};
+
+template < class Coefficient_ >
+class Compute_squared_distance_2< CGAL::Arr_algebraic_segment_traits_2<
+                                    Coefficient_ > > :
+  public Compute_squared_distance_2_base< CGAL::Arr_algebraic_segment_traits_2<
+                                            Coefficient_ > >
+{
+public:
+  typedef Coefficient_                                  Coefficient;
+  typedef CGAL::Arr_algebraic_segment_traits_2<Coefficient>
+                                                        Traits;
+  typedef typename Traits::Bound                        FT; // unused
+  typedef typename ArrTraitsAdaptor<Traits>::Kernel     Kernel;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+public:
+  double operator()(const Point_2& /* p */,
+                    const X_monotone_curve_2& /* c */) const
+  {
+    double res = 0.0;
+    return res;
+  }
+};
+
+template < class ArrTraits >
+class Arr_compute_y_at_x_2 : public QGraphicsSceneMixin
+{
+public:
+  typedef ArrTraits Traits;
+  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
+  typedef typename ArrTraitsAdaptor< Traits >::CoordinateType CoordinateType;
+  // typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Kernel::Line_2                       Line_2;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+  typedef typename Traits::Multiplicity                 Multiplicity;
+  typedef typename Traits::Intersect_2                  Intersect_2;
+  typedef std::pair< typename Traits::Point_2, Multiplicity >
+                                                        IntersectionResult;
+
+  /*! Constructor */
+  Arr_compute_y_at_x_2( ) :
+    intersectCurves( this->traits.intersect_2_object( ) )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~Arr_compute_y_at_x_2() {}
+
+  CoordinateType operator() ( const X_monotone_curve_2& curve,
+                              const CoordinateType& x )
+  {
+    typename Traits::Left_side_category category;
+    return this->operator()( curve, x, this->traits, category );
+  }
+
+  double approx( const X_monotone_curve_2& curve, const CoordinateType& x )
+  {
+    return CGAL::to_double( (*this)( curve, x ) );
+  }
+
+protected:
+  template < class TTraits >
+  CoordinateType operator() ( const X_monotone_curve_2& curve,
+                              const CoordinateType& x, TTraits traits_,
+                              CGAL::Arr_oblivious_side_tag )
+  {
+    typedef typename TTraits::Construct_x_monotone_curve_2
+      Construct_x_monotone_curve_2;
+    Construct_x_monotone_curve_2 construct_x_monotone_curve_2 =
+      traits_.construct_x_monotone_curve_2_object( );
+    CoordinateType res( 0 );
+    CGAL::Bbox_2 clipRect = curve.bbox( );
+    Point_2 p1c1( x, CoordinateType( clipRect.ymin( ) - 1 ) ); // clicked point
+    // upper bounding box
+    Point_2 p2c1( x, CoordinateType( clipRect.ymax( ) + 1 ) );
+
+    const X_monotone_curve_2 verticalLine =
+      construct_x_monotone_curve_2( p1c1, p2c1 );
+    CGAL::Object o;
+    CGAL::Oneset_iterator< CGAL::Object > oi( o );
+
+    this->intersectCurves( curve, verticalLine, oi );
+
+    IntersectionResult pair;
+    if ( CGAL::assign( pair, o ) )
+    {
+      Point_2 pt = pair.first;
+      res = pt.y( );
+    }
+    return res;
+  }
+
+  template < class TTraits >
+  CoordinateType operator() ( const X_monotone_curve_2& curve,
+                              const CoordinateType& x, TTraits traits_,
+                              CGAL::Arr_open_side_tag )
+  {
+    typename TTraits::Construct_x_monotone_curve_2
+      construct_x_monotone_curve_2 =
+      traits_.construct_x_monotone_curve_2_object( );
+    CoordinateType res( 0 );
+    // QRectF clipRect = this->viewportRect( );
+    Line_2 line = curve.supporting_line( );
+    // FIXME: get a better bounding box for an unbounded segment
+    Point_2 p1c1( x, CoordinateType( -10000000 ) ); // clicked point
+    Point_2 p2c1( x, CoordinateType(  10000000 ) ); // upper bounding box
+
+    const X_monotone_curve_2 verticalLine =
+      construct_x_monotone_curve_2( p1c1, p2c1 );
+    CGAL::Object o;
+    CGAL::Oneset_iterator< CGAL::Object > oi( o );
+
+    this->intersectCurves( curve, verticalLine, oi );
+
+    IntersectionResult pair;
+    if ( CGAL::assign( pair, o ) )
+    {
+      Point_2 pt = pair.first;
+      res = pt.y( );
+    }
+    return res;
+  }
+
+protected:
+  Traits traits;
+  Intersect_2 intersectCurves;
+};
+
+template < class CircularKernel >
+class Arr_compute_y_at_x_2< CGAL::Arr_circular_arc_traits_2<CircularKernel> > :
+  public QGraphicsSceneMixin
+{
+public:
+  typedef CGAL::Arr_circular_arc_traits_2< CircularKernel > Traits;
+  typedef CircularKernel                                Kernel;
+  typedef typename Kernel::FT                           FT;
+  typedef typename Kernel::Root_of_2                    Root_of_2;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Traits::Point_2                      Arc_point_2;
+  typedef typename Kernel::Segment_2                    Segment_2;
+  typedef typename Kernel::Line_arc_2                   Line_arc_2;
+  // Circular_arc_2
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+  typedef typename Traits::Intersect_2                  Intersect_2;
+  typedef typename Traits::Multiplicity                 Multiplicity;
+  typedef std::pair< typename Traits::Point_2, Multiplicity >
+                                                        IntersectionResult;
+
+  /*! Constructor */
+  Arr_compute_y_at_x_2( ) :
+    intersectCurves( this->traits.intersect_2_object( ) )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~Arr_compute_y_at_x_2() {}
+
+  Root_of_2 operator() ( const X_monotone_curve_2& curve, const FT& x )
+  {
+    Root_of_2 res( 0 );
+    CGAL::Bbox_2 clipRect = curve.bbox( );
+    Point_2 p1c1( x, FT( clipRect.ymin( ) - 1 ) ); // clicked point
+    Point_2 p2c1( x, FT( clipRect.ymax( ) + 1 ) ); // upper bounding box
+    Line_arc_2 verticalLine( Segment_2( p1c1, p2c1 ) );
+
+    CGAL::Object o;
+    CGAL::Oneset_iterator< CGAL::Object > oi( o );
+
+    this->intersectCurves( curve, verticalLine, oi );
+
+    IntersectionResult pair;
+    if ( CGAL::assign( pair, o ) )
+    {
+      Arc_point_2 pt = pair.first;
+      res = pt.y( );
+    }
+    return res;
+  }
+
+  double approx( const X_monotone_curve_2& curve, const FT& x )
+  {
+    return CGAL::to_double( (*this)( curve, x ) );
+  }
+
+  // FIXME: inexact projection
+  Root_of_2 operator() ( const X_monotone_curve_2& curve, const Root_of_2& x )
+  {
+    FT approx( CGAL::to_double( x ) );
+    return this->operator()( curve, approx );
+  }
+
+  double approx( const X_monotone_curve_2& curve, const Root_of_2& x )
+  {
+    return CGAL::to_double( (*this)( curve, x ) );
+  }
+
+protected:
+  Traits traits;
+  Intersect_2 intersectCurves;
+};
+
+template < class Coefficient_ >
+class Arr_compute_y_at_x_2< CGAL::Arr_algebraic_segment_traits_2<
+                              Coefficient_ > > : public QGraphicsSceneMixin
+{
+public:
+  typedef Coefficient_ Coefficient;
+  typedef CGAL::Arr_algebraic_segment_traits_2< Coefficient > Traits;
+  typedef typename Traits::Algebraic_real_1             CoordinateType;
+  typedef typename Traits::Point_2                      Point_2;
+  typedef typename Traits::Intersect_2                  Intersect_2;
+  typedef typename Traits::Multiplicity                 Multiplicity;
+  typedef typename Traits::X_monotone_curve_2           X_monotone_curve_2;
+
+  CoordinateType operator() ( const X_monotone_curve_2& curve,
+                              const CoordinateType& x )
+  {
+    CGAL::Object o;
+    CGAL::Oneset_iterator< CGAL::Object > oi( o );
+    Intersect_2 intersect = traits.intersect_2_object( );
+    X_monotone_curve_2 c2 = this->makeVerticalLine( x );
+    intersect( curve, c2, oi );
+    std::pair< Point_2, Multiplicity > res;
+    if ( CGAL::assign( res, o ) ) // TODO: handle failure case
+    {
+      Point_2 p = res.first;
+      // std::cout << "approx y: " << p.to_double( ).second << std::endl;
+      CoordinateType coord = p.y( );
+      return coord;
+    }
+    else
+    {
+      std::cout << "Warning: vertical projection failed" << std::endl;
+      return CoordinateType( 0 );
+    }
+  }
+
+  double approx( const X_monotone_curve_2& curve, const CoordinateType& x )
+  {
+    CGAL::Object o;
+    CGAL::Oneset_iterator< CGAL::Object > oi( o );
+    Intersect_2 intersect = traits.intersect_2_object( );
+    X_monotone_curve_2 c2 = this->makeVerticalLine( x );
+    intersect( curve, c2, oi );
+    std::pair< Point_2, Multiplicity > res;
+    if ( CGAL::assign( res, o ) ) // TODO: handle failure case
+    {
+      Point_2 p = res.first;
+      std::pair< double, double > tmp = p.to_double();
+      return tmp.second;
+    }
+    else
+    {
+      std::cout << "Warning: vertical projection failed" << std::endl;
+      return 0;
+    }
+  }
+
+protected:
+  X_monotone_curve_2 makeVerticalLine( const CoordinateType& x )
+  {
+    typename Traits::Construct_point_2 constructPoint =
+      traits.construct_point_2_object( );
+    typename Traits::Construct_x_monotone_segment_2 constructSegment =
+      traits.construct_x_monotone_segment_2_object( );
+
+    std::vector< X_monotone_curve_2 > curves;
+    Point_2 p1 = constructPoint( x, CoordinateType( -1000000 ) );
+    Point_2 p2 = constructPoint( x, CoordinateType( +1000000 ) );
+    constructSegment( p1, p2, std::back_inserter( curves ) );
+    return curves[ 0 ]; // by construction, there is one curve in curves
+  }
+  Traits traits;
+};
+
+#undef SUBCURVE_1
+
+// TODO: Make Construct_x_monotone_subcurve_2 more generic
+template < class ArrTraits >
+class Construct_x_monotone_subcurve_2
+{
+public:
+  typedef typename ArrTraitsAdaptor<ArrTraits>::Kernel  Kernel;
+  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
+  typedef typename ArrTraits::Split_2                   Split_2;
+  typedef typename ArrTraits::Intersect_2               Intersect_2;
+  typedef typename ArrTraits::Multiplicity              Multiplicity;
+  typedef typename ArrTraits::Construct_min_vertex_2    Construct_min_vertex_2;
+  typedef typename ArrTraits::Construct_max_vertex_2    Construct_max_vertex_2;
+  typedef typename ArrTraits::Compare_x_2               Compare_x_2;
+  typedef typename Kernel::FT                           FT;
+  typedef typename ArrTraitsAdaptor< ArrTraits >::CoordinateType
+                                                        CoordinateType;
+  typedef typename ArrTraits::Point_2                   Point_2;
+  typedef typename Kernel::Point_2                      Kernel_point_2;
+  //typedef typename Kernel::Line_2 Line_2;
+  //typedef typename Kernel::Compute_y_at_x_2 Compute_y_at_x_2;
+
+  Construct_x_monotone_subcurve_2( ):
+    intersect_2( this->traits.intersect_2_object( ) ),
+    split_2( this->traits.split_2_object( ) ),
+    compare_x_2( this->traits.compare_x_2_object( ) ),
+    construct_min_vertex_2( this->traits.construct_min_vertex_2_object( ) ),
+    construct_max_vertex_2( this->traits.construct_max_vertex_2_object( ) )
+  { }
+
+  /*
+    Return the subcurve of curve bracketed by pLeft and pRight.
+
+    We assume pLeft and pRight don't lie on the curve and always do a vertical
+    projection.
+  */
+  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
+                                  const Point_2& pLeft, const Point_2& pRight )
+  {
+    Point_2 pMin = this->construct_min_vertex_2( curve );
+    Point_2 pMax = this->construct_max_vertex_2( curve );
+    X_monotone_curve_2 subcurve;
+    X_monotone_curve_2 unusedTrimmings;
+    X_monotone_curve_2 finalSubcurve;
+    if ( this->compare_x_2( pLeft, pMin ) == CGAL::LARGER )
+    {
+      CoordinateType y1 = this->compute_y_at_x( curve, pLeft.x( ) );
+      Point_2 splitPoint( pLeft.x( ), y1 );
+      this->split_2( curve, splitPoint, unusedTrimmings, subcurve );
+    }
+    else
+    {
+      subcurve = curve;
+    }
+
+    if ( this->compare_x_2( pRight, pMax ) == CGAL::SMALLER )
+    {
+      CoordinateType y2 = this->compute_y_at_x( subcurve, pRight.x( ) );
+      Point_2 splitPoint( pRight.x( ), y2 );
+      this->split_2( subcurve, splitPoint, finalSubcurve, unusedTrimmings );
+    }
+    else
+    {
+      finalSubcurve = subcurve;
+    }
+
+    return finalSubcurve;
+  }
+
+protected:
+  ArrTraits traits;
+  Intersect_2 intersect_2;
+  Split_2 split_2;
+  Compare_x_2 compare_x_2;
+  Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
+  Construct_min_vertex_2 construct_min_vertex_2;
+  Construct_max_vertex_2 construct_max_vertex_2;
+}; // class Construct_x_monotone_subcurve_2
+
+template < class CircularKernel >
+class Construct_x_monotone_subcurve_2< CGAL::Arr_circular_arc_traits_2<
+                                         CircularKernel > >
+{
+public:
+  typedef CGAL::Arr_circular_arc_traits_2<CircularKernel> ArrTraits;
+  typedef typename ArrTraits::Intersect_2               Intersect_2;
+  typedef typename ArrTraits::Split_2                   Split_2;
+  typedef typename ArrTraits::Compare_x_2               Compare_x_2;
+  typedef typename ArrTraits::Construct_min_vertex_2    Construct_min_vertex_2;
+  typedef typename ArrTraits::Construct_max_vertex_2    Construct_max_vertex_2;
+  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
+  typedef typename CircularKernel::Point_2              Non_arc_point_2;
+  typedef typename ArrTraits::Point_2                   Arc_point_2;
+  typedef typename CircularKernel::FT                   FT;
+  typedef typename CircularKernel::Root_of_2            Root_of_2;
+  typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2;
+
+public:
+  Construct_x_monotone_subcurve_2( ):
+    intersect_2( this->traits.intersect_2_object( ) ),
+    split_2( this->traits.split_2_object( ) ),
+    compare_x_2( this->traits.compare_x_2_object( ) ),
+    construct_min_vertex_2( this->traits.construct_min_vertex_2_object( ) ),
+    construct_max_vertex_2( this->traits.construct_max_vertex_2_object( ) )
+  { }
+
+  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
+                                  const Arc_point_2& pLeft,
+                                  const Arc_point_2& pRight )
+  {
+    Arc_point_2 pMin = this->construct_min_vertex_2( curve );
+    Arc_point_2 pMax = this->construct_max_vertex_2( curve );
+    X_monotone_curve_2 subcurve;
+    X_monotone_curve_2 unusedTrimmings;
+    X_monotone_curve_2 finalSubcurve;
+    if ( this->compare_x_2( pLeft, pMin ) == CGAL::LARGER )
+    {
+      Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
+      FT x_approx( CGAL::to_double( pLeft.x( ) ) );
+      Root_of_2 y1 = compute_y_at_x( curve, x_approx );
+      Root_for_circles_2_2 intersectionPoint( x_approx, y1 );
+      Arc_point_2 splitPoint( intersectionPoint );
+      this->split_2( curve, splitPoint, unusedTrimmings, subcurve );
+    }
+    else
+    {
+      subcurve = curve;
+    }
+
+    if ( this->compare_x_2( pRight, pMax ) == CGAL::SMALLER )
+    {
+      Arr_compute_y_at_x_2< ArrTraits > compute_y_at_x;
+      FT x_approx( CGAL::to_double( pRight.x( ) ) );
+      Root_of_2 y2 = compute_y_at_x( subcurve, x_approx );
+      Root_for_circles_2_2 intersectionPoint( x_approx, y2 );
+      Arc_point_2 splitPoint( intersectionPoint );
+      this->split_2( subcurve, splitPoint, finalSubcurve, unusedTrimmings );
+    }
+    else
+    {
+      finalSubcurve = subcurve;
+    }
+
+    return finalSubcurve;
+  }
+
+protected:
+  ArrTraits traits;
+  Intersect_2 intersect_2;
+  Split_2 split_2;
+  Compare_x_2 compare_x_2;
+  Construct_min_vertex_2 construct_min_vertex_2;
+  Construct_max_vertex_2 construct_max_vertex_2;
+};
+
+/*
+ * This specialization for conic traits makes use of X_monotone_curve_2::trim,
+ * which is not necessarily available.
+ */
+template < class RatKernel, class AlgKernel, class NtTraits >
+class Construct_x_monotone_subcurve_2< CGAL::Arr_conic_traits_2< RatKernel,
+                                                                 AlgKernel,
+                                                                 NtTraits > >
+{
+public:
+  typedef CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits > ArrTraits;
+  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
+  typedef typename AlgKernel::Point_2 Point_2;
+
+  /*
+    Return the subcurve of curve bracketed by pLeft and pRight.
+  */
+  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
+                                  const Point_2& pLeft, const Point_2& pRight )
+  {
+    // find the points on the curve
+    Point_2 left = curve.point_at_x( pLeft );
+    Point_2 right = curve.point_at_x( pRight );
+
+    // make sure the points are oriented in the direction that the curve is
+    // going
+    AlgKernel ker;
+    if (! (((curve.is_directed_right( )) &&
+            ker.compare_xy_2_object() ( left, right ) == CGAL::SMALLER) ||
+           ((! curve.is_directed_right( )) &&
+            ker.compare_xy_2_object() ( left, right ) == CGAL::LARGER)))
+    {
+      Point_2 tmp = left;
+      left = right;
+      right = tmp;
+    }
+
+    X_monotone_curve_2 res = curve.trim( left, right );
+    return res;
+  }
+}; // class Construct_x_monotone_subcurve_2 for Arr_conic_traits_2
+
+template < class Kernel_ >
+class Construct_x_monotone_subcurve_2< CGAL::Arr_linear_traits_2< Kernel_ > >
+{
+public: // typedefs
+  typedef CGAL::Arr_linear_traits_2< Kernel_ > ArrTraits;
+  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
+  typedef Kernel_ Kernel;
+  typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+
+public: // methods
+  // curve can be unbounded. if curve is unbounded to the left,
+  // pLeft is a point on the left edge of viewport.
+  X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
+                                  const Point_2& pLeft, const Point_2& pRight )
+  {
+    if ( curve.is_segment( ) )
+    {
+      Segment_2 subsegment =
+        this->constructSubsegment( curve.segment( ), pLeft, pRight );
+      return X_monotone_curve_2( subsegment );
+    }
+    else if ( curve.is_ray( ) )
+    {
+
+    }
+    return curve;
+  }
+
+protected:
+  Construct_x_monotone_subcurve_2< CGAL::Arr_segment_traits_2< Kernel_ > >
+    constructSubsegment;
+};
+
+template < class Coefficient_ >
+class Construct_x_monotone_subcurve_2< CGAL::Arr_algebraic_segment_traits_2<
+                                         Coefficient_ > >
+{
+public: // typedefs
+  typedef Coefficient_ Coefficient;
+  typedef CGAL::Arr_algebraic_segment_traits_2< Coefficient > ArrTraits;
+  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
+  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
+  typedef typename ArrTraits::Point_2                   Point_2;
+  //typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Segment_2                    Segment_2;
+
+public: // methods
+  // curve can be unbounded. if curve is unbounded to the left, pLeft is a
+  // point on the left edge of viewport.
+  X_monotone_curve_2 operator()(const X_monotone_curve_2& curve,
+                                const Point_2& /* pLeft */,
+                                const Point_2& /* pRight */)
+  {
+    // TODO: trim the algebraic curve
+    return curve;
+  }
+
+protected:
+};
+
+// FIXME: return Traits::Point_2 instead of Kernel::Point_2
+template < class ArrTraits >
+class SnapStrategy : public QGraphicsSceneMixin
+{
+public:
+  //typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
+  typedef typename ArrTraits::Point_2 Point_2;
+
+  virtual Point_2 snapPoint( QGraphicsSceneMouseEvent* event ) = 0;
+
+protected:
+  SnapStrategy( QGraphicsScene* scene_ );
+}; // class SnapStrategy
+
+template < class ArrTraits >
+SnapStrategy< ArrTraits >::SnapStrategy( QGraphicsScene* scene_ )
+{
+  this->scene = scene_;
+}
+
+template < class ArrTraits >
+class SnapToGridStrategy : public SnapStrategy< ArrTraits >
+{
+public:
+  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
+  typedef typename ArrTraits::Point_2                   Point_2;
+  typedef typename Kernel::Point_2                      Kernel_point_2;
+  typedef SnapStrategy< ArrTraits >                     Superclass;
+
+  /*! Constructors */
+  SnapToGridStrategy( ) :
+    Superclass( NULL ),
+    gridSize( 50 )
+  { }
+
+  SnapToGridStrategy( QGraphicsScene* scene ) :
+    Superclass( scene ),
+    gridSize( 50 )
+  { }
+
+  /*! Destructors (virtual) */
+  ~SnapToGridStrategy() {}
+
+  Point_2 snapPoint( QGraphicsSceneMouseEvent* event )
+  {
+    return this->snapPoint( event, ArrTraits( ) );
+  }
+
+  template < class TTraits >
+  Point_2 snapPoint(QGraphicsSceneMouseEvent* event, TTraits /* traits */)
+  {
+    QPointF clickedPoint = event->scenePos( );
+    QRectF viewportRect = this->viewportRect( );
+    if ( viewportRect == QRectF( ) )
+    { // fallback case; we usually shouldn't end up here
+      Kernel_point_2 res = this->convert( event->scenePos( ) );
+      return Point_2( CGAL::to_double(res.x( )), CGAL::to_double(res.y()) );
+    }
+
+    qreal d( this->gridSize / 2.0 );
+    int left = int( viewportRect.left( ) ) -
+      (int( viewportRect.left( ) ) % this->gridSize);
+    int right = int( viewportRect.right( ) ) +
+      (this->gridSize - int( viewportRect.right( ) ) % this->gridSize);
+    int x = int(clickedPoint.x( ));
+    int y = int(clickedPoint.y( ));
+    for ( int i = left - this->gridSize; i <= right; i += this->gridSize )
+    {
+      if ( i - d <= clickedPoint.x( ) && clickedPoint.x( ) <= i + d )
+      {
+        x = i;
+        break;
+      }
+    }
+    int top = int( viewportRect.top( ) ) -
+      (int( viewportRect.top( ) ) % this->gridSize);
+    int bottom = int( viewportRect.bottom( ) ) +
+      (this->gridSize - int( viewportRect.bottom( ) ) % this->gridSize);
+    for ( int i = top - this->gridSize; i <= bottom; i += this->gridSize )
+    {
+      if ( i - d <= clickedPoint.y( ) && clickedPoint.y( ) <= i + d )
+      {
+        y = i;
+        break;
+      }
+    }
+    //return this->convert( QPointF( x, y ) );
+    Point_2 res( x, y );
+    return res;
+  }
+
+  template < class CircularKernel >
+  Point_2 snapPoint(QGraphicsSceneMouseEvent* event,
+                    CGAL::Arr_circular_arc_traits_2<CircularKernel>
+                    /* traits */)
+  {
+    QPointF clickedPoint = event->scenePos( );
+    QRectF viewportRect = this->viewportRect( );
+    if ( viewportRect == QRectF( ) )
+    {
+      Kernel_point_2 res = this->convert( event->scenePos( ) );
+      return Point_2( res );
+    }
+
+    qreal d( this->gridSize / 2.0 );
+    int left = int( viewportRect.left( ) ) -
+      (int( viewportRect.left( ) ) % this->gridSize);
+    int right = int( viewportRect.right( ) ) +
+      (this->gridSize - int( viewportRect.right( ) ) % this->gridSize);
+    int x = int(clickedPoint.x( ));
+    int y = int(clickedPoint.y( ));
+    for ( int i = left - this->gridSize; i <= right; i += this->gridSize )
+    {
+      if ( i - d <= clickedPoint.x( ) && clickedPoint.x( ) <= i + d )
+      {
+        x = i;
+        break;
+      }
+    }
+    int top = int( viewportRect.top( ) ) -
+      (int( viewportRect.top( ) ) % this->gridSize);
+    int bottom = int( viewportRect.bottom( ) ) +
+      (this->gridSize - int( viewportRect.bottom( ) ) % this->gridSize);
+    for ( int i = top - this->gridSize; i <= bottom; i += this->gridSize )
+    {
+      if ( i - d <= clickedPoint.y( ) && clickedPoint.y( ) <= i + d )
+      {
+        y = i;
+        break;
+      }
+    }
+    //return this->convert( QPointF( x, y ) );
+    Kernel_point_2 res( x, y );
+    return Point_2( res );
+  }
+
+  void setGridSize( int size )
+  {
+    this->gridSize = size;
+  }
+
+protected:
+  int gridSize;
+  CGAL::Qt::Converter< Kernel > convert;
+}; // class SnapToGridStrategy
+
+template < class Arr_ >
+class SnapToArrangementVertexStrategy:
+  public SnapStrategy< typename Arr_::Geometry_traits_2 >
+{
+public:
+  typedef Arr_                                          Arrangement;
+  typedef typename Arrangement::Geometry_traits_2       Traits;
+  typedef typename ArrTraitsAdaptor< Traits >::Kernel   Kernel;
+  typedef SnapStrategy< Traits >                        Superclass;
+  typedef typename Arrangement::Vertex_iterator         Vertex_iterator;
+  typedef typename Kernel::Compute_squared_distance_2
+    Compute_squared_distance_2;
+  typedef typename Kernel::FT                           FT;
+  typedef typename Traits::Point_2                      Point_2;
+  typedef typename Kernel::Point_2                      Kernel_point_2;
+
+  SnapToArrangementVertexStrategy( ):
+    Superclass( NULL ),
+    arrangement( NULL )
+  { }
+
+  SnapToArrangementVertexStrategy( Arrangement* arr, QGraphicsScene* scene_ ):
+    Superclass( scene_ ),
+    arrangement( arr )
+  { }
+
+  Point_2 snapPoint( QGraphicsSceneMouseEvent* event )
+  {
+    Kernel_point_2 clickedPoint = this->convert( event->scenePos( ) );
+    return this->snapPoint( clickedPoint, Traits( ) );
+  }
+
+  template < class TTraits >
+  Point_2 snapPoint(const Kernel_point_2& clickedPoint, TTraits /* traits */)
+  {
+    Point_2 initialPoint( CGAL::to_double(clickedPoint.x()),
+                          CGAL::to_double(clickedPoint.y()) );
+    Point_2 closestPoint( CGAL::to_double(clickedPoint.x()),
+                          CGAL::to_double(clickedPoint.y()) );
+    bool first = true;
+    FT minDist( 0 );
+    QRectF viewportRect = this->viewportRect( );
+    if ( viewportRect == QRectF( ) )
+    {
+      return initialPoint;
+    }
+
+    FT maxDist( ( viewportRect.right( ) - viewportRect.left( ) ) / 4.0 );
+    for ( Vertex_iterator vit = this->arrangement->vertices_begin( );
+          vit != this->arrangement->vertices_end( ); ++vit )
+    {
+      Point_2 point = vit->point( );
+      Kernel_point_2 thisPoint( CGAL::to_double(point.x()),
+                                CGAL::to_double(point.y()) );
+      FT dist = this->compute_squared_distance_2( clickedPoint, thisPoint );
+      if ( first || ( dist < minDist ) )
+      {
+        first = false;
+        minDist = dist;
+        closestPoint = point;
+      }
+    }
+    if ( ! first && minDist < maxDist )
+    {
+      return closestPoint;
+    }
+    else
+    {
+      return initialPoint;
+    }
+  }
+
+  template < class CircularKernel >
+  Point_2 snapPoint(const Kernel_point_2& clickedPoint,
+                    CGAL::Arr_circular_arc_traits_2<CircularKernel>
+                    /* traits */)
+  {
+    typedef Kernel_point_2 Non_arc_point_2;
+    typedef typename CircularKernel::Circular_arc_point_2 Arc_point_2;
+
+    Non_arc_point_2 closestKernelPoint = clickedPoint;
+    Arc_point_2 closestPoint( closestKernelPoint );
+    bool first = true;
+    FT minDist( 0 );
+    QRectF viewportRect = this->viewportRect( );
+    if ( viewportRect == QRectF( ) )
+    {
+      return clickedPoint;
+    }
+
+    FT maxDist( ( viewportRect.right( ) - viewportRect.left( ) ) / 4.0 );
+    for ( Vertex_iterator vit = this->arrangement->vertices_begin( );
+          vit != this->arrangement->vertices_end( ); ++vit )
+    {
+      Arc_point_2 point = vit->point( );
+      Non_arc_point_2 point2( CGAL::to_double(point.x( )),
+                              CGAL::to_double(point.y()) );
+      FT dist = this->compute_squared_distance_2( clickedPoint, point2 );
+      if ( first || ( dist < minDist ) )
+      {
+        first = false;
+        minDist = dist;
+        //closestPoint = point2;
+        closestPoint = point;
+      }
+    }
+    if ( ! first && minDist < maxDist )
+    {
+      return closestPoint;
+    }
+    else
+    {
+      return clickedPoint;
+    }
+  }
+
+  void setArrangement( Arrangement* arr )
+  {
+    this->arrangement = arr;
+  }
+
+protected:
+  Arrangement* arrangement;
+  Compute_squared_distance_2 compute_squared_distance_2;
+  CGAL::Qt::Converter< Kernel > convert;
+}; // class SnapToArrangementVertexStrategy
+
+/**
+   Converts between Kernel points and Arrangement points.
+
+   The conversion is not necessarily exact.
+*/
+template < class ArrTraits >
+class Arr_construct_point_2
+{
+  typedef typename ArrTraits::Point_2                            Point_2;
+  typedef typename ArrTraitsAdaptor< ArrTraits >::CoordinateType CoordinateType;
+  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel         Kernel;
+  typedef typename Kernel::Point_2                               Kernel_point_2;
+
+public:
+  Point_2 operator()( const Kernel_point_2& pt )
+  {
+    return (*this)( pt.x(), pt.y() );
+  }
+
+  template < class T >
+  Point_2 operator()( const T& x, const T& y )
+  {
+    return (*this)( x, y, ArrTraits( ) );
+  }
+
+protected:
+  template < class T, class TTraits >
+  Point_2 operator()(const T& x, const T& y, TTraits /* traits */)
+  {
+    CoordinateType xx( x );
+    CoordinateType yy( y );
+    Point_2 res( xx, yy );
+    return res;
+  }
+
+  template < class T, class CircularKernel >
+  Point_2 operator()(const T& x, const T& y,
+                     CGAL::Arr_circular_arc_traits_2<CircularKernel>
+                     /* traits */)
+  {
+    typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2;
+    CoordinateType xx( x );
+    CoordinateType yy( y );
+    Root_for_circles_2_2 p( xx, yy );
+    Point_2 res( p );
+    return res;
+  }
+};
+
+class Find_nearest_edge_base : public QGraphicsSceneMixin
+{
+public:
+  /*! Destructor (virtual) */
+  virtual ~Find_nearest_edge_base() {}
+};
+
+template < class Arr_, class ArrTraits = typename Arr_::Geometry_traits_2 >
+class Find_nearest_edge : public Find_nearest_edge_base
+{
+public: // typedefs
+  typedef Arr_ Arrangement;
+  //typedef typename Arrangement::Geometry_traits_2 ArrTraits;
+  typedef Compute_squared_distance_2< ArrTraits > Point_curve_distance;
+  typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
+  typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
+                                                        Point_location_strategy;
+  typedef typename ArrTraitsAdaptor<ArrTraits>::Kernel  Kernel;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Arrangement::Face_const_handle       Face_const_handle;
+  typedef typename Arrangement::Halfedge_const_handle   Halfedge_const_handle;
+  typedef typename Arrangement::Vertex_const_handle     Vertex_const_handle;
+  typedef typename Arrangement::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Point_curve_distance::FT             FT;
+  typedef typename Arrangement::Hole_const_iterator     Hole_const_iterator;
+  typedef typename Arrangement::Halfedge_around_vertex_const_circulator
+    Halfedge_around_vertex_const_circulator;
+
+public:
+  /*! constructor */
+  Find_nearest_edge( Arrangement* arr_ ) :
+    Find_nearest_edge_base( ),
+    arr( arr_ ),
+    pointLocationStrategy( Point_location_strategy( *arr_ ) )
+  { }
+
+  /*! Destructor (virtual) */
+  virtual ~Find_nearest_edge() {}
+
+public: // member methods
+  Halfedge_const_handle operator()( const Point_2& queryPt )
+  {
+    typename ArrTraits::Point_2 pt = this->toArrPoint( queryPt );
+    CGAL::Object pointLocationResult = this->pointLocationStrategy.locate( pt );
+    Face_const_handle face = this->getFace( pointLocationResult );
+    bool first = 1;
+    X_monotone_curve_2 closestCurve;
+    Halfedge_const_handle closestEdge;
+    double minDist( 0 );
+
+    if ( ! face->is_unbounded( ) )
+    { // it is an interior face so it has a ccb
+      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
+      do
+      {
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+      }
+      while ( ++cc != face->outer_ccb( ) );
+    }
+#if 0 // we can't do this with bounded arrangements
+    else
+    {
+      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
+      do
+      {
+        if ( cc->is_fictitious( ) )
+        {
+          continue;
+        }
+
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+      }
+      while ( ++cc != face->outer_ccb( ) );
+    }
+#endif
+    Hole_const_iterator hit;
+    Hole_const_iterator eit = face->holes_end( );
+    // int counter = 0;
+    for ( hit = face->holes_begin( ); hit != eit; ++hit )
+    { // check any holes inside this face
+      Ccb_halfedge_const_circulator cc = *hit;
+      do
+      {
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+        cc++;
+      }
+      while ( cc != *hit );
+    }
+
+    return closestEdge;
+  }
+
+  virtual void setScene( QGraphicsScene* scene_ )
+  {
+    this->pointCurveDistance.setScene( scene_ );
+    Find_nearest_edge_base::setScene( scene_ );
+  }
+
+protected: // member methods
+  Face_const_handle getFace( const CGAL::Object& obj )
+  {
+    Face_const_handle f;
+    if ( CGAL::assign( f, obj ) )
+      return f;
+
+    Halfedge_const_handle he;
+    if (CGAL::assign( he, obj ))
+      return (he->face( ));
+
+    Vertex_const_handle v;
+    CGAL_assertion(CGAL::assign( v, obj ));
+    CGAL::assign( v, obj );
+    if ( v->is_isolated( ) )
+      return v->face( );
+    Halfedge_around_vertex_const_circulator eit = v->incident_halfedges( );
+    return  (eit->face( ));
+  }
+
+protected: // member fields
+  Arrangement* arr;
+  Point_curve_distance pointCurveDistance;
+  Point_location_strategy pointLocationStrategy;
+  Arr_construct_point_2< ArrTraits > toArrPoint;
+
+}; // class Find_nearest_edge
+
+#if 0
+template < class Arr_, class Coefficient_ >
+class Find_nearest_edge<Arr_, CGAL::Arr_algebraic_segment_traits_2<
+                                Coefficient_> >: public Find_nearest_edge_base
+{
+public:
+  Halfedge_const_handle operator()( const Point_2& queryPt ) { }
+};
+#endif
+
+template < class Arr_, class Kernel_ >
+class Find_nearest_edge< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > > :
+  public Find_nearest_edge_base
+{
+public: // typedefs
+  typedef Arr_ Arrangement;
+  typedef typename Arrangement::Geometry_traits_2       ArrTraits;
+  typedef Compute_squared_distance_2< ArrTraits >       Point_curve_distance;
+  typedef typename ArrTraits::X_monotone_curve_2        X_monotone_curve_2;
+  typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
+                                                        Point_location_strategy;
+  typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Arrangement::Face_const_handle       Face_const_handle;
+  typedef typename Arrangement::Halfedge_const_handle   Halfedge_const_handle;
+  typedef typename Arrangement::Vertex_const_handle     Vertex_const_handle;
+  typedef typename Arrangement::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Point_curve_distance::FT             FT;
+  typedef typename Arrangement::Hole_const_iterator     Hole_const_iterator;
+  typedef typename Arrangement::Halfedge_around_vertex_const_circulator
+    Halfedge_around_vertex_const_circulator;
+
+public: // constructors
+  Find_nearest_edge( Arrangement* arr_ ) :
+    Find_nearest_edge_base( ),
+    arr( arr_ ),
+    pointLocationStrategy( Point_location_strategy( *arr_ ) )
+  { }
+
+public: // member methods
+  Halfedge_const_handle operator()( const Point_2& queryPt )
+  {
+    CGAL::Object pointLocationResult =
+      this->pointLocationStrategy.locate( queryPt );
+    Face_const_handle face = this->getFace( pointLocationResult );
+    bool first = 1;
+    X_monotone_curve_2 closestCurve;
+    Halfedge_const_handle closestEdge;
+    double minDist( 0 );
+
+    if ( ! face->is_unbounded( ) )
+    { // it is an interior face so it has a ccb
+      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
+      do
+      {
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+      }
+      while ( ++cc != face->outer_ccb( ) );
+    }
+    else
+    {
+      Ccb_halfedge_const_circulator cc = face->outer_ccb( );
+      do
+      {
+        if ( cc->is_fictitious( ) )
+        {
+          continue;
+        }
+
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+      }
+      while ( ++cc != face->outer_ccb( ) );
+    }
+    Hole_const_iterator hit;
+    Hole_const_iterator eit = face->holes_end( );
+    for ( hit = face->holes_begin( ); hit != eit; ++hit )
+    { // check any holes inside this face
+      Ccb_halfedge_const_circulator cc = *hit;
+      do
+      {
+        X_monotone_curve_2 curve = cc->curve( );
+        double dist = this->pointCurveDistance( queryPt, curve );
+        if ( first || dist < minDist )
+        {
+          first = 0;
+          minDist = dist;
+          closestEdge = cc;
+        }
+        cc++;
+      }
+      while ( cc != *hit );
+    }
+
+    return closestEdge;
+  }
+
+protected: // member methods
+  Face_const_handle getFace( const CGAL::Object& obj )
+  {
+    Face_const_handle f;
+    if ( CGAL::assign( f, obj ) )
+      return f;
+
+    Halfedge_const_handle he;
+    if (CGAL::assign( he, obj ))
+      return (he->face( ));
+
+    Vertex_const_handle v;
+    CGAL_assertion(CGAL::assign( v, obj ));
+    CGAL::assign( v, obj );
+    if ( v->is_isolated( ) )
+      return v->face( );
+    Halfedge_around_vertex_const_circulator eit = v->incident_halfedges( );
+    return  (eit->face( ));
+  }
+
+protected: // member fields
+  Arrangement* arr;
+  Point_curve_distance pointCurveDistance;
+  Point_location_strategy pointLocationStrategy;
+}; // class Find_nearest_edge
+
+#endif // CGAL_ARRANGEMENTS_DEMO_UTILS_H
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayShootCallback.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayShootCallback.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayShootCallback.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayShootCallback.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayShootCallback.h b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayShootCallback.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/VerticalRayShootCallback.h
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/VerticalRayShootCallback.h
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/arrangement_2.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/arrangement_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/arrangement_2.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/arrangement_2.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/alg_circle.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/alg_circle.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/alg_circle.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/alg_circle.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/cubic.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/cubic.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/cubic.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/cubic.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/erdos_lemiscate.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/erdos_lemiscate.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/erdos_lemiscate.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/erdos_lemiscate.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/infinitesimal.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/infinitesimal.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/infinitesimal.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/infinitesimal.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/trifolium.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/trifolium.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/algebraic/trifolium.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/algebraic/trifolium.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.arr b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.arr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.arr
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.arr
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/big_circ_arcs.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/circles_21.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/circles_21.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/conic/circles_21.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/conic/circles_21.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/ps_circs.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/ps_circs.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/ps_circs.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/ps_circs.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/random_polylines_10_20.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/random_polylines_10_20.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/random_polylines_10_20.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/random_polylines_10_20.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/sines.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/sines.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/polyline/sines.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/polyline/sines.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/fork0505_mc.seg.rand.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/fork0505_mc.seg.rand.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/fork0505_mc.seg.rand.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/fork0505_mc.seg.rand.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/non_degenerate_100_x.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/non_degenerate_100_x.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/non_degenerate_100_x.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/non_degenerate_100_x.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_100.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_100.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_100.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_100.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_100_x.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_100_x.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_100_x.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_100_x.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_250_x.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_250_x.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/onebig_250_x.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/onebig_250_x.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/polygon_100.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/polygon_100.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/polygon_100.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/polygon_100.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_100.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_100.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_100.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_100.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_100_x.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_100_x.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_100_x.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_100_x.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_500_x.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_500_x.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/random_segments_500_x.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/random_segments_500_x.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/tilt_grid_200.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/tilt_grid_200.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/tilt_grid_200.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/tilt_grid_200.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/world.seg.cut.rand.dat b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/world.seg.cut.rand.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/data/segment/world.seg.cut.rand.dat
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/data/segment/world.seg.cut.rand.dat
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/help/about.html b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/help/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/help/about.html
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/help/about.html
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/help/index.html b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/help/index.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/help/index.html
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/help/index.html
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/blue_icon.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/blue_icon.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/blue_icon.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/blue_icon.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/conic.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/conic.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/conic.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/conic.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/conic_types.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/conic_types.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/conic_types.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/conic_types.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/delete.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/delete.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/delete.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/delete.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_arrow_down.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_arrow_down.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_arrow_down.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_arrow_down.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_arrow_up.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_arrow_up.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_arrow_up.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_arrow_up.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_colors.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_colors.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_colors.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_colors.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_3points.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_3points.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_3points.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_3points.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_5points.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_5points.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_5points.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_5points.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_circle.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_circle.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_circle.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_circle.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_ellipse.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_ellipse.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_ellipse.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_ellipse.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_line.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_line.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_line.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_line.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_ray.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_ray.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_ray.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_ray.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_segment.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_segment.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_conic_segment.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_conic_segment.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_delete.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_delete.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_delete.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_delete.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_delete.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_delete.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_delete.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_delete.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_fill.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_fill.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_fill.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_fill.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_insert.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_insert.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_insert.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_insert.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_insert.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_insert.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_insert.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_insert.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_merge.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_merge.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_merge.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_merge.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_merge.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_merge.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_merge.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_merge.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_pointlocation.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_pointlocation.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_pointlocation.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_pointlocation.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_pointlocation.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_pointlocation.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_pointlocation.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_pointlocation.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot_down.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot_down.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot_down.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot_down.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot_up.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot_up.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_rayshoot_up.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_rayshoot_up.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapgrid.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapgrid.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapgrid.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapgrid.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapgrid.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapgrid.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapgrid.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapgrid.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapvertex.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapvertex.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapvertex.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapvertex.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapvertex.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapvertex.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_snapvertex.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_snapvertex.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_split.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_split.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_split.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_split.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_split.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_split.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_split.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_split.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomin.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomin.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomin.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomin.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomin.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomin.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomin.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomin.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomout.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomout.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomout.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomout.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomout.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomout.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/demo_zoomout.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/demo_zoomout.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/draw.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/draw.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/draw.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/draw.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/green_icon.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/green_icon.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/green_icon.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/green_icon.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/grid.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/grid.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/grid.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/grid.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/hand.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/hand.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/hand.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/hand.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/insert.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/insert.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/insert.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/insert.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/lower_env_xpm.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/lower_env_xpm.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/lower_env_xpm.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/lower_env_xpm.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/lower_env_xpm.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/lower_env_xpm.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/lower_env_xpm.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/lower_env_xpm.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/merge.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/merge.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/merge.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/merge.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/none.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/none.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/none.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/none.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/po.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/po.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/po.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/po.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/points.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/points.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/points.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/points.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/polyline.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/polyline.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/polyline.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/polyline.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/ray_shooting.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/ray_shooting.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/ray_shooting.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/ray_shooting.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/ray_shooting2.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/ray_shooting2.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/ray_shooting2.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/ray_shooting2.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/red_icon.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/red_icon.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/red_icon.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/red_icon.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/snap.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/snap.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/snap.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/snap.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/split.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/split.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/split.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/split.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/upper_env_xpm.bmp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/upper_env_xpm.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/upper_env_xpm.bmp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/upper_env_xpm.bmp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/upper_env_xpm.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/upper_env_xpm.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/upper_env_xpm.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/upper_env_xpm.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/voronoi.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/voronoi.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/voronoi.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/voronoi.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/yellow_icon.xpm b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/yellow_icon.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/icons/yellow_icon.xpm
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/icons/yellow_icon.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/CMakeLists.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/CMakeLists.txt
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/CMakeLists.txt
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/Test.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/Test.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/Test.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/Test.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/TestAlgebraic.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/TestAlgebraic.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/TestAlgebraic.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/TestAlgebraic.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/TestRayPL.cpp b/3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/TestRayPL.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Arrangement_on_surface_2/tests/TestRayPL.cpp
rename to 3rdparty/CGAL-4.8/demo/Arrangement_on_surface_2/tests/TestRayPL.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.cpp b/3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.cpp
new file mode 100644
index 0000000..884029f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.cpp
@@ -0,0 +1,550 @@
+#include <fstream>
+#include <cmath>
+
+// CGAL headers
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Min_circle_2.h>
+#include <CGAL/Min_circle_2_traits_2.h>
+#include <CGAL/Min_ellipse_2.h>
+#include <CGAL/Min_ellipse_2_traits_2.h>
+#include <CGAL/convex_hull_2.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/min_quadrilateral_2.h>
+#include <CGAL/rectangular_p_center_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QGraphicsEllipseItem>
+#include <QGraphicsRectItem>
+
+// GraphicsView items and event filters (input classes)
+
+#include <CGAL/Qt/PointsGraphicsItem.h>
+#include <CGAL/Qt/PolygonGraphicsItem.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+
+// the two base classes
+#include "ui_Bounding_volumes.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+#include "Ellipse.h"
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Vector_2 Vector_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef CGAL::Polygon_2<K> Polygon_2;
+
+typedef CGAL::Min_circle_2<CGAL::Min_circle_2_traits_2<K> > Min_circle;
+typedef CGAL::Min_ellipse_2<CGAL::Min_ellipse_2_traits_2<K> > Min_ellipse;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Bounding_volumes
+{
+  Q_OBJECT
+  
+private:  
+  Polygon_2 convex_hull, min_rectangle, min_parallelogram;
+  Min_circle mc; 
+  Min_ellipse me;
+  QGraphicsScene scene;  
+
+  std::vector<Point_2> points; 
+  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
+  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * convex_hull_gi;
+  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * min_rectangle_gi;
+  CGAL::Qt::PolygonGraphicsItem<Polygon_2> * min_parallelogram_gi;
+  QGraphicsEllipseItem *cgi, *egi;
+
+  const std::size_t P;
+  QGraphicsRectItem *p_center[3];
+  Iso_rectangle_2 p_center_iso_rectangle[3];
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void update();
+
+  void update_from_points();
+
+  void processInput(CGAL::Object o);
+
+  void on_actionShowMinCircle_toggled(bool checked);
+
+  void on_actionShowMinEllipse_toggled(bool checked);
+
+  void on_actionShowMinRectangle_toggled(bool checked);
+
+  void on_actionShowMinParallelogram_toggled(bool checked);
+
+  void on_actionShowConvexHull_toggled(bool checked);
+
+  void on_actionShowPCenter_toggled(bool checked);
+
+  void on_actionInsertPoint_toggled(bool checked);
+  
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  virtual void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow(), P(3)
+{
+  setupUi(this);
+
+  QObject::connect(this, SIGNAL(changed()), this, SLOT(update()));
+
+  // Add a GraphicItem for the Min_circle
+  cgi = new QGraphicsEllipseItem;
+  cgi->setPen(QPen(Qt::red, 0, Qt::SolidLine));
+  cgi->hide();
+  scene.addItem(cgi);
+  
+  egi = new QGraphicsEllipseItem;
+  egi->setPen(QPen(Qt::magenta, 0, Qt::SolidLine));
+  egi->hide();
+  scene.addItem(egi);
+  
+  for(std::size_t i =0; i < P; i++){
+    p_center[i] = new QGraphicsRectItem;
+    p_center[i]->setPen(QPen(Qt::cyan, 0, Qt::SolidLine));
+    p_center[i]->hide(); 
+    scene.addItem(p_center[i]);
+  }
+
+  // Graphics Item for the input point set
+  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pgi, SLOT(modelChanged()));
+  pgi->setVerticesPen(QPen(Qt::black, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(pgi);
+
+
+  // Graphics Item for the convex hull
+  convex_hull_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&convex_hull);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   convex_hull_gi, SLOT(modelChanged()));
+  convex_hull_gi->setEdgesPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(convex_hull_gi);
+
+
+  // Graphics Item for the min rectangle
+  min_rectangle_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&min_rectangle);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   min_rectangle_gi, SLOT(modelChanged()));
+  min_rectangle_gi->setEdgesPen(QPen(Qt::green, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(min_rectangle_gi);
+
+
+  // Graphics Item for the min parallelogram
+  min_parallelogram_gi = new CGAL::Qt::PolygonGraphicsItem<Polygon_2>(&min_parallelogram);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   min_parallelogram_gi, SLOT(modelChanged()));
+  min_parallelogram_gi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(min_parallelogram_gi);
+
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1);
+
+  scene.installEventFilter(pi);
+
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Bounding_volumes.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+void
+MainWindow::update()
+{
+  if(this->actionShowConvexHull->isChecked()){
+    convex_hull_gi->show();
+  }else {
+    convex_hull_gi->hide();
+  }
+
+  if(this->actionShowMinRectangle->isChecked()){
+    min_rectangle_gi->show();
+  }else {
+    min_rectangle_gi->hide();
+  }
+
+
+  if(this->actionShowMinParallelogram->isChecked()){
+    min_parallelogram_gi->show();
+  }else {
+    min_parallelogram_gi->hide();
+  }
+
+  CGAL::Qt::Converter<K> convert;  
+
+  if(this->actionShowPCenter->isChecked() && convex_hull.size()>=3){
+    for(std::size_t i=0; i< P; i++){
+      p_center[i]->setRect(convert(p_center_iso_rectangle[i]));
+      p_center[i]->show();
+    }
+  }
+
+  if (mc.is_degenerate() || (! this->actionShowMinCircle->isChecked())){
+    cgi->hide();
+  } else {
+    K::Circle_2 c;
+    if (mc.number_of_support_points() == 2) 
+      c = K::Circle_2(mc.support_point(0), mc.support_point(1));
+    else
+      c = K::Circle_2(mc.support_point(0), mc.support_point(1), mc.support_point(2));
+    
+
+    cgi->setRect(convert(c.bbox()));
+    cgi->show();
+  }
+
+  if (me.is_degenerate()  || (! this->actionShowMinEllipse->isChecked()) ){
+    egi->hide();
+  } else {
+    if (me.number_of_support_points() == 2) {
+    } else {
+      Ellipse_2<K> e(me);
+      double half_width = sqrt(e.va() * e.va());
+      double half_height = sqrt(e.vb() * e.vb());
+      double angle = std::atan2( e.va().y(), e.va().x() ) * 180.0/CGAL_PI;
+      Vector_2 wh(half_width, half_height);
+
+      Iso_rectangle_2 isor(e.center()+ wh, e.center()-wh);
+      egi->setRect(convert(isor));
+      // Rotate an item 45 degrees around (x, y).
+      double x = e.center().x();
+      double y = e.center().y();
+      egi->setTransform(QTransform().translate(x, y).rotate(angle).translate(-x, -y));
+      egi->show();
+    } 
+  }
+}
+
+
+void
+MainWindow::update_from_points()
+{
+    convex_hull.clear();
+    CGAL::convex_hull_2(points.begin(), points.end(), std::back_inserter(convex_hull));
+   
+    min_rectangle.clear();
+    CGAL::min_rectangle_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_rectangle));
+ 
+    min_parallelogram.clear();
+    CGAL::min_parallelogram_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_parallelogram));
+
+    std::vector<Point_2> center;
+    double radius;
+
+    CGAL::rectangular_p_center_2 (points.begin(), points.end(), std::back_inserter(center), radius, static_cast<int>(P));
+    Vector_2 rvec(radius, radius);
+
+    for(std::size_t i = 0; i < center.size(); i++){
+      p_center_iso_rectangle[i] = Iso_rectangle_2(center[i]-rvec, center[i]+rvec);
+    }
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::list<Point_2> input;
+  if(CGAL::assign(input, o)){
+    Point_2 p = input.front();
+    
+    mc.insert(p);
+    me.insert(p);
+    points.push_back(p);
+
+    convex_hull.push_back(p);
+    Polygon_2 tmp;
+    CGAL::convex_hull_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(tmp));
+    convex_hull = tmp;
+
+    min_rectangle.clear();
+    CGAL::min_rectangle_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_rectangle));
+ 
+    min_parallelogram.clear();
+    CGAL::min_parallelogram_2(convex_hull.vertices_begin(), convex_hull.vertices_end(), std::back_inserter(min_parallelogram));
+    
+    std::vector<Point_2> center;
+    double radius;
+    if (points.size()>=P){
+      CGAL::rectangular_p_center_2 (points.begin(), points.end(), std::back_inserter(center), radius, static_cast<int>(P));
+      Vector_2 rvec(radius, radius);
+
+      for(std::size_t i=0; i < center.size(); i++){
+        p_center_iso_rectangle[i] = Iso_rectangle_2(center[i]-rvec, center[i]+rvec);
+      }
+    }
+  }
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPoint_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+  } else {
+    scene.removeEventFilter(pi);
+  }
+}
+
+
+void
+MainWindow::on_actionShowMinCircle_toggled(bool checked)
+{
+  cgi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionShowMinEllipse_toggled(bool checked)
+{
+  egi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionShowMinRectangle_toggled(bool checked)
+{
+  min_rectangle_gi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionShowMinParallelogram_toggled(bool checked)
+{
+  min_parallelogram_gi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionShowConvexHull_toggled(bool checked)
+{
+  convex_hull_gi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionShowPCenter_toggled(bool checked)
+{
+  for(std::size_t i =0; i < P; i++){
+    p_center[i]->setVisible(checked);
+  }
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  mc.clear();
+  me.clear();
+  points.clear();
+  convex_hull.clear();
+  min_rectangle.clear();
+  min_parallelogram.clear();
+  for(std::size_t i=0; i < P;i++){
+    p_center[i]->hide();
+  }
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;  
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     100,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  for(int i = 0; i < number_of_points; ++i){
+    Point_2 p = *pg++;
+    mc.insert(p);
+    me.insert(p);
+    points.push_back(p);
+  }
+
+  update_from_points();
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  while(ifs >> p) {
+    mc.insert(p);
+    me.insert(p);
+    points.push_back(p);
+  }
+  update_from_points();
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    for(Min_circle::Point_iterator  
+          vit = mc.points_begin(),
+          end = mc.points_end();
+        vit!= end; ++vit)
+    {
+      ofs << *vit << std::endl;
+    }
+  }
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(cgi->boundingRect());
+  this->graphicsView->fitInView(cgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Bounding_volumes.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Bounding_volumes demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.qrc b/3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.qrc
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.ui b/3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/Bounding_volumes.ui
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/Bounding_volumes.ui
diff --git a/3rdparty/CGAL-4.8/demo/Bounding_volumes/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Bounding_volumes/CMakeLists.txt
new file mode 100644
index 0000000..94b2153
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Bounding_volumes/CMakeLists.txt
@@ -0,0 +1,53 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Bounding_volumes)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+include_directories (BEFORE ../../../Matrix_search/include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+#----------------------------------------------
+# The "Bounding volumes" demo: Bounding_volumes
+#----------------------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Bounding_volumes.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Bounding_volumes.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_volumes.moc" )
+
+# The executable itself.
+add_executable  ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Bounding_volumes Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Bounding_volumes )
+
+# Link with Qt libraries
+target_link_libraries( Bounding_volumes ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/Ellipse.h b/3rdparty/CGAL-4.8/demo/Bounding_volumes/Ellipse.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/Ellipse.h
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/Ellipse.h
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/about_Bounding_volumes.html b/3rdparty/CGAL-4.8/demo/Bounding_volumes/about_Bounding_volumes.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/about_Bounding_volumes.html
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/about_Bounding_volumes.html
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/convex_hull.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/convex_hull.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/convex_hull.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/convex_hull.png
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_circle.pdf b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_circle.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_circle.pdf
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_circle.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_circle.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_circle.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_circle.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_circle.png
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_ellipse.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_ellipse.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_ellipse.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_ellipse.png
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_parallelogram.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_parallelogram.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_parallelogram.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_parallelogram.png
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_quadrilateral.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_quadrilateral.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/min_quadrilateral.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/min_quadrilateral.png
diff --git a/3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/p_center.png b/3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/p_center.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Bounding_volumes/icons/p_center.png
rename to 3rdparty/CGAL-4.8/demo/Bounding_volumes/icons/p_center.png
diff --git a/3rdparty/CGAL-4.8/demo/CGAL_ipelets/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/CMakeLists.txt
new file mode 100644
index 0000000..d598d66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/CMakeLists.txt
@@ -0,0 +1,151 @@
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+macro( remove_leading_zero var )
+  string(SUBSTRING "${${var}}" 0 1 ONECHAR)
+  string(COMPARE EQUAL "${ONECHAR}" "0" ISZERO)
+  if (${ISZERO})
+    string(SUBSTRING "${${var}}" 1 1 ONECHAR)
+    set(${var} ${ONECHAR})
+  endif()
+endmacro()
+
+
+
+#path where to build libraries
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+find_package(CGAL QUIET COMPONENTS Core)
+
+if ( CGAL_FOUND )
+  include( ${CGAL_USE_FILE} )
+
+  find_package(IPE)
+
+  if ( IPE_FOUND )
+    include_directories(BEFORE ${IPE_INCLUDE_DIR})
+
+    #check IPE version
+    FILE(READ "${IPE_INCLUDE_DIR}/ipebase.h" IPEBASE_H)
+    STRING(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([67])([0-9][0-9])([0-9][0-9]);" FOUND_IPE_VERSION "${IPEBASE_H}")
+    if (FOUND_IPE_VERSION)
+      set(IPE_VERSION ${CMAKE_MATCH_1})
+      set(IPE_MINOR_VERSION_1 ${CMAKE_MATCH_2})
+      set(IPE_MINOR_VERSION_2 ${CMAKE_MATCH_3})
+
+      if (${IPE_VERSION} EQUAL "7")
+        set(WITH_IPE_7 ON)
+      elseif(${IPE_VERSION} EQUAL "6")
+        set(WITH_IPE_7 OFF)
+      else()
+        message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).")
+        set(IPE_FOUND FALSE)
+      endif()
+      # starting ipe 7.2.1, a compiler with c++11 must be used to compile ipelets
+      if (${IPE_VERSION} EQUAL "7" AND
+          ${IPE_MINOR_VERSION_1} GREATER "1" AND
+          ${IPE_MINOR_VERSION_2} GREATER "0")
+        message(STATUS "Starting from Ipe 7.2.1 a compiler with c++11 support must be used")
+        include(CheckCXXCompilerFlag)
+        CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+        CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+        if(COMPILER_SUPPORTS_CXX11)
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+        elseif(COMPILER_SUPPORTS_CXX0X)
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+        endif()
+      endif()
+    endif()
+  endif()
+
+  if ( IPE_FOUND AND IPE_VERSION)
+    if (WITH_IPE_7)
+      add_definitions(-DCGAL_USE_IPE_7)
+    endif()
+    
+    message("-- Using IPE version ${IPE_VERSION} compatibility.") 
+    
+    #setting installation directory
+    get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH)
+    if (IPE_FOUND AND NOT IPELET_INSTALL_DIR)
+      if (WITH_IPE_7)
+        remove_leading_zero(IPE_MINOR_VERSION_1)
+        remove_leading_zero(IPE_MINOR_VERSION_2)
+        set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/")
+        find_path(IPELET_INSTALL_DIR 
+                      NAMES libgoodies.lua goodies.lua
+                      PATHS ${INSTALL_PATHS}
+                      DOC "The folder where ipelets will be installed"
+                      ENV IPELETPATH
+                     )
+      else()
+        foreach (VER RANGE 28 40)
+        string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" )
+        set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
+        endforeach()
+        set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC})
+        set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib64/ipe/6.0/ipelets)
+        set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib/ipe/6.0/ipelets)
+
+
+        find_library(IPELET_INSTALL_DIR_FILES 
+                      NAMES align
+                      PATHS ${INSTALL_PATHS}
+                            ENV IPELETPATH
+                    )
+        if (IPELET_INSTALL_DIR_FILES)
+          get_filename_component(IPELET_INSTALL_DIR ${IPELET_INSTALL_DIR_FILES} PATH)
+        endif()                
+      endif()
+    endif()
+
+    set(CGAL_IPELETS ${CGAL_IPELETS})
+    set(CGAL_IPELETS ${CGAL_IPELETS} alpha_shapes)
+    set(CGAL_IPELETS ${CGAL_IPELETS} arrangement)
+    set(CGAL_IPELETS ${CGAL_IPELETS} bbox_restriction)
+    set(CGAL_IPELETS ${CGAL_IPELETS} diagrams)
+    set(CGAL_IPELETS ${CGAL_IPELETS} hilbert_sort)
+    set(CGAL_IPELETS ${CGAL_IPELETS} hull)
+    set(CGAL_IPELETS ${CGAL_IPELETS} generator)
+    set(CGAL_IPELETS ${CGAL_IPELETS} mesh_2)
+    set(CGAL_IPELETS ${CGAL_IPELETS} minkowski)
+    set(CGAL_IPELETS ${CGAL_IPELETS} multi_delaunay)
+    set(CGAL_IPELETS ${CGAL_IPELETS} multi_regular)
+    set(CGAL_IPELETS ${CGAL_IPELETS} partition)
+    set(CGAL_IPELETS ${CGAL_IPELETS} pca)    
+    set(CGAL_IPELETS ${CGAL_IPELETS} skeleton)
+    set(CGAL_IPELETS ${CGAL_IPELETS} svdlinf)
+    set(CGAL_IPELETS ${CGAL_IPELETS} triangulation)
+    set(CGAL_IPELETS ${CGAL_IPELETS} circle_pencils)
+    set(CGAL_IPELETS ${CGAL_IPELETS} hyperbolic)
+    set(CGAL_IPELETS ${CGAL_IPELETS} distance)
+
+
+    if ( IPELET_INSTALL_DIR )
+      message(STATUS "Set Ipelets install dir: ${IPELET_INSTALL_DIR}")
+    endif()
+
+    foreach(IPELET ${CGAL_IPELETS})
+      add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp)
+      add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET})
+      target_link_libraries(CGAL_${IPELET} ${IPE_LIBRARIES})
+      if ( IPELET_INSTALL_DIR )
+        install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR})
+        if (WITH_IPE_7)
+          install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7
+        endif()
+      endif ()
+    endforeach(IPELET)
+    #example in doc not installed
+    add_library(simple_triangulation MODULE simple_triangulation.cpp)
+    add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation)
+    target_link_libraries(simple_triangulation ${IPE_LIBRARIES})
+
+  else()
+    message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
+  endif()
+else()
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/alpha_shapes.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/alpha_shapes.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/alpha_shapes.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/alpha_shapes.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/arrangement.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/arrangement.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/arrangement.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/arrangement.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/bbox_restriction.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/bbox_restriction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/bbox_restriction.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/bbox_restriction.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/circle_pencils.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/circle_pencils.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/circle_pencils.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/circle_pencils.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/diagrams.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/diagrams.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/diagrams.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/diagrams.cpp
diff --git a/3rdparty/CGAL-4.8/demo/CGAL_ipelets/distance.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/distance.cpp
new file mode 100644
index 0000000..e050257
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/distance.cpp
@@ -0,0 +1,104 @@
+// Copyright (c) 2013  INRIA Sophia Antipolis -  Mediterranee,  (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Olivier Devillers
+
+
+#include <CGAL/Exact_circular_kernel_2.h>
+
+#include <CGAL/CGAL_Ipelet_base.h> 
+#include <CGAL/Object.h>
+
+
+ 
+#include <CGAL/Cartesian.h>
+namespace CGAL_distance_ipelet{
+
+
+typedef CGAL::Exact_circular_kernel_2 Kernel;
+
+// --------------------------------------------------------------------
+
+const std::string sublabel[] = {
+  "2 marks",
+  "2 marks (cm)"
+  "2 marks (inch)"
+  "Help"
+};
+
+const std::string helpmsg[] = {
+  "Distance between two marks in ipe screen pts",
+  "Distance between two marks in centimeters when printed",
+  "Distance between two marks in inches when printed",
+};
+
+class distanceIpelet 
+  : public CGAL::Ipelet_base<Kernel,4> {
+public:
+  distanceIpelet() 
+    :CGAL::Ipelet_base<Kernel,4>("Distance",sublabel,helpmsg){}
+  void protected_run(int);
+};
+// --------------------------------------------------------------------
+
+void distanceIpelet::protected_run(int fn)
+{
+  if (fn==3) {
+    show_help();
+    return;
+  } 
+  
+  std::list<Point_2> pt_list;
+
+  int i=get_IpePage()->primarySelection(); 
+
+  if (i<0) {
+    print_error_message(("Nothing selected"));
+    return;
+  }
+
+  Iso_rectangle_2 bbox=
+  read_active_objects(
+		      CGAL::dispatch_or_drop_output<Point_2>(
+      std::back_inserter(pt_list)
+    )
+  );
+
+  if (pt_list.empty()) {print_error_message(("No mark selected")); return;}
+  std::list<Point_2>::iterator it=pt_list.begin();
+  Point_2 p1=*it; ++it;
+  if (pt_list.end()==it) {
+    print_error_message(("Only one mark selected")); return;}
+  Point_2 p2=*it; ++it;
+  if (pt_list.end()!=it) {
+    print_error_message(("More than two marks selected")); return;}
+
+  double length = sqrt( CGAL::to_double(CGAL::squared_distance(p1,p2)) );
+  char message[50];
+  if (fn==0)
+    sprintf(message,"Distance between marks is %f in ipe pts",length);
+  else if (fn==1) 
+    sprintf(message,"Distance between marks is %f cm",0.0353*length);
+  else if (fn==2) 
+    sprintf(message,"Distance between marks is %f inches",0.0139*length);
+  print_error_message(message);
+  return;
+}
+}
+
+CGAL_IPELET(CGAL_distance_ipelet::distanceIpelet)
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/generator.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/generator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/generator.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/generator.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/hilbert_sort.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/hilbert_sort.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/hilbert_sort.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/hilbert_sort.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/hull.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/hull.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/hull.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/hull.cpp
diff --git a/3rdparty/CGAL-4.8/demo/CGAL_ipelets/hyperbolic.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/hyperbolic.cpp
new file mode 100644
index 0000000..11f6fce
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/hyperbolic.cpp
@@ -0,0 +1,241 @@
+// Copyright (c) 2013  INRIA Sophia Antipolis -  Mediterranee,  (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Olivier Devillers
+
+
+#include <CGAL/Exact_circular_kernel_2.h>
+
+#include <CGAL/CGAL_Ipelet_base.h> 
+#include <CGAL/Object.h>
+
+#include "include/CGAL_ipelets/pencils.h"
+
+
+ 
+#include <CGAL/Cartesian.h>
+namespace CGAL_hyperbolic{
+
+
+typedef CGAL::Exact_circular_kernel_2 Kernel;
+
+// --------------------------------------------------------------------
+
+const std::string sublabel[] = {
+  "Line through two points",
+  "Segment through two points",
+  "Bisector of two points",
+  "Circle by center and point",
+  "Circle center", 
+  "Help"
+};
+
+const std::string helpmsg[] = {
+  "Draw the hyperbolic line trough two points in Poincare disk",
+  "Draw the hyperbolic segment trough two points in Poincare disk",
+  "Draw the hyperbolic bisector of two points in Poincare disk",
+  "Draw the hyperbolic circle given the center (primary selection) and a point in Poincare disk",
+  "Draw the hyperbolic center given a circle (primary selection) in Poincare disk",
+};
+
+class hyperbolicIpelet 
+  : public CGAL::Ipelet_base<Kernel,6> {
+public:
+  hyperbolicIpelet() 
+    :CGAL::Ipelet_base<Kernel,6>("Hyperbolic",sublabel,helpmsg){}
+  void protected_run(int);
+};
+// --------------------------------------------------------------------
+
+void hyperbolicIpelet::protected_run(int fn)
+{
+  Circle_2 circ;     //constructed circle:
+  Circle_2 p1,p2;
+  Circle_2  poincare,selected;
+  
+  if (fn==5) {
+    show_help();
+    return;
+  } 
+  
+  std::list<Point_2> pt_list,pt_list1;
+  std::list<Circle_2> cir_list,cir_list1;
+
+  int i=get_IpePage()->primarySelection(); 
+
+  if (i<0) {
+    print_error_message(("No mark or circle selected"));
+    return;
+  }
+
+  read_one_active_object(get_IpePage()->object(i),CGAL::dispatch_or_drop_output<Point_2,Circle_2>(
+       std::back_inserter(pt_list1),
+       std::back_inserter(cir_list1))); 
+
+  Iso_rectangle_2 bbox=
+  read_active_objects(
+		      CGAL::dispatch_or_drop_output<Point_2,Circle_2>(
+      std::back_inserter(pt_list),
+      std::back_inserter(cir_list)
+    )
+  );
+
+  
+  std::list<Point_2>::iterator it1=pt_list1.begin();
+  std::list<Circle_2>::iterator cit1=cir_list1.begin();
+  std::list<Point_2>::iterator it=pt_list.begin();
+  std::list<Circle_2>::iterator cit=cir_list.begin();
+
+  if (fn!=4){
+    if (pt_list.empty() || cir_list.empty()){
+      print_error_message(("Two marks and a circle have to be selected"));
+      return;
+    }
+  }else{
+    if (cir_list.empty()){
+      print_error_message(("Two circles have to be selected"));
+      return;
+    }
+  }
+  
+  poincare=*cit;++cit;
+  if(fn==4){
+    if( (cit==cir_list.end()) || (cit1==cir_list1.end())){
+      print_error_message(("Two circles have to be selected"));
+      return;
+    }
+    if (*cit1==poincare) poincare=*cit;
+    selected=*cit1;
+  }else{
+    p1=Circle_2(*it,0);
+    ++it;
+    if (it!=pt_list.end())  {
+      p2=Circle_2(*it,0);
+      ++it;
+    }else{ 
+      print_error_message(("Two marks and a circle have to be selected")); 
+      return;
+    }
+    if( (it!=pt_list.end())||(cit!=cir_list.end())){
+      print_error_message(("Only two marks and a circle have to be selected")); 
+      return;
+    }
+  }
+
+  if (fn==3){//primary selection must be a point (p1)
+    if (pt_list1.empty()){
+      print_error_message(("Primary selection must be a mark (center)"));
+      return;
+    }  
+    if (*it1 != p1.center()) {
+      //swap
+      circ = p1;
+      p1 = p2;
+      p2 = circ;
+    }
+    if (*it1 != p1.center()) {
+      print_error_message(("Primary selection must be a mark (center)"));
+      return;
+    }  
+  }
+
+  switch(fn){
+  case 0:
+    // Circle orthogonal to p1, p2, and poincare
+    circ = compute_circle_orthogonal<Kernel>(p1,p2,poincare);
+    break; //goto clip
+  case 1:
+    // Circle orthogonal to p1, p2, and poincare
+    circ = compute_circle_orthogonal<Kernel>(p1,p2,poincare);
+    if (orientation(poincare.center(),p1.center(),p2.center())>0)
+      draw_in_ipe(Circular_arc_2(circ,p2.center(),p1.center(),circ.orientation()));
+    else if (orientation(poincare.center(),p1.center(),p2.center())==0){
+      print_error_message(
+	"degenerate case, hyperbolic line is on a diameter of Poincare disk");
+      draw_in_ipe(Segment_2(p1.center(),p2.center()));
+    }else
+      draw_in_ipe(Circular_arc_2(circ,p1.center(),p2.center(),circ.orientation()));
+    return;
+  case 2:
+    // Circle of pencil generated by p1 p2 orthogonal to poincare
+    circ = compute_circle_in_pencil<Kernel>(poincare,p1,p2);
+    break; //goto clip
+  case 3:
+    // Circle of pencil p1 poincare through p2
+    circ = compute_circle_in_pencil<Kernel>(p2,poincare,p1);
+    draw_in_ipe(circ);
+    return;
+  case 4:
+    // Zere radius circle of pencil selected poincare inside
+    // translate so that Poincare : x^2+y^2=A
+    // and selected : x^2+y^2 -2ax -2by +a^2+ b^2=C
+    // look for l  so that l.Poincare + selected has zero radius
+    double a=CGAL::to_double(selected.center().x())-CGAL::to_double(poincare.center().x());
+    double b=CGAL::to_double(selected.center().y())-CGAL::to_double(poincare.center().y());
+    double C=CGAL::to_double(selected.squared_radius());
+    double A=CGAL::to_double(poincare.squared_radius());
+    double B=A+C-a*a-b*b;
+    double delta=B*B-4*A*C;
+    double l=(-B+sqrt(delta))/2/A;
+    l = 1/(1+l);
+    Point_2 center=poincare.center()+ (l*(selected.center()-poincare.center()));
+    draw_in_ipe(center);
+    return;
+  }     //end of switch
+
+  // detect degenerate case
+  if (circ==Circle_2()){ 
+    Kernel::Vector_2 v;
+    if (fn==2) v= Kernel::Vector_2
+       (p2.center().y()-p1.center().y(),p2.center().x()-p1.center().x());
+    else v=p2.center()-p1.center();
+    Kernel::FT sqr_length=poincare.squared_radius() / v.squared_length();
+    double length = sqrt( CGAL::to_double(sqr_length) );
+    v = Kernel::FT(length)*v;
+    Point_2 q1=poincare.center()+ v;
+    Point_2 q2=poincare.center()- v;
+    print_error_message(
+	"degenerate case, hyperbolic line is a diameter of Poincare disk");
+    Kernel::Segment_2 s(q1,q2);
+    draw_in_ipe(s);
+    return;
+    }
+
+  // clip circ by poincare 
+  std::vector< CGAL::Object > result;
+  Kernel::Circular_arc_point_2 L,R;
+  std::pair<Kernel::Circular_arc_point_2, unsigned > the_pair;
+
+  CGAL::intersection(circ, poincare, std::back_inserter(result));
+  assert (result.size()==2);
+  assign(the_pair, result[0]);
+  L = the_pair.first;
+  assign(the_pair, result[1]);
+  R = the_pair.first;
+  Point_2 LL(CGAL::to_double(L.x()),CGAL::to_double(L.y()));
+  Point_2 RR(CGAL::to_double(R.x()),CGAL::to_double(R.y()));
+  assert( LL.x() <= RR.x());
+  Circular_arc_2 arc;
+  if ( orientation(poincare.center(),circ.center(),LL) >0)
+    arc = Circular_arc_2(circ,LL,RR,circ.orientation());
+  else arc = Circular_arc_2(circ,RR,LL,circ.orientation());
+  draw_in_ipe( arc );
+}
+}
+
+CGAL_IPELET(CGAL_hyperbolic::hyperbolicIpelet)
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/include/CGAL_ipelets/pencils.h b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/include/CGAL_ipelets/pencils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/include/CGAL_ipelets/pencils.h
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/include/CGAL_ipelets/pencils.h
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_alpha_shapes.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_alpha_shapes.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_alpha_shapes.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_alpha_shapes.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_arrangement.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_arrangement.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_arrangement.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_arrangement.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_bbox_restriction.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_bbox_restriction.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_bbox_restriction.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_bbox_restriction.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_diagrams.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_diagrams.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_diagrams.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_diagrams.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_distance.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_distance.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_distance.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_distance.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_generator.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_generator.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_generator.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_generator.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hilbert_sort.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hilbert_sort.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hilbert_sort.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hilbert_sort.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hull.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hull.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hull.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hull.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_mesh_2.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_mesh_2.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_mesh_2.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_mesh_2.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_minkowski.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_minkowski.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_minkowski.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_minkowski.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_multi_delaunay.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_multi_delaunay.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_multi_delaunay.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_multi_delaunay.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_multi_regular.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_multi_regular.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_multi_regular.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_multi_regular.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_partition.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_partition.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_partition.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_partition.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_pca.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_pca.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_pca.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_pca.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_simple_triangulation.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_simple_triangulation.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_simple_triangulation.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_simple_triangulation.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_skeleton.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_skeleton.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_skeleton.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_skeleton.lua
diff --git a/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_svdlinf.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_svdlinf.lua
new file mode 100644
index 0000000..e2a2b95
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_svdlinf.lua
@@ -0,0 +1,25 @@
+----------------------------------------------------------------------
+-- CGAL svdlinf ipelet description
+----------------------------------------------------------------------
+
+label = "SVDLinf"
+
+about = [[
+This ipelet is based on the CGAL_ipelet package. See www.cgal.org.
+]]
+
+-- this variable will store the C++ ipelet when it has been loaded
+ipelet = false
+
+function run(model, num)
+  if not ipelet then ipelet = assert(ipe.Ipelet(dllname)) end
+  model:runIpelet(methods[num].label, ipelet, num)
+end
+
+methods = {
+  { label="Segment VD Linf general" },
+  { label="Segment skeleton Linf general" },
+  { label="Help" },
+}
+
+----------------------------------------------------------------------
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_triangulation.lua b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_triangulation.lua
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/lua/libCGAL_triangulation.lua
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/lua/libCGAL_triangulation.lua
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/mesh_2.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/mesh_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/mesh_2.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/mesh_2.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/minkowski.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/minkowski.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/minkowski.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/minkowski.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/multi_delaunay.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/multi_delaunay.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/multi_delaunay.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/multi_delaunay.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/multi_regular.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/multi_regular.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/multi_regular.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/multi_regular.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/partition.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/partition.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/partition.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/partition.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/pca.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/pca.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/pca.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/pca.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/simple_triangulation.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/simple_triangulation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/simple_triangulation.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/simple_triangulation.cpp
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/skeleton.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/skeleton.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/skeleton.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/skeleton.cpp
diff --git a/3rdparty/CGAL-4.8/demo/CGAL_ipelets/svdlinf.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/svdlinf.cpp
new file mode 100644
index 0000000..9bef1fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/svdlinf.cpp
@@ -0,0 +1,127 @@
+#ifndef CGAL_SDG_VERBOSE
+#define CGAL_SDG_DEBUG(a)
+#else
+#define CGAL_SDG_DEBUG(a) { a }
+#endif
+
+// Kernels
+//#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+//#include <CGAL/Cartesian.h>
+
+#include <CGAL/CGAL_Ipelet_base.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_traits_2.h>
+
+namespace CGAL_svdlinf {
+
+//typedef CGAL::Cartesian<double>                               Kernel;
+  typedef CGAL::Exact_predicates_exact_constructions_kernel     Kernel;
+//typedef CGAL::Exact_predicates_inexact_constructions_kernel   Kernel;
+  typedef CGAL::Segment_Delaunay_graph_Linf_traits_2<Kernel>    Gt;
+  typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>               SDG2;
+
+  const unsigned int num_entries = 3;
+
+  const std::string sublabel[] = {
+    "Segment VD Linf general",
+    "Segment skeleton Linf general",
+    "Help"
+  };
+
+  const std::string helpmsg[] = {
+    "Draw the L_inf Voronoi diagram of segments in Linf",
+    "Draw the L_inf Voronoi skeleton of segments in Linf",
+  };
+
+  class svdlinfIpelet
+    : public CGAL::Ipelet_base<Kernel,num_entries> {
+      public:
+        svdlinfIpelet()
+          :CGAL::Ipelet_base<Kernel,num_entries>
+             ("SVDLinf",sublabel,helpmsg){}
+        void protected_run(int);
+
+    };
+  // --------------------------------------------------------------------
+
+  void svdlinfIpelet::protected_run(int fn)
+  {
+    SDG2   svd;
+
+    if (fn == (num_entries-1)) {
+      show_help();
+      return;
+    }
+
+    std::list<Point_2> pt_list;
+    std::list<Segment_2> sg_list;
+
+    Iso_rectangle_2 bbox;
+
+    // grab input
+
+    bbox =
+      read_active_objects(
+          CGAL::dispatch_or_drop_output
+          <Point_2,Polygon_2,Segment_2>(
+          std::back_inserter(pt_list),
+          segment_grabber(std::back_inserter(sg_list)),
+          std::back_inserter(sg_list)
+          )
+          );
+
+    // check input
+
+    if (pt_list.empty() and sg_list.empty()) {
+      print_error_message(("Nothing selected"));
+      return;
+    }
+
+    if ( (fn == 2) or (fn == 3) ) {
+      // check that segments are all axis-parallel
+      for (std::list<Segment_2>::iterator
+          sit  = sg_list.begin();
+          sit != sg_list.end();
+          ++sit)
+      {
+        if (not (sit->is_horizontal() or sit->is_vertical())) {
+          print_error_message(("Non axis-parallel segment"));
+          return;
+        }
+      }
+    }
+
+
+    Kernel::FT incr_len = 75;
+    // slightly increase the size of the bbox
+    bbox = Iso_rectangle_2(
+      bbox.min()+Kernel::Vector_2(-incr_len,-incr_len),
+      bbox.max()+Kernel::Vector_2(incr_len,incr_len));
+
+    for (std::list<Segment_2>::iterator
+         sit  = sg_list.begin();
+         sit != sg_list.end();
+         ++sit)
+    {
+      CGAL_SDG_DEBUG( std::cout << "IPELET: inserting segment "
+          << *sit << std::endl ; );
+      svd.insert(sit->point(0),sit->point(1));
+    }
+
+    CGAL_SDG_DEBUG( std::cout << "IPELET: inserting points"
+        << std::endl ; );
+
+    svd.insert(pt_list.begin(),pt_list.end());
+
+    if ( fn == 0 ) {
+      draw_dual_in_ipe(svd, bbox);
+    } else if ( fn == 1 ) {
+      draw_skeleton_in_ipe(svd, bbox);
+    }
+
+  } // end of void svdlinfIpelet::protected_run(int fn)
+
+}
+
+CGAL_IPELET(CGAL_svdlinf::svdlinfIpelet)
diff --git a/3rdparty/CGAL-4.6/demo/CGAL_ipelets/triangulation.cpp b/3rdparty/CGAL-4.8/demo/CGAL_ipelets/triangulation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/CGAL_ipelets/triangulation.cpp
rename to 3rdparty/CGAL-4.8/demo/CGAL_ipelets/triangulation.cpp
diff --git a/3rdparty/CGAL-4.8/demo/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/CMakeLists.txt
new file mode 100644
index 0000000..4f63a6f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/CMakeLists.txt
@@ -0,0 +1,42 @@
+project(CGAL_DEMOS)
+
+cmake_minimum_required(VERSION 2.8.11)
+
+if (CGAL_BRANCH_BUILD) 
+
+foreach (package ${CGAL_CONFIGURED_PACKAGES})
+  #message (STATUS "Current package: ${package}")
+  file( GLOB listtmp "${package}/demo/*")
+  list(APPEND list ${listtmp})
+endforeach()
+
+else()
+
+  file( GLOB list "*")
+
+endif()
+
+list( SORT list )
+
+if(NOT CGAL_BUILDING_LIBS)
+  find_package(CGAL REQUIRED)
+  include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
+endif()
+
+message("== Generating build files for demos ==")
+foreach( entry ${list} )
+
+  if (NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry} )
+
+    file(GLOB files "${entry}/*.cpp")
+
+    # If there is no .cpp files, ignore the sub-directory
+    if(files)
+     process_CGAL_subdirectory("${entry}" demo demo)
+      # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake
+   endif()
+
+  endif()
+  
+endforeach()
+message("== Generating build files for demos (DONE) ==\n")
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/ArcsGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/ArcsGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/ArcsGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/ArcsGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/CMakeLists.txt
new file mode 100644
index 0000000..14de363
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/CMakeLists.txt
@@ -0,0 +1,53 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Circular_kernel_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+  add_definitions(-DQT_NO_KEYWORDS)
+  
+
+  #--------------------------------
+  # The demo: Circular_kernel_2
+  #--------------------------------
+  # UI files (Qt Designer files)
+  qt5_wrap_ui( DT_UI_FILES Circular_kernel_2.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( DT_RESOURCE_FILES ./Circular_kernel_2.qrc )
+
+  # use the Qt MOC preprocessor on classes that derives from QObject
+  qt5_generate_moc( "Circular_kernel_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Circular_kernel_2.moc" )
+
+  # The executable itself.
+  add_executable  ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+  qt5_use_modules(Circular_kernel_2 Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_2 )
+
+  # Link with Qt libraries
+  target_link_libraries( Circular_kernel_2 ${QT_LIBRARIES} )
+  # Link with CGAL
+  target_link_libraries( Circular_kernel_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.cpp b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.cpp
new file mode 100644
index 0000000..8ccfb5b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.cpp
@@ -0,0 +1,296 @@
+
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Cartesian.h>
+#include <CGAL/MP_Float.h>
+#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
+#include <CGAL/Circular_kernel_2.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Circular_kernel_2.h>
+#include <CGAL/Object.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/GraphicsViewCircularArcInput.h>
+#include "ArcsGraphicsItem.h"
+  
+// the two base classes
+#include "ui_Circular_kernel_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Quotient<CGAL::MP_Float>                       NT;
+typedef CGAL::Cartesian<NT>                                 Linear_k;
+
+typedef CGAL::Algebraic_kernel_for_circles_2_2<NT>          Algebraic_k;
+typedef CGAL::Circular_kernel_2<Linear_k,Algebraic_k>       CircularKernel;
+
+typedef CircularKernel::Point_2                                 Point_2;
+typedef CircularKernel::Segment_2                               Segment_2;
+typedef CircularKernel::Line_arc_2                              Line_arc_2;
+typedef CircularKernel::Circular_arc_2                          Circular_arc_2;
+typedef CircularKernel::Circular_arc_point_2                    Circular_arc_point_2;
+
+
+typedef CGAL::Qt::ArcsGraphicsItem<CircularKernel>                 ArcsGraphicsItem;
+
+
+typedef std::vector<CGAL::Object>                           ArcContainer;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Circular_kernel_2
+{
+  Q_OBJECT
+  
+private:  
+  ArcContainer arcs;
+  ArcContainer intersections;
+  QGraphicsScene scene;  
+
+  ArcsGraphicsItem * agi;
+
+
+  CGAL::Qt::GraphicsViewCircularArcInput<CircularKernel> * cai;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  virtual void open(QString);
+
+  void processInput(CGAL::Object o);
+
+
+  void on_actionInsertCircularArc_toggled(bool checked);
+  
+  void on_actionClear_triggered();
+
+  void on_actionLoadLineAndCircularArcs_triggered();
+
+  void on_actionRecenter_triggered();
+
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  // Add a GraphicItem for the Circular triangulation
+  agi = new CGAL::Qt::ArcsGraphicsItem<CircularKernel>(arcs, intersections);
+
+  agi->setIntersectionsPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+
+  QObject::connect(this, SIGNAL(changed()),
+		   agi, SLOT(modelChanged()));
+
+  agi->setInputPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(agi);
+  agi->hide();
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  cai = new CGAL::Qt::GraphicsViewCircularArcInput<CircularKernel>(this, &scene);
+
+  QObject::connect(cai, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   qApp, SLOT(quit()));
+
+  // Check two actions 
+  this->actionInsertCircularArc->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+
+  // Uncomment the following line to get antialiasing by default.
+//   actionUse_Antialiasing->setChecked(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Circular_kernel_2.html");
+  this->addAboutCGAL();
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  Circular_arc_2 ca;
+  Line_arc_2 la;
+  bool is_circular = false;
+  
+  if(assign(ca, o)){
+    is_circular = true;
+  } else if(! assign(la, o)){
+    std::cerr << "unknown object" << std::endl;
+    return;
+  }
+
+  for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
+    Circular_arc_2 vca;
+    Line_arc_2 vla;
+    if(assign(vca, *it)){
+      if(is_circular){
+	CGAL::intersection(ca, vca, std::back_inserter(intersections));
+      } else {
+	CGAL::intersection(la, vca, std::back_inserter(intersections));
+      }
+    } else if(assign(vla, *it)){
+      if(is_circular){
+	CGAL::intersection(ca, vla, std::back_inserter(intersections));
+      } else {
+	CGAL::intersection(la, vla, std::back_inserter(intersections));
+      }
+    }
+  }
+  arcs.push_back(o);
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+void
+MainWindow::on_actionInsertCircularArc_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(cai);
+  } else {
+    scene.removeEventFilter(cai);
+  }
+}
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  arcs.clear();
+  intersections.clear();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionLoadLineAndCircularArcs_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Line and Circular Arc File"),
+						  ".",
+						  tr("Edge files (*.arc)\n"));
+  if(! fileName.isEmpty()){
+    open(fileName);
+    this->addToRecentFiles(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+    std::ifstream ifs(qPrintable(fileName));
+    char c;
+    double x,y;
+    Segment_2 s;
+    
+    while(ifs >> c){
+      if(c == 's'){
+	ifs >> x >> y;
+	Point_2 p(x,y);
+	ifs >> x >> y;
+	Point_2 q(x,y);
+	
+	Line_arc_2 la(Segment_2(p,q));
+	for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
+	  Circular_arc_2 vca;
+	  Line_arc_2 vla;
+	  if(assign(vca, *it)){
+	    CGAL::intersection(la, vca, std::back_inserter(intersections));
+	  } else if(assign(vla, *it)){
+	    CGAL::intersection(la, vla, std::back_inserter(intersections));
+	  }
+	}
+	arcs.push_back(make_object(la));
+      } else if(c == 'c'){
+	ifs >> x >> y;
+	Point_2 p(x,y);
+	ifs >> x >> y;
+	Point_2 q(x,y);
+	ifs >> x >> y;
+	Point_2 r(x,y);
+	Circular_arc_2 ca(p,q,r);
+	for(std::vector<CGAL::Object>::iterator it = arcs.begin(); it != arcs.end(); ++it){
+	  Circular_arc_2 vca;
+	  Line_arc_2 vla;
+	  if(assign(vca, *it)){
+	    CGAL::intersection(ca, vca, std::back_inserter(intersections));
+	  } else if(assign(vla, *it)){
+	    CGAL::intersection(ca, vla, std::back_inserter(intersections));
+	  }
+	}
+	arcs.push_back(make_object(ca));
+      }
+    }
+    Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(agi->boundingRect());
+  this->graphicsView->fitInView(agi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Circular_kernel_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Circular_kernel_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.qrc b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.ui b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/Circular_kernel_2.ui
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/Circular_kernel_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/about_Circular_kernel_2.html b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/about_Circular_kernel_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/about_Circular_kernel_2.html
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/about_Circular_kernel_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/arcs.arc b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/arcs.arc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/arcs.arc
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/arcs.arc
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/data/circle_grid.cgal b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/data/circle_grid.cgal
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/data/circle_grid.cgal
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/data/circle_grid.cgal
diff --git a/3rdparty/CGAL-4.6/demo/Circular_kernel_2/data/circles_21.cgal b/3rdparty/CGAL-4.8/demo/Circular_kernel_2/data/circles_21.cgal
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Circular_kernel_2/data/circles_21.cgal
rename to 3rdparty/CGAL-4.8/demo/Circular_kernel_2/data/circles_21.cgal
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/CMakeLists.txt
new file mode 100644
index 0000000..698a779
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/CMakeLists.txt
@@ -0,0 +1,36 @@
+project (Circular_kernel_3)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL)
+
+find_package(OpenGL)
+find_package(QGLViewer)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
+
+
+  include_directories (${QGLVIEWER_INCLUDE_DIR})
+  include_directories (BEFORE ../../include ./ )
+
+  add_executable  ( Circular_kernel_3 Circular_kernel_3.cpp Viewer.cpp )
+
+  qt5_use_modules( Circular_kernel_3 Xml Script OpenGL)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_3 )
+
+  target_link_libraries( Circular_kernel_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+  target_link_libraries( Circular_kernel_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
+  target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Circular_kernel_3.cpp b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Circular_kernel_3.cpp
new file mode 100644
index 0000000..513722f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Circular_kernel_3.cpp
@@ -0,0 +1,22 @@
+#include "Viewer.h"
+#include <qapplication.h>
+
+int main(int argc, char** argv)
+{
+  // Read command lines arguments.
+  QApplication application(argc,argv);
+
+  // Instantiate the viewer.
+  Viewer viewer;
+  //for Windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  application.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+  viewer.setWindowTitle("Intersection points of randomly generated circles.");
+
+  // Make the viewer window visible on screen.
+  viewer.show();
+
+  // Run main loop.
+  return application.exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.cpp
new file mode 100644
index 0000000..0036038
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.cpp
@@ -0,0 +1,911 @@
+#include "Viewer.h"
+#include <CGAL/point_generators_3.h>
+#include <CGAL/squared_distance_3.h>
+#include <CGAL/Exact_spherical_kernel_3.h>
+#include <vector>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+
+Viewer::Viewer(QWidget* parent )
+  : QGLViewer(CGAL::Qt::createOpenGLContext(),parent)
+{
+    extension_is_found = false;
+}
+
+void Viewer::compile_shaders()
+{
+    initializeOpenGLFunctions();
+    if(! buffers[0].create() || !buffers[1].create() || !buffers[2].create() || !buffers[3].create()
+            || !buffers[4].create() || !buffers[4].create() || !buffers[5].create() || !buffers[6].create()
+            || !buffers[7].create() || !buffers[8].create())
+    {
+        std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() || !vao[2].create())
+    {
+        std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+
+    //The sphere
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 center;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * (vertex+vec4(center.xyz, 0.0));\n"
+        "}"
+    };
+    //Vertex source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform highp vec4 color; \n"
+        "uniform vec4 light_pos;  \n"
+        "uniform vec4 light_diff; \n"
+        "uniform vec4 light_spec; \n"
+        "uniform vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+        "gl_FragColor = light_amb*color + diffuse  ; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+    if(!extension_is_found)
+    {
+
+
+             //Vertex source code
+             const char vertex_source_no_ext[] =
+             {
+                 "#version 120 \n"
+                 "attribute highp vec4 vertex;\n"
+                 "uniform highp mat4 mvp_matrix;\n"
+                 "void main(void)\n"
+                 "{\n"
+                 "   gl_Position = mvp_matrix * vertex;\n"
+                 "}"
+             };
+             //Vertex source code
+             const char fragment_source_no_ext[] =
+             {
+                 "#version 120 \n"
+                 "uniform highp vec4 color; \n"
+                 "void main(void) { \n"
+                 "gl_FragColor = color; \n"
+                 "} \n"
+                 "\n"
+             };
+             vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+             if(!vertex_shader->compileSourceCode(vertex_source_no_ext))
+             {
+                 std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+             }
+
+             fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+             if(!fragment_shader->compileSourceCode(fragment_source_no_ext))
+             {
+                 std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+             }
+
+             if(!rendering_program_no_ext.addShader(vertex_shader))
+             {
+                 std::cerr<<"adding vertex shader FAILED"<<std::endl;
+             }
+             if(!rendering_program_no_ext.addShader(fragment_shader))
+             {
+                 std::cerr<<"adding fragment shader FAILED"<<std::endl;
+             }
+             if(!rendering_program_no_ext.link())
+             {
+                 std::cerr<<"linking Program FAILED"<<std::endl;
+             }
+             rendering_program_no_ext.bind();
+    }
+
+
+
+}
+
+void Viewer::initialize_buffers()
+{
+    //The big white sphere
+    vao[0].bind();
+    //points of the sphere
+    buffers[0].bind();
+    buffers[0].allocate(pos_sphere.data(),
+                        static_cast<int>(pos_sphere.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[0].release();
+    //normals of the sphere
+    buffers[1].bind();
+    buffers[1].allocate(normals.data(),
+                        static_cast<int>(normals.size()*sizeof(float)));
+    normalsLocation[0] = rendering_program.attributeLocation("normal");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(normalsLocation[0]);
+    rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+    buffers[1].release();
+    //center of the sphere
+    buffers[2].bind();
+    buffers[2].allocate(trivial_center.data(),
+                        static_cast<int>(trivial_center.size()*sizeof(float)));
+    trivialCenterLocation = rendering_program.attributeLocation("center");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(trivialCenterLocation);
+    rendering_program.setAttributeBuffer(trivialCenterLocation,GL_FLOAT,0,3);
+    buffers[2].release();
+    if(extension_is_found)
+    {
+
+        glVertexAttribDivisor(trivialCenterLocation, 1);
+        glVertexAttribDivisor(normalsLocation[0], 0);
+    }
+    vao[0].release();
+
+    //The circles
+    vao[1].bind();
+    buffers[3].bind();
+    buffers[3].allocate(pos_lines.data(),
+                        static_cast<int>(pos_lines.size()*sizeof(float)));
+    vertexLocation[2] = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(vertexLocation[2]);
+    rendering_program.setAttributeBuffer(vertexLocation[2],GL_FLOAT,0,3);
+    buffers[3].release();
+
+    //normals
+    buffers[4].bind();
+    buffers[4].allocate(normals_lines.data(),
+                        static_cast<int>(normals_lines.size()*sizeof(float)));
+    normalsLocation[1] = rendering_program.attributeLocation("normal");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(normalsLocation[1]);
+    rendering_program.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+    buffers[4].release();
+    //center
+    buffers[5].bind();
+    buffers[5].allocate(trivial_center.data(),
+                        static_cast<int>(trivial_center.size()*sizeof(float)));
+    trivialCenterLocation = rendering_program.attributeLocation("center");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(trivialCenterLocation);
+    rendering_program.setAttributeBuffer(trivialCenterLocation,GL_FLOAT,0,3);
+    buffers[5].release();
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(trivialCenterLocation, 1);
+        glVertexAttribDivisor(normalsLocation[0], 0);
+    }
+    rendering_program.release();
+
+    vao[1].release();
+
+    //The little green spheres
+    vao[2].bind();
+    if(extension_is_found)
+    {
+        //points of the spheres
+        buffers[6].bind();
+        buffers[6].allocate(pos_sphere_inter.data(),
+                            static_cast<int>(pos_sphere_inter.size()*sizeof(float)));
+        vertexLocation[2] = rendering_program.attributeLocation("vertex");
+        rendering_program.bind();
+        rendering_program.enableAttributeArray(vertexLocation[2]);
+        rendering_program.setAttributeBuffer(vertexLocation[2],GL_FLOAT,0,3);
+        buffers[6].release();
+        //normals of the sphere
+        buffers[7].bind();
+        buffers[7].allocate(normals_inter.data(),
+                            static_cast<int>(normals_inter.size()*sizeof(float)));
+        normalsLocation[2] = rendering_program.attributeLocation("normal");
+        rendering_program.bind();
+        rendering_program.enableAttributeArray(normalsLocation[2]);
+        rendering_program.setAttributeBuffer(normalsLocation[2],GL_FLOAT,0,3);
+        buffers[7].release();
+        //center of the sphere
+        buffers[8].bind();
+        buffers[8].allocate(pos_points.data(),
+                            static_cast<int>(pos_points.size()*sizeof(float)));
+        centerLocation = rendering_program.attributeLocation("center");
+        rendering_program.bind();
+        rendering_program.enableAttributeArray(centerLocation);
+        rendering_program.setAttributeBuffer(centerLocation,GL_FLOAT,0,3);
+        buffers[8].release();
+
+        glVertexAttribDivisor(centerLocation, 1);
+        glVertexAttribDivisor(normalsLocation[1], 0);
+    }
+    else
+    {
+        //points of the sphere
+        buffers[6].bind();
+        buffers[6].allocate(pos_points.data(),
+                            static_cast<int>(pos_points.size()*sizeof(float)));
+        rendering_program_no_ext.bind();
+        rendering_program_no_ext.enableAttributeArray("vertex");
+        rendering_program_no_ext.setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[6].release();
+    }
+    vao[2].release();
+
+
+
+}
+
+void Viewer::compute_elements()
+{
+
+    //The Central Sphere
+    {
+        pos_sphere.resize(0);
+        trivial_center.resize(0);
+        int rings=3,sectors=6;
+        float T, P, R = 0.999f;
+        float x[4],y[4],z[4];
+
+
+        //Top of the sphere
+        for(int t=0; t<360; t+=sectors)
+        {
+
+            pos_sphere.push_back(0);
+            pos_sphere.push_back(0);
+            pos_sphere.push_back(R);
+
+
+            normals.push_back(0);
+            normals.push_back(0);
+            normals.push_back(1);
+
+
+
+            P = rings*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            pos_sphere.push_back(R * x[1]);
+            pos_sphere.push_back(R * y[1]);
+            pos_sphere.push_back(R * z[1]);
+
+
+            normals.push_back(x[1]);
+            normals.push_back(y[1]);
+            normals.push_back(z[1]);
+
+            //
+            P = rings*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            pos_sphere.push_back(R * x[2]);
+            pos_sphere.push_back(R * y[2]);
+            pos_sphere.push_back(R * z[2]);
+
+            normals.push_back(x[2]);
+            normals.push_back(y[2]);
+            normals.push_back(z[2]);
+
+        }
+
+        //Body of the sphere
+        for (int p=rings; p<180-rings; p+=rings)
+            for(int t=0; t<360; t+=sectors)
+            {
+                //A
+                P = p*M_PI/180.0;
+                T = t*M_PI/180.0;
+                x[0] = sin(P) * cos(T) ;
+                y[0] = sin(P) * sin(T) ;
+                z[0] = cos(P);
+
+                pos_sphere.push_back(R * x[0]);
+                pos_sphere.push_back(R * y[0]);
+                pos_sphere.push_back(R * z[0]);
+
+
+                normals.push_back(x[0]);
+                normals.push_back(y[0]);
+                normals.push_back(z[0]);
+
+                //B
+                P = (p+rings)*M_PI/180.0;
+                T = t*M_PI/180.0;
+                x[1] = sin(P) * cos(T) ;
+                y[1] = sin(P) * sin(T) ;
+                z[1] = cos(P);
+                pos_sphere.push_back(R * x[1]);
+                pos_sphere.push_back(R * y[1]);
+                pos_sphere.push_back(R * z[1]);
+
+
+                normals.push_back(x[1]);
+                normals.push_back(y[1]);
+                normals.push_back(z[1]);
+
+                //C
+                P = p*M_PI/180.0;
+                T = (t+sectors)*M_PI/180.0;
+                x[2] = sin(P) * cos(T) ;
+                y[2] = sin(P) * sin(T) ;
+                z[2] = cos(P);
+                pos_sphere.push_back(R * x[2]);
+                pos_sphere.push_back(R * y[2]);
+                pos_sphere.push_back(R * z[2]);
+
+
+                normals.push_back(x[2]);
+                normals.push_back(y[2]);
+                normals.push_back(z[2]);
+                //D
+                P = (p+rings)*M_PI/180.0;
+                T = (t+sectors)*M_PI/180.0;
+                x[3] = sin(P) * cos(T) ;
+                y[3] = sin(P) * sin(T) ;
+                z[3] = cos(P);
+                pos_sphere.push_back(R * x[3]);
+                pos_sphere.push_back(R * y[3]);
+                pos_sphere.push_back(R * z[3]);
+
+
+                normals.push_back(x[3]);
+                normals.push_back(y[3]);
+                normals.push_back(z[3]);
+
+
+
+                pos_sphere.push_back(R * x[1]);
+                pos_sphere.push_back(R * y[1]);
+                pos_sphere.push_back(R * z[1]);
+
+
+                normals.push_back(x[1]);
+                normals.push_back(y[1]);
+                normals.push_back(z[1]);
+
+                pos_sphere.push_back(R * x[2]);
+                pos_sphere.push_back(R * y[2]);
+                pos_sphere.push_back(R * z[2]);
+
+
+                normals.push_back(x[2]);
+                normals.push_back(y[2]);
+                normals.push_back(z[2]);
+
+            }
+        //Bottom of the sphere
+        for(int t=0; t<360; t+=sectors)
+        {
+
+
+            pos_sphere.push_back(0);
+            pos_sphere.push_back(0);
+            pos_sphere.push_back(-R);
+
+
+            normals.push_back(0);
+            normals.push_back(0);
+            normals.push_back(-1);
+
+
+            P = (180-rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            pos_sphere.push_back(R * x[1]);
+            pos_sphere.push_back(R * y[1]);
+            pos_sphere.push_back(R * z[1]);
+
+
+            normals.push_back(x[1]);
+            normals.push_back(y[1]);
+            normals.push_back(z[1]);
+
+
+            P = (180-rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            pos_sphere.push_back(R * x[2]);
+            pos_sphere.push_back(R * y[2]);
+            pos_sphere.push_back(R * z[2]);
+
+
+            normals.push_back(x[2]);
+            normals.push_back(y[2]);
+            normals.push_back(z[2]);
+
+        }
+        trivial_center.push_back(0.0);trivial_center.push_back(0.0);trivial_center.push_back(0.0);
+    }
+    //The intersection spheres
+    {
+        pos_sphere_inter.resize(0);
+        int rings=3,sectors=3;
+        float T, P, R = 0.005f;
+        float x[4],y[4],z[4];
+
+
+        //Top of the sphere
+        for(int t=0; t<360; t+=sectors)
+        {
+
+            pos_sphere_inter.push_back(0);
+            pos_sphere_inter.push_back(0);
+            pos_sphere_inter.push_back(R);
+
+
+            normals_inter.push_back(0);
+            normals_inter.push_back(0);
+            normals_inter.push_back(1);
+
+
+
+            P = rings*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            pos_sphere_inter.push_back(R * x[1]);
+            pos_sphere_inter.push_back(R * y[1]);
+            pos_sphere_inter.push_back(R * z[1]);
+
+
+            normals_inter.push_back(x[1]);
+            normals_inter.push_back(y[1]);
+            normals_inter.push_back(z[1]);
+
+            //
+            P = rings*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            pos_sphere_inter.push_back(R * x[2]);
+            pos_sphere_inter.push_back(R * y[2]);
+            pos_sphere_inter.push_back(R * z[2]);
+
+            normals_inter.push_back(x[2]);
+            normals_inter.push_back(y[2]);
+            normals_inter.push_back(z[2]);
+
+        }
+
+        //Body of the sphere
+        for (int p=rings; p<180-rings; p+=rings)
+            for(int t=0; t<360; t+=sectors)
+            {
+                //A
+                P = p*M_PI/180.0;
+                T = t*M_PI/180.0;
+                x[0] = sin(P) * cos(T) ;
+                y[0] = sin(P) * sin(T) ;
+                z[0] = cos(P);
+
+                pos_sphere_inter.push_back(R * x[0]);
+                pos_sphere_inter.push_back(R * y[0]);
+                pos_sphere_inter.push_back(R * z[0]);
+
+
+                normals_inter.push_back(x[0]);
+                normals_inter.push_back(y[0]);
+                normals_inter.push_back(z[0]);
+
+                //B
+                P = (p+rings)*M_PI/180.0;
+                T = t*M_PI/180.0;
+                x[1] = sin(P) * cos(T) ;
+                y[1] = sin(P) * sin(T) ;
+                z[1] = cos(P);
+                pos_sphere_inter.push_back(R * x[1]);
+                pos_sphere_inter.push_back(R * y[1]);
+                pos_sphere_inter.push_back(R * z[1]);
+
+
+                normals_inter.push_back(x[1]);
+                normals_inter.push_back(y[1]);
+                normals_inter.push_back(z[1]);
+
+                //C
+                P = p*M_PI/180.0;
+                T = (t+sectors)*M_PI/180.0;
+                x[2] = sin(P) * cos(T) ;
+                y[2] = sin(P) * sin(T) ;
+                z[2] = cos(P);
+                pos_sphere_inter.push_back(R * x[2]);
+                pos_sphere_inter.push_back(R * y[2]);
+                pos_sphere_inter.push_back(R * z[2]);
+
+
+                normals_inter.push_back(x[2]);
+                normals_inter.push_back(y[2]);
+                normals_inter.push_back(z[2]);
+                //D
+                P = (p+rings)*M_PI/180.0;
+                T = (t+sectors)*M_PI/180.0;
+                x[3] = sin(P) * cos(T) ;
+                y[3] = sin(P) * sin(T) ;
+                z[3] = cos(P);
+                pos_sphere_inter.push_back(R * x[3]);
+                pos_sphere_inter.push_back(R * y[3]);
+                pos_sphere_inter.push_back(R * z[3]);
+
+
+                normals_inter.push_back(x[3]);
+                normals_inter.push_back(y[3]);
+                normals_inter.push_back(z[3]);
+
+
+
+                pos_sphere_inter.push_back(R * x[1]);
+                pos_sphere_inter.push_back(R * y[1]);
+                pos_sphere_inter.push_back(R * z[1]);
+
+
+                normals_inter.push_back(x[1]);
+                normals_inter.push_back(y[1]);
+                normals_inter.push_back(z[1]);
+
+                pos_sphere_inter.push_back(R * x[2]);
+                pos_sphere_inter.push_back(R * y[2]);
+                pos_sphere_inter.push_back(R * z[2]);
+
+
+                normals_inter.push_back(x[2]);
+                normals_inter.push_back(y[2]);
+                normals_inter.push_back(z[2]);
+
+            }
+        //Bottom of the sphere
+        for(int t=0; t<360; t+=sectors)
+        {
+
+
+            pos_sphere_inter.push_back(0);
+            pos_sphere_inter.push_back(0);
+            pos_sphere_inter.push_back(-R);
+
+
+            normals_inter.push_back(0);
+            normals_inter.push_back(0);
+            normals_inter.push_back(-1);
+
+
+            P = (180-rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            pos_sphere_inter.push_back(R * x[1]);
+            pos_sphere_inter.push_back(R * y[1]);
+            pos_sphere_inter.push_back(R * z[1]);
+
+
+            normals_inter.push_back(x[1]);
+            normals_inter.push_back(y[1]);
+            normals_inter.push_back(z[1]);
+
+
+            P = (180-rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            pos_sphere_inter.push_back(R * x[2]);
+            pos_sphere_inter.push_back(R * y[2]);
+            pos_sphere_inter.push_back(R * z[2]);
+
+
+            normals_inter.push_back(x[2]);
+            normals_inter.push_back(y[2]);
+            normals_inter.push_back(z[2]);
+
+        }
+    }
+
+
+    //init
+    {
+        pos_points.resize(0);
+        pos_lines.resize(0);
+        // Restore previous viewer state.
+        restoreStateFromFile();
+
+        //random generator of points within a sphere
+        typedef CGAL::Creator_uniform_3<EPIC::FT,EPIC::Point_3>   Creator;
+        CGAL::Random_points_in_sphere_3<EPIC::Point_3, Creator>   gen;
+
+        const unsigned nb_circles=20;
+
+        //vector to store input points
+        std::vector<EPIC::Point_3> points;
+        points.reserve(nb_circles);
+
+
+
+        for (unsigned i=0;i<nb_circles;++i){
+            EPIC::Point_3 p=*++gen;
+            //prevent great circles
+            while (p.x()==0 && p.y()==0 && p.z()==0) {  p=*++gen; }
+
+            const EPIC::Point_3 origin(0,0,0);
+            const EPIC::Plane_3 plane(p, p-origin);
+            EPIC::Vector_3 base1=plane.base1();
+            EPIC::Vector_3 base2=plane.base2();
+            base1=base1/CGAL::sqrt(base1.squared_length());
+            base2=base2/CGAL::sqrt(base2.squared_length());
+            const double radius=CGAL::sqrt( CGAL::to_double( 1 - CGAL::squared_distance(origin,p) ) );
+            const double nb_pt_per_circle=100;
+            const double step=2 * CGAL_PI / nb_pt_per_circle;
+
+            for (double theta = 0; theta < 2 * CGAL_PI-step ; theta += step) {
+                const EPIC::Point_3 a=p + ( radius*cos(theta)*base1 + radius*sin(theta)*base2 );
+                const EPIC::Point_3 b=p + ( radius*cos(theta+step)*base1 + radius*sin(theta+step)*base2 );
+                pos_lines.push_back(a.x());pos_lines.push_back(a.y());pos_lines.push_back(a.z());
+                normals_lines.push_back(a.x());normals_lines.push_back(a.y());normals_lines.push_back(a.z());
+                pos_lines.push_back(b.x());pos_lines.push_back(b.y());pos_lines.push_back(b.z());
+                normals_lines.push_back(b.x());normals_lines.push_back(b.y());normals_lines.push_back(b.z());
+
+            }
+            points.push_back(p);
+
+        }
+
+        std::vector<EPIC::Point_3> intersections;
+        naive_compute_intersection_points(points,std::back_inserter(intersections));
+
+        //draw points as small spheres
+        for (std::vector<EPIC::Point_3>::const_iterator it=intersections.begin();it!=intersections.end();++it){
+            pos_points.push_back(it->x()); pos_points.push_back(it->y()); pos_points.push_back(it->z());
+        }
+
+    }
+}
+
+void Viewer::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    // define material
+    QVector4D	ambient(0.1f, 0.1f, 0.1f, 1.0f);
+    QVector4D	diffuse( 0.9f,
+                         0.9f,
+                         0.9f,
+                         0.0f );
+
+    QVector4D	specular(  0.0f,
+                           0.0f,
+                           0.0f,
+                           0.0f );
+
+    QVector4D	position( -1.2f, 1.2f, .9797958971f, 1.0f  );
+    GLfloat shininess =  1.0f;
+
+
+    rendering_program.bind();
+    mvpLocation = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation = rendering_program.uniformLocation("mv_matrix");
+    colorLocation = rendering_program.uniformLocation("color");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+    rendering_program.setUniformValue(mvpLocation, mvpMatrix);
+    rendering_program.setUniformValue(mvLocation, mvMatrix);
+
+    rendering_program.release();
+    if(!extension_is_found)
+    {
+        rendering_program_no_ext.bind();
+        rendering_program_no_ext.setUniformValue("mvp_matrix", mvpMatrix);
+        rendering_program_no_ext.release();
+    }
+
+
+}
+
+void Viewer::draw()
+{
+    glEnable(GL_DEPTH_TEST);
+    QColor color;
+
+    //sphere
+    vao[0].bind();
+    attrib_buffers(this);
+    rendering_program.bind();
+    color.setRgbF(1.0f, 1.0f, 1.0f);
+    rendering_program.setUniformValue(colorLocation, color);
+    if(extension_is_found)
+        glDrawArraysInstanced(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_sphere.size()/3), 1);
+    else
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_sphere.size()/3));
+    rendering_program.release();
+    vao[0].release();
+
+    //intersection
+    vao[2].bind();
+    attrib_buffers(this);
+    color.setRgbF(0.0f, 1.0f, 0.0f);
+    if(extension_is_found)
+    {
+        rendering_program.bind();
+        rendering_program.setUniformValue(colorLocation, color);
+        glDrawArraysInstanced(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_sphere_inter.size()/3), static_cast<GLsizei>(pos_points.size()/3));
+        rendering_program.release();
+    }
+    else
+    {
+        glPointSize(4.0f);
+        rendering_program_no_ext.bind();
+        rendering_program_no_ext.setUniformValue(colorLocation, color);
+        glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+        rendering_program_no_ext.release();
+        glPointSize(1.0f);
+    }
+
+    vao[2].release();
+
+    //circles
+
+    vao[1].bind();
+    attrib_buffers(this);
+    rendering_program.bind();
+    color.setRgbF(1.0f, 0.0f, 0.0f);
+    rendering_program.setUniformValue(colorLocation, color);
+    glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
+    rendering_program.release();
+    vao[1].release();
+
+
+}
+
+void Viewer::init()
+{
+
+    glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDARBPROC)this->context()->getProcAddress("glDrawArraysInstancedARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glDrawArraysInstancedARB : extension not found. Spheres will be displayed as points.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+
+    glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORARBPROC)this->context()->getProcAddress("glVertexAttribDivisorARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glVertexAttribDivisorARB : extension not found. Spheres will be displayed as points.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+    compile_shaders();
+    compute_elements();
+    initialize_buffers();
+    ::glEnable(GL_BLEND);
+
+    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    glEnable(GL_POINT_SMOOTH);
+    glEnable(GL_LINE_SMOOTH);
+
+
+}
+
+template<class Output_iterator>
+void Viewer::naive_compute_intersection_points(const std::vector<EPIC::Point_3>& points,Output_iterator out) const {
+    typedef CGAL::Exact_spherical_kernel_3 SK;
+    SK::Sphere_3 sphere(SK::Point_3(0,0,0),1);
+
+    //converter point to exact SK point type
+    CGAL::Cartesian_converter<EPIC,SK> to_exact;
+    std::vector<SK::Circle_3> circles;
+
+    //create circles from points: need to use a converter to change floating points coordinates into an exact NT.
+    for (std::vector<EPIC::Point_3>::const_iterator it=points.begin();it!=points.end();++it){
+        const SK::Point_3 center=to_exact(*it);
+        circles.push_back( SK::Circle_3(sphere,SK::Plane_3(center,center-CGAL::ORIGIN) ) );
+    }
+
+
+    //Look for intersection points among pair of circles: use a naive and quadratic way
+    for (std::vector<SK::Circle_3>::const_iterator it_f=circles.begin();it_f!=--circles.end();++it_f){
+        std::vector<SK::Circle_3>::const_iterator it_s=it_f;
+        ++it_s;
+        for (;it_s!=circles.end();++it_s){
+            std::vector <CGAL::Object> intersections;
+            //ensure_circles are different
+            CGAL_precondition(*it_s!=*it_f);
+            CGAL::intersection(*it_f,*it_s,std::back_inserter(intersections));
+            if (!intersections.empty()){
+                for (std::vector <CGAL::Object>::const_iterator it_pt=intersections.begin();it_pt!=intersections.end();++it_pt){
+                    const std::pair<SK::Circular_arc_point_3,unsigned>* pt=
+                            CGAL::object_cast< std::pair<SK::Circular_arc_point_3,unsigned> > (&(*it_pt));
+                    assert(pt!=NULL);
+                    *out++=EPIC::Point_3( CGAL::to_double(pt->first.x()),
+                                          CGAL::to_double(pt->first.y()),
+                                          CGAL::to_double(pt->first.z())
+                                          );
+                }
+            }
+        }
+    }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.h b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.h
new file mode 100644
index 0000000..378fc42
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Circular_kernel_3/Viewer.h
@@ -0,0 +1,57 @@
+#include <QGLViewer/qglviewer.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
+
+class Viewer : public QGLViewer, QOpenGLFunctions_2_1
+{
+public:
+    Viewer(QWidget* parent = 0);
+  GLuint dl_nb;
+protected :
+  virtual void draw();
+  virtual void init();
+  template<class Output_iterator>
+  void naive_compute_intersection_points(const std::vector<EPIC::Point_3>&,Output_iterator) const;
+private:
+  //Shaders elements
+
+  int vertexLocation[3];
+  int normalsLocation[3];
+  int centerLocation;
+  int trivialCenterLocation;
+  int mvpLocation;
+  int mvLocation;
+  int colorLocation;
+  int lightLocation[5];
+  bool extension_is_found;
+
+  std::vector<float> pos_points;
+  std::vector<float> pos_lines;
+  std::vector<float> pos_sphere;
+  std::vector<float> pos_sphere_inter;
+  std::vector<float> normals;
+  std::vector<float> normals_inter;
+  std::vector<float> trivial_center;
+  std::vector<float> normals_lines;
+
+  QOpenGLBuffer buffers[9];
+  QOpenGLVertexArrayObject vao[3];
+  QOpenGLShaderProgram rendering_program;
+  QOpenGLShaderProgram rendering_program_no_ext;
+  typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+  typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+  PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced;
+  PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor;
+
+  void initialize_buffers();
+  void compute_elements();
+  void attrib_buffers(QGLViewer*);
+  void compile_shaders();
+
+};
diff --git a/3rdparty/CGAL-4.8/demo/Convex_hull_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Convex_hull_3/CMakeLists.txt
new file mode 100644
index 0000000..ca7554e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Convex_hull_3/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Convex_hull_3_Demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  create_single_source_cgal_program( "quickhull_3_demo.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/demo/Convex_hull_3/README b/3rdparty/CGAL-4.8/demo/Convex_hull_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Convex_hull_3/README
rename to 3rdparty/CGAL-4.8/demo/Convex_hull_3/README
diff --git a/3rdparty/CGAL-4.6/demo/Convex_hull_3/quickhull_3_demo.cpp b/3rdparty/CGAL-4.8/demo/Convex_hull_3/quickhull_3_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Convex_hull_3/quickhull_3_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Convex_hull_3/quickhull_3_demo.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Generator/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Generator/CMakeLists.txt
new file mode 100644
index 0000000..03ecc8f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Generator/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (GeneratorDemo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+  #--------------------------------
+  # Demo: Generator_2
+  #--------------------------------
+  # UI files (Qt Designer files)
+  qt5_wrap_ui( DT_UI_FILES Generator_2.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( DT_RESOURCE_FILES ./Generator_2.qrc )
+
+  # use the Qt MOC preprocessor on classes that derives from QObject
+  qt5_generate_moc( "Generator_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Generator_2.moc" )
+
+  # The executable itself.
+  add_executable  ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+  qt5_use_modules(Generator_2 Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Generator_2 )
+
+  # Link with Qt libraries
+  target_link_libraries( Generator_2 ${QT_LIBRARIES} )
+  # And with CGAL libraries
+  target_link_libraries( Generator_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Generator/Generator_2.cpp b/3rdparty/CGAL-4.8/demo/Generator/Generator_2.cpp
new file mode 100644
index 0000000..586c903
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Generator/Generator_2.cpp
@@ -0,0 +1,349 @@
+#include <fstream>
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/Join_input_iterator.h>
+#include <CGAL/algorithm.h>
+#ifndef Q_MOC_RUN
+#include <CGAL/random_convex_hull_in_disc_2.h>
+#endif
+
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QInputDialog>
+#include <QFileDialog>
+#include <QGraphicsLineItem>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/PointsGraphicsItem.h>
+#include <CGAL/Qt/utility.h>
+#include <CGAL/Qt/SegmentsGraphicsItem.h>
+  
+// the two base classes
+#include "ui_Generator_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Vector_2 Vector_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Generator_2
+{
+  Q_OBJECT
+  
+private:
+
+
+
+  CGAL::Qt::Converter<K> convert;
+  std::vector<Point_2> points; 
+  std::vector<Segment_2> segments; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
+  CGAL::Qt::SegmentsGraphicsItem<std::vector<Segment_2> > * sgi;
+
+
+  template <typename G>
+  void
+  on_actionGenerate_triggered()
+  {
+    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+    CGAL::Qt::Converter<K> convert;  
+    Iso_rectangle_2 isor = convert(rect);
+    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
+    Vector_2 offset = center - CGAL::ORIGIN;
+    double w = isor.xmax() - isor.xmin();
+    double h = isor.ymax() - isor.ymin();
+    double radius = (w<h) ? w/2 : h/2;
+
+    G pg(radius);
+    bool ok = false;
+
+  const int number_of_points = 
+      QInputDialog::getInt(this, 
+                               tr("Number of random points"),
+                               tr("Enter number of random points"),
+                               100,
+                               0,
+                               (std::numeric_limits<int>::max)(),
+                               1,
+                               &ok);
+
+    if(!ok) {
+      return;
+    }
+
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    points.reserve(points.size() + number_of_points);
+    for(int i = 0; i < number_of_points; ++i){
+      points.push_back(*pg + offset);
+      ++pg;
+    }
+    // default cursor
+    QApplication::restoreOverrideCursor();
+    Q_EMIT( changed());
+  }
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void on_actionClear_triggered();
+
+
+  void on_actionRecenter_triggered();
+  void on_actionGeneratePointsOnCircle_triggered();
+  void on_actionGeneratePointsInSquare_triggered();
+  void on_actionGeneratePointsInDisc_triggered();
+  void on_actionGenerateSegments_triggered();
+  void on_actionGenerateSegmentFans_triggered();
+  void on_actionGeneratePolytopeInDisc_triggered();
+  void clear();
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  // Add a GraphicItem for the point set
+  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
+  sgi = new CGAL::Qt::SegmentsGraphicsItem<std::vector<Segment_2> >(&segments);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pgi, SLOT(modelChanged()));
+
+
+    QObject::connect(this, SIGNAL(changed()),
+  		   sgi, SLOT(modelChanged()));
+
+  pgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  sgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(pgi);
+  scene.addItem(sgi);
+
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+ 
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+
+  // Uncomment the following line to get antialiasing by default.
+//   actionUse_Antialiasing->setChecked(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Generator_2.html");
+  this->addAboutCGAL();
+
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  clear();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(pgi->boundingRect());
+  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+void
+MainWindow::on_actionGeneratePointsOnCircle_triggered()
+{
+  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInSquare_triggered()
+{
+  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInDisc_triggered()
+{
+  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGenerateSegments_triggered()
+{
+  segments.reserve(segments.size() + 200);
+  
+  // Prepare point generator for the horizontal segment, length 200.
+  typedef  CGAL::Random_points_on_segment_2<Point_2>  Rpos_generator;
+  Rpos_generator rpos( Point_2(-100,0), Point_2(100,0));
+  
+  // Prepare point generator for random points on circle, radius 250.
+  typedef  CGAL::Random_points_on_circle_2<Point_2>  Rpoc_generator;
+  Rpoc_generator rpoc( 250);
+  
+  // Create 200 segments.
+  typedef CGAL::Creator_uniform_2< Point_2, Segment_2> Seg_creator;
+  typedef CGAL::Join_input_iterator_2< Rpos_generator, Rpoc_generator, Seg_creator> Seg_iterator;
+  Seg_iterator g( rpos, rpoc);
+  CGAL::cpp11::copy_n( g, 200, std::back_inserter(segments));
+  
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionGenerateSegmentFans_triggered()
+{
+  typedef CGAL::Points_on_segment_2<Point_2>                PG;
+  typedef CGAL::Creator_uniform_2< Point_2, Segment_2>        Creator;
+  typedef CGAL::Join_input_iterator_2< PG, PG, Creator>   Segm_iterator;
+  typedef CGAL::Counting_iterator<Segm_iterator,Segment_2>  Count_iterator;
+
+  segments.reserve(segments.size() + 100);
+
+  // A horizontal like fan.
+  PG p1( Point_2(-250, -50), Point_2(-250, 50),50);   // Point generator.
+  PG p2( Point_2( 250,-250), Point_2( 250,250),50);
+  Segm_iterator  t1( p1, p2);                     // Segment generator.
+  Count_iterator t1_begin( t1);                   // Finite range.
+  Count_iterator t1_end(t1, 50);
+  std::copy( t1_begin, t1_end, std::back_inserter(segments));
+  
+  // A vertical like fan.
+  PG p3( Point_2( -50,-250), Point_2(  50,-250),50);
+  PG p4( Point_2(-250, 250), Point_2( 250, 250),50);
+  Segm_iterator  t2( p3, p4);
+  Count_iterator t2_begin( t2);
+  Count_iterator t2_end(t2, 50);
+  std::copy( t2_begin, t2_end, std::back_inserter(segments));
+
+  Q_EMIT( changed());
+}
+void
+MainWindow::on_actionGeneratePolytopeInDisc_triggered()
+{
+    boost::mt19937 gen;
+    gen.seed(time(0));
+    std::vector<Point_2> points;
+    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+    CGAL::Qt::Converter<K> convert;
+    Iso_rectangle_2 isor = convert(rect);
+    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
+    Vector_2 offset = center - CGAL::ORIGIN;
+    double w = isor.xmax() - isor.xmin();
+    double h = isor.ymax() - isor.ymin();
+    double radius = (w<h) ? w/2 : h/2;
+    
+    //G pg(radius);
+    bool ok = false;
+    const int number_of_points =
+    QInputDialog::getInt(this,
+                             tr("Number of random points in the disc"),
+                             tr("Enter number of random points.\nThe polytope will be the convex hull of these points."),
+                             100,
+                             0,
+                             (std::numeric_limits<int>::max)(),
+                             1,
+                             &ok);
+    
+    if(!ok) {
+        return;
+    }
+    
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    segments.reserve(segments.size() + 100);
+
+    CGAL::random_convex_hull_in_disc_2(number_of_points,radius,gen,std::back_inserter(points),K());
+    std::vector<Point_2>::iterator it2=points.begin();
+    for(std::vector<Point_2>::iterator it=points.begin();it!=points.end();it++){
+        it2++;
+        if (it2==points.end()) it2=points.begin();
+        Segment_2 p(*it+offset,*it2+offset);
+        segments.push_back(p);
+    }
+
+
+    // default cursor
+    QApplication::restoreOverrideCursor();
+    
+    Q_EMIT( changed());
+}
+
+void
+MainWindow::clear()
+{
+  points.clear();
+  segments.clear();
+}
+
+
+#include "Generator_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Generator_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Generator_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Generator/Generator_2.qrc b/3rdparty/CGAL-4.8/demo/Generator/Generator_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Generator/Generator_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Generator/Generator_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Generator/Generator_2.ui b/3rdparty/CGAL-4.8/demo/Generator/Generator_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Generator/Generator_2.ui
rename to 3rdparty/CGAL-4.8/demo/Generator/Generator_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Generator/about_Generator_2.html b/3rdparty/CGAL-4.8/demo/Generator/about_Generator_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Generator/about_Generator_2.html
rename to 3rdparty/CGAL-4.8/demo/Generator/about_Generator_2.html
diff --git a/3rdparty/CGAL-4.8/demo/Geomview/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Geomview/CMakeLists.txt
new file mode 100644
index 0000000..6ecbf00
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Geomview/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Geomview_Demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  create_single_source_cgal_program( "input.cpp" )
+  create_single_source_cgal_program( "kernel.cpp" )
+  create_single_source_cgal_program( "gv_terrain.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/README b/3rdparty/CGAL-4.8/demo/Geomview/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Geomview/README
rename to 3rdparty/CGAL-4.8/demo/Geomview/README
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/data/points3 b/3rdparty/CGAL-4.8/demo/Geomview/data/points3
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Geomview/data/points3
rename to 3rdparty/CGAL-4.8/demo/Geomview/data/points3
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/gv_terrain.cpp b/3rdparty/CGAL-4.8/demo/Geomview/gv_terrain.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Geomview/gv_terrain.cpp
rename to 3rdparty/CGAL-4.8/demo/Geomview/gv_terrain.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/input.cpp b/3rdparty/CGAL-4.8/demo/Geomview/input.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Geomview/input.cpp
rename to 3rdparty/CGAL-4.8/demo/Geomview/input.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Geomview/kernel.cpp b/3rdparty/CGAL-4.8/demo/Geomview/kernel.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Geomview/kernel.cpp
rename to 3rdparty/CGAL-4.8/demo/Geomview/kernel.cpp
diff --git a/3rdparty/CGAL-4.8/demo/GraphicsView/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/GraphicsView/CMakeLists.txt
new file mode 100644
index 0000000..2012948
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/GraphicsView/CMakeLists.txt
@@ -0,0 +1,35 @@
+# This is the CMake script for compiling a CGAL application.
+
+project (GraphicsView)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+
+  add_executable  ( min min.cpp )
+
+  qt5_use_modules(min Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS min )
+
+  # Link with Qt libraries
+  target_link_libraries( min ${QT_LIBRARIES} )
+  # Link with CGAL
+  target_link_libraries( min ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/GraphicsView/min.cpp b/3rdparty/CGAL-4.8/demo/GraphicsView/min.cpp
new file mode 100644
index 0000000..7258214
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/GraphicsView/min.cpp
@@ -0,0 +1,31 @@
+#include <iostream>
+#include <boost/format.hpp>
+#include <QtGui>
+#include <CGAL/Qt/GraphicsViewNavigation.h>
+#include <QLineF>
+#include <QRectF>
+#include <QApplication> 
+#include <QGraphicsScene>
+#include <QGraphicsView> 
+
+int main(int argc, char **argv)
+{
+    QApplication app(argc, argv);
+
+
+    QGraphicsScene scene;
+    scene.setSceneRect(0,0, 100, 100);
+    scene.addRect(QRectF(0,0, 100, 100));
+    scene.addLine(QLineF(0,0, 100, 100));
+    scene.addLine(QLineF(0,100, 100, 0));
+
+    QGraphicsView* view = new QGraphicsView(&scene);
+    CGAL::Qt::GraphicsViewNavigation navigation;
+    view->installEventFilter(&navigation);
+    view->viewport()->installEventFilter(&navigation);
+    view->setRenderHint(QPainter::Antialiasing);
+
+    view->show();
+    return app.exec();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Interpolation/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Interpolation/CMakeLists.txt
new file mode 100644
index 0000000..a10b1d7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Interpolation/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Interpolation_ )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "interpolation_2_demo.cpp" )
+  create_single_source_cgal_program( "surface_voronoi.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/demo/Interpolation/README b/3rdparty/CGAL-4.8/demo/Interpolation/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Interpolation/README
rename to 3rdparty/CGAL-4.8/demo/Interpolation/README
diff --git a/3rdparty/CGAL-4.6/demo/Interpolation/interpolation_2_demo.cpp b/3rdparty/CGAL-4.8/demo/Interpolation/interpolation_2_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Interpolation/interpolation_2_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Interpolation/interpolation_2_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Interpolation/surface_voronoi.cpp b/3rdparty/CGAL-4.8/demo/Interpolation/surface_voronoi.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Interpolation/surface_voronoi.cpp
rename to 3rdparty/CGAL-4.8/demo/Interpolation/surface_voronoi.cpp
diff --git a/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/CMakeLists.txt
new file mode 100644
index 0000000..1a41c66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/CMakeLists.txt
@@ -0,0 +1,52 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (L1_voronoi_diagram_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES L1_voronoi_diagram_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc )
+
+# The executable itself.
+add_executable  ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(L1_voronoi_diagram_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS L1_voronoi_diagram_2 )
+
+# Link with Qt libraries
+target_link_libraries( L1_voronoi_diagram_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp
new file mode 100644
index 0000000..ce35c9f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp
@@ -0,0 +1,396 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL:  $
+// $Id:  $
+// 
+//
+// Author(s)     : Ophir Setter <ophirset at post.tau.ac.il>
+//                 
+
+// CGAL headers
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/envelope_3.h>
+#include <CGAL/L1_voronoi_traits_2.h>
+#include <CGAL/point_generators_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+#include <fstream>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/ArrangementGraphicsItem.h>
+#include <CGAL/Qt/ArrangementPointInput.h>
+#include <CGAL/Qt/SetGraphicsItem.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_L1_voronoi_diagram_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+typedef Kernel::FT                                       Number_type;
+typedef Kernel::Iso_rectangle_2                          Iso_rectangle_2;
+typedef Kernel::Point_2                                  Point_2;
+typedef std::vector<Point_2>                             Points;
+
+typedef CGAL::L1_voronoi_traits_2<Kernel>                Traits_3;
+typedef Traits_3::Surface_3                              Surface_3;
+typedef CGAL::Envelope_diagram_2<Traits_3>               Envelope_diagram_2;
+
+namespace CGAL {
+  template <typename Kernel, typename T>
+  Qt::PainterOstream<T>&
+  operator<< (Qt::PainterOstream<T>& os,
+              const Arr_linear_object_2<Kernel> &obj) {
+    if (obj.is_segment())
+      os << obj.segment();
+    else if (obj.is_ray())
+      os << obj.ray();
+    else
+      os << obj.line();
+    
+    return os;
+  }
+}
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::L1_voronoi_diagram_2
+{
+  Q_OBJECT
+  
+private:
+  Points m_sites;
+  Envelope_diagram_2 *m_envelope_diagram;
+  QGraphicsScene m_scene;  
+
+  CGAL::Qt::ArrangementGraphicsItem<Envelope_diagram_2> *m_graphics_item;
+  CGAL::Qt::SetGraphicsItem<Points> * m_sites_graphics_item;
+  CGAL::Qt::ArrangementPointInput<Envelope_diagram_2> * m_pi;
+
+
+  void calculate_envelope();
+  QRectF bounding_rect();
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionInsertPoint_toggled(bool checked);
+
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionShowVoronoi_toggled(bool checked);
+
+  void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  // Add a GraphicItem for the diagram
+  m_envelope_diagram = new Envelope_diagram_2();
+  m_graphics_item = new CGAL::Qt::ArrangementGraphicsItem<Envelope_diagram_2>
+    (m_envelope_diagram);
+  
+  QObject::connect(this, SIGNAL(changed()),
+		   m_graphics_item, SLOT(modelChanged()));
+
+  m_graphics_item->
+    setVerticesPen(QPen(Qt::red, 
+                        3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  m_scene.addItem(m_graphics_item);
+  
+  // Add a GraphicItem for the sites
+  m_sites_graphics_item = new CGAL::Qt::SetGraphicsItem<Points>
+    (&m_sites);
+  
+  QObject::connect(this, SIGNAL(changed()),
+		   m_sites_graphics_item, SLOT(modelChanged()));
+
+  m_sites_graphics_item->
+    setPen(QPen(Qt::blue, 
+                5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  m_scene.addItem(m_sites_graphics_item);
+
+  
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism
+  // ophir
+  m_pi = new CGAL::Qt::ArrangementPointInput<Envelope_diagram_2>(this);
+  
+  QObject::connect(m_pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+  
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPoint);
+
+  // Check two actions 
+  this->actionInsertPoint->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  m_scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  m_scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&m_scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_L1_voronoi_diagram_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  Point_2 p;
+  if(CGAL::assign(p, o)){
+    m_sites.push_back(p);
+    calculate_envelope();
+  }
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPoint_toggled(bool checked)
+{
+  if(checked){
+    m_scene.installEventFilter(m_pi);
+  } else {
+    m_scene.removeEventFilter(m_pi);
+  }
+}
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  m_sites.clear();
+  calculate_envelope();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&m_scene);
+  CGAL::Qt::Converter<Kernel> convert;  
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     100,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  for(int i = 0; i < number_of_points; ++i){
+    m_sites.push_back(*pg++);
+  }
+  calculate_envelope();
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_sites.clear();
+  
+  std::ifstream ifs(qPrintable(fileName));
+  
+  Kernel::Point_2 p;
+  while(ifs >> p) {
+    m_sites.push_back(p);
+  }
+  calculate_envelope();
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()) {
+    std::ofstream ofs(qPrintable(fileName));
+    for(Points::iterator it = m_sites.begin();
+        it != m_sites.end(); ++it)
+      {
+        ofs << *it << std::endl;
+      }
+  }
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(bounding_rect());
+  this->graphicsView->fitInView(bounding_rect(), Qt::KeepAspectRatio);  
+}
+
+void
+MainWindow::on_actionShowVoronoi_toggled(bool checked)
+{
+  this->m_graphics_item->setVisible(checked);
+}
+
+
+void
+MainWindow::calculate_envelope() {
+  if (m_envelope_diagram != NULL) {
+    m_graphics_item->setArrangement(NULL);
+    delete m_envelope_diagram;
+    m_envelope_diagram = NULL;
+  }
+  
+  m_envelope_diagram = new Envelope_diagram_2();
+  m_graphics_item->setArrangement(m_envelope_diagram);
+    
+  CGAL::lower_envelope_3 (m_sites.begin(), m_sites.end(), *m_envelope_diagram);
+}
+
+QRectF
+MainWindow::bounding_rect() {
+  CGAL::Bbox_2 bbox(0, 0, 0, 0);
+
+  if (m_envelope_diagram != NULL) {
+    for (Envelope_diagram_2::Vertex_iterator it = 
+           m_envelope_diagram->vertices_begin();
+         it != m_envelope_diagram->vertices_end(); ++it) {
+      double x = CGAL::to_double(it->point().x());
+      double y = CGAL::to_double(it->point().y());
+      CGAL::Bbox_2 temp(x, y, x, y);
+      bbox = bbox + temp;
+    }
+  }
+  
+  QRectF rect(bbox.xmin(),
+              bbox.ymin(), 
+              bbox.xmax() - bbox.xmin(),
+              bbox.ymax() - bbox.ymin());
+  
+  return rect;
+}
+
+
+#include "L1_voronoi_diagram_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("L1 Voronoi diagram_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
+
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.qrc b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.qrc
rename to 3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.ui b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.ui
rename to 3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/about_L1_voronoi_diagram_2.html b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/about_L1_voronoi_diagram_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/about_L1_voronoi_diagram_2.html
rename to 3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/about_L1_voronoi_diagram_2.html
diff --git a/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h
new file mode 100644
index 0000000..bc583ae
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h
@@ -0,0 +1,343 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Envelope_3/include/CGAL/Env_plane_traits_3.h $
+// $Id: Env_plane_traits_3.h 51989 2009-09-21 10:55:53Z efif $
+//
+// Author(s)     : Ophir Setter
+
+#ifndef CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
+#define CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/tags.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/enum.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/number_utils.h> 
+#include <CGAL/Envelope_3/Envelope_base.h>
+#include <CGAL/Envelope_3/Env_plane_traits_3_functions.h>
+
+namespace CGAL{
+
+template <class Kernel_>
+class L1_voronoi_traits_2 : public Arr_linear_traits_2<Kernel_>
+{
+public:
+  typedef Kernel_                              Kernel;
+  typedef typename Kernel::FT                  FT;
+  typedef Arr_linear_traits_2<Kernel>          Base;
+  typedef L1_voronoi_traits_2<Kernel>        Self;
+
+  typedef typename Base::Multiplicity          Multiplicity;
+  typedef typename Base::Point_2               Point_2;
+  typedef typename Base::Curve_2               Curve_2;
+  typedef typename Base::X_monotone_curve_2    X_monotone_curve_2;
+  typedef typename Kernel::Segment_2           Segment_2;
+  typedef typename Kernel::Ray_2               Ray_2;
+  typedef typename Kernel::Line_2              Line_2;
+  typedef typename Kernel::Direction_2         Direction_2;
+  typedef std::pair<Curve_2, Multiplicity>     Intersection_curve;
+
+  typedef typename Base::Left_side_category    Left_side_category;
+  typedef typename Base::Bottom_side_category  Bottom_side_category;
+  typedef typename Base::Top_side_category     Top_side_category;
+  typedef typename Base::Right_side_category   Right_side_category;
+  
+  typedef Point_2                  Xy_monotone_surface_3;
+  typedef Point_2                  Surface_3;
+
+  // Returns the distance between a two points in L1 metric.
+  static FT distance(const Point_2& p1, const Point_2& p2) {
+    FT dist = CGAL::abs(p1.x() - p2.x()) + CGAL::abs(p1.y() - p2.y());
+    return dist;
+  }
+
+  // Returns the midpoint (under the L1 metric) that is on the rectangle
+  // defined by the two points (the rectangle can be degenerate).
+  // As there are to enpoints, the index determines which is returned
+  static Point_2 midpoint(const Point_2& p1, const Point_2& p2, std::size_t index) {
+    const Point_2 *pp1;
+    const Point_2 *pp2;
+    
+    if (index % 2 == 0) {
+      pp1 = &p1;
+      pp2 = &p2;
+    } else {
+      pp1 = &p2;
+      pp2 = &p1;
+    }
+
+
+    FT delta_x = pp2->x() - pp1->x();
+    FT delta_y = pp2->y() - pp1->y();
+    
+    FT sign_x = CGAL::sign(delta_x);
+    FT sign_y = CGAL::sign(delta_y);
+
+    FT abs_x = CGAL::abs(delta_x);
+    FT abs_y = CGAL::abs(delta_y);
+
+    FT dist = (abs_x + abs_y) / 2;
+    FT mid_x = pp1->x();
+    FT mid_y = pp1->y();
+    
+    // Walk on the horizontal edge of the rectangle and then on the vertical.
+
+    // There is a chance that the width of the rectangle is smaller then the mid-dist.
+    FT walk_x = (CGAL::min)(abs_x, dist);
+    mid_x += sign_x * walk_x;
+    dist -= walk_x;
+    
+    CGAL_assertion(abs_y > dist);
+    mid_y += sign_y * dist;
+    
+    return Point_2(mid_x, mid_y);
+  }
+
+  static Comparison_result compare_z_at_xy (const X_monotone_curve_2& cv,
+                                            const Xy_monotone_surface_3& h1,
+                                            const Xy_monotone_surface_3& h2,
+                                            bool above) {
+    CGAL::Comparison_result side = (above == true) ? CGAL::LARGER : CGAL::SMALLER;
+
+    Line_2 l;
+    if (cv.is_segment())
+      l = cv.segment().supporting_line();
+    else if (cv.is_ray())
+      l = cv.ray().supporting_line();
+    else
+      l = cv.line();
+
+    if (l.is_vertical()) {
+      // Could be a tie.
+      // To be "above" the curve, we acutually need to have smaller x coordinate,
+      // the order of the comparison function here is opposite to the none vertical
+      // case.
+      side = CGAL::opposite(side);
+      CGAL::Comparison_result res = CGAL::compare_x_at_y(h1, l);
+      if (res == side)
+        return CGAL::SMALLER;
+
+      res = CGAL::compare_x_at_y(h2, l);
+      if (res == side)
+        return CGAL::LARGER;
+
+      return CGAL::EQUAL;
+    } else {
+      // One of the points in indeed closer (tie can only happen on vertical lines).
+      CGAL::Comparison_result res = CGAL::compare_y_at_x(h1, l);
+      if (l.is_horizontal()) {
+        CGAL_assertion(CGAL::compare_y_at_x(h2, l) != res);
+        if (res == side)
+          return CGAL::SMALLER;
+
+        res = CGAL::compare_y_at_x(h2, l);
+        if (res == side)
+          return CGAL::LARGER;
+        
+        return CGAL::EQUAL;
+      }
+      
+      CGAL_assertion(CGAL::compare_y_at_x(h2, l) == CGAL::opposite(res));
+      if (res == side) 
+        return CGAL::SMALLER;
+      else
+        return CGAL::LARGER;
+    }
+  }
+  class Make_xy_monotone_3 {
+  public:
+    template <class OutputIterator>
+      OutputIterator operator()(const Surface_3& s,
+                                bool /* is_lower */,
+                                OutputIterator o) const {
+      *o++ = s;
+      return o;
+    }
+  };
+  
+  Make_xy_monotone_3 make_xy_monotone_3_object() const {
+    return Make_xy_monotone_3();
+  }
+  
+  class Compare_z_at_xy_3 {
+  public:
+    Comparison_result operator()(const Point_2& p,
+                                 const Xy_monotone_surface_3& h1,
+                                 const Xy_monotone_surface_3& h2) const {
+      return CGAL::compare(distance(p, h1), distance(p, h2));
+    }
+
+    Comparison_result operator()(const X_monotone_curve_2& cv,
+                                 const Xy_monotone_surface_3& h1,
+                                 const Xy_monotone_surface_3& h2) const {
+      Kernel k;
+      Point_2 p;
+      if(cv.is_segment())
+        p = k.construct_midpoint_2_object()(cv.left(), cv.right());
+      else
+        if(cv.is_ray())
+          p = k.construct_point_on_2_object()(cv.ray(), 1);
+        else {
+          CGAL_assertion(cv.is_line());
+          p = k.construct_point_on_2_object()(cv.line(), 1);
+        }
+      return this->operator()(p, h1, h2); 
+    }
+    
+    Comparison_result operator()(const Xy_monotone_surface_3& h1,
+                                 const Xy_monotone_surface_3& h2) const {
+      // should happen only if the points are equal.
+      CGAL_assertion(h1 == h2); CGAL_USE(h1); CGAL_USE(h2);
+      return EQUAL;
+    }
+  };
+
+  Compare_z_at_xy_3 compare_z_at_xy_3_object() const
+  {
+    return Compare_z_at_xy_3();
+  }
+
+  class Compare_z_at_xy_above_3
+  {
+  public:
+    Comparison_result operator()(const X_monotone_curve_2& cv,
+                                 const Xy_monotone_surface_3& h1,
+                                 const Xy_monotone_surface_3& h2) const {
+      return compare_z_at_xy (cv, h1, h2, true);
+    }
+
+  };
+
+  Compare_z_at_xy_above_3 compare_z_at_xy_above_3_object() const
+  {
+    return Compare_z_at_xy_above_3();
+  }
+
+  class Compare_z_at_xy_below_3
+  {
+  public:
+    Comparison_result operator()(const X_monotone_curve_2& cv,
+                                 const Xy_monotone_surface_3& h1,
+                                 const Xy_monotone_surface_3& h2) const {
+      return compare_z_at_xy (cv, h1, h2, false);
+    }
+  };
+
+  Compare_z_at_xy_below_3 compare_z_at_xy_below_3_object() const {
+    return Compare_z_at_xy_below_3();
+  }
+  
+  class Construct_projected_boundary_2 {
+  public:
+    template <class OutputIterator>
+    OutputIterator operator()(const Xy_monotone_surface_3& ,
+                              OutputIterator o) const {
+      return o;
+    }
+  };
+
+  Construct_projected_boundary_2 
+  construct_projected_boundary_2_object() const
+  {
+    return Construct_projected_boundary_2();
+  }
+
+
+  class Construct_projected_intersections_2 {
+  public:
+    template <class OutputIterator>
+      OutputIterator operator()(const Xy_monotone_surface_3& s1,
+                                const Xy_monotone_surface_3& s2,
+                                OutputIterator o) const {
+      // The bisector construction is based on the description of the bisector
+      // from Handbook of Computational Geometry - the chapter on Voronoi diagrams
+      // by F. Aurenhammer and R. Klein.
+
+      FT delta_x = s2.x() - s1.x();
+      FT delta_y = s2.y() - s1.y();
+
+      CGAL::Sign s_x = CGAL::sign(delta_x);
+      CGAL::Sign s_y = CGAL::sign(delta_y);
+
+      if (s_x == CGAL::ZERO && s_y == CGAL::ZERO)
+        return o;
+      
+      // The sites have the same x/y coordinate.
+      if (s_x == CGAL::ZERO || s_y == CGAL::ZERO) {
+        *o++ = CGAL::make_object(Intersection_curve(CGAL::bisector(s1, s2), 1));
+        return o;
+      }
+
+      Point_2 p1 = midpoint(s1, s2, 0);
+      Point_2 p2 = midpoint(s1, s2, 1);
+      CGAL_assertion(p1 != p2);
+
+      Point_2 *top, *bottom, *left, *right;
+      if (CGAL::sign(p2.x() - p1.x()) == CGAL::POSITIVE) {
+        left = &p1;
+        right = &p2;
+      }
+      else {
+        CGAL_assertion(CGAL::sign(p2.x() - p1.x()) == CGAL::NEGATIVE);
+        left = &p2;
+        right = &p1;
+      }
+      
+      if (CGAL::sign(p2.y() - p1.y()) == CGAL::POSITIVE) {
+        bottom = &p1;
+        top = &p2;
+      }
+      else {
+        CGAL_assertion(CGAL::sign(p2.y() - p1.y()) == CGAL::NEGATIVE);
+        bottom = &p2;
+        top = &p1;
+      }
+      
+      // We construct the diagonal line either way.
+      *o++ = CGAL::make_object(Intersection_curve(Segment_2(p1, p2), 1));
+
+      // Now construct vertical rays. Two or four rays. If it is only two rays,
+      // then the multiplicity of all the curves is 1.
+      CGAL::Sign s_d = CGAL::sign(CGAL::abs(delta_y) - CGAL::abs(delta_x));
+      int mult = (s_d == CGAL::ZERO) ? 0 : 1;
+
+      if (s_d != CGAL::POSITIVE) {
+        // horizontal rectangle or square = vertical rays.
+        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*top, Direction_2(0, 1)), mult));
+        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*bottom, Direction_2(0, -1)), mult));
+      }
+
+      if (s_d != CGAL::NEGATIVE) {
+        // vertical rectangle or square = horizontal rays.
+        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*right, Direction_2(1, 0)), mult));
+        *o++ = CGAL::make_object(Intersection_curve(Ray_2(*left, Direction_2(-1, 0)), mult));
+      }
+      
+      return o;
+    }
+  };
+
+  Construct_projected_intersections_2
+  construct_projected_intersections_2_object() const {
+    return Construct_projected_intersections_2();
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_L1_VORONOI_DIAGRAM_TRAITS_2_H
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementGraphicsItem.h b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h
new file mode 100644
index 0000000..8eef1d1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/ArrangementPointInput.h
@@ -0,0 +1,78 @@
+
+#ifndef CGAL_QT_ARRANGEMENT_POINT_INPUT_H
+#define CGAL_QT_ARRANGEMENT_POINT_INPUT_H
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename Arrangement>
+class ArrangementPointInput : public GraphicsViewInput
+{
+public:
+  typedef typename Arrangement::Geometry_traits_2::Kernel Kernel;
+  typedef typename Kernel::Point_2                        Point_2;
+
+  ArrangementPointInput(QObject* parent);
+  
+protected:
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  Converter<Kernel> m_convert;
+  Point_2 m_p;
+};
+
+
+template <typename T>
+ArrangementPointInput<T>::ArrangementPointInput(QObject* parent)
+  :  GraphicsViewInput(parent)
+{}
+
+template <typename T>
+void 
+ArrangementPointInput<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  m_p = m_convert(event->scenePos());
+}
+
+
+template <typename T>
+void 
+ArrangementPointInput<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent* )
+{
+  Q_EMIT (generate(CGAL::make_object(m_p)));
+}
+
+
+
+template <typename T>
+bool 
+ArrangementPointInput<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_ARRANGEMENT_POINT_INPUT_H
diff --git a/3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/SetGraphicsItem.h b/3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/SetGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/SetGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/L1_Voronoi_diagram_2/include/CGAL/Qt/SetGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/CMakeLists.txt
new file mode 100644
index 0000000..51ee7e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Largest_empty_rectangleDemo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+  
+  #--------------------------------
+  # Demo: Largest_empty_rectangle_2
+  #--------------------------------
+  # UI files (Qt Designer files)
+  qt5_wrap_ui( DT_UI_FILES Largest_empty_rectangle_2.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( DT_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc )
+
+  # use the Qt MOC preprocessor on classes that derives from QObject
+  qt5_generate_moc( Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc )
+
+  # The executable itself.
+  add_executable  ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+  qt5_use_modules(Largest_empty_rectangle_2 Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Largest_empty_rectangle_2 )
+
+  # Link with Qt libraries
+  target_link_libraries( Largest_empty_rectangle_2 ${QT_LIBRARIES} )
+  # And with CGAL libraries
+  target_link_libraries( Largest_empty_rectangle_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp
new file mode 100644
index 0000000..aaabae4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp
@@ -0,0 +1,293 @@
+#include <fstream>
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Largest_empty_iso_rectangle_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QGraphicsRectItem>
+#include <QGraphicsLineItem>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/PointsGraphicsItem.h>
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Largest_empty_rectangle_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Vector_2 Vector_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+typedef CGAL::Largest_empty_iso_rectangle_2<K> Largest_empty_iso_rectangle_2;
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Largest_empty_rectangle_2
+{
+  Q_OBJECT
+  
+private:
+
+  Iso_rectangle_2 square;
+  Largest_empty_iso_rectangle_2 ler;
+  CGAL::Qt::Converter<K> convert;
+  std::vector<Point_2> points; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> > * pgi;
+  QGraphicsRectItem * rgi;
+  QGraphicsLineItem* frame[4];
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+  template <typename G>
+  void
+  on_actionGenerate_triggered()
+  {
+    Iso_rectangle_2 isor = square;
+    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
+    Vector_2 offset = center - CGAL::ORIGIN;
+    double w = isor.xmax() - isor.xmin();
+    double h = isor.ymax() - isor.ymin();
+    double radius = (w<h) ? w/2 : h/2;
+
+    G pg(radius);
+    bool ok = false;
+
+    const int number_of_points = 
+      QInputDialog::getInt(this, 
+                               tr("Number of random points"),
+                               tr("Enter number of random points"),
+                               100,
+                               0,
+                               (std::numeric_limits<int>::max)(),
+                               1,
+                               &ok);
+
+    if(!ok) {
+      return;
+    }
+
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    points.reserve(points.size() + number_of_points);
+    for(int i = 0; i < number_of_points; ++i){
+      points.push_back(*pg + offset);
+      ler.insert(points.back());
+      ++pg;
+    }
+    
+    // default cursor
+    QApplication::restoreOverrideCursor();
+    Q_EMIT( changed());
+  }
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void on_actionClear_triggered();
+
+  void processInput(CGAL::Object);
+
+  void on_actionRecenter_triggered();
+  void on_actionGeneratePointsOnCircle_triggered();
+  void on_actionGeneratePointsInSquare_triggered();
+  void on_actionGeneratePointsInDisc_triggered();
+  void clear();
+
+  void update_largest_empty_rectangle();
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow(), square(Point_2(-1, -1), Point_2(1,1)), ler(square)
+{
+  setupUi(this);
+
+  // Add a GraphicItem for the point set
+  pgi = new CGAL::Qt::PointsGraphicsItem<std::vector<Point_2> >(&points);
+
+  rgi = new QGraphicsRectItem(convert(square));
+
+  Point_2 bl(-1,-1), br(1,-1), tl(-1,1), tr(1,1);
+
+
+  frame[0] = new QGraphicsLineItem(convert(Segment_2(bl, br)));
+  frame[1] = new QGraphicsLineItem(convert(Segment_2(br, tr)));
+  frame[2] = new QGraphicsLineItem(convert(Segment_2(tr, tl)));
+  frame[3] = new QGraphicsLineItem(convert(Segment_2(tl, bl)));
+  for(int i=0; i<4; i++)
+    frame[i]->setPen(QPen(::Qt::black, 0));
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pgi, SLOT(modelChanged()));
+
+  QObject::connect(this, SIGNAL(changed()),
+		   this, SLOT(update_largest_empty_rectangle()));
+
+  pgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  rgi->setBrush(QBrush(Qt::cyan));
+  rgi->setPen(QPen(::Qt::black, 0));
+  scene.addItem(pgi);
+  scene.addItem(rgi);
+  scene.addItem(frame[0]);
+  scene.addItem(frame[1]);
+  scene.addItem(frame[2]);
+  scene.addItem(frame[3]);
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+ 
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 1, false); // inputs a list with one point
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+   
+  scene.installEventFilter(pi);
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-1, -1, 1, 1);
+  this->graphicsView->setScene(&scene);
+
+  // Uncomment the following line to get antialiasing by default.
+//   actionUse_Antialiasing->setChecked(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Largest_empty_rectangle_2.html");
+  this->addAboutCGAL();
+
+
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::list<Point_2> input;
+  if(CGAL::assign(input, o)){
+    if(input.size() == 1) {
+      Point_2 p = input.front();
+      if(! square.has_on_unbounded_side(p)){
+        points.push_back(p);
+        ler.insert(p);
+      }
+    }
+    Q_EMIT( changed());
+  }
+
+}
+
+
+void
+MainWindow::update_largest_empty_rectangle()
+{
+  rgi->setRect(convert(ler.get_largest_empty_iso_rectangle()));
+}
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  clear();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(convert(square));
+  this->graphicsView->fitInView(convert(square), Qt::KeepAspectRatio);  
+}
+
+void
+MainWindow::on_actionGeneratePointsOnCircle_triggered()
+{
+  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInSquare_triggered()
+{
+  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInDisc_triggered()
+{
+  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+
+void
+MainWindow::clear()
+{
+  points.clear();
+  ler.clear();
+  rgi->setRect(convert(square));
+}
+
+
+#include "Largest_empty_rectangle_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Largest_empty_rectangle_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Largest_empty_rectangle_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  mainWindow.on_actionRecenter_triggered();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.qrc b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui
rename to 3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/about_Largest_empty_rectangle_2.html b/3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/about_Largest_empty_rectangle_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Largest_empty_rect_2/about_Largest_empty_rectangle_2.html
rename to 3rdparty/CGAL-4.8/demo/Largest_empty_rect_2/about_Largest_empty_rectangle_2.html
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CMakeLists.txt
new file mode 100644
index 0000000..763c25d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CMakeLists.txt
@@ -0,0 +1,78 @@
+# Created by the script cgal_create_cmake_script (and then adapted manually).
+# This is the CMake script for compiling a CGAL application.
+# cmake ../ -DCMAKE_BUILD_TYPE=Debug
+
+project (Linear_cell_complex_3_demo)
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+## To add expensive tests
+# add_definitions("-DCGAL_CHECK_EXPENSIVE")
+# add_definitions("-Wall -Wextra")
+
+## For profilling with gprof
+# add_definitions("-pg")
+# SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
+
+## To add an is_valid test after each operation (only in debug mode)
+# add_definitions("-DCGAL_CMAP_TEST_VALID_REMOVALS")
+# add_definitions("-DCGAL_CMAP_TEST_VALID_CONTRACTIONS")
+# add_definitions("-DCGAL_CMAP_TEST_VALID_INSERTIONS")
+
+# Option allowing to profile each operation of the demo (cout times on stdout).
+add_definitions(-DCGAL_PROFILE_LCC_DEMO)
+
+##################
+find_package(CGAL COMPONENTS Qt5)
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+find_package(OpenGL)
+find_package(QGLViewer)
+
+if ( NOT (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND
+      OPENGL_FOUND AND QGLVIEWER_FOUND) )
+
+  MESSAGE(STATUS "NOTICE: This demo requires CGAL, QGLViewer, OpenGL "
+    "and Qt5, and will not be compiled.")
+
+else()
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+include_directories(${QGLVIEWER_INCLUDE_DIR})
+include_directories(BEFORE . ../../include/)
+
+# ui file, created wih Qt Designer
+qt5_wrap_ui(uis MainWindow.ui CreateMesh.ui CreateMenger.ui
+                CreateSierpinskiCarpet.ui CreateSierpinskiTriangle.ui)
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources (RESOURCE_FILES ./Linear_cell_complex_3.qrc)
+
+
+add_executable(Linear_cell_complex_3_demo
+  Linear_cell_complex_3_demo.cpp MainWindow.cpp
+  Viewer.cpp Linear_cell_complex_3_subdivision.cpp
+  Linear_cell_complex_pqq_subdivision.cpp
+  ${uis} ${RESOURCE_FILES} )
+
+qt5_use_modules(Linear_cell_complex_3_demo Xml Script OpenGL Svg)
+add_to_cached_list(CGAL_EXECUTABLE_TARGETS Linear_cell_complex_3_demo)
+
+target_link_libraries(Linear_cell_complex_3_demo ${CGAL_LIBRARIES}
+                                                 ${CGAL_3RD_PARTY_LIBRARIES})
+target_link_libraries(Linear_cell_complex_3_demo ${QT_LIBRARIES}
+                                                 ${QGLVIEWER_LIBRARIES} )
+target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY} )
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateMenger.ui b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateMenger.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateMenger.ui
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateMenger.ui
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateMesh.ui b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateMesh.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateMesh.ui
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateMesh.ui
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateSierpinskiCarpet.ui b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateSierpinskiCarpet.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateSierpinskiCarpet.ui
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateSierpinskiCarpet.ui
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateSierpinskiTriangle.ui b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateSierpinskiTriangle.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/CreateSierpinskiTriangle.ui
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/CreateSierpinskiTriangle.ui
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3.qrc b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/Linear_cell_complex_3.qrc
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp
new file mode 100644
index 0000000..644c8a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp
@@ -0,0 +1,53 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#include "MainWindow.h"
+#include "typedefs.h"
+#include <QApplication>
+#include <CGAL/Qt/resources.h>
+#include <CGAL/assertions_behaviour.h>
+
+// Global random
+CGAL::Random myrandom;
+
+int main(int argc, char** argv)
+{
+  // std::cout<<"Size of dart: "<<sizeof(LCC::Dart)<<std::endl;
+  CGAL::set_error_behaviour(CGAL::ABORT);
+
+  QApplication application(argc,argv);
+  
+  application.setOrganizationDomain("cgal.org");
+  application.setOrganizationName("CNRS and LIRIS' Establishments");
+  application.setApplicationName("3D Linear Cell Complex");
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  application.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGALQt5
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_Qt_init_resources();// that function is in a DLL
+  Q_INIT_RESOURCE(Linear_cell_complex_3);
+
+  MainWindow mw;
+  mw.show();
+
+  return application.exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp
new file mode 100644
index 0000000..1dcb27c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp
@@ -0,0 +1,202 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#include "typedefs.h"
+
+#define PI 3.1415926535897932
+
+// Smoth a vertex depending on the vertices of its incident facet.
+class Smooth_old_vertex
+{
+public:
+  /**  Constructor.
+   * @param alcc is the lcc to smooth
+   * @param amark is a mark designing old darts (i.e. darts not created during
+   *        the triangulation step)
+   */
+  Smooth_old_vertex (LCC & alcc, LCC::size_type /* TODO amark*/):mlcc (alcc)
+  {
+  }
+
+  Vertex operator  () (Vertex & v) const
+  {
+    Dart_handle d = v.dart ();
+
+    int degree = 0;
+    bool open = false;
+
+    LCC::One_dart_per_incident_cell_range<1,0>::iterator it (mlcc, d),
+      itend(mlcc.one_dart_per_incident_cell<1,0>(d).end());
+    for (; it != itend; ++it)
+    {
+      ++degree;
+      if (mlcc.is_free(it, 2)) open = true;
+    }
+
+    if (open)
+      return v;
+
+    LCC::FT alpha = (4.0f - 2.0f *
+                     (LCC::FT) cos (2.0f * PI / (LCC::FT) degree)) / 9.0f;
+    LCC::Vector vec =
+      LCC::Traits::Construct_scaled_vector()
+      ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point()), (1.0f - alpha));
+
+    for (it.rewind (); it != itend; ++it)
+    {
+      CGAL_assertion (!mlcc.is_free(it,2));
+      vec = vec + (mlcc.point(mlcc.beta(it,2)) - CGAL::ORIGIN)
+        * alpha / degree;
+    }
+
+    Vertex res= LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, vec);
+    res.set_dart (d);
+
+    return res;
+  }
+private:
+  LCC & mlcc;
+};
+
+// Flip an edge, work only in 2D and 3D
+Dart_handle
+flip_edge (LCC & m, Dart_handle d)
+{
+  CGAL_assertion ( !m.is_free(d,2) );
+  CGAL_assertion ( !m.is_free(d,1) && !m.is_free(d,0) );
+  CGAL_assertion ( !m.is_free(m.beta(d,2), 0) && !m.is_free(m.beta(d, 2), 1) );
+  
+  if (!CGAL::is_removable<LCC,1>(m,d)) return LCC::null_handle;
+
+  Dart_handle d1 = m.beta(d,1);
+  Dart_handle d2 = m.beta(d,2,0);
+
+  CGAL_assertion ( !m.is_free(d1,1) && !m.is_free(d2,0) );
+
+  Dart_handle d3 = m.beta(d1,1);
+  Dart_handle d4 = m.beta(d2, 0);
+
+  // We isolated the edge
+  m.basic_link_beta_1(m.beta(d,0), m.beta(d,2,1));
+  m.basic_link_beta_0(m.beta(d,1), m.beta(d,2,0));
+  if ( !m.is_free(d,3) )
+  {
+    m.basic_link_beta_0(m.beta(d,0,3), m.beta(d,2,1,3));
+    m.basic_link_beta_1(m.beta(d,1,3), m.beta(d,2,0,3));
+  }
+
+  // Then we push the two extremities.
+  m.basic_link_beta_0(d3, d);
+  m.basic_link_beta_0(d2, m.beta(d,2));
+  m.link_beta_1(d4, d);
+  m.link_beta_1(d1, m.beta(d,2));
+
+  if ( !m.is_free(d,3) )
+  {
+    m.basic_link_beta_0(m.beta(d4,3), m.beta(d,3));
+    m.basic_link_beta_0(m.beta(d1,3), m.beta(d,2,3));
+    m.link_beta_1(m.beta(d3,3), m.beta(d,3));
+    m.link_beta_1(m.beta(d2,3), m.beta(d,2,3));
+  }
+  
+  // CGAL::remove_cell<LCC,1>(m, d);
+  // insert_cell_1_in_cell_2(m, d1, d1->beta(1)->beta(1));
+
+  return d;
+}
+
+// Subdivide each facet of the lcc by using sqrt(3)-subdivision.
+void
+subdivide_lcc_3 (LCC & m)
+{
+  if (m.number_of_darts () == 0)
+    return;
+
+  LCC::size_type mark = m.get_new_mark ();
+  LCC::size_type treated = m.get_new_mark ();
+  m.negate_mark (mark);  // All the old darts are marked in O(1).
+
+  // 1) We smoth the old vertices.
+  std::vector < Vertex > vertices;  // smooth the old vertices
+  vertices.reserve (m.number_of_attributes<0> ());  // get intermediate space
+  std::transform (m.vertex_attributes().begin (), 
+		  m.vertex_attributes().end (),
+		  std::back_inserter (vertices), 
+		  Smooth_old_vertex (m, mark));
+
+  // 2) We subdivide each facet.
+  m.negate_mark (treated);  // All the darts are marked in O(1).
+  unsigned int nb = 0;
+  for (LCC::Dart_range::iterator it (m.darts().begin ());
+       m.number_of_marked_darts (treated) > 0; ++it)
+  {
+    ++nb;
+    if (m.is_marked (it, treated))
+    {
+      // We unmark the darts of the facet to process only once dart/facet.
+      CGAL::unmark_cell < LCC, 2 > (m, it, treated);
+      // We triangulate the facet.
+      m.insert_barycenter_in_cell<2>(it);
+    }
+  }
+
+  CGAL_assertion (m.is_whole_map_unmarked (treated));
+  CGAL_assertion (m.is_valid ());
+  m.free_mark (treated);
+
+  // 3) We update the coordinates of old vertices.
+  for (std::vector < Vertex >::iterator vit = vertices.begin ();
+       vit != vertices.end (); ++vit)
+  {
+    m.point(vit->dart())=vit->point();
+  }
+
+  // 4) We flip all the old edges.
+  m.negate_mark (mark);  // Now only new darts are marked.
+  Dart_handle d2 =LCC::null_handle;
+  for (LCC::Dart_range::iterator it (m.darts().begin ());
+       it != m.darts().end ();)
+  {
+    d2 = it++;
+    if (!m.is_marked (d2, mark))  // This is an old dart.
+    {
+      // We process only the last dart of a same edge.
+      if (!m.is_free(d2,2) && (m.beta(d2,2,3)==m.beta(d2,3,2)))
+      {
+        if (m.is_marked(m.beta(d2,2), mark) &&
+            (m.is_free(d2,3) ||
+             (m.is_marked(m.beta(d2,3), mark) &&
+              m.is_marked(m.beta(d2,2,3), mark))))
+        {
+          flip_edge (m, d2);
+          m.mark(d2, mark);
+        }
+        else
+          m.mark (d2, mark);
+      }
+      else
+        m.mark (d2, mark);
+    }
+  }
+
+  CGAL_assertion (m.is_whole_map_marked (mark));
+  m.free_mark (mark);
+  
+  CGAL_postcondition ( m.is_valid ());
+}
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp
new file mode 100644
index 0000000..dbec290
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp
@@ -0,0 +1,327 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr> 
+//		   Jérémy Girerd-Rey <jeremy.girerd-rey at etu.univ-lyon1.fr>
+//
+
+#include "typedefs.h"
+
+// Smooth a vertex depending on the vertices of its incidents facets.
+class Smooth_edge_pqq
+{
+public:
+  /**  Constructor.
+   * @param alcc is the lcc to smooth
+   * @param amark is a mark designing old darts (i.e. darts not created during
+   *        the subdivision step)
+   */
+  Smooth_edge_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o)
+  {
+  }
+
+  Vertex operator  () (Vertex & v) const
+  {
+    Dart_handle d = v.dart ();
+
+    // Old points aren't concerned.
+    if (mlcc.is_marked(d, old))
+    {       
+    return v;
+    }
+
+    std::vector<LCC::Point> facetsPoints;
+    facetsPoints.resize(0);
+
+    // We search barycenter point of incidents facets.
+    for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it =
+           mlcc.one_dart_per_incident_cell<1,0>(d).begin();
+         it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
+    {
+      // If the vertex is on a border.
+      if (mlcc.is_free(it,2))
+      { 
+        return v;
+      }
+      // If we found barycenter of a facet.
+      if (!mlcc.is_marked(mlcc.opposite(it), old))
+      {       
+        facetsPoints.push_back(mlcc.point(mlcc.opposite(it)));
+      }
+    }
+
+    // If we found more than two points we are on a vertice barycenter of a facet.
+    // They aren't concerned.
+    if (facetsPoints.size() > 2 || facetsPoints.size() < 2)
+    {       
+      return v;
+    }
+
+    // Average.
+    LCC::Vector averageFacetsV = LCC::Traits::Construct_vector() 
+			          ( CGAL::ORIGIN, LCC::Point(0,0,0) );                                                   
+
+    for (unsigned int i=0; i < facetsPoints.size(); i++)
+    {
+      averageFacetsV = LCC::Traits::Construct_sum_of_vectors()
+      		       (averageFacetsV, 
+       		       LCC::Traits::Construct_vector() (CGAL::ORIGIN, facetsPoints[i]));
+     }
+
+    averageFacetsV = LCC::Traits::Construct_scaled_vector()
+                     ( averageFacetsV, (1.0f/facetsPoints.size()) );
+
+    // Barycenter point.
+    LCC::Vector barycenterV = LCC::Traits::Construct_sum_of_vectors()
+      		              ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point()), averageFacetsV );
+
+    barycenterV = LCC::Traits::Construct_scaled_vector()
+                  ( barycenterV, (1.0f/2.0f) );
+
+    Vertex res = LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, barycenterV);
+    res.set_dart (d);
+
+    return res;
+  }
+private:
+  LCC & mlcc;
+  LCC::size_type old;
+};
+
+// Smooth an old vertex depending on the vertices of its incident facet and edge.
+class Smooth_vertex_pqq
+{
+public:
+  /**  Constructor.
+   * @param alcc is the lcc to smooth
+   * @param amark is a mark designing old darts (i.e. darts not created during
+   *        the triangulation step)
+   */
+  Smooth_vertex_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o)
+  {
+  }
+
+  Vertex operator  () (Vertex & v) const
+  {
+    Dart_handle d = v.dart ();
+
+    // Just old points are concerned.
+    if (!mlcc.is_marked(d, old))
+    {       
+      return v;
+    }
+
+    unsigned int degree = 0;
+    std::vector<LCC::Point> edgesPoints;
+    edgesPoints.resize(0);    
+    
+    std::vector<LCC::Point> facetsPoints;
+    facetsPoints.resize(0);    
+
+    // We search barycenter point of incidents facets, and incidents edges points.
+    for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it =
+           mlcc.one_dart_per_incident_cell<1,0>(d).begin();
+        it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
+    {
+      // If the vertex is on a border
+      if (mlcc.is_free(it,2))
+      { 
+        return v;
+      }
+      // If incident isn't an old point, it's an edge point.
+      if (!mlcc.is_marked(mlcc.opposite(it), old))
+      {       
+        edgesPoints.push_back (mlcc.point(mlcc.opposite(it)));
+      }
+      // We go find the "facet point" of incidents facet (barycenter of a facet).
+      facetsPoints.push_back (mlcc.point(mlcc.beta(mlcc.opposite(it), 0)));
+      ++degree;
+    }
+
+    CGAL_assertion (facetsPoints.size() != 0 && edgesPoints.size() != 0);
+
+    if (facetsPoints.size() < 3 || edgesPoints.size() < 3 )
+    {       
+      return v;
+    }
+
+    // Average of incidents "edge points".
+    LCC::Vector averageEdgesV = LCC::Traits::Construct_vector() 
+			        (CGAL::ORIGIN, LCC::Point(0,0,0));                                                   
+
+    for (unsigned int i=0; i < edgesPoints.size(); i++)
+    {
+      averageEdgesV = LCC::Traits::Construct_sum_of_vectors()
+                      ( averageEdgesV, 
+       		      LCC::Traits::Construct_vector() (CGAL::ORIGIN, edgesPoints[i]));
+    }
+
+    averageEdgesV = LCC::Traits::Construct_scaled_vector()
+                    ( averageEdgesV, 1.0f/ (LCC::FT) edgesPoints.size() );
+
+    // Average of incidents "facet points".
+    LCC::Vector averageFacetsV = LCC::Traits::Construct_vector() 
+			         (CGAL::ORIGIN, LCC::Point(0,0,0));                                                   
+
+    for (unsigned int i=0; i < facetsPoints.size(); i++)
+    {
+      averageFacetsV = LCC::Traits::Construct_sum_of_vectors()
+      		       ( averageFacetsV, 
+       		       LCC::Traits::Construct_vector() (CGAL::ORIGIN, facetsPoints[i]));
+    }
+
+    averageFacetsV = LCC::Traits::Construct_scaled_vector()
+                     ( averageFacetsV, (1.0f/ (LCC::FT) facetsPoints.size()) );
+
+    // COEFFICIENTS of PQQ - Catmull–Clark subdivision : 
+    // point = ( averageFacets + 2*averageEdges + point*(degree-3) )/degree
+
+    averageFacetsV = LCC::Traits::Construct_scaled_vector()
+      		     ( averageFacetsV, 1.0f/ (LCC::FT) degree);
+
+    averageEdgesV = LCC::Traits::Construct_scaled_vector()
+      		    ( averageEdgesV, 2.0f/ (LCC::FT) degree);
+
+    LCC::Vector pointV = LCC::Traits::Construct_scaled_vector()
+      		         ( LCC::Traits::Construct_vector() (CGAL::ORIGIN, v.point() ), 
+                         (LCC::FT) (degree-3)/ (LCC::FT) degree );
+
+    // New position of the old point.
+    LCC::Vector	newPosition = LCC::Traits::Construct_sum_of_vectors()
+      		              ( averageFacetsV, averageEdgesV);
+    
+    newPosition = LCC::Traits::Construct_sum_of_vectors()
+      		  ( newPosition, pointV);
+
+    Vertex res = LCC::Traits::Construct_translated_point() (CGAL::ORIGIN, newPosition);
+    res.set_dart (d);
+
+    return res;
+  }
+private:
+  LCC & mlcc;
+  LCC::size_type old;
+};
+
+
+// Subdivide each facet of the lcc by using pqq-subdivision.
+void
+subdivide_lcc_pqq (LCC & m)
+{
+  if (m.number_of_darts () == 0)
+    return;
+
+  LCC::size_type old = m.get_new_mark ();
+  LCC::size_type treated = m.get_new_mark ();
+  m.negate_mark (old);  // All the old darts are marked in O(1).
+
+  // 1) We subdivide each edge.
+  m.negate_mark (treated);  // All the darts are marked in O(1).
+  
+  for (LCC::Dart_range::iterator it (m.darts().begin ());
+       m.number_of_marked_darts (treated) > 0; ++it)
+  {
+    if (m.is_marked (it, treated))
+    {
+      // We unmark the darts of the facet to process only once dart/facet.
+      CGAL::unmark_cell < LCC, 1 > (m, it, treated);
+
+      // We insert barycenter in the middle of the edge.
+      m.insert_barycenter_in_cell<1>(it);
+    }
+  }
+
+  // 2) We create a barycenter point for each facets.
+  Dart_handle dc;
+  std::vector<Dart_handle> remove;
+  remove.resize(0);
+
+  m.negate_mark (treated);  // All the darts are marked in O(1).
+  for (LCC::Dart_range::iterator it (m.darts().begin ());
+       m.number_of_marked_darts (treated) > 0; ++it)
+  {
+    if (m.is_marked (it, treated))
+    {
+      // We unmark the darts of the facet to process only once dart/facet.
+      CGAL::unmark_cell < LCC, 2 > (m, it, treated);
+      // We insert barycenter of the facet.
+      dc =  m.insert_barycenter_in_cell<2>(it);
+
+      // We remove useless edges.
+      for (LCC::One_dart_per_incident_cell_range<1,0>::iterator it2 =
+             m.one_dart_per_incident_cell<1,0>(dc).begin(); 
+          it2 != m.one_dart_per_incident_cell<1,0>(dc).end(); ++it2)
+      {
+        // If the edge join the center and a corner.
+        // We remove the edge.
+        if( m.is_marked(m.beta(it2,1), old) )
+        {
+          remove.push_back(it2);
+        }
+      }
+
+      // Remove edges. 
+      for (std::vector <Dart_handle>::iterator dit = remove.begin ();
+          dit != remove.end (); ++dit)
+      {
+        CGAL_assertion( (CGAL::is_removable<LCC, 1>(m,*dit)) );
+        CGAL::remove_cell<LCC, 1>(m, *dit);
+      }
+      remove.resize(0); 
+      // CGAL_assertion( m.is_valid() );
+    }
+  }
+
+  m.negate_mark (treated);
+  CGAL_assertion (m.is_whole_map_marked (treated));
+  m.free_mark (treated);
+
+  // 3) Smooth old points. 
+  std::vector < Vertex > old_vertices; // smooth the old vertices.
+  old_vertices.reserve (m.number_of_attributes<0> ()); // get intermediate space.
+  std::transform (m.vertex_attributes().begin (), 
+		  m.vertex_attributes().end (),
+		  std::back_inserter (old_vertices), 
+		  Smooth_vertex_pqq (m, old));
+
+  // Update.
+  for (std::vector < Vertex >::iterator vit = old_vertices.begin ();
+      vit != old_vertices.end (); ++vit)
+  {
+    m.point(vit->dart())=vit->point();
+  }
+
+  // 4) Smooth new edges points.	  
+  std::vector < Vertex > vertices; // smooth the old vertices.
+  vertices.reserve (m.number_of_attributes<0> ()); // get intermediate space.
+  std::transform (m.vertex_attributes().begin (), 
+		  m.vertex_attributes().end (),
+		  std::back_inserter (vertices), 
+		  Smooth_edge_pqq (m, old));
+
+  // Update.
+  for (std::vector < Vertex >::iterator vit = vertices.begin ();
+      vit != vertices.end (); ++vit)
+  {
+    m.point(vit->dart())=vit->point();
+  }
+
+  m.unmark_all (old);
+  m.free_mark (old);
+  CGAL_postcondition ( m.is_valid ());
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.cpp
new file mode 100644
index 0000000..418a200
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.cpp
@@ -0,0 +1,3405 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+// Contributor(s): Kumar Snehasish <kumar.snehasish at gmail.com>
+//                 Sylvain Brandel <sylvain.brandel at liris.cnrs.fr>
+//
+#include "MainWindow.h"
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <QSettings>
+#include <CGAL/Timer.h>
+#include <CGAL/ipower.h>
+#include "import_moka.h"
+
+// Function defined in Linear_cell_complex_3_subivision.cpp
+void subdivide_lcc_3 (LCC & m);
+
+// Function defined in Linear_cell_complex_pqq_subivision.cpp
+void subdivide_lcc_pqq (LCC & m);
+
+#define DELAY_STATUSMSG 1500
+
+MainWindow::MainWindow (QWidget * parent):CGAL::Qt::DemosMainWindow (parent),
+  nbcube      (0),
+  dialogmesh  (this),
+  dialogmenger(this),
+  dialogsierpinskicarpet(this),
+  dialogsierpinskitriangle(this)
+{
+  setupUi (this);
+  scene.lcc = new LCC;
+  
+  volumeListDock = new QDockWidget(QString(tr("Volume List")),this);
+  volumeListDock->setAllowedAreas(Qt::RightDockWidgetArea |
+                                  Qt::LeftDockWidgetArea);
+  volumeList = new QTableWidget(0,4,volumeListDock);
+  volumeList->verticalHeader()->hide();
+  volumeList->setColumnHidden(3,true);
+  QObject::connect(this->volumeList, SIGNAL(cellChanged(int,int)),
+                   this, SLOT(onCellChanged(int,int)));
+
+  QStringList labels(QString(tr("Color")));
+  labels.append(QString(tr("Filled")));
+  labels.append(QString(tr("Hidden")));
+  volumeList->setHorizontalHeaderLabels(labels);
+  //volumeList->resizeColumnsToContents();
+  volumeList->setFixedWidth(220);
+/*  volumeList->setColumnWidth(0,85);
+  volumeList->setColumnWidth(1,35);
+  volumeList->setColumnWidth(2,35);*/
+
+  volumeList->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+ 
+  volumeList->setSelectionMode(QAbstractItemView::NoSelection);
+  //volumeList->setSelectionBehavior(QAbstractItemView::SelectRows);
+  volumeListDock->setWidget(volumeList);
+  addDockWidget(Qt::RightDockWidgetArea,volumeListDock);
+  menuView->addAction(volumeListDock->toggleViewAction());
+
+  QObject::connect(&dialogmesh, SIGNAL(accepted()),
+                   this, SLOT(onCreateMeshOk()));
+  this->viewer->setScene(&scene);
+
+  connect_actions ();
+  this->addAboutDemo (":/cgal/help/about_Linear_cell_complex_3.html");
+  this->addAboutCGAL ();
+
+  this->addRecentFiles (this->menuFile, this->actionQuit);
+  connect (this, SIGNAL (openRecentFile (QString)),
+           this, SLOT (load_depend_on_extension(QString)));
+
+  statusMessage = new QLabel
+      ("Darts: 0,  Vertices: 0  (Points: 0),  Edges: 0, Facets: 0,"
+       " Volume: 0 (Vol color: 0),  Connected components: 0");
+  statusBar ()->addWidget (statusMessage);
+
+}
+
+void MainWindow::connect_actions ()
+{
+  QObject::connect (this->actionQuit, SIGNAL (triggered ()),
+                    qApp, SLOT (quit ()));
+
+  QObject::connect (this, SIGNAL (sceneChanged ()),
+                    this, SLOT (onSceneChanged ()));
+
+  QObject::connect(this->volumeList->horizontalHeader(),
+                   SIGNAL(sectionClicked(int)),
+                   this, SLOT(onHeaderClicked(int)));
+  QObject::connect(dialogmenger.mengerLevel, SIGNAL(valueChanged(int)),
+                   this, SLOT(onMengerChange(int)));
+  QObject::connect(dialogmenger.updateAttributes, SIGNAL(clicked(bool)),
+                   this, SLOT(onMengerUpdateAttributes(bool)));
+  QObject::connect(&dialogmenger, SIGNAL(accepted()),
+                   this, SLOT(onMengerOk()));
+  QObject::connect(&dialogmenger, SIGNAL(rejected()),
+                   this, SLOT(onMengerCancel()));
+
+  QObject::connect(dialogsierpinskicarpet.level, SIGNAL(valueChanged(int)),
+                   this, SLOT(onSierpinskiCarpetChangeLevel(int)));
+  QObject::connect(dialogsierpinskicarpet.updateAttributes, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetUpdateAttributes(bool)));
+/*  QObject::connect(dialogsierpinskicarpet.never, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetNeverUpdateAttributes(bool)));
+  QObject::connect(dialogsierpinskicarpet.during, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetDuringConstructionUpdateAttributes(bool)));
+  QObject::connect(dialogsierpinskicarpet.after, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetAfterConstructionUpdateAttributes(bool)));
+  QObject::connect(dialogsierpinskicarpet.stdmap, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetUpdateAttributesMethodStdMap(bool)));
+  QObject::connect(dialogsierpinskicarpet.traversal, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetUpdateAttributesMethodTraversal(bool)));
+  QObject::connect(dialogsierpinskicarpet.computeGeometry, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiCarpetComputeGeometry(bool)));*/
+  QObject::connect(&dialogsierpinskicarpet, SIGNAL(accepted()),
+                   this, SLOT(onSierpinskiCarpetOk()));
+  QObject::connect(&dialogsierpinskicarpet, SIGNAL(rejected()),
+                   this, SLOT(onSierpinskiCarpetCancel()));
+
+  QObject::connect(dialogsierpinskitriangle.level, SIGNAL(valueChanged(int)),
+                   this, SLOT(onSierpinskiTriangleChangeLevel(int)));
+  QObject::connect(dialogsierpinskitriangle.updateAttributes, SIGNAL(clicked(bool)),
+                   this, SLOT(onSierpinskiTriangleUpdateAttributes(bool)));
+  QObject::connect(&dialogsierpinskitriangle, SIGNAL(accepted()),
+                   this, SLOT(onSierpinskiTriangleOk()));
+  QObject::connect(&dialogsierpinskitriangle, SIGNAL(rejected()),
+                   this, SLOT(onSierpinskiTriangleCancel()));
+}
+
+void MainWindow::connectVolumeListHandlers()
+{
+  QObject::connect(this->volumeList, SIGNAL(cellChanged(int,int)),
+                   this, SLOT(onCellChanged(int,int)));
+}
+
+void MainWindow::update_operations_entries(bool show)
+{
+  actionImportOFF->setEnabled(show);
+  actionAddOFF->setEnabled(show);
+  actionImport3DTDS->setEnabled(show);
+  actionCompute_Voronoi_3D->setEnabled(show);
+  actionClear->setEnabled(show);
+  menuCreations->setEnabled(show);
+  menuOperations->setEnabled(show);
+}
+
+void MainWindow::onSceneChanged ()
+{
+  QApplication::setOverrideCursor( Qt::WaitCursor );
+
+  LCC::size_type mark = scene.lcc->get_new_mark ();
+  scene.lcc->negate_mark (mark);
+
+  std::vector<unsigned int> cells;
+  cells.push_back(0);
+  cells.push_back(1);
+  cells.push_back(2);
+  cells.push_back(3);
+  cells.push_back(4);
+
+  std::vector<unsigned int> res = scene.lcc->count_cells (cells);
+
+  std::ostringstream os;
+  os << "Darts: " << scene.lcc->number_of_darts ()
+     << ",  Vertices:" << res[0]
+     <<",  (Points:"<<scene.lcc->number_of_attributes<0>()<<")"
+    << ",  Edges:" << res[1]
+    << ",  Facets:" << res[2]
+    << ",  Volumes:" << res[3]
+    <<",  (Vol color:"<<scene.lcc->number_of_attributes<3>()<<")"
+   << ",  Connected components:" << res[4]
+   <<",  Valid:"<<(scene.lcc->is_valid()?"true":"FALSE");
+
+  scene.lcc->negate_mark (mark);
+  scene.lcc->free_mark (mark);
+
+  // statusBar()->showMessage (QString ("Update OpenGL lists"), DELAY_STATUSMSG);
+
+  viewer->sceneChanged ();
+
+  statusMessage->setText (os.str().c_str ());
+  QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::clear_all()
+{
+  scene.lcc->clear();
+  nbcube=0;
+
+  volumeList->clearContents();
+  volumeList->setRowCount(0);
+}
+
+void MainWindow::on_new_volume(Dart_handle adart)
+{
+  CGAL_assertion( scene.lcc->attribute<3>(adart)==LCC::null_handle);
+  CGAL::Set_i_attribute_functor<LCC, 3>::
+      run(scene.lcc, adart, scene.lcc->create_attribute<3>());
+  update_volume_list_add(scene.lcc->attribute<3>(adart));
+}
+
+void MainWindow::init_all_new_volumes()
+{
+  for (LCC::One_dart_per_cell_range<3>::iterator
+       it(scene.lcc->one_dart_per_cell<3>().begin());
+       it.cont(); ++it)
+    if ( scene.lcc->attribute<3>(it)==LCC::null_handle )
+    { on_new_volume(it); }
+}
+
+void MainWindow::on_actionSave_triggered ()
+{
+  QString fileName = QFileDialog::getSaveFileName (this,
+                                                   tr ("Save"),
+                                                   "save.3map",
+                                                   tr ("3-map files (*.3map)"));
+
+  if (!fileName.isEmpty ())
+  {
+     save(fileName);
+  }
+}
+
+void MainWindow::on_actionLoad_triggered ()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Load"),
+                                                   "./3map",
+                                                   tr ("3-map files (*.3map)"));
+
+  if (!fileName.isEmpty ())
+  {
+    load(fileName, true);
+  }
+}
+
+void MainWindow::on_actionImportOFF_triggered ()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Import OFF"),
+                                                   "./off",
+                                                   tr ("off files (*.off)"));
+
+  if (!fileName.isEmpty ())
+  {
+    load_off (fileName, true);
+  }
+}
+
+void MainWindow::on_actionImportMoka_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Import Moka"),
+                                                   "./moka",
+                                                   tr ("Moka files (*.moka)"));
+
+  if (!fileName.isEmpty ())
+  {
+    load_moka(fileName, true);
+  }
+}
+
+void MainWindow::on_actionImport3DTDS_triggered ()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Import 3DTDS"),
+                                                   ".",
+                                                   tr ("Data file (*)"));
+
+  if (!fileName.isEmpty ())
+  {
+    load_3DTDS (fileName, true);
+    statusBar ()->showMessage (QString ("Import 3DTDS file") + fileName,
+                               DELAY_STATUSMSG);
+  }
+}
+
+void MainWindow::on_actionAddOFF_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Add OFF"),
+                                                   "./off",
+                                                   tr ("off files (*.off)"));
+
+  if (!fileName.isEmpty ())
+  {
+    load_off (fileName, false);
+  }
+}
+
+void MainWindow::load_depend_on_extension(const QString & fileName, bool clear)
+{
+  QString ext = QFileInfo(fileName).suffix();
+  if ( ext=="3map")
+  {
+    load(fileName, clear);
+  }
+  else if (ext=="off")
+  {
+    load_off(fileName, clear);
+  }
+  else if (ext=="moka")
+  {
+    load_moka(fileName, clear);
+  }
+  else
+  {
+    std::cout<<"Extension not considered."<<std::endl;
+  }
+}
+
+void MainWindow::load(const QString & fileName, bool clear)
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+  if (clear) this->clear_all();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  bool res = load_combinatorial_map(fileName.toStdString().c_str(), *(scene.lcc));
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to load 3-map "<<qPrintable(fileName)<<": "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+
+  this->addToRecentFiles(fileName);
+  QApplication::restoreOverrideCursor ();
+
+  if (res)
+    statusBar ()->showMessage (QString ("3-map loaded ") + fileName,
+                               DELAY_STATUSMSG);
+  else
+    statusBar ()->showMessage (QString ("Problem: 3-map not loaded ") + fileName,
+                               DELAY_STATUSMSG);
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::save(const QString & fileName)
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  if ( save_combinatorial_map(*(scene.lcc), fileName.toStdString().c_str()) )
+    statusBar ()->showMessage (QString ("3-map saved ") + fileName,
+                               DELAY_STATUSMSG);
+  else
+    statusBar ()->showMessage (QString ("Problem: 3-map not saved ") + fileName,
+                               DELAY_STATUSMSG);
+  QApplication::restoreOverrideCursor ();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to save 3-map "<<qPrintable(fileName)<<": "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+}
+
+void MainWindow::load_off (const QString & fileName, bool clear)
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+  if (clear) this->clear_all();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  std::ifstream ifs (qPrintable (fileName));
+
+  CGAL::import_from_polyhedron_3_flux < LCC > (*scene.lcc, ifs);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to load off "<<qPrintable(fileName)<<": "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  init_all_new_volumes();
+
+  this->addToRecentFiles (fileName);
+  QApplication::restoreOverrideCursor ();
+
+  if (clear)
+    statusBar ()->showMessage (QString ("Load off file") + fileName,
+                               DELAY_STATUSMSG);
+  else
+    statusBar ()->showMessage (QString ("Add off file") + fileName,
+                               DELAY_STATUSMSG);
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::load_3DTDS (const QString & fileName, bool clear)
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+  if (clear) this->clear_all();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  typedef CGAL::Delaunay_triangulation_3 < LCC::Traits > Triangulation;
+  Triangulation T;
+
+  std::ifstream ifs (qPrintable (fileName));
+  T.insert (std::istream_iterator < Point_3 >(ifs),
+            std::istream_iterator < Point_3 >() );
+
+  CGAL::import_from_triangulation_3 < LCC, Triangulation >(*scene.lcc, T);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to import the 3DTDS from "<<qPrintable(fileName)<<": "
+           <<timer.time()
+           <<" seconds (counting the time to compute denaulay triangulation)."
+           <<std::endl;
+#endif
+
+  init_all_new_volumes();
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::load_moka(const QString & fileName, bool clear)
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+  if (clear) this->clear_all();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  CGAL::import_from_moka < LCC > (*scene.lcc, qPrintable (fileName));
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to load off "<<qPrintable(fileName)<<": "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  init_all_new_volumes();
+  recreate_whole_volume_list();
+
+  this->addToRecentFiles (fileName);
+  QApplication::restoreOverrideCursor ();
+
+  if (clear)
+    statusBar ()->showMessage (QString ("Load off file") + fileName,
+                               DELAY_STATUSMSG);
+  else
+    statusBar ()->showMessage (QString ("Add off file") + fileName,
+                               DELAY_STATUSMSG);
+  Q_EMIT (sceneChanged ());
+}
+
+Dart_handle MainWindow::make_iso_cuboid(const Point_3 basepoint, LCC::FT lg)
+{
+  Dart_handle dh = scene.lcc->make_hexahedron(basepoint,
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(lg,0,0)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(lg,lg,0)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(0,lg,0)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(0,lg,lg)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(0,0,lg)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(lg,0,lg)),
+                                    LCC::Traits::Construct_translated_point()
+                                    (basepoint,LCC::Traits::Vector(lg,lg,lg)));
+
+  scene.lcc->reverse_orientation_connected_component(dh);
+  return dh;
+}
+
+Dart_handle MainWindow::on_actionCreate_cube_triggered ()
+{
+  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
+
+  Dart_handle d = make_iso_cuboid(basepoint, 1);
+
+  on_new_volume(d);
+
+  ++nbcube;
+
+  statusBar ()->showMessage (QString ("Cube created"),DELAY_STATUSMSG);
+
+  Q_EMIT (sceneChanged ());
+
+  return d;
+}
+
+void MainWindow::on_actionCreate3Cubes_triggered ()
+{
+  Dart_handle d1 = make_iso_cuboid (Point_3 (nbcube, nbcube, nbcube),1);
+  Dart_handle d2 = make_iso_cuboid (Point_3 (nbcube + 1, nbcube, nbcube),1);
+  Dart_handle d3 = make_iso_cuboid (Point_3 (nbcube, nbcube + 1, nbcube), 1);
+
+  on_new_volume(d1);
+  on_new_volume(d2);
+  on_new_volume(d3);
+
+  scene.lcc->sew<3>(scene.lcc->beta(d1,1,1,2), scene.lcc->beta(d2,2));
+  scene.lcc->sew<3>(scene.lcc->beta(d1,2,1,1,2), d3);
+
+  ++nbcube;
+
+  statusBar ()->showMessage (QString ("3 cubes were created"),
+                             DELAY_STATUSMSG);
+
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::on_actionCreate2Volumes_triggered ()
+{
+  Dart_handle d1 = make_iso_cuboid(Point_3(nbcube, nbcube, nbcube),1);
+  Dart_handle d2 = make_iso_cuboid(Point_3(nbcube + 1, nbcube, nbcube), 1);
+  Dart_handle d3 = make_iso_cuboid(Point_3(nbcube, nbcube + 1, nbcube), 1);
+  Dart_handle d4 = make_iso_cuboid(Point_3(nbcube + 1, nbcube + 1, nbcube), 1);
+
+  scene.lcc->sew<3>(scene.lcc->beta(d1,1,1,2), scene.lcc->beta(d2,2));
+  scene.lcc->sew<3>(scene.lcc->beta(d1,2,1,1,2), d3);
+
+  scene.lcc->sew<3>(scene.lcc->beta(d3,1,1,2), scene.lcc->beta(d4,2));
+  scene.lcc->sew<3>(scene.lcc->beta(d2,2,1,1,2), d4);
+
+  CGAL::remove_cell<LCC,2>(*scene.lcc, d3);
+  CGAL::remove_cell<LCC,2>(*scene.lcc, scene.lcc->beta(d2,2));
+
+  on_new_volume(d1);
+  on_new_volume(d4);
+
+  ++nbcube;
+  statusBar ()->showMessage (QString ("2 volumes were created"),
+                             DELAY_STATUSMSG);
+
+  Q_EMIT (sceneChanged());
+}
+
+void MainWindow::on_actionCreate_mesh_triggered ()
+{
+  dialogmesh.show();
+}
+
+void MainWindow::onCreateMeshOk()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  for (int x=0; x<dialogmesh.getX(); ++x)
+    for (int y=0; y<dialogmesh.getY(); ++y)
+      for (int z=0; z<dialogmesh.getZ(); ++z)
+      {
+        Dart_handle d = make_iso_cuboid
+          (Point_3 (x+nbcube, y+nbcube, z+nbcube), 1);
+        on_new_volume(d);
+      }
+  nbcube+=dialogmesh.getX();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to create mesh ("<<dialogmesh.getX()<<", "
+           <<dialogmesh.getY()<<", "<<dialogmesh.getZ()<<"): "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  statusBar ()->showMessage (QString ("Mesh created"),DELAY_STATUSMSG);
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::on_actionSubdivide_triggered ()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  subdivide_lcc_3 (*(scene.lcc));
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to subdivide the current LCC: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar ()->showMessage (QString ("Objects were subdivided"),
+                             DELAY_STATUSMSG);
+}
+
+void MainWindow::on_actionSubdivide_pqq_triggered ()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  subdivide_lcc_pqq (*(scene.lcc));
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to pqq-subdivide the current LCC: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar ()->showMessage (QString ("Objects were subdivided"),
+                             DELAY_STATUSMSG);
+}
+
+
+void MainWindow::on_actionClear_triggered()
+{
+  clear_all();
+  statusBar ()->showMessage (QString ("Scene cleared"), DELAY_STATUSMSG);
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::on_actionCompute_Voronoi_3D_triggered ()
+{
+  QString fileName = QFileDialog::getOpenFileName (this,
+                                                   tr ("Voronoi 3D"),
+                                                   ".",
+                                                   tr ("Data file (*)"));
+
+  if (fileName.isEmpty ()) return;
+
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+  this->clear_all();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  typedef CGAL::Delaunay_triangulation_3 < LCC::Traits > Triangulation;
+  Triangulation T;
+
+  LCC delaunay_lcc;
+  Dart_handle dh;
+
+  std::ifstream ifs (qPrintable (fileName));
+  T.insert (std::istream_iterator < Point_3 >(ifs),
+            std::istream_iterator < Point_3 >() );
+
+  std::map<Triangulation::Cell_handle,
+      LCC::Dart_handle > vol_to_dart;
+
+  dh = CGAL::import_from_triangulation_3 < LCC, Triangulation >
+      (delaunay_lcc, T, &vol_to_dart);
+
+  Dart_handle ddh=delaunay_lcc.dual(*scene.lcc, dh);
+
+  // We transform all the darts in vol_to_dart into their dual.
+  {
+    LCC::Dart_range::iterator it1=delaunay_lcc.darts().begin();
+    LCC::Dart_range::iterator it2=scene.lcc->darts().begin();
+
+    std::map<LCC::Dart_handle, LCC::Dart_handle> dual;
+
+    for ( ; it1!=delaunay_lcc.darts().end(); ++it1, ++it2 )
+    {
+      dual[it1]=it2;
+    }
+
+    // We update the geometry of dual_lcc by using the std::map face_to_dart.
+    for ( std::map<Triangulation::Cell_handle, LCC::Dart_handle>
+          ::iterator it=vol_to_dart.begin(), itend=vol_to_dart.end();
+          it!=itend; ++it)
+    {
+      vol_to_dart[it->first]=dual[it->second];
+      if ( !T.is_infinite(it->first) )
+        scene.lcc->set_vertex_attribute
+            (it->second,scene.lcc->create_vertex_attribute(T.dual(it->first)));
+      /*       else
+                alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());*/
+    }
+  }
+
+  // We remove the infinite volume and all its adjacent volumes.
+  {
+    std::stack<Dart_handle> toremove;
+    LCC::size_type mark_toremove=scene.lcc->get_new_mark();
+    toremove.push(ddh);
+    CGAL::mark_cell<LCC,3>(*scene.lcc, ddh, mark_toremove);
+    for (LCC::Dart_of_cell_range<3>::iterator
+         it=scene.lcc->darts_of_cell<3>(ddh).begin(),
+         itend=scene.lcc->darts_of_cell<3>(ddh).end(); it!=itend; ++it)
+    {
+      if ( !scene.lcc->is_marked(scene.lcc->beta(it,3), mark_toremove) )
+      {
+        CGAL::mark_cell<LCC,3>(*scene.lcc,
+                               scene.lcc->beta(it,3), mark_toremove);
+        toremove.push(scene.lcc->beta(it,3));
+      }
+    }
+    while( !toremove.empty() )
+    {
+      CGAL::remove_cell<LCC, 3>(*scene.lcc, toremove.top());
+      toremove.pop();
+    }
+    CGAL_assertion(scene.lcc->is_whole_map_unmarked(mark_toremove));
+    scene.lcc->free_mark(mark_toremove);
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to compute Voronoi 3D from "<<qPrintable(fileName)<<": "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  init_all_new_volumes();
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar ()->showMessage (QString ("Voronoi 3D of points in ") + fileName,
+                             DELAY_STATUSMSG);
+}
+
+void MainWindow::on_actionDual_3_triggered ()
+{
+  if ( !scene.lcc->is_without_boundary(3) )
+  {
+    statusBar()->showMessage
+        (QString ("Dual impossible: the lcc has some 3-boundary"),
+         DELAY_STATUSMSG);
+    return;
+  }
+
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  LCC* duallcc = new LCC;
+  scene.lcc->dual_points_at_barycenter(*duallcc);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to compute the dual: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  this->clear_all();
+  delete scene.lcc;
+  scene.lcc = duallcc;
+  this->viewer->setScene(&scene);
+  init_all_new_volumes();
+
+  statusBar ()->showMessage (QString ("Dual_3 computed"), DELAY_STATUSMSG);
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+}
+
+void MainWindow::on_actionClose_volume_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  if ( scene.lcc->close<3>() > 0 )
+  {
+    init_all_new_volumes();
+    statusBar ()->showMessage (QString ("All volume(s) closed"),
+                               DELAY_STATUSMSG);
+    Q_EMIT (sceneChanged ());
+  }
+  else
+    statusBar ()->showMessage
+        (QString ("LCC already 3-closed"), DELAY_STATUSMSG);
+
+  QApplication::restoreOverrideCursor ();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to 3-close the current lcc: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+}
+
+void MainWindow::on_actionSew3_same_facets_triggered()
+{
+  LCC::size_type mymark = scene.lcc->get_new_mark();
+  mark_all_filled_and_visible_volumes(mymark);
+
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  if ( scene.lcc->sew3_same_facets(mymark) > 0 )
+  {
+    statusBar()->showMessage
+        (QString ("Same facets of visible and filled volume(s) are 3-sewn"),
+         DELAY_STATUSMSG);
+    Q_EMIT (sceneChanged ());
+  }
+  else
+    statusBar()->showMessage (QString ("No facets 3-sewn"), DELAY_STATUSMSG);
+
+  scene.lcc->free_mark(mymark);
+
+  QApplication::restoreOverrideCursor ();
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to sew3 all same facets: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+}
+
+void MainWindow::on_actionUnsew3_all_triggered()
+{
+  unsigned int nb=0;
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  for (LCC::Dart_range::iterator it=scene.lcc->darts().begin();
+       it!=scene.lcc->darts().end(); ++it)
+  {
+    if ( !scene.lcc->is_free(it,3) &&
+         scene.lcc->info<3>(it).is_filled_and_visible() &&
+         scene.lcc->info<3>(scene.lcc->beta(it,3))
+           .is_filled_and_visible())
+    { scene.lcc->unsew<3>(it); ++nb; }
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to unsew3 all filled volumes: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+  QApplication::restoreOverrideCursor ();
+
+  if ( nb > 0 )
+  {
+    statusBar()->showMessage
+        (QString ("Darts between visible and filled volume(s) are 3-unsewn"),
+         DELAY_STATUSMSG);
+    Q_EMIT (sceneChanged ());
+  }
+  else
+    statusBar()->showMessage (QString ("No dart 3-unsewn"), DELAY_STATUSMSG);
+}
+
+void MainWindow::on_actionRemove_filled_volumes_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  unsigned int count = 0;
+  for (LCC::Attribute_range<3>::type::iterator
+       it=scene.lcc->attributes<3>().begin(),
+       itend=scene.lcc->attributes<3>().end(); it!=itend; )
+  {
+    LCC::Attribute_handle<3>::type cur = it++;
+    if( scene.lcc->get_attribute<3>(cur).info().is_filled_and_visible() )
+    {
+      CGAL::remove_cell<LCC,3>(*scene.lcc,scene.lcc->get_attribute<3>(cur).dart());
+      ++count;
+    }
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to remove all filled volumes: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT( sceneChanged());
+
+  statusBar()->showMessage
+      (QString::number(count)+QString("Visible and filled volume(s) removed"),
+       DELAY_STATUSMSG);
+}
+
+void MainWindow::on_actionInsert_center_vertices_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  std::vector<LCC::Dart_handle> v;
+  for (LCC::One_dart_per_cell_range<2>::iterator
+       it(scene.lcc->one_dart_per_cell<2>().begin()); it.cont(); ++it)
+  {
+    if ( scene.lcc->info<3>(it).is_filled_and_visible() )
+      v.push_back(it);
+  }
+  for (std::vector<LCC::Dart_handle>::iterator itv(v.begin());
+       itv!=v.end(); ++itv)
+    scene.lcc->insert_barycenter_in_cell<2>(*itv);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to insert center vertices in all filled faces: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar()->showMessage
+      (QString ("Vertices are inserted in center of facets of visible and filled volume(s)"),
+       DELAY_STATUSMSG);
+}
+
+double compute_angle3d(const Vector_3& v1, const Vector_3& v2)
+{
+  double a = CGAL::to_double( (v1*v2) /
+                              ( sqrt(v1.squared_length()) * sqrt(v2.squared_length()) ) ) ;
+
+  if (a < -1.0) return acos(-1.0)/M_PI*180.0;
+  else if (a > 1.0) return acos(1.0)/M_PI*180.0;
+  else return acos(a)/M_PI*180.0;
+}
+
+void MainWindow::on_actionMerge_coplanar_faces_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  scene.lcc->set_update_attributes(false);
+
+  std::vector<Dart_handle> edges;
+  LCC::size_type treated  = scene.lcc->get_new_mark();
+  LCC::size_type treated2 = scene.lcc->get_new_mark();
+
+  for ( LCC::Dart_range::iterator it= scene.lcc->darts().begin(),
+          itend = scene.lcc->darts().end(); it!=itend; ++it )
+  {
+    if (!scene.lcc->is_marked(it, treated) )
+    {
+      if ( CGAL::is_removable<LCC, 1>(*scene.lcc, it) )
+      {
+        LCC::Vector normal1 = CGAL::compute_normal_of_cell_2(*scene.lcc,it);
+        LCC::Vector normal2 = CGAL::compute_normal_of_cell_2(*scene.lcc, scene.lcc->beta<2>(it) );
+        double angle = compute_angle3d(normal1, normal2);
+
+        if ( ((angle<5.0 || angle>355.0) || (angle<185.0 && angle>175.0)) )
+        {
+          edges.push_back(it);
+        }
+      }
+      CGAL::mark_cell<LCC, 1>(*scene.lcc, it, treated);
+    }
+  }
+
+
+  for (std::vector<Dart_handle>::iterator it=edges.begin(),
+         itend=edges.end(); it!=itend; ++it)
+  {
+    CGAL::mark_cell<LCC, 1>(*scene.lcc, *it, treated2);
+
+    if ( scene.lcc->beta<0, 2>(*it)==*it || scene.lcc->beta<1, 2>(*it)==*it)
+    { // To process dangling edges
+
+      Dart_handle actu = *it, prev=NULL;
+      do
+      {
+        if ( scene.lcc->beta<0, 2>(actu)==actu ) prev = scene.lcc->beta<1>(actu);
+        else prev = scene.lcc->beta<0>(actu);
+
+        if (scene.lcc->is_marked(actu, treated2) &&
+            (scene.lcc->beta<0, 2>(actu)!=actu || scene.lcc->beta<1, 2>(actu)!=actu) )
+        {
+          CGAL::remove_cell<LCC, 1>(*scene.lcc, actu);
+          actu = prev;
+        }
+        else
+          actu = NULL;
+      }
+      while (actu!=NULL && (scene.lcc->beta<0, 2>(actu)==actu || scene.lcc->beta<1, 2>(actu)==actu));
+    }
+    else if ( !CGAL::belong_to_same_cell<LCC, 2>(*scene.lcc, *it,
+                                                 scene.lcc->beta<2>(*it)) )
+      CGAL::remove_cell<LCC, 1>(*scene.lcc, *it);
+  }
+
+  assert(scene.lcc->is_whole_map_marked(treated));
+  scene.lcc->free_mark(treated);
+  scene.lcc->free_mark(treated2);
+
+  scene.lcc->set_update_attributes(true);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to merge all coplanar faces: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar()->showMessage
+      (QString ("Coplanar face(s) merged"), DELAY_STATUSMSG);
+}
+
+void MainWindow::on_actionMerge_all_volumes_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  scene.lcc->set_update_attributes(false);
+
+  Dart_handle prev = scene.lcc->null_handle;
+  for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()),
+       itend=scene.lcc->darts().end(); it!=itend; )
+  {
+    if ( !scene.lcc->is_free(it,3) &&
+         scene.lcc->info<3>(it).is_filled_and_visible() &&
+         scene.lcc->info<3>(scene.lcc->beta(it,3))
+          .is_filled_and_visible())
+    {
+      CGAL::remove_cell<LCC,2>(*scene.lcc,it);
+      itend=scene.lcc->darts().end();
+      if ( prev==scene.lcc->null_handle ) it=scene.lcc->darts().begin();
+      else { it=prev; if ( it!=itend ) ++it; }
+    }
+    else
+      ++it;
+  }
+
+  scene.lcc->set_update_attributes(true);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to merge all filled volumes: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar()->showMessage
+      (QString ("Visible and filled volume(s) merged"), DELAY_STATUSMSG);
+}
+
+bool is_external(CDT::Face_handle fh)
+{
+  return fh->info().is_external;
+}
+
+int number_of_existing_edge(CDT::Face_handle fh)
+{
+  unsigned res=0;
+  for (int i=0; i<3; ++i)
+    if (fh->info().exist_edge[i]) ++res;
+  return res;
+}
+
+int get_free_edge(CDT::Face_handle fh)
+{
+  CGAL_assertion( number_of_existing_edge(fh)==2 );
+  for (int i=0; i<3; ++i)
+    if (!fh->info().exist_edge[i]) return i;
+
+  CGAL_assertion(false);
+  return -1;
+}
+
+void constrained_delaunay_triangulation(LCC &lcc, Dart_handle d1)
+{
+  Vector_3 normal = CGAL::compute_normal_of_cell_2(lcc,d1);
+  P_traits cdt_traits(normal);
+  CDT cdt(cdt_traits);
+
+  //inserting the constraints edge by edge
+  LCC::Dart_of_orbit_range<1>::iterator
+    it(lcc.darts_of_orbit<1>(d1).begin());
+
+  CDT::Vertex_handle previous=LCC::null_handle, first=LCC::null_handle,
+    vh=LCC::null_handle;
+
+   for (LCC::Dart_of_orbit_range<1>::iterator
+          itend(lcc.darts_of_orbit<1>(d1).end()); it!=itend; ++it)
+   {
+     vh = cdt.insert(lcc.point(it));
+     vh->info().dh=it;
+     if( first==NULL )
+     {
+       first=vh;
+     }
+     if( previous!=NULL)
+     {
+       CGAL_assertion( previous !=vh );
+       cdt.insert_constraint(previous,vh);
+     }
+
+     previous=vh;
+   }
+   cdt.insert_constraint(previous,first);
+   CGAL_assertion(cdt.is_valid());
+
+   // sets mark is_external
+   for( CDT::All_faces_iterator fit = cdt.all_faces_begin(),
+          fitend = cdt.all_faces_end(); fit != fitend; ++fit)
+   {
+     fit->info().is_external = true;
+     fit->info().is_process = false;
+     fit->info().exist_edge[0]=false;
+     fit->info().exist_edge[1]=false;
+     fit->info().exist_edge[2]=false;
+   }
+
+   std::queue<CDT::Face_handle> face_queue;
+   CDT::Face_handle face_internal = NULL;
+
+   face_queue.push(cdt.infinite_vertex()->face());
+   while(! face_queue.empty() )
+   {
+     CDT::Face_handle fh = face_queue.front();
+     face_queue.pop();
+     if(!fh->info().is_process)
+     {
+       fh->info().is_process = true;
+       for(int i = 0; i <3; ++i)
+       {
+         if(!cdt.is_constrained(std::make_pair(fh, i)))
+         {
+           face_queue.push(fh->neighbor(i));
+         }
+         else if (face_internal==NULL)
+         {
+           face_internal = fh->neighbor(i);
+         }
+       }
+     }
+   }
+   if ( face_internal!=NULL )
+     face_queue.push(face_internal);
+   
+   while(! face_queue.empty() )
+   {
+     CDT::Face_handle fh = face_queue.front();
+     face_queue.pop();
+     if(!fh->info().is_process)
+     {
+       fh->info().is_process = true;
+       fh->info().is_external = false;
+       for(int i = 0; i <3; ++i)
+       {
+         if(!cdt.is_constrained(std::make_pair(fh, i)))
+         {
+           face_queue.push(fh->neighbor(i));
+         }
+       }
+     }
+   }
+   
+   for( CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(),
+          eitend = cdt.finite_edges_end(); eit != eitend; ++eit)
+   {
+     CDT::Face_handle fh = eit->first;
+     int index = eit->second;
+     CDT::Face_handle opposite_fh = fh->neighbor(index);
+     if(cdt.is_constrained(std::make_pair(fh, index)))
+     {
+       fh->info().exist_edge[index]=true;
+       opposite_fh->info().exist_edge[cdt.mirror_index(fh,index)]=true;
+
+       if ( !fh->info().is_external && number_of_existing_edge(fh)==2 )
+         face_queue.push(fh);
+       if ( !opposite_fh->info().is_external &&
+            number_of_existing_edge(opposite_fh)==2 )
+         face_queue.push(opposite_fh);
+     }
+   }
+
+   while( !face_queue.empty() )
+   {
+     CDT::Face_handle fh = face_queue.front();
+     face_queue.pop();
+     CGAL_assertion( number_of_existing_edge(fh)>=2 ); // i.e. ==2 or ==3
+     CGAL_assertion( !fh->info().is_external );
+
+     if (number_of_existing_edge(fh)==2)
+     {
+       int index = get_free_edge(fh);
+       CDT::Face_handle opposite_fh = fh->neighbor(index);
+
+       CGAL_assertion( !fh->info().exist_edge[index] );
+       CGAL_assertion( !opposite_fh->info().
+                       exist_edge[cdt.mirror_index(fh,index)] );
+       // triangle is (vc, vb, va)
+       const CDT::Vertex_handle va = fh->vertex(cdt. cw(index));
+       const CDT::Vertex_handle vb = fh->vertex(cdt.ccw(index));
+       const CDT::Vertex_handle vc = fh->vertex(index);
+       
+       Dart_handle dd1 = NULL;
+       for (LCC::Dart_of_cell_range<0, 2>::iterator it(lcc.darts_of_cell<0, 2>(va->info().dh).begin());
+            dd1==NULL && it.cont(); ++it)
+       {
+         if (lcc.point(lcc.beta<1>(it))==vc->point())
+           dd1=it;
+       }
+       
+       Dart_handle dd2 = NULL;
+       for (LCC::Dart_of_cell_range<0, 2>::iterator it(lcc.darts_of_cell<0, 2>(vb->info().dh).begin());
+            dd2==NULL && it.cont(); ++it)
+       {
+         if (lcc.point(lcc.beta<0>(it))==vc->point())
+           dd2=it;
+       }
+       
+       //       assert(((lcc.beta<0,0>(dd1)==dd2) || lcc.beta<1,1>(dd1)==dd2));
+       
+       Dart_handle ndart=CGAL::insert_cell_1_in_cell_2(lcc, dd1, dd2);
+       va->info().dh=lcc.beta<2>(ndart);
+
+       fh->info().exist_edge[index]=true;
+       opposite_fh->info().exist_edge[cdt.mirror_index(fh,index)]=true;
+
+       if ( !opposite_fh->info().is_external &&
+            number_of_existing_edge(opposite_fh)==2 )
+         face_queue.push(opposite_fh);
+     }
+   }
+}
+
+void MainWindow::on_actionTriangulate_all_facets_triggered()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  std::vector<LCC::Dart_handle> v;
+  for (LCC::One_dart_per_cell_range<2>::iterator
+       it(scene.lcc->one_dart_per_cell<2>().begin()); it.cont(); ++it)
+  {
+    if ( scene.lcc->info<3>(it).is_filled_and_visible() ||
+         (!scene.lcc->is_free<3>(it) &&
+          scene.lcc->info<3>(scene.lcc->beta<3>(it)).is_filled_and_visible()) )
+      v.push_back(it);
+  }
+
+  for (std::vector<LCC::Dart_handle>::iterator itv(v.begin());
+       itv!=v.end(); ++itv)
+    constrained_delaunay_triangulation(*scene.lcc, *itv);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Time to triangulate all filled faces: "
+           <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT (sceneChanged ());
+  statusBar()->showMessage
+      (QString ("All visible and filled faces were triangulated"), DELAY_STATUSMSG);
+}
+
+bool MainWindow::is_volume_in_list(LCC::Attribute_handle<3>::type ah)
+{
+  for(int row=0; row < volumeList->rowCount(); ++row)
+  {
+    LCC::Attribute_type<3>::type* ptr=
+        reinterpret_cast<LCC::Attribute_type<3>::type*>
+        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
+
+    if(ptr==&(scene.lcc->get_attribute<3>(ah))) return true;
+  }
+
+  return false;
+}
+
+void MainWindow::update_volume_list_add(LCC::Attribute_handle<3>::type ah)
+{
+  // CGAL_assertion( !is_volume_in_list(ah) );
+
+  volumeList->disconnect(this);
+
+  int newRow = volumeList->rowCount();
+  volumeList->setRowCount(newRow+1);
+
+  QTableWidgetItem* volumeLabel = new QTableWidgetItem
+    (QString((scene.lcc->get_attribute<3>(ah).info().color_name().c_str())));
+  volumeLabel->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+  volumeLabel->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
+  volumeList->setItem(newRow,0,volumeLabel);
+
+  QTableWidgetItem* fillCB = new QTableWidgetItem;
+  fillCB->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+  if ( scene.lcc->get_attribute<3>(ah).info().is_filled() )
+    fillCB->setCheckState(Qt::Checked);
+  else
+    fillCB->setCheckState(Qt::Unchecked);
+  volumeList->setItem(newRow,1, fillCB);
+
+  QTableWidgetItem* hiddenCB = new QTableWidgetItem();
+  hiddenCB->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+  if ( scene.lcc->get_attribute<3>(ah).info().is_visible() )
+    hiddenCB->setCheckState(Qt::Unchecked);
+  else
+    hiddenCB->setCheckState(Qt::Checked);
+  volumeList->setItem(newRow,2,hiddenCB);
+
+  QTableWidgetItem* attribHandle = new QTableWidgetItem;
+  attribHandle->setData
+      (Qt::UserRole,
+       reinterpret_cast<quintptr>(&scene.lcc->get_attribute<3>(ah)));
+
+  volumeList->setItem(newRow,3,attribHandle);
+
+  connectVolumeListHandlers();
+}
+
+void MainWindow::update_volume_list_remove(int i)
+{
+  CGAL_assertion(i<volumeList->rowCount());
+  volumeList->removeRow(i);
+}
+
+void MainWindow::update_volume_list_remove(LCC::Attribute_handle<3>::type ah)
+{
+  for(int row=0; row < volumeList->rowCount(); ++row)
+  {
+    LCC::Attribute_type<3>::type* ptr=
+        reinterpret_cast<LCC::Attribute_type<3>::type*>
+        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
+
+    if(ptr==&scene.lcc->get_attribute<3>(ah))
+    {
+      update_volume_list_remove(row);
+      return;
+    }
+  }
+}
+
+void MainWindow::update_volume_list_all_ckeckstates()
+{
+  volumeList->disconnect(this);
+
+  for(int row=0; row < volumeList->rowCount(); ++row)
+  {
+    LCC::Attribute_type<3>::type* ptr=
+        reinterpret_cast<LCC::Attribute_type<3>::type*>
+        ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
+
+    if ( ptr->info().is_filled() )
+      volumeList->item(row,1)->setCheckState(Qt::Checked);
+    else
+      volumeList->item(row,1)->setCheckState(Qt::Unchecked);
+
+    if ( !ptr->info().is_visible() )
+      volumeList->item(row,2)->setCheckState(Qt::Checked);
+    else
+      volumeList->item(row,2)->setCheckState(Qt::Unchecked);
+  }
+
+  connectVolumeListHandlers();
+}
+
+void MainWindow::recreate_whole_volume_list()
+{
+  volumeList->clearContents();
+  volumeList->setRowCount(0);
+
+  for (LCC::Attribute_range<3>::type::iterator
+       it=scene.lcc->attributes<3>().begin(),
+       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
+    update_volume_list_add(it);
+}
+
+void MainWindow::onCellChanged(int row, int col)
+{
+  volumeList->disconnect(this);
+
+  LCC::Attribute_type<3>::type* ptr=
+      reinterpret_cast<LCC::Attribute_type<3>::type*>
+      ( volumeList->item(row,3)->data(Qt::UserRole).value<quintptr>() );
+
+  if ( col==1 )
+  {
+    ptr->info().negate_filled();
+  }
+  else if ( col==2 )
+  {
+    ptr->info().negate_visible();
+    if ( !ptr->info().is_visible() )
+      volumeList->item(row,1)->setFlags
+          (volumeList->item(row,1)->flags()^Qt::ItemIsEnabled);
+    else
+      volumeList->item(row,1)->setFlags
+          (volumeList->item(row,1)->flags()|Qt::ItemIsEnabled);
+  }
+
+  connectVolumeListHandlers();
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::onHeaderClicked(int col)
+{
+  if(col != 0)
+  {
+    volumeList->disconnect(this);
+
+    for(int i = 0; i < volumeList->rowCount(); ++i)
+    {
+      LCC::Attribute_type<3>::type* ptr=
+          reinterpret_cast<LCC::Attribute_type<3>::type*>
+          ( volumeList->item(i,3)->data(Qt::UserRole).value<quintptr>() );
+
+      switch(qApp->keyboardModifiers())
+      {
+      case(Qt::ShiftModifier):
+        if (col==1)
+          ptr->info().set_filled(false);
+        else if (col==2)
+        {
+          ptr->info().set_visible(true);
+          volumeList->item(i,1)->setFlags
+              (volumeList->item(i,1)->flags()|Qt::ItemIsEnabled);
+        }
+        volumeList->item(i,col)->setCheckState(Qt::Unchecked);
+        break;
+      case(Qt::ControlModifier):
+        if (col==1)
+          ptr->info().negate_filled();
+        else if (col==2)
+        {
+          ptr->info().negate_visible();
+          if ( !ptr->info().is_visible() )
+            volumeList->item(i,1)->setFlags
+                (volumeList->item(i,1)->flags()^Qt::ItemIsEnabled);
+          else
+            volumeList->item(i,1)->setFlags
+                (volumeList->item(i,1)->flags()|Qt::ItemIsEnabled);
+        }
+        volumeList->item(i,col)->
+            setCheckState(volumeList->item(i,col)->checkState() ?
+                            Qt::Unchecked: Qt::Checked);
+        break;
+      default:
+        if (col==1)
+          ptr->info().set_filled(true);
+        else if (col==2)
+        {
+          if ( ptr->info().is_visible() )
+          {
+            ptr->info().set_visible(false);
+            volumeList->item(i,1)->setFlags
+              (volumeList->item(i,1)->flags()^Qt::ItemIsEnabled);
+          }
+        }
+        volumeList->item(i,col)->setCheckState(Qt::Checked);
+        break;
+      }
+    }
+
+    connectVolumeListHandlers();
+    Q_EMIT( sceneChanged());
+  }
+}
+
+void MainWindow::mark_all_filled_and_visible_volumes(LCC::size_type amark)
+{
+  for (LCC::Attribute_range<3>::type::iterator
+       it=scene.lcc->attributes<3>().begin(),
+       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
+  {
+    if ( scene.lcc->get_attribute<3>(it).info().is_filled_and_visible() &&
+         !scene.lcc->is_marked(it->dart(), amark) )
+      CGAL::mark_cell<LCC,3>(*scene.lcc,
+                             scene.lcc->get_attribute<3>(it).dart(), amark);
+  }
+}
+
+void MainWindow::on_actionExtend_filled_volumes_triggered()
+{
+  volumeList->disconnect(this);
+
+  std::vector<LCC::Attribute_handle<3>::type> tofill;
+
+  LCC::size_type mark_volume = scene.lcc->get_new_mark();
+  bool already_tofill;
+
+  for (LCC::Attribute_range<3>::type::iterator
+       it=scene.lcc->attributes<3>().begin(),
+       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
+  {
+    if ( !scene.lcc->is_marked(it->dart(), mark_volume) )
+    {
+      if ( !scene.lcc->get_attribute<3>(it).info().is_filled() )
+      {
+        already_tofill = false;
+        for (LCC::Dart_of_cell_basic_range<3>::iterator it2=
+               scene.lcc->darts_of_cell_basic<3>(it->dart(), mark_volume).begin();
+             it2.cont(); ++it2 )
+        {
+          scene.lcc->mark(it2, mark_volume);
+          if ( !scene.lcc->is_free(it2,3) &&
+               scene.lcc->info<3>(scene.lcc->beta(it2,3)).
+                 is_filled() && !already_tofill)
+          {
+            tofill.push_back(scene.lcc->attribute<3>(it2));
+            already_tofill = true;
+          }
+        }
+      }
+      else
+        CGAL::mark_cell<LCC,3>(*scene.lcc, it->dart(), mark_volume);
+    }
+  }
+
+  CGAL_assertion( scene.lcc->is_whole_map_marked(mark_volume) );
+  scene.lcc->free_mark(mark_volume);
+
+  if ( tofill.size()>0 )
+  {
+    for ( std::vector<LCC::Attribute_handle<3>::type>::iterator
+            it=tofill.begin(), itend=tofill.end(); it!=itend; ++it )
+    {
+      scene.lcc->get_attribute<3>(*it).info().set_filled(true);
+    }
+
+    update_volume_list_all_ckeckstates();
+    Q_EMIT( sceneChanged());
+  }
+
+  connectVolumeListHandlers();
+}
+
+void MainWindow::on_actionExtend_hidden_volumes_triggered()
+{
+  volumeList->disconnect(this);
+
+  std::vector<LCC::Attribute_handle<3>::type> tohide;
+
+  LCC::size_type mark_volume = scene.lcc->get_new_mark();
+  bool already_tohide;
+
+  for (LCC::Attribute_range<3>::type::iterator
+       it=scene.lcc->attributes<3>().begin(),
+       itend=scene.lcc->attributes<3>().end(); it!=itend; ++it)
+  {
+    if ( !scene.lcc->is_marked(it->dart(), mark_volume) )
+    {
+      if ( scene.lcc->get_attribute<3>(it).info().is_visible() )
+      {
+        already_tohide = false;
+        for (LCC::Dart_of_cell_basic_range<3>::iterator it2=
+               scene.lcc->darts_of_cell_basic<3>(it->dart(), mark_volume).begin();
+             it2.cont(); ++it2 )
+        {
+          scene.lcc->mark(it2, mark_volume);
+          if ( !scene.lcc->is_free(it2,3) &&
+               !scene.lcc->info<3>(scene.lcc->beta(it2,3)).
+                  is_visible() && !already_tohide)
+          {
+            tohide.push_back(scene.lcc->attribute<3>(it2));
+            already_tohide = true;
+          }
+        }
+      }
+      else
+        CGAL::mark_cell<LCC,3>(*scene.lcc, it->dart(), mark_volume);
+    }
+  }
+
+  CGAL_assertion( scene.lcc->is_whole_map_marked(mark_volume) );
+  scene.lcc->free_mark(mark_volume);
+
+  if ( tohide.size()>0 )
+  {
+    for ( std::vector<LCC::Attribute_handle<3>::type>::iterator
+            it=tohide.begin(), itend=tohide.end(); it!=itend; ++it )
+    {
+      scene.lcc->get_attribute<3>(*it).info().set_visible(false);
+    }
+
+    update_volume_list_all_ckeckstates();
+    Q_EMIT( sceneChanged());
+  }
+
+  connectVolumeListHandlers();
+}
+
+void MainWindow::on_actionCreate_Menger_Sponge_triggered ()
+{
+  dialogmenger.mengerLevel->disconnect(this);
+
+  mengerUpdateAttributes = dialogmenger.updateAttributes->isChecked();
+
+  dialogmenger.mengerLevel->setValue(0);
+  mengerLevel=0;
+  CGAL_assertion( mengerVolumes.empty() );
+  mengerVolumes.push_back(on_actionCreate_cube_triggered());
+  update_operations_entries(false);
+
+  QObject::connect(dialogmenger.mengerLevel, SIGNAL(valueChanged(int)),
+                   this, SLOT(onMengerChange(int)));
+
+  dialogmenger.show();
+}
+
+void MainWindow::onMengerCancel()
+{
+  for(std::vector<Dart_handle>::iterator it=mengerVolumes.begin();
+      it!=mengerVolumes.end(); ++it)
+  {
+    CGAL::remove_cell<LCC,3>(*scene.lcc, *it);
+  }
+
+  recreate_whole_volume_list();
+  mengerVolumes.clear();
+  update_operations_entries(true);
+  statusBar()->showMessage (QString ("Menger sponge creation canceled"),
+                            DELAY_STATUSMSG);
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::onMengerOk()
+{
+  update_operations_entries(true);
+  mengerVolumes.clear();
+}
+
+void MainWindow::onMengerChange(int newLevel)
+{
+  while ( newLevel > mengerLevel ) onMengerInc();
+  while ( newLevel < mengerLevel ) onMengerDec();
+}
+
+void MainWindow::onMengerUpdateAttributes(bool newValue)
+{
+  mengerUpdateAttributes = newValue;
+}
+
+void MainWindow::onMengerInc()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->mengerLevel++;
+
+  if (!mengerUpdateAttributes)
+  {
+    scene.lcc->set_update_attributes(false);
+  }
+
+  std::vector<Dart_handle> edges;
+  std::vector<Dart_handle> faces;
+  std::size_t nbvolinit = mengerVolumes.size();
+
+  LCC::size_type markEdges = (scene.lcc)->get_new_mark();
+  LCC::size_type markFaces = (scene.lcc)->get_new_mark();
+  LCC::size_type markVols  = (scene.lcc)->get_new_mark();
+
+  for(std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    CGAL_assertion( !(scene.lcc)->is_marked(*itvol, markVols) );
+    for (LCC::Dart_of_cell_basic_range<3>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).end();
+         it!=itend; ++it)
+    {
+      if ( !(scene.lcc)->is_marked(it, markEdges) )
+      {
+        edges.push_back(it);
+        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
+      }
+      if ( !(scene.lcc)->is_marked(it, markFaces) )
+      {
+        faces.push_back(it);
+        CGAL::mark_cell<LCC,2>(*(scene.lcc), it, markFaces);
+      }
+    }
+  }
+
+  (scene.lcc)->negate_mark(markVols);
+  for(std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    for (LCC::Dart_of_cell_basic_range<3>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<3>(*itvol, markVols).end();
+         it!=itend; ++it)
+    {
+      (scene.lcc)->unmark(it, markEdges);
+      (scene.lcc)->unmark(it, markFaces);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markVols);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
+
+  (scene.lcc)->free_mark(markEdges);
+  (scene.lcc)->free_mark(markFaces);
+  (scene.lcc)->free_mark(markVols);
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    split_edge_in_three(edges[i]);
+  }
+  edges.clear();
+
+  for(std::size_t i = 0; i < faces.size(); i++)
+  {
+    split_face_in_nine(faces[i]);
+  }
+  faces.clear();
+
+  for(std::size_t i = 0; i < nbvolinit; i++)
+  {
+    split_vol_in_twentyseven(mengerVolumes[i]);
+  }
+
+  if (!mengerUpdateAttributes)
+  {
+    for(std::size_t i = nbvolinit; i < mengerVolumes.size(); i++)
+    {
+      LCC::Attribute_handle<3>::type ah = (scene.lcc)->create_attribute<3>();
+      scene.lcc->set_attribute<3>(mengerVolumes[i], ah);
+      scene.lcc->info<3>(mengerVolumes[i]).color()=
+          (CGAL::Color(myrandom.get_int(0,256),
+                       myrandom.get_int(0,256),
+                       myrandom.get_int(0,256)));
+
+        update_volume_list_add(scene.lcc->attribute<3>(mengerVolumes[i]));
+    }
+
+    scene.lcc->set_update_attributes(true);
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Menger sponge "
+           <<this->mengerLevel-1<<" -> "<<this->mengerLevel<<", "
+          <<"attributes updated "
+         <<(mengerUpdateAttributes ? "DURING" : "AFTER")
+        << " construction: "
+        <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  CGAL_assertion( (scene.lcc)->is_valid() );
+
+  QApplication::restoreOverrideCursor ();
+  statusBar()->showMessage(QString ("Menger sponge creation %1 -> %2").
+                           arg(this->mengerLevel-1).arg(this->mengerLevel),
+                           DELAY_STATUSMSG);
+
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::split_edge_in_three(Dart_handle dh)
+{
+  LCC::Point p1 = scene.lcc->point(dh);
+  LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
+
+  LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
+  LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+
+  LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
+  LCC::Point p4 = LCC::Traits::Construct_translated_point() (p1,v3);
+
+  (scene.lcc)->insert_point_in_cell<1>(dh,p4);
+  (scene.lcc)->insert_point_in_cell<1>(dh,p3);
+}
+
+void MainWindow::split_face_in_three(Dart_handle dh)
+{
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),scene.lcc->beta(dh,1,1,1),
+                                scene.lcc->beta(dh,0,0));
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),scene.lcc->beta(dh,1,1),
+                                scene.lcc->beta(dh,0));
+}
+
+void MainWindow::split_face_in_nine(Dart_handle dh)
+{
+  Dart_handle d2 = scene.lcc->beta(dh,1,1,1,1,1,1,1);
+
+  Dart_handle e2= CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                                scene.lcc->beta(dh,1,1),d2);
+  Dart_handle e1= CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                                scene.lcc->beta(dh,1),
+                                                scene.lcc->beta(d2,1));
+
+  split_edge_in_three(e1);
+  split_edge_in_three(e2);
+
+  split_face_in_three(dh);
+  split_face_in_three(d2);
+  split_face_in_three(scene.lcc->beta(e2,0));
+}
+
+void MainWindow::split_vol_in_three(Dart_handle dh, bool removecenter)
+{
+  std::vector<Dart_handle> edges1;
+  std::vector<Dart_handle> edges2;
+
+  Dart_handle curd = scene.lcc->beta(dh,2,1,1,2);
+  for (unsigned int i=0;i<4;++i)
+  {
+    edges1.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==scene.lcc->beta(dh,2,1,1,2) );
+
+  curd = scene.lcc->beta(curd,1,1,2);
+  for (unsigned int i=0;i<4;++i)
+  {
+    edges2.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==
+                  scene.lcc->beta(dh,2,1,1,2,1,1,2) );
+
+  Dart_handle f1=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
+
+  Dart_handle f2=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
+
+  if (scene.lcc->are_attributes_automatically_managed())
+  {
+    scene.lcc->info<3>(f1).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+    scene.lcc->info<3>(f2).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+
+    update_volume_list_add(scene.lcc->attribute<3>(dh));
+  }
+
+  if ( removecenter )
+    CGAL::remove_cell<LCC,3>(*scene.lcc,f1);
+  else
+  {
+    mengerVolumes.push_back(f1);
+
+    if (scene.lcc->are_attributes_automatically_managed())
+      update_volume_list_add(scene.lcc->attribute<3>(f1));
+  }
+
+  mengerVolumes.push_back(f2);
+}
+
+void MainWindow::split_vol_in_nine(Dart_handle dh, bool removecenter)
+{
+  std::vector<Dart_handle> edges1;
+  std::vector<Dart_handle> edges2;
+
+  Dart_handle curd = scene.lcc->beta(dh,1,2);
+  for (unsigned int i=0;i<8;++i)
+  {
+    edges1.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==scene.lcc->beta(dh,1,2) );
+
+  curd = scene.lcc->beta(curd,1,1,2);
+  for (unsigned int i=0;i<8;++i)
+  {
+    edges2.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==scene.lcc->beta(dh,1,2,1,1,2) );
+
+  Dart_handle f1=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
+
+  Dart_handle f2=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
+
+  if (scene.lcc->are_attributes_automatically_managed())
+  {
+    scene.lcc->info<3>(f1).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+    scene.lcc->info<3>(f2).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+
+    update_volume_list_add(scene.lcc->attribute<3>(dh));
+    if ( !removecenter)
+      update_volume_list_add(scene.lcc->attribute<3>(f1));
+  }
+
+  split_face_in_three(f1);
+  split_face_in_three(f2);
+
+  split_vol_in_three(dh,removecenter);
+
+  mengerVolumes.push_back(scene.lcc->beta(f2,2,1));
+  split_vol_in_three(scene.lcc->beta(f2,2,1),removecenter);
+
+  if ( removecenter )
+    CGAL::remove_cell<LCC,3>(*scene.lcc,f1);
+  else
+  {
+    mengerVolumes.push_back(scene.lcc->beta(f1,2,1));
+    split_vol_in_three(scene.lcc->beta(f1,2,1),true);
+  }
+}
+
+void MainWindow::split_vol_in_twentyseven(Dart_handle dh)
+{
+  std::vector<Dart_handle> edges1;
+  std::vector<Dart_handle> edges2;
+
+  Dart_handle curd = scene.lcc->beta(dh,1,1,2);
+  for (unsigned int i=0;i<12;++i)
+  {
+    edges1.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==scene.lcc->beta(dh,1,1,2) );
+
+  curd = scene.lcc->beta(curd,1,1,2);
+  for (unsigned int i=0;i<12;++i)
+  {
+    edges2.push_back(curd);
+    curd=scene.lcc->beta(curd,1,2,1);
+  }
+  CGAL_assertion( curd==scene.lcc->beta(dh,1,1,2,1,1,2) );
+
+  Dart_handle f1=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges1.begin(),edges1.end());
+
+  Dart_handle f2=
+      insert_cell_2_in_cell_3(*(scene.lcc),edges2.begin(),edges2.end());
+
+  if (scene.lcc->are_attributes_automatically_managed())
+  {
+    scene.lcc->info<3>(f1).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+    scene.lcc->info<3>(f2).color()=
+      (CGAL::Color(myrandom.get_int(0,256),
+                   myrandom.get_int(0,256),
+                   myrandom.get_int(0,256)));
+    update_volume_list_add(scene.lcc->attribute<3>(dh));
+    update_volume_list_add(scene.lcc->attribute<3>(f1));
+
+  }
+
+  mengerVolumes.push_back(scene.lcc->beta(f1,2));
+  mengerVolumes.push_back(scene.lcc->beta(f2,2));
+
+  split_face_in_nine(scene.lcc->beta(f1,1));
+  split_face_in_nine(scene.lcc->beta(f2,1));
+
+  split_vol_in_nine(dh,false);
+  split_vol_in_nine(scene.lcc->beta(f1,2),true);
+  split_vol_in_nine(scene.lcc->beta(f2,2),false);
+}
+
+void MainWindow::process_full_slice(Dart_handle init,
+                                  std::vector<Dart_handle>& faces,
+                                  LCC::size_type markVols)
+{
+  Dart_handle d[12];
+  d[0]=scene.lcc->beta(init,1,2);
+  d[1]=scene.lcc->beta(d[0],3,1,2,1);
+  d[2]=scene.lcc->beta(d[1],1,2,1);
+  d[3]=scene.lcc->beta(d[2],3,1,2,1);
+
+  d[4]=scene.lcc->beta(init,1,1,2);
+  d[5]=scene.lcc->beta(d[4],3,0,2,0);
+  d[6]=scene.lcc->beta(d[5],0,2,0);
+
+  d[7]=scene.lcc->beta(d[6],3,0,2,0);
+  d[8]=scene.lcc->beta(d[7],3,0,2,0);
+  d[9]=scene.lcc->beta(d[8],0,2,0);
+
+  d[10]=scene.lcc->beta(d[9],3,0,2,0);
+  d[11]=scene.lcc->beta(d[10],3,0,2,0);
+
+  for (unsigned int j=0; j<12; ++j)
+  {
+    if ( !(scene.lcc)->is_marked(d[j], markVols) )
+    {
+      CGAL::mark_cell<LCC,3>(*(scene.lcc), d[j], markVols);
+    }
+    faces.push_back(d[j]);
+  }
+}
+
+void MainWindow::process_inter_slice(Dart_handle init,
+                                   std::vector<Dart_handle>& faces,
+                                   LCC::size_type markVols)
+{
+  Dart_handle d[24];
+  d[0]=init;
+  d[1]=scene.lcc->beta(d[0],0,2,3,2,0);
+  d[2]=scene.lcc->beta(d[1],0,2,3,2,0);
+  d[3]=scene.lcc->beta(d[2],1,1,2,3,2);
+  d[4]=scene.lcc->beta(d[3],1,1,2,3,2);
+  d[5]=scene.lcc->beta(d[0],1,1,2,3,2);
+  d[6]=scene.lcc->beta(d[5],1,1,2,3,2);
+  d[7]=scene.lcc->beta(d[6],0,2,3,2,0);
+
+  init = scene.lcc->beta(init,3,2,1,1,2);
+  d[8]=init;
+  d[9]=scene.lcc->beta(d[8],3,1,2,3,2,1);
+  d[10]=scene.lcc->beta(d[9],1,2,3,2,1,3);
+  d[11]=scene.lcc->beta(d[10],3,0,0,2,3,2);
+  d[12]=scene.lcc->beta(d[11],0,0,2,3,2,3);
+  d[13]=scene.lcc->beta(d[8],3,0,0,2,3,2);
+  d[14]=scene.lcc->beta(d[13],0,0,2,3,2,3);
+  d[15]=scene.lcc->beta(d[14],3,1,2,3,2,1);
+
+  d[16]=scene.lcc->beta(d[0],3,1,2);
+  d[17]=scene.lcc->beta(d[0],3,1,1,2);
+
+  d[18]=scene.lcc->beta(d[4],3,2);
+  d[19]=scene.lcc->beta(d[4],3,0,2);
+
+  d[20]=scene.lcc->beta(d[2],3,0,2);
+  d[21]=scene.lcc->beta(d[2],3,1,1,2);
+
+  d[22]=scene.lcc->beta(d[6],3,2);
+  d[23]=scene.lcc->beta(d[6],3,1,2);
+
+  for (unsigned int j=0; j<24; ++j)
+  {
+    CGAL_assertion( d[j]!=(scene.lcc)->null_dart_handle );
+    if ( !(scene.lcc)->is_marked(d[j], markVols) )
+    {
+      CGAL::mark_cell<LCC,3>(*(scene.lcc), d[j], markVols);
+    }
+    faces.push_back(d[j]);
+  }
+}
+
+void MainWindow::onMengerDec()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->mengerLevel--;
+
+  // We know here the number of Menger volume: 20^mengerLevel
+  // thus we can directly "cut" the std::vector to the correct size.
+  mengerVolumes.resize(CGAL::ipower(20,mengerLevel));
+
+  LCC::size_type markVols     = (scene.lcc)->get_new_mark();
+  LCC::size_type markVertices = (scene.lcc)->get_new_mark();
+
+  std::vector<Dart_handle> faces;
+  std::vector<Dart_handle> edges;
+  std::vector<Dart_handle> vertices;
+
+  // First we remove faces.
+  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    if ( !(scene.lcc)->is_marked(*itvol, markVols) )
+    {
+      Dart_handle init=*itvol;
+      CGAL::mark_cell<LCC,3>(*(scene.lcc), init, markVols);
+      process_full_slice(init, faces, markVols);
+      init=scene.lcc->beta(init, 2,1,1,2);
+      process_inter_slice(init, faces, markVols);
+      init=scene.lcc->beta(init, 3,2,1,1,2,3);
+      process_full_slice(init, faces, markVols);
+    }
+  }
+
+  for(std::size_t i = 0; i < faces.size(); i++)
+  {
+    CGAL::remove_cell<LCC,2>(*scene.lcc, faces[i],mengerUpdateAttributes);
+  }
+  faces.clear();
+
+  // Now we remove edges.
+  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    if ( (scene.lcc)->is_marked(*itvol, markVols) )
+      CGAL::unmark_cell<LCC,3>(*(scene.lcc), *itvol, markVols);
+
+    for (LCC::Dart_of_cell_range<3>::iterator
+           it=scene.lcc->darts_of_cell<3>(*itvol).begin(),
+           itend=scene.lcc->darts_of_cell<3>(*itvol).end();
+         it!=itend; ++it)
+    {
+      if ( scene.lcc->is_free(it,2) &&
+           ( scene.lcc->is_free(it,3) || it<scene.lcc->beta(it,3) ) )
+        edges.push_back(it);
+    }
+  }
+
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],0),mengerUpdateAttributes);
+    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],1),mengerUpdateAttributes);
+    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],mengerUpdateAttributes);
+  }
+  edges.clear();
+
+  // Lastly we remove vertices.
+  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    for (LCC::Dart_of_cell_basic_range<3>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<3>
+           (*itvol, markVols).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<3>
+           (*itvol, markVols).end(); it!=itend; ++it)
+    {
+      if ( !(scene.lcc)->is_marked(it, markVertices) )
+      {
+        if ( CGAL::is_removable<LCC, 0>(*scene.lcc, it) )
+          vertices.push_back(it);
+        CGAL::mark_cell<LCC, 0>(*scene.lcc, it, markVertices);
+      }
+    }
+  }
+
+  (scene.lcc)->negate_mark(markVols);
+  for ( std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
+        itvol!=mengerVolumes.end(); ++itvol)
+  {
+    for (LCC::Dart_of_cell_basic_range<3>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<3>
+           (*itvol, markVols).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<3>
+           (*itvol, markVols).end(); it!=itend; ++it)
+    {
+      if ( (scene.lcc)->is_marked(it, markVertices) )
+        CGAL::unmark_cell<LCC, 0>(*scene.lcc, it, markVertices);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markVols);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVols) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
+
+  for(std::size_t i = 0; i < vertices.size(); i++)
+  {
+    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],mengerUpdateAttributes);
+  }
+  vertices.clear();
+
+  (scene.lcc)->free_mark(markVols);
+  (scene.lcc)->free_mark(markVertices);
+
+  if (!mengerUpdateAttributes)
+  {
+    scene.lcc->correct_invalid_attributes();
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Menger sponge "
+           <<this->mengerLevel+1<<" -> "<<this->mengerLevel<<", "
+          <<"attributes updated "
+         <<(mengerUpdateAttributes ? "DURING" : "AFTER")
+        << " construction: "
+        <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+
+  statusBar()->showMessage(QString ("Menger sponge creation %1 -> %2").
+                           arg(this->mengerLevel+1).arg(this->mengerLevel),
+                           DELAY_STATUSMSG);
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT( sceneChanged());
+}
+
+///////////////////////////////////////////////////////////////////////////////////
+// SIERPINSKI CARPET
+///////////////////////////////////////////////////////////////////////////////////
+
+void MainWindow::on_actionCreate_Sierpinski_Carpet_triggered ()
+{
+  /*neverUpdateAttributes = dialogsierpinskicarpet.never->isChecked();
+  duringConstructionUpdateAttributes = dialogsierpinskicarpet.during->isChecked();
+  afterConstructionUpdateAttributes = dialogsierpinskicarpet.after->isChecked();
+  updateAttributesMethodStdMap = dialogsierpinskicarpet.stdmap->isChecked();
+  updateAttributesMethodTraversal = dialogsierpinskicarpet.traversal->isChecked();
+  // By default, the geometry will be computed after the construction
+  isComputableGeometry = true;*/
+
+  computeGeometry = false;
+
+  sierpinskiCarpetUpdateAttributes
+    = dialogsierpinskicarpet.updateAttributes->isChecked();
+
+  dialogsierpinskicarpet.level->disconnect(this);
+
+  dialogsierpinskicarpet.level->setValue(0);
+  sierpinskiCarpetLevel=0;
+  CGAL_assertion( sierpinskiCarpetSurfaces.empty() );
+
+  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
+
+  Dart_handle d = scene.lcc->make_quadrangle(basepoint,
+                                             LCC::Traits::Construct_translated_point()
+                                             (basepoint,LCC::Traits::Vector(1,0,0)),
+                                             LCC::Traits::Construct_translated_point()
+                                             (basepoint,LCC::Traits::Vector(1,1,0)),
+                                             LCC::Traits::Construct_translated_point()
+                                             (basepoint,LCC::Traits::Vector(0,1,0)));
+
+  on_new_volume(d);
+
+  ++nbcube;
+
+  statusBar ()->showMessage (QString ("Square created"),DELAY_STATUSMSG);
+
+  Q_EMIT (sceneChanged ());
+
+  sierpinskiCarpetSurfaces.push_back(d);
+  update_operations_entries(false);
+
+  QObject::connect(dialogsierpinskicarpet.level, SIGNAL(valueChanged(int)),
+                   this, SLOT(onSierpinskiCarpetChangeLevel(int)));
+
+  dialogsierpinskicarpet.show();
+}
+
+void MainWindow::onSierpinskiCarpetCancel()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+  for(std::vector<Dart_handle>::iterator it=sierpinskiCarpetSurfaces.begin();
+      it!=sierpinskiCarpetSurfaces.end(); ++it)
+  {
+    CGAL::remove_cell<LCC,2>(*scene.lcc, *it);
+  }
+
+  recreate_whole_volume_list();
+  sierpinskiCarpetSurfaces.clear();
+  update_operations_entries(true);
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::onSierpinskiCarpetOk()
+{
+  update_operations_entries(true);
+  sierpinskiCarpetSurfaces.clear();
+}
+
+void MainWindow::onSierpinskiCarpetChangeLevel(int newLevel)
+{
+  while ( newLevel > sierpinskiCarpetLevel ) onSierpinskiCarpetInc();
+  while ( newLevel < sierpinskiCarpetLevel ) onSierpinskiCarpetDec();
+}
+
+void MainWindow::onSierpinskiCarpetUpdateAttributes(bool newValue)
+{
+  sierpinskiCarpetUpdateAttributes = newValue;
+}
+
+void MainWindow::onSierpinskiCarpetInc()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->sierpinskiCarpetLevel++;
+
+/*  if (computeGeometry)
+  {
+    // Here case where the geometry could be computed after the construction, but it was not updated.
+    computeGeometry = false;
+    dialogsierpinskicarpet.computeGeometry->setEnabled(false);
+    //  => geometry will not be computed later.
+    isComputableGeometry = false;
+  }*/
+
+  std::vector<Dart_handle> edges;
+  nbfacesinit = sierpinskiCarpetSurfaces.size();
+
+  LCC::size_type markEdges = (scene.lcc)->get_new_mark();
+  LCC::size_type markFaces = (scene.lcc)->get_new_mark();
+
+  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiCarpetSurfaces.begin();
+        itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces)
+  {
+    CGAL_assertion( !(scene.lcc)->is_marked(*itfaces, markFaces) );
+    for (LCC::Dart_of_cell_basic_range<2>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
+         it!=itend; ++it)
+    {
+      if ( !(scene.lcc)->is_marked(it, markEdges) )
+      {
+        edges.push_back(it);
+        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
+      }
+    }
+  }
+
+  (scene.lcc)->negate_mark(markFaces);
+  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiCarpetSurfaces.begin();
+        itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces)
+  {
+    for (LCC::Dart_of_cell_basic_range<2>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
+         it!=itend; ++it)
+    {
+      (scene.lcc)->unmark(it, markEdges);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markFaces);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
+
+  (scene.lcc)->free_mark(markEdges);
+  (scene.lcc)->free_mark(markFaces);
+
+/*  if (afterConstructionUpdateAttributes)
+  {
+    if (updateAttributesMethodStdMap)
+    {
+      // We create a map to associate embeddings to new darts
+      for(std::size_t i = 0; i < edges.size(); i++)
+      {
+        dart_map.insert(std::pair<Dart_handle, LCC::Point>
+                        (edges[i], scene.lcc->point(edges[i])));
+        if (!(scene.lcc)->is_free(edges[i],2))
+        {
+          dart_map.insert(std::pair<Dart_handle, LCC::Point>
+                          ((scene.lcc)->beta(edges[i],2),
+                           scene.lcc->point((scene.lcc)->beta(edges[i],2))));
+        }
+      }
+    }
+  }*/
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    sierpinski_carpet_split_edge_in_three(edges[i]);
+  }
+  edges.clear();
+
+  for(std::size_t i = 0; i < nbfacesinit; i++)
+  {
+    sierpinski_carpet_split_face_in_nine(sierpinskiCarpetSurfaces[i]);
+  }
+
+  if (!sierpinskiCarpetUpdateAttributes)
+  {
+    sierpinski_carpet_update_geometry();
+  }
+
+/*  if (neverUpdateAttributes)
+  {
+    scene.lcc->correct_invalid_attributes();
+
+    // Now that the map is valid, we can compute the geometry
+    if (isComputableGeometry)
+    {
+      computeGeometry = true;
+      dialogsierpinskicarpet.computeGeometry->setEnabled(true);
+    }
+  }*/
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Sierpinski carpet "
+           <<this->sierpinskiCarpetLevel-1<<" -> "
+          <<this->sierpinskiCarpetLevel<<", "
+         <<"attributes updated "
+        <<(sierpinskiCarpetUpdateAttributes ? "DURING" : "AFTER")
+       << " construction: "
+       <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  CGAL_assertion( (scene.lcc)->is_valid() );
+
+  statusBar()->showMessage(QString ("Sierpinski carpet creation %1 -> %2").
+                           arg(this->sierpinskiCarpetLevel-1).
+                           arg(this->sierpinskiCarpetLevel),
+                           DELAY_STATUSMSG);
+
+  QApplication::restoreOverrideCursor ();
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::sierpinski_carpet_update_geometry()
+{
+/*  if (updateAttributesMethodStdMap)
+  {
+    for(std::size_t i = 0; i < new_darts.size(); i++)
+    {
+      sierpinski_carpet_copy_attributes_and_embed_vertex(new_darts[i], dart_map[new_darts[i]]);
+    }
+
+    dart_map.clear();
+    new_darts.clear();
+  }
+
+  if (updateAttributesMethodTraversal)*/
+  {
+    LCC::size_type markVertices = (scene.lcc)->get_new_mark();
+
+    for(std::size_t i = 0; i < nbfacesinit; i++)
+    {
+      // Geometry of the 4 corners of the current face
+      LCC::Point p[4][4];
+      Dart_handle d00 = sierpinskiCarpetSurfaces[i];
+      Dart_handle d03 = scene.lcc->beta(d00,1,2,1,1,2,1,1);
+      Dart_handle d33 = scene.lcc->beta(d03,1,2,1,1,2,1,1);
+      Dart_handle d30 = scene.lcc->beta(d33,1,2,1,1,2,1,1);
+      sierpinski_carpet_compute_4x4_geometry_matrix(p,
+                                                    scene.lcc->point(d00),
+                                                    scene.lcc->point(d03),
+                                                    scene.lcc->point(d33),
+                                                    scene.lcc->point(d30));
+
+      Dart_handle dh = sierpinskiCarpetSurfaces[i];
+
+      // bottom border
+      dh = scene.lcc->beta(dh,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[0][1]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[0][2]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+
+      // right border
+      dh = scene.lcc->beta(dh,1,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][3]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][3]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+
+      // top border
+      dh = scene.lcc->beta(dh,1,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[3][2]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[3][1]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+
+      // left border
+      dh = scene.lcc->beta(dh,1,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][0]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1,2,1);
+      if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+      {
+        sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][0]);
+        CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+      }
+
+      dh = sierpinskiCarpetSurfaces[i];
+
+      // middle vertex, bottom left
+      dh = scene.lcc->beta(dh,1,1);
+      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][1]);
+
+      // middle vertex, top left
+      dh = scene.lcc->beta(dh,2,1,1);
+      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][1]);
+
+      // middle vertex, top right
+      dh = scene.lcc->beta(dh,2,1,2,1,1,2,1);
+      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[2][2]);
+
+      // middle vertex, bottom right
+      dh = scene.lcc->beta(dh,2,1,1);
+      sierpinski_carpet_copy_attributes_and_embed_vertex(dh, p[1][2]);
+    }
+
+    scene.lcc->unmark_all(markVertices);
+    CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
+  }
+}
+
+void MainWindow::sierpinski_carpet_compute_geometry()
+{
+  LCC::size_type markVertices = (scene.lcc)->get_new_mark();
+
+  for(std::size_t i = 0; i < nbfacesinit; i++)
+  {
+    // on récupère la géométrie des 4 coins de la face courante
+    LCC::Point p[4][4];
+    Dart_handle d00 = sierpinskiCarpetSurfaces[i];
+    Dart_handle d03 = scene.lcc->beta(d00,1,2,1,1,2,1,1);
+    Dart_handle d33 = scene.lcc->beta(d03,1,2,1,1,2,1,1);
+    Dart_handle d30 = scene.lcc->beta(d33,1,2,1,1,2,1,1);
+    sierpinski_carpet_compute_4x4_geometry_matrix(p, scene.lcc->point(d00), scene.lcc->point(d03), scene.lcc->point(d33), scene.lcc->point(d30));
+
+    Dart_handle dh = sierpinskiCarpetSurfaces[i];
+
+    // Geometry of the 4 corners of the current face
+    // bottom border
+    dh = scene.lcc->beta(dh,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[0][1];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[0][2];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+
+    // right border
+    dh = scene.lcc->beta(dh,1,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[1][3];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[2][3];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+
+    // top border
+    dh = scene.lcc->beta(dh,1,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[3][2];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[3][1];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+
+    // left border
+    dh = scene.lcc->beta(dh,1,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[2][0];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,2,1);
+    if ( ! (scene.lcc)->is_marked(dh, markVertices) )
+    {
+      scene.lcc->point(dh) = p[1][0];
+      CGAL::mark_cell<LCC,0>(*(scene.lcc), dh, markVertices);
+    }
+
+    dh = sierpinskiCarpetSurfaces[i];
+
+    // middle vertex, bottom left
+    dh = scene.lcc->beta(dh,1,1);
+    scene.lcc->point(dh) = p[1][1];
+
+    // middle vertex, top left
+    dh = scene.lcc->beta(dh,2,1,1);
+    scene.lcc->point(dh) = p[2][1];
+
+    // middle vertex, top right
+    dh = scene.lcc->beta(dh,2,1,2,1,1,2,1);
+    scene.lcc->point(dh) = p[2][2];
+
+    // middle vertex, bottom right
+    dh = scene.lcc->beta(dh,2,1,1);
+    scene.lcc->point(dh) = p[1][2];
+
+    }
+
+  scene.lcc->unmark_all(markVertices);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
+}
+
+void MainWindow::sierpinski_carpet_compute_4x4_geometry_matrix
+(LCC::Point p[4][4], LCC::Point& p00, LCC::Point& p03,
+ LCC::Point& p33, LCC::Point& p30)
+{
+  p[0][0] = p00;
+  p[0][3] = p03;
+  p[3][3] = p33;
+  p[3][0] = p30;
+
+  LCC::Vector v1, v2, v3;
+
+  // bottom border
+  v1 = LCC::Traits::Construct_vector() (p[0][0],p[0][3]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[0][1] = LCC::Traits::Construct_translated_point() (p[0][0],v2);
+  p[0][2] = LCC::Traits::Construct_translated_point() (p[0][0],v3);
+  // right border
+  v1 = LCC::Traits::Construct_vector() (p[0][3],p[3][3]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[1][3] = LCC::Traits::Construct_translated_point() (p[0][3],v2);
+  p[2][3] = LCC::Traits::Construct_translated_point() (p[0][3],v3);
+  // top border
+  v1 = LCC::Traits::Construct_vector() (p[3][3],p[3][0]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[3][2] = LCC::Traits::Construct_translated_point() (p[3][3],v2);
+  p[3][1] = LCC::Traits::Construct_translated_point() (p[3][3],v3);
+  // left border
+  v1 = LCC::Traits::Construct_vector() (p[3][0],p[0][0]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[2][0] = LCC::Traits::Construct_translated_point() (p[3][0],v2);
+  p[1][0] = LCC::Traits::Construct_translated_point() (p[3][0],v3);
+  // middle, left column
+  v1 = LCC::Traits::Construct_vector() (p[0][1],p[3][1]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[1][1] = LCC::Traits::Construct_translated_point() (p[0][1],v2);
+  p[2][1] = LCC::Traits::Construct_translated_point() (p[0][1],v3);
+  // middle, right column
+  v1 = LCC::Traits::Construct_vector() (p[3][2],p[0][2]);
+  v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+  v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+  p[2][2] = LCC::Traits::Construct_translated_point() (p[3][2],v2);
+  p[1][2] = LCC::Traits::Construct_translated_point() (p[3][2],v3);
+}
+
+void MainWindow::sierpinski_carpet_copy_attributes_and_embed_vertex
+(Dart_handle dh, LCC::Point& p)
+{
+  LCC::Attribute_handle<0>::type ah = (scene.lcc)->create_vertex_attribute(p);
+  for ( LCC::Dart_of_cell_range<0>::iterator
+        it=(scene.lcc)->darts_of_cell<0>(dh).begin();
+        it != (scene.lcc)->darts_of_cell<0>(dh).end(); ++it )
+  {
+    // We copy all the attributes except for dim=0
+    LCC::Helper::Foreach_enabled_attributes_except
+      <CGAL::internal::Group_attribute_functor_of_dart<LCC>, 0>::
+      run(scene.lcc,sierpinskiCarpetSurfaces[0],it);
+    // We initialise the 0-atttrib to ah
+    CGAL::internal::Set_i_attribute_of_dart_functor<LCC, 0>::
+        run(scene.lcc, it, ah);
+  }
+}
+
+void MainWindow::sierpinski_carpet_split_edge_in_three(Dart_handle dh)
+{
+  if (sierpinskiCarpetUpdateAttributes)
+  {
+    LCC::Point p1 = scene.lcc->point(dh);
+    LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
+
+    LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
+    LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+    LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+
+    LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
+    LCC::Point p4 = LCC::Traits::Construct_translated_point() (p1,v3);
+
+    (scene.lcc)->insert_point_in_cell<1>(dh,p4);
+    (scene.lcc)->insert_point_in_cell<1>(dh,p3);
+  }
+  else
+  {
+    LCC::Point p3, p4;
+
+    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
+    {
+      LCC::Point p1 = dart_map[dh];
+      LCC::Point p2 = dart_map[scene.lcc->other_extremity(dh)];
+      LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
+      LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/3);
+      LCC::Vector v3 = LCC::Traits::Construct_scaled_vector() (v1,2.0/3);
+
+      p3 = LCC::Traits::Construct_translated_point() (p1,v2);
+      p4 = LCC::Traits::Construct_translated_point() (p1,v3);
+    }*/
+
+    //    Dart_handle d1=
+        CGAL::insert_cell_0_in_cell_1(*(scene.lcc),
+                                      dh,
+                                      LCC::null_handle,
+                                      false);
+
+    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
+    {
+      dart_map.insert(std::pair<Dart_handle, LCC::Point>(d1, p4));
+      if (!(scene.lcc)->is_free(d1,2))
+      {
+        dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(d1,2,1), p4));
+      }
+      new_darts.push_back((scene.lcc)->beta(dh,1));
+    }*/
+
+    //    Dart_handle d2=
+        CGAL::insert_cell_0_in_cell_1(*(scene.lcc),
+                                      dh,
+                                      LCC::null_handle,
+                                      false);
+
+    /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
+    {
+      dart_map.insert(std::pair<Dart_handle, LCC::Point>(d2, p3));
+      if (!(scene.lcc)->is_free(d2,2))
+      {
+        dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(d2,2,1), p3));
+      }
+      new_darts.push_back((scene.lcc)->beta(dh,1));
+    }*/
+  }
+}
+
+void MainWindow::sierpinski_carpet_split_face_in_three(Dart_handle dh,
+                                                       bool removecenter)
+{
+  Dart_handle d1=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                scene.lcc->beta(dh,1,1,1),
+                                scene.lcc->beta(dh,0,0),
+                                sierpinskiCarpetUpdateAttributes);
+  Dart_handle d2=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                scene.lcc->beta(dh,1,1),
+                                scene.lcc->beta(dh,0),
+                                sierpinskiCarpetUpdateAttributes);
+
+  if ( removecenter )
+  {
+    CGAL::remove_cell<LCC,2>(*scene.lcc,d2,sierpinskiCarpetUpdateAttributes);
+  }
+  else
+  {
+    sierpinskiCarpetSurfaces.push_back(d2);
+  }
+
+  sierpinskiCarpetSurfaces.push_back(d1);
+}
+
+void MainWindow::sierpinski_carpet_split_face_in_nine(Dart_handle dh)
+{
+  Dart_handle d1 = scene.lcc->beta(dh,1,1);
+  Dart_handle d2 = scene.lcc->beta(dh,1,1,1,1,1,1,1);
+  Dart_handle d3 = scene.lcc->beta(dh,1);
+  Dart_handle d4 = scene.lcc->beta(d2,1);
+
+  Dart_handle e2=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                d1,
+                                d2,
+                                sierpinskiCarpetUpdateAttributes);
+
+  /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
+  {
+    dart_map.insert(std::pair<Dart_handle, LCC::Point>(e2, dart_map[d2]));
+    dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(e2,2), dart_map[d1]));
+  }*/
+
+  Dart_handle e1=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                d3,
+                                d4,
+                                sierpinskiCarpetUpdateAttributes);
+
+  /*if (afterConstructionUpdateAttributes && updateAttributesMethodStdMap)
+  {
+    dart_map.insert(std::pair<Dart_handle, LCC::Point>(e1, dart_map[d4]));
+    dart_map.insert(std::pair<Dart_handle, LCC::Point>((scene.lcc)->beta(e1,2), dart_map[d3]));
+  }*/
+
+  sierpinskiCarpetSurfaces.push_back(e2);
+  sierpinskiCarpetSurfaces.push_back(e1);
+
+  // We give the beta2 to not insert in new_darts a dart that will be removed
+  // during the removal of the middle face
+  sierpinski_carpet_split_edge_in_three(scene.lcc->beta(e1,2));
+  sierpinski_carpet_split_edge_in_three(e2);
+
+  sierpinski_carpet_split_face_in_three(dh, false);
+  sierpinski_carpet_split_face_in_three(d2, true);
+  sierpinski_carpet_split_face_in_three(scene.lcc->beta(e2,0), false);
+}
+
+void MainWindow::onSierpinskiCarpetDec()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->sierpinskiCarpetLevel--;
+
+  // We know here the number of Sierpinski surfaces: 8^sierpinskiCarpetLevel
+  // thus we can directly "cut" the std::vector to the correct size.
+  sierpinskiCarpetSurfaces.resize(CGAL::ipower(8,sierpinskiCarpetLevel));
+
+  LCC::size_type markSurfaces = (scene.lcc)->get_new_mark();
+  LCC::size_type markVertices = (scene.lcc)->get_new_mark();
+
+  std::vector<Dart_handle> edges;
+  std::vector<Dart_handle> vertices;
+
+  // First we remove edges.
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiCarpetSurfaces.begin();
+        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = *itsurfaces;
+    dh = scene.lcc->beta(dh,1,1,2,1);
+    edges.push_back(dh);
+    dh = scene.lcc->beta(dh,1,2,1,2,1);
+    edges.push_back(dh);
+    dh = scene.lcc->beta(dh,1,2,1,2,1);
+    edges.push_back(dh);
+    dh = scene.lcc->beta(dh,1,2,1,2,1);
+    edges.push_back(dh);
+  }
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],0),
+                             sierpinskiCarpetUpdateAttributes);
+    CGAL::remove_cell<LCC,1>(*scene.lcc, scene.lcc->beta(edges[i],1),
+                             sierpinskiCarpetUpdateAttributes);
+    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],
+                             sierpinskiCarpetUpdateAttributes);
+  }
+  edges.clear();
+
+  // Lastly we remove vertices.
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiCarpetSurfaces.begin();
+        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
+    // we proceed side by side
+    for (unsigned int i = 0; i < 4; i++)
+    {
+      if ( !(scene.lcc)->is_marked(dh, markVertices) )
+      {
+        vertices.push_back(dh);
+        CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1);
+      if ( !(scene.lcc)->is_marked(dh, markVertices) )
+      {
+        vertices.push_back(dh);
+        CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+      }
+      dh = scene.lcc->beta(dh,1,1);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markSurfaces);
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiCarpetSurfaces.begin();
+        itsurfaces!=sierpinskiCarpetSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
+    for (unsigned int i = 0; i < 4; i++)
+    {
+      if ( (scene.lcc)->is_marked(dh, markVertices) )
+        CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+      dh = scene.lcc->beta(dh,1);
+      if ( (scene.lcc)->is_marked(dh, markVertices) )
+        CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+      dh = scene.lcc->beta(dh,1,1);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markSurfaces);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markSurfaces) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
+
+  for(std::size_t i = 0; i < vertices.size(); i++)
+  {
+    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],
+                             sierpinskiCarpetUpdateAttributes);
+  }
+  vertices.clear();
+
+  (scene.lcc)->free_mark(markSurfaces);
+  (scene.lcc)->free_mark(markVertices);
+
+  if (!sierpinskiCarpetUpdateAttributes)
+  {
+    scene.lcc->correct_invalid_attributes();
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Sierpinski carpet "
+           <<this->sierpinskiCarpetLevel+1<<" -> "
+          <<this->sierpinskiCarpetLevel<<", "
+         <<"attributes updated "
+        <<(sierpinskiCarpetUpdateAttributes ? "DURING" : "AFTER")
+       << " construction: "
+       <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+  QApplication::restoreOverrideCursor ();
+
+  statusBar()->showMessage(QString ("Sierpinski carpet creation %1 -> %2").
+                           arg(this->sierpinskiCarpetLevel+1).
+                           arg(this->sierpinskiCarpetLevel),
+                           DELAY_STATUSMSG);
+  Q_EMIT( sceneChanged());
+}
+
+///////////////////////////////////////////////////////////////////////////////////
+// SIERPINSKI TRIANGLE
+///////////////////////////////////////////////////////////////////////////////////
+void MainWindow::on_actionCreate_Sierpinski_Triangle_triggered ()
+{
+  sierpinskiTriangleUpdateAttributes
+    = dialogsierpinskitriangle.updateAttributes->isChecked();
+
+  dialogsierpinskitriangle.level->disconnect(this);
+
+  dialogsierpinskitriangle.level->setValue(0);
+  sierpinskiTriangleLevel=0;
+  CGAL_assertion( sierpinskiTriangleSurfaces.empty() );
+
+  CGAL_assertion( removedTriangles.empty() );
+
+  Point_3 basepoint(nbcube%5, (nbcube/5)%5, nbcube/25);
+
+  Dart_handle d = scene.lcc->make_triangle(basepoint,
+                                           LCC::Traits::Construct_translated_point()
+                                           (basepoint,LCC::Traits::Vector(1,0,0)),
+                                           LCC::Traits::Construct_translated_point()
+                                           (basepoint,LCC::Traits::Vector(0.5f,CGAL::sqrt(3.f)/2.f,0)));
+
+  on_new_volume(d);
+
+  ++nbcube;
+
+  statusBar ()->showMessage (QString ("Triangle created"),DELAY_STATUSMSG);
+
+  Q_EMIT (sceneChanged ());
+
+  sierpinskiTriangleSurfaces.push_back(d);
+  update_operations_entries(false);
+
+  QObject::connect(dialogsierpinskitriangle.level, SIGNAL(valueChanged(int)),
+                   this, SLOT(onSierpinskiTriangleChangeLevel(int)));
+
+  dialogsierpinskitriangle.show();
+}
+
+void MainWindow::onSierpinskiTriangleCancel()
+{
+  for(std::vector<Dart_handle>::iterator it=sierpinskiTriangleSurfaces.begin();
+      it!=sierpinskiTriangleSurfaces.end(); ++it)
+  {
+    CGAL::remove_cell<LCC,2>(*scene.lcc, *it);
+  }
+
+  recreate_whole_volume_list();
+  sierpinskiTriangleSurfaces.clear();
+  update_operations_entries(true);
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::onSierpinskiTriangleOk()
+{
+  update_operations_entries(true);
+  sierpinskiTriangleSurfaces.clear();
+}
+
+void MainWindow::onSierpinskiTriangleChangeLevel(int newLevel)
+{
+  while ( newLevel > sierpinskiTriangleLevel ) onSierpinskiTriangleInc();
+  while ( newLevel < sierpinskiTriangleLevel ) onSierpinskiTriangleDec();
+}
+
+void MainWindow::onSierpinskiTriangleUpdateAttributes(bool newValue)
+{
+  sierpinskiTriangleUpdateAttributes = newValue;
+}
+
+void MainWindow::onSierpinskiTriangleInc()
+{
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->sierpinskiTriangleLevel++;
+
+  std::vector<Dart_handle> edges;
+  nbfacesinit = sierpinskiTriangleSurfaces.size();
+
+  LCC::size_type markEdges = (scene.lcc)->get_new_mark();
+  LCC::size_type markFaces = (scene.lcc)->get_new_mark();
+
+  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiTriangleSurfaces.begin();
+        itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces)
+  {
+    CGAL_assertion( !(scene.lcc)->is_marked(*itfaces, markFaces) );
+    for (LCC::Dart_of_cell_basic_range<2>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
+         it!=itend; ++it)
+    {
+      if ( !(scene.lcc)->is_marked(it, markEdges) )
+      {
+        edges.push_back(it);
+        CGAL::mark_cell<LCC,1>(*(scene.lcc), it, markEdges);
+      }
+    }
+  }
+
+  (scene.lcc)->negate_mark(markFaces);
+  for(std::vector<Dart_handle>::iterator itfaces=sierpinskiTriangleSurfaces.begin();
+        itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces)
+  {
+    for (LCC::Dart_of_cell_basic_range<2>::iterator
+         it=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).begin(),
+         itend=(scene.lcc)->darts_of_cell_basic<2>(*itfaces, markFaces).end();
+         it!=itend; ++it)
+    {
+      (scene.lcc)->unmark(it, markEdges);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markFaces);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markFaces) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markEdges) );
+
+  (scene.lcc)->free_mark(markEdges);
+  (scene.lcc)->free_mark(markFaces);
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    sierpinski_triangle_split_edge_in_two(edges[i]);
+  }
+  edges.clear();
+
+  for(std::size_t i = 0; i < nbfacesinit; i++)
+  {
+    sierpinski_triangle_split_face_in_four(sierpinskiTriangleSurfaces[i],true);
+  }
+
+  if (!sierpinskiTriangleUpdateAttributes)
+  {
+    for(std::size_t i = nbfacesinit; i < sierpinskiTriangleSurfaces.size(); i++)
+    {
+      LCC::Attribute_handle<3>::type ah = (scene.lcc)->create_attribute<3>();
+        CGAL::Set_i_attribute_functor<LCC, 3>::
+            run(scene.lcc, sierpinskiTriangleSurfaces[i], ah);
+        scene.lcc->info<3>(sierpinskiTriangleSurfaces[i]).color()=
+          (CGAL::Color(myrandom.get_int(0,256),
+                       myrandom.get_int(0,256),
+                       myrandom.get_int(0,256)));
+
+        update_volume_list_add(scene.lcc->attribute<3>(sierpinskiTriangleSurfaces[i]));
+    }
+
+    scene.lcc->correct_invalid_attributes();
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Sierpinski triangle "
+           <<this->sierpinskiTriangleLevel-1<<" -> "
+          <<this->sierpinskiTriangleLevel<<", "
+         <<"attributes updated "
+        <<(sierpinskiTriangleUpdateAttributes ? "DURING" : "AFTER")
+       << " construction: "
+       <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  //CGAL_assertion( (scene.lcc)->is_valid() );
+  statusBar()->showMessage(QString ("Sierpinski triangle creation %1 -> %2").
+                           arg(this->sierpinskiTriangleLevel-1).
+                           arg(this->sierpinskiTriangleLevel),
+                           DELAY_STATUSMSG);
+  QApplication::restoreOverrideCursor ();
+
+  Q_EMIT( sceneChanged());
+}
+
+void MainWindow::sierpinski_triangle_split_edge_in_two(Dart_handle dh)
+{
+  LCC::Point p1 = scene.lcc->point(dh);
+  LCC::Point p2 = scene.lcc->point(scene.lcc->other_extremity(dh));
+
+  LCC::Vector v1 = LCC::Traits::Construct_vector() (p1,p2);
+  LCC::Vector v2 = LCC::Traits::Construct_scaled_vector() (v1,1.0/2);
+
+  LCC::Point p3 = LCC::Traits::Construct_translated_point() (p1,v2);
+
+  (scene.lcc)->insert_point_in_cell<1>(dh,p3,sierpinskiTriangleUpdateAttributes);
+}
+
+void MainWindow::sierpinski_triangle_split_face_in_four(Dart_handle dh, bool removecenter)
+{
+  Dart_handle d1=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                scene.lcc->beta(dh,1),
+                                scene.lcc->beta(dh,1,1,1),
+                                sierpinskiTriangleUpdateAttributes);
+
+  Dart_handle d2=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                scene.lcc->beta(d1,2,1),
+                                scene.lcc->beta(d1,2,1,1,1),
+                                sierpinskiTriangleUpdateAttributes);
+
+  Dart_handle d3=
+  CGAL::insert_cell_1_in_cell_2(*(scene.lcc),
+                                scene.lcc->beta(d2,2,1),
+                                scene.lcc->beta(d2,2,1,1,1),
+                                sierpinskiTriangleUpdateAttributes);
+  if ( removecenter )
+  {
+    Triplet <Dart_handle, Dart_handle, Dart_handle> triplet(d1,d2,d3);
+    removedTriangles.push_back(triplet);
+
+    // at this step, the map is correctly 0-embedded, any other attribute is set
+    //  (call of insert_point_in_cell<1> with update_attributes set to true)
+
+    CGAL::remove_cell<LCC,2>(*scene.lcc,scene.lcc->beta(d3,2),sierpinskiTriangleUpdateAttributes);
+
+    if (sierpinskiTriangleUpdateAttributes)
+    {
+      update_volume_list_add(scene.lcc->attribute<3>(scene.lcc->beta(d2,0)));
+      update_volume_list_add(scene.lcc->attribute<3>(scene.lcc->beta(d1,0)));
+    }
+    else
+    {
+      // we dupplicate all 0-embeddings to set them to the splitted vertices
+      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d2,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d1)));
+      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d3,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d2)));
+      (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d1,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d3)));
+    }
+  }
+  else
+  {
+    sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d3,2));
+  }
+
+  sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d2,0));
+  sierpinskiTriangleSurfaces.push_back(scene.lcc->beta(d1,0));
+}
+
+void MainWindow::onSierpinskiTriangleDec()
+{
+  QApplication::setOverrideCursor( Qt::WaitCursor );
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  CGAL::Timer timer;
+  timer.start();
+#endif
+
+  this->sierpinskiTriangleLevel--;
+
+  int nbt = CGAL::ipower(3,this->sierpinskiTriangleLevel);
+
+  // First we add triangles removed during construction process
+  for ( std::size_t i = removedTriangles.size() - nbt; i < removedTriangles.size(); i++)
+  {
+    Dart_handle d1 = scene.lcc->create_dart();
+    Dart_handle d2 = scene.lcc->create_dart();
+    Dart_handle d3 = scene.lcc->create_dart();
+    scene.lcc->sew<1>(d1,d2);
+    scene.lcc->sew<1>(d2,d3);
+    scene.lcc->sew<1>(d3,d1);
+    scene.lcc->sew<2>(d1, removedTriangles[i].first);
+    scene.lcc->sew<2>(d2, removedTriangles[i].second);
+    scene.lcc->sew<2>(d3, removedTriangles[i].third);
+  }
+
+  removedTriangles.resize(removedTriangles.size() - nbt);
+
+  // We know here the number of Sierpinski surfaces: 3^sierpinskiTriangleLevel
+  // thus we can directly "cut" the std::vector to the correct size.
+  sierpinskiTriangleSurfaces.resize(CGAL::ipower(3,sierpinskiTriangleLevel));
+
+  LCC::size_type markSurfaces = (scene.lcc)->get_new_mark();
+  LCC::size_type markVertices = (scene.lcc)->get_new_mark();
+
+  std::vector<Dart_handle> edges;
+  std::vector<Dart_handle> vertices;
+
+  // Now we remove edges.
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiTriangleSurfaces.begin();
+        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = *itsurfaces;
+    dh = scene.lcc->beta(dh,1);
+    edges.push_back(dh);
+    dh = scene.lcc->beta(dh,2,1,2);
+    edges.push_back(dh);
+    dh = scene.lcc->beta(dh,2,1,2);
+    edges.push_back(dh);
+  }
+
+  for(std::size_t i = 0; i < edges.size(); i++)
+  {
+    CGAL::remove_cell<LCC,1>(*scene.lcc, edges[i],
+                             sierpinskiTriangleUpdateAttributes);
+  }
+  edges.clear();
+
+  // Lastly we remove vertices.
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiTriangleSurfaces.begin();
+        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
+    if ( !(scene.lcc)->is_marked(dh, markVertices) )
+    {
+      vertices.push_back(dh);
+      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,1);
+    if ( !(scene.lcc)->is_marked(dh, markVertices) )
+    {
+      vertices.push_back(dh);
+      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+    }
+    dh = scene.lcc->beta(dh,1,1);
+    if ( !(scene.lcc)->is_marked(dh, markVertices) )
+    {
+      vertices.push_back(dh);
+      CGAL::mark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+    }
+  }
+
+  (scene.lcc)->negate_mark(markSurfaces);
+  for ( std::vector<Dart_handle>::iterator
+        itsurfaces=sierpinskiTriangleSurfaces.begin();
+        itsurfaces!=sierpinskiTriangleSurfaces.end(); ++itsurfaces)
+  {
+    Dart_handle dh = scene.lcc->beta(*itsurfaces,1);
+    if ( (scene.lcc)->is_marked(dh, markVertices) )
+      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+    dh = scene.lcc->beta(dh,1,1);
+    if ( (scene.lcc)->is_marked(dh, markVertices) )
+      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+    dh = scene.lcc->beta(dh,1,1);
+    if ( (scene.lcc)->is_marked(dh, markVertices) )
+      CGAL::unmark_cell<LCC, 0>(*scene.lcc, dh, markVertices);
+  }
+
+  (scene.lcc)->negate_mark(markSurfaces);
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markSurfaces) );
+  CGAL_assertion( (scene.lcc)->is_whole_map_unmarked(markVertices) );
+
+  for(std::size_t i = 0; i < vertices.size(); i++)
+  {
+    CGAL::remove_cell<LCC,0>(*scene.lcc, vertices[i],
+                             sierpinskiTriangleUpdateAttributes);
+  }
+  vertices.clear();
+
+  (scene.lcc)->free_mark(markSurfaces);
+  (scene.lcc)->free_mark(markVertices);
+
+  if (!sierpinskiTriangleUpdateAttributes)
+  {
+    scene.lcc->correct_invalid_attributes();
+  }
+
+#ifdef CGAL_PROFILE_LCC_DEMO
+  timer.stop();
+  std::cout<<"Sierpinski triangle "
+           <<this->sierpinskiTriangleLevel+1<<" -> "
+          <<this->sierpinskiTriangleLevel<<", "
+         <<"attributes updated "
+        <<(sierpinskiTriangleUpdateAttributes ? "DURING" : "AFTER")
+       << " construction: "
+       <<timer.time()<<" seconds."<<std::endl;
+#endif
+
+  recreate_whole_volume_list();
+  statusBar()->showMessage(QString ("Sierpinski triangle creation %1 -> %2").
+                           arg(this->sierpinskiTriangleLevel+1).
+                           arg(this->sierpinskiTriangleLevel),
+                           DELAY_STATUSMSG);
+  QApplication::restoreOverrideCursor ();
+
+  Q_EMIT( sceneChanged());
+}
+
+#undef DELAY_STATUSMSG
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.h b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.h
new file mode 100644
index 0000000..ebf7ebb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.h
@@ -0,0 +1,278 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+// Contributor(s): Kumar Snehasish <kumar.snehasish at gmail.com>
+//
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include "typedefs.h"
+#include "ui_MainWindow.h"
+#include "ui_CreateMesh.h"
+#include "ui_CreateMenger.h"
+#include "ui_CreateSierpinskiCarpet.h"
+#include "ui_CreateSierpinskiTriangle.h"
+
+#include <CGAL/Qt/DemosMainWindow.h>
+
+#include <QDialog>
+#include <QSlider>
+#include <QLabel>
+#include <QFileDialog>
+
+#include <QDockWidget>
+#include <QTableWidget>
+#include <QCheckBox>
+
+class QWidget;
+
+class DialogMesh : public QDialog, public Ui::createMesh
+{
+  Q_OBJECT
+
+public:
+  DialogMesh(QWidget* /*parent*/)
+  { setupUi (this); }
+
+  int getX() { return xvalue->value(); }
+  int getY() { return yvalue->value(); }
+  int getZ() { return zvalue->value(); }
+};
+
+class DialogMenger : public QDialog, public Ui::createMenger
+{
+  Q_OBJECT
+
+public:
+  DialogMenger(QWidget* /*parent*/)
+  { setupUi(this); }
+};
+
+class DialogSierpinskiCarpet : public QDialog,
+    public Ui::createSierpinskiCarpet
+{
+  Q_OBJECT
+
+public:
+  DialogSierpinskiCarpet(QWidget* /*parent*/)
+  { setupUi(this); }
+};
+
+class DialogSierpinskiTriangle : public QDialog,
+    public Ui::createSierpinskiTriangle
+{
+  Q_OBJECT
+
+public:
+  DialogSierpinskiTriangle(QWidget* /*parent*/)
+  { setupUi(this); }
+};
+
+
+template < class First, class Second, class Third > struct Triplet
+{
+  First first;
+  Second second;
+  Third third;
+
+  Triplet(First first, Second second, Third third)
+  {
+    this->first = first;
+    this->second = second;
+    this->third = third;
+  }
+
+  Triplet()
+  {}
+};
+
+class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
+{
+  Q_OBJECT
+
+public:
+  MainWindow(QWidget* parent = 0);
+
+public Q_SLOTS:
+  // File menu
+  void on_actionSave_triggered();
+  void on_actionLoad_triggered();  
+  void on_actionImportOFF_triggered();
+  void on_actionAddOFF_triggered();
+  void on_actionImport3DTDS_triggered();
+  void on_actionImportMoka_triggered();
+  void on_actionCompute_Voronoi_3D_triggered();
+  void on_actionClear_triggered();
+  
+  // Creations menu
+  Dart_handle on_actionCreate_cube_triggered();
+  void on_actionCreate3Cubes_triggered();
+  void on_actionCreate2Volumes_triggered();
+  void on_actionCreate_mesh_triggered();
+  void on_actionCreate_Menger_Sponge_triggered();
+  void on_actionCreate_Sierpinski_Carpet_triggered();
+  void on_actionCreate_Sierpinski_Triangle_triggered();
+
+  // Operations menu
+  void on_actionSubdivide_triggered();
+  void on_actionSubdivide_pqq_triggered();
+  void on_actionDual_3_triggered();
+  void on_actionClose_volume_triggered();
+  void on_actionSew3_same_facets_triggered();
+  void on_actionUnsew3_all_triggered();
+  void on_actionMerge_coplanar_faces_triggered();
+  void on_actionMerge_all_volumes_triggered();
+  void on_actionRemove_filled_volumes_triggered();
+  void on_actionInsert_center_vertices_triggered();
+  void on_actionTriangulate_all_facets_triggered();
+
+  // View menu
+  void on_actionExtend_filled_volumes_triggered();
+  void on_actionExtend_hidden_volumes_triggered();
+
+  // Other slots
+  void load_depend_on_extension(const QString& fileName, bool clear=true);
+  void load(const QString& fileName, bool clear=true);
+  void save(const QString& fileName);
+  void load_off(const QString& fileName, bool clear=true);
+  void load_3DTDS(const QString& fileName, bool clear=true);
+  void load_moka(const QString& fileName, bool clear=true);
+
+  void onSceneChanged();
+
+  void connectVolumeListHandlers();
+  void onCellChanged(int, int);
+  void onHeaderClicked(int);
+
+  void onCreateMeshOk();
+  
+  void onMengerInc();
+  void onMengerDec();
+  void onMengerChange(int);
+  void onMengerOk();
+  void onMengerCancel();
+  void onMengerUpdateAttributes(bool);
+
+  void onSierpinskiCarpetChangeLevel(int);
+/*  void onSierpinskiCarpetNeverUpdateAttributes(bool);
+  void onSierpinskiCarpetDuringConstructionUpdateAttributes(bool);
+  void onSierpinskiCarpetAfterConstructionUpdateAttributes(bool);
+  void onSierpinskiCarpetUpdateAttributesMethodStdMap(bool);
+  void onSierpinskiCarpetUpdateAttributesMethodTraversal(bool);
+  void onSierpinskiCarpetComputeGeometry(bool);*/
+  void onSierpinskiCarpetUpdateAttributes(bool);
+  void onSierpinskiCarpetOk();
+  void onSierpinskiCarpetCancel();
+  void onSierpinskiCarpetInc();
+  void onSierpinskiCarpetDec();
+
+  void onSierpinskiTriangleChangeLevel(int);
+  void onSierpinskiTriangleUpdateAttributes(bool);
+  void onSierpinskiTriangleOk();
+  void onSierpinskiTriangleCancel();
+  void onSierpinskiTriangleInc();
+  void onSierpinskiTriangleDec();
+
+Q_SIGNALS:
+  void sceneChanged();
+  
+protected:
+  void clear_all();
+  void on_new_volume(Dart_handle adart);
+  void on_delete_volume(Dart_handle adart);
+  void init_all_new_volumes();
+  void mark_all_filled_and_visible_volumes(LCC::size_type amark);
+
+  Dart_handle make_iso_cuboid(const Point_3 basepoint, LCC::FT lg);
+
+  void connect_actions();
+  void update_operations_entries(bool show);
+
+  bool is_volume_in_list(LCC::Attribute_handle<3>::type ah);
+  void recreate_whole_volume_list();
+  void update_volume_list_all_ckeckstates();
+  void update_volume_list_add(LCC::Attribute_handle<3>::type ah);
+  void update_volume_list_remove(int);
+  void update_volume_list_remove(LCC::Attribute_handle<3>::type ah);
+
+  void split_edge_in_three     (Dart_handle dh);
+  void split_face_in_three     (Dart_handle dh);
+  void split_face_in_nine      (Dart_handle dh);
+  void split_vol_in_three      (Dart_handle dh, bool removecenter);
+  void split_vol_in_nine       (Dart_handle dh, bool removecenter);
+  void split_vol_in_twentyseven(Dart_handle dh);
+  void process_full_slice(Dart_handle init,
+                          std::vector<Dart_handle>& faces,
+                          LCC::size_type markVols);
+  void process_inter_slice(Dart_handle init,
+                           std::vector<Dart_handle>& faces,
+                           LCC::size_type markVols);
+
+  void sierpinski_carpet_copy_attributes_and_embed_vertex(Dart_handle dh,
+                                                          LCC::Point& p);
+  void sierpinski_carpet_update_geometry();
+  void sierpinski_carpet_compute_geometry();
+  void sierpinski_carpet_compute_4x4_geometry_matrix(LCC::Point p[4][4],
+  LCC::Point& p00, LCC::Point& p03, LCC::Point& p33, LCC::Point& p30);
+  void sierpinski_carpet_split_edge_in_three(Dart_handle dh);
+  void sierpinski_carpet_split_face_in_three(Dart_handle dh,
+                                             bool removecenter);
+  void sierpinski_carpet_split_face_in_nine(Dart_handle dh);
+
+  void sierpinski_triangle_split_edge_in_two(Dart_handle dh);
+  void sierpinski_triangle_split_face_in_four(Dart_handle dh,
+                                              bool removecenter);
+
+  Scene scene;
+
+  unsigned int nbcube;
+  QLabel*      statusMessage;
+  DialogMesh   dialogmesh;
+  DialogMenger dialogmenger;
+  DialogSierpinskiCarpet dialogsierpinskicarpet;
+  DialogSierpinskiTriangle dialogsierpinskitriangle;
+
+  int mengerLevel;
+  bool mengerUpdateAttributes;
+  std::vector<Dart_handle> mengerVolumes;
+
+  int sierpinskiCarpetLevel;
+  std::size_t nbfacesinit;
+  bool sierpinskiCarpetUpdateAttributes;
+  bool computeGeometry;
+  /*bool neverUpdateAttributes;
+  bool duringConstructionUpdateAttributes;
+  bool afterConstructionUpdateAttributes;
+  bool updateAttributesMethodStdMap;
+  bool updateAttributesMethodTraversal;
+  bool isComputableGeometry;*/
+  std::vector<Dart_handle> sierpinskiCarpetSurfaces;
+  // utilisés seulement lorsque pas de mise à jour d'attributs
+  std::map<Dart_handle, LCC::Point> dart_map;
+  std::vector<Dart_handle> new_darts;
+
+  int sierpinskiTriangleLevel;
+  bool sierpinskiTriangleUpdateAttributes;
+  std::vector<Dart_handle> sierpinskiTriangleSurfaces;
+  std::vector< Triplet<Dart_handle, Dart_handle, Dart_handle> > removedTriangles;
+
+  QDockWidget* volumeListDock;
+  QTableWidget* volumeList;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.ui
new file mode 100644
index 0000000..321dc4f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/MainWindow.ui
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>635</width>
+    <height>504</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL 3D Linear Cell Complex</string>
+  </property>
+  <property name="windowIcon">
+   <iconset>
+    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout">
+    <item>
+     <layout class="QHBoxLayout"/>
+    </item>
+    <item>
+     <widget class="Viewer" name="viewer" native="true"/>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>635</width>
+     <height>25</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="actionLoad"/>
+    <addaction name="actionSave"/>
+    <addaction name="separator"/>
+    <addaction name="actionImportOFF"/>
+    <addaction name="actionAddOFF"/>
+    <addaction name="actionImportMoka"/>
+    <addaction name="separator"/>
+    <addaction name="actionImport3DTDS"/>
+    <addaction name="actionCompute_Voronoi_3D"/>
+    <addaction name="separator"/>
+    <addaction name="actionClear"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuOperations">
+    <property name="title">
+     <string>&Operations</string>
+    </property>
+    <addaction name="actionInsert_center_vertices"/>
+    <addaction name="actionTriangulate_all_facets"/>
+    <addaction name="actionMerge_coplanar_faces"/>
+    <addaction name="actionMerge_all_volumes"/>
+    <addaction name="actionRemove_filled_volumes"/>
+    <addaction name="separator"/>
+    <addaction name="actionSew3_same_facets"/>
+    <addaction name="actionUnsew3_all"/>
+    <addaction name="separator"/>
+    <addaction name="actionSubdivide"/>
+    <addaction name="actionSubdivide_pqq"/>
+    <addaction name="actionClose_volume"/>
+    <addaction name="actionDual_3"/>
+   </widget>
+   <widget class="QMenu" name="menuCreations">
+    <property name="title">
+     <string>&Creations</string>
+    </property>
+    <addaction name="actionCreate_cube"/>
+    <addaction name="actionCreate3Cubes"/>
+    <addaction name="actionCreate2Volumes"/>
+    <addaction name="actionCreate_mesh"/>
+    <addaction name="actionCreate_Menger_Sponge"/>
+    <addaction name="separator"/>
+    <addaction name="actionCreate_Sierpinski_Carpet"/>
+    <addaction name="actionCreate_Sierpinski_Triangle"/>
+   </widget>
+   <widget class="QMenu" name="menuView">
+    <property name="title">
+     <string>&View</string>
+    </property>
+    <addaction name="separator"/>
+    <addaction name="actionExtend_filled_volumes"/>
+    <addaction name="actionExtend_hidden_volumes"/>
+    <addaction name="separator"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuCreations"/>
+   <addaction name="menuOperations"/>
+   <addaction name="menuView"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionImportOFF">
+   <property name="text">
+    <string>&Import OFF</string>
+   </property>
+  </action>
+  <action name="actionAddOFF">
+   <property name="text">
+    <string>Add &OFF</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+  </action>
+  <action name="actionSubdivide">
+   <property name="text">
+    <string>&Subdivide all volumes</string>
+   </property>
+  </action>
+  <action name="actionSubdivide_pqq">
+   <property name="text">
+    <string>&Subdivide all volumes - by Pqq</string>
+   </property>
+  </action>
+  <action name="actionCreate3Cubes">
+   <property name="text">
+    <string>Create &3 cubes</string>
+   </property>
+  </action>
+  <action name="actionImport3DTDS">
+   <property name="text">
+    <string>Import 3D&TS</string>
+   </property>
+  </action>
+  <action name="actionClear">
+   <property name="text">
+    <string>&Clear</string>
+   </property>
+  </action>
+  <action name="actionCreate2Volumes">
+   <property name="text">
+    <string>Create &2 volumes</string>
+   </property>
+  </action>
+  <action name="actionDual_3">
+   <property name="text">
+    <string>&Dual</string>
+   </property>
+  </action>
+  <action name="actionClose_volume">
+   <property name="text">
+    <string>&Close all volumes</string>
+   </property>
+  </action>
+  <action name="actionCreate_cube">
+   <property name="text">
+    <string>Create &cube</string>
+   </property>
+  </action>
+  <action name="actionSew3_same_facets">
+   <property name="text">
+    <string>S&ew3 all same facets</string>
+   </property>
+  </action>
+  <action name="actionCreate_mesh">
+   <property name="text">
+    <string>Create &mesh</string>
+   </property>
+  </action>
+  <action name="actionCreate_Menger_Sponge">
+   <property name="text">
+    <string>Create Menger Sponge</string>
+   </property>
+  </action>
+  <action name="actionRemove_filled_volumes">
+   <property name="text">
+    <string>&Remove volumes</string>
+   </property>
+  </action>
+  <action name="actionTriangulate_all_facets">
+   <property name="text">
+    <string>&Triangulate facets</string>
+   </property>
+  </action>
+  <action name="actionUnsew3_all">
+   <property name="text">
+    <string>&Unsew3 volumes</string>
+   </property>
+  </action>
+  <action name="actionVolume_list">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Volume list</string>
+   </property>
+  </action>
+  <action name="actionExtend_filled_volumes">
+   <property name="text">
+    <string>Extend &filled volumes</string>
+   </property>
+  </action>
+  <action name="actionExtend_hidden_volumes">
+   <property name="text">
+    <string>Extend &hidden volumes</string>
+   </property>
+  </action>
+  <action name="actionCompute_Voronoi_3D">
+   <property name="text">
+    <string>Compute Voronoi 3D</string>
+   </property>
+  </action>
+  <action name="actionMerge_all_volumes">
+   <property name="text">
+    <string>&Merge volumes</string>
+   </property>
+  </action>
+  <action name="actionCreate_Sierpinski_Carpet">
+   <property name="text">
+    <string>Create Sierpinski Carpet</string>
+   </property>
+  </action>
+  <action name="actionCreate_Sierpinski_Triangle">
+   <property name="text">
+    <string>Create Sierpinski Triangle</string>
+   </property>
+  </action>
+  <action name="actionLoad">
+   <property name="text">
+    <string>&Load</string>
+   </property>
+  </action>
+  <action name="actionSave">
+   <property name="text">
+    <string>&Save</string>
+   </property>
+  </action>
+  <action name="actionImportMoka">
+   <property name="text">
+    <string>Import Moka</string>
+   </property>
+  </action>
+  <action name="actionMerge_coplanar_faces">
+   <property name="text">
+    <string>Merge coplanar faces</string>
+   </property>
+  </action>
+  <action name="actionInsert_center_vertices">
+   <property name="text">
+    <string>Insert center vertices in faces</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>Viewer</class>
+   <extends>QWidget</extends>
+   <header>Viewer.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.cpp
new file mode 100644
index 0000000..8918bb4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.cpp
@@ -0,0 +1,810 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+// Contributor(s): Kumar Snehasish <kumar.snehasish at gmail.com>
+//
+#include "Viewer.h"
+
+#include <CGAL/Linear_cell_complex_operations.h>
+#include <CGAL/bounding_box.h>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+#include <QGLViewer/vec.h>
+#include <QDebug>
+
+Viewer::Viewer(QWidget* parent)
+  : QGLViewer(CGAL::Qt::createOpenGLContext(),parent), wireframe(false),
+    flatShading(true), edges(true), vertices(true),
+    m_previous_scene_empty(true), are_buffers_initialized(false)
+{
+}
+
+Viewer::~Viewer()
+{
+  buffers[0].destroy();
+  buffers[1].destroy();
+  buffers[2].destroy();
+  buffers[3].destroy();
+  buffers[4].destroy();
+  buffers[5].destroy();
+  buffers[6].destroy();
+  buffers[7].destroy();
+  vao[0].destroy();
+  vao[1].destroy();
+  vao[2].destroy();
+  vao[3].destroy();
+}
+
+void Viewer::compile_shaders()
+{
+  if(!buffers[0].create() || !buffers[1].create() || !buffers[2].create() ||
+     !buffers[3].create() || !buffers[4].create() || !buffers[5].create() ||
+     !buffers[6].create() || !buffers[7].create())
+  {
+    std::cerr<<"VBO Creation FAILED"<<std::endl;
+  }
+
+  if(!vao[0].create() || !vao[1].create() || !vao[2].create() || !vao[3].create())
+  {
+    std::cerr<<"VAO Creation FAILED"<<std::endl;
+  }
+
+  //The Facets
+
+  //Vertex source code
+  const char vertex_source[] =
+    {
+      "#version 120 \n"
+      "attribute highp vec4 vertex;\n"
+      "attribute highp vec3 normal;\n"
+      "attribute highp vec3 color;\n"
+
+      "uniform highp mat4 mvp_matrix;\n"
+      "uniform highp mat4 mv_matrix; \n"
+
+      "varying highp vec4 fP; \n"
+      "varying highp vec3 fN; \n"
+      "varying highp vec4 fColor; \n"
+      "void main(void)\n"
+      "{\n"
+      "   fP = mv_matrix * vertex; \n"
+      "   fN = mat3(mv_matrix)* normal; \n"
+      "   fColor = vec4(color, 1.0); \n"
+      "   gl_Position = mvp_matrix * vertex;\n"
+      "}"
+    };
+  //Vertex source code
+  const char fragment_source[] =
+    {
+      "#version 120 \n"
+      "varying highp vec4 fP; \n"
+      "varying highp vec3 fN; \n"
+      "varying highp vec4 fColor; \n"
+      "uniform vec4 light_pos;  \n"
+      "uniform vec4 light_diff; \n"
+      "uniform vec4 light_spec; \n"
+      "uniform vec4 light_amb;  \n"
+      "uniform float spec_power ; \n"
+
+      "void main(void) { \n"
+
+      "   vec3 L = light_pos.xyz - fP.xyz; \n"
+      "   vec3 V = -fP.xyz; \n"
+
+      "   vec3 N = normalize(fN); \n"
+      "   L = normalize(L); \n"
+      "   V = normalize(V); \n"
+
+      "   vec3 R = reflect(-L, N); \n"
+      "   vec4 diffuse = max(dot(N,L), 0.0) * light_diff * fColor; \n"
+      "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+      "gl_FragColor = light_amb*fColor + diffuse  ; \n"
+      "} \n"
+      "\n"
+    };
+
+  QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+  if(!vertex_shader->compileSourceCode(vertex_source))
+  {
+    std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+  }
+
+  QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+  if(!fragment_shader->compileSourceCode(fragment_source))
+  {
+    std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+  }
+
+  if(!rendering_program.addShader(vertex_shader))
+  {
+    std::cerr<<"adding vertex shader FAILED"<<std::endl;
+  }
+  if(!rendering_program.addShader(fragment_shader))
+  {
+    std::cerr<<"adding fragment shader FAILED"<<std::endl;
+  }
+  if(!rendering_program.link())
+  {
+    std::cerr<<"linking Program FAILED"<<std::endl;
+  }
+  rendering_program.bind();
+
+  //Vertex source code
+  const char vertex_source_p_l[] =
+    {
+      "#version 120 \n"
+      "attribute highp vec4 vertex;\n"
+      "uniform highp mat4 mvp_matrix;\n"
+      "void main(void)\n"
+      "{\n"
+      "   gl_Position = mvp_matrix * vertex;\n"
+      "}"
+    };
+  //Vertex source code
+  const char fragment_source_p_l[] =
+    {
+      "#version 120 \n"
+      "uniform highp vec4 color; \n"
+      "void main(void) { \n"
+      "gl_FragColor = color; \n"
+      "} \n"
+      "\n"
+    };
+
+  vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+  if(!vertex_shader->compileSourceCode(vertex_source_p_l))
+  {
+    std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+  }
+
+  fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+  if(!fragment_shader->compileSourceCode(fragment_source_p_l))
+  {
+    std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+  }
+
+  if(!rendering_program_p_l.addShader(vertex_shader))
+  {
+    std::cerr<<"adding vertex shader FAILED"<<std::endl;
+  }
+  if(!rendering_program_p_l.addShader(fragment_shader))
+  {
+    std::cerr<<"adding fragment shader FAILED"<<std::endl;
+  }
+  if(!rendering_program_p_l.link())
+  {
+    std::cerr<<"linking Program FAILED"<<std::endl;
+  }
+  rendering_program_p_l.bind();
+}
+
+void Viewer::initialize_buffers()
+{
+  //points of the facets
+  vao[0].bind();
+  buffers[0].bind();
+  buffers[0].allocate(pos_facets.data(),
+                      static_cast<int>(pos_facets.size()*sizeof(float)));
+  vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(vertexLocation[0]);
+  rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+  rendering_program.release();
+  buffers[0].release();
+
+  //normals of the facets
+  buffers[1].bind();
+  buffers[1].allocate(flat_normals.data(),
+                      static_cast<int>(flat_normals.size()*sizeof(float)));
+  normalsLocation = rendering_program.attributeLocation("normal");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(normalsLocation);
+  rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3);
+  buffers[1].release();
+
+  //colors of the facets
+  buffers[2].bind();
+  buffers[2].allocate(colors.data(),
+                      static_cast<int>(colors.size()*sizeof(float)));
+  colorsLocation = rendering_program.attributeLocation("color");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(colorsLocation);
+  rendering_program.setAttributeBuffer(colorsLocation,GL_FLOAT,0,3);
+  buffers[2].release();
+  rendering_program.release();
+
+  vao[0].release();
+  vao[1].bind();
+
+  //points of the facets
+  buffers[3].bind();
+  buffers[3].allocate(pos_facets.data(), static_cast<int>(pos_facets.size()*sizeof(float)));
+  vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(vertexLocation[0]);
+  rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+  rendering_program.release();
+  buffers[3].release();
+
+  //normals of the facets
+  buffers[4].bind();
+  buffers[4].allocate(smooth_normals.data(),
+                      static_cast<int>(smooth_normals.size()*sizeof(float)));
+  normalsLocation = rendering_program.attributeLocation("normal");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(normalsLocation);
+  rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3);
+  buffers[4].release();
+
+  //colors of the facets
+  buffers[5].bind();
+  buffers[5].allocate(colors.data(), static_cast<int>(colors.size()*sizeof(float)));
+  colorsLocation = rendering_program.attributeLocation("color");
+  rendering_program.bind();
+  rendering_program.enableAttributeArray(colorsLocation);
+  rendering_program.setAttributeBuffer(colorsLocation,GL_FLOAT,0,3);
+  buffers[5].release();
+  rendering_program.release();
+
+  vao[1].release();
+
+  //The lines
+  vao[2].bind();
+  buffers[6].bind();
+  buffers[6].allocate(pos_lines.data(), static_cast<int>(pos_lines.size()*sizeof(float)));
+  vertexLocation[2] = rendering_program_p_l.attributeLocation("vertex");
+  rendering_program_p_l.bind();
+  rendering_program_p_l.enableAttributeArray(vertexLocation[2]);
+  rendering_program_p_l.setAttributeBuffer(vertexLocation[2],GL_FLOAT,0,3);
+  buffers[6].release();
+  rendering_program_p_l.release();
+  vao[2].release();
+
+  //The points
+  vao[3].bind();
+  buffers[7].bind();
+  buffers[7].allocate(pos_points.data(), static_cast<int>(pos_points.size()*sizeof(float)));
+  vertexLocation[2] = rendering_program_p_l.attributeLocation("vertex");
+  rendering_program_p_l.bind();
+  rendering_program_p_l.enableAttributeArray(vertexLocation[2]);
+  rendering_program_p_l.setAttributeBuffer(vertexLocation[2],GL_FLOAT,0,3);
+  buffers[7].release();
+  rendering_program_p_l.release();
+  vao[3].release();
+
+  are_buffers_initialized = true;
+}
+
+void Viewer::compute_face(Dart_handle dh, LCC::size_type markface)
+{
+  LCC &lcc = *scene->lcc;
+
+  CGAL::mark_cell<LCC, 2>(lcc, dh, markface);
+
+  double r = (double)lcc.info<3>(dh).color().r()/255.0;
+  double g = (double)lcc.info<3>(dh).color().g()/255.0;
+  double b = (double)lcc.info<3>(dh).color().b()/255.0;
+  if ( !lcc.is_free(dh, 3) )
+  {
+    r += (double)lcc.info<3>(lcc.beta(dh,3)).color().r()/255.0;
+    g += (double)lcc.info<3>(lcc.beta(dh,3)).color().g()/255.0;
+    b += (double)lcc.info<3>(lcc.beta(dh,3)).color().b()/255.0;
+    r /= 2; g /= 2; b /= 2;
+  }
+
+  //compute flat normals
+  LCC::Vector normal = CGAL::compute_normal_of_cell_2(lcc,dh);
+  normal = normal/(CGAL::sqrt(normal*normal));
+
+  if (lcc.beta<1,1,1>(dh)!=dh)
+  {
+    P_traits cdt_traits(normal);
+    CDT cdt(cdt_traits);
+
+    // Iterates on the vector of facet handles
+    CDT::Vertex_handle previous = NULL, first = NULL;
+    for (LCC::Dart_of_orbit_range<1>::const_iterator
+           he_circ = lcc.darts_of_orbit<1>(dh).begin(),
+           he_circ_end = lcc.darts_of_orbit<1>(dh).end();
+         he_circ!=he_circ_end; ++he_circ)
+    {
+      CDT::Vertex_handle vh = cdt.insert(lcc.point(he_circ));
+      if(first == NULL)
+      { first = vh; }
+      vh->info().v = CGAL::compute_normal_of_cell_0<LCC>(lcc, he_circ);
+      if(previous!=NULL && previous != vh)
+      { cdt.insert_constraint(previous, vh); }
+      previous = vh;
+    }
+    if (previous!=NULL)
+      cdt.insert_constraint(previous, first);
+
+    // sets mark is_external
+    for(CDT::All_faces_iterator fit = cdt.all_faces_begin(),
+          fitend = cdt.all_faces_end(); fit!=fitend; ++fit)
+    {
+      fit->info().is_external = true;
+      fit->info().is_process = false;
+    }
+    //check if the facet is external or internal
+    std::queue<CDT::Face_handle> face_queue;
+    CDT::Face_handle face_internal = NULL;
+    face_queue.push(cdt.infinite_vertex()->face());
+    while(! face_queue.empty() )
+    {
+      CDT::Face_handle fh = face_queue.front();
+      face_queue.pop();
+      if(!fh->info().is_process)
+      {
+        fh->info().is_process = true;
+        for(int i = 0; i <3; ++i)
+        {
+          if(!cdt.is_constrained(std::make_pair(fh, i)))
+          {
+            face_queue.push(fh->neighbor(i));
+          }
+          else if (face_internal==NULL)
+          {
+            face_internal = fh->neighbor(i);
+          }
+        }
+      }
+    }
+
+    if ( face_internal!=NULL )
+      face_queue.push(face_internal);
+
+    while(! face_queue.empty() )
+    {
+      CDT::Face_handle fh = face_queue.front();
+      face_queue.pop();
+      if(!fh->info().is_process)
+      {
+        fh->info().is_process = true;
+        fh->info().is_external = false;
+        for(int i = 0; i <3; ++i)
+        {
+          if(!cdt.is_constrained(std::make_pair(fh, i)))
+          {
+            face_queue.push(fh->neighbor(i));
+          }
+        }
+      }
+    }
+
+    //iterates on the internal faces to add the vertices to the positions
+    //and the normals to the appropriate vectors
+    for(CDT::Finite_faces_iterator ffit = cdt.finite_faces_begin(),
+          ffitend = cdt.finite_faces_end(); ffit != ffitend; ++ffit)
+    {
+      if(!ffit->info().is_external)
+      {
+        flat_normals.push_back(normal.x());
+        flat_normals.push_back(normal.y());
+        flat_normals.push_back(normal.z());
+
+        flat_normals.push_back(normal.x());
+        flat_normals.push_back(normal.y());
+        flat_normals.push_back(normal.z());
+
+        flat_normals.push_back(normal.x());
+        flat_normals.push_back(normal.y());
+        flat_normals.push_back(normal.z());
+
+        smooth_normals.push_back(ffit->vertex(0)->info().v.x());
+        smooth_normals.push_back(ffit->vertex(0)->info().v.y());
+        smooth_normals.push_back(ffit->vertex(0)->info().v.z());
+
+        smooth_normals.push_back(ffit->vertex(1)->info().v.x());
+        smooth_normals.push_back(ffit->vertex(1)->info().v.y());
+        smooth_normals.push_back(ffit->vertex(1)->info().v.z());
+
+        smooth_normals.push_back(ffit->vertex(2)->info().v.x());
+        smooth_normals.push_back(ffit->vertex(2)->info().v.y());
+        smooth_normals.push_back(ffit->vertex(2)->info().v.z());
+
+        pos_facets.push_back(ffit->vertex(0)->point().x());
+        pos_facets.push_back(ffit->vertex(0)->point().y());
+        pos_facets.push_back(ffit->vertex(0)->point().z());
+
+        pos_facets.push_back(ffit->vertex(1)->point().x());
+        pos_facets.push_back(ffit->vertex(1)->point().y());
+        pos_facets.push_back(ffit->vertex(1)->point().z());
+
+        pos_facets.push_back(ffit->vertex(2)->point().x());
+        pos_facets.push_back(ffit->vertex(2)->point().y());
+        pos_facets.push_back(ffit->vertex(2)->point().z());
+
+        colors.push_back(r);colors.push_back(g);colors.push_back(b);
+        colors.push_back(r);colors.push_back(g);colors.push_back(b);
+        colors.push_back(r);colors.push_back(g);colors.push_back(b);
+      }
+    }
+  }
+  else
+  {
+    colors.push_back(r);colors.push_back(g);colors.push_back(b);
+    colors.push_back(r);colors.push_back(g);colors.push_back(b);
+    colors.push_back(r);colors.push_back(g);colors.push_back(b);
+
+    flat_normals.push_back(normal.x());
+    flat_normals.push_back(normal.y());
+    flat_normals.push_back(normal.z());
+
+    flat_normals.push_back(normal.x());
+    flat_normals.push_back(normal.y());
+    flat_normals.push_back(normal.z());
+
+    flat_normals.push_back(normal.x());
+    flat_normals.push_back(normal.y());
+    flat_normals.push_back(normal.z());
+
+    for (LCC::Dart_of_orbit_range<1>::const_iterator
+           orbitIter = lcc.darts_of_orbit<1>(dh).begin();
+         orbitIter.cont(); ++orbitIter)
+    {
+      //compute Smooth normals
+      LCC::Vector normal = CGAL::compute_normal_of_cell_0(lcc,orbitIter);
+      normal = normal/(CGAL::sqrt(normal*normal));
+
+      smooth_normals.push_back(normal.x());
+      smooth_normals.push_back(normal.y());
+      smooth_normals.push_back(normal.z());
+
+      const LCC::Point& p = lcc.point(orbitIter);
+      pos_facets.push_back(p.x());
+      pos_facets.push_back(p.y());
+      pos_facets.push_back(p.z());
+    }
+  }
+}
+
+void Viewer::compute_edge(Dart_handle dh, LCC::size_type markedge)
+{
+  LCC &lcc = *scene->lcc;
+
+  CGAL::mark_cell<LCC, 1>(lcc, dh, markedge);
+
+  const LCC::Point& p =  lcc.point(dh);
+  Dart_handle d2 = lcc.other_extremity(dh);
+  if ( d2!=NULL )
+  {
+    const LCC::Point& p2 = lcc.point(d2);
+    pos_lines.push_back(p.x());
+    pos_lines.push_back(p.y());
+    pos_lines.push_back(p.z());
+
+    pos_lines.push_back(p2.x());
+    pos_lines.push_back(p2.y());
+    pos_lines.push_back(p2.z());
+  }
+}
+
+void Viewer::compute_vertex(Dart_handle dh, LCC::size_type markvertex, bool& empty)
+{
+  LCC &lcc = *scene->lcc;
+
+  CGAL::mark_cell<LCC, 0>(lcc, dh, markvertex);
+
+  const LCC::Point& p =  lcc.point(dh);
+  pos_points.push_back(p.x());
+  pos_points.push_back(p.y());
+  pos_points.push_back(p.z());
+
+  if ( empty )
+  {
+    bb = p.bbox();
+    empty = false;
+  }
+  else
+    bb = bb + p.bbox();
+}
+
+void Viewer::compute_elements()
+{
+  LCC &lcc = *scene->lcc;
+
+  pos_facets.clear();
+  flat_normals.clear();
+  smooth_normals.clear();
+  colors.clear();
+  pos_lines.clear();
+  pos_points.clear();
+
+  if ( lcc.is_empty() )
+  {
+    bb = LCC::Point(CGAL::ORIGIN).bbox();
+    bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer
+    return;
+  }
+
+  LCC::size_type markvertex = lcc.get_new_mark();
+  LCC::size_type markedge   = lcc.get_new_mark();
+  LCC::size_type markface   = lcc.get_new_mark();
+
+  bool empty = true;
+  for (LCC::Attribute_range<3>::type::iterator it=lcc.attributes<3>().begin(),
+         itend=lcc.attributes<3>().end(); it!=itend; ++it )
+  {
+    if ( it->info().is_visible() )
+    {
+      for(LCC::Dart_of_cell_range<3>::iterator
+            dartIter=lcc.darts_of_cell<3>(lcc.dart_of_attribute<3>(it)).begin();
+          dartIter.cont(); ++dartIter)
+      {
+        if ( it->info().is_filled() && !lcc.is_marked(dartIter, markface) )
+          compute_face(dartIter, markface);
+
+        if ( !lcc.is_marked(dartIter, markedge) )
+          compute_edge(dartIter, markedge);
+
+        if ( !lcc.is_marked(dartIter, markvertex) )
+        compute_vertex(dartIter, markvertex, empty);
+      }
+    }
+  }
+
+  if ( empty )
+  {
+    bb = LCC::Point(CGAL::ORIGIN).bbox();
+    bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer
+  }
+
+  for (LCC::Dart_range::iterator it=lcc.darts().begin(),
+         itend=lcc.darts().end(); it!=itend; ++it )
+  {
+    lcc.unmark(it, markvertex);
+    lcc.unmark(it, markedge);
+    lcc.unmark(it, markface);
+  }
+
+  lcc.free_mark(markvertex);
+  lcc.free_mark(markedge);
+  lcc.free_mark(markface);
+}
+
+void Viewer::attrib_buffers(QGLViewer* viewer)
+{
+  QMatrix4x4 mvpMatrix;
+  QMatrix4x4 mvMatrix;
+  double mat[16];
+  viewer->camera()->getModelViewProjectionMatrix(mat);
+  for(int i=0; i < 16; i++)
+  {
+    mvpMatrix.data()[i] = (float)mat[i];
+  }
+  viewer->camera()->getModelViewMatrix(mat);
+  for(int i=0; i < 16; i++)
+  {
+    mvMatrix.data()[i] = (float)mat[i];
+  }
+  // define material
+  QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
+  QVector4D diffuse( 0.9f,
+                     0.9f,
+                     0.9f,
+                     0.9f );
+
+  QVector4D specular( 0.0f,
+                      0.0f,
+                      0.0f,
+                      1.0f );
+
+
+  QVector4D position((bb.xmax()-bb.xmin())/2, (bb.ymax()-bb.ymin())/2,bb.zmax(), 0.0 );
+  GLfloat shininess =  1.0f;
+
+  rendering_program.bind();
+  mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+  mvLocation = rendering_program.uniformLocation("mv_matrix");
+  lightLocation[0] = rendering_program.uniformLocation("light_pos");
+  lightLocation[1] = rendering_program.uniformLocation("light_diff");
+  lightLocation[2] = rendering_program.uniformLocation("light_spec");
+  lightLocation[3] = rendering_program.uniformLocation("light_amb");
+  lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+  rendering_program.setUniformValue(lightLocation[0], position);
+  rendering_program.setUniformValue(lightLocation[1], diffuse);
+  rendering_program.setUniformValue(lightLocation[2], specular);
+  rendering_program.setUniformValue(lightLocation[3], ambient);
+  rendering_program.setUniformValue(lightLocation[4], shininess);
+  rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+  rendering_program.setUniformValue(mvLocation, mvMatrix);
+
+  rendering_program.release();
+  rendering_program_p_l.bind();
+  mvpLocation[1] = rendering_program_p_l.uniformLocation("mvp_matrix");
+  colorLocation = rendering_program_p_l.uniformLocation("color");
+  rendering_program.setUniformValue(mvpLocation[1], mvpMatrix);
+  rendering_program_p_l.release();
+}
+
+void Viewer::sceneChanged()
+{
+  compute_elements();
+  this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(),
+						     bb.ymin(),
+						     bb.zmin()),
+				      qglviewer::Vec(bb.xmax(),
+						     bb.ymax(),
+						     bb.zmax()));
+  are_buffers_initialized = false;
+
+  if (m_previous_scene_empty)
+    this->showEntireScene();
+  else
+    this->updateGL();
+
+  m_previous_scene_empty = scene->lcc->is_empty(); // for the next call to sceneChanged
+}
+
+void Viewer::draw()
+{
+  if(scene)
+  {
+    glEnable(GL_DEPTH_TEST);
+    if(!are_buffers_initialized)
+      initialize_buffers();
+
+    QColor color;
+    if ( !wireframe )
+    {
+      if(flatShading)
+      {
+        vao[0].bind();
+        attrib_buffers(this);
+        rendering_program.bind();
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_facets.size()/3));
+        rendering_program.release();
+        vao[0].release();
+      }
+      else
+      {
+        vao[1].bind();
+        attrib_buffers(this);
+        rendering_program.bind();
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_facets.size()/3));
+        rendering_program.release();
+        vao[1].release();
+      }
+    }
+    if(edges)
+    {
+      vao[2].bind();
+      attrib_buffers(this);
+      color.setRgbF(0.2f, 0.2f, 0.7f);
+      rendering_program_p_l.bind();
+      rendering_program_p_l.setAttributeValue(colorLocation,color);
+      glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
+      rendering_program_p_l.release();
+      vao[2].release();
+    }
+    if(vertices)
+    {
+      ::glPointSize(7.f);
+      vao[3].bind();
+      attrib_buffers(this);
+      color.setRgbF(.2f,.2f,.6f);
+      rendering_program_p_l.bind();
+      rendering_program_p_l.setAttributeValue(colorLocation,color);
+      glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+      rendering_program_p_l.release();
+      vao[3].release();
+    }
+  }
+}
+void Viewer::init()
+{
+  // Restore previous viewer state.
+  restoreStateFromFile();
+  initializeOpenGLFunctions();
+  // Define 'Control+Q' as the new exit shortcut (default was 'Escape')
+  setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q);
+
+  // Add custom key description (see keyPressEvent).
+  setKeyDescription(Qt::Key_W, "Toggles wire frame display");
+  setKeyDescription(Qt::Key_F, "Toggles flat shading display");
+  setKeyDescription(Qt::Key_E, "Toggles edges display");
+  setKeyDescription(Qt::Key_V, "Toggles vertices display");
+
+  // Light default parameters
+  ::glLineWidth(1.4f);
+  ::glPointSize(4.f);
+  ::glEnable(GL_POLYGON_OFFSET_FILL);
+  ::glPolygonOffset(1.0f,1.0f);
+  ::glClearColor(1.0f,1.0f,1.0f,0.0f);
+  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+
+  ::glEnable(GL_LIGHTING);
+
+  ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+
+  ::glShadeModel(GL_FLAT);
+  ::glDisable(GL_BLEND);
+  ::glDisable(GL_LINE_SMOOTH);
+  ::glDisable(GL_POLYGON_SMOOTH_HINT);
+  ::glBlendFunc(GL_ONE, GL_ZERO);
+  ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
+  compile_shaders();
+}
+
+void Viewer::keyPressEvent(QKeyEvent *e)
+{
+  const Qt::KeyboardModifiers modifiers = e->modifiers();
+
+  if ((e->key()==Qt::Key_W) && (modifiers==Qt::NoButton))
+  {
+    wireframe = !wireframe;
+    if (wireframe)
+      glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+    else
+      glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+    updateGL();
+  }
+  else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton))
+  {
+    flatShading = !flatShading;
+    updateGL();
+  }
+  else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton))
+  {
+    edges = !edges;
+    updateGL();
+  }
+  else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton))
+  {
+    vertices = !vertices;
+    updateGL();
+  }
+  else
+    QGLViewer::keyPressEvent(e);
+}
+
+QString Viewer::helpString() const
+{
+  QString text("<h2>L C C   V i e w e r</h2>");
+  text += "Use the mouse to move the camera around the object. ";
+  text += "You can respectively revolve around, zoom and translate with "
+    "the three mouse buttons. ";
+  text += "Left and middle buttons pressed together rotate around the "
+    "camera view direction axis<br><br>";
+  text += "Pressing <b>Alt</b> and one of the function keys "
+    "(<b>F1</b>..<b>F12</b>) defines a camera keyFrame. ";
+  text += "Simply press the function key again to restore it. Several "
+    "keyFrames define a ";
+  text += "camera path. Paths are saved when you quit the application and "
+    "restored at next start.<br><br>";
+  text += "Press <b>F</b> to display the frame rate, <b>A</b> for the "
+    "world axis, ";
+  text += "<b>Alt+Return</b> for full screen mode and <b>Control+S</b> to "
+    "save a snapshot. ";
+  text += "See the <b>Keyboard</b> tab in this window for a complete "
+    "shortcut list.<br><br>";
+  text += "Double clicks automates single click actions: A left button "
+    "double click aligns the closer axis with the camera (if close enough). ";
+  text += "A middle button double click fits the zoom of the camera and "
+    "the right button re-centers the scene.<br><br>";
+  text += "A left button double click while holding right button pressed "
+    "defines the camera <i>Revolve Around Point</i>. ";
+  text += "See the <b>Mouse</b> tab and the documentation web pages for "
+    "details.<br><br>";
+  text += "Press <b>Escape</b> to exit the viewer.";
+  return text;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.h b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.h
new file mode 100644
index 0000000..d76ca69
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/Viewer.h
@@ -0,0 +1,104 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//                 Kumar Snehasish <kumar.snehasish at gmail.com>
+//
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include "typedefs.h"
+
+#include <vector>
+#include <QGLViewer/qglviewer.h>
+#include <QKeyEvent>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QGLBuffer>
+#include <QOpenGLShaderProgram>
+
+class Viewer : public QGLViewer, public QOpenGLFunctions_2_1
+{
+  Q_OBJECT
+
+  typedef LCC::Dart_handle Dart_handle;
+  typedef LCC::Dart_const_handle Dart_const_handle;
+
+public:
+  Viewer(QWidget* parent);
+
+  ~Viewer();
+
+  void setScene(Scene* scene_)
+  { scene = scene_; }
+
+public:
+  void draw();
+
+  virtual void init();
+
+  void keyPressEvent(QKeyEvent *e);
+
+  virtual QString helpString() const;
+
+public Q_SLOTS:
+
+  void sceneChanged();
+
+private:
+  void initialize_buffers();
+  void attrib_buffers(QGLViewer*);
+  void compile_shaders();
+
+  void compute_elements();
+  void compute_face(Dart_handle dh, LCC::size_type markface);
+  void compute_edge(Dart_handle dh, LCC::size_type markedge);
+  void compute_vertex(Dart_handle dh, LCC::size_type markvertex, bool& empty);
+
+private:
+  Scene* scene;
+  bool wireframe;
+  bool flatShading;
+  bool edges;
+  bool vertices;
+  CGAL::Bbox_3 bb;
+  bool m_previous_scene_empty;
+  bool are_buffers_initialized;
+
+  //Shaders elements
+  int vertexLocation[3];
+  int normalsLocation;
+  int mvpLocation[2];
+  int mvLocation;
+  int colorLocation;
+  int colorsLocation;
+  int lightLocation[5];
+
+  std::vector<float> pos_points;
+  std::vector<float> pos_lines;
+  std::vector<float> pos_facets;
+  std::vector<float> smooth_normals;
+  std::vector<float> flat_normals;
+  std::vector<float> colors;
+
+  QGLBuffer buffers[10];
+  QOpenGLVertexArrayObject vao[10];
+  QOpenGLShaderProgram rendering_program;
+  QOpenGLShaderProgram rendering_program_p_l;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Linear_cell_complex/about_Linear_cell_complex_3.html b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/about_Linear_cell_complex_3.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Linear_cell_complex/about_Linear_cell_complex_3.html
rename to 3rdparty/CGAL-4.8/demo/Linear_cell_complex/about_Linear_cell_complex_3.html
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/import_moka.h b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/import_moka.h
new file mode 100644
index 0000000..f0a62a6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/import_moka.h
@@ -0,0 +1,192 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef IMPORT_MOKA_H
+#define IMPORT_MOKA_H
+
+namespace CGAL
+{
+struct GDart
+{
+  unsigned int alpha[4];
+  Dart_handle dh;
+  LCC::Vertex_attribute_handle vh;
+
+  GDart() : dh(NULL), vh(NULL)
+  {}
+
+  GDart(const GDart& adart) : dh(adart.dh),
+    vh(adart.vh)
+  {
+    for (unsigned int i=0; i<4; ++i)
+      alpha[i]=adart.alpha[i];
+  }
+};
+
+template<typename LCC>
+bool import_from_moka(LCC& lcc, const char* filename)
+{
+  typedef typename LCC::Point Point;
+
+  std::ifstream ifile(filename);
+  if (!ifile)
+  {
+    std::cout<<"Error opening file "<<filename<<"."<<std::endl;
+    return false;
+  }
+
+  std::string line;
+  std::getline(ifile, line);
+
+  if ( line == "Moka file [binary]" )
+  {
+    std::cout<<"Binary file not (yet) considered.\n";
+    return false;
+  }
+  else if ( line != "Moka file [ascii]" )
+  {
+    std::cout<<"File "<<filename<<" is not a moka file.\n";
+    std::cout<< line;
+    return false;
+  }
+
+  // To skip the masks mark (TODO read the marks ?)
+  std::getline(ifile, line);
+
+  std::vector<GDart> gdarts;
+  unsigned int nbLoaded = 0;
+  unsigned int number;
+  double x,y,z;
+
+  // First load all the gdarts, and create vertex attributes
+  while(ifile)
+  {
+    GDart agdart;
+    ifile>>agdart.alpha[0]>>agdart.alpha[1]
+        >>agdart.alpha[2]>>agdart.alpha[3]; // the 4 alpha
+    ifile>>number>>number>>number>>number; // to skip the 4*8 marks
+    if ( agdart.alpha[0]==nbLoaded )
+    {
+      std::cout<<"Impossible to load a moka file with 0-free darts.\n";
+      return false;
+    }
+    if ( ifile )
+    {
+      ifile>>number; // bool to know if dart has a vertex of not.
+      if (number)
+      {
+        ifile>>x>>y>>z;
+        agdart.vh = lcc.create_vertex_attribute(Point(x, y, z));
+      }
+
+      gdarts.push_back(agdart);
+      ++nbLoaded;
+    }
+  }
+  ifile.close();
+
+  // Second orient the gmap, and create oriented darts.
+  std::stack<unsigned int> totreat;
+  for (unsigned int startingdart = 0; startingdart<nbLoaded; ++startingdart)
+  {
+    bool orient=(gdarts[startingdart].dh==NULL);
+    for (unsigned int dim=0; orient && dim<4; ++dim)
+      if (gdarts[gdarts[startingdart].alpha[dim]].dh!=NULL) orient=false;
+
+    if ( orient )
+    {
+      totreat.push(startingdart);
+      gdarts[startingdart].dh=lcc.create_dart();
+
+      while ( !totreat.empty() )
+      {
+        unsigned int i=totreat.top();
+        totreat.pop();
+
+        assert(gdarts[i].dh!=NULL);
+
+        for (unsigned int dim=1; dim<4; ++dim)
+        {
+          if (gdarts[i].alpha[dim]!=i &&
+              gdarts[gdarts[i].alpha[dim]].vh!=NULL)
+          {
+            gdarts[i].vh = gdarts[gdarts[i].alpha[dim]].vh;
+            gdarts[gdarts[i].alpha[dim]].vh = NULL;
+          }
+
+          unsigned int alpha0 = gdarts[i].alpha[0];
+          assert( alpha0!=i );
+
+          if (gdarts[alpha0].alpha[dim]!=alpha0)
+          {
+            if ( gdarts[gdarts[alpha0].alpha[dim]].dh==NULL )
+            {
+              totreat.push(gdarts[alpha0].alpha[dim]);
+              gdarts[gdarts[alpha0].alpha[dim]].dh = lcc.create_dart();
+              lcc.basic_link_beta(gdarts[i].dh,
+                                  gdarts[gdarts[alpha0].alpha[dim]].dh,
+                  dim);
+            }
+            else if (lcc.is_free(gdarts[i].dh, dim))
+            {
+              lcc.basic_link_beta(gdarts[i].dh,
+                                  gdarts[gdarts[alpha0].alpha[dim]].dh,
+                  dim);
+            }
+          }
+        }
+      }
+    }
+  }
+
+  // Test that the gmap was orientable.
+  bool orientable = true;
+  for (unsigned int i = 0; i<nbLoaded; ++i)
+  {
+    if (gdarts[i].dh!=NULL)
+    {
+      for (unsigned int dim=0; dim<4; ++dim)
+      {
+        if (orientable &&
+            gdarts[i].alpha[dim]!=i &&
+            gdarts[gdarts[i].alpha[dim]].dh!=NULL)
+        {
+          std::cout<<"Pb, the gmap is NOT orientable."<<std::endl;
+          orientable=false;
+          // lcc.clear();
+        }
+      }
+
+      if ( gdarts[i].dh->attribute<3>() == NULL )
+      {
+        lcc.template set_attribute<3>(gdarts[i].dh, lcc.template create_attribute<3>());
+      }
+    }
+    if (gdarts[i].vh!=NULL)
+    {
+      lcc.set_vertex_attribute(gdarts[i].dh, gdarts[i].vh);
+    }
+  }
+
+  return true;
+}
+
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Linear_cell_complex/typedefs.h b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/typedefs.h
new file mode 100644
index 0000000..3a84e9f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Linear_cell_complex/typedefs.h
@@ -0,0 +1,205 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef TYPEDEFS_H
+#define TYPEDEFS_H
+
+#include <CGAL/Linear_cell_complex.h>
+#include <CGAL/Linear_cell_complex_constructors.h>
+#include <CGAL/Linear_cell_complex_operations.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Combinatorial_map_save_load.h>
+
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+
+#include <CGAL/IO/Color.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Random.h>
+
+#include <cstdio>
+#include <cstring>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <list>
+
+// Global random
+extern CGAL::Random myrandom;
+
+// Use to define properties on volumes.
+#define LCC_DEMO_VISIBLE 1 // if not visible => hidden
+#define LCC_DEMO_FILLED  2 // if not filled, wireframe
+
+class Volume_info
+{
+  friend void CGAL::read_cmap_attribute_node<Volume_info>
+  (const boost::property_tree::ptree::value_type &v,Volume_info &val);
+
+  friend void CGAL::write_cmap_attribute_node<Volume_info>(boost::property_tree::ptree & node,
+                                                           const Volume_info& arg);
+public:
+  Volume_info() : m_color(CGAL::Color(myrandom.get_int(0,256),
+                                      myrandom.get_int(0,256),
+                                      myrandom.get_int(0,256))),
+    m_status( LCC_DEMO_VISIBLE | LCC_DEMO_FILLED )
+  {}
+
+  CGAL::Color& color()
+  { return m_color; }
+  const CGAL::Color& color() const
+  { return m_color; }
+
+  std::string color_name() const
+  {
+    std::ostringstream ss;
+    ss<<std::setfill('0');
+    ss<<"#"<<std::hex<<std::setw(2)<<(int)m_color.red()
+     <<std::setw(2)<<(int)m_color.green()<<std::setw(2)<<(int)m_color.blue();
+    return ss.str();
+  }
+
+  bool is_visible() const
+  { return (m_status & LCC_DEMO_VISIBLE)!=0; }
+  bool is_filled() const
+  { return (m_status & LCC_DEMO_FILLED)!=0; }
+  bool is_filled_and_visible() const
+  { return is_filled() && is_visible(); }
+
+  void set_visible(bool val=true)
+  {
+    if ( is_visible()==val ) return;
+    if ( val ) m_status = m_status | LCC_DEMO_VISIBLE;
+    else       m_status = m_status ^ LCC_DEMO_VISIBLE;
+  }
+  void set_filled(bool val=true)
+  {
+    if ( is_filled()==val ) return;
+    if ( val ) m_status = m_status | LCC_DEMO_FILLED;
+    else       m_status = m_status ^ LCC_DEMO_FILLED;
+  }
+
+  void negate_visible()
+  { set_visible(!is_visible()); }
+  void negate_filled()
+  { set_filled(!is_filled()); }
+
+private:
+  CGAL::Color m_color;
+  char        m_status;
+};
+
+namespace CGAL
+{
+
+template<>
+inline void read_cmap_attribute_node<Volume_info>
+(const boost::property_tree::ptree::value_type &v,Volume_info &val)
+{
+  try
+  {
+    val.m_status = v.second.get<int>("status");
+  }
+  catch(const std::exception &  )
+  {}
+
+  try
+  {
+    char r = v.second.get<int>("color-r");
+    char g = v.second.get<int>("color-g");
+    char b = v.second.get<int>("color-b");
+    val.m_color = CGAL::Color(r,g,b);
+  }
+  catch(const std::exception &  )
+  {}
+}
+
+// Definition of function allowing to save custon information.
+template<>
+inline void write_cmap_attribute_node<Volume_info>(boost::property_tree::ptree & node,
+                                                   const Volume_info& arg)
+{
+  boost::property_tree::ptree & nValue = node.add("v","");
+  nValue.add("status",(int)arg.m_status);
+  nValue.add("color-r",(int)arg.m_color.r());
+  nValue.add("color-g",(int)arg.m_color.g());
+  nValue.add("color-b",(int)arg.m_color.b());
+}
+
+}
+
+class Myitems
+{
+public:
+  template < class Refs >
+  struct Dart_wrapper
+  {
+    typedef CGAL::Dart<3, Refs > Dart;
+
+    typedef CGAL::Cell_attribute_with_point< Refs > Vertex_attrib;
+    typedef CGAL::Cell_attribute< Refs, Volume_info> Volume_attrib;
+
+    typedef CGAL::cpp11::tuple<Vertex_attrib,void,void,
+                               Volume_attrib> Attributes;
+  };
+};
+
+typedef CGAL::Linear_cell_complex_traits
+<3,CGAL::Exact_predicates_inexact_constructions_kernel> Mytraits;
+
+typedef CGAL::Linear_cell_complex<3,3,Mytraits,Myitems> LCC;
+typedef LCC::Dart_handle      Dart_handle;
+typedef LCC::Vertex_attribute Vertex;
+
+typedef LCC::Point    Point_3;
+typedef LCC::Vector   Vector_3;
+
+typedef CGAL::Timer Timer;
+
+struct Vertex_info
+{
+  Dart_handle dh;
+  Vector_3 v;
+};
+
+struct Face_info {
+  bool exist_edge[3];
+  bool is_external;
+  bool is_process;
+};
+
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<Mytraits> P_traits;
+typedef CGAL::Triangulation_vertex_base_with_info_2<Vertex_info, P_traits> Vb;
+
+typedef CGAL::Triangulation_face_base_with_info_2<Face_info,P_traits> Fb1;
+
+typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>    Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                   TDS;
+typedef CGAL::No_intersection_tag                                     Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits, TDS,
+                                                   Itag>              CDT;
+
+struct Scene {
+  LCC* lcc;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Mesh_2/CMakeLists.txt
new file mode 100644
index 0000000..fed9dbb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_2/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Created by the script cgal_create_cmake_script (and then adapted manually).
+# This is the CMake script for compiling a CGAL application.
+
+project( mesh_2_demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+ 
+find_package(CGAL COMPONENTS Core )
+include( ${CGAL_USE_FILE} )
+
+include_directories(BEFORE ../../include)
+include_directories(BEFORE ../../../Triangulation_2/include)
+
+
+if ( CGAL_FOUND )
+
+  # conform target
+  add_executable  (conform conform.cpp)
+  target_link_libraries(conform ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS conform )
+
+  # mesh target
+  add_executable  (mesh mesh.cpp)
+  target_link_libraries(mesh ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS mesh )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_2/README.txt b/3rdparty/CGAL-4.8/demo/Mesh_2/README.txt
new file mode 100644
index 0000000..efef749
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_2/README.txt
@@ -0,0 +1,5 @@
+This directory contains non-graphical demos of the 2D Mesh Generator
+package.
+The Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that
+demonstrates the  2D Mesh Generator package. See in the directory
+demo/Triangulation_2/ of the CGAL tarball.
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/conform.cpp b/3rdparty/CGAL-4.8/demo/Mesh_2/conform.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/conform.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/conform.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/butterfly.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/butterfly.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/butterfly.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/butterfly.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters.poly b/3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters.poly
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters.poly
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters2.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/clusters2.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/clusters2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/fish.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/fish.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/fish.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/fish.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/fish.poly b/3rdparty/CGAL-4.8/demo/Mesh_2/data/fish.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/fish.poly
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/fish.poly
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img1.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img1.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img1.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img1.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img2.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img2.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img3.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img3.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img3.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img3.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img4.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img4.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img4.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img4.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img5.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img5.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img5.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img5.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img6.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img6.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img6.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img6.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img7.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img7.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img7.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img7.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/img8.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/img8.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/img8.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/img8.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/lettre_A.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/lettre_A.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/lettre_A.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/lettre_A.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/lettre_A_2.edg b/3rdparty/CGAL-4.8/demo/Mesh_2/data/lettre_A_2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/lettre_A_2.edg
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/lettre_A_2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/data/trivial.poly b/3rdparty/CGAL-4.8/demo/Mesh_2/data/trivial.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/data/trivial.poly
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/data/trivial.poly
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_2/mesh.cpp b/3rdparty/CGAL-4.8/demo/Mesh_2/mesh.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_2/mesh.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_2/mesh.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/C3t3_type.h b/3rdparty/CGAL-4.8/demo/Mesh_3/C3t3_type.h
new file mode 100644
index 0000000..ae9f378
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/C3t3_type.h
@@ -0,0 +1,64 @@
+#ifndef CGAL_DEMO_MESH_3_C3T3_TYPE_H
+#define CGAL_DEMO_MESH_3_C3T3_TYPE_H
+
+// include this first to get #define BOOST_PARAMETER_MAX_ARITY 12
+// as otherwise it gets set via inclusion of Polyhedron_3.h
+#include <CGAL/Mesh_3/global_parameters.h>
+
+#include "Polyhedron_type.h"
+#include "Image_type.h"
+#include "implicit_functions/Implicit_function_interface.h"
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+
+#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
+#include <CGAL/Polyhedral_mesh_domain_3.h>
+#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/tags.h>
+
+template <typename K>
+struct Wrapper
+{
+  typedef int return_type;
+  typedef typename K::Point_3 Point_3;
+  
+  Wrapper(const Implicit_function_interface& f) : f_(f) {}
+  return_type operator()(const Point_3& p, const bool=true) const
+  {
+    return (f_(p.x(),p.y(),p.z()) < 0) ? 1 : 0;
+  }
+  
+private:
+  const Implicit_function_interface& f_;
+};
+
+
+typedef CGAL::Triangle_accessor_3<Polyhedron, Kernel> T_accessor;
+
+typedef CGAL::Polyhedral_mesh_domain_with_features_3<Kernel,
+                                                     Polyhedron,
+                                                     T_accessor,
+                                                     CGAL::Tag_false>
+                                                                        Polyhedral_mesh_domain;
+// The last `Tag_false` says the Patch_id type will be pair<int,int>, like
+// the `Image_mesh_domain`, and `Function_mesh_domain`.
+
+typedef CGAL::Labeled_image_mesh_domain_3<Image,Kernel>                 Image_mesh_domain;
+typedef Wrapper<Kernel>                                                 Function_wrapper;
+typedef CGAL::Labeled_mesh_domain_3<Function_wrapper, Kernel>           Function_mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain, 
+                                     CGAL::Kernel_traits<Polyhedral_mesh_domain>::Kernel,
+                                     CGAL::Parallel_tag>::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// 3D complex
+
+#endif // CGAL_DEMO_MESH_3_C3T3_TYPE_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Mesh_3/CMakeLists.txt
new file mode 100644
index 0000000..c292d33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/CMakeLists.txt
@@ -0,0 +1,393 @@
+# This is the CMake script for compiling the CGAL Mesh_3 demo.
+
+project( Mesh_3_demo )
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Compatibility with CMake 3.0
+if(POLICY CMP0042)
+  # Do not enable the use of MACOSX_RPATH
+  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
+  cmake_policy(SET CMP0042 OLD)
+endif()
+
+
+# Creates a new CMake option, turned ON by default
+option(ACTIVATE_MSVC_PRECOMPILED_HEADERS
+  "Activate precompiled headers in MSVC"
+  OFF)
+
+# Macro to add precompiled headers for MSVC
+# This function does two things:
+# 1. Enable precompiled headers on each file which is listed in "SourcesVar".
+# 2. Add the content of "PrecompiledSource" (e.g. "StdAfx.cpp") to "SourcesVar".
+MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
+  IF(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS)
+    GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
+    SET(Sources ${${SourcesVar}})
+
+    SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
+                                PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\"")
+    SET_SOURCE_FILES_PROPERTIES(${Sources}
+                                PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeader}\"")
+    # Add precompiled header to SourcesVar
+    LIST(APPEND ${SourcesVar} ${PrecompiledSource})
+  ENDIF(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS)
+ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)
+# The compiler might need more memory because of precompiled headers
+if(MSVC AND ACTIVATE_MSVC_PRECOMPILED_HEADERS AND NOT(MSVC_VERSION LESS 1310))
+  set(CGAL_C_FLAGS "${CGAL_C_FLAGS} /Zm1000")
+  set(CGAL_CXX_FLAGS "${CGAL_CXX_FLAGS} /Zm1000")
+endif()
+
+# Let plugins be compiled in the same directory as the executable.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+#option(MESH_3_DEMO_ENABLE_FORWARD_DECL "In the Mesh_3 demo, enable " OFF)
+#mark_as_advanced(MESH_3_DEMO_ENABLE_FORWARD_DECL)
+
+# Include this package's headers first
+include_directories( BEFORE ./ ./include ../../include )
+
+# Disable deprecated Mesh_3 names
+add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+                -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS)
+
+# Add specific Find.cmake modules
+set(CMAKE_MODULE_PATH 
+  ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
+
+# Activate concurrency ? (turned OFF by default)
+option(ACTIVATE_CONCURRENT_MESH_3
+  "Activate parallelism in Mesh_3"
+  OFF)
+  
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5 ImageIO)
+include( ${CGAL_USE_FILE} )
+# And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
+if( ACTIVATE_CONCURRENT_MESH_3 )
+  add_definitions( -DCGAL_CONCURRENT_MESH_3 )
+  find_package( TBB REQUIRED )
+else( ACTIVATE_CONCURRENT_MESH_3 )
+  option( LINK_WITH_TBB
+    "Link with TBB anyway so we can use TBB timers for profiling"
+    ON)
+  if( LINK_WITH_TBB )
+    find_package( TBB )
+  endif( LINK_WITH_TBB )
+endif()
+
+if( TBB_FOUND )
+  include(${TBB_USE_FILE})
+endif()
+
+# Find Qt5 itself
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find everybodies darling
+find_package(Boost COMPONENTS thread system)
+
+# Find QGLViewer
+
+if(Qt5_FOUND)
+
+ add_definitions(-DQT_NO_KEYWORDS)
+ add_definitions(-DSCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE)
+
+ find_package(QGLViewer )
+endif(Qt5_FOUND)
+
+
+if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
+
+  # Add directory containing implicit function plugin source files
+  add_subdirectory("implicit_functions")
+
+  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
+
+  qt5_wrap_ui( UI_FILES ui_files/MainWindow.ui )
+  qt5_wrap_ui( meshingUI_FILES  ui_files/Meshing_dialog.ui)
+  qt5_wrap_ui( optimUI_FILES  ui_files/Smoother_dialog.ui ui_files/LocalOptim_dialog.ui)
+  qt5_wrap_ui( ribUI_FILES  ui_files/Rib_dialog.ui)
+  qt5_wrap_ui( funcUI_FILES  ui_files/Function_dialog.ui)
+  qt5_wrap_ui( imgUI_FILES ui_files/Image_res_dialog.ui)
+
+  include(AddFileDependencies)
+
+  # Shared demo files directory
+  set(DEMO_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/CGAL_demo")
+  set(DEMO_H_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/CGAL_demo")
+
+  qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
+  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
+
+  qt5_generate_moc( "${DEMO_H_DIR}/Viewer.h" Viewer_moc.cpp )
+  add_file_dependencies( Viewer_moc.cpp "${DEMO_H_DIR}/Viewer.h" )
+
+  qt5_generate_moc( "${DEMO_H_DIR}/Scene.h" Scene_moc.cpp )
+  add_file_dependencies( Scene_moc.cpp "${DEMO_H_DIR}/Scene.h" )
+
+  qt5_generate_moc( "${DEMO_H_DIR}/Scene_item.h" Scene_item_moc.cpp )
+  add_file_dependencies( Scene_item_moc.cpp "${DEMO_H_DIR}/Scene_item.h" )
+
+  qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_thread.h )
+  qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h )
+
+  qt5_add_resources ( RESOURCE_FILES Mesh_3.qrc )
+
+  # put plugins (which are shared libraries) at the same location as
+  # executable files
+  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
+
+  # prefix for Mesh_3 libs to avoid conflicts with Polyhedron demo
+  set(MESH_3_LIB_PREFIX "mesh_3_demo_")
+
+  # AUXILIARY LIBRARIES
+  set(VIEWER_LIB "${MESH_3_LIB_PREFIX}viewer")
+  add_library(${VIEWER_LIB} SHARED
+    ${DEMO_SRC_DIR}/Viewer.cpp Viewer_moc.cpp)
+  qt5_use_modules(${VIEWER_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${VIEWER_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARIES})
+  set_target_properties(${VIEWER_LIB} PROPERTIES DEFINE_SYMBOL viewer_EXPORTS)
+
+  set(SCENE_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_item")
+  add_library(${SCENE_ITEM_LIB} SHARED
+    ${DEMO_SRC_DIR}/Scene_item.cpp
+    Scene_item_moc.cpp
+    ${DEMO_SRC_DIR}/Plugin_helper.cpp)
+  qt5_use_modules(${SCENE_ITEM_LIB} Xml Script OpenGL Svg)
+  set_target_properties(${SCENE_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_item_EXPORTS)
+  target_link_libraries(${SCENE_ITEM_LIB} ${QT_LIBRARIES} ${OPENGL_LIBRARIES})
+
+  set(SCENE_SEGMENTED_IMAGE_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_segmented_image_item")
+  add_library(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} SHARED
+    Scene_segmented_image_item.cpp)
+  qt5_use_modules(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
+  set_target_properties(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_segmented_image_item_EXPORTS)
+
+  set(SCENE_POLYHEDRON_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_polyhedron_item")
+  add_library(${SCENE_POLYHEDRON_ITEM_LIB} SHARED
+    Scene_polyhedron_item.cpp )
+  qt5_use_modules(${SCENE_POLYHEDRON_ITEM_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${SCENE_POLYHEDRON_ITEM_LIB} ${SCENE_ITEM_LIB}  ${QGLVIEWER_LIBRARIES} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
+  set_target_properties(${SCENE_POLYHEDRON_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_polyhedron_item_EXPORTS)
+
+  set(POLYGON_SOUP_LIB "${MESH_3_LIB_PREFIX}polygon_soup")
+  add_library(${POLYGON_SOUP_LIB} SHARED
+    Scene_polygon_soup.cpp )
+  qt5_use_modules(${POLYGON_SOUP_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${POLYGON_SOUP_LIB} ${SCENE_ITEM_LIB}  ${QGLVIEWER_LIBRARIES} ${CGAL_LIBRARIES} ${TBB_LIBRARIES})
+  set_target_properties(${POLYGON_SOUP_LIB} PROPERTIES DEFINE_SYMBOL polygon_soup_EXPORTS)
+
+  set(SCENE_C3T3_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_c3t3_item")
+  set (SCENE_C3T3_ITEM_LIB_SOURCE_FILES Scene_c3t3_item.cpp)
+  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" SCENE_C3T3_ITEM_LIB_SOURCE_FILES)
+
+  add_library(${SCENE_C3T3_ITEM_LIB} SHARED
+    ${SCENE_C3T3_ITEM_LIB_SOURCE_FILES})
+  qt5_use_modules(${SCENE_C3T3_ITEM_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${SCENE_C3T3_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES} ${TBB_LIBRARIES})
+  set_target_properties(${SCENE_C3T3_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_c3t3_item_EXPORTS)
+
+  set(SCENE_IMPLICIT_FUNCTION_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_implicit_function_item")
+  add_library(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} SHARED
+    Scene_implicit_function_item.cpp Color_ramp.cpp)
+  qt5_use_modules(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} Xml Script OpenGL Svg)
+  target_link_libraries(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${TBB_LIBRARIES})
+  set_target_properties(${SCENE_IMPLICIT_FUNCTION_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_implicit_function_item_EXPORTS)
+
+  
+  add_definitions(-DUSE_FORWARD_DECL)
+  add_definitions(-DQT_STATICPLUGIN)
+    set (MESH_3_SOURCE_FILES 
+      MainWindow.cpp
+      Mesh_3.cpp
+      ${DEMO_SRC_DIR}/Scene.cpp
+
+      Scene_moc.cpp)
+    #ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_SOURCE_FILES)
+    LIST(APPEND MESH_3_SOURCE_FILES ${UI_FILES} ${RESOURCE_FILES})
+    add_executable( Mesh_3 ${MESH_3_SOURCE_FILES} )
+    qt5_use_modules(Mesh_3 Xml Script OpenGL Svg)
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_3 )
+
+  # Link with Qt libraries
+  target_link_libraries( Mesh_3 ${QT_LIBRARIES} )
+
+  # Link with CGAL
+  target_link_libraries( Mesh_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${TBB_LIBRARIES})
+
+  # Link with libQGLViewer, OpenGL
+  target_link_libraries( Mesh_3 ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+#  # Link with the scene_item library.
+#  target_link_libraries( Mesh_3 scene_item )
+
+  target_link_libraries( Mesh_3 ${VIEWER_LIB} )
+
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_3 )
+
+
+  ###########
+  # PLUGINS #
+  ###########
+  remove_definitions(-DQT_STATICPLUGIN)
+
+  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
+  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
+    list_split(option ARGN_TAIL ${ARGN} )
+    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
+      set(other_sources ${ARGN})
+      set(option "")
+    else()
+      set(other_sources ${ARGN_TAIL})
+    endif()
+    qt5_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
+    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
+
+    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
+    qt5_use_modules(${plugin_name} Xml Script OpenGL Svg)
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
+    # Link with Qt
+    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
+    # Link with scene_item
+    target_link_libraries( ${plugin_name} ${SCENE_ITEM_LIB})
+    # Link with CGAL
+    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${TBB_LIBRARIES})
+  endmacro(polyhedron_demo_plugin)
+
+  set(IO_IMAGE_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_image_plugin")
+  polyhedron_demo_plugin(${IO_IMAGE_PLUGIN_LIB} Io_image_plugin ${imgUI_FILES})
+  target_link_libraries(${IO_IMAGE_PLUGIN_LIB} ${SCENE_SEGMENTED_IMAGE_ITEM_LIB})
+
+  set(IO_OFF_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_off_plugin")
+  polyhedron_demo_plugin(${IO_OFF_PLUGIN_LIB} Io_off_plugin)
+  target_link_libraries(${IO_OFF_PLUGIN_LIB} ${SCENE_POLYHEDRON_ITEM_LIB} ${POLYGON_SOUP_LIB})
+
+  if(Qt5_FOUND)
+    set(VOLUME_PLANES_PLUGIN_LIB "${MESH_3_LIB_PREFIX}volume_planes_plugin")
+    polyhedron_demo_plugin(${VOLUME_PLANES_PLUGIN_LIB} Volume_planes_plugin
+                           ${VOLUME_MOC_OUTFILES}
+                           Volume_plane_intersection.cpp)
+    target_link_libraries(${VOLUME_PLANES_PLUGIN_LIB} ${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${VIEWER_LIB})
+  endif()
+
+  set(IO_C3T3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_c3t3_plugin")
+  polyhedron_demo_plugin(${IO_C3T3_PLUGIN_LIB} Io_c3t3_plugin)
+  target_link_libraries(${IO_C3T3_PLUGIN_LIB} ${SCENE_C3T3_ITEM_LIB})
+
+  if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/C3t3_rib_exporter_plugin.cpp" )
+    set(C3T3_RIB_EXPORTER_PLUGIN_LIB "${MESH_3_LIB_PREFIX}c3t3_rib_exporter_plugin")
+    polyhedron_demo_plugin(${C3T3_RIB_EXPORTER_PLUGIN_LIB} C3t3_rib_exporter_plugin ${ribUI_FILES})
+    target_link_libraries(${C3T3_RIB_EXPORTER_PLUGIN_LIB} ${SCENE_C3T3_ITEM_LIB} ${VIEWER_LIB})
+  endif()
+
+  set(IO_IMPLICIT_FUNCTION_PLUGIN_LIB "${MESH_3_LIB_PREFIX}io_implicit_function_plugin")
+  polyhedron_demo_plugin(${IO_IMPLICIT_FUNCTION_PLUGIN_LIB} Io_implicit_function_plugin ${funcUI_FILES})
+  target_link_libraries(${IO_IMPLICIT_FUNCTION_PLUGIN_LIB} ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB})
+
+  set(MESH_3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_plugin") 
+  set(MESH_3_PLUGIN_SOURCE_FILES
+    Mesh_3_plugin.cpp
+    Mesh_3_plugin_polyhedron_cgal_code.cpp
+    Mesh_3_plugin_image_cgal_code.cpp
+    Mesh_3_plugin_implicit_function_cgal_code.cpp
+    Meshing_thread.cpp)
+  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_PLUGIN_SOURCE_FILES)
+  LIST(REMOVE_AT MESH_3_PLUGIN_SOURCE_FILES 0) # Remove Mesh_3_plugin.cpp since it's added by polyhedron_demo_plugin
+  LIST(APPEND MESH_3_PLUGIN_SOURCE_FILES  ${meshingUI_FILES})
+  polyhedron_demo_plugin(${MESH_3_PLUGIN_LIB} Mesh_3_plugin ${MESH_3_PLUGIN_SOURCE_FILES})
+
+#  set(MESH_3_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_plugin") 
+#  polyhedron_demo_plugin(${MESH_3_PLUGIN_LIB} Mesh_3_plugin 
+#                         Mesh_3_plugin_polyhedron_cgal_code.cpp
+#                         Mesh_3_plugin_image_cgal_code.cpp
+#                         Mesh_3_plugin_implicit_function_cgal_code.cpp
+#                         Meshing_thread.cpp
+#                         Scene_c3t3_item.moc
+#                         ${meshingUI_FILES})
+
+  target_link_libraries(${MESH_3_PLUGIN_LIB}
+                        ${SCENE_C3T3_ITEM_LIB}
+                        ${SCENE_POLYHEDRON_ITEM_LIB}
+                        ${SCENE_SEGMENTED_IMAGE_ITEM_LIB}
+                        ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB}
+                        ${QGLVIEWER_LIBRARIES}
+                        ${OPENGL_gl_LIBRARY}
+                        ${OPENGL_glu_LIBRARY}
+                        ${TBB_LIBRARIES})
+
+  set(MESH_3_OPTIMIZATION_PLUGIN_LIB "${MESH_3_LIB_PREFIX}mesh_3_optimization_plugin")
+  set(MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES
+    Mesh_3_optimization_plugin.cpp
+    Mesh_3_optimization_plugin_cgal_code.cpp
+    Optimizer_thread.cpp)
+  ADD_MSVC_PRECOMPILED_HEADER("StdAfx.h" "StdAfx.cpp" MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES)
+  LIST(REMOVE_AT MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES 0) # Remove Mesh_3_optimization_plugin.cpp since it's added by polyhedron_demo_plugin
+  LIST(APPEND MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES ${optimUI_FILES})
+  polyhedron_demo_plugin(${MESH_3_OPTIMIZATION_PLUGIN_LIB} Mesh_3_optimization_plugin ${MESH_3_OPTIMIZATION_PLUGIN_SOURCE_FILES})
+
+  target_link_libraries(${MESH_3_OPTIMIZATION_PLUGIN_LIB}
+                        ${SCENE_C3T3_ITEM_LIB}
+                        ${SCENE_POLYHEDRON_ITEM_LIB}
+                        ${SCENE_SEGMENTED_IMAGE_ITEM_LIB}
+                        ${SCENE_IMPLICIT_FUNCTION_ITEM_LIB}
+                        ${QGLVIEWER_LIBRARIES}
+                        ${OPENGL_gl_LIBRARY}
+                        ${OPENGL_glu_LIBRARY}
+                        ${TBB_LIBRARIES})
+
+
+else (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
+
+  set(MESH_3_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "the CGAL Qt5 library, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "Qt5, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(MESH_3_MISSING_DEPS "OpenGL, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT Boost_FOUND)
+    set(MESH_3_MISSING_DEPS "Boost, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
+
+endif (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND)
+
+
+
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Color_ramp.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Color_ramp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Color_ramp.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Color_ramp.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Color_ramp.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Color_ramp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Color_ramp.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Color_ramp.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Image_type.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Image_type.h
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/Image_type.h
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/Image_type.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Image_type_fwd.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Image_type_fwd.h
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/Image_type_fwd.h
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/Image_type_fwd.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Io_c3t3_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_c3t3_plugin.cpp
new file mode 100644
index 0000000..a2ee2be
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_c3t3_plugin.cpp
@@ -0,0 +1,67 @@
+#include "config.h"
+
+#include "Scene_c3t3_item.h"
+
+#include <CGAL_demo/Io_plugin_interface.h>
+#include <fstream>
+
+
+class Io_c3t3_plugin :
+  public QObject,
+  public Io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  virtual QStringList nameFilters() const;
+  
+  virtual bool canLoad() const { return false; }
+  virtual Scene_item* load(QFileInfo) { return NULL; }
+
+  virtual bool canSave(const Scene_item*);
+  virtual bool save(const Scene_item*, QFileInfo, QString);
+};
+
+QStringList
+Io_c3t3_plugin::nameFilters() const
+{ 
+  return QStringList() << "Mesh (*.mesh)" 
+    << "Maya - surface only (*.ma)" << "Maya - cells (*.ma)";
+}
+
+
+bool
+Io_c3t3_plugin::canSave(const Scene_item* item)
+{
+  const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
+  return c3t3_item != NULL;
+}
+
+bool
+Io_c3t3_plugin::save(const Scene_item* item, QFileInfo fileInfo, QString selectedFilter)
+{
+  const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
+  if ( NULL == c3t3_item )
+  {
+    return false;
+  }
+  
+  QString path = fileInfo.absoluteFilePath();
+  if (fileInfo.suffix() == "mesh")
+  {
+    std::ofstream medit_file (qPrintable(path));
+    c3t3_item->c3t3().output_to_medit(medit_file,true,true);
+  }
+  else if (fileInfo.suffix() == "ma")
+  {
+    std::ofstream maya_file (qPrintable(path));
+    c3t3_item->c3t3().output_to_maya(
+      maya_file, selectedFilter == "Maya - surface only (*.ma)");
+  }
+  
+  return true;
+}
+
+#include "Io_c3t3_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Io_image_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_image_plugin.cpp
new file mode 100644
index 0000000..dfeece7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_image_plugin.cpp
@@ -0,0 +1,90 @@
+#include "config.h"
+#include "Scene_segmented_image_item.h"
+#include "Image_type.h"
+#include "ui_Image_res_dialog.h"
+
+#include <CGAL_demo/Io_plugin_interface.h>
+#include <fstream>
+
+class Io_image_plugin :
+  public QObject,
+  public Io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  Io_image_plugin() {
+#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
+  //  glewInit();
+#endif
+  }
+
+  QStringList nameFilters() const;
+  bool canLoad() const;
+  Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const Scene_item*);
+  bool save(const Scene_item*, QFileInfo, QString) { return false; }
+};
+
+
+QStringList Io_image_plugin::nameFilters() const {
+  return QStringList() << "Inrimage files (*.inr *.inr.gz)"
+                       << "Analyze files (*.hdr *.img *img.gz)"
+                       << "All files (*.*)";
+}
+
+bool Io_image_plugin::canLoad() const {
+  return true;
+}
+
+Scene_item* 
+Io_image_plugin::load(QFileInfo fileinfo) {
+  Image* image = new Image;
+  if(!image->read(fileinfo.filePath().toUtf8()))
+  {
+    delete image;
+    return NULL;
+  }
+  
+  // Get display precision
+  QDialog dialog;
+  Ui::ImagePrecisionDialog ui;
+  ui.setupUi(&dialog);
+  
+  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  
+  // Add precision values to the dialog
+  for ( int i=1 ; i<9 ; ++i )
+  {
+    QString s = tr("1:%1").arg(i*i*i);
+    ui.precisionList->addItem(s);
+  }
+  
+  // Open window
+  int return_code = dialog.exec();
+  if(return_code != QDialog::Accepted)
+  {
+    delete image;
+    return NULL;
+  }
+  
+  // Get selected precision
+  int voxel_scale = ui.precisionList->currentIndex() + 1;
+
+  Scene_segmented_image_item* image_item = 
+    new Scene_segmented_image_item(image,voxel_scale);
+  image_item->setName(fileinfo.baseName());
+
+  return image_item;
+}
+
+bool Io_image_plugin::canSave(const Scene_item*)
+{
+  return false;
+}
+
+#include "Io_image_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Io_implicit_function_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_implicit_function_plugin.cpp
new file mode 100644
index 0000000..8ad0cba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_implicit_function_plugin.cpp
@@ -0,0 +1,202 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+#include "config.h"
+
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Plugin_helper.h>
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Scene_implicit_function_item.h"
+#include "ui_Function_dialog.h"
+
+#include <iostream>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QPluginLoader>
+#include <QDir>
+#include <QApplication>
+#include <QMenu>
+#include <QList>
+#include <QLibrary>
+
+
+class Io_implicit_function_plugin :
+  public QObject,
+  protected Plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(Plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Io_implicit_function_plugin();
+  virtual ~Io_implicit_function_plugin() {}
+  
+  using Plugin_helper::init;
+  virtual void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
+  
+  QList<QAction*> actions() const
+  {
+    return QList<QAction*>();
+  }
+  
+public Q_SLOTS:
+  void load_function() const;
+  
+private:
+  void load_function_plugins();
+  
+private:
+  QList<Implicit_function_interface*> functions_;
+};
+
+
+
+Io_implicit_function_plugin::
+Io_implicit_function_plugin()
+{
+  load_function_plugins();
+}
+
+
+void
+Io_implicit_function_plugin::
+init(QMainWindow* mainWindow, Scene_interface* scene_interface)
+{
+  this->scene = scene_interface;
+  this->mw = mainWindow;
+  
+  QAction* actionLoadFunction = new QAction("Load Implicit Function", mw);
+  if( NULL != actionLoadFunction )
+  {
+    connect(actionLoadFunction, SIGNAL(triggered()), this, SLOT(load_function()));
+  }
+  
+  QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
+  if ( NULL != menuFile )
+  {
+    QList<QAction*> menuFileActions = menuFile->actions();
+    
+    // Look for action just after "Load..." action
+    QAction* actionAfterLoad = NULL;
+    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(), 
+         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+    {
+      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
+      {
+        ++it_action;
+        if ( it_action != end && NULL != *it_action )
+        {
+          actionAfterLoad = *it_action;
+        }
+      }
+    }
+    
+    // Insert "Load implicit function" action
+    if ( NULL != actionAfterLoad )
+    {
+      menuFile->insertAction(actionAfterLoad,actionLoadFunction);      
+    }
+    
+  }
+}
+
+
+void
+Io_implicit_function_plugin::
+load_function() const
+{
+  QDialog dialog(mw);
+  Ui::FunctionDialog ui;
+  ui.setupUi(&dialog);
+  
+  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  
+  // Add loaded functions to the dialog
+  int i=0;
+  Q_FOREACH( Implicit_function_interface* f, functions_ )
+  {
+    ui.functionList->insertItem(i++,f->name());
+  }
+
+  // Open window
+  int return_code = dialog.exec();
+  if(return_code == QDialog::Rejected) { return; }
+  
+  // Get selected function
+  i = ui.functionList->currentIndex();
+  Implicit_function_interface* function = functions_[i];
+  
+  // Create Scene_implicit_function object and add it to the framework
+  Scene_implicit_function_item* item =
+    new Scene_implicit_function_item(function);
+  
+  item->setName(tr("%1").arg(function->name()));
+  item->setRenderingMode(FlatPlusEdges);
+
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+  scene->itemChanged(index);
+    
+  Scene_interface::Item_id new_item_id = scene->addItem(item);
+  scene->setSelectedItem(new_item_id);
+}
+
+void
+Io_implicit_function_plugin::
+load_function_plugins()
+{
+  QDir pluginsDir(qApp->applicationDirPath());
+  QString dirname = pluginsDir.dirName();
+  if ( !pluginsDir.cd("implicit_functions") ) { 
+    // In that case, dirname may be "Debug" or "Release" and one has to
+    // search in ../implicit_functions/Debug or
+    // ../implicit_functions/Release
+    QString newDir = QString("../implicit_functions/") + dirname;
+    if( !pluginsDir.cd(newDir) ) return; 
+  }
+  
+  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
+  {
+    if ( fileName.contains("plugin") && QLibrary::isLibrary(fileName) )
+    {
+      qDebug("    + Loading Function \"%s\"...", fileName.toUtf8().data());
+      QPluginLoader loader;
+      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
+      QObject *function_plugin = loader.instance();
+      if ( NULL != function_plugin )
+      {
+        Implicit_function_interface* function =
+          qobject_cast<Implicit_function_interface*>(function_plugin);
+        
+        if ( NULL != function )
+        {
+          functions_ << function;
+        }
+      }
+    }
+  }
+}
+
+#include "Io_implicit_function_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Io_off_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_off_plugin.cpp
new file mode 100644
index 0000000..b80b663
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Io_off_plugin.cpp
@@ -0,0 +1,93 @@
+#include "config.h"
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL_demo/Io_plugin_interface.h>
+#include <fstream>
+
+
+class Io_off_plugin :
+  public QObject,
+  public Io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QStringList nameFilters() const;
+  bool canLoad() const;
+  Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const Scene_item*);
+  bool save(const Scene_item*, QFileInfo, QString);
+};
+
+QStringList Io_off_plugin::nameFilters() const {
+  return QStringList() << "OFF files (*.off)";
+}
+
+bool Io_off_plugin::canLoad() const {
+  return true;
+}
+
+
+Scene_item* 
+Io_off_plugin::load(QFileInfo fileinfo) {
+
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+    
+  // Try to read .off in a polyhedron
+  Scene_polyhedron_item* item = new Scene_polyhedron_item();
+  item->setName(fileinfo.baseName());
+  if(!item->load(in))
+  {
+    delete item;
+
+    // Try to read .off in a polygon soup
+    Scene_polygon_soup* soup_item = new Scene_polygon_soup;
+    soup_item->setName(fileinfo.baseName());
+    in.close();
+    std::ifstream in2(fileinfo.filePath().toUtf8());
+    if(!soup_item->load(in2)) {
+      delete soup_item;
+      return 0;
+    }
+    return soup_item;
+  }
+
+  return item;
+}
+
+bool Io_off_plugin::canSave(const Scene_item* item)
+{
+  // This plugin supports polyhedrons and polygon soups
+  return qobject_cast<const Scene_polyhedron_item*>(item) ||
+    qobject_cast<const Scene_polygon_soup*>(item);
+}
+
+bool Io_off_plugin::save(const Scene_item* item, QFileInfo fileinfo,
+                         QString /* `selecterFilter` is not used: only OFF */)
+{
+  // This plugin supports polyhedrons and polygon soups
+  const Scene_polyhedron_item* poly_item = 
+    qobject_cast<const Scene_polyhedron_item*>(item);
+  const Scene_polygon_soup* soup_item = 
+    qobject_cast<const Scene_polygon_soup*>(item);
+
+  if(!poly_item && !soup_item)
+    return false;
+
+  std::ofstream out(fileinfo.filePath().toUtf8());
+
+  return (poly_item && poly_item->save(out)) || 
+    (soup_item && soup_item->save(out));
+}
+#include "Io_off_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.cpp
new file mode 100644
index 0000000..adcd1c1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.cpp
@@ -0,0 +1,604 @@
+#include "config.h"
+#include "MainWindow.h"
+#include <CGAL_demo/Scene.h>
+#include <CGAL_demo/Scene_item.h>
+#include <CGAL/Qt/debug.h>
+
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QtDebug>
+#include <QUrl>
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QSettings>
+#include <QHeaderView>
+#include <QMenu>
+#include <QAction>
+#include <QLibrary>
+#include <QPluginLoader>
+#include <QMessageBox>
+#include <QScrollBar>
+#include <QClipboard>
+#include <QMimeData>
+
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Io_plugin_interface.h>
+
+#include "ui_MainWindow.h"
+
+MainWindow::~MainWindow()
+{
+  delete ui;
+}
+
+MainWindow::MainWindow(QWidget* parent)
+  : CGAL::Qt::DemosMainWindow(parent)
+{
+  ui = new Ui::MainWindow;
+  ui->setupUi(this);
+
+  // Save some pointers from ui, for latter use.
+  treeView = ui->treeView;
+  viewer = ui->viewer;
+
+  // Setup the submenu of the View menu that can toggle the dockwidgets
+  Q_FOREACH(QDockWidget* widget, findChildren<QDockWidget*>()) {
+    ui->menuDockWindows->addAction(widget->toggleViewAction());
+  }
+  ui->menuDockWindows->removeAction(ui->dummyAction);
+
+  // do not save the state of the viewer (anoying)
+  viewer->setStateFileName(QString::null);
+
+  // accept drop events
+  setAcceptDrops(true);
+
+  // setup scene
+  scene = new Scene(this);
+  viewer->setScene(scene);
+  treeView->setModel(scene);
+
+  // setup the treeview: delegation and columns sizing...
+  treeView->setItemDelegate(new SceneDelegate(this));
+
+  treeView->header()->setStretchLastSection(false);
+
+  treeView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
+  treeView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
+  treeView->header()->setSectionResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
+  treeView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
+  treeView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed);
+  treeView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
+
+  treeView->resizeColumnToContents(Scene::ColorColumn);
+  treeView->resizeColumnToContents(Scene::RenderingModeColumn);
+  treeView->resizeColumnToContents(Scene::ABColumn);
+  treeView->resizeColumnToContents(Scene::VisibleColumn);
+
+  // setup connections
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          this, SLOT(updateInfo()));
+  
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          this, SLOT(updateDisplayInfo()));
+
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          viewer, SLOT(updateGL()));
+
+  connect(scene, SIGNAL(updated()),
+          viewer, SLOT(update()));
+  
+  connect(scene, SIGNAL(selectionChanged()),
+          this, SLOT(selectSceneItem()));
+
+  connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)),
+          this, SLOT(removeManipulatedFrame(Scene_item*)));
+
+  connect(scene, SIGNAL(updated_bbox()),
+          this, SLOT(updateViewerBBox()));
+
+  connect(treeView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(updateInfo()));
+  
+  connect(treeView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(updateDisplayInfo()));
+
+  connect(treeView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(selectionChanged()));
+
+  connect(viewer, SIGNAL(selected(int)),
+          this, SLOT(selectSceneItem(int)));
+
+  connect(ui->actionAntiAliasing, SIGNAL(toggled(bool)),
+          viewer, SLOT(setAntiAliasing(bool)));
+
+  connect(ui->actionDraw_two_sides, SIGNAL(toggled(bool)),
+          viewer, SLOT(setTwoSides(bool)));
+
+  // enable anti-aliasing by default
+  ui->actionAntiAliasing->setChecked(true);
+
+  // add the "About CGAL..." and "About demo..." entries
+  this->addAboutCGAL();
+  this->addAboutDemo(":/cgal/Mesh_3/about.html");
+
+  // Connect the button "addButton" with actionLoad
+  ui->addButton->setDefaultAction(ui->actionLoad);
+  // Same with "removeButton" and "duplicateButton"
+  ui->removeButton->setDefaultAction(ui->actionErase);
+  ui->duplicateButton->setDefaultAction(ui->actionDuplicate);
+
+  // Connect actionQuit (Ctrl+Q) and qApp->quit()
+  connect(ui->actionQuit, SIGNAL(triggered()),
+          this, SLOT(quit()));
+
+  // Recent files menu
+  this->addRecentFiles(ui->menuFile, ui->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+
+  // Reset the "Operation menu"
+  clearMenu(ui->menuOperations);
+
+  // Load plugins, and re-enable actions that need it.
+  loadPlugins();
+
+  readSettings(); // Among other things, the column widths are stored.
+
+  const char *windowTitle = "CGAL 3D mesh generator demo ["
+#ifdef CGAL_CONCURRENT_MESH_3
+    "Parallel"
+#else
+    "Sequential"
+# ifdef CGAL_LINKED_WITH_TBB
+    " - With TBB"
+# else
+    " - Without TBB"
+# endif
+#endif
+#ifdef _DEBUG
+    " - Debug]";
+#else
+    "]";
+#endif
+  
+  setWindowTitle(QApplication::translate(
+    "MainWindow", windowTitle, 0));//UnicodeUTF8));
+
+  this->dumpObjectTree();
+}
+
+void MainWindow::loadPlugins()
+{
+  Q_FOREACH(QObject *obj, QPluginLoader::staticInstances())
+  {
+    initPlugin(obj);
+    initIOPlugin(obj);
+  }
+
+  QDir pluginsDir(qApp->applicationDirPath());
+  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files)) {
+    if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) {
+      QDebug qdebug = qDebug();
+      qdebug << "### Loading \"" << fileName.toUtf8().data() << "\"... ";
+      QPluginLoader loader;
+      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
+      QObject *obj = loader.instance();
+      if(obj) {
+        bool init1 = initPlugin(obj);
+        bool init2 = initIOPlugin(obj);
+        if (!init1 && !init2)
+          qdebug << "not for this program";
+        else
+          qdebug << "success";
+      }
+      else {
+        qdebug << "error: " << qPrintable(loader.errorString());
+      }
+    }
+  }
+}
+
+bool MainWindow::initPlugin(QObject* obj)
+{
+  QObjectList childs = this->children();
+  Plugin_interface* plugin =
+    qobject_cast<Plugin_interface*>(obj);
+  if(plugin) {
+    // Call plugin's init() method
+    plugin->init(this, this->scene, this);
+
+    Q_FOREACH(QAction* action, plugin->actions()) {
+      // If action does not belong to the menus, add it to "Operations" menu
+      if(!childs.contains(action)) {
+        ui->menuOperations->addAction(action);
+      }
+      // Show and enable menu item
+      addAction(action);
+    }
+    return true;
+  }
+  else 
+    return false;
+}
+
+bool MainWindow::initIOPlugin(QObject* obj)
+{
+  Io_plugin_interface* plugin =
+    qobject_cast<Io_plugin_interface*>(obj);
+  if(plugin) {
+//     std::cerr << "I/O plugin\n";
+    io_plugins << plugin;
+    return true;
+  }
+  else 
+    return false;
+}
+
+void MainWindow::clearMenu(QMenu* menu)
+{
+  Q_FOREACH(QAction* action, menu->actions())
+  {
+    QMenu* menu = action->menu();
+    if(menu) {
+      clearMenu(menu);
+    }
+    action->setVisible(false);
+  }
+  menu->menuAction()->setEnabled(false);
+}
+
+void MainWindow::addAction(QAction* action)
+{
+  if(!action) return;
+
+  action->setVisible(true);
+  action->setEnabled(true);
+  Q_FOREACH(QWidget* widget, action->associatedWidgets())
+  {
+//     qDebug() << QString("%1 (%2)\n")
+//       .arg(widget->objectName())
+//       .arg(widget->metaObject()->className());
+    QMenu* menu = qobject_cast<QMenu*>(widget);
+    if(menu)
+    {
+      addAction(menu->menuAction());
+    }
+  }
+}
+
+void MainWindow::message(QString message, QString colorName, QString /*font*/) {
+  if (message.endsWith('\n')) {
+    message.remove(message.length()-1, 1);
+  }
+  statusBar()->showMessage(message, 5000);
+  message = "<font color=\"" + colorName + "\" >" + message + "</font><br>";
+  message = "[" + QTime::currentTime().toString() + "] " + message;
+  
+  // Moves cursor to the end of the block
+  ui->consoleTextEdit->moveCursor(QTextCursor::EndOfBlock);
+  ui->consoleTextEdit->insertHtml(message);
+  ui->consoleTextEdit->verticalScrollBar()->setValue(ui->consoleTextEdit->verticalScrollBar()->maximum());
+}
+
+void MainWindow::information(QString text) {
+  this->message("INFO: " + text, "");
+}
+
+void MainWindow::warning(QString text) {
+  this->message("WARNING: " + text, "blue");
+}
+
+void MainWindow::error(QString text) {
+  this->message("ERROR: " + text, "red");
+}
+
+void MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+  if (event->mimeData()->hasFormat("text/uri-list"))
+    event->acceptProposedAction();
+}
+
+void MainWindow::dropEvent(QDropEvent *event)
+{
+  Q_FOREACH(QUrl url, event->mimeData()->urls()) {
+    QString filename = url.toLocalFile();
+    if(!filename.isEmpty()) {
+      qDebug() << QString("dropEvent(\"%1\")\n").arg(filename);
+      open(filename);
+    }
+  }
+  event->acceptProposedAction();
+}
+
+void MainWindow::updateViewerBBox()
+{
+  const Scene::Bbox bbox = scene->bbox();
+  const double xmin = bbox.xmin;
+  const double ymin = bbox.ymin;
+  const double zmin = bbox.zmin;
+  const double xmax = bbox.xmax;
+  const double ymax = bbox.ymax;
+  const double zmax = bbox.zmax;
+  // qDebug() << QString("Bounding box: (%1, %2, %3) - (%4, %5, %6)\n")
+  // .arg(xmin).arg(ymin).arg(zmin).arg(xmax).arg(ymax).arg(zmax);
+  qglviewer::Vec 
+    vec_min(xmin, ymin, zmin),
+    vec_max(xmax, ymax, zmax);
+  viewer->setSceneBoundingBox(vec_min,
+                              vec_max);
+  viewer->camera()->showEntireScene();
+}
+
+void MainWindow::open(QString filename)
+{
+  QFileInfo fileinfo(filename);
+  Scene_item* item = 0;
+  if(fileinfo.isFile() && fileinfo.isReadable()) {
+    Q_FOREACH(Io_plugin_interface* plugin, 
+              io_plugins)
+    {
+        if(plugin->canLoad()) {
+            viewer->makeCurrent();
+        item = plugin->load(fileinfo);
+        if(item) break; // go out of the loop
+      }
+    }
+    if(item) {
+      Scene::Item_id index = scene->addItem(item);
+      QSettings settings;
+      settings.setValue("OFF open directory",
+                        fileinfo.absoluteDir().absolutePath());
+      this->addToRecentFiles(filename);
+      selectSceneItem(index);
+    }
+    else {
+      QMessageBox::critical(this,
+                            tr("Cannot open file"),
+                            tr("File %1 has not a known file format.")
+                            .arg(filename));
+    }
+  }
+  else {
+    QMessageBox::critical(this,
+                          tr("Cannot open file"),
+                          tr("File %1 is not a readable file.")
+                          .arg(filename));
+  }
+}
+
+void MainWindow::selectSceneItem(int i)
+{
+  if(i < 0) return;
+  if((unsigned int)i >= scene->numberOfEntries()) return;
+
+  treeView->selectionModel()->select(scene->createSelection(i),
+                                     QItemSelectionModel::ClearAndSelect);
+}
+
+void
+MainWindow::selectSceneItem()
+{
+  selectSceneItem(scene->mainSelectionIndex());
+}
+
+int MainWindow::getSelectedSceneItemIndex() const
+{
+  QModelIndexList selectedRows = treeView->selectionModel()->selectedRows();
+  if(selectedRows.empty())
+    return -1;
+  else
+    return selectedRows.first().row();
+}
+
+void MainWindow::selectionChanged()
+{
+  scene->setSelectedItem(getSelectedSceneItemIndex());
+  Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item != NULL && item->manipulatable()) {
+    viewer->setManipulatedFrame(item->manipulatedFrame());
+//    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
+//            this, SLOT(updateInfo()));
+//    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
+//            this, SLOT(updateDisplayInfo()));
+  }
+  
+  viewer->updateGL();
+}
+
+void MainWindow::removeManipulatedFrame(Scene_item* item)
+{
+  if(item->manipulatable() &&
+     item->manipulatedFrame() == viewer->manipulatedFrame()) {
+    viewer->setManipulatedFrame(0);
+  }
+}
+
+void MainWindow::updateInfo() {
+  Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item)
+    ui->infoLabel->setText(item->toolTip());
+  else 
+    ui->infoLabel->clear();
+}
+
+void MainWindow::updateDisplayInfo() {
+  Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item)
+    ui->displayLabel->setPixmap(item->graphicalToolTip());
+  else 
+    ui->displayLabel->clear();
+}
+
+void MainWindow::readSettings()
+{
+  this->readState("MainWindow", Size|State);
+}
+
+void MainWindow::writeSettings()
+{
+  this->writeState("MainWindow");
+  std::cerr << "Write setting... done.\n";
+}
+
+void MainWindow::quit()
+{
+  close();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+  writeSettings();
+  event->accept();
+}
+
+void MainWindow::on_actionLoad_triggered()
+{
+  QStringList filters;
+  Q_FOREACH(Io_plugin_interface* plugin, io_plugins) {
+    if(plugin->canLoad()) {
+      filters += plugin->nameFilters();
+    }
+  }
+  filters << tr("All files (*)");
+
+  QSettings settings;
+  QString directory = settings.value("OFF open directory",
+                                     QDir::current().dirName()).toString();
+  QStringList filenames = 
+    QFileDialog::getOpenFileNames(this,
+                                  tr("Open File..."),
+                                  directory,
+                                  filters.join(";;"));
+  if(!filenames.isEmpty()) {
+    Q_FOREACH(QString filename, filenames) {
+      open(filename);
+    }
+  }
+}
+
+void MainWindow::on_actionSaveAs_triggered()
+{
+  QModelIndexList selectedRows = treeView->selectionModel()->selectedRows();
+  if(selectedRows.size() != 1)
+    return;
+  Scene_item* item = scene->item(getSelectedSceneItemIndex());
+
+  if(!item)
+    return;
+
+  QVector<Io_plugin_interface*> canSavePlugins;
+  QStringList filters;
+  Q_FOREACH(Io_plugin_interface* plugin, io_plugins) {
+    if(plugin->canSave(item)) {
+      canSavePlugins << plugin;
+      filters += plugin->nameFilters();
+    }
+  }
+  filters << tr("All files (*)");
+
+  if(canSavePlugins.isEmpty()) {
+    QMessageBox::warning(this,
+                         tr("Cannot save"),
+                         tr("The selected object %1 cannot be saved.")
+                         .arg(item->name()));
+    return;
+  }
+  
+  QString selectedFilter;
+  QString filename = 
+    QFileDialog::getSaveFileName(this,
+                                 tr("Save to File..."),
+                                 QString(),
+                                 filters.join(";;"),
+                                 &selectedFilter);
+  
+  QFileInfo fileinfo(filename);
+  if(!fileinfo.isFile() ||
+     QMessageBox::warning(this,
+                          tr("File exists"),
+                          tr("The file %1 already exists! Continue?")
+                          .arg(filename),
+                          QMessageBox::Yes|QMessageBox::No) == 
+     QMessageBox::Yes)
+  {
+
+    Q_FOREACH(Io_plugin_interface* plugin, canSavePlugins) {
+      if(plugin->save(item, fileinfo, selectedFilter))
+        break;
+    }
+  }
+}
+
+bool MainWindow::on_actionErase_triggered()
+{
+  int index = scene->erase(getSelectedSceneItemIndex());
+  selectSceneItem(index);
+  return index >= 0;
+}
+
+void MainWindow::on_actionEraseAll_triggered()
+{
+  while(on_actionErase_triggered()) {
+  }
+}
+
+void MainWindow::on_actionDuplicate_triggered()
+{
+  int index = scene->duplicate(getSelectedSceneItemIndex());
+  selectSceneItem(index);
+}
+
+void MainWindow::on_actionShowHide_triggered()
+{
+  Q_FOREACH(QModelIndex index, treeView->selectionModel()->selectedRows())
+  {
+    int i = index.row();
+    Scene_item* item = scene->item(i);
+    item->setVisible(!item->visible());
+    scene->itemChanged(i);
+  }
+}
+
+void MainWindow::on_actionSetPolyhedronA_triggered()
+{
+  int i = getSelectedSceneItemIndex();
+  scene->setItemA(i);
+}
+
+void MainWindow::on_actionSetPolyhedronB_triggered()
+{
+  int i = getSelectedSceneItemIndex();
+  scene->setItemB(i);
+}
+
+void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
+{
+  viewer->setAddKeyFrameKeyboardModifiers(m);
+}
+
+void MainWindow::on_actionCopy_snapshot_triggered()
+{
+  // copy snapshot to clipboard
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+  QClipboard *qb = QApplication::clipboard();
+  viewer->makeCurrent();
+  viewer->raise();
+  QImage snapshot = viewer->grabFrameBuffer(true);
+  qb->setImage(snapshot);
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionSave_snapshot_triggered()
+{
+	// save snapshot to file
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+        viewer->saveSnapshot(false, false);
+	QApplication::restoreOverrideCursor();
+}
+
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.h b/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.h
new file mode 100644
index 0000000..a5fc53d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/MainWindow.h
@@ -0,0 +1,106 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+#include "config.h"
+
+#include <QtOpenGL/qgl.h>
+#include <CGAL/Qt/DemosMainWindow.h>
+
+#include <QVector>
+
+class QDragEnterEvent;
+class QDropEvent;
+class Scene;
+class Viewer;
+class QTreeView;
+class QMenu;
+class Io_plugin_interface;
+
+class Scene_item;
+
+namespace Ui {
+  class MainWindow;
+}
+
+#include <CGAL_demo/Messages_interface.h>
+
+class MainWindow : 
+  public CGAL::Qt::DemosMainWindow,
+  public Messages_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Messages_interface)
+public:
+  MainWindow(QWidget* parent = 0);
+  ~MainWindow();
+
+public Q_SLOTS:
+  void updateViewerBBox();
+  void open(QString filename);
+
+  void selectSceneItem(int i);
+  void selectSceneItem();
+
+  void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
+
+  void clearMenu(QMenu*);
+  void addAction(QAction*);
+
+  void information(QString);
+  void warning(QString);
+  void error(QString);
+
+protected Q_SLOTS:
+  void selectionChanged();
+  void updateInfo();
+  void updateDisplayInfo();
+  void removeManipulatedFrame(Scene_item*);
+
+  // settings
+  void quit();
+  void readSettings();
+  void writeSettings();
+
+	// snapshot
+	void on_actionCopy_snapshot_triggered();
+	void on_actionSave_snapshot_triggered();
+
+  // load, erase, duplicate
+  void on_actionEraseAll_triggered();
+  void on_actionLoad_triggered();
+  bool on_actionErase_triggered();
+  void on_actionDuplicate_triggered();
+
+  // Show/Hide
+  void on_actionShowHide_triggered();
+
+  // Select A/B
+  void on_actionSetPolyhedronA_triggered();
+  void on_actionSetPolyhedronB_triggered();
+
+  // save as...
+  void on_actionSaveAs_triggered(); 
+
+protected:
+  void message(QString, QString, QString = QString("normal"));
+  void loadPlugins();
+  bool initPlugin(QObject*);
+  bool initIOPlugin(QObject*);
+
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+  void closeEvent(QCloseEvent *event);
+
+  bool onePolygonIsSelected() const;
+  int getSelectedSceneItemIndex() const;
+
+private:
+  QString strippedName(const QString &fullFileName);
+
+  Scene* scene;
+  Viewer* viewer;
+  QTreeView* treeView;
+  Ui::MainWindow* ui;
+  QVector<Io_plugin_interface*> io_plugins;
+};
+
+#endif // ifndef MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.cpp
new file mode 100644
index 0000000..06bfbe4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.cpp
@@ -0,0 +1,47 @@
+#include "config.h"
+
+#include "MainWindow.h"
+#include <QApplication>
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Mesh_3 demo");
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  app.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGALQt ( Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  QStringList args = app.arguments();
+  args.removeAt(0);
+
+  if(!args.empty() && args[0] == "--use-meta")
+  {
+    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
+    args.removeAt(0);
+  }
+
+  Q_FOREACH(QString filename, args) {
+    mainWindow.open(filename);
+  }
+  return app.exec();
+}
+
+#ifndef USE_FORWARD_DECL
+#  include "Scene.cpp"
+#  include "Scene_item.cpp"
+#  include "Scene_moc.cpp"
+#  include "Viewer.cpp"
+#  include "Viewer_moc.cpp"
+#  include "MainWindow.cpp"
+#  include "MainWindow_moc.cpp"
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.qrc b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3.qrc
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_optimization_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_optimization_plugin.cpp
new file mode 100644
index 0000000..6ab101a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_optimization_plugin.cpp
@@ -0,0 +1,620 @@
+#include <boost/config.hpp>
+#if defined(BOOST_MSVC)
+#  pragma warning( disable : 4503)
+#endif
+
+#include "config.h"
+#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
+#include <CGAL_demo/Plugin_helper.h>
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Messages_interface.h>
+#include "ui_Smoother_dialog.h"
+#include "ui_LocalOptim_dialog.h"
+
+#include "Scene_c3t3_item.h"
+#include "C3t3_type.h"
+
+#include "Optimizer_thread.h"
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QTimer>
+
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h> // to get default values
+
+// declare the CGAL function
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+Optimizer_thread* cgal_code_odt_mesh_3(Scene_c3t3_item& c3t3_item,
+                                       const double time_limit,
+                                       const double convergence_ratio,
+                                       const double freeze_ratio,
+                                       const int max_iteration_number,
+                                       const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+Optimizer_thread* cgal_code_lloyd_mesh_3(Scene_c3t3_item& c3t3_item,
+                                         const double time_limit,
+                                         const double convergence_ratio,
+                                         const double freeze_ratio,
+                                         const int max_iteration_number,
+                                         const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+Optimizer_thread* cgal_code_perturb_mesh_3(Scene_c3t3_item& c3t3_item,
+                                           const double time_limit,
+                                           const double sliver_bound,
+                                           const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+Optimizer_thread* cgal_code_exude_mesh_3(Scene_c3t3_item& c3t3_item,
+                                         const double time_limit,
+                                         const double sliver_bound,
+                                         const bool create_new_item);
+#endif
+
+QString translate(CGAL::Mesh_optimization_return_code rc);
+
+
+// Mesh_3_optimization_plugin class
+class Mesh_3_optimization_plugin : 
+  public QObject,
+  protected Plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(Plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  typedef Plugin_helper Base;
+public:
+  Mesh_3_optimization_plugin();
+  
+  using Base::init;
+  virtual void init(QMainWindow*, Scene_interface*, Messages_interface*);
+  inline virtual QList<QAction*> actions() const;
+  
+public Q_SLOTS:
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+  void odt();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+  void lloyd();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+  void perturb();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+  void exude();
+#endif
+  
+  void optimization_done(Optimizer_thread* t);
+  void status_report(QString s);
+  
+private:
+  Scene_c3t3_item* get_c3t3_item() const;
+  
+  void treat_result(Scene_c3t3_item& source_item, Scene_c3t3_item& result_item,
+                    const QString& name) const;
+  
+  void launch_thread(Optimizer_thread* thread, const QString& msg);
+
+private:
+  QAction* actionOdt;
+  QAction* actionLloyd;
+  QAction* actionPerturb;
+  QAction* actionExude;
+  Messages_interface* msg;
+  QMessageBox* message_box_;
+  
+  Scene_c3t3_item* source_item_;
+}; // end class Mesh_3_optimization_plugin
+
+Mesh_3_optimization_plugin::
+Mesh_3_optimization_plugin()
+  : actionOdt(NULL)
+  , actionLloyd(NULL)
+  , actionPerturb(NULL)
+  , actionExude(NULL)
+  , msg(NULL)
+  , message_box_(NULL)
+  , source_item_(NULL)
+{
+}
+
+void 
+Mesh_3_optimization_plugin::
+init(QMainWindow* mainWindow,
+     Scene_interface* scene_interface,
+     Messages_interface* msg_interface)
+{
+  this->scene = scene_interface;
+  this->mw = mainWindow;
+  
+  // Create menu items
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+  actionOdt = this->getActionFromMainWindow(mw, "actionOdt");
+  if( NULL != actionOdt )
+  {
+    connect(actionOdt, SIGNAL(triggered()), this, SLOT(odt()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+  actionLloyd = this->getActionFromMainWindow(mw, "actionLloyd");
+  if( NULL != actionLloyd )
+  {
+    connect(actionLloyd, SIGNAL(triggered()), this, SLOT(lloyd()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+  actionPerturb = this->getActionFromMainWindow(mw, "actionPerturb");
+  if( NULL != actionPerturb )
+  {
+    connect(actionPerturb, SIGNAL(triggered()), this, SLOT(perturb()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+  actionExude = this->getActionFromMainWindow(mw, "actionExude");
+  if( NULL != actionExude )
+  {
+    connect(actionExude, SIGNAL(triggered()), this, SLOT(exude()));
+  }
+#endif
+  
+  msg = msg_interface;
+}
+
+
+inline
+QList<QAction*> 
+Mesh_3_optimization_plugin::actions() const
+{
+  return QList<QAction*>() << actionOdt << actionLloyd 
+                           << actionPerturb << actionExude;
+}
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+void
+Mesh_3_optimization_plugin::odt()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Smoother_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Odt-smoothing parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+
+  namespace cgpd = CGAL::parameters::default_values;
+  ui.convergenceRatio->setValue(cgpd::odt_convergence_ratio);
+  ui.freezeRatio->setValue(cgpd::odt_freeze_ratio);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+    
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
+  const double convergence = ui.convergenceRatio->value();
+  const double freeze = ui.freezeRatio->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_odt_mesh_3(*item,
+                                                      max_time,
+                                                      convergence,
+                                                      freeze,
+                                                      max_iteration_nb,
+                                                      create_new_item);
+  
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Odt iterations are running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+void
+Mesh_3_optimization_plugin::lloyd()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Smoother_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Lloyd-smoothing parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  
+  namespace cgpd = CGAL::parameters::default_values;
+  ui.convergenceRatio->setValue(cgpd::lloyd_convergence_ratio);
+  ui.freezeRatio->setValue(cgpd::lloyd_freeze_ratio);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
+  const double convergence = ui.convergenceRatio->value();
+  const double freeze = ui.freezeRatio->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_lloyd_mesh_3(*item,
+                                                        max_time,
+                                                        convergence,
+                                                        freeze,
+                                                        max_iteration_nb,
+                                                        create_new_item);
+  
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+
+  source_item_ = item;
+  launch_thread(opt_thread, "Lloyd iterations are running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+void
+Mesh_3_optimization_plugin::perturb()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::LocalOptim_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Sliver perturbation parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  connect(ui.noBound,     SIGNAL(toggled(bool)),
+          ui.sliverBound, SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_perturb_mesh_3(*item,
+                                                          max_time,
+                                                          sliver_bound,
+                                                          create_new_item);
+  
+
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Sliver perturbation is running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+void
+Mesh_3_optimization_plugin::exude()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::LocalOptim_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Sliver exudation parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  connect(ui.noBound,     SIGNAL(toggled(bool)),
+          ui.sliverBound, SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  ui.sliverBound->setValue(25.);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_exude_mesh_3(*item,
+                                                        max_time,
+                                                        sliver_bound,
+                                                        create_new_item);
+
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Sliver exudation is running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+Scene_c3t3_item*
+Mesh_3_optimization_plugin::
+get_c3t3_item() const
+{
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+  Scene_c3t3_item* item = qobject_cast<Scene_c3t3_item*>(scene->item(index));
+  
+  if ( NULL == item )
+  {
+    QMessageBox::warning(mw,tr(""),
+                          tr("Selected object is not a mesh... optimization can't be performed"));
+    return NULL;
+  }
+  
+  if ( NULL == item->data_item() )
+  {
+    QMessageBox::critical(mw,tr(""),
+                          tr("Can't perturb: data object has been destroyed !"));
+    return NULL;
+  }
+  
+  return item;
+}
+
+
+
+void
+Mesh_3_optimization_plugin::
+treat_result(Scene_c3t3_item& source_item,
+             Scene_c3t3_item& result_item,
+             const QString& name) const
+{
+  result_item.setName(tr("%1 [%2]").arg(source_item.name())
+                                   .arg(name));
+  
+  result_item.c3t3_changed();
+  
+  // If a new item has been created
+  if ( &source_item != &result_item)
+  {
+    const Scene_item::Bbox& bbox = result_item.bbox();
+    result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
+                            (bbox.ymin + bbox.ymax)/2.f,
+                            (bbox.zmin + bbox.zmax)/2.f);
+    
+    result_item.setColor(QColor(59,74,226));
+    result_item.setRenderingMode(source_item.renderingMode());
+    result_item.set_data_item(source_item.data_item());
+    
+    source_item.setVisible(false);
+    
+    const Scene_interface::Item_id index = scene->mainSelectionIndex();
+    scene->itemChanged(index);
+    
+    Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
+    scene->setSelectedItem(new_item_id);
+  }
+  else
+  {
+    result_item.update_histogram();
+    
+    const Scene_interface::Item_id index = scene->mainSelectionIndex();
+    scene->itemChanged(index);
+  }
+}
+
+
+void
+Mesh_3_optimization_plugin::
+optimization_done(Optimizer_thread* thread)
+{
+  CGAL::Mesh_optimization_return_code return_code = thread->return_code();
+  QString name = thread->optimizer_name();
+  
+  // Print message in console
+  QString str = QString("%1 of \"%2\" done in %3s<br>"
+                        "End reason: '%4'<br>")
+                  .arg(name)
+                  .arg(source_item_->name())
+                  .arg(thread->time())
+                  .arg(translate(return_code));
+  
+  Q_FOREACH( QString param, thread->parameters_log() )
+  {
+    str.append(QString("( %1 )<br>").arg(param));
+  }
+  
+  msg->information(qPrintable(str));
+  
+  // Treat new c3t3 item
+  Scene_c3t3_item* result_item = thread->item();
+  treat_result( *source_item_, *result_item, name);
+
+  // close message box
+  message_box_->close();
+  
+  // free memory
+  delete thread;
+}
+
+
+void
+Mesh_3_optimization_plugin::
+launch_thread(Optimizer_thread* opt_thread, const QString& window_text)
+{
+  // -----------------------------------
+  // Create message box with stop button
+  // -----------------------------------
+  message_box_ = new QMessageBox(QMessageBox::NoIcon,
+                                 "Optimization...",
+                                 window_text,
+                                 QMessageBox::Cancel,
+                                 mw);
+  
+  message_box_->setDefaultButton(QMessageBox::Cancel);
+  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
+  cancelButton->setText(tr("Stop"));
+  
+  QObject::connect(cancelButton, SIGNAL(clicked()),
+                   opt_thread,   SLOT(stop()));
+  
+  message_box_->show();
+  
+  // -----------------------------------
+  // Connect main thread to optimization thread and launch optimizer
+  // -----------------------------------
+  QObject::connect(opt_thread, SIGNAL(done(Optimizer_thread*)),
+                   this,       SLOT(optimization_done(Optimizer_thread*)));
+  
+  QObject::connect(opt_thread, SIGNAL(status_report(QString)),
+                   this,       SLOT(status_report(QString)));
+  
+  opt_thread->start();
+}
+
+
+void
+Mesh_3_optimization_plugin::
+status_report(QString str)
+{
+  if ( NULL == message_box_ ) { return; }
+  
+  message_box_->setInformativeText(str);
+}
+
+
+QString
+translate(CGAL::Mesh_optimization_return_code rc)
+{
+  switch (rc)
+  {
+    case CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR: return QString("Unexpected error");
+    case CGAL::BOUND_REACHED: return QString("Bound reached");
+    case CGAL::TIME_LIMIT_REACHED: return QString("Time limit reached");
+    case CGAL::CANT_IMPROVE_ANYMORE: return QString("Can't improve anymore");
+    case CGAL::CONVERGENCE_REACHED: return QString("Convergence reached");
+    case CGAL::MAX_ITERATION_NUMBER_REACHED: return QString("Max iteration number reached");
+    case CGAL::ALL_VERTICES_FROZEN: return QString("All vertices have been frozen");
+  }
+  
+  return QString("ERROR");
+}
+
+#include "Mesh_3_optimization_plugin.moc"
+
+#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin.cpp
new file mode 100644
index 0000000..696ce23
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin.cpp
@@ -0,0 +1,431 @@
+#include <boost/config.hpp>
+#if defined(BOOST_MSVC)
+#  pragma warning( disable : 4503)
+#endif
+
+#include "config.h"
+
+#include <CGAL_demo/Plugin_helper.h>
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Messages_interface.h>
+#include "ui_Meshing_dialog.h"
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QMessageBox>
+#include <QInputDialog>
+#include <QFileDialog>
+#include <QTimer>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_segmented_image_item.h"
+#include "Scene_implicit_function_item.h"
+
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Image_type.h"
+
+#include "Scene_c3t3_item.h"
+#include "Meshing_thread.h"
+
+#include "Polyhedron_type.h"
+
+#include <iostream>
+#include <fstream>
+#include <math.h>
+
+
+// Constants
+const QColor default_mesh_color(45,169,70);
+
+// declare the CGAL function
+Meshing_thread* cgal_code_mesh_3(const Polyhedron*,
+                                 const double angle,
+                                 const double sizing,
+                                 const double approx,
+                                 const double tets_sizing,
+                                 const double tet_shape,
+                                 const bool protect_features);
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+Meshing_thread* cgal_code_mesh_3(const Image*,
+                                 const double angle,
+                                 const double sizing,
+                                 const double approx,
+                                 const double tets_sizing,
+                                 const double tet_shape);
+#endif
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface*,
+                                 const double angle,
+                                 const double sizing,
+                                 const double approx,
+                                 const double tets_sizing,
+                                 const double tet_shape);
+#endif
+
+double get_approximate(double d, int precision, int& decimals);
+
+
+class Mesh_3_plugin : 
+  public QObject,
+  protected Plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(Plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  typedef Plugin_helper Base;
+public:
+  Mesh_3_plugin();
+  
+  using Base::init;
+  virtual void init(QMainWindow* mainWindow, 
+                    Scene_interface* scene_interface,
+                    Messages_interface* msg_interface)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionMesh_3 = this->getActionFromMainWindow(mw, "actionMeshing");
+    if(actionMesh_3)
+    {
+      connect(actionMesh_3, SIGNAL(triggered()), this, SLOT(mesh_3()));
+    }
+    
+    this->msg = msg_interface;
+  }
+
+  virtual QList<QAction*> actions() const
+  {
+    return QList<QAction*>() << actionMesh_3;
+  }
+  
+public Q_SLOTS:
+  void mesh_3();
+  void meshing_done(Meshing_thread* t);
+  void status_report(QString str);
+  
+private:
+  void launch_thread(Meshing_thread* mesh_thread);
+  void treat_result(Scene_item& source_item, Scene_c3t3_item& result_item) const;
+
+private:
+  QAction* actionMesh_3;
+  Messages_interface* msg;
+  QMessageBox* message_box_;
+  Scene_item* source_item_;
+  
+}; // end class Mesh_3_plugin
+
+
+Mesh_3_plugin::
+Mesh_3_plugin()
+  : actionMesh_3(NULL)
+  , msg(NULL)
+  , message_box_(NULL)
+  , source_item_(NULL)
+{
+}
+
+
+void Mesh_3_plugin::mesh_3()
+{
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  // -----------------------------------
+  // Check if selected item is meshable
+  // -----------------------------------
+  Scene_polyhedron_item* poly_item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+  Scene_segmented_image_item* image_item = 
+    qobject_cast<Scene_segmented_image_item*>(scene->item(index));
+  Scene_implicit_function_item* function_item = 
+    qobject_cast<Scene_implicit_function_item*>(scene->item(index));
+
+  // Get item
+  Scene_item* item = NULL;
+  if( NULL != poly_item ) { item = poly_item; }
+  else if( NULL != image_item ) { item = image_item; }
+  else if( NULL != function_item ) { item = function_item; }
+
+  if ( NULL == item )
+  {
+    QMessageBox::warning(mw,tr(""),
+                          tr("Selected object can't be meshed")); 
+    return;
+  }
+  
+  // -----------------------------------
+  // Create Mesh dialog
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Meshing_dialog ui;
+  ui.setupUi(&dialog);
+  ui.sharpFeaturesGroup->setVisible(poly_item != 0);
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+
+  // Connect checkboxes to spinboxes
+  connect(ui.noApprox, SIGNAL(toggled(bool)),
+          ui.approx,   SLOT(setEnabled(bool)));
+
+  connect(ui.noFacetSizing, SIGNAL(toggled(bool)),
+          ui.facetSizing,   SLOT(setEnabled(bool)));
+
+  connect(ui.noAngle,    SIGNAL(toggled(bool)),
+          ui.facetAngle, SLOT(setEnabled(bool)));
+
+  connect(ui.noTetSizing, SIGNAL(toggled(bool)),
+          ui.tetSizing,   SLOT(setEnabled(bool)));
+
+  connect(ui.noTetShape, SIGNAL(toggled(bool)),
+          ui.tetShape,   SLOT(setEnabled(bool)));
+
+  // Set default parameters
+  Scene_interface::Bbox bbox = item->bbox();
+  ui.objectName->setText(item->name());
+  ui.objectNameSize->setText(tr("Object bbox size (w,h,d):  <b>%1</b>,  <b>%2</b>,  <b>%3</b>")
+                             .arg(bbox.width(),0,'g',3)
+                             .arg(bbox.height(),0,'g',3)
+                             .arg(bbox.depth(),0,'g',3) );
+  
+  double diag = bbox.diagonal_length();
+  int decimals = 0;
+  double sizing_default = get_approximate(diag * 0.05, 2, decimals);
+  ui.facetSizing->setDecimals(-decimals+2);
+  ui.facetSizing->setSingleStep(std::pow(10.,decimals));
+  ui.facetSizing->setRange(diag * 10e-6, // min
+                           diag); // max
+  ui.facetSizing->setValue(sizing_default); // default value
+  
+  ui.tetSizing->setDecimals(-decimals+2);
+  ui.tetSizing->setSingleStep(std::pow(10.,decimals));
+  ui.tetSizing->setRange(diag * 10e-6, // min
+                         diag); // max
+  ui.tetSizing->setValue(sizing_default); // default value
+  
+  double approx_default = get_approximate(diag * 0.005, 2, decimals);
+  ui.approx->setDecimals(-decimals+2);
+  ui.approx->setSingleStep(std::pow(10.,decimals));
+  ui.approx->setRange(diag * 10e-7, // min
+                      diag); // max
+  ui.approx->setValue(approx_default);
+
+  // -----------------------------------
+  // Get values
+  // -----------------------------------
+  int i = dialog.exec();
+  if( i == QDialog::Rejected ) { return; }
+  
+  // 0 means parameter is not considered
+  const double angle = !ui.noAngle->isChecked() ? 0 : ui.facetAngle->value();
+  const double approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
+  const double facet_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
+  const double radius_edge = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
+  const double tet_sizing = !ui.noTetSizing->isChecked() ? 0  : ui.tetSizing->value();
+  const bool protect_features = ui.protect->isChecked();
+
+  // -----------------------------------
+  // Dispatch mesh process
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Meshing_thread* thread = NULL;
+  
+  // Polyhedron
+  if ( NULL != poly_item )
+  {
+    Polyhedron* pMesh = poly_item->polyhedron();
+    if( NULL == pMesh )
+    {
+      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
+      return;
+    }
+
+    thread = cgal_code_mesh_3(pMesh,
+                              angle, facet_sizing, approx,
+                              tet_sizing, radius_edge,
+                              protect_features);
+  }
+  // Image  
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+  else if( NULL != image_item )
+  {
+    const Image* pImage = image_item->image();
+    if( NULL == pImage )
+    {
+      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
+      return;
+    }
+    
+    thread = cgal_code_mesh_3(pImage,
+                              angle, facet_sizing, approx,
+                              tet_sizing, radius_edge);
+  }
+#endif 
+  
+  // Function
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+  else if( NULL != function_item )
+  {
+    const Implicit_function_interface* pFunction = function_item->function();
+    if( NULL == pFunction )
+    {
+      QMessageBox::critical(mw,tr(""),tr("ERROR: no data in selected item")); 
+      return;
+    }
+    
+    thread = cgal_code_mesh_3(pFunction,
+                              angle, facet_sizing, approx,
+                              tet_sizing, radius_edge);
+    
+  }
+#endif
+
+  if ( NULL == thread )
+  {
+    QMessageBox::critical(mw,tr(""),tr("ERROR: no thread created")); 
+    return;
+  }
+  
+  // Launch thread
+  source_item_ = item;
+  launch_thread(thread);
+  QApplication::restoreOverrideCursor();
+}
+
+
+void
+Mesh_3_plugin::
+launch_thread(Meshing_thread* mesh_thread)
+{
+  // -----------------------------------
+  // Create message box with stop button
+  // -----------------------------------
+  message_box_ = new QMessageBox(QMessageBox::NoIcon,
+                                 "Meshing",
+                                 "Mesh generation in progress...",
+                                 QMessageBox::Cancel,
+                                 mw);
+  
+  message_box_->setDefaultButton(QMessageBox::Cancel);
+  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
+  cancelButton->setText(tr("Stop"));
+  
+  QObject::connect(cancelButton, SIGNAL(clicked()),
+                   mesh_thread,  SLOT(stop()));
+  
+  message_box_->show();
+  
+  // -----------------------------------
+  // Connect main thread to meshing thread
+  // -----------------------------------
+  QObject::connect(mesh_thread, SIGNAL(done(Meshing_thread*)),
+                   this,        SLOT(meshing_done(Meshing_thread*)));
+  
+  QObject::connect(mesh_thread, SIGNAL(status_report(QString)),
+                   this,        SLOT(status_report(QString)));
+  
+  // -----------------------------------
+  // Launch mesher
+  // -----------------------------------
+  mesh_thread->start();
+}
+
+
+void
+Mesh_3_plugin::
+status_report(QString str)
+{
+  if ( NULL == message_box_ ) { return; }
+  
+  message_box_->setInformativeText(str);
+}
+
+
+void
+Mesh_3_plugin::
+meshing_done(Meshing_thread* thread)
+{
+  // Print message in console
+  QString str = QString("Meshing of \"%1\" done in %2s<br>")
+    .arg(source_item_->name())
+    .arg(thread->time());
+  
+  Q_FOREACH( QString param, thread->parameters_log() )
+  {
+    str.append(QString("( %1 )<br>").arg(param));
+  }
+  
+  Scene_c3t3_item* result_item = thread->item();
+  const Scene_item::Bbox& bbox = result_item->bbox();
+  str.append(QString("BBox (x,y,z): [ %1, %2 ], [ %3, %4 ], [ %5, %6 ], <br>")
+    .arg(bbox.xmin)
+    .arg(bbox.xmax)
+    .arg(bbox.ymin)
+    .arg(bbox.ymax)
+    .arg(bbox.zmin)
+    .arg(bbox.zmax));
+  
+  msg->information(qPrintable(str));
+  
+  // Treat new c3t3 item
+  treat_result(*source_item_, *result_item);
+  
+  // close message box
+  message_box_->close();
+  message_box_ = NULL;
+  
+  // free memory
+  // TODO: maybe there is another way to do that
+  delete thread;
+}
+
+
+void
+Mesh_3_plugin::
+treat_result(Scene_item& source_item,
+             Scene_c3t3_item& result_item) const
+{
+  result_item.setName(tr("%1 [3D Mesh]").arg(source_item.name()));
+
+  result_item.c3t3_changed();
+  
+  const Scene_item::Bbox& bbox = result_item.bbox();
+  result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
+                          (bbox.ymin + bbox.ymax)/2.f,
+                          (bbox.zmin + bbox.zmax)/2.f);
+    
+  result_item.setColor(default_mesh_color);
+  result_item.setRenderingMode(source_item.renderingMode());
+  result_item.set_data_item(&source_item);
+  
+  source_item.setVisible(false);
+    
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+  scene->itemChanged(index);
+    
+  Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
+  scene->setSelectedItem(new_item_id);
+}
+
+
+double
+get_approximate(double d, int precision, int& decimals)
+{
+  if ( d<0 ) { return 0; }
+  
+  double i = std::pow(10.,precision-1);
+  
+  decimals = 0;
+  while ( d > i*10 ) { d = d/10.; ++decimals; }
+  while ( d < i ) { d = d*10.; --decimals; }
+  
+  return std::floor(d)*std::pow(10.,decimals);
+}
+
+#include "Mesh_3_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_image_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_image_cgal_code.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_image_cgal_code.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_image_cgal_code.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_implicit_function_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_implicit_function_cgal_code.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_implicit_function_cgal_code.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_implicit_function_cgal_code.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_polyhedron_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_polyhedron_cgal_code.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Mesh_3_plugin_polyhedron_cgal_code.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_3_plugin_polyhedron_cgal_code.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_function.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_function.h
new file mode 100644
index 0000000..2c6186f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Mesh_function.h
@@ -0,0 +1,265 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_DEMO_MESH_3_MESH_FUNCTION_H
+#define CGAL_DEMO_MESH_3_MESH_FUNCTION_H
+
+#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1
+
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+
+#include <QStringList>
+#include <QString>
+
+#include <CGAL/Mesh_3/Mesher_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
+
+#include "C3t3_type.h"
+#include "Meshing_thread.h"
+#include <CGAL/make_mesh_3.h> // for C3t3_initializer
+#include <CGAL/use.h>
+
+struct Mesh_parameters
+{
+  double facet_angle;
+  double facet_sizing;
+  double facet_approx;
+  
+  double tet_shape;
+  double tet_sizing;
+  bool protect_features;
+  
+  inline QStringList log() const;
+};
+
+
+template < typename Domain_ >
+class Mesh_function
+  : public Mesh_function_interface
+{
+  typedef Domain_ Domain;
+  
+public:
+  Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p);
+  
+  ~Mesh_function();
+  
+  // Launch
+  virtual void launch();
+  
+  // Stop
+  virtual void stop();
+  
+  // Logs
+  virtual QStringList parameters_log() const;
+  virtual QString status(double time_period) const;
+
+private:
+  typedef typename Domain::Point_3                  Point_3;
+  typedef typename Domain::Index                    Index;
+  typedef std::vector<std::pair<Point_3, Index> >   Initial_points_vector;
+  typedef typename Initial_points_vector::iterator  Ipv_iterator;
+  typedef C3t3::Vertex_handle                       Vertex_handle;
+  
+  typedef C3t3::Triangulation                       Tr;
+  typedef CGAL::Mesh_criteria_3<Tr>                 Mesh_criteria;
+  typedef Mesh_criteria::Edge_criteria              Edge_criteria;
+  typedef Mesh_criteria::Facet_criteria             Facet_criteria;
+  typedef Mesh_criteria::Cell_criteria              Cell_criteria;
+  
+  typedef CGAL::Mesh_3::Mesher_3<C3t3, Mesh_criteria, Domain>   Mesher;
+  
+private:
+  C3t3& c3t3_;
+  Domain* domain_;
+  Mesh_parameters p_;
+  bool continue_;
+  Mesher* mesher_;
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mutable typename Mesher::Mesher_status last_report_;
+#endif
+};
+
+
+
+// -----------------------------------
+// Class Mesh_parameters
+// -----------------------------------
+inline
+QStringList
+Mesh_parameters::
+log() const
+{
+  return QStringList()
+  << QString("facet min angle: %1").arg(facet_angle)
+  << QString("facet max size: %1").arg(facet_sizing)
+  << QString("facet approx error: %1").arg(facet_approx)
+  << QString("tet shape (radius-edge): %1").arg(tet_shape)
+  << QString("tet max size: %1").arg(tet_sizing)
+  << QString("protect features: %1").arg(protect_features);
+}
+
+
+// -----------------------------------
+// Class Mesh_function
+// -----------------------------------
+template < typename D_ >
+Mesh_function<D_>::
+Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p)
+: c3t3_(c3t3)
+, domain_(domain)
+, p_(p)
+, continue_(true)
+, mesher_(NULL)
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+, last_report_(0,0,0)
+#endif
+{
+#ifdef CGAL_CONCURRENT_MESH_3
+  Concurrent_mesher_config::load_config_file(CONFIG_FILENAME, false);
+#endif
+}
+
+
+template < typename D_ >
+Mesh_function<D_>::
+~Mesh_function()
+{
+  delete domain_;
+  delete mesher_;
+}
+
+
+template < typename D_ >
+void
+Mesh_function<D_>::
+launch()
+{
+#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
+  CGAL::default_random = CGAL::Random(0);
+#endif
+
+  // Create mesh criteria
+  Mesh_criteria criteria(Edge_criteria(p_.facet_sizing),
+                         Facet_criteria(p_.facet_angle,
+                                        p_.facet_sizing,
+                                        p_.facet_approx),
+                         Cell_criteria(p_.tet_shape,
+                                       p_.tet_sizing));
+
+  // Initialization of the mesh, either with the protection of sharp
+  // features, or with the initial points (or both).
+  CGAL::internal::Mesh_3::C3t3_initializer<
+    C3t3,
+    Domain,
+    Mesh_criteria,
+    CGAL::internal::Mesh_3::has_Has_features<Domain>::value >()
+    (c3t3_,
+     *domain_,
+     criteria,
+     p_.protect_features);
+
+  // Build mesher and launch refinement process
+  mesher_ = new Mesher(c3t3_, *domain_, criteria);
+
+#ifdef CGAL_MESH_3_PROFILING
+  CGAL::Real_timer t;
+  t.start();
+#endif
+
+#if CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mesher_->initialize();
+  while ( ! mesher_->is_algorithm_done() && continue_ )
+  {
+    mesher_->one_step();
+  }
+#else // not CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mesher_->refine_mesh();
+#endif
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Full refinement time (without fix_c3t3): " << t.time() << " seconds." << std::endl;
+#endif
+
+  // Ensure c3t3 is ok (usefull if process has been stop by the user)
+  mesher_->fix_c3t3();
+}
+
+
+template < typename D_ >
+void
+Mesh_function<D_>::
+stop()
+{
+  continue_ = false;
+}
+
+
+template < typename D_ >
+QStringList
+Mesh_function<D_>::
+parameters_log() const
+{
+  return p_.log();
+}
+
+
+template < typename D_ >
+QString
+Mesh_function<D_>::
+status(double time_period) const
+{
+  QString result;
+
+  CGAL_USE(time_period); // to avoid a warning when the macro
+                         // CGAL_MESH_3_MESHER_STATUS_ACTIVATED is not
+                         // defined
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  // If mesher_ is not yet created, it means that either launch() has not
+  // been called or that initial points have not been founded
+  if ( NULL == mesher_ )
+  {
+    return QString("Initialization in progress...");
+  }
+  
+  // Get status and return a string corresponding to it
+  typename Mesher::Mesher_status s = mesher_->status();
+  
+  result = QString("Vertices: %1 \n"
+                           "Vertices inserted last %2s: %3 \n\n"
+                           "Bad facets: %4 \n"
+                           "Bad cells: %5")
+    .arg(s.vertices)
+    .arg(time_period)
+    .arg(s.vertices - last_report_.vertices)
+    .arg(s.facet_queue)
+    .arg(s.cells_queue);
+  
+  last_report_ = s;
+#endif
+  return result;
+}
+
+#endif // CGAL_DEMO_MESH_3_MESH_FUNCTION_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.cpp
new file mode 100644
index 0000000..69a3443
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.cpp
@@ -0,0 +1,88 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include "config.h"
+
+#include <QTime>
+#include <QApplication>
+
+#include "Meshing_thread.h"
+#include "Scene_c3t3_item.h"
+
+
+Meshing_thread::
+Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item)
+  : f_(f)
+  , item_(item)
+  , time_(0)
+  , timer_(new QTimer(this))
+  , timer_period_(1)
+{
+  connect(timer_, SIGNAL(timeout()),
+          this,   SLOT(emit_status()));
+  
+  timer_->start(static_cast<int>(timer_period_*1000));  
+}
+
+
+Meshing_thread::
+~Meshing_thread()
+{
+  delete f_;
+  delete timer_;
+  QApplication::restoreOverrideCursor();
+}
+
+
+void
+Meshing_thread::
+run()
+{
+  QTime timer;
+  timer.start();
+  
+  f_->launch();
+  time_ = double(timer.elapsed()) / 1000;
+  
+  Q_EMIT done(this);
+}
+
+
+void
+Meshing_thread::
+stop()
+{
+  f_->stop();
+  
+  // Block application until thread is deleted
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+}
+
+
+void
+Meshing_thread::
+emit_status()
+{
+  Q_EMIT (status_report(f_->status(timer_period_)));
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.h
new file mode 100644
index 0000000..b2ae89d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Meshing_thread.h
@@ -0,0 +1,96 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_DEMO_MESH_3_MESHING_THREAD_H
+#define CGAL_DEMO_MESH_3_MESHING_THREAD_H
+
+#include <QThread>
+#include <QObject>
+#include <QStringList>
+#include <QString>
+#include <QTimer>
+
+class Scene_c3t3_item;
+
+class Mesh_function_interface
+{
+public:
+  virtual ~Mesh_function_interface() {}
+  
+  // Launch
+  virtual void launch() = 0;
+  
+  // Stop
+  virtual void stop() = 0;
+  
+  // Logs
+  virtual QStringList parameters_log() const = 0;
+  virtual QString status(double time_period) const = 0;
+};
+
+
+class Meshing_thread : public QThread
+{
+  Q_OBJECT
+public:
+  // Constructor / Destructor
+  Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item);
+  virtual ~Meshing_thread();
+  
+  // Scene item
+  Scene_c3t3_item* item() const { return item_; }
+  
+  // Infos about meshing
+  double time() const { return time_; }
+  
+  // Logs
+  QStringList parameters_log() const { return f_->parameters_log(); }
+  
+public Q_SLOTS:
+  // Stop
+  void stop();
+  
+private Q_SLOTS:
+  // emit signal status report
+  void emit_status();
+  
+Q_SIGNALS:
+  // Emitted at the end of the process
+  void done(Meshing_thread*);
+  // Informs about status of meshing
+  void status_report(QString);
+  
+protected:
+  // Overload of QThread function
+  virtual void run();
+  
+private:
+  Mesh_function_interface* f_;
+  Scene_c3t3_item* item_;
+  double time_; // in seconds
+  QTimer* timer_;
+  double timer_period_;
+};
+
+#endif // CGAL_DEMO_MESH_3_MESHING_THREAD_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.cpp
new file mode 100644
index 0000000..78727d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.cpp
@@ -0,0 +1,81 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include "config.h"
+
+#include <QTime>
+#include <QTimer>
+#include "Optimizer_thread.h"
+#include "Scene_c3t3_item.h"
+
+
+Optimizer_thread::
+Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item)
+  : f_(f)
+  , item_(item)
+  , rc_()
+  , time_(0)
+  , timer_(new QTimer(this))
+  , timer_period_(1)
+{
+  connect(timer_, SIGNAL(timeout()),
+          this,   SLOT(emit_status()));
+  
+  timer_->start(static_cast<int>(timer_period_*1000));  
+}
+
+
+Optimizer_thread::~Optimizer_thread()
+{
+  delete f_;
+}
+
+
+void
+Optimizer_thread::
+run()
+{
+  QTime timer;
+  timer.start();
+  
+  rc_ = f_->launch();
+  time_ = double(timer.elapsed()) / 1000;
+  
+  Q_EMIT done(this);
+}
+
+
+void
+Optimizer_thread::
+stop()
+{
+  f_->stop();
+}
+
+void
+Optimizer_thread::
+emit_status()
+{
+  Q_EMIT (status_report(f_->status(timer_period_)));
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.h
new file mode 100644
index 0000000..21a3f95
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Optimizer_thread.h
@@ -0,0 +1,101 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef DEMO_MESH_3_OPTIMIZER_THREAD_H
+#define DEMO_MESH_3_OPTIMIZER_THREAD_H
+
+#include <QThread>
+#include <QObject>
+#include <QString>
+#include <QStringList>
+#include <QTimer>
+
+#include <CGAL/Mesh_optimization_return_code.h>
+
+class Scene_c3t3_item;
+
+class Optimization_function_interface
+{
+public:
+  virtual ~Optimization_function_interface() {}
+  
+  // Launch
+  virtual CGAL::Mesh_optimization_return_code launch() = 0;
+  
+  // Stop
+  virtual void stop() = 0;
+  
+  // Logs
+  virtual QString name() const = 0;
+  virtual QStringList parameters_log() const = 0;
+  virtual QString status(double time_period) const = 0;
+};
+
+
+class Optimizer_thread : public QThread
+{
+  Q_OBJECT
+public:
+  Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item);
+  virtual ~Optimizer_thread();
+  
+  // Scene item
+  Scene_c3t3_item* item() const { return item_; }
+  
+  // Infos about optimization
+  CGAL::Mesh_optimization_return_code return_code() const { return rc_; }
+  double time() const { return time_; }
+  
+  // Logs
+  QString optimizer_name() const { return f_->name(); }
+  QStringList parameters_log() const { return f_->parameters_log(); }
+  
+public Q_SLOTS:
+  // Stop
+  void stop();
+  
+private Q_SLOTS:
+  // emit signal status report
+  void emit_status();
+  
+Q_SIGNALS:
+  // Emitted at the end of the process
+  void done(Optimizer_thread*);
+  // Informs about status of the process
+  void status_report(QString);
+  
+protected:
+  // Overload of QThread function
+  virtual void run();
+  
+private:
+  Optimization_function_interface* f_;
+  Scene_c3t3_item* item_;
+  CGAL::Mesh_optimization_return_code rc_;
+  double time_; // in seconds
+  QTimer* timer_;
+  double timer_period_;
+};
+
+#endif // DEMO_MESH_3_OPTIMIZER_THREAD_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Polyhedron_type.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Polyhedron_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Polyhedron_type.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Polyhedron_type.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Polyhedron_type_fwd.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Polyhedron_type_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Polyhedron_type_fwd.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Polyhedron_type_fwd.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.cpp
new file mode 100644
index 0000000..200eaa9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.cpp
@@ -0,0 +1,1031 @@
+#include "config.h"
+
+#include "Scene_c3t3_item.h"
+
+#include <QVector>
+#include <QColor>
+#include <QPixmap>
+#include <QPainter>
+
+#include <map>
+#include <vector>
+#include <CGAL/gl.h>
+#include <CGAL/Mesh_3/dihedral_angle_3.h>
+
+#include <CGAL_demo/Scene_interface.h>
+#include <QtCore/qglobal.h>
+#include <CGAL/gl.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+struct Scene_c3t3_item_priv {
+  Scene_c3t3_item_priv() : c3t3() {}
+  Scene_c3t3_item_priv(const C3t3& c3t3_) : c3t3(c3t3_) {}
+
+  C3t3 c3t3;
+  QVector<QColor> colors;
+};
+double complex_diag(const Scene_item* item) {
+  const Scene_item::Bbox& bbox = item->bbox();
+  const double& xdelta = bbox.xmax-bbox.xmin;
+  const double& ydelta = bbox.ymax-bbox.ymin;
+  const double& zdelta = bbox.zmax-bbox.zmin;
+  const double diag = std::sqrt(xdelta*xdelta +
+                                ydelta*ydelta +
+                                zdelta*zdelta);
+  return diag * 0.7;
+}
+
+
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_c3t3_item::compile_shaders()
+{
+    //The mesh
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec3 inColor; \n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying highp vec4 color; \n"
+        "void main(void)\n"
+        "{\n"
+        "   color = vec4(inColor, 1.0); \n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying vec4 color; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+        "   vec3 N; \n"
+        "   if(fN == vec3(0.0,0.0,0.0)) \n"
+        "       N = vec3(0.0,0.0,0.0); \n"
+        "   else \n"
+        "       N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = max(abs(dot(N,L)),0) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+         "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+
+    //The grid
+    //Vertex source code
+    const char vertex_source_grid[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix; \n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * f_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source_grid[] =
+    {
+        "#version 120 \n"
+        "uniform vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader_grid = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader_grid ->compileSourceCode(vertex_source_grid))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader_grid = new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader_grid ->compileSourceCode(fragment_source_grid ))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program_grid .addShader(vertex_shader_grid ))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_grid .addShader(fragment_shader_grid ))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    rendering_program_grid.bindAttributeLocation("vertex",0);
+    if(!rendering_program_grid .link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+
+}
+
+void Scene_c3t3_item::compute_elements()
+{
+    v_poly.resize(0);
+    normal.resize(0);
+    color_triangles.resize(0);
+
+    draw_grid((float)complex_diag(this),&v_grid);
+    if(isEmpty())
+      return;
+
+    const Kernel::Plane_3& plane = this->plane();
+//TRIANGLES
+    for(C3t3::Facets_in_complex_iterator
+          fit = c3t3().facets_in_complex_begin(),
+          end = c3t3().facets_in_complex_end();
+        fit != end; ++fit)
+    {
+      const Tr::Cell_handle& cell = fit->first;
+      const int& index = fit->second;
+      if(cell->subdomain_index() != 0 &&
+         cell->neighbor(index)->subdomain_index() != 0)
+      {
+        continue;
+      }
+
+      const Kernel::Point_3& pa = cell->vertex((index+1)&3)->point();
+      const Kernel::Point_3& pb = cell->vertex((index+2)&3)->point();
+      const Kernel::Point_3& pc = cell->vertex((index+3)&3)->point();
+      typedef Kernel::Oriented_side Side;
+      using CGAL::ON_ORIENTED_BOUNDARY;
+      using CGAL::ON_NEGATIVE_SIDE;
+      const Side sa = plane.oriented_side(pa);
+      const Side sb = plane.oriented_side(pb);
+      const Side sc = plane.oriented_side(pc);
+      if(sa == ON_NEGATIVE_SIDE &&
+         sb == ON_NEGATIVE_SIDE &&
+         sc == ON_NEGATIVE_SIDE)
+      {
+  #ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+
+          Tr::Facet mirror_facet = c3t3().triangulation().mirror_facet(*fit);
+          bool blueOrRed = false;
+          if(cell->mark == index || mirror_facet.first->mark == mirror_facet.second)
+          {
+            std::cerr << "================== BAD TRIANGLE =================" << std::endl;
+            blueOrRed = true;
+
+            if(cell->mark2 != -1)
+            {
+              const Kernel::Point_3& pa2 = cell->vertex((cell->mark2+1)&3)->point();
+              const Kernel::Point_3& pb2 = cell->vertex((cell->mark2+2)&3)->point();
+              const Kernel::Point_3& pc2 = cell->vertex((cell->mark2+3)&3)->point();
+
+              std::cerr << "================== BLUE =================" << std::endl;
+
+              Kernel::Vector_3 n = cross_product(pb2 - pa2, pc2 -pa2);
+              n = n / CGAL::sqrt(n*n);
+
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              v_poly.push_back(pa2.x()); v_poly.push_back(pa2.y()); v_poly.push_back(pa2.z());
+              v_poly.push_back(pb2.x()); v_poly.push_back(pb2.y()); v_poly.push_back(pb2.z());
+              v_poly.push_back(pc2.x()); v_poly.push_back(pc2.y()); v_poly.push_back(pc2.z());
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+
+              const Tr::Facet f_blue(cell, cell->mark2);
+              Tr::Facet mirror_f_blue = c3t3().triangulation().mirror_facet(f_blue);
+              const Kernel::Point_3& dual_edge_pa = c3t3().triangulation().dual(f_blue.first);
+              const Kernel::Point_3& dual_edge_pb = c3t3().triangulation().dual(mirror_f_blue.first);
+              const Kernel::Point_3& dual_edge_pc = dual_edge_pa + Kernel::Vector_3(0.001, 0., 0.);
+              Kernel::Vector_3 n = cross_product(dual_edge_pb - dual_edge_pa, dual_edge_pc -dual_edge_pa);
+              n = n / CGAL::sqrt(n*n);
+
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+              v_poly.push_back(dual_edge_pa.x()); v_poly.push_back(dual_edge_pa.y()); v_poly.push_back(dual_edge_pa.z());
+              v_poly.push_back(dual_edge_pb.x()); v_poly.push_back(dual_edge_pb.y()); v_poly.push_back(dual_edge_pb.z());
+              v_poly.push_back(dual_edge_pc.x()); v_poly.push_back(dual_edge_pc.y()); v_poly.push_back(dual_edge_pc.z());
+
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+
+            else if(mirror_facet.first->mark2 != -1)
+            {
+              const Kernel::Point_3& pa2 = mirror_facet.first->vertex((mirror_facet.first->mark2+1)&3)->point();
+              const Kernel::Point_3& pb2 = mirror_facet.first->vertex((mirror_facet.first->mark2+2)&3)->point();
+              const Kernel::Point_3& pc2 = mirror_facet.first->vertex((mirror_facet.first->mark2+3)&3)->point();
+
+
+              std::cerr << "================== BLUE =================" << std::endl;
+              Kernel::Vector_3 n = cross_product(pb2 - pa2, pc2 -pa2);
+              n = n / CGAL::sqrt(n*n);
+
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              v_poly.push_back(pa2.x()); v_poly.push_back(pa2.y()); v_poly.push_back(pa2.z());
+              v_poly.push_back(pb2.x()); v_poly.push_back(pb2.y()); v_poly.push_back(pb2.z());
+              v_poly.push_back(pc2.x()); v_poly.push_back(pc2.y()); v_poly.push_back(pc2.z());
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+              color_triangles.push_back(0.0); color_triangles.push_back(0.0); color_triangles.push_back(1.0);
+
+
+              const Tr::Facet f_blue(mirror_facet.first, mirror_facet.first->mark2);
+              Tr::Facet mirror_f_blue = c3t3().triangulation().mirror_facet(f_blue);
+              const Kernel::Point_3& dual_edge_pa = c3t3().triangulation().dual(f_blue.first);
+              const Kernel::Point_3& dual_edge_pb = c3t3().triangulation().dual(mirror_f_blue.first);
+              const Kernel::Point_3& dual_edge_pc = dual_edge_pa + Kernel::Vector_3(0.001, 0., 0.);
+
+              Kernel::Vector_3 n = cross_product(dual_edge_pb - dual_edge_pa, dual_edge_pc -dual_edge_pa);
+              n = n / CGAL::sqrt(n*n);
+
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+              normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+              v_poly.push_back(dual_edge_pa.x()); v_poly.push_back(dual_edge_pa.y()); v_poly.push_back(dual_edge_pa.z());
+              v_poly.push_back(dual_edge_pb.x()); v_poly.push_back(dual_edge_pb.y()); v_poly.push_back(dual_edge_pb.z());
+              v_poly.push_back(dual_edge_pc.x()); v_poly.push_back(dual_edge_pc.y()); v_poly.push_back(dual_edge_pc.z());
+
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+              color_triangles.push_back(1.0); color_triangles.push_back(1.0); color_triangles.push_back(0.0);
+            }
+          }
+          else
+          {
+                Kernel::Vector_3 n = cross_product(pb - pa, pc - pa);
+                n = n / CGAL::sqrt(n*n);
+
+                normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+                normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+                normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+                v_poly.push_back(pa.x()); v_poly.push_back(pa.y()); v_poly.push_back(pa.z());
+                v_poly.push_back(pb.x()); v_poly.push_back(pb.y()); v_poly.push_back(pb.z());
+                v_poly.push_back(pc.x()); v_poly.push_back(pc.y()); v_poly.push_back(pc.z());
+
+            if(cell->subdomain_index() == 0) {
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+
+            }
+            else {
+              CGALglcolor(d->colors[cell->subdomain_index()]);
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+            }
+          }
+        }
+
+
+  #else
+          Kernel::Vector_3 n = cross_product(pb - pa, pc - pa);
+          n = n / CGAL::sqrt(n*n);
+
+          normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+          normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+          normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+          v_poly.push_back(pa.x()); v_poly.push_back(pa.y()); v_poly.push_back(pa.z());
+          v_poly.push_back(pb.x()); v_poly.push_back(pb.y()); v_poly.push_back(pb.z());
+          v_poly.push_back(pc.x()); v_poly.push_back(pc.y()); v_poly.push_back(pc.z());
+
+          if(cell->subdomain_index() == 0) {
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->neighbor(index)->subdomain_index()].blueF());
+
+          }
+          else {
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].redF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].greenF());
+              color_triangles.push_back(d->colors[cell->subdomain_index()].blueF());
+          }
+  #endif
+      }
+    }
+
+//end TRIANGLES
+    //re TRIANGLES
+    for(Tr::Finite_cells_iterator
+          cit = c3t3().triangulation().finite_cells_begin(),
+          end = c3t3().triangulation().finite_cells_end();
+        cit != end; ++cit)
+    {
+      if(! c3t3().is_in_complex(cit) )
+        continue;
+
+      const Kernel::Point_3& pa = cit->vertex(0)->point();
+      const Kernel::Point_3& pb = cit->vertex(1)->point();
+      const Kernel::Point_3& pc = cit->vertex(2)->point();
+      const Kernel::Point_3& pd = cit->vertex(3)->point();
+      typedef Kernel::Oriented_side Side;
+      using CGAL::ON_ORIENTED_BOUNDARY;
+      const Side sa = plane.oriented_side(pa);
+      const Side sb = plane.oriented_side(pb);
+      const Side sc = plane.oriented_side(pc);
+      const Side sd = plane.oriented_side(pd);
+
+      if( sa == ON_ORIENTED_BOUNDARY ||
+          sb == ON_ORIENTED_BOUNDARY ||
+          sc == ON_ORIENTED_BOUNDARY ||
+          sd == ON_ORIENTED_BOUNDARY ||
+          sb != sa || sc != sa || sd != sa)
+      {
+          QColor temp = d->colors[cit->subdomain_index()].darker(150);
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+          color_triangles.push_back(temp.redF());
+          color_triangles.push_back(temp.greenF());
+          color_triangles.push_back(temp.blueF());
+
+
+      Kernel::Vector_3 n = cross_product(pb - pa, pc - pa);
+      n = n / CGAL::sqrt(n*n);
+
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+      v_poly.push_back(pa.x()); v_poly.push_back(pa.y()); v_poly.push_back(pa.z());
+      v_poly.push_back(pb.x()); v_poly.push_back(pb.y()); v_poly.push_back(pb.z());
+      v_poly.push_back(pc.x()); v_poly.push_back(pc.y()); v_poly.push_back(pc.z());
+
+      n = cross_product(pb - pa, pd - pa);
+      n = n / CGAL::sqrt(n*n);
+
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+      v_poly.push_back(pa.x()); v_poly.push_back(pa.y()); v_poly.push_back(pa.z());
+      v_poly.push_back(pb.x()); v_poly.push_back(pb.y()); v_poly.push_back(pb.z());
+      v_poly.push_back(pd.x()); v_poly.push_back(pd.y()); v_poly.push_back(pd.z());
+
+      n = cross_product(pc - pa, pd - pa);
+      n = n / CGAL::sqrt(n*n);
+
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+      v_poly.push_back(pa.x()); v_poly.push_back(pa.y()); v_poly.push_back(pa.z());
+      v_poly.push_back(pc.x()); v_poly.push_back(pc.y()); v_poly.push_back(pc.z());
+      v_poly.push_back(pd.x()); v_poly.push_back(pd.y()); v_poly.push_back(pd.z());
+
+      n = cross_product(pc - pb, pd - pb);
+      n = n / CGAL::sqrt(n*n);
+
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+      normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+
+      v_poly.push_back(pb.x()); v_poly.push_back(pb.y()); v_poly.push_back(pb.z());
+      v_poly.push_back(pc.x()); v_poly.push_back(pc.y()); v_poly.push_back(pc.z());
+      v_poly.push_back(pd.x()); v_poly.push_back(pd.y()); v_poly.push_back(pd.z());
+      }
+    }
+//re end TRIANGLES
+
+}
+
+void Scene_c3t3_item::initialize_buffers() const
+{
+    rendering_program.bind();
+
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(v_poly.data(), static_cast<int>(v_poly.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+
+        buffers[1].bind();
+        buffers[1].allocate(normal.data(), static_cast<int>(normal.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+
+        buffers[2].bind();
+        buffers[2].allocate(color_triangles.data(), static_cast<int>(color_triangles.size()*sizeof(float)));
+        colorLocation[0] = rendering_program.attributeLocation("inColor");
+        rendering_program.enableAttributeArray(colorLocation[0]);
+        rendering_program.setAttributeBuffer(colorLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+
+        vao[0].release();
+
+    rendering_program.release();
+
+    rendering_program_grid.bind();
+
+        vao[1].bind();
+        buffers[3].bind();
+        buffers[3].allocate(v_grid.data(), static_cast<int>(v_grid.size()*sizeof(float)));
+        poly_vertexLocation[1] = rendering_program_grid.attributeLocation("vertex");
+        rendering_program_grid.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_grid.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[3].release();
+        vao[1].release();
+
+    rendering_program_grid.release();
+    are_buffers_initialized = true;
+
+}
+
+void Scene_c3t3_item::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    QMatrix4x4 fMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    frame->getMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        fMatrix.data()[i] = (float)mat[i];
+    }
+
+
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    GLboolean isTwoSide;
+    viewer->glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE,&isTwoSide);
+    // define material
+     QVector4D	ambient;
+     QVector4D	diffuse;
+     QVector4D	specular;
+     GLfloat      shininess ;
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.0f;
+    specular[1] = 0.0f;
+    specular[2] = 0.0f;
+    specular[3] = 0.0f;
+    // Shininess
+    shininess = 51.2f;
+
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.release();
+    rendering_program_grid.bind();
+
+    mvpLocation[1] = rendering_program_grid.uniformLocation("mvp_matrix");
+    fmatLocation = rendering_program_grid.uniformLocation("f_matrix");
+    colorLocation[1] = rendering_program_grid.uniformLocation("color");
+    rendering_program_grid.release();
+
+    rendering_program.bind();
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(twosideLocation, isTwoSide);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+    rendering_program.release();
+
+    rendering_program_grid.bind();
+    rendering_program_grid.setUniformValue(mvpLocation[1], mvpMatrix);
+    rendering_program_grid.setUniformValue(fmatLocation, fMatrix);
+    rendering_program_grid.release();
+
+}
+
+enum { DRAW = 0, DRAW_EDGES = 1 };
+
+void
+Scene_c3t3_item::draw(Viewer* viewer)const {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+     vao[0].bind();
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(v_poly.size()/3));
+    rendering_program.release();
+    vao[0].release();
+}
+
+void
+Scene_c3t3_item::draw_edges(Viewer* viewer) const {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    vao[1].bind();
+    attrib_buffers(viewer);
+    rendering_program_grid.bind();
+    rendering_program_grid.setUniformValue(colorLocation[1], QColor(Qt::black));
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_grid.size()/3));
+    rendering_program_grid.release();
+    vao[1].release();
+}
+
+
+
+template<typename C3t3>
+std::vector<int>
+create_histogram(const C3t3& c3t3, double& min_value, double& max_value);
+
+
+Scene_c3t3_item::
+Scene_c3t3_item()
+  : d(new Scene_c3t3_item_priv())
+  , frame(new ManipulatedFrame())
+  , histogram_()
+  , data_item_(NULL)
+  , indices_()
+{
+  compile_shaders();
+  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
+  c3t3_changed();
+}
+
+Scene_c3t3_item::Scene_c3t3_item(const C3t3& c3t3)
+  : d(new Scene_c3t3_item_priv(c3t3)), frame(new ManipulatedFrame())
+  , histogram_(), data_item_(NULL), indices_()
+{
+  compile_shaders();
+  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
+  c3t3_changed();
+}
+
+Scene_c3t3_item::~Scene_c3t3_item()
+{
+  for(int i=0; i<vboSize; i++)
+      buffers[i].destroy();
+  for(int i=0; i<vaoSize; i++)
+      vao[i].destroy();
+  delete frame;
+  delete d;
+}
+
+const C3t3& 
+Scene_c3t3_item::c3t3() const {
+  return d->c3t3;
+}
+
+C3t3& 
+Scene_c3t3_item::c3t3()
+{
+  return d->c3t3;
+}
+
+Kernel::Plane_3 
+Scene_c3t3_item::plane() const {
+  const qglviewer::Vec& pos = frame->position();
+  const qglviewer::Vec& n =
+    frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+  return Kernel::Plane_3(n[0], n[1],  n[2], - n * pos);
+}
+
+Scene_item::Bbox 
+Scene_c3t3_item::bbox() const {
+  if(isEmpty())
+    return Bbox();
+  else {
+    CGAL::Bbox_3 result = c3t3().triangulation().finite_vertices_begin()->point().bbox();
+    for(Tr::Finite_vertices_iterator
+          vit = ++c3t3().triangulation().finite_vertices_begin(),
+          end = c3t3().triangulation().finite_vertices_end();
+        vit != end; ++vit)
+    {
+      result = result + vit->point().bbox();
+    }
+    return Bbox(result.xmin(), result.ymin(), result.zmin(),
+                result.xmax(), result.ymax(), result.zmax());
+  }
+}
+
+QString 
+Scene_c3t3_item::toolTip() const {
+  int number_of_tets = 0;
+  for(Tr::Finite_cells_iterator
+        cit = c3t3().triangulation().finite_cells_begin(),
+        end = c3t3().triangulation().finite_cells_end();
+      cit != end; ++cit)
+  {
+    if( c3t3().is_in_complex(cit) )
+      ++number_of_tets;
+  }
+  return tr("<p>3D complex in a 3D triangulation:<br />"
+            "<b>%4</b></p>"
+            "<p>Number of vertices: %1<br />"
+            "Number of surface facets: %2<br />"
+            "Number of volume tetrahedra: %3</p>")
+    .arg(c3t3().triangulation().number_of_vertices())
+    .arg(c3t3().number_of_facets_in_complex())
+    .arg(number_of_tets)
+    .arg(this->name());
+}
+
+QPixmap
+Scene_c3t3_item::graphicalToolTip() const
+{
+  if ( ! histogram_.isNull() )
+  {
+    return histogram_;
+  }
+  else
+  {
+    const_cast<Scene_c3t3_item&>(*this).build_histogram();
+    return histogram_;
+  }
+}
+ 
+void
+Scene_c3t3_item::build_histogram()
+{
+#ifdef CGAL_MESH_3_DEMO_BIGGER_HISTOGRAM_WITH_WHITE_BACKGROUNG
+  // Create an histogram_ and display it
+  const int height = 280;
+  const int top_margin = 5;
+  const int left_margin = 20;
+  const int drawing_height = height-top_margin*2;
+  const int width = 804;
+  const int cell_width = 4;
+  const int text_margin = 3;
+  const int text_height = 34;
+  
+  histogram_ = QPixmap(width,height+text_height);
+  histogram_.fill(QColor(255,255,255));
+#else
+  // Create an histogram_ and display it
+  const int height = 140;
+  const int top_margin = 5;
+  const int left_margin = 20;
+  const int drawing_height = height-top_margin*2;
+  const int width = 402;
+  const int cell_width = 2;
+  const int text_margin = 3;
+  const int text_height = 20;
+  
+  histogram_ = QPixmap(width,height+text_height);
+  histogram_.fill(QColor(192,192,192));
+#endif  
+
+  QPainter painter(&histogram_);
+  painter.setPen(Qt::black);
+  painter.setBrush(QColor(128,128,128));
+  //painter.setFont(QFont("Arial", 30));
+  
+  // Build histogram_ data
+  double min_value, max_value;
+  std::vector<int> histo_data = create_histogram(c3t3(),min_value,max_value);
+  
+  // Get maximum value (to normalize)
+  int max_size = 0;
+  for ( std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end() ;
+       it != end ; ++it )
+  {
+    max_size = (std::max)(max_size,*it);
+  }
+  
+  // colored histogram
+  int j = 0;
+  
+  // draw
+  int i=left_margin;
+  for ( std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end() ;
+       it != end ; ++it, i+=cell_width )
+  {
+    int line_height = static_cast<int>( std::ceil(static_cast<double>(drawing_height) *
+      static_cast<double>(*it)/static_cast<double>(max_size)) + .5);
+    
+    painter.fillRect(i,
+                     drawing_height+top_margin-line_height,
+                     cell_width,
+                     line_height,
+                     get_histogram_color(j++));
+  }
+  
+  // draw bottom horizontal line
+  painter.setPen(Qt::blue);
+  
+  painter.drawLine(QPoint(left_margin, drawing_height + top_margin),
+                   QPoint(left_margin + static_cast<int>(histo_data.size())*cell_width, 
+                          drawing_height + top_margin));
+
+  
+  // draw min value and max value
+  const int min_tr_width = static_cast<int>( 2*(std::floor(min_value)*cell_width + left_margin) );
+  const int max_tr_width = static_cast<int>( 
+    2*((histo_data.size()-std::floor(max_value))*cell_width + left_margin) );
+  const int tr_y = drawing_height + top_margin + text_margin;
+  
+  painter.setPen(get_histogram_color(min_value));
+  QRect min_text_rect (0, tr_y, min_tr_width, text_height);
+  painter.drawText(min_text_rect, Qt::AlignCenter, tr("%1").arg(min_value,0,'f',1));
+  
+  painter.setPen(get_histogram_color(max_value));           
+  QRect max_text_rect (width - max_tr_width, tr_y, max_tr_width, text_height);
+  painter.drawText(max_text_rect, Qt::AlignCenter, tr("%1").arg(max_value,0,'f',1));
+}
+
+template<typename C3t3>
+std::vector<int>
+create_histogram(const C3t3& c3t3, double& min_value, double& max_value)
+{
+  typedef typename C3t3::Triangulation::Point Point_3;
+  
+	std::vector<int> histo(181,0);
+  
+  min_value = 180.;
+  max_value = 0.;
+  
+	for (typename C3t3::Cells_in_complex_iterator cit = c3t3.cells_in_complex_begin() ;
+       cit != c3t3.cells_in_complex_end() ;
+       ++cit)
+	{
+		if( !c3t3.is_in_complex(cit))
+			continue;
+		
+#ifdef CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
+    if (c3t3.in_dimension(cit->vertex(0)) <= 1
+     || c3t3.in_dimension(cit->vertex(1)) <= 1
+     || c3t3.in_dimension(cit->vertex(2)) <= 1
+     || c3t3.in_dimension(cit->vertex(3)) <= 1)
+      continue;
+#endif //CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
+		
+		const Point_3& p0 = cit->vertex(0)->point();
+		const Point_3& p1 = cit->vertex(1)->point();
+		const Point_3& p2 = cit->vertex(2)->point();
+		const Point_3& p3 = cit->vertex(3)->point();
+		
+		double a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0,p1,p2,p3)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p2, p1, p3)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p3, p1, p2)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p2, p0, p3)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p3, p0, p2)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+		a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p2, p3, p0, p1)));
+		histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+    
+	}
+  
+	return histo;	
+}
+
+
+QColor
+Scene_c3t3_item::get_histogram_color(const double v) const
+{
+  if ( v < 5 )            { return Qt::red; }
+  else if ( v < 10 )      { return QColor(215,108,0); }
+  else if ( v < 15 )      { return QColor(138,139,0); }
+  else if ( v < 165 )     { return QColor(60,136,64); }
+  else if ( v < 170 )     { return QColor(138,139,1); }
+  else if ( v < 175 )     { return QColor(215,108,0); }
+  else /* 175<v<=180 */   { return Qt::red; }
+}
+
+
+void
+Scene_c3t3_item::setColor(QColor c)
+{
+  color_ = c;
+  compute_color_map(c);
+}
+
+void
+Scene_c3t3_item::c3t3_changed()
+{
+  // Update colors
+  // Fill indices map and get max subdomain value
+  indices_.clear();
+  
+  int max = 0;
+  for(C3t3::Cells_in_complex_iterator cit = this->c3t3().cells_in_complex_begin(),
+      end = this->c3t3().cells_in_complex_end() ; cit != end; ++cit)
+  {
+    max = (std::max)(max, cit->subdomain_index());
+    indices_.insert(cit->subdomain_index());
+  }
+
+  d->colors.resize(max+1);
+  compute_color_map(color_);
+  
+  // Rebuild histogram
+  build_histogram();
+  compute_elements();
+  are_buffers_initialized = false;
+}
+
+void
+Scene_c3t3_item::compute_color_map(const QColor& c)
+{
+  typedef Indices::size_type size_type;
+
+  size_type nb_domains = indices_.size();
+  size_type i = 0;
+  for(Indices::iterator it = indices_.begin(), end = indices_.end();
+      it != end; ++it, ++i)
+  {
+    double hue = c.hueF() + 1./nb_domains * i;
+    if ( hue > 1 ) { hue -= 1.; }
+    d->colors[*it] = QColor::fromHsvF(hue, c.saturationF(), c.valueF());
+  }
+}
+
+void Scene_c3t3_item::draw_grid(float diag, std::vector<float> *positions_grid)
+{
+    positions_grid->resize(0);
+           float x = (2*(float)diag)/10.0;
+           float y = (2*(float)diag)/10.0;
+           for(int u = 0; u < 11; u++)
+           {
+
+               positions_grid->push_back(-(float)diag + x* u);
+               positions_grid->push_back(-(float)diag);
+               positions_grid->push_back(0.0);
+
+               positions_grid->push_back(-(float)diag + x* u);
+               positions_grid->push_back((float)diag);
+               positions_grid->push_back(0.0);
+           }
+           for(int v=0; v<11; v++)
+           {
+
+               positions_grid->push_back(-(float)diag);
+               positions_grid->push_back(-(float)diag + v * y);
+               positions_grid->push_back(0.0);
+
+               positions_grid->push_back((float)diag);
+               positions_grid->push_back(-(float)diag + v * y);
+               positions_grid->push_back(0.0);
+           }
+       }
+
+void Scene_c3t3_item::contextual_changed()
+{
+    if(frame->isInMouseGrabberPool())
+        c3t3_changed();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.h
new file mode 100644
index 0000000..22f3c0d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item.h
@@ -0,0 +1,174 @@
+#ifndef SCENE_C3T3_ITEM_H
+#define SCENE_C3T3_ITEM_H
+
+#include "Scene_c3t3_item_config.h"
+#include "C3t3_type.h"
+#include <CGAL_demo/Scene_item.h>
+
+#include <QVector>
+#include <QColor>
+#include <set>
+
+#include <QtCore/qglobal.h>
+#include <CGAL/gl.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+struct Scene_c3t3_item_priv;
+
+class SCENE_C3T3_ITEM_EXPORT Scene_c3t3_item
+  : public Scene_item
+{
+  Q_OBJECT
+public:
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+
+  Scene_c3t3_item();
+  Scene_c3t3_item(const C3t3& c3t3);
+  ~Scene_c3t3_item();
+
+  const C3t3& c3t3() const;
+  C3t3& c3t3();
+  
+  bool manipulatable() const {
+    return true;
+  }
+
+  ManipulatedFrame* manipulatedFrame() {
+    return frame;
+  }
+
+  void setPosition(float x, float y, float z) {
+    frame->setPosition(x, y, z);
+  }
+
+  void setNormal(float x, float y, float z) {
+    frame->setOrientation(x, y, z, 0.f);
+  }
+
+  Kernel::Plane_3 plane() const;
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const {
+    return c3t3().triangulation().number_of_vertices() == 0;
+  }
+
+  Bbox bbox() const;
+
+  Scene_c3t3_item* clone() const {
+    return 0;
+  }
+
+  QString toolTip() const;
+  virtual QPixmap graphicalToolTip() const;
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m != Gouraud); // CHECK THIS!
+  }
+
+  void draw(Viewer* viewer) const;
+  void draw_edges(Viewer* viewer) const;
+  
+  // data item
+  inline const Scene_item* data_item() const;
+  inline void set_data_item(const Scene_item* data_item);
+  
+  // rebuild histogram
+  inline void update_histogram();
+  
+  // Call this if c3t3 has been modified
+  void c3t3_changed();
+  void contextual_changed();
+
+public Q_SLOTS:
+  inline void data_item_destroyed();
+  virtual void setColor(QColor c);
+  
+private:
+  void build_histogram();
+  void compute_color_map(const QColor& c);
+  QColor get_histogram_color(const double v) const;
+  
+protected:
+  Scene_c3t3_item_priv* d;
+
+  qglviewer::ManipulatedFrame* frame;
+  
+private:
+  QPixmap histogram_;
+  const Scene_item* data_item_;
+  
+  typedef std::set<int> Indices;
+  Indices indices_;
+
+  static const int vaoSize = 2;
+  static const int vboSize = 4;
+  mutable bool are_buffers_initialized;
+  mutable int poly_vertexLocation[2];
+  mutable int normalsLocation[2];
+  mutable int mvpLocation[2];
+  mutable int mvLocation[2];
+  mutable int fmatLocation;
+  mutable int colorLocation[2];
+  mutable int lightLocation[5*2];
+  mutable int twosideLocation;
+
+  std::vector<float> v_poly;
+  std::vector<float> normal;
+  std::vector<float> color_triangles;
+  std::vector<float> v_grid;
+
+
+
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  mutable QOpenGLShaderProgram rendering_program_grid;
+  void initialize_buffers() const;
+  void compute_elements();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+  void draw_grid(float diag, std::vector<float> *positions_grid);
+};
+
+inline
+const Scene_item*
+Scene_c3t3_item::data_item() const
+{
+  return data_item_;
+}
+
+inline
+void
+Scene_c3t3_item::set_data_item(const Scene_item* data_item)
+{
+  data_item_ = data_item;
+  
+  if ( NULL != data_item )
+  {
+    connect(data_item, SIGNAL(aboutToBeDestroyed()),
+            this, SLOT(data_item_destroyed()));
+  }
+}
+
+inline
+void
+Scene_c3t3_item::update_histogram()
+{
+  build_histogram();
+}
+
+inline
+void
+Scene_c3t3_item::data_item_destroyed()
+{
+  set_data_item(NULL);
+}
+
+
+
+#endif // SCENE_C3T3_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item_config.h
new file mode 100644
index 0000000..2e03e1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_c3t3_item_config.h
@@ -0,0 +1,14 @@
+#ifndef SCENE_C3T3_ITEM_CONFIG_H
+#define SCENE_C3T3_ITEM_CONFIG_H
+
+#ifdef scene_c3t3_item_EXPORTS
+#  define mesh_3_demo_scene_c3t3_item_EXPORTS 1
+#endif
+
+#ifdef mesh_3_demo_scene_c3t3_item_EXPORTS
+#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_EXPORT
+#else
+#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SCENE_C3T3_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.cpp
new file mode 100644
index 0000000..2b89086
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.cpp
@@ -0,0 +1,585 @@
+#include "config.h"
+
+#include "Scene_implicit_function_item.h"
+#include <QColor>
+#include <map>
+#include <CGAL/gl.h>
+#include <CGAL/Simple_cartesian.h>
+
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+
+#include "Color_ramp.h"
+
+
+Scene_implicit_function_item::
+Scene_implicit_function_item(Implicit_function_interface* f)
+  : function_(f)
+  , frame_(new ManipulatedFrame())
+  , grid_size_(SCENE_IMPLICIT_GRID_SIZE)
+  , max_value_(0.)
+  , min_value_(0.)
+  , blue_color_ramp_()
+  , red_color_ramp_()
+{
+  compile_shaders();
+  texture = new Texture(grid_size_,grid_size_);
+  blue_color_ramp_.build_blue();
+  red_color_ramp_.build_red();
+  compute_min_max();
+  compute_function_grid();
+  connect(frame_, SIGNAL(modified()), this, SLOT(compute_function_grid()));
+  are_buffers_initialized = false;
+  texture_initialized = false;
+}
+
+
+Scene_implicit_function_item::~Scene_implicit_function_item()
+{
+    for(int i=0; i<vboSize; i++)
+        buffers[i].destroy();
+    for(int i=0; i<vaoSize; i++)
+        vao[i].destroy();
+    v_cube.clear();
+    v_plan.clear();
+    texture_map.clear();
+  delete frame_;
+}
+
+
+Scene_implicit_function_item::Bbox
+Scene_implicit_function_item::bbox() const
+{
+  return function_->bbox();
+}
+
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_implicit_function_item::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position =  mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform vec4 color; \n"
+        "void main(void) { \n"
+         "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+
+    //Vertex source code
+    const char tex_vertex_source[] =
+    {
+         "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec2 tex_coord; \n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix;\n"
+        "varying highp vec2 texc;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * f_matrix * vertex;\n"
+        "    texc = tex_coord;\n"
+        "}"
+    };
+    //Fragment source code
+    const char tex_fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform sampler2D texture;\n"
+        "varying highp vec2 texc;\n"
+        "void main(void) { \n"
+        "gl_FragColor = texture2D(texture, texc.st);\n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *tex_vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!tex_vertex_shader->compileSourceCode(tex_vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *tex_fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!tex_fragment_shader->compileSourceCode(tex_fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!tex_rendering_program.addShader(tex_vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!tex_rendering_program.addShader(tex_fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!tex_rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    tex_rendering_program.bind();
+}
+
+void Scene_implicit_function_item::compute_elements()
+{
+    v_cube.resize(0);
+    v_plan.resize(0);
+    texture_map.resize(0);
+    // The Quad
+       {
+
+
+           //A
+         v_plan.push_back(bbox().xmin);
+         v_plan.push_back(bbox().ymin);
+         v_plan.push_back(0);
+
+
+           //B
+         v_plan.push_back(bbox().xmin);
+         v_plan.push_back(bbox().ymax);
+         v_plan.push_back(0);
+
+
+           //C
+         v_plan.push_back(bbox().xmax);
+         v_plan.push_back(bbox().ymin);
+         v_plan.push_back(0);
+
+
+
+           //C
+         v_plan.push_back(bbox().xmax);
+         v_plan.push_back(bbox().ymin);
+         v_plan.push_back(0);
+
+
+           //B
+         v_plan.push_back(bbox().xmin);
+         v_plan.push_back(bbox().ymax);
+         v_plan.push_back(0);
+
+
+           //D
+         v_plan.push_back(bbox().xmax);
+         v_plan.push_back(bbox().ymax);
+         v_plan.push_back(0);
+
+
+           //UV Mapping
+           texture_map.push_back(0.0);
+           texture_map.push_back(0.0);
+
+           texture_map.push_back(0.0);
+           texture_map.push_back(1.0);
+
+           texture_map.push_back(1.0);
+           texture_map.push_back(0.0);
+
+           texture_map.push_back(1.0);
+           texture_map.push_back(0.0);
+
+           texture_map.push_back(0.0);
+           texture_map.push_back(1.0);
+
+           texture_map.push_back(1.0);
+           texture_map.push_back(1.0);
+       }
+    //The box
+    {
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmin);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmin);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymax);
+        v_cube.push_back(bbox().zmax);
+
+        v_cube.push_back(bbox().xmax);
+        v_cube.push_back(bbox().ymin);
+        v_cube.push_back(bbox().zmax);
+
+    }
+    //The texture
+   for(int i=0; i < texture->getWidth(); i++)
+       for( int j=0 ; j < texture->getHeight() ; j++)
+       {
+          compute_texture(i,j);
+       }
+}
+
+void Scene_implicit_function_item::initialize_buffers(Viewer* viewer) const
+{
+
+    rendering_program.bind();
+
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(v_cube.data(), static_cast<int>(v_cube.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[0].release();
+    vao[0].release();
+    rendering_program.release();
+    tex_rendering_program.bind();
+    //cutting plane
+    vao[1].bind();
+    buffers[1].bind();
+    buffers[1].allocate(v_plan.data(), static_cast<int>(v_plan.size()*sizeof(float)));
+    vertexLocation[1] = tex_rendering_program.attributeLocation("vertex");
+    tex_rendering_program.bind();
+    tex_rendering_program.setAttributeBuffer(vertexLocation[1],GL_FLOAT,0,3);
+    tex_rendering_program.enableAttributeArray(vertexLocation[1]);
+    buffers[1].release();
+    tex_rendering_program.release();
+
+    buffers[2].bind();
+    buffers[2].allocate(texture_map.data(), static_cast<int>(texture_map.size()*sizeof(float)));
+    tex_Location = tex_rendering_program.attributeLocation("tex_coord");
+    tex_rendering_program.bind();
+    tex_rendering_program.setAttributeBuffer(tex_Location,GL_FLOAT,0,2);
+    tex_rendering_program.enableAttributeArray(tex_Location);
+    buffers[2].release();
+    tex_rendering_program.release();
+
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    viewer->glTexImage2D(GL_TEXTURE_2D,
+                 0,
+                 GL_RGB,
+                 texture->getWidth(),
+                 texture->getHeight(),
+                 0,
+                 GL_RGB,
+                 GL_UNSIGNED_BYTE,
+                 texture->getData());
+    viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE );
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE );
+    vao[1].release();
+    tex_rendering_program.release();
+    are_buffers_initialized = true;
+}
+
+void Scene_implicit_function_item::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 fMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    frame_->getMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        fMatrix.data()[i] = (float)mat[i];
+    }
+
+    rendering_program.bind();
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);;
+    rendering_program.release();
+
+    tex_rendering_program.bind();
+    colorLocation[1] = tex_rendering_program.uniformLocation("color");
+    f_Location = tex_rendering_program.uniformLocation("f_matrix");
+    mvpLocation[1] = tex_rendering_program.uniformLocation("mvp_matrix");
+    tex_rendering_program.setUniformValue(mvpLocation[1], mvpMatrix);;
+    tex_rendering_program.setUniformValue(f_Location, fMatrix);;
+    tex_rendering_program.release();
+
+}
+
+void
+Scene_implicit_function_item::draw(Viewer* viewer) const
+{
+  if(!texture_initialized)
+  {
+    viewer->glGenTextures(1, &textureId);
+    texture_initialized = true;
+  }
+  if(!are_buffers_initialized)
+    initialize_buffers(viewer);
+  QColor color;
+  vao[0].bind();
+  attrib_buffers(viewer);
+  rendering_program.bind();
+  color.setRgbF(0.0,0.0,0.0);
+  rendering_program.setUniformValue(colorLocation[0], color);
+  glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_cube.size()/3));
+  rendering_program.release();
+  vao[0].release();
+
+  viewer->glActiveTexture(GL_TEXTURE0);
+  viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+
+  vao[1].bind();
+  tex_rendering_program.bind();
+  glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(v_plan.size()/3));
+  tex_rendering_program.release();
+  vao[1].release();
+
+}
+
+QString
+Scene_implicit_function_item::toolTip() const
+{
+  return tr("<p>Function <b>%1</b>")
+    .arg(this->name());
+}
+
+bool
+Scene_implicit_function_item::supportsRenderingMode(RenderingMode m) const
+{ 
+  switch ( m )
+  {
+    case Gouraud:
+      return false;
+      
+    case Points:
+    case Wireframe:
+    case Flat:
+    case FlatPlusEdges:
+      return true;
+      
+    default:
+      return false;
+  }
+  
+  return false;
+}
+
+
+void
+Scene_implicit_function_item::
+compute_function_grid()
+{
+  typedef CGAL::Simple_cartesian<double>  K;
+  typedef K::Aff_transformation_3         Aff_transformation;
+  typedef K::Point_3                      Point_3;
+  
+  // Get transformation
+  const ::GLdouble* m = frame_->matrix();
+  
+  // OpenGL matrices are row-major matrices
+  Aff_transformation t (m[0], m[4], m[8], m[12],
+                        m[1], m[5], m[9], m[13],
+                        m[2], m[6], m[10], m[14]);
+  
+  double diag = bbox().diagonal_length() * .6;
+  
+  const double dx = diag;
+  const double dy = diag;
+  const double z (0);
+  
+  for(int i=0 ; i<grid_size_ ; ++i)
+  {
+    double x = -diag/2. + double(i)/double(grid_size_) * dx;
+    
+    for(int j=0 ; j<grid_size_ ; ++j)
+    {
+      double y = -diag/2. + double(j)/double(grid_size_) * dy;
+      
+      Point_3 query = t( Point_3(x,y,z) );
+      double v = function_->operator()(query.x(), query.y(), query.z());
+      
+      implicit_grid_[i][j] = Point_value(Point(query.x(),query.y(),query.z()),v);
+    }
+  }
+  
+  // Update display list
+  this->changed();
+}
+
+void
+Scene_implicit_function_item::
+compute_min_max()
+{
+  max_value_ = 0;
+  min_value_ = 0;
+  
+  double probes_nb = double(grid_size_) / 2;
+  
+  // Probe bounding box
+  const Bbox& b = bbox();
+  
+  for ( int i = 0 ; i <= probes_nb ; ++i )
+  {
+    double x = b.xmin + double(i) * (b.xmax - b.xmin) / probes_nb;
+    
+    for ( int j = 0 ; j <= probes_nb ; ++j )
+    {
+      double y = b.ymin + double(j) * (b.ymax - b.ymin) / probes_nb;
+      
+      for ( int k = 0 ; k <= probes_nb ; ++k )
+      {
+        double z = b.zmin + double(k) * (b.zmax - b.zmin) / probes_nb;
+        
+        double v = (*function_)(x,y,z);
+        max_value_ = (std::max)(v,max_value_);
+        min_value_ = (std::min)(v,min_value_);
+      }
+    }
+  }
+}
+
+void Scene_implicit_function_item::changed()
+{
+    compute_elements();
+    are_buffers_initialized = false;
+}
+
+void Scene_implicit_function_item::compute_texture(int i, int j)
+{
+
+  double v =(implicit_grid_[i][j]).second;
+       // determines grey level
+       if ( v > 0 )
+       {
+           v = v/max_value_;
+           GLdouble r = red_color_ramp_.r(v), g = red_color_ramp_.g(v), b = red_color_ramp_.b(v);
+           texture->setData(i,j,255*r,255*g,255*b);
+       }
+       else
+       {
+           v = v/min_value_;
+           GLdouble r = blue_color_ramp_.r(v), g = blue_color_ramp_.g(v), b = blue_color_ramp_.b(v);
+           texture->setData(i,j,255*r,255*g,255*b);
+       }
+}
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.h
new file mode 100644
index 0000000..9a0b950
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item.h
@@ -0,0 +1,127 @@
+#ifndef SCENE_IMPLICIT_FUNCTION_ITEM_H
+#define SCENE_IMPLICIT_FUNCTION_ITEM_H
+
+#include <CGAL_demo/Scene_item.h>
+#include <CGAL_demo/Scene_interface.h>
+#include "Scene_implicit_function_item_config.h"
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Color_ramp.h"
+
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+#define SCENE_IMPLICIT_GRID_SIZE 120
+
+class Texture{
+private:
+     int Width;
+     int Height;
+     int size;
+    GLubyte *data;
+public:
+    Texture(int w, int h)
+    {
+        Width = w;
+        Height = h;
+        size = 3*Height*Width;
+        data = new GLubyte[size];
+    }
+    int getWidth() const {return Width;}
+    int getHeight() const {return Height;}
+    int getSize() const {return size;}
+    void setData(int i, int j, int r, int g, int b){
+          data[j*Width*3 +i*3] = r;
+          data[j*Width*3 +i*3+1] = g;
+          data[j*Width*3 +i*3+2] = b;}
+    GLubyte* getData(){return data; }
+
+};
+
+class SCENE_IMPLICIT_FUNCTION_ITEM_EXPORT Scene_implicit_function_item 
+  : public Scene_item
+{
+  Q_OBJECT
+  
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+  
+public:
+  Scene_implicit_function_item(Implicit_function_interface*);
+  virtual ~Scene_implicit_function_item();
+  
+  Implicit_function_interface* function() const { return function_; }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  Bbox bbox() const;
+
+  Scene_implicit_function_item* clone() const { return NULL; }
+
+  // rendering mode
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+  virtual bool manipulatable() const { return true; }
+  virtual ManipulatedFrame* manipulatedFrame() { return frame_; }
+  
+  // draw (overload only direct_draw() to use display list of base class)
+  virtual void draw(Viewer* viewer) const;
+  
+  virtual QString toolTip() const;
+
+public Q_SLOTS:
+  void compute_function_grid();
+
+private:
+  typedef qglviewer::Vec                  Point;
+  typedef std::pair <Point,double>        Point_value;
+  
+  void compute_min_max();
+  
+private:
+  Implicit_function_interface* function_;
+  ManipulatedFrame* frame_;
+  
+  int grid_size_;
+  double max_value_;
+  double min_value_;
+  Point_value implicit_grid_[SCENE_IMPLICIT_GRID_SIZE][SCENE_IMPLICIT_GRID_SIZE];
+  
+  Color_ramp blue_color_ramp_;
+  Color_ramp red_color_ramp_;
+
+  mutable bool are_buffers_initialized;
+
+  static const int vaoSize = 2;
+  static const int vboSize = 3;
+  mutable int vertexLocation[2];
+  mutable int mvpLocation[2];
+  mutable int colorLocation[2];
+  mutable int tex_Location;
+  mutable int f_Location;
+
+
+   std::vector<float> v_cube;
+   std::vector<float> v_plan;
+
+   std::vector<float> texture_map;
+   Texture *texture;
+   mutable GLuint textureId;
+   mutable bool texture_initialized;
+   GLint sampler_location;
+
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  mutable QOpenGLShaderProgram tex_rendering_program;
+  void initialize_buffers(Viewer*) const;
+  void compute_elements();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+  void compute_texture(int, int);
+
+public Q_SLOTS:
+    void changed();
+};
+
+#endif // SCENE_IMPLICIT_FUNCTION_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_implicit_function_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_implicit_function_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.cpp
new file mode 100644
index 0000000..9a2a9a1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.cpp
@@ -0,0 +1,726 @@
+#include "config.h"
+
+#include "Scene_polygon_soup.h"
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <QObject>
+#include <QtDebug>
+
+#include <set>
+#include <stack>
+#include <algorithm>
+#include <boost/array.hpp>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/IO/File_scanner_OFF.h>
+#include <CGAL/IO/File_writer_OFF.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point_3;
+
+struct Polygon_soup {
+  typedef std::vector<Point_3> Points;
+  typedef std::vector<std::size_t> Polygon_3;
+  typedef std::map<std::pair<std::size_t, std::size_t>, std::set<std::size_t> > Edges_map;
+  typedef boost::array<std::size_t, 2> Edge;
+  typedef std::vector<Polygon_3> Polygons;
+  typedef std::vector<Edge> Edges;
+  typedef Polygons::size_type size_type;
+  Points points;
+  Polygons polygons;
+  Edges_map edges;
+  Edges non_manifold_edges;
+  bool display_non_manifold_edges;
+
+  Polygon_soup* clone() const {
+    Polygon_soup* result = new Polygon_soup();
+    result->points = points;
+    result->polygons = polygons;
+    result->edges = edges;
+    result->non_manifold_edges = non_manifold_edges;
+    result->display_non_manifold_edges = display_non_manifold_edges;
+    return result;
+  }
+
+  void clear() {
+    points.clear();
+    polygons.clear();
+    edges.clear();
+    non_manifold_edges.clear();
+  }
+
+  void fill_edges() {
+    // Fill edges
+    edges.clear();
+    for(size_type i = 0; i < polygons.size(); ++i)
+    {
+      const size_type size = polygons[i].size();
+      for(size_type j = 0; j < size; ++j) {
+        const std::size_t& i0 = polygons[i][j];
+        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
+        edges[std::make_pair(i0, i1)].insert(i);
+//         qDebug() << tr("edges[std::make_pair(%1, %2)].insert(%3). Size=%4")
+//           .arg(i0).arg(i1).arg(i).arg(edges[std::make_pair(i0, i1)].size());
+      }
+    }
+
+    // Fill non-manifold edges
+    non_manifold_edges.clear();
+    for(size_type i = 0; i < polygons.size(); ++i)
+    {
+      const size_type size = polygons[i].size();
+      for(size_type j = 0; j < size; ++j) {
+        const std::size_t& i0 = polygons[i][j];
+        const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
+        if( (i0 < i1) && 
+            (edges[std::make_pair(i0, i1)].size() +
+             edges[std::make_pair(i1, i0)].size() > 2) )
+        {
+          Edge edge;
+          edge[0] = i0;
+          edge[1] = i1;
+          non_manifold_edges.push_back(edge);
+        }
+      }
+    }
+  }
+
+  void inverse_orientation(const std::size_t index) {
+    std::reverse(polygons[index].begin(), polygons[index].end());
+  }
+};
+
+Scene_polygon_soup::Scene_polygon_soup()
+  : Scene_item(),
+    soup(0),
+    oriented(false)
+{
+    compile_shaders();
+    are_buffers_initialized = false;
+}
+
+Scene_polygon_soup::~Scene_polygon_soup()
+{
+    for(int i=0; i<vboSize; i++)
+        buffers[i].destroy();
+    for(int i=0; i<vaoSize; i++)
+        vao[i].destroy();
+
+  delete soup;
+}
+
+
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_polygon_soup::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform vec4 color; \n"
+        "uniform bool is_two_side; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N; \n"
+        "   if(fN == vec3(0.0,0.0,0.0)) \n"
+        "       N = vec3(0.0,0.0,0.0); \n"
+        "   else \n"
+        "       N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse; \n"
+        "   if(!is_two_side) \n"
+        "       diffuse = max(dot(N,L),0) * light_diff*color; \n"
+        "   else \n"
+        "       diffuse = max(abs(dot(N,L)),0) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+         "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Scene_polygon_soup::compute_elements()
+{
+    normal.resize(0);
+    v_poly.resize(0);
+    v_edge.resize(0);
+    vertex_nm.resize(0);
+
+    typedef Polygon_soup::Polygons::const_iterator Polygons_iterator;
+    typedef Polygon_soup::Polygons::size_type size_type;
+    for(Polygons_iterator it = soup->polygons.begin();
+        it != soup->polygons.end(); ++it)
+    {
+      const Point_3& pa = soup->points[it->at(0)];
+      const Point_3& pb = soup->points[it->at(1)];
+      const Point_3& pc = soup->points[it->at(2)];
+
+      Kernel::Vector_3 n = CGAL::cross_product(pb-pa, pc -pa);
+      n = n / std::sqrt(n * n);
+
+      for(size_type i = 0; i < it->size(); ++i) {
+        const Point_3& p = soup->points[it->at(i)];
+        normal.push_back(n.x()); normal.push_back(n.y()); normal.push_back(n.z());
+        v_poly.push_back(p.x()); v_poly.push_back(p.y()); v_poly.push_back(p.z());
+      }
+    }
+
+    //edges
+    for(size_type i = 0; i < soup->polygons.size(); ++i)
+    {
+      const size_type size = soup->polygons[i].size();
+      for(size_type j = 0; j < size; ++j) {
+        const std::size_t& i0 = soup->polygons[i][j];
+        const std::size_t& i1 = soup->polygons[i][ j+1 < size ? j+1: 0];
+        Polygon_soup::Edge edge;
+        edge[0] = i0;
+        edge[1] = i1;
+        const Point_3& a = soup->points[edge[0]];
+        const Point_3& b = soup->points[edge[1]];
+        v_edge.push_back(a.x()); v_edge.push_back(a.y());  v_edge.push_back(a.z());
+        v_edge.push_back(b.x()); v_edge.push_back(b.y()); v_edge.push_back(b.z());
+      }
+    }
+
+    //non_manifold_edges
+
+    for(Polygon_soup::size_type
+        i = 0,
+        end = soup->non_manifold_edges.size();
+        i < end; ++i)
+    {
+        const Polygon_soup::Edge& edge = soup->non_manifold_edges[i];
+        const Point_3& a = soup->points[edge[0]];
+        const Point_3& b = soup->points[edge[1]];
+
+        vertex_nm.push_back(a.x()); vertex_nm.push_back(a.y());  vertex_nm.push_back(a.z());
+        vertex_nm.push_back(b.x()); vertex_nm.push_back(b.y()); vertex_nm.push_back(b.z());
+    }
+}
+
+void Scene_polygon_soup::initialize_buffers() const
+{
+    rendering_program.bind();
+
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(v_poly.data(), static_cast<int>(v_poly.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+
+        buffers[1].bind();
+        buffers[1].allocate(normal.data(), static_cast<int>(normal.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+
+        vao[0].release();
+
+        vao[1].bind();
+        buffers[2].bind();
+        buffers[2].allocate(v_edge.data(), static_cast<int>(v_edge.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+        std::vector<float> empty_array;
+        empty_array.resize(0);
+        for(std::size_t i=0; i<v_edge.size(); i++)
+            empty_array.push_back(0.0);
+        buffers[3].bind();
+        buffers[3].allocate(empty_array.data(), static_cast<int>(empty_array.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[3].release();
+
+        vao[1].release();
+
+        vao[2].bind();
+        buffers[4].bind();
+        buffers[4].allocate(v_edge.data(), static_cast<int>(v_edge.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[4].release();
+        empty_array.resize(0);
+        for(std::size_t i=0; i<v_edge.size(); i++)
+            empty_array.push_back(0.0);
+        buffers[5].bind();
+        buffers[5].allocate(empty_array.data(), static_cast<int>(empty_array.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[5].release();
+
+        vao[2].release();
+
+    rendering_program.release();
+    are_buffers_initialized = true;
+
+}
+
+void Scene_polygon_soup::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    GLboolean isTwoSide;
+    viewer->glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE,&isTwoSide);
+    // define material
+     QVector4D	ambient;
+     QVector4D	diffuse;
+     QVector4D	specular;
+     GLfloat      shininess ;
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.0f;
+    specular[1] = 0.0f;
+    specular[2] = 0.0f;
+    specular[3] = 0.0f;
+    // Shininess
+    shininess = 51.2f;
+
+
+    rendering_program.bind();
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    twosideLocation = rendering_program.uniformLocation("is_two_side");
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(twosideLocation, isTwoSide);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program.release();
+}
+
+void
+Scene_polygon_soup::draw(Viewer* viewer) const  {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+
+    QColor color;
+    vao[0].bind();
+    float current_color[4];
+    viewer->glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    rendering_program.setUniformValue(colorLocation[0], color);
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(v_poly.size()/3));
+    rendering_program.release();
+    vao[0].release();
+}
+
+void
+Scene_polygon_soup::draw_edges(Viewer* viewer) const  {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+    vao[1].bind();
+    float current_color[4];
+    glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    rendering_program.setUniformValue(colorLocation[0], color);
+    glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_edge.size()/3));
+    rendering_program.release();
+    vao[1].release();
+
+    if(soup->display_non_manifold_edges)
+    {
+        vao[2].bind();
+        color.setRgbF(1.0,0.0,0.0);
+        attrib_buffers(viewer);
+        rendering_program.bind();
+        rendering_program.setUniformValue(colorLocation[0], color);
+        glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_edge.size()/3));
+        rendering_program.release();
+        vao[2].release();
+    }
+}
+
+void
+Scene_polygon_soup::draw_points(Viewer* viewer) const  {
+
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+    vao[0].bind();
+    float current_color[4];
+    viewer->glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    rendering_program.setUniformValue(colorLocation[0], color);
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(v_poly.size()/3));
+    rendering_program.release();
+    vao[0].release();
+
+}
+
+
+Scene_polygon_soup* 
+Scene_polygon_soup::clone() const {
+  Scene_polygon_soup* new_soup = new Scene_polygon_soup();
+  new_soup->soup = soup->clone();
+  new_soup->oriented = oriented;
+  return new_soup;
+}
+
+bool
+Scene_polygon_soup::load(std::istream& in)
+{
+  if(!soup)
+    soup = new Polygon_soup;
+  CGAL::File_scanner_OFF scanner(in);
+  soup->clear();
+  soup->points.resize(scanner.size_of_vertices());
+  soup->polygons.resize(scanner.size_of_facets());
+  for (std::size_t i = 0; i < scanner.size_of_vertices(); ++i) {
+    double x, y, z, w;
+    scanner.scan_vertex( x, y, z, w);
+    soup->points[i] = Point_3(x, y, z, w);
+    scanner.skip_to_next_vertex( i);
+  }
+  if(!in)
+    return false;
+
+  for (std::size_t i = 0; i < scanner.size_of_facets(); ++i) {
+    std::size_t no;
+    scanner.scan_facet( no, i);
+    soup->polygons[i].resize(no);
+    for(std::size_t j = 0; j < no; ++j) {
+      std::size_t id;
+      scanner.scan_facet_vertex_index(id, i);
+      if(id < scanner.size_of_vertices())
+      {
+        soup->polygons[i][j] = id;
+      }
+      else
+        return false;
+    }
+  }
+  soup->fill_edges();
+  oriented = false;
+  changed();
+  return ! in.fail();
+}
+
+void
+Scene_polygon_soup::setDisplayNonManifoldEdges(const bool b)
+{
+  soup->display_non_manifold_edges = b;
+  changed();
+}
+
+bool
+Scene_polygon_soup::displayNonManifoldEdges() const {
+  return soup->display_non_manifold_edges;
+}
+
+void Scene_polygon_soup::shuffle_orientations()
+{
+  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    if(std::rand() % 2 == 0) soup->inverse_orientation(i);
+  }
+  soup->fill_edges();
+  changed();
+}
+
+void Scene_polygon_soup::inside_out()
+{
+  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    soup->inverse_orientation(i);
+  }
+  soup->fill_edges();
+  changed();
+}
+
+bool 
+Scene_polygon_soup::orient()
+{
+  typedef Polygon_soup::Polygons::size_type size_type;
+  typedef Polygon_soup::Edges_map Edges;
+
+  if(isEmpty() || this->oriented)
+    return true; // nothing to do
+
+  Polygon_soup::Polygons& polygons = soup->polygons;
+  Polygon_soup::Edges_map& edges = soup->edges;
+
+  std::vector<bool> oriented;
+  std::stack<std::size_t> stack;
+  using std::make_pair;
+
+  // no polygon is oriented
+  oriented.resize(polygons.size());
+
+  size_type polygon_index = 0;
+  bool success = true;
+
+  while (polygon_index != polygons.size()) 
+  {
+    while ( polygon_index != polygons.size() && oriented[polygon_index] ) {
+      ++polygon_index;
+    }
+    if(polygon_index == polygons.size()) break;
+
+//     qDebug() << tr("Seed %1...\n").arg(polygon_index);
+    oriented[polygon_index] = true;
+    stack.push(polygon_index);
+    while(! stack.empty() )
+    {
+      const size_type to_be_oriented_index = stack.top();
+//       qDebug() << tr("polygon #%1").arg(to_be_oriented_index);
+      stack.pop();
+      const size_type size = polygons[to_be_oriented_index].size();
+      for(size_type ih = 0 ; ih < size ; ++ih) {
+        size_type ihp1 = ih+1;
+        if(ihp1>=size) ihp1 = 0;
+        const std::size_t& i1 = polygons[to_be_oriented_index][ih];
+        const std::size_t& i2 = polygons[to_be_oriented_index][ihp1];
+
+//         qDebug() << tr("edge %3-%4 (%1,%2)").arg(i1).arg(i2).arg(ih).arg(ihp1);
+        // edge (i1,i2)
+        Edges::iterator it_same_orient = edges.find(make_pair(i1, i2));
+        // edges (i2,i1)
+        Edges::iterator it_other_orient = edges.find(make_pair(i2, i1));
+
+        CGAL_assertion(it_same_orient != edges.end());
+        if(it_same_orient->second.size() > 1) {
+          if((it_other_orient != edges.end() && it_other_orient->second.size() > 0) ||
+             it_same_orient->second.size() > 2) {
+            // three polygons at the edge
+//             qDebug() << "three polygons at the edge";
+            success = false; // non-orientable
+          }
+          {
+            // one neighbor polyhedron, opposite orientation
+            size_type index = *(it_same_orient->second.begin());
+            if(index == to_be_oriented_index)
+              index = *(++it_same_orient->second.begin());
+            if(oriented[index]) {
+//               qDebug() << tr("neighbor polygon #%1 is already oriented, but in opposite orientation").arg(index);
+              success = false; // non-orientable
+              continue; // next edge
+            }
+   
+            // reverse the orientation
+            const size_type size = polygons[index].size();
+            for(size_type j = 0; j < size; ++j) {
+              const std::size_t& i0 = polygons[index][j];
+              const std::size_t& i1 = polygons[index][ j+1 < size ? j+1: 0];
+              CGAL_assertion_code(const bool r = )
+                edges[std::make_pair(i0, i1)].erase(index);
+              CGAL_assertion(r);
+            }
+            soup->inverse_orientation(index);
+            for(size_type j = 0; j < size; ++j) {
+              const std::size_t& i0 = polygons[index][j];
+              const std::size_t& i1 = polygons[index][ j+1 < size ? j+1: 0];
+              edges[std::make_pair(i0, i1)].insert(index);
+            }
+//             qDebug() << tr("inverse the orientation of polygon #%1\n").arg(index);
+            oriented[index] = true;
+            stack.push(index);
+          }
+        }
+        else if(it_other_orient != edges.end() && it_other_orient->second.size() == 1) {
+          // one polygon, same orientation
+          const size_type index = *(it_other_orient->second.begin());
+          if(oriented[index])
+            continue;
+          oriented[index] = true;
+//           qDebug() << tr("keep the orientation of polygon #%1\n").arg(index);
+          stack.push(index);
+        }
+        else {
+//           qDebug() << "else" << it_same_orient->second.size() << it_other_orient->second.size();
+          success = false; // non-orientable
+        }
+      } // end for on all edges of one 
+    } // end while loop on the polygons of the connected component
+  } // end while loop on all non-oriented polygons remaining 
+  return success;
+}
+
+
+bool 
+Scene_polygon_soup::save(std::ostream& out) const
+{
+  typedef Polygon_soup::size_type size_type;
+  CGAL::File_writer_OFF writer(true); // verbose
+  writer.write_header(out,
+                      soup->points.size(),
+                      0,
+                      soup->polygons.size());
+  for(size_type i = 0, end = soup->points.size();
+      i < end; ++i)
+  {
+    const Point_3& p = soup->points[i];
+    writer.write_vertex( p.x(), p.y(), p.z() );
+  }
+  writer.write_facet_header();
+  for(size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    const Polygon_soup::Polygon_3& polygon = soup->polygons[i]; 
+    const size_type size = polygon.size();
+    writer.write_facet_begin(size);
+    for(size_type j = 0; j < size; ++j) {
+      writer.write_facet_vertex_index(polygon[j]);
+    }
+    writer.write_facet_end();
+  }
+  writer.write_footer();
+
+  return ! out.fail();
+}
+
+QString 
+Scene_polygon_soup::toolTip() const
+{
+  if(!soup)
+    return QString();
+
+  return QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
+                     "<i>Polygons soup</i></p>"
+                     "<p>Number of vertices: %2<br />"
+                     "Number of polygons: %3</p>")
+    .arg(this->name())
+    .arg(soup->points.size())
+    .arg(soup->polygons.size())
+    .arg(this->renderingModeName())
+    .arg(this->color().name());
+}
+
+bool
+Scene_polygon_soup::isEmpty() const {
+  return (soup == 0 || soup->points.empty());
+}
+
+Scene_polygon_soup::Bbox
+Scene_polygon_soup::bbox() const {
+  const Point_3& p = *(soup->points.begin());
+  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+  for(Polygon_soup::Points::const_iterator it = soup->points.begin();
+      it != soup->points.end();
+      ++it) {
+    bbox = bbox + it->bbox();
+  }
+  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+              bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+void Scene_polygon_soup::changed()
+{
+   // Scene_item::changed();
+    compute_elements();
+    are_buffers_initialized = false;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.h
new file mode 100644
index 0000000..2e865ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup.h
@@ -0,0 +1,81 @@
+#ifndef SCENE_POLYGON_SOUP_H
+#define SCENE_POLYGON_SOUP_H
+
+#include "Scene_polygon_soup_config.h"
+#include <CGAL_demo/Scene_item.h>
+#include <iostream>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+struct Polygon_soup;
+
+class SCENE_POLYGON_SOUP_EXPORT Scene_polygon_soup 
+  : public Scene_item
+{
+  Q_OBJECT
+public:  
+  Scene_polygon_soup();
+  ~Scene_polygon_soup();
+
+  Scene_polygon_soup* clone() const;
+  bool load(std::istream& in);
+  bool save(std::ostream& out) const;
+
+  QString toolTip() const;
+
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud; } // CHECK THIS!
+  // OpenGL drawing in a display list
+  void draw(Viewer*) const;
+  void draw_edges(Viewer*) const;
+  void draw_points(Viewer*) const;
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  Bbox bbox() const;
+
+  void shuffle_orientations();
+  bool orient();
+  void inside_out();
+
+  void setDisplayNonManifoldEdges(const bool);
+  bool displayNonManifoldEdges() const;
+private:
+  Polygon_soup* soup;
+  bool oriented;
+
+
+  static const int vaoSize = 3;
+  static const int vboSize = 6;
+
+  mutable int poly_vertexLocation[1];
+  mutable int normalsLocation[1];
+  mutable int mvpLocation[1];
+  mutable int mvLocation[1];
+  mutable int colorLocation[1];
+  mutable int lightLocation[5];
+  mutable int twosideLocation;
+
+  std::vector<float> v_poly;
+  std::vector<float> v_edge;
+  std::vector<float> v_points;
+  std::vector<float> normal;
+  std::vector<float> vertex_nm;
+
+  mutable bool are_buffers_initialized;
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void initialize_buffers() const;
+  void compute_elements();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+
+public Q_SLOTS:
+  void changed();
+
+}; // end class Scene_polygon_soup
+
+#endif // SCENE_POLYGON_SOUP_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polygon_soup_config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polygon_soup_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp
new file mode 100644
index 0000000..7ae72f3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp
@@ -0,0 +1,465 @@
+#include "config.h"
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <QObject>
+
+
+Scene_polyhedron_item::Scene_polyhedron_item()
+  : Scene_item(),
+    poly(new Polyhedron)
+{
+    are_buffers_initialized = false;
+    compile_shaders();
+}
+
+Scene_polyhedron_item::Scene_polyhedron_item(Polyhedron* const p)
+  : Scene_item(),
+    poly(p)
+{
+    are_buffers_initialized = false;
+    compile_shaders();
+}
+
+Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p)
+  : Scene_item(),
+    poly(new Polyhedron(p))
+{
+    are_buffers_initialized = false;
+    compile_shaders();
+}
+
+Scene_polyhedron_item::~Scene_polyhedron_item()
+{
+  for(int i=0; i<vboSize; i++)
+      buffers[i].destroy();
+  for(int i=0; i<vaoSize; i++)
+      vao[i].destroy();
+  delete poly;
+}
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_polyhedron_item::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform vec4 color; \n"
+        "uniform bool is_two_side; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N; \n"
+        "   if(fN == vec3(0.0,0.0,0.0)) \n"
+        "       N = vec3(0.0,0.0,0.0); \n"
+        "   else \n"
+        "       N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse; \n"
+        "   if(!is_two_side) \n"
+        "       diffuse = max(dot(N,L),0) * light_diff*color; \n"
+        "   else \n"
+        "       diffuse = max(abs(dot(N,L)),0) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+         "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    rendering_program.bindAttributeLocation("vertex", 0);
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Scene_polyhedron_item::compute_elements()
+{
+
+    v_poly.resize(0);
+    v_edge.resize(0);
+    normal_flat.resize(0);
+    normal_smooth.resize(0);
+    Polyhedron& polyhedron =*poly;
+    //FACETS
+
+    typedef Polyhedron::Traits	    Kernel;
+    typedef Kernel::Point_3	    Point;
+    typedef Kernel::Vector_3	    Vector;
+    typedef Polyhedron::Facet_iterator Facet_iterator;
+    typedef Polyhedron::Halfedge_around_facet_circulator HF_circulator;
+
+
+
+    Facet_iterator f;
+    for(f = polyhedron.facets_begin();
+      f != polyhedron.facets_end();
+      f++)
+    {
+
+      // If Flat shading: 1 normal per polygon
+
+        Vector n = CGAL::Polygon_mesh_processing::compute_face_normal(f, polyhedron);
+
+        normal_flat.push_back(n.x()); normal_flat.push_back(n.y()); normal_flat.push_back(n.z());
+        normal_flat.push_back(n.x()); normal_flat.push_back(n.y()); normal_flat.push_back(n.z());
+        normal_flat.push_back(n.x()); normal_flat.push_back(n.y()); normal_flat.push_back(n.z());
+
+
+      // revolve around current face to get vertices
+      HF_circulator he = f->facet_begin();
+      HF_circulator end = he;
+      CGAL_For_all(he,end)
+      {
+
+          Vector n = CGAL::Polygon_mesh_processing::compute_vertex_normal(he->vertex(), polyhedron);
+          normal_smooth.push_back(n.x()); normal_smooth.push_back(n.y()); normal_smooth.push_back(n.z());
+
+        const Point& p = he->vertex()->point();
+        v_poly.push_back(p.x()); v_poly.push_back(p.y()); v_poly.push_back(p.z());
+      }
+    }
+
+    //EDGES
+
+    typedef Polyhedron::Edge_iterator	Edge_iterator;
+
+
+    Edge_iterator he;
+    for(he = polyhedron.edges_begin();
+      he != polyhedron.edges_end();
+      he++)
+    {
+      const Point& a = he->vertex()->point();
+      const Point& b = he->opposite()->vertex()->point();
+      v_edge.push_back(a.x()); v_edge.push_back(a.y()); v_edge.push_back(a.z());
+      v_edge.push_back(b.x()); v_edge.push_back(b.y()); v_edge.push_back(b.z());
+    }
+
+}
+
+void Scene_polyhedron_item::initialize_buffers() const
+{
+    rendering_program.bind();
+
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(v_poly.data(), static_cast<int>(v_poly.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+
+        buffers[1].bind();
+        buffers[1].allocate(normal_flat.data(), static_cast<int>(normal_flat.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+
+        vao[0].release();
+
+        vao[1].bind();
+        buffers[2].bind();
+        buffers[2].allocate(v_poly.data(), static_cast<int>(v_poly.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+
+        buffers[3].bind();
+        buffers[3].allocate(normal_smooth.data(), static_cast<int>(normal_smooth.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[3].release();
+
+        vao[1].release();
+
+        vao[2].bind();
+        buffers[4].bind();
+        buffers[4].allocate(v_edge.data(), static_cast<int>(v_edge.size()*sizeof(float)));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[4].release();
+        std::vector<float> empty_array;
+        empty_array.resize(0);
+        for(std::size_t i=0; i<v_edge.size(); i++)
+            empty_array.push_back(0.0);
+        buffers[5].bind();
+        buffers[5].allocate(empty_array.data(), static_cast<int>(empty_array.size()*sizeof(float)));
+        normalsLocation[0] = rendering_program.attributeLocation("normal");
+        rendering_program.enableAttributeArray(normalsLocation[0]);
+        rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[5].release();
+
+        vao[2].release();
+        rendering_program.release();
+        are_buffers_initialized = true;
+
+}
+
+void Scene_polyhedron_item::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    GLboolean isTwoSide;
+    viewer->glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE,&isTwoSide);
+    // define material
+     QVector4D	ambient;
+     QVector4D	diffuse;
+     QVector4D	specular;
+     GLfloat      shininess ;
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.0f;
+    specular[1] = 0.0f;
+    specular[2] = 0.0f;
+    specular[3] = 0.0f;
+    // Shininess
+    shininess = 51.2f;
+
+
+    rendering_program.bind();
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    twosideLocation = rendering_program.uniformLocation("is_two_side");
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(twosideLocation, isTwoSide);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program.release();
+}
+
+// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+void Scene_polyhedron_item::draw(Viewer* viewer) const {
+    viewer->makeCurrent();
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+    GLint shading;
+    viewer->glGetIntegerv(GL_SHADE_MODEL, &shading);
+    if(shading == GL_FLAT)
+        vao[0].bind();
+    else if(shading == GL_SMOOTH)
+        vao[1].bind();
+    else
+        return;
+    attrib_buffers(viewer);
+
+    rendering_program.bind();
+    float current_color[4];
+    viewer->glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    rendering_program.setUniformValue(colorLocation[0], color);
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(v_poly.size()/3));
+    rendering_program.release();
+    if(shading == GL_FLAT)
+        vao[0].release();
+    else if(shading == GL_SMOOTH)
+        vao[1].release();
+
+
+}
+void Scene_polyhedron_item::draw_edges(Viewer* viewer) const {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+
+    vao[2].bind();
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    float current_color[4];
+    viewer->glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    rendering_program.setUniformValue(colorLocation[0], color);
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_edge.size()/3));
+    rendering_program.release();
+    vao[2].release();
+
+}
+void Scene_polyhedron_item::draw_points(Viewer* viewer) const {
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QColor color;
+
+    vao[0].bind();
+    attrib_buffers(viewer);
+    rendering_program.bind();
+    float current_color[4];
+    viewer->glGetFloatv(GL_CURRENT_COLOR, current_color);
+    color.setRgbF(current_color[0],current_color[1],current_color[2],current_color[3]);
+    rendering_program.setUniformValue(colorLocation[0], color);
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(v_poly.size()/3));
+    rendering_program.release();
+    vao[0].release();
+}
+
+Scene_polyhedron_item* 
+Scene_polyhedron_item::clone() const {
+  return new Scene_polyhedron_item(*poly);
+}
+
+// Load polyhedron from .OFF file
+bool
+Scene_polyhedron_item::load(std::istream& in)
+{
+  in >> *poly;
+  changed();
+  return in && !isEmpty();
+}
+
+// Write polyhedron to .OFF file
+bool 
+Scene_polyhedron_item::save(std::ostream& out) const
+{
+  out << *poly;
+  return (bool) out;
+}
+
+QString 
+Scene_polyhedron_item::toolTip() const
+{
+  if(!poly)
+    return QString();
+
+  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
+                     "<p>Number of vertices: %2<br />"
+                     "Number of edges: %3<br />"
+                     "Number of facets: %4</p>")
+    .arg(this->name())
+    .arg(poly->size_of_vertices())
+    .arg(poly->size_of_halfedges()/2)
+    .arg(poly->size_of_facets())
+    .arg(this->renderingModeName())
+    .arg(this->color().name());
+}
+
+
+
+Polyhedron* 
+Scene_polyhedron_item::polyhedron()       { return poly; }
+const Polyhedron* 
+Scene_polyhedron_item::polyhedron() const { return poly; }
+
+bool
+Scene_polyhedron_item::isEmpty() const {
+  return (poly == 0) || poly->empty();
+}
+
+Scene_polyhedron_item::Bbox
+Scene_polyhedron_item::bbox() const {
+  const Point& p = *(poly->points_begin());
+  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+  for(Polyhedron::Point_iterator it = poly->points_begin();
+      it != poly->points_end();
+      ++it) {
+    bbox = bbox + it->bbox();
+  }
+  return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+              bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+void Scene_polyhedron_item::changed()
+{
+    compute_elements();
+    are_buffers_initialized = false;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.h
new file mode 100644
index 0000000..eaece80
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item.h
@@ -0,0 +1,85 @@
+#ifndef SCENE_POLYHEDRON_ITEM_H
+#define SCENE_POLYHEDRON_ITEM_H
+
+#include "Scene_polyhedron_item_config.h"
+#include <CGAL_demo/Scene_item.h>
+#include "Polyhedron_type_fwd.h"
+#include <iostream>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+// This class represents a polyhedron in the OpenGL scene
+class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item 
+  : public Scene_item{
+  Q_OBJECT
+public:  
+  Scene_polyhedron_item();
+//   Scene_polyhedron_item(const Scene_polyhedron_item&);
+  Scene_polyhedron_item(const Polyhedron& p);
+  Scene_polyhedron_item(Polyhedron* const p);
+  ~Scene_polyhedron_item();
+
+  Scene_polyhedron_item* clone() const;
+  
+  // IO
+  bool load(std::istream& in);
+  bool save(std::ostream& out) const;
+
+  // Function for displaying meta-data of the item
+  virtual QString toolTip() const;
+
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode) const { return true; }
+  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+  virtual void draw(Viewer*) const ;
+  virtual void draw_edges(Viewer*) const ;
+  virtual void draw_points(Viewer*) const ;
+
+  // Get wrapped polyhedron
+  Polyhedron*       polyhedron();
+  const Polyhedron* polyhedron() const;
+
+  // Get dimensions
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  Bbox bbox() const;
+
+private:
+  Polyhedron* poly;
+  mutable
+  bool are_buffers_initialized;
+
+  static const int vaoSize = 3;
+  static const int vboSize = 6;
+  mutable int poly_vertexLocation[1];
+  mutable int normalsLocation[1];
+  mutable int mvpLocation[1];
+  mutable int mvLocation[1];
+  mutable int colorLocation[1];
+  mutable int lightLocation[5];
+  mutable int twosideLocation;
+
+   std::vector<float> v_poly;
+   std::vector<float> v_edge;
+   std::vector<float> v_points;
+   std::vector<float> normal_flat;
+   std::vector<float> normal_smooth;
+   std::vector<float> vertex_nm;
+
+
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void initialize_buffers() const;
+  void compute_elements();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+
+public Q_SLOTS:
+    void changed();
+
+}; // end class Scene_polyhedron_item
+
+#endif // SCENE_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_polyhedron_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.cpp
new file mode 100644
index 0000000..a8d3c81
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.cpp
@@ -0,0 +1,917 @@
+#include "config.h"
+
+#include "Scene_segmented_image_item.h"
+#include "Image_type.h"
+#include <QColor>
+#include <map>
+#include <CGAL/gl.h>
+#include <CGAL/ImageIO.h>
+#include <CGAL/use.h>
+
+
+
+// -----------------------------------
+// Internal classes
+// -----------------------------------
+namespace internal {
+
+class Image_accessor
+{
+public:
+  Image_accessor(const Image& im, int dx=1, int dy=1, int dz=1);
+  
+  bool is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const;
+  const QColor& vertex_color(std::size_t i, std::size_t j, std::size_t k) const;
+  void normal(std::size_t i, std::size_t j, std::size_t k,
+              float& x, float& y, float& z) const;
+  
+  int dx() const { return dx_; }
+  int dy() const { return dy_; }
+  int dz() const { return dz_; }
+  std::size_t xdim() const { return im_.xdim(); }
+  std::size_t ydim() const { return im_.ydim(); }
+  std::size_t zdim() const { return im_.zdim(); }
+  double vx() const { return im_.vx(); }
+  double vy() const { return im_.vy(); }
+  double vz() const { return im_.vz(); }
+  
+private:
+  unsigned char non_null_neighbor_data(std::size_t i,
+                                       std::size_t j,
+                                       std::size_t k) const;
+  
+  unsigned char image_data(std::size_t i, std::size_t j, std::size_t k) const;
+  
+  void add_to_normal(unsigned char v,
+                     float& x, float& y, float& z,
+                     int dx, int dy, int dz) const;
+  
+private:
+  const Image& im_;
+  int dx_, dy_, dz_;
+  const QColor default_color_;
+  std::map<unsigned char, QColor> colors_;
+};
+
+
+Image_accessor::Image_accessor(const Image& im, int dx, int dy, int dz)
+: im_(im)
+, dx_(dx)
+, dy_(dy)
+, dz_(dz)
+, default_color_()
+, colors_()
+{
+  const std::size_t xdim = im_.xdim();
+  const std::size_t ydim = im_.ydim();
+  const std::size_t zdim = im_.zdim();  
+  
+  for(std::size_t i=0 ; i<xdim ; i+=dx_)
+  { 
+    for(std::size_t j=0 ; j<ydim ; j+=dy_)
+    { 
+      for(std::size_t k=0 ; k<zdim ; k+=dz_)
+      {
+        unsigned char c = image_data(i,j,k);
+        if ( 0 != c ) { colors_.insert(std::make_pair(c,QColor())); }
+      }
+    }
+  }
+  
+  int i=0;
+  const double starting_hue = 45./360.; // magenta
+  for ( std::map<unsigned char, QColor>::iterator it = colors_.begin(),
+       end = colors_.end() ; it != end ; ++it, ++i )
+  {
+    double hue =  starting_hue + 1./colors_.size() * i;
+    if ( hue > 1. ) { hue -= 1.; }
+    it->second = QColor::fromHsvF(hue, .75, .75);
+  }
+}
+
+bool 
+Image_accessor::
+is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char v1 = image_data(i-dx_, j-dy_, k-dz_);
+  unsigned char v2 = image_data(i-dx_, j-dy_, k  );
+  unsigned char v3 = image_data(i-dx_, j    , k-dz_);
+  unsigned char v4 = image_data(i-dx_, j    , k  );
+  unsigned char v5 = image_data(i    , j-dy_, k-dz_);
+  unsigned char v6 = image_data(i    , j-dy_, k  );
+  unsigned char v7 = image_data(i    , j    , k-dz_);
+  unsigned char v8 = image_data(i    , j    , k  );
+  
+  // don't draw interior vertices
+  if ( v1 != 0 && v2 != 0 && v3 != 0 && v4 != 0 && 
+       v5 != 0 && v6 != 0 && v7 != 0 && v8 != 0 )
+  {
+    return false;
+  }
+  
+  return ( v1 != 0 || v2 != 0 || v3 != 0 || v4 != 0 || 
+           v5 != 0 || v6 != 0 || v7 != 0 || v8 != 0 ); 
+}
+
+const QColor&
+Image_accessor::vertex_color(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char c = non_null_neighbor_data(i,j,k);
+  if ( 0 == c ) { return default_color_; }
+  
+  std::map<unsigned char, QColor>::const_iterator color = colors_.find(c);
+  if ( colors_.end() == color ) { return default_color_; }
+  
+  return color->second;
+}
+
+unsigned char
+Image_accessor::image_data(std::size_t i, std::size_t j, std::size_t k) const
+{
+  if ( i<im_.xdim() && j<im_.ydim() && k<im_.zdim() )
+    return CGAL::IMAGEIO::static_evaluate<unsigned char>(im_.image(),i,j,k);
+  else
+    return 0;
+}
+
+unsigned char
+Image_accessor::
+non_null_neighbor_data(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i-dx_, j-dy_, k  );
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i-dx_, j    , k-dz_);
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i-dx_, j    , k  );
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i    , j-dy_, k-dz_);
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i    , j-dy_, k  );
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i    , j    , k-dz_);
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i    , j    , k  );
+  if ( v != 0 ) { return v; }
+  
+  return 0;
+}
+
+void
+Image_accessor::
+normal(std::size_t i, std::size_t j, std::size_t k,
+       float& x, float& y, float& z) const
+{
+  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
+  add_to_normal(v,x,y,z,       1    , 1    , 1);
+  
+  v = image_data(        i-dx_, j-dy_, k);
+  add_to_normal(v,x,y,z, 1    , 1    , -1);
+  
+  v = image_data(        i-dx_, j    , k-dz_);
+  add_to_normal(v,x,y,z, 1    , -1   , 1);
+  
+  v = image_data(        i-dx_, j    , k  );
+  add_to_normal(v,x,y,z, 1    , -1   , -1);
+  
+  v = image_data(        i    , j-dy_, k-dz_);
+  add_to_normal(v,x,y,z, -1   , 1    , 1);
+  
+  v = image_data(        i    , j-dy_, k  );
+  add_to_normal(v,x,y,z, -1   , 1    , -1);
+  
+  v = image_data(        i    , j    , k-dz_);
+  add_to_normal(v,x,y,z, -1   , -1   , 1);
+  
+  v = image_data(        i    , j    , k);
+  add_to_normal(v,x,y,z, -1   , -1   , -1);
+}
+
+void
+Image_accessor::
+add_to_normal(unsigned char v,
+              float& x, float& y, float& z,
+              int dx, int dy, int dz) const
+{
+  if ( 0 != v )
+  {
+    x += dx;
+    y += dy;
+    z += dz;    
+  }
+}
+
+
+
+class Vertex_buffer_helper
+{
+public:
+  Vertex_buffer_helper(const Image_accessor& data);
+  ~Vertex_buffer_helper();
+  
+  void fill_buffer_data();
+
+  const GLfloat* colors() const { return color_array_; }
+  const GLfloat* normals() const { return normal_array_; }
+  const GLfloat* vertices() const { return vertex_array_; }
+  const GLuint* quads() const { return quad_array_; }
+  
+  std::size_t color_size() const { return color_size_*sizeof(GLfloat); }
+  std::size_t normal_size() const { return normal_size_*sizeof(GLfloat); }
+  std::size_t vertex_size() const { return vertex_size_*sizeof(GLfloat); }
+  std::size_t quad_size() const { return quad_size_*sizeof(GLuint); }
+  
+private:
+  void treat_vertex(std::size_t i, std::size_t j, std::size_t k);
+  
+  void push_color(std::size_t i, std::size_t j, std::size_t k);
+  void push_normal(std::size_t i, std::size_t j, std::size_t k);
+  void push_vertex(std::size_t i, std::size_t j, std::size_t k);
+  void push_quads(std::size_t i, std::size_t j, std::size_t k);
+  void push_quad(int pos1, int pos2, int pos3, int pos4);
+  
+  int compute_position(std::size_t i, std::size_t j, std::size_t k) const;
+  int vertex_index(std::size_t i, std::size_t j, std::size_t k) const;
+  
+  void create_arrays();
+  
+  template <typename T>
+  void create_array(T*& destination, std::size_t& size, const std::vector<T>& source);
+  
+  int dx() const { return data_.dx(); }
+  int dy() const { return data_.dy(); }
+  int dz() const { return data_.dz(); }
+  
+private:
+  static int vertex_not_found_;
+  
+  const Image_accessor& data_;
+  typedef std::map<int, std::size_t> Indices;
+  Indices indices_;
+  std::vector<GLfloat> colors_, normals_, vertices_;
+  std::vector<GLuint> quads_;
+  
+  GLfloat *color_array_, *normal_array_, *vertex_array_;
+  GLuint* quad_array_;
+  std::size_t color_size_, normal_size_, vertex_size_, quad_size_;
+};
+
+int Vertex_buffer_helper::vertex_not_found_ = -1;
+
+Vertex_buffer_helper::
+Vertex_buffer_helper(const Image_accessor& data)
+: data_(data)
+, color_array_(NULL)
+, normal_array_(NULL)
+, vertex_array_(NULL)
+, quad_array_(NULL)
+, color_size_(0)
+, normal_size_(0)
+, vertex_size_(0)
+, quad_size_(0)
+{
+}
+
+Vertex_buffer_helper::
+~Vertex_buffer_helper()
+{
+  delete[] color_array_;
+  delete[] normal_array_;
+  delete[] vertex_array_;
+  delete[] quad_array_;
+}
+
+void
+Vertex_buffer_helper::
+fill_buffer_data()
+{
+  std::size_t i,j,k;
+  
+  for ( i = 0 ; i <= data_.xdim() ; i+=dx() )
+  {  
+    for ( j = 0 ; j <= data_.ydim() ; j+=dy() )
+    {   
+      for ( k = 0 ; k <= data_.zdim() ; k+=dz() )
+      {
+        treat_vertex(i,j,k);
+      }
+    }
+  }
+  
+  create_arrays();
+}
+
+void
+Vertex_buffer_helper::treat_vertex(std::size_t i, std::size_t j, std::size_t k)
+{
+  if ( data_.is_vertex_active(i,j,k) )
+  {
+    push_vertex(i,j,k);
+    push_color(i,j,k);
+    push_normal(i,j,k);
+    push_quads(i,j,k);    
+  }
+}
+
+void
+Vertex_buffer_helper::push_color(std::size_t i, std::size_t j, std::size_t k)
+{
+  const QColor& color = data_.vertex_color(i,j,k);
+  if ( ! color.isValid() ) { return; }
+  
+  colors_.push_back(color.red()/255.f);
+  colors_.push_back(color.green()/255.f);
+  colors_.push_back(color.blue()/255.f);
+}
+
+void
+Vertex_buffer_helper::push_normal(std::size_t i, std::size_t j, std::size_t k)
+{
+  float x=0.f, y=0.f, z=0.f;
+  data_.normal(i,j,k,x,y,z);
+  
+  float norm = std::sqrt(x*x+y*y+z*z);
+  x = x / norm;
+  y = y / norm;
+  z = z / norm;
+  
+  normals_.push_back(x);
+  normals_.push_back(y);
+  normals_.push_back(z);
+}
+
+void
+Vertex_buffer_helper::push_vertex(std::size_t i, std::size_t j, std::size_t k)
+{
+  indices_.insert(std::make_pair(compute_position(i,j,k),
+                                 vertices_.size()/3)); 
+  
+  vertices_.push_back(i*data_.vx());
+  vertices_.push_back(j*data_.vy());
+  vertices_.push_back(k*data_.vz());
+
+}
+
+void
+Vertex_buffer_helper::push_quads(std::size_t i, std::size_t j, std::size_t k)
+{
+  int pos1 = vertex_index(i-dx(), j     , k);
+  int pos2 = vertex_index(i-dx(), j-dy(), k);
+  int pos3 = vertex_index(i     , j-dy(), k);
+  int pos4 = vertex_index(i     ,j      , k);
+  push_quad(pos1, pos2, pos3, pos4);
+  
+  pos1 = vertex_index(i-dx(), j, k);
+  pos2 = vertex_index(i-dx(), j, k-dz());
+  pos3 = vertex_index(i     , j, k-dz());
+  push_quad(pos1, pos2, pos3, pos4);
+
+  pos1 = vertex_index(i, j-dy(), k);
+  pos2 = vertex_index(i, j-dy(), k-dz());
+  pos3 = vertex_index(i, j     , k-dz());
+  push_quad(pos1, pos2, pos3, pos4);
+}
+
+void
+Vertex_buffer_helper::push_quad(int pos1, int pos2, int pos3, int pos4)
+{
+  if (   pos1 != vertex_not_found_
+      && pos2 != vertex_not_found_
+      && pos3 != vertex_not_found_ )
+  {
+    quads_.push_back(pos1);
+    quads_.push_back(pos2);
+    quads_.push_back(pos3);
+    quads_.push_back(pos1);
+    quads_.push_back(pos3);
+    quads_.push_back(pos4);
+  }
+}
+
+int
+Vertex_buffer_helper::
+compute_position(std::size_t i, std::size_t j, std::size_t k) const
+{
+  return  static_cast<int>(
+    i/dx() * (data_.ydim()/dy()+1) * (data_.zdim()/dz()+1)
+         + j/dy() * (data_.zdim()/dz()+1)
+         + k/dz());
+}
+
+int
+Vertex_buffer_helper::
+vertex_index(std::size_t i, std::size_t j, std::size_t k) const
+{
+  if ( i > data_.xdim() || j > data_.ydim() || k > data_.zdim() )
+  {
+    return vertex_not_found_;
+  }
+  
+  int vertex_key = compute_position(i,j,k);
+  Indices::const_iterator it = indices_.find(vertex_key);
+  if ( it != indices_.end() )
+  {
+    return static_cast<int>(it->second);
+  }
+  
+  return vertex_not_found_;
+}
+
+
+void
+Vertex_buffer_helper::
+create_arrays()
+{
+  create_array(color_array_, color_size_, colors_);
+  create_array(normal_array_, normal_size_, normals_);
+  create_array(vertex_array_, vertex_size_, vertices_);
+  create_array(quad_array_, quad_size_, quads_);
+}
+
+template <typename T>
+void
+Vertex_buffer_helper::
+create_array(T*& destination, std::size_t& size, const std::vector<T>& source)
+{
+  size = source.size();
+  destination = new T[size];
+  
+  int i=0;
+  for ( typename std::vector<T>::const_iterator it = source.begin(),
+       end = source.end() ; it != end ; ++it )
+  {
+    destination[i++] = *it;
+  }
+}
+  
+} // namespace internal
+
+
+// -----------------------------------
+// Scene_segmented_image_item
+// -----------------------------------
+Scene_segmented_image_item::Scene_segmented_image_item(Image* im,
+                                                       int display_scale)
+  : m_image(im)
+  , m_initialized(false)
+  , m_voxel_scale(display_scale)
+
+{
+  CGAL_USE(display_scale);
+
+  v_box = new std::vector<float>();
+  compile_shaders();
+  initialize_buffers();
+  setRenderingMode(Flat);
+}
+
+
+Scene_segmented_image_item::~Scene_segmented_image_item()
+{
+    for(int i=0; i<vboSize; i++)
+        m_vbo[i].destroy();
+    for(int i=0; i<vaoSize; i++)
+        vao[i].destroy();
+}
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_segmented_image_item::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        m_vbo[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+    m_ibo = new QOpenGLBuffer(QOpenGLBuffer::IndexBuffer);
+    m_ibo->create();
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 inColor;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying highp vec4 color; \n"
+        "void main(void)\n"
+        "{\n"
+        "   color=inColor; \n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying highp vec4 color; \n"
+        "uniform bool is_two_side; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N; \n"
+        "   if(fN == vec3(0.0,0.0,0.0)) \n"
+        "       N = vec3(0.0,0.0,0.0); \n"
+        "   else \n"
+        "       N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse; \n"
+        "   if(!is_two_side) \n"
+        "       diffuse = max(dot(N,L),0) * light_diff*color; \n"
+        "   else \n"
+        "       diffuse = max(abs(dot(N,L)),0) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+         "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Scene_segmented_image_item::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    GLboolean isTwoSide;
+    viewer->glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE,&isTwoSide);
+    // define material
+     QVector4D	ambient;
+     QVector4D	diffuse;
+     QVector4D	specular;
+     GLfloat      shininess ;
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.0f;
+    specular[1] = 0.0f;
+    specular[2] = 0.0f;
+    specular[3] = 0.0f;
+    // Shininess
+    shininess = 51.2f;
+
+
+    rendering_program.bind();
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    twosideLocation = rendering_program.uniformLocation("is_two_side");
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(twosideLocation, isTwoSide);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program.release();
+}
+
+Scene_segmented_image_item::Bbox
+Scene_segmented_image_item::bbox() const
+{
+  if(!m_image) return Bbox();
+  return Bbox(0, 0, 0,
+              m_image->xdim() * m_image->vx(),
+              m_image->ydim() * m_image->vy(),
+              m_image->zdim() * m_image->vz());
+}
+
+void
+Scene_segmented_image_item::draw(Viewer* viewer) const
+{
+  if(m_image)
+  {
+
+    //m_image->gl_draw_bbox(3.0f,0,0,0);
+    draw_gl(viewer);
+  }
+}
+
+QString
+Scene_segmented_image_item::toolTip() const
+{
+  return tr("<p>Image <b>%1</b></p>"
+            "<p>Word type: %2</p>"
+            "<p>Dimensions: %3 x %4 x %5</p>"
+            "<p>Spacings: ( %6 , %7 , %8 )</p>")
+    .arg(this->name())
+    .arg("...")
+    .arg(m_image->xdim()) 
+    .arg(m_image->ydim())
+    .arg(m_image->zdim())
+    .arg(m_image->vx())
+    .arg(m_image->vy())
+    .arg(m_image->vz());
+}
+
+bool
+Scene_segmented_image_item::supportsRenderingMode(RenderingMode m) const
+{ 
+  switch ( m )
+  {
+    case Gouraud:
+      return false;
+      
+    case Points:
+    case Wireframe:
+    case Flat:
+    case FlatPlusEdges:
+      return true;
+      
+    default:
+      return false;
+  }
+  
+  return false;
+}
+
+void
+Scene_segmented_image_item::initialize_buffers() 
+{
+  internal::Image_accessor image_data_accessor (*m_image,
+                                                m_voxel_scale,
+                                                m_voxel_scale,
+                                                m_voxel_scale);
+  
+  internal::Vertex_buffer_helper helper (image_data_accessor);
+  helper.fill_buffer_data();
+
+  draw_Bbox(bbox(), v_box);
+  std::vector<float> nul_vec(0);
+  for(std::size_t i=0; i<v_box->size(); i++)
+      nul_vec.push_back(0.0);
+
+  rendering_program.bind();
+  vao[0].bind();
+  m_vbo[0].bind();
+  m_vbo[0].allocate(helper.vertices(), static_cast<int>(helper.vertex_size()));
+  poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+  rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+  m_vbo[0].release();
+
+  m_vbo[1].bind();
+  m_vbo[1].allocate(helper.normals(), static_cast<int>(helper.normal_size()));
+  normalsLocation[0] = rendering_program.attributeLocation("normal");
+  rendering_program.enableAttributeArray(normalsLocation[0]);
+  rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+  m_vbo[1].release();
+
+  m_vbo[2].bind();
+  m_vbo[2].allocate(helper.colors(), static_cast<int>(helper.color_size()));
+  colorLocation[0] = rendering_program.attributeLocation("inColor");
+  rendering_program.enableAttributeArray(colorLocation[0]);
+  rendering_program.setAttributeBuffer(colorLocation[0],GL_FLOAT,0,3);
+  m_vbo[2].release();
+
+  m_ibo->bind();
+  m_ibo->allocate(helper.quads(), static_cast<int>(helper.quad_size()));
+  vao[0].release();
+
+  color.resize(0);
+  for(std::size_t i=0; i<helper.color_size()/sizeof(GLuint); i++)
+      color.push_back(0.0);
+
+  vao[1].bind();
+  m_vbo[3].bind();
+  m_vbo[3].allocate(v_box->data(), static_cast<int>(v_box->size()*sizeof(float)));
+  poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+  rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+  m_vbo[3].release();
+
+  m_vbo[4].bind();
+  m_vbo[3].allocate(nul_vec.data(), static_cast<int>(nul_vec.size()*sizeof(float)));
+  normalsLocation[0] = rendering_program.attributeLocation("normal");
+  rendering_program.enableAttributeArray(normalsLocation[0]);
+  rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+  m_vbo[4].release();
+
+  m_vbo[5].bind();
+  m_vbo[5].allocate(nul_vec.data(), static_cast<int>(nul_vec.size()*sizeof(float)));
+  colorLocation[0] = rendering_program.attributeLocation("inColor");
+  rendering_program.enableAttributeArray(colorLocation[0]);
+  rendering_program.setAttributeBuffer(colorLocation[0],GL_FLOAT,0,3);
+  m_vbo[5].release();
+
+  m_ibo->bind();
+  vao[1].release();
+  rendering_program.release();
+
+  m_initialized = true;
+}
+
+
+void
+Scene_segmented_image_item::draw_gl(Viewer* viewer) const
+{
+  attrib_buffers(viewer);
+  rendering_program.bind();
+  vao[0].bind();
+  viewer->glDrawElements(GL_TRIANGLES, m_ibo->size()/sizeof(GLuint), GL_UNSIGNED_INT, 0);
+  vao[0].release();
+
+  vao[1].bind();
+  viewer->glLineWidth(3);
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_box->size()/3));
+  vao[1].release();
+  rendering_program.release();
+}
+
+GLint
+Scene_segmented_image_item::ibo_size() const
+{
+      m_ibo->bind();
+    GLint nb_elts = m_ibo->size();
+    m_ibo->release();
+
+    return nb_elts/sizeof(GLuint);
+
+  return 0;
+}
+
+void Scene_segmented_image_item::changed()
+{
+    initialize_buffers();
+}
+
+void Scene_segmented_image_item::draw_Bbox(Bbox bbox, std::vector<float> *vertices)
+{
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+}
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.h
new file mode 100644
index 0000000..4254458
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item.h
@@ -0,0 +1,83 @@
+#ifndef SCENE_SEGMENTED_IMAGE_ITEM_H
+#define SCENE_SEGMENTED_IMAGE_ITEM_H
+
+#include <CGAL_demo/Scene_item.h>
+#include <CGAL_demo/Scene_interface.h>
+#include "Image_type_fwd.h"
+#include "Scene_segmented_image_item_config.h"
+#include <CGAL/gl.h>
+
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+typedef CGAL::Image_3 Image;
+
+class SCENE_SEGMENTED_IMAGE_ITEM_EXPORT Scene_segmented_image_item 
+  : public Scene_item
+{
+  Q_OBJECT
+public:
+
+  Scene_segmented_image_item(Image* im, int drawing_scale);
+  ~Scene_segmented_image_item();
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  Bbox bbox() const;
+
+  Scene_segmented_image_item* clone() const { return NULL; }
+
+  // rendering mode
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+
+  // draw
+  virtual void direct_draw(Viewer* viewer) const { draw(viewer); }
+  virtual void direct_draw_edges(Viewer* viewer) const { draw_edges(viewer); }
+  virtual void draw(Viewer*) const;
+  virtual void draw_edges(Viewer* viewer) const { draw_gl(viewer); }
+  
+  virtual QString toolTip() const;
+  
+  const Image* image() const { return m_image; }
+
+private:
+  void draw_gl(Viewer* viewer) const;
+  
+  void initialize_buffers();
+  GLint ibo_size() const;
+  
+public:
+  Image* m_image;
+
+private:
+  bool m_initialized;
+#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
+  int m_voxel_scale;
+  static const int vaoSize = 2;
+  static const int vboSize = 6;
+  mutable int poly_vertexLocation[1];
+  mutable int normalsLocation[1];
+  mutable int mvpLocation[1];
+  mutable int mvLocation[1];
+  mutable int colorLocation[1];
+  mutable int lightLocation[5];
+  mutable int twosideLocation;
+
+   std::vector<float> *v_box;
+   std::vector<float> color;
+
+
+  mutable QOpenGLBuffer m_vbo[vboSize];
+  mutable QOpenGLBuffer *m_ibo;
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void draw_bbox();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+  void draw_Bbox(Bbox bbox, std::vector<float> *vertices);
+public Q_SLOTS:
+    void changed();
+#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
+};
+
+#endif // SCENE_SEGMENTED_IMAGE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item_config.h
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item_config.h
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/Scene_segmented_image_item_config.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/StdAfx.cpp
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.h b/3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.h
new file mode 100644
index 0000000..0ee45a6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/StdAfx.h
@@ -0,0 +1,344 @@
+#ifndef STDAFX_H
+#define STDAFX_H
+
+#ifdef CGAL_CONCURRENT_MESH_3
+  // In case some code uses CGAL_PROFILE, it needs to be concurrent
+  #define CGAL_CONCURRENT_PROFILE
+#endif
+
+#include <cmath>
+#include <cassert>
+#include <crtdefs.h>
+
+// STL
+#include <algorithm>
+#include <map>
+#include <vector>
+#include <stack>
+#include <deque>
+#include <fstream>
+#include <typeindex>
+
+// Windows
+#include <windows.h>
+
+// Boost
+#include <boost/assert.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/concept_archetype.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/config.hpp>
+#include <boost/format.hpp>
+#include <boost/iterator.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/insert.hpp>
+#include <boost/mpl/insert_fwd.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/logical.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/set/set0.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/none.hpp>
+#include <boost/optional.hpp>
+//#include <boost/parameter.hpp>
+//#include <boost/parameter/binding.hpp>
+//#include <boost/parameter/config.hpp>
+//#include <boost/parameter/keyword.hpp>
+//#include <boost/parameter/macros.hpp>
+//#include <boost/parameter/match.hpp>
+//#include <boost/parameter/name.hpp>
+//#include <boost/parameter/parameters.hpp>
+//#include <boost/parameter/preprocessor.hpp>
+//#include <boost/parameter/value_type.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/comparison/less_equal.hpp>
+#include <boost/preprocessor/comparison/not_equal.hpp>
+#include <boost/preprocessor/config/config.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/debug/error.hpp>
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/facilities/is_empty.hpp>
+#include <boost/preprocessor/for.hpp>
+#include <boost/preprocessor/identity.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/logical/bool.hpp>
+#include <boost/preprocessor/logical/compl.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/preprocessor/repetition/deduce_r.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/for.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/selection/max.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/first_n.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/for_each_product.hpp>
+#include <boost/preprocessor/seq/push_back.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/tuple/rem.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/property_map/vector_property_map.hpp>
+#include <boost/random.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_smallint.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/thread/tss.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/utility/result_of.hpp>
+#include <boost/variant.hpp>
+#include <boost/version.hpp>
+
+// Qt
+#include <QAction>
+#include <QApplication>
+#include <QCheckBox>
+#include <QColor>
+#include <QDialog>
+#include <QDialogButtonBox>
+#include <QDockWidget>
+#include <QDoubleSpinBox>
+#include <QFileDialog>
+#include <QFontMetrics>
+#include <QGLWidget>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QHBoxLayout>
+#include <QHeaderView>
+#include <QInputDialog>
+#include <QLabel>
+#include <QList>
+#include <QMainWindow>
+#include <QMap>
+#include <QMenu>
+#include <QMessageBox>
+#include <QObject>
+#include <QSlider>
+#include <QSpacerItem>
+#include <QString>
+#include <QStringList>
+#include <QThread>
+#include <QTime>
+#include <QTimer>
+#include <QVBoxLayout>
+#include <QVariant>
+#include <QVector>
+#include <QtCore/qglobal.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qpointer.h>
+#include <QtPlugin>
+#include <qglobal.h>
+#include <QGLWidget>
+#include <QVector>
+#include <QColor>
+#include <QThread>
+
+// QGLViewer
+#include <QGLViewer/qglviewer.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <qglviewer/frame.h>
+#include <qglviewer/constraint.h>
+#include <qglviewer/vec.h>
+#include <qglviewer/config.h>
+#include <qglviewer/mouseGrabber.h>
+
+// CGAL
+//#include <CGAL/AABB_traits.h>
+//#include <CGAL/AABB_tree.h>
+#include <CGAL/assertions.h>
+#include <CGAL/basic.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/circulator_bases.h>
+//#include <CGAL/Compact_container.h>
+#include <CGAL/config.h>
+#include <CGAL/Default.h>
+#include <CGAL/determinant.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/enum.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h>
+#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
+#include <CGAL/Filtered_predicate.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/gl.h>
+#include <CGAL/Hilbert_policy_tags.h>
+#include <CGAL/hilbert_sort.h>
+#include <CGAL/Hilbert_sort_2.h>
+#include <CGAL/Hilbert_sort_3.h>
+#include <CGAL/Hilbert_sort_base.h>
+#include <CGAL/Hilbert_sort_d.h>
+#include <CGAL/Hilbert_sort_median_2.h>
+#include <CGAL/Hilbert_sort_median_3.h>
+#include <CGAL/Hilbert_sort_median_d.h>
+#include <CGAL/Hilbert_sort_middle_2.h>
+#include <CGAL/Hilbert_sort_middle_3.h>
+#include <CGAL/Hilbert_sort_middle_base.h>
+#include <CGAL/Hilbert_sort_middle_d.h>
+#include <CGAL/Image_3.h>
+#include <CGAL/internal/Dummy_tds_3.h>
+#include <CGAL/internal/Exact_type_selector.h>
+#include <CGAL/internal/info_check.h>
+//#include <CGAL/internal/Regular_triangulation_filtered_traits_3.h>
+#include <CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h>
+#include <CGAL/internal/Static_filters/Power_test_3.h>
+//#include <CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+//#include <CGAL/internal/Triangulation_ds_circulators_3.h>
+//#include <CGAL/internal/Triangulation_ds_iterators_3.h>
+#include <CGAL/Interval_nt.h>
+#include <CGAL/IO/File_medit.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Kernel/interface_macros.h>
+#include <CGAL/Kernel/Type_equality_wrapper.h>
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/Lazy.h>
+#include <CGAL/Lazy_exact_nt.h>
+#include <CGAL/Lazy_kernel.h>
+//#include <CGAL/Mesher_level.h>
+//#include <CGAL/Mesher_level_default_implementations.h>
+//#include <CGAL/Mesher_level_visitors.h>
+//#include <CGAL/Meshes/Filtered_multimap_container.h>
+//#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
+//#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
+//#include <CGAL/Mesh_3/global_parameters.h>
+//#include <CGAL/Mesh_3/Mesher_3.h>
+//#include <CGAL/Mesh_3/mesh_standard_cell_criteria.h>
+//#include <CGAL/Mesh_3/mesh_standard_criteria.h>
+//#include <CGAL/Mesh_3/mesh_standard_facet_criteria.h>
+//#include <CGAL/Mesh_3/Mesh_surface_cell_base_3.h>
+//#include <CGAL/Mesh_3/Refine_cells_3.h>
+//#include <CGAL/Mesh_3/Refine_facets_3.h>
+//#include <CGAL/Mesh_3/Refine_tets_visitor.h>
+//#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
+//#include <CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h>
+//#include <CGAL/Mesh_3/Triangle_accessor_primitive.h>
+//#include <CGAL/Mesh_3/utilities.h>
+//#include <CGAL/Mesh_cell_base_3.h>
+#include <CGAL/Mesh_cell_criteria_3.h>
+#include <CGAL/Mesh_constant_domain_field_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+#include <CGAL/Mesh_edge_criteria_3.h>
+#include <CGAL/Mesh_facet_criteria_3.h>
+#include <CGAL/Mesh_facet_topology.h>
+//#include <CGAL/Mesh_vertex_base_3.h>
+#include <CGAL/Multiscale_sort.h>
+#include <CGAL/number_utils_classes.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Polygon_2/Polygon_2_simplicity.h>
+#include <CGAL/Polygon_2/polygon_assertions.h>
+#include <CGAL/Polygon_2_algorithms.h>
+//#include <CGAL/Polyhedral_mesh_domain_3.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/predicates/predicates_on_weighted_points_cartesian_3.h>
+//#include <CGAL/predicates/Regular_triangulation_ftC3.h>
+//#include <CGAL/predicates/Regular_triangulation_rtH3.h>
+//#include <CGAL/Profile_counter.h>
+//#include <CGAL/Regular_triangulation_cell_base_3.h>
+//#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Robust_construction.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/spatial_sort.h>
+#include <CGAL/Spatial_sort_traits_adapter_3.h>
+//#include <CGAL/Surface_mesh_vertex_base_3.h>
+#include <CGAL/tags.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Triangle_accessor_3.h>
+//#include <CGAL/Triangulation_3.h>
+//#include <CGAL/triangulation_assertions.h>
+//#include <CGAL/Triangulation_cell_base_3.h>
+//#include <CGAL/Triangulation_cell_base_with_circumcenter_3.h>
+//#include <CGAL/Triangulation_data_structure_3.h>
+//#include <CGAL/Triangulation_ds_cell_base_3.h>
+//#include <CGAL/Triangulation_ds_vertex_base_3.h>
+//#include <CGAL/Triangulation_simplex_3.h>
+//#include <CGAL/Triangulation_structural_filtering_traits.h>
+//#include <CGAL/Triangulation_utils_2.h>
+//#include <CGAL/Triangulation_utils_3.h>
+//#include <CGAL/Triangulation_vertex_base_3.h>
+#include <CGAL/tuple.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/utility.h>
+#include <CGAL/Weighted_point.h>
+
+// Mesh_3
+/*#include <CGAL_demo/Viewer.h>
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Plugin_helper.h>
+#include <ui_Meshing_dialog.h>
+#include <Scene_polyhedron_item.h>
+#include <implicit_functions/Implicit_function_interface.h>*/
+
+#endif //STDAFX_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane.h
new file mode 100644
index 0000000..2f7e89a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane.h
@@ -0,0 +1,445 @@
+#ifndef CGAL_VOLUME_PLANE_H
+#define CGAL_VOLUME_PLANE_H
+
+#include <CGAL_demo/Scene_item.h>
+
+#include <vector>
+#include <cassert>
+
+#include <QDebug>
+#include <QGLViewer/qglviewer.h>
+
+#include "Volume_plane_interface.h"
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Qt/debug.h>
+
+#if !defined(NDEBUG)
+inline
+void printGlError(unsigned int line) {
+ CGAL::Qt::opengl_check_errors(line);
+}
+#else
+inline
+void printGlError(unsigned int) {
+}
+#endif
+
+template<int Dim>
+class Length_constraint : public qglviewer::WorldConstraint {
+public:
+  Length_constraint(double max_) : max_(max_) { }
+
+  void constrainTranslation(qglviewer::Vec& t, qglviewer::Frame* const frame) {
+    WorldConstraint::constrainTranslation(t, frame);
+    qglviewer::Vec pos = frame->position();
+    double start = pos[Dim];
+    double end = t[Dim];
+    start += end;
+
+    if(start > max_ || (start < 0)) {
+      t[Dim] = 0.0;
+    }
+  }
+
+private:
+  double max_;
+};
+
+struct x_tag {};
+struct y_tag {};
+struct z_tag {};
+
+template<typename Tag>
+class Volume_plane : public Volume_plane_interface, public Tag {
+public:
+  Volume_plane(unsigned int adim, unsigned int bdim, unsigned int cdim, 
+               float xscale, float yscale, float zscale, std::vector<float>& colors);
+
+  virtual ~Volume_plane();
+
+  Volume_plane* clone() const { return NULL; }
+
+  virtual RenderingMode renderingMode() const { return Flat; }
+  bool supportsRenderingMode(RenderingMode m) const { return m == Flat; }
+  
+  QString toolTip() const { return "Plane through a volume"; }
+  QString name() const { return name(*this); }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  bool manipulatable() const { return true; }
+
+  unsigned int cube() {return currentCube; }
+
+  void draw(Viewer* viewer)const;
+
+  unsigned int aDim() const { return adim_; }
+  unsigned int bDim() const { return bdim_; }
+  unsigned int cDim() const { return cdim_; }
+
+  qglviewer::Vec translationVector() const { return translationVector(*this); }
+
+  unsigned int getCurrentCube() const { return currentCube; }
+
+  // uses a public init function to make enable construction in
+  // threads without gl-context
+  void init();
+
+private:
+  static const char* vertexShader_source;
+
+  static const char* fragmentShader_source;
+
+  static const char* vertexShader_bordures_source;
+
+  static const char* fragmentShader_bordures_source;
+
+
+  qglviewer::Vec translationVector(x_tag) const {
+    return qglviewer::Vec(xscale_, 0.0, 0.0);
+  }
+  qglviewer::Vec translationVector(y_tag) const {
+    return qglviewer::Vec(0.0, yscale_, 0.0);
+  }
+  qglviewer::Vec translationVector(z_tag) const {
+    return qglviewer::Vec(0.0, 0.0, zscale_);
+  }
+
+  void initShaders();
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j) {
+    buildVertex(out, i, j, *this);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, x_tag) {
+    out.push_back(0.0f);
+    out.push_back(i * yscale_);
+    out.push_back(j * zscale_);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, y_tag) {
+    out.push_back(i * xscale_);
+    out.push_back(0.0f);
+    out.push_back(j * zscale_);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, z_tag) {
+    out.push_back(i * xscale_);
+    out.push_back(j * yscale_);
+    out.push_back(0.0f);
+  }
+
+  const unsigned int adim_, bdim_, cdim_;
+  const double xscale_, yscale_, zscale_;
+  mutable int currentCube;
+
+  mutable QOpenGLBuffer vVBO;
+  mutable QOpenGLBuffer cbuffer;
+  mutable QOpenGLBuffer rectBuffer;
+  mutable std::vector<float> v_rec;
+  mutable QOpenGLShaderProgram program_bordures;
+  mutable QOpenGLShaderProgram program;
+  mutable std::vector< std::pair<QOpenGLBuffer, unsigned int> > ebos;
+  std::vector< float > colors_;
+
+  QString name(x_tag) const { return tr("X Slice for %1").arg(name_); }
+  QString name(y_tag) const { return tr("Y Slice for %2").arg(name_); }
+  QString name(z_tag) const { return tr("Z Slice for %2").arg(name_); }
+
+  void drawRectangle(x_tag) const {
+
+
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((adim_ - 1) * yscale_); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((adim_ - 1) * yscale_); v_rec.push_back((bdim_ - 1) * zscale_);
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * zscale_);
+
+  }
+
+  void drawRectangle(y_tag) const {
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_);v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_);v_rec.push_back(0.0f);v_rec.push_back( (bdim_ - 1) * zscale_);
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * zscale_);
+  }
+
+  void drawRectangle(z_tag) const {
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_); v_rec.push_back((bdim_ - 1) * yscale_); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * yscale_); v_rec.push_back(0.0f);
+  }
+
+  qglviewer::Constraint* setConstraint(x_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<0>(cdim_ * xscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(1.0f, 0.0f, 0.0f));
+    return c;
+  }
+  
+  qglviewer::Constraint* setConstraint(y_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<1>(cdim_ * yscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 1.0f, 0.0f));
+    return c;
+  }
+
+  qglviewer::Constraint* setConstraint(z_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<2>(cdim_ * zscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 0.0f, 1.0f));
+    return c;
+  }
+
+  void updateCurrentCube() const { currentCube = getTranslation(); }
+
+  GLdouble getTranslation() const { return getTranslation(*this); }
+  GLdouble getTranslation(x_tag) const { return mFrame_->matrix()[12] / xscale_; }
+  GLdouble getTranslation(y_tag) const { return mFrame_->matrix()[13] / yscale_; }
+  GLdouble getTranslation(z_tag) const { return mFrame_->matrix()[14] / zscale_; }
+
+};
+
+template<typename T>
+const char* Volume_plane<T>::vertexShader_source =
+      "#version 120 \n"
+      "attribute highp vec4 vertex; \n"
+      "attribute highp float color; \n"
+      "uniform highp mat4 mvp_matrix; \n"
+      "uniform highp mat4 f_matrix; \n"
+      "varying highp vec4 fullColor; \n"
+      "void main() \n"
+      "{ gl_Position = mvp_matrix * f_matrix * vertex; \n"
+      " fullColor = vec4(color, color, color, 1.0f); } \n";
+
+template<typename T>
+const char* Volume_plane<T>::fragmentShader_source =
+      "#version 120\n"
+      "varying highp vec4 fullColor; \n"
+      "void main() { gl_FragColor = fullColor; } \n";
+
+template<typename T>
+const char* Volume_plane<T>::vertexShader_bordures_source =
+      "#version 120 \n"
+      "attribute highp vec4 vertex; \n"
+      "uniform highp vec4 color; \n"
+      "uniform highp mat4 mvp_matrix; \n"
+      "uniform highp mat4 f_matrix; \n"
+      "varying highp vec4 fullColor; \n"
+      "void main() \n"
+      "{ gl_Position = mvp_matrix * f_matrix * vertex; \n"
+      " fullColor = color; } \n";
+
+template<typename T>
+const char* Volume_plane<T>::fragmentShader_bordures_source =
+      "#version 120\n"
+      "varying highp vec4 fullColor; \n"
+      "void main() { gl_FragColor = fullColor; } \n";
+
+
+
+template<typename T>
+Volume_plane<T>::Volume_plane(unsigned int adim, unsigned int bdim, unsigned int cdim, 
+                              float xscale, float yscale, float zscale, std::vector<float>& colors)
+  : Volume_plane_interface(new qglviewer::ManipulatedFrame), adim_(adim), bdim_(bdim), cdim_(cdim), xscale_(xscale), 
+    yscale_(yscale), zscale_(zscale), currentCube(0)
+{
+  colors_.swap(colors);
+  mFrame_->setConstraint(setConstraint(*this));
+}
+
+template<typename T>
+Volume_plane<T>::~Volume_plane() {
+  for(std::vector< std::pair< QOpenGLBuffer, unsigned int> >::iterator it = ebos.begin();
+      it != ebos.end(); ++it) { 
+      it->first.destroy();
+  }
+  program.release();
+}
+
+template<typename T>
+void Volume_plane<T>::draw(Viewer* viewer) const {
+  updateCurrentCube();
+
+
+
+  GLdouble mat[16];
+  viewer->camera()->getModelViewProjectionMatrix(mat);
+  QMatrix4x4 mvp;
+  QMatrix4x4 f;
+  for(int i=0; i<16; i++)
+  {
+      mvp.data()[i] = (float)mat[i];
+      f.data()[i] = (float)mFrame_->matrix()[i];
+  }
+
+
+  program_bordures.bind();
+  program_bordures.setUniformValue("mvp_matrix", mvp);
+  program_bordures.setUniformValue("f_matrix", f);
+  program_bordures.release();
+  GLint renderMode;
+  glGetIntegerv(GL_RENDER_MODE, &renderMode);
+  printGlError(__LINE__);
+
+
+  glLineWidth(4.0f);
+  v_rec.resize(0);
+  drawRectangle(*this);
+
+  program_bordures.bind();
+  rectBuffer.create();
+  rectBuffer.bind();
+  rectBuffer.allocate(v_rec.data(), static_cast<int>(v_rec.size()*sizeof(float)));
+  program_bordures.setAttributeBuffer("vertex",GL_FLOAT,0,3);
+  program_bordures.enableAttributeArray("vertex");
+  float current_color[4];
+  glGetFloatv(GL_CURRENT_COLOR, current_color);
+  QColor color;
+  color.setRgbF(current_color[0], current_color[1], current_color[2]);
+  program_bordures.setUniformValue("color",color);
+  glDrawArrays(GL_LINE_LOOP, 0, static_cast<GLsizei>(v_rec.size()/3));
+  rectBuffer.release();
+  program_bordures.release();
+  glLineWidth(1.0f);
+
+  program.bind();
+  int mvpLoc = program.uniformLocation("mvp_matrix");
+  int fLoc = program.uniformLocation("f_matrix");
+  program.setUniformValue(mvpLoc, mvp);
+  program.setUniformValue(fLoc, f);
+  vVBO.bind();
+  int vloc = program.attributeLocation("vertex");
+  program.enableAttributeArray(vloc);
+  program.setAttributeBuffer(vloc, GL_FLOAT, 0, 3);
+  vVBO.release();
+
+  cbuffer.bind();
+  int colorLoc = program.attributeLocation("color");
+  program.enableAttributeArray(colorLoc);
+  program.setAttributeBuffer(colorLoc, GL_FLOAT, (currentCube*sizeof(float)) * (bdim_) * (adim_), 1, 0 );
+  cbuffer.release();
+
+
+  printGlError(__LINE__);
+
+ for(unsigned int i = 0; i < ebos.size(); ++i)
+  {
+      ebos[i].first.bind();
+      glDrawElements(GL_TRIANGLES, ebos[i].second, GL_UNSIGNED_INT, 0);
+      ebos[i].first.release();
+  }
+
+  cbuffer.release();
+  printGlError(__LINE__);
+  program.release();
+
+  printGlError(__LINE__);
+}
+
+template<typename T>
+void Volume_plane<T>::init() {
+  initShaders();
+
+  // for each vertex
+  std::vector< float > vertices;
+  vertices.reserve(bdim_ * adim_ * 3);
+  for(unsigned int i = 0; i < adim_; ++i) 
+  {
+    for(unsigned int j = 0; j < bdim_; ++j)
+    {
+      buildVertex(vertices, i, j);
+    }
+  }
+    
+  assert(vertices.size() == (3 * adim_ * bdim_));
+
+  int maxi, maxv;
+  glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &maxi);
+  glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &maxv);
+  assert((vertices.size( ) / 3) < (unsigned int)maxi);
+  vVBO.create();
+  vVBO.bind();
+  vVBO.allocate(vertices.data(),static_cast<int>(sizeof(float) * vertices.size()));
+  vVBO.release();
+  printGlError(__LINE__);
+
+  // for each patch
+  std::vector<unsigned int> indices;
+  for(unsigned int j = 0; j < adim_ - 1; ++j) {
+    for(unsigned int k = 0; k < bdim_ - 1; ++k) {
+        //0
+        indices.push_back( j * bdim_ + k );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //1
+        indices.push_back( j * bdim_ + (k + 1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //3
+        indices.push_back( (j+1) * bdim_ + (k+1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //0
+        indices.push_back( j * bdim_ + k );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //3
+        indices.push_back( (j+1) * bdim_ + (k+1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //2
+        indices.push_back( (j+1) * bdim_ + (k) );
+        assert(indices.back() < (vertices.size() / 3));
+
+    }
+  }
+
+  assert((indices.size() / 6) == (adim_ - 1) * (bdim_ - 1));
+  //slice must be multiple of 3.
+  const unsigned int slice = 63399;
+  for(unsigned int i = 0; i < indices.size(); i+=slice)
+  {
+    QOpenGLBuffer ebo = QOpenGLBuffer(QOpenGLBuffer::IndexBuffer);
+    unsigned int left_over = (i + slice) > indices.size()  ? std::distance(indices.begin() + i, indices.end()) : slice;
+    ebo.create();
+    ebo.bind();
+    ebo.allocate(&indices[i],static_cast<int>(sizeof(unsigned int) * left_over));
+    ebo.release();
+    ebos.push_back(std::make_pair(ebo, left_over));
+  }
+
+  cbuffer.create();
+  cbuffer.bind();
+  cbuffer.allocate(colors_.data(),static_cast<int>(colors_.size()*sizeof(float)));
+  cbuffer.release();
+
+  printGlError(__LINE__);
+}
+
+template<typename T>
+void Volume_plane<T>::initShaders() {
+  QOpenGLShader *vertex = new QOpenGLShader(QOpenGLShader::Vertex);
+
+  vertex->compileSourceCode(vertexShader_source);
+  QOpenGLShader *fragment= new QOpenGLShader(QOpenGLShader::Fragment);
+  fragment->compileSourceCode(fragmentShader_source);
+  program.addShader(vertex);
+  program.addShader(fragment);
+  program.link();
+
+
+  QOpenGLShader *vertex_bordures = new QOpenGLShader(QOpenGLShader::Vertex);
+
+  vertex_bordures->compileSourceCode(vertexShader_bordures_source);
+  QOpenGLShader *fragment_bordures= new QOpenGLShader(QOpenGLShader::Fragment);
+  fragment_bordures->compileSourceCode(fragmentShader_bordures_source);
+  program_bordures.addShader(vertex_bordures);
+  program_bordures.addShader(fragment_bordures);
+  program_bordures.link();
+}
+
+
+#endif /* CGAL_VOLUME_PLANE_H */
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_interface.h
new file mode 100644
index 0000000..5388c6b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_interface.h
@@ -0,0 +1,51 @@
+#ifndef CGAL_VOLUME_PLANE_INTERFACE_H_
+#define CGAL_VOLUME_PLANE_INTERFACE_H_
+
+#include <QObject>
+#include <QGLViewer/qglviewer.h>
+#include <CGAL_demo/Scene_item.h>
+#include <iostream>
+#include <QGLViewer/manipulatedFrame.h>
+
+class Volume_plane_interface : public Scene_item {
+Q_OBJECT
+public:
+  Volume_plane_interface(qglviewer::ManipulatedFrame* f) : mFrame_(f) { 
+    connect(mFrame_, SIGNAL(manipulated()), this, SLOT(propagateManipulation()));
+  }
+
+  virtual ~Volume_plane_interface() {
+    delete mFrame_;
+  }
+
+  virtual void init() = 0;
+
+  virtual unsigned int aDim() const = 0;
+  virtual unsigned int bDim() const = 0;
+  virtual unsigned int cDim() const = 0;
+  virtual qglviewer::Vec translationVector() const = 0;
+  void itemAboutToBeDestroyed(Scene_item* item) {
+    if(this == item) {
+      Q_EMIT planeDestructionIncoming(this);
+      Q_EMIT aboutToBeDestroyed();
+    }
+  }
+
+  virtual unsigned int getCurrentCube() const = 0;
+
+  virtual qglviewer::ManipulatedFrame* manipulatedFrame() { return mFrame_; }
+
+Q_SIGNALS:
+  void planeDestructionIncoming(Volume_plane_interface*);
+  void manipulated(int);
+private Q_SLOTS:
+  void propagateManipulation() {
+    Q_EMIT manipulated(getCurrentCube());
+  }
+protected:
+  qglviewer::ManipulatedFrame* mFrame_;
+};
+
+
+#endif /* CGAL_VOLUME_PLANE_INTERFACE_H_ */
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.cpp
new file mode 100644
index 0000000..cf793f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.cpp
@@ -0,0 +1,200 @@
+#include "config.h"
+
+#include "Volume_plane_intersection.h"
+#include "Volume_plane_interface.h"
+
+#include <CGAL/gl.h>
+
+void Volume_plane_intersection::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix; \n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix* f_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "void main(void) { \n"
+        "gl_FragColor = vec4(1.0,0.0,0.0,1.0); \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Volume_plane_intersection::compute_elements()
+{
+   a_vertex.resize(0);
+   b_vertex.resize(0);
+   c_vertex.resize(0);
+
+   a_vertex.push_back(0.0); a_vertex.push_back(0.0); a_vertex.push_back(0.0);
+   a_vertex.push_back(x);   a_vertex.push_back(0.0); a_vertex.push_back(0.0);
+
+   b_vertex.push_back(0.0); b_vertex.push_back(0.0); b_vertex.push_back(0.0);
+   b_vertex.push_back(0.0); b_vertex.push_back(y);   b_vertex.push_back(0.0);
+
+   c_vertex.push_back(0.0); c_vertex.push_back(0.0); c_vertex.push_back(0.0);
+   c_vertex.push_back(0.0); c_vertex.push_back(0.0); c_vertex.push_back(z);
+}
+
+void Volume_plane_intersection::init_buffers()
+{
+    rendering_program.bind();
+
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(a_vertex.data(), static_cast<int>(a_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+        vao[0].release();
+
+        vao[1].bind();
+        buffers[1].bind();
+        buffers[1].allocate(b_vertex.data(), static_cast<int>(b_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+        vao[1].release();
+
+        vao[2].bind();
+        buffers[2].bind();
+        buffers[2].allocate(c_vertex.data(), static_cast<int>(c_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+        vao[2].release();
+
+
+
+    rendering_program.release();
+
+}
+
+void Volume_plane_intersection::attrib_buffers(Viewer* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.release();
+}
+
+void Volume_plane_intersection::draw(Viewer *viewer) const {
+  viewer->glLineWidth(4.0f);
+  attrib_buffers(viewer);
+  if(b && c) {
+
+    vao[0].bind();
+    rendering_program.bind();
+    GLdouble mat[16];
+    b->manipulatedFrame()->getMatrix(mat);
+    QMatrix4x4 b_mat, c_mat;
+    for(int i=0; i<16; i++)
+    {
+       b_mat.data()[i] = (float)mat[i];
+    }
+    c->manipulatedFrame()->getMatrix(mat);
+    for(int i=0; i<16; i++)
+    {
+       c_mat.data()[i] = (float)mat[i];
+    }
+    rendering_program.setUniformValue("f_matrix", b_mat*c_mat);
+    viewer->glDrawArrays(GL_LINES, 0, 2);
+    rendering_program.release();
+    vao[0].release();
+  }
+
+  if(a && c) {
+      vao[1].bind();
+      rendering_program.bind();
+      GLdouble mat[16];
+      a->manipulatedFrame()->getMatrix(mat);
+      QMatrix4x4 a_mat, c_mat;
+      for(int i=0; i<16; i++)
+      {
+         a_mat.data()[i] = (float)mat[i];
+      }
+      c->manipulatedFrame()->getMatrix(mat);
+      for(int i=0; i<16; i++)
+      {
+         c_mat.data()[i] = (float)mat[i];
+      }
+      rendering_program.setUniformValue("f_matrix", a_mat*c_mat);
+      viewer->glDrawArrays(GL_LINES, 0, 2);
+      rendering_program.release();
+      vao[1].release();
+  }
+
+  if(a && b) {
+      vao[2].bind();
+      rendering_program.bind();
+      GLdouble mat[16];
+      a->manipulatedFrame()->getMatrix(mat);
+      QMatrix4x4 a_mat, b_mat;
+      for(int i=0; i<16; i++)
+      {
+         a_mat.data()[i] = (float)mat[i];
+      }
+      b->manipulatedFrame()->getMatrix(mat);
+      for(int i=0; i<16; i++)
+      {
+         b_mat.data()[i] = (float)mat[i];
+      }
+      rendering_program.setUniformValue("f_matrix", a_mat*b_mat);
+      viewer->glDrawArrays(GL_LINES, 0, 2);
+      rendering_program.release();
+      vao[2].release();
+  }
+
+  viewer->glLineWidth(1.0f);
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.h
new file mode 100644
index 0000000..43ce870
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_intersection.h
@@ -0,0 +1,77 @@
+#ifndef CGAL_VOLUME_PLANE_INTERSECTION_H_
+#define CGAL_VOLUME_PLANE_INTERSECTION_H_
+
+#include <CGAL_demo/Scene_item.h>
+
+#include <QColor>
+#include <QString>
+#include<QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+class Volume_plane_interface;
+
+class Volume_plane_intersection
+  : public Scene_item {
+  typedef std::pair<Volume_plane_interface*, Volume_plane_interface*> Interface_pair;
+Q_OBJECT
+public:
+  Volume_plane_intersection(float x, float y, float z)
+    : a(NULL), b(NULL), c(NULL), x(x), y(y), z(z) {
+    setColor(QColor(255, 0, 0));
+    setName("Volume plane intersection");
+    compile_shaders();
+    compute_elements();
+    init_buffers();
+  }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  bool manipulatable() const { return false; }
+  Volume_plane_intersection* clone() const { return 0; }
+  bool supportsRenderingMode(RenderingMode) const { return true; }
+  QString toolTip() const { return "Tooling"; }
+
+  void draw(Viewer*)const;
+
+  void setX(Volume_plane_interface* x) { a = x; }
+  void setY(Volume_plane_interface* x) { b = x; }
+  void setZ(Volume_plane_interface* x) { c = x; }
+
+public Q_SLOTS:
+  void planeRemoved(Volume_plane_interface* i) {
+    if(a == i) {
+      a = NULL;
+    } else if(b == i) {
+      b = NULL;
+    } else if(c == i) {
+      c = NULL;
+    }
+  }
+
+private:
+  Volume_plane_interface *a, *b, *c;
+  float x, y, z;
+
+  static const int vaoSize = 3;
+  static const int vboSize = 3;
+
+  mutable int vertexLocation[1];
+  mutable int mvpLocation[1];
+
+  std::vector<float> a_vertex;
+  std::vector<float> b_vertex;
+  std::vector<float> c_vertex;
+
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void compute_elements();
+  void init_buffers();
+  void attrib_buffers(Viewer*) const;
+  void compile_shaders();
+};
+
+#endif /* CGAL_VOLUME_PLANE_INTERSECTION_H_ */
+
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_thread.h b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_thread.h
new file mode 100644
index 0000000..60dbdfa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_plane_thread.h
@@ -0,0 +1,128 @@
+#ifndef CGAL_VOLUME_PLANE_THREAD_H
+#define CGAL_VOLUME_PLANE_THREAD_H
+
+#include "Volume_plane.h"
+#include <CGAL/Image_3.h>
+
+#include "Scene_segmented_image_item.h"
+
+#include <QApplication>
+#include <QThread>
+#include <vector>
+
+struct Clamp_to_one_zero_range {
+  std::pair<float, float> min_max;
+  float operator()(const float& inVal) {
+    float inValNorm = inVal - min_max.first;
+    float aUpperNorm = min_max.second - min_max.first;
+    float bValNorm = inValNorm / aUpperNorm;
+    return bValNorm;
+  }
+};
+
+class Volume_plane_thread : public QThread {
+Q_OBJECT  
+public:
+  Volume_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+    : img(img), clamper(clamp), item(NULL), name(name) { }
+
+  Volume_plane_interface* getItem() {
+    return item;
+  }
+
+Q_SIGNALS:
+  void finished(Volume_plane_thread*);
+
+protected:
+  const CGAL::Image_3* img;
+  Clamp_to_one_zero_range clamper;
+  Volume_plane_interface* item;
+  std::vector<float> buffer;
+  QString name;
+};
+
+template<typename Word>
+class X_plane_thread : public Volume_plane_thread {
+public:
+  X_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+    : Volume_plane_thread(img, clamp, name) { }
+protected:
+  void run();
+};
+
+template<typename Word>
+class Y_plane_thread : public Volume_plane_thread {
+public:
+  Y_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+    : Volume_plane_thread(img, clamp, name) { }
+protected:
+  void run();
+};
+
+template<typename Word>
+class Z_plane_thread : public Volume_plane_thread {
+public:
+  Z_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+    : Volume_plane_thread(img, clamp, name) { }
+protected:
+  void run();
+};
+
+template<typename Word>
+void X_plane_thread<Word>::run() {
+    buffer.reserve(img->size());
+    for(unsigned int i = 0; i < img->xdim(); ++i) {
+      for(unsigned int j = 0; j < img->ydim(); ++j) {
+        for(unsigned int k = 0; k < img->zdim(); ++k) {
+          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), i, j, k);
+          x = clamper(x);
+          buffer.push_back(x);
+        }
+      }
+    }
+    item = new Volume_plane<x_tag>(static_cast<int>(img->ydim()), static_cast<int>(img->zdim()), static_cast<int>(img->xdim()), 
+                                   img->vx(), img->vy(), img->vz(), buffer);
+
+    item->setName(name);
+    item->moveToThread(QApplication::instance()->thread());
+    Q_EMIT finished(this);
+}
+
+template<typename Word>
+void Y_plane_thread<Word>::run() {
+      buffer.reserve(img->size());
+    for(unsigned int i = 0; i < img->ydim(); ++i) {
+      for(unsigned int j = 0; j < img->xdim(); ++j) {
+        for(unsigned int k = 0; k < img->zdim(); ++k) {
+          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, i, k);
+          x = clamper(x);
+          buffer.push_back(x);
+        }
+      }
+    }
+    item = new Volume_plane<y_tag>(static_cast<int>(img->xdim()), static_cast<int>(img->zdim()), static_cast<int>(img->ydim()), 
+                                   img->vx(), img->vy(), img->vz(), buffer);
+    item->setName(name);
+    item->moveToThread(QApplication::instance()->thread());
+    Q_EMIT finished(this);
+}
+
+template<typename Word>
+void Z_plane_thread<Word>::run() {
+  for(unsigned int i = 0; i < img->zdim(); ++i) {
+    for(unsigned int j = 0; j < img->xdim(); ++j) {
+      for(unsigned int k = 0; k < img->ydim(); ++k) {
+        float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, k, i);
+        x = clamper(x);
+        buffer.push_back(x);
+      }
+    }
+  }
+  item = new Volume_plane<z_tag>(static_cast<int>(img->xdim()), static_cast<int>(img->ydim()), static_cast<int>(img->zdim()), 
+                                 img->vx(), img->vy(), img->vz(), buffer);
+  item->setName(name);
+  item->moveToThread(QApplication::instance()->thread());
+  Q_EMIT finished(this);
+}
+
+#endif /* CGAL_VOLUME_PLANE_THREAD_H */
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_planes_plugin.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_planes_plugin.cpp
new file mode 100644
index 0000000..eb49cf8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/Volume_planes_plugin.cpp
@@ -0,0 +1,389 @@
+
+#ifdef _MSC_VER
+#  pragma warning(disable:4244) // conversion with loss of data
+#endif
+
+#include <CGAL/config.h>
+#include "config.h"
+
+#include "Volume_plane.h"
+#include <CGAL/Image_3.h>
+
+#include "Volume_plane_thread.h"
+#include "Volume_plane_intersection.h"
+
+#include "Scene_segmented_image_item.h"
+#include <CGAL_demo/Plugin_helper.h>
+#include <CGAL_demo/Plugin_interface.h>
+#include <CGAL_demo/Messages_interface.h>
+#include <CGAL_demo/Scene_interface.h>
+#include <CGAL_demo/Scene_item.h>
+#include <CGAL_demo/Viewer.h>
+
+#include <QAction>
+#include <QMenu>
+#include <QList>
+#include <QInputDialog>
+#include <QSlider>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QDockWidget>
+#include <QMainWindow>
+#include <QMessageBox>
+#include <QString>
+#include <QFontMetrics>
+
+#include <cassert>
+#include <iostream>
+
+#include <boost/type_traits.hpp>
+#include <boost/optional.hpp>
+
+// Covariant return types don't work for scalar types and we cannot
+// have templates here, hence this unfortunate hack.
+
+// The input float value we are reading is always in
+// 0..1 and min_max is the range it came from.
+struct IntConverter {
+  std::pair<int, int> min_max;
+  
+  int operator()(float f) {
+    float s = f * (min_max.second - min_max.first);
+    return s + min_max.first;
+  }
+};
+
+struct DoubleConverter {
+  std::pair<float, float> min_max;
+
+  float operator()(float f) {
+    float s = f * (min_max.second - min_max.first);
+    return s + min_max.first;
+  }
+};
+
+class PixelReader : public QObject
+{
+Q_OBJECT
+public Q_SLOTS:
+  void update(const QPoint& p) {
+    getPixel(p);
+  }
+Q_SIGNALS:
+  void x(int);
+
+public:
+  void setIC(const IntConverter& x) { ic = x; fc = boost::optional<DoubleConverter>(); }
+  void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional<IntConverter>(); }
+  void setViewer(Viewer* viewer) { this->viewer = viewer; }
+
+private:
+  boost::optional<IntConverter> ic;
+  boost::optional<DoubleConverter> fc;
+  Viewer* viewer;
+
+
+  void getPixel(const QPoint& e) {
+    float data[3];
+    int vp[4];
+    viewer->glGetIntegerv(GL_VIEWPORT, vp);
+    viewer->glReadPixels(e.x(), vp[3] - e.y(), 1, 1, GL_RGB, GL_FLOAT, data);
+
+    if(fc) {
+      Q_EMIT x( (*fc)(data[0]) );
+    } else if(ic) {
+      Q_EMIT x( (*ic)(data[0]) );
+    }
+  }
+};
+
+
+class Plane_slider : public QSlider
+{
+  Q_OBJECT
+public:
+  Plane_slider(const qglviewer::Vec& v, int id, Scene_interface* scene,
+               qglviewer::ManipulatedFrame* frame, Qt::Orientation ori, QWidget* widget) 
+    : QSlider(ori, widget), v(v), id(id), scene(scene), frame(frame) { 
+    this->setTracking(true);
+    connect(frame,  SIGNAL(manipulated()), this, SLOT(updateValue()));
+  }
+
+public:
+  void sliderChange(SliderChange c) {
+    QSlider::sliderChange(c);
+    if(c == SliderValueChange) {
+      qglviewer::Vec v2 = v * (this->value() / scale);
+      frame->setTranslationWithConstraint(v2);
+      scene->itemChanged(id);
+    }
+
+    Q_EMIT realChange(this->value() / scale);
+  }
+
+public Q_SLOTS:
+  void updateValue() {
+#if QGLVIEWER_VERSION >= 0x020600
+    typedef qreal qglviewer_real;
+#else // QGLViewer < 2.6.0
+    typedef float qglviewer_real;
+#endif // QGLViewer < 2.6.0
+    qglviewer_real a, b, c;
+    frame->getPosition(a, b, c);
+    float sum1 = float(a + b + c);
+    float sum2 = float(v.x + v.y + v.z);
+    sum1 /= sum2;
+    setValue(sum1 * scale);
+  }
+
+Q_SIGNALS:
+  void realChange(int);
+
+private:
+  static const unsigned int scale;
+
+  qglviewer::Vec v;
+  int id;
+  Scene_interface* scene;
+  qglviewer::ManipulatedFrame* frame;
+};
+
+const unsigned int Plane_slider::scale = 100;
+
+class Volume_plane_plugin :
+  public QObject,
+  public Plugin_interface 
+{
+  Q_OBJECT
+  Q_INTERFACES(Plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Volume_plane_plugin() : planeSwitch(NULL), sc(NULL), mw(NULL)
+    {
+    }
+
+  virtual void init(QMainWindow* mw, Scene_interface* sc) {
+    assert(mw != NULL);
+    assert(sc != NULL);
+    this->sc = sc;
+    this->mw = mw;
+
+    QList<QMenu*> menus = mw->findChildren<QMenu*>();
+
+    planeSwitch = new QAction(mw);
+    planeSwitch->setText("Add Volume Planes");
+
+    connect(planeSwitch, SIGNAL(triggered()), this, SLOT(selectPlanes()));
+    
+    // evil
+    Viewer* v = mw->findChild<Viewer*>("viewer");
+    CGAL_assertion(v != 0);
+    pxr_.setViewer(v);
+    connect(v, SIGNAL(pointSelected(QPoint)), &pxr_, SLOT(update(QPoint)));
+
+    createOrGetDockLayout();
+  }
+
+  virtual QList<QAction*> actions() const {
+    return QList<QAction*>() << planeSwitch;
+  }
+
+public Q_SLOTS:
+  void selectPlanes() {
+    std::vector< Scene_segmented_image_item* > seg_items;
+    Scene_segmented_image_item* seg_img = NULL;
+
+    for(unsigned int i = 0; i < sc->numberOfEntries(); ++i) {
+      Scene_segmented_image_item* tmp = qobject_cast<Scene_segmented_image_item*>(sc->item(i));
+      if(tmp != NULL)
+        seg_items.push_back(tmp);
+    }
+    
+    if(seg_items.empty()) {
+      QMessageBox::warning(mw, tr("No suitable item found"), tr("Load an inrimage or hdr file to enable Volume Planes."));
+      return;
+    } else {
+      QList<QString> items;
+      for(std::vector< Scene_segmented_image_item* >::const_iterator it = seg_items.begin(); 
+          it != seg_items.end(); ++it) { 
+        items << (*it)->name();
+      }
+
+      bool ok;
+      QString selected = QInputDialog::getItem(mw, tr("Select a dataset:"), tr("Items"), items, 0, false, &ok);
+      
+      if(!ok || selected.isEmpty())
+        return;
+
+      for(std::vector< Scene_segmented_image_item*>::const_iterator it = seg_items.begin(); 
+          it != seg_items.end(); ++it) { 
+        if(selected == (*it)->name())
+          seg_img = *it;
+      }
+    }
+    
+    if(!(seg_img == NULL)) {
+      const CGAL::Image_3* img = seg_img->image();
+      CGAL_IMAGE_IO_CASE(img->image(), this->launchAdders<Word>(img, seg_img->name()))
+
+      Volume_plane_intersection* i = new Volume_plane_intersection(img->xdim() * img->vx(), 
+                                                                   img->ydim() * img->vy(), 
+                                                                   img->zdim() * img->vz());
+      this->intersectionId = sc->addItem(i);
+    } else {
+      QMessageBox::warning(mw, tr("Something went wrong"), tr("Selected a suitable Object but couldn't get an image pointer."));
+      return;
+    }
+
+  }
+
+  void addVP(Volume_plane_thread* thread) {
+    Volume_plane_interface* plane = thread->getItem();
+    plane->init();
+
+    // add the interface for this Volume_plane
+    int id = sc->addItem(plane);
+    
+    QLayout* layout = createOrGetDockLayout();
+    
+    QWidget* controls = new QWidget;
+    QHBoxLayout* box = new QHBoxLayout(controls);
+    layout->addWidget(controls);
+
+    QLabel* label = new QLabel(controls);
+    label->setText(plane->name());
+
+    QLabel* cubeLabel = new QLabel(controls);
+    cubeLabel->setNum(static_cast<int>(plane->getCurrentCube()));
+    
+    // Find the right width for the label to accommodate at least 9999
+    QFontMetrics metric = cubeLabel->fontMetrics();
+    cubeLabel->setFixedWidth(metric.width(QString("9999")));
+
+    QSlider* slider = new Plane_slider(plane->translationVector(), id, sc, plane->manipulatedFrame(), 
+                                       Qt::Horizontal, controls);
+    slider->setRange(0, (plane->cDim() - 1) * 100);
+
+    connect(slider, SIGNAL(realChange(int)), cubeLabel, SLOT(setNum(int)));
+    connect(plane, SIGNAL(manipulated(int)), cubeLabel, SLOT(setNum(int)));
+    
+    box->addWidget(label);
+    box->addWidget(slider);
+    box->addWidget(cubeLabel);
+    
+    connect(plane, SIGNAL(aboutToBeDestroyed()), controls, SLOT(deleteLater()));
+
+    std::vector<Volume_plane_thread*>::iterator it = std::find(threads.begin(), threads.end(), thread);
+
+    // this slot has been connected to a thread that hasn't been
+    // registered here.
+    assert(it != threads.end());
+    delete *it;
+    threads.erase(it);
+
+    Volume_plane_intersection* intersection = dynamic_cast<Volume_plane_intersection*>(sc->item(intersectionId));
+    if(!intersection) {
+      // the intersection is gone before it was initialized
+      return;
+    }
+    // FIXME downcasting mode
+    // FIXME this will bug if two volume planes are generated simultaneously by the plugin
+    if(Volume_plane<x_tag>* p = dynamic_cast< Volume_plane<x_tag>* >(plane)) {
+      intersection->setX(p);
+    } else if(Volume_plane<y_tag>* p = dynamic_cast< Volume_plane<y_tag>* >(plane)) {
+      intersection->setY(p);
+    } else if(Volume_plane<z_tag>* p = dynamic_cast< Volume_plane<z_tag>* >(plane)) {
+      intersection->setZ(p);
+    }
+
+    connect(plane, SIGNAL(planeDestructionIncoming(Volume_plane_interface*)), 
+            intersection, SLOT(planeRemoved(Volume_plane_interface*)));
+  }
+ 
+private:
+  QAction* planeSwitch;
+  Scene_interface* sc;
+  QMainWindow* mw;
+  PixelReader pxr_;
+
+  std::vector<Volume_plane_thread*> threads;
+  unsigned int intersectionId;
+
+  QLayout* createOrGetDockLayout() {
+    QLayout* layout = NULL;
+    QDockWidget* controlDockWidget = mw->findChild<QDockWidget*>("volumePlanesControl");
+    if(!controlDockWidget) {
+      controlDockWidget = new QDockWidget(mw);
+      controlDockWidget->setObjectName("volumePlanesControl");
+      QWidget* content = new QWidget(controlDockWidget);
+      layout = new QVBoxLayout(content);
+      layout->setObjectName("vpSliderLayout");
+      controlDockWidget->setWindowTitle("Control Widget");
+      mw->addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
+      
+      QWidget* vlabels = new QWidget(content);
+      layout->addWidget(vlabels);
+      QHBoxLayout* vbox = new QHBoxLayout(vlabels);
+      vbox->setAlignment(Qt::AlignJustify);
+
+      QLabel* text = new QLabel(vlabels);
+      text->setText("Isovalue at point:");
+      QLabel* x = new QLabel(vlabels);
+
+      connect(&pxr_, SIGNAL(x(int)), x, SLOT(setNum(int)));
+      
+      vbox->addWidget(text); vbox->addWidget(x);
+      controlDockWidget->setWidget(content);
+    } else {
+      layout = controlDockWidget->findChild<QLayout*>("vpSliderLayout");
+    }
+
+    return layout;
+  }
+
+  template<typename Word>
+  void launchAdders(const CGAL::Image_3* img, const QString& name) {
+    const Word* begin = (const Word*)img->data();
+    const Word* end = (const Word*)img->data() + img->size();
+
+    std::pair<const Word, const Word> minmax(*std::min_element(begin, end), *std::max_element(begin, end));
+
+    Clamp_to_one_zero_range clamper = { minmax };
+
+    switchReaderConverter< Word >(minmax);
+    
+    threads.push_back(new X_plane_thread<Word>(img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+    
+    threads.push_back(new Y_plane_thread<Word>(img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+
+    threads.push_back(new Z_plane_thread<Word>(img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax) { 
+    switchReaderConverter(minmax, typename boost::is_integral<T>::type()); 
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax, boost::true_type) {
+    // IntConverter
+    IntConverter x = { minmax }; pxr_.setIC(x);
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax, boost::false_type) {
+    // IntConverter
+    DoubleConverter x = { minmax }; pxr_.setFC(x);
+  }
+};
+
+#include "Volume_planes_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/concurrent_mesher_config.cfg b/3rdparty/CGAL-4.8/demo/Mesh_3/concurrent_mesher_config.cfg
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/concurrent_mesher_config.cfg
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/concurrent_mesher_config.cfg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/config.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/CMakeLists.txt
new file mode 100644
index 0000000..5eb15b4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/CMakeLists.txt
@@ -0,0 +1,75 @@
+# This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions.
+
+project( Mesh_3_implicit_functions )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Let plugins be compiled in the same directory as the executable.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+# Include directory of demo includes
+include_directories( BEFORE ${Mesh_3_implicit_functions_BINARY_DIR} ../include )
+
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL)
+
+
+if(CGAL_Qt5_FOUND AND Qt5_FOUND)
+
+  # put plugins (which are shared libraries) at the same location as
+  # executable files
+  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
+
+  ###########
+  # PLUGINS #
+  ###########
+  include(AddFileDependencies)
+  remove_definitions(-DQT_STATICPLUGIN)
+
+  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
+  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
+    list_split(option ARGN_TAIL ${ARGN} )
+    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
+      set(other_sources ${ARGN})
+      set(option "")
+    else()
+      set(other_sources ${ARGN_TAIL})
+    endif()
+    qt5_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
+    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
+
+    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
+    qt5_use_modules(${plugin_name} Xml Script OpenGL)
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
+    # Link with Qt
+    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
+    # Link with CGAL
+    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+  endmacro(polyhedron_demo_plugin)
+
+  polyhedron_demo_plugin(sphere_function_plugin Sphere_implicit_function)
+  polyhedron_demo_plugin(tanglecube_function_plugin Tanglecube_implicit_function)
+  polyhedron_demo_plugin(klein_function_plugin Klein_implicit_function)
+
+else (CGAL_Qt5_FOUND AND Qt5_FOUND)
+
+  set(MESH_3_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "the CGAL Qt5 library, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "Qt5, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
+
+endif (CGAL_Qt5_FOUND AND Qt5_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Implicit_function_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Implicit_function_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/implicit_functions/Implicit_function_interface.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Implicit_function_interface.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp
new file mode 100644
index 0000000..09878a4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Klein_implicit_function.cpp
@@ -0,0 +1,55 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+class Klein_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+
+public:
+  virtual QString name() const { return "Klein function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    return   (x*x+y*y+z*z+2*y-1)
+           * ( (x*x+y*y+z*z-2*y-1) *(x*x+y*y+z*z-2*y-1)-8*z*z)
+           + 16*x*z* (x*x+y*y+z*z-2*y-1);
+  }
+  
+  virtual Bbox bbox() const
+  {
+    const double radius = 6.;
+    double r = radius * 1.1;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Klein_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp
new file mode 100644
index 0000000..e8496c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Sphere_implicit_function.cpp
@@ -0,0 +1,53 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+const double radius = 1.;
+
+class Sphere_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+public:
+  virtual QString name() const { return "Sphere function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    return (x*x + y*y + z*z - radius);
+  }
+  
+  virtual Bbox bbox() const
+  {
+    double r = radius * 1.2;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Sphere_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp
new file mode 100644
index 0000000..82c89fe
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/implicit_functions/Tanglecube_implicit_function.cpp
@@ -0,0 +1,55 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+const double radius = 4.;
+
+class Tanglecube_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+public:
+  virtual QString name() const { return "Tanglecube function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    double x2=x*x, y2=y*y, z2=z*z;
+    double x4=x2*x2, y4=y2*y2, z4=z2*z2;
+    return x4 - 5*x2 + y4 - 5*y2 + z4 - 5*z2 + 11.8;
+  }
+  
+  virtual Bbox bbox() const
+  {
+    double r = radius * 1.2;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Tanglecube_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h
new file mode 100644
index 0000000..c5cde32
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Io_plugin_interface.h
@@ -0,0 +1,27 @@
+#ifndef MESH_3_DEMO_IO_PLUGIN_INTERFACE_H
+#define MESH_3_DEMO_IO_PLUGIN_INTERFACE_H
+
+#include <QFileInfo>
+#include <QStringList>
+
+
+class Scene_item;
+
+class Io_plugin_interface 
+{
+public:
+  virtual ~Io_plugin_interface() {}
+
+  virtual QStringList nameFilters() const = 0;
+
+  virtual bool canLoad() const = 0;
+  virtual Scene_item* load(QFileInfo fileinfo) = 0;
+
+  virtual bool canSave(const Scene_item*) = 0;
+  virtual bool save(const Scene_item*, QFileInfo fileinfo, QString selectedFilter) = 0;
+};
+
+Q_DECLARE_INTERFACE(Io_plugin_interface,
+                    "com.geometryfactory.Mesh3Demo.IOPluginInterface/1.0")
+
+#endif // POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Messages_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Messages_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Messages_interface.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Messages_interface.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Plugin_helper.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Plugin_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Plugin_helper.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Plugin_helper.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Plugin_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Plugin_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Plugin_interface.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Plugin_interface.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h
new file mode 100644
index 0000000..010e584
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h
@@ -0,0 +1,138 @@
+#ifndef SCENE_H
+#define SCENE_H
+
+#include <CGAL_demo/Scene_interface.h>
+#include <CGAL_demo/Scene_draw_interface.h>
+
+#include <QtOpenGL/qgl.h>
+#include <QAbstractListModel>
+#include <QString>
+#include <QColor>
+#include <QList>
+#include <QItemDelegate>
+#include <QPixmap>
+#include <QItemSelection>
+
+#include <iostream>
+#include <cmath>
+#include <boost/variant.hpp>
+
+class QEvent;
+class QMouseEvent;
+
+class Scene  :
+  public QAbstractListModel, public Scene_interface, public Scene_draw_interface
+{
+  Q_OBJECT
+
+  friend class SceneDelegate;
+
+public:
+  enum Columns { NameColumn = 0, 
+                 ColorColumn, 
+                 RenderingModeColumn, 
+                 VisibleColumn,
+                 ABColumn,
+                 LastColumn = ABColumn,
+                 NumberOfColumns = LastColumn + 1};
+
+  Scene(QObject*  parent);
+  ~Scene();
+
+  Item_id addItem(Scene_item* item);
+
+  int erase(int);     // Returns the index of the polyhedra just before the
+                      // one that is erased, or just after. Returns -1 if
+                      // the list is empty.
+
+  // Duplicate a scene item. Return the ID of the new item (-1 on error).
+  Item_id duplicate(Item_id index); 
+
+  // Accessors (getters)
+  size_t numberOfEntries() const;
+  Scene_item* item(Item_id) const ;
+  Item_id mainSelectionIndex() const;
+  int selectionAindex() const;
+  int selectionBindex() const;
+
+  // draw() is called by Viewer::draw()
+  void draw(Viewer *viewer);
+  void drawWithNames(Viewer *viewer);
+
+  // Get scene bounding box
+  Bbox bbox() const;
+  double len_diagonal() const
+  {
+    Bbox box = bbox();
+    double dx = box.xmax - box.xmin;
+    double dy = box.ymax - box.ymin;
+    double dz = box.zmax - box.zmin;
+    return std::sqrt(dx*dx + dy*dy + dz*dz);
+  }
+
+  // QAbstractItemModel functions
+  int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
+  int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
+  QVariant data ( const QModelIndex & index, int role = ::Qt::DisplayRole ) const;
+  QVariant headerData ( int section, ::Qt::Orientation orientation, int role = ::Qt::DisplayRole ) const;
+  ::Qt::ItemFlags flags ( const QModelIndex & index ) const;
+  bool setData(const QModelIndex &index, const QVariant &value, int role);
+
+  // auxiliary public function for QMainWindow
+  QItemSelection createSelection(int i);
+
+public Q_SLOTS:
+  // Notify the scene that an item was modified
+  void itemChanged(Item_id i); 
+  void itemChanged(Scene_item*);
+
+  virtual void setSelectedItem(Item_id i)
+  {
+    selected_item = i;
+    Q_EMIT selectionChanged();
+  };
+
+  // Accessors (setters)
+  void setItemVisible(int, bool b);
+  void setItemA(int i);
+  void setItemB(int i);
+
+Q_SIGNALS:
+  void updated_bbox();
+  void updated();
+  void itemAboutToBeDestroyed(Scene_item*);
+  void selectionChanged();
+
+private:
+  void draw_aux(bool with_names, Viewer *viewer);
+  typedef QList<Scene_item*> Entries;
+  Entries entries;
+  int selected_item;
+  int item_A;
+  int item_B;
+
+}; // end class Scene
+
+class SceneDelegate : public QItemDelegate
+{
+public:
+  SceneDelegate(QObject * parent = 0)
+    : QItemDelegate(parent),
+      checkOnPixmap(":/cgal/icons/check-on.png"),
+      checkOffPixmap(":/cgal/icons/check-off.png")
+  {
+  }
+
+  bool editorEvent(QEvent *event, QAbstractItemModel *model,
+                   const QStyleOptionViewItem &option,
+                   const QModelIndex &index);
+  void paint(QPainter *painter, const QStyleOptionViewItem &option,
+             const QModelIndex &index) const;
+
+private:
+  QPixmap checkOnPixmap;
+  QPixmap checkOffPixmap;
+  mutable int size;
+}; // end class SceneDelegate
+
+#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h
new file mode 100644
index 0000000..bd1f1ae
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h
@@ -0,0 +1,13 @@
+#ifndef SCENE_DRAW_INTERFACE_H
+#define SCENE_DRAW_INTERFACE_H
+
+class Viewer;
+
+class Scene_draw_interface {
+public:
+  virtual ~Scene_draw_interface(){}
+  virtual void draw(Viewer*) = 0;
+  virtual void drawWithNames(Viewer*) = 0;
+};
+
+#endif // SCENE_DRAW_INTERFACE_H;
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_interface.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_interface.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_interface.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_item.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_item.h
new file mode 100644
index 0000000..f07a517
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_item.h
@@ -0,0 +1,99 @@
+#ifndef SCENE_ITEM_H
+#define SCENE_ITEM_H
+
+#include <CGAL_demo/Scene_item_config.h>
+#include <CGAL_demo/Scene_interface.h>
+#include <QString>
+#include <QPixmap>
+#include <QFont>
+
+#include <CGAL_demo/Viewer.h>
+
+namespace qglviewer {
+  class ManipulatedFrame;
+}
+
+// This class represents an object in the OpenGL scene
+class SCENE_ITEM_EXPORT Scene_item : public QObject {
+  Q_OBJECT
+  Q_PROPERTY(QColor color READ color WRITE setColor)
+  Q_PROPERTY(QString name READ name WRITE setName)
+  Q_PROPERTY(bool visible READ visible WRITE setVisible)
+  Q_ENUMS(RenderingMode)
+  Q_PROPERTY(RenderingMode renderingMode READ renderingMode WRITE setRenderingMode)
+public:
+  typedef Scene_interface::Bbox Bbox;
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+
+  static const QColor defaultColor; // defined in Scene_item.cpp
+
+  Scene_item()
+    : name_("unamed"),
+      color_(defaultColor),
+      visible_(true),
+      rendering_mode(FlatPlusEdges)
+  {
+  }
+  virtual ~Scene_item();
+  virtual Scene_item* clone() const = 0;
+
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const = 0;
+  // Flat/Gouraud OpenGL drawing
+  virtual void draw(Viewer *viewer) const = 0;
+  // Wireframe OpenGL drawing
+  virtual void draw_edges(Viewer *viewer) const { draw(viewer); }
+  // Points OpenGL drawing
+  virtual void draw_points(Viewer *viewer) const { draw(viewer); }
+
+  // Functions for displaying meta-data of the item
+  virtual QString toolTip() const = 0;
+  virtual QPixmap graphicalToolTip() const { return QPixmap(); }
+  virtual QFont font() const { return QFont(); }
+
+  // Functions that help the Scene to compute its bbox
+  virtual bool isFinite() const { return true; }
+  virtual bool isEmpty() const { return true; }
+  virtual Bbox bbox() const { return Bbox(); }
+
+  // Function about manipulation
+  virtual bool manipulatable() const { return false; }
+  virtual ManipulatedFrame* manipulatedFrame() { return 0; }
+
+  // Getters for the four basic properties
+  virtual QColor color() const { return color_; }
+  virtual QString name() const { return name_; }
+  virtual bool visible() const { return visible_; }
+  virtual RenderingMode renderingMode() const { return rendering_mode; }
+  virtual QString renderingModeName() const; // Rendering mode as a human readable string
+
+public Q_SLOTS:
+  // Call that once you have finished changing something in the item
+  // (either the properties or internal data)
+  virtual void changed() {}
+  virtual void contextual_changed() {}
+
+  // Setters for the four basic properties
+  virtual void setColor(QColor c) { color_ = c; }
+  virtual void setName(QString n) { name_ = n; }
+  virtual void setVisible(bool b) { visible_ = b; }
+  virtual void setRenderingMode(RenderingMode m) { 
+    if (supportsRenderingMode(m))
+      rendering_mode = m; 
+  }
+
+  virtual void itemAboutToBeDestroyed(Scene_item*);
+
+Q_SIGNALS:
+  void aboutToBeDestroyed();
+
+protected:
+  // The four basic properties
+  QString name_;
+  QColor color_;
+  bool visible_;
+  RenderingMode rendering_mode;
+
+}; // end class Scene_item
+
+#endif // SCENE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Scene_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Scene_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Viewer.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Viewer.h
new file mode 100644
index 0000000..9712cc4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Viewer.h
@@ -0,0 +1,50 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <CGAL_demo/Viewer_config.h>
+#include <QGLViewer/qglviewer.h>
+#include <QPoint>
+#include <QOpenGLFunctions_2_1>
+
+// forward declarations
+class QWidget;
+class Scene_draw_interface;
+
+class VIEWER_EXPORT Viewer : public QGLViewer, public QOpenGLFunctions_2_1 {
+
+  Q_OBJECT
+
+public:
+  Viewer(QWidget * parent, bool antialiasing = false);
+
+  // overload several QGLViewer virtual functions
+  void draw();
+  void initializeGL();
+  void drawWithNames();
+  void postSelection(const QPoint&);
+  virtual void postDraw();
+
+  void setScene(Scene_draw_interface* scene);
+  void setMask(bool b, double ratio=1);
+  bool antiAliasing() const { return antialiasing; }
+
+Q_SIGNALS:
+  void selected(int);
+  void pointSelected(QPoint);
+
+public Q_SLOTS:
+  void setAntiAliasing(bool b);
+  void setTwoSides(bool b);
+
+private:
+  void draw_aux(bool with_names);
+  void draw_mask();
+
+  Scene_draw_interface* scene;
+  bool antialiasing;
+  bool twosides;
+  bool mask_;
+  double ratio_;
+}; // end class Viewer
+
+#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Viewer_config.h b/3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Viewer_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/include/CGAL_demo/Viewer_config.h
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/include/CGAL_demo/Viewer_config.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/about.html b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/about.html
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/about.html
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-off.png b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-off.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-off.png
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-off.png
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-off.svg b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-off.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-off.svg
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-off.svg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-on.png b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-on.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/check-on.png
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/check-on.png
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/check.svg b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/check.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/check.svg
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/check.svg
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/editcopy.png b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/editcopy.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/editcopy.png
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/editcopy.png
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/minus.png b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/minus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/minus.png
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/minus.png
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/resources/plus.png b/3rdparty/CGAL-4.8/demo/Mesh_3/resources/plus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/resources/plus.png
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/resources/plus.png
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp
new file mode 100644
index 0000000..0417694
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Plugin_helper.cpp
@@ -0,0 +1,111 @@
+#include <CGAL_demo/Plugin_helper.h>
+#include <QMainWindow>
+#include <QAction>
+#include <QMetaObject>
+#include <QMetaMethod>
+#include <QtDebug>
+#include <QVector>
+#include <QSet>
+
+QAction*
+Plugin_helper::
+getActionFromMainWindow(QMainWindow* mw,
+                        QString action_name)
+{
+  return mw->findChild<QAction*>(action_name);
+}
+
+QStringList 
+Plugin_helper::actionsNames() const
+{
+  return QStringList();
+}
+
+void
+Plugin_helper::
+init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
+  mw = mainWindow;
+  scene = scene_interface;
+  Q_FOREACH(QString actionName, actionsNames())
+  {
+    actions_map[actionName] = getActionFromMainWindow(mw, actionName);
+  }
+  autoConnectActions();
+}
+
+QList<QAction*> 
+Plugin_helper::actions() const
+{
+  return actions_map.values();
+}
+
+// Auto-connect actions to slots
+void Plugin_helper::autoConnectActions()
+{
+  QObject* thisObject = dynamic_cast<QObject*>(this);
+  if(!thisObject)
+    return;
+
+  const QMetaObject* metaObject = thisObject->metaObject();
+  QVector<QMetaMethod> methods;
+  QVector<QString> methodsNames;
+  QSet<QString> connected;
+  for(int i = metaObject->methodOffset();
+      i < metaObject->methodCount();
+      ++i)
+  {
+    const int pos = QString(metaObject->method(i).methodSignature()).indexOf('(');
+    methodsNames << QString(metaObject->method(i).methodSignature()).left(pos);
+    methods << metaObject->method(i);
+  }
+
+  Q_FOREACH(QAction* action, actions())
+  {
+    bool success = false;
+//     qDebug("Autoconnecting action \"%s\"...", 
+//            action->objectName().toUtf8().data());
+    const QMetaObject* action_metaObject = action->metaObject();
+    for(int i = action_metaObject->methodOffset();
+        i < action_metaObject->methodCount(); ++i)
+    {
+      QMetaMethod action_method = action_metaObject->method(i);
+        
+      if(action_method.methodType() == QMetaMethod::Signal)
+      {
+        const int pos = QString(action_method.methodSignature()).indexOf('(');
+        QString methodName = QString(action_method.methodSignature()).left(pos);
+        QString slotName = 
+          QString("on_%1_%2").arg(action->objectName()).arg(methodName);
+//         qDebug() << thisObject->tr("Slot %1 (%2)...").arg(slotName).arg(i);
+        int index = methodsNames.indexOf(slotName);
+  
+	if(index>=0 && !connected.contains(slotName)) 
+	{
+          const bool ok = 
+            QObject::connect(action, 
+                             qPrintable(QString("2%1").arg(QString(action_method.methodSignature()))),
+                             thisObject,
+                             qPrintable(QString("1%1").arg(QString(methods[index].methodSignature()))));
+          if(!ok)
+          {
+            qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
+              .arg(action->objectName())
+              .arg(QString(action_method.methodSignature()))
+              .arg(QString(methods[index].methodSignature()));
+          }
+          else {
+//             qDebug("  ->Connected!");
+            success = true;
+            connected << slotName;
+          }
+        }
+//         else {
+//           qDebug(" nothing found!\n");
+//         }
+      }
+    } // end for each method of action
+    if(!success)
+      qDebug("ERROR: Failed to autoconnect the action \"%s\"!",
+             action->objectName().toUtf8().data());
+  } // end foreach action of actions()
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp
new file mode 100644
index 0000000..5f656d8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp
@@ -0,0 +1,588 @@
+#include <CGAL_demo/Scene.h>
+#include <CGAL_demo/Scene_item.h>
+
+#include <QString>
+#include <QGLWidget>
+#include <QEvent>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QColorDialog>
+#include <QApplication>
+#include <QPointer>
+
+#include <CGAL_demo/Viewer.h>
+
+namespace {
+  void CGALglcolor(QColor c)
+  {
+    ::glColor4f(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
+  }
+}
+
+Scene::Scene(QObject* parent)
+  : QAbstractListModel(parent),
+    selected_item(-1),
+    item_A(-1),
+    item_B(-1)
+{
+}
+
+Scene::Item_id
+Scene::addItem(Scene_item* item)
+{
+  entries.push_back(item);
+  connect(this, SIGNAL(itemAboutToBeDestroyed(Scene_item*)),
+          item, SLOT(itemAboutToBeDestroyed(Scene_item*)));
+
+  QAbstractListModel::beginResetModel();
+  Q_EMIT updated_bbox();
+  Q_EMIT updated();
+  QAbstractListModel::endResetModel();
+
+  return entries.size() - 1;
+}
+
+int
+Scene::erase(int index)
+{
+  if(index < 0 || index >= entries.size())
+    return -1;
+
+  Scene_item* item = entries[index];
+
+  QAbstractListModel::beginResetModel();
+  Q_EMIT itemAboutToBeDestroyed(item);
+  delete item;
+  entries.removeAt(index);
+
+  selected_item = -1;
+  Q_EMIT updated();
+  QAbstractListModel::endResetModel();
+
+  if(--index >= 0)
+    return index;
+  if(!entries.isEmpty())
+    return 0;
+  return -1;
+}
+
+Scene::~Scene()
+{
+  Q_FOREACH(Scene_item* item_ptr, entries)
+  {
+    delete item_ptr;
+  }
+  entries.clear();
+}
+
+Scene_item*
+Scene::item(Item_id index) const
+{
+  return entries.value(index); // QList::value checks bounds
+}
+
+size_t
+Scene::numberOfEntries() const
+{
+  return entries.size();
+}
+
+// Duplicate a scene item.
+// Return the ID of the new item (-1 on error).
+Scene::Item_id
+Scene::duplicate(Item_id index)
+{
+  if(index < 0 || index >= entries.size())
+    return -1;
+
+  const Scene_item* item = entries[index];
+  Scene_item* new_item = item->clone();
+  if(new_item) {
+    new_item->setName(tr("%1 (copy)").arg(item->name()));
+    new_item->setColor(item->color());
+    new_item->setVisible(item->visible());
+    addItem(new_item);
+    return entries.size() - 1;
+  }
+  else
+    return -1;
+}
+
+
+void 
+Scene::draw(Viewer* viewer)
+{
+  draw_aux(false, viewer);
+}
+void 
+Scene::drawWithNames(Viewer *viewer)
+{
+  draw_aux(true,viewer);
+}
+
+void 
+Scene::draw_aux(bool with_names, Viewer *viewer)
+{
+  // Flat/Gouraud OpenGL drawing
+  for(int index = 0; index < entries.size(); ++index)
+  {
+    if(with_names) {
+      ::glPushName(index);
+    }
+    Scene_item& item = *entries[index];
+    if(item.visible())
+    {
+      item.contextual_changed();
+      if(item.renderingMode() == Flat || item.renderingMode() == FlatPlusEdges || item.renderingMode() == Gouraud)
+      {  
+        ::glPointSize(2.f);
+        ::glLineWidth(1.0f);
+    if(index == selected_item)
+      CGALglcolor(item.color().lighter(120));
+    else
+      CGALglcolor(item.color());
+    if(item.renderingMode() == Gouraud)
+      ::glShadeModel(GL_SMOOTH);
+    else
+      ::glShadeModel(GL_FLAT);
+
+        item.draw(viewer);
+      }
+    }
+    if(with_names) {
+      ::glPopName();
+    }
+  }
+
+  // Wireframe OpenGL drawing
+  for(int index = 0; index < entries.size(); ++index)
+  {
+    if(with_names) {
+      ::glPushName(index);
+    }
+    Scene_item& item = *entries[index];
+    if(item.visible())
+    {
+      if(item.renderingMode() == FlatPlusEdges || item.renderingMode() == Wireframe)
+      {
+
+        ::glPointSize(2.f);
+        ::glLineWidth(1.0f);
+        if(index == selected_item)
+          CGALglcolor(Qt::black);
+        else
+          CGALglcolor(item.color().lighter(50));
+
+        item.draw_edges(viewer);
+      }
+      if(with_names) {
+        ::glPopName();
+      }
+    }
+  }
+
+  // Points OpenGL drawing
+  for(int index = 0; index < entries.size(); ++index)
+  {
+    if(with_names) {
+      ::glPushName(index);
+    }
+    Scene_item& item = *entries[index];
+    if(item.visible())
+    {
+      if(item.renderingMode() == Points)
+      {
+        ::glEnable(GL_POINT_SMOOTH);
+        ::glPointSize(2.f);
+        ::glLineWidth(1.0f);
+        if(index == selected_item)
+          CGALglcolor(Qt::black);
+        else
+          CGALglcolor(item.color().lighter(50));
+        
+        item.draw_points(viewer);
+        ::glDisable(GL_POINT_SMOOTH);
+      }
+      if(with_names) {
+        ::glPopName();
+      }
+    }
+  }
+}
+
+// workaround for Qt-4.2 (see above)
+#undef lighter
+
+int 
+Scene::rowCount(const QModelIndex & parent) const
+{
+  if (parent.isValid())
+    return 0;
+  else
+    return entries.size();
+}
+
+int 
+Scene::columnCount(const QModelIndex & parent) const
+{
+  if (parent.isValid())
+    return 0;
+  else
+    return NumberOfColumns;
+}
+
+QVariant 
+Scene::data(const QModelIndex &index, int role) const
+{
+  if (!index.isValid())
+    return QVariant();
+
+  if(index.row() < 0 || index.row() >= entries.size())
+    return QVariant();
+
+  if(role == ::Qt::ToolTipRole)
+  {
+    return entries[index.row()]->toolTip();
+  }
+  switch(index.column())
+  {
+  case ColorColumn:
+    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+      return entries.value(index.row())->color();
+    else if(role == ::Qt::DecorationRole)
+      return entries.value(index.row())->color();
+    break;
+  case NameColumn:
+    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+      return entries.value(index.row())->name();
+    if(role == ::Qt::FontRole)
+      return entries.value(index.row())->font();
+    break;
+  case RenderingModeColumn:
+    if(role == ::Qt::DisplayRole) {
+      return entries.value(index.row())->renderingModeName();
+    }
+    else if(role == ::Qt::EditRole) {
+      return static_cast<int>(entries.value(index.row())->renderingMode());
+    }
+    else if(role == ::Qt::TextAlignmentRole) {
+      return ::Qt::AlignCenter;
+    }
+    break;
+  case ABColumn:
+    if(role == ::Qt::DisplayRole) {
+      if(index.row() == item_A)
+	return "A";
+      if(index.row() == item_B)
+	return "B";
+    }
+    else if(role == ::Qt::TextAlignmentRole) {
+      return ::Qt::AlignCenter;
+    }
+    break;
+  case VisibleColumn:
+    if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+      return entries.value(index.row())->visible();
+    break;
+  default:
+    return QVariant();
+  }
+  return QVariant();
+}
+
+QVariant 
+Scene::headerData ( int section, ::Qt::Orientation orientation, int role ) const
+{
+  if(orientation == ::Qt::Horizontal)  {
+    if (role == ::Qt::DisplayRole)
+    {
+      switch(section)
+      {
+      case NameColumn:
+	return tr("Name");
+	break;
+      case ColorColumn:
+	return tr("Color");
+	break;
+      case RenderingModeColumn:
+	return tr("Mode");
+      case ABColumn:
+	return tr("A/B");
+	break;
+      case VisibleColumn:
+	return tr("View");
+	break;
+      default:
+	return QVariant();
+      }
+    }
+    else if(role == ::Qt::ToolTipRole) {
+      if(section == RenderingModeColumn) {
+	return tr("Rendering mode (points/wireframe/flat/flat+edges/Gouraud)");
+      }
+      else if(section == ABColumn) {
+	return tr("Selection A/Selection B");
+      }
+    }
+  }
+  return QAbstractListModel::headerData(section, orientation, role);
+}
+
+Qt::ItemFlags 
+Scene::flags ( const QModelIndex & index ) const
+{
+  if (index.isValid() && index.column() == NameColumn) {
+    return QAbstractListModel::flags(index) | ::Qt::ItemIsEditable;
+  }
+  else {
+    return QAbstractListModel::flags(index); 
+  }
+}
+
+bool 
+Scene::setData(const QModelIndex &index, 
+	       const QVariant &value,
+	       int role)
+{
+  if( role != ::Qt::EditRole || !index.isValid() )
+    return false;
+
+  if(index.row() < 0 || index.row() >= entries.size())
+    return false;
+
+  Scene_item* item = entries[index.row()];
+  if(!item) return false;
+  switch(index.column())
+  {
+  case NameColumn:
+    item->setName(value.toString());
+    item->changed();
+    Q_EMIT dataChanged(index, index);
+    return true;
+    break;
+  case ColorColumn:
+    item->setColor(value.value<QColor>());
+    item->changed();
+    Q_EMIT dataChanged(index, index);
+    return true;
+    break;
+  case RenderingModeColumn:
+  {
+    RenderingMode rendering_mode = static_cast<RenderingMode>(value.toInt());
+    // Find next supported rendering mode
+    while ( ! item->supportsRenderingMode(rendering_mode) ) {
+      rendering_mode = static_cast<RenderingMode>( (rendering_mode+1) % NumberOfRenderingMode );
+    }
+    item->setRenderingMode(rendering_mode);
+    item->changed();
+    Q_EMIT dataChanged(index, index);
+    return true;
+    break;
+  }
+  case VisibleColumn:
+    item->setVisible(value.toBool());
+    item->changed();
+    Q_EMIT dataChanged(index, index);
+    return true;
+  default:
+    return false;
+  }
+  return false;
+}
+
+Scene::Item_id Scene::mainSelectionIndex() const {
+  return selected_item;
+}
+
+int Scene::selectionAindex() const {
+  return item_A;
+}
+
+int Scene::selectionBindex() const {
+  return item_B;
+}
+
+QItemSelection Scene::createSelection(int i)
+{
+  return QItemSelection(QAbstractItemModel::createIndex(i, 0),
+    QAbstractItemModel::createIndex(i, LastColumn));
+}
+
+void Scene::itemChanged(Item_id i)
+{
+  if(i < 0 || i >= entries.size())
+    return;
+
+  entries[i]->changed();
+  Q_EMIT dataChanged(QAbstractItemModel::createIndex(i, 0),
+    QAbstractItemModel::createIndex(i, LastColumn));
+}
+
+void Scene::itemChanged(Scene_item* item)
+{
+  item->changed();
+  Q_EMIT dataChanged(QAbstractItemModel::createIndex(0, 0),
+    QAbstractItemModel::createIndex(entries.size() - 1, LastColumn));
+}
+
+bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
+				const QStyleOptionViewItem &option,
+				const QModelIndex &index)
+{
+  Scene *scene = static_cast<Scene*>(model);
+  Q_ASSERT(scene);
+  switch(index.column()) {
+  case Scene::VisibleColumn:
+    if (event->type() == QEvent::MouseButtonPress) {
+      QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+      if(mouseEvent->button() == ::Qt::LeftButton) {
+	int x = mouseEvent->pos().x() - option.rect.x();
+	if(x >= (option.rect.width() - size)/2 && 
+	  x <= (option.rect.width() + size)/2) {
+	    model->setData(index, ! model->data(index).toBool() );
+	}
+      }
+      return false; //so that the selection can change
+    }
+    return true;
+    break;
+  case Scene::ColorColumn:
+    if (event->type() == QEvent::MouseButtonPress) {
+      QColor color = 
+        QColorDialog::getColor(model->data(index).value<QColor>(),
+                               0/*,
+                               tr("Select color"),
+                               QColorDialog::ShowAlphaChannel*/);
+      if (color.isValid()) {
+	model->setData(index, color );
+      }
+    }
+    else if(event->type() == QEvent::MouseButtonDblClick) {
+      return true; // block double-click
+    }
+    return false;
+    break;
+  case Scene::RenderingModeColumn:
+    if (event->type() == QEvent::MouseButtonPress) {
+      // Switch rendering mode
+      /*RenderingMode*/int rendering_mode = model->data(index, ::Qt::EditRole).toInt();
+      rendering_mode = (rendering_mode+1) % NumberOfRenderingMode;
+      model->setData(index, rendering_mode);
+    }
+    else if(event->type() == QEvent::MouseButtonDblClick) {
+      return true; // block double-click
+    }
+    return false;
+    break;
+  case Scene::ABColumn:
+    if (event->type() == QEvent::MouseButtonPress) {
+      if(index.row() == scene->item_B) {
+	scene->item_A = index.row();
+	scene->item_B = -1;
+      }
+      else if(index.row() == scene->item_A) {
+	scene->item_B = index.row();
+	scene->item_A = -1;
+      }
+      else if(scene->item_A == -1) {
+	scene->item_A = index.row();
+      }
+      else {
+	scene->item_B = index.row();
+      }
+      scene->dataChanged(scene->createIndex(Scene::ABColumn, 0),
+	scene->createIndex(Scene::ABColumn, scene->rowCount()));
+    }
+    return false;
+    break;
+  default:
+    return QItemDelegate::editorEvent(event, model, option, index);
+  }
+}
+
+void SceneDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+			  const QModelIndex &index) const
+{
+  if (index.column() != Scene::VisibleColumn) {
+    QItemDelegate::paint(painter, option, index);
+  } else {
+    const QAbstractItemModel *model = index.model();
+    QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ?
+      (option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive : QPalette::Disabled;
+
+    if (option.state & QStyle::State_Selected)
+      painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight));
+
+    bool checked = model->data(index, ::Qt::DisplayRole).toBool();
+    int width = option.rect.width();
+    int height = option.rect.height();
+    size = (std::min)(width, height);
+    int x = option.rect.x() + (option.rect.width() / 2) - (size / 2);;
+    int y = option.rect.y() + (option.rect.height() / 2) - (size / 2);
+    if(checked) {
+      painter->drawPixmap(x, y, checkOnPixmap.scaled(QSize(size, size),
+	::Qt::KeepAspectRatio,
+	::Qt::SmoothTransformation));
+    }
+    else {
+      painter->drawPixmap(x, y, checkOffPixmap.scaled(QSize(size, size),
+	::Qt::KeepAspectRatio,
+	::Qt::SmoothTransformation));
+    }
+    drawFocus(painter, option, option.rect); // since we draw the grid ourselves
+  }
+}
+
+void Scene::setItemVisible(int index, bool b)
+{
+  if( index < 0 || index >= entries.size() )
+    return;
+  entries[index]->setVisible(b);
+  Q_EMIT dataChanged(QAbstractItemModel::createIndex(index, VisibleColumn),
+    QAbstractItemModel::createIndex(index, VisibleColumn));
+}
+
+void Scene::setItemA(int i)
+{
+  item_A = i;
+  if(item_A == item_B)
+  {
+    item_B = -1;
+  }
+  Q_EMIT dataChanged(QAbstractItemModel::createIndex(0, ABColumn),
+    QAbstractItemModel::createIndex(entries.size()-1, ABColumn));
+}
+
+void Scene::setItemB(int i)
+{
+  item_B = i;
+  if(item_A == item_B)
+  {
+    item_A = -1;
+  }
+  Q_EMIT updated();
+  Q_EMIT dataChanged(QAbstractItemModel::createIndex(0, ABColumn),
+    QAbstractItemModel::createIndex(entries.size()-1, ABColumn));
+}
+
+Scene::Bbox Scene::bbox() const
+{
+  if(entries.empty())
+    return Bbox();
+
+  bool bbox_initialized = false;
+  Bbox bbox;
+  Q_FOREACH(Scene_item* item, entries) 
+  {
+    if(item->isFinite() && !item->isEmpty()) {
+      if(bbox_initialized) {
+        bbox = bbox + item->bbox();
+      }
+      else { 
+        bbox = item->bbox();
+        bbox_initialized = true;
+      }
+    }
+  }
+  return bbox;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp
new file mode 100644
index 0000000..b8d6ab0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Scene_item.cpp
@@ -0,0 +1,31 @@
+#include <CGAL_demo/Scene_item.h>
+
+const QColor Scene_item::defaultColor = QColor(100, 100, 255);
+
+Scene_item::~Scene_item() {}
+
+void Scene_item::itemAboutToBeDestroyed(Scene_item* item) {
+  if(this == item)
+    Q_EMIT aboutToBeDestroyed();
+}
+
+// Rendering mode as a human readable string
+QString Scene_item::renderingModeName() const
+{
+  switch(renderingMode()) 
+  {
+    case Points:
+      return tr("points");
+    case Wireframe:
+      return tr("wire");
+    case Flat:
+      return tr("flat");
+    case FlatPlusEdges:
+      return tr("flat+edges");
+    case Gouraud:
+      return tr("Gouraud");
+    default:
+      Q_ASSERT(false);
+      return tr("unknown");
+  }
+} 
diff --git a/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp
new file mode 100644
index 0000000..908ed02
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp
@@ -0,0 +1,169 @@
+#include <CGAL_demo/Viewer.h>
+#include <CGAL_demo/Scene_draw_interface.h>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+Viewer::Viewer(QWidget* parent, bool antialiasing)
+  : QGLViewer(CGAL::Qt::createOpenGLContext(), parent),
+    scene(0),
+    antialiasing(antialiasing),
+    twosides(false),
+    mask_(false),
+    ratio_(1.)
+{
+  setMouseTracking(true);
+}
+
+void Viewer::setScene(Scene_draw_interface* scene)
+{
+  this->scene = scene;
+}
+
+void Viewer::setAntiAliasing(bool b)
+{
+  antialiasing = b;
+  updateGL();
+}
+
+void Viewer::setTwoSides(bool b)
+{
+  twosides = b;
+  updateGL();
+}
+
+void Viewer::setMask(bool b, double r)
+{
+  mask_ = b;
+  ratio_ = r;
+  updateGL();
+}
+
+void Viewer::draw()
+{
+  draw_aux(false);
+}
+
+void Viewer::initializeGL()
+{
+  QGLViewer::initializeGL();
+  initializeOpenGLFunctions();
+   setBackgroundColor(::Qt::white);
+}
+
+void Viewer::draw_aux(bool with_names)
+{
+  QGLViewer::draw();
+  glEnable(GL_DEPTH_TEST);
+  if(scene == 0)
+    return;
+
+  ::glLineWidth(1.0f);
+  ::glPointSize(2.f);
+  ::glEnable(GL_POLYGON_OFFSET_FILL);
+  ::glPolygonOffset(1.0f,1.0f);
+  ::glClearColor(1.0f,1.0f,1.0f,0.0f);
+  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+
+  if(twosides)
+    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+  else
+    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
+
+  if(antiAliasing())
+  {
+    ::glEnable(GL_BLEND);
+    ::glEnable(GL_LINE_SMOOTH);
+    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  }
+  else
+  {
+    ::glDisable(GL_BLEND);
+    ::glDisable(GL_LINE_SMOOTH);
+    ::glDisable(GL_POLYGON_SMOOTH_HINT);
+    ::glBlendFunc(GL_ONE, GL_ZERO);
+    ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
+  }
+  if(with_names)
+    scene->drawWithNames(this);
+  else
+    scene->draw(this);
+}
+
+void Viewer::drawWithNames()
+{
+  draw_aux(true);
+}
+
+void Viewer::postSelection(const QPoint& p)
+{
+  Q_EMIT selected(this->selectedName());
+  // do a redraw
+  draw();
+  Q_EMIT pointSelected(p);
+}
+
+void Viewer::postDraw()
+{
+  QGLViewer::postDraw();
+  
+  if ( mask_ )
+  {
+    draw_mask();
+  }
+}
+
+void Viewer::draw_mask()
+{
+  // fill grid with transparent blue
+  ::glColor4f(.4f, .4f, .4f, .7f);
+  
+  this->startScreenCoordinatesSystem();
+  
+  int width = this->width();
+  int height = this->height();
+  double widthF = static_cast<double>(width);
+  double heightF = static_cast<double>(height);
+  
+  ::glDisable(GL_LIGHTING);
+  ::glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); 
+  ::glEnable(GL_BLEND);
+  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+  
+  // Draws the background quad
+  ::glBegin(GL_QUADS);
+  
+  if ( widthF > (ratio_*heightF) )
+  {
+    int w1 = static_cast<int>( (widthF-(heightF*ratio_)) / 2 );
+    int w2 = width - w1;
+    
+    ::glVertex2i( 0, 0);
+    ::glVertex2i( 0, height);
+    ::glVertex2i( w1, height);
+    ::glVertex2i( w1, 0);
+    
+    ::glVertex2i( w2, 0);
+    ::glVertex2i( w2, height);
+    ::glVertex2i( width, height);
+    ::glVertex2i( width, 0);
+  }
+  else
+  {
+    int h1 = static_cast<int>( (heightF-(widthF/ratio_)) / 2 );
+    int h2 = height - h1;
+    
+    ::glVertex2i( 0, 0);
+    ::glVertex2i( 0, h1);
+    ::glVertex2i( width, h1);
+    ::glVertex2i( width, 0);
+    
+    ::glVertex2i( 0, h2);
+    ::glVertex2i( 0, height);
+    ::glVertex2i( width, height);
+    ::glVertex2i( width, h2);
+  }
+  ::glEnd();
+  
+  ::glDisable(GL_BLEND);
+  this->stopScreenCoordinatesSystem();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Function_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Function_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Function_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Function_dialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Image_res_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Image_res_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Image_res_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Image_res_dialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/LocalOptim_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/LocalOptim_dialog.ui
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/LocalOptim_dialog.ui
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/LocalOptim_dialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/MainWindow.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Meshing_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Meshing_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Meshing_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Meshing_dialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Rib_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Rib_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Rib_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Rib_dialog.ui
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Smoother_dialog.ui b/3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Smoother_dialog.ui
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Smoother_dialog.ui
copy to 3rdparty/CGAL-4.8/demo/Mesh_3/ui_files/Smoother_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt
new file mode 100644
index 0000000..71e49e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt
@@ -0,0 +1,116 @@
+# This is the CMake script for compiling the Optimal_transportation_reconstruction_2 demo.
+
+project(Optimal_transportation_reconstruction_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Include this package's headers first
+include_directories( BEFORE ./ ./include ../../include )
+
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+find_package(Qt5 5.4 QUIET COMPONENTS OpenGL)
+if(Qt5_FOUND)
+  add_definitions(-DQT_NO_KEYWORDS)
+endif(Qt5_FOUND)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find CImg
+find_path(CIMG_INCLUDE_DIR
+          NAMES CImg.h
+          HINTS ENV CIMG_INC_DIR
+          DOC "Path to the header of the CImg library")
+
+if (CIMG_INCLUDE_DIR)
+  add_definitions(-DCGAL_USE_CIMG)
+  include_directories(${CIMG_INCLUDE_DIR})
+  MESSAGE(STATUS "CImg library found, the demo can load point set from image files.")
+else()
+  MESSAGE(STATUS "CImg library was not found, the demo will not be able to load point set from image files. "
+                 "Try setting the environment variable CIMG_INC_DIR to point to the path of the directory containing CImg.h.")
+endif()
+
+if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND)
+
+  set(
+  SRCS 
+  glviewer.cpp 
+  Otr2_demo.cpp 
+  window.cpp 
+  render.cpp 
+  )
+
+  set( 
+  MOCS 
+  moc_dialog_options.cxx 
+  moc_glviewer.cxx 
+  moc_window.cxx 
+  )
+
+  set(
+  UIS
+  pwsrec.ui 
+  options.ui
+  )
+  
+  qt5_wrap_ui( UI_FILES ${UIS} )
+
+  include(AddFileDependencies)
+
+  qt5_generate_moc( "window.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_window.cxx" )
+  add_file_dependencies( moc_window.cxx "${CMAKE_CURRENT_SOURCE_DIR}/window.h" )
+
+  qt5_generate_moc( "glviewer.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_glviewer.cxx" )
+  add_file_dependencies( moc_glviewer.cxx "${CMAKE_CURRENT_SOURCE_DIR}/glviewer.h" )
+
+  qt5_generate_moc( "dialog_options.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_dialog_options.cxx" )
+  add_file_dependencies( moc_dialog_options.cxx "${CMAKE_CURRENT_SOURCE_DIR}/dialog_options.h" )
+
+  qt5_add_resources ( RESOURCE_FILES pwsrec.qrc )
+
+  add_executable  ( Optimal_transportation_reconstruction_2_demo ${SRCS} ${MOCS} ${UI_FILES} ${RESOURCE_FILES} ${CGAL_ADDITIONAL_FILES} ${CGAL_RESOURCE_FILES})
+  
+  qt5_use_modules(Optimal_transportation_reconstruction_2_demo OpenGL)
+
+  # Link with Qt libraries
+  target_link_libraries( Optimal_transportation_reconstruction_2_demo ${QT_LIBRARIES} )
+
+  # Link with CGAL
+  target_link_libraries( Optimal_transportation_reconstruction_2_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+  # Link with OpenGL
+  target_link_libraries( Optimal_transportation_reconstruction_2_demo ${OPENGL_gl_LIBRARY} )
+    
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Optimal_transportation_reconstruction_2_demo )
+
+else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND )
+
+  set(OTR2_MISSING_DEPS "")
+
+  if(NOT CGAL_FOUND)
+    set(OTR2_MISSING_DEPS "the CGAL library, ${OTR2_MISSING_DEPS}")
+  endif()
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(OTR2_MISSING_DEPS "the CGAL Qt5 library, ${OTR2_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(OTR2_MISSING_DEPS "Qt5.4, ${OTR2_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(OTR2_MISSING_DEPS "OpenGL, ${OTR2_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${OTR2_MISSING_DEPS}and will not be compiled.")
+
+endif (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND)
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp
new file mode 100644
index 0000000..1dfe55a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp
@@ -0,0 +1,12 @@
+#include <QtGui>
+#include "window.h"
+
+int main(int argv, char **args)
+{
+  srand(1);
+  QApplication app(argv, args);
+  app.setApplicationName("Optimal_transportation_reconstruction_2 Demo");
+  MainWindow window;
+  window.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h
new file mode 100644
index 0000000..01b1802
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h
@@ -0,0 +1,153 @@
+#ifndef CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_
+#define CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+#include <CGAL/property_map.h>
+#include <CGAL/value_type_traits.h>
+
+#include <CGAL/OTR_2/Sample.h>
+#include <utility>      // std::pair
+#include <vector>
+
+//Qt
+#include <QColor>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point;
+typedef K::FT FT;
+
+typedef std::pair<Point, FT> PointMassPair;
+typedef std::vector<PointMassPair> PointMassList;
+typedef PointMassList::const_iterator InputIterator;
+
+typedef CGAL::value_type_traits<InputIterator>::type MassPoint;
+
+typedef CGAL::First_of_pair_property_map<PointMassPair> Point_property_map;
+typedef CGAL::Second_of_pair_property_map<PointMassPair> Mass_property_map;
+
+typedef CGAL::Optimal_transportation_reconstruction_2<K, Point_property_map,
+    Mass_property_map> Otr_2;
+
+class Optimal_transportation_reconstruction_kerneled_2:
+    public Otr_2 {
+
+public:
+
+  template <typename InputRange>
+  Optimal_transportation_reconstruction_kerneled_2(const InputRange& input_range,
+      Point_property_map point_pmap, Mass_property_map mass_pmap) :
+      Otr_2(input_range, point_pmap,
+          mass_pmap) {
+  }
+
+  Optimal_transportation_reconstruction_kerneled_2() :
+    Otr_2() {
+  }
+
+  // RENDER //
+  void print_stats() const;
+
+  QColor get_color(float value) const;
+
+  void draw_point(const Point& point);
+
+  void draw_segment(const Point& s, const Point& t);
+
+  void draw_edge(const Edge& edge);
+
+  void draw_face(Face_handle face);
+
+  void draw_edge_with_arrow(const Point& s, const Point& t);
+
+  void draw_vertices(const float point_size, const float red,
+      const float green, const float blue);
+
+  void draw_edges(const float line_width, const float red, const float green,
+      const float blue);
+
+  void draw_footpoints(const float line_width, const float red,
+      const float green, const float blue);
+
+  void draw_mesh_footpoints(const Triangulation& mesh, const float line_width,
+      const float red, const float green, const float blue);
+
+  void draw_edge_footpoints(const Triangulation& mesh, const Edge& edge,
+      const float red, const float green, const float blue);
+
+  void draw_pedges(const float line_width);
+
+  void draw_one_pedge(const Edge& edge, const FT value, const FT min_value,
+      const FT max_value, const float line_width);
+
+  void draw_costs(const float line_width, const bool view_ghost);
+
+  void draw_one_cost(const Edge& edge, const FT min_value, const FT max_value,
+      const bool view_ghost);
+
+  void draw_relevance(const float line_width, const int nb);
+
+  void draw_bins(const float thickness);
+
+  void draw_bins_plan0(const Edge& edge);
+
+  void draw_bins_plan1(const Edge& edge);
+
+  void draw_relocation();
+
+  void draw_bezier_curves(const unsigned int nb);
+
+  void draw_one_bezier_curve(const Edge& edge, const unsigned int nb);
+
+  bool locate_edge(const Point& query, Edge& edge);
+
+  void draw_one_ring(const float point_size, const float line_width,
+      const Point& query);
+
+  void draw_mesh_one_ring(const float point_size, const float line_width,
+      const Triangulation& mesh, const Edge& edge);
+
+  void draw_blocking_edges(const float point_size, const float line_width,
+      const Point& query);
+
+  void draw_mesh_blocking_edges(const float point_size,
+      const float line_width, const Triangulation& mesh,
+      const Edge& edge);
+
+  void draw_collapsible_edge(const float point_size, const float line_width,
+      const Point& query);
+
+  void draw_cost_stencil(const float point_size, const float line_width,
+      const Point& query);
+
+  void draw_remove_queue_stencil(const float point_size,
+      const float line_width, const Point& query);
+
+  void draw_push_queue_stencil(const float point_size, const float line_width,
+      const Point& query);
+
+  void draw_bg_faces(const Triangulation& mesh, const float red,
+      const float green, const float blue, const float alpha);
+
+  void draw_bg_edges(const Triangulation& mesh, const float ri,
+      const float gi, const float bi, const float ro, const float go,
+      const float bo);
+
+  void draw_bg_vertices(const Triangulation& mesh, const float red,
+      const float green, const float blue);
+
+  void draw_vertex_faces(Vertex_handle vertex, const Triangulation& mesh,
+      const float red, const float green, const float blue,
+      const float alpha);
+
+  void draw_vertex_edges(Vertex_handle vertex, const Triangulation& mesh,
+      const float ri, const float gi, const float bi, const float ro,
+      const float go, const float bo);
+
+  void save_edges(std::ofstream& ofs, const int nb);
+
+  void save_one_edge(std::ofstream& ofs, const Edge& edge);
+
+};
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/blob00.xy b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/blob00.xy
new file mode 100644
index 0000000..648acc4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/blob00.xy
@@ -0,0 +1,320 @@
+0.21658 0.688199
+0.225464 0.697612
+0.234416 0.706629
+0.243414 0.71525
+0.25244 0.723472
+0.261474 0.731295
+0.270497 0.738718
+0.279488 0.745738
+0.28843 0.752355
+0.297301 0.758568
+0.306083 0.764374
+0.314756 0.769774
+0.3233 0.774765
+0.331697 0.779347
+0.339925 0.783517
+0.347967 0.787275
+0.355802 0.79062
+0.363411 0.79355
+0.370775 0.796064
+0.377873 0.798161
+0.384686 0.799839
+0.391196 0.801097
+0.397381 0.801934
+0.403224 0.802348
+0.408703 0.802339
+0.4138 0.801904
+0.418496 0.801044
+0.42277 0.799755
+0.426603 0.798038
+0.429976 0.795891
+0.432869 0.793312
+0.435263 0.790301
+0.437137 0.786855
+0.438474 0.782974
+0.43931 0.778689
+0.439685 0.774028
+0.439636 0.769024
+0.439204 0.763707
+0.438424 0.758106
+0.437338 0.752252
+0.435982 0.746177
+0.434395 0.739909
+0.432617 0.73348
+0.430684 0.72692
+0.428636 0.720259
+0.426511 0.713529
+0.424348 0.706758
+0.422185 0.699978
+0.420061 0.69322
+0.418013 0.686513
+0.416081 0.679888
+0.414303 0.673375
+0.412718 0.667006
+0.411363 0.660809
+0.410278 0.654817
+0.4095 0.649058
+0.409069 0.643564
+0.409022 0.638366
+0.409399 0.633492
+0.410238 0.628975
+0.411576 0.624843
+0.413454 0.621129
+0.415908 0.617862
+0.418978 0.615072
+0.422702 0.61279
+0.427118 0.611047
+0.432186 0.609809
+0.437863 0.609043
+0.444108 0.608716
+0.45088 0.608795
+0.458138 0.609247
+0.465839 0.610037
+0.473943 0.611135
+0.482408 0.612505
+0.491193 0.614115
+0.500256 0.615932
+0.509556 0.617923
+0.519051 0.620054
+0.5287 0.622293
+0.538462 0.624605
+0.548295 0.626958
+0.558157 0.62932
+0.568008 0.631655
+0.577805 0.633933
+0.587508 0.636118
+0.597075 0.638179
+0.606464 0.640081
+0.615635 0.641793
+0.624545 0.64328
+0.633154 0.644509
+0.641419 0.645448
+0.6493 0.646062
+0.656755 0.64632
+0.663742 0.646187
+0.670221 0.645631
+0.676149 0.644619
+0.681485 0.643117
+0.686188 0.641091
+0.690293 0.638571
+0.693832 0.635583
+0.696841 0.632154
+0.699353 0.628314
+0.701403 0.624088
+0.703024 0.619505
+0.704252 0.614592
+0.705119 0.609377
+0.70566 0.603888
+0.70591 0.598152
+0.705902 0.592197
+0.70567 0.58605
+0.705249 0.579739
+0.704673 0.573291
+0.703976 0.566734
+0.703192 0.560097
+0.702355 0.553405
+0.7015 0.546688
+0.70066 0.539972
+0.69987 0.533285
+0.699163 0.526655
+0.698575 0.52011
+0.698138 0.513676
+0.697888 0.507382
+0.697858 0.501255
+0.698082 0.495323
+0.698595 0.489613
+0.699431 0.484153
+0.700624 0.478971
+0.702208 0.474094
+0.704217 0.469549
+0.706685 0.465365
+0.709587 0.46152
+0.712898 0.457993
+0.716593 0.454762
+0.720646 0.451807
+0.725032 0.449105
+0.729725 0.446635
+0.734701 0.444376
+0.739935 0.442308
+0.7454 0.440407
+0.751072 0.438654
+0.756925 0.437026
+0.762935 0.435503
+0.769075 0.434063
+0.775321 0.432684
+0.781648 0.431346
+0.788029 0.430027
+0.794441 0.428706
+0.800857 0.427361
+0.807252 0.425972
+0.813602 0.424516
+0.81988 0.422972
+0.826062 0.42132
+0.832122 0.419537
+0.838035 0.417603
+0.843776 0.415496
+0.849319 0.413195
+0.85464 0.410678
+0.859712 0.407924
+0.864511 0.404912
+0.869012 0.40162
+0.873189 0.398028
+0.877017 0.394113
+0.880496 0.389894
+0.883627 0.385387
+0.88641 0.380611
+0.888846 0.375582
+0.890935 0.37032
+0.892678 0.36484
+0.894074 0.35916
+0.895126 0.353299
+0.895832 0.347273
+0.896193 0.341101
+0.89621 0.334799
+0.895883 0.328385
+0.895213 0.321877
+0.894201 0.315292
+0.892845 0.308648
+0.891148 0.301962
+0.889109 0.295252
+0.886729 0.288536
+0.884008 0.28183
+0.880947 0.275153
+0.877547 0.268521
+0.873807 0.261954
+0.869727 0.255467
+0.86531 0.249079
+0.860554 0.242807
+0.855461 0.236669
+0.850031 0.230681
+0.844264 0.224863
+0.838161 0.219231
+0.831722 0.213802
+0.824947 0.208595
+0.817838 0.203627
+0.81041 0.198897
+0.802681 0.194407
+0.794667 0.190157
+0.786386 0.186146
+0.777853 0.182375
+0.769085 0.178845
+0.7601 0.175555
+0.750913 0.172505
+0.741543 0.169696
+0.732004 0.167128
+0.722315 0.164802
+0.712492 0.162717
+0.702552 0.160874
+0.692511 0.159272
+0.682386 0.157913
+0.672194 0.156796
+0.661951 0.155922
+0.651675 0.155291
+0.641382 0.154902
+0.631089 0.154757
+0.620812 0.154855
+0.610569 0.155197
+0.600376 0.155783
+0.590249 0.156614
+0.580206 0.157688
+0.570263 0.159007
+0.560437 0.160571
+0.550745 0.16238
+0.541204 0.164434
+0.531829 0.166734
+0.522639 0.169279
+0.513649 0.17207
+0.504849 0.17509
+0.496229 0.178322
+0.487776 0.181749
+0.479481 0.185355
+0.471332 0.189121
+0.463319 0.193031
+0.455431 0.197069
+0.447657 0.201217
+0.439987 0.205458
+0.432409 0.209776
+0.424913 0.214153
+0.417487 0.218572
+0.410121 0.223017
+0.402805 0.22747
+0.395527 0.231915
+0.388277 0.236334
+0.381043 0.240711
+0.373816 0.245028
+0.366583 0.249269
+0.359335 0.253417
+0.35206 0.257455
+0.344747 0.261365
+0.337387 0.265132
+0.329968 0.268737
+0.322478 0.272164
+0.314908 0.275396
+0.307247 0.278416
+0.299483 0.281208
+0.291607 0.283753
+0.283606 0.286035
+0.27547 0.288038
+0.267189 0.289744
+0.258785 0.29118
+0.250279 0.292376
+0.241694 0.293357
+0.233052 0.294152
+0.224375 0.294789
+0.215686 0.295294
+0.207005 0.295697
+0.198356 0.296024
+0.189761 0.296302
+0.181241 0.296561
+0.172819 0.296827
+0.164517 0.297128
+0.156358 0.297491
+0.148362 0.297945
+0.140553 0.298517
+0.132952 0.299234
+0.125581 0.300124
+0.118464 0.301215
+0.111621 0.302535
+0.105075 0.304111
+0.0988486 0.305971
+0.0929632 0.308142
+0.087441 0.310653
+0.0823044 0.31353
+0.0775753 0.316801
+0.0732759 0.320494
+0.0694284 0.324638
+0.0660549 0.329258
+0.0631774 0.334384
+0.0608182 0.340042
+0.0589994 0.34626
+0.057743 0.353066
+0.0570342 0.36043
+0.0568581 0.36832
+0.0571998 0.376706
+0.0580445 0.385557
+0.0593773 0.394842
+0.0611832 0.404531
+0.0634474 0.414593
+0.066155 0.424998
+0.0692912 0.435714
+0.072841 0.446711
+0.0767896 0.457959
+0.081122 0.469426
+0.0858234 0.481082
+0.090879 0.492896
+0.0962737 0.504838
+0.101993 0.516876
+0.108021 0.528981
+0.114345 0.541121
+0.120947 0.553266
+0.127815 0.565385
+0.134933 0.577447
+0.142285 0.589422
+0.149858 0.601278
+0.157636 0.612986
+0.165604 0.624515
+0.173748 0.635833
+0.182053 0.646911
+0.190503 0.657717
+0.199085 0.668221
+0.207782 0.678392
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/maple_leaf_embroidery.bmp b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/maple_leaf_embroidery.bmp
new file mode 100644
index 0000000..385ccb1
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/maple_leaf_embroidery.bmp differ
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy
new file mode 100644
index 0000000..5bb7f3c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy
@@ -0,0 +1,288 @@
+0.117614 0.576166
+0.119993 0.581164
+0.122674 0.586089
+0.125649 0.590936
+0.128908 0.595702
+0.132444 0.600382
+0.136246 0.604972
+0.140307 0.609469
+0.144618 0.613869
+0.149169 0.618167
+0.153953 0.622359
+0.15896 0.626442
+0.164182 0.630412
+0.16961 0.634264
+0.175235 0.637995
+0.181049 0.6416
+0.187042 0.645075
+0.193207 0.648417
+0.199533 0.651622
+0.206013 0.654685
+0.212638 0.657603
+0.219399 0.660371
+0.226287 0.662985
+0.233294 0.665442
+0.24041 0.667738
+0.247628 0.669868
+0.254937 0.671828
+0.262331 0.673616
+0.269799 0.675225
+0.277333 0.676653
+0.284925 0.677896
+0.292565 0.678949
+0.300245 0.679808
+0.307956 0.68047
+0.315696 0.680947
+0.323466 0.681251
+0.331264 0.681394
+0.339088 0.681388
+0.346937 0.681246
+0.35481 0.68098
+0.362707 0.680601
+0.370626 0.680124
+0.378565 0.679558
+0.386524 0.678918
+0.394502 0.678215
+0.402496 0.677461
+0.410508 0.676668
+0.418534 0.675849
+0.426574 0.675016
+0.434627 0.674181
+0.442692 0.673357
+0.450767 0.672555
+0.458851 0.671788
+0.466944 0.671068
+0.475044 0.670408
+0.48315 0.669819
+0.49126 0.669313
+0.499375 0.668904
+0.507491 0.668603
+0.515609 0.668423
+0.523728 0.668375
+0.531845 0.668472
+0.539961 0.668726
+0.548073 0.66915
+0.556181 0.669755
+0.564283 0.670555
+0.572369 0.671529
+0.580427 0.672659
+0.588447 0.673926
+0.596417 0.675311
+0.604327 0.676796
+0.612164 0.678361
+0.619919 0.679988
+0.627581 0.681657
+0.635137 0.683349
+0.642578 0.685046
+0.649892 0.68673
+0.657069 0.688379
+0.664096 0.689977
+0.670963 0.691504
+0.67766 0.692941
+0.684174 0.694269
+0.690496 0.69547
+0.696613 0.696523
+0.702516 0.697412
+0.708192 0.698115
+0.713632 0.698616
+0.718823 0.698894
+0.723755 0.69893
+0.728416 0.698707
+0.732797 0.698205
+0.736885 0.697404
+0.74067 0.696287
+0.744141 0.694834
+0.747286 0.693026
+0.750095 0.690845
+0.752557 0.688271
+0.75466 0.685285
+0.756424 0.681902
+0.757869 0.678134
+0.759015 0.673994
+0.759882 0.669497
+0.760489 0.664656
+0.760855 0.659484
+0.761001 0.653994
+0.760947 0.6482
+0.760711 0.642116
+0.760314 0.635754
+0.759776 0.629129
+0.759115 0.622253
+0.758353 0.615141
+0.757508 0.607805
+0.7566 0.600259
+0.75565 0.592516
+0.754676 0.584591
+0.753699 0.576495
+0.752738 0.568244
+0.751813 0.559849
+0.750943 0.551325
+0.750149 0.542685
+0.749449 0.533942
+0.748865 0.52511
+0.748415 0.516203
+0.748119 0.507233
+0.747997 0.498214
+0.748069 0.48916
+0.748354 0.480084
+0.748872 0.470999
+0.749642 0.46192
+0.750686 0.452858
+0.751974 0.443823
+0.753479 0.434822
+0.755172 0.425865
+0.757027 0.416958
+0.759016 0.408111
+0.761109 0.39933
+0.763281 0.390626
+0.765502 0.382005
+0.767745 0.373475
+0.769983 0.365046
+0.772187 0.356725
+0.774329 0.348521
+0.776382 0.34044
+0.778318 0.332493
+0.780108 0.324686
+0.781726 0.317029
+0.783144 0.309529
+0.784333 0.302194
+0.785265 0.295032
+0.785914 0.288053
+0.78625 0.281263
+0.786247 0.274671
+0.785876 0.268286
+0.785109 0.262115
+0.783919 0.256167
+0.782278 0.250449
+0.780159 0.244971
+0.777532 0.239739
+0.774371 0.234763
+0.770647 0.23005
+0.766333 0.225609
+0.761401 0.221447
+0.755874 0.217555
+0.749779 0.213923
+0.743138 0.210538
+0.735975 0.207392
+0.728316 0.204474
+0.720184 0.201773
+0.711603 0.199279
+0.702598 0.196981
+0.693193 0.19487
+0.683413 0.192935
+0.67328 0.191165
+0.662821 0.18955
+0.652058 0.188079
+0.641016 0.186743
+0.62972 0.18553
+0.618193 0.184431
+0.60646 0.183435
+0.594546 0.182532
+0.582473 0.18171
+0.570267 0.180961
+0.557951 0.180273
+0.545551 0.179635
+0.53309 0.179039
+0.520592 0.178472
+0.508082 0.177926
+0.495584 0.177388
+0.483121 0.17685
+0.47072 0.1763
+0.458402 0.175729
+0.446194 0.175125
+0.434119 0.174478
+0.422201 0.173779
+0.410446 0.173037
+0.398859 0.172265
+0.387448 0.171472
+0.376218 0.17067
+0.365173 0.16987
+0.354321 0.169082
+0.343667 0.168319
+0.333217 0.16759
+0.322977 0.166907
+0.312952 0.166281
+0.303149 0.165722
+0.293573 0.165242
+0.28423 0.164852
+0.275125 0.164562
+0.266266 0.164383
+0.257657 0.164328
+0.249304 0.164405
+0.241214 0.164628
+0.233392 0.165005
+0.225843 0.165549
+0.218575 0.166271
+0.211591 0.167181
+0.204899 0.16829
+0.198505 0.169609
+0.192413 0.17115
+0.18663 0.172923
+0.181162 0.174939
+0.176014 0.17721
+0.171193 0.179745
+0.166703 0.182557
+0.162552 0.185656
+0.158744 0.189053
+0.155266 0.192737
+0.152101 0.196696
+0.149236 0.200921
+0.146654 0.205398
+0.144342 0.210119
+0.142284 0.21507
+0.140466 0.220242
+0.138872 0.225622
+0.137487 0.2312
+0.136297 0.236965
+0.135287 0.242906
+0.134442 0.24901
+0.133747 0.255268
+0.133186 0.261668
+0.132746 0.268199
+0.132411 0.27485
+0.132166 0.28161
+0.131997 0.288467
+0.131887 0.29541
+0.131824 0.302428
+0.131791 0.309511
+0.131773 0.316646
+0.131757 0.323824
+0.131726 0.331031
+0.131666 0.338259
+0.131562 0.345494
+0.131399 0.352727
+0.131162 0.359946
+0.130837 0.36714
+0.130408 0.374298
+0.12986 0.381408
+0.129179 0.38846
+0.128378 0.395453
+0.127471 0.402386
+0.126473 0.40926
+0.125397 0.416075
+0.124256 0.422829
+0.123066 0.429522
+0.121839 0.436154
+0.120589 0.442726
+0.119332 0.449235
+0.118079 0.455683
+0.116846 0.462068
+0.115646 0.468391
+0.114493 0.474651
+0.113401 0.480847
+0.112384 0.48698
+0.111455 0.493049
+0.110629 0.499053
+0.10992 0.504993
+0.109341 0.510868
+0.108906 0.516677
+0.108629 0.522421
+0.108524 0.528098
+0.108605 0.533709
+0.108886 0.539254
+0.109381 0.544731
+0.110103 0.550141
+0.111067 0.555483
+0.112286 0.560757
+0.113774 0.565962
+0.115545 0.571099
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy
new file mode 100644
index 0000000..ee61170
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy
@@ -0,0 +1,430 @@
+-0.00122166 -0.00773919
+0.0183746 0.00256813
+0.0257372 0.00893185
+0.0313877 0.00746208
+0.0402316 -0.00500961
+0.053375 -0.00536058
+0.0583786 0.00420576
+0.0666756 -0.00384259
+0.0767904 -0.00160924
+0.080896 0.00804865
+0.102811 -0.000804773
+0.100045 0.0114237
+0.0936988 0.0130573
+0.100168 0.0220594
+0.100379 0.0424473
+0.108123 0.0565801
+0.101391 0.0665227
+0.0921094 0.0633638
+0.102654 0.084326
+0.0945808 0.0863143
+0.108688 0.103644
+0.0981637 0.109591
+0.100887 0.128656
+0.095212 0.131452
+0.108508 0.149497
+0.0916187 0.155325
+0.107963 0.166861
+0.105509 0.176219
+0.0960659 0.174764
+0.0914405 0.190623
+0.0928504 0.194605
+0.0907416 0.208006
+0.0995773 0.223629
+0.0985995 0.23203
+0.107564 0.230937
+0.108538 0.249637
+0.103462 0.264162
+0.104897 0.27609
+0.106605 0.279925
+0.103956 0.294133
+0.104045 0.301213
+0.094297 0.315367
+0.0989206 0.314798
+0.0970699 0.321979
+0.0977609 0.331805
+0.0967513 0.356959
+0.0923615 0.364591
+0.103043 0.360892
+0.10186 0.383019
+0.0945277 0.383511
+0.0906269 0.403283
+0.104707 0.408077
+0.107607 0.412389
+0.101042 0.436739
+0.102723 0.441435
+0.0976382 0.455005
+0.105984 0.450792
+0.0921784 0.463431
+0.104911 0.480336
+0.107742 0.494669
+0.1059 0.507837
+0.100127 0.493978
+0.115167 0.508639
+0.131321 0.501357
+0.144884 0.499756
+0.149705 0.49338
+0.160131 0.501503
+0.177664 0.502911
+0.172299 0.499796
+0.187188 0.494765
+0.194559 0.502235
+0.204116 0.495498
+0.225035 0.491108
+0.221635 0.495403
+0.233281 0.50643
+0.24366 0.500873
+0.25572 0.502142
+0.268722 0.505225
+0.275647 0.50861
+0.294994 0.496143
+0.293419 0.504528
+0.307066 0.497833
+0.302486 0.471365
+0.30511 0.466037
+0.296839 0.453476
+0.297052 0.454022
+0.305558 0.436998
+0.29437 0.427669
+0.30003 0.410664
+0.292164 0.407791
+0.309504 0.401659
+0.294089 0.397803
+0.290587 0.389628
+0.302815 0.374862
+0.306305 0.351988
+0.296607 0.342618
+0.300362 0.343648
+0.302669 0.33369
+0.302228 0.324261
+0.30787 0.319981
+0.308656 0.29615
+0.297473 0.298987
+0.297284 0.286021
+0.302508 0.274198
+0.297926 0.253585
+0.306388 0.257729
+0.29718 0.240226
+0.291417 0.233297
+0.301991 0.220826
+0.295808 0.20768
+0.297772 0.191886
+0.311828 0.198778
+0.326733 0.199057
+0.335699 0.208398
+0.342018 0.197207
+0.359893 0.207891
+0.363299 0.206163
+0.37842 0.204762
+0.389431 0.195227
+0.395761 0.198392
+0.393806 0.199621
+0.400052 0.202976
+0.398032 0.221961
+0.391155 0.225816
+0.409545 0.241894
+0.40423 0.259094
+0.398803 0.267038
+0.409451 0.263238
+0.401676 0.288315
+0.408467 0.280029
+0.402643 0.292844
+0.408256 0.313541
+0.404447 0.317483
+0.392981 0.337074
+0.399816 0.336164
+0.394484 0.34418
+0.39088 0.36415
+0.39203 0.371914
+0.391907 0.372317
+0.401941 0.394448
+0.400987 0.394615
+0.417735 0.405143
+0.416278 0.401803
+0.421395 0.405243
+0.442464 0.404613
+0.446405 0.397278
+0.463014 0.39944
+0.473157 0.401332
+0.483901 0.399705
+0.497374 0.392277
+0.504382 0.406005
+0.51216 0.396118
+0.52048 0.398171
+0.524319 0.403554
+0.536782 0.402375
+0.545539 0.398904
+0.552183 0.396395
+0.569099 0.392493
+0.575202 0.406169
+0.592704 0.39466
+0.59449 0.396764
+0.608074 0.389467
+0.600166 0.370886
+0.597923 0.366287
+0.601587 0.358051
+0.600937 0.347348
+0.597195 0.347548
+0.605395 0.329387
+0.602064 0.328311
+0.59204 0.31753
+0.608754 0.308838
+0.606836 0.289521
+0.607122 0.280267
+0.604228 0.268436
+0.598703 0.255744
+0.601548 0.241982
+0.591276 0.249206
+0.595159 0.236543
+0.609262 0.226699
+0.599003 0.204057
+0.605558 0.193364
+0.596138 0.18989
+0.590449 0.189215
+0.603921 0.179793
+0.603214 0.15682
+0.603442 0.154098
+0.602044 0.134035
+0.593844 0.127262
+0.597918 0.114888
+0.602149 0.100883
+0.608039 0.0917652
+0.609219 0.0883285
+0.594468 0.0820023
+0.602469 0.0790759
+0.603586 0.0520185
+0.595973 0.0409149
+0.591989 0.0421134
+0.608567 0.0281289
+0.594461 0.0250548
+0.600593 0.0137657
+0.599639 0.00157628
+0.599895 -0.00585589
+0.609005 -0.0140797
+0.597701 -0.0362877
+0.604811 -0.0354598
+0.605016 -0.0516227
+0.602587 -0.0589084
+0.590137 -0.0645576
+0.593835 -0.0891583
+0.607939 -0.091738
+0.594551 -0.102387
+0.611534 -0.106239
+0.625184 -0.103605
+0.636941 -0.109081
+0.637672 -0.105261
+0.651393 -0.0916382
+0.655172 -0.103922
+0.675896 -0.100824
+0.680108 -0.101927
+0.692671 -0.0989151
+0.696164 -0.0908692
+0.698107 -0.0999176
+0.699853 -0.0837907
+0.691846 -0.0743095
+0.707274 -0.0529615
+0.702629 -0.0440761
+0.691692 -0.0401254
+0.691509 -0.0298807
+0.697568 -0.0160726
+0.693099 -0.0122629
+0.706651 0.00356731
+0.695429 0.0112607
+0.701771 0.0294537
+0.699069 0.0313291
+0.703952 0.0496973
+0.69614 0.0522159
+0.708468 0.0641917
+0.699825 0.0657888
+0.695468 0.0752284
+0.705016 0.092067
+0.700804 0.0975295
+0.690721 0.114507
+0.702671 0.120819
+0.70485 0.128139
+0.709694 0.148057
+0.702008 0.148686
+0.706089 0.162461
+0.69493 0.160769
+0.699519 0.186452
+0.690159 0.19336
+0.707262 0.205622
+0.718621 0.190568
+0.726335 0.20088
+0.731698 0.205912
+0.743185 0.201885
+0.753439 0.20819
+0.768572 0.20488
+0.779528 0.207082
+0.773272 0.208088
+0.793631 0.206596
+0.790237 0.207751
+0.801759 0.204492
+0.798805 0.227969
+0.795254 0.225817
+0.796624 0.24745
+0.80304 0.248654
+0.794884 0.256301
+0.793752 0.260228
+0.802505 0.285979
+0.80838 0.281491
+0.794885 0.305537
+0.804035 0.318303
+0.792846 0.327277
+0.809482 0.337347
+0.80741 0.334948
+0.793053 0.344887
+0.796001 0.357606
+0.793567 0.37651
+0.805741 0.382263
+0.794882 0.395962
+0.809418 0.408449
+0.794707 0.41122
+0.809794 0.417814
+0.808296 0.425908
+0.797844 0.441896
+0.797649 0.454191
+0.800572 0.461172
+0.806847 0.477273
+0.804025 0.478534
+0.794143 0.489622
+0.807117 0.50029
+0.801441 0.513039
+0.791911 0.527842
+0.791773 0.526715
+0.805963 0.533142
+0.795421 0.551382
+0.802361 0.561075
+0.795285 0.575691
+0.79309 0.571865
+0.792141 0.582944
+0.801339 0.606662
+0.800409 0.606302
+0.808378 0.629401
+0.795045 0.630595
+0.800627 0.648091
+0.800197 0.648853
+0.792557 0.668632
+0.800245 0.6717
+0.79102 0.684302
+0.803844 0.697712
+0.796665 0.694028
+0.811602 0.692884
+0.828034 0.692578
+0.838018 0.707326
+0.843995 0.705784
+0.858299 0.697298
+0.850106 0.693934
+0.870688 0.70074
+0.884555 0.696456
+0.884922 0.694385
+0.909299 0.701009
+0.897453 0.690613
+0.902015 0.670114
+0.904041 0.662144
+0.894504 0.668457
+0.890369 0.652726
+0.893162 0.64397
+0.901281 0.631899
+0.907147 0.625835
+0.909279 0.612008
+0.899858 0.592522
+0.902907 0.585558
+0.909383 0.572996
+0.895638 0.561044
+0.893485 0.554201
+0.895898 0.555388
+0.90481 0.537979
+0.908845 0.531096
+0.891901 0.520505
+0.890527 0.516273
+0.891665 0.497401
+0.915065 0.505611
+0.928901 0.50764
+0.93544 0.500482
+0.948531 0.499346
+0.958566 0.506247
+0.956153 0.490662
+0.975229 0.504936
+0.972534 0.508754
+0.985539 0.50138
+0.997672 0.500121
+0.990516 0.490971
+0.990056 0.475313
+0.990432 0.467124
+0.996754 0.461194
+1.00053 0.456609
+0.99993 0.443855
+0.994772 0.430845
+0.995444 0.415335
+1.00819 0.401313
+1.00914 0.407238
+1.0085 0.387177
+1.00648 0.384405
+1.00765 0.363267
+1.00105 0.36174
+1.00379 0.356538
+0.997746 0.337323
+0.994447 0.329128
+0.996059 0.324951
+0.9914 0.316145
+1.00923 0.299199
+0.998003 0.296301
+1.00485 0.276163
+0.999457 0.26353
+1.00249 0.262979
+1.00675 0.2577
+0.994071 0.239261
+1.00483 0.222556
+1.00256 0.223583
+1.00569 0.209015
+1.00454 0.208112
+0.996931 0.191932
+0.992461 0.174545
+1.00648 0.178477
+1.00196 0.154454
+0.994058 0.156229
+1.00012 0.147162
+0.990015 0.139125
+1.0001 0.118295
+0.99221 0.119393
+0.997846 0.0921192
+1.01149 0.0935713
+1.01652 0.100792
+1.03643 0.0907672
+1.03424 0.103647
+1.04798 0.0912647
+1.06076 0.0996512
+1.0746 0.103602
+1.0787 0.106149
+1.09854 0.10826
+1.09504 0.107013
+1.09384 0.0860707
+1.09834 0.0833482
+1.10677 0.0794806
+1.10749 0.069845
+1.09925 0.0447871
+1.10746 0.0499304
+1.09588 0.0334837
+1.09782 0.0128309
+1.09528 0.000820948
+1.1095 0.00567797
+1.10628 -0.000269173
+1.09555 -0.0162337
+1.10959 -0.0217853
+1.09146 -0.0478845
+1.10567 -0.0416535
+1.09068 -0.0585604
+1.09931 -0.0750066
+1.09092 -0.0883508
+1.10159 -0.0976098
+1.09694 -0.0939674
+1.10991 -0.10331
+1.11541 -0.0907923
+1.12653 -0.0973824
+1.14744 -0.107995
+1.15653 -0.107649
+1.15443 -0.10362
+1.16549 -0.0952522
+1.18291 -0.096512
+1.19779 -0.106942
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy
new file mode 100644
index 0000000..3d6f243
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy
@@ -0,0 +1,160 @@
+0.00605396 0.00360027
+0.0117095 0.00496933
+0.00292489 -0.0056444
+0.018654 -0.00345866
+0.0208731 -0.00712699
+0.0349622 0.00520127
+0.0226514 0.00273598
+0.0443469 0.00641652
+0.0320264 -0.00785089
+0.0536853 -0.00492172
+0.0477706 0.00445479
+0.0639807 0.00509629
+0.0673864 -0.000544755
+0.068878 0.00636891
+0.0786834 -0.00880306
+0.0838299 0.00977294
+0.087326 -0.0021897
+0.079062 0.000772423
+0.0984893 0.00905454
+0.0994487 -0.00770074
+0.100736 0.00717826
+0.0994229 0.00250389
+0.100252 0.0167278
+0.0960604 0.00802011
+0.103545 0.0289233
+0.108446 0.0183656
+0.106763 0.0262313
+0.106452 0.0420934
+0.0997256 0.0427598
+0.107064 0.0403298
+0.0928101 0.0560955
+0.10136 0.0583232
+0.104819 0.0562105
+0.0902899 0.0706163
+0.10994 0.0770702
+0.0923621 0.0704878
+0.0919434 0.0865538
+0.0963674 0.0842679
+0.103725 0.0803259
+0.102273 0.101166
+0.100319 0.0952791
+0.108403 0.0942299
+0.113529 0.0981625
+0.108027 0.103066
+0.126272 0.0950435
+0.133506 0.0939314
+0.124776 0.107205
+0.131076 0.107853
+0.136759 0.109119
+0.15444 0.102357
+0.143707 0.104111
+0.160272 0.0974776
+0.165379 0.103348
+0.173751 0.0916309
+0.174657 0.0937715
+0.167267 0.0980068
+0.170889 0.0905988
+0.185414 0.102092
+0.189813 0.10002
+0.199397 0.0909473
+0.198222 0.107717
+0.198974 0.099872
+0.201479 0.108827
+0.205074 0.107075
+0.202 0.124977
+0.191185 0.121976
+0.206848 0.134009
+0.196679 0.137767
+0.19255 0.148035
+0.190151 0.143856
+0.195263 0.155428
+0.20595 0.148822
+0.204421 0.152387
+0.191967 0.169495
+0.197981 0.169699
+0.191872 0.176798
+0.207398 0.170317
+0.194859 0.178978
+0.190444 0.183389
+0.196073 0.192833
+0.200019 0.190352
+0.205824 0.198579
+0.217043 0.198723
+0.210708 0.208976
+0.225591 0.209213
+0.224774 0.208331
+0.228376 0.201784
+0.233852 0.192014
+0.230703 0.196273
+0.241172 0.192107
+0.241027 0.203219
+0.257393 0.199803
+0.266244 0.190504
+0.263176 0.1902
+0.279822 0.191442
+0.267419 0.200092
+0.270919 0.209937
+0.294279 0.199399
+0.292596 0.208336
+0.302111 0.206854
+0.297261 0.193606
+0.302447 0.195568
+0.307461 0.217454
+0.302133 0.219113
+0.300152 0.216012
+0.296763 0.223723
+0.302571 0.234727
+0.298522 0.237272
+0.307834 0.234066
+0.296568 0.250613
+0.298385 0.251664
+0.29308 0.261943
+0.295426 0.266549
+0.293096 0.259791
+0.292439 0.271056
+0.291263 0.275271
+0.300944 0.286063
+0.308624 0.284206
+0.306603 0.285177
+0.302574 0.289769
+0.303807 0.303483
+0.308102 0.301263
+0.316854 0.306492
+0.313448 0.299638
+0.325862 0.304911
+0.328301 0.305416
+0.335535 0.300855
+0.327652 0.299601
+0.334895 0.301131
+0.339451 0.303238
+0.356128 0.293215
+0.359167 0.306227
+0.350648 0.309557
+0.359385 0.291005
+0.360515 0.305818
+0.377582 0.301763
+0.373333 0.308693
+0.375172 0.299768
+0.398744 0.298911
+0.390985 0.295462
+0.39465 0.305079
+0.397266 0.302934
+0.391293 0.303944
+0.401355 0.307406
+0.391301 0.312749
+0.401141 0.331346
+0.403843 0.339273
+0.397447 0.32984
+0.401007 0.345187
+0.401435 0.350856
+0.404534 0.358367
+0.40019 0.350997
+0.401021 0.359769
+0.398586 0.362409
+0.403735 0.370503
+0.400571 0.381428
+0.409145 0.374727
+0.402981 0.379619
+0.406312 0.38398
+0.405032 0.387826
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/dialog_options.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/dialog_options.h
new file mode 100644
index 0000000..6f06379
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/dialog_options.h
@@ -0,0 +1,77 @@
+#ifndef DIAL_OPT_H_
+#define DIAL_OPT_H_
+
+#include "ui_options.h"
+
+class Dialog_options : public QDialog, private Ui::Dialog_options
+{
+    Q_OBJECT
+
+public Q_SLOTS:
+    void on_multiple_choice_checkbox_toggled(bool checked)
+    {
+      if (checked && get_mchoice() == 0)
+        set_random_sample_size(10);
+      else if (checked == false)
+        set_random_sample_size(0);
+    }
+
+    void on_mchoice_spinbox_valueChanged(int new_v)
+    {
+      set_multiple_choice_checkbox(new_v != 0);
+    }
+
+public:
+    Dialog_options(QWidget * = 0)
+    {
+        setupUi(this);
+    }
+    
+    void set_all_ranges()
+    {
+        verbose_spinbox->setRange(0, 2);
+        mchoice_spinbox->setRange(0, 500);
+        percent_spinbox->setRange(0, 100);
+        relocation_spinbox->setRange(0, 50);
+        relevance_spinbox->setRange(0., 100000.);
+    }
+    
+    int get_verbose() const { return verbose_spinbox->value(); }
+    void set_verbose(int verbose) { verbose_spinbox->setValue(verbose); }    
+    
+    int get_mchoice() const { return mchoice_spinbox->value(); }
+    void set_random_sample_size(const int mchoice) { mchoice_spinbox->setValue(mchoice); }
+    
+    double get_percent() const { return percent_spinbox->value(); }
+    void set_percent(const double percent) { percent_spinbox->setValue(percent); }
+    
+    int get_relocation() const { return relocation_spinbox->value(); }
+    void set_relocation(const int value) {
+      return relocation_spinbox->setValue(value);
+    }
+    
+    double get_relevance() const { return relevance_spinbox->value(); }
+    void set_relevance(double ghost) { relevance_spinbox->setValue(ghost); }
+    
+    bool get_use_flip() const { return use_flip_checkbox->isChecked(); }
+    void set_use_flip(const bool flip) {
+      return use_flip_checkbox->setChecked(flip);
+    }
+
+    bool get_multiple_choice_checkbox() const { 
+      return multiple_choice_checkbox->isChecked(); }
+    void set_multiple_choice_checkbox(const bool mc) {
+      return multiple_choice_checkbox->setChecked(mc);
+    }
+
+    double get_line_thickness() const { return thickness_spinbox->value(); }
+    void set_line_thickness(const double t) { thickness_spinbox->setValue(t); }
+
+    double get_point_size() const { return point_size_spinbox->value(); }
+    void set_point_size(const double t) { point_size_spinbox->setValue(t); }
+
+    double get_vertex_size() const { return vertex_size_spinbox->value(); }
+    void set_vertex_size(const double t) { vertex_size_spinbox->setValue(t); }
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.cpp b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.cpp
new file mode 100644
index 0000000..b612978
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.cpp
@@ -0,0 +1,170 @@
+// Qt
+#include <QtGui>
+
+// local
+#include "glviewer.h"
+
+GlViewer::GlViewer(QWidget *pParent)
+: QOpenGLWidget(pParent)
+{
+  m_scene = NULL;
+
+  m_view_points         = true;
+  m_view_vertices       = true;
+  m_view_edges          = false;
+  m_view_ghost_edges    = false;
+  m_view_edge_cost      = false;
+  m_view_edge_priority  = false;
+  m_view_bins           = false;
+  m_view_foot_points    = false;
+  m_view_relocation     = false;
+  m_view_edge_relevance = true;
+  m_insert_points       = false;
+
+  m_line_thickness = 2.0;
+  m_point_size = 2.0;
+  m_vertex_size = 2.0;
+
+  m_scale = 1.0;
+  m_center_x = m_center_y = 0.5;
+
+  setAutoFillBackground(false);
+}
+
+void GlViewer::resizeGL(int width, int height) 
+{
+  glViewport(0, 0, width, height);
+  double aspect_ratio = double(height) / double(width);
+
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  glOrtho(-1.0, 1.0, -aspect_ratio, aspect_ratio, -1.0, 1.0);
+
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+}
+
+void GlViewer::initializeGL() 
+{
+  glClearColor(1., 1., 1., 0.);
+  glDisable(GL_DEPTH_TEST);
+  glEnable(GL_SMOOTH);
+}
+
+void GlViewer::paintGL() 
+{
+
+  glClear(GL_COLOR_BUFFER_BIT);
+  if (!m_scene) return;
+
+  glPushMatrix();
+  glScaled(m_scale, m_scale, m_scale);
+  glTranslated(-m_center_x, -m_center_y, 0.0);
+
+  m_scene->render(m_view_points,
+      m_view_vertices,
+      m_view_edges,
+      m_view_ghost_edges,
+      m_view_edge_cost,
+      m_view_edge_priority,
+      m_view_bins,
+      m_view_foot_points,
+      m_view_relocation,
+      m_view_edge_relevance,
+      float(m_point_size),
+      float(m_vertex_size),
+      float(m_line_thickness));
+
+  glPopMatrix();
+}
+
+void GlViewer::wheelEvent(QWheelEvent *event) 
+{
+  if (!m_scene) return;
+  m_scale += 0.05 * (event->delta() / 120);
+  if (m_scale <= 0.0) m_scale = 0.0;
+  update();
+}
+
+void GlViewer::mousePressEvent(QMouseEvent *event) 
+{
+  if (!m_scene) return;
+  m_mouse_click = event->pos();
+
+  if (event->button() == Qt::LeftButton)
+  {
+    setCursor(QCursor(Qt::PointingHandCursor));
+    sample_mouse_path(m_mouse_click);
+  }
+  else
+  {
+    setCursor(QCursor(Qt::ClosedHandCursor));
+  }
+}
+
+void GlViewer::mouseMoveEvent(QMouseEvent *event)
+{
+  if(!m_scene) return;
+  m_mouse_move = event->pos();
+
+  if (event->buttons() == Qt::LeftButton)
+  {
+    if (m_mouse_move != m_mouse_click)
+      sample_mouse_path(m_mouse_move);
+  }
+  else
+  {
+    move_camera(m_mouse_click, m_mouse_move);
+  }
+
+  m_mouse_click = m_mouse_move;
+  update();
+}
+
+void GlViewer::mouseReleaseEvent(QMouseEvent *event) 
+{
+  if (!m_scene) return;
+  m_mouse_move = event->pos();
+
+  if (event->button() == Qt::LeftButton)
+  {
+    if (m_mouse_move != m_mouse_click)
+      sample_mouse_path(m_mouse_move);
+  }
+  else
+  {
+    move_camera(m_mouse_click, m_mouse_move);
+  }
+
+  m_mouse_click = m_mouse_move;
+  setCursor(QCursor(Qt::ArrowCursor));
+  update();
+}
+
+void GlViewer::sample_mouse_path(const QPoint& point)
+{
+  double x, y;
+  convert_to_world_space(point, x, y);
+
+  if (m_insert_points)
+    m_scene->add_sample(Point(x, y));
+}
+
+void GlViewer::move_camera(const QPoint& p0, const QPoint& p1)
+{
+  m_center_x -= double(p1.x() - p0.x()) / double(width());
+  m_center_y += double(p1.y() - p0.y()) / double(height());
+}
+
+void GlViewer::convert_to_world_space(const QPoint& point, double &x, double &y)
+{
+  double aspect_ratio = double(height()) / double(width());
+
+  x = double(point.x()) / double(width());
+  x = (2.0*x - 1.0) / m_scale;
+  x += m_center_x;
+
+  y = 1.0 - double(point.y()) / double(height());
+  y = (2.0*y - 1.0) * aspect_ratio / m_scale;
+  y += m_center_y;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.h
new file mode 100644
index 0000000..3a2e4d4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.h
@@ -0,0 +1,111 @@
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+// Qt
+#include <QOpenGLWidget>
+#include <QPaintEvent>
+
+// local
+#include "scene.h"
+
+class GlViewer : public QOpenGLWidget
+{
+    Q_OBJECT
+    
+private:
+    Scene* m_scene;
+    
+    // toggles
+    bool m_view_points;    
+    bool m_view_vertices;
+    bool m_view_edges;
+    bool m_view_ghost_edges;
+    bool m_view_edge_cost;
+    bool m_view_edge_priority;
+    bool m_view_bins;
+    bool m_view_foot_points;
+    bool m_view_relocation;
+    bool m_view_edge_relevance;
+
+    // interactive modes
+    bool m_insert_points;
+    
+    // rendering options
+    double m_line_thickness;
+    double m_point_size;
+    double m_vertex_size;
+    
+    // camera
+    double m_scale;
+    double m_center_x, m_center_y;
+    
+    // mouse
+    QPoint m_mouse_click;
+    QPoint m_mouse_move;
+    Point m_mouse_pick;
+    
+public:
+    GlViewer(QWidget *parent);
+    
+    void set_scene(Scene* pScene) { m_scene = pScene; }
+    
+    void set_camera(const double x, const double y, const double s) 
+    {
+        m_center_x = x;
+        m_center_y = y;
+        m_scale = s;
+    }
+    
+    // options
+    double& line_thickness() { return m_line_thickness; }
+    const double& line_thickness() const { return m_line_thickness; }
+    
+    double& point_size() { return m_point_size; }
+    const double& point_size() const { return m_point_size; }
+    
+    double& vertex_size() { return m_vertex_size; }
+    const double& vertex_size() const { return m_vertex_size; }
+    
+    // toggles
+    void toggle_view_points() { m_view_points = !m_view_points; } 
+
+    void toggle_view_vertices() { m_view_vertices = !m_view_vertices; }
+    
+    void toggle_view_edges() { m_view_edges = !m_view_edges; }
+    
+    void toggle_view_ghost_edges() { m_view_ghost_edges = !m_view_ghost_edges; }
+    
+    void toggle_view_edge_cost() { m_view_edge_cost = !m_view_edge_cost; }
+    
+    void toggle_view_edge_priority() {
+      m_view_edge_priority = !m_view_edge_priority;
+    }
+    
+    void toggle_view_bins () { m_view_bins = !m_view_bins; }
+    
+    void toggle_view_foot_points() { m_view_foot_points = !m_view_foot_points; } 
+    
+    void toggle_view_relocation() { m_view_relocation = !m_view_relocation; }
+
+    void toggle_view_edge_relevance() { m_view_edge_relevance = !m_view_edge_relevance; }
+    
+    void toggle_insert_points() { m_insert_points = !m_insert_points; }
+   
+protected:
+    // GL
+    void paintGL();
+    void initializeGL();
+    void resizeGL(int width, int height);
+    
+    // mouse
+    void wheelEvent(QWheelEvent *event);
+    void mouseMoveEvent(QMouseEvent *event);
+    void mousePressEvent(QMouseEvent *event);
+    void mouseReleaseEvent(QMouseEvent *event);
+    
+    void sample_mouse_path(const QPoint& point);
+    void move_camera(const QPoint& p0, const QPoint& p1);
+    void convert_to_world_space(const QPoint& point, double &x, double &y);
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/icons/Voronoi_diagram_2.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/Voronoi_diagram_2.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/icons/Voronoi_diagram_2.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/Voronoi_diagram_2.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileNew.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileNew.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileNew.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileNew.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/fileOpen.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileOpen.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/fileOpen.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileOpen.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileSave.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileSave.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileSave.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileSave.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/fit-page-32.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fit-page-32.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/fit-page-32.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/fit-page-32.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/inputPoint.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/inputPoint.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/inputPoint.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/inputPoint.png
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/snapshot.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/snapshot.png
new file mode 100644
index 0000000..9b5b9ef
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/snapshot.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/triangulation.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png
copy to 3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/until.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/until.png
new file mode 100644
index 0000000..82cdcec
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/until.png differ
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/vertex.png b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/vertex.png
new file mode 100644
index 0000000..6a8fff6
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/icons/vertex.png differ
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/options.ui b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/options.ui
new file mode 100644
index 0000000..eeb5752
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/options.ui
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog_options</class>
+ <widget class="QDialog" name="Dialog_options">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>354</width>
+    <height>415</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>0</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Options</string>
+  </property>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>20</y>
+     <width>311</width>
+     <height>385</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout">
+    <item>
+     <widget class="QCheckBox" name="use_flip_checkbox">
+      <property name="text">
+       <string>Use Flip</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QCheckBox" name="multiple_choice_checkbox">
+        <property name="text">
+         <string>Multiple Choice, with number of samples: </string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="mchoice_spinbox">
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="value">
+         <number>100</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="verbose_label">
+        <property name="text">
+         <string>Verbose</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="verbose_spinbox">
+        <property name="maximum">
+         <number>2</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="percent_label">
+        <property name="text">
+         <string>Init with %</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="percent_spinbox">
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="value">
+         <number>100</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="relocation_label">
+        <property name="text">
+         <string>Relocation</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="relocation_spinbox"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="Relevance">
+        <property name="text">
+         <string>Relevance</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QDoubleSpinBox" name="relevance_spinbox">
+        <property name="decimals">
+         <number>3</number>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.050000000000000</double>
+        </property>
+        <property name="value">
+         <double>100.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="thickness">
+        <property name="text">
+         <string>Line thickness</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QDoubleSpinBox" name="thickness_spinbox"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="point_size">
+        <property name="text">
+         <string>Point size</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QDoubleSpinBox" name="point_size_spinbox"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout">
+      <item>
+       <widget class="QLabel" name="vertex_size">
+        <property name="text">
+         <string>Vertex size</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QDoubleSpinBox" name="vertex_size_spinbox"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QDialogButtonBox" name="buttonBox">
+      <property name="minimumSize">
+       <size>
+        <width>252</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="standardButtons">
+       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog_options</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog_options</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc
new file mode 100644
index 0000000..04068c6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc
@@ -0,0 +1,14 @@
+<RCC>
+    <qresource prefix="/" >
+        <file>icons/Voronoi_diagram_2.png</file>
+        <file>icons/fileNew.png</file>
+        <file>icons/fileOpen.png</file>
+        <file>icons/fileSave.png</file>
+        <file>icons/fit-page-32.png</file>
+        <file>icons/inputPoint.png</file>
+        <file>icons/snapshot.png</file>
+        <file>icons/triangulation.png</file>
+        <file>icons/until.png</file>
+        <file>icons/vertex.png</file>
+    </qresource>
+</RCC>
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.ui b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.ui
new file mode 100644
index 0000000..2299578
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.ui
@@ -0,0 +1,612 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>Pierre Alliez</author>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>680</width>
+    <height>680</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL 2D Optimal Transportation Curve Reconstruction</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <item row="0" column="0">
+     <layout class="QVBoxLayout">
+      <property name="sizeConstraint">
+       <enum>QLayout::SetDefaultConstraint</enum>
+      </property>
+      <item>
+       <widget class="GlViewer" name="viewer" native="true">
+        <property name="focusPolicy">
+         <enum>Qt::StrongFocus</enum>
+        </property>
+        <property name="locale">
+         <locale language="English" country="UnitedStates"/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>680</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="actionLoadPoints"/>
+    <addaction name="actionSave"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuPoint_set">
+    <property name="title">
+     <string>Data</string>
+    </property>
+    <widget class="QMenu" name="menuPredefined">
+     <property name="title">
+      <string>Predefined</string>
+     </property>
+     <addaction name="actionLine"/>
+     <addaction name="actionParallel_lines"/>
+     <addaction name="actionCircle"/>
+     <addaction name="actionHalf_circle"/>
+     <addaction name="actionWidely_variable_sampling"/>
+     <addaction name="actionSpiral"/>
+     <addaction name="actionBox"/>
+     <addaction name="actionBoxes"/>
+     <addaction name="actionBox_with_boundaries"/>
+     <addaction name="actionBox_with_missing_corners"/>
+     <addaction name="actionStar"/>
+     <addaction name="actionStair"/>
+     <addaction name="actionSkyline"/>
+     <addaction name="actionIncreasingly_sharp_angles"/>
+    </widget>
+    <addaction name="actionInsertPoint"/>
+    <addaction name="menuPredefined"/>
+    <addaction name="separator"/>
+    <addaction name="actionNoise"/>
+    <addaction name="actionAdd_outliers"/>
+    <addaction name="separator"/>
+    <addaction name="actionDecimate"/>
+    <addaction name="actionSubdivide"/>
+    <addaction name="separator"/>
+    <addaction name="actionClear"/>
+   </widget>
+   <widget class="QMenu" name="menuAlgorithms">
+    <property name="title">
+     <string>Algorithms</string>
+    </property>
+    <addaction name="actionReconstruction_one_step"/>
+    <addaction name="actionReconstruction_10_steps"/>
+    <addaction name="actionReconstruction_100_steps"/>
+    <addaction name="actionReconstruction_1000_steps"/>
+    <addaction name="actionReconstruction_until"/>
+    <addaction name="separator"/>
+    <addaction name="actionRelocate_vertices"/>
+    <addaction name="actionReconstruction_reinit"/>
+    <addaction name="separator"/>
+    <addaction name="actionOutput_console"/>
+    <addaction name="separator"/>
+    <addaction name="actionSet_options"/>
+    <addaction name="separator"/>
+   </widget>
+   <widget class="QMenu" name="menuView">
+    <property name="title">
+     <string>View</string>
+    </property>
+    <addaction name="actionView_points"/>
+    <addaction name="separator"/>
+    <addaction name="actionView_vertices"/>
+    <addaction name="actionView_edges"/>
+    <addaction name="separator"/>
+    <addaction name="actionView_ghost"/>
+    <addaction name="actionView_relevance"/>
+    <addaction name="separator"/>
+    <addaction name="actionView_edge_cost"/>
+    <addaction name="actionView_edge_priority"/>
+    <addaction name="separator"/>
+    <addaction name="actionView_bins"/>
+    <addaction name="actionView_foot_points"/>
+    <addaction name="actionView_relocation"/>
+    <addaction name="separator"/>
+    <addaction name="actionRecenter"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuPoint_set"/>
+   <addaction name="menuAlgorithms"/>
+   <addaction name="menuView"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>toolBar</string>
+   </property>
+   <property name="locale">
+    <locale language="English" country="UnitedStates"/>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionClear"/>
+   <addaction name="actionLoadPoints"/>
+   <addaction name="actionSave"/>
+   <addaction name="separator"/>
+   <addaction name="actionInsertPoint"/>
+   <addaction name="separator"/>
+   <addaction name="actionRecenter"/>
+  </widget>
+  <action name="actionQuit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionInsertPoint">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/inputPoint.png</normaloff>:/icons/inputPoint.png</iconset>
+   </property>
+   <property name="text">
+    <string>Insert mode</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert Point</string>
+   </property>
+   <property name="statusTip">
+    <string>Insert Point</string>
+   </property>
+  </action>
+  <action name="actionClear">
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/fileNew.png</normaloff>:/icons/fileNew.png</iconset>
+   </property>
+   <property name="text">
+    <string>Clear</string>
+   </property>
+   <property name="statusTip">
+    <string>Clear</string>
+   </property>
+   <property name="shortcut">
+    <string>Space</string>
+   </property>
+  </action>
+  <action name="actionLoadPoints">
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/fileOpen.png</normaloff>:/icons/fileOpen.png</iconset>
+   </property>
+   <property name="text">
+    <string>Load point set...</string>
+   </property>
+   <property name="statusTip">
+    <string>Load point set</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="actionSave">
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/fileSave.png</normaloff>:/icons/fileSave.png</iconset>
+   </property>
+   <property name="text">
+    <string>Save point set...</string>
+   </property>
+   <property name="statusTip">
+    <string>Save point set</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionCircle">
+   <property name="text">
+    <string>Circle...</string>
+   </property>
+  </action>
+  <action name="actionHalf_circle">
+   <property name="text">
+    <string>Half circle...</string>
+   </property>
+  </action>
+  <action name="actionBox">
+   <property name="text">
+    <string>Box...</string>
+   </property>
+   <property name="shortcut">
+    <string>B</string>
+   </property>
+  </action>
+  <action name="actionLine">
+   <property name="text">
+    <string>Line...</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_reinit">
+   <property name="text">
+    <string>Re-init</string>
+   </property>
+   <property name="shortcut">
+    <string>I</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_one_step">
+   <property name="text">
+    <string>Run 1 step</string>
+   </property>
+   <property name="shortcut">
+    <string>R</string>
+   </property>
+  </action>
+  <action name="actionView_foot_points">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Foot points</string>
+   </property>
+   <property name="statusTip">
+    <string>View foot points</string>
+   </property>
+   <property name="shortcut">
+    <string>F</string>
+   </property>
+  </action>
+  <action name="actionView_points">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Points</string>
+   </property>
+   <property name="statusTip">
+    <string>View points</string>
+   </property>
+   <property name="shortcut">
+    <string>P</string>
+   </property>
+  </action>
+  <action name="actionView_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Triangulation</string>
+   </property>
+   <property name="statusTip">
+    <string>View edges of the triangulation</string>
+   </property>
+   <property name="shortcut">
+    <string>T</string>
+   </property>
+  </action>
+  <action name="actionRecenter">
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/fit-page-32.png</normaloff>:/icons/fit-page-32.png</iconset>
+   </property>
+   <property name="text">
+    <string>Recenter</string>
+   </property>
+  </action>
+  <action name="actionView_vertices">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Vertices</string>
+   </property>
+   <property name="shortcut">
+    <string>V</string>
+   </property>
+  </action>
+  <action name="actionBoxes">
+   <property name="text">
+    <string>Two boxes...</string>
+   </property>
+  </action>
+  <action name="actionStair">
+   <property name="text">
+    <string>Stair...</string>
+   </property>
+  </action>
+  <action name="actionSkyline">
+   <property name="text">
+    <string>Skyline...</string>
+   </property>
+  </action>
+  <action name="actionView_edge_priority">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Edge priority</string>
+   </property>
+   <property name="shortcut">
+    <string>Z</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_10_steps">
+   <property name="text">
+    <string>Run 10 steps</string>
+   </property>
+   <property name="shortcut">
+    <string>1</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_100_steps">
+   <property name="text">
+    <string>Run 100 steps</string>
+   </property>
+   <property name="shortcut">
+    <string>2</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_1000_steps">
+   <property name="text">
+    <string>Run 1,000 steps</string>
+   </property>
+   <property name="shortcut">
+    <string>3</string>
+   </property>
+  </action>
+  <action name="actionAdd_outliers">
+   <property name="text">
+    <string>Add outliers...</string>
+   </property>
+  </action>
+  <action name="actionSnapshot">
+   <property name="icon">
+    <iconset resource="pwsrec.qrc">
+     <normaloff>:/icons/snapshot.png</normaloff>:/icons/snapshot.png</iconset>
+   </property>
+   <property name="text">
+    <string>Snapshot</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionIncreasingly_sharp_angles">
+   <property name="text">
+    <string>Increasingly sharp angles...</string>
+   </property>
+  </action>
+  <action name="actionBox_with_boundaries">
+   <property name="text">
+    <string>Box with boundaries...</string>
+   </property>
+  </action>
+  <action name="actionBox_with_missing_corners">
+   <property name="text">
+    <string>Box with missing corners...</string>
+   </property>
+  </action>
+  <action name="actionStar">
+   <property name="text">
+    <string>Star...</string>
+   </property>
+  </action>
+  <action name="actionSpiral">
+   <property name="text">
+    <string>Spiral...</string>
+   </property>
+  </action>
+  <action name="actionView_edge_cost">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Edge cost</string>
+   </property>
+   <property name="shortcut">
+    <string>C</string>
+   </property>
+  </action>
+  <action name="actionReconstruction_until">
+   <property name="text">
+    <string>Run until...</string>
+   </property>
+   <property name="shortcut">
+    <string>U</string>
+   </property>
+  </action>
+  <action name="actionParallel_lines">
+   <property name="text">
+    <string>Parallel lines...</string>
+   </property>
+  </action>
+  <action name="actionNoise">
+   <property name="text">
+    <string>Noise...</string>
+   </property>
+   <property name="shortcut">
+    <string>N</string>
+   </property>
+  </action>
+  <action name="actionRelocate_vertices">
+   <property name="text">
+    <string>Relocate all vertices</string>
+   </property>
+   <property name="shortcut">
+    <string>L</string>
+   </property>
+  </action>
+  <action name="actionView_relocation">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Relocation</string>
+   </property>
+   <property name="shortcut">
+    <string>Shift+L</string>
+   </property>
+  </action>
+  <action name="actionView_ghost">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Ghost edges</string>
+   </property>
+   <property name="shortcut">
+    <string>G</string>
+   </property>
+  </action>
+  <action name="actionInvert_mass">
+   <property name="text">
+    <string>Invert mass</string>
+   </property>
+   <property name="shortcut">
+    <string>Shift+I</string>
+   </property>
+  </action>
+  <action name="actionView_relevance">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Relevance</string>
+   </property>
+   <property name="shortcut">
+    <string>Shift+R</string>
+   </property>
+  </action>
+  <action name="actionView_tolerance">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Tolerance</string>
+   </property>
+   <property name="shortcut">
+    <string>Shift+T</string>
+   </property>
+  </action>
+  <action name="actionClamp_mass">
+   <property name="text">
+    <string>Clamp mass</string>
+   </property>
+  </action>
+  <action name="actionView_bins">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Bins</string>
+   </property>
+   <property name="shortcut">
+    <string>Shift+B</string>
+   </property>
+  </action>
+  <action name="actionSubdivide">
+   <property name="text">
+    <string>Subdivide</string>
+   </property>
+  </action>
+  <action name="actionWidely_variable_sampling">
+   <property name="text">
+    <string>Widely variable sampling</string>
+   </property>
+  </action>
+  <action name="actionDecimate">
+   <property name="text">
+    <string>Decimate...</string>
+   </property>
+  </action>
+  <action name="actionKeep_one_point_out_of_n">
+   <property name="text">
+    <string>One point out of n</string>
+   </property>
+  </action>
+  <action name="actionSet_MChoice">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Multiple Choice</string>
+   </property>
+   <property name="shortcut">
+    <string>M</string>
+   </property>
+  </action>
+  <action name="actionSet_options">
+   <property name="text">
+    <string>Options...</string>
+   </property>
+   <property name="shortcut">
+    <string>O</string>
+   </property>
+  </action>
+  <action name="actionOutput_console">
+   <property name="text">
+    <string>Output to console</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>GlViewer</class>
+   <extends>QWidget</extends>
+   <header>glviewer.h</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="pwsrec.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/random.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/random.h
new file mode 100644
index 0000000..b8886e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/random.h
@@ -0,0 +1,26 @@
+#ifndef _RANDOM_
+#define _RANDOM_ 1
+
+inline
+double random_double(const double min, const double max)
+{
+  double range = max - min;
+  return min + (double(rand()) / double(RAND_MAX)) * range;
+}
+
+inline
+int random_int(const int min, const int max)
+{
+  int range = max - min;
+  return min + int((double(rand())/double(RAND_MAX)) * range);
+}
+
+template <class Vector>
+Vector random_vec(const double scale)
+{
+  double dx = random_double(-scale, scale);
+  double dy = random_double(-scale, scale);
+  return Vector(dx, dy);
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/render.cpp b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/render.cpp
new file mode 100644
index 0000000..adeff85
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/render.cpp
@@ -0,0 +1,892 @@
+#include <fstream>
+
+// Qt
+#include <QtOpenGL>
+
+// local
+#include "Otr2_kerneled.h"
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+typedef Optimal_transportation_reconstruction_kerneled_2::Rec_edge_2 PEdge;
+typedef Optimal_transportation_reconstruction_kerneled_2 R_s_k_2;
+
+void R_s_k_2::print_stats() const
+{
+  int nb_solid = 0;
+  int nb_ghost = 0;
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin();
+      ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    if (m_dt.is_ghost(edge)) nb_ghost++;
+    else nb_solid++;
+  }
+
+  std::cerr << "STATS" << std::endl;
+  std::cerr << "# vertices : " << m_dt.number_of_vertices()-4 << std::endl;
+  std::cerr << "# triangles: " << m_dt.number_of_faces() << std::endl;
+  std::cerr << "# edges: " << m_dt.tds().number_of_edges() << std::endl;
+  std::cerr << "# solid: " << nb_solid << std::endl;
+  std::cerr << "# ghost: " << nb_ghost << std::endl;
+}
+
+QColor R_s_k_2::get_color(float value) const
+{
+  float hue = 240.0*(1.0 - value);
+  QColor color;
+  color.setHsv(hue, 255, 255);
+  return color;
+}
+
+void R_s_k_2::draw_point(const Point& point)
+{
+  ::glBegin(GL_POINTS);
+  ::glVertex2f(point.x(), point.y());
+  ::glEnd();
+}
+
+void R_s_k_2::draw_segment(const Point& s, const Point& t)
+{
+  ::glBegin(GL_LINES);
+  ::glVertex2d(s.x(), s.y());
+  ::glVertex2d(t.x(), t.y());
+  ::glEnd();
+}
+
+void R_s_k_2::draw_edge(const Edge& edge)
+{
+  int i = edge.second;
+  Face_handle face = edge.first;
+  Point a = face->vertex((i+1)%3)->point();
+  Point b = face->vertex((i+2)%3)->point();
+  draw_segment(a, b);
+}
+
+void R_s_k_2::draw_face(Face_handle face)
+{
+  ::glBegin(GL_TRIANGLES);
+  for (int i = 0; i < 3; ++i)
+  {
+    Point p = face->vertex(i)->point();
+    ::glVertex2f(p.x(), p.y());
+  }
+  ::glEnd();
+}
+
+void R_s_k_2::draw_edge_with_arrow(const Point& s, const Point& t)
+{
+  Vector vec = t - s;
+  Vector vec90(-vec.y(),vec.x());
+
+  // draw edge
+  draw_segment(s, t);
+
+  // draw an arrow toward merged vertex
+  Point a = t - 0.4 * vec;
+  Point b = a - 0.2 * vec - 0.1 * vec90;
+  Point c = a - 0.2 * vec + 0.1 * vec90;
+  ::glBegin(GL_TRIANGLES);
+  ::glVertex2d(a.x(), a.y());
+  ::glVertex2d(b.x(), b.y());
+  ::glVertex2d(c.x(), c.y());
+  ::glEnd();
+}
+
+void R_s_k_2::draw_vertices(const float point_size,
+    const float red,
+    const float green,
+    const float blue)
+{
+  for (Finite_vertices_iterator vi = m_dt.finite_vertices_begin();
+      vi != m_dt.finite_vertices_end(); vi++)
+  {
+    Vertex_handle vertex = vi;
+    if (vertex->pinned())
+    {
+      ::glPointSize(point_size);
+      ::glColor3f(0.0f, 0.0f, 0.0f);
+    }
+    else
+    {
+      ::glPointSize(3*point_size);
+      ::glColor3f(red,green,blue);
+    }
+    draw_point(vertex->point());
+  }
+}
+
+void R_s_k_2::draw_edges(const float line_width,
+    const float red,
+    const float green,
+    const float blue)
+{
+  ::glLineWidth(line_width);
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin();
+      ei != m_dt.finite_edges_end(); ei++)
+  {
+    Edge edge = *ei;
+    Edge twin = m_dt.twin_edge(edge);
+    if (m_dt.is_pinned(edge) && m_dt.is_pinned(twin))
+      ::glColor3f(0.9f,0.9f,0.75f);
+    else
+      ::glColor3f(red,green,blue);
+    draw_edge(edge);
+  }
+}
+
+void R_s_k_2::draw_footpoints(const float line_width,
+    const float red,
+    const float green,
+    const float blue)
+{
+  draw_mesh_footpoints(m_dt, line_width, red, green, blue);
+}
+
+void R_s_k_2::draw_mesh_footpoints(const Triangulation& mesh,
+    const float line_width,
+    const float red,
+    const float green,
+    const float blue)
+{
+  ::glLineWidth(line_width);
+  for (Finite_edges_iterator ei = mesh.finite_edges_begin(); ei != mesh.finite_edges_end(); ei++)
+  {
+    Edge edge = *ei;
+    draw_edge_footpoints(mesh, edge, red, green, blue);
+    draw_edge_footpoints(mesh, mesh.twin_edge(edge), red, green, blue);
+  }
+}
+
+void R_s_k_2::draw_edge_footpoints(const Triangulation& mesh,
+    const Edge& edge,
+    const float red,
+    const float green,
+    const float blue)
+{
+  const Point& a = mesh.source_vertex(edge)->point();
+  const Point& b = mesh.target_vertex(edge)->point();
+  const Sample_vector& samples = edge.first->samples(edge.second);
+
+  Sample_vector::const_iterator it;
+  for (it = samples.begin(); it != samples.end(); ++it)
+  {
+    Sample_* sample = *it;
+    Point p = sample->point();
+    FT m = 0.5*(1.0 - sample->mass());
+
+    Point q;
+    if (mesh.get_plan(edge) == 0)
+    {
+      ::glColor3f(0.8f + m, m, m);
+      FT Da = CGAL::squared_distance(p, a);
+      FT Db = CGAL::squared_distance(p, b);
+      if (Da < Db) q = a;
+      else         q = b;
+    }
+    else
+    {
+      ::glColor3f(red + m, green + m, blue + m);
+      FT t = sample->coordinate();
+      q = CGAL::ORIGIN + (1.0 - t)*(a - CGAL::ORIGIN) + t*(b - CGAL::ORIGIN);
+    }
+    draw_segment(p, q);
+  }
+}
+
+void R_s_k_2::draw_pedges(const float line_width)
+{
+  int nb_edges = 0;
+  int nb_pinned = 0;
+  int nb_cyclic = 0;
+  int nb_discart = 0;
+  FT min_value = (std::numeric_limits<FT>::max)();
+  FT max_value = -(std::numeric_limits<FT>::max)();
+  std::vector<FT>  values;
+  std::vector<Edge> edges;
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    for (unsigned int i = 0; i < 2; ++i)
+    {
+      if (m_dt.is_pinned(edge))
+      {
+        nb_pinned++;
+        continue;
+      }
+
+      if (m_dt.is_target_cyclic(edge))
+      {
+        nb_cyclic++;
+        continue;
+      }
+
+      PEdge pedge;
+      bool ok = create_pedge(edge, pedge);
+      if (ok)
+      {
+        edges.push_back(edge);
+        values.push_back(pedge.priority());
+        min_value = (std::min)(min_value, values.back());
+        max_value = (std::max)(max_value, values.back());
+      }
+      else
+      {
+        nb_discart++;
+        ::glColor3f(1.0, 0.0, 1.0);
+        draw_edge(edge);
+      }
+      edge = m_dt.twin_edge(edge);
+      nb_edges++;
+    }
+  }
+  if (min_value == max_value) max_value += 1.0;
+
+  std::size_t N = values.size();
+  for (unsigned int i = 0; i < N; ++i)
+    draw_one_pedge(edges[i], values[i], min_value, max_value, line_width);
+
+  std::cout << "There are: " << N << " pedges"
+      << " x " << nb_discart << " discarted"
+      << " x " << nb_pinned << " pinned"
+      << " x " << nb_cyclic << " cyclic"
+      << " = " << nb_edges << " edges"
+      << std::endl;
+}
+
+void R_s_k_2::draw_one_pedge(const Edge& edge,
+    const FT value,
+    const FT min_value,
+    const FT max_value,
+    const float line_width)
+{
+  if (value == min_value)
+  {
+    ::glLineWidth(2*line_width);
+    ::glColor3f(0.0f, 0.0f, 0.0f);
+  }
+  else
+  {
+    ::glLineWidth(line_width);
+    FT color = (value - min_value) / (max_value - min_value);
+    QColor qcolor = get_color(color);
+    ::glColor3f(qcolor.redF(), qcolor.greenF(), qcolor.blueF());
+  }
+
+  Point s = m_dt.source_vertex(edge)->point();
+  Point t = m_dt.target_vertex(edge)->point();
+  Point c = CGAL::midpoint(s, t);
+  draw_edge_with_arrow(c, t);
+}
+
+void R_s_k_2::draw_costs(const float line_width, const bool view_ghost)
+{
+  FT min_value = (std::numeric_limits<FT>::max)();
+  FT max_value = -(std::numeric_limits<FT>::max)();
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    if (m_dt.is_ghost(edge)) continue;
+    FT value = m_dt.get_cost(edge).finalize(m_alpha);
+    min_value = (std::min)(min_value, value);
+    max_value = (std::max)(max_value, value);
+  }
+  if (min_value == max_value) max_value += 1.0;
+
+  ::glLineWidth(line_width);
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    draw_one_cost(edge, min_value, max_value, view_ghost);
+  }
+}
+
+void R_s_k_2::draw_one_cost(const Edge& edge,
+    const FT min_value,
+    const FT max_value,
+    const bool view_ghost)
+{
+  FT mass = m_dt.get_mass(edge);
+  if (mass == 0.0)
+  {
+    if (!view_ghost) return;
+    ::glColor3f(0.5f, 0.5f, 0.5f);
+    draw_edge(edge);
+    return;
+  }
+
+  if (m_dt.is_ghost(edge))
+  {
+    if (!view_ghost) return;
+    ::glColor3f(0.5f, 0.5f, 0.5f);
+    draw_edge(edge);
+    return;
+  }
+
+  FT value = m_dt.get_cost(edge).finalize(m_alpha);
+  FT color = (value - min_value) / (max_value - min_value);
+  ::glColor3d(0.0, 1.0-color, color); // [green, blue]
+                                          draw_edge(edge);
+}
+
+void R_s_k_2::draw_relevance(const float line_width, const int nb)
+{
+  MultiIndex mindex;
+  FT min_value = (std::numeric_limits<FT>::max)();
+  FT max_value = -(std::numeric_limits<FT>::max)();
+  unsigned nb_initial = 0;
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    if (m_dt.is_ghost(edge)) continue;
+    FT value = m_dt.get_edge_relevance(edge); // >= 0
+
+    nb_initial++;
+    min_value = (std::min)(min_value, value);
+    max_value = (std::max)(max_value, value);
+    mindex.insert(PEdge(edge, value));
+  }
+  if (min_value == max_value) max_value += 1.0;
+
+  ::glLineWidth(line_width);
+  int nb_remove = (std::min)(nb, int(mindex.size()));
+
+  ::glColor3d(0.5, 0.1, 0.1);
+  for (int i = 0; i < nb_remove; ++i)
+  {
+
+    PEdge pedge = *(mindex.get<1>()).begin();
+    (mindex.get<0>()).erase(pedge);
+  }
+
+  ::glColor3d(0.0, 0.5, 0.0);
+  while (!mindex.empty())
+  {
+    PEdge pedge = *(mindex.get<1>()).begin();
+    (mindex.get<0>()).erase(pedge);
+    draw_edge(pedge.edge());
+  }
+}
+
+void R_s_k_2::draw_bins(const float thickness)
+{
+  ::glLineWidth(thickness);
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    if (m_dt.get_plan(edge) == 0)
+      draw_bins_plan0(edge);
+    else
+      draw_bins_plan1(edge);
+  }
+}
+
+void R_s_k_2::draw_bins_plan0(const Edge& edge)
+{
+  Edge twin = m_dt.twin_edge(edge);
+  const Point& pa = m_dt.source_vertex(edge)->point();
+  const Point& pb = m_dt.target_vertex(edge)->point();
+
+  Sample_vector samples;
+  m_dt.collect_samples_from_edge(edge, samples);
+  m_dt.collect_samples_from_edge(twin, samples);
+
+  ::glColor3f(0.0f, 1.0f, 0.0f);
+  Sample_vector_const_iterator it;
+  for (it = samples.begin(); it != samples.end(); ++it)
+  {
+    Sample_* sample = *it;
+    const Point& ps = sample->point();
+
+    Point q = pa;
+    FT Da = CGAL::squared_distance(ps, pa);
+    FT Db = CGAL::squared_distance(ps, pb);
+    if (Da > Db) q = pb;
+
+    draw_segment(ps, q);
+  }
+}
+
+void R_s_k_2::draw_bins_plan1(const Edge& edge)
+{
+  FT M = m_dt.get_mass(edge);
+  Vector va = m_dt.source_vertex(edge)->point() - CGAL::ORIGIN;
+  Vector vb = m_dt.target_vertex(edge)->point() - CGAL::ORIGIN;
+
+  ::glColor3f(1.0f, 0.0f, 0.0f);
+  SQueue queue;
+  FT start = 0.0;
+  m_dt.sort_samples_from_edge(edge, queue);
+  while (!queue.empty())
+  {
+    PSample psample = queue.top();
+    queue.pop();
+
+    const FT m = psample.sample()->mass();
+    const Point& ps = psample.sample()->point();
+
+    FT bin = m/M;
+    FT alpha = start + 0.5*bin;
+    Point q = CGAL::ORIGIN + (1.0-alpha)*va + alpha*vb;
+    start += bin;
+
+    draw_segment(ps, q);
+  }
+}
+
+void R_s_k_2::draw_relocation()
+{
+  for (Finite_vertices_iterator v = m_dt.finite_vertices_begin(); v != m_dt.finite_vertices_end(); ++v)
+  {
+    Vertex_handle vertex = v;
+    if (vertex->pinned()) continue;
+
+    const Point& pv = vertex->point();
+    v->relocated() = compute_relocation(vertex);
+
+    Vector move(0.0, 0.0);
+    Edge_circulator ecirc = m_dt.incident_edges(vertex);
+    Edge_circulator eend  = ecirc;
+    CGAL_For_all(ecirc, eend)
+    {
+      Edge edge = *ecirc;
+      if (m_dt.source_vertex(edge) != vertex)
+        edge = m_dt.twin_edge(edge);
+
+      Vector grad(0.0, 0.0);
+      if (m_dt.get_plan(edge) == 0)
+        grad = compute_gradient_for_plan0(edge);
+      else
+        grad = compute_gradient_for_plan1(edge);
+
+      move = move + grad;
+      ::glLineWidth(2.0f);
+      ::glColor3f(1.0f, 1.0f, 0.0f);
+      draw_edge_with_arrow(pv, pv-grad);
+    }
+
+    ::glLineWidth(1.0f);
+    ::glColor3f(1.0f, 0.0f, 0.0f);
+    draw_edge_with_arrow(pv, pv-move);
+  }
+
+  ::glBegin(GL_LINES);
+  ::glLineWidth(3.0f);
+  ::glColor3f(0.1f, 1.0f, 1.0f);
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    Edge twin = m_dt.twin_edge(edge);
+    if (m_dt.is_pinned(edge) || m_dt.is_pinned(twin)) continue;
+
+    const Point& pa = m_dt.source_vertex(edge)->relocated();
+    const Point& pb = m_dt.target_vertex(edge)->relocated();
+    ::glVertex2d(pa.x(), pa.y());
+    ::glVertex2d(pb.x(), pb.y());
+  }
+  ::glEnd();
+}
+
+bool R_s_k_2::locate_edge(const Point& query, Edge& edge)
+{
+  if (m_dt.number_of_faces() == 0) return false;
+
+  Face_handle face = m_dt.locate(query);
+  if (face == Face_handle()) return false;
+  if (m_dt.is_infinite(face)) return false;
+
+  edge = m_dt.find_nearest_edge(query, face);
+  if (edge.first == Face_handle()) return false;
+
+  if (m_dt.is_pinned(edge) || m_dt.is_target_cyclic(edge))
+    return false;
+
+  return true;
+}
+
+void R_s_k_2::draw_one_ring(const float point_size, const float line_width, const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Triangulation copy;
+  Edge copy_edge = copy_star(edge, copy);
+  draw_mesh_one_ring(point_size, line_width, copy, copy_edge);
+}
+
+void R_s_k_2::draw_mesh_one_ring(const float point_size,
+    const float line_width,
+    const Triangulation& mesh,
+    const Edge& edge)
+{
+  Vertex_handle s = mesh.source_vertex(edge);
+  Vertex_handle t = mesh.target_vertex(edge);
+
+  draw_bg_faces(mesh, 1.0f, 0.7f, 0.7f, 0.5f);
+  draw_vertex_faces(s, mesh, 0.7f, 0.7f, 1.0f, 1.0f);
+
+  ::glLineWidth(line_width);
+  draw_bg_edges(mesh, 0.7f, 0.3f, 0.7f, 1.f, 0.f, 0.f);
+  draw_vertex_edges(s, mesh, 0.f, 0.8f, 0.f, 0.f, 0.2f, 0.2f);
+
+  ::glLineWidth(2.0f*line_width);
+  ::glColor3f(0., 0., 1.);
+  draw_edge_with_arrow(s->point(), t->point());
+
+  ::glPointSize(0.5*point_size);
+  draw_bg_vertices(mesh, 0.f, 0.f, 0.f);
+  ::glPointSize(point_size);
+  ::glColor3f(0., 1., 0.);
+  draw_point(s->point());
+  ::glColor3f(1., 1., 0.);
+  draw_point(t->point());
+}
+
+void R_s_k_2::draw_blocking_edges(const float point_size, const float line_width, const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Triangulation copy;
+  Edge copy_edge = copy_star(edge, copy);
+  draw_mesh_blocking_edges(point_size, line_width, copy, copy_edge);
+}
+
+void R_s_k_2::draw_mesh_blocking_edges(const float point_size,
+    const float line_width,
+    const Triangulation& mesh,
+    const Edge& edge)
+{
+  Vertex_handle s = mesh.source_vertex(edge);
+  Vertex_handle t = mesh.target_vertex(edge);
+
+  draw_mesh_one_ring(point_size, line_width, mesh, edge);
+
+  ::glColor3f(0.0f, 0.0f, 0.0f);
+  ::glLineWidth(2.0f*line_width);
+  Face_circulator fcirc = mesh.incident_faces(s);
+  Face_circulator fend = fcirc;
+  CGAL_For_all(fcirc, fend)
+  {
+    Face_handle f = fcirc;
+    Edge ab(f, f->index(s));
+    Vertex_handle a = mesh.source_vertex(ab);
+    Vertex_handle b = mesh.target_vertex(ab);
+    if (!mesh.is_triangle_ccw(a, b, t))
+    {
+      draw_segment(a->point(), b->point());
+    }
+  }
+}    
+
+void R_s_k_2::draw_collapsible_edge(const float point_size,
+    const float line_width,
+    const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Triangulation copy;
+  Edge copy_edge = copy_star(edge, copy);
+  Vertex_handle copy_src = copy.source_vertex(copy_edge);
+
+  Edge_vector copy_hull;
+  copy.get_edges_from_star_minus_link(copy_src, copy_hull, true);
+  ok = copy.make_collapsible(copy_edge, copy_hull.begin(), copy_hull.end(), m_verbose);
+
+  if (ok)
+    draw_mesh_one_ring(point_size, line_width, copy, copy_edge);
+  else
+    draw_mesh_blocking_edges(point_size, line_width, copy, copy_edge);
+}
+
+void R_s_k_2::draw_cost_stencil(const float point_size,
+    const float line_width,
+    const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Triangulation copy;
+  Edge copy_edge = copy_star(edge, copy);
+  Vertex_handle copy_src = copy.source_vertex(copy_edge);
+
+  Edge_vector copy_hull;
+  copy.get_edges_from_star_minus_link(copy_src, copy_hull, true);
+  ok = copy.make_collapsible(copy_edge, copy_hull.begin(), copy_hull.end(), m_verbose);
+  if (!ok) return;
+  copy.collapse(copy_edge, m_verbose);
+
+  draw_bg_faces(copy, 0.7f, 0.7f, 1.0f, 1.0f);
+
+  ::glLineWidth(line_width);
+  ::glPointSize(point_size);
+
+  Edge_vector stencil;
+  collect_cost_stencil(copy, copy_hull.begin(), copy_hull.end(), stencil);
+  for (Edge_vector::const_iterator it = stencil.begin(); it != stencil.end(); ++it)
+  {
+    Edge e = *it;
+    ::glColor3f(0.7f, 0.4f, 0.0f);
+    draw_edge(e);
+    ::glColor3f(0.0f, 0.0f, 0.0f);
+    draw_point(copy.source_vertex(e)->point());
+    draw_point(copy.target_vertex(e)->point());
+  }
+}
+
+void R_s_k_2::draw_remove_queue_stencil(const float point_size,
+    const float line_width,
+    const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Edge_vector hull;
+  Edge_vector stencil;
+  Edge_vector::const_iterator it;
+  Vertex_handle src = m_dt.source_vertex(edge);
+  m_dt.get_edges_from_star_minus_link(src, hull, true);
+  collect_pqueue_stencil(m_dt, hull.begin(), hull.end(), stencil);
+
+  draw_vertex_faces(src, m_dt, 0.7f, 0.7f, 1.0f, 1.0f);
+
+  ::glLineWidth(0.5*line_width);
+  for (it = stencil.begin(); it != stencil.end(); ++it)
+  {
+    Edge ab = *it;
+    ::glColor3f(1.0f, 0.6f, 1.0f);
+    draw_edge(ab);
+  }
+
+  ::glLineWidth(line_width);
+  ::glPointSize(point_size);
+  for (it = stencil.begin(); it != stencil.end(); ++it)
+  {
+    Edge ab = *it;
+    Vertex_handle va = ab.first->vertex( (ab.second+1)%3 );
+    Vertex_handle vb = ab.first->vertex( (ab.second+2)%3 );
+    const Point& pa = va->point();
+    const Point& pb = vb->point();
+    Point pc = CGAL::midpoint(pa, pb);
+    ::glColor3f(0.8f, 0.2f, 0.8f);
+    draw_edge_with_arrow(pc, pb);
+    ::glColor3f(0.0f, 0.0f, 0.0f);
+    draw_point(pa);
+    draw_point(pb);
+  }
+}
+
+void R_s_k_2::draw_push_queue_stencil(const float point_size,
+    const float line_width,
+    const Point& query)
+{
+  Edge edge;
+  bool ok = locate_edge(query, edge);
+  if (!ok) return;
+
+  Edge_vector hull;
+  Edge_vector stencil;
+  Vertex_handle src = m_dt.source_vertex(edge);
+  m_dt.get_edges_from_star_minus_link(src, hull, true);
+  collect_pqueue_stencil(m_dt, hull.begin(), hull.end(), stencil);
+
+  Edge_vector::iterator it = stencil.begin();
+  while (it != stencil.end())
+  {
+    Edge edge = *it;
+    if (m_dt.source_vertex(edge) == src)
+      it = stencil.erase(it);
+    else if (m_dt.target_vertex(edge) == src)
+      it = stencil.erase(it);
+    else
+      it++;
+  }
+
+  Triangulation copy;
+  Edge_vector copy_hull;
+  Edge_vector copy_stencil;
+  Edge copy_edge = copy_star(edge, copy);
+  Vertex_handle copy_src = copy.source_vertex(copy_edge);
+  copy.get_edges_from_star_minus_link(copy_src, copy_hull, true);
+  ok = copy.make_collapsible(copy_edge, copy_hull.begin(), copy_hull.end(), m_verbose);
+  if (!ok) return;
+  copy.collapse(copy_edge, m_verbose);
+  collect_cost_stencil(copy, copy_hull.begin(), copy_hull.end(), copy_stencil);
+
+  for (it = copy_stencil.begin(); it != copy_stencil.end(); ++it)
+  {
+    Edge edge = *it;
+    Edge twin = copy.twin_edge(edge);
+    if (!copy.is_pinned(edge)) stencil.push_back(edge);
+    if (!copy.is_pinned(twin)) stencil.push_back(twin);
+  }
+
+  draw_bg_faces(copy, 0.7f, 0.7f, 1.0f, 1.0f);
+
+  ::glLineWidth(0.5*line_width);
+  for (it = stencil.begin(); it != stencil.end(); ++it)
+  {
+    Edge ab = *it;
+    ::glColor3f(1.0f, 0.6f, 1.0f);
+    draw_edge(ab);
+  }
+
+  ::glLineWidth(line_width);
+  ::glPointSize(point_size);
+  for (it = stencil.begin(); it != stencil.end(); ++it)
+  {
+    Edge ab = *it;
+    Vertex_handle va = ab.first->vertex( (ab.second+1)%3 );
+    Vertex_handle vb = ab.first->vertex( (ab.second+2)%3 );
+    const Point& pa = va->point();
+    const Point& pb = vb->point();
+    Point pc = CGAL::midpoint(pa, pb);
+    ::glColor3f(0.8f, 0.2f, 0.8f);
+    draw_edge_with_arrow(pc, pb);
+    ::glColor3f(0.0f, 0.0f, 0.0f);
+    draw_point(pa);
+    draw_point(pb);
+  }
+}
+
+void R_s_k_2::draw_bg_faces(const Triangulation& mesh,
+    const float red,
+    const float green,
+    const float blue,
+    const float alpha)
+{
+  ::glEnable(GL_BLEND);
+  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  ::glColor4f(red, green, blue, alpha);
+  for (Finite_faces_iterator fi = mesh.finite_faces_begin(); fi != mesh.finite_faces_end(); ++fi)
+  {
+    Face_handle f = fi;
+    draw_face(f);
+  }
+  ::glDisable(GL_BLEND);
+}
+
+void R_s_k_2::draw_bg_edges(const Triangulation& mesh,
+    const float ri,
+    const float gi,
+    const float bi,
+    const float ro,
+    const float go,
+    const float bo)
+{
+  for (Finite_faces_iterator fi = mesh.finite_faces_begin(); fi != mesh.finite_faces_end(); ++fi)
+  {
+    Face_handle f = fi;
+    for (unsigned int i = 0; i < 3; ++i)
+    {
+      Edge e(f, i);
+      e = mesh.twin_edge(e);
+      if (mesh.is_infinite(e.first))
+        ::glColor3f(ro, go, bo);
+      else
+        ::glColor3f(ri, gi, bi);
+      draw_edge(e);
+    }
+  }
+}
+
+void R_s_k_2::draw_bg_vertices(const Triangulation& mesh,
+    const float red,
+    const float green,
+    const float blue)
+{
+  ::glColor3f(red, green, blue);
+  for (Finite_vertices_iterator vi = mesh.finite_vertices_begin(); vi != mesh.finite_vertices_end(); ++vi)
+  {
+    Vertex_handle v = vi;
+    draw_point(v->point());
+  }
+}
+
+void R_s_k_2::draw_vertex_faces(Vertex_handle vertex,
+    const Triangulation& mesh,
+    const float red,
+    const float green,
+    const float blue,
+    const float alpha)
+{
+  ::glEnable(GL_BLEND);
+  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  ::glColor4f(red, green, blue, alpha);
+  Face_circulator fcirc = mesh.incident_faces(vertex);
+  Face_circulator fend = fcirc;
+  CGAL_For_all(fcirc, fend)
+  {
+    Face_handle f = fcirc;
+    if (mesh.is_infinite(f)) continue;
+    draw_face(f);
+  }
+  ::glDisable(GL_BLEND);
+}
+
+void R_s_k_2::draw_vertex_edges(Vertex_handle vertex,
+    const Triangulation& mesh,
+    const float ri,
+    const float gi,
+    const float bi,
+    const float ro,
+    const float go,
+    const float bo)
+{
+  Face_circulator fcirc = mesh.incident_faces(vertex);
+  Face_circulator fend = fcirc;
+  CGAL_For_all(fcirc, fend)
+  {
+    Face_handle f = fcirc;
+    int index = f->index(vertex);
+    for (unsigned int i = 0; i < 3; ++i)
+    {
+      Edge e(f, i);
+      if (mesh.is_infinite(e)) continue;
+      if (static_cast<int>(i) == index) ::glColor3f(ro, go, bo);
+      else ::glColor3f(ri, gi, bi);
+      draw_edge(e);
+    }
+  }
+}
+
+void R_s_k_2::save_edges(std::ofstream& ofs, const int nb)
+{
+  MultiIndex mindex;
+  for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+  {
+    Edge edge = *ei;
+    if (m_dt.is_ghost(edge)) continue;
+    FT value = m_dt.get_edge_relevance(edge); // >= 0
+    mindex.insert(PEdge(edge, value));
+  }
+
+  int nb_remove = (std::min)(nb, int(mindex.size()));
+  for (int i = 0; i < nb_remove; ++i)
+  {
+    PEdge pedge = *(mindex.get<1>()).begin();
+    (mindex.get<0>()).erase(pedge);
+
+  }
+
+  while (!mindex.empty())
+  {
+    PEdge pedge = *(mindex.get<1>()).begin();
+    (mindex.get<0>()).erase(pedge);
+    save_one_edge(ofs, pedge.edge());
+  }
+}
+
+void R_s_k_2::save_one_edge(std::ofstream& ofs, const Edge& edge)
+{
+  int i = edge.second;
+  Face_handle face = edge.first;
+  Point const& a = face->vertex((i+1)%3)->point();
+  Point const& b = face->vertex((i+2)%3)->point();
+  ofs << a << " - " << b << std::endl;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/scene.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/scene.h
new file mode 100644
index 0000000..d3e73c6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/scene.h
@@ -0,0 +1,908 @@
+#ifndef SCENE_H_
+#define SCENE_H_
+
+// STL
+#include <fstream>
+
+//Qt
+#include <QtOpenGL>
+#include <QWidget>
+
+// local
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include "Otr2_kerneled.h"
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+
+#ifdef CGAL_USE_CIMG
+#define cimg_display 0 // To avoid X11 or Windows-GDI dependency
+#include <CImg.h>
+#endif
+#include "random.h"
+#include <utility>      // std::pair
+#include <vector>
+#include <CGAL/property_map.h>
+#include <CGAL/value_type_traits.h>
+
+class Scene {
+
+public:
+  typedef std::pair<Point, FT> PointMassPair;
+
+  typedef std::vector<PointMassPair> PointMassList;
+  typedef PointMassList::const_iterator InputIterator;
+
+  typedef CGAL::value_type_traits<InputIterator>::type MassPoint;
+
+  typedef CGAL::First_of_pair_property_map<PointMassPair> Point_property_map;
+  typedef CGAL::Second_of_pair_property_map<PointMassPair> Mass_property_map;
+
+  typedef CGAL::Optimal_transportation_reconstruction_2<K, Point_property_map,
+    Mass_property_map> R_s_2;
+
+  typedef K::Segment_2 Segment;
+
+  typedef R_s_2::Vector Vector;
+
+  typedef R_s_2::Vertex Vertex;
+  typedef R_s_2::Vertex_handle Vertex_handle;
+  typedef R_s_2::Vertex_iterator Vertex_iterator;
+  typedef R_s_2::Vertex_circulator Vertex_circulator;
+  typedef R_s_2::Finite_vertices_iterator Finite_vertices_iterator;
+
+  typedef R_s_2::Edge Edge;
+  typedef R_s_2::Edge_circulator Edge_circulator;
+  typedef R_s_2::Finite_edges_iterator Finite_edges_iterator;
+
+  typedef R_s_2::Face_handle Face_handle;
+  typedef R_s_2::Face_circulator Face_circulator;
+  typedef R_s_2::Finite_faces_iterator Finite_faces_iterator;
+
+  typedef R_s_2::Vertex_handle_map Vertex_handle_map;
+  typedef R_s_2::Face_handle_map Face_handle_map;
+
+  typedef R_s_2::Vertex_handle_set Vertex_handle_set;
+  typedef R_s_2::Edge_set Edge_set;
+
+  typedef R_s_2::Edge_vector Edge_vector;
+
+  typedef R_s_2::Sample_ Sample_;
+  typedef R_s_2::Sample_vector Sample_vector;
+  typedef R_s_2::Sample_vector_const_iterator Sample_vector_const_iterator;
+
+  typedef R_s_2::PSample PSample;
+  typedef R_s_2::SQueue SQueue;
+
+  typedef R_s_2::Rec_edge_2 PEdge;
+
+
+private:
+  // data
+  std::vector<Sample_> m_samples;
+
+  Optimal_transportation_reconstruction_kerneled_2* m_pwsrec;
+  int m_ignore;
+  bool m_init_done;
+  double m_percentage;
+
+  // bbox
+  double m_bbox_x;
+  double m_bbox_y;
+  double m_bbox_size;
+
+public:
+  Scene() {
+    srand(0); // for sake of repeatability
+    m_ignore = 0;
+    m_init_done = false;
+    m_percentage = 100.;
+    m_bbox_x = 0.0;
+    m_bbox_y = 0.0;
+    m_bbox_size = 1.0;
+
+    m_pwsrec = new Optimal_transportation_reconstruction_kerneled_2();
+  }
+
+  ~Scene() {
+    clear();
+  }
+
+  void clear() {
+    m_pwsrec->clear();
+    m_samples.clear();
+  }
+
+
+
+  void subdivide() {
+    if (m_samples.size() < 3)
+      return;
+
+    std::vector<Sample_> new_samples;
+    std::vector<Sample_>::const_iterator it = m_samples.begin();
+    std::vector<Sample_>::const_iterator last = it++;
+    while (it != m_samples.end()) {
+      Point p = CGAL::midpoint(last->point(), it->point());
+      FT m = 0.5 * (last->mass() + it->mass());
+      new_samples.push_back(Sample_(p, m));
+      last = it++;
+    }
+    it = m_samples.begin();
+    Point p = CGAL::midpoint(last->point(), it->point());
+    FT m = 0.5 * (last->mass() + it->mass());
+    new_samples.push_back(Sample_(p, m));
+
+    std::vector<Sample_> final_samples;
+    std::vector<Sample_>::const_iterator it2 = new_samples.begin();
+    while (it != m_samples.end() && it2 != new_samples.end()) {
+      final_samples.push_back(*it);
+      final_samples.push_back(*it2);
+      it++;
+      it2++;
+    }
+
+    m_samples = final_samples;
+  }
+
+  // SAMPLE //
+
+  void add_sample(const Point& point, const FT mass = 1.0) {
+    m_samples.push_back(Sample_(point, mass));
+    m_init_done = false;
+  }
+
+  void add_outliers(const unsigned int nb) {
+    std::cerr << "adding " << nb << " outliers...";
+    for (unsigned int i = 0; i < nb; i++) {
+      Point outlier = CGAL::ORIGIN + random_vec<Vector>(1.3);
+      m_samples.push_back(outlier);
+    }
+    m_init_done = false;
+    std::cerr << "done" << std::endl;
+  }
+
+  void noise(const FT scale) {
+    std::cerr << "noising by " << scale << "...";
+    std::vector<Sample_>::iterator it;
+    for (it = m_samples.begin(); it != m_samples.end(); it++) {
+      Sample_& sample = *it;
+      Point& point = sample.point();
+      point = point + random_vec<Vector>(scale);
+    }
+    std::cerr << "done" << std::endl;
+  }
+
+  void normalize_points() {
+    noise(1e-5);
+    compute_bbox(m_bbox_x, m_bbox_y, m_bbox_size);
+    if (m_bbox_size == 0.0)
+      return;
+
+    Point center(m_bbox_x, m_bbox_y);
+    std::vector<Sample_>::iterator it;
+    for (it = m_samples.begin(); it != m_samples.end(); ++it) {
+      Sample_& sample = *it;
+      Vector vec = (sample.point() - center) / m_bbox_size;
+      sample.point() = CGAL::ORIGIN + vec;
+    }
+    m_bbox_x = m_bbox_y = 0.0;
+    m_bbox_size = 1.0;
+  }
+
+  void compute_bbox(double &x, double &y, double &scale) {
+    if (m_samples.empty()) {
+      x = y = 0.0;
+      scale = 1.0;
+      return;
+    }
+
+    FT x_min, x_max, y_min, y_max;
+    std::vector<Sample_>::const_iterator it = m_samples.begin();
+    Point p = it->point();
+    x_min = x_max = p.x();
+    y_min = y_max = p.y();
+    ++it;
+    for (; it != m_samples.end(); ++it) {
+      p = it->point();
+      x_min = (std::min)(x_min, p.x());
+      x_max = (std::max)(x_max, p.x());
+      y_min = (std::min)(y_min, p.y());
+      y_max = (std::max)(y_max, p.y());
+    }
+
+    x = 0.5 * (x_min + x_max);
+    y = 0.5 * (y_min + y_max);
+    scale = (std::max)(x_max - x_min, y_max - y_min);
+    if (scale == 0.0)
+      scale = 1.0;
+  }
+
+  // IO SAMPLES //
+
+  void load(const QString& filename, QWidget* qw) {
+
+    if (filename.contains(".xy", Qt::CaseInsensitive)) {
+      load_xy_file(filename);
+      normalize_points();
+      return;
+    }
+
+#ifdef CGAL_USE_CIMG
+    if (filename.contains(".bmp", Qt::CaseInsensitive)) {
+      bool use_gradient = false;
+
+      QMessageBox::StandardButton reply;
+      reply = QMessageBox::question(qw, QString("Open BMP"), "Use gradient?",
+        QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
+      if (reply == QMessageBox::Yes)
+        use_gradient = true;
+      else if (reply == QMessageBox::No)
+        use_gradient = false;
+      else
+        return;
+
+      if (use_gradient)
+        load_gradient(filename);
+      else
+        load_image(filename);
+      normalize_points();
+      return;
+    }
+
+    std::cerr << "Invalid file (try .xy, .bmp)" << std::endl;
+#else
+    CGAL_USE(qw);
+    std::cerr << "Invalid file (try .xy)" << std::endl;
+#endif
+
+
+  }
+
+  void load_xy_file(const QString& fileName) {
+
+    std::cout << "filename: " << fileName.toUtf8().constData() << std::endl;
+    std::ifstream ifs(qPrintable(fileName));
+    std::cerr << "reading xy...";
+    Point point;
+    unsigned int nb = 0;
+    while (ifs >> point) {
+      add_sample(point, 1.0);
+      nb++;
+    }
+    std::cerr << "done (" << nb << " points)" << std::endl;
+    ifs.close();
+  }
+
+
+#ifdef CGAL_USE_CIMG
+  void load_image(const QString& fileName) {
+    std::cerr << "reading image...";
+    cimg_library::CImg<float> image(qPrintable(fileName));
+    std::cerr << "done" << std::endl;
+
+    std::cerr << "computing grayscale...";
+    cimg_library::CImg<float> grayscale =
+      image.RGBtoHSV().get_channel(2).normalize(0.0f, 1.0f);
+    std::cerr << "done" << std::endl;
+
+    // turn pixels into weighted samples
+    std::cerr << "adding samples...";
+    for (int i = 0; i < grayscale.width(); i++) {
+      for (int j = 0; j < grayscale.height(); j++) {
+        float mass = 1.0f - grayscale.atXY(i, j);
+        double x = double(i) / grayscale.width();
+        double y = 1.0 - double(j) / grayscale.height();
+        if (mass > 0.f)
+          add_sample(Point(x, y), mass);
+      }
+    }
+    std::cerr << "done (" << m_samples.size() << ")" << std::endl;
+  }
+
+  void load_gradient(const QString& fileName) {
+    std::cerr << "reading image...";
+    cimg_library::CImg<float> image(qPrintable(fileName));
+    std::cerr << "done" << std::endl;
+
+    std::cerr << "computing gradient...";
+    cimg_library::CImgList<float> grad = image.get_gradient();
+    cimg_library::CImg<float> normgrad = sqrt(
+      grad[0].pow(2) + grad[1].pow(2)).normalize(0.0f, 1.0f);
+    std::cerr << "done" << std::endl;
+
+    // turn pixels into weighted samples
+    std::cerr << "adding samples...";
+    for (int i = 0; i < normgrad.width(); i++) {
+      for (int j = 0; j < normgrad.height(); j++) {
+        float mass = normgrad.atXY(i, j);
+        double x = double(i) / normgrad.width();
+        double y = 1.0 - double(j) / normgrad.height();
+        add_sample(Point(x, y), mass);
+      }
+    }
+    std::cerr << "done (" << m_samples.size() << ")" << std::endl;
+  }
+#endif
+
+  void print_vertex(Vertex vertex) {
+    std::cout << "vertex " << vertex << std::endl;
+  }
+
+
+  void print_edge(PEdge edge) {
+    int i = ((edge).edge()).second;
+    Point a = ((edge).edge()).first->vertex((i + 1) % 3)->point();
+    Point b = ((edge).edge()).first->vertex((i + 2) % 3)->point();
+    std::cout << "( " << (edge).priority() << ") ( " << a
+      << " , " << b << " )" << std::endl;
+  }
+
+
+  void debug_print()
+  {
+    std::vector<Point> isolated_points;
+    std::vector<Segment> edges;
+
+    m_pwsrec->list_output(std::back_inserter(isolated_points), std::back_inserter(edges));
+
+    int vertex_count = 0;
+    for (std::vector<Point>::iterator it = isolated_points.begin();
+      it != isolated_points.end(); it++) {
+      vertex_count++;
+      std::cout << *it << std::endl;
+    }
+    CGAL_assertion(vertex_count == 18);
+
+    int edge_count = 0;
+    for (std::vector<Segment>::iterator it = edges.begin();
+      it != edges.end(); it++) {
+      std::cout << *it << std::endl;
+      edge_count++;
+    }
+  }
+
+  void save(const QString& filename)
+  {
+    Sample_vector samples;
+    for (std::vector<Sample_>::iterator it = m_samples.begin();
+      it != m_samples.end(); ++it) {
+      Sample_& s = *it;
+      samples.push_back(&s);
+    }
+
+    if (filename.contains(".xy", Qt::CaseInsensitive)) {
+      save_xy(filename, samples);
+      return;
+    }
+
+    std::cerr << "Error: not an XY file." << std::endl;
+  }
+
+
+
+  void save_xy(const QString& filename, const Sample_vector& samples) {
+    std::ofstream ofs(qPrintable(filename));
+    for (Sample_vector_const_iterator it = samples.begin();
+      it != samples.end(); ++it) {
+      Sample_* sample = *it;
+      ofs << sample->point() << std::endl;
+    }
+    ofs.close();
+  }
+
+
+  // RECONSTRUCTION //
+
+  void set_options(const int verbose, const int mchoice,
+    const bool use_flip, const unsigned int relocation,
+    const double ghost) {
+
+    m_pwsrec->set_verbose(verbose);
+    m_pwsrec->set_random_sample_size(mchoice);
+    m_pwsrec->set_use_flip(use_flip);
+    m_pwsrec->set_relocation(relocation);
+    m_pwsrec->set_relevance(ghost);
+  }
+
+  bool init_reconstruction(const double percentage) {
+    std::cout << " init_reconstruction " << std::endl;
+
+    if (m_samples.empty()) {
+      std::cerr << "initialization failed (empty point set)" << std::endl;
+      return false;
+    }
+
+    Sample_vector vertices, samples;
+    select_samples(percentage, vertices, samples);
+
+    PointMassList point_mass_list;
+    Sample_vector_const_iterator it;
+    for (it = vertices.begin(); it != vertices.end(); it++) {
+      point_mass_list.push_back(
+        std::make_pair((*it)->point(), (*it)->mass()));
+    }
+
+    Point_property_map point_pmap;
+    Mass_property_map mass_pmap;
+    MassPoint mp;
+
+    m_pwsrec->initialize(point_mass_list.begin(), point_mass_list.end(),
+      point_pmap, mass_pmap);
+
+    m_init_done = true;
+
+    return true;
+  }
+
+  void decimate(const double percentage) {
+    std::cout << "decimating from " << m_samples.size() << " to...";
+    std::vector<Sample_> selected;
+
+    std::vector<Sample_>::iterator it;
+    for (it = m_samples.begin(); it != m_samples.end(); it++) {
+      const double rd = random_double(0.0, 1.0);
+      if (rd >= percentage)
+        selected.push_back(*it);
+    }
+
+    m_samples.clear();
+    std::copy(selected.begin(), selected.end(),
+      std::back_inserter(m_samples));
+    std::cout << m_samples.size() << std::endl;
+  }
+
+
+  void select_samples(const double percentage, Sample_vector& vertices,
+    Sample_vector& samples) {
+    std::vector<Sample_>::iterator it;
+    for (it = m_samples.begin(); it != m_samples.end(); ++it) {
+      Sample_& s = *it;
+
+      samples.push_back(&s);
+      FT rv = random_double(0.0, 1.0);
+      if (rv <= percentage)
+        vertices.push_back(&s);
+    }
+  }
+
+  void reconstruct_until(const unsigned int nv) {
+    std::cout << "reconstruct_until" << std::endl;
+    if (!m_init_done)
+      init_reconstruction(m_percentage);
+    m_pwsrec->run_until(nv);
+  }
+
+  void reconstruct(const unsigned int steps) {
+    std::cout << "reconstruct" << std::endl;
+    if (!m_init_done)
+      init_reconstruction(m_percentage);
+    m_pwsrec->run(steps);
+  }
+
+  void relocate_all_points() {
+    std::cout << "relocate_all_points" << std::endl;
+    m_pwsrec->relocate_all_points();
+  }
+
+  void output_console()
+  {
+    std::cout << std::endl;
+    std::cout << "OFF OUTPUT" << std::endl;
+    std::vector<Point> points;
+    std::vector<std::size_t> isolated_vertices;
+    std::vector<std::pair<std::size_t, std::size_t> > edges;
+
+    m_pwsrec->indexed_output(
+      std::back_inserter(points),
+      std::back_inserter(isolated_vertices),
+      std::back_inserter(edges));
+
+    std::cout << "OFF " << points.size() << " 0 " << edges.size() << std::endl;
+
+    // points
+    std::vector<Point>::iterator pit;
+    for (pit = points.begin(); pit != points.end(); pit++)
+      std::cout << *pit << std::endl;
+
+    // isolated vertices
+    std::vector<std::size_t>::iterator vit;
+    for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++)
+      std::cout << "1 " << *vit << std::endl;
+
+    // edges
+    std::vector<std::pair<std::size_t, std::size_t> >::iterator eit;
+    for (eit = edges.begin(); eit != edges.end(); eit++)
+      std::cout << "2 " << eit->first << " " << eit->second << std::endl;
+  }
+
+  // RENDER //
+
+  void render(const bool view_points, const bool view_vertices,
+    const bool view_edges, const bool view_ghost_edges,
+    const bool view_edge_cost, const bool view_edge_priority,
+    const bool view_bins, const bool view_foot_points,
+    const bool view_relocation, const bool view_edge_relevance,
+    const float point_size, const float vertex_size,
+    const float line_thickness)
+  {
+    if (m_pwsrec == NULL) {
+      return;
+    }
+
+    if (view_edges)
+      m_pwsrec->draw_edges(0.5f * line_thickness, 0.9f, 0.9f, 0.9f);
+
+    if (view_edge_cost)
+      m_pwsrec->draw_costs(line_thickness, view_ghost_edges);
+
+    if (view_edge_priority)
+      m_pwsrec->draw_pedges(line_thickness);
+
+    if (view_edge_relevance)
+      m_pwsrec->draw_relevance(line_thickness, m_ignore);
+
+    if (view_relocation)
+      m_pwsrec->draw_relocation();
+
+    if (view_vertices)
+      m_pwsrec->draw_vertices(vertex_size, 0.0f, 0.0f, 0.5f);
+
+    if (view_bins)
+      m_pwsrec->draw_bins(0.5f * line_thickness);
+
+    if (view_foot_points)
+      m_pwsrec->draw_footpoints(line_thickness, 0.2f, 0.8f, 0.2f);
+
+    if (view_points)
+      draw_samples(point_size);
+  }
+
+  void draw_samples(const float point_size) {
+
+    ::glPointSize(point_size);
+    ::glBegin(GL_POINTS);
+
+    std::vector<Sample_>::const_iterator it;
+    for (it = m_samples.begin(); it != m_samples.end(); it++) {
+      double mass = it->mass();
+
+      float value = mass;
+      float grey = 0.9 * (1.0f - value);
+      ::glColor3f(grey, grey, grey);
+      const Point& p = it->point();
+      ::glVertex2d(p.x(), p.y());
+    }
+    ::glEnd();
+  }
+
+
+  // PREDEFINED EXAMPLES //
+
+  void make_line(const unsigned int nb, const Point& start,
+    const Point& end) {
+    Point curr = start;
+    Vector incr = (end - start) / nb;
+    for (unsigned int i = 0; i < nb; i++) {
+      add_sample(curr);
+      curr = curr + incr;
+    }
+  }
+
+  void make_circle_arc(const unsigned int nb, const Point& c,
+    const double radius, const double min_angle = 0.0,
+    const double max_angle = 360.0) {
+    const double range = max_angle - min_angle;
+    const double incr = range / double(nb);
+    for (double angle = min_angle; angle < max_angle; angle += incr) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = c.x() + radius * cos(angle_rad);
+      double y = c.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+    }
+  }
+
+  void append_widely_variable_sampling(const float d1, const float d2) {
+    double angle;
+    double incr = d1;
+    Point c = Point(0.5, 0.5);
+    const double radius = 0.5;
+    // 0-90 deg -> d1
+    for (angle = 0.0; angle < 90.0; angle += incr) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = c.x() + radius * cos(angle_rad);
+      double y = c.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+    }
+    // 90-180 deg -> d1 -> d2
+    for (angle = 90.0; angle < 180.0; angle += incr) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = c.x() + radius * cos(angle_rad);
+      double y = c.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+      incr = d1 + (d2 - d1) / 90.0 * (angle - 90);
+    }
+    // 180-270 deg -> d2
+    incr = d2;
+    for (angle = 180.0; angle < 270.0; angle += incr) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = c.x() + radius * cos(angle_rad);
+      double y = c.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+    }
+    // 270-360 deg -> d2 -> d1
+    incr = d2;
+    for (angle = 270.0; angle < 360.0; angle += incr) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = c.x() + radius * cos(angle_rad);
+      double y = c.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+      incr = d2 + (d1 - d2) / 90.0 * (angle - 270.0);
+    }
+  }
+
+  void append_predefined_line(const int density) {
+    std::cerr << "append line...";
+    Point start(0.0, 0.5);
+    Point end(1.0, 0.5);
+    make_line(density, start, end);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_parallel_lines(const int nb_lines, const float space,
+    const int density) {
+    std::cerr << "append parallel lines...";
+    FT x[4];
+    x[0] = 0.0;
+    x[1] = 0.75;
+    x[2] = 1.0;
+    x[3] = 1.75;
+    FT y = 0.0;
+    for (int i = 0; i < nb_lines; ++i) {
+      int j = i % 2;
+      Point start(x[j], y);
+      Point end(x[j + 2], y);
+      make_line(density, start, end);
+      y += space;
+    }
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_circle(const int density, const float x,
+    const float y, const float radius) {
+    std::cerr << "append circle...";
+    Point center(x, y);
+    make_circle_arc(density, center, radius);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_spiral(const int nb_loops, const int density) {
+    std::cerr << "append spiral...";
+    Point center(0.5, 0.5);
+    const FT max_radius = 0.5;
+    const FT spacing = 10. / density; // target spacing
+    double radius = max_radius;
+    const double max_angle = nb_loops * 360.0;
+    for (double angle = max_angle; angle > 0.0; /**/) {
+      double angle_rad = (angle / 360.0) * 6.2831853;
+      double x = center.x() + radius * cos(angle_rad);
+      double y = center.y() + radius * sin(angle_rad);
+      Point point(x, y);
+      add_sample(point);
+
+      const double angle_incr = atan(spacing / radius);
+      angle -= angle_incr;
+      radius = max_radius * angle / max_angle;
+    }
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_half_circle(const int density) {
+    std::cerr << "append half circle...";
+    Point center(0.5, 0.5);
+    make_circle_arc(density, center, 0.5, 0.0, 180.0);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_box(const int density, const float x, const float y,
+    const float size_x, const float size_y) {
+    std::cerr << "append box...";
+    Point a(x - size_x / 2, y - size_y / 2);
+    Point b(x + size_x / 2, y - size_y / 2);
+    Point c(x + size_x / 2, y + size_y / 2);
+    Point d(x - size_x / 2, y + size_y / 2);
+    make_line(density, a, b);
+    make_line(density, b, c);
+    make_line(density, c, d);
+    make_line(density, d, a);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_box_with_boundaries(const int density) {
+    std::cerr << "append box with boundaries...";
+
+    Point a(0.1, 0.1);
+    Point b(0.4, 0.1);
+    Point c(0.6, 0.1);
+    Point d(0.9, 0.1);
+    Point e(0.9, 0.4);
+    Point f(0.9, 0.6);
+    Point g(0.9, 0.9);
+    Point h(0.6, 0.9);
+    Point i(0.4, 0.9);
+    Point j(0.1, 0.9);
+    Point k(0.1, 0.6);
+    Point l(0.1, 0.4);
+
+    make_line(density, a, b);
+    make_line(density, c, d);
+    make_line(density, d, e);
+    make_line(density, f, g);
+    make_line(density, g, h);
+    make_line(density, i, j);
+    make_line(density, j, k);
+    make_line(density, l, a);
+
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_box_with_missing_corners(const int density) {
+    std::cerr << "append box with missing corners...";
+    Point a(0.12, 0.1);
+    Point b(0.88, 0.1);
+    Point c(0.9, 0.12);
+    Point d(0.9, 0.88);
+    Point e(0.88, 0.9);
+    Point f(0.12, 0.9);
+    Point g(0.1, 0.88);
+    Point h(0.1, 0.12);
+    make_line(density, a, b);
+    make_line(density, c, d);
+    make_line(density, e, f);
+    make_line(density, g, h);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_boxes(const int density) {
+    std::cerr << "append two boxes...";
+    Point a(0.0, 0.0);
+    Point b(0.2, 0.0);
+    Point c(0.2, 1.0);
+    Point d(0.0, 1.0);
+    make_line(2 * density, a, b);
+    make_line(10 * density, b, c);
+    make_line(2 * density, c, d);
+    make_line(10 * density, d, a);
+
+    Point e(0.3, 0.0);
+    Point f(0.4, 0.0);
+    Point g(0.4, 0.3);
+    Point h(0.3, 0.3);
+    make_line(1 * density, e, f);
+    make_line(3 * density, f, g);
+    make_line(1 * density, g, h);
+    make_line(3 * density, h, e);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_stair(const int density) {
+    std::cerr << "append stair...";
+    Point a(0.0, 0.0);
+    Point b(0.1, 0.0);
+    Point c(0.1, 0.1);
+    Point d(0.2, 0.1);
+    Point e(0.2, 0.2);
+    Point f(0.3, 0.2);
+    Point g(0.3, 0.3);
+    Point h(0.4, 0.3);
+    Point i(0.4, 0.4);
+
+    make_line(density, a, b);
+    make_line(density, b, c);
+    make_line(density, c, d);
+    make_line(density, d, e);
+    make_line(density, e, f);
+    make_line(density, f, g);
+    make_line(density, g, h);
+    make_line(density, h, i);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_skyline(const int density) {
+    std::cerr << "append skyline...";
+    Point a(0.0, 0.0);
+    Point b(0.1, 0.0);
+    Point c(0.1, 0.5);
+    Point d(0.3, 0.5);
+    Point e(0.3, 0.2);
+    Point f(0.4, 0.2);
+    Point g(0.4, 0.4);
+    Point h(0.6, 0.4);
+    Point i(0.6, -0.1);
+    Point j(0.7, -0.1);
+    Point k(0.7, 0.2);
+    Point l(0.8, 0.2);
+    Point m(0.8, 0.7);
+    Point n(0.9, 0.7);
+    Point o(0.9, 0.5);
+    Point p(1.0, 0.5);
+    Point q(1.0, 0.1);
+    Point r(1.1, 0.1);
+    Point s(1.1, -0.1);
+    Point t(1.2, -0.1);
+
+    make_line(1 * density, a, b);
+    make_line(5 * density, b, c);
+    make_line(2 * density, c, d);
+    make_line(3 * density, d, e);
+    make_line(1 * density, e, f);
+    make_line(2 * density, f, g);
+    make_line(2 * density, g, h);
+    make_line(5 * density, h, i);
+    make_line(1 * density, i, j);
+    make_line(3 * density, j, k);
+    make_line(1 * density, k, l);
+    make_line(5 * density, l, m);
+    make_line(1 * density, m, n);
+    make_line(2 * density, n, o);
+    make_line(1 * density, o, p);
+    make_line(4 * density, p, q);
+    make_line(1 * density, q, r);
+    make_line(2 * density, r, s);
+    make_line(1 * density, s, t);
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_star(const int nb_branches, const int density) {
+    std::cerr << "append star...";
+    const double deg_in_rad = 3.1415926535897932384626 / 180.0;
+    const double incr = 180.0 / nb_branches;
+    double angle = 0.0;
+    const Point center(0.5, 0.5);
+    for (int i = 0; i < nb_branches; i++) {
+      const double angle_rad = angle * deg_in_rad;
+      Vector v(sin(angle_rad), cos(angle_rad));
+      Point a = center + v;
+      Point b = center - v;
+      make_line(density, a, b);
+      angle += incr;
+    }
+    std::cerr << "done" << std::endl;
+  }
+
+  void append_predefined_increasingly_sharp_angles(const int density,
+    const double min_angle) {
+    const double deg_in_rad = 3.1415926535897932384626 / 180.0;
+    double prev_angle = 0.0;
+    double curr_angle = min_angle;
+    double incr = min_angle;
+    const double r1 = 0.5;
+    const Point center(0.5, 0.5);
+    while (curr_angle < 360.0) {
+      Vector va(r1 * cos(prev_angle * deg_in_rad),
+        r1 * sin(prev_angle * deg_in_rad));
+      Vector vb(r1 * cos(curr_angle * deg_in_rad),
+        r1 * sin(curr_angle * deg_in_rad));
+      const double average_angle = 0.5 * (prev_angle + curr_angle);
+      Vector vc(r1 * cos(average_angle * deg_in_rad),
+        r1 * sin(average_angle * deg_in_rad));
+      Point a = center + va;
+      Point b = center + vb;
+      Point c = center + 2 * vc;
+
+      make_line(density, a, c);
+      make_line(density, b, c);
+
+      prev_angle = curr_angle;
+      curr_angle += incr;
+      incr += 2.0;
+    }
+    noise(1e-5);
+  }
+};
+
+#endif // SCENE_H_
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.cpp b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.cpp
new file mode 100644
index 0000000..4e160e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.cpp
@@ -0,0 +1,642 @@
+// STL
+#include <fstream>
+
+// Qt
+#include <QtGui>
+#include <QDialog>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QClipboard>
+
+// local
+#include "window.h"
+#include "ui_options.h"
+#include "dialog_options.h"
+
+MainWindow::MainWindow() : 
+QMainWindow(), Ui_MainWindow(), 
+maxNumRecentFiles(15), recentFileActs(15)
+{
+  setupUi(this);
+
+  // init scene
+  m_scene = new Scene;
+  viewer->set_scene(m_scene);
+
+  // options
+  m_verbose = 0;
+  m_mchoice = 0;
+  m_relevance = 1.0;
+  m_use_flip = true;
+  m_percent  = 100.0;
+  m_relocation = 2;
+
+  // accepts drop events
+  setAcceptDrops(true);
+
+  // Handling actions
+  addRecentFiles(menuFile, actionQuit);
+  connect(actionQuit, SIGNAL(triggered()), this, SLOT(close()));
+  connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
+  Q_EMIT update();
+  viewer->update();
+}
+
+MainWindow::~MainWindow()
+{
+  delete m_scene;
+}
+
+void MainWindow::addToRecentFiles(QString fileName)
+{
+  QSettings settings;
+  QStringList files = settings.value("recentFileList").toStringList();
+  files.removeAll(fileName);
+  files.prepend(fileName);
+  while (files.size() > (int)maxNumRecentFiles)
+    files.removeLast();
+  settings.setValue("recentFileList", files);
+  updateRecentFileActions();
+}
+
+void MainWindow::dropEvent(QDropEvent *event)
+{
+  Q_FOREACH(QUrl url, event->mimeData()->urls())
+  {
+    QString filename = url.toLocalFile();
+    if (!filename.isEmpty())
+    {
+      QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
+      open(filename);
+    }
+  }
+  event->acceptProposedAction();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+  event->accept();
+}
+
+void MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+  if (event->mimeData()->hasFormat("text/uri-list"))
+    event->acceptProposedAction();
+}
+
+void MainWindow::openRecentFile_aux()
+{
+  QAction* action = qobject_cast<QAction*>(sender());
+  if (action)
+    Q_EMIT openRecentFile(action->data().toString());
+}
+
+void MainWindow::updateRecentFileActions()
+{
+  QSettings settings;
+  QStringList files = settings.value("recentFileList").toStringList();
+
+  int numRecentFiles = qMin(files.size(), (int)maxNumberOfRecentFiles());
+  for (int i = 0; i < numRecentFiles; ++i) {
+    QString strippedName = QFileInfo(files[i]).fileName();
+    QString text = tr("&%1 %2").arg(i).arg(strippedName);
+    recentFileActs[i]->setText(text);
+    recentFileActs[i]->setData(files[i]);
+    recentFileActs[i]->setVisible(true);
+  }
+  for (unsigned int j = numRecentFiles; j < maxNumberOfRecentFiles(); ++j)
+    recentFileActs[j]->setVisible(false);
+
+  recentFilesSeparator->setVisible(numRecentFiles > 0);
+}
+
+void MainWindow::addRecentFiles(QMenu* menu, QAction* insertBeforeAction)
+{
+  if (insertBeforeAction)
+    recentFilesSeparator = menu->insertSeparator(insertBeforeAction);
+  else
+    recentFilesSeparator = menu->addSeparator();
+  recentFilesSeparator->setVisible(false);
+
+  for (unsigned int i = 0; i < maxNumberOfRecentFiles(); ++i) {
+    recentFileActs[i] = new QAction(this);
+    recentFileActs[i]->setVisible(false);
+    connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile_aux()));
+    if (insertBeforeAction)
+      menu->insertAction(insertBeforeAction, recentFileActs[i]);
+    else
+      menu->addAction(recentFileActs[i]);
+  }
+  updateRecentFileActions();
+}
+
+void MainWindow::open(const QString& filename)
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->load(filename, this);
+  QApplication::restoreOverrideCursor();
+  addToRecentFiles(filename);
+  on_actionRecenter_triggered();
+  update();
+}
+
+void MainWindow::save(const QString& filename)
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->save(filename);
+  QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::update()
+{
+  viewer->repaint();
+}
+
+void MainWindow::on_actionClear_triggered()
+{
+  m_scene->clear();
+  update();
+}
+
+void MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName =
+      QFileDialog::getOpenFileName(this, tr("Open point set"), ".");
+  if (fileName.isEmpty()) return;
+  open(fileName);
+}
+
+void MainWindow::on_actionSave_triggered()
+{
+  QString filename =
+    QFileDialog::getSaveFileName(this, tr("Save point set"), ".", tr("*.xy"));
+  if (filename.isEmpty()) return;
+  save(filename);
+}
+
+
+void MainWindow::on_actionInsertPoint_toggled() 
+{
+  viewer->toggle_insert_points();
+  update();
+}
+
+void MainWindow::on_actionRecenter_triggered() 
+{
+  double center_x, center_y, scale;
+  m_scene->compute_bbox(center_x, center_y, scale);
+  viewer->set_camera(center_x, center_y, 1. / scale);
+  update();
+}
+
+
+///////////////////////////
+// PREDEFINED POINT SETS //
+///////////////////////////
+
+void MainWindow::on_actionCircle_triggered()
+{
+  bool ok;
+  int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 300, 10, 10000, 1, &ok);
+  if (!ok) return;
+
+  float x = QInputDialog::getDouble(
+      this, tr("Center x"), tr("Center x:"), 0.0, 0.0, 10, 1, &ok);
+  if (!ok) return;
+
+  float y = QInputDialog::getDouble(
+      this, tr("Center y"), tr("Center y:"), 0.0, 0.0, 10, 1, &ok);
+  if (!ok) return;
+
+  float radius = QInputDialog::getDouble(
+      this, tr("Radius"), tr("Radius:"), 0.5, 0.1, 10, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_circle(density, x, y, radius);
+  update();
+}
+
+void MainWindow::on_actionHalf_circle_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 150, 10, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_half_circle(density);
+  update();
+}
+
+void MainWindow::on_actionSpiral_triggered()
+{
+  bool ok;
+
+  int loops = QInputDialog::getInt(
+      this, tr("Loops"), tr("Number:"), 3, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_spiral(loops,density);
+  update();
+}
+
+
+void MainWindow::on_actionLine_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 50, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_line(density);
+  update();
+}
+
+void MainWindow::on_actionBox_triggered()
+{
+  bool ok;
+  int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 100, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  float x = QInputDialog::getDouble(
+      this, tr("x"), tr("x:"), 0.0, 0.0, 10.0, 1, &ok);
+  if (!ok) return;
+
+  float y = QInputDialog::getDouble(
+      this, tr("y"), tr("y:"), 0.0, 0.0, 10.0, 1, &ok);
+  if (!ok) return;
+
+  float sx = QInputDialog::getDouble(
+      this, tr("size x"), tr("size x:"), 1.0, 0.1, 10.0, 1, &ok);
+  if (!ok) return;
+
+  float sy = QInputDialog::getDouble(
+      this, tr("size y"), tr("size y:"), 1.0, 0.1, 10.0, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_box(density, x, y, sx, sy);
+  update();
+}
+
+void MainWindow::on_actionBoxes_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_boxes(density);
+  update();
+}
+
+void MainWindow::on_actionParallel_lines_triggered()
+{
+  bool ok;
+
+  int lines = QInputDialog::getInt(
+      this, tr("Lines"), tr("Number:"), 3, 1, 10000, 1, &ok);
+  if(!ok) return;
+
+  float space = QInputDialog::getDouble(
+      this, tr("Space"), tr("Space:"), 0.2, 0.1, 10, 1, &ok);
+  if (!ok) return;
+
+  int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if(!ok) return;
+
+  m_scene->append_predefined_parallel_lines(lines, space, density);
+  update();
+}
+
+void MainWindow::on_actionBox_with_boundaries_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_box_with_boundaries(density);
+  update();
+}
+
+void MainWindow::on_actionBox_with_missing_corners_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_box_with_missing_corners(density);
+  update();
+}
+
+void MainWindow::on_actionStar_triggered()
+{
+  bool ok;
+  int nb_branches = QInputDialog::getInt(
+      this, tr("Branches"), tr("Branches:"), 20, 2, 10000, 1, &ok);
+  if(!ok) return;
+
+  int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 100, 10, 10000, 1, &ok);
+  if(!ok) return;
+
+  m_scene->append_star(nb_branches,density);
+  update();
+}
+
+
+void MainWindow::on_actionStair_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 30, 2, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_stair(density);
+  on_actionRecenter_triggered();
+  update();
+}
+
+void MainWindow::on_actionSkyline_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 10, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_skyline(density);
+  on_actionRecenter_triggered();
+  update();
+}
+
+void MainWindow::on_actionIncreasingly_sharp_angles_triggered()
+{
+  bool ok;
+  unsigned int density = QInputDialog::getInt(
+      this, tr("Density"), tr("Density:"), 100, 1, 10000, 1, &ok);
+  if (!ok) return;
+
+  double min_angle = QInputDialog::getDouble(
+      this, tr("Min Angle"), tr("Min Angle:"), 1.0, 1.0, 360.0, 1.0, &ok);
+  if (!ok) return;
+
+  m_scene->append_predefined_increasingly_sharp_angles(density, min_angle);
+  on_actionRecenter_triggered();
+  update();
+}
+
+void MainWindow::on_actionWidely_variable_sampling_triggered()
+{
+  bool ok;
+  float d1 = QInputDialog::getDouble(
+      this, tr("Delta-angle"), tr("Delta-angle:"), 1, 0.01, 20.0, 2, &ok);
+  if (!ok) return;
+
+  float d2 = QInputDialog::getDouble(
+      this, tr("Delta-angle"), tr("Delta-angle:"), 10, 0.01, 30.0, 2, &ok);
+  if (!ok) return;
+
+  m_scene->append_widely_variable_sampling(d1, d2);
+  update();
+}
+
+void MainWindow::on_actionNoise_triggered()
+{
+  bool ok;
+  double noise = QInputDialog::getDouble(
+      this, tr("Noise"), tr("Amount:"), 0.003, 0.0, 1000.0, 8, &ok);
+  if (!ok) return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->noise(noise);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionAdd_outliers_triggered()
+{
+  bool ok;
+  unsigned int nb = (unsigned)
+        QInputDialog::getInt(
+            this, tr("Outliers"), tr("How many:"), 10, 1, 100000, 1, &ok);
+  if (!ok) return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->add_outliers(nb);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionSubdivide_triggered()
+{
+  m_scene->subdivide();
+  update();
+}
+
+void MainWindow::on_actionDecimate_triggered()
+{
+  bool ok;
+  int percent = QInputDialog::getInt(
+      this, tr("Decimate"), tr("Percentage:"), 50, 1, 100, 1, &ok);
+  if (!ok) return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  const double percentage = double(percent) / 100.0;
+  m_scene->decimate(percentage);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+
+////////////////////
+// RECONSTRUCTION //
+////////////////////
+
+void MainWindow::set_scene_options()
+{
+  m_scene->set_options(m_verbose, m_mchoice, m_use_flip,
+      m_relocation, m_relevance);
+}
+
+void MainWindow::on_actionReconstruction_reinit_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  set_scene_options();
+  m_scene->init_reconstruction(percentage());
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionReconstruction_one_step_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  set_scene_options();
+  m_scene->reconstruct(1);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionReconstruction_10_steps_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  set_scene_options();
+  m_scene->reconstruct(10);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionReconstruction_100_steps_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  set_scene_options();
+  m_scene->reconstruct(100);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionReconstruction_1000_steps_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  set_scene_options();
+  m_scene->reconstruct(1000);
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionReconstruction_until_triggered()
+{
+  bool ok;
+  int nb_points = QInputDialog::getInt(
+      this, tr("Number of Points"), tr("Nb:"), 4, 1, 1000000, 1, &ok);
+  if (!ok) return;
+
+  set_scene_options();
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->reconstruct_until(nb_points);
+  QApplication::restoreOverrideCursor();
+
+  update();
+}
+
+void MainWindow::on_actionRelocate_vertices_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->relocate_all_points();
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+void MainWindow::on_actionOutput_console_triggered()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_scene->output_console();
+  QApplication::restoreOverrideCursor();
+  update();
+}
+
+
+
+//////////
+// VIEW //
+//////////
+
+void MainWindow::on_actionView_points_toggled()
+{
+  viewer->toggle_view_points();
+  update();
+}
+
+void MainWindow::on_actionView_vertices_toggled()
+{
+  viewer->toggle_view_vertices();
+  update();
+}
+
+void MainWindow::on_actionView_edges_toggled()
+{
+  viewer->toggle_view_edges();
+  update();
+}
+
+void MainWindow::on_actionView_ghost_toggled()
+{
+  viewer->toggle_view_ghost_edges();
+  update();
+}
+
+void MainWindow::on_actionView_edge_cost_toggled()
+{
+  viewer->toggle_view_edge_cost();
+  update();
+}
+
+void MainWindow::on_actionView_edge_priority_toggled()
+{
+  viewer->toggle_view_edge_priority();
+  update();
+}
+
+void MainWindow::on_actionView_bins_toggled()
+{
+  viewer->toggle_view_bins();
+  update();
+}
+
+void MainWindow::on_actionView_foot_points_toggled()
+{
+  viewer->toggle_view_foot_points();
+  update();
+}
+
+void MainWindow::on_actionView_relocation_toggled()
+{
+  viewer->toggle_view_relocation();
+  update();
+}
+
+void MainWindow::on_actionView_relevance_toggled()
+{
+  viewer->toggle_view_edge_relevance();
+  update();
+}
+
+void MainWindow::on_actionSet_options_triggered()
+{
+  Dialog_options dlg;
+  dlg.set_all_ranges();
+  dlg.set_verbose(m_verbose);
+  dlg.set_random_sample_size(m_mchoice);
+  dlg.set_percent(m_percent);
+  dlg.set_relocation(m_relocation);
+  dlg.set_relevance(m_relevance);
+  dlg.set_use_flip(m_use_flip);
+  dlg.set_multiple_choice_checkbox(m_mchoice != 0);
+  dlg.set_line_thickness(viewer->line_thickness());
+  dlg.set_point_size(viewer->point_size());
+  dlg.set_vertex_size(viewer->vertex_size());
+
+  if (dlg.exec() == QDialog::Accepted)
+  {
+    m_verbose = dlg.get_verbose();
+    m_mchoice = dlg.get_mchoice();
+    m_percent = dlg.get_percent();
+    m_relocation = dlg.get_relocation();
+    m_relevance  = dlg.get_relevance();
+    m_use_flip   = dlg.get_use_flip();
+
+    set_scene_options();
+    viewer->line_thickness() = dlg.get_line_thickness();
+    viewer->point_size()  = dlg.get_point_size();
+    viewer->vertex_size() = dlg.get_vertex_size();
+    update();
+  }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.h b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.h
new file mode 100644
index 0000000..07a80ac
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Optimal_transportation_reconstruction_2/window.h
@@ -0,0 +1,119 @@
+#ifndef WINDOW_
+#define WINDOW_
+
+// SLT
+#include <list>
+
+// Qt
+#include <QWidget>
+#include <QString>
+
+// local
+#include "scene.h"
+#include "ui_pwsrec.h"
+
+class MainWindow : public QMainWindow, public Ui_MainWindow
+{
+  Q_OBJECT
+
+private:
+  Scene* m_scene;
+
+  // main options
+  int  m_verbose;
+  int  m_mchoice;
+  bool m_use_flip;
+  double m_relevance;
+  double m_percent;
+  double m_relocation;
+
+  unsigned int maxNumRecentFiles;
+  QAction* recentFilesSeparator;
+  QVector<QAction*> recentFileActs;
+
+public:
+  MainWindow();
+  ~MainWindow();
+
+  // Parameters
+  void set_scene_options();
+
+  double percentage() const { return m_percent / 100.0; }
+
+  protected Q_SLOTS:
+  // drag and drop
+  void dropEvent(QDropEvent *event);
+  void closeEvent(QCloseEvent *event);
+  void dragEnterEvent(QDragEnterEvent *event);
+
+  // recent files
+  void openRecentFile_aux();
+  void updateRecentFileActions();
+  void addToRecentFiles(QString fileName);
+  void addRecentFiles(QMenu* menu, QAction* insertBefore = 0);
+  unsigned int maxNumberOfRecentFiles() const {return maxNumRecentFiles;}
+
+  // io
+  void open(const QString& file);
+  void save(const QString& file);
+
+  public Q_SLOTS:
+  // render
+  void update();
+  void on_actionRecenter_triggered();
+
+  // io
+  void on_actionClear_triggered();
+  void on_actionLoadPoints_triggered();
+  void on_actionSave_triggered();
+  void on_actionInsertPoint_toggled();
+  void on_actionSubdivide_triggered();
+  void on_actionDecimate_triggered();
+
+  // data
+  void on_actionStar_triggered();
+  void on_actionBox_triggered();
+  void on_actionLine_triggered();
+  void on_actionStair_triggered();
+  void on_actionBoxes_triggered();
+  void on_actionNoise_triggered();
+  void on_actionSpiral_triggered();
+  void on_actionCircle_triggered();
+  void on_actionSkyline_triggered();
+  void on_actionHalf_circle_triggered();
+  void on_actionAdd_outliers_triggered();
+  void on_actionParallel_lines_triggered();
+  void on_actionBox_with_boundaries_triggered();
+  void on_actionBox_with_missing_corners_triggered();
+  void on_actionIncreasingly_sharp_angles_triggered();
+  void on_actionWidely_variable_sampling_triggered();
+
+  // reconstruction
+  void on_actionSet_options_triggered();
+  void on_actionReconstruction_one_step_triggered();
+  void on_actionReconstruction_10_steps_triggered();
+  void on_actionReconstruction_100_steps_triggered();
+  void on_actionReconstruction_1000_steps_triggered();
+  void on_actionReconstruction_until_triggered();
+  void on_actionRelocate_vertices_triggered();
+  void on_actionReconstruction_reinit_triggered();
+  void on_actionOutput_console_triggered();
+
+  // view
+  void on_actionView_points_toggled();
+  void on_actionView_vertices_toggled();
+  void on_actionView_edges_toggled();
+  void on_actionView_ghost_toggled();
+  void on_actionView_edge_cost_toggled();
+  void on_actionView_edge_priority_toggled();
+  void on_actionView_relevance_toggled();
+
+  void on_actionView_bins_toggled();
+  void on_actionView_foot_points_toggled();
+  void on_actionView_relocation_toggled();
+
+  Q_SIGNALS:
+  void openRecentFile(QString filename);
+};
+
+#endif // WINDOW_
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/CMakeLists.txt
new file mode 100644
index 0000000..cb1a4a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/CMakeLists.txt
@@ -0,0 +1,61 @@
+project (Periodic_2_Triangulation_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../../include)
+include_directories (BEFORE ./include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+
+#--------------------------------
+# The "2D Periodic triangulation" demo: Periodic_2_triangulation_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Periodic_2_triangulation_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc )
+
+# find header files for projects that can show them
+file(GLOB headers "*.h")
+file(GLOB QT_headers "include/CGAL/Qt/*.h")
+file(GLOB P2T2_headers "../../../include/CGAL/*.h")
+SOURCE_GROUP("P2T2" FILES ${P2T2_headers})
+SOURCE_GROUP("QT" FILES ${QT_headers})
+
+# The executable itself.
+add_executable  ( Periodic_2_Delaunay_triangulation_2 
+  Periodic_2_Delaunay_triangulation_2.cpp
+  Periodic_2_triangulation_2.moc 
+  ${DT_UI_FILES} ${DT_RESOURCE_FILES} 
+  ${headers} ${QT_headers} ${P2T2_headers})
+
+qt5_use_modules( Periodic_2_Delaunay_triangulation_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 )
+
+# Link with Qt libraries
+target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp
new file mode 100644
index 0000000..be52bcb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp
@@ -0,0 +1,458 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_2_triangulation_2.h>
+#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
+#include <CGAL/Periodic_2_triangulation_traits_2.h>
+#include <CGAL/point_generators_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include "TriangulationCircumcircle.h"
+#include "TriangulationMovingPoint.h"
+#include "TriangulationConflictZone.h"
+#include "TriangulationRemoveVertex.h"
+#include "TriangulationPointInputAndConflictZone.h"
+#include <CGAL/Qt/PeriodicTriangulationGraphicsItem.h>
+#include <CGAL/Qt/PeriodicVoronoiGraphicsItem.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Periodic_2_triangulation_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+//typedef CGAL::Exact_predicates_inexact_constructions_kernel     EPIC;
+struct EPIC : public CGAL::Exact_predicates_inexact_constructions_kernel {};
+typedef CGAL::Periodic_2_triangulation_traits_2<EPIC>           K;
+typedef K::Point_2                                              Point_2;
+typedef K::Iso_rectangle_2                                      Iso_rectangle_2;
+
+typedef CGAL::Periodic_2_Delaunay_triangulation_2<K>            Periodic_DT;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Periodic_2_triangulation_2
+{
+  Q_OBJECT
+  
+private:  
+  Periodic_DT triang; 
+  QGraphicsScene scene;  
+
+  typedef CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT> PTGI;
+
+  CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT> * pt_gi;
+  CGAL::Qt::PeriodicTriangulationVoronoiGraphicsItem<Periodic_DT> * vgi;
+
+  CGAL::Qt::TriangulationMovingPoint<Periodic_DT> * pt_mp;
+  CGAL::Qt::TriangulationConflictZone<Periodic_DT> * pt_cz;
+  CGAL::Qt::TriangulationRemoveVertex<Periodic_DT> * pt_rv;
+  CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT> * pt_pi;
+  CGAL::Qt::TriangulationCircumcircle<Periodic_DT> *pt_cc;
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionClear_triggered();
+  void on_actionInsertPoint_toggled(bool checked);
+  void on_actionInsertRandomPoints_triggered();
+  void on_actionConvertTo9Cover_triggered();
+  void on_actionConvertTo1Cover_triggered();
+  
+  void on_actionMovingPoint_toggled(bool checked);
+  void on_actionShowConflictZone_toggled(bool checked);
+  void on_actionCircumcenter_toggled(bool checked);
+
+  void on_actionShowDelaunay_toggled(bool checked);
+  void on_actionShowVoronoi_toggled(bool checked);
+  void on_actionNoneSimplicesEmphasized_triggered(bool checked);
+  void on_actionUniqueSimplicesEmphasized_triggered(bool checked);
+  void on_actionStoredSimplicesEmphasized_triggered(bool checked);
+  void on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool checked);
+  void on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool checked);
+
+  
+  void on_actionLoadPoints_triggered();
+  void on_actionSavePoints_triggered();
+  
+  void on_actionRecenter_triggered();
+
+  virtual void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the Periodic triangulation
+  pt_gi = new CGAL::Qt::PeriodicTriangulationGraphicsItem<Periodic_DT>(&triang);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pt_gi, SLOT(modelChanged()));
+
+  pt_gi->setVerticesPen(QPen(Qt::red, 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(pt_gi);
+
+  // Add a GraphicItem for the Voronoi diagram
+  vgi = new CGAL::Qt::PeriodicTriangulationVoronoiGraphicsItem<Periodic_DT>(&triang);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   vgi, SLOT(modelChanged()));
+
+  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(vgi);
+  vgi->hide();
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT>(&scene, &triang, this );
+  QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+  
+  pt_mp = new CGAL::Qt::TriangulationMovingPoint<Periodic_DT>(&triang, this);
+  // TriangulationMovingPoint<Periodic_DT> emits a modelChanged() signal each
+  // time the moving point moves.
+  // The following connection is for the purpose of emitting changed().
+  QObject::connect(pt_mp, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  pt_cz = new CGAL::Qt::TriangulationConflictZone<Periodic_DT>(&scene, &triang, this);
+  QObject::connect(pt_cz, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  pt_rv = new CGAL::Qt::TriangulationRemoveVertex<Periodic_DT>(&triang, this);
+  QObject::connect(pt_rv, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  pt_cc = new CGAL::Qt::TriangulationCircumcircle<Periodic_DT>(&scene, &triang, this);
+  pt_cc ->setPen(QPen(::Qt::black, .01));
+  QObject::connect(pt_cc, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+  
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPoint);
+  ag->addAction(this->actionMovingPoint);
+  ag->addAction(this->actionCircumcenter);
+  ag->addAction(this->actionShowConflictZone);
+
+  // Check two actions 
+  this->actionInsertPoint->setChecked(true);
+  this->actionShowDelaunay->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(0, 0, 1, 1);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Periodic_2_triangulation_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+  
+  on_actionRecenter_triggered();
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  bool was_empty = triang.empty();
+  Point_2 p;
+  if(CGAL::assign(p, o)) {
+    double dx = triang.domain().xmax() - triang.domain().xmin();
+    double dy = triang.domain().ymax() - triang.domain().ymin();
+    p = Point_2(p.x()- std::floor(p.x()/dx),
+                p.y()- std::floor(p.y()/dy));
+    triang.insert(p);
+  }
+  Q_EMIT( changed());
+
+  if (was_empty)
+    on_actionRecenter_triggered();
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPoint_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pt_pi);
+    scene.installEventFilter(pt_rv);
+  } else {
+    scene.removeEventFilter(pt_pi);
+    scene.removeEventFilter(pt_rv);
+  }
+}
+
+void
+MainWindow::on_actionShowConflictZone_toggled(bool checked)
+{
+  if(checked) {
+    scene.installEventFilter(pt_cz);
+  } else {
+    scene.removeEventFilter(pt_cz);
+  }
+}
+
+
+void
+MainWindow::on_actionMovingPoint_toggled(bool checked)
+{
+
+  if(checked){
+    scene.installEventFilter(pt_mp);
+  } else {
+    scene.removeEventFilter(pt_mp);
+  }
+}
+
+void
+MainWindow::on_actionCircumcenter_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pt_cc);
+    pt_cc->show();
+  } else {  
+    scene.removeEventFilter(pt_cc);
+    pt_cc->hide();
+  }
+}
+
+
+void
+MainWindow::on_actionShowDelaunay_toggled(bool checked)
+{
+  pt_gi->setVisibleEdges(checked);
+}
+
+void
+MainWindow::on_actionShowVoronoi_toggled(bool checked)
+{
+  vgi->setVisible(checked);
+}
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  triang.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((triang.domain().min)(),
+                                                     (triang.domain().max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     250,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  std::vector<Point_2> points;
+  points.reserve(number_of_points);
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(*pg++);
+  }
+  triang.insert(points.begin(), points.end(), true);
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+
+  on_actionRecenter_triggered();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionConvertTo9Cover_triggered() {
+  if (triang.is_1_cover()) {
+    triang.convert_to_9_sheeted_covering();
+    Q_EMIT( changed());
+  }
+}
+
+void
+MainWindow::on_actionConvertTo1Cover_triggered() {
+  if (!triang.is_1_cover()) {
+    triang.convert_to_1_sheeted_covering();
+    Q_EMIT( changed());
+  }
+}
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  std::vector<K::Point_2> points;
+  while(ifs >> p) {
+    points.push_back(p);
+  }
+  triang.clear();
+  triang.insert(points.begin(), points.end());
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    for(Periodic_DT::Unique_vertex_iterator 
+          vit = triang.unique_vertices_begin(),
+          end = triang.unique_vertices_end();
+        vit!= end; ++vit)
+    {
+      ofs << vit->point() << std::endl;
+    }
+  }
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  pt_gi->modelChanged();
+  this->graphicsView->setSceneRect(pt_gi->boundingRect());
+  this->graphicsView->fitInView(pt_gi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+void MainWindow::on_actionNoneSimplicesEmphasized_triggered(bool)
+{
+  pt_gi->setEmphasizedSimplices(PTGI::NONE);
+  Q_EMIT changed();
+}
+void MainWindow::on_actionUniqueSimplicesEmphasized_triggered(bool)
+{
+  pt_gi->setEmphasizedSimplices(PTGI::UNIQUE);
+  Q_EMIT changed();
+}
+void MainWindow::on_actionStoredSimplicesEmphasized_triggered(bool)
+{
+  pt_gi->setEmphasizedSimplices(PTGI::STORED);
+  Q_EMIT changed();
+}
+void MainWindow::on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool)
+{
+  pt_gi->setEmphasizedSimplices(PTGI::UNIQUE_COVER_DOMAIN);
+  Q_EMIT changed();
+}
+void MainWindow::on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool)
+{
+  pt_gi->setEmphasizedSimplices(PTGI::STORED_COVER_DOMAIN);
+  Q_EMIT changed();
+}
+
+
+#include "Periodic_2_triangulation_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("www.nghk.nl");
+  app.setOrganizationName("Nico Kruithof");
+  app.setApplicationName("Periodic_2_Delaunay_triangulation_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  QStringList args = app.arguments();
+  args.removeAt(0);
+  Q_FOREACH(QString filename, args) {
+    mainWindow.open(filename);
+  }
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.qrc b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.ui b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.ui
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/Periodic_2_triangulation_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationCircumcircle.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationCircumcircle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/TriangulationCircumcircle.h
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationCircumcircle.h
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h
new file mode 100644
index 0000000..be48917
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h
@@ -0,0 +1,164 @@
+#ifndef CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
+#define CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsPolygonItem>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename PT>
+class TriangulationConflictZone : public GraphicsViewInput
+{
+public:
+  typedef PT                                       Periodic_triangulation;
+  typedef typename PT::Geom_traits                 K;
+  typedef typename PT::Face_handle                 Face_handle;
+  typedef typename PT::Periodic_triangle_iterator  Periodic_triangle_iterator;
+  typedef typename PT::Point                       Point;
+  typedef typename PT::Iso_rectangle               Iso_rectangle;
+  typedef typename PT::Geom_traits::Vector_2       Vector;
+  typedef typename PT::Triangle                    Triangle;
+
+  TriangulationConflictZone(QGraphicsScene* s, PT  * tr_, QObject* parent);
+
+protected:
+  void localize_and_insert_point(QPointF qt_point);
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  Face_handle m_hint;
+  std::list<Face_handle> faces;
+  std::list<QGraphicsPolygonItem*> qfaces;
+  Periodic_triangulation *m_tr;
+  Face_handle m_containing_face;
+  Converter<K> m_convert;
+  QGraphicsScene *m_scene;
+  QGraphicsPolygonItem *m_triangle;
+  bool m_animate;
+};
+
+
+template <typename T>
+TriangulationConflictZone<T>::TriangulationConflictZone(QGraphicsScene* s,
+                                                            T * tr_,
+                                                            QObject* parent)
+    :  GraphicsViewInput(parent), m_hint(NULL), m_tr(tr_), m_containing_face(Face_handle()), m_scene(s), m_triangle(NULL), m_animate(false)
+{
+}
+
+template <typename T>
+void 
+TriangulationConflictZone<T>::localize_and_insert_point(QPointF qt_point)
+{
+  Point p(m_convert(qt_point));
+  double dx = m_tr->domain().xmax() - m_tr->domain().xmin();
+  double dy = m_tr->domain().ymax() - m_tr->domain().ymin();
+  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
+
+  if (m_hint == NULL) {
+      m_hint = m_tr->faces_begin();
+  }
+
+  faces.clear();
+  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
+      it != qfaces.end();
+      ++it){
+    delete *it;
+  }
+  qfaces.clear();
+  m_tr->get_conflicts(p, std::back_inserter(faces), m_hint);
+  for(typename std::list<Face_handle>::iterator it = faces.begin();
+      it != faces.end();
+      ++it){
+    if(! m_tr->is_infinite(*it)){
+      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it)));
+      QColor color = ::Qt::blue;
+      color.setAlpha(150);
+      item->setBrush(QBrush(color));
+      item->setPen(QPen(::Qt::black, .01));
+      m_scene->addItem(item);
+      qfaces.push_back(item);
+    }
+  }
+}  
+  
+
+
+template <typename T>
+void 
+TriangulationConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(m_tr->number_of_vertices() == 0 ||
+     event->modifiers() != 0 ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+  localize_and_insert_point(event->scenePos());
+  m_animate = true;
+}
+
+
+template <typename T>
+void
+TriangulationConflictZone<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(m_animate){
+    localize_and_insert_point(event->scenePos());
+  }
+}
+
+
+template <typename T>
+void 
+TriangulationConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+{
+  faces.clear();
+  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
+      it != qfaces.end();
+      ++it){
+    delete *it;
+  }
+  qfaces.clear();
+  m_animate = false;
+  m_hint = NULL;
+}
+
+
+
+template <typename T>
+bool 
+TriangulationConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return false; // do not eat move event!
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_PERIODIC_TRIANGULATION_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h
new file mode 100644
index 0000000..90b6086
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationMovingPoint.h
@@ -0,0 +1,149 @@
+
+#ifndef CGAL_QT_TRIANGULATION_MOVING_POINT
+#define CGAL_QT_TRIANGULATION_MOVING_POINT
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class TriangulationMovingPoint : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Face_handle Face_handle;
+  typedef typename DT::Vertex_handle Vertex_handle;
+  typedef typename DT::Point Point;
+
+  TriangulationMovingPoint(DT  * dt_, QObject* parent);
+
+protected:
+  void localize_and_insert_point(QPointF qt_point);
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  DT * dt;
+  Vertex_handle vh;
+  bool movePointToInsert;
+  bool insertedPoint;
+};
+
+
+template <typename T>
+TriangulationMovingPoint<T>::TriangulationMovingPoint(T * dt_,
+							  QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_), vh(), movePointToInsert(false), insertedPoint(false)
+{}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
+{
+  Converter<typename T::Geom_traits> convert;
+  Point p = convert(qt_point);
+  double dx = dt->domain().xmax() - dt->domain().xmin();
+  double dy = dt->domain().ymax() - dt->domain().ymin();
+  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
+
+  typename T::Locate_type lt;
+  int li;
+  Face_handle fh = (vh == Vertex_handle()) ? Face_handle() : vh->face();
+  fh = dt->locate(p, lt, li, fh); // fh serves as a hint
+  if(lt != T::VERTEX){
+    vh = dt->insert(p, lt, fh, li);
+    insertedPoint = true;
+    Q_EMIT( modelChanged());
+  } else {
+    vh = fh->vertex(0);
+    insertedPoint = false;
+  }
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(dt->number_of_vertices() == 0 ||
+     event->modifiers() != 0 ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+  movePointToInsert = true;
+  localize_and_insert_point(event->scenePos());
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+
+  if (!movePointToInsert) return;
+
+  if (insertedPoint && (vh != Vertex_handle())) {
+    dt->remove(vh);
+    vh = Vertex_handle();
+  }
+
+  localize_and_insert_point(event->scenePos());
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+  if (! movePointToInsert || event->button() != ::Qt::LeftButton) {
+    return;
+  }
+
+  if (insertedPoint && (vh != Vertex_handle())) {
+    dt->remove(vh);
+    vh = Vertex_handle();
+  }
+  
+  Q_EMIT( modelChanged());
+ 
+  movePointToInsert = false;
+}
+
+
+
+template <typename T>
+bool 
+TriangulationMovingPoint<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return false; // do not eat move event!
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_MOVING_POINT
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h
new file mode 100644
index 0000000..529bee8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h
@@ -0,0 +1,124 @@
+
+#ifndef CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
+#define CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsPolygonItem>
+#include <QEvent>
+#include <list>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename PT>
+class TriangulationPointInputAndConflictZone : public GraphicsViewInput
+{
+public:
+  typedef typename PT::Geom_traits K;
+  typedef typename PT::Face_handle Face_handle;
+  typedef typename PT::Point Point;
+
+  TriangulationPointInputAndConflictZone(QGraphicsScene* s, PT  * dt_, QObject* parent);
+
+protected:
+  void localize_and_insert_point(QPointF qt_point);
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  std::list<Face_handle> faces;
+  std::list<QGraphicsPolygonItem*> qfaces;
+  PT * dt;
+  Converter<K> convert;
+  QGraphicsScene *scene_;
+  Point p;
+};
+
+
+template <typename T>
+TriangulationPointInputAndConflictZone<T>::TriangulationPointInputAndConflictZone(QGraphicsScene* s,
+							T * dt_,
+							QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_), scene_(s)
+{}
+
+
+
+
+template <typename T>
+void 
+TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  p = convert(event->scenePos());
+  double dx = dt->domain().xmax() - dt->domain().xmin();
+  double dy = dt->domain().ymax() - dt->domain().ymin();
+  p = Point(p.x()- std::floor(p.x()/dx), p.y()- std::floor(p.y()/dy));
+
+  if(dt->dimension() < 2 ||
+     event->modifiers() != 0 ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+  
+
+  dt->get_conflicts(p, std::back_inserter(faces));
+  for(typename std::list<Face_handle>::iterator it = faces.begin();
+      it != faces.end();
+      ++it) {
+      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
+      QColor color = ::Qt::blue;
+      color.setAlpha(150);
+      item->setBrush(QBrush(color));
+      item->setPen(QPen(::Qt::black, .01));
+      scene_->addItem(item);
+      qfaces.push_back(item);
+  }
+}
+
+
+template <typename T>
+void 
+TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+{
+  faces.clear();
+  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
+      it != qfaces.end();
+      ++it){
+    scene_->removeItem(*it);
+    delete *it;
+  }
+  qfaces.clear();
+  Q_EMIT( generate(CGAL::make_object(p)));
+}
+
+
+
+template <typename T>
+bool 
+TriangulationPointInputAndConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_POINT_INPUT_AND_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h
new file mode 100644
index 0000000..aac08e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/TriangulationRemoveVertex.h
@@ -0,0 +1,79 @@
+#ifndef CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
+#define CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+#include <CGAL/Qt/Converter.h>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class TriangulationRemoveVertex : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Face_handle Face_handle;
+  typedef typename DT::Vertex_handle Vertex_handle;
+  typedef typename DT::Point Point;
+
+  TriangulationRemoveVertex(DT  * dt_, QObject* parent);
+
+protected:
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ 
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  DT * dt;
+};
+
+
+template <typename T>
+TriangulationRemoveVertex<T>::TriangulationRemoveVertex(T * dt_,
+							  QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_)
+{}
+
+
+
+template <typename T>
+void 
+TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if ((event->modifiers()  & ::Qt::ShiftModifier) && (! (event->modifiers() & ::Qt::ControlModifier))) {
+    if(dt->number_of_vertices() == 0) {
+      dt->clear();
+    } else {
+      Converter<typename T::Geom_traits> convert;
+      typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
+      dt->remove(selected_vertex);
+    }
+    Q_EMIT( modelChanged());
+  }
+}
+
+
+
+template <typename T>
+bool 
+TriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return false;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/about_Periodic_2_triangulation_2.html b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/about_Periodic_2_triangulation_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/about_Periodic_2_triangulation_2.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/about_Periodic_2_triangulation_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/circumcenter.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/circumcenter.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/conflict_zone.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/conflict_zone.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/fit-page-32.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/fit-page-32.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/fit-page-32.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/fit-page-32.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/inputPoint.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/inputPoint.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/inputPoint.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/inputPoint.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/moving_point.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/moving_point.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/moving_point.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.png
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/moving_point.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.pdf b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/triangulation.pdf
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.pdf
copy to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/icons/triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h
new file mode 100644
index 0000000..5c2648a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h
@@ -0,0 +1,403 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you may redistribute it under
+// the terms of the Q Public License version 1.0.
+// See the file LICENSE.QPL distributed with CGAL.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+//                 Nico Kruithof <Nico at nghk.nl>
+
+#ifndef CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
+#define CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+namespace CGAL {
+  namespace Qt {
+    
+    template <typename T>
+    class PeriodicTriangulationGraphicsItem : public GraphicsItem
+    {
+      typedef typename T::Geom_traits Geom_traits;
+    public:
+      PeriodicTriangulationGraphicsItem(T* t_);
+      
+      void modelChanged();
+
+      enum Iterator_type {
+        STORED = 0,
+        UNIQUE, // 1
+        STORED_COVER_DOMAIN, // 2
+        UNIQUE_COVER_DOMAIN, // 3
+        NONE
+      };
+      void setEmphasizedSimplices(Iterator_type type) { this->type = type; }
+      Iterator_type getEmphasizedSimplices() { return this->type; }
+    public:
+      
+      QRectF boundingRect() const;
+      
+      void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+      
+      virtual void operator()(typename T::Face_handle fh);
+      
+      const QPen& verticesPen() const
+      {
+        return vertices_pen;
+      }
+      
+      const QPen& edgesPen() const
+      {
+        return edges_pen;
+      }
+
+      const QPen& facesPen() const
+      {
+        return faces_pen;
+      }
+      
+      const QPen& domainPen() const
+      {
+        return domain_pen;
+      }
+      
+      void setVerticesPen(const QPen& pen)
+      {
+        vertices_pen = pen;
+      }
+      
+      void setEdgesPen(const QPen& pen)
+      {
+        edges_pen = pen;
+      }
+
+      void setFacesPen(const QPen& pen)
+      {
+        edges_pen = pen;
+      }
+      
+      void setDomainPen(const QPen& pen)
+      {
+        domain_pen = pen;
+      }
+      
+      bool visibleVertices() const
+      {
+        return visible_vertices;
+      }
+      
+      void setVisibleVertices(const bool b)
+      {
+        visible_vertices = b;
+        update();
+      }
+      
+      bool visibleEdges() const
+      {
+        return visible_edges;
+      }
+      
+      void setVisibleEdges(const bool b)
+      {
+        visible_edges = b;
+        update();
+      }
+      
+    protected:
+      virtual void drawAll(QPainter *painter);
+      void paintVertices(QPainter *painter);
+      void paintOneVertex(const typename T::Point& point);
+      virtual void paintVertex(typename T::Vertex_handle vh);
+      void updateBoundingBox();
+      
+      T * t;
+      QPainter* m_painter;
+      PainterOstream<Geom_traits> painterostream;
+      
+      typename T::Vertex_handle vh;
+      typename T::Point p;
+      QRectF bounding_rect;
+      
+      QPen vertices_pen;
+      QPen edges_pen;
+      QPen faces_pen;
+      QPen domain_pen;
+      bool visible_edges;
+      bool visible_vertices;
+
+      Iterator_type type;
+    };
+    
+    
+    template <typename T>
+    PeriodicTriangulationGraphicsItem<T>::PeriodicTriangulationGraphicsItem(T * t_)
+    :  t(t_), painterostream(0),
+       visible_edges(true), visible_vertices(true),
+       type(NONE)
+    {
+      setVerticesPen(QPen(::Qt::red, 1.));      
+      setFacesPen(QPen(QColor(100,100,100)));
+      setDomainPen(QPen(::Qt::blue, .01));
+      setEdgesPen(QPen(::Qt::black, .01));
+      if(t->number_of_vertices() == 0){
+        this->hide();
+      }
+      updateBoundingBox();
+      setZValue(3);
+    }
+    
+    template <typename T>
+    QRectF 
+    PeriodicTriangulationGraphicsItem<T>::boundingRect() const
+    {
+      return bounding_rect;
+    }
+    
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
+    {
+      if(visible_edges) {
+        for (int i=0; i<3; i++) {
+          if (fh < fh->neighbor(i)){
+            m_painter->setPen(this->edgesPen());
+            painterostream << t->segment(fh,i);
+          }
+        }
+      }
+      if(visible_vertices) {
+        for (int i=0; i<3; i++) {
+          paintVertex(fh->vertex(i));
+        }
+      }
+    }
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::drawAll(QPainter *painter)
+    {
+      painterostream = PainterOstream<Geom_traits>(painter);
+
+      if (type != NONE)
+      {
+        typename T::Iterator_type itype;
+        switch (type) {
+        case STORED:
+          itype = T::STORED;
+          break;
+        case UNIQUE:
+          itype = T::UNIQUE;
+          break;
+        case STORED_COVER_DOMAIN:
+          itype = T::STORED_COVER_DOMAIN;
+          break;
+        case UNIQUE_COVER_DOMAIN:
+          itype = T::UNIQUE_COVER_DOMAIN;
+          break;
+        case NONE:
+        default:
+          assert(false);
+          itype = T::STORED;
+          break;
+        }
+        
+        Converter<Geom_traits> convert;
+
+        QMatrix matrix = painter->matrix();
+        painter->resetMatrix();
+
+        { // Faces
+          painter->setPen(QPen());
+          painter->setBrush(QBrush(::Qt::green));
+          for (typename T::Periodic_triangle_iterator tit = t->periodic_triangles_begin(itype);
+               tit != t->periodic_triangles_end(itype); ++tit) {
+            painter->drawConvexPolygon(matrix.map(convert(t->triangle(*tit))));
+          }
+          painter->setBrush(QBrush());
+        }
+        { // Edges
+          QPen pen = edgesPen();
+          pen.setWidth(pen.width() + 2);
+          painter->setPen(pen);
+          for (typename T::Periodic_segment_iterator sit = t->periodic_segments_begin(itype);
+               sit != t->periodic_segments_end(itype); ++sit) {
+            painter->drawLine(matrix.map(convert(t->segment(*sit))));
+          }
+        }
+        { // Vertices
+          QPen pen = verticesPen();
+          pen.setWidth(pen.width() + 2);
+          painter->setPen(pen);
+          for (typename T::Periodic_point_iterator pit = t->periodic_points_begin(itype);
+               pit != t->periodic_points_end(itype); ++pit) {
+            painter->drawPoint(matrix.map(convert(t->point(*pit))));
+          }
+        }
+
+        painter->setMatrix(matrix);
+      }      
+
+      if(visibleEdges()) {
+        painter->setPen(this->edgesPen());
+        t->draw_triangulation(painterostream);
+      }
+      
+      paintVertices(painter);
+    }
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::paintVertices(QPainter *painter)
+    {
+      if(visibleVertices()) {
+        Converter<Geom_traits> convert;
+        
+        QMatrix matrix = painter->matrix();
+        painter->resetMatrix();
+
+        QPen pen = verticesPen();
+        if (t->number_of_vertices() < 8) {
+          int v_index=1;
+          for (typename T::Unique_vertex_iterator vit = t->unique_vertices_begin();
+               vit != t->unique_vertices_end(); ++vit) {
+            pen.setColor(QColor(255*(v_index&1), 255*((v_index>>1)&1), 255*((v_index>>2)&1)));
+            painter->setPen(pen);
+
+            painter->drawPoint(matrix.map(convert(t->point(vit))));
+            std::vector<typename T::Vertex_handle> copies = t->periodic_copies(vit);
+            for (size_t i=0; i<copies.size(); ++i)
+              painter->drawPoint(matrix.map(convert(t->point(copies[i]))));
+
+            ++v_index;
+          }
+          
+        } else {
+          painter->setPen(verticesPen());
+          for (typename T::Periodic_point_iterator ppit = t->periodic_points_begin();
+               ppit != t->periodic_points_end(); ++ppit)
+            {
+              QPointF point = matrix.map(convert(t->point(*ppit)));
+              painter->drawPoint(point);
+            }
+        }
+
+        painter->setMatrix(matrix);
+      }
+    }
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::paintOneVertex(const typename T::Point& point)
+    {
+      Converter<Geom_traits> convert;
+      
+      m_painter->setPen(this->verticesPen());
+      QMatrix matrix = m_painter->matrix();
+      m_painter->resetMatrix();
+      m_painter->drawPoint(matrix.map(convert(point)));
+      m_painter->setMatrix(matrix);
+    }
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::paintVertex(typename T::Vertex_handle vh)
+    {
+      Converter<Geom_traits> convert;
+      
+      m_painter->setPen(this->verticesPen());
+      QMatrix matrix = m_painter->matrix();
+      m_painter->resetMatrix();
+      m_painter->drawPoint(matrix.map(convert(vh->point())));
+      m_painter->setMatrix(matrix);
+    }
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::paint(QPainter *painter, 
+                                                const QStyleOptionGraphicsItem *,
+                                                QWidget *)
+    {
+      drawAll(painter);
+
+      painter->setPen(this->domainPen());
+      const typename Geom_traits::Iso_rectangle_2 &domain = t->domain();
+      double dx = domain.xmax()-domain.xmin();
+      double dy = domain.ymax()-domain.ymin();
+      typename T::Covering_sheets sheets = t->number_of_sheets();
+      for (int x=0; x<sheets[0]; ++x) {
+        for (int y=0; y<sheets[1]; ++y) {
+          painter->drawRect((int)(domain.xmin() + x*dx),
+                            (int)(domain.ymin() + y*dy),
+                            (int)dx, (int)dy);
+        }
+      }
+      m_painter = painter;
+    }
+    
+    // We let the bounding box only grow, so that when vertices get removed
+    // the maximal bbox gets refreshed in the GraphicsView
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::updateBoundingBox()
+    {
+      prepareGeometryChange();
+      
+      CGAL::Bbox_2 bb = t->domain().bbox();
+      for (typename T::Periodic_triangle_iterator tit = t->periodic_triangles_begin(T::STORED_COVER_DOMAIN);
+           tit != t->periodic_triangles_end(T::STORED_COVER_DOMAIN); ++tit) {
+        bb = bb + t->triangle(*tit).bbox();
+      }
+      
+      double xmin = bb.xmin();
+      double ymin = bb.ymin();
+      double dx = bb.xmax() - xmin;
+      double dy = bb.ymax() - ymin;
+
+      double delta = 0.05;
+      xmin -= delta * dx;
+      ymin -= delta * dy;
+      dx += 2 * delta * dx;
+      dy += 2 * delta * dy;
+
+      bounding_rect = QRectF(xmin, ymin, dx, dy);
+    }
+    
+    
+    template <typename T>
+    void 
+    PeriodicTriangulationGraphicsItem<T>::modelChanged()
+    {
+      if((t->number_of_vertices() == 0) ){
+        this->hide();
+      } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
+        this->show();
+      }
+      updateBoundingBox();
+      update();
+    }
+    
+    
+  } // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_PERIODIC_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicVoronoiGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicVoronoiGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicVoronoiGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicVoronoiGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/CMakeLists.txt
new file mode 100644
index 0000000..1da698a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/CMakeLists.txt
@@ -0,0 +1,102 @@
+
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project( Periodic_3_triangulation_3_demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Find CGAL
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+find_package(Qt5 QUIET COMPONENTS Xml OpenGL Help Core)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find QGLViewer
+if(Qt5_FOUND)
+  add_definitions(-DQT_NO_KEYWORDS)
+  find_package(QGLViewer)
+endif(Qt5_FOUND)
+
+if (CGAL_FOUND AND CGAL_Qt5_FOUND AND OPENGL_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND AND TARGET Qt5::qcollectiongenerator)
+
+   include_directories( ${QGLVIEWER_INCLUDE_DIR} )
+
+  # UI files (Qt Designer files)
+  qt5_wrap_ui ( UI_FILES MainWindow.ui )
+
+  # qrc files (resource files)
+  qt5_add_resources( RESOURCE_FILES ./Periodic_3_triangulation_3.qrc )
+
+  # use the Qt MOC preprocessor on classes that derive from QObject
+  qt5_generate_moc( "Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_Scene.cpp" )
+  qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_MainWindow.cpp" )
+  qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_Viewer.cpp" )
+
+  if(DEFINED QT_QCOLLECTIONGENERATOR_EXECUTABLE)
+  else()
+    set(QT_QCOLLECTIONGENERATOR_EXECUTABLE qcollectiongenerator)
+  endif()
+
+  # generate QtAssistant collection file
+  add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc
+      DEPENDS Periodic_3_triangulation_3.qhp Periodic_3_triangulation_3.qhcp
+      COMMAND Qt5::qcollectiongenerator
+                 ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_3_triangulation_3.qhcp
+                 -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_3_triangulation_3.qhc
+  )
+
+  # Make sure the compiler can find generated .moc files
+  include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+  include_directories( ${QT_INCLUDE_DIR} )
+  include_directories( ../../include .)
+
+  # The executable itself
+  add_executable  ( periodic_3_triangulation_3_demo
+                    Scene.cpp moc_Scene.cpp
+                    Viewer.cpp moc_Viewer.cpp
+                    periodic_3_triangulation_3_demo.cpp
+                    MainWindow.ui moc_MainWindow.cpp
+                    ${UI_FILES} ${RESOURCE_FILES} Periodic_3_triangulation_3.qhc)
+
+  qt5_use_modules(periodic_3_triangulation_3_demo Xml Help OpenGL)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS periodic_3_triangulation_3_demo)
+
+  # Link the executable to CGAL and third-party libraries
+  target_link_libraries(periodic_3_triangulation_3_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+else ()
+
+  set(PERIODIC_TRIANGULATION_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(PERIODIC_TRIANGULATION_MISSING_DEPS "the CGAL Qt5 library, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(PERIODIC_TRIANGULATION_MISSING_DEPS "Qt5, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(PERIODIC_TRIANGULATION_MISSING_DEPS "OpenGL, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(PERIODIC_TRIANGULATION_MISSING_DEPS "QGLViewer, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
+  endif()
+
+  if (NOT TARGET Qt5::qcollectiongenerator)
+    set(PERIODIC_TRIANGULATION_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_TRIANGULATION_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled.")
+
+endif ()
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.h b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.h
new file mode 100644
index 0000000..eb40c51
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.h
@@ -0,0 +1,163 @@
+#include <QtGui>
+#include <QFile>
+#include <QTextStream>
+#include <QTimer>
+#include "Scene.h"
+
+#include <QProcess>
+#include <QTextStream>
+#include <QMessageBox>
+
+
+
+class MainWindow : public QMainWindow
+{
+
+  Q_OBJECT
+
+public:
+  MainWindow(QWidget* = 0) {
+    ui = new Ui::MainWindow;
+    ui->setupUi(this);
+    s = new Scene(ui);
+
+    process = new QProcess(this);
+
+    // QGLViewer drawing signals
+    connect(ui->viewer, SIGNAL(viewerInitialized()), s, SLOT(init()));
+    connect(ui->viewer, SIGNAL(drawNeeded()), s, SLOT(draw()));
+
+    // divers
+    connect(s, SIGNAL(message(const QString&, int)),
+	    ui->statusBar, SLOT(showMessage(const QString&, int)));
+
+    // File menu:
+    connect(ui->actionLoad_Points, SIGNAL(triggered()),
+	    s, SLOT(load_points()));
+
+    // Init menu:
+    connect(ui->actionEmpty_scene, SIGNAL(triggered()),
+	    s, SLOT(init_scene_empty()));
+    connect(ui->actionSingle_Point, SIGNAL(triggered()),
+	    s, SLOT(init_scene_single()));
+    connect(ui->actionRandom_Point_Set, SIGNAL(triggered()),
+	    s, SLOT(init_scene_random()));
+    connect(ui->actionRandom_Points_in_Plane, SIGNAL(triggered()),
+	    s, SLOT(init_scene_plane()));
+    connect(ui->actionPoint_grid, SIGNAL(triggered()),
+	    s, SLOT(init_scene_grid()));
+
+    // Actions menu:
+    connect(ui->actionFlying_ball, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_flying_ball(bool)));
+    connect(ui->actionPause, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_pause(bool)));
+
+    connect(ui->actionInsert_point, SIGNAL(triggered()),
+	    s, SLOT(insert_mp()));
+    connect(ui->actionInsert_random_point, SIGNAL(triggered()),
+	    s, SLOT(insert_random()));
+
+    connect(ui->actionGrab_image, SIGNAL(triggered()),
+	    s, SLOT(grab_image()));
+
+    // Features menu:
+    connect(ui->actionPoint_location, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_dlocate(bool)));
+    connect(ui->actionConflict_region, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_dconflict(bool)));
+
+    // Options menu:
+    connect(ui->actionWireframe, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_wireframe(bool)));
+    connect(ui->actionPlanar_triangulation, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_in_plane(bool)));
+
+    connect(ui->actionDraw_1_sheeted_covering, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_force_1cover(bool)));
+    connect(ui->actionDraw_bordering_cells_multiply, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_multiple_cells(bool)));
+
+    connect(ui->actionDraw_segments, SIGNAL(triggered()),
+	    s, SLOT(trigger_draw_type_segment()));
+    connect(ui->actionDraw_triangles, SIGNAL(triggered()),
+	    s, SLOT(trigger_draw_type_triangle()));
+    connect(ui->actionDraw_tetrahedra, SIGNAL(triggered()),
+	    s, SLOT(trigger_draw_type_tetrahedron()));
+
+    connect(ui->actionDraw_cube_square, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_ddomain(bool)));
+
+    connect(ui->actionClip_along_the_cube_square, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_cube_clipping(bool)));
+    connect(ui->action2_color_clipping, SIGNAL(toggled(bool)),
+	    s, SLOT(toggle_two_color_clipping(bool)));
+
+    // Help menu:
+    connect(ui->actionDemo_Help, SIGNAL(triggered()),
+            this, SLOT(help()));
+    connect(ui->actionAbout_CGAL, SIGNAL(triggered()),
+            this, SLOT(about_CGAL()));
+    connect(ui->actionAbout, SIGNAL(triggered()),
+            this, SLOT(about()));
+  }
+
+  ~MainWindow() {
+    delete(ui);
+    delete(s);
+    process->close();
+    delete(process);
+  }
+
+public Q_SLOTS:
+  void help() {
+    QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
+      + QDir::separator();
+#if !defined(Q_OS_MAC)
+    app += QString("assistant");
+#else
+    app += QString("Assistant.app/Contents/MacOS/Assistant");
+#endif
+
+    QStringList args;
+    QString help_path = QCoreApplication::applicationDirPath()
+      + QDir::separator()
+      + QString("./Periodic_3_triangulation_3.qhc");
+    args << QString("-collectionFile") << help_path;
+    process->start(app, args);
+    if (!process->waitForStarted()) {
+      QMessageBox::critical(this, tr("Remote Control"),
+	  tr("Could not start Qt Assistant from %1.").arg(app));
+      return;
+    }
+  }
+
+  void about() {
+    showFileBox("About the demo...",":/cgal/help/resources/about.html");
+  }
+
+  void about_CGAL() {
+    showFileBox("About CGAL...",":/cgal/help/resources/about_CGAL.html");
+  }
+
+private:
+  void showFileBox(QString title, QString fileName) {
+    QFile textFile(fileName);
+    textFile.open(QIODevice::ReadOnly);
+    QMessageBox mb(QMessageBox::NoIcon,
+	title,
+	QTextStream(&textFile).readAll(),
+	QMessageBox::Ok,
+	this);
+    mb.exec();
+  }
+
+public:
+  Ui::MainWindow* ui;
+  Scene* s;
+  QTimer* timer;
+
+private:
+  QProcess* process;
+};
+
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.ui
new file mode 100644
index 0000000..9dd9403
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/MainWindow.ui
@@ -0,0 +1,611 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>962</width>
+    <height>750</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Periodic Delaunay Triangulation</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="Viewer" name="viewer" native="true">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>962</width>
+     <height>20</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="actionLoad_Points"/>
+    <addaction name="separator"/>
+    <addaction name="actionExit"/>
+   </widget>
+   <widget class="QMenu" name="menuOptions">
+    <property name="title">
+     <string>&Options</string>
+    </property>
+    <addaction name="actionWireframe"/>
+    <addaction name="actionPlanar_triangulation"/>
+    <addaction name="separator"/>
+    <addaction name="actionDraw_1_sheeted_covering"/>
+    <addaction name="actionDraw_bordering_cells_multiply"/>
+    <addaction name="separator"/>
+    <addaction name="actionDraw_segments"/>
+    <addaction name="actionDraw_triangles"/>
+    <addaction name="actionDraw_tetrahedra"/>
+    <addaction name="separator"/>
+    <addaction name="actionDraw_cube_square"/>
+    <addaction name="separator"/>
+    <addaction name="actionClip_along_the_cube_square"/>
+    <addaction name="action2_color_clipping"/>
+    <addaction name="separator"/>
+   </widget>
+   <widget class="QMenu" name="menuInitialization">
+    <property name="title">
+     <string>&Initialization</string>
+    </property>
+    <addaction name="actionEmpty_scene"/>
+    <addaction name="actionSingle_Point"/>
+    <addaction name="actionRandom_Point_Set"/>
+    <addaction name="actionRandom_Points_in_Plane"/>
+    <addaction name="actionPoint_grid"/>
+   </widget>
+   <widget class="QMenu" name="menuFeatures">
+    <property name="title">
+     <string>&Features</string>
+    </property>
+    <addaction name="actionPoint_location"/>
+    <addaction name="actionConflict_region"/>
+   </widget>
+   <widget class="QMenu" name="menuActions">
+    <property name="title">
+     <string>&Actions</string>
+    </property>
+    <addaction name="actionFlying_ball"/>
+    <addaction name="actionPause"/>
+    <addaction name="separator"/>
+    <addaction name="actionInsert_point"/>
+    <addaction name="actionInsert_random_point"/>
+    <addaction name="separator"/>
+    <addaction name="actionGrab_image"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="actionDemo_Help"/>
+    <addaction name="separator"/>
+    <addaction name="actionAbout"/>
+    <addaction name="actionAbout_CGAL"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuInitialization"/>
+   <addaction name="menuActions"/>
+   <addaction name="menuFeatures"/>
+   <addaction name="menuOptions"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>toolBar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionLoad_Points"/>
+   <addaction name="actionGrab_image"/>
+   <addaction name="separator"/>
+   <addaction name="actionEmpty_scene"/>
+   <addaction name="actionSingle_Point"/>
+   <addaction name="actionRandom_Point_Set"/>
+   <addaction name="actionRandom_Points_in_Plane"/>
+   <addaction name="actionPoint_grid"/>
+   <addaction name="separator"/>
+   <addaction name="actionPause"/>
+   <addaction name="actionFlying_ball"/>
+   <addaction name="separator"/>
+   <addaction name="actionInsert_point"/>
+   <addaction name="actionInsert_random_point"/>
+   <addaction name="separator"/>
+   <addaction name="actionPoint_location"/>
+   <addaction name="actionConflict_region"/>
+   <addaction name="separator"/>
+   <addaction name="actionWireframe"/>
+   <addaction name="actionPlanar_triangulation"/>
+   <addaction name="separator"/>
+   <addaction name="actionDraw_1_sheeted_covering"/>
+   <addaction name="actionDraw_bordering_cells_multiply"/>
+   <addaction name="actionClip_along_the_cube_square"/>
+   <addaction name="action2_color_clipping"/>
+  </widget>
+  <action name="actionLoad_Points">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/fileOpen.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/fileOpen.png</iconset>
+   </property>
+   <property name="text">
+    <string>Load Points</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="actionExit">
+   <property name="text">
+    <string>Exit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionWireframe">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/wireframe.png</normaloff>
+     <normalon>:/cgal/Periodic_3_triangulation_3/icons/wireframeOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/wireframe.png</iconset>
+   </property>
+   <property name="text">
+    <string>Wireframe</string>
+   </property>
+   <property name="toolTip">
+    <string>Switches wireframe rendering on and off</string>
+   </property>
+   <property name="shortcut">
+    <string>X</string>
+   </property>
+  </action>
+  <action name="actionPlanar_triangulation">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/planar.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/planar.png</iconset>
+   </property>
+   <property name="text">
+    <string>Planar triangulation</string>
+   </property>
+   <property name="toolTip">
+    <string>Shows only simplices for which z=0 everywhere</string>
+   </property>
+   <property name="shortcut">
+    <string>Z</string>
+   </property>
+  </action>
+  <action name="actionDraw_1_sheeted_covering">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/cover1.png</normaloff>
+     <normalon>:/cgal/Periodic_3_triangulation_3/icons/cover27.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/cover1.png</iconset>
+   </property>
+   <property name="text">
+    <string>Draw 1-sheeted covering</string>
+   </property>
+   <property name="toolTip">
+    <string>toggles between displaying only one periodic copy of each simplex and the internal representation </string>
+   </property>
+   <property name="shortcut">
+    <string>1</string>
+   </property>
+  </action>
+  <action name="actionDraw_bordering_cells_multiply">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/multiple.png</normaloff>
+     <normalon>:/cgal/Periodic_3_triangulation_3/icons/multipleOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/multiple.png</iconset>
+   </property>
+   <property name="text">
+    <string>Draw bordering cells multiply</string>
+   </property>
+   <property name="toolTip">
+    <string>Draws each simplex for which the intersection with the fundamental cube is non-empty</string>
+   </property>
+   <property name="shortcut">
+    <string>M</string>
+   </property>
+  </action>
+  <action name="actionClip_along_the_cube_square">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/clipping.png</normaloff>
+     <normalon>:/cgal/Periodic_3_triangulation_3/icons/clippingOff.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/clipping.png</iconset>
+   </property>
+   <property name="text">
+    <string>Clip along the cube/square</string>
+   </property>
+  </action>
+  <action name="action2_color_clipping">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/twoColorClipping.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/twoColorClipping.png</iconset>
+   </property>
+   <property name="text">
+    <string>2-color clipping</string>
+   </property>
+   <property name="toolTip">
+    <string>show the clipped part of all clipped edges in a different color</string>
+   </property>
+  </action>
+  <action name="actionPoint_grid">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initGrid.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initGrid.png</iconset>
+   </property>
+   <property name="text">
+    <string>Point grid</string>
+   </property>
+   <property name="iconText">
+    <string>pg</string>
+   </property>
+   <property name="toolTip">
+    <string>A grid of 36 points that can be triangulated in 1-sheeted covering space</string>
+   </property>
+   <property name="shortcut">
+    <string>F5</string>
+   </property>
+  </action>
+  <action name="actionSingle_Point">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/init1.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/init1.png</iconset>
+   </property>
+   <property name="text">
+    <string>Single point</string>
+   </property>
+   <property name="shortcut">
+    <string>F2</string>
+   </property>
+  </action>
+  <action name="actionRandom_Points_in_Plane">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRandPlanar.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRandPlanar.png</iconset>
+   </property>
+   <property name="text">
+    <string>Random planar point set</string>
+   </property>
+   <property name="toolTip">
+    <string>Initial triangulation of 10 points chosen at random with z=0</string>
+   </property>
+   <property name="shortcut">
+    <string>F4</string>
+   </property>
+  </action>
+  <action name="actionRandom_Point_Set">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRand.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/initRand.png</iconset>
+   </property>
+   <property name="text">
+    <string>Random point set</string>
+   </property>
+   <property name="toolTip">
+    <string>Initial triangulation of 30 points chosen at random</string>
+   </property>
+   <property name="shortcut">
+    <string>F3</string>
+   </property>
+  </action>
+  <action name="actionEmpty_scene">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/init0.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/init0.png</iconset>
+   </property>
+   <property name="text">
+    <string>Empty scene</string>
+   </property>
+   <property name="shortcut">
+    <string>F1</string>
+   </property>
+  </action>
+  <action name="actionDraw_cube_square">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Draw domain (cube/square)</string>
+   </property>
+   <property name="shortcut">
+    <string>D</string>
+   </property>
+  </action>
+  <action name="actionPoint_location">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/locate.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/locate.png</iconset>
+   </property>
+   <property name="text">
+    <string>Point location</string>
+   </property>
+   <property name="toolTip">
+    <string>Marks the tetrahedron that currently contains the flying ball</string>
+   </property>
+   <property name="shortcut">
+    <string>L</string>
+   </property>
+  </action>
+  <action name="actionConflict_region">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/conflict.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/conflict.png</iconset>
+   </property>
+   <property name="text">
+    <string>Conflict region</string>
+   </property>
+   <property name="toolTip">
+    <string>Shows all tetrahedra in whose circumcircle the flying ball is contained</string>
+   </property>
+   <property name="shortcut">
+    <string>C</string>
+   </property>
+  </action>
+  <action name="actionHole">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Hole*</string>
+   </property>
+   <property name="shortcut">
+    <string>H</string>
+   </property>
+  </action>
+  <action name="actionStar">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Star*</string>
+   </property>
+   <property name="shortcut">
+    <string>S</string>
+   </property>
+  </action>
+  <action name="actionFlying_ball">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/ball.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/ball.png</iconset>
+   </property>
+   <property name="text">
+    <string>Flying ball</string>
+   </property>
+   <property name="toolTip">
+    <string>Shows a ball flying through the cube, showing the periodicity</string>
+   </property>
+   <property name="shortcut">
+    <string>B</string>
+   </property>
+  </action>
+  <action name="actionPause">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/pause.png</normaloff>
+     <normalon>:/cgal/Periodic_3_triangulation_3/icons/play.png</normalon>:/cgal/Periodic_3_triangulation_3/icons/pause.png</iconset>
+   </property>
+   <property name="text">
+    <string>Pause</string>
+   </property>
+   <property name="toolTip">
+    <string>Pauses the flying ball</string>
+   </property>
+   <property name="shortcut">
+    <string>P</string>
+   </property>
+  </action>
+  <action name="actionInsert_point">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointBall.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointBall.png</iconset>
+   </property>
+   <property name="text">
+    <string>Insert point</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert point at the position of the flying ball (whether it is shown or not)</string>
+   </property>
+   <property name="shortcut">
+    <string>I</string>
+   </property>
+  </action>
+  <action name="actionInsert_random_point">
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointRandom.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/inputPointRandom.png</iconset>
+   </property>
+   <property name="text">
+    <string>Insert random point</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert one point at random position (within the cube)</string>
+   </property>
+   <property name="shortcut">
+    <string>R</string>
+   </property>
+  </action>
+  <action name="actionDraw_segments">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Draw segments</string>
+   </property>
+   <property name="shortcut">
+    <string>2</string>
+   </property>
+  </action>
+  <action name="actionDraw_triangles">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Draw triangles</string>
+   </property>
+   <property name="shortcut">
+    <string>3</string>
+   </property>
+  </action>
+  <action name="actionDraw_tetrahedra">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Draw tetrahedra</string>
+   </property>
+   <property name="shortcut">
+    <string>4</string>
+   </property>
+  </action>
+  <action name="actionGrab_image">
+   <property name="checkable">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Periodic_3_triangulation_3.qrc">
+     <normaloff>:/cgal/Periodic_3_triangulation_3/icons/camera.png</normaloff>:/cgal/Periodic_3_triangulation_3/icons/camera.png</iconset>
+   </property>
+   <property name="text">
+    <string>Grab image</string>
+   </property>
+   <property name="shortcut">
+    <string>G</string>
+   </property>
+  </action>
+  <action name="actionExport_pov">
+   <property name="text">
+    <string>Export pov</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+E</string>
+   </property>
+  </action>
+  <action name="actionDemo_Help">
+   <property name="text">
+    <string>Demo Manual</string>
+   </property>
+   <property name="shortcut">
+    <string>H</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+   <property name="shortcut">
+    <string>A</string>
+   </property>
+  </action>
+  <action name="actionAbout_CGAL">
+   <property name="text">
+    <string>About CGAL</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+  <customwidget>
+   <class>Viewer</class>
+   <extends>QWidget</extends>
+   <header>Viewer.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="Periodic_3_triangulation_3.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>actionClip_along_the_cube_square</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>action2_color_clipping</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhcp b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhcp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhcp
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhcp
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhp b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhp
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qhp
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qrc b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qrc
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Periodic_3_triangulation_3.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.cpp b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.cpp
new file mode 100644
index 0000000..66d7dc4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.cpp
@@ -0,0 +1,2267 @@
+//The function project() is a modified version of the function gluProject(),whcich license is :
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+#include "Scene.h"
+
+
+void Scene::compile_shaders()
+{
+
+    if(! buffers[0].create() || !buffers[1].create() || !buffers[2].create() || !buffers[3].create()
+            || !buffers[4].create() || !buffers[5].create() || !buffers[6].create()
+            || !buffers[7].create() || !buffers[8].create() || !buffers[9].create()
+            || !buffers[10].create() || !buffers[11].create() || !buffers[12].create()
+            || !buffers[13].create() || !buffers[14].create() || !buffers[15].create()
+            || !buffers[16].create() || !buffers[17].create() || !buffers[18].create()
+            || !buffers[19].create() || !buffers[20].create()
+            || !buffers[21].create() || !buffers[22].create() || !buffers[23].create())
+    {
+        std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() || !vao[2].create() || !vao[3].create() ||
+            !vao[4].create() || !vao[5].create() ||!vao[6].create() || !vao[7].create()
+            || !vao[8].create() || !vao[9].create() || !vao[10].create() || !vao[11].create())
+    {
+        std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+    //prepare the sphere model that will be instanced rendered in draw.
+    draw_sphere(0.02f,15);
+    //prepare the tube model that will be instanced rendered when drawing the cube.
+    draw_cylinder(0.01f,25, points_cube, normals_cylinder);
+
+    //prepare the tube model that will be instanced rendered when drawing the triangulation.
+    draw_cylinder(0.005f,25, points_cylinder, normals_cylinder);
+
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform highp vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+
+    // sphere program
+    //Vertex source code
+    const char vertex_source_spheres[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 center;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * (vertex+vec4(center.xyz, 0.0)); \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source_spheres[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = abs(dot(N,L)) * light_diff; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+        "gl_FragColor = light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader_spheres = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader_spheres->compileSourceCode(vertex_source_spheres))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+
+    QOpenGLShader *fragment_shader_spheres= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader_spheres->compileSourceCode(fragment_source_spheres))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+
+    if(!rendering_program_spheres.addShader(vertex_shader_spheres))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_spheres.addShader(fragment_shader_spheres))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_spheres.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program_spheres.bind();
+
+    // cylinder program
+    //Vertex source code
+    const char vertex_source_cylinders[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 transfo1;\n"
+        "attribute highp vec4 transfo2;\n"
+        "attribute highp vec4 transfo3;\n"
+        "attribute highp vec4 transfo4;\n"
+        "mat4 transfo = mat4(transfo1, transfo2, transfo3, transfo4); \n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   vec4 TN = transfo*vec4(normal,1.0); \n"
+        "   fN = mat3(mv_matrix)* TN.xyz; \n"
+        "   gl_Position =  mvp_matrix * transfo * vertex; \n"
+        "}"
+    };
+
+
+
+    QOpenGLShader *vertex_shader_cylinders = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader_cylinders->compileSourceCode(vertex_source_cylinders))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.addShader(vertex_shader_cylinders))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.addShader(fragment_shader_spheres))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program_cylinders.bind();
+
+}
+
+void Scene::compute_elements()
+{
+    pos_points.resize(0);
+    transfo1_cylinder.resize(0);
+    transfo2_cylinder.resize(0);
+    transfo3_cylinder.resize(0);
+    transfo4_cylinder.resize(0);
+    transfo1_cube.resize(0);
+    transfo2_cube.resize(0);
+    transfo3_cube.resize(0);
+    transfo4_cube.resize(0);
+    transfo1_square.resize(0);
+    transfo2_square.resize(0);
+    transfo3_square.resize(0);
+    transfo4_square.resize(0);
+
+    // Draw vertices
+    {
+        for (Point_iterator pit = p3dt.periodic_points_begin(it_type) ;
+             pit != p3dt.periodic_points_end(it_type) ; pit++)
+        {
+            if (pit->first.z()!=0 && in_plane)
+            {
+                continue;
+            }
+            pos_points.push_back(pit->first.x());pos_points.push_back(pit->first.y());pos_points.push_back(pit->first.z());
+        }
+
+    }
+
+    // Draw segments
+    {
+        Segment_set segments_to_draw;
+        primitives_from_geom_it(segments_to_draw);
+        if (cube_clipping && !two_color_clipping) segment_clipping(segments_to_draw);
+        pos_tube.resize(0);
+
+        for (Segment_set::iterator it = segments_to_draw.begin() ;
+             it != segments_to_draw.end(); it++)
+        {
+            Point p1 = it->source(), p2 = it->target();
+            if (in_plane && (p1.z()!=0. || p2.z()!=0.)) continue;
+            pos_tube.push_back(p1.x()); pos_tube.push_back(p1.y()); pos_tube.push_back(p1.z());
+            pos_tube.push_back(p2.x()); pos_tube.push_back(p2.y()); pos_tube.push_back(p2.z());
+
+            Point p = p1;
+            Vector v = p2-p1;
+
+            FT len = (FT)std::sqrt(CGAL_NTS to_double(v*v));
+
+            // normalize
+            v = v / len;
+            double angle = 0.0;
+            if(std::sqrt(CGAL_NTS to_double(v.x()*v.x()+v.y()*v.y())) > 1)
+                angle = 90.0f;
+            else
+                angle =acos(v.y()/std::sqrt(v.x()*v.x()+v.y()*v.y()+v.z()*v.z()))*180.0/M_PI;//asin(std::sqrt(CGAL_NTS to_double(v.x()*v.x()+v.y()*v.y())))/M_PI*180.0;
+
+            Vector axis;
+            axis = Vector(v.z(), 0, -v.x());
+
+
+            QMatrix4x4 matrix;
+            matrix.setToIdentity();
+
+            matrix.translate(CGAL_NTS to_double(p.x()),
+                             CGAL_NTS to_double(p.y()),
+                             CGAL_NTS to_double(p.z()));
+
+            matrix.rotate(angle,CGAL_NTS to_double(axis.x()),
+                          CGAL_NTS to_double(axis.y()),
+                          CGAL_NTS to_double(axis.z()));
+            matrix.scale(1,CGAL_NTS to_double(len),1);
+
+            for(int i=0; i<4; i++)
+                transfo1_cylinder.push_back((float)matrix.data()[i]);
+            for(int i=4; i<8; i++)
+                transfo2_cylinder.push_back((float)matrix.data()[i]);
+            for(int i=8; i<12; i++)
+                transfo3_cylinder.push_back((float)matrix.data()[i]);
+            for(int i=12; i<16; i++)
+                transfo4_cylinder.push_back((float)matrix.data()[i]);
+
+        }
+    }
+    // Draw cube
+    {
+
+        QMatrix4x4 matrix;
+        matrix.setToIdentity();
+
+        for (float x=0.0; x<2.0; x+=1.0) {
+            for (float y=0.0; y<2.0; y+=1.0) {
+                matrix.translate(x,0,y);
+                //   matrix = matrix.transposed();
+                for(int i=0; i<4; i++)
+                    transfo1_cube.push_back((float)matrix.data()[i]);
+                for(int i=4; i<8; i++)
+                    transfo2_cube.push_back((float)matrix.data()[i]);
+                for(int i=8; i<12; i++)
+                    transfo3_cube.push_back((float)matrix.data()[i]);
+                for(int i=12; i<16; i++)
+                    transfo4_cube.push_back((float)matrix.data()[i]);
+                matrix.translate(-x,0,-y);
+            }
+        }
+
+        for (float x=0.0; x<2.0; x+=1.0) {
+            for (float y=0.0; y<2.0; y+=1.0) {
+                matrix.translate(x,y,0);
+                matrix.rotate(90,1.0,0.0,0.0);
+                for(int i=0; i<4; i++)
+                    transfo1_cube.push_back((float)matrix.data()[i]);
+                for(int i=4; i<8; i++)
+                    transfo2_cube.push_back((float)matrix.data()[i]);
+                for(int i=8; i<12; i++)
+                    transfo3_cube.push_back((float)matrix.data()[i]);
+                for(int i=12; i<16; i++)
+                    transfo4_cube.push_back((float)matrix.data()[i]);
+                matrix.rotate(90,-1.0,0.0,0.0);
+                matrix.translate(-x,-y,0);
+            }
+        }
+
+        for (float x=0.0; x<2.0; x+=1.0) {
+            for (float y=0.0; y<2.0; y+=1.0) {
+                matrix.translate(0.0,x,y);
+                matrix.rotate(90,0.0,0.0,-1.0);
+                for(int i=0; i<4; i++)
+                    transfo1_cube.push_back((float)matrix.data()[i]);
+                for(int i=4; i<8; i++)
+                    transfo2_cube.push_back((float)matrix.data()[i]);
+                for(int i=8; i<12; i++)
+                    transfo3_cube.push_back((float)matrix.data()[i]);
+                for(int i=12; i<16; i++)
+                    transfo4_cube.push_back((float)matrix.data()[i]);
+                matrix.rotate(90,0.0,0.0,1.0);
+                matrix.translate(0.0,-x,-y);
+            }
+        }
+
+
+        pos_cube.resize(24*3);
+
+        pos_cube[0]=0.0;  pos_cube[3]=1.0;  pos_cube[6]=0.0; pos_cube[9]= 1.0;
+        pos_cube[1]=0.0;  pos_cube[4]=0.0;  pos_cube[7]=1.0; pos_cube[10]=1.0;
+        pos_cube[2]=0.0;  pos_cube[5]=0.0;  pos_cube[8]=0.0; pos_cube[11]=0.0;
+
+        pos_cube[12]=0.0;  pos_cube[15]=1.0;  pos_cube[18]=0.0; pos_cube[21]=1.0;
+        pos_cube[13]=0.0;  pos_cube[16]=0.0;  pos_cube[19]=1.0; pos_cube[22]=1.0;
+        pos_cube[14]=1.0;  pos_cube[17]=1.0;  pos_cube[20]=1.0; pos_cube[23]=1.0;
+
+        pos_cube[24]=0.0;  pos_cube[27]=0.0;  pos_cube[30]=1.0; pos_cube[33]=1.0;
+        pos_cube[25]=0.0;  pos_cube[28]=1.0;  pos_cube[31]=0.0; pos_cube[34]=1.0;
+        pos_cube[26]=0.0;  pos_cube[29]=0.0;  pos_cube[32]=0.0; pos_cube[35]=0.0;
+
+        pos_cube[36]=0.0;  pos_cube[39]=0.0;  pos_cube[42]=1.0; pos_cube[45]=1.0;
+        pos_cube[37]=0.0;  pos_cube[40]=1.0;  pos_cube[43]=0.0; pos_cube[46]=1.0;
+        pos_cube[38]=1.0;  pos_cube[41]=1.0;  pos_cube[44]=1.0; pos_cube[47]=1.0;
+
+        pos_cube[48]=0.0;  pos_cube[51]=0.0;  pos_cube[54]=1.0; pos_cube[57]=1.0;
+        pos_cube[49]=0.0;  pos_cube[52]=0.0;  pos_cube[55]=0.0; pos_cube[58]=0.0;
+        pos_cube[50]=0.0;  pos_cube[53]=1.0;  pos_cube[56]=0.0; pos_cube[59]=1.0;
+
+        pos_cube[60]=0.0;  pos_cube[63]=0.0;  pos_cube[66]=1.0; pos_cube[69]=1.0;
+        pos_cube[61]=1.0;  pos_cube[64]=1.0;  pos_cube[67]=1.0; pos_cube[70]=1.0;
+        pos_cube[62]=0.0;  pos_cube[65]=1.0;  pos_cube[68]=0.0; pos_cube[71]=1.0;
+    }
+    //Draw square
+    {
+        pos_square.resize(24);
+        pos_square[0]=0.0; pos_square[3]=1.0; pos_square[6]=0.0; pos_square[9]=1.0;
+        pos_square[1]=0.0; pos_square[4]=0.0; pos_square[7]=1.0; pos_square[10]=1.0;
+        pos_square[2]=0.0; pos_square[5]=0.0; pos_square[8]=0.0; pos_square[11]=0.0;
+
+        pos_square[12]=0.0; pos_square[15]=0.0; pos_square[18]=1.0; pos_square[21]=1.0;
+        pos_square[13]=0.0; pos_square[16]=1.0; pos_square[19]=0.0; pos_square[22]=1.0;
+        pos_square[14]=0.0; pos_square[17]=0.0; pos_square[20]=0.0; pos_square[23]=0.0;
+
+        QMatrix4x4 matrix;
+        matrix.setToIdentity();
+
+        for (float x=0.0; x<2.0; x+=1.0) {
+
+            matrix.translate(x,0,0);
+            for(int i=0; i<4; i++)
+                transfo1_square.push_back((float)matrix.data()[i]);
+            for(int i=4; i<8; i++)
+                transfo2_square.push_back((float)matrix.data()[i]);
+            for(int i=8; i<12; i++)
+                transfo3_square.push_back((float)matrix.data()[i]);
+            for(int i=12; i<16; i++)
+                transfo4_square.push_back((float)matrix.data()[i]);
+            matrix.translate(-x,0,0);
+        }
+
+        for (float y=0.0; y<2.0; y+=1.0) {
+
+            matrix.translate(0,y,0);
+            matrix.rotate(90,0,0,-1);
+            for(int i=0; i<4; i++)
+                transfo1_square.push_back((float)matrix.data()[i]);
+            for(int i=4; i<8; i++)
+                transfo2_square.push_back((float)matrix.data()[i]);
+            for(int i=8; i<12; i++)
+                transfo3_square.push_back((float)matrix.data()[i]);
+            for(int i=12; i<16; i++)
+                transfo4_square.push_back((float)matrix.data()[i]);
+            matrix.rotate(90,0,0,1);
+            matrix.translate(0,-y,0);
+        }
+
+
+
+    }
+}
+
+void Scene::initialize_buffers()
+{
+    rendering_program.bind();
+
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(pos_points.data(), static_cast<int>(pos_points.size()*sizeof(float)));
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[0].release();
+
+    vao[0].release();
+
+    vao[1].bind();
+    buffers[1].bind();
+    buffers[1].allocate(pos_tube.data(), static_cast<int>(pos_tube.size()*sizeof(float)));
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[1].release();
+    vao[1].release();
+
+    vao[11].bind();
+    buffers[23].bind();
+    buffers[23].allocate(pos_square.data(), static_cast<int>(pos_square.size()*sizeof(float)));
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[23].release();
+    vao[11].release();
+
+    vao[2].bind();
+    buffers[2].bind();
+    buffers[2].allocate(pos_cube.data(), static_cast<int>(pos_cube.size()*sizeof(float)));
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[2].release();
+    vao[2].release();
+
+    rendering_program.release();
+
+    rendering_program_spheres.bind();
+
+    vao[3].bind();
+    buffers[3].bind();
+    buffers[3].allocate(points_spheres.data(), static_cast<int>(points_spheres.size()*sizeof(float)));
+    poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+    rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+    rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+    buffers[3].release();
+
+    buffers[4].bind();
+    buffers[4].allocate(normals_spheres.data(), static_cast<int>(normals_spheres.size()*sizeof(float)));
+    rendering_program_spheres.bind();
+    normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+    rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+    rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+    buffers[4].release();
+
+
+    buffers[0].bind();
+    rendering_program_spheres.bind();
+    centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+    rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+    rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+    buffers[0].release();
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(centerLocation[0],1);
+        glVertexAttribDivisor(normalsLocation[0],0);
+    }
+    vao[3].release();
+    rendering_program_spheres.release();
+
+    rendering_program_cylinders.bind();
+    vao[8].bind();
+    buffers[8].bind();
+    buffers[8].allocate(points_cube->data(), static_cast<int>(points_cube->size()*sizeof(float)));
+    poly_vertexLocation[2] = rendering_program_cylinders.attributeLocation("vertex");
+    rendering_program_cylinders.enableAttributeArray(poly_vertexLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(poly_vertexLocation[2],GL_FLOAT,0,3);
+    buffers[8].release();
+
+    buffers[9].bind();
+    buffers[9].allocate(normals_cylinder->data(), static_cast<int>(normals_cylinder->size()*sizeof(float)));
+    normalsLocation[1] = rendering_program_cylinders.attributeLocation("normal");
+    rendering_program_cylinders.enableAttributeArray(normalsLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+    buffers[9].release();
+
+    buffers[10].bind();
+    buffers[10].allocate(transfo1_cube.data(), static_cast<int>(transfo1_cube.size()*sizeof(float)));
+    centerLocation[1] = rendering_program_cylinders.attributeLocation("transfo1");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[1],GL_FLOAT,0,4);
+    buffers[10].release();
+
+    buffers[11].bind();
+    buffers[11].allocate(transfo2_cube.data(), static_cast<int>(transfo2_cube.size()*sizeof(float)));
+    centerLocation[2] = rendering_program_cylinders.attributeLocation("transfo2");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[2],GL_FLOAT,0,4);
+    buffers[11].release();
+
+
+    buffers[12].bind();
+    buffers[12].allocate(transfo3_cube.data(), static_cast<int>(transfo3_cube.size()*sizeof(float)));
+    centerLocation[3] = rendering_program_cylinders.attributeLocation("transfo3");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[3]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[3],GL_FLOAT,0,4);
+    buffers[12].release();
+
+    buffers[13].bind();
+    buffers[13].allocate(transfo4_cube.data(), static_cast<int>(transfo4_cube.size()*sizeof(float)));
+    centerLocation[4] = rendering_program_cylinders.attributeLocation("transfo4");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[4]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[4],GL_FLOAT,0,4);
+    buffers[13].release();
+
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(centerLocation[1],1);
+        glVertexAttribDivisor(centerLocation[2],1);
+        glVertexAttribDivisor(centerLocation[3],1);
+        glVertexAttribDivisor(centerLocation[4],1);
+
+        glVertexAttribDivisor(normalsLocation[1],0);
+    }
+
+    vao[8].release();
+    vao[9].bind();
+    buffers[14].bind();
+    buffers[14].allocate(points_cylinder->data(), static_cast<int>(points_cylinder->size()*sizeof(float)));
+    poly_vertexLocation[2] = rendering_program_cylinders.attributeLocation("vertex");
+    rendering_program_cylinders.enableAttributeArray(poly_vertexLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(poly_vertexLocation[2],GL_FLOAT,0,3);
+    buffers[14].release();
+
+    buffers[9].bind();
+    normalsLocation[1] = rendering_program_cylinders.attributeLocation("normal");
+    rendering_program_cylinders.enableAttributeArray(normalsLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+    buffers[9].release();
+
+    buffers[15].bind();
+    buffers[15].allocate(transfo1_cylinder.data(), static_cast<int>(transfo1_cylinder.size()*sizeof(float)));
+    centerLocation[1] = rendering_program_cylinders.attributeLocation("transfo1");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[1],GL_FLOAT,0,4);
+    buffers[15].release();
+
+    buffers[16].bind();
+    buffers[16].allocate(transfo2_cylinder.data(), static_cast<int>(transfo2_cylinder.size()*sizeof(float)));
+    centerLocation[2] = rendering_program_cylinders.attributeLocation("transfo2");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[2],GL_FLOAT,0,4);
+    buffers[16].release();
+
+
+    buffers[17].bind();
+    buffers[17].allocate(transfo3_cylinder.data(), static_cast<int>(transfo3_cylinder.size()*sizeof(float)));
+    centerLocation[3] = rendering_program_cylinders.attributeLocation("transfo3");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[3]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[3],GL_FLOAT,0,4);
+    buffers[17].release();
+
+    buffers[18].bind();
+    buffers[18].allocate(transfo4_cylinder.data(), static_cast<int>(transfo4_cylinder.size()*sizeof(float)));
+    centerLocation[4] = rendering_program_cylinders.attributeLocation("transfo4");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[4]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[4],GL_FLOAT,0,4);
+    buffers[18].release();
+
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(centerLocation[1],1);
+        glVertexAttribDivisor(centerLocation[2],1);
+        glVertexAttribDivisor(centerLocation[3],1);
+        glVertexAttribDivisor(centerLocation[4],1);
+
+        glVertexAttribDivisor(normalsLocation[1],0);
+    }
+
+    vao[9].release();
+
+    vao[10].bind();
+    buffers[8].bind();
+    poly_vertexLocation[2] = rendering_program_cylinders.attributeLocation("vertex");
+    rendering_program_cylinders.enableAttributeArray(poly_vertexLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(poly_vertexLocation[2],GL_FLOAT,0,3);
+    buffers[8].release();
+
+    buffers[9].bind();
+    normalsLocation[1] = rendering_program_cylinders.attributeLocation("normal");
+    rendering_program_cylinders.enableAttributeArray(normalsLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+    buffers[9].release();
+
+    buffers[19].bind();
+    buffers[19].allocate(transfo1_square.data(), static_cast<int>(transfo1_square.size()*sizeof(float)));
+    centerLocation[1] = rendering_program_cylinders.attributeLocation("transfo1");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[1]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[1],GL_FLOAT,0,4);
+    buffers[19].release();
+
+    buffers[20].bind();
+    buffers[20].allocate(transfo2_square.data(), static_cast<int>(transfo2_square.size()*sizeof(float)));
+    centerLocation[2] = rendering_program_cylinders.attributeLocation("transfo2");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[2]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[2],GL_FLOAT,0,4);
+    buffers[20].release();
+
+
+    buffers[21].bind();
+    buffers[21].allocate(transfo3_square.data(), static_cast<int>(transfo3_square.size()*sizeof(float)));
+    centerLocation[3] = rendering_program_cylinders.attributeLocation("transfo3");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[3]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[3],GL_FLOAT,0,4);
+    buffers[21].release();
+
+    buffers[22].bind();
+    buffers[22].allocate(transfo4_square.data(), static_cast<int>(transfo4_square.size()*sizeof(float)));
+    centerLocation[4] = rendering_program_cylinders.attributeLocation("transfo4");
+    rendering_program_cylinders.enableAttributeArray(centerLocation[4]);
+    rendering_program_cylinders.setAttributeBuffer(centerLocation[4],GL_FLOAT,0,4);
+    buffers[22].release();
+
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(centerLocation[1],1);
+        glVertexAttribDivisor(centerLocation[2],1);
+        glVertexAttribDivisor(centerLocation[3],1);
+        glVertexAttribDivisor(centerLocation[4],1);
+
+        glVertexAttribDivisor(normalsLocation[1],0);
+    }
+    vao[10].release();
+
+    rendering_program_cylinders.release();
+    are_buffers_initialized = true;
+
+}
+
+void Scene::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+
+    rendering_program.release();
+
+
+    rendering_program_spheres.bind();
+    mvpLocation[1] = rendering_program_spheres.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program_spheres.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program_spheres.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program_spheres.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program_spheres.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program_spheres.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program_spheres.uniformLocation("spec_power");
+
+    rendering_program_spheres.setUniformValue(lightLocation[0], position);
+    rendering_program_spheres.setUniformValue(mvpLocation[1], mvpMatrix);
+    rendering_program_spheres.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program_spheres.setUniformValue(lightLocation[1], diffuse);
+    rendering_program_spheres.setUniformValue(lightLocation[2], specular);
+    rendering_program_spheres.setUniformValue(lightLocation[3], ambient);
+    rendering_program_spheres.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program_spheres.release();
+
+    rendering_program_cylinders.bind();
+    mvpLocation[2] = rendering_program_cylinders.uniformLocation("mvp_matrix");
+    mvLocation[1] = rendering_program_cylinders.uniformLocation("mv_matrix");
+    lightLocation[5] = rendering_program_cylinders.uniformLocation("light_pos");
+    lightLocation[6] = rendering_program_cylinders.uniformLocation("light_diff");
+    lightLocation[7] = rendering_program_cylinders.uniformLocation("light_spec");
+    lightLocation[8] = rendering_program_cylinders.uniformLocation("light_amb");
+    lightLocation[9] = rendering_program_cylinders.uniformLocation("spec_power");
+
+    rendering_program_cylinders.setUniformValue(lightLocation[5], position);
+    rendering_program_cylinders.setUniformValue(lightLocation[6], diffuse);
+    rendering_program_cylinders.setUniformValue(lightLocation[7], specular);
+    rendering_program_cylinders.setUniformValue(lightLocation[8], ambient);
+    rendering_program_cylinders.setUniformValue(lightLocation[9], shininess);
+    rendering_program_cylinders.setUniformValue(mvpLocation[2], mvpMatrix);
+    rendering_program_cylinders.setUniformValue(mvLocation[1], mvMatrix);
+
+
+    rendering_program_cylinders.release();
+}
+
+void Scene::init() {
+    // undo from QGLViewer internal initializeGL function
+    // glDisable(GL_COLOR_MATERIAL);
+    initializeOpenGLFunctions();
+    glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDARBPROC)ui->viewer->context()->getProcAddress("glDrawArraysInstancedARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glDrawArraysInstancedARB : extension not found. Wireframe mode will be forced.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+
+    glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORARBPROC)ui->viewer->context()->getProcAddress("glVertexAttribDivisorARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glVertexAttribDivisorARB : extension not found. Wireframe mode will be forced.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+
+    wireframe = !extension_is_found;
+    // camera
+    // only 2.7 gets an 'f' as VC++ warns if we don't
+    ui->viewer->camera()->setPosition(Vec(0.5,0.5,2.7f));
+    ui->viewer->camera()->lookAt(Vec(0.5,0.5,0.5));
+
+    // scene inits
+    ui->viewer->setSceneCenter(qglviewer::Vec(0.5,0.5,0.5));
+    ui->viewer->setSceneRadius(2.0);
+    ui->viewer->setBackgroundColor(Qt::white);
+    ui->viewer->setForegroundColor(Qt::red);
+
+    // OpenGL inits
+    glPointSize(10.0);
+    glLineWidth(1.0);
+    glEnable(GL_POINT_SMOOTH);
+    glEnable(GL_LINE_SMOOTH);
+
+    // Scene OpenGL state
+    compile_shaders();
+    init_scene(EMPTY);
+    gl_init = true;
+
+}
+
+// Draws the triangulation
+void Scene::draw() {
+    if(!gl_init)
+        init();
+    glEnable(GL_DEPTH_TEST);
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    gl_draw_location();
+
+    gl_draw_conflict();
+
+    //// Draw the triangulation itself that is stored in the list.
+
+    if(wireframe)
+    {
+        //draw the points
+        vao[0].bind();
+        change_material(materials[VERTEX_COLOR]);
+        attrib_buffers(ui->viewer);
+        rendering_program.bind();
+
+        glPointSize(5);
+        ::glEnable(GL_POINT_SMOOTH);
+
+        rendering_program.setUniformValue(colorLocation[0], color);
+        glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+        rendering_program.release();
+        vao[0].release();
+        //draw the moving ball
+        if (flying_ball) {
+            vao[4].bind();
+            change_material(materials[FLYING_BALL_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program.bind();
+
+            glPointSize(5);
+            ::glEnable(GL_POINT_SMOOTH);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, 1);
+            rendering_program.release();
+            vao[4].release();
+        }
+        //draw the lines
+        vao[1].bind();
+        change_material(materials[EDGE_COLOR]);
+        attrib_buffers(ui->viewer);
+        rendering_program.bind();
+
+        rendering_program.setUniformValue(colorLocation[0], color);
+        glDrawArrays(GL_LINES, 0,  static_cast<GLsizei>(pos_tube.size()/3));
+        rendering_program.release();
+        vao[1].release();
+
+        //draw the cube
+        if(!in_plane)
+        {
+            vao[2].bind();
+            change_material(materials[DOMAIN_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program.bind();
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_LINES, 0,  static_cast<GLsizei>(pos_cube.size()/3));
+            rendering_program.release();
+            vao[2].release();
+        }
+        else
+        {
+            vao[11].bind();
+            change_material(materials[DOMAIN_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program.bind();
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_LINES, 0,  static_cast<GLsizei>(pos_square.size()/3));
+            rendering_program.release();
+            vao[11].release();
+        }
+    }
+    else
+    {
+        if(!in_plane)
+        {
+            //cube
+            vao[8].bind();
+            change_material(materials[DOMAIN_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program_cylinders.bind();
+            glDrawArraysInstanced(GL_TRIANGLES, 0,  static_cast<GLsizei>(points_cube->size()/3),  static_cast<GLsizei>(transfo1_cube.size()/4));
+            rendering_program_cylinders.release();
+            vao[8].release();
+        }
+        else
+        {
+            //square
+            vao[10].bind();
+            change_material(materials[DOMAIN_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program_cylinders.bind();
+            glDrawArraysInstanced(GL_TRIANGLES, 0,  static_cast<GLsizei>(points_cube->size()/3),  static_cast<GLsizei>(transfo1_square.size()/4));
+            rendering_program_cylinders.release();
+            vao[10].release();
+        }
+        //draw the spheres
+        vao[3].bind();
+        change_material(materials[VERTEX_COLOR]);
+        attrib_buffers(ui->viewer);
+        rendering_program_spheres.bind();
+        glDrawArraysInstanced(GL_TRIANGLES, 0,  static_cast<GLsizei>(points_spheres.size()/3),  static_cast<GLsizei>(pos_points.size()/3));
+        rendering_program_spheres.release();
+        vao[3].release();
+
+        //draw the moving ball
+        if (flying_ball) {
+            vao[7].bind();
+            change_material(materials[FLYING_BALL_COLOR]);
+            attrib_buffers(ui->viewer);
+            rendering_program_spheres.bind();
+            glDrawArraysInstanced(GL_TRIANGLES, 0,  static_cast<GLsizei>(points_spheres.size()/3),1);
+            rendering_program_spheres.release();
+            vao[7].release();
+        }
+        //draw the triangulation
+        vao[9].bind();
+        change_material(materials[EDGE_COLOR]);
+        attrib_buffers(ui->viewer);
+        rendering_program_cylinders.bind();
+        glDrawArraysInstanced(GL_TRIANGLES, 0,  static_cast<GLsizei>(points_cylinder->size()/3),  static_cast<GLsizei>(transfo1_cylinder.size()/4));
+        rendering_program_cylinders.release();
+        vao[9].release();
+    }
+    //draw the triangles
+    glEnable(GL_BLEND);
+    glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+    if(dlocate)
+    {
+        vao[5].bind();
+        rendering_program.bind();
+        color.setRgbF(0.f, 0.f , 0.5f, 0.5f);
+        rendering_program.setUniformValue(colorLocation[0], color);
+        glDrawArrays(GL_TRIANGLES, 0,  static_cast<GLsizei>(pos_location.size()/3));
+        rendering_program.release();
+        vao[5].release();
+    }
+    if(dconflict)
+    {
+        vao[6].bind();
+        rendering_program.bind();
+        color.setRgbF(0.69f, 0.18f , 0.26f, 0.6f);
+        rendering_program.setUniformValue(colorLocation[0], color);
+        glDrawArrays(GL_TRIANGLES, 0,  static_cast<GLsizei>(pos_conflict.size()/3));
+        rendering_program.release();
+        vao[6].release();
+    }
+    glDisable(GL_BLEND);
+
+
+}
+
+void Scene::load_points(const QString& fileName) {
+    p3dt.clear();
+    std::vector<Point> points;
+    std::ifstream ifs(fileName.toLatin1().data() );
+    std::copy(std::istream_iterator<Point>(ifs),
+              std::istream_iterator<Point>(),
+              std::back_inserter(points));
+    std::random_shuffle(points.begin(), points.end());
+    p3dt.insert(points.begin(), points.end());
+
+    QString snv;
+    int nv = static_cast<int>(p3dt.number_of_vertices());
+    snv.setNum(nv);
+    changed();
+    Q_EMIT message(QString("|V| = ") + snv, 0);
+
+
+    draw();
+}
+
+// update the position of the moving point
+void Scene::update_position()
+{
+    double x = moving_point.x() +0.01023;
+    double y = moving_point.y() +0.003123;
+    double z = (in_plane ? 0.0 : moving_point.z() +0.02567);
+    if(x>1.)x-=1.;
+    if(y>1.)y-=1.;
+    if(z>1.)z-=1.;
+    moving_point = Point(x,y,z);
+    float moving_ball[] = {float(moving_point.x()),
+                           float(moving_point.y()),
+                           float(moving_point.z())};
+    vao[4].bind();
+    buffers[5].bind();
+    buffers[5].allocate(moving_ball, 3*sizeof(float));
+    rendering_program.bind();
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[5].release();
+
+    rendering_program.release();
+    vao[4].release();
+
+    vao[7].bind();
+    buffers[3].bind();
+    poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+    rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+    rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+    buffers[3].release();
+
+    buffers[4].bind();
+    rendering_program_spheres.bind();
+    normalsLocation[1] = rendering_program_spheres.attributeLocation("normal");
+    rendering_program_spheres.enableAttributeArray(normalsLocation[1]);
+    rendering_program_spheres.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+    buffers[4].release();
+
+
+    buffers[5].bind();
+    rendering_program_spheres.bind();
+    centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+    rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+    rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+    buffers[5].release();
+    if(extension_is_found)
+    {
+        glVertexAttribDivisor(centerLocation[0],1);
+        glVertexAttribDivisor(normalsLocation[1],0);
+    }
+    vao[7].release();
+
+    ui->viewer->update();
+}
+
+// some initialization templates
+void Scene::init_scene(Init ID) {
+    bool temp_flags[] = {dlocate, dconflict};
+    dlocate = false;
+    dconflict = false;
+    p3dt.clear();
+    RandPts rp(0.5);
+    Point pt2;
+    switch (ID) {
+    case GRID:
+        p3dt.insert_dummy_points();
+        break;
+    case SINGLE:
+        p3dt.insert(Point(0.3,0.4,0.5));
+        break;
+    case PLANE:
+        for (int i=0 ; i<10 ; i++) {
+            pt2 = *rp+Vector(0.5,0.5,0.5);
+            rp++;
+            p3dt.insert(Point(pt2.x(),pt2.y(),0.0));
+        }
+        break;
+    case RANDOM:
+        do {
+            p3dt.insert(*rp+Vector(0.5,0.5,0.5));
+            rp++;
+        }
+        while (p3dt.number_of_vertices()<30);
+    default:
+        break;
+    }
+    dlocate = temp_flags[0];
+    dconflict = temp_flags[1];
+    changed();
+}
+
+// get the offset that is common to all points of a triangle in the
+// triangulation
+inline void Scene::get_tri_offsets(const Cell_handle ch, int i,
+                                   Offset &off0, Offset &off1, Offset &off2) const {
+    off0 = p3dt.get_offset(ch,(i+1)&3);
+    off1 = p3dt.get_offset(ch,(i+2)&3);
+    off2 = p3dt.get_offset(ch,(i+3)&3);
+    if (it_type == P3DT::UNIQUE || it_type == P3DT::UNIQUE_COVER_DOMAIN) {
+        int diff_offx = (std::min)((std::min)(off0.x(),off1.x()),off2.x());
+        int diff_offy = (std::min)((std::min)(off0.y(),off1.y()),off2.y());
+        int diff_offz = (std::min)((std::min)(off0.z(),off1.z()),off2.z());
+        Offset diff_off(diff_offx, diff_offy, diff_offz);
+        off0 -= diff_off;
+        off1 -= diff_off;
+        off2 -= diff_off;
+    }
+}
+
+// get the offset that is common to all points of a tetrahedron in the
+// triangulation
+inline void Scene::get_tet_offsets(const Cell_handle ch,
+                                   Offset &off0, Offset &off1, Offset &off2, Offset &off3) const {
+    off0 = p3dt.get_offset(ch,0);
+    off1 = p3dt.get_offset(ch,1);
+    off2 = p3dt.get_offset(ch,2);
+    off3 = p3dt.get_offset(ch,3);
+    if (it_type == P3DT::UNIQUE || it_type == P3DT::UNIQUE_COVER_DOMAIN) {
+        int diff_offx = (std::min)((std::min)(off0.x(),off1.x()),
+                                   (std::min)(off2.x(),off3.x()));
+        int diff_offy = (std::min)((std::min)(off0.y(),off1.y()),
+                                   (std::min)(off2.y(),off3.y()));
+        int diff_offz = (std::min)((std::min)(off0.z(),off1.z()),
+                                   (std::min)(off2.z(),off3.z()));
+        Offset diff_off(diff_offx, diff_offy, diff_offz);
+        off0 -= diff_off;
+        off1 -= diff_off;
+        off2 -= diff_off;
+        off3 -= diff_off;
+    }
+}
+
+// return an integer that encodes the translations which have to be
+// applied to the triangle to draw
+inline int Scene::get_tri_drawing_offsets(const Cell_handle ch, int i) const {
+    Offset off0, off1, off2;
+    // if drawing boundary cells multiply is not activated then there is
+    // nothing to do.
+    switch( it_type ) {
+    case P3DT::UNIQUE_COVER_DOMAIN:
+        get_tri_offsets(ch,i,off0,off1,off2);
+        break;
+    case P3DT::STORED_COVER_DOMAIN:
+        off0 = p3dt.int_to_off(ch->offset((i+1)&3));
+        off1 = p3dt.int_to_off(ch->offset((i+2)&3));
+        off2 = p3dt.int_to_off(ch->offset((i+3)&3));
+        break;
+    default:
+        return 0;
+    }
+
+    CGAL_assertion(off0.x() == 0 || off0.x() == 1);
+    CGAL_assertion(off0.y() == 0 || off0.y() == 1);
+    CGAL_assertion(off0.z() == 0 || off0.z() == 1);
+    CGAL_assertion(off1.x() == 0 || off1.x() == 1);
+    CGAL_assertion(off1.y() == 0 || off1.y() == 1);
+    CGAL_assertion(off1.z() == 0 || off1.z() == 1);
+    CGAL_assertion(off2.x() == 0 || off2.x() == 1);
+    CGAL_assertion(off2.y() == 0 || off2.y() == 1);
+    CGAL_assertion(off2.z() == 0 || off2.z() == 1);
+
+    int offx = ( ((off0.x() == 0 && off1.x() == 0 && off2.x() == 0)
+                  || (off0.x() == 1 && off1.x() == 1 && off2.x() == 1)) ? 0 : 1);
+    int offy = ( ((off0.y() == 0 && off1.y() == 0 && off2.y() == 0)
+                  || (off0.y() == 1 && off1.y() == 1 && off2.y() == 1)) ? 0 : 1);
+    int offz = ( ((off0.z() == 0 && off1.z() == 0 && off2.z() == 0)
+                  || (off0.z() == 1 && off1.z() == 1 && off2.z() == 1)) ? 0 : 1);
+
+    return( 4*offx + 2*offy + offz );
+}
+
+// return an integer that encodes the translations which have to be
+// applied to the tetrahedron to draw
+inline int Scene::get_tet_drawing_offsets(const Cell_handle ch) const {
+    Offset off0, off1, off2, off3;
+    // if drawing boundary cells multiply is not activated then there is
+    // nothing to do.
+    switch( it_type ) {
+    case P3DT::UNIQUE_COVER_DOMAIN:
+        get_tet_offsets(ch,off0,off1,off2,off3);
+        break;
+    case P3DT::STORED_COVER_DOMAIN:
+        off0 = p3dt.int_to_off(ch->offset(0));
+        off1 = p3dt.int_to_off(ch->offset(1));
+        off2 = p3dt.int_to_off(ch->offset(2));
+        off3 = p3dt.int_to_off(ch->offset(3));
+        break;
+    default:
+        return 0;
+    }
+
+    CGAL_assertion(off0.x() == 0 || off0.x() == 1);
+    CGAL_assertion(off0.y() == 0 || off0.y() == 1);
+    CGAL_assertion(off0.z() == 0 || off0.z() == 1);
+    CGAL_assertion(off1.x() == 0 || off1.x() == 1);
+    CGAL_assertion(off1.y() == 0 || off1.y() == 1);
+    CGAL_assertion(off1.z() == 0 || off1.z() == 1);
+    CGAL_assertion(off2.x() == 0 || off2.x() == 1);
+    CGAL_assertion(off2.y() == 0 || off2.y() == 1);
+    CGAL_assertion(off2.z() == 0 || off2.z() == 1);
+    CGAL_assertion(off3.x() == 0 || off3.x() == 1);
+    CGAL_assertion(off3.y() == 0 || off3.y() == 1);
+    CGAL_assertion(off3.z() == 0 || off3.z() == 1);
+
+    int offx = ( ((off0.x() == 0 && off1.x() == 0
+                   && off2.x() == 0 && off3.x() == 0)
+                  || (off0.x() == 1 && off1.x() == 1
+                      && off2.x() == 1 && off3.x() == 1)) ? 0 : 1);
+    int offy = ( ((off0.y() == 0 && off1.y() == 0
+                   && off2.y() == 0 && off3.y() == 0)
+                  || (off0.y() == 1 && off1.y() == 1
+                      && off2.y() == 1 && off3.y() == 1)) ? 0 : 1);
+    int offz = ( ((off0.z() == 0 && off1.z() == 0
+                   && off2.z() == 0 && off3.z() == 0)
+                  || (off0.z() == 1 && off1.z() == 1
+                      && off2.z() == 1 && off3.z() == 1)) ? 0 : 1);
+
+    return( 4*offx + 2*offy + offz );
+}
+
+// construct a triangle from a given facet, given vertex offsets and a
+// common offset
+inline Triangle Scene::construct_triangle(const Cell_handle ch, int i,
+                                          const Offset& off0, const Offset& off1, const Offset& off2, int off) const {
+    if (it_type == P3DT::STORED || it_type == P3DT::UNIQUE) {
+        CGAL_assertion( off == 0 );
+        return p3dt.construct_triangle(
+                    ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
+                    ch->vertex((i+3)&3)->point(), off0, off1, off2);
+    }
+    Offset diff_off((off>>2)&1,(off>>1)&1,off&1);
+    switch (it_type) {
+    case P3DT::STORED_COVER_DOMAIN:
+        return p3dt.construct_triangle(
+                    ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
+                    ch->vertex((i+3)&3)->point(),
+                    p3dt.combine_offsets(off0,-diff_off),
+                    p3dt.combine_offsets(off1,-diff_off),
+                    p3dt.combine_offsets(off2,-diff_off));
+        break;
+    case P3DT::UNIQUE_COVER_DOMAIN:
+        return p3dt.construct_triangle(
+                    ch->vertex((i+1)&3)->point(), ch->vertex((i+2)&3)->point(),
+                    ch->vertex((i+3)&3)->point(),
+                    off0-diff_off, off1-diff_off, off2-diff_off);
+        break;
+    default:
+        CGAL_assertion(false);
+        return Triangle();
+    }
+}
+
+// construct a triangle from a given cell, given vertex offsets and a
+// common offset
+inline Tetrahedron Scene::construct_tetrahedron(const Cell_handle ch,
+                                                const Offset& off0, const Offset& off1, const Offset& off2,
+                                                const Offset& off3, int off) const {
+    if (it_type == P3DT::STORED || it_type == P3DT::UNIQUE) {
+        CGAL_assertion( off == 0 );
+        return p3dt.construct_tetrahedron(
+                    ch->vertex(0)->point(), ch->vertex(1)->point(),
+                    ch->vertex(2)->point(), ch->vertex(3)->point(),
+                    off0, off1, off2, off3);
+    }
+    Offset diff_off((off>>2)&1,(off>>1)&1,off&1);
+    switch (it_type) {
+    case P3DT::STORED_COVER_DOMAIN:
+        return p3dt.construct_tetrahedron(
+                    ch->vertex(0)->point(), ch->vertex(1)->point(),
+                    ch->vertex(2)->point(), ch->vertex(3)->point(),
+                    p3dt.combine_offsets(off0,-diff_off),
+                    p3dt.combine_offsets(off1,-diff_off),
+                    p3dt.combine_offsets(off2,-diff_off),
+                    p3dt.combine_offsets(off3,-diff_off));
+        break;
+    case P3DT::UNIQUE_COVER_DOMAIN:
+        return p3dt.construct_tetrahedron(
+                    ch->vertex(0)->point(), ch->vertex(1)->point(),
+                    ch->vertex(2)->point(), ch->vertex(3)->point(),
+                    off0-diff_off, off1-diff_off, off2-diff_off, off3-diff_off);
+        break;
+    default:
+        CGAL_assertion(false);
+        return Tetrahedron();
+    }
+}
+
+
+// collect primitives (segments, triangles, tetrahedra) from the
+// triangulation using the geometric iterators and store them in the
+// given segment set
+inline void Scene::primitives_from_geom_it(Segment_set& sset) {
+    Point p0,p1,p2,p3;
+    switch(draw_type) {
+    case SEGMENT:
+        for ( Segment_iterator sit = p3dt.periodic_segments_begin(it_type) ;
+              sit != p3dt.periodic_segments_end(it_type) ; ++sit ) {
+            sset.insert(p3dt.segment(*sit));
+        }
+        break;
+    case TRIANGLE:
+        for ( Triangle_iterator tit = p3dt.periodic_triangles_begin(it_type) ;
+              tit != p3dt.periodic_triangles_end(it_type) ; ++tit ) {
+            p0 = p3dt.point(tit->at(0));
+            p1 = p3dt.point(tit->at(1));
+            p2 = p3dt.point(tit->at(2));
+            sset.insert(p0 < p1 ? Segment(p0,p1) : Segment(p1,p0));
+            sset.insert(p0 < p2 ? Segment(p0,p2) : Segment(p2,p0));
+            sset.insert(p1 < p2 ? Segment(p1,p2) : Segment(p2,p1));
+        }
+        break;
+    case TETRAHEDRON:
+        for ( Tetrahedron_iterator tit = p3dt.periodic_tetrahedra_begin(it_type) ;
+              tit != p3dt.periodic_tetrahedra_end(it_type) ; ++tit ) {
+            p0 = p3dt.point(tit->at(0));
+            p1 = p3dt.point(tit->at(1));
+            p2 = p3dt.point(tit->at(2));
+            p3 = p3dt.point(tit->at(3));
+            sset.insert((p0 < p1) ? Segment(p0,p1) : Segment(p1,p0));
+            sset.insert((p0 < p2) ? Segment(p0,p2) : Segment(p2,p0));
+            sset.insert((p0 < p3) ? Segment(p0,p3) : Segment(p3,p0));
+            sset.insert((p1 < p2) ? Segment(p1,p2) : Segment(p2,p1));
+            sset.insert((p1 < p3) ? Segment(p1,p3) : Segment(p3,p1));
+            sset.insert((p2 < p3) ? Segment(p2,p3) : Segment(p3,p2));
+        }
+        break;
+    }
+}
+
+// clip segments from the given segment set that are partially outside
+// of the unit cube/square. Eliminate those who are completely outside
+inline void Scene::segment_clipping(Segment_set& sset) {
+    Segment_clipper clipper;
+    Segment_set sset_tmp;
+    for (Segment_set::iterator it = sset.begin() ; it != sset.end() ; ++it) {
+        Point s = it->source();
+        Point t = it->target();
+        if (clipper(s,t)) sset_tmp.insert((s<t?Segment(s,t):Segment(t,s)));
+    }
+    std::swap(sset, sset_tmp);
+}
+
+// clip segments from the given segment set that are partially outside
+// of the unit cube/square. Draw their outside part in a different
+// color.
+// TODO: don't eliminate segments that are completely outside but draw
+// them in the different color as well
+inline void Scene::segment_2color_clipping (Segment_set& sset) {
+    Segment_clipper clipper;
+    Segment_set sset_tmp, sset_out;
+    for (Segment_set::iterator it = sset.begin() ; it != sset.end() ; ++it) {
+        Point s = it->source();
+        Point t = it->target();
+        if (clipper(s,t)) {
+            sset_tmp.insert((s<t?Segment(s,t):Segment(t,s)));
+            Point p = it->source();
+            Point q = it->target();
+            if (Segment(p,s).squared_length() > Segment(p,t).squared_length())
+                std::swap(s,t);
+            if (p!=s) sset_out.insert((p<s?Segment(p,s):Segment(s,p)));
+            if (q!=t) sset_out.insert((q<t?Segment(q,t):Segment(t,q)));
+        }
+    }
+
+
+    std::swap(sset, sset_tmp);
+}
+
+// Draw the faces of the tetrahedron in which the moving point is currently
+// located transparently. It depends on it_type which periodic copies
+// of the respective cell will be drawn. In general it will be all
+// cells that occur in the draw list
+void Scene::gl_draw_location() {
+    pos_location.resize(0);
+    if (p3dt.number_of_vertices() == 0) return;
+    // Do the point location
+    Cell_handle ch = p3dt.locate(moving_point);
+    std::vector<Projected_triangle> cf;
+
+    // Transparency
+
+    if (in_plane) {
+        int i=0;
+        int count = 0;
+        // Figure out whether there is a facet that is completly contained
+        // in the z=0 plane
+        for (int j=0 ; j<4 ; j++) {
+            if (ch->vertex(j)->point().z() != 0.0 ||
+                    p3dt.get_offset(ch,j).z() != 0) {
+                i=j;
+                count++;
+            }
+        }
+        // If so, compute its triangle(s) and insert it in cf
+        if (count==1) {
+            Offset off0, off1, off2;
+            get_tri_offsets(ch, i, off0, off1, off2);
+            int diff_off = get_tri_drawing_offsets(ch, i);
+            for (int offs=0 ; offs<=diff_off ; offs++) {
+                if ((((~offs)|diff_off)&7)!=7) continue;
+                Triangle tri_to_draw = construct_triangle(ch,i,off0,off1,off2,offs);
+                Point p = tri_to_draw.vertex(0);
+                Point q = tri_to_draw.vertex(1);
+                Point r = tri_to_draw.vertex(2);
+                cf.push_back(Projected_triangle(.0,Triangle(p,q,r)));
+            }
+        }
+    } else {
+        double modelMatrix[16];
+        double projMatrix[16];
+        int viewport[4];
+        glGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix);
+        glGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
+        glGetIntegerv(GL_VIEWPORT, viewport);
+
+        // Compute the triangles that are the facets of the cell and
+        // insert them in cf
+        Offset off0,off1,off2,off3;
+        get_tet_offsets(ch, off0, off1, off2, off3);
+        int diff_off = get_tet_drawing_offsets(ch);
+
+        for (int offs=0 ; offs<=diff_off ; offs++) {
+            if ((((~offs)|diff_off)&7)!=7) continue;
+            Tetrahedron tet_to_draw = construct_tetrahedron(
+                        ch, off0, off1, off2, off3, offs);
+
+            for(int i=0; i < 4; i++){
+                Point p = tet_to_draw.vertex((i+1)&3);
+                Point q = tet_to_draw.vertex((i+2)&3);
+                Point r = tet_to_draw.vertex((i+3)&3);
+                Vector c= (Vector(Point(),p)+Vector(Point(),q)+Vector(Point(),r))/3.;
+                Point cp = Point(c.x(),c.y(),c.z());
+                // project facet center
+                double px,py,pz;
+                project(cp.x(),cp.y(),cp.z(),
+                           modelMatrix, projMatrix, viewport,
+                           &px,&py,&pz);
+                cf.push_back(Projected_triangle(pz,Triangle(p,q,r)));
+            }
+        }
+
+        // Sort cf according to their z coordinates to enable transparency
+        std::sort(cf.begin(), cf.end(), Projected_triangle::closer);
+    }
+
+    // Draw all triangles from cf
+    for (std::vector<Projected_triangle >::iterator cfit = cf.begin() ; cfit != cf.end() ; cfit++) {
+        Point p = cfit->t().vertex(0);
+        Point q = cfit->t().vertex(1);
+        Point r = cfit->t().vertex(2);
+        pos_location.push_back(p.x()); pos_location.push_back(p.y()); pos_location.push_back(p.z());
+        pos_location.push_back(q.x()); pos_location.push_back(q.y()); pos_location.push_back(q.z());
+        pos_location.push_back(r.x()); pos_location.push_back(r.y()); pos_location.push_back(r.z());
+
+    }
+    vao[5].bind();
+    buffers[6].bind();
+    buffers[6].allocate(pos_location.data(), static_cast<int>(pos_location.size()*sizeof(float)));
+    rendering_program.bind();
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[6].release();
+
+    rendering_program.release();
+    vao[5].release();
+}
+
+// Draw the boundary faces of the current conflict region of the
+// moving point transparently. It depends on it_type which periodic
+// copies of the respective cell will be drawn. In general it will be
+// all cells that occur in the draw list.
+void Scene::gl_draw_conflict() {
+    pos_conflict.resize(0);
+    if (p3dt.number_of_vertices() == 0) return;
+    Cell_handle ch;
+    std::vector<Cell_handle> cic;
+    std::vector<Facet> boundary_facets;
+    // Find the conflict region
+    Cell_handle c = p3dt.locate(moving_point);
+    p3dt.find_conflicts(moving_point,c,std::back_inserter(boundary_facets),std::back_inserter(cic),CGAL::Emptyset_iterator());
+
+    std::vector<Projected_triangle> bfm;
+
+    // Transparency
+    //glEnable(GL_BLEND);
+    //glColor4f(.69f, 0.18f , 0.26f, 0.6f);
+    //glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+
+    if (in_plane) {
+        for (unsigned int k=0 ; k<cic.size(); k++) {
+            ch = cic[k];
+
+            int i = 0;
+            int count = 0;
+            // Figure out whether there is a facet that is completely
+            // contained in the z=0 plane
+            for (int j=0 ; j<4 ; j++) {
+                if (ch->vertex(j)->point().z() != 0.0 ||
+                        p3dt.get_offset(ch,j).z() != 0) {
+                    i=j;
+                    count++;
+                }
+            }
+            // If so, compute its triangle(s) and insert it in bfm
+            if (count==1) {
+                Offset off0, off1, off2;
+                get_tri_offsets(ch, i, off0, off1, off2);
+                int diff_off = get_tri_drawing_offsets(ch,i);
+                for (int offs = 0 ; offs<=diff_off ; offs++) {
+                    if ((((~offs)|diff_off)&7)!=7) continue;
+                    Triangle tri_to_draw = construct_triangle(ch,i,off0,off1,off2,offs);
+                    Point p = tri_to_draw.vertex(0);
+                    Point q = tri_to_draw.vertex(1);
+                    Point r = tri_to_draw.vertex(2);
+                    bfm.push_back(Projected_triangle(.0,Triangle(p,q,r)));
+                }
+            }
+        }
+    } else {
+        double modelMatrix[16];
+        double projMatrix[16];
+        int viewport[4];
+        glGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix);
+        glGetDoublev(GL_PROJECTION_MATRIX, projMatrix);
+        glGetIntegerv(GL_VIEWPORT, viewport);
+
+        for (unsigned int i=0 ; i<boundary_facets.size(); i++) {
+            ch = boundary_facets[i].first;
+            int j=boundary_facets[i].second;
+
+            // Compute the triangle(s) of the facet and insert them in bfm
+            Offset off0, off1, off2;
+            get_tri_offsets(ch, j, off0, off1, off2);
+            int diff_off = get_tri_drawing_offsets(ch, j);
+            for (int offs=0 ; offs<=diff_off ; offs++) {
+                if ((((~offs)|diff_off)&7)!=7) continue;
+                Triangle tri_to_draw = construct_triangle(ch,j,off0,off1,off2,offs);
+                Point p = tri_to_draw.vertex(0);
+                Point q = tri_to_draw.vertex(1);
+                Point r = tri_to_draw.vertex(2);
+                Vector c= (Vector(Point(),p)+Vector(Point(),q)+Vector(Point(),r))/3.;
+                Point cp = Point(c.x(),c.y(),c.z());
+                // project facet center
+                double px,py,pz;
+                project(cp.x(),cp.y(),cp.z(),
+                           modelMatrix, projMatrix, viewport,
+                           &px,&py,&pz);
+                bfm.push_back(Projected_triangle(pz,Triangle(p,q,r)));
+            }
+        }
+
+        // Sort bfm according to their z coordinates to enable transparency
+        std::sort(bfm.begin(), bfm.end(), Projected_triangle::closer);
+    }
+
+    // Draw all triangles from bfm
+    // glBegin(GL_TRIANGLES);
+    for (std::vector<Projected_triangle >::iterator bfmit = bfm.begin() ;
+         bfmit != bfm.end() ; bfmit++) {
+        Point p = bfmit->t().vertex(0);
+        Point q = bfmit->t().vertex(1);
+        Point r = bfmit->t().vertex(2);
+
+        pos_conflict.push_back(p.x()); pos_conflict.push_back(p.y()); pos_conflict.push_back(p.z());
+        pos_conflict.push_back(q.x()); pos_conflict.push_back(q.y()); pos_conflict.push_back(q.z());
+        pos_conflict.push_back(r.x()); pos_conflict.push_back(r.y()); pos_conflict.push_back(r.z());
+
+    }
+    // glEnd();
+    vao[6].bind();
+    buffers[7].bind();
+    buffers[7].allocate(pos_conflict.data(), static_cast<int>(pos_conflict.size()*sizeof(float)));
+    rendering_program.bind();
+    poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+    rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+    buffers[7].release();
+
+    rendering_program.release();
+    vao[6].release();
+    // glEnd();
+    //
+    // glDisable(GL_BLEND);
+}
+
+// provide some color constants for the GLU primitive appearance.
+void Scene::change_material(const QString &string) {
+
+
+    // Change
+    if(string == "Silver")
+    {
+        // Ambient
+        ambient[0] = 0.19225f;
+        ambient[1] = 0.19225f;
+        ambient[2] = 0.19225f;
+        ambient[3] = 1.0f;
+        // Diffuse
+        diffuse[0] = 0.50754f;
+        diffuse[1] = 0.50754f;
+        diffuse[2] = 0.50754f;
+        diffuse[3] = 1.0f;
+        // Specular
+        specular[0] = 0.508273f;
+        specular[1] = 0.508273f;
+        specular[2] = 0.508273f;
+        specular[3] = 1.0f;
+        // Shininess
+        shininess = 51.2f;
+    }
+
+    else if(string == "Gold")
+        {
+            // Ambient
+            ambient[0] = 0.24725f;
+            ambient[1] = 0.1995f;
+            ambient[2] = 0.0745f;
+            ambient[3] = 1.0f;
+            // Diffuse
+            diffuse[0] = 0.75164f;
+            diffuse[1] = 0.60648f;
+            diffuse[2] = 0.22648f;
+            diffuse[3] = 1.0f;
+            // Specular
+            specular[0] = 0.928281f;
+            specular[1] = 0.855802f;
+            specular[2] = 0.666065f;
+            specular[3] = 1.0f;
+            // Shininess
+            shininess = 51.2f;
+        }
+
+
+    else if(string == "Red")
+            {
+                // Ambient
+                ambient[0] = 0.75f;
+                ambient[1] = 0.0f;
+                ambient[2] = 0.0f;
+                ambient[3] = 1.0f;
+                // Diffuse
+                diffuse[0] = 1.0f;
+                diffuse[1] = 0.0f;
+                diffuse[2] = 0.0f;
+                diffuse[3] = 1.0f;
+                // Specular
+                specular[0] = 0.75f;
+                specular[1] = 0.75f;
+                specular[2] = 0.75f;
+                specular[3] = 1.0f;
+                // Shininess
+                shininess = 64.0f;
+            }
+
+    else if(string == "Green")
+                {
+                    // Ambient
+                    ambient[0] = 0.0225f;
+                    ambient[1] = 0.19125f;
+                    ambient[2] = 0.0735f;
+                    ambient[3] = 1.0f;
+                    // Diffuse
+                    diffuse[0] = 0.0828f;
+                    diffuse[1] = 0.3038f;
+                    diffuse[2] = 0.14048f;
+                    diffuse[3] = 1.0f;
+                    // Specular
+                    specular[0] = 0.086014f;
+                    specular[1] = 0.306777f;
+                    specular[2] = 0.117622f;
+                    specular[3] = 1.0f;
+                    // Shininess
+                    shininess = 12.8f;
+                }
+
+    else if(string == "Black plastic")
+                    {
+                        // Ambient
+                        ambient[0] = 0.0f;
+                        ambient[1] = 0.0f;
+                        ambient[2] = 0.0f;
+                        ambient[3] = 1.0f;
+                        // Diffuse
+                        diffuse[0] = 0.01f;
+                        diffuse[1] = 0.01f;
+                        diffuse[2] = 0.01f;
+                        diffuse[3] = 1.0f;
+                        // Specular
+                        specular[0] = 0.5f;
+                        specular[1] = 0.5f;
+                        specular[2] = 0.5f;
+                        specular[3] = 1.0f;
+                        // Shininess
+                        shininess = 32.0f;
+                    }
+
+    color.setRgbF(diffuse[0],diffuse[1],diffuse[2],diffuse[3]);
+
+}
+
+void Scene::changed()
+{
+    compute_elements();
+    are_buffers_initialized = false;
+}
+
+void Scene::draw_sphere(float R, int prec)
+{
+
+    points_spheres.resize(0);
+    int rings=prec, sectors=prec;
+    float T, P;
+    float x[4],y[4],z[4];
+
+
+    //Top of the sphere
+    for(int t=0; t<360; t+=sectors)
+    {
+
+        points_spheres.push_back(0);
+        points_spheres.push_back(0);
+        points_spheres.push_back(R);
+
+
+        normals_spheres.push_back(0);
+        normals_spheres.push_back(0);
+        normals_spheres.push_back(1);
+
+
+
+        P = rings*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        y[1] = sin(P) * sin(T) ;
+        z[1] = cos(P);
+        points_spheres.push_back(R * x[1]);
+        points_spheres.push_back(R * y[1]);
+        points_spheres.push_back(R * z[1]);
+
+
+        normals_spheres.push_back(x[1]);
+        normals_spheres.push_back(y[1]);
+        normals_spheres.push_back(z[1]);
+
+        //
+        P = rings*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        y[2] = sin(P) * sin(T) ;
+        z[2] = cos(P);
+        points_spheres.push_back(R * x[2]);
+        points_spheres.push_back(R * y[2]);
+        points_spheres.push_back(R * z[2]);
+
+        normals_spheres.push_back(x[2]);
+        normals_spheres.push_back(y[2]);
+        normals_spheres.push_back(z[2]);
+
+    }
+
+    //Body of the sphere
+    for (int p=rings; p<180-rings; p+=rings)
+        for(int t=0; t<360; t+=sectors)
+        {
+            //A
+            P = p*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[0] = sin(P) * cos(T) ;
+            y[0] = sin(P) * sin(T) ;
+            z[0] = cos(P);
+
+            points_spheres.push_back(R * x[0]);
+            points_spheres.push_back(R * y[0]);
+            points_spheres.push_back(R * z[0]);
+
+
+            normals_spheres.push_back(x[0]);
+            normals_spheres.push_back(y[0]);
+            normals_spheres.push_back(z[0]);
+
+            //B
+            P = (p+rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            points_spheres.push_back(R * x[1]);
+            points_spheres.push_back(R * y[1]);
+            points_spheres.push_back(R * z[1]);
+
+
+            normals_spheres.push_back(x[1]);
+            normals_spheres.push_back(y[1]);
+            normals_spheres.push_back(z[1]);
+
+            //C
+            P = p*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            points_spheres.push_back(R * x[2]);
+            points_spheres.push_back(R * y[2]);
+            points_spheres.push_back(R * z[2]);
+
+
+            normals_spheres.push_back(x[2]);
+            normals_spheres.push_back(y[2]);
+            normals_spheres.push_back(z[2]);
+            //D
+            P = (p+rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[3] = sin(P) * cos(T) ;
+            y[3] = sin(P) * sin(T) ;
+            z[3] = cos(P);
+            points_spheres.push_back(R * x[3]);
+            points_spheres.push_back(R * y[3]);
+            points_spheres.push_back(R * z[3]);
+
+
+            normals_spheres.push_back(x[3]);
+            normals_spheres.push_back(y[3]);
+            normals_spheres.push_back(z[3]);
+
+
+
+            points_spheres.push_back(R * x[1]);
+            points_spheres.push_back(R * y[1]);
+            points_spheres.push_back(R * z[1]);
+
+
+            normals_spheres.push_back(x[1]);
+            normals_spheres.push_back(y[1]);
+            normals_spheres.push_back(z[1]);
+
+            points_spheres.push_back(R * x[2]);
+            points_spheres.push_back(R * y[2]);
+            points_spheres.push_back(R * z[2]);
+
+
+            normals_spheres.push_back(x[2]);
+            normals_spheres.push_back(y[2]);
+            normals_spheres.push_back(z[2]);
+
+        }
+    //Bottom of the sphere
+    for(int t=0; t<360; t+=sectors)
+    {
+
+
+        points_spheres.push_back(0);
+        points_spheres.push_back(0);
+        points_spheres.push_back(-R);
+
+
+        normals_spheres.push_back(0);
+        normals_spheres.push_back(0);
+        normals_spheres.push_back(-1);
+
+
+        P = (180-rings)*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        y[1] = sin(P) * sin(T) ;
+        z[1] = cos(P);
+        points_spheres.push_back(R * x[1]);
+        points_spheres.push_back(R * y[1]);
+        points_spheres.push_back(R * z[1]);
+
+
+        normals_spheres.push_back(x[1]);
+        normals_spheres.push_back(y[1]);
+        normals_spheres.push_back(z[1]);
+
+
+        P = (180-rings)*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        y[2] = sin(P) * sin(T) ;
+        z[2] = cos(P);
+        points_spheres.push_back(R * x[2]);
+        points_spheres.push_back(R * y[2]);
+        points_spheres.push_back(R * z[2]);
+
+
+        normals_spheres.push_back(x[2]);
+        normals_spheres.push_back(y[2]);
+        normals_spheres.push_back(z[2]);
+
+    }
+
+}
+void Scene::draw_cylinder(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals)
+{
+    vertices->resize(0);
+    int rings=360/prec, sectors=360/prec;
+    float T, P;
+    float x[4],y[4],z[4];
+    //Closing nicely the tubes will cause z-fighting and the spherical parts will get all messy
+
+    //top of the cylinder
+    for(int t=0; t<360; t+=sectors)
+    {
+
+        vertices->push_back(0);
+        vertices->push_back(R+1);
+        vertices->push_back(0);
+
+
+        normals->push_back(0);
+        normals->push_back(1);
+        normals->push_back(0);
+
+
+
+        P = rings*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        z[1] = sin(P) * sin(T) ;
+        y[1] = cos(P);
+        vertices->push_back(R * x[1]);
+        vertices->push_back(R * y[1]+1);
+        vertices->push_back(R * z[1]);
+
+
+        normals->push_back(x[1]);
+        normals->push_back(y[1]);
+        normals->push_back(z[1]);
+
+        //
+        P = rings*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        z[2] = sin(P) * sin(T) ;
+        y[2] = cos(P);
+        vertices->push_back(R * x[2]);
+        vertices->push_back(R * y[2]+1);
+        vertices->push_back(R * z[2]);
+
+        normals->push_back(x[2]);
+        normals->push_back(y[2]);
+        normals->push_back(z[2]);
+
+    }
+    //Body of the sphere
+    for (int p=rings; p<90; p+=rings)
+        for(int t=0; t<360; t+=sectors)
+        {
+            //A
+            P = p*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[0] = sin(P) * cos(T) ;
+            z[0] = sin(P) * sin(T) ;
+            y[0] = cos(P);
+
+            vertices->push_back(R * x[0]);
+            vertices->push_back(R * y[0]+1);
+            vertices->push_back(R * z[0]);
+
+
+            normals->push_back(x[0]);
+            normals->push_back(y[0]);
+            normals->push_back(z[0]);
+
+            //B
+            P = (p+rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            z[1] = sin(P) * sin(T) ;
+            y[1] = cos(P);
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]+1);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            //C
+            P = p*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            z[2] = sin(P) * sin(T) ;
+            y[2] = cos(P);
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]+1);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+            //D
+            P = (p+rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[3] = sin(P) * cos(T) ;
+            z[3] = sin(P) * sin(T) ;
+            y[3] = cos(P);
+            vertices->push_back(R * x[3]);
+            vertices->push_back(R * y[3]+1);
+            vertices->push_back(R * z[3]);
+
+
+            normals->push_back(x[3]);
+            normals->push_back(y[3]);
+            normals->push_back(z[3]);
+
+
+
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]+1);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]+1);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+
+        }
+
+
+    //body of the cylinder
+    for(int d = 0; d<360; d+= 360/prec)
+    {
+
+        //point A1
+        float D = d*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point B1
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point C1
+        D = (d+360/prec)*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point A2
+        D = (d+360/prec)*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point B2
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point C2
+        D = d*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+    }
+
+    //bottom of the cylinder
+    for(int t=0; t<360; t+=sectors)
+    {
+
+        vertices->push_back(0);
+        vertices->push_back(-R);
+        vertices->push_back(0);
+
+
+        normals->push_back(0);
+        normals->push_back(-1);
+        normals->push_back(0);
+
+
+
+        P = rings*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        z[1] = sin(P) * sin(T) ;
+        y[1] = cos(P);
+        vertices->push_back(R * x[1]);
+        vertices->push_back(R * y[1]);
+        vertices->push_back(R * z[1]);
+
+
+        normals->push_back(x[1]);
+        normals->push_back(y[1]);
+        normals->push_back(z[1]);
+
+        //
+        P = rings*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        z[2] = sin(P) * sin(T) ;
+        y[2] = cos(P);
+        vertices->push_back(R * x[2]);
+        vertices->push_back(R * y[2]);
+        vertices->push_back(R * z[2]);
+
+        normals->push_back(x[2]);
+        normals->push_back(y[2]);
+        normals->push_back(z[2]);
+
+    }
+    //Body of the sphere
+    for (int p=90; p<180; p+=rings)
+        for(int t=0; t<360; t+=sectors)
+        {
+            //A
+            P = p*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[0] = sin(P) * cos(T) ;
+            z[0] = sin(P) * sin(T) ;
+            y[0] = cos(P);
+
+            vertices->push_back(R * x[0]);
+            vertices->push_back(R * y[0]);
+            vertices->push_back(R * z[0]);
+
+
+            normals->push_back(x[0]);
+            normals->push_back(y[0]);
+            normals->push_back(z[0]);
+
+            //B
+            P = (p+rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            z[1] = sin(P) * sin(T) ;
+            y[1] = cos(P);
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            //C
+            P = p*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            z[2] = sin(P) * sin(T) ;
+            y[2] = cos(P);
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+            //D
+            P = (p+rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[3] = sin(P) * cos(T) ;
+            z[3] = sin(P) * sin(T) ;
+            y[3] = cos(P);
+            vertices->push_back(R * x[3]);
+            vertices->push_back(R * y[3]);
+            vertices->push_back(R * z[3]);
+
+
+            normals->push_back(x[3]);
+            normals->push_back(y[3]);
+            normals->push_back(z[3]);
+
+
+
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+
+        }
+
+
+}
+
+GLint Scene::project(GLdouble objx, GLdouble objy, GLdouble objz,
+ const GLdouble modelMatrix[16],
+ const GLdouble projMatrix[16],
+ const GLint viewport[4],
+ GLdouble *winx, GLdouble *winy, GLdouble *winz)
+{
+  double in[4];
+
+  in[0]=objx;
+  in[1]=objy;
+  in[2]=objz;
+  in[3]=1.0;
+  QMatrix4x4 mv, p;
+  QVector4D in_v, out_v;
+  for(int i=0; i<16; i++)
+  {
+    mv.data()[i] = modelMatrix[i];
+    p.data()[i] = projMatrix[i];
+  }
+  in_v.setX(in[0]);
+  in_v.setY(in[1]);
+  in_v.setZ(in[2]);
+  in_v.setW(in[3]);
+
+  out_v=mv*in_v;
+  in_v = p*out_v;
+
+  in[0]=in_v.x();
+  in[1]=in_v.y();
+  in[2]=in_v.z();
+  in[3]=in_v.w();
+
+  if (in[3] == 0.0) return(GL_FALSE);
+  in[0] /= in[3];
+  in[1] /= in[3];
+  in[2] /= in[3];
+  /* Map x, y and z to range 0-1 */
+  in[0] = in[0] * 0.5 + 0.5;
+  in[1] = in[1] * 0.5 + 0.5;
+  in[2] = in[2] * 0.5 + 0.5;
+
+  /* Map x,y to viewport */
+  in[0] = in[0] * viewport[2] + viewport[0];
+  in[1] = in[1] * viewport[3] + viewport[1];
+
+  *winx=in[0];
+  *winy=in[1];
+  *winz=in[2];
+  return(GL_TRUE);
+}
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.h b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.h
new file mode 100644
index 0000000..6fddede
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene.h
@@ -0,0 +1,329 @@
+#ifndef SCENE_H
+#define SCENE_H
+
+#include "ui_MainWindow.h"
+#include "Scene_utils.h"
+#include <fstream>
+#include <QObject>
+#include <QFileDialog>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+class Scene : public QObject, QOpenGLFunctions_2_1
+{
+  Q_OBJECT
+
+private:
+  typedef qglviewer::Vec Vec;
+  typedef std::set<Segment, Compare_segment<Segment> > Segment_set;
+
+  enum Init {EMPTY, GRID, SINGLE, PLANE, RANDOM};
+
+  enum Draw_type { SEGMENT, TRIANGLE, TETRAHEDRON };
+
+  enum Primitive_colors {
+    VERTEX_COLOR,
+    EDGE_COLOR,
+    DOMAIN_COLOR,
+    FLYING_BALL_COLOR,
+    CLIPPING_COLOR
+  };
+
+  bool gl_init;
+public:
+  Scene(Ui::MainWindow* ui_) : ui(ui_), p3dt(),
+                  moving_point(Point(0.2,0.2,0.2)) {
+    gl_init = false;
+    flying_ball = ui->actionFlying_ball->isChecked();
+
+    dlocate = ui->actionPoint_location->isChecked();
+    dconflict = ui->actionConflict_region->isChecked();
+
+    wireframe = ui->actionWireframe->isChecked();
+    in_plane = ui->actionPlanar_triangulation->isChecked();
+    bool c1 = ui->actionDraw_1_sheeted_covering->isChecked();
+    bool cd = ui->actionDraw_bordering_cells_multiply->isChecked();
+
+    if ( c1 &&  cd) it_type = P3DT::UNIQUE_COVER_DOMAIN;
+    if ( c1 && !cd) it_type = P3DT::UNIQUE;
+    if (!c1 &&  cd) it_type = P3DT::STORED_COVER_DOMAIN;
+    if (!c1 && !cd) it_type = P3DT::STORED;
+
+    if ( ui->actionDraw_segments->isChecked() )   draw_type = SEGMENT;
+    if ( ui->actionDraw_triangles->isChecked() )  draw_type = TRIANGLE;
+    if ( ui->actionDraw_tetrahedra->isChecked() ) draw_type = TETRAHEDRON;
+
+    ddomain = ui->actionDraw_cube_square->isChecked();
+    cube_clipping = ui->actionClip_along_the_cube_square->isChecked();
+    two_color_clipping = ui->action2_color_clipping->isChecked();
+
+    materials[VERTEX_COLOR]      = "Gold";
+    materials[EDGE_COLOR]        = "Green";
+    materials[DOMAIN_COLOR]      = "Black plastic";
+    materials[FLYING_BALL_COLOR] = "Red";
+    materials[CLIPPING_COLOR]    = "Silver";
+
+    // Timer for flying ball
+    timer = new QTimer(this);
+    connect(timer, SIGNAL(timeout()), this, SLOT(update_position()));
+    timer->start(100);
+
+    points_cube = new std::vector<float>();
+    points_cylinder= new std::vector<float>();
+    normals_cylinder= new std::vector<float>();
+  }
+
+  ~Scene() {
+    for(int i=0; i<24; i++)
+        buffers[i].destroy();
+    for(int i=0; i<12; i++)
+        vao[i].destroy();
+  }
+
+public Q_SLOTS:
+  void init();
+  void draw();
+  void changed();
+
+  void load_points(const QString& fileName);
+  void update_position();
+
+  void init_scene_empty() { init_scene(EMPTY); }
+  void init_scene_single() { init_scene(SINGLE); }
+  void init_scene_random() { init_scene(RANDOM); }
+  void init_scene_plane() { init_scene(PLANE); }
+  void init_scene_grid() { init_scene(GRID); }
+  void toggle_flying_ball(bool on) {
+    flying_ball = on;
+    ui->viewer->update();
+  }
+  void toggle_pause(bool on) {
+    if (on) timer->stop();
+    else timer->start();
+  }
+
+  void insert_mp() {
+    insert_point(moving_point);
+    QString str;
+    ui->viewer->displayMessage(str.sprintf("Added point (%f, %f, %f)",
+           moving_point.x(),moving_point.y(),moving_point.z()));
+    changed();
+  }
+
+  void insert_random() {
+    RandPts rp(0.5);
+    Point pt = *rp+Vector(0.5,0.5,0.5);
+    rp++;
+    insert_point(Point(pt.x(),pt.y(),(in_plane? 0.0:pt.z())));
+    QString str;
+    ui->viewer->displayMessage(str.sprintf("Added point (%f, %f, %f)",
+           pt.x(),pt.y(),(in_plane? 0.0:pt.z())));
+    changed();
+  }
+  void insert_point(Point p) {
+    bool temp_flags[] = {dlocate, dconflict};
+    dlocate = dconflict = false;
+    p3dt.insert(p);
+    dlocate = temp_flags[0];
+    dconflict = temp_flags[1];
+    changed();
+  }
+  void grab_image() {
+    ui->viewer->openSnapshotFormatDialog();
+    ui->viewer->saveSnapshot(false);
+  }
+  void toggle_dlocate(bool on) {
+    dlocate = on;
+    changed();
+    ui->viewer->update();
+  }
+  void toggle_dconflict(bool on) {
+    dconflict = on;
+    changed();
+    ui->viewer->update();
+  }
+  void toggle_wireframe(bool on) {
+        wireframe = !(!on && extension_is_found);
+        ( on ? glDisable(GL_LIGHTING) : glEnable(GL_LIGHTING) );
+        changed();
+  }
+  void toggle_in_plane(bool on) {
+    in_plane = on;
+    changed();
+  }
+  // TODO: find radio button functionality within menus in QtDesigner
+  void toggle_force_1cover(bool on) {
+    if (ui->actionDraw_bordering_cells_multiply->isChecked())
+      it_type = ( on ? P3DT::UNIQUE_COVER_DOMAIN : P3DT::STORED_COVER_DOMAIN );
+    else
+      it_type = ( on ? P3DT::UNIQUE : P3DT::STORED);
+    changed();
+  }
+  void toggle_multiple_cells(bool on) {
+    if (ui->actionDraw_1_sheeted_covering->isChecked())
+      it_type = ( on ? P3DT::UNIQUE_COVER_DOMAIN : P3DT::UNIQUE );
+    else
+      it_type = ( on ? P3DT::STORED_COVER_DOMAIN : P3DT::STORED );
+    changed();
+  }
+  void trigger_draw_type_segment() {
+    ui->actionDraw_segments->setChecked(true);
+    ui->actionDraw_triangles->setChecked(false);
+    ui->actionDraw_tetrahedra->setChecked(false);
+    draw_type = SEGMENT;
+    changed();
+  }
+  void trigger_draw_type_triangle() {
+    ui->actionDraw_segments->setChecked(false);
+    ui->actionDraw_triangles->setChecked(true);
+    ui->actionDraw_tetrahedra->setChecked(false);
+    draw_type = TRIANGLE;
+    changed();
+  }
+  void trigger_draw_type_tetrahedron() {
+    ui->actionDraw_segments->setChecked(false);
+    ui->actionDraw_triangles->setChecked(false);
+    ui->actionDraw_tetrahedra->setChecked(true);
+    draw_type = TETRAHEDRON;
+    changed();
+  }
+  void toggle_ddomain(bool on) { ddomain = on; changed(); }
+  void toggle_cube_clipping(bool on) {
+    ui->action2_color_clipping->setEnabled(on);
+    if (!on) ui->action2_color_clipping->setChecked(false);
+    cube_clipping = on;
+    two_color_clipping = false;
+    if (on && ui->action2_color_clipping->isChecked())
+      toggle_two_color_clipping(true);
+    else
+    changed();
+  }
+  void toggle_two_color_clipping(bool on) {
+    two_color_clipping = on;
+    changed();
+  }
+  bool load_points() {
+    QString fileName = QFileDialog
+      ::getOpenFileName(ui->centralWidget, tr("Open point set"),
+            ".", tr("All files (*)"));
+    if(! fileName.isEmpty()){
+      load_points(fileName);
+    }
+   return true;
+  }
+
+Q_SIGNALS:
+  void message(const QString & message, int timeout = 0 );
+  void loaded_points(const QString &n);
+
+private:
+  // Scene management helpers
+  void init_scene(Init sceneID);
+  GLint project(GLdouble objx, GLdouble objy, GLdouble objz,
+                const GLdouble modelMatrix[16],
+                const GLdouble projMatrix[16],
+                const GLint viewport[4],
+                GLdouble *winx, GLdouble *winy, GLdouble *winz);
+
+  // Helper functions
+  void get_tri_offsets(const Cell_handle ch, int i,
+               Offset& off0, Offset& off1, Offset& off2) const;
+  void get_tet_offsets(const Cell_handle ch, Offset& off0, Offset& off1,
+               Offset& off2, Offset& off3) const;
+  int get_tri_drawing_offsets(const Cell_handle ch, int i) const;
+  int get_tet_drawing_offsets(const Cell_handle ch) const;
+  Tetrahedron construct_tetrahedron(const Cell_handle ch, const Offset& off0,
+      const Offset& off1,const Offset& off2,const Offset& off3, int off) const;
+  Triangle construct_triangle(const Cell_handle ch, int i,
+      const Offset& off0,const Offset& off1,const Offset& off2, int off) const;
+
+  // Drawing functions
+  void primitives_from_geom_it(Segment_set& sset);
+  void segment_clipping(Segment_set& sset);
+  void segment_2color_clipping (Segment_set& sset);
+
+  void gl_draw_location();
+  void gl_draw_conflict();
+
+  void change_material(const QString& string);
+
+  //Shaders elements
+
+  QColor color;
+  // define material
+   QVector4D	ambient;
+   QVector4D	diffuse;
+   QVector4D	specular;
+   GLfloat      shininess ;
+      int poly_vertexLocation[3];
+      int normalsLocation[3];
+      int mvpLocation[3];
+      int mvLocation[2];
+      int centerLocation[5];
+      int colorLocation[3];
+      int lightLocation[5*2];
+
+
+      std::vector<float> pos_points;
+      std::vector<float> pos_tube;
+      std::vector<float> pos_cube;
+      std::vector<float> pos_square;
+      std::vector<float> pos_location;
+      std::vector<float> pos_conflict;
+      std::vector<float> points_spheres;
+      std::vector<float> normals_spheres;
+      std::vector<float> *points_cylinder;
+      std::vector<float> *normals_cylinder;
+      std::vector<float> *points_cube;
+      std::vector<float> transfo1_cylinder;
+      std::vector<float> transfo2_cylinder;
+      std::vector<float> transfo3_cylinder;
+      std::vector<float> transfo4_cylinder;
+      std::vector<float> transfo1_cube;
+      std::vector<float> transfo2_cube;
+      std::vector<float> transfo3_cube;
+      std::vector<float> transfo4_cube;
+
+      std::vector<float> transfo1_square;
+      std::vector<float> transfo2_square;
+      std::vector<float> transfo3_square;
+      std::vector<float> transfo4_square;
+
+      bool are_buffers_initialized;
+      bool extension_is_found;
+      QOpenGLBuffer buffers[24];
+      QOpenGLVertexArrayObject vao[12];
+      QOpenGLShaderProgram rendering_program;
+      QOpenGLShaderProgram rendering_program_spheres;
+      QOpenGLShaderProgram rendering_program_cylinders;
+      typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+      typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+      PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced;
+      PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor;
+      void initialize_buffers();
+      void compute_elements();
+      void attrib_buffers(QGLViewer*);
+      void compile_shaders();
+      void draw_sphere(float R, int prec);
+      void draw_cylinder(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals);
+
+private:
+  Ui::MainWindow * ui;
+  P3DT p3dt;
+  Point moving_point;
+
+  QString materials[6];
+  QTimer* timer;
+  GLuint l_triangulation, l_domain;
+
+  bool flying_ball;
+  bool dlocate, dconflict;
+  bool wireframe, in_plane;
+  Iterator_type it_type;
+  Draw_type draw_type;
+  bool ddomain, cube_clipping, two_color_clipping;
+};
+
+#endif // SCENE_H
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene_utils.h b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene_utils.h
new file mode 100644
index 0000000..a56a66a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Scene_utils.h
@@ -0,0 +1,151 @@
+#ifndef SCENE_UTILS_H
+#define SCENE_UTILS_H
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+
+#include <CGAL/point_generators_3.h>
+
+// Making available the Periodic_3_Delaunay_triangulation_3 to be
+// drawn in the Scene.
+typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<EPIC> K;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<K> P3DT;
+
+typedef K::RT NT;
+typedef K::FT FT;
+typedef K::Vector_3 Vector;
+
+typedef P3DT::Cell_handle Cell_handle;
+typedef P3DT::Vertex_handle Vertex_handle;
+typedef P3DT::Vertex_iterator Vertex_iterator;
+typedef P3DT::Facet Facet;
+typedef P3DT::Offset Offset;
+
+typedef P3DT::Point Point;
+typedef P3DT::Segment Segment;
+typedef P3DT::Triangle Triangle;
+typedef P3DT::Tetrahedron Tetrahedron;
+
+typedef P3DT::Periodic_point_iterator Point_iterator;
+typedef P3DT::Periodic_segment_iterator Segment_iterator;
+typedef P3DT::Periodic_triangle_iterator Triangle_iterator;
+typedef P3DT::Periodic_tetrahedron_iterator Tetrahedron_iterator;
+
+typedef P3DT::Iterator_type Iterator_type;
+
+typedef CGAL::Random_points_in_cube_3<Point> RandPts;
+
+// Segment comparison needed by the segment set
+template <class Segment>
+struct Compare_segment {
+  bool operator()(Segment s1, Segment s2) const {
+    if (s1.source() == s2.source()) return (s1.target() < s2.target());
+    return (s1.source() < s2.source());
+  }
+};
+
+// Projected triangle needed by the sorting of the triangles in z
+// direction to draw them transparently. This is used by
+// gl_draw_location and gl_draw_conflict
+class Projected_triangle {
+  double m_z;
+  Triangle m_t;
+public:
+  Projected_triangle() {}
+  Projected_triangle(double z, Triangle tr) : m_z(z), m_t(tr) {}
+  Projected_triangle(const Projected_triangle &pt) : m_z(pt.z()), m_t(pt.t()) {}
+
+  Triangle t() { return m_t; }
+  const Triangle t() const { return m_t; }
+
+  double& z() { return m_z; }
+  double z() const { return m_z; }
+
+  static bool closer(const Projected_triangle& t1, const Projected_triangle& t2) {
+    return t1.z() < t2.z();
+  }
+};
+
+// Segment clipper used to clip segments with the unit cube/square.
+// Implements the Cohen-Sutherland line clipping algorithm
+struct Segment_clipper {
+
+  int cs_outcode(const Point& p) {
+    int outcode = 0;
+    outcode |= (p.x()<0.0 ?  1:0);
+    outcode |= (p.x()>1.0 ?  2:0);
+    outcode |= (p.y()<0.0 ?  4:0);
+    outcode |= (p.y()>1.0 ?  8:0);
+    outcode |= (p.z()<0.0 ? 16:0);
+    outcode |= (p.z()>1.0 ? 32:0);
+    return outcode;
+  }
+
+  bool operator()(Point& p1, Point& p2) {
+      int p1_outcode = cs_outcode(p1);
+      int p2_outcode = cs_outcode(p2);
+      FT x(0),y(0),z(0), t(0);
+      bool accept = false;
+      bool done = false;
+      do {
+        if (p1_outcode == 0 && p2_outcode == 0) { accept = true; done = true; }
+        else if ((p1_outcode & p2_outcode) != 0) { done = true; }
+        else {
+          if (p1_outcode == 0) {
+            std::swap(p1_outcode, p2_outcode);
+            std::swap(p1,p2);
+          }
+          if ((p1_outcode & 1) != 0) {
+            t = (0-p1.x())/(p2.x()-p1.x());
+            x = 0;
+            y =p1.y()+t*(p2.y()-p1.y());
+            z =p1.z()+t*(p2.z()-p1.z());
+          } else {
+            if ((p1_outcode & 2) != 0) {
+              t = (1-p1.x())/(p2.x()-p1.x());
+              x = 1;
+              y =p1.y()+t*(p2.y()-p1.y());
+              z =p1.z()+t*(p2.z()-p1.z());
+            } else {
+              if ((p1_outcode & 4) != 0) {
+                t = (0-p1.y())/(p2.y()-p1.y());
+                x =p1.x()+t*(p2.x()-p1.x());
+                y = 0;
+                z =p1.z()+t*(p2.z()-p1.z());
+              } else {
+                if ((p1_outcode & 8) != 0) {
+                  t = (1-p1.y())/(p2.y()-p1.y());
+                  x =p1.x()+t*(p2.x()-p1.x());
+                  y = 1;
+                  z =p1.z()+t*(p2.z()-p1.z());
+                } else {
+                  if ((p1_outcode & 16) != 0) {
+                    t = (0-p1.z())/(p2.z()-p1.z());
+                    x =p1.x()+t*(p2.x()-p1.x());
+                    y =p1.y()+t*(p2.y()-p1.y());
+                    z = 0;
+                  } else {
+                    if ((p1_outcode & 32) != 0) {
+                      t = (1-p1.z())/(p2.z()-p1.z());
+                      x =p1.x()+t*(p2.x()-p1.x());
+                      y =p1.y()+t*(p2.y()-p1.y());
+                      z = 1;
+                    }
+                  }
+                }
+              }
+            }
+          }
+          p1 = Point(x,y,z);
+          p1_outcode = cs_outcode(p1);
+        }
+      }
+      while (!done);
+    return accept;
+  }
+};
+
+#endif // SCENE_UTILS_H
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.cpp
new file mode 100644
index 0000000..5152187
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.cpp
@@ -0,0 +1,8 @@
+ #include "Viewer.h"
+ #include <CGAL/Qt/CreateOpenGLContext.h>
+
+Viewer::Viewer(QWidget *parent)
+: QGLViewer(CGAL::Qt::createOpenGLContext(),parent)
+{}
+Viewer::~Viewer()
+{}
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.h b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.h
new file mode 100644
index 0000000..9daa798
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/Viewer.h
@@ -0,0 +1,13 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <QGLViewer/qglviewer.h>
+
+class Viewer : public QGLViewer{
+    Q_OBJECT
+
+  public:
+      Viewer(QWidget* parent);
+      virtual ~Viewer();
+};
+#endif //VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/oneH.xyz b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/oneH.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/oneH.xyz
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/oneH.xyz
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/oneK.xyz b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/oneK.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/oneK.xyz
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/oneK.xyz
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/points b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/points
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/data/points
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/data/points
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/images/mainwindow.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/images/mainwindow.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/images/mainwindow.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/images/mainwindow.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/index.html b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/index.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/index.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/index.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/introduction.html b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/introduction.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/introduction.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/introduction.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/menu.html b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/menu.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/documentation/menu.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/documentation/menu.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/ball.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/ball.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/ball.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/ball.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/camera.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/camera.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/camera.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/camera.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/clipping.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/clipping.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/clipping.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/clipping.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/clippingOff.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/clippingOff.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/clippingOff.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/clippingOff.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/conflict.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/conflict.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/conflict.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/conflict.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/cover1.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/cover1.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/cover1.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/cover1.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/cover27.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/cover27.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/cover27.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/cover27.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileOpen.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/fileOpen.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileOpen.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/fileOpen.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/init0.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/init0.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/init0.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/init0.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/init1.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/init1.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/init1.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/init1.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initGrid.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initGrid.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initGrid.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initGrid.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initRand.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initRand.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initRand.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initRand.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initRandPlanar.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initRandPlanar.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/initRandPlanar.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/initRandPlanar.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/inputPointBall.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/inputPointBall.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/inputPointBall.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/inputPointBall.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/inputPointRandom.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/inputPointRandom.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/inputPointRandom.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/inputPointRandom.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/license.txt b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/license.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/license.txt
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/license.txt
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/locate.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/locate.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/locate.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/locate.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/multiple.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/multiple.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/multiple.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/multiple.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/multipleOff.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/multipleOff.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/multipleOff.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/multipleOff.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/pause.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/pause.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/pause.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/pause.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/planar.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/planar.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/planar.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/planar.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/play.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/play.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/play.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/play.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/twoColorClipping.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/twoColorClipping.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/twoColorClipping.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/twoColorClipping.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/wireframe.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/wireframe.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/wireframe.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/wireframe.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/wireframeOff.png b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/wireframeOff.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/wireframeOff.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/icons/wireframeOff.png
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp
new file mode 100644
index 0000000..5e4a5df
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp
@@ -0,0 +1,18 @@
+#include "MainWindow.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+  QApplication a(argc, argv);
+  MainWindow w;
+  //w.ui->setupUi(w);
+  w.ui->viewer->restoreStateFromFile();
+  
+  w.show();
+
+  a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+  a.connect(w.ui->actionExit, SIGNAL(triggered()), &a, SLOT(quit()));
+  
+  return a.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/resources/about.html b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/resources/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/resources/about.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/resources/about.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/resources/about_CGAL.html b/3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/resources/about_CGAL.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/resources/about_CGAL.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_3_triangulation_3/resources/about_CGAL.html
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/CMakeLists.txt
new file mode 100644
index 0000000..a4aa152
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/CMakeLists.txt
@@ -0,0 +1,90 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Periodic_Lloyd_3)
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+include(${CGAL_USE_FILE})
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script Help OpenGL Svg)
+
+find_package(OpenGL)
+
+if(Qt5_FOUND)
+  find_package(QGLViewer)
+endif(Qt5_FOUND)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND TARGET Qt5::qcollectiongenerator )
+
+
+  include_directories (${QGLVIEWER_INCLUDE_DIR})
+  include_directories (BEFORE ../../include ./ )
+
+  # ui file, created wih Qt Designer
+  qt5_wrap_ui( uis MainWindow.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( RESOURCE_FILES ./Periodic_Lloyd_3.qrc )
+
+
+  if(DEFINED QT_QCOLLECTIONGENERATOR_EXECUTABLE)
+  else()
+    set(QT_QCOLLECTIONGENERATOR_EXECUTABLE qcollectiongenerator)
+  endif()
+
+  # generate QtAssistant collection file
+  add_custom_command ( OUTPUT Periodic_Lloyd_3.qhc
+      DEPENDS Periodic_Lloyd_3.qhp Periodic_Lloyd_3.qhcp
+      COMMAND Qt5::qcollectiongenerator
+                ${CMAKE_CURRENT_SOURCE_DIR}/Periodic_Lloyd_3.qhcp
+                -o ${CMAKE_CURRENT_BINARY_DIR}/Periodic_Lloyd_3.qhc
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+  )
+
+  add_executable  ( Periodic_Lloyd_3 Periodic_Lloyd_3.qhc Periodic_Lloyd_3.cpp MainWindow.cpp Viewer.cpp ${uis}  ${RESOURCE_FILES} )
+
+  qt5_use_modules(Periodic_Lloyd_3 Xml Script Help OpenGL Svg)
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_Lloyd_3 )
+
+  target_link_libraries( Periodic_Lloyd_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+  target_link_libraries( Periodic_Lloyd_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} )
+  target_link_libraries( Periodic_Lloyd_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+else( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE )
+
+  set(PERIODIC_LLOYD_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(PERIODIC_LLOYD_MISSING_DEPS "the CGAL Qt5 library, ${PERIODIC_LLOYD_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT Qt5_FOUND)
+    set(PERIODIC_LLOYD_MISSING_DEPS "Qt5, ${PERIODIC_LLOYD_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT OPENGL_FOUND)
+    set(PERIODIC_LLOYD_MISSING_DEPS "OpenGL, ${PERIODIC_LLOYD_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT QGLVIEWER_FOUND)
+    set(PERIODIC_LLOYD_MISSING_DEPS "QGLViewer, ${PERIODIC_LLOYD_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE)
+    set(PERIODIC_LLOYD_MISSING_DEPS "qcollectiongenerator, ${PERIODIC_LLOYD_MISSING_DEPS}")
+  endif()
+
+
+  message(STATUS "NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS}and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.cpp
new file mode 100644
index 0000000..6baee67
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.cpp
@@ -0,0 +1,227 @@
+
+#include "MainWindow.h"
+#include <ctime>
+
+MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent)
+{
+  setupUi(this);
+  this->viewer->setScene(&scene);
+
+  process = new QProcess(this);
+
+  connectActions();
+  this->addAboutDemo(":/cgal/help/about_Periodic_Lloyd_3.html");
+  this->addAboutCGAL();
+
+  scene.eight_copies=false;
+  scene.two_dimensional=false;
+
+  qtimer = new QTimer(this);
+  connect(qtimer, SIGNAL(timeout()), this, SLOT(lloydStep()));
+}
+
+void
+MainWindow::connectActions()
+{
+  QObject::connect(this->actionNew_Point_Set, SIGNAL(triggered()), 
+		   this, SLOT(newPointSet()));
+
+  QObject::connect(this->actionLoad_points, SIGNAL(triggered()), 
+		   this, SLOT(loadPoints()));
+
+  QObject::connect(this->actionSave_points, SIGNAL(triggered()), 
+		   this, SLOT(savePoints()));
+
+  QObject::connect(this->speedSlider, SIGNAL(valueChanged(int)), 
+		   this, SLOT(speedChanged(int)));
+
+  QObject::connect(this->viewer, SIGNAL(valueChanged(int)),
+                   this, SLOT(speedChanged(int)));
+
+  QObject::connect(this, SIGNAL(sceneChanged()), 
+		   this->viewer, SLOT(sceneChanged()));
+  
+  QObject::connect(this->actionStep, SIGNAL(triggered()),
+                   this, SLOT(lloydStep()));
+
+  QObject::connect(this->actionPlay, SIGNAL(toggled(bool)),
+                   this, SLOT(togglePause(bool)));
+
+  QObject::connect(this->actionShow_8_Copies, SIGNAL(toggled(bool)),
+                   this, SLOT(toggle8Copies(bool)));
+
+  QObject::connect(this->action2D_version, SIGNAL(toggled(bool)),
+                   this, SLOT(toggle2D(bool)));
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   qApp, SLOT(quit()));
+
+  QObject::connect(this->actionDemo_Help, SIGNAL(triggered()),
+                   this, SLOT(help()));
+}
+
+void
+MainWindow::togglePause(bool p)
+{
+  if (p) {
+    int speed = (100-(speedSlider->value()))*100;
+    qtimer->start(speed);
+  }
+  else qtimer->stop();
+}
+
+void
+MainWindow::toggle8Copies(bool on)
+{
+  scene.eight_copies = on;
+  emit(sceneChanged());
+}
+
+void
+MainWindow::toggle2D(bool on)
+{
+  scene.two_dimensional = on;
+  if (on) newPointSet();
+  else emit(sceneChanged());
+}
+
+void
+MainWindow::newPointSet()
+{
+  bool ok;
+
+  int numberOfPoints = QInputDialog::getInt(this,
+      "Periodic Lloyd", "Number of points: ", 100, 0, 2147483647, 1, &ok );
+  
+  if (ok) newPoints(numberOfPoints);
+}
+
+void
+MainWindow::loadPoints()
+{
+  QString fileName = QFileDialog
+    ::getOpenFileName(this, tr("Open point set"),
+	".", tr("All files (*)"));
+  if(fileName.isEmpty()) return;
+  
+  std::ifstream ifs(fileName.toLatin1().data() );
+  scene.points.clear();
+  Iso_cuboid_3 dom;
+  ifs >> dom;
+  std::copy(std::istream_iterator<Point_3>(ifs), 
+      std::istream_iterator<Point_3>(),
+      std::back_inserter(scene.points));
+
+  scene.periodic_triangulation.set_domain(dom);
+  scene.periodic_triangulation.insert(scene.points.begin(), scene.points.end());
+
+  FT cx(0),cy(0),cz(0);
+  for (int i=0 ; i<8 ; i++) {
+    cx += dom[i].x();
+    cy += dom[i].y();
+    cy += dom[i].y();
+  }
+  qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
+  viewer->setSceneCenter(center);
+  viewer->setSceneRadius(std::sqrt(
+	  ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
+	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
+	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))));
+
+  speedSlider->setRange(0,100);
+  speedSlider->setSliderPosition(100);
+
+  emit (sceneChanged()); 
+}
+
+void
+MainWindow::savePoints()
+{
+  QString fileName = QFileDialog
+    ::getSaveFileName(this, tr("Save point set"),
+	".", tr("*.pts"));
+  if(fileName.isEmpty()) return;
+  
+  std::ofstream ofs(fileName.toLatin1().data() );
+  ofs << scene.periodic_triangulation.domain() << '\n';
+  for (std::list<Point_3>::iterator pit = scene.points.begin() ;
+       pit != scene.points.end() ; ++pit) ofs << *pit << '\n';
+}
+
+void MainWindow::lloydStep() {
+  scene.lloyd_step();
+  viewer->updateGL();
+  viewer->changed();
+  }
+
+void 
+MainWindow::speedChanged(int i)
+{
+  int speed = (100-i)*100;
+  if (qtimer->isActive()) {
+     qtimer->stop();
+     qtimer->start(speed);
+  }
+}
+
+void
+MainWindow::newPoints(int n)
+{
+  scene.periodic_triangulation.clear();
+  scene.points.clear();
+
+  CGAL::Random rnd(std::time(NULL));
+  CGAL::Random_points_in_cube_3<Point_3, Creator> in_cube(1,rnd);
+
+  for (int i=0 ; i<n ; i++) 
+    if (scene.two_dimensional) {
+      Point_3 rdpt = *in_cube++;
+      scene.points.push_back(Point_3(rdpt.x(),rdpt.y(),0.));
+    } else 
+      scene.points.push_back(*in_cube++);
+
+  Iso_cuboid_3 dom(-1,-1,-1,1,1,1);
+  scene.periodic_triangulation.set_domain(dom);
+  scene.periodic_triangulation.insert(scene.points.begin(), scene.points.end());
+
+  FT cx(0),cy(0),cz(0);
+  for (int i=0 ; i<8 ; i++) {
+    cx += dom[i].x();
+    cy += dom[i].y();
+    cy += dom[i].y();
+  }
+  qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
+  viewer->setSceneCenter(center);
+  viewer->setSceneRadius(std::sqrt(
+	  ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
+	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))
+	  + ((dom.xmax()-dom.xmin())*(dom.xmax()-dom.xmin()))));
+
+  speedSlider->setRange(0,100);
+  speedSlider->setSliderPosition(100);
+
+  emit (sceneChanged()); 
+}
+
+void MainWindow::help() {
+  QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
+    + QDir::separator();
+#if !defined(Q_OS_MAC)
+  app += QString("assistant");
+#else
+  app += QString("Assistant.app/Contents/MacOS/Assistant");
+#endif
+
+  QStringList args;
+  QString help_path = QCoreApplication::applicationDirPath() 
+    + QDir::separator()
+    + QString("./Periodic_Lloyd_3.qhc");
+  args << QString("-collectionFile") << help_path;
+  process->start(app, args);
+  if (!process->waitForStarted()) {
+    QMessageBox::critical(this, tr("Remote Control"),
+      tr("Could not start Qt Assistant from %1.").arg(app));
+  }
+}
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.h b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.h
new file mode 100644
index 0000000..18b8bd1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.h
@@ -0,0 +1,53 @@
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include "ui_MainWindow.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QSlider>
+#include <QTimer>
+#include <QMessageBox>
+
+#include <QtGui>
+#include <QProcess>
+
+class QWidget;
+
+class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
+{
+  Q_OBJECT
+
+public:
+  MainWindow(QWidget* = 0);
+  ~MainWindow() { process->close(); delete(process); }
+
+  void connectActions();
+
+  Scene scene;
+  QTimer * qtimer;
+
+private:
+  QProcess* process;
+
+public slots:
+  void newPoints(int i);
+  void newPointSet();
+  void loadPoints();
+  void savePoints();
+  void speedChanged(int i);
+  void togglePause(bool p);
+  void toggle8Copies(bool on);
+  void toggle2D(bool on);
+  void lloydStep();
+  void help();
+
+  signals:
+  void sceneChanged();
+  void speedChanged();
+};
+
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/MainWindow.ui
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp
new file mode 100644
index 0000000..b2f2b7b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp
@@ -0,0 +1,26 @@
+#include "MainWindow.h"
+#include <QApplication>
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char** argv)
+{
+  QApplication application(argc,argv);
+ 
+  application.setOrganizationDomain("inria.fr");
+  application.setOrganizationName("INRIA");
+  application.setApplicationName("3D Periodic Lloyd");
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  application.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGAL (QT5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Periodic_Lloyd_3);
+
+  MainWindow mw;
+  mw.show();
+
+  return application.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhcp b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhcp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhcp
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhcp
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhp b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhp
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qhp
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Scene.h b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Scene.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/Scene.h
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Scene.h
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.cpp
new file mode 100644
index 0000000..cd59c5d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.cpp
@@ -0,0 +1,319 @@
+#include "Viewer.h"
+#include <vector>
+#include <CGAL/bounding_box.h>
+#include <QGLViewer/vec.h>
+
+
+void
+Viewer::init()
+{
+  initializeOpenGLFunctions();
+  setBackgroundColor(::Qt::white);
+  this->camera()->setSceneBoundingBox(
+      qglviewer::Vec(-1.,-1.,-1.),
+      qglviewer::Vec( 1., 1., 1.));
+  glEnable(GL_LINE_SMOOTH);
+  compile_shaders();
+  are_buffers_initialized = false;
+}
+
+void
+Viewer::sceneChanged()
+{
+  changed();
+  this->showEntireScene();
+}
+
+void
+Viewer::draw()
+{
+    glEnable(GL_DEPTH_TEST);
+  if(!are_buffers_initialized)
+      initialize_buffers();
+  QColor color;
+ //the points
+  ::glEnable(GL_BLEND);
+  ::glEnable(GL_POINT_SMOOTH);
+  ::glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+  ::glEnable(GL_LINE_SMOOTH);
+  ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+  ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  ::glPointSize(5);
+
+  ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+  ::glColor3f(0.2f, 0.2f, 1.f);
+  ::glEnable(GL_POLYGON_OFFSET_FILL);
+  ::glPolygonOffset(3.0f,-3.0f);
+
+
+  attrib_buffers(this);
+  vao[0].bind();
+  color.setRgbF(1.0f, 0.72f, 0.06f);
+  rendering_program.bind();
+  rendering_program.setUniformValue(colorLocation[0], color);
+  glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+  rendering_program.release();
+  vao[0].release();
+
+  //The Lines
+  ::glLineWidth(1.);
+  ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+  ::glColor3ub(0,0,0);
+  ::glDisable(GL_POLYGON_OFFSET_FILL);
+
+  vao[1].bind();
+  color.setRgbF(0.27f, 0.51f, 0.7f);
+  rendering_program.bind();
+  rendering_program.setUniformValue(colorLocation[0], color);
+  glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
+  rendering_program.release();
+  vao[1].release();
+
+  if (scene->eight_copies) {
+      vao[2].bind();
+      color.setRgbF(0.69f, 0.77f, 0.87f);
+      rendering_program.bind();
+      rendering_program.setUniformValue(colorLocation[0], color);
+      glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_8lines2D.size()/3));
+      rendering_program.release();
+      vao[2].release();
+
+
+      if (!scene->two_dimensional) {
+          vao[3].bind();
+          color.setRgbF(0.69f, 0.77f, 0.87f);
+          rendering_program.bind();
+          rendering_program.setUniformValue(colorLocation[0], color);
+          glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_8lines.size()/3));
+          rendering_program.release();
+          vao[3].release();
+      }
+  }
+}
+
+
+Viewer::Vec
+Viewer::next_around_circle(const float& phi, const Vec& pos, const Vec& ori) {
+  Vec cam = pos-ori;
+  Vec cam_norm = cam/cam.norm();
+
+  Vec y(cam_norm.z, 0, -cam_norm.x);
+  Vec y_norm = y/y.norm();
+  
+  Vec new_cam = ori + (cam_norm*cos(phi) + y_norm*sin(phi)) * cam.norm();
+  return new_cam;  
+}
+
+void
+Viewer::render_video()
+{
+  setSnapshotFormat("PNG");
+  for (int alpha=0 ; alpha <= 100 ; alpha++ ) {
+    emit (valueChanged(alpha));
+    std::cout<<alpha<<std::endl;
+    QString alpha_str;
+    alpha_str.setNum(alpha);
+    displayMessage(QString("alpha: ") + alpha_str + QString("%"),10000);
+    
+    for (int fr=0 ; fr < 50 ; fr++) {
+      Vec cam = camera()->position();
+      Vec ori = sceneCenter();
+      Vec new_cam = next_around_circle(0.01f,cam,ori);
+      camera()->setPosition(new_cam);
+      camera()->lookAt(ori);
+      this->showEntireScene();
+      saveSnapshot(true);
+    }
+  }
+}
+
+void Viewer::initialize_buffers()
+{
+    rendering_program.bind();
+
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(pos_points.data(), static_cast<int>(pos_points.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[0].release();
+
+    vao[0].release();
+
+    vao[1].bind();
+    buffers[1].bind();
+    buffers[1].allocate(pos_lines.data(), static_cast<int>(pos_lines.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[1].release();
+    vao[1].release();
+
+    vao[2].bind();
+    buffers[2].bind();
+    buffers[2].allocate(pos_8lines2D.data(), static_cast<int>(pos_8lines2D.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[2].release();
+    vao[2].release();
+
+    vao[3].bind();
+    buffers[3].bind();
+    buffers[3].allocate(pos_8lines.data(), static_cast<int>(pos_8lines.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    buffers[3].release();
+    vao[3].release();
+    rendering_program.release();
+    are_buffers_initialized = true;
+}
+
+void Viewer::compute_elements()
+{
+    //::glColor3f(1.0f, 0.72f, 0.06f);
+    pos_points.resize(0);
+    pos_lines.resize(0);
+    pos_8lines.resize(0);
+    pos_8lines2D.resize(0);
+
+    for(Periodic_point_iterator ppit
+      = scene->periodic_triangulation.periodic_points_begin(
+          P3DT3::UNIQUE) ;
+        ppit != scene->periodic_triangulation.periodic_points_end(P3DT3::UNIQUE);
+        ++ppit){
+      Point_3 p(scene->periodic_triangulation.point(*ppit));
+      pos_points.push_back(p.x()); pos_points.push_back(p.y()); pos_points.push_back(p.z());
+    }
+
+    //::glColor3f(0.27f, 0.51f, 0.7f);
+    for (Periodic_triangle_iterator ptit
+       = scene->periodic_triangulation.periodic_triangles_begin(
+           P3DT3::UNIQUE);
+         ptit != scene->periodic_triangulation.periodic_triangles_end(
+         P3DT3::UNIQUE);
+        ++ptit) {
+      for (int i=0 ; i<4 ; i++) {
+        Segment_3 dual = scene->periodic_triangulation.segment(
+        scene->periodic_triangulation.dual(*(ptit.get_facet())));
+
+        FT sz = dual.source().z();
+        FT tz = dual.target().z();
+
+        if (scene->two_dimensional && ((sz-tz > 0.5) || (sz-tz < -0.5))) continue;
+
+        if (scene->two_dimensional) { sz = 0.; tz = 0.; }
+        FT sx = dual.source().x();
+        FT tx = dual.target().x();
+        FT sy = dual.source().y();
+        FT ty = dual.target().y();
+        pos_lines.push_back(sx); pos_lines.push_back(sy); pos_lines.push_back(sz);
+        pos_lines.push_back(tx); pos_lines.push_back(ty); pos_lines.push_back(tz);
+        Iso_cuboid_3 d = scene->periodic_triangulation.domain();
+
+        pos_8lines2D.push_back(sx+0.); pos_8lines2D.push_back(sy+d.ymax()-d.ymin()); pos_8lines2D.push_back(sz+0.);
+        pos_8lines2D.push_back(tx+0.); pos_8lines2D.push_back(ty+d.ymax()-d.ymin()); pos_8lines2D.push_back(tz+0.);
+        pos_8lines2D.push_back(sx+d.xmax()-d.xmin()); pos_8lines2D.push_back(sy+0.); pos_8lines2D.push_back(sz+0.);
+        pos_8lines2D.push_back(tx+d.xmax()-d.xmin()); pos_8lines2D.push_back(ty+0.); pos_8lines2D.push_back(tz+0.);
+        pos_8lines2D.push_back(sx+d.xmax()-d.xmin()); pos_8lines2D.push_back(sy+d.ymax()-d.ymin()); pos_8lines2D.push_back(sz+0.);
+        pos_8lines2D.push_back(tx+d.xmax()-d.xmin()); pos_8lines2D.push_back(ty+d.ymax()-d.ymin()); pos_8lines2D.push_back(tz+0.);
+
+        pos_8lines.push_back(sx+0.); pos_8lines.push_back(sy+0.); pos_8lines.push_back(sz+d.zmax()-d.zmin());
+        pos_8lines.push_back(tx+0.); pos_8lines.push_back(ty+0.); pos_8lines.push_back(tz+d.zmax()-d.zmin());
+        pos_8lines.push_back(sx+0.); pos_8lines.push_back(sy+d.ymax()-d.ymin()); pos_8lines.push_back(sz+d.zmax()-d.zmin());
+        pos_8lines.push_back(tx+0.); pos_8lines.push_back(ty+d.ymax()-d.ymin()); pos_8lines.push_back(tz+d.zmax()-d.zmin());
+        pos_8lines.push_back(sx+d.xmax()-d.xmin()); pos_8lines.push_back(sy+0.); pos_8lines.push_back(sz+d.zmax()-d.zmin());
+        pos_8lines.push_back(tx+d.xmax()-d.xmin()); pos_8lines.push_back(ty+0.); pos_8lines.push_back(tz+d.zmax()-d.zmin());
+        pos_8lines.push_back(sx+d.xmax()-d.xmin()); pos_8lines.push_back(sy+d.ymax()-d.ymin()); pos_8lines.push_back(sz+d.zmax()-d.zmin());
+        pos_8lines.push_back(tx+d.xmax()-d.xmin()); pos_8lines.push_back(ty+d.ymax()-d.ymin()); pos_8lines.push_back(tz+d.zmax()-d.zmin());
+      }
+
+    }
+}
+
+void Viewer::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+
+    rendering_program.release();
+}
+
+void Viewer::compile_shaders()
+{
+    if(! buffers[0].create() || !buffers[1].create() || !buffers[2].create() || !buffers[3].create())
+    {
+        std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() || !vao[2].create() || !vao[3].create())
+    {
+        std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform highp vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+
+}
+
+void Viewer::changed()
+{
+    compute_elements();
+    are_buffers_initialized = false;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.h b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.h
new file mode 100644
index 0000000..c03df5c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/Viewer.h
@@ -0,0 +1,79 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include "Scene.h"
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+
+class Viewer : public QGLViewer, QOpenGLFunctions_2_1 {
+
+  typedef qglviewer::Vec Vec;
+
+  Q_OBJECT
+
+  CGAL::Timer timer;
+  Scene* scene;
+
+  int nr_of_facets;
+public:
+  Viewer(QWidget* parent)
+    : QGLViewer(CGAL::Qt::createOpenGLContext(), parent)
+  {}
+  ~Viewer()
+  {
+   for(int i=0; i<4; i++)
+   {
+    buffers[i].destroy();
+    vao[i].destroy();
+   }
+  }
+
+  void setScene(Scene* scene_)
+  {
+    scene = scene_;
+  }
+
+  void init();
+  void clear();
+
+public:
+  void draw();
+
+
+public slots :
+  void changed();
+  void sceneChanged();
+  void render_video();
+  
+signals:
+  void valueChanged(int i);
+
+private:
+  Vec next_around_circle(const float& phi, const Vec& pos, const Vec& ori);
+
+      int vertexLocation[3];
+      int mvpLocation[3];
+      int colorLocation[3];
+
+      bool are_buffers_initialized;
+      std::vector<float> pos_points;
+      std::vector<float> pos_lines;
+      std::vector<float> pos_8lines2D;
+      std::vector<float> pos_8lines;
+
+
+      QOpenGLBuffer buffers[4];
+      QOpenGLVertexArrayObject vao[4];
+      QOpenGLShaderProgram rendering_program;
+      void initialize_buffers();
+      void compute_elements();
+      void attrib_buffers(QGLViewer*);
+      void compile_shaders();
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/about_CGAL.html b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/about_CGAL.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/about_CGAL.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/about_CGAL.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/images/mainwindow.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/images/mainwindow.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/images/mainwindow.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/images/mainwindow.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/index.html b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/index.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/index.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/index.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/introduction.html b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/introduction.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/introduction.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/introduction.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/menu.html b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/menu.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/documentation/menu.html
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/documentation/menu.html
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/cp8.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/cp8.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/cp8.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/cp8.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/fileNew.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileNew.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/fileNew.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileNew.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/fileOpen.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileOpen.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/fileOpen.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileOpen.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/fileSave.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileSave.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/fileSave.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/fileSave.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/pause.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/pause.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/pause.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/pause.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/planar.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/planar.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/planar.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/planar.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/play.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/play.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/play.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/play.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/step.png b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/step.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/step.png
rename to 3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/icons/step.png
diff --git a/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/typedefs.h b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/typedefs.h
new file mode 100644
index 0000000..9518f6d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Periodic_Lloyd_3/typedefs.h
@@ -0,0 +1,69 @@
+#ifndef TYPEDEFS_H
+#define TYPEDEFS_H
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Random.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Timer.h>
+
+#include <cstdio>
+#include <cstring>
+#include <iostream>
+#include <fstream>
+#include <vector>
+
+#include <fstream>
+#include <list>
+#include <cassert>
+
+
+typedef double coord_type;
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<EPIC> K;
+
+typedef K::FT         FT;
+typedef K::Point_3    Point_3;
+typedef K::Vector_3   Vector_3;
+typedef K::Segment_3  Segment_3;
+typedef K::Ray_3      Ray_3;
+typedef K::Line_3     Line;
+typedef K::Triangle_3 Triangle_3;
+typedef K::Iso_cuboid_3 Iso_cuboid_3;
+typedef K::Tetrahedron_3 Tetrahedron_3;
+
+typedef CGAL::Creator_uniform_3<double,Point_3> Creator;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<K> P3DT3;
+
+typedef P3DT3::Cell  Cell;
+typedef P3DT3::Vertex Vertex;
+typedef P3DT3::Edge Edge;
+typedef P3DT3::Facet Facet;
+typedef P3DT3::Cell_handle  Cell_handle;
+typedef P3DT3::Vertex_handle Vertex_handle;
+
+typedef P3DT3::Cell_circulator  Cell_circulator;
+
+typedef P3DT3::Locate_type Locate_type;
+
+typedef P3DT3::Cell_iterator  Cell_iterator;
+typedef P3DT3::Vertex_iterator  Vertex_iterator;
+typedef P3DT3::Edge_iterator  Edge_iterator;
+typedef P3DT3::Facet_iterator Facet_iterator;
+
+typedef P3DT3::Periodic_point_iterator Periodic_point_iterator;
+typedef P3DT3::Periodic_triangle_iterator Periodic_triangle_iterator;
+
+typedef P3DT3::Periodic_tetrahedron_iterator Periodic_tetrahedron_iterator;
+
+typedef CGAL::Triangulation_2<EPIC> T2;
+typedef EPIC::Point_2 Point_2;
+typedef EPIC::Triangle_2 Triangle_2;
+
+typedef CGAL::Timer Timer;
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polygon/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polygon/CMakeLists.txt
new file mode 100644
index 0000000..bfe8288
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polygon/CMakeLists.txt
@@ -0,0 +1,59 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (GraphicsView)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5 Core)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+
+  if( CGAL_Core_FOUND)
+    add_definitions(-DCGAL_USE_CORE)
+  endif()
+
+  #--------------------------------
+  # Demo: Polygon_2
+  #--------------------------------
+  # UI files (Qt Designer files)
+  qt5_wrap_ui( DT_UI_FILES Polygon_2.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( DT_RESOURCE_FILES ./Polygon_2.qrc )
+
+  # use the Qt MOC preprocessor on classes that derives from QObject
+  qt5_generate_moc( Polygon_2.cpp "${CMAKE_CURRENT_BINARY_DIR}/Polygon_2.moc" )
+
+#  add_library( CGAL SHARED IMPORTED ) 
+#  SET_PROPERTY(TARGET CGAL PROPERTY IMPORTED_LOCATION ${CGAL_LIBRARY} )
+
+  # The executable itself.
+  add_executable  ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+  qt5_use_modules(Polygon_2 Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polygon_2 )
+
+
+  # Link with Qt libraries
+  target_link_libraries( Polygon_2 ${QT_LIBRARIES} )
+  # And with CGAL libraries
+  target_link_libraries( Polygon_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.cpp b/3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.cpp
new file mode 100644
index 0000000..06a938d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.cpp
@@ -0,0 +1,582 @@
+#include <fstream>
+#include<boost/shared_ptr.hpp>
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/partition_2.h>
+#include <CGAL/Partition_traits_2.h>
+#include<CGAL/create_straight_skeleton_2.h>
+#include<CGAL/create_offset_polygons_2.h>
+#include <CGAL/linear_least_squares_fitting_2.h>
+#include <CGAL/extremal_polygon_2.h>
+#include <CGAL/minkowski_sum_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QGraphicsLineItem>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/PolygonGraphicsItem.h>
+#include <CGAL/Qt/PolygonWithHolesGraphicsItem.h>
+#include <CGAL/Qt/LineGraphicsItem.h>
+  
+// the two base classes
+#include "ui_Polygon_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Line_2 Line_2;
+
+typedef CGAL::Polygon_2<K,std::list< Point_2 > > Polygon2; // it must be a list for the partition
+typedef CGAL::Polygon_with_holes_2<K,std::list< Point_2 > > Polygon_with_holes_2;
+
+typedef CGAL::Straight_skeleton_2<K> Ss ;
+
+typedef boost::shared_ptr<Ss> SsPtr ;
+
+typedef boost::shared_ptr<Polygon2> PolygonPtr ;
+
+typedef std::vector<PolygonPtr> PolygonPtr_vector ;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Polygon_2
+{
+  Q_OBJECT
+  
+private:
+
+  enum PartitionAlgorithm {YMonotone, ApproximateConvex, OptimalConvex} ;
+
+
+  CGAL::Qt::Converter<K> convert;
+  Polygon2 poly, kgon; 
+  Polygon_with_holes_2 selfmink;
+  QGraphicsScene scene;  
+
+  CGAL::Qt::PolygonGraphicsItem<Polygon2> * pgi;
+
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+  CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes_2> * minkgi;
+
+  std::list<Polygon2> partitionPolygons;
+  std::list<CGAL::Qt::PolygonGraphicsItem<Polygon2>* >  partitionGraphicsItems;
+  std::list<QGraphicsLineItem* >  skeletonGraphicsItems;
+  std::list<QGraphicsLineItem* >  offsetGraphicsItems;
+  CGAL::Qt::LineGraphicsItem<K>* lgi;
+
+  CGAL::Qt::PolygonGraphicsItem<Polygon2> * kgongi;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionClear_triggered();
+
+  void on_actionLoadPolygon_triggered();
+  void on_actionSavePolygon_triggered();
+
+  void on_actionSelfMinkowskiSum_triggered();
+  void on_actionRecenter_triggered();
+  void on_actionMaximumAreaKGon_triggered();
+  void on_actionInnerSkeleton_triggered();
+  void on_actionOuterOffset_triggered();
+  void on_actionLinearLeastSquaresFitting_triggered();
+  void on_actionLinearLeastSquaresFittingOfSegments_triggered();
+  void on_actionCreateInputPolygon_toggled(bool);
+
+  void on_actionYMonotonePartition_triggered();
+  void on_actionApproximateConvexPartition_triggered();
+  void on_actionOptimalConvexPartition_triggered();
+  void partition(PartitionAlgorithm);
+
+  void clearPartition();
+  void clearMinkowski();
+  void clearSkeleton();
+  void clearOffset();
+  void clear();
+
+  virtual void open(QString);
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  minkgi = 0;
+  // Add a GraphicItem for the Polygon2
+  pgi = new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&poly);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pgi, SLOT(modelChanged()));
+
+  scene.addItem(pgi);
+
+  kgongi =  new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&kgon);
+  kgongi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  kgongi->hide();
+  scene.addItem(kgongi);
+  
+  
+  lgi = new CGAL::Qt::LineGraphicsItem<K>();
+  lgi->setPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  lgi->hide();
+  scene.addItem(lgi);
+  assert(lgi->scene() == &scene);
+  // Setup input handlers. They get events before the scene gets them
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true);
+
+  this->actionCreateInputPolygon->setChecked(true);
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+ 
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Uncomment the following line to get antialiasing by default.
+//   actionUse_Antialiasing->setChecked(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Polygon_2.html");
+  this->addAboutCGAL();
+  this->setupExportSVG(action_Export_SVG, graphicsView);
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  this->actionCreateInputPolygon->setChecked(false);
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o)){
+    if((points.size() == 1)&& poly.size()>0){
+    
+    } else {
+      poly.clear();
+      if(points.front() == points.back()){
+	points.pop_back();
+      }
+      poly.insert(poly.vertices_begin(), points.begin(), points.end());
+    }
+    Q_EMIT( changed());
+  }
+}
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  poly.clear();
+  clear();
+  this->actionCreateInputPolygon->setChecked(true);
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPolygon_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Polygon File"),
+						  ".",
+						  tr( "Any file (*.*)"));
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+void
+MainWindow::open(QString fileName)
+{
+  this->actionCreateInputPolygon->setChecked(false);
+  std::ifstream ifs(qPrintable(fileName));
+  poly.clear();
+  ifs >> poly;
+  clear();
+
+  this->addToRecentFiles(fileName);
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionSavePolygon_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save Polygon"),
+						  ".",
+						  tr("Any files (*.*)"));
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    ofs << poly;
+  }
+}
+
+
+void
+MainWindow::on_actionCreateInputPolygon_toggled(bool checked)
+{
+  poly.clear();
+  clear();
+  if(checked){
+    scene.installEventFilter(pi);
+  } else {
+    scene.removeEventFilter(pi);
+  }
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(pgi->boundingRect());
+  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+void
+MainWindow::on_actionSelfMinkowskiSum_triggered()
+{
+  if(poly.size()>0){
+    if(! poly.is_simple()){
+      return;
+    }
+
+    selfmink = minkowski_sum_2 (poly, poly);
+    
+    minkgi = new CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes_2>(&selfmink);
+    
+    minkgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+    scene.addItem(minkgi);
+    minkgi->setEdgesPen(QPen(Qt::darkRed, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  }
+}
+
+
+
+
+void
+MainWindow::on_actionInnerSkeleton_triggered()
+{
+  if(poly.size()>0){
+    if(! poly.is_simple()){
+      return;
+    }
+    clear();
+    if(! poly.is_counterclockwise_oriented()){
+      poly.reverse_orientation();
+    }
+    SsPtr iss = CGAL::create_interior_straight_skeleton_2(poly.vertices_begin(), poly.vertices_end());
+
+    CGAL::Straight_skeleton_2<K> const& ss = *iss;
+
+    typedef Ss::Vertex_const_handle     Vertex_const_handle ;
+    typedef Ss::Halfedge_const_handle   Halfedge_const_handle ;
+    typedef Ss::Halfedge_const_iterator Halfedge_const_iterator ;
+  
+    Halfedge_const_handle null_halfedge ;
+    Vertex_const_handle   null_vertex ;
+
+    for ( Halfedge_const_iterator i = ss.halfedges_begin(); i != ss.halfedges_end(); ++i )
+      {
+	if ( i->is_bisector() ){
+	  Segment_2 s(i->opposite()->vertex()->point(), i->vertex()->point());
+	  skeletonGraphicsItems.push_back(new QGraphicsLineItem(convert(s)));
+	  scene.addItem(skeletonGraphicsItems.back());
+	  skeletonGraphicsItems.back()->setPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+	}
+      }
+      
+  }
+
+}
+
+void
+MainWindow::on_actionOuterOffset_triggered()
+{
+  if(poly.size()>0 && poly.is_simple())
+  {
+    clear();
+    
+    if(! poly.is_counterclockwise_oriented())
+      poly.reverse_orientation();
+    
+    double w = poly.bbox().xmax() - poly.bbox().xmin() ;
+    double h = poly.bbox().ymax() - poly.bbox().ymin() ;
+    double s = (std::max)(w,h);
+    double def_offset = s * 0.05 ;
+    
+    bool ok;
+    const double off = QInputDialog::getDouble( this
+                                              , tr("Offset distance")
+                                              , tr("Offset distance:")
+                                              , def_offset
+                                              , 0.0
+                                              , s
+                                              , 2
+                                              , &ok
+                                              );  
+    if ( ok )
+    {
+      PolygonPtr_vector lContours = create_exterior_skeleton_and_offset_polygons_2(off,poly) ;
+      
+      PolygonPtr_vector::const_iterator frame ;
+      
+      double max_area = 0.0 ;
+      
+      for( PolygonPtr_vector::const_iterator cit = lContours.begin(); cit != lContours.end(); ++ cit )
+      {
+        double area = (*cit)->area();
+        if ( area > max_area )
+        {
+          max_area = area ;
+          frame = cit ;
+        }
+      }
+      
+      for( PolygonPtr_vector::const_iterator cit = lContours.begin(); cit != lContours.end(); ++ cit )
+      {
+        if ( cit != frame )
+        {
+          Polygon2 const& lContour = **cit ;
+          lContour.area();
+          for ( Polygon2::Edge_const_iterator eit = lContour.edges_begin(); eit != lContour.edges_end(); ++ eit )
+          {
+            Segment_2 s(eit->source(), eit->target());
+            offsetGraphicsItems.push_back(new QGraphicsLineItem(convert(s)));
+            scene.addItem(offsetGraphicsItems.back());
+            offsetGraphicsItems.back()->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+          } 
+        }
+      }
+    }
+  }  
+}
+
+void
+MainWindow::on_actionMaximumAreaKGon_triggered()
+{
+  if( (poly.size()>2) && poly.is_convex()){
+    clear();
+    
+    kgon.clear();
+    std::vector<Point_2> points(poly.vertices_begin(),
+                                poly.vertices_end());
+    CGAL::maximum_area_inscribed_k_gon_2(points.begin(),
+                                         points.end(),
+					 3,
+                                         std::back_inserter(kgon));
+  
+    kgongi->modelChanged();
+    kgongi->show();
+  } else {
+    std::cout << "The polygon must be convex" << std::endl;
+  }
+}
+
+void
+MainWindow::on_actionLinearLeastSquaresFitting_triggered()
+{
+  if(poly.size()>2){
+    clear();
+    
+    Line_2 line;
+    CGAL::linear_least_squares_fitting_2(poly.vertices_begin(),
+					 poly.vertices_end(),
+					 line,
+					 CGAL::Dimension_tag<0>());
+  
+    lgi->setLine(line);
+    lgi->show();
+  }
+}
+
+void
+MainWindow::on_actionLinearLeastSquaresFittingOfSegments_triggered()
+{
+  if(poly.size()>2){
+    clear();
+    
+    Line_2 line;
+    CGAL::linear_least_squares_fitting_2(poly.edges_begin(),
+					 poly.edges_end(),
+					 line,
+					 CGAL::Dimension_tag<1>());
+
+
+    lgi->setLine(line);
+    lgi->show();
+  }
+}
+
+void
+MainWindow::on_actionYMonotonePartition_triggered()
+{
+  partition(YMonotone);
+}
+
+
+void
+MainWindow::on_actionOptimalConvexPartition_triggered()
+{
+  partition(OptimalConvex);
+}
+
+
+void
+MainWindow::on_actionApproximateConvexPartition_triggered()
+{
+  partition(ApproximateConvex);
+}
+
+
+void 
+MainWindow::partition(PartitionAlgorithm pa)
+{
+  if(poly.size()>0){
+    clear();
+    if(! poly.is_counterclockwise_oriented()){
+      poly.reverse_orientation();
+    }
+    switch (pa) {
+    case YMonotone :
+      CGAL::y_monotone_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
+      break;
+    case ApproximateConvex:
+      CGAL::approx_convex_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
+      break;
+    default:
+      CGAL::optimal_convex_partition_2(poly.vertices_begin(), poly.vertices_end(), std::back_inserter(partitionPolygons));
+      break;
+    }
+    for(std::list<Polygon2>::iterator it = partitionPolygons.begin();
+	it != partitionPolygons.end();
+	++it){
+      partitionGraphicsItems.push_back(new CGAL::Qt::PolygonGraphicsItem<Polygon2>(&(*it)));
+      scene.addItem(partitionGraphicsItems.back());
+      partitionGraphicsItems.back()->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+    }
+  }
+}
+
+void
+MainWindow::clearPartition()
+{
+  partitionPolygons.clear();
+  for(std::list<CGAL::Qt::PolygonGraphicsItem<Polygon2>* >::iterator it = partitionGraphicsItems.begin();
+      it != partitionGraphicsItems.end();
+      ++it){
+    scene.removeItem(*it);
+  }
+  partitionGraphicsItems.clear();
+}
+
+void
+MainWindow::clearMinkowski()
+{
+  if(minkgi != 0){
+    scene.removeItem(minkgi);
+    delete minkgi;
+    minkgi = 0;
+  }
+}
+
+void
+MainWindow::clearSkeleton()
+{ for(std::list<QGraphicsLineItem* >::iterator it = skeletonGraphicsItems.begin();
+      it != skeletonGraphicsItems.end();
+      ++it){
+    scene.removeItem(*it);
+  }
+  skeletonGraphicsItems.clear();
+}
+
+void
+MainWindow::clearOffset()
+{ for(std::list<QGraphicsLineItem* >::iterator it = offsetGraphicsItems.begin();
+      it != offsetGraphicsItems.end();
+      ++it){
+    scene.removeItem(*it);
+  }
+  offsetGraphicsItems.clear();
+}
+
+void
+MainWindow::clear()
+{
+  clearPartition();
+  clearMinkowski();
+  clearSkeleton();
+  clearOffset();
+  lgi->hide();
+  kgongi->hide();
+}
+
+
+#include "Polygon_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Polygon_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Polygon_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.qrc b/3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.ui b/3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polygon/Polygon_2.ui
rename to 3rdparty/CGAL-4.8/demo/Polygon/Polygon_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/about_Polygon_2.html b/3rdparty/CGAL-4.8/demo/Polygon/about_Polygon_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polygon/about_Polygon_2.html
rename to 3rdparty/CGAL-4.8/demo/Polygon/about_Polygon_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/unweighted_polygon.poly b/3rdparty/CGAL-4.8/demo/Polygon/unweighted_polygon.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polygon/unweighted_polygon.poly
rename to 3rdparty/CGAL-4.8/demo/Polygon/unweighted_polygon.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polygon/weighted_polygon.wsl b/3rdparty/CGAL-4.8/demo/Polygon/weighted_polygon.wsl
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polygon/weighted_polygon.wsl
rename to 3rdparty/CGAL-4.8/demo/Polygon/weighted_polygon.wsl
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/C2t3_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/C2t3_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/C2t3_type.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/C2t3_type.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/C3t3_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/C3t3_type.h
new file mode 100644
index 0000000..735d1f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/C3t3_type.h
@@ -0,0 +1,79 @@
+#ifndef CGAL_DEMO_MESH_3_C3T3_TYPE_H
+#define CGAL_DEMO_MESH_3_C3T3_TYPE_H
+
+// include this to get #define BOOST_PARAMETER_MAX_ARITY 12
+// as otherwise it gets set via inclusion of Polyhedron_3.h
+#include <CGAL/Mesh_3/global_parameters.h>
+
+#include "Polyhedron_type.h"
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+#include "Image_type.h"
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/Mesh_domain_with_polyline_features_3.h>
+#include "Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h"
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h"
+#endif
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+
+#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
+#include <CGAL/Polyhedral_mesh_domain_3.h>
+#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
+#include <CGAL/Mesh_domain_with_polyline_features_3.h>
+
+#include <CGAL/tags.h>
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+template <typename K>
+struct Wrapper
+{
+  typedef int return_type;
+  typedef typename K::Point_3 Point_3;
+  
+  Wrapper(const Implicit_function_interface& f) : f_(f) {}
+  return_type operator()(const Point_3& p, const bool=true) const
+  {
+    return (f_(p.x(),p.y(),p.z()) < 0) ? 1 : 0;
+  }
+  
+private:
+  const Implicit_function_interface& f_;
+};
+#endif
+
+typedef CGAL::Triangle_accessor_3<Polyhedron, Kernel> T_accessor;
+
+typedef CGAL::Polyhedral_mesh_domain_with_features_3<
+          Kernel, Polyhedron, T_accessor, CGAL::Tag_true> Polyhedral_mesh_domain;
+// The last `Tag_true` says the Patch_id type will be int, and not pair<int, int>
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+typedef CGAL::Labeled_image_mesh_domain_3<Image,Kernel>           Image_domain1;
+typedef CGAL::Polyhedron_demo_labeled_mesh_domain_3<Image_domain1> Image_domain;
+typedef CGAL::Mesh_domain_with_polyline_features_3<Image_domain> Image_mesh_domain;
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+typedef Wrapper<Kernel>                                              Function_wrapper;
+typedef CGAL::Labeled_mesh_domain_3<Function_wrapper, Kernel>        Function_domain;
+typedef CGAL::Polyhedron_demo_labeled_mesh_domain_3<Function_domain> Function_mesh_domain;
+#endif
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain, 
+                                     CGAL::Kernel_traits<Polyhedral_mesh_domain>::Kernel,
+                                     CGAL::Parallel_tag>::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Polyhedral_mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+typedef Tr::Geom_traits Geom_traits;
+
+// 3D complex
+
+#endif // CGAL_DEMO_MESH_3_C3T3_TYPE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_polyhedron_demoConfig.cmake.in b/3rdparty/CGAL-4.8/demo/Polyhedron/CGAL_polyhedron_demoConfig.cmake.in
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/CGAL_polyhedron_demoConfig.cmake.in
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/CGAL_polyhedron_demoConfig.cmake.in
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/CMakeLists.txt
new file mode 100644
index 0000000..266bcd4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/CMakeLists.txt
@@ -0,0 +1,382 @@
+# This is the CMake script for compiling the CGAL Polyhedron demo.
+
+project( Polyhedron )
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Compatibility with CMake 3.0
+if(POLICY CMP0042)
+  # Do not enable the use of MACOSX_RPATH
+  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
+  cmake_policy(SET CMP0042 OLD)
+endif()
+
+#Defines flags to emulate windows behavior for linking error generation
+if(CMAKE_CXX_COMPILER_ID EQUAL Clang OR CMAKE_COMPILER_IS_GNUCC  OR CMAKE_COMPILER_IS_GNUCXX)
+  if(UNIX OR APPLE)
+    SET( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fvisibility=hidden" )
+  endif()
+  if(UNIX AND NOT APPLE)
+    SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -z defs")
+    SET( CMAKE_MODULE_LINKER_FLAGS  "${CMAKE_MODULE_LINKER_FLAGS} -z defs")
+    SET( CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} -z defs")
+  endif()
+endif()
+# Let plugins be compiled in the same directory as the executable.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+# Include this package's headers first
+include_directories( BEFORE ./ ./include ../../include ./CGAL_demo )
+list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}")
+
+add_subdirectory( implicit_functions )
+
+# Find CGAL
+
+option( POLYHEDRON_QTSCRIPT_DEBUGGER 
+  "Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF)
+
+# Find Qt5 itself
+find_package(CGAL COMPONENTS Qt5 ImageIO)
+include( ${CGAL_USE_FILE} )
+
+find_package(Qt5
+             QUIET
+             COMPONENTS            OpenGL Script Svg Xml
+             OPTIONAL_COMPONENTS   ScriptTools)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find QGLViewer
+if(Qt5_FOUND)
+
+  add_definitions(-DQT_NO_KEYWORDS)
+  add_definitions(-DSCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE)
+  find_package(QGLViewer )
+
+endif(Qt5_FOUND)
+
+find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater)
+if (EIGEN3_FOUND)
+  include( ${EIGEN3_USE_FILE} )
+endif(EIGEN3_FOUND)
+
+# Activate concurrency?
+option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY
+  "Enable concurrency"
+  ON)
+
+if( POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY )
+  find_package( TBB )
+  if( TBB_FOUND )
+    include( ${TBB_USE_FILE} )
+    list( APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES} )
+  else()
+    message( STATUS "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked." )
+  endif()
+endif()
+
+
+# Activate concurrency ? (turned OFF by default)
+option(ACTIVATE_CONCURRENT_MESH_3
+  "Activate parallelism in Mesh_3"
+  OFF)
+
+# And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
+if( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
+  add_definitions( -DCGAL_CONCURRENT_MESH_3 )
+  if(NOT TBB_FOUND)
+    find_package( TBB REQUIRED )
+    if( TBB_FOUND )
+      include(${TBB_USE_FILE})
+      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
+    else()
+      message(STATUS "NOTICE: Intel TBB was not found. Mesh_3 is faster if TBB is linked.")
+    endif()
+  endif()
+
+else( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
+  option( LINK_WITH_TBB
+    "Link with TBB anyway so we can use TBB timers for profiling"
+    ON)
+  if( LINK_WITH_TBB )
+    find_package( TBB )
+  endif( LINK_WITH_TBB )
+endif()
+
+
+
+
+if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  set(Boost_USE_MULTITHREADED      ON)
+  find_package(Boost COMPONENTS thread system)
+
+  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
+  qt5_wrap_ui( MainWindowUI_files MainWindow.ui)
+  qt5_wrap_ui( statisticsUI_FILES Statistics_on_item_dialog.ui)
+  qt5_wrap_ui( FileLoaderDialogUI_files FileLoaderDialog.ui )
+  qt5_wrap_ui( Show_point_dialogUI_FILES Show_point_dialog.ui )
+  qt5_wrap_ui( PreferencesUI_FILES   Preferences.ui )
+  qt5_wrap_ui( Show_point_dialogUI_FILES Show_point_dialog.ui )
+  qt5_generate_moc( "File_loader_dialog.h" "${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp" )
+  add_file_dependencies( File_loader_dialog_moc_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/File_loader_dialog.h" )
+
+  qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
+  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
+
+  include( ${CMAKE_CURRENT_SOURCE_DIR}/polyhedron_demo_macros.cmake )
+
+
+  qt5_add_resources ( RESOURCE_FILES Polyhedron_3.qrc )
+  qt5_add_resources(gl_splat_rc GlSplat/glsplat.qrc)
+  add_library(gl_splat SHARED
+      GlSplat/GlSplat.cpp GlSplat/Shader.cpp ${gl_splat_rc})
+  qt5_use_modules(gl_splat OpenGL Gui Xml)
+
+  find_path(CGAL_THREE_VIEWER_INTERFACE_H_PATH
+    NAME CGAL/Three/Viewer_interface.h
+    PATHS ${CGAL_INCLUDE_DIRS}
+    NO_DEFAULT_PATH
+    DOC "Path to CGAL/Three/Viewer_interface.h")
+  hide_variable(CGAL_THREE_VIEWER_INTERFACE_H_PATH)
+  if(CGAL_THREE_VIEWER_INTERFACE_H_PATH)
+    qt5_generate_moc( "${CGAL_THREE_VIEWER_INTERFACE_H_PATH}/CGAL/Three/Viewer_interface.h"
+      "${CMAKE_CURRENT_BINARY_DIR}/Viewer_interface_moc.cpp" )
+  else()
+    message(FATAL_ERROR "Cannot find <CGAL/Three/Viewer_interface.h>")
+  endif()
+
+  find_path(CGAL_THREE_SCENE_ITEM_H_PATH
+    NAME CGAL/Three/Scene_item.h
+    PATHS ${CGAL_INCLUDE_DIRS}
+    NO_DEFAULT_PATH
+    DOC "Path to CGAL/Three/Scene_item.h")
+  hide_variable(CGAL_THREE_SCENE_ITEM_H_PATH)
+
+  find_path(CGAL_THREE_SCENE_GROUP_ITEM_H_PATH
+    NAME CGAL/Three/Scene_group_item.h
+    PATHS ${CGAL_INCLUDE_DIRS}
+    NO_DEFAULT_PATH
+    DOC "Path to CGAL/Three/Scene_group_item.h")
+  hide_variable(CGAL_THREE_SCENE_GROUP_ITEM_H_PATH)
+
+  if(CGAL_THREE_SCENE_ITEM_H_PATH)
+    qt5_generate_moc( "${CGAL_THREE_SCENE_ITEM_H_PATH}/CGAL/Three/Scene_item.h"
+      "${CMAKE_CURRENT_BINARY_DIR}/Scene_item_moc.cpp" )
+  else()
+    message(FATAL_ERROR "Cannot find <CGAL/Three/Viewer_interface.h>")
+  endif()
+
+  if(CGAL_THREE_SCENE_GROUP_ITEM_H_PATH)
+    qt5_generate_moc( "${CGAL_THREE_SCENE_GROUP_ITEM_H_PATH}/CGAL/Three/Scene_group_item.h"
+      "${CMAKE_CURRENT_BINARY_DIR}/Scene_group_item_moc.cpp" )
+  else()
+    message(FATAL_ERROR "Cannot find <CGAL/Three/Scene_group_item.h>")
+  endif()
+
+
+  # AUXILIARY LIBRARIES
+
+  # put s (which are shared libraries) at the same location as
+  # executable files
+  set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
+  set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
+
+  add_library(demo_framework SHARED
+    Scene.cpp
+    Viewer.cpp
+    Viewer_interface_moc.cpp
+    Scene_item_moc.cpp
+    Scene_item.cpp
+    Scene_group_item.cpp
+    Scene_group_item_moc.cpp
+    Polyhedron_demo_plugin_helper.cpp)
+    qt5_use_modules(demo_framework OpenGL Gui Widgets Script Xml)
+
+  target_link_libraries(demo_framework
+    ${QGLVIEWER_LIBRARIES}
+    ${OPENGL_gl_LIBRARY}
+    ${OPENGL_glu_LIBRARY}
+    )
+
+  add_library(scene_basic_objects SHARED
+    Scene_plane_item.cpp
+)
+  target_link_libraries(scene_basic_objects 
+    demo_framework
+    ${CGAL_LIBRARIES}
+    ${QGLVIEWER_LIBRARIES}
+    ${OPENGL_gl_LIBRARY}
+    ${OPENGL_glu_LIBRARY}
+    )
+  qt5_use_modules(scene_basic_objects OpenGL Gui Xml Script Widgets)
+  add_library(point_dialog SHARED Show_point_dialog.cpp Show_point_dialog.ui ${Show_point_dialogUI_FILES})
+  qt5_use_modules(point_dialog OpenGL Gui Xml Script Widgets)
+
+  macro(add_item item_name)
+    add_library(${item_name} SHARED ${ARGN})
+    qt5_use_modules(${item_name} OpenGL Gui Xml Script Widgets)
+    target_link_libraries(${item_name} demo_framework ${CGAL_LIBRARIES} ${Boost_LIBRARIES})
+  endmacro(add_item)
+
+  add_item(scene_c2t3_item Scene_c2t3_item.cpp)
+  add_item(scene_c3t3_item Scene_c3t3_item.cpp)
+  target_link_libraries(scene_c3t3_item scene_polyhedron_item scene_polygon_soup_item ${TBB_LIBRARIES})
+  add_item(scene_polyhedron_item Scene_polyhedron_item.cpp)
+  add_item(scene_polyhedron_transform_item Plugins/PCA/Scene_polyhedron_transform_item.cpp )
+
+  add_item(scene_segmented_image_item Scene_segmented_image_item.cpp)
+ 
+  # special
+  target_link_libraries(scene_polyhedron_transform_item scene_polyhedron_item)
+
+  add_item(scene_combinatorial_map_item Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp)
+  # special
+  target_link_libraries(scene_combinatorial_map_item scene_polyhedron_item)
+
+  add_item(scene_polylines_item Scene_polylines_item.cpp)
+
+  add_item(scene_polyhedron_item_decorator Scene_polyhedron_item_decorator.cpp )
+  target_link_libraries(scene_polyhedron_item_decorator scene_polyhedron_item)
+  
+  add_item(scene_polyhedron_item_k_ring_selection Scene_polyhedron_item_k_ring_selection.cpp)
+  target_link_libraries(scene_polyhedron_item_k_ring_selection scene_polyhedron_item)
+ 
+  add_item(scene_polyhedron_selection_item Scene_polyhedron_selection_item.cpp)
+  target_link_libraries(scene_polyhedron_selection_item scene_polyhedron_item_decorator scene_polyhedron_item_k_ring_selection)
+
+  add_item(scene_polyhedron_shortest_path_item Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp)
+  
+  target_link_libraries(scene_polyhedron_shortest_path_item scene_polyhedron_item_decorator scene_polyhedron_item scene_polylines_item)
+
+  if(EIGEN3_FOUND )
+    qt5_wrap_ui( editionUI_FILES Plugins/Surface_mesh_deformation/Deform_mesh.ui )
+    add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp)
+    add_item(scene_edit_polyhedron_item Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp
+           ${editionUI_FILES})
+    target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection)
+  endif()
+
+  add_item(scene_implicit_function_item Scene_implicit_function_item.cpp  Color_ramp.cpp )
+
+  add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp)
+  target_link_libraries(scene_polygon_soup_item scene_polyhedron_item)
+  add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp)
+  
+  target_link_libraries(scene_nef_polyhedron_item scene_polyhedron_item)
+  add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp)
+  target_link_libraries( scene_points_with_normal_item gl_splat)
+  target_link_libraries( demo_framework gl_splat)
+  
+  
+
+
+  foreach( lib 
+      demo_framework
+      scene_basic_objects
+      scene_polyhedron_item
+      scene_polygon_soup_item
+      scene_nef_polyhedron_item)
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${lib} )
+  endforeach()
+
+  add_definitions( -DUSE_FORWARD_DECL)
+  add_library(polyhedron_demo SHARED
+    MainWindow.cpp
+    Polyhedron_demo.cpp
+    File_loader_dialog_moc.cpp
+    ${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} ${statisticsUI_FILES})
+  target_link_libraries(polyhedron_demo demo_framework point_dialog)
+  qt5_use_modules(polyhedron_demo Gui OpenGL Xml Widgets Script Svg )
+  add_executable  ( Polyhedron_3 Polyhedron_3.cpp )
+  target_link_libraries( Polyhedron_3 polyhedron_demo )
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
+
+  if( POLYHEDRON_QTSCRIPT_DEBUGGER )
+    if(TARGET Qt5::ScriptTools)
+      qt5_use_modules(Polyhedron_3 ScriptTools)
+    else()
+      message(STATUS "POLYHEDRON_QTSCRIPT_DEBUGGER is set to TRUE but the Qt5 ScriptTools library was not found.")
+    endif()
+  endif()
+  target_link_libraries( Polyhedron_3 demo_framework )
+
+  # Link with CGAL
+  target_link_libraries( Polyhedron_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+  # Link with libQGLViewer, OpenGL
+  target_link_libraries( Polyhedron_3 ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
+
+
+  ###########
+  # PLUGINS #
+  ###########
+
+
+  file(GLOB DEMO_PLUGINS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/Plugins/" "${CMAKE_CURRENT_SOURCE_DIR}/Plugins/*")
+  FOREACH(SUB_DIR ${DEMO_PLUGINS})
+      add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/Plugins/${SUB_DIR}")
+  ENDFOREACH()
+
+#
+# Exporting
+#
+  if(TARGET CGAL_Qt5)
+    export(TARGETS CGAL CGAL_Qt5 FILE polyhedron_demo_targets.cmake NAMESPACE Polyhedron_)
+  else()
+    export(TARGETS FILE polyhedron_demo_targets.cmake)
+  endif()
+  export(
+    TARGETS
+    demo_framework
+    scene_polyhedron_item
+    scene_points_with_normal_item
+    scene_implicit_function_item
+    scene_polylines_item
+    NAMESPACE Polyhedron_
+    APPEND FILE polyhedron_demo_targets.cmake)
+
+  export(
+    TARGETS
+    gl_splat
+    NAMESPACE Polyhedron_
+    APPEND FILE polyhedron_demo_targets.cmake)
+
+  configure_file(CGAL_polyhedron_demoConfig.cmake.in  CGAL_polyhedron_demoConfig.cmake)
+#TO DO script the activation of all the plugins.
+
+else (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  set(POLYHEDRON_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(POLYHEDRON_MISSING_DEPS "the CGAL Qt5 library, ${POLYHEDRON_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(POLYHEDRON_MISSING_DEPS "Qt5, ${POLYHEDRON_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(POLYHEDRON_MISSING_DEPS "OpenGL, ${POLYHEDRON_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(POLYHEDRON_MISSING_DEPS "QGLViewer, ${POLYHEDRON_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS}and will not be compiled.")
+
+
+endif (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Color_map.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Color_map.h
new file mode 100644
index 0000000..ce4cb68
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Color_map.h
@@ -0,0 +1,27 @@
+#ifndef _COLOR_MAP_H
+#define _COLOR_MAP_H
+
+#include <QColor>
+
+template <typename Output_color_iterator>
+Output_color_iterator
+compute_color_map(QColor base_color,
+                  unsigned nb_of_colors,
+                  Output_color_iterator out)
+{
+  qreal hue = base_color.hueF();
+  const qreal step = ((qreal)1) / nb_of_colors;
+
+  qreal h = hue;
+  for(unsigned i = 0; i < nb_of_colors; ++i) {
+    if (h!=-1) h += step;
+    if ( h > 1 ) { h -= 1; }
+
+    *out++ = QColor::fromHsvF(h, 
+                              base_color.saturationF(), 
+                              base_color.valueF());
+  }
+  return out;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.cpp
new file mode 100644
index 0000000..40c55a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.cpp
@@ -0,0 +1,127 @@
+#include "Color_ramp.h"
+#include <iostream>
+
+// -----------------------------------
+// Color_component
+// -----------------------------------
+Color_component::
+Color_component()
+{
+  add(0,0);
+  add(1,1);
+}
+
+Color_component::
+Color_component(const double c0, const double c1)
+{
+  add(0,c0);
+  add(1,c1);
+}
+
+double 
+Color_component::
+interpolate(const double v) const
+{
+  Values::const_iterator next = next_it(v);
+
+  // next is just after v
+  Values::const_iterator prev = --next;
+  ++next;
+
+  if ( v>=1 && next != values_.end())
+    std::cerr << ".";
+  
+  if ( next == values_.end() )
+  {
+    return prev->second;
+  }
+
+  const double& a = prev->first;
+  const double& b = next->first;
+  return (b-v)/(b-a) * prev->second + (v-a)/(b-a) * next->second;
+
+}
+
+void
+Color_component::
+add(const double v, double color)
+{
+  if ( color > 1 ) { color = 1; }
+  if ( color < 0 ) { color = 0; }
+  
+  Values::iterator next = next_it(v);
+  values_.insert(next, std::make_pair(v,color));
+}
+
+
+void
+Color_component::
+rebuild(const double c0, const double c1)
+{
+  values_.clear();
+  add(1,c1);
+  add(0,c0);
+}
+
+void
+Color_component::
+print() const
+{
+  for ( Values::const_iterator it = values_.begin(),
+       end = values_.end() ; it != end ; ++it )
+  { 
+    std::cout << "<" << it->first << "," << it->second << "> ";
+  }
+  
+  std::cout << std::endl;
+}
+
+
+// -----------------------------------
+// Color_ramp
+// -----------------------------------
+Color_ramp::Color_ramp()
+  : r_()
+  , g_()
+  , b_()
+{ 
+}
+
+void 
+Color_ramp::build_red()
+{
+  r_.rebuild(1,0.5);
+  g_.rebuild(1,0);
+  b_.rebuild(1,0);
+
+  r_.add(0.3,1);
+  r_.add(0.05,1);
+  g_.add(0.05,0.95);
+  g_.add(0.3,0.5);
+  b_.add(0.05,0);
+}
+
+void 
+Color_ramp::build_blue()
+{
+  r_.rebuild(1,0);
+  g_.rebuild(1,0);
+  b_.rebuild(1,0.5);
+  
+  b_.add(0.1,0.8);
+  g_.add(0.1,0.4);
+  r_.add(0.1,0.4);
+}
+
+void
+Color_ramp::
+print() const
+{
+  std::cout << "r: ";
+  r_.print();
+  std::cout << "g: ";
+  g_.print();
+  std::cout << "b: ";
+  b_.print();
+}
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Color_ramp.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Color_ramp.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/FileLoaderDialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/FileLoaderDialog.ui
new file mode 100644
index 0000000..4242b30
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/FileLoaderDialog.ui
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FileLoaderDialog</class>
+ <widget class="QDialog" name="FileLoaderDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>339</width>
+    <height>105</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Select a Loader</string>
+  </property>
+  <property name="layoutDirection">
+   <enum>Qt::LeftToRight</enum>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>false</bool>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="label">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>TextLabel</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QComboBox" name="pluginBox">
+     <property name="statusTip">
+      <string/>
+     </property>
+     <property name="whatsThis">
+      <string/>
+     </property>
+     <property name="accessibleName">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="layoutDirection">
+      <enum>Qt::LeftToRight</enum>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="alwaysUse">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>FileLoaderDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>FileLoaderDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/File_loader_dialog.h b/3rdparty/CGAL-4.8/demo/Polyhedron/File_loader_dialog.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/File_loader_dialog.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/File_loader_dialog.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/CMakeLists.txt
new file mode 100644
index 0000000..3bf89f4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/CMakeLists.txt
@@ -0,0 +1,35 @@
+
+project(GlSplat)
+
+cmake_minimum_required(VERSION 2.6.0)
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
+  cmake_policy(VERSION 2.8.4)
+else()
+  cmake_policy(VERSION 2.6)
+endif()
+set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+
+find_package(Qt4 REQUIRED)
+
+set(QT_USE_QTOPENGL TRUE)
+set(QT_USE_QTXML TRUE)
+include(${QT_USE_FILE})
+include_directories( ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR})
+
+set(srcs Shader.cpp GlSplat.cpp)
+
+qt4_automoc( ${srcs})
+qt4_add_resources(srcs glsplat.qrc)
+
+add_library(GlSplat SHARED ${srcs})
+target_link_libraries(GlSplat ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} )
+
+find_package(QGLViewer)
+if(QGLVIEWER_FOUND)
+  include_directories( ${QGLViewer_INCLUDES})
+  add_executable(demo demo.cpp)
+  target_link_libraries(demo ${QT_QTXML_LIBRARY} ${QGLViewer_LIBRARIES} GlSplat)
+else()
+  message("QGLViewer not found, demo won't be built")
+endif()
+include( polyhedron_demo_macros )
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp
new file mode 100644
index 0000000..2717283
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp
@@ -0,0 +1,521 @@
+// This file is part of GlSplat, a simple splatting C++ library
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
+//
+// GlSplat is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
+
+#include <QtGui>
+
+#include <math.h>
+#include <stdlib.h>
+#include <iostream>
+
+#include "GlSplat.h"
+#include "Shader.h"
+
+#include <QGLWidget>
+#include <QTextStream>
+#include <QGLFramebufferObject>
+
+
+namespace GlSplat {
+
+SplatRenderer::SplatRenderer()
+{
+  mNormalTextureID = 0;
+  mDepthTextureID = 0;
+  mIsSupported = false;
+  viewer_is_set = false;
+  mRenderBuffer = 0;
+  mWorkaroundATI = false;
+  mBuggedAtiBlending = false;
+  mDummyTexId = 0;
+  mIsInitialized = false;
+
+  mFlags = DEFERRED_SHADING_BIT | DEPTH_CORRECTION_BIT | FLOAT_BUFFER_BIT | OUTPUT_DEPTH_BIT;
+  mCachedFlags = ~mFlags;
+  // union of bits which controls the render buffer
+  mRenderBufferMask = DEFERRED_SHADING_BIT | FLOAT_BUFFER_BIT;
+}
+
+QString SplatRenderer::loadSource(const QString& func,const QString& filename)
+{
+  QString res;
+  QFile f(":/SplatRenderer/shaders/" + filename);
+  if (!f.open(QFile::ReadOnly))
+  {
+    std::cerr << "failed to load shader file " << filename.toLatin1().data() << "\n";
+    return res;
+  }
+  else qDebug("Successfully loaded shader func '%s' in file '%s'",qPrintable(func),qPrintable(filename));
+  QTextStream stream(&f);
+  res = stream.readAll();
+  f.close();
+  res = QString("#define GLSPLAT__%1__ 1\n").arg(func)
+      + QString("#define %1 main\n").arg(func)
+      + res;
+  return res;
+}
+
+void SplatRenderer::configureShaders()
+{
+  //  const char* passNames[3] = {"Visibility","Attribute","Finalization"};
+  QString defines = "";
+  if (mFlags & DEFERRED_SHADING_BIT)
+    defines += "#define ES_DEFERRED_SHADING\n";
+  if (mFlags & DEPTH_CORRECTION_BIT)
+    defines += "#define ES_DEPTH_CORRECTION\n";
+  if (mFlags & OUTPUT_DEPTH_BIT)
+    defines += "#define ES_OUTPUT_DEPTH 1\n";
+  if (mFlags & BACKFACE_SHADING_BIT)
+    defines += "#define ES_BACKFACE_SHADING\n";
+  if (mWorkaroundATI)
+    defines += "#define ES_ATI_WORKAROUND\n";
+
+  QString shading =
+"vec4 meshlabLighting(vec4 color, vec3 eyePos, vec3 normal)"
+"{"
+"	normal = normalize(normal);"
+"	vec3 lightVec = normalize(gl_LightSource[0].position.xyz);"
+"	vec3 halfVec = normalize( lightVec - normalize(eyePos) );"
+"	float aux_dot = dot(normal,lightVec);"
+"	float diffuseCoeff = clamp(aux_dot, 0.0, 1.0);"
+" float specularCoeff = aux_dot>0.0 ? clamp(pow(clamp(dot(halfVec, normal),0.0,1.0),gl_FrontMaterial.shininess), 0.0, 1.0) : 0.0;"
+"	return vec4(color.rgb * ( gl_FrontLightProduct[0].ambient.rgb + diffuseCoeff * gl_FrontLightProduct[0].diffuse.rgb) + specularCoeff * gl_FrontLightProduct[0].specular.rgb, 1.0);"
+"}\n";
+
+  for (int k=0;k<3;++k)
+  {
+    QString vsrc = shading + defines + mShaderSrcs[k*2+0];
+    QString fsrc = shading + defines + mShaderSrcs[k*2+1];
+    if(!mShaders[k].loadSources(mShaderSrcs[k*2+0]!="" ? vsrc.toLatin1().data() : 0,
+                                mShaderSrcs[k*2+1]!="" ? fsrc.toLatin1().data() : 0/*,
+                                Shader::Warnings*/))
+      mIsSupported = false;
+  }
+}
+
+void SplatRenderer::init(QGLWidget *qglw)
+{
+  mIsSupported = true;
+  if(qglw)
+    qglw->makeCurrent();
+  const char* rs = (const char*)glGetString(GL_RENDERER);
+  QString rendererString("");
+  if(rs)
+    rendererString = QString(rs);
+  mWorkaroundATI = rendererString.startsWith("ATI") || rendererString.startsWith("AMD");
+  // FIXME: maybe some recent HW correctly supports floating point blending...
+  mBuggedAtiBlending = rendererString.startsWith("ATI") || rendererString.startsWith("AMD");
+  if (mWorkaroundATI && mDummyTexId==0)
+  {      
+    viewer->glActiveTexture(GL_TEXTURE0);
+    viewer->glGenTextures(1,&mDummyTexId);
+    viewer->glBindTexture(GL_TEXTURE_2D, mDummyTexId);
+    viewer->glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0);
+  }
+  // let's check the GPU capabilities
+  mSupportedMask = DEPTH_CORRECTION_BIT | BACKFACE_SHADING_BIT;
+  if (!QGLFramebufferObject::hasOpenGLFramebufferObjects ())
+  {
+    std::cout << "SplatRenderer: error OpenGL frame buffer objects are not supported. (please, try to update your drivers)\n";
+    mIsSupported = false;
+    return;
+  }
+  mSupportedMask |= FLOAT_BUFFER_BIT;
+
+  mSupportedMask |= DEFERRED_SHADING_BIT;
+
+  mSupportedMask |= OUTPUT_DEPTH_BIT;
+
+  mFlags = mFlags & mSupportedMask;
+
+  // load shader source
+  mShaderSrcs[0] = loadSource("VisibilityVP","Raycasting.glsl");
+  mShaderSrcs[1] = loadSource("VisibilityFP","Raycasting.glsl");
+  mShaderSrcs[2] = loadSource("AttributeVP","Raycasting.glsl");
+  mShaderSrcs[3] = loadSource("AttributeFP","Raycasting.glsl");
+  mShaderSrcs[4] = "";
+  mShaderSrcs[5] = loadSource("Finalization","Finalization.glsl");
+  mCurrentPass = 2;
+  mBindedPass = -1;
+  mIsInitialized = true;
+
+}
+
+void SplatRenderer::updateRenderBuffer()
+{
+  if ( (!mRenderBuffer)
+    || (mRenderBuffer->width()!=mCachedVP[2])
+    || (mRenderBuffer->height()!=mCachedVP[3])
+    || ( (mCachedFlags & mRenderBufferMask) != (mFlags & mRenderBufferMask) ))
+  {
+    delete mRenderBuffer;
+    GLenum fmt = (mFlags&FLOAT_BUFFER_BIT) ? GL_RGBA16F_ARB : GL_RGBA;
+    mRenderBuffer = new QGLFramebufferObject(mCachedVP[2], mCachedVP[3],
+        (mFlags&OUTPUT_DEPTH_BIT) ? QGLFramebufferObject::NoAttachment : QGLFramebufferObject::Depth,
+        GL_TEXTURE_RECTANGLE_ARB, fmt);
+
+    if (!mRenderBuffer->isValid())
+    {
+      std::cout << "SplatRenderer: invalid FBO\n";
+    }
+
+
+    if (mFlags&DEFERRED_SHADING_BIT)
+    {
+      // in deferred shading mode we need an additional buffer to accumulate the normals
+      if (mNormalTextureID==0)
+        viewer->glGenTextures(1,&mNormalTextureID);
+      //glBindTexture(GL_TEXTURE_RECTANGLE_ARB, mNormalTextureID);
+      viewer->glBindTexture(GL_TEXTURE_RECTANGLE, mNormalTextureID);
+      //glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, fmt, mCachedVP[2], mCachedVP[3], 0, GL_RGBA, GL_FLOAT, 0);
+      viewer->glTexImage2D(GL_TEXTURE_RECTANGLE, 0, fmt, mCachedVP[2], mCachedVP[3], 0, GL_RGBA, GL_FLOAT, 0);
+      //glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      viewer->glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      //glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      viewer->glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      mRenderBuffer->bind();
+      viewer->glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)viewer->context()->getProcAddress("glFramebufferTexture2DEXT");
+      viewer->glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_RECTANGLE_ARB, mNormalTextureID, 0);
+      mRenderBuffer->release();
+
+    }
+
+    if (mFlags&OUTPUT_DEPTH_BIT)
+    {
+      // to output the depth values to the final depth buffer we need to
+      // attach a depth buffer as a texture
+      if (mDepthTextureID==0)
+        viewer->glGenTextures(1,&mDepthTextureID);
+      //glBindTexture(GL_TEXTURE_RECTANGLE_ARB, mDepthTextureID);
+      viewer->glBindTexture(GL_TEXTURE_RECTANGLE, mDepthTextureID);
+      //glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH_COMPONENT24_ARB, mCachedVP[2], mCachedVP[3], 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0);
+      viewer->glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_DEPTH_COMPONENT24, mCachedVP[2], mCachedVP[3], 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0);
+      //glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      viewer->glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      //glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      viewer->glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      mRenderBuffer->bind();
+      viewer->glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE_ARB, mDepthTextureID, 0);
+      mRenderBuffer->release();
+
+    }
+  }
+}
+
+bool SplatRenderer::beginVisibilityPass()
+{
+  if (!mIsInitialized)
+  {
+    init();
+  }
+  if (!isSupported())
+  {
+    std::cerr << "SplatRenderer error: not supported hardware\n";
+    return false;
+  }
+  if (mCurrentPass!=2)
+  {
+    std::cerr << "SplatRenderer error: programming error when calling beginVisibilityPass\n";
+    return false;
+  }
+
+  viewer->glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+  mCurrentPass = 0;
+
+  // grab projection info
+  viewer->glGetIntegerv(GL_VIEWPORT, mCachedVP);
+  viewer->glGetFloatv(GL_MODELVIEW_MATRIX, mCachedMV);
+  viewer->glGetFloatv(GL_PROJECTION_MATRIX, mCachedProj);
+
+  updateRenderBuffer();
+  if (mCachedFlags != mFlags)
+    configureShaders();
+
+  // configureShaders may detect that shaders are actually not supported.
+  if (!isSupported())
+  {
+    std::cerr << "SplatRenderer error: not supported hardware\n";
+    return false;
+  }
+
+  mCachedFlags = mFlags;
+
+  mParams.update(mCachedMV, mCachedProj, mCachedVP);
+  mParams.loadTo(mShaders[mCurrentPass]);
+
+  mRenderBuffer->bind();
+  if (mFlags & DEFERRED_SHADING_BIT)
+  {
+     //GLenum buf[2] = {GL_COLOR_ATTACHMENT0_EXT,GL_COLOR_ATTACHMENT1_EXT};
+     GLenum buf[2] = {GL_COLOR_ATTACHMENT0,GL_COLOR_ATTACHMENT1};
+     //glDrawBuffersARB(2, buf);
+     viewer->glDrawBuffers(2, buf);
+  }
+  viewer->glViewport(mCachedVP[0],mCachedVP[1],mCachedVP[2],mCachedVP[3]);
+  viewer->glClearColor(0,0,0,0);
+  viewer->glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+  enablePass(mCurrentPass);
+  ;
+  return true;
+}
+bool SplatRenderer::beginAttributePass()
+{
+  if (!isSupported())
+  {
+    std::cerr << "SplatRenderer error: not supported hardware\n";
+    return false;
+  }
+  if (mCurrentPass!=0)
+  {
+    std::cerr << "SplatRenderer error: programming error when calling beginAttributePass (must be called after the visiblity pass)\n";
+    return false;
+  }
+
+  mCurrentPass = 1;
+  mParams.loadTo(mShaders[mCurrentPass]);
+  enablePass(mCurrentPass);
+  ;
+  return true;
+}
+bool SplatRenderer::finalize()
+{
+  if (!isSupported())
+  {
+    std::cerr << "SplatRenderer error: not supported hardware\n";
+    return false;
+  }
+
+  // this is the last pass: normalization by the sum of weights + deferred shading
+  mShaders[mCurrentPass].release();
+  mRenderBuffer->release();
+
+  if ( (mCurrentPass!=0) && (mCurrentPass!=1))
+  {
+    std::cerr << "SplatRenderer error: programming error when calling finalize (must be called after the visiblity or attribute pass)\n";
+    return false;
+  }
+
+  mCurrentPass = 2;
+
+  if (mFlags&DEFERRED_SHADING_BIT)
+    viewer->glDrawBuffer(GL_BACK);
+
+  enablePass(mCurrentPass);
+
+  // switch to normalized 2D rendering mode
+  viewer->glMatrixMode(GL_PROJECTION);
+  viewer->glPushMatrix();
+  viewer->glLoadIdentity();
+  viewer->glMatrixMode(GL_MODELVIEW);
+  viewer->glPushMatrix();
+  viewer->glLoadIdentity();
+
+
+  mShaders[2].setUniform("viewport",float(mCachedVP[0]),float(mCachedVP[1]),float(mCachedVP[2]),float(mCachedVP[3]));
+  mShaders[2].setUniform("ColorWeight",0);  // this is a texture unit
+  viewer->glActiveTexture(GL_TEXTURE0);
+  //glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mRenderBuffer->texture());
+  viewer->glBindTexture(GL_TEXTURE_RECTANGLE,mRenderBuffer->texture());
+
+  if (mFlags&DEFERRED_SHADING_BIT)
+  {
+    mShaders[2].setUniform("unproj", mCachedProj[10], mCachedProj[14]);
+    mShaders[2].setUniform("NormalWeight",1); // this is a texture unit
+    viewer->glActiveTexture(GL_TEXTURE1);
+    //glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mNormalTextureID);
+    viewer->glBindTexture(GL_TEXTURE_RECTANGLE,mNormalTextureID);
+
+  }
+
+  if (mFlags&OUTPUT_DEPTH_BIT)
+  {
+    mShaders[2].setUniform("Depth",2); // this is a texture unit
+    viewer->glActiveTexture(GL_TEXTURE2);
+    //glBindTexture(GL_TEXTURE_RECTANGLE_ARB,mDepthTextureID);
+    viewer->glBindTexture(GL_TEXTURE_RECTANGLE,mDepthTextureID);
+
+  }
+  else
+  {
+    viewer->glDisable(GL_DEPTH_TEST);
+    viewer->glDepthMask(GL_FALSE);
+  }
+
+  // draw a quad covering the whole screen
+  float viewVec[] = {1.f/mCachedProj[0], 1.f/mCachedProj[5], -1};
+
+  viewer->glBegin(GL_QUADS);
+    viewer->glColor3f(1, 0, 0);
+    viewer->glTexCoord3f(viewVec[0],viewVec[1],viewVec[2]);
+    viewer->glMultiTexCoord2f(GL_TEXTURE1,1.,1.);
+    viewer->glVertex3f(1,1,0);
+
+    viewer->glColor3f(1, 1, 0);
+    viewer->glTexCoord3f(-viewVec[0],viewVec[1],viewVec[2]);
+    viewer->glMultiTexCoord2f(GL_TEXTURE1,0.,1.);
+    viewer->glVertex3f(-1,1,0);
+
+    viewer->glColor3f(0, 1, 1);
+    viewer->glTexCoord3f(-viewVec[0],-viewVec[1],viewVec[2]);
+    viewer->glMultiTexCoord2f(GL_TEXTURE1,0.,0.);
+    viewer->glVertex3f(-1,-1,0);
+
+    viewer->glColor3f(1, 0, 1);
+    viewer->glTexCoord3f(viewVec[0],-viewVec[1],viewVec[2]);
+    viewer->glMultiTexCoord2f(GL_TEXTURE1,1.,0.);
+    viewer->glVertex3f(1,-1,0);
+  viewer->glEnd();
+  if (!(mFlags&OUTPUT_DEPTH_BIT))
+  {
+      viewer->glEnable(GL_DEPTH_TEST);
+      viewer->glDepthMask(GL_TRUE);
+  }
+
+  mShaders[mCurrentPass].release();
+
+  // restore matrices
+  viewer->glMatrixMode(GL_PROJECTION);
+  viewer->glPopMatrix();
+  viewer->glMatrixMode(GL_MODELVIEW);
+  viewer->glPopMatrix();
+
+  viewer->glPopAttrib();
+  return true;
+}
+
+void SplatRenderer::enablePass(int n)
+{
+  if (!isSupported())
+  {
+    return;
+  }
+  if (mBindedPass!=n)
+  {
+    if (mBindedPass>=0)
+      mShaders[mBindedPass].release();
+    mShaders[n].activate();
+    mBindedPass = n;
+
+    // set GL states
+    if (n==0)
+    {
+      viewer->glDisable(GL_LIGHTING);
+// 			glDisable(GL_POINT_SMOOTH);
+      viewer->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+
+      viewer->glAlphaFunc(GL_LESS,1);
+      viewer->glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
+      viewer->glDepthMask(GL_TRUE);
+      viewer->glDisable(GL_BLEND);
+      viewer->glEnable(GL_ALPHA_TEST);
+      viewer->glEnable(GL_DEPTH_TEST);
+
+// 			glActiveTexture(GL_TEXTURE0);
+// 			glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
+// 			glEnable(GL_POINT_SPRITE_ARB);
+    }
+    if (n==1)
+    {
+      viewer->glDisable(GL_LIGHTING);
+      viewer->glEnable(GL_POINT_SMOOTH);
+      viewer->glActiveTexture(GL_TEXTURE0);
+      viewer->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+
+      viewer->glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
+      viewer->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE,GL_ONE);
+// 			//glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE,GL_ZERO);
+// 			glBlendFunc(GL_ONE,GL_ZERO);
+      viewer->glDepthMask(GL_FALSE);
+      viewer->glEnable(GL_BLEND);
+      viewer->glEnable(GL_DEPTH_TEST);
+      viewer->glDisable(GL_ALPHA_TEST);
+
+// 			glActiveTexture(GL_TEXTURE0);
+
+    }
+    if ( (n==0) || (n==1) )
+    {
+      // enable point sprite rendering mode
+      viewer->glActiveTexture(GL_TEXTURE0);
+      if (mWorkaroundATI)
+      {
+        viewer->glBindTexture(GL_TEXTURE_2D, mDummyTexId);
+        viewer->glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 2, 2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0);
+        viewer->glPointParameterf(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
+        // hm... ^^^^
+      }
+      viewer->glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
+      viewer->glEnable(GL_POINT_SPRITE_ARB);
+    }
+    if (n==2)
+    {
+      viewer->glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
+      viewer->glDepthMask(GL_TRUE);
+      viewer->glDisable(GL_LIGHTING);
+      viewer->glDisable(GL_BLEND);
+    }
+  }
+}
+
+void SplatRenderer::UniformParameters::update(float* mv, float* proj, GLint* vp)
+{
+  // extract the uniform scale
+  float scale = sqrtf(mv[0]*mv[0]+mv[1]*mv[1]+mv[2]*mv[2]);
+
+  radiusScale = scale;
+  preComputeRadius = - (std::max)(proj[0]*vp[2], proj[5]*vp[3]);
+  depthOffset = 2.0;
+  oneOverEwaRadius = 0.70710678118654f;
+  halfVp[0] = 0.5*vp[2];
+  halfVp[1] = 0.5*vp[3];
+  rayCastParameter1[0] = 2./(proj[0]*vp[2]);
+  rayCastParameter1[1] = 2./(proj[5]*vp[3]);
+  rayCastParameter1[2] = 0.0;
+  rayCastParameter2[0] = -1./proj[0];
+  rayCastParameter2[1] = -1./proj[5];
+  rayCastParameter2[2] = -1.0;
+  depthParameterCast[0] = 0.5*proj[14];
+  depthParameterCast[1] = 0.5-0.5*proj[10];
+}
+
+void SplatRenderer::UniformParameters::loadTo(Shader& prg)
+{
+  prg.activate();
+  prg.setUniform("expeRadiusScale",       radiusScale);
+  prg.setUniform("expePreComputeRadius",  preComputeRadius);
+  prg.setUniform("expeDepthOffset",       depthOffset);
+  prg.setUniform("oneOverEwaRadius",      oneOverEwaRadius);
+  prg.setUniform2("halfVp",               halfVp);
+  prg.setUniform3("rayCastParameter1",    rayCastParameter1);
+  prg.setUniform3("rayCastParameter2",    rayCastParameter2);
+  prg.setUniform2("depthParameterCast",   depthParameterCast);
+}
+
+void SplatRenderer::setRadiusScale(float v)
+{
+  mParams.radiusScale = v;
+}
+
+void SplatRenderer::setViewer(CGAL::Three::Viewer_interface *v)
+{
+  viewer = v;
+  for(int i=0; i<3; i++)
+    mShaders[i].setViewer(v);
+
+  viewer_is_set = true;
+}
+} // namepsace GlSplat
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.h b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.h
new file mode 100644
index 0000000..b19d210
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat.h
@@ -0,0 +1,158 @@
+// This file is part of GlSplat, a simple splatting C++ library
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
+//
+// GlSplat is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _GLSPLAT_SPLATRENDERER_H_
+#define _GLSPLAT_SPLATRENDERER_H_
+
+#include "GlSplat_config.h"
+#include "Shader.h"
+#include <QObject>
+#include <QAction>
+#include <QString>
+#include <map>
+
+class QGLFramebufferObject;
+class QGLWidget;
+
+namespace GlSplat {
+
+/** \class SplatRenderer
+  * \brief Helper class to render a set of points using a splatting alogirthm
+  *
+  * This class aims to render a set of oriented point with radius (called splats) using an
+  * OpenGL based splating algorithm. This class is only responsible for the managing of the
+  * OpenGL stats and shaders related to the splatting. The drawing of the geometry, i.e.,
+  * sending the point data to the GPU has to be done by the user.
+  *
+  * Here is an example:
+  * \code
+  *  SplatRenderer renderer;
+  *  renderer.init();
+  *
+  *  renderer.beginVisibilityPass();
+  *  drawpoints();
+  *  renderer.beginAttributePass();
+  *  drawpoints();
+  *  renderer.finalize();
+  * \endcode
+  *
+  * Have a look at the demo to see a complete example based on QGLviewer.
+  */
+class GLSPLAT_EXPORT SplatRenderer
+{
+  bool mIsSupported;
+  enum {
+    DEFERRED_SHADING_BIT	= 0x000001,
+    DEPTH_CORRECTION_BIT	= 0x000002,
+    OUTPUT_DEPTH_BIT			= 0x000004,
+    BACKFACE_SHADING_BIT	= 0x000008,
+    FLOAT_BUFFER_BIT			= 0x000010
+  };
+  int mFlags;
+  int mCachedFlags;
+  int mRenderBufferMask;
+  int mSupportedMask;
+
+  int mCurrentPass;
+  int mBindedPass;
+  GLuint mDummyTexId; // on ATI graphics card we need to bind a texture to get point sprite working !
+  bool mWorkaroundATI;
+  bool mBuggedAtiBlending;
+  bool mIsInitialized;
+  GLuint mNormalTextureID;
+  GLuint mDepthTextureID;
+  Shader mShaders[3];
+  QString mShaderSrcs[6];
+  QGLFramebufferObject* mRenderBuffer;
+  float mCachedMV[16];    // modelview matrix
+  float mCachedProj[16];  // projection matrix
+  GLint mCachedVP[4];     // viewport
+
+  struct UniformParameters
+  {
+    float radiusScale;
+    float preComputeRadius;
+    float depthOffset;
+    float oneOverEwaRadius;
+    float halfVp[2];
+    float rayCastParameter1[3];
+    float rayCastParameter2[3];
+    float depthParameterCast[2];
+
+    void loadTo(Shader& prg);
+    void update(float* mv, float* proj, GLint* vp);
+  };
+
+  UniformParameters mParams;
+
+  QString loadSource(const QString& func,const QString& file);
+  void configureShaders();
+  void updateRenderBuffer();
+  void enablePass(int n);
+
+public:
+  bool viewer_is_set;
+
+  SplatRenderer();
+  ~SplatRenderer()
+  {
+  }
+
+  /** Must be called once an OpenGL context has been activated.
+    * The main OpenGL context must be enabled, or, if you are using a QGLwiget,
+    * you can pass it to this function without caring about the OpenGL context.
+    */
+  void init(QGLWidget *qglw = 0);
+
+  /** \returns true is the hardware is supported
+    * Must be called after init.
+    */
+  bool isSupported() { return mIsSupported; }
+
+  /** Starts the first rendering pass
+    * \returns false if an error occured
+    */
+  bool beginVisibilityPass();
+  /** Starts the (optional) second rendering pass
+    * \returns false if an error occured
+    */
+  bool beginAttributePass();
+  /** Draw the rendered splats inside the main render target.
+    * \returns false if an error occured
+    */
+  bool finalize();
+
+  /** Sets a global scale factor for the splat radii
+    * Default value is 1
+    */
+  void setRadiusScale(float v);
+
+  void setViewer(CGAL::Three::Viewer_interface *v);
+
+  typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint target, GLuint attachment, GLuint textarget, GLuint texture, GLint level);
+
+  //!Allows OpenGL 2.1 context to get access to gkFrameBufferTexture2D.
+  PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2D;
+
+private :
+  CGAL::Three::Viewer_interface *viewer;
+};
+
+
+} // namepsace GlSplat
+
+#endif // _GLSPLAT_SPLATRENDERER_H_
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/GlSplat_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/GlSplat_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.cpp
new file mode 100644
index 0000000..93a16bc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.cpp
@@ -0,0 +1,140 @@
+// This file is part of GlSplat, a simple splatting C++ library
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
+//
+// GlSplat is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
+
+#include "Shader.h"
+#include <iostream>
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <assert.h>
+#include <QDebug>
+
+namespace GlSplat {
+
+void Shader::define(const char* name, const char* value)
+{
+    mDefines[std::string(name)] = value;
+}
+//--------------------------------------------------------------------------------
+bool Shader::loadSources(const char* vsrc, const char* fsrc)
+{
+    bool allIsOk = true;
+    mProgramID = viewer->glCreateProgram();
+
+    std::string defineStr = "#extension GL_ARB_texture_rectangle : enable\n";
+    for(DefineMap::iterator it = mDefines.begin() ; it!=mDefines.end() ; ++it)
+    {
+      defineStr += "#define " + it->first + " " + it->second + "\n";
+    }
+
+    if(vsrc)
+    {
+        GLuint shaderID = viewer->glCreateShader(GL_VERTEX_SHADER);
+
+        std::string source = defineStr + std::string(vsrc);
+        const GLchar * arbSource = source.c_str();
+
+        viewer->glShaderSource(shaderID, 1, (const GLchar **)&arbSource, 0);
+        viewer->glCompileShader(shaderID);
+
+        int compiled;
+        viewer->glGetShaderiv(shaderID,GL_COMPILE_STATUS,&compiled);
+        allIsOk = allIsOk && compiled;
+        //printInfoLog(shaderID);
+
+        viewer->glAttachShader(mProgramID, shaderID);
+    }
+
+    if(fsrc)
+    {
+        GLuint shaderID = viewer->glCreateShader(GL_FRAGMENT_SHADER);
+
+        std::string source = defineStr + std::string(fsrc);
+        const GLchar * arbSource = source.c_str();
+
+        viewer->glShaderSource(shaderID, 1, (const GLchar **)&arbSource, 0);
+        viewer->glCompileShader(shaderID);
+
+        int compiled;
+        viewer->glGetShaderiv(shaderID,GL_COMPILE_STATUS,&compiled);
+        allIsOk = allIsOk && compiled;
+        //printInfoLog(shaderID);
+
+        viewer->glAttachShader(mProgramID, shaderID);
+    }
+
+    viewer->glLinkProgram(mProgramID);
+
+    int isLinked;
+    viewer->glGetProgramiv(mProgramID, GL_LINK_STATUS, &isLinked);
+    allIsOk = allIsOk && isLinked;
+    mIsValid = isLinked == GL_TRUE;
+    printInfoLog(mProgramID);
+
+    return allIsOk;
+}
+//--------------------------------------------------------------------------------
+void Shader::activate()
+{
+    assert(mIsValid);
+    viewer->glUseProgram(mProgramID);
+}
+void Shader::release(void)
+{
+    viewer->glUseProgram(0);
+}
+//--------------------------------------------------------------------------------
+int Shader::getUniformLocation(const char* name)
+{
+    assert(mIsValid);
+    int loc = viewer->glGetUniformLocation(mProgramID, name);
+    return loc;
+}
+//--------------------------------------------------------------------------------
+void Shader::setSamplerUnit(const char* sampler, int unit)
+{
+    activate();
+    viewer->glUniform1i(getUniformLocation(sampler), unit);
+    release();
+}
+//--------------------------------------------------------------------------------
+int Shader::getAttribLocation(const char* name)
+{
+    assert(mIsValid);
+    int loc = viewer->glGetAttribLocation(mProgramID, name);
+    return loc;
+}
+//--------------------------------------------------------------------------------
+void Shader::printInfoLog(GLuint objectID)
+{
+    int infologLength, charsWritten;
+    GLchar *infoLog;
+    viewer->glGetProgramiv(objectID,GL_INFO_LOG_LENGTH, &infologLength);
+    if(infologLength > 0)
+    {
+        infoLog = new GLchar[infologLength];
+        viewer->glGetProgramInfoLog(objectID, infologLength, &charsWritten, infoLog);
+        if (charsWritten>0)
+          std::cerr << "Shader info : \n" << infoLog << std::endl;
+        delete[] infoLog;
+    }
+}
+
+void Shader::setViewer(CGAL::Three::Viewer_interface *v)
+{
+    viewer = v;
+}
+} // namepsace GlSplat
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.h b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.h
new file mode 100644
index 0000000..24d3604
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/Shader.h
@@ -0,0 +1,139 @@
+// This file is part of GlSplat, a simple splatting C++ library
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
+//
+// GlSplat is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _GLSPLAT_Shader_h_
+#define _GLSPLAT_Shader_h_
+#include <string>
+#include <map>
+#include <QOpenGLFunctions_3_3_Core>
+#include <CGAL/Three/Viewer_interface.h>
+
+namespace GlSplat {
+
+/** Permet de manipuler des shaders en GLSL (OpenGL2.0)
+    Exemple d'utilisation:
+    \code
+    // shader creation:
+    Shader* myShader = new Shader();
+    // loading from files (compilation + linking):
+    myShader->loadFromFiles("myShaderFile.vtx", "myShaderFile.frg");
+
+    // ...
+
+    // at rending time:
+    myShader->enable();
+    // draw objects
+    myShader->disable();
+    \endcode
+*/
+
+class Shader
+{
+public:
+    Shader(void)
+      : mIsValid(false)
+    { }
+    ~Shader()
+    {
+    }
+    void setViewer(CGAL::Three::Viewer_interface *);
+    /** add a \#define
+    */
+    void define(const char* name, const char* value);
+
+    /** Compiles and links the shader from 2 source files
+        \param fileV vertex shader ("" if no vertex shader)
+        \param fileF fragment shader ("" if no fragment shader)
+        \return true if no error occurs
+    */
+//     bool loadFromFiles(const std::string& fileV, const std::string& fileF);
+
+    bool loadSources(const char* vsrc, const char* fsrc);
+
+    /** Enable the shader
+    */
+    void activate();
+
+    /** Releases the shader
+    */
+    void release() ;
+
+    /** \return the index of the uniform variable \a name
+    */
+    int getUniformLocation(const char* name);
+
+    /** Forces a sampler to a given unit
+        Example:
+        \code
+    glActiveTexture(GL_TEXTURE2);
+    glBindTexture(GL_TEXTURE2D, myTextureID);
+    myShader->setSamplerUnit("mySampler", 2);
+        \endcode
+    */
+    void setSamplerUnit(const char* samplerName, int textureUnit);
+
+    /** \returns the index of the generic attribute \a name
+        Tp be used with glVertexAttrib*(...) ou glVertexAttribPointer(...)
+        Example:
+        \code
+    int tangentAttribID = myShader->getAttribLocation("tangent");
+    Vector3 tangent(...);
+    glVertexAttrib3fv(tangentAttribID, tangent);
+    // ou
+    Vector3* tangents = new Vector3[...];
+    glVertexAttribPointer(tangentAttribID, 3, GL_FLOAT, GL_FALSE, 0, tangents);
+    glEnableVertexAttribArray(tangentAttribID);
+        \endcode
+    */
+    int getAttribLocation(const char* name);
+
+    inline void setUniform(const char* name, float a)
+    { viewer->glUniform1f(viewer->glGetUniformLocation(mProgramID, name), a); }
+
+    inline void setUniform(const char* name, int a)
+    { viewer->glUniform1i(viewer->glGetUniformLocation(mProgramID, name), a); }
+
+    inline void setUniform2(const char* name, float* a)
+    { viewer->glUniform2fv(viewer->glGetUniformLocation(mProgramID, name), 1, a); }
+
+    inline void setUniform3(const char* name, float* a)
+    { viewer->glUniform3fv(viewer->glGetUniformLocation(mProgramID, name), 1, a); }
+
+    inline void setUniform4(const char* name, float* a)
+    { viewer->glUniform4fv(viewer->glGetUniformLocation(mProgramID, name), 1, a); }
+
+    inline void setUniform(const char* name, float a, float b)
+    { viewer->glUniform2f(viewer->glGetUniformLocation(mProgramID, name), a, b); }
+
+    inline void setUniform(const char* name, float a, float b, float c)
+    { viewer->glUniform3f(viewer->glGetUniformLocation(mProgramID, name), a, b, c); }
+
+    inline void setUniform(const char* name, float a, float b, float c, float d)
+    { viewer->glUniform4f(viewer->glGetUniformLocation(mProgramID, name), a, b, c, d); }
+
+     CGAL::Three::Viewer_interface *viewer;
+protected:
+
+    bool mIsValid;
+    typedef std::map<std::string,std::string> DefineMap;
+    DefineMap mDefines;
+    void printInfoLog(GLuint objectID);
+    GLuint mProgramID;
+};
+
+} // namepsace GlSplat
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/cmake/FindQGLViewer.cmake b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/cmake/FindQGLViewer.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/cmake/FindQGLViewer.cmake
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/cmake/FindQGLViewer.cmake
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/demo.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/glsplat.qrc b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/glsplat.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/glsplat.qrc
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/glsplat.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/shaders/Finalization.glsl b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/shaders/Finalization.glsl
new file mode 100644
index 0000000..c7c053a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/shaders/Finalization.glsl
@@ -0,0 +1,106 @@
+// This file is part of GlSplat, a simple splatting C++ library
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael at free.fr>
+//
+// GlSplat is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// GlSplat is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with GlSplat. If not, see <http://www.gnu.org/licenses/>.
+
+//#extension GL_ARB_texture_rectangle : enable
+
+#ifndef ES_DEPTH_INTERPOLATION
+  #define ES_DEPTH_INTERPOLATION 0
+#endif
+
+#ifndef ES_OUTPUT_DEPTH
+  #define ES_OUTPUT_DEPTH 0
+#endif
+
+// avoid an annoying bug with the nvidia driver 87XX serie.
+#define epsilon 0.000001
+
+uniform vec4 viewport;
+
+#ifndef ES_DEFERRED_SHADING
+
+uniform sampler2DRect ColorWeight;
+#if (ES_OUTPUT_DEPTH==1)
+uniform sampler2DRect Depth;
+#endif
+
+void Finalization(void)
+{
+  vec4 color = texture2DRect(ColorWeight, gl_FragCoord.st - viewport.xy + epsilon);
+  #if (ES_OUTPUT_DEPTH==1)
+  gl_FragDepth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
+  #endif
+  if (color.w<0.001)
+    discard;
+  gl_FragColor = color/color.w;
+  gl_FragColor.a = 1.;
+}
+
+#else
+
+uniform vec2 unproj;
+
+uniform sampler2DRect ColorWeight;
+uniform sampler2DRect NormalWeight;
+
+#if ( (ES_DEPTH_INTERPOLATION==0) || (ES_OUTPUT_DEPTH==1))
+uniform sampler2DRect Depth;
+#endif
+
+void Finalization(void)
+{
+  vec4 color = texture2DRect(ColorWeight, gl_FragCoord.st - viewport.xy + epsilon);
+
+  if (color.w<0.001)
+    discard;
+
+
+  if(color.w>0.001)
+    color.xyz /= color.w;
+
+  vec3 viewVec = normalize(gl_TexCoord[0].xyz);
+  vec4 normaldepth = texture2DRect(NormalWeight, gl_FragCoord.st + epsilon);
+
+  normaldepth.xyz = normaldepth.xyz/normaldepth.w;
+
+  #if (ES_OUTPUT_DEPTH==1)
+  gl_FragDepth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
+  #endif
+
+  #if ES_DEPTH_INTERPOLATION==2
+    float depth = -normaldepth.z;
+  #elif ES_DEPTH_INTERPOLATION==1
+    float depth = unproj.y/(2.0*normaldepth.z+unproj.x-1.0);
+  #else
+    float depth = texture2DRect(Depth, gl_FragCoord.st + epsilon).x;
+    depth = unproj.y/(2.0*depth+unproj.x-1.0);
+  #endif
+
+  vec3 normal = normaldepth.xyz;
+  #if ES_DEPTH_INTERPOLATION!=0
+    normal.z = sqrt(1. - dot(vec3(normal.xy,0),vec3(normal.xy,0)));
+  #endif
+  normal = normalize(normal);
+  vec3 eyePos = gl_TexCoord[0].xyz * depth;
+
+  gl_FragColor = meshlabLighting(color, eyePos, normal);
+  gl_FragColor.a = 1.0;
+}
+
+#endif
+
+
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/shaders/Raycasting.glsl b/3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/shaders/Raycasting.glsl
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/GlSplat/shaders/Raycasting.glsl
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/GlSplat/shaders/Raycasting.glsl
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Image_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Image_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Image_type.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Image_type.h
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Image_type_fwd.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Image_type_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Image_type_fwd.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Image_type_fwd.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Kernel_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Kernel_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Kernel_type.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Kernel_type.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.cpp
new file mode 100644
index 0000000..a51f730
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.cpp
@@ -0,0 +1,1871 @@
+#include "config.h"
+#include "MainWindow.h"
+#include "Scene.h"
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Qt/debug.h>
+
+#include <QtDebug>
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QSettings>
+#include <QHeaderView>
+#include <QMenu>
+#include <QMenuBar>
+#include <QChar>
+#include <QAction>
+#include <QShortcut>
+#include <QKeySequence>
+#include <QLibrary>
+#include <QPluginLoader>
+#include <QMessageBox>
+#include <QScrollBar>
+#include <QColor>
+#include <QColorDialog>
+#include <QClipboard>
+#include <QCloseEvent>
+#include <QInputDialog>
+#include <QTreeView>
+#include <QSortFilterProxyModel>
+#include <QMap>
+#include <QStandardItemModel>
+#include <QStandardItem>
+#include <stdexcept>
+#ifdef QT_SCRIPT_LIB
+#  include <QScriptValue>
+#  ifdef QT_SCRIPTTOOLS_LIB
+#    include <QScriptEngineDebugger>
+#  endif
+#endif
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include "ui_MainWindow.h"
+#include "ui_Preferences.h"
+#include "ui_Statistics_on_item_dialog.h"
+#include "Show_point_dialog.h"
+#include "File_loader_dialog.h"
+
+#include <QGLViewer/manipulatedCameraFrame.h>
+#include <QGLViewer/manipulatedFrame.h>
+
+#ifdef QT_SCRIPT_LIB
+#  include <QScriptEngine>
+#  include <QScriptValue>
+using namespace CGAL::Three;
+QScriptValue 
+myScene_itemToScriptValue(QScriptEngine *engine, 
+                          CGAL::Three::Scene_item* const &in)
+{ 
+  return engine->newQObject(in); 
+}
+
+void myScene_itemFromScriptValue(const QScriptValue &object, 
+                                 CGAL::Three::Scene_item* &out)
+{
+  out = qobject_cast<CGAL::Three::Scene_item*>(object.toQObject());
+}
+#endif // QT_SCRIPT_LIB
+
+#ifdef QT_SCRIPT_LIB
+#  ifdef QT_SCRIPTTOOLS_LIB
+
+const QScriptEngineDebugger::DebuggerWidget debug_widgets[9] = {
+  QScriptEngineDebugger::ConsoleWidget,
+  QScriptEngineDebugger::StackWidget,
+  QScriptEngineDebugger::ScriptsWidget,
+  QScriptEngineDebugger::LocalsWidget,
+  QScriptEngineDebugger::CodeWidget,
+  QScriptEngineDebugger::CodeFinderWidget,
+  QScriptEngineDebugger::BreakpointsWidget,
+  QScriptEngineDebugger::DebugOutputWidget,
+  QScriptEngineDebugger::ErrorLogWidget
+};
+const QString debug_widgets_names[9] = {
+  "Script console",
+  "Stack",
+  "Scripts",
+  "Locals",
+  "Code",
+  "CodeFinder",
+  "Breakpoints",
+  "DebugOutput",
+  "ErrorLog"
+};
+
+#  endif
+#endif
+
+QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
+{
+  MainWindow* mw = qobject_cast<MainWindow*>(engine->parent());
+  QString result;
+  for (int i = 0; i < context->argumentCount(); ++i) {
+    if (i > 0)
+      result.append(" ");
+    result.append(context->argument(i).toString());
+  }
+
+  if(mw) mw->message(QString("QtScript: ") + result, "");
+
+  return engine->undefinedValue();
+}
+
+MainWindow::~MainWindow()
+{
+  delete ui;
+  delete statistics_ui;
+}
+MainWindow::MainWindow(QWidget* parent)
+  : CGAL::Qt::DemosMainWindow(parent)
+{
+  ui = new Ui::MainWindow;
+  ui->setupUi(this);
+  // remove the Load Script menu entry, when the demo has not been compiled with QT_SCRIPT_LIB
+#if !defined(QT_SCRIPT_LIB)
+  ui->menuBar->removeAction(ui->actionLoad_Script);
+#endif
+  
+  // Save some pointers from ui, for latter use.
+  sceneView = ui->sceneView;
+  viewer = ui->viewer;
+  // do not save the state of the viewer (anoying)
+  viewer->setStateFileName(QString::null);
+
+  // setup scene
+  scene = new Scene(this);
+  viewer->setScene(scene);
+  {
+    QShortcut* shortcut = new QShortcut(QKeySequence(Qt::ALT+Qt::Key_Q), this);
+    connect(shortcut, SIGNAL(activated()),
+            this, SLOT(setFocusToQuickSearch()));
+  }
+
+  proxyModel = new QSortFilterProxyModel(this);
+  proxyModel->setSourceModel(scene);
+  SceneDelegate *delegate = new SceneDelegate(this);
+  delegate->setProxy(proxyModel);
+  delegate->setScene(scene);
+
+
+  connect(ui->searchEdit, SIGNAL(textChanged(QString)),
+          proxyModel, SLOT(setFilterFixedString(QString)));
+  sceneView->setModel(proxyModel);
+
+  // setup the sceneview: delegation and columns sizing...
+  sceneView->setItemDelegate(delegate);
+
+ //sceneView->header()->setStretchLastSection(false);
+  /* sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
+   sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
+  sceneView->header()->setSectionResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
+  sceneView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
+  sceneView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed);
+  sceneView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
+  sceneView->resizeColumnToContents(Scene::ColorColumn);
+  sceneView->resizeColumnToContents(Scene::RenderingModeColumn);
+  sceneView->resizeColumnToContents(Scene::ABColumn);
+  sceneView->resizeColumnToContents(Scene::VisibleColumn);
+*/
+  // setup connections
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          this, SLOT(updateInfo()));
+  
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          this, SLOT(updateDisplayInfo()));
+
+  connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
+          viewer, SLOT(updateGL()));
+
+  connect(scene, SIGNAL(updated()),
+          viewer, SLOT(updateGL()));
+
+  connect(scene, SIGNAL(updated()),
+          this, SLOT(selectionChanged()));
+
+  connect(scene, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)),
+          this, SLOT(removeManipulatedFrame(CGAL::Three::Scene_item*)));
+
+  connect(scene, SIGNAL(updated_bbox()),
+          this, SLOT(updateViewerBBox()));
+
+  connect(scene, SIGNAL(selectionChanged(int)),
+          this, SLOT(selectSceneItem(int)));
+
+  connect(scene, SIGNAL(itemPicked(const QModelIndex &)),
+          this, SLOT(recenterSceneView(const QModelIndex &)));
+
+  connect(sceneView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(updateInfo()));
+
+  connect(sceneView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(updateDisplayInfo()));
+
+  connect(sceneView->selectionModel(), 
+          SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
+          this, SLOT(selectionChanged()));
+
+  sceneView->setContextMenuPolicy(Qt::CustomContextMenu);
+  connect(sceneView, SIGNAL(customContextMenuRequested(const QPoint & )),
+          this, SLOT(showSceneContextMenu(const QPoint &)));
+
+  connect(sceneView, SIGNAL(expanded(QModelIndex)),
+          this, SLOT(setExpanded(QModelIndex)));
+
+  connect(sceneView, SIGNAL(collapsed(QModelIndex)),
+          this, SLOT(setCollapsed(QModelIndex)));
+  connect(this, SIGNAL(collapsed(QModelIndex)),
+          scene, SLOT(setCollapsed(QModelIndex)));
+  connect(this, SIGNAL(expanded(QModelIndex)),
+          scene, SLOT(setExpanded(QModelIndex)));
+
+  connect(scene, SIGNAL(restoreCollapsedState()),
+          this, SLOT(restoreCollapseState()));
+
+  connect(viewer, SIGNAL(selected(int)),
+          this, SLOT(selectSceneItem(int)));
+  connect(viewer, SIGNAL(selectedPoint(double, double, double)),
+          this, SLOT(showSelectedPoint(double, double, double)));
+
+  connect(viewer, SIGNAL(selectionRay(double, double, double, 
+                                      double, double, double)),
+          scene, SIGNAL(selectionRay(double, double, double,
+                                     double, double, double)));
+
+  connect(viewer, SIGNAL(requestContextMenu(QPoint)),
+          this, SLOT(contextMenuRequested(QPoint)));
+
+  // The contextMenuPolicy of infoLabel is now the default one, so that one
+  // can easily copy-paste its text.
+  // connect(ui->infoLabel, SIGNAL(customContextMenuRequested(const QPoint & )),
+  //         this, SLOT(showSceneContextMenu(const QPoint &)));
+
+  connect(ui->actionRecenterScene, SIGNAL(triggered()),
+          viewer, SLOT(update()));
+
+  connect(ui->actionAntiAliasing, SIGNAL(toggled(bool)),
+          viewer, SLOT(setAntiAliasing(bool)));
+
+  connect(ui->actionDraw_two_sides, SIGNAL(toggled(bool)),
+          viewer, SLOT(setTwoSides(bool)));
+  connect(ui->actionQuick_camera_mode, SIGNAL(toggled(bool)),
+          viewer, SLOT(setFastDrawing(bool)));
+
+  // add the "About CGAL..." and "About demo..." entries
+  this->addAboutCGAL();
+  this->addAboutDemo(":/cgal/Polyhedron_3/about.html");
+
+  // Connect the button "addButton" with actionLoad
+  ui->addButton->setDefaultAction(ui->actionLoad);
+  // Same with "removeButton" and "duplicateButton"
+  ui->removeButton->setDefaultAction(ui->actionErase);
+  ui->duplicateButton->setDefaultAction(ui->actionDuplicate);
+
+  // Connect actionQuit (Ctrl+Q) and qApp->quit()
+  connect(ui->actionQuit, SIGNAL(triggered()),
+          this, SLOT(quit()));
+
+  // Connect "Select all items"
+  connect(ui->actionSelect_all_items, SIGNAL(triggered()),
+          this, SLOT(selectAll()));
+
+  // Recent files menu
+  this->addRecentFiles(ui->menuFile, ui->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+
+  // Reset the "Operation menu"
+  clearMenu(ui->menuOperations);
+
+#ifdef QT_SCRIPT_LIB
+  std::cerr << "Enable scripts.\n";
+  script_engine = new QScriptEngine(this);
+  qScriptRegisterMetaType<CGAL::Three::Scene_item*>(script_engine,
+                                       myScene_itemToScriptValue,
+                                       myScene_itemFromScriptValue);
+#  ifdef QT_SCRIPTTOOLS_LIB
+  QScriptEngineDebugger* debugger = new QScriptEngineDebugger(this);
+  debugger->setObjectName("qt script debugger");
+  QAction* debuggerMenuAction = 
+    menuBar()->addMenu(debugger->createStandardMenu());
+  debuggerMenuAction->setText(tr("Qt Script &Debug"));
+  for(unsigned int i = 0; i < 9; ++i)
+  {
+    QDockWidget* dock = new QDockWidget(debug_widgets_names[i], this);
+    dock->setObjectName(debug_widgets_names[i]);
+    dock->setWidget(debugger->widget(debug_widgets[i]));
+    this->addDockWidget(Qt::BottomDockWidgetArea, dock);
+    dock->hide();
+  }
+  debugger->setAutoShowStandardWindow(false);
+  debugger->attachTo(script_engine);
+#  endif // QT_SCRIPTTOOLS_LIB
+  QScriptValue fun = script_engine->newFunction(myPrintFunction);
+  script_engine->globalObject().setProperty("print", fun);
+  
+  //  evaluate_script("print('hello', 'world', 'from QtScript!')");
+  QScriptValue mainWindowObjectValue = script_engine->newQObject(this);
+  script_engine->globalObject().setProperty("main_window", mainWindowObjectValue);
+
+  QScriptValue sceneObjectValue = script_engine->newQObject(scene);
+  mainWindowObjectValue.setProperty("scene", sceneObjectValue);
+  script_engine->globalObject().setProperty("scene", sceneObjectValue);
+
+  QScriptValue viewerObjectValue = script_engine->newQObject(viewer);
+  mainWindowObjectValue.setProperty("viewer", viewerObjectValue);
+  script_engine->globalObject().setProperty("viewer", viewerObjectValue);
+
+  QScriptValue cameraObjectValue = script_engine->newQObject(viewer->camera());
+  viewerObjectValue.setProperty("camera", cameraObjectValue);
+  script_engine->globalObject().setProperty("camera", cameraObjectValue);
+
+  evaluate_script("var plugins = new Array();");
+#  ifdef QT_SCRIPTTOOLS_LIB
+  QScriptValue debuggerObjectValue = script_engine->newQObject(debugger);
+  script_engine->globalObject().setProperty("debugger", debuggerObjectValue);
+#  endif
+#endif
+
+  readSettings(); // Among other things, the column widths are stored.
+
+  // Load plugins, and re-enable actions that need it.
+  loadPlugins();
+
+  // Setup the submenu of the View menu that can toggle the dockwidgets
+  Q_FOREACH(QDockWidget* widget, findChildren<QDockWidget*>()) {
+    ui->menuDockWindows->addAction(widget->toggleViewAction());
+  }
+  ui->menuDockWindows->removeAction(ui->dummyAction);
+
+
+  this->readState("MainWindow", Size|State);
+
+  //Manages the group_item creation
+  actionAddToGroup= new QAction("Add New Group", this);
+
+  if(actionAddToGroup) {
+    connect(actionAddToGroup, SIGNAL(triggered()),
+            this, SLOT(make_new_group()));
+  }
+
+  QMenu* menuFile = findChild<QMenu*>("menuFile");
+  if ( NULL != menuFile )
+  {
+    QList<QAction*> menuFileActions = menuFile->actions();
+
+    // Look for action just after "Load..." action
+    QAction* actionAfterLoad = NULL;
+    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(),
+         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+    {
+      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
+      {
+        ++it_action;
+        if ( it_action != end && NULL != *it_action )
+        {
+          actionAfterLoad = *it_action;
+        }
+      }
+    }
+
+    // Insert "Load implicit function" action
+    if ( NULL != actionAfterLoad )
+    {
+      menuFile->insertAction(actionAfterLoad,actionAddToGroup);
+    }
+  }
+
+  statistics_dlg = NULL;
+  statistics_ui = new Ui::Statistics_on_item_dialog();
+
+#ifdef QT_SCRIPT_LIB
+  // evaluate_script("print(plugins);");
+  Q_FOREACH(QAction* action, findChildren<QAction*>()) {
+    if(action->objectName() != "") {
+      QScriptValue objectValue = script_engine->newQObject(action);
+      script_engine->globalObject().setProperty(action->objectName(),
+                                                objectValue);
+    }
+  }
+  // debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
+#endif
+
+  // setup menu filtering
+  connect(ui->menuOperations, SIGNAL(aboutToShow()), this, SLOT(filterOperations()));
+}
+
+//Recursive function that do a pass over a menu and its sub-menus(etc.) and hide them when they are empty
+void filterMenuOperations(QMenu* menu)
+{
+    Q_FOREACH(QAction* action, menu->actions()) {
+        if(QMenu* menu = action->menu()) {
+            filterMenuOperations(menu);
+            action->setVisible(!(menu->isEmpty()));
+        }
+    }
+
+}
+
+void MainWindow::filterOperations()
+{
+  Q_FOREACH(const PluginNamePair& p, plugins) {
+    Q_FOREACH(QAction* action, p.first->actions()) {
+        action->setVisible( p.first->applicable(action) );
+    }
+  }
+
+  // do a pass over all menus in Operations and their sub-menus(etc.) and hide them when they are empty
+  filterMenuOperations(ui->menuOperations);
+}
+#ifdef QT_SCRIPT_LIB
+void MainWindow::evaluate_script(QString script,
+                                 const QString& filename,
+                                 const bool quiet) {
+  QScriptValue value = script_engine->evaluate(script, filename);
+  if(script_engine->hasUncaughtException()) {
+    QTextStream err(stderr);
+    err << "Qt Script exception:\n"
+        << script_engine->uncaughtException().toString()
+        << "\nBacktrace:\n";
+    Q_FOREACH(QString line, script_engine->uncaughtExceptionBacktrace()) {
+      err << "  " << line << "\n";
+    }
+  }
+  else if(!quiet && !value.isNull() && !value.isUndefined()) {
+    QTextStream(stderr) << "Qt Script evaluated to \""
+                        << value.toString() << "\"\n";
+  }
+}
+
+void MainWindow::evaluate_script_quiet(QString script,
+                                       const QString& filename)
+{
+  evaluate_script(script, filename, true);
+}
+#endif
+
+void MainWindow::enableScriptDebugger(bool b /* = true */)
+{
+  Q_UNUSED(b);
+#ifdef QT_SCRIPT_LIB
+#  ifdef QT_SCRIPTTOOLS_LIB
+  QScriptEngineDebugger* debugger =
+    findChild<QScriptEngineDebugger*>("qt script debugger");
+  if(debugger) {
+    if(b) {
+      debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
+    }
+  }
+  return;
+#  endif
+#endif
+  // If we are here, then the debugger is not available
+  this->error(tr("Your version of Qt is too old, and for that reason "
+                 "the Qt Script Debugger is not available."));
+}
+
+namespace {
+bool actionsByName(QAction* x, QAction* y) {
+  return x->text() < y->text();
+}
+}
+
+//Recursively creates all subMenus containing an action.
+void MainWindow::setMenus(QString name, QString parentName, QAction* a )
+{
+
+        bool hasSub = false;
+        QString menuName, subMenuName;
+        if (!name.isNull())
+        {
+            //Get the menu and submenu names
+            for(int i=0; i<name.size(); i++)
+            {
+                if(name.at(i)=='/')
+                    hasSub = true;
+            }
+
+            if(!hasSub)
+                menuName= name;
+            else
+            {
+                int i;
+                for(i = 0; name.at(i)!='/'; i++)
+                    menuName.append(name.at(i));
+                i++;
+                for(int j = i; j<name.size(); j++)
+                    subMenuName.append(name.at(j));
+                setMenus(subMenuName, menuName, a);
+            }
+
+            //Create the menu and sub menu
+            QMenu* menu = 0;
+            QMenu* parentMenu = 0;
+            //If the menu already exists, don't create a new one.
+            Q_FOREACH(QAction* action, findChildren<QAction*>()) {
+                if(!action->menu()) continue;
+                QString menuText = action->menu()->title();
+                //If the menu title does not correspond to the name of the menu or submenu we want,
+                //go to the next one.
+                if(menuText != menuName) continue;
+                menu = action->menu();
+            }
+
+            bool hasAction = false;
+            if(menu == 0)
+                menu = new QMenu(menuName, this);
+            else //checks the action is not already in the menu
+                if(a->property("added").toBool())
+                    hasAction = true;
+            if(!hasAction)
+                menu->addAction(a);
+            a->setProperty("added", true);
+            //If the parent menu already exists, don't create a new one.
+            Q_FOREACH(QAction* action, findChildren<QAction*>()) {
+                if(!action->menu()) continue;
+                QString menuText = action->menu()->title();
+                //If the menu title does not correspond to the name of the menu or submenu we want,
+                //go to the next one.
+                if(menuText != parentName) continue;
+                parentMenu = action->menu();
+            }
+
+            if(parentMenu == 0)
+                parentMenu = new QMenu(parentName, this);
+            parentMenu->addMenu(menu);
+            ui->menuOperations->removeAction(a);
+    }
+}
+
+
+
+void MainWindow::loadPlugins()
+{
+  Q_FOREACH(QObject *obj, QPluginLoader::staticInstances())
+  {
+    initPlugin(obj);
+    initIOPlugin(obj);
+  }
+  QList<QDir> plugins_directories;
+  QString dirPath = qApp->applicationDirPath();
+  plugins_directories<<dirPath;
+
+  QDir msvc_dir(dirPath);
+  QString build_dir_name = msvc_dir.dirName();//Debug or Release for msvc
+  msvc_dir.cdUp();
+
+  QFileInfoList filist = QDir(dirPath).entryInfoList();
+  filist << msvc_dir.entryInfoList();
+
+  Q_FOREACH(QFileInfo fileinfo, filist)
+  {
+      //checks if the path leads to a directory
+      if(fileinfo.baseName().contains("Plugins"))
+      {
+        QString plugins_dir = fileinfo.absolutePath();
+        plugins_dir.append("/").append(fileinfo.baseName());
+
+        Q_FOREACH(QString package_dir,
+                  QDir(plugins_dir).entryList(QDir::Dirs))
+        {
+          QString package_dir_path(plugins_dir);
+          package_dir_path.append("/").append(package_dir);
+
+          QString libdir_path(package_dir_path);
+          libdir_path.append("/").append(build_dir_name);
+
+          if (QDir(libdir_path).exists())
+            plugins_directories << QDir(libdir_path);
+          else
+            plugins_directories << QDir(package_dir_path);
+        }
+      }
+  }
+  QString env_path = qgetenv("POLYHEDRON_DEMO_PLUGINS_PATH");
+  if(!env_path.isEmpty()) {
+    Q_FOREACH (QString pluginsDir, 
+               env_path.split(":", QString::SkipEmptyParts)) {
+      QDir dir(pluginsDir);
+      if(dir.isReadable())
+        plugins_directories << dir;
+    }
+  }
+  Q_FOREACH (QDir pluginsDir, plugins_directories) {
+    qDebug("# Looking for plugins in directory \"%s\"...",
+           qPrintable(pluginsDir.absolutePath()));
+    Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files)) {
+      if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) {
+        //set plugin name
+        QString name = fileName;
+        name.remove(QRegExp("^lib"));
+        name.remove(QRegExp("\\..*"));
+        //do not load it if it is in the blacklist
+        if ( plugin_blacklist.contains(name) ){
+          qDebug("### Ignoring plugin \"%s\".", qPrintable(fileName));
+          continue;
+        }
+        QDebug qdebug = qDebug();
+        qdebug << "### Loading \"" << fileName.toUtf8().data() << "\"... ";
+        QPluginLoader loader;
+        loader.setFileName(pluginsDir.absoluteFilePath(fileName));
+        QObject *obj = loader.instance();
+        if(obj) {
+          obj->setObjectName(name);
+          bool init1 = initPlugin(obj);
+          bool init2 = initIOPlugin(obj);
+          if (!init1 && !init2)
+            qdebug << "not for this program";
+          else
+            qdebug << "success";
+        }
+        else {
+          qdebug << "error: " << qPrintable(loader.errorString());
+        }
+      }
+    }
+  }
+
+
+//Creates sub-Menus for operations.
+  //!TODO : Make it recursive to allow sub-menus of sub-menus.
+  //!The argument should be the menuPath and it should recurse until hasSub stays false.
+   QList<QAction*> as = ui->menuOperations->actions();
+  Q_FOREACH(QAction* a, as)
+{
+              QString menuPath = a->property("subMenuName").toString();
+              setMenus(menuPath, ui->menuOperations->title(), a);
+              // sort the operations menu by name
+              as = ui->menuOperations->actions();
+              qSort(as.begin(), as.end(), actionsByName);
+              ui->menuOperations->clear();
+              ui->menuOperations->addActions(as);
+          }
+      }
+
+bool MainWindow::hasPlugin(const QString& pluginName) const
+{
+  Q_FOREACH(const PluginNamePair& p, plugins) {
+    if(p.second == pluginName) return true;
+  }
+  return false;
+}
+
+bool MainWindow::initPlugin(QObject* obj)
+{
+  QObjectList childs = this->children();
+  CGAL::Three::Polyhedron_demo_plugin_interface* plugin =
+    qobject_cast<CGAL::Three::Polyhedron_demo_plugin_interface*>(obj);
+  if(plugin) {
+    // Call plugin's init() method
+    obj->setParent(this);
+    plugin->init(this, this->scene, this);
+    plugins << qMakePair(plugin, obj->objectName());
+#ifdef QT_SCRIPT_LIB
+    QScriptValue objectValue =
+      script_engine->newQObject(obj);
+    script_engine->globalObject().setProperty(obj->objectName(), objectValue);
+    evaluate_script_quiet(QString("plugins.push(%1);").arg(obj->objectName()));
+#endif
+
+    Q_FOREACH(QAction* action, plugin->actions()) {
+      // If action does not belong to the menus, add it to "Operations" menu
+      if(!childs.contains(action)) {
+        ui->menuOperations->addAction(action);
+      }
+      // Show and enable menu item
+      addAction(action);
+    }
+    return true;
+  }
+  else 
+    return false;
+}
+
+bool MainWindow::initIOPlugin(QObject* obj)
+{
+  CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin =
+    qobject_cast<CGAL::Three::Polyhedron_demo_io_plugin_interface*>(obj);
+  if(plugin) {
+    io_plugins << plugin;
+    return true;
+  }
+  else 
+    return false;
+}
+
+void MainWindow::clearMenu(QMenu* menu)
+{
+  Q_FOREACH(QAction* action, menu->actions())
+  {
+    QMenu* menu = action->menu();
+    if(menu) {
+      clearMenu(menu);
+    }
+    action->setVisible(false);
+  }
+  menu->menuAction()->setEnabled(false);
+}
+
+void MainWindow::addAction(QAction* action)
+{
+  if(!action) return;
+
+  action->setVisible(true);
+  action->setEnabled(true);
+  Q_FOREACH(QWidget* widget, action->associatedWidgets())
+  {
+//     qDebug() << QString("%1 (%2)\n")
+//       .arg(widget->objectName())
+//       .arg(widget->metaObject()->className());
+    QMenu* menu = qobject_cast<QMenu*>(widget);
+    if(menu)
+    {
+      addAction(menu->menuAction());
+    }
+  }
+}
+
+void MainWindow::addAction(QString actionName,
+                           QString actionText,
+                           QString menuName) {
+  QMenu* menu = 0;
+  Q_FOREACH(QAction* action, findChildren<QAction*>()) {
+    if(!action->menu()) continue;
+    QString menuText = action->menu()->title();
+    if(menuText != menuName) continue;
+    menu = action->menu();
+  }
+  if(menu == 0) {
+    menu = new QMenu(menuName, this);
+    menuBar()->insertMenu(ui->menuView->menuAction(), menu);
+  }
+  QAction* action = new QAction(actionText, this);
+  action->setObjectName(actionName);
+  menu->addAction(action);
+#ifdef QT_SCRIPT_LIB
+  QScriptValue objectValue = script_engine->newQObject(action);
+  script_engine->globalObject().setProperty(action->objectName(),
+                                            objectValue);
+#endif
+}
+
+void MainWindow::viewerShow(float xmin,
+                            float ymin,
+                            float zmin,
+                            float xmax,
+                            float ymax,
+                            float zmax)
+{
+  qglviewer::Vec
+    min_(xmin, ymin, zmin),
+    max_(xmax, ymax, zmax);
+#if QGLVIEWER_VERSION >= 0x020502
+  viewer->camera()->setPivotPoint((min_+max_)*0.5);
+#else
+  viewer->camera()->setRevolveAroundPoint((min_+max_)*0.5);
+#endif
+
+  qglviewer::ManipulatedCameraFrame backup_frame(*viewer->camera()->frame());
+  viewer->camera()->fitBoundingBox(min_, max_);
+  qglviewer::ManipulatedCameraFrame new_frame(*viewer->camera()->frame());
+  *viewer->camera()->frame() = backup_frame;
+  viewer->camera()->interpolateTo(new_frame, 1.f);
+  viewer->setVisualHintsMask(1);
+}
+
+void MainWindow::viewerShow(float x, float y, float z) {
+#if QGLVIEWER_VERSION >= 0x020502
+  viewer->camera()->setPivotPoint(qglviewer::Vec(x, y, z));
+#else
+  viewer->camera()->setRevolveAroundPoint(qglviewer::Vec(x, y, z));
+#endif
+  // viewer->camera()->lookAt(qglviewer::Vec(x, y, z));
+
+  qglviewer::ManipulatedCameraFrame backup_frame(*viewer->camera()->frame());
+  viewer->camera()->fitSphere(qglviewer::Vec(x, y, z),
+                              viewer->camera()->sceneRadius()/100);
+  qglviewer::ManipulatedCameraFrame new_frame(*viewer->camera()->frame());
+  *viewer->camera()->frame() = backup_frame;
+  viewer->camera()->interpolateTo(new_frame, 1.f);
+  viewer->setVisualHintsMask(1);
+}
+
+void MainWindow::message(QString message, QString colorName, QString font) {
+  if (message.endsWith('\n')) {
+    message.remove(message.length()-1, 1);
+  }
+  std::cerr << qPrintable(message) << std::endl;
+  statusBar()->showMessage(message, 5000);
+  message = "<font color=\"" + colorName + "\" style=\"font-style: " + font + ";\" >" +
+    message + "</font><br>";
+  message = "[" + QTime::currentTime().toString() + "] " + message;
+  ui->consoleTextEdit->insertHtml(message);
+  ui->consoleTextEdit->verticalScrollBar()->setValue(ui->consoleTextEdit->verticalScrollBar()->maximum());
+}
+
+void MainWindow::information(QString text) {
+  this->message("INFO: " + text, "");
+}
+
+void MainWindow::warning(QString text) {
+  this->message("WARNING: " + text, "blue");
+}
+
+void MainWindow::error(QString text) {
+  this->message("ERROR: " + text, "red");
+}
+
+void MainWindow::updateViewerBBox()
+{
+  const Scene::Bbox bbox = scene->bbox();
+  const double xmin = bbox.xmin;
+  const double ymin = bbox.ymin;
+  const double zmin = bbox.zmin;
+  const double xmax = bbox.xmax;
+  const double ymax = bbox.ymax;
+  const double zmax = bbox.zmax;
+   //qDebug() << QString("Bounding box: (%1, %2, %3) - (%4, %5, %6)\n")
+   //.arg(xmin).arg(ymin).arg(zmin).arg(xmax).arg(ymax).arg(zmax);
+  qglviewer::Vec 
+    vec_min(xmin, ymin, zmin),
+    vec_max(xmax, ymax, zmax);
+  viewer->setSceneBoundingBox(vec_min,
+                              vec_max);
+  viewer->camera()->showEntireScene();
+}
+
+void MainWindow::reload_item() {
+  QAction* sender_action = qobject_cast<QAction*>(sender());
+  if(!sender_action) return;
+  
+  bool ok;
+  int item_index = sender_action->data().toInt(&ok);
+  QObject* item_object = scene->item(item_index);
+  if(!ok || !item_object || sender_action->data().type() != QVariant::Int) {
+    std::cerr << "Cannot reload item: "
+              << "the reload action has not item attached\n";
+    return;
+  }
+  CGAL::Three::Scene_item* item = qobject_cast<CGAL::Three::Scene_item*>(item_object);
+  if(!item) {
+    std::cerr << "Cannot reload item: "
+              << "the reload action has a QObject* pointer attached\n"
+              << "that is not a Scene_item*\n";
+    return;
+  }
+  QString filename = item->property("source filename").toString();
+  QString loader_name = item->property("loader_name").toString();
+  if(filename.isEmpty() || loader_name.isEmpty()) {
+    std::cerr << "Cannot reload item: "
+              << "the item has no \"source filename\" or no \"loader_name\" attached attached\n";
+    return;
+  }
+
+  CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = find_loader(loader_name);
+  QFileInfo fileinfo(filename);
+
+  CGAL::Three::Scene_item* new_item = load_item(fileinfo, fileloader);
+
+  new_item->setName(item->name());
+  new_item->setColor(item->color());
+  new_item->setRenderingMode(item->renderingMode());
+  new_item->setVisible(item->visible());
+  new_item->invalidateOpenGLBuffers();
+  scene->replaceItem(item_index, new_item, true);
+  item->deleteLater();
+}
+
+CGAL::Three::Polyhedron_demo_io_plugin_interface* MainWindow::find_loader(const QString& loader_name) const {
+  Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin,
+            io_plugins) {
+    if(io_plugin->name() == loader_name) {
+      return io_plugin;
+    }
+  }
+  throw std::invalid_argument(QString("No loader found with the name %1 available")
+                              .arg(loader_name).toStdString()) ;
+}
+
+bool MainWindow::file_matches_filter(const QString& filters,
+                                     const QString& filename )
+{
+  QFileInfo fileinfo(filename);
+  QString filename_striped=fileinfo.fileName();
+
+  //match all filters between ()
+  QRegExp all_filters_rx("\\((.*)\\)");
+
+  QStringList split_filters = filters.split(";;");
+  Q_FOREACH(const QString& filter, split_filters) {
+    //extract filters
+    if ( all_filters_rx.indexIn(filter)!=-1 ){
+      Q_FOREACH(const QString& pattern,all_filters_rx.cap(1).split(' ')){
+        QRegExp rx(pattern);
+        rx.setPatternSyntax(QRegExp::Wildcard);
+        if ( rx.exactMatch(filename_striped) ){
+          return true;
+        }
+      }
+    }
+  }
+  return false;
+}
+
+void MainWindow::open(QString filename)
+{
+  QFileInfo fileinfo(filename);
+
+#ifdef QT_SCRIPT_LIB
+  // Handles the loading of script file from the command line arguments,
+  // and the special command line arguments that start with "javascript:"
+  // or "qtscript:"
+  QString program;
+  if(filename.startsWith("javascript:")) {
+    program=filename.right(filename.size() - 11);
+  }
+  if(filename.startsWith("qtscript:")) {
+    program=filename.right(filename.size() - 9);
+  }
+  if(filename.endsWith(".js")) {
+    load_script(fileinfo);
+    return;
+  }
+  if(!program.isEmpty())
+  {
+    {
+      QTextStream(stderr) << "Execution of script \"" 
+                          << filename << "\"\n";
+                          // << filename << "\", with following content:\n"
+                          // << program;
+    }
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    evaluate_script(program, filename);
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+#endif
+
+  if ( !fileinfo.exists() ){
+    QMessageBox::warning(this,
+                         tr("Cannot open file"),
+                         tr("File %1 does not exist.")
+                         .arg(filename));
+    return;
+  }
+
+
+  QStringList selected_items;
+  QStringList all_items;
+
+  QMap<QString,QString>::iterator dfs_it = 
+    default_plugin_selection.find( fileinfo.completeSuffix() );
+  
+  if ( dfs_it==default_plugin_selection.end() )
+  {
+    // collect all io_plugins and offer them to load if the file extension match one name filter
+    // also collect all available plugin in case of a no extension match
+    Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin, io_plugins) {
+      if ( !io_plugin->canLoad() ) continue;
+      all_items << io_plugin->name();
+      if ( file_matches_filter(io_plugin->loadNameFilters(), filename) )
+        selected_items << io_plugin->name();
+    }
+  }
+  else
+    selected_items << *dfs_it;
+  
+  bool ok;
+  std::pair<QString, bool> load_pair;
+  
+  switch( selected_items.size() )
+  {
+    case 1:
+      load_pair = std::make_pair(selected_items.first(), false);
+      ok=true;
+      break;
+    case 0:
+      load_pair = File_loader_dialog::getItem(fileinfo.fileName(), all_items, &ok);
+      break;
+    default:
+      load_pair = File_loader_dialog::getItem(fileinfo.fileName(), selected_items, &ok);
+  }
+  viewer->context()->makeCurrent();
+  if(!ok || load_pair.first.isEmpty()) { return; }
+  
+  if (load_pair.second)
+     default_plugin_selection[fileinfo.completeSuffix()]=load_pair.first;
+  
+  
+  QSettings settings;
+  settings.setValue("OFF open directory",
+                    fileinfo.absoluteDir().absolutePath());
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Three::Scene_item* scene_item = load_item(fileinfo, find_loader(load_pair.first));
+  QApplication::restoreOverrideCursor();
+
+  if(scene_item != 0) {
+    this->addToRecentFiles(fileinfo.absoluteFilePath());
+  }
+  selectSceneItem(scene->addItem(scene_item));
+}
+
+bool MainWindow::open(QString filename, QString loader_name) {
+  QFileInfo fileinfo(filename); 
+  CGAL::Three::Scene_item* item;
+  try {
+    item = load_item(fileinfo, find_loader(loader_name));
+  }
+  catch(std::logic_error e) {
+    std::cerr << e.what() << std::endl;
+    return false;
+  }
+  selectSceneItem(scene->addItem(item));
+  return true;
+}
+
+
+CGAL::Three::Scene_item* MainWindow::load_item(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface* loader) {
+  CGAL::Three::Scene_item* item = NULL;
+  if(!fileinfo.isFile() || !fileinfo.isReadable()) {
+    throw std::invalid_argument(QString("File %1 is not a readable file.")
+                                .arg(fileinfo.absoluteFilePath()).toStdString());
+  }
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  item = loader->load(fileinfo);
+  QApplication::restoreOverrideCursor();
+  if(!item) {
+    throw std::logic_error(QString("Could not load item from file %1 using plugin %2")
+                           .arg(fileinfo.absoluteFilePath()).arg(loader->name()).toStdString());
+  }
+
+  item->setProperty("source filename", fileinfo.absoluteFilePath());
+  item->setProperty("loader_name", loader->name());
+  return item;
+}
+
+
+void MainWindow::setFocusToQuickSearch()
+{
+  ui->searchEdit->setFocus(Qt::ShortcutFocusReason);
+}
+
+void MainWindow::selectSceneItem(int i)
+{
+  if(i < 0 || i >= scene->numberOfEntries()) {
+    sceneView->selectionModel()->clearSelection();
+    updateInfo();
+    updateDisplayInfo();
+  }
+  else {
+    QItemSelection s =
+      proxyModel->mapSelectionFromSource(scene->createSelection(i));
+
+    sceneView->selectionModel()->select(s,
+                                        QItemSelectionModel::ClearAndSelect);
+  }
+}
+
+
+void MainWindow::showSelectedPoint(double x, double y, double z)
+{
+  static double x_prev = 0;
+  static double y_prev = 0;
+  static double z_prev = 0;
+  double dist = std::sqrt((x-x_prev)*(x-x_prev) + (y-y_prev)*(y-y_prev) + (z-z_prev)*(z-z_prev)); 
+  information(QString("Selected point: (%1, %2, %3) distance to previous: %4").
+              arg(x, 0, 'g', 10).
+              arg(y, 0, 'g', 10).
+              arg(z, 0, 'g', 10).
+              arg(dist,0,'g',10));
+  x_prev = x;
+  y_prev = y;
+  z_prev = z;
+}
+
+void MainWindow::unSelectSceneItem(int i)
+{
+  removeSceneItemFromSelection(i);
+}
+
+void MainWindow::addSceneItemInSelection(int i)
+{
+  QItemSelection s =
+    proxyModel->mapSelectionFromSource(scene->createSelection(i));
+  sceneView->selectionModel()->select(s, QItemSelectionModel::Select);
+  scene->itemChanged(i);
+}
+
+void MainWindow::removeSceneItemFromSelection(int i)
+{
+  QItemSelection s =
+    proxyModel->mapSelectionFromSource(scene->createSelection(i));
+  sceneView->selectionModel()->select(s,
+                                      QItemSelectionModel::Deselect);
+  scene->itemChanged(i);
+}
+
+void MainWindow::selectAll()
+{
+  QItemSelection s =
+    proxyModel->mapSelectionFromSource(scene->createSelectionAll());
+  sceneView->selectionModel()->select(s, 
+                                      QItemSelectionModel::ClearAndSelect);
+}
+
+int MainWindow::getSelectedSceneItemIndex() const
+{
+  QModelIndexList selectedRows = sceneView->selectionModel()->selectedIndexes();
+  if(selectedRows.size() == 0)
+    return -1;
+  else {
+    QModelIndex i = proxyModel->mapToSource(selectedRows.first());
+    return scene->getIdFromModelIndex(i);
+  }
+}
+
+QList<int> MainWindow::getSelectedSceneItemIndices() const
+{
+
+  QModelIndexList selectedIndices = sceneView->selectionModel()->selectedIndexes();
+  QList<int> result;
+  Q_FOREACH(QModelIndex index, selectedIndices) {
+      int temp = scene->getIdFromModelIndex(proxyModel->mapToSource(index));
+      if(!result.contains(temp))
+          result<<temp;
+  }
+  return result;
+}
+
+void MainWindow::selectionChanged()
+{
+  scene->setSelectedItemIndex(getSelectedSceneItemIndex());
+  scene->setSelectedItemsList(getSelectedSceneItemIndices());
+  CGAL::Three::Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item != NULL && item->manipulatable()) {
+    viewer->setManipulatedFrame(item->manipulatedFrame());
+  } else {
+    viewer->setManipulatedFrame(0);
+  }
+  if(viewer->manipulatedFrame() == 0) {
+    Q_FOREACH(CGAL::Three::Scene_item* item, scene->entries()) {
+      if(item->manipulatable() && item->manipulatedFrame() != 0) {
+        if(viewer->manipulatedFrame() != 0) {
+          // there are at least two possible frames
+          viewer->setManipulatedFrame(0);
+          break;
+        } else {
+          viewer->setManipulatedFrame(item->manipulatedFrame());
+        }
+      }
+    }
+  }
+  if(viewer->manipulatedFrame() != 0) {
+    connect(viewer->manipulatedFrame(), SIGNAL(modified()),
+            this, SLOT(updateInfo()));
+  }
+  viewer->updateGL();
+}
+
+void MainWindow::contextMenuRequested(const QPoint& global_pos) {
+  int index = scene->mainSelectionIndex();
+  showSceneContextMenu(index, global_pos);
+}
+
+void MainWindow::showSceneContextMenu(int selectedItemIndex,
+                                      const QPoint& global_pos)
+{
+  CGAL::Three::Scene_item* item = scene->item(scene->getIdFromModelIndex(scene->index(selectedItemIndex,0,QModelIndex())));
+  if(!item) return;
+
+  const char* prop_name = "Menu modified by MainWindow.";
+
+  QMenu* menu = item->contextMenu();
+  if(menu) {
+    bool menuChanged = menu->property(prop_name).toBool();
+    if(!menuChanged) {
+      QAction* actionStatistics =
+      menu->addAction(tr("Statistics..."));
+      actionStatistics->setObjectName("actionStatisticsOnPolyhedron");
+      connect(actionStatistics, SIGNAL(triggered()),
+              this, SLOT(statistics_on_item()));
+      menu->addSeparator();
+      if(!item->property("source filename").toString().isEmpty()) {
+        QAction* reload = menu->addAction(tr("&Reload Item from File"));
+        reload->setData(qVariantFromValue(selectedItemIndex));
+        connect(reload, SIGNAL(triggered()),
+                this, SLOT(reload_item()));
+      }
+      QAction* saveas = menu->addAction(tr("&Save as..."));
+      saveas->setData(qVariantFromValue(selectedItemIndex));
+      connect(saveas,  SIGNAL(triggered()),
+              this, SLOT(on_actionSaveAs_triggered()));
+      QAction* showobject = menu->addAction(tr("&Zoom to this Object"));
+      showobject->setData(qVariantFromValue(selectedItemIndex));
+      connect(showobject, SIGNAL(triggered()),
+              this, SLOT(viewerShowObject()));
+
+      menu->setProperty(prop_name, true);
+    }
+  }
+  menu->addMenu(ui->menuOperations);
+  if(menu)
+    menu->exec(global_pos);
+}
+
+void MainWindow::showSceneContextMenu(const QPoint& p) {
+  QWidget* sender = qobject_cast<QWidget*>(this->sender());
+  if(!sender) return;
+
+  int index = -1;
+  if(sender == sceneView) {
+      QModelIndex modelIndex = sceneView->indexAt(p);
+      if(!modelIndex.isValid())
+      {
+          const char* prop_name = "Menu modified by MainWindow.";
+
+          QMenu* menu = ui->menuFile;
+          if(menu) {
+              bool menuChanged = menu->property(prop_name).toBool();
+              if(!menuChanged) {
+                  menu->setProperty(prop_name, true);
+              }
+          }
+          if(menu)
+              menu->exec(sender->mapToGlobal(p));
+          return;
+      }
+      else
+      {
+          index = proxyModel->mapToSource(modelIndex).row();
+          scene->setSelectedItemIndex(index);
+      }
+  }
+  else {
+    index = scene->mainSelectionIndex();
+  }
+
+  showSceneContextMenu(index, sender->mapToGlobal(p));
+}
+
+void MainWindow::removeManipulatedFrame(CGAL::Three::Scene_item* item)
+{
+  if(item->manipulatable() &&
+     item->manipulatedFrame() == viewer->manipulatedFrame()) {
+    viewer->setManipulatedFrame(0);
+  }
+}
+
+void MainWindow::updateInfo() {
+  CGAL::Three::Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item) {
+    QString item_text = item->toolTip();
+    QString item_filename = item->property("source filename").toString();
+    item_text += QString("Bounding box: min (%1,%2,%3), max(%4,%5,%6)")
+            .arg(item->bbox().xmin)
+            .arg(item->bbox().ymin)
+            .arg(item->bbox().zmin)
+            .arg(item->bbox().xmax)
+            .arg(item->bbox().ymax)
+            .arg(item->bbox().zmax);
+    if(item->getNbIsolatedvertices() > 0)
+    item_text += QString("<br />Number of isolated vertices : %1<br />").arg(item->getNbIsolatedvertices());
+    if(!item_filename.isEmpty()) {
+      item_text += QString("<br />File:<i> %1").arg(item_filename);
+    }
+    ui->infoLabel->setText(item_text);
+  }
+  else
+    ui->infoLabel->clear();
+}
+void MainWindow::updateDisplayInfo() {
+  CGAL::Three::Scene_item* item = scene->item(getSelectedSceneItemIndex());
+  if(item)
+    ui->displayLabel->setPixmap(item->graphicalToolTip());
+  else 
+    ui->displayLabel->clear();
+}
+
+void MainWindow::readSettings()
+{
+  {
+    QSettings settings;
+    // enable anti-aliasing 
+    ui->actionAntiAliasing->setChecked(settings.value("antialiasing", false).toBool());
+    // read plugin blacklist
+    QStringList blacklist=settings.value("plugin_blacklist",QStringList()).toStringList();
+    Q_FOREACH(QString name,blacklist){ plugin_blacklist.insert(name); }
+  }
+}
+
+void MainWindow::writeSettings()
+{
+  this->writeState("MainWindow");
+  {
+    QSettings settings;
+    settings.setValue("antialiasing", 
+                      ui->actionAntiAliasing->isChecked());
+    //setting plugin blacklist
+    QStringList blacklist;
+    Q_FOREACH(QString name,plugin_blacklist){ blacklist << name; }
+    if ( !blacklist.isEmpty() ) settings.setValue("plugin_blacklist",blacklist);
+    else settings.remove("plugin_blacklist");
+  }
+  std::cerr << "Write setting... done.\n";
+}
+
+void MainWindow::quit()
+{
+  close();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+    for(int i=0; i<plugins.size(); i++)
+    {
+      plugins[i].first->closure();
+    }
+  writeSettings();
+  event->accept();
+}
+
+bool MainWindow::load_script(QString filename)
+{
+  QFileInfo fileinfo(filename);
+  return load_script(fileinfo);
+}
+
+bool MainWindow::load_script(QFileInfo info)
+{
+#if defined(QT_SCRIPT_LIB)
+  QString program;
+  QString filename = info.absoluteFilePath();
+  QFile script_file(filename);
+  script_file.open(QIODevice::ReadOnly);
+  program = script_file.readAll();
+  if(!program.isEmpty())
+  {
+    QTextStream(stderr) 
+      << "Execution of script \"" 
+      << filename << "\"\n";
+    evaluate_script(program, filename);
+    return true;
+  }
+#endif
+  return false;
+}
+
+void MainWindow::on_actionLoad_Script_triggered() 
+{
+#if defined(QT_SCRIPT_LIB)
+  QString filename = QFileDialog::getOpenFileName(
+    this,
+    tr("Select a script to run..."),
+    ".",
+    "QTScripts (*.js);;All Files (*)");
+
+  load_script(QFileInfo(filename));
+#endif
+}
+
+void MainWindow::on_actionLoad_triggered()
+{
+  QStringList filters;
+  // we need to special case our way out of this
+  filters << "All Files (*)";
+
+  QStringList extensions;
+
+  typedef QMap<QString, CGAL::Three::Polyhedron_demo_io_plugin_interface*> FilterPluginMap;
+  FilterPluginMap filterPluginMap;
+  
+  Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
+    QStringList split_filters = plugin->loadNameFilters().split(";;");
+    Q_FOREACH(const QString& filter, split_filters) {
+      FilterPluginMap::iterator it = filterPluginMap.find(filter);
+      if(it != filterPluginMap.end()) {
+        qDebug() << "Duplicate Filter: " << it.value();
+        qDebug() << "This filter will not be available.";
+      } else {
+        filterPluginMap[filter] = plugin;
+      }
+      filters << filter;
+    }
+  }
+
+  QSettings settings;
+  QString directory = settings.value("OFF open directory",
+                                     QDir::current().dirName()).toString();
+
+  QFileDialog dialog(this);
+  dialog.setDirectory(directory);
+  dialog.setNameFilters(filters);
+  dialog.setFileMode(QFileDialog::ExistingFiles);
+
+  if(dialog.exec() != QDialog::Accepted) { return; }
+  FilterPluginMap::iterator it = 
+    filterPluginMap.find(dialog.selectedNameFilter());
+  
+  CGAL::Three::Polyhedron_demo_io_plugin_interface* selectedPlugin = NULL;
+
+  if(it != filterPluginMap.end()) {
+    selectedPlugin = it.value();
+  }
+
+  Q_FOREACH(const QString& filename, dialog.selectedFiles()) {
+    CGAL::Three::Scene_item* item = NULL;
+    if(selectedPlugin) {
+      QFileInfo info(filename);
+      item = load_item(info, selectedPlugin);
+      Scene::Item_id index = scene->addItem(item);
+      selectSceneItem(index);
+      this->addToRecentFiles(filename);
+    } else {
+      open(filename);
+    }
+  }
+}
+
+void MainWindow::on_actionSaveAs_triggered()
+{
+  int index = -1;
+  QAction* sender_action = qobject_cast<QAction*>(sender());
+  if(sender_action && !sender_action->data().isNull()) {
+    index = sender_action->data().toInt();
+  }
+
+  if(index < 0) {
+    QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows();
+    if(selectedRows.size() != 1)
+      return;
+    index = getSelectedSceneItemIndex();
+  }
+  CGAL::Three::Scene_item* item = scene->item(index);
+
+  if(!item)
+    return;
+
+  QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> canSavePlugins;
+  QStringList filters;
+  Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
+    if(plugin->canSave(item)) {
+      canSavePlugins << plugin;
+      filters += plugin->saveNameFilters();
+    }
+  }
+  filters << tr("All files (*)");
+
+  if(canSavePlugins.isEmpty()) {
+    QMessageBox::warning(this,
+                         tr("Cannot save"),
+                         tr("The selected object %1 cannot be saved.")
+                         .arg(item->name()));
+    return;
+  }
+
+  QString caption = tr("Save %1 to File...").arg(item->name());
+  QString filename = 
+    QFileDialog::getSaveFileName(this,
+                                 caption,
+                                 QString(),
+                                 filters.join(";;"));
+  save(filename, item);
+}
+
+void MainWindow::save(QString filename, CGAL::Three::Scene_item* item) {
+  QFileInfo fileinfo(filename);
+
+  Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) {
+    if(  plugin->canSave(item) &&
+        file_matches_filter(plugin->saveNameFilters(),filename) )
+    {
+      if(plugin->save(item, fileinfo))
+        break;
+    }
+  }
+}
+
+void MainWindow::on_actionSaveSnapshot_triggered()
+{
+  viewer->saveSnapshot(false);
+}
+
+bool MainWindow::on_actionErase_triggered()
+{
+  int next_index = scene->erase(scene->selectionIndices());
+  selectSceneItem(next_index);
+  return next_index >= 0;
+}
+
+void MainWindow::on_actionEraseAll_triggered()
+{
+  while(on_actionErase_triggered()) {
+  }
+}
+
+void MainWindow::on_actionDuplicate_triggered()
+{
+  int index = scene->duplicate(getSelectedSceneItemIndex());
+  selectSceneItem(index);
+}
+
+void MainWindow::on_actionShowHide_triggered()
+{
+  Q_FOREACH(QModelIndex index, sceneView->selectionModel()->selectedRows())
+  {
+    int i = proxyModel->mapToSource(index).row();
+    CGAL::Three::Scene_item* item = scene->item(i);
+    item->setVisible(!item->visible());
+    scene->itemChanged(i);
+  }
+}
+
+void MainWindow::on_actionSetPolyhedronA_triggered()
+{
+  int i = getSelectedSceneItemIndex();
+  scene->setItemA(i);
+}
+
+void MainWindow::on_actionSetPolyhedronB_triggered()
+{
+  int i = getSelectedSceneItemIndex();
+  scene->setItemB(i);
+}
+void MainWindow::on_actionPreferences_triggered()
+{
+  QDialog dialog(this);
+  Ui::PreferencesDialog prefdiag;
+  prefdiag.setupUi(&dialog);
+  
+  
+  QStandardItemModel* iStandardModel = new QStandardItemModel(this);
+  //add blacklisted plugins
+  Q_FOREACH(QString name, plugin_blacklist)
+  {
+    QStandardItem* item =  new QStandardItem(name);
+    item->setCheckable(true);
+    item->setCheckState(Qt::Checked);
+    iStandardModel->appendRow(item);
+  }
+
+  //add operations plugins
+  Q_FOREACH(PluginNamePair pair,plugins){
+    QStandardItem* item =  new QStandardItem(pair.second);
+    item->setCheckable(true);
+    iStandardModel->appendRow(item);
+  }
+  
+  //add io-plugins
+  Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins)
+  {
+    QStandardItem* item =  new QStandardItem(plugin->name());
+    item->setCheckable(true);
+    if ( plugin_blacklist.contains(plugin->name()) ) item->setCheckState(Qt::Checked);
+    iStandardModel->appendRow(item);
+  }
+
+  //Setting the model
+  prefdiag.listView->setModel(iStandardModel);
+  
+  dialog.exec();  
+  
+  if ( dialog.result() )
+  {
+    plugin_blacklist.clear();
+    for (int k=0,k_end=iStandardModel->rowCount();k<k_end;++k)
+    {
+      QStandardItem* item=iStandardModel->item(k);
+      if (item->checkState()==Qt::Checked)
+        plugin_blacklist.insert(item->text());
+    }
+  }
+  
+  for (int k=0,k_end=iStandardModel->rowCount();k<k_end;++k) delete iStandardModel->item(k);
+  delete iStandardModel;
+}
+
+void MainWindow::on_actionSetBackgroundColor_triggered()
+{
+  QColor c =  QColorDialog::getColor();
+  if(c.isValid()) {
+    viewer->setBackgroundColor(c);
+  }
+}
+
+void MainWindow::on_action_Look_at_triggered()
+{
+  Show_point_dialog dialog(this);
+  dialog.setWindowTitle(tr("Look at..."));
+  int i = dialog.exec();
+  if( i == QDialog::Accepted &&
+      dialog.has_correct_coordinates() )
+  {
+    viewerShow((float)dialog.get_x(),
+               (float)dialog.get_y(),
+               (float)dialog.get_z());
+  }
+}
+
+void MainWindow::viewerShowObject()
+{
+  int index = -1;
+  QAction* sender_action = qobject_cast<QAction*>(sender());
+  if(sender_action && !sender_action->data().isNull()) {
+    index = sender_action->data().toInt();
+  }
+  if(index >= 0) {
+    const Scene::Bbox bbox = scene->item(index)->bbox();
+    viewerShow((float)bbox.xmin, (float)bbox.ymin, (float)bbox.zmin,
+               (float)bbox.xmax, (float)bbox.ymax, (float)bbox.zmax);
+  }
+}
+
+QString MainWindow::camera_string() const
+{
+  return viewer->dumpCameraCoordinates();
+}
+
+void MainWindow::on_actionDumpCamera_triggered()
+{
+  information(QString("Camera: %1")
+              .arg(camera_string()));
+}
+
+void MainWindow::on_action_Copy_camera_triggered()
+{
+  qApp->clipboard()->setText(this->camera_string());
+}
+
+void MainWindow::on_action_Paste_camera_triggered()
+{
+  QString s = qApp->clipboard()->text();
+  viewer->moveCameraToCoordinates(s, 0.5f);
+}
+
+void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
+{
+  viewer->setAddKeyFrameKeyboardModifiers(m);
+}
+
+void MainWindow::on_actionRecenterScene_triggered()
+{
+  updateViewerBBox();
+  viewer->camera()->interpolateToFitScene();
+}
+
+void MainWindow::on_actionLoad_plugin_triggered()
+{
+    //pop a dialog of path selection, get the path and add it to plugins_directory
+
+    QString filters("Library files (*.dll *.DLL *.so *.a *.sl *.dylib *.bundle);;"
+                    "Any files (*)");
+
+    QStringList paths = QFileDialog::getOpenFileNames(
+                this,
+                tr("Select the directory containing your plugins:"),
+                ".",filters);
+    Q_FOREACH(QString fileName, paths)
+    {
+      if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) {
+          QFileInfo fileinfo(fileName);
+        //set plugin name
+        QString name = fileinfo.fileName();
+        name.remove(QRegExp("^lib"));
+        name.remove(QRegExp("\\..*"));
+        QDebug qdebug = qDebug();
+        qdebug << "### Loading \"" << fileName.toUtf8().data() << "\"... ";
+        QPluginLoader loader;
+        loader.setFileName(fileName);
+        QObject *obj = loader.instance();
+        if(obj) {
+          obj->setObjectName(name);
+          bool init1 = initPlugin(obj);
+          bool init2 = initIOPlugin(obj);
+          if (!init1 && !init2)
+              qdebug << "not for this program";
+          else
+              qdebug << "success";
+        }
+        else {
+          qdebug << "error: " << qPrintable(loader.errorString());
+        }
+      }
+    }
+
+//Creates sub-Menus for operations.
+//!TODO : Make it recursive to allow sub-menus of sub-menus.
+//!The argument should be the menuPath and it should recurse until hasSub stays false.
+ QList<QAction*> as = ui->menuOperations->actions();
+
+Q_FOREACH(QAction* a, as)
+{
+            QString menuPath = a->property("subMenuName").toString();
+            setMenus(menuPath, ui->menuOperations->title(), a);
+            // sort the operations menu by name
+            as = ui->menuOperations->actions();
+            qSort(as.begin(), as.end(), actionsByName);
+            ui->menuOperations->clear();
+            ui->menuOperations->addActions(as);
+        }
+}
+
+void MainWindow::recurseExpand(QModelIndex index)
+{
+    int row = index.row();
+    if(index.child(0,0).isValid())
+    {
+        recurseExpand(index.child(0,0));
+    }
+
+    QString name = scene->item(scene->getIdFromModelIndex(index))->name();
+        CGAL::Three::Scene_group_item* group =
+                qobject_cast<CGAL::Three::Scene_group_item*>(scene->item(scene->getIdFromModelIndex(index)));
+        if(group && group->isExpanded())
+        {
+            sceneView->setExpanded(proxyModel->mapFromSource(index), true);
+        }
+        else if (group && !group->isExpanded()){
+            sceneView->setExpanded(proxyModel->mapFromSource(index), false);
+        }
+
+        if( index.sibling(row+1,0).isValid())
+            recurseExpand(index.sibling(row+1,0));
+}
+void MainWindow::restoreCollapseState()
+{
+    QModelIndex modelIndex = scene->index(0,0,scene->invisibleRootItem()->index());
+    if(modelIndex.isValid())
+        recurseExpand(modelIndex);
+}
+void MainWindow::make_new_group()
+{
+    Scene_group_item * group = new Scene_group_item("New group");
+    scene->add_group(group);
+}
+
+void MainWindow::on_upButton_pressed()
+{
+    scene->moveRowUp();
+}
+
+void MainWindow::on_downButton_pressed()
+{
+    scene->moveRowDown();
+}
+
+void MainWindow::recenterSceneView(const QModelIndex &id)
+{
+    if(id.isValid())
+    {
+        // mapFromSource is necessary to convert the QModelIndex received
+        // from the Scene into a valid QModelIndex in the view, beacuse of
+        // the proxymodel
+        sceneView->scrollTo(proxyModel->mapFromSource(id));
+    }
+}
+
+void MainWindow::statistics_on_item()
+{
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  if (statistics_dlg == NULL)
+  {
+    statistics_dlg = new QDialog(this);
+    statistics_ui->setupUi(statistics_dlg);
+    connect(statistics_ui->okButtonBox, SIGNAL(accepted()),
+            statistics_dlg, SLOT(accept()));
+    connect(statistics_ui->updateButton, SIGNAL(clicked()),
+            this, SLOT(statistics_on_item()));
+  }
+  statistics_ui->label_htmltab->setText(get_item_stats());
+
+  statistics_dlg->show();
+  statistics_dlg->raise();
+
+  QApplication::restoreOverrideCursor();
+}
+
+/* Creates a string containing an html table. This string is constructed by appending each parts of each row, so that the data can
+  depend on the number of selected items. This String is then returned.*/
+QString MainWindow::get_item_stats()
+{
+  //1st step : get all classnames of the selected items
+  QList<QString> classnames;
+  Q_FOREACH(int id, getSelectedSceneItemIndices())
+  {
+    QString classname = scene->item(id)->metaObject()->className();
+    if(!classnames.contains(classname))
+      classnames << classname;
+  }
+  //2nd step : separate the selection in lists corresponding to their classname
+  QVector< QList<Scene_item*> > items;
+  items.resize(classnames.size());
+  Q_FOREACH(int id, getSelectedSceneItemIndices())
+  {
+    Scene_item* s_item = scene->item(id);
+    for(int i=0; i<items.size(); i++)
+      if(classnames.at(i).contains(s_item->metaObject()->className()))
+      {
+        items[i] << s_item;
+        break;
+      }
+  }
+  //last step :: making tables for each type of item
+  QString str;
+  for(int i=0; i< classnames.size(); i++)
+  {
+    CGAL::Three::Scene_item::Header_data data = items[i].at(0)->header();
+    int title = 0;
+    int titles_limit =0;
+    if(data.titles.size()>0)
+    {
+      //1st row : item names
+      str.append("<html> <table border=1>""<tr><td colspan = 2></td>");
+      Q_FOREACH(Scene_item* sit, items[i])
+      {
+        str.append(QString("<td>%1</td>").arg(sit->name()));
+      }
+
+
+
+      for(int j=0; j<data.categories.size(); j++)
+      {
+        str.append(QString("<tr><th rowspan=%1> %2 </th>")
+                   .arg(QString::number(data.categories[j].second))
+                   .arg(data.categories[j].first));
+        titles_limit+=data.categories[j].second;
+        str.append(QString("<td> %1 </td>").arg(data.titles.at(title)));
+        Q_FOREACH(Scene_item* sit, items[i])
+        {
+          str.append(QString("<td>%1</td>").arg(sit->compute_stats(title)));
+        }
+        title++;
+        for(;title<titles_limit; title++)
+        {
+          str.append(QString("</tr><tr><td> %1 </td>").arg(data.titles.at(title)));
+          Q_FOREACH(Scene_item* sit, items[i])
+          {
+            str.append(QString("<td>%1</td>").arg(sit->compute_stats(title)));
+          }
+        }
+
+        str.append("</tr>");
+      }
+
+      str.append(QString("</tr>""</table></html>"));
+    }
+  }
+  return str;
+}
+void MainWindow::setCollapsed(QModelIndex index)
+{
+  Q_EMIT collapsed(proxyModel->mapToSource(index));
+}
+
+void MainWindow::setExpanded(QModelIndex index)
+{
+  Q_EMIT expanded(proxyModel->mapToSource(index));
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.h b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.h
new file mode 100644
index 0000000..e2e8a9e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.h
@@ -0,0 +1,386 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+#include "config.h"
+#include "MainWindow_config.h"
+
+#include <QtOpenGL/qgl.h>
+#include <CGAL/Qt/DemosMainWindow.h>
+#ifdef QT_SCRIPT_LIB
+#  include  <QScriptEngine>
+#endif
+
+#include <QVector>
+#include <QList>
+#include <QFileInfo>
+#include <QStringList>
+#include <QSet>
+#include <QModelIndex>
+class Scene;
+class Viewer;
+class QTreeView;
+class QMenu;
+namespace CGAL {
+namespace Three{
+class Polyhedron_demo_io_plugin_interface;
+class Polyhedron_demo_plugin_interface;
+class Scene_item;
+}
+}
+
+class QSortFilterProxyModel;
+
+namespace Ui {
+  class MainWindow;
+  class Statistics_on_item_dialog;
+}
+
+#include "Polyhedron_type_fwd.h"
+
+#include "Messages_interface.h"
+
+/*!
+ * \brief The main window of the applicatipon.
+ * It contains all the widgets, the menus and the elements of interface
+ * of the application.*/
+
+class MAINWINDOW_EXPORT MainWindow : 
+  public CGAL::Qt::DemosMainWindow,
+  public Messages_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Messages_interface)
+public:
+  /*! \brief The constructor
+   * It links the class with its UI file and sets it up.
+   * It also saves pointers to viewer and the sceneView.
+   * Then it creates and initializes the scene and do the
+   * connexions with the UI. Finally it loads the plugins.*/
+
+  MainWindow(QWidget* parent = 0);
+  ~MainWindow();
+
+  /*! Find an IO plugin.
+   * throws std::invalid_argument if no loader with that argument can be found
+   @returns the IO plugin associated with `loader_name`*/
+  CGAL::Three::Polyhedron_demo_io_plugin_interface* find_loader(const QString& loader_name) const;
+  
+  /*! \brief Load an item with a given loader.
+   * throws `std::logic_error` if loading does not succeed or
+   * `std::invalid_argument` if `fileinfo` specifies an invalid file*/
+  CGAL::Three::Scene_item* load_item(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface*);
+
+Q_SIGNALS:
+  void on_closure();
+  void expanded(QModelIndex);
+  void collapsed(QModelIndex);
+
+
+public Q_SLOTS:
+  //!Creates a new group and adds it to the scene.
+  void make_new_group();
+  void updateViewerBBox();
+  void open(QString);
+  void on_upButton_pressed();
+  void on_downButton_pressed();
+  void restoreCollapseState();
+  void setExpanded(QModelIndex);
+  void setCollapsed(QModelIndex);
+  /// given a file extension file, returns true if `filename` matches the filter
+  bool file_matches_filter(const QString& filters, const QString& filename);
+  //!Prints a dialog containing statistics on the selected polyhedrons.
+  void statistics_on_item();
+  /*! Open a file with a given loader, and return true if it was successful.
+   This slot is for use by scripts.*/
+  bool open(QString filename, QString loader_name);
+
+  /*! Reloads an item. Expects to be called by a QAction with the
+   index of the item to be reloaded as data attached to the action.
+   The index must identify a valid `Scene_item`.*/
+  void reload_item();
+  
+  /*!
+   * This is an overloaded function.
+   * If QT_SCRIPT_LIB is defined, returns true if the script is valid.
+   * If not, returns false.
+   */
+  bool load_script(QString filename);
+
+  /*! If QT_SCRIPT_LIB is defined, returns true if the script is valid.
+  * If not, returns false.
+  */
+  bool load_script(QFileInfo);
+
+  /*!
+   * Gives the keyboard input focus to the widget searchEdit.
+   */
+  void setFocusToQuickSearch();
+
+  /*!
+   * Clears the current selection and select the scene_item with
+   * the index i in the sceneView. Calls itemChanged(i) from the scene.
+   */
+  void selectSceneItem(int i);
+  /*!
+   * Prints coordinates of a point and its distance to the last
+   * position printed by this function.
+   */
+  void showSelectedPoint(double, double, double);
+  /*!
+   * Calls removeSceneItemFromSelection(i).
+   */
+  void unSelectSceneItem(int i);
+  /*!
+   * Clears the current selection and select all the scene_items
+   * in the sceneView.
+   */
+  void selectAll();
+  /*!
+   * Adds the scene_item with the index i in the sceneView to the
+   * current selection. Calls itemChanged(i) from the scene.
+   */
+  void addSceneItemInSelection(int i);
+
+  /*!
+   * Removes the scene_item with the index i in the sceneView to the
+   * current selection. Calls itemChanged(i) from the scene.
+   */
+  void removeSceneItemFromSelection(int i);
+
+  /*!
+   * Calls setAddKeyFrameKeyboardModifiers(m) from the viewer.
+   */
+  void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
+  /*!
+   * Set the visibility of all actions from the targeted menu
+   * and its submenus to false and disables them.
+   */
+  void clearMenu(QMenu*);
+  /*!
+   * Enables and sets the targeted action's visibility to true.
+   * Does the same in all the menus of the widgets associated with
+   * this action.
+   */
+  void addAction(QAction*);
+  /*!
+   * Creates an action with text actionText named actionName and
+   * adds it to the menu menuName. If menuName does not exist,
+   * it is created.
+   */
+  void addAction(QString actionName,
+                 QString actionText,
+                 QString menuName);
+  /*!
+   * Sets the scene center to the target position and makes the
+   * scene slide to this new center. Also sets the pivotPoint of
+   * the camera to this position.
+   */
+  void viewerShow(float, float, float);
+  /*!
+   * Sets the scene center to be the center of the target BBox.
+   * Also sets the pivotPoint of the camera to this position.
+   */
+  void viewerShow(float, float, float, float, float, float);
+  /*!
+   * Centers the scene on the target object.
+   */
+  void viewerShowObject();
+  /*!
+   * Displays a text preceded by the mention "INFO :".
+   */
+  void information(QString);
+  /*!
+   * Displays a blue text preceded by the mention "WARNING :".
+   */
+  void warning(QString);
+  /*!
+   * Displays a red text preceded by the mention "ERROR :".
+   */
+  void error(QString);
+
+    //!Displays a text in the chosen html color with the chosen html font.
+
+  void message(QString, QString, QString = QString("normal"));
+
+    //!Returns true if the target plugin is present. If not, returns false.
+  bool hasPlugin(const QString&) const;
+  /*!
+   * If able, finds a script debugger and interrupts current action. Default
+   * value for parameter is true.
+   */
+  void enableScriptDebugger(bool = true);
+
+protected Q_SLOTS:
+
+   //!Gets the new selected item(s) from the sceneView and updates the scene
+   //!and viewer accordingly.
+  /*!
+   * Set the scene selected item or selected item list. Sets the manipulated
+   * frame of the viewer to the new selected item's and calls updateGL().
+   */
+  void selectionChanged();
+  //! Scrolls to the new selected item.
+  void recenterSceneView(const QModelIndex &id);
+
+  /*!
+   * Invoques a context menu for the currently selected item at the requested
+   * position.
+   */
+  void contextMenuRequested(const QPoint& global_pos);
+  /*!
+   * Invoques a context menu for the requested item at the requested
+   * position.
+   */
+  void showSceneContextMenu(int selectedItemIndex,
+                            const QPoint& global_pos);
+
+  //!This is an overloaded function. Invoques a context menu at the requested
+  //!position.
+  /*!
+   * If the widget which received the request is not the sceneView, the index
+   * chosen by default for the menu is the one of the currently selected item.
+   * If it is the sceneView, then the index of the clicked item is collected.
+   * If this index is valid, then it is used for the menu. If not, the function
+   * returns.
+   */
+  void showSceneContextMenu(const QPoint& local_pos_of_treeview);
+
+  //!Prints information about the currently selected item if able.
+  void updateInfo();
+  //!Prints graphical information about the currently selected item if able.
+  void updateDisplayInfo();
+  //!Sets the current manipulated frame to 0.
+  void removeManipulatedFrame(CGAL::Three::Scene_item*);
+
+  // settings
+  //!Closes the main window.
+  void quit();
+  //!Reads the plugin_blacklist contents and apply them.
+  void readSettings();
+  //!Sets up the plugin_blacklist.
+  void writeSettings();
+
+  // load, erase, duplicate
+  //!Loops on on_actionErase_triggered();
+  void on_actionEraseAll_triggered();
+  //!Opens a dialog to open one or several files.
+  void on_actionLoad_triggered();
+  //!Erases the selected items. Returns true if items remain in the sceneView.
+  bool on_actionErase_triggered();
+  //!Duplicates the selected item and selects the new item.
+  void on_actionDuplicate_triggered();
+  //!If QT_SCRIPT_LIB is defined, opens a dialog to choose a script.
+  void on_actionLoad_Script_triggered();
+  //!Loads a plugin from a specified directory
+  void on_actionLoad_plugin_triggered();
+  // Show/Hide
+  //!Swap the visibility of the selected item(s).
+  void on_actionShowHide_triggered();
+
+  // Select A/B
+  //!Sets the selected item as item_A.
+  void on_actionSetPolyhedronA_triggered();
+  //!Sets the selected item as Item_B.
+  void on_actionSetPolyhedronB_triggered();
+
+  //Preferences edition
+  //!Opens the Preferences dialog.
+  void on_actionPreferences_triggered();
+  // save as...
+  //!Opens a dialog to save selected item if able.
+  void on_actionSaveAs_triggered(); 
+  //!Calls the function save of the current plugin if able.
+  void save(QString filename, CGAL::Three::Scene_item* item);
+  //!Calls the function saveSnapShot of the viewer.
+  void on_actionSaveSnapshot_triggered();
+  //!Opens a Dialog to choose a color and make it the background color.
+  void on_actionSetBackgroundColor_triggered();
+  /*! Opens a Dialog to enter coordinates of the new center point and sets it
+   * with viewerShow.
+   *@see viewerShow(float, float, float, float, float, float)
+   */
+  void on_action_Look_at_triggered();
+  //!Returns the position and orientation of the current camera frame.
+  QString camera_string() const;
+  /*! Prints the position and orientation of the current camera frame.
+   * @see camera_string()
+   */
+  void on_actionDumpCamera_triggered();
+  //!Sets the coordinates of the camera in the clipboard text.
+  void on_action_Copy_camera_triggered();
+  //!Gets coordinates from the clipboard and sets them as the current ones for
+  //!the camera.
+  void on_action_Paste_camera_triggered();
+  //!Hides not available operations and show available operations in all the
+  //!menus.
+  void filterOperations();
+  //!Updates the bounding box and moves the camera to fits the scene.
+  void on_actionRecenterScene_triggered();
+protected:
+  QList<QAction*> createSubMenus(QList<QAction*>);
+  /*! For each objects in the sceneView, loads the associated plugins.
+   * Gets the property "submenuName" of all the actions and creates submenus.
+   * Sorts the Operations menu by name.
+   * @see initPlugin(QObject*);
+   * @see initIOPlugin(QObject*);
+   */
+  void loadPlugins();
+  /*!
+   * \brief Initializes the plugins.
+   * Makes pairs between plugins and object names and fills the Operations menu.
+   * Called only once.
+   */
+  bool initPlugin(QObject*);
+  //!Initializes the IO plugin for the target object.
+  bool initIOPlugin(QObject*);
+  /*!
+   * Calls writeSettings() and set the flag accepted for the event.
+   * @see writeSettings()
+   */
+  void closeEvent(QCloseEvent *event);
+  /*! Returns the currently selected item in the sceneView. Returns -1
+   * if none is selected.
+   */
+  int getSelectedSceneItemIndex() const;
+  //! Returns a list of the selected items in the sceneView.
+  QList<int> getSelectedSceneItemIndices() const;
+private:
+  void recurseExpand(QModelIndex index);
+  QString get_item_stats();
+  QString strippedName(const QString &fullFileName);
+  void setMenus(QString, QString, QAction *a);
+  /// plugin black-list
+  QSet<QString> plugin_blacklist;
+  Scene* scene;
+  Viewer* viewer;
+  QSortFilterProxyModel* proxyModel;
+  QTreeView* sceneView;
+  Ui::MainWindow* ui;
+  QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> io_plugins;
+  QMap<QString,QString> default_plugin_selection;
+  // typedef to make Q_FOREACH work
+  typedef QPair<CGAL::Three::Polyhedron_demo_plugin_interface*, QString> PluginNamePair;
+  QVector<PluginNamePair > plugins;
+  //!Called when "Add new group" in the file menu is triggered.
+  QAction* actionAddToGroup;
+  void print_message(QString message) { messages->information(message); }
+  Messages_interface* messages;
+
+  QDialog *statistics_dlg;
+  Ui::Statistics_on_item_dialog* statistics_ui;
+
+#ifdef QT_SCRIPT_LIB
+  QScriptEngine* script_engine;
+public:
+  /*! Evaluates a script and search for uncaught exceptions. If quiet is false, prints the
+   *backtrace of the uncaught exceptions.
+   */
+  void evaluate_script(QString script, 
+                       const QString & fileName = QString(),
+                       const bool quiet = false);
+  //! Calls evaluate_script(script, filename, true).
+  void evaluate_script_quiet(QString script, 
+                             const QString & fileName = QString());
+#endif
+};
+
+#endif // ifndef MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.ui
new file mode 100644
index 0000000..bd6e04e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow.ui
@@ -0,0 +1,691 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>978</width>
+    <height>594</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Three</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="Polyhedron_3.qrc">
+    <normaloff>:/cgal/icons/resources/cgal_logo.xpm</normaloff>:/cgal/icons/resources/cgal_logo.xpm</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout_2">
+    <item>
+     <widget class="Viewer" name="viewer" native="true">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>1</verstretch>
+       </sizepolicy>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>978</width>
+     <height>26</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="actionLoad"/>
+    <addaction name="actionErase"/>
+    <addaction name="actionEraseAll"/>
+    <addaction name="actionDuplicate"/>
+    <addaction name="actionSaveAs"/>
+    <addaction name="actionSaveSnapshot"/>
+    <addaction name="separator"/>
+    <addaction name="actionLoad_Script"/>
+    <addaction name="separator"/>
+    <addaction name="actionLoad_plugin"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+    <addaction name="actionShowHide"/>
+    <addaction name="actionSetPolyhedronA"/>
+    <addaction name="actionSetPolyhedronB"/>
+    <addaction name="actionSelect_all_items"/>
+    <addaction name="actionPreferences"/>
+   </widget>
+   <widget class="QMenu" name="menuOperations">
+    <property name="title">
+     <string>&Operations</string>
+    </property>
+    <widget class="QMenu" name="menu_Boolean_operations">
+     <property name="title">
+      <string>&Boolean Operations</string>
+     </property>
+     <addaction name="actionToNef"/>
+     <addaction name="actionToPoly"/>
+     <addaction name="actionUnion"/>
+     <addaction name="actionIntersection"/>
+     <addaction name="actionDifference"/>
+     <addaction name="separator"/>
+     <addaction name="actionMinkowskiSum"/>
+    </widget>
+    <addaction name="actionEstimateCurvature"/>
+    <addaction name="actionSelfIntersection"/>
+    <addaction name="actionConvexHull"/>
+    <addaction name="actionKernel"/>
+    <addaction name="actionSimplify"/>
+    <addaction name="actionRemeshing"/>
+    <addaction name="actionConvexDecomposition"/>
+    <addaction name="menu_Boolean_operations"/>
+    <addaction name="actionInsideOut"/>
+   </widget>
+   <widget class="QMenu" name="menuView">
+    <property name="title">
+     <string>&View</string>
+    </property>
+    <widget class="QMenu" name="menuDockWindows">
+     <property name="title">
+      <string>&Dock Windows</string>
+     </property>
+     <addaction name="dummyAction"/>
+    </widget>
+    <widget class="QMenu" name="menuCamera">
+     <property name="title">
+      <string>Ca&mera</string>
+     </property>
+     <addaction name="actionDumpCamera"/>
+     <addaction name="action_Copy_camera"/>
+     <addaction name="action_Paste_camera"/>
+    </widget>
+    <addaction name="actionRecenterScene"/>
+    <addaction name="action_Look_at"/>
+    <addaction name="actionAntiAliasing"/>
+    <addaction name="actionDraw_two_sides"/>
+    <addaction name="actionQuick_camera_mode"/>
+    <addaction name="actionSetBackgroundColor"/>
+    <addaction name="menuDockWindows"/>
+    <addaction name="menuCamera"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuOperations"/>
+   <addaction name="menuView"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QDockWidget" name="sceneDockWidget">
+   <property name="locale">
+    <locale language="English" country="UnitedStates"/>
+   </property>
+   <property name="windowTitle">
+    <string>Geometric Objects</string>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>1</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContent">
+    <layout class="QGridLayout" name="gridLayout_2">
+     <item row="0" column="0">
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QToolButton" name="addButton">
+           <property name="text">
+            <string>+</string>
+           </property>
+           <property name="icon">
+            <iconset resource="Polyhedron_3.qrc">
+             <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QToolButton" name="removeButton">
+           <property name="text">
+            <string>-</string>
+           </property>
+           <property name="icon">
+            <iconset resource="Polyhedron_3.qrc">
+             <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QToolButton" name="duplicateButton">
+           <property name="text">
+            <string>...</string>
+           </property>
+           <property name="icon">
+            <iconset resource="Polyhedron_3.qrc">
+             <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QToolButton" name="upButton">
+           <property name="text">
+            <string>...</string>
+           </property>
+           <property name="icon">
+            <iconset resource="Polyhedron_3.qrc">
+             <normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QToolButton" name="downButton">
+           <property name="text">
+            <string>...</string>
+           </property>
+           <property name="icon">
+            <iconset resource="Polyhedron_3.qrc">
+             <normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="searchEdit">
+           <property name="placeholderText">
+            <string>Quick filter... <Alt+Q></string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QTreeView" name="sceneView">
+         <property name="editTriggers">
+          <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+         </property>
+         <property name="dragDropMode">
+          <enum>QAbstractItemView::InternalMove</enum>
+         </property>
+         <property name="alternatingRowColors">
+          <bool>true</bool>
+         </property>
+         <property name="selectionMode">
+          <enum>QAbstractItemView::ExtendedSelection</enum>
+         </property>
+         <property name="indentation">
+          <number>10</number>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QDockWidget" name="consoleDockWidget">
+   <property name="allowedAreas">
+    <set>Qt::BottomDockWidgetArea|Qt::LeftDockWidgetArea|Qt::TopDockWidgetArea</set>
+   </property>
+   <property name="windowTitle">
+    <string>Console</string>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>8</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents">
+    <layout class="QVBoxLayout" name="verticalLayout_3">
+     <item>
+      <widget class="QTextEdit" name="consoleTextEdit">
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QDockWidget" name="infoDockWidget">
+   <property name="windowTitle">
+    <string>Infos</string>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>8</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents_2">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0">
+       <property name="spacing">
+        <number>0</number>
+       </property>
+       <item>
+        <widget class="QScrollArea" name="scrollArea">
+         <property name="minimumSize">
+          <size>
+           <width>350</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="frameShape">
+          <enum>QFrame::NoFrame</enum>
+         </property>
+         <property name="widgetResizable">
+          <bool>true</bool>
+         </property>
+         <widget class="QWidget" name="scrollAreaWidgetContents">
+          <property name="geometry">
+           <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>534</width>
+            <height>174</height>
+           </rect>
+          </property>
+          <layout class="QGridLayout" name="gridLayout">
+           <item row="0" column="0">
+            <widget class="QLabel" name="infoLabel">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>1</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="contextMenuPolicy">
+              <enum>Qt::DefaultContextMenu</enum>
+             </property>
+             <property name="lineWidth">
+              <number>0</number>
+             </property>
+             <property name="alignment">
+              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+             </property>
+             <property name="textInteractionFlags">
+              <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="displayLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionSimplify">
+   <property name="text">
+    <string>&Simplification</string>
+   </property>
+  </action>
+  <action name="actionCatmullClark">
+   <property name="text">
+    <string>&Catmull-Clark</string>
+   </property>
+  </action>
+  <action name="actionKernel">
+   <property name="text">
+    <string>&Kernel</string>
+   </property>
+  </action>
+  <action name="actionUnion">
+   <property name="text">
+    <string>&Union (A/B)</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O, U</string>
+   </property>
+  </action>
+  <action name="actionIntersection">
+   <property name="text">
+    <string>&Intersection (A/B)</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O, I</string>
+   </property>
+  </action>
+  <action name="actionDifference">
+   <property name="text">
+    <string>&Difference (A/B)</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O, D</string>
+   </property>
+  </action>
+  <action name="actionFitPlane">
+   <property name="text">
+    <string>Fit &Plane</string>
+   </property>
+  </action>
+  <action name="actionFitLine">
+   <property name="text">
+    <string>Fit &Line</string>
+   </property>
+  </action>
+  <action name="actionEstimateCurvature">
+   <property name="text">
+    <string>&Curvature Estimation</string>
+   </property>
+  </action>
+  <action name="actionLoad">
+   <property name="icon">
+    <iconset resource="Polyhedron_3.qrc">
+     <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
+   </property>
+   <property name="text">
+    <string>&Load...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+L</string>
+   </property>
+  </action>
+  <action name="actionErase">
+   <property name="icon">
+    <iconset resource="Polyhedron_3.qrc">
+     <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
+   </property>
+   <property name="text">
+    <string>&Erase</string>
+   </property>
+   <property name="shortcut">
+    <string>Del</string>
+   </property>
+  </action>
+  <action name="actionDuplicate">
+   <property name="icon">
+    <iconset resource="Polyhedron_3.qrc">
+     <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
+   </property>
+   <property name="text">
+    <string>&Duplicate</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+D</string>
+   </property>
+  </action>
+  <action name="actionSqrt3">
+   <property name="text">
+    <string>&Sqrt3</string>
+   </property>
+  </action>
+  <action name="actionAntiAliasing">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&Antialiasing</string>
+   </property>
+  </action>
+  <action name="dummyAction">
+   <property name="text">
+    <string>n/a</string>
+   </property>
+  </action>
+  <action name="actionConvexHull">
+   <property name="text">
+    <string>&Convex Hull</string>
+   </property>
+  </action>
+  <action name="actionEraseAll">
+   <property name="text">
+    <string>&Erase All</string>
+   </property>
+  </action>
+  <action name="actionOptions">
+   <property name="text">
+    <string>&Options...</string>
+   </property>
+  </action>
+  <action name="actionLoop">
+   <property name="text">
+    <string>&Loop</string>
+   </property>
+  </action>
+  <action name="actionSaveAs">
+   <property name="text">
+    <string>Save &as...</string>
+   </property>
+  </action>
+  <action name="actionSave">
+   <property name="text">
+    <string>&Save</string>
+   </property>
+  </action>
+  <action name="actionSaveAll">
+   <property name="text">
+    <string>Save A&ll</string>
+   </property>
+  </action>
+  <action name="actionMergeAll">
+   <property name="text">
+    <string>Mer&ge All</string>
+   </property>
+  </action>
+  <action name="actionMerge">
+   <property name="text">
+    <string>&Merge</string>
+   </property>
+  </action>
+  <action name="actionSelfIntersection">
+   <property name="text">
+    <string>Self-&intersection</string>
+   </property>
+  </action>
+  <action name="actionSelectAll">
+   <property name="text">
+    <string>Select &All</string>
+   </property>
+  </action>
+  <action name="actionSelectNone">
+   <property name="text">
+    <string>Select &None</string>
+   </property>
+  </action>
+  <action name="actionSelectInvert">
+   <property name="text">
+    <string>&Invert Selection</string>
+   </property>
+  </action>
+  <action name="actionShowHide">
+   <property name="text">
+    <string>Show/Hide</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Space</string>
+   </property>
+  </action>
+  <action name="actionSetPolyhedronA">
+   <property name="text">
+    <string>Set Polyhedron A</string>
+   </property>
+  </action>
+  <action name="actionSetPolyhedronB">
+   <property name="text">
+    <string>Set Polyhedron B</string>
+   </property>
+  </action>
+  <action name="actionInsideOut">
+   <property name="text">
+    <string>&Inside-Out</string>
+   </property>
+  </action>
+  <action name="actionRemeshing">
+   <property name="text">
+    <string>&Remeshing</string>
+   </property>
+  </action>
+  <action name="actionConvexDecomposition">
+   <property name="text">
+    <string>Convex Decomposition</string>
+   </property>
+  </action>
+  <action name="actionMVC">
+   <property name="text">
+    <string>Mean &Value Coordinates</string>
+   </property>
+  </action>
+  <action name="actionDCP">
+   <property name="text">
+    <string>Discrete &Conformal Maps</string>
+   </property>
+  </action>
+  <action name="actionExplode">
+   <property name="text">
+    <string>Explode</string>
+   </property>
+  </action>
+  <action name="actionToNef">
+   <property name="text">
+    <string>Convert to Nef Polyhedron</string>
+   </property>
+  </action>
+  <action name="actionToPoly">
+   <property name="text">
+    <string>Convert to Normal Polyhedron</string>
+   </property>
+  </action>
+  <action name="actionDraw_two_sides">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Draw &Two Sides</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+T</string>
+   </property>
+  </action>
+  <action name="actionRecenterScene">
+   <property name="text">
+    <string>Re&center Scene</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionSetBackgroundColor">
+   <property name="text">
+    <string>Change &Background Color...</string>
+   </property>
+  </action>
+  <action name="actionMinkowskiSum">
+   <property name="text">
+    <string>&Minkowski Sum (A/B)</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O, M</string>
+   </property>
+  </action>
+  <action name="action_Look_at">
+   <property name="text">
+    <string>&Look at...</string>
+   </property>
+  </action>
+  <action name="actionSaveSnapshot">
+   <property name="text">
+    <string>Save Snapshot</string>
+   </property>
+  </action>
+  <action name="actionDumpCamera">
+   <property name="text">
+    <string>&Dump Camera Coordinates</string>
+   </property>
+  </action>
+  <action name="action_Copy_camera">
+   <property name="text">
+    <string>&Copy Camera</string>
+   </property>
+  </action>
+  <action name="action_Paste_camera">
+   <property name="text">
+    <string>&Paste Camera</string>
+   </property>
+  </action>
+  <action name="actionSelect_all_items">
+   <property name="text">
+    <string>Select All Items</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+A</string>
+   </property>
+  </action>
+  <action name="actionLoad_Script">
+   <property name="text">
+    <string>Load &Script</string>
+   </property>
+  </action>
+  <action name="actionPreferences">
+   <property name="text">
+    <string>&Preferences</string>
+   </property>
+  </action>
+  <action name="actionLSC">
+   <property name="text">
+    <string>Least Square Conformal Maps</string>
+   </property>
+  </action>
+  <action name="actionLoad_plugin">
+   <property name="text">
+    <string>Load Plugin</string>
+   </property>
+  </action>
+  <action name="actionQuick_camera_mode">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Quick Camera Mode</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>Viewer</class>
+   <extends>QWidget</extends>
+   <header>Viewer.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="Polyhedron_3.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow_config.h
new file mode 100644
index 0000000..7c43749
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/MainWindow_config.h
@@ -0,0 +1,16 @@
+#ifndef MAINWINDOW_CONFIG_H
+#define MAINWINDOW_CONFIG_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef polyhedron_demo_EXPORTS
+#  define mainwindow_EXPORTS
+#endif
+
+#ifdef mainwindow_EXPORTS
+#  define MAINWINDOW_EXPORT Q_DECL_EXPORT
+#else
+#  define MAINWINDOW_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // MAINWINDOW_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Mainpage.md b/3rdparty/CGAL-4.8/demo/Polyhedron/Mainpage.md
new file mode 100644
index 0000000..e8a518c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Mainpage.md
@@ -0,0 +1,240 @@
+Main Page                        {#mainpage}
+============
+
+These pages are not documenting the whole Polyhedron demo but only the API that can be useful to create and add a new plugin.
+
+Understanding the Polyhedron demo
+============
+
+There are several levels in this demo. 
+
+- The MainWindow, which contains the UI elements. 
+
+- Among these elements is the Viewer, which is the drawable surface that handles all the drawing and all the keyboard and mouse events. 
+
+- The Viewer has a reference to the Scene, which contains the Scene_item list, which is a list of the drawn elements. 
+
+A plugin usually defines an object that inherits from Scene_item or uses some of them to demonstrate a CGAL feature, so it might have to deal with the above elements.
+
+Creating a simple Plugin
+============
+A basic plugin will inherit from Polyhedron_demo_plugin_interface. It can also inherits from the Polyhedron_demo_plugin_helper instead, for a more detailed model of plugin.
+Its name must be of the form Polyhedron_demo_xxxx_yyyy_plugin. \n
+<b>In the CMakeList.txt file, in the section Plugins, add the following lines :</b>
+
+    polyhedron_demo_plugin(xxxx_yyyy_plugin Polyhedron_demo_xxxx_yyyy_plugin)
+    target_link_libraries(xxxx_yyyy_plugin scene_polyhedron_item) 
+  
+  [init]: @ref Polyhedron_demo_plugin_helper#init(QMainWindow *, Scene_interface *)
+  The class must contain the following lines :\n
+  
+    Q_OBJECT\n
+    Q_INTERFACES(Polyhedron_demo_plugin_interface)\n
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")\n
+    
+In the function [init], get a reference to the Scene  and to the MainWindow. Then, create and link the actions of the plugin.\n
+Create a list of QActions containing the actions of the plugin.\n
+Add the following line:
+
+    actionName->setProperty("submenuName", "Name_you_want_for_your_submenu");
+    
+to place your action in a submenu in the Operation Menu.\n
+If the plugin implements a new Scene_item, please notice that a Scene_itam have a number of functions that will need a reference to the Viewer through the Viewer_interface type.
+
+A plugin must always contain
+~~~~~~~~~~~~~{.cpp}
+#include "Polyhedron_demo_xxxx_yyyy_plugin.moc"
+~~~~~~~~~~~~~
+
+List of useful classes :
+========================
+- MainWindow
+- Viewer_interface
+- Scene_interface
+- Scene_item
+- Polyhedron_demo_plugin_helper
+- Polyhedron_demo_plugin_interface
+
+
+Example : 
+============
+The following code will create a plugin that adds an action to the MainWindow. This action is called "Draw Triangle" and adds a triangle to the scene.
+
+
+~~~~~~~~~~~~~{.cpp}
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+
+#include  <CGAL/Three/Scene_item.h>
+#include "Viewer_interface.h"
+class Q_DECL_EXPORT Scene_triangle_item : public CGAL::Three::Scene_item
+{
+
+    Q_OBJECT
+public :
+    Scene_triangle_item()
+        :  Scene_item(1,1)
+    {
+
+        vertices.resize(0);
+        changed();
+
+    }
+    ~Scene_triangle_item()
+    {
+    }
+    bool isFinite() const { return true; }
+    bool isEmpty() const { return true; }
+    Bbox bbox() const { return Bbox(); }
+
+    Scene_triangle_item* clone() const {
+        return 0;
+    }
+
+    // Indicate if rendering mode is supported
+    bool supportsRenderingMode(RenderingMode m) const {
+        return (m == Flat);
+    }
+
+    QString toolTip() const {
+     QString str =
+             QObject::tr( "<p>Number of vertices: %3<br />"
+                           "Number of edges: %3<br />"
+                         "Number of facets: %1")
+                .arg(this->name())
+                .arg(poly->size_of_vertices())
+                .arg(poly->size_of_halfedges()/2)
+                .arg(poly->size_of_facets())
+                .arg(this->renderingModeName())
+                .arg(this->color().name());
+      if (volume!=-std::numeric_limits<double>::infinity())
+        str+=QObject::tr("<br />Volume: %1").arg(volume);
+      if (area!=-std::numeric_limits<double>::infinity())
+        str+=QObject::tr("<br />Area: %1").arg(area);
+      str+="</p>";
+      item_text += QString("Bounding box: min (%1,%2,%3), max(%4,%5,%6)")
+           .arg(item->bbox().xmin)
+           .arg(item->bbox().ymin)
+           .arg(item->bbox().zmin)
+           .arg(item->bbox().xmax)
+           .arg(item->bbox().ymax)
+           .arg(item->bbox().zmax);
+      m_text += QString("<br />Number of isolated vertices : 0<br />");
+
+      return str;
+    }
+
+    void draw(Viewer_interface* viewer) const
+    {
+        if(!are_buffers_filled)
+            initialize_buffers(viewer);
+        vaos[0]->bind();
+        program = getShaderProgram(PROGRAM_WITH_LIGHT);
+        attrib_buffers(viewer, PROGRAM_WITH_LIGHT);
+        program->bind();
+        program->setAttributeValue("colors", this->color());
+        viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(vertices.size()/3));
+        vaos[0]->release();
+        program->release();
+
+    }
+
+    void changed()
+    {
+        compute_elements();
+        are_buffers_filled = false;
+    }
+
+private:
+
+    std::vector<float> vertices;
+    mutable QOpenGLShaderProgram *program;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(Viewer_interface *viewer)const
+    {
+
+        //vao containing the data for the lines
+        {
+            program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+            program->bind();
+
+            vaos[0]->bind();
+            buffers[0].bind();
+            buffers[0].allocate(vertices.data(),
+                                static_cast<GLsizei>(vertices.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[0].release();
+
+            vaos[0]->release();
+            program->release();
+
+        }
+        are_buffers_filled = true;
+    }
+
+    void compute_elements()
+    {
+        vertices.resize(9);
+        vertices[0] = 0.0; vertices[1] = 0.0; vertices[2] = 0.0;
+        vertices[3] = 0.5; vertices[4] = 1.0; vertices[5] = 0.0;
+        vertices[6] = 1.0; vertices[7] = 0.0; vertices[8] = 0.0;
+    }
+
+}; //end of class Scene_triangle_item
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+class Polyhedron_demo_example_plugin :
+        public QObject,
+        public Polyhedron_demo_plugin_helper
+{
+    //Configures CMake to use MOC correctly
+    Q_OBJECT
+    Q_INTERFACES(Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+
+public :
+    // To silent a warning -Woverloaded-virtual
+    // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+    using Polyhedron_demo_plugin_helper::init;
+
+    void init(QMainWindow* mainWindow,
+              Scene_interface* scene_interface) {
+      //get the references
+      this->scene = scene_interface;
+      this->mw = mainWindow;
+      //creates and link the actions
+      actionDrawTriangle= new QAction("Draw Triangle", mw);
+      actionDrawTriangle->setProperty("subMenuName", "Object creation");
+      if(actionDrawTriangle) {
+        connect(actionDrawTriangle, SIGNAL(triggered()),
+                this, SLOT(draw_triangle()));
+      }
+    }
+
+    bool applicable(QAction*) const
+    {
+        return true;
+    }
+    QList<QAction*> actions() const {
+      return QList<QAction*>() << actionDrawTriangle;
+    }
+
+  public Q_SLOTS:
+
+  void draw_triangle() {
+    triangle = new Scene_triangle_item();
+    scene->addItem(triangle);
+  }
+
+private:
+  Scene_item* triangle;
+  QAction* actionDrawTriangle;
+
+}; //end of class Polyhedron_demo_example_plugin
+
+#include "Polyhedron_demo_example_plugin.moc"
+
+~~~~~~~~~~~~~
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Messages_interface.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Messages_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Messages_interface.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Messages_interface.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Nef_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Nef_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Nef_type.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Nef_type.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Nef_type_fwd.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Nef_type_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Nef_type_fwd.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Nef_type_fwd.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/One_ring_iterators.h b/3rdparty/CGAL-4.8/demo/Polyhedron/One_ring_iterators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/One_ring_iterators.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/One_ring_iterators.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt
new file mode 100644
index 0000000..d35c622
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt
@@ -0,0 +1,4 @@
+include( polyhedron_demo_macros )
+
+polyhedron_demo_plugin(cut_plugin Cut_plugin)
+target_link_libraries(cut_plugin scene_polyhedron_item scene_basic_objects)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp
new file mode 100644
index 0000000..ab3f002
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp
@@ -0,0 +1,495 @@
+
+#include <fstream>
+#include <QtCore/qglobal.h>
+#include <CGAL/AABB_intersections.h>
+
+#include "Messages_interface.h"
+#include "Scene_plane_item.h"
+#include "Scene_polyhedron_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <CGAL/gl.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+#include <CGAL/internal/AABB_tree/AABB_drawing_traits.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/bounding_box.h>
+
+#include "Polyhedron_type.h"
+
+#include <QTime>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include  <CGAL/Three/Scene_item.h>
+//typedef CGAL::Simple_cartesian<double> Epic_kernel;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
+
+typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron>     AABB_primitive;
+typedef CGAL::AABB_traits<Epic_kernel,AABB_primitive>           AABB_traits;
+typedef CGAL::AABB_tree<AABB_traits>                            AABB_tree;
+
+class Q_DECL_EXPORT Scene_aabb_item : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+  Scene_aabb_item(const AABB_tree& tree_) : CGAL::Three::Scene_item(1,1), tree(tree_)
+  {
+      positions_lines.resize(0);
+  }
+
+    ~Scene_aabb_item()
+    {
+    }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return tree.empty(); }
+  void compute_bbox() const {
+    const CGAL::Bbox_3 bbox = tree.bbox();
+    _bbox = Bbox(bbox.xmin(),
+                bbox.ymin(),
+                bbox.zmin(),
+                bbox.xmax(),
+                bbox.ymax(),
+                bbox.zmax());
+    qDebug()<<this->name()<<" at creation: "<<bbox.xmin()<<", "<<bbox.xmax()<<", "<<bbox.ymin()<<", "<<bbox.ymax()<<", "
+              <<bbox.zmin()<<", "<<bbox.zmax();
+  }
+
+  Scene_aabb_item* clone() const {
+    return 0;
+  }
+
+  QString toolTip() const {
+    return
+      tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
+         "<i>AABB_tree</i></p>"
+         "<p>Number of nodes: %4</p>")
+      .arg(this->name())
+      .arg(this->renderingModeName())
+      .arg(this->color().name())
+      .arg(tree.size());
+  }
+  
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe);
+  }
+
+  // Wireframe OpenGL drawing in a display list
+  void invalidateOpenGLBuffers()
+  {
+      compute_elements();
+      are_buffers_filled = false;
+      compute_bbox();
+  }
+public:
+  const AABB_tree& tree;
+private:
+   mutable  std::vector<float> positions_lines;
+
+    mutable QOpenGLShaderProgram *program;
+
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[0]->bind();
+
+        buffers[0].bind();
+        buffers[0].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[0].release();
+        program->release();
+
+        vaos[0]->release();
+        are_buffers_filled = true;
+    }
+
+    void compute_elements() const
+    {
+       positions_lines.clear();
+
+       CGAL::AABB_drawing_traits<AABB_primitive, CGAL::AABB_node<AABB_traits> > traits;
+       traits.v_edges = &positions_lines;
+
+       tree.traversal(0, traits);
+    }
+    void draw_edges(CGAL::Three::Viewer_interface* viewer) const
+    {
+        if(!are_buffers_filled)
+            initialize_buffers(viewer);
+        vaos[0]->bind();
+        program = getShaderProgram(PROGRAM_NO_SELECTION);
+        attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+        program->bind();
+        program->setAttributeValue("colors",this->color());
+        viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size()/3));
+        program->release();
+        vaos[0]->release();
+    }
+}; // end class Scene_aabb_item
+
+class Q_DECL_EXPORT Scene_edges_item : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+    Scene_edges_item():CGAL::Three::Scene_item(1,1)
+    {
+        positions_lines.resize(0);
+        top = true;
+    }
+  ~Scene_edges_item()
+  {
+  }
+    bool isFinite() const { return true; }
+  bool isEmpty() const { return edges.empty(); }
+  void compute_bbox() const {
+    if(isEmpty())
+      _bbox = Bbox();
+    return;
+    CGAL::Bbox_3 bbox = edges.begin()->bbox();
+    for(size_t i = 1, end = edges.size(); i < end; ++i) {
+      bbox = bbox + edges[i].bbox();
+    }
+    _bbox = Bbox(bbox.xmin(),
+                bbox.ymin(),
+                bbox.zmin(),
+                bbox.xmax(),
+                bbox.ymax(),
+                bbox.zmax());
+  }
+  void invalidateOpenGLBuffers()
+  {
+      compute_elements();
+      are_buffers_filled = false;
+      compute_bbox();
+  }
+
+  Scene_edges_item* clone() const {
+    Scene_edges_item* item = new Scene_edges_item();
+    item->edges = edges;
+    return item;
+  }
+
+  QString toolTip() const {
+    return
+      tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
+         "<i>Edges</i></p>"
+         "<p>Number of edges: %4</p>")
+      .arg(this->name())
+      .arg(this->renderingModeName())
+      .arg(this->color().name())
+      .arg(edges.size());
+  }
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe);
+  }
+
+
+
+  bool save(std::ostream& os) const
+  {
+    os.precision(17);
+    for(size_t i = 0, end = edges.size(); i < end; ++i){
+      os << "2 " << edges[i].source() << " " <<  edges[i].target() << "\n";
+    }
+    return true;
+  }
+
+public:
+  std::vector<Epic_kernel::Segment_3> edges;
+  bool top;
+
+private:
+    mutable std::vector<float> positions_lines;
+    void timerEvent(QTimerEvent* /*event*/)
+    {
+       top = true;
+    }
+
+  mutable QOpenGLShaderProgram *program;
+
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[0]->bind();
+
+        buffers[0].bind();
+        buffers[0].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[0].release();
+        program->release();
+
+        vaos[0]->release();
+        are_buffers_filled = true;
+    }
+    void compute_elements() const
+    {
+       positions_lines.clear();
+
+       for(size_t i = 0, end = edges.size();
+           i < end; ++i)
+       {
+         const Epic_kernel::Point_3& a = edges[i].source();
+         const Epic_kernel::Point_3& b = edges[i].target();
+         positions_lines.push_back(a.x()); positions_lines.push_back(a.y()); positions_lines.push_back(a.z());
+         positions_lines.push_back(b.x()); positions_lines.push_back(b.y()); positions_lines.push_back(b.z());
+       }
+    }
+    void draw_edges(CGAL::Three::Viewer_interface* viewer) const
+    {
+        if(!are_buffers_filled)
+            initialize_buffers(viewer);
+        vaos[0]->bind();
+        program = getShaderProgram(PROGRAM_NO_SELECTION);
+        attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+        program->bind();
+        program->setAttributeValue("colors",this->color());
+        viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size()/3));
+        vaos[0]->release();
+        program->release();
+
+    }
+
+}; // end class Scene_edges_item
+
+using namespace CGAL::Three;
+class Polyhedron_demo_cut_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_interface,
+  public Polyhedron_demo_io_plugin_interface 
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Polyhedron_demo_cut_plugin() : QObject(), edges_item(0) {
+  }
+  
+  virtual ~Polyhedron_demo_cut_plugin();
+
+  bool applicable(QAction*) const {
+    // returns true if one polyhedron is in the entries
+    for (int i=0; i< scene->numberOfEntries(); ++i)
+    {
+      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(i)) )
+        return true;
+    }
+    return false;
+  }
+
+  virtual QString name() const
+  {
+    return "cut-plugin";
+  }
+
+
+  virtual QString nameFilters() const
+  {
+    return "Segment soup file (*.polylines.txt *.cgal)";
+  }
+
+
+  bool canLoad() const
+  {
+    return false;
+  }
+
+  virtual CGAL::Three::Scene_item* load(QFileInfo /* fileinfo */)
+  {
+    return 0;
+  }
+
+  virtual bool canSave(const CGAL::Three::Scene_item* item)
+  {
+    // This plugin supports edges items
+    bool b = qobject_cast<const Scene_edges_item*>(item) != 0;
+    return b;
+  }
+
+
+  virtual bool save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+  {  // This plugin supports edges items
+    const Scene_edges_item* edges_item = 
+      qobject_cast<const Scene_edges_item*>(item);
+    
+    if(!edges_item){
+      return false;
+    }
+    
+    std::ofstream out(fileinfo.filePath().toUtf8());
+    
+    return (out && edges_item->save(out));
+  }
+
+
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface,
+            Messages_interface* m);
+  QList<QAction*> actions() const;
+
+public Q_SLOTS:
+  void createCutPlane();
+  void enableAction();
+  void cut();
+  void reset_edges() {
+    edges_item = 0;
+  }
+
+private:
+  CGAL::Three::Scene_interface* scene;
+  Messages_interface* messages;
+  Scene_plane_item* plane_item;
+  Scene_edges_item* edges_item;
+  QAction* actionCreateCutPlane;
+
+  typedef std::map<QObject*,  AABB_tree*> Trees;
+  Trees trees;
+}; // end Polyhedron_demo_cut_plugin
+
+
+Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
+{
+  for ( Trees::iterator it = trees.begin(), end = trees.end() ;
+       it != end ; ++it)
+  {
+    delete it->second;
+  }
+}
+
+
+void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
+                                      CGAL::Three::Scene_interface* scene_interface,
+                                      Messages_interface* m)
+{
+  scene = scene_interface;
+  messages = m;
+  actionCreateCutPlane = new QAction(tr("Create Cutting Plane"), mainWindow);
+  actionCreateCutPlane->setProperty("subMenuName","3D Fast Intersection and Distance Computation");
+  connect(actionCreateCutPlane, SIGNAL(triggered()),
+          this, SLOT(createCutPlane()));
+}
+
+QList<QAction*> Polyhedron_demo_cut_plugin::actions() const {
+  return QList<QAction*>() << actionCreateCutPlane;
+}
+
+void Polyhedron_demo_cut_plugin::createCutPlane() {
+  plane_item = new Scene_plane_item(scene);
+  const CGAL::Three::Scene_interface::Bbox& bbox = scene->bbox();
+  plane_item->setPosition((bbox.xmin+bbox.xmax)/2.f,
+                          (bbox.ymin+bbox.ymax)/2.f,
+                          (bbox.zmin+bbox.zmax)/2.f);
+  plane_item->setNormal(0., 0., 1.);
+  connect(plane_item, SIGNAL(destroyed()),
+          this, SLOT(enableAction()));
+  plane_item->setManipulatable(true);
+  plane_item->setClonable(false);
+  plane_item->setColor(Qt::green);
+  plane_item->setName(tr("Cutting plane"));
+  connect(plane_item->manipulatedFrame(), SIGNAL(modified()),
+          this, SLOT(cut()));
+  scene->addItem(plane_item);
+  actionCreateCutPlane->setEnabled(false);
+
+  // Hide polyhedrons and call cut() (avoid that nothing shows up until user
+  // decides to move the plane item)
+  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
+    CGAL::Three::Scene_item* item = scene->item(i);
+    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
+    if ( NULL != poly_item )
+      poly_item->setVisible(false);
+  }
+  cut();
+}
+
+
+void Polyhedron_demo_cut_plugin::cut() {
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  if(!edges_item) {
+    edges_item = new Scene_edges_item;
+    edges_item->setName("Edges of the Cut");
+    edges_item->setColor(Qt::red);
+    edges_item->startTimer(0);
+    connect(edges_item, SIGNAL(destroyed()),
+            this, SLOT(reset_edges()));
+    scene->addItem(edges_item);
+  }
+  if(edges_item->top)
+  {
+  const qglviewer::Vec& pos = plane_item->manipulatedFrame()->position();
+  const qglviewer::Vec& n =
+    plane_item->manipulatedFrame()->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+  Epic_kernel::Plane_3 plane(n[0], n[1],  n[2], - n * pos);
+  //std::cerr << plane << std::endl;
+  edges_item->edges.clear();
+  QTime time;
+  time.start();
+  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
+    CGAL::Three::Scene_item* item = scene->item(i);
+    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
+    if(!poly_item) continue;
+    Trees::iterator it = trees.find(poly_item);
+    if(it == trees.end()) {
+      it = trees.insert(trees.begin(),
+                        std::make_pair(poly_item,
+                                       new AABB_tree(faces(*(poly_item->polyhedron())).first,
+                                                     faces(*(poly_item->polyhedron())).second,
+                                                     *poly_item->polyhedron() )));
+      Scene_aabb_item* aabb_item = new Scene_aabb_item(*it->second);
+      aabb_item->setName(tr("AABB tree of %1").arg(poly_item->name()));
+      aabb_item->setRenderingMode(Wireframe);
+      aabb_item->setColor(Qt::black);
+      aabb_item->setVisible(false);
+      scene->addItem(aabb_item);
+      //std::cerr << "size: " << it->second->size() << std::endl;
+    }
+    
+    if(!CGAL::do_intersect(plane, it->second->bbox()))
+      continue;
+    
+    std::vector<AABB_tree::Object_and_primitive_id> intersections;
+    it->second->all_intersections(plane, std::back_inserter(intersections));
+    
+    for ( std::vector<AABB_tree::Object_and_primitive_id>::iterator it = intersections.begin(),
+         end = intersections.end() ; it != end ; ++it )
+    {
+      const Epic_kernel::Segment_3* inter_seg =
+        CGAL::object_cast<Epic_kernel::Segment_3>(&(it->first));
+      
+      if ( NULL != inter_seg )
+        edges_item->edges.push_back(*inter_seg);
+    }
+  }
+
+  messages->information(QString("cut (%1 ms). %2 edges.").arg(time.elapsed()).arg(edges_item->edges.size()));
+  edges_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edges_item);
+  }
+  QApplication::restoreOverrideCursor();
+
+    edges_item->top = false;
+}
+
+void Polyhedron_demo_cut_plugin::enableAction() {
+  actionCreateCutPlane->setEnabled(true);
+}
+
+#include "Cut_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt
new file mode 100644
index 0000000..78d1867
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt
@@ -0,0 +1,9 @@
+include( polyhedron_demo_macros )
+  qt5_wrap_ui( cameraUI_FILES   Camera_positions_list.ui )
+  polyhedron_demo_plugin(camera_positions_plugin 
+    Camera_positions_plugin
+    Camera_positions_list 
+    ${cameraUI_FILES})
+
+  target_link_libraries( camera_positions_plugin ${QGLVIEWER_LIBRARIES} demo_framework) 
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp
new file mode 100644
index 0000000..81c73f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp
@@ -0,0 +1,278 @@
+#include "Camera_positions_list.h"
+
+#include "ui_Camera_positions_list.h"
+#include <QListView>
+#include <QStandardItemModel>
+#include <QFileDialog>
+#include <QFile>
+#include <QTextStream>
+#include <CGAL/number_type_config.h>
+#include <CGAL/Three/Viewer_interface.h>
+
+
+
+#include <cassert>
+
+Camera_positions_list::Camera_positions_list(QWidget* parent)
+  : QDockWidget(parent), m_viewer(0), counter(0), m_model(new QStandardItemModel(this))
+{
+  Ui::Camera_positions_list ui;
+  ui.setupUi(this);
+  m_listView = ui.listView;
+  m_listView->setModel(m_model);
+  
+  m_listView->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed);
+  connect(m_listView, SIGNAL(activated(QModelIndex)),
+          this, SLOT(activatedRow(QModelIndex)));
+}
+
+void Camera_positions_list::setViewer(CGAL::Three::Viewer_interface* viewer)
+{
+  m_viewer = viewer;
+}
+
+void Camera_positions_list::on_plusButton_pressed()
+{
+  if(!m_viewer) return;
+  addItem(tr("Camera Position #%1").arg(++counter),
+          m_viewer->dumpCameraCoordinates());
+}
+
+void Camera_positions_list::addItem(QString text, QString data)
+{
+  QStandardItem* item = new QStandardItem(text);
+  item->setData(data, Qt::UserRole);
+  m_model->insertRow(m_model->rowCount(), item);
+}
+
+void Camera_positions_list::on_upButton_pressed()
+{
+  int row = m_listView->selectionModel()->currentIndex().row();
+  if(row!=0)
+  {
+  m_model->insertRow(row-1, m_model->takeRow(row));
+  m_listView->selectionModel()->setCurrentIndex(m_model->index(row-1, 0),
+                                                QItemSelectionModel::Clear);
+  }
+}
+
+void Camera_positions_list::on_downButton_pressed()
+{
+  int row = m_listView->selectionModel()->currentIndex().row();
+  if(row!= m_listView->model()->rowCount()-1)
+  {
+  m_model->insertRow(row+1, m_model->takeRow(row));
+  m_listView->selectionModel()->setCurrentIndex(m_model->index(row+1, 0),
+                                                QItemSelectionModel::Clear);
+  }
+}
+
+void Camera_positions_list::on_minusButton_pressed()
+{
+  Q_FOREACH(QModelIndex index, 
+            m_listView->selectionModel()->selectedIndexes()) {
+    m_model->removeRows(index.row(), 1);
+  }
+}
+
+void Camera_positions_list::on_clearButton_pressed()
+{
+  m_model->clear();
+}
+
+// void Camera_positions_list::editItem(QListWidgetItem* item)
+// {
+//   std::cerr << "is_editable: " << m_listView->flags(item)QListWidget
+
+//   m_listView->editItem(item);
+// }
+
+void Camera_positions_list::activatedRow(QModelIndex index)
+{
+  QString s = m_model->data(index, Qt::UserRole).toString();
+  if(s.isNull()) return;
+  m_viewer->moveCameraToCoordinates(s);
+}
+
+void Camera_positions_list::on_saveButton_pressed()
+{
+  QString filename =
+    QFileDialog::getSaveFileName(this, 
+                                 tr("Save camera coordinates to file"),
+                                 QString(),
+                                 tr("(*.camera.txt)"));
+  QFile file(filename);
+  file.open(QIODevice::WriteOnly);
+  QTextStream out(&file);
+  for(int i = 0; i < m_model->rowCount(); ++i)
+  {
+    QStandardItem* item = m_model->item(i);
+    out << item->data(Qt::DisplayRole).toString()
+        << "\n"
+        << item->data(Qt::UserRole).toString()
+        << "\n";
+  }
+  file.close();
+}
+
+void Camera_positions_list::on_openButton_pressed()
+{
+  QString filename =
+    QFileDialog::getOpenFileName(this, 
+                                 tr("Read camera coordinates from file"),
+                                 QString(),
+                                 tr("(*.camera.txt)"));
+  load(filename);
+}
+
+void Camera_positions_list::load(QString filename) {
+  QFile file(filename);
+  std::clog << "Loading camera positions " << qPrintable(filename) << std::endl;
+  file.open(QIODevice::ReadOnly);
+  QTextStream input(&file);
+  while(!input.atEnd()) {
+    QString text = input.readLine(1000);
+    QString coord = input.readLine(1000);
+    if(text.isNull() || coord.isNull()) return;
+    qglviewer::Frame frame;
+    if(m_viewer->readFrame(coord, frame))
+    {
+      addItem(text,
+              m_viewer->dumpFrame(frame));
+    }
+  }
+}
+
+void Camera_positions_list::on_frontButton_pressed()
+{
+    qglviewer::Vec posFront = qglviewer::Vec(0,0,m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)));
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posFront = posFront + trans;
+    qglviewer::Quaternion dirFront;
+    dirFront.setAxisAngle(qglviewer::Vec(0,1,0),0);
+    QString frontCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posFront[0])
+            .arg(posFront[1])
+            .arg(posFront[2])
+            .arg(dirFront[0])
+            .arg(dirFront[1])
+            .arg(dirFront[2])
+            .arg(dirFront[3]);
+
+   m_viewer->moveCameraToCoordinates(frontCoord, 0.5f);
+}
+
+void Camera_positions_list::on_backButton_pressed()
+{
+    qglviewer::Vec posBack = qglviewer::Vec(0,0,-m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)));
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posBack+= trans;
+    qglviewer::Quaternion dirBack;
+    dirBack.setAxisAngle(qglviewer::Vec(0,1,0),CGAL_PI);
+    QString backCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posBack[0])
+            .arg(posBack[1])
+            .arg(posBack[2])
+            .arg(dirBack[0])
+            .arg(dirBack[1])
+            .arg(dirBack[2])
+            .arg(dirBack[3]);
+    m_viewer->moveCameraToCoordinates(backCoord, 0.5f);
+}
+
+void Camera_positions_list::on_topButton_pressed()
+{
+    qglviewer::Vec posTop = qglviewer::Vec(0,m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)), 0);
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posTop += trans;
+    qglviewer::Quaternion dirTop;
+    dirTop.setAxisAngle(qglviewer::Vec(1,0,0), -CGAL_PI/2);
+    QString topCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posTop[0])
+            .arg(posTop[1])
+            .arg(posTop[2])
+            .arg(dirTop[0])
+            .arg(dirTop[1])
+            .arg(dirTop[2])
+            .arg(dirTop[3]);
+     m_viewer->moveCameraToCoordinates(topCoord, 0.5f);
+}
+
+void Camera_positions_list::on_botButton_pressed()
+{
+    qglviewer::Vec posBot = qglviewer::Vec(0,-m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)), 0);;
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posBot += trans;
+    qglviewer::Quaternion dirBot;
+    dirBot.setAxisAngle(qglviewer::Vec(1,0,0),CGAL_PI/2);
+    QString botCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posBot[0])
+            .arg(posBot[1])
+            .arg(posBot[2])
+            .arg(dirBot[0])
+            .arg(dirBot[1])
+            .arg(dirBot[2])
+            .arg(dirBot[3]);
+     m_viewer->moveCameraToCoordinates(botCoord, 0.5f);
+}
+
+void Camera_positions_list::on_leftButton_pressed()
+{
+    qglviewer::Vec posLeft = qglviewer::Vec(-m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)), 0, 0);;
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posLeft += trans;
+    qglviewer::Quaternion dirLeft;
+    dirLeft.setAxisAngle(qglviewer::Vec(0,1,0),-CGAL_PI/2);
+    QString leftCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posLeft[0])
+            .arg(posLeft[1])
+            .arg(posLeft[2])
+            .arg(dirLeft[0])
+            .arg(dirLeft[1])
+            .arg(dirLeft[2])
+            .arg(dirLeft[3]);
+    m_viewer->moveCameraToCoordinates(leftCoord, 0.5f);
+}
+
+void Camera_positions_list::on_rightButton_pressed()
+{
+    qglviewer::Vec posRight = qglviewer::Vec(m_viewer->sceneRadius()/(sin (m_viewer->camera()->fieldOfView()/2)), 0,0);
+#if QGLVIEWER_VERSION >= 0x020502
+    qglviewer::Vec trans = m_viewer->camera()->pivotPoint();
+#else
+    qglviewer::Vec trans = m_viewer->camera()->revolveAroundPoint();
+#endif
+    posRight += trans;
+    qglviewer::Quaternion dirRight;
+    dirRight.setAxisAngle(qglviewer::Vec(0,1,0),CGAL_PI/2);
+    QString rightCoord = QString("%1 %2 %3 %4 %5 %6 %7")
+            .arg(posRight[0])
+            .arg(posRight[1])
+            .arg(posRight[2])
+            .arg(dirRight[0])
+            .arg(dirRight[1])
+            .arg(dirRight[2])
+            .arg(dirRight[3]);
+    m_viewer->moveCameraToCoordinates(rightCoord, 0.5f);
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h
new file mode 100644
index 0000000..b6c6bfb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h
@@ -0,0 +1,46 @@
+#ifndef CAMERA_POSITIONS_LIST_H
+#define CAMERA_POSITIONS_LIST_H
+
+#include <QDockWidget>
+#include <QModelIndex>
+
+namespace CGAL{namespace Three{class Viewer_interface;}}
+class QListView;
+class QStandardItemModel;
+
+class Camera_positions_list : public QDockWidget {
+  Q_OBJECT
+public:  
+  Camera_positions_list(QWidget* parent);
+
+  void setViewer(CGAL::Three::Viewer_interface*);
+
+public Q_SLOTS:
+  void load(QString filename);
+protected Q_SLOTS:
+  void on_plusButton_pressed();
+  void on_minusButton_pressed();
+  void on_upButton_pressed();
+  void on_downButton_pressed();
+  void on_openButton_pressed();
+  void on_saveButton_pressed();
+  void on_clearButton_pressed();
+  void on_frontButton_pressed();
+  void on_backButton_pressed();
+  void on_topButton_pressed();
+  void on_botButton_pressed();
+  void on_leftButton_pressed();
+  void on_rightButton_pressed();
+  void activatedRow(QModelIndex index);
+
+protected:
+  void addItem(QString, QString);
+
+private:
+  CGAL::Three::Viewer_interface* m_viewer;
+  int counter;
+  QListView* m_listView;
+  QStandardItemModel* m_model;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui
new file mode 100644
index 0000000..bcc151f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Camera_positions_list</class>
+ <widget class="QDockWidget" name="Camera_positions_list">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>612</width>
+    <height>507</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Camera Positions</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QToolButton" name="openButton">
+        <property name="text">
+         <string>&Open List</string>
+        </property>
+        <property name="shortcut">
+         <string>Ctrl+O</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="saveButton">
+        <property name="text">
+         <string>&Save List</string>
+        </property>
+        <property name="shortcut">
+         <string>Ctrl+S</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="plusButton">
+        <property name="text">
+         <string>...</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="minusButton">
+        <property name="text">
+         <string>...</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="clearButton">
+        <property name="text">
+         <string>&Clear</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="upButton">
+        <property name="text">
+         <string>&Up</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
+        </property>
+        <property name="shortcut">
+         <string>Ctrl+U</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="downButton">
+        <property name="text">
+         <string>&Down</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
+        </property>
+        <property name="shortcut">
+         <string>Ctrl+D</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QToolButton" name="frontButton">
+        <property name="toolTip">
+         <string>Front</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/front.png</normaloff>:/cgal/icons/resources/front.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="backButton">
+        <property name="toolTip">
+         <string>Back</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/back.png</normaloff>:/cgal/icons/resources/back.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="topButton">
+        <property name="toolTip">
+         <string>Top</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/top.png</normaloff>:/cgal/icons/resources/top.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="botButton">
+        <property name="toolTip">
+         <string>Bottom</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/bot.png</normaloff>:/cgal/icons/resources/bot.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="leftButton">
+        <property name="toolTip">
+         <string>Left</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/left.png</normaloff>:/cgal/icons/resources/left.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="rightButton">
+        <property name="toolTip">
+         <string>Right</string>
+        </property>
+        <property name="text">
+         <string>PushButton</string>
+        </property>
+        <property name="icon">
+         <iconset resource="Polyhedron_3.qrc">
+          <normaloff>:/cgal/icons/resources/right.png</normaloff>:/cgal/icons/resources/right.png</iconset>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QListView" name="listView"/>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources>
+  <include location="Polyhedron_3.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp
new file mode 100644
index 0000000..0fb9dcd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp
@@ -0,0 +1,52 @@
+#include <QtCore/qglobal.h>
+#include "Messages_interface.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include "Camera_positions_list.h"
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <QMainWindow>
+using namespace CGAL::Three;
+class Polyhedron_demo_camera_positions_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_interface,
+  public CGAL::Three::Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
+  QList<QAction*> actions() const;
+
+  QString name() const { return "camera_positions_plugin"; }
+  QString nameFilters() const { return "Camera positions (*.camera.txt)"; }
+  bool canLoad() const { return true; }
+  Scene_item* load(QFileInfo fileinfo) { cpl->load(fileinfo.filePath()); return 0; }
+
+  bool canSave(const Scene_item*) { return false; }
+  bool save(const Scene_item*, QFileInfo ) {return false; }
+  bool applicable(QAction*) const {return false;}
+private:
+  Camera_positions_list* cpl;
+};
+
+void Polyhedron_demo_camera_positions_plugin::init(QMainWindow* mainWindow, Scene_interface*)
+{
+
+  cpl = new Camera_positions_list(mainWindow);
+  Viewer_interface* viewer = mainWindow->findChild<Viewer_interface*>("viewer");
+  cpl->setViewer(viewer);
+  mainWindow->addDockWidget(Qt::LeftDockWidgetArea, cpl);
+}
+
+QList<QAction*> 
+Polyhedron_demo_camera_positions_plugin::actions() const
+{
+  return QList<QAction*>();
+}
+
+#include "Camera_positions_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt
new file mode 100644
index 0000000..beba465
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt
@@ -0,0 +1,4 @@
+include( polyhedron_demo_macros )
+
+polyhedron_demo_plugin(nef_plugin Nef_plugin)
+  target_link_libraries(nef_plugin scene_nef_polyhedron_item)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp
new file mode 100644
index 0000000..1147c1b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp
@@ -0,0 +1,312 @@
+#include "Scene_polyhedron_item.h"
+#include "Scene_nef_polyhedron_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+
+#include <QString>
+#include <QAction>
+#include <QMenu>
+#include <QMainWindow>
+#include <QApplication>
+#include <QTime>
+#include <QMessageBox>
+using namespace CGAL::Three;
+class Polyhedron_demo_nef_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  QStringList actionsNames() const {
+    return QStringList() << "actionToNef" 
+                         << "actionToPoly"
+                         << "actionUnion"
+                         << "actionIntersection"
+                         << "actionDifference"
+                         << "actionConvexDecomposition"
+                         << "actionMinkowskiSum";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionConvexDecomposition"] = getActionFromMainWindow(mw, "actionConvexDecomposition");
+      actions_map["actionConvexDecomposition"]->setProperty("subMenuName",
+                                                            "Convex Decomposition");
+
+      actions_map["actionToNef"] = getActionFromMainWindow(mw, "actionToNef");
+      actions_map["actionToPoly"] = getActionFromMainWindow(mw, "actionToPoly");
+      actions_map["actionUnion"] = getActionFromMainWindow(mw, "actionUnion");
+      actions_map["actionIntersection"] = getActionFromMainWindow(mw, "actionIntersection");
+      actions_map["actionDifference"] = getActionFromMainWindow(mw, "actionDifference");
+      actions_map["actionMinkowskiSum"] = getActionFromMainWindow(mw, "actionMinkowskiSum");
+      autoConnectActions();
+
+  }
+
+  bool applicable(QAction*) const {
+    const int indexA = scene->selectionAindex();
+    const int indexB = scene->selectionBindex();
+
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
+      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
+      || qobject_cast<Scene_polyhedron_item*>(scene->item(indexA))
+      || qobject_cast<Scene_polyhedron_item*>(scene->item(indexB))
+      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexA))
+      || qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexB))
+      ;
+  }
+
+//   QList<QAction*> actions() const {
+//     QMenu* menu = new QMenu(tr("Boolean Operations"), mw);
+//     QAction* action_to_nef = new QAction(tr("Convert to Nef Polyhedron"), mw);
+//     connect(action_to_nef, SIGNAL(triggered()),
+//             this, SLOT(convert_to_nef_polyhedron()));
+//     QAction* action_to_poly = new QAction(tr("Convert Nef Polyhedron to Polyhedron"), mw);
+//     connect(action_to_poly, SIGNAL(triggered()),
+//             this, SLOT(convert_to_polyhedron()));
+//     menu->addAction(action_to_nef);
+//     menu->addAction(action_to_poly);
+
+//     return QList<QAction*>() << menu->menuAction();
+//   }
+
+private:
+  enum  Boolean_operation { BOOLEAN_UNION,
+                            BOOLEAN_INTERSECTION,
+                            BOOLEAN_DIFFERENCE,
+                            MINKOWSKI_SUM
+  };
+  void boolean_operation(const Boolean_operation operation);
+
+public Q_SLOTS:
+  void on_actionToNef_triggered();
+  void on_actionToPoly_triggered();
+  void on_actionUnion_triggered();
+  void on_actionIntersection_triggered();
+  void on_actionDifference_triggered();
+  void on_actionMinkowskiSum_triggered();
+  void on_actionConvexDecomposition_triggered();
+}; // end class Polyhedron_demo_nef_plugin
+
+void
+Polyhedron_demo_nef_plugin::on_actionToNef_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    QTime time;
+    time.start();
+    std::cerr << "Convert polyhedron to nef polyhedron...";
+
+    Scene_nef_polyhedron_item* new_nef_item = 
+      Scene_nef_polyhedron_item::from_polyhedron(item);
+
+    new_nef_item->setName(tr("%1 (to nef)").arg(item->name()));
+    new_nef_item->setRenderingMode(item->renderingMode());
+    item->setVisible(false);
+    scene->itemChanged(index);
+    new_nef_item->invalidateOpenGLBuffers();
+    scene->addItem(new_nef_item);
+    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+
+void
+Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* pitem = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  Scene_nef_polyhedron_item* item =   
+    (pitem)? Scene_nef_polyhedron_item::from_polyhedron(pitem)
+           : qobject_cast<Scene_nef_polyhedron_item*>(scene->item(index));
+  
+  if(item) {
+    QTime time;
+    time.start();
+    std::cerr << "Convex decomposition...";
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    std::list<Scene_polyhedron_item*> convex_parts;
+    item->convex_decomposition(convex_parts);
+    int i = 0;
+    for(std::list<Scene_polyhedron_item*>::iterator it = convex_parts.begin();
+        it != convex_parts.end();
+        ++it){
+      (*it)->setName(tr("part %1 of %2").arg(i++).arg(item->name()));
+      (*it)->setRenderingMode(item->renderingMode());
+      scene->addItem(*it);
+    }
+
+    if(pitem){
+      delete item;
+      pitem->setVisible(false);
+    } else {
+      item->setVisible(false);
+    }
+
+    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+    QApplication::restoreOverrideCursor();
+  } else {
+    std::cerr << "Only a Polyhedron or a Nef Polyhedron can be decomposed in convex parts" << std::endl; 
+  }
+}
+
+void
+Polyhedron_demo_nef_plugin::on_actionToPoly_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_nef_polyhedron_item* item = 
+    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    QTime time;
+    time.start();
+    std::cerr << "Convert nef polyhedron to polyhedron...";
+
+    if(!item->is_simple())
+    {
+      QMessageBox::warning(mw,
+                           tr("Cannot convert"),
+                           tr("The nef polyhedron \"%1\" is not simple, "
+                              "and thus cannot be converted!")
+                              .arg(item->name()));
+      return;
+    }
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    Scene_polyhedron_item* new_item = item->convert_to_polyhedron();
+    new_item->setName(tr("%1 (from nef)").arg(item->name()));
+    new_item->setRenderingMode(item->renderingMode());
+    item->setVisible(false);
+    scene->itemChanged(index);
+    scene->addItem(new_item);
+    std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+void Polyhedron_demo_nef_plugin::on_actionUnion_triggered()
+{
+  boolean_operation(BOOLEAN_UNION);
+}
+
+void Polyhedron_demo_nef_plugin::on_actionIntersection_triggered()
+{
+  boolean_operation(BOOLEAN_INTERSECTION);
+}
+
+void Polyhedron_demo_nef_plugin::on_actionDifference_triggered()
+{
+  boolean_operation(BOOLEAN_DIFFERENCE);
+}
+
+void
+Polyhedron_demo_nef_plugin::on_actionMinkowskiSum_triggered()
+{
+  boolean_operation(MINKOWSKI_SUM);
+}
+
+void Polyhedron_demo_nef_plugin::boolean_operation(const Boolean_operation operation)
+{
+  const int indexA = scene->selectionAindex();
+  const int indexB = scene->selectionBindex();
+
+  if(indexA < 0 || indexB < 0) return;
+  if(indexA == indexB) return;
+
+  if(qobject_cast<Scene_polyhedron_item*>(scene->item(indexA)) ||
+     qobject_cast<Scene_polyhedron_item*>(scene->item(indexB))) {
+    QMenu* menu = mw->findChild<QMenu*>("menu_Boolean_operations");
+    if(!menu) qWarning("Do not find object named \"menu_Boolean_operations\"!");
+    QMessageBox::warning(mw,
+                         tr("Boolean operation cannot be applied on normal polyhedron"),
+                         tr("You need to call the operation \"%1\" in the menu \"%2\".")
+                         .arg(actions_map["actionToNef"]->text())
+                         .arg(menu ? menu->title() : "Boolean Operations"));
+  }
+  Scene_nef_polyhedron_item* itemA = 
+    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexA));
+  Scene_nef_polyhedron_item* itemB = 
+    qobject_cast<Scene_nef_polyhedron_item*>(scene->item(indexB));
+  if(!itemA || !itemB)
+    return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  // copy itemA
+  Scene_nef_polyhedron_item* new_item = 0;
+  if(operation != MINKOWSKI_SUM) {
+    new_item = new Scene_nef_polyhedron_item(*itemA->nef_polyhedron());
+  };
+
+ // perform Boolean operation
+  std::cout << "Boolean operation...";
+  QTime time;
+  time.start();
+  switch(operation)
+  {
+  case BOOLEAN_UNION:
+    (*new_item) += (*itemB);
+    break;
+  case BOOLEAN_INTERSECTION:
+    (*new_item) *= (*itemB);
+    break;
+  case BOOLEAN_DIFFERENCE:
+    (*new_item) -= (*itemB);
+    break;
+  case MINKOWSKI_SUM:
+    new_item = Scene_nef_polyhedron_item::sum(*itemA, 
+                                              *itemB);
+  }
+  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+  QString name;
+  switch(operation)
+  {
+  case BOOLEAN_UNION:
+    name = tr("%1 union %2");
+    break;
+  case BOOLEAN_INTERSECTION:
+    name = tr("%1 intersection %2");
+    break;
+  case BOOLEAN_DIFFERENCE:
+    name = tr("%1 minus %2");
+    break;
+  case MINKOWSKI_SUM:
+    name = tr("Minkowski sum of %1 and %2");
+  }
+  
+  new_item->setName(name.arg(itemA->name(), itemB->name()));
+  new_item->setColor(Qt::green);
+  new_item->setRenderingMode(FlatPlusEdges);
+  itemA->setRenderingMode(Wireframe);
+  itemB->setRenderingMode(Wireframe);
+  scene->addItem(new_item);
+  scene->itemChanged(indexA);
+  scene->itemChanged(indexB);
+
+  QApplication::restoreOverrideCursor();
+}
+
+#include "Nef_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt
new file mode 100644
index 0000000..938d32f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt
@@ -0,0 +1,6 @@
+include( polyhedron_demo_macros )
+
+polyhedron_demo_plugin(convex_hull_plugin Convex_hull_plugin)
+target_link_libraries(convex_hull_plugin scene_polyhedron_item scene_points_with_normal_item scene_polylines_item scene_polyhedron_selection_item)
+polyhedron_demo_plugin(kernel_plugin Kernel_plugin)
+target_link_libraries(kernel_plugin scene_polyhedron_item)
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp
new file mode 100644
index 0000000..fac1be2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp
@@ -0,0 +1,133 @@
+#include <QTime>
+#include <QApplication>
+#include <QAction>
+#include <QStringList>
+
+#include "opengl_tools.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_points_with_normal_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene_polyhedron_selection_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/convex_hull_3.h>
+#include <boost/iterator/transform_iterator.hpp>
+using namespace CGAL::Three;
+class Polyhedron_demo_convex_hull_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+    void init(QMainWindow* mainWindow,
+              Scene_interface* scene_interface)
+    {
+        mw = mainWindow;
+        scene = scene_interface;
+        actions_map["actionConvexHull"] = getActionFromMainWindow(mw, "actionConvexHull");
+        actions_map["actionConvexHull"]->setProperty("subMenuName",
+                                                     "3D Convex Hulls");
+        autoConnectActions();
+
+    }
+
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionConvexHull";
+  }
+
+  bool applicable(QAction*) const {
+    return 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())) ||
+      qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex())) ||
+      qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex())) ||
+      qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionConvexHull_triggered();
+
+}; // end Polyhedron_demo_convex_hull_plugin
+
+// for transform iterator
+struct Get_point {
+  typedef const Polyhedron::Point_3& result_type;
+  result_type operator()(const Polyhedron::Vertex_handle v) const
+  { return v->point(); }
+};
+
+void Polyhedron_demo_convex_hull_plugin::on_actionConvexHull_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* poly_item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  Scene_points_with_normal_item* pts_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+  
+  Scene_polylines_item* lines_item = 
+    qobject_cast<Scene_polylines_item*>(scene->item(index));
+  
+  Scene_polyhedron_selection_item* selection_item = 
+    qobject_cast<Scene_polyhedron_selection_item*>(scene->item(index));
+
+  if(poly_item || pts_item || lines_item || selection_item)
+  {
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    QTime time;
+    time.start();
+    std::cout << "Convex hull...";
+
+    // add convex hull as new polyhedron
+    Polyhedron *pConvex_hull = new Polyhedron;
+    if(selection_item) {
+      CGAL::convex_hull_3(
+        boost::make_transform_iterator(selection_item->selected_vertices.begin(), Get_point()),
+        boost::make_transform_iterator(selection_item->selected_vertices.end(), Get_point()),
+        *pConvex_hull);
+    }
+    else if ( poly_item ){
+      Polyhedron* pMesh = poly_item->polyhedron();  
+      CGAL::convex_hull_3(pMesh->points_begin(),pMesh->points_end(),*pConvex_hull);
+    }
+    else{
+      if (pts_item)
+        CGAL::convex_hull_3(pts_item->point_set()->begin(),pts_item->point_set()->end(),*pConvex_hull);
+      else{
+        std::size_t nb_points=0;
+        for(std::list<std::vector<Kernel::Point_3> >::const_iterator it = lines_item->polylines.begin();
+            it != lines_item->polylines.end();
+            ++it)  nb_points+=it->size();
+
+        std::vector<Kernel::Point_3> all_points;
+        all_points.reserve( nb_points );
+
+        for(std::list<std::vector<Kernel::Point_3> >::const_iterator it = lines_item->polylines.begin();
+            it != lines_item->polylines.end();
+            ++it)  std::copy(it->begin(), it->end(),std::back_inserter( all_points ) );
+        
+        CGAL::convex_hull_3(all_points.begin(),all_points.end(),*pConvex_hull);
+      }
+    }
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pConvex_hull);
+    new_item->setName(tr("%1 (convex hull)").arg(scene->item(index)->name()));
+    new_item->setColor(Qt::magenta);
+    new_item->setRenderingMode(FlatPlusEdges);
+    scene->addItem(new_item);
+
+    // default cursor
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Convex_hull_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp
new file mode 100644
index 0000000..3a0abe3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp
@@ -0,0 +1,137 @@
+#include <QApplication>
+#include <QMainWindow>
+#include <QMessageBox>
+#include <QAction>
+#include <QStringList>
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/Polyhedron_kernel.h>
+#include <CGAL/Exact_integer.h>
+#include <CGAL/convex_hull_3.h>
+
+#include <CGAL/Dualizer.h>
+#include <CGAL/translate.h>
+
+#include "Kernel_type.h"
+typedef Kernel::Triangle_3 Triangle;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+typedef Kernel::Plane_3 Plane;
+typedef Kernel::FT FT;
+using namespace CGAL::Three;
+class Polyhedron_demo_kernel_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionKernel";
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionKernel_triggered();
+
+}; // end Polyhedron_demo_kernel_plugin
+
+
+void Polyhedron_demo_kernel_plugin::on_actionKernel_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    typedef CGAL::Exact_integer ET; // choose exact integral type
+    typedef Polyhedron_kernel<Kernel,ET> Polyhedron_kernel;
+
+    // get triangles from polyhedron
+    std::list<Triangle> triangles;
+    get_triangles(*pMesh,std::back_inserter(triangles));
+
+    // solve LP 
+    std::cout << "Solve linear program..." << triangles.size();
+    Polyhedron_kernel kernel;
+    if(!kernel.solve(triangles.begin(),triangles.end()))
+    {
+      std::cout << "done (empty kernel)" << std::endl;
+      QMessageBox::information(mw, tr("Empty kernel"),
+                               tr("The kernel of the polyhedron \"%1\" is empty.").
+                               arg(item->name()));
+      QApplication::restoreOverrideCursor();
+      return;
+    }
+    std::cout << "done" << std::endl;
+
+    // add kernel as new polyhedron
+    Polyhedron *pKernel = new Polyhedron;
+
+    // get inside point
+    Point inside_point = kernel.inside_point();
+    Vector translate = inside_point - CGAL::ORIGIN;
+
+    // compute dual of translated polyhedron w.r.t. inside point.
+    std::cout << "Compute dual of translated polyhedron...";
+    std::list<Point> dual_points;
+    std::list<Triangle>::iterator it;
+    for(it = triangles.begin();
+      it != triangles.end();
+      it++)
+    {
+      const Triangle& triangle = *it;
+      const Point p0 = triangle[0] - translate;
+      const Point p1 = triangle[1] - translate;
+      const Point p2 = triangle[2] - translate;
+      Plane plane(p0,p1,p2); 
+      Vector normal = plane.orthogonal_vector();
+      normal = normal / std::sqrt(normal*normal);
+      // compute distance to origin (do not use plane.d())
+      FT distance_to_origin = std::sqrt(CGAL::squared_distance(Point(CGAL::ORIGIN),plane));
+      Point dual_point = CGAL::ORIGIN + normal / distance_to_origin;
+      dual_points.push_back(dual_point);
+    }
+    std::cout << "ok" << std::endl;
+
+    // compute convex hull in dual space
+    std::cout << "convex hull in dual space...";
+    Polyhedron convex_hull;
+    CGAL::convex_hull_3(dual_points.begin(),dual_points.end(),convex_hull);
+    std::cout << "ok" << std::endl;
+
+    // dualize and translate back to get final kernel
+    Dualizer<Polyhedron,Kernel> dualizer;
+    dualizer.run(convex_hull,*pKernel);
+    ::translate<Polyhedron,Kernel>(*pKernel,translate);
+    pKernel->inside_out();
+
+    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pKernel);
+    new_item->setName(tr("%1 (kernel)").arg(item->name()));
+    new_item->setColor(Qt::magenta);
+    new_item->setRenderingMode(item->renderingMode());
+    scene->addItem(new_item);
+
+    item->setRenderingMode(Wireframe);
+    scene->itemChanged(item);
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Kernel_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui
new file mode 100644
index 0000000..43a30f0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Add_point_set_dialog</class>
+ <widget class="QDialog" name="Add_point_set_dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetMinimumSize</enum>
+     </property>
+     <item>
+      <widget class="QTextEdit" name="textEdit">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="html">
+        <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
+       </property>
+       <property name="overwriteMode">
+        <bool>false</bool>
+       </property>
+       <property name="placeholderText">
+        <string notr="true">Point set format:  Ax Ay A3 Bx By Bz ... Zx Zy Zz </string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <property name="sizeConstraint">
+        <enum>QLayout::SetMinimumSize</enum>
+       </property>
+       <item>
+        <widget class="QPushButton" name="add_point_setButton">
+         <property name="text">
+          <string>Add point set</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="close_point_setButton">
+         <property name="text">
+          <string>Close</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui
new file mode 100644
index 0000000..d9a88bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Add_polylines_dialog</class>
+ <widget class="QDialog" name="Add_polylines_dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>459</width>
+    <height>332</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Add polylines</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetMinimumSize</enum>
+     </property>
+     <item>
+      <widget class="QTextEdit" name="textEdit">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="html">
+        <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
+       </property>
+       <property name="overwriteMode">
+        <bool>false</bool>
+       </property>
+       <property name="placeholderText">
+        <string notr="true">Polyline format:  Ax Ay A3 Bx By Bz ... Zx Zy Zz </string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <property name="sizeConstraint">
+        <enum>QLayout::SetMinimumSize</enum>
+       </property>
+       <item>
+        <widget class="QPushButton" name="add_polylineButton">
+         <property name="text">
+          <string>Create Polyline Item</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="close_polylineButton">
+         <property name="text">
+          <string>Close</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/CMakeLists.txt
new file mode 100644
index 0000000..5475b5c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/CMakeLists.txt
@@ -0,0 +1,57 @@
+include( polyhedron_demo_macros )
+
+polyhedron_demo_plugin(gocad_plugin GOCAD_io_plugin)
+target_link_libraries(gocad_plugin scene_polyhedron_item)
+
+qt5_wrap_ui( funcUI_FILES Function_dialog.ui )
+polyhedron_demo_plugin(io_implicit_function_plugin Implicit_function_io_plugin ${funcUI_FILES})
+target_link_libraries(io_implicit_function_plugin scene_implicit_function_item)
+
+polyhedron_demo_plugin(nef_io_plugin Nef_io_plugin)
+target_link_libraries(nef_io_plugin  scene_nef_polyhedron_item)
+
+qt5_wrap_ui( statisticsPolyhedronUI_FILES Polyhedron_demo_statistics_on_polyhedron_dialog.ui)
+polyhedron_demo_plugin(off_plugin OFF_io_plugin)
+target_link_libraries(off_plugin scene_polyhedron_item scene_polygon_soup_item)
+
+polyhedron_demo_plugin(off_to_nef_plugin OFF_to_nef_io_plugin)
+target_link_libraries(off_to_nef_plugin scene_nef_polyhedron_item)
+
+polyhedron_demo_plugin(off_to_xyz_plugin OFF_to_xyz_io_plugin)
+target_link_libraries(off_to_xyz_plugin scene_points_with_normal_item)
+
+qt5_wrap_ui( polylines_ioUI_FILES Add_polylines_dialog.ui )
+polyhedron_demo_plugin(polylines_io_plugin Polylines_io_plugin ${polylines_ioUI_FILES})
+target_link_libraries(polylines_io_plugin scene_polylines_item)
+
+polyhedron_demo_plugin(selection_io_plugin Selection_io_plugin)
+target_link_libraries(selection_io_plugin scene_polyhedron_selection_item)
+
+polyhedron_demo_plugin(stl_plugin STL_io_plugin)
+target_link_libraries(stl_plugin scene_polyhedron_item scene_polygon_soup_item)
+
+find_package(VTK QUIET COMPONENTS
+  vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources)
+if (VTK_FOUND)
+  include(${VTK_USE_FILE})
+  if ("${VTK_VERSION_MAJOR}" GREATER "5")
+    if(VTK_LIBRARIES)
+      polyhedron_demo_plugin(vtk_plugin VTK_io_plugin)
+      target_link_libraries(vtk_plugin scene_polyhedron_item scene_polylines_item
+                                        vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML
+                                        vtkFiltersCore vtkFiltersSources)
+    else()
+      message(STATUS "NOTICE : the vtk IO plugin needs VTK libraries and will not be compiled.")
+    endif()
+  else()
+    message(STATUS "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found).")
+  endif()
+else()
+  message(STATUS "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.")
+endif()
+qt5_wrap_ui( xyzUI_FILES Add_point_set_dialog.ui)
+polyhedron_demo_plugin(xyz_plugin XYZ_io_plugin ${xyzUI_FILES})
+target_link_libraries(xyz_plugin scene_points_with_normal_item)
+
+polyhedron_demo_plugin(ply_to_xyz_plugin PLY_to_xyz_io_plugin)
+target_link_libraries(ply_to_xyz_plugin scene_points_with_normal_item)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Function_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Function_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Function_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Function_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp
new file mode 100644
index 0000000..9aa8bfb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp
@@ -0,0 +1,109 @@
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+#include <CGAL/gocad_io.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+
+#include <QColor>
+
+using namespace CGAL::Three;
+
+class Polyhedron_demo_gocad_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString nameFilters() const;
+  QString name() const { return "gocad_plugin"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+QString Polyhedron_demo_gocad_plugin::nameFilters() const {
+  return "GOCAD files (*.ts *.xyz)";
+}
+
+bool Polyhedron_demo_gocad_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo) {
+
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+    
+  // Try to read GOCAD file in a polyhedron
+
+  CGAL::Timer t;
+  t.start();
+  Scene_polyhedron_item* item = new Scene_polyhedron_item(Polyhedron());
+  Polyhedron& P = * const_cast<Polyhedron*>(item->polyhedron());
+  
+  std::string name, color;
+  if(! read_gocad(P, in, name, color)){
+    // std::cerr << "Error: Invalid polyhedron" << std::endl;
+    delete item;
+    return 0;
+  }   
+
+  t.stop();
+  std::cerr << "Reading took " << t.time() << " sec." << std::endl;
+  if(name.size() == 0){
+    item->setName(fileinfo.baseName());
+  } else {
+    item->setName(name.c_str());
+  }
+  QColor qcolor(color.c_str());
+  if(qcolor.isValid()) 
+  {  
+    item->setColor(qcolor);
+    item->invalidateOpenGLBuffers();
+  }
+  
+
+  return item;
+}
+
+bool Polyhedron_demo_gocad_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports polyhedrons
+  return qobject_cast<const Scene_polyhedron_item*>(item);
+}
+
+bool Polyhedron_demo_gocad_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // This plugin supports polyhedrons
+  const Scene_polyhedron_item* poly_item = 
+    qobject_cast<const Scene_polyhedron_item*>(item);
+ 
+  if(!poly_item)
+    return false;
+
+  std::ofstream out(fileinfo.filePath().toUtf8());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  Polyhedron* poly = const_cast<Polyhedron*>(poly_item->polyhedron());
+
+  write_gocad(*poly, out, qPrintable(fileinfo.baseName()));
+
+  
+  return true;
+
+}
+
+#include "GOCAD_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp
new file mode 100644
index 0000000..26fedb2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp
@@ -0,0 +1,213 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+//#include <CGAL_demo/Plugin_interface.h>
+//#include <CGAL_demo/Plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Scene_implicit_function_item.h"
+#include "ui_Function_dialog.h"
+
+#include <iostream>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QPluginLoader>
+#include <QDir>
+#include <QApplication>
+#include <QMenu>
+#include <QList>
+#include <QLibrary>
+using namespace CGAL::Three;
+class Io_implicit_function_plugin :
+  public QObject, 
+  // public Polyhedron_demo_plugin_interface,
+  protected Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Io_implicit_function_plugin();
+  virtual ~Io_implicit_function_plugin() {}
+
+  bool applicable(QAction*) const { return true; }
+
+  QString name() const { return "implicit functions"; }
+  // QString nameFilters() const { return ""; }
+  // bool canLoad() const { return false; }
+  
+
+  typedef Polyhedron_demo_plugin_helper Plugin_helper;
+  
+  using Plugin_helper::init;
+  virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface);
+  
+  QList<QAction*> actions() const
+  {
+    return QList<QAction*>();
+  }
+  
+public Q_SLOTS:
+  void load_function() const;
+  
+private:
+  void load_function_plugins();
+  
+private:
+  QList<Implicit_function_interface*> functions_;
+};
+
+
+
+Io_implicit_function_plugin::
+Io_implicit_function_plugin()
+{
+  load_function_plugins();
+}
+
+
+void
+Io_implicit_function_plugin::
+init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface)
+{
+  this->scene = scene_interface;
+  this->mw = mainWindow;
+  
+  QAction* actionLoadFunction = new QAction("Load &Implicit Function", mw);
+  if( NULL != actionLoadFunction )
+  {
+    connect(actionLoadFunction, SIGNAL(triggered()), this, SLOT(load_function()));
+  }
+  
+  QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
+  if ( NULL != menuFile )
+  {
+    QList<QAction*> menuFileActions = menuFile->actions();
+    
+    // Look for action just after "Load..." action
+    QAction* actionAfterLoad = NULL;
+    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(), 
+         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+    {
+      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
+      {
+        ++it_action;
+        if ( it_action != end && NULL != *it_action )
+        {
+          actionAfterLoad = *it_action;
+        }
+      }
+    }
+    
+    // Insert "Load implicit function" action
+    if ( NULL != actionAfterLoad )
+    {
+      menuFile->insertAction(actionAfterLoad,actionLoadFunction);      
+    }
+    
+  }
+}
+
+
+void
+Io_implicit_function_plugin::
+load_function() const
+{
+  QDialog dialog(mw);
+  Ui::FunctionDialog ui;
+  ui.setupUi(&dialog);
+  
+  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  
+  // Add loaded functions to the dialog
+  int i=0;
+  Q_FOREACH( Implicit_function_interface* f, functions_ )
+  {
+    ui.functionList->insertItem(i++,f->name());
+  }
+
+  // Open window
+  int return_code = dialog.exec();
+  if(return_code == QDialog::Rejected) { return; }
+  
+  // Get selected function
+  i = ui.functionList->currentIndex();
+  Implicit_function_interface* function = functions_[i];
+  
+  // Create Scene_implicit_function object and add it to the framework
+  Scene_implicit_function_item* item =
+    new Scene_implicit_function_item(function);
+  
+  item->setName(tr("%1").arg(function->name()));
+  item->setRenderingMode(FlatPlusEdges);
+
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  scene->itemChanged(index);
+    
+  CGAL::Three::Scene_interface::Item_id new_item_id = scene->addItem(item);
+  scene->setSelectedItem(new_item_id);
+}
+
+void
+Io_implicit_function_plugin::
+load_function_plugins()
+{
+  QDir pluginsDir(qApp->applicationDirPath());
+  QString dirname = pluginsDir.dirName();
+  if ( !pluginsDir.cd("implicit_functions") ) { 
+    // In that case, dirname may be "Debug" or "Release" and one has to
+    // search in ../implicit_functions/Debug or
+    // ../implicit_functions/Release
+    QString newDir = QString("../implicit_functions/") + dirname;
+    if( !pluginsDir.cd(newDir) ) return; 
+  }
+  
+  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
+  {
+    if ( fileName.contains("plugin") && QLibrary::isLibrary(fileName) )
+    {
+      qDebug("    + Loading Function \"%s\"...", fileName.toUtf8().data());
+      QPluginLoader loader;
+      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
+      QObject *function_plugin = loader.instance();
+      if ( NULL != function_plugin )
+      {
+        Implicit_function_interface* function =
+          qobject_cast<Implicit_function_interface*>(function_plugin);
+        
+        if ( NULL != function )
+        {
+          functions_ << function;
+        }
+      }
+    }
+  }
+}
+
+#include "Implicit_function_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp
new file mode 100644
index 0000000..9a18386
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp
@@ -0,0 +1,79 @@
+#include "Scene_nef_polyhedron_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+#include <limits>
+
+using namespace CGAL::Three;
+class Polyhedron_demo_io_nef_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  QString nameFilters() const;
+  QString name() const { return "io_nef_plugin"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+QString Polyhedron_demo_io_nef_plugin::nameFilters() const {
+  return "nef files (*.nef3)";
+}
+
+bool Polyhedron_demo_io_nef_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_io_nef_plugin::load(QFileInfo fileinfo) {
+  //do not try file with extension different from nef3
+  if (fileinfo.suffix() != "nef3") return 0;
+  
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+    
+  // Try to read .nef3 in a polyhedron
+  Scene_nef_polyhedron_item* item = new Scene_nef_polyhedron_item();
+  item->setName(fileinfo.baseName());
+  if(!item->load(in))
+  {
+    delete item;
+    return 0;
+  }
+
+  return item;
+}
+
+bool Polyhedron_demo_io_nef_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports polyhedrons and polygon soups
+  return qobject_cast<const Scene_nef_polyhedron_item*>(item);
+}
+
+bool Polyhedron_demo_io_nef_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // This plugin supports polyhedrons and polygon soups
+  const Scene_nef_polyhedron_item* nef_item = 
+    qobject_cast<const Scene_nef_polyhedron_item*>(item);
+
+  if(!nef_item)
+    return false;
+
+  std::ofstream out(fileinfo.filePath().toUtf8());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  return (nef_item && nef_item->save(out));
+}
+
+#include "Nef_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp
new file mode 100644
index 0000000..4ef5a45
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp
@@ -0,0 +1,141 @@
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+
+#include <CGAL/IO/File_scanner_OFF.h>
+#include <QMessageBox>
+#include <QApplication>
+
+using namespace CGAL::Three;
+class Polyhedron_demo_off_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString name() const { return "off_plugin"; }
+  QString nameFilters() const { return "OFF files (*.off);;Wavefront OBJ (*.obj)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+   CGAL::Three::Scene_item* load_off(QFileInfo fileinfo);
+   CGAL::Three::Scene_item* load_obj(QFileInfo fileinfo);
+  
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+bool Polyhedron_demo_off_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_off_plugin::load(QFileInfo fileinfo) {
+  if(fileinfo.suffix().toLower() == "off"){
+    return load_off(fileinfo);
+  } else if(fileinfo.suffix().toLower() == "obj"){
+    return load_obj(fileinfo);
+  }
+  return 0;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) {
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+
+  // to detect isolated vertices
+  CGAL::File_scanner_OFF scanner( in, false);
+  std::size_t total_nb_of_vertices = scanner.size_of_vertices();
+  in.seekg(0);
+
+  // Try to read .off in a polyhedron
+  Scene_polyhedron_item* item = new Scene_polyhedron_item();
+  item->setName(fileinfo.completeBaseName());
+  if(!item->load(in))
+  {
+    delete item;
+
+    // Try to read .off in a polygon soup
+    Scene_polygon_soup_item* soup_item = new Scene_polygon_soup_item;
+    soup_item->setName(fileinfo.completeBaseName());
+    in.close();
+    std::ifstream in2(fileinfo.filePath().toUtf8());
+    if(!soup_item->load(in2)) {
+      delete soup_item;
+      return 0;
+    }
+    return soup_item;
+  }
+  else
+    if( total_nb_of_vertices!= item->polyhedron()->size_of_vertices())
+    {
+      QApplication::restoreOverrideCursor();
+      item->setNbIsolatedvertices(total_nb_of_vertices - item->polyhedron()->size_of_vertices());
+      QMessageBox::warning((QWidget*)NULL,
+                     tr("Isolated vertices found"),
+                     tr("%1 isolated vertices ignored")
+                     .arg(item->getNbIsolatedvertices()));
+    }
+
+  return item;
+}
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_off_plugin::load_obj(QFileInfo fileinfo) {
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+
+  // Try to read .obj in a polyhedron
+  Scene_polyhedron_item* item = new Scene_polyhedron_item();
+  item->setName(fileinfo.completeBaseName());
+  if(!item->load_obj(in))
+    {
+      delete item;
+      return 0;
+    }
+
+
+  return item;
+}
+
+bool Polyhedron_demo_off_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports polyhedrons and polygon soups
+  return qobject_cast<const Scene_polyhedron_item*>(item) ||
+    qobject_cast<const Scene_polygon_soup_item*>(item);
+}
+
+bool Polyhedron_demo_off_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // This plugin supports polyhedrons and polygon soups
+  const Scene_polyhedron_item* poly_item = 
+    qobject_cast<const Scene_polyhedron_item*>(item);
+  const Scene_polygon_soup_item* soup_item = 
+    qobject_cast<const Scene_polygon_soup_item*>(item);
+
+  if(!poly_item && !soup_item)
+    return false;
+
+  std::ofstream out(fileinfo.filePath().toUtf8());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  return (poly_item && poly_item->save(out)) || 
+    (soup_item && soup_item->save(out));
+}
+
+#include "OFF_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp
new file mode 100644
index 0000000..0ac3e1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp
@@ -0,0 +1,57 @@
+#include "Scene_nef_polyhedron_item.h"
+#include "Nef_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+using namespace CGAL::Three;
+class Polyhedron_demo_off_to_nef_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString name() const { return "off_to_nef_plugin"; }
+  QString nameFilters() const { return "OFF files, into nef (*.off)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+bool Polyhedron_demo_off_to_nef_plugin::canLoad() const {
+  return true;
+}
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_off_to_nef_plugin::load(QFileInfo fileinfo) {
+  std::ifstream in(fileinfo.filePath().toUtf8());
+
+  if(!in)
+    std::cerr << "Error!\n";
+  Scene_nef_polyhedron_item* item = new Scene_nef_polyhedron_item();
+
+  if(!item->load_from_off(in))
+  {
+    delete item;
+    return 0;
+  }
+
+  item->setName(fileinfo.baseName());
+  return item;
+}
+
+bool Polyhedron_demo_off_to_nef_plugin::canSave(const CGAL::Three::Scene_item*)
+{
+  return false;
+}
+
+bool Polyhedron_demo_off_to_nef_plugin::save(const CGAL::Three::Scene_item*, QFileInfo)
+{
+  return false;
+}
+
+#include "OFF_to_nef_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp
new file mode 100644
index 0000000..f818789
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp
@@ -0,0 +1,85 @@
+#include "Scene_points_with_normal_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <fstream>
+using namespace CGAL::Three;
+class Polyhedron_demo_off_to_xyz_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString name() const { return "off_to_xyz_plugin"; }
+  QString nameFilters() const { return "OFF files as Point set (*.off)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+bool Polyhedron_demo_off_to_xyz_plugin::canLoad() const {
+  return true;
+}
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_off_to_xyz_plugin::load(QFileInfo fileinfo) {
+  std::ifstream in(fileinfo.filePath().toUtf8());
+
+  if(!in)
+    std::cerr << "Error!\n";
+
+  Scene_points_with_normal_item* item;
+
+  Polyhedron p;
+  in >> p;
+  if (in && !p.empty())
+    item = new Scene_points_with_normal_item(p);
+  else{
+    in.close();
+    in.open(fileinfo.filePath().toUtf8());
+    item = new Scene_points_with_normal_item();
+    if(!item->read_off_point_set(in))
+    {
+      delete item;
+      return 0;
+    }
+  }
+
+  item->setName(fileinfo.completeBaseName());
+  return item;
+}
+
+bool Polyhedron_demo_off_to_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports point sets
+  return qobject_cast<const Scene_points_with_normal_item*>(item);
+}
+
+bool Polyhedron_demo_off_to_xyz_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // Check extension (quietly)
+  std::string extension = fileinfo.suffix().toUtf8().data();
+  if (extension != "off" && extension != "OFF")
+    return false;
+
+  // This plugin supports point sets
+  const Scene_points_with_normal_item* point_set_item =
+    qobject_cast<const Scene_points_with_normal_item*>(item);
+  if(!point_set_item)
+    return false;
+
+  // Save point set as .xyz
+  std::ofstream out(fileinfo.filePath().toUtf8().data());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  return point_set_item->write_off_point_set(out);
+}
+
+
+#include "OFF_to_xyz_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp
new file mode 100644
index 0000000..260f691
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp
@@ -0,0 +1,73 @@
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include <fstream>
+
+class Polyhedron_demo_ply_to_xyz_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString name() const { return "ply_to_xyz_plugin"; }
+  QString nameFilters() const { return "PLY files as Point set (*.ply)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+bool Polyhedron_demo_ply_to_xyz_plugin::canLoad() const {
+  return true;
+}
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_ply_to_xyz_plugin::load(QFileInfo fileinfo) {
+  std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
+
+  if(!in)
+    std::cerr << "Error!\n";
+
+  Scene_points_with_normal_item* item;
+  item = new Scene_points_with_normal_item();
+  if(!item->read_ply_point_set(in))
+    {
+      delete item;
+      return 0;
+    }
+
+  item->setName(fileinfo.completeBaseName());
+  return item;
+}
+
+bool Polyhedron_demo_ply_to_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports point sets
+  return qobject_cast<const Scene_points_with_normal_item*>(item);
+}
+
+bool Polyhedron_demo_ply_to_xyz_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // Check extension (quietly)
+  std::string extension = fileinfo.suffix().toUtf8().data();
+  if (extension != "ply" && extension != "PLY")
+    return false;
+
+  // This plugin supports point sets
+  const Scene_points_with_normal_item* point_set_item =
+    qobject_cast<const Scene_points_with_normal_item*>(item);
+  if(!point_set_item)
+    return false;
+
+  // Save point set as .xyz
+  std::ofstream out(fileinfo.filePath().toUtf8().data());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  return point_set_item->write_ply_point_set(out);
+}
+
+
+#include "PLY_to_xyz_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp
new file mode 100644
index 0000000..7beec99
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp
@@ -0,0 +1,272 @@
+#include "Scene_polylines_item.h"
+
+#include <QMainWindow>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <fstream>
+#include <QVariant>
+#include <boost/foreach.hpp>
+#include <QMessageBox>
+
+#include "ui_Add_polylines_dialog.h"
+using namespace CGAL::Three;
+namespace Ui{
+    class Add_polylines_dialog;
+}
+class Polyhedron_demo_polylines_io_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface CGAL::Three::Polyhedron_demo_io_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+
+public:
+    // To silent a warning -Woverloaded-virtual
+    // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+    using Polyhedron_demo_plugin_helper::init;
+    //! Adds an action to the menu and configures the widget
+    void init(QMainWindow* mainWindow,
+              CGAL::Three::Scene_interface* scene_interface) {
+      //get the references
+      this->scene = scene_interface;
+      this->mw = mainWindow;
+      //creates and link the actions
+      actionAdd_polylines= new QAction("Add Polylines", mw);
+      if(actionAdd_polylines) {
+        connect(actionAdd_polylines, SIGNAL(triggered()),
+                this, SLOT(on_actionAdd_polylines_triggered()));
+      }
+
+      QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
+      if ( NULL != menuFile )
+      {
+        QList<QAction*> menuFileActions = menuFile->actions();
+
+        // Look for action just after "Load..." action
+        QAction* actionAfterLoad = NULL;
+        for ( QList<QAction*>::iterator it_action = menuFileActions.begin(),
+             end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+        {
+          if ( NULL != *it_action && (*it_action)->text().contains("Load Plugin") )
+          {
+            ++it_action;
+            if ( it_action != end && NULL != *it_action )
+            {
+              actionAfterLoad = *it_action;
+            }
+          }
+        }
+
+        // Insert "Load implicit function" action
+        if ( NULL != actionAfterLoad )
+        {
+          menuFile->insertAction(actionAfterLoad,actionAdd_polylines);
+        }
+      }
+    }
+  QString name() const { return "polylines_io_plugin"; }
+  QString nameFilters() const { return "Polylines files (*.polylines.txt *.cgal)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+  bool applicable(QAction*) const { return true;}
+  QList<QAction*> actions() const {
+    return QList<QAction*>();
+  }
+  protected Q_SLOTS:
+  //!Opens a dialog to add polylines on the fly.
+  void on_actionAdd_polylines_triggered();
+  //!Adds a polyline
+  void addPolylineButton_clicked();
+  //!Closes the dialog
+  void closePolylinesButton_clicked();
+
+private:
+  QAction* actionAdd_polylines;
+  Ui::Add_polylines_dialog *add_polydiagui;
+  QDialog *add_polydiag;
+};
+
+bool Polyhedron_demo_polylines_io_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_polylines_io_plugin::load(QFileInfo fileinfo) {
+
+  // Open file
+  std::ifstream ifs(fileinfo.filePath().toUtf8());
+  if(!ifs) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+
+  std::list<std::vector<Scene_polylines_item::Point_3> > polylines;
+  QStringList polylines_metadata;
+  
+  int counter = 0;
+  std::size_t n;
+  while(ifs >> n) {
+    ++counter;
+    std::cerr << "Polyline #" << polylines.size() << ": " << n << " vertices";
+    polylines.resize(polylines.size()+1);
+    std::vector<Scene_polylines_item::Point_3>& polyline = *(polylines.rbegin());
+    while(n--){
+      Scene_polylines_item::Point_3 p;
+      ifs >> p;
+      polyline.push_back(p);
+      if(!ifs.good()) return 0;
+    }
+    std::string line_remainder;
+    std::getline(ifs, line_remainder);
+    QString metadata(line_remainder.c_str());
+    if(metadata[0].isSpace()) {
+      metadata.remove(0, 1);
+    }
+    polylines_metadata << metadata;
+    if(!metadata.isEmpty()) {
+      std::cerr << " (metadata: \"" << qPrintable(metadata) << "\")\n";
+    } else {
+      std::cerr << "\n";
+    }
+    if(ifs.bad() || ifs.fail()) return 0;
+  }
+  if(counter == 0) return 0;
+  Scene_polylines_item* item = new Scene_polylines_item;
+  item->polylines = polylines;
+  item->setName(fileinfo.baseName());
+  item->setColor(Qt::black);
+  item->setProperty("polylines metadata", polylines_metadata);
+  std::cerr << "Number of polylines in item: " << item->polylines.size() << std::endl;
+  item->invalidateOpenGLBuffers();
+  return item;
+}
+
+bool Polyhedron_demo_polylines_io_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  return qobject_cast<const Scene_polylines_item*>(item) != 0;
+}
+
+bool Polyhedron_demo_polylines_io_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  const Scene_polylines_item* poly_item = 
+    qobject_cast<const Scene_polylines_item*>(item);
+
+  if(!poly_item)
+    return false;
+
+  std::ofstream out(fileinfo.filePath().toUtf8());
+
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+
+  if(!out) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return false;
+  }
+
+  typedef Scene_polylines_item::Polylines_container Polylines_container;
+  typedef Polylines_container::value_type Polyline;
+  typedef Polyline::value_type Point_3;
+
+  QStringList metadata = item->property("polylines metadata").toStringList();
+
+  BOOST_FOREACH(const Polyline& polyline, poly_item->polylines) {
+    out << polyline.size();
+    BOOST_FOREACH(const Point_3& p, polyline) {
+      out << " " << p.x() << " " << p.y() << " " << p.z();
+    }
+    if(!metadata.isEmpty()) {
+      out << " " << qPrintable(metadata.front());
+      metadata.pop_front();
+    }
+    out << std::endl;
+  }
+  return (bool) out;
+}
+
+void Polyhedron_demo_polylines_io_plugin::on_actionAdd_polylines_triggered()
+{
+  add_polydiag = new QDialog(mw);
+  add_polydiagui = new Ui::Add_polylines_dialog();
+  add_polydiagui->setupUi(add_polydiag);
+  connect(add_polydiagui->add_polylineButton, SIGNAL(clicked()), this, SLOT(addPolylineButton_clicked()));
+  connect(add_polydiagui->close_polylineButton, SIGNAL(clicked()), this, SLOT(closePolylinesButton_clicked()));
+  add_polydiag->exec();
+}
+
+
+void Polyhedron_demo_polylines_io_plugin::addPolylineButton_clicked()
+{
+    static int nb_of_polylines = 0;
+  QString text = add_polydiagui->textEdit->toPlainText();
+  std::list<std::vector<Scene_polylines_item::Point_3> > polylines;
+  polylines.resize(polylines.size()+1);
+  std::vector<Scene_polylines_item::Point_3>& polyline = *(polylines.rbegin());
+  QStringList polylines_metadata;
+  QStringList list = text.split(QRegExp("\\s+"), QString::SkipEmptyParts);
+  int counter = 0;
+  double coord[3];
+  bool ok = true;
+  if (list.isEmpty()) return;
+  if (list.size()%3!=0){
+    QMessageBox *msgBox = new QMessageBox;
+    msgBox->setWindowTitle("Error");
+    msgBox->setText("ERROR : Input should consists of triplets.");
+    msgBox->exec();
+    return;
+  }
+  Q_FOREACH(QString s, list)
+  {
+      if(!s.isEmpty())
+      {
+          double res = s.toDouble(&ok);
+          if(!ok)
+          {
+              QMessageBox *msgBox = new QMessageBox;
+              msgBox->setWindowTitle("Error");
+              msgBox->setText("ERROR : Coordinates are invalid.");
+              msgBox->exec();
+              break;
+          }
+          else
+          {
+            coord[counter] = res;
+            counter++;
+          }
+      }
+      if(counter == 3)
+      {
+          Scene_polylines_item::Point_3 p(coord[0], coord[1], coord[2]);
+          polyline.push_back(p);
+          counter =0;
+      }
+  }
+    if(ok)
+    {
+        add_polydiagui->textEdit->clear();
+        Scene_polylines_item* item = new Scene_polylines_item;
+        item->polylines = polylines;
+        nb_of_polylines++;
+        QString name = QString("Polyline #%1").arg(QString::number(nb_of_polylines));
+        item->setName(name);
+        item->setColor(Qt::black);
+        item->setProperty("polylines metadata", polylines_metadata);
+        item->invalidateOpenGLBuffers();
+        scene->addItem(item);
+    }
+}
+
+void Polyhedron_demo_polylines_io_plugin::closePolylinesButton_clicked()
+{
+    add_polydiag->close();
+}
+
+#include "Polylines_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp
new file mode 100644
index 0000000..7689a9a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp
@@ -0,0 +1,92 @@
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+
+#include <CGAL/IO/Polyhedron_builder_from_STL.h>
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+
+#include <QColor>
+using namespace CGAL::Three;
+class Polyhedron_demo_stl_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  QString nameFilters() const;
+  QString name() const { return "stl_plugin"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+};
+
+QString Polyhedron_demo_stl_plugin::nameFilters() const {
+  return "STL files (*.stl)";
+}
+
+bool Polyhedron_demo_stl_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_stl_plugin::load(QFileInfo fileinfo) {
+
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8(), std::ios::in | std::ios::binary);
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+    return NULL;
+  }
+
+  std::vector<CGAL::cpp11::array<double, 3> > points;
+  std::vector<CGAL::cpp11::array<int, 3> > triangles;
+  if (!CGAL::read_STL(in, points, triangles))
+  {
+    std::cerr << "Error: invalid STL file" << std::endl;
+    return NULL;
+  }
+
+  try{
+    // Try building a polyhedron
+    Polyhedron P;
+    if (CGAL::Polygon_mesh_processing::is_polygon_soup_a_polygon_mesh(triangles))
+      CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points, triangles, P);
+    
+    if(! P.is_valid() || P.empty()){
+      std::cerr << "Error: Invalid polyhedron" << std::endl;
+    }
+    else{
+      Scene_polyhedron_item* item = new Scene_polyhedron_item(P);
+      item->setName(fileinfo.completeBaseName());
+      return item;
+    }
+  }
+  catch(...){}
+
+  Scene_polygon_soup_item* item = new Scene_polygon_soup_item();
+  item->setName(fileinfo.completeBaseName());
+  item->load(points, triangles);
+  return item;
+}
+
+bool Polyhedron_demo_stl_plugin::canSave(const CGAL::Three::Scene_item*)
+{
+  return false;
+}
+
+bool Polyhedron_demo_stl_plugin::save(const CGAL::Three::Scene_item*, QFileInfo)
+{
+  return false;
+}
+
+#include "STL_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp
new file mode 100644
index 0000000..0f983ff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp
@@ -0,0 +1,42 @@
+#include "Scene_polyhedron_selection_item.h"
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+using namespace CGAL::Three;
+class Polyhedron_demo_selection_io_plugin :
+        public QObject,
+        public Polyhedron_demo_io_plugin_interface
+{
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+    QString name() const { return "selection_io_plugin"; }
+    QString nameFilters() const { return "Selection files (*.selection.txt)"; }
+
+    bool canLoad() const { return true; }
+    CGAL::Three::Scene_item* load(QFileInfo fileinfo) {
+        if(fileinfo.suffix().toLower() != "txt") return 0;
+        // There will be no actual loading at this step.
+        // Polyhedron_demo_selection_plugin will trigger load when item in new_item_created
+        Scene_polyhedron_selection_item* item = new Scene_polyhedron_selection_item();
+        if(!item->load(fileinfo.filePath().toStdString())) {
+            delete item;
+            return NULL;
+        }
+        return item;
+    }
+
+    bool canSave(const CGAL::Three::Scene_item* scene_item) {
+        return qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
+    }
+    bool save(const CGAL::Three::Scene_item* scene_item, QFileInfo fileinfo) {
+        const Scene_polyhedron_selection_item* item = qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
+        if(item == NULL) { return false; }
+
+        return item->save(fileinfo.filePath().toStdString());
+    }
+};
+
+#include <QtPlugin>
+//Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_io_plugin, Polyhedron_demo_selection_io_plugin)
+#include "Selection_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp
new file mode 100644
index 0000000..b754e47
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp
@@ -0,0 +1,396 @@
+// Copyright (c) 2015  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot <sebastien.loriot at cgal.org>,
+//                 Jane Tournois
+//
+
+#include <QtCore/qglobal.h>
+
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include <QApplication>
+#include <QMessageBox>
+#include <QMainWindow>
+#include <QFileDialog>
+#include <QString>
+
+#include <fstream>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/unordered_map.hpp>
+
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/property_map.h>
+
+#include <vtkSmartPointer.h>
+#include <vtkDataSetReader.h>
+#include <vtkXMLPolyDataReader.h>
+#include <vtkPolyDataWriter.h>
+#include <vtkUnstructuredGrid.h>
+#include <vtkXMLUnstructuredGridReader.h>
+#include <vtkXMLPolyDataWriter.h>
+#include <vtkPolyData.h>
+#include <vtkIdTypeArray.h>
+#include <vtkFieldData.h>
+#include <vtkFloatArray.h>
+#include <vtkDoubleArray.h>
+#include <vtkCell.h>
+#include <vtkCellData.h>
+#include <vtkIdList.h>
+#include <vtkAppendFilter.h>
+#include <vtkSphereSource.h>
+#include <vtkVersion.h>
+#include <vtkPoints.h>
+#include <vtkCellArray.h>
+#include <vtkType.h>
+#include <vtkCommand.h>
+
+namespace CGAL{
+
+  class ErrorObserverVtk : public vtkCommand
+  {
+  public:
+    ErrorObserverVtk() :
+      Error(false),
+      Warning(false),
+      ErrorMessage(""),
+      WarningMessage("") {}
+    static ErrorObserverVtk *New() { return new ErrorObserverVtk; }
+
+    bool GetError() const          { return this->Error; }
+    bool GetWarning() const        { return this->Warning; }
+    std::string GetErrorMessage()   { return ErrorMessage; }
+    std::string GetWarningMessage() { return WarningMessage; }
+
+    void Clear()
+    {
+      this->Error = false;
+      this->Warning = false;
+      this->ErrorMessage = "";
+      this->WarningMessage = "";
+    }
+    virtual void Execute(vtkObject *vtkNotUsed(caller),
+                         unsigned long event,
+                         void *calldata)
+    {
+      switch (event)
+      {
+      case vtkCommand::ErrorEvent:
+        ErrorMessage = static_cast<char *>(calldata);
+        this->Error = true;
+        break;
+      case vtkCommand::WarningEvent:
+        WarningMessage = static_cast<char *>(calldata);
+        this->Warning = true;
+        break;
+      }
+    }
+
+  private:
+    bool        Error;
+    bool        Warning;
+    std::string ErrorMessage;
+    std::string WarningMessage;
+  };
+
+  template <typename TM>
+  bool vtkPointSet_to_polygon_mesh(vtkPointSet* poly_data,
+                                   TM& tmesh)
+  {
+    typedef typename boost::property_map<TM, CGAL::vertex_point_t>::type VPMap;
+    typedef typename boost::property_map_value<TM, CGAL::vertex_point_t>::type Point_3;
+    typedef typename boost::graph_traits<TM>::vertex_descriptor vertex_descriptor;
+
+    VPMap vpmap = get(CGAL::vertex_point, tmesh);
+
+    // get nb of points and cells
+    vtkIdType nb_points = poly_data->GetNumberOfPoints();
+    vtkIdType nb_cells = poly_data->GetNumberOfCells();
+
+    //extract points
+    std::vector<vertex_descriptor> vertex_map(nb_points);
+    for (vtkIdType i = 0; i<nb_points; ++i)
+    {
+      double coords[3];
+      poly_data->GetPoint(i, coords);
+
+      vertex_descriptor v = add_vertex(tmesh);
+      put(vpmap, v, Point_3(coords[0], coords[1], coords[2]));
+      vertex_map[i]=v;
+    }
+
+    //extract cells
+    for (vtkIdType i = 0; i<nb_cells; ++i)
+    {
+      vtkCell* cell_ptr = poly_data->GetCell(i);
+
+      vtkIdType nb_vertices = cell_ptr->GetNumberOfPoints();
+      if (nb_vertices < 3)
+        return false;
+      std::vector<vertex_descriptor> vr(nb_vertices);
+      for (vtkIdType k=0; k<nb_vertices; ++k)
+        vr[k]=vertex_map[cell_ptr->GetPointId(k)];
+
+      CGAL::Euler::add_face(vr, tmesh);
+    }
+    return true;
+  }
+
+  template <class Point_3>
+  void extract_segments_from_vtkPointSet(vtkPointSet* poly_data,
+                                         std::vector< std::vector<Point_3> >& segments)
+  {
+    // get nb of points and cells
+    vtkIdType nb_points = poly_data->GetNumberOfPoints();
+    vtkIdType nb_cells = poly_data->GetNumberOfCells();
+
+    //extract points
+    std::vector<Point_3> point_map(nb_points);
+    for (vtkIdType i = 0; i<nb_points; ++i)
+    {
+      double coords[3];
+      poly_data->GetPoint(i, coords);
+      point_map[i]=Point_3(coords[0], coords[1], coords[2]);
+    }
+
+    //extract segments
+    for (vtkIdType i = 0; i<nb_cells; ++i)
+    {
+      vtkCell* cell_ptr = poly_data->GetCell(i);
+
+      vtkIdType nb_vertices = cell_ptr->GetNumberOfPoints();
+      if (nb_vertices !=2) continue;
+      segments.push_back( std::vector<Point_3>() );
+      segments.back().push_back(point_map[cell_ptr->GetPointId(0)]);
+      segments.back().push_back(point_map[cell_ptr->GetPointId(1)]);
+    }
+  }
+
+  template<typename VtkWriter, typename PM>
+  void polygon_mesh_to_vtkUnstructured(const PM& pmesh,//PolygonMesh
+                                       const char* filename)
+  {
+    typedef typename boost::graph_traits<PM>::vertex_descriptor   vertex_descriptor;
+    typedef typename boost::graph_traits<PM>::face_descriptor     face_descriptor;
+    typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+
+    typedef typename boost::property_map<PM, CGAL::vertex_point_t>::const_type VPMap;
+    typedef typename boost::property_map_value<PM, CGAL::vertex_point_t>::type Point_3;
+    VPMap vpmap = get(CGAL::vertex_point, pmesh);
+
+    vtkPoints* const vtk_points = vtkPoints::New();
+    vtkCellArray* const vtk_cells = vtkCellArray::New();
+
+    vtk_points->Allocate(pmesh.size_of_vertices());
+    vtk_cells->Allocate(pmesh.size_of_facets());
+
+    std::map<Polyhedron::Vertex_handle, vtkIdType> Vids;
+    vtkIdType inum = 0;
+
+    BOOST_FOREACH(vertex_descriptor v, vertices(pmesh))
+    {
+      const Point_3& p = get(vpmap, v);
+      vtk_points->InsertNextPoint(CGAL::to_double(p.x()),
+                                  CGAL::to_double(p.y()),
+                                  CGAL::to_double(p.z()));
+      Vids[v] = inum++;
+    }
+    BOOST_FOREACH(face_descriptor f, faces(pmesh))
+    {
+      vtkIdList* cell = vtkIdList::New();
+      BOOST_FOREACH(halfedge_descriptor h,
+                    halfedges_around_face(halfedge(f, pmesh), pmesh))
+      {
+        cell->InsertNextId(Vids[target(h, pmesh)]);
+      }
+      vtk_cells->InsertNextCell(cell);
+      cell->Delete();
+    }
+
+    vtkSmartPointer<vtkPolyData> polydata =
+      vtkSmartPointer<vtkPolyData>::New();
+
+    polydata->SetPoints(vtk_points);
+    vtk_points->Delete();
+
+    polydata->SetPolys(vtk_cells);
+    vtk_cells->Delete();
+
+    // Combine the two data sets
+    //vtkSmartPointer<vtkAppendFilter> appendFilter =
+    //  vtkSmartPointer<vtkAppendFilter>::New();
+    //appendFilter->AddInputData(polydata);
+    //appendFilter->Update();
+
+    //vtkSmartPointer<vtkPolyData> unstructuredGrid =
+    //  vtkSmartPointer<vtkPolyData>::New();
+    //unstructuredGrid->ShallowCopy(appendFilter->GetOutput());
+
+    // Write the unstructured grid
+    vtkSmartPointer<VtkWriter> writer =
+      vtkSmartPointer<VtkWriter>::New();
+    writer->SetFileName(filename);
+    writer->SetInputData(polydata);
+    writer->Write();
+  }
+}//end namespace CGAL
+
+
+class Polyhedron_demo_vtk_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
+  typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
+
+  QString nameFilters() const {
+    return "VTK PolyData files (*.vtk);; VTK XML PolyData (*.vtp)"; }
+  QString name() const { return "vtk_plugin"; }
+
+  bool canSave(const CGAL::Three::Scene_item* item)
+  {
+    return qobject_cast<const Scene_polyhedron_item*>(item);
+  }
+  bool save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+  {
+    std::string extension = fileinfo.suffix().toLower().toStdString();
+    if ( extension != "vtk" && extension != "vtp")
+      return false;
+
+    std::string output_filename = fileinfo.absoluteFilePath().toStdString();
+
+    const Scene_polyhedron_item* poly_item =
+      qobject_cast<const Scene_polyhedron_item*>(item);
+
+    if (!poly_item)
+      return false;
+    else
+    {
+      if (extension != "vtp")
+        CGAL::polygon_mesh_to_vtkUnstructured<vtkPolyDataWriter>(
+          *poly_item->polyhedron(),
+          output_filename.data());
+      else
+        CGAL::polygon_mesh_to_vtkUnstructured<vtkXMLPolyDataWriter>(
+        *poly_item->polyhedron(),
+        output_filename.data());
+    }
+    return true;
+  }
+
+  bool canLoad() const { return true; }
+
+  template <class vtkReader>
+  vtkSmartPointer<vtkReader>
+  read_vtk_file(const std::string& input_filename,
+                vtkSmartPointer<CGAL::ErrorObserverVtk> errorObserver)
+  {
+    vtkSmartPointer<vtkReader> reader = vtkSmartPointer<vtkReader>::New();
+    reader->AddObserver(vtkCommand::ErrorEvent, errorObserver);
+    reader->AddObserver(vtkCommand::WarningEvent, errorObserver);
+    reader->SetFileName(input_filename.data());
+    reader->Update();
+    return reader;
+  }
+
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo)
+  {
+    std::string extension=fileinfo.suffix().toLower().toStdString();
+    if (extension != "vtk" && extension != "vtp" && extension != "vtu")
+      return 0;
+
+    std::string fname = fileinfo.absoluteFilePath().toStdString();
+
+    Polyhedron poly;
+    // Try to read .vtk in a polyhedron
+    vtkSmartPointer<vtkPointSet> data;
+    vtkSmartPointer<CGAL::ErrorObserverVtk> obs =
+      vtkSmartPointer<CGAL::ErrorObserverVtk>::New();
+
+    if (extension=="vtp")
+      data = read_vtk_file<vtkXMLPolyDataReader>(fname,obs)
+              ->GetOutput();
+    else
+     if (extension=="vtu")
+       data = read_vtk_file<vtkXMLUnstructuredGridReader>(fname,obs)
+                ->GetOutput();
+     else{
+       //read non-XML data
+       vtkSmartPointer<vtkDataSetReader> reader =
+         read_vtk_file<vtkDataSetReader>(fname,obs);
+       data = vtkPolyData::SafeDownCast(reader->GetOutput());
+       if (!data)
+        data = vtkUnstructuredGrid::SafeDownCast(reader->GetOutput());
+     }
+
+    if (obs->GetError())
+    {
+      QMessageBox msgBox;
+      msgBox.setText("This type of data can't be opened");
+      msgBox.setInformativeText(QString("VTK error message :\n")
+        .append(QString(obs->GetErrorMessage().data())));
+      msgBox.setStandardButtons(QMessageBox::Ok);
+      msgBox.setIcon(QMessageBox::Critical);
+      msgBox.exec();
+      return NULL;
+    }
+    if (obs->GetWarning())
+    {
+      QMessageBox msgBox;
+      msgBox.setText("This file generates a warning");
+      msgBox.setInformativeText(QString("VTK warning message :\n")
+        .append(QString(obs->GetWarningMessage().data())));
+      msgBox.setStandardButtons(QMessageBox::Ok);
+      msgBox.setIcon(QMessageBox::Warning);
+      msgBox.exec();
+    }
+
+    if (CGAL::vtkPointSet_to_polygon_mesh(data, poly))
+    {
+      Scene_polyhedron_item* poly_item = new Scene_polyhedron_item(poly);
+      poly_item->setName(fileinfo.fileName());
+      return poly_item;
+    }
+    else{
+      // extract only segments
+      std::vector< std::vector<Polyhedron::Point> > segments;
+      extract_segments_from_vtkPointSet(data,segments);
+      if (segments.empty()) return NULL; /// TODO handle point sets
+      Scene_polylines_item* polyline_item = new Scene_polylines_item();
+      polyline_item->setName(fileinfo.fileName());
+      BOOST_FOREACH(const std::vector<Polyhedron::Point_3>& segment, segments)
+        polyline_item->polylines.push_back(segment);
+      return polyline_item;
+    }
+    return NULL;
+  }
+}; // end Polyhedron_demo_vtk_plugin
+
+
+#include "VTK_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp
new file mode 100644
index 0000000..1c18da4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp
@@ -0,0 +1,223 @@
+#include "Scene_points_with_normal_item.h"
+#include "Kernel_type.h"
+
+#include <QMainWindow>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <fstream>
+#include <QMessageBox>
+#include <QMenu>
+
+#include "ui_Add_point_set_dialog.h"
+using namespace CGAL::Three;
+namespace Ui{
+    class Add_point_set_dialog;
+}
+class Polyhedron_demo_xyz_plugin :
+  public QObject,
+  public Polyhedron_demo_io_plugin_interface,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface CGAL::Three::Polyhedron_demo_io_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+    // To silent a warning -Woverloaded-virtual
+    // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+    using Polyhedron_demo_plugin_helper::init;
+    //! Adds an action to the menu and configures the widget
+    void init(QMainWindow* mainWindow,
+              CGAL::Three::Scene_interface* scene_interface) {
+      //get the references
+      this->scene = scene_interface;
+      this->mw = mainWindow;
+      //creates and link the actions
+      actionAdd_point_set= new QAction("Add Point Sets", mw);
+      if(actionAdd_point_set) {
+        connect(actionAdd_point_set, SIGNAL(triggered()),
+                this, SLOT(on_actionAdd_point_set_triggered()));
+      }
+
+      QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
+      if ( NULL != menuFile )
+      {
+        QList<QAction*> menuFileActions = menuFile->actions();
+
+        // Look for action just after "Load..." action
+        QAction* actionAfterLoad = NULL;
+        for ( QList<QAction*>::iterator it_action = menuFileActions.begin(),
+             end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+        {
+          if ( NULL != *it_action && (*it_action)->text().contains("Load Plugin") )
+          {
+            ++it_action;
+            if ( it_action != end && NULL != *it_action )
+            {
+              actionAfterLoad = *it_action;
+            }
+          }
+        }
+
+        // Insert "Load implicit function" action
+        if ( NULL != actionAfterLoad )
+        {
+          menuFile->insertAction(actionAfterLoad,actionAdd_point_set);
+        }
+      }
+    }
+  QString name() const { return "xyz_plugin"; }
+
+  QString nameFilters() const { return "XYZ as Point Set (*.xyz);;Point Set with Normal (*.pwn)"; }
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+  bool applicable(QAction*) const { return true;}
+  QList<QAction*> actions() const {
+    return QList<QAction*>();
+  }
+protected Q_SLOTS:
+  //!Opens a dialog to add a point set on the fly.
+  void on_actionAdd_point_set_triggered();
+  //!Adds a point set
+  void addPointSetButton_clicked();
+  //!Closes the dialog
+  void closePointSetButton_clicked();
+private:
+  QAction* actionAdd_point_set;
+  QDialog *add_pointsetdiag;
+  Ui::Add_point_set_dialog *add_pointsetdiagui;
+};
+
+bool Polyhedron_demo_xyz_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_xyz_plugin::load(QFileInfo fileinfo)
+{
+  // Open file
+  std::ifstream in(fileinfo.filePath().toUtf8().data());
+  if(!in) {
+    std::cerr << "Error! Cannot open file " << fileinfo.filePath().toStdString() << std::endl;
+    return NULL;
+  }
+
+  // Read .xyz in a point set
+  Scene_points_with_normal_item* point_set_item = new Scene_points_with_normal_item;
+  point_set_item->setName(fileinfo.completeBaseName());
+  if(!point_set_item->read_xyz_point_set(in)) {
+    delete point_set_item;
+    return NULL;
+  }
+  return point_set_item;
+}
+
+bool Polyhedron_demo_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports point sets
+  return qobject_cast<const Scene_points_with_normal_item*>(item);
+}
+
+bool Polyhedron_demo_xyz_plugin::save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+  // Check extension (quietly)
+  std::string extension = fileinfo.suffix().toUtf8().data();
+  if (extension != "xyz" && extension != "XYZ" &&
+      extension != "pwn" && extension != "PWN")
+    return false;
+
+  // This plugin supports point sets
+  const Scene_points_with_normal_item* point_set_item =
+    qobject_cast<const Scene_points_with_normal_item*>(item);
+  if(!point_set_item)
+    return false;
+
+  // Save point set as .xyz
+  std::ofstream out(fileinfo.filePath().toUtf8().data());
+  out.precision (std::numeric_limits<double>::digits10 + 2);
+  return point_set_item->write_xyz_point_set(out);
+}
+
+
+void Polyhedron_demo_xyz_plugin::on_actionAdd_point_set_triggered()
+{
+  add_pointsetdiag = new QDialog(mw);
+  add_pointsetdiagui = new Ui::Add_point_set_dialog();
+  add_pointsetdiagui->setupUi(add_pointsetdiag);
+  connect(add_pointsetdiagui->add_point_setButton, SIGNAL(clicked()), this, SLOT(addPointSetButton_clicked()));
+  connect(add_pointsetdiagui->close_point_setButton, SIGNAL(clicked()), this, SLOT(closePointSetButton_clicked()));
+  add_pointsetdiag->exec();
+}
+
+void Polyhedron_demo_xyz_plugin::addPointSetButton_clicked()
+{
+    static int nb_of_point_set =0;
+  QString text = add_pointsetdiagui->textEdit->toPlainText();
+  Scene_points_with_normal_item* item = new Scene_points_with_normal_item();
+  QStringList list = text.split(QRegExp("\\s+"), QString::SkipEmptyParts);
+  int counter = 0;
+  double coord[3];
+  bool ok = true;
+  if (list.isEmpty()) return;
+  if (list.size()%3!=0){
+    QMessageBox *msgBox = new QMessageBox;
+    msgBox->setWindowTitle("Error");
+    msgBox->setText("ERROR : Input should consists of triplets.");
+    msgBox->exec();
+    return;
+  }
+  Q_FOREACH(QString s, list)
+  {
+      if(!s.isEmpty())
+      {
+          double res = s.toDouble(&ok);
+          if(!ok)
+          {
+              QMessageBox *msgBox = new QMessageBox;
+              msgBox->setWindowTitle("Error");
+              msgBox->setText("ERROR : Coordinates are invalid.");
+              msgBox->exec();
+              break;
+          }
+          else
+          {
+            coord[counter] = res;
+            counter++;
+          }
+      }
+      if(counter == 3)
+      {
+          const Kernel::Point_3 p(coord[0], coord[1], coord[2]);
+          Kernel::Vector_3 n(0,0,0);
+          UI_point point(p,n);
+          item->point_set()->push_back(point);
+
+
+          counter =0;
+      }
+  }
+    if(ok)
+    {
+        add_pointsetdiagui->textEdit->clear();
+        item->point_set()->unselect_all();
+        nb_of_point_set++;
+        QString name = QString("Point_set #%1").arg(QString::number(nb_of_point_set));
+        item->setName(name);
+        item->setColor(Qt::black);
+        item->invalidateOpenGLBuffers();
+        scene->addItem(item);
+    }
+}
+
+void Polyhedron_demo_xyz_plugin::closePointSetButton_clicked()
+{
+    add_pointsetdiag->close();
+}
+
+#include "XYZ_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt
new file mode 100644
index 0000000..9707d09
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt
@@ -0,0 +1,8 @@
+include( polyhedron_demo_macros )
+#if the plugin has a UI file
+qt5_wrap_ui( mesh_2UI_FILES mesh_2_dialog.ui)
+polyhedron_demo_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES})
+#if the plugin uses external libraries like scene_items
+target_link_libraries(mesh_2_plugin scene_polyhedron_item
+                                    scene_polylines_item
+                                    scene_points_with_normal_item)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp
new file mode 100644
index 0000000..9aa275f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp
@@ -0,0 +1,437 @@
+
+// Needed for lloyd_optimize_mesh_2 which does it too late
+// (and we don't want to spend the time on finding out who
+// includes the header file that sets it too a value too low
+#define  BOOST_PARAMETER_MAX_ARITY 8
+
+#include <stdexcept>
+
+#define CGAL_CT2_WANTS_TO_HAVE_EXTRA_ACTION_FOR_INTERSECTING_CONSTRAINTS
+#define CGAL_CDT2_EXTRA_ACTION_FOR_INTERSECTING_CONSTRAINTS \
+  throw std::runtime_error("This plugin does not deal with intersecting edges");
+
+#include <QtCore/qglobal.h>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene_points_with_normal_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/iterator.h>
+
+#include <CGAL/Projection_traits_xy_3.h>
+#include <CGAL/Projection_traits_yz_3.h>
+#include <CGAL/Projection_traits_xz_3.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Delaunay_mesh_vertex_base_2.h>
+#include <CGAL/Delaunay_mesh_face_base_2.h>
+#include <CGAL/Delaunay_mesher_2.h>
+#include <CGAL/Delaunay_mesh_size_criteria_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/lloyd_optimize_mesh_2.h>
+
+#include <CGAL/boost/graph/Euler_operations.h>
+
+#include <QTime>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QString>
+#include <QDialog>
+#include <QMessageBox>
+#include <QtPlugin>
+
+#include <vector>
+#include <algorithm>
+#include <queue>
+#include <sstream>
+
+#include "ui_mesh_2_dialog.h"
+
+struct FaceInfo2
+{
+  FaceInfo2(){}
+  int nesting_level;
+  bool in_domain(){
+    return nesting_level%2 == 1;
+  }
+};
+
+template <class CDT>
+void
+mark_domains(CDT& ct,
+             typename CDT::Face_handle start,
+             int index,
+             std::list<typename CDT::Edge>& border )
+{
+  if(start->info().nesting_level != -1){
+    return;
+  }
+  std::list<typename CDT::Face_handle> queue;
+  queue.push_back(start);
+  while(! queue.empty()){
+    typename CDT::Face_handle fh = queue.front();
+    queue.pop_front();
+    if(fh->info().nesting_level == -1){
+      fh->info().nesting_level = index;
+      for(int i = 0; i < 3; i++){
+        typename CDT::Edge e(fh,i);
+        typename CDT::Face_handle n = fh->neighbor(i);
+        if(n->info().nesting_level == -1){
+          if(ct.is_constrained(e)) border.push_back(e);
+          else queue.push_back(n);
+        }
+      }
+    }
+  }
+}
+
+template <class CDT>
+void
+mark_nested_domains(CDT& cdt)
+{
+  for(typename CDT::All_faces_iterator it = cdt.all_faces_begin(); it != cdt.all_faces_end(); ++it){
+    it->info().nesting_level = -1;
+  }
+  std::list<typename CDT::Edge> border;
+  mark_domains(cdt, cdt.infinite_face(), 0, border);
+  while(! border.empty()){
+    typename CDT::Edge e = border.front();
+    border.pop_front();
+    typename CDT::Face_handle n = e.first->neighbor(e.second);
+    if(n->info().nesting_level == -1){
+      mark_domains(cdt, n, e.first->info().nesting_level+1, border);
+    }
+  }
+}
+
+template <class CDT, class TriangleMesh>
+void cdt2_to_face_graph(const CDT& cdt, TriangleMesh& tm)
+{
+  typedef typename boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
+
+  typedef std::map<typename CDT::Vertex_handle, vertex_descriptor> Map;
+  Map descriptors;
+  for (typename CDT::Finite_faces_iterator fit=cdt.finite_faces_begin(),
+                                           fit_end=cdt.finite_faces_end();
+                                           fit!=fit_end; ++fit)
+  {
+    if (!fit->is_in_domain()) continue;
+    CGAL::cpp11::array<vertex_descriptor,3> vds;
+    for(int i=0; i<3; ++i)
+    {
+      typename Map::iterator it;
+      bool insert_ok;
+      boost::tie(it,insert_ok) =
+        descriptors.insert(std::make_pair(fit->vertex(i),vertex_descriptor()));
+      if (insert_ok)
+        it->second = add_vertex(fit->vertex(i)->point(),tm);
+      vds[i]=it->second;
+    }
+
+    CGAL::Euler::add_face(vds, tm);
+  }
+}
+
+class Polyhedron_demo_mesh_2_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow,
+            CGAL::Three::Scene_interface* scene_interface)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+
+    actionMesh_2_ = new QAction("Mesh_2", mw);
+    // actionMesh_2_->setProperty("subMenuName", "Polygon Mesh Processing");
+    if (actionMesh_2_) {
+      connect(actionMesh_2_, SIGNAL(triggered()),
+        this, SLOT(run()));
+    }
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionMesh_2_;
+  }
+
+  bool applicable(QAction*) const
+  {
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      //if one polyhedron is found in the selection, it's fine
+      if (qobject_cast<Scene_polylines_item*>(scene->item(index)))
+        return true;
+    }
+    return false;
+  }
+
+private:
+  Ui::mesh_2_dialog
+  create_dialog(QDialog* dialog, double diag_length, bool no_seeds)
+  {
+    Ui::mesh_2_dialog ui;
+    ui.setupUi(dialog);
+    connect(ui.buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
+    connect(ui.buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
+
+    //connect checkbox to spinbox
+    connect(ui.runLloyd_checkbox, SIGNAL(toggled(bool)),
+            ui.nbIterations_spinbox, SLOT(setEnabled(bool)));
+    connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+            ui.edgeLength_dspinbox, SLOT(setEnabled(bool)));
+
+    //Set default parameter edge length
+    ui.edgeLength_dspinbox->setDecimals(3);
+    ui.edgeLength_dspinbox->setSingleStep(0.001);
+    ui.edgeLength_dspinbox->setRange(1e-6 * diag_length, //min
+                                     2.   * diag_length);//max
+    ui.edgeLength_dspinbox->setValue(0.05 * diag_length);
+    ui.edgeLength_dspinbox->setToolTip(
+      "Diagonal length of the Bbox of the selection to mesh is "+
+      QString::number(diag_length)+" - default is 5% of it");
+
+    //Set default for nb iterations
+    ui.nbIterations_spinbox->setSingleStep(1);
+    ui.nbIterations_spinbox->setRange(1/*min*/, 1000/*max*/);
+    ui.nbIterations_spinbox->setValue(1);
+
+    // Run Mesh_2 by default, not Lloyd
+    ui.runLloyd_checkbox->setChecked(false);
+    ui.runMesh2_checkbox->setChecked(true);
+
+    // Domain definition and disabling all options if no Mesh_2 run
+    if (no_seeds){
+      ui.radioSeedsIn->setDisabled(true);
+      ui.radioSeedsOut->setDisabled(true);
+      ui.radioNesting->setChecked(true);
+    }
+    else{
+      ui.radioSeedsOut->setChecked(true);
+      connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+              ui.radioSeedsOut, SLOT(setEnabled(bool)));
+      connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+              ui.radioSeedsIn, SLOT(setEnabled(bool)));
+    }
+    connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+            ui.radioNesting, SLOT(setEnabled(bool)));
+    connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+            ui.radioAll, SLOT(setEnabled(bool)));
+    connect(ui.runMesh2_checkbox, SIGNAL(toggled(bool)),
+            ui.runLloyd_checkbox, SLOT(setEnabled(bool)));
+    return ui;
+  }
+
+  template <class ProjectionTraits>
+  void mesh(const std::vector<Scene_polylines_item*>& polylines_items,
+            const std::vector<Scene_points_with_normal_item*>& points_items,
+            double diagonal_length)
+  {
+    // extract seeds
+    std::vector<Kernel::Point_3> seeds;
+    Q_FOREACH(Scene_points_with_normal_item* points_item, points_items)
+      Q_FOREACH(UI_point_3<Kernel> pt, *points_item->point_set())
+        seeds.push_back(pt);
+
+    // Create dialog box
+    QDialog dialog(mw);
+    Ui::mesh_2_dialog ui =
+      create_dialog(&dialog, diagonal_length, seeds.empty());
+
+    // Get values
+    int i = dialog.exec();
+    if (i == QDialog::Rejected)
+    {
+      std::cout << "2D Meshing aborted" << std::endl;
+      return;
+    }
+    bool runMesh2 = ui.runMesh2_checkbox->isChecked();
+    double target_length = ui.edgeLength_dspinbox->value();
+    unsigned int nb_iter = ui.nbIterations_spinbox->value();
+    bool runLloyd = ui.runLloyd_checkbox->isChecked();
+
+
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    typedef ProjectionTraits                                             Gt;
+    typedef CGAL::Delaunay_mesh_vertex_base_2<Gt>                        Vb;
+    typedef CGAL::Delaunay_mesh_face_base_2<Gt>                          Fm;
+    typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo2,Gt,Fm>   Fb;
+    typedef CGAL::Triangulation_data_structure_2<Vb, Fb>                TDS;
+    typedef CGAL::No_intersection_tag                                   Tag;
+    typedef CGAL::Constrained_Delaunay_triangulation_2<Gt, TDS, Tag>    CDT;
+    typedef CGAL::Delaunay_mesh_size_criteria_2<CDT>               Criteria;
+
+    QTime time; // global timer
+    time.start();
+
+    std::cout << " Building Constrained_Delaunay_triangulation_2..."
+              << std::flush;
+    CDT cdt;
+
+    QTime ltime; //local timer
+    ltime.start();
+    try{
+      Q_FOREACH(Scene_polylines_item* polylines_item, polylines_items)
+        Q_FOREACH(const std::vector<Kernel::Point_3>& points,
+                    polylines_item->polylines)
+          cdt.insert_constraint(points.begin(),points.end());
+    }catch(std::runtime_error)
+    {
+      QApplication::restoreOverrideCursor();
+      throw;
+    }
+    std::cout << " done (" << ltime.elapsed() << " ms)" << std::endl;
+
+    if (cdt.dimension()!=2){
+      QApplication::restoreOverrideCursor();
+      std::cout << "Triangulation is not of dimension 2" << std::endl;
+      return;
+    }
+
+    if (runMesh2){
+      ltime.restart();
+      std::cout << " Running refine_Delaunay_mesh_2 ..." << std::flush;
+      Criteria criteria(0.125, target_length);
+      bool use_seeds=ui.radioSeedsOut->isChecked() ||
+                     ui.radioSeedsIn->isChecked();
+      if (!use_seeds){
+        bool use_nesting = ui.radioNesting->isChecked();
+        if (use_nesting){
+          mark_nested_domains(cdt);
+          for(typename CDT::All_faces_iterator fit=cdt.all_faces_begin(),
+                                               fit_end=cdt.all_faces_end();
+                                               fit!=fit_end;++fit)
+          {
+            fit->set_in_domain(fit->info().in_domain());
+          }
+        }
+        CGAL::refine_Delaunay_mesh_2(cdt, criteria, use_nesting);
+      }
+      else
+        CGAL::refine_Delaunay_mesh_2(cdt,
+                                     seeds.begin(), seeds.end(),
+                                     criteria, ui.radioSeedsIn->isChecked());
+      std::cout << " done (" << ltime.elapsed() << " ms)" << std::endl;
+    }
+
+    if (runLloyd){
+      ltime.restart();
+      std::cout << " Running lloyd_optimize_mesh_2..." << std::flush;
+      CGAL::lloyd_optimize_mesh_2(cdt,
+        CGAL::parameters::max_iteration_number = nb_iter);
+      std::cout << " done (" << ltime.elapsed() << " ms)" << std::endl;
+    }
+
+    // export result as a polyhedron item
+    QString iname =
+      polylines_items.size()==1?
+      polylines_items.front()->name()+QString("_meshed_"):
+      QString("2dmesh_");
+    iname+=QString::number(target_length);
+    if (runLloyd) iname+=QString("_Lloyd_")+QString::number(nb_iter);
+    Scene_polyhedron_item* poly_item = new Scene_polyhedron_item();
+    poly_item->setName(iname);
+    cdt2_to_face_graph(cdt,*poly_item->polyhedron());
+    scene->addItem(poly_item);
+    poly_item->invalidateOpenGLBuffers();
+
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+    // default cursor
+    QApplication::restoreOverrideCursor();
+  }
+
+  int detect_constant_coordinate(
+    const std::vector<Scene_polylines_item*>& polylines_items,
+    const std::vector<Scene_points_with_normal_item*>& points_items)
+  {
+    int res=-1;
+    Kernel::Point_3 ref = polylines_items.front()->polylines.front().front();
+    Q_FOREACH(Scene_polylines_item* polylines_item, polylines_items)
+      Q_FOREACH(const std::vector<Kernel::Point_3>& points,
+                  polylines_item->polylines)
+        Q_FOREACH(const Kernel::Point_3& pt, points)
+        {
+          int nbe=0, candidate=-1;
+          for (int i=0; i<3; ++i)
+            if (ref[i]==pt[i]){
+              ++nbe;
+              candidate=i;
+            }
+          if (nbe==0) return -1;
+          if (nbe==1){
+            if (res==-1)
+              res=candidate;
+            else
+              if(res!=candidate) return -1;
+          }
+        }
+    if (res==-1) return res;
+    Q_FOREACH(Scene_points_with_normal_item* points_item, points_items)
+      Q_FOREACH(UI_point_3<Kernel> pt, *points_item->point_set())
+        if (pt[res]!=ref[res])
+          return -1;
+    return res;
+  }
+
+public Q_SLOTS:
+
+  void run()
+  {
+    //collect input polylines
+    std::vector<Scene_polylines_item*> polylines_items;
+    std::vector<Scene_points_with_normal_item*> points_items;
+    double inf = std::numeric_limits<double>::infinity();
+    CGAL::Three::Scene_interface::Bbox bbox(inf,inf,inf,-inf,-inf,-inf);
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      Scene_polylines_item* polylines_item =
+        qobject_cast<Scene_polylines_item*>(scene->item(index));
+      if (polylines_item){
+        polylines_items.push_back(polylines_item);
+        bbox=bbox+polylines_item->bbox();
+      }
+      else{
+        Scene_points_with_normal_item* points_item =
+          qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+        if (points_item)
+          points_items.push_back(points_item);
+      }
+    }
+
+    double diag = bbox.diagonal_length();
+    switch( detect_constant_coordinate(polylines_items, points_items) )
+    {
+      using namespace CGAL;
+      typedef Kernel K;
+      case 0:
+        mesh<Projection_traits_yz_3<K> >(polylines_items, points_items, diag);
+      break;
+      case 1:
+        mesh<Projection_traits_xz_3<K> >(polylines_items, points_items, diag);
+      break;
+      case 2:
+        mesh<Projection_traits_xy_3<K> >(polylines_items, points_items, diag);
+      break;
+      default:
+        QMessageBox::critical(mw,
+                              "Invalid Input Data",
+                              "Polylines and seed points must all be in "
+                              "the same xy, yz or xz plane");
+    }
+  }
+
+private:
+  QAction* actionMesh_2_;
+
+}; // end Mesh_2_plugin
+
+#include "Mesh_2_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui
new file mode 100644
index 0000000..a9fc72a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>mesh_2_dialog</class>
+ <widget class="QDialog" name="mesh_2_dialog">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>408</width>
+    <height>357</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>2D Mesh Criteria</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Mesh_2</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="runMesh2_label">
+          <property name="text">
+           <string>Run Mesh Refinement</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="runMesh2_checkbox">
+          <property name="text">
+           <string/>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <widget class="QLabel" name="edgeLength_label">
+          <property name="text">
+           <string>Maximum edge length</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy">
+           <cstring>edgeLength_dspinbox</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QDoubleSpinBox" name="edgeLength_dspinbox">
+          <property name="minimumSize">
+           <size>
+            <width>110</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximum">
+           <double>1000.000000000000000</double>
+          </property>
+          <property name="singleStep">
+           <double>0.100000000000000</double>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_5">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>Domain Definition:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_2">
+          <item>
+           <widget class="QRadioButton" name="radioAll">
+            <property name="text">
+             <string>Whole Domain</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="radioNesting">
+            <property name="text">
+             <string>Use Nesting Number</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="radioSeedsIn">
+            <property name="text">
+             <string>With Seeds Inside the Domain</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="radioSeedsOut">
+            <property name="text">
+             <string>With Seeds Outside the Domain</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QLabel" name="runLloyd_label">
+          <property name="text">
+           <string>Run Lloyd Optimisation</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="runLloyd_checkbox">
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QLabel" name="nbIterations_label">
+          <property name="text">
+           <string>Number of iterations</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy">
+           <cstring>nbIterations_spinbox</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="nbIterations_spinbox">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>110</width>
+            <height>0</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>edgeLength_dspinbox</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>mesh_2_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>388</x>
+     <y>288</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>mesh_2_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>388</x>
+     <y>288</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp
new file mode 100644
index 0000000..a4a8696
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp
@@ -0,0 +1,424 @@
+#include <CGAL/Mesh_3/io_signature.h>
+#include "Scene_c3t3_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <CGAL/IO/File_avizo.h>
+#include <iostream>
+#include <fstream>
+
+
+class Polyhedron_demo_c3t3_binary_io_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_io_plugin_interface
+{
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  QString name() const { return "C3t3_io_plugin"; }
+  QString nameFilters() const { return "binary files (*.cgal);;ascii (*.mesh);;maya (*.ma)"; }
+  QString saveNameFilters() const { return "binary files (*.cgal);;ascii (*.mesh);;maya (*.ma);;avizo (*.am)"; }
+  QString loadNameFilters() const { return "binary files (*.cgal)" ; }
+
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo fileinfo);
+
+private:
+  bool try_load_other_binary_format(std::istream& in, C3t3& c3t3);
+  bool try_load_a_cdt_3(std::istream& in, C3t3& c3t3);
+};
+
+
+bool Polyhedron_demo_c3t3_binary_io_plugin::canLoad() const {
+  return true;
+}
+
+
+CGAL::Three::Scene_item*
+Polyhedron_demo_c3t3_binary_io_plugin::load(QFileInfo fileinfo) {
+
+
+    if(fileinfo.suffix().toLower() == "cgal")
+    {
+        // Open file
+        std::ifstream in(fileinfo.filePath().toUtf8(),
+                         std::ios_base::in|std::ios_base::binary);
+        if(!in) {
+          std::cerr << "Error! Cannot open file "
+                    << (const char*)fileinfo.filePath().toUtf8() << std::endl;
+          return NULL;
+        }
+
+        Scene_c3t3_item* item = new Scene_c3t3_item();
+        item->setName(fileinfo.baseName());
+
+
+        if(item->load_binary(in)) {
+          item->c3t3_changed();
+          item->changed();
+          return item;
+        }
+
+        item->c3t3().clear();
+        in.seekg(0);
+        if(try_load_other_binary_format(in, item->c3t3())) {
+          item->c3t3_changed();
+          item->changed();
+          return item;
+        }
+
+        item->c3t3().clear();
+        in.seekg(0);
+        if(try_load_a_cdt_3(in, item->c3t3())) {
+          item->c3t3_changed();
+          item->changed();
+          return item;
+        }
+    }
+
+
+
+  // if all loading failed...
+  return NULL;
+}
+
+bool Polyhedron_demo_c3t3_binary_io_plugin::canSave(const CGAL::Three::Scene_item* item)
+{
+  // This plugin supports c3t3 items.
+  return qobject_cast<const Scene_c3t3_item*>(item);
+}
+
+bool
+Polyhedron_demo_c3t3_binary_io_plugin::
+save(const CGAL::Three::Scene_item* item, QFileInfo fileinfo)
+{
+    const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
+    if ( NULL == c3t3_item )
+    {
+      return false;
+    }
+
+    QString path = fileinfo.absoluteFilePath();
+
+    if(path.endsWith(".cgal"))
+    {
+    std::ofstream out(fileinfo.filePath().toUtf8(),
+                     std::ios_base::out|std::ios_base::binary);
+
+    return out && c3t3_item->save_binary(out);
+    }
+
+   else  if (fileinfo.suffix() == "mesh")
+    {
+      std::ofstream medit_file (qPrintable(path));
+      c3t3_item->c3t3().output_to_medit(medit_file,true,true);
+          return true;
+    }
+    else if (fileinfo.suffix() == "ma")
+    {
+      std::ofstream maya_file (qPrintable(path));
+      c3t3_item->c3t3().output_to_maya(
+        maya_file,true);
+          return true;
+    }
+    else if (fileinfo.suffix() == "am")
+    {
+      std::ofstream avizo_file (qPrintable(path));
+      CGAL::output_to_avizo(avizo_file, c3t3_item->c3t3());
+      return true;
+    }
+    else
+        return false;
+}
+
+struct Fake_mesh_domain {
+  typedef CGAL::Tag_true Has_features;
+  typedef int Subdomain_index;
+  typedef int Surface_patch_index;
+  typedef int Curve_segment_index;
+  typedef int Corner_index;
+  typedef boost::variant<Subdomain_index,Surface_patch_index> Index;
+};
+
+typedef Geom_traits Fake_gt;
+typedef CGAL::Mesh_vertex_base_3<Fake_gt, Fake_mesh_domain> Fake_vertex_base;
+typedef CGAL::Compact_mesh_cell_base_3<Fake_gt, Fake_mesh_domain> Fake_cell_base;
+typedef CGAL::Triangulation_data_structure_3<Fake_vertex_base,Fake_cell_base> Fake_tds;
+typedef CGAL::Regular_triangulation_3<Fake_gt, Fake_tds> Fake_tr;
+typedef CGAL::Mesh_complex_3_in_triangulation_3<
+  Fake_tr,
+  Fake_mesh_domain::Corner_index,
+  Fake_mesh_domain::Curve_segment_index> Fake_c3t3;
+
+template <class Vb = CGAL::Triangulation_vertex_base_3<Kernel> >
+struct Fake_CDT_3_vertex_base : public Vb
+{
+  typedef Vb Base;
+  bool steiner;
+  std::size_t ref_1, ref_2;
+
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Base::template Rebind_TDS<TDS2>::Other   Vb2;
+    typedef Fake_CDT_3_vertex_base<Vb2>  Other;
+  };
+};
+
+template <class Vb>
+std::istream&
+operator>>( std::istream& is, Fake_CDT_3_vertex_base<Vb>& v)
+{
+  is >> static_cast<typename Fake_CDT_3_vertex_base<Vb>::Base&>(v);
+  char s;
+  if( CGAL::is_ascii(is) ) {
+    is >> s;
+    if( s == 'S' ) {
+      v.steiner = true;
+      is >> v.ref_1 >> v.ref_2;
+    }
+    else {
+      CGAL_assertion(s == '.' || s == 'F');
+      v.steiner = false;
+    }
+  } else {
+    CGAL::read( is, s );
+    if(is.bad()) return is;
+    if( s == 'S' ) {
+      v.steiner = true;
+      CGAL::read( is, v.ref_1 );
+      CGAL::read( is, v.ref_2 );
+    }
+    else {
+      // if(s != '.') {
+      // 	std::cerr << "v.point()=" << v.point() << std::endl;
+      // 	std::cerr << "s=" << s << " (" << (int)s
+      // 		  << "), just before position "
+      // 		  << is.tellg() << " !\n";
+      // }
+      CGAL_assertion(s == '.' || s== 'F');
+      v.steiner = false;
+    }
+  }
+  return is;
+}
+
+template <class Cb = CGAL::Triangulation_cell_base_3<Kernel> >
+struct Fake_CDT_3_cell_base : public Cb
+{
+  typedef Cb Base;
+  int constrained_facet[4];
+  bool _restoring[6];
+  int to_edge_index( int li, int lj ) const {
+    CGAL_triangulation_precondition( li >= 0 && li < 4 );
+    CGAL_triangulation_precondition( lj >= 0 && lj < 4 );
+    CGAL_triangulation_precondition( li != lj );
+    return ( li==0 || lj==0 ) ? li+lj-1 : li+lj;
+  }
+
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Base::template Rebind_TDS<TDS2>::Other   Cb2;
+    typedef Fake_CDT_3_cell_base<Cb2>  Other;
+  };
+};
+
+template <typename Cb>
+std::istream&
+operator>>( std::istream& is, Fake_CDT_3_cell_base<Cb>& c) {
+  char s;
+  for( int li = 0; li < 4; ++li ) {
+    if( CGAL::is_ascii(is) )
+      is >> c.constrained_facet[li];
+    else
+      CGAL::read( is, c.constrained_facet[li] );
+  }
+
+  if( CGAL::is_ascii(is) ) {
+    is >> s;
+    CGAL_assertion(s == '-');
+  }
+  is >> static_cast<typename Fake_CDT_3_cell_base<Cb>::Base&>(c);
+  for( int li = 0; li < 3; ++li ) {
+    for( int lj = li+1; lj < 4; ++lj ) {
+      char s;
+      is >> s;
+      if(s == 'C') {
+        c._restoring[c.to_edge_index(li, lj)] = true;
+      } else {
+        if(s != '.') {
+          std::cerr << "cDT cell:";
+          for( int li = 0; li < 4; ++li ) {
+            std::cerr << " " << c.constrained_facet[li];
+          }
+          std::cerr << "\n";
+          std::cerr << "s=" << s << " (" << (int)s
+                    << "), just before position "
+                    << is.tellg() << " !\n";	}
+        CGAL_assertion(s == '.');
+        c._restoring[c.to_edge_index(li, lj)] = false;
+      }
+    }
+  }
+  return is;
+}
+
+typedef CGAL::Triangulation_data_structure_3<Fake_CDT_3_vertex_base<>, Fake_CDT_3_cell_base<> > Fake_CDT_3_TDS;
+typedef CGAL::Triangulation_3<Kernel, Fake_CDT_3_TDS> Fake_CDT_3;
+
+namespace CGAL {
+template <>
+class Output_rep<Patch_id> {
+  typedef Patch_id T;
+  const T& t;
+public:
+  //! initialize with a const reference to \a t.
+  Output_rep( const T& tt) : t(tt) {}
+  //! perform the output, calls \c operator\<\< by default.
+  std::ostream& operator()( std::ostream& out) const {
+    if(is_ascii(out)) {
+      out << t;
+    } else {
+      CGAL::write(out, t);
+    }
+    return out;
+  }
+};
+
+template <>
+class Input_rep<Patch_id> {
+  typedef Patch_id T;
+  T& t;
+public:
+  //! initialize with a const reference to \a t.
+  Input_rep( T& tt) : t(tt) {}
+  //! perform the output, calls \c operator\<\< by default.
+  std::istream& operator()( std::istream& in) const {
+    if(is_ascii(in)) {
+      in >> t;
+    } else {
+      CGAL::read(in, t);
+    }
+    return in;
+  }
+};
+} // end namespace CGAL
+
+struct Update_vertex {
+  typedef Fake_mesh_domain::Surface_patch_index Sp_index;
+  template <typename V1, typename V2>
+  bool operator()(const V1& v1, V2& v2) {
+    v2.set_point(v1.point());
+    v2.set_dimension(v1.in_dimension());
+    v2.set_special(v1.is_special());
+    switch(v1.in_dimension()) {
+    case 0:
+    case 1:
+    case 3:
+      v2.set_index(boost::get<int>(v1.index()));
+      break;
+    default: // case 2
+      const typename V1::Index& index = v1.index();
+      const Sp_index sp_index = boost::get<Sp_index>(index);
+      v2.set_index(sp_index);
+    }
+    return true;
+  }
+}; // end struct Update_vertex
+
+struct Update_cell {
+  typedef Fake_mesh_domain::Surface_patch_index Sp_index;
+  template <typename C1, typename C2>
+  bool operator()(const C1& c1, C2& c2) {
+    c2.set_subdomain_index(c1.subdomain_index());
+    for(int i = 0; i < 4; ++i) {
+      const Sp_index sp_index = c1.surface_patch_index(i);
+      c2.set_surface_patch_index(i, sp_index);
+    }
+    return true;
+  }
+}; // end struct Update_cell
+
+#include <CGAL/Triangulation_file_input.h>
+
+struct Update_vertex_from_CDT_3 {
+  template <typename V1, typename V2>
+  bool operator()(const V1& v1, V2& v2) {
+    v2.set_point(v1.point());
+    v2.set_dimension(2);
+    v2.set_special(false);
+    return true;
+  }
+}; // end struct Update_vertex
+
+struct Update_cell_from_CDT_3 {
+  typedef Fake_mesh_domain::Surface_patch_index Sp_index;
+  template <typename C1, typename C2>
+  bool operator()(const C1& c1, C2& c2) {
+    c2.set_subdomain_index(1);
+    for(int i = 0; i < 4; ++i) {
+      c2.set_surface_patch_index(i, c1.constrained_facet[i]);
+    }
+    return true;
+  }
+}; // end struct Update_cell
+
+bool
+Polyhedron_demo_c3t3_binary_io_plugin::
+try_load_a_cdt_3(std::istream& is, C3t3& c3t3)
+{
+  std::cerr << "Try load a CDT_3...";
+  CGAL::set_binary_mode(is);
+  if(CGAL::file_input<
+     Fake_CDT_3,
+     C3t3::Triangulation,
+     Update_vertex_from_CDT_3,
+     Update_cell_from_CDT_3>(is, c3t3.triangulation()))
+  {
+    std::cerr << "Try load a CDT_3... DONE";
+    return true;
+  }
+  else {
+    return false;
+  }
+}
+//Generates a compilation error.
+bool
+Polyhedron_demo_c3t3_binary_io_plugin::
+try_load_other_binary_format(std::istream& is, C3t3& c3t3)
+{
+  CGAL::set_ascii_mode(is);
+  std::string s;
+  is >> s;
+  if (s != "binary" ||
+      !(is >> s) ||
+      s != "CGAL" ||
+      !(is >> s) ||
+      s != "c3t3")
+  {
+    return false;
+  }
+  std::getline(is, s);
+  if(s != "") {
+    if(s != std::string(" ") + CGAL::Get_io_signature<Fake_c3t3>()()) {
+      std::cerr << "Polyhedron_demo_c3t3_binary_io_plugin::try_load_other_binary_format:"
+                << "\n  expected format: " << CGAL::Get_io_signature<Fake_c3t3>()()
+                << "\n       got format:" << s << std::endl;
+      return false;
+    }
+  }
+  CGAL::set_binary_mode(is);
+  std::istream& f_is = CGAL::file_input<
+    Fake_c3t3::Triangulation,
+    C3t3::Triangulation,
+    Update_vertex,
+    Update_cell>(is, c3t3.triangulation());
+
+  return f_is.good();
+}
+
+#include <QtPlugin>
+#include "C3t3_io_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt
new file mode 100644
index 0000000..9c393a4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt
@@ -0,0 +1,32 @@
+include( polyhedron_demo_macros )
+
+if ( Boost_VERSION GREATER 103400 )
+  remove_definitions(-DQT_STATICPLUGIN)
+
+    qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_thread.h )
+    qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h )
+    qt5_wrap_ui( meshingUI_FILES  Meshing_dialog.ui Smoother_dialog.ui Local_optimizers_dialog.ui )
+    qt5_generate_moc( "Polyhedron_demo_mesh_3_plugin_cgal_code.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Scene_c3t3_item.moc" )
+    polyhedron_demo_plugin(mesh_3_plugin Mesh_3_plugin 
+      Mesh_3_plugin_cgal_code.cpp Meshing_thread.cpp 
+      ${meshingUI_FILES})
+    target_link_libraries(mesh_3_plugin scene_polyhedron_item scene_polygon_soup_item scene_polylines_item scene_implicit_function_item scene_segmented_image_item
+	scene_c3t3_item ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+    polyhedron_demo_plugin(mesh_3_volume_planes_plugin Volume_planes_plugin ${VOLUME_MOC_OUTFILES} Volume_plane_intersection.cpp)
+    target_link_libraries(mesh_3_volume_planes_plugin scene_segmented_image_item)
+    polyhedron_demo_plugin(mesh_3_optimization_plugin Optimization_plugin
+      Optimization_plugin_cgal_code.cpp Optimizer_thread.cpp
+      ${meshingUI_FILES})
+    target_link_libraries(mesh_3_optimization_plugin scene_c3t3_item scene_polyhedron_item scene_segmented_image_item scene_implicit_function_item )
+
+  qt5_wrap_ui( imgUI_FILES Image_res_dialog.ui raw_image.ui)
+  polyhedron_demo_plugin(io_image_plugin Io_image_plugin Raw_image_dialog.cpp ${imgUI_FILES})
+  target_link_libraries(io_image_plugin scene_segmented_image_item)
+  polyhedron_demo_plugin(c3t3_io_plugin C3t3_io_plugin)
+  target_link_libraries(c3t3_io_plugin  scene_c3t3_item)
+  else( Boost_VERSION GREATER 103400 )
+    message(STATUS "warning: the plugin mesh_3_plugin requires Boost>=1.34.1 and will not be compiled.")
+  endif( Boost_VERSION GREATER 103400 )
+
+  polyhedron_demo_plugin(detect_sharp_edges_plugin Detect_sharp_edges_plugin)
+  target_link_libraries(detect_sharp_edges_plugin scene_polyhedron_item)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp
new file mode 100644
index 0000000..51d1ee2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp
@@ -0,0 +1,124 @@
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+#include <QStringList>
+#include <QInputDialog>
+#include <QtPlugin>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Polyhedron_demo_detect_sharp_edges.h"
+
+using namespace CGAL::Three;
+class Polyhedron_demo_detect_sharp_edges_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionSharEdges = new QAction("Detect Sharp Features", mw);
+    actionSharEdges->setObjectName("detectSharpFeaturesAction");
+    if(actionSharEdges) {
+      connect(actionSharEdges, SIGNAL(triggered()),
+              this, SLOT(detectSharpEdgesWithInputDialog()));
+    }
+  }
+
+  bool applicable(QAction*) const {
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      Scene_polyhedron_item* item =
+        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+      if (item) return true;
+    }
+    return false;
+  }
+  
+  // used by Polyhedron_demo_plugin_helper
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionSharEdges;
+  }
+
+public Q_SLOTS:
+void detectSharpEdges(bool input_dialog = false, double angle = 60);
+  void detectSharpEdgesWithInputDialog();
+
+protected:
+  Kernel::Vector_3 facet_normal(Polyhedron::Facet_handle f);
+  bool is_sharp(Polyhedron::Halfedge_handle he);
+
+private:
+  QAction* actionSharEdges;
+}; // end Polyhedron_demo_detect_sharp_edges_plugin
+
+void Polyhedron_demo_detect_sharp_edges_plugin::detectSharpEdgesWithInputDialog()
+{
+  detectSharpEdges(true);
+}
+
+void Polyhedron_demo_detect_sharp_edges_plugin::detectSharpEdges(bool input_dialog,
+                                                                 double angle)
+{
+  typedef std::pair<int,Polyhedron*> Poly_tuple;
+  
+  // Get selected items
+  QList<Poly_tuple> polyhedrons;
+  Q_FOREACH(int index, scene->selectionIndices())
+  {
+    Scene_polyhedron_item* item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(!item)
+      return;
+    
+    Polyhedron* pMesh = item->polyhedron();
+    if(!pMesh)
+      return;
+    item->show_feature_edges(true);
+    polyhedrons << make_pair(index, pMesh);
+  }
+
+  if(input_dialog) {
+    bool ok = true;
+    angle = QInputDialog::getDouble(NULL, 
+                                    tr("Sharp edges max angle"),
+                                    tr("Angle in degrees between 0 and 180:"),
+                                    angle, // value
+                                    0.,          // min 
+                                    180., // max
+                                    2,          // decimals
+                                    &ok);
+    if(!ok) return;
+  }
+  // Detect edges
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  Q_FOREACH(Poly_tuple tuple, polyhedrons)
+  {
+    Polyhedron* pMesh = tuple.second;
+    if (!pMesh) continue;
+
+    CGAL::detect_sharp_edges(pMesh, angle);
+
+    //update item
+    scene->item(tuple.first)->invalidateOpenGLBuffers();
+
+    // update scene
+    scene->itemChanged(tuple.first);
+  }
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+}
+
+#include "Detect_sharp_edges_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h
new file mode 100644
index 0000000..c50321c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h
@@ -0,0 +1,124 @@
+// Copyright (c) 2015 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+#ifndef CGAL_FACET_EXTRA_CRITERION_H
+#define CGAL_FACET_EXTRA_CRITERION_H
+
+#include <CGAL/Mesh_3/mesh_standard_criteria.h>
+
+
+template <typename Tr, typename Domain, typename Visitor_>
+class Facet_extra_criterion :
+  public CGAL::Mesh_3::Abstract_criterion<Tr, Visitor_>
+{
+private:
+  typedef typename Tr::Facet Facet;
+
+  typedef CGAL::Mesh_3::Abstract_criterion<Tr,Visitor_> Base;
+  typedef typename Base::Quality Quality;
+  typedef typename Base::Badness Badness;
+
+  typedef Facet_extra_criterion<Tr,Domain,Visitor_> Self;
+
+  const Domain& domain;
+
+public:
+  /// Constructor
+  Facet_extra_criterion(const Domain& domain) : domain(domain) {}
+  /// Destructor
+  ~Facet_extra_criterion() {}
+
+protected:
+  virtual void do_accept(Visitor_& v) const
+  {
+    v.visit(*this);
+  }
+
+  virtual Self* do_clone() const
+  {
+    // Call copy ctor on this
+    return new Self(*this);
+  }
+
+
+  virtual Badness do_is_bad (const Facet& f) const
+  {
+    typedef typename Tr::Vertex_handle  Vertex_handle;
+    typedef typename Tr::Cell_handle    Cell_handle;
+    typedef typename Domain::Surface_patch_index  Surface_patch_index;
+
+    const Cell_handle& ch = f.first;
+    const int& i = f.second;
+
+    const Vertex_handle& v1 = ch->vertex((i+1)&3);
+    const Vertex_handle& v2 = ch->vertex((i+2)&3);
+    const Vertex_handle& v3 = ch->vertex((i+3)&3);
+
+    Surface_patch_index index = Surface_patch_index();
+    bool is_index_initialized = false;
+
+    std::cerr << typeid(index).name() << std::endl;
+    if ( v1->in_dimension() == 2 )
+    {
+      index = domain.surface_patch_index(v1->index());
+      if(index != 0) {    //   (index.first != 0 && index.second != 0)
+        //index = Surface_patch_index(std::make_pair(1,1));
+      }
+      is_index_initialized = true;
+    }
+
+    if ( v2->in_dimension() == 2 )
+    {
+      Surface_patch_index index2 = domain.surface_patch_index(v2->index());
+      if(index2) { // (index2.first != 0 && index2.second != 0){
+        //index2 = Surface_patch_index(1,1);
+      }      
+      if ( is_index_initialized )
+      {
+        if ( !(index2 == index) )
+        {
+          return Badness(Quality(1));
+        }
+      }
+      else
+      {
+        index = index2;
+        is_index_initialized = true;
+      }
+    }
+
+    if ( v3->in_dimension() == 2 )
+    {
+      Surface_patch_index index3 = domain.surface_patch_index(v3->index());
+      if(index3 != 0) { // (index3.first != 0 && index3.second != 0)
+          // index3 = Surface_patch_index(1,1);
+      }
+      if ( is_index_initialized && !(index3 == index) )
+      {
+        return Badness(Quality(1));
+      }
+    }
+
+    return  Badness();
+  }
+
+}; // end class Facet_extra_criterion
+
+
+#endif // CGAL_FACET_EXTRA_CRITERION_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui
new file mode 100644
index 0000000..cd6a36d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui
@@ -0,0 +1,105 @@
+<ui version="4.0">
+ <class>ImagePrecisionDialog</class>
+ <widget class="QDialog" name="ImagePrecisionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>407</width>
+    <height>139</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Image Drawing Precision</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label">
+     <property name="lineWidth">
+      <number>1</number>
+     </property>
+     <property name="text">
+      <string>Please choose the image drawing precision</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QComboBox" name="precisionList">
+     <property name="editable">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="font">
+      <font>
+       <pointsize>11</pointsize>
+       <italic>true</italic>
+      </font>
+     </property>
+     <property name="text">
+      <string>1:x means that x voxels of the original image are represented by 1 cube in the drawn image</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>ImagePrecisionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>ImagePrecisionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp
new file mode 100644
index 0000000..225f887
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp
@@ -0,0 +1,136 @@
+#include "config.h"
+#include "Scene_segmented_image_item.h"
+#include "Image_type.h"
+#include "ui_Image_res_dialog.h"
+
+#include <QMessageBox>
+#include <QSettings>
+#include <QUrl>
+#include "Raw_image_dialog.h"
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+#include <fstream>
+class Io_image_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_io_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+public:
+  Io_image_plugin() {}
+
+  QString nameFilters() const;
+  bool canLoad() const;
+  CGAL::Three::Scene_item* load(QFileInfo fileinfo);
+
+  bool canSave(const CGAL::Three::Scene_item*);
+  bool save(const CGAL::Three::Scene_item*, QFileInfo) { return false; }
+  QString name() const { return "segmented images"; }
+};
+
+
+QString Io_image_plugin::nameFilters() const {
+  return QString("Inrimage files (*.inr *.inr.gz) ;; Analyze files (*.hdr *.img *img.gz)");
+}
+
+
+bool Io_image_plugin::canLoad() const {
+  return true;
+}
+
+CGAL::Three::Scene_item*
+Io_image_plugin::load(QFileInfo fileinfo) {
+  Image* image = new Image;
+  QApplication::restoreOverrideCursor();
+  if(!image->read(fileinfo.filePath().toUtf8()))
+    {
+      QMessageBox qmb(QMessageBox::NoIcon,
+                      "Raw Dialog",
+                      tr("Error with file <tt>%1</tt>:\n"
+                         "unknown file format!\n"
+                         "\n"
+                         "Open it as a raw image?").arg(fileinfo.fileName()),
+                      QMessageBox::Yes|QMessageBox::No);
+
+      bool success = true;
+      if(qmb.exec() == QMessageBox::Yes) {
+        Raw_image_dialog raw_dialog;
+        raw_dialog.label_file_size->setText(QString("%1 B").arg(fileinfo.size()));
+        if( raw_dialog.exec() ){
+          QApplication::setOverrideCursor(Qt::WaitCursor);
+
+          if(image->read_raw(fileinfo.filePath().toUtf8(),
+			     raw_dialog.dim_x->value(),
+			     raw_dialog.dim_y->value(),
+			     raw_dialog.dim_z->value(),
+			     raw_dialog.spacing_x->value(),
+			     raw_dialog.spacing_y->value(),
+			     raw_dialog.spacing_z->value(),
+                             raw_dialog.offset->value())){
+            QSettings settings;
+            settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath()));
+            settings.setValue("is_raw", true);
+            settings.setValue("dim_x", raw_dialog.dim_x->value());
+            settings.setValue("dim_y", raw_dialog.dim_y->value());
+            settings.setValue("dim_z", raw_dialog.dim_z->value());
+            settings.setValue("spacing_x", raw_dialog.spacing_x->value());
+            settings.setValue("spacing_y", raw_dialog.spacing_y->value());
+            settings.setValue("spacing_z", raw_dialog.spacing_z->value());
+            settings.setValue("offset", raw_dialog.offset->value());
+            settings.endGroup();
+          }else {
+            success = false;
+          }
+        }else {
+          success = false;
+        }
+      }else {
+        success = false;   
+      }
+      if(!success){
+        delete image;
+        return NULL;
+      }
+    }
+  // Get display precision
+  QDialog dialog;
+  Ui::ImagePrecisionDialog ui;
+  ui.setupUi(&dialog);
+  
+  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  
+  // Add precision values to the dialog
+  for ( int i=1 ; i<9 ; ++i )
+  {
+    QString s = tr("1:%1").arg(i*i*i);
+    ui.precisionList->addItem(s);
+  }
+  
+  // Open window
+  QApplication::restoreOverrideCursor();
+  int return_code = dialog.exec();
+  if(return_code != QDialog::Accepted)
+  {
+    delete image;
+    return NULL;
+  }
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  // Get selected precision
+  int voxel_scale = ui.precisionList->currentIndex() + 1;
+
+  Scene_segmented_image_item* image_item = 
+    new Scene_segmented_image_item(image,voxel_scale);
+  image_item->setName(fileinfo.baseName());
+
+  return image_item;
+}
+
+bool Io_image_plugin::canSave(const CGAL::Three::Scene_item*)
+{
+  return false;
+}
+
+#include "Io_image_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp
new file mode 100644
index 0000000..3dbbba5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp
@@ -0,0 +1,213 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+//#include <CGAL_demo/Plugin_interface.h>
+//#include <CGAL_demo/Plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Scene_implicit_function_item.h"
+#include "ui_Function_dialog.h"
+
+#include <iostream>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QPluginLoader>
+#include <QDir>
+#include <QApplication>
+#include <QMenu>
+#include <QList>
+#include <QLibrary>
+using namespace CGAL::Three;
+class Io_implicit_function_plugin :
+  public QObject, 
+  protected Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Io_implicit_function_plugin();
+  virtual ~Io_implicit_function_plugin() {}
+
+  bool applicable(QAction*) const { return true; }
+
+  QString name() const { return "implicit functions"; }
+  // QString nameFilters() const { return ""; }
+  // bool canLoad() const { return false; }
+  
+
+  typedef Polyhedron_demo_plugin_helper Plugin_helper;
+  
+  using Plugin_helper::init;
+  virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface);
+  
+  QList<QAction*> actions() const
+  {
+    return QList<QAction*>();
+  }
+  
+public Q_SLOTS:
+  void load_function() const;
+  
+private:
+  void load_function_plugins();
+  
+private:
+  QList<Implicit_function_interface*> functions_;
+};
+
+
+
+Io_implicit_function_plugin::
+Io_implicit_function_plugin()
+{
+  load_function_plugins();
+}
+
+
+void
+Io_implicit_function_plugin::
+init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface)
+{
+
+  this->scene = scene_interface;
+  this->mw = mainWindow;
+  
+  QAction* actionLoadFunction = new QAction("Load &Implicit Function", mw);
+  if( NULL != actionLoadFunction )
+  {
+    connect(actionLoadFunction, SIGNAL(triggered()), this, SLOT(load_function()));
+  }
+  
+  QMenu* menuFile = mw->findChild<QMenu*>("menuFile");
+  if ( NULL != menuFile )
+  {
+    QList<QAction*> menuFileActions = menuFile->actions();
+    
+    // Look for action just after "Load..." action
+    QAction* actionAfterLoad = NULL;
+    for ( QList<QAction*>::iterator it_action = menuFileActions.begin(), 
+         end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions)
+    {
+      if ( NULL != *it_action && (*it_action)->text().contains("Load") )
+      {
+        ++it_action;
+        if ( it_action != end && NULL != *it_action )
+        {
+          actionAfterLoad = *it_action;
+        }
+      }
+    }
+    
+    // Insert "Load implicit function" action
+    if ( NULL != actionAfterLoad )
+    {
+      menuFile->insertAction(actionAfterLoad,actionLoadFunction);      
+    }
+    
+  }
+}
+
+
+void
+Io_implicit_function_plugin::
+load_function() const
+{
+  QDialog dialog(mw);
+  Ui::FunctionDialog ui;
+  ui.setupUi(&dialog);
+  
+  connect(ui.buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  
+  // Add loaded functions to the dialog
+  int i=0;
+  Q_FOREACH( Implicit_function_interface* f, functions_ )
+  {
+    ui.functionList->insertItem(i++,f->name());
+  }
+
+  // Open window
+  int return_code = dialog.exec();
+  if(return_code == QDialog::Rejected) { return; }
+  
+  // Get selected function
+  i = ui.functionList->currentIndex();
+  Implicit_function_interface* function = functions_[i];
+  
+  // Create Scene_implicit_function object and add it to the framework
+  Scene_implicit_function_item* item =
+    new Scene_implicit_function_item(function);
+  
+  item->setName(tr("%1").arg(function->name()));
+  item->setRenderingMode(FlatPlusEdges);
+
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  scene->itemChanged(index);
+    
+  CGAL::Three::Scene_interface::Item_id new_item_id = scene->addItem(item);
+  scene->setSelectedItem(new_item_id);
+}
+
+void
+Io_implicit_function_plugin::
+load_function_plugins()
+{
+  QDir pluginsDir(qApp->applicationDirPath());
+  QString dirname = pluginsDir.dirName();
+  if ( !pluginsDir.cd("implicit_functions") ) { 
+    // In that case, dirname may be "Debug" or "Release" and one has to
+    // search in ../implicit_functions/Debug or
+    // ../implicit_functions/Release
+    QString newDir = QString("../implicit_functions/") + dirname;
+    if( !pluginsDir.cd(newDir) ) return; 
+  }
+  
+  Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
+  {
+    if ( fileName.contains("plugin") && QLibrary::isLibrary(fileName) )
+    {
+      qDebug("    + Loading Function \"%s\"...", fileName.toUtf8().data());
+      QPluginLoader loader;
+      loader.setFileName(pluginsDir.absoluteFilePath(fileName));
+      QObject *function_plugin = loader.instance();
+      if ( NULL != function_plugin )
+      {
+        Implicit_function_interface* function =
+          qobject_cast<Implicit_function_interface*>(function_plugin);
+        
+        if ( NULL != function )
+        {
+          functions_ << function;
+        }
+      }
+    }
+  }
+}
+
+#include "Io_implicit_function_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/LocalOptim_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/LocalOptim_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp
new file mode 100644
index 0000000..b3cb2c5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp
@@ -0,0 +1,449 @@
+#include "config.h"
+#include "config_mesh_3.h"
+
+#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "Messages_interface.h"
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include "Scene_c3t3_item.h"
+#include <QInputDialog>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <fstream>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+#include "Scene_implicit_function_item.h"
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+#include "Scene_segmented_image_item.h"
+#endif
+
+#include "Meshing_thread.h"
+
+#include "ui_Meshing_dialog.h"
+
+using namespace CGAL::Three;
+
+// Constants
+const QColor default_mesh_color(45,169,70);
+
+#include "Mesh_3_plugin_cgal_code.h" // declare functions `cgal_code_mesh_3`
+
+class Mesh_3_plugin :
+  public QObject,
+  protected Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow,
+            CGAL::Three::Scene_interface* scene_interface,
+            Messages_interface* msg_interface)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionMesh_3 = new QAction("Create a Tetrahedral Mesh", mw);
+    if(actionMesh_3) {
+      actionMesh_3->setProperty("subMenuName", "Tetrahedral Mesh Generation");
+      connect(actionMesh_3, SIGNAL(triggered()),
+              this, SLOT(mesh_3()));
+    }
+    this->msg = msg_interface;
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionMesh_3;
+  }
+
+
+  bool applicable(QAction*) const {
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+    if(qobject_cast<Scene_implicit_function_item*>(scene->item(scene->mainSelectionIndex())))
+      return true;
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+    Q_FOREACH(int ind, scene->selectionIndices()){
+      if( qobject_cast<Scene_segmented_image_item*>(scene->item(ind)))
+        return true;
+    }
+#endif  
+    Q_FOREACH(int ind, scene->selectionIndices()){
+      if( qobject_cast<Scene_polyhedron_item*>(scene->item(ind)))
+        return true;
+    }
+    return false;
+  }
+
+public Q_SLOTS:
+  void mesh_3();
+  void meshing_done(Meshing_thread* t);
+  void status_report(QString str);
+
+private:
+  void launch_thread(Meshing_thread* mesh_thread);
+  void treat_result(Scene_item& source_item, Scene_c3t3_item& result_item) const;
+
+private:
+  QAction* actionMesh_3;
+  Messages_interface* msg;
+  QMessageBox* message_box_;
+  Scene_item* source_item_;
+}; // end class Mesh_3_plugin
+
+double
+get_approximate(double d, int precision, int& decimals)
+{
+    if ( d<0 ) { return 0; }
+
+    double i = std::pow(10.,precision-1);
+
+    decimals = 0;
+    while ( d > i*10 ) { d = d/10.; ++decimals; }
+    while ( d < i ) { d = d*10.; --decimals; }
+
+    return std::floor(d)*std::pow(10.,decimals);
+}
+
+void Mesh_3_plugin::mesh_3()
+{
+  Scene_polyhedron_item* poly_item = NULL;
+  Scene_implicit_function_item* function_item = NULL;
+  Scene_segmented_image_item* image_item = NULL;
+  Scene_polylines_item* polylines_item = NULL;
+
+  Q_FOREACH(int ind, scene->selectionIndices()) {
+
+    if(poly_item == NULL){
+      poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(ind));
+    }
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+    if(function_item == NULL){
+      function_item = qobject_cast<Scene_implicit_function_item*>(scene->item(ind));
+    }
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+    if(image_item == NULL){
+      image_item = qobject_cast<Scene_segmented_image_item*>(scene->item(ind));
+    }
+#endif
+    if(polylines_item == NULL){
+      polylines_item = qobject_cast<Scene_polylines_item*>(scene->item(ind));
+    }
+  }
+  Scene_item* item = NULL;
+  bool features_protection_available = false;
+  if(NULL != poly_item)
+  {
+    item = poly_item;
+    features_protection_available = true;
+  }
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+  else if (NULL != function_item) { item = function_item; }
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+  else if (NULL != image_item)
+    { 
+      item = image_item;
+      features_protection_available = true;
+    }
+#endif
+
+  if (NULL == item)
+  {
+    QMessageBox::warning(mw, tr(""),
+      tr("Selected object can't be meshed"));
+    return;
+  }
+
+  // -----------------------------------
+  // Create Mesh dialog
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Meshing_dialog ui;
+  ui.setupUi(&dialog);
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+
+  // Connect checkboxes to spinboxes
+  connect(ui.noApprox, SIGNAL(toggled(bool)),
+          ui.approx,   SLOT(setEnabled(bool)));
+
+  connect(ui.noFacetSizing, SIGNAL(toggled(bool)),
+          ui.facetSizing,   SLOT(setEnabled(bool)));
+
+  connect(ui.noAngle,    SIGNAL(toggled(bool)),
+          ui.facetAngle, SLOT(setEnabled(bool)));
+
+  connect(ui.noTetSizing, SIGNAL(toggled(bool)),
+          ui.tetSizing,   SLOT(setEnabled(bool)));
+
+  connect(ui.noTetShape, SIGNAL(toggled(bool)),
+          ui.tetShape,   SLOT(setEnabled(bool)));
+
+  // Set default parameters
+  CGAL::Three::Scene_interface::Bbox bbox = item->bbox();
+  ui.objectName->setText(item->name());
+  ui.objectNameSize->setText(tr("Object bbox size (w,h,d):  <b>%1</b>,  <b>%2</b>,  <b>%3</b>")
+                             .arg(bbox.width(),0,'g',3)
+                             .arg(bbox.height(),0,'g',3)
+                             .arg(bbox.depth(),0,'g',3) );
+
+  double diag = bbox.diagonal_length();
+  int decimals = 0;
+  double sizing_default = get_approximate(diag * 0.05, 2, decimals);
+  ui.facetSizing->setDecimals(-decimals+2);
+  ui.facetSizing->setSingleStep(std::pow(10.,decimals));
+  ui.facetSizing->setRange(diag * 10e-6, // min
+                           diag); // max
+  ui.facetSizing->setValue(sizing_default); // default value
+
+  ui.tetSizing->setDecimals(-decimals+2);
+  ui.tetSizing->setSingleStep(std::pow(10.,decimals));
+  ui.tetSizing->setRange(diag * 10e-6, // min
+                         diag); // max
+  ui.tetSizing->setValue(sizing_default); // default value
+
+  double approx_default = get_approximate(diag * 0.005, 2, decimals);
+  ui.approx->setDecimals(-decimals+2);
+  ui.approx->setSingleStep(std::pow(10.,decimals));
+  ui.approx->setRange(diag * 10e-7, // min
+                      diag); // max
+  ui.approx->setValue(approx_default);
+
+  ui.protect->setEnabled(features_protection_available);
+  if (!features_protection_available)
+    ui.protect->setChecked(false);
+
+  // -----------------------------------
+  // Get values
+  // -----------------------------------
+  int i = dialog.exec();
+  if( i == QDialog::Rejected ) { return; }
+
+  // 0 means parameter is not considered
+  const double angle = !ui.noAngle->isChecked() ? 0 : ui.facetAngle->value();
+  const double approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
+  const double facet_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
+  const double radius_edge = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
+  const double tet_sizing = !ui.noTetSizing->isChecked() ? 0  : ui.tetSizing->value();
+  const bool protect_features = ui.protect->isChecked();
+  const int manifold = ui.manifoldCheckBox->isChecked() ? 1 : 0;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  Meshing_thread* thread = NULL;
+
+  // Polyhedron
+  if ( NULL != poly_item )
+  {
+    Polyhedron* pMesh = poly_item->polyhedron();
+    if (NULL == pMesh)
+    {
+      QMessageBox::critical(mw, tr(""), tr("ERROR: no data in selected item"));
+      return;
+    }
+
+    Scene_polylines_item::Polylines_container plc;
+
+    thread =    cgal_code_mesh_3(pMesh,
+                                 (polylines_item == NULL)?plc:polylines_item->polylines,
+                                 item->name(),
+                                 angle,
+                                 facet_sizing,
+                                 approx,
+                                 tet_sizing,
+                                 radius_edge,
+                                 protect_features,
+                                 manifold,
+                                 scene);
+  }
+  // Image
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+  else if (NULL != function_item)
+  {
+    const Implicit_function_interface* pFunction = function_item->function();
+    if (NULL == pFunction)
+    {
+      QMessageBox::critical(mw, tr(""), tr("ERROR: no data in selected item"));
+      return;
+    }
+
+    thread =    cgal_code_mesh_3(pFunction,
+                                 angle,
+                                 facet_sizing,
+                                 approx,
+                                 tet_sizing,
+                                 radius_edge,
+                                 manifold,
+                                 scene);
+  }
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+  else if (NULL != image_item)
+  {
+    const Image* pImage = image_item->image();
+    if (NULL == pImage)
+    {
+      QMessageBox::critical(mw, tr(""), tr("ERROR: no data in selected item"));
+      return;
+    }
+
+    Scene_polylines_item::Polylines_container plc;
+
+    thread =    cgal_code_mesh_3(pImage,
+                                 (polylines_item == NULL)?plc:polylines_item->polylines,
+                                 angle,
+                                 facet_sizing,
+                                 approx,
+                                 tet_sizing,
+                                 radius_edge,
+                                 protect_features,
+                                 manifold,
+                                 scene);
+  }
+#endif
+
+  if ( NULL == thread )
+  {
+    QMessageBox::critical(mw,tr(""),tr("ERROR: no thread created"));
+    return;
+  }
+
+  // Launch thread
+  source_item_ = item;
+  launch_thread(thread);
+
+  QApplication::restoreOverrideCursor();
+}
+
+void
+Mesh_3_plugin::
+launch_thread(Meshing_thread* mesh_thread)
+{
+  // -----------------------------------
+  // Create message box with stop button
+  // -----------------------------------
+  message_box_ = new QMessageBox(QMessageBox::NoIcon,
+                                 "Meshing",
+                                 "Mesh generation in progress...",
+                                 QMessageBox::Cancel,
+                                 mw);
+
+  message_box_->setDefaultButton(QMessageBox::Cancel);
+  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
+  cancelButton->setText(tr("Stop"));
+
+  QObject::connect(cancelButton, SIGNAL(clicked()),
+                   mesh_thread,  SLOT(stop()));
+
+  message_box_->show();
+
+  // -----------------------------------
+  // Connect main thread to meshing thread
+  // -----------------------------------
+  QObject::connect(mesh_thread, SIGNAL(done(Meshing_thread*)),
+                   this,        SLOT(meshing_done(Meshing_thread*)));
+
+  QObject::connect(mesh_thread, SIGNAL(status_report(QString)),
+                   this,        SLOT(status_report(QString)));
+
+  // -----------------------------------
+  // Launch mesher
+  // -----------------------------------
+  mesh_thread->start();
+}
+
+
+void
+Mesh_3_plugin::
+status_report(QString str)
+{
+  if ( NULL == message_box_ ) { return; }
+
+  message_box_->setInformativeText(str);
+}
+
+
+void
+Mesh_3_plugin::
+meshing_done(Meshing_thread* thread)
+{
+  // Print message in console
+  QString str = QString("Meshing of \"%1\" done in %2s<br>")
+    .arg(source_item_->name())
+    .arg(thread->time());
+
+  Q_FOREACH( QString param, thread->parameters_log() )
+  {
+    str.append(QString("( %1 )<br>").arg(param));
+  }
+
+  Scene_c3t3_item* result_item = thread->item();
+  const Scene_item::Bbox& bbox = result_item->bbox();
+  str.append(QString("BBox (x,y,z): [ %1, %2 ], [ %3, %4 ], [ %5, %6 ], <br>")
+    .arg(bbox.xmin)
+    .arg(bbox.xmax)
+    .arg(bbox.ymin)
+    .arg(bbox.ymax)
+    .arg(bbox.zmin)
+    .arg(bbox.zmax));
+
+  msg->information(qPrintable(str));
+
+  // Treat new c3t3 item
+  treat_result(*source_item_, *result_item);
+
+  // close message box
+  message_box_->close();
+  message_box_ = NULL;
+
+  // free memory
+  // TODO: maybe there is another way to do that
+  delete thread;
+}
+
+
+void
+Mesh_3_plugin::
+treat_result(Scene_item& source_item,
+             Scene_c3t3_item& result_item) const
+{
+  result_item.setName(tr("%1 [3D Mesh]").arg(source_item.name()));
+
+  result_item.c3t3_changed();
+
+  const Scene_item::Bbox& bbox = result_item.bbox();
+  result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
+                          (bbox.ymin + bbox.ymax)/2.f,
+                          (bbox.zmin + bbox.zmax)/2.f);
+
+  result_item.setColor(default_mesh_color);
+  result_item.setRenderingMode(source_item.renderingMode());
+  result_item.set_data_item(&source_item);
+
+  source_item.setVisible(false);
+
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+  scene->itemChanged(index);
+
+  Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
+  scene->setSelectedItem(new_item_id);
+}
+
+#include "Mesh_3_plugin.moc"
+
+#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp
new file mode 100644
index 0000000..af1d873
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp
@@ -0,0 +1,168 @@
+#include "config_mesh_3.h"
+#include "Mesh_3_plugin_cgal_code.h"
+
+#include <CGAL/Mesh_3/polylines_to_protect.h>
+#include <CGAL/Bbox_3.h>
+
+#include <Polyhedron_type.h>
+#include <C3t3_type.h>
+
+#include <Scene_c3t3_item.h>
+
+#include "Mesh_function.h"
+#include "Facet_extra_criterion.h"
+
+#include <CGAL/Timer.h>
+using namespace CGAL::Three;
+
+typedef Tr::Point Point_3;
+
+Meshing_thread* cgal_code_mesh_3(const Polyhedron* pMesh,
+                                 const Polylines_container& polylines,
+                                 QString filename,
+                                 const double facet_angle,
+                                 const double facet_sizing,
+                                 const double facet_approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 bool protect_features,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene)
+{
+  if(!pMesh) return 0;
+
+  std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
+  std::cerr << "  angle: " << facet_angle << std::endl
+            << "  facets size bound: " << facet_sizing << std::endl
+            << "  approximation bound: " << facet_approx << std::endl
+            << "  tetrahedra size bound: " << tet_sizing << std::endl;
+  std::cerr << "Build AABB tree...";
+  CGAL::Timer timer;
+  timer.start();
+  // Create domain
+  Polyhedral_mesh_domain* p_domain = new Polyhedral_mesh_domain(*pMesh);
+  if(polylines.empty() && protect_features) {
+      p_domain->detect_features();
+  }
+  if(! polylines.empty()){
+    p_domain->add_features(polylines.begin(), polylines.end());
+    protect_features = true; // so that it will be passed in make_mesh_3
+  }
+
+  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
+
+  Scene_c3t3_item* p_new_item = new Scene_c3t3_item;
+  p_new_item->set_scene(scene);
+
+  Mesh_parameters param;
+  param.facet_angle = facet_angle;
+  param.facet_sizing = facet_sizing;
+  param.facet_approx = facet_approx;
+  param.tet_sizing = tet_sizing;
+  param.tet_shape = tet_shape;
+  param.manifold = manifold;
+  param.protect_features = protect_features;
+
+  typedef ::Mesh_function<Polyhedral_mesh_domain> Mesh_function;
+  Mesh_function* p_mesh_function = new Mesh_function(p_new_item->c3t3(),
+                                                     p_domain, param);
+  return new Meshing_thread(p_mesh_function, p_new_item);
+}
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+
+Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface* pfunction,
+                                 const double facet_angle,
+                                 const double facet_sizing,
+                                 const double facet_approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene)
+{
+  if (pfunction == NULL) { return NULL; }
+
+  CGAL::Bbox_3 domain_bbox(pfunction->bbox().xmin,
+                           pfunction->bbox().ymin,
+                           pfunction->bbox().zmin,
+                           pfunction->bbox().xmax,
+                           pfunction->bbox().ymax,
+                           pfunction->bbox().zmax);
+
+  Function_mesh_domain* p_domain =
+    new Function_mesh_domain(Function_wrapper(*pfunction), domain_bbox, 1e-7);
+
+  Scene_c3t3_item* p_new_item = new Scene_c3t3_item;
+  p_new_item->set_scene(scene);
+
+  Mesh_parameters param;
+  param.protect_features = false;
+  param.facet_angle = facet_angle;
+  param.facet_sizing = facet_sizing;
+  param.facet_approx = facet_approx;
+  param.tet_sizing = tet_sizing;
+  param.tet_shape = tet_shape;
+  param.manifold = manifold;
+
+  typedef ::Mesh_function<Function_mesh_domain> Mesh_function;
+  Mesh_function* p_mesh_function = new Mesh_function(p_new_item->c3t3(),
+                                                     p_domain, param);
+  return new Meshing_thread(p_mesh_function, p_new_item);
+}
+#endif // CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+
+Meshing_thread* cgal_code_mesh_3(const Image* pImage,
+                                 const Polylines_container& polylines,
+                                 const double facet_angle,
+                                 const double facet_sizing,
+                                 const double facet_approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 bool protect_features,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene)
+{
+  if (NULL == pImage) { return NULL; }
+
+  Image_mesh_domain* p_domain = new Image_mesh_domain(*pImage, 1e-6);
+
+
+  if(protect_features && polylines.empty()){
+    std::vector<std::vector<Point_3> > polylines_on_bbox;
+    CGAL::polylines_to_protect<Point_3>(*pImage, polylines_on_bbox);
+    p_domain->add_features(polylines_on_bbox.begin(), polylines_on_bbox.end());
+  }
+  if(! polylines.empty()){
+    // Insert edge in domain
+    p_domain->add_features(polylines.begin(), polylines.end());
+    protect_features = true; // so that it will be passed in make_mesh_3
+  }
+  CGAL::Timer timer;
+  timer.start();
+  Scene_c3t3_item* p_new_item = new Scene_c3t3_item;
+  p_new_item->set_scene(scene);
+
+  Mesh_parameters param;
+  param.protect_features = protect_features;
+  param.facet_angle = facet_angle;
+  param.facet_sizing = facet_sizing;
+  param.facet_approx = facet_approx;
+  param.tet_sizing = tet_sizing;
+  param.tet_shape = tet_shape;
+  param.manifold = manifold;
+  
+  typedef ::Mesh_function<Image_mesh_domain> Mesh_function;
+  Mesh_function* p_mesh_function = new Mesh_function(p_new_item->c3t3(),
+                                                     p_domain, param);
+  return new Meshing_thread(p_mesh_function, p_new_item);
+}
+
+#endif //CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+
+
+//#include "Polyhedron_demo_mesh_3_plugin_cgal_code.moc"
+//#include "Scene_c3t3_item.moc" //Check this one, it's strange moc include.
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h
new file mode 100644
index 0000000..6393596
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h
@@ -0,0 +1,55 @@
+#include "Polyhedron_type_fwd.h"
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+#  include "Image_type_fwd.h"
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+#  include "implicit_functions/Implicit_function_interface.h"
+#endif
+
+#include "Kernel_type.h"
+#include "Meshing_thread.h"
+
+struct Mesh_parameters;
+
+namespace CGAL { namespace Three {
+  class Scene_item;
+  class Scene_interface;
+}}
+
+typedef std::list<std::vector<CGAL::Exact_predicates_inexact_constructions_kernel::Point_3> > Polylines_container;
+
+Meshing_thread* cgal_code_mesh_3(const Polyhedron* pMesh,
+                                 const Polylines_container&,
+                                 QString filename,
+                                 const double angle,
+                                 const double facet_sizing,
+                                 const double approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 bool protect_features,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene);
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface* pfunction,
+                                 const double facet_angle,
+                                 const double facet_sizing,
+                                 const double facet_approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene);
+#endif
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+Meshing_thread* cgal_code_mesh_3(const CGAL::Image_3* pImage,
+                                 const Polylines_container& polylines,
+                                 const double facet_angle,
+                                 const double facet_sizing,
+                                 const double facet_approx,
+                                 const double tet_sizing,
+                                 const double tet_shape,
+                                 bool protect_features,
+                                 const int manifold,
+                                 CGAL::Three::Scene_interface* scene);
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h
new file mode 100644
index 0000000..708f028
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h
@@ -0,0 +1,274 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_DEMO_MESH_3_MESH_FUNCTION_H
+#define CGAL_DEMO_MESH_3_MESH_FUNCTION_H
+
+#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1
+
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+
+#include <QStringList>
+#include <QString>
+
+#include <CGAL/Mesh_3/Mesher_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
+
+#include "C3t3_type.h"
+#include "Meshing_thread.h"
+#include <CGAL/make_mesh_3.h> // for C3t3_initializer
+#include <CGAL/use.h>
+
+struct Mesh_parameters
+{
+  double facet_angle;
+  double facet_sizing;
+  double facet_approx;
+  
+  double tet_shape;
+  double tet_sizing;
+  bool protect_features;
+  int manifold;
+  
+  inline QStringList log() const;
+};
+
+
+template < typename Domain_ >
+class Mesh_function
+  : public Mesh_function_interface
+{
+  typedef Domain_ Domain;
+  
+public:
+  Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p);
+  
+  ~Mesh_function();
+  
+  // Launch
+  virtual void launch();
+  
+  // Stop
+  virtual void stop();
+  
+  // Logs
+  virtual QStringList parameters_log() const;
+  virtual QString status(double time_period) const;
+
+private:
+  typedef typename Domain::Point_3                  Point_3;
+  typedef typename Domain::Index                    Index;
+  typedef std::vector<std::pair<Point_3, Index> >   Initial_points_vector;
+  typedef typename Initial_points_vector::iterator  Ipv_iterator;
+  typedef C3t3::Vertex_handle                       Vertex_handle;
+  
+  typedef C3t3::Triangulation                       Tr;
+  typedef CGAL::Mesh_criteria_3<Tr>                 Mesh_criteria;
+  typedef Mesh_criteria::Edge_criteria              Edge_criteria;
+  typedef Mesh_criteria::Facet_criteria             Facet_criteria;
+  typedef Mesh_criteria::Cell_criteria              Cell_criteria;
+  
+  typedef CGAL::Mesh_3::Mesher_3<C3t3, Mesh_criteria, Domain>   Mesher;
+  
+private:
+  C3t3& c3t3_;
+  Domain* domain_;
+  Mesh_parameters p_;
+  bool continue_;
+  Mesher* mesher_;
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mutable typename Mesher::Mesher_status last_report_;
+#endif
+};
+
+
+
+// -----------------------------------
+// Class Mesh_parameters
+// -----------------------------------
+inline
+QStringList
+Mesh_parameters::
+log() const
+{
+  return QStringList()
+  << QString("facet min angle: %1").arg(facet_angle)
+  << QString("facet max size: %1").arg(facet_sizing)
+  << QString("facet approx error: %1").arg(facet_approx)
+  << QString("tet shape (radius-edge): %1").arg(tet_shape)
+  << QString("tet max size: %1").arg(tet_sizing)
+  << QString("protect features: %1").arg(protect_features);
+}
+
+
+// -----------------------------------
+// Class Mesh_function
+// -----------------------------------
+template < typename D_ >
+Mesh_function<D_>::
+Mesh_function(C3t3& c3t3, Domain* domain, const Mesh_parameters& p)
+: c3t3_(c3t3)
+, domain_(domain)
+, p_(p)
+, continue_(true)
+, mesher_(NULL)
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+, last_report_(0,0,0)
+#endif
+{
+#ifdef CGAL_CONCURRENT_MESH_3
+  Concurrent_mesher_config::load_config_file(CONFIG_FILENAME, false);
+#endif
+}
+
+
+template < typename D_ >
+Mesh_function<D_>::
+~Mesh_function()
+{
+  delete domain_;
+  delete mesher_;
+}
+
+
+CGAL::Mesh_facet_topology topology(int manifold) {
+  return manifold == 0 ? CGAL::FACET_VERTICES_ON_SURFACE :
+    static_cast<CGAL::Mesh_facet_topology>
+    (CGAL::MANIFOLD |
+     CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH);
+}
+
+template < typename D_ >
+void
+Mesh_function<D_>::
+launch()
+{
+#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
+  CGAL::default_random = CGAL::Random(0);
+#endif
+
+  // Create mesh criteria
+  Mesh_criteria criteria(Edge_criteria(p_.facet_sizing),
+                         Facet_criteria(p_.facet_angle,
+                                        p_.facet_sizing,
+                                        p_.facet_approx,
+                                        topology(p_.manifold)),
+                         Cell_criteria(p_.tet_shape,
+                                       p_.tet_sizing));
+
+  // Initialization of the mesh, either with the protection of sharp
+  // features, or with the initial points (or both).
+  CGAL::internal::Mesh_3::C3t3_initializer<
+    C3t3,
+    Domain,
+    Mesh_criteria,
+    CGAL::internal::Mesh_3::has_Has_features<Domain>::value >()
+    (c3t3_,
+     *domain_,
+     criteria,
+     p_.protect_features);
+
+  // Build mesher and launch refinement process
+  mesher_ = new Mesher(c3t3_, *domain_, criteria);
+
+#ifdef CGAL_MESH_3_PROFILING
+  CGAL::Real_timer t;
+  t.start();
+#endif
+
+#if CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mesher_->initialize();
+  while ( ! mesher_->is_algorithm_done() && continue_ )
+  {
+    mesher_->one_step();
+  }
+#else // not CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  mesher_->refine_mesh();
+#endif
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Full refinement time (without fix_c3t3): " << t.time() << " seconds." << std::endl;
+#endif
+
+  // Ensure c3t3 is ok (usefull if process has been stop by the user)
+  mesher_->fix_c3t3();
+}
+
+
+template < typename D_ >
+void
+Mesh_function<D_>::
+stop()
+{
+  continue_ = false;
+}
+
+
+template < typename D_ >
+QStringList
+Mesh_function<D_>::
+parameters_log() const
+{
+  return p_.log();
+}
+
+
+template < typename D_ >
+QString
+Mesh_function<D_>::
+status(double time_period) const
+{
+  QString result;
+
+  CGAL_USE(time_period); // to avoid a warning when the macro
+                         // CGAL_MESH_3_MESHER_STATUS_ACTIVATED is not
+                         // defined
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  // If mesher_ is not yet created, it means that either launch() has not
+  // been called or that initial points have not been founded
+  if ( NULL == mesher_ )
+  {
+    return QString("Initialization in progress...");
+  }
+  
+  // Get status and return a string corresponding to it
+  typename Mesher::Mesher_status s = mesher_->status();
+  
+  result = QString("Vertices: %1 \n"
+                           "Vertices inserted last %2s: %3 \n\n"
+                           "Bad facets: %4 \n"
+                           "Bad cells: %5")
+    .arg(s.vertices)
+    .arg(time_period)
+    .arg(s.vertices - last_report_.vertices)
+    .arg(s.facet_queue)
+    .arg(s.cells_queue);
+  
+  last_report_ = s;
+#endif
+  return result;
+}
+
+#endif // CGAL_DEMO_MESH_3_MESH_FUNCTION_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui
new file mode 100644
index 0000000..965a4eb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Meshing_dialog</class>
+ <widget class="QDialog" name="Meshing_dialog">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>473</width>
+    <height>482</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Meshing criteria</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetFixedSize</enum>
+   </property>
+   <item>
+    <widget class="QLabel" name="objectName">
+     <property name="font">
+      <font>
+       <pointsize>15</pointsize>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>NO OBJECT</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLabel" name="objectNameSize">
+     <property name="text">
+      <string>No size</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="sharpFeaturesGroup">
+     <property name="layoutDirection">
+      <enum>Qt::LeftToRight</enum>
+     </property>
+     <property name="title">
+      <string>Sharp features</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" columnstretch="2">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="protect">
+        <property name="layoutDirection">
+         <enum>Qt::RightToLeft</enum>
+        </property>
+        <property name="text">
+         <string>&Protect sharp edges</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Surface</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0,0,0,0,0,0" columnstretch="2,0,0">
+      <item row="4" column="0">
+       <widget class="QCheckBox" name="checkBox">
+        <property name="text">
+         <string>See advanced &controls...</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="facetSizing">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="decimals">
+         <number>4</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="angleLabel">
+        <property name="text">
+         <string>Facet min. &angle (deg)</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>facetAngle</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QCheckBox" name="noAngle">
+        <property name="toolTip">
+         <string>Enable/Disable parameter</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="approxLabel">
+        <property name="text">
+         <string>Approximation &error</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>approx</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="sizingLabel">
+        <property name="text">
+         <string>&Facet max. size</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>facetSizing</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="approx">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QCheckBox" name="noFacetSizing">
+        <property name="toolTip">
+         <string>Enable/Disable parameter</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QDoubleSpinBox" name="facetAngle">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="minimum">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>30.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>25.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QCheckBox" name="noApprox">
+        <property name="toolTip">
+         <string>Enable/Disable parameter</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="8" column="0" colspan="3">
+       <widget class="QFrame" name="advanced">
+        <property name="visible">
+         <bool>false</bool>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::StyledPanel</enum>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Plain</enum>
+        </property>
+        <layout class="QVBoxLayout" name="advancedLayout">
+         <item>
+          <widget class="QLabel" name="manifoldLabel">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>The following option forces the meshing engine to produce a 3D mesh with a manifold boundary. That may lead to an infinite loop if the input domain has a non-manifold 2D component.</string>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="manifoldCheckBox">
+           <property name="layoutDirection">
+            <enum>Qt::RightToLeft</enum>
+           </property>
+           <property name="text">
+            <string>&manifold</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Volume</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3" columnstretch="2,1,0">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>&Tetrahedron max. size</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>tetSizing</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="tetSizing">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="decimals">
+         <number>4</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande';">Tetrahedron &amp;shape</span><span style=" font-family:'Lucida Grande'; font-size:13pt;"> </span><span style=" font-family:'Lucida Grande'; font-style:italic;">(radius-edge ratio)</span></p></body></html></string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>tetShape</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="tetShape">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="minimum">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>3.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QCheckBox" name="noTetShape">
+        <property name="toolTip">
+         <string>Enable/Disable parameter</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QCheckBox" name="noTetSizing">
+        <property name="toolTip">
+         <string>Enable/Disable parameter</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::MinimumExpanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>protect</tabstop>
+  <tabstop>approx</tabstop>
+  <tabstop>noApprox</tabstop>
+  <tabstop>facetSizing</tabstop>
+  <tabstop>noFacetSizing</tabstop>
+  <tabstop>facetAngle</tabstop>
+  <tabstop>noAngle</tabstop>
+  <tabstop>tetSizing</tabstop>
+  <tabstop>noTetSizing</tabstop>
+  <tabstop>tetShape</tabstop>
+  <tabstop>noTetShape</tabstop>
+  <tabstop>checkBox</tabstop>
+  <tabstop>manifoldCheckBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Meshing_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>397</x>
+     <y>544</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Meshing_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>397</x>
+     <y>544</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBox</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>advanced</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>69</x>
+     <y>283</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>72</x>
+     <y>297</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp
new file mode 100644
index 0000000..ab0b4fc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp
@@ -0,0 +1,88 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include "config.h"
+
+#include <QTime>
+#include <QApplication>
+
+#include "Meshing_thread.h"
+
+class Scene_c3t3_item;
+
+Meshing_thread::
+Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item)
+  : f_(f)
+  , item_(item)
+  , time_(0)
+  , timer_(new QTimer(this))
+  , timer_period_(1)
+{
+  connect(timer_, SIGNAL(timeout()),
+          this,   SLOT(emit_status()));
+  
+  timer_->start(static_cast<int>(timer_period_*1000));  
+}
+
+
+Meshing_thread::
+~Meshing_thread()
+{
+  delete f_;
+  delete timer_;
+  QApplication::restoreOverrideCursor();
+}
+
+
+void
+Meshing_thread::
+run()
+{
+  QTime timer;
+  timer.start();
+  
+  f_->launch();
+  time_ = double(timer.elapsed()) / 1000;
+  
+  Q_EMIT done(this);
+}
+
+
+void
+Meshing_thread::
+stop()
+{
+  f_->stop();
+  
+  // Block application until thread is deleted
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+}
+
+
+void
+Meshing_thread::
+emit_status()
+{
+  Q_EMIT (status_report(f_->status(timer_period_)));
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h
new file mode 100644
index 0000000..b2ae89d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h
@@ -0,0 +1,96 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_DEMO_MESH_3_MESHING_THREAD_H
+#define CGAL_DEMO_MESH_3_MESHING_THREAD_H
+
+#include <QThread>
+#include <QObject>
+#include <QStringList>
+#include <QString>
+#include <QTimer>
+
+class Scene_c3t3_item;
+
+class Mesh_function_interface
+{
+public:
+  virtual ~Mesh_function_interface() {}
+  
+  // Launch
+  virtual void launch() = 0;
+  
+  // Stop
+  virtual void stop() = 0;
+  
+  // Logs
+  virtual QStringList parameters_log() const = 0;
+  virtual QString status(double time_period) const = 0;
+};
+
+
+class Meshing_thread : public QThread
+{
+  Q_OBJECT
+public:
+  // Constructor / Destructor
+  Meshing_thread(Mesh_function_interface* f, Scene_c3t3_item* item);
+  virtual ~Meshing_thread();
+  
+  // Scene item
+  Scene_c3t3_item* item() const { return item_; }
+  
+  // Infos about meshing
+  double time() const { return time_; }
+  
+  // Logs
+  QStringList parameters_log() const { return f_->parameters_log(); }
+  
+public Q_SLOTS:
+  // Stop
+  void stop();
+  
+private Q_SLOTS:
+  // emit signal status report
+  void emit_status();
+  
+Q_SIGNALS:
+  // Emitted at the end of the process
+  void done(Meshing_thread*);
+  // Informs about status of meshing
+  void status_report(QString);
+  
+protected:
+  // Overload of QThread function
+  virtual void run();
+  
+private:
+  Mesh_function_interface* f_;
+  Scene_c3t3_item* item_;
+  double time_; // in seconds
+  QTimer* timer_;
+  double timer_period_;
+};
+
+#endif // CGAL_DEMO_MESH_3_MESHING_THREAD_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp
new file mode 100644
index 0000000..efff242
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp
@@ -0,0 +1,630 @@
+#include <boost/config.hpp>
+#if defined(BOOST_MSVC)
+#  pragma warning( disable : 4503)
+#endif
+
+#include "config.h"
+#include "config_mesh_3.h"
+
+#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Messages_interface.h"
+#include "ui_Smoother_dialog.h"
+#include "ui_Local_optimizers_dialog.h"
+
+#include "Scene_c3t3_item.h"
+#include "C3t3_type.h"
+
+#include "Optimizer_thread.h"
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QTimer>
+
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h> // to get default values
+
+// declare the CGAL function
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+Optimizer_thread* cgal_code_odt_mesh_3(Scene_c3t3_item& c3t3_item,
+                                       const double time_limit,
+                                       const double convergence_ratio,
+                                       const double freeze_ratio,
+                                       const int max_iteration_number,
+                                       const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+Optimizer_thread* cgal_code_lloyd_mesh_3(Scene_c3t3_item& c3t3_item,
+                                         const double time_limit,
+                                         const double convergence_ratio,
+                                         const double freeze_ratio,
+                                         const int max_iteration_number,
+                                         const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+Optimizer_thread* cgal_code_perturb_mesh_3(Scene_c3t3_item& c3t3_item,
+                                           const double time_limit,
+                                           const double sliver_bound,
+                                           const bool create_new_item);
+#endif
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+Optimizer_thread* cgal_code_exude_mesh_3(Scene_c3t3_item& c3t3_item,
+                                         const double time_limit,
+                                         const double sliver_bound,
+                                         const bool create_new_item);
+#endif
+
+QString translate(CGAL::Mesh_optimization_return_code rc);
+
+
+// Mesh_3_optimization_plugin class
+using namespace CGAL::Three;
+class Mesh_3_optimization_plugin :
+  public QObject,
+  protected Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  typedef Polyhedron_demo_plugin_helper Base;
+public:
+  Mesh_3_optimization_plugin();
+  
+  using Base::init;
+  virtual void init(QMainWindow*, Scene_interface*, Messages_interface*);
+  inline virtual QList<QAction*> actions() const;
+  
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_c3t3_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+  void odt();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+  void lloyd();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+  void perturb();
+#endif
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+  void exude();
+#endif
+  
+  void optimization_done(Optimizer_thread* t);
+  void status_report(QString s);
+  
+private:
+  Scene_c3t3_item* get_c3t3_item() const;
+  
+  void treat_result(Scene_c3t3_item& source_item, Scene_c3t3_item& result_item,
+                    const QString& name) const;
+  
+  void launch_thread(Optimizer_thread* thread, const QString& msg);
+
+private:
+  QAction* actionOdt;
+  QAction* actionLloyd;
+  QAction* actionPerturb;
+  QAction* actionExude;
+  Messages_interface* msg;
+  QMessageBox* message_box_;
+  
+  Scene_c3t3_item* source_item_;
+}; // end class Mesh_3_optimization_plugin
+
+Mesh_3_optimization_plugin::
+Mesh_3_optimization_plugin()
+  : actionOdt(NULL)
+  , actionLloyd(NULL)
+  , actionPerturb(NULL)
+  , actionExude(NULL)
+  , msg(NULL)
+  , message_box_(NULL)
+  , source_item_(NULL)
+{
+}
+
+void 
+Mesh_3_optimization_plugin::
+init(QMainWindow* mainWindow,
+     Scene_interface* scene_interface,
+     Messages_interface* msg_interface)
+{
+  this->scene = scene_interface;
+  this->mw = mainWindow;
+  
+  // Create menu items
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+  actionOdt = new QAction(tr("odt_optimize_mesh_3"), mw);
+  if( NULL != actionOdt )
+  {
+    actionOdt->setProperty("subMenuName", "Tetrahedral Mesh Generation");
+    connect(actionOdt, SIGNAL(triggered()), this, SLOT(odt()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+  actionLloyd = new QAction(tr("lloyd_optimize_mesh_3"), mw);
+  if( NULL != actionLloyd )
+  {
+    actionLloyd->setProperty("subMenuName", "Tetrahedral Mesh Generation");
+    connect(actionLloyd, SIGNAL(triggered()), this, SLOT(lloyd()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+  actionPerturb = new QAction(tr("perturb_mesh_3"), mw);
+  if( NULL != actionPerturb )
+  {
+    actionPerturb->setProperty("subMenuName", "Tetrahedral Mesh Generation");
+    connect(actionPerturb, SIGNAL(triggered()), this, SLOT(perturb()));
+  }
+#endif
+  
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+  actionExude =new QAction(tr("exude_mesh_3"), mw);
+  if( NULL != actionExude )
+  {
+    actionExude->setProperty("subMenuName", "Tetrahedral Mesh Generation");
+    connect(actionExude, SIGNAL(triggered()), this, SLOT(exude()));
+  }
+#endif
+  
+  msg = msg_interface;
+}
+
+
+inline
+QList<QAction*> 
+Mesh_3_optimization_plugin::actions() const
+{
+  return QList<QAction*>() << actionOdt << actionLloyd 
+                           << actionPerturb << actionExude;
+}
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+void
+Mesh_3_optimization_plugin::odt()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Smoother_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Odt-smoothing parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+
+  namespace cgpd = CGAL::parameters::default_values;
+  ui.convergenceRatio->setValue(cgpd::odt_convergence_ratio);
+  ui.freezeRatio->setValue(cgpd::odt_freeze_ratio);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+    
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
+  const double convergence = ui.convergenceRatio->value();
+  const double freeze = ui.freezeRatio->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_odt_mesh_3(*item,
+                                                      max_time,
+                                                      convergence,
+                                                      freeze,
+                                                      max_iteration_nb,
+                                                      create_new_item);
+  
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Odt iterations are running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+void
+Mesh_3_optimization_plugin::lloyd()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::Smoother_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Lloyd-smoothing parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  
+  namespace cgpd = CGAL::parameters::default_values;
+  ui.convergenceRatio->setValue(cgpd::lloyd_convergence_ratio);
+  ui.freezeRatio->setValue(cgpd::lloyd_freeze_ratio);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const int max_iteration_nb = static_cast<int>(ui.maxIterationNb->value());
+  const double convergence = ui.convergenceRatio->value();
+  const double freeze = ui.freezeRatio->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_lloyd_mesh_3(*item,
+                                                        max_time,
+                                                        convergence,
+                                                        freeze,
+                                                        max_iteration_nb,
+                                                        create_new_item);
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  source_item_ = item;
+  launch_thread(opt_thread, "Lloyd iterations are running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+void
+Mesh_3_optimization_plugin::perturb()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::LocalOptim_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Sliver perturbation parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  connect(ui.noBound,     SIGNAL(toggled(bool)),
+          ui.sliverBound, SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_perturb_mesh_3(*item,
+                                                          max_time,
+                                                          sliver_bound,
+                                                          create_new_item);
+  
+
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Sliver perturbation is running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+void
+Mesh_3_optimization_plugin::exude()
+{
+  // -----------------------------------
+  // Get c3t3 item
+  // -----------------------------------
+  Scene_c3t3_item* item = get_c3t3_item();
+  if ( NULL == item ) { return; }
+  
+  // -----------------------------------
+  // Dialog box
+  // -----------------------------------
+  QDialog dialog(mw);
+  Ui::LocalOptim_dialog ui;
+  ui.setupUi(&dialog);
+  dialog.setWindowTitle(tr("Sliver exudation parameters"));
+  
+  connect(ui.buttonBox, SIGNAL(accepted()),
+          &dialog, SLOT(accept()));
+  connect(ui.buttonBox, SIGNAL(rejected()),
+          &dialog, SLOT(reject()));
+  
+  connect(ui.noTimeLimit, SIGNAL(toggled(bool)),
+          ui.maxTime,     SLOT(setDisabled(bool)));
+  
+  connect(ui.noBound,     SIGNAL(toggled(bool)),
+          ui.sliverBound, SLOT(setDisabled(bool)));
+  
+  ui.objectName->setText(item->name());
+  ui.sliverBound->setValue(25.);
+  
+  int i = dialog.exec();
+  if(i == QDialog::Rejected)
+    return;
+  
+  // 0 means parameter is not considered
+  const double max_time = ui.noTimeLimit->isChecked() ? 0 : ui.maxTime->value();
+  const double sliver_bound = ui.noBound->isChecked() ? 0 : ui.sliverBound->value();
+  const bool create_new_item = ui.createNewItem->isChecked();
+  
+  // -----------------------------------
+  // Launch optimization
+  // -----------------------------------
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  
+  Optimizer_thread* opt_thread = cgal_code_exude_mesh_3(*item,
+                                                        max_time,
+                                                        sliver_bound,
+                                                        create_new_item);
+
+  if ( NULL == opt_thread )
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+  
+  source_item_ = item;
+  launch_thread(opt_thread, "Sliver exudation is running...");
+  QApplication::restoreOverrideCursor();
+}
+#endif
+
+
+Scene_c3t3_item*
+Mesh_3_optimization_plugin::
+get_c3t3_item() const
+{
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+  Scene_c3t3_item* item = qobject_cast<Scene_c3t3_item*>(scene->item(index));
+
+  if ( NULL == item )
+  {
+    QMessageBox::warning(mw,tr(""),
+                          tr("Selected object is not a mesh... optimization can't be performed"));
+    return NULL;
+  }
+  
+  if ( NULL == item->data_item() )
+  {
+    QMessageBox::critical(mw,tr(""),
+                          tr("Can't perturb: data object has been destroyed !"));
+    return NULL;
+  }
+  
+  return item;
+}
+
+
+
+void
+Mesh_3_optimization_plugin::
+treat_result(Scene_c3t3_item& source_item,
+             Scene_c3t3_item& result_item,
+             const QString& name) const
+{
+  result_item.setName(tr("%1 [%2]").arg(source_item.name())
+                                   .arg(name));
+  
+  result_item.c3t3_changed();
+  
+  // If a new item has been created
+  if ( &source_item != &result_item)
+  {
+    const Scene_item::Bbox& bbox = result_item.bbox();
+    result_item.setPosition((bbox.xmin + bbox.xmax)/2.f,
+                            (bbox.ymin + bbox.ymax)/2.f,
+                            (bbox.zmin + bbox.zmax)/2.f);
+    
+    result_item.setColor(QColor(59,74,226));
+    result_item.setRenderingMode(source_item.renderingMode());
+    result_item.set_data_item(source_item.data_item());
+
+    source_item.setVisible(false);
+    
+    const Scene_interface::Item_id index = scene->mainSelectionIndex();
+    scene->itemChanged(index);
+    
+    Scene_interface::Item_id new_item_id = scene->addItem(&result_item);
+    scene->setSelectedItem(new_item_id);
+  }
+  else
+  {
+    result_item.update_histogram();
+    
+    const Scene_interface::Item_id index = scene->mainSelectionIndex();
+    scene->itemChanged(index);
+  }
+}
+
+
+void
+Mesh_3_optimization_plugin::
+optimization_done(Optimizer_thread* thread)
+{
+  CGAL::Mesh_optimization_return_code return_code = thread->return_code();
+  QString name = thread->optimizer_name();
+  
+  // Print message in console
+  QString str = QString("%1 of \"%2\" done in %3s<br>"
+                        "End reason: '%4'<br>")
+                  .arg(name)
+                  .arg(source_item_->name())
+                  .arg(thread->time())
+                  .arg(translate(return_code));
+  
+  Q_FOREACH( QString param, thread->parameters_log() )
+  {
+    str.append(QString("( %1 )<br>").arg(param));
+  }
+  
+  msg->information(qPrintable(str));
+  
+  // Treat new c3t3 item
+  Scene_c3t3_item* result_item = thread->item();
+  treat_result( *source_item_, *result_item, name);
+  // close message box
+  message_box_->close();
+  // free memory
+  delete thread;
+}
+
+
+void
+Mesh_3_optimization_plugin::
+launch_thread(Optimizer_thread* opt_thread, const QString& window_text)
+{
+
+  // -----------------------------------
+  // Create message box with stop button
+  // -----------------------------------
+  message_box_ = new QMessageBox(QMessageBox::NoIcon,
+                                 "Optimization...",
+                                 window_text,
+                                 QMessageBox::Cancel,
+                                 mw);
+  
+  message_box_->setDefaultButton(QMessageBox::Cancel);
+  QAbstractButton* cancelButton = message_box_->button(QMessageBox::Cancel);
+  cancelButton->setText(tr("Stop"));
+  
+  QObject::connect(cancelButton, SIGNAL(clicked()),
+                   opt_thread,   SLOT(stop()));
+  
+  message_box_->show();
+  
+  // -----------------------------------
+  // Connect main thread to optimization thread and launch optimizer
+  // -----------------------------------
+  QObject::connect(opt_thread, SIGNAL(done(Optimizer_thread*)),
+                   this,       SLOT(optimization_done(Optimizer_thread*)));
+  
+  QObject::connect(opt_thread, SIGNAL(status_report(QString)),
+                   this,       SLOT(status_report(QString)));
+  
+  opt_thread->start();
+
+}
+
+
+void
+Mesh_3_optimization_plugin::
+status_report(QString str)
+{
+  if ( NULL == message_box_ ) { return; }
+  
+  message_box_->setInformativeText(str);
+}
+
+
+QString
+translate(CGAL::Mesh_optimization_return_code rc)
+{
+  switch (rc)
+  {
+    case CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR: return QString("Unexpected error");
+    case CGAL::BOUND_REACHED: return QString("Bound reached");
+    case CGAL::TIME_LIMIT_REACHED: return QString("Time limit reached");
+    case CGAL::CANT_IMPROVE_ANYMORE: return QString("Can't improve anymore");
+    case CGAL::CONVERGENCE_REACHED: return QString("Convergence reached");
+    case CGAL::MAX_ITERATION_NUMBER_REACHED: return QString("Max iteration number reached");
+    case CGAL::ALL_VERTICES_FROZEN: return QString("All vertices have been frozen");
+  }
+  
+  return QString("ERROR");
+}
+
+#include "Optimization_plugin.moc"
+
+#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp
new file mode 100644
index 0000000..0024ee6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp
@@ -0,0 +1,770 @@
+#include "config.h"
+#include "config_mesh_3.h"
+#include "C3t3_type.h"
+#include "Scene_c3t3_item.h"
+#include "Scene_polyhedron_item.h"
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+#include "Scene_segmented_image_item.h"
+#endif
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+#include "Scene_implicit_function_item.h"
+#include "implicit_functions/Implicit_function_interface.h"
+#endif
+
+#include "Optimizer_thread.h"
+
+#include <CGAL/optimize_mesh_3.h>
+#include <CGAL/Bbox_3.h>
+
+#include <fstream>
+#include <cstddef>
+
+namespace cgp = CGAL::parameters;
+
+
+// -----------------------------------
+// Helper function
+// -----------------------------------
+QString translate_bool(const bool b)
+{
+  return b ? QString("done") 
+           : QString("in progress");
+}
+
+
+// -----------------------------------
+// Optimization_function_base template class
+// -----------------------------------
+template <typename Domain>
+class Optimization_function_base
+  : public Optimization_function_interface
+{
+public:
+  /// Constructor
+  /// Takes the responsability of d
+  explicit
+  Optimization_function_base(C3t3& c3t3, Domain* d)
+    : c3t3_(c3t3), domain_(d) {}
+  
+  /// Destructor
+  virtual ~Optimization_function_base()
+  {
+    delete domain_;
+  }
+  
+  /// Launch
+  virtual CGAL::Mesh_optimization_return_code launch()
+  {
+    return (*this)(c3t3_, *domain_);
+  }
+  
+protected:
+  /// Virtual operator() which should be overloaded
+  virtual CGAL::Mesh_optimization_return_code
+  operator()(C3t3& c3t3, const Domain& domain) = 0;
+  
+private:
+  C3t3& c3t3_;
+  Domain* domain_;
+};
+
+// Prototype which will be partially specialized for each Parameter class
+template < typename Domain, typename Parameters >
+class Optimization_function {};
+
+
+
+// -----------------------------------
+// Optimization generic function (responsible of dynamic casting)
+// -----------------------------------
+template <typename Parameters>
+Optimizer_thread* cgal_code_optimization(Scene_c3t3_item& c3t3_item,
+                                        const Parameters& param,
+                                        const bool create_new_item)
+{
+  // Create result item
+  Scene_c3t3_item* p_result_item = create_new_item ? 
+    new Scene_c3t3_item(c3t3_item.c3t3()) : &c3t3_item;
+
+  if ( NULL == p_result_item )
+  {
+    return NULL;
+  }
+  
+  
+  // Create domain using real type of c3t3_item.data_item()
+  // ------------------
+
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+  // Image
+  const Scene_segmented_image_item* image_item = 
+    qobject_cast<const Scene_segmented_image_item*>(c3t3_item.data_item());
+  
+  if ( NULL != image_item )
+  {
+    // Build domain
+    const Image* p_image = image_item->image();
+
+    if ( NULL == p_image )
+    {
+      return NULL;
+    }
+    
+    Image_mesh_domain* p_domain = new Image_mesh_domain(*p_image, 1e-6);
+    
+    // Create thread
+    typedef Optimization_function<Image_mesh_domain,Parameters> Opt_function;
+    Opt_function* p_opt_function = new Opt_function(p_result_item->c3t3(), p_domain, param);
+    
+    return new Optimizer_thread(p_opt_function, p_result_item);
+  }
+#endif
+  
+  // Polyhedron
+  const Scene_polyhedron_item* poly_item = 
+    qobject_cast<const Scene_polyhedron_item*>(c3t3_item.data_item());
+  
+  if ( NULL != poly_item )
+  {
+    // Build domain
+    const Polyhedron* p_poly = poly_item->polyhedron();
+    if ( NULL == p_poly )
+    {
+      return NULL;
+    }
+    
+    Polyhedral_mesh_domain* p_domain = new Polyhedral_mesh_domain(*p_poly);
+    
+    // Create thread
+    typedef Optimization_function<Polyhedral_mesh_domain,Parameters> Opt_function;
+    Opt_function* p_opt_function = new Opt_function(p_result_item->c3t3(), p_domain, param);
+    return new Optimizer_thread(p_opt_function, p_result_item);
+  }
+  
+#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+  // Function
+  const Scene_implicit_function_item* function_item = 
+    qobject_cast<const Scene_implicit_function_item*>(c3t3_item.data_item());
+  
+  if ( NULL != function_item )
+  {
+    // Build domain
+    const Implicit_function_interface* p_function = function_item->function();
+    if ( NULL == p_function ) { return NULL; }
+    
+    CGAL::Bbox_3 dom_bbox (p_function->bbox().xmin,
+                           p_function->bbox().ymin,
+                           p_function->bbox().zmin,
+                           p_function->bbox().xmax,
+                           p_function->bbox().ymax,
+                           p_function->bbox().zmax);
+    
+    Function_mesh_domain* p_domain =
+      new Function_mesh_domain(Function_wrapper(*p_function), dom_bbox, 1e-7);
+    
+    // Create thread
+    typedef Optimization_function<Function_mesh_domain,Parameters> Opt_function;
+    Opt_function* p_opt_function = new Opt_function(p_result_item->c3t3(), p_domain, param);
+    
+    return new Optimizer_thread(p_opt_function, p_result_item);
+  }
+#endif
+  
+  return NULL;
+}
+
+
+
+// -----------------------------------
+// Global optimization
+// -----------------------------------
+struct Global_optimization_status
+{
+  bool compute_moves_done;
+  bool move_points_done;
+  bool rebuild_restricted_delaunay_done;
+  int iteration_done;
+  
+  Global_optimization_status()
+    : compute_moves_done(false)
+    , move_points_done(false)
+    , rebuild_restricted_delaunay_done(false)
+    , iteration_done(-1) {}
+};
+
+struct Global_visitor
+{
+  Global_visitor(Global_optimization_status* status) : p_status_(status) {}
+  Global_visitor(const Global_visitor& rhs) : p_status_(rhs.p_status_) {}
+  
+  void after_compute_moves() { p_status_->compute_moves_done = true; }
+  void after_move_points() { p_status_->move_points_done = true; }
+  void after_rebuild_restricted_delaunay() { p_status_->rebuild_restricted_delaunay_done = true; }
+  
+  void end_of_iteration(int iteration_number)
+  {
+    p_status_->iteration_done = iteration_number;
+    p_status_->compute_moves_done = false;
+    p_status_->move_points_done = false;
+    p_status_->rebuild_restricted_delaunay_done = false;
+  }
+  
+private:
+  Global_optimization_status* p_status_;
+};
+
+
+template <typename Domain>
+class Global_optimization_function
+  : public Optimization_function_base< Domain >
+{
+  typedef Global_visitor                       Visitor;
+  typedef Optimization_function_base< Domain > Base;  
+  
+public:
+  /// Constructor
+  Global_optimization_function(C3t3& c3t3, Domain* d)
+    : Base(c3t3,d)
+    , status_() {}
+  
+  /// Destructor
+  virtual ~Global_optimization_function() {}
+
+  // Logs
+  virtual QString status(double) const
+  {
+    QString res = QString("Iteration %1<br /><br />"
+                          "Compute moves: %2<br />")
+    .arg(status_.iteration_done + 2)
+    .arg(translate_bool(status_.compute_moves_done));
+    
+    if ( status_.compute_moves_done )
+    {
+      res += QString("Move points: %1<br />")
+      .arg(translate_bool(status_.move_points_done));
+    }
+    
+    if ( status_.move_points_done )
+    {
+      res += QString("Rebuild restricted Delaunay: %1")
+      .arg(translate_bool(status_.rebuild_restricted_delaunay_done));
+    }
+    
+    return res;
+  }
+  
+protected:
+  Global_optimization_status status_;
+};
+
+
+// -----------------------------------
+// Odt
+// -----------------------------------
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_ODT
+
+struct Odt_parameters
+{
+  double time_limit;
+  double convergence_ratio;
+  double freeze_ratio;
+  bool do_freeze;
+  int max_iteration_nb;
+  
+  QStringList log() const
+  {
+    return QStringList()
+      << QString("time limit: %1").arg(time_limit)
+      << QString("convergence ratio: %1").arg(convergence_ratio)
+      << QString("freeze ratio: %1").arg(freeze_ratio)
+      << QString("do freeze: %1").arg(do_freeze)
+      << QString("maximum iterations: %1").arg(max_iteration_nb);
+  }
+};
+
+
+/**
+ * @class Odt_function
+ * Partial specialization of class Optimization_function for Odt
+ * Runs odt global optimization
+ */
+template <typename Domain>
+class Optimization_function < Domain, Odt_parameters >
+  : public Global_optimization_function< Domain >
+{
+  // Private types
+  typedef C3t3::Triangulation  Tr;
+  typedef CGAL::Mesh_3::Mesh_sizing_field<Tr>    Sizing;
+  typedef CGAL::Mesh_3::Odt_move<C3t3,Sizing>    Move;
+  typedef Global_visitor                         Visitor;
+  
+  typedef typename CGAL::Mesh_3::Mesh_global_optimizer<C3t3,Domain,Move,Visitor> Odt_optimizer;
+
+  typedef Global_optimization_function< Domain > Base;  
+
+public:
+  /// Constructor
+  Optimization_function(C3t3& c3t3, Domain* d, const Odt_parameters& p)
+    : Base(c3t3,d)
+    , odt_(NULL)
+    , p_(p) {}
+  
+  /// Destructor
+  virtual ~Optimization_function() { delete odt_; }
+
+  /// Stops process (set time limit to 1ms)
+  virtual void stop() { odt_->set_time_limit(0.001); }
+  
+  /// Log strings
+  virtual QString name() const { return QString("Odt"); }
+  virtual QStringList parameters_log() const { return p_.log(); }
+  
+protected:
+  /// Launch odt optimization
+  /// The content of this method is taken from CGAL::odt_optimize_mesh_3()
+  virtual CGAL::Mesh_optimization_return_code 
+  operator()(C3t3& c3t3, const Domain& domain)
+  {
+    if ( NULL != odt_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+
+    // Create optimizer
+    odt_ = new Odt_optimizer(c3t3, domain, p_.freeze_ratio, p_.do_freeze, p_.convergence_ratio);
+    if ( NULL == odt_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Set max time
+    odt_->set_time_limit(p_.time_limit);
+    
+    // 1000 iteration max to avoid infinite loops
+    int max_iteration_nb = ( 0 == p_.max_iteration_nb ) ? 1000
+                                                       : p_.max_iteration_nb;
+      
+    // Launch optimization
+    return (*odt_)(max_iteration_nb, Visitor(&(this->status_)));
+  }
+  
+private:
+  Odt_optimizer* odt_;
+  Odt_parameters p_;
+};
+
+
+/**
+ * Global function cgal_code_odt_mesh_3
+ */
+Optimizer_thread*
+cgal_code_odt_mesh_3(Scene_c3t3_item& c3t3_item,
+                     const double time_limit,
+                     const double convergence_ratio,
+                     const double freeze_ratio,
+                     const int max_iteration_number,
+                     const bool create_new_item)
+{
+  Odt_parameters p;
+  p.time_limit = time_limit;
+  p.convergence_ratio = convergence_ratio;
+  p.freeze_ratio = freeze_ratio;
+  p.max_iteration_nb = max_iteration_number;
+  
+  return cgal_code_optimization(c3t3_item, p, create_new_item);
+}
+#endif
+
+
+
+// -----------------------------------
+// Lloyd
+// -----------------------------------
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_LLOYD
+
+struct Lloyd_parameters
+{
+  double time_limit;
+  double convergence_ratio;
+  double freeze_ratio;
+  bool do_freeze;
+  int max_iteration_nb;
+  
+  QStringList log() const
+  {
+    return QStringList()
+      << QString("time limit: %1").arg(time_limit)
+      << QString("convergence ratio: %1").arg(convergence_ratio)
+      << QString("freeze ratio: %1").arg(freeze_ratio)
+      << QString("do freeze: %1").arg(do_freeze)
+      << QString("maximum iterations: %1").arg(max_iteration_nb);
+  }
+};
+
+
+/**
+ * @class Lloyd_function
+ * Partial specialization of class Optimization_function for Lloyd
+ * Runs lloyd global optimization
+ */
+template <typename Domain>
+class Optimization_function < Domain, Lloyd_parameters >
+  : public Global_optimization_function< Domain >
+{
+  // Private types
+  typedef C3t3::Triangulation  Tr;
+  typedef CGAL::Mesh_3::Mesh_sizing_field<Tr>    Sizing;
+  typedef CGAL::Mesh_3::Lloyd_move<C3t3,Sizing>  Move;
+  typedef Global_visitor                         Visitor;
+  
+  typedef typename CGAL::Mesh_3::Mesh_global_optimizer<C3t3,Domain,Move,Visitor> Lloyd_optimizer;
+  
+  typedef Global_optimization_function< Domain > Base;
+  
+public:
+  /// Constructor
+  Optimization_function(C3t3& c3t3, Domain* d, const Lloyd_parameters& p)
+    : Base(c3t3,d)
+    , lloyd_(NULL)
+    , p_(p) {}
+  
+  /// Destructor
+  virtual ~Optimization_function() { delete lloyd_; }
+
+  /// Stops process (set time limit to 1ms)
+  virtual void stop() { lloyd_->set_time_limit(0.001); }
+  
+  /// Log strings
+  virtual QString name() const { return QString("Lloyd"); }
+  virtual QStringList parameters_log() const { return p_.log(); }
+  
+protected:
+  /// Launch lloyd optimization
+  /// The content of this method is taken from CGAL::lloyd_optimize_mesh_3()
+  virtual CGAL::Mesh_optimization_return_code 
+  operator()(C3t3& c3t3, const Domain& domain)
+  {
+    if ( NULL != lloyd_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Create optimizer
+    lloyd_ = new Lloyd_optimizer(c3t3, domain, p_.freeze_ratio, p_.do_freeze, p_.convergence_ratio);
+    if ( NULL == lloyd_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Set max time
+    lloyd_->set_time_limit(p_.time_limit);
+    
+    // 1000 iteration max to avoid infinite loops
+    int max_iteration_nb = ( 0 == p_.max_iteration_nb ) ? 1000
+                                                        : p_.max_iteration_nb;
+    
+    // Launch optimization
+    return (*lloyd_)(max_iteration_nb, Visitor(&(this->status_)));
+  }
+  
+private:
+  Lloyd_optimizer* lloyd_;
+  Lloyd_parameters p_;
+};
+
+
+/**
+ * Global function cgal_code_lloyd_mesh_3
+ */
+Optimizer_thread*
+cgal_code_lloyd_mesh_3(Scene_c3t3_item& c3t3_item,
+                       const double time_limit,
+                       const double convergence_ratio,
+                       const double freeze_ratio,
+                       const int max_iteration_number,
+                       const bool create_new_item)
+{
+  Lloyd_parameters p;
+  p.time_limit = time_limit;
+  p.convergence_ratio = convergence_ratio;
+  p.freeze_ratio = freeze_ratio;
+  p.max_iteration_nb = max_iteration_number;
+
+  return cgal_code_optimization(c3t3_item, p, create_new_item);
+}
+#endif
+
+
+
+// -----------------------------------
+// Perturbation
+// -----------------------------------
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+
+struct Perturb_parameters
+{
+  double time_limit;
+  double sliver_bound;
+  
+  QStringList log() const
+  {
+    return QStringList()
+      << QString("time limit: %1").arg(time_limit)
+      << QString("sliver bound: %1").arg(sliver_bound);
+  }
+};
+
+
+struct Perturb_status
+{
+  double bound_reached;
+  double vertices_left;
+
+  Perturb_status() : bound_reached(0), vertices_left(0) {}
+};
+
+struct Perturb_visitor
+{
+  Perturb_visitor(Perturb_status* status) : p_status_(status) {}
+  Perturb_visitor(const Perturb_visitor& rhs) : p_status_(rhs.p_status_) {}
+  
+  void bound_reached(const double bound) { p_status_->bound_reached = bound; }
+  void end_of_perturbation_iteration(std::size_t v) { p_status_->vertices_left = v;}
+  
+private:
+  Perturb_status* p_status_;
+};
+
+
+/**
+ * @class Perturb_function
+ * Partial specialization of class Optimization_function for perturbation
+ * Runs sliver perturbation
+ */
+template <typename Domain>
+class Optimization_function < Domain, Perturb_parameters >
+  : public Optimization_function_base< Domain >
+{
+  // Private types
+  typedef C3t3::Triangulation                                     Tr;
+  typedef CGAL::Mesh_3::Min_dihedral_angle_criterion<Tr>          Sc;
+  typedef Perturb_visitor                                         Visitor;
+  
+  typedef CGAL::Mesh_3::Sliver_perturber<C3t3,Domain,Sc,Visitor>  Perturber;
+  
+  typedef Optimization_function_base< Domain > Base;
+  
+public:
+  /// Constructor
+  Optimization_function(C3t3& c3t3, Domain* d, const Perturb_parameters& p)
+    : Base(c3t3,d)
+    , perturb_(NULL)
+    , p_(p)
+    , criterion_(p.sliver_bound, c3t3.triangulation()) {}
+  
+  /// Destructor
+  ~Optimization_function() { delete perturb_; }
+
+  /// Stops process (set time limit to 1ms)
+  virtual void stop() { perturb_->set_time_limit(0.001); }
+  
+  /// Log strings
+  virtual QString name() const { return QString("Perturb"); }
+  virtual QStringList parameters_log() const { return p_.log(); }
+  virtual QString status(double) const
+  {
+    return QString("Dihedral angle reached: %1<br /><br />"
+                   "Vertices left in queue (to reach next bound): %2")
+    .arg(status_.bound_reached)
+    .arg(status_.vertices_left);
+  }
+  
+protected:
+  /// Launch sliver perturbation
+  /// The content of this method is taken from CGAL::perturb_mesh_3()
+  virtual CGAL::Mesh_optimization_return_code  
+  operator()(C3t3& c3t3, const Domain& domain)
+  {
+    if ( NULL != perturb_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+
+    typedef CGAL::Mesh_3::Sq_radius_perturbation<C3t3,Domain,Sc>      Sq_radius;
+    typedef CGAL::Mesh_3::Volume_perturbation<C3t3,Domain,Sc>         Volume;
+    typedef CGAL::Mesh_3::Dihedral_angle_perturbation<C3t3,Domain,Sc> Dihedral_angle;
+    typedef CGAL::Mesh_3::Li_random_perturbation<C3t3,Domain,Sc>      Li_random;
+    
+    // Build perturber
+    perturb_ = new Perturber(c3t3, domain, criterion_);
+    if ( NULL == perturb_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Add perturbations
+    perturb_->add_perturbation(new Sq_radius(40,0.05));
+    perturb_->add_perturbation(new Volume(40,0.05));
+    perturb_->add_perturbation(new Dihedral_angle(40,0.05));
+    perturb_->add_perturbation(new Li_random(100,0.15));
+    
+    // Set max time
+    perturb_->set_time_limit(p_.time_limit);
+    
+    // Set sliver bound (0 means no sliver bound)
+    if ( 0 == p_.sliver_bound ) { p_.sliver_bound = Sc::max_value; }
+    
+    // Launch perturber
+    return (*perturb_)(Visitor(&status_));
+  }
+
+private:
+  Perturber* perturb_;
+  Perturb_parameters p_;
+  Perturb_status status_;
+  Sc criterion_;
+};
+
+
+/**
+ * Global function cgal_code_perturb_mesh_3
+ */
+Optimizer_thread*
+cgal_code_perturb_mesh_3(Scene_c3t3_item& c3t3_item,
+                         const double time_limit,
+                         const double sliver_bound,
+                         const bool create_new_item)
+{
+  Perturb_parameters p;
+  p.sliver_bound = sliver_bound;
+  p.time_limit = time_limit;
+  
+  return cgal_code_optimization(c3t3_item, p, create_new_item);
+}
+#endif
+
+// -----------------------------------
+// Exudation
+// -----------------------------------
+
+#ifndef CGAL_MESH_3_DEMO_DISABLE_EXUDER
+
+struct Exude_parameters
+{
+  double time_limit;
+  double sliver_bound;
+  
+  QStringList log() const
+  {
+    return QStringList()
+      << QString("time limit: %1").arg(time_limit)
+      << QString("sliver bound: %1").arg(sliver_bound);
+  }
+};
+
+
+struct Exude_status
+{
+  double cells_left_in_queue;
+  double vertices_pumped;
+  
+  Exude_status() : cells_left_in_queue(0), vertices_pumped(0) {}
+};
+
+struct Exude_visitor
+{
+  Exude_visitor(Exude_status* status) : p_status_(status) {}
+  Exude_visitor(const Exude_visitor& rhs) : p_status_(rhs.p_status_) {}
+  
+  void after_cell_pumped(std::size_t n) { p_status_->cells_left_in_queue = n; }
+  
+private:
+  Exude_status* p_status_;
+};
+
+
+/**
+ * @class Exude_function
+ * Partial specialization of class Optimization_function for exudation
+ * Runs sliver exudation
+ */
+template <typename Domain>
+class Optimization_function < Domain, Exude_parameters >
+  : public Optimization_function_base< Domain >
+{
+  // Private types
+  typedef C3t3::Triangulation                               Tr;
+  typedef CGAL::Mesh_3::Min_dihedral_angle_criterion<Tr>    Sc;
+  typedef Exude_visitor                                     Visitor;
+  typedef CGAL::Mesh_3::Slivers_exuder<C3t3,Sc,Visitor>     Exuder;
+  
+  typedef Optimization_function_base< Domain > Base;
+  
+public:
+  // Constructor
+  Optimization_function(C3t3& c3t3, Domain* d, const Exude_parameters& p)
+    : Base(c3t3,d)
+    , exude_(NULL)
+    , p_(p)
+    , criterion_(p.sliver_bound, c3t3.triangulation()) {}
+  
+  /// Destructor
+  ~Optimization_function() { delete exude_; }
+  
+  /// Stops process (set time limit to 1ms)
+  virtual void stop() { exude_->set_time_limit(0.001); }
+  
+  // Log strings
+  virtual QString name() const { return QString("Exude"); }
+  virtual QStringList parameters_log() const { return p_.log(); }
+  virtual QString status(double) const
+  {
+    return QString("Cells left in queue: %1<br />")
+                   //"Vertices pumped: %2")
+      .arg(status_.cells_left_in_queue);
+      //.arg(status_.vertices_pumped);
+  }
+  
+protected:
+  /// Launch sliver exudation
+  /// The content of this method is taken from CGAL::exude_mesh_3()
+  virtual CGAL::Mesh_optimization_return_code  
+  operator()(C3t3& c3t3, const Domain&)
+  {
+    if ( NULL != exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Create exuder
+    exude_ = new Exuder(c3t3, criterion_);
+    if ( NULL == exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
+    
+    // Set time_limit
+    exude_->set_time_limit(p_.time_limit);
+    
+    // Launch exudation
+    return (*exude_)(Visitor(&status_));
+  }
+  
+private:
+  Exuder* exude_;
+  Exude_parameters p_;
+  Exude_status status_;
+  Sc criterion_;
+};
+
+
+/**
+ * Global function cgal_code_exude_mesh_3
+ */
+Optimizer_thread*
+cgal_code_exude_mesh_3(Scene_c3t3_item& c3t3_item,
+                       const double time_limit,
+                       const double sliver_bound,
+                       const bool create_new_item)
+{
+  // Create result item
+  Scene_c3t3_item* p_result_item = create_new_item ? 
+    new Scene_c3t3_item(c3t3_item.c3t3()) : &c3t3_item;
+
+  if ( NULL == p_result_item )
+  {
+    return NULL;
+  }
+  
+  // Exudation
+  Exude_parameters p;
+  p.sliver_bound = sliver_bound;
+  p.time_limit = time_limit;
+
+  // Create thread
+  typedef Optimization_function<int,Exude_parameters> Opt_function;
+  Opt_function* p_opt_function = new Opt_function(p_result_item->c3t3(), NULL, p);
+  
+  return new Optimizer_thread(p_opt_function, p_result_item);
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp
new file mode 100644
index 0000000..1ec3ef1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp
@@ -0,0 +1,79 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include "config_mesh_3.h"
+
+#include <QTime>
+#include <QTimer>
+#include "Optimizer_thread.h"
+#include "Scene_c3t3_item.h"
+
+
+Optimizer_thread::
+Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item)
+  : f_(f)
+  , item_(item)
+  , rc_()
+  , time_(0)
+  , timer_(new QTimer(this))
+  , timer_period_(1)
+{
+  connect(timer_, SIGNAL(timeout()),
+          this,   SLOT(emit_status()));
+  timer_->start(static_cast<int>(timer_period_*1000));  
+}
+
+
+Optimizer_thread::~Optimizer_thread()
+{
+  delete f_;
+}
+
+
+void
+Optimizer_thread::
+run()
+{
+  QTime timer;
+  timer.start();
+  //SEGFAULT
+  rc_ = f_->launch();
+  time_ = double(timer.elapsed()) / 1000;
+  Q_EMIT done(this);
+}
+
+
+void
+Optimizer_thread::
+stop()
+{
+  f_->stop();
+}
+
+void
+Optimizer_thread::
+emit_status()
+{
+  Q_EMIT (status_report(f_->status(timer_period_)));
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h
new file mode 100644
index 0000000..21a3f95
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h
@@ -0,0 +1,101 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef DEMO_MESH_3_OPTIMIZER_THREAD_H
+#define DEMO_MESH_3_OPTIMIZER_THREAD_H
+
+#include <QThread>
+#include <QObject>
+#include <QString>
+#include <QStringList>
+#include <QTimer>
+
+#include <CGAL/Mesh_optimization_return_code.h>
+
+class Scene_c3t3_item;
+
+class Optimization_function_interface
+{
+public:
+  virtual ~Optimization_function_interface() {}
+  
+  // Launch
+  virtual CGAL::Mesh_optimization_return_code launch() = 0;
+  
+  // Stop
+  virtual void stop() = 0;
+  
+  // Logs
+  virtual QString name() const = 0;
+  virtual QStringList parameters_log() const = 0;
+  virtual QString status(double time_period) const = 0;
+};
+
+
+class Optimizer_thread : public QThread
+{
+  Q_OBJECT
+public:
+  Optimizer_thread(Optimization_function_interface* f, Scene_c3t3_item* item);
+  virtual ~Optimizer_thread();
+  
+  // Scene item
+  Scene_c3t3_item* item() const { return item_; }
+  
+  // Infos about optimization
+  CGAL::Mesh_optimization_return_code return_code() const { return rc_; }
+  double time() const { return time_; }
+  
+  // Logs
+  QString optimizer_name() const { return f_->name(); }
+  QStringList parameters_log() const { return f_->parameters_log(); }
+  
+public Q_SLOTS:
+  // Stop
+  void stop();
+  
+private Q_SLOTS:
+  // emit signal status report
+  void emit_status();
+  
+Q_SIGNALS:
+  // Emitted at the end of the process
+  void done(Optimizer_thread*);
+  // Informs about status of the process
+  void status_report(QString);
+  
+protected:
+  // Overload of QThread function
+  virtual void run();
+  
+private:
+  Optimization_function_interface* f_;
+  Scene_c3t3_item* item_;
+  CGAL::Mesh_optimization_return_code rc_;
+  double time_; // in seconds
+  QTimer* timer_;
+  double timer_period_;
+};
+
+#endif // DEMO_MESH_3_OPTIMIZER_THREAD_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h
new file mode 100644
index 0000000..2663405
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h
@@ -0,0 +1,266 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jane Tournois
+//
+//******************************************************************************
+// File Description :
+// class Labeled_mesh_domain_3. See class description.
+//******************************************************************************
+
+#ifndef CGAL_POLYHEDRON_DEMO_LABELED_MESH_DOMAIN_3_H
+#define CGAL_POLYHEDRON_DEMO_LABELED_MESH_DOMAIN_3_H
+
+#include <CGAL/Labeled_mesh_domain_3.h>
+#include <CGAL/Random.h>
+#include "Image_type.h"
+
+#include <boost/type_traits.hpp>
+
+namespace CGAL {
+
+/**
+ * \class Polyhedron_demo_labeled_mesh_domain_3
+ * LabeledDomain must be a Labeled_mesh_domain_3
+ */
+template<class LabeledDomain, class Image = CGAL::Image_3>
+class Polyhedron_demo_labeled_mesh_domain_3
+  : public LabeledDomain
+{
+public:
+  typedef LabeledDomain Base;
+  typedef Polyhedron_demo_labeled_mesh_domain_3 Domain;
+
+  //-------------------------------------------------------
+  // Index Types
+  //-------------------------------------------------------
+  /// Type of indexes for cells of the input complex
+  typedef typename Base::Subdomain_index       Subdomain_index;
+  typedef boost::optional<Subdomain_index>     Subdomain;
+
+  /// Type of indexes for surface patch of the input complex
+  typedef int                                  Surface_patch_index;
+  typedef boost::optional<Surface_patch_index> Surface_patch;
+
+  typedef typename Base::Point_3   Point_3;
+  typedef typename Base::Segment_3 Segment_3;
+
+  /// Type of indexes to characterize the lowest dimensional face of the input
+  /// complex on which a vertex lie
+  typedef int Index;
+  typedef CGAL::cpp11::tuple<Point_3, Index, int> Intersection;
+
+  //constructors
+  Polyhedron_demo_labeled_mesh_domain_3(
+    const typename Base::Fct& f,
+    const typename Base::Bbox_3& bbox,
+    const typename Base::FT& error_bound = Base::FT(1e-3),
+    CGAL::Random* p_rng = NULL)
+    : Base(f, bbox, error_bound, p_rng)
+  {}
+
+  Polyhedron_demo_labeled_mesh_domain_3(
+    const Image& img,
+    const typename Base::FT& error_bound = Base::FT(1e-3),
+    CGAL::Random* p_rng = NULL)
+    : Base(img, error_bound, p_rng)
+  {}
+
+  /**
+   * Returns the index to be stored in a vertex lying on the surface identified
+   * by \c index.
+   */
+  Index index_from_surface_patch_index(
+    const Surface_patch_index& index) const
+  {
+    return Index(index);
+  }
+
+  Index index_from_surface_patch_index(
+    const typename Base::Surface_patch_index& index_pair) const
+  {
+    return Index(index_pair.first * 1000 + index_pair.second);
+  }
+
+  Index index_from_surface_patch_index(
+    const typename Base::Index& index) const
+  {
+    return index_from_surface_patch_index(surface_patch_index(index));
+  }
+
+  Index index_from_index(
+    const typename Base::Index& index) const
+  {
+    if (const typename Base::Surface_patch_index* index_pair =
+      boost::get<typename Base::Surface_patch_index>(&index))
+        return Index(index_pair->first * 1000 + index_pair->second);
+
+    else if (const typename Base::Subdomain_index* sub_index =
+      boost::get<typename Base::Subdomain_index>(&index))
+        return Index(*sub_index);
+
+    return Index(-1);//~error
+  }
+
+  /**
+   * Returns the index to be stored in a vertex lying in the subdomain
+   * identified by \c index.
+   */
+  Index index_from_subdomain_index(const Subdomain_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the \c Surface_patch_index of the surface patch
+   * where lies a vertex with dimension 2 and index \c index.
+   */
+  Surface_patch_index
+    surface_patch_index(const Index& index) const
+  {
+    return index;
+  }
+
+  Surface_patch_index
+    surface_patch_index(const typename Base::Index& index) const
+  {
+    typename Base::Surface_patch_index index_pair =
+      boost::get<typename Base::Surface_patch_index>(index);
+    return Surface_patch_index(index_pair.first * 1000 + index_pair.second);
+  }
+
+  typename Base::Surface_patch_index
+    surface_patch_index_base(const Index& index) const
+  {
+    return typename Base::Surface_patch_index(index / 1000,
+                                              index % 1000);
+  }
+
+  /**
+   * Returns the index of the subdomain containing a vertex
+   *  with dimension 3 and index \c index.
+   */
+  Subdomain_index subdomain_index(const Index& index) const
+  { return index; }
+  
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+  
+  Index index_from_surface_index(const Surface_index& index) const
+  { return index_from_surface_patch_index(index); }
+  
+  Surface_index surface_index(const Index& index) const
+  { return surface_patch_index(index); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+
+  struct Construct_initial_points
+  {
+    Construct_initial_points(const Domain& domain)
+      : r_domain_(domain) {}
+
+    template<class OutputIterator>
+    OutputIterator operator()(OutputIterator pts, const int n = 12) const
+    {
+      typename Base::Construct_initial_points cip =
+        r_domain_.Base::construct_initial_points_object();
+
+      std::vector<std::pair<Point_3, typename Base::Index> > initial_points;
+      cip(std::back_inserter(initial_points), n);
+
+      for (std::size_t i = 0; i < initial_points.size(); ++i)
+      {
+        std::pair<Point_3, typename Base::Index> p = initial_points[i];
+        *pts++ = std::make_pair(p.first,
+                                r_domain_.surface_patch_index(p.second));
+      }
+      return pts;
+    }
+
+  private:
+    const Domain& r_domain_;
+  };
+
+  /// Returns Construct_initial_points object
+  Construct_initial_points construct_initial_points_object() const
+  {
+    return Construct_initial_points(*this);
+  }
+
+
+  struct Construct_intersection
+  {
+    Construct_intersection(const Domain& domain)
+      : r_domain_(domain) {}
+
+    template<typename Query>
+    Intersection operator()(const Query& q) const
+    {
+      typename Base::Construct_intersection
+        ci = r_domain_.Base::construct_intersection_object();
+      typename Base::Intersection bi = ci(q);
+
+      return CGAL::cpp11::make_tuple(
+        CGAL::cpp11::get<0>(bi),
+        r_domain_.index_from_index(CGAL::cpp11::get<1>(bi)),
+        CGAL::cpp11::get<2>(bi));
+    }
+
+  private:
+    const Domain& r_domain_;
+  };
+
+  /// Returns Construct_intersection object
+  Construct_intersection construct_intersection_object() const
+  {
+    return Construct_intersection(*this);
+  }
+
+
+private:
+  ///// Returns Surface_patch_index from \c i and \c j
+  //typename Base::Surface_patch_index
+  //  make_surface_index(const Subdomain_index i,
+  //                     const Subdomain_index j) const
+  //{
+  //  if ( i < j )
+  //    return typename Base::Surface_patch_index(i, j);
+  //  else
+  //    return typename Base::Surface_patch_index(j, i);
+  //}
+
+  Surface_patch_index
+    make_surface_index(const Subdomain_index i,
+                       const Subdomain_index j) const
+  {
+    if (i < j)
+      return (i * 1000 + j);
+    else
+      return (j * 1000 + i);
+  }
+
+};  // end class Labeled_mesh_domain_3
+
+}  // end namespace CGAL
+
+#endif // CGAL_POLYHEDRON_DEMO_LABELED_MESH_DOMAIN_3_H
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp
new file mode 100644
index 0000000..9e5e1f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp
@@ -0,0 +1,28 @@
+#include "Raw_image_dialog.h"
+
+Raw_image_dialog::Raw_image_dialog(QWidget* parent)
+  : QDialog(parent) 
+{
+  setupUi(this);
+}
+
+void Raw_image_dialog::update_image_size() {
+  label_image_size->setNum((int)image_word_size() *
+			   dim_x->value() *
+			   dim_y->value() *
+			   dim_z->value());
+}
+
+unsigned int Raw_image_dialog::image_word_size() const {
+  if(short_bt->isChecked())
+    return 2;
+  if(int_bt->isChecked())
+    return 4;
+  else if(float_bt->isChecked())
+    return 4;
+  else if(double_bt->isChecked())
+    return 8;
+  else
+    return 1;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h
new file mode 100644
index 0000000..82551e0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h
@@ -0,0 +1,19 @@
+#ifndef RAW_IMAGE_DIALOG_H
+#define RAW_IMAGE_DIALOG_H
+
+#include "ui_raw_image.h"
+
+class Raw_image_dialog : public QDialog, public Ui::Raw_image_dialog 
+{
+  Q_OBJECT
+
+public:
+  Raw_image_dialog(QWidget* parent = 0);
+
+  unsigned int image_word_size() const;
+
+private Q_SLOTS:
+  void update_image_size();
+};
+
+#endif // RAW_IMAGE_DIALOG
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Smoother_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/ui_files/Smoother_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h
new file mode 100644
index 0000000..29dbb60
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h
@@ -0,0 +1,458 @@
+#ifndef CGAL_VOLUME_PLANE_H
+#define CGAL_VOLUME_PLANE_H
+
+#include <CGAL/Three/Scene_item.h>
+
+#include <vector>
+#include <cassert>
+
+#include <QDebug>
+#include <QGLViewer/qglviewer.h>
+
+#include "Volume_plane_interface.h"
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Three/Viewer_interface.h>
+#include <CGAL/Qt/debug.h>
+
+using namespace CGAL::Three;
+
+#if !defined(NDEBUG)
+inline
+void printGlError(unsigned int line) {
+ CGAL::Qt::opengl_check_errors(line);
+}
+#else
+inline
+void printGlError(unsigned int) {
+}
+#endif
+
+template<int Dim>
+class Length_constraint : public qglviewer::WorldConstraint {
+public:
+  Length_constraint(double max_) : max_(max_) { }
+
+  void constrainTranslation(qglviewer::Vec& t, qglviewer::Frame* const frame) {
+    WorldConstraint::constrainTranslation(t, frame);
+    qglviewer::Vec pos = frame->position();
+    double start = pos[Dim];
+    double end = t[Dim];
+    start += end;
+
+    if(start > max_ || (start < 0)) {
+      t[Dim] = 0.0;
+    }
+  }
+
+private:
+  double max_;
+};
+
+struct x_tag {};
+struct y_tag {};
+struct z_tag {};
+
+template<typename Tag>
+class Volume_plane : public Volume_plane_interface, public Tag {
+public:
+ Volume_plane();
+ void setData(unsigned int adim, unsigned int bdim, unsigned int cdim,
+                 float xscale, float yscale, float zscale, std::vector<float>& colors);
+
+  virtual ~Volume_plane();
+
+  Volume_plane* clone() const { return NULL; }
+
+  virtual RenderingMode renderingMode() const { return Flat; }
+  bool supportsRenderingMode(RenderingMode m) const { return m == Flat; }
+  
+  QString toolTip() const { return "Plane through a volume"; }
+  QString name() const { return name(*this); }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  bool manipulatable() const { return true; }
+
+  unsigned int cube() {return currentCube; }
+
+  void draw(Viewer_interface* viewer)const;
+
+  unsigned int aDim() const { return adim_; }
+  unsigned int bDim() const { return bdim_; }
+  unsigned int cDim() const { return cdim_; }
+
+  qglviewer::Vec translationVector() const { return translationVector(*this); }
+
+  unsigned int getCurrentCube() const { return currentCube; }
+
+  // uses a public init function to make enable construction in
+  // threads without gl-context
+  void init();
+
+private:
+  static const char* vertexShader_source;
+
+  static const char* fragmentShader_source;
+
+  static const char* vertexShader_bordures_source;
+
+  static const char* fragmentShader_bordures_source;
+
+
+  qglviewer::Vec translationVector(x_tag) const {
+    return qglviewer::Vec(xscale_, 0.0, 0.0);
+  }
+  qglviewer::Vec translationVector(y_tag) const {
+    return qglviewer::Vec(0.0, yscale_, 0.0);
+  }
+  qglviewer::Vec translationVector(z_tag) const {
+    return qglviewer::Vec(0.0, 0.0, zscale_);
+  }
+
+  void initShaders();
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j) {
+    buildVertex(out, i, j, *this);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, x_tag) {
+    out.push_back(0.0f);
+    out.push_back(i * yscale_);
+    out.push_back(j * zscale_);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, y_tag) {
+    out.push_back(i * xscale_);
+    out.push_back(0.0f);
+    out.push_back(j * zscale_);
+  }
+
+  void buildVertex(std::vector<float>& out, unsigned int i, unsigned int j, z_tag) {
+    out.push_back(i * xscale_);
+    out.push_back(j * yscale_);
+    out.push_back(0.0f);
+  }
+
+  unsigned int adim_, bdim_, cdim_;
+  double xscale_, yscale_, zscale_;
+  mutable int currentCube;
+
+  mutable QOpenGLBuffer vVBO;
+  mutable QOpenGLBuffer cbuffer;
+  mutable QOpenGLBuffer rectBuffer;
+  mutable std::vector<float> v_rec;
+  mutable QOpenGLShaderProgram program_bordures;
+  mutable QOpenGLShaderProgram program;
+  mutable std::vector< std::pair<QOpenGLBuffer, unsigned int> > ebos;
+  std::vector< float > colors_;
+
+  QString name(x_tag) const { return tr("X Slice for %1").arg(name_); }
+  QString name(y_tag) const { return tr("Y Slice for %2").arg(name_); }
+  QString name(z_tag) const { return tr("Z Slice for %2").arg(name_); }
+
+  void drawRectangle(x_tag) const {
+
+
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((adim_ - 1) * yscale_); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((adim_ - 1) * yscale_); v_rec.push_back((bdim_ - 1) * zscale_);
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * zscale_);
+
+  }
+
+  void drawRectangle(y_tag) const {
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_);v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_);v_rec.push_back(0.0f);v_rec.push_back( (bdim_ - 1) * zscale_);
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * zscale_);
+  }
+
+  void drawRectangle(z_tag) const {
+      v_rec.push_back(0.0f); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_); v_rec.push_back(0.0f); v_rec.push_back(0.0f);
+      v_rec.push_back((adim_ - 1) * xscale_); v_rec.push_back((bdim_ - 1) * yscale_); v_rec.push_back(0.0f);
+      v_rec.push_back(0.0f); v_rec.push_back((bdim_ - 1) * yscale_); v_rec.push_back(0.0f);
+  }
+
+  qglviewer::Constraint* setConstraint(x_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<0>(cdim_ * xscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(1.0f, 0.0f, 0.0f));
+    return c;
+  }
+  
+  qglviewer::Constraint* setConstraint(y_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<1>(cdim_ * yscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 1.0f, 0.0f));
+    return c;
+  }
+
+  qglviewer::Constraint* setConstraint(z_tag) {
+    qglviewer::AxisPlaneConstraint* c = new Length_constraint<2>(cdim_ * zscale_);
+    c->setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+    c->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0f, 0.0f, 1.0f));
+    return c;
+  }
+
+  void updateCurrentCube() const { currentCube = getTranslation(); }
+
+  GLdouble getTranslation() const { return getTranslation(*this); }
+  GLdouble getTranslation(x_tag) const { return mFrame_->matrix()[12] / xscale_; }
+  GLdouble getTranslation(y_tag) const { return mFrame_->matrix()[13] / yscale_; }
+  GLdouble getTranslation(z_tag) const { return mFrame_->matrix()[14] / zscale_; }
+
+};
+
+template<typename T>
+const char* Volume_plane<T>::vertexShader_source =
+      "#version 120 \n"
+      "attribute highp vec4 vertex; \n"
+      "attribute highp float color; \n"
+      "uniform highp mat4 mvp_matrix; \n"
+      "uniform highp mat4 f_matrix; \n"
+      "varying highp vec4 fullColor; \n"
+      "void main() \n"
+      "{ gl_Position = mvp_matrix * f_matrix * vertex; \n"
+      " fullColor = vec4(color, color, color, 1.0); } \n";
+
+template<typename T>
+const char* Volume_plane<T>::fragmentShader_source =
+      "#version 120\n"
+      "varying highp vec4 fullColor; \n"
+      "void main() { gl_FragColor = fullColor; } \n";
+
+template<typename T>
+const char* Volume_plane<T>::vertexShader_bordures_source =
+      "#version 120 \n"
+      "attribute highp vec4 vertex; \n"
+      "uniform highp vec4 color; \n"
+      "uniform highp mat4 mvp_matrix; \n"
+      "uniform highp mat4 f_matrix; \n"
+      "varying vec4 fullColor; \n"
+      "void main() \n"
+      "{ gl_Position = mvp_matrix * f_matrix * vertex; \n"
+      " fullColor = color; } \n";
+
+template<typename T>
+const char* Volume_plane<T>::fragmentShader_bordures_source =
+      "#version 120\n"
+      "varying highp vec4 fullColor; \n"
+      "void main() { gl_FragColor = fullColor; } \n";
+
+
+
+template<typename T>
+Volume_plane<T>::Volume_plane()
+  : Volume_plane_interface(new qglviewer::ManipulatedFrame)
+ {
+ }
+template<typename T>
+void Volume_plane<T>::setData(unsigned int adim, unsigned int bdim, unsigned int cdim, float xscale, float yscale, float zscale, std::vector<float> &colors)
+{
+ adim_ = adim;
+ bdim_ = bdim;
+ cdim_= cdim;
+ xscale_ = xscale;
+ yscale_ =yscale;
+ zscale_ = zscale;
+ currentCube = 0;
+ colors_.swap(colors);
+ mFrame_->setConstraint(setConstraint(*this));
+}
+template<typename T>
+Volume_plane<T>::~Volume_plane() {
+  for(std::vector< std::pair< QOpenGLBuffer, unsigned int> >::iterator it = ebos.begin();
+      it != ebos.end(); ++it) { 
+      it->first.destroy();
+  }
+  program.release();
+}
+
+template<typename T>
+void Volume_plane<T>::draw(Viewer_interface *viewer) const {
+  updateCurrentCube();
+
+
+
+  GLdouble mat[16];
+  viewer->camera()->getModelViewProjectionMatrix(mat);
+  QMatrix4x4 mvp;
+  QMatrix4x4 f;
+  for(int i=0; i<16; i++)
+  {
+      mvp.data()[i] = (float)mat[i];
+      f.data()[i] = (float)mFrame_->matrix()[i];
+  }
+
+
+  program_bordures.bind();
+  program_bordures.setUniformValue("mvp_matrix", mvp);
+  program_bordures.setUniformValue("f_matrix", f);
+  program_bordures.release();
+  GLint renderMode;
+  glGetIntegerv(GL_RENDER_MODE, &renderMode);
+  printGlError(__LINE__);
+
+
+  glLineWidth(4.0f);
+  v_rec.resize(0);
+  drawRectangle(*this);
+
+  program_bordures.bind();
+  rectBuffer.create();
+  rectBuffer.bind();
+  rectBuffer.allocate(v_rec.data(), static_cast<int>(v_rec.size()*sizeof(float)));
+  program_bordures.setAttributeBuffer("vertex",GL_FLOAT,0,3);
+  program_bordures.enableAttributeArray("vertex");
+  float current_color[4];
+  glGetFloatv(GL_CURRENT_COLOR, current_color);
+  QColor color;
+  color.setRgbF(current_color[0], current_color[1], current_color[2]);
+  program_bordures.setUniformValue("color",color);
+  glDrawArrays(GL_LINE_LOOP, 0, static_cast<GLsizei>(v_rec.size()/3));
+  rectBuffer.release();
+  program_bordures.release();
+  glLineWidth(1.0f);
+
+  program.bind();
+  int mvpLoc = program.uniformLocation("mvp_matrix");
+  int fLoc = program.uniformLocation("f_matrix");
+  program.setUniformValue(mvpLoc, mvp);
+  program.setUniformValue(fLoc, f);
+  vVBO.bind();
+  int vloc = program.attributeLocation("vertex");
+  program.enableAttributeArray(vloc);
+  program.setAttributeBuffer(vloc, GL_FLOAT, 0, 3);
+  vVBO.release();
+
+  cbuffer.bind();
+  int colorLoc = program.attributeLocation("color");
+  program.enableAttributeArray(colorLoc);
+  program.setAttributeBuffer(colorLoc, GL_FLOAT, (currentCube*sizeof(float)) * (bdim_) * (adim_), 1, 0 );
+  cbuffer.release();
+
+
+  printGlError(__LINE__);
+
+ for(unsigned int i = 0; i < ebos.size(); ++i)
+  {
+      ebos[i].first.bind();
+      glDrawElements(GL_TRIANGLES, ebos[i].second, GL_UNSIGNED_INT, 0);
+      ebos[i].first.release();
+  }
+
+  cbuffer.release();
+  printGlError(__LINE__);
+  program.release();
+
+  printGlError(__LINE__);
+}
+
+template<typename T>
+void Volume_plane<T>::init() {
+  
+  initShaders();
+
+  // for each vertex
+  std::vector< float > vertices;
+  vertices.reserve(bdim_ * adim_ * 3);
+  for(unsigned int i = 0; i < adim_; ++i) 
+  {
+    for(unsigned int j = 0; j < bdim_; ++j)
+    {
+      buildVertex(vertices, i, j);
+    }
+  }
+    
+  assert(vertices.size() == (3 * adim_ * bdim_));
+
+  int maxi, maxv;
+  glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &maxi);
+  glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &maxv);
+  assert((vertices.size( ) / 3) < (unsigned int)maxi);
+  vVBO.create();
+  vVBO.bind();
+  vVBO.allocate(vertices.data(),static_cast<int>(sizeof(float) * vertices.size()));
+  vVBO.release();
+  printGlError(__LINE__);
+
+  // for each patch
+  std::vector<unsigned int> indices;
+  for(unsigned int j = 0; j < adim_ - 1; ++j) {
+    for(unsigned int k = 0; k < bdim_ - 1; ++k) {
+        //0
+        indices.push_back( j * bdim_ + k );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //1
+        indices.push_back( j * bdim_ + (k + 1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //3
+        indices.push_back( (j+1) * bdim_ + (k+1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //0
+        indices.push_back( j * bdim_ + k );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //3
+        indices.push_back( (j+1) * bdim_ + (k+1) );
+        assert(indices.back() < (vertices.size() / 3));
+
+        //2
+        indices.push_back( (j+1) * bdim_ + (k) );
+        assert(indices.back() < (vertices.size() / 3));
+
+    }
+  }
+
+  assert((indices.size() / 6) == (adim_ - 1) * (bdim_ - 1));
+  //slice must be multiple of 3.
+  const unsigned int slice = 63399;
+  for(unsigned int i = 0; i < indices.size(); i+=slice)
+  {
+    QOpenGLBuffer ebo = QOpenGLBuffer(QOpenGLBuffer::IndexBuffer);
+    unsigned int left_over = (i + slice) > indices.size()  ? std::distance(indices.begin() + i, indices.end()) : slice;
+    ebo.create();
+    ebo.bind();
+    ebo.allocate(&indices[i],static_cast<int>(sizeof(unsigned int) * left_over));
+    ebo.release();
+    ebos.push_back(std::make_pair(ebo, left_over));
+  }
+
+  cbuffer.create();
+  cbuffer.bind();
+  cbuffer.allocate(colors_.data(),static_cast<int>(colors_.size()*sizeof(float)));
+  cbuffer.release();
+
+  printGlError(__LINE__);
+}
+
+template<typename T>
+void Volume_plane<T>::initShaders() {
+  QOpenGLShader *vertex = new QOpenGLShader(QOpenGLShader::Vertex);
+
+  vertex->compileSourceCode(vertexShader_source);
+  QOpenGLShader *fragment= new QOpenGLShader(QOpenGLShader::Fragment);
+  fragment->compileSourceCode(fragmentShader_source);
+  program.addShader(vertex);
+  program.addShader(fragment);
+  program.link();
+
+
+  QOpenGLShader *vertex_bordures = new QOpenGLShader(QOpenGLShader::Vertex);
+
+  vertex_bordures->compileSourceCode(vertexShader_bordures_source);
+  QOpenGLShader *fragment_bordures= new QOpenGLShader(QOpenGLShader::Fragment);
+  fragment_bordures->compileSourceCode(fragmentShader_bordures_source);
+  program_bordures.addShader(vertex_bordures);
+  program_bordures.addShader(fragment_bordures);
+  program_bordures.link();
+}
+
+
+#endif /* CGAL_VOLUME_PLANE_H */
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h
new file mode 100644
index 0000000..65eb112
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h
@@ -0,0 +1,52 @@
+#ifndef CGAL_VOLUME_PLANE_INTERFACE_H_
+#define CGAL_VOLUME_PLANE_INTERFACE_H_
+
+#include <QObject>
+#include <QGLViewer/qglviewer.h>
+#include <CGAL/Three/Scene_item.h>
+#include <iostream>
+#include <QGLViewer/manipulatedFrame.h>
+using namespace CGAL::Three;
+class Volume_plane_interface : public Scene_item {
+Q_OBJECT
+public:
+  Volume_plane_interface(qglviewer::ManipulatedFrame* f) : mFrame_(f) { 
+    connect(mFrame_, SIGNAL(manipulated()), this, SLOT(propagateManipulation()));
+  }
+
+  virtual ~Volume_plane_interface() {
+    delete mFrame_;
+  }
+
+  virtual void init() = 0;
+
+  virtual void setData(unsigned int adim, unsigned int bdim, unsigned int cdim, float xscale, float yscale, float zscale, std::vector<float> &colors) =0;
+  virtual unsigned int aDim() const = 0;
+  virtual unsigned int bDim() const = 0;
+  virtual unsigned int cDim() const = 0;
+  virtual qglviewer::Vec translationVector() const = 0;
+  void itemAboutToBeDestroyed(Scene_item* item) {
+    if(this == item) {
+      Q_EMIT planeDestructionIncoming(this);
+      Q_EMIT aboutToBeDestroyed();
+    }
+  }
+
+  virtual unsigned int getCurrentCube() const = 0;
+
+  virtual qglviewer::ManipulatedFrame* manipulatedFrame() { return mFrame_; }
+
+Q_SIGNALS:
+  void planeDestructionIncoming(Volume_plane_interface*);
+  void manipulated(int);
+private Q_SLOTS:
+  void propagateManipulation() {
+    Q_EMIT manipulated(getCurrentCube());
+  }
+protected:
+  qglviewer::ManipulatedFrame* mFrame_;
+};
+
+
+#endif /* CGAL_VOLUME_PLANE_INTERFACE_H_ */
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp
new file mode 100644
index 0000000..e92e1fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp
@@ -0,0 +1,200 @@
+#include "config.h"
+
+#include "Volume_plane_intersection.h"
+#include "Volume_plane_interface.h"
+
+#include <CGAL/gl.h>
+
+void Volume_plane_intersection::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 f_matrix; \n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix* f_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "void main(void) { \n"
+        "gl_FragColor = vec4(1.0,0.0,0.0,1.0); \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Volume_plane_intersection::compute_elements()
+{
+   a_vertex.resize(0);
+   b_vertex.resize(0);
+   c_vertex.resize(0);
+
+   a_vertex.push_back(0.0); a_vertex.push_back(0.0); a_vertex.push_back(0.0);
+   a_vertex.push_back(x);   a_vertex.push_back(0.0); a_vertex.push_back(0.0);
+
+   b_vertex.push_back(0.0); b_vertex.push_back(0.0); b_vertex.push_back(0.0);
+   b_vertex.push_back(0.0); b_vertex.push_back(y);   b_vertex.push_back(0.0);
+
+   c_vertex.push_back(0.0); c_vertex.push_back(0.0); c_vertex.push_back(0.0);
+   c_vertex.push_back(0.0); c_vertex.push_back(0.0); c_vertex.push_back(z);
+}
+
+void Volume_plane_intersection::init_buffers()
+{
+    rendering_program.bind();
+
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(a_vertex.data(), static_cast<int>(a_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+        vao[0].release();
+
+        vao[1].bind();
+        buffers[1].bind();
+        buffers[1].allocate(b_vertex.data(), static_cast<int>(b_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+        vao[1].release();
+
+        vao[2].bind();
+        buffers[2].bind();
+        buffers[2].allocate(c_vertex.data(), static_cast<int>(c_vertex.size()*sizeof(float)));
+        vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(vertexLocation[0]);
+        rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+        vao[2].release();
+
+
+
+    rendering_program.release();
+
+}
+
+void Volume_plane_intersection::attrib_buffers(Viewer_interface* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.release();
+}
+
+void Volume_plane_intersection::draw(Viewer_interface* viewer) const {
+  viewer->glLineWidth(4.0f);
+  attrib_buffers(viewer);
+  if(b && c) {
+
+    vao[0].bind();
+    rendering_program.bind();
+    GLdouble mat[16];
+    b->manipulatedFrame()->getMatrix(mat);
+    QMatrix4x4 b_mat, c_mat;
+    for(int i=0; i<16; i++)
+    {
+       b_mat.data()[i] = (float)mat[i];
+    }
+    c->manipulatedFrame()->getMatrix(mat);
+    for(int i=0; i<16; i++)
+    {
+       c_mat.data()[i] = (float)mat[i];
+    }
+    rendering_program.setUniformValue("f_matrix", b_mat*c_mat);
+    viewer->glDrawArrays(GL_LINES, 0, 2);
+    rendering_program.release();
+    vao[0].release();
+  }
+
+  if(a && c) {
+      vao[1].bind();
+      rendering_program.bind();
+      GLdouble mat[16];
+      a->manipulatedFrame()->getMatrix(mat);
+      QMatrix4x4 a_mat, c_mat;
+      for(int i=0; i<16; i++)
+      {
+         a_mat.data()[i] = (float)mat[i];
+      }
+      c->manipulatedFrame()->getMatrix(mat);
+      for(int i=0; i<16; i++)
+      {
+         c_mat.data()[i] = (float)mat[i];
+      }
+      rendering_program.setUniformValue("f_matrix", a_mat*c_mat);
+      viewer->glDrawArrays(GL_LINES, 0, 2);
+      rendering_program.release();
+      vao[1].release();
+  }
+
+  if(a && b) {
+      vao[2].bind();
+      rendering_program.bind();
+      GLdouble mat[16];
+      a->manipulatedFrame()->getMatrix(mat);
+      QMatrix4x4 a_mat, b_mat;
+      for(int i=0; i<16; i++)
+      {
+         a_mat.data()[i] = (float)mat[i];
+      }
+      b->manipulatedFrame()->getMatrix(mat);
+      for(int i=0; i<16; i++)
+      {
+         b_mat.data()[i] = (float)mat[i];
+      }
+      rendering_program.setUniformValue("f_matrix", a_mat*b_mat);
+      viewer->glDrawArrays(GL_LINES, 0, 2);
+      rendering_program.release();
+      vao[2].release();
+  }
+
+  viewer->glLineWidth(1.0f);
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h
new file mode 100644
index 0000000..bfd013f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h
@@ -0,0 +1,78 @@
+#ifndef CGAL_VOLUME_PLANE_INTERSECTION_H_
+#define CGAL_VOLUME_PLANE_INTERSECTION_H_
+
+#include <CGAL/Three/Scene_item.h>
+
+#include <QColor>
+#include <QString>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Three/Viewer_interface.h>
+using namespace CGAL::Three;
+class Volume_plane_interface;
+
+class Volume_plane_intersection
+  : public Scene_item {
+  typedef std::pair<Volume_plane_interface*, Volume_plane_interface*> Interface_pair;
+Q_OBJECT
+public:
+  Volume_plane_intersection(float x, float y, float z)
+    : a(NULL), b(NULL), c(NULL), x(x), y(y), z(z) {
+    setColor(QColor(255, 0, 0));
+    setName("Volume plane intersection");
+    compile_shaders();
+    compute_elements();
+    init_buffers();
+  }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  bool manipulatable() const { return false; }
+  Volume_plane_intersection* clone() const { return 0; }
+  bool supportsRenderingMode(RenderingMode) const { return true; }
+  QString toolTip() const { return "Tooling"; }
+
+  void draw(Viewer_interface*)const;
+
+  void setX(Volume_plane_interface* x) { a = x; }
+  void setY(Volume_plane_interface* x) { b = x; }
+  void setZ(Volume_plane_interface* x) { c = x; }
+
+public Q_SLOTS:
+  void planeRemoved(Volume_plane_interface* i) {
+    if(a == i) {
+      a = NULL;
+    } else if(b == i) {
+      b = NULL;
+    } else if(c == i) {
+      c = NULL;
+    }
+  }
+
+private:
+  Volume_plane_interface *a, *b, *c;
+  float x, y, z;
+
+  static const int vaoSize = 3;
+  static const int vboSize = 3;
+
+  mutable int vertexLocation[1];
+  mutable int mvpLocation[1];
+
+  std::vector<float> a_vertex;
+  std::vector<float> b_vertex;
+  std::vector<float> c_vertex;
+
+  mutable QOpenGLBuffer buffers[vboSize];
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void compute_elements();
+  void init_buffers();
+  void attrib_buffers(Viewer_interface*) const;
+  void compile_shaders();
+};
+
+#endif /* CGAL_VOLUME_PLANE_INTERSECTION_H_ */
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h
new file mode 100644
index 0000000..19bf2ca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h
@@ -0,0 +1,128 @@
+#ifndef CGAL_VOLUME_PLANE_THREAD_H
+#define CGAL_VOLUME_PLANE_THREAD_H
+
+#include "Volume_plane.h"
+#include <CGAL/Image_3.h>
+
+#include "Scene_segmented_image_item.h"
+
+#include <QApplication>
+#include <QThread>
+#include <vector>
+
+struct Clamp_to_one_zero_range {
+  std::pair<float, float> min_max;
+  float operator()(const float& inVal) {
+    float inValNorm = inVal - min_max.first;
+    float aUpperNorm = min_max.second - min_max.first;
+    float bValNorm = inValNorm / aUpperNorm;
+    return bValNorm;
+  }
+};
+
+class Volume_plane_thread : public QThread {
+Q_OBJECT  
+public:
+  Volume_plane_thread(const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+    : img(img), clamper(clamp), item(NULL), name(name) { }
+
+  Volume_plane_interface* getItem() {
+    return item;
+  }
+
+Q_SIGNALS:
+  void finished(Volume_plane_thread*);
+
+protected:
+  const CGAL::Image_3* img;
+  Clamp_to_one_zero_range clamper;
+  Volume_plane_interface* item;
+  std::vector<float> buffer;
+  QString name;
+};
+
+template<typename Word>
+class X_plane_thread : public Volume_plane_thread {
+public:
+ X_plane_thread(Volume_plane<x_tag>*p_it, const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+  : Volume_plane_thread(img, clamp, name) { item = p_it;}
+protected:
+  void run();
+};
+
+template<typename Word>
+class Y_plane_thread : public Volume_plane_thread {
+public:
+ Y_plane_thread(Volume_plane<y_tag>* p_it, const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+  : Volume_plane_thread(img, clamp, name) {item = p_it; }
+protected:
+  void run();
+};
+
+template<typename Word>
+class Z_plane_thread : public Volume_plane_thread {
+public:
+ Z_plane_thread(Volume_plane<z_tag>* p_it, const CGAL::Image_3* img, const Clamp_to_one_zero_range& clamp, const QString& name)
+  : Volume_plane_thread(img, clamp, name) {item = p_it;}
+protected:
+  void run();
+};
+
+template<typename Word>
+void X_plane_thread<Word>::run() {
+    buffer.reserve(img->size());
+    for(unsigned int i = 0; i < img->xdim(); ++i) {
+      for(unsigned int j = 0; j < img->ydim(); ++j) {
+        for(unsigned int k = 0; k < img->zdim(); ++k) {
+          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), i, j, k);
+          x = clamper(x);
+          buffer.push_back(x);
+        }
+      }
+    }
+    item->setData(static_cast<int>(img->ydim()), static_cast<int>(img->zdim()), static_cast<int>(img->xdim()),
+                         img->vx(), img->vy(), img->vz(), buffer);
+
+    item->setName(name);
+    item->moveToThread(QApplication::instance()->thread());
+    Q_EMIT finished(this);
+}
+
+template<typename Word>
+void Y_plane_thread<Word>::run() {
+      buffer.reserve(img->size());
+    for(unsigned int i = 0; i < img->ydim(); ++i) {
+      for(unsigned int j = 0; j < img->xdim(); ++j) {
+        for(unsigned int k = 0; k < img->zdim(); ++k) {
+          float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, i, k);
+          x = clamper(x);
+          buffer.push_back(x);
+        }
+      }
+    }
+    item->setData(static_cast<int>(img->xdim()), static_cast<int>(img->zdim()), static_cast<int>(img->ydim()),
+                                   img->vx(), img->vy(), img->vz(), buffer);
+    item->setName(name);
+    item->moveToThread(QApplication::instance()->thread());
+    Q_EMIT finished(this);
+}
+
+template<typename Word>
+void Z_plane_thread<Word>::run() {
+  for(unsigned int i = 0; i < img->zdim(); ++i) {
+    for(unsigned int j = 0; j < img->xdim(); ++j) {
+      for(unsigned int k = 0; k < img->ydim(); ++k) {
+        float x = CGAL::IMAGEIO::static_evaluate<Word>(img->image(), j, k, i);
+        x = clamper(x);
+        buffer.push_back(x);
+      }
+    }
+  }
+  item->setData(static_cast<int>(img->xdim()), static_cast<int>(img->ydim()), static_cast<int>(img->zdim()),
+                                 img->vx(), img->vy(), img->vz(), buffer);
+  item->setName(name);
+  item->moveToThread(QApplication::instance()->thread());
+  Q_EMIT finished(this);
+}
+
+#endif /* CGAL_VOLUME_PLANE_THREAD_H */
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp
new file mode 100644
index 0000000..dabecde
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp
@@ -0,0 +1,390 @@
+
+#ifdef _MSC_VER
+#  pragma warning(disable:4244) // conversion with loss of data
+#endif
+
+#include <CGAL/config.h>
+#include "config.h"
+
+#include "Volume_plane.h"
+#include <CGAL/Image_3.h>
+
+#include "Volume_plane_thread.h"
+#include "Volume_plane_intersection.h"
+#include "Scene_segmented_image_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "Messages_interface.h"
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <QAction>
+#include <QMenu>
+#include <QList>
+#include <QInputDialog>
+#include <QSlider>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QDockWidget>
+#include <QMainWindow>
+#include <QMessageBox>
+#include <QString>
+#include <QFontMetrics>
+
+#include <cassert>
+#include <iostream>
+
+#include <boost/type_traits.hpp>
+#include <boost/optional.hpp>
+
+// Covariant return types don't work for scalar types and we cannot
+// have templates here, hence this unfortunate hack.
+
+// The input float value we are reading is always in
+// 0..1 and min_max is the range it came from.
+struct IntConverter {
+  std::pair<int, int> min_max;
+  
+  int operator()(float f) {
+    float s = f * (min_max.second - min_max.first);
+    return s + min_max.first;
+  }
+};
+
+struct DoubleConverter {
+  std::pair<float, float> min_max;
+
+  float operator()(float f) {
+    float s = f * (min_max.second - min_max.first);
+    return s + min_max.first;
+  }
+};
+
+class PixelReader : public QObject
+{
+Q_OBJECT
+
+
+Q_SIGNALS:
+  void x(int);
+
+public:
+  void setIC(const IntConverter& x) { ic = x; fc = boost::optional<DoubleConverter>(); }
+  void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional<IntConverter>(); }
+  void setViewer(Viewer_interface* viewer) { this->viewer = viewer; }
+
+private:
+  boost::optional<IntConverter> ic;
+  boost::optional<DoubleConverter> fc;
+  Viewer_interface* viewer;
+
+  void getPixel(const QPoint& e) {
+    float data[3];
+    int vp[4];
+    viewer->glGetIntegerv(GL_VIEWPORT, vp);
+    viewer->glReadPixels(e.x(), vp[3] - e.y(), 1, 1, GL_RGB, GL_FLOAT, data);
+
+    if(fc) {
+      Q_EMIT x( (*fc)(data[0]) );
+    } else if(ic) {
+      Q_EMIT x( (*ic)(data[0]) );
+    }
+  }
+};
+
+
+class Plane_slider : public QSlider
+{
+  Q_OBJECT
+public:
+  Plane_slider(const qglviewer::Vec& v, int id, Scene_interface* scene,
+               qglviewer::ManipulatedFrame* frame, Qt::Orientation ori, QWidget* widget) 
+    : QSlider(ori, widget), v(v), id(id), scene(scene), frame(frame) { 
+    this->setTracking(true);
+    connect(frame,  SIGNAL(manipulated()), this, SLOT(updateValue()));
+  }
+
+public:
+  void sliderChange(SliderChange c) {
+    QSlider::sliderChange(c);
+    if(c == SliderValueChange) {
+      qglviewer::Vec v2 = v * (this->value() / scale);
+      frame->setTranslationWithConstraint(v2);
+      scene->itemChanged(id);
+    }
+
+    Q_EMIT realChange(this->value() / scale);
+  }
+
+public Q_SLOTS:
+  void updateValue() {
+#if QGLVIEWER_VERSION >= 0x020600
+    typedef qreal qglviewer_real;
+#else // QGLViewer < 2.6.0
+    typedef float qglviewer_real;
+#endif // QGLViewer < 2.6.0
+    qglviewer_real a, b, c;
+    frame->getPosition(a, b, c);
+    float sum1 = float(a + b + c);
+    float sum2 = float(v.x + v.y + v.z);
+    sum1 /= sum2;
+    setValue(sum1 * scale);
+  }
+
+Q_SIGNALS:
+  void realChange(int);
+
+private:
+  static const unsigned int scale;
+
+  qglviewer::Vec v;
+  int id;
+  Scene_interface* scene;
+  qglviewer::ManipulatedFrame* frame;
+};
+
+const unsigned int Plane_slider::scale = 100;
+
+class Volume_plane_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Volume_plane_plugin() : planeSwitch(NULL)
+    {
+    }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_segmented_image_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    planeSwitch = new QAction("Add Volume Planes", mw);
+    if(planeSwitch) {
+      planeSwitch->setProperty("subMenuName", "3D Mesh Generation");
+      connect(planeSwitch, SIGNAL(triggered()),
+              this, SLOT(selectPlanes()));
+    }
+    Viewer_interface* v = mw->findChild<Viewer_interface*>("viewer");
+    CGAL_assertion(v != 0);
+    pxr_.setViewer(v);
+    createOrGetDockLayout();
+
+  }
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << planeSwitch;
+  }
+  virtual void closure()
+  {
+      QDockWidget* controlDockWidget = mw->findChild<QDockWidget*>("volumePlanesControl");
+      if(controlDockWidget)
+          controlDockWidget->hide();
+  }
+public Q_SLOTS:
+  void selectPlanes() {
+    std::vector< Scene_segmented_image_item* > seg_items;
+    Scene_segmented_image_item* seg_img = NULL;
+    for(int i = 0; i < scene->numberOfEntries(); ++i) {
+      Scene_segmented_image_item* tmp = qobject_cast<Scene_segmented_image_item*>(scene->item(i));
+      if(tmp != NULL){
+        seg_items.push_back(tmp);
+      }
+    }
+    if(seg_items.empty()) {
+      QMessageBox::warning(mw, tr("No suitable item found"), tr("Load an inrimage or hdr file to enable Volume Planes."));
+      return;
+    } else {
+      QList<QString> items;
+      for(std::vector< Scene_segmented_image_item* >::const_iterator it = seg_items.begin(); 
+          it != seg_items.end(); ++it) { 
+        items << (*it)->name();
+      }
+      bool ok;
+      QString selected = QInputDialog::getItem(mw, tr("Select a dataset:"), tr("Items"), items, 0, false, &ok);
+      if(!ok || selected.isEmpty())
+        return;
+      for(std::vector< Scene_segmented_image_item*>::const_iterator it = seg_items.begin(); 
+          it != seg_items.end(); ++it) { 
+        if(selected == (*it)->name())
+          seg_img = *it;
+      }
+    }
+    
+    if(!(seg_img == NULL)) {
+      const CGAL::Image_3* img = seg_img->image();
+      CGAL_IMAGE_IO_CASE(img->image(), this->launchAdders<Word>(img, seg_img->name()))
+
+      Volume_plane_intersection* i = new Volume_plane_intersection(img->xdim() * img->vx(), 
+                                                                   img->ydim() * img->vy(), 
+                                                                   img->zdim() * img->vz());
+      this->intersectionId = scene->addItem(i);
+    } else {
+      QMessageBox::warning(mw, tr("Something went wrong"), tr("Selected a suitable Object but couldn't get an image pointer."));
+      return;
+    }
+
+  }
+
+  void addVP(Volume_plane_thread* thread) {
+    Volume_plane_interface* plane = thread->getItem();
+    plane->init();
+
+    // add the interface for this Volume_plane
+    int id = scene->addItem(plane);
+    
+    QLayout* layout = createOrGetDockLayout();
+    
+    QWidget* controls = new QWidget;
+    QHBoxLayout* box = new QHBoxLayout(controls);
+    layout->addWidget(controls);
+
+    QLabel* label = new QLabel(controls);
+    label->setText(plane->name());
+
+    QLabel* cubeLabel = new QLabel(controls);
+    cubeLabel->setNum(static_cast<int>(plane->getCurrentCube()));
+    
+    // Find the right width for the label to accommodate at least 9999
+    QFontMetrics metric = cubeLabel->fontMetrics();
+    cubeLabel->setFixedWidth(metric.width(QString("9999")));
+
+    QSlider* slider = new Plane_slider(plane->translationVector(), id, scene, plane->manipulatedFrame(),
+                                       Qt::Horizontal, controls);
+    slider->setRange(0, (plane->cDim() - 1) * 100);
+
+    connect(slider, SIGNAL(realChange(int)), cubeLabel, SLOT(setNum(int)));
+    connect(plane, SIGNAL(manipulated(int)), cubeLabel, SLOT(setNum(int)));
+    
+    box->addWidget(label);
+    box->addWidget(slider);
+    box->addWidget(cubeLabel);
+    
+    connect(plane, SIGNAL(aboutToBeDestroyed()), controls, SLOT(deleteLater()));
+
+    std::vector<Volume_plane_thread*>::iterator it = std::find(threads.begin(), threads.end(), thread);
+
+    // this slot has been connected to a thread that hasn't been
+    // registered here.
+    assert(it != threads.end());
+    delete *it;
+    threads.erase(it);
+
+    Volume_plane_intersection* intersection = dynamic_cast<Volume_plane_intersection*>(scene->item(intersectionId));
+    if(!intersection) {
+      // the intersection is gone before it was initialized
+      return;
+    }
+    // FIXME downcasting mode
+    // FIXME this will bug if two volume planes are generated simultaneously by the plugin
+    if(Volume_plane<x_tag>* p = dynamic_cast< Volume_plane<x_tag>* >(plane)) {
+      intersection->setX(p);
+    } else if(Volume_plane<y_tag>* p = dynamic_cast< Volume_plane<y_tag>* >(plane)) {
+      intersection->setY(p);
+    } else if(Volume_plane<z_tag>* p = dynamic_cast< Volume_plane<z_tag>* >(plane)) {
+      intersection->setZ(p);
+    }
+
+    connect(plane, SIGNAL(planeDestructionIncoming(Volume_plane_interface*)), 
+            intersection, SLOT(planeRemoved(Volume_plane_interface*)));
+  }
+ 
+private:
+  QAction* planeSwitch;
+  PixelReader pxr_;
+
+  std::vector<Volume_plane_thread*> threads;
+  unsigned int intersectionId;
+
+  QLayout* createOrGetDockLayout() {
+    QLayout* layout = NULL;
+    QDockWidget* controlDockWidget = mw->findChild<QDockWidget*>("volumePlanesControl");;
+
+    if(!controlDockWidget) {
+      controlDockWidget = new QDockWidget(mw);
+      controlDockWidget->setObjectName("volumePlanesControl");
+      QWidget* content = new QWidget(controlDockWidget);
+      layout = new QVBoxLayout(content);
+      layout->setObjectName("vpSliderLayout");
+      controlDockWidget->setWindowTitle("Control Widget");
+      mw->addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
+      
+      QWidget* vlabels = new QWidget(content);
+      layout->addWidget(vlabels);
+      QHBoxLayout* vbox = new QHBoxLayout(vlabels);
+      vbox->setAlignment(Qt::AlignJustify);
+
+      QLabel* text = new QLabel(vlabels);
+      text->setText("Isovalue at point:");
+      QLabel* x = new QLabel(vlabels);
+
+      connect(&pxr_, SIGNAL(x(int)), x, SLOT(setNum(int)));
+      
+      vbox->addWidget(text); vbox->addWidget(x);
+      controlDockWidget->setWidget(content);
+      controlDockWidget->hide();
+
+    } else {
+      layout = controlDockWidget->findChild<QLayout*>("vpSliderLayout");
+      controlDockWidget->show();
+    }
+
+    return layout;
+  }
+
+  template<typename Word>
+  void launchAdders(const CGAL::Image_3* img, const QString& name) {
+    const Word* begin = (const Word*)img->data();
+    const Word* end = (const Word*)img->data() + img->size();
+
+    std::pair<const Word, const Word> minmax(*std::min_element(begin, end), *std::max_element(begin, end));
+
+    Clamp_to_one_zero_range clamper = { minmax };
+
+    switchReaderConverter< Word >(minmax);
+    
+    Volume_plane<x_tag> *xitem = new Volume_plane<x_tag>();
+    Volume_plane<y_tag> *yitem = new Volume_plane<y_tag>();
+    Volume_plane<z_tag> *zitem = new Volume_plane<z_tag>();
+
+    threads.push_back(new X_plane_thread<Word>(xitem, img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+    
+    threads.push_back(new Y_plane_thread<Word>(yitem,img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+
+    threads.push_back(new Z_plane_thread<Word>(zitem,img, clamper, name));
+    connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*)));
+    threads.back()->start();
+
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax) { 
+    switchReaderConverter(minmax, typename boost::is_integral<T>::type()); 
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax, boost::true_type) {
+    // IntConverter
+    IntConverter x = { minmax }; pxr_.setIC(x);
+  }
+
+  template<typename T>
+  void switchReaderConverter(std::pair<T, T> minmax, boost::false_type) {
+    // IntConverter
+    DoubleConverter x = { minmax }; pxr_.setFC(x);
+  }
+};
+
+#include "Volume_planes_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h
new file mode 100644
index 0000000..3424094
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h
@@ -0,0 +1,124 @@
+#ifndef CGAL_DEMO_MESH_3_CONFIG_H
+#define CGAL_DEMO_MESH_3_CONFIG_H
+
+#define  BOOST_PARAMETER_MAX_ARITY 12
+
+
+//#define CGAL_PROFILE
+
+// #define CGAL_POLYHEDRON_DEMO_NO_NEF
+// #define CGAL_POLYHEDRON_DEMO_NO_SURFACE_MESHER
+// #define CGAL_POLYHEDRON_DEMO_NO_PARAMETRIZATION
+
+//#define CGAL_MESH_3_VERBOSE
+//#define CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+//#define CGAL_MESH_3_EXUDER_VERBOSE
+//#define CGAL_MESH_3_EXUDER_HIGH_VERBOSITY
+//#define CGAL_MESH_3_VERY_VERBOSE
+//#define CGAL_MESH_3_IO_VERBOSE
+
+//#define SHOW_REMAINING_BAD_ELEMENT_IN_RED
+
+#ifndef CGAL_POLYHEDRON_DEMO_NO_PARAMETRIZATION
+#  define CGAL_POLYHEDRON_DEMO_USE_PARAMETRIZATION
+#endif
+
+#ifndef CGAL_POLYHEDRON_DEMO_NO_NEF
+#  define CGAL_POLYHEDRON_DEMO_USE_NEF
+#endif
+
+#ifndef CGAL_POLYHEDRON_DEMO_NO_SURFACE_MESHER
+#  define CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
+#endif
+
+#define CGAL_MESH_3_DEMO_BIGGER_HISTOGRAM_WITH_WHITE_BACKGROUNG
+
+// If you define this, implicit function and segmented images won't be available
+//#define CGAL_MESH_3_DEMO_ACTIVATE_SHARP_FEATURES_IN_POLYHEDRAL_DOMAIN
+#ifndef CGAL_MESH_3_DEMO_ACTIVATE_SHARP_FEATURES_IN_POLYHEDRAL_DOMAIN
+# define CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS
+# define CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES
+#endif
+
+//#define CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
+
+// Optimizers
+//#define CGAL_MESH_3_DEMO_DISABLE_ODT
+//#define CGAL_MESH_3_DEMO_DISABLE_LLOYD
+//#define CGAL_MESH_3_DEMO_DISABLE_PERTURBER
+//#define CGAL_MESH_3_DEMO_DISABLE_EXUDER
+
+// ==========================================================================
+// MESH_3 GENERAL PARAMETERS
+// ==========================================================================
+
+//#define CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE // WARNING: VERY SLOW
+//#define CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
+//#define CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+//#define CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END
+
+// ==========================================================================
+// ==========================================================================
+// CONCURRENT MESH_3?
+// ==========================================================================
+// ==========================================================================
+
+#ifdef CGAL_CONCURRENT_MESH_3
+
+# ifndef CGAL_LINKED_WITH_TBB
+#   pragma message(" : Warning: CGAL_LINKED_WITH_TBB not defined: EVERYTHING WILL BE SEQUENTIAL.")
+# endif
+
+# define CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE // default behavior
+//# define CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
+# define CGAL_MESH_3_IF_UNSORTED_QUEUE_JUST_SORT_AFTER_SCAN
+# include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+
+  // ==========================================================================
+  // Verbose
+  // ==========================================================================
+
+//# define CGAL_CONCURRENT_MESH_3_VERBOSE
+//#define CGAL_CONCURRENT_MESH_3_VERY_VERBOSE
+
+  // ==========================================================================
+  // Concurrency config
+  // ==========================================================================
+
+  const char * const CONFIG_FILENAME = "concurrent_mesher_config.cfg";
+
+  // =====================
+  // Worksharing strategy
+  // =====================
+      
+//# define CGAL_MESH_3_LOAD_BASED_WORKSHARING // Not recommended
+//# define CGAL_MESH_3_TASK_SCHEDULER_SORTED_BATCHES_WITH_MULTISET
+//# define CGAL_MESH_3_TASK_SCHEDULER_SORTED_BATCHES_WITH_SORT // default
+
+  // ==========================================================================
+  // Profiling
+  // ==========================================================================
+
+  // For abortion profiling, etc.
+//# define CGAL_CONCURRENT_MESH_3_PROFILING
+  // Debugging
+//# define CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+
+
+// ==========================================================================
+// ==========================================================================
+// SEQUENTIAL MESH_3?
+// ==========================================================================
+// ==========================================================================
+
+#else // !CGAL_CONCURRENT_MESH_3
+
+//# define CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE
+//# define CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
+# define CGAL_MESH_3_IF_UNSORTED_QUEUE_JUST_SORT_AFTER_SCAN
+
+#endif // CGAL_CONCURRENT_MESH_3
+  
+//#define CGAL_MESH_3_PROFILING
+
+#endif // CGAL_DEMO_MESH_3_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui
new file mode 100644
index 0000000..e270d1d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui
@@ -0,0 +1,454 @@
+<ui version="4.0" >
+ <class>Raw_image_dialog</class>
+ <widget class="QDialog" name="Raw_image_dialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>585</width>
+    <height>342</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Open raw image</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" >
+   <item>
+    <widget class="QGroupBox" name="groupBox_2" >
+     <property name="title" >
+      <string>Image &value type</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="2" column="0" >
+       <widget class="QRadioButton" name="short_bt" >
+        <property name="text" >
+         <string>Short (16 bits)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QRadioButton" name="float_bt" >
+        <property name="text" >
+         <string>Float</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QRadioButton" name="int_bt" >
+        <property name="text" >
+         <string>Int (32 bits)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" >
+       <widget class="QRadioButton" name="double_bt" >
+        <property name="text" >
+         <string>Double</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QCheckBox" name="signed_bt" >
+        <property name="text" >
+         <string>Signed</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QRadioButton" name="char_bt" >
+        <property name="text" >
+         <string>char (8 bits)</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Image dimensions</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2" >
+      <item>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label_dim" >
+          <property name="text" >
+           <string>&Dimensions:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>dim_x</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="label_spacing" >
+          <property name="text" >
+           <string>&Spacing:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>spacing_x</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QSpinBox" name="dim_x" >
+          <property name="prefix" >
+           <string>x: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2" >
+         <widget class="QSpinBox" name="dim_y" >
+          <property name="prefix" >
+           <string>y: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3" >
+         <widget class="QSpinBox" name="dim_z" >
+          <property name="prefix" >
+           <string>z: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QDoubleSpinBox" name="spacing_x" >
+          <property name="prefix" >
+           <string>vx: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2" >
+         <widget class="QDoubleSpinBox" name="spacing_y" >
+          <property name="prefix" >
+           <string>vy: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="3" >
+         <widget class="QDoubleSpinBox" name="spacing_z" >
+          <property name="prefix" >
+           <string>vz: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QLabel" name="offset_label" >
+          <property name="text" >
+           <string>&Offset:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>offset</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QSpinBox" name="offset" >
+          <property name="suffix" >
+           <string> bytes</string>
+          </property>
+          <property name="maximum" >
+           <number>999999999</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="imagesize_budy" >
+          <property name="text" >
+           <string>Image size:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="label_image_size" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2" >
+         <widget class="QLabel" name="filesize_budy" >
+          <property name="text" >
+           <string>File size:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QLabel" name="label_file_size" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Open</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>int_bt</tabstop>
+  <tabstop>short_bt</tabstop>
+  <tabstop>signed_bt</tabstop>
+  <tabstop>float_bt</tabstop>
+  <tabstop>double_bt</tabstop>
+  <tabstop>dim_x</tabstop>
+  <tabstop>dim_y</tabstop>
+  <tabstop>dim_z</tabstop>
+  <tabstop>spacing_x</tabstop>
+  <tabstop>spacing_y</tabstop>
+  <tabstop>spacing_z</tabstop>
+  <tabstop>offset</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>float_bt</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>signed_bt</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>47</x>
+     <y>112</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>553</x>
+     <y>94</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>double_bt</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>signed_bt</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>564</x>
+     <y>127</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>564</x>
+     <y>94</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>191</x>
+     <y>316</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>183</x>
+     <y>313</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>253</x>
+     <y>319</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>252</x>
+     <y>312</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_x</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>178</x>
+     <y>187</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>99</x>
+     <y>141</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_z</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>473</x>
+     <y>178</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>441</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>char_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>71</x>
+     <y>52</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>137</x>
+     <y>3</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>short_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>117</x>
+     <y>81</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>49</x>
+     <y>6</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>float_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>137</x>
+     <y>111</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>67</x>
+     <y>-5</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>int_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>358</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>584</x>
+     <y>52</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_y</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>332</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>271</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>double_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>514</x>
+     <y>119</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>581</x>
+     <y>116</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>update_image_size()</slot>
+ </slots>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt
new file mode 100644
index 0000000..38eeb29
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt
@@ -0,0 +1,8 @@
+include( polyhedron_demo_macros )
+ qt5_wrap_ui( clip_polyhedronUI_FILES Clip_polyhedron_plugin.ui )
+ polyhedron_demo_plugin(clip_polyhedron_plugin Clip_polyhedron_plugin ${clip_polyhedronUI_FILES})
+ target_link_libraries(clip_polyhedron_plugin  scene_polyhedron_item scene_basic_objects)
+ polyhedron_demo_plugin(corefinement_plugin Corefinement_plugin)
+ target_link_libraries(corefinement_plugin  scene_polyhedron_item scene_combinatorial_map_item scene_polylines_item)
+ polyhedron_demo_plugin(intersection_plugin Intersection_plugin)
+ target_link_libraries(intersection_plugin  scene_polyhedron_item scene_polylines_item)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp
new file mode 100644
index 0000000..11cb3b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp
@@ -0,0 +1,232 @@
+#include "Messages_interface.h"
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+#include <QVector>
+#include "Scene_polyhedron_item.h"
+#include "Scene_plane_item.h"
+#include <CGAL/Three/Viewer_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/internal/Polyhedron_plane_clipping_3.h>
+#include "ui_Clip_polyhedron_plugin.h"
+#include "Viewer.h"
+
+
+using namespace CGAL::Three;
+// The special 2 faces plane
+class Scene_clipping_plane_item : public Scene_plane_item
+{
+  Q_OBJECT
+
+public:
+  Scene_clipping_plane_item(const CGAL::Three::Scene_interface* scene_interface)
+    :Scene_plane_item(scene_interface)
+  {
+  }
+
+  void draw(CGAL::Three::Viewer_interface* viewer)const
+  {
+    if(!are_buffers_filled)
+      initialize_buffers(viewer);
+    vaos[Facets]->bind();
+    program = getShaderProgram(PROGRAM_PLANE_TWO_FACES);
+    attrib_buffers(viewer, PROGRAM_PLANE_TWO_FACES);
+    QMatrix4x4 f_matrix;
+    for(int i=0; i<16; i++)
+      f_matrix.data()[i] = (float)frame->matrix()[i];
+    program->bind();
+    program->setUniformValue("f_matrix", f_matrix);
+    program->setAttributeValue("colors",this->color());
+    QVector3D normal;
+    normal.setX(plane().orthogonal_vector().x());normal.setY(plane().orthogonal_vector().y());normal.setZ(plane().orthogonal_vector().z());
+    program->setUniformValue("plane_normal", normal);
+    QVector3D vd;
+    vd.setX(viewer->camera()->position().x); vd.setY(viewer->camera()->position().y); vd.setZ(viewer->camera()->position().z);
+    program->setUniformValue("dirView", vd);
+    QVector3D pp;
+    pp.setX(plane().point().x());pp.setY(plane().point().y());pp.setZ(plane().point().z());
+    program->setUniformValue("plane_pos", pp);
+
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(positions_quad.size()/3));
+    program->release();
+    vaos[Facets]->release();
+
+  }
+
+private:
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const
+  {
+    program = getShaderProgram(PROGRAM_PLANE_TWO_FACES, viewer);
+    program->bind();
+    vaos[Facets]->bind();
+
+    buffers[Facets_vertices].bind();
+    buffers[Facets_vertices].allocate(positions_quad.data(),
+                                      static_cast<int>(positions_quad.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+    buffers[Facets_vertices].release();
+    vaos[Facets]->release();
+
+
+    vaos[Edges]->bind();
+    buffers[Edges_vertices].bind();
+    buffers[Edges_vertices].allocate(positions_lines.data(),
+                                     static_cast<int>(positions_lines.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+    buffers[Edges_vertices].release();
+    vaos[Edges]->release();
+
+    program->release();
+    are_buffers_filled = true;
+
+  }
+}; //end of class Scene_triangle_item
+
+
+class Q_DECL_EXPORT Clip_polyhedron_plugin :
+    public QObject,
+    public CGAL::Three::Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public :
+  // To silent a warning -Woverloaded-virtual
+  // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+  using Polyhedron_demo_plugin_helper::init;
+  // Adds an action to the menu and configures the widget
+  void init(QMainWindow* mainWindow,
+            CGAL::Three::Scene_interface* scene_interface,
+            Messages_interface* mi) {
+    //get the references
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    this->messages = mi;
+    plane = NULL;
+    //creates and link the actions
+    actionClipPolyhedra = new QAction("Clip Polyhedra", mw);
+    actionClipPolyhedra->setProperty("subMenuName","Operations on Polyhedra");
+    dock_widget = new QDockWidget("Polyhedra Clipping", mw);
+    dock_widget->setVisible(false); // do not show at the beginning
+    ui_widget.setupUi(dock_widget);
+    mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
+
+    if(actionClipPolyhedra ) {
+      connect(actionClipPolyhedra , SIGNAL(triggered()),
+              this, SLOT(pop_widget()));
+      connect(ui_widget.clipButton, SIGNAL(clicked()),
+              this, SLOT(clip_polyhedron()));
+    }
+  }
+  bool applicable(QAction*) const
+  {
+    Q_FOREACH(int id, scene->selectionIndices())
+    {
+      if(qobject_cast<Scene_polyhedron_item*>(scene->item(id)))
+        return true;
+    }
+    return false;
+  }
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionClipPolyhedra;
+  }
+  void closure() {
+    dock_widget->hide();
+  }
+public Q_SLOTS:
+  void on_plane_destroyed()
+  {
+    plane = NULL;
+    dock_widget->hide();
+  }
+  void pop_widget()
+  {
+    if(dock_widget->isVisible()) { dock_widget->hide(); }
+    else                         { dock_widget->show(); }
+
+    //creates a new  cutting_plane;
+    if(!plane)
+    {
+      const Scene_interface::Bbox scene_bbox = scene->bbox();
+      plane = new Scene_clipping_plane_item(scene);
+      plane->setNormal(0., 0., 1.);
+      plane->setPosition((scene_bbox.xmin + scene_bbox.xmax)/2.,
+                         (scene_bbox.ymin + scene_bbox.ymax)/2.,
+                         (scene_bbox.zmin + scene_bbox.zmax)/2.);
+      plane->setManipulatable(true);
+      plane->setClonable(false);
+      plane->setColor(QColor(0,126,255));
+      plane->setFlatMode();
+      plane->setName(tr("Clipping plane"));
+      connect(plane, SIGNAL(destroyed()),
+              this, SLOT(on_plane_destroyed()));
+      scene->addItem(plane);
+    }
+  }
+  void clip_polyhedron()
+  {
+    if(!plane)
+      return;
+    else
+    {
+      QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+      QList<Scene_polyhedron_item*> polyhedra;
+
+      //Fills the list of target polyhedra and the cutting plane
+      Q_FOREACH(int id, scene->selectionIndices())
+      {
+        Scene_polyhedron_item *target_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
+        if(target_item)
+        {
+          polyhedra << target_item;
+        }
+      }
+
+      //apply the clipping function
+      Q_FOREACH(Scene_polyhedron_item* poly, polyhedra)
+      {
+        if(ui_widget.close_checkBox->isChecked() && poly->polyhedron()->is_closed())
+        {
+          Polyhedron * polyhedron = CGAL::corefinement::clip_polyhedron(*(poly->polyhedron()),plane->plane());
+          if(polyhedron)
+          {
+            Scene_polyhedron_item* new_item = new Scene_polyhedron_item(polyhedron);
+            new_item->setName(poly->name());
+            new_item->setColor(poly->color());
+            new_item->setRenderingMode(poly->renderingMode());
+            new_item->setVisible(poly->visible());
+            new_item->invalidateOpenGLBuffers();
+            new_item->setProperty("source filename", poly->property("source filename"));
+            scene->replaceItem(scene->item_id(poly),new_item);
+            delete poly;
+            new_item->invalidateOpenGLBuffers();
+            viewer->updateGL();
+            messages->information(QString("%1 clipped").arg(new_item->name()));
+          }
+          else
+          {
+             messages->information(QString("Could not clip %1 : returned polyhedron is null.").arg(poly->name()));
+             delete polyhedron;
+          }
+        }
+        else
+        {
+          CGAL::corefinement::inplace_clip_open_polyhedron(*(poly->polyhedron()),plane->plane());
+          poly->invalidateOpenGLBuffers();
+          viewer->updateGL();
+          messages->information(QString("%1 clipped").arg(poly->name()));
+        }
+      }
+    }
+  }
+private:
+  QAction* actionClipPolyhedra;
+  Ui::ClipPolyhedronWidget ui_widget;
+  QDockWidget* dock_widget;
+  Scene_clipping_plane_item* plane;
+  Messages_interface* messages;
+}; //end of plugin class
+#include "Clip_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui
new file mode 100644
index 0000000..7c5473b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ClipPolyhedronWidget</class>
+ <widget class="QDockWidget" name="ClipPolyhedronWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>364</width>
+    <height>258</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Clip Polyhedra</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout_2">
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string><html><head/><body><p>This function allows to clip all the selected polyhedra against a halfspace. What is on the blue side of the clipping plane will be clipped, and what is on the yellow side will be kept.<br/><br/>If the option <span style=" font-style:italic;">keep closed</span> is checked, the clipped part of each polyhedron will be closed, if it has a closed contour on the clipping plane. Otherwise, it will  [...]
+        </property>
+        <property name="wordWrap">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>40</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QCheckBox" name="close_checkBox">
+          <property name="layoutDirection">
+           <enum>Qt::LeftToRight</enum>
+          </property>
+          <property name="autoFillBackground">
+           <bool>false</bool>
+          </property>
+          <property name="text">
+           <string>&Keep Closed</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="clipButton">
+          <property name="text">
+           <string>&Clip</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2"/>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp
new file mode 100644
index 0000000..4827e30
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp
@@ -0,0 +1,181 @@
+#define CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/corefinement_operations.h>
+#include <CGAL/bounding_box.h>
+#include "Scene_polyhedron_item.h"
+#include "Scene_combinatorial_map_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+
+#include "Scene_polylines_item.h"
+
+#include <QString>
+#include <QAction>
+#include <QMenu>
+#include <QMainWindow>
+#include <QApplication>
+#include <QTime>
+#include <QMessageBox>
+
+//#define PRINT_EACH_VOLUME
+using namespace CGAL::Three;
+class Polyhedron_demo_corefinement_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionPolyhedronCorefinement_3;
+  }
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionPolyhedronCorefinement_3 = new QAction("Polyhedra Corefinement (A/B)", mw);
+    actionPolyhedronCorefinement_3->setProperty("subMenuName", "Operations on Polyhedra");
+    if(actionPolyhedronCorefinement_3) {
+      connect(actionPolyhedronCorefinement_3, SIGNAL(triggered()),
+              this, SLOT(corefinement()));
+    }
+  }
+
+private:
+
+  QAction*  actionPolyhedronCorefinement_3;
+
+public Q_SLOTS:
+  void corefinement();
+
+}; // end class Polyhedron_demo_corefinement_plugin
+
+
+struct Is_on_polyline{
+  bool operator()(Polyhedron::Halfedge_handle he) const { 
+    return he->is_feature_edge();
+  }
+};
+
+struct Set_vertex_corner{
+  template <typename Info>
+  void add_info_to_node(int, Polyhedron*,const Info&) {
+  }
+
+  void operator()(Polyhedron::Vertex_handle v, int, Polyhedron*) {
+    ++v->nb_of_feature_edges;
+  }
+};
+
+void Polyhedron_demo_corefinement_plugin::corefinement()
+{
+  int indexA = scene->selectionAindex();
+  int indexB = scene->selectionBindex();
+
+  Scene_polyhedron_item* itemA = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
+  Scene_polyhedron_item* itemB = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
+  if(!itemA || !itemB || itemA == itemB)
+  {
+    Q_FOREACH(int index, scene->selectionIndices()) {
+      Scene_polyhedron_item* item = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+      if(!item)
+        return;
+    }
+    if(scene->selectionIndices().size() == 2) {
+      indexA = scene->selectionIndices()[0];
+      indexB = scene->selectionIndices()[1];
+      itemA = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
+      itemB = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
+    }
+  }
+  std::vector<Polyhedron*> poly_ptrs;
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    Scene_polyhedron_item* item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(!item)
+      return;
+    else if(item != itemA) {
+      poly_ptrs.push_back(item->polyhedron());
+      if(poly_ptrs.back() == 0) return;
+    }
+  }
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  if(itemA && itemB && itemA != itemB) {
+  
+   // perform Boolean operation
+    QTime time;
+    time.start();
+
+    //since the visitor modify input polyhedra, we make copies.
+    Polyhedron A( *itemA->polyhedron() );
+    Polyhedron B( *itemB->polyhedron() );
+    
+    itemA->setVisible(false);
+    itemB->setVisible(false);
+    
+    Scene_polylines_item* new_item = new Scene_polylines_item();
+    
+  #ifdef _COREFINEMENT_OUTPUT_IS_POLYHEDRON
+    typedef CGAL::Polyhedron_corefinement<Polyhedron> Corefinement;
+    Corefinement corefinement;
+
+    typedef std::list<std::pair<Polyhedron*,int> > Decomposition;
+    Decomposition decomposition;
+    
+    #ifndef PRINT_EACH_VOLUME
+    int features=Corefinement::Join_tag+Corefinement::Intersection_tag+Corefinement::P_minus_Q_tag+Corefinement::Q_minus_P_tag;
+    #else
+    int features=Corefinement::Decomposition_tag;
+    #endif
+    corefinement(A, B, std::back_inserter(new_item->polylines),std::back_inserter(decomposition),features);
+    
+    
+    for (Decomposition::iterator it=decomposition.begin();it!=decomposition.end();++it)
+    {
+      Polyhedron* new_poly=it->first;
+      Scene_polyhedron_item* new_item_bool= new Scene_polyhedron_item(new_poly);
+      new_item_bool->setName(
+        QString::fromStdString(
+          corefinement.get_type_str(itemA->name().toStdString(),itemB->name().toStdString(),it->second)
+        )
+      );
+      scene->addItem(new_item_bool);
+    }
+  #else  
+    Scene_combinatorial_map_item* cmap_item = new Scene_combinatorial_map_item(scene,static_cast<void*>(&A)); 
+    typedef CGAL::Node_visitor_refine_polyhedra<Polyhedron> Split_visitor; 
+    cmap_item->m_combinatorial_map=new Combinatorial_map_3();
+    Split_visitor visitor(cmap_item->m_combinatorial_map);
+    CGAL::Intersection_of_Polyhedra_3<Polyhedron,Kernel,Split_visitor> polyline_intersections(visitor);
+    polyline_intersections(A, B, std::back_inserter(new_item->polylines));
+    cmap_item->setName(QString("%1_and_%2_corefined").arg(itemA->name()).arg(itemB->name()));
+    scene->addItem(cmap_item);
+  #endif
+    new_item->setName(tr("boundary intersection"));
+    new_item->setColor(Qt::green);
+    new_item->setRenderingMode(Wireframe);
+    scene->addItem(new_item);  
+    new_item->invalidateOpenGLBuffers();
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+      
+  }
+
+  QApplication::restoreOverrideCursor();
+}
+
+#include "Corefinement_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp
new file mode 100644
index 0000000..00dafd7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp
@@ -0,0 +1,220 @@
+#define CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS
+#define CGAL_USE_SEGMENT_APPROACH
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#ifdef CGAL_USE_SEGMENT_APPROACH
+#include <CGAL/intersection_of_Polyhedra_3.h>
+#else
+#include <CGAL/intersection_Polyhedron_3_Polyhedron_3.h>
+#endif
+#include <CGAL/iterator.h>
+#include <CGAL/bounding_box.h>
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+
+#include "Scene_polylines_item.h"
+
+#include <boost/foreach.hpp>
+
+#include <QString>
+#include <QAction>
+#include <QMenu>
+#include <QMainWindow>
+#include <QApplication>
+#include <QTime>
+#include <QMessageBox>
+using namespace CGAL::Three;
+class Polyhedron_demo_intersection_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionPolyhedronIntersection_3;
+  }
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionPolyhedronIntersection_3 = new QAction("Intersect Polyhedra (A/B)", mw);
+    actionPolyhedronIntersection_3->setProperty("subMenuName", "Operations on Polyhedra");
+    if(actionPolyhedronIntersection_3) {
+      connect(actionPolyhedronIntersection_3, SIGNAL(triggered()),
+              this, SLOT(intersection()));
+    }
+  }
+
+private:
+
+  QAction*  actionPolyhedronIntersection_3;
+
+public Q_SLOTS:
+  void intersection();
+
+}; // end class Polyhedron_demo_intersection_plugin
+
+
+#ifdef CGAL_USE_SEGMENT_APPROACH
+struct Is_on_polyline{
+  bool operator()(Polyhedron::Halfedge_handle he) const { 
+    return he->is_feature_edge();
+  }
+};
+
+struct Set_vertex_corner{
+  template <typename Info>
+  void add_info_to_node(int, Polyhedron*,const Info&) {
+  }
+
+  void operator()(Polyhedron::Vertex_handle v, int, Polyhedron*) {
+    ++v->nb_of_feature_edges;
+  }
+};
+#endif
+
+void Polyhedron_demo_intersection_plugin::intersection()
+{
+  int indexA = scene->selectionAindex();
+  int indexB = scene->selectionBindex();
+
+  Scene_polyhedron_item* itemA = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
+  Scene_polyhedron_item* itemB = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
+  if(!itemA || !itemB || itemA == itemB)
+  {
+    Q_FOREACH(int index, scene->selectionIndices()) {
+      Scene_polyhedron_item* item = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+      if(!item)
+        return;
+    }
+    if(scene->selectionIndices().size() == 2) {
+      indexA = scene->selectionIndices()[0];
+      indexB = scene->selectionIndices()[1];
+      itemA = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(indexA));
+      itemB = 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(indexB));
+    }
+  }
+#ifndef CGAL_USE_SEGMENT_APPROACH
+  if(!itemA || !itemB || itemA == itemB)
+    return;
+#else
+  std::vector<Polyhedron*> poly_ptrs;
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    Scene_polyhedron_item* item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(!item)
+      return;
+    else if(item != itemA) {
+      poly_ptrs.push_back(item->polyhedron());
+      if(poly_ptrs.back() == 0) return;
+    }
+  }
+#endif
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  Scene_polylines_item* new_item = new Scene_polylines_item();
+ // perform Boolean operation
+  QTime time;
+  time.start();
+
+#ifdef CGAL_USE_SEGMENT_APPROACH
+  typedef CGAL::Node_visitor_for_polyline_split<Polyhedron,
+    Is_on_polyline, Set_vertex_corner> Split_visitor;
+
+  CGAL::Intersection_of_Polyhedra_3<Polyhedron,
+    Kernel,
+    Split_visitor> polyline_intersections;
+
+  typedef std::pair<Polyhedron::Facet_handle,
+                    Polyhedron::Facet_handle> Pair_of_facet_handles;
+  typedef std::vector<Pair_of_facet_handles> Polyline_info;
+  typedef std::vector<Polyline_info> Polylines_infos;
+  Polylines_infos polylines_infos;
+
+  typedef Scene_polylines_item::Polylines_container Polylines_container;
+  typedef std::back_insert_iterator<Polylines_container> To_container;
+  typedef std::back_insert_iterator<Polylines_infos> To_infos;
+  To_container to_container(new_item->polylines);
+  To_infos to_infos(polylines_infos);
+  CGAL::Dispatch_output_iterator<
+    CGAL::cpp11::tuple<Polylines_container::value_type,
+                       Polyline_info>,
+    CGAL::cpp11::tuple<To_container, 
+                       To_infos> > out_iterator(to_container,
+                                                to_infos);
+
+  if(itemA && itemB && itemA != itemB) {
+    Polyhedron* A = itemA->polyhedron();
+    Polyhedron* B = itemB->polyhedron();
+    polyline_intersections(*A, *B, out_iterator);
+  } else {
+    if(itemA) {
+      Polyhedron* A = itemA->polyhedron();
+      polyline_intersections(*A, 
+                             poly_ptrs.begin(),
+                             poly_ptrs.end(),
+                             out_iterator,
+                             0);
+    } else {
+      polyline_intersections(poly_ptrs.begin(),
+                             poly_ptrs.end(),
+                             out_iterator,
+                             0);
+    }
+  }
+  QStringList polylines_metadata;
+  BOOST_FOREACH(Polyline_info& info, polylines_infos) {
+    std::set<int> indices;
+    BOOST_FOREACH(Pair_of_facet_handles p, info)
+    {
+      indices.insert(p.first->patch_id());
+      indices.insert(p.second->patch_id());
+    }
+    QString metadata;
+    BOOST_FOREACH(int index, indices) {
+      metadata = metadata + QString(" %1").arg(index);
+    }
+    std::cerr << "new polyline metadata: " << qPrintable(metadata) << "\n";
+    polylines_metadata << metadata;
+  }
+  new_item->setProperty("polylines metadata", polylines_metadata);
+  new_item->setName(tr("intersection"));
+#else
+  Polyhedron* A = itemA->polyhedron();
+  Polyhedron* B = itemB->polyhedron();
+  CGAL::intersection_Polyhedron_3_Polyhedron_3(*A, *B, std::back_inserter(new_item->polylines));
+
+  QString name = tr("%1 intersection %2");
+   
+  new_item->setName(name.arg(itemA->name(), itemB->name()));
+  itemA->setRenderingMode(Wireframe);
+  itemB->setRenderingMode(Wireframe);
+  scene->itemChanged(indexA);
+  scene->itemChanged(indexB);
+#endif
+  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+  new_item->setColor(Qt::green);
+  new_item->setRenderingMode(Wireframe);
+  scene->addItem(new_item);
+  new_item->invalidateOpenGLBuffers();
+
+  QApplication::restoreOverrideCursor();
+}
+
+#include "Intersection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp
new file mode 100644
index 0000000..6780b15
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp
@@ -0,0 +1,522 @@
+#include "Scene_combinatorial_map_item.h"
+#include "Scene_polyhedron_item.h"
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <QObject>
+#include <QMenu>
+#include <QAction>
+#include <QtDebug>
+#include <QDebug>
+#include <QKeyEvent>
+#include <CGAL/corefinement_operations.h>
+
+Scene_combinatorial_map_item::Scene_combinatorial_map_item(CGAL::Three::Scene_interface* scene,void* address):last_known_scene(scene),volume_to_display(0),exportSelectedVolume(NULL),address_of_A(address){m_combinatorial_map=NULL; are_buffers_filled = false; nb_points = 0; nb_lines =0; nb_facets =0;}
+Scene_combinatorial_map_item::~Scene_combinatorial_map_item(){if (m_combinatorial_map!=NULL) delete m_combinatorial_map;}
+
+Scene_combinatorial_map_item* Scene_combinatorial_map_item::clone() const{return NULL;}
+
+Kernel::Vector_3 Scene_combinatorial_map_item::compute_face_normal(Combinatorial_map_3::Dart_const_handle adart) const
+{
+    typedef Combinatorial_map_3::Dart_of_orbit_const_range<1> Dart_in_facet_range;
+    typedef Kernel::Vector_3 Vector_3;
+    Vector_3 normal = CGAL::NULL_VECTOR;
+
+    Dart_in_facet_range vertices=combinatorial_map().darts_of_orbit<1>(adart);
+    Kernel::Point_3 points[3];
+    int index=0;
+    Dart_in_facet_range::const_iterator pit=vertices.begin();
+    for (;pit!=vertices.end() && index!=3;++pit,++index ){
+        points[index]=pit->attribute<0>()->point();
+    }
+
+    if (index!=3) return normal;
+
+    do{
+        Vector_3 n = CGAL::cross_product(points[2]-points[1],points[0]-points[1]);
+        if (n != Vector_3(0,0,0) )
+            normal = normal + (n / std::sqrt(n*n));
+        points[0]=points[1];
+        points[1]=points[2];
+        if ( pit==vertices.end() ) break;
+
+        points[2]=pit->attribute<0>()->point();
+        ++pit;
+    }while(true);
+
+    return normal == Vector_3(0,0,0)? normal : normal / std::sqrt(normal * normal);
+}  
+
+void Scene_combinatorial_map_item::set_next_volume(){
+    //Update des vectors faits ici
+    ++volume_to_display;
+    volume_to_display=volume_to_display%(combinatorial_map().attributes<3>().size()+1);
+  are_buffers_filled = false;
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+
+    if (exportSelectedVolume!=NULL && ( volume_to_display==1 || volume_to_display==0 ) )
+        exportSelectedVolume->setEnabled(!exportSelectedVolume->isEnabled());
+}
+
+
+template <class Predicate> 
+void Scene_combinatorial_map_item::export_as_polyhedron(Predicate pred,const QString& name) const {
+    typedef Combinatorial_map_3::Dart_const_handle Dart_handle;
+    typedef Combinatorial_map_3::One_dart_per_cell_const_range<3> One_dart_per_vol_range;
+    typedef CGAL::internal::Import_volume_as_polyhedron<Polyhedron::HalfedgeDS> Volume_import_modifier;
+
+    std::vector<Dart_handle> darts;
+    One_dart_per_vol_range cell_range=combinatorial_map().template one_dart_per_cell<3>();
+
+
+    for (One_dart_per_vol_range::const_iterator it = cell_range.begin();it!= cell_range.end() ; ++it )
+        if ( pred(it) ){
+            darts.push_back(it);
+            if (Predicate::only_one_run) break;
+        }
+
+    if (!darts.empty())
+    {
+        Volume_import_modifier modifier=Predicate::swap_orientation?
+                    Volume_import_modifier(combinatorial_map(),darts.begin(),darts.end(),Predicate::swap_orientation):
+                    Volume_import_modifier(combinatorial_map(),darts.begin(),darts.end());
+
+        Polyhedron* new_poly=new Polyhedron();
+        new_poly->delegate(modifier);
+        Scene_polyhedron_item* new_item = new Scene_polyhedron_item(new_poly);
+        new_item->setName(name);
+        last_known_scene->addItem(new_item);
+    }
+}
+
+struct Select_volume{
+    static const bool only_one_run=true;
+    static const bool swap_orientation=false;
+    Select_volume(std::size_t i):volume_to_select(i),index(0){}
+    template <class Dart_handle>
+    bool operator() (Dart_handle){
+        return ++index==volume_to_select;
+    }
+private:
+    std::size_t volume_to_select;
+    std::size_t index;
+};
+
+void Scene_combinatorial_map_item::export_current_volume_as_polyhedron() const {
+    if (volume_to_display==0) return; //no volume selected
+
+    Select_volume predicate(volume_to_display);
+    export_as_polyhedron(predicate,QString("%1_%2").arg(this->name()).arg(volume_to_display-1));
+}
+
+struct Select_union{
+    static const bool only_one_run=false;
+    static const bool swap_orientation=true;
+    template <class Dart_handle>
+    bool operator() (Dart_handle d){ return d->template attribute<3>()->info().outside.size()==2; }
+};
+
+struct Select_inter{
+    static const bool only_one_run=false;
+    static const bool swap_orientation=false;
+    template <class Dart_handle>
+    bool operator() (Dart_handle d){ return d->template attribute<3>()->info().inside.size()==2; }
+};
+
+struct Select_A_minus_B{
+    static const bool only_one_run=false;
+    static const bool swap_orientation=false;
+    Select_A_minus_B(void* address):address_of_A(address){}
+    template <class Dart_handle>
+    bool operator() (Dart_handle d){
+        return d->template attribute<3>()->info().inside.size()==1 &&
+                static_cast<void*>(*d->template attribute<3>()->info().inside.begin())==address_of_A;
+    }
+private:
+    void* address_of_A;
+};
+
+struct Select_B_minus_A{
+    static const bool only_one_run=false;
+    static const bool swap_orientation=false;
+    Select_B_minus_A(void* address):address_of_A(address){}
+    template <class Dart_handle>
+    bool operator() (Dart_handle d){
+        return d->template attribute<3>()->info().inside.size()==1 &&
+                static_cast<void*>(*d->template attribute<3>()->info().inside.begin())!=address_of_A;
+    }
+private:
+    void* address_of_A;
+};
+
+void Scene_combinatorial_map_item::export_union_as_polyhedron() const {
+    export_as_polyhedron(Select_union(),QString("%1_union_%2").arg("A").arg("B"));
+}
+void Scene_combinatorial_map_item::export_intersection_as_polyhedron() const{
+    export_as_polyhedron(Select_inter(),QString("%1_inter_%2").arg("A").arg("B"));
+}
+void Scene_combinatorial_map_item::export_A_minus_B_as_polyhedron() const{
+    Select_A_minus_B predicate(address_of_A);
+    export_as_polyhedron(predicate,QString("%1_minus_%2").arg("A").arg("B"));
+}
+void Scene_combinatorial_map_item::export_B_minus_A_as_polyhedron() const{
+    Select_B_minus_A predicate(address_of_A);
+    export_as_polyhedron(predicate,QString("%1_minus_%2").arg("B").arg("A"));
+}
+
+QMenu* Scene_combinatorial_map_item::contextMenu()
+{
+    const char* prop_name = "Menu modified by Scene_combinatorial_map_item.";
+
+    QMenu* menu = Scene_item::contextMenu();
+
+    // Use dynamic properties:
+    // http://doc.qt.io/qt-5/qobject.html#property
+    bool menuChanged = menu->property(prop_name).toBool();
+
+    if(!menuChanged) {
+        QAction* actionSelectNextVolume =
+                menu->addAction(tr("Iterate over volumes"));
+        actionSelectNextVolume->setObjectName("actionSelectNextVolume");
+        connect(actionSelectNextVolume, SIGNAL(triggered()),this, SLOT(set_next_volume()));
+
+        exportSelectedVolume =
+                menu->addAction(tr("Export current volume as polyhedron"));
+        exportSelectedVolume->setObjectName("exportSelectedVolume");
+        connect(exportSelectedVolume, SIGNAL(triggered()),this, SLOT(export_current_volume_as_polyhedron()));
+        exportSelectedVolume->setEnabled(volume_to_display!=0);
+        menu->setProperty(prop_name, true);
+
+        if(is_from_corefinement()){
+            //Export union as polyhedron
+            QAction* exportUnion =
+                    menu->addAction(tr("Export union as polyhedron"));
+            exportUnion->setObjectName("exportUnion");
+            connect(exportUnion, SIGNAL(triggered()),this, SLOT(export_union_as_polyhedron()));
+
+            //Export intersection as polyhedron
+            QAction* exportIntersection =
+                    menu->addAction(tr("Export intersection as polyhedron"));
+            exportIntersection->setObjectName("exportIntersection");
+            connect(exportIntersection, SIGNAL(triggered()),this, SLOT(export_intersection_as_polyhedron()));
+
+            //Export A minus B as polyhedron
+            QAction* exportAMinusB =
+                    menu->addAction(tr("Export A minus B as polyhedron"));
+            exportAMinusB->setObjectName("exportAMinusB");
+            connect(exportAMinusB, SIGNAL(triggered()),this, SLOT(export_A_minus_B_as_polyhedron()));
+
+            //Export B minus A as polyhedron
+            QAction* exportBMinusA =
+                    menu->addAction(tr("Export B minus A as polyhedron"));
+            exportBMinusA->setObjectName("exportBMinusA");
+            connect(exportBMinusA, SIGNAL(triggered()),this, SLOT(export_B_minus_A_as_polyhedron()));
+
+        }
+    }
+    return menu;
+}
+
+bool Scene_combinatorial_map_item::keyPressEvent(QKeyEvent* e){
+    if (e->key()==Qt::Key_N){
+        set_next_volume();
+        return true;
+    }
+    return false;
+}
+
+void Scene_combinatorial_map_item::compute_elements(void) const{
+
+    positions_facets.resize(0);
+    normals.resize(0);
+    positions_lines.resize(0);
+    positions_points.resize(0);
+
+    //Facets
+    {
+    std::size_t index = 0;
+    Combinatorial_map_3::size_type voltreated
+      = combinatorial_map().get_new_mark();
+    Combinatorial_map_3::size_type facetreated
+      = combinatorial_map().get_new_mark();
+    Combinatorial_map_3::Dart_const_range::const_iterator
+            darts_it=combinatorial_map().darts().begin(), darts_end=combinatorial_map().darts().end();
+    for( ; darts_it!=darts_end; ++darts_it)
+    {
+        if ( !combinatorial_map().is_marked(darts_it,voltreated) )
+        {
+            ++index;
+            //iterate over all the darts of the volume
+            Combinatorial_map_3::Dart_of_cell_const_range<3>::const_iterator
+                    vol_it=combinatorial_map().darts_of_cell<3>(darts_it).begin(),
+                    vol_end=combinatorial_map().darts_of_cell<3>(darts_it).end();
+            if ( volume_to_display!=0 && index!=volume_to_display )
+            {
+                //only mark darts if the volume is not the one to display
+                for ( ;vol_it!=vol_end; ++vol_it )
+                {
+                    combinatorial_map().mark(vol_it,facetreated);
+                    combinatorial_map().mark(vol_it, voltreated);
+                }
+            }
+            else
+            {
+                for ( ;vol_it!=vol_end; ++vol_it )
+                {
+                    if ( !combinatorial_map().is_marked(vol_it,facetreated) )
+                    {
+                        Kernel::Vector_3 normal = compute_face_normal(vol_it);
+                        for(int i=0; i<3; i++)
+                        {
+                            normals.push_back(normal.x());
+                            normals.push_back(normal.y());
+                            normals.push_back(normal.z());
+                        }
+
+                        //iterate over all darts of facets
+                        for ( Combinatorial_map_3::Dart_of_orbit_const_range<1>::const_iterator
+                              face_it=combinatorial_map().darts_of_orbit<1>(vol_it).begin(),
+                              face_end=combinatorial_map().darts_of_orbit<1>(vol_it).end();
+                              face_it!=face_end; ++face_it)
+                        {
+                            const Kernel::Point_3& p= face_it->attribute<0>()->point();
+                            positions_facets.push_back(p.x());
+                            positions_facets.push_back(p.y());
+                            positions_facets.push_back(p.z());
+                            combinatorial_map().mark(face_it,facetreated);
+                            combinatorial_map().mark(face_it, voltreated);
+                        }
+                    }
+                }
+            }
+            if ( index==volume_to_display ) break;
+        }
+    }
+    //mark remaining darts to have an O(1) free_mark
+    for( ;  darts_it!=darts_end; ++darts_it)
+    {
+        combinatorial_map().mark(darts_it, facetreated);
+        combinatorial_map().mark(darts_it, voltreated);
+    }
+
+    combinatorial_map().free_mark(facetreated);
+    combinatorial_map().free_mark(voltreated);
+    }
+
+    //edges
+    {
+
+        typedef Combinatorial_map_3::One_dart_per_cell_const_range<1> Edge_darts;
+        Edge_darts darts=combinatorial_map().one_dart_per_cell<1>();
+        for (Edge_darts::const_iterator dit=darts.begin();dit!=darts.end();++dit){
+            CGAL_assertion(!dit->is_free(1));
+            const Kernel::Point_3& a = dit->attribute<0>()->point();
+            const Kernel::Point_3& b = dit->beta(1)->attribute<0>()->point();
+            positions_lines.push_back(a.x());
+            positions_lines.push_back(a.y());
+            positions_lines.push_back(a.z());
+
+            positions_lines.push_back(b.x());
+            positions_lines.push_back(b.y());
+            positions_lines.push_back(b.z());
+
+        }
+    }
+
+    //points
+    {
+        typedef Combinatorial_map_3::Attribute_const_range<0>::type Point_range;
+        const Point_range& points=combinatorial_map().attributes<0>();
+        for(Point_range::const_iterator pit=boost::next(points.begin());pit!=points.end();++pit){
+            const Kernel::Point_3& p=pit->point();
+            positions_points.push_back(p.x());
+            positions_points.push_back(p.y());
+            positions_points.push_back(p.z());
+        }
+
+    }
+
+}
+
+void Scene_combinatorial_map_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const
+{
+    //vao for the edges
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+
+        vaos[Edges]->bind();
+        buffers[Edges_vertices].bind();
+        buffers[Edges_vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Edges_vertices].release();
+        nb_lines = positions_lines.size();
+        positions_lines.resize(0);
+        std::vector<double>(positions_lines).swap(positions_lines);
+        vaos[Edges]->release();
+        program->release();
+    }
+    //vao for the points
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+
+        vaos[Points]->bind();
+        buffers[Points_vertices].bind();
+        buffers[Points_vertices].allocate(positions_points.data(),
+                            static_cast<int>(positions_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Points_vertices].release();
+        vaos[Points]->release();
+        nb_points = positions_points.size();
+        positions_points.resize(0);
+        std::vector<double>(positions_points).swap(positions_points);
+        program->release();
+    }
+    //vao for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+
+        vaos[Facets]->bind();
+        buffers[Facets_vertices].bind();
+        buffers[Facets_vertices].allocate(positions_facets.data(),
+                            static_cast<int>(positions_facets.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Facets_vertices].release();
+
+        buffers[Facets_normals].bind();
+        buffers[Facets_normals].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(double)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_DOUBLE,0,3);
+        buffers[Facets_normals].release();
+        nb_facets = positions_facets.size();
+        positions_facets.resize(0);
+        std::vector<double>(positions_facets).swap(positions_facets);
+        normals.resize(0);
+        std::vector<double>(normals).swap(normals);
+        vaos[Facets]->release();
+        program->release();
+    }
+    are_buffers_filled = true;
+
+
+}
+
+bool Scene_combinatorial_map_item::isEmpty() const {return combinatorial_map().number_of_darts()==0;}
+
+void
+Scene_combinatorial_map_item::compute_bbox() const {
+    typedef Combinatorial_map_3::Attribute_const_range<0>::type Point_range;
+    const Point_range& points=combinatorial_map().attributes<0>();
+    CGAL::Bbox_3 bbox=points.begin()->point().bbox();
+    for(Point_range::const_iterator pit=boost::next(points.begin());pit!=points.end();++pit)
+        bbox=bbox+pit->point().bbox();
+    _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+                bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+
+QString Scene_combinatorial_map_item::toolTip() const{ 
+    if(!m_combinatorial_map)
+        return QString();
+
+    std::vector<unsigned int> cells(5);
+    for (unsigned int i=0; i<=4; ++i)
+        cells[i]=i;
+    std::vector<unsigned int> res = combinatorial_map().count_cells(cells);
+    if (volume_to_display==0)
+        return QObject::tr("<p>Combinatorial_map_3 <b>%1</b> (mode: %8, color: %9)</p>"
+                           "<p>Number of darts: %2<br />"
+                           "Number of vertices: %3<br />"
+                           "Number of edges: %4<br />"
+                           "Number of facets: %5<br />"
+                           "Number of volumes: %6<br />"
+                           "Number of connected components: %7</p>")
+                .arg(this->name())
+                .arg(combinatorial_map().number_of_darts())
+                .arg(res[0])
+                .arg(res[1])
+                .arg(res[2])
+                .arg(res[3])
+                .arg(res[4])
+                .arg(this->renderingModeName())
+                .arg(this->color().name());
+    return QObject::tr("<p>Combinatorial_map_3 <b>%1</b> (mode: %8, color: %9)</p>"
+                       "<p>Number of darts: %2<br />"
+                       "Number of vertices: %3<br />"
+                       "Number of edges: %4<br />"
+                       "Number of facets: %5<br />"
+                       "Number of volumes: %6<br />"
+                       "Number of connected components: %7 <br />"
+                       "Currently Displaying facets of volume: %10 </p>")
+            .arg(this->name())
+            .arg(combinatorial_map().number_of_darts())
+            .arg(res[0])
+            .arg(res[1])
+            .arg(res[2])
+            .arg(res[3])
+            .arg(res[4])
+            .arg(this->renderingModeName())
+            .arg(this->color().name())
+            .arg(volume_to_display-1);
+}
+
+
+void Scene_combinatorial_map_item::draw(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+    vaos[Facets]->bind();
+    program=getShaderProgram(PROGRAM_WITH_LIGHT);
+    attrib_buffers(viewer,PROGRAM_WITH_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors", this->color());
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_facets/3));
+    vaos[Facets]->release();
+    program->release();
+
+}
+ void Scene_combinatorial_map_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+     if(!are_buffers_filled)
+     {
+         compute_elements();
+         initialize_buffers(viewer);
+     }
+     vaos[Edges]->bind();
+     program=getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+     attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+     program->bind();
+     program->setAttributeValue("colors", this->color());
+     viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/3));
+     vaos[Edges]->release();
+     program->release();
+
+}
+ void Scene_combinatorial_map_item::draw_points(CGAL::Three::Viewer_interface* viewer) const
+{
+     if(!are_buffers_filled)
+     {
+         compute_elements();
+         initialize_buffers(viewer);
+     }
+     vaos[Points]->bind();
+     program=getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+     attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+     program->bind();
+     program->setAttributeValue("colors", this->color());
+     viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_points/3));
+     vaos[Points]->release();
+     program->release();
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h
new file mode 100644
index 0000000..a5f1abc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h
@@ -0,0 +1,117 @@
+#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H
+#define SCENE_COMBINATORIAL_MAP_ITEM_H
+
+//=========
+#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h>
+#include "Scene_combinatorial_map_item_config.h"
+#include <iostream>
+#include <QOpenGLBuffer>
+#include <QOpenGLShader>
+#include <QOpenGLShaderProgram>
+#include "Polyhedron_type.h"
+#include  <CGAL/Three/Scene_item.h>
+typedef CGAL::internal_IOP::Item_with_points_and_volume_info<Kernel,Polyhedron> Items;
+typedef CGAL::Combinatorial_map<3,Items> Combinatorial_map_3;
+//=========
+
+class QMenu;
+class QAction;
+namespace CGAL { namespace Three{
+class Scene_interface;
+}}
+class Scene_polyhedron_item;
+class Viewer_interface;
+
+class SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Scene_combinatorial_map_item
+        : public CGAL::Three::Scene_item
+{
+    Q_OBJECT
+public:  
+    Scene_combinatorial_map_item(CGAL::Three::Scene_interface*,void* ad_A=NULL);
+    ~Scene_combinatorial_map_item();
+
+    Scene_combinatorial_map_item* clone() const;
+    // Function to override the context menu
+    QMenu* contextMenu();
+
+    //  bool load(std::istream& in);
+    //  void load(Scene_polyhedron_item*);
+    //  bool save(std::ostream& out) const;
+
+    QString toolTip() const;
+
+    // Indicate if rendering mode is supported
+    virtual bool supportsRenderingMode(RenderingMode m) const { return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS!
+    //Event handling
+    virtual bool keyPressEvent(QKeyEvent*);
+    //drawing of the scene
+    virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+    virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+    virtual void draw(CGAL::Three::Viewer_interface*) const;
+
+    bool isFinite() const { return true; }
+    bool is_from_corefinement() const {return address_of_A!=NULL;}
+    bool isEmpty() const;
+    void compute_bbox() const;
+
+    const Combinatorial_map_3& combinatorial_map() const
+    {
+        return *m_combinatorial_map;
+    }
+
+    Combinatorial_map_3& combinatorial_map()
+    {
+        return *m_combinatorial_map;
+    }
+
+    Combinatorial_map_3* m_combinatorial_map;
+
+private:
+    Kernel::Vector_3 compute_face_normal(Combinatorial_map_3::Dart_const_handle adart) const;
+    CGAL::Three::Scene_interface* last_known_scene;
+    std::size_t volume_to_display;
+    QAction* exportSelectedVolume;
+    void* address_of_A;
+    template <class Predicate> void export_as_polyhedron(Predicate,const QString&) const;
+
+   enum VAOs {
+       Edges = 0,
+       Points,
+       Facets,
+       NbOfVaos = Facets +1
+   };
+   enum VBOs {
+       Edges_vertices = 0,
+       Points_vertices,
+       Facets_vertices,
+       Facets_normals,
+       NbOfVbos = Facets_normals +1
+   };
+
+   mutable std::vector<double> positions_lines;
+   mutable std::vector<double> positions_points;
+   mutable std::vector<double> positions_facets;
+   mutable std::vector<double> normals;
+   mutable std::size_t nb_lines;
+   mutable std::size_t nb_points;
+   mutable std::size_t nb_facets;
+
+    mutable QOpenGLShaderProgram *program;
+
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+
+    using CGAL::Three::Scene_item::compute_elements;
+    void compute_elements(void) const;
+
+public Q_SLOTS:
+    void set_next_volume();
+    void export_current_volume_as_polyhedron() const;
+    void export_union_as_polyhedron() const;
+    void export_intersection_as_polyhedron() const;
+    void export_A_minus_B_as_polyhedron() const;
+    void export_B_minus_A_as_polyhedron() const;
+
+}; // end class Scene_combinatorial_map_item
+
+#endif // SCENE_COMBINATORIAL_MAP_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_combinatorial_map_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/CMakeLists.txt
new file mode 100644
index 0000000..dec1440
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/CMakeLists.txt
@@ -0,0 +1,11 @@
+include( polyhedron_demo_macros )
+polyhedron_demo_plugin(pca_plugin Pca_plugin)
+target_link_libraries(pca_plugin scene_polyhedron_item scene_basic_objects)
+
+polyhedron_demo_plugin(transform_polyhedron_plugin Transform_polyhedron_plugin)
+target_link_libraries(transform_polyhedron_plugin  scene_polyhedron_item scene_polyhedron_transform_item)
+
+polyhedron_demo_plugin(trivial_plugin Trivial_plugin)
+
+polyhedron_demo_plugin(create_bbox_mesh_plugin Create_bbox_mesh_plugin)
+target_link_libraries(create_bbox_mesh_plugin scene_polyhedron_item)
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp
new file mode 100644
index 0000000..533fa4d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp
@@ -0,0 +1,156 @@
+#include <QtCore/qglobal.h>
+
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/gl.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+
+#include <QAction>
+#include <QMainWindow>
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+
+const int cube[][3] = { { 0, 1, 3 },
+                        { 3, 1, 2 },
+                        { 0, 4, 1 },
+                        { 1, 4, 5 },
+                        { 3, 2, 7 },
+                        { 7, 2, 6 },
+                        { 4, 0, 3 },
+                        { 7, 4, 3 },
+                        { 6, 4, 7 },
+                        { 6, 5, 4 },
+                        { 1, 5, 6 },
+                        { 2, 1, 6 } };
+
+using namespace CGAL::Three;
+
+struct Build_bbox_mesh : 
+  public CGAL::Modifier_base<Polyhedron::HalfedgeDS>
+{
+  Scene_interface::Bbox bbox;
+  typedef Polyhedron::HalfedgeDS HDS;
+
+public:
+  Build_bbox_mesh(Scene_interface::Bbox b) : bbox(b) {}
+
+  void operator()( HDS& hds) {
+    CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+    B.begin_surface( 8, 12, 24);
+    typedef HDS::Vertex   Vertex;
+    typedef Vertex::Point Point;
+    B.add_vertex( Point( bbox.xmin, bbox.ymin, bbox.zmin)); // -1 -1 -1
+    B.add_vertex( Point( bbox.xmin, bbox.ymax, bbox.zmin)); // -1 1 -1
+    B.add_vertex( Point( bbox.xmax, bbox.ymax, bbox.zmin)); // 1 1 -1
+    B.add_vertex( Point( bbox.xmax, bbox.ymin, bbox.zmin)); // 1 -1 -1
+    B.add_vertex( Point( bbox.xmin, bbox.ymin, bbox.zmax)); // -1 -1 1
+    B.add_vertex( Point( bbox.xmin, bbox.ymax, bbox.zmax)); // -1 1 1
+    B.add_vertex( Point( bbox.xmax, bbox.ymax, bbox.zmax)); // 1 1 1 
+    B.add_vertex( Point( bbox.xmax, bbox.ymin, bbox.zmax)); // 1 -1 1
+    for(int i = 0; i < 12; ++i) {
+      B.begin_facet();
+      B.add_vertex_to_facet( cube[i][0]);
+      B.add_vertex_to_facet( cube[i][1]);
+      B.add_vertex_to_facet( cube[i][2]);
+      B.end_facet();
+    }
+    B.end_surface();
+  }
+};
+
+class Create_bbox_mesh_plugin : 
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
+  QList<QAction*> actions() const;
+  bool applicable(QAction*) const {
+    if(scene->mainSelectionIndex() != -1)
+      return true;
+  return false;}
+
+protected:
+  void bbox(bool extended = false);
+
+public Q_SLOTS:
+  void createBbox() { bbox(); }
+  void createExtendedBbox() { bbox(true); }
+
+private:
+  Scene_interface* scene;
+  QAction* actionBbox;
+  QAction* actionExtendedBbox;
+
+}; // end Create_bbox_mesh_plugin
+
+void Create_bbox_mesh_plugin::init(QMainWindow* mainWindow, Scene_interface* scene_interface)
+{
+  scene = scene_interface;
+  actionBbox = new QAction(tr("Create &Bbox Mesh"), mainWindow);
+  actionBbox->setObjectName("createBboxMeshAction");
+  connect(actionBbox, SIGNAL(triggered()),
+          this, SLOT(createBbox()));
+  actionExtendedBbox = new QAction(tr("Create &Extended Bbox Mesh"), mainWindow);
+  actionExtendedBbox->setObjectName("createExtendedBboxMeshAction");
+  connect(actionExtendedBbox, SIGNAL(triggered()),
+          this, SLOT(createExtendedBbox()));
+}
+
+QList<QAction*> Create_bbox_mesh_plugin::actions() const {
+  return QList<QAction*>() << actionBbox << actionExtendedBbox;
+}
+
+void Create_bbox_mesh_plugin::bbox(bool extended)
+{
+  Scene_interface::Bbox bbox;
+  bool initialized = false;
+
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    Scene_item* item = scene->item(index);
+    if(item->isFinite() && ! item->isEmpty()) {
+      if(initialized) {
+        bbox = bbox + item->bbox();
+      } else {
+        bbox = item->bbox();
+        initialized = true;
+      }
+    }
+  }
+  std::cerr << "bbox dimensions: " << bbox.xmax - bbox.xmin
+            << "\n                 " << bbox.ymax - bbox.ymin
+            << "\n                 " << bbox.zmax - bbox.zmin
+            << std::endl;
+
+  if(extended) {
+    const double delta_x = ( bbox.xmax - bbox.xmin ) / 20.;
+    const double delta_y = ( bbox.ymax - bbox.ymin ) / 20.;
+    const double delta_z = ( bbox.zmax - bbox.zmin ) / 20.;
+
+    bbox.xmin -= delta_x;
+    bbox.xmax += delta_x;
+    bbox.ymin -= delta_y;
+    bbox.ymax += delta_y;
+    bbox.zmin -= delta_z;
+    bbox.zmax += delta_z;
+  }
+
+  Polyhedron p;
+  
+  Build_bbox_mesh b(bbox);
+  p.delegate(b);
+
+  Scene_item* item = new Scene_polyhedron_item(p);
+  item->setName("Scene bbox mesh");
+  item->setRenderingMode(Wireframe);
+  scene->addItem(item);
+}
+
+#include "Create_bbox_mesh_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp
new file mode 100644
index 0000000..ee5c285
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp
@@ -0,0 +1,232 @@
+#include <QApplication>
+#include <QAction>
+#include <QMainWindow>
+#include "Scene_polyhedron_item.h"
+#include "Scene_plane_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/centroid.h>
+#include <CGAL/bounding_box.h>
+#include <CGAL/linear_least_squares_fitting_3.h>
+
+
+#include <CGAL/Make_quad_soup.h> // output for plane fitting
+#include <CGAL/Make_bar.h> // output for line fitting
+
+#include "Kernel_type.h"
+typedef Kernel::Plane_3 Plane;
+typedef Kernel::Iso_cuboid_3 Iso_cuboid;
+typedef Kernel::Triangle_3 Triangle;
+typedef Kernel::Line_3 Line;
+typedef Kernel::Vector_3 Vector;
+typedef Kernel::Point_3 Point;
+typedef Kernel::FT FT;
+
+using namespace CGAL::Three;
+class Polyhedron_demo_pca_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionFitPlane"
+                         << "actionFitLine";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionFitPlane"] = new QAction("Fit Plane", mw);
+      actions_map["actionFitPlane"]->setProperty("subMenuName", "Principal Component Analysis");
+
+      actions_map["actionFitLine"] = new QAction("Fit Line", mw);
+      actions_map["actionFitLine"]->setProperty("subMenuName", "Principal Component Analysis");
+
+      connect(actions_map["actionFitPlane"], SIGNAL(triggered()),
+              this, SLOT(on_actionFitPlane_triggered()));
+      connect(actions_map["actionFitLine"], SIGNAL(triggered()),
+              this, SLOT(on_actionFitLine_triggered()));
+
+  }
+
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+
+public Q_SLOTS:
+  void on_actionFitPlane_triggered();
+  void on_actionFitLine_triggered();
+
+}; // end Polyhedron_demo_pca_plugin
+
+void Polyhedron_demo_pca_plugin::on_actionFitPlane_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    // get triangles from the mesh
+    std::list<Triangle> triangles;
+    Polyhedron::Facet_iterator f;
+    for(f = pMesh->facets_begin();
+      f != pMesh->facets_end();
+      ++f)
+    {
+      const Point& a = f->halfedge()->vertex()->point();
+      const Point& b = f->halfedge()->next()->vertex()->point();
+      const Point& c = f->halfedge()->prev()->vertex()->point();
+      triangles.push_back(Triangle(a,b,c));
+    }
+
+    // fit plane to triangles
+    Plane plane;
+    std::cout << "Fit plane...";
+    CGAL::linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,CGAL::Dimension_tag<2>());
+    std::cout << "ok" << std::endl;
+
+    // compute centroid
+    Point center_of_mass = CGAL::centroid(triangles.begin(),triangles.end());
+
+//     // compute bounding box diagonal
+//     Iso_cuboid bbox = CGAL::bounding_box(pMesh->points_begin(),pMesh->points_end());
+
+//     // compute scale (for rendering) using diagonal of bbox
+//     Point cmin = (bbox.min)();
+//     Point cmax = (bbox.max)();
+//     FT diag = std::sqrt(CGAL::squared_distance(cmin,cmax));
+//     Vector u1 = plane.base1();
+//     u1 = u1 / std::sqrt(u1*u1);
+//     u1 = u1 * 0.7 * diag;
+//     Vector u2 = plane.base2();
+//     u2 = u2 / std::sqrt(u2*u2);
+//     u2 = u2 * 0.7 * diag;
+//     std::list<Point> points;
+//     points.push_back(center_of_mass + u1);
+//     points.push_back(center_of_mass + u2);
+//     points.push_back(center_of_mass - u1);
+//     points.push_back(center_of_mass - u2);
+
+    // add best fit plane as new polyhedron
+//     Polyhedron *pFit = new Polyhedron;
+//     typedef std::list<Point>::iterator Iterator;
+//     Make_quad_soup<Polyhedron,Kernel,Iterator> quad;
+//     quad.run(points.begin(),points.end(),*pFit);
+
+//     Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pFit);
+    Scene_plane_item* new_item = new Scene_plane_item(this->scene);
+    new_item->setPosition(center_of_mass.x(),
+                          center_of_mass.y(),
+                          center_of_mass.z());
+    const Vector& normal = plane.orthogonal_vector();
+    new_item->setNormal(normal.x(), normal.y(), normal.z());
+    new_item->setName(tr("%1 (plane fit)").arg(item->name()));
+    new_item->setColor(Qt::magenta);
+    new_item->setRenderingMode(item->renderingMode());
+    scene->addItem(new_item);
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+void Polyhedron_demo_pca_plugin::on_actionFitLine_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    // get triangles from the mesh
+    std::list<Triangle> triangles;
+    Polyhedron::Facet_iterator f;
+    for(f = pMesh->facets_begin();
+      f != pMesh->facets_end();
+      ++f)
+    {
+      const Point& a = f->halfedge()->vertex()->point();
+      const Point& b = f->halfedge()->next()->vertex()->point();
+      const Point& c = f->halfedge()->prev()->vertex()->point();
+      triangles.push_back(Triangle(a,b,c));
+    }
+
+    // fit line to triangles
+    Line line;
+    std::cout << "Fit line...";
+    CGAL::linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,CGAL::Dimension_tag<2>());
+    std::cout << "ok" << std::endl;
+
+    // compute centroid
+    Point center_of_mass = CGAL::centroid(triangles.begin(),triangles.end());
+
+    // compute bounding box diagonal
+    Iso_cuboid bbox = CGAL::bounding_box(pMesh->points_begin(),pMesh->points_end());
+
+    // compute scale for rendering using diagonal of bbox
+    Point cmin = (bbox.min)();
+    Point cmax = (bbox.max)();
+    FT diag = std::sqrt(CGAL::squared_distance(cmin,cmax));
+
+    // construct a 3D bar
+    Vector u = line.to_vector();
+    u = u / std::sqrt(u*u);
+
+    Point a = center_of_mass + u * diag;
+    Point b = center_of_mass - u * diag;
+
+    Plane plane_a = line.perpendicular_plane(a);
+
+    Vector u1 = plane_a.base1();
+    u1 = u1 / std::sqrt(u1*u1);
+    u1 = u1 * 0.01 * diag;
+    Vector u2 = plane_a.base2();
+    u2 = u2 / std::sqrt(u2*u2);
+    u2 = u2 * 0.01 * diag;
+
+    Point points[8];
+
+    points[0] = a + u1;
+    points[1] = a + u2;
+    points[2] = a - u1;
+    points[3] = a - u2;
+
+    points[4] = b + u1;
+    points[5] = b + u2;
+    points[6] = b - u1;
+    points[7] = b - u2;
+
+    // add best fit line as new polyhedron bar
+    Polyhedron *pFit = new Polyhedron;
+    Make_bar<Polyhedron,Kernel> bar;
+    bar.run(points,*pFit);
+
+    Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pFit);
+    new_item->setName(tr("%1 (line fit)").arg(item->name()));
+    new_item->setColor(Qt::magenta);
+    new_item->setRenderingMode(item->renderingMode());
+    scene->addItem(new_item);
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Pca_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp
new file mode 100644
index 0000000..3b5ad79
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp
@@ -0,0 +1,124 @@
+#include "Scene_polyhedron_transform_item.h"
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+
+Scene_polyhedron_transform_item::Scene_polyhedron_transform_item(const qglviewer::Vec& pos,const Scene_polyhedron_item* poly_item_,const CGAL::Three::Scene_interface*):
+    Scene_item(NbOfVbos,NbOfVaos),
+    poly_item(poly_item_),
+    manipulable(false),
+    frame(new ManipulatedFrame()),
+    poly(poly_item->polyhedron()),
+    center_(pos)
+
+{
+    frame->setPosition(pos);
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+void Scene_polyhedron_transform_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer =0) const
+{
+    //vao for the edges
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+
+        vaos[Edges]->bind();
+        buffers[Vertices].bind();
+        buffers[Vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[Vertices].release();
+        vaos[Edges]->release();
+
+        program->release();
+    }
+    nb_lines = positions_lines.size();
+    positions_lines.resize(0);
+    std::vector<float>(positions_lines).swap(positions_lines);
+
+    are_buffers_filled = true;
+}
+
+void Scene_polyhedron_transform_item::compute_elements() const
+{
+     positions_lines.resize(0);
+    typedef Kernel::Point_3		Point;
+    typedef Polyhedron::Edge_const_iterator	Edge_iterator;
+
+    Edge_iterator he;
+    for(he = poly->edges_begin();
+        he != poly->edges_end();
+        he++)
+    {
+        const Point& a = he->vertex()->point();
+        const Point& b = he->opposite()->vertex()->point();
+        positions_lines.push_back(a.x()-center_.x);
+        positions_lines.push_back(a.y()-center_.y);
+        positions_lines.push_back(a.z()-center_.z);
+
+        positions_lines.push_back(b.x()-center_.x);
+        positions_lines.push_back(b.y()-center_.y);
+        positions_lines.push_back(b.z()-center_.z);
+
+    }
+}
+
+void Scene_polyhedron_transform_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Edges]->bind();
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    QMatrix4x4 f_matrix;
+    for (int i=0; i<16; ++i){
+        f_matrix.data()[i] = (float)frame->matrix()[i];
+    }
+    QColor color = this->color();
+    program->setAttributeValue("colors",color);
+    program->setUniformValue("f_matrix", f_matrix);
+    program->setUniformValue("is_selected", false);
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/3));
+    vaos[Edges]->release();
+    program->release();
+
+}
+
+QString Scene_polyhedron_transform_item::toolTip() const {
+    return QObject::tr("<p>Affine transformation of <b>%1</b></p>"
+                       "<p>Keep <b>Ctrl</b> pressed and use the arcball to define an affine transformation.<br />"
+                       "Press <b>S</b> to apply the affine transformation to a copy of <b>%1</b>.</p>")
+            .arg(getBase()->name());
+}
+bool Scene_polyhedron_transform_item::keyPressEvent(QKeyEvent* e){
+    if (e->key()==Qt::Key_S){
+    Q_EMIT stop();
+        return true;
+    }
+    return false;
+}
+
+void
+Scene_polyhedron_transform_item::compute_bbox() const {
+    const Kernel::Point_3& p = *(poly->points_begin());
+    CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+    for(Polyhedron::Point_const_iterator it = poly->points_begin();
+        it != poly->points_end();
+        ++it) {
+        bbox = bbox + it->bbox();
+    }
+    _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+                bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+
+void Scene_polyhedron_transform_item::invalidateOpenGLBuffers()
+{
+    compute_elements();
+    are_buffers_filled = false;
+    compute_bbox();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h
new file mode 100644
index 0000000..bc21640
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h
@@ -0,0 +1,61 @@
+#ifndef SCENE_POLYHEDRON_TRANSFORM_ITEM_H
+#define SCENE_POLYHEDRON_TRANSFORM_ITEM_H
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polyhedron_transform_item_config.h"
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QKeyEvent>
+
+// This class represents a polyhedron in the OpenGL scene
+class SCENE_POLYHEDRON_TRANSFORM_ITEM_EXPORT Scene_polyhedron_transform_item 
+        : public CGAL::Three::Scene_item {
+    Q_OBJECT
+    
+    typedef Scene_polyhedron_item Base;
+    
+public: 
+    Scene_polyhedron_transform_item(const qglviewer::Vec& pos,const Scene_polyhedron_item* poly_item,const CGAL::Three::Scene_interface* scene_interface);
+    Scene_item* clone() const{return NULL;}
+    QString toolTip() const;
+    void draw_edges(CGAL::Three::Viewer_interface*) const;
+    void compute_bbox() const;
+    ~Scene_polyhedron_transform_item() {delete frame; Q_EMIT killed();}
+    bool manipulatable() const { return manipulable; }
+    ManipulatedFrame* manipulatedFrame() { return frame; }
+    void setManipulatable(bool b = true) { manipulable = b;}
+    const Scene_polyhedron_item* getBase() const{ return poly_item;  };
+    const qglviewer::Vec& center() const { return center_; }
+    virtual bool supportsRenderingMode(RenderingMode m) const { return m==Wireframe ; }
+    virtual void invalidateOpenGLBuffers();
+    virtual bool keyPressEvent(QKeyEvent*);
+
+private:
+    const Scene_polyhedron_item* poly_item;
+    bool manipulable;
+    qglviewer::ManipulatedFrame* frame;
+    const Polyhedron* poly;
+    qglviewer::Vec center_;
+
+    enum VAOs {
+        Edges=0,
+        NbOfVaos = Edges+1
+    };
+    enum VBOs {
+        Vertices = 0,
+        NbOfVbos = Vertices+1
+    };
+
+    mutable QOpenGLShaderProgram *program;
+    mutable std::vector<float> positions_lines;
+    mutable std::size_t nb_lines;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+    void compute_elements() const;
+
+Q_SIGNALS:
+    void stop();
+    void killed();
+}; // end class Scene_polyhedron_transform_item
+
+#endif // SCENE_POLYHEDRON_TRANSFORM_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp
new file mode 100644
index 0000000..afe9809
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp
@@ -0,0 +1,143 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/bounding_box.h>
+#include "Scene_polyhedron_transform_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+
+#include "Scene_polylines_item.h"
+
+#include <QString>
+#include <QAction>
+#include <QMenu>
+#include <QMainWindow>
+#include <QApplication>
+#include <QTime>
+#include <QMessageBox>
+using namespace CGAL::Three;
+class Polyhedron_demo_transform_polyhedron_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+
+  Polyhedron_demo_transform_polyhedron_plugin():started(false){}
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionTransformPolyhedron;
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())) ||
+           qobject_cast<Scene_polyhedron_transform_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+  
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionTransformPolyhedron = new QAction("Affine Transformation", mw);
+    if(actionTransformPolyhedron) {
+      connect(actionTransformPolyhedron, SIGNAL(triggered()),this, SLOT(go()));
+    }
+  }
+
+  void start(Scene_polyhedron_item*);
+  void end();  
+  
+private:
+
+  QAction*  actionTransformPolyhedron;
+  Scene_polyhedron_transform_item* transform_item;
+  CGAL::Three::Scene_interface::Item_id tr_item_index;
+  bool started;
+
+public Q_SLOTS:
+  void go();
+  void transformed_killed();
+}; // end class Polyhedron_demo_transform_polyhedron_plugin
+
+void Polyhedron_demo_transform_polyhedron_plugin::go(){
+  if (!started){
+    Scene_item* item = scene->item(scene->mainSelectionIndex());
+    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
+    if(!poly_item) return;    
+    
+    started=true;
+    actionTransformPolyhedron->setText("Apply affine transformation");
+    start(poly_item);
+  }
+  else
+    end();    
+}
+
+void Polyhedron_demo_transform_polyhedron_plugin::transformed_killed(){
+    started=false;
+    actionTransformPolyhedron->setText("Affine Transformation");
+}
+
+void Polyhedron_demo_transform_polyhedron_plugin::start(Scene_polyhedron_item* poly_item){
+  QApplication::setOverrideCursor(Qt::PointingHandCursor);
+  
+  Scene_polyhedron_item::Bbox bbox = poly_item->bbox();
+  double x=(bbox.xmin+bbox.xmax)/2;
+  double y=(bbox.ymin+bbox.ymax)/2;
+  double z=(bbox.zmin+bbox.zmax)/2;
+  
+  transform_item = new Scene_polyhedron_transform_item(qglviewer::Vec(x,y,z),poly_item,scene);
+  transform_item->setManipulatable(true);
+  transform_item->setColor(Qt::green);
+  transform_item->setName(tr("Affine Transformation"));
+  connect(transform_item, SIGNAL(stop()),this, SLOT(go()));
+  connect(transform_item, SIGNAL(killed()),this, SLOT(transformed_killed()));
+  tr_item_index=scene->addItem(transform_item);
+  scene->setSelectedItem(tr_item_index);
+}
+
+
+struct Modifier_transform_vertices : public CGAL::Modifier_base<Polyhedron::HalfedgeDS> {
+  typedef Polyhedron::HalfedgeDS HDS;
+  
+  CGAL::Aff_transformation_3<Kernel> transform;
+  Kernel::Vector_3 frame_center_translation;
+  Modifier_transform_vertices(const GLdouble* m,const qglviewer::Vec& tr):
+    transform(m[0],m[4], m[8],m[12],
+              m[1],m[5], m[9],m[13],
+              m[2],m[6],m[10],m[14],
+              /*m[3],m[7],m[11],*/m[15]),
+    frame_center_translation(-tr.x,-tr.y,-tr.z)
+  {
+    CGAL_assertion(m[3]==0);
+    CGAL_assertion(m[7]==0);
+    CGAL_assertion(m[11]==0);
+  }
+  
+  void operator()(HDS& hds)
+  {
+    for (HDS::Vertex_iterator it=hds.vertices_begin(),
+                                   endit=hds.vertices_end();endit!=it;++it)
+    {
+      it->point() = transform( it->point() + frame_center_translation );
+    }
+  }
+};
+
+
+void Polyhedron_demo_transform_polyhedron_plugin::end(){
+  QApplication::restoreOverrideCursor();
+  const GLdouble* matrix = transform_item->manipulatedFrame()->matrix();
+  Modifier_transform_vertices modifier(matrix,transform_item->center());
+  Polyhedron* new_poly=new Polyhedron(*transform_item->getBase()->polyhedron());
+  new_poly->delegate(modifier);
+  
+  Scene_polyhedron_item* new_item=new Scene_polyhedron_item(new_poly);
+  new_item->setName(tr("%1_transformed").arg(transform_item->getBase()->name()));
+  
+  scene->replaceItem(tr_item_index,new_item);
+  delete transform_item;
+}
+
+#include "Transform_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp
new file mode 100644
index 0000000..e77c678
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp
@@ -0,0 +1,199 @@
+#include <QtCore/qglobal.h>
+
+#include  <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/gl.h>
+
+#include <CGAL/Three/Viewer_interface.h>
+#include <QAction>
+#include <QMainWindow>
+
+class Q_DECL_EXPORT Scene_bbox_item : public CGAL::Three::Scene_item
+{
+    Q_OBJECT
+public:
+    Scene_bbox_item(const CGAL::Three::Scene_interface* scene_interface)
+        :  Scene_item(1,1), scene(scene_interface)
+
+    {
+
+        positions_lines.resize(0);
+        //Generates an integer which will be used as ID for each buffer
+    }
+    ~Scene_bbox_item()
+    {
+    }
+    bool isFinite() const { return true; }
+    bool isEmpty() const { return true; }
+    void compute_bbox() const { _bbox = scene->bbox(); }
+
+    Scene_bbox_item* clone() const {
+        return 0;
+    }
+
+    QString toolTip() const {
+        const Bbox& bb = scene->bbox();
+        return QString("<p><b>Scene bounding box</b></p>"
+                       "<p>x range: (%1, %2)<br />"
+                       "y range: (%3, %4)<br />"
+                       "z range: (%5, %6)</p>")
+                .arg(bb.xmin).arg(bb.xmax)
+                .arg(bb.ymin).arg(bb.ymax)
+                .arg(bb.zmin).arg(bb.zmax);
+    }
+
+    // Indicate if rendering mode is supported
+    bool supportsRenderingMode(RenderingMode m) const {
+        return (m == Wireframe);
+    }
+
+    void draw_edges(CGAL::Three::Viewer_interface* viewer) const
+    {
+        if(!are_buffers_filled)
+            initialize_buffers(viewer);
+        vaos[0]->bind();
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+        attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+        program->bind();
+        program->setAttributeValue("colors", this->color());
+        viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size()/3));
+        vaos[0]->release();
+        program->release();
+
+    }
+
+    void invalidateOpenGLBuffers()
+    {
+        compute_elements();
+        are_buffers_filled = false;
+        compute_bbox();
+    }
+
+private:
+
+    mutable std::vector<float> positions_lines;
+    mutable QOpenGLShaderProgram *program;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const
+    {
+
+        //vao containing the data for the lines
+        {
+            program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+            program->bind();
+
+            vaos[0]->bind();
+            buffers[0].bind();
+            buffers[0].allocate(positions_lines.data(),
+                                static_cast<GLsizei>(positions_lines.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[0].release();
+
+            vaos[0]->release();
+            program->release();
+
+        }
+        are_buffers_filled = true;
+    }
+
+    void compute_elements() const
+    {
+        positions_lines.clear();
+        const Bbox& bb = scene->bbox();
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmin); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymin); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmax);
+        positions_lines.push_back(bb.xmax); positions_lines.push_back(bb.ymax); positions_lines.push_back(bb.zmin);
+    }
+
+    const CGAL::Three::Scene_interface* scene;
+};
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_trivial_plugin : 
+        public QObject,
+        public Polyhedron_demo_plugin_interface
+{
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+    void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface);
+    QList<QAction*> actions() const {
+        return QList<QAction*>() << actionBbox;
+    }
+
+    bool applicable(QAction*) const {
+        return true;
+    }
+public Q_SLOTS:
+
+    void bbox();
+    void enableAction();
+
+private:
+    CGAL::Three::Scene_interface* scene;
+    QAction* actionBbox;
+
+
+}; // end Polyhedron_demo_trivial_plugin
+
+void Polyhedron_demo_trivial_plugin::init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface)
+{
+    scene = scene_interface;
+    actionBbox = new QAction(tr("Create Bbox"), mainWindow);
+    //actionBbox->setProperty("subMenuName", "Object creation");
+    connect(actionBbox, SIGNAL(triggered()),
+            this, SLOT(bbox()));
+}
+
+void Polyhedron_demo_trivial_plugin::bbox()
+{
+    for(int i = 0, end = scene->numberOfEntries();
+        i < end; ++i)
+    {
+        if(qobject_cast<Scene_bbox_item*>(scene->item(i)))
+            return;
+    }
+    Scene_item* item = new Scene_bbox_item(scene);
+    connect(item, SIGNAL(destroyed()),
+            this, SLOT(enableAction()));
+    item->setName("Scene bbox");
+    item->setColor(Qt::black);
+    item->setRenderingMode(Wireframe);
+    scene->addItem(item);
+    actionBbox->setEnabled(false);
+}
+
+void Polyhedron_demo_trivial_plugin::enableAction() {
+    actionBbox->setEnabled(true);
+}
+
+#include "Trivial_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/CMakeLists.txt
new file mode 100644
index 0000000..ec4f055
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/CMakeLists.txt
@@ -0,0 +1,77 @@
+include( polyhedron_demo_macros )
+if(EIGEN3_FOUND)
+
+  polyhedron_demo_plugin(jet_fitting_plugin Jet_fitting_plugin)
+  target_link_libraries(jet_fitting_plugin scene_polyhedron_item scene_polylines_item)
+
+else(EIGEN3_FOUND)
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.")
+endif(EIGEN3_FOUND)
+
+if(EIGEN3_FOUND)
+  if("${EIGEN3_VERSION}" VERSION_GREATER "3.1.90")
+
+    qt5_wrap_ui( hole_fillingUI_FILES Hole_filling_widget.ui)
+    polyhedron_demo_plugin(hole_filling_plugin Hole_filling_plugin ${hole_fillingUI_FILES})
+    target_link_libraries(hole_filling_plugin scene_polyhedron_item scene_polylines_item)
+
+    qt5_wrap_ui( fairingUI_FILES Fairing_widget.ui)
+    polyhedron_demo_plugin(fairing_plugin Fairing_plugin ${fairingUI_FILES})
+    target_link_libraries(fairing_plugin scene_polyhedron_selection_item)
+
+    polyhedron_demo_plugin(hole_filling_polyline_plugin Hole_filling_polyline_plugin)
+    target_link_libraries(hole_filling_polyline_plugin scene_polyhedron_item scene_polylines_item)
+  else()
+    message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
+  endif()
+else()
+  message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
+endif()
+
+
+polyhedron_demo_plugin(orient_soup_plugin Orient_soup_plugin)
+target_link_libraries(orient_soup_plugin scene_polygon_soup_item scene_polyhedron_item)
+
+
+polyhedron_demo_plugin(inside_out_plugin Inside_out_plugin)
+target_link_libraries(inside_out_plugin scene_polyhedron_item scene_polygon_soup_item)
+
+polyhedron_demo_plugin(join_and_split_polyhedra_plugin Join_and_split_polyhedra_plugin)
+target_link_libraries(join_and_split_polyhedra_plugin scene_polyhedron_item)
+
+qt5_wrap_ui( Mean_curvature_flow_skeleton_pluginUI_FILES  Mean_curvature_flow_skeleton_plugin.ui)
+polyhedron_demo_plugin(mean_curvature_flow_skeleton_plugin Mean_curvature_flow_skeleton_plugin ${Mean_curvature_flow_skeleton_pluginUI_FILES})
+target_link_libraries(mean_curvature_flow_skeleton_plugin 
+    scene_polyhedron_item 
+    scene_points_with_normal_item
+    scene_polylines_item
+    demo_framework)
+    
+qt5_wrap_ui( point_inside_polyhedronUI_FILES Point_inside_polyhedron_widget.ui)
+polyhedron_demo_plugin(point_inside_polyhedron_plugin Point_inside_polyhedron_plugin ${point_inside_polyhedronUI_FILES})
+target_link_libraries(point_inside_polyhedron_plugin scene_polyhedron_item scene_points_with_normal_item)
+
+
+qt5_wrap_ui( polyhedron_slicerUI_FILES Polyhedron_slicer_widget.ui)
+polyhedron_demo_plugin(polyhedron_slicer_plugin Polyhedron_slicer_plugin ${polyhedron_slicerUI_FILES})
+target_link_libraries(polyhedron_slicer_plugin scene_polyhedron_item scene_basic_objects scene_polylines_item)
+
+polyhedron_demo_plugin(polyhedron_stitching_plugin Polyhedron_stitching_plugin)
+target_link_libraries(polyhedron_stitching_plugin scene_polyhedron_item scene_polylines_item)
+
+qt5_wrap_ui( selectionUI_FILES Selection_widget.ui)
+polyhedron_demo_plugin(selection_plugin Selection_plugin ${selectionUI_FILES})
+target_link_libraries(selection_plugin scene_polyhedron_selection_item scene_points_with_normal_item scene_polylines_item)
+
+polyhedron_demo_plugin(self_intersection_plugin Self_intersection_plugin)
+target_link_libraries(self_intersection_plugin scene_polyhedron_item scene_polyhedron_selection_item)
+
+polyhedron_demo_plugin(triangulate_facets_plugin Triangulate_facets_plugin)
+target_link_libraries(triangulate_facets_plugin scene_polyhedron_item)
+
+polyhedron_demo_plugin(repair_polyhedron_plugin Repair_polyhedron_plugin)
+target_link_libraries(repair_polyhedron_plugin scene_polyhedron_item)
+
+qt5_wrap_ui( isotropicRemeshingUI_FILES Isotropic_remeshing_dialog.ui)
+polyhedron_demo_plugin(isotropic_remeshing_plugin Isotropic_remeshing_plugin  ${isotropicRemeshingUI_FILES})
+target_link_libraries(isotropic_remeshing_plugin  scene_polyhedron_item scene_polyhedron_selection_item)
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp
new file mode 100644
index 0000000..89e5a88
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp
@@ -0,0 +1,135 @@
+#undef NDEBUG
+#include <QtCore/qglobal.h>
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_selection_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "ui_Fairing_widget.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/iterator.h>
+#include <CGAL/Polygon_mesh_processing/fair.h>
+#include <CGAL/Polygon_mesh_processing/refine.h>
+
+#include <QTime>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QDockWidget>
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMouseEvent>
+#include <QFileDialog>
+
+#include <vector>
+#include <algorithm>
+#include <queue>
+
+using namespace CGAL::Three;
+class Polyhedron_demo_fairing_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
+    || qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex()));  
+  }
+  void print_message(QString message) { messages->information(message);}
+  QList<QAction*> actions() const { return QList<QAction*>() << actionFairing; }
+
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) {
+    mw = mainWindow;
+    scene = scene_interface;
+    messages = m;
+    actionFairing = new QAction(tr("Refinement and Fairing"), mw);
+    actionFairing->setProperty("subMenuName", "Polygon Mesh Processing");
+
+    connect(actionFairing, SIGNAL(triggered()), this, SLOT(fairing_action()));
+
+    dock_widget = new QDockWidget("Refinement and Fairing", mw);
+    dock_widget->setVisible(false);
+
+    ui_widget.setupUi(dock_widget);
+    add_dock_widget(dock_widget);
+
+    connect(ui_widget.Fair_button,  SIGNAL(clicked()), this, SLOT(on_Fair_button_clicked()));  
+    connect(ui_widget.Refine_button,  SIGNAL(clicked()), this, SLOT(on_Refine_button_clicked()));
+  }
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+
+public Q_SLOTS:
+  void fairing_action() {
+    dock_widget->show();
+    dock_widget->raise();
+  }
+
+  void on_Fair_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) { return; }
+
+    if(selection_item->selected_vertices.empty()) {
+      print_message("Error: please select a region of vertices!");
+    }
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    int weight_index = ui_widget.Weight_combo_box->currentIndex();
+    unsigned int continuity = ui_widget.Continuity_spin_box->value();
+
+    if(weight_index == 1)
+      CGAL::Polygon_mesh_processing::fair(*selection_item->polyhedron(),
+        selection_item->selected_vertices,
+        CGAL::Polygon_mesh_processing::parameters::weight_calculator(CGAL::internal::Uniform_weight_fairing<Polyhedron>(*selection_item->polyhedron())).
+        fairing_continuity(continuity));
+    if(weight_index == 0)
+      CGAL::Polygon_mesh_processing::fair(*selection_item->polyhedron(),
+        selection_item->selected_vertices,
+        CGAL::Polygon_mesh_processing::parameters::fairing_continuity(continuity));
+    selection_item->changed_with_poly_item();
+    selection_item->invalidateOpenGLBuffers();
+    QApplication::restoreOverrideCursor();
+  }
+
+  void on_Refine_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) { return; }
+
+    if(selection_item->selected_facets.empty()) {
+      print_message("Error: please select a region of facets!");
+    }
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    double alpha = ui_widget.Density_control_factor_spin_box->value();
+    std::vector<Polyhedron::Facet_handle> new_facets;
+
+    CGAL::Polygon_mesh_processing::refine(*selection_item->polyhedron(),
+      selection_item->selected_facets,
+      std::back_inserter(new_facets),
+      CGAL::Emptyset_iterator(),
+      CGAL::Polygon_mesh_processing::parameters::density_control_factor(alpha));
+    // add new facets to selection
+    for(std::vector<Polyhedron::Facet_handle>::iterator it = new_facets.begin(); it != new_facets.end(); ++it) {
+      selection_item->selected_facets.insert(*it);
+    }
+    selection_item->changed_with_poly_item();
+    selection_item->invalidateOpenGLBuffers();
+    QApplication::restoreOverrideCursor();
+  }
+
+private:
+  Messages_interface* messages;
+  QAction* actionFairing;
+
+  QDockWidget* dock_widget;
+  Ui::Fairing ui_widget;
+
+}; // end Polyhedron_demo_fairing_plugin
+
+// Q_EXPORT_PLUGIN2(Polyhedron_demo_fairing_plugin, Polyhedron_demo_fairing_plugin)
+
+#include "Fairing_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui
new file mode 100644
index 0000000..8a4b371
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Fairing</class>
+ <widget class="QDockWidget" name="Fairing">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>296</width>
+    <height>248</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Fairing</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QGroupBox" name="groupBox">
+      <property name="title">
+       <string>Fairing</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
+         <item>
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Weight Type:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="Weight_combo_box">
+           <property name="currentIndex">
+            <number>0</number>
+           </property>
+           <item>
+            <property name="text">
+             <string>Cotangent Weight</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Uniform Weight</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <item>
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Continuity:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="Continuity_spin_box">
+           <property name="minimum">
+            <number>0</number>
+           </property>
+           <property name="maximum">
+            <number>2</number>
+           </property>
+           <property name="value">
+            <number>1</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QPushButton" name="Fair_button">
+         <property name="text">
+          <string>Fair a region defined by a selection of vertices</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox_2">
+      <property name="title">
+       <string>Refinement</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Density Control Factor:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QDoubleSpinBox" name="Density_control_factor_spin_box">
+           <property name="maximum">
+            <double>96.989999999999995</double>
+           </property>
+           <property name="singleStep">
+            <double>0.200000000000000</double>
+           </property>
+           <property name="value">
+            <double>2.410000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QPushButton" name="Refine_button">
+         <property name="text">
+          <string>Refine a region defined by a selection of faces</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp
new file mode 100644
index 0000000..49facb2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp
@@ -0,0 +1,702 @@
+#undef NDEBUG
+#define DEBUG_TRACE
+#include <QtCore/qglobal.h>
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "ui_Hole_filling_widget.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+#include <CGAL/Timer.h>
+#include <CGAL/iterator.h>
+
+#include <QTime>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QDockWidget>
+
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMouseEvent>
+
+#include <vector>
+#include <algorithm>
+
+#include <QGLViewer/qglviewer.h>
+
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+#include "Kernel_type.h"
+
+#include <boost/function_output_iterator.hpp>
+#include <QMap>
+
+// Class for visualizing holes in a polyhedron
+// provides mouse selection functionality
+class Q_DECL_EXPORT Scene_hole_visualizer : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+  // structs
+  struct Polyline_data {
+    Scene_polylines_item* polyline;
+    Polyhedron::Halfedge_handle halfedge;
+    qglviewer::Vec position;
+  };
+  struct Mouse_keyboard_state
+  {
+    bool ctrl_pressing, left_button_pressing;
+    Mouse_keyboard_state() : ctrl_pressing(false), left_button_pressing(false) { }
+  };
+public: typedef std::list<Polyline_data> Polyline_data_list;
+private:
+  struct List_iterator_comparator {
+    bool operator()(Polyline_data_list::const_iterator it_1, Polyline_data_list::const_iterator it_2) const 
+    { return (&*it_1) < (&*it_2); }
+  };
+public:
+  typedef std::set<Polyline_data_list::const_iterator, List_iterator_comparator> Selected_holes_set;
+
+  Scene_hole_visualizer(Scene_polyhedron_item* poly_item, QMainWindow* mainWindow)
+    : poly_item(poly_item), block_poly_item_changed(false)
+  {
+    get_holes();
+    active_hole = polyline_data_list.end();
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    viewer->installEventFilter(this);
+    mainWindow->installEventFilter(this);
+
+    connect(poly_item, SIGNAL(item_is_about_to_be_changed()), this, SLOT(poly_item_changed())); 
+  }
+  ~Scene_hole_visualizer() {
+    clear();
+  }
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return polyline_data_list.empty(); }
+  void compute_bbox() const {
+    if(polyline_data_list.empty()) { _bbox = Bbox(); return;}
+    Bbox bbox = polyline_data_list.begin()->polyline->bbox();
+    for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it) {
+      bbox = bbox + it->polyline->bbox();
+    }
+    _bbox = bbox;
+  }
+  Scene_hole_visualizer* clone() const {
+    return 0;
+  }
+  QString toolTip() const {
+    return tr("%1 with %2 holes").arg(name()).arg(polyline_data_list.size());
+  }
+
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe);
+  }
+  void draw() const {}
+  void draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    
+    for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it) {
+      if(it == active_hole) { viewer->glLineWidth(7.f); }
+      else                  { viewer->glLineWidth(3.f); }
+
+      if(selected_holes.find(it) != selected_holes.end()) 
+      { it->polyline->setRbgColor(255, 0, 0); }
+      else 
+      { it->polyline->setRbgColor(0, 0, 255); }
+
+      it->polyline->draw_edges(viewer);
+    }
+  }
+
+  void select_deselect_all(bool select) {
+    if(select) {
+      for(Polyline_data_list::iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it)
+      { selected_holes.insert(it); }
+    }
+    else {
+      selected_holes.clear();
+    }
+    Q_EMIT itemChanged();
+  }
+
+  // filter events for selecting / activating holes with mouse input
+  bool eventFilter(QObject* /*target*/, QEvent *event)
+  {
+    // This filter is both filtering events from 'viewer' and 'main window'
+    Mouse_keyboard_state old_state = state;
+    // key events
+    if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)  {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+      Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
+
+      state.ctrl_pressing = modifiers.testFlag(Qt::ControlModifier);
+    }
+    // mouse events
+    if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease) {
+      QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
+      if(mouse_event->button() == Qt::LeftButton) {
+        state.left_button_pressing = event->type() == QEvent::MouseButtonPress;
+      }   
+    }
+
+    if(!visible()) { return false; } // if not visible just update event state but don't do any action
+
+    // activate closest hole
+    if(event->type() == QEvent::HoverMove) 
+    {
+      QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+      const QPoint& p = viewer->mapFromGlobal(QCursor::pos());
+      bool need_repaint = activate_closest_hole(p.x(), p.y());
+      if(need_repaint) { Q_EMIT itemChanged(); }
+    }
+
+    // select closest hole
+    bool left_clicked_now = state.left_button_pressing && !old_state.left_button_pressing;
+    if(left_clicked_now && state.ctrl_pressing) {
+      Selected_holes_set::iterator active_it = selected_holes.find(active_hole);
+      if(active_it == selected_holes.end()) {
+        selected_holes.insert(active_hole);
+      }
+      else { selected_holes.erase(active_it); }
+      Q_EMIT itemChanged();
+    }
+    return false;
+  }
+
+private:
+  // find holes in polyhedron and construct a internal polyline for each
+  void get_holes() {
+    typedef Polyhedron::Halfedge_iterator Halfedge_iterator;
+    typedef Polyhedron::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
+    // save selected hole positions to keep selected holes selected
+    // we just use center position of holes for identification which might not work good for advanced cases...
+    std::vector<qglviewer::Vec> selected_hole_positions;
+    for(Selected_holes_set::const_iterator it = selected_holes.begin(); it != selected_holes.end(); ++it) {
+      selected_hole_positions.push_back((*it)->position);
+    }
+
+    clear();
+
+    Polyhedron& poly = *poly_item->polyhedron();
+    for(Halfedge_iterator it = poly.halfedges_begin(); it != poly.halfedges_end(); ++it)
+    { it->id() = 0; }
+
+    for(Halfedge_iterator it = poly.halfedges_begin(); it != poly.halfedges_end(); ++it){
+      if(it->is_border() && it->id() == 0){
+        polyline_data_list.push_back(Polyline_data());
+        Polyline_data& polyline_data = polyline_data_list.back();
+        polyline_data.polyline = new Scene_polylines_item();
+        polyline_data.polyline->polylines.push_back(Scene_polylines_item::Polyline());
+        polyline_data.halfedge = it;
+
+        qglviewer::Vec center;
+        int counter = 0;
+        Halfedge_around_facet_circulator hf_around_facet = it->facet_begin();
+        do {
+          CGAL_assertion(hf_around_facet->id() == 0);
+          hf_around_facet->id() = 1;
+          const Polyhedron::Traits::Point_3& p = hf_around_facet->vertex()->point();          
+          polyline_data.polyline->polylines.front().push_back(p);
+          center += qglviewer::Vec(p.x(), p.y(), p.z());
+          ++counter;
+        } while(++hf_around_facet != it->facet_begin());
+        polyline_data.polyline->polylines.front().push_back(hf_around_facet->vertex()->point());
+        polyline_data.position = center / counter;
+      }
+    }
+    //keep previous selected holes selected
+    for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it) {
+      if(std::find(selected_hole_positions.begin(), selected_hole_positions.end(), it->position) != selected_hole_positions.end()) {
+        selected_holes.insert(it);
+      }
+    }
+  }
+  // finds closest polyline from polyline_data_list and makes it active_hole
+  bool activate_closest_hole(int x, int y) {
+    typedef Polyhedron::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
+    if(polyline_data_list.empty()) { return false; }
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    qglviewer::Camera* camera = viewer->camera();
+
+    Polyline_data_list::const_iterator min_it;
+    double min_dist = (std::numeric_limits<double>::max)();
+    Kernel::Point_2 xy(x,y);
+    for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it)
+    {
+#if 0
+      /* use center of polyline to measure distance - performance wise */
+      const qglviewer::Vec& pos_it = camera->projectedCoordinatesOf(it->position);
+      float dist = std::pow(pos_it.x - x, 2) + std::pow(pos_it.y - y, 2);
+      if(dist < min_dist) {
+        min_dist = dist;
+        min_it = it;
+      }
+#else
+      /* use polyline points to measure distance - might hurt performance for large holes */
+      Halfedge_around_facet_circulator hf_around_facet = it->halfedge->facet_begin();
+      do {
+        
+        const Polyhedron::Traits::Point_3& p_1 = hf_around_facet->vertex()->point();
+        const qglviewer::Vec& pos_it_1 = camera->projectedCoordinatesOf(qglviewer::Vec(p_1.x(), p_1.y(), p_1.z()));
+        const Polyhedron::Traits::Point_3& p_2 = hf_around_facet->opposite()->vertex()->point();
+        const qglviewer::Vec& pos_it_2 = camera->projectedCoordinatesOf(qglviewer::Vec(p_2.x(), p_2.y(), p_2.z()));
+        Kernel::Segment_2 s(Kernel::Point_2(pos_it_1.x, pos_it_1.y), Kernel::Point_2(pos_it_2.x, pos_it_2.y));
+
+        double dist = CGAL::squared_distance(s, xy);
+        if(dist < min_dist) {
+          min_dist = dist;
+          min_it = it;
+        }
+      } while(++hf_around_facet != it->halfedge->facet_begin());
+#endif
+    }
+
+    if(min_it == active_hole) { 
+      return false;
+    }
+    active_hole = min_it;
+    return true;
+  }
+  // clears internal data except poly_item
+  void clear() {
+    for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it) {
+      delete it->polyline;
+    }
+    polyline_data_list.clear();
+    selected_holes.clear();
+    active_hole = polyline_data_list.end();
+  }
+  
+  Polyline_data_list::const_iterator active_hole;
+  Mouse_keyboard_state state;
+public:
+  Selected_holes_set selected_holes;
+  Scene_polyhedron_item* poly_item;
+  Polyline_data_list polyline_data_list;
+  bool block_poly_item_changed;
+
+public Q_SLOTS:
+  void poly_item_changed() {
+    if(block_poly_item_changed) { return; }
+    get_holes();
+    Q_EMIT itemChanged();
+  }
+
+}; // end class Scene_hole_visualizer
+///////////////////////////////////////////////////////////////////////////////////////////////////
+using namespace CGAL::Three;
+class Polyhedron_demo_hole_filling_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  bool applicable(QAction*) const { return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())); }
+  void print_message(QString message) { messages->information(message); }
+  QList<QAction*> actions() const { return QList<QAction*>() << actionHoleFilling; }
+
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m);
+
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+  Scene_hole_visualizer* get_hole_visualizer(Scene_polyhedron_item* poly_item) {
+      return visualizers[poly_item];
+  }
+
+public Q_SLOTS:
+  void hole_filling_action() { 
+    dock_widget->show();
+    dock_widget->raise();
+    if(scene->numberOfEntries() < 2) { on_Visualize_holes_button(); }
+  }
+  void on_Select_all_holes_button();
+  void on_Deselect_all_holes_button();
+  void on_Visualize_holes_button();
+  void on_Fill_selected_holes_button();
+  void on_Create_polyline_items_button();
+  void on_Accept_button();
+  void on_Reject_button();
+  void item_about_to_be_destroyed(CGAL::Three::Scene_item*);
+  void hole_visualizer_changed();
+  void dock_widget_closed();
+  void on_Select_small_holes_button();
+protected:
+  bool eventFilter(QObject *, QEvent *event) {
+    if(event->type() == QEvent::Close) {
+      dock_widget_closed();
+    }
+    return false;
+  }
+
+  void change_poly_item_by_blocking(Scene_polyhedron_item* poly_item, Scene_hole_visualizer* collection) {
+    if(collection) collection->block_poly_item_changed = true;
+    poly_item->invalidateOpenGLBuffers();
+    scene->itemChanged(poly_item);
+    if(collection) collection->block_poly_item_changed = false;
+  }
+private:
+  Messages_interface* messages;
+  QAction* actionHoleFilling;
+
+  QDockWidget* dock_widget;
+  Ui::HoleFilling ui_widget;
+
+  //Maintains a reference between all the visualizers and their poly_item
+  // to ease the management of the visualizers
+  QMap<Scene_polyhedron_item*, Scene_hole_visualizer*> visualizers;
+  // hold created facet for accept reject functionality
+  std::vector<Polyhedron::Facet_handle> new_facets; 
+  Scene_polyhedron_item* last_active_item; // always keep it NULL while not active-reject state
+ 
+  bool fill(Polyhedron& polyhedron, Polyhedron::Halfedge_handle halfedge);
+  bool self_intersecting(Polyhedron& polyhedron);
+  void accept_reject_toggle(bool activate_accept_reject) {
+    if(activate_accept_reject) {
+      ui_widget.Accept_button->setVisible(true);
+      ui_widget.Reject_button->setVisible(true);
+
+      Q_FOREACH( QWidget* w, ui_widget.dockWidgetContents->findChildren<QWidget*>() )
+      { w->setEnabled(false); }
+
+      ui_widget.Accept_button->setEnabled(true);
+      ui_widget.Reject_button->setEnabled(true);
+    }
+    else {
+      ui_widget.Accept_button->setVisible(false);
+      ui_widget.Reject_button->setVisible(false);
+
+      Q_FOREACH( QWidget* w, ui_widget.dockWidgetContents->findChildren<QWidget*>() )
+      { w->setEnabled(true); }
+    }
+  }
+
+  static QString no_selected_hole_visualizer_error_message() {
+    return "Error: please select a hole visualizer from Geometric Objects list."
+      "Use 'Visualize Holes' button to create one by selecting the polyhedron item!";
+  }
+
+}; // end Polyhedron_demo_hole_filling_plugin
+
+void Polyhedron_demo_hole_filling_plugin::init(QMainWindow* mainWindow,
+                                      CGAL::Three::Scene_interface* scene_interface,
+                                      Messages_interface* m)
+{
+  last_active_item = NULL;
+
+  mw = mainWindow;
+  scene = scene_interface;
+  messages = m;
+
+  actionHoleFilling = new QAction(tr("Hole Filling"), mw);
+  actionHoleFilling->setProperty("subMenuName", "Polygon Mesh Processing");
+  connect(actionHoleFilling, SIGNAL(triggered()), this, SLOT(hole_filling_action()));
+
+  dock_widget = new QDockWidget("Hole Filling", mw);
+  dock_widget->setVisible(false);
+  dock_widget->installEventFilter(this);
+
+  ui_widget.setupUi(dock_widget);
+  ui_widget.Accept_button->setVisible(false);
+  ui_widget.Reject_button->setVisible(false);
+
+  add_dock_widget(dock_widget);
+  
+  connect(ui_widget.Visualize_holes_button,  SIGNAL(clicked()), this, SLOT(on_Visualize_holes_button()));  
+  connect(ui_widget.Fill_selected_holes_button,  SIGNAL(clicked()), this, SLOT(on_Fill_selected_holes_button())); 
+  connect(ui_widget.Select_all_holes_button,  SIGNAL(clicked()), this, SLOT(on_Select_all_holes_button()));
+  connect(ui_widget.Deselect_all_holes_button,  SIGNAL(clicked()), this, SLOT(on_Deselect_all_holes_button()));
+  connect(ui_widget.Create_polyline_items_button,  SIGNAL(clicked()), this, SLOT(on_Create_polyline_items_button()));
+  connect(ui_widget.Accept_button,  SIGNAL(clicked()), this, SLOT(on_Accept_button()));
+  connect(ui_widget.Reject_button,  SIGNAL(clicked()), this, SLOT(on_Reject_button()));
+  connect(ui_widget.Select_small_holes_button,  SIGNAL(clicked()), this, SLOT(on_Select_small_holes_button()));
+
+  if(Scene* scene_casted = dynamic_cast<Scene*>(scene_interface)) 
+  { connect(scene_casted, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(item_about_to_be_destroyed(CGAL::Three::Scene_item*))); }
+}
+
+void Polyhedron_demo_hole_filling_plugin::item_about_to_be_destroyed(CGAL::Three::Scene_item* scene_item) {
+  Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene_item);
+  if(poly_item) {
+    // erase assoc polylines item
+    scene->erase( scene->item_id( get_hole_visualizer(poly_item) ) );
+    visualizers.remove(poly_item);
+    // close accept-reject dialog if it is open
+    if(last_active_item == poly_item) {
+      on_Accept_button();
+    }
+  }
+  else {
+    Scene_hole_visualizer* visu_item = qobject_cast<Scene_hole_visualizer*>(scene_item);
+    if(visu_item) {
+        visualizers.remove(visu_item->poly_item);
+    }
+  }
+}
+// removes Scene_hole_visualizer items
+void Polyhedron_demo_hole_filling_plugin::dock_widget_closed() {
+  // remove all Scene_hole_visualizer items
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries();
+    i < end; ++i)
+  {
+    Scene_hole_visualizer* hole_visualizer = qobject_cast<Scene_hole_visualizer*>(scene->item(i));
+    if(hole_visualizer) {
+      scene->erase( scene->item_id(hole_visualizer) );
+    }
+  }
+  on_Accept_button(); 
+}
+// creates a Scene_hole_visualizer and associate it with active Scene_polyhedron_item
+void Polyhedron_demo_hole_filling_plugin::on_Visualize_holes_button() {
+  Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
+  if(!poly_item) {
+    print_message("Error: please select a polyhedron item from Geometric Objects list!");
+    return;
+  }
+
+  if(get_hole_visualizer(poly_item)) {
+    print_message("Error: selected polyhedron item already has an associated hole visualizer!");
+    return;
+  }
+
+  Scene_hole_visualizer* hole_visualizer = new Scene_hole_visualizer(poly_item, mw);
+  visualizers[poly_item] = hole_visualizer;
+  connect(hole_visualizer, SIGNAL(itemChanged()), this, SLOT(hole_visualizer_changed()));
+
+  if(hole_visualizer->polyline_data_list.empty()) {
+    print_message("There is no hole in selected polyhedron item!");
+    visualizers.remove(poly_item);
+    delete hole_visualizer;
+    return;
+  }
+  else {
+    // poly_item->setFlatMode(); // for better visualization
+    int item_id = scene->addItem(hole_visualizer);
+    scene->setSelectedItem(item_id);
+    hole_visualizer->setName(tr("%1-hole visualizer").arg(poly_item->name()));
+  }
+}
+// fills selected holes on active Scene_hole_visualizer
+void Polyhedron_demo_hole_filling_plugin::on_Fill_selected_holes_button() {
+  // get active polylines item
+  Scene_hole_visualizer* hole_visualizer = get_selected_item<Scene_hole_visualizer>();
+  if(!hole_visualizer) {
+    print_message(no_selected_hole_visualizer_error_message());
+    return;
+  }
+  if(hole_visualizer->selected_holes.empty()) {
+    print_message("Error: there is no selected holes in hole visualizer!");
+    return;
+  }
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  // fill selected holes  
+  int counter = 0;
+  int filled_counter = 0;
+  for(Scene_hole_visualizer::Selected_holes_set::iterator it = hole_visualizer->selected_holes.begin();
+    it != hole_visualizer->selected_holes.end(); ++it, ++counter) {
+      print_message(tr("Hole %1:").arg(counter));
+      if( fill(*(hole_visualizer->poly_item->polyhedron()), (*it)->halfedge) ) { ++filled_counter;}
+  }
+
+  if(filled_counter > 0) {
+    change_poly_item_by_blocking(hole_visualizer->poly_item, hole_visualizer);
+    last_active_item = hole_visualizer->poly_item;
+    accept_reject_toggle(true);
+  }
+  print_message(tr("%1 of %2 holes are filled!").arg(filled_counter).arg(counter));
+  QApplication::restoreOverrideCursor();
+}
+
+// fills all holes and removes associated Scene_hole_visualizer if any
+void Polyhedron_demo_hole_filling_plugin::on_Select_all_holes_button() {
+  Scene_hole_visualizer* hole_visualizer = get_selected_item<Scene_hole_visualizer>();
+  if(!hole_visualizer) {
+    print_message(no_selected_hole_visualizer_error_message());
+    return;
+  }
+  hole_visualizer->select_deselect_all(true);
+}
+
+void Polyhedron_demo_hole_filling_plugin::on_Select_small_holes_button() {
+  Scene_hole_visualizer* hole_visualizer = get_selected_item<Scene_hole_visualizer>();
+  if(!hole_visualizer) {
+    print_message(no_selected_hole_visualizer_error_message());
+    return;
+  }
+
+  std::size_t threshold = ui_widget.vertices_threshold_spin_box->value();
+  typedef Scene_hole_visualizer::Polyline_data_list::const_iterator const_iterator;
+  for(const_iterator it = hole_visualizer->polyline_data_list.begin();
+                     it != hole_visualizer->polyline_data_list.end(); ++it)
+  {
+    if(it->polyline->polylines.front().size() <= threshold+1)
+      hole_visualizer->selected_holes.insert(it);
+  }
+  scene->itemChanged(hole_visualizer);
+}
+
+void Polyhedron_demo_hole_filling_plugin::on_Deselect_all_holes_button() {
+  Scene_hole_visualizer* hole_visualizer = get_selected_item<Scene_hole_visualizer>();
+  if(!hole_visualizer) {
+    print_message(no_selected_hole_visualizer_error_message());
+    return;
+  }
+  hole_visualizer->select_deselect_all(false);
+}
+
+// Simply create polyline items and put them into scene - nothing related with other parts of the plugin
+void Polyhedron_demo_hole_filling_plugin::on_Create_polyline_items_button(){
+  Scene_hole_visualizer* hole_visualizer = get_selected_item<Scene_hole_visualizer>();
+  if(!hole_visualizer) {
+    print_message(no_selected_hole_visualizer_error_message());
+    return;
+  }
+  if(hole_visualizer->selected_holes.empty()) {
+    print_message("Error: there is no selected holes in hole visualizer!");
+    return;
+  }
+  int counter = 0;
+  for(Scene_hole_visualizer::Selected_holes_set::iterator it = hole_visualizer->selected_holes.begin();
+    it != hole_visualizer->selected_holes.end(); ++it) {
+      Scene_polylines_item* polyline_item = new Scene_polylines_item();
+      polyline_item->polylines = (*it)->polyline->polylines;
+      polyline_item->setName(QString("selected hole %1").arg(counter++));
+      scene->addItem(polyline_item);
+  }
+}
+void Polyhedron_demo_hole_filling_plugin::on_Accept_button() {
+  if(last_active_item == NULL) { return; }
+
+  accept_reject_toggle(false);
+  if(Scene_hole_visualizer* hole_visualizer = get_hole_visualizer(last_active_item)) 
+  { hole_visualizer->poly_item_changed();}
+
+  new_facets.clear();
+  last_active_item = NULL;
+}
+void Polyhedron_demo_hole_filling_plugin::on_Reject_button() {
+  if(last_active_item == NULL) { return; }
+
+  accept_reject_toggle(false);
+  for(std::vector<Polyhedron::Facet_handle>::iterator it = new_facets.begin(); it != new_facets.end(); ++it) {
+   last_active_item->polyhedron()->erase_facet((*it)->halfedge());
+  }
+  change_poly_item_by_blocking(last_active_item, get_hole_visualizer(last_active_item));
+
+  new_facets.clear();
+  last_active_item = NULL;
+}
+// To delete Scene_hole_visualizer when it becomes empty
+void Polyhedron_demo_hole_filling_plugin::hole_visualizer_changed() {
+  Scene_hole_visualizer* hole_visualizer = qobject_cast<Scene_hole_visualizer*>(this->sender());
+  if(hole_visualizer && hole_visualizer->polyline_data_list.empty()) {
+    scene->erase( scene->item_id(hole_visualizer));
+    visualizers.remove(hole_visualizer->poly_item);
+  }
+}
+// helper function for filling holes
+bool Polyhedron_demo_hole_filling_plugin::fill
+  (Polyhedron& poly, Polyhedron::Halfedge_handle it) {
+
+  int action_index = ui_widget.action_combo_box->currentIndex();
+  double alpha = ui_widget.Density_control_factor_spin_box->value();
+  bool use_DT = ui_widget.Use_delaunay_triangulation_check_box->isChecked();
+  unsigned int continuity = ui_widget.Continuity_spin_box->value();
+
+  CGAL::Timer timer; timer.start();
+  std::vector<Polyhedron::Facet_handle> patch;
+  if(action_index == 0) {
+    CGAL::Polygon_mesh_processing::triangulate_hole(poly,
+             it, std::back_inserter(patch),
+             CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT));
+  }
+  else if(action_index == 1) {
+    CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly,
+             it, std::back_inserter(patch), CGAL::Emptyset_iterator(),
+             CGAL::Polygon_mesh_processing::parameters::density_control_factor(alpha).
+             use_delaunay_triangulation(use_DT));
+  }
+  else {
+    int weight_index = ui_widget.weight_combo_box->currentIndex();
+
+    bool success;
+    if(weight_index == 0) {
+      success = CGAL::cpp11::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly,
+              it, std::back_inserter(patch), CGAL::Emptyset_iterator(),
+              CGAL::Polygon_mesh_processing::parameters::weight_calculator
+                (CGAL::internal::Uniform_weight_fairing<Polyhedron>(poly)).
+              density_control_factor(alpha).
+              fairing_continuity(continuity).
+              use_delaunay_triangulation(use_DT)));
+    }
+    else {
+      success = CGAL::cpp11::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly,
+              it, std::back_inserter(patch), CGAL::Emptyset_iterator(),
+              CGAL::Polygon_mesh_processing::parameters::weight_calculator(CGAL::internal::Cotangent_weight_with_voronoi_area_fairing<Polyhedron>(poly)).
+              density_control_factor(alpha).
+              fairing_continuity(continuity).
+              use_delaunay_triangulation(use_DT)));
+    }
+
+    if(!success) { print_message("Error: fairing is not successful, only triangulation and refinement are applied!"); }
+  }
+  print_message(QString("Took %1 sec.").arg(timer.time()));
+
+  if(patch.empty()) {
+    print_message(tr("Warning: generating patch is not successful! %1")
+      .arg(use_DT ? "Please try without 'Use 3D Delaunay Triangulation'!" : ""));
+    return false;
+  }
+
+  // Self intersection test
+  if(ui_widget.Skip_self_intersection_check_box->checkState() == Qt::Checked) {
+    timer.reset();
+
+    typedef std::vector<std::pair<Polyhedron::Facet_const_handle, Polyhedron::Facet_const_handle> > Intersected_facets;
+    Intersected_facets intersected_facets;
+    CGAL::Polygon_mesh_processing::self_intersections(poly,
+      std::back_inserter(intersected_facets),
+      CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, poly)));
+
+    print_message(QString("Self intersecting test: finding intersecting triangles in %1 sec.").arg(timer.time()));
+    timer.reset();
+    // this part might need speed-up
+    bool intersected = false;
+    for(Intersected_facets::iterator it = intersected_facets.begin(); 
+      it != intersected_facets.end() && !intersected; ++it) {
+      for(std::vector<Polyhedron::Facet_handle>::iterator it_patch = patch.begin(); 
+        it_patch != patch.end() && !intersected; ++it_patch) {
+        if(it->first == (*it_patch) || it->second == (*it_patch)) {
+          intersected = true;
+        }
+      }
+    }
+    print_message(QString("Self intersecting test: iterate on patch in %1 sec.").arg(timer.time()));
+    if(intersected) {
+      for(std::vector<Polyhedron::Facet_handle>::iterator it = patch.begin(); it != patch.end(); ++it) {
+        poly.erase_facet((*it)->halfedge());
+      }
+      print_message("Self intersecting patch is generated, and it is removed.");
+      return false;
+    }
+    else { print_message("No Self intersection found, patch is valid."); }
+  }
+  // save facets for accept-reject 
+  new_facets.insert(new_facets.end(), patch.begin(), patch.end());
+  return true;
+}
+
+// Q_EXPORT_PLUGIN2(Polyhedron_demo_hole_filling_plugin, Polyhedron_demo_hole_filling_plugin)
+
+#include "Hole_filling_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp
new file mode 100644
index 0000000..10844f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp
@@ -0,0 +1,170 @@
+#include <QtCore/qglobal.h>
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include <CGAL/Three/Scene_interface.h>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "Polyhedron_type.h"
+
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+#include <CGAL/Polygon_mesh_processing/refine.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Timer.h>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QInputDialog>
+#include <QMessageBox>
+
+#include <vector>
+#include <algorithm>
+
+#include <boost/function_output_iterator.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+template<class HDS>
+class Polyhedron_builder : public CGAL::Modifier_base<HDS> {
+public:
+  Polyhedron_builder(std::vector<CGAL::Triple<int, int, int> >* triangles, 
+    Scene_polylines_item::Polyline* polyline) 
+    : triangles(triangles), polyline(polyline) 
+  { }
+
+  void operator()(HDS& hds) {
+    CGAL::Polyhedron_incremental_builder_3<HDS> B(hds, true);
+    B.begin_surface(polyline->size() -1, triangles->size());
+
+    for(Scene_polylines_item::Polyline::iterator it = polyline->begin();
+      it != --polyline->end(); ++it) {
+      B.add_vertex(*it);
+    }
+
+    for(std::vector<CGAL::Triple<int, int, int> >::iterator it = triangles->begin();
+      it != triangles->end(); ++it) {
+      B.begin_facet();
+      B.add_vertex_to_facet(it->first);
+      B.add_vertex_to_facet(it->second);
+      B.add_vertex_to_facet(it->third);
+      B.end_facet();
+    }
+
+    B.end_surface();
+  }
+
+private:
+  std::vector<CGAL::Triple<int, int, int> >* triangles;
+  Scene_polylines_item::Polyline* polyline;
+};
+using namespace CGAL::Three;
+class Polyhedron_demo_hole_filling_polyline_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  bool applicable(QAction *) const { return qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex())); }
+  void print_message(QString message) { messages->information(message); }
+  QList<QAction*> actions() const { return QList<QAction*>() << actionHoleFillingPolyline; }
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m){
+    mw = mainWindow;
+    scene = scene_interface;
+    messages = m;
+    actionHoleFillingPolyline = new QAction(tr("Polyline Hole Filling"), mw);
+    connect(actionHoleFillingPolyline, SIGNAL(triggered()),
+      this, SLOT(hole_filling_polyline_action()));
+  }
+private:
+  struct Nop_functor {
+    template<class T>
+    void operator()(const T & /*t*/) const {}
+  };
+  typedef boost::function_output_iterator<Nop_functor> Nop_out;
+
+  struct Get_handle {
+    typedef Polyhedron::Facet_handle result_type;
+    result_type operator()(Polyhedron::Facet& f) const
+    { return f.halfedge()->facet(); }
+  };
+  
+public Q_SLOTS:
+  void hole_filling_polyline_action() {
+    Scene_polylines_item* polylines_item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!polylines_item) {
+      print_message("Error: there is no selected polyline item!");
+      return;
+    } 
+
+    bool also_refine;
+    const double density_control_factor = 
+      QInputDialog::getDouble(mw, tr("Density Control Factor"),
+      tr("Density Control Factor (Cancel for not Refine): "), 1.41, 0.0, 100.0, 2, &also_refine);
+
+    bool use_DT = 
+      QMessageBox::Yes == QMessageBox::question(
+      NULL, "Use Delaunay Triangulation", "Use Delaunay Triangulation ?", QMessageBox::Yes|QMessageBox::No);
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    std::size_t counter = 0;
+    for(Scene_polylines_item::Polylines_container::iterator it = polylines_item->polylines.begin();
+      it != polylines_item->polylines.end(); ++it, ++counter) 
+    {
+      if(it->front() != it->back()) { //not closed, skip it
+        print_message("Warning: skipping not closed polyline!");
+        continue; 
+      } 
+      if(it->size() < 4) { // no triangle, skip it (needs at least 3 + 1 repeat)
+        print_message("Warning: skipping polyline which has less than 4 points!");
+        continue; 
+      }
+
+      CGAL::Timer timer; timer.start();
+      std::vector<CGAL::Triple<int, int, int> > patch;
+      CGAL::Polygon_mesh_processing::triangulate_hole_polyline(*it,
+        std::back_inserter(patch),
+        PMP::parameters::use_delaunay_triangulation(use_DT));
+      print_message(QString("Triangulated in %1 sec.").arg(timer.time()));
+
+      if(patch.empty()) {
+        print_message("Warning: generating patch is not successful, please try it without 'Delaunay Triangulation'!");
+        continue;
+      }
+      Polyhedron* poly = new Polyhedron;
+      Polyhedron_builder<Polyhedron::HalfedgeDS> patch_builder(&patch, &(*it));
+      poly->delegate(patch_builder);
+
+      if(also_refine) {
+        timer.reset();
+        CGAL::Polygon_mesh_processing::refine(*poly, faces(*poly),
+          Nop_out(), Nop_out(),
+          CGAL::Polygon_mesh_processing::parameters::density_control_factor(density_control_factor));
+        print_message(QString("Refined in %1 sec.").arg(timer.time()));
+      }
+
+      Scene_polyhedron_item* poly_item = new Scene_polyhedron_item(poly);
+      poly_item->setName(tr("%1-filled-%2").arg(polylines_item->name()).arg(counter));
+      poly_item->setRenderingMode(FlatPlusEdges);
+      scene->setSelectedItem(scene->addItem(poly_item));
+    }
+    QApplication::restoreOverrideCursor();
+  }
+
+private:
+  QMainWindow* mw;
+  CGAL::Three::Scene_interface* scene;
+  Messages_interface* messages;
+  QAction* actionHoleFillingPolyline;
+
+}; // end Polyhedron_demo_hole_filling_polyline_plugin
+
+// Q_EXPORT_PLUGIN2(Polyhedron_demo_hole_filling_polyline_plugin, Polyhedron_demo_hole_filling_polyline_plugin)
+
+#include "Hole_filling_polyline_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui
new file mode 100644
index 0000000..6bf2368
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HoleFilling</class>
+ <widget class="QDockWidget" name="HoleFilling">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>815</width>
+    <height>973</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Hole Filling</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout_6">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Action:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QComboBox" name="action_combo_box">
+        <property name="currentIndex">
+         <number>2</number>
+        </property>
+        <item>
+         <property name="text">
+          <string>Triangulate</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Triangulate + Refine</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Triangulate + Refine + Fair</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox">
+      <property name="title">
+       <string>Hole Filling Parameters</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_4">
+       <item>
+        <widget class="QCheckBox" name="Use_delaunay_triangulation_check_box">
+         <property name="text">
+          <string>Use 3D Delaunay Triangulation Search Space</string>
+         </property>
+         <property name="checked">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="Skip_self_intersection_check_box">
+         <property name="text">
+          <string>Skip Hole Fillings Making the Surface Self Intersecting</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_8">
+         <item>
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Small Hole #Vertices Threshold</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QDoubleSpinBox" name="vertices_threshold_spin_box">
+           <property name="decimals">
+            <number>0</number>
+           </property>
+           <property name="maximum">
+            <double>999999999.000000000000000</double>
+           </property>
+           <property name="singleStep">
+            <double>1.000000000000000</double>
+           </property>
+           <property name="value">
+            <double>10.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox_2">
+      <property name="title">
+       <string>Refinement Parameters</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_5">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Density Factor</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QDoubleSpinBox" name="Density_control_factor_spin_box">
+           <property name="maximum">
+            <double>96.989999999999995</double>
+           </property>
+           <property name="singleStep">
+            <double>0.200000000000000</double>
+           </property>
+           <property name="value">
+            <double>1.410000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox_3">
+      <property name="title">
+       <string>Fairing Parameters</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_6">
+         <item>
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>Continuity</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="Continuity_spin_box">
+           <property name="minimum">
+            <number>0</number>
+           </property>
+           <property name="maximum">
+            <number>2</number>
+           </property>
+           <property name="value">
+            <number>1</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_7">
+         <item>
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Weight Type</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="weight_combo_box">
+           <property name="currentIndex">
+            <number>1</number>
+           </property>
+           <item>
+            <property name="text">
+             <string>Uniform Weight</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Cotangent Weight</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox_4">
+      <property name="title">
+       <string>Hole Display and Selection</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QPushButton" name="Visualize_holes_button">
+         <property name="enabled">
+          <bool>true</bool>
+         </property>
+         <property name="font">
+          <font>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
+         <property name="text">
+          <string>Detect and Display Holes</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <widget class="QPushButton" name="Select_all_holes_button">
+           <property name="text">
+            <string>Select All Holes</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="Select_small_holes_button">
+           <property name="text">
+            <string>Select Small Holes</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="Deselect_all_holes_button">
+           <property name="text">
+            <string>Deselect All Holes</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_6">
+         <property name="text">
+          <string>Note: Use CTRL+Left mouse click to manually select/deselect a hole</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox_5">
+      <property name="title">
+       <string>Actions</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_5">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <item>
+          <widget class="QPushButton" name="Fill_selected_holes_button">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="text">
+            <string>Fill Selected Holes</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="Create_polyline_items_button">
+           <property name="text">
+            <string>Create Polyline Items for Selected Holes</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_4">
+      <item>
+       <widget class="QPushButton" name="Reject_button">
+        <property name="text">
+         <string>Reject</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Accept_button">
+        <property name="text">
+         <string>Accept</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp
new file mode 100644
index 0000000..f351191
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp
@@ -0,0 +1,83 @@
+#include <QApplication>
+#include <QAction>
+#include <QStringList>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Polygon_mesh_processing/orientation.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_inside_out_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionInsideOut";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionInsideOut"] = getActionFromMainWindow(mw, "actionInsideOut");
+      actions_map["actionInsideOut"]->setProperty("subMenuName", "Polygon Mesh Processing");
+      autoConnectActions();
+
+  }
+  bool applicable(QAction*) const { 
+    const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(index)) 
+      || qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
+  }
+
+public Q_SLOTS:
+  void on_actionInsideOut_triggered();
+
+}; // end Polyhedron_demo_inside_out_plugin
+
+void Polyhedron_demo_inside_out_plugin::on_actionInsideOut_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* poly_item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  Scene_polygon_soup_item* soup_item = 
+    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
+
+  if(poly_item || soup_item)
+  {
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    if(poly_item) {
+      Polyhedron* pMesh = poly_item->polyhedron();
+      if(!pMesh) return;
+  
+      // inside out
+      CGAL::Polygon_mesh_processing::reverse_face_orientations(*pMesh);
+      poly_item->invalidateOpenGLBuffers();
+    }
+    else {
+      soup_item->inside_out();
+      soup_item->invalidateOpenGLBuffers();
+    }
+
+    // update scene
+    scene->itemChanged(index);
+
+    // default cursor
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Inside_out_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui
new file mode 100644
index 0000000..3ddde77
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Isotropic_remeshing_dialog</class>
+ <widget class="QDialog" name="Isotropic_remeshing_dialog">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>414</width>
+    <height>318</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Isotropic remeshing criteria</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="objectName">
+     <property name="font">
+      <font>
+       <pointsize>15</pointsize>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>NO OBJECT</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLabel" name="objectNameSize">
+     <property name="text">
+      <string>No size</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Remesh</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QCheckBox" name="splitEdgesOnly_checkbox">
+        <property name="text">
+         <string>Split only border/selected edges</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Isotropic remeshing</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0" columnstretch="2,0">
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="nbIterations_spinbox">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="nbIterations_label">
+        <property name="text">
+         <string>Number of iterations</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>nbIterations_spinbox</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="edgeLength_label">
+        <property name="text">
+         <string>Target edge length</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy">
+         <cstring>edgeLength_dspinbox</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="edgeLength_dspinbox">
+        <property name="minimumSize">
+         <size>
+          <width>110</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximum">
+         <double>1000.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.100000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="protect_label">
+        <property name="text">
+         <string>Protect borders/selected edges</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QCheckBox" name="protect_checkbox">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QCheckBox" name="smooth1D_checkbox">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="smooth1D_label">
+        <property name="text">
+         <string>Allow 1D smoothing along borders</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QCheckBox" name="preserveDuplicates_checkbox">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="preserveDuplicates_label">
+        <property name="text">
+         <string>Preserve duplicated edges</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>edgeLength_dspinbox</tabstop>
+  <tabstop>nbIterations_spinbox</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Isotropic_remeshing_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>388</x>
+     <y>288</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Isotropic_remeshing_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>388</x>
+     <y>288</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>195</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp
new file mode 100644
index 0000000..ba7c461
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp
@@ -0,0 +1,733 @@
+//#define CGAL_PMP_REMESHING_VERBOSE
+//#define CGAL_PMP_REMESHING_DEBUG
+//#define CGAL_PMP_REMESHING_VERY_VERBOSE
+
+#include <QtCore/qglobal.h>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_polyhedron_selection_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/iterator.h>
+#include <CGAL/Polygon_mesh_processing/remesh.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
+#include <CGAL/utility.h>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/unordered_set.hpp>
+#include <CGAL/property_map.h>
+
+#include <QTime>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QString>
+#include <QDialog>
+#include <QtPlugin>
+
+#include <vector>
+#include <algorithm>
+#include <queue>
+#include <sstream>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include "tbb/parallel_for.h"
+#include "tbb/blocked_range.h"
+#include "tbb/partitioner.h"
+#endif
+
+#include "ui_Isotropic_remeshing_dialog.h"
+
+// give a halfedge and a target edge length, put in `out` points
+// which the edge equally spaced such that splitting the edge
+// using the sequence of points make the edges shorter than
+// `target_length`
+template <class TriangleMesh, class PointPMap, class PointOutputIterator>
+PointOutputIterator
+sample_edge(
+  typename boost::graph_traits<TriangleMesh>::halfedge_descriptor hd,
+  TriangleMesh& triangle_mesh,
+  double target_length,
+  const PointPMap& pmap,
+  PointOutputIterator out)
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point_3;
+  typedef typename CGAL::Kernel_traits<Point_3>::Kernel::Vector_3 Vector_3;
+  typename boost::property_traits<PointPMap>::reference src=get(pmap, source(hd,triangle_mesh) );
+  typename boost::property_traits<PointPMap>::reference tgt=get(pmap, target(hd,triangle_mesh) );
+
+  double length = std::sqrt( CGAL::squared_distance(src, tgt) );
+  if ( length <= target_length ) return out;
+
+  double nb_points = std::floor( length / target_length );
+  Vector_3 unit = (tgt-src) / (nb_points+1);
+
+  for(double i=0; i<nb_points; ++i)
+    *out++=src+unit*(i+1);
+
+  return out;
+}
+
+// given a set of points that are expected to be on an edge, split
+// that edge and retriangulate the face incident to the edge
+// Points are sorted so that they are sorted from the source to the target
+// of the edge (the sequence does not contains edge endpoints)
+template <class TriangleMesh, class PointPMap, class PointRange, class EdgeOutputIterator>
+EdgeOutputIterator
+split_identical_edges(
+  typename boost::graph_traits<TriangleMesh>::halfedge_descriptor hd,
+  TriangleMesh& tm,
+  const PointPMap& pmap,
+  const PointRange& points,
+  EdgeOutputIterator out)
+{
+  typedef typename PointRange::value_type Point_3;
+  typedef boost::graph_traits<TriangleMesh> GT;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+
+  BOOST_FOREACH(const Point_3& p, points)
+  {
+    // split the edge
+    halfedge_descriptor new_hd=CGAL::Euler::split_edge(hd,tm);
+    // set the vertex point
+    put(pmap, target(new_hd, tm), p);
+    *out++=edge(new_hd, tm);
+  }
+  *out++=edge(hd, tm);
+  return out;
+}
+
+// HedgeRange is expected to be a range with value type being
+// std::pair<halfedge_descriptor, TriangleMesh*>
+// Given a set of halfedges representing different edges
+// but with identical endpoints, and a target edge length
+// we split all edges identically so that subedges are
+// or length <= length
+template <class HedgeRange, class Edges_to_protect>
+void split_long_duplicated_edge(const HedgeRange& hedge_range,
+                                double target_length,
+                                Edges_to_protect& edges_to_protect)
+{
+  typedef typename HedgeRange::value_type Pair;
+  typedef typename Pair::first_type halfedge_descriptor;
+  typedef typename boost::remove_pointer<
+    typename Pair::second_type>::type TriangleMesh;
+  typedef typename boost::property_map<TriangleMesh,
+    CGAL::vertex_point_t>::type PointPMap;
+  typedef typename boost::property_traits<PointPMap>::value_type Point_3;
+
+  if (hedge_range.empty()) return;
+
+  const Pair& p = *hedge_range.begin();
+  PointPMap pmap = get(boost::vertex_point, *p.second);
+
+  std::vector<Point_3> points;
+  halfedge_descriptor hd = p.first;
+
+  // collect points to be add inside the edges
+  sample_edge(hd, *p.second, target_length, pmap, std::back_inserter(points) );
+
+  CGAL_assertion_code(Point_3 src = get(pmap, source(hd, *p.second));)
+  CGAL_assertion_code(Point_3 tgt = get(pmap, target(hd, *p.second));)
+
+  // split the edges and collect faces to triangulate
+  BOOST_FOREACH(const Pair& h_and_p, hedge_range)
+  {
+    halfedge_descriptor hc=h_and_p.first;
+    TriangleMesh* polyc = h_and_p.second;
+
+    PointPMap pmap_2 = get(boost::vertex_point, *polyc);
+    //make sure halfedge are consistently oriented
+    CGAL_assertion( get(pmap_2, source(hc, *polyc)) == src );
+    CGAL_assertion( get(pmap_2, target(hc, *polyc)) == tgt );
+
+    typedef typename Edges_to_protect::value_type::second_type Edge_set;
+    Edge_set& edge_set = edges_to_protect[polyc];
+
+    // now split the halfedge and incident faces
+    split_identical_edges(hc,*polyc,pmap_2, points,
+                          std::inserter( edge_set, edge_set.begin()));
+  }
+}
+
+using namespace CGAL::Three;
+class Polyhedron_demo_isotropic_remeshing_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+  typedef boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+  typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
+
+  typedef boost::unordered_set<edge_descriptor, CGAL::Handle_hash_function>    Edge_set;
+  typedef Scene_polyhedron_selection_item::Is_constrained_map<Edge_set> Edge_constrained_pmap;
+
+public:
+  void init(QMainWindow* mainWindow, Scene_interface* scene_interface)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+
+    actionIsotropicRemeshing_ = new QAction("Isotropic Remeshing", mw);
+    actionIsotropicRemeshing_->setProperty("subMenuName", "Polygon Mesh Processing");
+    if (actionIsotropicRemeshing_) {
+      connect(actionIsotropicRemeshing_, SIGNAL(triggered()),
+        this, SLOT(isotropic_remeshing()));
+    }
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionIsotropicRemeshing_;
+  }
+
+  bool applicable(QAction*) const
+  {
+    if (scene->selectionIndices().size() == 1)
+    {
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
+    || qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex()));
+    }
+
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      //if one polyhedron is found in the selection, it's fine
+      if (qobject_cast<Scene_polyhedron_item*>(scene->item(index)))
+        return true;
+    }
+    return false;
+  }
+
+  void detect_and_split_duplicates(std::vector<Scene_polyhedron_item*>& selection,
+                                   std::map<Polyhedron*,Edge_set>& edges_to_protect,
+                                   double target_length)
+  {
+    typedef Polyhedron::Point_3 Point_3;
+    typedef std::pair<Point_3,Point_3> Segment_3;
+
+    typedef std::map< Segment_3,
+                      std::vector< std::pair<halfedge_descriptor, Polyhedron*> > > MapType;
+    MapType duplicated_edges;
+
+
+    BOOST_FOREACH(Scene_polyhedron_item* poly_item, selection){
+      Polyhedron& pmesh = *poly_item->polyhedron();
+      BOOST_FOREACH(edge_descriptor ed, edges(pmesh)){
+        halfedge_descriptor hd = halfedge(ed,pmesh);
+        Point_3 p = source(hd,pmesh)->point(), q = target(hd,pmesh)->point();
+        Segment_3 s = CGAL::make_sorted_pair(p,q);
+        if (s.first==q) hd=opposite(hd,pmesh); // make sure the halfedges are consistently oriented
+
+        duplicated_edges[s].push_back( std::make_pair(hd,&pmesh) );
+      }
+    }
+
+    // consistently split duplicate edges and triangulate incident faces
+    typedef std::pair<face_descriptor, Polyhedron*> Face_and_poly;
+    std::set< Face_and_poly > faces_to_triangulate;
+    BOOST_FOREACH(const MapType::value_type& p, duplicated_edges)
+      if (p.second.size()>1){
+        //collect faces to retriangulate
+        typedef std::pair<halfedge_descriptor, Polyhedron*> Pair_type;
+        BOOST_FOREACH(const Pair_type& h_and_p, p.second)
+        {
+          halfedge_descriptor hc=h_and_p.first;
+          Polyhedron* polyc = h_and_p.second;
+
+          if ( !is_border(hc, *polyc) )
+            faces_to_triangulate.insert( Face_and_poly(face(hc,*polyc), polyc) );
+          if ( !is_border(opposite(hc, *polyc), *polyc) )
+            faces_to_triangulate.insert(
+              Face_and_poly(face(opposite(hc, *polyc),*polyc), polyc) );
+        }
+        // split the edges
+        split_long_duplicated_edge(p.second, target_length, edges_to_protect);
+      }
+    // now retriangulate
+    namespace PMP=CGAL::Polygon_mesh_processing;
+    BOOST_FOREACH(Face_and_poly f_and_p, faces_to_triangulate)
+      PMP::triangulate_face(f_and_p.first, *f_and_p.second);
+  }
+
+
+public Q_SLOTS:
+  void isotropic_remeshing()
+  {
+    if (scene->selectionIndices().size() > 1)
+    {
+      isotropic_remeshing_of_several_polyhedra();
+      return;
+    }
+    const Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+    Scene_polyhedron_item* poly_item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+    Scene_polyhedron_selection_item* selection_item =
+      qobject_cast<Scene_polyhedron_selection_item*>(scene->item(index));
+
+    if (poly_item || selection_item)
+    {
+      // Create dialog box
+      QDialog dialog(mw);
+      Ui::Isotropic_remeshing_dialog ui
+        = remeshing_dialog(&dialog, poly_item, selection_item);
+
+      // Get values
+      int i = dialog.exec();
+      if (i == QDialog::Rejected)
+      {
+        std::cout << "Remeshing aborted" << std::endl;
+        return;
+      }
+      bool edges_only = ui.splitEdgesOnly_checkbox->isChecked();
+      bool preserve_duplicates = ui.preserveDuplicates_checkbox->isChecked();
+      double target_length = ui.edgeLength_dspinbox->value();
+      unsigned int nb_iter = ui.nbIterations_spinbox->value();
+      bool protect = ui.protect_checkbox->isChecked();
+      bool smooth_features = ui.smooth1D_checkbox->isChecked();
+
+      // wait cursor
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      QTime time;
+      time.start();
+
+      typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+      typedef boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+      typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
+
+      const Polyhedron& pmesh = (poly_item != NULL)
+        ? *poly_item->polyhedron()
+        : *selection_item->polyhedron();
+
+      boost::property_map<Polyhedron, CGAL::face_index_t>::type fim
+        = get(CGAL::face_index, pmesh);
+      unsigned int id = 0;
+      BOOST_FOREACH(face_descriptor f, faces(pmesh))
+      {
+        put(fim, f, id++);
+      }
+
+      if (selection_item)
+      {
+        if (edges_only)
+        {
+          std::vector<edge_descriptor> edges;
+          BOOST_FOREACH(edge_descriptor e, selection_item->selected_edges)
+          {
+            if (selection_item->selected_facets.find(face(halfedge(e, pmesh), pmesh))
+                 != selection_item->selected_facets.end()
+             || selection_item->selected_facets.find(face(opposite(halfedge(e, pmesh), pmesh), pmesh))
+                 != selection_item->selected_facets.end())
+              edges.push_back(e);
+          }
+          BOOST_FOREACH(face_descriptor f, selection_item->selected_facets)
+          {
+            BOOST_FOREACH(halfedge_descriptor he, halfedges_around_face(halfedge(f, pmesh), pmesh))
+            {
+              if (selection_item->selected_facets.find(face(opposite(he, pmesh), pmesh))
+                  == selection_item->selected_facets.end())
+              edges.push_back(edge(he, pmesh));
+            }
+          }
+          if (!edges.empty())
+            CGAL::Polygon_mesh_processing::split_long_edges(
+              edges
+              , target_length
+              , *selection_item->polyhedron()
+              , PMP::parameters::geom_traits(Kernel())
+              .edge_is_constrained_map(selection_item->constrained_edges_pmap()));
+          else
+            std::cout << "No selected or boundary edges to be split" << std::endl;
+        }
+        else
+        {
+         CGAL::Polygon_mesh_processing::isotropic_remeshing(
+           selection_item->selected_facets
+         , target_length
+         , *selection_item->polyhedron()
+         , CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter)
+         .protect_constraints(protect)
+         .edge_is_constrained_map(selection_item->constrained_edges_pmap())
+         .smooth_along_features(smooth_features)
+         .vertex_is_constrained_map(selection_item->constrained_vertices_pmap()));
+        }
+        selection_item->poly_item_changed();
+        selection_item->clear<face_descriptor>();
+        selection_item->changed_with_poly_item();
+      }
+      else if (poly_item)
+      {
+        if (edges_only)
+        {
+          std::vector<halfedge_descriptor> border;
+          CGAL::Polygon_mesh_processing::border_halfedges(
+            faces(*poly_item->polyhedron()),
+            pmesh,
+            std::back_inserter(border));
+          std::vector<edge_descriptor> border_edges;
+          BOOST_FOREACH(halfedge_descriptor h, border)
+            border_edges.push_back(edge(h, pmesh));
+
+          if (!border_edges.empty())
+            CGAL::Polygon_mesh_processing::split_long_edges(
+              border_edges
+              , target_length
+              , *poly_item->polyhedron()
+              , PMP::parameters::geom_traits(Kernel()));
+          else
+            std::cout << "No border to be split" << std::endl;
+        }
+        else
+        {
+          // tricks to use the function detect_and_split_duplicates
+          // that uses several poly items
+          std::map<Polyhedron*, Edge_set > edges_to_protect_map;
+          std::vector<Scene_polyhedron_item*> poly_items(1, poly_item);
+          Edge_set& edges_to_protect = edges_to_protect_map[poly_item->polyhedron()];
+          if (preserve_duplicates)
+          {
+            detect_and_split_duplicates(poly_items, edges_to_protect_map, target_length);
+            boost::property_map<Polyhedron, CGAL::face_index_t>::type fim = get(CGAL::face_index, pmesh);
+            unsigned int id = 0;
+            BOOST_FOREACH(face_descriptor f, faces(pmesh))
+              put(fim, f, id++);
+          }
+          Scene_polyhedron_selection_item::Is_constrained_map<Edge_set> ecm(edges_to_protect);
+
+          CGAL::Polygon_mesh_processing::isotropic_remeshing(
+           faces(*poly_item->polyhedron())
+         , target_length
+         , *poly_item->polyhedron()
+         , CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter)
+         .protect_constraints(protect)
+         .edge_is_constrained_map(ecm)
+         .smooth_along_features(smooth_features));
+        }
+        poly_item->invalidateOpenGLBuffers();
+        Q_EMIT poly_item->itemChanged();
+      }
+      else{
+        std::cout << "Can't remesh that type of thing" << std::endl;
+      }
+      std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+      // default cursor
+      QApplication::restoreOverrideCursor();
+    }
+  }
+
+  void isotropic_remeshing_of_several_polyhedra()
+  {
+    // Remeshing parameters
+    bool edges_only = false, preserve_duplicates = false;
+    double target_length = 0.;
+    unsigned int nb_iter = 1;
+    bool protect = false;
+    bool smooth_features = true;
+
+    std::vector<Scene_polyhedron_item*> selection;
+    BOOST_FOREACH(int index, scene->selectionIndices())
+    {
+      Scene_polyhedron_item* poly_item =
+        qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+      if (poly_item == NULL)
+      {
+        std::cout << scene->item(index)->name().data()
+          << " is not a Polyhedron, remeshing skipped\n";
+        continue;
+      }
+      else
+      {
+        selection.push_back(poly_item);
+
+        if (target_length == 0.)//parameters have not been set yet
+        {
+        QDialog dialog(mw);
+        Ui::Isotropic_remeshing_dialog ui = remeshing_dialog(&dialog, poly_item);
+        ui.objectName->setText(QString::number(scene->selectionIndices().size())
+          .append(QString(" items to be remeshed")));
+        int i = dialog.exec();
+        if (i == QDialog::Rejected)
+        {
+          std::cout << "Remeshing aborted" << std::endl;
+          return;
+        }
+
+        edges_only = ui.splitEdgesOnly_checkbox->isChecked();
+        preserve_duplicates = ui.preserveDuplicates_checkbox->isChecked();
+        target_length = ui.edgeLength_dspinbox->value();
+        nb_iter = ui.nbIterations_spinbox->value();
+        protect = ui.protect_checkbox->isChecked();
+        smooth_features = ui.smooth1D_checkbox->isChecked();
+        }
+      }
+    }
+
+    if(target_length == 0.)//parameters have not been set
+    {                      // i.e. no item is a polyhedron
+      std::cout << "Remeshing aborted" << std::endl;
+      return;
+    }
+
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    int total_time = 0;
+
+
+    //     typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+    std::map<Polyhedron*,Edge_set > edges_to_protect;
+
+    if(preserve_duplicates)
+      detect_and_split_duplicates(selection, edges_to_protect, target_length);
+
+#ifdef CGAL_LINKED_WITH_TBB
+    QTime time;
+    time.start();
+
+      tbb::parallel_for(
+        tbb::blocked_range<std::size_t>(0, selection.size()),
+        Remesh_polyhedron_item_for_parallel_for<Remesh_polyhedron_item>(
+                                                                        selection, edges_to_protect, edges_only, target_length, nb_iter, protect, smooth_features));
+
+    total_time = time.elapsed();
+
+#else
+
+    Remesh_polyhedron_item remesher(edges_only,
+      target_length, nb_iter, protect, smooth_features);
+    BOOST_FOREACH(Scene_polyhedron_item* poly_item, selection)
+    {
+      QTime time;
+      time.start();
+
+      remesher(poly_item, edges_to_protect[poly_item->polyhedron()]);
+
+      total_time += time.elapsed();
+      std::cout << "Remeshing of " << poly_item->name().data()
+                << " done in " << time.elapsed() << " ms" << std::endl;
+    }
+#endif
+    std::cout << "Remeshing of all selected items done in "
+      << total_time << " ms" << std::endl;
+
+    BOOST_FOREACH(Scene_polyhedron_item* poly_item, selection)
+    {
+      poly_item->invalidateOpenGLBuffers();
+      Q_EMIT poly_item->itemChanged();
+    }
+
+    // default cursor
+    QApplication::restoreOverrideCursor();
+  }
+
+private:
+  struct Remesh_polyhedron_item
+  {
+    typedef boost::graph_traits<Polyhedron>::edge_descriptor     edge_descriptor;
+    typedef boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+    typedef boost::graph_traits<Polyhedron>::face_descriptor     face_descriptor;
+
+    bool edges_only_;
+    double target_length_;
+    unsigned int nb_iter_;
+    bool protect_;
+    bool smooth_features_;
+
+  protected:
+    void remesh(Scene_polyhedron_item* poly_item,
+                Edge_set& edges_to_protect) const
+    {
+      //fill face_index property map
+      boost::property_map<Polyhedron, CGAL::face_index_t>::type fim
+        = get(CGAL::face_index, *poly_item->polyhedron());
+      unsigned int id = 0;
+      BOOST_FOREACH(face_descriptor f, faces(*poly_item->polyhedron()))
+      { put(fim, f, id++); }
+
+      if (edges_only_)
+      {
+        std::vector<halfedge_descriptor> border;
+        CGAL::Polygon_mesh_processing::border_halfedges(
+          faces(*poly_item->polyhedron())
+          , *poly_item->polyhedron()
+          , std::back_inserter(border));
+        std::vector<edge_descriptor> border_edges;
+        BOOST_FOREACH(halfedge_descriptor h, border)
+          border_edges.push_back(edge(h, *poly_item->polyhedron()));
+
+        CGAL::Polygon_mesh_processing::split_long_edges(
+            border_edges
+          , target_length_
+          , *poly_item->polyhedron());
+      }
+      else
+      {
+        Scene_polyhedron_selection_item::Is_constrained_map<Edge_set > ecm(edges_to_protect);
+        CGAL::Polygon_mesh_processing::isotropic_remeshing(
+            faces(*poly_item->polyhedron())
+          , target_length_
+          , *poly_item->polyhedron()
+          , CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter_)
+          .protect_constraints(protect_)
+          .edge_is_constrained_map(ecm)
+          .smooth_along_features(smooth_features_));
+      }
+    }
+
+  public:
+    Remesh_polyhedron_item(
+      const bool edges_only,
+      const double target_length,
+      const unsigned int nb_iter,
+      const bool protect,
+      const bool smooth_features)
+      : edges_only_(edges_only)
+      , target_length_(target_length)
+      , nb_iter_(nb_iter)
+      , protect_(protect)
+      , smooth_features_(smooth_features)
+    {}
+
+    Remesh_polyhedron_item(const Remesh_polyhedron_item& remesh)
+      : edges_only_(remesh.edges_only_)
+      , target_length_(remesh.target_length_)
+      , nb_iter_(remesh.nb_iter_)
+      , protect_(remesh.protect_)
+      , smooth_features_(remesh.smooth_features_)
+    {}
+
+    void operator()(Scene_polyhedron_item* poly_item,
+                    Edge_set& edges_to_protect) const
+    {
+      remesh(poly_item, edges_to_protect);
+    }
+  };
+
+#ifdef CGAL_LINKED_WITH_TBB
+  template<typename RemeshFunctor>
+  struct Remesh_polyhedron_item_for_parallel_for
+    : RemeshFunctor
+  {
+    const std::vector<Scene_polyhedron_item*>& selection_;
+    std::map<Polyhedron*,Edge_set >& edges_to_protect_;
+
+  public:
+    // Constructor
+    Remesh_polyhedron_item_for_parallel_for(
+      const std::vector<Scene_polyhedron_item*>& selection,
+      std::map<Polyhedron*,Edge_set >& edges_to_protect,
+      const bool edges_only,
+      const double target_length,
+      const unsigned int nb_iter,
+      const bool protect,
+      const bool smooth_features)
+      : RemeshFunctor(edges_only, target_length, nb_iter, protect, smooth_features)
+      , selection_(selection), edges_to_protect_(edges_to_protect)
+    {}
+
+    // Constructor
+    Remesh_polyhedron_item_for_parallel_for(
+      const Remesh_polyhedron_item_for_parallel_for &remesh)
+      : RemeshFunctor(remesh)
+      , selection_(remesh.selection_)
+      , edges_to_protect_(remesh.edges_to_protect_)
+    {}
+
+    // operator()
+    void operator()(const tbb::blocked_range<size_t>& r) const
+    {
+      for (size_t i = r.begin(); i != r.end(); ++i)
+        RemeshFunctor::remesh(selection_[i], edges_to_protect_[selection_[i]->polyhedron()]);
+    }
+  };
+#endif
+
+  Ui::Isotropic_remeshing_dialog
+  remeshing_dialog(QDialog* dialog,
+                   Scene_polyhedron_item* poly_item,
+                   Scene_polyhedron_selection_item* selection_item = NULL)
+  {
+    Ui::Isotropic_remeshing_dialog ui;
+    ui.setupUi(dialog);
+    connect(ui.buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
+    connect(ui.buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
+
+    //connect checkbox to spinbox
+    connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)),
+            ui.nbIterations_spinbox, SLOT(setDisabled(bool)));
+    connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)),
+            ui.protect_checkbox, SLOT(setDisabled(bool)));
+    connect(ui.protect_checkbox, SIGNAL(toggled(bool)),
+            ui.smooth1D_checkbox, SLOT(setDisabled(bool)));
+    connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)),
+            ui.smooth1D_checkbox, SLOT(setDisabled(bool)));
+    connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)),
+            ui.protect_checkbox, SLOT(setChecked(bool)));
+    connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)),
+            ui.protect_checkbox, SLOT(setDisabled(bool)));
+
+    //Set default parameters
+    Scene_interface::Bbox bbox = poly_item != NULL ? poly_item->bbox()
+      : (selection_item != NULL ? selection_item->bbox()
+        : scene->bbox());
+    ui.objectName->setText(poly_item != NULL ? poly_item->name()
+      : (selection_item != NULL ? selection_item->name()
+        : QString("Remeshing parameters")));
+
+    ui.objectNameSize->setText(
+      tr("Object bbox size (w,h,d):  <b>%1</b>,  <b>%2</b>,  <b>%3</b>")
+      .arg(bbox.width(), 0, 'g', 3)
+      .arg(bbox.height(), 0, 'g', 3)
+      .arg(bbox.depth(), 0, 'g', 3));
+
+    double diago_length = bbox.diagonal_length();
+    ui.edgeLength_dspinbox->setDecimals(3);
+    ui.edgeLength_dspinbox->setSingleStep(0.001);
+    ui.edgeLength_dspinbox->setRange(1e-6 * diago_length, //min
+      2.   * diago_length);//max
+    ui.edgeLength_dspinbox->setValue(0.05 * diago_length);
+
+    std::ostringstream oss;
+    oss << "Diagonal length of the Bbox of the selection to remesh is ";
+    oss << diago_length << "." << std::endl;
+    oss << "Default is 5% of it" << std::endl;
+    ui.edgeLength_dspinbox->setToolTip(QString::fromStdString(oss.str()));
+
+    ui.nbIterations_spinbox->setSingleStep(1);
+    ui.nbIterations_spinbox->setRange(1/*min*/, 1000/*max*/);
+    ui.nbIterations_spinbox->setValue(1);
+
+    ui.protect_checkbox->setChecked(false);
+    ui.smooth1D_checkbox->setChecked(true);
+
+    if (NULL != selection_item)
+    {
+      //do not preserve duplicates in selection mode
+      ui.preserveDuplicates_checkbox->setDisabled(true);
+      ui.preserveDuplicates_checkbox->setChecked(false);
+    }
+
+    return ui;
+  }
+
+
+private:
+  QAction* actionIsotropicRemeshing_;
+
+}; // end Polyhedron_demo_isotropic_remeshing_plugin
+
+//Q_EXPORT_PLUGIN2(Polyhedron_demo_isotropic_remeshing_plugin,
+//                 Polyhedron_demo_isotropic_remeshing_plugin)
+
+#include "Isotropic_remeshing_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp
new file mode 100644
index 0000000..2471c53
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp
@@ -0,0 +1,142 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+
+#include <limits>
+
+#include "Scene.h"
+#include <QApplication>
+
+#include <CGAL/Monge_via_jet_fitting.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_jet_fitting_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionEstimateCurvature";
+  }
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionEstimateCurvature"] = getActionFromMainWindow(mw, "actionEstimateCurvature");
+      actions_map["actionEstimateCurvature"]->setProperty("subMenuName",
+                                                          "Estimation of Local Differential Properties");
+      autoConnectActions();
+
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionEstimateCurvature_triggered();
+}; // end Polyhedron_demo_jet_fitting_plugin
+
+void Polyhedron_demo_jet_fitting_plugin::on_actionEstimateCurvature_triggered()
+{
+  // get active polyhedron
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  Scene_polyhedron_item* poly_item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+  if(!poly_item)
+    return;
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  Polyhedron* pMesh = poly_item->polyhedron();
+
+  // types
+  typedef CGAL::Monge_via_jet_fitting<Kernel> Fitting;
+  typedef Fitting::Monge_form Monge_form;
+
+  typedef Kernel::Point_3 Point;
+
+  Scene_polylines_item* max_curv = new Scene_polylines_item;
+  max_curv->setColor(Qt::red);
+  max_curv->setName(tr("%1 (max curvatures)").arg(poly_item->name()));
+  Scene_polylines_item* min_curv = new Scene_polylines_item;
+  min_curv->setColor(Qt::green);
+  min_curv->setName(tr("%1 (min curvatures)").arg(poly_item->name()));
+
+  Polyhedron::Vertex_iterator v;
+  for(v = pMesh->vertices_begin();
+      v != pMesh->vertices_end();
+      v++)
+  {
+    std::vector<Point> points;
+
+    // pick central point
+    const Point& central_point = v->point();
+    points.push_back(central_point);
+
+    // compute min edge len around central vertex
+    // to scale the ribbons used to display the directions
+
+    typedef Kernel::FT FT;
+
+    FT min_edge_len = std::numeric_limits<FT>::infinity();
+    Polyhedron::Halfedge_around_vertex_circulator he = v->vertex_begin();
+    Polyhedron::Halfedge_around_vertex_circulator end = he;
+    CGAL_For_all(he,end)
+    {
+      const Point& p = he->opposite()->vertex()->point();
+      points.push_back(p);
+      FT edge_len = std::sqrt(CGAL::squared_distance(central_point,p));
+      min_edge_len = edge_len < min_edge_len ? edge_len : min_edge_len; // avoids #undef min
+    }
+
+    if(points.size() > 5)
+    {
+      // estimate curvature by fitting
+      Fitting monge_fit;
+      const int dim_monge = 2;
+      const int dim_fitting = 2;
+      Monge_form monge_form = monge_fit(points.begin(),points.end(),dim_fitting,dim_monge);
+
+      // make monge form comply with vertex normal (to get correct
+      // orientation)
+      typedef Kernel::Vector_3 Vector;
+      Vector n = CGAL::Polygon_mesh_processing::compute_vertex_normal(v, *pMesh);
+      monge_form.comply_wrt_given_normal(n);
+
+      Vector umin = min_edge_len * monge_form.minimal_principal_direction();
+      Vector umax = min_edge_len * monge_form.maximal_principal_direction();
+
+      Scene_polylines_item::Polyline max_segment(2), min_segment(2);
+
+      const double du = 0.2;
+
+      max_segment[0] = central_point + du * umax;
+      max_segment[1] = central_point - du * umax;
+      min_segment[0] = central_point + du * umin;
+      min_segment[1] = central_point - du * umin;
+
+      max_curv->polylines.push_back(max_segment);
+      min_curv->polylines.push_back(min_segment);
+    }
+  }
+
+  scene->addItem(max_curv);
+  scene->addItem(min_curv);
+  max_curv->invalidateOpenGLBuffers();
+  min_curv->invalidateOpenGLBuffers();
+  
+  // default cursor
+  QApplication::restoreOverrideCursor();
+}
+
+#include "Jet_fitting_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp
new file mode 100644
index 0000000..726a837
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp
@@ -0,0 +1,176 @@
+#include <QApplication>
+#include <QMessageBox>
+#include <QMainWindow>
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include "Messages_interface.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
+
+#include <CGAL/Polyhedron_copy_3.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+
+#include <boost/foreach.hpp>
+#include <boost/function_output_iterator.hpp>
+using namespace CGAL::Three;
+class Polyhedron_demo_join_and_split_polyhedra_plugin:
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  QAction* actionJoinPolyhedra, *actionSplitPolyhedra, *actionColorConnectedComponents;
+  Messages_interface* msg_interface;
+public:
+  QList<QAction*> actions() const { return QList<QAction*>() << actionJoinPolyhedra << actionSplitPolyhedra << actionColorConnectedComponents; }
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m)
+  {
+    msg_interface = m;
+    actionJoinPolyhedra= new QAction(tr("Join Selected Polyhedra"), mainWindow);
+    actionJoinPolyhedra->setProperty("subMenuName", "Operations on Polyhedra");
+    actionJoinPolyhedra->setObjectName("actionJoinPolyhedra");
+
+    actionSplitPolyhedra= new QAction(tr("Split Selected Polyhedra"), mainWindow);
+    actionSplitPolyhedra->setProperty("subMenuName", "Operations on Polyhedra");
+    actionSplitPolyhedra->setObjectName("actionSplitPolyhedra");
+
+    actionColorConnectedComponents = new QAction(tr("Color Each Connected Component of Selected Polyhedra"), mainWindow);
+    actionColorConnectedComponents ->setProperty("subMenuName", "Polygon Mesh Processing");
+    actionColorConnectedComponents->setObjectName("actionColorConnectedComponents");
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(index)) )
+        return true;
+    }
+    return false;
+  }
+
+public Q_SLOTS:
+  void on_actionJoinPolyhedra_triggered();
+  void on_actionSplitPolyhedra_triggered();
+  void on_actionColorConnectedComponents_triggered();
+
+}; // end Polyhedron_demo_polyhedron_stitching_plugin
+
+void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionJoinPolyhedra_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id mainSelectionIndex
+    = scene->mainSelectionIndex();
+  Scene_polyhedron_item* mainSelectionItem
+    = qobject_cast<Scene_polyhedron_item*>(scene->item(mainSelectionIndex));
+
+  QList<int> indices_to_remove;
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    if (index == mainSelectionIndex)
+      continue;
+
+    Scene_polyhedron_item* item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(item)
+    {
+      indices_to_remove.push_front(index);
+      CGAL::Polyhedron_copy_3<Polyhedron, Polyhedron::HalfedgeDS, false>
+        modifier( *(item->polyhedron()) );
+      mainSelectionItem->polyhedron()->delegate(modifier);
+    }
+  }
+
+  mainSelectionItem->invalidateOpenGLBuffers();
+  scene->itemChanged(mainSelectionIndex);
+
+  //remove the other items
+  Q_FOREACH(int index, indices_to_remove)
+  {
+    scene->erase(index);
+  }
+}
+
+struct Polyhedron_appender{
+  Polyhedron_appender(std::list<Polyhedron*>& new_polyhedra):
+    m_new_polyhedra(new_polyhedra) {}
+  void operator()(const Polyhedron& p){
+    m_new_polyhedra.push_back( new Polyhedron(p) );
+  }
+  std::list<Polyhedron*>& m_new_polyhedra;
+};
+
+void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionSplitPolyhedra_triggered()
+{
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    Scene_polyhedron_item* item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(item)
+    {
+      std::list<Polyhedron*> new_polyhedra;
+      CGAL::internal::corefinement::extract_connected_components(
+        *item->polyhedron(),
+        boost::make_function_output_iterator(Polyhedron_appender(new_polyhedra))
+      );
+
+      if (new_polyhedra.size()==1)
+      {
+        delete new_polyhedra.front();
+        msg_interface->information( tr("%1 has only one connected component").arg(item->name()) );
+        continue;
+      }
+
+      int cc=0;
+      BOOST_FOREACH(Polyhedron* polyhedron_ptr, new_polyhedra)
+      {
+        Scene_polyhedron_item* new_item=new Scene_polyhedron_item(polyhedron_ptr);
+        new_item->setName(tr("%1 - CC %2").arg(item->name()).arg(cc));
+        ++cc;
+        scene->addItem(new_item);
+      }
+      item->setVisible(false);
+    }
+  }
+}
+
+struct Polyhedron_cc_marker{
+  int cc_index;
+  Polyhedron_cc_marker() : cc_index(0) {}
+  void start_new_connected_component(){
+    ++cc_index;
+  }
+
+  template <class Facet_iterator>
+  void mark(Facet_iterator begin, Facet_iterator end)
+  {
+    for(;begin!=end; ++begin)
+      (*begin)->set_patch_id(cc_index-1);
+  }
+};
+
+void Polyhedron_demo_join_and_split_polyhedra_plugin::on_actionColorConnectedComponents_triggered()
+{
+  Q_FOREACH(int index, scene->selectionIndices()) {
+    Scene_polyhedron_item* item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(item)
+    {
+        item->setItemIsMulticolor(true);
+      std::list<Polyhedron*> new_polyhedra;
+      Polyhedron_cc_marker marker;
+      CGAL::internal::corefinement::mark_connected_components(
+        *item->polyhedron(),
+        CGAL::internal::corefinement::Dummy_true(),
+        marker
+      );
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(item);
+    }
+  }
+}
+
+
+#include "Join_and_split_polyhedra_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp
new file mode 100644
index 0000000..57a7667
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp
@@ -0,0 +1,920 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "ui_Mean_curvature_flow_skeleton_plugin.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_points_with_normal_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene.h"
+
+#include "Polyhedron_type.h"
+
+#include <QApplication>
+#include <QMainWindow>
+#include <QInputDialog>
+#include <QTime>
+#include <QMessageBox>
+
+#include <Eigen/Sparse>
+
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Eigen_solver_traits.h>
+#include <CGAL/extract_mean_curvature_flow_skeleton.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <CGAL/boost/graph/split_graph_into_polylines.h>
+#include <CGAL/mesh_segmentation.h>
+#include <CGAL/Polyhedron_copy_3.h>
+#include <queue>
+
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor          vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator            vertex_iterator;
+typedef boost::graph_traits<Polyhedron>::halfedge_descriptor        halfedge_descriptor;
+typedef Polyhedron::Facet_iterator                                  Facet_iterator;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Polyhedron>      Mean_curvature_skeleton;
+typedef Mean_curvature_skeleton::Skeleton Skeleton;
+
+typedef Polyhedron::Traits         Kernel;
+typedef Kernel::Point_3            Point;
+
+struct Polyline_visitor
+{
+  typedef std::vector<Point> Polyline;
+  typedef std::vector<std::size_t> Polyline_of_ids;
+
+  std::list<Polyline>& polylines;
+  Skeleton& skeleton;
+
+  Polyline_visitor(std::list<Polyline>& lines, Skeleton& skeleton)
+    : polylines(lines),
+      skeleton(skeleton)
+  {}
+
+  void start_new_polyline()
+  {
+    Polyline V;
+    polylines.push_back(V);
+  }
+
+  void add_node(boost::graph_traits<Skeleton>::vertex_descriptor vd)
+  {
+    Polyline& polyline = polylines.back();
+    polyline.push_back(skeleton[vd].point);
+  }
+
+  void end_polyline(){}
+};
+
+template<class ValueType>
+struct Facet_with_id_pmap
+    : public boost::put_get_helper<ValueType&,
+             Facet_with_id_pmap<ValueType> >
+{
+    typedef Polyhedron::Face_handle key_type;
+    typedef ValueType value_type;
+    typedef value_type& reference;
+    typedef boost::lvalue_property_map_tag category;
+
+    Facet_with_id_pmap(
+      std::vector<ValueType>& internal_vector
+    ) : internal_vector(internal_vector) { }
+
+    reference operator[](key_type key) const
+    { return internal_vector[key->id()]; }
+private:
+    std::vector<ValueType>& internal_vector;
+};
+using namespace CGAL::Three;
+class Polyhedron_demo_mean_curvature_flow_skeleton_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  QAction* actionMCFSkeleton;
+  QAction* actionConvert_to_medial_skeleton;
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionMCFSkeleton" << "actionConvert_to_medial_skeleton";
+  }
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    mcs = NULL;
+    dockWidget = NULL;
+    ui = NULL;
+
+    actionMCFSkeleton = new QAction(tr("Mean Curvature Skeleton (Advanced)"), mainWindow);
+    actionMCFSkeleton->setProperty("subMenuName", "Triangulated Surface Mesh Skeletonization");
+    actionMCFSkeleton->setObjectName("actionMCFSkeleton");
+
+    actionConvert_to_medial_skeleton = new QAction(tr("Extract Medial Skeleton"), mainWindow);
+    actionConvert_to_medial_skeleton->setProperty("subMenuName", "Triangulated Surface Mesh Skeletonization");
+    actionConvert_to_medial_skeleton->setObjectName("actionConvert_to_medial_skeleton");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+
+    dockWidget = new QDockWidget(mw);
+    dockWidget->setVisible(false);
+    ui = new Ui::Mean_curvature_flow_skeleton_plugin();
+    ui->setupUi(dockWidget);
+    dockWidget->setFeatures(QDockWidget::DockWidgetMovable
+                          | QDockWidget::DockWidgetFloatable
+                          | QDockWidget::DockWidgetClosable);
+    dockWidget->setWindowTitle("Mean Curvature Flow Skeleton");
+    add_dock_widget(dockWidget);
+
+    connect(ui->pushButton_contract, SIGNAL(clicked()),
+            this, SLOT(on_actionContract()));
+    connect(ui->pushButton_collapse, SIGNAL(clicked()),
+            this, SLOT(on_actionCollapse()));
+    connect(ui->pushButton_split, SIGNAL(clicked()),
+            this, SLOT(on_actionSplit()));
+    connect(ui->pushButton_degeneracy, SIGNAL(clicked()),
+            this, SLOT(on_actionDegeneracy()));
+    connect(ui->pushButton_run, SIGNAL(clicked()),
+            this, SLOT(on_actionRun()));
+    connect(ui->pushButton_skeletonize, SIGNAL(clicked()),
+            this, SLOT(on_actionSkeletonize()));
+    connect(ui->pushButton_converge, SIGNAL(clicked()),
+            this, SLOT(on_actionConverge()));
+    connect(dynamic_cast<Scene*>(scene), SIGNAL(updated_bbox()),
+            this, SLOT(on_actionUpdateBBox()));
+    connect(ui->pushButton_segment, SIGNAL(clicked()),
+            this, SLOT(on_actionSegment()));
+
+    QObject* scene_object = dynamic_cast<QObject*>(scene);
+    connect(scene_object, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)),
+            this, SLOT(on_actionItemAboutToBeDestroyed(CGAL::Three::Scene_item*)));
+  }
+
+  virtual void closure()
+  {
+    dockWidget->hide();
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionMCFSkeleton << actionConvert_to_medial_skeleton;
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  void init_ui(double diag) {
+    ui->omega_H->setValue(0.1);
+    ui->omega_H->setSingleStep(0.1);
+    ui->omega_H->setDecimals(3);
+    ui->omega_P->setValue(0.2);
+    ui->omega_P->setSingleStep(0.1);
+    ui->omega_P->setDecimals(3);
+    ui->min_edge_length->setDecimals(7);
+    ui->min_edge_length->setValue(0.002 * diag);
+    ui->min_edge_length->setSingleStep(0.0000001);
+    ui->delta_area->setDecimals(7);
+    ui->delta_area->setValue(1e-4);
+    ui->delta_area->setSingleStep(1e-5);
+    ui->is_medially_centered->setChecked(false);
+
+    ui->label_omega_H->setToolTip(QString("omega_H controls the velocity of movement and approximation quality"));
+    ui->label_omega_P->setToolTip(QString("omega_P controls the smoothness of the medial approximation"));
+    ui->pushButton_contract->setToolTip(QString("contract mesh based on mean curvature flow"));
+    ui->pushButton_collapse->setToolTip(QString("collapse short edges"));
+    ui->pushButton_split->setToolTip(QString("split obtuse triangles"));
+    ui->pushButton_degeneracy->setToolTip(QString("fix degenerate points"));
+    ui->pushButton_skeletonize->setToolTip(QString("Turn mesh to a skeleton curve"));
+    ui->pushButton_run->setToolTip(QString("run one iteration of contract, collapse, split, detect degeneracy"));
+    ui->pushButton_converge->setToolTip(QString("iteratively contract the mesh until convergence"));
+  }
+
+  bool check_item_index(int index) {
+    if (index < 0)
+    {
+      QMessageBox msgBox;
+      msgBox.setText("Please select an item first");
+      msgBox.exec();
+      return false;
+    }
+    return true;
+  }
+
+  /// \todo move this function into an include
+  bool is_mesh_valid(Polyhedron *pMesh) {
+    if (!pMesh->is_closed())
+    {
+      QMessageBox msgBox;
+      msgBox.setText("The mesh is not closed.");
+      msgBox.exec();
+      return false;
+    }
+    if (!pMesh->is_pure_triangle())
+    {
+      QMessageBox msgBox;
+      msgBox.setText("The mesh is not a pure triangle mesh.");
+      msgBox.exec();
+      return false;
+    }
+
+    // the algorithm is only applicable on a mesh
+    // that has only one connected component
+    std::size_t num_component;
+    CGAL::Counting_output_iterator output_it(&num_component);
+    CGAL::internal::corefinement::extract_connected_components(*pMesh, output_it);
+    ++output_it;
+    if (num_component != 1)
+    {
+      QMessageBox msgBox;
+      QString str = QString("The mesh is not a single closed mesh.\n It has %1 components.").arg(num_component);
+      msgBox.setText(str);
+      msgBox.exec();
+      return false;
+    }
+    return true;
+  }
+
+  /// \todo remove duplicated code
+  // check if the Mean_curvature_skeleton exists
+  // or has the same polyheron item
+  // check if the mesh is a watertight triangle mesh
+  bool check_mesh(Scene_polyhedron_item* item) {
+    double omega_H = ui->omega_H->value();
+    double omega_P = ui->omega_P->value();
+    double min_edge_length = ui->min_edge_length->value();
+    double delta_area = ui->delta_area->value();
+    bool is_medially_centered = ui->is_medially_centered->isChecked();
+
+    Polyhedron *pMesh = item->polyhedron();
+
+    if (mcs == NULL)
+    {
+      if (!is_mesh_valid(pMesh))
+      {
+        return false;
+      }
+
+      mcs = new Mean_curvature_skeleton(*pMesh);
+      meso_skeleton = new Polyhedron(*pMesh);
+      input_triangle_mesh = pMesh;
+      //set algorithm parameters
+      mcs->set_quality_speed_tradeoff(omega_H);
+      mcs->set_medially_centered_speed_tradeoff(omega_P);
+      mcs->set_min_edge_length(min_edge_length);
+      mcs->set_is_medially_centered(is_medially_centered);
+      mcs->set_area_variation_factor(delta_area);
+
+      Scene_polyhedron_item* contracted_item = new Scene_polyhedron_item( meso_skeleton );
+      contracted_item->setName(QString("contracted mesh of %1").arg(item->name()));
+
+      InputMeshItemIndex = scene->mainSelectionIndex();
+
+      contractedItemIndex = scene->addItem(contracted_item);
+
+      item->setVisible(false);
+
+      fixedPointsItemIndex = -1;
+      nonFixedPointsItemIndex = -1;
+      poleLinesItemIndex = -1;
+    }
+    else
+    {
+      if (input_triangle_mesh != pMesh)
+      {
+        if (!is_mesh_valid(pMesh))
+        {
+          return false;
+        }
+
+        delete mcs;
+
+        mcs = new Mean_curvature_skeleton(*pMesh);
+        meso_skeleton = new Polyhedron(*pMesh);
+        input_triangle_mesh = pMesh;
+        //set algorithm parameters
+        mcs->set_quality_speed_tradeoff(omega_H);
+        mcs->set_medially_centered_speed_tradeoff(omega_P);
+        mcs->set_min_edge_length(min_edge_length);
+        mcs->set_is_medially_centered(is_medially_centered);
+        mcs->set_area_variation_factor(delta_area);
+
+        Scene_polyhedron_item* contracted_item = new Scene_polyhedron_item(meso_skeleton);
+        contracted_item->setName(QString("contracted mesh of %1").arg(item->name()));
+
+        InputMeshItemIndex = scene->mainSelectionIndex();
+
+        contractedItemIndex = scene->addItem(contracted_item);
+
+        item->setVisible(false);
+
+        fixedPointsItemIndex = -1;
+        nonFixedPointsItemIndex = -1;
+        poleLinesItemIndex = -1;
+      }
+      else
+      {
+        mcs->set_quality_speed_tradeoff(omega_H);
+        mcs->set_medially_centered_speed_tradeoff(omega_P);
+        mcs->set_min_edge_length(min_edge_length);
+        mcs->set_area_variation_factor(delta_area);
+        mcs->set_is_medially_centered(is_medially_centered);
+      }
+    }
+    return true;
+  }
+
+  void update_meso_skeleton()
+  {
+    CGAL::Polyhedron_copy_3<Mean_curvature_skeleton::Meso_skeleton, Polyhedron::HalfedgeDS> modifier(mcs->meso_skeleton());
+    meso_skeleton->delegate(modifier);
+    scene->item(contractedItemIndex)->invalidateOpenGLBuffers();
+    scene->itemChanged(contractedItemIndex);
+  }
+
+  void update_parameters(Mean_curvature_skeleton* mcs)
+  {
+    double omega_H = ui->omega_H->value();
+    double omega_P = ui->omega_P->value();
+    double min_edge_length = ui->min_edge_length->value();
+    double delta_area = ui->delta_area->value();
+    bool is_medially_centered = ui->is_medially_centered->isChecked();
+
+    mcs->set_quality_speed_tradeoff(omega_H);
+    mcs->set_medially_centered_speed_tradeoff(omega_P);
+    mcs->set_min_edge_length(min_edge_length);
+    mcs->set_area_variation_factor(delta_area);
+    mcs->set_is_medially_centered(is_medially_centered);
+  }
+
+public Q_SLOTS:
+  void on_actionMCFSkeleton_triggered();
+  void on_actionConvert_to_medial_skeleton_triggered();
+  void on_actionContract();
+  void on_actionCollapse();
+  void on_actionSplit();
+  void on_actionDegeneracy();
+  void on_actionRun();
+  void on_actionSkeletonize();
+  void on_actionConverge();
+  void on_actionUpdateBBox();
+  void on_actionSegment();
+  void on_actionItemAboutToBeDestroyed(CGAL::Three::Scene_item*);
+
+private:
+  Mean_curvature_skeleton* mcs;
+  Polyhedron* meso_skeleton; // a copy of the meso_skeleton that is displayed
+  Polyhedron* input_triangle_mesh;
+  QDockWidget* dockWidget;
+  Ui::Mean_curvature_flow_skeleton_plugin* ui;
+
+  int fixedPointsItemIndex;
+  int nonFixedPointsItemIndex;
+  int poleLinesItemIndex;
+  int contractedItemIndex;
+  int InputMeshItemIndex;
+
+  Skeleton skeleton_curve;
+}; // end Polyhedron_demo_mean_curvature_flow_skeleton_plugin
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionMCFSkeleton_triggered()
+{
+  dockWidget->show();
+  dockWidget->raise();
+
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    if(!pMesh) return;
+
+    double diag = scene->len_diagonal();
+    init_ui(diag);
+
+    fixedPointsItemIndex = -1;
+    nonFixedPointsItemIndex = -1;
+    poleLinesItemIndex = -1;
+    contractedItemIndex = -1;
+    InputMeshItemIndex = -1;
+  }
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionUpdateBBox()
+{
+  double diag = scene->len_diagonal();
+  ui->min_edge_length->setValue(0.002 * diag);
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionSegment()
+{
+  if (num_vertices(skeleton_curve)==0 ) on_actionSkeletonize();
+  if (num_vertices(skeleton_curve)==0 ) return;
+
+  QTime time;
+  time.start();
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    // init the polyhedron simplex indices
+  CGAL::set_halfedgeds_items_id(*input_triangle_mesh);
+
+  //for each input vertex compute its distance to the skeleton
+  std::vector<double> distances(num_vertices(*input_triangle_mesh));
+  BOOST_FOREACH(boost::graph_traits<Skeleton>::vertex_descriptor v, vertices(skeleton_curve) )
+  {
+    const Point& skel_pt = skeleton_curve[v].point;
+    BOOST_FOREACH(vertex_descriptor mesh_v, skeleton_curve[v].vertices)
+    {
+      const Point& mesh_pt = mesh_v->point();
+      distances[mesh_v->id()] = std::sqrt(CGAL::squared_distance(skel_pt, mesh_pt));
+    }
+  }
+
+  // create a property-map for sdf values
+  std::vector<double> sdf_values( num_faces(*input_triangle_mesh) );
+  Facet_with_id_pmap<double> sdf_property_map(sdf_values);
+
+  // compute sdf values with skeleton
+  BOOST_FOREACH(Polyhedron::Face_handle f, faces(*input_triangle_mesh))
+  {
+    double dist = 0;
+    BOOST_FOREACH(Polyhedron::Halfedge_handle hd, halfedges_around_face(halfedge(f, *input_triangle_mesh), *input_triangle_mesh))
+      dist+=distances[target(hd, *input_triangle_mesh)->id()];
+    sdf_property_map[f] = dist / 3.;
+  }
+
+  // post-process the sdf values
+  CGAL::sdf_values_postprocessing(*input_triangle_mesh, sdf_property_map);
+
+  // create a property-map for segment-ids (it is an adaptor for this case)
+  std::vector<std::size_t> segment_ids( num_faces(*input_triangle_mesh) );
+  Facet_with_id_pmap<std::size_t> segment_property_map(segment_ids);
+
+  // segment the mesh using default parameters
+  std::cout << "Number of segments: "
+            << CGAL::segmentation_from_sdf_values(*input_triangle_mesh, sdf_property_map, segment_property_map) <<"\n";
+
+  Polyhedron* segmented_polyhedron = new Polyhedron(*input_triangle_mesh);
+
+  int i=0;
+  BOOST_FOREACH(Polyhedron::Face_handle fd, faces(*segmented_polyhedron))
+  {
+    fd->set_patch_id( static_cast<int>(segment_ids[i++] ));
+  }
+
+  scene->item(InputMeshItemIndex)->setVisible(false);
+  Scene_polyhedron_item* item_segmentation = new Scene_polyhedron_item(segmented_polyhedron);
+  item_segmentation->setItemIsMulticolor(true);
+  scene->addItem(item_segmentation);
+  item_segmentation->setName(QString("segmentation"));
+
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionConvert_to_medial_skeleton_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    if ( !is_mesh_valid(pMesh) ) return;
+
+    QTime time;
+    time.start();
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    Skeleton skeleton;
+    CGAL::extract_mean_curvature_flow_skeleton(*pMesh, skeleton);
+
+    std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+    //create the polylines representing the skeleton
+    Scene_polylines_item* skeleton_item = new Scene_polylines_item();
+    skeleton_item->setColor(QColor(175, 0, 255));
+
+    Polyline_visitor polyline_visitor(skeleton_item->polylines, skeleton);
+    CGAL::split_graph_into_polylines( skeleton,
+                                      polyline_visitor,
+                                      CGAL::internal::IsTerminalDefault() );
+
+    skeleton_item->setName(QString("Medial skeleton curve of %1").arg(item->name()));
+    scene->addItem(skeleton_item);
+    skeleton_item->invalidateOpenGLBuffers();
+
+    item->setPointsMode();
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionContract()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  std::cout << "Contract...\n";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  update_parameters(mcs);
+  mcs->contract_geometry();
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  update_meso_skeleton();
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionCollapse()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  std::cout << "Collapse...\n";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  update_parameters(mcs);
+  std::size_t num_collapses = mcs->collapse_edges();
+  std::cout << "collapsed " << num_collapses << " edges.\n";
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  update_meso_skeleton();
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionSplit()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  std::cout << "Split...\n";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  update_parameters(mcs);
+  std::size_t num_split = mcs->split_faces();
+  std::cout << "split " << num_split << " triangles.\n";
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  update_meso_skeleton();
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionDegeneracy()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  std::cout << "Detect degeneracy...\n";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  update_parameters(mcs);
+  mcs->detect_degeneracies();
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  Scene_points_with_normal_item* fixedPointsItem = new Scene_points_with_normal_item;
+  fixedPointsItem->setName(QString("fixed points of %1").arg(item->name()));
+
+  std::vector<Point> fixedPoints;
+  mcs->fixed_points(fixedPoints);
+
+  Point_set *ps = fixedPointsItem->point_set();
+  for (size_t i = 0; i < fixedPoints.size(); ++i)
+  {
+    UI_point_3<Kernel> point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z());
+    ps->push_back(point);
+  }
+  ps->select_all ();
+
+  if (fixedPointsItemIndex == -1)
+  {
+    fixedPointsItemIndex = scene->addItem(fixedPointsItem);
+  }
+  else
+  {
+    Scene_item* temp = scene->replaceItem(fixedPointsItemIndex, fixedPointsItem, false);
+    delete temp;
+  }
+  // update scene
+  update_meso_skeleton();
+  scene->item(fixedPointsItemIndex)->invalidateOpenGLBuffers();
+  scene->itemChanged(fixedPointsItemIndex);
+  scene->setSelectedItem(index);
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionRun()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  std::cout << "Run one iteration...\n";
+
+  update_parameters(mcs);
+  mcs->contract();
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  CGAL::Three::Scene_interface::Item_id contracted_item_index = scene->mainSelectionIndex();
+  Scene_polyhedron_item* contracted_item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(contracted_item_index));
+
+  // update scene
+  Scene_points_with_normal_item* fixedPointsItem = new Scene_points_with_normal_item;
+  fixedPointsItem->setName(QString("fixed points of %1").arg(contracted_item->name()));
+
+  std::vector<Point> fixedPoints;
+  mcs->fixed_points(fixedPoints);
+
+  Point_set *ps = fixedPointsItem->point_set();
+  for (size_t i = 0; i < fixedPoints.size(); ++i)
+  {
+    UI_point_3<Kernel> point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z());
+    ps->push_back(point);
+  }
+  ps->select_all();
+  
+  if (fixedPointsItemIndex == -1)
+  {
+    fixedPointsItemIndex = scene->addItem(fixedPointsItem);
+  }
+  else
+  {
+    Scene_item* temp = scene->replaceItem(fixedPointsItemIndex, fixedPointsItem, false);
+    delete temp;
+  }
+
+//#define DRAW_NON_FIXED_POINTS
+#ifdef DRAW_NON_FIXED_POINTS
+  // draw non-fixed points
+  Scene_points_with_normal_item* nonFixedPointsItem = new Scene_points_with_normal_item;
+  nonFixedPointsItem->setName("non-fixed points");
+  nonFixedPointsItem->setColor(QColor(0, 255, 0));
+  std::vector<Point> nonFixedPoints;
+  mcs->non_fixed_points(nonFixedPoints);
+  ps = nonFixedPointsItem->point_set();
+  for (size_t i = 0; i < nonFixedPoints.size(); ++i)
+  {
+    UI_point_3<Kernel> point(nonFixedPoints[i].x(), nonFixedPoints[i].y(), nonFixedPoints[i].z());
+    ps->push_back(point);
+  }
+  if (nonFixedPointsItemIndex == -1)
+  {
+    nonFixedPointsItemIndex = scene->addItem(nonFixedPointsItem);
+  }
+  else
+  {
+    scene->replaceItem(nonFixedPointsItemIndex, nonFixedPointsItem, false);
+  }
+  scene->itemChanged(nonFixedPointsItemIndex);
+#endif
+
+//#define DRAW_POLE_LINE
+#ifdef DRAW_POLE_LINE
+  // draw lines connecting surface points and their correspondent poles
+  Scene_polylines_item* poleLinesItem = new Scene_polylines_item();
+
+  Polyhedron* pMesh = item->polyhedron();
+  std::vector<Point> pole_points;
+  mcs->poles(pole_points);
+  vertex_iterator vb, ve;
+  int id = 0;
+  for (boost::tie(vb, ve) = vertices(*pMesh); vb != ve; ++vb)
+  {
+    std::vector<Point> line;
+    line.clear();
+
+    vertex_descriptor v = *vb;
+    Point s = v->point();
+    Point t = pole_points[id++];
+
+    line.push_back(s);
+    line.push_back(t);
+    poleLinesItem->polylines.push_back(line);
+  }
+
+  if (poleLinesItemIndex == -1)
+  {
+    poleLinesItemIndex = scene->addItem(poleLinesItem);
+  }
+  else
+  {
+    scene->replaceItem(poleLinesItemIndex, poleLinesItem, false);
+  }
+#endif
+
+  update_meso_skeleton();
+  scene->setSelectedItem(index);
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionSkeletonize()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  update_parameters(mcs);
+
+  mcs->convert_to_skeleton(skeleton_curve);
+
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  //create the polylines representing the skeleton
+  Scene_polylines_item* skeleton = new Scene_polylines_item();
+  skeleton->setColor(QColor(175, 0, 255));
+
+  Polyline_visitor polyline_visitor(skeleton->polylines, skeleton_curve);
+  CGAL::split_graph_into_polylines( skeleton_curve,
+                                    polyline_visitor,
+                                    CGAL::internal::IsTerminalDefault() );
+
+  skeleton->setName(QString("skeleton curve of %1").arg(item->name()));
+  scene->addItem(skeleton);
+  skeleton->invalidateOpenGLBuffers();
+
+  // set the fixed points and contracted mesh as invisible
+  if (fixedPointsItemIndex >= 0)
+  {
+    scene->item(fixedPointsItemIndex)->setVisible(false);
+    scene->itemChanged(fixedPointsItemIndex);
+  }
+  scene->item(contractedItemIndex)->setVisible(false);
+  scene->itemChanged(contractedItemIndex);
+  // display the original mesh in transparent mode
+  item->setVisible(false);
+  if (InputMeshItemIndex >= 0)
+  {
+    scene->item(InputMeshItemIndex)->setVisible(true);
+    scene->item(InputMeshItemIndex)->setPointsMode();
+    scene->itemChanged(InputMeshItemIndex);
+  }
+
+  // update scene
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionConverge()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  if (!check_item_index(index))
+  {
+    return;
+  }
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if (!check_mesh(item))
+  {
+    return;
+  }
+
+  QTime time;
+  time.start();
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  mcs->contract_until_convergence();
+
+  std::cout << "ok (" << time.elapsed() << " ms, " << ")" << std::endl;
+
+  // update scene
+  Scene_points_with_normal_item* fixedPointsItem = new Scene_points_with_normal_item;
+  fixedPointsItem->setName(QString("fixed points of %1").arg(item->name()));
+
+  std::vector<Point> fixedPoints;
+  mcs->fixed_points(fixedPoints);
+
+  Point_set *ps = fixedPointsItem->point_set();
+  for (size_t i = 0; i < fixedPoints.size(); ++i)
+  {
+    UI_point_3<Kernel> point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z());
+    ps->push_back(point);
+  }
+  ps->select_all();
+  
+  if (fixedPointsItemIndex == -1)
+  {
+    fixedPointsItemIndex = scene->addItem(fixedPointsItem);
+  }
+  else
+  {
+    Scene_item* temp = scene->replaceItem(fixedPointsItemIndex, fixedPointsItem, false);
+    delete temp;
+  }
+
+  scene->item(fixedPointsItemIndex)->invalidateOpenGLBuffers();
+  scene->itemChanged(fixedPointsItemIndex);
+  update_meso_skeleton();
+  scene->setSelectedItem(index);
+
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionItemAboutToBeDestroyed(CGAL::Three::Scene_item* /* item */)
+{
+  if (mcs != NULL)
+  {
+    delete mcs;
+    mcs = NULL;
+  }
+}
+
+#include "Mean_curvature_flow_skeleton_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui
new file mode 100644
index 0000000..0ffff6e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Mean_curvature_flow_skeleton_plugin</class>
+ <widget class="QDockWidget" name="Mean_curvature_flow_skeleton_plugin">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>744</width>
+    <height>468</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>DockWidget</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout_3">
+    <item>
+     <widget class="QCheckBox" name="is_medially_centered">
+      <property name="text">
+       <string>Is medially centered</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_6">
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <widget class="QLabel" name="label_omega_H">
+            <property name="text">
+             <string>quality_speed_tradeoff</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QDoubleSpinBox" name="omega_H"/>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <item>
+           <widget class="QLabel" name="label_omega_P">
+            <property name="text">
+             <string>medially_centered_speed_tradeoff</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QDoubleSpinBox" name="omega_P"/>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_4">
+          <item>
+           <widget class="QLabel" name="label_min_edge_length">
+            <property name="text">
+             <string>min_edge_length</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QDoubleSpinBox" name="min_edge_length"/>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_5">
+          <item>
+           <widget class="QLabel" name="label_delta_area">
+            <property name="text">
+             <string>area_variation_factor </string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QDoubleSpinBox" name="delta_area"/>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <widget class="QPushButton" name="pushButton_run">
+          <property name="text">
+           <string>Run one iteration</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="pushButton_converge">
+          <property name="text">
+           <string>Run to convergence</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="pushButton_skeletonize">
+          <property name="text">
+           <string>Skeletonize</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="pushButton_segment">
+          <property name="text">
+           <string>Segment</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QLabel" name="label">
+      <property name="font">
+       <font>
+        <weight>75</weight>
+        <bold>true</bold>
+       </font>
+      </property>
+      <property name="text">
+       <string>Steps of an iteration:</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QPushButton" name="pushButton_contract">
+        <property name="text">
+         <string> 1 - Contract</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_collapse">
+        <property name="text">
+         <string>2 - Collapse</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_split">
+        <property name="text">
+         <string>3 - Split</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_degeneracy">
+        <property name="text">
+         <string>4 - Degeneracy</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+ <slots>
+  <slot>contract()</slot>
+ </slots>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp
new file mode 100644
index 0000000..173fec4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp
@@ -0,0 +1,172 @@
+#include <QApplication>
+#include <QAction>
+#include <QList>
+#include <QMainWindow>
+#include <QMessageBox>
+#include <QtDebug>
+
+#include "Scene_polygon_soup_item.h"
+#include "Scene_polyhedron_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "Messages_interface.h"
+using namespace CGAL::Three;
+class Polyhedron_demo_orient_soup_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow,
+            CGAL::Three::Scene_interface* scene_interface,
+            Messages_interface* m);
+
+  bool applicable(QAction* action) const {
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) {
+      if(qobject_cast<Scene_polygon_soup_item*>(scene->item(index)))
+        return true;
+      else
+        if (action==actionShuffle && 
+            qobject_cast<Scene_polyhedron_item*>(scene->item(index)))
+            return true;
+    }
+    return false;
+  }
+
+  QList<QAction*> actions() const;
+
+public Q_SLOTS:
+  void orient();
+  void shuffle();
+  void displayNonManifoldEdges();
+
+private:
+  CGAL::Three::Scene_interface* scene;
+  Messages_interface* messages;
+  QMainWindow* mw;
+  QAction* actionOrient;
+  QAction* actionShuffle;
+  QAction* actionDisplayNonManifoldEdges;
+
+}; // end Polyhedron_demo_orient_soup_plugin
+
+void Polyhedron_demo_orient_soup_plugin::init(QMainWindow* mainWindow,
+                                              CGAL::Three::Scene_interface* scene_interface,
+                                              Messages_interface* m)
+{
+  scene = scene_interface;
+  mw = mainWindow;
+  messages = m;
+  actionOrient = new QAction(tr("&Orient Polygon Soup"), mainWindow);
+  actionOrient->setObjectName("actionOrient");
+  actionOrient->setProperty("subMenuName", "Polygon Mesh Processing");
+  connect(actionOrient, SIGNAL(triggered()),
+          this, SLOT(orient()));
+
+  actionShuffle = new QAction(tr("&Shuffle Polygon Soup"), mainWindow);
+  actionShuffle->setProperty("subMenuName", "Polygon Mesh Processing");
+  connect(actionShuffle, SIGNAL(triggered()),
+          this, SLOT(shuffle()));
+
+  actionDisplayNonManifoldEdges = new QAction(tr("Display Non Manifold Edges"),
+                                              mainWindow);
+  actionDisplayNonManifoldEdges->setProperty("subMenuName", "View");
+  connect(actionDisplayNonManifoldEdges, SIGNAL(triggered()),
+          this, SLOT(displayNonManifoldEdges()));
+}
+
+QList<QAction*> Polyhedron_demo_orient_soup_plugin::actions() const {
+  return QList<QAction*>() << actionOrient
+                           << actionShuffle
+                           << actionDisplayNonManifoldEdges;
+}
+
+void Polyhedron_demo_orient_soup_plugin::orient()
+{
+  Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices())
+  {
+    Scene_polygon_soup_item* item = 
+      qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
+
+    if(item)
+    {
+      //     qDebug()  << tr("I have the item %1\n").arg(item->name());
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+      if(!item->orient()) {
+         QMessageBox::information(mw, tr("Not orientable without self-intersections"),
+                                      tr("The polygon soup \"%1\" is not directly orientable."
+                                         " Some vertices have been duplicated and some self-intersections"
+                                         " have been created.")
+                                      .arg(item->name()));
+      }
+
+      Scene_polyhedron_item* poly_item = new Scene_polyhedron_item();
+      if(item->exportAsPolyhedron(poly_item->polyhedron())) {
+        poly_item->setName(item->name());
+        poly_item->setColor(item->color());
+        poly_item->setRenderingMode(item->renderingMode());
+        poly_item->setVisible(item->visible());
+        poly_item->invalidateOpenGLBuffers();
+        poly_item->setProperty("source filename", item->property("source filename"));
+        scene->replaceItem(index, poly_item);
+        delete item;
+      } else {
+        item->invalidateOpenGLBuffers();
+        scene->itemChanged(item);
+      }
+
+      QApplication::restoreOverrideCursor();
+    }
+    else{
+      messages->warning(tr("This function is only applicable on polygon soups."));
+    }
+  }
+}
+
+void Polyhedron_demo_orient_soup_plugin::shuffle()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polygon_soup_item* item = 
+    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
+
+  if(item) {
+    item->shuffle_orientations();
+    //scene->itemChanged(item);
+  }
+  else {
+    Scene_polyhedron_item* poly_item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(poly_item) {
+      item = new Scene_polygon_soup_item();
+      item->setName(poly_item->name());
+      item->setRenderingMode(poly_item->renderingMode());
+      item->setVisible(poly_item->visible());
+      item->setProperty("source filename", poly_item->property("source filename"));
+      item->load(poly_item);
+      item->shuffle_orientations();
+      item->setColor(poly_item->color());
+      scene->replaceItem(index, item);
+      delete poly_item;
+    }
+  }
+}
+
+void Polyhedron_demo_orient_soup_plugin::displayNonManifoldEdges()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polygon_soup_item* item = 
+    qobject_cast<Scene_polygon_soup_item*>(scene->item(index));
+
+  if(item)
+  {
+    item->setDisplayNonManifoldEdges(!item->displayNonManifoldEdges());
+    scene->itemChanged(item);
+  }
+}
+
+#include "Orient_soup_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp
new file mode 100644
index 0000000..5af4869
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp
@@ -0,0 +1,257 @@
+#include <QtCore/qglobal.h>
+#include "opengl_tools.h"
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Scene_interface.h>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "Polyhedron_type.h"
+
+#include <CGAL/Timer.h>
+#include <CGAL/Random.h>
+#include <CGAL/Side_of_triangle_mesh.h>
+#include "ui_Point_inside_polyhedron_widget.h"
+
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QDockWidget>
+#include <QInputDialog>
+
+#include <vector>
+#include <algorithm>
+
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/optional/optional.hpp>
+using namespace CGAL::Three;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
+
+class Polyhedron_demo_point_inside_polyhedron_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  bool applicable(QAction*) const 
+  {
+    bool poly_item_exists = false;
+    bool point_item_exists = false;
+
+    for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries();
+      i < end && (!poly_item_exists || !point_item_exists); ++i)
+    {
+      poly_item_exists |= qobject_cast<Scene_polyhedron_item*>(scene->item(i)) != NULL;
+      point_item_exists |= qobject_cast<Scene_points_with_normal_item*>(scene->item(i)) != NULL;
+    }
+
+    //return poly_item_exists && point_item_exists;
+    return poly_item_exists || point_item_exists;
+  }
+  void print_message(QString message) { messages->information(message); }
+  QList<QAction*> actions() const { return QList<QAction*>() << actionPointInsidePolyhedron; }
+
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m)
+  {
+    mw = mainWindow;
+    scene = scene_interface;
+    messages = m;
+
+    actionPointInsidePolyhedron = new QAction(tr("Point Inside Polyhedron"), mw);
+    actionPointInsidePolyhedron->setProperty("subMenuName", "Polygon Mesh Processing");
+    connect(actionPointInsidePolyhedron, SIGNAL(triggered()), this, SLOT(point_inside_polyhedron_action()));
+
+    dock_widget = new QDockWidget("Point Inside Polyhedron", mw);
+    dock_widget->setVisible(false);
+    ui_widget.setupUi(dock_widget);
+
+    add_dock_widget(dock_widget);
+
+    connect(ui_widget.Select_button,  SIGNAL(clicked()), this, SLOT(on_Select_button())); 
+    connect(ui_widget.Sample_random_points_from_bbox,  SIGNAL(clicked()), this, SLOT(on_Sample_random_points_from_bbox())); 
+    
+  }
+
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+private:
+  // for transform iterator
+  struct Get_ref {
+    typedef const Polyhedron& result_type;
+    result_type operator()(const Polyhedron* poly_ptr) const
+    { return *poly_ptr; }
+  };
+
+
+public Q_SLOTS:
+  void point_inside_polyhedron_action() { 
+    dock_widget->show();
+    dock_widget->raise();
+  }
+
+  void on_Select_button() 
+  {
+    bool inside = ui_widget.Inside_check_box->isChecked();
+    bool on_boundary = ui_widget.On_boundary_check_box->isChecked();
+    bool outside = ui_widget.Outside_check_box->isChecked();
+
+    if(!(inside || on_boundary || outside)) {
+      print_message("Error: please check at least one parameter check box.");
+      return;
+    }
+
+    // place all selected polyhedron and point items to vectors below
+    std::vector<const Polyhedron*> polys;
+    typedef CGAL::Side_of_triangle_mesh<Polyhedron, Kernel> Point_inside;
+    std::vector<Point_inside*> inside_testers;// to put all polyhedra to query object
+        // it does not support copy-construction so let's use pointers
+    std::vector<Point_set*> point_sets;
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id id, scene->selectionIndices()) {
+      Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
+      if (poly_item)
+        inside_testers.push_back(new Point_inside(*(poly_item->polyhedron())));
+      if(poly_item) { polys.push_back(poly_item->polyhedron()); }
+
+      Scene_points_with_normal_item* point_item = qobject_cast<Scene_points_with_normal_item*>(scene->item(id));
+      if(point_item) { point_sets.push_back(point_item->point_set()); }
+    }
+
+    // there should be at least one selected polyhedron and point item
+    if(inside_testers.empty()) { print_message("Error: there is no selected polyhedron item(s)."); }
+    if(point_sets.empty()) { print_message("Error: there is no selected point set item(s)."); }
+    if(inside_testers.empty() || point_sets.empty()) { return; }
+
+    // deselect all points
+    for(std::vector<Point_set*>::iterator point_set_it = point_sets.begin(); 
+      point_set_it != point_sets.end(); ++point_set_it) {
+      (*point_set_it)->unselect_all();
+    }
+
+    CGAL::Timer timer; timer.start();
+
+    print_message(
+      QString("Constructing with %1 items is done in %2 sec.").arg(inside_testers.size()).arg(timer.time()));
+    timer.reset();
+
+    std::size_t nb_query = 0, nb_selected = 0;// for print message
+    for(std::vector<Point_set*>::iterator point_set_it = point_sets.begin(); 
+      point_set_it != point_sets.end(); ++point_set_it) 
+    {
+      Point_set* point_set = *point_set_it;
+      for (std::size_t pt = 0;
+           pt < point_set->size() - point_set->nb_selected_points();
+           ++ pt, ++ nb_query)
+      {
+        Point_set::iterator point_it = point_set->begin() + pt;
+        for (std::size_t i = 0; i < inside_testers.size(); ++i)
+        {
+        CGAL::Bounded_side res = (*inside_testers[i])(point_it->position());
+
+        if( (inside      && res == CGAL::ON_BOUNDED_SIDE) ||
+            (on_boundary && res == CGAL::ON_BOUNDARY)     ||
+            (outside     && res == CGAL::ON_UNBOUNDED_SIDE) )
+        {
+          point_set->select(point_it); ++nb_selected;
+          -- pt; // Selection replaces current point with unselected one
+          break;//loop on i
+        }
+        }
+      } // loop on points in point_set
+    }// loop on selected point sets
+
+    print_message(QString("Querying with %1 points is done in %2 sec.").arg(nb_query).arg(timer.time()));
+    print_message(QString("%1 points are selected. All Done!").arg(nb_selected));
+
+    // delete testers
+    for (std::size_t i = 0; i < inside_testers.size(); ++i)
+      delete inside_testers[i];
+
+    // for repaint
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id id, scene->selectionIndices()) {
+      Scene_points_with_normal_item* point_item = qobject_cast<Scene_points_with_normal_item*>(scene->item(id));
+      if(point_item) { 
+        point_item->invalidateOpenGLBuffers();
+        scene->itemChanged(point_item);
+      }
+    }
+
+  }
+
+  void on_Sample_random_points_from_bbox() {
+    
+    // calculate bbox of selected polyhedron items
+    boost::optional<CGAL::Three::Scene_interface::Bbox> bbox
+      = boost::make_optional(false, CGAL::Three::Scene_interface::Bbox());
+    // Workaround a bug in g++-4.8.3:
+    //   http://stackoverflow.com/a/21755207/1728537
+    // Using boost::make_optional to copy-initialize 'bbox' hides the
+    //   warning about '*bbox' not being initialized.
+    // -- Laurent Rineau, 2014/10/30
+
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id id, scene->selectionIndices()) {
+      Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
+      if(poly_item) {
+        if(!bbox) {
+          bbox = poly_item->bbox();
+        }
+        else {
+          *bbox = *bbox + poly_item->bbox();
+        }
+      }
+    }
+
+    if(!bbox) {
+      print_message("Error: there is no selected polyhedron item(s)."); 
+      return;
+    }
+
+    // take number of points param
+    bool ok;
+    const int nb_points = 
+      QInputDialog::getInt(mw, tr("Number of Points"),
+      tr("Number of Points:"),
+      100000, // default value
+      1, // min
+      (int)1.e9, // max
+      10, // step for the spinbox
+      &ok);
+
+    if(!ok) { return; }
+
+    // sample random points and constuct item
+    Scene_points_with_normal_item* point_item = new Scene_points_with_normal_item();
+    point_item->setName(QString("sample-%1").arg(nb_points));
+    CGAL::Random rg(1340818006);
+
+    double grid_dx = bbox->xmax - bbox->xmin;
+    double grid_dy = bbox->ymax - bbox->ymin;
+    double grid_dz = bbox->zmax - bbox->zmin;
+
+    for(int i=0; i < nb_points; i++){
+      point_item->point_set()->push_back(
+      Epic_kernel::Point_3(bbox->xmin + rg.get_double()* grid_dx, 
+        bbox->ymin + rg.get_double()* grid_dy,
+        bbox->zmin + rg.get_double()* grid_dz)
+      );
+    }
+
+    scene->addItem(point_item);
+    scene->itemChanged(point_item);
+  }
+private:
+  Messages_interface* messages;
+  QAction* actionPointInsidePolyhedron;
+
+  QDockWidget* dock_widget;
+  Ui::Point_inside_polyhedron ui_widget;
+
+}; // end Polyhedron_demo_point_inside_polyhedron_plugin
+
+#include "Point_inside_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui
new file mode 100644
index 0000000..cd1529c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Point_inside_polyhedron</class>
+ <widget class="QDockWidget" name="Point_inside_polyhedron">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>542</width>
+    <height>258</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Point Inside Polyhedron</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QPushButton" name="Sample_random_points_from_bbox">
+      <property name="text">
+       <string>Sample Random Points from Bbox</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox">
+      <property name="title">
+       <string>Point Location</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QCheckBox" name="Inside_check_box">
+           <property name="text">
+            <string>Inside</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="On_boundary_check_box">
+           <property name="text">
+            <string>On Boundary</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="Outside_check_box">
+           <property name="text">
+            <string>Outside</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QPushButton" name="Select_button">
+         <property name="text">
+          <string>Select</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="font">
+          <font>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
+         <property name="text">
+          <string>Note:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <item>
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string><html><head/><body><p>A selection is possible only if a point set item<br/>and a (closed) polyhedron item are selected</p></body></html></string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp
new file mode 100644
index 0000000..19709df
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp
@@ -0,0 +1,348 @@
+#include <QtCore/qglobal.h>
+#include <CGAL/AABB_intersections.h>
+
+#include "Messages_interface.h"
+#include "Scene_plane_item.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "ui_Polyhedron_slicer_widget.h"
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/bounding_box.h> 
+#include <CGAL/Polygon_mesh_slicer.h>
+
+#include "Polyhedron_type.h"
+
+#include <QTime>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QDockWidget>
+
+#include <vector>
+#include <algorithm>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
+using namespace CGAL::Three;
+class Polyhedron_demo_polyhedron_slicer_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  bool applicable(QAction*) const { return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())); }
+  void print_message(QString message) { messages->information(message);}
+
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m);
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+  QList<QAction*> actions() const;
+  bool get_base_1_2(double bases[6]) {
+    bool oks[6];
+    bases[0] = ui_widget.Base_1_x->text().toDouble(&oks[0]);
+    bases[1] = ui_widget.Base_1_y->text().toDouble(&oks[1]);
+    bases[2] = ui_widget.Base_1_z->text().toDouble(&oks[2]);
+
+    bases[3] = ui_widget.Base_2_x->text().toDouble(&oks[3]);
+    bases[4] = ui_widget.Base_2_y->text().toDouble(&oks[4]);
+    bases[5] = ui_widget.Base_2_z->text().toDouble(&oks[5]);
+
+    bool total_ok = true;
+    for(int i = 0; i < 6; ++i && total_ok) { total_ok &= oks[i];}
+    return total_ok;
+  }
+public Q_SLOTS:
+  void slicer_widget_action();
+  void on_Generate_button_clicked();
+  bool on_Update_plane_button_clicked();
+  void plane_manipulated_frame_modified();
+  void item_about_to_be_destroyed(CGAL::Three::Scene_item* scene_item);
+  void dock_widget_closed();
+
+protected:
+  bool eventFilter(QObject *, QEvent *event) {
+    if(event->type() == QEvent::Close) {
+      dock_widget_closed();
+    }
+    return false;
+  }
+
+private:
+  Messages_interface* messages;
+  Scene_plane_item* plane_item;
+  QAction* actionSlicerWidget;
+
+  QDockWidget* dock_widget;
+  Ui::Polyhedron_slicer ui_widget;
+  
+  void intersection_of_plane_Polyhedra_3_using_AABB_wrapper(Polyhedron& mesh, 
+    const std::vector<Epic_kernel::Plane_3>& planes,
+    const std::vector<qglviewer::Vec>& plane_positions,
+    std::list<std::vector<Epic_kernel::Point_3> >& polylines);
+
+}; // end Polyhedron_demo_polyhedron_slicer_plugin
+
+void Polyhedron_demo_polyhedron_slicer_plugin::init(QMainWindow* mainWindow,
+                                      CGAL::Three::Scene_interface* scene_interface,
+                                      Messages_interface* m)
+{
+  mw = mainWindow;
+  scene = scene_interface;
+  messages = m;
+  plane_item = NULL;
+
+  actionSlicerWidget = new QAction(tr("Polyhedron Slicer"), mw);
+  actionSlicerWidget->setProperty("subMenuName", "Polygon Mesh Processing");
+  connect(actionSlicerWidget, SIGNAL(triggered()), this, SLOT(slicer_widget_action()));
+
+  dock_widget = new QDockWidget("Polyhedron Slicer", mw);
+  dock_widget->setVisible(false);
+  dock_widget->installEventFilter(this);
+  ui_widget.setupUi(dock_widget);
+
+  add_dock_widget(dock_widget);
+
+  connect(ui_widget.Generate_button,  SIGNAL(clicked()), this, SLOT(on_Generate_button_clicked()));   
+  connect(ui_widget.Update_plane_button,  SIGNAL(clicked()), this, SLOT(on_Update_plane_button_clicked())); 
+}
+
+QList<QAction*> Polyhedron_demo_polyhedron_slicer_plugin::actions() const {
+  return QList<QAction*>() << actionSlicerWidget;
+}
+
+void Polyhedron_demo_polyhedron_slicer_plugin::slicer_widget_action(){
+  if(dock_widget->isVisible()) { return; }
+  dock_widget->show(); 
+  dock_widget->raise();
+  ///// from cut plugin /////
+  CGAL_assertion(plane_item == NULL);
+
+  plane_item = new Scene_plane_item(scene);
+  const CGAL::Three::Scene_interface::Bbox& bbox = scene->bbox();
+  plane_item->setPosition((bbox.xmin + bbox.xmax)/2.f,
+    (bbox.ymin+bbox.ymax)/2.f,
+    (bbox.zmin+bbox.zmax)/2.f);
+  plane_item->setNormal(0., 0., 1.);
+  plane_item->setManipulatable(true);
+  plane_item->setClonable(false);
+  plane_item->setColor(Qt::green);
+  plane_item->setName(tr("Cutting plane"));
+  connect(plane_item->manipulatedFrame(), SIGNAL(modified()),
+    this, SLOT(plane_manipulated_frame_modified()));
+
+  if(Scene* scene_casted = dynamic_cast<Scene*>(scene)) 
+  { connect(scene_casted, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(item_about_to_be_destroyed(CGAL::Three::Scene_item*))); }
+  scene->addItem(plane_item);
+
+  // set distance_with_planes = bbox_diagona / 30
+  double diagonal = std::sqrt(
+    CGAL::squared_distanceC3( bbox.xmin, bbox.ymin, bbox.zmin, bbox.xmax, bbox.ymax, bbox.zmax) );
+  ui_widget.Distance_with_planes->setText(QString::number(diagonal / 30.0));
+
+  plane_manipulated_frame_modified(); // update text boxes
+}
+
+// when manipulated frame of plane is modified, update line-edits
+void Polyhedron_demo_polyhedron_slicer_plugin::plane_manipulated_frame_modified() {
+  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
+  const qglviewer::Vec& pos = mf->position();
+  ui_widget.Center_x->setText(QString::number(pos.x));
+  ui_widget.Center_y->setText(QString::number(pos.y));
+  ui_widget.Center_z->setText(QString::number(pos.z));
+
+  const qglviewer::Vec& base_1 = mf->inverseTransformOf(qglviewer::Vec(1., 0., 0.));
+  const qglviewer::Vec& base_2 = mf->inverseTransformOf(qglviewer::Vec(0., 1., 0.));
+
+  ui_widget.Base_1_x->setText(QString::number(base_1.x));
+  ui_widget.Base_1_y->setText(QString::number(base_1.y));
+  ui_widget.Base_1_z->setText(QString::number(base_1.z));
+
+  ui_widget.Base_2_x->setText(QString::number(base_2.x));
+  ui_widget.Base_2_y->setText(QString::number(base_2.y));
+  ui_widget.Base_2_z->setText(QString::number(base_2.z));
+}
+
+// when Update Plane button is clicked, update manipulated frame of plane with line-edits
+bool Polyhedron_demo_polyhedron_slicer_plugin::on_Update_plane_button_clicked() {
+  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
+  // get center
+  bool ok_1 = true, ok_2 = true, ok_3 = true;
+  double center_x = ui_widget.Center_x->text().toDouble(&ok_1);
+  double center_y = ui_widget.Center_y->text().toDouble(&ok_2);
+  double center_z = ui_widget.Center_z->text().toDouble(&ok_3);
+  if(!ok_1 || !ok_2 || !ok_3) 
+  { print_message("Error: center coordinates not convertible to double."); return false; }
+
+  // set center
+  bool oldState = mf->blockSignals(true); // dont let it signal, it will invoke plane_manipulated_frame_modified otherwise
+  mf->setPosition(center_x, center_y, center_z);
+  mf->blockSignals(oldState);
+
+  // get base 1 and base 2
+  double bases[6];
+  if(!get_base_1_2(bases)) 
+  { print_message("Error: Base-1, Base-2 coordinates not convertible to double."); return false; }
+
+  // compute other axis
+  qglviewer::Vec base_1(bases[0], bases[1], bases[2]);
+  qglviewer::Vec base_2(bases[3], bases[4], bases[5]);
+  qglviewer::Vec other = cross(base_1, base_2);
+  if(other.norm() == 0.0) { print_message("Error: collinear base vectors are not accepted!"); return false; }
+  
+  // set orientation
+  qglviewer::Quaternion orientation_from_bases;
+  orientation_from_bases.setFromRotatedBasis(base_1, base_2, other);
+
+  oldState = mf->blockSignals(true); // dont let it signal, it will invoke plane_manipulated_frame_modified otherwise
+  mf->setOrientation(orientation_from_bases);
+  mf->blockSignals(oldState);
+
+  scene->itemChanged(plane_item); // redraw
+  return true;
+}
+
+// generate multiple cuts, until any cut does not intersect with bbox
+void Polyhedron_demo_polyhedron_slicer_plugin::on_Generate_button_clicked()
+{
+  Scene_polyhedron_item* item = get_selected_item<Scene_polyhedron_item>();
+  if(!item) { 
+    print_message("Error: There is no selected Scene_polyhedron_item!");
+    return; 
+  }
+
+  if(!on_Update_plane_button_clicked()) { return; }
+
+  // get plane position and normal
+  qglviewer::ManipulatedFrame* mf = plane_item->manipulatedFrame();
+  const qglviewer::Vec& pos = mf->position();
+  // WARNING: due to fp arithmetic (setting quaternion based orientation from base vectors then getting plane normal back from this orientation)
+  // for base vectors like: 1,0,0 - 0,1,0 we might not have exact corresponding normal vector.
+  // So not using below normal but construct plane directly from bases from text boxes
+  const qglviewer::Vec& n = mf->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+
+  // get bases
+  double bases[6];
+  get_base_1_2(bases); // no need to check since we call on_Update_plane_button_clicked
+  Epic_kernel::Vector_3 base_1(bases[0], bases[1], bases[2]);
+  Epic_kernel::Vector_3 base_2(bases[3], bases[4], bases[5]);
+  const Epic_kernel::Vector_3 normal = CGAL::cross_product(base_1, base_2);
+
+  // get distance between planes
+  bool to_double_ok = true;
+  double distance_with_planes = ui_widget.Distance_with_planes->text().toDouble(&to_double_ok);
+  if(!to_double_ok) { 
+    print_message("Error: Set Distance_with_planes text box!");
+    return; 
+  }
+
+  // construct a bbox for selected polyhedron
+  const CGAL::Three::Scene_interface::Bbox& bbox = item->bbox();
+  CGAL::Bbox_3 cgal_bbox(bbox.xmin, bbox.ymin, bbox.zmin,
+    bbox.xmax, bbox.ymax, bbox.zmax);
+  Polyhedron* poly = item->polyhedron();
+
+  // continue generating planes while inside bbox
+  std::vector<Epic_kernel::Plane_3> planes;
+  std::vector<qglviewer::Vec> plane_positions;
+
+  for(int dir = 1, step = 0; /* */ ; ++step) 
+  {
+    double distance_norm = (dir * step) * distance_with_planes;
+    qglviewer::Vec new_pos = pos + (n*distance_norm);
+
+    //Epic_kernel::Plane_3 plane(n[0], n[1],  n[2], - n * new_pos);
+    Epic_kernel::Point_3 new_pos_cgal(new_pos[0], new_pos[1], new_pos[2]);
+    Epic_kernel::Plane_3 plane(new_pos_cgal, normal);
+
+    if(!CGAL::do_intersect(cgal_bbox, plane)) { 
+      if(dir == -1) { break; }
+      std::reverse(planes.begin(), planes.end());
+      std::reverse(plane_positions.begin(), plane_positions.end());
+      dir = -1; // reverse direction
+      step = 0; // we should skip the plane itself, and we will when continue cause ++step
+      continue;
+    }
+    planes.push_back(plane);
+    plane_positions.push_back(new_pos); 
+  }
+  print_message(QString("Created %1 cuts inside bbox...").arg(planes.size()));
+
+  bool new_polyline_item_for_polylines = ui_widget.newPolylineItemCheckBox->checkState() == Qt::Checked;
+  if(!new_polyline_item_for_polylines) 
+  {
+    Scene_polylines_item* new_polylines_item = new Scene_polylines_item();
+    QTime time; time.start();
+    // call algorithm and fill polylines in polylines_item
+    intersection_of_plane_Polyhedra_3_using_AABB_wrapper(*poly, planes, plane_positions, new_polylines_item->polylines);
+    // set names etc and print timing
+    print_message( QString("Done: processed %1 cuts - generated %2 polylines in %3 ms!").
+      arg(planes.size()).arg(new_polylines_item->polylines.size()).arg(time.elapsed()) );
+
+    new_polylines_item->setName(QString("%1 with %2 cuts").
+      arg(item->name()).arg(planes.size()) );
+    new_polylines_item->setColor(Qt::green);
+    new_polylines_item->setRenderingMode(Wireframe);
+    scene->addItem(new_polylines_item);
+  }
+  else {
+    QTime time; time.start();
+    std::list<std::vector<Epic_kernel::Point_3> > polylines;
+    // call algorithm and fill polylines in polylines_item
+    intersection_of_plane_Polyhedra_3_using_AABB_wrapper(*poly, planes, plane_positions, polylines);
+    // set names etc and print timing
+    print_message( QString("Done: processed %1 cuts - generated %2 polylines in %3 ms!").
+      arg(planes.size()).arg(polylines.size()).arg(time.elapsed()) );
+
+    int counter = 0;
+    for(std::list<std::vector<Epic_kernel::Point_3> >::iterator it = polylines.begin(); it != polylines.end(); ++it, ++counter) {
+      Scene_polylines_item* new_polylines_item = new Scene_polylines_item();
+      new_polylines_item->polylines.push_back(*it);
+      new_polylines_item->setName(QString("%1 with %2 cuts %3").
+        arg(item->name()).arg(planes.size()).arg(counter) );
+      new_polylines_item->setColor(Qt::green);
+      new_polylines_item->setRenderingMode(Wireframe);
+      scene->addItem(new_polylines_item);
+      new_polylines_item->invalidateOpenGLBuffers();
+    }
+  }
+}
+
+void Polyhedron_demo_polyhedron_slicer_plugin::item_about_to_be_destroyed(CGAL::Three::Scene_item* scene_item) {
+  if(plane_item == NULL) { return; }// which means this plugin erased plane_item
+  Scene_plane_item* destroyed_plane = qobject_cast<Scene_plane_item*>(scene_item);
+  if(destroyed_plane && destroyed_plane == plane_item) {
+    plane_item = NULL;
+    dock_widget->hide();
+  }
+}
+
+void Polyhedron_demo_polyhedron_slicer_plugin::dock_widget_closed() {
+  CGAL_assertion(plane_item != NULL);
+  CGAL::Three::Scene_interface::Item_id id = scene->item_id(plane_item);
+  plane_item = NULL;
+  scene->erase(id);
+}
+// this function assumes 'planes' are parallel
+void Polyhedron_demo_polyhedron_slicer_plugin::intersection_of_plane_Polyhedra_3_using_AABB_wrapper(
+  Polyhedron& poly, 
+  const std::vector<Epic_kernel::Plane_3>& planes,
+  const std::vector<qglviewer::Vec>& plane_positions,
+  std::list<std::vector<Epic_kernel::Point_3> >& polylines) 
+{
+  CGAL::Polygon_mesh_slicer<Polyhedron, Epic_kernel> slicer(poly);
+  std::vector<qglviewer::Vec>::const_iterator plane_position_it = plane_positions.begin();
+  for(std::vector<Epic_kernel::Plane_3>::const_iterator plane_it = planes.begin(); plane_it != planes.end(); ++plane_it, ++plane_position_it) 
+    slicer(*plane_it, std::front_inserter(polylines));
+
+}
+
+#include "Polyhedron_slicer_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui
new file mode 100644
index 0000000..e6426cc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Polyhedron_slicer</class>
+ <widget class="QDockWidget" name="Polyhedron_slicer">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>289</width>
+    <height>208</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Polyhedron Slicer</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QGridLayout">
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="Base_2_x"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="Base_2_label">
+        <property name="text">
+         <string>Base 2</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="Base_1_label">
+        <property name="text">
+         <string>Base 1</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="Center_label">
+        <property name="text">
+         <string>Center</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="Base_1_x"/>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="Center_x"/>
+      </item>
+      <item row="0" column="3">
+       <widget class="QLineEdit" name="Base_1_z"/>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLineEdit" name="Base_1_y"/>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLineEdit" name="Center_y"/>
+      </item>
+      <item row="2" column="3">
+       <widget class="QLineEdit" name="Center_z"/>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLineEdit" name="Base_2_y"/>
+      </item>
+      <item row="1" column="3">
+       <widget class="QLineEdit" name="Base_2_z"/>
+      </item>
+      <item row="3" column="3">
+       <widget class="QPushButton" name="Update_plane_button">
+        <property name="text">
+         <string>Update Plane</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="Distance_with_planes_label">
+        <property name="text">
+         <string>Distance with planes</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="Distance_with_planes"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="_2">
+      <item>
+       <widget class="QCheckBox" name="newPolylineItemCheckBox">
+        <property name="text">
+         <string>New polyline item for each polyline</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Generate_button">
+        <property name="text">
+         <string>Generate</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp
new file mode 100644
index 0000000..17522c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp
@@ -0,0 +1,167 @@
+#include <QApplication>
+#include <QMessageBox>
+#include <QMainWindow>
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
+
+#include <CGAL/boost/graph/split_graph_into_polylines.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <boost/graph/filtered_graph.hpp>
+
+template <typename G>
+struct Is_border {
+  const G& g;
+  Is_border(const G& g)
+    : g(g)
+  {}
+
+ template <typename Descriptor>
+  bool operator()(const Descriptor& d) const {
+   return is_border(d,g);
+  }
+
+  bool operator()(typename boost::graph_traits<G>::vertex_descriptor d) const {
+    return is_border(d,g) != boost::none;
+  }
+
+};
+
+
+using namespace CGAL::Three;
+class Polyhedron_demo_polyhedron_stitching_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  QAction* actionDetectBorders;
+  QAction* actionStitchBorders;
+public:
+  QList<QAction*> actions() const { return QList<QAction*>() << actionDetectBorders << actionStitchBorders; }
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* /* m */)
+  {
+    actionDetectBorders= new QAction(tr("Detect Boundaries"), mainWindow);
+    actionStitchBorders= new QAction(tr("Stitch Duplicated Boundaries"), mainWindow);
+    actionDetectBorders->setObjectName("actionDetectBorders");
+    actionStitchBorders->setObjectName("actionStitchBorders");
+    actionStitchBorders->setProperty("subMenuName", "Polygon Mesh Processing");
+    actionDetectBorders->setProperty("subMenuName", "Polygon Mesh Processing");
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    Q_FOREACH(int index, scene->selectionIndices())
+    {
+      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(index)) )
+        return true;
+    }
+    return false;
+  }
+
+public Q_SLOTS:
+  void on_actionDetectBorders_triggered();
+  void on_actionStitchBorders_triggered();
+
+}; // end Polyhedron_demo_polyhedron_stitching_plugin
+
+
+
+struct Polyline_visitor
+{
+  Scene_polylines_item* new_item;
+
+  Polyline_visitor(Scene_polylines_item* new_item)
+    : new_item(new_item)
+  {}
+
+  void start_new_polyline()
+  {
+    new_item->polylines.push_back( Scene_polylines_item::Polyline() );
+  }
+
+  void add_node(boost::graph_traits<Polyhedron>::vertex_descriptor vd)
+  {
+    new_item->polylines.back().push_back(vd->point());
+  }
+  void end_polyline(){}
+};
+
+void Polyhedron_demo_polyhedron_stitching_plugin::on_actionDetectBorders_triggered()
+{
+  Q_FOREACH(int index, scene->selectionIndices())
+  {
+    Scene_polyhedron_item* item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+    if(item)
+    {
+      Scene_polylines_item* new_item = new Scene_polylines_item();
+
+      Polyhedron* pMesh = item->polyhedron();
+      pMesh->normalize_border();
+
+#if 0
+      for (Polyhedron::Halfedge_iterator
+              it=pMesh->border_halfedges_begin(), it_end=pMesh->halfedges_end();
+              it!=it_end; ++it)
+      {
+        if (!it->is_border()) continue;
+        /// \todo build cycles and graph with nodes of valence 2.
+        new_item->polylines.push_back( Scene_polylines_item::Polyline() );
+        new_item->polylines.back().push_back( it->opposite()->vertex()->point() );
+        new_item->polylines.back().push_back( it->vertex()->point() );
+      }
+#else
+      typedef boost::filtered_graph<Polyhedron,Is_border<Polyhedron>, Is_border<Polyhedron> > BorderGraph;
+      
+      Is_border<Polyhedron> ib(*pMesh);
+      BorderGraph bg(*pMesh,ib,ib);
+      Polyline_visitor polyline_visitor(new_item); 
+      CGAL::split_graph_into_polylines( bg,
+                                        polyline_visitor,
+                                        CGAL::internal::IsTerminalDefault() );
+#endif
+      
+      if (new_item->polylines.empty())
+      {
+        delete new_item;
+      }
+      else
+      {
+        new_item->setName(tr("Boundary of %1").arg(item->name()));
+        new_item->setColor(Qt::red);
+        scene->addItem(new_item);
+        new_item->invalidateOpenGLBuffers();
+      }
+    }
+  }
+}
+
+void Polyhedron_demo_polyhedron_stitching_plugin::on_actionStitchBorders_triggered()
+{
+  Q_FOREACH(int index, scene->selectionIndices())
+  {
+    Scene_polyhedron_item* item =
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+    if(item)
+    {
+      Polyhedron* pMesh = item->polyhedron();
+      CGAL::Polygon_mesh_processing::stitch_borders(*pMesh);
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(item);
+    }
+  }
+}
+
+#include "Polyhedron_stitching_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp
new file mode 100644
index 0000000..21154f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp
@@ -0,0 +1,115 @@
+#include <QtCore/qglobal.h>
+
+#include "Scene_polyhedron_item.h"
+#include <CGAL/Three/Scene_interface.h>
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "Messages_interface.h"
+#include <CGAL/gl.h>
+
+#include <QAction>
+#include <QMainWindow>
+#include <QObject>
+
+#include <CGAL/Polygon_mesh_processing/repair.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+using namespace CGAL::Three;
+class Polyhedron_demo_repair_polyhedron_plugin :
+        public QObject,
+        public Polyhedron_demo_plugin_helper
+{
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // To silent a warning -Woverloaded-virtual
+  // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+  using Polyhedron_demo_plugin_helper::init;
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface,
+            Messages_interface* m)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    this->messages = m;
+
+    actionRemoveIsolatedVertices = new QAction(tr("Remove Isolated Vertices"), mw);
+    if (actionRemoveIsolatedVertices){
+      connect(actionRemoveIsolatedVertices, SIGNAL(triggered()),
+              this, SLOT(on_actionRemoveIsolatedVertices_triggered()));
+    }
+
+    actionRemoveDegenerateFaces = new QAction(tr("Remove Degenerate Faces"), mw);
+    if (actionRemoveDegenerateFaces){
+      connect(actionRemoveDegenerateFaces, SIGNAL(triggered()),
+        this, SLOT(on_actionRemoveDegenerateFaces_triggered()));
+    }
+  }
+
+  QList<QAction*> actions() const
+  {
+    return QList<QAction*>() << actionRemoveIsolatedVertices
+      << actionRemoveDegenerateFaces;
+  }
+
+  bool applicable(QAction*) const
+  {
+    int item_id = scene->mainSelectionIndex();
+    return qobject_cast<Scene_polyhedron_item*>(
+      scene->item(item_id));
+  }
+
+public Q_SLOTS:
+  void on_actionRemoveIsolatedVertices_triggered();
+  void on_actionRemoveDegenerateFaces_triggered();
+
+private:
+  QAction* actionRemoveIsolatedVertices;
+  QAction* actionRemoveDegenerateFaces;
+
+  Messages_interface* messages;
+}; // end Polyhedron_demo_repair_polyhedron_plugin
+
+
+void Polyhedron_demo_repair_polyhedron_plugin::on_actionRemoveIsolatedVertices_triggered()
+{
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_polyhedron_item* poly_item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+  if (poly_item)
+  {
+    std::size_t nbv =
+      CGAL::Polygon_mesh_processing::remove_isolated_vertices(
+        *poly_item->polyhedron());
+    messages->information(tr(" %1 isolated vertices have been removed.")
+      .arg(nbv));
+    poly_item->invalidateOpenGLBuffers();
+    Q_EMIT poly_item->itemChanged();
+  }
+}
+
+void Polyhedron_demo_repair_polyhedron_plugin::on_actionRemoveDegenerateFaces_triggered()
+{
+  const Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_polyhedron_item* poly_item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+  if (poly_item)
+  {
+    std::size_t nbv =
+      CGAL::Polygon_mesh_processing::remove_degenerate_faces(
+      *poly_item->polyhedron());
+    messages->information(tr(" %1 degenerate faces have been removed.")
+      .arg(nbv));
+    poly_item->invalidateOpenGLBuffers();
+    Q_EMIT poly_item->itemChanged();
+  }
+}
+
+
+#include "Repair_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp
new file mode 100644
index 0000000..f9b7212
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp
@@ -0,0 +1,418 @@
+#include <QtCore/qglobal.h>
+#include "opengl_tools.h"
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polyhedron_selection_item.h"
+#include "Scene_points_with_normal_item.h"
+#include "Scene_polylines_item.h"
+
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "ui_Selection_widget.h"
+
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+
+#include <map>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <CGAL/boost/graph/split_graph_into_polylines.h>
+
+struct Is_terminal
+{
+  template <typename VertexDescriptor, typename Graph>
+  bool operator ()(VertexDescriptor , const Graph& )
+  {
+    return false; // degree(vd,g) != 2; is a bad test in case of parallel edges
+  }
+};
+
+
+template <typename Graph>
+struct Polyline_visitor
+{
+  Scene_polylines_item* item;
+  const Graph& points_pmap;
+
+  Polyline_visitor(Scene_polylines_item* item_,
+                   const Graph& points_property_map)
+    : item(item_),
+      points_pmap(points_property_map)
+  {}
+
+  void start_new_polyline()
+  {
+    item->polylines.push_back( Scene_polylines_item::Polyline() );
+  }
+
+  void add_node(typename boost::graph_traits<Graph>::vertex_descriptor vd)
+  {
+    item->polylines.back().push_back(points_pmap[vd]);
+  }
+  void end_polyline(){}
+};
+using namespace CGAL::Three;
+class Polyhedron_demo_selection_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()))
+        || qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex())); 
+  }
+  void print_message(QString message) { messages->information(message); }
+  QList<QAction*> actions() const { return QList<QAction*>() << actionSelection; }
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) {
+    mw = mainWindow;
+    scene = scene_interface;
+    messages = m;
+    actionSelection = new QAction(tr("Selection"), mw);
+    connect(actionSelection, SIGNAL(triggered()), this, SLOT(selection_action()));
+
+    dock_widget = new QDockWidget("Selection", mw);
+    dock_widget->setVisible(false);
+
+    ui_widget.setupUi(dock_widget);
+    add_dock_widget(dock_widget);
+
+    connect(ui_widget.Select_all_button,  SIGNAL(clicked()), this, SLOT(on_Select_all_button_clicked()));
+    connect(ui_widget.Clear_button,  SIGNAL(clicked()), this, SLOT(on_Clear_button_clicked()));
+    connect(ui_widget.Select_isolated_components_button,  SIGNAL(clicked()), this, SLOT(on_Select_isolated_components_button_clicked()));
+    connect(ui_widget.Get_minimum_button,  SIGNAL(clicked()), this, SLOT(on_Get_minimum_button_clicked()));
+    connect(ui_widget.Create_selection_item_button,  SIGNAL(clicked()), this, SLOT(on_Create_selection_item_button_clicked()));    
+    connect(ui_widget.Selection_type_combo_box, SIGNAL(currentIndexChanged(int)), 
+            this, SLOT(on_Selection_type_combo_box_changed(int)));
+    connect(ui_widget.Insertion_radio_button, SIGNAL(toggled(bool)), this, SLOT(on_Insertion_radio_button_toggled(bool)));
+    connect(ui_widget.Brush_size_spin_box, SIGNAL(valueChanged(int)), this, SLOT(on_Brush_size_spin_box_changed(int)));
+    connect(ui_widget.Create_point_set_item_button, SIGNAL(clicked()), this, SLOT(on_Create_point_set_item_button_clicked()));
+    connect(ui_widget.Create_polyline_item_button, SIGNAL(clicked()), this, SLOT(on_Create_polyline_item_button_clicked()));
+    connect(ui_widget.Erase_selected_facets_button, SIGNAL(clicked()), this, SLOT(on_Erase_selected_facets_button_clicked()));
+    connect(ui_widget.Keep_connected_components_button, SIGNAL(clicked()), this, SLOT(on_Keep_connected_components_button_clicked()));
+    connect(ui_widget.Expand_reduce_button, SIGNAL(clicked()), this, SLOT(on_Expand_reduce_button_clicked()));
+    connect(ui_widget.Create_polyhedron_item_button, SIGNAL(clicked()), this, SLOT(on_Create_polyhedron_item_button_clicked()));
+    connect(ui_widget.Select_sharp_edges_button, SIGNAL(clicked()), this, SLOT(on_Select_sharp_edges_button_clicked()));
+
+    QObject* scene = dynamic_cast<QObject*>(scene_interface);
+    if(scene) { 
+      connect(scene, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(item_about_to_be_destroyed(CGAL::Three::Scene_item*)));
+      connect(scene, SIGNAL(newItem(int)), this, SLOT(new_item_created(int)));
+    } 
+  }
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+public Q_SLOTS:
+  void selection_action() { 
+    dock_widget->show();
+    dock_widget->raise();
+    if(scene->numberOfEntries() < 2) {
+      Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
+      if(!poly_item || selection_item_map.find(poly_item) != selection_item_map.end()) { return; }
+      Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw);
+      int item_id = scene->addItem(new_item);
+      QObject* scene_ptr = dynamic_cast<QObject*>(scene);
+      if (scene_ptr)
+        connect(new_item,SIGNAL(simplicesSelected(CGAL::Three::Scene_item*)), scene_ptr, SLOT(setSelectedItem(CGAL::Three::Scene_item*)));
+      scene->setSelectedItem(item_id);
+    }
+  }
+  // Select all
+  void on_Select_all_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    selection_item->select_all();
+  }
+  // Clear selection
+  void on_Clear_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    selection_item->clear();
+  }
+  // Isolated component related functions
+  void on_Select_isolated_components_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    boost::optional<std::size_t> minimum =
+      selection_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value());
+    if(minimum) {
+      ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
+    }
+  }
+  void on_Get_minimum_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+    boost::optional<std::size_t> minimum = selection_item->get_minimum_isolated_component();
+    if(minimum) {
+      ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
+    }
+  }
+  // Create selection item for selected polyhedron item
+  void on_Create_selection_item_button_clicked() {
+    Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
+    if(!poly_item) {
+      print_message("Error: there is no selected polyhedron item!");
+      return; 
+    }
+    // all other arrangements (putting inside selection_item_map), setting names etc,
+    // other params (e.g. k_ring) will be set inside new_item_created
+    Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw);
+    int item_id = scene->addItem(new_item);
+    QObject* scene_ptr = dynamic_cast<QObject*>(scene);
+    if (scene_ptr)
+      connect(new_item,SIGNAL(simplicesSelected(CGAL::Three::Scene_item*)), scene_ptr, SLOT(setSelectedItem(CGAL::Three::Scene_item*)));
+    scene->setSelectedItem(item_id);
+  }
+  void on_Selection_type_combo_box_changed(int index) {
+    typedef Scene_polyhedron_selection_item::Active_handle Active_handle;
+    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
+      it->second->set_active_handle_type(static_cast<Active_handle::Type>(index));
+    }
+  }
+  void on_Insertion_radio_button_toggled(bool toggle){
+    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
+      it->second->set_is_insert(toggle);
+    }
+  }
+  void on_Brush_size_spin_box_changed(int value) {
+    for(Selection_item_map::iterator it = selection_item_map.begin(); it != selection_item_map.end(); ++it) {
+      it->second->set_k_ring(value);
+    }
+  }
+
+  void on_Create_point_set_item_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+    if(selection_item->selected_vertices.empty()) {
+      print_message("Error: there is no selected vertex in polyhedron selection item!");
+      return;
+    }
+    Scene_points_with_normal_item* point_item = new Scene_points_with_normal_item();
+    point_item->setName(QString("%1-points").arg(selection_item->name()));
+    for(Scene_polyhedron_selection_item::Selection_set_vertex::iterator begin = selection_item->selected_vertices.begin(); 
+       begin != selection_item->selected_vertices.end(); ++begin) {
+       point_item->point_set()->push_back((*begin)->point());
+    }
+    scene->setSelectedItem( scene->addItem(point_item) );
+    scene->itemChanged(point_item);
+  }
+
+  void on_Create_polyline_item_button_clicked(){
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return;
+    }
+    if(selection_item->selected_edges.empty()) {
+      print_message("Error: there is no selected edge in polyhedron selection item!");
+      return;
+    }
+    Scene_polylines_item* polyline_item = new Scene_polylines_item();
+    polyline_item->setName(QString("%1-edges").arg(selection_item->name()));
+
+    typedef boost::adjacency_list < boost::listS,
+                                    boost::vecS,
+                                    boost::undirectedS,
+                                    Kernel::Point_3 > Edge_graph;
+    typedef Polyhedron::Vertex_handle Vertex_handle;
+    Edge_graph edge_graph;
+    std::map<Vertex_handle, Edge_graph::vertex_descriptor> p2vd;
+    std::map<Vertex_handle, Edge_graph::vertex_descriptor>::iterator it_find;
+    bool insert_OK;
+
+    for(Scene_polyhedron_selection_item::Selection_set_edge::iterator begin = selection_item->selected_edges.begin();
+       begin != selection_item->selected_edges.end(); ++begin)
+    {
+      Vertex_handle source = begin->halfedge()->opposite()->vertex();
+      boost::tie(it_find, insert_OK)
+        = p2vd.insert(std::make_pair(source, Edge_graph::vertex_descriptor()));
+      if (insert_OK)
+      {
+        it_find->second = add_vertex(edge_graph);
+        edge_graph[it_find->second] = source->point();
+      }
+      Edge_graph::vertex_descriptor src=it_find->second;
+
+      Vertex_handle target = begin->halfedge()->vertex();
+      boost::tie(it_find, insert_OK)
+        = p2vd.insert(std::make_pair(target, Edge_graph::vertex_descriptor()));
+      if (insert_OK)
+      {
+        it_find->second = add_vertex(edge_graph);
+        edge_graph[it_find->second] = target->point();
+      }
+      Edge_graph::vertex_descriptor tgt=it_find->second;
+      boost::add_edge(src, tgt, edge_graph);
+    }
+
+    Polyline_visitor<Edge_graph> polyline_visitor(polyline_item, edge_graph);
+    CGAL::split_graph_into_polylines( edge_graph,
+                                      polyline_visitor,
+                                      Is_terminal() );
+    scene->setSelectedItem( scene->addItem(polyline_item) );
+    scene->itemChanged(polyline_item);
+  }
+
+  void on_Erase_selected_facets_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    selection_item->erase_selected_facets();
+  }
+  void on_Keep_connected_components_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if (!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return;
+    }
+    selection_item->keep_connected_components();
+  }
+  void on_Create_polyhedron_item_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    Scene_polyhedron_item* poly_item = new Scene_polyhedron_item();
+    if(selection_item->export_selected_facets_as_polyhedron(poly_item->polyhedron())) {
+      poly_item->setName(QString("%1-facets").arg(selection_item->name()));
+      poly_item->invalidateOpenGLBuffers(); // for init()
+      scene->setSelectedItem( scene->addItem(poly_item) );
+      scene->itemChanged(poly_item);
+    }
+    else {
+      delete poly_item;
+      print_message("Error: polyhedron item is not created!");
+    }
+  }
+
+  void on_Select_sharp_edges_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if (!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return;
+    }
+
+    double angle = ui_widget.Sharp_angle_spinbox->value();
+    selection_item->select_sharp_edges(angle);
+    scene->itemChanged(selection_item);
+  }
+
+  void on_Expand_reduce_button_clicked() {
+    Scene_polyhedron_selection_item* selection_item = get_selected_item<Scene_polyhedron_selection_item>();
+    if(!selection_item) {
+      print_message("Error: there is no selected polyhedron selection item!");
+      return; 
+    }
+
+    int steps = ui_widget.Expand_reduce_spin_box->value();
+    selection_item->expand_or_reduce(steps);
+  }
+  // To handle empty selection items coming from loader
+  void new_item_created(int item_id) {
+    typedef Scene_polyhedron_selection_item::Active_handle Active_handle;
+    Scene_polyhedron_selection_item* selection_item = 
+      qobject_cast<Scene_polyhedron_selection_item*>(scene->item(item_id));
+    if(!selection_item) { return; }
+
+    Scene_polyhedron_item* poly_item = get_selected_item<Scene_polyhedron_item>();
+    if(!poly_item) {
+      CGAL_assertion(selection_item->polyhedron_item() == NULL); // which means it is coming from selection_io loader
+      print_message("Error: please select corresponding polyhedron item from Geometric Objects list.");
+      scene->erase(item_id);
+      return;
+    }
+
+    if(selection_item->polyhedron_item() == NULL) { //coming from selection_io loader
+      if(!selection_item->actual_load(poly_item, mw)) {
+        print_message("Error: loading selection item is not successful!");
+        scene->erase(item_id);
+        return;
+      }
+      selection_item->invalidateOpenGLBuffers();
+      scene->itemChanged(selection_item);
+    }
+    // now set default params both for selection items coming from selection_io, or on_Create_selection_item_button_clicked
+    Active_handle::Type aht = static_cast<Active_handle::Type>(ui_widget.Selection_type_combo_box->currentIndex());
+    bool is_insert = ui_widget.Insertion_radio_button->isChecked();
+    int k_ring = ui_widget.Brush_size_spin_box->value();
+
+    selection_item->set_active_handle_type(aht);
+    selection_item->set_is_insert(is_insert);
+    selection_item->set_k_ring(k_ring);
+    selection_item->setRenderingMode(Flat);
+    if(selection_item->name() == "unamed") {
+      selection_item->setName(tr("%1 (selection)").arg(poly_item->name()));
+    }
+
+    selection_item_map.insert(std::make_pair(poly_item, selection_item));
+  }
+  void item_about_to_be_destroyed(CGAL::Three::Scene_item* scene_item) {
+    // if polyhedron item
+    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene_item);
+    if(poly_item) {
+      std::pair<Selection_item_map::iterator, Selection_item_map::iterator> res =
+        selection_item_map.equal_range(poly_item);
+
+      for(Selection_item_map::iterator begin = res.first; begin != res.second; ) {
+        Scene_polyhedron_selection_item* selection_item = begin->second;
+        selection_item_map.erase(begin++); // first erase from map, because scene->erase will cause a call to this function
+        scene->erase( scene->item_id(selection_item) );
+      }
+    }
+    // if polyhedron selection item
+    Scene_polyhedron_selection_item* selection_item = qobject_cast<Scene_polyhedron_selection_item*>(scene_item);
+    if(selection_item) {
+      Scene_polyhedron_item* poly_item = selection_item->polyhedron_item();
+      std::pair<Selection_item_map::iterator, Selection_item_map::iterator> res =
+        selection_item_map.equal_range(poly_item);
+      for(Selection_item_map::iterator begin = res.first; begin != res.second; ++begin) {
+        if(begin->second == selection_item) {
+          selection_item_map.erase(begin); break;
+        }
+      }
+    }
+  }
+
+private:
+  Messages_interface* messages;
+  QAction* actionSelection;
+
+  QDockWidget* dock_widget;
+  Ui::Selection ui_widget;
+typedef std::multimap<Scene_polyhedron_item*, Scene_polyhedron_selection_item*> Selection_item_map;
+  Selection_item_map selection_item_map;
+}; // end Polyhedron_demo_selection_plugin
+
+//Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_plugin, Polyhedron_demo_selection_plugin)
+
+#include "Selection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_widget.ui
new file mode 100644
index 0000000..897cbc8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Selection_widget.ui
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Selection</class>
+ <widget class="QDockWidget" name="Selection">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>455</width>
+    <height>684</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Selection</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>Selection &Type:</string>
+          </property>
+          <property name="buddy">
+           <cstring>Selection_type_combo_box</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QComboBox" name="Selection_type_combo_box">
+          <item>
+           <property name="text">
+            <string>Vertex</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Facet</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Edge</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Connected component (facet)</string>
+           </property>
+          </item>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer_4">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QRadioButton" name="Insertion_radio_button">
+            <property name="text">
+             <string>Insertion</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="Removal_radio_button">
+            <property name="text">
+             <string>Removal</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_7">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_6">
+            <item>
+             <widget class="QLabel" name="label">
+              <property name="text">
+               <string>Brush &size:</string>
+              </property>
+              <property name="buddy">
+               <cstring>Brush_size_spin_box</cstring>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSpinBox" name="Brush_size_spin_box"/>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QPushButton" name="Select_all_button">
+          <property name="text">
+           <string>Select &All</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="Clear_button">
+          <property name="text">
+           <string>&Clear</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer_2">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_4">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_5">
+        <item>
+         <widget class="QLabel" name="label_3">
+          <property name="text">
+           <string>Isolated &Component Size:</string>
+          </property>
+          <property name="buddy">
+           <cstring>Threshold_size_spin_box</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="Threshold_size_spin_box">
+          <property name="maximum">
+           <number>999999999</number>
+          </property>
+          <property name="value">
+           <number>8</number>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="Get_minimum_button">
+          <property name="text">
+           <string>&Get Minimum</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Select_isolated_components_button">
+        <property name="text">
+         <string>Select &Isolated Components Below Threshold</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer_3">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_7">
+      <item>
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>Sharp edges angle:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="Sharp_angle_spinbox">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximum">
+         <number>180</number>
+        </property>
+        <property name="value">
+         <number>60</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Select_sharp_edges_button">
+        <property name="text">
+         <string>Select</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer_1">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_8">
+      <item>
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Expand or reduce selection:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="Expand_reduce_spin_box">
+        <property name="minimum">
+         <number>-50</number>
+        </property>
+        <property name="maximum">
+         <number>50</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Expand_reduce_button">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer_5">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Create_point_set_item_button">
+      <property name="text">
+       <string>Create Point Set Item from Selected Vertices</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Create_polyline_item_button">
+      <property name="text">
+       <string>Create Polyline Item from Selected Edges</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Create_polyhedron_item_button">
+      <property name="text">
+       <string>Create Polyhedron Item from Selected Facets</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Erase_selected_facets_button">
+      <property name="text">
+       <string>Erase Selected Facets from Polyhedron Item</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Keep_connected_components_button">
+      <property name="toolTip">
+       <string extracomment="from selected facets"/>
+      </property>
+      <property name="text">
+       <string>Keep connected components of Selected Facets</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Create_selection_item_button">
+      <property name="font">
+       <font>
+        <weight>75</weight>
+        <bold>true</bold>
+       </font>
+      </property>
+      <property name="text">
+       <string>Create Selection Item</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp
new file mode 100644
index 0000000..d548175
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp
@@ -0,0 +1,101 @@
+#include <QApplication>
+#include <QAction>
+#include <QMessageBox>
+#include <QMainWindow>
+#include "opengl_tools.h"
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polyhedron_selection_item.h"
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/intersections.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/box_intersection_d.h>
+
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+#include <CGAL/Make_triangle_soup.h>
+
+typedef Kernel::Triangle_3 Triangle;
+using namespace CGAL::Three;
+class Polyhedron_demo_self_intersection_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionSelfIntersection";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionSelfIntersection"] = getActionFromMainWindow(mw, "actionSelfIntersection");
+      actions_map["actionSelfIntersection"]->setProperty("subMenuName", "Polygon Mesh Processing");
+      autoConnectActions();
+
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionSelfIntersection_triggered();
+
+}; // end Polyhedron_demo_self_intersection_plugin
+
+void Polyhedron_demo_self_intersection_plugin::on_actionSelfIntersection_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    // compute self-intersections
+
+    typedef Polyhedron::Facet_handle Facet_handle;
+    std::vector<std::pair<Facet_handle, Facet_handle> > facets;
+    CGAL::Polygon_mesh_processing::self_intersections
+      (*pMesh, std::back_inserter(facets),
+      CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, *pMesh)));
+
+    std::cout << "ok (" << facets.size() << " triangle pair(s))" << std::endl;
+
+    // add intersecting triangles as a new polyhedron, i.e., a triangle soup.
+    if(!facets.empty())
+    {
+      Scene_polyhedron_selection_item* selection_item = new Scene_polyhedron_selection_item(item, mw);
+      for(std::vector<std::pair<Facet_handle, Facet_handle> >::iterator fb = facets.begin();
+        fb != facets.end(); ++fb) {
+        selection_item->selected_facets.insert(fb->first);
+        selection_item->selected_facets.insert(fb->second);
+      }
+      selection_item->invalidateOpenGLBuffers();
+      selection_item->setName(tr("%1 (selection) (intersecting triangles)").arg(item->name()));
+      item->setRenderingMode(Wireframe);
+      scene->addItem(selection_item);
+      scene->itemChanged(item);
+      scene->itemChanged(selection_item);
+    }
+    else 
+      QMessageBox::information(mw, tr("No self intersection"),
+                               tr("The polyhedron \"%1\" does not self-intersect.").
+                               arg(item->name()));
+  }
+}
+
+#include "Self_intersection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp
new file mode 100644
index 0000000..564824c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp
@@ -0,0 +1,144 @@
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+#include "Messages_interface.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_triangulate_facets_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // To silent a warning -Woverloaded-virtual
+  // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+  using Polyhedron_demo_plugin_helper::init;
+
+  void init(QMainWindow* mainWindow,
+            CGAL::Three::Scene_interface* scene_interface,
+            Messages_interface* m) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    this->messages = m;
+    actionTriangulateFacets = new QAction("Triangulate Facets", mw);
+    actionTriangulateFacets->setProperty("subMenuName","Polygon Mesh Processing");
+    if(actionTriangulateFacets) {
+      connect(actionTriangulateFacets, SIGNAL(triggered()),
+              this, SLOT(triangulate())); 
+    }
+    actionUnTriangulateFacets = new QAction("Untriangulate Facets", mw);
+    actionUnTriangulateFacets->setProperty("subMenuName","Polygon Mesh Processing");
+    if(actionUnTriangulateFacets) {
+      connect(actionUnTriangulateFacets, SIGNAL(triggered()),
+              this, SLOT(untriangulate())); 
+    }
+  };
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionTriangulateFacets
+                             << actionUnTriangulateFacets;
+  }
+
+  bool applicable(QAction*) const {
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()){
+      if ( qobject_cast<Scene_polyhedron_item*>(scene->item(index)) )
+        return true;
+    }
+    return false;
+  }
+
+public Q_SLOTS:
+  void untriangulate() {
+    const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+    Scene_polyhedron_item* item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+    if(item)
+    {
+      Polyhedron* pMesh = item->polyhedron();
+      if(!pMesh) return;
+
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      for(Polyhedron::Edge_iterator 
+            eit = pMesh->edges_begin(),
+            end = pMesh->edges_end();
+          eit != end; /*increment is done manually*/)
+      {
+        // std::cerr << (void*)&*eit << std::endl;
+        Polyhedron::Edge_iterator eit_copy = eit++;
+        if(!eit_copy->is_border()) {
+          Polyhedron::Facet_handle fh1 = eit_copy->facet();
+          Polyhedron::Facet_handle fh2 = eit_copy->opposite()->facet();
+          if( fh1 != fh2 &&  
+              !eit_copy->vertex()->is_bivalent() && 
+              !eit_copy->opposite()->vertex()->is_bivalent())
+          {
+            Kernel::Vector_3 v1 =
+              CGAL::Polygon_mesh_processing::compute_face_normal(fh1, *pMesh);
+            Kernel::Vector_3 v2 =
+              CGAL::Polygon_mesh_processing::compute_face_normal(fh2, *pMesh);
+            if(v1 * v2 > 0.99) {
+              // std::cerr << "join\n";
+              // pMesh->is_valid(true);
+              pMesh->join_facet(eit_copy);
+            }
+          }
+        }
+      }
+      CGAL_assertion_code(pMesh->normalize_border());
+      // CGAL_assertion(pMesh->is_valid(true, 3));
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(item);
+      // default cursor
+      QApplication::restoreOverrideCursor();
+    }
+  }
+
+  void triangulate() {
+    Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices())  {
+
+    Scene_polyhedron_item* item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+    if(item)
+    {
+      Polyhedron* pMesh = item->polyhedron();
+      if(!pMesh) continue;
+      if(pMesh->is_pure_triangle()) {
+        messages->warning(tr("The polyhedron \"%1\" is already triangulated.")
+                          .arg(item->name()));
+        continue;
+      }
+
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      CGAL::Polygon_mesh_processing::triangulate_faces(*pMesh);
+
+      CGAL_assertion_code(pMesh->normalize_border());
+      CGAL_assertion(pMesh->is_valid(false, 3));
+
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(item);
+      // default cursor
+      QApplication::restoreOverrideCursor();
+    } // end of if(item)
+
+    } // end of the loop on the selected items
+  }
+  
+private:
+  QAction* actionTriangulateFacets;
+  QAction* actionUnTriangulateFacets;  
+  Messages_interface* messages;
+};
+
+#include "Triangulate_facets_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt
new file mode 100644
index 0000000..ea76fd9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt
@@ -0,0 +1,61 @@
+include( polyhedron_demo_macros )
+if(EIGEN3_FOUND)
+  qt5_wrap_ui( surface_reconstructionUI_FILES Surface_reconstruction_plugin.ui)
+  polyhedron_demo_plugin(surface_reconstruction_plugin Surface_reconstruction_plugin Surface_reconstruction_plugin_impl ${surface_reconstructionUI_FILES})
+  target_link_libraries(surface_reconstruction_plugin scene_polygon_soup_item scene_polyhedron_item scene_points_with_normal_item)
+
+  qt5_wrap_ui( point_set_normal_estimationUI_FILES Point_set_normal_estimation_plugin.ui)
+  polyhedron_demo_plugin(point_set_normal_estimation_plugin Point_set_normal_estimation_plugin ${point_set_normal_estimationUI_FILES})
+  target_link_libraries(point_set_normal_estimation_plugin scene_points_with_normal_item)
+
+  qt5_wrap_ui( features_detection_pluginUI_FILES Features_detection_plugin.ui)
+  polyhedron_demo_plugin(features_detection_plugin Features_detection_plugin ${features_detection_pluginUI_FILES})
+  target_link_libraries(features_detection_plugin scene_points_with_normal_item)
+
+  polyhedron_demo_plugin(point_set_smoothing_plugin Point_set_smoothing_plugin)
+  target_link_libraries(point_set_smoothing_plugin scene_points_with_normal_item)
+
+  polyhedron_demo_plugin(point_set_average_spacing_plugin Point_set_average_spacing_plugin)
+  target_link_libraries(point_set_average_spacing_plugin scene_points_with_normal_item)
+
+else(EIGEN3_FOUND)
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Surface reconstruction plugin will not be available.")
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugins will not be available.")
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available.")
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available.")
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection plugin will not be available.")
+
+endif()
+
+  qt5_wrap_ui(point_set_bilateral_smoothingUI_FILES Point_set_bilateral_smoothing_plugin.ui)
+  polyhedron_demo_plugin(point_set_bilateral_smoothing_plugin Point_set_bilateral_smoothing_plugin ${point_set_bilateral_smoothingUI_FILES})
+  target_link_libraries(point_set_bilateral_smoothing_plugin scene_points_with_normal_item)
+
+  qt5_wrap_ui( ps_outliers_removal_UI_FILES Point_set_outliers_removal_plugin.ui)
+  polyhedron_demo_plugin(point_set_outliers_removal_plugin Point_set_outliers_removal_plugin ${ps_outliers_removal_UI_FILES})
+  target_link_libraries(point_set_outliers_removal_plugin scene_points_with_normal_item)
+
+  qt5_wrap_ui( point_set_selectionUI_FILES Point_set_selection_widget.ui)
+  polyhedron_demo_plugin(point_set_selection_plugin Point_set_selection_plugin ${point_set_selectionUI_FILES})
+  target_link_libraries(point_set_selection_plugin scene_points_with_normal_item scene_polylines_item)
+
+  qt5_wrap_ui(point_set_shape_detectionUI_FILES Point_set_shape_detection_plugin.ui)
+  polyhedron_demo_plugin(point_set_shape_detection_plugin Point_set_shape_detection_plugin ${point_set_shape_detectionUI_FILES})
+  target_link_libraries(point_set_shape_detection_plugin scene_polyhedron_item scene_points_with_normal_item scene_polygon_soup_item)
+
+  qt5_wrap_ui(point_set_simplificationUI_FILES Point_set_simplification_plugin.ui)
+  polyhedron_demo_plugin(point_set_simplification_plugin Point_set_simplification_plugin ${point_set_simplificationUI_FILES})
+  target_link_libraries(point_set_simplification_plugin scene_points_with_normal_item)
+
+
+  qt5_wrap_ui(point_set_upsamplingUI_FILES Point_set_upsampling_plugin.ui)
+  polyhedron_demo_plugin(point_set_upsampling_plugin Point_set_upsampling_plugin ${point_set_upsamplingUI_FILES})
+  target_link_libraries(point_set_upsampling_plugin scene_points_with_normal_item)
+
+  qt5_wrap_ui(point_set_wlopFILES Point_set_wlop_plugin.ui)
+  polyhedron_demo_plugin(point_set_wlop_plugin Point_set_wlop_plugin ${point_set_wlopFILES})
+  target_link_libraries(point_set_wlop_plugin scene_points_with_normal_item)
+
+  polyhedron_demo_plugin(merge_point_sets_plugin Merge_point_sets_plugin)
+  target_link_libraries(merge_point_sets_plugin scene_points_with_normal_item)
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp
new file mode 100644
index 0000000..b8f3fee
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp
@@ -0,0 +1,115 @@
+#include <QApplication>
+#include <QMessageBox>
+#include <QMainWindow>
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/vcm_estimate_edges.h>
+
+#include <CGAL/Timer.h>
+
+#include "ui_Features_detection_plugin.h"
+using namespace CGAL::Three;
+class Polyhedron_demo_features_detection_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+  QAction* actionDetectFeatures;
+public:
+  QList<QAction*> actions() const { return QList<QAction*>() << actionDetectFeatures; }
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface)
+  {
+    actionDetectFeatures= new QAction(tr("VCM Features Estimation"), mainWindow);
+    actionDetectFeatures->setObjectName("actionDetectFeatures");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionDetectFeatures_triggered();
+
+}; // end Polyhedron_demo_features_detection_plugin
+
+class Polyhedron_demo_features_detection_dialog : public QDialog, private Ui::VCMFeaturesDetectionDialog
+{
+  Q_OBJECT
+  public:
+    Polyhedron_demo_features_detection_dialog(QWidget* /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+    float offsetRadius() const { return m_inputOffsetRadius->value(); }
+    float convolveRadius() const { return m_inputConvolveRadius->value(); }
+    float threshold() const { return m_inputFeaturesThreshold->value(); }
+};
+
+void Polyhedron_demo_features_detection_plugin::on_actionDetectFeatures_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Polyhedron_demo_features_detection_dialog dialog;
+    if(!dialog.exec())
+      return;
+
+    typedef CGAL::cpp11::array<double,6> Covariance;
+    std::vector<Covariance> cov;
+
+    std::cerr << "Compute VCM (offset_radius="
+        << dialog.offsetRadius() << " and convolution radius=" << dialog.convolveRadius() << ")...\n";
+
+    CGAL::Timer task_timer; task_timer.start();
+    CGAL::compute_vcm(points->begin(), points->end(),
+                      CGAL::make_identity_property_map(Point_set::value_type()),
+                      cov, dialog.offsetRadius(), dialog.convolveRadius(),
+                      Kernel());
+    task_timer.stop();
+    std::cerr << "done: " << task_timer.time() << " seconds\n";
+
+    Scene_points_with_normal_item* new_item = new Scene_points_with_normal_item();
+    task_timer.reset(); task_timer.start();
+    std::size_t i=0;
+    std::cerr << "Select feature points (threshold=" << dialog.threshold() << ")...\n";
+    BOOST_FOREACH(const Point_set::value_type& p, *points)
+    {
+      if (CGAL::vcm_is_on_feature_edge(cov[i], dialog.threshold()))
+          new_item->point_set()->push_back(p);
+      ++i;
+    }
+    task_timer.stop();
+    std::cerr << "done: " << task_timer.time() << " seconds\n";
+
+    if ( !new_item->point_set()->empty() )
+    {
+      new_item->setName(tr("Features of %1").arg(item->name()));
+      new_item->setColor(Qt::red);
+      scene->addItem(new_item);
+      item->setVisible(false);
+    }
+    else
+      delete new_item;
+  }
+
+}
+
+#include "Features_detection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui
new file mode 100644
index 0000000..1f4d77f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VCMFeaturesDetectionDialog</class>
+ <widget class="QDialog" name="VCMFeaturesDetectionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>318</width>
+    <height>208</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Normal Estimation</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Offset Radius:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_inputOffsetRadius">
+       <property name="decimals">
+        <number>3</number>
+       </property>
+       <property name="singleStep">
+        <double>0.050000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.100000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_3">
+     <item>
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>Convolution Radius:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_inputConvolveRadius">
+       <property name="decimals">
+        <number>3</number>
+       </property>
+       <property name="singleStep">
+        <double>0.050000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QLabel" name="label_3">
+       <property name="text">
+        <string>Threshold:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_inputFeaturesThreshold">
+       <property name="decimals">
+        <number>3</number>
+       </property>
+       <property name="singleStep">
+        <double>0.020000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.160000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>VCMFeaturesDetectionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>VCMFeaturesDetectionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp
new file mode 100644
index 0000000..3425b90
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp
@@ -0,0 +1,91 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QMessageBox>
+
+
+using namespace CGAL::Three;
+class Polyhedron_demo_merge_point_sets_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+private:
+  QAction* actionMergePointSets;
+  
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionMergePointSets = new QAction(tr("Merge"), mainWindow);
+    actionMergePointSets->setObjectName("actionMergePointSets");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionMergePointSets;
+  }
+  
+  bool applicable(QAction*) const {
+    if (scene->selectionIndices().size() < 2)
+      return false;
+    
+    Q_FOREACH(int index, scene->selectionIndices())
+      {
+        if ( qobject_cast<Scene_points_with_normal_item*>(scene->item(index)) )
+          return true;
+      }
+    return false;
+  }
+
+public Q_SLOTS:
+  void on_actionMergePointSets_triggered();
+}; // end Polyhedron_demo_merge_point_sets_plugin
+
+void Polyhedron_demo_merge_point_sets_plugin::on_actionMergePointSets_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id mainSelectionIndex
+    = scene->mainSelectionIndex();
+  Scene_points_with_normal_item* mainSelectionItem
+    = qobject_cast<Scene_points_with_normal_item*>(scene->item(mainSelectionIndex));
+
+  QList<int> indices_to_remove;
+  Q_FOREACH(int index, scene->selectionIndices())
+    {
+      if (index == mainSelectionIndex)
+        continue;
+
+      Scene_points_with_normal_item* item =
+        qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+      if(item)
+        {
+          indices_to_remove.push_front(index);
+          std::copy (item->point_set()->begin(), item->point_set()->end(),
+                     std::back_inserter (*(mainSelectionItem->point_set())));
+          mainSelectionItem->setName(tr("%1 + %2").arg(mainSelectionItem->name()).arg(item->name()));
+        }
+    }
+  
+
+  mainSelectionItem->invalidateOpenGLBuffers();
+  scene->itemChanged(mainSelectionIndex);
+
+  //remove the other items
+  Q_FOREACH(int index, indices_to_remove)
+  {
+    scene->erase(index);
+  }
+}
+
+
+#include "Merge_point_sets_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp
new file mode 100644
index 0000000..4183b67
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp
@@ -0,0 +1,117 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QMessageBox>
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_average_spacing_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+private:
+  QAction* actionAverageSpacing;
+  
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionAverageSpacing = new QAction(tr("Point Set Average Spacing"), mainWindow);
+    actionAverageSpacing->setObjectName("actionAverageSpacing");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionAverageSpacing;
+  }
+  
+  //! Applicable if the currently selected item is a
+  //! points_with_normal_item.
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionAverageSpacing_triggered();
+}; // end Polyhedron_demo_point_set_average_spacing_plugin
+
+void Polyhedron_demo_point_set_average_spacing_plugin::on_actionAverageSpacing_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    bool ok;
+
+    const int nb_neighbors =
+      QInputDialog::getInt((QWidget*)mw,
+                               tr("Average Spacing"), // dialog title
+                               tr("Number of neighbors:"), // field label
+                               6, // default value = 1 ring
+                               6, // min
+                               1000, // max
+                               1, // step
+                               &ok);
+    if(!ok) 
+      return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::Timer task_timer; task_timer.start();
+    std::cerr << "Average spacing (k=" << nb_neighbors <<")...\n";
+
+    // Computes average spacing
+    double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                                      points->begin(), points->end(),
+                                      nb_neighbors);
+
+    // Print result
+    Kernel::Sphere_3 bsphere = points->bounding_sphere();
+    double radius = std::sqrt(bsphere.squared_radius());
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << "Average spacing = " << average_spacing 
+                                      << " = " << average_spacing/radius << " * point set radius (" 
+                                      << task_timer.time() << " seconds, "
+                                      << (memory>>20) << " Mb allocated)"
+                                      << std::endl;
+    QApplication::restoreOverrideCursor();
+
+    QMessageBox::information(NULL,
+                             tr("Average Spacing"),
+                             tr("Average Spacing = %1 = %2 * point set radius")
+                             .arg(average_spacing)
+                             .arg(average_spacing/radius));
+  }
+}
+
+
+#include "Point_set_average_spacing_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp
new file mode 100644
index 0000000..14932ff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp
@@ -0,0 +1,128 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/bilateral_smooth_point_set.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QMessageBox>
+
+#include "ui_Point_set_bilateral_smoothing_plugin.h"
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_bilateral_smoothing_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  
+  QAction* actionBilateralSmoothing;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionBilateralSmoothing = new QAction(tr("Point Set Bilateral Smoothing"), mainWindow);
+    actionBilateralSmoothing->setObjectName("actionBilateralSmoothing");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionBilateralSmoothing;
+  }
+
+public Q_SLOTS:
+  void on_actionBilateralSmoothing_triggered();
+
+}; // end Polyhedron_demo_point_set_bilateral_smoothing_plugin
+
+class Point_set_demo_point_set_bilateral_smoothing_dialog : public QDialog, private Ui::PointSetBilateralSmoothingDialog
+{
+  Q_OBJECT
+  public:
+    Point_set_demo_point_set_bilateral_smoothing_dialog(QWidget * /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+    unsigned int iterations() const { return m_iterations->value(); }
+    unsigned int neighborhood_size () const { return m_neighborhoodSize->value(); }
+    unsigned int sharpness_angle () const { return m_sharpnessAngle->value(); }
+};
+
+void Polyhedron_demo_point_set_bilateral_smoothing_plugin::on_actionBilateralSmoothing_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Point_set_demo_point_set_bilateral_smoothing_dialog dialog;
+    if(!dialog.exec())
+      return;
+
+    std::cerr << "Bilateral smoothing using "
+	      << dialog.iterations () << " iteration(s), neighborhood size of "
+	      << dialog.neighborhood_size () << " and sharpness angle of "
+	      << dialog.sharpness_angle () << "... ";
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::Timer task_timer; task_timer.start();
+
+    for (unsigned int i = 0; i < dialog.iterations (); ++i)
+      {
+	/* double error = */
+	CGAL::bilateral_smooth_point_set<Concurrency_tag>
+	  (points->begin(), 
+	   points->end(),
+	   CGAL::make_identity_property_map(Point_set::value_type()),
+	   CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+	   dialog.neighborhood_size (),
+	   dialog.sharpness_angle ());
+      }
+
+
+    
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << task_timer.time() << " seconds, "
+	      << (memory>>20) << " Mb allocated)"
+	      << std::endl;
+
+    // Updates scene
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(index);
+
+    QApplication::restoreOverrideCursor();
+
+  }
+}
+
+#include "Point_set_bilateral_smoothing_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui
new file mode 100644
index 0000000..95b0e43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PointSetBilateralSmoothingDialog</class>
+ <widget class="QDialog" name="PointSetBilateralSmoothingDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>357</width>
+    <height>141</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Bilateral Smoothing</string>
+  </property>
+  <layout class="QGridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Iterations</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_5">
+     <property name="text">
+      <string>Neighborhood size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QSpinBox" name="m_iterations">
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>2147483647</number>
+     </property>
+     <property name="value">
+      <number>1</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QSpinBox" name="m_neighborhoodSize">
+     <property name="suffix">
+      <string/>
+     </property>
+     <property name="prefix">
+      <string/>
+     </property>
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>2147483647</number>
+     </property>
+     <property name="value">
+      <number>24</number>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QSpinBox" name="m_sharpnessAngle">
+     <property name="suffix">
+      <string>°</string>
+     </property>
+     <property name="maximum">
+      <number>90</number>
+     </property>
+     <property name="value">
+      <number>25</number>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Sharpness Angle</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PointSetBilateralSmoothingDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PointSetBilateralSmoothingDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp
new file mode 100644
index 0000000..2d8f8f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp
@@ -0,0 +1,288 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/pca_estimate_normals.h>
+#include <CGAL/jet_estimate_normals.h>
+#include <CGAL/vcm_estimate_normals.h>
+#include <CGAL/mst_orient_normals.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QMessageBox>
+
+#include "ui_Point_set_normal_estimation_plugin.h"
+
+#if BOOST_VERSION == 105700
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+#  define CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN 1
+#endif
+#endif
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+using namespace CGAL::Three;
+
+class Polyhedron_demo_point_set_normal_estimation_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  QAction* actionNormalEstimation;
+  QAction* actionNormalInversion;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+
+    actionNormalEstimation = new QAction(tr("Point Set Normal Estimation"), mainWindow);
+    actionNormalEstimation->setObjectName("actionNormalEstimation");
+
+    actionNormalInversion = new QAction(tr("Point Set Inverse Normal Orientations"), mainWindow);
+    actionNormalInversion->setObjectName("actionNormalInversion");
+    
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionNormalEstimation << actionNormalInversion;
+  }
+
+  bool applicable(QAction* action) const {
+    Scene_points_with_normal_item* item = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+
+    if (action==actionNormalEstimation)
+#if CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
+    return false;
+#else
+    return item;
+#endif
+    else
+      return item && item->has_normals();
+  }
+
+public Q_SLOTS:
+  void on_actionNormalEstimation_triggered();
+  void on_actionNormalInversion_triggered();
+
+}; // end PS_demo_smoothing_plugin
+
+class Point_set_demo_normal_estimation_dialog : public QDialog, private Ui::NormalEstimationDialog
+{
+  Q_OBJECT
+  public:
+    Point_set_demo_normal_estimation_dialog(QWidget* /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+  int pca_neighbors() const { return m_pca_neighbors->value(); }
+  int jet_neighbors() const { return m_jet_neighbors->value(); }
+  unsigned int convolution_neighbors() const { return m_convolution_neighbors->value(); }
+  double convolution_radius() const { return m_convolution_radius->value(); }
+  double offset_radius() const { return m_offset_radius->value(); }
+  int orient_neighbors() const { return m_orient_neighbors->value(); }
+
+  unsigned int method () const
+  {
+    if (buttonPCA->isChecked ())       return 0;
+    if (buttonJet->isChecked ())       return 1;
+    if (buttonVCM->isChecked ())       return 2;
+    return -1;
+  }
+  bool orient () const
+  {
+    return buttonOrient->isChecked();
+  }
+  bool use_convolution_radius () const
+  {
+    return buttonRadius->isChecked();
+  }
+};
+
+
+void Polyhedron_demo_point_set_normal_estimation_plugin::on_actionNormalInversion_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+  
+    for(Point_set::iterator it = points->begin(); it != points->end(); ++it){
+      it->normal() = -1 * it->normal();
+    }
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(item);
+  }
+}
+
+void Polyhedron_demo_point_set_normal_estimation_plugin::on_actionNormalEstimation_triggered()
+{
+#if !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Point_set_demo_normal_estimation_dialog dialog;
+    if(!dialog.exec())
+      return;
+      
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    // First point to delete
+    Point_set::iterator first_unoriented_point = points->end();
+
+    //***************************************
+    // normal estimation
+    //***************************************
+
+    if (dialog.method() == 0) // PCA
+    {
+      CGAL::Timer task_timer; task_timer.start();
+      std::cerr << "Estimates normal direction by PCA (k=" << dialog.pca_neighbors() <<")...\n";
+
+      // Estimates normals direction.
+      CGAL::pca_estimate_normals<Concurrency_tag>(points->begin(), points->end(),
+                                CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                dialog.pca_neighbors());
+
+      std::size_t memory = CGAL::Memory_sizer().virtual_size();
+      std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, "
+                                                  << (memory>>20) << " Mb allocated"
+                                                  << std::endl;
+    }
+    else if (dialog.method() == 1) // Jet
+    {
+      CGAL::Timer task_timer; task_timer.start();
+      std::cerr << "Estimates normal direction by Jet Fitting (k=" << dialog.jet_neighbors() <<")...\n";
+
+      // Estimates normals direction.
+      CGAL::jet_estimate_normals<Concurrency_tag>(points->begin(), points->end(),
+                                CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                dialog.jet_neighbors());
+
+      std::size_t memory = CGAL::Memory_sizer().virtual_size();
+      std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, "
+                                                  << (memory>>20) << " Mb allocated"
+                                                  << std::endl;
+    }
+    else if (dialog.method() == 2) // VCM
+    {
+      CGAL::Timer task_timer; task_timer.start();
+      // Estimates normals direction.
+      if (dialog.use_convolution_radius())
+        {
+          std::cerr << "Estimates Normals Direction using VCM (R="
+                    << dialog.offset_radius() << " and r=" << dialog.convolution_radius() << ")...\n";
+
+          CGAL::vcm_estimate_normals(points->begin(), points->end(),
+                                     CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                     dialog.offset_radius(), dialog.convolution_radius());
+        }
+      else
+        {
+          std::cerr << "Estimates Normals Direction using VCM (R="
+                    << dialog.offset_radius() << " and k=" << dialog.convolution_neighbors() << ")...\n";
+
+          CGAL::vcm_estimate_normals(points->begin(), points->end(),
+                                     CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                     dialog.offset_radius(), dialog.convolution_neighbors());
+        }
+
+      std::size_t memory = CGAL::Memory_sizer().virtual_size();
+      std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, "
+                                                  << (memory>>20) << " Mb allocated"
+                                                  << std::endl;
+    }
+
+    item->set_has_normals(true);
+    item->setRenderingMode(PointsPlusNormals);
+
+    //***************************************
+    // normal orientation
+    //***************************************
+
+    if (dialog.orient ())
+      {
+        CGAL::Timer task_timer; task_timer.start();
+        std::cerr << "Orient normals with a Minimum Spanning Tree (k=" << dialog.orient_neighbors() << ")...\n";
+
+        // Tries to orient normals
+        first_unoriented_point =
+          CGAL::mst_orient_normals(points->begin(), points->end(),
+                                   CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                   dialog.orient_neighbors());
+
+        //indicates that the point set has normals
+        if (first_unoriented_point!=points->begin()){
+          item->set_has_normals(true);
+          item->setRenderingMode(PointsPlusNormals);
+        }
+
+        std::size_t nb_unoriented_normals = std::distance(first_unoriented_point, points->end());
+        std::size_t memory = CGAL::Memory_sizer().virtual_size();
+        std::cerr << "Orient normals: " << nb_unoriented_normals << " point(s) with an unoriented normal are selected ("
+                  << task_timer.time() << " seconds, "
+                  << (memory>>20) << " Mb allocated)"
+                  << std::endl;
+
+        // Selects points with an unoriented normal
+        points->set_first_selected (first_unoriented_point);
+
+        // Updates scene
+        item->invalidateOpenGLBuffers();
+        scene->itemChanged(index);
+
+        QApplication::restoreOverrideCursor();
+
+        // Warns user
+        if (nb_unoriented_normals > 0)
+          {
+            QMessageBox::information(NULL,
+                                     tr("Points with an unoriented normal"),
+                                     tr("%1 point(s) with an unoriented normal are selected.\nPlease orient them or remove them before running Poisson reconstruction.")
+                                     .arg(nb_unoriented_normals));
+          }
+      }
+    else
+      {
+        // Updates scene
+        item->invalidateOpenGLBuffers();
+        scene->itemChanged(index);
+
+        QApplication::restoreOverrideCursor();
+      }
+  }
+#endif // !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN
+}
+
+#include "Point_set_normal_estimation_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui
new file mode 100644
index 0000000..4e78393
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>NormalEstimationDialog</class>
+ <widget class="QDialog" name="NormalEstimationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>473</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QRadioButton" name="buttonPCA">
+     <property name="text">
+      <string>PCA Estimate Normals</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QFrame" name="frame">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="supportSizeLabel">
+        <property name="text">
+         <string>Support Size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QSpinBox" name="m_pca_neighbors">
+        <property name="suffix">
+         <string>Nearest Neighbors</string>
+        </property>
+        <property name="minimum">
+         <number>3</number>
+        </property>
+        <property name="maximum">
+         <number>10000000</number>
+        </property>
+        <property name="value">
+         <number>6</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QRadioButton" name="buttonJet">
+     <property name="text">
+      <string>Jet Estimate Normals</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QFrame" name="frame_2">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="supportSizeLabel_2">
+        <property name="text">
+         <string>Support Size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QSpinBox" name="m_jet_neighbors">
+        <property name="suffix">
+         <string>Nearest Neighbors</string>
+        </property>
+        <property name="minimum">
+         <number>3</number>
+        </property>
+        <property name="maximum">
+         <number>100000000</number>
+        </property>
+        <property name="value">
+         <number>12</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QRadioButton" name="buttonVCM">
+     <property name="text">
+      <string>VCM Estimate Normals</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QFrame" name="frame_3">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_4">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="offsetRadiusLabel">
+        <property name="text">
+         <string>Offset Radius</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="m_offset_radius">
+        <property name="minimum">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.100000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="m_convolution_radius"/>
+      </item>
+      <item row="1" column="0">
+       <widget class="QRadioButton" name="buttonRadius">
+        <property name="text">
+         <string>Convolution Radius</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QRadioButton" name="buttonNeighbors">
+        <property name="text">
+         <string>Convolution Neighbors</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QSpinBox" name="m_convolution_neighbors">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="maximum">
+         <number>100000000</number>
+        </property>
+        <property name="value">
+         <number>40</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="buttonOrient">
+     <property name="text">
+      <string>Orient Estimated Normals</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QFrame" name="frame_4">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_5">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QLabel" name="neighborhoodSizeLabel">
+        <property name="text">
+         <string>Neighborhood Size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QSpinBox" name="m_orient_neighbors">
+        <property name="suffix">
+         <string>Nearest Neighbors</string>
+        </property>
+        <property name="minimum">
+         <number>6</number>
+        </property>
+        <property name="maximum">
+         <number>100000000</number>
+        </property>
+        <property name="value">
+         <number>18</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonJet</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frame_2</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>96</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>135</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonPCA</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frame</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>18</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>57</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonVCM</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frame_3</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>174</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>245</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonOrient</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frame_4</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>316</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>355</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonRadius</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>m_convolution_radius</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>90</x>
+     <y>242</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>285</x>
+     <y>245</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonNeighbors</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>m_convolution_neighbors</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>101</x>
+     <y>274</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>285</x>
+     <y>277</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>NormalEstimationDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>428</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>225</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>NormalEstimationDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>199</x>
+     <y>428</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>225</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp
new file mode 100644
index 0000000..4d4b790
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp
@@ -0,0 +1,116 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/remove_outliers.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+#include <QMessageBox>
+
+#include "ui_Point_set_outliers_removal_plugin.h"
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_outliers_removal_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+private:
+  QAction* actionOutlierRemoval;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionOutlierRemoval = new QAction(tr("Point Set Outliers Selection"), mainWindow);
+    actionOutlierRemoval->setObjectName("actionOutlierRemoval");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+  
+  //! Applicate for Point_sets with normals.
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionOutlierRemoval;
+  }
+
+public Q_SLOTS:
+  void on_actionOutlierRemoval_triggered();
+
+}; // end Polyhedron_demo_point_set_outliers_removal_plugin
+
+class Point_set_demo_outlier_removal_dialog : public QDialog, private Ui::OutlierRemovalDialog
+{
+  Q_OBJECT
+  public:
+    Point_set_demo_outlier_removal_dialog(QWidget * /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+    double percentage() const { return m_inputPercentage->value(); }
+    int nbNeighbors() const { return m_inputNbNeighbors->value(); }
+};
+
+void Polyhedron_demo_point_set_outliers_removal_plugin::on_actionOutlierRemoval_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Point_set_demo_outlier_removal_dialog dialog;
+    if(!dialog.exec())
+      return;
+    const double removed_percentage = dialog.percentage(); // percentage of points to remove
+    const int nb_neighbors = dialog.nbNeighbors();
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::Timer task_timer; task_timer.start();
+    std::cerr << "Select outliers (" << removed_percentage <<"%)...\n";
+
+    // Computes outliers
+    Point_set::iterator first_point_to_remove =
+      CGAL::remove_outliers(points->begin(), points->end(),
+                            nb_neighbors,
+                            removed_percentage);
+
+    std::size_t nb_points_to_remove = std::distance(first_point_to_remove, points->end());
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << "Simplification: " << nb_points_to_remove << " point(s) are selected ("
+                                    << task_timer.time() << " seconds, "
+                                    << (memory>>20) << " Mb allocated)"
+                                    << std::endl;
+
+    // Selects points to delete
+    points->set_first_selected (first_point_to_remove);
+
+    // Updates scene
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(index);
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Point_set_outliers_removal_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui
new file mode 100644
index 0000000..b0705d1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui
@@ -0,0 +1,109 @@
+<ui version="4.0" >
+ <class>OutlierRemovalDialog</class>
+ <widget class="QDialog" name="OutlierRemovalDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>331</width>
+    <height>120</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Outlier Removal</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Removed Percentage:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <widget class="QDoubleSpinBox" name="m_inputPercentage" >
+     <property name="suffix" >
+      <string> %</string>
+     </property>
+     <property name="minimum" >
+      <double>0.010000000000000</double>
+     </property>
+     <property name="maximum" >
+      <double>100.000000000000000</double>
+     </property>
+     <property name="singleStep" >
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value" >
+      <double>5.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="label_2" >
+     <property name="text" >
+      <string>Neighbors</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QSpinBox" name="m_inputNbNeighbors" >
+     <property name="minimum" >
+      <number>6</number>
+     </property>
+     <property name="maximum" >
+      <number>9999</number>
+     </property>
+     <property name="value" >
+      <number>24</number>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>OutlierRemovalDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>OutlierRemovalDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp
new file mode 100644
index 0000000..8c16027
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp
@@ -0,0 +1,509 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Polygon_2.h>
+#include <QtCore/qglobal.h>
+#include <QGLViewer/manipulatedCameraFrame.h>
+#include "opengl_tools.h"
+
+#include "Messages_interface.h"
+#include "Scene_points_with_normal_item.h"
+#include "Scene_polylines_item.h"
+
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "ui_Point_set_selection_widget.h"
+#include "Point_set_3.h"
+
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMouseEvent>
+
+#include <map>
+#include <fstream>
+
+
+// Class for visualizing selection 
+// provides mouse selection functionality
+class Q_DECL_EXPORT Scene_point_set_selection_visualizer : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+
+ private:
+  typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+  typedef K::Point_2 Point_2;
+  typedef K::Point_3 Point_3;
+  typedef CGAL::Polygon_2<K> Polygon_2;
+  
+  bool rectangle;
+  std::vector<Point_2> contour_2d;
+  Scene_polylines_item* polyline;
+  Bbox point_set_bbox;
+  CGAL::Bbox_2 domain_rectangle;
+  Polygon_2 domain_freeform;
+  
+public:
+
+  Scene_point_set_selection_visualizer(bool rectangle, const Bbox& point_set_bbox)
+    : rectangle (rectangle), point_set_bbox (point_set_bbox)
+  {
+    polyline = new Scene_polylines_item();
+    polyline->setRenderingMode (Wireframe);
+    polyline->setVisible (true);
+    polyline->polylines.push_back (Scene_polylines_item::Polyline());
+  }
+  ~Scene_point_set_selection_visualizer() {
+  }
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return poly().empty(); }
+  void compute_bbox() const {
+    _bbox = point_set_bbox;
+  }
+  Scene_point_set_selection_visualizer* clone() const {
+    return 0;
+  }
+  QString toolTip() const {
+    return tr("%1").arg(name());
+  }
+
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe);
+  }
+  
+  void draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    viewer->glLineWidth(3.f);
+    polyline->setRbgColor(0, 255, 0); 
+
+    polyline->draw_edges(viewer);
+  }
+
+  Scene_polylines_item::Polyline& poly() const
+  { return polyline->polylines.front(); }
+  
+  bool update_polyline () const
+  {
+    if (contour_2d.size() < 2 ||
+	(!(poly().empty()) && scene_point (contour_2d.back ()) == poly().back()))
+      return false;
+    
+    if (rectangle)
+      {
+	poly().clear();
+	
+	poly().push_back (scene_point (Point_2 (domain_rectangle.xmin(),
+						domain_rectangle.ymin())));
+	poly().push_back (scene_point (Point_2 (domain_rectangle.xmax(),
+						domain_rectangle.ymin())));
+	poly().push_back (scene_point (Point_2 (domain_rectangle.xmax(),
+						domain_rectangle.ymax())));
+	poly().push_back (scene_point (Point_2 (domain_rectangle.xmin(),
+						domain_rectangle.ymax())));
+	poly().push_back (scene_point (Point_2 (domain_rectangle.xmin(),
+						domain_rectangle.ymin())));
+
+      }
+    else
+      {
+	if (!(poly().empty()) && scene_point (contour_2d.back ()) == poly().back())
+	  return false;
+
+	poly().clear();
+
+	for (unsigned int i = 0; i < contour_2d.size (); ++ i)
+	  poly().push_back (scene_point (contour_2d[i]));
+      }
+    
+    return true;
+  }
+
+  Point_3 scene_point (const Point_2& p) const
+  {
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    qglviewer::Camera* camera = viewer->camera();
+    qglviewer::Vec vp (p.x(), p.y(), 0.1);
+    qglviewer::Vec vsp = camera->unprojectedCoordinatesOf (vp);
+    
+    return Point_3 (vsp.x, vsp.y, vsp.z);
+  }
+
+
+  
+  void sample_mouse_path()
+  {
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    const QPoint& p = viewer->mapFromGlobal(QCursor::pos());
+    
+    if (rectangle && contour_2d.size () == 2)
+      {
+	contour_2d[1] = Point_2 (p.x (), p.y ());
+	domain_rectangle = CGAL::bbox_2 (contour_2d.begin (), contour_2d.end ());
+      }
+    else
+      contour_2d.push_back (Point_2 (p.x (), p.y ()));
+
+    if (update_polyline ())
+      {
+	Q_EMIT itemChanged();
+      }
+  }
+
+  void apply_path()
+  {
+    update_polyline ();
+    domain_rectangle = CGAL::bbox_2 (contour_2d.begin (), contour_2d.end ());    
+    if (!rectangle)
+      domain_freeform = Polygon_2 (contour_2d.begin (), contour_2d.end ());
+  }
+
+  bool is_selected (qglviewer::Vec& p)
+  {
+    if (domain_rectangle.xmin () < p.x &&
+	p.x < domain_rectangle.xmax () &&
+	domain_rectangle.ymin () < p.y &&
+	p.y < domain_rectangle.ymax ())
+      {
+	if (rectangle)
+	  return true;
+	
+	if (domain_freeform.has_on_bounded_side (Point_2 (p.x, p.y)))
+	  return true;
+      }
+    return false;
+  }
+
+
+}; // end class Scene_point_set_selection_visualizer
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_selection_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  bool applicable(QAction*) const { 
+      return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+  void print_message(QString message) { messages->information(message); }
+  QList<QAction*> actions() const { return QList<QAction*>() << actionPointSetSelection; }
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) {
+    mw = mainWindow;
+    scene = scene_interface;
+    messages = m;
+    actionPointSetSelection = new QAction(tr("Selection"), mw);
+    connect(actionPointSetSelection, SIGNAL(triggered()), this, SLOT(selection_action()));
+
+    dock_widget = new QDockWidget("Point Set Selection", mw);
+    dock_widget->setVisible(false);
+
+    ui_widget.setupUi(dock_widget);
+    add_dock_widget(dock_widget);
+
+    connect(ui_widget.Selection_tool_combo_box, SIGNAL(currentIndexChanged(int)), 
+            this, SLOT(on_Selection_tool_combo_box_changed(int)));
+    connect(ui_widget.Selection_mode_combo_box, SIGNAL(currentIndexChanged(int)), 
+            this, SLOT(on_Selection_mode_combo_box_changed(int)));
+    connect(ui_widget.Select_all_button,  SIGNAL(clicked()), this, SLOT(on_Select_all_button_clicked()));
+    connect(ui_widget.Clear_button,  SIGNAL(clicked()), this, SLOT(on_Clear_button_clicked()));
+    connect(ui_widget.Invert_selection_button,  SIGNAL(clicked()), this, SLOT(on_Invert_selection_button_clicked()));
+    connect(ui_widget.Erase_selected_points_button,  SIGNAL(clicked()), this, SLOT(on_Erase_selected_points_button_clicked()));
+    connect(ui_widget.Create_point_set_item_button, SIGNAL(clicked()), this, SLOT(on_Create_point_set_item_button_clicked()));
+
+    rectangle = true;
+    selection_mode = 0;
+    visualizer = NULL;
+    shift_pressing = false;
+    
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    viewer->installEventFilter(this);
+    mainWindow->installEventFilter(this);
+
+
+  }
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+
+protected:
+
+  bool eventFilter(QObject *, QEvent *event) {
+    if (dock_widget->isHidden() || !(dock_widget->isActiveWindow()))
+      return false;
+    
+    Scene_points_with_normal_item* point_set_item
+      = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!point_set_item) {
+      return false; 
+    }
+    int item_id = scene->item_id (point_set_item);
+      
+    if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)  {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+      Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
+
+      shift_pressing = modifiers.testFlag(Qt::ShiftModifier);
+    }
+
+    // mouse events
+    if(shift_pressing && event->type() == QEvent::MouseButtonPress)
+      {
+	QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+	// Start selection
+	if (mouseEvent->button() == Qt::LeftButton && !visualizer)
+	  {
+	    QApplication::setOverrideCursor(Qt::CrossCursor);
+	    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+	    if (viewer->camera()->frame()->isSpinning())
+	      viewer->camera()->frame()->stopSpinning();
+	
+	    visualizer = new Scene_point_set_selection_visualizer(rectangle,
+								  point_set_item->bbox());
+	    visualizer->setName(tr("Point set selection visualizer"));
+	    visualizer->setRenderingMode (Wireframe);
+	    visualizer->setVisible (true);
+
+	    // Hack to prevent camera for "jumping" when creating new item
+	    scene->addItem(visualizer);
+	
+	    scene->setSelectedItem(item_id);
+	    visualizer->sample_mouse_path();
+	    return true;
+	  }
+	// Cancel selection
+	else if (mouseEvent->button() == Qt::RightButton && visualizer)
+	  {
+
+	    scene->erase( scene->item_id(visualizer) );
+	    scene->setSelectedItem(item_id);
+	    visualizer = NULL;
+	    QApplication::restoreOverrideCursor();
+	    return true;
+	  }
+
+      }
+    // End selection
+    else if (event->type() == QEvent::MouseButtonRelease && visualizer)
+      {
+	visualizer->apply_path();
+	select_points();
+	scene->erase( scene->item_id(visualizer) );
+	scene->setSelectedItem(item_id);
+	visualizer = NULL;
+	QApplication::restoreOverrideCursor();
+	return true;
+      }
+    // Update selection
+    else if (event->type() == QEvent::MouseMove && visualizer)
+      {
+	visualizer->sample_mouse_path();
+	return true;
+      }
+
+    return false;
+  }
+
+  void select_points()
+  {
+    Scene_points_with_normal_item* point_set_item = get_selected_item<Scene_points_with_normal_item>();
+    if(!point_set_item)
+      {
+	print_message("Error: no point set selected!");
+	return; 
+      }
+
+    if (selection_mode == 0) // New selection
+      point_set_item->point_set()->unselect_all();
+    
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    qglviewer::Camera* camera = viewer->camera();
+
+    std::vector<UI_point_3<Kernel> > unselected, selected;
+    
+    for(Point_set::iterator it = point_set_item->point_set()->begin ();
+	it != point_set_item->point_set()->end(); ++ it)
+      {
+	bool already_selected = point_set_item->point_set()->is_selected (it);
+	    
+	qglviewer::Vec vp (it->x (), it->y (), it->z ());
+	qglviewer::Vec vsp = camera->projectedCoordinatesOf (vp);
+	    
+	bool now_selected = visualizer->is_selected (vsp);
+
+	// NEW INTERSECTION
+	if (selection_mode == 0)
+	  {
+	    if (now_selected)
+	      selected.push_back (*it);
+	    else
+	      unselected.push_back (*it);
+	  }
+	// UNION
+	else if (selection_mode == 1)
+	  {
+	    if (already_selected || now_selected)
+	      selected.push_back (*it);
+	    else
+	      unselected.push_back (*it);
+	  }
+	// INTERSECTION
+	//  * Unselect point if it was selected and is not anymore
+	else if (selection_mode == 2)
+	  {
+	    if (already_selected && now_selected)
+	      selected.push_back (*it);
+	    else
+	      unselected.push_back (*it);
+	  }
+	// DIFFERENCE
+	//  * Unselect point if it was selected and is now selected
+	else if (selection_mode == 3)
+	  {
+	    if (already_selected && !now_selected)
+	      selected.push_back (*it);
+	    else
+	      unselected.push_back (*it);
+	  }
+
+      }
+
+    point_set_item->point_set()->clear();
+    
+    std::copy (unselected.begin (), unselected.end (),
+	       std::back_inserter (*(point_set_item->point_set())));
+    std::size_t size = unselected.size();
+
+    if (selected.empty ())
+      {
+	point_set_item->point_set()->unselect_all();
+      }
+    else
+      {
+	std::copy (selected.begin (), selected.end (),
+		   std::back_inserter (*(point_set_item->point_set())));
+	point_set_item->point_set()->set_first_selected
+	  (point_set_item->point_set()->begin() + size);
+      } 
+    point_set_item->invalidateOpenGLBuffers();
+  }
+
+  
+
+
+public Q_SLOTS:
+  void selection_action() { 
+    dock_widget->show();
+    dock_widget->raise();
+  }
+  
+  // Select all
+  void on_Select_all_button_clicked() {
+    Scene_points_with_normal_item* point_set_item = get_selected_item<Scene_points_with_normal_item>();
+    if(!point_set_item)
+      {
+	print_message("Error: no point set selected!");
+	return; 
+      }
+
+    point_set_item->selectAll();
+  }
+  
+  // Clear selection
+  void on_Clear_button_clicked() {
+    Scene_points_with_normal_item* point_set_item
+      = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!point_set_item) {
+      print_message("Error: no point set selected!");
+      return; 
+    }
+
+    point_set_item->resetSelection();
+  }
+
+  void on_Erase_selected_points_button_clicked() {
+    Scene_points_with_normal_item* point_set_item
+      = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!point_set_item) {
+      print_message("Error: no point set selected!");
+      return; 
+    }
+
+    point_set_item->deleteSelection();
+  }
+
+  void on_Invert_selection_button_clicked() {
+    Scene_points_with_normal_item* point_set_item
+      = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!point_set_item) {
+      print_message("Error: no point set selected!");
+      return; 
+    }
+
+    point_set_item->invertSelection();
+  }
+
+  void on_Create_point_set_item_button_clicked() {
+    Scene_points_with_normal_item* point_set_item
+      = qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if(!point_set_item) {
+      print_message("Error: no point set selected!");
+      return; 
+    }
+    if(point_set_item->isSelectionEmpty ()) {
+      print_message("Error: there is no selected point in point set item!");
+      return;
+    }
+    
+    Scene_points_with_normal_item* new_item = new Scene_points_with_normal_item();
+    new_item->setName(QString("%1 (selected points)").arg(point_set_item->name()));
+    new_item->set_has_normals (point_set_item->has_normals());
+    new_item->setColor(point_set_item->color());
+    new_item->setRenderingMode(point_set_item->renderingMode());
+    new_item->setVisible(point_set_item->visible());
+
+    typedef Point_set_3<Kernel> Point_set;
+    for(Point_set::iterator it = point_set_item->point_set()->begin ();
+	it != point_set_item->point_set()->end(); ++ it) {
+      if (point_set_item->point_set()->is_selected (it))
+	new_item->point_set()->push_back(*it);
+    }
+    new_item->resetSelection();
+    new_item->invalidateOpenGLBuffers();
+
+    scene->addItem(new_item);
+ }
+
+  void on_Selection_tool_combo_box_changed (int index)
+  {
+    rectangle = (index == 0);
+  }
+
+  void on_Selection_mode_combo_box_changed (int index)
+  {
+    selection_mode = index;
+  }
+
+
+private:
+  Messages_interface* messages;
+  QAction* actionPointSetSelection;
+
+  QDockWidget* dock_widget;
+  Ui::PointSetSelection ui_widget;
+  bool rectangle;
+  int selection_mode;
+  Scene_point_set_selection_visualizer* visualizer;
+  bool shift_pressing;
+
+}; // end Polyhedron_demo_point_set_selection_plugin
+
+//Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_selection_plugin, Polyhedron_demo_point_set_selection_plugin)
+
+#include "Point_set_selection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui
new file mode 100644
index 0000000..6bb3e97
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PointSetSelection</class>
+ <widget class="QDockWidget" name="PointSetSelection">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>369</width>
+    <height>239</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Point Set Selection</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout_5">
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <widget class="QLabel" name="label_2">
+          <property name="text">
+           <string>Selection &Tool:</string>
+          </property>
+          <property name="buddy">
+           <cstring>Selection_tool_combo_box</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QComboBox" name="Selection_tool_combo_box">
+          <item>
+           <property name="text">
+            <string>Rectangle</string>
+           </property>
+          </item>
+          <item>
+           <property name="text">
+            <string>Free Form</string>
+           </property>
+          </item>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_14" stretch="0,0">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="sizeConstraint">
+       <enum>QLayout::SetDefaultConstraint</enum>
+      </property>
+      <item>
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Selection &Mode:</string>
+        </property>
+        <property name="buddy">
+         <cstring>Selection_mode_combo_box</cstring>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QComboBox" name="Selection_mode_combo_box">
+        <item>
+         <property name="text">
+          <string>New Selection</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Union</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Intersection</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Difference</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QPushButton" name="Select_all_button">
+        <property name="text">
+         <string>Select &All</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Clear_button">
+        <property name="text">
+         <string>&Clear</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Invert_selection_button">
+      <property name="text">
+       <string>&Invert Selection</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Erase_selected_points_button">
+      <property name="text">
+       <string>&Erase Selected Points</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="Create_point_set_item_button">
+      <property name="text">
+       <string>Create Point Set Item from Selected Points</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp
new file mode 100644
index 0000000..7fd7479
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp
@@ -0,0 +1,307 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include "Scene_polygon_soup_item.h"
+#include "Scene_polyhedron_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/Random.h>
+
+#include <CGAL/Shape_detection_3.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+#include <CGAL/Alpha_shape_2.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QMessageBox>
+
+#include <boost/foreach.hpp>
+
+#include "ui_Point_set_shape_detection_plugin.h"
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
+typedef Epic_kernel::Point_3 Point;
+//typedef CGAL::Point_with_normal_3<Epic_kernel> Point_with_normal;
+//typedef std::vector<Point_with_normal> Point_list;
+//typedef CGAL::Identity_property_map<Point_with_normal> PointPMap;
+//typedef CGAL::Normal_of_point_with_normal_pmap<Epic_kernel> NormalPMap;
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_shape_detection_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+    QAction* actionDetect;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionDetect = new QAction(tr("Point Set Shape Detection"), mainWindow);
+    actionDetect->setObjectName("actionDetect");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    Scene_points_with_normal_item* item =
+      qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+    if (item && item->has_normals())
+      return true;
+    return false;
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionDetect;
+  }
+
+  public Q_SLOTS:
+    void on_actionDetect_triggered();
+
+private:
+
+  typedef Kernel::Plane_3 Plane_3;
+  
+  void build_alpha_shape (Point_set& points, const Plane_3& plane,
+                          Scene_polyhedron_item* item, double epsilon);
+
+}; // end Polyhedron_demo_point_set_shape_detection_plugin
+
+class Point_set_demo_point_set_shape_detection_dialog : public QDialog, private Ui::PointSetShapeDetectionDialog
+{
+  Q_OBJECT
+public:
+  Point_set_demo_point_set_shape_detection_dialog(QWidget * /*parent*/ = 0)
+  {
+    setupUi(this);
+  }
+
+  //QString shapeDetectionMethod() const { return m_shapeDetectionMethod->currentText(); }
+  double cluster_epsilon() const { return m_cluster_epsilon_field->value(); }
+  double epsilon() const { return m_epsilon_field->value(); }
+  unsigned int min_points() const { return m_min_pts_field->value(); }
+  double normal_tolerance() const { return m_normal_tolerance_field->value(); }
+  double search_probability() const { return m_probability_field->value(); }
+  double gridCellSize() const { return 1.0; }
+  bool detect_plane() const { return planeCB->isChecked(); } 
+  bool detect_sphere() const { return sphereCB->isChecked(); } 
+  bool detect_cylinder() const { return cylinderCB->isChecked(); } 
+  bool detect_torus() const { return torusCB->isChecked(); } 
+  bool detect_cone() const { return coneCB->isChecked(); }
+  bool generate_alpha() const { return m_generate_alpha->isChecked(); }
+  bool generate_subset() const { return !(m_do_not_generate_subset->isChecked()); }
+};
+
+void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetect_triggered() {
+  CGAL::Random rand(time(0));
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  Scene_points_with_normal_item::Bbox bb = item->bbox();
+ 
+  double diam = bb.diagonal_length();
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+
+    if(points == NULL)
+      return;
+
+    //Epic_kernel::FT diag = sqrt(((points->bounding_box().max)() - (points->bounding_box().min)()).squared_length());
+
+    // Gets options
+    Point_set_demo_point_set_shape_detection_dialog dialog;
+    if(!dialog.exec())
+      return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    typedef CGAL::Identity_property_map<Point_set::Point_with_normal> PointPMap;
+    typedef CGAL::Normal_of_point_with_normal_pmap<Point_set::Geom_traits> NormalPMap;
+
+    typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits<Epic_kernel, Point_set, PointPMap, NormalPMap> Traits;
+    typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits> Shape_detection;
+
+    Shape_detection shape_detection;
+    shape_detection.set_input(*points);
+
+    // Shapes to be searched for are registered by using the template Shape_factory
+    if(dialog.detect_plane()){
+        shape_detection.add_shape_factory<CGAL::Shape_detection_3::Plane<Traits> >();
+      }
+    if(dialog.detect_cylinder()){
+      shape_detection.add_shape_factory<CGAL::Shape_detection_3::Cylinder<Traits> >();
+    }
+    if(dialog.detect_torus()){
+       shape_detection.add_shape_factory< CGAL::Shape_detection_3::Torus<Traits> >();
+    }
+    if(dialog.detect_cone()){
+      shape_detection.add_shape_factory< CGAL::Shape_detection_3::Cone<Traits> >();
+    }
+    if(dialog.detect_sphere()){
+      shape_detection.add_shape_factory< CGAL::Shape_detection_3::Sphere<Traits> >();
+    }
+
+    // Parameterization of the shape detection using the Parameters structure.
+    Shape_detection::Parameters op;
+    op.probability = dialog.search_probability();       // probability to miss the largest primitive on each iteration.
+    op.min_points = dialog.min_points();          // Only extract shapes with a minimum number of points.
+    op.epsilon = dialog.epsilon();          // maximum euclidean distance between point and shape.
+    op.cluster_epsilon = dialog.cluster_epsilon();    // maximum euclidean distance between points to be clustered.
+    op.normal_threshold = dialog.normal_tolerance();   // normal_threshold < dot(surface_normal, point_normal); maximum normal deviation.
+
+    // The actual shape detection.
+    shape_detection.detect(op);
+
+    std::cout << shape_detection.shapes().size() << " shapes found" << std::endl;
+    //print_message(QString("%1 shapes found.").arg(shape_detection.number_of_shapes()));
+    int index = 0;
+    BOOST_FOREACH(boost::shared_ptr<Shape_detection::Shape> shape, shape_detection.shapes())
+    {
+      CGAL::Shape_detection_3::Cylinder<Traits> *cyl;
+      cyl = dynamic_cast<CGAL::Shape_detection_3::Cylinder<Traits> *>(shape.get());
+      if (cyl != NULL){
+        if(cyl->radius() > diam){
+          continue;
+        }
+      }
+        
+      Scene_points_with_normal_item *point_item = new Scene_points_with_normal_item;
+      BOOST_FOREACH(std::size_t i, shape->indices_of_assigned_points())
+        point_item->point_set()->push_back((*points)[i]);
+      
+      unsigned char r, g, b;
+      r = static_cast<unsigned char>(64 + rand.get_int(0, 192));
+      g = static_cast<unsigned char>(64 + rand.get_int(0, 192));
+      b = static_cast<unsigned char>(64 + rand.get_int(0, 192));
+      point_item->setRbgColor(r, g, b);
+
+      // Providing a useful name consisting of the order of detection, name of type and number of inliers
+      std::stringstream ss;
+      if (dynamic_cast<CGAL::Shape_detection_3::Cylinder<Traits> *>(shape.get())){
+        CGAL::Shape_detection_3::Cylinder<Traits> * cyl 
+          = dynamic_cast<CGAL::Shape_detection_3::Cylinder<Traits> *>(shape.get());
+        ss << item->name().toStdString() << "_cylinder_" << cyl->radius() << "_";
+      }
+      else if (dynamic_cast<CGAL::Shape_detection_3::Plane<Traits> *>(shape.get()))
+        {
+          ss << item->name().toStdString() << "_plane_";
+
+          if (dialog.generate_alpha ())
+            {
+              // If plane, build alpha shape
+              Scene_polyhedron_item* poly_item = new Scene_polyhedron_item;
+
+              Plane_3 plane = (Plane_3)(*(dynamic_cast<CGAL::Shape_detection_3::Plane<Traits>*>(shape.get ())));
+              build_alpha_shape (*(point_item->point_set()), plane,
+                                 poly_item, dialog.cluster_epsilon());
+          
+              poly_item->setRbgColor(r-32, g-32, b-32);
+              poly_item->setName(QString("%1%2_alpha_shape").arg(QString::fromStdString(ss.str()))
+                                 .arg (QString::number (shape->indices_of_assigned_points().size())));
+              poly_item->setRenderingMode (Flat);
+              scene->addItem(poly_item);
+            }
+        }
+      else if (dynamic_cast<CGAL::Shape_detection_3::Cone<Traits> *>(shape.get()))
+        ss << item->name().toStdString() << "_cone_";
+      else if (dynamic_cast<CGAL::Shape_detection_3::Torus<Traits> *>(shape.get()))
+        ss << item->name().toStdString() << "_torus_";
+      else if (dynamic_cast<CGAL::Shape_detection_3::Sphere<Traits> *>(shape.get()))
+        ss << item->name().toStdString() << "_sphere_";
+
+
+      ss << shape->indices_of_assigned_points().size();
+
+      //names[i] = ss.str(		
+      point_item->setName(QString::fromStdString(ss.str()));
+      point_item->set_has_normals(true);
+      point_item->setRenderingMode(item->renderingMode());
+      if (dialog.generate_subset())
+        scene->addItem(point_item);
+      else
+        delete point_item;
+
+      ++index;
+    }
+
+    // Updates scene
+    scene->itemChanged(index);
+
+    QApplication::restoreOverrideCursor();
+
+    //     Warn user, maybe choice of parameters is unsuitable
+    //         if (nb_points_to_remove > 0)
+    //         {
+    //           QMessageBox::information(NULL,
+    //                                    tr("Points selected for removal"),
+    //                                    tr("%1 point(s) are selected for removal.\nYou may delete or reset the selection using the item context menu.")
+    //                                    .arg(nb_points_to_remove));
+    //         }
+    item->setVisible(false);
+  }
+}
+
+void Polyhedron_demo_point_set_shape_detection_plugin::build_alpha_shape
+(Point_set& points, const Plane_3& plane, Scene_polyhedron_item* item, double epsilon)
+{
+  typedef Kernel::Point_2  Point_2;
+  typedef CGAL::Alpha_shape_vertex_base_2<Kernel> Vb;
+  typedef CGAL::Alpha_shape_face_base_2<Kernel>  Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
+  typedef CGAL::Delaunay_triangulation_2<Kernel,Tds> Triangulation_2;
+  typedef CGAL::Alpha_shape_2<Triangulation_2>  Alpha_shape_2;
+
+
+  std::vector<Point_2> projections;
+  projections.reserve (points.size ());
+
+  for (std::size_t i = 0; i < points.size (); ++ i)
+    projections.push_back (plane.to_2d (points[i]));
+
+  Alpha_shape_2 ashape (projections.begin (), projections.end (), epsilon);
+  
+  std::map<Alpha_shape_2::Vertex_handle, std::size_t> map_v2i;
+
+  Scene_polygon_soup_item *soup_item = new Scene_polygon_soup_item;
+  
+  soup_item->init_polygon_soup(points.size(), ashape.number_of_faces ());
+  std::size_t current_index = 0;
+
+  for (Alpha_shape_2::Finite_faces_iterator it = ashape.finite_faces_begin ();
+       it != ashape.finite_faces_end (); ++ it)
+    {
+      if (ashape.classify (it) != Alpha_shape_2::INTERIOR)
+        continue;
+
+      for (int i = 0; i < 3; ++ i)
+        {
+          if (map_v2i.find (it->vertex (i)) == map_v2i.end ())
+            {
+              map_v2i.insert (std::make_pair (it->vertex (i), current_index ++));
+              Point p = plane.to_3d (it->vertex (i)->point ());
+              soup_item->new_vertex (p.x (), p.y (), p.z ());
+            }
+        }
+      soup_item->new_triangle (map_v2i[it->vertex (0)],
+                               map_v2i[it->vertex (1)],
+                               map_v2i[it->vertex (2)]);
+    }
+
+  soup_item->orient();
+  soup_item->exportAsPolyhedron (item->polyhedron());
+  
+  delete soup_item;
+}
+
+
+#include <QtPlugin>
+
+#include "Point_set_shape_detection_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui
new file mode 100644
index 0000000..6b3c146
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PointSetShapeDetectionDialog</class>
+ <widget class="QDialog" name="PointSetShapeDetectionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>444</width>
+    <height>269</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Shape Detection</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_6">
+     <item>
+      <widget class="QCheckBox" name="planeCB">
+       <property name="text">
+        <string>Plane</string>
+       </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="cylinderCB">
+       <property name="text">
+        <string>Cylinder</string>
+       </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="torusCB">
+       <property name="text">
+        <string>Torus</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="coneCB">
+       <property name="text">
+        <string>Cone</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="sphereCB">
+       <property name="text">
+        <string>Sphere</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>Epsilon:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_epsilon_field">
+       <property name="toolTip">
+        <string>Fitting tolerance in Euclidean distance</string>
+       </property>
+       <property name="decimals">
+        <number>3</number>
+       </property>
+       <property name="maximum">
+        <double>1.000000000000000</double>
+       </property>
+       <property name="singleStep">
+        <double>0.001000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.002000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Normal Tolerance:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_normal_tolerance_field">
+       <property name="toolTip">
+        <string>Normal angle deviation tolerance as cosine of the angle</string>
+       </property>
+       <property name="singleStep">
+        <double>0.001000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.900000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_3">
+     <item>
+      <widget class="QLabel" name="label_3">
+       <property name="text">
+        <string>Minimum Numbr of Points:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QSpinBox" name="m_min_pts_field">
+       <property name="toolTip">
+        <string>Smallest allowed size for a primitive</string>
+       </property>
+       <property name="maximum">
+        <number>10000</number>
+       </property>
+       <property name="singleStep">
+        <number>50</number>
+       </property>
+       <property name="value">
+        <number>100</number>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_4">
+     <item>
+      <widget class="QLabel" name="label_4">
+       <property name="text">
+        <string>Connectivity Epsilon:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_cluster_epsilon_field">
+       <property name="toolTip">
+        <string>Maximum world distance between points on a shape to be considered as connected</string>
+       </property>
+       <property name="decimals">
+        <number>2</number>
+       </property>
+       <property name="maximum">
+        <double>1.000000000000000</double>
+       </property>
+       <property name="singleStep">
+        <double>0.010000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.020000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_5">
+     <item>
+      <widget class="QLabel" name="label_5">
+       <property name="text">
+        <string>Search Rigorosity (Probability):</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDoubleSpinBox" name="m_probability_field">
+       <property name="toolTip">
+        <string>Probability to overlook the largest primitive in one extraction iteration</string>
+       </property>
+       <property name="maximum">
+        <double>1.000000000000000</double>
+       </property>
+       <property name="singleStep">
+        <double>0.010000000000000</double>
+       </property>
+       <property name="value">
+        <double>0.050000000000000</double>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="m_generate_alpha">
+     <property name="text">
+      <string>Generate Alpha Shapes for Planes</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="m_do_not_generate_subset">
+     <property name="text">
+      <string>Do Not Generate Point Subsets</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PointSetShapeDetectionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PointSetShapeDetectionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp
new file mode 100644
index 0000000..24e5700
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp
@@ -0,0 +1,201 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/grid_simplify_point_set.h>
+#include <CGAL/random_simplify_point_set.h>
+#include <CGAL/hierarchy_simplify_point_set.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QMessageBox>
+
+#include "ui_Point_set_simplification_plugin.h"
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_simplification_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  QAction* actionSimplify;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionSimplify = new QAction(tr("Point Set Simplification Selection"), mainWindow);
+    actionSimplify->setObjectName("actionSimplify");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionSimplify;
+  }
+
+public Q_SLOTS:
+  void on_actionSimplify_triggered();
+
+
+}; // end Polyhedron_demo_point_set_simplification_plugin
+
+class Point_set_demo_point_set_simplification_dialog : public QDialog, private Ui::PointSetSimplificationDialog
+{
+  Q_OBJECT
+  public:
+    Point_set_demo_point_set_simplification_dialog(QWidget * /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+  unsigned int simplificationMethod() const
+  {
+    if (Random->isChecked())
+      return 0;
+    else if (Grid->isChecked())
+      return 1;
+    else
+      return 2;
+  }
+  double randomSimplificationPercentage() const { return m_randomSimplificationPercentage->value(); }
+  double gridCellSize() const { return m_gridCellSize->value(); }
+  unsigned int maximumClusterSize() const { return m_maximumClusterSize->value(); }
+  double maximumSurfaceVariation() const { return m_maximumSurfaceVariation->value(); }
+
+public Q_SLOTS:
+  
+  void on_Random_toggled (bool toggled)
+  {
+    m_randomSimplificationPercentage->setEnabled (toggled);
+    m_gridCellSize->setEnabled (!toggled);
+    m_maximumClusterSize->setEnabled (!toggled);
+    m_maximumSurfaceVariation->setEnabled (!toggled);
+  }
+  void on_Grid_toggled (bool toggled)
+  {
+    m_randomSimplificationPercentage->setEnabled (!toggled);
+    m_gridCellSize->setEnabled (toggled);
+    m_maximumClusterSize->setEnabled (!toggled);
+    m_maximumSurfaceVariation->setEnabled (!toggled);
+  }
+  void on_Hierarchy_toggled (bool toggled)
+  {
+    m_randomSimplificationPercentage->setEnabled (!toggled);
+    m_gridCellSize->setEnabled (!toggled);
+    m_maximumClusterSize->setEnabled (toggled);
+    m_maximumSurfaceVariation->setEnabled (toggled);
+  }
+
+};
+
+void Polyhedron_demo_point_set_simplification_plugin::on_actionSimplify_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Point_set_demo_point_set_simplification_dialog dialog;
+    if(!dialog.exec())
+      return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::Timer task_timer; task_timer.start();
+
+    // First point to delete
+    Point_set::iterator first_point_to_remove = points->end();
+
+    unsigned int method = dialog.simplificationMethod ();
+    if (method == 0)
+    {
+      std::cerr << "Point set random simplification (" << dialog.randomSimplificationPercentage() <<"%)...\n";
+
+      // Computes points to remove by random simplification
+      first_point_to_remove =
+        CGAL::random_simplify_point_set(points->begin(), points->end(),
+                                        dialog.randomSimplificationPercentage());
+    }
+    else if (method == 1)
+    {
+      std::cerr << "Point set grid simplification (cell size = " << dialog.gridCellSize() <<" * average spacing)...\n";
+
+      // Computes average spacing
+      double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                                      points->begin(), points->end(),
+                                      6 /* knn = 1 ring */);
+
+      // Computes points to remove by Grid Clustering
+      first_point_to_remove =
+        CGAL::grid_simplify_point_set(points->begin(), points->end(),
+                                      dialog.gridCellSize()*average_spacing);
+    }
+    else
+    {
+      std::cerr << "Point set hierarchy simplification (cluster size = " << dialog.maximumClusterSize()
+		<< ", maximum variation = " << dialog.maximumSurfaceVariation() << ")...\n";
+
+      // Computes points to remove by Grid Clustering
+      first_point_to_remove =
+        CGAL::hierarchy_simplify_point_set(points->begin(), points->end(),
+					   dialog.maximumClusterSize(),
+					   dialog.maximumSurfaceVariation());
+    }
+
+    std::size_t nb_points_to_remove = std::distance(first_point_to_remove, points->end());
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << "Simplification: " << nb_points_to_remove << " point(s) are selected for removal ("
+                                    << task_timer.time() << " seconds, "
+                                    << (memory>>20) << " Mb allocated)"
+                                    << std::endl;
+
+    // Selects points to delete
+    points->set_first_selected(first_point_to_remove);
+
+    // Updates scene
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(index);
+
+    QApplication::restoreOverrideCursor();
+
+    // Warns user
+    if (nb_points_to_remove > 0)
+    {
+      QMessageBox::information(NULL,
+                               tr("Points selected for removal"),
+                               tr("%1 point(s) are selected for removal.\nYou may delete or reset the selection using the item context menu.")
+                               .arg(nb_points_to_remove));
+    }
+  }
+}
+
+#include "Point_set_simplification_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui
new file mode 100644
index 0000000..a75294b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PointSetSimplificationDialog</class>
+ <widget class="QDialog" name="PointSetSimplificationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>450</width>
+    <height>251</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Simplification</string>
+  </property>
+  <layout class="QGridLayout">
+   <item row="7" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Maximum Cluster Size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="9" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QRadioButton" name="Random">
+     <property name="text">
+      <string>Random</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QRadioButton" name="Grid">
+     <property name="text">
+      <string>Grid</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QDoubleSpinBox" name="m_randomSimplificationPercentage">
+     <property name="suffix">
+      <string> %</string>
+     </property>
+     <property name="decimals">
+      <number>2</number>
+     </property>
+     <property name="minimum">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>100.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value">
+      <double>50.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0">
+    <widget class="QRadioButton" name="Hierarchy">
+     <property name="text">
+      <string>Hierarchy</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1">
+    <widget class="QDoubleSpinBox" name="m_gridCellSize">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="suffix">
+      <string> * average spacing</string>
+     </property>
+     <property name="decimals">
+      <number>2</number>
+     </property>
+     <property name="minimum">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>10.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value">
+      <double>1.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Points to Remove Randomly</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>Grid Cell Size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="1">
+    <widget class="QSpinBox" name="m_maximumClusterSize">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>2147483647</number>
+     </property>
+     <property name="value">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="0">
+    <widget class="QLabel" name="label_5">
+     <property name="text">
+      <string>Maximum Surface Variation</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="1">
+    <widget class="QDoubleSpinBox" name="m_maximumSurfaceVariation">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="suffix">
+      <string/>
+     </property>
+     <property name="decimals">
+      <number>5</number>
+     </property>
+     <property name="minimum">
+      <double>0.000010000000000</double>
+     </property>
+     <property name="maximum">
+      <double>0.333330000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.012340000000000</double>
+     </property>
+     <property name="value">
+      <double>0.333330000000000</double>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PointSetSimplificationDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PointSetSimplificationDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp
new file mode 100644
index 0000000..04aeec7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp
@@ -0,0 +1,97 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QInputDialog>
+
+#include <CGAL/jet_smooth_point_set.h>
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_smoothing_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  QAction* actionJetSmoothing;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionJetSmoothing = new QAction(tr("Point Set Jet Smoothing"), mainWindow);
+    actionJetSmoothing->setObjectName("actionJetSmoothing");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionJetSmoothing;
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionJetSmoothing_triggered();
+
+}; // end Polyhedron_demo_point_set_smoothing_plugin
+
+void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    Point_set* points = item->point_set();
+    if(!points) return;
+
+    // Gets options
+    bool ok;
+
+    const unsigned int nb_neighbors =
+      QInputDialog::getInt((QWidget*)mw,
+                           tr("Jet Smoothing"), // dialog title
+                           tr("Number of neighbors:"), // field label
+                           24, // default value = fast
+                           6, // min
+                           1000, // max
+                           1, // step
+                           &ok);
+    if(!ok) return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::jet_smooth_point_set<Concurrency_tag>(points->begin(), points->end(), nb_neighbors);
+
+    points->invalidate_bounds();
+
+    // calling jet_smooth_point_set breaks the normals
+    item->set_has_normals(false);
+
+    // update scene
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(index);
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Point_set_smoothing_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp
new file mode 100644
index 0000000..5f452e3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp
@@ -0,0 +1,146 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/edge_aware_upsample_point_set.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QMessageBox>
+
+#include "ui_Point_set_upsampling_plugin.h"
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+ 
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_upsampling_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  
+  QAction* actionEdgeAwareUpsampling;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionEdgeAwareUpsampling = new QAction(tr("Point Set Edge Aware Upsampling"), mainWindow);
+    actionEdgeAwareUpsampling->setObjectName("actionEdgeAwareUpsampling");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionEdgeAwareUpsampling;
+  }
+
+public Q_SLOTS:
+  void on_actionEdgeAwareUpsampling_triggered();
+
+}; // end Polyhedron_demo_point_set_upsampling_plugin
+
+class Point_set_demo_point_set_upsampling_dialog : public QDialog, private Ui::PointSetUpsamplingDialog
+{
+  
+  Q_OBJECT
+public:
+  Point_set_demo_point_set_upsampling_dialog(QWidget * /*parent*/ = 0)
+  {
+    setupUi(this);
+  }
+
+  unsigned int sharpness_angle () const { return m_sharpnessAngle->value(); }
+  double edge_sensitivity() const { return m_edgeSensitivity->value(); }
+  double neighborhood_radius () const { return m_neighborhoodRadius->value(); }
+  double output_size () const { return m_outputSize->value(); }
+
+};
+
+void Polyhedron_demo_point_set_upsampling_plugin::on_actionEdgeAwareUpsampling_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+    {
+      if (!(item->has_normals ()))
+	{
+	  std::cerr << "Error: upsampling algorithm requires point set with normals." << std::endl;
+	  return;
+	}
+      
+      // Gets point set
+      Point_set* points = item->point_set();
+      if(points == NULL)
+        return;
+
+      // Gets options
+      Point_set_demo_point_set_upsampling_dialog dialog;
+      if(!dialog.exec())
+	return;
+
+      unsigned int output_size = static_cast<unsigned int>(dialog.output_size ()
+							   * points->size ());
+      std::cerr << "Edge aware upsampling (sharpness angle = "
+		<< dialog.sharpness_angle () << ", edge sensitivity = "
+		<< dialog.edge_sensitivity () << ", neighborhood radius = "
+		<< dialog.neighborhood_radius () << " * average spacing, output size = "
+		<< output_size << "...\n";
+
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      CGAL::Timer task_timer; task_timer.start();
+
+      // Computes average spacing
+      double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                                      points->begin(), points->end(),
+                                      6 /* knn = 1 ring */);
+
+      std::vector<std::pair<Point_set::Point, Point_set::Vector> > new_points;
+      CGAL::edge_aware_upsample_point_set<Concurrency_tag>(points->begin(), 
+					  points->end(), 
+					  std::back_inserter(new_points),
+					  CGAL::make_identity_property_map(Point_set::value_type()),
+					  CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+					  dialog.sharpness_angle(), 
+					  dialog.edge_sensitivity(),
+					  dialog.neighborhood_radius() * average_spacing,
+					  output_size);
+
+      for (unsigned int i = 0; i < new_points.size (); ++ i)
+	points->push_back (Point_set::Point_with_normal (new_points[i].first,
+							 new_points[i].second));
+      
+      std::size_t memory = CGAL::Memory_sizer().virtual_size();
+      std::cerr << task_timer.time() << " seconds, "
+		<< (memory>>20) << " Mb allocated)"
+		<< std::endl;
+
+      // Updates scene
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(index);
+
+      QApplication::restoreOverrideCursor();
+
+    }
+}
+
+#include "Point_set_upsampling_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui
new file mode 100644
index 0000000..564b6e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PointSetUpsamplingDialog</class>
+ <widget class="QDialog" name="PointSetUpsamplingDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>443</width>
+    <height>175</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Edge Aware Upsampling</string>
+  </property>
+  <layout class="QGridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Sharpness Angle</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Neighborhood Radius</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="label_5">
+     <property name="text">
+      <string>Edge Sensitivity</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Output Size</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QDoubleSpinBox" name="m_edgeSensitivity">
+     <property name="maximum">
+      <double>1.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.010000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="1">
+    <widget class="QDoubleSpinBox" name="m_outputSize">
+     <property name="prefix">
+      <string/>
+     </property>
+     <property name="suffix">
+      <string> * input size</string>
+     </property>
+     <property name="minimum">
+      <double>1.000000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>1000.000000000000000</double>
+     </property>
+     <property name="value">
+      <double>4.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QSpinBox" name="m_sharpnessAngle">
+     <property name="suffix">
+      <string>°</string>
+     </property>
+     <property name="maximum">
+      <number>90</number>
+     </property>
+     <property name="value">
+      <number>25</number>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QDoubleSpinBox" name="m_neighborhoodRadius">
+     <property name="suffix">
+      <string> * average spacing</string>
+     </property>
+     <property name="decimals">
+      <number>2</number>
+     </property>
+     <property name="minimum">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>10.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value">
+      <double>3.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PointSetUpsamplingDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PointSetUpsamplingDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp
new file mode 100644
index 0000000..17ff3f3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp
@@ -0,0 +1,128 @@
+#include "config.h"
+#include "Scene_points_with_normal_item.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/wlop_simplify_and_regularize_point_set.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QApplication>
+#include <QtPlugin>
+#include <QMessageBox>
+
+#include "ui_Point_set_wlop_plugin.h"
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+using namespace CGAL::Three;
+class Polyhedron_demo_point_set_wlop_plugin :
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+  
+  QAction* actionSimplifyAndRegularize;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    actionSimplifyAndRegularize = new QAction(tr("Point Set WLOP Simplification and Regularization Selection"), mainWindow);
+    actionSimplifyAndRegularize->setObjectName("actionSimplifyAndRegularize");
+
+    Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionSimplifyAndRegularize;
+  }
+
+public Q_SLOTS:
+  void on_actionSimplifyAndRegularize_triggered();
+
+}; // end Polyhedron_demo_point_set_wlop_plugin
+
+class Point_set_demo_point_set_wlop_simplification_and_regularization_dialog : public QDialog, private Ui::WLOPRegularizationAndSimplificationDialog
+{
+  Q_OBJECT
+  public:
+    Point_set_demo_point_set_wlop_simplification_and_regularization_dialog(QWidget * /*parent*/ = 0)
+    {
+      setupUi(this);
+    }
+
+    double retainedPercentage() const { return m_retainedPercentage->value(); }
+    double neighborhoodRadius() const { return m_neighborhoodRadius->value(); }
+};
+
+void Polyhedron_demo_point_set_wlop_plugin::on_actionSimplifyAndRegularize_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(item)
+  {
+    // Gets point set
+    Point_set* points = item->point_set();
+    if(points == NULL)
+        return;
+
+    // Gets options
+    Point_set_demo_point_set_wlop_simplification_and_regularization_dialog dialog;
+    if(!dialog.exec())
+      return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    CGAL::Timer task_timer; task_timer.start();
+
+    std::cerr << "Point cloud simplification and regularization by WLOP ("
+	      << dialog.retainedPercentage () << "% retained points, neighborhood radius = "
+	      << dialog.neighborhoodRadius() <<" * average spacing)...\n";
+
+    // Computes average spacing
+    double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(points->begin(), points->end(),
+							   6 /* knn = 1 ring */);
+
+    Scene_points_with_normal_item* new_item
+      = new Scene_points_with_normal_item();
+    new_item->setName (tr("%1 (WLOP processed)").arg(item->name()));
+    new_item->setVisible(true);
+    scene->addItem(new_item);
+      
+    CGAL::wlop_simplify_and_regularize_point_set<Concurrency_tag>
+      (points->begin(),
+       points->end(),
+       std::back_inserter(*(new_item->point_set ())),
+       dialog.retainedPercentage (),
+       dialog.neighborhoodRadius()*average_spacing
+       );
+
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << "Simplification and regularization: "
+	      << new_item->point_set ()->size () << " point(s) created ("
+	      << task_timer.time() << " seconds, "
+	      << (memory>>20) << " Mb allocated)"
+	      << std::endl;
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Point_set_wlop_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui
new file mode 100644
index 0000000..dc2a9a4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WLOPRegularizationAndSimplificationDialog</class>
+ <widget class="QDialog" name="WLOPRegularizationAndSimplificationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>292</width>
+    <height>109</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>WLOP Simplification and Regularization</string>
+  </property>
+  <layout class="QGridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Retained Percentage</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QDoubleSpinBox" name="m_retainedPercentage">
+     <property name="suffix">
+      <string> %</string>
+     </property>
+     <property name="decimals">
+      <number>2</number>
+     </property>
+     <property name="minimum">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>100.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value">
+      <double>50.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>Neighborhood Radius</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QDoubleSpinBox" name="m_neighborhoodRadius">
+     <property name="suffix">
+      <string> * average spacing</string>
+     </property>
+     <property name="decimals">
+      <number>2</number>
+     </property>
+     <property name="minimum">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="maximum">
+      <double>10.000000000000000</double>
+     </property>
+     <property name="singleStep">
+      <double>0.100000000000000</double>
+     </property>
+     <property name="value">
+      <double>1.000000000000000</double>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>WLOPRegularizationAndSimplificationDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>WLOPRegularizationAndSimplificationDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp
new file mode 100644
index 0000000..719bc01
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp
@@ -0,0 +1,873 @@
+#include <QTime>
+#include <QApplication>
+#include <QAction>
+#include <QList>
+#include <QMainWindow>
+#include <QObject>
+
+#include <fstream>
+
+#include "Scene_polygon_soup_item.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_points_with_normal_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include <CGAL/array.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/squared_distance_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Default_diagonalize_traits.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/grid_simplify_point_set.h>
+#include <CGAL/jet_smooth_point_set.h>
+#include <CGAL/jet_estimate_normals.h>
+#include <CGAL/mst_orient_normals.h>
+#include <CGAL/Scale_space_surface_reconstruction_3.h>
+#include <CGAL/Advancing_front_surface_reconstruction.h>
+
+#include "ui_Surface_reconstruction_plugin.h"
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+// Poisson reconstruction method:
+// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
+Polyhedron* poisson_reconstruct(const Point_set& points,
+                                Kernel::FT sm_angle, // Min triangle angle (degrees). 
+                                Kernel::FT sm_radius, // Max triangle size w.r.t. point set average spacing. 
+                                Kernel::FT sm_distance, // Approximation error w.r.t. point set average spacing.
+                                const QString& solver, // solver name
+                                bool use_two_passes,
+				bool do_not_fill_holes);
+
+
+struct Radius {
+
+  double bound;
+
+  Radius(double bound)
+    : bound(bound)
+  {}
+
+  template <typename AdvancingFront, typename Cell_handle>
+  double operator() (const AdvancingFront& adv, Cell_handle& c,
+                     const int& index) const
+  {
+    // bound == 0 is better than bound < infinity
+    // as it avoids the distance computations
+    if(bound == 0){
+      return adv.smallest_radius_delaunay_sphere (c, index);
+    }
+
+    // If radius > bound, return infinity so that facet is not used
+    double d  = 0;
+    d = sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                              c->vertex((index+2)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d = sqrt(squared_distance(c->vertex((index+2)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d = sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+
+    // Otherwise, return usual priority value: smallest radius of
+    // delaunay sphere
+    return adv.smallest_radius_delaunay_sphere (c, index);
+  }
+
+};
+
+
+namespace SurfaceReconstruction
+{
+  typedef Kernel::Point_3 Point;
+  typedef Kernel::Vector_3 Vector;
+  // types for K nearest neighbors search
+  typedef CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef Neighbor_search::Tree Tree;
+  typedef Neighbor_search::iterator Search_iterator;
+
+  typedef CGAL::Scale_space_surface_reconstruction_3<Kernel> ScaleSpace;
+  
+  template <typename OutputIterator>
+  void generate_scales (OutputIterator out,
+			const unsigned int scale_min = 6,
+			const double factor = 1.15,
+			unsigned int nb_scales = 30)
+  {
+    unsigned int prev = -1;
+    
+    for (unsigned int i = 0; i < nb_scales; ++ i)
+      {
+	unsigned int current = static_cast<unsigned int>(scale_min * std::pow (factor, i));
+	if (current != prev)
+	  {
+	    *(out ++) = current;
+	    prev = current;
+	  }
+	else
+	  ++ nb_scales;
+      }
+  }
+  
+  unsigned int scale_of_anisotropy (const Point_set& points, double& size)
+  {
+    Tree tree(points.begin(), points.end());
+    
+    double ratio_kept = (points.size() < 1000)
+      ? 1. : 1000. / (points.size());
+    
+    std::vector<Point> subset;
+    for (std::size_t i = 0; i < points.size (); ++ i)
+      if (rand() / (double)RAND_MAX < ratio_kept)
+    	subset.push_back (points[i]);
+    
+    std::vector<unsigned int> scales;
+    generate_scales (std::back_inserter (scales));
+
+    std::vector<unsigned int> chosen;
+
+    for (std::size_t i = 0; i < subset.size (); ++ i)
+      {
+    	Neighbor_search search(tree, subset[i],scales.back());
+	double current = 0.;
+    	unsigned int nb = 0;
+    	std::size_t index = 0;
+	double maximum = 0.;
+	unsigned int c = 0;
+	
+    	for (Search_iterator search_iterator = search.begin();
+    	     search_iterator != search.end (); ++ search_iterator, ++ nb)
+    	  {
+	    current += search_iterator->second;
+
+    	    if (nb + 1 == scales[index])
+    	      {
+		double score = std::sqrt (current / scales[index])
+		  / std::pow (scales[index], 0.75); // NB ^ (3/4)
+
+		if (score > maximum)
+		  {
+		    maximum = score;
+		    c = scales[index];
+		  }
+
+    		++ index;
+    		if (index == scales.size ())
+    		  break;
+    	      }
+    	  }
+	chosen.push_back (c);
+      }
+
+    double mean = 0.;
+    for (std::size_t i = 0; i < chosen.size(); ++ i)
+      mean += chosen[i];
+    mean /= chosen.size();
+    unsigned int aniso_scale = static_cast<unsigned int>(mean);
+
+    size = 0.;
+    for (std::size_t i = 0; i < subset.size (); ++ i)
+      {
+    	Neighbor_search search(tree, subset[i], aniso_scale);
+	size += std::sqrt ((-- search.end())->second);
+      }
+    size /= subset.size();
+    
+    return aniso_scale;
+  }
+
+  
+  unsigned int scale_of_noise (const Point_set& points, double& size)
+  {
+    Tree tree(points.begin(), points.end());
+    
+    double ratio_kept = (points.size() < 1000)
+      ? 1. : 1000. / (points.size());
+    
+    std::vector<Point> subset;
+    for (std::size_t i = 0; i < points.size (); ++ i)
+      if (rand() / (double)RAND_MAX < ratio_kept)
+    	subset.push_back (points[i]);
+    
+    std::vector<unsigned int> scales;
+    generate_scales (std::back_inserter (scales));
+
+    std::vector<unsigned int> chosen;
+    
+    for (std::size_t i = 0; i < subset.size (); ++ i)
+      {
+    	Neighbor_search search(tree, subset[i],scales.back());
+	double current = 0.;
+    	unsigned int nb = 0;
+    	std::size_t index = 0;
+	double minimum = (std::numeric_limits<double>::max)();
+	unsigned int c = 0;
+	
+    	for (Search_iterator search_iterator = search.begin();
+    	     search_iterator != search.end (); ++ search_iterator, ++ nb)
+    	  {
+	    current += search_iterator->second;
+
+    	    if (nb + 1 == scales[index])
+    	      {
+		double score = std::sqrt (current / scales[index])
+		  / std::pow (scales[index], 0.375); // NB ^ (5/12)
+
+		if (score < minimum)
+		  {
+		    minimum = score;
+		    c = scales[index];
+		  }
+
+    		++ index;
+    		if (index == scales.size ())
+    		  break;
+    	      }
+    	  }
+	chosen.push_back (c);
+      }
+
+    std::sort (chosen.begin (), chosen.end());
+
+    unsigned int noise_scale = chosen[chosen.size() / 2];
+    size = 0.;
+    for (std::size_t i = 0; i < subset.size (); ++ i)
+      {
+    	Neighbor_search search(tree, subset[i], noise_scale);
+	size += std::sqrt ((-- search.end())->second);
+      }
+    size /= subset.size();
+
+    
+    return noise_scale;
+  }
+
+  void simplify_point_set (Point_set& points, double size)
+  {
+    points.erase (CGAL::grid_simplify_point_set (points.begin (), points.end (), size),
+		  points.end ());
+  }
+
+  void smooth_point_set (Point_set& points, unsigned int scale)
+  {
+    CGAL::jet_smooth_point_set<Concurrency_tag>(points.begin(), points.end(),
+                                                scale);
+  }
+
+  template <typename ItemsInserter>
+  void scale_space (const Point_set& points, ItemsInserter items,
+		    unsigned int scale, bool generate_smooth = false,
+                    bool separate_shells = false, bool force_manifold = true,
+                    unsigned int samples = 300, unsigned int iterations = 4)
+  {
+    ScaleSpace reconstruct (scale, samples);
+    reconstruct.reconstruct_surface(points.begin (), points.end (), iterations,
+                                    separate_shells, force_manifold);
+
+    for( unsigned int sh = 0; sh < reconstruct.number_of_shells(); ++sh )
+      {
+        Scene_polygon_soup_item* new_item
+          = new Scene_polygon_soup_item ();
+        new_item->setColor(Qt::magenta);
+        new_item->setRenderingMode(FlatPlusEdges);
+        new_item->init_polygon_soup(points.size(), reconstruct.number_of_triangles ());
+
+        Scene_polygon_soup_item* smooth_item = NULL;
+        if (generate_smooth)
+          {
+            smooth_item = new Scene_polygon_soup_item ();
+            smooth_item->setColor(Qt::magenta);
+            smooth_item->setRenderingMode(FlatPlusEdges);
+            smooth_item->init_polygon_soup(points.size(), reconstruct.number_of_triangles ());
+          }
+
+        std::map<unsigned int, unsigned int> map_i2i;
+        unsigned int current_index = 0;
+    
+        for (ScaleSpace::Triple_iterator it = reconstruct.shell_begin (sh);
+             it != reconstruct.shell_end (sh); ++ it)
+          {
+            for (unsigned int ind = 0; ind < 3; ++ ind)
+              {
+                if (map_i2i.find ((*it)[ind]) == map_i2i.end ())
+                  {
+                    map_i2i.insert (std::make_pair ((*it)[ind], current_index ++));
+                    Point p = points[(*it)[ind]].position();
+                    new_item->new_vertex (p.x (), p.y (), p.z ());
+                    
+                    if (generate_smooth)
+                      {
+                        p = *(reconstruct.points_begin() + (*it)[ind]);
+                        smooth_item->new_vertex (p.x (), p.y (), p.z ());
+                      }
+                  }
+              }
+            new_item->new_triangle( map_i2i[(*it)[0]],
+                                    map_i2i[(*it)[1]],
+                                    map_i2i[(*it)[2]] );
+            if (generate_smooth)
+              smooth_item->new_triangle( map_i2i[(*it)[0]],
+                                         map_i2i[(*it)[1]],
+                                         map_i2i[(*it)[2]] );
+              
+          }
+
+        *(items ++) = new_item;
+        if (generate_smooth)
+          *(items ++) = smooth_item;
+      }
+
+    if (force_manifold)
+      {
+        std::ptrdiff_t num = std::distance( reconstruct.garbage_begin(  ),
+                                            reconstruct.garbage_end(  ) );
+
+        Scene_polygon_soup_item* new_item
+          = new Scene_polygon_soup_item ();
+        new_item->setColor(Qt::blue);
+        new_item->setRenderingMode(FlatPlusEdges);
+        new_item->init_polygon_soup(points.size(), num);
+
+        Scene_polygon_soup_item* smooth_item = NULL;
+        if (generate_smooth)
+          {
+            smooth_item = new Scene_polygon_soup_item ();
+            smooth_item->setColor(Qt::blue);
+            smooth_item->setRenderingMode(FlatPlusEdges);
+            smooth_item->init_polygon_soup(points.size(), num);
+          }
+
+        std::map<unsigned int, unsigned int> map_i2i;
+
+        unsigned int current_index = 0;
+        for (ScaleSpace::Triple_iterator it=reconstruct.garbage_begin(),
+               end=reconstruct.garbage_end();it!=end;++it)
+          {
+            for (unsigned int ind = 0; ind < 3; ++ ind)
+              {
+                if (map_i2i.find ((*it)[ind]) == map_i2i.end ())
+                  {
+                    map_i2i.insert (std::make_pair ((*it)[ind], current_index ++));
+                    Point p = points[(*it)[ind]].position();
+                    new_item->new_vertex (p.x (), p.y (), p.z ());
+                    
+                    if (generate_smooth)
+                      {
+                        p = *(reconstruct.points_begin() + (*it)[ind]);
+                        smooth_item->new_vertex (p.x (), p.y (), p.z ());
+                      }
+                  }
+
+              }
+            new_item->new_triangle( map_i2i[(*it)[0]],
+                                    map_i2i[(*it)[1]],
+                                    map_i2i[(*it)[2]] );
+            if (generate_smooth)
+              smooth_item->new_triangle( map_i2i[(*it)[0]],
+                                         map_i2i[(*it)[1]],
+                                         map_i2i[(*it)[2]] );
+          }
+
+        *(items ++) = new_item;
+        if (generate_smooth)
+          *(items ++) = smooth_item;
+
+      }
+  }
+  
+  void advancing_front (const Point_set& points, Scene_polyhedron_item* new_item, double size,
+                        double radius_ratio_bound = 5., double beta = 0.52)
+  {
+    Polyhedron& P = * const_cast<Polyhedron*>(new_item->polyhedron());
+    Radius filter (size);
+
+    CGAL::advancing_front_surface_reconstruction (points.begin (), points.end (), P, filter,
+                                                  radius_ratio_bound, beta);
+						  
+  }
+
+  void compute_normals (Point_set& points, unsigned int neighbors)
+  {
+    CGAL::jet_estimate_normals<Concurrency_tag>(points.begin(), points.end(),
+                                                CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+                                                2 * neighbors);
+    
+    points.erase (CGAL::mst_orient_normals (points.begin(), points.end(),
+					    CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
+					    2 * neighbors),
+		  points.end ());
+  }
+  
+}
+
+
+
+class Polyhedron_demo_surface_reconstruction_plugin_dialog : public QDialog, private Ui::SurfaceReconstructionDialog
+{
+  Q_OBJECT
+public:
+  Polyhedron_demo_surface_reconstruction_plugin_dialog(QWidget* /*parent*/ = 0)
+  {
+    setupUi(this);
+    
+#ifdef CGAL_EIGEN3_ENABLED
+    m_inputSolver->addItem("Eigen - built-in CG");
+    m_inputSolver->addItem("Eigen - built-in simplicial LDLt");
+#endif
+  }
+
+  unsigned int method () const
+  {
+    if (buttonAuto->isChecked ())       return 0;
+    if (buttonAdvancing->isChecked ())  return 1;
+    if (buttonScaleSpace->isChecked ()) return 2;
+    if (buttonPoisson->isChecked ())    return 3;
+    return -1;
+  }
+  bool boundaries () const { return m_boundaries->isChecked (); }
+  bool interpolate () const { return m_interpolate->isChecked (); }
+  double longest_edge () const { return m_longestEdge->value (); }
+  double radius_ratio_bound () const { return m_radiusRatioBound->value (); }
+  double beta_angle () const { return m_betaAngle->value (); }
+  unsigned int neighbors () const { return m_neighbors->value (); }
+  unsigned int samples () const { return m_samples->value (); }
+  unsigned int iterations () const { return m_iterations->value (); }
+  bool separate_shells () const { return m_genShells->isChecked (); }
+  bool force_manifold () const { return m_forceManifold->isChecked (); }
+  bool generate_smoothed () const { return m_genSmooth->isChecked (); }
+  double angle () const { return m_inputAngle->value (); }
+  double radius () const { return m_inputRadius->value (); }
+  double distance () const { return m_inputDistance->value (); }
+  bool two_passes () const { return m_inputTwoPasses->isChecked (); }
+  bool do_not_fill_holes () const { return m_doNotFillHoles->isChecked (); }
+  QString solver () const { return m_inputSolver->currentText (); }
+};
+
+#include <CGAL/Scale_space_surface_reconstruction_3.h>
+
+class Polyhedron_demo_surface_reconstruction_plugin :
+  public QObject,
+  public CGAL::Three::Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  QAction* actionSurfaceReconstruction;
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+
+    actionSurfaceReconstruction = new QAction(tr("Surface Reconstruction"), mainWindow);
+    actionSurfaceReconstruction->setObjectName("actionSurfaceReconstruction");
+
+    CGAL::Three::Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
+  }
+
+  void automatic_reconstruction (const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog);
+  void advancing_front_reconstruction (const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog);
+  void scale_space_reconstruction (const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog);
+  void poisson_reconstruction (const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog);
+  
+  //! Applicate for Point_sets with normals.
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_points_with_normal_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionSurfaceReconstruction;
+  }
+
+public Q_SLOTS:
+  void on_actionSurfaceReconstruction_triggered();
+}; // end class Polyhedron_surface_reconstruction_plugin
+
+
+void Polyhedron_demo_surface_reconstruction_plugin::on_actionSurfaceReconstruction_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* pts_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(pts_item)
+    {
+      //generate the dialog box to set the options
+      Polyhedron_demo_surface_reconstruction_plugin_dialog dialog;
+      if(!dialog.exec())
+	return;
+
+      unsigned int method = dialog.method ();
+      switch (method)
+        {
+        case 0:
+          automatic_reconstruction (dialog);
+          break;
+        case 1:
+          advancing_front_reconstruction (dialog);
+          break;
+        case 2:
+          scale_space_reconstruction (dialog);
+          break;
+        case 3:
+          poisson_reconstruction (dialog);
+          break;
+        default:
+          std::cerr << "Error: unkown method." << std::endl;
+          return;
+        }
+      
+
+    }
+}
+
+void Polyhedron_demo_surface_reconstruction_plugin::automatic_reconstruction
+(const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog)
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* pts_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(pts_item)
+    {
+      // Gets point set
+      Point_set* points = pts_item->point_set();
+
+      // wait cursor
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      QTime time;
+      std::cout << "Meta surface reconstruction with the following requirements:" << std::endl
+		<< (dialog.boundaries() ? " * Output shape has boundaries" : " * Output shape is closed") << std::endl
+		<< (dialog.interpolate() ? " * Output shape passes through input points"
+		    : " * Output shape approximates input points") << std::endl;
+
+      Scene_points_with_normal_item* new_item = NULL;
+      if (!(dialog.interpolate()))
+	{
+	  new_item = new Scene_points_with_normal_item();
+	  new_item->setName(QString("%1 (preprocessed)").arg(pts_item->name()));
+	  new_item->set_has_normals (pts_item->has_normals());
+	  new_item->setColor(pts_item->color());
+	  new_item->setRenderingMode(pts_item->renderingMode());
+	  new_item->setVisible(pts_item->visible());
+	  new_item->resetSelection();
+	  new_item->invalidateOpenGLBuffers();
+
+	  points = new_item->point_set();
+	  std::copy (pts_item->point_set()->begin(), pts_item->point_set()->end(),
+		     std::back_inserter (*points));
+	}
+
+      std::cerr << "Analysing isotropy of point set... ";
+      time.start();
+      double aniso_size;
+      unsigned int aniso_scale = SurfaceReconstruction::scale_of_anisotropy (*points, aniso_size);
+      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+      std::cerr << " -> Scale / size = " << aniso_scale << " / " << aniso_size << std::endl;
+      
+      bool isotropic = (aniso_scale == 6);
+      std::cerr << (isotropic ? " -> Point set is isotropic" : " -> Point set is anisotropic") << std::endl;
+      if (!(dialog.interpolate()) && !isotropic)
+	{
+	  std::cerr << "Correcting anisotropy of point set... ";
+	  time.restart();
+	  std::size_t prev_size = points->size ();
+	  SurfaceReconstruction::simplify_point_set (*points, aniso_size);
+	  std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	  std::cerr << " -> " << prev_size - points->size() << " point(s) removed ("
+		    << 100. * (prev_size - points->size()) / (double)(prev_size)
+		    << "%)" << std::endl;
+	}
+
+      std::cerr << "Analysing noise of point set... ";
+      time.restart();
+      double noise_size;
+      unsigned int noise_scale = SurfaceReconstruction::scale_of_noise (*points, noise_size);
+      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+      
+      std::cerr << " -> Scale / size = " << noise_scale << " / " << noise_size << std::endl;
+      
+      bool noisy = (noise_scale > 6);
+      std::cerr << (noisy ? " -> Point set is noisy" : " -> Point set is noise-free") << std::endl;
+      
+      if (!(dialog.interpolate()) && noisy)
+	{
+	  std::cerr << "Denoising point set... ";
+	  time.restart();
+	  SurfaceReconstruction::smooth_point_set (*points, noise_scale);
+          new_item->set_has_normals (false);
+	  std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	}
+
+      if (dialog.interpolate())
+	{
+	  if (noisy)
+	    { 
+	      std::cerr << "Scale space reconstruction... ";
+	      time.restart();
+
+              std::vector<Scene_polygon_soup_item*> reco_items;
+
+	      SurfaceReconstruction::scale_space (*points, std::back_inserter (reco_items),
+                                                  (std::max)(noise_scale, aniso_scale));
+	      
+              for (std::size_t i = 0; i < reco_items.size (); ++ i)
+                {
+                  reco_items[i]->setName(tr("%1 (scale space)").arg(scene->item(index)->name()));
+                  scene->addItem (reco_items[i]);
+                }
+
+	      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	    }
+	  else
+	    {
+	      std::cerr << "Advancing front reconstruction... ";
+	      time.restart();
+
+	      Scene_polyhedron_item* reco_item = new Scene_polyhedron_item(Polyhedron());
+	      SurfaceReconstruction::advancing_front (*points, reco_item, 10. * (std::max)(noise_size, aniso_size));
+	      
+	      reco_item->setName(tr("%1 (advancing front)").arg(scene->item(index)->name()));
+	      reco_item->setColor(Qt::magenta);
+	      reco_item->setRenderingMode(FlatPlusEdges);
+	      scene->addItem(reco_item);
+
+	      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	    }
+
+	}
+      else
+	{
+	  if (dialog.boundaries())
+	    {
+	      std::cerr << "Advancing front reconstruction... ";
+	      time.restart();
+
+	      Scene_polyhedron_item* reco_item = new Scene_polyhedron_item(Polyhedron());
+	      SurfaceReconstruction::advancing_front (*points, reco_item, 10. * (std::max)(noise_size, aniso_size));
+	      
+	      reco_item->setName(tr("%1 (advancing front)").arg(scene->item(index)->name()));
+	      reco_item->setColor(Qt::magenta);
+	      reco_item->setRenderingMode(FlatPlusEdges);
+	      scene->addItem(reco_item);
+
+	      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	    }
+	  else
+	    {
+	      if (!(new_item->has_normals()))
+		{
+		  std::cerr << "Estimation of normal vectors... ";
+		  time.restart();
+
+		  SurfaceReconstruction::compute_normals (*points, noise_scale);
+		  
+		  new_item->set_has_normals (true);
+		  new_item->setRenderingMode(PointsPlusNormals);
+		  
+		  std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+		}
+	      
+	      std::cerr << "Poisson reconstruction... ";
+	      time.restart();
+
+	      Polyhedron* pRemesh = poisson_reconstruct(*points, 20,
+							100 * (std::max)(noise_size, aniso_size),
+							(std::max)(noise_size, aniso_size),
+							QString ("Eigen - built-in CG"), false, false);
+	      if(pRemesh)
+
+		{
+		  // Add polyhedron to scene
+		  Scene_polyhedron_item* reco_item = new Scene_polyhedron_item(pRemesh);
+		  reco_item->setName(tr("%1 (poisson)").arg(pts_item->name()));
+		  reco_item->setColor(Qt::lightGray);
+		  scene->addItem(reco_item);
+		}
+
+	      std::cerr << "ok (" << time.elapsed() << " ms)" << std::endl;
+	    }
+	}
+
+      if (!(dialog.interpolate()))
+	{
+	  if (noisy || !isotropic)
+	    scene->addItem(new_item);
+	  else
+	    delete new_item;
+	}
+
+      // default cursor
+      QApplication::restoreOverrideCursor();
+    }
+}
+
+
+void Polyhedron_demo_surface_reconstruction_plugin::advancing_front_reconstruction
+(const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog)
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* pts_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(pts_item)
+    {
+      // Gets point set
+      Point_set* points = pts_item->point_set();
+
+      // wait cursor
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      std::cerr << "Advancing front reconstruction... ";
+
+      Scene_polyhedron_item* reco_item = new Scene_polyhedron_item(Polyhedron());
+      SurfaceReconstruction::advancing_front (*points, reco_item,
+                                              dialog.longest_edge (),
+                                              dialog.radius_ratio_bound (),
+                                              CGAL_PI * dialog.beta_angle () / 180.);
+	      
+      reco_item->setName(tr("%1 (advancing front)").arg(scene->item(index)->name()));
+      reco_item->setColor(Qt::magenta);
+      reco_item->setRenderingMode(FlatPlusEdges);
+      scene->addItem(reco_item);
+
+      QApplication::restoreOverrideCursor();
+    }
+}
+
+
+void Polyhedron_demo_surface_reconstruction_plugin::scale_space_reconstruction
+(const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog)
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* pts_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(pts_item)
+    {
+      // Gets point set
+      Point_set* points = pts_item->point_set();
+
+      // wait cursor
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      std::cout << "Scale scape surface reconstruction...";
+      
+      std::vector<Scene_polygon_soup_item*> reco_items;
+
+      SurfaceReconstruction::scale_space (*points, std::back_inserter (reco_items),
+                                          dialog.neighbors (),
+                                          dialog.generate_smoothed (),
+                                          dialog.separate_shells (),
+                                          dialog.force_manifold (),
+                                          dialog.samples (),
+                                          dialog.iterations ());
+
+      for (std::size_t i = 0; i < reco_items.size (); ++ i)
+        {
+          if (dialog.force_manifold () && i > reco_items.size () - 3)
+            {
+              if (dialog.generate_smoothed () && i % 2)
+                reco_items[i]->setName(tr("%1 (scale space smooth garbage)").arg(scene->item(index)->name()));
+              else
+                reco_items[i]->setName(tr("%1 (scale space garbage)").arg(scene->item(index)->name()));
+            }
+          else
+            {
+              if (dialog.generate_smoothed ())
+                {
+                  if (i % 2)
+                    reco_items[i]->setName(tr("%1 (scale space smooth shell %2)").arg(scene->item(index)->name()).arg((i+1)/2));
+                  else
+                    reco_items[i]->setName(tr("%1 (scale space shell %2)").arg(scene->item(index)->name()).arg(((i+1)/2)+1));
+                }
+              else
+                reco_items[i]->setName(tr("%1 (scale space shell %2)").arg(scene->item(index)->name()).arg(i+1));
+            }
+          scene->addItem (reco_items[i]);
+        }
+
+      QApplication::restoreOverrideCursor();
+    }
+}
+
+
+void Polyhedron_demo_surface_reconstruction_plugin::poisson_reconstruction
+(const Polyhedron_demo_surface_reconstruction_plugin_dialog& dialog)
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_points_with_normal_item* point_set_item =
+    qobject_cast<Scene_points_with_normal_item*>(scene->item(index));
+
+  if(point_set_item)
+    {
+      // Gets point set
+      Point_set* points = point_set_item->point_set();
+      if(!points) return;
+
+      const double sm_angle     = dialog.angle ();
+      const double sm_radius    = dialog.radius ();
+      const double sm_distance  = dialog.distance ();
+      const QString sm_solver   = dialog.solver();
+      bool use_two_passes = dialog.two_passes();
+      bool do_not_fill_holes = dialog.do_not_fill_holes();
+
+      QApplication::setOverrideCursor(Qt::WaitCursor);
+
+      if (!(point_set_item->has_normals()))
+        {
+          std::cerr << "Estimation of normal vectors... ";
+
+          SurfaceReconstruction::compute_normals (*points, 12);
+		  
+          point_set_item->set_has_normals (true);
+          point_set_item->setRenderingMode(PointsPlusNormals);
+
+        }
+
+
+      // Reconstruct point set as a polyhedron
+      Polyhedron* pRemesh = poisson_reconstruct(*points, sm_angle, sm_radius, sm_distance, sm_solver, use_two_passes,
+                                                do_not_fill_holes);
+      if(pRemesh)
+        {
+          // Add polyhedron to scene
+          Scene_polyhedron_item* new_item = new Scene_polyhedron_item(pRemesh);
+          new_item->setName(tr("%1 Poisson (%2 %3 %4)")
+                            .arg(point_set_item->name())
+                            .arg(sm_angle)
+                            .arg(sm_radius)
+                            .arg(sm_distance));
+          new_item->setColor(Qt::lightGray);
+          scene->addItem(new_item);
+
+
+          // Hide point set
+          point_set_item->setVisible(false);
+          scene->itemChanged(index);
+        }
+
+      QApplication::restoreOverrideCursor();
+    }
+}
+
+
+#include "Surface_reconstruction_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui
new file mode 100644
index 0000000..d52a3bf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SurfaceReconstructionDialog</class>
+ <widget class="QDialog" name="SurfaceReconstructionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>397</width>
+    <height>663</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Surface Reconstruction</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="3" column="0">
+    <widget class="QFrame" name="frameAdvancing">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Longest Edge</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="m_longestEdge">
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string>Radius Ratio Bound</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_10">
+        <property name="text">
+         <string>Beta Angle</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="m_radiusRatioBound">
+        <property name="minimum">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>1000.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>5.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="m_betaAngle">
+        <property name="suffix">
+         <string>°</string>
+        </property>
+        <property name="maximum">
+         <double>150.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>30.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="0">
+    <widget class="QFrame" name="frameScaleSpace">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Average Neighborhood Size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QSpinBox" name="m_neighbors">
+        <property name="minimum">
+         <number>0</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+        <property name="value">
+         <number>30</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Size of Sample to Estimate Neighborhood</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="m_samples">
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>200</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>Iterations</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QSpinBox" name="m_iterations">
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>1000000</number>
+        </property>
+        <property name="value">
+         <number>4</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QCheckBox" name="m_genShells">
+        <property name="text">
+         <string>Generate separate shells</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QCheckBox" name="m_forceManifold">
+        <property name="text">
+         <string>Force manifold output</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QCheckBox" name="m_genSmooth">
+        <property name="text">
+         <string>Smoothed version</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="6" column="0">
+    <widget class="QRadioButton" name="buttonPoisson">
+     <property name="text">
+      <string>Poisson Reconstruction</string>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="0">
+    <widget class="QFrame" name="framePoisson">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout_3">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Min Triangle Angle:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="m_inputAngle">
+        <property name="suffix">
+         <string> °</string>
+        </property>
+        <property name="minimum">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>30.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>20.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_7">
+        <property name="text">
+         <string>Max Triangle Size:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="m_inputRadius">
+        <property name="suffix">
+         <string> * average spacing</string>
+        </property>
+        <property name="decimals">
+         <number>0</number>
+        </property>
+        <property name="minimum">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>1000.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>100.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>Approximation Error:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="m_inputDistance">
+        <property name="suffix">
+         <string> * average spacing</string>
+        </property>
+        <property name="decimals">
+         <number>6</number>
+        </property>
+        <property name="minimum">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.250000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_8">
+        <property name="text">
+         <string>Solver:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QComboBox" name="m_inputSolver">
+        <property name="toolTip">
+         <string extracomment="Name of the sparse solver"/>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QCheckBox" name="m_inputTwoPasses">
+        <property name="text">
+         <string>Perform two passes</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QCheckBox" name="m_doNotFillHoles">
+        <property name="text">
+         <string>Do not fill holes</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QRadioButton" name="buttonAdvancing">
+     <property name="text">
+      <string>Advancing Front Reconstruction</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QRadioButton" name="buttonAuto">
+     <property name="text">
+      <string>Select Method and Parameters Automatically</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QRadioButton" name="buttonScaleSpace">
+     <property name="text">
+      <string>Scale Space Reconstruction</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QFrame" name="frameAuto">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QCheckBox" name="m_boundaries">
+        <property name="text">
+         <string>Output surface has boundaries</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="m_interpolate">
+        <property name="text">
+         <string>Output surface must pass exactly through input points</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="8" column="0">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>SurfaceReconstructionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>640</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>331</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>SurfaceReconstructionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>640</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>331</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonAdvancing</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frameAdvancing</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>116</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>155</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonAuto</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frameAuto</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>18</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>67</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonPoisson</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>framePoisson</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>414</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>525</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonScaleSpace</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>frameScaleSpace</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>198</x>
+     <y>194</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>198</x>
+     <y>304</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp
new file mode 100644
index 0000000..1b701f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp
@@ -0,0 +1,245 @@
+//----------------------------------------------------------
+// Poisson reconstruction method:
+// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
+//----------------------------------------------------------
+
+
+// CGAL
+#include <CGAL/AABB_tree.h> // must be included before kernel
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Surface_mesh_default_triangulation_3.h>
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Implicit_surface_3.h>
+#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
+#include <CGAL/Poisson_reconstruction_function.h>
+#include <CGAL/compute_average_spacing.h>
+
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_solver_traits.h>
+#endif
+
+#include <math.h>
+
+#include "Kernel_type.h"
+#include "Polyhedron_type.h"
+#include "Scene_points_with_normal_item.h"
+
+
+// Poisson implicit function
+typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
+
+// Surface mesher
+typedef CGAL::Surface_mesh_default_triangulation_3 STr;
+typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
+typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
+
+// AABB tree
+typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
+typedef CGAL::AABB_tree<AABB_traits> AABB_tree;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+
+// Poisson reconstruction method:
+// Reconstructs a surface mesh from a point set and returns it as a polyhedron.
+Polyhedron* poisson_reconstruct(const Point_set& points,
+                                Kernel::FT sm_angle, // Min triangle angle (degrees).
+                                Kernel::FT sm_radius, // Max triangle size w.r.t. point set average spacing.
+                                Kernel::FT sm_distance, // Approximation error w.r.t. point set average spacing.
+                                const QString& solver_name, // solver name
+                                bool use_two_passes,
+				bool do_not_fill_holes)
+{
+    CGAL::Timer task_timer; task_timer.start();
+
+    //***************************************
+    // Checks requirements
+    //***************************************
+
+    if (points.size() == 0)
+    {
+      std::cerr << "Error: empty point set" << std::endl;
+      return NULL;
+    }
+
+    bool points_have_normals = (points.begin()->normal() != CGAL::NULL_VECTOR);
+    if ( ! points_have_normals )
+    {
+      std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
+      return NULL;
+    }
+
+    CGAL::Timer reconstruction_timer; reconstruction_timer.start();
+
+    //***************************************
+    // Computes implicit function
+    //***************************************
+
+ 
+    std::cerr << "Computes Poisson implicit function "
+              << "using " << solver_name.toLatin1().data() << " solver...\n";
+              
+    
+    // Creates implicit function from the point set.
+    // Note: this method requires an iterator over points
+    // + property maps to access each point's position and normal.
+    // The position property map can be omitted here as we use iterators over Point_3 elements.
+    Poisson_reconstruction_function function(
+                              points.begin(), points.end(),
+                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
+
+    bool ok = false;    
+    #ifdef CGAL_EIGEN3_ENABLED
+    if(solver_name=="Eigen - built-in simplicial LDLt")
+    {
+      CGAL::Eigen_solver_traits<Eigen::SimplicialCholesky<CGAL::Eigen_sparse_matrix<double>::EigenType> > solver;
+      ok = function.compute_implicit_function(solver, use_two_passes);
+    }
+    if(solver_name=="Eigen - built-in CG")
+    {
+      CGAL::Eigen_solver_traits<Eigen::ConjugateGradient<CGAL::Eigen_sparse_matrix<double>::EigenType> > solver;
+      solver.solver().setTolerance(1e-6);
+      solver.solver().setMaxIterations(1000);
+      ok = function.compute_implicit_function(solver, use_two_passes);
+    }
+    #endif
+
+    // Computes the Poisson indicator function f()
+    // at each vertex of the triangulation.
+    if ( ! ok )
+    {
+      std::cerr << "Error: cannot compute implicit function" << std::endl;
+      return NULL;
+    }
+
+    // Prints status
+    std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
+    task_timer.reset();
+
+    //***************************************
+    // Surface mesh generation
+    //***************************************
+
+    std::cerr << "Surface meshing...\n";
+
+    // Computes average spacing
+    Kernel::FT average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(points.begin(), points.end(),
+                                                       6 /* knn = 1 ring */);
+
+    // Gets one point inside the implicit surface
+    Kernel::Point_3 inner_point = function.get_inner_point();
+    Kernel::FT inner_point_value = function(inner_point);
+    if(inner_point_value >= 0.0)
+    {
+      std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
+      return NULL;
+    }
+
+    // Gets implicit function's radius
+    Kernel::Sphere_3 bsphere = function.bounding_sphere();
+    Kernel::FT radius = std::sqrt(bsphere.squared_radius());
+
+    // Defines the implicit surface: requires defining a
+  	// conservative bounding sphere centered at inner point.
+    Kernel::FT sm_sphere_radius = 5.0 * radius;
+    Kernel::FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
+    Surface_3 surface(function,
+                      Kernel::Sphere_3(inner_point,sm_sphere_radius*sm_sphere_radius),
+                      sm_dichotomy_error/sm_sphere_radius);
+
+    // Defines surface mesh generation criteria
+    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
+                                                        sm_radius*average_spacing,  // Max triangle size
+                                                        sm_distance*average_spacing); // Approximation error
+
+    CGAL_TRACE_STREAM << "  make_surface_mesh(sphere center=("<<inner_point << "),\n"
+                      << "                    sphere radius="<<sm_sphere_radius<<",\n"
+                      << "                    angle="<<sm_angle << " degrees,\n"
+                      << "                    triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
+                      << "                    distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
+                      << "                    dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
+                      << "                    Manifold_with_boundary_tag)\n";
+
+    // Generates surface mesh with manifold option
+    STr tr; // 3D Delaunay triangulation for surface mesh generation
+    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
+    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
+                            surface,                              // implicit surface
+                            criteria,                             // meshing criteria
+                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
+
+    // Prints status
+    std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
+                                     << tr.number_of_vertices() << " output vertices"
+                                     << std::endl;
+    task_timer.reset();
+
+    if(tr.number_of_vertices() == 0)
+      return NULL;
+
+    // Converts to polyhedron
+    Polyhedron* output_mesh = new Polyhedron;
+    CGAL::output_surface_facets_to_polyhedron(c2t3, *output_mesh);
+
+    // Prints total reconstruction duration
+    std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";
+
+    //***************************************
+    // Computes reconstruction error
+    //***************************************
+
+    // Constructs AABB tree and computes internal KD-tree
+    // data structure to accelerate distance queries
+    AABB_tree tree(faces(*output_mesh).first, faces(*output_mesh).second, *output_mesh);
+    tree.accelerate_distance_queries();
+
+    // Computes distance from each input point to reconstructed mesh
+    double max_distance = DBL_MIN;
+    double avg_distance = 0;
+
+    std::set<Polyhedron::Face_handle> faces_to_keep;
+    
+    for (Point_set::const_iterator p=points.begin(); p!=points.end(); p++)
+    {
+      AABB_traits::Point_and_primitive_id pap = tree.closest_point_and_primitive (*p);
+      double distance = std::sqrt(CGAL::squared_distance (pap.first, *p));
+      
+      max_distance = (std::max)(max_distance, distance);
+      avg_distance += distance;
+
+      Polyhedron::Face_handle f = pap.second;
+      faces_to_keep.insert (f);  
+    }
+    avg_distance /= double(points.size());
+
+    std::cerr << "Reconstruction error:\n"
+              << "  max = " << max_distance << " = " << max_distance/average_spacing << " * average spacing\n"
+              << "  avg = " << avg_distance << " = " << avg_distance/average_spacing << " * average spacing\n";
+
+    if (do_not_fill_holes)
+      {
+	Polyhedron::Facet_iterator it = output_mesh->facets_begin ();
+	while (it != output_mesh->facets_end ())
+	  {
+	    Polyhedron::Facet_iterator current = it ++;
+
+	    if (faces_to_keep.find (current) == faces_to_keep.end ())
+	      output_mesh->erase_facet (current->halfedge ());
+
+	  }
+
+      }
+    
+
+    return output_mesh;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt
new file mode 100644
index 0000000..031eedf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt
@@ -0,0 +1,5 @@
+include( polyhedron_demo_macros )
+
+
+polyhedron_demo_plugin(subdivision_methods_plugin Subdivision_methods_plugin)
+target_link_libraries(subdivision_methods_plugin scene_polyhedron_item)
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp
new file mode 100644
index 0000000..a2e0cf7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp
@@ -0,0 +1,125 @@
+#include <QTime>
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Subdivision_method_3.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_subdivision_methods_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionLoop"
+                         << "actionCatmullClark"
+                         << "actionSqrt3";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionLoop"] = new QAction("Loop", mw);
+      actions_map["actionLoop"]->setProperty("subMenuName", "3D Surface Subdivision Methods");
+
+      actions_map["actionCatmullClark"] = new QAction("Catmull Clark", mw);
+      actions_map["actionCatmullClark"]->setProperty("subMenuName", "3D Surface Subdivision Methods");
+
+      actions_map["actionSqrt3"] = new QAction("Sqrt3", mw);
+      actions_map["actionSqrt3"]->setProperty("subMenuName", "3D Surface Subdivision Methods");
+
+      //autoConnectActions();
+      connect(actions_map["actionLoop"], SIGNAL(triggered()),
+              this, SLOT(on_actionLoop_triggered()));
+
+      connect(actions_map["actionCatmullClark"], SIGNAL(triggered()),
+              this, SLOT(on_actionCatmullClark_triggered()));
+
+      connect(actions_map["actionSqrt3"], SIGNAL(triggered()),
+              this, SLOT(on_actionSqrt3_triggered()));
+
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+public Q_SLOTS:
+  void on_actionLoop_triggered();
+  void on_actionCatmullClark_triggered();
+  void on_actionSqrt3_triggered();
+}; // end Polyhedron_demo_subdivision_methods_plugin
+
+void Polyhedron_demo_subdivision_methods_plugin::on_actionLoop_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(!item) return;
+  Polyhedron* poly = item->polyhedron();
+  QTime time;
+  time.start();
+  std::cout << "Loop subdivision...";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Subdivision_method_3::Loop_subdivision(*poly, 1);
+  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+  QApplication::restoreOverrideCursor();
+  item->invalidateOpenGLBuffers();
+  scene->itemChanged(item);
+}
+
+void Polyhedron_demo_subdivision_methods_plugin::on_actionCatmullClark_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(!item) return;
+  Polyhedron* poly = item->polyhedron();
+  if(!poly) return;
+  QTime time;
+  time.start();
+  std::cout << "Catmull-Clark subdivision...";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Subdivision_method_3::CatmullClark_subdivision(*poly, 1);
+  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+  QApplication::restoreOverrideCursor();
+  item->invalidateOpenGLBuffers();
+  scene->itemChanged(item);
+}
+
+void Polyhedron_demo_subdivision_methods_plugin::on_actionSqrt3_triggered()
+{
+  CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(!item) return;
+  Polyhedron* poly = item->polyhedron();
+  if(!poly) return;
+  QTime time;
+  time.start();
+  std::cout << "Sqrt3 subdivision...";
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Subdivision_method_3::Sqrt3_subdivision(*poly, 1);
+  std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+  QApplication::restoreOverrideCursor();
+  item->invalidateOpenGLBuffers();
+  scene->itemChanged(item);
+}
+
+#include "Subdivision_methods_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt
new file mode 100644
index 0000000..4d9caaf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt
@@ -0,0 +1,25 @@
+include( polyhedron_demo_macros )
+if(EIGEN3_FOUND)
+
+  polyhedron_demo_plugin(parameterization_plugin Parameterization_plugin)
+  target_link_libraries(parameterization_plugin scene_polyhedron_item scene_textured_polyhedron_item )
+
+else(EIGEN3_FOUND)
+  message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Parameterization plugin will not be available.")
+endif(EIGEN3_FOUND)
+
+qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui)
+polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES})
+target_link_libraries(mesh_segmentation_plugin scene_polyhedron_item)
+
+polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin)
+target_link_libraries(mesh_simplification_plugin scene_polyhedron_item)
+
+
+qt5_wrap_ui( remeshingUI_FILES  Remeshing_dialog.ui)
+polyhedron_demo_plugin(remeshing_plugin Remeshing_plugin Remeshing_plugin_cgal_code.cpp Mesher_base.cpp ${remeshingUI_FILES})
+target_link_libraries(remeshing_plugin scene_polyhedron_item scene_polygon_soup_item scene_c2t3_item)
+
+qt5_wrap_ui( shortestPathUI_FILES Shortest_path_widget.ui )
+polyhedron_demo_plugin(shortest_path_plugin Shortest_path_plugin ${shortestPathUI_FILES})
+target_link_libraries(shortest_path_plugin scene_polyhedron_item scene_polylines_item scene_polyhedron_selection_item scene_polyhedron_shortest_path_item scene_basic_objects)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp
new file mode 100644
index 0000000..03bac66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp
@@ -0,0 +1,349 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "ui_Mesh_segmentation_widget.h"
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include "Scene.h"
+#include "Color_map.h"
+
+#include <CGAL/mesh_segmentation.h>
+#include <QApplication>
+#include <QMainWindow>
+#include <QInputDialog>
+#include <QTime>
+#include <QAction>
+#include <QDebug>
+#include <QObject>
+#include <QDockWidget>
+//#include <QtConcurrentRun>
+#include <map>
+#include <algorithm>
+#include <vector>
+#include <CGAL/property_map.h>
+
+
+template<class PolyhedronWithId, class ValueType>
+struct Polyhedron_with_id_to_vector_property_map
+    : public boost::put_get_helper<ValueType&,
+             Polyhedron_with_id_to_vector_property_map<PolyhedronWithId, ValueType> >
+{
+public:
+    typedef typename PolyhedronWithId::Facet_const_handle key_type;
+    typedef ValueType value_type;
+    typedef value_type& reference;
+    typedef boost::lvalue_property_map_tag category;
+
+    Polyhedron_with_id_to_vector_property_map() : internal_vector(NULL) { }
+    Polyhedron_with_id_to_vector_property_map(std::vector<ValueType>* internal_vector)
+         : internal_vector(internal_vector) { }
+        
+    reference operator[](key_type key) const { return (*internal_vector)[key->id()]; }
+private:
+    std::vector<ValueType>* internal_vector;
+};
+using namespace CGAL::Three;
+class Polyhedron_demo_mesh_segmentation_plugin : 
+    public QObject,
+    public Polyhedron_demo_plugin_helper
+{
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+private:
+    typedef std::map<Scene_polyhedron_item*, std::vector<double> > Item_sdf_map;
+public:
+
+    QList<QAction*> actions() const {
+        return QList<QAction*>() << actionSegmentation;
+    }
+
+    bool applicable(QAction*) const {
+      return 
+        qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+    }    
+    
+    void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+        this->scene = scene_interface;
+        this->mw = mainWindow;
+        actionSegmentation = new QAction("Mesh Segmentation", mw);
+        actionSegmentation->setProperty("subMenuName", "Triangulated Surface Mesh Segmentation");
+        connect(actionSegmentation, SIGNAL(triggered()),this, SLOT(on_actionSegmentation_triggered()));
+
+        // adding slot for itemAboutToBeDestroyed signal, aim is removing item from item-functor map.
+        
+        if( Scene* scene = dynamic_cast<Scene*>(scene_interface) ) {
+            connect(scene, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)));
+        }
+        
+        init_color_map_sdf();
+        init_color_map_segmentation();
+
+        dock_widget = new QDockWidget("Mesh segmentation parameters", mw);
+        dock_widget->setVisible(false); // do not show at the beginning
+        ui_widget.setupUi(dock_widget);
+        mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
+    
+        connect(ui_widget.Partition_button,  SIGNAL(clicked()), this, SLOT(on_Partition_button_clicked()));   
+        connect(ui_widget.SDF_button,  SIGNAL(clicked()), this, SLOT(on_SDF_button_clicked()));   
+    }
+    virtual void closure()
+    {
+      dock_widget->hide();
+    }
+    
+    template<class SDFPropertyMap>
+    void colorize_sdf(Scene_polyhedron_item* item, SDFPropertyMap sdf_values, std::vector<QColor>& color_vector);
+    template<class SegmentPropertyMap> 
+    void colorize_segmentation(Scene_polyhedron_item* item, SegmentPropertyMap segment_ids, std::vector<QColor>& color_vector);
+    void check_and_set_ids(Polyhedron* polyhedron);
+    void init_color_map_sdf();
+    void init_color_map_segmentation();
+    
+    public Q_SLOTS:
+        void on_actionSegmentation_triggered();
+        void on_Partition_button_clicked();
+        void on_SDF_button_clicked();
+        void itemAboutToBeDestroyed(CGAL::Three::Scene_item*);
+private:
+    QAction*                      actionSegmentation;
+    QDockWidget*                  dock_widget;
+    Ui::Mesh_segmentation         ui_widget;
+    
+    std::vector<QColor>  color_map_sdf;
+    std::vector<QColor>  color_map_segmentation;
+    Item_sdf_map         item_sdf_map;
+};
+
+void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_sdf()
+{
+    color_map_sdf = std::vector<QColor>(256);
+    int r = 0, g = 0, b = 255;
+    for(int i = 0; i <= 255; ++i)
+    {
+        if(i > 128 && i <= 192) { r = static_cast<int>( ((i - 128) / (192.0 - 128)) * 255 ); }        
+        if(i > 0 && i <= 98)    { g = static_cast<int>( ((i) / (98.0)) * 255 ); }
+        if(i > 191 && i <=255)  { g = 255 - static_cast<int>( ((i - 191) / (255.0 - 191)) * 255 ); }
+        if(i > 64 && i <= 127)  { b = 255 - static_cast<int>( ((i - 64) / (127.0 - 64)) * 255 ); }
+        color_map_sdf[i] = QColor(r, g, b);        
+    }
+}
+
+void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_segmentation()
+{
+
+    color_map_segmentation.push_back(QColor( 173, 35, 35)); 
+    color_map_segmentation.push_back(QColor( 87, 87, 87));    
+    color_map_segmentation.push_back(QColor( 42, 75, 215)); 
+    color_map_segmentation.push_back(QColor( 29, 105, 20)); 
+    color_map_segmentation.push_back(QColor( 129, 74, 25)); 
+    color_map_segmentation.push_back(QColor( 129, 38, 192)); 
+    color_map_segmentation.push_back(QColor( 160, 160, 160)); 
+    color_map_segmentation.push_back(QColor( 129, 197, 122)); 
+    color_map_segmentation.push_back(QColor( 157, 175, 255)); 
+    color_map_segmentation.push_back(QColor( 41, 208, 208)); 
+    color_map_segmentation.push_back(QColor( 255, 146, 51)); 
+    color_map_segmentation.push_back(QColor( 255, 238, 51)); 
+    color_map_segmentation.push_back(QColor( 233, 222, 187)); 
+    color_map_segmentation.push_back(QColor( 255, 205, 243)); 
+    
+}
+
+void Polyhedron_demo_mesh_segmentation_plugin::itemAboutToBeDestroyed(CGAL::Three::Scene_item* scene_item)
+{
+    if(Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene_item)) {
+      item_sdf_map.erase(item);
+    }
+}
+
+void Polyhedron_demo_mesh_segmentation_plugin::on_actionSegmentation_triggered()
+{ dock_widget->show(); }
+
+void Polyhedron_demo_mesh_segmentation_plugin::on_SDF_button_clicked()
+{
+    CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+    Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(!item) { return; }
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    std::size_t number_of_rays = ui_widget.Number_of_rays_spin_box->value();
+    double cone_angle = (ui_widget.Cone_angle_spin_box->value()  / 180.0) * CGAL_PI;
+    bool create_new_item = ui_widget.New_item_check_box->isChecked();
+    
+    Item_sdf_map::iterator pair;
+    Scene_polyhedron_item* active_item = item;
+
+    if(create_new_item) {
+        active_item = new Scene_polyhedron_item(*item->polyhedron()); 
+        active_item->setGouraudMode();
+    }
+    
+    pair = item_sdf_map.insert(
+            std::make_pair(active_item, std::vector<double>()) ).first; 
+    
+    check_and_set_ids(pair->first->polyhedron());
+    pair->second.resize(item->polyhedron()->size_of_facets(), 0.0);
+    Polyhedron_with_id_to_vector_property_map<Polyhedron, double>  sdf_pmap(&pair->second);
+    QTime time;
+    time.start();
+    std::pair<double, double> min_max_sdf = sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays);
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+
+    std::cout << "SDF computation is completed. Min-SDF : " << min_max_sdf.first << " " "Max-SDF : " << min_max_sdf.second << std::endl;
+
+    pair->first->set_color_vector_read_only(true);
+    colorize_sdf(pair->first, sdf_pmap, pair->first->color_vector());
+       
+    pair->first->setName(tr("(SDF-%1-%2)").arg(number_of_rays).arg(ui_widget.Cone_angle_spin_box->value()));
+    
+    if(create_new_item) {
+        scene->addItem(pair->first);
+        item->setVisible(false);
+        scene->itemChanged(item);
+        scene->itemChanged(pair->first);
+        scene->setSelectedItem(index);
+    }
+    else {
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(index);
+    }
+
+    QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mesh_segmentation_plugin::on_Partition_button_clicked()
+{    
+    CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+    Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+    if(!item) { return; }
+    
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    
+    std::size_t number_of_clusters = ui_widget.Number_of_clusters_spin_box->value();
+    double smoothness = ui_widget.Smoothness_spin_box->value();
+    std::size_t number_of_rays = ui_widget.Number_of_rays_spin_box->value();
+    double cone_angle = (ui_widget.Cone_angle_spin_box->value()  / 180.0) * CGAL_PI;
+    bool create_new_item = ui_widget.New_item_check_box->isChecked();
+    bool extract_segments = ui_widget.Extract_segments_check_box->isChecked();
+
+    Item_sdf_map::iterator pair;
+    if(create_new_item)
+    {
+        // create new item
+        Scene_polyhedron_item* new_item = new Scene_polyhedron_item(*item->polyhedron()); 
+        new_item->setGouraudMode(); 
+        
+        // copy SDF values of existing poly to new poly
+        Item_sdf_map::iterator it = item_sdf_map.find(item);
+        const std::vector<double>& sdf_data = it == item_sdf_map.end() ?
+                                              std::vector<double>() : it->second;
+        pair = item_sdf_map.insert(std::make_pair(new_item, sdf_data) ).first;
+    }
+    else
+    {
+        std::pair<Item_sdf_map::iterator, bool> res = 
+          item_sdf_map.insert(std::make_pair(item, std::vector<double>()) );
+        pair = res.first;
+    }
+
+    check_and_set_ids(pair->first->polyhedron());
+    QTime time;
+    time.start();
+    if(pair->second.empty()) { // SDF values are empty, calculate
+      pair->second.resize(pair->first->polyhedron()->size_of_facets(), 0.0);
+      Polyhedron_with_id_to_vector_property_map<Polyhedron, double> sdf_pmap(&pair->second);
+      sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays); 
+    }
+
+    std::vector<std::size_t> internal_segment_map(pair->first->polyhedron()->size_of_facets());
+    Polyhedron_with_id_to_vector_property_map<Polyhedron, std::size_t> segment_pmap(&internal_segment_map);
+    Polyhedron_with_id_to_vector_property_map<Polyhedron, double> sdf_pmap(&pair->second);
+
+    std::size_t nb_segments = segmentation_from_sdf_values(*(pair->first->polyhedron())
+        ,sdf_pmap, segment_pmap, number_of_clusters, smoothness, extract_segments); 
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+    std::cout << "Segmentation is completed. Number of segments : " << nb_segments << std::endl;  
+    pair->first->set_color_vector_read_only(true);  
+     
+    colorize_segmentation(pair->first, segment_pmap, pair->first->color_vector());
+    pair->first->setName(tr("(Segmentation-%1-%2)").arg(number_of_clusters).arg(smoothness));   
+
+    if(create_new_item) {
+        scene->addItem(pair->first);
+        item->setVisible(false);
+        scene->itemChanged(item);
+        scene->itemChanged(pair->first);
+        scene->setSelectedItem(index);
+    }
+    else {
+      item->invalidateOpenGLBuffers();
+      scene->itemChanged(index);
+    }
+
+    QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_mesh_segmentation_plugin::check_and_set_ids(Polyhedron* polyhedron)
+{
+    Polyhedron::Facet_iterator a_facet = polyhedron->facets_begin();
+    Polyhedron::Facet_iterator another_facet = ++polyhedron->facets_begin();
+    if(a_facet->id() != another_facet->id()) { return; } // ids are OK
+    std::size_t facet_id = 0;
+    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin();
+        facet_it != polyhedron->facets_end(); ++facet_it, ++facet_id)
+    {
+        facet_it->id() = facet_id;
+    }
+}
+
+template<class SDFPropertyMap>
+void Polyhedron_demo_mesh_segmentation_plugin::colorize_sdf(
+     Scene_polyhedron_item* item,
+     SDFPropertyMap sdf_values,  
+     std::vector<QColor>& color_vector)
+{
+    item->setItemIsMulticolor(true);
+    Polyhedron* polyhedron = item->polyhedron();
+    color_vector.clear();
+    std::size_t patch_id = 0;
+    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin(); 
+        facet_it != polyhedron->facets_end(); ++facet_it, ++patch_id)   
+    {
+        double sdf_value = sdf_values[facet_it]; 
+        int gray_color = static_cast<int>(255 * sdf_value);
+        if(gray_color < 0 || gray_color >= 256) {
+          color_vector.push_back(QColor::fromRgb(0,0,0));
+        }
+        else {
+          color_vector.push_back(color_map_sdf[gray_color]);
+        }
+        facet_it->set_patch_id(static_cast<int>(patch_id));
+    }
+}
+
+template<class SegmentPropertyMap>
+void Polyhedron_demo_mesh_segmentation_plugin::colorize_segmentation(
+     Scene_polyhedron_item* item,
+     SegmentPropertyMap segment_ids,
+     std::vector<QColor>& color_vector)
+{
+    item->setItemIsMulticolor(true);
+    Polyhedron* polyhedron = item->polyhedron();
+    color_vector.clear();
+    std::size_t max_segment = 0;
+    for(Polyhedron::Facet_iterator facet_it = polyhedron->facets_begin(); 
+        facet_it != polyhedron->facets_end(); ++facet_it)   
+    {
+        std::size_t segment_id = segment_ids[facet_it];
+        facet_it->set_patch_id(static_cast<int>(segment_id));
+        max_segment = (std::max)(max_segment, segment_id);      
+    }
+    for(std::size_t i = 0; i <= max_segment; ++i)   
+    {
+        QColor aColor = color_map_segmentation[(max_segment - i) % color_map_segmentation.size()]; 
+        color_vector.push_back(aColor);     
+    }    
+}
+
+#include "Mesh_segmentation_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Mesh_segmentation_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Mesh_segmentation_widget.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp
new file mode 100644
index 0000000..a29c92e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp
@@ -0,0 +1,97 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+
+#include <QApplication>
+#include <QMainWindow>
+#include <QInputDialog>
+#include <QTime>
+#include <QAction>
+
+#include <CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h>
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+using namespace CGAL::Three;
+class Polyhedron_demo_mesh_simplification_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionSimplify";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionSimplify"] = getActionFromMainWindow(mw, "actionSimplify");
+      actions_map["actionSimplify"]->setProperty("subMenuName",
+                                                 "Triangulated Surface Mesh Simplification");
+      autoConnectActions();
+
+  }
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+public Q_SLOTS:
+  void on_actionSimplify_triggered();
+
+}; // end Polyhedron_demo_mesh_simplification_plugin
+
+void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  
+  Scene_polyhedron_item* item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    // get option (#edges)
+    bool ok;
+  
+    const int nb_edges = 
+    QInputDialog::getInt(mw, tr("Stop condition"),
+      tr("Number of edges:"),
+      (int)(pMesh->size_of_halfedges () / 4), // default value: current #edges / 2 
+      3, // min = one triangle
+      (int)pMesh->size_of_halfedges(), // max #edges
+      1, // step for the spinbox
+      &ok);
+
+    // check user cancellation
+    if(!ok)
+      return;
+
+    // simplify
+    QTime time;
+    time.start();
+    std::cout << "Simplify...";
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+    namespace SMS = CGAL::Surface_mesh_simplification;
+    SMS::Count_stop_predicate< Polyhedron > stop(nb_edges); // target #edges
+    SMS::edge_collapse( *pMesh, stop,
+                        CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index,*pMesh))
+                                         .halfedge_index_map(get(CGAL::halfedge_external_index,*pMesh)));
+    std::cout << "ok (" << time.elapsed() << " ms, " 
+      << pMesh->size_of_halfedges() / 2 << " edges)" << std::endl;
+
+    // update scene
+    item->invalidateOpenGLBuffers();
+    scene->itemChanged(index);
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Mesh_simplification_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp
new file mode 100644
index 0000000..8ff7ee9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp
@@ -0,0 +1,2 @@
+#include "Mesher_base.h"
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h
new file mode 100644
index 0000000..1df19ad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h
@@ -0,0 +1,27 @@
+#ifndef _MESHER_BASE_H
+#define _MESHER_BASE_H
+
+#include <QObject>
+#include <iostream>
+
+// A base non-templated class, to allow 
+class Mesher_base : public QObject {
+  Q_OBJECT
+protected:
+  bool is_stopped;
+public:
+  Mesher_base(QObject* parent) : QObject(parent) {
+    is_stopped = true;
+  };
+  virtual ~Mesher_base() {}
+public Q_SLOTS:
+  virtual void mesh() = 0;
+  virtual void one_step() = 0;
+
+  void stop() {
+    std::cerr << "STOP!\n";
+    is_stopped = true;
+  }
+};
+
+#endif // _MESHER_BASE_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp
new file mode 100644
index 0000000..1ed5b64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp
@@ -0,0 +1,193 @@
+#include <QApplication>
+#include <QAction>
+#include <QMainWindow>
+#include <QStringList>
+
+#include "Scene_polyhedron_item.h"
+#include "Scene_textured_polyhedron_item.h"
+#include "Textured_polyhedron_type.h"
+#include "Polyhedron_type.h"
+
+#include <QTime>
+
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Discrete_conformal_map_parameterizer_3.h>
+#include <CGAL/LSCM_parameterizer_3.h>
+#include <CGAL/Two_vertices_parameterizer_3.h>
+
+#include <CGAL/Textured_polyhedron_builder.h>
+
+#include <iostream>
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+typedef Kernel::FT FT;
+using namespace CGAL::Three;
+class Polyhedron_demo_parameterization_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  // used by Polyhedron_demo_plugin_helper
+  QStringList actionsNames() const {
+    return QStringList() << "actionMVC"
+                         << "actionDCP"
+                         << "actionLSC";
+  }
+
+  void init(QMainWindow* mainWindow,
+            Scene_interface* scene_interface)
+  {
+      mw = mainWindow;
+      scene = scene_interface;
+      actions_map["actionMVC"] = new QAction("Mean Value Coordinates", mw);
+      actions_map["actionMVC"]->setProperty("subMenuName",
+        "Triangulated Surface Mesh Parameterization");
+
+      actions_map["actionDCP"] = new QAction ("Discrete Conformal Map", mw);
+      actions_map["actionDCP"]->setProperty("subMenuName",
+        "Triangulated Surface Mesh Parameterization");
+
+      actions_map["actionLSC"] = new QAction("Least Square Conformal Map", mw);
+      actions_map["actionLSC"]->setProperty("subMenuName",
+        "Triangulated Surface Mesh Parameterization");
+
+      connect(actions_map["actionMVC"], SIGNAL(triggered()),
+              this, SLOT(on_actionMVC_triggered()));
+      connect(actions_map["actionDCP"], SIGNAL(triggered()),
+              this, SLOT(on_actionDCP_triggered()));
+      connect(actions_map["actionLSC"], SIGNAL(triggered()),
+              this, SLOT(on_actionLSC_triggered()));
+  }
+
+  bool applicable(QAction*) const { 
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+public Q_SLOTS:
+  void on_actionMVC_triggered();
+  void on_actionDCP_triggered();
+  void on_actionLSC_triggered();
+
+protected:
+  enum Parameterization_method { PARAM_MVC, PARAM_DCP, PARAM_LSC };
+  void parameterize(Parameterization_method method);
+}; // end Polyhedron_demo_parameterization_plugin
+
+
+
+void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterization_method method)
+{
+  // get active polyhedron
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+  Scene_polyhedron_item* poly_item = 
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+  if(!poly_item)
+    return;
+
+  Polyhedron* pMesh = poly_item->polyhedron();
+  if(!pMesh)
+    return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  // parameterize
+  QTime time;
+  time.start();
+  typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron> Adaptor;
+  Adaptor adaptor(*pMesh);  
+
+  bool success = false;
+  switch(method)
+  {
+  case PARAM_MVC:
+    {
+      std::cout << "Parameterize (MVC)...";
+      typedef CGAL::Mean_value_coordinates_parameterizer_3<Adaptor> Parameterizer;
+      Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
+      success = err == Parameterizer::OK;
+      break;
+    }
+  case PARAM_DCP:
+    {
+      std::cout << "Parameterize (DCP)...";
+      typedef CGAL::Discrete_conformal_map_parameterizer_3<Adaptor> Parameterizer;
+      Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
+      success = err == Parameterizer::OK;
+    }  
+  case PARAM_LSC:
+    {
+      std::cout << "Parameterize (LSC)...";
+      typedef CGAL::LSCM_parameterizer_3<Adaptor> Parameterizer;
+      Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
+      success = err == Parameterizer::OK;
+    }
+  }
+
+  if(success)
+    std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+  else
+  {
+    std::cout << "failure" << std::endl;
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+
+  // add textured polyhedon to the scene
+  Textured_polyhedron *pTex_polyhedron = new Textured_polyhedron();
+  Textured_polyhedron_builder<Polyhedron,Textured_polyhedron,Kernel> builder;
+  builder.run(*pMesh,*pTex_polyhedron);
+  pTex_polyhedron->compute_normals();
+
+  Polyhedron::Vertex_iterator it1;
+  Textured_polyhedron::Vertex_iterator it2;
+  for(it1 = pMesh->vertices_begin(), 
+    it2 = pTex_polyhedron->vertices_begin();
+    it1 != pMesh->vertices_end() &&
+    it2 != pTex_polyhedron->vertices_end();
+  it1++, it2++)
+  {
+    // (u,v) pair is stored per halfedge
+    FT u = adaptor.info(it1->halfedge())->uv().x();
+    FT v = adaptor.info(it1->halfedge())->uv().y();
+    it2->u() = u;
+    it2->v() = v;
+  }
+
+  Scene_item* new_item = new Scene_textured_polyhedron_item(pTex_polyhedron);
+
+  new_item->setName(tr("%1 (parameterized)").arg(poly_item->name()));
+  new_item->setColor(Qt::white);
+  new_item->setRenderingMode(poly_item->renderingMode());
+
+  poly_item->setVisible(false);
+  scene->itemChanged(index);
+  scene->addItem(new_item);
+
+  QApplication::restoreOverrideCursor();
+}
+
+void Polyhedron_demo_parameterization_plugin::on_actionMVC_triggered()
+{
+  parameterize(PARAM_MVC);
+}
+
+void Polyhedron_demo_parameterization_plugin::on_actionDCP_triggered()
+{
+  std::cerr << "DCP...";
+  parameterize(PARAM_DCP);
+}
+
+void Polyhedron_demo_parameterization_plugin::on_actionLSC_triggered()
+{
+  std::cerr << "LSC...";
+  parameterize(PARAM_LSC);
+}
+
+#include "Parameterization_plugin.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Remeshing_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Remeshing_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp
new file mode 100644
index 0000000..5be2a2c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp
@@ -0,0 +1,142 @@
+#include "config.h"
+#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include "ui_Remeshing_dialog.h"
+
+#include <QObject>
+#include <QAction>
+#include <QMainWindow>
+#include <QMenu>
+#include <QApplication>
+#include <QtPlugin>
+#include "Scene_polyhedron_item.h"
+#include <QInputDialog>
+#include <QStringList>
+
+// declare the CGAL function
+CGAL::Three::Scene_item* cgal_code_remesh(QWidget* parent,
+                             Polyhedron*,
+                             const double angle,
+                             const double sizing,
+                             const double approx,
+                             int tag);
+using namespace CGAL::Three;
+class Polyhedron_demo_remeshing_plugin : 
+  public QObject,
+  protected Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface) {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    actionRemeshing = this->getActionFromMainWindow(mw, "actionRemeshing");
+    actionRemeshing->setProperty("subMenuName", "3D Surface Mesh Generation");
+    if(actionRemeshing) {
+      connect(actionRemeshing, SIGNAL(triggered()),
+              this, SLOT(remesh()));
+    }
+  }
+
+  bool applicable(QAction*) const {
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  QList<QAction*> actions() const {
+    return QList<QAction*>() << actionRemeshing;
+  }
+public Q_SLOTS:
+  void remesh();
+
+private:
+  QAction* actionRemeshing;
+}; // end class Polyhedron_demo_remeshing_plugin
+
+void Polyhedron_demo_remeshing_plugin::remesh()
+{
+  const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
+
+  Scene_polyhedron_item* item =
+    qobject_cast<Scene_polyhedron_item*>(scene->item(index));
+
+  if(item)
+  {
+    Polyhedron* pMesh = item->polyhedron();
+
+    if(!pMesh) return;
+
+    // TODO:
+    // sizing and approximation parameters should be expressed as ratio of
+    // scene bbox diagonal.
+
+    QDialog dialog(mw);
+    Ui::Remeshing_dialog ui;
+    ui.setupUi(&dialog);
+    connect(ui.buttonBox, SIGNAL(accepted()),
+            &dialog, SLOT(accept()));
+    connect(ui.buttonBox, SIGNAL(rejected()),
+            &dialog, SLOT(reject()));
+    double diag = scene->len_diagonal();
+
+    ui.sizing->setDecimals(4);
+    ui.sizing->setRange(diag * 10e-6, // min
+                       diag); // max
+    ui.sizing->setValue(diag * 0.05); // default value
+
+    ui.approx->setDecimals(6);
+    ui.approx->setRange(diag * 10e-7, // min
+                       diag); // max
+    ui.approx->setValue(diag * 0.005);
+
+
+    int i = dialog.exec();
+    if(i == QDialog::Rejected)
+      return;
+
+    const double angle = ui.angle->value();
+    const double approx = ui.approx->value();
+    const double sizing = ui.sizing->value();
+    const int tag_index = ui.tags->currentIndex();
+    if(tag_index < 0) return;
+
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    std::cerr << "remesh with:"
+              << "\n  angle=" << angle
+              << "\n  sizing=" << sizing
+              << "\n  approx=" << approx
+              << "\n  tag=" << tag_index
+              << std::boolalpha
+              << std::endl;
+    CGAL::Three::Scene_item* new_item = cgal_code_remesh(mw,
+                                            pMesh,
+                                            angle,
+                                            sizing,
+                                            approx,
+                                            tag_index);
+
+    if(new_item)
+    {
+      new_item->setName(tr("%1 remeshed (%2 %3 %4)")
+                         .arg(item->name())
+                         .arg(angle)
+                         .arg(sizing)
+                         .arg(approx));
+      new_item->setColor(Qt::magenta);
+      new_item->setRenderingMode(item->renderingMode());
+      item->setVisible(false);
+      scene->itemChanged(index);
+      scene->addItem(new_item);
+    }
+
+    QApplication::restoreOverrideCursor();
+  }
+}
+
+#include "Remeshing_plugin.moc"
+
+#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp
new file mode 100644
index 0000000..9cc1983
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp
@@ -0,0 +1,366 @@
+#include <CGAL/AABB_polyhedral_oracle.h>
+#include <CGAL/AABB_tree.h>
+
+#include "Polyhedron_type.h"
+#include  <CGAL/Three/Scene_item.h>
+#include <qgl.h>
+#include "Scene_polyhedron_item.h"
+#include "Scene_polygon_soup_item.h"
+
+#include <CGAL/Simple_cartesian.h>
+
+#include "C2t3_type.h"
+#include "Scene_c2t3_item.h"
+
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Surface_mesh_default_criteria_3.h>
+#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
+
+#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
+#include <CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h>
+
+#include <CGAL/Timer.h>
+
+#include <CGAL/assertions_behaviour.h>
+#include <CGAL/exceptions.h>
+
+#include <algorithm>
+#include <sstream>
+
+#include <CGAL/array.h>
+
+#include <QtCore/qglobal.h>
+#include <CGAL/gl.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QApplication>
+#include <QThread>
+#include <QMessageBox>
+
+template <class Tr>
+class Surface_mesh_modified_criteria_3
+{
+public:
+  typedef Tr Triangulation;
+  typedef typename Tr::Geom_traits::FT FT;
+
+  typedef typename CGAL::array<FT, 3> Quality;
+  typedef typename Tr::Facet Facet;
+  const FT sq_distance_bound;
+
+  Surface_mesh_modified_criteria_3(const FT angle_bound,
+                                   const FT radius_bound,
+                                   const FT distance_bound)
+    : sq_distance_bound(distance_bound*distance_bound/100),
+      curvature_size_criterion(distance_bound),
+      uniform_size_criterion(radius_bound),
+      aspect_ratio_criterion(angle_bound)
+
+  {
+  }
+
+  bool is_bad (const Facet& f, Quality& q) const
+  {
+    const typename Tr::Point& pa = f.first->vertex((f.second+1)%4)->point();
+    const typename Tr::Point& pb = f.first->vertex((f.second+2)%4)->point();
+    const typename Tr::Point& pc = f.first->vertex((f.second+3)%4)->point();
+    if( squared_distance(pa, pb) < sq_distance_bound )
+      return false;
+    if( squared_distance(pc, pb) < sq_distance_bound )
+      return false;
+    if( squared_distance(pa, pc) < sq_distance_bound )
+      return false;
+    if(aspect_ratio_criterion.is_bad(f, q[0]))
+      return true;
+    else {
+      q[0] = 1;
+      if(uniform_size_criterion.is_bad(f, q[1]))
+        return true;
+      else {
+        q[1] = 1;
+        if(curvature_size_criterion.is_bad(f, q[2]))
+          return true;
+      }
+    }
+    return false;
+  }
+private:
+  CGAL::Surface_mesher::Curvature_size_criterion<Tr> curvature_size_criterion;
+  // bound on Hausdorff distance does not play any role if bigger than
+  // the square of the Uniform_size_criterion
+
+  CGAL::Surface_mesher::Uniform_size_criterion<Tr> uniform_size_criterion;
+  // bound on radii of surface Delaunay balls
+
+  CGAL::Surface_mesher::Aspect_ratio_criterion<Tr> aspect_ratio_criterion;
+  // lower bound on minimum angle in degrees
+
+}; // end class Surface_mesh_default_criteria_3
+
+
+//
+// Types for meshing
+//
+typedef CGAL::Simple_cartesian<double> Simple_cartesian_kernel;
+// input surface
+// typedef CGAL::Mesh_3::Robust_intersection_traits_3<Kernel> IGT;
+typedef CGAL::AABB_polyhedral_oracle<Polyhedron,Kernel,Simple_cartesian_kernel> Input_surface;
+
+#include "Mesher_base.h"
+
+// Class template, refines Mesher_base
+// That allows to create meshers with different criteria or manifold tag,
+// and thread them with the API of Mesher_base (mesh/one_step/stop).
+template <typename Criteria, typename Manifold_tag>
+class Mesher : public Mesher_base
+{
+  typedef typename CGAL::Surface_mesher_generator<
+    C2t3,
+    Input_surface,
+    Criteria,
+    Manifold_tag,
+    CGAL_SURFACE_MESHER_VERBOSITY >::type MyMesher;
+
+  MyMesher mesher;
+  const C2t3& c2t3;
+  const Input_surface& surface;
+  CGAL::Null_mesh_visitor visitor;
+public:
+  Mesher(QObject* parent,
+         C2t3& c2t3,
+         const Input_surface& surface,
+         const Criteria& criteria)
+    : Mesher_base(parent),
+      mesher(c2t3, surface, surface, criteria),
+      c2t3(c2t3),
+      surface(surface)
+  {
+    typename Input_surface::Construct_initial_points get_initial_points =
+      surface.construct_initial_points_object();
+
+    get_initial_points(surface,
+                       CGAL::inserter(c2t3.triangulation()),
+                       20);
+    mesher.init();
+  }
+
+  void mesh()
+  {
+    int global_nbsteps = 0;
+    int nbsteps = 0;
+    CGAL::Timer timer;
+    timer.start();
+    is_stopped = false;
+
+    std::cerr << "Legende of the following line: "
+              << "(#vertices,#steps," << mesher.debug_info_header()
+              << ")\n";
+
+    while(!is_stopped && !mesher.is_algorithm_done())
+    {
+      one_step();
+      ++nbsteps;
+      ++global_nbsteps;
+      if(timer.time() > 1)
+      {
+        std::cerr
+      << boost::format("\r             \r"
+               "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
+      % c2t3.triangulation().number_of_vertices()
+      % global_nbsteps % mesher.debug_info()
+      % (nbsteps / timer.time());
+        qApp->processEvents();
+        nbsteps = 0;
+        timer.reset();
+      }
+    }
+  }
+
+  void one_step()
+  {
+    mesher.one_step(visitor);
+  }
+};
+
+// That thread takes a Mesher_base* as parent. It just launches the meshing
+// process.
+struct Meshing_thread : QThread
+{
+  Mesher_base* mesher;
+
+  Meshing_thread(Mesher_base* parent)
+    : QThread(parent), mesher(parent)
+  {
+  }
+
+  void run() {
+    mesher->mesh();
+    mesher->moveToThread(QApplication::instance()->thread());
+  }
+};
+
+typedef Tr::Geom_traits GT;
+typedef Tr::Geom_traits::FT FT;
+
+CGAL::Three::Scene_item* cgal_code_remesh(QWidget* parent,
+                             Polyhedron* pMesh,
+                             const double angle,
+                             const double sizing,
+                             const double approx,
+                             int tag) {
+// };
+
+// class Mesh_process : public QObject {
+//   Q_OBJECT
+
+//   QWidget* parent;
+//   Polyhedron* pMesh;
+//   const double angle;
+//   const double sizing;
+//   const double approx;
+//   int tag;
+
+// public:
+//   Mesh_process(QWidget* parent,
+//                Polyhedron* pMesh,
+//                const double angle,
+//                const double sizing,
+//                const double approx,
+//                int tag)
+//     : parent(parent),
+//       pMesh(pMesh),
+//       angle(angle),
+//       sizing(sizing),
+//       approx(approx)
+//       tag(tag)
+//   {
+//   }
+
+//   Scene_item* launch()
+
+  if(!pMesh) return 0;
+
+  CGAL::set_error_behaviour(CGAL::ABORT);
+  // remesh
+
+
+  Tr& triangulation = * new Tr;; // 3D-Delaunay triangulation
+  C2t3& c2t3 = *(new C2t3(triangulation));
+  // C2t3 c2t3(triangulation); // 2D-complex in 3D-Delaunay triangulation
+
+  // meshing parameters
+  typedef Surface_mesh_modified_criteria_3<Tr> Criteria;
+  const Criteria facets_criteria(angle,sizing,approx);
+
+  // const Criteria new_facets_criteria(facets_criteria);
+
+  // AABB tree
+  CGAL::Timer timer;
+  timer.start();
+  std::cerr << "Build AABB tree...";
+  Input_surface input(*pMesh);
+  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
+
+  // initial point set
+  timer.reset();
+  std::cerr << "Insert initial point set... ";
+
+  { // new scope for the initialization, so that the vector
+    // polyhedron_points is destroyed as soon as the initialization is
+    // finished
+    typedef Kernel::Point_3 Point;
+
+    std::vector<Point> polyhedron_points;
+    polyhedron_points.reserve(pMesh->size_of_vertices());
+    std::copy(pMesh->points_begin(), pMesh->points_end(),
+              std::back_inserter(polyhedron_points));
+
+    typedef std::vector<Point>::size_type size_type;
+    size_type nb_initial_points = 10;
+    nb_initial_points = (std::min)(nb_initial_points, polyhedron_points.size());
+    for(size_type n = 0;
+        n < nb_initial_points || (n < 10 * nb_initial_points &&
+                                  triangulation.dimension() < 3 );
+        n = triangulation.number_of_vertices())
+    {
+      const int pos = CGAL::get_default_random().get_int(0, (int)polyhedron_points.size());
+      triangulation.insert(polyhedron_points[pos]);
+    }
+  }
+  if(triangulation.dimension() < 3)
+    return 0;
+
+  std::cerr << "done (" << timer.time() << " ms)" << std::endl;
+
+  // return new Scene_c2t3_item(c2t3);
+  // remesh
+  timer.reset();
+  Mesher_base* mesher;
+  std::cerr << "Remesh...";
+  QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon,
+                                            "Remeshing...",
+                                            "Meshing process is running...",
+                                            QMessageBox::Cancel,
+                                            parent);
+  switch(tag) {
+  case 0:
+    mesher = new Mesher<Criteria,
+      CGAL::Non_manifold_tag>(0, c2t3, input, facets_criteria);
+        ;
+    break;
+  case 1:
+    mesher = new Mesher<Criteria,
+      CGAL::Manifold_tag>(0, c2t3, input, facets_criteria);
+    break;
+  default:
+    mesher = new Mesher<Criteria,
+      CGAL::Manifold_with_boundary_tag>(0, c2t3, input, facets_criteria);
+  }
+  QObject::connect(message_box, SIGNAL(buttonClicked( QAbstractButton *)),
+                   mesher, SLOT(stop()));
+  message_box->show();
+  qApp->processEvents();
+
+
+  Meshing_thread* thread = new Meshing_thread(mesher);
+  mesher->moveToThread(thread);
+  thread->start();
+  while(!thread->isFinished())
+  {
+    qApp->processEvents();
+    thread->wait(200);
+  }
+  delete message_box;
+  delete mesher;
+  std::cerr << "done (" << timer.time() << " ms, " << triangulation.number_of_vertices() << " vertices)" << std::endl;
+
+  if(triangulation.number_of_vertices() > 0)
+  {
+    // add remesh as new polyhedron
+    Polyhedron *pRemesh = new Polyhedron;
+    CGAL::Complex_2_in_triangulation_3_polyhedron_builder<C2t3, Polyhedron> builder(c2t3);
+    pRemesh->delegate(builder);
+    if(c2t3.number_of_facets() != pRemesh->size_of_facets())
+    {
+      delete pRemesh;
+      std::stringstream temp_file;
+      if(!CGAL::output_surface_facets_to_off(temp_file, c2t3))
+      {
+        std::cerr << "Cannot write the mesh to an off file!\n";
+        return 0;
+      }
+      Scene_polygon_soup_item* soup = new Scene_polygon_soup_item();
+      if(!soup->load(temp_file))
+      {
+        std::cerr << "Cannot reload the mesh from an off file!\n";
+        return 0;
+      }
+      else
+        return soup;
+    } else {
+      return new Scene_polyhedron_item(pRemesh);
+    }
+  }
+  else
+    return 0;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp
new file mode 100644
index 0000000..b52c54c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp
@@ -0,0 +1,531 @@
+#include "Scene_polyhedron_shortest_path_item.h"
+
+#include "Scene_polylines_item.h"
+
+#include <vector>
+#include <Qt>
+#include <QKeySequence>
+#include <fstream>
+
+#include <CGAL/Surface_mesh_shortest_path/function_objects.h>
+
+Scene_polyhedron_shortest_path_item::Scene_polyhedron_shortest_path_item()
+   :Scene_polyhedron_item_decorator(NULL, false)
+  , m_shortestPaths(NULL)
+  , m_isTreeCached(false)
+  , m_shiftHeld(false)
+{
+}
+
+Scene_polyhedron_shortest_path_item::Scene_polyhedron_shortest_path_item(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow)
+  :Scene_polyhedron_item_decorator(polyhedronItem, false)
+  , m_shortestPaths(NULL)
+  , m_isTreeCached(false)
+  , m_shiftHeld(false)
+{ 
+  initialize(polyhedronItem, sceneInterface, messages, mainWindow);
+}
+  
+Scene_polyhedron_shortest_path_item::~Scene_polyhedron_shortest_path_item()
+{
+  deinitialize();
+}
+
+void Scene_polyhedron_shortest_path_item::compute_elements() const
+{
+
+    vertices.resize(0);
+
+    for(Surface_mesh_shortest_path::Source_point_iterator it = m_shortestPaths->source_points_begin(); it != m_shortestPaths->source_points_end(); ++it)
+    {
+      const Point_3& p = m_shortestPaths->point(it->first, it->second);
+      vertices.push_back(p.x());
+      vertices.push_back(p.y());
+      vertices.push_back(p.z());
+    }
+
+
+
+}
+
+void Scene_polyhedron_shortest_path_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer)const
+{
+    //vao containing the data for the selected lines
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        vaos[Selected_Edges]->bind();
+        program->bind();
+        buffers[Vertices].bind();
+        buffers[Vertices].allocate(vertices.data(), vertices.size()*sizeof(float));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[Vertices].release();
+        vaos[Selected_Edges]->release();
+    }
+    are_buffers_filled = true;
+}
+bool Scene_polyhedron_shortest_path_item::supportsRenderingMode(RenderingMode m) const
+{
+  switch (m)
+  {
+  case Points:
+    return true;
+  case PointsPlusNormals:
+    return true;
+  case Wireframe:
+    return true;
+  case Flat:
+    return true;
+  case FlatPlusEdges:
+    return true;
+  case Gouraud:
+    return true;
+  default:
+    return true;
+  }
+}
+  
+void Scene_polyhedron_shortest_path_item::draw(CGAL::Three::Viewer_interface* viewer) const
+{
+    if (supportsRenderingMode(renderingMode()))
+    {
+      draw_points(viewer);
+    }
+}
+
+
+void Scene_polyhedron_shortest_path_item::draw_points(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        initialize_buffers(viewer);
+    }
+   glPointSize(4.0f);
+   program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+   attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+   vaos[Selected_Edges]->bind();
+   program->bind();
+   program->setAttributeValue("colors", QColor(Qt::green));
+   viewer->glDrawArrays(GL_POINTS, 0, vertices.size()/3);
+   program->release();
+   vaos[Selected_Edges]->release();
+   glPointSize(1.0f);
+}
+  
+Scene_polyhedron_shortest_path_item* Scene_polyhedron_shortest_path_item::clone() const
+{
+  return 0;
+}
+
+void Scene_polyhedron_shortest_path_item::set_selection_mode(Selection_mode mode)
+{
+  m_selectionMode = mode;
+}
+
+Scene_polyhedron_shortest_path_item::Selection_mode Scene_polyhedron_shortest_path_item::get_selection_mode() const
+{
+  return m_selectionMode;
+}
+
+void Scene_polyhedron_shortest_path_item::set_primitives_mode(Primitives_mode mode)
+{
+  m_primitivesMode = mode;
+}
+
+Scene_polyhedron_shortest_path_item::Primitives_mode Scene_polyhedron_shortest_path_item::get_primitives_mode() const
+{
+  return m_primitivesMode;
+}
+
+void Scene_polyhedron_shortest_path_item::recreate_shortest_path_object()
+{
+  if (m_shortestPaths)
+  {
+    delete m_shortestPaths;
+  }
+
+  m_shortestPaths = new Surface_mesh_shortest_path(*polyhedron(), 
+            CGAL::get(boost::vertex_index, *polyhedron()), 
+            CGAL::get(CGAL::halfedge_index, *polyhedron()),
+            CGAL::get(CGAL::face_index, *polyhedron()),
+            CGAL::get(CGAL::vertex_point, *polyhedron()));
+            
+  //m_shortestPaths->m_debugOutput = true;
+
+  m_isTreeCached = false;
+}
+
+void Scene_polyhedron_shortest_path_item::ensure_aabb_object()
+{
+  if (!m_isTreeCached)
+  {
+    m_shortestPaths->build_aabb_tree(m_aabbTree);
+    m_isTreeCached = true;
+  }
+}
+
+void Scene_polyhedron_shortest_path_item::ensure_shortest_paths_tree()
+{
+  if (!m_shortestPaths->changed_since_last_build())
+  {
+    m_messages->information(tr("Recomputing shortest paths tree..."));
+    m_shortestPaths->build_sequence_tree();
+    m_messages->information(tr("Done."));
+  }
+}
+  
+void Scene_polyhedron_shortest_path_item::poly_item_changed()
+{
+  recreate_shortest_path_object();
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+  
+void Scene_polyhedron_shortest_path_item::invalidateOpenGLBuffers()
+{
+  compute_elements();
+  compute_bbox();
+  are_buffers_filled = false;
+
+}
+
+bool Scene_polyhedron_shortest_path_item::get_mouse_ray(QMouseEvent* mouseEvent, Ray_3& outRay)
+{
+  bool found = false;
+  
+  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+  qglviewer::Camera* camera = viewer->camera();
+  const qglviewer::Vec point = camera->pointUnderPixel(mouseEvent->pos(), found);
+  
+  if(found)
+  {
+    const qglviewer::Vec orig = camera->position();
+    outRay = Ray_3(Point_3(orig.x, orig.y, orig.z), Point_3(point.x, point.y, point.z));
+  }
+  
+  return found;
+}
+
+void Scene_polyhedron_shortest_path_item::remove_nearest_point(const Face_location& faceLocation)
+{
+  Surface_mesh_shortest_path_traits::Compute_squared_distance_3 computeSquaredDistance3;
+  
+  const Point_3 pickLocation = m_shortestPaths->point(faceLocation.first, faceLocation.second);
+  
+  Surface_mesh_shortest_path::Source_point_iterator found = m_shortestPaths->source_points_end();
+  FT minDistance(0.0);
+  const FT thresholdDistance = FT(0.4);
+  
+  for (Surface_mesh_shortest_path::Source_point_iterator it = m_shortestPaths->source_points_begin(); it != m_shortestPaths->source_points_end(); ++it)
+  {
+    Point_3 sourceLocation = m_shortestPaths->point(it->first, it->second);
+    FT distance = computeSquaredDistance3(sourceLocation, pickLocation);
+    
+    if ((found == m_shortestPaths->source_points_end() && distance <= thresholdDistance) || distance < minDistance)
+    {
+      found = it;
+      minDistance = distance;
+    }
+  }
+  
+  if (found != m_shortestPaths->source_points_end())
+  {
+    m_shortestPaths->remove_source_point(found);
+  }
+}
+
+void Scene_polyhedron_shortest_path_item::get_as_edge_point(Scene_polyhedron_shortest_path_item::Face_location& inOutLocation)
+{
+  size_t minIndex = 0;
+  FT minCoord(inOutLocation.second[0]);
+  
+  for (size_t i = 1; i < 3; ++i)
+  {
+    if (minCoord > inOutLocation.second[i])
+    {
+      minIndex = i;
+      minCoord = inOutLocation.second[i];
+    }
+  }
+  
+  // The nearest edge is that of the two non-minimal barycentric coordinates
+  size_t nearestEdge[2];
+  size_t current = 0;
+  
+  for (size_t i = 0; i < 3; ++i)
+  {
+    if (i != minIndex)
+    {
+      nearestEdge[current] = i;
+      ++current;
+    }
+  }
+
+  Construct_barycentric_coordinate construct_barycentric_coordinate;
+
+  Point_3 trianglePoints[3] = { 
+    m_shortestPaths->point(inOutLocation.first, construct_barycentric_coordinate(FT(1.0), FT(0.0), FT(0.0))),
+    m_shortestPaths->point(inOutLocation.first, construct_barycentric_coordinate(FT(0.0), FT(1.0), FT(0.0))),
+    m_shortestPaths->point(inOutLocation.first, construct_barycentric_coordinate(FT(0.0), FT(0.0), FT(1.0))),
+  };
+  
+  CGAL::Surface_mesh_shortest_paths_3::Parametric_distance_along_segment_3<Surface_mesh_shortest_path_traits> parametricDistanceSegment3;
+  
+  Point_3 trianglePoint = m_shortestPaths->point(inOutLocation.first, inOutLocation.second);
+  
+  FT distanceAlongSegment = parametricDistanceSegment3(trianglePoints[nearestEdge[0]], trianglePoints[nearestEdge[1]], trianglePoint);
+  
+  FT coords[3] = { FT(0.0), FT(0.0), FT(0.0), };
+  
+  coords[nearestEdge[1]] = distanceAlongSegment;
+  coords[nearestEdge[0]] = FT(1.0) - distanceAlongSegment;
+
+  inOutLocation.second = construct_barycentric_coordinate(coords[0], coords[1], coords[2]);
+}
+
+void Scene_polyhedron_shortest_path_item::get_as_vertex_point(Scene_polyhedron_shortest_path_item::Face_location& inOutLocation)
+{
+  size_t maxIndex = 0;
+  FT maxCoord(inOutLocation.second[0]);
+  
+  for (size_t i = 1; i < 3; ++i)
+  {
+    if (inOutLocation.second[i] > maxCoord)
+    {
+      maxIndex = i;
+      maxCoord = inOutLocation.second[i];
+    }
+  }
+  
+  FT coords[3] = { FT(0.0), FT(0.0), FT(0.0), };
+  coords[maxIndex] = FT(1.0);
+  
+  Construct_barycentric_coordinate construct_barycentric_coordinate;
+  inOutLocation.second = construct_barycentric_coordinate(coords[0], coords[1], coords[2]);
+}
+
+bool Scene_polyhedron_shortest_path_item::run_point_select(const Ray_3& ray)
+{
+  ensure_aabb_object();
+  
+  Face_location faceLocation = m_shortestPaths->locate(ray, m_aabbTree);
+  
+  if (faceLocation.first == GraphTraits::null_face())
+  {
+    m_messages->information(tr("Shortest Paths: No face under cursor."));
+    return false;
+  }
+  else
+  {
+    m_messages->information(tr("Shortest Paths: Selected Face: %1; Barycentric coordinates: %2 %3 %4")
+      .arg(faceLocation.first->id())
+      .arg(double(faceLocation.second[0]))
+      .arg(double(faceLocation.second[1]))
+      .arg(double(faceLocation.second[2])));
+    switch (m_selectionMode)
+    {
+    case INSERT_POINTS_MODE:
+      switch (m_primitivesMode)
+      {
+      case VERTEX_MODE:
+        get_as_vertex_point(faceLocation);
+        m_shortestPaths->add_source_point(faceLocation.first, faceLocation.second);
+        break;
+      case EDGE_MODE:
+        get_as_edge_point(faceLocation);
+        m_shortestPaths->add_source_point(faceLocation.first, faceLocation.second);
+        break;
+      case FACE_MODE:
+        m_shortestPaths->add_source_point(faceLocation.first, faceLocation.second);
+        break;
+      }
+      break;
+    case REMOVE_POINTS_MODE:
+      remove_nearest_point(faceLocation);
+      break;
+    case SHORTEST_PATH_MODE:
+      switch (m_primitivesMode)
+      {
+      case VERTEX_MODE:
+        get_as_vertex_point(faceLocation);
+        break;
+      case EDGE_MODE:
+        get_as_edge_point(faceLocation);
+        break;
+      case FACE_MODE:
+        break;
+      }
+      
+      if (m_shortestPaths->number_of_source_points() > 0)
+      {
+        ensure_shortest_paths_tree();
+        
+        Scene_polylines_item* polylines = new Scene_polylines_item();
+            
+        polylines->polylines.push_back(Scene_polylines_item::Polyline());
+            
+        m_messages->information(tr("Computing shortest path polyline..."));
+
+        QTime time;
+        time.start();
+        //~ m_shortestPaths->m_debugOutput=true;
+        m_shortestPaths->shortest_path_points_to_source_points(faceLocation.first, faceLocation.second, std::back_inserter(polylines->polylines.back()));
+        std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
+        
+        polylines->setName(tr("%1 (shortest path)").arg(polyhedron_item()->name()));
+        polylines->setColor(Qt::red);
+
+        this->m_sceneInterface->addItem(polylines);
+      }
+      else
+      {
+        m_messages->warning(tr("No source points to compute shortest paths from."));
+      }
+      break;
+    }
+    invalidateOpenGLBuffers();
+    return true;
+  }
+}
+
+
+
+bool Scene_polyhedron_shortest_path_item::eventFilter(QObject* /*target*/, QEvent* event)
+{
+  if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)
+  {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+    Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
+    m_shiftHeld = modifiers.testFlag(Qt::ShiftModifier);
+  }
+  
+  if (event->type() == QEvent::MouseButtonPress && m_shiftHeld)
+  {
+    QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
+    if(mouseEvent->button() == Qt::LeftButton) 
+    {
+      Ray_3 mouseRay;
+      
+      if (get_mouse_ray(mouseEvent, mouseRay))
+      {
+        if (run_point_select(mouseRay))
+        {
+          return true;
+        }
+      }
+    }
+  }
+  
+  return false;
+}
+
+bool Scene_polyhedron_shortest_path_item::load(const std::string& file_name)
+{
+  m_deferredLoadFilename = file_name;
+  return true;
+}
+
+bool Scene_polyhedron_shortest_path_item::deferred_load(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow)
+{
+  initialize(polyhedronItem, sceneInterface, messages, mainWindow);
+  
+  std::ifstream inFile(m_deferredLoadFilename.c_str());
+  
+  if (!inFile) 
+  { 
+    return false;
+  }
+  
+  m_shortestPaths->clear();
+  
+  std::vector<face_descriptor> listOfFaces;
+  listOfFaces.reserve(CGAL::num_faces(*polyhedron()));
+  face_iterator current, end;
+  for (boost::tie(current, end) = CGAL::faces(*polyhedron()); current != end; ++current)
+  {
+    listOfFaces.push_back(*current);
+  }
+
+  std::string line;
+  std::size_t faceId;
+  Barycentric_coordinate location;
+  Construct_barycentric_coordinate construct_barycentric_coordinate;
+
+  while (std::getline(inFile, line))
+  {
+    std::istringstream lineStream(line);
+    FT coords[3];
+    lineStream >> faceId >> coords[0] >> coords[1] >> coords[2];
+    
+    location = construct_barycentric_coordinate(coords[0], coords[1], coords[2]);
+    
+    // std::cout << "Read in face: " << faceId << " , " << location << std::endl;
+    
+    m_shortestPaths->add_source_point(listOfFaces[faceId], location);
+  }
+
+  return true;
+}
+
+bool Scene_polyhedron_shortest_path_item::save(const std::string& file_name) const 
+{
+  std::ofstream out(file_name.c_str());
+  
+  if (!out)
+  { 
+    return false; 
+  }
+
+  for(Surface_mesh_shortest_path::Source_point_iterator it = m_shortestPaths->source_points_begin(); it != m_shortestPaths->source_points_end(); ++it) 
+  { 
+    // std::cout << "Output face location: " << it->first->id() << " , " << it->second << std::endl;
+    out << it->first->id() << " " << it->second[0] << " " << it->second[1] << " " << it->second[3] << std::endl;
+  }
+
+  return true;
+}
+
+void Scene_polyhedron_shortest_path_item::initialize(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow)
+{
+  this->m_mainWindow = mainWindow;
+  this->m_messages = messages;
+  this->poly_item = polyhedronItem;
+  this->m_sceneInterface = sceneInterface;
+  connect(polyhedronItem, SIGNAL(item_is_about_to_be_changed()), this, SLOT(poly_item_changed())); 
+  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+  viewer->installEventFilter(this);
+  m_mainWindow->installEventFilter(this);
+  recreate_shortest_path_object();
+}
+
+void Scene_polyhedron_shortest_path_item::deinitialize()
+{
+  if (m_shortestPaths)
+  {
+    delete m_shortestPaths;
+  }
+  
+  this->poly_item = NULL;
+  this->m_sceneInterface = NULL;
+}
+
+bool Scene_polyhedron_shortest_path_item::isFinite() const
+{
+  return true;
+}
+
+bool Scene_polyhedron_shortest_path_item::isEmpty() const 
+{
+  return false;
+}
+
+void Scene_polyhedron_shortest_path_item::compute_bbox() const
+{
+  _bbox = polyhedron_item()->bbox();
+}
+
+QString Scene_polyhedron_shortest_path_item::toolTip() const
+{
+  return QString();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h
new file mode 100644
index 0000000..0bff4db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h
@@ -0,0 +1,159 @@
+#ifndef SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_H
+#define SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_H
+
+#include "Scene_polyhedron_shortest_path_item_config.h"
+#include "Scene_polyhedron_item_decorator.h"
+#include <CGAL/Three/Scene_interface.h>
+#include "Messages_interface.h"
+
+#include "Polyhedron_type.h"
+#include "Kernel_type.h"
+
+#include "opengl_tools.h"
+
+#include <QGLViewer/qglviewer.h>
+#include <QKeyEvent>
+#include <QMouseEvent>
+#include <QMainWindow>
+#include <QObject>
+
+#include <string>
+#include <list>
+
+#ifndef Q_MOC_RUN
+#include <CGAL/Surface_mesh_shortest_path.h>
+#endif
+
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_tree.h>
+
+#include <boost/current_function.hpp>
+
+class SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_EXPORT Scene_polyhedron_shortest_path_item : public Scene_polyhedron_item_decorator
+{
+  Q_OBJECT
+  
+  friend class Polyhedron_demo_shortest_path_plugin;
+  
+public:
+  typedef CGAL::Three::Scene_interface::Bbox Bbox;
+  
+  typedef boost::property_map<Polyhedron, CGAL::vertex_point_t>::type VertexPointMap;
+  
+  typedef boost::graph_traits<Polyhedron> GraphTraits;
+  typedef GraphTraits::face_descriptor face_descriptor;
+  typedef GraphTraits::face_iterator face_iterator;
+  
+  typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron> Surface_mesh_shortest_path_traits;
+  typedef CGAL::Surface_mesh_shortest_path<Surface_mesh_shortest_path_traits> Surface_mesh_shortest_path;
+  typedef Surface_mesh_shortest_path::Face_location Face_location;
+  typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron, VertexPointMap> AABB_face_graph_primitive;
+  typedef CGAL::AABB_traits<Kernel, AABB_face_graph_primitive> AABB_face_graph_traits;
+  typedef CGAL::AABB_tree<AABB_face_graph_traits> AABB_face_graph_tree;
+  
+  typedef Surface_mesh_shortest_path_traits::Barycentric_coordinate Barycentric_coordinate;
+  typedef Surface_mesh_shortest_path_traits::Construct_barycentric_coordinate Construct_barycentric_coordinate;
+  typedef Surface_mesh_shortest_path_traits::Ray_3 Ray_3;
+  typedef Surface_mesh_shortest_path_traits::Point_3 Point_3;
+  typedef Surface_mesh_shortest_path_traits::FT FT;
+  
+  enum Selection_mode
+  {
+    INSERT_POINTS_MODE = 0,
+    REMOVE_POINTS_MODE = 1,
+    SHORTEST_PATH_MODE = 2
+  };
+  
+  enum Primitives_mode
+  {
+    VERTEX_MODE = 0,
+    EDGE_MODE = 1,
+    FACE_MODE = 2
+  };
+  
+  enum VAOs {
+      Selected_Edges=0,
+      NbOfVaos = Selected_Edges+1
+  };
+  enum VBOs {
+      Vertices = 0,
+      NbOfVbos = Vertices+1
+  };
+private:
+  Messages_interface* m_messages;
+  QMainWindow* m_mainWindow;
+  CGAL::Three::Scene_interface* m_sceneInterface;
+  Surface_mesh_shortest_path* m_shortestPaths;
+  AABB_face_graph_tree m_aabbTree;
+  
+  std::string m_deferredLoadFilename;
+  
+  Selection_mode m_selectionMode;
+  Primitives_mode m_primitivesMode;
+
+  bool m_isTreeCached;
+  
+  bool m_shiftHeld;
+  
+private:
+  bool get_mouse_ray(QMouseEvent* mouseEvent, Kernel::Ray_3&);
+
+  void recreate_shortest_path_object();
+  void ensure_aabb_object();
+  void ensure_shortest_paths_tree();
+  
+  bool run_point_select(const Kernel::Ray_3&);
+  void remove_nearest_point(const Face_location& ray);
+  void get_as_edge_point(Face_location& inOutLocation);
+  void get_as_vertex_point(Face_location& inOutLocation);
+
+  mutable std::vector<float> vertices;
+  mutable QOpenGLShaderProgram *program;
+
+  using Scene_polyhedron_item_decorator::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const;
+  void compute_elements(void) const;
+  
+  
+public:
+
+  Scene_polyhedron_shortest_path_item();
+  Scene_polyhedron_shortest_path_item(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow);
+  ~Scene_polyhedron_shortest_path_item();
+  
+  void set_selection_mode(Selection_mode mode);
+  Selection_mode get_selection_mode() const;
+  void set_primitives_mode(Primitives_mode mode);
+  Primitives_mode get_primitives_mode() const;
+  
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+  using Scene_polyhedron_item_decorator::draw;
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+  // Points OpenGL drawing
+  virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+  
+  virtual Scene_polyhedron_shortest_path_item* clone() const;
+  
+  bool deferred_load(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow);
+  virtual bool load(const std::string& file_name);
+  virtual bool save(const std::string& file_name) const;
+  
+protected:
+  void initialize(Scene_polyhedron_item* polyhedronItem, CGAL::Three::Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow);
+  void deinitialize();
+  
+  virtual bool isFinite() const;
+  virtual bool isEmpty() const;
+  virtual void compute_bbox()const;
+  virtual QString toolTip() const;
+  
+protected:
+  bool eventFilter(QObject* /*target*/, QEvent * gen_event);
+  
+public Q_SLOTS:
+  virtual void poly_item_changed();
+  virtual void invalidateOpenGLBuffers();
+};
+
+#endif // SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp
new file mode 100644
index 0000000..e7f94c6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp
@@ -0,0 +1,311 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+
+#include "Messages_interface.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polylines_item.h"
+#include "Scene_polyhedron_selection_item.h"
+#include "Scene_polyhedron_shortest_path_item.h"
+#include "Polyhedron_type.h"
+#include "Scene.h"
+#include "ui_Shortest_path_widget.h"
+
+#include <QApplication>
+#include <QMainWindow>
+#include <QInputDialog>
+#include <QTime>
+#include <QAction>
+#include <QDebug>
+#include <QObject>
+#include <QDockWidget>
+//#include <QtConcurrentRun>
+#include <map>
+#include <algorithm>
+#include <vector>
+using namespace CGAL::Three;
+class Polyhedron_demo_shortest_path_plugin :
+    public QObject,
+    public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+private:
+
+  typedef boost::property_map<Polyhedron, boost::vertex_index_t>::type VertexIndexMap;
+  typedef boost::property_map<Polyhedron, CGAL::halfedge_index_t>::type HalfedgeIndexMap;
+  typedef boost::property_map<Polyhedron, CGAL::face_index_t>::type FaceIndexMap;
+  typedef boost::property_map<Polyhedron, CGAL::vertex_point_t>::type VertexPointMap;
+
+  typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron> Surface_mesh_shortest_path_traits;
+  typedef CGAL::Surface_mesh_shortest_path<Surface_mesh_shortest_path_traits, VertexIndexMap, HalfedgeIndexMap, FaceIndexMap, VertexPointMap> Surface_mesh_shortest_path;
+
+  struct ShortestPathsPointsVisitor
+  {
+    typedef std::vector<Surface_mesh_shortest_path::Point_3> Container;
+    Container& m_container;
+
+    ShortestPathsPointsVisitor(Container& container)
+      : m_container(container)
+    {
+    }
+
+    void point(const Surface_mesh_shortest_path::Point_3& point)
+    {
+      std::cout << point << std::endl;
+      m_container.push_back(point);
+    }
+  };
+
+  typedef std::map<Scene_polyhedron_item*, Scene_polyhedron_shortest_path_item* > Shortest_paths_map;
+
+public:
+
+  QList<QAction*> actions() const
+  {
+      return QList<QAction*>() << actionMakeShortestPaths;
+  }
+
+  bool applicable(QAction*) const
+  {
+    return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
+  }
+
+  using Polyhedron_demo_plugin_helper::init;
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* messages)
+  {
+    this->scene = scene_interface;
+    this->mw = mainWindow;
+    this->m_messages = messages;
+
+    dock_widget = new QDockWidget("Shortest path", mw);
+
+    dock_widget->setVisible(false);
+
+    ui_widget.setupUi(dock_widget);
+    add_dock_widget(dock_widget);
+
+    connect(ui_widget.Selection_type_combo_box, SIGNAL(currentIndexChanged(int)),  this, SLOT(on_Selection_type_combo_box_changed(int)));
+    connect(ui_widget.Primitives_type_combo_box, SIGNAL(currentIndexChanged(int)), this, SLOT(on_Primitives_type_combo_box_changed(int)));
+
+    actionMakeShortestPaths = new QAction("Make Shortest Path", this->mw);
+    actionMakeShortestPaths->setProperty("subMenuName", "Triangulated Surface Mesh Shortest Paths");
+
+    connect(actionMakeShortestPaths, SIGNAL(triggered()), this, SLOT(on_actionMakeShortestPaths_triggered()));
+
+    Scene* trueScene = dynamic_cast<Scene*>(scene_interface);
+    // This is for later
+    if(trueScene) {
+        connect(trueScene, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(item_about_to_be_destroyed(CGAL::Three::Scene_item*)));
+        connect(trueScene, SIGNAL(newItem(int)), this, SLOT(new_item(int)));
+    }
+  }
+
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+private:
+
+  Scene_polyhedron_shortest_path_item::Selection_mode get_selection_mode() const;
+  Scene_polyhedron_shortest_path_item::Primitives_mode get_primitives_mode() const;
+
+  void check_and_set_ids(Polyhedron* polyhedron);
+
+public Q_SLOTS:
+  void on_actionMakeShortestPaths_triggered();
+  void on_Selection_type_combo_box_changed(int index);
+  void on_Primitives_type_combo_box_changed(int index);
+  void new_item(int index);
+  void item_about_to_be_destroyed(CGAL::Three::Scene_item* scene_item);
+
+private:
+  Shortest_paths_map m_shortestPathsMap;
+
+  Messages_interface* m_messages;
+  QAction* actionMakeShortestPaths;
+  QDockWidget* dock_widget;
+  Ui::Shortest_path ui_widget;
+};
+
+Scene_polyhedron_shortest_path_item::Selection_mode Polyhedron_demo_shortest_path_plugin::get_selection_mode() const
+{
+  return (Scene_polyhedron_shortest_path_item::Selection_mode) ui_widget.Selection_type_combo_box->currentIndex();
+}
+
+Scene_polyhedron_shortest_path_item::Primitives_mode Polyhedron_demo_shortest_path_plugin::get_primitives_mode() const
+{
+  return (Scene_polyhedron_shortest_path_item::Primitives_mode) ui_widget.Primitives_type_combo_box->currentIndex();
+}
+
+void Polyhedron_demo_shortest_path_plugin::item_about_to_be_destroyed(CGAL::Three::Scene_item* sceneItem)
+{
+    // if polyhedron item
+    Scene_polyhedron_item* polyhedronItem = qobject_cast<Scene_polyhedron_item*>(sceneItem);
+    if(polyhedronItem)
+    {
+      Shortest_paths_map::iterator found = m_shortestPathsMap.find(polyhedronItem);
+
+      if (found != m_shortestPathsMap.end())
+      {
+        Scene_polyhedron_shortest_path_item* shortestPathItem = found->second;
+        m_shortestPathsMap.erase(found);
+        scene->erase(scene->item_id(shortestPathItem));
+      }
+    }
+
+    // if polyhedron selection item
+    Scene_polyhedron_shortest_path_item* shortestPathItem = qobject_cast<Scene_polyhedron_shortest_path_item*>(sceneItem);
+    if(shortestPathItem)
+    {
+      Scene_polyhedron_item* polyhedronItem = shortestPathItem->polyhedron_item();
+      Shortest_paths_map::iterator found = m_shortestPathsMap.find(polyhedronItem);
+
+      if (found != m_shortestPathsMap.end())
+      {
+        m_shortestPathsMap.erase(found);
+      }
+    }
+  }
+
+void Polyhedron_demo_shortest_path_plugin::new_item(int itemIndex)
+{
+  Scene_polyhedron_shortest_path_item* item = qobject_cast<Scene_polyhedron_shortest_path_item*>(scene->item(itemIndex));
+
+  if (!item)
+  {
+    return;
+  }
+
+  if(item->polyhedron_item() == NULL)
+  {
+    Scene_polyhedron_item* polyhedronItem = get_selected_item<Scene_polyhedron_item>();
+
+    if(!polyhedronItem)
+    {
+      CGAL_assertion(item->polyhedron_item() == NULL); // which means it is coming from selection_io loader
+      this->m_messages->information(tr("Error: please select corresponding polyhedron item from Geometric Objects list."));
+      scene->erase(itemIndex);
+      return;
+    }
+
+    if(!item->deferred_load(polyhedronItem, this->scene, this->m_messages, this->mw))
+    {
+      this->m_messages->information("Error: loading selection item is not successful!");
+      scene->erase(itemIndex);
+      return;
+    }
+  }
+
+  check_and_set_ids(item->polyhedron_item()->polyhedron());
+
+  Scene_polyhedron_shortest_path_item::Selection_mode selectionMode = get_selection_mode(); // Scene_polyhedron_shortest_path_item::INSERT_POINTS_MODE;
+
+  std::cout << "Selection mode: " << selectionMode << std::endl;
+
+  item->set_selection_mode(selectionMode);
+
+  Scene_polyhedron_shortest_path_item::Primitives_mode primitivesMode = get_primitives_mode(); // Scene_polyhedron_shortest_path_item::FACE_MODE;
+
+  std::cout << "Primitives mode: " << primitivesMode << std::endl;
+
+  item->set_primitives_mode(primitivesMode);
+
+  item->setRenderingMode(Flat);
+
+  if(item->name() == "unamed")
+  {
+    item->setName(tr("%1 (shortest path computation item)").arg(item->polyhedron_item()->name()));
+  }
+
+  m_shortestPathsMap.insert(std::make_pair(item->polyhedron_item(), item));
+}
+
+void Polyhedron_demo_shortest_path_plugin::on_actionMakeShortestPaths_triggered()
+{
+  Scene_polyhedron_item* polyhedronItem = get_selected_item<Scene_polyhedron_item>();
+  if (polyhedronItem)
+  {
+    if (m_shortestPathsMap.find(polyhedronItem) == m_shortestPathsMap.end())
+    {
+      dock_widget->show();
+      dock_widget->raise();
+      // The other parts of initialization will be handled by the 'new_item' callback
+      scene->addItem(new Scene_polyhedron_shortest_path_item(polyhedronItem, this->scene, this->m_messages, this->mw));
+    }
+    else
+    {
+      this->m_messages->warning(tr("A shortest path item for this polyhedron already exists (only one allowed per for now)"));
+    }
+  }
+  else
+  {
+    this->m_messages->warning("No polyhedron selected.");
+  }
+}
+
+void Polyhedron_demo_shortest_path_plugin::on_Selection_type_combo_box_changed(int index)
+{
+  std::cout << "Selection mode changed: " << index << std::endl;
+
+  for (Shortest_paths_map::iterator it = m_shortestPathsMap.begin(); it != m_shortestPathsMap.end(); ++it)
+  {
+    it->second->set_selection_mode(get_selection_mode());
+  }
+}
+
+void Polyhedron_demo_shortest_path_plugin::on_Primitives_type_combo_box_changed(int index)
+{
+  std::cout << "Primitives mode changed: " << index << std::endl;
+
+  for (Shortest_paths_map::iterator it = m_shortestPathsMap.begin(); it != m_shortestPathsMap.end(); ++it)
+  {
+    it->second->set_primitives_mode(get_primitives_mode());
+  }
+}
+
+void Polyhedron_demo_shortest_path_plugin::check_and_set_ids(Polyhedron* polyhedron)
+{
+  Polyhedron::Vertex_iterator testVertex1 = polyhedron->vertices_begin();
+  Polyhedron::Vertex_iterator testVertex2 = ++polyhedron->vertices_begin();
+
+  if(testVertex1->id() == testVertex2->id())
+  {
+    std::size_t vertexId = 0;
+    for(Polyhedron::Vertex_iterator currentVertex = polyhedron->vertices_begin();
+        currentVertex != polyhedron->vertices_end(); ++currentVertex, ++vertexId)
+    {
+        currentVertex->id() = vertexId;
+    }
+  }
+
+  Polyhedron::Halfedge_iterator testHalfedge1 = polyhedron->halfedges_begin();
+  Polyhedron::Halfedge_iterator testHalfedge2 = ++polyhedron->halfedges_begin();
+
+  if (testHalfedge1->id() == testHalfedge2->id())
+  {
+    std::size_t halfedgeId = 0;
+    for(Polyhedron::Halfedge_iterator currentHalfedge = polyhedron->halfedges_begin();
+        currentHalfedge != polyhedron->halfedges_end(); ++currentHalfedge, ++halfedgeId)
+    {
+        currentHalfedge->id() = halfedgeId;
+    }
+  }
+
+  Polyhedron::Facet_iterator testFacet1 = polyhedron->facets_begin();
+  Polyhedron::Facet_iterator testFacet2 = ++polyhedron->facets_begin();
+
+  if (testFacet1->id() == testFacet2->id())
+  {
+    std::size_t facetId = 0;
+    for(Polyhedron::Facet_iterator currentFacet = polyhedron->facets_begin();
+        currentFacet != polyhedron->facets_end(); ++currentFacet, ++facetId)
+    {
+        currentFacet->id() = facetId;
+    }
+  }
+}
+
+
+
+#include "Shortest_path_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui
new file mode 100644
index 0000000..a01d7ed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Shortest_path</class>
+ <widget class="QDockWidget" name="Shortest_path">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>334</width>
+    <height>402</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Shortest_path</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QHBoxLayout" name="horizontalLayout_4">
+    <item>
+     <widget class="QLabel" name="label_2">
+      <property name="text">
+       <string>Shortest_path &Type:</string>
+      </property>
+      <property name="buddy">
+       <cstring>Selection_type_combo_box</cstring>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QComboBox" name="Selection_type_combo_box">
+      <item>
+       <property name="text">
+        <string>Insertion</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>Removal</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>Compute Path</string>
+       </property>
+      </item>
+     </widget>
+    </item>
+    <item>
+     <widget class="QComboBox" name="Primitives_type_combo_box">
+      <item>
+       <property name="text">
+        <string>Vertex</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>Edge</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>Face</string>
+       </property>
+      </item>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt
new file mode 100644
index 0000000..e84acc5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt
@@ -0,0 +1,7 @@
+include( polyhedron_demo_macros )
+if ( EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90" )
+  polyhedron_demo_plugin(edit_polyhedron_plugin Edit_polyhedron_plugin Deform_mesh.ui)
+  target_link_libraries(edit_polyhedron_plugin scene_polyhedron_item scene_edit_polyhedron_item)
+else()
+  message(STATUS "NOTICE: The polyhedron edit plugin require Eigen 3.2 (or higher) and will not be available.")
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui
new file mode 100644
index 0000000..cb959cd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DeformMesh</class>
+ <widget class="QDockWidget" name="DeformMesh">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>568</width>
+    <height>588</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Surface Mesh Deformation</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QGroupBox" name="SelectionGroupBox">
+      <property name="title">
+       <string>Selection</string>
+      </property>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="2" column="1" rowspan="2" colspan="2">
+        <layout class="QVBoxLayout" name="RingLayout">
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_4">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_5">
+             <item>
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>Brush Size ROI:</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>Control Vertices Brush Size:</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_2">
+             <item>
+              <widget class="QSpinBox" name="BrushSpinBoxRoi"/>
+             </item>
+             <item>
+              <widget class="QSpinBox" name="BrushSpinBoxCtrlVert"/>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item row="4" column="0" colspan="4">
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <widget class="QPushButton" name="SelectAllVerticesPushButton">
+           <property name="text">
+            <string>Set All Vertices as ROI</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="ClearROIPushButton">
+           <property name="text">
+            <string>Clear ROI</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="2" column="0" rowspan="2">
+        <widget class="QGroupBox" name="ROICtrlVertGroupBox">
+         <layout class="QVBoxLayout" name="CtrlVertRoiLayout">
+          <item>
+           <widget class="QRadioButton" name="ROIRadioButton">
+            <property name="toolTip">
+             <string>Use Shift + Left Click to paint ROI vertices</string>
+            </property>
+            <property name="text">
+             <string>ROI</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="CtrlVertRadioButton">
+            <property name="toolTip">
+             <string>Use Shift + Left Click to paint control vertices</string>
+            </property>
+            <property name="text">
+             <string>Control vertices</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="2" column="3" rowspan="2">
+        <widget class="QGroupBox" name="InsertEraseGroupBox">
+         <layout class="QVBoxLayout" name="InsertRemoveLayout">
+          <item>
+           <widget class="QRadioButton" name="InsertRadioButton">
+            <property name="text">
+             <string>Insertion</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="EraseRadioButton">
+            <property name="text">
+             <string>Removal</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="5" column="0" colspan="4">
+        <layout class="QGridLayout" name="gridLayout_2">
+         <property name="sizeConstraint">
+          <enum>QLayout::SetDefaultConstraint</enum>
+         </property>
+         <item row="0" column="1">
+          <widget class="QPushButton" name="ReadROIPushButton">
+           <property name="text">
+            <string>Load ROI / Control Vertices</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="ShowAsSphereCheckBox">
+           <property name="text">
+            <string>Show As Sphere</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="ShowROICheckBox">
+           <property name="text">
+            <string>Show ROI</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QPushButton" name="SaveROIPushButton">
+           <property name="text">
+            <string>Save ROI / Control Vertices</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="groupBox">
+      <property name="title">
+       <string/>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_8">
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_4">
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_8">
+           <item>
+            <widget class="QLabel" name="label_3">
+             <property name="text">
+              <string>Isolated Component Size:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QSpinBox" name="Threshold_size_spin_box">
+             <property name="maximum">
+              <number>999999999</number>
+             </property>
+             <property name="value">
+              <number>8</number>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="Get_minimum_button">
+             <property name="text">
+              <string>Get Minimum</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QPushButton" name="Select_isolated_components_button">
+           <property name="text">
+            <string>Select Isolated Components Below Threshold</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="remeshing_groupBox">
+      <property name="contextMenuPolicy">
+       <enum>Qt::DefaultContextMenu</enum>
+      </property>
+      <property name="title">
+       <string>Remeshing</string>
+      </property>
+      <property name="flat">
+       <bool>false</bool>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_10">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_9" stretch="0,0,0">
+         <item>
+          <widget class="QCheckBox" name="RemeshingCheckBox">
+           <property name="toolTip">
+            <string>Warning : after remeshing all ROI and control vertices will be unselected. "Discard changes" will be unavailable.</string>
+           </property>
+           <property name="layoutDirection">
+            <enum>Qt::LeftToRight</enum>
+           </property>
+           <property name="text">
+            <string>Remesh after deformation</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_6">
+           <item>
+            <widget class="QCheckBox" name="remeshingEdgeLengthInput_checkBox">
+             <property name="toolTip">
+              <string>If unchecked, automatic value is used (the average edge length at ROI boundary)</string>
+             </property>
+             <property name="layoutDirection">
+              <enum>Qt::RightToLeft</enum>
+             </property>
+             <property name="text">
+              <string>Target edge length</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="label_4">
+             <property name="layoutDirection">
+              <enum>Qt::RightToLeft</enum>
+             </property>
+             <property name="text">
+              <string>Nb. iterations</string>
+             </property>
+             <property name="alignment">
+              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_7">
+           <item>
+            <widget class="QDoubleSpinBox" name="remeshing_edge_length_spinbox"/>
+           </item>
+           <item>
+            <widget class="QSpinBox" name="remeshing_iterations_spinbox"/>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="CtrlVertGroupNavigationGroupBox">
+      <property name="title">
+       <string>Group of Control Vertices Navigation</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QPushButton" name="PrevCtrlVertPushButton">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string><<</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="NextCtrlVertPushButton">
+           <property name="text">
+            <string>>></string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <item>
+          <widget class="QPushButton" name="AddCtrlVertPushButton">
+           <property name="text">
+            <string>Create new</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="DeleteCtrlVertPushButton">
+           <property name="text">
+            <string>Delete </string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_11">
+         <item>
+          <widget class="QCheckBox" name="ActivatePivotingCheckBox">
+           <property name="text">
+            <string>Activate Pivoting </string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="ActivateFixedPlaneCheckBox">
+           <property name="text">
+            <string>Activate Fixed Plane Deformation</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="Line" name="line">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="ApplyAndCloseLayout">
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout_10">
+        <item>
+         <layout class="QGridLayout" name="gridLayout_3">
+          <item row="2" column="0">
+           <widget class="QPushButton" name="DiscardChangesPushButton">
+            <property name="toolTip">
+             <string>Reset mesh to last version saved by "Overwrite Initial Geometry". Not available when Remeshing is ON.</string>
+            </property>
+            <property name="text">
+             <string>Discard changes</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QPushButton" name="OverwritePushButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Overwrite Initial Geometry</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QPushButton" name="ApplyAndClosePushButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Apply and Close</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp
new file mode 100644
index 0000000..3645ab4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp
@@ -0,0 +1,418 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include "Scene_polyhedron_item.h"
+#include "Scene_edit_polyhedron_item.h"
+
+#include <QAction>
+#include <QMainWindow>
+#include <QFileDialog>
+
+#include <QGLViewer/qglviewer.h>
+
+#include "ui_Deform_mesh.h"
+using namespace CGAL::Three;
+class Polyhedron_demo_edit_polyhedron_plugin : 
+  public QObject,
+  public Polyhedron_demo_plugin_helper
+{
+  Q_OBJECT
+  Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+public:
+  Polyhedron_demo_edit_polyhedron_plugin() 
+    : Polyhedron_demo_plugin_helper(), dock_widget(NULL)
+  { }
+  ~Polyhedron_demo_edit_polyhedron_plugin()
+  { }
+
+  void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface);
+  virtual void closure()
+  {
+    dock_widget->hide();
+  }
+  QList<QAction*> actions() const;
+  bool applicable(QAction*) const;
+
+public Q_SLOTS:
+  void on_actionDeformation_triggered();
+  /////// Dock window signal handlers //////
+  // what they do is simply transmiting required 'action' to selected scene_edit_polyhedron_item object
+  void on_AddCtrlVertPushButton_clicked();
+  void on_PrevCtrlVertPushButton_clicked();
+  void on_NextCtrlVertPushButton_clicked();
+  void on_SelectAllVerticesPushButton_clicked();
+  void on_DeleteCtrlVertPushButton_clicked();  
+  void on_ApplyAndClosePushButton_clicked();
+  void on_DiscardChangesPushButton_clicked();
+  void on_ClearROIPushButton_clicked();
+  void on_ShowROICheckBox_stateChanged(int state);
+  void on_ShowAsSphereCheckBox_stateChanged(int state);  
+  void on_ActivatePivotingCheckBox_stateChanged(int state);
+  void on_ActivateFixedPlaneCheckBox_stateChanged(int state);
+  void on_OverwritePushButton_clicked();
+  void on_SaveROIPushButton_clicked();
+  void on_ReadROIPushButton_clicked();
+  void dock_widget_visibility_changed(bool visible);
+  void on_Select_isolated_components_button_clicked();
+  void on_Get_minimum_button_clicked();
+
+  void on_BrushSpinBoxCtrlVert_changed(int);
+  void on_BrushSpinBoxRoi_changed(int);
+  void on_ROIRadioButton_toggled(bool);
+  void new_item_created(int item_id);
+
+private:
+  typedef CGAL::Three::Scene_interface::Item_id Item_id;
+
+  Scene_edit_polyhedron_item* convert_to_edit_polyhedron(Item_id, Scene_polyhedron_item*);
+  Scene_polyhedron_item* convert_to_plain_polyhedron(Item_id, Scene_edit_polyhedron_item*);
+
+  Ui::DeformMesh ui_widget;
+  QDockWidget* dock_widget;
+
+  QAction* actionDeformation;
+}; // end Polyhedron_demo_edit_polyhedron_plugin
+
+QList<QAction*> Polyhedron_demo_edit_polyhedron_plugin::actions() const {
+  return QList<QAction*>() << actionDeformation;
+}
+bool Polyhedron_demo_edit_polyhedron_plugin::applicable(QAction*) const { 
+  Q_FOREACH(CGAL::Three::Scene_interface::Item_id i, scene->selectionIndices())
+  {
+    if(qobject_cast<Scene_polyhedron_item*>(scene->item(i)) 
+        || qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i)))
+      return true;
+  }
+  return false;
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface)
+{
+  mw = mainWindow;
+  scene = scene_interface;
+  actionDeformation = new QAction("Surface Mesh Deformation", mw);
+  actionDeformation->setProperty("subMenuName", "Triangulated Surface Mesh Deformation");
+
+  actionDeformation->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E));
+  connect(actionDeformation, SIGNAL(triggered()), this, SLOT(on_actionDeformation_triggered()));
+
+  // Connect Scene::newItem so that, if dock_widget is visible, convert
+  // automatically polyhedron items to "edit polyhedron" items.
+  QObject* scene = dynamic_cast<QObject*>(scene_interface);
+  if(scene) {
+    connect(scene, SIGNAL(newItem(int)), this, SLOT(new_item_created(int)));
+  } else {
+    std::cerr << "ERROR " << __FILE__ << ":" << __LINE__ << " :"
+              << " cannot convert scene_interface to scene!\n"; 
+  }
+  ////////////////// Construct widget /////////////////////////////
+  // First time, construct docking window
+  dock_widget = new QDockWidget("Mesh Deformation", mw);
+  dock_widget->setVisible(false); // do not show at the beginning
+
+  ui_widget.setupUi(dock_widget); 
+  mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
+
+  connect(ui_widget.AddCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_AddCtrlVertPushButton_clicked()));
+  connect(ui_widget.PrevCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_PrevCtrlVertPushButton_clicked()));
+  connect(ui_widget.NextCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_NextCtrlVertPushButton_clicked()));
+  connect(ui_widget.SelectAllVerticesPushButton, SIGNAL(clicked()), this, SLOT(on_SelectAllVerticesPushButton_clicked()));
+  connect(ui_widget.DeleteCtrlVertPushButton, SIGNAL(clicked()), this, SLOT(on_DeleteCtrlVertPushButton_clicked()));
+  connect(ui_widget.ApplyAndClosePushButton, SIGNAL(clicked()), this, SLOT(on_ApplyAndClosePushButton_clicked()));
+  connect(ui_widget.DiscardChangesPushButton, SIGNAL(clicked()), this, SLOT(on_DiscardChangesPushButton_clicked()));
+  connect(ui_widget.ClearROIPushButton, SIGNAL(clicked()), this, SLOT(on_ClearROIPushButton_clicked()));
+  connect(ui_widget.ShowROICheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ShowROICheckBox_stateChanged(int)));
+  connect(ui_widget.ShowAsSphereCheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ShowAsSphereCheckBox_stateChanged(int)));  
+  connect(ui_widget.ActivateFixedPlaneCheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ActivateFixedPlaneCheckBox_stateChanged(int)));
+  connect(ui_widget.ActivatePivotingCheckBox, SIGNAL(stateChanged(int)), this, SLOT(on_ActivatePivotingCheckBox_stateChanged(int)));
+  connect(ui_widget.OverwritePushButton, SIGNAL(clicked()), this, SLOT(on_OverwritePushButton_clicked()));
+  connect(ui_widget.Select_isolated_components_button,  SIGNAL(clicked()), this, SLOT(on_Select_isolated_components_button_clicked()));
+  connect(ui_widget.Get_minimum_button,  SIGNAL(clicked()), this, SLOT(on_Get_minimum_button_clicked()));
+
+  connect(ui_widget.SaveROIPushButton, SIGNAL(clicked()), this, SLOT(on_SaveROIPushButton_clicked()));
+  connect(ui_widget.ReadROIPushButton, SIGNAL(clicked()), this, SLOT(on_ReadROIPushButton_clicked()));
+  connect(dock_widget, SIGNAL(visibilityChanged(bool)), this, SLOT(dock_widget_visibility_changed(bool)) );
+
+  connect(ui_widget.BrushSpinBoxRoi, SIGNAL(valueChanged(int)), this, SLOT(on_BrushSpinBoxRoi_changed(int)));
+  connect(ui_widget.BrushSpinBoxCtrlVert, SIGNAL(valueChanged(int)), this, SLOT(on_BrushSpinBoxCtrlVert_changed(int)));
+  connect(ui_widget.ROIRadioButton, SIGNAL(toggled(bool)), this, SLOT(on_ROIRadioButton_toggled(bool)));
+  ///////////////////////////////////////////////////////////////////
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_actionDeformation_triggered()
+{  
+  // dock widget should be constructed in init()
+  if(dock_widget->isVisible()) { dock_widget->hide(); }
+  else                         { dock_widget->show(); }
+}
+
+/////// Dock window signal handlers //////
+// what they do is simply transmitting required 'action' to selected scene_edit_polyhedron_item object
+void Polyhedron_demo_edit_polyhedron_plugin::on_AddCtrlVertPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->create_ctrl_vertices_group();
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_PrevCtrlVertPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->prev_ctrl_vertices_group();
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); // for repaint
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_NextCtrlVertPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->next_ctrl_vertices_group();
+  scene->itemChanged(edit_item); // for repaint
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_SelectAllVerticesPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->set_all_vertices_as_roi();
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); // for repaint
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_DeleteCtrlVertPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->delete_ctrl_vertices_group();
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); // for repaint
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ClearROIPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->clear_roi();
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); // for repaint
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ApplyAndClosePushButton_clicked()
+{
+  dock_widget->setVisible(false);
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_DiscardChangesPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if (!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->reset_deform_object();
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); //for redraw
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ShowROICheckBox_stateChanged(int /*state*/)
+{
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+    
+    scene->itemChanged(edit_item);  // just for redraw   
+  }  
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ShowAsSphereCheckBox_stateChanged(int /*state*/)
+{
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+    
+    scene->itemChanged(edit_item);  // just for redraw   
+  }  
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ActivatePivotingCheckBox_stateChanged(int state)
+{
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+    
+    if(state == Qt::Checked) {
+      edit_item->pivoting_begin();
+    }
+    else {
+      edit_item->pivoting_end();
+    }
+    scene->itemChanged(edit_item);     
+  }
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ActivateFixedPlaneCheckBox_stateChanged(int)
+{
+    for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+    {
+        Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+        if(!edit_item) { continue; }
+        edit_item->update_frame_plane();
+        edit_item->invalidateOpenGLBuffers();
+        scene->itemChanged(edit_item);
+    }
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_OverwritePushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  edit_item->overwrite_deform_object();
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_Select_isolated_components_button_clicked() {
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  boost::optional<std::size_t> minimum = 
+    edit_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value());
+  if(minimum) {
+    ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
+  }
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_Get_minimum_button_clicked() {
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;                             // the selected item is not of the right type
+
+  boost::optional<std::size_t> minimum = edit_item->get_minimum_isolated_component();
+  if(minimum) {
+    ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
+  }
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_SaveROIPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;  
+
+  QString fileName = QFileDialog::getSaveFileName(mw, "Save", 
+      "roi.txt", "Text (*.txt)");
+  if(fileName.isNull()) { return; }
+
+  edit_item->save_roi(fileName.toLocal8Bit().data());  
+}
+void Polyhedron_demo_edit_polyhedron_plugin::on_ReadROIPushButton_clicked()
+{
+  int item_id = scene->mainSelectionIndex();
+  Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(item_id));
+  if(!edit_item) return;  
+
+  QString fileName = QFileDialog::getOpenFileName(mw, "Read", 
+    "roi.txt", "Text (*.txt)");
+  if(fileName.isNull()) { return; }
+
+  edit_item->read_roi(fileName.toLocal8Bit().data());
+  edit_item->invalidateOpenGLBuffers();
+  scene->itemChanged(edit_item); 
+}
+void Polyhedron_demo_edit_polyhedron_plugin::dock_widget_visibility_changed(bool visible)
+{
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries();
+      i < end; ++i)
+  {
+    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(i));
+    if (poly_item) 
+    { poly_item->update_halfedge_indices(); }
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+
+    if(visible && poly_item) {
+      convert_to_edit_polyhedron(i, poly_item);
+    } else if(!visible && edit_item) {
+      convert_to_plain_polyhedron(i, edit_item);
+    }
+  }
+}
+
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_ROIRadioButton_toggled(bool value) {
+  int k_ring = value ? ui_widget.BrushSpinBoxRoi->value() : 
+                       ui_widget.BrushSpinBoxCtrlVert->value();
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+
+    edit_item->set_k_ring(k_ring);
+  }
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_BrushSpinBoxCtrlVert_changed(int value) {
+  if(ui_widget.ROIRadioButton->isChecked()) { return; }
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+
+    edit_item->set_k_ring(value);
+  }
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::on_BrushSpinBoxRoi_changed(int value) {
+  if(!ui_widget.ROIRadioButton->isChecked()) { return; }
+  for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end; ++i)
+  {
+    Scene_edit_polyhedron_item* edit_item = qobject_cast<Scene_edit_polyhedron_item*>(scene->item(i));
+    if(!edit_item) { continue; }
+
+    edit_item->set_k_ring(value);
+  }
+}
+
+void Polyhedron_demo_edit_polyhedron_plugin::new_item_created(int item_id)
+{
+  if(dock_widget->isVisible()) {
+    Scene_polyhedron_item* poly_item = 
+      qobject_cast<Scene_polyhedron_item*>(scene->item(item_id));
+    if(poly_item) {
+      convert_to_edit_polyhedron(item_id, poly_item);
+    }
+  }
+}
+
+Scene_edit_polyhedron_item* 
+Polyhedron_demo_edit_polyhedron_plugin::convert_to_edit_polyhedron(Item_id i,
+                           Scene_polyhedron_item* poly_item)
+{
+  QString poly_item_name = poly_item->name();
+  Scene_edit_polyhedron_item* edit_poly = new Scene_edit_polyhedron_item(poly_item, &ui_widget, mw);
+  edit_poly->setColor(poly_item->color());
+  edit_poly->setName(QString("%1 (edit)").arg(poly_item->name()));
+  edit_poly->setRenderingMode(Gouraud);
+  poly_item->setName(poly_item_name); // Because it is changed when the
+                                      // name of edit_poly is changed.
+  int k_ring = ui_widget.ROIRadioButton->isChecked() ? ui_widget.BrushSpinBoxRoi->value() : 
+                                                       ui_widget.BrushSpinBoxCtrlVert->value();
+  edit_poly->set_k_ring(k_ring);
+  scene->replaceItem(i, edit_poly);
+  return edit_poly;
+}
+
+Scene_polyhedron_item* 
+Polyhedron_demo_edit_polyhedron_plugin::convert_to_plain_polyhedron(Item_id i,
+                            Scene_edit_polyhedron_item* edit_item) 
+{
+  Scene_polyhedron_item* poly_item = edit_item->to_polyhedron_item();
+  scene->replaceItem(i, poly_item);
+  delete edit_item;
+  return poly_item;
+}
+
+#include "Edit_polyhedron_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp
new file mode 100644
index 0000000..7f477b6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp
@@ -0,0 +1,973 @@
+//#define CGAL_PMP_REMESHING_VERBOSE
+
+#include "opengl_tools.h"
+#include "create_sphere.h"
+#include "Scene_edit_polyhedron_item.h"
+#include <boost/foreach.hpp>
+#include <algorithm>
+#include <QTime>
+
+#include <CGAL/Polygon_mesh_processing/border.h>
+
+Scene_edit_polyhedron_item::Scene_edit_polyhedron_item
+(Scene_polyhedron_item* poly_item,
+ Ui::DeformMesh* ui_widget,
+ QMainWindow* mw)
+  : Scene_item(NumberOfBuffers,NumberOfVaos),
+    ui_widget(ui_widget),
+    poly_item(poly_item),
+    is_rot_free(true),
+    own_poly_item(true),
+    k_ring_selector(poly_item, mw, Scene_polyhedron_item_k_ring_selection::Active_handle::VERTEX, true)
+{
+  nb_ROI = 0;
+  nb_sphere = 0;
+  nb_control = 0;
+  nb_axis = 0;
+  nb_bbox = 0;
+  mw->installEventFilter(this);
+  // bind vertex picking
+  connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Vertex_handle>&)), this,
+          SLOT(selected(const std::set<Polyhedron::Vertex_handle>&)));
+
+  poly_item->set_color_vector_read_only(true); // to prevent recomputation of color vector in invalidateOpenGLBuffers()
+  poly_item->update_vertex_indices();
+
+  deform_mesh = new Deform_mesh(*(poly_item->polyhedron()),
+                                Deform_mesh::Vertex_index_map(),
+                                Deform_mesh::Hedge_index_map(),
+                                Array_based_vertex_point_map(&positions));
+
+  length_of_axis = bbox().diagonal_length() / 15.0;
+
+  // interleave events of viewer (there is only one viewer) 
+  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+  viewer->installEventFilter(this);
+    
+  // create an empty group of control vertices for starting
+  create_ctrl_vertices_group();
+   
+  // start QObject's timer for continuous effects 
+  // (deforming mesh while mouse not moving)
+  startTimer(0);
+
+  // Required for drawing functionality
+  reset_drawing_data();
+
+    //Generates an integer which will be used as ID for each buffer
+
+    const char vertex_shader_source_bbox[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec3 vertex; \n"
+        "attribute highp vec3 colors; \n"
+
+        "uniform highp mat4 mvp_matrix; \n"
+        "uniform highp mat4 rotations; \n"
+        "uniform highp vec3 translation; \n"
+        "uniform highp vec3 translation_2; \n"
+        "varying highp vec3 fColors; \n"
+        " \n"
+
+        "void main(void) \n"
+        "{ \n"
+        "   fColors = colors; \n"
+        "   gl_Position = mvp_matrix * (rotations *(vec4(translation_2,0.0)+vec4(vertex,1.0) )+ vec4(translation,0.0)) ; \n"
+        "} \n"
+    };
+    const char fragment_shader_source[]=
+    {
+        "#version 120 \n"
+        "varying vec3 fColors; \n"
+        " \n"
+        "void main(void) \n"
+        "{ \n"
+        " gl_FragColor = vec4(fColors, 1.0); \n"
+        "} \n"
+    };
+    bbox_program.addShaderFromSourceCode(QOpenGLShader::Vertex,vertex_shader_source_bbox);
+    bbox_program.addShaderFromSourceCode(QOpenGLShader::Fragment,fragment_shader_source);
+    bbox_program.link();
+
+    ui_widget->remeshing_iterations_spinbox->setValue(1);
+
+    ui_widget->remeshing_edge_length_spinbox->setValue(length_of_axis);
+    ui_widget->remeshing_edge_length_spinbox->setDisabled(true);
+    ui_widget->remeshingEdgeLengthInput_checkBox->setChecked(false);
+    connect(ui_widget->remeshingEdgeLengthInput_checkBox, SIGNAL(toggled(bool)),
+            ui_widget->remeshing_edge_length_spinbox, SLOT(setEnabled(bool)));
+
+    //the spheres :
+    create_Sphere(length_of_axis/15.0);
+    invalidateOpenGLBuffers();
+}
+
+Scene_edit_polyhedron_item::~Scene_edit_polyhedron_item()
+{
+  while(is_there_any_ctrl_vertices_group())
+  {
+    delete_ctrl_vertices_group(false);
+  }
+
+  delete deform_mesh;
+  if (own_poly_item) delete poly_item;
+}
+/////////////////////////////
+/// For the Shader gestion///
+void Scene_edit_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer =0) const
+{
+    //vao for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+
+        vaos[Facets]->bind();
+        buffers[Facet_vertices].bind();
+        buffers[Facet_vertices].allocate(positions.data(),
+                            static_cast<int>(positions.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Facet_vertices].release();
+
+        buffers[Facet_normals].bind();
+        buffers[Facet_normals].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(double)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_DOUBLE,0,3);
+        buffers[Facet_normals].release();
+        vaos[Facets]->release();
+        program->release();
+    }
+    //vao for the ROI points
+    {   program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[Roi_points]->bind();
+        buffers[Roi_vertices].bind();
+        buffers[Roi_vertices].allocate(ROI_points.data(),
+                            static_cast<int>(ROI_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Roi_vertices].release();
+        vaos[Roi_points]->release();
+
+        program->release();
+    }
+   //vao for the edges
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[Edges]->bind();
+        buffers[Facet_vertices].bind();
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Facet_vertices].release();
+        vaos[Edges]->release();
+        program->release();
+    }
+    //vao for the ROI spheres
+    {
+        program = getShaderProgram(PROGRAM_INSTANCED, viewer);
+        program->bind();
+        vaos[ROI_spheres]->bind();
+        buffers[Sphere_vertices].bind();
+        buffers[Sphere_vertices].allocate(pos_sphere.data(),
+                            static_cast<int>(pos_sphere.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Sphere_vertices].release();
+
+        buffers[Sphere_normals].bind();
+        buffers[Sphere_normals].allocate(normals_sphere.data(),
+                            static_cast<int>(normals_sphere.size()*sizeof(double)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_DOUBLE,0,3);
+        buffers[Sphere_normals].release();
+
+        buffers[Roi_vertices].bind();
+        program->enableAttributeArray("center");
+        program->setAttributeBuffer("center",GL_DOUBLE,0,3);
+        buffers[Roi_vertices].release();
+
+        if(viewer->extension_is_found)
+        {
+            viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1);
+            viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1);
+        }
+        vaos[ROI_spheres]->release();
+        ROI_color.resize(0);
+        std::vector<double>(ROI_color).swap(ROI_color);
+        nb_ROI = ROI_points.size();
+        ROI_points.resize(0);
+        std::vector<double>(ROI_points).swap(ROI_points);
+    }
+    //vao for the BBOX
+    {
+        bbox_program.bind();
+        vaos[4]->bind();
+        buffers[Bbox_vertices].bind();
+        buffers[Bbox_vertices].allocate(pos_bbox.data(),
+                             static_cast<int>(pos_bbox.size()*sizeof(double)));
+        bbox_program.enableAttributeArray("vertex");
+        bbox_program.setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Bbox_vertices].release();
+
+        vaos[4]->release();
+        nb_bbox = pos_bbox.size();
+        pos_bbox.resize(0);
+        std::vector<double>(pos_bbox).swap(pos_bbox);
+        color_bbox.resize(0);
+        std::vector<double>(color_bbox).swap(color_bbox);
+        bbox_program.release();
+    }
+    //vao for the control points
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[Control_points]->bind();
+        buffers[Control_vertices].bind();
+        buffers[Control_vertices].allocate(control_points.data(),
+                             static_cast<int>(control_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Control_vertices].release();
+
+        vaos[Control_points]->release();
+        program->release();
+    }
+    //vao for the control spheres
+    {
+        program = getShaderProgram(PROGRAM_INSTANCED, viewer);
+        program->bind();
+        vaos[Control_spheres]->bind();
+        buffers[Sphere_vertices].bind();
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+
+        buffers[Sphere_normals].bind();
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_DOUBLE,0,3);
+        buffers[Sphere_normals].release();
+
+        buffers[Control_vertices].bind();
+        program->enableAttributeArray("center");
+        program->setAttributeBuffer("center",GL_DOUBLE,0,3);
+        buffers[Control_vertices].release();
+
+        if(viewer->extension_is_found)
+        {
+            viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1);
+        }
+        vaos[Control_spheres]->release();
+        nb_sphere = pos_sphere.size();
+        //pos_sphere.resize(0);
+        //std::vector<double>(pos_sphere).swap(pos_sphere);
+       // normals_sphere.resize(0);
+       // std::vector<double>(normals_sphere).swap(normals_sphere);
+        control_color.resize(0);
+        std::vector<double>(control_color).swap(control_color);
+        nb_control = control_points.size();
+        control_points.resize(0);
+        std::vector<double>(control_points).swap(control_points);
+    }
+    //vao for the axis
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[Axis]->bind();
+        buffers[Axis_vertices].bind();
+        buffers[Axis_vertices].allocate(pos_axis.data(),
+                             static_cast<int>(pos_axis.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Axis_vertices].release();
+        buffers[Axis_colors].bind();
+        buffers[Axis_colors].allocate(color_lines.data(),
+                             static_cast<int>(color_lines.size()*sizeof(double)));
+        program->enableAttributeArray("colors");
+        program->setAttributeBuffer("colors",GL_DOUBLE,0,3);
+        buffers[Axis_colors].release();
+        vaos[Axis]->release();
+        program->release();
+        nb_axis = pos_axis.size();
+        pos_axis.resize(0);
+        std::vector<double>(pos_axis).swap(pos_axis);
+        color_lines.resize(0);
+        std::vector<double>(color_lines).swap(color_lines);
+    }
+    //vao for the frame plane
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        bbox_program.bind();
+        vaos[Frame_plane]->bind();
+        buffers[Frame_vertices].bind();
+        buffers[Frame_vertices].allocate(pos_frame_plane.data(),
+                             static_cast<int>(pos_frame_plane.size()*sizeof(double)));
+        bbox_program.enableAttributeArray("vertex");
+        bbox_program.setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Frame_vertices].release();
+
+        vaos[Frame_plane]->release();
+        bbox_program.release();
+        program->release();
+    }
+    are_buffers_filled = true;
+}
+
+void Scene_edit_polyhedron_item::reset_drawing_data()
+{
+  positions.clear();
+  positions.resize(num_vertices(*polyhedron()) * 3);
+
+  normals.clear();
+  normals.resize(positions.size());
+
+  std::size_t counter = 0;
+  BOOST_FOREACH(vertex_descriptor vb, vertices(*polyhedron()))
+  {
+    positions[counter * 3] = vb->point().x();
+    positions[counter * 3 + 1] = vb->point().y();
+    positions[counter * 3 + 2] = vb->point().z();
+
+    const Polyhedron::Traits::Vector_3& n =
+      CGAL::Polygon_mesh_processing::compute_vertex_normal(vb, deform_mesh->halfedge_graph());
+    normals[counter * 3] = n.x();
+    normals[counter * 3 + 1] = n.y();
+    normals[counter * 3 + 2] = n.z();
+
+    ++counter;
+  }
+
+  tris.clear();
+  tris.resize(polyhedron()->size_of_facets() * 3);
+  counter = 0;
+  BOOST_FOREACH(face_descriptor fb, faces(*polyhedron()))
+  {
+    tris[counter * 3] = static_cast<unsigned int>(fb->halfedge()->vertex()->id());
+    tris[counter * 3 + 1] = static_cast<unsigned int>(fb->halfedge()->next()->vertex()->id());
+    tris[counter * 3 + 2] = static_cast<unsigned int>(fb->halfedge()->prev()->vertex()->id());
+    ++counter;
+  }
+
+  edges.clear();
+  edges.resize(polyhedron()->size_of_halfedges());
+  counter = 0;
+  for (Polyhedron::Edge_iterator eb = polyhedron()->edges_begin();
+       eb != polyhedron()->edges_end(); ++eb, ++counter)
+  {
+    edges[counter * 2] = static_cast<unsigned int>(eb->vertex()->id());
+    edges[counter * 2 + 1] = static_cast<unsigned int>(eb->opposite()->vertex()->id());
+  }
+}
+
+void Scene_edit_polyhedron_item::compute_normals_and_vertices(void)
+{
+    ROI_points.resize(0);
+    control_points.resize(0);
+    control_color.resize(0);
+    pos_frame_plane.resize(0);
+    BOOST_FOREACH(vertex_descriptor vd, deform_mesh->roi_vertices())
+    {
+        if(!deform_mesh->is_control_vertex(vd))
+        {//gl_draw_point( vd->point() );
+            ROI_points.push_back(vd->point().x());
+            ROI_points.push_back(vd->point().y());
+            ROI_points.push_back(vd->point().z());
+        }
+    }
+    ROI_color.assign(ROI_points.size(),0);
+    for(std::size_t i=0; i<ROI_color.size()/3; i++)
+      ROI_color[3*i+1]=1.0;
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    for(Ctrl_vertices_group_data_list::const_iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data)
+    {
+        if(hgb_data->frame == viewer->manipulatedFrame())
+        {
+            if(!ui_widget->ActivatePivotingCheckBox->isChecked())
+            {
+                // draw bbox
+                compute_bbox(hgb_data->bbox);
+            }
+        }
+
+        const double r=hgb_data == active_group?1:0;
+        const double b=hgb_data == active_group?0:1;
+
+        for(std::vector<vertex_descriptor>::const_iterator hb = hgb_data->ctrl_vertices_group.begin(); hb != hgb_data->ctrl_vertices_group.end(); ++hb)
+        {
+            control_points.push_back((*hb)->point().x());
+            control_points.push_back((*hb)->point().y());
+            control_points.push_back((*hb)->point().z());
+            control_color.push_back(r);
+            control_color.push_back(0);
+            control_color.push_back(b);
+        }
+    }
+
+    //The box color
+    color_bbox.resize(pos_bbox.size());
+    for(int i =0; i< (int)pos_bbox.size(); i++)
+        color_bbox[i]=0.0;
+
+    for(int i =0; i< (int)pos_bbox.size(); i+=3)
+        color_bbox[i]=1.0;
+
+    //The axis
+
+    pos_axis.resize(18);
+    for(int i =0; i< 18; i++)
+        pos_axis[i]=0.0;
+    pos_axis[3] = length_of_axis; pos_axis[10] = length_of_axis; pos_axis[17] = length_of_axis;
+    color_lines.resize(18);
+    for(int i =0; i< 18; i++)
+        color_lines[i]=0.0;
+
+    color_lines[2] = 1.0; color_lines[5] = 1.0;
+    color_lines[6] = 1.0; color_lines[9] = 1.0;
+    color_lines[13] = 1.0; color_lines[16] = 1.0;
+
+    if(ui_widget->ActivateFixedPlaneCheckBox->isChecked())
+      draw_frame_plane(viewer);
+
+}
+
+/////////////////////////////////////////////////////////
+/////////// Most relevant functions lie here ///////////
+void Scene_edit_polyhedron_item::deform()
+{
+  if(!is_there_any_ctrl_vertices()) { return; }
+
+  for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+  { it->set_target_positions(); }
+  deform_mesh->deform();
+
+  poly_item->invalidate_aabb_tree(); // invalidate the AABB-tree of the poly_item
+  Q_EMIT itemChanged();
+}
+
+struct ROI_border_pmap
+{
+  std::set<edge_descriptor>* m_set_ptr;
+
+  typedef edge_descriptor                    key_type;
+  typedef bool                               value_type;
+  typedef bool                               reference;
+  typedef boost::read_write_property_map_tag category;
+
+  ROI_border_pmap() : m_set_ptr(NULL) {}
+  ROI_border_pmap(std::set<edge_descriptor>* set_)
+    : m_set_ptr(set_)
+  {}
+  friend bool get(const ROI_border_pmap& map, const key_type& k)
+  {
+    CGAL_assertion(map.m_set_ptr != NULL);
+    return map.m_set_ptr->count(k);
+  }
+  friend void put(ROI_border_pmap& map, const key_type& k, const value_type b)
+  {
+    CGAL_assertion(map.m_set_ptr != NULL);
+    if (b)              map.m_set_ptr->insert(k);
+    else if(get(map,k)) map.m_set_ptr->erase(k);
+  }
+};
+
+void Scene_edit_polyhedron_item::remesh()
+{
+  const Polyhedron& g = deform_mesh->halfedge_graph();
+  Array_based_vertex_point_map vpmap(&positions);
+
+  std::set<face_descriptor> roi_facets;
+  std::set<vertex_descriptor> roi_vertices(
+    deform_mesh->roi_vertices().begin(),deform_mesh->roi_vertices().end());
+
+  BOOST_FOREACH(vertex_descriptor v, deform_mesh->roi_vertices())
+  {
+    BOOST_FOREACH(face_descriptor fv, CGAL::faces_around_target(halfedge(v, g), g))
+    {
+      bool add_face=true;
+      BOOST_FOREACH(vertex_descriptor vfd, CGAL::vertices_around_face(halfedge(fv,g),g))
+        if (roi_vertices.count(vfd)==0)
+          add_face=false;
+      if(add_face)
+        roi_facets.insert(fv);
+    }
+  }
+
+  // set face_index map needed for border_halfedges and isotropic_remeshing
+  boost::property_map<Polyhedron, CGAL::face_index_t>::type fim
+    = get(CGAL::face_index, *polyhedron());
+  unsigned int id = 0;
+
+  // estimate the target_length using the perimeter of the region to remesh
+  bool automatic_target_length = !ui_widget->remeshingEdgeLengthInput_checkBox->isChecked();
+  double estimated_target_length = 0.;
+  if (automatic_target_length)
+  {
+    BOOST_FOREACH(face_descriptor f, faces(*polyhedron()))
+      put(fim, f, id++);
+    std::set<halfedge_descriptor> roi_border_halfedges;
+    CGAL::Polygon_mesh_processing::border_halfedges(roi_facets, g,
+      std::inserter(roi_border_halfedges, roi_border_halfedges.begin()));
+
+    double sum_len=0.;
+    BOOST_FOREACH(halfedge_descriptor h, roi_border_halfedges)
+    {
+      sum_len += CGAL::sqrt(CGAL::squared_distance(
+                    get(vpmap, source(h, g)), get(vpmap, target(h, g))));
+    }
+    if (sum_len==0) automatic_target_length = false;
+    else
+      estimated_target_length = sum_len / (0. + roi_border_halfedges.size());
+  }
+
+  double target_length = automatic_target_length
+    ? estimated_target_length
+    : ui_widget->remeshing_edge_length_spinbox->value();
+
+  unsigned int nb_iter = ui_widget->remeshing_iterations_spinbox->value();
+
+  std::cout << "Remeshing...";
+  CGAL::Polygon_mesh_processing::isotropic_remeshing(
+      roi_facets
+    , target_length
+    , *polyhedron()
+    , CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter)
+    .protect_constraints(false)
+    .vertex_point_map(vpmap)
+    );
+  std::cout << "done." << std::endl;
+
+  //reset ROI from its outside border roi_border
+  clear_roi();
+  do{
+    delete_ctrl_vertices_group(false);
+  }
+  while(!ctrl_vertex_frame_map.empty());
+
+  poly_item->update_vertex_indices();
+  poly_item->update_halfedge_indices();
+  delete deform_mesh;
+  deform_mesh = new Deform_mesh(*(poly_item->polyhedron()),
+                                Deform_mesh::Vertex_index_map(),
+                                Deform_mesh::Hedge_index_map(),
+                                vpmap);
+
+  reset_drawing_data();
+  compute_normals_and_vertices();
+
+  poly_item->invalidate_aabb_tree(); // invalidate the AABB tree
+  create_ctrl_vertices_group();
+
+  Q_EMIT itemChanged();
+}
+
+void Scene_edit_polyhedron_item::timerEvent(QTimerEvent* /*event*/)
+{ // just handle deformation - paint like selection is handled in eventFilter()
+  if(state.ctrl_pressing && (state.left_button_pressing || state.right_button_pressing)) {
+      invalidateOpenGLBuffers();
+    if(!ui_widget->ActivatePivotingCheckBox->isChecked()) {
+        deform();
+    }
+    else {
+      Q_EMIT itemChanged(); // for redraw while Pivoting (since we close signals of manipulatedFrames while pivoting, 
+                          // for now redraw with timer)
+    }
+  }
+}
+bool Scene_edit_polyhedron_item::eventFilter(QObject* /*target*/, QEvent *event)
+{
+  // This filter is both filtering events from 'viewer' and 'main window'
+  Mouse_keyboard_state_deformation old_state = state;
+  ////////////////// TAKE EVENTS /////////////////////
+  // key events
+  if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) 
+  {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+    Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
+
+    state.ctrl_pressing = modifiers.testFlag(Qt::ControlModifier);
+    state.shift_pressing = modifiers.testFlag(Qt::ShiftModifier);
+  }
+  // mouse events
+  if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease)
+	{
+    QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
+    if(mouse_event->button() == Qt::LeftButton) {
+      state.left_button_pressing = event->type() == QEvent::MouseButtonPress;
+    }
+    if(mouse_event->button() == Qt::RightButton) {
+      state.right_button_pressing = event->type() == QEvent::MouseButtonPress;
+    }    
+  }
+  ////////////////// //////////////// /////////////////////
+
+  if(!poly_item->visible()) { return false; } // if not visible just update event state but don't do any action
+
+  // check state changes between old and current state
+  bool ctrl_pressed_now = state.ctrl_pressing && !old_state.ctrl_pressing;
+  bool ctrl_released_now = !state.ctrl_pressing && old_state.ctrl_pressing;
+  if(ctrl_pressed_now || ctrl_released_now || event->type() == QEvent::HoverMove)
+  {// activate a handle manipulated frame
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    const QPoint& p = viewer->mapFromGlobal(QCursor::pos());
+    bool need_repaint = activate_closest_manipulated_frame(p.x(), p.y());
+
+    if (!ui_widget->ActivatePivotingCheckBox->isChecked() &&
+        ctrl_released_now && ui_widget->RemeshingCheckBox->isChecked())
+    {
+      remesh();
+    }
+
+    if(need_repaint) { Q_EMIT itemChanged(); }
+  }
+
+  return false;
+}
+
+#include "opengl_tools.h"
+void Scene_edit_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Edges]->bind();
+    program = getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", QColor(0,0,0));
+    viewer->glDrawElements(GL_LINES, (GLsizei) edges.size(), GL_UNSIGNED_INT, edges.data());
+    program->release();
+    vaos[Edges]->release();
+
+
+    vaos[Frame_plane]->bind();
+    program = getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", QColor(0,0,0));
+    viewer->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei)pos_frame_plane.size()/3);
+    program->release();
+    vaos[Frame_plane]->release();
+
+
+  if(rendering_mode == Wireframe) {
+        draw_ROI_and_control_vertices(viewer);
+  }
+}
+void Scene_edit_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Facets]->bind();
+    program = getShaderProgram(PROGRAM_WITH_LIGHT);
+    attrib_buffers(viewer,PROGRAM_WITH_LIGHT);
+    program->bind();
+    QColor color = this->color();
+    program->setAttributeValue("colors", color);
+    viewer->glDrawElements(GL_TRIANGLES, (GLsizei) tris.size(), GL_UNSIGNED_INT, tris.data());
+    program->release();
+    vaos[Facets]->release();
+    draw_edges(viewer);
+    draw_ROI_and_control_vertices(viewer);
+
+}
+
+void Scene_edit_polyhedron_item::draw_frame_plane(QGLViewer* ) const
+{
+    pos_frame_plane.resize(15);
+    for(Ctrl_vertices_group_data_list::const_iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data)
+    {
+          const double diag = scene_diag();
+          qglviewer::Vec base1(1,0,0);
+          qglviewer::Vec base2(0,1,0);
+
+          qglviewer::Quaternion orientation=hgb_data->frame->orientation();
+          base1=orientation.rotate(base1);
+          base2=orientation.rotate(base2);
+
+          qglviewer::Vec center = hgb_data->calculate_initial_center();
+          qglviewer::Vec p1 = center - diag*base1 - diag*base2;
+          qglviewer::Vec p2 = center + diag*base1 - diag*base2;
+          qglviewer::Vec p3 = center + diag*base1 + diag*base2;
+          qglviewer::Vec p4 = center - diag*base1 + diag*base2;
+
+          pos_frame_plane[0] = p1.x ; pos_frame_plane[1] = p1.y; pos_frame_plane[2] =p1.z ;
+          pos_frame_plane[3] = p2.x ; pos_frame_plane[4] = p2.y; pos_frame_plane[5] =p2.z ;
+          pos_frame_plane[6] = p3.x ; pos_frame_plane[7] = p3.y; pos_frame_plane[8] =p3.z ;
+          pos_frame_plane[9] = p4.x ; pos_frame_plane[10]= p4.y; pos_frame_plane[11] =p4.z ;
+          pos_frame_plane[12] = p1.x ; pos_frame_plane[13]= p1.y; pos_frame_plane[14] =p1.z ;
+    }
+}
+
+void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices(CGAL::Three::Viewer_interface* viewer) const {
+
+  CGAL::GL::Color color;
+  CGAL::GL::Point_size point_size; point_size.set_point_size(5);
+
+  color.set_rgb_color(0, 1.f, 0);
+  if(ui_widget->ShowROICheckBox->isChecked()) {
+
+        if(!ui_widget->ShowAsSphereCheckBox->isChecked() || !viewer->extension_is_found) {
+
+            vaos[Roi_points]->bind();
+            program = getShaderProgram(PROGRAM_NO_SELECTION);
+            attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+            program->bind();
+            program->setAttributeValue("colors", QColor(0,255,0));
+            viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_ROI/3));
+            program->release();
+            vaos[Roi_points]->release();
+        }
+        else{
+            vaos[ROI_spheres]->bind();
+            program = getShaderProgram(PROGRAM_INSTANCED);
+            attrib_buffers(viewer,PROGRAM_INSTANCED);
+            program->bind();
+
+            program->setAttributeValue("colors", QColor(0,255,0));
+            viewer->glDrawArraysInstanced(GL_TRIANGLES, 0,
+                                        static_cast<GLsizei>(nb_sphere/3),
+                                        static_cast<GLsizei>(nb_ROI/3));
+            program->release();
+            vaos[ROI_spheres]->release();
+    }
+  }
+
+    if(!ui_widget->ShowAsSphereCheckBox->isChecked() || !viewer->extension_is_found) {
+        vaos[Control_points]->bind();
+        program = getShaderProgram(PROGRAM_NO_SELECTION);
+        attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+        program->bind();
+        program->setAttributeValue("colors", QColor(255,0,0));
+        viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_control/3));
+        program->release();
+        vaos[Control_points]->release();
+    }
+    else{
+        vaos[Control_spheres]->bind();
+        program = getShaderProgram(PROGRAM_INSTANCED);
+        attrib_buffers(viewer,PROGRAM_INSTANCED);
+        program->bind();
+        program->setAttributeValue("colors", QColor(255,0,0));
+        viewer->glDrawArraysInstanced(GL_TRIANGLES, 0,
+                                    static_cast<GLsizei>(nb_sphere/3),
+                                    static_cast<GLsizei>(nb_control/3));
+        program->release();
+        vaos[Control_spheres]->release();
+    }
+
+    QGLViewer* viewerB = *QGLViewer::QGLViewerPool().begin();
+  for(Ctrl_vertices_group_data_list::const_iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data)
+  {
+        if(hgb_data->frame == viewerB->manipulatedFrame())
+    {      
+            GLfloat f_matrix[16];
+            for(int i =0; i<16; i++)
+                f_matrix[i] = hgb_data->frame->matrix()[i];
+            QMatrix4x4 f_mat;
+                for(int i=0; i<16; i++)
+                    f_mat.data()[i] = (float)f_matrix[i];
+            vaos[Axis]->bind();
+            program = getShaderProgram(PROGRAM_NO_SELECTION);
+            attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+            program->bind();
+            program->setUniformValue("f_matrix", f_mat);
+            viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_axis/3));
+            program->release();
+            vaos[Axis]->release();
+
+            //QGLViewer::drawAxis(length_of_axis);
+      // draw bbox
+      if(!ui_widget->ActivatePivotingCheckBox->isChecked())
+      {
+                GLfloat f_matrix[16];
+                GLfloat trans[3];
+                GLfloat trans2[3];
+
+                trans[0] = hgb_data->frame->position().x;
+                trans[1] = hgb_data->frame->position().y;
+                trans[2] = hgb_data->frame->position().z;
+
+                trans2[0] = -hgb_data->frame_initial_center.x;
+                trans2[1] = -hgb_data->frame_initial_center.y;
+                trans2[2] = -hgb_data->frame_initial_center.z;
+
+                for(int i =0; i<16; i++)
+                    f_matrix[i] = hgb_data->frame->orientation().matrix()[i];
+                QMatrix4x4 f_mat;
+                QMatrix4x4 mvp_mat;
+
+                QVector3D vec(trans[0], trans[1], trans[2]);
+                QVector3D vec2(trans2[0], trans2[1], trans2[2]);
+                    for(int i=0; i<16; i++)
+                        f_mat.data()[i] = (float)f_matrix[i];
+                    GLdouble temp_mat[16];
+                    viewer->camera()->getModelViewProjectionMatrix(temp_mat);
+                    for(int i=0; i<16; i++)
+                        mvp_mat.data()[i] = (float)temp_mat[i];
+                vaos[4]->bind();
+                bbox_program.bind();
+                bbox_program.setUniformValue("rotations", f_mat);
+                bbox_program.setUniformValue("translation", vec);
+                bbox_program.setUniformValue("translation_2", vec2);
+                bbox_program.setUniformValue("mvp_matrix", mvp_mat);
+                program->setAttributeValue("colors", QColor(255,0,0));
+                viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_bbox/3));
+                bbox_program.release();
+                vaos[4]->release();
+    }
+    }
+  }
+
+  } 
+
+
+void Scene_edit_polyhedron_item::compute_bbox(const CGAL::Three::Scene_interface::Bbox& bb){
+    pos_bbox.resize(24*3);
+
+    pos_bbox[0]=bb.xmin; pos_bbox[1]=bb.ymin; pos_bbox[2]=bb.zmin;
+    pos_bbox[3]=bb.xmax; pos_bbox[4]=bb.ymin; pos_bbox[5]=bb.zmin;
+    pos_bbox[6]=bb.xmin; pos_bbox[7]=bb.ymin; pos_bbox[8]=bb.zmin;
+    pos_bbox[9]=bb.xmin; pos_bbox[10]=bb.ymax; pos_bbox[11]=bb.zmin;
+    
+    pos_bbox[12]=bb.xmin; pos_bbox[13]=bb.ymin; pos_bbox[14]=bb.zmin;
+    pos_bbox[15]=bb.xmin; pos_bbox[16]=bb.ymin; pos_bbox[17]=bb.zmax;
+    pos_bbox[18]= bb.xmax; pos_bbox[19]=bb.ymin; pos_bbox[20]=bb.zmin;
+    pos_bbox[21]= bb.xmax; pos_bbox[22]=bb.ymax; pos_bbox[23]=bb.zmin;
+    
+    pos_bbox[24]= bb.xmax; pos_bbox[25]=bb.ymin; pos_bbox[26]=bb.zmin;
+    pos_bbox[27]= bb.xmax; pos_bbox[28]=bb.ymin; pos_bbox[29]=bb.zmax;
+    pos_bbox[30]=bb.xmin; pos_bbox[31]=bb.ymax; pos_bbox[32]=bb.zmin;
+    pos_bbox[33]=bb.xmax; pos_bbox[34]=bb.ymax; pos_bbox[35]=bb.zmin;
+    
+    pos_bbox[36]=bb.xmin; pos_bbox[37]=bb.ymax; pos_bbox[38]=bb.zmin;
+    pos_bbox[39]=bb.xmin; pos_bbox[40]=bb.ymax; pos_bbox[41]=bb.zmax;
+    pos_bbox[42]=bb.xmin; pos_bbox[43]=bb.ymin; pos_bbox[44]=bb.zmax;
+    pos_bbox[45]=bb.xmax; pos_bbox[46]=bb.ymin; pos_bbox[47]=bb.zmax;
+
+    pos_bbox[48]=bb.xmin; pos_bbox[49]=bb.ymin; pos_bbox[50]=bb.zmax;
+    pos_bbox[51]=bb.xmin; pos_bbox[52]=bb.ymax; pos_bbox[53]=bb.zmax;
+    pos_bbox[54]=bb.xmax; pos_bbox[55]=bb.ymax; pos_bbox[56]=bb.zmax;
+    pos_bbox[57]=bb.xmin; pos_bbox[58]=bb.ymax; pos_bbox[59]=bb.zmax;
+
+    pos_bbox[60]=bb.xmax; pos_bbox[61]=bb.ymax; pos_bbox[62]=bb.zmax;
+    pos_bbox[63]=bb.xmax; pos_bbox[64]=bb.ymin; pos_bbox[65]=bb.zmax;
+    pos_bbox[66]=bb.xmax; pos_bbox[67]=bb.ymax; pos_bbox[68]=bb.zmax;
+    pos_bbox[69]=bb.xmax; pos_bbox[70]=bb.ymax; pos_bbox[71]=bb.zmin;
+    
+}
+
+void Scene_edit_polyhedron_item::invalidateOpenGLBuffers()
+{
+    compute_normals_and_vertices();
+    update_normals();
+    compute_bbox();
+    are_buffers_filled = false;
+}
+
+Scene_polyhedron_item* Scene_edit_polyhedron_item::to_polyhedron_item() {
+  Scene_polyhedron_item* poly_item_tmp = poly_item;
+  poly_item->set_color_vector_read_only(false);
+  own_poly_item=false;
+  poly_item_tmp->invalidateOpenGLBuffers();
+  return poly_item_tmp;
+}
+
+Polyhedron* Scene_edit_polyhedron_item::polyhedron()       
+{ return poly_item->polyhedron(); }
+const Polyhedron* Scene_edit_polyhedron_item::polyhedron() const 
+{ return poly_item->polyhedron(); }
+QString Scene_edit_polyhedron_item::toolTip() const
+{
+  if(!poly_item->polyhedron())
+    return QString();
+
+  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
+                     "<p>Number of vertices: %2<br />"
+                     "Number of edges: %3<br />"
+                     "Number of facets: %4</p>")
+    .arg(this->name())
+    .arg(poly_item->polyhedron()->size_of_vertices())
+    .arg(poly_item->polyhedron()->size_of_halfedges()/2)
+    .arg(poly_item->polyhedron()->size_of_facets())
+    .arg(this->renderingModeName())
+    .arg(this->color().name());
+}
+bool Scene_edit_polyhedron_item::isEmpty() const {
+  return poly_item->isEmpty();
+}
+void Scene_edit_polyhedron_item::compute_bbox() const {
+  _bbox = poly_item->bbox();
+}
+
+void Scene_edit_polyhedron_item::setVisible(bool b) {
+  poly_item->setVisible(b);
+  Scene_item::setVisible(b);
+  if(!b) {
+    (*QGLViewer::QGLViewerPool().begin())->setManipulatedFrame(NULL);
+  }
+}
+void Scene_edit_polyhedron_item::setColor(QColor c) {
+  poly_item->setColor(c);
+  Scene_item::setColor(c);
+}
+void Scene_edit_polyhedron_item::setName(QString n) {
+  Scene_item::setName(n);
+  n.replace(" (edit)", "");
+  poly_item->setName(n);
+}
+void Scene_edit_polyhedron_item::setRenderingMode(RenderingMode m) {
+  poly_item->setRenderingMode(m);
+  Scene_item::setRenderingMode(m);
+}
+Scene_edit_polyhedron_item* Scene_edit_polyhedron_item::clone() const {
+  return 0;
+}
+void Scene_edit_polyhedron_item::select(
+          double orig_x,
+          double orig_y,
+          double orig_z,
+          double dir_x,
+          double dir_y,
+          double dir_z)
+{
+  Scene_item::select(orig_x,
+                     orig_y,
+                     orig_z,
+                     dir_x,
+                     dir_y,
+                     dir_z);
+  poly_item->select(orig_x,
+                       orig_y,
+                       orig_z,
+                       dir_x,
+                       dir_y,
+                       dir_z);
+}
+
+bool Scene_edit_polyhedron_item::keyPressEvent(QKeyEvent* e)
+{
+  //setting/unsetting rotation constraints
+  if (e->key()==Qt::Key_R && !state.ctrl_pressing)
+  {
+    is_rot_free = !is_rot_free;
+    rot_constraint.setRotationConstraintType( is_rot_free?
+        qglviewer::AxisPlaneConstraint::FREE:
+        qglviewer::AxisPlaneConstraint::AXIS);
+    return true;
+  }
+
+  return false;
+}
+
+void Scene_edit_polyhedron_item::create_Sphere(double R)
+{
+  create_flat_sphere(R, pos_sphere, normals_sphere);
+}
+
+//#include "Scene_edit_polyhedron_item.moc"
+void Scene_edit_polyhedron_item::update_frame_plane()
+{
+  for(Ctrl_vertices_group_data_list::iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data)
+  {
+      hgb_data->refresh();
+  }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h
new file mode 100644
index 0000000..1c63217
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h
@@ -0,0 +1,777 @@
+#ifndef SCENE_EDIT_POLYHEDRON_ITEM_H
+#define SCENE_EDIT_POLYHEDRON_ITEM_H
+//#define CGAL_PROFILE 
+#include "Scene_edit_polyhedron_item_config.h"
+#include "Scene_polyhedron_item.h"
+#include "Scene_polyhedron_item_k_ring_selection.h"
+#include "Travel_isolated_components.h"
+
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+#include <iostream>
+#include <fstream>
+
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QGLViewer/camera.h>
+
+#include "ui_Deform_mesh.h"
+
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/Surface_mesh_deformation.h>
+#include <CGAL/Polygon_mesh_processing/remesh.h>
+
+#include <boost/function_output_iterator.hpp>
+#include <QGLBuffer>
+#include <QGLShader>
+#include <QGLShaderProgram>
+
+
+typedef Polyhedron::Vertex_handle Vertex_handle;
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor		vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator		  vertex_iterator;
+typedef boost::graph_traits<Polyhedron>::face_descriptor      face_descriptor;
+typedef boost::graph_traits<Polyhedron>::halfedge_descriptor  halfedge_descriptor;
+typedef boost::graph_traits<Polyhedron>::edge_descriptor      edge_descriptor;
+
+struct Array_based_vertex_point_map
+{
+public:
+  typedef vertex_descriptor            key_type;
+  typedef Polyhedron::Traits::Point_3  value_type;
+  typedef const value_type&                  reference;
+  typedef boost::read_write_property_map_tag category;
+  Array_based_vertex_point_map(std::vector<double>* positions) : positions(positions) {}
+  std::vector<double>* positions;
+};
+
+
+inline
+Array_based_vertex_point_map::reference
+get(Array_based_vertex_point_map,
+  Array_based_vertex_point_map::key_type key) {
+    return key->point();
+}
+
+inline
+void
+put(Array_based_vertex_point_map pmap,
+  Array_based_vertex_point_map::key_type key,
+  Array_based_vertex_point_map::value_type val)
+{
+  key->point() = val; // to make things easy (ray selection after deformation, save to polyhedron after close etc),
+  // I also change point() of vertex together with positions list
+  // So that we do not need to pmap everywhere other than draw
+  if (key->id() == std::size_t(-1))
+  {
+    key->id() = pmap.positions->size() / 3;
+    pmap.positions->push_back(val.x());
+    pmap.positions->push_back(val.y());
+    pmap.positions->push_back(val.z());
+  }
+  else
+  {
+  std::size_t pos = key->id() * 3;
+  (*pmap.positions)[pos] = val.x();
+  (*pmap.positions)[pos+1] = val.y();
+  (*pmap.positions)[pos+2] = val.z();
+  }
+}
+
+typedef CGAL::Surface_mesh_deformation<Polyhedron, CGAL::Default, CGAL::Default, CGAL::ORIGINAL_ARAP
+  ,CGAL::Default, CGAL::Default, CGAL::Default, 
+  Array_based_vertex_point_map> Deform_mesh;
+
+
+typedef Deform_mesh::Point  Point;
+
+/// For storing associated data with a group of control vertices
+class Control_vertices_data
+{
+public:
+  std::vector<vertex_descriptor> ctrl_vertices_group;
+  qglviewer::ManipulatedFrame* frame;  // manframe assoc with a group of control vertices
+  qglviewer::Vec frame_initial_center; // initial center of frame
+  CGAL::Three::Scene_interface::Bbox bbox;          // bbox of control vertices inside group
+  qglviewer::Vec rot_direction;        // vector for constraint rotation
+private:
+  std::vector<qglviewer::Vec> initial_positions;
+  Deform_mesh* deform_mesh;
+
+public:
+  Control_vertices_data(Deform_mesh* deform_mesh, qglviewer::ManipulatedFrame* frame = 0)
+    : frame(frame), bbox(0,0,0,0,0,0), rot_direction(0.,0.,1.), deform_mesh(deform_mesh)
+  { }
+  void refresh()
+  {
+    for(std::vector<vertex_descriptor>::iterator it = ctrl_vertices_group.begin(); it != ctrl_vertices_group.end(); ) {
+      if(!deform_mesh->is_control_vertex(*it)) {
+        it = ctrl_vertices_group.erase(it);
+      }
+      else { ++it; }
+    }
+
+    reset_initial_positions();
+    frame_initial_center = calculate_initial_center();
+    bbox = calculate_initial_bbox();
+
+    bool oldState = frame->blockSignals(true); // do not let it Q_EMIT modified, which will cause a deformation
+                                  // but we are just adjusting the center so it does not require a deformation
+    // frame->setOrientation(qglviewer::Quaternion());
+    frame->setPosition(frame_initial_center);
+    frame->blockSignals(oldState);
+  }
+  void set_target_positions()
+  {
+    std::vector<vertex_descriptor>::iterator hb = ctrl_vertices_group.begin();
+    for(std::vector<qglviewer::Vec>::iterator it = initial_positions.begin(); it != initial_positions.end(); ++it, ++hb)
+    {
+      qglviewer::Vec dif_from_initial_center = (*it) - frame_initial_center;
+      qglviewer::Vec rotated = frame->orientation() * dif_from_initial_center;
+      qglviewer::Vec rotated_and_translated = rotated + frame->position();
+
+      deform_mesh->set_target_position(*hb, Point(rotated_and_translated.x, rotated_and_translated.y, rotated_and_translated.z) );
+    }
+  }
+  qglviewer::Vec calculate_initial_center() const
+  {
+    qglviewer::Vec center_acc(0, 0, 0);
+    if (initial_positions.empty()) { return center_acc; }
+
+    for (std::vector<qglviewer::Vec>::const_iterator it = initial_positions.begin();
+         it != initial_positions.end(); ++it)
+    {
+      center_acc += (*it);
+    }
+    return center_acc / initial_positions.size();
+  }
+
+private:
+  void reset_initial_positions()
+  {
+    initial_positions.clear();
+    
+    for(std::vector<vertex_descriptor>::iterator hb = ctrl_vertices_group.begin(); hb != ctrl_vertices_group.end(); ++hb)
+    {
+      qglviewer::Vec point((*hb)->point().x(), (*hb)->point().y(), (*hb)->point().z() );
+      initial_positions.push_back(point);
+    }
+  }
+  CGAL::Three::Scene_interface::Bbox calculate_initial_bbox()
+  {    
+    if(initial_positions.empty()) {return CGAL::Three::Scene_interface::Bbox(0,0,0,0,0,0); }
+
+    const qglviewer::Vec& p_i = *(initial_positions.begin());
+    CGAL::Three::Scene_interface::Bbox bbox(p_i.x, p_i.y, p_i.z, p_i.x, p_i.y, p_i.z);
+
+    for(std::vector<qglviewer::Vec>::iterator it = initial_positions.begin(); it != initial_positions.end(); ++it)
+    {
+      const qglviewer::Vec& p_i = (*it);
+      CGAL::Three::Scene_interface::Bbox bbox_it(p_i.x, p_i.y, p_i.z, p_i.x, p_i.y, p_i.z);
+      bbox = bbox + bbox_it;
+    }
+    return bbox;
+  }
+};
+
+// To hold pressing states together
+struct Mouse_keyboard_state_deformation
+{
+  bool ctrl_pressing;
+  bool shift_pressing;
+  bool left_button_pressing;
+  bool right_button_pressing;
+
+  Mouse_keyboard_state_deformation() 
+    : ctrl_pressing(false), shift_pressing(false), left_button_pressing(false), right_button_pressing(false)
+  { }
+};
+
+// This class represents a polyhedron in the OpenGL scene
+class SCENE_EDIT_POLYHEDRON_ITEM_EXPORT Scene_edit_polyhedron_item 
+  : public CGAL::Three::Scene_item {
+  Q_OBJECT
+public:  
+  /// Create an Scene_edit_polyhedron_item from a Scene_polyhedron_item.
+  /// The ownership of the polyhedron is moved to the new edit_polyhedron
+  /// item.
+  Scene_edit_polyhedron_item(Scene_polyhedron_item* poly_item, Ui::DeformMesh* ui_widget, QMainWindow* mw);
+  ~Scene_edit_polyhedron_item();
+
+  /// Returns 0, so that one cannot clone an "edit polyhedron" item.
+  Scene_edit_polyhedron_item* clone() const;
+
+  // Function for displaying meta-data of the item
+  QString toolTip() const;
+
+  void setColor(QColor c);
+  void setName(QString n);
+  void setVisible(bool b);
+  void setRenderingMode(RenderingMode m);
+  
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const { 
+    return m == Gouraud; 
+  }
+  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+  void draw() const{}
+  void draw(CGAL::Three::Viewer_interface*) const;
+  void draw_edges(CGAL::Three::Viewer_interface*) const;
+  void draw_bbox(const CGAL::Three::Scene_interface::Bbox&) const;
+  void draw_ROI_and_control_vertices(CGAL::Three::Viewer_interface *viewer) const;
+  void draw_frame_plane(QGLViewer *) const;
+
+  // Get wrapped polyhedron
+  Polyhedron*       polyhedron();
+  const Polyhedron* polyhedron() const;
+
+  /// Returns a Scene_polyhedron_item from the edit polyhedron item, and
+  /// transfer the ownership of the polyhedron to it.
+  /// The item 'this' must be destroy just after a call to this function.
+  Scene_polyhedron_item* to_polyhedron_item();
+
+  // Get dimensions
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  void compute_bbox() const;
+
+  int get_k_ring()       { return k_ring_selector.k_ring; }
+  void set_k_ring(int v) { k_ring_selector.k_ring = v; }
+
+  // take mouse events from viewer, main-window does not work
+  // take keyboard events from main-window, which is more stable
+  bool eventFilter(QObject *target, QEvent *event);
+  void update_frame_plane();
+  
+protected:
+  void timerEvent(QTimerEvent *event);
+
+
+public Q_SLOTS:
+  void invalidateOpenGLBuffers();
+  void selected(const std::set<Polyhedron::Vertex_handle>& m)
+  {
+    bool any_changes = false;
+    for(std::set<vertex_descriptor>::const_iterator it = m.begin(); it != m.end(); ++it)
+    {
+      vertex_descriptor vh = *it;
+      bool changed = false;
+      if(ui_widget->ROIRadioButton->isChecked()) {
+        if(ui_widget->InsertRadioButton->isChecked()) { changed = insert_roi_vertex(vh); }
+        else          { changed = erase_roi_vertex(vh);  }
+      }
+      else {
+        if(ui_widget->InsertRadioButton->isChecked()) { changed = insert_control_vertex(vh); }
+        else          { changed = erase_control_vertex(vh);  }
+      }
+      any_changes |= changed;
+    }
+    if(any_changes) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+  }
+
+  void select(double orig_x,
+              double orig_y,
+              double orig_z,
+              double dir_x,
+              double dir_y,
+              double dir_z);
+
+  void deform(); // deform the mesh
+  void remesh();
+
+// members
+private:
+  Ui::DeformMesh* ui_widget;
+  Scene_polyhedron_item* poly_item;
+  // For drawing
+  mutable std::vector<GLdouble> positions;
+  mutable std::vector<unsigned int> tris;
+  mutable std::vector<unsigned int> edges;
+  mutable std::vector<GLdouble> color_lines;
+  mutable std::vector<GLdouble> color_bbox;
+  mutable std::vector<GLdouble> ROI_points;
+  mutable std::vector<GLdouble> control_points;
+  mutable std::vector<GLdouble> ROI_color;
+  mutable std::vector<GLdouble> control_color;
+  mutable std::vector<GLdouble> normals;
+  mutable std::vector<GLdouble> pos_bbox;
+  mutable std::vector<GLdouble> pos_axis;
+  mutable std::vector<GLdouble> pos_sphere;
+  mutable std::vector<GLdouble> normals_sphere;
+  mutable std::vector<GLdouble> pos_frame_plane;
+  mutable QOpenGLShaderProgram *program;
+  mutable QOpenGLShaderProgram bbox_program;
+  mutable std::size_t nb_ROI;
+  mutable std::size_t nb_sphere;
+  mutable std::size_t nb_control;
+  mutable std::size_t nb_axis;
+  mutable std::size_t nb_bbox;
+
+  enum Buffer
+  {
+      Facet_vertices =0,
+      Facet_normals,
+      Roi_vertices,
+      Control_vertices,
+      Sphere_vertices,
+      Sphere_normals,
+      Bbox_vertices,
+      Axis_vertices,
+      Axis_colors,
+      Frame_vertices,
+      NumberOfBuffers
+  };
+  enum Vao
+  {
+      Facets=0,
+      Roi_points,
+      Edges,
+      ROI_spheres,
+      BBox,
+      Control_points,
+      Control_spheres,
+      Axis,
+      Frame_plane,
+      NumberOfVaos
+  };
+  mutable QOpenGLBuffer *in_bu;
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+  void compute_normals_and_vertices(void);
+  void compute_bbox(const CGAL::Three::Scene_interface::Bbox&);
+  void create_Sphere(double);
+  void reset_drawing_data();
+
+  Deform_mesh* deform_mesh;
+  typedef std::list<Control_vertices_data> Ctrl_vertices_group_data_list;
+  Ctrl_vertices_group_data_list::iterator active_group;
+  Ctrl_vertices_group_data_list ctrl_vertex_frame_map; // keep list of group of control vertices with assoc data
+
+  double length_of_axis; // for drawing axis at a group of control vertices
+
+  // by interleaving 'viewer's events (check constructor), keep followings:
+  Mouse_keyboard_state_deformation state;
+
+  //For constraint rotation
+  qglviewer::LocalConstraint rot_constraint;
+  bool is_rot_free;
+
+  bool own_poly_item; //indicates if the poly_item should be deleted by the destructor
+  Scene_polyhedron_item_k_ring_selection k_ring_selector;
+
+public:
+  // Deformation related functions //
+  bool insert_control_vertex(vertex_descriptor v)
+  {
+    if(!is_there_any_ctrl_vertices_group()) {
+      print_message("There is no group of control vertices, create one!");
+      return false; 
+    } // no group of control vertices to insert
+
+    bool inserted = deform_mesh->insert_control_vertex(v);
+    if(inserted) {
+      active_group->ctrl_vertices_group.push_back(v);
+      active_group->refresh();
+    }
+    return inserted;
+  }
+
+  bool insert_roi_vertex(vertex_descriptor v)
+  {
+    return deform_mesh->insert_roi_vertex(v);
+  }
+  
+  bool erase_control_vertex(vertex_descriptor v)
+  {
+    if(deform_mesh->erase_control_vertex(v)) // API should be safe enough to do that (without checking empty group of control vertices etc.)
+    {
+      refresh_all_group_centers(); // since we don't know which group of control vertices v is erased from, refresh all
+      return true;
+    }
+
+    print_message("Selected vertex is not a control vertex!");
+    return false;     
+  }
+
+  bool erase_roi_vertex(vertex_descriptor v)
+  {
+    erase_control_vertex(v); // erase control vertex
+    return deform_mesh->erase_roi_vertex(v);
+  }
+
+  void set_all_vertices_as_roi()
+  {
+    vertex_iterator vb, ve;
+    for(boost::tie(vb, ve) = vertices(*polyhedron()); vb != ve; ++vb)
+    {
+      insert_roi_vertex(*vb);
+    }   
+  }
+
+  void clear_roi()
+  {
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      delete it->frame;
+    }
+    ctrl_vertex_frame_map.clear();
+    deform_mesh->clear_roi_vertices();
+
+    create_ctrl_vertices_group(); // create one new group of control vertices
+  } 
+
+  void create_ctrl_vertices_group()
+  {
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it) {
+      if(it->ctrl_vertices_group.empty()) { 
+        active_group = it;
+        return;
+      }
+    }
+
+    // No empty group of control vertices
+    qglviewer::ManipulatedFrame* new_frame = new qglviewer::ManipulatedFrame();
+    new_frame->setRotationSensitivity(2.0f);
+
+    Control_vertices_data hgd(deform_mesh, new_frame);
+    ctrl_vertex_frame_map.push_back(hgd);
+    hgd.refresh();
+
+    active_group = --ctrl_vertex_frame_map.end();
+
+    invalidateOpenGLBuffers();
+    Q_EMIT itemChanged();
+
+    print_message("A new empty group of control vertices is created.");
+  }
+
+  void delete_ctrl_vertices_group(bool create_new = true)
+  {
+    if(!is_there_any_ctrl_vertices_group()) { 
+      print_message("There is no group of control vertices to be deleted!");
+      return; 
+    } // no group of control vertices
+
+    // delete group representative    
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      if(it == active_group)
+      {
+        delete it->frame;        
+        for(std::vector<vertex_descriptor>::iterator v_it = it->ctrl_vertices_group.begin(); v_it != it->ctrl_vertices_group.end(); ++v_it) {
+          deform_mesh->erase_control_vertex(*v_it);
+        }
+        ctrl_vertex_frame_map.erase(it);
+        break;
+      }
+    }
+
+    // assign another ctrl_vertices_group to active_group
+    Ctrl_vertices_group_data_list::iterator hgb, hge;
+    if( is_there_any_ctrl_vertices_group(hgb, hge) )
+    { 
+      active_group = hgb; 
+    } // no group of control vertices
+    else if(create_new)
+    { 
+      create_ctrl_vertices_group(); 
+    }
+  }
+
+  void prev_ctrl_vertices_group()
+  {
+    Ctrl_vertices_group_data_list::iterator hgb, hge;
+    if( !is_there_any_ctrl_vertices_group(hgb, hge) ) {
+      print_message("There is no group of control vertices to iterate on!");
+      return; 
+    }
+    // shift
+    if(hgb == active_group) { active_group = --hge; }
+    else                    {--active_group; }    
+  }
+
+  void next_ctrl_vertices_group()
+  {
+    Ctrl_vertices_group_data_list::iterator hgb, hge;
+    if( !is_there_any_ctrl_vertices_group(hgb, hge) ) {
+      print_message("There is no group of control vertices to iterate on!");
+      return; 
+    }
+    // shift
+    if(--hge == active_group) { active_group = hgb; }
+    else                      {++active_group; }    
+  }
+
+  void pivoting_end()
+  {       
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      //update constraint rotation vector, set only for the last group
+      it->rot_direction = it->frame->rotation().rotate( qglviewer::Vec(0.,0.,1.) );
+      //translate center of the frame
+      qglviewer::Vec vec= it->frame->position();
+      it->refresh();
+      it->frame_initial_center = vec;
+      it->frame->setPosition(vec);
+    }
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      it->frame->blockSignals(false);
+    }
+  }
+
+  void pivoting_begin()
+  {
+    is_rot_free=true;
+    rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
+    rot_constraint.setTranslationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
+
+    // just block signals to prevent deformation
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      it->frame->blockSignals(true);
+    }
+  }
+
+  void save_roi(const char* file_name) const
+  { 
+    std::ofstream out(file_name);
+    // save roi
+    out << deform_mesh->roi_vertices().size() << std::endl;
+    BOOST_FOREACH(vertex_descriptor vd, deform_mesh->roi_vertices())
+    {
+      out << vd->id() << " ";
+    }
+    out << std::endl;
+    // save control vertices
+    
+    out << ctrl_vertex_frame_map.size() << std::endl; // control vertices count
+    for(Ctrl_vertices_group_data_list::const_iterator hgb = ctrl_vertex_frame_map.begin(); hgb != ctrl_vertex_frame_map.end(); ++hgb) {
+
+      out << hgb->ctrl_vertices_group.size() << std::endl;
+      for(std::vector<vertex_descriptor>::const_iterator hb = hgb->ctrl_vertices_group.begin(); hb != hgb->ctrl_vertices_group.end(); ++hb) 
+      {
+        out << (*hb)->id() << " ";
+      }
+      out << std::endl;
+    }
+  }
+
+  void read_roi(const char* file_name)
+  { 
+    clear_roi();
+    delete_ctrl_vertices_group(false);
+
+    // put vertices to vector
+    std::vector<vertex_descriptor> all_vertices;
+    all_vertices.reserve(num_vertices(deform_mesh->halfedge_graph()));
+    vertex_iterator vb, ve;
+    for(boost::tie(vb, ve) = vertices(deform_mesh->halfedge_graph()); vb != ve; ++vb) {
+      all_vertices.push_back(*vb);
+    }
+    // read roi
+    std::ifstream in(file_name);
+    int roi_size;
+    in >> roi_size;
+    while(roi_size-- > 0)
+    {
+      std::size_t v_id;
+      in >> v_id;
+      insert_roi_vertex(all_vertices[v_id]);
+    }
+    // read control vertices
+    int ctrl_vertices_group_size;
+    in >> ctrl_vertices_group_size;
+    while(ctrl_vertices_group_size-- > 0)
+    {
+      create_ctrl_vertices_group();
+      int ctrl_size;
+      in >> ctrl_size;      
+      while(ctrl_size-- > 0) 
+      {                    
+        std::size_t v_id;
+        in >> v_id;
+        insert_control_vertex(all_vertices[v_id]);
+      }
+    }
+  }
+
+  void overwrite_deform_object()
+  {
+    deform_mesh->overwrite_initial_geometry();
+
+    refresh_all_group_centers();
+  }
+
+  void reset_deform_object()
+  {
+    deform_mesh->reset();
+    refresh_all_group_centers();
+  }
+
+  struct Is_selected {
+    Deform_mesh* dm;
+    Is_selected(Deform_mesh* dm) : dm(dm) {}
+    bool count(Vertex_handle vh) const {
+      return dm->is_roi_vertex(vh);
+    }
+  };
+
+  boost::optional<std::size_t> get_minimum_isolated_component() {
+    Travel_isolated_components::Minimum_visitor visitor;
+    Travel_isolated_components().travel<Vertex_handle>
+      (vertices(*polyhedron()).first, vertices(*polyhedron()).second, 
+       polyhedron()->size_of_vertices(), Is_selected(deform_mesh), visitor);
+    return visitor.minimum;
+  }
+
+  struct Select_roi_output {
+    Select_roi_output(Deform_mesh* dm) : dm(dm) { }
+    void operator()(Vertex_handle vh) {
+      dm->insert_roi_vertex(vh);
+    }
+    Deform_mesh* dm;
+  };
+
+  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
+    typedef boost::function_output_iterator<Select_roi_output> Output_iterator;
+    Output_iterator out(deform_mesh);
+
+    Travel_isolated_components::Selection_visitor<Output_iterator> visitor(threshold, out);
+    Travel_isolated_components().travel<Vertex_handle>
+      (vertices(*polyhedron()).first, vertices(*polyhedron()).second,
+      polyhedron()->size_of_vertices(), Is_selected(deform_mesh), visitor);
+
+    if(visitor.any_inserted) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+    return visitor.minimum_visitor.minimum;
+  }
+protected:
+  // Deformation related functions //
+  void print_message(const QString& /*message*/)
+  {
+    // std::cout << message.toStdString() << std::endl;
+  }
+
+  bool is_there_any_ctrl_vertices_group(Ctrl_vertices_group_data_list::iterator& hgb, Ctrl_vertices_group_data_list::iterator& hge)
+  {
+    hgb = ctrl_vertex_frame_map.begin(); hge = ctrl_vertex_frame_map.end();
+    return hgb != hge;
+  }
+
+  bool is_there_any_ctrl_vertices_group()
+  {
+    Ctrl_vertices_group_data_list::iterator hgb, hge;
+    return is_there_any_ctrl_vertices_group(hgb, hge);
+  }
+
+  bool is_there_any_ctrl_vertices()
+  {
+    Ctrl_vertices_group_data_list::iterator hgb, hge;
+    if(!is_there_any_ctrl_vertices_group(hgb, hge)) { return false; } // there isn't any group of control vertices
+
+    for(; hgb != hge; ++hgb) // check inside groups of control vertices
+    {
+      if(!hgb->ctrl_vertices_group.empty()) { return true; }
+    }
+    return false;
+  }
+
+  void refresh_all_group_centers()
+  {
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    { it->refresh(); }
+  }
+
+  bool activate_closest_manipulated_frame(int x, int y)
+  {
+    if(state.ctrl_pressing && (state.left_button_pressing || state.right_button_pressing) ) 
+    { // user is deforming currently don't change the state 
+      return false;  
+    }
+    if(ctrl_vertex_frame_map.empty()) { return false; }
+
+    rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
+    rot_constraint.setTranslationConstraintType(qglviewer::AxisPlaneConstraint::FREE);
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    qglviewer::Camera* camera = viewer->camera();
+
+    if(!state.ctrl_pressing) 
+    {   
+      if(viewer->manipulatedFrame() == NULL) 
+      { return false;}
+      viewer->setManipulatedFrame(NULL);    
+      return true;
+    }
+    
+    // now find closest frame and make it active manipulated frame
+    Ctrl_vertices_group_data_list::iterator min_it = ctrl_vertex_frame_map.begin();    
+    const qglviewer::Vec& pos_it = camera->projectedCoordinatesOf(min_it->frame->position());
+    float min_dist = std::pow(pos_it.x - x, 2) + std::pow(pos_it.y - y, 2);
+
+    for(Ctrl_vertices_group_data_list::iterator it = ctrl_vertex_frame_map.begin(); it != ctrl_vertex_frame_map.end(); ++it)
+    {
+      const qglviewer::Vec& pos_it = camera->projectedCoordinatesOf(it->frame->position());
+      float dist = std::pow(pos_it.x - x, 2) + std::pow(pos_it.y - y, 2);
+      if(dist < min_dist) {
+        min_dist = dist;
+        min_it = it;
+      }
+    }
+
+    //set rotation constraint for the manipulated frame
+    if (!is_rot_free){
+      rot_constraint.setRotationConstraintDirection(min_it->rot_direction);
+      rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::AXIS);
+      min_it->frame->setConstraint(&rot_constraint);
+    }
+    else
+    {
+      if( ui_widget->ActivateFixedPlaneCheckBox->isChecked())
+      {
+        // the constraint is local to the frame
+        rot_constraint.setTranslationConstraint(qglviewer::AxisPlaneConstraint::PLANE,qglviewer::Vec(0,0,1));
+         if(!ui_widget->ActivatePivotingCheckBox->isChecked()){
+             rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
+         }
+         min_it->frame->setConstraint(&rot_constraint);
+      }
+    }
+
+    if(viewer->manipulatedFrame() == min_it->frame)
+    { return false; }
+    viewer->setManipulatedFrame(min_it->frame);
+
+    return true;
+  }
+
+  bool keyPressEvent(QKeyEvent* e);
+
+  void update_normals() {
+    BOOST_FOREACH(vertex_descriptor vd, deform_mesh->roi_vertices())
+    {
+      std::size_t id = vd->id();
+      const Polyhedron::Traits::Vector_3& n = 
+        CGAL::Polygon_mesh_processing::compute_vertex_normal(vd, deform_mesh->halfedge_graph());
+      normals[id*3] = n.x();
+      normals[id*3+1] = n.y(); 
+      normals[id*3+2] = n.z(); 
+
+    }
+  }
+
+  double scene_diag() const {
+    const double& xdelta = bbox().xmax - bbox().xmin;
+    const double& ydelta = bbox().ymax - bbox().ymin;
+    const double& zdelta = bbox().zmax - bbox().zmin;
+    const double diag = std::sqrt(xdelta*xdelta +
+      ydelta*ydelta +
+      zdelta*zdelta);
+    return diag * 0.5;
+  }
+
+}; // end class Scene_edit_polyhedron_item
+
+#endif // SCENE_EDIT_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item_config.h
copy to 3rdparty/CGAL-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Point_dialog_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Point_dialog_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Point_dialog_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Point_dialog_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.cpp
new file mode 100644
index 0000000..f156757
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.cpp
@@ -0,0 +1,13 @@
+#include "Polyhedron_demo.h"
+
+/*!
+ * \brief Defines the entry point of the demo.
+ * Creates the application and sets a main window.
+ */
+int main(int argc, char **argv)
+{
+  Polyhedron_demo app(argc, argv,
+                      "Polyhedron_3 demo",
+                      "CGAL Polyhedron Demo");
+  return app.try_exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.qrc b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.qrc
new file mode 100644
index 0000000..3b30902
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_3.qrc
@@ -0,0 +1,42 @@
+<RCC>
+    <qresource prefix="/cgal/icons">
+        <file>resources/cgal_logo.xpm</file>
+        <file>resources/boolean-union.png</file>
+        <file>resources/kernel.png</file>
+        <file>resources/boolean-diff.png</file>
+        <file>resources/boolean-intersection.png</file>
+        <file alias="convex-hull.png">resources/convex-hull.png</file>
+        <file alias="simplification.png">resources/simplification.png</file>
+        <file alias="duplicate">resources/editcopy.png</file>
+        <file alias="check-on.png">resources/check-on.png</file>
+        <file alias="plus">resources/plus.png</file>
+        <file alias="check-off.png">resources/check-off.png</file>
+        <file alias="minus">resources/minus.png</file>
+        <file>resources/back.png</file>
+        <file>resources/front.png</file>
+        <file>resources/top.png</file>
+        <file>resources/bot.png</file>
+        <file>resources/left.png</file>
+        <file>resources/right.png</file>
+        <file>resources/up.png</file>
+        <file>resources/down.png</file>
+    </qresource>
+    <qresource prefix="/cgal/Polyhedron_3">
+        <file alias="about.html">resources/about.html</file>
+        <file>resources/shader_c3t3.v</file>
+        <file>resources/shader_with_light.v</file>
+        <file>resources/shader_with_light.f</file>
+        <file>resources/shader_without_light.f</file>
+        <file>resources/shader_without_light.v</file>
+        <file>resources/shader_with_texture.f</file>
+        <file>resources/shader_with_textured_edges.f</file>
+        <file>resources/shader_with_textured_edges.v</file>
+        <file>resources/shader_with_texture.v</file>
+        <file>resources/shader_instanced.v</file>
+        <file>resources/shader_no_light_no_selection.f</file>
+        <file>resources/shader_c3t3_edges.f</file>
+        <file>resources/shader_c3t3.f</file>
+        <file>resources/shader_c3t3_edges.v</file>
+        <file>resources/shader_plane_two_faces.f</file>
+    </qresource>
+</RCC>
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.cpp
new file mode 100644
index 0000000..f15f6bd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.cpp
@@ -0,0 +1,126 @@
+#include "Polyhedron_demo.h"
+#include "MainWindow.h"
+#include <QMessageBox>
+#include <CGAL/Qt/resources.h>
+#include <stdexcept>
+
+#include <QCommandLineParser>
+#include <QCommandLineOption>
+
+struct Polyhedron_demo_impl {
+  bool catch_exceptions;
+  QScopedPointer<MainWindow> mainWindow;
+
+  Polyhedron_demo_impl() : catch_exceptions(true) {}
+}; // end struct Polyhedron_demo_impl
+
+Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
+                                 QString application_name,
+                                 QString main_window_title)
+  : QApplication(argc, argv)
+  , d_ptr_is_initialized(false)
+  , d_ptr(new Polyhedron_demo_impl)
+{
+  d_ptr_is_initialized = true;
+  std::cerr.precision(17);
+  std::cout.precision(17);
+  std::clog.precision(17);
+
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  this->setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  this->setOrganizationDomain("geometryfactory.com");
+  this->setOrganizationName("GeometryFactory");
+  this->setApplicationName(application_name);
+
+  QCommandLineParser parser;
+  parser.addHelpOption();
+
+  QCommandLineOption use_meta("use-meta",
+                              tr("Use the [Meta] key to move frames, instead of [Tab]."));
+  parser.addOption(use_meta);
+  QCommandLineOption no_try_catch("no-try-catch",
+                                  tr("Do not catch uncaught exceptions."));
+  parser.addOption(no_try_catch);
+#ifdef QT_SCRIPT_LIB
+  QCommandLineOption debug_scripts("debug-scripts",
+                                   tr("Use the scripts debugger."));
+  parser.addOption(debug_scripts);
+#endif
+  QCommandLineOption no_autostart("no-autostart",
+                                  tr("Ignore the autostart.js file, if any."));
+  parser.addOption(no_autostart);
+  parser.addPositionalArgument("files", tr("Files to open"), "[files...]");
+  parser.process(*this);
+
+  d_ptr->mainWindow.reset(new MainWindow);
+  MainWindow& mainWindow = *d_ptr->mainWindow;
+
+  mainWindow.setWindowTitle(main_window_title);
+  mainWindow.show();
+
+  if(parser.isSet(use_meta)) {
+    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
+  }
+  if(parser.isSet(no_try_catch)) {
+    this->do_not_catch_exceptions();
+  }
+#ifdef QT_SCRIPT_LIB
+  if(parser.isSet(debug_scripts)) {
+    mainWindow.enableScriptDebugger();
+  }
+  QFileInfo autostart_js("autostart.js");
+  if(!parser.isSet(no_autostart) && autostart_js.exists()) {
+    mainWindow.load_script(autostart_js);
+  }
+#endif
+  Q_FOREACH(QString filename, parser.positionalArguments()) {
+    mainWindow.open(filename);
+  }
+
+}
+
+Polyhedron_demo::~Polyhedron_demo() {}
+
+void Polyhedron_demo::do_not_catch_exceptions() {
+  d_ptr->catch_exceptions = false;
+}
+
+bool Polyhedron_demo::notify(QObject* receiver, QEvent* event)
+{
+  if(!d_ptr_is_initialized || !d_ptr->catch_exceptions)
+    return QApplication::notify(receiver, event);
+  else try {
+      return QApplication::notify(receiver, event);
+    } catch (std::exception &e) {
+      // find the mainwindow to spawn an error message
+      Q_FOREACH (QWidget *widget, QApplication::topLevelWidgets()) {
+        if(MainWindow* mw = qobject_cast<MainWindow*>(widget)) {
+          QMessageBox::critical(
+                                mw,
+                                tr("Unhandled exception"),
+                                e.what());
+          break;
+        }
+      }
+      QApplication::restoreOverrideCursor();
+    } catch (...) {
+      qFatal("Unknown exception encountered. Aborting.");
+    }
+  return false;
+}
+
+int Polyhedron_demo::try_exec()
+{
+  // A Qt Script may have closed the main window.
+  // The following loop launch app.exec() only if the main window is visible.
+  if(d_ptr->mainWindow->isVisible()) {
+    return this->exec();
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.h
new file mode 100644
index 0000000..b6baa4a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo.h
@@ -0,0 +1,42 @@
+#ifndef POLYHEDRON_DEMO_H
+#define POLYHEDRON_DEMO_H
+
+#include <QtCore/qglobal.h>
+
+#include "Polyhedron_demo_config.h"
+
+#include <QApplication>
+#include <QScopedPointer>
+
+struct Polyhedron_demo_impl;
+
+class POLYHEDRON_DEMO_EXPORT Polyhedron_demo : public QApplication
+{
+  bool d_ptr_is_initialized; /// can be false during a call to `notify()`
+  QScopedPointer<Polyhedron_demo_impl> d_ptr;
+public:
+  /*!
+   * Constructor : calls the constructor of QApplication
+   */
+  Polyhedron_demo(int& argc, char **argv,
+                  QString application_name = "Polyhedron_3 demo",
+                  QString main_window_title = "CGAL Polyhedron demo");
+
+  ~Polyhedron_demo();
+
+  /*!
+   * Catches unhandled exceptions from all the widgets
+   */
+  bool notify(QObject* receiver, QEvent* event);
+
+  /*! After a call to `do_not_catch_exceptions()`, unhandled exceptions are
+      no longer caught
+   */
+  void do_not_catch_exceptions();
+
+  /*! Call `QApplication::exec()` unless the main window is already closed
+   */
+  int try_exec();
+}; // end class Polyhedron_demo
+
+#endif // POLYHEDRON_DEMO_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_config.h
new file mode 100644
index 0000000..08a7d4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_config.h
@@ -0,0 +1,10 @@
+#ifndef POLYHEDRON_DEMO_CONFIG_H
+#define POLYHEDRON_DEMO_CONFIG_H
+
+#ifdef polyhedron_demo_EXPORTS
+#  define POLYHEDRON_DEMO_EXPORT Q_DECL_EXPORT
+#else
+#  define POLYHEDRON_DEMO_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // POLYHEDRON_DEMO_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h
new file mode 100644
index 0000000..ed07702
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h
@@ -0,0 +1,32 @@
+
+#ifndef POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
+#define POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
+
+#include <CGAL/Mesh_3/Detect_features_in_polyhedra.h>
+
+namespace CGAL
+{
+  template<typename Polyhedron>
+  void reset_sharp_edges(Polyhedron* pMesh)
+  {
+    for (typename Polyhedron::Edge_iterator
+      eit = pMesh->edges_begin(),
+      end = pMesh->edges_end(); eit != end; ++eit)
+    {
+      eit->set_feature_edge(false);
+    }
+  }
+
+  template<typename Polyhedron>
+  void detect_sharp_edges(Polyhedron* pMesh, const double angle)
+  {
+    reset_sharp_edges(pMesh);
+
+    // Detect edges in current polyhedron
+    CGAL::Mesh_3::Detect_features_in_polyhedra<Polyhedron> detect_features;
+    detect_features.detect_sharp_edges(*pMesh, angle);
+  }
+
+}//end namespace CGAL
+
+#endif //POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp
new file mode 100644
index 0000000..ff8eae8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp
@@ -0,0 +1,132 @@
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+#include <QMainWindow>
+#include <QAction>
+#include <QMetaObject>
+#include <QMetaMethod>
+#include <QtDebug>
+#include <QVector>
+#include <QSet>
+#include <QDockWidget>
+
+using namespace CGAL::Three;
+QAction*
+Polyhedron_demo_plugin_helper::
+getActionFromMainWindow(QMainWindow* mw,
+                        QString action_name)
+{
+  return mw->findChild<QAction*>(action_name);
+}
+
+QStringList 
+Polyhedron_demo_plugin_helper::actionsNames() const
+{
+  return QStringList();
+}
+
+void
+Polyhedron_demo_plugin_helper::
+init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
+  mw = mainWindow;
+  scene = scene_interface;
+  Q_FOREACH(QString actionName,actionsNames())
+  {
+    actions_map[actionName] = getActionFromMainWindow(mw, actionName);
+  }
+  autoConnectActions();
+}
+
+QList<QAction*> 
+Polyhedron_demo_plugin_helper::actions() const
+{
+  return actions_map.values();
+}
+
+// Auto-connect actions to slots
+void Polyhedron_demo_plugin_helper::autoConnectActions()
+{
+  QObject* thisObject = dynamic_cast<QObject*>(this);
+  if(!thisObject)
+    return;
+
+  const QMetaObject* metaObject = thisObject->metaObject();
+  QVector<QMetaMethod> methods;
+  QVector<QString> methodsNames;
+  QSet<QString> connected;
+  for(int i = metaObject->methodOffset();
+      i < metaObject->methodCount();
+      ++i)
+  {
+    const int pos = QString(metaObject->method(i).methodSignature()).indexOf('(');
+    methodsNames << QString(metaObject->method(i).methodSignature()).left(pos);
+
+    methods << metaObject->method(i);
+  }
+
+  Q_FOREACH(QAction* action, actions())
+  {
+    bool success = false;
+//     qDebug("Autoconnecting action \"%s\"...", 
+//            action->objectName().toUtf8().data());
+    const QMetaObject* action_metaObject = action->metaObject();
+    for(int i = action_metaObject->methodOffset();
+        i < action_metaObject->methodCount(); ++i)
+    {
+      QMetaMethod action_method = action_metaObject->method(i);
+        
+      if(action_method.methodType() == QMetaMethod::Signal)
+      {
+        const int pos = QString(action_method.methodSignature()).indexOf('(');
+        QString methodName = QString(action_method.methodSignature()).left(pos);
+
+        QString slotName = 
+          QString("on_%1_%2").arg(action->objectName()).arg(methodName);
+//         qDebug() << thisObject->tr("Slot %1 (%2)...").arg(slotName).arg(i);
+        int index = methodsNames.indexOf(slotName);
+        if(index>=0 && !connected.contains(slotName)) 
+        {
+            const bool ok = QObject::connect(action, 
+                             qPrintable(QString("2%1").arg(QString(action_method.methodSignature()))),
+                             thisObject,
+                             qPrintable(QString("1%1").arg(QString(methods[index].methodSignature()))));
+
+          if(!ok)
+          {
+            qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
+              .arg(action->objectName())
+              .arg(QString(action_method.methodSignature()))
+              .arg(QString(methods[index].methodSignature()));
+          }
+          else {
+//             qDebug("  ->Connected!");
+            success = true;
+            connected << slotName;
+          }
+        }
+//         else {
+//           qDebug(" nothing found!\n");
+//         }
+      }
+    } // end for each method of action
+    if(!success)
+      qDebug("ERROR: Failed to autoconnect the action \"%s\"!",
+             action->objectName().toUtf8().data());
+  } // end foreach action of actions()
+}
+
+void Polyhedron_demo_plugin_helper::add_dock_widget(QDockWidget* dock_widget) 
+{
+  mw->addDockWidget(::Qt::LeftDockWidgetArea, dock_widget);
+
+  QList<QDockWidget*> dockWidgets = mw->findChildren<QDockWidget*>();
+  int counter = 0;
+  Q_FOREACH(QDockWidget* dock, dockWidgets) {
+    if( mw->dockWidgetArea(dock) != ::Qt::LeftDockWidgetArea ||
+        dock == dock_widget ) 
+    { continue; }
+
+    if(++counter > 1) {
+      mw->tabifyDockWidget(dock, dock_widget);
+      return;
+    }
+  }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type.h
new file mode 100644
index 0000000..7943342
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type.h
@@ -0,0 +1,202 @@
+#ifndef POLYHEDRON_TYPE_H
+#define POLYHEDRON_TYPE_H
+
+// CGAL
+// kernel
+#include "Kernel_type.h"
+
+// surface mesh
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Has_timestamp.h>
+#include <CGAL/tags.h>
+
+#include <set>
+
+template <typename Refs, typename Tag, typename Point, typename Patch_id>
+class Polyhedron_demo_vertex : 
+  public CGAL::HalfedgeDS_vertex_base<Refs, Tag, Point>
+{
+public:
+  typedef std::set<Patch_id> Set_of_indices;
+
+private:
+  typedef CGAL::HalfedgeDS_vertex_base<Refs, Tag, Point> Pdv_base;
+
+  Set_of_indices indices;
+  std::size_t mID;
+  std::size_t time_stamp_;
+
+public:
+  int nb_of_feature_edges;
+
+  bool is_corner() const {
+    return nb_of_feature_edges > 2;
+  }
+
+  bool is_feature_vertex() const {
+    return nb_of_feature_edges != 0;
+  }
+
+  void add_incident_patch(const Patch_id& i) {
+    indices.insert(i);
+  }
+
+  /// For the determinism of Compact_container iterators
+  ///@{
+  typedef CGAL::Tag_true Has_timestamp;
+
+  std::size_t time_stamp() const {
+    return time_stamp_;
+  }
+  void set_time_stamp(const std::size_t& ts) {
+    time_stamp_ = ts;
+  }
+  ///}@
+
+  const Set_of_indices&
+  incident_patches_ids_set() const {
+    return indices;
+  }
+
+  std::size_t& id()       { return mID; }
+  std::size_t  id() const { return mID; }
+  
+  Polyhedron_demo_vertex() : Pdv_base(), mID(-1), nb_of_feature_edges(0) {}
+  Polyhedron_demo_vertex(const Point& p) : Pdv_base(p), mID(-1), nb_of_feature_edges(0) {}
+};
+
+template <class Refs, class Tprev, class Tvertex, class Tface>
+class Polyhedron_demo_halfedge : 
+  public CGAL::HalfedgeDS_halfedge_base<Refs,Tprev,Tvertex,Tface>
+{
+private:
+  bool feature_edge;
+  std::size_t mID;
+  std::size_t time_stamp_;
+
+public:
+
+  Polyhedron_demo_halfedge() 
+    : feature_edge(false), mID(-1) {};
+
+  bool is_feature_edge() const {
+    return feature_edge;
+  }
+
+  void set_feature_edge(const bool b) {
+    feature_edge = b;
+    this->opposite()->feature_edge = b;
+  }
+  
+  std::size_t& id()       { return mID; }
+  std::size_t  id() const { return mID; }
+
+  /// For the determinism of Compact_container iterators
+  ///@{
+  typedef CGAL::Tag_true Has_timestamp;
+
+  std::size_t time_stamp() const {
+    return time_stamp_;
+  }
+  void set_time_stamp(const std::size_t& ts) {
+    time_stamp_ = ts;
+  }
+  ///@}
+};
+
+template <typename Integral>
+inline std::pair<Integral, Integral>
+patch_id_default_value(std::pair<Integral, Integral>)
+{
+  return std::pair<Integral, Integral>(1, 0);
+}
+
+template <typename Integral>
+inline Integral patch_id_default_value(Integral)
+{
+  return Integral(1);
+}
+
+template <class Refs, class T_, class Pln_, class Patch_id_>
+class Polyhedron_demo_face : 
+  public CGAL::HalfedgeDS_face_base<Refs,T_,Pln_>
+{
+private:
+  Patch_id_ patch_id_;
+  std::size_t mID;
+  std::size_t time_stamp_;
+
+public:
+  typedef Patch_id_ Patch_id;
+  
+  Polyhedron_demo_face()
+    : patch_id_(patch_id_default_value(Patch_id())), mID(-1) {}
+  
+  const Patch_id& patch_id() const {
+    return patch_id_;
+  }
+  
+  void set_patch_id(const Patch_id& i) {
+    patch_id_ = i;
+  }
+  
+  std::size_t& id()       { return mID; }
+  std::size_t  id() const { return mID; }
+
+  /// For the determinism of Compact_container iterators
+  ///@{
+  typedef CGAL::Tag_true Has_timestamp;
+
+  std::size_t time_stamp() const {
+    return time_stamp_;
+  }
+  void set_time_stamp(const std::size_t& ts) {
+    time_stamp_ = ts;
+  }
+  ///@}
+};
+
+template <typename Patch_id>
+class Polyhedron_demo_items : public CGAL::Polyhedron_items_3 {
+public:
+  // wrap vertex
+  template<class Refs, class Traits> struct Vertex_wrapper
+  {
+    typedef typename Traits::Point_3 Point;
+    typedef Polyhedron_demo_vertex<Refs,
+      CGAL::Tag_true,
+      Point,
+      Patch_id> Vertex;
+  };
+
+  // wrap face
+  template<class Refs, class Traits> struct Face_wrapper
+  {
+    typedef Polyhedron_demo_face<Refs,
+      CGAL::Tag_true,
+      typename Traits::Plane_3,
+      Patch_id> Face;
+  };
+
+  // wrap halfedge
+  template<class Refs, class Traits> struct Halfedge_wrapper
+  {
+    typedef Polyhedron_demo_halfedge<Refs,
+      CGAL::Tag_true,
+      CGAL::Tag_true,
+      CGAL::Tag_true> Halfedge;
+  };
+};
+
+#include "Polyhedron_type_fwd.h"
+
+// surface mesh
+typedef Polyhedron_demo_items<Patch_id>              Polyhedron_items;
+typedef CGAL::Polyhedron_3<Kernel, Polyhedron_items> Polyhedron;
+
+
+#endif // POLYHEDRON_TYPE_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type_fwd.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type_fwd.h
new file mode 100644
index 0000000..016ec3b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Polyhedron_type_fwd.h
@@ -0,0 +1,64 @@
+#ifndef POLYHEDRON_TYPE_FWD_H
+#define POLYHEDRON_TYPE_FWD_H
+
+#include <CGAL/Filtered_kernel_fwd.h>
+#include <memory>
+
+#ifdef USE_FORWARD_DECL
+
+#include <CGAL/Filtered_kernel_fwd.h>
+
+template <typename Patch_id>
+class Polyhedron_demo_items;
+
+namespace CGAL {
+
+  namespace Mesh_3 {
+    template <typename Kernel>
+    struct Robust_intersection_traits_3;
+  }
+
+  template < typename FT_ >
+  struct Simple_cartesian;
+
+  class Epick;
+
+  class Polyhedron_items_3;
+
+  template < class T, class I, class A>
+  class HalfedgeDS_default;
+
+  template < class PolyhedronTraits_3,
+             class PolyhedronItems_3,
+             template < class T, class I, class A>
+             class T_HDS, 
+             class Alloc
+             >
+  class Polyhedron_3;
+  
+  class Epick;
+} // end namespace CGAL
+
+// kernel
+namespace polyhedron_type_fwd_h {
+// changed since CGAL-3.8-Ic-8
+  typedef CGAL::Epick K1;
+  typedef CGAL::Mesh_3::Robust_intersection_traits_3<K1> Kernel;
+}
+
+#else // USE_FORWARD_DECL
+
+#include "Polyhedron_type.h"
+
+#endif // USE_FORWARD_DECL
+
+// surface mesh
+typedef int Patch_id;
+
+typedef CGAL::Polyhedron_3<polyhedron_type_fwd_h::Kernel,
+                           Polyhedron_demo_items<Patch_id>,
+                           // CGAL::Polyhedron_items_3,
+                           CGAL::HalfedgeDS_default,
+                           std::allocator<int> > Polyhedron;
+
+#endif // POLYHEDRON_TYPE_FWD_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Preferences.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Preferences.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Preferences.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Preferences.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.cpp
new file mode 100644
index 0000000..6fdd9ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.cpp
@@ -0,0 +1,1251 @@
+#include "GlSplat/GlSplat.h"
+
+
+
+#include "config.h"
+#include "Scene.h"
+#include  <CGAL/Three/Scene_item.h>
+
+#include <QObject>
+#include <QMetaObject>
+#include <QString>
+#include <QGLWidget>
+#include <QEvent>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QColorDialog>
+#include <QApplication>
+#include <QPointer>
+#include <QList>
+#include <QAbstractProxyModel>
+#include <QMimeData>
+
+GlSplat::SplatRenderer* Scene::ms_splatting = 0;
+int Scene::ms_splattingCounter = 0;
+GlSplat::SplatRenderer* Scene::splatting()
+{
+    assert(ms_splatting!=0 && "A Scene object must be created before requesting the splatting object");
+    return ms_splatting;
+}
+
+Scene::Scene(QObject* parent)
+    : QStandardItemModel(parent),
+      selected_item(-1),
+      item_A(-1),
+      item_B(-1)
+{
+
+    connect(this, SIGNAL(selectionRay(double, double, double,
+                                      double, double, double)),
+            this, SLOT(setSelectionRay(double, double, double,
+                                       double, double, double)));
+
+    if(ms_splatting==0)
+        ms_splatting  = new GlSplat::SplatRenderer();
+    ms_splattingCounter++;
+    picked = false;
+    gl_init = false;
+
+}
+Scene::Item_id
+Scene::addItem(CGAL::Three::Scene_item* item)
+{
+    CGAL::Three::Scene_group_item* group =
+            qobject_cast<CGAL::Three::Scene_group_item*>(item);
+    if(group)
+        m_group_entries.prepend(group);
+    Bbox bbox_before = bbox();
+    m_entries.push_back(item);
+    connect(item, SIGNAL(itemChanged()),
+            this, SLOT(itemChanged()));
+    connect(item, SIGNAL(redraw()),
+            this, SLOT(callDraw()));
+    if(item->isFinite()
+            && !item->isEmpty()
+            && bbox_before + item->bbox() != bbox_before
+            )
+    {
+        Q_EMIT updated_bbox();
+    }
+    QList<QStandardItem*> list;
+    for(int i=0; i<5; i++)
+    {
+        list<<new QStandardItem();
+        list.at(i)->setEditable(false);
+    }
+    invisibleRootItem()->appendRow(list);
+    for(int i=0; i<5; i++){
+        index_map[list.at(i)->index()] = m_entries.size() -1;
+    }
+    Q_EMIT updated();
+    Item_id id = m_entries.size() - 1;
+    Q_EMIT newItem(id);
+    //if group selected, add item to it
+    if(mainSelectionIndex() >=0)
+    {
+        //if new item is a group, don't do that, to avoid any ambiguity
+        if(!group)
+        {
+            CGAL::Three::Scene_group_item* selected_group =
+                    qobject_cast<CGAL::Three::Scene_group_item*>(m_entries.at(mainSelectionIndex()));
+            if(selected_group)
+            {
+                selected_group->addChild(item);
+                group_added();
+            }
+        }
+    }
+    return id;
+}
+
+CGAL::Three::Scene_item*
+Scene::replaceItem(Scene::Item_id index, CGAL::Three::Scene_item* item, bool emit_item_about_to_be_destroyed)
+{
+    if(index < 0 || index >= m_entries.size())
+        return 0;
+
+    if(emit_item_about_to_be_destroyed) {
+    Q_EMIT itemAboutToBeDestroyed(m_entries[index]);
+    }
+
+    connect(item, SIGNAL(itemChanged()),
+            this, SLOT(itemChanged()));
+    std::swap(m_entries[index], item);
+    if ( item->isFinite() && !item->isEmpty() &&
+         m_entries[index]->isFinite() && !m_entries[index]->isEmpty() &&
+         item->bbox()!=m_entries[index]->bbox() )
+    {
+    Q_EMIT updated_bbox();
+    }
+  Q_EMIT updated();
+    itemChanged(index);
+    Q_EMIT restoreCollapsedState();
+    group_added();
+    return item;
+}
+
+Scene::Item_id
+Scene::erase(Scene::Item_id index)
+{
+    clear();
+    index_map.clear();
+    if(index < 0 || index >= m_entries.size())
+        return -1;
+
+    CGAL::Three::Scene_item* item = m_entries[index];
+    CGAL::Three::Scene_group_item* group =
+            qobject_cast<CGAL::Three::Scene_group_item*>(item);
+  if(group)
+  {
+      m_group_entries.removeAll(group);
+  }
+    Q_FOREACH(CGAL::Three::Scene_group_item* group, m_group_entries)
+    {
+        if(group->getChildren().contains(item))
+            group->removeChild(item);
+    }
+  Q_EMIT itemAboutToBeDestroyed(item);
+    delete item;
+    m_entries.removeAll(item);
+    selected_item = -1;
+    Q_FOREACH(Scene_item* item, m_entries)
+    {
+        organize_items(item, invisibleRootItem(), 0);
+    }
+    QStandardItemModel::beginResetModel();
+    Q_EMIT updated();
+    QStandardItemModel::endResetModel();
+    Q_EMIT restoreCollapsedState();
+    if(--index >= 0)
+      return index;
+    if(!m_entries.isEmpty())
+      return 0;
+    return -1;
+
+}
+
+int
+Scene::erase(QList<int> indices)
+{
+  QList<CGAL::Three::Scene_item*> to_be_removed;
+  int max_index = -1;
+  Q_FOREACH(int index, indices) {
+    if(index < 0 || index >= m_entries.size())
+      continue;
+
+    max_index = (std::max)(max_index, index);
+    CGAL::Three::Scene_item* item = m_entries[index];
+    if(!to_be_removed.contains(item))
+      to_be_removed.push_back(item);
+  }
+
+  Q_FOREACH(Scene_item* item, to_be_removed) {
+    CGAL::Three::Scene_group_item* group =
+        qobject_cast<CGAL::Three::Scene_group_item*>(item);
+    if(group)
+    {
+      m_group_entries.removeAll(group);
+    }
+    Q_FOREACH(CGAL::Three::Scene_group_item* group_item, m_group_entries)
+      if(group_item->getChildren().contains(item))
+        group_item->removeChild(item);
+    Q_EMIT itemAboutToBeDestroyed(item);
+    delete item;
+    m_entries.removeAll(item);
+  }
+  clear();
+  index_map.clear();
+  selected_item = -1;
+  Q_FOREACH(Scene_item* item, m_entries)
+  {
+    organize_items(item, invisibleRootItem(), 0);
+  }
+  QStandardItemModel::beginResetModel();
+  Q_EMIT updated();
+  QStandardItemModel::endResetModel();
+  Q_EMIT restoreCollapsedState();
+
+  int index = max_index + 1 - indices.size();
+  if(index >= m_entries.size()) {
+    index = m_entries.size() - 1;
+  }
+  if(index >= 0)
+    return index;
+  if(!m_entries.isEmpty())
+    return 0;
+  return -1;
+
+}
+
+void Scene::remove_item_from_groups(Scene_item* item)
+{
+    Q_FOREACH(CGAL::Three::Scene_group_item* group, m_group_entries)
+    {
+        if(group->getChildren().contains(item))
+        {
+            group->removeChild(item);
+        }
+    }
+}
+Scene::~Scene()
+{
+    Q_FOREACH(CGAL::Three::Scene_item* item_ptr, m_entries)
+    {
+        delete item_ptr;
+    }
+    m_entries.clear();
+
+    if((--ms_splattingCounter)==0)
+        delete ms_splatting;
+}
+
+CGAL::Three::Scene_item*
+Scene::item(Item_id index) const
+{
+    return m_entries.value(index); // QList::value checks bounds
+}
+
+Scene::Item_id 
+Scene::item_id(CGAL::Three::Scene_item* scene_item) const
+{
+    return m_entries.indexOf(scene_item);
+}
+
+int
+Scene::numberOfEntries() const
+{
+    return m_entries.size();
+}
+
+// Duplicate a scene item.
+// Return the ID of the new item (-1 on error).
+Scene::Item_id
+Scene::duplicate(Item_id index)
+{
+    if(index < 0 || index >= m_entries.size())
+        return -1;
+
+    const CGAL::Three::Scene_item* item = m_entries[index];
+    CGAL::Three::Scene_item* new_item = item->clone();
+    if(new_item) {
+        new_item->setName(tr("%1 (copy)").arg(item->name()));
+        new_item->setColor(item->color());
+        new_item->setVisible(item->visible());
+        addItem(new_item);
+        return m_entries.size() - 1;
+    }
+    else
+        return -1;
+}
+
+void Scene::initializeGL()
+{
+    ms_splatting->init();
+
+    //Setting the light options
+
+    // Create light components
+    GLfloat ambientLight[] = { 0.4f, 0.4f, 0.4f, 1.0f };
+    GLfloat diffuseLight[] = { 1.0f, 1.0f, 1.0, 1.0f };
+    GLfloat specularLight[] = { 0.0f, 0.0f, 0.0f, 1.0f };
+    GLfloat position[] = { 0.0f, 0.0f, 1.0f, 1.0f };
+
+    // Assign created components to GL_LIGHT0
+    glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight);
+    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
+    glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight);
+    glLightfv(GL_LIGHT0, GL_POSITION, position);
+
+    gl_init = true;
+}
+
+bool
+Scene::keyPressEvent(QKeyEvent* e){
+    bool res=false;
+    for (QList<int>::iterator it=selected_items_list.begin(),endit=selected_items_list.end();
+         it!=endit;++it)
+    {
+        CGAL::Three::Scene_item* item=m_entries[*it];
+        res |= item->keyPressEvent(e);
+    }
+    return res;
+}
+
+void
+Scene::draw()
+{
+    draw_aux(false, 0);
+}
+void
+Scene::draw(CGAL::Three::Viewer_interface* viewer)
+{
+    draw_aux(false, viewer);
+}
+void
+Scene::drawWithNames()
+{
+    draw_aux(true, 0);
+}
+void
+Scene::drawWithNames(CGAL::Three::Viewer_interface* viewer)
+{
+    draw_aux(true, viewer);
+}
+
+void 
+Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer)
+{
+    if(!ms_splatting->viewer_is_set)
+        ms_splatting->setViewer(viewer);
+    if(!gl_init)
+        initializeGL();
+    // Flat/Gouraud OpenGL drawing
+    for(int index = 0; index < m_entries.size(); ++index)
+    {
+        if(with_names) {
+            viewer->glPushName(index);
+        }
+        CGAL::Three::Scene_item& item = *m_entries[index];
+        if(item.visible())
+        {
+            if(item.renderingMode() == Flat || item.renderingMode() == FlatPlusEdges || item.renderingMode() == Gouraud)
+            {
+                viewer->glEnable(GL_LIGHTING);
+                viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+                viewer->glPointSize(2.f);
+                viewer->glLineWidth(1.0f);
+                if(index == selected_item || selected_items_list.contains(index))
+                {
+                    item.selection_changed(true);
+                }
+                else
+
+                {
+                    item.selection_changed(false);
+                }
+
+                if(item.renderingMode() == Gouraud)
+                    viewer->glShadeModel(GL_SMOOTH);
+                else
+                    viewer->glShadeModel(GL_FLAT);
+                if(viewer)
+                    item.draw(viewer);
+                else
+                    item.draw();
+            }
+        }
+        if(with_names) {
+            viewer->glPopName();
+        }
+    }
+glDepthFunc(GL_LEQUAL);
+    // Wireframe OpenGL drawing
+    for(int index = 0; index < m_entries.size(); ++index)
+    {
+        if(with_names) {
+            viewer->glPushName(index);
+        }
+        CGAL::Three::Scene_item& item = *m_entries[index];
+        if(item.visible())
+        {
+            if(item.renderingMode() == FlatPlusEdges || item.renderingMode() == Wireframe)
+            {
+                viewer->glDisable(GL_LIGHTING);
+                viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+                viewer->glPointSize(2.f);
+                viewer->glLineWidth(1.0f);
+                if(index == selected_item || selected_items_list.contains(index))
+                {
+                      item.selection_changed(true);
+                }
+                else
+                {
+                      item.selection_changed(false);
+                }
+
+
+
+                if(viewer)
+                    item.draw_edges(viewer);
+                else
+                    item.draw_edges();
+            }
+            else{
+                if( item.renderingMode() == PointsPlusNormals ){
+                    viewer->glDisable(GL_LIGHTING);
+                    viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+                    viewer->glPointSize(2.f);
+                    viewer->glLineWidth(1.0f);
+                    if(index == selected_item || selected_items_list.contains(index))
+                    {
+
+                        item.selection_changed(true);
+                    }
+                    else
+                    {
+
+                        item.selection_changed(false);
+                    }
+                    if(viewer)
+                        item.draw_edges(viewer);
+                    else
+                        item.draw_edges();
+                }
+            }
+        }
+        if(with_names) {
+            viewer->glPopName();
+        }
+    }
+
+
+    // Points OpenGL drawing
+    for(int index = 0; index < m_entries.size(); ++index)
+    {
+        if(with_names) {
+            viewer->glPushName(index);
+        }
+        CGAL::Three::Scene_item& item = *m_entries[index];
+        if(item.visible())
+        {
+            if(item.renderingMode() == Points  || item.renderingMode() == PointsPlusNormals)
+            {
+                viewer->glDisable(GL_LIGHTING);
+                viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_POINT);
+                viewer->glPointSize(2.f);
+                viewer->glLineWidth(1.0f);
+
+                if(viewer)
+                    item.draw_points(viewer);
+                else
+                    item.draw_points();
+            }
+        }
+        if(with_names) {
+            viewer->glPopName();
+        }
+    }
+    glDepthFunc(GL_LESS);
+    // Splatting
+    if(!with_names && ms_splatting->isSupported())
+    {
+
+        ms_splatting->beginVisibilityPass();
+        for(int index = 0; index < m_entries.size(); ++index)
+        {
+            CGAL::Three::Scene_item& item = *m_entries[index];
+            if(item.visible() && item.renderingMode() == Splatting)
+            {
+
+                if(viewer)
+                {
+                    item.draw_splats(viewer);
+                }
+                else
+                    item.draw_splats();
+            }
+
+        }
+       ms_splatting->beginAttributePass();
+         for(int index = 0; index < m_entries.size(); ++index)
+        {  CGAL::Three::Scene_item& item = *m_entries[index];
+            if(item.visible() && item.renderingMode() == Splatting)
+            {
+                viewer->glColor4d(item.color().redF(), item.color().greenF(), item.color().blueF(), item.color().alphaF());
+                if(viewer)
+                    item.draw_splats(viewer);
+                else
+                    item.draw_splats();
+            }
+        }
+        ms_splatting->finalize();
+
+    }
+
+    //scrolls the sceneView to the selected item's line.
+    if(picked)
+        Q_EMIT(itemPicked(index_map.key(mainSelectionIndex())));
+    if(with_names)
+        picked = true;
+    else
+        picked = false;
+
+}
+
+// workaround for Qt-4.2 (see above)
+#undef lighter
+QVariant
+Scene::data(const QModelIndex &index, int role) const
+{
+    if (!index.isValid())
+    {
+        return QVariant();
+    }
+
+    int id = index_map[index];
+    if(id < 0 || id >= m_entries.size())
+        return QVariant();
+    if(role == ::Qt::ToolTipRole)
+    {
+        return m_entries[id]->toolTip();
+    }
+    switch(index.column())
+    {
+    case ColorColumn:
+        if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+            return m_entries.value(id)->color();
+        else if(role == ::Qt::DecorationRole)
+            return m_entries.value(id)->color();
+        break;
+    case NameColumn:
+        if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+            return m_entries.value(id)->name();
+        if(role == ::Qt::FontRole)
+            return m_entries.value(id)->font();
+        break;
+    case RenderingModeColumn:
+        if(role == ::Qt::DisplayRole) {
+            return m_entries.value(id)->renderingModeName();
+        }
+        else if(role == ::Qt::EditRole) {
+            return static_cast<int>(m_entries.value(id)->renderingMode());
+        }
+        else if(role == ::Qt::TextAlignmentRole) {
+            return ::Qt::AlignCenter;
+        }
+        break;
+    case ABColumn:
+        if(role == ::Qt::DisplayRole) {
+            if(id == item_A)
+                return "A";
+            if(id == item_B)
+                return "B";
+        }
+        else if(role == ::Qt::TextAlignmentRole) {
+            return ::Qt::AlignCenter;
+        }
+        break;
+    case VisibleColumn:
+        if(role == ::Qt::DisplayRole || role == ::Qt::EditRole)
+            return m_entries.value(id)->visible();
+        break;
+    default:
+        return QVariant();
+    }
+    return QVariant();
+}
+
+QVariant
+Scene::headerData ( int section, ::Qt::Orientation orientation, int role ) const
+{
+    if(orientation == ::Qt::Horizontal)  {
+        if (role == ::Qt::DisplayRole)
+        {
+            switch(section)
+            {
+            case NameColumn:
+                return tr("Name");
+                break;
+            case ColorColumn:
+                return tr("Color");
+                break;
+            case RenderingModeColumn:
+                return tr("Mode");
+            case ABColumn:
+                return tr("A/B");
+                break;
+            case VisibleColumn:
+                return tr("View");
+                break;
+            default:
+                return QVariant();
+            }
+        }
+        else if(role == ::Qt::ToolTipRole) {
+            if(section == RenderingModeColumn) {
+                return tr("Rendering mode (points/wireframe/flat/flat+edges/Gouraud)");
+            }
+            else if(section == ABColumn) {
+                return tr("Selection A/Selection B");
+            }
+        }
+    }
+    return QStandardItemModel::headerData(section, orientation, role);
+}
+
+Qt::ItemFlags
+Scene::flags ( const QModelIndex & index ) const
+{
+    if (index.isValid() && index.column() == NameColumn) {
+        return QStandardItemModel::flags(index) | ::Qt::ItemIsEditable;
+    }
+    else {
+        return QStandardItemModel::flags(index);
+    }
+}
+
+bool
+Scene::setData(const QModelIndex &index,
+               const QVariant &value,
+               int role)
+{
+
+    if( role != ::Qt::EditRole || !index.isValid() )
+        return false;
+
+    int id = index_map[index];
+    if(id < 0 || id >= m_entries.size()){
+        return false;
+    }
+
+    CGAL::Three::Scene_item* item = m_entries[id];
+
+    if(!item) return false;
+    switch(index.column())
+    {
+    case NameColumn:
+        item->setName(value.toString());
+    Q_EMIT dataChanged(index, index);
+        return true;
+        break;
+    case ColorColumn:
+        item->setColor(value.value<QColor>());
+    Q_EMIT dataChanged(index, index);
+        return true;
+        break;
+    case RenderingModeColumn:
+    {
+        RenderingMode rendering_mode = static_cast<RenderingMode>(value.toInt());
+        // Find next supported rendering mode
+        while ( ! item->supportsRenderingMode(rendering_mode)
+      //          || (rendering_mode==Splatting && !Scene::splatting()->isSupported())
+                )
+        {
+            rendering_mode = static_cast<RenderingMode>( (rendering_mode+1) % NumberOfRenderingMode );
+        }
+        item->setRenderingMode(rendering_mode);
+        QModelIndex nindex = createIndex(m_entries.size()-1,RenderingModeColumn+1);
+    Q_EMIT dataChanged(index, nindex);
+        return true;
+        break;
+    }
+    case VisibleColumn:
+        item->setVisible(value.toBool());
+    Q_EMIT dataChanged(index, createIndex(m_entries.size()-1,VisibleColumn+1));
+        return true;
+    default:
+        return false;
+    }
+    return false;
+}
+
+bool Scene::dropMimeData(const QMimeData * /*data*/,
+                         Qt::DropAction /*action*/,
+                         int /*row*/,
+                         int /*column*/,
+                         const QModelIndex &parent)
+{
+    //gets the moving items
+    QList<Scene_item*> items;
+    QList<int> groups_children;
+
+    //get IDs of all children of selected groups
+    Q_FOREACH(int i, selected_items_list)
+    {
+        CGAL::Three::Scene_group_item* group =
+                qobject_cast<CGAL::Three::Scene_group_item*>(item(i));
+        if(group)
+            Q_FOREACH(Scene_item* child, group->getChildren())
+              groups_children << item_id(child);
+    }
+    // Insure that children of selected groups will not be added twice
+    Q_FOREACH(int i, selected_items_list)
+    {
+        if(!groups_children.contains(i))
+          items << item(i);
+    }
+    //Gets the group at the drop position
+    CGAL::Three::Scene_group_item* group =
+            qobject_cast<CGAL::Three::Scene_group_item*>(this->item(index_map[parent]));
+    bool one_contained = false;
+    if(group)
+    {
+    Q_FOREACH(int id, selected_items_list)
+        if(group->getChildren().contains(item(id)))
+        {
+            one_contained = true;
+            break;
+        }
+    }
+    //if the drop item is not a group_item or if it already contains the item, then the drop action must be ignored
+    if(!group ||one_contained)
+    {
+        //unless the drop zone is empty, which means the item should be removed from all groups.
+        if(!parent.isValid())
+        {
+          Q_FOREACH(Scene_item* item, items)
+            while(item->has_group!=0)
+            {
+              Q_FOREACH(CGAL::Three::Scene_group_item* group_item, m_group_entries)
+                if(group_item->getChildren().contains(item))
+                {
+                  group_item->removeChild(item);
+                  break;
+                }
+            }
+        group_added();
+        return true;
+        }
+        return false;
+    }
+      Q_FOREACH(Scene_item* item, items)
+    changeGroup(item, group);
+    //group->addChild(item(mainSelectionIndex()));
+    group_added();
+    return true;
+
+
+}
+
+void Scene::moveRowUp()
+{
+    Scene_item* selected_item = item(mainSelectionIndex());
+    if(index_map.key(mainSelectionIndex()).row() > 0)
+    {
+        if(item(mainSelectionIndex())->has_group >0)
+        {
+            Q_FOREACH(Scene_group_item* group, m_group_entries)
+                if(group->getChildren().contains(selected_item))
+                {
+                    int id = group->getChildren().indexOf(selected_item);
+                    group->moveUp(id);
+                }
+        }
+        else
+        {
+            //if not in group
+            QModelIndex baseId = index_map.key(mainSelectionIndex());
+            int newId = index_map.value(index(baseId.row()-1, baseId.column(),baseId.parent())) ;
+            m_entries.move(mainSelectionIndex(), newId);
+        }
+        group_added();
+        setSelectedItem(m_entries.indexOf(selected_item));
+    }
+}
+void Scene::moveRowDown()
+{
+    Scene_item* selected_item = item(mainSelectionIndex());
+    if(index_map.key(mainSelectionIndex()).row() < rowCount(index_map.key(mainSelectionIndex()).parent())-1)
+    {
+        if(item(mainSelectionIndex())->has_group >0)
+        {
+            Q_FOREACH(Scene_group_item* group, m_group_entries)
+                if(group->getChildren().contains(selected_item))
+                {
+                    int id = group->getChildren().indexOf(selected_item);
+                    group->moveDown(id);
+                }
+        }
+        else
+        {
+            //if not in group
+            QModelIndex baseId = index_map.key(mainSelectionIndex());
+            int newId = index_map.value(index(baseId.row()+1, baseId.column(),baseId.parent())) ;
+            m_entries.move(mainSelectionIndex(), newId);
+        }
+        group_added();
+        setSelectedItem(m_entries.indexOf(selected_item));
+    }
+}
+Scene::Item_id Scene::mainSelectionIndex() const {
+    return selected_item;
+}
+
+QList<int> Scene::selectionIndices() const {
+    return selected_items_list;
+}
+
+int Scene::selectionAindex() const {
+    return item_A;
+}
+
+int Scene::selectionBindex() const {
+    return item_B;
+}
+
+QItemSelection Scene::createSelection(int i)
+{
+    return QItemSelection(index_map.keys(i).at(0),
+                          index_map.keys(i).at(4));
+}
+
+QItemSelection Scene::createSelectionAll()
+{
+    return QItemSelection(index_map.keys(0).at(0),
+                          index_map.keys(m_entries.size() - 1).at(4));
+}
+
+void Scene::itemChanged()
+{
+    CGAL::Three::Scene_item* item = qobject_cast<CGAL::Three::Scene_item*>(sender());
+    if(item)
+        itemChanged(item);
+}
+
+void Scene::itemChanged(Item_id i)
+{
+    if(i < 0 || i >= m_entries.size())
+        return;
+
+  Q_EMIT dataChanged(this->createIndex(i, 0),
+                     this->createIndex(i, LastColumn));
+  //  Q_EMIT restoreCollapsedState();
+}
+
+void Scene::itemChanged(CGAL::Three::Scene_item* /* item */)
+{
+  Q_EMIT dataChanged(this->createIndex(0, 0),
+                     this->createIndex(m_entries.size() - 1, LastColumn));
+}
+
+bool SceneDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
+                                const QStyleOptionViewItem &option,
+                                const QModelIndex &index)
+{
+    QAbstractProxyModel* proxyModel = dynamic_cast<QAbstractProxyModel*>(model);
+    Q_ASSERT(proxyModel);
+    Scene *scene = dynamic_cast<Scene*>(proxyModel->sourceModel());
+    Q_ASSERT(scene);
+    int id = scene->index_map[proxyModel->mapToSource(index)];
+    switch(index.column()) {
+    case Scene::VisibleColumn:
+        if (event->type() == QEvent::MouseButtonPress) {
+            QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+            if(mouseEvent->button() == ::Qt::LeftButton) {
+                int x = mouseEvent->pos().x() - option.rect.x();
+                if(x >= (option.rect.width() - size)/2 &&
+                        x <= (option.rect.width() + size)/2) {
+                    model->setData(index, !model->data(index).toBool());
+                }
+            }
+            return false; //so that the selection can change
+        }
+        return true;
+        break;
+    case Scene::ColorColumn:
+        if (event->type() == QEvent::MouseButtonPress) {
+            QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+            if(mouseEvent->button() == ::Qt::LeftButton) {
+                QColor color =
+                        QColorDialog::getColor(model->data(index).value<QColor>(),
+                                               0/*,
+                                                                                                                                 tr("Select color"),
+                                                                                                                                 QColorDialog::ShowAlphaChannel*/);
+                if (color.isValid()) {
+                    model->setData(index, color );
+                }
+            }
+        }
+        else if(event->type() == QEvent::MouseButtonDblClick) {
+            return true; // block double-click
+        }
+        return false;
+        break;
+    case Scene::RenderingModeColumn:
+        if (event->type() == QEvent::MouseButtonPress) {
+            QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+            if(mouseEvent->button() == ::Qt::LeftButton) {
+                // Switch rendering mode
+                /*RenderingMode*/int rendering_mode = model->data(index, ::Qt::EditRole).toInt();
+                rendering_mode = (rendering_mode+1) % NumberOfRenderingMode;
+                model->setData(index, rendering_mode);
+            }
+        }
+        else if(event->type() == QEvent::MouseButtonDblClick) {
+            return true; // block double-click
+        }
+        return false;
+        break;
+    case Scene::ABColumn:
+        if (event->type() == QEvent::MouseButtonPress) {
+            if(id == scene->item_B) {
+                scene->item_A = id;
+                scene->item_B = -1;
+            }
+            else if(id == scene->item_A) {
+                scene->item_B = id;
+                scene->item_A = -1;
+            }
+            else if(scene->item_A == -1) {
+                scene->item_A = id;
+            }
+            else {
+                scene->item_B = id;
+            }
+            scene->dataChanged(scene->createIndex(0, Scene::ABColumn),
+                               scene->createIndex(scene->rowCount() - 1, Scene::ABColumn));
+        }
+        return false;
+        break;
+    default:
+        return QItemDelegate::editorEvent(event, model, option, index);
+    }
+}
+
+void SceneDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+                          const QModelIndex &index) const
+{
+    QModelIndex test = proxy->mapToSource(index);
+    if (index.column() != Scene::VisibleColumn) {
+        QItemDelegate::paint(painter, option, index);
+    } else {
+        const QAbstractItemModel *model = index.model();
+
+        QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ?
+                    (option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive : QPalette::Disabled;
+
+        if (option.state & QStyle::State_Selected)
+            painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight));
+        bool checked = model->data(index, ::Qt::DisplayRole).toBool();
+        int width = option.rect.width();
+        int height = option.rect.height();
+        size = (std::min)(width, height);
+        int x = option.rect.x() + (option.rect.width() / 2) - (size / 2);;
+        int y = option.rect.y() + (option.rect.height() / 2) - (size / 2);
+        if(test.row()>=0 && test.row()<scene->m_entries.size()){
+
+            if(checked) {
+                painter->drawPixmap(x, y, checkOnPixmap.scaled(QSize(size, size),
+                                                               ::Qt::KeepAspectRatio,
+                                                               ::Qt::SmoothTransformation));
+            }
+            else {
+                painter->drawPixmap(x, y, checkOffPixmap.scaled(QSize(size, size),
+                                                                ::Qt::KeepAspectRatio,
+                                                                ::Qt::SmoothTransformation));
+            }
+        }
+        drawFocus(painter, option, option.rect); // since we draw the grid ourselves
+    }
+}
+
+void Scene::setItemVisible(int index, bool b)
+{
+    if( index < 0 || index >= m_entries.size() )
+        return;
+    m_entries[index]->setVisible(b);
+  Q_EMIT dataChanged(this->createIndex(index, VisibleColumn),
+                     this->createIndex(index, VisibleColumn));
+}
+
+void Scene::setSelectionRay(double orig_x,
+                            double orig_y,
+                            double orig_z,
+                            double dir_x,
+                            double dir_y,
+                            double dir_z)
+{
+    CGAL::Three::Scene_item* item = this->item(selected_item);
+    if(item) item->select(orig_x,
+                          orig_y,
+                          orig_z,
+                          dir_x,
+                          dir_y,
+                          dir_z);
+}
+
+void Scene::setItemA(int i)
+{
+    item_A = i;
+    if(item_A == item_B)
+    {
+        item_B = -1;
+    }
+  Q_EMIT dataChanged(this->createIndex(0, ABColumn),
+                     this->createIndex(m_entries.size()-1, ABColumn));
+}
+
+void Scene::setItemB(int i)
+{
+    item_B = i;
+    if(item_A == item_B)
+    {
+        item_A = -1;
+    }
+  Q_EMIT updated();
+  Q_EMIT dataChanged(this->createIndex(0, ABColumn),
+                     this->createIndex(m_entries.size()-1, ABColumn));
+}
+
+Scene::Bbox Scene::bbox() const
+{
+    if(m_entries.empty())
+        return Bbox(0,0,0,0,0,0);
+
+    bool bbox_initialized = false;
+    Bbox bbox = Bbox(0,0,0,0,0,0);
+    Q_FOREACH(CGAL::Three::Scene_item* item, m_entries)
+    {
+        if(item->isFinite() && !item->isEmpty()) {
+            if(bbox_initialized) {
+
+                bbox = bbox + item->bbox();
+            }
+            else {
+                bbox = item->bbox();
+                bbox_initialized = true;
+
+            }
+        }
+
+    }
+    return bbox;
+}
+QList<CGAL::Three::Scene_group_item*> Scene::group_entries() const
+{
+    return m_group_entries;
+}
+
+QList<Scene_item*> Scene::item_entries() const
+{
+    return m_entries;
+}
+void Scene::group_added()
+{
+    //makes the hierarchy in the tree
+    //clears the model
+    clear();
+    index_map.clear();
+    //fills the model
+    Q_FOREACH(Scene_item* item, m_entries)
+    {
+        organize_items(item, invisibleRootItem(), 0);
+    }
+    Q_EMIT restoreCollapsedState();
+}
+void Scene::changeGroup(Scene_item *item, CGAL::Three::Scene_group_item *target_group)
+{
+    //remove item from the containing group if any
+ if(item->has_group!=0)
+  Q_FOREACH(CGAL::Three::Scene_group_item* group, m_group_entries)
+  {
+    if(group->getChildren().contains(item))
+    {
+        remove_item_from_groups(item);
+      break;
+    }
+  }
+ //add the item to the target group
+ target_group->addChild(item);
+ item->has_group = target_group->has_group +1;
+}
+
+float Scene::get_bbox_length() const
+{
+    return bbox().height();
+}
+
+
+#include "Scene_find_items.h"
+
+void Scene::organize_items(Scene_item* item, QStandardItem* root, int loop)
+{
+    if(item->has_group <= loop)
+    {
+        QList<QStandardItem*> list;
+        for(int i=0; i<5; i++)
+        {
+            list<<new QStandardItem();
+            list.at(i)->setEditable(false);
+
+        }
+        root->appendRow(list);
+        for(int i=0; i<5; i++){
+            index_map[list.at(i)->index()] = m_entries.indexOf(item);
+        }
+        CGAL::Three::Scene_group_item* group =
+                qobject_cast<CGAL::Three::Scene_group_item*>(item);
+        if(group)
+        {
+            Q_FOREACH(Scene_item*child, group->getChildren())
+            {
+                organize_items(child, list.first(), loop+1);
+            }
+        }
+    }
+}
+
+void Scene::setExpanded(QModelIndex id)
+{
+    CGAL::Three::Scene_group_item* group =
+            qobject_cast<CGAL::Three::Scene_group_item*>(item(index_map.value(index(0, 0, id.parent()))));
+    if(group)
+    {
+        group->setExpanded(true);
+    }
+}
+void Scene::setCollapsed(QModelIndex id)
+{
+    CGAL::Three::Scene_group_item* group =
+            qobject_cast<CGAL::Three::Scene_group_item*>(item(getIdFromModelIndex(id)));
+    if(group)
+    {
+        group->setExpanded(false);
+    }
+}
+
+int Scene::getIdFromModelIndex(QModelIndex modelId)const
+{
+    return index_map.value(modelId);
+}
+
+QList<QModelIndex> Scene::getModelIndexFromId(int id) const
+{
+    return index_map.keys(id);
+}
+
+void Scene::add_group(Scene_group_item* group)
+{
+    //Find the indices of the selected items
+    QList<int> indices;
+    QList<int> blacklist;
+    Q_FOREACH(int id, selectionIndices()){
+        CGAL::Three::Scene_group_item* group =
+                qobject_cast<CGAL::Three::Scene_group_item*>(item(id));
+        if(group)
+            Q_FOREACH(CGAL::Three::Scene_item *item, group->getChildren())
+                blacklist<<item_id(item);
+
+        if(!indices.contains(id) && !blacklist.contains(id))
+            indices<<id;
+}
+    //checks if all the selected items are in the same group
+    bool all_in_one = true;
+    if(indices.isEmpty())
+        all_in_one = false;
+    //group containing the selected item
+    CGAL::Three::Scene_group_item * existing_group = 0;
+    //for each selected item
+    Q_FOREACH(int id, indices){
+        //if the selected item is in a group
+        if(item(id)->has_group!=0){
+            //for each group
+            Q_FOREACH(CGAL::Three::Scene_group_item *group, group_entries())
+            {
+                //if the group contains the selected item
+                if(group->getChildren().contains(item(id))){
+                    //if it is the first one, we initialize existing_group
+                    if(existing_group == 0)
+                        existing_group = group;
+                    //else we check if it is the same group as before.
+                    //If not, all selected items are not in the same group
+                    else if(existing_group != group)
+                        all_in_one = false;
+                    break;
+                }
+            }//end for each group
+        }
+        //else it is impossible that all the selected items are in the same group
+        else{
+            all_in_one = false;
+            break;
+        }
+    }//end foreach selected item
+
+    //If all the selected items are in the same group, we put them in a sub_group of this group
+    if(all_in_one)
+    {
+        Q_FOREACH(int id, indices)
+            changeGroup(item(id),group);
+        changeGroup(group, existing_group);
+        addItem(group);
+        group_added();
+    }
+    //else wer create a new group
+    else
+    {
+        Q_FOREACH(int id, indices)
+            changeGroup(item(id),group);
+        addItem(group);
+        group_added();
+    }
+}
+
+namespace scene { namespace details {
+
+Q_DECL_EXPORT
+CGAL::Three::Scene_item*
+findItem(const CGAL::Three::Scene_interface* scene_interface,
+         const QMetaObject& metaobj,
+         QString name, Scene_item_name_fn_ptr fn) {
+    const Scene* scene = dynamic_cast<const Scene*>(scene_interface);
+    if(!scene) return 0;
+    Q_FOREACH(CGAL::Three::Scene_item* item, scene->entries()) {
+       CGAL::Three::Scene_item* ptr = qobject_cast<CGAL::Three::Scene_item*>(metaobj.cast(item));
+        if(ptr && ((ptr->*fn)() == name)) return ptr;
+    }
+    return 0;
+}
+
+Q_DECL_EXPORT
+QList<CGAL::Three::Scene_item*>
+findItems(const CGAL::Three::Scene_interface* scene_interface,
+
+          const QMetaObject&,
+          QString name, Scene_item_name_fn_ptr fn)
+{
+    const Scene* scene = dynamic_cast<const Scene*>(scene_interface);
+    QList<CGAL::Three::Scene_item*> list;
+    if(!scene) return list;
+
+    Q_FOREACH(CGAL::Three::Scene_item* item, scene->entries()) {
+        CGAL::Three::Scene_item* ptr = qobject_cast<CGAL::Three::Scene_item*>(item);
+        if(ptr && ((ptr->*fn)() == name)) {
+            list << ptr;
+        }
+    }
+    return list;
+}
+
+} // end namespace details
+                } // end namespace scene
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.h
new file mode 100644
index 0000000..7e938d1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene.h
@@ -0,0 +1,325 @@
+//! \file Scene.h
+#ifndef SCENE_H
+#define SCENE_H
+#include "config.h"
+#include "Scene_config.h"
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Scene_draw_interface.h>
+#include <CGAL/Three/Viewer_config.h>
+
+#include <QtOpenGL/qgl.h>
+#include <QStandardItemModel>
+#include <QString>
+#include <QColor>
+#include <QList>
+#include <QMap>
+#include <QItemDelegate>
+#include <QPixmap>
+#include <QItemSelection>
+#include <QGLViewer/qglviewer.h>
+#include <QDebug>
+#include <iostream>
+#include <cmath>
+#include <boost/variant.hpp>
+#include <CGAL/Three/Scene_group_item.h>
+class QEvent;
+class QMouseEvent;
+namespace GlSplat { class SplatRenderer; }
+namespace CGAL { namespace Three{ class Viewer_interface;}}
+
+
+class SCENE_EXPORT Scene  :
+  public QStandardItemModel, public CGAL::Three::Scene_interface, public CGAL::Three::Scene_draw_interface
+
+{
+  Q_OBJECT
+  Q_PROPERTY(int numberOfEntries READ numberOfEntries)
+
+  friend class SceneDelegate;
+
+public:
+  QList<QModelIndex> getModelIndexFromId(int id) const;
+  int getIdFromModelIndex(QModelIndex modelId) const;
+  enum Columns { NameColumn = 0, 
+                 ColorColumn, 
+                 RenderingModeColumn, 
+                 VisibleColumn,
+                 ABColumn,
+                 LastColumn = ABColumn,
+                 NumberOfColumns = LastColumn + 1};
+  Scene(QObject*  parent);
+  ~Scene();
+
+  //!Adds item to the items list, gives it an ID and
+  //!updates the bounding box if needed.
+  int addItem(CGAL::Three::Scene_item* item);
+
+  void changeGroup(CGAL::Three::Scene_item* item, CGAL::Three::Scene_group_item* target_group);
+  //!Sets item as the item at index and calls @ref Scene_item#changed().
+  //!If emit_item_about_to_be_destroyed is set to true, emits
+  //!an itemAboutToBeDestroyed signal.
+  CGAL::Three::Scene_item* replaceItem(Scene::Item_id index, CGAL::Three::Scene_item* item, bool emit_item_about_to_be_destroyed = false);
+  /*! Deletes the item with the target index.
+   * @returns  the index of the polyhedra just before the
+   * one that is erased, or just after. -1 if
+   * the list is empty.
+   */
+  Q_INVOKABLE Item_id erase(Item_id);
+
+  /*! Deletes the items with the target indexes.
+   * @returns the index of the polyhedra just before the
+   * one that is erased, or just after. Returns -1 if
+   * the list is empty.
+   */
+  int erase(QList<int>);
+
+  /*! Duplicate a scene item.
+   * @returns the ID of the new item (-1 on error).
+   */
+  int duplicate(int index); 
+
+  // Accessors (getters)
+  //! @returns the number of items.
+  int numberOfEntries() const;
+  //! @returns the list of items.
+  const QList<CGAL::Three::Scene_item*>& entries() const { return m_entries; }
+  //! @returns the item at the target index.
+  Q_INVOKABLE CGAL::Three::Scene_item* item(int) const ;
+  //! @returns the id of the target item.
+  Item_id item_id(CGAL::Three::Scene_item*) const;
+  
+  //! \todo Replace Index based selection functionality with those
+  //! functions.
+  ///@{
+  CGAL::Three::Scene_item* selectedItem() const;
+  QList<CGAL::Three::Scene_item*> selectedItems() const;
+  QList<CGAL::Three::Scene_item*> selectionA() const;
+  QList<CGAL::Three::Scene_item*> selectionB() const;
+  ///@}
+
+  //!@returns the currently selected item's index.
+  int mainSelectionIndex() const;
+  //!@returns the list of currently selected items indices.
+  QList<int> selectionIndices() const;
+  //!@returns the index of the Item_A
+  int selectionAindex() const;
+  //!@returns the index of the Item_B
+  int selectionBindex() const;
+
+  /*! Is called by Viewer::initializeGL(). Allows all the initialization
+   * of OpenGL code that needs a context.
+   */
+  void initializeGL();
+  /*! Is called by Viewer::draw(). Is deprecated and does nothing.*/
+  void draw();
+  /*! Is deprecated and does nothing.*/
+  void drawWithNames();
+  /*! Is called by Viewer::draw(Viewer_interface*). Calls draw_aux(false, viewer).
+   * @see draw_aux(bool with_names, Viewer_interface).*/
+  void draw(CGAL::Three::Viewer_interface*);
+  /*! Is called by Viewer::drawWithNames(Viewer_interface*). Calls draw_aux(true, viewer).
+   * @see draw_aux(bool with_names, Viewer_interface).*/
+  void drawWithNames(CGAL::Three::Viewer_interface*);
+  /*! Manages the key events.
+   * @returns true if the keyEvent executed well.
+   */
+  bool keyPressEvent(QKeyEvent* e);
+
+  //!@returns the scene bounding box
+  Bbox bbox() const;
+  float get_bbox_length() const;
+  //!@returns the length of the bounding box's diagonal.
+  double len_diagonal() const
+  {
+    Bbox box = bbox();
+    double dx = box.xmax - box.xmin;
+    double dy = box.ymax - box.ymin;
+    double dz = box.zmax - box.zmin;
+    return std::sqrt(dx*dx + dy*dy + dz*dz);
+  }
+
+
+  // QStandardItemModel functions
+  void moveRowUp();
+  void moveRowDown();
+  bool dropMimeData(const QMimeData *, Qt::DropAction, int, int, const QModelIndex &parent);
+  QVariant data ( const QModelIndex & index, int role = ::Qt::DisplayRole ) const;
+  //!@returns the type of data correspondind to the role.
+  QVariant headerData ( int section, ::Qt::Orientation orientation, int role = ::Qt::DisplayRole ) const;
+  //!@returns the flags for the item at the target index.
+  ::Qt::ItemFlags flags ( const QModelIndex & index ) const;
+  /*! Sets the column data for the target index. Returns false if index is not valid and
+   * if role is not EditRole.*/
+  bool setData(const QModelIndex &index, const QVariant &value, int role);
+  QList<CGAL::Three::Scene_group_item*> group_entries() const ;
+  QList<CGAL::Three::Scene_item*> item_entries() const ;
+  // auxiliary public function for QMainWindow
+  //!Selects the row at index i in the sceneView.
+  QItemSelection createSelection(int i);
+  //!Selects all the rows in the sceneView.
+  QItemSelection createSelectionAll();
+
+public Q_SLOTS:
+  //!Specifies a group as Expanded for the view
+  void setExpanded(QModelIndex);
+  //!Specifies a group as Collapsed for the view
+  void setCollapsed(QModelIndex);
+  /*! This is an overloaded function.
+   * Notifies the scene that the sender item was modified.
+   * Called by the items. Calls @ref Scene_item#changed().
+   * This function is called by the items.*/
+  void itemChanged();
+  /*! Notifies the scene that the item at index i was modified.
+   * Called by the items. Calls @ref Scene_item#changed().
+   * This function is called by the items.*/
+  void itemChanged(int i); 
+  /*! Notifies the scene that the item was modified.
+   *  Calls @ref Scene_item#changed().
+   * This function is called by the items.*/
+  void itemChanged(CGAL::Three::Scene_item*);
+  //!Removes item from all the groups of the scene.
+  void remove_item_from_groups(CGAL::Three::Scene_item* item);
+
+  void add_group(Scene_group_item* group);
+  //!Re-organizes the sceneView.
+  void group_added();
+  //! Sets the selected item to the target index.
+  void setSelectedItemIndex(int i)
+  {
+    selected_item = i;
+  }
+  //! Sets the selected item to the target index and emits selectionChanged(i).
+  void setSelectedItem(int i )
+  {
+    selected_item = i;
+    Q_EMIT selectionChanged(i);
+  }
+
+  //! Sets the target item as selected and emits setSelectedItem for its index.
+  void setSelectedItem(CGAL::Three::Scene_item* item_to_select)
+  {
+    int i=0;
+    Q_FOREACH(CGAL::Three::Scene_item* item, m_entries)
+    {
+      if (item==item_to_select)
+      {
+        Q_EMIT setSelectedItem(i);
+        break;
+      }
+      ++i;
+    }
+  }
+  //! Sets the target list of indices as the selected indices.
+  QList<int> setSelectedItemsList(QList<int> l )
+  {
+    Q_FOREACH(int i,l)
+    {
+       CGAL::Three::Scene_group_item* group =
+               qobject_cast<CGAL::Three::Scene_group_item*>(item(i));
+       if(group)
+       {
+         QList<int> list;
+         Q_FOREACH(CGAL::Three::Scene_item* child, group->getChildren())
+           list<<m_entries.indexOf(child);
+         l << setSelectedItemsList(list);
+       }
+
+    }
+    selected_items_list = l;
+    return l;
+  }
+
+  // Accessors (setters)
+  //!Sets the item at index i to visible or not visible.
+  void setItemVisible(int, bool b);
+  //!Sets the item_A as the item at index i .
+  void setItemA(int i);
+  //!Sets the item_B as the item at index i .
+  void setItemB(int i);
+
+Q_SIGNALS:
+  //generated automatically by moc
+  void itemPicked(const QModelIndex &);
+  void newItem(int);
+  void updated_bbox();
+  void updated();
+  void itemAboutToBeDestroyed(CGAL::Three::Scene_item*);
+  void selectionRay(double, double, double, double, double, double);
+  void selectionChanged(int i);
+  void restoreCollapsedState();
+private Q_SLOTS:
+  //! Casts a selection ray and calls the item function select.
+  void setSelectionRay(double, double, double, double, double, double);
+  void callDraw(){  QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin(); viewer->update();}
+
+private:
+  /*! Calls the drawing functions of each visible item according
+   * to its current renderingMode. If with_names is true, uses
+   * the OpenGL mode GL_WITH_NAMES, essentially used for the picking.*/
+  void draw_aux(bool with_names, CGAL::Three::Viewer_interface*);
+  //! Re-draw the hierarchy of the view.
+  void organize_items(CGAL::Three::Scene_item* item, QStandardItem *root, int loop);
+  //! List of Scene_items.
+  typedef QList<CGAL::Three::Scene_item*> Entries;
+  //!List containing all the scene_items.
+  Entries m_entries;
+  //! Index of the currently selected item.
+  int selected_item;
+  //!List containing all the scene_group_items.
+  QList<CGAL::Three::Scene_group_item*> m_group_entries;
+  //!List of indices of the currently selected items.
+  QList<int> selected_items_list;
+  //!Index of the item_A.
+  int item_A;
+  //!Index of the item_B.
+  int item_B;
+  bool picked;
+  bool gl_init;
+  static GlSplat::SplatRenderer* ms_splatting;
+  static int ms_splattingCounter;
+  QMap<QModelIndex, int> index_map;
+
+public:
+  static GlSplat::SplatRenderer* splatting();
+
+}; // end class Scene
+
+class QAbstractProxyModel;
+/*!
+ * \brief The SceneDelegate class
+ * Handles the columns of the sceneView
+ */
+class SCENE_EXPORT SceneDelegate : public QItemDelegate
+{
+public:
+  SceneDelegate(QObject * parent = 0)
+    : QItemDelegate(parent),
+      checkOnPixmap(":/cgal/icons/check-on.png"),
+      checkOffPixmap(":/cgal/icons/check-off.png")
+  {
+  }
+//! Handles the clicks on the sceneView
+  bool editorEvent(QEvent *event, QAbstractItemModel *model,
+                   const QStyleOptionViewItem &option,
+                   const QModelIndex &index);
+  //! Draws the content of the sceneView
+  void paint(QPainter *painter, const QStyleOptionViewItem &option,
+             const QModelIndex &index) const;
+  void setProxy(QAbstractProxyModel* p_proxy){
+      proxy = p_proxy;
+  }
+  void setScene(Scene* p_scene){
+      scene = p_scene;
+  }
+
+private:
+  QPixmap checkOnPixmap;
+  QPixmap checkOffPixmap;
+  QAbstractProxyModel *proxy;
+  Scene *scene;
+  mutable int size;
+}; // end class SceneDelegate
+
+#endif // SCENE_H
+
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_basic_objects_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_basic_objects_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_basic_objects_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_basic_objects_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.cpp
new file mode 100644
index 0000000..9f35fd7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.cpp
@@ -0,0 +1,2 @@
+#include "Scene_c2t3_item.h"
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.h
new file mode 100644
index 0000000..125fced
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item.h
@@ -0,0 +1,112 @@
+#ifndef SCENE_C2T3_ITEM_H
+#define SCENE_C2T3_ITEM_H
+
+#include "Scene_c2t3_item_config.h"
+#include "C2t3_type.h"
+#include <iostream>
+#include  <CGAL/Three/Scene_item.h>
+#include <qgl.h>
+#include <QtCore/qglobal.h>
+#include <CGAL/gl.h>
+
+class SCENE_C2T3_ITEM_EXPORT Scene_c2t3_item : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+  Scene_c2t3_item(const C2t3& c2t3)
+    : c2t3_(c2t3)
+  {
+  }
+
+  ~Scene_c2t3_item()
+  {
+  }
+
+  C2t3& c2t3() {
+    return c2t3_;
+  }
+
+  const C2t3& c2t3() const {
+    return c2t3_;
+  }
+  bool isFinite() const { return true; }
+  bool isEmpty() const {
+    return c2t3().triangulation().number_of_vertices() == 0;
+  }
+
+  void compute_bbox() const {
+    if(isEmpty())
+      _bbox =  Bbox();
+    else {
+      bool first = true;
+      CGAL::Bbox_3 result;
+      for(Tr::Finite_vertices_iterator
+            vit = ++c2t3().triangulation().finite_vertices_begin(),
+            end = c2t3().triangulation().finite_vertices_end();
+          vit != end; ++vit)
+      {
+        if(first) {
+          result = vit->point().bbox();
+          first = false;
+        } else { 
+          result = result + vit->point().bbox();
+        }
+      }
+      _bbox = Bbox(result.xmin(), result.ymin(), result.zmin(),
+                  result.xmax(), result.ymax(), result.zmax());
+    }
+  }
+
+
+  Scene_c2t3_item* clone() const {
+    return 0;
+  }
+
+  QString toolTip() const {
+    return tr("<p><b>2D complex in a 3D triangulation</b></p>"
+              "<p>Number of vertices: %1<br />"
+              "Number of surface facets: %2<br />")
+      .arg(c2t3().triangulation().number_of_vertices())
+      .arg(c2t3().number_of_facets());
+  }
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); // CHECK THIS!
+  }
+
+  void draw() const {
+   /* ::glBegin(GL_TRIANGLES);
+    for(C2t3::Facet_iterator
+          fit = c2t3().facets_begin(),
+          end = c2t3().facets_end();
+        fit != end; ++fit)
+    {
+      const Tr::Cell_handle& cell = fit->first;
+      const int& index = fit->second;
+      const Tr::Geom_traits::Point_3& pa = cell->vertex((index+1)&3)->point();
+      const Tr::Geom_traits::Point_3& pb = cell->vertex((index+2)&3)->point();
+      const Tr::Geom_traits::Point_3& pc = cell->vertex((index+3)&3)->point();
+      draw_triangle(pa, pb, pc);
+    }
+    ::glEnd();*/
+  }
+
+private:
+  static void draw_triangle(const Tr::Point& pa,
+                            const Tr::Point& pb,
+                            const Tr::Point& pc) {
+    Tr::Geom_traits::Vector_3 n = cross_product(pb - pa, pc -pa);
+    n = n / CGAL::sqrt(n*n);
+    ::glNormal3d(n.x(),n.y(),n.z());
+
+    ::glVertex3d(pa.x(),pa.y(),pa.z());
+    ::glVertex3d(pb.x(),pb.y(),pb.z());
+    ::glVertex3d(pc.x(),pc.y(),pc.z());
+  }
+
+private:
+  C2t3 c2t3_;
+};
+
+#endif // SCENE_C2T3_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_c2t3_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c2t3_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.cpp
new file mode 100644
index 0000000..43f1a90
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.cpp
@@ -0,0 +1,1280 @@
+#include "config.h"
+#include "create_sphere.h"
+#include "Scene_c3t3_item.h"
+
+#include <QVector>
+#include <QColor>
+#include <QPixmap>
+#include <QPainter>
+#include <QtCore/qglobal.h>
+
+#include <map>
+#include <vector>
+#include <CGAL/gl.h>
+#include <CGAL/Mesh_3/dihedral_angle_3.h>
+#include <CGAL/Three/Scene_interface.h>
+
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+
+#include <boost/function_output_iterator.hpp>
+#include <boost/foreach.hpp>
+
+struct Scene_c3t3_item_priv {
+  Scene_c3t3_item_priv() : c3t3() {}
+  Scene_c3t3_item_priv(const C3t3& c3t3_) : c3t3(c3t3_) {}
+
+  C3t3 c3t3;
+  QVector<QColor> colors;
+};
+
+void Scene_c3t3_item::compile_shaders()
+{
+    program_sphere = new QOpenGLShaderProgram();
+
+    //Source code
+    const char vertex_source[] =
+    {
+        "#version 120                                                                                             \n"
+        "attribute highp vec4 vertex;                                                                             \n"
+        "attribute highp vec3 normals;                                                                            \n"
+        "attribute highp vec3 colors;                                                                             \n"
+        "attribute highp vec3 center;                                                                             \n"
+        "attribute highp float radius;                                                                            \n"
+        "uniform highp vec4 cutplane;                                                                             \n"
+        "uniform highp mat4 mvp_matrix;                                                                           \n"
+        "uniform highp mat4 mv_matrix;                                                                            \n"
+        "varying highp vec4 fP;                                                                                   \n"
+        "varying highp vec3 fN;                                                                                   \n"
+        "varying highp vec4 color;                                                                                \n"
+        "                                                                                                         \n"
+        "                                                                                                         \n"
+        "void main(void)                                                                                          \n"
+        "{                                                                                                        \n"
+        " if(center.x * cutplane.x  + center.y * cutplane.y  + center.z * cutplane.z  +  cutplane.w > 0){         \n"
+        "    color = vec4(colors,0.0);                                                                            \n"
+        " }else{                                                                                                  \n"
+        "  color = vec4(colors,1.0);}                                                                             \n"
+        "  fP = mv_matrix * vertex;                                                                               \n"
+        "  fN = mat3(mv_matrix)* normals;                                                                         \n"
+        "  gl_Position =  mvp_matrix *                                                                            \n"
+        "  vec4(radius*vertex.x + center.x, radius* vertex.y + center.y, radius*vertex.z + center.z, 1.0) ;       \n"
+        "}                                                                                                        \n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+
+    if(!program_sphere->addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!program_sphere->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3.f" ))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!program_sphere->link())
+    {
+        //std::cerr<<"linking Program FAILED"<<std::endl;
+        qDebug() << program_sphere->log();
+    }
+}
+double complex_diag(const Scene_item* item) {
+  const Scene_item::Bbox& bbox = item->bbox();
+  const double& xdelta = bbox.xmax-bbox.xmin;
+  const double& ydelta = bbox.ymax-bbox.ymin;
+  const double& zdelta = bbox.zmax-bbox.zmin;
+  const double diag = std::sqrt(xdelta*xdelta +
+                                ydelta*ydelta +
+                                zdelta*zdelta);
+  return diag * 0.7;
+}
+
+Scene_c3t3_item::Scene_c3t3_item()
+  : Scene_item(NumberOfBuffers, NumberOfVaos)
+  , d(new Scene_c3t3_item_priv())
+  , frame(new ManipulatedFrame())
+  , last_known_scene(NULL)
+  , data_item_(NULL)
+  , histogram_()
+  , indices_()
+{
+  are_intersection_buffers_filled = false;
+  positions_lines.resize(0);
+  positions_poly.resize(0);
+  normals.resize(0);
+  s_vertex.resize(0);
+  s_normals.resize(0);
+  ws_vertex.resize(0);
+  need_changed = false;
+  startTimer(0);
+  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
+  c3t3_changed();
+  setRenderingMode(FlatPlusEdges);
+  compile_shaders();
+  spheres_are_shown = false;
+  create_flat_and_wire_sphere(1.0f,s_vertex,s_normals, ws_vertex);
+
+}
+
+Scene_c3t3_item::Scene_c3t3_item(const C3t3& c3t3)
+  : Scene_item(NumberOfBuffers, NumberOfVaos)
+  , d(new Scene_c3t3_item_priv(c3t3))
+  , frame(new ManipulatedFrame())
+  , last_known_scene(NULL)  
+  , data_item_(NULL)  
+  , histogram_()
+  , indices_()
+{
+  positions_lines.resize(0);
+  positions_poly.resize(0);
+  normals.resize(0);
+  s_vertex.resize(0);
+  s_normals.resize(0);
+  ws_vertex.resize(0);
+  need_changed = false;
+  startTimer(0);
+  connect(frame, SIGNAL(modified()), this, SLOT(changed()));
+  reset_cut_plane();
+  c3t3_changed();
+  setRenderingMode(FlatPlusEdges);
+  compile_shaders();
+  spheres_are_shown = false;
+  create_flat_and_wire_sphere(1.0f,s_vertex,s_normals, ws_vertex);
+}
+
+Scene_c3t3_item::~Scene_c3t3_item()
+{
+  frame = 0;
+  delete frame;
+  delete d;
+}
+
+
+
+const Scene_item*
+Scene_c3t3_item::data_item() const
+{
+  return data_item_;
+}
+
+void
+Scene_c3t3_item::set_data_item(const Scene_item* data_item)
+{
+  data_item_ = data_item;
+  if (NULL != data_item)
+  {
+    connect(data_item, SIGNAL(aboutToBeDestroyed()),
+      this, SLOT(data_item_destroyed()));
+  }
+}
+
+void
+Scene_c3t3_item::data_item_destroyed()
+{
+  set_data_item(NULL);
+}
+
+const C3t3&
+Scene_c3t3_item::c3t3() const {
+  return d->c3t3;
+}
+
+C3t3&
+Scene_c3t3_item::c3t3()
+{
+  return d->c3t3;
+}
+
+void
+Scene_c3t3_item::changed()
+{
+  need_changed = true;
+}
+
+void Scene_c3t3_item::timerEvent(QTimerEvent* /*event*/)
+{ // just handle deformation - paint like selection is handled in eventFilter()
+  if(need_changed) {
+    are_intersection_buffers_filled = false;
+    need_changed = false;
+  }
+}
+
+void
+Scene_c3t3_item::c3t3_changed()
+{
+  // Update colors
+  // Fill indices map and get max subdomain value
+  indices_.clear();
+
+  int max = 0;
+  for (C3t3::Cells_in_complex_iterator cit = this->c3t3().cells_in_complex_begin(),
+    end = this->c3t3().cells_in_complex_end(); cit != end; ++cit)
+  {
+    max = (std::max)(max, cit->subdomain_index());
+    indices_.insert(cit->subdomain_index());
+  }
+  for (C3t3::Facets_in_complex_iterator fit = this->c3t3().facets_in_complex_begin(),
+    end = this->c3t3().facets_in_complex_end(); fit != end; ++fit)
+  {
+    max = (std::max)(max, fit->first->surface_patch_index(fit->second));
+    indices_.insert(fit->first->surface_patch_index(fit->second));
+  }
+
+  d->colors.resize(max + 1);
+  compute_color_map(color_);
+
+  // Rebuild histogram
+  build_histogram();
+  
+}
+
+QPixmap
+Scene_c3t3_item::graphicalToolTip() const
+{
+  if (!histogram_.isNull())
+  {
+    return histogram_;
+  }
+  else
+  {
+    const_cast<Scene_c3t3_item&>(*this).build_histogram();
+    return histogram_;
+  }
+}
+
+template<typename C3t3>
+std::vector<int>
+create_histogram(const C3t3& c3t3, double& min_value, double& max_value)
+{
+  typedef typename C3t3::Triangulation::Point Point_3;
+
+  std::vector<int> histo(181, 0);
+
+  min_value = 180.;
+  max_value = 0.;
+
+  for (typename C3t3::Cells_in_complex_iterator cit = c3t3.cells_in_complex_begin();
+    cit != c3t3.cells_in_complex_end();
+    ++cit)
+  {
+    if (!c3t3.is_in_complex(cit))
+      continue;
+
+#ifdef CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
+    if (c3t3.in_dimension(cit->vertex(0)) <= 1
+      || c3t3.in_dimension(cit->vertex(1)) <= 1
+      || c3t3.in_dimension(cit->vertex(2)) <= 1
+      || c3t3.in_dimension(cit->vertex(3)) <= 1)
+      continue;
+#endif //CGAL_MESH_3_DEMO_DONT_COUNT_TETS_ADJACENT_TO_SHARP_FEATURES_FOR_HISTOGRAM
+
+    const Point_3& p0 = cit->vertex(0)->point();
+    const Point_3& p1 = cit->vertex(1)->point();
+    const Point_3& p2 = cit->vertex(2)->point();
+    const Point_3& p3 = cit->vertex(3)->point();
+
+    double a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p1, p2, p3)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+    a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p2, p1, p3)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+    a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p0, p3, p1, p2)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+    a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p2, p0, p3)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+    a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p1, p3, p0, p2)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+    a = CGAL::to_double(CGAL::abs(CGAL::Mesh_3::dihedral_angle(p2, p3, p0, p1)));
+    histo[static_cast<int>(std::floor(a))] += 1;
+    min_value = (std::min)(min_value, a);
+    max_value = (std::max)(max_value, a);
+
+  }
+
+  return histo;
+}
+
+void
+Scene_c3t3_item::build_histogram()
+{
+#ifdef CGAL_MESH_3_DEMO_BIGGER_HISTOGRAM_WITH_WHITE_BACKGROUNG
+  // Create an histogram_ and display it
+  const int height = 280;
+  const int top_margin = 5;
+  const int left_margin = 20;
+  const int drawing_height = height - top_margin * 2;
+  const int width = 804;
+  const int cell_width = 4;
+  const int text_margin = 3;
+  const int text_height = 34;
+
+  histogram_ = QPixmap(width, height + text_height);
+  histogram_.fill(QColor(255, 255, 255));
+#else
+  // Create an histogram_ and display it
+  const int height = 140;
+  const int top_margin = 5;
+  const int left_margin = 20;
+  const int drawing_height = height - top_margin * 2;
+  const int width = 402;
+  const int cell_width = 2;
+  const int text_margin = 3;
+  const int text_height = 20;
+
+  histogram_ = QPixmap(width, height + text_height);
+  histogram_.fill(QColor(192, 192, 192));
+#endif  
+
+  QPainter painter(&histogram_);
+  painter.setPen(Qt::black);
+  painter.setBrush(QColor(128, 128, 128));
+  //painter.setFont(QFont("Arial", 30));
+
+  // Build histogram_ data
+  double min_value, max_value;
+  std::vector<int> histo_data = create_histogram(c3t3(), min_value, max_value);
+
+  // Get maximum value (to normalize)
+  int max_size = 0;
+  for (std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end();
+    it != end; ++it)
+  {
+    max_size = (std::max)(max_size, *it);
+  }
+
+  // colored histogram
+  int j = 0;
+
+  // draw
+  int i = left_margin;
+  for (std::vector<int>::iterator it = histo_data.begin(), end = histo_data.end();
+    it != end; ++it, i += cell_width)
+  {
+    int line_height = static_cast<int>(std::ceil(static_cast<double>(drawing_height)*
+      static_cast<double>(*it) / static_cast<double>(max_size)) + .5);
+
+    painter.fillRect(i,
+      drawing_height + top_margin - line_height,
+      cell_width,
+      line_height,
+      get_histogram_color(j++));
+  }
+
+  // draw bottom horizontal line
+  painter.setPen(Qt::blue);
+
+  painter.drawLine(QPoint(left_margin, drawing_height + top_margin),
+    QPoint(left_margin + static_cast<int>(histo_data.size())*cell_width,
+    drawing_height + top_margin));
+
+
+  // draw min value and max value
+  const int min_tr_width = static_cast<int>(2 * (std::floor(min_value)*cell_width + left_margin));
+  const int max_tr_width = static_cast<int>(
+    2 * ((histo_data.size() - std::floor(max_value))*cell_width + left_margin));
+  const int tr_y = drawing_height + top_margin + text_margin;
+
+  painter.setPen(get_histogram_color(min_value));
+  QRect min_text_rect(0, tr_y, min_tr_width, text_height);
+  painter.drawText(min_text_rect, Qt::AlignCenter, tr("%1").arg(min_value, 0, 'f', 1));
+
+  painter.setPen(get_histogram_color(max_value));
+  QRect max_text_rect(width - max_tr_width, tr_y, max_tr_width, text_height);
+  painter.drawText(max_text_rect, Qt::AlignCenter, tr("%1").arg(max_value, 0, 'f', 1));
+}
+
+QColor
+Scene_c3t3_item::get_histogram_color(const double v) const
+{
+  if (v < 5)            { return Qt::red; }
+  else if (v < 10)      { return QColor(215, 108, 0); }
+  else if (v < 15)      { return QColor(138, 139, 0); }
+  else if (v < 165)     { return QColor(60, 136, 64); }
+  else if (v < 170)     { return QColor(138, 139, 1); }
+  else if (v < 175)     { return QColor(215, 108, 0); }
+  else /* 175<v<=180 */   { return Qt::red; }
+}
+
+void
+Scene_c3t3_item::update_histogram()
+{
+  build_histogram();
+}
+
+void
+Scene_c3t3_item::compute_color_map(const QColor& c)
+{
+  typedef Indices::size_type size_type;
+
+  size_type nb_domains = indices_.size();
+  size_type i = 0;
+  for (Indices::iterator it = indices_.begin(), end = indices_.end();
+    it != end; ++it, ++i)
+  {
+    double hue = c.hueF() + 1. / nb_domains * i;
+    if (hue > 1) { hue -= 1.; }
+    d->colors[*it] = QColor::fromHsvF(hue, c.saturationF(), c.valueF());
+  }
+}
+
+Kernel::Plane_3 Scene_c3t3_item::plane() const {
+  const qglviewer::Vec& pos = frame->position();
+  const qglviewer::Vec& n =
+    frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+  return Kernel::Plane_3(n[0], n[1], n[2], -n * pos);
+}
+
+void Scene_c3t3_item::compute_bbox() const {
+  if (isEmpty())
+    _bbox = Bbox();
+  else {
+    CGAL::Bbox_3 result;
+    for (Tr::Finite_vertices_iterator
+           vit = ++c3t3().triangulation().finite_vertices_begin(),
+           end = c3t3().triangulation().finite_vertices_end();
+         vit != end; ++vit)
+    {
+      if(vit->in_dimension() == -1) continue;
+      result = result + vit->point().bbox();
+    }
+    _bbox = Bbox(result.xmin(), result.ymin(), result.zmin(),
+                 result.xmax(), result.ymax(), result.zmax());
+  }
+}
+
+QString Scene_c3t3_item::toolTip() const {
+  int number_of_tets = 0;
+  for (Tr::Finite_cells_iterator
+    cit = c3t3().triangulation().finite_cells_begin(),
+    end = c3t3().triangulation().finite_cells_end();
+    cit != end; ++cit)
+  {
+    if (c3t3().is_in_complex(cit))
+      ++number_of_tets;
+  }
+  return tr("<p><b>3D complex in a 3D triangulation</b></p>"
+    "<p>Number of vertices: %1<br />"
+    "Number of surface facets: %2<br />"
+    "Number of volume tetrahedra: %3</p>")
+    .arg(c3t3().triangulation().number_of_vertices())
+    .arg(c3t3().number_of_facets())
+    .arg(number_of_tets);
+}
+
+void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+  Scene_c3t3_item* ncthis = const_cast<Scene_c3t3_item*>(this);
+
+  if (!are_buffers_filled)
+  {
+    ncthis->compute_elements();
+    ncthis->initialize_buffers(viewer);
+  }
+
+  vaos[Grid]->bind();
+  program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+  attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+  program->bind();
+  program->setAttributeValue("colors", QColor(Qt::black));
+  QMatrix4x4 f_mat;
+  for (int i = 0; i<16; i++)
+    f_mat.data()[i] = frame->matrix()[i];
+  program->setUniformValue("f_matrix", f_mat);
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_grid.size() / 3));
+  program->release();
+  vaos[Grid]->release();
+
+  vaos[Facets]->bind();
+  program = getShaderProgram(PROGRAM_C3T3);
+  attrib_buffers(viewer, PROGRAM_C3T3);
+  program->bind();
+  QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d());
+  program->setUniformValue("cutplane", cp);
+  // positions_poly_size is the number of total facets in the C3T3
+  // it is only computed once and positions_poly is emptied at the end
+  viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(positions_poly_size / 3));
+  program->release();
+  vaos[Facets]->release();
+
+
+ if (!are_intersection_buffers_filled)
+  {
+     ncthis->compute_intersections();
+     ncthis->initialize_intersection_buffers(viewer);
+  }
+  vaos[iFacets]->bind();
+  program = getShaderProgram(PROGRAM_WITH_LIGHT);
+  attrib_buffers(viewer, PROGRAM_WITH_LIGHT);
+  program->bind();
+
+  // positions_poly is also used for the faces in the cut plane
+  // and changes when the cut plane is moved
+  viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(positions_poly.size() / 3));
+  program->release();
+  vaos[iFacets]->release();
+
+
+  if(spheres_are_shown)
+  {
+    vaos[Spheres]->bind();
+    program_sphere->bind();
+    //ModelViewMatrix used for the transformation of the camera.
+    QMatrix4x4 mvp_mat;
+    // ModelView Matrix used for the lighting system
+    QMatrix4x4 mv_mat;
+    GLdouble d_mat[16];
+    GLint is_both_sides = 0;
+    viewer->camera()->getModelViewProjectionMatrix(d_mat);
+    //Convert the GLdoubles matrices in GLfloats
+    for (int i=0; i<16; ++i){
+      mvp_mat.data()[i] = GLfloat(d_mat[i]);
+    }
+    viewer->camera()->getModelViewMatrix(d_mat);
+    for (int i=0; i<16; ++i)
+      mv_mat.data()[i] = GLfloat(d_mat[i]);
+    QVector4D position(0.0f,0.0f,1.0f, 1.0f );
+    QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
+    // Diffuse
+    QVector4D diffuse(1.0f, 1.0f, 1.0f, 1.0f);
+    // Specular
+    QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f);
+    viewer->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE, &is_both_sides);
+
+    QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d());
+
+    program_sphere->setUniformValue("cutplane", cp);
+    program_sphere->setUniformValue("mvp_matrix", mvp_mat);
+    program_sphere->setUniformValue("mv_matrix", mv_mat);
+    program_sphere->setUniformValue("light_pos", position);
+    program_sphere->setUniformValue("light_diff",diffuse);
+    program_sphere->setUniformValue("light_spec", specular);
+    program_sphere->setUniformValue("light_amb", ambient);
+    program_sphere->setUniformValue("spec_power", 51.8f);
+    program_sphere->setUniformValue("is_two_side", is_both_sides);
+
+    viewer->glDrawArraysInstanced(GL_TRIANGLES, 0,
+                                  static_cast<GLsizei>(s_vertex.size()/3),
+                                  static_cast<GLsizei>(s_radius.size()));
+    program_sphere->release();
+    vaos[Spheres]->release();
+  }
+}
+
+void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+  Scene_c3t3_item* ncthis = const_cast<Scene_c3t3_item*>(this);
+  if (!are_buffers_filled)
+  {
+    ncthis->compute_elements();
+    ncthis->initialize_buffers(viewer);
+  }
+
+  if(renderingMode() == Wireframe)
+  {
+    vaos[Grid]->bind();
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors", QColor(Qt::black));
+    QMatrix4x4 f_mat;
+    for (int i = 0; i<16; i++)
+        f_mat.data()[i] = frame->matrix()[i];
+    program->setUniformValue("f_matrix", f_mat);
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_grid.size() / 3));
+    program->release();
+    vaos[Grid]->release();
+  }
+  vaos[Edges]->bind();
+  program = getShaderProgram(PROGRAM_C3T3_EDGES);
+  attrib_buffers(viewer, PROGRAM_C3T3_EDGES);
+  program->bind();
+  QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d());
+  program->setUniformValue("cutplane", cp);
+  program->setAttributeValue("colors", QColor(Qt::black));
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines_size / 3));
+  program->release();
+  vaos[Edges]->release();
+
+  vaos[iEdges]->bind();
+  program = getShaderProgram(PROGRAM_NO_SELECTION);
+  attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+  program->bind();
+  program->setAttributeValue("colors", QColor(Qt::black));
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size() / 3));
+  program->release();
+  vaos[iEdges]->release();
+
+  if(spheres_are_shown)
+  {
+      vaos[Wired_spheres]->bind();
+      program_sphere->bind();
+      //ModelViewMatrix used for the transformation of the camera.
+      QMatrix4x4 mvp_mat;
+      // ModelView Matrix used for the lighting system
+      QMatrix4x4 mv_mat;
+      GLdouble d_mat[16];
+      GLint is_both_sides = 0;
+      viewer->camera()->getModelViewProjectionMatrix(d_mat);
+      //Convert the GLdoubles matrices in GLfloats
+      for (int i=0; i<16; ++i){
+          mvp_mat.data()[i] = GLfloat(d_mat[i]);
+      }
+      viewer->camera()->getModelViewMatrix(d_mat);
+      for (int i=0; i<16; ++i)
+          mv_mat.data()[i] = GLfloat(d_mat[i]);
+      QVector4D position(0.0f,0.0f,1.0f, 1.0f );
+      QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
+      // Diffuse
+      QVector4D diffuse(1.0f, 1.0f, 1.0f, 1.0f);
+      // Specular
+      QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f);
+      viewer->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE, &is_both_sides);
+
+
+      program_sphere->setUniformValue("mvp_matrix", mvp_mat);
+      program_sphere->setUniformValue("mv_matrix", mv_mat);
+      program_sphere->setUniformValue("light_pos", position);
+      program_sphere->setUniformValue("light_diff",diffuse);
+      program_sphere->setUniformValue("light_spec", specular);
+      program_sphere->setUniformValue("light_amb", ambient);
+      program_sphere->setUniformValue("spec_power", 51.8f);
+      program_sphere->setUniformValue("is_two_side", is_both_sides);
+
+      viewer->glDrawArraysInstanced(GL_TRIANGLES, 0,
+                                    static_cast<GLsizei>(ws_vertex.size()/3),
+                                    static_cast<GLsizei>(s_radius.size()));
+      program_sphere->release();
+      vaos[Wired_spheres]->release();
+  }
+}
+
+void Scene_c3t3_item::draw_points(CGAL::Three::Viewer_interface * viewer) const
+{
+  Scene_c3t3_item* ncthis = const_cast<Scene_c3t3_item*>(this);
+  if (!are_buffers_filled)
+  {
+    ncthis->compute_elements();
+    ncthis-> initialize_buffers(viewer);
+  }
+  vaos[Edges]->bind();
+  program = getShaderProgram(PROGRAM_C3T3_EDGES);
+  attrib_buffers(viewer, PROGRAM_C3T3_EDGES);
+  program->bind();
+  QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d());
+  program->setUniformValue("cutplane", cp);
+  program->setAttributeValue("colors", this->color());
+  viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(positions_lines.size() / 3));
+  vaos[Edges]->release();
+  program->release();
+
+  vaos[Grid]->bind();
+  program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+  attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+  program->bind();
+  program->setAttributeValue("colors", this->color());
+  QMatrix4x4 f_mat;
+  for (int i = 0; i<16; i++)
+    f_mat.data()[i] = frame->matrix()[i];
+  program->setUniformValue("f_matrix", f_mat);
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_grid.size() / 3));
+  program->release();
+  vaos[Grid]->release();
+}
+
+void Scene_c3t3_item::draw_triangle(const Kernel::Point_3& pa,
+  const Kernel::Point_3& pb,
+  const Kernel::Point_3& pc, bool /* is_cut */) const {
+
+  #undef darker
+  Kernel::Vector_3 n = cross_product(pb - pa, pc - pa);
+  n = n / CGAL::sqrt(n*n);
+
+
+  for (int i = 0; i<3; i++)
+  {
+    normals.push_back(n.x());
+    normals.push_back(n.y());
+    normals.push_back(n.z());
+  }
+  positions_poly.push_back(pa.x());
+  positions_poly.push_back(pa.y());
+  positions_poly.push_back(pa.z());
+
+  positions_poly.push_back(pb.x());
+  positions_poly.push_back(pb.y());
+  positions_poly.push_back(pb.z());
+
+  positions_poly.push_back(pc.x());
+  positions_poly.push_back(pc.y());
+  positions_poly.push_back(pc.z());
+
+
+
+}
+
+void Scene_c3t3_item::draw_triangle_edges(const Kernel::Point_3& pa,
+  const Kernel::Point_3& pb,
+  const Kernel::Point_3& pc)const {
+
+#undef darker
+  positions_lines.push_back(pa.x());
+  positions_lines.push_back(pa.y());
+  positions_lines.push_back(pa.z());
+
+  positions_lines.push_back(pb.x());
+  positions_lines.push_back(pb.y());
+  positions_lines.push_back(pb.z());
+
+  positions_lines.push_back(pb.x());
+  positions_lines.push_back(pb.y());
+  positions_lines.push_back(pb.z());
+
+  positions_lines.push_back(pc.x());
+  positions_lines.push_back(pc.y());
+  positions_lines.push_back(pc.z());
+
+  positions_lines.push_back(pc.x());
+  positions_lines.push_back(pc.y());
+  positions_lines.push_back(pc.z());
+
+  positions_lines.push_back(pa.x());
+  positions_lines.push_back(pa.y());
+  positions_lines.push_back(pa.z());
+
+}
+
+double Scene_c3t3_item::complex_diag() const {
+  const Bbox& bbox = this->bbox();
+  const double& xdelta = bbox.xmax - bbox.xmin;
+  const double& ydelta = bbox.ymax - bbox.ymin;
+  const double& zdelta = bbox.zmax - bbox.zmin;
+  const double diag = std::sqrt(xdelta*xdelta +
+    ydelta*ydelta +
+    zdelta*zdelta);
+  return diag * 0.7;
+}
+
+void Scene_c3t3_item::export_facets_in_complex()
+{
+  std::stringstream off_sstream;
+  c3t3().output_facets_in_complex_to_off(off_sstream);
+  std::string backup = off_sstream.str();
+  // Try to read .off in a polyhedron
+  Scene_polyhedron_item* item = new Scene_polyhedron_item;
+  if (!item->load(off_sstream))
+  {
+    delete item;
+    off_sstream.str(backup);
+
+    // Try to read .off in a polygon soup
+    Scene_polygon_soup_item* soup_item = new Scene_polygon_soup_item;
+
+    if (!soup_item->load(off_sstream)) {
+      delete soup_item;
+      return;
+    }
+
+    soup_item->setName(QString("%1_%2").arg(this->name()).arg("facets"));
+    last_known_scene->addItem(soup_item);
+  }
+  else{
+    item->setName(QString("%1_%2").arg(this->name()).arg("facets"));
+    last_known_scene->addItem(item);
+  }
+}
+
+QMenu* Scene_c3t3_item::contextMenu()
+{
+  const char* prop_name = "Menu modified by Scene_c3t3_item.";
+
+  QMenu* menu = Scene_item::contextMenu();
+
+  // Use dynamic properties:
+  // http://doc.qt.io/qt-5/qobject.html#property
+  bool menuChanged = menu->property(prop_name).toBool();
+
+  if (!menuChanged) {
+    QAction* actionExportFacetsInComplex =
+      menu->addAction(tr("Export facets in complex"));
+    actionExportFacetsInComplex->setObjectName("actionExportFacetsInComplex");
+    connect(actionExportFacetsInComplex,
+      SIGNAL(triggered()), this,
+      SLOT(export_facets_in_complex()));
+
+    QAction* actionShowSpheres =
+      menu->addAction(tr("Show protecting &spheres"));
+    actionShowSpheres->setCheckable(true);
+    actionShowSpheres->setObjectName("actionShowSpheres");
+    connect(actionShowSpheres, SIGNAL(toggled(bool)),
+            this, SLOT(show_spheres(bool)));
+    menu->setProperty(prop_name, true);
+  }
+  return menu;
+}
+
+
+void Scene_c3t3_item::initialize_intersection_buffers(CGAL::Three::Viewer_interface *viewer)
+{
+ //vao containing the data for the facets
+  {
+    program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+    program->bind();
+
+    vaos[iFacets]->bind();
+    buffers[iFacet_vertices].bind();
+    buffers[iFacet_vertices].allocate(positions_poly.data(),
+      static_cast<int>(positions_poly.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+    buffers[iFacet_vertices].release();
+
+    buffers[iFacet_normals].bind();
+    buffers[iFacet_normals].allocate(normals.data(),
+      static_cast<int>(normals.size()*sizeof(float)));
+    program->enableAttributeArray("normals");
+    program->setAttributeBuffer("normals", GL_FLOAT, 0, 3);
+    buffers[iFacet_normals].release();
+
+    buffers[iFacet_colors].bind();
+    buffers[iFacet_colors].allocate(f_colors.data(),
+      static_cast<int>(f_colors.size()*sizeof(float)));
+    program->enableAttributeArray("colors");
+    program->setAttributeBuffer("colors", GL_FLOAT, 0, 3);
+    buffers[iFacet_colors].release();
+
+    vaos[iFacets]->release();
+    program->release();
+
+  }
+    //vao containing the data for the lines
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+
+        vaos[iEdges]->bind();
+        buffers[iEdges_vertices].bind();
+        buffers[iEdges_vertices].allocate(positions_lines.data(),
+                                         static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+        buffers[iEdges_vertices].release();
+
+        vaos[iEdges]->release();
+        program->release();
+    }
+        are_intersection_buffers_filled = true;
+}
+
+
+void Scene_c3t3_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer)
+{
+  //vao containing the data for the facets
+  {
+    program = getShaderProgram(PROGRAM_C3T3, viewer);
+    program->bind();
+
+    vaos[Facets]->bind();
+    buffers[Facet_vertices].bind();
+    buffers[Facet_vertices].allocate(positions_poly.data(),
+      static_cast<int>(positions_poly.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+    buffers[Facet_vertices].release();
+
+    buffers[Facet_normals].bind();
+    buffers[Facet_normals].allocate(normals.data(),
+      static_cast<int>(normals.size()*sizeof(float)));
+    program->enableAttributeArray("normals");
+    program->setAttributeBuffer("normals", GL_FLOAT, 0, 3);
+    buffers[Facet_normals].release();
+
+    buffers[Facet_colors].bind();
+    buffers[Facet_colors].allocate(f_colors.data(),
+      static_cast<int>(f_colors.size()*sizeof(float)));
+    program->enableAttributeArray("colors");
+    program->setAttributeBuffer("colors", GL_FLOAT, 0, 3);
+    buffers[Facet_colors].release();
+
+    vaos[Facets]->release();
+    program->release();
+    
+    positions_poly_size = positions_poly.size();
+    positions_poly.clear();
+    positions_poly.swap(positions_poly);
+    normals.clear();
+    normals.swap(normals);
+    f_colors.clear();
+    f_colors.swap(f_colors);
+  }
+
+  //vao containing the data for the lines
+  {
+    program = getShaderProgram(PROGRAM_C3T3_EDGES, viewer);
+    program->bind();
+
+    vaos[Edges]->bind();
+    buffers[Edges_vertices].bind();
+    buffers[Edges_vertices].allocate(positions_lines.data(),
+                                     static_cast<int>(positions_lines.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+    buffers[Edges_vertices].release();
+
+    vaos[Edges]->release();
+    program->release();
+
+    positions_lines_size = positions_lines.size();
+    positions_lines.clear();
+    positions_lines.swap(positions_lines);
+    
+  }
+
+  //vao containing the data for the grid
+  {
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+    program->bind();
+
+    vaos[Grid]->bind();
+    buffers[Grid_vertices].bind();
+    buffers[Grid_vertices].allocate(positions_grid.data(),
+                                    static_cast<int>(positions_grid.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+    buffers[Grid_vertices].release();
+    vaos[Grid]->release();
+    program->release();
+  }
+
+  //vao containing the data for the spheres
+  {
+    program_sphere->bind();
+
+    vaos[Spheres]->bind();
+    buffers[Sphere_vertices].bind();
+    buffers[Sphere_vertices].allocate(s_vertex.data(),
+                                      static_cast<int>(s_vertex.size()*sizeof(float)));
+    program_sphere->enableAttributeArray("vertex");
+    program_sphere->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+    buffers[Sphere_vertices].release();
+
+    buffers[Sphere_normals].bind();
+    buffers[Sphere_normals].allocate(s_normals.data(),
+                                     static_cast<int>(s_normals.size()*sizeof(float)));
+    program_sphere->enableAttributeArray("normals");
+    program_sphere->setAttributeBuffer("normals", GL_FLOAT, 0, 3);
+    buffers[Sphere_normals].release();
+
+    buffers[Sphere_colors].bind();
+    buffers[Sphere_colors].allocate(s_colors.data(),
+                                    static_cast<int>(s_colors.size()*sizeof(float)));
+    program_sphere->enableAttributeArray("colors");
+    program_sphere->setAttributeBuffer("colors", GL_FLOAT, 0, 3);
+    buffers[Sphere_colors].release();
+
+    buffers[Sphere_radius].bind();
+    buffers[Sphere_radius].allocate(s_radius.data(),
+                                    static_cast<int>(s_radius.size()*sizeof(float)));
+    program_sphere->enableAttributeArray("radius");
+    program_sphere->setAttributeBuffer("radius", GL_FLOAT, 0, 1);
+    buffers[Sphere_radius].release();
+
+    buffers[Sphere_center].bind();
+    buffers[Sphere_center].allocate(s_center.data(),
+                                    static_cast<int>(s_center.size()*sizeof(float)));
+    program_sphere->enableAttributeArray("center");
+    program_sphere->setAttributeBuffer("center", GL_FLOAT, 0, 3);
+    buffers[Sphere_center].release();
+
+    viewer->glVertexAttribDivisor(program_sphere->attributeLocation("center"), 1);
+    viewer->glVertexAttribDivisor(program_sphere->attributeLocation("radius"), 1);
+    viewer->glVertexAttribDivisor(program_sphere->attributeLocation("colors"), 1);
+    vaos[Spheres]->release();
+
+  }
+
+    //vao containing the data for the wired spheres
+    {
+      program_sphere->bind();
+
+      vaos[Wired_spheres]->bind();
+      buffers[Wired_spheres_vertices].bind();
+      buffers[Wired_spheres_vertices].allocate(s_vertex.data(),
+                                               static_cast<int>(s_vertex.size()*sizeof(float)));
+      program_sphere->enableAttributeArray("vertex");
+      program_sphere->setAttributeBuffer("vertex", GL_FLOAT, 0, 3);
+      buffers[Wired_spheres_vertices].release();
+
+      buffers[Sphere_normals].bind();
+      program_sphere->enableAttributeArray("normals");
+      program_sphere->setAttributeBuffer("normals", GL_FLOAT, 0, 3);
+      buffers[Sphere_normals].release();
+
+      buffers[Sphere_colors].bind();
+      program_sphere->enableAttributeArray("colors");
+      program_sphere->setAttributeBuffer("colors", GL_FLOAT, 0, 3);
+      buffers[Sphere_colors].release();
+
+      buffers[Sphere_radius].bind();
+      program_sphere->enableAttributeArray("radius");
+      program_sphere->setAttributeBuffer("radius", GL_FLOAT, 0, 1);
+      buffers[Sphere_radius].release();
+
+      buffers[Sphere_center].bind();
+      program_sphere->enableAttributeArray("center");
+      program_sphere->setAttributeBuffer("center", GL_FLOAT, 0, 3);
+      buffers[Sphere_center].release();
+
+      viewer->glVertexAttribDivisor(program_sphere->attributeLocation("center"), 1);
+      viewer->glVertexAttribDivisor(program_sphere->attributeLocation("radius"), 1);
+      viewer->glVertexAttribDivisor(program_sphere->attributeLocation("colors"), 1);
+      vaos[Wired_spheres]->release();
+
+      program_sphere->release();
+    }
+    program_sphere->release();
+    are_buffers_filled = true;
+}
+
+
+
+void Scene_c3t3_item::compute_intersection(const Primitive& facet)
+{  
+  const Kernel::Point_3& pa = facet.id().first->vertex(0)->point();
+  const Kernel::Point_3& pb = facet.id().first->vertex(1)->point();
+  const Kernel::Point_3& pc = facet.id().first->vertex(2)->point();
+  const Kernel::Point_3& pd = facet.id().first->vertex(3)->point();
+
+  QColor color = d->colors[facet.id().first->subdomain_index()].darker(150);
+
+  for(int i=0; i < 12;i++){
+    f_colors.push_back(color.redF());f_colors.push_back(color.greenF());f_colors.push_back(color.blueF());
+  }
+  draw_triangle(pb, pa, pc, true);
+  draw_triangle(pa, pb, pd, true);
+  draw_triangle(pa, pd, pc, true);
+  draw_triangle(pb, pc, pd, true);
+
+  draw_triangle_edges(pb, pa, pc);
+  draw_triangle_edges(pa, pb, pd);
+  draw_triangle_edges(pa, pd, pc);
+  draw_triangle_edges(pb, pc, pd);
+
+  {
+    Tr::Cell_handle nh = facet.id().first->neighbor(facet.id().second);
+    if(c3t3().is_in_complex(nh)){
+      const Kernel::Point_3& pa = nh->vertex(0)->point();
+      const Kernel::Point_3& pb = nh->vertex(1)->point();
+      const Kernel::Point_3& pc = nh->vertex(2)->point();
+      const Kernel::Point_3& pd = nh->vertex(3)->point();
+
+      for(int i=0; i < 12;i++){
+        f_colors.push_back(color.redF());f_colors.push_back(color.greenF());f_colors.push_back(color.blueF());
+      }
+      draw_triangle(pb, pa, pc, true);
+      draw_triangle(pa, pb, pd, true);
+      draw_triangle(pa, pd, pc, true);
+      draw_triangle(pb, pc, pd, true);
+
+      draw_triangle_edges(pb, pa, pc);
+      draw_triangle_edges(pa, pb, pd);
+      draw_triangle_edges(pa, pd, pc);
+      draw_triangle_edges(pb, pc, pd);
+    }
+  }
+
+}
+
+
+void Scene_c3t3_item::compute_intersections()
+{
+  positions_poly.clear();
+  normals.clear();
+  f_colors.clear();
+  positions_lines.clear();
+  const Kernel::Plane_3& plane = this->plane();
+  tree.all_intersected_primitives(plane, boost::make_function_output_iterator(Compute_intersection(*this)));
+}
+
+
+void Scene_c3t3_item::compute_elements()
+{
+  positions_poly.clear();
+  normals.clear();
+  f_colors.clear();
+  positions_lines.clear();
+  s_colors.resize(0);
+  s_center.resize(0);
+  s_radius.resize(0);
+
+
+  //The grid
+  {
+    float x = (2 * (float)complex_diag()) / 10.0;
+    float y = (2 * (float)complex_diag()) / 10.0;
+    for (int u = 0; u < 11; u++)
+    {
+
+      positions_grid.push_back(-(float)complex_diag() + x* u);
+      positions_grid.push_back(-(float)complex_diag());
+      positions_grid.push_back(0.0);
+
+      positions_grid.push_back(-(float)complex_diag() + x* u);
+      positions_grid.push_back((float)complex_diag());
+      positions_grid.push_back(0.0);
+    }
+    for (int v = 0; v<11; v++)
+    {
+
+      positions_grid.push_back(-(float)complex_diag());
+      positions_grid.push_back(-(float)complex_diag() + v * y);
+      positions_grid.push_back(0.0);
+
+      positions_grid.push_back((float)complex_diag());
+      positions_grid.push_back(-(float)complex_diag() + v * y);
+      positions_grid.push_back(0.0);
+    }
+  }
+
+
+  if (isEmpty()){
+    return;
+  }
+  for (Tr::Finite_facets_iterator
+         fit = c3t3().triangulation().finite_facets_begin(),
+         end = c3t3().triangulation().finite_facets_end();
+       fit != end; ++fit)
+    {
+      Tr::Cell_handle ch = fit->first, nh =ch->neighbor(fit->second);
+
+      if( (!c3t3().is_in_complex(ch)) &&  (!c3t3().is_in_complex(nh)) )
+        continue;
+      
+      if(c3t3().is_in_complex(ch)){
+        tree.insert(Primitive(fit));
+      } else{
+        int ni = nh->index(ch);
+        tree.insert(Primitive(Tr::Facet(nh,ni)));
+      }
+    }
+    tree.build();
+
+  //The facets
+  {  
+    for (C3t3::Facet_iterator
+      fit = c3t3().facets_begin(),
+      end = c3t3().facets_end();
+    fit != end; ++fit)
+    {
+      const Tr::Cell_handle& cell = fit->first;
+      const int& index = fit->second;
+      const Kernel::Point_3& pa = cell->vertex((index + 1) & 3)->point();
+      const Kernel::Point_3& pb = cell->vertex((index + 2) & 3)->point();
+      const Kernel::Point_3& pc = cell->vertex((index + 3) & 3)->point();
+
+      QColor color = d->colors[cell->surface_patch_index(index)];
+      f_colors.push_back(color.redF());f_colors.push_back(color.greenF());f_colors.push_back(color.blueF());
+      f_colors.push_back(color.redF());f_colors.push_back(color.greenF());f_colors.push_back(color.blueF());
+      f_colors.push_back(color.redF());f_colors.push_back(color.greenF());f_colors.push_back(color.blueF());
+      if ((index % 2 == 1) == c3t3().is_in_complex(cell)) draw_triangle(pb, pa, pc, false);
+      else draw_triangle(pa, pb, pc, false);
+      draw_triangle_edges(pa, pb, pc);
+    }
+
+
+  }
+  //The Spheres
+  {
+    for(Tr::Finite_vertices_iterator
+          vit = d->c3t3.triangulation().finite_vertices_begin(),
+          end =  d->c3t3.triangulation().finite_vertices_end();
+        vit != end; ++vit)
+    {
+      if(vit->point().weight()==0) continue;
+
+      typedef Tr::Vertex_handle Vertex_handle;
+      std::vector<Vertex_handle> incident_vertices;
+      d->c3t3.triangulation().incident_vertices(vit, std::back_inserter(incident_vertices));
+      bool red = vit->is_special();
+      for(std::vector<Vertex_handle>::const_iterator
+            vvit = incident_vertices.begin(), end = incident_vertices.end();
+          vvit != end; ++vvit)
+      {
+        if(Kernel::Sphere_3(vit->point().point(),
+                            vit->point().weight()).bounded_side((*vvit)->point().point())
+           == CGAL::ON_BOUNDED_SIDE)
+          red = true;
+      }
+      if(red){
+        s_colors.push_back(1.0);
+        s_colors.push_back(0.0);
+        s_colors.push_back(0.0);
+
+      }
+      else{
+        QColor c = this->color().darker(250);
+        s_colors.push_back(c.redF());
+        s_colors.push_back(c.greenF());
+        s_colors.push_back(c.blueF());
+      }
+      s_center.push_back(vit->point().point().x());
+      s_center.push_back(vit->point().point().y());
+      s_center.push_back(vit->point().point().z());
+
+      s_radius.push_back(CGAL::sqrt(vit->point().weight()));
+    }
+  }
+}
+
+
+bool Scene_c3t3_item::load_binary(std::istream& is)
+{
+  if(!CGAL::Mesh_3::load_binary_file(is, c3t3())) return false;
+  if(is && frame == 0) {
+    frame = new qglviewer::ManipulatedFrame();
+  }
+  reset_cut_plane();
+  if(is.good()) {
+    c3t3_changed();
+    changed();
+    return true;
+  }
+  else
+    return false;
+}
+
+void
+Scene_c3t3_item::reset_cut_plane() {
+  const Bbox& bbox = this->bbox();
+  const float xcenter = static_cast<float>((bbox.xmax+bbox.xmin)/2.);
+  const float ycenter = static_cast<float>((bbox.ymax+bbox.ymin)/2.);
+  const float zcenter = static_cast<float>((bbox.zmax+bbox.zmin)/2.);
+
+  frame->setPosition(qglviewer::Vec(xcenter, ycenter, zcenter));
+}
+
+void
+Scene_c3t3_item::setColor(QColor c)
+{
+  color_ = c;
+  compute_color_map(c);
+  invalidateOpenGLBuffers();
+// changed() doesn't work because the timerEvent delays it out of the draw
+// function and the intersection is not drawn before the next draw call
+  are_intersection_buffers_filled = false;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.h
new file mode 100644
index 0000000..1da98da
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item.h
@@ -0,0 +1,263 @@
+#ifndef SCENE_C3T3_ITEM_H
+#define SCENE_C3T3_ITEM_H
+
+#include "Scene_c3t3_item_config.h"
+#include "C3t3_type.h"
+
+#include <QVector>
+#include <QColor>
+#include <QPixmap>
+#include <QMenu>
+#include <set>
+
+#include <QtCore/qglobal.h>
+#include <CGAL/gl.h>
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <CGAL/Three/Scene_item.h>
+#include <Scene_polyhedron_item.h>
+#include <Scene_polygon_soup_item.h>
+#include <CGAL/IO/File_binary_mesh_3.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_C3T3_triangle_primitive.h>
+
+struct Scene_c3t3_item_priv;
+
+using namespace CGAL::Three;
+  class SCENE_C3T3_ITEM_EXPORT Scene_c3t3_item
+  : public Scene_item
+{
+  Q_OBJECT
+public:
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+
+  Scene_c3t3_item();
+  Scene_c3t3_item(const C3t3& c3t3);
+  ~Scene_c3t3_item();
+  void setColor(QColor c);
+  bool save_binary(std::ostream& os) const
+  {
+    return CGAL::Mesh_3::save_binary_file(os, c3t3());
+  }
+  bool save_ascii(std::ostream& os) const
+  {
+      os << "ascii CGAL c3t3 " << CGAL::Get_io_signature<C3t3>()() << "\n";
+      CGAL::set_ascii_mode(os);
+      return !!(os << c3t3());
+  }
+
+  void invalidateOpenGLBuffers()
+  {
+    are_buffers_filled = false;
+    compute_bbox();
+  }
+
+  void c3t3_changed();
+
+  const C3t3& c3t3() const;
+  C3t3& c3t3();
+
+  bool manipulatable() const {
+    return true;
+  }
+  ManipulatedFrame* manipulatedFrame() {
+    return frame;
+  }
+
+  void setPosition(float x, float y, float z) {
+    frame->setPosition(x, y, z);
+  }
+
+  void setNormal(float x, float y, float z) {
+    frame->setOrientation(x, y, z, 0.f);
+  }
+
+  Kernel::Plane_3 plane() const;
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const {
+    return c3t3().triangulation().number_of_vertices() == 0
+      || (    c3t3().number_of_facets_in_complex() == 0
+           && c3t3().number_of_cells_in_complex()  == 0  );
+  }
+
+  void compute_bbox() const;
+
+  Scene_c3t3_item* clone() const {
+    return 0;
+  }
+
+  bool load_binary(std::istream& is);
+
+  // data item
+  const Scene_item* data_item() const;
+  void set_data_item(const Scene_item* data_item);
+
+  QString toolTip() const;
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m != Gouraud && m != PointsPlusNormals && m != Splatting);
+  }
+
+  void draw(CGAL::Three::Viewer_interface* viewer) const;
+  void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+  void draw_points(CGAL::Three::Viewer_interface * viewer) const;
+private:
+
+  typedef CGAL::AABB_C3T3_triangle_primitive<Kernel,C3t3> Primitive;
+  typedef CGAL::AABB_traits<Kernel, Primitive> Traits;
+  typedef CGAL::AABB_tree<Traits> Tree;
+  typedef Tree::Point_and_primitive_id Point_and_primitive_id;
+
+  Tree tree;
+
+  bool need_changed;
+  void reset_cut_plane();
+  void draw_triangle(const Kernel::Point_3& pa,
+    const Kernel::Point_3& pb,
+    const Kernel::Point_3& pc, bool /* is_cut */) const;
+
+  void draw_triangle_edges(const Kernel::Point_3& pa,
+    const Kernel::Point_3& pb,
+    const Kernel::Point_3& pc)const;
+
+  double complex_diag() const;
+
+  void compute_color_map(const QColor& c);
+
+  public Q_SLOTS:
+  void export_facets_in_complex();
+
+  void data_item_destroyed();
+
+  void show_spheres(bool b)
+  {
+    spheres_are_shown = b;
+    Q_EMIT redraw();
+
+  }
+  virtual QPixmap graphicalToolTip() const;
+
+  void update_histogram();
+
+  void changed();
+
+  void timerEvent(QTimerEvent*);
+
+private:
+  void build_histogram();
+
+  QColor get_histogram_color(const double v) const;
+
+public:
+  QMenu* contextMenu();
+
+  void set_scene(CGAL::Three::Scene_interface* scene){ last_known_scene = scene; }
+
+protected:
+  Scene_c3t3_item_priv* d;
+
+private:
+
+  
+  
+  mutable bool are_intersection_buffers_filled;
+  enum Buffer
+  {
+      Facet_vertices =0,
+      Facet_normals,
+      Facet_colors,
+      Edges_vertices,
+      Grid_vertices,
+      Sphere_vertices,
+      Sphere_normals,
+      Sphere_colors,
+      Sphere_radius,
+      Sphere_center,
+      Wired_spheres_vertices,
+      iEdges_vertices,
+      iFacet_vertices,
+      iFacet_normals,
+      iFacet_colors,
+      NumberOfBuffers
+  };
+  enum Vao
+  {
+      Facets=0,
+      Edges,
+      Grid,
+      Spheres,
+      Wired_spheres,
+      iEdges,
+      iFacets,
+      NumberOfVaos
+  };
+  qglviewer::ManipulatedFrame* frame;
+  CGAL::Three::Scene_interface* last_known_scene;
+
+  bool spheres_are_shown;
+  const Scene_item* data_item_;
+  QPixmap histogram_;
+
+  typedef std::set<int> Indices;
+  Indices indices_;
+
+  //!Allows OpenGL 2.1 context to get access to glDrawArraysInstanced.
+  typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+  //!Allows OpenGL 2.1 context to get access to glVertexAttribDivisor.
+  typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+  //!Allows OpenGL 2.1 context to get access to gkFrameBufferTexture2D.
+  PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced;
+  //!Allows OpenGL 2.1 context to get access to glVertexAttribDivisor.
+  PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor;
+
+  mutable std::size_t positions_poly_size;
+  mutable std::size_t positions_lines_size;
+  mutable std::vector<float> positions_lines;
+  mutable std::vector<float> positions_grid;
+  mutable std::vector<float> positions_poly;
+  mutable std::vector<float> normals;
+  mutable std::vector<float> f_colors;
+  mutable std::vector<float> s_normals;
+  mutable std::vector<float> s_colors;
+  mutable std::vector<float> s_vertex;
+  mutable std::vector<float> ws_vertex;
+  mutable std::vector<float> s_radius;
+  mutable std::vector<float> s_center;
+  mutable QOpenGLShaderProgram *program;
+  mutable QOpenGLShaderProgram *program_sphere;
+
+  using Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer);
+  void initialize_intersection_buffers(CGAL::Three::Viewer_interface *viewer);
+  void compute_elements();
+  void compute_intersections();
+  void compute_intersection(const Primitive& facet);
+  void compile_shaders();
+
+struct Compute_intersection {
+  Scene_c3t3_item& item;
+
+  Compute_intersection(Scene_c3t3_item& item)
+    : item(item)
+  {}
+
+  void operator()(const Primitive& facet) const
+  {
+    item.compute_intersection(facet);
+  }
+};
+
+
+};
+
+#endif // SCENE_C3T3_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item_config.h
new file mode 100644
index 0000000..2e03e1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_c3t3_item_config.h
@@ -0,0 +1,14 @@
+#ifndef SCENE_C3T3_ITEM_CONFIG_H
+#define SCENE_C3T3_ITEM_CONFIG_H
+
+#ifdef scene_c3t3_item_EXPORTS
+#  define mesh_3_demo_scene_c3t3_item_EXPORTS 1
+#endif
+
+#ifdef mesh_3_demo_scene_c3t3_item_EXPORTS
+#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_EXPORT
+#else
+#  define SCENE_C3T3_ITEM_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SCENE_C3T3_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_config.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_edit_polyhedron_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_edit_polyhedron_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_edit_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_find_items.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_find_items.h
new file mode 100644
index 0000000..eecdd8a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_find_items.h
@@ -0,0 +1,121 @@
+#ifndef SCENE_FIND_ITEMS
+#define SCENE_FIND_ITEMS
+
+#include <QObject>
+#include <QMetaObject>
+#include  <CGAL/Three/Scene_item.h> // required, to have &Scene_item::name
+#include "Scene_config.h"
+
+class Scene_interface;
+
+namespace scene {
+namespace details {
+
+typedef QString (CGAL::Three::Scene_item ::*Scene_item_name_fn_ptr)() const;
+
+// Declaration only (defined in Scene.cpp)
+SCENE_EXPORT 
+CGAL::Three::Scene_item*
+findItem(const CGAL::Three::Scene_interface* scene_interface,
+         const QMetaObject& metaobj,
+         QString name, Scene_item_name_fn_ptr fn); 
+
+// Declaration only (defined in Scene.cpp)
+SCENE_EXPORT
+QList<CGAL::Three::Scene_item*>
+findItems(const CGAL::Three::Scene_interface* scene_interface,
+          const QMetaObject& metaobj,
+          QString name, Scene_item_name_fn_ptr fn); // fwd declaration
+
+template <typename T>
+T findItem(const CGAL::Three::Scene_interface* scene, QString name,
+           Scene_item_name_fn_ptr fn) 
+{
+  return 
+    static_cast<T>(findItem(scene,
+                            reinterpret_cast<T>(0)->staticMetaObject,
+                            name, fn));
+}
+
+template <typename T>
+QList<T> findItems(const CGAL::Three::Scene_interface* scene, QString name,
+                   Scene_item_name_fn_ptr fn)
+{
+  QList<CGAL::Three::Scene_item*> void_list =
+    findItems(scene, reinterpret_cast<T>(0)->staticMetaObject,
+              name, fn);
+  QList<T> list;
+  Q_FOREACH(CGAL::Three::Scene_item* ptr, void_list) {
+    list << qobject_cast<T>(ptr);
+  }
+  return list;
+}
+
+} // end namespace details
+
+// Searches
+
+/** Search the first item that can be cast to T (T must be a pointer
+    type), and called "name". If "name" is omitted, all names are
+    accepted.
+*/      
+template <typename T>
+T findItem(const CGAL::Three::Scene_interface* scene,
+           QString item_name = QString())
+{ return details::findItem<T>(scene, item_name, &CGAL::Three::Scene_item::name); }
+
+/** Returns all items that can be cast to T (T must be a pointer
+    type), and called "name". If "name" is omitted, all names are
+    accepted.
+*/      
+template <typename T>
+QList<T> findItems(const CGAL::Three::Scene_interface* scene,
+                   QString item_name = QString()) 
+{ return details::findItems<T>(scene, item_name, &CGAL::Three::Scene_item::name); }
+
+/** Search the first item that can be cast to T (T must be a pointer
+    type), and that has objectName() equal to "name". If "name" is
+    omitted, all names are accepted.
+*/      
+template <typename T>
+T findItemByObjectName(const CGAL::Three::Scene_interface* scene,
+                       QString obj_name = QString()) 
+{ return details::findItem<T>(scene, obj_name, &QObject::objectName); }
+
+/** Returns all items that can be cast to T (T must be a pointer type),
+    and have objectName() equal to "name". If "name" is omitted, all
+    names are accepted.
+*/      
+template <typename T>
+QList<T> findItemsByObjectName(const CGAL::Three::Scene_interface* scene,
+                               QString obj_name = QString()) 
+{ return details::findItems<T>(scene, obj_name, &QObject::objectName); }
+
+
+// template <typename T>
+// T scene_findItem(const Scene* scene, QString name, Scene_item_name_fn_ptr fn) {
+//   return 
+//     static_cast<T>(scene_findItem(scene, name, fn, 
+//                                   reinterpret_cast<T>(0)->staticMetaObject()));
+// }
+
+// template <typename T>
+// QList<T> 
+// scene_findItems(const Scene* scene, QString name, Scene_item_name_fn_ptr fn) {
+//   QList<void*> void_list = 
+//     scene_findItems(scene, name, fn, 
+//                     reinterpret_cast<T>(0)->staticMetaObject());
+//   QList<T> list;
+//   Q_FOREACH(void* ptr, void_list) {
+//     list << static_cast<T>(ptr);
+//   }
+//   return list;
+// }
+
+// } // end scene namespace 
+
+} // end namespace scene
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_group_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_group_item.cpp
new file mode 100644
index 0000000..86d2b22
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_group_item.cpp
@@ -0,0 +1,116 @@
+
+#include <CGAL/Three/Scene_group_item.h>
+#include <QDebug>
+
+using namespace CGAL::Three;
+Scene_group_item::Scene_group_item(QString name)
+    :  Scene_item(0,0)
+{
+    this->name_ = name;
+    expanded = true;
+}
+
+bool Scene_group_item::isFinite() const
+{
+    Q_FOREACH(Scene_item *item, children)
+        if(!item->isFinite()){
+            return false;
+        }
+    return true;
+}
+
+bool Scene_group_item::isEmpty() const {
+    Q_FOREACH(Scene_item *item, children)
+        if(!item->isEmpty()){
+            return true;
+        }
+    return true;
+}
+
+Scene_group_item::Bbox Scene_group_item::bbox() const
+{
+    return Bbox(0, 0, 0, 0, 0,0);
+}
+
+
+bool Scene_group_item::supportsRenderingMode(RenderingMode m) const {
+    Q_FOREACH(Scene_item* item, children)
+        if(!item->supportsRenderingMode(m))
+            return false;
+    return !children.isEmpty();
+
+}
+
+QString Scene_group_item::toolTip() const {
+    QString str =
+            QObject::tr( "<p>Number of children: %1<br />").arg(children.size());
+    str+="</p>";
+    return str;
+}
+
+void Scene_group_item::addChild(Scene_item* new_item)
+{  
+    if(!children.contains(new_item))
+    {
+        children.append(new_item);
+        add_group_number(new_item);
+    }
+
+}
+
+void Scene_group_item::add_group_number(Scene_item * new_item)
+{
+
+    Scene_group_item* group =
+            qobject_cast<Scene_group_item*>(new_item);
+    if(group)
+      Q_FOREACH(Scene_item* child, group->getChildren())
+          add_group_number(child);
+    new_item->has_group++;
+}
+void Scene_group_item::setColor(QColor c)
+{
+  Scene_item::setColor(c);
+  Q_FOREACH(Scene_item* child, children)
+  {
+    child->setColor(c);
+  }
+}
+
+void Scene_group_item::setRenderingMode(RenderingMode m)
+{
+  Scene_item::setRenderingMode(m);
+  Q_FOREACH(Scene_item* child, children)
+  {
+    child->setRenderingMode(m);
+  }
+}
+
+void Scene_group_item::setVisible(bool b)
+{
+  Scene_item::setVisible(b);
+  Q_FOREACH(Scene_item* child, children)
+  {
+    child->setVisible(b);
+  }
+}
+
+bool Scene_group_item::isExpanded() const
+{
+  return expanded;
+}
+
+void Scene_group_item::setExpanded(bool b)
+{
+    expanded = b;
+}
+
+void Scene_group_item::moveDown(int i)
+{
+    children.move(i, i+1);
+}
+
+void Scene_group_item::moveUp(int i)
+{
+    children.move(i, i-1);
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.cpp
new file mode 100644
index 0000000..a17717d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.cpp
@@ -0,0 +1,593 @@
+#include "Scene_implicit_function_item.h"
+#include <QColor>
+#include <map>
+#include <CGAL/gl.h>
+#include <CGAL/Simple_cartesian.h>
+#include <QGLViewer/manipulatedFrame.h>
+
+#include "Color_ramp.h"
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <CGAL/double.h>
+
+inline
+bool is_nan(double d)
+{
+    return !CGAL::Is_valid<double>()( d );
+}
+
+void Scene_implicit_function_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const
+{
+    if(GLuint(-1) == textureId) {
+        viewer->glGenTextures(1, &textureId);
+    }
+
+    //vao fot the cutting plane
+    {
+        program = getShaderProgram(PROGRAM_WITH_TEXTURE, viewer);
+        program->bind();
+        vaos[Plane]->bind();
+
+
+        buffers[Quad_vertices].bind();
+        buffers[Quad_vertices].allocate(positions_tex_quad.data(),
+                            static_cast<int>(positions_tex_quad.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[Quad_vertices].release();
+
+        buffers[TexMap].bind();
+        buffers[TexMap].allocate(texture_map.data(),
+                            static_cast<int>(texture_map.size()*sizeof(float)));
+        program->enableAttributeArray("v_texCoord");
+        program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2);
+        buffers[TexMap].release();
+        program->setAttributeValue("normal", QVector3D(0.f,0.f,0.f));
+
+        program->release();
+        vaos[Plane]->release();
+    }
+    //vao fot the bbox
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+        vaos[BBox]->bind();
+
+
+        buffers[Cube_vertices].bind();
+        buffers[Cube_vertices].allocate(positions_cube.data(),
+                            static_cast<int>(positions_cube.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[Cube_vertices].release();
+
+        program->release();
+        vaos[BBox]->release();
+    }
+    //vao fot the grid
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+        vaos[Grid]->bind();
+
+
+        buffers[Grid_vertices].bind();
+        buffers[Grid_vertices].allocate(positions_grid.data(),
+                            static_cast<int>(positions_grid.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[Grid_vertices].release();
+        program->release();
+        vaos[Grid]->release();
+    }
+
+
+
+    viewer->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    viewer->glTexImage2D(GL_TEXTURE_2D,
+                 0,
+                 GL_RGB,
+                 texture->getWidth(),
+                 texture->getHeight(),
+                 0,
+                 GL_RGB,
+                 GL_UNSIGNED_BYTE,
+                 texture->getData());
+       viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+       viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+       viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE );
+       viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE );
+
+       are_buffers_filled = true;
+}
+
+void Scene_implicit_function_item::compute_vertices_and_texmap(void)
+{
+    positions_tex_quad.resize(0);
+    positions_cube.resize(0);
+    positions_grid.resize(0);
+    texture_map.resize(0);
+
+    const Bbox& b = bbox();
+    float x,y,z;
+    z = 0;
+    x = (b.xmax-b.xmin)/10.0;
+    y = (b.ymax-b.ymin)/10.0;
+    // The Quad
+    {
+
+
+        //A
+        positions_tex_quad.push_back(b.xmin);
+        positions_tex_quad.push_back(b.ymin);
+        positions_tex_quad.push_back(z);
+
+
+        //B
+        positions_tex_quad.push_back(b.xmin);
+        positions_tex_quad.push_back(b.ymax);
+        positions_tex_quad.push_back(z);
+
+
+        //C
+        positions_tex_quad.push_back(b.xmax);
+        positions_tex_quad.push_back(b.ymax);
+        positions_tex_quad.push_back(z);
+
+
+
+        //A
+        positions_tex_quad.push_back(b.xmin);
+        positions_tex_quad.push_back(b.ymin);
+        positions_tex_quad.push_back(z);
+
+
+        //C
+        positions_tex_quad.push_back(b.xmax);
+        positions_tex_quad.push_back(b.ymax);
+        positions_tex_quad.push_back(z);
+
+
+        //D
+        positions_tex_quad.push_back(b.xmax);
+        positions_tex_quad.push_back(b.ymin);
+        positions_tex_quad.push_back(z);
+
+
+        //UV Mapping x2 but I don't know why.
+        texture_map.push_back(0.0);
+        texture_map.push_back(0.0);
+
+        texture_map.push_back(0.0);
+        texture_map.push_back(1.0);
+
+        texture_map.push_back(1.0);
+        texture_map.push_back(1.0);
+
+        texture_map.push_back(0.0);
+        texture_map.push_back(0.0);
+
+        texture_map.push_back(1.0);
+        texture_map.push_back(1.0);
+
+        texture_map.push_back(1.0);
+        texture_map.push_back(0.0);
+
+
+
+    }
+    //The grid
+    {
+
+        for(int u = 0; u < 11; u++)
+        {
+
+            positions_grid.push_back(b.xmin + x* u);
+            positions_grid.push_back(b.ymin);
+            positions_grid.push_back(z);
+
+            positions_grid.push_back(b.xmin + x* u);
+            positions_grid.push_back(b.ymax);
+            positions_grid.push_back(z);
+        }
+        for(int v=0; v<11; v++)
+        {
+
+            positions_grid.push_back(b.xmin);
+            positions_grid.push_back(b.ymin + v * y);
+            positions_grid.push_back(z);
+
+            positions_grid.push_back(b.xmax);
+            positions_grid.push_back(b.ymin + v * y);
+            positions_grid.push_back(z);
+        }
+
+    }
+    //the Box
+    {
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmin);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmin);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymax);
+        positions_cube.push_back(b.zmax);
+
+
+        positions_cube.push_back(b.xmax);
+        positions_cube.push_back(b.ymin);
+        positions_cube.push_back(b.zmax);
+
+    }
+
+    //The texture
+    for( int i=0 ; i < texture->getWidth() ; i++ )
+    {
+        for( int j=0 ; j < texture->getHeight() ; j++)
+        {
+            compute_texture(i,j);
+        }
+    }
+}
+
+Scene_implicit_function_item::
+Scene_implicit_function_item(Implicit_function_interface* f)
+    :CGAL::Three::Scene_item(4,3)
+    , function_(f)
+    , frame_(new ManipulatedFrame())
+    , need_update_(true)
+    , grid_size_(SCENE_IMPLICIT_GRID_SIZE)
+    , max_value_(0.)
+    , min_value_(0.)
+    , blue_color_ramp_()
+    , red_color_ramp_()
+    , textureId(-1)
+{
+    texture = new Texture(grid_size_-1,grid_size_-1);
+    blue_color_ramp_.build_blue();
+    red_color_ramp_.build_red();
+    startTimer(0);
+    //Generates an integer which will be used as ID for each buffer
+    compute_min_max();
+    compute_function_grid();
+    double offset_x = (bbox().xmin + bbox().xmax) / 2;
+    double offset_y = (bbox().ymin + bbox().ymax) / 2;
+    double offset_z = (bbox().zmin + bbox().zmax) / 2;
+    frame_->setPosition(offset_x, offset_y, offset_z);
+    frame_->setOrientation(1., 0, 0, 0);
+    connect(frame_, SIGNAL(modified()), this, SLOT(plane_was_moved()));
+
+    invalidateOpenGLBuffers();
+}
+
+
+Scene_implicit_function_item::~Scene_implicit_function_item()
+{
+
+    delete frame_;
+
+}
+
+
+void
+Scene_implicit_function_item::compute_bbox() const
+{
+    _bbox = function_->bbox();
+}
+
+void
+Scene_implicit_function_item::draw(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+
+    if(frame_->isManipulated()) {
+        if(need_update_) {
+            compute_function_grid();
+            need_update_ = false;
+        }
+    }
+    vaos[Plane]->bind();
+    viewer->glActiveTexture(GL_TEXTURE0);
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    attrib_buffers(viewer, PROGRAM_WITH_TEXTURE);
+    QMatrix4x4 f_mat;
+    GLdouble d_mat[16];
+    frame_->getMatrix(d_mat);
+    //Convert the GLdoubles matrices in GLfloats
+    for (int i=0; i<16; ++i){
+        f_mat.data()[i] = GLfloat(d_mat[i]);
+    }
+    program = getShaderProgram(PROGRAM_WITH_TEXTURE);
+    program->bind();
+    program->setUniformValue("f_matrix", f_mat);
+    program->setUniformValue("light_amb", QVector4D(1.f,1.f,1.f,1.f));
+    program->setUniformValue("light_diff", QVector4D(0.f,0.f,0.f,1.f));
+    program->setAttributeValue("color_facets", QVector3D(1.f,1.f,1.f));
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(positions_tex_quad.size()/3));
+    vaos[Plane]->release();
+    program->release();
+}
+
+void
+Scene_implicit_function_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    //  draw_aux(viewer, true);
+    vaos[BBox]->bind();
+    attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors", QVector3D(0.f,0.f,0.f));
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_cube.size()/3));
+    vaos[BBox]->release();
+    vaos[Grid]->bind();
+    QMatrix4x4 f_mat;
+    GLdouble d_mat[16];
+    frame_->getMatrix(d_mat);
+    //Convert the GLdoubles matrices in GLfloats
+    for (int i=0; i<16; ++i){
+        f_mat.data()[i] = double(d_mat[i]);
+    }
+    program->setUniformValue("f_matrix", f_mat);
+    program->setAttributeValue("colors", QVector3D(0.6f, 0.6f, 0.6f));
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_grid.size()/3));
+    vaos[Grid]->release();
+    program->release();
+}
+
+QString
+Scene_implicit_function_item::toolTip() const
+{
+    return tr("<p>Function <b>%1</b>")
+            .arg(this->name());
+}
+
+bool
+Scene_implicit_function_item::supportsRenderingMode(RenderingMode m) const
+{
+    switch ( m )
+    {
+    case Splatting:
+    case Gouraud:
+        return false;
+
+    case Points:
+    case Wireframe:
+    case Flat:
+    case FlatPlusEdges:
+        return true;
+
+    default:
+        return false;
+    }
+
+    return false;
+}
+
+void Scene_implicit_function_item::compute_texture(int i, int j)
+{
+    double v = (implicit_grid_[i][j]).second;
+
+    if(is_nan(v)) {
+        texture->setData(i,j,51,51,51);
+    } else
+        // determines grey level
+        if ( v > 0 )
+        {
+            v = v/max_value_;
+            GLdouble r = red_color_ramp_.r(v), g = red_color_ramp_.g(v), b = red_color_ramp_.b(v);
+            texture->setData(i,j,255*r,255*g,255*b);
+        }
+        else
+        {
+            v = v/min_value_;
+            GLdouble r = blue_color_ramp_.r(v), g = blue_color_ramp_.g(v), b = blue_color_ramp_.b(v);
+            texture->setData(i,j,255*r,255*g,255*b);
+        }
+}
+
+
+void
+Scene_implicit_function_item::
+compute_function_grid() const
+{
+    typedef CGAL::Simple_cartesian<double>  K;
+    typedef K::Aff_transformation_3         Aff_transformation;
+    typedef K::Point_3                      Point_3;
+
+    // Get transformation
+    const GLdouble* m = frame_->matrix();
+
+    // OpenGL matrices are row-major matrices
+    Aff_transformation t (m[0], m[4], m[8], m[12],
+            m[1], m[5], m[9], m[13],
+            m[2], m[6], m[10], m[14]);
+
+    double diag = bbox().diagonal_length() * .6;
+
+    const double dx = diag;
+    const double dy = diag;
+    const double z (0);
+
+    int nb_quad = grid_size_ - 1;
+
+    for(int i=0 ; i<grid_size_ ; ++i)
+    {
+        double x = -diag/2. + double(i)/double(nb_quad) * dx;
+
+        for(int j=0 ; j<grid_size_ ; ++j)
+        {
+            double y = -diag/2. + double(j)/double(nb_quad) * dy;
+
+            Point_3 query = t( Point_3(x, y, z) );
+            double v = function_->operator()(query.x(), query.y(), query.z());
+
+            implicit_grid_[i][j] = Point_value(Point(query.x(),query.y(),query.z()),v);
+        }
+    }
+
+    // Update
+    const_cast<Scene_implicit_function_item*>(this)->invalidateOpenGLBuffers();
+
+}
+
+void
+Scene_implicit_function_item::
+compute_min_max()
+{
+    if(function_->get_min_max(min_value_, max_value_))
+        return;
+
+    double probes_nb = double(grid_size_) / 2;
+
+    // Probe bounding box
+    const Bbox& b = bbox();
+
+    for ( int i = 0 ; i <= probes_nb ; ++i )
+    {
+        double x = b.xmin + double(i) * (b.xmax - b.xmin) / probes_nb;
+
+        for ( int j = 0 ; j <= probes_nb ; ++j )
+        {
+            double y = b.ymin + double(j) * (b.ymax - b.ymin) / probes_nb;
+
+            for ( int k = 0 ; k <= probes_nb ; ++k )
+            {
+                double z = b.zmin + double(k) * (b.zmax - b.zmin) / probes_nb;
+
+                double v = (*function_)(x,y,z);
+                if(is_nan(v)) continue;
+                max_value_ = (std::max)(v,max_value_);
+                min_value_ = (std::min)(v,min_value_);
+            }
+        }
+    }
+}
+
+void
+Scene_implicit_function_item::invalidateOpenGLBuffers()
+{
+    Scene_item::invalidateOpenGLBuffers();
+    compute_bbox();
+    compute_vertices_and_texmap();
+    are_buffers_filled = false;
+}
+
+
+void Scene_implicit_function_item::timerEvent(QTimerEvent* /*event*/)
+{ // just handle deformation - paint like selection is handled in eventFilter()
+  if(need_update_) {
+    compute_function_grid();
+    compute_vertices_and_texmap();
+    need_update_= false;
+  }
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.h
new file mode 100644
index 0000000..053f2d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item.h
@@ -0,0 +1,130 @@
+#ifndef SCENE_IMPLICIT_FUNCTION_ITEM_H
+#define SCENE_IMPLICIT_FUNCTION_ITEM_H
+
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Scene_interface.h>
+#include "Scene_implicit_function_item_config.h"
+#include "implicit_functions/Implicit_function_interface.h"
+#include "Color_ramp.h"
+#include <QGLViewer/manipulatedFrame.h>
+#include <Viewer.h>
+
+#define SCENE_IMPLICIT_GRID_SIZE 120
+
+class Viewer_interface;
+
+class Texture{
+private:
+     int Width;
+     int Height;
+     int size;
+    GLubyte *data;
+public:
+    Texture(int w, int h)
+    {
+        Width = w;
+        Height = h;
+        size = 3*Height*Width;
+        data = new GLubyte[size];
+    }
+    int getWidth() const {return Width;}
+    int getHeight() const {return Height;}
+    int getSize() const {return size;}
+    void setData(int i, int j, int r, int g, int b){
+        data[j*Width*3 +i*3] = r;
+        data[j*Width*3 +i*3+1] = g;
+        data[j*Width*3 +i*3+2] = b;}
+    GLubyte* getData(){return data; }
+
+};
+class SCENE_IMPLICIT_FUNCTION_ITEM_EXPORT Scene_implicit_function_item 
+  : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+  
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+  
+public:
+  Scene_implicit_function_item(Implicit_function_interface*);
+  virtual ~Scene_implicit_function_item();
+  
+  Implicit_function_interface* function() const { return function_; }
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  void compute_bbox() const;
+
+  Scene_implicit_function_item* clone() const { return NULL; }
+
+  // rendering mode
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+  virtual bool manipulatable() const { return true; }
+  virtual ManipulatedFrame* manipulatedFrame() { return frame_; }
+  
+
+
+  // actually draw() is also overloaded to detect when the cut plane is moved
+  virtual void draw()const {}
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+  virtual void draw_edges(CGAL::Three::Viewer_interface*) const;
+
+  virtual QString toolTip() const;
+  virtual void invalidateOpenGLBuffers();
+public Q_SLOTS:
+  void plane_was_moved() { need_update_ = true; }
+  void compute_function_grid() const;
+  void timerEvent(QTimerEvent*);
+
+private:
+  typedef qglviewer::Vec                  Point;
+  typedef std::pair <Point,double>        Point_value;
+  void compute_min_max();
+  
+private:
+  Implicit_function_interface* function_;
+  ManipulatedFrame* frame_;
+  
+  mutable bool need_update_;
+  int grid_size_;
+  double max_value_;
+  double min_value_;
+  mutable Point_value implicit_grid_[SCENE_IMPLICIT_GRID_SIZE][SCENE_IMPLICIT_GRID_SIZE];
+  
+  Color_ramp blue_color_ramp_;
+  Color_ramp red_color_ramp_;
+
+  enum VAOs {
+      Plane = 0,
+      BBox,
+      Grid,
+      NbOfVaos = Grid +1
+  };
+  enum VBOs {
+      Quad_vertices = 0,
+      TexMap,
+      Cube_vertices,
+      Grid_vertices,
+      NbOfVbos = Grid_vertices +1
+  };
+
+  std::vector<float> positions_cube;
+  std::vector<float> positions_grid;
+  std::vector<float> positions_tex_quad;
+  std::vector<float> texture_map;
+  Texture *texture;
+
+
+  mutable QOpenGLShaderProgram *program;
+  mutable GLuint textureId;
+
+
+
+  GLuint vao;
+  GLuint buffer[4];
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+  void compute_vertices_and_texmap(void);
+  void compute_texture(int, int);
+};
+
+#endif // SCENE_IMPLICIT_FUNCTION_ITEM
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_implicit_function_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_implicit_function_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_item.cpp
new file mode 100644
index 0000000..c4ba9a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_item.cpp
@@ -0,0 +1,165 @@
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Scene_interface.h>
+#include <QMenu>
+#include <iostream>
+#include <QDebug>
+#include <CGAL/Three/Viewer_interface.h>
+const QColor CGAL::Three::Scene_item::defaultColor = QColor(100, 100, 255);
+
+CGAL::Three::Scene_item::~Scene_item() {
+  delete defaultContextMenu;
+  for(int i=0; i<buffersSize; i++)
+  {
+    buffers[i].destroy();
+  }
+  for(int i=0; i<vaosSize; i++)
+  {
+    delete vaos[i];
+  }
+}
+
+void CGAL::Three::Scene_item::itemAboutToBeDestroyed(CGAL::Three::Scene_item* item) {
+    if(this == item)
+    Q_EMIT aboutToBeDestroyed();
+}
+
+
+QString modeName(RenderingMode mode) {
+    switch(mode)
+    {
+    case Points:
+        return QObject::tr("points");
+    case Wireframe:
+        return QObject::tr("wire");
+    case Flat:
+        return QObject::tr("flat");
+    case FlatPlusEdges:
+        return QObject::tr("flat+edges");
+    case Gouraud:
+        return QObject::tr("Gouraud");
+    case PointsPlusNormals:
+        return QObject::tr("pts+normals");
+    case Splatting:
+        return QObject::tr("splats");
+    default:
+        Q_ASSERT(false);
+        return QObject::tr("unknown");
+    }
+}
+
+const char* slotName(RenderingMode mode) {
+    switch(mode)
+    {
+    case Points:
+        return SLOT(setPointsMode());
+    case Wireframe:
+        return SLOT(setWireframeMode());
+    case Flat:
+        return SLOT(setFlatMode());
+    case FlatPlusEdges:
+        return SLOT(setFlatPlusEdgesMode());
+    case Gouraud:
+        return SLOT(setGouraudMode());
+    case PointsPlusNormals:
+        return SLOT(setPointsPlusNormalsMode());
+    case Splatting:
+        return SLOT(setSplattingMode());
+    default:
+        Q_ASSERT(false);
+        return "";
+    }
+}
+
+// Rendering mode as a human readable string
+QString CGAL::Three::Scene_item::renderingModeName() const
+{
+    return modeName(renderingMode());
+} 
+QMenu* CGAL::Three::Scene_item::contextMenu()
+{
+    if(defaultContextMenu) {
+        defaultContextMenu->setTitle(name());
+        return defaultContextMenu;
+    }
+
+    defaultContextMenu = new QMenu(name());
+    // defaultContextMenu->addAction(name());
+    // defaultContextMenu->addSeparator();
+    // QMenu* modeMenu = new QMenu(QObject::tr("Rendering mode"),
+    //                             defaultContextMenu);
+    for(unsigned int mode = 0; mode < NumberOfRenderingMode;
+        ++mode)
+    {
+        if(!supportsRenderingMode(RenderingMode(mode))) continue;
+        QString mName = modeName(RenderingMode(mode));
+        defaultContextMenu->addAction(tr("Set %1 Mode")
+                                      .arg(mName),
+                                      this,
+                                      slotName(RenderingMode(mode)));
+    }
+    // defaultContextMenu->addAction(modeMenu->menuAction());
+    return defaultContextMenu;
+}
+
+void CGAL::Three::Scene_item::invalidateOpenGLBuffers() {}
+
+void CGAL::Three::Scene_item::selection_changed(bool) {}
+
+
+void CGAL::Three::Scene_item::select(double /*orig_x*/,
+                        double /*orig_y*/,
+                        double /*orig_z*/,
+                        double /*dir_x*/,
+                        double /*dir_y*/,
+                        double /*dir_z*/)
+{
+}
+
+// set-up the uniform attributes of the shader programs.
+void CGAL::Three::Scene_item::attrib_buffers(CGAL::Three::Viewer_interface* viewer,
+                                             int program_name) const
+{
+    viewer->attrib_buffers(program_name);
+    viewer->getShaderProgram(program_name)->bind();
+    if(is_selected)
+        viewer->getShaderProgram(program_name)->setUniformValue("is_selected", true);
+    else
+        viewer->getShaderProgram(program_name)->setUniformValue("is_selected", false);
+    QColor c = this->color();
+    if(program_name == Scene_item::PROGRAM_WITH_TEXTURE)
+    {
+       if(is_selected) c = c.lighter(120);
+       viewer->getShaderProgram(program_name)->setAttributeValue
+         ("color_facets",
+          c.redF(),
+          c.greenF(),
+          c.blueF());
+    }
+    else if(program_name == PROGRAM_WITH_TEXTURED_EDGES)
+    {
+        if(is_selected) c = c.lighter(50);
+        viewer->getShaderProgram(program_name)->setUniformValue
+          ("color_lines",
+           QVector3D(c.redF(), c.greenF(), c.blueF()));
+    }
+    viewer->getShaderProgram(program_name)->release();
+}
+
+
+QOpenGLShaderProgram* CGAL::Three::Scene_item::getShaderProgram(int name, CGAL::Three::Viewer_interface * viewer) const
+{
+    if(viewer == 0)
+        viewer = dynamic_cast<CGAL::Three::Viewer_interface*>(*QGLViewer::QGLViewerPool().begin());
+    return viewer->getShaderProgram(name);
+}
+
+CGAL::Three::Scene_item::Header_data CGAL::Three::Scene_item::header() const
+{
+  CGAL::Three::Scene_item::Header_data data;
+  return data;
+}
+
+QString CGAL::Three::Scene_item::compute_stats(int )
+{
+  return QString();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.cpp
new file mode 100644
index 0000000..c27b466
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.cpp
@@ -0,0 +1,678 @@
+#include "Scene_nef_polyhedron_item.h"
+#include "Scene_polyhedron_item.h"
+#include "Nef_type.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+// #include <CGAL/OFF_to_nef_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
+#include <CGAL/Inverse_index.h>
+
+#include <QObject>
+
+#include <CGAL/minkowski_sum_3.h>
+#include <CGAL/convex_decomposition_3.h>
+
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+
+typedef Nef_polyhedron::Traits Traits;
+typedef Nef_polyhedron::Halffacet Facet;
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits>   P_traits;
+typedef Nef_polyhedron::Halfedge_const_handle Halfedge_handle;
+struct Face_info {
+    Nef_polyhedron::Halfedge_const_handle e[3];
+    bool is_external;
+};
+typedef CGAL::Triangulation_vertex_base_with_info_2<Halfedge_handle,
+P_traits>        Vb;
+typedef CGAL::Triangulation_face_base_with_info_2<Face_info,
+P_traits>          Fb1;
+typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>   Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                  TDS;
+typedef CGAL::No_intersection_tag                                    Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits,
+TDS,
+Itag>             CDTbase;
+typedef CGAL::Constrained_triangulation_plus_2<CDTbase>              CDT;
+
+
+struct DPoint {
+    DPoint(GLdouble x, GLdouble y, GLdouble z)
+    {
+        coords[0] = x;
+        coords[1] = y;
+        coords[2] = z;
+    }
+    GLdouble coords[3];
+};
+Scene_nef_polyhedron_item::Scene_nef_polyhedron_item()
+    : Scene_item(NbOfVbos,NbOfVaos),
+      nef_poly(new Nef_polyhedron)
+{
+    is_selected = true;
+    nb_points = 0;
+    nb_lines = 0;
+    nb_facets = 0;
+}
+
+Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(Nef_polyhedron* const p)
+    : Scene_item(NbOfVbos,NbOfVaos),
+      nef_poly(p)
+{
+    is_selected = true;
+    nb_points = 0;
+    nb_lines = 0;
+    nb_facets = 0;
+}
+
+Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(const Nef_polyhedron& p)
+    : Scene_item(NbOfVbos,NbOfVaos),
+      nef_poly(new Nef_polyhedron(p))
+{
+     is_selected = true;
+     nb_points = 0;
+     nb_lines = 0;
+     nb_facets = 0;
+}
+
+Scene_nef_polyhedron_item::~Scene_nef_polyhedron_item()
+{
+    delete nef_poly;
+}
+
+void Scene_nef_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const
+{
+    //vao for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+
+        vaos[Facets]->bind();
+        buffers[Facets_vertices].bind();
+        buffers[Facets_vertices].allocate(positions_facets.data(),
+                            static_cast<int>(positions_facets.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Facets_vertices].release();
+
+
+
+        buffers[Facets_normals].bind();
+        buffers[Facets_normals].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(double)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_DOUBLE,0,3);
+        buffers[Facets_normals].release();
+
+        nb_facets = positions_facets.size();
+        positions_facets.resize(0);
+        std::vector<double>(positions_facets).swap(positions_facets);
+
+        normals.resize(0);
+        std::vector<double>(normals).swap(normals);
+
+        program->release();
+
+    }
+    //vao for the edges
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+
+        vaos[Edges]->bind();
+        buffers[Edges_vertices].bind();
+        buffers[Edges_vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Edges_vertices].release();
+
+
+        nb_lines = positions_lines.size();
+        positions_lines.resize(0);
+        std::vector<double>(positions_lines).swap(positions_lines);
+        vaos[Edges]->release();
+        program->release();
+    }
+    //vao for the points
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+
+        vaos[Points]->bind();
+        buffers[Points_vertices].bind();
+        buffers[Points_vertices].allocate(positions_points.data(),
+                            static_cast<int>(positions_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Points_vertices].release();
+
+        vaos[Points]->release();
+
+        nb_points = positions_points.size();
+        positions_points.resize(0);
+        std::vector<double>(positions_points).swap(positions_points);
+        program->release();
+    }
+    are_buffers_filled = true;
+}
+void Scene_nef_polyhedron_item::compute_normals_and_vertices(void) const
+{
+     int count = 0;
+    positions_facets.resize(0);
+    positions_points.resize(0);
+    normals.resize(0);
+    positions_lines.resize(0);
+    //The Facets
+    {
+        for(Nef_polyhedron::Halffacet_const_iterator
+            f = nef_poly->halffacets_begin (),
+            end = nef_poly->halffacets_end();
+            f != end; ++f)
+        {
+            if(f->is_twin()) continue;
+            count++;
+            Nef_polyhedron::Vector_3 v = f->plane().orthogonal_vector();
+            P_traits cdt_traits(v);
+            CDT cdt(cdt_traits);
+
+            for(Nef_polyhedron::Halffacet_cycle_const_iterator
+                fc = f->facet_cycles_begin(),
+                end = f->facet_cycles_end();
+                fc != end; ++fc)
+            {
+                if ( fc.is_shalfedge() )
+                {
+
+                    Nef_polyhedron::SHalfedge_const_handle h = fc;
+                    Nef_polyhedron::SHalfedge_around_facet_const_circulator hc(h), he(hc);
+
+                    CDT::Vertex_handle previous, first;
+
+                    do {
+                        Nef_polyhedron::SVertex_const_handle v = hc->source();
+                        const Nef_polyhedron::Point_3& point = v->source()->point();
+                        CDT::Vertex_handle vh = cdt.insert(point);
+                        if(first == 0) {
+                            first = vh;
+                        }
+                        vh->info() = hc->source();
+                        if(previous != 0 && previous != vh) {
+                            cdt.insert_constraint(previous, vh);
+                        }
+                        previous = vh;
+                    } while( ++hc != he );
+
+                    cdt.insert_constraint(previous, first);
+
+                    // sets mark is_external
+                    for(CDT::All_faces_iterator
+                        fit = cdt.all_faces_begin(),
+                        end = cdt.all_faces_end();
+                        fit != end; ++fit)
+                    {
+                        fit->info().is_external = false;
+
+                    }
+                    //check if the facet is external or internal
+                    std::queue<CDT::Face_handle> face_queue;
+                    face_queue.push(cdt.infinite_vertex()->face());
+
+                    while(! face_queue.empty() ) {
+                        CDT::Face_handle fh = face_queue.front();
+                        face_queue.pop();
+                        if(fh->info().is_external) continue;
+                        fh->info().is_external = true;
+                        for(int i = 0; i <3; ++i) {
+                            if(!cdt.is_constrained(std::make_pair(fh, i)))
+                            {
+                                face_queue.push(fh->neighbor(i));
+                            }
+                        }
+
+                    }
+                    //iterates on the internal faces to add the vertices to the positions
+                    //and the normals to the appropriate vectors
+
+                    for(CDT::Finite_faces_iterator
+                        ffit = cdt.finite_faces_begin(),
+                        end = cdt.finite_faces_end();
+                        ffit != end; ++ffit)
+                    {
+
+
+                        if(ffit->info().is_external){ continue;}
+                        for(int i = 0; i<3; i++)
+                        {
+                            positions_facets.push_back(CGAL::to_double(ffit->vertex(i)->point().x()));
+                            positions_facets.push_back(CGAL::to_double(ffit->vertex(i)->point().y()));
+                            positions_facets.push_back(CGAL::to_double(ffit->vertex(i)->point().z()));
+
+                        }
+
+
+
+                        Nef_polyhedron::Vector_3 v = f->plane().orthogonal_vector();
+                        GLdouble normal[3];
+                        normal[0] = CGAL::to_double(v.x());
+                        normal[1] = CGAL::to_double(v.y());
+                        normal[2] = CGAL::to_double(v.z());
+                        GLdouble norm = normal[0]*normal[0]
+                                + normal[1]*normal[1]
+                                + normal[2]*normal[2];
+                        norm = CGAL::sqrt(norm);
+                        normal[0] /= norm;
+                        normal[1] /= norm;
+                        normal[2] /= norm;
+
+                        normals.push_back(normal[0]);
+                        normals.push_back(normal[1]);
+                        normals.push_back(normal[2]);
+
+                        normals.push_back(normal[0]);
+                        normals.push_back(normal[1]);
+                        normals.push_back(normal[2]);
+
+                        normals.push_back(normal[0]);
+                        normals.push_back(normal[1]);
+                        normals.push_back(normal[2]);
+
+                    }
+                }
+            }
+        }
+
+    } // end facets
+
+    //The Lines
+    {
+       for(Nef_polyhedron::Halfedge_const_iterator
+            e = nef_poly->halfedges_begin(),
+            end = nef_poly->halfedges_end();
+            e != end; ++e)
+        {
+            if (e->is_twin()) continue;
+            const Nef_polyhedron::Vertex_const_handle& s = e->source();
+            const Nef_polyhedron::Vertex_const_handle& t = e->twin()->source();
+            const Nef_polyhedron::Point_3& a = s->point();
+            const Nef_polyhedron::Point_3& b = t->point();
+
+            positions_lines.push_back(CGAL::to_double(a.x()));
+            positions_lines.push_back(CGAL::to_double(a.y()));
+            positions_lines.push_back(CGAL::to_double(a.z()));
+
+            positions_lines.push_back(CGAL::to_double(b.x()));
+            positions_lines.push_back(CGAL::to_double(b.y()));
+            positions_lines.push_back(CGAL::to_double(b.z()));
+
+
+        }
+    }
+    //The points
+    {
+        for(Nef_polyhedron::Vertex_const_iterator
+            v = nef_poly->vertices_begin(),
+            end = nef_poly->vertices_end();
+            v != end; ++v)
+        {
+            const Nef_polyhedron::Point_3& p = v->point();
+            positions_points.push_back(CGAL::to_double(p.x()));
+            positions_points.push_back(CGAL::to_double(p.y()));
+            positions_points.push_back(CGAL::to_double(p.z()));
+
+                color_points.push_back(this->color().lighter(50).redF());
+                color_points.push_back(this->color().lighter(50).greenF());
+                color_points.push_back(this->color().lighter(50).blueF());
+
+                color_points.push_back(this->color().lighter(50).redF());
+                color_points.push_back(this->color().lighter(50).greenF());
+                color_points.push_back(this->color().lighter(50).blueF());
+
+        }
+
+    } //end points
+}
+Scene_nef_polyhedron_item* 
+Scene_nef_polyhedron_item::clone() const {
+    return new Scene_nef_polyhedron_item(*nef_poly);
+}
+
+bool
+Scene_nef_polyhedron_item::load_from_off(std::istream& in)
+{
+    //   const std::size_t discarded = CGAL::OFF_to_nef_3(in, *nef_poly);
+    //   return discarded != 0;
+
+    Exact_polyhedron exact_poly;
+    in >> exact_poly;
+    *nef_poly = Nef_polyhedron(exact_poly);
+
+    //   Polyhedron poly;
+    //   in >> poly;
+    //   *nef_poly = Nef_polyhedron(poly);
+    invalidateOpenGLBuffers();
+    return (bool) in;
+}
+
+QFont 
+Scene_nef_polyhedron_item::font() const {
+    QFont font;
+    font.setItalic(!font.italic());
+    return font;
+}
+
+bool
+Scene_nef_polyhedron_item::load(std::istream& in)
+{
+    in >> *nef_poly;
+    invalidateOpenGLBuffers();
+    return (bool) in;
+}
+
+bool
+Scene_nef_polyhedron_item::save(std::ostream& in) const
+{
+    in << *nef_poly;
+    return (bool) in;
+}
+
+QString 
+Scene_nef_polyhedron_item::toolTip() const
+{
+    if(!nef_poly)
+        return QString();
+
+    return QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
+                       "<i>Nef_3 polyhedron</i></p>"
+                       "<p>Number of vertices: %2<br />"
+                       "Number of edges: %3<br />"
+                       "Number of facets: %4<br />"
+                       "number of volumes: %7</p>")
+            .arg(this->name())
+            .arg(nef_poly->number_of_vertices())
+            .arg(nef_poly->number_of_edges())
+            .arg(nef_poly->number_of_facets())
+            .arg(this->renderingModeName())
+            .arg(this->color().name())
+            .arg(nef_poly->number_of_volumes());
+}
+
+void Scene_nef_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+    }
+    vaos[Facets]->bind();
+
+    // tells the GPU to use the program just created
+    program=getShaderProgram(PROGRAM_WITH_LIGHT);
+    attrib_buffers(viewer,PROGRAM_WITH_LIGHT);
+    program->bind();
+    program->setUniformValue("is_two_side", 1);
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_facets/3));
+    vaos[Facets]->release();
+    program->release();
+    GLfloat point_size;
+    viewer->glGetFloatv(GL_POINT_SIZE, &point_size);
+    viewer->glPointSize(10.f);
+
+    draw_points(viewer);
+    viewer->glPointSize(point_size);
+
+}
+void Scene_nef_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+    }
+
+    vaos[Edges]->bind();
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer ,PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    viewer->glDrawArrays(GL_LINES,0,static_cast<GLsizei>(nb_lines/3));
+    vaos[Edges]->release();
+    program->release();
+    if(renderingMode() == PointsPlusNormals)
+    {
+        GLfloat point_size;
+        viewer->glGetFloatv(GL_POINT_SIZE, &point_size);
+        viewer->glPointSize(10.f);
+
+        draw_points(viewer);
+        viewer->glPointSize(point_size);
+    }
+}
+void Scene_nef_polyhedron_item::draw_points(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+    }
+    vaos[Points]->bind();
+    program=getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer ,PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors", this->color());
+    viewer->glDrawArrays(GL_POINTS,0,static_cast<GLsizei>(nb_points/3));
+    vaos[Points]->release();
+    program->release();
+
+}
+
+
+Nef_polyhedron* 
+Scene_nef_polyhedron_item::nef_polyhedron() {
+    return nef_poly;
+}
+
+bool
+Scene_nef_polyhedron_item::isEmpty() const {
+    return (nef_poly == 0) || nef_poly->is_empty();
+}
+
+void
+Scene_nef_polyhedron_item::compute_bbox() const {
+    if(isEmpty())
+    {
+        _bbox = Bbox();
+        return;
+    }
+    CGAL::Bbox_3 bbox(nef_poly->vertices_begin()->point().bbox());
+    for(Nef_polyhedron::Vertex_const_iterator it = nef_poly->vertices_begin();
+        it != nef_poly->vertices_end();
+        ++it) {
+        bbox = bbox + it->point().bbox();
+    }
+    _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+                bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+// quick hacks to convert polyhedra from exact to inexact and vice-versa
+template <class Polyhedron_input,
+          class Polyhedron_output>
+struct Copy_polyhedron_to 
+        : public CGAL::Modifier_base<typename Polyhedron_output::HalfedgeDS>
+{
+    Copy_polyhedron_to(const Polyhedron_input& in_poly)
+        : in_poly(in_poly) {}
+
+    void operator()(typename Polyhedron_output::HalfedgeDS& out_hds)
+    {
+        typedef typename Polyhedron_output::HalfedgeDS Output_HDS;
+
+        CGAL::Polyhedron_incremental_builder_3<Output_HDS> builder(out_hds);
+
+        typedef typename Polyhedron_input::Vertex_const_iterator Vertex_const_iterator;
+        typedef typename Polyhedron_input::Facet_const_iterator  Facet_const_iterator;
+        typedef typename Polyhedron_input::Halfedge_around_facet_const_circulator HFCC;
+
+        builder.begin_surface(in_poly.size_of_vertices(),
+                              in_poly.size_of_facets(),
+                              in_poly.size_of_halfedges());
+
+        for(Vertex_const_iterator
+            vi = in_poly.vertices_begin(), end = in_poly.vertices_end();
+            vi != end ; ++vi)
+        {
+            typename Polyhedron_output::Point_3 p(::CGAL::to_double( vi->point().x()),
+                                                  ::CGAL::to_double( vi->point().y()),
+                                                  ::CGAL::to_double( vi->point().z()));
+            builder.add_vertex(p);
+        }
+
+        typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
+        Index index( in_poly.vertices_begin(), in_poly.vertices_end());
+
+        for(Facet_const_iterator
+            fi = in_poly.facets_begin(), end = in_poly.facets_end();
+            fi != end; ++fi)
+        {
+            HFCC hc = fi->facet_begin();
+            HFCC hc_end = hc;
+            //     std::size_t n = circulator_size( hc);
+            //     CGAL_assertion( n >= 3);
+            builder.begin_facet ();
+            do {
+                builder.add_vertex_to_facet(index[hc->vertex()]);
+                ++hc;
+            } while( hc != hc_end);
+            builder.end_facet();
+        }
+        builder.end_surface();
+    } // end operator()(..)
+private:
+    const Polyhedron_input& in_poly;
+}; // end Copy_polyhedron_to<>
+
+template <class Poly_A, class Poly_B>
+void copy_to(const Poly_A& poly_a, Poly_B& poly_b)
+{
+    Copy_polyhedron_to<Poly_A, Poly_B> modifier(poly_a);
+    poly_b.delegate(modifier);
+}
+
+void from_exact(Exact_polyhedron& in,
+                Polyhedron& out)
+{
+    copy_to(in, out);
+    CGAL_assertion(out.is_valid());
+}
+
+void to_exact(Polyhedron& in,
+              Exact_polyhedron& out)
+{
+    copy_to(in, out);
+    CGAL_assertion(out.is_valid());
+}
+
+bool Scene_nef_polyhedron_item::is_simple() const
+{
+    return nef_poly->is_simple();
+}
+
+// [static]
+Scene_nef_polyhedron_item* 
+Scene_nef_polyhedron_item::from_polyhedron(Scene_polyhedron_item* item)
+{
+    Polyhedron* poly = item->polyhedron();
+    if(!poly) return 0;
+
+    Exact_polyhedron exact_poly;
+    to_exact(*poly, exact_poly);
+    Nef_polyhedron* nef_poly = new Nef_polyhedron(exact_poly);
+    exact_poly.clear();
+
+    return new Scene_nef_polyhedron_item(nef_poly);
+}
+
+Scene_polyhedron_item*
+Scene_nef_polyhedron_item::convert_to_polyhedron() const {
+    Exact_polyhedron exact_poly;
+    nef_poly->convert_to_Polyhedron(exact_poly);
+    Polyhedron* poly = new Polyhedron;
+    from_exact(exact_poly, *poly);
+    exact_poly.clear();
+    return new Scene_polyhedron_item(poly);
+}
+
+Scene_nef_polyhedron_item&
+Scene_nef_polyhedron_item::
+operator+=(const Scene_nef_polyhedron_item& other)
+{
+    (*nef_poly) += (*other.nef_poly);
+    return *this;
+}
+
+Scene_nef_polyhedron_item&
+Scene_nef_polyhedron_item::
+operator*=(const Scene_nef_polyhedron_item& other)
+{
+    (*nef_poly) *= (*other.nef_poly);
+    return *this;
+}
+
+Scene_nef_polyhedron_item&
+Scene_nef_polyhedron_item::
+operator-=(const Scene_nef_polyhedron_item& other)
+{
+    (*nef_poly) -= (*other.nef_poly);
+    return *this;
+}
+
+Scene_nef_polyhedron_item*
+Scene_nef_polyhedron_item::
+sum(const Scene_nef_polyhedron_item& a, 
+    const Scene_nef_polyhedron_item& b)
+{
+    return new Scene_nef_polyhedron_item(CGAL::minkowski_sum_3(*a.nef_poly,
+                                                               *b.nef_poly));
+}
+
+void
+Scene_nef_polyhedron_item::
+convex_decomposition(std::list< Scene_polyhedron_item*>& convex_parts)
+{
+    // copy the Nef polyhedron, as markers are added
+    Nef_polyhedron N(*nef_poly);
+    CGAL::convex_decomposition_3(N);
+
+    typedef Nef_polyhedron::Volume_const_iterator Volume_const_iterator;
+
+    Volume_const_iterator ci = ++N.volumes_begin();
+    for( ; ci != N.volumes_end(); ++ci) {
+        if(ci->mark()) {
+            Exact_polyhedron P;
+            N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P);
+            Polyhedron* poly = new Polyhedron;
+            from_exact(P, *poly);
+            Scene_polyhedron_item *spoly = new Scene_polyhedron_item(poly);
+            convex_parts.push_back(spoly);
+            spoly->invalidateOpenGLBuffers();
+        }
+    }
+}
+
+void
+Scene_nef_polyhedron_item::
+invalidateOpenGLBuffers()
+{
+    compute_bbox();
+    Base::invalidateOpenGLBuffers();
+    are_buffers_filled = false;
+}
+void
+Scene_nef_polyhedron_item::selection_changed(bool p_is_selected)
+{
+
+    if(p_is_selected != is_selected)
+        is_selected = p_is_selected;
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.h
new file mode 100644
index 0000000..7cf33a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.h
@@ -0,0 +1,112 @@
+#ifndef SCENE_NEF_POLYHEDRON_ITEM_H
+#define SCENE_NEF_POLYHEDRON_ITEM_H
+#include  <CGAL/Three/Scene_item.h>
+#include "Scene_nef_polyhedron_item_config.h"
+#include "Nef_type_fwd.h"
+#include <iostream>
+#include <queue>
+class Scene_polyhedron_item;
+
+class SCENE_NEF_POLYHEDRON_ITEM_EXPORT Scene_nef_polyhedron_item
+ : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+  Scene_nef_polyhedron_item();
+//   Scene_nef_polyhedron_item(const Scene_nef_polyhedron_item&);
+  Scene_nef_polyhedron_item(const Nef_polyhedron& p);
+  Scene_nef_polyhedron_item(Nef_polyhedron* const p);
+  ~Scene_nef_polyhedron_item();
+
+  Scene_nef_polyhedron_item* clone() const;
+  bool load_from_off(std::istream& in);
+  bool load(std::istream& in);
+  bool save(std::ostream& in) const;
+
+  QFont font() const;
+  QString toolTip() const;
+
+  virtual void invalidateOpenGLBuffers();
+  virtual void selection_changed(bool);
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud && m!=Splatting; } // CHECK THIS!
+  // OpenGL drawing in a display list
+  void direct_draw() const;
+
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+  virtual void draw_edges() const {}
+  virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+  virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+  // Wireframe OpenGL drawing
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  void compute_bbox() const;
+
+  Nef_polyhedron* nef_polyhedron();
+  const Nef_polyhedron* nef_polyhedron() const;
+
+  bool is_simple() const;
+  bool is_Triangle;
+  // conversion operations
+  static Scene_nef_polyhedron_item* from_polyhedron(Scene_polyhedron_item*);
+  Scene_polyhedron_item* convert_to_polyhedron() const;
+
+  // Nef boolean operations
+  Scene_nef_polyhedron_item&
+  operator+=(const Scene_nef_polyhedron_item&); // union
+
+  Scene_nef_polyhedron_item&
+  operator*=(const Scene_nef_polyhedron_item&); // intersection
+
+  Scene_nef_polyhedron_item&
+  operator-=(const Scene_nef_polyhedron_item&); // difference
+
+  static Scene_nef_polyhedron_item*
+  sum(const Scene_nef_polyhedron_item&, 
+      const Scene_nef_polyhedron_item&);
+
+  void convex_decomposition(std::list< Scene_polyhedron_item*>&);
+  
+private:
+  typedef Scene_item Base;
+  typedef std::vector<QColor> Color_vector;
+
+  Nef_polyhedron* nef_poly;
+
+  enum VAOs {
+      Facets = 0,
+      Edges,
+      Points,
+      NbOfVaos = Points +1
+  };
+  enum VBOs {
+      Facets_vertices = 0,
+      Facets_normals,
+      Edges_vertices,
+      Points_vertices,
+      NbOfVbos = Points_vertices +1
+  };
+
+  mutable std::vector<double> positions_lines;
+  mutable std::vector<double> positions_facets;
+  mutable std::vector<double> positions_points;
+  mutable std::vector<double> normals;
+  mutable std::vector<double> color_lines;
+  mutable std::vector<double> color_facets;
+  mutable std::vector<double> color_points;
+  mutable std::size_t nb_points;
+  mutable std::size_t nb_lines;
+  mutable std::size_t nb_facets;
+
+  mutable QOpenGLShaderProgram *program;
+
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+  void compute_normals_and_vertices(void) const;
+
+  void triangulate_facet();
+  void triangulate_facet_color();
+}; // end class Scene_nef_polyhedron_item
+
+#endif // SCENE_NEF_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_nef_polyhedron_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_nef_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.cpp
new file mode 100644
index 0000000..28adabd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.cpp
@@ -0,0 +1,130 @@
+#include "Scene_plane_item.h"
+
+
+
+void Scene_plane_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const
+{
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+    program->bind();
+    vaos[Facets]->bind();
+
+    buffers[Facets_vertices].bind();
+    buffers[Facets_vertices].allocate(positions_quad.data(),
+                        static_cast<int>(positions_quad.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+    buffers[Facets_vertices].release();
+    vaos[Facets]->release();
+
+
+    vaos[Edges]->bind();
+    buffers[Edges_vertices].bind();
+    buffers[Edges_vertices].allocate(positions_lines.data(),
+                        static_cast<int>(positions_lines.size()*sizeof(float)));
+    program->enableAttributeArray("vertex");
+    program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+    buffers[Edges_vertices].release();
+    vaos[Edges]->release();
+
+    program->release();
+    are_buffers_filled = true;
+
+}
+
+void Scene_plane_item::compute_normals_and_vertices(void)
+{
+    positions_quad.resize(0);
+    positions_lines.resize(0);
+
+    const double diag = scene_diag();
+    //The quad
+    {
+
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(0.0);
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(0.0);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(0.0);
+
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(0.0);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(-diag);
+    positions_quad.push_back(0.0);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(diag);
+    positions_quad.push_back(0.0);
+
+}
+    //The grid
+    float x = (2*diag)/10.0;
+    float y = (2*diag)/10.0;
+    {
+        for(int u = 0; u < 11; u++)
+        {
+
+            positions_lines.push_back(-diag + x* u);
+            positions_lines.push_back(-diag);
+            positions_lines.push_back(0.0);
+
+            positions_lines.push_back(-diag + x* u);
+            positions_lines.push_back(diag);
+            positions_lines.push_back(0.0);
+        }
+        for(int v=0; v<11; v++)
+        {
+
+            positions_lines.push_back(-diag);
+            positions_lines.push_back(-diag + v * y);
+            positions_lines.push_back(0.0);
+
+            positions_lines.push_back(diag);
+            positions_lines.push_back(-diag + v * y);
+            positions_lines.push_back(0.0);
+        }
+
+    }
+}
+
+void Scene_plane_item::draw(CGAL::Three::Viewer_interface* viewer)const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Facets]->bind();
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+    QMatrix4x4 f_matrix;
+    for(int i=0; i<16; i++)
+        f_matrix.data()[i] = (float)frame->matrix()[i];
+    program->bind();
+    program->setUniformValue("f_matrix", f_matrix);
+    program->setAttributeValue("colors",this->color());
+    program->setUniformValue("is_selected", false);
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(positions_quad.size()/3));
+    program->release();
+    vaos[Facets]->release();
+
+}
+
+void Scene_plane_item::draw_edges(CGAL::Three::Viewer_interface* viewer)const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Edges]->bind();
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+    QMatrix4x4 f_matrix;
+    for(int i=0; i<16; i++)
+        f_matrix.data()[i] = (float)frame->matrix()[i];
+    program->bind();
+    program->setUniformValue("f_matrix", f_matrix);
+    program->setAttributeValue("colors",QVector3D(0,0,0));
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(positions_lines.size()/3));
+    program->release();
+    vaos[Edges]->release();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.h
new file mode 100644
index 0000000..ab08af0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_plane_item.h
@@ -0,0 +1,182 @@
+#ifndef SCENE_PLANE_ITEM_H
+#define SCENE_PLANE_ITEM_H
+
+
+#include  <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Scene_interface.h>
+
+#include "Scene_basic_objects_config.h"
+
+#include <QGLViewer/manipulatedFrame.h>
+#include <QGLViewer/qglviewer.h>
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <cmath>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel_epic;
+typedef Kernel_epic::Plane_3 Plane_3;
+
+class SCENE_BASIC_OBJECTS_EXPORT Scene_plane_item 
+  : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+public:
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+
+  Scene_plane_item(const CGAL::Three::Scene_interface* scene_interface)
+      :CGAL::Three::Scene_item(NbOfVbos,NbOfVaos),
+      scene(scene_interface),
+      manipulable(false),
+      can_clone(true),
+      frame(new ManipulatedFrame())
+  {
+    setNormal(0., 0., 1.);
+    //Generates an integer which will be used as ID for each buffer
+    invalidateOpenGLBuffers();
+  }
+
+  ~Scene_plane_item() {
+    frame = 0;
+    delete frame;
+  }
+
+  bool isFinite() const { return false; }
+  bool isEmpty() const { return false; }
+  void compute_bbox() const { _bbox = Bbox(); }
+
+  bool manipulatable() const {
+    return manipulable;
+  }
+  ManipulatedFrame* manipulatedFrame() {
+    return frame;
+  }
+
+  Scene_plane_item* clone() const {
+    if(can_clone)
+    {
+      Scene_plane_item* item = new Scene_plane_item(scene);
+      item->manipulable = manipulable;
+      item->can_clone = true;
+      item->frame = new ManipulatedFrame;
+      item->frame->setPosition(frame->position());
+      item->frame->setOrientation(frame->orientation());
+      return item;
+    }
+    else
+      return 0;
+  }
+
+  QString toolTip() const {
+    const qglviewer::Vec& pos = frame->position();
+    const qglviewer::Vec& n = frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+    return
+      tr("<p><b>%1</b> (mode: %2, color: %3)<br />")
+      .arg(this->name())
+      .arg(this->renderingModeName())
+      .arg(this->color().name())
+
+      +
+      tr("<i>Plane</i></p>"
+         "<p>Equation: %1*x + %2*y + %3*z + %4 = 0<br />"
+         "Normal vector: (%1, %2, %3)<br />"
+         "Point: (%5, %6, %7)</p>")
+      .arg(n[0]).arg(n[1]).arg(n[2])
+      .arg( - pos * n)
+      .arg(pos[0]).arg(pos[1]).arg(pos[2])
+      +
+      tr("<p>Can clone: %1<br />"
+         "Manipulatable: %2</p>")
+      .arg(can_clone?tr("true"):tr("false"))
+      .arg(manipulable?tr("true"):tr("false"));
+  }
+
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe || m == Flat || m == FlatPlusEdges);
+  }
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+ virtual void draw_edges(CGAL::Three::Viewer_interface* viewer)const;
+  Plane_3 plane() const {
+    const qglviewer::Vec& pos = frame->position();
+    const qglviewer::Vec& n = 
+      frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
+    return Plane_3(n[0], n[1],  n[2], - n * pos);
+  }
+
+private:
+  double scene_diag() const {
+    const Bbox& bbox = scene->bbox();
+    const double& xdelta = bbox.xmax-bbox.xmin;
+    const double& ydelta = bbox.ymax-bbox.ymin;
+    const double& zdelta = bbox.zmax-bbox.zmin;
+    const double diag = std::sqrt(xdelta*xdelta + 
+                            ydelta*ydelta +
+                            zdelta*zdelta);
+    return diag * 0.7;
+  }
+
+public Q_SLOTS:
+  virtual void invalidateOpenGLBuffers()
+  {
+      compute_normals_and_vertices();
+      are_buffers_filled = false;
+      compute_bbox();
+  }
+
+  void setPosition(float x, float y, float z) {
+    frame->setPosition(x, y, z);
+  }
+  
+  void setPosition(double x, double y, double z) {
+    frame->setPosition((float)x, (float)y, (float)z);
+  }
+  
+  void setNormal(float x, float y, float z) {
+    QVector3D normal(x,y,z);
+    QVector3D origin(0,0,1);
+    QQuaternion q(CGAL::sqrt((normal.lengthSquared()) * (origin.lengthSquared())) + QVector3D::dotProduct(origin, normal),QVector3D::crossProduct(origin, normal));
+    q.normalize();
+    frame->setOrientation(q.x(), q.y(), q.z(), q.scalar());
+  }
+
+  void setNormal(double x, double y, double z) {
+    setNormal((float)x, (float)y, (float)z);
+  }
+
+  void setClonable(bool b = true) {
+    can_clone = b;
+  }
+
+  void setManipulatable(bool b = true) {
+    manipulable = b;
+  }
+protected:
+  const CGAL::Three::Scene_interface* scene;
+  bool manipulable;
+  bool can_clone;
+  qglviewer::ManipulatedFrame* frame;
+
+  enum VAOs {
+      Facets = 0,
+      Edges,
+      NbOfVaos = Edges +1
+  };
+  enum VBOs {
+      Facets_vertices = 0,
+      Edges_vertices,
+      NbOfVbos = Edges_vertices +1
+  };
+
+  mutable std::vector<float> positions_lines;
+  mutable std::vector<float> positions_quad;
+  mutable GLint sampler_location;
+  mutable bool smooth_shading;
+  mutable QOpenGLShaderProgram *program;
+
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface*)const;
+  void compute_normals_and_vertices(void);
+};
+
+#endif // SCENE_PLANE_ITEM_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.cpp
new file mode 100644
index 0000000..648c44a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.cpp
@@ -0,0 +1,598 @@
+#include "Scene_points_with_normal_item.h"
+#include "Polyhedron_type.h"
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+#include <CGAL/IO/read_ply_points.h>
+#include <CGAL/IO/write_ply_points.h>
+#include <CGAL/IO/read_off_points.h>
+#include <CGAL/IO/write_off_points.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <CGAL/Three/Viewer_interface.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Search_traits_3.h>
+
+#include <QObject>
+#include <QMenu>
+#include <QGLViewer/manipulatedCameraFrame.h>
+
+#include <set>
+#include <stack>
+#include <algorithm>
+#include <boost/array.hpp>
+
+
+Scene_points_with_normal_item::Scene_points_with_normal_item()
+    : Scene_item(NbOfVbos,NbOfVaos),
+    m_points(new Point_set),
+    m_has_normals(false)
+{
+  setRenderingMode(Points);
+    is_selected = true;
+    nb_points = 0;
+    nb_selected_points = 0;
+    nb_lines = 0;
+}
+
+// Copy constructor
+Scene_points_with_normal_item::Scene_points_with_normal_item(const Scene_points_with_normal_item& toCopy)
+    :Scene_item(NbOfVbos,NbOfVaos), // do not call superclass' copy constructor
+    m_points(new Point_set(*toCopy.m_points)),
+    m_has_normals(toCopy.m_has_normals)
+{
+  if (m_has_normals)
+    {
+    setRenderingMode(PointsPlusNormals);
+        is_selected = true;
+    }
+  else
+    {
+    setRenderingMode(Points);
+        is_selected = true;
+    }
+    nb_points = 0;
+    nb_selected_points = 0;
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+// Converts polyhedron to point set
+Scene_points_with_normal_item::Scene_points_with_normal_item(const Polyhedron& input_mesh)
+    : Scene_item(NbOfVbos,NbOfVaos),
+    m_points(new Point_set),
+    m_has_normals(true)
+{
+  // Converts Polyhedron vertices to point set.
+  // Computes vertices normal from connectivity.
+
+  Polyhedron::Vertex_iterator v;
+  for (v = const_cast<Polyhedron&>(input_mesh).vertices_begin(); 
+       v != const_cast<Polyhedron&>(input_mesh).vertices_end(); v++)
+  {
+    const Kernel::Point_3& p = v->point();
+    Kernel::Vector_3 n =
+      CGAL::Polygon_mesh_processing::compute_vertex_normal(v, input_mesh);
+    m_points->push_back(UI_point(p,n));
+  }
+
+  setRenderingMode(PointsPlusNormals);
+  is_selected = true;
+  nb_points = 0;
+  nb_selected_points = 0;
+  nb_lines = 0;
+  invalidateOpenGLBuffers();
+}
+
+Scene_points_with_normal_item::~Scene_points_with_normal_item()
+{
+  Q_ASSERT(m_points != NULL);
+  delete m_points; m_points = NULL;
+}
+
+
+
+void Scene_points_with_normal_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const
+{
+    compute_normals_and_vertices();
+    //vao for the edges
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+
+        vaos[Edges]->bind();
+        buffers[Edges_vertices].bind();
+        buffers[Edges_vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Edges_vertices].release();
+
+        vaos[Edges]->release();
+        nb_lines = positions_lines.size();
+        positions_lines.resize(0);
+        std::vector<double>(positions_lines).swap(positions_lines);
+        program->release();
+    }
+    //vao for the points
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+
+        vaos[ThePoints]->bind();
+        buffers[Points_vertices].bind();
+        buffers[Points_vertices].allocate(positions_points.data(),
+                            static_cast<int>(positions_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Points_vertices].release();
+        vaos[ThePoints]->release();
+        nb_points = positions_points.size();
+        positions_points.resize(0);
+        std::vector<double>(positions_points).swap(positions_points);
+        program->release();
+    }
+    //vao for the selected points
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+
+        vaos[Selected_points]->bind();
+        buffers[Selected_points_vertices].bind();
+        buffers[Selected_points_vertices].allocate(positions_selected_points.data(),
+                            static_cast<int>(positions_selected_points.size()*sizeof(double)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_DOUBLE,0,3);
+        buffers[Selected_points_vertices].release();
+
+        vaos[Selected_points]->release();
+        nb_selected_points = positions_selected_points.size();
+        positions_selected_points.resize(0);
+        std::vector<double>(positions_selected_points).swap(positions_selected_points);
+        program->release();
+    }
+    are_buffers_filled = true;
+}
+
+void Scene_points_with_normal_item::compute_normals_and_vertices() const
+{
+    positions_points.resize(0);
+    positions_lines.resize(0);
+    positions_selected_points.resize(0);
+    normals.resize(0);
+
+    positions_points.reserve(m_points->size() * 3);
+    positions_lines.reserve(m_points->size() * 3 * 2);
+
+
+    //Shuffle container to allow quick display random points
+    Point_set_3<Kernel> points = *m_points;
+    std::random_shuffle (points.begin(), points.end() - m_points->nb_selected_points());
+    std::random_shuffle (points.end() - m_points->nb_selected_points(), points.end());
+    
+    //The points
+    {
+        // The *non-selected* points
+      for (Point_set_3<Kernel>::const_iterator it = points.begin(); it != points.first_selected(); it++)
+	{
+	  const UI_point& p = *it;
+	  positions_points.push_back(p.x());
+	  positions_points.push_back(p.y());
+	  positions_points.push_back(p.z());
+	}
+
+        // Draw *selected* points
+      for (Point_set_3<Kernel>::const_iterator it = points.first_selected(); it != points.end(); it++)
+	{
+	  const UI_point& p = *it;
+	  positions_selected_points.push_back(p.x());
+	  positions_selected_points.push_back(p.y());
+	  positions_selected_points.push_back(p.z());
+	}
+    }
+
+    //The lines
+    {
+        // Stock normals
+        Kernel::Sphere_3 region_of_interest = points.region_of_interest();
+        float normal_length = (float)std::sqrt(region_of_interest.squared_radius() / 1000.);
+
+	for (Point_set_3<Kernel>::const_iterator it = points.begin(); it != points.end(); it++)
+	  {
+	    const UI_point& p = *it;
+	    const Point_set_3<Kernel>::Vector& n = p.normal();
+	    Point_set_3<Kernel>::Point q = p + normal_length * n;
+	    positions_lines.push_back(p.x());
+	    positions_lines.push_back(p.y());
+	    positions_lines.push_back(p.z());
+
+	    positions_lines.push_back(q.x());
+	    positions_lines.push_back(q.y());
+	    positions_lines.push_back(q.z());
+	  }
+    }
+}
+
+// Duplicates scene item
+Scene_points_with_normal_item*
+Scene_points_with_normal_item::clone() const
+{
+  return new Scene_points_with_normal_item(*this);
+}
+
+// Is selection empty?
+bool Scene_points_with_normal_item::isSelectionEmpty() const
+{
+  return (m_points->nb_selected_points() == 0);
+}
+
+// Delete selection
+void Scene_points_with_normal_item::deleteSelection()
+{
+  CGAL::Timer task_timer; task_timer.start();
+  std::cerr << "Delete " << m_points->nb_selected_points() << " points...";
+
+  // Delete selected points
+  m_points->delete_selection();
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size();
+  std::cerr << "done: " << task_timer.time() << " seconds, "
+                        << (memory>>20) << " Mb allocated"
+                        << std::endl;
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+
+// Invert selection
+void Scene_points_with_normal_item::invertSelection()
+{
+  m_points->invert_selection();
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+
+// Select everything
+void Scene_points_with_normal_item::selectAll()
+{
+  m_points->select_all();
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+// Reset selection mark
+void Scene_points_with_normal_item::resetSelection()
+{
+  // Un-select all points
+  m_points->unselect_all();
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+  //Select duplicated points
+void Scene_points_with_normal_item::selectDuplicates()
+{
+  std::set<Kernel::Point_3> unique_points;
+  for (Point_set::iterator ptit=m_points->begin(); ptit!=m_points->end();++ptit )
+    if ( !unique_points.insert(*ptit).second )
+      m_points->select(ptit);
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+
+// Loads point set from .PLY file
+bool Scene_points_with_normal_item::read_ply_point_set(std::istream& stream)
+{
+  Q_ASSERT(m_points != NULL);
+
+  m_points->clear();
+  bool ok = stream &&
+            CGAL::read_ply_points_and_normals(stream,
+                                              std::back_inserter(*m_points),
+                                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) &&
+            !isEmpty();
+  if (ok)
+    {
+      for (Point_set::iterator it=m_points->begin(),
+             end=m_points->end();it!=end; ++it)
+        {
+          if (it->normal() != CGAL::NULL_VECTOR)
+            {
+              m_has_normals=true;
+              setRenderingMode(PointsPlusNormals);
+              break;
+            }
+        }
+    }
+  invalidateOpenGLBuffers();
+  return ok;
+}
+
+// Write point set to .PLY file
+bool Scene_points_with_normal_item::write_ply_point_set(std::ostream& stream) const
+{
+  Q_ASSERT(m_points != NULL);
+
+  return stream &&
+         CGAL::write_ply_points_and_normals(stream,
+                                            m_points->begin(), m_points->end(),
+                                            CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
+}
+
+// Loads point set from .OFF file
+bool Scene_points_with_normal_item::read_off_point_set(std::istream& stream)
+{
+  Q_ASSERT(m_points != NULL);
+
+  m_points->clear();
+  bool ok = stream &&
+            CGAL::read_off_points_and_normals(stream,
+                                              std::back_inserter(*m_points),
+                                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) &&
+            !isEmpty();
+  invalidateOpenGLBuffers();
+  return ok;
+}
+
+// Write point set to .OFF file
+bool Scene_points_with_normal_item::write_off_point_set(std::ostream& stream) const
+{
+  Q_ASSERT(m_points != NULL);
+
+  return stream &&
+         CGAL::write_off_points_and_normals(stream,
+                                            m_points->begin(), m_points->end(),
+                                            CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
+}
+
+// Loads point set from .XYZ file
+bool Scene_points_with_normal_item::read_xyz_point_set(std::istream& stream)
+{
+  Q_ASSERT(m_points != NULL);
+
+  m_points->clear();
+  bool ok = stream &&
+            CGAL::read_xyz_points_and_normals(stream,
+                                              std::back_inserter(*m_points),
+                                              CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) &&
+            !isEmpty();
+
+  if (ok)
+  {
+    for (Point_set::iterator it=m_points->begin(),
+                             end=m_points->end();it!=end; ++it)
+    {
+      if (it->normal() != CGAL::NULL_VECTOR)
+      {
+        m_has_normals=true;
+        setRenderingMode(PointsPlusNormals);
+        break;
+      }
+    }
+  }
+  invalidateOpenGLBuffers();
+  return ok;
+}
+
+// Write point set to .XYZ file
+bool Scene_points_with_normal_item::write_xyz_point_set(std::ostream& stream) const
+{
+  Q_ASSERT(m_points != NULL);
+
+  return stream &&
+         CGAL::write_xyz_points_and_normals(stream,
+                                            m_points->begin(), m_points->end(),
+                                            CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
+}
+
+QString
+Scene_points_with_normal_item::toolTip() const
+{
+  Q_ASSERT(m_points != NULL);
+
+  return QObject::tr("<p><b>%1</b> (color: %4)<br />"
+                     "<i>Point set</i></p>"
+                     "<p>Number of points: %2</p>")
+    .arg(name())
+    .arg(m_points->size())
+    .arg(color().name());
+}
+
+bool Scene_points_with_normal_item::supportsRenderingMode(RenderingMode m) const 
+{
+    return m==Points ||
+            ( has_normals() &&
+              ( m==PointsPlusNormals || m==Splatting ) );
+}
+
+void Scene_points_with_normal_item::draw_splats(CGAL::Three::Viewer_interface* viewer) const
+{
+   // TODO add support for selection
+   viewer->glBegin(GL_POINTS);
+   for ( Point_set_3<Kernel>::const_iterator it = m_points->begin(); it != m_points->end(); it++)
+   {
+     const UI_point& p = *it;
+     viewer->glNormal3dv(&p.normal().x());
+     viewer->glMultiTexCoord1d(GL_TEXTURE2, p.radius());
+     viewer->glVertex3dv(&p.x());
+
+   }
+   viewer->glEnd();
+
+
+
+}
+
+void Scene_points_with_normal_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    double ratio_displayed = 1.0;
+    if (viewer->inFastDrawing () &&
+        (nb_lines/6 > 300000)) // arbitrary large value
+      ratio_displayed = 6 * 300000. / (double)(nb_lines);
+
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+    vaos[Edges]->bind();
+    program=getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", this->color());
+    viewer->glDrawArrays(GL_LINES, 0,
+                         static_cast<GLsizei>(((std::size_t)(ratio_displayed * nb_lines)/3)));
+    vaos[Edges]->release();
+    program->release();
+}
+void Scene_points_with_normal_item::draw_points(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+
+    double ratio_displayed = 1.0;
+    if (viewer->inFastDrawing () &&
+        ((nb_points + nb_selected_points)/3 > 300000)) // arbitrary large value
+      ratio_displayed = 3 * 300000. / (double)(nb_points + nb_selected_points);
+
+    vaos[ThePoints]->bind();
+    program=getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", this->color());
+    viewer->glDrawArrays(GL_POINTS, 0,
+                         static_cast<GLsizei>(((std::size_t)(ratio_displayed * nb_points)/3)));
+    vaos[ThePoints]->release();
+    program->release();
+    GLfloat point_size;
+    viewer->glGetFloatv(GL_POINT_SIZE, &point_size);
+    viewer->glPointSize(4.f);
+
+    vaos[Selected_points]->bind();
+    program=getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", QColor(255,0,0));
+    viewer->glDrawArrays(GL_POINTS, 0,
+                         static_cast<GLsizei>(((std::size_t)(ratio_displayed * nb_selected_points)/3)));
+    vaos[Selected_points]->release();
+    program->release();
+    viewer->glPointSize(point_size);
+}
+// Gets wrapped point set
+Point_set* Scene_points_with_normal_item::point_set()
+{
+  Q_ASSERT(m_points != NULL);
+  return m_points;
+}
+const Point_set* Scene_points_with_normal_item::point_set() const
+{
+  Q_ASSERT(m_points != NULL);
+  return m_points;
+}
+
+bool
+Scene_points_with_normal_item::isEmpty() const
+{
+  Q_ASSERT(m_points != NULL);
+  return m_points->empty();
+}
+
+void
+Scene_points_with_normal_item::compute_bbox() const
+{
+  Q_ASSERT(m_points != NULL);
+
+  Kernel::Iso_cuboid_3 bbox = m_points->bounding_box();
+  _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+              bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+void Scene_points_with_normal_item::computes_local_spacing(int k)
+{
+  typedef Kernel Geom_traits;
+  typedef CGAL::Search_traits_3<Geom_traits> TreeTraits;
+  typedef CGAL::Orthogonal_k_neighbor_search<TreeTraits> Neighbor_search;
+  typedef Neighbor_search::Tree Tree;
+
+  Point_set::iterator end(m_points->end());
+
+  // build kdtree
+  Tree tree(m_points->begin(), end);
+
+  // Compute the radius of each point = (distance max to k nearest neighbors)/2.
+  {
+    int i=0;
+    for (Point_set::iterator it=m_points->begin(); it!=end; ++it, ++i)
+    {
+      Neighbor_search search(tree, *it, k+1);
+      double maxdist2 = (--search.end())->second; // squared distance to furthest neighbor
+      it->radius() = sqrt(maxdist2)/2.;
+    }
+  }
+
+  m_points->set_radii_uptodate(true);
+}
+
+QMenu* Scene_points_with_normal_item::contextMenu()
+{
+    const char* prop_name = "Menu modified by Scene_points_with_normal_item.";
+
+    QMenu* menu = Scene_item::contextMenu();
+
+    // Use dynamic properties:
+    // http://doc.qt.io/qt-5/qobject.html#property
+    bool menuChanged = menu->property(prop_name).toBool();
+
+    if(!menuChanged) {
+        actionDeleteSelection = menu->addAction(tr("Delete Selection"));
+        actionDeleteSelection->setObjectName("actionDeleteSelection");
+        connect(actionDeleteSelection, SIGNAL(triggered()),this, SLOT(deleteSelection()));
+
+        actionResetSelection = menu->addAction(tr("Reset Selection"));
+        actionResetSelection->setObjectName("actionResetSelection");
+        connect(actionResetSelection, SIGNAL(triggered()),this, SLOT(resetSelection()));
+
+        actionSelectDuplicatedPoints = menu->addAction(tr("Select duplicated points"));
+        actionSelectDuplicatedPoints->setObjectName("actionSelectDuplicatedPoints");
+        connect(actionSelectDuplicatedPoints, SIGNAL(triggered()),this, SLOT(selectDuplicates()));
+
+        menu->setProperty(prop_name, true);
+    }
+
+    if (isSelectionEmpty())
+    {
+        actionDeleteSelection->setDisabled(true);
+        actionResetSelection->setDisabled(true);
+    }
+    else
+    {
+        actionDeleteSelection->setDisabled(false);
+        actionResetSelection->setDisabled(false);
+    }
+
+    return menu;
+}
+
+void Scene_points_with_normal_item::setRenderingMode(RenderingMode m)
+{
+    Scene_item::setRenderingMode(m);
+    if (rendering_mode==Splatting && (!m_points->are_radii_uptodate()))
+    {
+        computes_local_spacing(6); // default value = small
+    }
+}
+
+bool Scene_points_with_normal_item::has_normals() const { return m_has_normals; }
+
+void Scene_points_with_normal_item::set_has_normals(bool b) {
+  if (b!=m_has_normals){
+    m_has_normals=b;
+    //reset the context menu
+    delete this->defaultContextMenu;
+    this->defaultContextMenu = 0;
+  }
+}
+
+void Scene_points_with_normal_item::invalidateOpenGLBuffers()
+{
+    are_buffers_filled = false;
+    compute_bbox();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.h
new file mode 100644
index 0000000..ea74b7e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item.h
@@ -0,0 +1,128 @@
+#ifndef POINT_SET_ITEM_H
+#define POINT_SET_ITEM_H
+#include  <CGAL/Three/Scene_item.h>
+#include "Scene_points_with_normal_item_config.h"
+#include "Polyhedron_type_fwd.h"
+#include "Kernel_type.h"
+#include "Point_set_3.h"
+
+#include <iostream>
+
+
+// point set
+typedef Point_set_3<Kernel> Point_set;
+typedef Point_set::UI_point UI_point; // type of points in Point_set_3
+
+class QMenu;
+class QAction;
+
+// This class represents a point set in the OpenGL scene
+class SCENE_POINTS_WITH_NORMAL_ITEM_EXPORT Scene_points_with_normal_item
+  : public CGAL::Three::Scene_item
+{
+  Q_OBJECT
+
+public:
+  Scene_points_with_normal_item();
+  Scene_points_with_normal_item(const Scene_points_with_normal_item& toCopy);
+  Scene_points_with_normal_item(const Polyhedron& p);
+  ~Scene_points_with_normal_item();
+  Scene_points_with_normal_item* clone() const;
+
+  // Is selection empty?
+  virtual bool isSelectionEmpty() const;
+
+  // Function to override the context menu
+  QMenu* contextMenu();
+
+  // IO
+  bool read_ply_point_set(std::istream& in);
+  bool write_ply_point_set(std::ostream& out) const;
+  bool read_off_point_set(std::istream& in);
+  bool write_off_point_set(std::ostream& out) const;
+  bool read_xyz_point_set(std::istream& in);
+  bool write_xyz_point_set(std::ostream& out) const;
+
+  // Function for displaying meta-data of the item
+  virtual QString toolTip() const;
+
+  virtual void invalidateOpenGLBuffers();
+
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+
+  virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+  virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+
+  virtual void draw_splats(CGAL::Three::Viewer_interface*) const;
+  
+  // Gets wrapped point set
+  Point_set*       point_set();
+  const Point_set* point_set() const;
+
+  // Gets dimensions
+  virtual bool isFinite() const { return true; }
+  virtual bool isEmpty() const;
+  virtual void compute_bbox() const;
+
+  virtual void setRenderingMode(RenderingMode m);
+
+  // computes the local point spacing (aka radius) of each point
+  void computes_local_spacing(int k);
+
+  bool has_normals() const;
+  void set_has_normals(bool b);
+
+public Q_SLOTS:
+  // Delete selection
+  virtual void deleteSelection();
+  // Invert selection
+  void invertSelection();
+  // Select all points
+  void selectAll();
+  // Reset selection mark
+  void resetSelection();
+  //Select duplicated points
+  void selectDuplicates();
+
+// Data
+private:
+  Point_set* m_points;
+  bool m_has_normals;
+  QAction* actionDeleteSelection;
+  QAction* actionResetSelection;
+  QAction* actionSelectDuplicatedPoints;
+
+  enum VAOs {
+      Edges=0,
+      ThePoints,
+      Selected_points,
+      NbOfVaos = Selected_points+1
+  };
+  enum VBOs {
+      Edges_vertices = 0,
+      Points_vertices,
+      Selected_points_vertices,
+      NbOfVbos = Selected_points_vertices+1
+  };
+
+  mutable std::vector<double> positions_lines;
+  mutable std::vector<double> positions_points;
+  mutable std::vector<double> positions_selected_points;
+  mutable std::vector<double> normals;
+  mutable std::size_t nb_points;
+  mutable std::size_t nb_selected_points;
+  mutable std::size_t nb_lines;
+
+  mutable QOpenGLShaderProgram *program;
+
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+
+  void compute_normals_and_vertices() const;
+
+
+}; // end class Scene_points_with_normal_item
+
+
+#endif // POINT_SET_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_points_with_normal_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_points_with_normal_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.cpp
new file mode 100644
index 0000000..6e23288
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.cpp
@@ -0,0 +1,710 @@
+#include <vector>
+#include <queue>
+
+#include "Scene_polygon_soup_item.h"
+#include "Scene_polyhedron_item.h"
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+
+#include <QObject>
+#include <QtDebug>
+
+#include <set>
+#include <stack>
+#include <algorithm>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/IO/OFF_reader.h>
+#include <CGAL/IO/File_writer_OFF.h>
+#include <CGAL/version.h> 
+
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
+#include <CGAL/Polygon_mesh_processing/orientation.h>
+#include <CGAL/Polygon_mesh_processing/repair.h>
+
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+
+
+
+struct Polyhedron_to_polygon_soup_writer {
+  typedef Kernel::Point_3 Point_3;
+
+  Polygon_soup* soup;
+  Polygon_soup::Polygon_3 polygon;
+
+  Polyhedron_to_polygon_soup_writer(Polygon_soup* soup) : soup(soup), polygon() {
+  }
+
+  void write_header( std::ostream&,
+                     std::size_t /* vertices */,
+                     std::size_t /* halfedges */,
+                     std::size_t /* facets */,
+                     bool /* normals */ = false ) {
+    soup->clear();
+  }
+
+  void write_footer() {
+  }
+
+  void write_vertex( const double& x, const double& y, const double& z) {
+    soup->points.push_back(Point_3(x, y, z));
+  }
+
+  void write_normal( const double& /* x */, const double& /* y */, const double& /* z */) {
+  }
+
+  void write_facet_header() {
+  }
+
+  void write_facet_begin( std::size_t no) {
+    polygon.clear();
+    polygon.reserve(no);
+  }
+  void write_facet_vertex_index( std::size_t index) {
+    polygon.push_back(index);
+  }
+  void write_facet_end() {
+    soup->polygons.push_back(polygon);
+    polygon.clear();
+  }
+}; // end struct Polyhedron_to_soup_writer
+
+void
+Scene_polygon_soup_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer) const
+{
+    //vao containing the data for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+
+        vaos[Facets]->bind();
+        buffers[Facets_vertices].bind();
+        buffers[Facets_vertices].allocate(positions_poly.data(),
+                            static_cast<int>(positions_poly.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Facets_vertices].release();
+
+
+
+        buffers[Facets_normals].bind();
+        buffers[Facets_normals].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(float)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+        buffers[Facets_normals].release();
+
+        program->release();
+        vaos[Facets]->release();
+        nb_polys = positions_poly.size();
+        positions_poly.resize(0);
+        std::vector<float>(positions_poly).swap(positions_poly);
+
+        normals.resize(0);
+        std::vector<float>(normals).swap(normals);
+
+    }
+    //vao containing the data for the edges
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+        vaos[Edges]->bind();
+
+        buffers[Edges_vertices].bind();
+        buffers[Edges_vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Edges_vertices].release();
+        program->release();
+        vaos[Edges]->release();
+
+        nb_lines = positions_lines.size();
+        positions_lines.resize(0);
+        std::vector<float>(positions_lines).swap(positions_lines);
+
+    }
+    //vao containing the data for the non manifold edges
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+        vaos[NM_Edges]->bind();
+        buffers[NM_Edges_vertices].bind();
+        buffers[NM_Edges_vertices].allocate(positions_nm_lines.data(),
+                            static_cast<int>(positions_nm_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[NM_Edges_vertices].release();
+        vaos[NM_Edges]->release();
+        nb_nm_edges = positions_nm_lines.size();
+        positions_nm_lines.resize(0);
+        std::vector<float> (positions_nm_lines).swap(positions_nm_lines);
+    }
+    are_buffers_filled = true;
+}
+
+typedef Polyhedron::Traits Traits;
+typedef Polygon_soup::Polygon_3 Facet;
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits>   P_traits;
+typedef Polyhedron::Halfedge_handle Halfedge_handle;
+struct Face_info {
+    Polyhedron::Halfedge_handle e[3];
+    bool is_external;
+};
+typedef CGAL::Triangulation_vertex_base_with_info_2<Halfedge_handle,
+P_traits>        Vb;
+typedef CGAL::Triangulation_face_base_with_info_2<Face_info,
+P_traits>          Fb1;
+typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>   Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                  TDS;
+typedef CGAL::No_intersection_tag                                    Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits,
+TDS,
+Itag>             CDTbase;
+typedef CGAL::Constrained_triangulation_plus_2<CDTbase>              CDT;
+void
+Scene_polygon_soup_item::triangulate_polygon(Polygons_iterator pit) const
+{
+    //Computes the normal of the facet
+    const Point_3& pa = soup->points[pit->at(0)];
+    const Point_3& pb = soup->points[pit->at(1)];
+    const Point_3& pc = soup->points[pit->at(2)];
+    Traits::Vector_3 normal = CGAL::cross_product(pb-pa, pc -pa);
+    normal = normal / std::sqrt(normal * normal);
+
+    P_traits cdt_traits(normal);
+
+    CDT cdt(cdt_traits);
+
+    std::size_t it = 0;
+    std::size_t it_end =pit->size();
+
+    // Iterates the vector of facet handles
+    CDT::Vertex_handle previous, first;
+    do {
+
+        CDT::Vertex_handle vh = cdt.insert(soup->points[pit->at(it)]);
+        if(first == 0) {
+            first = vh;
+        }
+        if(previous != 0 && previous != vh) {
+            cdt.insert_constraint(previous, vh);
+        }
+        previous = vh;
+    } while( ++it != it_end );
+
+    cdt.insert_constraint(previous, first);
+
+    // sets mark is_external
+    for(CDT::All_faces_iterator
+        pitt = cdt.all_faces_begin(),
+        end = cdt.all_faces_end();
+        pitt != end; ++pitt)
+    {
+        pitt->info().is_external = false;
+    }
+
+    //check if the facet is external or internal
+    std::queue<CDT::Face_handle> face_queue;
+    face_queue.push(cdt.infinite_vertex()->face());
+    while(! face_queue.empty() ) {
+        CDT::Face_handle fh = face_queue.front();
+        face_queue.pop();
+        if(fh->info().is_external) continue;
+        fh->info().is_external = true;
+        for(int i = 0; i <3; ++i) {
+            if(!cdt.is_constrained(std::make_pair(fh, i)))
+            {
+                face_queue.push(fh->neighbor(i));
+            }
+        }
+    }
+
+    //iterates on the internal faces to add the vertices to the positions
+    //and the normals to the appropriate vectors
+    int count =0;
+    for(CDT::Finite_faces_iterator
+        ffit = cdt.finite_faces_begin(),
+        end = cdt.finite_faces_end();
+        ffit != end; ++ffit)
+    {
+        count ++;
+        if(ffit->info().is_external)
+            continue;
+
+        positions_poly.push_back(ffit->vertex(0)->point().x());
+        positions_poly.push_back(ffit->vertex(0)->point().y());
+        positions_poly.push_back(ffit->vertex(0)->point().z());
+        positions_poly.push_back(1.0);
+
+        positions_poly.push_back(ffit->vertex(1)->point().x());
+        positions_poly.push_back(ffit->vertex(1)->point().y());
+        positions_poly.push_back(ffit->vertex(1)->point().z());
+        positions_poly.push_back(1.0);
+
+        positions_poly.push_back(ffit->vertex(2)->point().x());
+        positions_poly.push_back(ffit->vertex(2)->point().y());
+        positions_poly.push_back(ffit->vertex(2)->point().z());
+        positions_poly.push_back(1.0);
+
+
+        const Point_3& pa = soup->points[pit->at(0)];
+        const Point_3& pb = soup->points[pit->at(1)];
+        const Point_3& pc = soup->points[pit->at(2)];
+
+        Kernel::Vector_3 n = CGAL::cross_product(pb-pa, pc -pa);
+        n = n / std::sqrt(n * n);
+
+        normals.push_back(n.x());
+        normals.push_back(n.y());
+        normals.push_back(n.z());
+
+        normals.push_back(n.x());
+        normals.push_back(n.y());
+        normals.push_back(n.z());
+
+
+        normals.push_back(n.x());
+        normals.push_back(n.y());
+        normals.push_back(n.z());
+
+
+    }
+}
+void
+Scene_polygon_soup_item::compute_normals_and_vertices() const{
+    //get the vertices and normals
+    typedef Polygon_soup::Polygons::size_type size_type;
+    positions_poly.resize(0);
+    positions_lines.resize(0);
+    normals.resize(0);
+    positions_nm_lines.resize(0);
+    soup->fill_edges();
+    for(Polygons_iterator it = soup->polygons.begin();
+        it != soup->polygons.end(); ++it)
+    {
+        if(it->size()!=3)
+        {
+            triangulate_polygon(it);
+        }
+        else{
+
+            const Point_3& pa = soup->points[it->at(0)];
+            const Point_3& pb = soup->points[it->at(1)];
+            const Point_3& pc = soup->points[it->at(2)];
+
+            Kernel::Vector_3 n = CGAL::cross_product(pb-pa, pc -pa);
+            n = n / std::sqrt(n * n);
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+
+            for(size_type i = 0; i < it->size(); ++i)
+            {
+                const Point_3& p = soup->points[it->at(i)];
+                positions_poly.push_back(p.x());
+                positions_poly.push_back(p.y());
+                positions_poly.push_back(p.z());
+                positions_poly.push_back(1.0);
+            }
+        }
+
+        //Lines
+        for(size_type i = 0; i < it->size(); ++i)
+        {
+
+            const Point_3& pa = soup->points[it->at(i)];
+            const Point_3& pb = soup->points[it->at((i+1)%it->size())];
+            positions_lines.push_back(pa.x());
+            positions_lines.push_back(pa.y());
+            positions_lines.push_back(pa.z());
+            positions_lines.push_back(1.0);
+
+            positions_lines.push_back(pb.x());
+            positions_lines.push_back(pb.y());
+            positions_lines.push_back(pb.z());
+            positions_lines.push_back(1.0);
+        }
+    }
+
+    //Non manifold edges
+    BOOST_FOREACH(const Polygon_soup::Edge& edge,
+                    soup->non_manifold_edges)
+      {
+
+        const Point_3& a = soup->points[edge[0]];
+        const Point_3& b = soup->points[edge[1]];
+        positions_nm_lines.push_back(a.x());
+        positions_nm_lines.push_back(a.y());
+        positions_nm_lines.push_back(a.z());
+        positions_nm_lines.push_back(1.0);
+
+        positions_nm_lines.push_back(b.x());
+        positions_nm_lines.push_back(b.y());
+        positions_nm_lines.push_back(b.z());
+        positions_nm_lines.push_back(1.0);
+      }
+
+}
+
+
+Scene_polygon_soup_item::Scene_polygon_soup_item()
+    : Scene_item(NbOfVbos,NbOfVaos),
+    soup(0),
+    oriented(false)
+{
+    nb_polys = 0;
+    nb_lines = 0;
+    nb_nm_edges = 0;
+}
+
+Scene_polygon_soup_item::~Scene_polygon_soup_item()
+{
+
+  delete soup;
+}
+
+Scene_polygon_soup_item* 
+Scene_polygon_soup_item::clone() const {
+  Scene_polygon_soup_item* new_soup = new Scene_polygon_soup_item();
+  new_soup->soup = soup->clone();
+  new_soup->oriented = oriented;
+  return new_soup;
+}
+
+
+bool
+Scene_polygon_soup_item::load(std::istream& in)
+{
+  if (!soup) soup=new Polygon_soup();
+  else soup->clear();
+
+    bool result = CGAL::read_OFF(in, soup->points, soup->polygons);
+    Q_EMIT invalidateOpenGLBuffers();
+    return result;
+}
+
+void Scene_polygon_soup_item::init_polygon_soup(std::size_t nb_pts, std::size_t nb_polygons){
+  if(!soup)
+    soup = new Polygon_soup;
+  soup->clear();
+  soup->points.reserve(nb_pts);
+  soup->polygons.reserve(nb_polygons);
+  oriented = false;
+}
+
+
+
+#include <CGAL/IO/generic_print_polyhedron.h>
+#include <iostream>
+
+void Scene_polygon_soup_item::load(Scene_polyhedron_item* poly_item) {
+  if(!poly_item) return;
+  if(!poly_item->polyhedron()) return;
+
+  if(!soup)
+    soup = new Polygon_soup;
+
+  Polyhedron_to_polygon_soup_writer writer(soup);
+  CGAL::generic_print_polyhedron(std::cerr,
+                                 *poly_item->polyhedron(),
+                                 writer);
+  Q_EMIT invalidateOpenGLBuffers();
+}
+
+void
+Scene_polygon_soup_item::setDisplayNonManifoldEdges(const bool b)
+{
+
+  soup->display_non_manifold_edges = b;
+}
+
+bool
+Scene_polygon_soup_item::displayNonManifoldEdges() const {
+
+  return soup->display_non_manifold_edges;
+}
+
+void Scene_polygon_soup_item::shuffle_orientations()
+{
+  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    if(std::rand() % 2 == 0) soup->inverse_orientation(i);
+  }
+  invalidateOpenGLBuffers();
+}
+
+void Scene_polygon_soup_item::inside_out()
+{
+  for(Polygon_soup::size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    soup->inverse_orientation(i);
+  }
+  invalidateOpenGLBuffers();
+}
+
+bool 
+Scene_polygon_soup_item::orient()
+{
+
+  if(isEmpty() || this->oriented)
+    return true; // nothing to do
+  oriented=true;
+
+  //first skip degenerate polygons
+  Polygon_soup::Polygons valid_polygons;
+  valid_polygons.reserve(soup->polygons.size());
+  BOOST_FOREACH(Polygon_soup::Polygon_3& polygon, soup->polygons)
+  {
+    std::set<std::size_t> vids;
+    bool to_remove=false;
+    BOOST_FOREACH(std::size_t id, polygon)
+    {
+      if (!vids.insert(id).second){
+        to_remove=true;
+        break;
+      }
+    }
+    if (!to_remove) valid_polygons.push_back(polygon);
+  }
+  if (valid_polygons.size()!=soup->polygons.size())
+    soup->polygons.swap(valid_polygons);
+
+  return CGAL::Polygon_mesh_processing::
+    orient_polygon_soup(soup->points, soup->polygons);
+}
+
+
+bool 
+Scene_polygon_soup_item::save(std::ostream& out) const
+{
+
+  typedef Polygon_soup::size_type size_type;
+  CGAL::File_writer_OFF writer;
+  writer.write_header(out,
+                      soup->points.size(),
+                      0,
+                      soup->polygons.size());
+  for(size_type i = 0, end = soup->points.size();
+      i < end; ++i)
+  {
+    const Point_3& p = soup->points[i];
+    writer.write_vertex( p.x(), p.y(), p.z() );
+  }
+  writer.write_facet_header();
+  for(size_type i = 0, end = soup->polygons.size();
+      i < end; ++i)
+  {
+    const Polygon_soup::Polygon_3& polygon = soup->polygons[i]; 
+    const size_type size = polygon.size();
+    writer.write_facet_begin(size);
+    for(size_type j = 0; j < size; ++j) {
+      writer.write_facet_vertex_index(polygon[j]);
+    }
+    writer.write_facet_end();
+  }
+  writer.write_footer();
+
+  return (bool) out;
+}
+
+bool 
+Scene_polygon_soup_item::exportAsPolyhedron(Polyhedron* out_polyhedron)
+{
+  orient();
+  CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh<Polyhedron>(
+    soup->points, soup->polygons, *out_polyhedron);
+  std::size_t rv = CGAL::Polygon_mesh_processing::remove_isolated_vertices(*out_polyhedron);
+  if(rv > 0)
+    std::cerr << "Ignore isolated vertices: " << rv << std::endl;
+  if(out_polyhedron->size_of_vertices() > 0) {
+    // Also check whether the consistent orientation is fine
+    if(out_polyhedron->is_closed() &&
+       !CGAL::Polygon_mesh_processing::is_outward_oriented(*out_polyhedron)) {
+      out_polyhedron->inside_out();
+    }
+    return true;
+  }
+  return false;
+}
+QString 
+Scene_polygon_soup_item::toolTip() const
+{
+
+  if(!soup)
+    return QString();
+
+  QString str = QObject::tr("<p><b>%1</b> (mode: %5, color: %6)<br />"
+                     "<i>Polygons soup</i></p>"
+                     "<p>Number of vertices: %2<br />"
+                     "Number of polygons: %3</p>")
+    .arg(this->name())
+    .arg(soup->points.size())
+    .arg(soup->polygons.size())
+    .arg(this->renderingModeName())
+    .arg(this->color().name());
+    str += QString("<br />Number of isolated vertices : %1<br />").arg(getNbIsolatedvertices());
+    return str;
+}
+
+void
+Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+     compute_normals_and_vertices();
+     initialize_buffers(viewer);
+    }
+    if(soup == 0) return;
+    //Calls the buffer info again so that it's the right one used even if
+    //there are several objects drawn
+    vaos[Facets]->bind();
+    attrib_buffers(viewer,PROGRAM_WITH_LIGHT);
+    //fills the arraw of colors with the current color
+
+    QColor v_colors = this->color();
+    // tells the GPU to use the program just created
+    program = getShaderProgram(PROGRAM_WITH_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors", v_colors);
+    //draw the polygons
+    // the third argument is the number of vec4 that will be entered
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_polys/4));
+    // Clean-up
+    program->release();
+    vaos[Facets]->release();
+  }
+
+void
+Scene_polygon_soup_item::draw_points(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+      compute_normals_and_vertices();
+      initialize_buffers(viewer);
+    }
+    if(soup == 0) return;
+    vaos[Edges]->bind();
+    attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    QColor color = this->color();
+    program->setAttributeValue("colors", color);
+    //draw the points
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_lines/4));
+    // Clean-up
+    program->release();
+    vaos[Edges]->release();
+}
+
+void
+Scene_polygon_soup_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+  {
+     compute_normals_and_vertices();
+     initialize_buffers(viewer);
+  }
+    if(soup == 0) return;
+    vaos[Edges]->bind();
+    attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    QColor color = this->color().lighter(120);
+
+    program->setAttributeValue("colors", color);
+    //draw the edges
+    viewer->glDrawArrays(GL_LINES, 0,static_cast<GLsizei>( nb_lines/4));
+    // Clean-up
+    program->release();
+    vaos[Edges]->release();
+    if(displayNonManifoldEdges())
+    {
+        vaos[NM_Edges]->bind();
+        attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT);
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+        program->bind();
+        QColor c = QColor(255,0,0,255);
+
+        program->setAttributeValue("colors", c);
+        //draw the edges
+        viewer->glDrawArrays(GL_LINES, 0,static_cast<GLsizei>( nb_nm_edges/4));
+        // Clean-up
+        program->release();
+        vaos[NM_Edges]->release();
+    }
+
+}
+
+bool
+Scene_polygon_soup_item::isEmpty() const {
+
+  return (soup == 0 || soup->points.empty());
+}
+void
+Scene_polygon_soup_item::invalidateOpenGLBuffers()
+{
+    are_buffers_filled = false;
+    compute_bbox();
+}
+
+void Scene_polygon_soup_item::compute_bbox() const {
+
+  if (isEmpty())
+    return;
+  const Point_3& p = *(soup->points.begin());
+  CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+  for(Polygon_soup::Points::const_iterator it = soup->points.begin();
+      it != soup->points.end();
+      ++it) {
+    bbox = bbox + it->bbox();
+  }
+  _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+              bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+void 
+Scene_polygon_soup_item::new_vertex(const double& x,
+                                    const double& y,
+                                    const double& z)
+{
+
+    soup->points.push_back(Point_3(x, y, z));
+}
+                               
+void 
+Scene_polygon_soup_item::new_triangle(const std::size_t i,
+                                      const std::size_t j,
+                                      const std::size_t k)
+{
+
+  Polygon_soup::Polygon_3 new_polygon(3);
+  new_polygon[0] = i;
+  new_polygon[1] = j;
+  new_polygon[2] = k;
+  soup->polygons.push_back(new_polygon);
+}
+                               
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.h
new file mode 100644
index 0000000..8c3aa20
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item.h
@@ -0,0 +1,202 @@
+#ifndef SCENE_POLYGON_SOUP_ITEM_H
+#define SCENE_POLYGON_SOUP_ITEM_H
+#include "Scene_polygon_soup_item_config.h"
+#include  <CGAL/Three/Scene_item.h>
+#include "Viewer.h"
+#include "Polyhedron_type.h"
+
+#include <boost/foreach.hpp>
+#include <boost/array.hpp>
+
+#include <iostream>
+
+
+struct Polygon_soup
+{
+    typedef Kernel::Point_3 Point_3;
+    typedef std::vector<Point_3> Points;
+    //vector containing 3 indices of points in Points
+    typedef std::vector<std::size_t> Polygon_3;
+    //vector containing a pair of indices of points in Points and a set of indices of Polygons
+    //containing the edge.
+    typedef std::map<std::pair<std::size_t, std::size_t>, std::set<std::size_t> > Edges_map;
+    typedef boost::array<std::size_t, 2> Edge;
+    typedef std::vector<Polygon_3> Polygons;
+    typedef std::set<Edge> Edges;
+    typedef Polygons::size_type size_type;
+    Points points;
+    Polygons polygons;
+    Edges_map edges;
+    Edges non_manifold_edges;
+    bool display_non_manifold_edges;
+
+    Polygon_soup():
+        display_non_manifold_edges(false){}
+
+    Polygon_soup* clone() const {
+        Polygon_soup* result = new Polygon_soup();
+        result->points = points;
+        result->polygons = polygons;
+        result->edges = edges;
+        result->non_manifold_edges = non_manifold_edges;
+        result->display_non_manifold_edges = display_non_manifold_edges;
+        return result;
+    }
+
+    void clear() {
+        points.clear();
+        polygons.clear();
+        edges.clear();
+        non_manifold_edges.clear();
+    }
+
+    void fill_edges() {
+        // Fill edges
+        edges.clear();
+        for(size_type i = 0; i < polygons.size(); ++i)
+        {
+            const size_type size = polygons[i].size();
+            for(size_type j = 0; j < size; ++j) {
+                const std::size_t& i0 = polygons[i][j];
+                const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
+                edges[std::make_pair(i0, i1)].insert(i);
+                //         qDebug() << tr("edges[std::make_pair(%1, %2)].insert(%3). Size=%4")
+                //           .arg(i0).arg(i1).arg(i).arg(edges[std::make_pair(i0, i1)].size());
+            }
+        }
+
+        // Fill non-manifold edges
+        non_manifold_edges.clear();
+        for(size_type i = 0; i < polygons.size(); ++i)
+        {
+            const size_type size = polygons[i].size();
+            for(size_type j = 0; j < size; ++j) {
+                const std::size_t& i0 = polygons[i][j];
+                const std::size_t& i1 = polygons[i][ j+1 < size ? j+1: 0];
+
+                if(edges[std::make_pair(i0, i1)].size() +
+                         edges[std::make_pair(i1, i0)].size() > 2)
+                {
+                    Edge edge;
+                    edge[0] = i0;
+                    edge[1] = i1;
+                    if(i0 > i1) std::swap(edge[0], edge[1]);
+                    non_manifold_edges.insert(edge);
+
+                }
+            }
+        }
+    }
+
+    void inverse_orientation(const std::size_t index) {
+        std::reverse(polygons[index].begin(), polygons[index].end());
+    }
+};
+
+
+class Scene_polyhedron_item;
+
+class SCENE_POLYGON_SOUP_ITEM_EXPORT Scene_polygon_soup_item 
+        : public CGAL::Three::Scene_item
+{
+    typedef Kernel::Point_3 Point_3;
+
+    Q_OBJECT
+public:  
+    Scene_polygon_soup_item();
+    ~Scene_polygon_soup_item();
+
+    Scene_polygon_soup_item* clone() const;
+    bool load(std::istream& in);
+    void load(Scene_polyhedron_item*);
+
+    template <class Point, class Polygon>
+    inline void load(const std::vector<Point>& points, const std::vector<Polygon>& polygons)
+    {
+        if(!soup)
+            soup = new Polygon_soup;
+        soup->clear();
+
+        /// add points
+        soup->points.reserve(points.size());
+        BOOST_FOREACH(const Point& p, points)
+                soup->points.push_back( Point_3(p[0], p[1], p[2]) );
+
+        /// add polygons
+        std::size_t nb_polygons=polygons.size();
+        soup->polygons.resize(nb_polygons);
+        for(std::size_t i=0; i<nb_polygons; ++i)
+            soup->polygons[i].assign(polygons[i].begin(), polygons[i].end());
+
+        /// fill non-manifold edges container
+        //soup->fill_edges();
+        oriented = false;
+
+        Q_EMIT invalidateOpenGLBuffers();
+    }
+
+    bool save(std::ostream& out) const;
+
+    QString toolTip() const;
+
+    // Indicate if rendering mode is supported
+    virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS!
+    // OpenGL drawing in a display list
+    virtual void draw() const {}
+    virtual void draw(CGAL::Three::Viewer_interface*) const;
+    virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+    virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+    void invalidateOpenGLBuffers();
+    bool isFinite() const { return true; }
+    bool isEmpty() const;
+    void compute_bbox() const;
+
+    void new_vertex(const double&, const double&, const double&);
+    void new_triangle(const std::size_t, const std::size_t, const std::size_t);
+
+    void init_polygon_soup(std::size_t nb_pts, std::size_t nb_polygons);
+
+public Q_SLOTS:
+    void shuffle_orientations();
+    bool orient();
+    bool exportAsPolyhedron(Polyhedron*);
+    void inside_out();
+
+    void setDisplayNonManifoldEdges(const bool);
+    bool displayNonManifoldEdges() const;
+
+private:
+    typedef Polygon_soup::Polygons::const_iterator Polygons_iterator;
+    Polygon_soup* soup;
+    bool oriented;
+
+    enum VAOs {
+        Facets=0,
+        Edges,
+        NM_Edges,
+        NbOfVaos = NM_Edges+1
+    };
+    enum VBOs {
+        Facets_vertices = 0,
+        Facets_normals,
+        Edges_vertices,
+        NM_Edges_vertices,
+        NbOfVbos = NM_Edges_vertices+1
+    };
+
+    mutable std::vector<float> positions_poly;
+    mutable std::vector<float> positions_lines;
+    mutable std::vector<float> normals;
+    mutable std::vector<float> positions_nm_lines;
+    mutable std::size_t nb_nm_edges;
+    mutable std::size_t nb_polys;
+    mutable std::size_t nb_lines;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+    void compute_normals_and_vertices(void) const;
+    void triangulate_polygon(Polygons_iterator ) const;
+    mutable QOpenGLShaderProgram *program;
+
+}; // end class Scene_polygon_soup_item
+
+#endif // SCENE_POLYGON_SOUP_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polygon_soup_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polygon_soup_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.cpp
new file mode 100644
index 0000000..dc0a452
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.cpp
@@ -0,0 +1,1278 @@
+#include "Scene_polyhedron_item.h"
+#include <CGAL/AABB_intersections.h>
+#include "Kernel_type.h"
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <CGAL/Polygon_mesh_processing/measure.h>
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+#include <CGAL/Polygon_mesh_processing/repair.h>
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
+#include <CGAL/property_map.h>
+#include <CGAL/statistics_helpers.h>
+
+#include <list>
+#include <queue>
+#include <iostream>
+#include <limits>
+
+#include <QVariant>
+#include <QDebug>
+#include <QDialog>
+
+#include <boost/foreach.hpp>
+#include <boost/container/flat_map.hpp>
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+
+typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
+typedef CGAL::AABB_tree<AABB_traits> Input_facets_AABB_tree;
+const char* aabb_property_name = "Scene_polyhedron_item aabb tree";
+
+Input_facets_AABB_tree* get_aabb_tree(Scene_polyhedron_item* item)
+{
+    QVariant aabb_tree_property = item->property(aabb_property_name);
+    if(aabb_tree_property.isValid()) {
+        void* ptr = aabb_tree_property.value<void*>();
+        return static_cast<Input_facets_AABB_tree*>(ptr);
+    }
+    else {
+        Polyhedron* poly = item->polyhedron();
+        if(poly) {
+            Input_facets_AABB_tree* tree =
+                    new Input_facets_AABB_tree(faces(*poly).first,
+                                               faces(*poly).second,
+                                               *poly);
+            item->setProperty(aabb_property_name,
+                              QVariant::fromValue<void*>(tree));
+            return tree;
+        }
+        else return 0;
+    }
+}
+
+void delete_aabb_tree(Scene_polyhedron_item* item)
+{
+    QVariant aabb_tree_property = item->property(aabb_property_name);
+    if(aabb_tree_property.isValid()) {
+        void* ptr = aabb_tree_property.value<void*>();
+        Input_facets_AABB_tree* tree = static_cast<Input_facets_AABB_tree*>(ptr);
+        if(tree) {
+            delete tree;
+            tree = 0;
+        }
+        item->setProperty(aabb_property_name, QVariant());
+    }
+}
+
+template<typename TypeWithXYZ, typename ContainerWithPushBack>
+void push_back_xyz(const TypeWithXYZ& t,
+                   ContainerWithPushBack& vector)
+{
+  vector.push_back(t.x());
+  vector.push_back(t.y());
+  vector.push_back(t.z());
+}
+
+typedef Polyhedron::Traits Traits;
+typedef Polyhedron::Facet Facet;
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits>   P_traits;
+typedef Polyhedron::Halfedge_handle Halfedge_handle;
+struct Face_info {
+    Polyhedron::Halfedge_handle e[3];
+    bool is_external;
+};
+typedef CGAL::Triangulation_vertex_base_with_info_2<Halfedge_handle,
+P_traits>        Vb;
+typedef CGAL::Triangulation_face_base_with_info_2<Face_info,
+P_traits>          Fb1;
+typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>   Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                  TDS;
+typedef CGAL::No_intersection_tag                                    Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits,
+TDS,
+Itag>             CDTbase;
+typedef CGAL::Constrained_triangulation_plus_2<CDTbase>              CDT;
+
+//Make sure all the facets are triangles
+
+template<typename FaceNormalPmap, typename VertexNormalPmap>
+void
+Scene_polyhedron_item::triangulate_facet(Facet_iterator fit,
+                                         const FaceNormalPmap& fnmap,
+                                         const VertexNormalPmap& vnmap,
+                                         const bool colors_only) const
+{
+    //Computes the normal of the facet
+    Traits::Vector_3 normal = get(fnmap, fit);
+
+    //check if normal contains NaN values
+    if (normal.x() != normal.x() || normal.y() != normal.y() || normal.z() != normal.z())
+    {
+        qDebug()<<"Warning : normal is not valid. Facet not displayed";
+        return;
+    }
+    P_traits cdt_traits(normal);
+    CDT cdt(cdt_traits);
+
+    Facet::Halfedge_around_facet_circulator
+            he_circ = fit->facet_begin(),
+            he_circ_end(he_circ);
+
+    // Iterates on the vector of facet handles
+    typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
+    boost::container::flat_map<CDT::Vertex_handle, vertex_descriptor> v2v;
+    CDT::Vertex_handle previous, first;
+    do {
+        CDT::Vertex_handle vh = cdt.insert(he_circ->vertex()->point());
+        v2v.insert(std::make_pair(vh, he_circ->vertex()));
+        if(first == 0) {
+            first = vh;
+        }
+        vh->info() = he_circ;
+        if(previous != 0 && previous != vh) {
+            cdt.insert_constraint(previous, vh);
+        }
+        previous = vh;
+    } while( ++he_circ != he_circ_end );
+    cdt.insert_constraint(previous, first);
+    // sets mark is_external
+    for(CDT::All_faces_iterator
+        fit2 = cdt.all_faces_begin(),
+        end = cdt.all_faces_end();
+        fit2 != end; ++fit2)
+    {
+        fit2->info().is_external = false;
+    }
+    //check if the facet is external or internal
+    std::queue<CDT::Face_handle> face_queue;
+    face_queue.push(cdt.infinite_vertex()->face());
+    while(! face_queue.empty() ) {
+        CDT::Face_handle fh = face_queue.front();
+        face_queue.pop();
+        if(fh->info().is_external) continue;
+        fh->info().is_external = true;
+        for(int i = 0; i <3; ++i) {
+            if(!cdt.is_constrained(std::make_pair(fh, i)))
+            {
+                face_queue.push(fh->neighbor(i));
+            }
+        }
+    }
+    //iterates on the internal faces to add the vertices to the positions
+    //and the normals to the appropriate vectors
+    const int this_patch_id = fit->patch_id();
+    for(CDT::Finite_faces_iterator
+        ffit = cdt.finite_faces_begin(),
+        end = cdt.finite_faces_end();
+        ffit != end; ++ffit)
+    {
+        if(ffit->info().is_external)
+            continue;
+
+        if (!is_monochrome)
+        {
+          for (int i = 0; i<3; ++i)
+          {
+            color_facets.push_back(colors_[this_patch_id].redF());
+            color_facets.push_back(colors_[this_patch_id].greenF());
+            color_facets.push_back(colors_[this_patch_id].blueF());
+
+            color_facets.push_back(colors_[this_patch_id].redF());
+            color_facets.push_back(colors_[this_patch_id].greenF());
+            color_facets.push_back(colors_[this_patch_id].blueF());
+          }
+        }
+        if (colors_only)
+          continue;
+
+        push_back_xyz(ffit->vertex(0)->point(), positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(ffit->vertex(1)->point(), positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(ffit->vertex(2)->point(), positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(normal, normals_flat);
+        push_back_xyz(normal, normals_flat);
+        push_back_xyz(normal, normals_flat);
+
+        Traits::Vector_3 ng = get(vnmap, v2v[ffit->vertex(0)]);
+        push_back_xyz(ng, normals_gouraud);
+
+        ng = get(vnmap, v2v[ffit->vertex(1)]);
+        push_back_xyz(ng, normals_gouraud);
+
+        ng = get(vnmap, v2v[ffit->vertex(2)]);
+        push_back_xyz(ng, normals_gouraud);
+    }
+}
+
+
+#include <QObject>
+#include <QMenu>
+#include <QAction>
+
+
+void
+Scene_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer) const
+{
+    //vao containing the data for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+        //flat
+        vaos[Facets]->bind();
+        buffers[Facets_vertices].bind();
+        buffers[Facets_vertices].allocate(positions_facets.data(),
+                            static_cast<int>(positions_facets.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Facets_vertices].release();
+
+
+
+        buffers[Facets_normals_flat].bind();
+        buffers[Facets_normals_flat].allocate(normals_flat.data(),
+                            static_cast<int>(normals_flat.size()*sizeof(float)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+        buffers[Facets_normals_flat].release();
+
+        if(!is_monochrome)
+        {
+            buffers[Facets_color].bind();
+            buffers[Facets_color].allocate(color_facets.data(),
+                                static_cast<int>(color_facets.size()*sizeof(float)));
+            program->enableAttributeArray("colors");
+            program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+            buffers[Facets_color].release();
+        }
+        vaos[Facets]->release();
+        //gouraud
+        vaos[Gouraud_Facets]->bind();
+        buffers[Facets_vertices].bind();
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Facets_vertices].release();
+
+        buffers[Facets_normals_gouraud].bind();
+        buffers[Facets_normals_gouraud].allocate(normals_gouraud.data(),
+                            static_cast<int>(normals_gouraud.size()*sizeof(float)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+        buffers[Facets_normals_gouraud].release();
+        if(!is_monochrome)
+        {
+            buffers[Facets_color].bind();
+            program->enableAttributeArray("colors");
+            program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+            buffers[Facets_color].release();
+        }
+        else
+        {
+            program->disableAttributeArray("colors");
+        }
+        vaos[Gouraud_Facets]->release();
+
+        program->release();
+
+    }
+    //vao containing the data for the lines
+    {
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer);
+        program->bind();
+        vaos[Edges]->bind();
+
+        buffers[Edges_vertices].bind();
+        buffers[Edges_vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Edges_vertices].release();
+
+        buffers[Edges_color].bind();
+        buffers[Edges_color].allocate(color_lines.data(),
+                            static_cast<int>(color_lines.size()*sizeof(float)));
+       if(!is_monochrome)
+       {
+           program->enableAttributeArray("colors");
+           program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+           buffers[Edges_color].release();
+       }
+       else
+       {
+           program->disableAttributeArray("colors");
+       }
+        program->release();
+
+        vaos[Edges]->release();
+
+    }
+  //vao containing the data for the feature_edges
+  {
+      program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+      program->bind();
+      vaos[Feature_edges]->bind();
+
+      buffers[Feature_edges_vertices].bind();
+      buffers[Feature_edges_vertices].allocate(positions_feature_lines.data(),
+                          static_cast<int>(positions_feature_lines.size()*sizeof(float)));
+      program->enableAttributeArray("vertex");
+      program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+      buffers[Feature_edges_vertices].release();
+      program->disableAttributeArray("colors");
+      program->release();
+
+      vaos[Feature_edges]->release();
+
+  }
+    nb_f_lines = positions_feature_lines.size();
+    positions_feature_lines.resize(0);
+    std::vector<float>(positions_feature_lines).swap(positions_feature_lines);
+    nb_lines = positions_lines.size();
+    positions_lines.resize(0);
+    std::vector<float>(positions_lines).swap(positions_lines);
+    nb_facets = positions_facets.size();
+    positions_facets.resize(0);
+    std::vector<float>(positions_facets).swap(positions_facets);
+
+
+    color_lines.resize(0);
+    std::vector<float>(color_lines).swap(color_lines);
+    color_facets.resize(0);
+    std::vector<float>(color_facets).swap(color_facets);
+    normals_flat.resize(0);
+    std::vector<float>(normals_flat).swap(normals_flat);
+    normals_gouraud.resize(0);
+    std::vector<float>(normals_gouraud).swap(normals_gouraud);
+    are_buffers_filled = true;
+}
+
+void
+Scene_polyhedron_item::compute_normals_and_vertices(const bool colors_only) const
+{
+    positions_facets.resize(0);
+    positions_lines.resize(0);
+    positions_feature_lines.resize(0);
+    normals_flat.resize(0);
+    normals_gouraud.resize(0);
+    color_lines.resize(0);
+    color_facets.resize(0);
+
+    //Facets
+    typedef Polyhedron::Traits	    Kernel;
+    typedef Kernel::Point_3	    Point;
+    typedef Kernel::Vector_3	    Vector;
+    typedef Polyhedron::Facet_iterator Facet_iterator;
+    typedef Polyhedron::Halfedge_around_facet_circulator HF_circulator;
+    typedef boost::graph_traits<Polyhedron>::face_descriptor   face_descriptor;
+    typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
+
+    boost::container::flat_map<face_descriptor, Vector> face_normals_map;
+    boost::associative_property_map< boost::container::flat_map<face_descriptor, Vector> >
+      nf_pmap(face_normals_map);
+    boost::container::flat_map<vertex_descriptor, Vector> vertex_normals_map;
+    boost::associative_property_map< boost::container::flat_map<vertex_descriptor, Vector> >
+      nv_pmap(vertex_normals_map);
+
+    PMP::compute_normals(*poly, nv_pmap, nf_pmap);
+
+    Facet_iterator f = poly->facets_begin();
+    for(f = poly->facets_begin();
+        f != poly->facets_end();
+        f++)
+    {
+      if (f == boost::graph_traits<Polyhedron>::null_face())
+        continue;
+
+      if(is_triangle(f->halfedge(),*poly))
+      {
+          const int this_patch_id = f->patch_id();
+          Vector n = get(nf_pmap, f);
+          HF_circulator he = f->facet_begin();
+          HF_circulator end = he;
+          CGAL_For_all(he,end)
+          {
+            if (!is_monochrome)
+            {
+              color_facets.push_back(colors_[this_patch_id].redF());
+              color_facets.push_back(colors_[this_patch_id].greenF());
+              color_facets.push_back(colors_[this_patch_id].blueF());
+            }
+            if (colors_only)
+              continue;
+
+            // If Flat shading:1 normal per polygon added once per vertex
+            push_back_xyz(n, normals_flat);
+
+            //// If Gouraud shading: 1 normal per vertex
+            Vector nv = get(nv_pmap, he->vertex());
+            push_back_xyz(nv, normals_gouraud);
+
+            //position
+            const Point& p = he->vertex()->point();
+            push_back_xyz(p, positions_facets);
+            positions_facets.push_back(1.0);
+         }
+      }
+      else if (is_quad(f->halfedge(), *poly))
+      {
+        if (!is_monochrome)
+        {
+          const int this_patch_id = f->patch_id();
+          for (unsigned int i = 0; i < 6; ++i)
+          { //6 "halfedges" for the quad, because it is 2 triangles
+            color_facets.push_back(colors_[this_patch_id].redF());
+            color_facets.push_back(colors_[this_patch_id].greenF());
+            color_facets.push_back(colors_[this_patch_id].blueF());
+          }
+        }
+        if (colors_only)
+          continue;
+
+        Vector nf = get(nf_pmap, f);
+
+        //1st half-quad
+        Point p0 = f->halfedge()->vertex()->point();
+        Point p1 = f->halfedge()->next()->vertex()->point();
+        Point p2 = f->halfedge()->next()->next()->vertex()->point();
+
+        push_back_xyz(p0, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(p1, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(p2, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(nf, normals_flat);
+        push_back_xyz(nf, normals_flat);
+        push_back_xyz(nf, normals_flat);
+
+        Vector nv = get(nv_pmap, f->halfedge()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+
+        nv = get(nv_pmap, f->halfedge()->next()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+
+        nv = get(nv_pmap, f->halfedge()->next()->next()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+
+        //2nd half-quad
+        p0 = f->halfedge()->next()->next()->vertex()->point();
+        p1 = f->halfedge()->prev()->vertex()->point();
+        p2 = f->halfedge()->vertex()->point();
+
+        push_back_xyz(p0, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(p1, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(p2, positions_facets);
+        positions_facets.push_back(1.0);
+
+        push_back_xyz(nf, normals_flat);
+        push_back_xyz(nf, normals_flat);
+        push_back_xyz(nf, normals_flat);
+
+        nv = get(nv_pmap, f->halfedge()->next()->next()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+
+        nv = get(nv_pmap, f->halfedge()->prev()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+
+        nv = get(nv_pmap, f->halfedge()->vertex());
+        push_back_xyz(nv, normals_gouraud);
+      }
+      else
+      {
+        triangulate_facet(f, nf_pmap, nv_pmap, colors_only);
+      }
+
+    }
+    //Lines
+    typedef Kernel::Point_3		Point;
+    typedef Polyhedron::Edge_iterator	Edge_iterator;
+    Edge_iterator he;
+    for(he = poly->edges_begin();
+        he != poly->edges_end();
+        he++)
+    {
+        const Point& a = he->vertex()->point();
+        const Point& b = he->opposite()->vertex()->point();
+        if ( he->is_feature_edge())
+        {
+          if (colors_only)
+            continue;
+
+          push_back_xyz(a, positions_feature_lines);
+          positions_feature_lines.push_back(1.0);
+
+          push_back_xyz(b, positions_feature_lines);
+          positions_feature_lines.push_back(1.0);
+        }
+        else
+        {
+          if (!is_monochrome)
+          {
+            color_lines.push_back(this->color().lighter(50).redF());
+            color_lines.push_back(this->color().lighter(50).greenF());
+            color_lines.push_back(this->color().lighter(50).blueF());
+
+            color_lines.push_back(this->color().lighter(50).redF());
+            color_lines.push_back(this->color().lighter(50).greenF());
+            color_lines.push_back(this->color().lighter(50).blueF());
+          }
+          if (colors_only)
+            continue;
+
+          push_back_xyz(a, positions_lines);
+          positions_lines.push_back(1.0);
+
+          push_back_xyz(b, positions_lines);
+          positions_lines.push_back(1.0);
+        }
+    }
+}
+
+Scene_polyhedron_item::Scene_polyhedron_item()
+    : Scene_item(NbOfVbos,NbOfVaos),
+      poly(new Polyhedron),
+      show_only_feature_edges_m(false),
+      show_feature_edges_m(false),
+      facet_picking_m(false),
+      erase_next_picked_facet_m(false),
+      plugin_has_set_color_vector_m(false)
+{
+    cur_shading=FlatPlusEdges;
+    is_selected = true;
+    nb_facets = 0;
+    nb_lines = 0;
+    nb_f_lines = 0;
+    init();
+}
+
+Scene_polyhedron_item::Scene_polyhedron_item(Polyhedron* const p)
+    : Scene_item(NbOfVbos,NbOfVaos),
+      poly(p),
+      show_only_feature_edges_m(false),
+      show_feature_edges_m(false),
+      facet_picking_m(false),
+      erase_next_picked_facet_m(false),
+      plugin_has_set_color_vector_m(false)
+{
+    cur_shading=FlatPlusEdges;
+    is_selected = true;
+    nb_facets = 0;
+    nb_lines = 0;
+    nb_f_lines = 0;
+    init();
+    invalidateOpenGLBuffers();
+}
+
+Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p)
+    : Scene_item(NbOfVbos,NbOfVaos),
+      poly(new Polyhedron(p)),
+      show_only_feature_edges_m(false),
+      show_feature_edges_m(false),
+      facet_picking_m(false),
+      erase_next_picked_facet_m(false),
+      plugin_has_set_color_vector_m(false)
+{
+    //setItemIsMulticolor(true);
+    cur_shading=FlatPlusEdges;
+    is_selected=true;
+    init();
+    nb_facets = 0;
+    nb_lines = 0;
+    nb_f_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+Scene_polyhedron_item::~Scene_polyhedron_item()
+{
+    delete_aabb_tree(this);
+    delete poly;
+}
+
+#include "Color_map.h"
+
+void
+Scene_polyhedron_item::
+init()
+{
+  typedef Polyhedron::Facet_iterator Facet_iterator;
+
+  if ( !plugin_has_set_color_vector_m )
+  {
+    // Fill indices map and get max subdomain value
+    int max = 0;
+    for(Facet_iterator fit = poly->facets_begin(), end = poly->facets_end() ;
+        fit != end; ++fit)
+    {
+      max = (std::max)(max, fit->patch_id());
+    }
+
+    colors_.resize(0);
+    compute_color_map(this->color(), max + 1,
+                      std::back_inserter(colors_));
+  }
+  invalidate_stats();
+}
+
+void
+Scene_polyhedron_item::
+invalidate_stats()
+{
+  number_of_degenerated_faces = (unsigned int)(-1);
+  number_of_null_length_edges = (unsigned int)(-1);
+  volume = -std::numeric_limits<double>::infinity();
+  area = -std::numeric_limits<double>::infinity();
+  self_intersect = false;
+
+}
+
+Scene_polyhedron_item*
+Scene_polyhedron_item::clone() const {
+    return new Scene_polyhedron_item(*poly);}
+
+// Load polyhedron from .OFF file
+bool
+Scene_polyhedron_item::load(std::istream& in)
+{
+
+
+    in >> *poly;
+
+    if ( in && !isEmpty() )
+    {
+        invalidateOpenGLBuffers();
+        return true;
+    }
+    return false;
+}
+// Load polyhedron from .obj file
+bool
+Scene_polyhedron_item::load_obj(std::istream& in)
+{
+  typedef Polyhedron::Vertex::Point Point;
+  std::vector<Point> points;
+  std::vector<std::vector<std::size_t> > faces;
+  
+  Point p;
+  std::string line;
+  std::size_t i, j, k;
+  bool failed = false;
+  while(getline(in, line)){
+    if(line[0] == 'v'){
+      std::istringstream iss(line.substr(1));
+      iss >> p;
+      if(! iss) failed = true;
+      points.push_back(p);
+    } else if(line[0] == 'f'){
+      std::istringstream iss(line.substr(1));
+      iss >> i >> j >> k;
+      if(! iss) failed = true;
+      std::vector<std::size_t> face;
+      face.push_back(i-1);
+      face.push_back(j-1);
+      face.push_back(k-1);
+      faces.push_back(face);
+    }
+  }
+  if(CGAL::Polygon_mesh_processing::orient_polygon_soup(points,faces)){
+    CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh( points,faces,*poly);
+  }else{
+    std::cerr << "not orientable"<< std::endl;
+    return false;
+  }
+    if ( (! failed) && !isEmpty() )
+    {
+        invalidateOpenGLBuffers();
+        return true;
+    }
+    return false;
+}
+
+// Write polyhedron to .OFF file
+bool
+Scene_polyhedron_item::save(std::ostream& out) const
+{
+  out.precision(17);
+    out << *poly;
+    return (bool) out;
+}
+
+QString
+Scene_polyhedron_item::toolTip() const
+{
+    if(!poly)
+        return QString();
+
+  QString str =
+         QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
+                       "<p>Number of vertices: %2<br />"
+                       "Number of edges: %3<br />"
+                     "Number of facets: %4")
+            .arg(this->name())
+            .arg(poly->size_of_vertices())
+            .arg(poly->size_of_halfedges()/2)
+            .arg(poly->size_of_facets())
+            .arg(this->renderingModeName())
+            .arg(this->color().name());
+  str += QString("<br />Number of isolated vertices : %1<br />").arg(getNbIsolatedvertices());
+  return str;
+}
+
+QMenu* Scene_polyhedron_item::contextMenu()
+{
+  const char* prop_name = "Menu modified by Scene_polyhedron_item.";
+
+  QMenu* menu = Scene_item::contextMenu();
+
+  // Use dynamic properties:
+  // http://doc.qt.io/qt-5/qobject.html#property
+  bool menuChanged = menu->property(prop_name).toBool();
+
+  if(!menuChanged) {
+
+    QAction* actionShowOnlyFeatureEdges =
+        menu->addAction(tr("Show Only &Feature Edges"));
+    actionShowOnlyFeatureEdges->setCheckable(true);
+    actionShowOnlyFeatureEdges->setChecked(show_only_feature_edges_m);
+    actionShowOnlyFeatureEdges->setObjectName("actionShowOnlyFeatureEdges");
+    connect(actionShowOnlyFeatureEdges, SIGNAL(toggled(bool)),
+            this, SLOT(show_only_feature_edges(bool)));
+
+    QAction* actionShowFeatureEdges =
+        menu->addAction(tr("Show Feature Edges"));
+    actionShowFeatureEdges->setCheckable(true);
+    actionShowFeatureEdges->setChecked(show_feature_edges_m);
+    actionShowFeatureEdges->setObjectName("actionShowFeatureEdges");
+    connect(actionShowFeatureEdges, SIGNAL(toggled(bool)),
+            this, SLOT(show_feature_edges(bool)));
+
+    QAction* actionPickFacets =
+        menu->addAction(tr("Facets Picking"));
+    actionPickFacets->setCheckable(true);
+    actionPickFacets->setObjectName("actionPickFacets");
+    connect(actionPickFacets, SIGNAL(toggled(bool)),
+            this, SLOT(enable_facets_picking(bool)));
+
+    QAction* actionEraseNextFacet =
+        menu->addAction(tr("Erase Next Picked Facet"));
+    actionEraseNextFacet->setCheckable(true);
+    actionEraseNextFacet->setObjectName("actionEraseNextFacet");
+    connect(actionEraseNextFacet, SIGNAL(toggled(bool)),
+            this, SLOT(set_erase_next_picked_facet(bool)));
+    menu->setProperty(prop_name, true);
+  }
+
+  QAction* action = menu->findChild<QAction*>("actionShowOnlyFeatureEdges");
+  if(action) action->setChecked(show_only_feature_edges_m);
+  action = menu->findChild<QAction*>("actionShowFeatureEdges");
+  if(action) action->setChecked(show_feature_edges_m);
+  action = menu->findChild<QAction*>("actionPickFacets");
+  if(action) action->setChecked(facet_picking_m);
+  action = menu->findChild<QAction*>("actionEraseNextFacet");
+  if(action) action->setChecked(erase_next_picked_facet_m);
+  return menu;
+}
+
+void Scene_polyhedron_item::show_only_feature_edges(bool b)
+{
+    show_only_feature_edges_m = b;
+    invalidateOpenGLBuffers();
+    Q_EMIT itemChanged();
+}
+
+void Scene_polyhedron_item::show_feature_edges(bool b)
+{
+  show_feature_edges_m = b;
+  invalidateOpenGLBuffers();
+  Q_EMIT itemChanged();
+}
+
+void Scene_polyhedron_item::enable_facets_picking(bool b)
+{
+    facet_picking_m = b;
+}
+
+void Scene_polyhedron_item::set_erase_next_picked_facet(bool b)
+{
+    if(b) { facet_picking_m = true; } // automatically activate facet_picking
+    erase_next_picked_facet_m = b;
+}
+
+void Scene_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+        compute_bbox();
+    }
+
+    if(renderingMode() == Flat || renderingMode() == FlatPlusEdges)
+        vaos[Facets]->bind();
+    else
+    {
+        vaos[Gouraud_Facets]->bind();
+    }
+    attrib_buffers(viewer, PROGRAM_WITH_LIGHT);
+    program = getShaderProgram(PROGRAM_WITH_LIGHT);
+    program->bind();
+    if(is_monochrome)
+    {
+            program->setAttributeValue("colors", this->color());
+    }
+    if(is_selected)
+            program->setUniformValue("is_selected", true);
+    else
+            program->setUniformValue("is_selected", false);
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_facets/4));
+    program->release();
+    if(renderingMode() == Flat || renderingMode() == FlatPlusEdges)
+        vaos[Facets]->release();
+    else
+        vaos[Gouraud_Facets]->release();
+}
+
+// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    if (!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+        compute_bbox();
+    }
+
+    if(!show_only_feature_edges_m)
+    {
+        vaos[Edges]->bind();
+
+        attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+        program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+        program->bind();
+        //draw the edges
+        if(is_monochrome)
+        {
+            program->setAttributeValue("colors", this->color().lighter(50));
+            if(is_selected)
+                program->setUniformValue("is_selected", true);
+            else
+                program->setUniformValue("is_selected", false);
+        }
+        viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/4));
+        program->release();
+        vaos[Edges]->release();
+    }
+
+    //draw the feature edges
+    vaos[Feature_edges]->bind();
+    attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+    program = getShaderProgram(PROGRAM_NO_SELECTION);
+    program->bind();
+    if(show_feature_edges_m || show_only_feature_edges_m)
+        program->setAttributeValue("colors", Qt::red);
+    else
+    {
+        if(!is_selected)
+            program->setAttributeValue("colors", this->color().lighter(50));
+        else
+            program->setAttributeValue("colors",QColor(0,0,0));
+    }
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_f_lines/4));
+    program->release();
+    vaos[Feature_edges]->release();
+    }
+
+void
+Scene_polyhedron_item::draw_points(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+        compute_bbox();
+    }
+
+    vaos[Edges]->bind();
+    attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT);
+    program = getShaderProgram(PROGRAM_WITHOUT_LIGHT);
+    program->bind();
+    //draw the points
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_lines/4));
+    // Clean-up
+    program->release();
+    vaos[Edges]->release();
+}
+
+Polyhedron*
+Scene_polyhedron_item::polyhedron()       { return poly; }
+const Polyhedron*
+Scene_polyhedron_item::polyhedron() const { return poly; }
+
+bool
+Scene_polyhedron_item::isEmpty() const {
+    return (poly == 0) || poly->empty();
+}
+
+void Scene_polyhedron_item::compute_bbox() const {
+    const Kernel::Point_3& p = *(poly->points_begin());
+    CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+    for(Polyhedron::Point_iterator it = poly->points_begin();
+        it != poly->points_end();
+        ++it) {
+        bbox = bbox + it->bbox();
+    }
+    _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+                bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+
+
+void
+Scene_polyhedron_item::
+invalidateOpenGLBuffers()
+{
+  Q_EMIT item_is_about_to_be_changed();
+    delete_aabb_tree(this);
+    init();
+    Base::invalidateOpenGLBuffers();
+    are_buffers_filled = false;
+
+    invalidate_stats();
+}
+
+void
+Scene_polyhedron_item::selection_changed(bool p_is_selected)
+{
+    if(p_is_selected != is_selected)
+    {
+        is_selected = p_is_selected;
+    }
+
+}
+
+void
+Scene_polyhedron_item::setColor(QColor c)
+{
+  // reset patch ids
+  if (colors_.size()>2 || plugin_has_set_color_vector_m)
+  {
+    BOOST_FOREACH(Polyhedron::Facet_handle fh, faces(*poly))
+      fh->set_patch_id(1);
+    colors_[1]=c;
+  }
+  Scene_item::setColor(c);
+}
+
+void
+Scene_polyhedron_item::select(double orig_x,
+                              double orig_y,
+                              double orig_z,
+                              double dir_x,
+                              double dir_y,
+                              double dir_z)
+{
+    if(facet_picking_m) {
+        typedef Input_facets_AABB_tree Tree;
+        typedef Tree::Object_and_primitive_id Object_and_primitive_id;
+
+        Tree* aabb_tree = get_aabb_tree(this);
+        if(aabb_tree) {
+            const Kernel::Point_3 ray_origin(orig_x, orig_y, orig_z);
+            const Kernel::Vector_3 ray_dir(dir_x, dir_y, dir_z);
+            const Kernel::Ray_3 ray(ray_origin, ray_dir);
+            typedef std::list<Object_and_primitive_id> Intersections;
+            Intersections intersections;
+            aabb_tree->all_intersections(ray, std::back_inserter(intersections));
+            Intersections::iterator closest = intersections.begin();
+            if(closest != intersections.end()) {
+                const Kernel::Point_3* closest_point =
+                        CGAL::object_cast<Kernel::Point_3>(&closest->first);
+                for(Intersections::iterator
+                    it = boost::next(intersections.begin()),
+                    end = intersections.end();
+                    it != end; ++it)
+                {
+                    if(! closest_point) {
+                        closest = it;
+                    }
+                    else {
+                        const Kernel::Point_3* it_point =
+                                CGAL::object_cast<Kernel::Point_3>(&it->first);
+                        if(it_point &&
+                                (ray_dir * (*it_point - *closest_point)) < 0)
+                        {
+                            closest = it;
+                            closest_point = it_point;
+                        }
+                    }
+                }
+                if(closest_point) {
+                    Polyhedron::Facet_handle selected_fh = closest->second;
+
+                    // The computation of the nearest vertex may be costly.  Only
+                    // do it if some objects are connected to the signal
+                    // 'selected_vertex'.
+                    if(QObject::receivers(SIGNAL(selected_vertex(void*))) > 0)
+                    {
+                        Polyhedron::Halfedge_around_facet_circulator
+                                he_it = selected_fh->facet_begin(),
+                                around_end = he_it;
+
+                        Polyhedron::Vertex_handle v = he_it->vertex(), nearest_v = v;
+
+                        Kernel::FT sq_dist = CGAL::squared_distance(*closest_point,
+                                                                    v->point());
+                        while(++he_it != around_end) {
+                            v = he_it->vertex();
+                            Kernel::FT new_sq_dist = CGAL::squared_distance(*closest_point,
+                                                                            v->point());
+                            if(new_sq_dist < sq_dist) {
+                                sq_dist = new_sq_dist;
+                                nearest_v = v;
+                            }
+                        }
+                        //bottleneck
+            Q_EMIT selected_vertex((void*)(&*nearest_v));
+                    }
+
+                    if(QObject::receivers(SIGNAL(selected_edge(void*))) > 0
+                            || QObject::receivers(SIGNAL(selected_halfedge(void*))) > 0)
+                    {
+                        Polyhedron::Halfedge_around_facet_circulator
+                                he_it = selected_fh->facet_begin(),
+                                around_end = he_it;
+
+                        Polyhedron::Halfedge_handle nearest_h = he_it;
+                        Kernel::FT sq_dist = CGAL::squared_distance(*closest_point,
+                                                                    Kernel::Segment_3(he_it->vertex()->point(), he_it->opposite()->vertex()->point()));
+
+                        while(++he_it != around_end) {
+                            Kernel::FT new_sq_dist = CGAL::squared_distance(*closest_point,
+                                                                            Kernel::Segment_3(he_it->vertex()->point(), he_it->opposite()->vertex()->point()));
+                            if(new_sq_dist < sq_dist) {
+                                sq_dist = new_sq_dist;
+                                nearest_h = he_it;
+                            }
+                        }
+
+            Q_EMIT selected_halfedge((void*)(&*nearest_h));
+            Q_EMIT selected_edge((void*)(std::min)(&*nearest_h, &*nearest_h->opposite()));
+                    }
+
+          Q_EMIT selected_facet((void*)(&*selected_fh));
+                    if(erase_next_picked_facet_m) {
+                        polyhedron()->erase_facet(selected_fh->halfedge());
+                        polyhedron()->normalize_border();
+                        //set_erase_next_picked_facet(false);
+                        invalidateOpenGLBuffers();
+            Q_EMIT itemChanged();
+                    }
+                }
+            }
+        }
+    }
+    Base::select(orig_x, orig_y, orig_z, dir_x, dir_y, dir_z);
+}
+
+void Scene_polyhedron_item::update_vertex_indices()
+{
+    std::size_t id=0;
+    for (Polyhedron::Vertex_iterator vit = polyhedron()->vertices_begin(),
+         vit_end = polyhedron()->vertices_end(); vit != vit_end; ++vit)
+    {
+        vit->id()=id++;
+    }
+}
+void Scene_polyhedron_item::update_facet_indices()
+{
+    std::size_t id=0;
+    for (Polyhedron::Facet_iterator  fit = polyhedron()->facets_begin(),
+         fit_end = polyhedron()->facets_end(); fit != fit_end; ++fit)
+    {
+        fit->id()=id++;
+    }
+}
+void Scene_polyhedron_item::update_halfedge_indices()
+{
+    std::size_t id=0;
+    for (Polyhedron::Halfedge_iterator hit = polyhedron()->halfedges_begin(),
+         hit_end = polyhedron()->halfedges_end(); hit != hit_end; ++hit)
+    {
+        hit->id()=id++;
+    }
+}
+void Scene_polyhedron_item::invalidate_aabb_tree()
+{
+  delete_aabb_tree(this);
+}
+QString Scene_polyhedron_item::compute_stats(int type)
+{
+  double minl, maxl, meanl, midl;
+  switch (type)
+  {
+  case MIN_LENGTH:
+  case MAX_LENGTH:
+  case MID_LENGTH:
+  case MEAN_LENGTH:
+  case NB_NULL_LENGTH:
+    poly->normalize_border();
+    edges_length(poly, minl, maxl, meanl, midl, number_of_null_length_edges);
+  }
+
+  double mini, maxi, ave;
+  switch (type)
+  {
+  case MIN_ANGLE:
+  case MAX_ANGLE:
+  case MEAN_ANGLE:
+    angles(poly, mini, maxi, ave);
+  }
+
+  switch(type)
+  {
+  case NB_VERTICES:
+    return QString::number(poly->size_of_vertices());
+
+  case NB_FACETS:
+    return QString::number(poly->size_of_facets());
+  
+  case NB_CONNECTED_COMPOS:
+  {
+    typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
+    int i = 0;
+    BOOST_FOREACH(face_descriptor f, faces(*poly)){
+      f->id() = i++;
+    }
+    boost::vector_property_map<int,
+      boost::property_map<Polyhedron, boost::face_index_t>::type>
+      fccmap(get(boost::face_index, *poly));
+    return QString::number(PMP::connected_components(*poly, fccmap));
+  }
+  case NB_BORDER_EDGES:
+    poly->normalize_border();
+    return QString::number(poly->size_of_border_halfedges());
+
+  case NB_EDGES:
+    return QString::number(poly->size_of_halfedges() / 2);
+
+  case NB_DEGENERATED_FACES:
+  {
+    if (poly->is_pure_triangle())
+    {
+      if (number_of_degenerated_faces == (unsigned int)(-1))
+        number_of_degenerated_faces = nb_degenerate_faces(poly, get(CGAL::vertex_point, *poly));
+      return QString::number(number_of_degenerated_faces);
+    }
+    else
+      return QString("n/a");
+  }
+  case AREA:
+  {
+    if (poly->is_pure_triangle())
+    {
+      if(area == -std::numeric_limits<double>::infinity())
+        area = CGAL::Polygon_mesh_processing::area(*poly);
+      return QString::number(area);
+    }
+    else
+      return QString("n/a");
+  }
+  case VOLUME:
+  {
+    if (poly->is_pure_triangle() && poly->is_closed())
+    {
+      if (volume == -std::numeric_limits<double>::infinity())
+        volume = CGAL::Polygon_mesh_processing::volume(*poly);
+      return QString::number(volume);
+    }
+    else
+      return QString("n/a");
+  }
+  case SELFINTER:
+  {
+    //todo : add a test about cache validity
+    if (poly->is_pure_triangle())
+      self_intersect = CGAL::Polygon_mesh_processing::does_self_intersect(*poly);
+    if (self_intersect)
+      return QString("Yes");
+    else if (poly->is_pure_triangle())
+      return QString("No");
+    else
+      return QString("n/a");
+  }
+  case MIN_LENGTH:
+    return QString::number(minl);
+  case MAX_LENGTH:
+    return QString::number(maxl);
+  case MID_LENGTH:
+    return QString::number(midl);
+  case MEAN_LENGTH:
+    return QString::number(meanl);
+  case NB_NULL_LENGTH:
+    return QString::number(number_of_null_length_edges);
+
+  case MIN_ANGLE:
+    return QString::number(mini);
+  case MAX_ANGLE:
+    return QString::number(maxi);
+  case MEAN_ANGLE:
+    return QString::number(ave);
+
+  case HOLES:
+    return QString::number(nb_holes(poly));
+  }
+  return QString();
+}
+
+CGAL::Three::Scene_item::Header_data Scene_polyhedron_item::header() const
+{
+  CGAL::Three::Scene_item::Header_data data;
+  //categories
+  data.categories.append(std::pair<QString,int>(QString("Properties"),9));
+  data.categories.append(std::pair<QString,int>(QString("Edges"),6));
+  data.categories.append(std::pair<QString,int>(QString("Angles"),3));
+
+
+  //titles
+  data.titles.append(QString("#Vertices"));
+  data.titles.append(QString("#Facets"));
+  data.titles.append(QString("#Connected Components"));
+  data.titles.append(QString("#Border Edges"));
+  data.titles.append(QString("#Degenerated Faces"));
+  data.titles.append(QString("Connected Components of the Boundary"));
+  data.titles.append(QString("Area"));
+  data.titles.append(QString("Volume"));
+  data.titles.append(QString("Self-Intersecting"));
+  data.titles.append(QString("#Edges"));
+  data.titles.append(QString("Minimum Length"));
+  data.titles.append(QString("Maximum Length"));
+  data.titles.append(QString("Median Length"));
+  data.titles.append(QString("Mean Length"));
+  data.titles.append(QString("#Null Length"));
+  data.titles.append(QString("Minimum"));
+  data.titles.append(QString("Maximum"));
+  data.titles.append(QString("Average"));
+  return data;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.h
new file mode 100644
index 0000000..4db00b2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item.h
@@ -0,0 +1,186 @@
+#ifndef SCENE_POLYHEDRON_ITEM_H
+#define SCENE_POLYHEDRON_ITEM_H
+
+#include "Scene_polyhedron_item_config.h"
+#include  <CGAL/Three/Scene_item.h> //<- modif ?
+#include "Polyhedron_type_fwd.h"
+#include "Polyhedron_type.h"
+#include "Viewer.h"
+#include <iostream>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <QOpenGLTexture>
+
+#include <set>
+#include <vector>
+
+#include <QColor>
+
+class QMenu;
+
+// This class represents a polyhedron in the OpenGL scene
+class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item
+        : public CGAL::Three::Scene_item{
+    Q_OBJECT
+public:
+    enum STATS {
+      NB_VERTICES = 0,
+      NB_FACETS,
+      NB_CONNECTED_COMPOS,
+      NB_BORDER_EDGES,
+      NB_DEGENERATED_FACES,
+      HOLES,
+      AREA,
+      VOLUME,
+      SELFINTER,
+      NB_EDGES,
+      MIN_LENGTH,
+      MAX_LENGTH,
+      MID_LENGTH,
+      MEAN_LENGTH,
+      NB_NULL_LENGTH,
+      MIN_ANGLE,
+      MAX_ANGLE,
+      MEAN_ANGLE
+    };
+    QString compute_stats(int type);
+    CGAL::Three::Scene_item::Header_data header() const;
+    Scene_polyhedron_item();
+    //   Scene_polyhedron_item(const Scene_polyhedron_item&);
+    Scene_polyhedron_item(const Polyhedron& p);
+    Scene_polyhedron_item(Polyhedron* const p);
+    ~Scene_polyhedron_item();
+
+    Scene_polyhedron_item* clone() const;
+
+    // IO
+    bool load(std::istream& in);
+    bool load_obj(std::istream& in);
+    bool save(std::ostream& out) const;
+
+    // Function for displaying meta-data of the item
+    virtual QString toolTip() const;
+
+    // Function to override the context menu
+    QMenu* contextMenu();
+
+    // Indicate if rendering mode is supported
+    virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); }
+    // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+    void draw() const {}
+    virtual void draw(CGAL::Three::Viewer_interface*) const;
+    virtual void draw_edges() const {}
+    virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+    virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+
+    // Get wrapped polyhedron
+    Polyhedron*       polyhedron();
+    const Polyhedron* polyhedron() const;
+
+    // Get dimensions
+    bool isFinite() const { return true; }
+    bool isEmpty() const;
+    void compute_bbox() const;
+    std::vector<QColor>& color_vector() {return colors_;}
+    void set_color_vector_read_only(bool on_off) {plugin_has_set_color_vector_m=on_off;}
+    int getNumberOfNullLengthEdges(){return number_of_null_length_edges;}
+    int getNumberOfDegeneratedFaces(){return number_of_degenerated_faces;}
+    bool triangulated(){return poly->is_pure_triangle();}
+    bool self_intersected(){return !self_intersect;}
+
+public Q_SLOTS:
+    virtual void invalidateOpenGLBuffers();
+    virtual void selection_changed(bool);
+    virtual void setColor(QColor c);
+	virtual void show_feature_edges(bool);
+    void show_only_feature_edges(bool);
+    void enable_facets_picking(bool);
+    void set_erase_next_picked_facet(bool);
+
+    void select(double orig_x,
+                double orig_y,
+                double orig_z,
+                double dir_x,
+                double dir_y,
+                double dir_z);
+
+    void update_vertex_indices();
+    void update_facet_indices();
+    void update_halfedge_indices();
+    void invalidate_aabb_tree();
+
+Q_SIGNALS:
+    void selected_vertex(void*);
+    void selected_facet(void*);
+    void selected_edge(void*);
+    void selected_halfedge(void*);
+    void item_is_about_to_be_changed(); // emitted in invalidateOpenGLBuffers()
+
+private:
+    // Initialization
+    void init();
+    void invalidate_stats();
+
+private:
+    Polyhedron* poly;
+
+private:
+    typedef Scene_item Base;
+    typedef std::vector<QColor> Color_vector;
+    typedef Polyhedron::Facet_iterator Facet_iterator;
+
+
+    Color_vector colors_;
+    bool show_only_feature_edges_m;
+    bool show_feature_edges_m;
+    bool facet_picking_m;
+    bool erase_next_picked_facet_m;
+    //the following variable is used to indicate if the color vector must not be automatically updated.
+    bool plugin_has_set_color_vector_m;
+
+    enum VAOs {
+        Facets=0,
+        Edges,
+        Feature_edges,
+        Gouraud_Facets,
+        NbOfVaos = Gouraud_Facets+1
+    };
+    enum VBOs {
+        Facets_vertices = 0,
+        Facets_normals_flat,
+        Facets_color,
+        Edges_vertices,
+        Feature_edges_vertices,
+        Edges_color,
+        Facets_normals_gouraud,
+        NbOfVbos = Facets_normals_gouraud+1
+    };
+
+    mutable std::vector<float> positions_lines;
+    mutable std::vector<float> positions_feature_lines;
+    mutable std::vector<float> positions_facets;
+    mutable std::vector<float> normals_flat;
+    mutable std::vector<float> normals_gouraud;
+    mutable std::vector<float> color_lines;
+    mutable std::vector<float> color_facets;
+    mutable std::size_t nb_facets;
+    mutable std::size_t nb_lines;
+    mutable std::size_t nb_f_lines;
+    mutable QOpenGLShaderProgram *program;
+    mutable unsigned int number_of_null_length_edges;
+    mutable unsigned int number_of_degenerated_faces;
+    mutable bool self_intersect;
+
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const;
+    void compute_normals_and_vertices(const bool colors_only = false) const;
+    template<typename FaceNormalPmap, typename VertexNormalPmap>
+    void triangulate_facet(Facet_iterator,
+      const FaceNormalPmap&, const VertexNormalPmap&,
+      const bool colors_only) const;
+    double volume, area;
+
+}; // end class Scene_polyhedron_item
+
+#endif // SCENE_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp
new file mode 100644
index 0000000..3172020
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp
@@ -0,0 +1,102 @@
+#include "Scene_polyhedron_item_decorator.h"
+#include "Polyhedron_type.h"
+
+Scene_polyhedron_item_decorator::Scene_polyhedron_item_decorator
+  (Scene_polyhedron_item* poly_item, bool delete_item)
+  :CGAL::Three::Scene_item(), poly_item(poly_item), delete_poly_item(delete_item)
+{ }
+
+Scene_polyhedron_item_decorator::~Scene_polyhedron_item_decorator()
+{ 
+  if(delete_poly_item) { delete poly_item; }
+}
+
+Scene_polyhedron_item_decorator* 
+Scene_polyhedron_item_decorator::clone() const {
+  return 0;
+}
+
+QString 
+Scene_polyhedron_item_decorator::toolTip() const
+{
+  if(!poly_item->polyhedron())
+    return QString();
+
+  return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
+                     "<p>Number of vertices: %2<br />"
+                     "Number of edges: %3<br />"
+                     "Number of facets: %4</p>")
+    .arg(this->name())
+    .arg(poly_item->polyhedron()->size_of_vertices())
+    .arg(poly_item->polyhedron()->size_of_halfedges()/2)
+    .arg(poly_item->polyhedron()->size_of_facets())
+    .arg(this->renderingModeName())
+    .arg(this->color().name());
+}
+
+void Scene_polyhedron_item_decorator::draw() const {
+  poly_item->draw();
+}
+
+void Scene_polyhedron_item_decorator::draw_edges() const {
+  poly_item->draw_edges();
+}
+
+Polyhedron* 
+Scene_polyhedron_item_decorator::polyhedron()       
+{ return poly_item->polyhedron(); }
+
+const Polyhedron* 
+Scene_polyhedron_item_decorator::polyhedron() const 
+{ return poly_item->polyhedron(); }
+
+bool
+Scene_polyhedron_item_decorator::isEmpty() const {
+  return poly_item->isEmpty();
+}
+
+void
+Scene_polyhedron_item_decorator::compute_bbox() const {
+  _bbox = poly_item->bbox();
+}
+
+
+void
+Scene_polyhedron_item_decorator::
+invalidateOpenGLBuffers()
+{
+  poly_item->invalidateOpenGLBuffers();
+  Scene_item::invalidateOpenGLBuffers();
+  compute_bbox();
+}
+
+void 
+Scene_polyhedron_item_decorator::select(double orig_x,
+                                   double orig_y,
+                                   double orig_z,
+                                   double dir_x,
+                                   double dir_y,
+                                   double dir_z)
+{
+  Scene_item::select(orig_x,
+                     orig_y,
+                     orig_z,
+                     dir_x,
+                     dir_y,
+                     dir_z);
+  poly_item->select(orig_x,
+                       orig_y,
+                       orig_z,
+                       dir_x,
+                       dir_y,
+                       dir_z);
+}
+
+Scene_polyhedron_item* Scene_polyhedron_item_decorator::polyhedron_item() const {
+  return poly_item;
+}
+
+void Scene_polyhedron_item_decorator::set_polyhedron_item(Scene_polyhedron_item* poly_item) {
+  this->poly_item = poly_item;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.h
new file mode 100644
index 0000000..3766890
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.h
@@ -0,0 +1,65 @@
+#ifndef SCENE_POLYHEDRON_ITEM_DECORATOR_H
+#define SCENE_POLYHEDRON_ITEM_DECORATOR_H
+#include "Scene_polyhedron_item_decorator_config.h"
+#include "Scene_polyhedron_item.h"
+
+// This class is a decorator for Scene_polyhedron_item yet it does not inherit it but Scene_item
+class SCENE_POLYHEDRON_ITEM_DECORATOR_EXPORT Scene_polyhedron_item_decorator 
+  : public CGAL::Three::Scene_item {
+  Q_OBJECT
+public:  
+  /// Create an Scene_polyhedron_item_decorator from a Scene_polyhedron_item.
+
+  Scene_polyhedron_item_decorator(Scene_polyhedron_item* poly_item, bool delete_item = true);
+  ~Scene_polyhedron_item_decorator();
+
+  /// Returns 0, so that one cannot clone decorator
+  Scene_polyhedron_item_decorator* clone() const;
+  
+  // // IO
+  // bool load(std::istream& in);
+  // bool save(std::ostream& out) const;
+
+  // Function for displaying meta-data of the item
+  QString toolTip() const;
+
+  // // Function to override the context menu
+  // QMenu* contextMenu();
+  
+  // Indicate if rendering mode is supported
+  bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); }
+  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+  // dispatch to poly_item direct_draw and direct_draw_edges
+  void draw() const;
+  void draw_edges() const;
+
+  // Get wrapped polyhedron
+  Polyhedron*       polyhedron();
+  const Polyhedron* polyhedron() const;
+
+  Scene_polyhedron_item* polyhedron_item() const;
+  void                   set_polyhedron_item(Scene_polyhedron_item* poly_item);
+
+  // Get dimensions
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  void compute_bbox() const;
+
+  bool delete_item() { return delete_poly_item; }
+  void set_delete_item(bool delete_item) { delete_poly_item = delete_item; }
+
+public Q_SLOTS:
+  void invalidateOpenGLBuffers();
+  void select(double orig_x,
+              double orig_y,
+              double orig_z,
+              double dir_x,
+              double dir_y,
+              double dir_z);
+
+protected:
+  Scene_polyhedron_item* poly_item;
+  bool delete_poly_item;
+}; // end class Scene_polyhedron_item_decorator
+
+#endif // SCENE_POLYHEDRON_ITEM_DECORATOR_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_decorator_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp
new file mode 100644
index 0000000..ce1f9c9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.cpp
@@ -0,0 +1 @@
+#include "Scene_polyhedron_item_k_ring_selection.h"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h
new file mode 100644
index 0000000..e277792
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h
@@ -0,0 +1,236 @@
+#ifndef SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_H
+#define SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_H
+#include "Scene_polyhedron_item_k_ring_selection_config.h"
+#include "Polyhedron_type.h"
+#include "Scene_polyhedron_item.h"
+
+#include <QGLViewer/qglviewer.h>
+#include <QKeyEvent>
+#include <QMouseEvent>
+#include <QMainWindow>
+#include <QObject>
+
+#include <map>
+#include <queue>
+
+#include <CGAL/boost/graph/selection.h>
+
+class SCENE_POLYHEDRON_ITEM_K_RING_SELECTION_EXPORT Scene_polyhedron_item_k_ring_selection 
+  : public QObject
+{
+  Q_OBJECT
+public:
+  struct Active_handle {
+    enum Type{ VERTEX = 0, FACET = 1, EDGE = 2 , CONNECTED_COMPONENT = 3}; };
+
+  typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+
+  // Hold mouse keyboard state together
+  struct Mouse_keyboard_state
+  {
+    Mouse_keyboard_state() : shift_pressing(false), left_button_pressing(false) { }
+    bool shift_pressing, left_button_pressing;
+  };
+
+  Mouse_keyboard_state  state;
+
+  Active_handle::Type    active_handle_type;
+  int                    k_ring;
+  Scene_polyhedron_item* poly_item;
+  bool is_active;
+
+  Scene_polyhedron_item_k_ring_selection() {}
+
+  Scene_polyhedron_item_k_ring_selection
+    (Scene_polyhedron_item* poly_item, QMainWindow* mw, Active_handle::Type aht, int k_ring)
+      :is_active(false)
+  {
+    init(poly_item, mw, aht, k_ring);
+  }
+
+  void init(Scene_polyhedron_item* poly_item, QMainWindow* /*mw*/, Active_handle::Type aht, int k_ring) {
+    this->poly_item = poly_item;
+    this->active_handle_type = aht;
+    this->k_ring = k_ring;
+
+    poly_item->enable_facets_picking(true);
+    poly_item->set_color_vector_read_only(true);
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    viewer->installEventFilter(this);
+#if QGLVIEWER_VERSION >= 0x020501
+    viewer->setMouseBindingDescription(Qt::Key_D, Qt::ShiftModifier, Qt::LeftButton, "(When in selection plugin) Removes the clicked primitive from the selection. ");
+#else
+    viewer->setMouseBindingDescription(Qt::SHIFT + Qt::LeftButton,  "(When in selection plugin) When D is pressed too, removes the clicked primitive from the selection. ");
+#endif
+    connect(poly_item, SIGNAL(selected_vertex(void*)), this, SLOT(vertex_has_been_selected(void*)));
+    connect(poly_item, SIGNAL(selected_facet(void*)), this, SLOT(facet_has_been_selected(void*)));
+    connect(poly_item, SIGNAL(selected_edge(void*)), this, SLOT(edge_has_been_selected(void*)));
+  }
+
+public Q_SLOTS:
+  // slots are called by signals of polyhedron_item
+  void vertex_has_been_selected(void* void_ptr) 
+  {
+    is_active=true;
+    if(active_handle_type != Active_handle::VERTEX) { return; }
+    process_selection( static_cast<Polyhedron::Vertex*>(void_ptr)->halfedge()->vertex() );
+  }
+  void facet_has_been_selected(void* void_ptr)
+  {
+    is_active=true;
+    if (active_handle_type == Active_handle::FACET
+      || active_handle_type == Active_handle::CONNECTED_COMPONENT)
+      process_selection(static_cast<Polyhedron::Facet*>(void_ptr)->halfedge()->facet());
+  }
+  void edge_has_been_selected(void* void_ptr) 
+  {
+    is_active=true;
+    if(active_handle_type != Active_handle::EDGE) { return; }
+    process_selection( edge(static_cast<Polyhedron::Halfedge*>(void_ptr)->opposite()->opposite(), *poly_item->polyhedron()) );
+  }
+
+Q_SIGNALS:
+  void selected(const std::set<Polyhedron::Vertex_handle>&);
+  void selected(const std::set<Polyhedron::Facet_handle>&);
+  void selected(const std::set<edge_descriptor>&);
+  void toogle_insert(const bool);
+  void endSelection();
+
+protected:
+
+  template<class HandleType>
+  void process_selection(HandleType clicked) {
+    const std::set<HandleType>& selection = extract_k_ring(clicked, k_ring);
+    Q_EMIT selected(selection);
+  }
+
+  template <class Handle>
+  struct Is_selected_from_set{
+    std::set<Handle>& selection;
+    Is_selected_from_set(std::set<Handle>& selection)
+      :selection(selection) {}
+    friend bool get(Is_selected_from_set<Handle> map, Handle k)
+    {
+      return map.selection.count(k);
+    }
+    friend void put(Is_selected_from_set<Handle> map, Handle k, bool b)
+    {
+      if (b)
+        map.selection.insert(k);
+      else
+        map.selection.erase(k);
+    }
+  };
+
+  std::set<Polyhedron::Vertex_handle>
+  extract_k_ring(Polyhedron::Vertex_handle clicked, unsigned int k)
+  {
+    std::set<Polyhedron::Vertex_handle> selection;
+    selection.insert(clicked);
+    if (k>0)
+      CGAL::expand_vertex_selection(CGAL::make_array(clicked),
+                                    *poly_item->polyhedron(),
+                                    k,
+                                    Is_selected_from_set<Polyhedron::Vertex_handle>(selection),
+                                    CGAL::Emptyset_iterator());
+
+    return selection;
+  }
+
+  std::set<Polyhedron::Facet_handle>
+  extract_k_ring(Polyhedron::Facet_handle clicked, unsigned int k)
+  {
+    std::set<Polyhedron::Facet_handle> selection;
+    selection.insert(clicked);
+    if (k>0)
+      CGAL::expand_face_selection(CGAL::make_array(clicked),
+                                  *poly_item->polyhedron(),
+                                  k,
+                                  Is_selected_from_set<Polyhedron::Facet_handle>(selection),
+                                  CGAL::Emptyset_iterator());
+
+    return selection;
+  }
+
+  std::set<edge_descriptor>
+  extract_k_ring(edge_descriptor clicked, unsigned int k)
+  {
+    std::set<edge_descriptor> selection;
+    selection.insert(clicked);
+
+    if (k>0)
+      CGAL::expand_edge_selection(CGAL::make_array(clicked),
+                                  *poly_item->polyhedron(),
+                                  k,
+                                  Is_selected_from_set<edge_descriptor>(selection),
+                                  CGAL::Emptyset_iterator());
+    return selection;
+  }
+
+
+  bool eventFilter(QObject* /*target*/, QEvent *event)
+  {
+    // This filter is both filtering events from 'viewer' and 'main window'
+    // key events
+      if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)  {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+      Qt::KeyboardModifiers modifiers = keyEvent->modifiers();
+
+      state.shift_pressing = modifiers.testFlag(Qt::ShiftModifier);
+    }
+
+    if(event->type() == QEvent::KeyPress
+            && state.shift_pressing
+            && static_cast<QKeyEvent*>(event)->key()==Qt::Key_D)
+    {
+     Q_EMIT toogle_insert(false);
+    }
+    else if(event->type() == QEvent::KeyRelease
+            && static_cast<QKeyEvent*>(event)->key()==Qt::Key_D)
+    {
+     Q_EMIT toogle_insert(true);
+    }
+    // mouse events
+    if(event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease) {
+      QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
+      if(mouse_event->button() == Qt::LeftButton) {
+        state.left_button_pressing = event->type() == QEvent::MouseButtonPress;
+        if (!state.left_button_pressing)
+          if (is_active)
+          {
+            Q_EMIT endSelection();
+            is_active=false;
+          }
+      }
+      //to avoid the contextual menu to mess up the states.
+      else if(mouse_event->button() == Qt::RightButton) {
+          state.left_button_pressing = false;
+          state.shift_pressing = false;
+        }
+    }
+    // use mouse move event for paint-like selection
+    if( (event->type() == QEvent::MouseMove
+         || (event->type() == QEvent::MouseButtonPress
+             && static_cast<QMouseEvent*>(event)->button() == Qt::LeftButton))
+      && (state.shift_pressing && state.left_button_pressing) )
+    {
+      // paint with mouse move event
+      QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
+      QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+      qglviewer::Camera* camera = viewer->camera();
+
+      bool found = false;
+      const qglviewer::Vec& point = camera->pointUnderPixel(mouse_event->pos(), found);
+      if(found)
+      {
+        const qglviewer::Vec& orig = camera->position();
+        const qglviewer::Vec& dir = point - orig;
+        poly_item->select(orig.x, orig.y, orig.z, dir.x, dir.y, dir.z);
+      }
+    }//end MouseMove
+    return false;
+  }
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.cpp
new file mode 100644
index 0000000..89b9aed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.cpp
@@ -0,0 +1,233 @@
+#include "Scene_polyhedron_selection_item.h"
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+
+void Scene_polyhedron_selection_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer)const
+{
+    //vao containing the data for the unselected facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+        program->bind();
+
+        vaos[0]->bind();
+        buffers[0].bind();
+        buffers[0].allocate(positions_facets.data(),
+                            static_cast<int>(positions_facets.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[0].release();
+
+
+
+        buffers[1].bind();
+        buffers[1].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(float)));
+        program->enableAttributeArray("normals");
+        program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+        buffers[1].release();
+
+        vaos[0]->release();
+        program->release();
+
+    }
+    //vao containing the data for the unselected lines
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[1]->bind();
+
+        buffers[2].bind();
+        buffers[2].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[2].release();
+
+        program->release();
+
+        vaos[1]->release();
+
+    }
+    //vao containing the data for the points
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+        vaos[2]->bind();
+
+        buffers[3].bind();
+        buffers[3].allocate(positions_points.data(),
+                            static_cast<int>(positions_points.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+        buffers[3].release();
+
+        buffers[6].release();
+        program->release();
+
+        vaos[2]->release();
+    }
+    nb_facets = positions_facets.size();
+    positions_facets.resize(0);
+    std::vector<float>(positions_facets).swap(positions_facets);
+
+    normals.resize(0);
+    std::vector<float>(normals).swap(normals);
+
+    nb_lines = positions_lines.size();
+    positions_lines.resize(0);
+    std::vector<float>(positions_lines).swap(positions_lines);
+
+    nb_points = positions_points.size();
+    positions_points.resize(0);
+    std::vector<float>(positions_points).swap(positions_points);
+
+    are_buffers_filled = true;
+}
+
+void Scene_polyhedron_selection_item::compute_elements()const
+{
+    positions_facets.clear();
+    positions_lines.clear();
+    positions_points.clear();
+    normals.clear();
+    //The facets
+    {
+
+
+        for(Selection_set_facet::iterator
+            it = selected_facets.begin(),
+            end = selected_facets.end();
+            it != end; ++it)
+        {
+            const Kernel::Vector_3 n =
+                    CGAL::Polygon_mesh_processing::compute_face_normal(*it, *this->poly_item->polyhedron());
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+            normals.push_back(n.x());
+            normals.push_back(n.y());
+            normals.push_back(n.z());
+
+
+            Polyhedron::Halfedge_around_facet_circulator
+                    he = (*it)->facet_begin(),
+                    cend = he;
+
+            CGAL_For_all(he,cend)
+            {
+                const Kernel::Point_3& p = he->vertex()->point();
+                positions_facets.push_back(p.x());
+                positions_facets.push_back(p.y());
+                positions_facets.push_back(p.z());
+            }
+        }
+    }
+
+    //The Lines
+    {
+
+        for(Selection_set_edge::iterator it = selected_edges.begin(); it != selected_edges.end(); ++it) {
+            const Kernel::Point_3& a = (it->halfedge())->vertex()->point();
+            const Kernel::Point_3& b = (it->halfedge())->opposite()->vertex()->point();
+            positions_lines.push_back(a.x());
+            positions_lines.push_back(a.y());
+            positions_lines.push_back(a.z());
+
+            positions_lines.push_back(b.x());
+            positions_lines.push_back(b.y());
+            positions_lines.push_back(b.z());
+        }
+
+    }
+
+    //The points
+    {
+        for(Selection_set_vertex::iterator
+            it = selected_vertices.begin(),
+            end = selected_vertices.end();
+            it != end; ++it)
+        {
+            const Kernel::Point_3& p = (*it)->point();
+            positions_points.push_back(p.x());
+            positions_points.push_back(p.y());
+            positions_points.push_back(p.z());
+        }
+    }
+}
+
+void Scene_polyhedron_selection_item::draw(CGAL::Three::Viewer_interface* viewer) const
+{
+
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+
+    draw_points(viewer);
+    GLfloat offset_factor;
+    GLfloat offset_units;
+    viewer->glGetFloatv( GL_POLYGON_OFFSET_FACTOR, &offset_factor);
+    viewer->glGetFloatv(GL_POLYGON_OFFSET_UNITS, &offset_units);
+    glPolygonOffset(-1.f, 1.f);
+
+    vaos[0]->bind();
+    program = getShaderProgram(PROGRAM_WITH_LIGHT);
+    attrib_buffers(viewer,PROGRAM_WITH_LIGHT);
+    program->bind();
+    program->setAttributeValue("colors",this->color());
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_facets/3));
+    program->release();
+    vaos[0]->release();
+    glPolygonOffset(offset_factor, offset_units);
+    draw_edges(viewer);
+
+
+}
+
+void Scene_polyhedron_selection_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+
+    viewer->glLineWidth(3.f);
+    vaos[1]->bind();
+    program = getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+
+    program->setAttributeValue("colors",edge_color);
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/3));
+    program->release();
+    vaos[1]->release();
+    viewer->glLineWidth(1.f);
+}
+
+void Scene_polyhedron_selection_item::draw_points(CGAL::Three::Viewer_interface* viewer) const
+{
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+    viewer->glPointSize(5.f);
+    vaos[2]->bind();
+    program = getShaderProgram(PROGRAM_NO_SELECTION);
+    attrib_buffers(viewer,PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors",vertex_color);
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_points/3));
+    program->release();
+    vaos[2]->release();
+    viewer->glPointSize(1.f);
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.h
new file mode 100644
index 0000000..5f82079
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.h
@@ -0,0 +1,926 @@
+#ifndef SCENE_POLYHEDRON_SELECTION_ITEM_H
+#define SCENE_POLYHEDRON_SELECTION_ITEM_H
+#include "opengl_tools.h"
+#include "Scene_polyhedron_selection_item_config.h"
+#include "Scene_polyhedron_item_k_ring_selection.h"
+#include "Travel_isolated_components.h"
+
+#include "Scene_polyhedron_item_decorator.h"
+#include "Polyhedron_type.h"
+
+#include <CGAL/property_map.h>
+#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include "Polyhedron_demo_detect_sharp_edges.h"
+
+#include <fstream>
+#include <boost/foreach.hpp>
+#include <boost/unordered_set.hpp>
+#include <boost/property_map/vector_property_map.hpp>
+
+#include <CGAL/boost/graph/selection.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+
+template<class HandleType, class SelectionItem>
+struct Selection_traits {};
+
+template<class SelectionItem>
+struct Selection_traits<typename SelectionItem::Vertex_handle, SelectionItem> 
+{
+  typedef typename SelectionItem::Selection_set_vertex Container;
+  typedef boost::graph_traits<Polyhedron>::vertex_iterator Iterator;
+  Selection_traits(SelectionItem* item) : item(item) { }
+
+  Container& container() { return item->selected_vertices; }
+  Iterator iterator_begin() { return vertices(*item->polyhedron()).first; }
+  Iterator iterator_end() { return vertices(*item->polyhedron()).second; }
+  std::size_t size() { return item->polyhedron()->size_of_vertices(); }
+  void update_indices() { item->polyhedron_item()->update_vertex_indices(); }
+  std::size_t id(typename SelectionItem::Vertex_handle  vh) {return vh->id();}
+
+  template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  reduce_selection(
+    const VertexRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsVertexSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return reduce_vertex_selection(selection, graph, k, is_selected, out);
+  }
+  template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  expand_selection(
+    const VertexRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsVertexSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return expand_vertex_selection(selection, graph, k, is_selected, out);
+  }
+
+  SelectionItem* item;
+};
+
+template<class SelectionItem>
+struct Selection_traits<typename SelectionItem::Facet_handle, SelectionItem>
+{
+  typedef typename SelectionItem::Selection_set_facet Container;
+  typedef boost::graph_traits<Polyhedron>::face_iterator Iterator;
+  Selection_traits(SelectionItem* item) : item(item) { }
+
+  Container& container() { return item->selected_facets; }
+  Iterator iterator_begin() { return faces(*item->polyhedron()).first; }
+  Iterator iterator_end() { return faces(*item->polyhedron()).second; }
+  std::size_t size() { return item->polyhedron()->size_of_facets(); }
+  void update_indices() { item->polyhedron_item()->update_facet_indices(); }
+  std::size_t id(typename SelectionItem::Facet_handle fh) {return fh->id();}
+
+  template <class FaceRange, class HalfedgeGraph, class IsFaceSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  reduce_selection(
+    const FaceRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsFaceSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return reduce_face_selection(selection, graph, k, is_selected, out);
+  }
+  template <class FaceRange, class HalfedgeGraph, class IsFaceSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  expand_selection(
+    const FaceRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsFaceSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return expand_face_selection(selection, graph, k, is_selected, out);
+  }
+
+  SelectionItem* item;
+};
+
+template<class SelectionItem>
+struct Selection_traits<typename SelectionItem::edge_descriptor, SelectionItem> 
+{
+  typedef typename SelectionItem::Selection_set_edge Container;
+  typedef boost::graph_traits<Polyhedron>::edge_iterator Iterator;
+  Selection_traits(SelectionItem* item) : item(item) { }
+
+  Container& container() { return item->selected_edges; }
+  Iterator iterator_begin() { return edges(*item->polyhedron()).first; }
+  Iterator iterator_end() { return edges(*item->polyhedron()).second; }
+  std::size_t size() { return item->polyhedron()->size_of_halfedges()/2; }
+  void update_indices() { item->polyhedron_item()->update_halfedge_indices(); }
+  std::size_t id(boost::graph_traits<Polyhedron>::edge_descriptor ed) {return ed.halfedge()->id()/2;}
+
+  template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  reduce_selection(
+    const EdgeRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsEdgeSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return reduce_edge_selection(selection, graph, k, is_selected, out);
+  }
+  template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
+  static
+  OutputIterator
+  expand_selection(
+    const EdgeRange& selection,
+    HalfedgeGraph& graph,
+    unsigned int k,
+    IsEdgeSelectedPMap is_selected,
+    OutputIterator out)
+  {
+    return expand_edge_selection(selection, graph, k, is_selected, out);
+  }
+
+  SelectionItem* item;
+};
+
+//////////////////////////////////////////////////////////////////////////
+
+class SCENE_POLYHEDRON_SELECTION_ITEM_EXPORT Scene_polyhedron_selection_item 
+  : public Scene_polyhedron_item_decorator
+{
+  Q_OBJECT
+
+friend class Polyhedron_demo_selection_plugin;
+
+public:
+  typedef Polyhedron::Vertex_handle   Vertex_handle;
+  typedef Polyhedron::Facet_handle    Facet_handle;
+  typedef boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+  typedef Polyhedron::Vertex_iterator Vertex_iterator;
+  typedef Polyhedron::Facet_iterator  Facet_iterator;
+  typedef Scene_polyhedron_item_k_ring_selection::Active_handle Active_handle;
+  // To be used inside loader
+  Scene_polyhedron_selection_item() 
+    : Scene_polyhedron_item_decorator(NULL, false)
+    {
+        for(int i=0; i<3; i++)
+        {
+            addVaos(i);
+            vaos[i]->create();
+        }
+
+        for(int i=0; i<7; i++)
+        {
+            buffers[i].create();
+        }
+        nb_facets = 0;
+        nb_points = 0;
+        nb_lines = 0;
+        this->setColor(facet_color);
+    }
+
+  Scene_polyhedron_selection_item(Scene_polyhedron_item* poly_item, QMainWindow* mw) 
+    : Scene_polyhedron_item_decorator(NULL, false)
+    {
+        nb_facets = 0;
+        nb_points = 0;
+        nb_lines = 0;
+
+        for(int i=0; i<3; i++)
+        {
+            addVaos(i);
+            vaos[i]->create();
+        }
+
+        for(int i=0; i<7; i++)
+        {
+            buffers[i].create();
+        }
+        init(poly_item, mw);
+        this->setColor(facet_color);
+        invalidateOpenGLBuffers();
+    }
+
+   ~Scene_polyhedron_selection_item()
+    {
+    }
+
+protected: 
+  void init(Scene_polyhedron_item* poly_item, QMainWindow* mw)
+  {
+    this->poly_item = poly_item;
+    connect(poly_item, SIGNAL(item_is_about_to_be_changed()), this, SLOT(poly_item_changed())); 
+    connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Vertex_handle>&)), this,
+      SLOT(selected(const std::set<Polyhedron::Vertex_handle>&)));
+    connect(&k_ring_selector, SIGNAL(selected(const std::set<Polyhedron::Facet_handle>&)), this,
+      SLOT(selected(const std::set<Polyhedron::Facet_handle>&)));
+    connect(&k_ring_selector, SIGNAL(selected(const std::set<edge_descriptor>&)), this,
+      SLOT(selected(const std::set<edge_descriptor>&)));
+    connect(&k_ring_selector, SIGNAL(endSelection()), this,SLOT(endSelection()));
+    connect(&k_ring_selector, SIGNAL(toogle_insert(bool)), this,SLOT(toggle_insert(bool)));
+    k_ring_selector.init(poly_item, mw, Active_handle::VERTEX, -1);
+
+    QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin();
+    viewer->installEventFilter(this);
+    mw->installEventFilter(this);
+
+    facet_color = QColor(87,87,87);
+    edge_color = QColor(173,35,35);
+    vertex_color = QColor(255,205,243);
+  }
+
+  Active_handle::Type get_active_handle_type() 
+  { return k_ring_selector.active_handle_type; }
+  void set_active_handle_type(Active_handle::Type aht) 
+  { k_ring_selector.active_handle_type = aht; }
+
+  int get_k_ring() { return k_ring_selector.k_ring; }
+  void set_k_ring(int k) { k_ring_selector.k_ring = k; }
+
+  bool get_is_insert() { return is_insert; }
+  void set_is_insert(bool i) { is_insert = i; }
+  
+public:
+  typedef boost::unordered_set<Vertex_handle, CGAL::Handle_hash_function>    Selection_set_vertex;
+  typedef boost::unordered_set<Facet_handle, CGAL::Handle_hash_function>      Selection_set_facet;
+  typedef boost::unordered_set<edge_descriptor, CGAL::Handle_hash_function>    Selection_set_edge;
+
+  Polyhedron* polyhedron()
+  {
+    return this->poly_item->polyhedron();
+  }
+
+    using Scene_polyhedron_item_decorator::draw;
+    virtual void draw(CGAL::Three::Viewer_interface*) const;
+    virtual void draw_edges() const { }
+    virtual void draw_edges(CGAL::Three::Viewer_interface*) const;
+    virtual void draw_points(CGAL::Three::Viewer_interface*) const;
+
+  bool supportsRenderingMode(RenderingMode m) const { return (m==Flat); }
+
+  bool isEmpty() const {
+    return selected_vertices.empty() && selected_edges.empty() && selected_facets.empty();
+  }
+  void selection_changed(bool b)
+  {
+      QGLViewer* v = *QGLViewer::QGLViewerPool().begin();
+      CGAL::Three::Viewer_interface* viewer = dynamic_cast<CGAL::Three::Viewer_interface*>(v);
+      if(!viewer)
+          return;
+      if(!b)
+        viewer->setBindingSelect();
+      else
+        viewer->setNoBinding();
+  }
+  void compute_bbox() const
+  {
+    // Workaround a bug in g++-4.8.3:
+    //   http://stackoverflow.com/a/21755207/1728537
+    // Using boost::make_optional to copy-initialize 'item_bbox' hides the
+    //   warning about '*item_bbox' not being initialized.
+    // -- Laurent Rineau, 2014/10/30
+    boost::optional<CGAL::Bbox_3> item_bbox
+      = boost::make_optional(false, CGAL::Bbox_3());
+
+    for(Selection_set_vertex::const_iterator v_it = selected_vertices.begin(); 
+        v_it != selected_vertices.end(); ++v_it) {
+
+      if(item_bbox) { *item_bbox = *item_bbox + (*v_it)->point().bbox(); }
+      else          {  item_bbox = (*v_it)->point().bbox(); }
+    }
+
+    for(Selection_set_edge::const_iterator e_it = selected_edges.begin(); 
+        e_it != selected_edges.end(); ++e_it) {
+        CGAL::Bbox_3 e_bbox = e_it->halfedge()->vertex()->point().bbox();
+        e_bbox = e_bbox + e_it->halfedge()->opposite()->vertex()->point().bbox();
+        if(item_bbox) { *item_bbox = *item_bbox + e_bbox; }
+        else          {  item_bbox = e_bbox; }
+    }
+
+    for(Selection_set_facet::const_iterator f_it = selected_facets.begin(); 
+        f_it != selected_facets.end(); ++f_it) {
+
+        Polyhedron::Halfedge_around_facet_circulator he = (*f_it)->facet_begin(), cend = he;
+        CGAL_For_all(he,cend) {
+          if(item_bbox) { *item_bbox = *item_bbox + he->vertex()->point().bbox(); }
+          else          {  item_bbox = he->vertex()->point().bbox(); }
+        }
+    }
+
+    if(!item_bbox) { _bbox = this->poly_item->bbox(); return;}
+    _bbox = Bbox(item_bbox->xmin(),item_bbox->ymin(),item_bbox->zmin(),
+                item_bbox->xmax(),item_bbox->ymax(),item_bbox->zmax());
+  }
+
+  bool save(const std::string& file_name) const {
+    // update id fields before using
+    if(selected_vertices.size() > 0) { poly_item->update_vertex_indices();   }
+    if(selected_facets.size() > 0)   { poly_item->update_facet_indices();    }
+    if(selected_edges.size() > 0)    { poly_item->update_halfedge_indices(); }
+
+    std::ofstream out(file_name.c_str());
+    if(!out) { return false; }
+
+    for(Selection_set_vertex::const_iterator it = selected_vertices.begin(); it != selected_vertices.end(); ++it) 
+    { out << (*it)->id() << " "; }
+    out << std::endl;
+
+    for(Selection_set_facet::const_iterator it = selected_facets.begin(); it != selected_facets.end(); ++it) 
+    { out << (*it)->id() << " "; }
+    out << std::endl;
+
+    for(Selection_set_edge::const_iterator it = selected_edges.begin(); it != selected_edges.end(); ++it) 
+    { out << it->id() << " "; }
+    out << std::endl;
+    return true;
+  }
+  bool load(const std::string& file_name) {
+    file_name_holder = file_name;
+    return true;
+  }
+  // this function is called by selection_plugin, since at the time of the call of load(...) 
+  // we do not have access to selected polyhedron item
+  bool actual_load(Scene_polyhedron_item* poly_item, QMainWindow* mw) 
+  {
+    init(poly_item, mw);
+
+    std::vector<Vertex_handle> all_vertices;
+    all_vertices.reserve(polyhedron()->size_of_vertices());
+    Polyhedron::Vertex_iterator vb(polyhedron()->vertices_begin()), ve(polyhedron()->vertices_end());
+    for(;vb != ve; ++vb) { all_vertices.push_back(vb); }
+    
+    std::vector<Facet_handle> all_facets;
+    all_facets.reserve(polyhedron()->size_of_facets());
+    Polyhedron::Facet_iterator fb(polyhedron()->facets_begin()), fe(polyhedron()->facets_end());
+    for(;fb != fe; ++fb) { all_facets.push_back(fb); }
+
+    std::vector<edge_descriptor> all_edges(edges(*polyhedron()).first, edges(*polyhedron()).second);
+
+    std::ifstream in(file_name_holder.c_str());
+    if(!in) { return false; }
+
+    std::string line;
+    std::size_t id;
+
+    if(!std::getline(in, line)) { return true; }
+    std::istringstream vertex_line(line);
+    while(vertex_line >> id) {
+      if(id >= all_vertices.size()) { return false; }
+      selected_vertices.insert(all_vertices[id]);
+    }
+
+    if(!std::getline(in, line)) { return true; }
+    std::istringstream facet_line(line);
+    while(facet_line >> id) {
+      if(id >= all_facets.size()) { return false; }
+      selected_facets.insert(all_facets[id]);
+    }
+
+    if(!std::getline(in, line)) { return true; }
+    std::istringstream edge_line(line);
+    while(edge_line >> id) {
+      if(id >= all_edges.size()) { return false; }
+      selected_edges.insert(all_edges[id]);
+    }
+    return true;
+  }
+
+  // select all of `active_handle_type`(vertex, facet or edge)
+  void select_all() {
+    switch(get_active_handle_type()) {
+    case Active_handle::VERTEX:
+      select_all<Vertex_handle>(); break;
+    case Active_handle::FACET:
+    case Active_handle::CONNECTED_COMPONENT:
+      select_all<Facet_handle>(); break;
+    case Active_handle::EDGE:
+      selected_edges.insert(edges(*polyhedron()).first, edges(*polyhedron()).second);
+      invalidateOpenGLBuffers();
+      QGLViewer* v = *QGLViewer::QGLViewerPool().begin();
+      v->update();
+
+    }
+  }
+  // select all of vertex, facet or edge (use Vertex_handle, Facet_handle, edge_descriptor as template argument)
+  template<class HandleType>
+  void select_all() {
+    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
+    Tr tr(this);
+    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
+      tr.container().insert(*it);
+    }
+    invalidateOpenGLBuffers();
+    Q_EMIT itemChanged();
+  }
+
+  // clear all of `active_handle_type`(vertex, facet or edge)
+  void clear() {
+    switch(get_active_handle_type()) {
+    case Active_handle::VERTEX:
+      clear<Vertex_handle>(); break;
+    case Active_handle::FACET:
+    case Active_handle::CONNECTED_COMPONENT:
+      clear<Facet_handle>(); break;
+    case Active_handle::EDGE:
+      clear<edge_descriptor>(); break;
+    }
+  }
+  // select all of vertex, facet or edge (use Vertex_handle, Facet_handle, edge_descriptor as template argument)
+  template<class HandleType>
+  void clear() {
+
+    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
+    tr.container().clear();
+    invalidateOpenGLBuffers();
+    Q_EMIT itemChanged();
+  }
+
+  void clear_all(){
+    clear<Vertex_handle>();
+    clear<Facet_handle>();
+    clear<edge_descriptor>();
+  }
+
+  boost::optional<std::size_t> get_minimum_isolated_component() {
+    switch(get_active_handle_type()) {
+    case Active_handle::VERTEX:
+      return get_minimum_isolated_component<Vertex_handle>();
+    case Active_handle::FACET:
+      return get_minimum_isolated_component<Facet_handle>();
+    default:
+      return get_minimum_isolated_component<edge_descriptor>();
+    }
+  }
+  template<class HandleType> // use Vertex_handle, Facet_handle, edge_descriptor
+  boost::optional<std::size_t> get_minimum_isolated_component() {
+    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
+    tr.update_indices();
+    Travel_isolated_components::Minimum_visitor visitor;
+    Travel_isolated_components().travel<HandleType>
+      (tr.iterator_begin(), tr.iterator_end(), tr.size(), tr.container(), visitor);
+    return visitor.minimum;
+  }
+
+  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
+    switch(get_active_handle_type()) {
+    case Active_handle::VERTEX:
+      return select_isolated_components<Vertex_handle>(threshold);
+    case Active_handle::FACET:
+      return select_isolated_components<Facet_handle>(threshold);
+    default:
+      return select_isolated_components<edge_descriptor>(threshold);
+    }
+  }
+  template<class HandleType> // use Vertex_handle, Facet_handle, edge_descriptor
+  boost::optional<std::size_t> select_isolated_components(std::size_t threshold) {
+    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
+    Tr tr(this);
+    tr.update_indices();
+    typedef std::insert_iterator<typename Tr::Container> Output_iterator;
+    Output_iterator out(tr.container(), tr.container().begin());
+
+    Travel_isolated_components::Selection_visitor<Output_iterator> visitor(threshold , out);
+    Travel_isolated_components().travel<HandleType>
+      (tr.iterator_begin(), tr.iterator_end(), tr.size(), tr.container(), visitor);
+
+    if(visitor.any_inserted) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+    return visitor.minimum_visitor.minimum;
+  }
+
+  void expand_or_reduce(int steps) {
+    if (steps>0)
+    {
+      switch(get_active_handle_type()) {
+        case Active_handle::VERTEX:
+          expand_selection<Vertex_handle>(steps);
+        break;
+        case Active_handle::FACET:
+        case Active_handle::CONNECTED_COMPONENT:
+          expand_selection<Facet_handle>(steps);
+        break;
+        case Active_handle::EDGE:
+          expand_selection<edge_descriptor>(steps);
+      }
+    }
+    else
+    {
+      switch(get_active_handle_type()) {
+        case Active_handle::VERTEX:
+          reduce_selection<Vertex_handle>(-steps);
+        break;
+        case Active_handle::FACET:
+        case Active_handle::CONNECTED_COMPONENT:
+          reduce_selection<Facet_handle>(-steps);
+        break;
+        case Active_handle::EDGE:
+          reduce_selection<edge_descriptor>(-steps);
+      }
+    }
+  }
+
+  template <class Handle>
+  struct Is_selected_property_map{
+    std::vector<bool>* is_selected_ptr;
+    Is_selected_property_map()
+      : is_selected_ptr(NULL) {}
+    Is_selected_property_map(std::vector<bool>& is_selected)
+      : is_selected_ptr( &is_selected) {}
+
+    template<class H>
+    std::size_t id(H h){ return h->id(); }
+    std::size_t id(edge_descriptor ed) { return ed.halfedge()->id()/2; }
+
+    friend bool get(Is_selected_property_map map, Handle h)
+    {
+      CGAL_assertion(map.is_selected_ptr!=NULL);
+      return (*map.is_selected_ptr)[map.id(h)];
+    }
+
+    friend void put(Is_selected_property_map map, Handle h, bool b)
+    {
+      CGAL_assertion(map.is_selected_ptr!=NULL);
+      (*map.is_selected_ptr)[map.id(h)]=b;
+    }
+  };
+
+  template <typename SelectionSet>
+  struct Is_constrained_map
+  {
+    SelectionSet& m_set;
+
+    typedef typename SelectionSet::key_type    key_type;
+    typedef bool                               value_type;
+    typedef bool                               reference;
+    typedef boost::read_write_property_map_tag category;
+
+    Is_constrained_map(SelectionSet& set_)
+      : m_set(set_)
+    {}
+    friend bool get(const Is_constrained_map& map, const key_type& k)
+    {
+      return map.m_set.count(k);
+    }
+    friend void put(Is_constrained_map& map, const key_type& k, const value_type b)
+    {
+      if (b)  map.m_set.insert(k);
+      else    map.m_set.erase(k);
+    }
+  };
+
+  template <class Handle>
+  struct Index_map
+  {
+    typedef Handle  key_type;
+    typedef std::size_t     value_type;
+    typedef value_type&    reference;
+    typedef boost::read_write_property_map_tag category;
+
+    friend value_type get(Index_map, Handle h)
+    {
+      return h->id();
+    }
+    friend void put(Index_map, Handle h, value_type i)
+    {
+      h->id() = i;
+    }
+  };
+
+  template <class Handle>
+  void expand_selection(unsigned int steps)
+  {
+    typedef Selection_traits<Handle, Scene_polyhedron_selection_item> Tr;
+    Tr tr(this);
+
+    tr.update_indices();
+    std::vector<bool> mark(tr.size(),false);
+
+    BOOST_FOREACH(Handle h,tr.container())
+      mark[tr.id(h)]=true;
+
+    Tr::expand_selection(
+      tr.container(),
+      *this->poly_item->polyhedron(),
+      steps,
+      Is_selected_property_map<Handle>(mark),
+      CGAL::Emptyset_iterator()
+    );
+
+    bool any_change = false;
+    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
+      if(mark[tr.id(*it)]) {
+        any_change |= tr.container().insert(*it).second;
+      }
+    }
+    if(any_change) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+  }
+
+  template <class Handle>
+  void reduce_selection(unsigned int steps) {
+
+    typedef Selection_traits<Handle, Scene_polyhedron_selection_item> Tr;
+    Tr tr(this);
+
+    tr.update_indices();
+    std::vector<bool> mark(tr.size(),false);
+
+    BOOST_FOREACH(Handle h,tr.container())
+      mark[tr.id(h)]=true;
+
+    Tr::reduce_selection(
+      tr.container(),
+      *this->poly_item->polyhedron(),
+      steps,
+      Is_selected_property_map<Handle>(mark),
+      CGAL::Emptyset_iterator()
+    );
+
+    bool any_change = false;
+    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
+      if(!mark[tr.id(*it)]) {
+        any_change |= (tr.container().erase(*it)!=0);
+      }
+    }
+    if(any_change) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+  }
+
+  void erase_selected_facets() {
+    if(selected_facets.empty()) {return;}
+    // no-longer-valid vertices and edges will be handled when item_about_to_be_changed() 
+
+    // erase facets from poly
+    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
+      polyhedron()->erase_facet((*fb)->halfedge());
+    }
+    selected_facets.clear();
+    invalidateOpenGLBuffers();
+    changed_with_poly_item();
+  }
+
+  void keep_connected_components() {
+    if (selected_facets.empty()) { return; }
+
+    Selection_traits<Polyhedron::Face_handle, Scene_polyhedron_selection_item> trf(this);
+    trf.update_indices();
+    Selection_traits<Polyhedron::Vertex_handle, Scene_polyhedron_selection_item> trv(this);
+    trv.update_indices();
+
+    //Selection_traits<edge_descriptor, Scene_polyhedron_selection_item> tre(this);
+    //tre.update_indices();
+    //std::vector<bool> mark(polyhedron()->size_of_halfedges() / 2, false);
+    //BOOST_FOREACH(edge_descriptor e, selected_edges)
+    //  mark[tre.id(e)] = true;
+
+    PMP::keep_connected_components(*polyhedron()
+      , trf.container()
+      , PMP::parameters::face_index_map(Index_map<Polyhedron::Face_handle>())
+      .vertex_index_map(Index_map<Polyhedron::Vertex_handle>()));
+//      .edge_is_constrained_map(Is_selected_property_map<edge_descriptor>(mark)));
+
+    changed_with_poly_item();
+  }
+
+  bool export_selected_facets_as_polyhedron(Polyhedron* out) {
+    // Note: might be a more performance wise solution
+    // assign sequential id to vertices neighbor to selected facets
+    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
+      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
+      do {
+        hb->vertex()->id() = 0;
+      } while(++hb != hend);
+    }
+    // construct point vector
+    std::vector<Polyhedron::Point_3> points;
+    points.reserve(selected_facets.size());
+    std::size_t counter = 1;
+    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb) {
+      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
+      do {
+        if(hb->vertex()->id() == 0) {
+          hb->vertex()->id() = counter++; 
+          points.push_back(hb->vertex()->point());
+        }
+      } while(++hb != hend);
+    }
+    // construct polygon vector
+    std::vector<std::vector<std::size_t> > polygons(selected_facets.size());
+    counter = 0;
+    for(Selection_set_facet::iterator fb = selected_facets.begin(); fb != selected_facets.end(); ++fb, ++counter) {
+      Polyhedron::Halfedge_around_facet_circulator hb((*fb)->facet_begin()), hend(hb);
+      do {
+        polygons[counter].push_back(hb->vertex()->id() -1);
+      } while(++hb != hend);
+    }
+    CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh<Polyhedron>(
+      points, polygons, *out);
+
+    return out->size_of_vertices() > 0;
+  }
+
+  void select_sharp_edges(const double angle)
+  {
+    CGAL::detect_sharp_edges(polyhedron(), angle);
+
+    BOOST_FOREACH(edge_descriptor e, edges(*polyhedron()))
+    {
+      Polyhedron::Halfedge_handle h = halfedge(e, *polyhedron());
+      if (h->is_feature_edge())
+        selected_edges.insert(e);
+    }
+    invalidateOpenGLBuffers();
+  }
+
+  void changed_with_poly_item() {
+    // no need to update indices
+    poly_item->invalidateOpenGLBuffers();
+    Q_EMIT poly_item->itemChanged();
+    Q_EMIT itemChanged();
+  }
+
+Q_SIGNALS:
+  void simplicesSelected(CGAL::Three::Scene_item*);
+
+public Q_SLOTS:
+  void invalidateOpenGLBuffers() {
+
+    // do not use decorator function, which calls changed on poly_item which cause deletion of AABB
+      //  poly_item->invalidateOpenGLBuffers();
+        are_buffers_filled = false;
+        compute_bbox();
+  }
+  // slots are called by signals of polyhedron_k_ring_selector
+  void selected(const std::set<Polyhedron::Vertex_handle>& m)
+  { has_been_selected(m); }
+  void selected(const std::set<Polyhedron::Facet_handle>& m)
+  { has_been_selected(m); }
+  void selected(const std::set<edge_descriptor>& m)
+  { has_been_selected(m); }
+  void poly_item_changed() {
+    remove_erased_handles<Vertex_handle>();
+    remove_erased_handles<edge_descriptor>();
+    remove_erased_handles<Facet_handle>();
+  }
+  void endSelection(){
+    Q_EMIT simplicesSelected(this);
+  }
+  void toggle_insert(bool b)
+  {
+   is_insert = b;
+  }
+
+protected:
+  bool eventFilter(QObject* /*target*/, QEvent * gen_event)
+  {
+    if(!visible() || !k_ring_selector.state.shift_pressing) { return false; }
+    if(gen_event->type() == QEvent::Wheel)
+    {
+      QWheelEvent *event = static_cast<QWheelEvent*>(gen_event);
+      int steps = event->delta() / 120;
+      expand_or_reduce(steps);
+      return true;
+    }
+    return false;
+  }
+
+  template<class HandleType>
+  void remove_erased_handles() {
+    typedef Selection_traits<HandleType, Scene_polyhedron_selection_item> Tr;
+    Tr tr(this);
+    if(tr.container().empty()) { return;}
+
+    std::vector<HandleType> exists;
+    for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) {
+      if(tr.container().count(*it)) {
+        exists.push_back(*it);
+      }
+    }
+    tr.container().clear();
+    for(typename std::vector<HandleType>::iterator it = exists.begin(); it != exists.end(); ++it) {
+      tr.container().insert(*it);
+    }
+  }
+
+  template<typename HandleRange>
+  bool treat_selection(const HandleRange& selection)
+  {
+    typedef typename HandleRange::value_type HandleType;
+    Selection_traits<HandleType, Scene_polyhedron_selection_item> tr(this);
+
+    bool any_change = false;
+    if(is_insert) {
+      BOOST_FOREACH(HandleType h, selection)
+        any_change |= tr.container().insert(h).second;
+    }
+    else{
+      BOOST_FOREACH(HandleType h, selection)
+        any_change |= (tr.container().erase(h)!=0);
+    }
+    if(any_change) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); }
+    return any_change;
+  }
+
+  Facet_handle face(Facet_handle fh)
+  { return fh; }
+  Facet_handle face(Vertex_handle)
+  { return boost::graph_traits<Polyhedron>::null_face(); }
+  Facet_handle face(edge_descriptor)
+  { return boost::graph_traits<Polyhedron>::null_face(); }
+
+  template<class HandleType>
+  void has_been_selected(const std::set<HandleType>& selection)
+  {
+    if(!visible()) { return; }
+
+
+    if (get_active_handle_type() == Active_handle::CONNECTED_COMPONENT)
+    {
+      Selection_traits<edge_descriptor,
+                       Scene_polyhedron_selection_item> tr(this);
+      tr.update_indices();
+      std::vector<bool> mark(tr.size(), false);
+      BOOST_FOREACH(edge_descriptor e, selected_edges)
+        mark[tr.id(e)] = true;
+      std::vector<Facet_handle> selected_cc;
+      CGAL::Polygon_mesh_processing::connected_component(
+        face(*selection.begin()),
+        *polyhedron(),
+        std::back_inserter(selected_cc),
+        CGAL::Polygon_mesh_processing::parameters::edge_is_constrained_map(
+          Is_selected_property_map<edge_descriptor>(mark)));
+       treat_selection(selected_cc);
+    }
+    else
+    {
+      treat_selection(selection);
+    }
+  }
+
+public:
+  Is_selected_property_map<edge_descriptor>
+    selected_edges_pmap(std::vector<bool>& mark)
+  {
+    Selection_traits<edge_descriptor,
+      Scene_polyhedron_selection_item> tr(this);
+    tr.update_indices();
+
+    for (unsigned int i = 0; i < mark.size(); ++i)
+      mark[i] = false;
+
+    BOOST_FOREACH(edge_descriptor e, selected_edges)
+      mark[tr.id(e)] = true;
+
+    return Is_selected_property_map<edge_descriptor>(mark);
+  }
+
+  Is_constrained_map<Selection_set_edge> constrained_edges_pmap()
+  {
+    return Is_constrained_map<Selection_set_edge>(selected_edges);
+  }
+
+  Is_constrained_map<Selection_set_vertex> constrained_vertices_pmap()
+  {
+    return Is_constrained_map<Selection_set_vertex>(selected_vertices);
+  }
+
+protected:
+  // members
+  std::string file_name_holder;
+  Scene_polyhedron_item_k_ring_selection k_ring_selector;
+  // action state
+  bool is_insert;
+
+public:
+// selection
+  Selection_set_vertex selected_vertices;
+  Selection_set_facet  selected_facets;
+  Selection_set_edge   selected_edges; // stores one halfedge for each pair (halfedge with minimum address)
+// 
+  QColor vertex_color, facet_color, edge_color;
+
+private:
+
+  mutable std::vector<float> positions_facets;
+  mutable std::vector<float> normals;
+  mutable std::vector<float> positions_lines;
+  mutable std::vector<float> positions_points;
+  mutable std::size_t nb_facets;
+  mutable std::size_t nb_points;
+  mutable std::size_t nb_lines;
+  mutable QOpenGLShaderProgram *program;
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+  void compute_elements() const;
+
+};
+
+#endif 
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_selection_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_selection_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item_config.h
new file mode 100644
index 0000000..c903bd1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item_config.h
@@ -0,0 +1,10 @@
+#ifndef SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_CONFIG_H
+#define SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_CONFIG_H
+
+#ifdef scene_polyhedron_shortest_path_item_EXPORTS
+#  define SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_EXPORT Q_DECL_EXPORT
+#else
+#  define SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_transform_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polyhedron_transform_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polyhedron_transform_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.cpp
new file mode 100644
index 0000000..b7b3f67
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.cpp
@@ -0,0 +1,682 @@
+#include "Scene_polylines_item.h"
+#include "create_sphere.h"
+
+#include <CGAL/bounding_box.h>
+#include <CGAL/gl.h>
+#include <QMenu>
+#include <QAction>
+
+#include <QInputDialog>
+
+class Scene_polylines_item_private {
+public:
+    typedef Scene_polylines_item::K K;
+    typedef K::Point_3 Point_3;
+
+    Scene_polylines_item_private() :
+        draw_extremities(false),
+        spheres_drawn_radius(0)
+    {}
+
+    void draw_sphere(const K::Point_3&, double) const;
+    void draw_spheres(const Scene_polylines_item*) const;
+
+    bool draw_extremities;
+    double spheres_drawn_radius;
+};
+
+void
+Scene_polylines_item::create_Sphere(float R) const
+{
+  create_flat_and_wire_sphere(R, positions_spheres, normals_spheres, positions_wire_spheres);
+}
+
+void
+Scene_polylines_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const
+{
+    QOpenGLShaderProgram *program;
+   //vao for the lines
+    {
+        program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+        program->bind();
+
+        vaos[Edges]->bind();
+        buffers[Edges_Vertices].bind();
+        buffers[Edges_Vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Edges_Vertices].release();
+        vaos[Edges]->release();
+        program->release();
+    }
+   //vao for the spheres
+    {
+        if(viewer->extension_is_found)
+        {
+            program = getShaderProgram(PROGRAM_INSTANCED, viewer);
+            program->bind();
+
+            vaos[Spheres]->bind();
+            buffers[Spheres_Vertices].bind();
+            buffers[Spheres_Vertices].allocate(positions_spheres.data(),
+                                static_cast<int>(positions_spheres.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[Spheres_Vertices].release();
+
+            buffers[Spheres_Normals].bind();
+            buffers[Spheres_Normals].allocate(normals_spheres.data(),
+                                static_cast<int>(normals_spheres.size()*sizeof(float)));
+            program->enableAttributeArray("normals");
+            program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+            buffers[Spheres_Normals].release();
+
+            buffers[Spheres_Colors].bind();
+            buffers[Spheres_Colors].allocate(color_spheres.data(),
+                                static_cast<int>(color_spheres.size()*sizeof(float)));
+            program->enableAttributeArray("colors");
+            program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+            buffers[Spheres_Colors].release();
+
+            buffers[Spheres_Center].bind();
+            buffers[Spheres_Center].allocate(positions_center.data(),
+                                static_cast<int>(positions_center.size()*sizeof(float)));
+            program->enableAttributeArray("center");
+            program->setAttributeBuffer("center",GL_FLOAT,0,3);
+            buffers[Spheres_Center].release();
+
+            viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1);
+            viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1);
+
+        }
+        else
+        {
+            program = getShaderProgram(PROGRAM_NO_SELECTION, viewer);
+            program->bind();
+
+            vaos[Spheres]->bind();
+            buffers[Spheres_Vertices].bind();
+            buffers[Spheres_Vertices].allocate(positions_center.data(),
+                                static_cast<int>(positions_center.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[Spheres_Vertices].release();
+
+            buffers[Spheres_Normals].bind();
+            buffers[Spheres_Normals].allocate(color_spheres.data(),
+                                static_cast<int>(color_spheres.size()*sizeof(float)));
+            program->enableAttributeArray("colors");
+            program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+            buffers[Spheres_Normals].release();
+        }
+        vaos[Spheres]->release();
+
+        program->release();
+    }
+
+//vao for the wired spheres
+    {
+        if(viewer->extension_is_found)
+        {
+            program = getShaderProgram(PROGRAM_INSTANCED_WIRE, viewer);
+            program->bind();
+
+            vaos[Wired_Spheres]->bind();
+            buffers[Wired_Spheres_Vertices].bind();
+            buffers[Wired_Spheres_Vertices].allocate(positions_wire_spheres.data(),
+                                static_cast<int>(positions_wire_spheres.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[Wired_Spheres_Vertices].release();
+
+            buffers[Spheres_Colors].bind();
+            program->enableAttributeArray("colors");
+            program->setAttributeBuffer("colors",GL_FLOAT,0,3);
+            buffers[Spheres_Colors].release();
+
+            buffers[Spheres_Normals].bind();
+            program->enableAttributeArray("normals");
+            program->setAttributeBuffer("normals",GL_FLOAT,0,3);
+            buffers[Spheres_Normals].release();
+
+
+            buffers[Spheres_Center].bind();
+            program->enableAttributeArray("center");
+            program->setAttributeBuffer("center",GL_FLOAT,0,3);
+            buffers[Spheres_Center].release();
+
+
+            viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1);
+            viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1);
+
+            vaos[Wired_Spheres]->release();
+            program->release();
+
+            nb_lines = positions_lines.size();
+            positions_lines.resize(0);
+            std::vector<float>(positions_lines).swap(positions_lines);
+            nb_spheres = positions_spheres.size();
+            positions_spheres.resize(0);
+            std::vector<float>(positions_spheres).swap(positions_spheres);
+            normals_spheres.resize(0);
+            std::vector<float>(normals_spheres).swap(normals_spheres);
+            color_spheres.resize(0);
+            std::vector<float>(color_spheres).swap(color_spheres);
+            nb_centers = positions_center.size();
+            positions_center.resize(0);
+            std::vector<float>(positions_center).swap(positions_center);
+            nb_wire = positions_wire_spheres.size();
+            positions_wire_spheres.resize(0);
+            std::vector<float>(positions_wire_spheres).swap(positions_wire_spheres);
+        }
+    }
+
+   are_buffers_filled = true;
+
+}
+void
+Scene_polylines_item::compute_elements() const
+{
+    positions_spheres.resize(0);
+    positions_wire_spheres.resize(0);
+    positions_lines.resize(0);
+    color_spheres.resize(0);
+    normals_spheres.resize(0);
+    positions_center.resize(0);
+    nbSpheres = 0;
+
+    //Fills the VBO with the lines
+    for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
+        it != polylines.end();
+        ++it){
+        if(it->empty()) continue;
+        for(size_t i = 0, end = it->size()-1;
+            i < end; ++i)
+        {
+            const Point_3& a = (*it)[i];
+            const Point_3& b = (*it)[i+1];
+            positions_lines.push_back(a.x());
+            positions_lines.push_back(a.y());
+            positions_lines.push_back(a.z());
+            positions_lines.push_back(1.0);
+
+            positions_lines.push_back(b.x());
+            positions_lines.push_back(b.y());
+            positions_lines.push_back(b.z());
+            positions_lines.push_back(1.0);
+
+        }
+
+    }
+    //Fills the VBO with the spheres
+    if(d->draw_extremities)
+    {
+
+        // FIRST, count the number of incident cycles and polylines
+        // for all extremities.
+        typedef std::map<Point_3, int> Point_to_int_map;
+        typedef Point_to_int_map::iterator iterator;
+        Point_to_int_map corner_polyline_nb;
+
+        { // scope to fill corner_polyline_nb'
+            Point_to_int_map corner_cycles_nb;
+
+            for(std::list<std::vector<Point_3> >::const_iterator
+                it = this->polylines.begin(),
+                end = this->polylines.end();
+                it != end; ++it)
+            {
+                const K::Point_3& a = *it->begin();
+                const K::Point_3& b = *it->rbegin();
+                if(a == b) {
+                    if ( it->size()>1 )
+                        ++corner_cycles_nb[a];
+                    else
+                        ++corner_polyline_nb[a];
+                }
+                else {
+                    ++corner_polyline_nb[a];
+                    ++corner_polyline_nb[b];
+                }
+            }
+            // THEN, ignore points that are incident to one cycle only.
+            for(iterator
+                c_it = corner_cycles_nb.begin(),
+                end = corner_cycles_nb.end();
+                c_it != end; ++c_it)
+            {
+                const Point_3& a = c_it->first;
+
+                iterator p_it = corner_polyline_nb.find(a);
+
+                // If the point 'a'=c_it->first has only incident cycles...
+                if(p_it == corner_polyline_nb.end()) {
+                    // ...then count it as a corner only if it has two incident cycles
+                    // or more.
+                    if(c_it->second > 1) {
+                        corner_polyline_nb[a] = c_it->second;
+                    }
+                } else {
+                    // else add the number of cycles.
+                    p_it->second += c_it->second;
+                }
+            }
+        }
+        // At this point, 'corner_polyline_nb' gives the multiplicity of all
+        // corners.
+        //Finds the centers of the spheres and their color
+        for(iterator
+            p_it = corner_polyline_nb.begin(),
+            end = corner_polyline_nb.end();
+            p_it != end; ++p_it)
+        {
+            nbSpheres++;
+            const K::Point_3& centre = p_it->first;
+            positions_center.push_back(centre.x());
+            positions_center.push_back(centre.y());
+            positions_center.push_back(centre.z());
+
+            float colors[3];
+            switch(p_it->second) {
+            case 1:
+                colors[0] = 0.0; // black
+                colors[1] = 0.0;
+                colors[2] = 0.0;
+                break;
+            case 2:
+                colors[0] = 0.0; // green
+                colors[1] = 0.8f;
+                colors[2] = 0.0;
+                break;
+            case 3:
+                colors[0] = 0.0; // blue
+                colors[1] = 0.0;
+                colors[2] = 0.8f;
+                break;
+            case 4:
+                colors[0] = 0.8f; //red
+                colors[1] = 0.0;
+                colors[2] = 0.0;
+                break;
+            default:
+                colors[0] = 0.8f; //fuschia
+                colors[1] = 0.0;
+                colors[2] = 0.8f;
+            }
+
+            color_spheres.push_back(colors[0]);
+            color_spheres.push_back(colors[1]);
+            color_spheres.push_back(colors[2]);
+            color_wire_spheres.push_back(colors[0]);
+            color_wire_spheres.push_back(colors[1]);
+            color_wire_spheres.push_back(colors[2]);
+            color_wire_spheres.push_back(colors[0]);
+            color_wire_spheres.push_back(colors[1]);
+            color_wire_spheres.push_back(colors[2]);
+        }
+        create_Sphere(d->spheres_drawn_radius);
+
+    }
+}
+
+
+Scene_polylines_item::Scene_polylines_item() 
+    :CGAL::Three::Scene_item(NbOfVbos,NbOfVaos)
+    ,d(new Scene_polylines_item_private())
+    ,nbSpheres(0)
+{
+    setRenderingMode(FlatPlusEdges);
+    nb_spheres = 0;
+    nb_wire = 0;
+    nb_centers = 0;
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+
+}
+
+Scene_polylines_item::~Scene_polylines_item()
+{
+    delete d;
+
+}
+
+bool
+Scene_polylines_item::isEmpty() const {
+    return polylines.empty();
+}
+
+void
+Scene_polylines_item::compute_bbox() const {
+    typedef K::Iso_cuboid_3 Iso_cuboid_3;
+
+    if(isEmpty())
+    {
+        _bbox =Bbox();
+        return;
+    }
+    std::list<Point_3> boxes;
+    for(std::list<std::vector<Point_3> >::const_iterator it = polylines.begin();
+        it != polylines.end();
+        ++it){
+        if(it->begin() != it->end()) {
+            Iso_cuboid_3 cub = CGAL::bounding_box(it->begin(), it->end());
+            boxes.push_back((cub.min)());
+            boxes.push_back((cub.max)());
+        }
+    }
+    Iso_cuboid_3 bbox =
+            boxes.begin() != boxes.end() ?
+                CGAL::bounding_box(boxes.begin(), boxes.end()) :
+                Iso_cuboid_3();
+
+    _bbox = Bbox(bbox.xmin(),
+                bbox.ymin(),
+                bbox.zmin(),
+                bbox.xmax(),
+                bbox.ymax(),
+                bbox.zmax());
+}
+
+Scene_polylines_item* 
+Scene_polylines_item::clone() const {
+    Scene_polylines_item* item = new Scene_polylines_item;
+    item->polylines = polylines;
+    QVariant metadata_variant = property("polylines metadata");
+    if(metadata_variant.type() == QVariant::StringList)
+    {
+        item->setProperty("polylines metadata", metadata_variant);
+    }
+    return item;
+}
+
+QString
+Scene_polylines_item::toolTip() const {
+    QString s =
+            tr("<p><b>%1</b> (mode: %2, color: %3)<br />"
+               "<i>Polylines</i></p>"
+               "<p>Number of polylines: %4</p>")
+            .arg(this->name())
+            .arg(this->renderingModeName())
+            .arg(this->color().name())
+            .arg(polylines.size());
+    if(d->draw_extremities) {
+        s += tr("<p>Legende of endpoints colors: <ul>"
+                "<li>black: one incident polyline</li>"
+                "<li>green: two incident polylines</li>"
+                "<li>blue: three incident polylines</li>"
+                "<li>red: four incident polylines</li>"
+                "<li>fuchsia: five or more incident polylines</li>"
+                "</ul></p>");
+    }
+    return s;
+}
+
+bool
+Scene_polylines_item::supportsRenderingMode(RenderingMode m) const {
+    return (m == Wireframe ||
+            m == FlatPlusEdges ||
+            m == Points);
+}
+
+// Shaded OpenGL drawing: only draw spheres
+void
+Scene_polylines_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+    if(d->draw_extremities)
+    {
+        if(viewer->extension_is_found)
+        {
+            vaos[Spheres]->bind();
+            QOpenGLShaderProgram* program = getShaderProgram(PROGRAM_INSTANCED);
+            attrib_buffers(viewer, PROGRAM_INSTANCED);
+            program->bind();
+            viewer->glDrawArraysInstanced(GL_TRIANGLES, 0,
+                                          static_cast<GLsizei>(nb_spheres/3), nbSpheres);
+            program->release();
+            vaos[Spheres]->release();
+        }
+        else
+        {
+            vaos[Spheres]->bind();
+            QOpenGLShaderProgram* program = getShaderProgram(PROGRAM_NO_SELECTION);
+            attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+            glPointSize(8.0f);
+            glEnable(GL_POINT_SMOOTH);
+            program->bind();
+            viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_centers/3));
+            glDisable(GL_POINT_SMOOTH);
+            program->release();
+            vaos[Spheres]->release();
+        }
+    }
+}
+
+// Wireframe OpenGL drawing
+void 
+Scene_polylines_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+
+    vaos[Edges]->bind();
+    attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+    QOpenGLShaderProgram *program = getShaderProgram(PROGRAM_NO_SELECTION);
+    program->bind();
+    program->setAttributeValue("colors", this->color());
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/4));
+    program->release();
+    vaos[Edges]->release();
+    if(d->draw_extremities)
+    {
+        if(viewer->extension_is_found)
+        {
+            vaos[Wired_Spheres]->bind();
+            attrib_buffers(viewer, PROGRAM_INSTANCED_WIRE);
+            program = getShaderProgram(PROGRAM_INSTANCED_WIRE);
+            program->bind();
+            viewer->glDrawArraysInstanced(GL_LINES, 0,
+                                          static_cast<GLsizei>(nb_wire/3), nbSpheres);
+            program->release();
+            vaos[Wired_Spheres]->release();
+        }
+    }
+
+}
+
+void 
+Scene_polylines_item::draw_points(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+    {
+        compute_elements();
+        initialize_buffers(viewer);
+    }
+
+    vaos[Edges]->bind();
+    attrib_buffers(viewer, PROGRAM_NO_SELECTION);
+    QOpenGLShaderProgram *program = getShaderProgram(PROGRAM_NO_SELECTION);
+    program->bind();
+    QColor temp = this->color();
+    program->setAttributeValue("colors", temp);
+    viewer->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(nb_lines/4));
+    // Clean-up
+   vaos[Edges]->release();
+   program->release();
+}
+
+QMenu* Scene_polylines_item::contextMenu() 
+{
+    const char* prop_name = "Menu modified by Scene_polylines_item.";
+
+    QMenu* menu = Scene_item::contextMenu();
+
+    // Use dynamic properties:
+    // http://doc.qt.io/qt-5/qobject.html#property
+    bool menuChanged = menu->property(prop_name).toBool();
+
+    if(!menuChanged) {
+        menu->addSeparator();
+        // TODO: add actions to display corners
+        QAction* action = menu->addAction(tr("Display corners with radius..."));
+        connect(action, SIGNAL(triggered()),
+                this, SLOT(change_corner_radii()));
+
+        QAction* actionSmoothPolylines =
+                menu->addAction(tr("Smooth polylines"));
+        actionSmoothPolylines->setObjectName("actionSmoothPolylines");
+        connect(actionSmoothPolylines, SIGNAL(triggered()),this, SLOT(smooth()));
+        menu->setProperty(prop_name, true);
+    }
+    return menu;
+}
+
+void Scene_polylines_item::invalidateOpenGLBuffers()
+{
+    are_buffers_filled = false;
+    compute_bbox();
+
+
+}
+
+void Scene_polylines_item::change_corner_radii() {
+    bool ok = true;
+    double proposed_radius = d->spheres_drawn_radius;
+    if(proposed_radius == 0) {
+        CGAL::Three::Scene_interface::Bbox b = bbox();
+        proposed_radius = (std::max)(b.xmax - b.xmin,
+                                     proposed_radius);
+        proposed_radius = (std::max)(b.ymax - b.ymin,
+                                     proposed_radius);
+        proposed_radius = (std::max)(b.zmax - b.zmin,
+                                     proposed_radius);
+        proposed_radius /= 100;
+    }
+    double r = QInputDialog::getDouble(NULL,
+                                       tr("Display corners with new radius..."),
+                                       tr("Radius:"),
+                                       proposed_radius, // value
+                                       0.,          // min
+                                       2147483647., // max
+                                       10,          // decimals
+                                       &ok);
+    if(ok) {
+        change_corner_radii(r);
+    }
+}
+
+void Scene_polylines_item::change_corner_radii(double r) {
+    if(r >= 0) {
+        d->spheres_drawn_radius = r;
+        d->draw_extremities = (r > 0);
+        this->invalidateOpenGLBuffers();
+    Q_EMIT itemChanged();
+    }
+}
+
+void Scene_polylines_item::split_at_sharp_angles()
+{
+    typedef Polylines_container Bare_polyline_container;
+    typedef Polyline Bare_polyline;
+    Polylines_container& bare_polylines = polylines;
+
+    int counter = 0;
+    for(Bare_polyline_container::iterator
+        bare_polyline_it = bare_polylines.begin();
+        bare_polyline_it != bare_polylines.end(); // the end changes
+        // during the loop
+        ++counter /* bare_polyline_it is incremented in the loop */)
+    {
+        Bare_polyline_container::iterator current_polyline_it =
+                bare_polyline_it;
+        Bare_polyline& bare_polyline = *bare_polyline_it;
+        Bare_polyline::iterator it = boost::next(bare_polyline.begin());
+
+        if(boost::next(bare_polyline.begin()) == bare_polyline.end())
+        {
+            std::cerr << "WARNING: Isolated point in polylines\n";
+            bare_polyline_it = bare_polylines.erase(bare_polyline_it);
+            continue;
+        }
+        else
+            ++bare_polyline_it;
+        if(it != bare_polyline.end()) {
+            for(; it != boost::prior(bare_polyline.end()); ++it) {
+                const Point_3 pv = *it;
+                const Point_3 pa = *boost::prior(it);
+                const Point_3 pb = *boost::next(it);
+                const K::Vector_3 av = pv - pa;
+                const K::Vector_3 bv = pv - pb;
+                const K::FT sc_prod = av * bv;
+                if( sc_prod >= 0 ||
+                        (sc_prod < 0 &&
+                         CGAL::square(sc_prod) < (av * av) * (bv * bv) / 4 ) )
+                {
+#ifdef PROTECTION_DEBUG
+                    std::cerr << "Split polyline (small angle) "
+                              <<  std::acos(sqrt(CGAL::square(sc_prod) /
+                                                 ((av*av) * (bv*bv)))) * 180 /CGAL_PI
+                               << " degres\n";
+#endif
+                    Bare_polyline new_polyline;
+                    std::copy(it, bare_polyline.end(),
+                              std::back_inserter(new_polyline));
+
+                    if(*bare_polyline.begin() == *bare_polyline.rbegin()) {
+                        // if the polyline is a cycle, test if its beginning is a sharp
+                        // angle...
+                        const Point_3 pv = *bare_polyline.begin();
+                        const Point_3 pa = *boost::prior(boost::prior(bare_polyline.end()));
+                        const Point_3 pb = *boost::next(bare_polyline.begin());
+                        const K::Vector_3 av = pv - pa;
+                        const K::Vector_3 bv = pv - pb;
+                        const K::FT sc_prod = av * bv;
+                        if( sc_prod >= 0 ||
+                                (sc_prod < 0 &&
+                                 CGAL::square(sc_prod) < (av * av) * (bv * bv) / 4 ) )
+                        {
+                            // if its beginning is a sharp angle, then split
+                            bare_polyline.erase(boost::next(it), bare_polyline.end());
+                        }
+                        else {
+                            // ...if not, modifies its beginning
+                            std::copy(boost::next(bare_polyline.begin()),
+                                      boost::next(it),
+                                      std::back_inserter(new_polyline));
+                            bare_polylines.erase(current_polyline_it);
+                        }
+                    }
+                    else {
+                        bare_polyline.erase(boost::next(it), bare_polyline.end());
+                    }
+                    bare_polylines.push_back(new_polyline);
+                    break;
+                }
+            }
+        }
+    }
+  Q_EMIT itemChanged();
+}
+
+void
+Scene_polylines_item::merge(Scene_polylines_item* other_item) {
+    if(other_item == 0) return;
+    std::copy(other_item->polylines.begin(),
+              other_item->polylines.end(),
+              std::back_inserter(polylines));
+    QVariant other_metadata_variant = other_item->property("polylines metadata");
+    if(other_metadata_variant.type() == QVariant::StringList)
+    {
+        QStringList metadata = property("polylines metadata").toStringList();
+        metadata.append(other_metadata_variant.toStringList());
+        setProperty("polylines metadata", metadata);
+    }
+    invalidateOpenGLBuffers();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.h
new file mode 100644
index 0000000..480744c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item.h
@@ -0,0 +1,135 @@
+#ifndef SCENE_POLYLINES_ITEM_H
+#define SCENE_POLYLINES_ITEM_H
+#include "Scene_polylines_item_config.h"
+#include <CGAL/Three/Viewer_interface.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Three/Scene_item.h>
+
+#include <QString>
+#include <QMenu>
+
+#include <list>
+#include <vector>
+
+class Scene_polylines_item_private;
+
+class SCENE_POLYLINES_ITEM_EXPORT Scene_polylines_item : public CGAL::Three::Scene_item
+{
+    Q_OBJECT
+public:
+    typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+    typedef K::Point_3 Point_3;
+    typedef std::vector<Point_3> Polyline;
+    typedef std::list<Polyline> Polylines_container;
+
+    Scene_polylines_item();
+    virtual ~Scene_polylines_item();
+
+    bool isFinite() const { return true; }
+    bool isEmpty() const;
+    void compute_bbox() const;
+
+    Scene_polylines_item* clone() const;
+
+    QString toolTip() const;
+
+    // Indicate if rendering mode is supported
+    bool supportsRenderingMode(RenderingMode m) const;
+
+    QMenu* contextMenu();
+
+    // Flat/Gouraud OpenGL drawing
+    void draw() const {}
+    void draw(CGAL::Three::Viewer_interface*) const;
+
+    // Wireframe OpenGL drawing
+    void draw_edges() const{}
+    void draw_edges(CGAL::Three::Viewer_interface*) const;
+
+    void draw_points() const{}
+    void draw_points(CGAL::Three::Viewer_interface*) const;
+
+
+    void smooth(std::vector<Point_3>& polyline){
+        bool is_closed = polyline.front()==polyline.back();
+        typedef K::Vector_3 Vector_3;
+
+        std::size_t start = is_closed ? 0:1;
+        std::size_t end   = polyline.size()-1;
+
+        Vector_3 prev = (is_closed ? polyline[end-1] : polyline[0]) - CGAL::ORIGIN;
+
+        for (std::size_t i=start; i!=end; ++i)
+        {
+            Vector_3 curr = polyline[i] - CGAL::ORIGIN;
+            Vector_3 next = polyline[i+1] - CGAL::ORIGIN;
+
+            polyline[i] = CGAL::ORIGIN+(prev+2*curr+next)/4;
+            prev=curr;
+        }
+
+        if (is_closed) polyline[end]=polyline[0];
+    }
+
+public Q_SLOTS:
+    virtual void invalidateOpenGLBuffers();
+    void change_corner_radii(double);
+    void change_corner_radii();
+    void split_at_sharp_angles();
+
+    void merge(Scene_polylines_item*);
+
+    void smooth(){
+        for (Polylines_container::iterator pit=polylines.begin(),pit_end=polylines.end();pit!=pit_end;++pit)
+            smooth(*pit);
+      invalidateOpenGLBuffers();
+      Q_EMIT itemChanged();
+    }
+public:
+    Polylines_container polylines;
+
+    // http://en.wikipedia.org/wiki/D-pointer
+    Scene_polylines_item_private* d;
+private:
+
+    enum VAOs {
+        Edges=0,
+        Spheres,
+        Wired_Spheres,
+        NbOfVaos = Wired_Spheres+1
+    };
+    enum VBOs {
+        Edges_Vertices = 0,
+        Spheres_Vertices,
+        Spheres_Normals,
+        Spheres_Colors,
+        Spheres_Center,
+        Wired_Spheres_Vertices,
+        NbOfVbos = Wired_Spheres_Vertices+1
+    };
+
+    mutable std::vector<float> positions_lines;
+    mutable std::vector<float> positions_spheres;
+    mutable std::vector<float> positions_wire_spheres;
+    mutable std::vector<float> positions_center;
+    mutable std::vector<float> normals_spheres;
+    mutable std::vector<float> color_spheres;
+    mutable std::vector<float> color_wire_spheres;
+    mutable std::size_t nb_spheres;
+    mutable std::size_t nb_wire;
+    mutable std::size_t nb_centers;
+    mutable std::size_t nb_lines;
+    mutable   GLuint nbSpheres;
+    typedef std::map<Point_3, int> Point_to_int_map;
+    typedef Point_to_int_map::iterator iterator;
+    void create_Sphere(float) const;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+    using CGAL::Three::Scene_item::compute_elements;
+    void compute_elements() const;
+
+
+
+}; // end class Scene_polylines_item
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_polylines_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_polylines_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.cpp
new file mode 100644
index 0000000..6959eb2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.cpp
@@ -0,0 +1,862 @@
+#include "config.h"
+
+#include "Scene_segmented_image_item.h"
+#include "Image_type.h"
+#include <QColor>
+#include <map>
+#include <CGAL/gl.h>
+#include <CGAL/ImageIO.h>
+#include <CGAL/use.h>
+
+
+
+// -----------------------------------
+// Internal classes
+// -----------------------------------
+namespace internal {
+
+class Image_accessor
+{
+public:
+  Image_accessor(const Image& im, int dx=1, int dy=1, int dz=1);
+  
+  bool is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const;
+  const QColor& vertex_color(std::size_t i, std::size_t j, std::size_t k) const;
+  void normal(std::size_t i, std::size_t j, std::size_t k,
+              float& x, float& y, float& z) const;
+  
+  int dx() const { return dx_; }
+  int dy() const { return dy_; }
+  int dz() const { return dz_; }
+  std::size_t xdim() const { return im_.xdim(); }
+  std::size_t ydim() const { return im_.ydim(); }
+  std::size_t zdim() const { return im_.zdim(); }
+  double vx() const { return im_.vx(); }
+  double vy() const { return im_.vy(); }
+  double vz() const { return im_.vz(); }
+  
+private:
+  unsigned char non_null_neighbor_data(std::size_t i,
+                                       std::size_t j,
+                                       std::size_t k) const;
+  
+  unsigned char image_data(std::size_t i, std::size_t j, std::size_t k) const;
+  
+  void add_to_normal(unsigned char v,
+                     float& x, float& y, float& z,
+                     int dx, int dy, int dz) const;
+  
+private:
+  const Image& im_;
+  int dx_, dy_, dz_;
+  const QColor default_color_;
+  std::map<unsigned char, QColor> colors_;
+};
+
+
+Image_accessor::Image_accessor(const Image& im, int dx, int dy, int dz)
+: im_(im)
+, dx_(dx)
+, dy_(dy)
+, dz_(dz)
+, default_color_()
+, colors_()
+{
+  const std::size_t xdim = im_.xdim();
+  const std::size_t ydim = im_.ydim();
+  const std::size_t zdim = im_.zdim();  
+  
+  for(std::size_t i=0 ; i<xdim ; i+=dx_)
+  { 
+    for(std::size_t j=0 ; j<ydim ; j+=dy_)
+    { 
+      for(std::size_t k=0 ; k<zdim ; k+=dz_)
+      {
+        unsigned char c = image_data(i,j,k);
+        if ( 0 != c ) { colors_.insert(std::make_pair(c,QColor())); }
+      }
+    }
+  }
+  
+  int i=0;
+  const double starting_hue = 45./360.; // magenta
+  for ( std::map<unsigned char, QColor>::iterator it = colors_.begin(),
+       end = colors_.end() ; it != end ; ++it, ++i )
+  {
+    double hue =  starting_hue + 1./colors_.size() * i;
+    if ( hue > 1. ) { hue -= 1.; }
+    it->second = QColor::fromHsvF(hue, .75, .75);
+  }
+}
+
+bool 
+Image_accessor::
+is_vertex_active(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char v1 = image_data(i-dx_, j-dy_, k-dz_);
+  unsigned char v2 = image_data(i-dx_, j-dy_, k  );
+  unsigned char v3 = image_data(i-dx_, j    , k-dz_);
+  unsigned char v4 = image_data(i-dx_, j    , k  );
+  unsigned char v5 = image_data(i    , j-dy_, k-dz_);
+  unsigned char v6 = image_data(i    , j-dy_, k  );
+  unsigned char v7 = image_data(i    , j    , k-dz_);
+  unsigned char v8 = image_data(i    , j    , k  );
+  
+  // don't draw interior vertices
+  if ( v1 != 0 && v2 != 0 && v3 != 0 && v4 != 0 && 
+       v5 != 0 && v6 != 0 && v7 != 0 && v8 != 0 )
+  {
+    return false;
+  }
+  
+  return ( v1 != 0 || v2 != 0 || v3 != 0 || v4 != 0 || 
+           v5 != 0 || v6 != 0 || v7 != 0 || v8 != 0 ); 
+}
+
+const QColor&
+Image_accessor::vertex_color(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char c = non_null_neighbor_data(i,j,k);
+  if ( 0 == c ) { return default_color_; }
+  
+  std::map<unsigned char, QColor>::const_iterator color = colors_.find(c);
+  if ( colors_.end() == color ) { return default_color_; }
+  
+  return color->second;
+}
+
+unsigned char
+Image_accessor::image_data(std::size_t i, std::size_t j, std::size_t k) const
+{
+  if ( i<im_.xdim() && j<im_.ydim() && k<im_.zdim() )
+    return CGAL::IMAGEIO::static_evaluate<unsigned char>(im_.image(),i,j,k);
+  else
+    return 0;
+}
+
+unsigned char
+Image_accessor::
+non_null_neighbor_data(std::size_t i, std::size_t j, std::size_t k) const
+{
+  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i-dx_, j-dy_, k  );
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i-dx_, j    , k-dz_);
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i-dx_, j    , k  );
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i    , j-dy_, k-dz_);
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i    , j-dy_, k  );
+  if ( v != 0 ) { return v; }
+  
+  v = image_data(i    , j    , k-dz_);
+  if ( v != 0 ) { return v; }
+
+  v = image_data(i    , j    , k  );
+  if ( v != 0 ) { return v; }
+  
+  return 0;
+}
+
+void
+Image_accessor::
+normal(std::size_t i, std::size_t j, std::size_t k,
+       float& x, float& y, float& z) const
+{
+  unsigned char v = image_data(i-dx_, j-dy_, k-dz_);
+  add_to_normal(v,x,y,z,       1    , 1    , 1);
+  
+  v = image_data(        i-dx_, j-dy_, k);
+  add_to_normal(v,x,y,z, 1    , 1    , -1);
+  
+  v = image_data(        i-dx_, j    , k-dz_);
+  add_to_normal(v,x,y,z, 1    , -1   , 1);
+  
+  v = image_data(        i-dx_, j    , k  );
+  add_to_normal(v,x,y,z, 1    , -1   , -1);
+  
+  v = image_data(        i    , j-dy_, k-dz_);
+  add_to_normal(v,x,y,z, -1   , 1    , 1);
+  
+  v = image_data(        i    , j-dy_, k  );
+  add_to_normal(v,x,y,z, -1   , 1    , -1);
+  
+  v = image_data(        i    , j    , k-dz_);
+  add_to_normal(v,x,y,z, -1   , -1   , 1);
+  
+  v = image_data(        i    , j    , k);
+  add_to_normal(v,x,y,z, -1   , -1   , -1);
+}
+
+void
+Image_accessor::
+add_to_normal(unsigned char v,
+              float& x, float& y, float& z,
+              int dx, int dy, int dz) const
+{
+  if ( 0 != v )
+  {
+    x += dx;
+    y += dy;
+    z += dz;    
+  }
+}
+
+
+
+class Vertex_buffer_helper
+{
+public:
+  Vertex_buffer_helper(const Image_accessor& data);
+  
+  void fill_buffer_data();
+
+  const GLfloat* colors() const { return &(colors_[0]); }
+  const GLfloat* normals() const { return &(normals_[0]); }
+  const GLfloat* vertices() const { return &(vertices_[0]); }
+  const GLuint* quads() const { return &(quads_[0]); }
+  
+  std::size_t color_size() const { return colors_.size()*sizeof(GLfloat); }
+  std::size_t normal_size() const { return normals_.size()*sizeof(GLfloat); }
+  std::size_t vertex_size() const { return vertices_.size()*sizeof(GLfloat); }
+  std::size_t quad_size() const { return quads_.size()*sizeof(GLuint); }
+  
+private:
+  void treat_vertex(std::size_t i, std::size_t j, std::size_t k);
+  
+  void push_color(std::size_t i, std::size_t j, std::size_t k);
+  void push_normal(std::size_t i, std::size_t j, std::size_t k);
+  void push_vertex(std::size_t i, std::size_t j, std::size_t k);
+  void push_quads(std::size_t i, std::size_t j, std::size_t k);
+  void push_quad(int pos1, int pos2, int pos3, int pos4);
+  
+  int compute_position(std::size_t i, std::size_t j, std::size_t k) const;
+  int vertex_index(std::size_t i, std::size_t j, std::size_t k) const;
+  
+  int dx() const { return data_.dx(); }
+  int dy() const { return data_.dy(); }
+  int dz() const { return data_.dz(); }
+  
+private:
+  static int vertex_not_found_;
+  
+  const Image_accessor& data_;
+  typedef std::map<int, std::size_t> Indices;
+  Indices indices_;
+  std::vector<GLfloat> colors_, normals_, vertices_;
+  std::vector<GLuint> quads_;
+};
+
+int Vertex_buffer_helper::vertex_not_found_ = -1;
+
+Vertex_buffer_helper::
+Vertex_buffer_helper(const Image_accessor& data)
+  : data_(data)
+{}
+
+
+void
+Vertex_buffer_helper::
+fill_buffer_data()
+{
+  std::size_t i,j,k;
+  
+  for ( i = 0 ; i <= data_.xdim() ; i+=dx() )
+  {  
+    for ( j = 0 ; j <= data_.ydim() ; j+=dy() )
+    {   
+      for ( k = 0 ; k <= data_.zdim() ; k+=dz() )
+      {
+        treat_vertex(i,j,k);
+      }
+    }
+  }
+}
+
+void
+Vertex_buffer_helper::treat_vertex(std::size_t i, std::size_t j, std::size_t k)
+{
+  if ( data_.is_vertex_active(i,j,k) )
+  {
+    push_vertex(i,j,k);
+    push_color(i,j,k);
+    push_normal(i,j,k);
+    push_quads(i,j,k);    
+  }
+}
+
+void
+Vertex_buffer_helper::push_color(std::size_t i, std::size_t j, std::size_t k)
+{
+  const QColor& color = data_.vertex_color(i,j,k);
+  if ( ! color.isValid() ) { return; }
+  
+  colors_.push_back(color.red()/255.f);
+  colors_.push_back(color.green()/255.f);
+  colors_.push_back(color.blue()/255.f);
+}
+
+void
+Vertex_buffer_helper::push_normal(std::size_t i, std::size_t j, std::size_t k)
+{
+  float x=0.f, y=0.f, z=0.f;
+  data_.normal(i,j,k,x,y,z);
+  
+  float norm = std::sqrt(x*x+y*y+z*z);
+  x = x / norm;
+  y = y / norm;
+  z = z / norm;
+  
+  normals_.push_back(x);
+  normals_.push_back(y);
+  normals_.push_back(z);
+}
+
+void
+Vertex_buffer_helper::push_vertex(std::size_t i, std::size_t j, std::size_t k)
+{
+  indices_.insert(std::make_pair(compute_position(i,j,k),
+                                 vertices_.size()/3)); 
+  
+  vertices_.push_back( (i - 0.5) * data_.vx());
+  vertices_.push_back( (j - 0.5) * data_.vy());
+  vertices_.push_back( (k - 0.5) * data_.vz());
+}
+
+void
+Vertex_buffer_helper::push_quads(std::size_t i, std::size_t j, std::size_t k)
+{
+  int pos1 = vertex_index(i-dx(), j     , k);
+  int pos2 = vertex_index(i-dx(), j-dy(), k);
+  int pos3 = vertex_index(i     , j-dy(), k);
+  int pos4 = vertex_index(i     ,j      , k);
+  push_quad(pos1, pos2, pos3, pos4);
+  
+  pos1 = vertex_index(i-dx(), j, k);
+  pos2 = vertex_index(i-dx(), j, k-dz());
+  pos3 = vertex_index(i     , j, k-dz());
+  push_quad(pos1, pos2, pos3, pos4);
+
+  pos1 = vertex_index(i, j-dy(), k);
+  pos2 = vertex_index(i, j-dy(), k-dz());
+  pos3 = vertex_index(i, j     , k-dz());
+  push_quad(pos1, pos2, pos3, pos4);
+}
+
+void
+Vertex_buffer_helper::push_quad(int pos1, int pos2, int pos3, int pos4)
+{
+  if (   pos1 != vertex_not_found_
+      && pos2 != vertex_not_found_
+      && pos3 != vertex_not_found_ )
+  {
+    quads_.push_back(pos1);
+    quads_.push_back(pos2);
+    quads_.push_back(pos3);
+    quads_.push_back(pos1);
+    quads_.push_back(pos3);
+    quads_.push_back(pos4);
+  }
+}
+
+int
+Vertex_buffer_helper::
+compute_position(std::size_t i, std::size_t j, std::size_t k) const
+{
+  return  static_cast<int>(
+    i/dx() * (data_.ydim()/dy()+1) * (data_.zdim()/dz()+1)
+         + j/dy() * (data_.zdim()/dz()+1)
+         + k/dz());
+}
+
+int
+Vertex_buffer_helper::
+vertex_index(std::size_t i, std::size_t j, std::size_t k) const
+{
+  if ( i > data_.xdim() || j > data_.ydim() || k > data_.zdim() )
+  {
+    return vertex_not_found_;
+  }
+  
+  int vertex_key = compute_position(i,j,k);
+  Indices::const_iterator it = indices_.find(vertex_key);
+  if ( it != indices_.end() )
+  {
+    return static_cast<int>(it->second);
+  }
+  
+  return vertex_not_found_;
+}
+
+
+} // namespace internal
+
+
+// -----------------------------------
+// Scene_segmented_image_item
+// -----------------------------------
+Scene_segmented_image_item::Scene_segmented_image_item(Image* im,
+                                                       int display_scale)
+  : m_image(im)
+  , m_initialized(false)
+  , m_voxel_scale(display_scale)
+
+{
+  CGAL_USE(display_scale);
+
+  v_box = new std::vector<float>();
+  compile_shaders();
+  initialize_buffers();
+  setRenderingMode(Flat);
+}
+
+
+Scene_segmented_image_item::~Scene_segmented_image_item()
+{
+    for(int i=0; i<vboSize; i++)
+        m_vbo[i].destroy();
+    for(int i=0; i<vaoSize; i++)
+        vao[i].destroy();
+}
+
+/**************************************************
+****************SHADER FUNCTIONS******************/
+
+void Scene_segmented_image_item::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        m_vbo[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+    m_ibo = new QOpenGLBuffer(QOpenGLBuffer::IndexBuffer);
+    m_ibo->create();
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 inColor;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying highp vec4 color; \n"
+        "void main(void)\n"
+        "{\n"
+        "   color=inColor; \n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "varying highp vec4 color; \n"
+        "uniform bool is_two_side; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N; \n"
+        "   if(fN == vec3(0.0,0.0,0.0)) \n"
+        "       N = vec3(0.0,0.0,0.0); \n"
+        "   else \n"
+        "       N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse; \n"
+        "   if(!is_two_side) \n"
+        "       diffuse = max(dot(N,L),0) * light_diff*color; \n"
+        "   else \n"
+        "       diffuse = max(abs(dot(N,L)),0) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+         "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+}
+
+void Scene_segmented_image_item::attrib_buffers(Viewer_interface* viewer) const
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    GLboolean isTwoSide;
+    viewer->glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE,&isTwoSide);
+    // define material
+     QVector4D	ambient;
+     QVector4D	diffuse;
+     QVector4D	specular;
+     GLfloat      shininess ;
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.0f;
+    specular[1] = 0.0f;
+    specular[2] = 0.0f;
+    specular[3] = 0.0f;
+    // Shininess
+    shininess = 51.2f;
+
+
+    rendering_program.bind();
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    twosideLocation = rendering_program.uniformLocation("is_two_side");
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(twosideLocation, isTwoSide);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program.release();
+}
+
+void
+Scene_segmented_image_item::compute_bbox() const
+{
+  if(!m_image)
+    _bbox = Bbox();
+  else
+    _bbox = Bbox(0, 0, 0,
+              m_image->xdim() * m_image->vx(),
+              m_image->ydim() * m_image->vy(),
+              m_image->zdim() * m_image->vz());
+}
+
+void
+Scene_segmented_image_item::draw(Viewer_interface* viewer) const
+{
+  if(m_image)
+  {
+
+    //m_image->gl_draw_bbox(3.0f,0,0,0);
+    draw_gl(viewer);
+  }
+}
+
+QString
+Scene_segmented_image_item::toolTip() const
+{
+  return tr("<p>Image <b>%1</b></p>"
+            "<p>Word type: %2</p>"
+            "<p>Dimensions: %3 x %4 x %5</p>"
+            "<p>Spacings: ( %6 , %7 , %8 )</p>")
+    .arg(this->name())
+    .arg("...")
+    .arg(m_image->xdim()) 
+    .arg(m_image->ydim())
+    .arg(m_image->zdim())
+    .arg(m_image->vx())
+    .arg(m_image->vy())
+    .arg(m_image->vz());
+}
+
+bool
+Scene_segmented_image_item::supportsRenderingMode(RenderingMode m) const
+{ 
+  switch ( m )
+  {
+    case Gouraud:
+      return false;
+      
+    case Points:
+    case Wireframe:
+    case Flat:
+    case FlatPlusEdges:
+      return true;
+      
+    default:
+      return false;
+  }
+  
+  return false;
+}
+
+void
+Scene_segmented_image_item::initialize_buffers() 
+{
+  internal::Image_accessor image_data_accessor (*m_image,
+                                                m_voxel_scale,
+                                                m_voxel_scale,
+                                                m_voxel_scale);
+  
+  internal::Vertex_buffer_helper helper (image_data_accessor);
+  helper.fill_buffer_data();
+
+  draw_Bbox(bbox(), v_box);
+  std::vector<float> nul_vec(0);
+  for(std::size_t i=0; i<v_box->size(); i++)
+      nul_vec.push_back(0.0);
+
+  rendering_program.bind();
+  vao[0].bind();
+  m_vbo[0].bind();
+  m_vbo[0].allocate(helper.vertices(), static_cast<int>(helper.vertex_size()));
+  poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+  rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+  m_vbo[0].release();
+
+  m_vbo[1].bind();
+  m_vbo[1].allocate(helper.normals(), static_cast<int>(helper.normal_size()));
+  normalsLocation[0] = rendering_program.attributeLocation("normal");
+  rendering_program.enableAttributeArray(normalsLocation[0]);
+  rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+  m_vbo[1].release();
+
+  m_vbo[2].bind();
+  m_vbo[2].allocate(helper.colors(), static_cast<int>(helper.color_size()));
+  colorLocation[0] = rendering_program.attributeLocation("inColor");
+  rendering_program.enableAttributeArray(colorLocation[0]);
+  rendering_program.setAttributeBuffer(colorLocation[0],GL_FLOAT,0,3);
+  m_vbo[2].release();
+
+  m_ibo->bind();
+  m_ibo->allocate(helper.quads(), static_cast<int>(helper.quad_size()));
+  vao[0].release();
+
+  color.resize(0);
+  for(std::size_t i=0; i<helper.color_size()/sizeof(GLuint); i++)
+      color.push_back(0.0);
+
+  vao[1].bind();
+  m_vbo[3].bind();
+  m_vbo[3].allocate(v_box->data(), static_cast<int>(v_box->size()*sizeof(float)));
+  poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+  rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+  rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+  m_vbo[3].release();
+
+  m_vbo[4].bind();
+  m_vbo[3].allocate(nul_vec.data(), static_cast<int>(nul_vec.size()*sizeof(float)));
+  normalsLocation[0] = rendering_program.attributeLocation("normal");
+  rendering_program.enableAttributeArray(normalsLocation[0]);
+  rendering_program.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+  m_vbo[4].release();
+
+  m_vbo[5].bind();
+  m_vbo[5].allocate(nul_vec.data(), static_cast<int>(nul_vec.size()*sizeof(float)));
+  colorLocation[0] = rendering_program.attributeLocation("inColor");
+  rendering_program.enableAttributeArray(colorLocation[0]);
+  rendering_program.setAttributeBuffer(colorLocation[0],GL_FLOAT,0,3);
+  m_vbo[5].release();
+
+  m_ibo->bind();
+  vao[1].release();
+  rendering_program.release();
+
+  m_initialized = true;
+}
+
+
+void
+Scene_segmented_image_item::draw_gl(Viewer_interface* viewer) const
+{
+  attrib_buffers(viewer);
+  rendering_program.bind();
+  vao[0].bind();
+  viewer->glDrawElements(GL_TRIANGLES, m_ibo->size()/sizeof(GLuint), GL_UNSIGNED_INT, 0);
+  vao[0].release();
+
+  vao[1].bind();
+  viewer->glLineWidth(3);
+  viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(v_box->size()/3));
+  vao[1].release();
+  rendering_program.release();
+}
+
+GLint
+Scene_segmented_image_item::ibo_size() const
+{
+      m_ibo->bind();
+    GLint nb_elts = m_ibo->size();
+    m_ibo->release();
+
+    return nb_elts/sizeof(GLuint);
+
+  return 0;
+}
+
+void Scene_segmented_image_item::changed()
+{
+    initialize_buffers();
+}
+
+void Scene_segmented_image_item::draw_Bbox(Bbox bbox, std::vector<float> *vertices)
+{
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmin);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmin);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymax);
+    vertices->push_back(bbox.zmax);
+
+    vertices->push_back(bbox.xmax);
+    vertices->push_back(bbox.ymin);
+    vertices->push_back(bbox.zmax);
+
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.h
new file mode 100644
index 0000000..e1e9a64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item.h
@@ -0,0 +1,89 @@
+#ifndef SCENE_SEGMENTED_IMAGE_ITEM_H
+#define SCENE_SEGMENTED_IMAGE_ITEM_H
+
+#include <CGAL/Three/Scene_item.h>
+#include "Image_type_fwd.h"
+#include "Scene_segmented_image_item_config.h"
+#include <CGAL/gl.h>
+
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+
+#include <CGAL/Three/Scene_interface.h>
+#include <CGAL/Three/Viewer_interface.h>
+
+typedef CGAL::Image_3 Image;
+using namespace CGAL::Three;
+class SCENE_SEGMENTED_IMAGE_ITEM_EXPORT Scene_segmented_image_item 
+  : public Scene_item
+{
+  Q_OBJECT
+public:
+
+  Scene_segmented_image_item(Image* im, int drawing_scale);
+  ~Scene_segmented_image_item();
+
+  bool isFinite() const { return true; }
+  bool isEmpty() const { return false; }
+  void compute_bbox() const;
+
+  Scene_segmented_image_item* clone() const { return NULL; }
+
+  // rendering mode
+  virtual bool supportsRenderingMode(RenderingMode m) const;
+
+  // draw
+  virtual void direct_draw(CGAL::Three::Viewer_interface* viewer) const
+  { draw(viewer); }
+  virtual void direct_draw_edges(CGAL::Three::Viewer_interface* viewer) const
+  { draw_edges(viewer); }
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+  virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const
+  { draw_gl(viewer); }
+  
+  virtual QString toolTip() const;
+  
+  const Image* image() const { return m_image; }
+
+private:
+  void draw_gl(CGAL::Three::Viewer_interface* viewer) const;
+  
+  void initialize_buffers();
+  GLint ibo_size() const;
+  
+public:
+  Image* m_image;
+
+private:
+  bool m_initialized;
+#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
+  int m_voxel_scale;
+  static const int vaoSize = 2;
+  static const int vboSize = 6;
+  mutable int poly_vertexLocation[1];
+  mutable int normalsLocation[1];
+  mutable int mvpLocation[1];
+  mutable int mvLocation[1];
+  mutable int colorLocation[1];
+  mutable int lightLocation[5];
+  mutable int twosideLocation;
+
+   std::vector<float> *v_box;
+   std::vector<float> color;
+
+
+  mutable QOpenGLBuffer m_vbo[vboSize];
+  mutable QOpenGLBuffer *m_ibo;
+  mutable QOpenGLVertexArrayObject vao[vaoSize];
+  mutable QOpenGLShaderProgram rendering_program;
+  void draw_bbox();
+  void attrib_buffers(CGAL::Three::Viewer_interface*) const;
+  void compile_shaders();
+  void draw_Bbox(Bbox bbox, std::vector<float> *vertices);
+public Q_SLOTS:
+    void changed();
+#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE
+};
+
+#endif // SCENE_SEGMENTED_IMAGE_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/Scene_segmented_image_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_segmented_image_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.cpp
new file mode 100644
index 0000000..3ef414c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.cpp
@@ -0,0 +1,365 @@
+#include "Scene_textured_polyhedron_item.h"
+#include "Textured_polyhedron_type.h"
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+#include <QObject>
+
+typedef EPIC_kernel::Point_3 Point;
+
+
+void Scene_textured_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const
+{
+    if(GLuint(-1) == textureId) {
+        viewer->glGenTextures(1, &textureId);
+    }
+    //vao for the facets
+    {
+        program = getShaderProgram(PROGRAM_WITH_TEXTURE, viewer);
+        program->bind();
+        vaos[Facets]->bind();
+        buffers[Facets_Vertices].bind();
+        buffers[Facets_Vertices].allocate(positions_facets.data(),
+                            static_cast<int>(positions_facets.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Facets_Vertices].release();
+
+        buffers[Facets_Normals].bind();
+        buffers[Facets_Normals].allocate(normals.data(),
+                            static_cast<int>(normals.size()*sizeof(float)));
+        program->enableAttributeArray("normal");
+        program->setAttributeBuffer("normal",GL_FLOAT,0,3);
+        buffers[Facets_Normals].release();
+
+
+        buffers[Facets_Texmap].bind();
+        buffers[Facets_Texmap].allocate(textures_map_facets.data(),
+                            static_cast<int>(textures_map_facets.size()*sizeof(float)));
+        program->enableAttributeArray("v_texCoord");
+        program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2);
+        buffers[Facets_Texmap].release();
+        vaos[Facets]->release();
+        program->release();
+    }
+
+    //vao for the lines
+    {
+        program = getShaderProgram(PROGRAM_WITH_TEXTURED_EDGES, viewer);
+        program->bind();
+        vaos[Edges]->bind();
+        buffers[Edges_Vertices].bind();
+        buffers[Edges_Vertices].allocate(positions_lines.data(),
+                            static_cast<int>(positions_lines.size()*sizeof(float)));
+        program->enableAttributeArray("vertex");
+        program->setAttributeBuffer("vertex",GL_FLOAT,0,4);
+        buffers[Edges_Vertices].release();
+
+
+        buffers[Edges_Texmap].bind();
+        buffers[Edges_Texmap].allocate(textures_map_lines.data(),
+                            static_cast<int>(textures_map_lines.size()*sizeof(float)));
+        program->enableAttributeArray("v_texCoord");
+        program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2);
+        buffers[Edges_Texmap].release();
+        vaos[Edges]->release();
+        program->release();
+    }
+
+    viewer->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
+    viewer->glActiveTexture(GL_TEXTURE0);
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    viewer->glTexImage2D(GL_TEXTURE_2D,
+                 0,
+                 GL_RGB,
+                 texture.GetWidth(),
+                 texture.GetHeight(),
+                 0,
+                 GL_RGB,
+                 GL_UNSIGNED_BYTE,
+                 texture.GetData());
+    viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+    viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+    viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    viewer->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+    nb_facets = positions_facets.size();
+    positions_facets.resize(0);
+    std::vector<float>(positions_facets).swap(positions_facets);
+    normals.resize(0);
+    std::vector<float>(normals).swap(normals);
+    textures_map_facets.resize(0);
+    std::vector<float>(textures_map_facets).swap(textures_map_facets);
+    nb_lines = positions_lines.size();
+    positions_lines.resize(0);
+    std::vector<float>(positions_lines).swap(positions_lines);
+    textures_map_lines.resize(0);
+    std::vector<float>(textures_map_lines).swap(textures_map_lines);
+
+    are_buffers_filled = true;
+}
+
+void
+Scene_textured_polyhedron_item::compute_normals_and_vertices(void) const
+{
+    positions_facets.resize(0);
+    positions_lines.resize(0);
+    textures_map_facets.resize(0);
+    textures_map_lines.resize(0);
+    normals.resize(0);
+
+    typedef ::EPIC_kernel Kernel;
+    typedef CGAL::Textured_items Items;
+    typedef Kernel::Point_3 Point;
+    typedef Kernel::Vector_3 Vector;
+    typedef CGAL::Polyhedron_3<Kernel,Items> Base;
+
+    typedef Base::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
+    typedef Base::Edge_iterator Edge_iterator;
+    typedef Base::Facet Facet;
+    typedef Base::Facet_iterator Facet_iterator;
+
+    //Facets
+    Facet_iterator f = poly->facets_begin();
+
+    for(f = poly->facets_begin();
+        f != poly->facets_end();
+        f++)
+    {
+
+        Halfedge_around_facet_circulator he = f->facet_begin();
+        Halfedge_around_facet_circulator end = he;
+        CGAL_For_all(he,end)
+        {
+
+            // If Flat shading:1 normal per polygon added once per vertex
+            if (cur_shading == Flat || cur_shading == FlatPlusEdges)
+            {
+
+                Vector n = CGAL::Polygon_mesh_processing::
+                  compute_face_normal(f, static_cast<Base&>(*poly));
+                normals.push_back(n[0]);
+                normals.push_back(n[1]);
+                normals.push_back(n[2]);
+            }
+
+            // If Gouraud shading: 1 normal per vertex
+            else if(cur_shading == Gouraud)
+            {
+
+                const Facet::Normal_3& n = he->vertex()->normal();
+                normals.push_back(n[0]);
+                normals.push_back(n[1]);
+                normals.push_back(n[2]);
+            }
+
+            //position
+            const Point& p = he->vertex()->point();
+            positions_facets.push_back(p.x());
+            positions_facets.push_back(p.y());
+            positions_facets.push_back(p.z());
+            positions_facets.push_back(1.0);
+
+            const double u = he->vertex()->u();
+            const double v = he->vertex()->v();
+            textures_map_facets.push_back(u);
+            textures_map_facets.push_back(v);
+        }
+
+
+    }
+    //Lines
+    typedef Kernel::Point_3		Point;
+    typedef Base::Edge_iterator	Edge_iterator;
+
+    Edge_iterator he;
+
+    for(he = poly->edges_begin();
+        he != poly->edges_end();
+        he++)
+    {
+
+        const Point& a = he->vertex()->point();
+        const Point& b = he->opposite()->vertex()->point();
+        positions_lines.push_back(a.x());
+        positions_lines.push_back(a.y());
+        positions_lines.push_back(a.z());
+        positions_lines.push_back(1.0);
+
+        const double u = he->vertex()->u();
+        const double v = he->vertex()->v();
+        textures_map_lines.push_back(u);
+        textures_map_lines.push_back(v);
+
+        positions_lines.push_back(b.x());
+        positions_lines.push_back(b.y());
+        positions_lines.push_back(b.z());
+        positions_lines.push_back(1.0);
+
+        const double ou = he->opposite()->vertex()->u();
+        const double ov = he->opposite()->vertex()->v();
+        textures_map_lines.push_back(ou);
+        textures_map_lines.push_back(ov);
+
+    }
+
+}
+
+Scene_textured_polyhedron_item::Scene_textured_polyhedron_item()
+    : Scene_item(NbOfVbos,NbOfVaos),poly(new Textured_polyhedron), textureId(-1)
+{
+    texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
+    cur_shading=FlatPlusEdges;
+    is_selected=false;
+    nb_facets = 0;
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(Textured_polyhedron* const p)
+    : Scene_item(NbOfVbos,NbOfVaos),poly(p),textureId(-1),smooth_shading(true)
+{
+    cur_shading=FlatPlusEdges;
+    is_selected=false;
+    texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
+    nb_facets = 0;
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(const Textured_polyhedron& p)
+    : Scene_item(NbOfVbos,NbOfVaos), poly(new Textured_polyhedron(p)),textureId(-1),smooth_shading(true)
+{
+    texture.GenerateCheckerBoard(2048,2048,128,0,0,0,250,250,255);
+    cur_shading=FlatPlusEdges;
+    is_selected=false;
+    nb_facets = 0;
+    nb_lines = 0;
+    invalidateOpenGLBuffers();
+}
+
+Scene_textured_polyhedron_item::~Scene_textured_polyhedron_item()
+{
+    delete poly;
+}
+
+Scene_textured_polyhedron_item* 
+Scene_textured_polyhedron_item::clone() const {
+    return new Scene_textured_polyhedron_item(*poly);
+}
+
+// Load textured_polyhedron from .OFF file
+bool
+Scene_textured_polyhedron_item::load(std::istream& in)
+{
+    std::cout<<"LOAD"<<std::endl;
+    in >> *poly;
+    invalidateOpenGLBuffers();
+    return in && !isEmpty();
+}
+
+// Write textured_polyhedron to .OFF file
+bool 
+Scene_textured_polyhedron_item::save(std::ostream& out) const
+{
+    out << *poly;
+    return (bool) out;
+}
+
+QString 
+Scene_textured_polyhedron_item::toolTip() const
+{
+    if(!poly)
+        return QString();
+
+    return QObject::tr("<p>Textured polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
+                       "<p>Number of vertices: %2<br />"
+                       "Number of edges: %3<br />"
+                       "Number of facets: %4</p>")
+            .arg(this->name())
+            .arg(poly->size_of_vertices())
+            .arg(poly->size_of_halfedges()/2)
+            .arg(poly->size_of_facets())
+            .arg(this->renderingModeName())
+            .arg(this->color().name());
+}
+
+// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+void Scene_textured_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const {
+
+    if(!are_buffers_filled)
+    {
+        compute_normals_and_vertices();
+        initialize_buffers(viewer);
+    }
+
+    vaos[Facets]->bind();
+    viewer->glActiveTexture(GL_TEXTURE0);
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    attrib_buffers(viewer, PROGRAM_WITH_TEXTURE);
+    program=getShaderProgram(PROGRAM_WITH_TEXTURE);
+    program->bind();
+    viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(nb_facets/4));
+    //Clean-up
+    program->release();
+    vaos[Facets]->release();
+}
+void Scene_textured_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const {
+    if(!are_buffers_filled)
+        initialize_buffers(viewer);
+
+    vaos[Edges]->bind();
+    viewer->glActiveTexture(GL_TEXTURE0);
+    viewer->glBindTexture(GL_TEXTURE_2D, textureId);
+    attrib_buffers(viewer, PROGRAM_WITH_TEXTURED_EDGES);
+
+    program=getShaderProgram(PROGRAM_WITH_TEXTURED_EDGES);
+    program->bind();
+    viewer->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(nb_lines/4));
+    //Clean-up
+    program->release();
+    vaos[Edges]->release();
+}
+
+Textured_polyhedron* 
+Scene_textured_polyhedron_item::textured_polyhedron()       { return poly; }
+const Textured_polyhedron* 
+Scene_textured_polyhedron_item::textured_polyhedron() const { return poly; }
+
+bool
+Scene_textured_polyhedron_item::isEmpty() const {
+    return (poly == 0) || poly->empty();
+}
+
+void
+Scene_textured_polyhedron_item::compute_bbox() const {
+    const Point& p = *(poly->points_begin());
+    CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
+    for(Textured_polyhedron::Point_iterator it = poly->points_begin();
+        it != poly->points_end();
+        ++it) {
+        bbox = bbox + it->bbox();
+    }
+    _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
+                bbox.xmax(),bbox.ymax(),bbox.zmax());
+}
+void
+Scene_textured_polyhedron_item::invalidateOpenGLBuffers()
+{
+    are_buffers_filled = false;
+    compute_bbox();
+}
+void
+Scene_textured_polyhedron_item::selection_changed(bool p_is_selected)
+{
+    if(p_is_selected != is_selected)
+    {
+        is_selected = p_is_selected;
+        initialize_buffers();
+    }
+    else
+        is_selected = p_is_selected;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.h
new file mode 100644
index 0000000..dbddb49
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.h
@@ -0,0 +1,88 @@
+#ifndef SCENE_TEXTURED_POLYHEDRON_ITEM_H
+#define SCENE_TEXTURED_POLYHEDRON_ITEM_H
+#include "Scene_textured_polyhedron_item_config.h"
+#include  <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Viewer_interface.h>
+#include "Textured_polyhedron_type_fwd.h"
+#include <iostream>
+#include "texture.h"
+
+// This class represents a textured polyhedron in the OpenGL scene
+class SCENE_TEXTURED_POLYHEDRON_ITEM_EXPORT Scene_textured_polyhedron_item 
+  : public CGAL::Three::Scene_item {
+  Q_OBJECT
+public:  
+  Scene_textured_polyhedron_item();
+//   Scene_textured_polyhedron_item(const Scene_textured_polyhedron_item&);
+  Scene_textured_polyhedron_item(const Textured_polyhedron& p);
+  Scene_textured_polyhedron_item(Textured_polyhedron* const p);
+  ~Scene_textured_polyhedron_item();
+
+  Scene_textured_polyhedron_item* clone() const;
+  
+  // IO
+  bool load(std::istream& in);
+  bool save(std::ostream& out) const;
+
+  // Function for displaying meta-data of the item
+  virtual QString toolTip() const;
+
+  // Indicate if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const { return (m != Splatting && m != PointsPlusNormals && m != Points && m != Gouraud ); }
+  // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
+   void draw() const {}
+  virtual void draw(CGAL::Three::Viewer_interface*) const;
+   virtual void draw_edges() const {}
+   virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const;
+
+  // Get wrapped textured_polyhedron
+  Textured_polyhedron*       textured_polyhedron();
+  const Textured_polyhedron* textured_polyhedron() const;
+
+  // Get dimensions
+  bool isFinite() const { return true; }
+  bool isEmpty() const;
+  void compute_bbox() const;
+
+  virtual void invalidateOpenGLBuffers();
+  virtual void selection_changed(bool);
+
+private:
+  Textured_polyhedron* poly;
+  Texture texture;
+
+  enum VAOs {
+      Facets=0,
+      Edges,
+      NbOfVaos
+  };
+  enum VBOs {
+      Facets_Vertices=0,
+      Facets_Normals,
+      Facets_Texmap,
+      Edges_Vertices,
+      Edges_Texmap,
+      NbOfVbos
+  };
+
+  mutable std::vector<float> positions_lines;
+  mutable std::vector<float> positions_facets;
+  mutable std::vector<float> normals;
+  mutable std::vector<float> textures_map_facets;
+  mutable std::vector<float> textures_map_lines;
+  mutable std::size_t nb_facets;
+  mutable std::size_t nb_lines;
+
+  mutable GLuint textureId;
+  mutable QOpenGLShaderProgram* program;
+
+  bool smooth_shading;
+
+  using CGAL::Three::Scene_item::initialize_buffers;
+  void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const;
+  void compute_normals_and_vertices(void) const;
+
+
+}; // end class Scene_textured_polyhedron_item
+
+#endif // SCENE_TEXTURED_POLYHEDRON_ITEM_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item_config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Scene_textured_polyhedron_item_config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Scene_textured_polyhedron_item_config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.cpp
new file mode 100644
index 0000000..8f1f272
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.cpp
@@ -0,0 +1,90 @@
+#include "Show_point_dialog.h"
+#include "ui_Show_point_dialog.h"
+
+#include <QClipboard>
+
+Show_point_dialog::Show_point_dialog(QWidget* parent)
+  : QDialog(parent)
+  , ui(new Ui::Show_point_dialog)
+  , m_has_correct_coordinates(false)
+{
+  ui->setupUi(this);
+
+  QClipboard::Mode mode = QClipboard::Selection; 
+  while(true) {
+    QString clipboard_text = QApplication::clipboard()->text(mode);
+    
+    interprete_string(clipboard_text);
+    if(m_has_correct_coordinates) {
+      ui->lineEdit->setText(clipboard_text);
+      ui->lineEdit->selectAll();
+      break;
+    } else {
+      interprete_string(ui->lineEdit->text());
+    }
+    if(mode == QClipboard::Selection) mode = QClipboard::Clipboard;
+    else break;
+  }
+
+  connect(ui->lineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(interprete_string(const QString&)));
+}
+
+Show_point_dialog::~Show_point_dialog()
+{
+  delete ui;
+}
+
+void Show_point_dialog::interprete_string(const QString& string)
+{
+  QString double_re("([-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)");
+  QString not_double_char_re("[^0-9-+.eE]");
+  QString full_re = QString("^") 
+    + not_double_char_re + "*"
+    + double_re
+    + not_double_char_re + "+"
+    + double_re
+    + not_double_char_re + "+"
+    + double_re 
+    + "(" + not_double_char_re + "*"
+    + "|" + not_double_char_re + "+" + double_re
+    + ")"
+    + "$";
+  QRegExp re(full_re);
+  if(re.exactMatch(string)) {
+    // const double x = re.cap(1).toDouble();
+    // const double y = re.cap(2).toDouble();
+    // const double z = re.cap(3).toDouble();
+    ui->coord_x->setText(QString(re.cap(1)));
+    ui->coord_y->setText(QString(re.cap(2)));
+    ui->coord_z->setText(QString(re.cap(3)));
+    m_has_correct_coordinates = true;
+  }
+  else {
+    ui->coord_x->setText(QString());
+    ui->coord_y->setText(QString());
+    ui->coord_z->setText(QString());
+    m_has_correct_coordinates = false;
+  }
+}
+
+double Show_point_dialog::get_x() const
+{
+  return ui->coord_x->text().toDouble();
+}
+
+double Show_point_dialog::get_y() const
+{
+  return ui->coord_y->text().toDouble();
+}
+
+double Show_point_dialog::get_z() const
+{
+  return ui->coord_z->text().toDouble();
+}
+
+bool Show_point_dialog::has_correct_coordinates() const
+{
+  return m_has_correct_coordinates;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.h
new file mode 100644
index 0000000..bc7d533
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.h
@@ -0,0 +1,35 @@
+#ifndef SHOW_POINT_DIALOG_H
+#define SHOW_POINT_DIALOG_H
+#include "config.h"
+
+#include "Point_dialog_config.h"
+
+#include <QDialog>
+
+namespace Ui {
+  class Show_point_dialog;
+}
+
+class POINT_DIALOG_EXPORT Show_point_dialog :
+  public QDialog
+{
+  Q_OBJECT
+public:
+  Show_point_dialog(QWidget* parent = 0);
+  ~Show_point_dialog();
+
+  bool has_correct_coordinates() const;
+
+  double get_x() const;
+  double get_y() const;
+  double get_z() const;
+
+protected Q_SLOTS:
+  void interprete_string(const QString&);
+
+protected:
+  Ui::Show_point_dialog* ui;
+  bool m_has_correct_coordinates;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Show_point_dialog.ui
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Show_point_dialog.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Statistics_on_item_dialog.ui b/3rdparty/CGAL-4.8/demo/Polyhedron/Statistics_on_item_dialog.ui
new file mode 100644
index 0000000..dafc0da
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Statistics_on_item_dialog.ui
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Statistics_on_item_dialog</class>
+ <widget class="QDialog" name="Statistics_on_item_dialog">
+  <property name="windowModality">
+   <enum>Qt::NonModal</enum>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>574</width>
+    <height>563</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Statistics on Polyhedron</string>
+  </property>
+  <property name="modal">
+   <bool>false</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="4" column="0">
+    <widget class="QDialogButtonBox" name="okButtonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" alignment="Qt::AlignRight">
+    <widget class="QToolButton" name="updateButton">
+     <property name="text">
+      <string>Update</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QTextEdit" name="label_htmltab">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="undoRedoEnabled">
+        <bool>false</bool>
+       </property>
+       <property name="lineWrapMode">
+        <enum>QTextEdit::NoWrap</enum>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>okButtonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Statistics_on_item_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>257</x>
+     <y>119</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>257</x>
+     <y>143</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>okButtonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Statistics_on_item_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>177</x>
+     <y>123</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>53</x>
+     <y>125</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Textured_polyhedron_type.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Textured_polyhedron_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Textured_polyhedron_type.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Textured_polyhedron_type.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Textured_polyhedron_type_fwd.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Textured_polyhedron_type_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Textured_polyhedron_type_fwd.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Textured_polyhedron_type_fwd.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/Travel_isolated_components.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Travel_isolated_components.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/Travel_isolated_components.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/Travel_isolated_components.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/UseCGAL_polyhedron_demo.cmake b/3rdparty/CGAL-4.8/demo/Polyhedron/UseCGAL_polyhedron_demo.cmake
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/UseCGAL_polyhedron_demo.cmake
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/UseCGAL_polyhedron_demo.cmake
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.cpp
new file mode 100644
index 0000000..48f80ee
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.cpp
@@ -0,0 +1,1164 @@
+#include "Viewer.h"
+#include <CGAL/gl.h>
+#include <CGAL/Three/Scene_draw_interface.h>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QGLViewer/manipulatedCameraFrame.h>
+#include <QDebug>
+#include <QOpenGLShader>
+#include <QOpenGLShaderProgram>
+#include <cmath>
+
+class Viewer_impl {
+public:
+  CGAL::Three::Scene_draw_interface* scene;
+  bool antialiasing;
+  bool twosides;
+  bool macro_mode;
+  bool inFastDrawing;
+  
+  void draw_aux(bool with_names, Viewer*);
+
+  //! Contains all the programs for the item rendering.
+  mutable std::vector<QOpenGLShaderProgram*> shader_programs;
+};
+Viewer::Viewer(QWidget* parent, bool antialiasing)
+  : CGAL::Three::Viewer_interface(parent)
+{
+  d = new Viewer_impl;
+  d->scene = 0;
+  d->antialiasing = antialiasing;
+  d->twosides = false;
+  d->macro_mode = false;
+  d->inFastDrawing = true;
+  d->shader_programs.resize(NB_OF_PROGRAMS);
+  setShortcut(EXIT_VIEWER, 0);
+  setShortcut(DRAW_AXIS, 0);
+  setKeyDescription(Qt::Key_T,
+                    tr("Turn the camera by 180 degrees"));
+  setKeyDescription(Qt::Key_M,
+                    tr("Toggle macro mode: useful to view details very near from the camera, "
+                       "but decrease the z-buffer precision"));
+  setKeyDescription(Qt::Key_A,
+                      tr("Toggle the axis system visibility."));
+#if QGLVIEWER_VERSION >= 0x020501
+  //modify mouse bindings that have been updated
+  setMouseBinding(Qt::Key(0), Qt::NoModifier, Qt::LeftButton, RAP_FROM_PIXEL, true, Qt::RightButton);
+  setMouseBindingDescription(Qt::ShiftModifier, Qt::RightButton,
+                             tr("Select and pop context menu"));
+  setMouseBinding(Qt::Key_R, Qt::NoModifier, Qt::LeftButton, RAP_FROM_PIXEL);
+  //use the new API for these
+  setMouseBinding(Qt::ShiftModifier, Qt::LeftButton, SELECT);
+#else
+  setMouseBinding(Qt::SHIFT + Qt::LeftButton, SELECT);
+  setMouseBindingDescription(Qt::SHIFT + Qt::RightButton,
+                             tr("Selects and display context "
+                                "menu of the selected item"));
+#endif // QGLVIEWER_VERSION >= 2.5.0
+  for(int i=0; i<16; i++)
+      pickMatrix_[i]=0;
+  pickMatrix_[0]=1;
+  pickMatrix_[5]=1;
+  pickMatrix_[10]=1;
+  pickMatrix_[15]=1;
+  prev_radius = sceneRadius();
+  axis_are_displayed = true;
+}
+
+Viewer::~Viewer()
+{
+  delete d;
+}
+
+void Viewer::setScene(CGAL::Three::Scene_draw_interface* scene)
+{
+  d->scene = scene;
+}
+
+bool Viewer::antiAliasing() const
+{
+  return d->antialiasing; 
+}
+
+void Viewer::setAntiAliasing(bool b)
+{
+  d->antialiasing = b;
+  updateGL();
+}
+
+void Viewer::setTwoSides(bool b)
+{
+  d->twosides = b;
+  updateGL();
+}
+
+
+void Viewer::setFastDrawing(bool b)
+{
+  d->inFastDrawing = b;
+  updateGL();
+}
+
+bool Viewer::inFastDrawing() const
+{
+  return (d->inFastDrawing
+          && (camera()->frame()->isSpinning()
+              || camera()->frame()->isManipulated()));
+}
+
+void Viewer::draw()
+{
+  glEnable(GL_DEPTH_TEST);
+  d->draw_aux(false, this);
+}
+
+void Viewer::fastDraw()
+{
+  d->draw_aux(false, this);
+}
+
+void Viewer::initializeGL()
+{
+  QGLViewer::initializeGL();
+  initializeOpenGLFunctions();
+  glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDARBPROC)this->context()->getProcAddress("glDrawArraysInstancedARB");
+  if(!glDrawArraysInstanced)
+  {
+      qDebug()<<"glDrawArraysInstancedARB : extension not found. Spheres will be displayed as points.";
+      extension_is_found = false;
+  }
+  else
+      extension_is_found = true;
+
+  glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORARBPROC)this->context()->getProcAddress("glVertexAttribDivisorARB");
+  if(!glDrawArraysInstanced)
+  {
+      qDebug()<<"glVertexAttribDivisorARB : extension not found. Spheres will be displayed as points.";
+      extension_is_found = false;
+  }
+  else
+      extension_is_found = true;
+
+
+  setBackgroundColor(::Qt::white);
+  vao[0].create();
+  for(int i=0; i<3; i++)
+    buffers[i].create();
+
+  //Vertex source code
+  const char vertex_source[] =
+  {
+      "#version 120 \n"
+      "attribute highp vec4 vertex;\n"
+      "attribute highp vec3 normal;\n"
+      "attribute highp vec4 colors;\n"
+      "uniform highp mat4 mvp_matrix;\n"
+      "uniform highp mat4 ortho_mat;\n"
+      "uniform highp mat4 mv_matrix; \n"
+      "uniform highp float width; \n"
+      "uniform highp float height; \n"
+      "varying highp vec4 fP; \n"
+      "varying highp vec3 fN; \n"
+      "varying highp vec4 color; \n"
+      "void main(void)\n"
+      "{\n"
+      "   color = colors; \n"
+      "   fP = mv_matrix * vertex; \n"
+      "   fN = mat3(mv_matrix)* normal; \n"
+      "   vec4 temp = vec4(mvp_matrix * vertex); \n"
+      "   vec4 ort = ortho_mat * vec4(width-150, height-150, 0,0); \n"
+      "   float ratio = width/height; \n"
+      "   gl_Position =  ort +vec4(temp.x, temp.y, temp.z, 1.0); \n"
+      "} \n"
+      "\n"
+  };
+  //Fragment source code
+  const char fragment_source[] =
+  {
+      "#version 120 \n"
+      "varying highp vec4 color; \n"
+      "varying highp vec4 fP; \n"
+      "varying highp vec3 fN; \n"
+      "uniform highp vec4 light_pos;  \n"
+      "uniform highp vec4 light_diff; \n"
+      "uniform highp vec4 light_spec; \n"
+      "uniform highp vec4 light_amb;  \n"
+      "uniform highp float spec_power ; \n"
+
+      "void main(void) { \n"
+
+      "   vec3 L = light_pos.xyz - fP.xyz; \n"
+      "   vec3 V = -fP.xyz; \n"
+      "   vec3 N; \n"
+      "   if(fN == vec3(0.0,0.0,0.0)) \n"
+      "       N = vec3(0.0,0.0,0.0); \n"
+      "   else \n"
+      "       N = normalize(fN); \n"
+      "   L = normalize(L); \n"
+      "   V = normalize(V); \n"
+      "   vec3 R = reflect(-L, N); \n"
+      "   vec4 diffuse = max(abs(dot(N,L)),0.0) * light_diff*color; \n"
+      "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+      "gl_FragColor = color*light_amb + diffuse + specular; \n"
+      "} \n"
+      "\n"
+  };
+  QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+  if(!vertex_shader->compileSourceCode(vertex_source))
+  {
+      std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+  }
+
+  QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+  if(!fragment_shader->compileSourceCode(fragment_source))
+  {
+      std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+  }
+
+  if(!rendering_program.addShader(vertex_shader))
+  {
+      std::cerr<<"adding vertex shader FAILED"<<std::endl;
+  }
+  if(!rendering_program.addShader(fragment_shader))
+  {
+      std::cerr<<"adding fragment shader FAILED"<<std::endl;
+  }
+  if(!rendering_program.link())
+  {
+      qDebug() << rendering_program.log();
+  }
+}
+
+#include <QMouseEvent>
+
+void Viewer::mousePressEvent(QMouseEvent* event)
+{
+  if(event->button() == Qt::RightButton &&
+     event->modifiers().testFlag(Qt::ShiftModifier)) 
+  {
+    select(event->pos());
+    requestContextMenu(event->globalPos());
+    event->accept();
+  }
+  else {
+    QGLViewer::mousePressEvent(event);
+  }
+}
+
+void Viewer::keyPressEvent(QKeyEvent* e)
+{
+  if(!e->modifiers()) {
+    if(e->key() == Qt::Key_T) {
+      turnCameraBy180Degres();
+      return;
+    }
+    else if(e->key() == Qt::Key_M) {
+      d->macro_mode = ! d->macro_mode;
+
+      if(d->macro_mode) {
+          camera()->setZNearCoefficient(0.0005f);
+      } else {
+        camera()->setZNearCoefficient(0.005f);
+      }
+      this->displayMessage(tr("Macro mode: %1").
+                           arg(d->macro_mode ? tr("on") : tr("off")));
+
+
+
+      return;
+    }
+    else if(e->key() == Qt::Key_A) {
+          axis_are_displayed = !axis_are_displayed;
+          updateGL();
+        }
+  }
+  //forward the event to the scene (item handling of the event)
+  if (! d->scene->keyPressEvent(e) )
+    QGLViewer::keyPressEvent(e);
+}
+
+void Viewer::turnCameraBy180Degres() {
+  qglviewer::Camera* camera = this->camera();
+  using qglviewer::ManipulatedCameraFrame;
+
+  ManipulatedCameraFrame frame_from(*camera->frame());
+  camera->setViewDirection(-camera->viewDirection());
+  ManipulatedCameraFrame frame_to(*camera->frame());
+
+  camera->setOrientation(frame_from.orientation());
+  camera->interpolateTo(frame_to, 0.5f);
+}
+
+void Viewer_impl::draw_aux(bool with_names, Viewer* viewer)
+{
+  if(scene == 0)
+    return;
+  viewer->glLineWidth(1.0f);
+  viewer->glPointSize(2.f);
+  viewer->glEnable(GL_POLYGON_OFFSET_FILL);
+  viewer->glPolygonOffset(1.0f,1.0f);
+  viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+
+  viewer->glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
+
+  if(twosides)
+    viewer->glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+  else
+    viewer->glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
+
+  if(antialiasing)
+  {
+    viewer->glEnable(GL_BLEND);
+    viewer->glEnable(GL_LINE_SMOOTH);
+    viewer->glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+    viewer->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  }
+  else
+  {
+    viewer->glDisable(GL_BLEND);
+    viewer->glDisable(GL_LINE_SMOOTH);
+    viewer->glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
+    viewer->glBlendFunc(GL_ONE, GL_ZERO);
+  }
+  if(with_names)
+    scene->drawWithNames(viewer);
+  else
+    scene->draw(viewer);
+  viewer->glDisable(GL_POLYGON_OFFSET_FILL);
+  viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+}
+
+void Viewer::drawWithNames()
+{
+  QGLViewer::draw();
+  d->draw_aux(true, this);
+}
+
+void Viewer::postSelection(const QPoint& pixel)
+{
+  bool found = false;
+  qglviewer::Vec point = camera()->pointUnderPixel(pixel, found);
+  if(found) {
+    Q_EMIT selectedPoint(point.x,
+                       point.y,
+                       point.z);
+    Q_EMIT selected(this->selectedName());
+    const qglviewer::Vec orig = camera()->position();
+    const qglviewer::Vec dir = point - orig;
+    Q_EMIT selectionRay(orig.x, orig.y, orig.z,
+                      dir.x, dir.y, dir.z);
+  }
+}
+bool CGAL::Three::Viewer_interface::readFrame(QString s, qglviewer::Frame& frame)
+{
+  QStringList list = s.split(" ", QString::SkipEmptyParts);
+  if(list.size() != 7)
+    return false;
+  float vec[3];
+  for(int i = 0; i < 3; ++i)
+  {
+    bool ok;
+    vec[i] = list[i].toFloat(&ok);
+    if(!ok) return false;
+  }
+  double orient[4];
+  for(int i = 0; i < 4; ++i)
+  {
+    bool ok;
+    orient[i] = list[i + 3].toDouble(&ok);
+    if(!ok) return false;
+  }
+  frame.setPosition(qglviewer::Vec(vec[0],
+                                   vec[1],
+                                   vec[2]));
+  frame.setOrientation(orient[0],
+                       orient[1],
+                       orient[2],
+                       orient[3]);
+  return true;
+}
+
+QString CGAL::Three::Viewer_interface::dumpFrame(const qglviewer::Frame& frame) {
+  const qglviewer::Vec pos = frame.position();
+  const qglviewer::Quaternion q = frame.orientation();
+
+  return QString("%1 %2 %3 %4 %5 %6 %7")
+    .arg(pos[0])
+    .arg(pos[1])
+    .arg(pos[2])
+    .arg(q[0])
+    .arg(q[1])
+    .arg(q[2])
+    .arg(q[3]);
+}
+
+bool Viewer::moveCameraToCoordinates(QString s, float animation_duration) {
+  qglviewer::Frame new_frame;
+  if(readFrame(s, new_frame)) {
+    camera()->interpolateTo(new_frame, animation_duration); 
+    return true;
+  }
+  else
+    return false;
+}
+
+QString Viewer::dumpCameraCoordinates()
+{
+  if(camera()->frame()) {
+    return dumpFrame(*camera()->frame());
+  } else {
+    return QString();
+  }
+}
+
+void Viewer::attrib_buffers(int program_name) const {
+    GLint is_both_sides = 0;
+    //ModelViewMatrix used for the transformation of the camera.
+    QMatrix4x4 mvp_mat;
+    // ModelView Matrix used for the lighting system
+    QMatrix4x4 mv_mat;
+    // transformation of the manipulated frame
+    QMatrix4x4 f_mat;
+    // used for the picking. Is Identity except while selecting an item.
+    QMatrix4x4 pick_mat;
+    f_mat.setToIdentity();
+    //fills the MVP and MV matrices.
+    GLdouble d_mat[16];
+    this->camera()->getModelViewProjectionMatrix(d_mat);
+    //Convert the GLdoubles matrices in GLfloats
+    for (int i=0; i<16; ++i){
+        mvp_mat.data()[i] = GLfloat(d_mat[i]);
+    }
+    this->camera()->getModelViewMatrix(d_mat);
+    for (int i=0; i<16; ++i)
+        mv_mat.data()[i] = GLfloat(d_mat[i]);
+    for (int i=0; i<16; ++i)
+        pick_mat.data()[i] = this->pickMatrix_[i];
+
+    mvp_mat = pick_mat * mvp_mat;
+
+    const_cast<Viewer*>(this)->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE,
+                                             &is_both_sides);
+
+    QVector4D position(0.0f,0.0f,1.0f, 1.0f );
+    QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
+    // Diffuse
+    QVector4D diffuse(1.0f, 1.0f, 1.0f, 1.0f);
+    // Specular
+    QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f);
+    QOpenGLShaderProgram* program = getShaderProgram(program_name);
+    program->bind();
+    switch(program_name)
+    {
+    case PROGRAM_NO_SELECTION:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+
+        program->setUniformValue("f_matrix",f_mat);
+        break;
+    case PROGRAM_WITH_LIGHT:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff",diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("is_two_side", is_both_sides);
+        break;
+    case PROGRAM_C3T3:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff",diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("is_two_side", is_both_sides);
+        break;
+    case PROGRAM_C3T3_EDGES:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        break;
+    case PROGRAM_WITHOUT_LIGHT:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff", diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("is_two_side", is_both_sides);
+        program->setAttributeValue("normals", 0.0,0.0,0.0);
+        program->setUniformValue("f_matrix",f_mat);
+
+
+        break;
+    case PROGRAM_WITH_TEXTURE:
+
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff",diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("s_texture",0);
+        program->setUniformValue("f_matrix",f_mat);
+
+        break;
+    case PROGRAM_PLANE_TWO_FACES:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff",diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("is_two_side", is_both_sides);
+        break;
+
+    case PROGRAM_WITH_TEXTURED_EDGES:
+
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("s_texture",0);
+
+        break;
+    case PROGRAM_INSTANCED:
+
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        program->setUniformValue("mv_matrix", mv_mat);
+
+        program->setUniformValue("light_pos", position);
+        program->setUniformValue("light_diff",diffuse);
+        program->setUniformValue("light_spec", specular);
+        program->setUniformValue("light_amb", ambient);
+        program->setUniformValue("spec_power", 51.8f);
+        program->setUniformValue("is_two_side", is_both_sides);
+
+        break;
+    case PROGRAM_INSTANCED_WIRE:
+        program->setUniformValue("mvp_matrix", mvp_mat);
+        break;
+    }
+    program->release();
+}
+
+
+void Viewer::pickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height,
+GLint viewport[4])
+{
+ //GLfloat m[16];
+ GLfloat sx, sy;
+ GLfloat tx, ty;
+
+ sx = viewport[2] / width;
+ sy = viewport[3] / height;
+ tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width;
+ ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height;
+
+ #define M(row, col) pickMatrix_[col*4+row]
+  M(0, 0) = sx;
+  M(0, 1) = 0.0;
+  M(0, 2) = 0.0;
+  M(0, 3) = tx;
+  M(1, 0) = 0.0;
+  M(1, 1) = sy;
+  M(1, 2) = 0.0;
+  M(1, 3) = ty;
+  M(2, 0) = 0.0;
+  M(2, 1) = 0.0;
+  M(2, 2) = 1.0;
+  M(2, 3) = 0.0;
+  M(3, 0) = 0.0;
+  M(3, 1) = 0.0;
+  M(3, 2) = 0.0;
+  M(3, 3) = 1.0;
+ #undef M
+
+ //pickMatrix_[i] = m[i];
+}
+void Viewer::beginSelection(const QPoint &point)
+{
+    QGLViewer::beginSelection(point);
+    //set the picking matrix to allow the picking
+    static GLint viewport[4];
+    camera()->getViewport(viewport);
+    pickMatrix(point.x(), point.y(), selectRegionWidth(), selectRegionHeight(), viewport);
+
+}
+void Viewer::endSelection(const QPoint& point)
+{
+  QGLViewer::endSelection(point);
+   //set the pick matrix to Identity
+    for(int i=0; i<16; i++)
+        pickMatrix_[i]=0;
+    pickMatrix_[0]=1;
+    pickMatrix_[5]=1;
+    pickMatrix_[10]=1;
+    pickMatrix_[15]=1;
+}
+
+void Viewer::makeArrow(double R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data)
+{
+    qglviewer::Vec temp = to-from;
+    QVector3D dir = QVector3D(temp.x, temp.y, temp.z);
+    QMatrix4x4 mat;
+    mat.setToIdentity();
+    mat.translate(from.x, from.y, from.z);
+    mat.scale(dir.length());
+    dir.normalize();
+    float angle = 0.0;
+    if(std::sqrt((dir.x()*dir.x()+dir.y()*dir.y())) > 1)
+        angle = 90.0f;
+    else
+        angle =acos(dir.y()/std::sqrt(dir.x()*dir.x()+dir.y()*dir.y()+dir.z()*dir.z()))*180.0/M_PI;
+
+    QVector3D axis;
+    axis = QVector3D(dir.z(), 0, -dir.x());
+    mat.rotate(angle, axis);
+
+    //Head
+    const float Rf = static_cast<float>(R);
+    for(int d = 0; d<360; d+= 360/prec)
+    {
+        float D = (float) (d * M_PI / 180.);
+        float a = (float) std::atan(Rf / 0.33);
+        QVector4D p(0., 1., 0, 1.);
+        QVector4D n(Rf*2.*sin(D), sin(a), Rf*2.*cos(D), 1.);
+        QVector4D pR = mat*p;
+        QVector4D nR = mat*n;
+
+        //point A1
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back((float)color.x);
+        data.colors->push_back((float)color.y);
+        data.colors->push_back((float)color.z);
+
+        //point B1
+        p = QVector4D(Rf*2.*sin(D), 0.66f, Rf*2.* cos(D), 1.f);
+        n = QVector4D(sin(D), sin(a), cos(D), 1.);
+        pR = mat*p;
+        nR = mat*n;
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back((float)color.x);
+        data.colors->push_back((float)color.y);
+        data.colors->push_back((float)color.z);
+        //point C1
+        D = (d+360/prec)*M_PI/180.0;
+        p = QVector4D(Rf*2.* sin(D), 0.66f, Rf *2.* cos(D), 1.f);
+        n = QVector4D(sin(D), sin(a), cos(D), 1.0);
+        pR = mat*p;
+        nR = mat*n;
+
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back((float)color.x);
+        data.colors->push_back((float)color.y);
+        data.colors->push_back((float)color.z);
+
+    }
+
+    //cylinder
+    //body of the cylinder
+    for(int d = 0; d<360; d+= 360/prec)
+    {
+        //point A1
+        double D = d*M_PI/180.0;
+        QVector4D p(Rf*sin(D), 0.66f, Rf*cos(D), 1.f);
+        QVector4D n(sin(D), 0.f, cos(D), 1.f);
+        QVector4D pR = mat*p;
+        QVector4D nR = mat*n;
+
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back(color.x);
+        data.colors->push_back(color.y);
+        data.colors->push_back(color.z);
+        //point B1
+        p = QVector4D(Rf * sin(D),0,Rf*cos(D), 1.0);
+        n = QVector4D(sin(D), 0, cos(D), 1.0);
+        pR = mat*p;
+        nR = mat*n;
+
+
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back(color.x);
+        data.colors->push_back(color.y);
+        data.colors->push_back(color.z);
+          //point C1
+        D = (d+360/prec)*M_PI/180.0;
+        p = QVector4D(Rf * sin(D),0,Rf*cos(D), 1.0);
+        n = QVector4D(sin(D), 0, cos(D), 1.0);
+        pR = mat*p;
+        nR = mat*n;
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back(color.x);
+        data.colors->push_back(color.y);
+        data.colors->push_back(color.z);
+        //point A2
+        D = (d+360/prec)*M_PI/180.0;
+
+        p = QVector4D(Rf * sin(D),0,Rf*cos(D), 1.0);
+        n = QVector4D(sin(D), 0, cos(D), 1.0);
+        pR = mat*p;
+        nR = mat*n;
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back((float)color.x);
+        data.colors->push_back((float)color.y);
+        data.colors->push_back((float)color.z);
+        //point B2
+        p = QVector4D(Rf * sin(D), 0.66f, Rf*cos(D), 1.f);
+        n = QVector4D(sin(D), 0, cos(D), 1.0);
+        pR = mat*p;
+        nR = mat*n;
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back((float)color.x);
+        data.colors->push_back((float)color.y);
+        data.colors->push_back((float)color.z);
+        //point C2
+        D = d*M_PI/180.0;
+        p = QVector4D(Rf * sin(D), 0.66f, Rf*cos(D), 1.f);
+        n = QVector4D(sin(D), 0.f, cos(D), 1.f);
+        pR = mat*p;
+        nR = mat*n;
+        data.vertices->push_back(pR.x());
+        data.vertices->push_back(pR.y());
+        data.vertices->push_back(pR.z());
+        data.normals->push_back(nR.x());
+        data.normals->push_back(nR.y());
+        data.normals->push_back(nR.z());
+        data.colors->push_back(color.x);
+        data.colors->push_back(color.y);
+        data.colors->push_back(color.z);
+
+    }
+}
+
+void Viewer::drawVisualHints()
+{
+    QGLViewer::drawVisualHints();
+    if(axis_are_displayed)
+    {
+        QMatrix4x4 mvpMatrix;
+        QMatrix4x4 mvMatrix;
+        double mat[16];
+        //camera()->frame()->rotation().getMatrix(mat);
+        camera()->getModelViewProjectionMatrix(mat);
+        //nullifies the translation
+        mat[12]=0;
+        mat[13]=0;
+        mat[14]=0;
+        for(int i=0; i < 16; i++)
+        {
+            mvpMatrix.data()[i] = (float)mat[i];
+        }
+        camera()->getModelViewMatrix(mat);
+        for(int i=0; i < 16; i++)
+        {
+            mvMatrix.data()[i] = (float)mat[i];
+        }
+
+        QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+        // define material
+        QVector4D	ambient;
+        QVector4D	diffuse;
+        QVector4D	specular;
+        GLfloat      shininess ;
+        // Ambient
+        ambient[0] = 0.29225f;
+        ambient[1] = 0.29225f;
+        ambient[2] = 0.29225f;
+        ambient[3] = 1.0f;
+        // Diffuse
+        diffuse[0] = 0.50754f;
+        diffuse[1] = 0.50754f;
+        diffuse[2] = 0.50754f;
+        diffuse[3] = 1.0f;
+        // Specular
+        specular[0] = 0.0f;
+        specular[1] = 0.0f;
+        specular[2] = 0.0f;
+        specular[3] = 0.0f;
+        // Shininess
+        shininess = 51.2f;
+
+        rendering_program.bind();
+        rendering_program.setUniformValue("light_pos", position);
+        rendering_program.setUniformValue("mvp_matrix", mvpMatrix);
+        rendering_program.setUniformValue("mv_matrix", mvMatrix);
+        rendering_program.setUniformValue("light_diff", diffuse);
+        rendering_program.setUniformValue("light_spec", specular);
+        rendering_program.setUniformValue("light_amb", ambient);
+        rendering_program.setUniformValue("spec_power", shininess);
+        rendering_program.release();
+
+        vao[0].bind();
+        rendering_program.bind();
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(v_Axis.size() / 3));
+        rendering_program.release();
+        vao[0].release();
+    }
+
+}
+
+void Viewer::resizeGL(int w, int h)
+{
+    QGLViewer::resizeGL(w,h);
+    qglviewer::Vec dim = qglviewer::Vec(w,h, 0) ;
+    GLdouble ortho[16];
+    QMatrix4x4 orthoMatrix;
+    ortho[0]  = 1.0/width(); ortho[1]  = 0; ortho[2]  = 0; ortho[3]  = -0.0;
+    ortho[4]  = 0; ortho[5]  = 1.0/height(); ortho[6]  = 0; ortho[7]  = -0.0;
+    ortho[8]  = 0; ortho[9]  = 0; ortho[10] = 2.0/(camera()->zNear()-camera()->zFar()); ortho[11] = -(camera()->zNear()+camera()->zFar())/(-camera()->zNear()+camera()->zFar());
+    ortho[12] = 0; ortho[13] = 0; ortho[14] = 0; ortho[15] = 1;
+    for(int i=0; i < 16; i++)
+    {
+        orthoMatrix.data()[i] = (float)ortho[i];
+    }
+
+    QVector4D length(60,60,60, 1.0);
+    length = orthoMatrix * length;
+    AxisData data;
+    v_Axis.resize(0);
+    n_Axis.resize(0);
+    c_Axis.resize(0);
+    data.vertices = &v_Axis;
+    data.normals = &n_Axis;
+    data.colors = &c_Axis;
+    double l = length.x()*w/h;
+    makeArrow(0.06,10, qglviewer::Vec(0,0,0),qglviewer::Vec(l,0,0),qglviewer::Vec(1,0,0), data);
+    makeArrow(0.06,10, qglviewer::Vec(0,0,0),qglviewer::Vec(0,l,0),qglviewer::Vec(0,1,0), data);
+    makeArrow(0.06,10, qglviewer::Vec(0,0,0),qglviewer::Vec(0,0,l),qglviewer::Vec(0,0,1), data);
+
+
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(v_Axis.data(), static_cast<int>(v_Axis.size()) * sizeof(float));
+    rendering_program.enableAttributeArray("vertex");
+    rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3);
+    buffers[0].release();
+
+    buffers[1].bind();
+    buffers[1].allocate(n_Axis.data(), static_cast<int>(n_Axis.size() * sizeof(float)));
+    rendering_program.enableAttributeArray("normal");
+    rendering_program.setAttributeBuffer("normal",GL_FLOAT,0,3);
+    buffers[1].release();
+
+    buffers[2].bind();
+    buffers[2].allocate(c_Axis.data(), static_cast<int>(c_Axis.size() * sizeof(float)));
+    rendering_program.enableAttributeArray("colors");
+    rendering_program.setAttributeBuffer("colors",GL_FLOAT,0,3);
+    buffers[2].release();
+
+    rendering_program.release();
+    vao[0].release();
+
+
+
+    rendering_program.bind();
+    rendering_program.setUniformValue("width", (float)dim.x);
+    rendering_program.setUniformValue("height", (float)dim.y);
+    rendering_program.setUniformValue("ortho_mat", orthoMatrix);
+    rendering_program.release();
+
+}
+
+QOpenGLShaderProgram* Viewer::getShaderProgram(int name) const
+{
+    // workaround constness issues in Qt
+    Viewer* viewer = const_cast<Viewer*>(this);
+
+    switch(name)
+    {
+    /// @TODO: factorize this code   
+    case PROGRAM_C3T3:
+        if(d->shader_programs[PROGRAM_C3T3])
+        {
+            return d->shader_programs[PROGRAM_C3T3];
+        }
+
+        else
+        {
+
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_c3t3.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_C3T3] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_C3T3_EDGES:
+        if(d->shader_programs[PROGRAM_C3T3_EDGES])
+        {
+            return d->shader_programs[PROGRAM_C3T3_EDGES];
+        }
+
+        else
+        {
+
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_c3t3_edges.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3_edges.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_C3T3_EDGES] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_WITH_LIGHT:
+        if(d->shader_programs[PROGRAM_WITH_LIGHT])
+        {
+            return d->shader_programs[PROGRAM_WITH_LIGHT];
+        }
+
+        else
+        {
+
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_with_light.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_WITH_LIGHT] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_WITHOUT_LIGHT:
+        if( d->shader_programs[PROGRAM_WITHOUT_LIGHT])
+        {
+            return d->shader_programs[PROGRAM_WITHOUT_LIGHT];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_without_light.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_WITHOUT_LIGHT] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_NO_SELECTION:
+        if( d->shader_programs[PROGRAM_NO_SELECTION])
+        {
+            return d->shader_programs[PROGRAM_NO_SELECTION];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_without_light.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_no_light_no_selection.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_NO_SELECTION] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_WITH_TEXTURE:
+        if( d->shader_programs[PROGRAM_WITH_TEXTURE])
+        {
+            return d->shader_programs[PROGRAM_WITH_TEXTURE];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_with_texture.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_texture.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("color_facets", 1);
+            program->link();
+            d->shader_programs[PROGRAM_WITH_TEXTURE] = program;
+            return program;
+        }
+        break;
+    case PROGRAM_PLANE_TWO_FACES:
+        if(d->shader_programs[PROGRAM_PLANE_TWO_FACES])
+        {
+            return d->shader_programs[PROGRAM_PLANE_TWO_FACES];
+        }
+
+        else
+        {
+
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_without_light.v"))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_plane_two_faces.f"))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->link();
+            d->shader_programs[PROGRAM_PLANE_TWO_FACES] = program;
+            return program;
+        }
+        break;
+
+    case PROGRAM_WITH_TEXTURED_EDGES:
+        if( d->shader_programs[PROGRAM_WITH_TEXTURED_EDGES])
+        {
+            return d->shader_programs[PROGRAM_WITH_TEXTURED_EDGES];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_with_textured_edges.v" ))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_textured_edges.f" ))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("color_lines", 1);
+            program->link();
+            d->shader_programs[PROGRAM_WITH_TEXTURED_EDGES] = program;
+            return program;
+
+        }
+        break;
+    case PROGRAM_INSTANCED:
+        if( d->shader_programs[PROGRAM_INSTANCED])
+        {
+            return d->shader_programs[PROGRAM_INSTANCED];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_instanced.v" ))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f" ))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_INSTANCED] = program;
+            return program;
+
+        }
+        break;
+    case PROGRAM_INSTANCED_WIRE:
+        if( d->shader_programs[PROGRAM_INSTANCED_WIRE])
+        {
+            return d->shader_programs[PROGRAM_INSTANCED_WIRE];
+        }
+        else
+        {
+            QOpenGLShaderProgram *program = new QOpenGLShaderProgram(viewer);
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/cgal/Polyhedron_3/resources/shader_instanced.v" ))
+            {
+                std::cerr<<"adding vertex shader FAILED"<<std::endl;
+            }
+            if(!program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f" ))
+            {
+                std::cerr<<"adding fragment shader FAILED"<<std::endl;
+            }
+            program->bindAttributeLocation("colors", 1);
+            program->link();
+            d->shader_programs[PROGRAM_INSTANCED_WIRE] = program;
+            return program;
+
+        }
+        break;
+    default:
+        std::cerr<<"ERROR : Program not found."<<std::endl;
+        return 0;
+    }
+}
+void Viewer::wheelEvent(QWheelEvent* e)
+{
+    if(e->modifiers().testFlag(Qt::ShiftModifier))
+    {
+        double delta = e->delta();
+        if(delta>0)
+        {
+            camera()->setZNearCoefficient(camera()->zNearCoefficient() * 1.01);
+        }
+        else
+            camera()->setZNearCoefficient(camera()->zNearCoefficient() / 1.01);
+        updateGL();
+    }
+    else
+        QGLViewer::wheelEvent(e);
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.h b/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.h
new file mode 100644
index 0000000..3435ebe
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/Viewer.h
@@ -0,0 +1,138 @@
+//! \file Viewer.h
+
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <CGAL/Three/Viewer_config.h>
+#include <QOpenGLBuffer>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Three/Viewer_interface.h>
+
+#include <QGLViewer/qglviewer.h>
+#include <QPoint>
+
+// forward declarations
+class QWidget;
+namespace CGAL{
+namespace Three{
+class Scene_draw_interface;
+}
+}
+class QMouseEvent;
+class QKeyEvent;
+
+class Viewer_impl;
+//!The viewer class. Deals with all the openGL rendering and the mouse/keyboard events.
+class VIEWER_EXPORT Viewer : public CGAL::Three::Viewer_interface {
+
+  Q_OBJECT
+
+public:
+  Viewer(QWidget * parent, bool antialiasing = false);
+  ~Viewer();
+
+  // overload several QGLViewer virtual functions
+  //! Deprecated and does nothing.
+  void draw();
+  //!This step happens after draw(). It is here that the axis system is
+  //!displayed.
+  void drawVisualHints();
+  //! Deprecated. Does the same as draw().
+  void fastDraw();
+  //! Initializes the OpenGL functions and sets the backGround color.
+  void initializeGL();
+  //! Deprecated and does nothing.
+  void drawWithNames();
+  /*! Uses the parameter pixel's coordinates to get the corresponding point
+   * in the World frame. If this point is found, emits selectedPoint, selected,
+   * and selectionRay signals.
+   */
+  void postSelection(const QPoint&);
+  //! Sets the picking matrix to allow the picking.
+  void beginSelection(const QPoint &point);
+  //! Sets the pick matrix to Identity once the picking is done.
+  void endSelection(const QPoint &point);
+  //! Sets the scene for the viewer.
+  void setScene(CGAL::Three::Scene_draw_interface* scene);
+  //! @returns the antialiasing state.
+  bool antiAliasing() const;
+  //! @returns the fastDrawing state.
+  bool inFastDrawing() const;
+  //! Implementation of `Viewer_interface::attrib_buffers()`
+  void attrib_buffers(int program_name) const;
+  //! Implementation of `Viewer_interface::getShaderProgram()`
+  QOpenGLShaderProgram* getShaderProgram(int name) const;
+
+public Q_SLOTS:
+  //! Sets the antialiasing to true or false.
+  void setAntiAliasing(bool b);
+  //! If b is true, facets will be ligted from both internal and external sides.
+  //! If b is false, only the side that is exposed to the light source will be lighted.
+  void setTwoSides(bool b);
+  //! If b is true, some items are displayed in a simplified version when moving the camera.
+  //! If b is false, items display is never altered, even when moving.
+  void setFastDrawing(bool b);
+  //! Make the camera turn around.
+  void turnCameraBy180Degres();
+  //! @returns a QString containing the position and orientation of the camera.
+  QString dumpCameraCoordinates();
+  //!Moves the camera to the new coordinates (position and orientation) through an animation.
+  bool moveCameraToCoordinates(QString, 
+                               float animation_duration = 0.5f);
+
+protected:
+  //! Holds useful data to draw the axis system
+  struct AxisData
+  {
+      std::vector<float> *vertices;
+      std::vector<float> *normals;
+      std::vector<float> *colors;
+  };
+  //! The buffers used to draw the axis system
+  QOpenGLBuffer buffers[3];
+  //! The VAO used to draw the axis system
+  QOpenGLVertexArrayObject vao[1];
+  //! The rendering program used to draw the axis system
+  QOpenGLShaderProgram rendering_program;
+  //! Holds the vertices data for the axis system
+  std::vector<float> v_Axis;
+  //! Holds the normals data for the axis system
+  std::vector<float> n_Axis;
+  //! Holds the color data for the axis system
+  std::vector<float> c_Axis;
+  //! Decides if the axis system must be drawn or not
+  bool axis_are_displayed;
+  //!Defines the behaviour for the mouse press events
+  void mousePressEvent(QMouseEvent*);
+  void wheelEvent(QWheelEvent *);
+  //!Defines the behaviour for the key press events
+  void keyPressEvent(QKeyEvent*);
+  /*! \brief Encapsulates the pickMatrix.
+  * Source code of gluPickMatrix slightly modified : instead of multiplying the current matrix by this value,
+  * sets the viewer's pickMatrix_ so that the drawing area is only around the cursor. This is because since CGAL 4.7,
+  * the drawing system changed to use shaders, and these need this value. pickMatrix_ is passed to the shaders in
+  * Scene_item::attrib_buffers(CGAL::Three::Viewer_interface* viewer, int program_name).*/
+  void pickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height,
+                  GLint viewport[4]);
+  /*!
+   * \brief makeArrow creates an arrow and stores it in a struct of vectors.
+   * \param R the radius of the arrow.
+   * \param prec the precision of the quadric. The lower this value is, the higher precision you get.
+   * It can be any int between 1 and 360.
+   * \param from the starting point of the arrow.
+   * \param to the destination point of the arrow (the pointed extremity).
+   * \param color the RGB color of the arrow.
+   * \param data the struct of std::vector that will contain the results.
+   */
+
+  void makeArrow(double R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data);
+  void resizeGL(int w, int h);
+
+
+protected:
+  Viewer_impl* d;
+  double prev_radius;
+}; // end class Viewer
+
+#endif // VIEWER_H
diff --git a/3rdparty/CGAL-4.6/demo/Mesh_3/concurrent_mesher_config.cfg b/3rdparty/CGAL-4.8/demo/Polyhedron/concurrent_mesher_config.cfg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Mesh_3/concurrent_mesher_config.cfg
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/concurrent_mesher_config.cfg
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/config.h b/3rdparty/CGAL-4.8/demo/Polyhedron/config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/config.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/config.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/create_sphere.h b/3rdparty/CGAL-4.8/demo/Polyhedron/create_sphere.h
new file mode 100644
index 0000000..32af267
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/create_sphere.h
@@ -0,0 +1,360 @@
+#ifndef POLYHEDRON_DEMO_CREATE_SPHERE_H
+#define POLYHEDRON_DEMO_CREATE_SPHERE_H
+
+#include <vector>
+#include <cmath>
+#include <CGAL/number_type_config.h>
+
+template <class FLOAT>
+void create_flat_sphere(FLOAT R,
+                        std::vector<FLOAT>& positions_spheres,
+                        std::vector<FLOAT>& normals_spheres,
+                        int prec = 36)
+{
+  //The more small they are, the more precise the Sphere will be.
+  // Must be divisors of 180 and 360.
+  const int rings=prec/2;
+  const int sectors=prec;
+  const float to_rad = static_cast<float>(CGAL_PI / 180.0);
+
+  float T, P;
+  float x[4],y[4],z[4];
+
+  //Top of the sphere
+  for(int t=0; t<360; t+=sectors)
+  {
+
+    positions_spheres.push_back(0);
+    positions_spheres.push_back(0);
+    positions_spheres.push_back(R);
+
+    normals_spheres.push_back(0);
+    normals_spheres.push_back(0);
+    normals_spheres.push_back(1);
+
+    P = rings*to_rad;
+    T = t*to_rad;
+    x[1] = sin(P) * cos(T) ;
+    y[1] = sin(P) * sin(T) ;
+    z[1] = cos(P);
+    positions_spheres.push_back(R * x[1]);
+    positions_spheres.push_back(R * y[1]);
+    positions_spheres.push_back(R * z[1]);
+
+    normals_spheres.push_back(x[1]);
+    normals_spheres.push_back(y[1]);
+    normals_spheres.push_back(z[1]);
+
+    //
+    P = rings*to_rad;
+    T = (t+sectors)*to_rad;
+    x[2] = sin(P) * cos(T) ;
+    y[2] = sin(P) * sin(T) ;
+    z[2] = cos(P);
+    positions_spheres.push_back(R * x[2]);
+    positions_spheres.push_back(R * y[2]);
+    positions_spheres.push_back(R * z[2]);
+
+    normals_spheres.push_back(x[2]);
+    normals_spheres.push_back(y[2]);
+    normals_spheres.push_back(z[2]);
+  }
+
+  //Body of the sphere
+  for (int p=rings; p<180-rings; p+=rings)
+    for(int t=0; t<360; t+=sectors)
+    {
+      //A
+      P = p*to_rad;
+      T = t*to_rad;
+      x[0] = sin(P) * cos(T) ;
+      y[0] = sin(P) * sin(T) ;
+      z[0] = cos(P);
+
+      positions_spheres.push_back(R * x[0]);
+      positions_spheres.push_back(R * y[0]);
+      positions_spheres.push_back(R * z[0]);
+
+      normals_spheres.push_back(x[0]);
+      normals_spheres.push_back(y[0]);
+      normals_spheres.push_back(z[0]);
+
+      //B
+      P = (p+rings)*to_rad;
+      T = t*to_rad;
+      x[1] = sin(P) * cos(T) ;
+      y[1] = sin(P) * sin(T) ;
+      z[1] = cos(P);
+      positions_spheres.push_back(R * x[1]);
+      positions_spheres.push_back(R * y[1]);
+      positions_spheres.push_back(R * z[1]);
+
+      normals_spheres.push_back(x[1]);
+      normals_spheres.push_back(y[1]);
+      normals_spheres.push_back(z[1]);
+
+      //C
+      P = p*to_rad;
+      T = (t+sectors)*to_rad;
+      x[2] = sin(P) * cos(T) ;
+      y[2] = sin(P) * sin(T) ;
+      z[2] = cos(P);
+      positions_spheres.push_back(R * x[2]);
+      positions_spheres.push_back(R * y[2]);
+      positions_spheres.push_back(R * z[2]);
+
+
+      normals_spheres.push_back(x[2]);
+      normals_spheres.push_back(y[2]);
+      normals_spheres.push_back(z[2]);
+      //D
+      P = (p+rings)*to_rad;
+      T = (t+sectors)*to_rad;
+      x[3] = sin(P) * cos(T) ;
+      y[3] = sin(P) * sin(T) ;
+      z[3] = cos(P);
+      positions_spheres.push_back(R * x[3]);
+      positions_spheres.push_back(R * y[3]);
+      positions_spheres.push_back(R * z[3]);
+
+
+      normals_spheres.push_back(x[3]);
+      normals_spheres.push_back(y[3]);
+      normals_spheres.push_back(z[3]);
+
+      positions_spheres.push_back(R * x[1]);
+      positions_spheres.push_back(R * y[1]);
+      positions_spheres.push_back(R * z[1]);
+
+      normals_spheres.push_back(x[1]);
+      normals_spheres.push_back(y[1]);
+      normals_spheres.push_back(z[1]);
+
+      positions_spheres.push_back(R * x[2]);
+      positions_spheres.push_back(R * y[2]);
+      positions_spheres.push_back(R * z[2]);
+
+      normals_spheres.push_back(x[2]);
+      normals_spheres.push_back(y[2]);
+      normals_spheres.push_back(z[2]);
+
+    }
+  //Bottom of the sphere
+  for(int t=0; t<360; t+=sectors)
+  {
+    positions_spheres.push_back(0);
+    positions_spheres.push_back(0);
+    positions_spheres.push_back(-R);
+
+    normals_spheres.push_back(0);
+    normals_spheres.push_back(0);
+    normals_spheres.push_back(-1);
+
+
+    P = (180-rings)*to_rad;
+    T = t*to_rad;
+    x[1] = sin(P) * cos(T) ;
+    y[1] = sin(P) * sin(T) ;
+    z[1] = cos(P);
+    positions_spheres.push_back(R * x[1]);
+    positions_spheres.push_back(R * y[1]);
+    positions_spheres.push_back(R * z[1]);
+
+    normals_spheres.push_back(x[1]);
+    normals_spheres.push_back(y[1]);
+    normals_spheres.push_back(z[1]);
+
+
+    P = (180-rings)*to_rad;
+    T = (t+sectors)*to_rad;
+    x[2] = sin(P) * cos(T) ;
+    y[2] = sin(P) * sin(T) ;
+    z[2] = cos(P);
+    positions_spheres.push_back(R * x[2]);
+    positions_spheres.push_back(R * y[2]);
+    positions_spheres.push_back(R * z[2]);
+
+    normals_spheres.push_back(x[2]);
+    normals_spheres.push_back(y[2]);
+    normals_spheres.push_back(z[2]);
+
+  }
+}
+
+template <class FLOAT>
+void create_flat_and_wire_sphere(FLOAT R,
+                   std::vector<FLOAT>& positions_spheres,
+                   std::vector<FLOAT>& normals_spheres,
+                   std::vector<FLOAT>& positions_wire_spheres,
+                   int prec = 36)
+{
+  //The smaller they are, the more precise the Sphere will be.
+  // Must be a divisor of 360 and 180.
+  const int rings=prec/2;
+  const int sectors=prec;
+  const float to_rad = static_cast<float>(CGAL_PI / 180.0);
+
+  create_flat_sphere(R, positions_spheres, normals_spheres);
+  
+  float T, P;
+  float x[4],y[4],z[4];
+
+  //Top of the sphere
+  for(int t=0; t<360; t+=sectors)
+  {
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(R);
+
+    P = rings*to_rad;
+    T = t*to_rad;
+    x[1] = sin(P) * cos(T) ;
+    y[1] = sin(P) * sin(T) ;
+    z[1] = cos(P);
+
+    positions_wire_spheres.push_back(R * x[1]);
+    positions_wire_spheres.push_back(R * y[1]);
+    positions_wire_spheres.push_back(R * z[1]);
+
+    positions_wire_spheres.push_back(R * x[1]);
+    positions_wire_spheres.push_back(R * y[1]);
+    positions_wire_spheres.push_back(R * z[1]);
+
+    //
+    P = rings*to_rad;
+    T = (t+sectors)*to_rad;
+    x[2] = sin(P) * cos(T) ;
+    y[2] = sin(P) * sin(T) ;
+    z[2] = cos(P);
+    positions_wire_spheres.push_back(R * x[2]);
+    positions_wire_spheres.push_back(R * y[2]);
+    positions_wire_spheres.push_back(R * z[2]);
+
+    positions_wire_spheres.push_back(R * x[2]);
+    positions_wire_spheres.push_back(R * y[2]);
+    positions_wire_spheres.push_back(R * z[2]);
+
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(R);
+  }
+
+  //Body of the sphere
+  for (int p=rings; p<180-rings; p+=rings)
+    for(int t=0; t<360; t+=sectors)
+    {
+      //A
+      P = p*to_rad;
+      T = t*to_rad;
+      x[0] = sin(P) * cos(T) ;
+      y[0] = sin(P) * sin(T) ;
+      z[0] = cos(P);
+
+      //B
+      P = (p+rings)*to_rad;
+      T = t*to_rad;
+      x[1] = sin(P) * cos(T) ;
+      y[1] = sin(P) * sin(T) ;
+      z[1] = cos(P);
+
+      //C
+      P = p*to_rad;
+      T = (t+sectors)*to_rad;
+      x[2] = sin(P) * cos(T) ;
+      y[2] = sin(P) * sin(T) ;
+      z[2] = cos(P);
+
+      //D
+      P = (p+rings)*to_rad;
+      T = (t+sectors)*to_rad;
+      x[3] = sin(P) * cos(T) ;
+      y[3] = sin(P) * sin(T) ;
+      z[3] = cos(P);
+
+      positions_wire_spheres.push_back(R * x[0]);
+      positions_wire_spheres.push_back(R * y[0]);
+      positions_wire_spheres.push_back(R * z[0]);
+
+
+      positions_wire_spheres.push_back(R * x[1]);
+      positions_wire_spheres.push_back(R * y[1]);
+      positions_wire_spheres.push_back(R * z[1]);
+
+
+      positions_wire_spheres.push_back(R * x[1]);
+      positions_wire_spheres.push_back(R * y[1]);
+      positions_wire_spheres.push_back(R * z[1]);
+
+
+
+      positions_wire_spheres.push_back(R * x[3]);
+      positions_wire_spheres.push_back(R * y[3]);
+      positions_wire_spheres.push_back(R * z[3]);
+
+
+
+      positions_wire_spheres.push_back(R * x[3]);
+      positions_wire_spheres.push_back(R * y[3]);
+      positions_wire_spheres.push_back(R * z[3]);
+
+
+
+      positions_wire_spheres.push_back(R * x[2]);
+      positions_wire_spheres.push_back(R * y[2]);
+      positions_wire_spheres.push_back(R * z[2]);
+
+
+      positions_wire_spheres.push_back(R * x[2]);
+      positions_wire_spheres.push_back(R * y[2]);
+      positions_wire_spheres.push_back(R * z[2]);
+
+
+      positions_wire_spheres.push_back(R * x[0]);
+      positions_wire_spheres.push_back(R * y[0]);
+      positions_wire_spheres.push_back(R * z[0]);
+
+    }
+  //Bottom of the sphere
+  for(int t=0; t<360; t+=sectors)
+  {
+    P = (180-rings)*to_rad;
+    T = t*to_rad;
+    x[1] = sin(P) * cos(T) ;
+    y[1] = sin(P) * sin(T) ;
+    z[1] = cos(P);
+
+    P = (180-rings)*to_rad;
+    T = (t+sectors)*to_rad;
+    x[2] = sin(P) * cos(T) ;
+    y[2] = sin(P) * sin(T) ;
+    z[2] = cos(P);
+
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(-R);
+
+    positions_wire_spheres.push_back(R * x[1]);
+    positions_wire_spheres.push_back(R * y[1]);
+    positions_wire_spheres.push_back(R * z[1]);
+
+
+    positions_wire_spheres.push_back(R * x[1]);
+    positions_wire_spheres.push_back(R * y[1]);
+    positions_wire_spheres.push_back(R * z[1]);
+
+    positions_wire_spheres.push_back(R * x[2]);
+    positions_wire_spheres.push_back(R * y[2]);
+    positions_wire_spheres.push_back(R * z[2]);
+
+
+    positions_wire_spheres.push_back(R * x[2]);
+    positions_wire_spheres.push_back(R * y[2]);
+    positions_wire_spheres.push_back(R * z[2]);
+
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(0);
+    positions_wire_spheres.push_back(-R);
+  }
+}
+
+#endif //POLYHEDRON_DEMO_DRAW_SPHERE_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/anchor.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/anchor.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/anchor.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/anchor.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/bones.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/bones.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/bones.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/bones.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/couplingdown.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/couplingdown.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/couplingdown.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/couplingdown.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/cow.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cow.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/cow.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/cow.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/cross.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cross.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/cross.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/cross.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/cube-ouvert.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube-ouvert.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/cube-ouvert.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/cube-ouvert.off
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube-shuffled.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube-shuffled.off
new file mode 100644
index 0000000..dee1982
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube-shuffled.off
@@ -0,0 +1,47 @@
+# Output of a CGAL tool
+#CBP
+# polyhedral_surface 0
+# halfedges 0
+# triangulated 0
+# non_empty_facets 0
+# terrain 0
+# normalized_to_sphere 0
+# radius 0
+# rounded 0
+# rounded_bits 0
+# ENDCBP
+
+OFF
+8 12 0
+
+# 8 vertices
+# ------------------------------------------
+
+
+-1 -1 -1
+-1 1 -1
+1 1 -1
+1 -1 -1
+-1 -1 1
+-1 1 1
+1 1 1
+1 -1 1
+
+# 12 facets
+# ------------------------------------------
+
+3  3 1 0
+3  3 1 2
+3  1 4 0
+3  1 4 5
+3  3 2 7
+3  7 2 6
+3  3 0 4
+3  7 4 3
+3  7 4 6
+3  6 5 4
+3  6 5 1
+3  2 1 6
+
+
+# End of OFF #
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/cube.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/cube.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/cube.off
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube4-shuffled.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube4-shuffled.off
new file mode 100644
index 0000000..e4c11b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/data/cube4-shuffled.off
@@ -0,0 +1,41 @@
+# Output of a CGAL tool
+#CBP
+# polyhedral_surface 0
+# halfedges 0
+# triangulated 0
+# non_empty_facets 0
+# terrain 0
+# normalized_to_sphere 0
+# radius 0
+# rounded 0
+# rounded_bits 0
+# ENDCBP
+
+OFF
+8 6 0
+
+# 8 vertices
+# ------------------------------------------
+
+
+-1 -1 -1
+-1 1 -1
+1 1 -1
+1 -1 -1
+-1 -1 1
+-1 1 1
+1 1 1
+1 -1 1
+
+# 6 facets
+# ------------------------------------------
+
+4  1 2 3 0
+4  0 1 5 4
+4  2 6 7 3
+4  3 7 4 0
+4  6 5 4 7
+4  6 2 1 5
+
+
+# End of OFF #
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/dragknob.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/dragknob.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/dragknob.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/dragknob.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/elephant.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/elephant.off
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Polyhedron/data/elephant.off
copy to 3rdparty/CGAL-4.8/demo/Polyhedron/data/elephant.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/ellipsoid.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/ellipsoid.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/ellipsoid.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/ellipsoid.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/handle.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/handle.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/handle.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/handle.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/icosahedron.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/icosahedron.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/icosahedron.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/icosahedron.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/joint.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/joint.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/joint.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/joint.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/knot1.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/knot1.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/knot1.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/knot1.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/knot2.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/knot2.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/knot2.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/knot2.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/man.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/man.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/man.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/man.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/mushroom.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/mushroom.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/mushroom.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/mushroom.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/negative.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/negative.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/negative.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/negative.off
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/data/oblong-shuffled.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/oblong-shuffled.off
new file mode 100644
index 0000000..9027280
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/data/oblong-shuffled.off
@@ -0,0 +1,1291 @@
+# Output of a CGAL tool
+#CBP
+# polyhedral_surface 0
+# halfedges 0
+# triangulated 0
+# non_empty_facets 0
+# terrain 0
+# normalized_to_sphere 0
+# radius 0
+# rounded 0
+# rounded_bits 0
+# ENDCBP
+
+OFF
+424 840 0
+
+# 424 vertices
+# ------------------------------------------
+
+
+68.7865 31.8449 54
+68.99 29 54
+78 52 54
+57.3041 47.1835 54
+59.8074 45.8167 54
+0 58 54
+0 6 54
+4 6 54
+4 0 54
+27.99 0 54
+27.99 6 54
+29 48.99 54
+49 48.99 54
+50 52 54
+51.8449 48.7865 54
+54.6318 48.1803 54
+62.0907 44.1074 54
+64.1074 42.0907 54
+65.8167 39.8074 54
+54.6318 9.81973 54
+51.8449 9.21347 54
+50.0065 6 54
+49 9.01 54
+68.1803 23.3682 54
+67.1835 20.6959 54
+78 6 54
+65.8167 18.1926 54
+74 6 54
+64.1074 15.9093 54
+74 0 54
+62.0907 13.8926 54
+59.8074 12.1833 54
+68.7865 26.1551 54
+67.1835 37.3041 54
+68.1803 34.6318 54
+9.81974 34.6318 54
+10.8165 37.3041 54
+23.3682 48.1803 54
+26.1551 48.7865 54
+50.0065 0 54
+57.3041 10.8165 54
+9.21347 31.8449 54
+50 58 54
+23.3682 9.81973 54
+26.1551 9.21347 54
+29 9.01 54
+20.6959 10.8165 54
+18.1926 12.1833 54
+15.9093 13.8926 54
+13.8926 15.9093 54
+12.1833 18.1926 54
+10.8165 20.6959 54
+12.1833 39.8074 54
+13.8926 42.0907 54
+15.9093 44.1074 54
+9.81974 23.3682 54
+9.21347 26.1551 54
+9.01 29 54
+18.1926 45.8167 54
+20.6959 47.1835 54
+50.0065 0 0
+74 0 0
+0 58 0
+0 6 0
+4 0 0
+27.99 0 0
+78 6 0
+78 52 0
+50 58 0
+17.9479 46.6482 0
+17 46.2062 0
+16.1433 45.6063 0
+15.4037 44.8667 0
+14.8039 44.01 0
+14.3618 43.0621 0
+74 6 0
+50.0065 6 0
+50 52 0
+20 47.01 0
+18.9581 46.9188 0
+14.3618 14.9379 0
+14.8039 13.99 0
+4 6 0
+15.4037 13.1333 0
+16.1433 12.3937 0
+17 11.7938 0
+14.0912 42.0519 0
+14 41.01 0
+14 16.99 0
+14.0912 15.9481 0
+63.1962 13.99 0
+63.6382 14.9379 0
+63.9088 15.9481 0
+78 6 0
+64 16.99 0
+78 52 0
+64 41.01 0
+63.9088 42.0519 0
+63.6382 43.0621 0
+63.1962 44.01 0
+17.9479 11.3518 0
+27.99 6 0
+60.0521 11.3518 0
+61 11.7938 0
+62.5963 44.8667 0
+61.8567 45.6063 0
+61 46.2062 0
+60.0521 46.6482 0
+59.0419 46.9188 0
+58 47.01 0
+61.8567 12.3937 0
+62.5963 13.1333 0
+18.9581 11.0812 0
+20 10.99 0
+58 10.99 0
+59.0419 11.0812 0
+64 41.01 3
+64 16.99 3
+20 47.01 3
+58 47.01 3
+14 41.01 3
+14 16.99 3
+58 10.99 3
+20 10.99 3
+19.3 31.9445 3
+18.8145 31.6045 3
+22.7 26.0555 3
+56.4791 31.9544 3
+22.1629 25.805 3
+21.5904 25.6516 3
+23.9445 27.3 3
+24.195 27.8371 3
+24.3484 28.4096 3
+55.9739 31.8191 3
+55.5 31.5981 3
+55.0716 31.2981 3
+54.1809 30.0261 3
+54.0456 29.5209 3
+18.3955 31.1855 3
+18.0555 30.7 3
+17.805 30.1629 3
+23.1855 26.3955 3
+23.6045 26.8145 3
+54.7019 30.9284 3
+54.4019 30.5 3
+59.2981 27.0716 3
+59.5981 27.5 3
+24.4 29 3
+24.3484 29.5904 3
+57 32 3
+24.195 30.1629 3
+17.6517 29.5904 3
+17.6 29 3
+17.6517 28.4096 3
+17.805 27.8371 3
+18.0555 27.3 3
+18.3955 26.8145 3
+59.8191 27.9739 3
+59.9544 28.4791 3
+60 29 3
+59.9544 29.5209 3
+59.8191 30.0261 3
+59.5981 30.5 3
+59.2981 30.9284 3
+57.521 31.9544 3
+60.0521 46.6482 3
+59.0419 46.9188 3
+23.9445 30.7 3
+23.6045 31.1855 3
+54 29 3
+54.0456 28.4791 3
+54.1809 27.9739 3
+58.9284 31.2981 3
+58.5 31.5981 3
+63.9088 42.0519 3
+58.0261 31.8191 3
+63.6382 43.0621 3
+63.1962 44.01 3
+62.5963 44.8667 3
+61.8567 45.6063 3
+61 46.2062 3
+23.1855 31.6045 3
+22.7 31.9445 3
+22.1629 32.195 3
+21.5904 32.3484 3
+21 32.4 3
+18.9581 46.9188 3
+20.4096 32.3484 3
+17.9479 46.6482 3
+18.8145 26.3955 3
+19.3 26.0555 3
+14.0912 15.9481 3
+19.8371 25.805 3
+14.3618 14.9379 3
+14.8039 13.99 3
+15.4037 13.1333 3
+16.1433 12.3937 3
+20.4096 25.6516 3
+21 25.6 3
+17.9479 11.3518 3
+17 11.7938 3
+55.9739 26.1809 3
+55.5 26.4019 3
+55.0716 26.7019 3
+17 46.2062 3
+16.1433 45.6063 3
+15.4037 44.8667 3
+19.8371 32.195 3
+14.8039 44.01 3
+14.3618 43.0621 3
+14.0912 42.0519 3
+18.9581 11.0812 3
+54.4019 27.5 3
+54.7019 27.0716 3
+58.0261 26.1809 3
+62.5963 13.1333 3
+57.521 26.0456 3
+61.8567 12.3937 3
+56.4791 26.0456 3
+57 26 3
+59.0419 11.0812 3
+60.0521 11.3518 3
+61 11.7938 3
+63.1962 13.99 3
+63.6382 14.9379 3
+63.9088 15.9481 3
+58.5 26.4019 3
+58.9284 26.7019 3
+17.6517 29.5904 26.25
+17.805 30.1629 26.25
+18.0555 30.7 26.25
+18.3955 31.1855 26.25
+18.8145 31.6045 26.25
+19.3 31.9445 26.25
+19.8371 32.195 26.25
+20.4096 32.3484 26.25
+21 32.4 26.25
+21.5904 32.3484 26.25
+22.1629 32.195 26.25
+22.7 31.9445 26.25
+23.1855 31.6045 26.25
+23.6045 31.1855 26.25
+23.9445 30.7 26.25
+24.195 30.1629 26.25
+24.3484 29.5904 26.25
+24.4 29 26.25
+24.3484 28.4096 26.25
+24.195 27.8371 26.25
+23.9445 27.3 26.25
+23.6045 26.8145 26.25
+23.1855 26.3955 26.25
+22.7 26.0555 26.25
+22.1629 25.805 26.25
+21.5904 25.6516 26.25
+21 25.6 26.25
+20.4096 25.6516 26.25
+19.8371 25.805 26.25
+19.3 26.0555 26.25
+18.8145 26.3955 26.25
+18.3955 26.8145 26.25
+18.0555 27.3 26.25
+17.805 27.8371 26.25
+17.6517 28.4096 26.25
+17.6 29 26.25
+21 29 28.2929
+54.0456 29.5209 29
+54.1809 30.0261 29
+54.4019 30.5 29
+54.7019 30.9284 29
+55.0716 31.2981 29
+55.5 31.5981 29
+55.9739 31.8191 29
+56.4791 31.9544 29
+57 32 29
+57.521 31.9544 29
+58.0261 31.8191 29
+58.5 31.5981 29
+58.9284 31.2981 29
+59.2981 30.9284 29
+59.5981 30.5 29
+59.8191 30.0261 29
+59.9544 29.5209 29
+60 29 29
+59.9544 28.4791 29
+59.8191 27.9739 29
+59.5981 27.5 29
+59.2981 27.0716 29
+58.9284 26.7019 29
+58.5 26.4019 29
+58.0261 26.1809 29
+57.521 26.0456 29
+57 26 29
+56.4791 26.0456 29
+55.9739 26.1809 29
+55.5 26.4019 29
+55.0716 26.7019 29
+54.7019 27.0716 29
+54.4019 27.5 29
+54.1809 27.9739 29
+54.0456 28.4791 29
+54 29 29
+57 29 30.8026
+29 9.01 58
+26.1551 9.21347 58
+23.3682 9.81973 58
+20.6959 10.8165 58
+18.1926 12.1833 58
+15.9093 13.8926 58
+13.8926 15.9093 58
+12.1833 18.1926 58
+10.8165 20.6959 58
+9.81974 23.3682 58
+9.21347 26.1551 58
+9.01 29 58
+9.21347 31.8449 58
+9.81974 34.6318 58
+10.8165 37.3041 58
+12.1833 39.8074 58
+13.8926 42.0907 58
+15.9093 44.1074 58
+18.1926 45.8167 58
+20.6959 47.1835 58
+23.3682 48.1803 58
+26.1551 48.7865 58
+29 48.99 58
+49 9.01 58
+49 48.99 58
+51.8449 48.7865 58
+54.6318 48.1803 58
+57.3041 47.1835 58
+59.8074 45.8167 58
+62.0907 44.1074 58
+64.1074 42.0907 58
+65.8167 39.8074 58
+67.1835 37.3041 58
+68.1803 34.6318 58
+68.7865 31.8449 58
+68.99 29 58
+68.7865 26.1551 58
+68.1803 23.3682 58
+67.1835 20.6959 58
+65.8167 18.1926 58
+64.1074 15.9093 58
+62.0907 13.8926 58
+59.8074 12.1833 58
+57.3041 10.8165 58
+54.6318 9.81973 58
+51.8449 9.21347 58
+55.01 29 58
+54.7916 26.3648 58
+47.7566 15.597 58
+45.4311 14.3385 58
+54.7916 31.6352 58
+54.1425 34.1984 58
+53.0804 21.3801 58
+54.1425 23.8016 58
+53.0804 36.6199 58
+51.6341 38.8335 58
+49.8433 40.7789 58
+42.9302 13.4799 58
+40.3221 13.0447 58
+37.6779 13.0447 58
+35.0698 13.4799 58
+32.5689 14.3385 58
+30.2434 15.597 58
+28.1567 17.2211 58
+51.6341 19.1665 58
+49.8433 17.2211 58
+24.9196 21.3801 58
+26.3659 19.1665 58
+23.8575 23.8016 58
+22.99 29 58
+23.2083 31.6352 58
+30.2434 42.403 58
+32.5689 43.6615 58
+23.2083 26.3648 58
+35.0698 44.5201 58
+37.6779 44.9553 58
+40.3221 44.9553 58
+24.9196 36.6199 58
+23.8575 34.1984 58
+26.3659 38.8335 58
+28.1567 40.7789 58
+47.7566 42.403 58
+45.4311 43.6615 58
+42.9302 44.5201 58
+54.7916 31.6352 54
+54.1425 34.1984 54
+53.0804 36.6199 54
+51.6341 38.8335 54
+49.8433 40.7789 54
+47.7566 42.403 54
+45.4311 43.6615 54
+42.9302 44.5201 54
+40.3221 44.9553 54
+37.6779 44.9553 54
+35.0698 44.5201 54
+32.5689 43.6615 54
+30.2434 42.403 54
+28.1567 40.7789 54
+26.3659 38.8335 54
+24.9196 36.6199 54
+23.8575 34.1984 54
+23.2083 31.6352 54
+22.99 29 54
+23.2083 26.3648 54
+23.8575 23.8016 54
+24.9196 21.3801 54
+26.3659 19.1665 54
+28.1567 17.2211 54
+30.2434 15.597 54
+32.5689 14.3385 54
+35.0698 13.4799 54
+37.6779 13.0447 54
+40.3221 13.0447 54
+42.9302 13.4799 54
+45.4311 14.3385 54
+47.7566 15.597 54
+49.8433 17.2211 54
+51.6341 19.1665 54
+53.0804 21.3801 54
+54.1425 23.8016 54
+54.7916 26.3648 54
+55.01 29 54
+
+# 840 facets
+# ------------------------------------------
+
+3  0 1 2
+3  2 4 3
+3  7 6 5
+3  8 9 7
+3  10 9 7
+3  11 12 13
+3  13 12 14
+3  2 14 13
+3  2 14 15
+3  2 15 3
+3  4 16 2
+3  2 16 17
+3  2 17 18
+3  19 20 21
+3  21 20 22
+3  21 22 10
+3  25 24 23
+3  25 24 26
+3  25 26 27
+3  28 26 27
+3  27 28 29
+3  29 28 30
+3  31 30 29
+3  2 1 25
+3  25 1 32
+3  23 32 25
+3  18 33 2
+3  34 33 2
+3  2 34 0
+3  5 36 35
+3  38 37 5
+3  19 39 21
+3  29 39 19
+3  40 29 19
+3  40 29 31
+3  35 5 41
+3  11 13 38
+3  38 13 42
+3  38 42 5
+3  44 7 43
+3  10 7 44
+3  45 10 44
+3  45 10 22
+3  43 46 7
+3  7 46 47
+3  48 47 7
+3  7 49 48
+3  50 49 7
+3  7 50 51
+3  36 52 5
+3  53 52 5
+3  5 53 54
+3  7 55 51
+3  7 55 56
+3  5 56 7
+3  5 56 57
+3  5 57 41
+3  54 58 5
+3  59 58 5
+3  37 59 5
+3  39 60 29
+3  61 60 29
+3  5 62 6
+3  63 62 6
+3  9 64 8
+3  65 64 9
+3  25 66 2
+3  2 66 67
+3  42 68 5
+3  62 68 5
+3  62 70 69
+3  71 70 62
+3  71 72 62
+3  62 72 73
+3  62 73 74
+3  75 60 61
+3  76 60 75
+3  78 77 68
+3  62 78 68
+3  62 78 79
+3  62 79 69
+3  80 81 82
+3  83 81 82
+3  64 83 82
+3  84 83 64
+3  85 84 64
+3  74 86 62
+3  62 86 87
+3  63 87 62
+3  63 87 88
+3  63 88 82
+3  82 88 89
+3  82 89 80
+3  75 91 90
+3  75 91 92
+3  75 92 93
+3  93 92 94
+3  95 94 93
+3  95 94 96
+3  95 97 96
+3  95 97 98
+3  95 98 99
+3  85 101 100
+3  65 101 85
+3  64 65 85
+3  75 103 102
+3  95 104 99
+3  105 104 95
+3  106 105 95
+3  106 107 95
+3  108 107 95
+3  95 108 77
+3  109 108 77
+3  78 109 77
+3  103 110 75
+3  111 110 75
+3  75 111 90
+3  100 112 101
+3  101 112 113
+3  101 113 76
+3  114 113 76
+3  75 114 76
+3  115 114 75
+3  102 115 75
+3  13 77 42
+3  68 77 42
+3  2 95 13
+3  77 95 13
+3  8 82 7
+3  64 82 8
+3  7 63 6
+3  7 63 82
+3  21 76 39
+3  39 76 60
+3  9 65 10
+3  101 65 10
+3  10 101 21
+3  76 101 21
+3  27 61 29
+3  27 61 75
+3  27 75 25
+3  93 75 25
+3  116 94 96
+3  116 94 117
+3  78 109 118
+3  119 109 118
+3  120 121 87
+3  88 121 87
+3  114 113 122
+3  123 113 122
+3  124 125 120
+3  126 127 128
+3  129 127 128
+3  130 131 127
+3  127 131 132
+3  127 133 129
+3  129 133 134
+3  129 134 135
+3  129 136 137
+3  120 138 125
+3  120 138 139
+3  140 139 120
+3  126 141 127
+3  127 141 142
+3  127 142 130
+3  135 143 129
+3  129 143 144
+3  136 144 129
+3  145 146 117
+3  132 147 127
+3  127 147 148
+3  149 148 127
+3  150 148 149
+3  140 151 120
+3  120 151 152
+3  120 152 121
+3  121 152 153
+3  121 154 153
+3  121 154 155
+3  156 155 121
+3  117 157 146
+3  158 157 117
+3  116 158 117
+3  159 158 116
+3  116 159 160
+3  160 161 116
+3  162 161 116
+3  116 162 163
+3  165 149 164
+3  165 149 150
+3  165 150 166
+3  167 150 166
+3  166 167 119
+3  168 167 119
+3  137 169 129
+3  170 169 129
+3  129 170 171
+3  116 172 163
+3  173 172 116
+3  174 173 116
+3  174 173 175
+3  174 175 176
+3  178 176 177
+3  178 176 175
+3  178 175 179
+3  179 175 164
+3  180 164 179
+3  165 164 180
+3  168 181 119
+3  119 181 182
+3  119 182 118
+3  118 182 183
+3  183 184 118
+3  118 184 185
+3  186 185 118
+3  186 185 187
+3  188 187 186
+3  121 189 156
+3  190 189 121
+3  121 190 191
+3  191 190 192
+3  191 192 193
+3  194 193 195
+3  195 193 192
+3  195 192 196
+3  197 192 196
+3  198 199 197
+3  197 199 200
+3  196 200 197
+3  202 122 201
+3  202 122 123
+3  202 123 203
+3  204 188 205
+3  187 188 205
+3  205 187 206
+3  207 187 206
+3  206 207 208
+3  208 207 124
+3  208 124 209
+3  209 124 120
+3  209 120 210
+3  199 129 198
+3  171 129 199
+3  211 171 199
+3  211 171 212
+3  123 212 211
+3  123 212 213
+3  123 213 203
+3  216 215 214
+3  216 215 217
+3  122 218 201
+3  219 218 122
+3  220 219 122
+3  220 219 216
+3  220 216 221
+3  217 216 221
+3  221 217 222
+3  224 215 223
+3  224 215 214
+3  224 214 225
+3  226 214 225
+3  117 226 225
+3  117 226 227
+3  145 227 117
+3  79 118 78
+3  186 118 79
+3  69 186 79
+3  188 186 69
+3  69 188 70
+3  70 188 204
+3  70 204 71
+3  205 204 71
+3  71 205 72
+3  72 205 206
+3  72 206 73
+3  208 206 73
+3  74 208 73
+3  209 208 74
+3  86 209 74
+3  210 209 86
+3  87 210 86
+3  120 210 87
+3  97 116 96
+3  174 116 97
+3  98 174 97
+3  98 174 176
+3  99 176 98
+3  99 176 177
+3  104 177 99
+3  104 177 178
+3  104 178 105
+3  179 178 105
+3  106 179 105
+3  180 179 106
+3  107 180 106
+3  165 180 107
+3  108 165 107
+3  108 165 166
+3  109 166 108
+3  109 166 119
+3  115 122 114
+3  115 122 220
+3  102 220 115
+3  221 220 102
+3  102 221 103
+3  103 221 222
+3  110 222 103
+3  110 222 217
+3  110 217 111
+3  215 217 111
+3  111 215 90
+3  90 215 223
+3  90 223 91
+3  224 223 91
+3  92 224 91
+3  92 224 225
+3  92 225 94
+3  117 225 94
+3  89 121 88
+3  89 121 191
+3  80 191 89
+3  80 191 193
+3  81 193 80
+3  194 193 81
+3  81 194 83
+3  195 194 83
+3  84 195 83
+3  84 195 196
+3  84 196 85
+3  85 196 200
+3  85 200 100
+3  199 200 100
+3  112 199 100
+3  112 199 211
+3  113 211 112
+3  113 211 123
+3  229 151 228
+3  140 151 229
+3  230 140 229
+3  230 140 139
+3  230 139 231
+3  138 139 231
+3  231 138 232
+3  125 138 232
+3  233 125 232
+3  233 125 124
+3  233 124 234
+3  234 124 207
+3  234 207 235
+3  235 207 187
+3  235 187 236
+3  236 187 185
+3  236 185 237
+3  237 185 184
+3  237 184 238
+3  183 184 238
+3  238 183 239
+3  182 183 239
+3  240 182 239
+3  240 182 181
+3  240 181 241
+3  241 181 168
+3  241 168 242
+3  242 168 167
+3  243 167 242
+3  243 167 150
+3  243 150 244
+3  148 150 244
+3  244 148 245
+3  245 148 147
+3  245 147 246
+3  132 147 246
+3  246 132 247
+3  131 132 247
+3  248 131 247
+3  248 131 130
+3  248 130 249
+3  249 130 142
+3  249 142 250
+3  250 142 141
+3  250 141 251
+3  126 141 251
+3  252 126 251
+3  128 126 252
+3  252 128 253
+3  129 128 253
+3  254 129 253
+3  198 129 254
+3  255 198 254
+3  197 198 255
+3  255 197 256
+3  256 197 192
+3  256 192 257
+3  190 192 257
+3  258 190 257
+3  258 190 189
+3  258 189 259
+3  259 189 156
+3  259 156 260
+3  260 156 155
+3  260 155 261
+3  261 155 154
+3  261 154 262
+3  153 154 262
+3  262 153 263
+3  152 153 263
+3  228 152 263
+3  228 152 151
+3  263 228 264
+3  232 264 231
+3  264 230 229
+3  234 264 235
+3  232 233 264
+3  237 264 238
+3  264 236 235
+3  240 264 241
+3  264 239 238
+3  244 264 243
+3  264 242 241
+3  246 264 247
+3  244 245 264
+3  249 264 250
+3  247 248 264
+3  253 264 252
+3  264 251 250
+3  255 264 256
+3  264 254 253
+3  258 264 259
+3  256 257 264
+3  261 264 262
+3  259 260 264
+3  264 263 262
+3  264 260 261
+3  258 257 264
+3  264 254 255
+3  252 251 264
+3  249 248 264
+3  264 245 246
+3  264 242 243
+3  240 239 264
+3  237 236 264
+3  264 233 234
+3  231 230 264
+3  264 228 229
+3  266 137 265
+3  266 137 136
+3  266 136 267
+3  144 136 267
+3  268 144 267
+3  268 144 143
+3  268 143 269
+3  269 143 135
+3  269 135 270
+3  134 135 270
+3  271 134 270
+3  133 134 271
+3  272 133 271
+3  272 133 127
+3  273 127 272
+3  149 127 273
+3  273 149 274
+3  274 149 164
+3  275 164 274
+3  175 164 275
+3  275 175 276
+3  276 175 173
+3  277 173 276
+3  172 173 277
+3  278 172 277
+3  163 172 278
+3  279 163 278
+3  162 163 279
+3  279 162 280
+3  161 162 280
+3  280 161 281
+3  281 161 160
+3  281 160 282
+3  159 160 282
+3  283 159 282
+3  283 159 158
+3  284 158 283
+3  284 158 157
+3  284 157 285
+3  285 157 146
+3  285 146 286
+3  286 146 145
+3  286 145 287
+3  227 145 287
+3  288 227 287
+3  288 227 226
+3  289 226 288
+3  289 226 214
+3  290 214 289
+3  216 214 290
+3  290 216 291
+3  219 216 291
+3  292 219 291
+3  218 219 292
+3  293 218 292
+3  201 218 293
+3  294 201 293
+3  202 201 294
+3  294 202 295
+3  295 202 203
+3  296 203 295
+3  213 203 296
+3  296 213 297
+3  212 213 297
+3  297 212 298
+3  298 212 171
+3  298 171 299
+3  299 171 170
+3  300 170 299
+3  169 170 300
+3  265 169 300
+3  265 169 137
+3  301 265 300
+3  268 301 269
+3  266 267 301
+3  271 301 272
+3  269 270 301
+3  275 301 274
+3  301 273 272
+3  277 301 278
+3  301 276 275
+3  281 301 280
+3  301 279 278
+3  283 301 284
+3  281 282 301
+3  286 301 287
+3  301 285 284
+3  290 301 289
+3  301 288 287
+3  293 301 292
+3  290 291 301
+3  295 301 296
+3  301 294 293
+3  298 301 299
+3  301 297 296
+3  299 300 301
+3  301 297 298
+3  295 294 301
+3  292 291 301
+3  301 288 289
+3  286 285 301
+3  283 282 301
+3  280 279 301
+3  277 276 301
+3  274 273 301
+3  271 270 301
+3  301 267 268
+3  266 265 301
+3  45 302 44
+3  44 302 303
+3  43 303 44
+3  43 303 304
+3  46 304 43
+3  305 304 46
+3  46 305 47
+3  306 305 47
+3  48 306 47
+3  307 306 48
+3  48 307 49
+3  308 307 49
+3  49 308 50
+3  309 308 50
+3  51 309 50
+3  51 309 310
+3  55 310 51
+3  55 310 311
+3  56 311 55
+3  56 311 312
+3  56 312 57
+3  313 312 57
+3  41 313 57
+3  41 313 314
+3  41 314 35
+3  35 314 315
+3  36 315 35
+3  36 315 316
+3  36 316 52
+3  52 316 317
+3  52 317 53
+3  318 317 53
+3  54 318 53
+3  54 318 319
+3  58 319 54
+3  320 319 58
+3  58 320 59
+3  59 320 321
+3  37 321 59
+3  37 321 322
+3  37 322 38
+3  323 322 38
+3  38 323 11
+3  11 323 324
+3  22 302 325
+3  45 302 22
+3  14 326 12
+3  14 326 327
+3  14 327 15
+3  15 327 328
+3  3 328 15
+3  329 328 3
+3  3 329 4
+3  4 329 330
+3  4 330 16
+3  331 330 16
+3  17 331 16
+3  17 331 332
+3  18 332 17
+3  18 332 333
+3  33 333 18
+3  33 333 334
+3  33 334 34
+3  335 334 34
+3  34 335 0
+3  0 335 336
+3  0 336 1
+3  337 336 1
+3  1 337 32
+3  32 337 338
+3  23 338 32
+3  339 338 23
+3  23 339 24
+3  24 339 340
+3  24 340 26
+3  341 340 26
+3  26 341 28
+3  342 341 28
+3  28 342 30
+3  343 342 30
+3  30 343 31
+3  31 343 344
+3  40 344 31
+3  345 344 40
+3  19 345 40
+3  346 345 19
+3  19 346 20
+3  347 346 20
+3  20 347 22
+3  22 347 325
+3  324 326 11
+3  12 326 11
+3  349 348 338
+3  350 351 325
+3  348 337 338
+3  348 337 336
+3  352 336 348
+3  352 336 335
+3  353 335 352
+3  354 341 355
+3  355 341 340
+3  349 340 355
+3  339 340 349
+3  338 339 349
+3  356 331 357
+3  357 331 330
+3  358 330 357
+3  335 334 353
+3  353 334 333
+3  353 333 356
+3  356 333 332
+3  331 332 356
+3  351 359 325
+3  360 359 325
+3  325 360 302
+3  302 360 361
+3  302 362 361
+3  363 362 302
+3  303 363 302
+3  303 363 364
+3  303 364 304
+3  304 364 365
+3  366 343 354
+3  354 343 342
+3  341 342 354
+3  350 347 325
+3  350 347 346
+3  350 346 367
+3  367 346 345
+3  367 345 366
+3  344 345 366
+3  343 344 366
+3  368 307 369
+3  306 307 369
+3  369 306 365
+3  305 306 365
+3  304 305 365
+3  370 309 368
+3  368 309 308
+3  368 308 307
+3  314 371 372
+3  373 374 324
+3  371 313 314
+3  312 313 371
+3  371 312 375
+3  375 312 311
+3  375 311 370
+3  370 311 310
+3  370 310 309
+3  374 376 324
+3  377 376 324
+3  326 377 324
+3  326 377 378
+3  380 317 379
+3  380 317 316
+3  380 316 372
+3  315 316 372
+3  314 315 372
+3  379 319 381
+3  379 319 318
+3  379 318 317
+3  324 323 373
+3  322 323 373
+3  382 322 373
+3  382 322 321
+3  382 321 381
+3  381 321 320
+3  381 320 319
+3  358 329 330
+3  328 329 358
+3  358 328 383
+3  383 328 327
+3  383 327 384
+3  384 327 326
+3  384 326 385
+3  378 326 385
+3  387 352 386
+3  387 352 353
+3  387 353 388
+3  388 353 356
+3  389 356 388
+3  357 356 389
+3  389 357 390
+3  390 357 358
+3  391 358 390
+3  383 358 391
+3  391 383 392
+3  384 383 392
+3  392 384 393
+3  393 384 385
+3  393 385 394
+3  378 385 394
+3  395 378 394
+3  395 378 377
+3  395 377 396
+3  376 377 396
+3  397 376 396
+3  374 376 397
+3  397 374 398
+3  398 374 373
+3  399 373 398
+3  382 373 399
+3  400 382 399
+3  381 382 400
+3  400 381 401
+3  379 381 401
+3  402 379 401
+3  402 379 380
+3  402 380 403
+3  372 380 403
+3  404 372 403
+3  404 372 371
+3  405 371 404
+3  405 371 375
+3  405 375 406
+3  370 375 406
+3  407 370 406
+3  368 370 407
+3  408 368 407
+3  408 368 369
+3  408 369 409
+3  409 369 365
+3  409 365 410
+3  364 365 410
+3  410 364 411
+3  363 364 411
+3  412 363 411
+3  412 363 362
+3  413 362 412
+3  413 362 361
+3  414 361 413
+3  414 361 360
+3  415 360 414
+3  415 360 359
+3  415 359 416
+3  416 359 351
+3  416 351 417
+3  417 351 350
+3  417 350 418
+3  367 350 418
+3  418 367 419
+3  419 367 366
+3  419 366 420
+3  420 366 354
+3  420 354 421
+3  355 354 421
+3  421 355 422
+3  422 355 349
+3  423 349 422
+3  423 349 348
+3  386 348 423
+3  352 348 386
+3  392 393 394
+3  411 412 413
+3  419 418 417
+3  410 409 397
+3  394 414 413
+3  415 414 394
+3  394 415 416
+3  397 411 410
+3  397 411 413
+3  396 413 397
+3  396 413 394
+3  396 394 395
+3  398 399 397
+3  405 399 397
+3  408 409 407
+3  397 409 407
+3  406 397 407
+3  405 397 406
+3  405 400 399
+3  405 400 401
+3  405 401 404
+3  404 401 402
+3  404 402 403
+3  419 388 387
+3  389 388 419
+3  390 389 419
+3  419 420 387
+3  421 420 387
+3  386 421 387
+3  386 421 422
+3  423 422 386
+3  416 417 394
+3  394 417 419
+3  392 419 394
+3  392 419 390
+3  392 390 391
+
+
+# End of OFF #
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/oblong.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/oblong.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/oblong.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/oblong.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/pinion.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/pinion.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/pinion.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/pinion.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/pipe.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/pipe.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/pipe.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/pipe.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/pyramid.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/pyramid.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/pyramid.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/pyramid.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/rotor.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/rotor.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/rotor.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/rotor.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/sphere.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/sphere.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/sphere.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/sphere.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/spool.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/spool.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/spool.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/spool.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/star.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/star.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/star.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/star.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/translated-cube.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/translated-cube.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/translated-cube.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/translated-cube.off
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/tripod.off b/3rdparty/CGAL-4.8/demo/Polyhedron/data/tripod.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/tripod.off
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/data/tripod.off
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/CMakeLists.txt
new file mode 100644
index 0000000..ad72844
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/CMakeLists.txt
@@ -0,0 +1,78 @@
+# This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions.
+
+project( Mesh_3_implicit_functions )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Let plugins be compiled in the same directory as the executable.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+# Include directory of demo includes
+include_directories( BEFORE ${Mesh_3_implicit_functions_BINARY_DIR} ../include )
+
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+set( QT_USE_QTXML    TRUE )
+set( QT_USE_QTMAIN   TRUE )
+set( QT_USE_QTSCRIPT  TRUE )
+set( QT_USE_QTOPENGL  TRUE )
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL ScriptTools )
+
+
+if(CGAL_Qt5_FOUND AND Qt5_FOUND)
+  # put plugins (which are shared libraries) at the same location as
+  # executable files
+  set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_PATH})
+
+  ###########
+  # PLUGINS #
+  ###########
+  include(AddFileDependencies)
+  remove_definitions(-DQT_STATICPLUGIN)
+
+  # polyhedron_demo_plugin is a macro copied from demo/Polyhedron/CMakeLists.txt
+  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
+    list_split(option ARGN_TAIL ${ARGN} )
+    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
+      set(other_sources ${ARGN})
+      set(option "")
+    else()
+      set(other_sources ${ARGN_TAIL})
+    endif()
+    qt5_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc )
+    add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
+
+    add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources})
+    qt5_use_modules(${plugin_name} Widgets Script OpenGL Gui Xml)
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
+    # Link with Qt
+    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
+    # Link with CGAL
+    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+  endmacro(polyhedron_demo_plugin)
+
+  polyhedron_demo_plugin(p_sphere_function_plugin Sphere_implicit_function)
+  polyhedron_demo_plugin(p_tanglecube_function_plugin Tanglecube_implicit_function)
+  polyhedron_demo_plugin(p_klein_function_plugin Klein_implicit_function)
+
+else (CGAL_Qt5_FOUND AND Qt5_FOUND)
+
+  set(MESH_3_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "the CGAL Qt5 library, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(MESH_3_MISSING_DEPS "Qt5, ${MESH_3_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.")
+
+endif (CGAL_Qt5_FOUND AND Qt5_FOUND)
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Implicit_function_interface.h b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Implicit_function_interface.h
new file mode 100644
index 0000000..ecd7f52
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Implicit_function_interface.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
+#define CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
+
+#include <QObject>
+#include <QString>
+#include <CGAL/Three/Scene_interface.h>
+
+class Implicit_function_interface 
+{
+public:
+  typedef CGAL::Three::Scene_interface::Bbox Bbox;
+  
+  virtual ~Implicit_function_interface() {}
+  
+  virtual QString name() const = 0;
+  virtual double operator()(double x, double y, double z) const = 0;
+  virtual Bbox bbox() const = 0;
+
+  /// Returns the minimum and maximum of the function.
+  ///
+  /// The method returns false if it cannot know efficiently its extrema.
+  /// In that case, the function will be scanned over the bounding box to
+  /// compute approximation of the extrema. If the method is not
+  /// overloaded by derived classes, the default is to return false.
+  virtual bool get_min_max(double&, double&) {
+    return false;
+  }
+};
+
+Q_DECLARE_INTERFACE(Implicit_function_interface,
+                    "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+
+#endif // CGAL_MESH_3_IMPLICIT_FUNCTION_INTERFACE_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp
new file mode 100644
index 0000000..6c86110
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Klein_implicit_function.cpp
@@ -0,0 +1,54 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+class Klein_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+public:
+  virtual QString name() const { return "Klein function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    return   (x*x+y*y+z*z+2*y-1)
+           * ( (x*x+y*y+z*z-2*y-1) *(x*x+y*y+z*z-2*y-1)-8*z*z)
+           + 16*x*z* (x*x+y*y+z*z-2*y-1);
+  }
+  
+  virtual Bbox bbox() const
+  {
+    const double radius = 6.;
+    double r = radius * 1.1;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Klein_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp
new file mode 100644
index 0000000..28a5c88
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Sphere_implicit_function.cpp
@@ -0,0 +1,54 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+
+const double radius = 1.;
+
+class Sphere_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+public:
+  virtual QString name() const { return "Sphere function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    return (x*x + y*y + z*z - radius);
+  }
+  
+  virtual Bbox bbox() const
+  {
+    double r = radius * 1.2;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Sphere_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp
new file mode 100644
index 0000000..566d61a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/implicit_functions/Tanglecube_implicit_function.cpp
@@ -0,0 +1,56 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#include <QObject>
+#include "Implicit_function_interface.h"
+
+
+const double radius = 4.;
+
+class Tanglecube_implicit_function :
+  public QObject,
+  public Implicit_function_interface
+{
+  Q_OBJECT
+  Q_INTERFACES(Implicit_function_interface)
+  Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")
+
+public:
+  virtual QString name() const { return "Tanglecube function"; }
+  
+  virtual double operator()(double x, double y, double z) const
+  {
+    double x2=x*x, y2=y*y, z2=z*z;
+    double x4=x2*x2, y4=y2*y2, z4=z2*z2;
+    return x4 - 5*x2 + y4 - 5*y2 + z4 - 5*z2 + 11.8;
+  }
+  
+  virtual Bbox bbox() const
+  {
+    double r = radius * 1.2;
+    return Bbox(-r,-r,-r,r,r,r);
+  }
+};
+
+#include "Tanglecube_implicit_function.moc"
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Dualizer.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Dualizer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Dualizer.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Dualizer.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_bar.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_bar.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_bar.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_bar.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_quad_soup.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_quad_soup.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_quad_soup.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_quad_soup.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_triangle_soup.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_triangle_soup.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Make_triangle_soup.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Make_triangle_soup.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Textured_polyhedron_builder.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Textured_polyhedron_builder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/Textured_polyhedron_builder.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Textured_polyhedron_builder.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Triangulation_file_input.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Triangulation_file_input.h
new file mode 100644
index 0000000..af08e43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/Triangulation_file_input.h
@@ -0,0 +1,103 @@
+// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2011       GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you may redistribute it under
+// the terms of the Q Public License version 1.0.
+// See the file LICENSE.QPL distributed with CGAL.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau
+//
+
+// Adapted from operator>>(std::istream&, Triangulation_3&) from
+// <CGAL/Triangulation_3.h>
+
+#ifndef CGAL_TRIANGULATION_FILE_INPUT_3_H
+#define CGAL_TRIANGULATION_FILE_INPUT_3_H
+
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+template <typename Tr1, 
+          typename Tr2,
+          typename Update_vertex,
+          typename Update_cell>
+std::istream& file_input(std::istream& is, Tr2 &tr,
+                         Update_vertex update_vertex = Update_vertex(),
+                         Update_cell update_cell = Update_cell())
+  // reads
+  // the dimension
+  // the number of finite vertices
+  // the non combinatorial information on vertices (point, etc)
+  // the number of cells
+  // the cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each cell
+  // the neighbors of each cell by their index in the preceding list of cells
+  // when dimension < 3 : the same with faces of maximal dimension
+{
+  typedef Tr2 Triangulation;
+  typedef typename Triangulation::Vertex_handle  Vertex_handle;
+  typedef typename Triangulation::Cell_handle    Cell_handle;
+
+  typedef typename Tr1::Vertex Vertex1;
+  typedef typename Tr1::Cell Cell1;
+
+  tr.clear();
+  tr.tds().cells().clear();
+
+  std::size_t n;
+  int d;
+  if(is_ascii(is))
+     is >> d >> n;
+  else {
+    read(is, d);
+    read(is, n);
+  }
+  if(!is) return is;
+  tr.tds().set_dimension(d);
+
+  std::map< std::size_t, Vertex_handle > V;
+  V[0] = tr.infinite_vertex();
+  // the infinite vertex is numbered 0
+
+  for (std::size_t i=1; i <= n; i++) {
+    V[i] = tr.tds().create_vertex();
+    Vertex1 v;
+    if(!(is >> v)) return is;
+    if(!update_vertex(v, *V[i])) { 
+      is.setstate(std::ios_base::failbit);
+      return is;
+    }
+  }
+
+  std::map< std::size_t, Cell_handle > C;
+
+  std::size_t m;
+  tr.tds().read_cells(is, V, m, C);
+
+  for (std::size_t j=0 ; j < m; j++) {
+    Cell1 c;
+    if(!(is >> c)) return is;
+    if(!update_cell(c, *(C[j]))) {
+      is.setstate(std::ios_base::failbit);
+      return is;
+    }
+  }
+
+  CGAL_triangulation_assertion( tr.is_valid(false) );
+  return is;
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_TRIANGULATION_FILE_INPUT_3_H
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/gocad_io.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/gocad_io.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/gocad_io.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/gocad_io.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/statistics_helpers.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/statistics_helpers.h
new file mode 100644
index 0000000..a79da77
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/statistics_helpers.h
@@ -0,0 +1,141 @@
+#ifndef POLYHEDRON_DEMO_STATISTICS_HELPERS_H
+#define POLYHEDRON_DEMO_STATISTICS_HELPERS_H
+
+#include <cmath>
+
+#include <boost/accumulators/accumulators.hpp>
+#include <boost/accumulators/statistics/stats.hpp>
+#include <boost/accumulators/statistics/mean.hpp>
+#include <boost/accumulators/statistics/min.hpp>
+#include <boost/accumulators/statistics/max.hpp>
+#include <boost/accumulators/statistics/median.hpp>
+#include <CGAL/squared_distance_3_0.h>
+#include <map>
+#include <boost/property_map/property_map.hpp>
+
+#include <CGAL/Polygon_mesh_processing/repair.h>
+
+
+template<typename Polyhedron>
+void angles(Polyhedron* poly, double& mini, double& maxi, double& ave)
+{
+  using namespace boost::accumulators;
+  typedef typename boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+
+  double rad_to_deg = 180. / CGAL_PI;
+
+  accumulator_set< double,
+    features< tag::min, tag::max, tag::mean > > acc;
+
+  typename boost::property_map<Polyhedron, CGAL::vertex_point_t>::type
+    vpmap = get(CGAL::vertex_point, *poly);
+  BOOST_FOREACH(halfedge_descriptor h, halfedges(*poly))
+  {
+    if (face(h, *poly) == boost::graph_traits<Polyhedron>::null_face())
+      continue;
+
+    typename Kernel::Point_3 a = get(vpmap, source(h, *poly));
+    typename Kernel::Point_3 b = get(vpmap, target(h, *poly));
+    typename Kernel::Point_3 c = get(vpmap, target(next(h, *poly), *poly));
+
+    typename Kernel::Vector_3 ba(b, a);
+    typename Kernel::Vector_3 bc(b, c);
+    double cos_angle = (ba * bc)
+      / std::sqrt(ba.squared_length() * bc.squared_length());
+
+    acc(std::acos(cos_angle) * rad_to_deg);
+  }
+
+  mini = extract_result< tag::min >(acc);
+  maxi = extract_result< tag::max >(acc);
+  ave = extract_result< tag::mean >(acc);
+}
+
+template<typename Polyhedron>
+void edges_length(Polyhedron* poly,
+  double& mini, double& maxi, double& mean, double& mid,
+  unsigned int& nb_degen)
+{
+  using namespace boost::accumulators;
+  typedef typename boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Polyhedron>::edge_descriptor edge_descriptor;
+
+  accumulator_set< double,
+    features< tag::min, tag::max, tag::mean , tag::median> > acc;
+
+  typename boost::property_map<Polyhedron, CGAL::vertex_point_t>::type
+    vpmap = get(CGAL::vertex_point, *poly);
+  nb_degen = 0;
+  BOOST_FOREACH(edge_descriptor e, edges(*poly))
+  {
+    halfedge_descriptor h = halfedge(e, *poly);
+    typename Kernel::Point_3 a = get(vpmap, source(h, *poly));
+    typename Kernel::Point_3 b = get(vpmap, target(h, *poly));
+    acc(CGAL::sqrt(CGAL::squared_distance(a, b)));
+
+    if (a == b) ++nb_degen;
+  }
+
+  mini = extract_result< tag::min >(acc);
+  maxi = extract_result< tag::max >(acc);
+  mean = extract_result< tag::mean >(acc);
+  mid =  extract_result< tag::median >(acc);
+}
+
+template<typename Polyhedron, typename VPmap>
+unsigned int nb_degenerate_faces(Polyhedron* poly, VPmap vpmap)
+{
+  typedef typename boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
+
+  unsigned int nb = 0;
+  BOOST_FOREACH(face_descriptor f, faces(*poly))
+  {
+    if (CGAL::Polygon_mesh_processing::is_degenerated(f, *poly, vpmap, Kernel()))
+      ++nb;
+  }
+  return nb;
+}
+
+template<typename Polyhedron>
+unsigned int nb_holes(Polyhedron* poly)
+{
+  //gets the number of holes
+  //if is_closed is false, then there are borders (= holes)
+  int n(0);
+  int i = 0;
+
+  // initialization : keep the original ids in memory and set them to 0
+  std::vector<std::size_t> ids;
+  for (typename Polyhedron::Halfedge_iterator it = poly->halfedges_begin();
+      it != poly->halfedges_end(); ++it)
+  {
+    ids.push_back(it->id());
+    it->id() = 0;
+  }
+
+  //if a border halfedge is found, increment the number of hole and set all the ids of the hole's border halfedges to 1 to prevent
+  // the algorithm from counting them several times.
+  for (typename Polyhedron::Halfedge_iterator it = poly->halfedges_begin();
+       it != poly->halfedges_end();
+       ++it)
+  {
+    if (it->is_border() && it->id() == 0){
+      n++;
+      typename Polyhedron::Halfedge_around_facet_circulator hf_around_facet = it->facet_begin();
+      do {
+        CGAL_assertion(hf_around_facet->id() == 0);
+        hf_around_facet->id() = 1;
+      } while (++hf_around_facet != it->facet_begin());
+    }
+  }
+  //reset the ids to their initial value
+  for (typename Polyhedron::Halfedge_iterator it = poly->halfedges_begin();
+      it != poly->halfedges_end(); ++it)
+  {
+    it->id() = ids[i++];
+  }
+  return n;
+}
+
+#endif // POLYHEDRON_DEMO_STATISTICS_HELPERS_H
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/textured_polyhedron.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/textured_polyhedron.h
new file mode 100644
index 0000000..18021a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/textured_polyhedron.h
@@ -0,0 +1,252 @@
+#ifndef _TEXTURED_MESH_
+#define _TEXTURED_MESH_
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/HalfedgeDS_default.h>
+
+#include <CGAL/gl.h>
+
+namespace CGAL
+
+{
+
+template <class Refs, class T, class P, class Norm>
+class Textured_facet : public CGAL::HalfedgeDS_face_base<Refs, T>
+{
+    // normal
+    Norm m_normal;
+
+public:
+
+    // life cycle
+    // no constructors to repeat, since only
+    // default constructor mandatory
+
+    Textured_facet()
+    {
+    }
+
+    // normal
+    typedef Norm Normal_3;
+    Normal_3& normal() { return m_normal; }
+    const Normal_3& normal() const { return m_normal; }
+};
+
+template <class Refs, class Tprev, class Tvertex, class Tface, class Norm>
+class Textured_halfedge : public CGAL::HalfedgeDS_halfedge_base<Refs,Tprev,Tvertex,Tface>
+{
+public:
+    // life cycle
+    Textured_halfedge()
+    {
+    }
+};
+
+template <class Refs, class T, class P, class Norm>
+class Textured_vertex : public CGAL::HalfedgeDS_vertex_base<Refs, T, P>
+{
+    // normal
+    Norm m_normal;
+    double m_u;
+    double m_v;
+
+public:
+    // life cycle
+    Textured_vertex()  {}
+
+    // repeat mandatory constructors
+    Textured_vertex(const P& pt)
+        : CGAL::HalfedgeDS_vertex_base<Refs, T, P>(pt)
+    {
+    }
+
+    // normal
+    typedef Norm Normal_3;
+    Normal_3& normal() { return m_normal; }
+    const Normal_3& normal() const { return m_normal; }
+
+    // u,v coordinates
+    double& u() {	return m_u; }
+    const double& u() const { return m_u;	}
+    double& v() {	return m_v; }
+    const double& v() const { return m_v;	}
+};
+
+struct Textured_items : public CGAL::Polyhedron_items_3
+{
+    // wrap vertex
+    template<class Refs, class Traits> struct Vertex_wrapper
+    {
+        typedef typename Traits::Point_3 Point;
+        typedef typename Traits::Vector_3 Normal;
+        typedef Textured_vertex<Refs,
+        CGAL::Tag_true,
+        Point,
+        Normal> Vertex;
+    };
+
+    // wrap face
+    template<class Refs, class Traits> struct Face_wrapper
+    {
+        typedef typename Traits::Point_3 Point;
+        typedef typename Traits::Vector_3 Normal;
+        typedef Textured_facet<Refs,
+        CGAL::Tag_true,
+        Point,
+        Normal> Face;
+    };
+
+    // wrap halfedge
+    template<class Refs, class Traits> struct Halfedge_wrapper
+    {
+        typedef typename Traits::Vector_3 Normal;
+        typedef Textured_halfedge<Refs,
+        CGAL::Tag_true,
+        CGAL::Tag_true,
+        CGAL::Tag_true,
+        Normal> Halfedge;
+    };
+};
+
+// compute facet normal 
+struct Facet_normal // (functor)
+{
+    template<class Facet> void operator()(Facet& f)
+    {
+        typename Facet::Normal_3 sum = CGAL::NULL_VECTOR;
+        typename Facet::Halfedge_around_facet_circulator h = f.facet_begin();
+        do
+        {
+            typename Facet::Normal_3 normal = CGAL::cross_product(h->next()->vertex()->point() - h->vertex()->point(), h->next()->next()->vertex()->point() - h->next()->vertex()->point());
+            double sqnorm = normal * normal;
+            if (sqnorm != 0)
+                normal = normal / (float)std::sqrt(sqnorm);
+            sum = sum + normal;
+        } while (++h != f.facet_begin());
+        float sqnorm = sum * sum;
+        if (sqnorm != 0.0)
+            f.normal() = sum / std::sqrt(sqnorm);
+        else
+            f.normal() = CGAL::NULL_VECTOR;
+    }
+};
+
+// compute vertex normal 
+struct Vertex_normal // (functor)
+{
+    template<class Vertex> void operator()(Vertex& v)
+    {
+        typename Vertex::Normal_3 normal = CGAL::NULL_VECTOR;
+        typename Vertex::Halfedge_around_vertex_const_circulator pHalfedge =
+                v.vertex_begin();
+        typename Vertex::Halfedge_around_vertex_const_circulator begin =
+                pHalfedge;
+        CGAL_For_all(pHalfedge,begin)
+                if(!pHalfedge->is_border())
+                normal = normal + pHalfedge->facet()->normal();
+        float sqnorm = normal * normal;
+        if (sqnorm != 0.0f)
+            v.normal() = normal / (float)std::sqrt(sqnorm);
+        else
+            v.normal() = CGAL::NULL_VECTOR;
+    }
+};
+
+//*********************************************************
+template <class Kernel, class Items>
+class Textured_polyhedron : public CGAL::Polyhedron_3<Kernel,Items>
+{
+public :
+    typedef typename Kernel::FT FT;
+    typedef typename Kernel::Point_3 Point;
+    typedef typename Kernel::Vector_3 Vector;
+    typedef typename CGAL::Polyhedron_3<Kernel,Items> Base;
+    typedef typename CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_3> Basic_polyhedron;
+
+    typedef typename Base::Vertex_handle Vertex_handle;
+    typedef typename Base::Vertex_iterator Vertex_iterator;
+    typedef typename Base::Halfedge_handle Halfedge_handle;
+    typedef typename Base::Halfedge_iterator Halfedge_iterator;
+    typedef typename Base::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
+    typedef typename Base::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
+    typedef typename Base::Edge_iterator Edge_iterator;
+    typedef typename Base::Facet Facet;
+    typedef typename Base::Facet_iterator Facet_iterator;
+    typedef typename Base::Facet_handle Facet_handle;
+
+public :
+
+    // life cycle
+    Textured_polyhedron()
+    {
+    }
+
+    virtual ~Textured_polyhedron()
+    {
+    }
+
+    // normals (per facet, then per vertex)
+    void compute_normals_per_facet()
+    {
+        std::for_each(this->facets_begin(),this->facets_end(),Facet_normal());
+    }
+    void compute_normals_per_vertex()
+    {
+        std::for_each(this->vertices_begin(),this->vertices_end(),Vertex_normal());
+    }
+    void compute_normals()
+    {
+        compute_normals_per_facet();
+        compute_normals_per_vertex();
+    }
+
+    void gl_draw_textured_triangles(bool smooth_shading,
+                                    bool use_normals,
+                                    const double scaling_tex_coordinates)
+    {
+        ::glBegin(GL_TRIANGLES);
+        Facet_iterator f = this->facets_begin();
+        for(;f!= this->facets_end();f++)
+            gl_draw_textured_facet(f,smooth_shading,use_normals,scaling_tex_coordinates);
+        ::glEnd();
+    }
+
+    void gl_draw_textured_facet(Facet_handle f,
+                                bool smooth_shading,
+                                bool use_normals,
+                                const double scaling_tex_coordinates)
+    {
+        // one normal per face
+        if(use_normals && !smooth_shading)
+        {
+            const typename Facet::Normal_3& n = f->normal();
+            ::glNormal3f(n[0],n[1],n[2]);
+        }
+
+        // revolve around current face to get vertices
+        Halfedge_around_facet_circulator he = f->facet_begin();
+        do
+        {
+            // one normal per vertex
+            if(use_normals && smooth_shading)
+            {
+                const typename Facet::Normal_3& n = he->vertex()->normal();
+                ::glNormal3d(n[0],n[1],n[2]);
+            }
+
+            // polygon assembly is performed per vertex
+            const Point& p  = he->vertex()->point();
+            const double u = he->vertex()->u();
+            const double v = he->vertex()->v();
+            // std::cout << u << " " << v << std::endl;
+            ::glTexCoord2d(u * scaling_tex_coordinates, v * scaling_tex_coordinates);
+            ::glVertex3d(p[0],p[1],p[2]);
+        }
+        while(++he != f->facet_begin());
+    }
+}; // end class Textured_polyhedron
+
+} // end namespace CGAL
+
+#endif // _TEXTURED_MESH_
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/translate.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/translate.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/include/CGAL/translate.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/include/CGAL/translate.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/include/Point_set_3.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/Point_set_3.h
new file mode 100644
index 0000000..beef321
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/include/Point_set_3.h
@@ -0,0 +1,323 @@
+// Author: Laurent Saboret, Nader Salman, Gael Guennebaud
+
+#ifndef POINT_SET_3_H
+#define POINT_SET_3_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/Min_sphere_of_spheres_d.h>
+#include <CGAL/Min_sphere_of_points_d_traits_3.h>
+#include <CGAL/Min_sphere_of_spheres_d_traits_3.h>
+#include <UI_point_3.h>
+#include <algorithm>
+#include <vector>
+# include <CGAL/gl.h>
+
+/// The Point_set_3 class is array of points + normals of type
+/// Point_with_normal_3<Gt> (in fact
+/// UI_point_3 to support a selection flag and an optional radius).
+/// It provides:
+/// - accessors: points and normals iterators, property maps
+/// - OpenGL rendering
+/// - bounding box
+///
+/// CAUTION:
+/// - User is responsible to call invalidate_bounds() after adding, moving or removing points.
+/// - Selecting points changes the order of the points in the
+///   container. If selection is *not* empty, it becomes invalid after
+///   adding, moving or removing points, user is reponsible to call
+///   unselect_all() in those cases.
+///
+/// @heading Parameters:
+/// @param Gt       Geometric traits class.
+
+template <class Gt>
+class Point_set_3 : public std::vector<UI_point_3<Gt> >
+{
+// Private types
+private:
+
+  // Base class
+  typedef std::vector<UI_point_3<Gt> > Base;
+
+// Public types
+public:
+
+  // Repeat base class' types
+  /// @cond SKIP_IN_MANUAL
+  typedef typename Base::iterator iterator;
+  typedef typename Base::const_iterator const_iterator;
+
+  using Base::erase;
+
+  /// @endcond
+
+  // Classic CGAL geometric types
+  typedef Gt  Geom_traits; ///< Geometric traits class.
+  typedef typename Geom_traits::FT FT;
+  typedef typename Geom_traits::Point_3 Point;  ///< typedef to Geom_traits::Point_3
+  typedef typename Geom_traits::Vector_3 Vector; ///< typedef to Geom_traits::Vector_3
+  typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid;
+  typedef typename Geom_traits::Sphere_3 Sphere;
+
+  /// Type of points in Point_set_3
+  typedef UI_point_3<Gt> UI_point; ///< Position + normal + selection flag
+  // Its superclass:
+  typedef typename UI_point::Point_with_normal Point_with_normal; ///< Position + normal
+
+// Data members
+private:
+
+  // Indicate if m_barycenter, m_bounding_box, m_bounding_sphere and
+  // m_diameter_standard_deviation below are valid.
+  mutable bool m_bounding_box_is_valid;
+
+  mutable Iso_cuboid m_bounding_box; // point set's bounding box
+  mutable Sphere m_bounding_sphere; // point set's bounding sphere
+  mutable Point m_barycenter; // point set's barycenter
+  mutable FT m_diameter_standard_deviation; // point set's standard deviation
+
+  std::size_t m_nb_selected; // handle selection
+
+  bool m_radii_are_uptodate;
+
+  // Assignment operator not implemented and declared private to make
+  // sure nobody uses the default one without knowing it
+  Point_set_3& operator= (const Point_set_3&)
+  {
+    return *this;
+  }
+
+  
+// Public methods
+public:
+
+  /// Default constructor.
+  Point_set_3()
+  {
+    m_nb_selected = 0;
+    m_bounding_box_is_valid = false;
+    m_radii_are_uptodate = false;
+  }
+
+  // copy constructor 
+  Point_set_3 (const Point_set_3& p) : Base (p)
+  {
+    m_bounding_box_is_valid = p.m_bounding_box_is_valid;
+    m_bounding_box = p.m_bounding_box;
+    m_barycenter = p.m_barycenter;
+    m_diameter_standard_deviation = p.m_diameter_standard_deviation;
+
+    m_nb_selected = p.nb_selected_points ();
+    
+    m_radii_are_uptodate = p.m_radii_are_uptodate;
+  }
+
+  // Repeat base class' public methods used below
+  /// @cond SKIP_IN_MANUAL
+  using Base::begin;
+  using Base::end;
+  using Base::size;
+  /// @endcond
+
+  iterator first_selected() { return end() - m_nb_selected; }
+  const_iterator first_selected() const { return end () - m_nb_selected; }
+  void set_first_selected(iterator it)
+  {
+    m_nb_selected = static_cast<std::size_t>(std::distance (it, end()));
+  }
+
+  // Test if point is selected
+  bool is_selected(const_iterator it) const
+  {
+    return static_cast<std::size_t>(std::distance (it, end())) <= m_nb_selected;
+  }
+
+  /// Gets the number of selected points.
+  std::size_t nb_selected_points() const
+  {
+    return m_nb_selected;
+  }
+
+  /// Mark a point as selected/not selected.
+  void select(iterator it, bool selected = true)
+  {
+    bool currently = is_selected (it);
+    iterator first = first_selected();
+    if (currently && !selected)
+      {
+        std::swap (*it, *first);
+        -- m_nb_selected;
+      }
+    else if (!currently && selected)
+      {
+        std::swap (*it, *first);
+        ++ m_nb_selected;
+      }
+  }
+
+  void select_all()
+  {
+    m_nb_selected = size ();
+  }
+  void unselect_all()
+  {
+    m_nb_selected = 0;
+  }
+
+
+  // Invert selection
+  void invert_selection()
+  {
+    iterator sel = end() - 1;
+    iterator unsel = begin();
+
+    iterator first = first_selected();
+
+    while (sel != first - 1 && unsel != first)
+      std::swap (*(sel --), *(unsel ++));
+    
+    m_nb_selected = size() - m_nb_selected;
+  }
+
+  /// Deletes selected points.
+  void delete_selection()
+  {
+    // Deletes selected points using erase-remove idiom
+    erase (first_selected(), end ());
+
+    // after erase(), use Scott Meyer's "swap trick" to trim excess capacity
+    Point_set_3(*this).swap(*this);
+    m_nb_selected = 0;
+    invalidate_bounds();
+  }
+
+  /// Gets the bounding box.
+  Iso_cuboid bounding_box() const
+  {
+    if (!m_bounding_box_is_valid)
+      update_bounds();
+
+    return m_bounding_box;
+  }
+
+  /// Gets bounding sphere.
+  Sphere bounding_sphere() const
+  {
+    if (!m_bounding_box_is_valid)
+      update_bounds();
+
+    return m_bounding_sphere;
+  }
+
+  /// Gets points barycenter.
+  Point barycenter() const
+  {
+    if (!m_bounding_box_is_valid)
+      update_bounds();
+
+    return m_barycenter;
+  }
+
+  /// Gets the standard deviation of the distance to barycenter.
+  FT diameter_standard_deviation() const
+  {
+    if (!m_bounding_box_is_valid)
+      update_bounds();
+
+    return m_diameter_standard_deviation;
+  }
+
+  // Gets the region of interest, ignoring the outliers.
+  // This method is used to define the OpenGL arcball sphere.
+  Sphere region_of_interest() const
+  {
+    if (!m_bounding_box_is_valid)
+      update_bounds();
+
+    // A good candidate is a sphere containing the dense region of the point cloud:
+    // - center point is barycenter
+    // - Radius is 2 * standard deviation
+    float radius = 2.f * (float)m_diameter_standard_deviation;
+    return Sphere(m_barycenter, radius*radius);
+  }
+
+  /// Update barycenter, bounding box, bounding sphere and standard deviation.
+  /// User is responsible to call invalidate_bounds() after adding, moving or removing points.
+  void invalidate_bounds()
+  {
+    m_bounding_box_is_valid = false;
+  }
+
+
+
+
+  
+  bool are_radii_uptodate() const { return m_radii_are_uptodate; }
+  void set_radii_uptodate(bool /*on*/) { m_radii_are_uptodate = false; }
+
+// Private methods:
+private:
+
+  /// Recompute barycenter, bounding box, bounding sphere and standard deviation.
+  void update_bounds() const
+  {
+    if (begin() == end())
+      return;
+
+    // Update bounding box and barycenter.
+    // TODO: we should use the functions in PCA component instead.
+    FT xmin,xmax,ymin,ymax,zmin,zmax;
+    xmin = ymin = zmin =  1e38;
+    xmax = ymax = zmax = -1e38;
+    Vector v = CGAL::NULL_VECTOR;
+    FT norm = 0;
+    for (const_iterator it = begin(); it != end(); it++)
+    {
+      const Point& p = *it;
+
+      // update bbox
+      xmin = (std::min)(p.x(),xmin);
+      ymin = (std::min)(p.y(),ymin);
+      zmin = (std::min)(p.z(),zmin);
+      xmax = (std::max)(p.x(),xmax);
+      ymax = (std::max)(p.y(),ymax);
+      zmax = (std::max)(p.z(),zmax);
+
+      // update barycenter
+      v = v + (p - CGAL::ORIGIN);
+      norm += 1;
+    }
+    //
+    Point p(xmin,ymin,zmin);
+    Point q(xmax,ymax,zmax);
+    m_bounding_box = Iso_cuboid(p,q);
+    //
+    m_barycenter = CGAL::ORIGIN + v / norm;
+
+    // Computes bounding sphere
+    typedef CGAL::Min_sphere_of_points_d_traits_3<Gt,FT> Traits;
+    typedef CGAL::Min_sphere_of_spheres_d<Traits> Min_sphere;
+
+    Min_sphere ms(begin(),end());
+
+    typename Min_sphere::Cartesian_const_iterator coord = ms.center_cartesian_begin();
+    FT cx = *coord++;
+    FT cy = *coord++;
+    FT cz = *coord++;
+    m_bounding_sphere = Sphere(Point(cx,cy,cz), ms.radius()*ms.radius());
+
+    // Computes standard deviation of the distance to barycenter
+    typename Geom_traits::Compute_squared_distance_3 sqd;
+    FT sq_radius = 0;
+    for (const_iterator it = begin(); it != end(); it++)
+        sq_radius += sqd(*it, m_barycenter);
+    sq_radius /= FT(size());
+    m_diameter_standard_deviation = CGAL::sqrt(sq_radius);
+
+    m_bounding_box_is_valid = true;
+  }
+
+}; // end of class Point_set_3
+
+
+#endif // POINT_SET_3_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/include/UI_point_3.h b/3rdparty/CGAL-4.8/demo/Polyhedron/include/UI_point_3.h
new file mode 100644
index 0000000..c7abf88
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/include/UI_point_3.h
@@ -0,0 +1,124 @@
+// Author: Laurent Saboret
+
+#ifndef UI_POINT_3_H
+#define UI_POINT_3_H
+
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/Iterator_project.h>
+
+#include <set>
+#include <algorithm>
+
+
+/// The UI_point_3 class represents a 3D point in Poisson_surface_reconstruction_3 demo.
+/// It contains:
+/// - a position,
+/// - a normal,
+/// - a radius,
+///
+/// @heading Parameters:
+/// @param Gt   Geometric traits class.
+
+template<class Gt>
+class UI_point_3
+  : public CGAL::Point_with_normal_3<Gt>
+{
+// Private types
+private:
+
+    // Base class
+    typedef CGAL::Point_with_normal_3<Gt> Base;
+
+// Public types
+public:
+
+    /// Base class
+    typedef Base Point_with_normal; 
+
+    // Repeat base class public types
+    typedef Gt Geom_traits; ///< Geometric traits class.
+    typedef typename Geom_traits::FT FT;
+    typedef typename Geom_traits::RT RT;
+    typedef typename Geom_traits::Point_2  Point_2;  ///< typedef to Geom_traits::Point_2
+    typedef typename Geom_traits::Point_3  Point_3;  ///< typedef to Geom_traits::Point_3
+    typedef typename Geom_traits::Vector_3 Vector_3; ///< typedef to Geom_traits::Vector_3
+
+// Public methods
+public:
+
+    /// Point is (0,0,0) by default.
+    /// Normal is (0,0,0) by default.
+    UI_point_3(const CGAL::Origin& o = CGAL::ORIGIN)
+    : Base(o)
+    {
+      m_radius = FT(0);
+    }
+    UI_point_3(FT x, FT y, FT z,
+               const Vector_3& normal = CGAL::NULL_VECTOR)
+    : Base(x,y,z,normal)
+    {
+      m_radius = FT(0);
+    }
+    UI_point_3(RT hx, RT hy, RT hz, RT hw,
+               const Vector_3& normal = CGAL::NULL_VECTOR)
+    : Base(hx,hy,hz,hw,normal)
+    {
+      m_radius = FT(0);
+    }
+    UI_point_3(const Point_3& point,
+               const Vector_3& normal = CGAL::NULL_VECTOR)
+    : Base(point, normal)
+    {
+      m_radius = FT(0);
+    }
+    template <class K>
+    UI_point_3(const CGAL::Point_with_normal_3<K>& pwn)
+    : Base(pwn)
+    {
+      m_radius = FT(0);
+    }
+
+    /// Copy constructor
+    UI_point_3(const UI_point_3& upt)
+    : Base(upt)
+    {
+      m_radius = upt.m_radius;
+    }
+    template<class K>
+    UI_point_3(const UI_point_3<K>& upt)
+    : Base(upt)
+    {
+      m_radius = upt.radius();
+    }
+    /// Operator =()
+    UI_point_3& operator=(const UI_point_3& upt)
+    {
+      Base::operator=(upt);
+      m_radius = upt.m_radius;
+      return *this;
+    }
+
+    // Inherited operators ==() and !=() are fine.
+
+    /// Gets/sets radius.
+    FT radius() const { return m_radius; }
+    FT& radius() { return m_radius; }
+
+// Data
+private:
+
+    /// radius.
+    FT m_radius;
+};
+
+#include <CGAL/Kernel_traits.h>
+
+namespace CGAL{
+template<class Gt>
+struct Kernel_traits< ::UI_point_3<Gt> >{
+  typedef Gt Kernel;
+};
+} //end of CGAL namespace
+
+#endif //UI_POINT_3_H
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/opengl_tools.h b/3rdparty/CGAL-4.8/demo/Polyhedron/opengl_tools.h
new file mode 100644
index 0000000..bb7d9c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/opengl_tools.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <laurent.rineau__CGAL at normalesup.org>
+
+#ifndef CGAL_OPENGL_TOOLS_H
+#define CGAL_OPENGL_TOOLS_H
+
+# include <CGAL/gl.h>
+
+namespace CGAL {
+namespace GL {
+
+class Color {
+  GLfloat c[4];
+public:
+  Color() {
+    ::glGetFloatv(GL_CURRENT_COLOR, &c[0]);
+  }
+  ~Color() {
+    set_rgb_color(c[0], c[1], c[2], c[3]);
+  }
+  void set_rgb_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.f) {
+    ::glColor4f(r, g, b, a);
+  }
+}; // end class Color;
+
+class Point_size {
+  GLfloat ps;
+public:
+  Point_size() {
+    ::glGetFloatv(GL_POINT_SIZE, &ps);
+  }
+  ~Point_size() {
+    set_point_size(ps);
+  }
+  void set_point_size(GLfloat v) {
+    ::glPointSize(v);
+  }
+}; // end class Point_size
+
+} // end namespace GL
+} // end namespace CGAL
+
+#endif // not CGAL_OPENGL_TOOLS_H
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/polyhedron_demo_macros.cmake b/3rdparty/CGAL-4.8/demo/Polyhedron/polyhedron_demo_macros.cmake
new file mode 100644
index 0000000..fe32b05
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/polyhedron_demo_macros.cmake
@@ -0,0 +1,45 @@
+include(AddFileDependencies)
+include (CGAL_Macros)
+
+  macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name)
+    list_split(option ARGN_TAIL ${ARGN} )
+    if(NOT ${option} STREQUAL "EXCLUDE_FROM_ALL")
+      if(NOT ${option} STREQUAL "NO_MOC")
+        set(other_sources ${ARGN})
+        set(option "")
+      else()
+        set(other_sources ${ARGN_TAIL})
+      endif()
+    else()
+      set(other_sources ${ARGN_TAIL})
+    endif()
+    if("${option}" STREQUAL "NO_MOC") 
+      set(option "")
+      set(moc_file_name "")
+    else()
+      set(moc_file_name ${plugin_implementation_base_name}.moc )
+      qt5_generate_moc( ${plugin_implementation_base_name}.cpp "${CMAKE_CURRENT_BINARY_DIR}/${moc_file_name}" )
+      add_file_dependencies( ${moc_file_name} "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
+    endif()
+
+    add_library(${plugin_name} MODULE ${option} ${moc_file_name} ${plugin_implementation_base_name}.cpp ${other_sources})
+    qt5_use_modules(${plugin_name} Widgets Script OpenGL Gui Xml )
+    set_property(TARGET ${plugin_name}
+      PROPERTY LIBRARY_OUTPUT_DIRECTORY
+      "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
+
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} )
+    # Link with Qt
+    target_link_libraries( ${plugin_name} ${QT_LIBRARIES} )
+    # Link with the demo_framework
+    if(TARGET demo_framework)
+      target_link_libraries( ${plugin_name} demo_framework)
+    else()
+      target_link_libraries( ${plugin_name} Polyhedron_demo_framework)
+    endif()
+    # Link with CGAL
+    target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+    if(TARGET Polyhedron_3)
+      add_dependencies( ${plugin_name} Polyhedron_3 )
+    endif()
+  endmacro(polyhedron_demo_plugin)
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/about.html b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/about.html
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/about.html
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/back.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/back.png
new file mode 100644
index 0000000..f777292
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/back.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-diff.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-diff.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-diff.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-diff.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-intersection.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-intersection.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-intersection.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-intersection.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-union.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-union.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/boolean-union.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/boolean-union.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/bot.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/bot.png
new file mode 100644
index 0000000..591a362
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/bot.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-off.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-off.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-off.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-off.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-off.svg b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-off.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-off.svg
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-off.svg
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-on.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-on.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/check-on.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/check-on.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/check.svg b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/check.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/check.svg
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/check.svg
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/convex-hull.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/convex-hull.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/convex-hull.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/convex-hull.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/down.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/down.png
new file mode 100644
index 0000000..a345220
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/down.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/editcopy.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/editcopy.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/editcopy.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/editcopy.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/front.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/front.png
new file mode 100644
index 0000000..23004fc
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/front.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/kernel.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/kernel.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/kernel.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/kernel.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/left.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/left.png
new file mode 100644
index 0000000..82aeec3
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/left.png differ
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/minus.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/minus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/minus.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/minus.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/plus.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/plus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/plus.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/plus.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/right.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/right.png
new file mode 100644
index 0000000..ebff3d0
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/right.png differ
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.f
new file mode 100644
index 0000000..7713ae2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.f
@@ -0,0 +1,41 @@
+#version 120
+varying highp vec4 color;
+varying highp vec4 fP; 
+varying highp vec3 fN; 
+uniform highp vec4 light_pos;  
+uniform highp vec4 light_diff; 
+uniform highp vec4 light_spec; 
+uniform highp vec4 light_amb;  
+uniform highp float spec_power ; 
+uniform int is_two_side; 
+uniform bool is_selected;
+void main(void) {
+ if(color.w>0)
+ {
+    highp vec3 L = light_pos.xyz - fP.xyz; 
+    highp vec3 V = -fP.xyz; 
+    highp vec3 N; 
+    if(fN == highp vec3(0.0,0.0,0.0))
+        N = highp vec3(0.0,0.0,0.0); 
+    else 
+        N = normalize(fN); 
+    L = normalize(L); 
+    V = normalize(V); 
+    highp vec3 R = reflect(-L, N); 
+    vec4 diffuse; 
+    if(is_two_side == 1) 
+        diffuse = abs(dot(N,L)) * light_diff * color; 
+    else 
+        diffuse = max(dot(N,L), 0.0) * light_diff * color; 
+    highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; 
+    vec4 ret_color = vec4((color*light_amb).xyz + diffuse.xyz + specular.xyz,1); 
+    if(is_selected)
+        gl_FragColor = vec4(ret_color.r+70.0/255.0, ret_color.g+70.0/255.0, ret_color.b+70.0/255.0, 1.0);
+    else
+        gl_FragColor = ret_color;
+ }
+ else
+   discard;
+}
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.v
new file mode 100644
index 0000000..eece539
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3.v
@@ -0,0 +1,21 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 normals;
+attribute highp vec3 colors;
+uniform highp mat4 mvp_matrix;
+uniform highp mat4 mv_matrix; 
+uniform highp vec4 cutplane;
+varying highp vec4 fP; 
+varying highp vec3 fN; 
+varying highp vec4 color; 
+void main(void)
+{
+  if(vertex.x * cutplane.x  + vertex.y * cutplane.y  + vertex.z * cutplane.z  +  cutplane.w > 0){
+    color = vec4(0.0, 1.0, 1.0, 0.0);
+                                                                                             } else {
+    color = vec4(colors, 1.0);
+  }
+  fP = mv_matrix * vertex; 
+  fN = mat3(mv_matrix)* normals; 
+  gl_Position = mvp_matrix * vertex; 
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.f
new file mode 100644
index 0000000..8a19a0a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.f
@@ -0,0 +1,9 @@
+#version 120
+varying highp vec4 color;
+void main(void) 
+{ 
+  if(color.w>0)
+    gl_FragColor = vec4(0,0,0,1.0); 
+  else
+    discard;
+}  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.v
new file mode 100644
index 0000000..6823cd5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_c3t3_edges.v
@@ -0,0 +1,19 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 colors;
+uniform highp mat4 mvp_matrix;
+uniform highp vec4 cutplane;
+varying highp vec4 color; 
+void main(void)
+{
+  if(vertex.x * cutplane.x  + vertex.y * cutplane.y  + vertex.z * cutplane.z  +  cutplane.w > 0)
+  {
+    color = vec4(0.0, 1.0, 1.0, 0.0);
+  } 
+  else 
+  {
+    color = vec4(colors, 1.0);
+  }
+  gl_Position = mvp_matrix * vertex;
+}
+ 
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_instanced.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_instanced.v
new file mode 100644
index 0000000..d353c8d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_instanced.v
@@ -0,0 +1,19 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 normals;
+attribute highp vec3 colors;
+attribute highp vec3 center;
+uniform highp mat4 mvp_matrix;
+uniform highp mat4 mv_matrix;
+varying highp vec4 fP;
+varying highp vec3 fN;
+varying highp vec4 color;
+
+
+void main(void)
+{
+color = vec4(colors, 1.0);
+fP = mv_matrix * vertex;
+fN = mat3(mv_matrix)* normals;
+   gl_Position =  mvp_matrix * vec4(vertex.x + center.x, vertex.y + center.y, vertex.z + center.z, 1.0) ;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_no_light_no_selection.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_no_light_no_selection.f
new file mode 100644
index 0000000..f1bf1fa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_no_light_no_selection.f
@@ -0,0 +1,6 @@
+#version 120
+varying highp vec4 color;
+void main(void) 
+{
+  gl_FragColor = color; 
+}  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_plane_two_faces.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_plane_two_faces.f
new file mode 100644
index 0000000..935416e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_plane_two_faces.f
@@ -0,0 +1,17 @@
+#version 120
+varying highp vec4 color;
+uniform highp vec3 dirView;
+uniform highp vec3 plane_normal;
+uniform highp vec3 plane_pos;
+uniform bool is_selected;
+
+void main(void) {
+highp vec4 t_color = color;
+highp vec3 dir = highp vec3(plane_pos.x - dirView.x, plane_pos.y - dirView.y, plane_pos.z - dirView.z);
+if(dot(dir, plane_normal)>0)
+  t_color = vec4(1.0-color.r, 1.0-color.g, 1.0-color.b, color.a);
+if(is_selected)
+  gl_FragColor = vec4(t_color.r+70.0/255.0, t_color.g+70.0/255.0, t_color.b+70.0/255.0, 1.0);
+else
+  gl_FragColor = t_color;
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.f
new file mode 100644
index 0000000..badf68a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.f
@@ -0,0 +1,36 @@
+#version 120
+varying highp vec4 color;
+varying highp vec4 fP; 
+varying highp vec3 fN; 
+uniform highp vec4 light_pos;  
+uniform highp vec4 light_diff; 
+uniform highp vec4 light_spec; 
+uniform highp vec4 light_amb;  
+uniform highp float spec_power ; 
+uniform int is_two_side; 
+uniform bool is_selected;
+void main(void) {
+   highp vec3 L = light_pos.xyz - fP.xyz; 
+   highp vec3 V = -fP.xyz; 
+   highp vec3 N; 
+   if(fN == highp vec3(0.0,0.0,0.0))
+       N = highp vec3(0.0,0.0,0.0); 
+   else 
+       N = normalize(fN); 
+   L = normalize(L); 
+   V = normalize(V); 
+   highp vec3 R = reflect(-L, N); 
+  vec4 diffuse; 
+   if(is_two_side == 1) 
+       diffuse = abs(dot(N,L)) * light_diff * color; 
+   else 
+       diffuse = max(dot(N,L), 0.0) * light_diff * color; 
+   highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; 
+   vec4 ret_color = vec4((color*light_amb).xyz + diffuse.xyz + specular.xyz,1); 
+   if(is_selected)
+       gl_FragColor = vec4(ret_color.r+70.0/255.0, ret_color.g+70.0/255.0, ret_color.b+70.0/255.0, 1.0);
+   else
+       gl_FragColor = ret_color;
+}
+
+
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.v
new file mode 100644
index 0000000..637caeb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_light.v
@@ -0,0 +1,16 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 normals;
+attribute highp vec3 colors;
+uniform highp mat4 mvp_matrix;
+uniform highp mat4 mv_matrix; 
+varying highp vec4 fP; 
+varying highp vec3 fN; 
+varying highp vec4 color; 
+void main(void)
+{
+   color = vec4(colors, 1.0);
+   fP = mv_matrix * vertex; 
+   fN = mat3(mv_matrix)* normals; 
+   gl_Position = mvp_matrix * vertex; 
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.f
new file mode 100644
index 0000000..79034e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.f
@@ -0,0 +1,9 @@
+#version 120
+varying highp vec3 fColors;
+varying highp vec2 f_texCoord; 
+uniform sampler2D s_texture; 
+ 
+void main(void) 
+{ 
+  gl_FragColor = vec4(vec3(texture2D(s_texture, f_texCoord))*fColors, 1.0);
+}  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.v
new file mode 100644
index 0000000..bfecbfc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_texture.v
@@ -0,0 +1,34 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 normal;
+attribute highp vec3 color_facets;
+attribute highp vec2 v_texCoord; 
+
+uniform highp mat4 mvp_matrix;
+uniform highp mat4 mv_matrix; 
+uniform highp mat4 f_matrix; 
+uniform highp int is_two_side; 
+uniform highp vec4 light_pos;  
+uniform highp vec4 light_diff; 
+uniform highp vec3 light_spec; 
+uniform highp vec4 light_amb;  
+uniform highp float spec_power; 
+varying highp vec3 fColors; 
+varying highp vec2 f_texCoord; 
+       
+void main(void) 
+{ 
+   vec4 P = mv_matrix * vertex; 
+   vec3 N = mat3(mv_matrix)* normal; 
+   vec3 L = light_pos.xyz - P.xyz; 
+   N = normalize(N); 
+   L = normalize(L); 
+   vec3 diffuse;
+   if(is_two_side == 1) 
+       diffuse = abs(dot(N,L)) * light_diff.xyz; 
+   else 
+       diffuse = max(dot(N,L), 0.0) * light_diff.xyz; 
+   f_texCoord = v_texCoord; 
+   fColors = color_facets * (light_amb.xyz + diffuse);
+   gl_Position =  mvp_matrix * f_matrix * vertex; 
+}  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.f
new file mode 100644
index 0000000..eb35fed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.f
@@ -0,0 +1,9 @@
+#version 120
+varying highp vec3 fColors;
+varying highp vec2 f_texCoord; 
+uniform highp sampler2D s_texture; 
+ 
+void main(void) 
+{ 
+  gl_FragColor = vec4(vec3(texture2D(s_texture, f_texCoord))*fColors, 1.0); 
+}
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.v
new file mode 100644
index 0000000..7770cc3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_with_textured_edges.v
@@ -0,0 +1,14 @@
+#version 120
+ attribute highp vec4 vertex;
+ attribute highp vec2 v_texCoord; 
+ uniform highp vec3 color_lines; 
+ uniform highp mat4 mvp_matrix; 
+ varying highp vec3 fColors; 
+ varying highp vec2 f_texCoord; 
+  
+ void main(void) 
+ { 
+    f_texCoord = v_texCoord; 
+    fColors = color_lines; 
+    gl_Position = mvp_matrix * vertex; 
+ }  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.f b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.f
new file mode 100644
index 0000000..639530d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.f
@@ -0,0 +1,10 @@
+#version 120
+varying highp vec4 color;
+uniform bool is_selected;
+void main(void) 
+{ 
+if(is_selected)
+  gl_FragColor = vec4(0,0,0,1.0); 
+else
+  gl_FragColor = color; 
+}  
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.v b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.v
new file mode 100644
index 0000000..69e5741
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/shader_without_light.v
@@ -0,0 +1,12 @@
+#version 120
+attribute highp vec4 vertex;
+attribute highp vec3 colors;
+uniform highp mat4 mvp_matrix;
+uniform highp mat4 f_matrix;
+varying highp vec4 color; 
+void main(void)
+{
+   color = vec4(colors, 1.0); 
+   gl_Position = mvp_matrix * f_matrix * vertex;
+}
+ 
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/resources/simplification.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/simplification.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/resources/simplification.png
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/resources/simplification.png
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/top.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/top.png
new file mode 100644
index 0000000..b051c64
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/top.png differ
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/resources/up.png b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/up.png
new file mode 100644
index 0000000..a423c1b
Binary files /dev/null and b/3rdparty/CGAL-4.8/demo/Polyhedron/resources/up.png differ
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron/texture.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron/texture.cpp
new file mode 100644
index 0000000..d7623ed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron/texture.cpp
@@ -0,0 +1,1100 @@
+/***************************************************************************
+texture.cpp
+----------------------------------------------------------------------------
+begin                : june 2003
+copyright            : (C) 2003 by Pierre Alliez - INRIA
+email                : pierre.alliez at sophia.inria.fr
+***************************************************************************/
+
+#include <math.h>
+#include <string.h>
+#include "texture.h"
+
+
+//////////////////////////////////////////////
+// CONSTRUCTORS
+//////////////////////////////////////////////
+
+//********************************************
+// Constructor
+//********************************************
+Texture::Texture()
+{
+  m_pData = NULL;
+  m_Width = 0;
+  m_WidthByte32 = 0;
+  m_Height = 0;
+  m_Depth = 0;
+}
+
+//********************************************
+// Destructor
+//********************************************
+Texture::~Texture()
+{
+  Free();
+}
+
+
+//////////////////////////////////////////////
+// DATA
+//////////////////////////////////////////////
+
+//********************************************
+// Alloc
+//********************************************
+int Texture::Alloc(unsigned int width, unsigned int height, unsigned int depth)
+{
+  Free();
+
+  unsigned int Width32 = WidthByte32(width,depth);
+
+  m_pData = new unsigned char [Width32 * height];
+  if(m_pData == NULL)
+  {
+    return 0;
+  }
+
+  // Set members variables
+  m_Width       = width;
+  m_WidthByte32 = Width32;
+  m_Height      = height;
+  m_Depth       = depth;
+  UpdateHeader();
+
+  return 1;
+}
+
+//********************************************
+// Free
+//********************************************
+void Texture::Free()
+{
+  if(m_pData != NULL)
+  {
+    delete [] m_pData;
+    m_pData = NULL;
+  }
+  m_Width = 0;
+  m_Height = 0;
+  m_Depth = 0;
+}
+
+
+
+//********************************************
+// UpdateWidthByte32
+//********************************************
+void Texture::UpdateWidthByte32()
+{
+  m_WidthByte32 = WidthByte32(m_Width,m_Depth);
+}
+
+//********************************************
+// WidthByte32
+//********************************************
+unsigned int Texture::WidthByte32(unsigned int width, unsigned int depth)
+{
+  // 32 bits alignment (4 bytes)
+  int rest=(width*depth/8)%4;
+  if(rest != 0)
+    return (width*depth/8 + 4-rest);
+  else
+    return (width*depth/8);
+}
+
+//********************************************
+// UpdateHeader
+//********************************************
+void Texture::UpdateHeader()
+{
+  UpdateWidthByte32();
+}
+
+
+
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+// CHECKING
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+
+//********************************************
+// IsValid
+//********************************************
+int Texture::IsValid()
+{
+  int success = 0;
+  success = (m_Depth == 24) || (m_Depth == 32);
+  success &= (m_Width != 0);
+  success &= (m_Height != 0);
+  success &= (m_pData != NULL);
+  return success;
+}
+
+//********************************************
+// HigherPowerOfTwo
+//********************************************
+int Texture::HigherPowerOfTwo(int value)
+{
+  if(value <= 0)
+    return value;
+
+  int power = 1;
+  int x = 0;
+
+  while(1)
+  {
+    x = (int)pow(2.0,(double)power);
+    if(x >= value)
+      return x;
+    power++;
+  }
+}
+
+//********************************************
+// LowerPowerOfTwo
+//********************************************
+int Texture::LowerPowerOfTwo(int value)
+{
+  if(value <= 0)
+    return value;
+
+  int power = 1;
+  int x = 0;
+
+  while(1)
+  {
+    x = (int)pow(2.0,(double)power);
+    if(x >= value)
+      return (int)pow(2.0,(double)power-1);
+    power++;
+  }
+}
+
+//********************************************
+// SameSize
+//********************************************
+int Texture::SameSize(Texture *pTexture)
+{
+  int success = (m_Width == pTexture->GetWidth());
+  success &= (m_Height == pTexture->GetHeight());
+  return success;
+}
+
+
+//********************************************
+// Flip BGR to RGB
+//********************************************
+int Texture::BGRtoRGB()
+{
+  if(!IsValid())
+    return 0;
+
+  unsigned char pixel;
+  int BytePerPixel = m_Depth/8;
+  for(unsigned int j=0;j<m_Height;j++)
+    for(unsigned int i=0;i<m_Width;i++)
+    {
+      pixel = m_pData[m_WidthByte32*j+i*BytePerPixel+2];
+      m_pData[m_WidthByte32*j+i*BytePerPixel+2] = m_pData[m_WidthByte32*j+i*BytePerPixel];
+      m_pData[m_WidthByte32*j+i*BytePerPixel] = pixel;
+    }
+  return 1;
+}
+
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+// DUPLICATE
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+
+//********************************************
+// Extract
+//********************************************
+int Texture::Extract(int left, int top, int right, int bottom)
+{
+  // Saturate
+  if(right == -1)
+    right = m_Width-1;
+  if(bottom == -1)
+    bottom = m_Height-1;
+
+  // Check
+  if(left >= right || top >= bottom)
+    return 0;
+  if(left < 0  || left >= (int)m_Width || 
+    right < 0 || right >= (int)m_Width)
+    return 0;
+  if(top < 0  || top >= (int)m_Height || 
+    bottom < 0 || bottom >= (int)m_Height)
+    return 0;
+
+  int NewWidth = right-left+1;
+  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
+  int NewHeight = bottom-top+1;
+  int BytePerPixel = m_Depth / 8;
+  int i,j,k;
+
+  //TRACE("Start extracting...\n");
+  //TRACE("New width : %d\n",NewWidth);
+  //TRACE("New height : %d\n",NewHeight);
+
+  // Alloc
+  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
+  if(pData == NULL)
+  {
+    //TRACE("Insufficiant memory");
+    return 0;
+  }
+
+  for(j=0;j<NewHeight;j++)
+    for(i=0;i<NewWidth;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(m_Height-1-(j+top))+(i+left)*BytePerPixel+k];
+
+  // Replace datas
+  delete [] m_pData;
+  m_pData = pData;
+  m_Width = NewWidth;
+  m_WidthByte32 = NewWidthByte32;
+  m_Height = NewHeight;
+
+  UpdateHeader();
+
+  return 1;
+}
+
+
+//********************************************
+// DuplicateMirror
+//********************************************
+int Texture::DuplicateMirror(int left, int top, int right, int bottom)
+{
+
+  if(!Extract(left,top,right,bottom))
+    return 0;
+
+  left = 0;
+  right = m_Width-1;
+  top = 0;
+  bottom = m_Height-1;
+
+  int NewWidth = 2*m_Width;
+  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
+  int NewHeight = 2*m_Height;
+  int BytePerPixel = m_Depth / 8;
+  int i,j,k;
+
+  //TRACE("Start duplicate mirror...\n");
+  //TRACE("New width : %d\n",NewWidth);
+  //TRACE("New widthbyte32 : %d\n",NewWidthByte32);
+  //TRACE("New height : %d\n",NewHeight);
+
+  // Alloc
+  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
+  if(pData == NULL)
+  {
+    //TRACE("Insufficiant memory");
+    return 0;
+  }
+
+  // o o
+  // x o
+  for(j=0;j<NewHeight/2;j++)
+    for(i=0;i<NewWidth/2;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i+left)*BytePerPixel+k];
+  // o o
+  // o x
+  for(j=0;j<NewHeight/2;j++)
+    for(i=NewWidth/2;i<NewWidth;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(right-(i-NewWidth/2+left))*BytePerPixel+k];
+  // x o
+  // o o
+  for(j=NewHeight/2;j<NewHeight;j++)
+    for(i=0;i<NewWidth/2;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(j-NewHeight/2+top)+(i+left)*BytePerPixel+k];
+  // o x
+  // o o
+  for(j=NewHeight/2;j<NewHeight;j++)
+    for(i=NewWidth/2;i<NewWidth;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(j-NewHeight/2+top)+(right-(i-NewWidth/2+left))*BytePerPixel+k];
+
+  // Replace datas
+  delete [] m_pData;
+  m_pData = pData;
+  m_Width = NewWidth;
+  m_WidthByte32 = NewWidthByte32;
+  m_Height = NewHeight;
+
+  UpdateHeader();
+
+  return 1;
+}
+
+
+
+
+//********************************************
+// DuplicateRepeatWidth
+//********************************************
+int Texture::DuplicateRepeatWidth(int left, int top, int right, int bottom)
+{
+  if(!Extract(left,top,right,bottom))
+    return 0;
+
+  left = 0;
+  right = m_Width-1;
+  top = 0;
+  bottom = m_Height-1;
+
+  int NewWidth = 2*m_Width;
+  int NewWidthByte32 = WidthByte32(NewWidth,m_Depth);
+  int NewHeight = m_Height;
+  int BytePerPixel = m_Depth / 8;
+  int i,j,k;
+
+  ////TRACE("Start duplicate repeat width...\n");
+  ////TRACE("New width : %d\n",NewWidth);
+  ////TRACE("New widthbyte32 : %d\n",NewWidthByte32);
+  ////TRACE("New height : %d\n",NewHeight);
+
+  // Alloc
+  unsigned char *pData = new unsigned char[NewWidthByte32*NewHeight];
+  if(pData == NULL)
+  {
+    ////TRACE("Insufficiant memory");
+    return 0;
+  }
+
+  // x o
+  for(j=0;j<NewHeight;j++)
+    for(i=0;i<NewWidth/2;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i+left)*BytePerPixel+k];
+  // o x
+  for(j=0;j<NewHeight;j++)
+    for(i=NewWidth/2;i<NewWidth;i++)
+      for(k=0;k<BytePerPixel;k++)
+	pData[NewWidthByte32*j+i*BytePerPixel+k] = m_pData[m_WidthByte32*(bottom-(j+top))+(i-NewWidth/2+left)*BytePerPixel+k];
+
+  // Replace datas
+  delete [] m_pData;
+  m_pData = pData;
+  m_Width = NewWidth;
+  m_WidthByte32 = NewWidthByte32;
+  m_Height = NewHeight;
+
+  UpdateHeader();
+
+  return 1;
+}
+
+
+//********************************************
+// Fill
+//********************************************
+void Texture::Fill(unsigned char r,
+		   unsigned char g,
+		   unsigned char b)
+{
+  if(!IsValid()) return;
+  if(m_Depth != 24) return;
+  for(unsigned int j=0;j<m_Height;j++)
+    for(unsigned int i=0;i<m_Width;i++)
+    {
+      m_pData[m_WidthByte32*j+i*3] = b;
+      m_pData[m_WidthByte32*j+i*3+1] = g;
+      m_pData[m_WidthByte32*j+i*3+2] = r;
+    }
+}
+
+
+//***************************************
+// GreyToColor
+//***************************************
+void Texture::GreyToColor(unsigned char grey,
+			  unsigned char r, 
+			  unsigned char g,
+			  unsigned char b)
+{
+  if(!IsValid()) return;
+  if(m_Depth != 24) return;
+  for(unsigned int j=0;j<m_Height;j++)
+    for(unsigned int i=0;i<m_Width;i++)
+    {
+      if(m_pData[m_WidthByte32*j+i*3] == grey)
+      {
+	m_pData[m_WidthByte32*j+i*3] = b;
+	m_pData[m_WidthByte32*j+i*3+1] = g;
+	m_pData[m_WidthByte32*j+i*3+2] = r;
+      }
+    }
+}
+
+//***************************************
+// ColorToColor
+//***************************************
+void Texture::ColorToColor(unsigned char r1,
+			   unsigned char g1,
+			   unsigned char b1,
+			   unsigned char r2, 
+			   unsigned char g2,
+			   unsigned char b2)
+{
+  if(!IsValid()) return;
+  if(m_Depth != 24) return;
+  for(unsigned int j=0;j<m_Height;j++)
+    for(unsigned int i=0;i<m_Width;i++)
+    {
+      if(m_pData[m_WidthByte32*j+i*3] == b1 &&
+	m_pData[m_WidthByte32*j+i*3+1] == g1 &&
+	m_pData[m_WidthByte32*j+i*3+2] == r1)
+      {
+	m_pData[m_WidthByte32*j+i*3]   = b2;
+	m_pData[m_WidthByte32*j+i*3+1] = g2;
+	m_pData[m_WidthByte32*j+i*3+2] = r2;
+      }
+    }
+}
+
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+// ALPHA
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+
+//********************************************
+// SetAlphaLayer
+//********************************************
+int Texture::SetAlphaLayer(unsigned char alpha) // 0 - 255
+{
+  // Check
+  if(!IsValid())
+    return 0;
+
+  if(m_Depth != 32)
+    return 0;
+
+  // Fill alpha layer 
+  int size = m_Width * m_Height;
+  for(int i=0;i<4*size;i+=4)
+    m_pData[i+3] = alpha;
+
+  return 1;
+}
+
+//********************************************
+// AddAlphaLayer
+//********************************************
+int Texture::AddAlphaLayer(unsigned char alpha) // 0 - 255
+{
+  // Check
+  if(!IsValid())
+    return 0;
+
+  // Has soon alpha
+  if(HasAlpha())
+    return SetAlphaLayer(alpha);
+
+  // Alloc memory
+  unsigned char *pData = new unsigned char[4*m_Width*m_Height];
+  if(pData == NULL)
+  {
+    //TRACE("Texture::AddAlphaLayer : insufficiant memory");
+    return 0;
+  }
+
+  // Fill new data
+  int size = m_Width * m_Height;
+  int BytePerPixel = m_Depth / 8;
+  for(int i=0;i<size;i++)
+  {
+    pData[4*i+0] = m_pData[BytePerPixel*i+0];
+    pData[4*i+1] = m_pData[BytePerPixel*i+1];
+    pData[4*i+2] = m_pData[BytePerPixel*i+2];
+    pData[4*i+3] = alpha;
+  }
+
+  // Set new depth
+  m_Depth = 32;
+
+  // Replace datas
+  delete [] m_pData;
+  m_pData = pData;
+
+  return 1;
+}
+
+
+//********************************************
+// SetAlpha
+// From RGB to grey scales, then alpha layer
+//********************************************
+int Texture::SetAlphaLayer(Texture *pTexture) 
+{
+  // Check
+  if(!IsValid())
+    return 0;
+  if(!pTexture->IsValid())
+    return 0;
+
+  if(!SameSize(pTexture))
+    return 0;
+
+  if(!AddAlphaLayer(0))
+    return 0;
+
+  // Fill new data
+  unsigned char *pData = pTexture->GetData();
+  int size = m_Width * m_Height;
+  int BytePerPixel = pTexture->GetDepth() / 8;
+  for(int i=0;i<size;i++)
+    m_pData[4*i+3] = (unsigned char)((int)pData[BytePerPixel*i+0]+
+    (int)pData[BytePerPixel*i+1]+
+    (int)pData[BytePerPixel*i+2])/3;
+
+  return 1;
+}
+
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+// DISPLAY
+//////////////////////////////////////////////
+//////////////////////////////////////////////
+
+
+//********************************************
+// ReadBuffer
+//********************************************
+int Texture::ReadBuffer(unsigned char *buffer, 
+			int width, 
+			int height, 
+			int depth)
+{
+  if(buffer == NULL)
+    return 0;
+
+  if(!Alloc(width,height,depth))
+    return 0;
+
+  int BytePerPixel = depth / 8;
+
+  for(int j=0;j<height;j++)
+    for(int i=0;i<width;i++)
+      for(int k=0;k<BytePerPixel;k++)
+	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
+	buffer[(width*j+i)*BytePerPixel+k];
+
+  return 1;
+}
+
+
+//********************************************
+// ReadBufferByte32
+//********************************************
+int Texture::ReadBufferByte32(unsigned char *pData, 
+			      int width, 
+			      int height)
+{
+  // alloc 32 bits buffer
+  if(!Alloc(width,height,32))
+    return 0;
+
+  if(pData == NULL)
+    return 0;
+
+  memcpy(m_pData,pData,height*m_WidthByte32);
+  return 1;
+}
+
+
+//***************************************
+// Copy
+//***************************************
+void Texture::Copy(Texture *pTexture)
+{
+  unsigned char *pBuffer = pTexture->GetData();
+  if(pBuffer == NULL)
+    return;
+
+  unsigned int width = pTexture->GetWidth();
+  unsigned int height = pTexture->GetHeight();
+  unsigned int depth = pTexture->GetDepth();
+  if(!Alloc(width,height,depth))
+    return;
+
+  unsigned int BytePerPixel = depth / 8;
+
+  for(unsigned int j=0;j<height;j++)
+    for(unsigned int i=0;i<width;i++)
+      for(unsigned int k=0;k<BytePerPixel;k++)
+	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
+	pBuffer[(width*j+i)*BytePerPixel+k];
+}
+
+
+//********************************************
+// ReadBuffer
+//********************************************
+int Texture::ReadBuffer(float *buffer, 
+			int width, 
+			int height, 
+			int depth)
+{
+  if(buffer == NULL)
+    return 0;
+
+  if(!Alloc(width,height,depth))
+    return 0;
+
+  int BytePerPixel = depth / 8;
+
+  for(int j=0;j<height;j++)
+    for(int i=0;i<width;i++)
+      for(int k=0;k<BytePerPixel;k++)
+	m_pData[m_WidthByte32*j + i*BytePerPixel+k] = 
+	(unsigned char)(255.0f * buffer[(width*j+i)*BytePerPixel+k]);
+
+  return 1;
+}
+
+//********************************************
+// ReadBuffer
+//********************************************
+int Texture::ReadBuffer(float **ppBuffer, 
+			int width, 
+			int height,
+			float ratio)
+{
+  if(ppBuffer == NULL)
+    return 0;
+
+  if(!Alloc(width,height,24))
+    return 0;
+
+  for(int j=0;j<height;j++)
+    for(int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = (unsigned char)(ratio*ppBuffer[j][i]);
+      m_pData[m_WidthByte32*j + i*3+1] = (unsigned char)(ratio*ppBuffer[j][i]);
+      m_pData[m_WidthByte32*j + i*3+2] = (unsigned char)(ratio*ppBuffer[j][i]);
+    }
+  return 1;
+}
+
+//********************************************
+// WriteBuffer
+//********************************************
+int Texture::WriteBuffer(float **ppBuffer, 
+			 int width, 
+			 int height)
+{
+  if(ppBuffer == NULL)
+    return 0;
+
+  for(int j=0;j<height;j++)
+    for(int i=0;i<width;i++) // only first channel
+      ppBuffer[j][i] = m_pData[m_WidthByte32*j + i*3];
+  return 1;
+}
+
+//********************************************
+// WriteBuffer32
+//********************************************
+int Texture::WriteBuffer32(float **ppBuffer, 
+			   int width, 
+			   int height)
+{
+  if(ppBuffer == NULL)
+    return 0;
+  //ASSERT(m_Depth == 32);
+  unsigned int r,g,b;
+  int tmp;
+  for(int j=0;j<height;j++)
+  {
+    tmp = m_WidthByte32*j;
+    for(int i=0;i<width;i++) // from 3 channels
+    {
+      b = m_pData[tmp + i*4];
+      g = m_pData[tmp + i*4+1];
+      r = m_pData[tmp + i*4+2];
+      unsigned int value = (r << 16) + (g << 8) + b;
+      ppBuffer[j][i] = (float)value;
+    }
+  }
+  return 1;
+}
+
+//********************************************
+// ReadBuffer
+//********************************************
+int Texture::ReadBuffer(double *buffer, 
+			int width, 
+			int height, 
+			int depth)
+{
+  if(buffer == NULL)
+    return 0;
+
+  if(!Alloc(width,height,depth))
+    return 0;
+
+  int BytePerPixel = depth / 8;
+
+  for(int j=0;j<height;j++)
+    for(int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*BytePerPixel]   = (unsigned char)buffer[width*j+i];
+      m_pData[m_WidthByte32*j + i*BytePerPixel+1] = (unsigned char)buffer[width*j+i];
+      m_pData[m_WidthByte32*j + i*BytePerPixel+2] = (unsigned char)buffer[width*j+i];
+    }
+
+  return 1;
+}
+
+
+//********************************************
+// Grey
+//********************************************
+int Texture::Grey(unsigned int x, unsigned int y)
+{
+  int BytePerPixel = m_Depth / 8;
+  // Grey scale
+  if(BytePerPixel == 1)
+    return (int)m_pData[m_WidthByte32*y + x]; 
+  else // 24 or 32 bits (alpha layer)
+    return (int)((int)m_pData[m_WidthByte32*y + x*BytePerPixel+0]+ 
+    (int)m_pData[m_WidthByte32*y + x*BytePerPixel+1]+
+    (int)m_pData[m_WidthByte32*y + x*BytePerPixel+2])/3;
+}
+
+//********************************************
+// Color
+//********************************************
+void Texture::Color(unsigned int x, unsigned int y, 
+		    unsigned char *pRed, unsigned char *pGreen, unsigned char *pBlue)
+{
+  int BytePerPixel = m_Depth / 8;
+  // Grey scale
+  if(BytePerPixel == 1)
+  {
+    *pRed = m_pData[m_WidthByte32*y + x]; 
+    *pGreen = m_pData[m_WidthByte32*y + x]; 
+    *pBlue = m_pData[m_WidthByte32*y + x]; 
+  }
+  else // 24 or 32 bits (alpha layer)
+  {
+    *pRed = m_pData[m_WidthByte32*y + x*BytePerPixel]; 
+    *pGreen = m_pData[m_WidthByte32*y + x*BytePerPixel+1]; 
+    *pBlue = m_pData[m_WidthByte32*y + x*BytePerPixel+2]; 
+  }
+}
+
+
+
+
+
+void Texture::GenerateMirrorV(unsigned int width,
+			      unsigned int height, 
+			      unsigned char r,
+			      unsigned char g,
+			      unsigned char b,
+			      unsigned char rb,
+			      unsigned char gb,
+			      unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=0;i<width/4;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+    }
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=width/4;i<3*width/4;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = rb;
+      m_pData[m_WidthByte32*j + i*3+1] = gb;
+      m_pData[m_WidthByte32*j + i*3+2] = bb;
+    }
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=3*width/4;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+    }
+}
+
+void Texture::GenerateMirrorH(unsigned int width,
+			      unsigned int height, 
+			      unsigned char r,
+			      unsigned char g,
+			      unsigned char b,
+			      unsigned char rb,
+			      unsigned char gb,
+			      unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  for(unsigned j=0;j<height/4;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+    }
+  for(unsigned j=height/4;j<3*height/4;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = rb;
+      m_pData[m_WidthByte32*j + i*3+1] = gb;
+      m_pData[m_WidthByte32*j + i*3+2] = bb;
+    }
+  for(unsigned j=3*height/4;j<height;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+  }
+}
+
+
+void Texture::GenerateCheckerBoard(unsigned int width,
+				   unsigned int height, 
+				   int size,
+				   unsigned char r,
+				   unsigned char g,
+				   unsigned char b,
+				   unsigned char rb,
+				   unsigned char gb,
+				   unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      int h = (int)((double)i/(double)size);
+      int v = (int)((double)j/(double)size);
+      bool h_odd = (h%2) == 0;
+      bool v_odd = (v%2) == 0;
+      if((h_odd	+ v_odd)%2 == 0)
+      {
+	m_pData[m_WidthByte32*j + i*3]   = rb;
+	m_pData[m_WidthByte32*j + i*3+1] = gb;
+	m_pData[m_WidthByte32*j + i*3+2] = bb;
+      }
+      else
+      {
+	m_pData[m_WidthByte32*j + i*3]   = r;
+	m_pData[m_WidthByte32*j + i*3+1] = g;
+	m_pData[m_WidthByte32*j + i*3+2] = b;
+      }
+    }
+}
+
+void Texture::GenerateVStripes(unsigned int width,
+			       unsigned int height, 
+			       int size,
+			       unsigned char r,
+			       unsigned char g,
+			       unsigned char b,
+			       unsigned char rb,
+			       unsigned char gb,
+			       unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      int h = (int)((double)i/(double)size);
+      bool h_odd = (h%2) == 0;
+      if(h_odd)
+      {
+	m_pData[m_WidthByte32*j + i*3]   = rb;
+	m_pData[m_WidthByte32*j + i*3+1] = gb;
+	m_pData[m_WidthByte32*j + i*3+2] = bb;
+      }
+      else
+      {
+	m_pData[m_WidthByte32*j + i*3]   = r;
+	m_pData[m_WidthByte32*j + i*3+1] = g;
+	m_pData[m_WidthByte32*j + i*3+2] = b;
+      }
+    }
+}
+
+void Texture::GenerateHStripes(unsigned int width,
+			       unsigned int height, 
+			       int size,
+			       unsigned char r,
+			       unsigned char g,
+			       unsigned char b,
+			       unsigned char rb,
+			       unsigned char gb,
+			       unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  for(unsigned j=0;j<height;j++)
+    for(unsigned int i=0;i<width;i++)
+    {
+      int v = (int)((double)j/(double)size);
+      bool v_odd = (v%2) == 0;
+      if(v_odd)
+      {
+	m_pData[m_WidthByte32*j + i*3]   = rb;
+	m_pData[m_WidthByte32*j + i*3+1] = gb;
+	m_pData[m_WidthByte32*j + i*3+2] = bb;
+      }
+      else
+      {
+	m_pData[m_WidthByte32*j + i*3]   = r;
+	m_pData[m_WidthByte32*j + i*3+1] = g;
+	m_pData[m_WidthByte32*j + i*3+2] = b;
+      }
+    }
+}
+
+
+//***************************************
+// GenerateGrid
+//***************************************
+void Texture::GenerateGrid(unsigned int width,
+			   unsigned int height, 
+			   int /*size*/,
+			   unsigned int thickness,
+			   unsigned char r,
+			   unsigned char g,
+			   unsigned char b,
+			   unsigned char rb,
+			   unsigned char gb,
+			   unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  // fill background
+  unsigned int i,j;
+  for(j=0;j<height;j++)
+    for(i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = rb;
+      m_pData[m_WidthByte32*j + i*3+1] = gb;
+      m_pData[m_WidthByte32*j + i*3+2] = bb;
+    }
+
+  // horizontal
+  for(j=height/2-thickness/2;j<height/2+thickness/2;j++)
+  {
+    for(i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+    }
+  }
+
+  // vertical
+  for(unsigned int i=width/2-thickness/2;i<width/2+thickness/2;i++)
+    for(unsigned int j=0;j<height;j++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = r;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = b;
+    }
+}
+
+void Texture::GenerateGradientH(unsigned int width,
+				unsigned int height,
+				int /*size*/)
+{
+  Alloc(width,height,24);
+
+  // fill background
+  for(unsigned int i=0;i<width;i++)
+  {
+    unsigned char g = (unsigned char)(255.0 * (double)i / (double)(width-1));
+    for(unsigned int j=0;j<height;j++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = g;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = g;
+    }
+  }
+}
+void Texture::GenerateGradientV(unsigned int width,
+				unsigned int height,
+				int /*size*/)
+{
+  Alloc(width,height,24);
+
+  // fill background
+  for(unsigned int j=0;j<height;j++)
+  {
+    unsigned char g = (unsigned char)(255.0 * (double)j / (double)(height-1));
+    for(unsigned int i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = g;
+      m_pData[m_WidthByte32*j + i*3+1] = g;
+      m_pData[m_WidthByte32*j + i*3+2] = g;
+    }
+  }
+}
+
+//***************************************
+// GenerateLines
+//***************************************
+void Texture::GenerateLines(unsigned int width,
+			    unsigned int height, 
+			    int size,
+			    unsigned char r,
+			    unsigned char g,
+			    unsigned char b,
+			    unsigned char rb,
+			    unsigned char gb,
+			    unsigned char bb)
+{
+  Alloc(width,height,24);
+
+  // fill background
+  unsigned int i,j;
+  for(j=0;j<height;j++)
+    for(i=0;i<width;i++)
+    {
+      m_pData[m_WidthByte32*j + i*3]   = rb;
+      m_pData[m_WidthByte32*j + i*3+1] = gb;
+      m_pData[m_WidthByte32*j + i*3+2] = bb;
+    }
+
+    // horizontal zebra
+    for(j=0;j<height;j++)
+    {
+      if((j/size)%2 == 0)
+	for(i=0;i<width;i++)
+	{
+	  m_pData[m_WidthByte32*j + i*3]   = r;
+	  m_pData[m_WidthByte32*j + i*3+1] = g;
+	  m_pData[m_WidthByte32*j + i*3+2] = b;
+	}
+    }
+}
+
+
+
+
+
+
+// ** EOF **
+
+
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/texture.h b/3rdparty/CGAL-4.8/demo/Polyhedron/texture.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/texture.h
rename to 3rdparty/CGAL-4.8/demo/Polyhedron/texture.h
diff --git a/3rdparty/CGAL-4.8/demo/Polyhedron_IO/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyhedron_IO/CMakeLists.txt
new file mode 100644
index 0000000..1e91cdc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyhedron_IO/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polyhedron_IO_Demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  create_single_source_cgal_program( "geomview_demo.cpp" )
+  create_single_source_cgal_program( "viewpoint2off.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron_IO/README b/3rdparty/CGAL-4.8/demo/Polyhedron_IO/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron_IO/README
rename to 3rdparty/CGAL-4.8/demo/Polyhedron_IO/README
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron_IO/geomview_demo.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron_IO/geomview_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron_IO/geomview_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Polyhedron_IO/geomview_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron_IO/viewpoint2off.cpp b/3rdparty/CGAL-4.8/demo/Polyhedron_IO/viewpoint2off.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron_IO/viewpoint2off.cpp
rename to 3rdparty/CGAL-4.8/demo/Polyhedron_IO/viewpoint2off.cpp
diff --git a/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/CMakeLists.txt
new file mode 100644
index 0000000..808265d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Polyline_simplification_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Widgets Svg)
+
+include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
+include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../include )
+include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+
+# UI files (Qt Designer files)
+qt5_wrap_ui( CDT_UI_FILES Polyline_simplification_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( CDT_RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.cpp Polyline_simplification_2.moc )
+
+# The executable itself.
+add_executable  ( Polyline_simplification_2 ${CMAKE_CURRENT_SOURCE_DIR}/Polyline_simplification_2.cpp Polyline_simplification_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
+
+qt5_use_modules(Polyline_simplification_2 Xml Script OpenGL Widgets Svg)
+# Link with Qt libraries
+target_link_libraries( Polyline_simplification_2 ${QT_LIBRARIES} )
+
+# Link with CGAL
+target_link_libraries( Polyline_simplification_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyline_simplification_2 )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.cpp
new file mode 100644
index 0000000..907e79f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.cpp
@@ -0,0 +1,553 @@
+//#define CGAL_USE_BOOST_BIMAP
+
+#include <fstream>
+#include <vector>
+
+// CGAL headers
+#include <CGAL/Bbox_2.h>
+#include <CGAL/assertions_behaviour.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Timer.h> 
+
+//#define CGAL_TESTING_POLYLINE_SIMPLIFICATION
+//#define CGAL_POLYLINE_SIMPLIFICATION_TRACE_LEVEL 15
+
+bool lAppToLog = false ;
+void Polyline_simplification_2_external_trace( std::string m )
+{
+  std::ofstream out("polysim_log.txt", ( lAppToLog ? std::ios::app | std::ios::ate : std::ios::trunc | std::ios::ate ) );
+  out << std::setprecision(19) << m << std::endl << std::flush ; 
+  lAppToLog = true ;
+}
+
+void error_handler ( char const* what, char const* expr, char const* file, int line, char const* msg )
+{
+  std::cerr << "CGAL error: " << what << " violation!" << std::endl
+       << "Expr: " << expr << std::endl
+       << "File: " << file << std::endl
+       << "Line: " << line << std::endl;
+  if ( msg != 0)
+      std::cerr << "Explanation:" << msg << std::endl;
+    
+  throw std::runtime_error("CGAL Error");  
+}
+
+
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <CGAL/Polyline_simplification_2/simplify.h>
+#include <CGAL/Polyline_simplification_2/Squared_distance_cost.h>
+#include <CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QSlider>
+#include <QProgressBar>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/Polyline_simplification_2_graphics_item.h>
+#include <CGAL/Qt/Converter.h>
+
+// the two base classes
+#include "ui_Polyline_simplification_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+// for viewportsBbox(QGraphicsScene*)
+#include <CGAL/Qt/utility.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+typedef K::Point_2         Point_2;
+typedef K::Segment_2       Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef CGAL::Polyline_simplification_2::Vertex_base_2<K> Vb;
+typedef CGAL::Constrained_triangulation_face_base_2<K>    Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb>       TDS;
+typedef CGAL::Exact_predicates_tag                        Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<K,TDS, Itag> CDT;
+
+typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
+
+namespace PS2 = CGAL::Polyline_simplification_2 ;
+
+enum Mode { ABS_P, ABS_E, REL_P, REL_E, MIXED_P, MIXED_E } ;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Polyline_simplification_2
+{
+  Q_OBJECT
+  
+private:  
+
+  PCT                                                m_pct; 
+  QGraphicsScene                                    mScene;
+  CGAL::Qt::PolylineSimplificationGraphicsItem<PCT> * mGI;
+  CGAL::Qt::GraphicsViewPolylineInput<K> *          mPI;
+  
+private:  
+
+public:
+
+  MainWindow();
+
+protected:
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+private:
+
+  void loadPoly(QString);
+  void loadOSM (QString);
+
+protected Q_SLOTS:
+void open(QString);
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionShowTriangulation_toggled(bool checked);
+  
+  void on_actionInsertPolyline_toggled(bool checked);
+  
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionLoadConstraints_triggered();
+
+  void on_actionSimplify_triggered();
+
+  Mode getSimplificationMode() ;
+
+  double getThreshold() ;
+  
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  CGAL::set_error_handler  (error_handler);
+  CGAL::set_warning_handler(error_handler);
+  
+  setupUi(this);
+
+  setAcceptDrops(true);
+
+  // Add a GraphicItem for the PS triangulation
+  mGI = new CGAL::Qt::PolylineSimplificationGraphicsItem<PCT>(&m_pct);
+    
+  QObject::connect(this, SIGNAL(changed()), mGI, SLOT(modelChanged()));
+
+  mGI->setVerticesPen(QPen(Qt::black, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  mGI->setUnremovableVerticesPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  mGI->setZValue(-1);
+  mGI->setVisibleEdges(false);
+  mGI->setVisibleConstraints(true);
+  
+  mScene.addItem(mGI);
+
+  // Setup input handlers. They get events before the mScene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  mPI = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &mScene, 0, true); // inputs polylines which are not closed
+  this->on_actionInsertPolyline_toggled(true);
+  QObject::connect(mPI, SIGNAL(generate(CGAL::Object)), this, SLOT(processInput(CGAL::Object)));
+    
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  //  QActionGroup* ag = new QActionGroup(this);
+  //  ag->addAction(this->actionInsertPolyline);
+
+  this->actionShowTriangulation->setChecked(false);
+  
+  //
+  // Setup the mScene and the view
+  //
+  mScene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  mScene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&mScene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Polyline_simplification_2.html");
+  this->addAboutCGAL();
+  this->setupExportSVG(action_Export_SVG, graphicsView);
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
+	  
+//  QObject::connect(thresholdSlider, SIGNAL(valueChanged(int)), this, SLOT(set_Threshold(int)));
+	  
+}
+
+
+void 
+MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+  if (event->mimeData()->hasFormat("text/uri-list"))
+    event->acceptProposedAction();
+}
+
+void 
+MainWindow::dropEvent(QDropEvent *event)
+{
+  QString filename = event->mimeData()->urls().at(0).path();
+  open(filename);
+  event->acceptProposedAction();
+}
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o))
+  {
+    if(points.size() >= 2) 
+    {
+      m_pct.insert_constraint(points.begin(), points.end());
+#if 0
+      std::ofstream out("polygon.txt");
+      out.precision(12);
+      out << points.size() << std::endl;
+      for(std::list<Point_2>::iterator it = points.begin(); it!= points.end(); ++it){
+        out << *it << std::endl;
+      }
+#endif
+      Q_EMIT( changed());
+    }  
+  }
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPolyline_toggled(bool checked)
+{
+  if(checked){
+    mScene.installEventFilter(mPI);
+  } else {
+    mScene.removeEventFilter(mPI);
+  }
+}
+
+void
+MainWindow::on_actionShowTriangulation_toggled(bool checked)
+{
+  mGI->setVisibleEdges(checked);
+  update();
+}
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  m_pct.clear();
+  mGI->modelChanged();
+  Q_EMIT( changed());
+}
+
+Mode MainWindow::getSimplificationMode()
+{
+  bool lP     = rbuttonPercentage->isChecked();
+  int  lError = rbuttonAbsError  ->isChecked() ? 0 : ( rbuttonRelError  ->isChecked() ? 1 : 2 ) ;
+
+  return lP ? lError == 0 ? ABS_P : ( lError == 1 ? REL_P : MIXED_P )
+            : lError == 0 ? ABS_E : ( lError == 1 ? REL_E : MIXED_E ) ;
+}
+
+double MainWindow::getThreshold()
+{
+  double lValue = this->textValue->text().toDouble() ;
+  return rbuttonPercentage->isChecked() ? lValue / 100.0
+           : rbuttonAbsError->isChecked() ? lValue * lValue
+              : lValue  ;
+}
+
+void MainWindow::on_actionSimplify_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  
+  try
+  {
+    switch( getSimplificationMode() )
+    {
+    case ABS_P   : simplify(m_pct, PS2::Squared_distance_cost(),  PS2::Stop_below_count_ratio_threshold(getThreshold())   ) ; 
+ break ;
+    case ABS_E   : simplify(m_pct, PS2::Squared_distance_cost(), PS2::Stop_above_cost_threshold(getThreshold()) ) ; break ;
+    case REL_P   : simplify(m_pct, PS2::Scaled_squared_distance_cost(),  PS2::Stop_below_count_ratio_threshold(getThreshold()) ) ; break ;
+    case REL_E   : simplify(m_pct, PS2::Scaled_squared_distance_cost(), PS2::Stop_above_cost_threshold(getThreshold()) ) ; break ;
+    case MIXED_P : simplify(m_pct, PS2::Hybrid_squared_distance_cost<double>(1.0), PS2::Stop_below_count_ratio_threshold(getThreshold())) ; break ;
+ case MIXED_E : simplify(m_pct, PS2::Hybrid_squared_distance_cost<double>(1.0), PS2::Stop_above_cost_threshold(getThreshold())) ; break ;
+
+      break ;
+    }
+    
+    statusBar()->showMessage(QString("Simplification done"));
+  }  
+  catch(...) 
+  {
+    statusBar()->showMessage(QString("Exception ocurred"));
+  }
+  
+   // default cursor
+  QApplication::restoreOverrideCursor();
+  mGI->modelChanged();
+  Q_EMIT( changed());
+}
+
+
+void 
+MainWindow::open(QString fileName)
+{
+  if(! fileName.isEmpty()){
+    if(fileName.endsWith(".poly")){
+      loadPoly(fileName);
+      this->addToRecentFiles(fileName);
+    }  
+    else if(fileName.endsWith(".osm")){
+      loadOSM(fileName);
+      this->addToRecentFiles(fileName);
+    }  
+  }
+}
+
+void
+MainWindow::on_actionLoadConstraints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						                                      tr("Open Constraint File"),
+						                                      "../data",
+						                                      tr("Polylines (*.osm *.poly)")
+						                                      );
+  open(fileName);
+}
+
+std::string trim_right ( std::string str )
+{
+  if ( str.length() > 0 )
+  {
+    std::size_t pos = str.find_last_not_of( " " ) ;
+    if ( pos != std::string::npos )
+      return str.substr(0,pos+1);
+  }
+  
+  return std::string("") ;  
+}
+
+enum { POLYGON, POLYLINE, POINT_2 } ;
+
+void MainWindow::loadPoly(QString fileName)
+{
+  m_pct.clear();
+  mGI->modelChanged();
+  
+  std::ifstream ifs(qPrintable(fileName));
+  
+  std::string line ;
+  
+  std::vector<Point_2> poly ;
+  
+  bool lIsClosed = true ;
+  
+  while ( std::getline(ifs,line) )
+  {
+    line = trim_right(line);
+    
+    if ( line.size() > 0 )
+    {
+      int lCode = POINT_2 ;
+      
+      if ( line == "POLYGON" )    
+      {
+        lCode = POLYGON ; 
+        lIsClosed = true ; 
+      }
+      else if ( line == "POLYLINE" )
+      {
+        lCode = POLYLINE ;
+        lIsClosed = false ; 
+      }
+      
+      if ( lCode == POINT_2 )
+      {
+        double x,y ;
+        
+        std::istringstream ss(line);
+        
+        ss >> x >> y ;
+        
+        poly.push_back( Point_2(x,y) );
+      }
+      else
+      {
+        if ( poly.size() > 0 )  
+        {
+          if ( lIsClosed )
+          {
+            if(poly.back() != poly.front()){
+              poly.push_back(poly.front());
+            }
+            m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+          }
+          else
+          {
+            m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+          }
+        }
+        poly.clear();
+      }
+    }
+  }
+  
+  if ( poly.size() > 0 )  
+  {
+    if ( lIsClosed )
+    {
+      if(poly.back() != poly.front()){
+        poly.push_back(poly.front());
+      }
+      m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+    }
+    else
+    {
+      m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+    }
+  }
+      
+  Q_EMIT( changed());
+  
+  actionRecenter->trigger();
+}
+
+void MainWindow::loadOSM(QString fileName)
+{
+  m_pct.clear();
+  mGI->modelChanged();
+
+  try
+  {
+    std::ifstream ifs(qPrintable(fileName));
+    
+    std::string line ;
+    
+    std::vector<Point_2> poly ;
+    
+    while ( std::getline(ifs,line) )
+    {
+      line = trim_right(line);
+      
+      if ( line.size() > 0 )
+      {
+        if ( line.find(':') != std::string::npos )
+        {
+          if ( poly.size() > 0 )  
+          {
+            if ( poly.front() == poly.back() && poly.size() >= 4 )
+            {
+              if ( is_simple_2(poly.begin(), poly.end() - 1) )
+                m_pct.insert_constraint(poly.begin(), poly.end() - 1 ) ;
+            }
+            else if ( poly.size() >= 2 )
+            {
+              if ( is_simple_2(poly.begin(), poly.end()) )
+                m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+            }
+          }
+          poly.clear();
+        }
+        else
+        {
+          double x,y ;
+          
+          std::string::size_type pos = line.find(',');
+          if ( pos != std::string::npos )
+            line[pos]= ' ' ;
+          
+          std::istringstream ss(line);
+          
+          ss >> x >> y ;
+          
+          poly.push_back( Point_2(x,y) );
+        }
+      }
+    }
+    
+    if ( poly.size() > 0 )  
+    {
+      if ( poly.front() == poly.back() )
+      {
+        m_pct.insert_constraint(poly.begin(), poly.end() - 1 ) ;
+      }
+      else
+      {
+        m_pct.insert_constraint(poly.begin(), poly.end() ) ;
+      }
+    }
+  }  
+  catch(...) 
+  {
+    statusBar()->showMessage(QString("Exception ocurred"));
+  }
+  
+  Q_EMIT( changed());
+  
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(mGI->boundingRect());
+  this->graphicsView->fitInView(mGI->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+#include "Polyline_simplification_2.moc"
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Polyline_simplification_2 demo");
+
+  // Import resources from libCGALQt5.
+  CGAL_QT_INIT_RESOURCES;
+	
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.qrc b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.ui b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/Polyline_simplification_2.ui
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/Polyline_simplification_2.ui
diff --git a/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/about_Polyline_simplification_2.html b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/about_Polyline_simplification_2.html
new file mode 100644
index 0000000..84243e9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/about_Polyline_simplification_2.html
@@ -0,0 +1,10 @@
+<html>
+  <body>
+    <h2>Polyline Simplification</h2>
+    <p>Copyright © 2014 GeometryFactory</p>
+    <p>This application illustrates the 2D polyline simplification
+      of <a href="http://www.cgal.org/">CGAL</a>.</p>
+    <p>See also <a href="http://www.cgal.org/Pkg/PolylineSimplification2">the online
+        manual</a>.</p>
+  </body>
+</html>
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/all_crossed.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/all_crossed.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/all_crossed.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/all_crossed.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/bee.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/bee.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/bee.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/bee.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_G.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_G.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_G.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_G.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_P.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_P.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_P.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_P.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_T.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_T.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_T.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_T.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_c.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_c.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_c.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_c.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_d.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_d.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_d.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_d.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_q.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_q.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_q.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_q.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_u.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_u.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letter_u.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letter_u.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letters_cd.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letters_cd.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/letters_cd.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/letters_cd.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_1.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_1.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_1.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_1.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_2.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_2.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_2.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_2.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_3.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_3.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/map_3.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/map_3.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/maps.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/maps.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/maps.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/maps.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/norway.poly b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/norway.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/data/norway.poly
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/data/norway.poly
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/icons/triangulation.pdf b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/icons/triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/icons/triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/icons/triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/icons/triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/include/CGAL/Qt/Polyline_simplification_2_graphics_item.h b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/include/CGAL/Qt/Polyline_simplification_2_graphics_item.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/include/CGAL/Qt/Polyline_simplification_2_graphics_item.h
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/include/CGAL/Qt/Polyline_simplification_2_graphics_item.h
diff --git a/3rdparty/CGAL-4.6/demo/Polyline_simplification_2/include/CGAL/Qt/TriangulationArrangementGraphicsItem.h b/3rdparty/CGAL-4.8/demo/Polyline_simplification_2/include/CGAL/Qt/TriangulationArrangementGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyline_simplification_2/include/CGAL/Qt/TriangulationArrangementGraphicsItem.h
rename to 3rdparty/CGAL-4.8/demo/Polyline_simplification_2/include/CGAL/Qt/TriangulationArrangementGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/demo/Principal_component_analysis/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/CMakeLists.txt
new file mode 100644
index 0000000..60863f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/CMakeLists.txt
@@ -0,0 +1,87 @@
+# This is the CMake script for compiling the PCA demo.
+
+project( PCA_demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+foreach(INCDIR ../../include ../../../STL_Extension/include ../../../GraphicsView/include ../../../filtered_kernel/include )
+  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}")
+    include_directories (BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}")
+  endif()
+endforeach()
+
+include_directories( ./ )
+
+# Find CGAL and CGAL Qt5
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+
+# Find Qt5 itself
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL)
+
+# Find OpenGL
+find_package(OpenGL)
+
+# Find QGLViewer
+if(Qt5_FOUND)
+  find_package(QGLViewer )
+endif(Qt5_FOUND)
+
+if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
+
+  qt5_wrap_ui( UI_FILES MainWindow.ui )
+
+  include(AddFileDependencies)
+
+  qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" )
+  add_file_dependencies( MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h" )
+
+  qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
+  add_file_dependencies( Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h" )
+
+  qt5_add_resources ( RESOURCE_FILES PCA_demo.qrc )
+
+    add_file_dependencies( PCA_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
+                                         "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" )
+    add_executable  ( PCA_demo PCA_demo.cpp ${UI_FILES} ${RESOURCE_FILES} )
+    qt5_use_modules( PCA_demo Xml Script OpenGL)
+  # Link with Qt libraries
+  target_link_libraries( PCA_demo ${QT_LIBRARIES} )
+
+  # Link with CGAL
+  target_link_libraries( PCA_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+  # Link with libQGLViewer, OpenGL
+  target_link_libraries( PCA_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS PCA_demo )
+
+
+else (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
+
+  set(PCA_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(PCA_MISSING_DEPS "the CGAL Qt5 library, ${PCA_MISSING_DEPS}")
+  endif()
+
+  if(NOT Qt5_FOUND)
+    set(PCA_MISSING_DEPS "Qt5, ${PCA_MISSING_DEPS}")
+  endif()
+
+  if(NOT OPENGL_FOUND)
+    set(PCA_MISSING_DEPS "OpenGL, ${PCA_MISSING_DEPS}")
+  endif()
+
+  if(NOT QGLVIEWER_FOUND)
+    set(PCA_MISSING_DEPS "QGLViewer, ${PCA_MISSING_DEPS}")
+  endif()
+
+  message(STATUS "NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled.")
+
+endif (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
diff --git a/3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.cpp
new file mode 100644
index 0000000..16fc1b8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.cpp
@@ -0,0 +1,211 @@
+#include "MainWindow.h"
+#include "Scene.h"
+#include <CGAL/Qt/debug.h>
+
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QTextStream>
+#include <QUrl>
+#include <QFileDialog>
+#include <QSettings>
+#include <QHeaderView>
+#include <QClipboard>
+
+#include "ui_MainWindow.h"
+
+#include <QMimeData> 
+
+
+MainWindow::MainWindow(QWidget* parent)
+: CGAL::Qt::DemosMainWindow(parent)
+{
+	ui = new Ui::MainWindow;
+	ui->setupUi(this);
+
+	// saves some pointers from ui, for latter use.
+	m_pViewer = ui->viewer;
+
+	// does not save the state of the viewer 
+	m_pViewer->setStateFileName(QString::null);
+
+	// accepts drop events
+	setAcceptDrops(true);
+
+	// setups scene
+	m_pScene = new Scene;
+	m_pViewer->setScene(m_pScene);
+
+	// connects actionQuit (Ctrl+Q) and qApp->quit()
+	connect(ui->actionQuit, SIGNAL(triggered()),
+		this, SLOT(quit()));
+
+	this->addRecentFiles(ui->menuFile, ui->actionQuit);
+	connect(this, SIGNAL(openRecentFile(QString)),
+		this, SLOT(open(QString)));
+
+	readSettings();
+}
+
+MainWindow::~MainWindow()
+{
+	delete ui;
+}
+
+void MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+	if (event->mimeData()->hasFormat("text/uri-list"))
+		event->acceptProposedAction();
+}
+
+void MainWindow::dropEvent(QDropEvent *event)
+{
+	Q_FOREACH(QUrl url, event->mimeData()->urls()) {
+		QString filename = url.toLocalFile();
+		if(!filename.isEmpty()) {
+			QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
+			open(filename);
+		}
+	}
+	event->acceptProposedAction();
+}
+
+void MainWindow::updateViewerBBox()
+{
+	m_pScene->update_bbox();
+	const Scene::Bbox bbox = m_pScene->bbox();
+	const double xmin = bbox.xmin();
+	const double ymin = bbox.ymin();
+	const double zmin = bbox.zmin();
+	const double xmax = bbox.xmax();
+	const double ymax = bbox.ymax();
+	const double zmax = bbox.zmax();
+	qglviewer::Vec 
+		vec_min(xmin, ymin, zmin),
+		vec_max(xmax, ymax, zmax);
+	m_pViewer->setSceneBoundingBox(vec_min,vec_max);
+	m_pViewer->camera()->showEntireScene();
+}
+
+void MainWindow::on_actionView_polyhedron_triggered()
+{
+	m_pScene->toggle_view_poyhedron();
+  m_pViewer->update();
+}
+
+void MainWindow::on_actionRefine_loop_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+	m_pScene->refine_loop();
+	QApplication::restoreOverrideCursor();
+  m_pViewer->update();
+}
+
+
+void MainWindow::open(QString filename)
+{
+	QFileInfo fileinfo(filename);
+	if(fileinfo.isFile() && fileinfo.isReadable())
+	{
+		int index = m_pScene->open(filename);
+		if(index >= 0)
+		{
+			QSettings settings;
+			settings.setValue("OFF open directory",
+				fileinfo.absoluteDir().absolutePath());
+			this->addToRecentFiles(filename);
+
+			// update bbox
+			updateViewerBBox();
+      m_pViewer->update();
+		}
+	}
+}
+
+void MainWindow::readSettings()
+{
+	this->readState("MainWindow", Size|State);
+}
+
+void MainWindow::writeSettings()
+{
+	this->writeState("MainWindow");
+	std::cerr << "Write setting... done.\n";
+}
+
+void MainWindow::quit()
+{
+	writeSettings();
+	close();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+	writeSettings();
+	event->accept();
+}
+
+void MainWindow::on_actionLoadPolyhedron_triggered()
+{
+	QSettings settings;
+	QString directory = settings.value("OFF open directory",
+		QDir::current().dirName()).toString();
+	QStringList filenames = 
+		QFileDialog::getOpenFileNames(this,
+		tr("Load polyhedron..."),
+		directory,
+		tr("OFF files (*.off)\n"
+		"All files (*)"));
+	if(!filenames.isEmpty()) {
+		Q_FOREACH(QString filename, filenames) {
+			open(filename);
+		}
+	}
+}
+
+
+void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
+{
+	m_pViewer->setAddKeyFrameKeyboardModifiers(m);
+}
+
+void MainWindow::on_actionSave_snapshot_triggered()
+{
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_pViewer->saveSnapshot(QString("snapshot.png"));
+	QApplication::restoreOverrideCursor();
+}
+void MainWindow::on_actionCopy_snapshot_triggered()
+{
+  // copy snapshot to clipboard
+	QApplication::setOverrideCursor(Qt::WaitCursor);
+  QClipboard *qb = QApplication::clipboard();
+  m_pViewer->makeCurrent();
+  m_pViewer->raise();
+  QImage snapshot = m_pViewer->grabFrameBuffer(true);
+  qb->setImage(snapshot);
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionFit_triangles_triggered()
+{
+ 	QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_pScene->fit_triangles();
+  m_pViewer->update();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionFit_edges_triggered()
+{
+ 	QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_pScene->fit_edges();
+  m_pViewer->update();
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::on_actionFit_vertices_triggered()
+{
+ 	QApplication::setOverrideCursor(Qt::WaitCursor);
+  m_pScene->fit_vertices();
+  m_pViewer->update();
+	QApplication::restoreOverrideCursor();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.h b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.h
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.h
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/MainWindow.ui
diff --git a/3rdparty/CGAL-4.8/demo/Principal_component_analysis/PCA_demo.cpp b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/PCA_demo.cpp
new file mode 100644
index 0000000..eac8974
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/PCA_demo.cpp
@@ -0,0 +1,64 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Pierre Alliez
+//
+//******************************************************************************
+// File Description : demo of PCA component on polyhedron surface primitives
+//
+//******************************************************************************
+
+#include "MainWindow.h"
+#include <QApplication>
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+  app.setOrganizationDomain("inria.fr");
+  app.setOrganizationName("INRIA");
+  app.setApplicationName("PCA demo");
+
+  // Import resources from libCGALQt.
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  QStringList args = app.arguments();
+  args.removeAt(0);
+
+  if(!args.empty() && args[0] == "--use-meta")
+  {
+    mainWindow.setAddKeyFrameKeyboardModifiers(::Qt::MetaModifier);
+    args.removeAt(0);
+  }
+
+  Q_FOREACH(QString filename, args)
+    mainWindow.open(filename);
+
+  return app.exec();
+}
+
+#  include "Scene.cpp"
+#  include "Viewer.cpp"
+#  include "Viewer_moc.cpp"
+#  include "MainWindow.cpp"
+#  include "MainWindow_moc.cpp"
+
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/PCA_demo.qrc b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/PCA_demo.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/PCA_demo.qrc
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/PCA_demo.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Scene.cpp b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Scene.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/Scene.cpp
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/Scene.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Scene.h b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Scene.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/Scene.h
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/Scene.h
diff --git a/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Viewer.cpp
new file mode 100644
index 0000000..4b74ad3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Viewer.cpp
@@ -0,0 +1,30 @@
+#include "Viewer.h"
+#include "Scene.h"
+
+Viewer::Viewer(QWidget* parent)
+  : QGLViewer(parent),
+    m_pScene(NULL)
+{
+}
+
+void Viewer::setScene(Scene* pScene)
+{
+  this->m_pScene = pScene;
+}
+
+void Viewer::draw()
+{
+  QGLViewer::draw();
+  if(m_pScene != NULL)
+  {
+	::glClearColor(1.0f,1.0f,1.0f,0.0f);
+	m_pScene->draw();
+  }
+}
+
+void Viewer::initializeGL()
+{
+  QGLViewer::initializeGL();
+  setBackgroundColor(::Qt::white);
+}
+
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/Viewer.h b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/Viewer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/Viewer.h
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/Viewer.h
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/cylinder.off b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/cylinder.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/cylinder.off
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/cylinder.off
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/cylinder_locally_refined.off b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/cylinder_locally_refined.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/cylinder_locally_refined.off
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/cylinder_locally_refined.off
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/ellipsoid.off b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/ellipsoid.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/data/ellipsoid.off
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/data/ellipsoid.off
diff --git a/3rdparty/CGAL-4.6/demo/AABB_tree/render_edges.h b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/render_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/AABB_tree/render_edges.h
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/render_edges.h
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/resources/about.html b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/resources/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/resources/about.html
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/resources/about.html
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/resources/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/resources/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/resources/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/resources/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Principal_component_analysis/types.h b/3rdparty/CGAL-4.8/demo/Principal_component_analysis/types.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Principal_component_analysis/types.h
rename to 3rdparty/CGAL-4.8/demo/Principal_component_analysis/types.h
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/CMakeLists.txt
new file mode 100644
index 0000000..0377456
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/CMakeLists.txt
@@ -0,0 +1,59 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Segment_voronoi_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5 Core)
+
+include(${CGAL_USE_FILE})
+
+set( QT_USE_QTXML    TRUE )
+set( QT_USE_QTMAIN   TRUE )
+set( QT_USE_QTSCRIPT  TRUE )
+set( QT_USE_QTOPENGL  TRUE )
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# The "Segment Voronoi" demo: Segment_voronoi_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_2.moc" )
+
+# The executable itself.
+add_executable  ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
+
+qt5_use_modules(Segment_voronoi_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_2 )
+
+# Link with Qt libraries
+target_link_libraries( Segment_voronoi_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp
new file mode 100644
index 0000000..6c3489d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.cpp
@@ -0,0 +1,354 @@
+//#define CGAL_USE_BOOST_BIMAP
+
+#include <fstream>
+#include <vector>
+
+// CGAL headers
+
+#include "svd-typedefs.h"
+
+#include <CGAL/Timer.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QMessageBox>
+#include <QGraphicsLineItem>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h>
+#include <CGAL/Constraints_loader.h>
+//#include <CGAL/Qt/Converter.h>
+
+// the two base classes
+#include "ui_Segment_voronoi_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+// for viewportsBbox(QGraphicsScene*)
+#include <CGAL/Qt/utility.h>
+
+typedef Rep K;
+typedef SDG_2 SVD;
+
+typedef SVD::Vertex_handle Vertex_handle;
+
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Segment_voronoi_2
+{
+  Q_OBJECT
+  
+private:  
+  SVD svd; 
+  QGraphicsScene scene;
+  std::list<Point_2> seeds;
+
+  CGAL::Qt::SegmentDelaunayGraphGraphicsItem<SVD> * sdggi;
+
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+public:
+  MainWindow();
+
+private:
+  template <typename Iterator> 
+  void insert_polyline(Iterator b, Iterator e)
+  {
+    Point_2 p, q;
+    SVD::Vertex_handle vh, wh;
+    Iterator it = b;
+    vh = svd.insert(*it);
+    p = *it;
+    ++it;
+    for(; it != e; ++it){
+      q = *it;
+      if(p != q){
+        wh = svd.insert(*it);
+        svd.insert(vh,wh);
+        vh = wh;
+        p = q;
+      } else {
+        std::cout << "duplicate point: " << p << std::endl; 
+      }
+    }
+    Q_EMIT( changed());
+  }
+
+protected Q_SLOTS:
+ virtual void open(QString);
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionInsertPolyline_toggled(bool checked);
+  
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionLoadSegments_triggered();
+
+  void loadPolygonConstraints(QString);
+
+  void loadEdgConstraints(QString);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the SVD triangulation
+  sdggi = new CGAL::Qt::SegmentDelaunayGraphGraphicsItem<SVD>(&svd);
+  QColor segmentColor(::Qt::blue);
+  QColor voronoiColor(::Qt::black);
+  segmentColor.setAlpha(150);
+  sdggi->setSegmentPen(QPen(segmentColor,0));
+  sdggi->setVoronoiPen(QPen(voronoiColor,0));
+    
+  QObject::connect(this, SIGNAL(changed()),
+		   sdggi, SLOT(modelChanged()));
+
+  sdggi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+
+  sdggi->setZValue(-1);
+  scene.addItem(sdggi);
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true); // inputs polylines which are not closed
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+    
+
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPolyline);
+
+  // Check two actions 
+  this->actionInsertPolyline->setChecked(true);
+  this->actionShowVoronoi->setChecked(true);
+  this->actionShowConstraints->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Segment_voronoi_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o)){
+    if(points.size() == 1) {
+      svd.insert(points.front());
+    }
+    else {
+      /*
+      std::cout.precision(12);
+      std::cout << points.size() << std::endl;
+      for( std::list<Point_2>::iterator it =  points.begin(); it != points.end(); ++it){
+	std::cout << *it << std::endl;
+      }
+      */
+      insert_polyline(points.begin(), points.end());
+    }
+  }
+
+
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPolyline_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+  } else {
+    scene.removeEventFilter(pi);
+  }
+}
+
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  svd.clear();
+  Q_EMIT( changed());
+}
+
+
+void 
+MainWindow::open(QString fileName)
+{
+  if(! fileName.isEmpty()){
+    if(fileName.endsWith(".plg")){
+      loadPolygonConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".edg")){
+      loadEdgConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    }
+  }
+}
+
+void
+MainWindow::on_actionLoadSegments_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Constraint File"),
+						  ".",
+						  tr("Edge files (*.edg)\n"
+						     "Poly files (*.plg)"));
+  open(fileName);
+}
+
+void
+MainWindow::loadPolygonConstraints(QString fileName)
+{
+  K::Point_2 p,q, first;
+  SVD::Vertex_handle vp, vq, vfirst;
+  std::ifstream ifs(qPrintable(fileName));
+  int n;
+  while(ifs >> n){
+    ifs >> first;
+    p = first;
+    vfirst = vp = svd.insert(p);
+    n--;
+    while(n--){
+      ifs >> q;
+      vq = svd.insert(q, vp);
+      svd.insert(vp,vq);
+      p = q;
+      vp = vq;
+    }
+    svd.insert(vp, vfirst);
+  }
+  
+  
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+
+void
+MainWindow::loadEdgConstraints(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Timer tim;
+  tim.start();
+  std::ifstream ifs(qPrintable(fileName));
+  bool first=true;
+  int n;
+  ifs >> n;
+  
+  K::Point_2 p,q, qold(0,0); // Initialize qold, as otherwise some g++ issue a unjustified warning
+
+  SVD::Vertex_handle vp, vq, vqold;
+  while(ifs >> p) {
+    ifs >> q;
+    if(p == q){
+      continue;
+    }
+    if((!first) && (p == qold)){
+      vp = vqold;
+    } else {
+      vp = svd.insert(p);
+    }
+    vq = svd.insert(q, vp);
+    svd.insert(vp,vq);
+    qold = q;
+    vqold = vq;
+    first = false;
+  }
+
+
+  tim.stop();
+  statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(sdggi->boundingRect());
+  this->graphicsView->fitInView(sdggi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+#include "Segment_voronoi_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Segment Voronoi 2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc
copy to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui
new file mode 100644
index 0000000..f360aa5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.ui
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>GeometryFactory</author>
+ <class>Segment_voronoi_2</class>
+ <widget class="QMainWindow" name="Segment_voronoi_2">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Segment Voronoi Diagram</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/CGAL.qrc">
+    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <item row="0" column="0">
+     <widget class="QGraphicsView" name="graphicsView">
+      <property name="focusPolicy">
+       <enum>Qt::StrongFocus</enum>
+      </property>
+      <property name="verticalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="transformationAnchor">
+       <enum>QGraphicsView::NoAnchor</enum>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="fileToolBar">
+   <property name="windowTitle">
+    <string>File Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionClear"/>
+   <addaction name="actionLoadSegments"/>
+   <addaction name="actionSaveSegments"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>Visualization Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionInsertPolyline"/>
+   <addaction name="separator"/>
+   <addaction name="actionShowVoronoi"/>
+   <addaction name="separator"/>
+   <addaction name="actionRecenter"/>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>26</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="separator"/>
+    <addaction name="actionClear"/>
+    <addaction name="actionLoadSegments"/>
+    <addaction name="actionSaveSegments"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>&Tools</string>
+    </property>
+    <addaction name="actionInsertPolyline"/>
+    <addaction name="separator"/>
+    <addaction name="actionShowVoronoi"/>
+    <addaction name="separator"/>
+    <addaction name="actionRecenter"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuTools"/>
+  </widget>
+  <action name="actionAbout">
+   <property name="text">
+    <string>&About</string>
+   </property>
+  </action>
+  <action name="actionAboutCGAL">
+   <property name="text">
+    <string>About &CGAL</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionInsertPolyline">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/inputPolyline.png</normaloff>:/cgal/Input/inputPolyline.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Insert Polyline</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert Point or Polyline</string>
+   </property>
+   <property name="statusTip">
+    <string>Left: Insert vtx | Right: Final vtx | Del: Delete vtx</string>
+   </property>
+  </action>
+  <action name="actionClear">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileNew.png</normaloff>:/cgal/fileToolbar/fileNew.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Clear</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionShowVoronoi">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Triangulation_2.qrc">
+     <normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &Voronoi Diagram</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+V</string>
+   </property>
+   <property name="visible">
+    <bool>false</bool>
+   </property>
+  </action>
+  <action name="actionLoadSegments">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileOpen.png</normaloff>:/cgal/fileToolbar/fileOpen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Load...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+L</string>
+   </property>
+  </action>
+  <action name="actionSaveSegments">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileSave.png</normaloff>:/cgal/fileToolbar/fileSave.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Save...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionRecenter">
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/zoom-best-fit</normaloff>:/cgal/Input/zoom-best-fit</iconset>
+   </property>
+   <property name="text">
+    <string>Re&center the viewport</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
+  </action>
+  <action name="actionShowConstraints">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Segment_voronoi_2.qrc">
+     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &constraints</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="Segment_voronoi_2.qrc"/>
+  <include location="../icons/File.qrc"/>
+  <include location="../resources/CGAL.qrc"/>
+  <include location="../icons/Triangulation_2.qrc"/>
+  <include location="../icons/Input.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html
new file mode 100644
index 0000000..bfee885
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/about_Segment_voronoi_2.html
@@ -0,0 +1,10 @@
+<html>
+  <body>
+    <h2>2D Segment Voronoi Diagram</h2>
+    <p>Copyright © 2008 GeometryFactory</p>
+    <p>This application illustrates the 2D segment Voronoi diagram
+      of <a href="http://www.cgal.org/">CGAL</a>.</p>
+    <p>See also <a href="http://www.cgal.org/Pkg/SegmentDelaunayGraph2">the online
+        manual</a>.</p>
+  </body>
+</html>
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/circumcenter.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/circumcenter.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/circumcenter.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/circumcenter.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/circumcenter.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/circumcenter.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/circumcenter.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/circumcenter.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/conflict_zone.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/conflict_zone.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/conflict_zone.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/conflict_zone.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/conflict_zone.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/conflict_zone.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/conflict_zone.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/conflict_zone.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_constraints.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/constrained_triangulation_show_in_domain.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/moving_point.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/moving_point.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/moving_point.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/moving_point.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/moving_point.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/moving_point.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/moving_point.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/moving_point.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/triangulation.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/icons/triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h
copy to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/svd-typedefs.h b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/svd-typedefs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/svd-typedefs.h
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_2/svd-typedefs.h
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt
new file mode 100644
index 0000000..dd00fe2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt
@@ -0,0 +1,59 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Segment_voronoi_linf_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5 Core)
+
+include(${CGAL_USE_FILE})
+
+set( QT_USE_QTXML    TRUE )
+set( QT_USE_QTMAIN   TRUE )
+set( QT_USE_QTSCRIPT  TRUE )
+set( QT_USE_QTOPENGL  TRUE )
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# The "Segment Voronoi Linf" demo: Segment_voronoi_linf_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Segment_voronoi_linf_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_linf_2.moc" )
+
+# The executable itself.
+add_executable  ( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp Segment_voronoi_linf_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
+
+qt5_use_modules(Segment_voronoi_linf_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_linf_2 )
+
+# Link with Qt libraries
+target_link_libraries( Segment_voronoi_linf_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Segment_voronoi_linf_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/Segment_voronoi_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.ui b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.ui
new file mode 100644
index 0000000..f360aa5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.ui
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>GeometryFactory</author>
+ <class>Segment_voronoi_2</class>
+ <widget class="QMainWindow" name="Segment_voronoi_2">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Segment Voronoi Diagram</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/CGAL.qrc">
+    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <item row="0" column="0">
+     <widget class="QGraphicsView" name="graphicsView">
+      <property name="focusPolicy">
+       <enum>Qt::StrongFocus</enum>
+      </property>
+      <property name="verticalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="transformationAnchor">
+       <enum>QGraphicsView::NoAnchor</enum>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="fileToolBar">
+   <property name="windowTitle">
+    <string>File Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionClear"/>
+   <addaction name="actionLoadSegments"/>
+   <addaction name="actionSaveSegments"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>Visualization Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionInsertPolyline"/>
+   <addaction name="separator"/>
+   <addaction name="actionShowVoronoi"/>
+   <addaction name="separator"/>
+   <addaction name="actionRecenter"/>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>26</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="separator"/>
+    <addaction name="actionClear"/>
+    <addaction name="actionLoadSegments"/>
+    <addaction name="actionSaveSegments"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>&Tools</string>
+    </property>
+    <addaction name="actionInsertPolyline"/>
+    <addaction name="separator"/>
+    <addaction name="actionShowVoronoi"/>
+    <addaction name="separator"/>
+    <addaction name="actionRecenter"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuTools"/>
+  </widget>
+  <action name="actionAbout">
+   <property name="text">
+    <string>&About</string>
+   </property>
+  </action>
+  <action name="actionAboutCGAL">
+   <property name="text">
+    <string>About &CGAL</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionInsertPolyline">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/inputPolyline.png</normaloff>:/cgal/Input/inputPolyline.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Insert Polyline</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert Point or Polyline</string>
+   </property>
+   <property name="statusTip">
+    <string>Left: Insert vtx | Right: Final vtx | Del: Delete vtx</string>
+   </property>
+  </action>
+  <action name="actionClear">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileNew.png</normaloff>:/cgal/fileToolbar/fileNew.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Clear</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionShowVoronoi">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Triangulation_2.qrc">
+     <normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &Voronoi Diagram</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+V</string>
+   </property>
+   <property name="visible">
+    <bool>false</bool>
+   </property>
+  </action>
+  <action name="actionLoadSegments">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileOpen.png</normaloff>:/cgal/fileToolbar/fileOpen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Load...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+L</string>
+   </property>
+  </action>
+  <action name="actionSaveSegments">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileSave.png</normaloff>:/cgal/fileToolbar/fileSave.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Save...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionRecenter">
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/zoom-best-fit</normaloff>:/cgal/Input/zoom-best-fit</iconset>
+   </property>
+   <property name="text">
+    <string>Re&center the viewport</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
+  </action>
+  <action name="actionShowConstraints">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Segment_voronoi_2.qrc">
+     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &constraints</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="Segment_voronoi_2.qrc"/>
+  <include location="../icons/File.qrc"/>
+  <include location="../resources/CGAL.qrc"/>
+  <include location="../icons/Triangulation_2.qrc"/>
+  <include location="../icons/Input.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_linf_2.cpp b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_linf_2.cpp
new file mode 100644
index 0000000..de7f04b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_linf_2.cpp
@@ -0,0 +1,445 @@
+//#define CGAL_USE_BOOST_BIMAP
+
+#include <fstream>
+#include <vector>
+
+// CGAL headers
+
+#include "svd-typedefs.h"
+
+#include <CGAL/Timer.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QMessageBox>
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h>
+#include <CGAL/Constraints_loader.h>
+//#include <CGAL/Qt/Converter.h>
+
+// the two base classes
+#include "ui_Segment_voronoi_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+// for viewportsBbox(QGraphicsScene*)
+#include <CGAL/Qt/utility.h>
+
+typedef Rep K;
+typedef SDG_2 SVD;
+
+typedef SVD::Vertex_handle Vertex_handle;
+
+// global variables
+bool has_file_argument;
+QString file_to_open;
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Segment_voronoi_2
+{
+  Q_OBJECT
+  
+private:  
+  SVD svd; 
+  QGraphicsScene scene;
+  std::list<Point_2> seeds;
+
+  CGAL::Qt::SegmentDelaunayGraphLinfGraphicsItem<SVD> * sdggi;
+
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+public:
+  MainWindow();
+
+private:
+  template <typename Iterator> 
+  void insert_polyline(Iterator b, Iterator e)
+  {
+    Point_2 p, q;
+    SVD::Vertex_handle vh, wh;
+    Iterator it = b;
+    vh = svd.insert(*it);
+    p = *it;
+    ++it;
+    for(; it != e; ++it){
+      q = *it;
+      if(p != q){
+        wh = svd.insert(*it);
+        svd.insert(vh,wh);
+        std::cout << "s " << p << " " << q << std::endl;
+        vh = wh;
+        p = q;
+      } else {
+        std::cout << "duplicate point: " << p << std::endl;
+      }
+    }
+    Q_EMIT( changed());
+  }
+
+protected Q_SLOTS:
+ virtual void open(QString);
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionInsertPolyline_toggled(bool checked);
+  
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionLoadSegments_triggered();
+
+  void loadPolygonConstraints(QString);
+
+  void loadEdgConstraints(QString);
+
+  void loadPoints(QString);
+
+  void loadPointsInput(QString);
+  
+  void loadSitesInput(QString);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the SVD triangulation
+  sdggi = new CGAL::Qt::SegmentDelaunayGraphLinfGraphicsItem<SVD>(&svd);
+  QColor segmentColor(::Qt::blue);
+  QColor voronoiColor(::Qt::black);
+  segmentColor.setAlpha(150);
+  sdggi->setSegmentPen(QPen(segmentColor,0));
+  sdggi->setVoronoiPen(QPen(voronoiColor,0));
+    
+  QObject::connect(this, SIGNAL(changed()),
+		   sdggi, SLOT(modelChanged()));
+
+  sdggi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+
+  sdggi->setZValue(-1);
+  scene.addItem(sdggi);
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true); // inputs polylines which are not closed
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+    
+
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPolyline);
+
+  // Check two actions 
+  this->actionInsertPolyline->setChecked(true);
+  this->actionShowVoronoi->setChecked(true);
+  this->actionShowConstraints->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Segment_voronoi_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+
+  if (has_file_argument) {
+    open(file_to_open);
+    statusBar()->showMessage(file_to_open, 0);
+  }
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o)){
+    if(points.size() == 1) {
+      svd.insert(points.front());
+      std::cout << "p " << points.front() << std::endl;
+    }
+    else {
+      /*
+      std::cout.precision(12);
+      std::cout << points.size() << std::endl;
+      for( std::list<Point_2>::iterator it =  points.begin(); it != points.end(); ++it){
+	std::cout << *it << std::endl;
+      }
+      */
+      insert_polyline(points.begin(), points.end());
+    }
+  }
+
+
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.trolltech.com/4.4/designer-using-a-component.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPolyline_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+  } else {
+    scene.removeEventFilter(pi);
+  }
+}
+
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  svd.clear();
+  Q_EMIT( changed());
+}
+
+
+void 
+MainWindow::open(QString fileName)
+{
+  if(! fileName.isEmpty()){
+    if(fileName.endsWith(".plg")){
+      loadPolygonConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".edg")){
+      loadEdgConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".pts")){
+      loadPoints(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".pin")){
+      loadPointsInput(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".cin")){
+      loadSitesInput(fileName);
+      this->addToRecentFiles(fileName);
+    }    
+  }
+}
+
+void
+MainWindow::on_actionLoadSegments_triggered()
+{
+  QString fileName = 
+    QFileDialog::getOpenFileName(this,
+                                 tr("Open Constraint File"),
+                                 ".",
+                                 tr(
+                                    "Cin  files (*.cin)\n"
+                                    "Pin  files (*.pin)\n" 
+                                    "Pts  files (*.pts)\n"
+                                    "Edge files (*.edg)\n"
+                                    "Poly files (*.plg)"
+                                                          ));
+  open(fileName);
+}
+
+void
+MainWindow::loadPolygonConstraints(QString fileName)
+{
+  K::Point_2 p,q, first;
+  SVD::Vertex_handle vp, vq, vfirst;
+  std::ifstream ifs(qPrintable(fileName));
+  int n;
+  while(ifs >> n){
+    CGAL_assertion( n > 0 );
+    ifs >> first;
+    p = first;
+    vfirst = vp = svd.insert(p);
+    n--;
+    while(n--){
+      ifs >> q;
+      vq = svd.insert(q, vp);
+      svd.insert(vp,vq);
+      p = q;
+      vp = vq;
+    }
+    if (vfirst != vp) {
+      svd.insert(vp, vfirst);
+    }
+  }
+  
+  
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+
+void
+MainWindow::loadEdgConstraints(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Timer tim;
+  tim.start();
+  std::ifstream ifs(qPrintable(fileName));
+  bool first=true;
+  int n;
+  ifs >> n;
+  
+  K::Point_2 p,q, qold(0,0); // Initialize qold, as otherwise some g++ issue a unjustified warning
+
+  SVD::Vertex_handle vp, vq, vqold;
+  while(ifs >> p) {
+    ifs >> q;
+    if(p == q){
+      continue;
+    }
+    if((!first) && (p == qold)){
+      vp = vqold;
+    } else {
+      vp = svd.insert(p);
+    }
+    vq = svd.insert(q, vp);
+    svd.insert(vp,vq);
+    qold = q;
+    vqold = vq;
+    first = false;
+  }
+
+
+  tim.stop();
+  statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::loadPoints(QString fileName)
+{
+  K::Point_2 p;
+  std::ifstream ifs(qPrintable(fileName));
+  int n;
+  while(ifs >> n){
+    while(n--){
+      ifs >> p;
+      svd.insert(p);
+    }
+  }
+  
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::loadPointsInput(QString fileName)
+{
+  K::Point_2 p;
+  std::ifstream ifs(qPrintable(fileName));
+  while (ifs >> p) {
+    svd.insert(p);
+  }
+  
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::loadSitesInput(QString fileName)
+{
+  K::Point_2 p(0, 0);
+  SVD::Site_2 site = SVD::Site_2::construct_site_2(p);
+  std::ifstream ifs(qPrintable(fileName));
+  while (ifs >> site) {
+    svd.insert(site);
+
+    CGAL_SDG_DEBUG( svd.file_output_verbose(std::cout); ) ;
+  }
+  
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(sdggi->boundingRect());
+  this->graphicsView->fitInView(sdggi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Segment_voronoi_linf_2.moc"
+#include <CGAL/Qt/resources.h>
+
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Segment Voronoi 2 demo");
+
+  // Import resources from libCGAL (Qt5)
+  CGAL_QT_INIT_RESOURCES;
+
+  if (argc == 2) {
+    has_file_argument = true;
+    file_to_open = argv[1];
+  } else {
+    has_file_argument = false;
+  }
+
+  MainWindow mainWindow;
+  mainWindow.show();
+
+
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/about_Segment_voronoi_2.html b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/about_Segment_voronoi_2.html
new file mode 100644
index 0000000..8bffc1e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/about_Segment_voronoi_2.html
@@ -0,0 +1,10 @@
+<html>
+  <body>
+    <h2>L Infinity Segment Delaunay Graphs</h2>
+    <p>Copyright © 2015 GeometryFactory</p>
+    <p>This application illustrates the 2D L infinity segment Delaunay graph.
+      of <a href="http://www.cgal.org/">CGAL</a>.</p>
+    <p>See also <a href="http://www.cgal.org/Pkg/SDGLinf">the online
+        manual</a>.</p>
+  </body>
+</html>
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/circumcenter.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/circumcenter.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/circumcenter.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/circumcenter.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/circumcenter.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/circumcenter.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/circumcenter.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/circumcenter.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/conflict_zone.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/conflict_zone.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/conflict_zone.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/conflict_zone.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/conflict_zone.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/conflict_zone.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/conflict_zone.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/conflict_zone.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_constraints.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_constraints.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_constraints.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_constraints.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_in_domain.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_in_domain.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_in_domain.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/constrained_triangulation_show_in_domain.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/moving_point.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/moving_point.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/moving_point.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/moving_point.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/moving_point.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/moving_point.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/moving_point.png
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/moving_point.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/icons/triangulation.pdf b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/icons/triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/triangulation.png
similarity index 100%
copy from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png
copy to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h
rename to 3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h
diff --git a/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/svd-typedefs.h b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/svd-typedefs.h
new file mode 100644
index 0000000..04bd263
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Segment_Delaunay_graph_Linf_2/svd-typedefs.h
@@ -0,0 +1,56 @@
+#ifndef SVD_TYPEDEFS_H
+#define SVD_TYPEDEFS_H
+
+#include <CGAL/basic.h>
+
+#define USE_FILTERED_TRAITS
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polygon_2.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+
+#ifdef CGAL_USE_CORE
+#  include <CGAL/CORE_Expr.h>
+#endif
+
+#if defined(USE_FILTERED_TRAITS) || !defined(CGAL_USE_CORE)
+typedef  CGAL::Simple_cartesian<double> Rep;
+#else
+typedef CGAL::Simple_cartesian<CORE::Expr> Rep;
+#endif
+
+#ifdef USE_FILTERED_TRAITS
+#ifdef CGAL_USE_CORE
+typedef CGAL::Field_with_sqrt_tag MTag;
+typedef CGAL::Field_with_sqrt_tag EMTag;
+typedef CGAL::Simple_cartesian<CORE::Expr> ERep;
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<Rep,
+							  MTag,
+							  ERep,
+							  EMTag>
+Gt;
+#else
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<Rep> Gt;
+#endif
+#else
+typedef CGAL::Segment_Delaunay_graph_Linf_traits_2<Rep,CGAL::Field_tag> Gt;
+#endif
+
+typedef Gt::Point_2            Point_2;
+typedef Gt::Segment_2          Segment_2;
+//typedef Gt::Direction_2        Direction_2;
+
+typedef CGAL::Polygon_2<Rep>   Polygon_2;
+typedef Gt::Site_2             Site;
+
+typedef CGAL::Tag_true         STag;
+
+typedef CGAL::Segment_Delaunay_graph_storage_traits_2<Gt>       ST;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag>    SDG_2;
+//typedef CGAL::Segment_Delaunay_graph_2<Gt>          SDG_2;
+
+#endif  // SVD_TYPEDEFS_H
diff --git a/3rdparty/CGAL-4.8/demo/Snap_rounding_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/CMakeLists.txt
new file mode 100644
index 0000000..da969e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Snap_rounding_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ../../../Snap_rounding_2/include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Snap_rounding_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Snap_rounding_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc )
+
+# The executable itself.
+add_executable  ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Snap_rounding_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Snap_rounding_2 )
+
+# Link with Qt libraries
+target_link_libraries( Snap_rounding_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.cpp b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.cpp
new file mode 100644
index 0000000..9e46f80
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.cpp
@@ -0,0 +1,318 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Snap_rounding_traits_2.h>
+#include <CGAL/Snap_rounding_2.h>
+#include <CGAL/Snap_rounding_traits_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/RegularGridGraphicsItem.h>
+#include <CGAL/Qt/SegmentsGraphicsItem.h>
+#include <CGAL/Qt/PolylinesGraphicsItem.h>
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+ 
+// the two base classes
+#include "ui_Snap_rounding_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel K;
+typedef CGAL::Snap_rounding_traits_2<K>     Traits;
+
+typedef K::Point_2 Point_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Snap_rounding_2
+{
+  Q_OBJECT
+  
+private:  
+  
+  QGraphicsScene scene;  
+
+  CGAL::Qt::RegularGridGraphicsItem<K> * rgi;
+
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+  std::list<Segment_2> input;
+  std::list<std::list<Point_2> > output;
+
+  typedef CGAL::Qt::SegmentsGraphicsItem<std::list<Segment_2> > InputSegmentsGraphicsItem;
+  typedef CGAL::Qt::PolylinesGraphicsItem<std::list<std::list<Point_2> > > OutputPolylinesGraphicsItem;
+  InputSegmentsGraphicsItem * isgi;
+  OutputPolylinesGraphicsItem *plgi;
+  double delta;
+  
+public:
+  MainWindow();
+              
+  void resize(){
+  this->graphicsView->setSceneRect(QRectF(0,0,20, 20));
+  this->graphicsView->fitInView(0,0, 20, 20, Qt::KeepAspectRatio);
+  }
+              
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionLoadSegments_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionSaveSegments_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionShowGrid_toggled(bool checked);
+  void on_actionShowInput_toggled(bool checked);
+  void on_actionShowSnappedSegments_toggled(bool checked);
+
+  void deltaChanged(double);
+
+  virtual void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow(), delta(1.0)
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  isgi = new InputSegmentsGraphicsItem(&input);
+  scene.addItem(isgi);
+
+  plgi = new OutputPolylinesGraphicsItem(&output);
+  scene.addItem(plgi);
+
+ // inputs polylines with 2 points
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 2, false);
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+  
+  scene.installEventFilter(pi);
+
+  // Manual handling of actions
+  //
+
+
+  QObject::connect(this->doubleSpinBox, SIGNAL(valueChanged(double)),
+		   this, SLOT(deltaChanged(double)));
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  this->graphicsView->setScene(&scene);
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+  this->graphicsView->setMouseTracking(true);
+
+  rgi = new CGAL::Qt::RegularGridGraphicsItem<K>(delta, delta);
+
+    QObject::connect(this, SIGNAL(changed()),
+                     rgi, SLOT(modelChanged()));
+
+    QObject::connect(this, SIGNAL(changed()),
+                     isgi, SLOT(modelChanged()));
+
+    QObject::connect(this, SIGNAL(changed()),
+                     plgi, SLOT(modelChanged()));
+
+
+  rgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  rgi->setEdgesPen(QPen(Qt::gray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(rgi);
+
+  plgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Snap_rounding_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+
+void
+MainWindow::deltaChanged(double d)
+{
+  if(delta == d){
+    return;
+  }
+  delta = d;
+  output.clear();
+  CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
+  rgi->setDelta(delta, delta);
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o)){
+    if(points.size() == 2) {
+      input.push_back(Segment_2(points.front(), points.back()));
+      output.clear();
+      CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
+    }
+    else {
+      std::cerr << points.size() << std::endl;
+    }
+  }
+  Q_EMIT( changed());
+}
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  input.clear();
+  output.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionShowGrid_toggled(bool checked)
+{
+  rgi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionShowInput_toggled(bool checked)
+{
+  isgi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+
+
+void
+MainWindow::on_actionShowSnappedSegments_toggled(bool checked)
+{
+  plgi->setVisible(checked);
+  Q_EMIT( changed());
+}
+
+
+
+
+void
+MainWindow::on_actionLoadSegments_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open segment file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+
+  std::copy(std::istream_iterator<Segment_2>(ifs),
+            std::istream_iterator<Segment_2>(),
+            std::back_inserter(input));
+  output.clear();
+  CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
+  ifs.close();
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  on_actionRecenter_triggered();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionSaveSegments_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    ofs.precision(12);
+    std::copy(input.begin(), input.end(),  std::ostream_iterator<Segment_2>(ofs, "\n"));
+  }
+
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(isgi->boundingRect());
+  this->graphicsView->fitInView(isgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Snap_rounding_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Snap_rounding_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Snap_rounding_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  mainWindow.resize();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.qrc b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.ui b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/Snap_rounding_2.ui
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/Snap_rounding_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/about_Snap_rounding_2.html b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/about_Snap_rounding_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/about_Snap_rounding_2.html
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/about_Snap_rounding_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/grid.png b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/grid.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/grid.png
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/grid.png
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/snapped.png b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/snapped.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/snapped.png
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/snapped.png
diff --git a/3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/unsnapped.png b/3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/unsnapped.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Snap_rounding_2/icons/unsnapped.png
rename to 3rdparty/CGAL-4.8/demo/Snap_rounding_2/icons/unsnapped.png
diff --git a/3rdparty/CGAL-4.8/demo/Spatial_searching_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/CMakeLists.txt
new file mode 100644
index 0000000..f23272a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/CMakeLists.txt
@@ -0,0 +1,52 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Spatial_searchingDemo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ../../../Spatial_searching/include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+  add_definitions(-DQT_NO_KEYWORDS)
+
+  #--------------------------------
+  # Demo: Spatial_searching_2
+  #--------------------------------
+  # UI files (Qt Designer files)
+  qt5_wrap_ui( DT_UI_FILES Spatial_searching_2.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( DT_RESOURCE_FILES ./Spatial_searching_2.qrc )
+
+  # use the Qt MOC preprocessor on classes that derives from QObject
+  qt5_generate_moc( Spatial_searching_2.cpp Spatial_searching_2.moc )
+
+  # The executable itself.
+  add_executable  ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+  qt5_use_modules(Spatial_searching_2 Xml Script OpenGL Svg)
+
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS Spatial_searching_2 )
+
+  # Link with Qt libraries
+  target_link_libraries( Spatial_searching_2 ${QT_LIBRARIES} )
+  # And with CGAL libraries
+  target_link_libraries( Spatial_searching_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/NearestNeighbor.h b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/NearestNeighbor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Spatial_searching_2/NearestNeighbor.h
rename to 3rdparty/CGAL-4.8/demo/Spatial_searching_2/NearestNeighbor.h
diff --git a/3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.cpp b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.cpp
new file mode 100644
index 0000000..b5ed84b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.cpp
@@ -0,0 +1,302 @@
+#include <fstream>
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Search_traits_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QGraphicsLineItem>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/PointsInKdTreeGraphicsItem.h>
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Spatial_searching_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+#include "NearestNeighbor.h"
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Vector_2 Vector_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+typedef CGAL::Search_traits_2<K> TreeTraits;
+typedef CGAL::Orthogonal_k_neighbor_search<TreeTraits> Neighbor_search;
+typedef Neighbor_search::Tree Tree;
+
+typedef CGAL::Qt::NearestNeighbor<Neighbor_search> NearestNeighbor;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Spatial_searching_2
+{
+  Q_OBJECT
+  
+private:
+  Tree tree;
+
+  CGAL::Qt::Converter<K> convert;
+  QGraphicsScene scene;  
+
+  CGAL::Qt::PointsInKdTreeGraphicsItem<Tree> * pgi;
+  NearestNeighbor * nearest_neighbor;
+
+public:
+  MainWindow();
+
+  template <typename G>
+  void
+  on_actionGenerate_triggered()
+  {
+
+    QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+    CGAL::Qt::Converter<K> convert;  
+    Iso_rectangle_2 isor = convert(rect);
+    Point_2 center = CGAL::midpoint(isor[0], isor[2]);
+    Vector_2 offset = center - CGAL::ORIGIN;
+    double w = isor.xmax() - isor.xmin();
+    double h = isor.ymax() - isor.ymin();
+    double radius = (w<h) ? w/2 : h/2;
+
+    G pg(radius);
+    bool ok = false;
+
+    const int number_of_points = 
+      QInputDialog::getInt(this, 
+                               tr("Number of random points"),
+                               tr("Enter number of random points"),
+                               100,
+                               0,
+                               (std::numeric_limits<int>::max)(),
+                               1,
+                               &ok);
+
+    if(!ok) {
+      return;
+    }
+
+    // wait cursor
+    QApplication::setOverrideCursor(Qt::WaitCursor);
+
+    std::vector<Point_2> points; 
+
+    points.reserve(number_of_points);
+    for(int i = 0; i < number_of_points; ++i){
+      points.push_back(*pg + offset);
+      ++pg;
+    }
+    tree.insert(points.begin(), points.end());
+    
+    // default cursor
+    QApplication::restoreOverrideCursor();
+    Q_EMIT( changed());
+  }
+
+public Q_SLOTS:
+
+  virtual void open(QString fileName);
+  void N_changed(int i);
+  void on_actionClear_triggered();
+  void on_actionLoadPoints_triggered();
+  void on_actionRecenter_triggered();
+  void on_actionGeneratePointsOnCircle_triggered();
+  void on_actionGeneratePointsInSquare_triggered();
+  void on_actionGeneratePointsInDisc_triggered();
+
+  void clear();
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+  this->graphicsView->setCursor(Qt::CrossCursor);
+
+  // Add a GraphicItem for the point set
+  pgi = new CGAL::Qt::PointsInKdTreeGraphicsItem<Tree>(&tree);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   pgi, SLOT(modelChanged()));
+
+  pgi->setVerticesPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(pgi);
+
+  nearest_neighbor = new NearestNeighbor(&scene, &tree, this, this->nn->value());
+  nearest_neighbor->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.installEventFilter(nearest_neighbor);
+
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->nn, SIGNAL(valueChanged(int)),
+		   this, SLOT(N_changed(int)));
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+ 
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(0, 0, 10, 10);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Uncomment the following line to get antialiasing by default.
+//   actionUse_Antialiasing->setChecked(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Spatial_searching_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+
+void MainWindow::N_changed(int i)
+{
+  nearest_neighbor->setN(i);
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  clear();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  if(tree.empty()){
+    return;
+  }
+  this->graphicsView->setSceneRect(pgi->boundingRect());
+  this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+void
+MainWindow::on_actionGeneratePointsOnCircle_triggered()
+{
+  typedef CGAL::Random_points_on_circle_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInSquare_triggered()
+{
+  typedef CGAL::Random_points_in_square_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionGeneratePointsInDisc_triggered()
+{
+  typedef CGAL::Random_points_in_disc_2<Point_2> Generator;
+  on_actionGenerate_triggered<Generator>();
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  std::vector<K::Point_2> points;
+  while(ifs >> p) {
+    points.push_back(p);
+  }
+  tree.insert(points.begin(), points.end());
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::clear()
+{
+  tree.clear();  
+}
+
+
+#include "Spatial_searching_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Spatial_searching_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Spatial_searching_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  mainWindow.on_actionRecenter_triggered();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.qrc b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.ui b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Spatial_searching_2/Spatial_searching_2.ui
rename to 3rdparty/CGAL-4.8/demo/Spatial_searching_2/Spatial_searching_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Spatial_searching_2/about_Spatial_searching_2.html b/3rdparty/CGAL-4.8/demo/Spatial_searching_2/about_Spatial_searching_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Spatial_searching_2/about_Spatial_searching_2.html
rename to 3rdparty/CGAL-4.8/demo/Spatial_searching_2/about_Spatial_searching_2.html
diff --git a/3rdparty/CGAL-4.8/demo/Stream_lines_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Stream_lines_2/CMakeLists.txt
new file mode 100644
index 0000000..7c35248
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Stream_lines_2/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Stream_lines_2_demo)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+include_directories (BEFORE ../../include)
+
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Stream_lines_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Stream_lines_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc )
+
+# The executable itself.
+add_executable  ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Stream_lines_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Stream_lines_2 )
+
+# Link with Qt libraries
+target_link_libraries( Stream_lines_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.cpp b/3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.cpp
new file mode 100644
index 0000000..52b0ea2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.cpp
@@ -0,0 +1,251 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Stream_lines_2.h>
+#include <CGAL/Runge_kutta_integrator_2.h>
+#include <CGAL/Regular_grid_2.h>
+
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include <CGAL/Qt/StreamLinesGraphicsItem.h>
+#include <CGAL/Qt/RegularGridVectorFieldGraphicsItem.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+ 
+// the two base classes
+#include "ui_Stream_lines_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+typedef CGAL::Regular_grid_2<K> Regular_grid;
+typedef CGAL::Runge_kutta_integrator_2<Regular_grid> Runge_kutta_integrator;
+typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator> Stream_lines;
+typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Stream_line_iterator_2 Stream_line_iterator;
+typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Point_iterator_2 Point_iterator;
+typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Point_2 Point_2;
+typedef CGAL::Stream_lines_2<Regular_grid, Runge_kutta_integrator>::Vector_2 Vector;
+
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Stream_lines_2
+{
+  Q_OBJECT
+  
+private:  
+  Stream_lines * stream_lines;
+  Runge_kutta_integrator * runge_kutta_integrator;
+  Regular_grid * regular_grid;
+  double density;
+  double ratio;
+  double integrating;
+  int sampling;  
+  QGraphicsScene scene;  
+
+  CGAL::Qt::StreamLinesGraphicsItem<Stream_lines,K> * sli;
+  CGAL::Qt::RegularGridVectorFieldGraphicsItem<Regular_grid,K> * rgi;
+
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionRecenter_triggered();
+
+  virtual void open(QString fileName);
+
+private:
+  void generate();
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow(), density(12.0), ratio(1.6), integrating(1.0), sampling(1)
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Stream_lines_2.html");
+  this->addAboutCGAL();
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::generate()
+{
+  stream_lines = new Stream_lines(*regular_grid, *runge_kutta_integrator, density, ratio, sampling);
+
+  sli = new CGAL::Qt::StreamLinesGraphicsItem<Stream_lines, K>(stream_lines);
+  rgi = new CGAL::Qt::RegularGridVectorFieldGraphicsItem<Regular_grid, K>(regular_grid);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   sli, SLOT(modelChanged()));
+
+
+  rgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  rgi->setEdgesPen(QPen(Qt::gray, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  sli->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(sli);
+  scene.addItem(rgi);
+
+  on_actionRecenter_triggered();
+  Q_EMIT( changed());
+}
+
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open grid file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+
+  runge_kutta_integrator = new Runge_kutta_integrator(integrating);
+  double iXSize, iYSize;
+  iXSize = iYSize = 512;
+  unsigned int x_samples, y_samples;
+  ifs >> x_samples;
+  ifs >> y_samples;
+  regular_grid = new Regular_grid(x_samples, y_samples, iXSize, iYSize);
+  /*fill the grid with the appropreate values*/
+  for (unsigned int i=0;i<x_samples;i++)
+    for (unsigned int j=0;j<y_samples;j++)
+      {
+        double xval, yval;
+        ifs >> xval;
+        ifs >> yval;
+        regular_grid->set_field(i, j, Vector(xval, yval));
+      }
+  ifs.close();
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  //  actionRecenter->trigger();
+  generate();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  /*
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+  
+  }
+  */
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(rgi->boundingRect());
+  this->graphicsView->fitInView(rgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Stream_lines_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Stream_lines_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  // See http://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
+  CGAL_QT_INIT_RESOURCES;
+  Q_INIT_RESOURCE(Stream_lines_2);
+
+  MainWindow mainWindow;
+  mainWindow.show();
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.qrc b/3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.ui b/3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Stream_lines_2/Stream_lines_2.ui
rename to 3rdparty/CGAL-4.8/demo/Stream_lines_2/Stream_lines_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/about_Stream_lines_2.html b/3rdparty/CGAL-4.8/demo/Stream_lines_2/about_Stream_lines_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Stream_lines_2/about_Stream_lines_2.html
rename to 3rdparty/CGAL-4.8/demo/Stream_lines_2/about_Stream_lines_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Stream_lines_2/data/vnoise.vec.cin b/3rdparty/CGAL-4.8/demo/Stream_lines_2/data/vnoise.vec.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Stream_lines_2/data/vnoise.vec.cin
rename to 3rdparty/CGAL-4.8/demo/Stream_lines_2/data/vnoise.vec.cin
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/CMakeLists.txt
new file mode 100644
index 0000000..b5ae259
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesh_deformation_demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
+  if (EIGEN3_FOUND)
+    include( ${EIGEN3_USE_FILE} )
+    include( CGAL_CreateSingleSourceCGALProgram )
+
+    include_directories (BEFORE "../../include")
+    create_single_source_cgal_program( "deform_mesh_for_botsch08_format.cpp" )
+
+  else()
+    message(STATUS "NOTICE: This program requires the Eigen library, version 3.2 or later and will not be compiled.")
+  endif()
+else()
+  
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp
new file mode 100644
index 0000000..240e411
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp
@@ -0,0 +1,96 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+// HalfedgeGraph adapters for Polyhedron_3
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <boost/foreach.hpp>
+// #define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
+#include <CGAL/Surface_mesh_deformation.h>
+
+#include <fstream>
+
+
+typedef CGAL::Simple_cartesian<double>                                   Kernel;
+typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator        vertex_iterator;
+
+typedef CGAL::Surface_mesh_deformation<Polyhedron,CGAL::Default, CGAL::Default, CGAL::ORIGINAL_ARAP> Surface_mesh_deformation;
+
+int main(int argc,char** argv)
+{
+  if  ( argc!=4){
+    std::cerr <<"Usage " << argv[0] << " input.off input.sel input.def\n";
+    return 1;
+  }
+  Polyhedron mesh;
+  std::ifstream input(argv[1]);
+
+  if ( !input || !(input >> mesh) || mesh.empty() ) {
+    std::cerr<< argv[1] << " is not a valid off file" << std::endl;
+    return 1;
+  }
+  input.close();
+
+  // Init the indices of the halfedges and the vertices.
+  set_halfedgeds_items_id(mesh);
+
+  // Create a deformation object
+  Surface_mesh_deformation deform_mesh(mesh);
+
+  // Definition of the region of interest (use the whole mesh)
+  vertex_iterator vb,ve;
+  boost::tie(vb, ve) = vertices(mesh);
+
+  //the selection is set by a file
+  input.open(argv[2]);
+  std::string line;
+  std::vector<vertex_descriptor> control_vertices;
+  while(getline(input, line))
+  {
+    if (line[0]=='#') continue;
+    if (line[0]=='1') deform_mesh.insert_roi_vertex(*vb);
+    if (line[0]=='2') {
+      deform_mesh.insert_control_vertex(*vb);
+      control_vertices.push_back(*vb);
+    }
+    ++vb;
+    if (vb==ve) break;
+  }
+  input.close();
+
+  std::cout << "Using " << control_vertices.size() << " control vertices\n";
+  // The definition of the ROI and the control vertices is done, call preprocess
+  bool is_matrix_factorization_OK = deform_mesh.preprocess();
+  if(!is_matrix_factorization_OK){
+    std::cerr << "Error in preprocessing, check documentation of preprocess()" << std::endl;
+    return 1;
+  }
+
+  //define the transformation
+  input.open(argv[3]);
+  double m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, hw, sink;
+  getline(input, line); // skip first comment line
+  input >> m00 >> m01 >> m02 >> m03;
+  input >> m10 >> m11 >> m12 >> m13;
+  input >> m20 >> m21 >> m22 >> m23;
+  input >> sink >> sink >> sink >> hw;
+
+  Kernel::Aff_transformation_3 aff(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23);
+  BOOST_FOREACH(vertex_descriptor vd, control_vertices)
+  {
+    Surface_mesh_deformation::Point pos = vd->point().transform(aff);
+    deform_mesh.set_target_position(vd, pos);
+  }
+
+  // Call the function deform() with one-time parameters:
+  deform_mesh.deform(1000, 1e-4);
+
+  // Save the deformed mesh into a file
+  std::ofstream output("deform_res.off");
+  output << mesh;
+  output.close();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Surface_mesher/CMakeLists.txt
new file mode 100644
index 0000000..d2008d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/CMakeLists.txt
@@ -0,0 +1,128 @@
+set ( prj Surface_mesher )
+
+project ( ${prj} )
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+set(PACKAGE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
+
+# Add several CGAL packages to the include and link paths,
+# if they lie in ${PACKAGE_ROOT}/.
+foreach(INC_DIR ${PACKAGE_ROOT}/include ${PACKAGE_ROOT}/../Mesh_2/include ${PACKAGE_ROOT}/../Data_structure_for_queries_3/include ${PACKAGE_ROOT}/../Marching_cube/include ${PACKAGE_ROOT}/../CGAL_ImageIO/include ${PACKAGE_ROOT}/../GraphicsView/include)
+  if (EXISTS ${INC_DIR})
+    include_directories (BEFORE ${INC_DIR})
+  endif()
+endforeach()
+foreach(LIB_DIR ${PACKAGE_ROOT}/../CGAL_ImageIO/src/CGAL_ImageIO ${PACKAGE_ROOT}/../GraphicsView/src/CGALQt5)
+  if (EXISTS ${LIB_DIR})
+    link_directories (${LIB_DIR})
+  endif()
+endforeach()
+
+include_directories( ./ )
+
+# QGLViwer needs Qt5 configured with QtOpenGL and QtXml support
+
+set( QT_USE_QTOPENGL TRUE )
+set( QT_USE_QTXML    TRUE )
+set( QT_USE_QTMAIN   TRUE )
+
+find_package(CGAL COMPONENTS ImageIO Qt5)
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
+
+  add_definitions(-DQT_NO_KEYWORDS)
+  include( ${CGAL_USE_FILE} )
+
+  find_package(Qt5 QUIET COMPONENTS OpenGL Xml Svg)
+  find_package(QGLViewer )
+  find_package(OpenGL    )
+  
+  if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND )
+
+        
+    include_directories( ${QGLVIEWER_INCLUDE_DIR} )
+    add_definitions(${QGLVIEWER_DEFINITIONS})
+
+    set( sources Raw_image_dialog.cpp colorlisteditor.cpp values_list.cpp mainwindow.cpp Surface_mesher.cpp viewer.cpp volume.cpp )
+
+    if(EXISTS ${PACKAGE_ROOT}/../Marching_cube)
+      option(SURFACE_MESH_DEMO_USE_MARCHING_CUBE "Embed a marching cube implementation in the Surface Mesh demo." ON)
+      mark_as_advanced(SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
+    endif()
+    
+    if(EXISTS ${PACKAGE_ROOT}/include/CGAL/Polyhedral_surface_3.h)
+      option(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE "Compile the support for polyhedral surfaces." OFF)
+      mark_as_advanced(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
+    endif()
+
+    option(SURFACE_MESH_DEMO_VERBOSE "Set this option if you want the Surface Mesh demo to display messages on standard output." OFF)
+    mark_as_advanced(SURFACE_MESH_DEMO_VERBOSE)
+
+    if(SURFACE_MESH_DEMO_VERBOSE)
+      add_definitions(-DCGAL_SURFACE_MESHER_VERBOSE)
+    endif()
+
+    if(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
+      set(sources ${sources} polyhedral_surface.cpp)
+    else(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
+      add_definitions(-DCGAL_DO_NOT_USE_POLYHEDRAL_SURFACE)
+    endif(SURFACE_MESH_DEMO_WITH_POLYHEDRAL_SURFACE)
+
+    if(SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
+      set(sources ${sources} ${PACKAGE_ROOT}/../Marching_cube/src/mc/ply.c)
+      add_definitions(-DCGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE)
+    endif()
+    
+
+    qt5_generate_moc( "surface.h" "${CMAKE_CURRENT_BINARY_DIR}/moc_surface.cpp" )
+
+    set( sources ${sources} moc_surface.cpp)
+    
+    qt5_wrap_ui( uis ui/values_list.ui ui/mainwindow.ui ui/optionsdialog.ui ui/raw_image.ui )
+    
+    qt5_add_resources( qrc_sources values_list.qrc surface_mesher.qrc  )
+
+    add_executable  ( ${prj}  ${sources} ${uis} ${qrc_sources} )
+
+    qt5_use_modules(${prj} OpenGL Xml Svg)
+    
+    add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${prj} )
+    
+    set(VTK_LIBS "")
+    find_package(VTK QUIET COMPONENTS vtkImagingGeneral  vtkIOImage NO_MODULE)
+    if(VTK_FOUND)
+      include(${VTK_USE_FILE})
+      if ("${VTK_VERSION_MAJOR}" GREATER "5")
+        message(STATUS "VTK found")
+        add_definitions(-DCGAL_USE_VTK)
+        set(VTK_LIBS vtkImagingGeneral vtkIOImage)
+      else()
+        message(STATUS "Vtk must be at least Rel 6")
+      endif()
+    else()
+      message(STATUS "For reading Dicom files install VTK first")
+    endif()
+
+    # Link the executable to CGAL and third-party libraries
+    target_link_libraries( ${prj} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})    
+    
+    target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${VTK_LIBS})
+    
+  else( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND )
+    message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.")
+  endif( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND )
+else(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
+  if(RUNNING_CGAL_AUTO_TEST)
+    # Just to avoid a warning from CMake if that variable is set on the command line...
+  endif()
+
+  message(STATUS "NOTICE: This demo needs Qt5, and will not be compiled.")
+endif(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/File_XT.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/File_XT.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/File_XT.h
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/File_XT.h
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.cpp
new file mode 100644
index 0000000..9e5e1f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.cpp
@@ -0,0 +1,28 @@
+#include "Raw_image_dialog.h"
+
+Raw_image_dialog::Raw_image_dialog(QWidget* parent)
+  : QDialog(parent) 
+{
+  setupUi(this);
+}
+
+void Raw_image_dialog::update_image_size() {
+  label_image_size->setNum((int)image_word_size() *
+			   dim_x->value() *
+			   dim_y->value() *
+			   dim_z->value());
+}
+
+unsigned int Raw_image_dialog::image_word_size() const {
+  if(short_bt->isChecked())
+    return 2;
+  if(int_bt->isChecked())
+    return 4;
+  else if(float_bt->isChecked())
+    return 4;
+  else if(double_bt->isChecked())
+    return 8;
+  else
+    return 1;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.h
new file mode 100644
index 0000000..82551e0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/Raw_image_dialog.h
@@ -0,0 +1,19 @@
+#ifndef RAW_IMAGE_DIALOG_H
+#define RAW_IMAGE_DIALOG_H
+
+#include "ui_raw_image.h"
+
+class Raw_image_dialog : public QDialog, public Ui::Raw_image_dialog 
+{
+  Q_OBJECT
+
+public:
+  Raw_image_dialog(QWidget* parent = 0);
+
+  unsigned int image_word_size() const;
+
+private Q_SLOTS:
+  void update_image_size();
+};
+
+#endif // RAW_IMAGE_DIALOG
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/Surface_mesher.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/Surface_mesher.cpp
new file mode 100644
index 0000000..ab73dab
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/Surface_mesher.cpp
@@ -0,0 +1,22 @@
+#include "mainwindow.h"
+#include <QApplication>
+#include <iostream>
+
+int main(int argc, char** argv)
+{
+  QApplication application(argc,argv);
+
+  application.setOrganizationDomain("geometryfactory.com");
+  application.setOrganizationName("GeometryFactory");
+  application.setApplicationName("Surface mesher Qt5 demo");
+
+  MainWindow w;
+
+  if(argc>1)
+    w.surface_open(argv[1]);
+
+  w.show();
+
+  return application.exec();
+  std::cerr << "Exit\n";
+}
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/binary_image.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/binary_image.h
new file mode 100644
index 0000000..6c87539
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/binary_image.h
@@ -0,0 +1,197 @@
+// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008  GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Laurent RINEAU, Pierre ALLIEZ
+
+#ifndef BINARY_IMAGE_3
+#define BINARY_IMAGE_3
+
+#include <CGAL/basic.h>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <CGAL/algorithm.h>
+
+#include <boost/format.hpp>
+#include <CGAL/ImageIO.h>
+
+#include <limits>
+
+#include <CGAL/Image_3.h>
+
+template <typename FT_, typename Point>
+class CBinary_image_3 : public CGAL::Image_3
+{
+  bool interpolate_;
+  bool labellized_;
+
+public:
+  double min_value;
+  double max_value;
+
+  typedef FT_ FT;
+
+public:
+  CBinary_image_3()
+    : Image_3(), interpolate_(true)
+  {
+  }
+
+  CBinary_image_3(const Image_3& bi)
+    : Image_3(bi), interpolate_(true)
+  {
+  }
+
+
+  CBinary_image_3(const CBinary_image_3& bi)
+    : Image_3(bi), interpolate_(bi.interpolate_),labellized_(bi.labellized_)
+  {
+    std::cerr << "CBinary_image_3::copy_constructor\n";
+    min_value = bi.min_value;
+    max_value = bi.max_value;
+  }
+
+
+  void finish_open() {
+    CGAL_IMAGE_IO_CASE(image_ptr.get(),
+                       Word *min; Word *max;
+                       (boost::tie(min, max)) = 
+                         (CGAL::min_max_element((Word*)(data()),
+                                                (Word*)(data()) + 
+                                                xdim() * ydim() * zdim()));
+                        min_value = *min;
+                        max_value = *max;)
+  }
+
+  float xmax() const
+  {
+    return (float)(((image_ptr->xdim) - 1.0)*(image_ptr->vx));
+  }
+
+  float ymax() const
+  {
+    return (float)(((image_ptr->ydim) - 1.0)*(image_ptr->vy));
+  }
+
+  float zmax() const
+  {
+    return (float)(((image_ptr->zdim) - 1.0)*(image_ptr->vz));
+  }
+
+  Point center() 
+  {
+    FT cx = 0.5 * xmax();
+    FT cy = 0.5 * ymax();
+    FT cz = 0.5 * zmax();
+    return Point(cx,cy,cz);
+  }
+
+  FT radius()
+  {
+    return (std::max)((std::max)(xmax(),ymax()),zmax());
+  }
+
+  Point point(const std::size_t i,
+              const std::size_t j,
+              const std::size_t k) const
+  {
+    return Point(i * (image_ptr->vx),
+                 j * (image_ptr->vy),
+                 k * (image_ptr->vz));
+  }
+
+public:
+  bool inside(const float x,
+              const float y, 
+              const float z) const
+  {
+    return ( x >= 0.0f && 
+             y >= 0.0f && 
+             z >= 0.0f && 
+             x <= xmax() &&
+             y <= ymax() &&
+             z <= zmax() );
+  }
+
+  float rand_x() { return (float)rand() / (float)RAND_MAX * xmax(); }
+  float rand_y() { return (float)rand() / (float)RAND_MAX * ymax(); }
+  float rand_z() { return (float)rand() / (float)RAND_MAX * zmax(); }
+
+  void set_interpolation(const bool b)
+  {
+    interpolate_ = b;
+  }
+
+  bool interpolation() const {
+    return interpolate_;
+  }
+
+  void set_labellized(const bool b)
+  {
+    labellized_ = b;
+  }
+
+  bool labellized() const {
+    return labellized_;
+  }
+
+  FT operator()(Point p) const
+  {
+    const float x = static_cast<float>(CGAL::to_double(p.x()));
+    const float y = static_cast<float>(CGAL::to_double(p.y()));
+    const float z = static_cast<float>(CGAL::to_double(p.z()));
+      
+    if(interpolation()) {
+      if(labellized()) {
+	CGAL_IMAGE_IO_CASE(image_ptr.get(),
+			   return (this->labellized_trilinear_interpolation<Word, double>(x, y, z, min_value));)
+      }
+      else {
+	CGAL_IMAGE_IO_CASE(image_ptr.get(),
+ 			   return (this->trilinear_interpolation<Word, double>(x, y, z, min_value));)
+      }
+    }
+    else {
+      const std::ptrdiff_t i = static_cast<std::ptrdiff_t>(x/image()->vx + 0.5f);
+      const std::ptrdiff_t j = static_cast<std::ptrdiff_t>(y/image()->vy + 0.5f);
+      const std::ptrdiff_t k = static_cast<std::ptrdiff_t>(z/image()->vz + 0.5f);
+      if( i < 0 ||
+	  j < 0 ||
+	  k < 0 )
+      {
+	return 0;
+      }
+      else
+      {    
+	const std::size_t ui = static_cast<std::size_t>(i);
+	const std::size_t uj = static_cast<std::size_t>(j);
+	const std::size_t uk = static_cast<std::size_t>(k);
+	if( ui >= image()->xdim ||
+	    uj >= image()->ydim ||
+	    uk >= image()->zdim )
+	{
+	  return 0;
+	}
+	else
+	{
+	  return this->value(ui, uj, uk);
+	}
+      }
+    }
+    return FT();
+  }
+}; // end CBinary_image_3
+ 
+#endif // BINARY_IMAGE_3
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/colorlisteditor.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/colorlisteditor.cpp
new file mode 100644
index 0000000..a7e4c08
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/colorlisteditor.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2007-2007 Trolltech ASA. All rights reserved.
+**
+** This file is part of the example classes of the Qt Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file.  Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales at trolltech.com.
+**
+** In addition, as a special exception, Trolltech gives you certain
+** additional rights. These rights are described in the Trolltech GPL
+** Exception version 1.0, which can be found at
+** http://www.trolltech.com/products/qt/gplexception/ and in the file
+** GPL_EXCEPTION.txt in this package.
+**
+** In addition, as a special exception, Trolltech, as the sole copyright
+** holder for Qt Designer, grants users of the Qt/Eclipse Integration
+** plug-in the right for the Qt/Eclipse Integration to link to
+** functionality provided by Qt Designer and its related libraries.
+**
+** Trolltech reserves all rights not expressly granted herein.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "colorlisteditor.h"
+
+ColorListEditor::ColorListEditor(QWidget *widget) : QComboBox(widget)
+{
+    populateList();
+}
+
+QColor ColorListEditor::color() const
+{
+  return itemData(currentIndex(), Qt::DecorationRole).value<QColor>();
+}
+
+void ColorListEditor::setColor(QColor color)
+{
+    setCurrentIndex(findData(color, int(Qt::DecorationRole)));
+}
+
+void ColorListEditor::populateList()
+{
+    QStringList colorNames = QColor::colorNames();
+
+    for (int i = 0; i < colorNames.size(); ++i) {
+        QColor color(colorNames[i]);
+
+        insertItem(i, colorNames[i]);
+        setItemData(i, color, Qt::DecorationRole);
+    }
+}
+
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/colorlisteditor.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/colorlisteditor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/colorlisteditor.h
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/colorlisteditor.h
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/get_polyhedral_surface.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/get_polyhedral_surface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/get_polyhedral_surface.h
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/get_polyhedral_surface.h
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox-red.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox-red.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox-red.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox-red.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox-red.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox-red.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox-red.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox-red.svg
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/bbox.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/bbox.svg
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/fileopen.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/fileopen.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/fileopen.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/fileopen.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/filesave.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/filesave.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/filesave.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/filesave.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/flip.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/flip.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/flip.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/flip.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/flip.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/flip.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/flip.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/flip.svg
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/minus.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/minus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/minus.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/minus.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/plus.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/plus.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/plus.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/plus.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/resize.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/resize.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/resize.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/resize.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/resize.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/resize.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/resize.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/resize.svg
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/surface.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/surface.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/surface.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/surface.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/surface.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/surface.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/surface.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/surface.svg
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/twosides.png b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/twosides.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/twosides.png
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/twosides.png
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/icons/twosides.svg b/3rdparty/CGAL-4.8/demo/Surface_mesher/icons/twosides.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/icons/twosides.svg
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/icons/twosides.svg
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.cpp
new file mode 100644
index 0000000..bd4016a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.cpp
@@ -0,0 +1,179 @@
+#include "mainwindow.h"
+
+#include <QFileDialog>
+#include <QUrl>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QtDebug>
+#include <QMenu>
+#include <QAction>
+#include <QVariant>
+#include <QStringList>
+#include <QtGlobal>
+#include <QToolBar>
+#include <QDoubleSpinBox>
+#include <QLabel>
+#include <QSettings>
+#include <QMimeData>
+
+#include <QGLViewer/vec.h>
+
+#include <algorithm> // std::max
+#include <cmath> // std::sqrt
+#include <boost/format.hpp>
+
+#include "ui_mainwindow.h"
+#include "volume.h"
+#ifndef CGAL_DO_NOT_USE_POLYHEDRAL_SURFACE
+#  include "polyhedral_surface.h"
+#endif
+
+MainWindow::MainWindow(MainWindow* other_window /* = 0 */) : 
+  CGAL::Qt::DemosMainWindow(),
+  surface(0)
+{
+  setupUi(this);
+  setAcceptDrops(true);
+
+  if(other_window != 0)
+  {
+    viewer->setCamera(other_window->viewer->camera());
+    connect(other_window, SIGNAL(destroyed()),
+            this, SLOT(close()));
+  }
+
+  this->addAboutCGAL();
+  this->addRecentFiles(this->menu_File,
+		       this->action_Quit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(surface_open(QString)));
+
+  this->readState();
+
+  show_only("");
+}
+
+void MainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+  if (event->mimeData()->hasFormat("text/uri-list"))
+    event->acceptProposedAction();
+}
+
+void MainWindow::dropEvent(QDropEvent *event)
+{
+  QString filename = event->mimeData()->urls().at(0).toLocalFile();
+  surface_open(filename);
+  event->acceptProposedAction();
+}
+
+void MainWindow::surface_open(const QString& filename)
+{
+  if(surface != 0) {
+    delete surface;
+    surface = 0;
+  }
+#ifndef CGAL_DO_NOT_USE_POLYHEDRAL_SURFACE
+  surface = new Polyhedral_surface(this);
+  if(surface->open(filename)) {
+    this->addToRecentFiles(filename);
+    return;
+  }
+  delete surface;
+  surface = 0;
+#endif
+  surface = new Volume(this);
+  if(surface->open(filename)) {
+    this->addToRecentFiles(filename);
+  }
+}
+
+void MainWindow::show_only(QString tag)
+{
+#if 0
+  QTextStream err(stderr);
+#else
+  QString dummy;
+  QTextStream err(&dummy);
+#endif
+  err << "** Show only in \"" << tag << "\"\n";
+  Q_FOREACH(QObject* object, 
+            this->findChildren<QObject*>())
+  {
+    QStringList show_only_in = object->property("show_only_in").toStringList();
+    if(!show_only_in.isEmpty())
+    {
+      err << object->metaObject()->className()
+          << " \"" << object->objectName() << "\" only in: ";
+      Q_FOREACH(QString s, show_only_in)
+        err << s << " ";
+      const bool visible = show_only_in.contains(tag);
+      err << (visible ? "(enabled)\n" : "(disabled)\n");
+      if(QMenu* menu = qobject_cast<QMenu*>(object)) {
+        menu->menuAction()->setVisible(visible);
+      }
+      else {
+	object->setProperty("visible", QVariant::fromValue<bool>(visible));
+      }
+    }
+  }
+}
+
+void MainWindow::on_action_Open_triggered()
+{
+  QSettings settings;
+  QString directory = settings.value("Open directory",
+				     QDir::current().dirName()).toString();
+  QString filename = QFileDialog::getOpenFileName(this, tr("Open File"),
+                                                  directory,
+                                                  tr("all Files (*.*)"));
+  if(!filename.isEmpty()) {
+    QFileInfo fileinfo(filename);
+    if(fileinfo.isFile() && fileinfo.isReadable()) {
+      settings.setValue("Open directory",
+			fileinfo.absoluteDir().absolutePath());
+      surface_open(filename);
+    }
+  }
+}
+
+void MainWindow::on_action_OpenDirectory_triggered()
+{
+  QSettings settings;
+  QString start_dir = settings.value("Open directory",
+                                     QDir::current().dirName()).toString();
+  QString dir =
+    QFileDialog::getExistingDirectory(this,
+                                      tr("Open directory"),
+                                      start_dir,
+                                      QFileDialog::ShowDirsOnly
+                                      | QFileDialog::DontResolveSymlinks);
+
+  if (!dir.isEmpty()) {
+    QFileInfo fileinfo(dir);
+    if (fileinfo.isDir() && fileinfo.isReadable())
+    {
+      settings.setValue("Open directory",
+        fileinfo.absoluteDir().absolutePath());
+      surface_open(dir);
+    }
+  }
+}
+
+void MainWindow::on_action_Quit_triggered()
+{
+  this->writeState();
+  qApp->exit();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+  this->writeState();
+  event->accept();
+}
+
+void MainWindow::on_action_Clone_triggered()
+{
+  MainWindow* other = new MainWindow(this);
+  other->show();
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.h
new file mode 100644
index 0000000..e32322f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/mainwindow.h
@@ -0,0 +1,39 @@
+#ifndef _MAINWINDOW_H
+#define _MAINWINDOW_H
+
+#include <QMainWindow>
+#include "ui_mainwindow.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+class QDragEnterEvent;
+class QDropEvent;
+class Surface;
+class QGLViewer;
+class QDoubleSpinBox;
+class QCloseEvent;
+
+class MainWindow : public CGAL::Qt::DemosMainWindow, public Ui::MainWindow
+{
+  Q_OBJECT
+public:
+  MainWindow(MainWindow* other_window = 0);
+  void dragEnterEvent(QDragEnterEvent *);
+  void dropEvent(QDropEvent *event);
+
+public Q_SLOTS:
+  void show_only(QString);
+  void surface_open(const QString& filename);
+
+private Q_SLOTS:
+  void on_action_Open_triggered();
+  void on_action_OpenDirectory_triggered();
+  void on_action_Quit_triggered();
+  void on_action_Clone_triggered();
+  
+private:
+  void closeEvent(QCloseEvent *event);
+  Surface* surface;
+};
+
+
+#endif // _MAINWINDOW_H
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.cpp
new file mode 100644
index 0000000..c673921
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.cpp
@@ -0,0 +1,494 @@
+#include "polyhedral_surface.h"
+#include "get_polyhedral_surface.h"
+
+#include <QMainWindow>
+#include <QString>
+#include <QStatusBar>
+#include <QApplication>
+#include <QAction>
+#include <QDialog>
+#include "ui_optionsdialog.h"
+#include <QDoubleSpinBox>
+#include <iostream>
+#include <fstream>
+#include <boost/format.hpp>
+#include "mainwindow.h"
+
+typedef CGAL_polyhedral_surface::Polyhedron Polyhedron;
+
+Polyhedral_surface::Polyhedral_surface(QObject* parent,
+                                       double sharp_edges_angle_lower_bound,
+                                       double sharp_edges_angle_upper_bound)
+  : Surface(parent), 
+    m_inverse_normals(false),
+    surface_ptr(0),
+    parent(parent),
+    display_octree(false),
+    display_edges_octree(false),
+    display_surface(true),
+    display_all_edges(true),
+    display_control_edges(false),
+    sharp_edges_angle_lower_bound(sharp_edges_angle_lower_bound),
+    sharp_edges_angle_upper_bound(sharp_edges_angle_upper_bound),
+    is_octree_initialized(false),
+    selected_edge(-1),
+    selected_facet(-1),
+    is_dirty(true),
+    list_id(0)
+{
+  connection_map["actionDisplay_octree"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(toggle_display_octree(bool)));
+
+  connection_map["actionDisplay_edges_octree"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(toggle_display_edges_octree(bool)));
+
+  connection_map["actionDisplay_surface"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(toggle_display_surface(bool)));
+
+  connection_map["actionDisplay_all_edges"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(toggle_display_all_edges(bool)));
+
+  connection_map["actionDisplay_control_edges"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(toggle_display_control_edges(bool)));
+
+  connection_map["actionInverse_normals"] = 
+    std::make_pair(SIGNAL(toggled(bool)),
+                   SLOT(set_inverse_normals(bool)));
+
+  connection_map["actionSubdivision"] = 
+    std::make_pair(SIGNAL(triggered()),
+                   SLOT(make_one_subdivision_step()));
+  connection_map["action_Options"] =
+    std::make_pair(SIGNAL(triggered()),
+                   SLOT(on_action_Options_triggered()));
+}
+
+Polyhedral_surface::~Polyhedral_surface()
+{
+  clear();
+  delete surface_ptr;
+}
+
+void Polyhedral_surface::on_action_Options_triggered()
+{
+  QDialog *options_dialog = new QDialog(qobject_cast<QWidget*>(parent));
+  Ui::OptionDialog ui;
+  ui.setupUi(options_dialog);
+
+  QDoubleSpinBox* sb_upper = options_dialog->findChild<QDoubleSpinBox*>("angle_upper_bound");
+  QDoubleSpinBox* sb_lower = options_dialog->findChild<QDoubleSpinBox*>("angle_lower_bound");
+
+  if(!sb_lower || !sb_upper) 
+    return;
+
+  sb_lower->setValue(sharp_edges_angle_lower_bound);
+  sb_upper->setValue(sharp_edges_angle_upper_bound);
+  if(options_dialog->exec() == QDialog::Accepted)
+  {
+    sharp_edges_angle_upper_bound = sb_upper->value();
+    sharp_edges_angle_lower_bound = sb_lower->value();
+    set_sharp_edges_angle_bounds(sharp_edges_angle_lower_bound,
+                                 sharp_edges_angle_upper_bound);
+  }
+}
+
+void Polyhedral_surface::clear() {
+  for(Connection_map::const_iterator
+        it = connection_map.begin(),
+        end = connection_map.end();
+      it != end;
+      ++it)
+  {
+    QAction* action = parent->findChild<QAction*>(it->first);
+    action->setVisible(false);
+  }
+}
+
+void Polyhedral_surface::connect_actions()
+{
+  for(Connection_map::const_iterator
+        it = connection_map.begin(),
+        end = connection_map.end();
+      it != end;
+      ++it)
+  {
+    QAction* action = parent->findChild<QAction*>(it->first);
+    action->setVisible(true);
+    if(action)
+      connect(action, it->second.first,
+              this, it->second.second);
+  }
+  MainWindow* mw = qobject_cast<MainWindow *>(parent);
+  if(mw) {
+//     mw->fix_menus_visibility();
+    mw->show_only("polyhedral");
+  }
+
+
+  connect(this, SIGNAL(changed()), this, SLOT(display_nb_elements_in_status_bar()));
+}
+
+void Polyhedral_surface::display_nb_elements_in_status_bar() const 
+{
+  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
+  if(surface_ptr && mw)
+  {
+    mw->statusBar()->showMessage(QString("%1 vertices. %2 edges. %3 facets.")
+                                 .arg(surface_ptr->size_of_vertices())
+                                 .arg(surface_ptr->size_of_halfedges()/2)
+                                 .arg(surface_ptr->size_of_facets()));
+  }
+}
+
+void Polyhedral_surface::set_dirty()
+{
+  is_dirty = true;
+  Q_EMIT changed();
+}
+
+void Polyhedral_surface::busy() const 
+{
+  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
+  if(mw)
+  {
+    mw->statusBar()->showMessage(QString("Constructing octree..."));
+  }
+  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+}
+
+void Polyhedral_surface::not_busy() const 
+{
+  QApplication::restoreOverrideCursor();
+  QMainWindow* mw = qobject_cast<QMainWindow *>(parent);
+  if(mw)
+  {
+    mw->statusBar()->clearMessage();
+  }
+}
+
+void Polyhedral_surface::set_sharp_edges_angle_bounds(const double lower_bound,
+                                                      const double upper_bound)
+{
+  sharp_edges_angle_lower_bound = lower_bound;
+  sharp_edges_angle_upper_bound = upper_bound;
+  if(surface_ptr) {
+    surface_ptr->set_sharp_edges_angle_bounds(lower_bound, upper_bound);
+    surface_ptr->set_sharp_vertices_angle_bounds(lower_bound, upper_bound);
+    update_data_structures();
+    Q_EMIT set_dirty();
+  }
+}
+
+void Polyhedral_surface::update_data_structures() 
+{
+  surface_ptr->compute_sharp_edges_incidence_graph();
+  if(display_octree || display_edges_octree) {
+    construct_octree();
+    is_octree_initialized = true;
+  }
+  else
+    is_octree_initialized = false;
+}
+
+void Polyhedral_surface::construct_octree() 
+{
+  busy();
+  surface_ptr->construct_octree();
+  not_busy();
+}
+
+void Polyhedral_surface::toggle_display_octree(bool b)
+{
+  if(surface_ptr && b && !is_octree_initialized) {
+    is_octree_initialized = true;
+    construct_octree();
+  }
+  display_octree = b;
+  Q_EMIT set_dirty();
+}
+
+void Polyhedral_surface::toggle_display_edges_octree(bool b)
+{
+  if(surface_ptr && b && !is_octree_initialized) {
+    is_octree_initialized = true;
+    construct_octree();
+  }
+  display_edges_octree = b;
+  Q_EMIT set_dirty();
+}
+
+void Polyhedral_surface::toggle_display_surface(bool b)
+{
+  display_surface = b;
+  Q_EMIT set_dirty();
+}
+
+void Polyhedral_surface::toggle_display_all_edges(bool b)
+{
+  display_all_edges = b;
+  Q_EMIT set_dirty();
+}
+
+void Polyhedral_surface::toggle_display_control_edges(bool b)
+{
+  display_control_edges = b;
+  Q_EMIT set_dirty();
+}
+
+void Polyhedral_surface::make_one_subdivision_step()
+{
+  if(surface_ptr)
+  {
+    Polyhedron output;
+    CSubdivider_loop<Polyhedron , Poly_kernel> pw_loop_subdiviser;
+
+    pw_loop_subdiviser.subdivide(*surface_ptr, output);
+    static_cast<Polyhedron&>(*surface_ptr) = output;
+    surface_ptr->compute_normals();
+    surface_ptr->compute_type();
+    update_data_structures();
+    Q_EMIT set_dirty();
+  }
+}
+
+bool Polyhedral_surface::open(const QString& filename)
+{
+  clear();
+
+  std::cerr << "Opening file \"" << qPrintable(filename) << "\"...";
+  std::ifstream in(filename.toUtf8());
+  if(!in) return false;
+
+  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+
+  if(surface_ptr)
+    delete surface_ptr;
+  surface_ptr = new CGAL_polyhedral_surface(in, 
+                                            sharp_edges_angle_lower_bound, 
+                                            sharp_edges_angle_upper_bound,
+                                            false /*do not construct 
+                                                    octree*/);
+  if(!in) {
+    QApplication::restoreOverrideCursor();
+    return false;
+  }
+  is_octree_initialized = false;
+  selected_facet = selected_edge = -1;
+  update_data_structures();
+
+  connect_actions();
+  std::cerr << " Done.\n";
+  QApplication::restoreOverrideCursor();
+  float xmin, ymin, zmin, xmax, ymax, zmax;
+  get_bbox(xmin, ymin, zmin, xmax, ymax, zmax);
+  const float xcenter = (xmin + xmax) / 2;
+  const float ycenter = (ymin + ymax) / 2;
+  const float zcenter = (zmin + zmax) / 2;
+  const float xdelta = (-xmin + xmax);
+  const float ydelta = (-ymin + ymax);
+  const float zdelta = (-zmin + zmax);
+//   const float radius = std::max(std::max(xdelta, ydelta), zdelta) * std::sqrt(3.)/ 2.;
+  std::cerr << boost::format("Bounding box: xmin=%1%, ymin=%2%, zmin=%3%\n"
+                             "              xmax=%4%, ymax=%5%, zmax=%6%\n"
+                             "              center=(%7%, %8%, %9%)\n")
+    % xmin % ymin % zmin % xmax % ymax % zmax
+    % xcenter % ycenter % zcenter
+            << boost::format("              span=(%1%,%2%,%3%)\n")
+    % xdelta % ydelta % zdelta;
+  viewer->camera()->setSceneBoundingBox(qglviewer::Vec(xmin, ymin, zmin),
+                                        qglviewer::Vec(xmax, ymax, zmax));
+  viewer->setBackgroundColor(Qt::white);
+  viewer->showEntireScene();
+  
+  QAction* actionInverse_normals = qFindChild<QAction*>(this, "actionInverse_normals");
+  if(actionInverse_normals) actionInverse_normals->setChecked(false);
+  Q_EMIT set_dirty();
+  return true;
+}
+
+void Polyhedral_surface::close() 
+{
+  delete surface_ptr;
+  surface_ptr = 0;
+}
+
+void Polyhedral_surface::draw() {
+  draw(false);
+}
+
+void Polyhedral_surface::drawWithNames() {
+  draw(true);
+}
+
+void Polyhedral_surface::postSelection(const QPoint&)
+{
+  if(!surface_ptr) return;
+
+  selected_facet = selected_edge = -1;
+    
+  const int nb_vertices = surface_ptr->incidence_graph.vertices.size();
+  const int nb_edges = surface_ptr->incidence_graph.edges.size();
+  if(viewer->selectedName() >= nb_edges + nb_vertices)
+    selected_facet = viewer->selectedName() - nb_edges - nb_vertices;
+  else if(viewer->selectedName() >= nb_vertices)
+    selected_edge = viewer->selectedName() - nb_vertices;
+
+  std::cerr << boost::format("post-selection.\n"
+                             "selectedName()=%1%\n"
+                             "selected edge=%2%\n"
+                             "selected facet=%3%\n")
+    % viewer->selectedName() % selected_edge % selected_facet;
+
+  Q_EMIT set_dirty();
+}
+  
+void Polyhedral_surface::draw(bool with_names)
+{
+  if(!list_id)
+  {
+    std::cerr << "Generating OpenGL display list ID: ";
+    std::cerr << (list_id = ::glGenLists(1)) << "\n";
+  }
+  if(!with_names)
+  {
+    if(is_dirty)
+      ::glNewList(list_id, GL_COMPILE_AND_EXECUTE);
+    else if(::glIsList(list_id))
+    {
+      ::glCallList(list_id);
+      return;
+    }
+    else
+      std::cerr << "Call list (" << list_id << ")failed.\n";
+  }
+
+  if(surface_ptr)
+  {
+    if(display_surface)
+    {
+      // enable polygon offset
+      ::glEnable(GL_POLYGON_OFFSET_FILL);
+      ::glPolygonOffset(1.0f,1.0f);
+      ::glEnable(GL_LIGHTING);
+      ::glColor3f(0.2f, 0.2f, 1.f);
+      if(with_names)
+        surface_ptr->gl_draw_direct_triangles_with_name(false,
+                                                        true,
+                                                        inverse_normals());
+      else
+        surface_ptr->gl_draw_almost_all_triangles(selected_facet,
+                                                  false,
+                                                  true,
+                                                  inverse_normals());
+      if(!with_names && selected_facet >= 0)
+      {
+        ::glColor3f(1., 1.f, 0.f);
+        surface_ptr->incidence_graph.gl_draw_facet(selected_facet,
+                                                   false,
+                                                   true,
+                                                   inverse_normals());
+      }
+      ::glDisable(GL_LIGHTING);
+      ::glLineWidth(1.0f);
+      if(display_all_edges)
+      {
+        // superimpose ordinary edges
+        ::glColor3d(0.,0.,.8);
+        surface_ptr->superimpose_edges(false,display_control_edges);
+      }
+      // superimpose control edges
+      if(display_control_edges)
+      {
+        ::glDisable(GL_LIGHTING);
+        ::glColor3d(.0, .0, .0);
+        ::glLineWidth(1.0f);
+        surface_ptr->superimpose_edges(true,false);
+      }
+
+      // draw sharp edges
+      ::glColor3ub(128,128,128);
+      if(with_names)
+        surface_ptr->gl_draw_sharp_edges_with_names(3.0f,255,0,0);
+      else
+        surface_ptr->gl_draw_sharp_edges(3.0f,255,0,0);
+      if(!with_names && selected_edge >= 0)
+      {
+        ::glLineWidth(3.0f);
+        ::glColor3d(0., 1., 0.);
+        surface_ptr->incidence_graph.gl_draw_edge(selected_edge);
+      }
+    } // end if display_surface
+    if(!with_names && (display_octree||display_edges_octree) )
+    {
+      ::glColor3ub(0,0,0);
+      ::glLineWidth(1.0f);
+      ::glDisable(GL_LIGHTING);
+      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+      ::glEnable(GL_LINE_STIPPLE);
+      if(display_octree)
+      {
+        ::glColor3ub(0,0,0);
+        surface_ptr->gl_draw_facet_octree();
+      }
+      if(display_edges_octree)
+      {
+        ::glColor3d(1.,0.,0.);
+        surface_ptr->gl_draw_edges_octree();
+      }
+      ::glDisable(GL_LINE_STIPPLE);
+      ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+      ::glEnable(GL_LIGHTING);
+    } // end if display_octree
+      
+    ::glDisable(GL_POLYGON_OFFSET_FILL);
+      
+    if(!with_names && is_dirty)
+    {
+      ::glEndList();
+      is_dirty = false;
+    }
+  } // end if(surface_ptr)
+}
+void Polyhedral_surface::get_bbox(float& xmin, float& ymin, float& zmin,
+                                  float& xmax, float& ymax, float& zmax)
+{
+  if(surface_ptr) {
+    xmin=surface_ptr->bbox().xmin();
+    ymin=surface_ptr->bbox().ymin();
+    ymin=surface_ptr->bbox().zmin();
+    xmax=surface_ptr->bbox().xmax();
+    ymax=surface_ptr->bbox().ymax();
+    zmax=surface_ptr->bbox().zmax();
+  }
+  else 
+  {
+    xmin = ymin = zmin = 0.f;
+    xmax = ymax = zmax = 1.f;
+  }
+}
+
+void Polyhedral_surface::set_inverse_normals(const bool b) {
+  m_inverse_normals = b;
+  set_dirty();
+}
+
+bool Polyhedral_surface::inverse_normals() const {
+  return m_inverse_normals;
+}
+
+
+Surface* get_polyhedral_surface(QObject* parent,
+				double sharp_edges_angle_lower_bound,
+				double sharp_edges_angle_upper_bound = 180.)
+{
+  return new Polyhedral_surface(parent,
+				sharp_edges_angle_lower_bound,
+				sharp_edges_angle_upper_bound);
+}
+
+#include "polyhedral_surface.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.h
new file mode 100644
index 0000000..d65fe63
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/polyhedral_surface.h
@@ -0,0 +1,103 @@
+#ifndef _POLYHEDRAL_SURFACE_H
+#define _POLYHEDRAL_SURFACE_H
+
+#define CGAL_SURFACE_MESHER_DEBUG_POLYHEDRAL_SURFACE_CONSTRUCTION
+
+#include "surface.h"
+#include "viewer.h"
+#include <CGAL/gl.h>
+
+#include <map>
+#include <utility>
+
+typedef std::pair<const char*, const char*> Signal_slot_pair;
+typedef std::map<const char*, Signal_slot_pair> Connection_map;
+
+// CGAL
+#include <CGAL/basic.h>
+
+// kernel
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+// surface
+#include <CGAL/Polyhedral_surface_3.h>
+
+// piece-wise loop subdivision
+#include <CGAL/pws_loop_subdivision.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Poly_kernel;
+typedef Poly_kernel::FT FT;
+typedef Poly_kernel::Point_3 Poly_point;
+typedef Poly_kernel::Sphere_3 Sphere;
+typedef Poly_kernel::Vector_3 Vector;
+typedef Poly_kernel::Triangle_3 Triangle_3;
+
+typedef CGAL::Polyhedral_surface_3<Poly_kernel,
+              CGAL::Surface_mesher::Has_edges> CGAL_polyhedral_surface;
+
+
+class Polyhedral_surface : public Surface
+{
+  Q_OBJECT;
+  
+public:
+  Polyhedral_surface(QObject* parent,
+		     double sharp_edges_angle_lower_bound = 90,
+		     double sharp_edges_angle_upper_bound = 120);
+
+  ~Polyhedral_surface();
+public Q_SLOTS:
+  void clear();
+  void connect_actions();
+  void display_nb_elements_in_status_bar() const;
+  void set_dirty();
+  void busy() const;
+  void not_busy() const;
+  void set_sharp_edges_angle_bounds(const double lower_bound,
+                                    const double upper_bound);
+  void update_data_structures();
+  void construct_octree();
+  void toggle_display_octree(bool b);
+  void toggle_display_edges_octree(bool b);
+  void toggle_display_surface(bool b);
+  void toggle_display_all_edges(bool b);
+  void toggle_display_control_edges(bool b);
+  void make_one_subdivision_step();
+  void on_action_Options_triggered();
+
+public:
+  bool open(const QString& filename);
+  void close();
+  void draw();
+  void drawWithNames();
+  void postSelection(const QPoint&);
+  void draw(bool with_names);
+  void get_bbox(float& xmin, float& ymin, float& zmin,
+		float& xmax, float& ymax, float& zmax);
+
+public Q_SLOTS:
+  void set_inverse_normals(const bool b);
+
+public:
+  bool inverse_normals() const;
+
+protected:
+  bool m_inverse_normals;
+  CGAL_polyhedral_surface* surface_ptr;
+  QObject* parent;
+  bool display_octree;
+  bool display_edges_octree;
+  bool display_surface;
+  bool display_all_edges;
+  bool display_control_edges;
+  double sharp_edges_angle_lower_bound;
+  double sharp_edges_angle_upper_bound;
+  bool is_octree_initialized;
+  int selected_edge;
+  int selected_facet;
+  bool is_dirty;
+  GLint list_id;
+  Connection_map connection_map;
+};
+
+#endif // _POLYHEDRAL_SURFACE_H
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/surface.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/surface.h
new file mode 100644
index 0000000..bc414e7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/surface.h
@@ -0,0 +1,37 @@
+#ifndef _SURFACE_H
+#define _SURFACE_H
+
+#include <QObject>
+#include <QString>
+#include <QGLWidget>
+
+#include "viewer.h"
+
+class Surface : public QObject
+{
+  Q_OBJECT
+protected:
+  Surface(QObject* parent)
+  {
+    viewer = parent->findChild<Viewer*>("viewer");
+
+    if(viewer)
+      connect(this, SIGNAL(changed()), viewer, SLOT(updateGL()));
+    viewer->set_surface(this);
+  }
+public Q_SLOTS:
+  virtual bool open(const QString& filename) = 0;
+  virtual void close() = 0;
+  virtual void draw() = 0;
+  virtual void get_bbox(float&, float&, float&,
+			float&, float&, float&) = 0;
+  virtual void drawWithNames() {};
+  virtual void postSelection(const QPoint&) {};
+Q_SIGNALS:
+  void changed();
+
+protected:
+  Viewer* viewer;
+};
+
+#endif // _SURFACE_H
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/surface_mesher.qrc b/3rdparty/CGAL-4.8/demo/Surface_mesher/surface_mesher.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/surface_mesher.qrc
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/surface_mesher.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/mainwindow.ui b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/mainwindow.ui
new file mode 100644
index 0000000..65b8a52
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/mainwindow.ui
@@ -0,0 +1,808 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1147</width>
+    <height>648</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Surface mesh generator</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../surface_mesher.qrc">
+    <normaloff>:/icons/cgal_logo.xpm</normaloff>:/icons/cgal_logo.xpm</iconset>
+  </property>
+  <property name="dockNestingEnabled">
+   <bool>true</bool>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout_4">
+    <item row="0" column="0">
+     <widget class="Viewer" name="viewer" native="true">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>1</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1147</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="action_Open"/>
+    <addaction name="action_OpenDirectory"/>
+    <addaction name="actionSave"/>
+    <addaction name="actionExport_surface_mesh_to_OFF"/>
+    <addaction name="separator"/>
+    <addaction name="action_Quit"/>
+   </widget>
+   <widget class="QMenu" name="menuOptions">
+    <property name="title">
+     <string>&Options</string>
+    </property>
+    <property name="show_only_in" stdset="0">
+     <stringlist>
+      <string>volume</string>
+      <string>polyhedral</string>
+     </stringlist>
+    </property>
+    <addaction name="actionInverse_normals"/>
+    <addaction name="actionDisplay_octree"/>
+    <addaction name="actionDisplay_surface"/>
+    <addaction name="actionDisplay_control_edges"/>
+    <addaction name="actionDisplay_all_edges"/>
+    <addaction name="action_Options"/>
+    <addaction name="actionAuto_resize"/>
+    <addaction name="actionDisplay_front_and_back"/>
+    <addaction name="actionDraw_triangles_edges"/>
+    <addaction name="actionUse_Gouraud_shading"/>
+    <addaction name="actionShow_triangulation"/>
+    <addaction name="actionTriangulation_edges_color"/>
+    <addaction name="actionShow_the_image_bounding_box"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+    <property name="show_only_in" stdset="0">
+     <stringlist>
+      <string>polyhedral</string>
+     </stringlist>
+    </property>
+    <addaction name="actionSubdivision"/>
+   </widget>
+   <addaction name="menu_File"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuOptions"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>Actions toolbar</string>
+   </property>
+   <property name="allowedAreas">
+    <set>Qt::AllToolBarAreas</set>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="action_Open"/>
+   <addaction name="actionExport_surface_mesh_to_OFF"/>
+   <addaction name="separator"/>
+   <addaction name="actionAuto_resize"/>
+   <addaction name="actionDisplay_front_and_back"/>
+   <addaction name="actionInverse_normals"/>
+   <addaction name="actionShow_the_image_bounding_box"/>
+   <addaction name="separator"/>
+   <addaction name="actionDisplay_surface"/>
+   <addaction name="actionDisplay_octree"/>
+   <addaction name="actionDisplay_edges_octree"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar_meshing">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="windowTitle">
+    <string>Meshing toolbar</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionMarching_cubes"/>
+   <addaction name="actionSurface_mesher"/>
+  </widget>
+  <widget class="QDockWidget" name="ImageOptions">
+   <property name="allowedAreas">
+    <set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
+   </property>
+   <property name="windowTitle">
+    <string>Images options</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>1</number>
+   </attribute>
+   <widget class="QWidget" name="ImageOptionsContents">
+    <layout class="QGridLayout" name="gridLayout_2">
+     <item row="0" column="0">
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QGroupBox" name="groupBoxImageType">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="title">
+          <string>&Image type</string>
+         </property>
+         <property name="show_only_in" stdset="0">
+          <stringlist>
+           <string>volume</string>
+          </stringlist>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout">
+          <item>
+           <widget class="QRadioButton" name="grayLevelRadioButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Grayscale image</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="labellizedRadioButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>Segmented image</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox">
+         <property name="title">
+          <string>&Operations</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <item>
+           <widget class="QCheckBox" name="interpolationCheckBox">
+            <property name="text">
+             <string>Trilinear interpolation</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="searchSeedsCheckBox">
+            <property name="text">
+             <string>Search for seeds</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBoxCriteria">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="title">
+          <string>C&riteria</string>
+         </property>
+         <property name="show_only_in" stdset="0">
+          <stringlist>
+           <string>volume</string>
+          </stringlist>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_2">
+          <item>
+           <widget class="QCheckBox" name="manifoldCheckBox">
+            <property name="text">
+             <string>Manifold</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="sameIndexCheckBox">
+            <property name="text">
+             <string>Facets vertices have same index</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="gridLayout">
+            <item row="0" column="0">
+             <widget class="QLabel" name="label">
+              <property name="text">
+               <string>&Sizing bound:</string>
+              </property>
+              <property name="buddy">
+               <cstring>spinBox_radius_bound</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QDoubleSpinBox" name="spinBox_radius_bound">
+              <property name="decimals">
+               <number>5</number>
+              </property>
+              <property name="maximum">
+               <double>9999.989999999999782</double>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLabel" name="label_2">
+              <property name="text">
+               <string>&Distance bound:</string>
+              </property>
+              <property name="buddy">
+               <cstring>spinBox_distance_bound</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QDoubleSpinBox" name="spinBox_distance_bound">
+              <property name="decimals">
+               <number>5</number>
+              </property>
+              <property name="maximum">
+               <double>9999.989999999999782</double>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="0">
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>0</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QDockWidget" name="ImageLabels">
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="windowTitle">
+    <string>Image sub-domaines</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>1</number>
+   </attribute>
+   <widget class="QWidget" name="ImageLabelsContents">
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+      <horstretch>10</horstretch>
+      <verstretch>10</verstretch>
+     </sizepolicy>
+    </property>
+    <layout class="QGridLayout" name="gridLayout_3">
+     <item row="0" column="0">
+      <widget class="Values_list" name="values" native="true">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>5</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="show_only_in" stdset="0">
+        <stringlist>
+         <string>volume</string>
+        </stringlist>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <action name="action_Open">
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/fileopen.png</normaloff>:/icons/fileopen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Open...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="action_Quit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+   <property name="menuRole">
+    <enum>QAction::QuitRole</enum>
+   </property>
+  </action>
+  <action name="actionInverse_normals">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/flip.png</normaloff>:/icons/flip.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Inverse normals</string>
+   </property>
+   <property name="iconText">
+    <string>Flip</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+I</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_octree">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/bbox.png</normaloff>:/icons/bbox.png</iconset>
+   </property>
+   <property name="text">
+    <string>Display oc&tree</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+T</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_surface">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/surface.png</normaloff>:/icons/surface.png</iconset>
+   </property>
+   <property name="text">
+    <string>Display &surface</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="action_Options">
+   <property name="text">
+    <string>&Options...</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionSubdivision">
+   <property name="text">
+    <string>Piecewise-smooth &subdivision</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_all_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Display &all edges</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+A</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_control_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Display &control edges</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_edges_octree">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/bbox-red.png</normaloff>:/icons/bbox-red.png</iconset>
+   </property>
+   <property name="text">
+    <string>Display edges octree</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionMarching_cubes">
+   <property name="text">
+    <string>Marching &cubes</string>
+   </property>
+   <property name="iconText">
+    <string>Marching &cubes</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionSurface_mesher">
+   <property name="text">
+    <string>Surface &mesher</string>
+   </property>
+   <property name="iconText">
+    <string>Surface &mesher</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDisplay_front_and_back">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/twosides.png</normaloff>:/icons/twosides.png</iconset>
+   </property>
+   <property name="text">
+    <string>Display facets with &front and back</string>
+   </property>
+   <property name="iconText">
+    <string>Two-sides</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+F</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="action_Clone">
+   <property name="text">
+    <string>Clone</string>
+   </property>
+  </action>
+  <action name="actionAuto_resize">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/resize.png</normaloff>:/icons/resize.png</iconset>
+   </property>
+   <property name="text">
+    <string>Auto-&resize</string>
+   </property>
+   <property name="iconText">
+    <string>Auto-&resize</string>
+   </property>
+   <property name="toolTip">
+    <string>Automaticaly zoom in or out when the object change.</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+     <string>polyhedral</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionDraw_triangles_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Draw triangles &edges</string>
+   </property>
+   <property name="iconText">
+    <string>Draw triangles &edges</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+E</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionUse_Gouraud_shading">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Use &Gouraud shading (marching cube only)</string>
+   </property>
+   <property name="iconText">
+    <string>Use &Gouraud shading</string>
+   </property>
+   <property name="statusTip">
+    <string>Use Gouraud shading to display the marching cubes.</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+G</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionShow_triangulation">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show the whole &triangulation (surface mesher only)</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+T</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionTriangulation_edges_color">
+   <property name="text">
+    <string>Choose the triangulation edges &color...</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionExport_surface_mesh_to_OFF">
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/filesave.png</normaloff>:/icons/filesave.png</iconset>
+   </property>
+   <property name="text">
+    <string>Export surface mesh to OFF...</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionShow_the_image_bounding_box">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/bbox.png</normaloff>:/icons/bbox.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show the image &bounding box</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+B</string>
+   </property>
+   <property name="show_only_in" stdset="0">
+    <stringlist>
+     <string>volume</string>
+    </stringlist>
+   </property>
+  </action>
+  <action name="actionSave">
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/filesave.png</normaloff>:/icons/filesave.png</iconset>
+   </property>
+   <property name="text">
+    <string>Save the image as Inrimage...</string>
+   </property>
+  </action>
+  <action name="action_OpenDirectory">
+   <property name="icon">
+    <iconset resource="../surface_mesher.qrc">
+     <normaloff>:/icons/fileopen.png</normaloff>:/icons/fileopen.png</iconset>
+   </property>
+   <property name="text">
+    <string>Open directory...</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>Values_list</class>
+   <extends>QWidget</extends>
+   <header>values_list.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>Viewer</class>
+   <extends>QWidget</extends>
+   <header>viewer.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>viewer</tabstop>
+  <tabstop>grayLevelRadioButton</tabstop>
+  <tabstop>labellizedRadioButton</tabstop>
+  <tabstop>manifoldCheckBox</tabstop>
+  <tabstop>sameIndexCheckBox</tabstop>
+  <tabstop>spinBox_radius_bound</tabstop>
+  <tabstop>spinBox_distance_bound</tabstop>
+ </tabstops>
+ <resources>
+  <include location="../surface_mesher.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>labellizedRadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>sameIndexCheckBox</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>130</x>
+     <y>172</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>139</x>
+     <y>414</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/optionsdialog.ui b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/optionsdialog.ui
new file mode 100644
index 0000000..2ea13d1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/optionsdialog.ui
@@ -0,0 +1,128 @@
+<ui version="4.0" >
+ <class>OptionDialog</class>
+ <widget class="QDialog" name="OptionDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>210</width>
+    <height>167</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Set options</string>
+  </property>
+  <property name="windowIcon" >
+   <iconset resource="../../../../../Surface_mesher/demo/Surface_mesher/qt5-demo/surface_mesher.qrc" >:/icons/cgal_logo.xpm</iconset>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Sharp edges angle bounds</string>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label" >
+          <property name="text" >
+           <string>&Lower bound</string>
+          </property>
+          <property name="buddy" >
+           <cstring>angle_lower_bound</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QDoubleSpinBox" name="angle_lower_bound" >
+          <property name="maximum" >
+           <double>180.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="label_2" >
+          <property name="text" >
+           <string>&Upper bound</string>
+          </property>
+          <property name="buddy" >
+           <cstring>angle_upper_bound</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QDoubleSpinBox" name="angle_upper_bound" >
+          <property name="maximum" >
+           <double>180.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../../../../../Surface_mesher/demo/Surface_mesher/qt5-demo/surface_mesher.qrc" />
+ </resources>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>OptionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>227</x>
+     <y>215</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>90</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>OptionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>243</x>
+     <y>221</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>252</x>
+     <y>90</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/raw_image.ui b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/raw_image.ui
new file mode 100644
index 0000000..e270d1d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/raw_image.ui
@@ -0,0 +1,454 @@
+<ui version="4.0" >
+ <class>Raw_image_dialog</class>
+ <widget class="QDialog" name="Raw_image_dialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>585</width>
+    <height>342</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Open raw image</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" >
+   <item>
+    <widget class="QGroupBox" name="groupBox_2" >
+     <property name="title" >
+      <string>Image &value type</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="2" column="0" >
+       <widget class="QRadioButton" name="short_bt" >
+        <property name="text" >
+         <string>Short (16 bits)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QRadioButton" name="float_bt" >
+        <property name="text" >
+         <string>Float</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QRadioButton" name="int_bt" >
+        <property name="text" >
+         <string>Int (32 bits)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" >
+       <widget class="QRadioButton" name="double_bt" >
+        <property name="text" >
+         <string>Double</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QCheckBox" name="signed_bt" >
+        <property name="text" >
+         <string>Signed</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QRadioButton" name="char_bt" >
+        <property name="text" >
+         <string>char (8 bits)</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Image dimensions</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2" >
+      <item>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label_dim" >
+          <property name="text" >
+           <string>&Dimensions:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>dim_x</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="label_spacing" >
+          <property name="text" >
+           <string>&Spacing:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>spacing_x</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QSpinBox" name="dim_x" >
+          <property name="prefix" >
+           <string>x: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2" >
+         <widget class="QSpinBox" name="dim_y" >
+          <property name="prefix" >
+           <string>y: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3" >
+         <widget class="QSpinBox" name="dim_z" >
+          <property name="prefix" >
+           <string>z: </string>
+          </property>
+          <property name="maximum" >
+           <number>100000000</number>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QDoubleSpinBox" name="spacing_x" >
+          <property name="prefix" >
+           <string>vx: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2" >
+         <widget class="QDoubleSpinBox" name="spacing_y" >
+          <property name="prefix" >
+           <string>vy: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="3" >
+         <widget class="QDoubleSpinBox" name="spacing_z" >
+          <property name="prefix" >
+           <string>vz: </string>
+          </property>
+          <property name="decimals" >
+           <number>5</number>
+          </property>
+          <property name="value" >
+           <double>1.000000000000000</double>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QLabel" name="offset_label" >
+          <property name="text" >
+           <string>&Offset:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy" >
+           <cstring>offset</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QSpinBox" name="offset" >
+          <property name="suffix" >
+           <string> bytes</string>
+          </property>
+          <property name="maximum" >
+           <number>999999999</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="imagesize_budy" >
+          <property name="text" >
+           <string>Image size:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="label_image_size" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2" >
+         <widget class="QLabel" name="filesize_budy" >
+          <property name="text" >
+           <string>File size:</string>
+          </property>
+          <property name="alignment" >
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QLabel" name="label_file_size" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Open</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>int_bt</tabstop>
+  <tabstop>short_bt</tabstop>
+  <tabstop>signed_bt</tabstop>
+  <tabstop>float_bt</tabstop>
+  <tabstop>double_bt</tabstop>
+  <tabstop>dim_x</tabstop>
+  <tabstop>dim_y</tabstop>
+  <tabstop>dim_z</tabstop>
+  <tabstop>spacing_x</tabstop>
+  <tabstop>spacing_y</tabstop>
+  <tabstop>spacing_z</tabstop>
+  <tabstop>offset</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>float_bt</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>signed_bt</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>47</x>
+     <y>112</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>553</x>
+     <y>94</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>double_bt</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>signed_bt</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>564</x>
+     <y>127</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>564</x>
+     <y>94</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>191</x>
+     <y>316</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>183</x>
+     <y>313</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>253</x>
+     <y>319</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>252</x>
+     <y>312</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_x</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>178</x>
+     <y>187</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>99</x>
+     <y>141</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_z</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>473</x>
+     <y>178</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>441</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>char_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>71</x>
+     <y>52</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>137</x>
+     <y>3</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>short_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>117</x>
+     <y>81</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>49</x>
+     <y>6</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>float_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>137</x>
+     <y>111</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>67</x>
+     <y>-5</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>int_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>358</x>
+     <y>49</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>584</x>
+     <y>52</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>dim_y</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>332</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>271</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>double_bt</sender>
+   <signal>clicked()</signal>
+   <receiver>Raw_image_dialog</receiver>
+   <slot>update_image_size()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>514</x>
+     <y>119</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>581</x>
+     <y>116</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>update_image_size()</slot>
+ </slots>
+</ui>
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/ui/values_list.ui b/3rdparty/CGAL-4.8/demo/Surface_mesher/ui/values_list.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/ui/values_list.ui
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/ui/values_list.ui
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.cpp
new file mode 100644
index 0000000..e0c7c8c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.cpp
@@ -0,0 +1,272 @@
+#include "values_list.h"
+#include "ui_values_list.h"
+#include "colorlisteditor.h"
+#include <iostream>
+
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QTreeWidgetItemIterator>
+#include <QHeaderView>
+#include <QMetaProperty>
+#include <QItemDelegate>
+#include <QItemEditorFactory>
+#include <QItemEditorCreatorBase>
+#include <QPainter>
+#include <QStringList>
+#include <QString>
+#include <QList>
+#include <QVariant>
+#include <QSettings>
+#include <QUrl>
+#include <QLineEdit>
+#include <QDoubleValidator>
+
+Values_delegate::Values_delegate(QWidget* parent) : QItemDelegate(parent) {}
+void Values_delegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
+{
+  switch(index.column())
+  {
+  case Values_list::Color: {
+    painter->fillRect(option.rect, index.data().value<QColor>());
+    drawFocus(painter, option, option.rect);
+    break;
+  }
+  default:
+    QItemDelegate::paint(painter, option, index);
+  }
+}
+
+QWidget *Values_delegate::createEditor(QWidget *parent,
+                                          const QStyleOptionViewItem & option,
+                                          const QModelIndex & index) const
+{
+  if(index.column() == Values_list::Color)
+  {
+    return new ColorListEditor(parent);
+  }
+  else if(index.column() == Values_list::Value)
+  {
+    QLineEdit* lineedit = new QLineEdit(parent);
+    lineedit->setAutoFillBackground(true);
+    lineedit->setValidator(new QDoubleValidator(lineedit));
+    return lineedit;
+  }
+  else return QItemDelegate::createEditor(parent, option, index);
+}
+  
+void Values_delegate::setEditorData(QWidget *editor,
+                                       const QModelIndex &index) const
+{
+  if(index.column() == Values_list::Color)
+  {
+    ColorListEditor* coloreditor = qobject_cast<ColorListEditor*>(editor);
+    if(coloreditor)
+      coloreditor->setColor(index.data().value<QColor>());
+  }
+  else if(index.column() == Values_list::Value)
+  {
+    QLineEdit* lineedit = qobject_cast<QLineEdit*>(editor);
+    if(lineedit)
+      lineedit->setText(index.data().toString());
+  }
+  else QItemDelegate::setEditorData(editor, index);
+}
+void Values_delegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+                                      const QModelIndex &index) const
+{
+  if(index.column() == Values_list::Color)
+  {
+    ColorListEditor* coloreditor = qobject_cast<ColorListEditor*>(editor);
+    if(coloreditor)
+    {
+      model->setData(index, coloreditor->color());
+      Q_EMIT new_color(index);
+    }
+  }
+  else if(index.column() == Values_list::Value)
+  {
+    QLineEdit* lineedit = qobject_cast<QLineEdit*>(editor);
+    if(lineedit)
+    {
+      model->setData(index, lineedit->text().toDouble());
+      Q_EMIT new_value(index);
+    }
+  }
+  else QItemDelegate::setModelData(editor, model, index);
+}
+
+const double Values_list::default_value = 0.0;
+
+Values_list::Values_list(QWidget* parent):
+  QWidget(parent)
+{
+  Ui::Values_list().setupUi(this);
+
+  treeWidget = parent->findChild<QTreeWidget*>("treeWidget");
+  Q_ASSERT_X(treeWidget, "Values_list constructor", "cannot find widget \"treeWidget\"");
+
+  treeWidget->sortByColumn(Value, Qt::AscendingOrder);
+   
+  treeWidget->header()->setSectionsClickable(false);
+
+
+  Values_delegate* values_delegate = new Values_delegate(parent);
+
+  treeWidget->setItemDelegate(values_delegate);
+  connect(values_delegate, SIGNAL(new_value(const QModelIndex&)),
+          this, SIGNAL(values_changed()));
+  connect(values_delegate, SIGNAL(new_color(const QModelIndex&)),
+          this, SIGNAL(colors_changed()));
+  connect(this->treeWidget->model(),
+          SIGNAL(dataChanged (const QModelIndex &, const QModelIndex &)),
+          this, SIGNAL(changed()));
+
+  connect(this, SIGNAL(changed()),
+	  this, SLOT(update_items_cache()));
+}
+
+QColor Values_list::color(const int i) const
+{
+  if(i < 0 || i > treeWidget->topLevelItemCount())
+    return QColor();
+  else
+    return treeWidget->topLevelItem(i)->data(Color, Qt::DisplayRole).value<QColor>();
+}
+
+QColor Values_list::color(const QTreeWidgetItem* item) const
+{
+    return item->data(Color, Qt::DisplayRole).value<QColor>();
+}
+
+int Values_list::numberOfValues() const
+{
+  return treeWidget->topLevelItemCount();
+}
+
+double Values_list::value(const int i) const
+{
+  if(i < 0 || i > numberOfValues())
+    return 0.;
+  else
+    return treeWidget->topLevelItem(i)->data(Value, Qt::DisplayRole).toDouble();
+}
+
+QString Values_list::name(const int i) const
+{
+  if(i < 0 || i > treeWidget->topLevelItemCount())
+    return QString();
+  else
+    return treeWidget->topLevelItem(i)->data(Name, Qt::DisplayRole).toString();
+}
+
+bool Values_list::enabled(const int i) const
+{
+  if(i < 0 || i > treeWidget->topLevelItemCount())
+    return 0.;
+  else
+    return treeWidget->topLevelItem(i)->data(Value, Qt::CheckStateRole).toDouble();
+}
+
+bool Values_list::enabled(const QTreeWidgetItem* item) const
+{
+    return item->data(Value, Qt::CheckStateRole).toDouble();
+}
+
+const QTreeWidgetItem* Values_list::item(const int i) const
+{
+  if(i < 0 || i > treeWidget->topLevelItemCount())
+    return 0;
+  else
+    return treeWidget->topLevelItem(i);
+}
+
+void Values_list::save_values(QString filename) const
+{
+  QSettings settings;
+
+  settings.beginGroup(QUrl::toPercentEncoding(filename));
+  settings.beginWriteArray("values");
+  for (int i = 0; i < numberOfValues(); ++i) {
+    settings.setArrayIndex(i);
+    settings.setValue("value", value(i));
+    settings.setValue("color", color(i));
+    settings.setValue("name", name(i));
+    settings.setValue("enabled", enabled(i));
+  }
+ settings.endArray();
+ settings.endGroup();
+}
+
+void Values_list::load_values(QString filename) 
+{
+  QSettings settings;
+
+  treeWidget->clear();
+  settings.beginGroup(QUrl::toPercentEncoding(filename));
+  int nb = settings.beginReadArray("values");
+  for (int i = 0; i < nb; ++i) {
+    settings.setArrayIndex(i);
+    QTreeWidgetItem *newItem = new QTreeWidgetItem(treeWidget);
+    newItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
+    newItem->setData(Value, Qt::CheckStateRole, settings.value("enabled").toBool() ? Qt::Checked : Qt::Unchecked);
+    newItem->setData(Value, Qt::DisplayRole, settings.value("value").toDouble());
+    newItem->setData(Color, Qt::DisplayRole, settings.value("color").value<QColor>());
+    newItem->setData(Name, Qt::DisplayRole, settings.value("name").toString());
+  }
+  settings.endArray();
+  settings.endGroup();
+  update_items_cache();
+}
+
+void Values_list::on_minusButton_clicked()
+{
+  Q_FOREACH(QTreeWidgetItem* item, treeWidget->selectedItems())
+  {
+    //   treeWidget->invisibleRootItem()->removeChild(item);
+    delete item;
+  }
+  Q_EMIT values_changed();
+}
+
+void Values_list::on_plusButton_clicked()
+{
+  addValue();
+}
+
+void Values_list::addValue(const double i)
+{
+  QTreeWidgetItem *newItem = new QTreeWidgetItem(treeWidget);
+  newItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
+  newItem->setData(Value, Qt::CheckStateRole, Qt::Checked);
+  newItem->setData(Value, Qt::DisplayRole, i);
+  QStringList colors = QColor::colorNames();
+  const int color_index = qrand() % colors.size();
+  QColor color = QColor(colors[color_index]);
+  newItem->setData(Color, Qt::DisplayRole, color);
+  newItem->setData(Name, Qt::DisplayRole, "");
+  Q_EMIT values_changed();
+}
+
+void Values_list::update_items_cache() {
+  items_cache.clear();
+  for(int i = 0, nb = numberOfValues(); i < nb; ++i) {
+    items_cache.insert(std::make_pair(value(i), item(i)));
+  }
+}
+
+const QTreeWidgetItem* Values_list::search(const double value) const
+{
+  Items_cache::const_iterator it = items_cache.find(value);
+  if(it != items_cache.end()) {
+    return it->second;
+  }
+  else {
+    return 0;
+  }
+}
+
+void Values_list::setHeaderTitle(QString title)
+{
+  treeWidget->headerItem()->setText(0, title);
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.h
new file mode 100644
index 0000000..e35be43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.h
@@ -0,0 +1,79 @@
+#ifndef _VALUES_LIST_H
+#define _VALUES_LIST_H
+
+#include <QWidget>
+#include <QString>
+#include <QList>
+#include <QModelIndex>
+#include <QItemDelegate>
+
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class Values_delegate : public QItemDelegate
+{
+  Q_OBJECT
+public:
+  Values_delegate(QWidget* parent);
+
+Q_SIGNALS:
+  void new_color(const QModelIndex&) const;
+  void new_value(const QModelIndex&) const;
+
+protected:
+  void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
+  QWidget *createEditor(QWidget *parent,
+                        const QStyleOptionViewItem & option,
+                        const QModelIndex & index) const;
+  void setEditorData(QWidget *editor,
+                     const QModelIndex &index) const;
+  void setModelData(QWidget *editor, QAbstractItemModel *model,
+                    const QModelIndex &index) const;
+};
+
+class Values_list : public QWidget
+{
+  Q_OBJECT 
+public:
+  enum Field { Value = 0 , Color = 1, Name = 2};
+  Values_list(QWidget* parent);
+  
+  // const accessors
+  int numberOfValues() const;
+  QColor color(const int i) const;
+  QColor color(const QTreeWidgetItem* i) const;
+  double value(const int i) const;
+  QString name(const int i) const;
+  bool enabled(const int i) const;
+  bool enabled(const QTreeWidgetItem* i) const;
+  const QTreeWidgetItem* item(const int i) const;
+  const QTreeWidgetItem* search(const double value) const;
+
+public Q_SLOTS:
+  void save_values(QString) const;
+  void load_values(QString);
+  void on_plusButton_clicked();
+  void on_minusButton_clicked();
+
+  // setters
+  void addValue(const double v = Values_list::default_value);
+
+  void setHeaderTitle(QString);
+
+private Q_SLOTS:
+  void update_items_cache();
+
+Q_SIGNALS:
+  void changed();
+  void colors_changed();
+  void values_changed();
+private:
+  QTreeWidget* treeWidget;
+  typedef std::map<double, const QTreeWidgetItem*> Items_cache;
+  Items_cache items_cache;
+
+  static const double default_value;
+};
+
+#endif // _VALUES_LIST_H
+
diff --git a/3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.qrc b/3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Surface_mesher/values_list.qrc
rename to 3rdparty/CGAL-4.8/demo/Surface_mesher/values_list.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.cpp
new file mode 100644
index 0000000..6618268
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.cpp
@@ -0,0 +1,68 @@
+#include "viewer.h"
+#include "surface.h"
+#include <QAction>
+#include <QGLViewer/manipulatedCameraFrame.h>
+
+Viewer::Viewer(QWidget* parent)
+  : QGLViewer(parent), surface(0)
+{
+  // Do not store state in a file
+  setStateFileName("");
+}
+
+void Viewer::init()
+{
+  setBackgroundColor(Qt::white);
+  glLineStipple(5, 0xaaaa);
+  glDisable(GL_LINE_STIPPLE);
+
+  // anti-aliasing
+  glEnable(GL_BLEND);
+  glEnable(GL_LINE_SMOOTH);
+  glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
+  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+}
+
+QString Viewer::helpString() const
+{
+  return ""
+  "<h1>Surface mesher demo</h1>\n"
+  "<p>No help availlable for now.</p>";
+}
+
+void Viewer::interpolateToFitBoundingBox(double xmin, double ymin, double zmin,
+                                         double xmax, double ymax, double zmax)
+{
+  QAction* auto_resize = parent()->parent()->findChild<QAction*>("actionAuto_resize");
+  Q_ASSERT_X(auto_resize, "Viewer::interpolateToFitBoundingBox", "cannot find action \"actionAuto_resize\"");
+  if(auto_resize && auto_resize->isChecked())
+  {
+    qglviewer::Camera new_camera = *(camera ());
+    new_camera.fitBoundingBox(qglviewer::Vec(xmin, ymin, zmin),
+                              qglviewer::Vec(xmax, ymax, zmax));
+    camera()->interpolateTo(*new_camera.frame(), 1.);
+  }
+}
+
+void Viewer::draw()
+{
+  if(surface)
+    surface->draw();
+}
+
+void Viewer::drawWithNames()
+{
+  if(surface)
+    surface->drawWithNames();
+}
+void Viewer::postSelection(const QPoint& p)
+{
+  if(surface)
+    surface->postSelection(p);
+}
+
+void Viewer::set_surface(Surface* s)
+{
+  surface = s;
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.h
new file mode 100644
index 0000000..4e7ee59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/viewer.h
@@ -0,0 +1,29 @@
+#ifndef _VIEWER_H
+#define _VIEWER_H
+
+#include <QGLViewer/qglviewer.h>
+
+class Surface;
+
+class Viewer : public QGLViewer
+{
+  Q_OBJECT
+public:
+  Viewer(QWidget* parent);
+
+  void set_surface(Surface*);
+
+public Q_SLOTS:
+  void interpolateToFitBoundingBox(double, double, double, double, double, double);
+
+protected :
+  virtual void init();
+  virtual void draw();
+  virtual void drawWithNames();
+  virtual void postSelection(const QPoint&);
+  virtual QString helpString() const;
+
+  Surface* surface;
+};
+
+#endif // _VIEWER_H
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.cpp b/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.cpp
new file mode 100644
index 0000000..244d876
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.cpp
@@ -0,0 +1,1550 @@
+#include <CGAL/basic.h>
+
+#include "volume.h"
+
+#include  <algorithm> // std::sort
+#include <boost/shared_ptr.hpp>
+#include <fstream>
+#include <boost/foreach.hpp>
+
+#include <CGAL/Bbox_3.h>
+
+#include "viewer.h"
+#include "mainwindow.h"
+#include "values_list.h"
+
+#include "File_XT.h" // format XT from Total/ELF
+
+#include <QApplication>
+#include <QFileDialog>
+#include <QAction>
+#include <QStatusBar>
+#include <QDoubleSpinBox>
+#include <QMessageBox>
+#include <QTreeWidgetItem>
+#include <QTime>
+#include <QColor>
+#include <QColorDialog>
+#include <QSettings>
+#include <QUrl>
+#include "Raw_image_dialog.h"
+#include <CGAL/Surface_mesher/Standard_criteria.h>
+// #include <CGAL/Surface_mesher/Image_surface_oracle_3.h>
+#include <CGAL/Surface_mesher/Implicit_surface_oracle_3.h>
+#include <CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h>
+#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Qt/debug.h>
+
+struct Threshold : public std::unary_function<FT, unsigned char> {
+  double isovalue;
+  bool is_identity;
+
+  Threshold(double isovalue) : isovalue(isovalue), is_identity(false) {}
+
+  result_type operator()(FT value)
+  {
+    if(is_identity)
+      return static_cast<unsigned char>(value);
+    else if(value >=  isovalue)
+      return 1;
+    else
+      return 0;
+  }
+};
+
+class Classify_from_isovalue_list :
+  public std::unary_function<FT, unsigned char> 
+{
+  typedef std::pair<FT, result_type> Isovalue;
+  typedef std::vector<Isovalue> Isovalues;
+  boost::shared_ptr<Isovalues> isovalues;
+  bool is_identity;
+
+  struct Sort_isovalues : std::binary_function<Isovalue, Isovalue, bool> 
+  {
+    bool operator()(const Isovalue& isoval1, const Isovalue& isoval2)
+    {
+      return isoval1.first < isoval2.first;
+    }
+  };
+public:
+  Classify_from_isovalue_list(Values_list * list)
+    : is_identity(false)
+  {
+    isovalues = boost::shared_ptr<Isovalues>(new Isovalues(list->numberOfValues()));
+    for(int i = 0, nbs = list->numberOfValues(); i < nbs; ++i )
+      (*isovalues)[i] = std::make_pair(list->value(i), i);
+    std::sort(isovalues->begin(), isovalues->end(), Sort_isovalues());
+  }
+
+  void set_identity(bool b) {
+    is_identity = b;
+  }
+
+  result_type operator()(FT value)
+  {
+    if(is_identity) {
+      return static_cast<unsigned char>(value);
+    }
+    result_type result = 0;
+//     std::cerr << "isovalues: ";
+    for(int i = 1, end = static_cast<int>(isovalues->size()); i <= end; ++i)
+    {
+//       std::cerr << (*isovalues)[i-1] << ", ";
+      if(value >= (*isovalues)[i-1].first &&
+         i >= result)
+      {
+        result = i;
+      }
+    }
+//     if(result>1)
+//       std::cerr << "result = "  << (int)result << "/" << list->numberOfValues() << std::endl;
+//     else
+//       std::cerr << std::endl;
+    if(result>0)
+      return (*isovalues)[result-1].second + 1;
+    else
+      return 0;
+  }
+};
+
+class Generate_surface_identifiers :
+  public std::binary_function<Classify_from_isovalue_list::result_type,
+                              Classify_from_isovalue_list::result_type,
+                              const QTreeWidgetItem*>
+{
+  Values_list* list;
+  bool labellized;
+
+public:
+  Generate_surface_identifiers(Values_list* list)
+    : list(list), labellized(false) {};
+
+  void set_labellized_image(bool b)
+  {
+    labellized = b;
+  }
+
+  result_type operator()(const Classify_from_isovalue_list::result_type& a,
+                         const Classify_from_isovalue_list::result_type& b)
+  {
+    if(labellized)
+      return list->search((std::max)(a, b));
+    else
+      return list->item((std::min)(a, b));
+  }
+};
+
+// class Classify_from_isovalue_list :
+//   public std::unary_function<FT, const QTreeWidgetItem*> 
+// {
+//   typedef std::pair<FT, result_type> Isovalue;
+//   typedef std::vector<Isovalue> Isovalues;
+//   boost::shared_ptr<Isovalues> isovalues;
+
+//   struct Sort_isovalues : std::binary_function<Isovalue, Isovalue, bool> 
+//   {
+//     bool operator()(const Isovalue& isoval1, const Isovalue& isoval2)
+//     {
+//       return isoval1.first < isoval2.first;
+//     }
+//   };
+// public:
+//   Classify_from_isovalue_list(Isovalues_list * list)
+//   {
+//     isovalues = boost::shared_ptr<Isovalues>(new Isovalues(list->numberOfIsoValues()));
+//     for(int i = 0, nbs = list->numberOfIsoValues(); i < nbs; ++i )
+//       (*isovalues)[i] = std::make_pair(list->isovalue(i), list->item(i));
+//     std::sort(isovalues->begin(), isovalues->end(), Sort_isovalues());
+//   }
+
+//   result_type operator()(FT value)
+//   {
+//     int result = 0;
+// //     std::cerr << "isovalues: ";
+//     for(int i = 1, end = isovalues->size(); i <= end; ++i)
+//     {
+// //       std::cerr << (*isovalues)[i-1] << ", ";
+//       if(value >= (*isovalues)[i-1].first &&
+//          i >= result)
+//       {
+//         result = i;
+//       }
+//     }
+//     if(result>1)
+//       std::cerr << boost::format("result = %1%/%2%\n") % result % isovalues->size();
+//     if(result>0)
+//       return (*isovalues)[result-1].second;
+//     else
+//       return 0;
+//   }
+// };
+Volume::Volume(MainWindow* mw) : 
+  Surface(mw),
+  m_sm_angle(30),
+  m_sm_radius(0),
+  m_sm_distance(0),
+  m_relative_precision(0.000000001),
+  m_view_surface(false),
+  m_triangulation_color(QColor(Qt::green)),
+  m_inverse_normals(false),
+  two_sides(false),
+  del(),
+  c2t3(del),
+  mw(mw),
+  lists_draw_surface(),
+  lists_draw_surface_is_valid(false),
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  list_draw_marching_cube(0),
+  list_draw_marching_cube_is_valid(false),
+  lists_draw_surface_mc(),
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  m_view_mc(false)
+{
+  spinBox_radius_bound = mw->findChild<QDoubleSpinBox*>("spinBox_radius_bound");
+  spinBox_distance_bound = mw->findChild<QDoubleSpinBox*>("spinBox_distance_bound");
+  Q_ASSERT_X(spinBox_radius_bound && spinBox_distance_bound,
+             "Volume::Volume()", "Cannot find spinboxes!");
+
+  values_list = mw->values;
+
+  connect(spinBox_radius_bound, SIGNAL(valueChanged(double)),
+          this, SLOT(set_radius_bound(double)));
+  connect(spinBox_distance_bound, SIGNAL(valueChanged(double)),
+          this, SLOT(set_distance_bound(double)));
+
+  connect(mw->actionSurface_mesher, SIGNAL(triggered()),
+          this, SLOT(display_surface_mesher_result()));
+
+  connect(mw->actionInverse_normals, SIGNAL(toggled(bool)),
+          this, SLOT(set_inverse_normals(bool)));
+  m_inverse_normals = mw->actionInverse_normals->isChecked();
+
+  connect(mw->actionDisplay_front_and_back, SIGNAL(toggled(bool)),
+          this, SLOT(set_two_sides(bool)));
+  two_sides = mw->actionDisplay_front_and_back->isChecked();
+
+  connect(mw->actionDraw_triangles_edges, SIGNAL(toggled(bool)),
+          this, SLOT(set_draw_triangles_edges(bool)));
+  draw_triangles_edges = mw->actionDraw_triangles_edges->isChecked();
+
+  connect(mw->actionUse_Gouraud_shading, SIGNAL(toggled(bool)),
+          this, SLOT(set_use_gouraud(bool)));
+  use_gouraud = mw->actionUse_Gouraud_shading->isChecked();
+
+  connect(mw->actionShow_the_image_bounding_box, SIGNAL(toggled(bool)),
+          this, SLOT(set_show_bbox(bool)));
+  show_bbox = mw->actionShow_the_image_bounding_box->isChecked();
+
+  connect(mw->actionShow_triangulation, SIGNAL(toggled(bool)),
+          this, SLOT(set_draw_triangulation(bool)));
+  m_draw_triangulation = mw->actionShow_triangulation->isChecked();
+
+  connect(mw->actionTriangulation_edges_color, SIGNAL(triggered()),
+          this, SLOT(set_triangulation_edges_color()));
+
+  connect(this, SIGNAL(new_bounding_box(double, double, double, double, double, double)),
+          mw->viewer, SLOT(interpolateToFitBoundingBox(double, double, double, double, double, double)));
+
+  connect(values_list, SIGNAL(values_changed()),
+          this, SLOT(changed_parameters()));
+  connect(values_list, SIGNAL(changed()),
+          mw->viewer, SLOT(updateGL()));
+  connect(this, SIGNAL(changed()),
+          this, SLOT(check_can_export_off()));
+
+  connect(mw->labellizedRadioButton, SIGNAL(toggled(bool)),
+	  this, SLOT(labellizedToogled(bool)));
+
+  mw->actionExport_surface_mesh_to_OFF->setEnabled(false);
+  connect(mw->actionExport_surface_mesh_to_OFF, SIGNAL(triggered()),
+          this, SLOT(export_off()));
+
+  connect(mw->actionSave, SIGNAL(triggered()),
+          this, SLOT(save_image_to_inr()));
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  connect(mw->actionMarching_cubes, SIGNAL(triggered()),
+          this, SLOT(display_marchin_cube()));
+#endif
+}
+
+void Volume::set_inverse_normals(const bool b) {
+  m_inverse_normals = b;
+
+  list_draw_marching_cube = 0; // Invalidate the display list for the
+                               // marching cube. See gl_draw_marchingcube()
+                               // for an explanation.
+
+  Q_EMIT changed();
+}
+
+void Volume::set_two_sides(const bool b) {
+  two_sides = b;
+  Q_EMIT changed();
+}
+
+void Volume::set_draw_triangles_edges(const bool b) {
+  draw_triangles_edges = b;
+  Q_EMIT changed();
+}
+
+void Volume::set_draw_triangulation(const bool b) {
+  m_draw_triangulation = b;
+  Q_EMIT changed();
+}
+
+void Volume::set_triangulation_edges_color() {
+  const QColor color = QColorDialog::getColor(m_triangulation_color, mw);
+  if (color.isValid()) {
+    m_triangulation_color = color;
+    Q_EMIT changed();
+  }
+}
+
+void Volume::set_use_gouraud(const bool b) {
+  use_gouraud = b;
+  Q_EMIT changed();
+}
+
+void Volume::set_show_bbox(const bool b) {
+  show_bbox = b;
+  Q_EMIT changed();
+}
+
+void Volume::only_in()
+{
+  mw->show_only("volume");
+#ifndef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  mw->actionMarching_cubes->setVisible(false);
+#endif
+}
+
+#ifdef CGAL_USE_VTK
+
+#include <CGAL/read_vtk_image_data.h>
+
+#include <vtkImageData.h>
+#include <vtkDICOMImageReader.h>
+#include <vtkImageReader.h>
+#include <vtkImageGaussianSmooth.h>
+#include <vtkDemandDrivenPipeline.h>
+
+Volume::~Volume()
+{
+  if(vtk_reader) vtk_reader->Delete();
+  if(vtk_image) vtk_image->Delete();
+  if(dicom_reader) dicom_reader->Delete();
+  if(executive) executive->Delete();
+  if(smoother) smoother->Delete();
+}
+
+bool Volume::opendir(const QString& dirname) 
+{
+  bool result = true;
+  if(!fileinfo.isReadable())
+  {
+    QMessageBox::warning(mw, mw->windowTitle(),
+                         tr("Cannot read directory <tt>%1</tt>!").arg(dirname));
+    status_message(tr("Opening of directory %1 failed!").arg(dirname));
+    result = false;
+  }
+  else
+  {
+    dicom_reader = vtkDICOMImageReader::New();
+    dicom_reader->SetDirectoryName(dirname.toUtf8());
+
+    executive =
+      vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive());
+    if (executive)
+    {
+      executive->SetReleaseDataFlag(0, 0); // where 0 is the port index
+    }
+
+    smoother = vtkImageGaussianSmooth::New();
+    smoother->SetStandardDeviations(1., 1., 1.);
+    smoother->SetInputConnection(dicom_reader->GetOutputPort());
+    smoother->Update();
+    vtk_image = smoother->GetOutput();
+    vtk_image->Print(std::cerr);
+    m_image = CGAL::read_vtk_image_data(vtk_image);
+    if(m_image.image() == 0)
+    {
+      QMessageBox::warning(mw, mw->windowTitle(),
+                           tr("Error with file <tt>%1/</tt>:\nunknown file format!").arg(dirname));
+      status_message(tr("Opening of file %1/ failed!").arg(dirname));
+      result = false;
+    }
+    else
+    {
+      status_message(tr("File %1/ successfully opened.").arg(dirname));
+      finish_open();
+      result = true;
+    }
+    // if(executive) executive->Delete();
+    // dicom_reader->Delete();
+    // smoother->Delete();
+  }
+  return result;
+}
+
+bool Volume::open_vtk(const QString& filename)
+{
+  only_in();
+
+  fileinfo.setFile(filename);
+
+  if(fileinfo.isDir())
+  {
+    return opendir(filename);
+  }
+
+  if(!fileinfo.isReadable())
+  {
+    QMessageBox::warning(mw, mw->windowTitle(),
+                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
+    status_message(tr("Opening of file %1 failed!").arg(filename));
+    return false;
+  }
+  else
+  {
+    vtk_reader = vtkImageReader::New();
+    vtk_reader->SetFileName(filename.toUtf8());
+    vtk_reader->SetDataScalarTypeToUnsignedChar();
+    vtk_reader->SetDataExtent(0, 249, 0, 249, 0,  124);
+    vtk_reader->SetDataSpacing(1., 1., 1.);
+    vtk_reader->SetFileDimensionality(3);
+    vtk_reader->Update();
+    vtk_reader->Print(std::cerr);
+    vtk_image = vtk_reader->GetOutput();
+    vtk_image->Print(std::cerr);
+    m_image = CGAL::read_vtk_image_data(vtk_image);
+    if(m_image.image() == NULL)
+    {
+      QMessageBox::warning(mw, mw->windowTitle(),
+                           tr("Error with file <tt>%1</tt>:\nunknown file format!").arg(filename));
+      status_message(tr("Opening of file %1 failed!").arg(filename));
+      return false;
+    }
+    else
+    {
+      status_message(tr("File %1 successfully opened.").arg(filename));
+      finish_open();
+      return true;
+    }
+  }
+}
+
+// Total 3D images (XT format, that is the old Inrimage format, 1994.
+bool Volume::open_xt(const QString& filename)
+{
+  only_in();
+
+  fileinfo.setFile(filename);
+
+  if(fileinfo.isDir())
+  {
+    return false;
+  }
+
+  if(!fileinfo.isReadable())
+  {
+    QMessageBox::warning(mw, mw->windowTitle(),
+                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
+    status_message(tr("Opening of file %1 failed!").arg(filename));
+    return false;
+  }
+  else
+  {
+    long dimx, dimy, dimz;
+    long word_dim;
+    long header_size;
+    const char* filename_stl = qPrintable(filename);
+    CGAL::Total::lire_longueur_entete(filename_stl, &header_size);
+    CGAL::Total::lire_nb_octet(filename_stl, &word_dim);
+    CGAL::Total::lire_longueur_trace(filename_stl, &dimx);
+    CGAL::Total::lire_nb_trace(filename_stl, &dimy);
+    CGAL::Total::lire_nb_plan(filename_stl, &dimz);
+
+    vtkImageReader* vtk_reader = vtkImageReader::New();
+    vtk_reader->SetFileName(filename_stl);
+    switch(word_dim) {
+    case 8:
+      vtk_reader->SetDataScalarTypeToUnsignedChar();
+      break;
+    case 16:
+      vtk_reader->SetDataScalarTypeToUnsignedShort();
+      break;
+    default:
+      return false;
+    }
+    vtk_reader->SetHeaderSize(header_size);
+    vtk_reader->SetDataExtent(1, dimx, 1, dimy, 1,  dimz);
+    vtk_reader->SetDataSpacing(1., 1., 1.);
+    vtk_reader->SetFileDimensionality(3);
+    vtk_reader->Update();
+    vtk_reader->Print(std::cerr);
+    vtkImageData* vtk_image = vtk_reader->GetOutput();
+    vtk_image->Print(std::cerr);
+    m_image = CGAL::read_vtk_image_data(vtk_image);
+    if(m_image.image() != NULL)
+    {
+      QMessageBox::warning(mw, mw->windowTitle(),
+                           tr("Error with file <tt>%1</tt>:\nunknown file format!").arg(filename));
+      status_message(tr("Opening of file %1 failed!").arg(filename));
+      return false;
+    }
+    else
+    {
+      status_message(tr("File %1 successfully opened.").arg(filename));
+      finish_open();
+    }
+    return true;
+  }
+}
+
+#else // CGAL_USE_VTK
+Volume::~Volume()
+{
+}
+
+bool Volume::opendir(const QString&)
+{
+  return false;
+}
+
+bool Volume::open_xt(const QString&)
+{
+  return false;
+}
+#endif // CGAL_USE_VTK
+
+bool Volume::open(const QString& filename)
+{
+  only_in();
+
+  fileinfo.setFile(filename);
+
+  if(fileinfo.isDir())
+  {
+    return opendir(filename);
+  }
+
+  if(!fileinfo.isReadable())
+  {
+    QMessageBox::warning(mw, mw->windowTitle(),
+                         tr("Cannot read file <tt>%1</tt>!").arg(filename));
+  }
+  else
+  {
+    if(m_image.read(filename.toStdString().c_str()))
+    {
+      status_message(tr("File %1 successfully opened.").arg(filename));
+      finish_open();
+      return true;
+    }
+    else if(open_xt(filename)) {
+      return true;
+    }
+    else 
+    {
+      QSettings settings;
+      settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath()));
+      if( settings.value("is_raw").toBool() &&
+	  m_image.read_raw(filename.toStdString().c_str(),
+			   settings.value("dim_x").toInt(),
+			   settings.value("dim_y").toInt(),
+			   settings.value("dim_z").toInt(),
+			   settings.value("spacing_x").toDouble(),
+			   settings.value("spacing_y").toDouble(),
+			   settings.value("spacing_z").toDouble(),
+			   settings.value("offset").toInt()) )
+      {
+	status_message(tr("File %1 successfully opened.").arg(filename));
+	finish_open();
+	return true;
+      }
+      else if(QMessageBox::warning(mw, mw->windowTitle(),
+				   tr("Error with file <tt>%1</tt>:\n"
+				      "unknown file format!\n"
+				      "\n"
+				      "Open it as a raw image?").arg(filename),
+				   QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes) 
+      {
+	Raw_image_dialog raw_dialog;
+	raw_dialog.label_file_size->setText(QString("%1 B").arg(fileinfo.size()));
+	if( raw_dialog.exec() && 
+	    m_image.read_raw(filename.toStdString().c_str(),
+			     raw_dialog.dim_x->value(),
+			     raw_dialog.dim_y->value(),
+			     raw_dialog.dim_z->value(),
+			     raw_dialog.spacing_x->value(),
+			     raw_dialog.spacing_y->value(),
+			     raw_dialog.spacing_z->value(),
+			     raw_dialog.offset->value()) )
+	{
+	  status_message(tr("File %1 successfully opened.").arg(filename));
+	  QSettings settings;
+	  settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath()));
+	  settings.setValue("is_raw", true);
+	  settings.setValue("dim_x", raw_dialog.dim_x->value());
+	  settings.setValue("dim_y", raw_dialog.dim_y->value());
+	  settings.setValue("dim_z", raw_dialog.dim_z->value());
+	  settings.setValue("spacing_x", raw_dialog.spacing_x->value());
+	  settings.setValue("spacing_y", raw_dialog.spacing_y->value());
+	  settings.setValue("spacing_z", raw_dialog.spacing_z->value());
+	  settings.setValue("offset", raw_dialog.offset->value());
+	  settings.endGroup();
+	  finish_open();
+	  return true;
+	}
+      }
+    }
+  }
+  status_message(tr("Opening of file %1 failed!").arg(filename));
+  return false;
+}
+
+void Volume::finish_open()
+{
+  m_image.finish_open();
+  mw->viewer->camera()->setSceneBoundingBox(qglviewer::Vec(0, 0, 0),
+                                            qglviewer::Vec(m_image.xmax(),
+                                                           m_image.ymax(),
+                                                           m_image.zmax()));
+
+  mw->viewer->showEntireScene();
+  values_list->load_values(fileinfo.absoluteFilePath());
+  load_image_settings(fileinfo.absoluteFilePath());
+  changed_parameters();
+  Q_EMIT changed();
+}
+
+void Volume::export_off()
+{
+  QFileDialog filedialog(mw, tr("Export surface to file"));
+  filedialog.setFileMode(QFileDialog::AnyFile);
+  
+  filedialog.setNameFilter(tr("OFF files (*.off);;"
+                              "All files (*)"));
+  
+  filedialog.setAcceptMode(QFileDialog::AcceptSave);
+  filedialog.setDefaultSuffix("off");
+  if(filedialog.exec())
+  {
+    const QString filename = filedialog.selectedFiles().front();
+    std::cerr << "Saving to file \"" << filename.toLocal8Bit().data() << "\"...";
+    std::ofstream out(filename.toUtf8());
+    CGAL::output_surface_facets_to_off(out, c2t3);
+    if(!out)
+    {
+      QMessageBox::warning(mw, mw->windowTitle(),
+                           tr("Export to the OFF file <tt>%1</tt> failed!").arg(filename));
+      status_message(tr("Export to the OFF file %1 failed!").arg(filename));
+      std::cerr << " failed!\n";
+    }
+    else
+    {
+      std::cerr << " done.\n";
+      status_message(tr("Successfull export to the OFF file %1.").arg(filename));
+    }
+  }
+}
+
+void Volume::save_image_to_inr()
+{
+  QFileDialog filedialog(mw, tr("Export image to Inrimage format"));
+  filedialog.setFileMode(QFileDialog::AnyFile);
+  
+  filedialog.setNameFilter(tr("Inrimage files (*.inr);;"
+                              "Compressed Inrimage files (*.inr.gz)"));
+
+
+  filedialog.setAcceptMode(QFileDialog::AcceptSave);
+  filedialog.setDefaultSuffix("inr.gz");
+  if(filedialog.exec())
+  {
+    const QString filename = filedialog.selectedFiles().front();
+    std::cerr << "Saving image to file \"" << filename.toLocal8Bit().data() << "\"...";
+    const int result = ::_writeImage(m_image.image(), filename.toUtf8());
+    if(result != ImageIO_NO_ERROR)
+    {
+      QMessageBox::warning(mw, mw->windowTitle(),
+                           tr("Export to the Inrimage file <tt>%1</tt> failed!").arg(filename));
+      status_message(tr("Export to the Inrimage file %1 failed!").arg(filename));
+      std::cerr << " failed!\n";
+    }
+    else
+    {
+      std::cerr << " done.\n";
+      status_message(tr("Successfull export to the Inrimage file %1.").arg(filename));
+    }
+  }
+}
+
+void Volume::check_can_export_off()
+{
+  mw->actionExport_surface_mesh_to_OFF->setEnabled(m_view_surface);// || m_view_mc);
+}
+
+void Volume::status_message(QString string)
+{
+  std::cerr << qPrintable(string) << std::endl;
+  mw->statusBar()->showMessage(string);
+}
+
+void Volume::busy() const 
+{
+  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+}
+
+void Volume::not_busy() const 
+{
+  QApplication::restoreOverrideCursor();
+}
+
+void Volume::display_marchin_cube()
+{
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  if(m_surface_mc.empty())
+  {
+    QTime total_time;
+    total_time.start();
+
+    values_list->save_values(fileinfo.absoluteFilePath());
+
+    unsigned int nx = m_image.xdim();
+    unsigned int ny = m_image.ydim();
+    unsigned int nz = m_image.zdim();
+    if(nx * ny * nz == 0)
+    {
+      status_message("No volume loaded.");
+      return;
+    }
+
+    mc_timer.reset();
+    busy();
+    status_message("Marching cubes...");
+
+    mc_timer.start();
+    m_surface_mc.clear();
+
+    if(mc.ntrigs()!=0)
+      mc.clean_all();
+    mc.set_resolution(nx,ny,nz);
+    mc.init_all();
+    mc.set_ext_data(static_cast<unsigned char*>(m_image.image()->data));
+
+    nbs_of_mc_triangles.resize(values_list->numberOfValues());
+
+    for(int value_id = 0; 
+        value_id < values_list->numberOfValues();
+        ++value_id)
+    {
+      status_message(tr("Marching cubes, isovalue #%1...").arg(value_id));
+
+      // set data
+//       for(unsigned int i=0;i<nx;i++)
+//         for(unsigned int j=0;j<ny;j++)
+//           for(unsigned int k=0;k<nz;k++)
+//           {
+//             const float& value = m_image.value(i,j,k);
+//             mc.set_data(value,i,j,k);
+//           }
+      // compute scaling ratio
+      if(value_id > 0)
+        mc.init_temps();
+      mc.run(values_list->value(value_id),
+             m_image.vx(),
+             m_image.vy(),
+             m_image.vz());
+      mc.clean_temps();
+
+      std::vector<double> facets;
+      mc.get_facets(facets);
+
+      mc_timer.stop();
+      const unsigned int begin = value_id == 0 ? 0 : nbs_of_mc_triangles[value_id-1];
+      const unsigned int nbt = facets.size() / 9;
+      for(unsigned int i=begin;i<nbt;i++)
+      {
+        const Point a(facets[9*i],   facets[9*i+1], facets[9*i+2]);
+        const Point b(facets[9*i+3], facets[9*i+4], facets[9*i+5]);
+        const Point c(facets[9*i+6], facets[9*i+7], facets[9*i+8]);
+        const Triangle_3 t(a,b,c);
+        const Vector u = t[1] - t[0];
+        const Vector v = t[2] - t[0];
+        Vector n = CGAL::cross_product(u,v);
+        n = n / std::sqrt(n*n);
+        m_surface_mc.push_back(Facet(t,n,values_list->item(value_id)));
+      }
+      nbs_of_mc_triangles[value_id]=m_surface_mc.size();
+      mc_timer.start();
+    }
+    mc_timer.stop();
+    not_busy();
+    mc_total_time = total_time.elapsed();
+
+    // invalidate the display list
+    lists_draw_surface_mc_is_valid = false;
+    list_draw_marching_cube_is_valid = false;
+  }
+  CGAL::Bbox_3 bbox(0,0,0,0,0,0);
+  for(std::vector<Facet>::const_iterator
+        it = m_surface_mc.begin(), end = m_surface_mc.end();
+      it != end; ++it)
+  {
+    bbox = bbox + it->get<0>().bbox();
+  }
+
+  m_view_mc = true;
+  m_view_surface = false;
+  Q_EMIT changed();
+  if(!m_surface_mc.empty())
+  {
+    Q_EMIT new_bounding_box(bbox.xmin(),
+                          bbox.ymin(),
+                          bbox.zmin(),
+                          bbox.xmax(),
+                          bbox.ymax(),
+                          bbox.zmax());
+  }
+  status_message(tr("Marching cubes done. %2 facets in %1s (CPU time), total time is %3s.")
+                 .arg(mc_timer.time())
+                 .arg(m_surface_mc.size())
+                 .arg(mc_total_time/1000.));
+
+  save_image_settings(fileinfo.absoluteFilePath());
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+}
+
+void Volume::display_surface_mesher_result()
+{
+  if(m_surface.empty() || // Either the surface is not computed.
+     m_view_surface) // Or it is computed and displayed, and one want
+                     // to recompute it.
+  {
+    QTime total_time;
+    total_time.start();
+
+    values_list->save_values(fileinfo.absoluteFilePath());
+
+    std::size_t nx = m_image.xdim();
+    std::size_t ny = m_image.ydim();
+    std::size_t nz = m_image.zdim();
+    if(nx * ny * nz == 0)
+    {
+      status_message("No volume loaded.");
+      return;
+    }
+
+    m_surface.clear();
+    sm_timer.reset();
+    busy();
+
+    status_message("Surface meshing...");
+
+    sm_timer.start();
+
+    c2t3.clear();
+    del.clear();
+    Sphere bounding_sphere(m_image.center(),m_image.radius()*m_image.radius());
+
+    Classify_from_isovalue_list classify(values_list);
+    Generate_surface_identifiers generate_ids(values_list);
+
+    m_image.set_interpolation(mw->interpolationCheckBox->isChecked());
+    if(mw->labellizedRadioButton->isChecked()) {
+      std::cerr << "Labellized image\n";
+    }
+    m_image.set_labellized(mw->labellizedRadioButton->isChecked());
+    classify.set_identity(mw->labellizedRadioButton->isChecked());
+    generate_ids.set_labellized_image(mw->labellizedRadioButton->isChecked());
+
+    // definition of the surface
+    Surface_3 surface(m_image, bounding_sphere, m_relative_precision);
+//     Threshold threshold(m_image.isovalue());
+
+    // surface mesh traits class
+    typedef CGAL::Surface_mesher::Implicit_surface_oracle_3<Kernel,
+      //     typedef CGAL::Surface_mesher::Image_surface_oracle_3<Kernel,
+      Surface_3, 
+      Classify_from_isovalue_list,
+      Generate_surface_identifiers> Oracle;
+    Oracle oracle(classify, generate_ids);
+
+    if(mw->searchSeedsCheckBox->isChecked())
+    {
+      typedef std::vector<std::pair<Point, double> > Seeds;
+      Seeds seeds;
+      {
+	std::cerr << "Search seeds...\n";
+	std::set<unsigned char> domains;
+	search_for_connected_components(std::back_inserter(seeds),
+					CGAL::inserter(domains),
+					classify);
+	std::cerr << "Found " << seeds.size() << " seed(s).\n";
+
+	if(mw->labellizedRadioButton->isChecked() && 
+	   values_list->numberOfValues() == 0) 
+	{
+	  Q_FOREACH(unsigned char label, domains) {
+	    if(label != 0) {
+	      values_list->addValue(label);
+	    }
+	  }
+	}
+      }
+      std::ofstream seeds_out("seeds.off");
+      std::ofstream segments_out("segments.txt");
+      seeds_out.precision(18);
+      seeds_out << "OFF\n" << seeds.size() << " 0 0\n";
+      segments_out.precision(18);
+      for(Seeds::const_iterator it = seeds.begin(), end = seeds.end();
+	  it != end; ++it)
+      {
+        seeds_out << it->first << std::endl;
+	CGAL::Random_points_on_sphere_3<Point> random_points_on_sphere_3(it->second);
+	Oracle::Intersect_3 intersect = oracle.intersect_3_object();
+	for(int i = 0; i < 20; ++i)
+	{
+	  const Point test = it->first + (*random_points_on_sphere_3++ - CGAL::ORIGIN);
+	  CGAL::Object o = intersect(surface, Segment_3(it->first, test));
+	  if (const Point* intersection = CGAL::object_cast<Point>(&o)) {
+            segments_out << "2 " << it->first << " " << *intersection << std::endl;
+	    del.insert(*intersection);
+          }
+	  else 
+	  {
+	    std::cerr << 
+	      boost::format("Error. Segment (%1%, %2%) does not intersect the surface! values=(%3%, %4%)\n")
+	      % it->first % test
+	      % surface(it->first) % surface(test);
+	  }
+	}
+      }
+    }
+    else {
+      oracle.construct_initial_points_object()(surface, 
+					       CGAL::inserter(c2t3.triangulation()),
+					       20);
+    }
+
+    std::ofstream points_out("initial-points.off");
+    points_out.precision(18);
+    points_out << "OFF\n" << c2t3.triangulation().number_of_vertices() << " 0 0\n";
+    BOOST_FOREACH(const Tr::Vertex& v,
+                  std::make_pair(c2t3.triangulation().vertices_begin(),
+                                 c2t3.triangulation().vertices_end()))
+    {
+      points_out << v.point() << std::endl;
+    }
+
+    std::cerr << boost::format("Number of initial points: %1%\n") % del.number_of_vertices();
+
+    // defining meshing criteria
+    typedef CGAL::Surface_mesher::Refine_criterion<Tr> Criterion;
+    CGAL::Surface_mesher::Curvature_size_criterion<Tr>
+      curvature_size_criterion (m_sm_distance);
+    CGAL::Surface_mesher::Uniform_size_criterion<Tr>
+      uniform_size_criterion (m_sm_radius);
+    CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
+      aspect_ratio_criterion (m_sm_angle);
+    CGAL::Surface_mesher::Vertices_on_the_same_psc_element_criterion<Tr, Surface_3>
+      vertices_on_the_same_psc_element_criterion(surface);
+    
+    std::vector<Criterion*> criterion_vector;
+    criterion_vector.push_back(&aspect_ratio_criterion);
+    criterion_vector.push_back(&uniform_size_criterion);
+    criterion_vector.push_back(&curvature_size_criterion);
+    if(mw->sameIndexCheckBox->isChecked()) {
+      criterion_vector.push_back(&vertices_on_the_same_psc_element_criterion);
+      std::cerr << "vertices_on_the_same_psc_element_criterion is activated.\n";
+    }
+
+    typedef CGAL::Surface_mesher::Standard_criteria<Criterion> Criteria;
+    Criteria criteria(criterion_vector);
+    std::cerr << "Surface_mesher... angle=" << m_sm_angle << ", radius= " << m_sm_radius
+              << ", distance=" << m_sm_distance << "\n";
+
+    typedef CGAL::Surface_mesher_generator<C2t3,
+      Oracle,
+      Criteria,
+      CGAL::Manifold_tag,
+      CGAL_SURFACE_MESHER_VERBOSITY
+      >::type Surface_mesher_manifold;
+      
+    typedef CGAL::Surface_mesher_generator<C2t3,
+      Oracle,
+      Criteria,
+      CGAL::Non_manifold_tag,
+      CGAL_SURFACE_MESHER_VERBOSITY
+      >::type Surface_mesher_non_manifold; 
+
+    if(mw->manifoldCheckBox->isChecked()) {
+      // meshing surface
+      std::cerr << "manifold criteria is activated.\n";
+//       make_surface_mesh(c2t3, surface, oracle, criteria,
+// 			CGAL::Manifold_tag(), 0);
+      Surface_mesher_manifold manifold_mesher(c2t3, surface, oracle, criteria);
+      manifold_mesher.refine_mesh();
+    }
+    else {
+//       m_view_surface = true;
+      Surface_mesher_non_manifold non_manifold_mesher(c2t3, surface, oracle, criteria);
+#if 0
+      int nb_steps = 0;
+//       direct_draw = true;
+      non_manifold_mesher.init();
+      while(!non_manifold_mesher.is_algorithm_done()) {
+	CGAL::Null_mesh_visitor null_visitor;
+	non_manifold_mesher.one_step(null_visitor);
+	if(++nb_steps % 1000 == 0) {
+	  CGAL::Timer timer;
+	  std::cerr << "(process events...";
+	  timer.start();
+	  list_draw_marching_cube_is_valid = false;
+	  lists_draw_surface_is_valid = false;
+	  for(Tr::Finite_cells_iterator 
+		cit = del.finite_cells_begin(),
+		end = del.finite_cells_end();
+	      cit != end; ++cit)
+	  {
+	    cit->info() = classify(surface(cit->circumcenter()));
+	  }
+// 	  Q_EMIT changed();
+	  qApp->processEvents();
+	  timer.stop();
+	  std::cerr << timer.time() << " secondes)\n";
+	}
+      }
+#else
+      non_manifold_mesher.refine_mesh();
+#endif
+    }
+    sm_timer.stop();
+    not_busy();
+    direct_draw = false;
+
+    for(Tr::Finite_cells_iterator 
+	  cit = del.finite_cells_begin(),
+	  end = del.finite_cells_end();
+	cit != end; ++cit)
+    {
+      cit->info() = classify(surface(cit->circumcenter()));
+    }
+    // get output surface
+    for(C2t3::Facet_iterator
+          fit = c2t3.facets_begin(), end = c2t3.facets_end();
+        fit != end; ++fit)
+    {
+      const Tr::Cell_handle& cell = fit->first;
+      const int index = fit->second;
+
+      // here "left" means nothing
+      const Point left_circumcenter = cell->circumcenter();
+      const Point right_circumcenter = cell->neighbor(index)->circumcenter();
+
+      const Triangle_3 t = 
+        Triangle_3(cell->vertex(del.vertex_triple_index(index, 0))->point(),
+                   cell->vertex(del.vertex_triple_index(index, 1))->point(),
+                   cell->vertex(del.vertex_triple_index(index, 2))->point());
+      const Vector u = t[1] - t[0];
+      const Vector v = t[2] - t[0];
+      Vector n = CGAL::cross_product(u,v);
+      n = n / std::sqrt(n*n);
+      if(mw->labellizedRadioButton->isChecked()) 
+      {
+	m_surface.push_back(Facet(t,
+				  n,
+				  values_list->search((std::max)(surface(left_circumcenter), 
+								 surface(right_circumcenter)))));
+      }
+      else {
+	m_surface.push_back(Facet(t,n,cell->vertex(del.vertex_triple_index(index, 0))->point().element_index()));
+      }
+    }
+
+    // invalidate the display list
+    lists_draw_surface_is_valid = false;
+    sm_total_time = total_time.elapsed();
+  }
+
+  CGAL::Bbox_3 bbox(0,0,0,0,0,0);
+  for(std::vector<Facet>::const_iterator
+        it = m_surface.begin(), end = m_surface.end();
+      it != end; ++it)
+  {
+    bbox = bbox + it->get<0>().bbox();
+  }
+
+  // toggle visualization
+  m_view_mc = false;
+  m_view_surface = true;
+  Q_EMIT changed();
+  if(!m_surface.empty())
+  {
+    Q_EMIT new_bounding_box(bbox.xmin(),
+                          bbox.ymin(),
+                          bbox.zmin(),
+                          bbox.xmax(),
+                          bbox.ymax(),
+                          bbox.zmax());
+  }
+  status_message(tr("Surface meshing done. %1 facets in %2s (CPU time), total time is %3s.")
+                 .arg(m_surface.size())
+                 .arg(sm_timer.time())
+                 .arg(sm_total_time/1000.));
+  save_image_settings(fileinfo.absoluteFilePath());
+}
+
+void Volume::draw()
+{
+  float	ambient[]  =   { 0.25f,
+                         0.20725f,
+                         0.20725f,
+                         0.922f };
+  float	diffuse[]  =   { 1.0f,
+                         0.829f,
+                         0.829f,
+                         0.922f };
+
+  float	specular[]  = {  0.296648f,
+                         0.296648f,
+                         0.296648f,
+                         0.522f };
+
+  float	emission[]  = {  0.3f,
+                         0.3f,
+                         0.3f,
+                         1.0f };
+  float shininess[] = {  11.264f };
+
+  // apply
+  ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT,   ambient);
+  ::glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE,   diffuse);
+  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR,  specular);
+  ::glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess);
+  ::glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,  emission);
+
+  ::glEnable(GL_LINE_SMOOTH);
+
+  if(two_sides)
+    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+  else
+    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); // default
+
+  // draw surface mesh
+  if(m_view_surface)
+  {
+    ::glEnable(GL_LIGHTING);
+    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+    ::glColor3f(0.2f, 0.2f, 1.f);
+    ::glEnable(GL_POLYGON_OFFSET_FILL);
+    ::glPolygonOffset(3.0f,-3.0f);
+    gl_draw_surface();
+
+    if(draw_triangles_edges)
+    {
+      ::glDisable(GL_LIGHTING);
+      ::glLineWidth(1.);
+      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+      ::glColor3ub(0,0,0);
+      ::glDisable(GL_POLYGON_OFFSET_FILL);
+      gl_draw_surface();
+    }
+  }
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  // draw MC surface mesh
+  if(m_view_mc)
+  {
+    ::glEnable(GL_LIGHTING);
+    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+    ::glColor3f(0.2f, 0.2f, 1.f);
+    ::glEnable(GL_POLYGON_OFFSET_FILL);
+    ::glPolygonOffset(3.0f,-3.0f);
+    gl_draw_surface_mc();
+
+    if(draw_triangles_edges)
+    {
+      ::glDisable(GL_LIGHTING);
+      ::glLineWidth(1.);
+      ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+      ::glColor3ub(0,0,0);
+      ::glDisable(GL_POLYGON_OFFSET_FILL);
+      gl_draw_surface_mc();
+    }
+  }
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+
+  if(show_bbox) {
+    ::glDisable(GL_LIGHTING);
+    m_image.gl_draw_bbox(3.0f,0,0,0);
+  }
+
+  if(!m_view_mc && m_draw_triangulation)
+  {
+    // draw the triangualtion
+    mw->viewer->qglColor(m_triangulation_color);
+    ::glLineWidth(1.0);
+    ::glBegin(GL_LINES);
+    for(Tr::Finite_edges_iterator 
+          eit = del.finite_edges_begin(), 
+          end = del.finite_edges_end();
+        eit != end; ++eit) 
+    {
+      const Point p1 = eit->first->vertex(eit->second)->point();
+      const Point p2 = eit->first->vertex(eit->third)->point();
+      ::glVertex3d(p1.x(),p1.y(),p1.z());
+      ::glVertex3d(p2.x(),p2.y(),p2.z());
+    }
+    ::glEnd();
+  }
+}
+
+void Volume::set_radius_bound(double d)
+{ 
+  m_sm_radius = FT(d);
+  changed_parameters();
+}
+
+void Volume::set_distance_bound(double d)
+{ 
+  m_sm_distance = FT(d);
+  changed_parameters();
+}
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+void Volume::gl_draw_surface_mc()
+{
+  if(use_gouraud)
+  {
+    gl_draw_marchingcube();
+    return;
+  }
+  
+  if(lists_draw_surface_mc_is_valid)
+  {
+    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
+    {
+      if(values_list->enabled(i))
+      {
+        mw->viewer->qglColor(values_list->color(i));
+        ::glCallList(lists_draw_surface_mc[i]);
+      }
+    }
+  }
+  else
+  {
+    lists_draw_surface_mc.resize(values_list->numberOfValues(), 0);
+    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
+    {
+      if(!lists_draw_surface_mc[i])
+      {
+        lists_draw_surface_mc[i] = ::glGenLists(1);
+      }
+
+      std::cerr << boost::format("(Re-)Generating list #%1% for marching cube surface #%2%"
+                                 " in gl_draw_surface(), ()\n")
+        % lists_draw_surface_mc[i]
+        % i;
+
+      mw->viewer->qglColor(values_list->color(i));
+
+      if(lists_draw_surface_mc[i])             // If
+        ::glNewList(lists_draw_surface_mc[i],  // lists_draw_surface[i]==0 then something
+                    values_list->enabled(i) // got wrong in the list generation.
+                    ? GL_COMPILE_AND_EXECUTE
+                    : GL_COMPILE);
+
+
+      gl_draw_surface(m_surface_mc.begin(),
+                      m_surface_mc.end(),
+                      values_list->item(i));
+        
+      if(lists_draw_surface_mc[i]) // If lists_draw_surface[i]==0 then
+      {                            // something got wrong in the list
+        ::glEndList();             // generation.
+      }
+    }
+    lists_draw_surface_mc_is_valid = (::glGetError() == GL_NO_ERROR);
+  }
+}
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+
+void Volume::gl_draw_surface()
+{
+//   if(mw->labellizedRadioButton->isChecked()) {
+//     mw->viewer->qglColor(::Qt::blue);
+//     gl_draw_surface(m_surface.begin(),
+// 		    m_surface.end(),
+// 		    0);
+//   }
+//   else
+  if(direct_draw) {
+    ::glBegin(GL_TRIANGLES);
+    unsigned int counter = 0;
+    for(Tr::Finite_cells_iterator
+	  cit = del.finite_cells_begin(), end = del.finite_cells_end();
+	cit != end; ++cit)
+    {
+      for(int facet_index = 0; facet_index < 4; ++facet_index)
+      {
+	const Tr::Cell_handle& facet_cell = cit;
+	if(c2t3.face_status(facet_cell, facet_index) == C2t3::NOT_IN_COMPLEX) {
+	  continue;
+	}
+	const Point& a = facet_cell->vertex(del.vertex_triple_index(facet_index, 0))->point();
+	const Point& b = facet_cell->vertex(del.vertex_triple_index(facet_index, 1))->point();
+	const Point& c = facet_cell->vertex(del.vertex_triple_index(facet_index, 2))->point();
+	Vector n = CGAL::cross_product(b-a,c-a);
+	n = n / std::sqrt(n*n); // unit normal
+	if(m_inverse_normals) {
+	  ::glNormal3d(-n.x(),-n.y(),-n.z());
+	} else {
+	  ::glNormal3d(n.x(),n.y(),n.z());
+	}
+	mw->viewer->qglColor(values_list->color(values_list->search(facet_cell->info())));
+	::glVertex3d(a.x(),a.y(),a.z());
+	::glVertex3d(b.x(),b.y(),b.z());
+	::glVertex3d(c.x(),c.y(),c.z());
+	++counter;
+      }
+      ::glEnd();
+    }
+    return;
+  }
+  if(!direct_draw && lists_draw_surface_is_valid)
+  {
+    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
+    {
+      if(values_list->enabled(i))
+      {
+        mw->viewer->qglColor(values_list->color(i));
+        ::glCallList(lists_draw_surface[i]);
+      }
+    }
+  }
+  else
+  {
+    lists_draw_surface.resize(values_list->numberOfValues(), 0);
+    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i )
+    {
+      if(!lists_draw_surface[i])
+      {
+        lists_draw_surface[i] = ::glGenLists(1);
+      }
+
+      std::cerr << boost::format("(Re-)Generating list #%1% for surface #%2%"
+                                 " in gl_draw_surface(), ()\n")
+        % lists_draw_surface[i]
+        % i;
+        
+      mw->viewer->qglColor(values_list->color(i));
+
+      if(!direct_draw && lists_draw_surface[i]) // If
+        ::glNewList(lists_draw_surface[i],      // lists_draw_surface[i]==0
+                    values_list->enabled(i)     // then something got wrong
+                    ? GL_COMPILE_AND_EXECUTE    // in the list generation.
+                    : GL_COMPILE);
+
+      if(!mw->labellizedRadioButton->isChecked()) 
+      {
+	gl_draw_surface(m_surface.begin(),
+			m_surface.end(),
+			values_list->item(i));
+      }
+      else 
+      {
+	const unsigned char volume_index = values_list->value(i);
+
+	::glBegin(GL_TRIANGLES);
+	unsigned int counter = 0;
+	for(C2t3::Facet_iterator
+	      fit = c2t3.facets_begin(), end = c2t3.facets_end();
+	    fit != end; ++fit)
+	{
+	  Tr::Cell_handle facet_cell = fit->first;
+	  int facet_index = fit->second;
+	  Tr::Cell_handle opposite_cell = facet_cell->neighbor(facet_index);
+	  int opposite_index = opposite_cell->index(facet_cell);
+
+	  if( facet_cell->info() != volume_index ) {
+	    if( opposite_cell->info() == volume_index ) {
+	      std::swap(facet_cell, opposite_cell);
+	      std::swap(facet_index, opposite_index);
+	    }
+	    else 
+	      continue; // go to next facet
+	  }
+	  const Point& a = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 0))->point();
+	  const Point& b = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 1))->point();
+	  const Point& c = opposite_cell->vertex(del.vertex_triple_index(opposite_index, 2))->point();
+	  Vector n = CGAL::cross_product(b-a,c-a);
+	  n = n / std::sqrt(n*n); // unit normal
+	  if(m_inverse_normals) {
+	    ::glNormal3d(-n.x(),-n.y(),-n.z());
+	  } else {
+	    ::glNormal3d(n.x(),n.y(),n.z());
+	  }
+	  ::glVertex3d(a.x(),a.y(),a.z());
+	  ::glVertex3d(b.x(),b.y(),b.z());
+	  ::glVertex3d(c.x(),c.y(),c.z());
+	  ++counter;
+	}
+	::glEnd();
+	std::cerr << boost::format("(c2t3) number of facets: %1%\n")
+	  % counter;
+      }
+
+      if(!direct_draw && lists_draw_surface[i])
+	                        // If lists_draw_surface[i]==0 then
+      {                         // something got wrong in the list
+        ::glEndList();          // generation.
+      }
+    }
+    lists_draw_surface_is_valid = (::glGetError() == GL_NO_ERROR);
+  }
+}
+
+template <typename Iterator>
+void Volume::gl_draw_surface(Iterator begin, Iterator end, const QTreeWidgetItem* i)
+{
+  ::glBegin(GL_TRIANGLES);
+  unsigned int counter = 0;
+  for(Iterator it = begin; it != end; ++it)
+  {
+    const Facet& f = *it;
+
+    if(f.get<2>() != i) continue;
+
+    const Vector& n = f.get<1>();
+
+    if(m_inverse_normals)
+      ::glNormal3d(-n.x(),-n.y(),-n.z());
+    else
+      ::glNormal3d(n.x(),n.y(),n.z());
+
+    const Triangle_3& t = f.get<0>();
+    const Point& a = t[0];
+    const Point& b = t[1];
+    const Point& c = t[2];
+
+    ::glVertex3d(a.x(),a.y(),a.z());
+    ::glVertex3d(b.x(),b.y(),b.z());
+    ::glVertex3d(c.x(),c.y(),c.z());
+    ++counter;
+  }
+  ::glEnd();
+  std::cerr << boost::format("number of facets: %1%\n")
+    % counter;
+}
+
+void Volume::changed_parameters()
+{
+  m_surface.clear();
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  m_surface_mc.clear();
+#endif
+  list_draw_marching_cube_is_valid = false;
+  lists_draw_surface_is_valid = false;
+  c2t3.clear();
+  del.clear();
+  m_view_mc = m_view_surface = false;
+  Q_EMIT changed();
+}
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+void Volume::gl_draw_one_marching_cube_vertex(int i)
+{
+  if(!m_inverse_normals)
+    glArrayElement(i);
+  else
+  {
+    const Vertex* const vertex = mc.vert(i);
+    ::glNormal3d(-vertex->nx, -vertex->ny, -vertex->nz);
+    ::glVertex3d(vertex->x, vertex->y, vertex->z);
+  }
+}
+
+void Volume::gl_draw_marchingcube()
+{
+  if(list_draw_marching_cube_is_valid)
+    ::glCallList(list_draw_marching_cube);
+  else
+  {
+    if(!list_draw_marching_cube)
+      list_draw_marching_cube = ::glGenLists(1);
+    std::cerr << boost::format("(Re-)Generating list #%1% for"
+                               " gl_draw_marchingcube()\n")
+      % list_draw_marching_cube;
+
+    if(list_draw_marching_cube)          // If list_draw_marching_cube==0 then
+    ::glNewList(list_draw_marching_cube, // something got wrong in the list
+                GL_COMPILE_AND_EXECUTE); // generation.
+
+    ::glVertexPointer(3, GL_DOUBLE, sizeof(Vertex), mc.vertices());
+    ::glNormalPointer(GL_DOUBLE, sizeof(Vertex), &(mc.vertices()->nx));
+    ::glEnableClientState(GL_VERTEX_ARRAY);
+
+    // because of that conditionnal, the display list has to be
+    // reconstructed each time m_inverse_normals is toggled.
+    if(!m_inverse_normals)
+      ::glEnableClientState(GL_NORMAL_ARRAY);
+
+    for(int i = 0, nbs = values_list->numberOfValues(); i < nbs; ++i)
+    {
+      const int begin = i == 0 ? 0 : nbs_of_mc_triangles[i-1];
+      const int end = nbs_of_mc_triangles[i];
+      mw->viewer->qglColor(values_list->color(i));
+      ::glBegin(GL_TRIANGLES);
+      for(int i = begin; i < end; ++i)
+      {
+        const MC_Triangle* const trig = mc.trig(i);
+        gl_draw_one_marching_cube_vertex(trig->v1);
+        gl_draw_one_marching_cube_vertex(trig->v2);
+        gl_draw_one_marching_cube_vertex(trig->v3);
+      }
+      ::glEnd();
+    }
+    if(list_draw_marching_cube > 0) // If list_draw_marching_cube==0 then
+    {                               // something got wrong in the list
+      ::glEndList();                // generation.
+      list_draw_marching_cube_is_valid = (::glGetError() == GL_NO_ERROR);
+    }
+    if(!list_draw_marching_cube_is_valid)
+    {
+     CGAL::Qt::opengl_check_errors();
+    }
+  }
+}
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+
+void Volume::save_image_settings(QString filename)
+{
+  QSettings settings;
+  settings.beginGroup(QUrl::toPercentEncoding(filename));
+  settings.setValue("labellized", mw->labellizedRadioButton->isChecked());
+  settings.endGroup();
+}
+
+void Volume::load_image_settings(QString filename)
+{
+  QSettings settings;
+  settings.beginGroup(QUrl::toPercentEncoding(filename));
+  mw->labellizedRadioButton->setChecked(settings.value("labellized").toBool());
+  settings.endGroup();
+}
+
+void Volume::labellizedToogled(bool toggled)
+{
+  if(toggled) {
+    values_list->setHeaderTitle(tr("Label"));
+  }
+  else {
+    values_list->setHeaderTitle(tr("Iso-Value"));
+  }
+}
+
diff --git a/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.h b/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.h
new file mode 100644
index 0000000..0b43eb8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Surface_mesher/volume.h
@@ -0,0 +1,384 @@
+#ifndef _VOLUME_H
+#define _VOLUME_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Object.h>
+#include <CGAL/Timer.h>
+
+
+#include "surface.h"
+#include "binary_image.h"
+
+#include <boost/multi_array.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+#include <boost/format.hpp>
+
+#include <queue>
+#include <vector>
+#include <iterator> // std::back_inserter
+
+#include <QString>
+#include <QFileInfo>
+
+#ifdef CGAL_USE_VTK
+class vtkImageReader;
+class vtkImageData;
+class vtkDICOMImageReader;
+class vtkDemandDrivenPipeline;
+class vtkImageGaussianSmooth;
+#endif // CGAL_USE_VTK
+
+class QTreeWidgetItem;
+
+// kernel
+// #include <CGAL/Simple_cartesian.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel1;
+
+#include <CGAL/Point_with_psc_localisation.h>
+struct Kernel : public Kernel1 {
+  typedef CGAL::Point_with_psc_localisation<Kernel::Point_3,
+                                            const QTreeWidgetItem*> Point_3;
+};
+
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Sphere_3 Sphere;
+typedef Kernel::Vector_3 Vector;
+typedef Kernel::Triangle_3 Triangle_3;
+typedef Kernel::Segment_3 Segment_3;
+
+// typedef CGAL::Triple<Triangle_3,Vector,const QTreeWidgetItem*> Facet;
+
+typedef boost::tuple<Triangle_3,Vector,const QTreeWidgetItem*> Facet;
+
+typedef CBinary_image_3<FT,Point> Binary_image;
+
+class QTreeWidgetItem;
+
+// surface mesher
+// #define CGAL_MESHES_NO_OUTPUT
+#include <CGAL/Surface_mesh_vertex_base_3.h>
+#include <CGAL/Triangulation_cell_base_with_info_3.h>
+#include <CGAL/Surface_mesh_cell_base_3.h>
+#include <CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>
+#include <CGAL/Surface_mesh_default_criteria_3.h>
+#include <CGAL/Implicit_surface_3.h>
+#include <CGAL/Surface_mesh_traits_generator_3.h>
+typedef CGAL::Surface_mesh_vertex_base_3<Kernel> Vb;
+typedef CGAL::Triangulation_cell_base_with_info_3<unsigned char, Kernel> Cb1;
+typedef CGAL::Surface_mesh_cell_base_3<Kernel, Cb1> Cb2;
+typedef CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<Kernel, Cb2> Cb;
+typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
+typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Tr;
+typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<Tr> C2t3;
+typedef CGAL::Implicit_surface_3<Kernel, Binary_image> Surface_3;
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+#include <mc/MarchingCubes.h>
+#endif
+
+class MainWindow;
+class QDoubleSpinBox;
+class Viewer;
+class Values_list;
+
+class Volume : public Surface
+{
+  Q_OBJECT
+public:
+  Volume(MainWindow* mw);
+  ~Volume();
+
+private:
+  Binary_image m_image;
+
+  // options
+  FT m_sm_angle;
+  FT m_sm_radius;
+  FT m_sm_distance;
+  double m_relative_precision;
+
+  // visualization
+  bool m_view_surface;
+  bool m_draw_triangulation;
+  QColor m_triangulation_color;
+  bool m_inverse_normals;
+  bool two_sides;
+  bool draw_triangles_edges;
+  bool use_gouraud;
+  bool show_bbox;
+
+  std::vector<Facet> m_surface;
+  Tr del;            // 3D-Delaunay triangulation
+  C2t3 c2t3;         // 2D complex in 3D triangulation
+
+  MainWindow* mw;
+  QFileInfo fileinfo;
+  Values_list* values_list;
+  QDoubleSpinBox* spinBox_radius_bound;
+  QDoubleSpinBox* spinBox_distance_bound;
+
+  bool direct_draw; // do not use display lists
+  std::vector<GLint> lists_draw_surface;
+  bool lists_draw_surface_is_valid;
+  GLint list_draw_marching_cube;
+  bool list_draw_marching_cube_is_valid;
+
+  CGAL::Timer sm_timer;
+  int sm_total_time;
+
+#ifdef CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+  std::vector<Facet> m_surface_mc;
+  MarchingCubes<unsigned char> mc ;
+  std::vector<int> nbs_of_mc_triangles;
+  std::vector<GLint> lists_draw_surface_mc;
+  bool lists_draw_surface_mc_is_valid;
+  CGAL::Timer mc_timer;
+  int mc_total_time;
+public:
+  void gl_draw_surface_mc();
+  void gl_draw_marchingcube();
+private:
+  void gl_draw_one_marching_cube_vertex(int);
+
+#endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+
+  bool m_view_mc; // that boolean is here even with if
+		  // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE
+                  // is not defined.
+
+#ifdef CGAL_USE_VTK
+  vtkImageReader* vtk_reader;
+  vtkImageData* vtk_image;
+  vtkDICOMImageReader* dicom_reader;
+  vtkDemandDrivenPipeline* executive;
+  vtkImageGaussianSmooth* smoother;
+#endif // CGAL_USE_VTK
+
+public Q_SLOTS:
+void display_marchin_cube();
+
+private:
+  template <typename Iterator>
+  void gl_draw_surface(Iterator begin, Iterator end, const QTreeWidgetItem* = 0);
+
+  template <typename PointsOutputIterator,
+	    typename DomainsOutputIterator,
+	    typename TransformOperator>
+  void search_for_connected_components(PointsOutputIterator,
+				       DomainsOutputIterator, 
+				       TransformOperator);
+
+public:
+  void gl_draw_surface();
+
+Q_SIGNALS:
+
+  void new_bounding_box(double, double, double, double, double, double);
+
+public Q_SLOTS:
+  void only_in();
+  void set_inverse_normals(const bool);
+  void set_two_sides(const bool);
+  void set_draw_triangles_edges(const bool);
+  void set_triangulation_edges_color();
+  void set_draw_triangulation(const bool);
+  void set_use_gouraud(const bool);
+  void set_show_bbox(const bool);
+  bool open(const QString& filename);
+#ifdef CGAL_USE_VTK
+  bool open_vtk(const QString& filename);
+#endif
+  bool open_xt(const QString& filename);
+  bool opendir(const QString& dirname);
+  void finish_open();
+  void export_off();
+  void save_image_to_inr();
+  void check_can_export_off();
+  void draw();
+  void get_bbox(float& /*xmin*/, float& /*ymin*/, float& /*zmin*/,
+		float& /*xmax*/, float& /*ymax*/, float& /*zmax*/) {}
+  void close() {}
+  void display_surface_mesher_result();
+  void set_radius_bound(double);
+  void set_distance_bound(double);
+  void changed_parameters();
+
+  void labellizedToogled(bool);
+
+  void save_image_settings(QString);
+  void load_image_settings(QString);
+private:
+  void status_message(QString);
+  void busy() const;
+  void not_busy() const;
+};
+
+template <typename PointsOutputIterator,
+	  typename DomainsOutputIterator,
+	  typename TransformOperator>
+void Volume::search_for_connected_components(PointsOutputIterator it,
+					     DomainsOutputIterator dom_it,
+					     TransformOperator transform)
+{
+  const std::size_t nx = m_image.xdim();
+  const std::size_t ny = m_image.ydim();
+  const std::size_t nz = m_image.zdim();
+
+  const double max_v = (std::max)((std::max)(m_image.vx(),
+                                             m_image.vy()),
+                                  m_image.vz());
+
+  typedef unsigned char Marker;
+  typedef typename TransformOperator::result_type Label;
+
+  boost::multi_array<Marker, 3> visited(boost::extents[nx][ny][nz]);
+  typedef boost::tuple<std::size_t, std::size_t, std::size_t, std::size_t>
+                                Indices;
+  typedef std::queue<Indices>   Indices_queue;
+  typedef std::vector<Indices>  Border_vector;
+
+  int number_of_connected_components = 0;
+  for(std::size_t i=0; i<nx; i++)
+    for(std::size_t j=0; j<ny; j++)
+      for(std::size_t k=0; k<nz; k++)
+      {
+        if(visited[i][j][k]>0)
+          continue;
+        const Label current_label = transform(m_image.value(i, j, k));
+	*dom_it++ = current_label;
+        if(current_label == Label()) {
+          visited[i][j][k] = 3;
+          continue;
+        }
+
+        // if we reach here, (i, j, k) is a new connected component
+        ++number_of_connected_components;
+        std::cerr << boost::format("Found new connected component (#%5%) "
+                                   "at voxel (%1%, %2%, %3%), value=%4%, volume id=%6%\n")
+          % i % j % k
+          % m_image.value(i, j, k) 
+          % number_of_connected_components
+          % (int)current_label;
+
+        int nb_voxels = 0;
+
+        Indices_queue queue;
+        Indices indices(i, j ,k, 0);
+        queue.push(indices);
+
+        Border_vector border;
+
+        /*
+         * First pass is a BFS to retrieve all the connected component, and
+         * its border.
+         * Second pass is a BFS initialized with all voxel of the border.
+         * The last voxel of that BFS is used as the seed.
+         */
+        int pass = 1; // pass will be equal to 2 in second pass
+
+        Indices bbox_min = indices;
+        Indices bbox_max = indices;
+
+        while(!queue.empty()) // walk through the connected component
+        {
+          Indices indices = queue.front();
+          queue.pop();
+
+          // warning: those indices i, j and k are local to the while loop
+          const std::size_t i = boost::get<0>(indices);
+          const std::size_t j = boost::get<1>(indices);
+          const std::size_t k = boost::get<2>(indices);
+          const std::size_t depth = boost::get<3>(indices);
+
+          if(visited[i][j][k] < pass)
+          {
+            visited[i][j][k] = pass;
+            if(pass == 1 )
+            {
+              ++nb_voxels;
+              boost::get<0>(bbox_min) = (std::min)(i, boost::get<0>(bbox_min));
+              boost::get<0>(bbox_max) = (std::max)(i, boost::get<0>(bbox_max));
+              boost::get<1>(bbox_min) = (std::min)(j, boost::get<1>(bbox_min));
+              boost::get<1>(bbox_max) = (std::max)(j, boost::get<1>(bbox_max));
+              boost::get<2>(bbox_min) = (std::min)(k, boost::get<2>(bbox_min));
+              boost::get<2>(bbox_max) = (std::max)(k, boost::get<2>(bbox_max));
+            }
+
+            static const int neighbors_offset[6][3] = { { +1,  0,  0 },
+                                                        { -1,  0,  0 },
+                                                        {  0, +1,  0 },
+                                                        {  0, -1,  0 },
+                                                        {  0,  0, +1 },
+                                                        {  0,  0, -1 } };
+            bool voxel_is_on_border = false;
+
+            // Visit neighbors.
+            // (i_n, j_n, k_n) are indices of neighbors.
+            for(int n = 0; n < 6; ++n)
+            {
+              const ptrdiff_t i_n = i + neighbors_offset[n][0];
+              const ptrdiff_t j_n = j + neighbors_offset[n][1];
+              const ptrdiff_t k_n = k + neighbors_offset[n][2];
+              if(i_n < 0 || i_n >= static_cast<ptrdiff_t>(nx) ||
+                 j_n < 0 || j_n >= static_cast<ptrdiff_t>(ny) ||
+                 k_n < 0 || k_n >= static_cast<ptrdiff_t>(nz))
+              {
+                voxel_is_on_border = true;
+                continue;
+              }
+              else
+              {
+                if(transform(m_image.value(i_n, j_n, k_n)) == current_label)
+                {
+                  if(visited[i_n][j_n][k_n] < pass) {
+                    Indices indices(i_n, j_n, k_n, depth+1);
+                    queue.push(indices);
+                  }
+                }
+                else
+                  voxel_is_on_border = true;
+              }
+            } // end for neighbors
+
+            if(pass == 1 && voxel_is_on_border)
+              border.push_back(indices);
+          } // end if voxel not already visited
+
+          if(queue.empty()) {
+            if(pass == 1)
+            { // End of first pass. Begin second pass with the voxels of
+              // the border.
+              for(typename Border_vector::const_iterator
+                    border_it = border.begin(), border_end = border.end();
+                  border_it != border_end; ++border_it)
+                queue.push(*border_it);
+              pass = 2;
+            }
+            else // end of second pass, return the last visited voxel
+            {
+// 	      if(nb_voxels >= 100)
+	      {
+		*it++ = std::make_pair(m_image.point(i, j, k), (depth+1)*max_v);
+		std::cerr << boost::format("Found seed %5%, which is voxel (%1%, %2%, %3%), value=%4%\n")
+		  % i % j % k %  m_image.value(i, j, k) % m_image.point(i, j, k);
+	      }
+            }
+          } // end if queue.empty()
+        } // end while !queue.empty() (with local indices i, j, k)
+
+        std::cerr << boost::format("There was %1% voxel(s) in that component.\n"
+                                   "The bounding box is (%2% %3% %4%, %5% %6% %7%).\n"
+                                   "%8% voxel(s) on border\n")
+          % nb_voxels
+          % boost::get<0>(bbox_min) % boost::get<1>(bbox_min) % boost::get<2>(bbox_min)
+          % boost::get<0>(bbox_max) % boost::get<1>(bbox_max) % boost::get<2>(bbox_max)
+          % border.size();
+      } // end for i,j,k
+} // end function Volume::search_for_connected_components()
+
+#endif // _VOLUME_H
diff --git a/3rdparty/CGAL-4.8/demo/Three/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Three/CMakeLists.txt
new file mode 100644
index 0000000..81b6f24
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Three/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Three_demo )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/demo/Three/Example_plugin/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/CMakeLists.txt
new file mode 100644
index 0000000..fa2d8f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/CMakeLists.txt
@@ -0,0 +1,41 @@
+project( Example_plugin )
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# Compatibility with CMake 3.0
+if(POLICY CMP0042)
+  # Do not enable the use of MACOSX_RPATH
+  # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
+  cmake_policy(SET CMP0042 OLD)
+endif()
+#Find CGAL
+find_package(CGAL COMPONENTS Qt5)
+include( ${CGAL_USE_FILE} )
+# Find Qt5 itself
+find_package(Qt5
+             QUIET
+             COMPONENTS            OpenGL Script Svg Xml
+             OPTIONAL_COMPONENTS   ScriptTools)
+             
+if(Qt5_FOUND AND CGAL_FOUND)  
+  find_package(CGAL_polyhedron_demo
+  HINTS "${CGAL_DIR}" "${CGAL_DIR}/Polyhedron/demo/Polyhedron-build"
+  )
+
+include( ${CGAL_POLYHEDRON_DEMO_USE_FILE} )
+# Let plugins be compiled in the same directory as the executable.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+           
+  #include( ${CMAKE_CURRENT_SOURCE_DIR}/../../Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake )
+  qt5_wrap_ui( exampleUI_FILES Polyhedron_demo_example_plugin.ui dock_example.ui)
+  qt5_wrap_ui( example_dockUI_FILES dock_example.ui)
+  polyhedron_demo_plugin(example_plugin Polyhedron_demo_example_plugin ${exampleUI_FILES} ${example_dockUI_FILES})
+  target_link_libraries(example_plugin scene_polyhedron_item)  
+endif()
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp
new file mode 100644
index 0000000..2b9cb4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp
@@ -0,0 +1,312 @@
+//! \file Polyhedron_demo_example_plugin.cpp
+#include <QApplication>
+#include <QMainWindow>
+#include <QAction>
+#include <QVector>
+#include <CGAL/Three/Scene_item.h>
+#include <CGAL/Three/Viewer_interface.h>
+#include <CGAL/Three/Scene_group_item.h>
+#include "ui_Polyhedron_demo_example_plugin.h"
+#include "ui_dock_example.h"
+
+
+
+// The dialog class to get the coordinates of the triangle
+class Polyhedron_demo_example_plugin_dialog : public QDialog, private Ui::Polyhedron_demo_example_plugin_dialog
+{
+  Q_OBJECT
+  public:
+    Polyhedron_demo_example_plugin_dialog(QWidget* /*parent*/ = 0)
+    {
+      setupUi(this);
+
+    }
+
+    double getAx() const { return doubleSpinBox_Ax->value(); }
+    double getAy() const { return doubleSpinBox_Ay->value(); }
+    double getAz() const { return doubleSpinBox_Az->value(); }
+
+    double getBx() const { return doubleSpinBox_Bx->value(); }
+    double getBy() const { return doubleSpinBox_By->value(); }
+    double getBz() const { return doubleSpinBox_Bz->value(); }
+
+    double getCx() const { return doubleSpinBox_Cx->value(); }
+    double getCy() const { return doubleSpinBox_Cy->value(); }
+    double getCz() const { return doubleSpinBox_Cz->value(); }
+    void setTriangleName(QString name) {triangle_name_label->setText(name); }
+};
+
+// The special Scene_item only for triangles
+class Scene_triangle_item : public CGAL::Three::Scene_item
+{
+
+    Q_OBJECT
+public :
+    Scene_triangle_item(double ax,double ay, double az,
+                        double bx,double by, double bz,
+                        double cx,double cy, double cz)
+        :  CGAL::Three::Scene_item(1,1)
+    {
+        //Fills the position vector with data.
+        vertices.resize(9);
+        vertices[0] = ax; vertices[1] = ay; vertices[2] = az;
+        vertices[3] = bx; vertices[4] = by; vertices[5] = bz;
+        vertices[6] = cx; vertices[7] = cy; vertices[8] = cz;
+        changed();
+
+    }
+    Scene_triangle_item()
+        :  CGAL::Three::Scene_item(1,1)
+    {
+
+        Scene_triangle_item(
+                    0,0,0,
+                    0.5,1,0,
+                    1,0,0);
+
+    }
+    ~Scene_triangle_item()
+    {
+    }
+    bool isFinite() const { return true; }
+    bool isEmpty() const { return true; }
+    Bbox bbox() const { return Bbox(); }
+    Scene_triangle_item* clone() const {
+        return 0;
+    }
+
+    // Indicated if rendering mode is supported
+    bool supportsRenderingMode(RenderingMode m) const {
+        return (m == Flat);
+    }
+
+    QString toolTip() const {    
+      QString str =
+             QObject::tr( "<p>Number of vertices: %1<br />"
+                           "Number of edges: %2<br />"
+                         "Number of facets: %3")
+                .arg(3)
+                .arg(3)
+                .arg(1);
+        str+=QObject::tr("<br />Volume: %1").arg(0);
+        str+=QObject::tr("<br />Area: %1").arg(0.5);
+      str+="</p>";
+      str += QString("Bounding box: min (%1,%2,%3), max(%4,%5,%6)")
+           .arg(bbox().xmin)
+           .arg(bbox().ymin)
+           .arg(bbox().zmin)
+           .arg(bbox().xmax)
+           .arg(bbox().ymax)
+           .arg(bbox().zmax);
+      str += QString("<br />Number of isolated vertices : 0<br />");
+
+      return str;
+    }
+
+    void draw(CGAL::Three::Viewer_interface* viewer) const
+    {
+        //Initializes the buffers only when specified.
+        if(!are_buffers_filled)
+            initialize_buffers(viewer);
+        //Binds the vao corresponding to the type of data we are drawing.
+        vaos[0]->bind();
+        //Gets the program corresponding to the type of data we are drawing.
+        //Here we want triangles with light effects.
+        program = getShaderProgram(PROGRAM_WITH_LIGHT);
+        //Gives most of the uniform values to the shaders.
+        attrib_buffers(viewer, PROGRAM_WITH_LIGHT);
+        //Binds the program chosen before to use the right shaders.
+        program->bind();
+        //Gives the wanted color to the fragment shader as uniform value.
+        program->setAttributeValue("colors", this->color());
+        //Draws the items
+        viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(vertices.size()/3));
+        //clean up
+        vaos[0]->release();
+        program->release();
+
+    }
+
+    //Specifies that the buffers need to be initialized again.
+    //Is mostly called after a change of geometry in the data.
+    void changed()
+    {
+        are_buffers_filled = false;
+    }
+
+private:
+    //contains the data
+    std::vector<float> vertices;
+    mutable QOpenGLShaderProgram *program;
+    using CGAL::Three::Scene_item::initialize_buffers;
+    //Fills the buffers with data. The buffers allow us to give data to the shaders.
+    void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const
+    {
+
+        //vao containing the data for the lines
+        {
+            program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer);
+            program->bind();
+
+            vaos[0]->bind();
+            buffers[0].bind();
+            buffers[0].allocate(vertices.data(),
+                                static_cast<GLsizei>(vertices.size()*sizeof(float)));
+            program->enableAttributeArray("vertex");
+            program->setAttributeBuffer("vertex",GL_FLOAT,0,3);
+            buffers[0].release();
+
+            vaos[0]->release();
+            program->release();
+
+        }
+        are_buffers_filled = true;
+    }
+
+}; //end of class Scene_triangle_item
+
+#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
+//The actual plugin
+using namespace CGAL::Three;
+class Q_DECL_EXPORT Polyhedron_demo_example_plugin :
+        public QObject,
+        public Polyhedron_demo_plugin_helper
+{
+    //Configures CMake to use MOC correctly
+    Q_OBJECT
+    Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
+    Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+
+public :
+    // To silent a warning -Woverloaded-virtual
+    // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
+    using Polyhedron_demo_plugin_helper::init;
+    // Adds an action to the menu and configures the widget
+    void init(QMainWindow* mainWindow,
+              CGAL::Three::Scene_interface* scene_interface) {
+      //get the references
+      this->scene = scene_interface;
+      this->mw = mainWindow;
+        triangle_array.resize(0);
+
+      //creates and link the actions
+      actionDrawTriangle= new QAction("Draw Triangle", mw);
+      if(actionDrawTriangle) {
+        connect(actionDrawTriangle, SIGNAL(triggered()),
+                this, SLOT(populate_dialog()));
+      }
+
+      //Dock widget initialization
+      dock_widget = new QDockWidget("Triangle Creation", mw);
+      dock_widget->setVisible(false); // do not show at the beginning
+
+      ui_widget.setupUi(dock_widget);
+      mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget);
+      connect(ui_widget.buttonBox, SIGNAL(accepted()), this, SLOT(on_dock_OK_clicked()));
+    }
+    virtual void closure()
+    {
+      dock_widget->hide();
+    }
+    bool applicable(QAction*) const
+    {
+        return true;
+    }
+    QList<QAction*> actions() const {
+      return QList<QAction*>() << actionDrawTriangle;
+    }
+
+  public Q_SLOTS:
+
+    void populate_dialog()
+    {
+        // dock widget should be constructed in init()
+        if(dock_widget->isVisible()) { dock_widget->hide(); }
+        else                         { dock_widget->show(); }
+        //creates a new dialog
+        dialog = new Polyhedron_demo_example_plugin_dialog();
+        //changes the value of the label according to the number of triangles
+        dialog->setTriangleName(QString("Triangle %1").arg(triangle_array.size()));
+        //opens the dialog
+        if(!dialog->exec())
+            return;
+        //gets the values
+        ax = dialog->getAx();
+        ay = dialog->getAy();
+        az = dialog->getAz();
+        bx = dialog->getBx();
+        by = dialog->getBy();
+        bz = dialog->getBz();
+        cx = dialog->getCx();
+        cy = dialog->getCy();
+        cz = dialog->getCz();
+        //creates a triangle and store it in a vector.
+        triangle_array.push_back(new Scene_triangle_item(ax, ay, az,
+                                                               bx, by, bz,
+                                                               cx, cy, cz));
+        triangle_array[triangle_array.size()-1]->setName(QString("Triangle %1").arg(triangle_array.size()));
+        //Adds the triangle to the items of the scene
+        scene->addItem(triangle_array[triangle_array.size()-1]);
+        //if the were less than 3 triangles created this way, opens a new dialog
+        if(triangle_array.size()%3 > 0)
+            populate_dialog();
+        //else creates a new group and passes the 3 last triangles to it.
+        else
+        {
+            //clears the selection to avoid adding unwanted items to the group.
+            scene->setSelectedItem(-1);
+            //Creates a new group
+            Scene_group_item *group = new Scene_group_item("Triangle group");
+            //Then gives it its children
+            for(int i =0; i<3; i++)
+                scene->changeGroup(triangle_array[triangle_array.size()-i-1], group);
+            //adds it to the scene
+            scene->add_group(group);
+        }
+    }
+
+  void draw_triangle() {
+
+    triangle = new Scene_triangle_item(ax, ay, az,
+                                       bx, by, bz,
+                                       cx, cy, cz);
+    scene->addItem(triangle);
+  }
+
+  void on_dock_OK_clicked()
+  {
+      ax = ui_widget.doubleSpinBox_Ax->value();
+      ay = ui_widget.doubleSpinBox_Ay->value();
+      az = ui_widget.doubleSpinBox_Az->value();
+
+      bx = ui_widget.doubleSpinBox_Bx->value();
+      by = ui_widget.doubleSpinBox_By->value();
+      bz = ui_widget.doubleSpinBox_Bz->value();
+
+      cx = ui_widget.doubleSpinBox_Cx->value();
+      cy = ui_widget.doubleSpinBox_Cy->value();
+      cz = ui_widget.doubleSpinBox_Cz->value();
+      draw_triangle();
+
+  }
+
+private:
+  CGAL::Three::Scene_item* triangle;
+  QAction* actionDrawTriangle;
+  Polyhedron_demo_example_plugin_dialog *dialog;
+  double ax;
+  double ay;
+  double az;
+  double bx;
+  double by;
+  double bz;
+  double cx;
+  double cy;
+  double cz;
+  QVector<Scene_triangle_item*> triangle_array;
+Ui::Dock_example ui_widget;
+QDockWidget* dock_widget;
+
+}; //end of class Polyhedron_demo_example_plugin
+#include "Polyhedron_demo_example_plugin.moc"
diff --git a/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui
new file mode 100644
index 0000000..e358f58
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Polyhedron_demo_example_plugin_dialog</class>
+ <widget class="QDialog" name="Polyhedron_demo_example_plugin_dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>199</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Triangle coordinates</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>150</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QWidget" name="gridLayoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>9</x>
+     <y>9</y>
+     <width>381</width>
+     <height>121</height>
+    </rect>
+   </property>
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="3">
+     <widget class="QLabel" name="label_3">
+      <property name="text">
+       <string>Point C</string>
+      </property>
+     </widget>
+    </item>
+    <item row="3" column="1">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Az"/>
+    </item>
+    <item row="2" column="2">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_By"/>
+    </item>
+    <item row="2" column="3">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Cy"/>
+    </item>
+    <item row="3" column="2">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Bz"/>
+    </item>
+    <item row="3" column="3">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Cz"/>
+    </item>
+    <item row="1" column="1">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Ax"/>
+    </item>
+    <item row="1" column="3">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Cx"/>
+    </item>
+    <item row="2" column="1">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Ay"/>
+    </item>
+    <item row="1" column="2">
+     <widget class="QDoubleSpinBox" name="doubleSpinBox_Bx"/>
+    </item>
+    <item row="0" column="1">
+     <widget class="QLabel" name="label">
+      <property name="text">
+       <string>Point A</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="2">
+     <widget class="QLabel" name="label_2">
+      <property name="text">
+       <string>Point B</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0">
+     <widget class="QLabel" name="label_4">
+      <property name="text">
+       <string>X</string>
+      </property>
+     </widget>
+    </item>
+    <item row="2" column="0">
+     <widget class="QLabel" name="label_5">
+      <property name="text">
+       <string>Y</string>
+      </property>
+     </widget>
+    </item>
+    <item row="3" column="0">
+     <widget class="QLabel" name="label_6">
+      <property name="text">
+       <string>Z</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="0">
+     <widget class="QLabel" name="triangle_name_label">
+      <property name="text">
+       <string>TextLabel</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Polyhedron_demo_example_plugin_dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Polyhedron_demo_example_plugin_dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Three/Example_plugin/dock_example.ui b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/dock_example.ui
new file mode 100644
index 0000000..9e96390
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Three/Example_plugin/dock_example.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dock_example</class>
+ <widget class="QDockWidget" name="Dock_example">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>275</width>
+    <height>222</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>58</width>
+    <height>200</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>DockWidget</string>
+  </property>
+  <widget class="QWidget" name="dockWidgetContents">
+   <widget class="QDialogButtonBox" name="buttonBox">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>150</y>
+      <width>261</width>
+      <height>32</height>
+     </rect>
+    </property>
+    <property name="orientation">
+     <enum>Qt::Horizontal</enum>
+    </property>
+    <property name="standardButtons">
+     <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+    </property>
+   </widget>
+   <widget class="QWidget" name="gridLayoutWidget">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>10</y>
+      <width>261</width>
+      <height>121</height>
+     </rect>
+    </property>
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="3" column="3">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Cz"/>
+     </item>
+     <item row="1" column="2">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Bx"/>
+     </item>
+     <item row="2" column="2">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_By"/>
+     </item>
+     <item row="2" column="3">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Cy"/>
+     </item>
+     <item row="2" column="1">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Ay"/>
+     </item>
+     <item row="4" column="2">
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item row="0" column="3">
+      <widget class="QLabel" name="label_3">
+       <property name="text">
+        <string>Point C</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Point A</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="3">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Cx"/>
+     </item>
+     <item row="3" column="1">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Az"/>
+     </item>
+     <item row="0" column="2">
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>Point B</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="2">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Bz"/>
+     </item>
+     <item row="1" column="1">
+      <widget class="QDoubleSpinBox" name="doubleSpinBox_Ax"/>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="label_4">
+       <property name="text">
+        <string>X</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QLabel" name="label_5">
+       <property name="text">
+        <string>Y</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QLabel" name="label_6">
+       <property name="text">
+        <string>Z</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="4">
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Triangulation_2/CMakeLists.txt
new file mode 100644
index 0000000..ee7be01
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/CMakeLists.txt
@@ -0,0 +1,106 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Triangulation_2)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL COMPONENTS Qt5)
+
+include(${CGAL_USE_FILE})
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg)
+
+include_directories (BEFORE ../../include)
+include_directories (BEFORE ./include)
+include_directories (BEFORE ../../../Number_types/include)
+
+include_directories (BEFORE ../../../Triangulation_2/include)
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
+
+add_definitions(-DQT_NO_KEYWORDS)
+
+
+
+#--------------------------------
+# The "constrained Delaunay" demo: Constrained_Delaunay_triangulation_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( CDT_UI_FILES Constrained_Delaunay_triangulation_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" )
+
+# The executable itself.
+add_executable  ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} )
+
+qt5_use_modules(Constrained_Delaunay_triangulation_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2 )
+
+# Link with Qt libraries
+target_link_libraries( Constrained_Delaunay_triangulation_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Constrained_Delaunay_triangulation_2 ${CGAL_LIBRARIES}  ${CGAL_3RD_PARTY_LIBRARIES})
+
+#--------------------------------
+# The "Delaunay" demo: Delaunay_triangulation_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Delaunay_triangulation_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" )
+
+# The executable itself.
+add_executable  ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Delaunay_triangulation_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
+
+# Link with Qt libraries
+target_link_libraries( Delaunay_triangulation_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+#--------------------------------
+# The "Regular" demo: Regular_triangulation_2
+#--------------------------------
+# UI files (Qt Designer files)
+qt5_wrap_ui( DT_UI_FILES Regular_triangulation_2.ui )
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc )
+
+# use the Qt MOC preprocessor on classes that derives from QObject
+qt5_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" )
+
+# The executable itself.
+add_executable  ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} )
+
+qt5_use_modules(Regular_triangulation_2 Xml Script OpenGL Svg)
+
+add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 )
+
+# Link with Qt libraries
+target_link_libraries( Regular_triangulation_2 ${QT_LIBRARIES} )
+# Link with CGAL
+target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+
+else()
+
+  message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
+
+endif()
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp
new file mode 100644
index 0000000..3dd25ad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp
@@ -0,0 +1,871 @@
+//#define CGAL_USE_BOOST_BIMAP
+#define CGAL_MESH_2_OPTIMIZER_VERBOSE
+#define CGAL_MESH_2_OPTIMIZERS_DEBUG
+
+#include <fstream>
+#include <vector>
+#include <list>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Delaunay_mesher_2.h>
+#include <CGAL/Delaunay_mesh_face_base_2.h>
+#include <CGAL/Delaunay_mesh_vertex_base_2.h>
+#include <CGAL/Delaunay_mesh_size_criteria_2.h>
+#include <CGAL/Mesh_2/Lipschitz_sizing_field_2.h>
+#include <CGAL/Lipschitz_sizing_field_criteria_2.h>
+#include <CGAL/Constrained_voronoi_diagram_2.h>
+#include <CGAL/Triangulation_conformer_2.h>
+#include <CGAL/lloyd_optimize_mesh_2.h>
+#include <CGAL/Random.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Timer.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QMessageBox>
+
+// GraphicsView items and event filters (input classes)
+#include "TriangulationCircumcircle.h"
+#include "DelaunayMeshInsertSeeds.h"
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+
+// the two base classes
+#include "ui_Constrained_Delaunay_triangulation_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+// for viewportsBbox(QGraphicsScene*)
+#include <CGAL/Qt/utility.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+typedef CGAL::Delaunay_mesh_vertex_base_2<K>  Vertex_base;
+typedef CGAL::Delaunay_mesh_face_base_2<K> Face_base;
+
+typedef Face_base Fb;
+typedef CGAL::Triangulation_data_structure_2<Vertex_base, Fb>  TDS;
+typedef CGAL::Exact_predicates_tag              Itag;
+typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
+typedef CGAL::Constrained_voronoi_diagram_2<CDT> CVD;
+typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
+
+typedef CGAL::Lipschitz_sizing_field_2<CDT> Lipschitz_sizing_field;
+typedef CGAL::Lipschitz_sizing_field_criteria_2<CDT, Lipschitz_sizing_field> Lipschitz_criteria;
+typedef CGAL::Delaunay_mesher_2<CDT, Lipschitz_criteria> Lipschitz_mesher;
+
+typedef CDT::Vertex_handle Vertex_handle;
+typedef CDT::Face_handle Face_handle;
+typedef CDT::All_faces_iterator All_faces_iterator;
+
+using namespace CGAL::parameters;
+
+void
+discoverInfiniteComponent(const CDT & ct)
+{
+  //when this function is called, all faces are set "in_domain"
+  Face_handle start = ct.infinite_face();
+  std::list<Face_handle> queue;
+  queue.push_back(start);
+
+  while(! queue.empty())
+  {
+    Face_handle fh = queue.front();
+    queue.pop_front();
+    fh->set_in_domain(false);
+	
+    for(int i = 0; i < 3; i++)
+    {
+      Face_handle fi = fh->neighbor(i);
+      if(fi->is_in_domain()
+        && !ct.is_constrained(CDT::Edge(fh,i)))
+        queue.push_back(fi);
+    }
+  }
+}
+
+template<typename SeedList>
+void 
+discoverComponents(const CDT & ct,
+                   const SeedList& seeds)
+{
+  if (ct.dimension() != 2)
+    return;
+
+  // tag all faces inside
+  for(typename CDT::All_faces_iterator fit = ct.all_faces_begin();
+      fit != ct.all_faces_end();
+      ++fit)
+      fit->set_in_domain(true);
+
+  // mark "outside" infinite component of the object
+  discoverInfiniteComponent(ct);
+
+  // mark "outside" components with a seed
+  for(typename SeedList::const_iterator sit = seeds.begin();
+      sit != seeds.end();
+      ++sit)
+  {
+    typename CDT::Face_handle fh_loc = ct.locate(*sit);
+
+    if(fh_loc == NULL || !fh_loc->is_in_domain())
+      continue;
+
+    std::list<typename CDT::Face_handle> queue;
+    queue.push_back(fh_loc);
+    while(!queue.empty())
+    {
+      typename CDT::Face_handle f = queue.front();
+      queue.pop_front();
+      f->set_in_domain(false);
+
+      for(int i = 0; i < 3; ++i)
+      {
+        typename CDT::Face_handle ni = f->neighbor(i);
+        if(ni->is_in_domain()
+          && !ct.is_constrained(typename CDT::Edge(f,i))) //same component
+        {
+          queue.push_back(ni);
+        }
+      }
+    }
+  }
+} 
+
+
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Constrained_Delaunay_triangulation_2
+{
+  Q_OBJECT
+  
+private:  
+  CDT cdt; 
+  QGraphicsScene scene;
+  std::list<Point_2> m_seeds;
+
+  CGAL::Qt::DelaunayMeshTriangulationGraphicsItem<CDT> * dgi;
+
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+  CGAL::Qt::TriangulationCircumcircle<CDT> *tcc;
+  CGAL::Qt::DelaunayMeshInsertSeeds<CDT> *dms;
+
+public:
+  MainWindow();
+
+  void clear();
+
+private:
+  template <typename Iterator> 
+  void insert_polyline(Iterator b, Iterator e)
+  {
+    Point_2 p, q;
+    typename CDT::Vertex_handle vh, wh;
+    Iterator it = b;
+    vh = cdt.insert(*it);
+    p = *it;
+    ++it;
+    for(; it != e; ++it){
+      q = *it;
+      if(p != q){
+        wh = cdt.insert(*it);
+        cdt.insert_constraint(vh,wh);
+        vh = wh;
+        p = q;
+      } else {
+        std::cout << "duplicate point: " << p << std::endl; 
+      }
+    }
+    Q_EMIT( changed());
+  }
+
+public Q_SLOTS:
+  void open(QString);
+
+  void processInput(CGAL::Object o);
+
+  void on_actionShowVertices_toggled(bool checked);
+
+  void on_actionShowDelaunay_toggled(bool checked);
+
+  void on_actionShowTriangulationInDomain_toggled(bool checked);
+
+  void on_actionShow_constrained_edges_toggled(bool checked);
+
+  void on_actionShow_voronoi_edges_toggled(bool checked);
+
+  void on_actionShow_faces_in_domain_toggled(bool checked);
+
+  void on_actionShow_blind_faces_toggled(bool checked);
+
+  void on_actionShow_seeds_toggled(bool checked);
+
+  void on_actionInsertPolyline_toggled(bool checked);
+  
+  void on_actionInsertSeeds_OnOff_toggled(bool checked);
+  
+  void on_actionCircumcenter_toggled(bool checked);
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  void on_actionLoadConstraints_triggered();
+
+  void loadFile(QString);
+
+  void loadPolygonConstraints(QString);
+
+  void loadEdgConstraints(QString);
+
+  void on_actionSaveConstraints_triggered();
+
+  void saveConstraints(QString);
+
+  void on_actionMakeGabrielConform_triggered();
+
+  void on_actionMakeDelaunayConform_triggered();
+
+  void on_actionMakeDelaunayMesh_triggered();
+
+  void on_actionMakeLipschitzDelaunayMesh_triggered();
+
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionTagBlindFaces_triggered();
+
+  void on_actionLloyd_optimization_triggered();
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the CDT triangulation
+  dgi = new CGAL::Qt::DelaunayMeshTriangulationGraphicsItem<CDT>(&cdt);
+  QColor facesColor(::Qt::blue);
+  facesColor.setAlpha(150);
+  dgi->setFacesInDomainBrush(facesColor);
+    
+  QObject::connect(this, SIGNAL(changed()),
+		   dgi, SLOT(modelChanged()));
+  dgi->setVerticesPen(
+    QPen(Qt::red, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  dgi->setVoronoiPen(
+    QPen(Qt::darkGreen, 0, Qt::DashLine, Qt::RoundCap, Qt::RoundJoin));
+  dgi->setSeedsPen(
+    QPen(Qt::darkBlue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+
+  dgi->setZValue(-1);
+  scene.addItem(dgi);
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(this, &scene, 0, true); // inputs polylines which are not closed
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+    
+  tcc = new CGAL::Qt::TriangulationCircumcircle<CDT>(&scene, &cdt, this);
+  tcc->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  
+  dms = new CGAL::Qt::DelaunayMeshInsertSeeds<CDT>(&scene, &cdt, this);//input seeds
+  QObject::connect(dms, SIGNAL(generate(CGAL::Object)),
+                   this, SLOT(processInput(CGAL::Object)));
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPolyline);
+
+  // Check two actions 
+  this->actionInsertPolyline->setChecked(true);
+  this->actionShowDelaunay->setChecked(true);
+  this->actionShowVertices->setChecked(true);
+  this->actionShowTriangulationInDomain->setChecked(false);
+  this->actionShow_faces_in_domain->setChecked(true);
+  this->actionShow_constrained_edges->setChecked(true);
+  this->actionShow_voronoi_edges->setChecked(false);
+  this->actionShow_seeds->setChecked(false);
+  this->actionInsertSeeds_OnOff->setChecked(false);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Constrained_Delaunay_triangulation_2.html");
+  this->addAboutCGAL();
+  this->setupExportSVG(this->actionExport_SVG, this->graphicsView);
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  // Polygon
+  std::list<Point_2> points;
+  if(CGAL::assign(points, o))
+  {
+    if(points.size() == 1)
+      cdt.insert(points.front());
+    else
+      insert_polyline(points.begin(), points.end());
+    }
+  else
+  {
+    // Seed (from Shift + left clic)
+    Point_2 p;
+    if(CGAL::assign(p, o))
+    {
+      m_seeds.push_back(p);
+      if(actionShow_seeds->isChecked())
+        dgi->setVisibleSeeds(true, m_seeds.begin(), m_seeds.end());
+    }
+  }
+
+  discoverComponents(cdt, m_seeds);
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPolyline_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+  } else {
+    scene.removeEventFilter(pi);
+  }
+}
+
+void
+MainWindow::on_actionInsertSeeds_OnOff_toggled(bool checked)
+{
+  if(checked){
+    std::cout << "Insert seeds with Shift + Left click" << std::endl;
+    scene.installEventFilter(dms);
+  } else {
+    scene.removeEventFilter(dms);
+  }
+}
+
+void
+MainWindow::on_actionShowDelaunay_toggled(bool checked)
+{
+  dgi->setVisibleEdges(checked);
+  if(checked)
+  {
+    dgi->setVisibleInsideEdges(false);
+    actionShowTriangulationInDomain->setChecked(false);
+  }
+  update();
+}
+
+void
+MainWindow::on_actionShowVertices_toggled(bool checked)
+{
+  dgi->setVisibleVertices(checked);
+  update();
+}
+
+void
+MainWindow::on_actionShowTriangulationInDomain_toggled(bool checked)
+{
+  dgi->setVisibleInsideEdges(checked);
+  if(checked)
+  {
+    dgi->setVisibleEdges(false);
+    actionShowDelaunay->setChecked(false);
+  }
+  update();
+}
+
+void
+MainWindow::on_actionShow_constrained_edges_toggled(bool checked)
+{
+  dgi->setVisibleConstraints(checked);
+  update();
+}
+
+void
+MainWindow::on_actionShow_voronoi_edges_toggled(bool checked)
+{
+  dgi->setVisibleVoronoiEdges(checked);
+  update();
+}
+
+void
+MainWindow::on_actionShow_faces_in_domain_toggled(bool checked)
+{
+  dgi->setVisibleFacesInDomain(checked);
+  update();
+}
+
+void
+MainWindow::on_actionShow_blind_faces_toggled(bool checked)
+{
+  dgi->setVisibleBlindFaces(checked);
+  update();
+}
+
+void
+MainWindow::on_actionShow_seeds_toggled(bool checked)
+{
+  dgi->setVisibleSeeds(checked, m_seeds.begin(), m_seeds.end());
+  update();
+}
+
+void
+MainWindow::on_actionCircumcenter_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(tcc);
+    tcc->show();
+  } else {  
+    scene.removeEventFilter(tcc);
+    tcc->hide();
+  }
+}
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  clear();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::clear()
+{
+  cdt.clear();
+  m_seeds.clear();
+
+  if(actionShow_seeds->isChecked())
+    dgi->setVisibleSeeds(true, m_seeds.end(), m_seeds.end());
+}
+
+void 
+MainWindow::open(QString fileName)
+{
+  if(! fileName.isEmpty()){
+    if(cdt.number_of_vertices() > 0)
+    {
+      QMessageBox msgBox(QMessageBox::Warning,
+        "Open new polygon",
+        "Do you really want to clear the current mesh?",
+        (QMessageBox::Yes | QMessageBox::No),
+        this);
+      int ret = msgBox.exec();
+      if(ret == QMessageBox::Yes)
+        clear();
+      else
+        return;
+    }
+    if(fileName.endsWith(".cgal")){
+      loadFile(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".plg")){
+      loadPolygonConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    } else if(fileName.endsWith(".edg")){
+      loadEdgConstraints(fileName);
+      this->addToRecentFiles(fileName);
+    }
+  }
+  Q_EMIT(changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::on_actionLoadConstraints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Constraint File"),
+						  ".",
+						  tr("Edge files (*.edg);;"
+						     "Poly files (*.plg)"));
+  open(fileName);
+}
+
+void
+MainWindow::loadFile(QString fileName)
+{
+  std::ifstream ifs(qPrintable(fileName));
+  ifs >> cdt;
+  if(!ifs) abort();
+  discoverComponents(cdt, m_seeds);
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::loadPolygonConstraints(QString fileName)
+{
+  K::Point_2 p,q, first;
+  CDT::Vertex_handle vp, vq, vfirst;
+  std::ifstream ifs(qPrintable(fileName));
+  int n;
+  // int counter = 0;
+  while(ifs >> n){
+    int poly_size = n;
+    ifs >> first;
+    p = first;
+    vfirst = vp = cdt.insert(p);
+    n--;
+    while(n--){
+      ifs >> q;
+      vq = cdt.insert(q, vp->face());
+      if(vp != vq) {
+        cdt.insert_constraint(vp,vq);
+        // std::cerr << "inserted constraint #" << counter++ << std::endl;
+      }
+      p = q;
+      vp = vq;
+    }
+    if(poly_size != 2 && vp != vfirst) {
+      cdt.insert_constraint(vp, vfirst);
+    }
+  }
+  
+  discoverComponents(cdt, m_seeds);
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+
+void
+MainWindow::loadEdgConstraints(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Timer tim;
+  tim.start();
+  std::ifstream ifs(qPrintable(fileName));
+  bool first=true;
+  int n;
+  ifs >> n;
+  
+  K::Point_2 p,q, qold;
+
+  CDT::Vertex_handle vp, vq, vqold;
+  while(ifs >> p) {
+    ifs >> q;
+    if(p == q){
+      continue;
+    }
+    if((!first) && (p == qold)){
+      vp = vqold;
+    } else {
+      vp = cdt.insert(p);
+    }
+    vq = cdt.insert(q, vp->face());
+    if(vp != vq) {
+      cdt.insert_constraint(vp,vq);
+    }
+    qold = q;
+    vqold = vq;
+    first = false;
+  }
+
+
+  tim.stop();
+  statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
+  discoverComponents(cdt, m_seeds);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+  actionRecenter->trigger();
+}
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(dgi->boundingRect());
+  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+void
+MainWindow::on_actionSaveConstraints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save Constraints"),
+						  ".",
+						  tr("Poly files (*.poly)\n"
+						     "Edge files (*.edg)"));
+  if(! fileName.isEmpty()){
+    saveConstraints(fileName);
+  }
+}
+
+
+void
+MainWindow::saveConstraints(QString fileName)
+{
+  std::ofstream output(qPrintable(fileName));
+  if (output) output << cdt;
+}
+
+
+void
+MainWindow::on_actionMakeGabrielConform_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::size_t nv = cdt.number_of_vertices();
+  CGAL::make_conforming_Gabriel_2(cdt);
+  nv = cdt.number_of_vertices() - nv;
+  discoverComponents(cdt, m_seeds);
+  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionMakeDelaunayConform_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::size_t nv = cdt.number_of_vertices();
+  CGAL::make_conforming_Delaunay_2(cdt);
+  discoverComponents(cdt, m_seeds);
+  nv = cdt.number_of_vertices() - nv;
+  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
+   // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionMakeDelaunayMesh_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  CGAL::Timer timer;
+  timer.start();
+  discoverComponents(cdt, m_seeds);
+  timer.stop();
+  QApplication::restoreOverrideCursor();
+
+  bool ok;
+  double shape = QInputDialog::getDouble(this, tr("Shape criterion"),
+    tr("B = "), 0.125, 0.005, 100, 4, &ok);
+  if(!ok) return;
+
+  double edge_len = QInputDialog::getDouble(this, tr("Size criterion"),
+    tr("S = "), 0., 0., (std::numeric_limits<double>::max)(), 5, &ok);
+  if(!ok) return;
+
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::size_t nv = cdt.number_of_vertices();
+  timer.start();
+
+  CGAL::refine_Delaunay_mesh_2(cdt,
+      m_seeds.begin(), m_seeds.end(),
+      Criteria(shape, edge_len),
+      false);//mesh the subdomains including NO seed
+
+  timer.stop();
+  nv = cdt.number_of_vertices() - nv;
+  statusBar()->showMessage(QString("Added %1 vertices in %2 seconds").arg(nv).arg(timer.time()), 2000);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionMakeLipschitzDelaunayMesh_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::set<Point_2> points;
+  for(CDT::Finite_edges_iterator it = cdt.finite_edges_begin();
+      it != cdt.finite_edges_end();
+      ++it){
+    if(cdt.is_constrained(*it)){
+      Segment_2 s = cdt.segment(*it);
+      points.insert(s.source());
+      points.insert(s.target());
+    }
+  }
+
+  discoverComponents(cdt, m_seeds);
+
+  bool ok;
+  double shape = QInputDialog::getDouble(this, tr("Shape criterion"),
+    tr("B = "), 0.125, 0.005, 100, 4, &ok);
+  if(!ok) return;
+  double klip = QInputDialog::getDouble(this, tr("k-Lipschitz sizing field"),
+    tr("k = "), 1., 0.01, 500, 5, &ok);
+  if(!ok) return;
+
+  Lipschitz_sizing_field field(points.begin(), points.end(), klip);
+  Lipschitz_criteria criteria(shape, &field);
+  Lipschitz_mesher mesher(cdt);
+  mesher.set_criteria(criteria);
+
+  std::size_t nv = cdt.number_of_vertices();
+  mesher.init(true);
+  mesher.set_seeds(m_seeds.begin(), m_seeds.end(),
+                   false);//mesh the subdomains including NO seed
+
+  mesher.refine_mesh();
+  nv = cdt.number_of_vertices() - nv;
+  statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     100,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::vector<Point_2> points;
+  points.reserve(number_of_points);
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(*pg++);
+  }
+  cdt.insert(points.begin(), points.end());
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+void
+MainWindow::on_actionTagBlindFaces_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  CVD voronoi(cdt);
+  voronoi.tag_faces_blind();
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT(changed());
+}
+
+void
+MainWindow::on_actionLloyd_optimization_triggered()
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+
+  bool ok;
+  int nb = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"),
+    tr("Number of iterations :"),
+    1/*val*/, 0/*min*/, 1000/*max*/, 1/*step*/, &ok);
+  if(!ok)
+  {
+    QApplication::restoreOverrideCursor();
+    return;
+  }
+
+  CGAL::lloyd_optimize_mesh_2(cdt,
+      max_iteration_number = nb,
+      seeds_begin = m_seeds.begin(),
+      seeds_end = m_seeds.end());
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT(changed());
+}
+
+#include "Constrained_Delaunay_triangulation_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Constrained_Delaunay_triangulation_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+
+  QStringList args = app.arguments();
+  args.removeAt(0);
+  Q_FOREACH(QString filename, args) {
+    mainWindow.open(filename);
+  }
+
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.qrc b/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui b/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui
new file mode 100644
index 0000000..84601e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>GeometryFactory</author>
+ <class>Constrained_Delaunay_triangulation_2</class>
+ <widget class="QMainWindow" name="Constrained_Delaunay_triangulation_2">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>CGAL Constrained Delaunay Triangulation</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/CGAL.qrc">
+    <normaloff>:/cgal/logos/cgal_icon</normaloff>:/cgal/logos/cgal_icon</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <item row="0" column="0">
+     <widget class="QGraphicsView" name="graphicsView">
+      <property name="focusPolicy">
+       <enum>Qt::StrongFocus</enum>
+      </property>
+      <property name="verticalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOn</enum>
+      </property>
+      <property name="transformationAnchor">
+       <enum>QGraphicsView::NoAnchor</enum>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="fileToolBar">
+   <property name="windowTitle">
+    <string>File Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionClear"/>
+   <addaction name="actionLoadConstraints"/>
+   <addaction name="actionSaveConstraints"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>Visualization Tools</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionInsertPolyline"/>
+   <addaction name="separator"/>
+   <addaction name="actionShowDelaunay"/>
+   <addaction name="actionShow_constrained_edges"/>
+   <addaction name="actionShowVoronoi"/>
+   <addaction name="actionShow_faces_in_domain"/>
+   <addaction name="actionCircumcenter"/>
+   <addaction name="separator"/>
+   <addaction name="actionRecenter"/>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="separator" />
+    <addaction name="actionClear" />
+    <addaction name="actionLoadConstraints" />
+    <addaction name="actionSaveConstraints" />
+    <addaction name="actionExport_SVG"/>
+    <addaction name="separator" />
+    <addaction name="actionQuit" />
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+    <addaction name="actionInsertRandomPoints"/>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>&Tools</string>
+    </property>
+    <addaction name="actionRecenter"/>
+    <addaction name="separator"/>
+    <addaction name="actionInsertPolyline"/>
+    <addaction name="actionInsertSeeds_OnOff"/>
+    <addaction name="separator"/>
+    <addaction name="actionShowVertices"/>
+    <addaction name="actionShowDelaunay"/>
+    <addaction name="actionShowVoronoi"/>
+    <addaction name="actionShowTriangulationInDomain"/>
+    <addaction name="actionShow_constrained_edges"/>
+    <addaction name="actionShow_voronoi_edges"/>
+    <addaction name="actionShow_faces_in_domain"/>
+    <addaction name="actionShow_seeds"/>
+    <addaction name="actionCircumcenter"/>
+    <addaction name="separator"/>
+    <addaction name="actionShow_blind_faces"/>
+    <addaction name="actionTagBlindFaces"/>
+    <addaction name="separator"/>
+    <addaction name="actionMakeGabrielConform"/>
+    <addaction name="actionMakeDelaunayConform"/>
+    <addaction name="actionMakeDelaunayMesh"/>
+    <addaction name="actionMakeLipschitzDelaunayMesh"/>
+    <addaction name="separator"/>
+    <addaction name="actionLloyd_optimization"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuTools"/>
+  </widget>
+  <action name="actionAbout">
+   <property name="text">
+    <string>&About</string>
+   </property>
+  </action>
+  <action name="actionAboutCGAL">
+   <property name="text">
+    <string>About &CGAL</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionInsertRandomPoints">
+   <property name="text">
+    <string>&Insert random points</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+I</string>
+   </property>
+  </action>
+  <action name="actionInsertPolyline">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/inputPolyline.png</normaloff>:/cgal/Input/inputPolyline.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Insert Polyline</string>
+   </property>
+   <property name="toolTip">
+    <string>Insert Point or Polyline</string>
+   </property>
+   <property name="statusTip">
+    <string>Left: Insert vtx | Right: Final vtx | Del: Delete vtx</string>
+   </property>
+  </action>
+  <action name="actionClear">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileNew.png</normaloff>:/cgal/fileToolbar/fileNew.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Clear</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionShowVoronoi">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../icons/Triangulation_2.qrc">
+     <normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</normaloff>:/cgal/Triangulation_2/Voronoi_diagram_2.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &Voronoi Diagram</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+V</string>
+   </property>
+   <property name="visible">
+    <bool>false</bool>
+   </property>
+  </action>
+  <action name="actionShowDelaunay">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Constrained_Delaunay_triangulation_2.qrc">
+     <normaloff>:/cgal/Actions/icons/constrained_triangulation.png</normaloff>:/cgal/Actions/icons/constrained_triangulation.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &triangulation</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+T</string>
+   </property>
+  </action>
+  <action name="actionLoadConstraints">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileOpen.png</normaloff>:/cgal/fileToolbar/fileOpen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Load...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+L</string>
+   </property>
+  </action>
+  <action name="actionSaveConstraints">
+   <property name="icon">
+    <iconset resource="../icons/File.qrc">
+     <normaloff>:/cgal/fileToolbar/fileSave.png</normaloff>:/cgal/fileToolbar/fileSave.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Save...</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionCircumcenter">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Constrained_Delaunay_triangulation_2.qrc">
+     <normaloff>:/cgal/Actions/icons/circumcenter.png</normaloff>:/cgal/Actions/icons/circumcenter.png</iconset>
+   </property>
+   <property name="text">
+    <string>&Circumcenter</string>
+   </property>
+   <property name="toolTip">
+    <string>Draw circumcenter</string>
+   </property>
+  </action>
+  <action name="actionRecenter">
+   <property name="icon">
+    <iconset resource="../icons/Input.qrc">
+     <normaloff>:/cgal/Input/zoom-best-fit</normaloff>:/cgal/Input/zoom-best-fit</iconset>
+   </property>
+   <property name="text">
+    <string>Re&center the viewport</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
+  </action>
+  <action name="actionMakeGabrielConform">
+   <property name="text">
+    <string>Make Gabriel conform</string>
+   </property>
+  </action>
+  <action name="actionMakeDelaunayConform">
+   <property name="text">
+    <string>Make Delaunay conform</string>
+   </property>
+  </action>
+  <action name="actionMakeDelaunayMesh">
+   <property name="text">
+    <string>Make Delaunay mesh...</string>
+   </property>
+  </action>
+  <action name="actionMakeLipschitzDelaunayMesh">
+   <property name="text">
+    <string>Make Lipschitz Delaunay mesh...</string>
+   </property>
+  </action>
+  <action name="actionShow_constrained_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Constrained_Delaunay_triangulation_2.qrc">
+     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_constraints.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &constrained edges</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+C</string>
+   </property>
+  </action>
+  <action name="actionShow_faces_in_domain">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="Constrained_Delaunay_triangulation_2.qrc">
+     <normaloff>:/cgal/Actions/icons/constrained_triangulation_show_in_domain.png</normaloff>:/cgal/Actions/icons/constrained_triangulation_show_in_domain.png</iconset>
+   </property>
+   <property name="text">
+    <string>Show &faces in domain</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+F</string>
+   </property>
+  </action>
+  <action name="actionShow_voronoi_edges">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show Voronoi edges (CVD)</string>
+   </property>
+  </action>
+  <action name="actionShow_blind_faces">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show blind faces (for CVD)</string>
+   </property>
+  </action>
+  <action name="actionTagBlindFaces">
+   <property name="text">
+    <string>Tag blind faces</string>
+   </property>
+  </action>
+  <action name="actionLloyd_optimization">
+   <property name="text">
+    <string>Lloyd optimization</string>
+   </property>
+  </action>
+  <action name="actionInsertSeeds_OnOff">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Insert seeds (on/off)</string>
+   </property>
+  </action>
+  <action name="actionShow_seeds">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show seeds</string>
+   </property>
+  </action>
+  <action name="actionShowTriangulationInDomain">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show triangulation in domain only</string>
+   </property>
+  </action>
+  <action name="actionShowVertices">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Show vertices</string>
+   </property>
+  </action>
+  <action name="actionExport_SVG">
+   <property name="text">
+    <string>&Export SVG...</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="Constrained_Delaunay_triangulation_2.qrc"/>
+  <include location="../icons/File.qrc"/>
+  <include location="../resources/CGAL.qrc"/>
+  <include location="../icons/Triangulation_2.qrc"/>
+  <include location="../icons/Input.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/DelaunayMeshInsertSeeds.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/DelaunayMeshInsertSeeds.h
new file mode 100644
index 0000000..5cf5df4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/DelaunayMeshInsertSeeds.h
@@ -0,0 +1,79 @@
+
+#ifndef CGAL_QT_DELAUNAY_MESH_INSERT_SEEDS_H
+#define CGAL_QT_DELAUNAY_MESH_INSERT_SEEDS_H
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+#include <CGAL/Qt/Converter.h>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename CDT>
+class DelaunayMeshInsertSeeds
+  : public GraphicsViewInput
+{
+public:
+  typedef typename CDT::Point Point;
+
+  DelaunayMeshInsertSeeds(QGraphicsScene* s,
+                          CDT* cdt,
+                          QObject* parent)
+    : GraphicsViewInput(parent)
+    , cdt_(cdt)
+    , scene_(s)
+  {}
+
+protected:
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event); 
+  bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+
+  CDT* cdt_;
+  QGraphicsScene* scene_;
+};
+
+
+template <typename T>
+void 
+DelaunayMeshInsertSeeds<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if((event->modifiers() & ::Qt::ShiftModifier)
+    && event->button() == ::Qt::LeftButton)
+  {
+    Converter<typename T::Geom_traits> convert;
+
+    typename T::Point seed = convert(event->scenePos());
+    Q_EMIT(generate(CGAL::make_object(seed)));
+  }
+}
+
+
+
+template <typename T>
+bool 
+DelaunayMeshInsertSeeds<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress)
+  {
+    QGraphicsSceneMouseEvent *mouseEvent 
+      = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return false;
+  }
+  else
+  {
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_DELAUNAY_MESH_INSERT_SEEDS_H
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.cpp
new file mode 100644
index 0000000..8f7ec1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.cpp
@@ -0,0 +1,400 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+
+#include <CGAL/point_generators_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+#include "TriangulationCircumcircle.h"
+#include "TriangulationMovingPoint.h"
+#include "TriangulationConflictZone.h"
+#include "TriangulationRemoveVertex.h"
+#include "TriangulationPointInputAndConflictZone.h"
+#include <CGAL/Qt/TriangulationGraphicsItem.h>
+#include <CGAL/Qt/VoronoiGraphicsItem.h>
+
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+  
+// the two base classes
+#include "ui_Delaunay_triangulation_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Delaunay_triangulation_2
+{
+  Q_OBJECT
+  
+private:  
+  Delaunay dt; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::TriangulationGraphicsItem<Delaunay> * dgi;
+  CGAL::Qt::VoronoiGraphicsItem<Delaunay> * vgi;
+
+  CGAL::Qt::TriangulationMovingPoint<Delaunay> * mp;
+  CGAL::Qt::TriangulationConflictZone<Delaunay> * cz;
+  CGAL::Qt::TriangulationRemoveVertex<Delaunay> * trv;
+  CGAL::Qt::TriangulationPointInputAndConflictZone<Delaunay> * pi;
+  CGAL::Qt::TriangulationCircumcircle<Delaunay> *tcc;
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionMovingPoint_toggled(bool checked);
+
+  void on_actionShowConflictZone_toggled(bool checked);
+
+  void on_actionCircumcenter_toggled(bool checked);
+
+  void on_actionShowDelaunay_toggled(bool checked);
+
+  void on_actionShowVoronoi_toggled(bool checked);
+
+  void on_actionInsertPoint_toggled(bool checked);
+  
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+  virtual void open(QString fileName);
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  this->graphicsView->setAcceptDrops(false);
+
+  // Add a GraphicItem for the Delaunay triangulation
+  dgi = new CGAL::Qt::TriangulationGraphicsItem<Delaunay>(&dt);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   dgi, SLOT(modelChanged()));
+
+  dgi->setVerticesPen(QPen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(dgi);
+
+  // Add a GraphicItem for the Voronoi diagram
+  vgi = new CGAL::Qt::VoronoiGraphicsItem<Delaunay>(&dt);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   vgi, SLOT(modelChanged()));
+
+  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(vgi);
+  vgi->hide();
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Delaunay>(&scene, &dt, this );
+
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  mp = new CGAL::Qt::TriangulationMovingPoint<Delaunay>(&dt, this);
+  // TriangulationMovingPoint<Delaunay> emits a modelChanged() signal each
+  // time the moving point moves.
+  // The following connection is for the purpose of emitting changed().
+  QObject::connect(mp, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  trv = new CGAL::Qt::TriangulationRemoveVertex<Delaunay>(&dt, this);
+  QObject::connect(trv, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  tcc = new CGAL::Qt::TriangulationCircumcircle<Delaunay>(&scene, &dt, this);
+  tcc->setPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+
+  cz = new CGAL::Qt::TriangulationConflictZone<Delaunay>(&scene, &dt, this);
+
+  // 
+  // Manual handling of actions
+  //
+
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPoint);
+  ag->addAction(this->actionMovingPoint);
+  ag->addAction(this->actionCircumcenter);
+  ag->addAction(this->actionShowConflictZone);
+
+  // Check two actions 
+  this->actionInsertPoint->setChecked(true);
+  this->actionShowDelaunay->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Delaunay_triangulation_2.html");
+  this->addAboutCGAL();
+  this->setupExportSVG(actionExport_SVG, graphicsView);
+
+  this->addRecentFiles(this->menuFile, this->actionQuit);
+  connect(this, SIGNAL(openRecentFile(QString)),
+	  this, SLOT(open(QString)));
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  Point_2 p;
+  if(CGAL::assign(p, o)){
+    dt.insert(p);
+  }
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPoint_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+    scene.installEventFilter(trv);
+  } else {
+    scene.removeEventFilter(pi);
+    scene.removeEventFilter(trv);
+  }
+}
+
+
+void
+MainWindow::on_actionMovingPoint_toggled(bool checked)
+{
+
+  if(checked){
+    scene.installEventFilter(mp);
+  } else {
+    scene.removeEventFilter(mp);
+  }
+}
+
+
+void
+MainWindow::on_actionShowConflictZone_toggled(bool checked)
+{
+
+  if(checked){
+    scene.installEventFilter(cz);
+  } else {
+    scene.removeEventFilter(cz);
+  }
+}
+
+void
+MainWindow::on_actionCircumcenter_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(tcc);
+    tcc->show();
+  } else {  
+    scene.removeEventFilter(tcc);
+    tcc->hide();
+  }
+}
+
+
+void
+MainWindow::on_actionShowDelaunay_toggled(bool checked)
+{
+  dgi->setVisibleEdges(checked);
+}
+
+
+void
+MainWindow::on_actionShowVoronoi_toggled(bool checked)
+{
+  vgi->setVisible(checked);
+}
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  dt.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;  
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)());
+  bool ok = false;
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"),
+			     100,
+			     0,
+			     (std::numeric_limits<int>::max)(),
+			     1,
+			     &ok);
+
+  if(!ok) {
+    return;
+  }
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::vector<Point_2> points;
+  points.reserve(number_of_points);
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(*pg++);
+  }
+  dt.insert(points.begin(), points.end());
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    open(fileName);
+  }
+}
+
+
+void
+MainWindow::open(QString fileName)
+{
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::ifstream ifs(qPrintable(fileName));
+  
+  K::Point_2 p;
+  std::vector<K::Point_2> points;
+  while(ifs >> p) {
+    // ignore whatever comes after x and y
+    ifs.ignore((std::numeric_limits<std::streamsize>::max)(), '\n'); 
+    points.push_back(p);
+  }
+  dt.insert(points.begin(), points.end());
+
+  // default cursor
+  QApplication::restoreOverrideCursor();
+  this->addToRecentFiles(fileName);
+  actionRecenter->trigger();
+  Q_EMIT( changed());
+    
+}
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    for(Delaunay::Finite_vertices_iterator 
+          vit = dt.finite_vertices_begin(),
+          end = dt.finite_vertices_end();
+        vit!= end; ++vit)
+    {
+      ofs << vit->point() << std::endl;
+    }
+  }
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(dgi->boundingRect());
+  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Delaunay_triangulation_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Delaunay_triangulation_2 demo");
+
+  // Import resources from libCGAL (QT5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+
+  QStringList args = app.arguments();
+  args.removeAt(0);
+  Q_FOREACH(QString filename, args) {
+    mainWindow.open(filename);
+  }
+
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.qrc b/3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.ui b/3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/Delaunay_triangulation_2.ui
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/Delaunay_triangulation_2.ui
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/RegularTriangulationRemoveVertex.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/RegularTriangulationRemoveVertex.h
new file mode 100644
index 0000000..3175a29
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/RegularTriangulationRemoveVertex.h
@@ -0,0 +1,80 @@
+
+#ifndef CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
+#define CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+#include <CGAL/Qt/Converter.h>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class RegularTriangulationRemoveVertex : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Vertex_handle Vertex_handle;
+
+  RegularTriangulationRemoveVertex(DT  * dt_, QObject* parent);
+
+protected:
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ 
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  DT * dt;
+};
+
+
+template <typename T>
+RegularTriangulationRemoveVertex<T>::RegularTriangulationRemoveVertex(T * dt_,
+							  QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_)
+{}
+
+
+
+template <typename T>
+void 
+RegularTriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if((event->modifiers()  & ::Qt::ShiftModifier)
+     && (! (event->modifiers() & ::Qt::ControlModifier))){
+    if(dt->number_of_vertices() == 0){
+      dt->clear();
+    }else {
+      typedef typename Kernel_traits<typename T::Bare_point>::Kernel K;
+      Converter<K> convert;
+      typename T::Vertex_handle selected_vertex = dt->nearest_power_vertex(convert(event->scenePos()));
+      dt->remove(selected_vertex);
+    }
+    Q_EMIT( modelChanged());
+  }
+}
+
+
+
+template <typename T>
+bool 
+RegularTriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return false;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_REGULAR_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.cpp
new file mode 100644
index 0000000..b67399a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.cpp
@@ -0,0 +1,312 @@
+#include <fstream>
+
+// CGAL headers
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
+#include <CGAL/Regular_triangulation_2.h>
+
+#include <CGAL/point_generators_2.h>
+
+// Qt headers
+#include <QtGui>
+#include <QString>
+#include <QActionGroup>
+#include <QFileDialog>
+#include <QInputDialog>
+
+// GraphicsView items and event filters (input classes)
+
+#include "RegularTriangulationRemoveVertex.h"
+#include <CGAL/Qt/GraphicsViewCircleInput.h>
+#include <CGAL/Qt/RegularTriangulationGraphicsItem.h>
+#include <CGAL/Qt/PowerdiagramGraphicsItem.h>
+  
+// for viewportsBbox
+#include <CGAL/Qt/utility.h>
+// the two base classes
+#include "ui_Regular_triangulation_2.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Point_2 Circle_2;
+typedef K::Iso_rectangle_2 Iso_rectangle_2;
+
+typedef double Weight;
+typedef CGAL::Regular_triangulation_euclidean_traits_2<K,Weight>  Gt;
+typedef CGAL::Regular_triangulation_2<Gt> Regular;
+
+class MainWindow :
+  public CGAL::Qt::DemosMainWindow,
+  public Ui::Regular_triangulation_2
+{
+  Q_OBJECT
+  
+private:  
+  Regular dt; 
+  QGraphicsScene scene;  
+
+  CGAL::Qt::RegularTriangulationGraphicsItem<Regular> * dgi;
+  CGAL::Qt::PowerdiagramGraphicsItem<Regular> * vgi;
+
+  CGAL::Qt::RegularTriangulationRemoveVertex<Regular> * trv;
+  CGAL::Qt::GraphicsViewCircleInput<K> * pi;
+public:
+  MainWindow();
+
+public Q_SLOTS:
+
+  void processInput(CGAL::Object o);
+
+  void on_actionShowRegular_toggled(bool checked);
+
+  void on_actionShowPowerdiagram_toggled(bool checked);
+
+  void on_actionInsertPoint_toggled(bool checked);
+  
+  void on_actionInsertRandomPoints_triggered();
+
+  void on_actionLoadPoints_triggered();
+
+  void on_actionSavePoints_triggered();
+
+  void on_actionClear_triggered();
+
+  void on_actionRecenter_triggered();
+
+
+Q_SIGNALS:
+  void changed();
+};
+
+
+MainWindow::MainWindow()
+  : DemosMainWindow()
+{
+  setupUi(this);
+
+  // Add a GraphicItem for the Regular triangulation
+  dgi = new CGAL::Qt::RegularTriangulationGraphicsItem<Regular>(&dt);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   dgi, SLOT(modelChanged()));
+
+  dgi->setVerticesPen(QPen(Qt::red, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(dgi);
+
+  // Add a GraphicItem for the Powerdiagram diagram
+  vgi = new CGAL::Qt::PowerdiagramGraphicsItem<Regular>(&dt);
+
+  QObject::connect(this, SIGNAL(changed()),
+		   vgi, SLOT(modelChanged()));
+
+  vgi->setEdgesPen(QPen(Qt::blue, 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+  scene.addItem(vgi);
+  vgi->hide();
+
+  // Setup input handlers. They get events before the scene gets them
+  // and the input they generate is passed to the triangulation with 
+  // the signal/slot mechanism    
+  pi = new CGAL::Qt::GraphicsViewCircleInput<K>(this, &scene, 1); // emits center/radius
+                                                                           
+
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  trv = new CGAL::Qt::RegularTriangulationRemoveVertex<Regular>(&dt, this);
+  QObject::connect(trv, SIGNAL(modelChanged()),
+		   this, SIGNAL(changed()));
+
+  // 
+  // Manual handling of actions
+  //
+  QObject::connect(this->actionQuit, SIGNAL(triggered()), 
+		   this, SLOT(close()));
+
+  // We put mutually exclusive actions in an QActionGroup
+  QActionGroup* ag = new QActionGroup(this);
+  ag->addAction(this->actionInsertPoint);
+
+  // Check two actions 
+  this->actionInsertPoint->setChecked(true);
+  this->actionShowRegular->setChecked(true);
+
+  //
+  // Setup the scene and the view
+  //
+  scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+  scene.setSceneRect(-100, -100, 100, 100);
+  this->graphicsView->setScene(&scene);
+  this->graphicsView->setMouseTracking(true);
+
+  // Turn the vertical axis upside down
+  this->graphicsView->matrix().scale(1, -1);
+                                                      
+  // The navigation adds zooming and translation functionality to the
+  // QGraphicsView
+  this->addNavigation(this->graphicsView);
+
+  this->setupStatusBar();
+  this->setupOptionsMenu();
+  this->addAboutDemo(":/cgal/help/about_Regular_triangulation_2.html");
+  this->addAboutCGAL();
+}
+
+
+void
+MainWindow::processInput(CGAL::Object o)
+{
+  std::pair<Point_2, K::FT > center_sqr;
+  if(CGAL::assign(center_sqr, o)){
+    Regular::Point wp(center_sqr.first, center_sqr.second);
+    dt.insert(wp);
+  }
+
+  Q_EMIT( changed());
+}
+
+
+/* 
+ *  Qt Automatic Connections
+ *  http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+ * 
+ *  setupUi(this) generates connections to the slots named
+ *  "on_<action_name>_<signal_name>"
+ */
+void
+MainWindow::on_actionInsertPoint_toggled(bool checked)
+{
+  if(checked){
+    scene.installEventFilter(pi);
+    scene.installEventFilter(trv);
+  } else {
+    scene.removeEventFilter(pi);
+    scene.removeEventFilter(trv);
+  }
+}
+
+
+
+void
+MainWindow::on_actionShowRegular_toggled(bool checked)
+{
+  dgi->setVisibleEdges(checked);
+}
+
+
+void
+MainWindow::on_actionShowPowerdiagram_toggled(bool checked)
+{
+  vgi->setVisible(checked);
+}
+
+
+void
+MainWindow::on_actionClear_triggered()
+{
+  dt.clear();
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionInsertRandomPoints_triggered()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(&scene);
+  CGAL::Qt::Converter<K> convert;
+  Iso_rectangle_2 isor = convert(rect);
+  CGAL::Random_points_in_iso_rectangle_2<Point_2> pg((isor.min)(), (isor.max)()); 
+
+  const int number_of_points = 
+    QInputDialog::getInt(this, 
+                             tr("Number of random points"),
+                             tr("Enter number of random points"), 100, 0);
+
+  // wait cursor
+  QApplication::setOverrideCursor(Qt::WaitCursor);
+  std::vector<Point_2> points;
+  points.reserve(number_of_points);
+  for(int i = 0; i < number_of_points; ++i){
+    points.push_back(*pg++);
+  }
+  dt.insert(points.begin(), points.end());
+  // default cursor
+  QApplication::setOverrideCursor(Qt::ArrowCursor);
+  Q_EMIT( changed());
+}
+
+
+void
+MainWindow::on_actionLoadPoints_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+						  tr("Open Points file"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ifstream ifs(qPrintable(fileName));
+
+    Gt::Weighted_point_2 p;
+    std::vector<Gt::Weighted_point_2> points;
+    while(ifs >> p) {
+      points.push_back(p);
+    }
+    dt.insert(points.begin(), points.end());
+
+    actionRecenter->trigger();
+    Q_EMIT( changed());
+  }
+}
+
+
+void
+MainWindow::on_actionSavePoints_triggered()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Save points"),
+						  ".");
+  if(! fileName.isEmpty()){
+    std::ofstream ofs(qPrintable(fileName));
+    for(Regular::Finite_vertices_iterator 
+          vit = dt.finite_vertices_begin(),
+          end = dt.finite_vertices_end();
+        vit!= end; ++vit)
+    {
+      ofs << vit->point() << std::endl;
+    }
+  }
+}
+
+
+void
+MainWindow::on_actionRecenter_triggered()
+{
+  this->graphicsView->setSceneRect(dgi->boundingRect());
+  this->graphicsView->fitInView(dgi->boundingRect(), Qt::KeepAspectRatio);  
+}
+
+
+#include "Regular_triangulation_2.moc"
+#include <CGAL/Qt/resources.h>
+
+int main(int argc, char **argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("geometryfactory.com");
+  app.setOrganizationName("GeometryFactory");
+  app.setApplicationName("Regular_triangulation_2 demo");
+
+  // Import resources from libCGAL (Qt5).
+  CGAL_QT_INIT_RESOURCES;
+
+  MainWindow mainWindow;
+  mainWindow.show();
+
+  QStringList args = app.arguments();
+  args.removeAt(0);
+  Q_FOREACH(QString filename, args) {
+    mainWindow.open(filename);
+  }
+
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.qrc b/3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.qrc
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.ui b/3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/Regular_triangulation_2.ui
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/Regular_triangulation_2.ui
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationCircumcircle.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationCircumcircle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationCircumcircle.h
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationCircumcircle.h
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationConflictZone.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationConflictZone.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/TriangulationConflictZone.h
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationConflictZone.h
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationMovingPoint.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationMovingPoint.h
new file mode 100644
index 0000000..b35412a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationMovingPoint.h
@@ -0,0 +1,147 @@
+
+#ifndef CGAL_QT_TRIANGULATION_MOVING_POINT
+#define CGAL_QT_TRIANGULATION_MOVING_POINT
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class TriangulationMovingPoint : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Face_handle Face_handle;
+  typedef typename DT::Vertex_handle Vertex_handle;
+  typedef typename DT::Point Point;
+
+  TriangulationMovingPoint(DT  * dt_, QObject* parent);
+
+protected:
+  void localize_and_insert_point(QPointF qt_point);
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  DT * dt;
+  Vertex_handle vh;
+  bool movePointToInsert;
+  bool insertedPoint;
+};
+
+
+template <typename T>
+TriangulationMovingPoint<T>::TriangulationMovingPoint(T * dt_,
+							  QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_), vh(), movePointToInsert(false), insertedPoint(false)
+{}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
+{
+  Point p(qt_point.x(), qt_point.y());
+  typename T::Locate_type lt;
+  int li;
+  Face_handle fh = (vh == Vertex_handle()) ? Face_handle() : vh->face();
+  fh = dt->locate(p, lt, li, fh); // fh serves as a hint
+  if(lt != T::VERTEX){
+    vh = dt->insert(p, lt, fh, li);
+    insertedPoint = true;
+    Q_EMIT( modelChanged());
+  } else {
+    vh = fh->vertex(0);
+    insertedPoint = false;
+  }
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(dt->number_of_vertices() == 0 ||
+     event->modifiers() != 0 ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+  movePointToInsert = true;
+  localize_and_insert_point(event->scenePos());
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+
+  if(! movePointToInsert) return;
+
+  // fh will be destroyed by the removal of vh.
+  // Let us take a neighbor that is not in the star of vh.
+  const Face_handle fh = vh->face();
+  Vertex_handle next_hint = fh->vertex((fh->index(vh)+1)&3);
+  if(insertedPoint){
+    dt->remove(vh);
+  }
+  vh = next_hint;
+  localize_and_insert_point(event->scenePos());
+}
+
+
+template <typename T>
+void 
+TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(! movePointToInsert ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+
+  if(insertedPoint){
+    dt->remove(vh);
+  }
+  vh = Vertex_handle();
+  
+  Q_EMIT( modelChanged());
+ 
+  movePointToInsert = false;
+}
+
+
+
+template <typename T>
+bool 
+TriangulationMovingPoint<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return false; // do not eat move event!
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_MOVING_POINT
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h
new file mode 100644
index 0000000..ded56c9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationPointInputAndConflictZone.h
@@ -0,0 +1,121 @@
+
+#ifndef CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
+#define CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class TriangulationPointInputAndConflictZone : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Geom_traits K;
+  typedef typename DT::Face_handle Face_handle;
+  typedef typename DT::Point Point;
+
+  TriangulationPointInputAndConflictZone(QGraphicsScene* s, DT  * dt_, QObject* parent);
+
+protected:
+  void localize_and_insert_point(QPointF qt_point);
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  std::list<Face_handle> faces;
+  std::list<QGraphicsPolygonItem*> qfaces;
+  DT * dt;
+  Converter<K> convert;
+  QGraphicsScene *scene_;
+  Point p;
+};
+
+
+template <typename T>
+TriangulationPointInputAndConflictZone<T>::TriangulationPointInputAndConflictZone(QGraphicsScene* s,
+							T * dt_,
+							QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_), scene_(s)
+{}
+
+
+
+
+template <typename T>
+void 
+TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+  p = convert(event->scenePos());
+  if(dt->dimension() < 2 ||
+     event->modifiers() != 0 ||
+     event->button() != ::Qt::LeftButton) {
+    return;
+  }
+  
+  QPen blackPen(::Qt::black, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin);
+  dt->find_conflicts(p, faces);
+  for(typename std::list<Face_handle>::iterator it = faces.begin();
+      it != faces.end();
+      ++it){
+    if(! dt->is_infinite(*it)){
+      QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
+      QColor color(::Qt::blue);
+      color.setAlpha(150);
+      item->setBrush(color);
+      item->setPen(blackPen);
+      scene_->addItem(item);
+      qfaces.push_back(item);
+    }
+  }
+}
+
+
+template <typename T>
+void 
+TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent * /*event*/)
+{
+  faces.clear();
+  for(std::list<QGraphicsPolygonItem*>::iterator it = qfaces.begin();
+      it != qfaces.end();
+      ++it){
+    scene_->removeItem(*it);
+    delete *it;
+  }
+  qfaces.clear();
+  Q_EMIT( generate(CGAL::make_object(p)));
+}
+
+
+
+template <typename T>
+bool 
+TriangulationPointInputAndConflictZone<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseReleaseEvent(mouseEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_POINT_INPUT_AND_TRIANGULATION_CONFLICT_ZONE
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationRemoveVertex.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationRemoveVertex.h
new file mode 100644
index 0000000..7f67106
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/TriangulationRemoveVertex.h
@@ -0,0 +1,81 @@
+
+#ifndef CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
+#define CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <QGraphicsSceneMouseEvent>
+#include <QEvent>
+#include <list>
+#include <CGAL/Qt/Converter.h>
+
+
+
+namespace CGAL {
+namespace Qt {
+
+template <typename DT>
+class TriangulationRemoveVertex : public GraphicsViewInput
+{
+public:
+  typedef typename DT::Face_handle Face_handle;
+  typedef typename DT::Vertex_handle Vertex_handle;
+  typedef typename DT::Point Point;
+
+  TriangulationRemoveVertex(DT  * dt_, QObject* parent);
+
+protected:
+
+  void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ 
+  bool eventFilter(QObject *obj, QEvent *event);
+
+  DT * dt;
+};
+
+
+template <typename T>
+TriangulationRemoveVertex<T>::TriangulationRemoveVertex(T * dt_,
+							  QObject* parent)
+  :  GraphicsViewInput(parent), dt(dt_)
+{}
+
+
+
+template <typename T>
+void 
+TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if((event->modifiers()  & ::Qt::ShiftModifier)
+     && (! (event->modifiers() & ::Qt::ControlModifier))){
+    if(dt->number_of_vertices() == 0){
+      dt->clear();
+    }else {
+      Converter<typename T::Geom_traits> convert;
+      typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
+      dt->remove(selected_vertex);
+    }
+    Q_EMIT( modelChanged());
+  }
+}
+
+
+
+template <typename T>
+bool 
+TriangulationRemoveVertex<T>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return false;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_REMOVE_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/about_Constrained_Delaunay_triangulation_2.html b/3rdparty/CGAL-4.8/demo/Triangulation_2/about_Constrained_Delaunay_triangulation_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/about_Constrained_Delaunay_triangulation_2.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/about_Constrained_Delaunay_triangulation_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/about_Delaunay_triangulation_2.html b/3rdparty/CGAL-4.8/demo/Triangulation_2/about_Delaunay_triangulation_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/about_Delaunay_triangulation_2.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/about_Delaunay_triangulation_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/about_Regular_triangulation_2.html b/3rdparty/CGAL-4.8/demo/Triangulation_2/about_Regular_triangulation_2.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/about_Regular_triangulation_2.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/about_Regular_triangulation_2.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/butterfly b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/butterfly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/butterfly
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/butterfly
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/butterfly.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/butterfly.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/butterfly.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/butterfly.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters.poly b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters.poly
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters.poly
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters2.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/clusters2.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/clusters2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish.poly b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/fish.poly
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/fish.poly
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img1.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img1.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img1.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img1.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img2.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img2.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img3.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img3.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img3.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img3.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img4.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img4.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img4.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img4.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img5.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img5.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img5.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img5.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img6.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img6.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img6.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img6.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img7.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img7.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img7.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img7.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/img8.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/img8.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/img8.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/img8.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/lettre_A.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/lettre_A.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/lettre_A.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/lettre_A.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/lettre_A_2.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/lettre_A_2.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/lettre_A_2.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/lettre_A_2.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/norway.edg b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/norway.edg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/norway.edg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/norway.edg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/poisson b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/poisson
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/poisson
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/poisson
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/tr b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/tr
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/tr
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/tr
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/triangulation.cgal b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/triangulation.cgal
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/triangulation.cgal
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/triangulation.cgal
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_2/data/trivial.poly b/3rdparty/CGAL-4.8/demo/Triangulation_2/data/trivial.poly
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_2/data/trivial.poly
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/data/trivial.poly
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/circumcenter.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/circumcenter.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/circumcenter.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/circumcenter.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/circumcenter.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/conflict_zone.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/conflict_zone.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/conflict_zone.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/conflict_zone.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/conflict_zone.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_constraints.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_constraints.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/constrained_triangulation_show_in_domain.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/constrained_triangulation_show_in_domain.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/moving_point.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/moving_point.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/moving_point.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/moving_point.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/moving_point.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.pdf b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/triangulation.pdf
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.pdf
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/triangulation.pdf
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png b/3rdparty/CGAL-4.8/demo/Triangulation_2/icons/triangulation.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/triangulation.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_2/icons/triangulation.png
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h b/3rdparty/CGAL-4.8/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h
new file mode 100644
index 0000000..d60f131
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h
@@ -0,0 +1,204 @@
+#ifndef DELAUNAY_MESH_SIZING_FIELD_CRITERIA_2_H
+#define DELAUNAY_MESH_SIZING_FIELD_CRITERIA_2_H
+
+#include <CGAL/Mesh_2/Face_badness.h>
+#include <CGAL/Delaunay_mesh_criteria_2.h>
+#include <utility>
+#include <ostream>
+
+#include <CGAL/Mesh_2/Lipschitz_sizing_field_2.h>
+
+
+namespace CGAL
+{
+
+template <class CDT, class SF>
+class Lipschitz_sizing_field_criteria_2
+  : public virtual Delaunay_mesh_criteria_2<CDT>
+{
+
+public:
+    
+  typedef SF Sizing_field;
+    
+protected:
+    
+  Sizing_field* sizing_field;
+
+  typedef typename CDT::Geom_traits Geom_traits;
+  Geom_traits traits;
+    
+public:
+    
+  typedef Delaunay_mesh_criteria_2<CDT> Base;
+    
+  Lipschitz_sizing_field_criteria_2(const double aspect_bound = 0.125,
+				    Sizing_field* sf = 0,
+                                    const Geom_traits& traits = Geom_traits())
+    : Base(aspect_bound), sizing_field(sf), traits(traits)
+  {}
+
+  Lipschitz_sizing_field_criteria_2& operator =(const Lipschitz_sizing_field_criteria_2<CDT,SF>& c)
+  {
+    if(&c == this) return *this;
+    this->sizing_field = c.sizing_field;
+    this->traits = c.traits;
+    return *this;
+  }
+
+  inline const Sizing_field* sizing_field_object()
+  {
+    return sizing_field;
+  }
+
+  struct Quality : public std::pair<double, double>
+  {
+    typedef std::pair<double, double> Base;
+      
+    Quality() : Base() {};
+    Quality(double _sine, double _size) : Base(_sine, _size) {};
+      
+    const double& size() const { return second; }
+    const double& sine() const { return first; }
+      
+    // q1<q2 means q1 is prioritised over q2
+    // ( q1 == *this, q2 == q )
+    bool operator<(const Quality& q) const
+    {
+      if( size() > 1 )
+	if( q.size() > 1 )
+	  return ( size() > q.size() );
+	else
+	  return true; // *this is big but not q
+      else
+	if( q.size() >  1 )
+	  return false; // q is big but not *this
+      return( sine() < q.sine() );
+    }
+  };
+    
+  class Is_bad : public Base::Is_bad
+  {
+  protected:
+
+    Sizing_field* sizing_field;
+
+  public:
+
+    typedef typename Base::Is_bad::Point_2 Point_2;
+
+    Is_bad(const double aspect_bound, Sizing_field* sf, 
+           const Geom_traits& traits)
+      : Base::Is_bad(aspect_bound, traits), sizing_field(sf)
+    {
+    }
+
+    Mesh_2::Face_badness operator ()(const typename CDT::Face_handle& fh, Quality& q)
+    {
+      typedef typename CDT::Geom_traits Geom_traits;
+      typedef typename Geom_traits::Compute_area_2 Compute_area_2;
+      typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance_2;
+	    
+      Geom_traits traits; /** @warning traits with data!! */
+	    
+      Compute_squared_distance_2 squared_distance = traits.compute_squared_distance_2_object();
+
+      const Point_2& pa = fh->vertex(0)->point();
+      const Point_2& pb = fh->vertex(1)->point();
+      const Point_2& pc = fh->vertex(2)->point();
+	    
+      double
+	a = CGAL::to_double(squared_distance(pb, pc)),
+	b = CGAL::to_double(squared_distance(pc, pa)),
+	c = CGAL::to_double(squared_distance(pa, pb));
+	    
+      double max_length; // squared max edge length
+      double second_max_length;
+	    
+      if(a < b)
+	{
+	  if(b < c) 
+	    {
+	      max_length = c;
+	      second_max_length = b;
+	    }
+	  else 
+	    { // c<=b
+	      max_length = b;
+	      second_max_length = ( a < c ? c : a );
+	    }
+	}
+      else // b<=a
+	{
+	  if(a < c) 
+	    {
+	      max_length = c;
+	      second_max_length = a;
+	    }
+	  else 
+	    { // c<=a
+	      max_length = a;
+	      second_max_length = ( b < c ? c : b );
+	    }
+	}
+
+      q.second = 0;
+
+      // compute the sizing field at the centroid of the vertices
+      const Point_2& pg = centroid(pa, pb, pc);
+      double squared_size_bound = sizing_field->operator()(pg);
+      squared_size_bound *= squared_size_bound;
+
+      if( squared_size_bound != 0 )
+	{
+	  q.second = max_length / squared_size_bound;
+	  // normalized by size bound to deal
+	  // with size field
+	  if( q.size() > 1 )
+	    {
+	      q.first = 1; // (do not compute sine)
+	      //std::cout << "imperatively bad!!\n";
+	      return Mesh_2::IMPERATIVELY_BAD;
+	    }
+	}
+
+      Compute_area_2 area_2 = traits.compute_area_2_object();
+	    
+      double area = 2*CGAL::to_double(area_2(pa, pb, pc));
+	    
+      q.first = (area * area) / (max_length * second_max_length); // (sine)
+	    
+      if( q.sine() < this->B )
+	{
+	  //std::cout << "bad!\n";
+	  return Mesh_2::BAD;
+	}
+      else
+	{
+	  //std::cout << "not bad.\n";
+	  return Mesh_2::NOT_BAD;
+	}
+    }
+	
+    Mesh_2::Face_badness operator ()(const Quality q) const
+    {
+      if(q.size() > 1)
+	return Mesh_2::IMPERATIVELY_BAD;
+      if(q.sine() < this->B)
+	return Mesh_2::BAD;
+      else
+	return Mesh_2::NOT_BAD;
+    }
+
+  };
+
+  Is_bad is_bad_object() const
+  { 
+    return Is_bad(this->bound(), sizing_field, traits);
+  }
+
+};
+
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Triangulation_3/CMakeLists.txt
new file mode 100644
index 0000000..20cba24
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/CMakeLists.txt
@@ -0,0 +1,99 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project (Triangulation_demo_3)
+
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL  COMPONENTS Qt5)
+include(${CGAL_USE_FILE})
+
+
+find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL)
+
+find_package(OpenGL)
+
+if(Qt5_FOUND)
+  add_definitions(-DQT_NO_KEYWORDS)
+  find_package(QGLViewer)
+endif(Qt5_FOUND)
+
+# Activate concurrency ? (turned OFF by default)
+option(ACTIVATE_CONCURRENT_TRIANGULATION_3
+  "Activate parallelism in Triangulation_3"
+  OFF)
+  
+# And add -DCGAL_CONCURRENT_TRIANGULATION_3 if that option is ON
+if( ACTIVATE_CONCURRENT_TRIANGULATION_3 )
+  add_definitions( -DCGAL_CONCURRENT_TRIANGULATION_3 )
+  find_package( TBB REQUIRED )
+else( ACTIVATE_CONCURRENT_TRIANGULATION_3 )
+  option( LINK_WITH_TBB
+    "Link with TBB anyway so we can use TBB timers for profiling"
+    ON)
+  if( LINK_WITH_TBB )
+    find_package( TBB )
+  endif( LINK_WITH_TBB )
+endif()
+
+if( TBB_FOUND )
+  include(${TBB_USE_FILE})
+endif()
+
+if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
+
+  include_directories (${QGLVIEWER_INCLUDE_DIR})
+  include_directories (BEFORE ../../include ./ )
+
+  # ui files, created with Qt Designer
+  qt5_wrap_ui( uis MainWindow.ui )
+
+  # qrc files (resources files, that contain icons, at least)
+  qt5_add_resources ( RESOURCE_FILES ./T3_demo.qrc )
+
+
+  # cpp files
+  add_executable  ( T3_demo T3_demo.cpp
+                    MainWindow.cpp Viewer.cpp
+                    PreferenceDlg.cpp
+                    Scene.cpp ${uis}  ${RESOURCE_FILES} )
+
+  qt5_use_modules(T3_demo Xml Script OpenGL)
+  add_to_cached_list( CGAL_EXECUTABLE_TARGETS T3_demo )
+
+  target_link_libraries( T3_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
+  target_link_libraries( T3_demo ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${TBB_LIBRARIES})
+  target_link_libraries( T3_demo ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
+
+else( CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
+
+  set(TRIANGULATION_3_MISSING_DEPS "")
+
+  if(NOT CGAL_Qt5_FOUND)
+    set(TRIANGULATION_3_MISSING_DEPS "the CGAL Qt5 library, ${TRIANGULATION_3_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT Qt5_FOUND)
+    set(TRIANGULATION_3_MISSING_DEPS "Qt5, ${TRIANGULATION_3_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT OPENGL_FOUND)
+    set(TRIANGULATION_3_MISSING_DEPS "OpenGL, ${TRIANGULATION_3_MISSING_DEPS}")
+  endif()      	   
+
+  if(NOT QGLVIEWER_FOUND)
+    set(TRIANGULATION_3_MISSING_DEPS "QGLViewer, ${TRIANGULATION_3_MISSING_DEPS}")
+  endif()      	   
+
+
+  message(STATUS "NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}and will not be compiled.")
+
+endif( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.cpp
new file mode 100644
index 0000000..f86e0cc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.cpp
@@ -0,0 +1,245 @@
+#include "MainWindow.h"
+#include <string>
+
+
+MainWindow::MainWindow(QWidget* parent)
+ : CGAL::Qt::DemosMainWindow(parent)
+{
+  //  Qt Automatic Connections
+  //   http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections
+  //  setupUi(this) automatically generates connections to the slots named
+  //   "on_<action_name>_<signal_name>"
+  setupUi(this);
+
+  this->viewer->setScene(&m_scene);
+  m_scene.setViewer(this->viewer);
+
+  // setup Mode menu group actions
+  QActionGroup *modeGroup = new QActionGroup(this);
+  modeGroup->addAction(this->actionNormal_View);
+  modeGroup->addAction(this->actionInsert_Vertex);
+  modeGroup->addAction(this->actionInsert_Point);
+  modeGroup->addAction(this->actionSelect_Vertex);
+  modeGroup->addAction(this->actionMove_Vertex);
+  modeGroup->addAction(this->actionFind_NearestNb);
+  modeGroup->addAction(this->actionEmpty_Sphere);
+  QObject::connect(modeGroup, SIGNAL(triggered(QAction *)), this, SLOT(setMode(QAction *)));
+
+  // connect menu actions to viewer slots
+  connectActions();
+
+  // About menu
+  // addAboutCGAL() is a function in DemoMainWindow
+  //   it will add a menu action "About CGAL..." to Help menu and connect to popupAboutCGAL
+  //   default popupAboutCGAL points to a fixed file directory ":/cgal/help/about_CGAL.html"
+  //   here we override it with our directory
+  this->addAboutCGAL();
+  // addAboutDemo(QString htmlResourceName) is also a function in DemoMainWindow
+  //   it will add a menu action "About Demo..." to Help menu
+  //   when the action is invoked, it will popup a messageBox showing the given html
+  this->addAboutDemo( "documentation/about.html" );
+
+}
+
+void MainWindow::connectActions()
+{
+  // Edit menu actions
+  QObject::connect(this->actionIncremental_Construct, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleIncremental(bool)));
+  QObject::connect(this->actionStop_Animation, SIGNAL(triggered()),
+	   this->viewer, SLOT(stopIncremental()));
+  QObject::connect(this->viewer, SIGNAL(stopIncAnimation()),
+	   this, SLOT(stopAnimation()));
+
+  // Show menu actions
+  QObject::connect(this->actionShow_Axis, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleShowAxis(bool)));
+  QObject::connect(this->actionShow_Vertex, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleShowVertex(bool)));
+  QObject::connect(this->actionShow_DEdge, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleShowDEdge(bool)));
+  QObject::connect(this->actionShow_VEdge, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleShowVEdge(bool)));
+  QObject::connect(this->actionShow_Facet, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleShowFacet(bool)));
+  QObject::connect(this->actionFlat, SIGNAL(toggled(bool)),
+	   this->viewer, SLOT(toggleFlat(bool)));
+
+  // Preferences
+  QObject::connect(this->actionPreferences, SIGNAL(triggered()),
+	   this->viewer, SLOT(setPreferences()));
+
+  // Help menu actions
+  QObject::connect(this->actionDemo_Help, SIGNAL(triggered()),
+	   this->viewer, SLOT(help()));
+  QObject::connect(this->actionAbout_T3_demo, SIGNAL(triggered()),
+       this, SLOT(popupAboutDemo()));
+
+  // Quit
+  QObject::connect(this->actionQuit, SIGNAL(triggered()),
+	   qApp, SLOT(closeAllWindows()));
+
+  // Viewer signals
+  QObject::connect(this, SIGNAL(sceneChanged()),
+	   this->viewer, SLOT(updateGL()));
+}
+
+void MainWindow::closeEvent(QCloseEvent * /*event*/)
+{
+  viewer->writeSettings();
+}
+
+/*************************************************************/
+/*  Action functions */
+
+void MainWindow::setMode(QAction *action)
+{
+  if( action == this->actionNormal_View )
+    this->viewer->setMode( viewer->NONE );
+  else if( action == this->actionInsert_Vertex )
+    this->viewer->setMode( viewer->INSERT_V );
+  else if( action == this->actionInsert_Point )
+    this->viewer->setMode( viewer->INSERT_PT );
+  else if( action == this->actionSelect_Vertex )
+    this->viewer->setMode( viewer->SELECT );
+  else if( action == this->actionMove_Vertex )
+    this->viewer->setMode( viewer->MOVE );
+  else if( action == this->actionFind_NearestNb )
+    this->viewer->setMode( viewer->FINDNB );
+  else if( action == this->actionEmpty_Sphere )
+    this->viewer->setMode( viewer->EMPTYSPH );
+}
+
+void MainWindow::on_actionLoad_Points_triggered()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+		     tr("Open an file"),	// dialog caption
+		     ".",	// initial directory
+		     tr("OFF files (*.off);;XYZ files (*.xyz);;All files (*.*)"));	// selection filter
+  if( fileName.isEmpty() )  return;
+
+  // erase old data
+  viewer->clear();
+
+  // parse fileName to get the file type
+  std::string fname = fileName.toLatin1().data();
+  std::string ftype = fname.substr( fname.find_last_of('.')+1 );
+
+  if ( ftype.compare("off")==0 || ftype.compare("OFF")==0 ) { // read from OFF file
+    m_scene.loadPointsOFF( fname.data() );
+    // set selectBuffer size (if necessary)
+    viewer->setSelBuffSize();
+  } else if ( ftype.compare("xyz")==0 || ftype.compare("XYZ")==0 ) { // read from XYZ file
+    m_scene.loadPointsXYZ( fname.data() );
+    // set selectBuffer size (if necessary)
+    viewer->setSelBuffSize();
+  } else {
+    viewer->displayMessage( tr("Please select an OFF or XYZ file to open!") );
+  }
+
+  // update viewer
+  Q_EMIT( sceneChanged() );
+}
+
+void MainWindow::on_actionSave_Points_triggered()
+{
+  if( m_scene.isDTEmpty() ) {
+    viewer->displayMessage( tr("Error: no existing triangulation to be saved.") );
+    return;
+  }
+
+  QString fileName = QFileDialog::getSaveFileName(this,
+		     tr("Save an file"),	// dialog caption
+		     ".",	// initial directory
+		     tr("OFF files (*.off);;XYZ files (*.xyz);;All files (*.*)"));	// selection filter
+  if( fileName.isEmpty() )  return;
+
+  // parse fileName to get the file type
+  std::string fname = fileName.toLatin1().data();//toAscii()
+  std::string ftype = fname.substr( fname.find_last_of('.')+1 );
+
+  if ( ftype.compare("off")==0 || ftype.compare("OFF")==0 ) { // save to OFF file
+    m_scene.savePointsOFF( fname.data() );
+  } else if ( ftype.compare("xyz")==0 || ftype.compare("XYZ")==0 ) { // save to XYZ file
+    m_scene.savePointsXYZ( fname.data() );
+  } else {
+    viewer->displayMessage( tr("Please select an OFF or XYZ file to open!") );
+  }
+}
+
+void MainWindow::on_actionGenerate_Points_triggered()
+{
+  bool isOk;
+ 
+  int nPoints = QInputDialog::getInt(this,
+              "3D Triangulation demo", "Number of points: ",	// caption and label
+              100, // default value
+              4, // min value
+              2147483647, // max value
+              1, // step value of arrow button
+              &isOk); // if OK is pressed
+
+
+  if ( isOk) {
+    // erase old data
+    viewer->clear();
+
+  	// generate points
+    m_scene.generatePoints(nPoints);
+    // set selectBuffer size (if necessary)
+    viewer->setSelBuffSize();
+
+    // update viewer
+    Q_EMIT( sceneChanged() );
+    viewer->changed();
+
+
+  }// if(isOk)
+}
+
+void MainWindow::stopAnimation()
+{
+  if( this->actionIncremental_Construct->isChecked() )
+    this->actionIncremental_Construct->setChecked( false );
+}
+
+void MainWindow::on_actionClear_Scene_triggered()
+{
+  viewer->clear();
+
+  // update viewer
+  Q_EMIT( sceneChanged() );
+}
+
+void MainWindow::popupAboutCGAL()
+{
+  // read contents from .html file
+  QFile about_CGAL( "documentation/about_CGAL.html" );
+  about_CGAL.open(QIODevice::ReadOnly);
+  QString about_CGAL_txt = QTextStream(&about_CGAL).readAll();
+#ifdef CGAL_VERSION_STR
+  about_CGAL_txt.replace("<!--CGAL_VERSION-->",
+                         QString(" (version %1, svn r%2)")
+                         .arg(CGAL_VERSION_STR).arg(CGAL_SVN_REVISION));
+#endif
+
+  // popup a message box
+  QMessageBox mb(QMessageBox::NoIcon,
+                 tr("About CGAL..."),
+                 about_CGAL_txt,
+                 QMessageBox::Ok,
+                 this);
+
+  // set links to be accessible by mouse or keyboard
+  QLabel* mb_label = mb.findChild<QLabel*>("qt_msgbox_label");
+  if(mb_label) {
+    mb_label->setTextInteractionFlags(mb_label->textInteractionFlags() | 
+                                      ::Qt::LinksAccessibleByMouse | 
+                                      ::Qt::LinksAccessibleByKeyboard);
+  } else {
+    std::cerr << "Cannot find child \"qt_msgbox_label\" in QMessageBox\n"
+              << "  with Qt version " << QT_VERSION_STR << "!\n";
+  }
+
+  mb.exec();
+}
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.h b/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.h
new file mode 100644
index 0000000..5cc2441
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.h
@@ -0,0 +1,55 @@
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include "ui_MainWindow.h"
+#include <CGAL/Qt/DemosMainWindow.h>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QMessageBox>
+
+#include <QtGui>
+
+#include "Scene.h"
+
+class QWidget;
+
+class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
+{
+  Q_OBJECT
+
+public:
+  MainWindow(QWidget* parent = 0);
+  ~MainWindow() {}
+
+public Q_SLOTS:
+  // file menu
+  void on_actionLoad_Points_triggered();
+  void on_actionSave_Points_triggered();
+
+  // edit menu
+  void on_actionGenerate_Points_triggered();
+  void stopAnimation();
+
+  // mode menu
+  void setMode(QAction *a);
+
+  // show menu
+  void on_actionClear_Scene_triggered();
+
+  // about menu
+  void popupAboutCGAL();
+
+  Q_SIGNALS:
+  void sceneChanged();
+
+protected:
+  void closeEvent(QCloseEvent *event);
+
+private:
+  void connectActions();
+
+private:
+  Scene m_scene;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.ui b/3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.ui
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/MainWindow.ui
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/MainWindow.ui
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.cpp
new file mode 100644
index 0000000..c922abd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.cpp
@@ -0,0 +1,398 @@
+#include <QtGui>
+#include "PreferenceDlg.h"
+
+
+PreferenceDlg::PreferenceDlg(QWidget *parent) : QDialog(parent)
+{
+  /* Vertex */
+
+  // create groupbox
+  QGroupBox *groupV = new QGroupBox( tr("Vertex") );
+  // create buttons
+  QPushButton *btnVertex = new QPushButton( tr("Set Color") );
+  // create color label
+  m_labelVertex = new QLabel;
+  m_labelVertex->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create size label
+  QLabel *labelSizeV = new QLabel( tr("Set Size") );
+  // create lineedit
+  m_editSizeV = new QLineEdit;
+
+  // connect to actions
+  connect( btnVertex, SIGNAL(clicked()), this, SLOT(setVertexColor()) );
+  connect( m_editSizeV, SIGNAL(textChanged(const QString&)), this, SLOT(setVertexSize(const QString&)) );
+
+  // lay out the buttons
+  QGridLayout *layoutV = new QGridLayout;
+  layoutV->addWidget( btnVertex, 0, 0 );
+  layoutV->addWidget( m_labelVertex, 0, 1 );
+  layoutV->addWidget( labelSizeV, 1, 0 );
+  layoutV->addWidget( m_editSizeV, 1, 1 );
+  groupV->setLayout( layoutV );
+
+  /* Delaunau Edge */
+
+  // create groupbox
+  QGroupBox *groupDE = new QGroupBox( tr("Delaunay Edge") );
+  // create button
+  QPushButton *btnDEdge = new QPushButton( tr("Set Color") );
+  // create color label
+  m_labelDEdge = new QLabel;
+  m_labelDEdge->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create size label
+  QLabel *labelSizeDE = new QLabel( tr("Set Size") );
+  // create lineedit
+  m_editSizeDE = new QLineEdit;
+
+  // connect to actions
+  connect( btnDEdge, SIGNAL(clicked()), this, SLOT(setDEdgeColor()) );
+  connect( m_editSizeDE, SIGNAL(textChanged(const QString&)), this, SLOT(setDEdgeSize(const QString&)) );
+
+  // lay out the buttons
+  QGridLayout *layoutDE = new QGridLayout;
+  layoutDE->addWidget( btnDEdge, 0, 0 );
+  layoutDE->addWidget( m_labelDEdge, 0, 1 );
+  layoutDE->addWidget( labelSizeDE, 1, 0 );
+  layoutDE->addWidget( m_editSizeDE, 1, 1 );
+  groupDE->setLayout( layoutDE );
+
+  /* Voronoi Edge */
+
+  // create groupbox
+  QGroupBox *groupVE = new QGroupBox( tr("Voronoi Edge") );
+  // create button
+  QPushButton *btnVEdge = new QPushButton( tr("Set Color") );
+  // create color label
+  m_labelVEdge = new QLabel;
+  m_labelVEdge->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create size label
+  QLabel *labelSizeVE = new QLabel( tr("Set Size") );
+  // create lineedit
+  m_editSizeVE = new QLineEdit;
+
+  // connect to actions
+  connect( btnVEdge, SIGNAL(clicked()), this, SLOT(setVEdgeColor()) );
+  connect( m_editSizeVE, SIGNAL(textChanged(const QString&)), this, SLOT(setVEdgeSize(const QString&)) );
+
+  // lay out the buttons
+  QGridLayout *layoutVE = new QGridLayout;
+  layoutVE->addWidget( btnVEdge, 0, 0 );
+  layoutVE->addWidget( m_labelVEdge, 0, 1 );
+  layoutVE->addWidget( labelSizeVE, 1, 0 );
+  layoutVE->addWidget( m_editSizeVE, 1, 1 );
+  groupVE->setLayout( layoutVE );
+
+  /* Facet */
+
+  // create groupbox
+  QGroupBox *groupF = new QGroupBox( tr("Facet") );
+  // create button
+  QPushButton *btnFacet = new QPushButton( tr("Set Color") );
+  // create color label
+  m_labelFacet = new QLabel;
+  m_labelFacet->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create label and spinbox
+  QLabel *labelFacetA = new QLabel( tr("Transparency") );
+  m_spinAlphaF = new QSpinBox;
+  m_spinAlphaF->setRange(0, 255);
+
+  // connect to actions
+  connect( btnFacet, SIGNAL(clicked()), this, SLOT(setFacetColor()) );
+  connect( m_spinAlphaF, SIGNAL(valueChanged(int)), this, SLOT(setFacetAlpha()) );
+
+  // lay out the buttons
+  QGridLayout *layoutF = new QGridLayout;
+  layoutF->addWidget( btnFacet, 0, 0 );
+  layoutF->addWidget( m_labelFacet, 0, 1 );
+  layoutF->addWidget( labelFacetA, 1, 0 );
+  layoutF->addWidget( m_spinAlphaF, 1, 1 );
+  groupF->setLayout( layoutF );
+
+  /* Trackball  */
+
+  // create groupbox
+  QGroupBox *groupB = new QGroupBox( tr("Trackball") );
+  // create button
+  QPushButton *btnBall = new QPushButton( tr("Set Color") );
+  // create color label
+  m_labelBall = new QLabel;
+  m_labelBall->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create label and spinbox
+  QLabel *labelBallA = new QLabel( tr("Transparency") );
+  m_spinAlphaB = new QSpinBox;
+  m_spinAlphaB->setRange(0, 255);
+  // create label and spinbox
+  QLabel *labelStep = new QLabel( tr("Step-long of Resizing") );
+  m_spinStep = new QSpinBox;
+  m_spinStep->setRange(1, 300);
+
+  // connect to actions
+  connect( btnBall, SIGNAL(clicked()), this, SLOT(setTrackballColor()) );
+  connect( m_spinAlphaB, SIGNAL(valueChanged(int)), this, SLOT(setTrackballAlpha()) );
+  connect( m_spinStep, SIGNAL(valueChanged(int)), this, SLOT(setStepLong()) );
+
+  // lay out the buttons
+  QGridLayout *layoutB = new QGridLayout;
+  layoutB->addWidget( btnBall, 0, 0 );
+  layoutB->addWidget( m_labelBall, 0, 1 );
+  layoutB->addWidget( labelBallA, 1, 0 );
+  layoutB->addWidget( m_spinAlphaB, 1, 1 );
+  layoutB->addWidget( labelStep, 2, 0 );
+  layoutB->addWidget( m_spinStep, 2, 1 );
+  groupB->setLayout( layoutB );
+
+  /* Empty Sphere  */
+
+  // create groupbox
+  QGroupBox *groupS = new QGroupBox( tr("Empty Sphere") );
+  // create color label
+  m_labelSphere = new QLabel;
+  m_labelSphere->setFrameStyle(QFrame::Sunken | QFrame::Panel);
+  // create button
+  QPushButton *btnSphere = new QPushButton( tr("Set Color") );
+  // create label and spinbox
+  QLabel *labelSphereA = new QLabel( tr("Transparency") );
+  m_spinAlphaS = new QSpinBox;
+  m_spinAlphaS->setRange(0, 255);
+
+  // connect to actions
+  connect( btnSphere, SIGNAL(clicked()), this, SLOT(setEmptySphereColor()) );
+  connect( m_spinAlphaS, SIGNAL(valueChanged(int)), this, SLOT(setEmptySphereAlpha()) );
+
+  // lay out the buttons
+  QGridLayout *layoutS = new QGridLayout;
+  layoutS->addWidget( btnSphere, 0, 0 );
+  layoutS->addWidget( m_labelSphere, 0, 1 );
+  layoutS->addWidget( labelSphereA, 1, 0 );
+  layoutS->addWidget( m_spinAlphaS, 1, 1 );
+  groupS->setLayout( layoutS );
+
+  /* OK buttons */
+  // create groupbox
+  QGroupBox *groupBtn = new QGroupBox();
+  // buttons
+  QPushButton *ok = new QPushButton( tr("OK") );
+  QPushButton *apply = new QPushButton( tr("Apply") );
+  QPushButton *cancel = new QPushButton( tr("Cancel") );
+  cancel->setFocus();
+
+  // connect to actions
+  connect( ok, SIGNAL(clicked()), this, SLOT(okClicked()) );
+  connect( apply, SIGNAL(clicked()), this, SLOT(applyClicked()) );
+  connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) );
+
+  // lay out the buttons
+  QGridLayout *layoutBtn = new QGridLayout;
+  layoutBtn->addWidget( ok, 0, 0 );
+  layoutBtn->addWidget( cancel, 0, 1 );
+  layoutBtn->addWidget( apply, 0, 2 );
+  groupBtn->setLayout( layoutBtn );
+
+  /* dialog layout */
+
+  // lay out the buttons
+  QGridLayout *main = new QGridLayout;
+  main->addWidget( groupV, 0, 1 );
+  main->addWidget( groupDE, 0, 2 );
+  main->addWidget( groupVE, 0, 3 );
+  main->addWidget( groupF, 1, 1 );
+  main->addWidget( groupB, 1, 2 );
+  main->addWidget( groupS, 1, 3 );
+  main->addWidget( groupBtn, 2, 2, 2, 3 );
+  setLayout( main );
+
+  // set dialog title
+  setWindowTitle( tr("Preferences") );
+}
+
+void PreferenceDlg::init(QColor clrVt, float sizeV, QColor clrDE, float sizeDE,
+                       QColor clrVE, float sizeVE,
+                       QColor clrF, QColor clrB, QColor clrS, int iStep)
+{
+  // vertex color
+  m_colorVertex = clrVt;
+  // show the color in label
+  m_labelVertex->setText(m_colorVertex.name());
+  m_labelVertex->setPalette( QPalette(m_colorVertex) );
+  m_labelVertex->setAutoFillBackground(true);
+  // vertex size
+  m_fSizeVertex = sizeV;
+  m_editSizeV->setText( QString::number( m_fSizeVertex ) );
+
+  // Delaunay edge color
+  m_colorDEdge = clrDE;
+  // show the color in label
+  m_labelDEdge->setText( m_colorDEdge.name() );
+  m_labelDEdge->setPalette( QPalette(m_colorDEdge) );
+  m_labelDEdge->setAutoFillBackground(true);
+  // edge size
+  m_fSizeDEdge = sizeDE;
+  m_editSizeDE->setText( QString::number( m_fSizeDEdge ) );
+
+  // Voronoi edge color
+  m_colorVEdge = clrVE;
+  // show the color in label
+  m_labelVEdge->setText( m_colorVEdge.name() );
+  m_labelVEdge->setPalette( QPalette(m_colorVEdge) );
+  m_labelVEdge->setAutoFillBackground(true);
+  // edge size
+  m_fSizeVEdge = sizeVE;
+  m_editSizeVE->setText( QString::number( m_fSizeVEdge ) );
+
+  // facet color
+  m_colorFacet = clrF;
+  // show the color in label
+  m_labelFacet->setText( m_colorFacet.name() );
+  m_labelFacet->setPalette( QPalette(m_colorFacet) );
+  m_labelFacet->setAutoFillBackground(true);
+  // facet transparency
+  m_spinAlphaF->setValue( m_colorFacet.alpha() );
+
+  // trackball color
+  m_colorTrackball = clrB;
+  // show the color in label
+  m_labelBall->setText(m_colorTrackball.name());
+  m_labelBall->setPalette( QPalette(m_colorTrackball) );
+  m_labelBall->setAutoFillBackground(true);
+  // trackball transparency
+  m_spinAlphaB->setValue( m_colorTrackball.alpha() );
+  // trackball resizing fineness
+  m_spinStep->setValue( iStep );
+
+  // empty sphere color
+  m_colorEmptySphere = clrS;
+  // show the color in label
+  m_labelSphere->setText(m_colorEmptySphere.name());
+  m_labelSphere->setPalette( QPalette(m_colorEmptySphere) );
+  m_labelSphere->setAutoFillBackground(true);
+  // trackball transparency
+  m_spinAlphaS->setValue( m_colorEmptySphere.alpha() );
+}
+
+void PreferenceDlg::setVertexColor()
+{
+  m_colorVertex = QColorDialog::getColor(m_colorVertex, this);
+  if( m_colorVertex.isValid() ) {
+    m_labelVertex->setText(m_colorVertex.name());
+    m_labelVertex->setPalette( QPalette(m_colorVertex) );
+    m_labelVertex->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setVertexSize(const QString& str)
+{
+  bool ok;
+  float size = str.toFloat(&ok);
+  if( ok )
+    m_fSizeVertex = size;
+  else {
+      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
+                 tr("Enter a valid floating number."),
+                 QMessageBox::Ok, this);
+      mb.exec();
+      m_editSizeV->setFocus();
+  }
+}
+
+void PreferenceDlg::setDEdgeColor()
+{
+  m_colorDEdge = QColorDialog::getColor(m_colorDEdge, this);
+  if( m_colorDEdge.isValid() ) {
+    m_labelDEdge->setText( m_colorDEdge.name() );
+    m_labelDEdge->setPalette( QPalette(m_colorDEdge) );
+    m_labelDEdge->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setDEdgeSize(const QString& str)
+{
+  bool ok;
+  float size = str.toFloat(&ok);
+  if( ok )
+    m_fSizeDEdge = size;
+  else {
+      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
+                 tr("Enter a valid floating number."),
+                 QMessageBox::Ok, this);
+      mb.exec();
+      m_editSizeDE->setFocus();
+  }
+}
+
+void PreferenceDlg::setVEdgeColor()
+{
+  m_colorVEdge = QColorDialog::getColor(m_colorVEdge, this);
+  if( m_colorVEdge.isValid() ) {
+    m_labelVEdge->setText( m_colorVEdge.name() );
+    m_labelVEdge->setPalette( QPalette(m_colorVEdge) );
+    m_labelVEdge->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setVEdgeSize(const QString& str)
+{
+  bool ok;
+  float size = str.toFloat(&ok);
+  if( ok )
+    m_fSizeVEdge = size;
+  else {
+      QMessageBox mb(QMessageBox::NoIcon, tr("Error!"),
+                 tr("Enter a valid floating number."),
+                 QMessageBox::Ok, this);
+      mb.exec();
+      m_editSizeVE->setFocus();
+  }
+}
+
+void PreferenceDlg::setFacetColor()
+{
+  m_colorFacet = QColorDialog::getColor(m_colorFacet, this);
+  if( m_colorFacet.isValid() ) {
+    m_labelFacet->setText( m_colorFacet.name() );
+    m_colorFacet.setAlpha( m_spinAlphaF->value() );
+    m_labelFacet->setPalette( QPalette(m_colorFacet) );
+    m_labelFacet->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setFacetAlpha()
+{
+  m_colorFacet.setAlpha( m_spinAlphaF->value() );
+}
+
+void PreferenceDlg::setTrackballColor()
+{
+  m_colorTrackball = QColorDialog::getColor(m_colorTrackball, this);
+  if( m_colorTrackball.isValid() ) {
+    m_labelBall->setText( m_colorTrackball.name() );
+    m_colorTrackball.setAlpha( m_spinAlphaB->value() );
+    m_labelBall->setPalette( QPalette(m_colorTrackball) );
+    m_labelBall->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setTrackballAlpha()
+{
+  m_colorTrackball.setAlpha( m_spinAlphaB->value() );
+}
+
+void PreferenceDlg::setStepLong()
+{
+  m_iStep = m_spinStep->value();
+}
+
+void PreferenceDlg::setEmptySphereColor()
+{
+  m_colorEmptySphere = QColorDialog::getColor(m_colorEmptySphere, this);
+  if( m_colorEmptySphere.isValid() ) {
+    m_labelSphere->setText( m_colorEmptySphere.name() );
+    m_colorEmptySphere.setAlpha( m_spinAlphaS->value() );
+    m_labelSphere->setPalette( QPalette(m_colorEmptySphere) );
+    m_labelSphere->setAutoFillBackground(true);
+  }
+}
+
+void PreferenceDlg::setEmptySphereAlpha()
+{
+  m_colorEmptySphere.setAlpha( m_spinAlphaS->value() );
+}
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.h b/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.h
new file mode 100644
index 0000000..8751a98
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/PreferenceDlg.h
@@ -0,0 +1,84 @@
+#ifndef PREFERENCE_DLG_H
+#define PREFERENCE_DLG_H
+
+#include <QDialog>
+#include <QColorDialog>
+
+#include <QGridLayout>
+#include <QGroupBox> 
+
+#include <QLabel>
+#include <QLineEdit>
+
+#include <QMessageBox>
+
+#include <QPushButton>
+
+#include <QSpinBox>
+
+
+class QLabel;
+class QSpinBox;
+class QLineEdit;
+
+class PreferenceDlg : public QDialog
+{
+  Q_OBJECT
+
+  friend class Viewer;
+
+public:
+  PreferenceDlg(QWidget *parent=0);
+
+private:
+  void init(QColor, float, QColor, float, QColor, float, QColor, QColor, QColor, int);
+
+private Q_SLOTS:
+  void okClicked() { hide(); Q_EMIT( applyChanges() ); }
+  void applyClicked() { Q_EMIT( applyChanges() ); }
+
+  void setVertexColor();
+  void setVertexSize(const QString&);
+  void setDEdgeColor();
+  void setDEdgeSize(const QString&);
+  void setVEdgeColor();
+  void setVEdgeSize(const QString&);
+  void setFacetColor();
+  void setFacetAlpha();
+  void setTrackballColor();
+  void setTrackballAlpha();
+  void setStepLong();
+  void setEmptySphereColor();
+  void setEmptySphereAlpha();
+
+  Q_SIGNALS: // Signals do not have access specifier
+  void applyChanges();
+
+private:
+  QLabel *m_labelVertex;
+  QLineEdit *m_editSizeV;
+  QLabel *m_labelDEdge;
+  QLineEdit *m_editSizeDE;
+  QLabel *m_labelVEdge;
+  QLineEdit *m_editSizeVE;
+  QLabel *m_labelFacet;
+  QSpinBox *m_spinAlphaF;
+  QLabel *m_labelBall;
+  QSpinBox *m_spinAlphaB;
+  QSpinBox *m_spinStep;
+  QLabel *m_labelSphere;
+  QSpinBox *m_spinAlphaS;
+
+  float m_fSizeVertex;
+  float m_fSizeDEdge;
+  float m_fSizeVEdge;
+  QColor m_colorVertex;
+  QColor m_colorDEdge;
+  QColor m_colorVEdge;
+  QColor m_colorFacet;
+  QColor m_colorTrackball;
+  int m_iStep;
+  QColor m_colorEmptySphere;
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/Scene.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3/Scene.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/Scene.cpp
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/Scene.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/Scene.h b/3rdparty/CGAL-4.8/demo/Triangulation_3/Scene.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/Scene.h
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/Scene.h
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.cpp
new file mode 100644
index 0000000..79b8531
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.cpp
@@ -0,0 +1,42 @@
+// Copyright (c) 2010  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: svn+ssh://sccode@scm.gforge.inria.fr/svn/cgal/branches/experimental-packages/GSoC10-demoT3/demos/Triangulation_demo_3/ $
+// $Id: r58170 2010-08-19 20:46:16 -0400 $
+//
+//
+// Author(s)     : Sophie Fei Che <fei at cis.udel.edu>
+//
+// File Description : Demo of CGAL 3D Triangulation package
+
+#include "MainWindow.h"
+#include <QApplication>
+
+int main(int argc, char** argv)
+{
+  QApplication app(argc, argv);
+
+  app.setOrganizationDomain("inria.fr");
+  app.setOrganizationName("INRIA");
+  app.setApplicationName("3D Triangulation Demo");
+  //for windows
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
+  app.setAttribute(Qt::AA_UseDesktopOpenGL);
+#endif
+
+  MainWindow mw;
+  mw.show();
+
+  return app.exec();
+}
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.qrc b/3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/T3_demo.qrc
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/T3_demo.qrc
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.cpp
new file mode 100644
index 0000000..c713a15
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.cpp
@@ -0,0 +1,2925 @@
+#include <boost/config.hpp>
+#include <QDebug>
+
+#if defined(BOOST_MSVC)
+// Avoid warning concerning spatial_sort(QList::begin(), QList.end() QT "bug"
+#  pragma warning(disable: 4267 )
+#  pragma warning(disable: 4244 )
+#endif
+
+#include "Viewer.h"
+
+
+
+
+using namespace std;
+
+
+void Viewer::init()
+{
+    initializeOpenGLFunctions();
+    glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDARBPROC)this->context()->getProcAddress("glDrawArraysInstancedARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glDrawArraysInstancedARB : extension not found. Spheres will be displayed as points.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+
+    glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORARBPROC)this->context()->getProcAddress("glVertexAttribDivisorARB");
+    if(!glDrawArraysInstanced)
+    {
+        qDebug()<<"glVertexAttribDivisorARB : extension not found. Spheres will be displayed as points.";
+        extension_is_found = false;
+    }
+    else
+        extension_is_found = true;
+//    extension_is_found = false;
+
+    /* Initial timer for playing incremental construction */
+    m_pTimer = new QTimer(this);
+    connect(m_pTimer, SIGNAL(timeout()), this, SLOT(incremental_insert()));
+
+    /* Scene inits */
+    setBackgroundColor(::Qt::white);
+    // scene are defined by a sphere of 2.0, camera at the center, i.e. (0, 0, 0)
+    setSceneCenter( qglviewer::Vec(-0.,-0.,-0.) );
+    setSceneRadius( 2. );
+    // show text message
+    setTextIsEnabled(true);
+    setForegroundColor(::Qt::red);
+    setFont(QFont("Arial Black", 16, QFont::Bold));
+
+    /* OpenGL inits */
+    // Increase the material shininess, so that the difference between
+    // the two versions of the spiral is more visible.
+    glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 50.0);
+    GLfloat specular_color[4] = { 0.8f, 0.8f, 0.8f, 1.0 };
+    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,  specular_color);
+    // Set Smooth Shading
+    ::glShadeModel(GL_SMOOTH);
+
+    // depth buffer setup
+    ::glClearDepth(1.0f);
+    ::glEnable(GL_DEPTH_TEST);
+    ::glDepthFunc(GL_LEQUAL);
+    ::glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+
+    // enable semi-transparent culling planes
+    ::glEnable(GL_BLEND);
+    ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+    // anti-aliasing, i.e. reduce jaggedness (if the OpenGL driver permits that)
+    ::glEnable(GL_POINT_SMOOTH);
+    ::glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+    ::glEnable(GL_LINE_SMOOTH);
+    ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+
+    /* Add mouse and key description */
+    setKeyDescription( Qt::CTRL + Qt::Key_G, tr("Generate points") );
+    setKeyDescription( Qt::CTRL + Qt::Key_O, tr("Load points") );
+    setKeyDescription( Qt::CTRL + Qt::Key_S, tr("Save points") );
+    setKeyDescription( Qt::CTRL + Qt::Key_Comma, tr("Preference") );
+    setKeyDescription( Qt::CTRL + Qt::Key_H, tr("Hide Kernel Demo") );
+    setKeyDescription( Qt::CTRL + Qt::Key_Q, tr("Quit Kernel Demo") );
+    setKeyDescription( Qt::Key_Return,
+                       tr("Insert new point to triangulation in <u>Input-Point</u> mode") );
+    setKeyDescription( Qt::Key_Escape,
+                       tr("Cancel insertion in <u>Input-Point</u> mode;<br>")
+                       + tr("Cancel current selection in <u>Select</u> mode") );
+    setKeyDescription( Qt::Key_Delete, tr("Delete selected vertices in <u>Select</u> mode") );
+#if QGLVIEWER_VERSION >= 0x020500
+    setMouseBindingDescription(Qt::NoModifier, Qt::LeftButton,
+                               tr("Hold to move new point in <u>Input-Point</u> mode;<br>")
+                               + tr("Hold to move a vertex in <u>Move</u> mode") );
+    setMouseBindingDescription(Qt::ShiftModifier, Qt::LeftButton,
+                               tr("Click to insert a vertex in <u>Input-Vertex</u> mode;<br>")
+                               + tr("Click to insert a point in <u>Input-Point</u> mode;<br>")
+                               + tr("Click or Drag to select multiple points in <u>Select</u> mode;<br>")
+                               + tr("Click to place a query point in <u>Find-Nearest-Neighbor</u> mode;<br>")
+                               + tr("Click to place a query point in <u>Show-Empty-Sphere</u> mode") );
+    setMouseBindingDescription(Qt::ControlModifier, Qt::LeftButton,
+                               tr("Drag to add vertices to current selection in <u>Select</u> mode") );
+#else
+    setMouseBindingDescription( Qt::LeftButton,
+                                tr("Hold to move new point in <u>Input-Point</u> mode;<br>")
+                                + tr("Hold to move a vertex in <u>Move</u> mode") );
+    setMouseBindingDescription( Qt::SHIFT + Qt::LeftButton,
+                                tr("Click to insert a vertex in <u>Input-Vertex</u> mode;<br>")
+                                + tr("Click to insert a point in <u>Input-Point</u> mode;<br>")
+                                + tr("Click or Drag to select multiple points in <u>Select</u> mode;<br>")
+                                + tr("Click to place a query point in <u>Find-Nearest-Neighbor</u> mode;<br>")
+                                + tr("Click to place a query point in <u>Show-Empty-Sphere</u> mode") );
+    setMouseBindingDescription( Qt::CTRL + Qt::LeftButton,
+                                tr("Drag to add vertices to current selection in <u>Select</u> mode") );
+#endif
+    compile_shaders();
+    are_buffers_initialized = false;
+}
+
+QString Viewer::helpString() const
+{
+    QString text("<h1>3D Triangulation Demo</h1>");
+
+    text += "This example illustrates a generic interactive demo for 3D Triangulation in CGAL. ";
+    text += "This demo could be used as a simple skeleton ";
+    text += "for potential demos of other 3D packages or for teaching CGAL.<br><br>";
+
+    text += "The key feature is to edit vertices/points with mouse.";
+    text += "There are several modes:<br><br>";
+
+    text += " - <u>Normal Mode</u>: ";
+    text += "Rotate, zoom, or translate camera using mouse.<br>";
+    text += " - <u>Insert Vertex</u>: ";
+    text += "Insert a vertex on the surface of the trackball ";
+    text += "and the triangulation will be updated correspondingly.<br>";
+    text += " - <u>Insert Point</u>: ";
+    text += "Insert a point on the surface of the trackball. ";
+    text += "Its conflict region will be highlighted. ";
+    text += "When the new point is moving, ";
+    text += "its conflict region will be updated correspondingly.<br>";
+    text += " - <u>Select</u>: ";
+    text += "Click or drag mouse left button to select multiple points.<br>";
+    text += " - <u>Move</u>: Hold mouse left button to move a vertex ";
+    text += "and the triangulation will be updated correspondingly.<br>";
+    text += " - <u>Find Nearest Neighbor</u>: ";
+    text += "Place a query point and its nearest neighbor will be highlighted.<br>";
+    text += " - <u>Show Empty Sphere</u>: ";
+    text += "Place a query point, locate the point in a cell ";
+    text += "and then show the empty sphere of that cell. ";
+    text += "An empty sphere of a cell is a sphere ";
+    text += "with all four vertices of the cell lying on it ";
+    text += "and no other vertices inside it.<br><br>";
+    text += "<b>Shift+Wheel</b> to resize the trackball when it exists. ";
+    text += "See <b>Mouse</b> page for more details.<br><br>";
+
+    text += "Other basic features include:<br>";
+    text += " - Randomly generate points,<br>";
+    text += " - Read/Write files,<br>";
+    text += " - Show vertices, Voronoi edges, Delaunay edges, and/or facets,<br>";
+    text += " - Incremental Construct: ";
+    text += "Re-construct the current triangulation incrementally. ";
+    text += "If no triangulation exists yet, randomly generate 100 points ";
+    text += "and construct a Delaunay triangulation of those points.<br>";
+
+    return text;
+}
+/*************************************************************/
+/*  Shaders functions */
+
+void Viewer::compile_shaders()
+{
+
+    for(int i=0; i< vboSize; i++)
+        buffers[i].create();
+    for(int i=0; i< vaoSize; i++)
+        vao[i].create();
+
+     // read last setting from .ini file
+    readSettings();
+    draw_cylinder(m_fSizeDEdge,25,points_cylinder,normals_cylinder);
+    draw_sphere(m_fSizeVertex, 15, points_sphere, normals_sphere);
+    //Vertex source code
+    const char vertex_source[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * vertex; \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source[] =
+    {
+        "#version 120 \n"
+        "uniform highp vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+
+    // sphere program
+    //Vertex source code
+    const char vertex_source_spheres[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 center;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * (vertex+vec4(center.xyz, 0.0)); \n"
+        "}"
+    };
+    //Fragment source code
+    const char fragment_source_spheres[] =
+    {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform vec4 color; \n"
+        "uniform highp vec4 light_pos;  \n"
+        "uniform highp vec4 light_diff; \n"
+        "uniform highp vec4 light_spec; \n"
+        "uniform highp vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = abs(dot(N,L)) * light_diff*color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+        "gl_FragColor = color*light_amb + diffuse + specular; \n"
+        "} \n"
+        "\n"
+    };
+    QOpenGLShader *vertex_shader_spheres = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader_spheres->compileSourceCode(vertex_source_spheres))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+
+    QOpenGLShader *fragment_shader_spheres= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader_spheres->compileSourceCode(fragment_source_spheres))
+    {
+        std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+
+    if(!rendering_program_spheres.addShader(vertex_shader_spheres))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_spheres.addShader(fragment_shader_spheres))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_spheres.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program_spheres.bind();
+
+    // cylinder program
+    //Vertex source code
+    const char vertex_source_cylinders[] =
+    {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+        "attribute highp vec4 transfo1;\n"
+        "attribute highp vec4 transfo2;\n"
+        "attribute highp vec4 transfo3;\n"
+        "attribute highp vec4 transfo4;\n"
+        "mat4 transfo = mat4(transfo1, transfo2, transfo3, transfo4); \n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   vec4 TN = transfo*vec4(normal,1.0); \n"
+        "   fN = mat3(mv_matrix)* TN.xyz; \n"
+        "   gl_Position =  mvp_matrix * transfo* vertex; \n"
+        "}"
+    };
+
+
+
+    QOpenGLShader *vertex_shader_cylinders = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader_cylinders->compileSourceCode(vertex_source_cylinders))
+    {
+        std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.addShader(vertex_shader_cylinders))
+    {
+        std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.addShader(fragment_shader_spheres))
+    {
+        std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_cylinders.link())
+    {
+        std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program_cylinders.bind();
+
+}
+
+void Viewer::compute_elements()
+{
+    pos_points->resize(0);
+    pos_delaunay->resize(0);
+    pos_voronoi->resize(0);
+    pos_facets->resize(0);
+    pos_newPoint->resize(0);
+    pos_newFacet->resize(0);
+    pos_selectedVertex->resize(0);
+    pos_movingPoint->resize(0);
+    pos_queryPoint->resize(0);
+    pos_nearest_neighbor->resize(0);
+    pos_emptyFacet->resize(0);
+    transfo1_delaunay->resize(0);
+    transfo2_delaunay->resize(0);
+    transfo3_delaunay->resize(0);
+    transfo4_delaunay->resize(0);
+
+    pos_trackBall->resize(0);
+    draw_sphere(m_fRadius, 35,points_trackBall, normals_trackBall);
+    for(int i=0; i<3; i++)
+        pos_trackBall->push_back(0.0);
+    pos_emptySphere->resize(0);
+    // Draw vertices
+    if ( m_pScene->m_dt.number_of_vertices()>0 ) {
+
+        for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
+            vit < m_pScene->m_vhArray.end(); ++vit) {
+            if( m_curMode == SELECT && (*vit)->isSeled() )  continue;
+            if( (*vit) == m_nearestNb ) continue;
+            drawVertex( (*vit)->point(), pos_points );
+        }//end-for-points
+    }//end-if-points
+    //Draw Delaunay Edges
+    for(edges_iterator eit = m_pScene->m_dt.finite_edges_begin();
+        eit != m_pScene->m_dt.finite_edges_end(); ++eit) {
+        Segment_3 seg = m_pScene->m_dt.segment(*eit);
+        drawEdge( seg.vertex(0), seg.vertex(1), pos_delaunay );
+
+        Vector_3 v = seg.vertex(1) - seg.vertex(0);
+        float length = sqrt( v.squared_length() );
+        // normalize
+        v = v / length;
+        // compute the angle: cos theta = v.z/1.0
+        GLfloat angle = acos( v.y() ) / M_PI * 180;
+        QMatrix4x4 matrix;
+        matrix.setToIdentity();
+        // move to "from" point
+        matrix.translate( seg.vertex(0).x(), seg.vertex(0).y(), seg.vertex(0).z() );
+        // rotate from z-axis to from-->to
+        //  axis: cross product of z-axis and from-->to
+        matrix.rotate( angle, v.z(), 0.0f,-v.x());
+        matrix.scale(1,length,1);
+        // stock the transformation
+        for(int i=0; i<4; i++)
+            transfo1_delaunay->push_back((float)matrix.data()[i]);
+        for(int i=4; i<8; i++)
+            transfo2_delaunay->push_back((float)matrix.data()[i]);
+        for(int i=8; i<12; i++)
+            transfo3_delaunay->push_back((float)matrix.data()[i]);
+        for(int i=12; i<16; i++)
+            transfo4_delaunay->push_back((float)matrix.data()[i]);
+    }//end-for-edges
+    // Draw Voronoi edges
+    for(facets_iterator fit = m_pScene->m_dt.finite_facets_begin();
+        fit != m_pScene->m_dt.finite_facets_end(); ++fit) {
+        Object_3 o = m_pScene->m_dt.dual(*fit);
+        if (const Segment_3 *s = CGAL::object_cast<Segment_3>(&o)) {
+            drawEdge( s->vertex(0), s->vertex(1), pos_voronoi );
+
+            Vector_3 v = s->vertex(1) - s->vertex(0);
+            float length = sqrt( v.squared_length() );
+            // normalize
+            v = v / length;
+            // compute the angle: cos theta = v.z/1.0
+            GLfloat angle = acos( v.y() ) / M_PI * 180;
+            QMatrix4x4 matrix;
+            matrix.setToIdentity();
+            // move to "from" point
+            matrix.translate( s->vertex(0).x(), s->vertex(0).y(), s->vertex(0).z() );
+            // rotate from z-axis to from-->to
+            //  axis: cross product of z-axis and from-->to
+            matrix.rotate( angle, v.z(), 0.0f,-v.x());
+            matrix.scale(1,length,1);
+            // stock the transformation
+            for(int i=0; i<4; i++)
+                transfo1_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=4; i<8; i++)
+                transfo2_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=8; i<12; i++)
+                transfo3_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=12; i<16; i++)
+                transfo4_voronoi->push_back((float)matrix.data()[i]);
+        } else if (const Ray_3 *r = CGAL::object_cast<Ray_3>(&o)) {
+            drawEdge( r->point(0),  // the source of the ray
+                      r->point(1),  // another point on the ray, different from the source
+                      pos_voronoi );
+            Vector_3 v = r->point(1) - r->point(0);
+            float length = sqrt( v.squared_length() );
+            // normalize
+            v = v / length;
+            // compute the angle: cos theta = v.z/1.0
+            GLfloat angle = acos( v.y() ) / M_PI * 180;
+            QMatrix4x4 matrix;
+            matrix.setToIdentity();
+            // move to "from" point
+            matrix.translate(r->point(0).x(), r->point(0).y(), r->point(0).z() );
+            // rotate from z-axis to from-->to
+            //  axis: cross product of z-axis and from-->to
+            matrix.rotate( angle, v.z(), 0.0f,-v.x());
+            matrix.scale(1,length,1);
+            // stock the transformation
+            for(int i=0; i<4; i++)
+                transfo1_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=4; i<8; i++)
+                transfo2_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=8; i<12; i++)
+                transfo3_voronoi->push_back((float)matrix.data()[i]);
+            for(int i=12; i<16; i++)
+                transfo4_voronoi->push_back((float)matrix.data()[i]);
+        }
+    }//end-for-edges
+    // Draw facets
+    for(facets_iterator fit = m_pScene->m_dt.finite_facets_begin();
+        fit != m_pScene->m_dt.finite_facets_end(); ++fit) {
+        drawFacet( m_pScene->m_dt.triangle(*fit), pos_facets);
+    }//end-for-facets
+    // Draw the newly inserted point
+    drawVertex( m_newPt, pos_newPoint);
+    // Draw conflict region
+    for(QList<Facet>::iterator fit = m_boundaryFacets.begin();
+        fit < m_boundaryFacets.end(); ++fit) {
+        if( m_pScene->m_dt.is_infinite(*fit) )  continue;
+        drawFacet( m_pScene->m_dt.triangle(*fit), pos_newFacet); //semi-transparent purple
+    }//end-for-facets
+    // Highlight the selected vertices
+    for(QList<int>::iterator vit=m_vidSeled.begin(); vit<m_vidSeled.end(); ++vit) {
+        drawVertex( m_pScene->m_vhArray.at(*vit)->point(), pos_selectedVertex );
+    }//end-for-seledpts
+    if( m_isMoving ) {
+        // Highlight the moving point
+        drawVertex( m_pScene->m_vhArray.at( m_vidMoving )->point(), pos_movingPoint );
+    }//end-if-v
+    // Draw the nearest neighbor
+    if( m_nearestNb != NULL ) {
+        drawVertex( m_queryPt, pos_queryPoint);
+        drawVertex( m_nearestNb->point(), pos_nearest_neighbor);
+    }
+    if( m_hasEmptyS ) {
+        // Draw the query point
+        drawVertex( m_queryPt, pos_queryPoint );
+        // Draw the cell containing that point
+        for(int i=0; i<4; ++i) {
+            if( m_pScene->m_dt.is_infinite(m_cellContain, i) )  continue;
+            drawFacet( m_pScene->m_dt.triangle( m_cellContain, i ), pos_emptyFacet );
+        }//end-for-facets
+        // Draw the sphere
+        pos_emptySphere->push_back(m_centerPt.x());
+        pos_emptySphere->push_back(m_centerPt.y());
+        pos_emptySphere->push_back(m_centerPt.z());
+        draw_sphere(m_fREmptyS, 35, points_emptySphere, normals_emptySphere);
+    }
+
+
+
+    // Draw all points during incremental mode
+    if( !m_incrementalPts.isEmpty() ) {
+        // draw the rest to-be-inserted vertices
+        for(QList<Point_3>::iterator pit=m_incrementalPts.begin();
+            pit < m_incrementalPts.end(); ++pit) {
+            drawVertex( (*pit), incremental_points);
+        }
+
+        switch( m_curStep ) {
+        case NEWPT:
+
+            // Highlight the next-to-insert point
+            drawVertex( m_curIncPt, incremental_next_point );
+            break;
+        case CELL:  // show the tetrahedron that contains the point
+            // Highlight the next-to-insert vertex
+            drawVertex( m_curIncPt, incremental_next_point );
+            // Draw the cell containing that point
+            for(int i=0; i<4; ++i) {
+                if( m_pScene->m_dt.is_infinite(m_cellContain, i) )  continue;
+                drawFacet( m_pScene->m_dt.triangle( m_cellContain, i ), incremental_facet );
+            }//end-for-facets
+            break;
+        case CONFLICT:  // show the conflict region
+            // Highlight the next-to-insert vertex
+            drawVertex( m_curIncPt, incremental_next_point );
+            // Draw conflict region
+            for(QList<Facet>::iterator fit = m_boundaryFacets.begin();
+                fit < m_boundaryFacets.end(); ++fit) {
+                if( m_pScene->m_dt.is_infinite(*fit) )  continue;
+                drawFacet( m_pScene->m_dt.triangle(*fit), incremental_conflict ); //semi-transparent purple
+            }//end-for-facets
+            break;
+        default:
+            break;
+        }//end-of=switch
+    }//end-if-incpts
+
+
+
+}
+
+void Viewer::initialize_buffers()
+{
+    rendering_program.bind();
+    {
+        //Points
+        vao[0].bind();
+        buffers[0].bind();
+        buffers[0].allocate(pos_points->data(), pos_points->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+        vao[0].release();
+        //Delaunay Edges
+        vao[1].bind();
+        buffers[1].bind();
+        buffers[1].allocate(pos_delaunay->data(), pos_delaunay->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[1].release();
+        vao[1].release();
+
+        //Voronoi Edges
+        vao[2].bind();
+        buffers[2].bind();
+        buffers[2].allocate(pos_voronoi->data(), pos_voronoi->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[2].release();
+        vao[2].release();
+
+        //Facets
+        vao[3].bind();
+        buffers[3].bind();
+        buffers[3].allocate(pos_facets->data(), pos_facets->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[3].release();
+        vao[3].release();
+
+        //New point
+        vao[4].bind();
+        buffers[4].bind();
+        buffers[4].allocate(pos_newPoint->data(), pos_newPoint->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[4].release();
+        vao[4].release();
+        //New Facet
+        vao[5].bind();
+        buffers[5].bind();
+        buffers[5].allocate(pos_newFacet->data(), pos_newFacet->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[5].release();
+        vao[5].release();
+
+        //Selected Point
+        vao[6].bind();
+        buffers[6].bind();
+        buffers[6].allocate(pos_selectedVertex->data(), pos_selectedVertex->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[6].release();
+        vao[6].release();
+
+        //Moving Point
+        vao[7].bind();
+        buffers[7].bind();
+        buffers[7].allocate(pos_movingPoint->data(), pos_movingPoint->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[7].release();
+        vao[7].release();
+
+        //Querry Point
+        vao[8].bind();
+        buffers[8].bind();
+        buffers[8].allocate(pos_queryPoint->data(), pos_queryPoint->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[8].release();
+        vao[8].release();
+
+        //Nearest Neighbor
+        vao[9].bind();
+        buffers[9].bind();
+        buffers[9].allocate(pos_nearest_neighbor->data(), pos_nearest_neighbor->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[9].release();
+        vao[9].release();
+
+        //Facet empty Sphere
+        vao[10].bind();
+        buffers[10].bind();
+        buffers[10].allocate(pos_emptyFacet->data(), pos_emptyFacet->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[10].release();
+        vao[10].release();
+
+        vao[21].bind();
+        buffers[28].bind();
+        buffers[28].allocate(incremental_next_point->data(), incremental_next_point->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[28].release();
+        vao[21].release();
+
+        vao[22].bind();
+        buffers[29].bind();
+        buffers[29].allocate(incremental_facet->data(), incremental_facet->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[29].release();
+        vao[22].release();
+
+        vao[23].bind();
+        buffers[30].bind();
+        buffers[30].allocate(incremental_conflict->data(), incremental_conflict->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[30].release();
+        vao[23].release();
+
+        vao[24].bind();
+        buffers[31].bind();
+        buffers[31].allocate(incremental_points->data(), incremental_points->size()*sizeof(float));
+        poly_vertexLocation[0] = rendering_program.attributeLocation("vertex");
+        rendering_program.enableAttributeArray(poly_vertexLocation[0]);
+        rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
+        buffers[31].release();
+        vao[24].release();
+    }
+
+    rendering_program.release();
+    rendering_program_spheres.bind();
+    {
+        //Track Ball
+        vao[11].bind();
+        buffers[11].bind();
+        buffers[11].allocate(pos_trackBall->data(), pos_trackBall->size()*sizeof(float));
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[11].release();
+
+        buffers[12].bind();
+        buffers[12].allocate(normals_trackBall->data(), normals_trackBall->size()*sizeof(float));
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[12].release();
+
+        buffers[13].bind();
+        buffers[13].allocate(points_trackBall->data(), points_trackBall->size()*sizeof(float));
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[13].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[11].release();
+
+        //Empty Sphere
+        vao[12].bind();
+        if(extension_is_found)
+        {
+            buffers[14].bind();
+            buffers[14].allocate(pos_emptySphere->data(), pos_emptySphere->size()*sizeof(float));
+            centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+            rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+            rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+            buffers[14].release();
+        }
+        buffers[32].bind();
+        buffers[32].allocate(normals_emptySphere->data(), normals_emptySphere->size()*sizeof(float));
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[32].release();
+
+        buffers[16].bind();
+        buffers[16].allocate(points_emptySphere->data(), points_emptySphere->size()*sizeof(float));
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[16].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[12].release();
+
+        //Vertex Sphere
+        vao[13].bind();
+        buffers[0].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[0].release();
+
+        buffers[15].bind();
+        buffers[15].allocate(normals_sphere->data(), normals_sphere->size()*sizeof(float));
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        buffers[17].allocate(points_sphere->data(), points_sphere->size()*sizeof(float));
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[13].release();
+
+        //New point Sphere
+        vao[14].bind();
+        buffers[4].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[4].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[14].release();
+
+        //Selected point Sphere
+        vao[15].bind();
+        buffers[6].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[6].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[15].release();
+
+        //Moving point Sphere
+        vao[16].bind();
+        buffers[7].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[7].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[16].release();
+
+        //Querry point Sphere
+        vao[17].bind();
+        buffers[8].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[8].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[17].release();
+
+        //Nearest neighbor Sphere
+        vao[18].bind();
+        buffers[9].bind();
+        centerLocation[0] = rendering_program_spheres.attributeLocation("center");
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[9].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[18].release();
+
+        //incremental list
+        vao[25].bind();
+        buffers[31].bind();
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[31].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[25].release();
+
+        //incremental next point
+        vao[26].bind();
+        buffers[28].bind();
+        rendering_program_spheres.enableAttributeArray(centerLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(centerLocation[0],GL_FLOAT,0,3);
+        buffers[28].release();
+
+        buffers[15].bind();
+        normalsLocation[0] = rendering_program_spheres.attributeLocation("normal");
+        rendering_program_spheres.enableAttributeArray(normalsLocation[0]);
+        rendering_program_spheres.setAttributeBuffer(normalsLocation[0],GL_FLOAT,0,3);
+        buffers[15].release();
+
+        buffers[17].bind();
+        poly_vertexLocation[1] = rendering_program_spheres.attributeLocation("vertex");
+        rendering_program_spheres.enableAttributeArray(poly_vertexLocation[1]);
+        rendering_program_spheres.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3);
+        buffers[17].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[0],1);
+            glVertexAttribDivisor(normalsLocation[0],0);
+        }
+        vao[26].release();
+
+    }
+    rendering_program_spheres.release();
+    rendering_program_cylinders.bind();
+    {
+        vao[19].bind();
+        buffers[18].bind();
+        buffers[18].allocate(points_cylinder->data(), points_cylinder->size()*sizeof(float));
+        poly_vertexLocation[2] = rendering_program_cylinders.attributeLocation("vertex");
+        rendering_program_cylinders.enableAttributeArray(poly_vertexLocation[2]);
+        rendering_program_cylinders.setAttributeBuffer(poly_vertexLocation[2],GL_FLOAT,0,3);
+        buffers[18].release();
+
+        buffers[19].bind();
+        buffers[19].allocate(normals_cylinder->data(), normals_cylinder->size()*sizeof(float));
+        normalsLocation[1] = rendering_program_cylinders.attributeLocation("normal");
+        rendering_program_cylinders.enableAttributeArray(normalsLocation[1]);
+        rendering_program_cylinders.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+        buffers[19].release();
+
+        buffers[20].bind();
+        buffers[20].allocate(transfo1_delaunay->data(), transfo1_delaunay->size()*sizeof(float));
+        centerLocation[1] = rendering_program_cylinders.attributeLocation("transfo1");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[1]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[1],GL_FLOAT,0,4);
+        buffers[20].release();
+
+        buffers[21].bind();
+        buffers[21].allocate(transfo2_delaunay->data(), transfo2_delaunay->size()*sizeof(float));
+        centerLocation[2] = rendering_program_cylinders.attributeLocation("transfo2");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[2]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[2],GL_FLOAT,0,4);
+        buffers[21].release();
+
+
+        buffers[22].bind();
+        buffers[22].allocate(transfo3_delaunay->data(), transfo3_delaunay->size()*sizeof(float));
+        centerLocation[3] = rendering_program_cylinders.attributeLocation("transfo3");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[3]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[3],GL_FLOAT,0,4);
+        buffers[22].release();
+
+        buffers[23].bind();
+        buffers[23].allocate(transfo4_delaunay->data(), transfo4_delaunay->size()*sizeof(float));
+        centerLocation[4] = rendering_program_cylinders.attributeLocation("transfo4");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[4]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[4],GL_FLOAT,0,4);
+        buffers[23].release();
+
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[1],1);
+            glVertexAttribDivisor(centerLocation[2],1);
+            glVertexAttribDivisor(centerLocation[3],1);
+            glVertexAttribDivisor(centerLocation[4],1);
+            glVertexAttribDivisor(normalsLocation[1],0);
+        }
+
+        vao[19].release();
+
+        vao[20].bind();
+        buffers[18].bind();
+        poly_vertexLocation[2] = rendering_program_cylinders.attributeLocation("vertex");
+        rendering_program_cylinders.enableAttributeArray(poly_vertexLocation[2]);
+        rendering_program_cylinders.setAttributeBuffer(poly_vertexLocation[2],GL_FLOAT,0,3);
+        buffers[18].release();
+
+        buffers[19].bind();
+        normalsLocation[1] = rendering_program_cylinders.attributeLocation("normal");
+        rendering_program_cylinders.enableAttributeArray(normalsLocation[1]);
+        rendering_program_cylinders.setAttributeBuffer(normalsLocation[1],GL_FLOAT,0,3);
+        buffers[19].release();
+
+        buffers[24].bind();
+        buffers[24].allocate(transfo1_voronoi->data(), transfo1_voronoi->size()*sizeof(float));
+        centerLocation[1] = rendering_program_cylinders.attributeLocation("transfo1");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[1]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[1],GL_FLOAT,0,4);
+        buffers[24].release();
+
+        buffers[25].bind();
+        buffers[25].allocate(transfo2_voronoi->data(), transfo2_voronoi->size()*sizeof(float));
+        centerLocation[2] = rendering_program_cylinders.attributeLocation("transfo2");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[2]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[2],GL_FLOAT,0,4);
+        buffers[25].release();
+
+
+        buffers[26].bind();
+        buffers[26].allocate(transfo3_voronoi->data(), transfo3_voronoi->size()*sizeof(float));
+        centerLocation[3] = rendering_program_cylinders.attributeLocation("transfo3");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[3]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[3],GL_FLOAT,0,4);
+        buffers[26].release();
+
+        buffers[27].bind();
+        buffers[27].allocate(transfo4_voronoi->data(), transfo4_voronoi->size()*sizeof(float));
+        centerLocation[4] = rendering_program_cylinders.attributeLocation("transfo4");
+        rendering_program_cylinders.enableAttributeArray(centerLocation[4]);
+        rendering_program_cylinders.setAttributeBuffer(centerLocation[4],GL_FLOAT,0,4);
+        buffers[27].release();
+        if(extension_is_found)
+        {
+            glVertexAttribDivisor(centerLocation[1],1);
+            glVertexAttribDivisor(centerLocation[2],1);
+            glVertexAttribDivisor(centerLocation[3],1);
+            glVertexAttribDivisor(centerLocation[4],1);
+            glVertexAttribDivisor(normalsLocation[1],0);
+        }
+
+        vao[20].release();
+    }
+    rendering_program_cylinders.release();
+    are_buffers_initialized = true;
+}
+
+void Viewer::attrib_buffers(QGLViewer* viewer)
+{
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+        mvMatrix.data()[i] = (float)mat[i];
+    }
+    QVector4D	position(0.0f,0.0f,1.0f,1.0f );
+    // Ambient
+    ambient[0] = 0.29225f;
+    ambient[1] = 0.29225f;
+    ambient[2] = 0.29225f;
+    ambient[3] = 1.0f;
+    // Diffuse
+    diffuse[0] = 0.50754f;
+    diffuse[1] = 0.50754f;
+    diffuse[2] = 0.50754f;
+    diffuse[3] = 1.0f;
+    // Specular
+    specular[0] = 0.508273f;
+    specular[1] = 0.508273f;
+    specular[2] = 0.508273f;
+    specular[3] = 1.0f;
+    // Shininess
+    shininess = 51.2f;
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    colorLocation[0] = rendering_program.uniformLocation("color");
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+
+    rendering_program.release();
+
+
+    rendering_program_spheres.bind();
+    colorLocation[1] = rendering_program_spheres.uniformLocation("color");
+    mvpLocation[1] = rendering_program_spheres.uniformLocation("mvp_matrix");
+    mvLocation[0] = rendering_program_spheres.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program_spheres.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program_spheres.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program_spheres.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program_spheres.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program_spheres.uniformLocation("spec_power");
+
+    rendering_program_spheres.setUniformValue(lightLocation[0], position);
+    rendering_program_spheres.setUniformValue(mvpLocation[1], mvpMatrix);
+    rendering_program_spheres.setUniformValue(mvLocation[0], mvMatrix);
+    rendering_program_spheres.setUniformValue(lightLocation[1], diffuse);
+    rendering_program_spheres.setUniformValue(lightLocation[2], specular);
+    rendering_program_spheres.setUniformValue(lightLocation[3], ambient);
+    rendering_program_spheres.setUniformValue(lightLocation[4], shininess);
+
+    rendering_program_spheres.release();
+
+    rendering_program_cylinders.bind();
+    colorLocation[2] = rendering_program_cylinders.uniformLocation("color");
+    mvpLocation[2] = rendering_program_cylinders.uniformLocation("mvp_matrix");
+    mvLocation[1] = rendering_program_cylinders.uniformLocation("mv_matrix");
+    lightLocation[5] = rendering_program_cylinders.uniformLocation("light_pos");
+    lightLocation[6] = rendering_program_cylinders.uniformLocation("light_diff");
+    lightLocation[7] = rendering_program_cylinders.uniformLocation("light_spec");
+    lightLocation[8] = rendering_program_cylinders.uniformLocation("light_amb");
+    lightLocation[9] = rendering_program_cylinders.uniformLocation("spec_power");
+
+    rendering_program_cylinders.setUniformValue(lightLocation[5], position);
+    rendering_program_cylinders.setUniformValue(lightLocation[6], diffuse);
+    rendering_program_cylinders.setUniformValue(lightLocation[7], specular);
+    rendering_program_cylinders.setUniformValue(lightLocation[8], ambient);
+    rendering_program_cylinders.setUniformValue(lightLocation[9], shininess);
+    rendering_program_cylinders.setUniformValue(mvpLocation[2], mvpMatrix);
+    rendering_program_cylinders.setUniformValue(mvLocation[1], mvMatrix);
+
+
+    rendering_program_cylinders.release();
+}
+
+
+/*************************************************************/
+/*  Draw functions */
+
+void Viewer::draw()
+{
+    glEnable(GL_DEPTH_TEST);
+    if(!are_buffers_initialized)
+        initialize_buffers();
+    QFont fontPrompt("Arial", 8);
+    attrib_buffers(this);
+    if(m_isFlat || !extension_is_found)
+    {
+
+        if(m_showVertex)
+        {
+            rendering_program.bind();
+            glPointSize(8.0);
+            vao[0].bind();
+            rendering_program.setUniformValue(colorLocation[0], m_colorVertex);
+            glDrawArrays(GL_POINTS, 0, pos_points->size()/3);
+            vao[0].release();
+            rendering_program.release();
+        }
+        if(m_showDEdge)
+        {
+            rendering_program.bind();
+            vao[1].bind();
+            rendering_program.setUniformValue(colorLocation[0], m_colorDEdge);
+            glDrawArrays(GL_LINES, 0, pos_delaunay->size()/3);
+            vao[1].release();
+            rendering_program.release();
+        }
+        if(m_showVEdge)
+        {
+            rendering_program.bind();
+            vao[2].bind();
+            rendering_program.setUniformValue(colorLocation[0], m_colorVEdge);
+            glDrawArrays(GL_LINES, 0, pos_voronoi->size()/3);
+            vao[2].release();
+            rendering_program.release();
+        }
+        // Insert point mode
+        if( m_curMode == INSERT_PT) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Insert a point"), fontPrompt );
+            drawText( width()-200, 40, tr("Hold Left: Move the point"), fontPrompt );
+            drawText( width()-200, 60, tr("Return: Insert to DT"), fontPrompt );
+            drawText( width()-200, 80, tr("Escape: Cancel insertion"), fontPrompt );
+            drawText( width()-200, 100, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            if( m_hasNewPt ) {
+                rendering_program.bind();
+                vao[4].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_POINTS, 0, pos_newPoint->size()/3);
+                vao[4].release();
+
+                vao[5].bind();
+                color.setRgb(215, 80, 0, 96);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_TRIANGLES, 0, pos_newFacet->size()/3);
+                vao[5].release();
+                rendering_program.release();
+            }
+        }
+        else if( m_curMode == SELECT) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Select"), fontPrompt );
+            drawText( width()-200, 40, tr("Ctrl+Left: Add selection"),
+                      QFont("Arial", 14) );
+            drawText( width()-200, 60, tr("Escape: Cancel selection"), fontPrompt );
+            drawText( width()-200, 80, tr("DEL: Delete selected"), fontPrompt );
+            rendering_program.bind();
+            vao[6].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, pos_selectedVertex->size()/3);
+            vao[6].release();
+            rendering_program.release();
+        }
+        else if( m_curMode == MOVE ) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Left Click: Select"), fontPrompt );
+            if(m_isMoving)
+                drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program.bind();
+            vao[7].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, pos_movingPoint->size()/3);
+            vao[7].release();
+            rendering_program.release();
+        }
+        else if( m_curMode == FINDNB ) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
+            drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program.bind();
+            vao[8].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, pos_queryPoint->size()/3);
+            vao[8].release();
+
+            vao[9].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, pos_nearest_neighbor->size()/3);
+            vao[9].release();
+            rendering_program.release();
+        }
+        else if(m_curMode == EMPTYSPH){
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
+            drawText( width()-200, 40, tr("Press S: Show/Hide trackball"), fontPrompt );
+            drawText( width()-200, 60, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program.bind();
+            vao[8].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program.setUniformValue(colorLocation[0], color);
+            glDrawArrays(GL_POINTS, 0, pos_queryPoint->size()/3);
+            vao[8].release();
+            vao[10].bind();
+            rendering_program.setUniformValue(colorLocation[0], m_colorFacet);
+            glDrawArrays(GL_TRIANGLES, 0, pos_emptyFacet->size()/3);
+            vao[10].release();
+            rendering_program.release();
+        }
+        // Draw all points during incremental mode
+        if( !m_incrementalPts.isEmpty() ) {
+            // draw the rest to-be-inserted vertices
+            rendering_program.bind();
+            glPointSize(8.0);
+            vao[24].bind();
+            color.setRgbF(0.7,0.7,0.7);
+            rendering_program.setUniformValue(colorLocation[0],color);
+            glDrawArrays(GL_POINTS, 0, incremental_points->size()/3);
+            vao[24].release();
+            rendering_program.release();
+            switch( m_curStep ) {
+            case NEWPT:
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Highlight the next-to-insert point"), fontPrompt );
+                // Highlight the next-to-insert point
+                rendering_program.bind();
+                glPointSize(8.0);
+                vao[21].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_POINTS, 0, incremental_next_point->size()/3);
+                vao[21].release();
+                rendering_program.release();
+                break;
+            case CELL:  // show the tetrahedron that contains the point
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Show the tetrahedron containing the point"), fontPrompt );
+                drawText( 10, 40, tr("(Only finite facets are drawn)"), fontPrompt );
+                // Highlight the next-to-insert vertex
+                rendering_program.bind();
+                glPointSize(8.0);
+                vao[21].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program.setUniformValue(colorLocation[0],  color);
+                glDrawArrays(GL_POINTS, 0, incremental_next_point->size()/3);
+                vao[21].release();
+                rendering_program.release();
+                // Draw the cell containing that point
+                rendering_program.bind();
+                vao[22].bind();
+                rendering_program.setUniformValue(colorLocation[0], m_colorFacet);
+                glDrawArrays(GL_TRIANGLES, 0, incremental_facet->size()/3);
+                vao[22].release();
+                rendering_program.release();
+                break;
+            case CONFLICT:  // show the conflict region
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Show the conflict region"), fontPrompt );
+                // Highlight the next-to-insert vertex
+                rendering_program.bind();
+                glPointSize(8.0);
+                vao[21].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_POINTS, 0, incremental_next_point->size()/3);
+                vao[21].release();
+                rendering_program.release();
+                // Draw conflict region
+                rendering_program.bind();
+                vao[23].bind();
+                color.setRgb(215, 80, 0, 96);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_TRIANGLES, 0, incremental_facet->size()/3);
+                vao[23].release();
+                rendering_program.release();
+
+                break;
+            default:
+                break;
+            }//end-of=switch
+        }//end-if-incpts
+
+    }
+    else
+    {
+        if(m_showVertex)
+        {
+            rendering_program_spheres.bind();
+            vao[13].bind();
+            rendering_program_spheres.setUniformValue(colorLocation[1], m_colorVertex);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_points->size()/3);
+            vao[13].release();
+            rendering_program.release();
+        }
+        if(m_showDEdge)
+        {
+            rendering_program_cylinders.bind();
+            vao[19].bind();
+            rendering_program_cylinders.setUniformValue(colorLocation[2], m_colorDEdge);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_cylinder->size()/3, transfo1_delaunay->size()/4);
+            vao[19].release();
+            rendering_program_cylinders.release();
+        }
+        if(m_showVEdge)
+        {
+            rendering_program_cylinders.bind();
+            vao[20].bind();
+            rendering_program_cylinders.setUniformValue(colorLocation[2], m_colorVEdge);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_cylinder->size()/3, transfo1_voronoi->size()/4);
+            vao[20].release();
+            rendering_program_cylinders.release();
+        }
+
+        if( m_curMode == INSERT_PT) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Insert a point"), fontPrompt );
+            drawText( width()-200, 40, tr("Hold Left: Move the point"), fontPrompt );
+            drawText( width()-200, 60, tr("Return: Insert to DT"), fontPrompt );
+            drawText( width()-200, 80, tr("Escape: Cancel insertion"), fontPrompt );
+            drawText( width()-200, 100, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            if( m_hasNewPt ) {
+                rendering_program_spheres.bind();
+                vao[14].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program_spheres.setUniformValue(colorLocation[1], color);
+                glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_newPoint->size()/3);
+                vao[14].release();
+                rendering_program_spheres.release();
+                rendering_program.bind();
+                vao[5].bind();
+                color.setRgb(215, 80, 0, 96);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_TRIANGLES, 0, pos_newFacet->size()/3);
+                vao[5].release();
+                rendering_program.release();
+            }
+        }
+        else if( m_curMode == SELECT) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Select"), fontPrompt );
+            drawText( width()-200, 40, tr("Ctrl+Left: Add selection"),
+                      QFont("Arial", 14) );
+            drawText( width()-200, 60, tr("Escape: Cancel selection"), fontPrompt );
+            drawText( width()-200, 80, tr("DEL: Delete selected"), fontPrompt );
+            rendering_program_spheres.bind();
+            vao[15].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program_spheres.setUniformValue(colorLocation[1], color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_selectedVertex->size()/3);
+            vao[15].release();
+            rendering_program_spheres.release();
+        }
+        else if( m_curMode == MOVE ) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Left Click: Select"), fontPrompt );
+            if(m_isMoving)
+                drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program_spheres.bind();
+            vao[16].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program_spheres.setUniformValue(colorLocation[1], color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_movingPoint->size()/3);
+            vao[16].release();
+            rendering_program_spheres.release();
+        }
+        else if( m_curMode == FINDNB ) {
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
+            drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program_spheres.bind();
+            vao[17].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program_spheres.setUniformValue(colorLocation[1], color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_queryPoint->size()/3);
+            vao[17].release();
+            rendering_program_spheres.release();
+            rendering_program_spheres.bind();
+            vao[18].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program_spheres.setUniformValue(colorLocation[1], color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_nearest_neighbor->size()/3);
+            vao[18].release();
+            rendering_program_spheres.release();
+        }
+        else if(m_curMode == EMPTYSPH){
+            // Show prompt messages
+            qglColor( ::Qt::black );
+            drawText( width()-200, 20, tr("Shift+Left: Place query point"), fontPrompt );
+            drawText( width()-200, 40, tr("Press S: Show/Hide trackball"), fontPrompt );
+            drawText( width()-200, 60, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+            rendering_program_spheres.bind();
+            vao[17].bind();
+            color.setRgbF(1.0,0.0,0.0);
+            rendering_program_spheres.setUniformValue(colorLocation[1], color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, pos_queryPoint->size()/3);
+            vao[17].release();
+            rendering_program_spheres.release();
+
+            rendering_program.bind();
+            vao[10].bind();
+            rendering_program.setUniformValue(colorLocation[0], m_colorFacet);
+            glDrawArrays(GL_TRIANGLES, 0, pos_emptyFacet->size()/3);
+            vao[10].release();
+            rendering_program.release();
+        }
+        // Draw all points during incremental mode
+        if( !m_incrementalPts.isEmpty() ) {
+            // draw the rest to-be-inserted vertices
+            rendering_program_spheres.bind();
+            vao[25].bind();
+            color.setRgbF(0.7,0.7,0.7);
+            rendering_program_spheres.setUniformValue(colorLocation[1],color);
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, incremental_points->size()/3);
+            vao[25].release();
+            rendering_program_spheres.release();
+            switch( m_curStep ) {
+            case NEWPT:
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Highlight the next-to-insert point"), fontPrompt );
+                // Highlight the next-to-insert point
+                rendering_program_spheres.bind();
+                vao[26].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program_spheres.setUniformValue(colorLocation[1],color);
+                glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, incremental_next_point->size()/3);
+                vao[26].release();
+                rendering_program_spheres.release();
+                break;
+            case CELL:  // show the tetrahedron that contains the point
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Show the tetrahedron containing the point"), fontPrompt );
+                drawText( 10, 40, tr("(Only finite facets are drawn)"), fontPrompt );
+                // Highlight the next-to-insert vertex
+                rendering_program_spheres.bind();
+                vao[26].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program_spheres.setUniformValue(colorLocation[1],  color);
+                glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, incremental_next_point->size()/3);
+                vao[26].release();
+                rendering_program_spheres.release();
+                // Draw the cell containing that point
+                rendering_program.bind();
+                vao[22].bind();
+                rendering_program.setUniformValue(colorLocation[0], m_colorFacet);
+                glDrawArrays(GL_TRIANGLES, 0, incremental_facet->size()/3);
+                vao[22].release();
+                rendering_program.release();
+                break;
+            case CONFLICT:  // show the conflict region
+                // Show prompt messages
+                qglColor( ::Qt::black );
+                drawText( 10, 20, tr("Show the conflict region"), fontPrompt );
+                // Highlight the next-to-insert vertex
+                rendering_program_spheres.bind();
+                vao[26].bind();
+                color.setRgbF(1.0,0.0,0.0);
+                rendering_program_spheres.setUniformValue(colorLocation[1],  color);
+                glDrawArraysInstanced(GL_TRIANGLES, 0, points_sphere->size()/3, incremental_next_point->size()/3);
+                vao[26].release();
+                rendering_program_spheres.release();
+                // Draw conflict region
+                rendering_program.bind();
+                vao[23].bind();
+                color.setRgb(215, 80, 0, 96);
+                rendering_program.setUniformValue(colorLocation[0], color);
+                glDrawArrays(GL_TRIANGLES, 0, incremental_facet->size()/3);
+                vao[23].release();
+                rendering_program.release();
+
+                break;
+            default:
+                break;
+            }//end-of=switch
+        }//end-if-incpts
+    }
+
+    if(m_showFacet)
+    {
+        rendering_program.bind();
+        vao[3].bind();
+        rendering_program.setUniformValue(colorLocation[0], m_colorFacet);
+        glDrawArrays(GL_TRIANGLES, 0, pos_facets->size()/3);
+        vao[3].release();
+        rendering_program.release();
+    }
+    if( m_curMode == INSERT_V  ) {
+        // Show prompt messages
+        qglColor( ::Qt::black );
+        drawText( width()-200, 20, tr("Shift+Left: Insert a vertex"), fontPrompt );
+        drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
+
+    }
+    if(m_curMode != NONE && m_curMode !=  SELECT && m_showTrackball)
+    {
+
+        rendering_program_spheres.bind();
+        vao[11].bind();
+        rendering_program_spheres.setUniformValue(colorLocation[1], m_colorTrackball);
+        if(extension_is_found)
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_trackBall->size()/3, 1);
+        else
+            glDrawArrays(GL_TRIANGLES, 0, points_trackBall->size()/3);
+        vao[11].release();
+        rendering_program_spheres.release();
+    }
+    if(m_curMode ==EMPTYSPH)
+    {
+        rendering_program_spheres.bind();
+        vao[12].bind();
+        rendering_program_spheres.setUniformValue(colorLocation[1], m_colorEmptySphere);
+        if(extension_is_found)
+            glDrawArraysInstanced(GL_TRIANGLES, 0, points_emptySphere->size()/3, pos_emptySphere->size()/3);
+        else if(pos_emptySphere->size()>0)
+        {
+            rendering_program_spheres.setAttributeValue("center", QVector4D(pos_emptySphere->at(0), pos_emptySphere->at(1), pos_emptySphere->at(2), 1.0));
+            glDrawArrays(GL_TRIANGLES, 0, points_emptySphere->size()/3);
+        }
+        vao[12].release();
+        rendering_program_spheres.release();
+    }
+
+}
+
+void Viewer::drawVertex(const Point_3& p, std::vector<float> *vertices)
+{
+
+    vertices->push_back(p.x()); vertices->push_back(p.y()); vertices->push_back(p.z());
+
+
+}
+
+void Viewer::drawEdge(const Point_3& from, const Point_3& to, std::vector<float> *vertices)
+{
+    vertices->push_back( from.x()); vertices->push_back(from.y()); vertices->push_back(from.z());
+    vertices->push_back( to.x()); vertices->push_back(to.y()); vertices->push_back(to.z());
+}
+
+void Viewer::drawFacet(const Triangle_3& t, std::vector<float> *vertices)
+{
+    Point_3 p0 = t.vertex(0);
+    Point_3 p1 = t.vertex(1);
+    Point_3 p2 = t.vertex(2);
+    vertices->push_back( p0.x()); vertices->push_back(p0.y()); vertices->push_back(p0.z());
+    vertices->push_back( p1.x()); vertices->push_back(p1.y()); vertices->push_back(p1.z());
+    vertices->push_back( p2.x()); vertices->push_back(p2.y()); vertices->push_back(p2.z());
+
+}
+
+
+/*************************************************************/
+/*  Select functions */
+
+void Viewer::drawWithNames()
+{
+    for(int i=0; i<m_pScene->m_vhArray.size(); ++i) {
+        // push a name for each point onto the name stack
+        // note: it can NOT be used between glBegin and glEnd
+        ::glPushName( i );
+
+        // draw the point
+        ::glBegin(GL_POINTS);
+        Point_3& p = m_pScene->m_vhArray.at(i)->point();
+        ::glVertex3f(p.x(), p.y(), p.z());
+        ::glEnd();
+
+        // pop one name off the top of the name stack
+        ::glPopName();
+    }//end-for-points
+
+    // push a name for the newly inserted point
+    if( m_curMode == INSERT_PT && m_hasNewPt ) {
+        ::glPushName( ::GLuint(-1) );
+        ::glBegin(GL_POINTS);
+        ::glVertex3f(m_newPt.x(), m_newPt.y(), m_newPt.z());
+        ::glEnd();
+        ::glPopName();
+    }//end-if-newPt
+}
+
+void Viewer::endSelection(const QPoint& /*point*/)
+{
+    // flush GL buffers
+    ::glFlush();
+
+    // reset GL_RENDER mode (was GL_SELECT) and get the number of selected points
+    size_t nSel = ::glRenderMode(GL_RENDER);
+
+    /* No selection */
+    if( nSel <= 0 ) {
+        if( m_curMode == SELECT )
+            m_isPress = false;
+    }//end-if-notselected
+
+    // each hit record has 4 data: # of names in name stack, min and max depth of old hits,
+    //  name stack contents [see glSelectBuffer man page for more details]
+    //  i.e. (selectBuffer())[4*i+3] is the id pushed on the stack
+
+    /* Check whether the new point is clicked on */
+    else if( m_curMode == INSERT_PT ) {
+        if( m_hasNewPt && (selectBuffer())[3] == ::GLuint(-1) )
+            m_isMoving = true;
+    }//end-if-inspt
+
+    /* Check whether vertex is clicked on */
+    else if( m_curMode == MOVE ) {
+        m_isMoving = true;
+        m_vidMoving = (selectBuffer())[3];
+        // compute the corresponding size of trackball, i.e. selectedV is on the ball
+        Point_3 p = m_pScene->m_vhArray.at( m_vidMoving )->point();
+        m_fRadius = sqrt( p.x()*p.x() + p.y()*p.y() + p.z()*p.z() );
+    }//end-if-move
+
+    /* Store current selections */
+    else { // m_curMode == SELECT
+        if( m_selMode == NORMAL ) {
+            // remove the old selections
+            for(QList<int>::iterator vit=m_vidSeled.begin();
+                vit < m_vidSeled.end(); ++vit) {
+                m_pScene->m_vhArray.at(*vit)->setSeled( false );
+            }
+            m_vidSeled.clear();
+
+            // record the new selections
+            for(std::size_t i=0; i<nSel; ++i) {
+                m_vidSeled.push_back( (selectBuffer())[4*i+3] );
+                m_pScene->m_vhArray.at( m_vidSeled.back() )->setSeled();
+            }
+        } else {
+            for(std::size_t i=0; i<nSel; ++i) {
+                if( !m_vidSeled.contains( (selectBuffer())[4*i+3] ) ) {
+                    m_vidSeled.push_back( (selectBuffer())[4*i+3] );
+                    m_pScene->m_vhArray.at( (selectBuffer())[4*i+3] )->setSeled();
+                }//end-if-contain
+            }//end-for
+        }//end-if-add
+    }//end-if-sel
+}
+
+/*************************************************************/
+/*  Mouse and Keyboard functions */
+
+void Viewer::mousePressEvent(QMouseEvent *event)
+{
+    // button() holds the button that caused the event
+    //  note: for mouse move event, button() always return Qt::NoButton
+    // modifiers() holds the keyboard modifier flags at the time of the event
+    // buttons() holds the button state when the event was generated,
+    //  i.e. all buttons that are pressed down
+    // pos() holds the mouse cursor's position relative to the receiving widget
+
+    // Get event modifiers key
+    const Qt::KeyboardModifiers modifiers = event->modifiers();
+
+    if( m_curMode == INSERT_V
+            && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
+        m_isPress = true;
+    }//end-if-insv
+
+    else if(m_curMode == INSERT_PT && event->button() == Qt::LeftButton ) {
+        /* shift+left to insert */
+        if( modifiers == Qt::SHIFT ) {
+            if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
+                m_isPress = true;
+            else
+                displayMessage( tr("There exists no triangulation yet.") );
+            m_hasNewPt = false;
+        } else { /* left button to move */
+            m_isMoving = false;
+            // define selection window (default was 3)
+            setSelectRegionWidth( 10 );
+            setSelectRegionHeight( 10 );
+            // perform the selection
+            select( event->pos() );
+            if( m_isMoving )
+                // redraw window
+            {  changed(); updateGL();}
+            else
+                // if no point is selected, then regular action (rotation) will be performed
+                QGLViewer::mousePressEvent(event);
+        }//end-if-shift
+    }//end-if-inspt
+
+    else if( m_curMode == SELECT && event->button() == Qt::LeftButton ) {
+        // set the selection mode
+        switch( modifiers ) {
+        case Qt::SHIFT : // select
+            m_isPress = true;
+            m_selMode = NORMAL;
+            // initialize multiple selection window
+            m_rectSel = QRect( event->pos(), event->pos() );
+            // redraw window
+            updateGL();
+            break;
+        case Qt::CTRL : // add selection
+            m_isPress = true;
+            m_selMode = ADD;
+            // initialize multiple selection window
+            m_rectSel = QRect( event->pos(), event->pos() );
+            // redraw window
+            updateGL();
+            break;
+        default: // rotate
+            QGLViewer::mousePressEvent(event);
+            break;
+        }
+    }//end-if-select
+
+    else if(m_curMode == MOVE && event->button() == Qt::LeftButton ) {
+        m_isMoving = false;
+        // define selection window (default was 3)
+        setSelectRegionWidth( 10 );
+        setSelectRegionHeight( 10 );
+        // perform the selection
+        select( event->pos() );
+        if( m_isMoving ) // redraw window
+        {  changed(); updateGL();}
+        else // if no point is selected, then regular action (rotation) will be performed
+            QGLViewer::mousePressEvent(event);
+    }//end-if-move
+
+    else if( m_curMode == FINDNB
+             && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
+        if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
+            m_isPress = true;
+        else
+            displayMessage( tr("There exists no triangulation yet.") );
+    }//end-if-findnb
+
+    else if( m_curMode == EMPTYSPH
+             && event->button() == Qt::LeftButton && modifiers == Qt::SHIFT ) {
+        if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 )
+            m_isPress = true;
+        else
+            displayMessage( tr("There exists no triangulation yet.") );
+        m_hasEmptyS = false;
+    }//end-if-emptyS
+
+    else
+        QGLViewer::mousePressEvent(event);
+
+}
+
+void Viewer::mouseMoveEvent(QMouseEvent *event)
+{
+    if( m_curMode == INSERT_PT && m_isMoving ) {
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            m_newPt = Point_3(pt.x, pt.y, pt.z);
+            // compute the conflict hole induced by point p
+            computeConflict( m_newPt );
+            // redraw
+            changed(); updateGL();
+        }//end-if-compute
+    }//end-if-inspt
+
+    else if( m_curMode == SELECT && m_isPress ) {
+        // update multiple selection window
+        m_rectSel.setBottomRight( event->pos() );
+        // redraw
+        //changed(); updateGL();
+    }//end-if-sel
+
+    else if( m_curMode == MOVE && m_isMoving ) {
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            // note: QList::operator[] return a modifiable reference;
+            //   while QList::at return a const reference
+            // move_if_no_collision moves the point stored in v to pt
+            //  if there is not already another vertex placed on pt,
+            //  the triangulation is modified s.t. the new position of v is pt;
+            //  otherwise, the vertex at point pt is returned.
+            Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
+                        m_pScene->m_vhArray.at( m_vidMoving ),
+                        Point_3( pt.x, pt.y, pt.z ) );
+            int id1 = m_pScene->m_vhArray.indexOf( vh );
+            int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
+            // remove the duplicate in vhArray
+            if( id1 != m_vidMoving )
+                m_pScene->m_vhArray.removeAt( id1 );
+            else if( id2 != -1 )
+                m_pScene->m_vhArray.removeAt( id2 );
+            m_pScene->m_vhArray[m_vidMoving] = vh;
+        }//end-if-compute
+
+        // redraw
+        //  changed(); updateGL();
+    }//end-if-move
+
+    else
+        QGLViewer::mouseMoveEvent(event);
+}
+
+void Viewer::mouseReleaseEvent(QMouseEvent *event)
+{
+    /* INS_V mode - Shift+Left: compute and insert a vertex */
+    if( m_curMode == INSERT_V && m_isPress ) {
+        m_isPress = false;
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            m_pScene->m_vhArray.push_back( m_pScene->m_dt.insert( Point_3( pt.x, pt.y, pt.z ) ) );
+        }//end-if-compute
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-ins
+
+    /* INS_PT mode - Shift+Left: compute and insert a point */
+    else if( m_curMode == INSERT_PT && m_isPress ) {
+        m_isPress = false;
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            m_hasNewPt = true;
+            m_newPt = Point_3(pt.x, pt.y, pt.z);
+            // compute the conflict hole induced by point p
+            computeConflict( m_newPt );
+        }//end-if-compute
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-inspt
+
+    /* INS_PT mode - Left: compute and insert a point */
+    else if( m_curMode == INSERT_PT && m_isMoving ) {
+        m_isMoving = false;
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            m_newPt = Point_3(pt.x, pt.y, pt.z);
+            // compute the conflict hole induced by point p
+            computeConflict( m_newPt );
+        }//end-if-compute
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-inspt
+
+    /* SEL mode - Left: terminate multiple point selection */
+    else if( m_curMode == SELECT && m_isPress ) {
+        // might swap left/right and top/bottom to make rectanle valid
+        m_rectSel = m_rectSel.normalized();
+
+        if( m_rectSel.width() == 1 && m_rectSel.height() == 1 ) { /* select a point */
+            // set a default selection window
+            setSelectRegionWidth( 10 );
+            setSelectRegionHeight( 10 );
+            // compute rectangle center and perform selection
+            select( m_rectSel.center() );
+            if( m_isPress ) {
+                m_isPress = false;
+            } else {
+                displayMessage( tr("No point is selected.") );
+            }
+        } else {  /* select multiple points, ie. selection window > 1 */
+            // define selection window
+            if( m_rectSel.width() < 10 )
+                setSelectRegionWidth( 10 );
+            else
+                setSelectRegionWidth( m_rectSel.width() );
+            if( m_rectSel.height() < 10 )
+                setSelectRegionHeight( 10 );
+            else
+                setSelectRegionHeight( m_rectSel.height() );
+            // compute rectangle center and perform selection
+            select( m_rectSel.center() );
+            if( m_isPress ) {
+                m_isPress = false;
+                displayMessage( QString::number(m_vidSeled.size()) + tr(" points are selected") );
+            } else { // empty window will cancel the current selection
+                for(QList<int>::iterator iit = m_vidSeled.begin(); iit < m_vidSeled.end(); ++iit)
+                    m_pScene->m_vhArray.at(*iit)->setSeled( false );
+                m_vidSeled.clear();
+            }
+        }//end-if-selwindow
+
+        // update display to show
+        changed(); updateGL();
+    }//end-if-select
+
+    /* MOVE mode - Left: terminate point moving */
+    else if( m_curMode == MOVE && m_isMoving ) {
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            // note: QList::operator[] return a modifiable reference;
+            //   while QList::at return a const reference
+            // move_if_no_collision moves the point stored in v to pt
+            //  if there is not already another vertex placed on pt,
+            //  the triangulation is modified s.t. the new position of v is pt;
+            //  otherwise, the vertex at point pt is returned.
+            Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
+                        m_pScene->m_vhArray.at( m_vidMoving ),
+                        Point_3( pt.x, pt.y, pt.z ) );
+            int id1 = m_pScene->m_vhArray.indexOf( vh );
+            int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
+            // remove the duplicate in vhArray
+            if( id1 != m_vidMoving )
+                m_pScene->m_vhArray.removeAt( id1 );
+            else if( id2 != -1 )
+                m_pScene->m_vhArray.removeAt( id2 );
+            m_pScene->m_vhArray[m_vidMoving] = vh;
+        }//end-if-compute
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-move
+
+    /* FindNb mode - Shift+Left: find the nearest neighbor of the point */
+    else if( m_curMode == FINDNB && m_isPress ) {
+        m_isPress = false;
+        Vec pt;
+        if( computeIntersect( event->pos(), pt ) ) {
+            m_queryPt = Point_3( pt.x, pt.y, pt.z );
+            m_nearestNb = m_pScene->m_dt.nearest_vertex( m_queryPt );
+        }//end-if-compute
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-findnb
+
+    /* EmptySphere mode - Shift+Left: show the empty sphere of the cell */
+    else if( m_curMode == EMPTYSPH && m_isPress ) {
+        m_isPress = false;
+        Vec pt;
+        m_hasEmptyS = computeIntersect( event->pos(), pt );
+        if( m_hasEmptyS ) {
+            m_queryPt = Point_3( pt.x, pt.y, pt.z );
+            // find the cell that contains point p in its interior
+            m_cellContain = m_pScene->m_dt.locate( m_queryPt );
+            // show error if point is outside the convex hull
+            if( m_pScene->m_dt.is_infinite( m_cellContain ) ) {
+                m_hasEmptyS = false;
+                displayMessage( tr("Query point is outside the convex hull!") );
+            } else { /* compute the empty sphere */
+                // find the circumcenter of the four vertices of c
+                m_centerPt = m_pScene->m_dt.dual( m_cellContain );
+                // compute the radius of the empty sphere
+                m_fREmptyS = sqrt( CGAL::squared_distance( m_centerPt,
+                                                           m_cellContain->vertex(0)->point() ) );
+            }
+        }//end-if-compute
+        // redraw
+        changed(); updateGL();
+    }//end-if-emptysphere
+
+    else
+        QGLViewer::mouseReleaseEvent(event);
+
+}
+
+void Viewer::wheelEvent(QWheelEvent *event)
+{
+    // Get event modifiers key
+    const Qt::KeyboardModifiers modifiers = event->modifiers();
+
+    if( (m_curMode == INSERT_V || m_curMode == FINDNB || m_curMode == EMPTYSPH )
+            && modifiers == Qt::SHIFT ) {
+        // delta() returns the distance that the wheel is rotated, in eighths of a degree.
+        //  note: most mouse types work in steps of 15 degrees
+        //  positive value: rotate forwards away from the user;
+        //  negative value: rotate backwards toward the user.
+        m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
+        if( m_fRadius < 0.1f )
+            m_fRadius = 0.1f;
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-insv
+
+    else if( m_curMode == INSERT_PT && modifiers == Qt::SHIFT ) {
+        // delta() returns the distance that the wheel is rotated, in eighths of a degree.
+        //  note: most mouse types work in steps of 15 degrees
+        //  positive value: rotate forwards away from the user;
+        //  negative value: rotate backwards toward the user.
+        float origR = m_fRadius;
+        m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
+        if( m_fRadius < 0.1f )
+            m_fRadius = 0.1f;
+        // update the new point and its conflict region
+        if( m_hasNewPt ) {
+            origR = m_fRadius / origR;
+            m_newPt = Point_3( m_newPt.x()*origR, m_newPt.y()*origR, m_newPt.z()*origR );
+            // compute the conflict hole induced by point p
+            computeConflict( m_newPt );
+        }//end-if-conflict
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-inspt
+
+    // resize the trackball when moving a point
+    else if( m_curMode == MOVE && modifiers == Qt::SHIFT && m_isMoving ) {
+        float origR = m_fRadius;
+        m_fRadius += (event->delta()*1.f / m_iStep ); // inc-/decrease by 0.1 per step
+        if( m_fRadius < 0.1f )
+            m_fRadius = 0.1f;
+        origR = m_fRadius / origR;
+        Point_3 pt = m_pScene->m_vhArray.at( m_vidMoving )->point();
+        // note: QList::operator[] return a modifiable reference;
+        //   while QList::at return a const reference
+        // move_if_no_collision moves the point stored in v to pt
+        //  if there is not already another vertex placed on pt,
+        //  the triangulation is modified s.t. the new position of v is pt;
+        //  otherwise, the vertex at point pt is returned.
+        Vertex_handle vh = m_pScene->m_dt.move_if_no_collision(
+                    m_pScene->m_vhArray.at( m_vidMoving ),
+                    Point_3( pt.x()*origR, pt.y()*origR, pt.z()*origR ) );
+        int id1 = m_pScene->m_vhArray.indexOf( vh );
+        int id2 = m_pScene->m_vhArray.indexOf( vh, m_vidMoving+1 );
+        // remove the duplicate in vhArray
+        if( id1 != m_vidMoving )
+            m_pScene->m_vhArray.removeAt( id1 );
+        else if( id2 != -1 )
+            m_pScene->m_vhArray.removeAt( id2 );
+        m_pScene->m_vhArray[m_vidMoving] = vh;
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-move
+
+    else
+        QGLViewer::wheelEvent(event);
+}
+
+void Viewer::keyPressEvent(QKeyEvent *event)
+{
+    // Get event modifiers key
+    const Qt::KeyboardModifiers modifiers = event->modifiers();
+
+    /* Insert the newly inserted point as a vertex */
+    if( m_curMode == INSERT_PT && m_hasNewPt
+            && ( event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter )
+            && modifiers==Qt::NoButton ) {
+        Facet& f = m_boundaryFacets.first(); // a boundary facet, i.e. a pair (cell_handle, i)
+        // insert_in_hole will create a new vertex by starring a hole
+        //   i.e. delete all conflict cells, create a new vertex,
+        //        and for each boundary facet, create a new cell with the new vertex
+        // it takes in an iterator range of conflict cells which specifies a hole
+        //   and (begin, i) is a boundary facet that begin is one of the conflict cell
+        //   but begin->neighbor(i) is not
+        // it returns the handle of the new vertex
+        m_pScene->m_vhArray.push_back( m_pScene->m_dt.insert_in_hole( m_newPt, // the point
+                                                                      m_conflictCells.begin(), // cell_begin
+                                                                      m_conflictCells.end(), // cell_end
+                                                                      f.first, // cell_handle begin
+                                                                      f.second ) ); // integer i
+
+        m_hasNewPt = false;
+        // erase old conflict hole info
+        m_boundaryFacets.clear();
+        m_conflictCells.clear();
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-insVertex
+
+    /* Cancel the newly inserted point and its conflict region */
+    else if( m_curMode == INSERT_PT && m_hasNewPt
+             && event->key()==Qt::Key_Escape && modifiers==Qt::NoButton ) {
+        m_hasNewPt = false;
+        // erase old conflict hole info
+        m_boundaryFacets.clear();
+        m_conflictCells.clear();
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-escapeIns
+
+    /* Delete selected points */
+    else if( m_curMode == SELECT
+             && event->key()==Qt::Key_Delete && modifiers==Qt::NoButton ) {
+        // sort selected id's in descending order
+        qSort(m_vidSeled.begin(), m_vidSeled.end(), qGreater<int>());
+        for(QList<int>::iterator vit=m_vidSeled.begin(); vit<m_vidSeled.end(); ++vit) {
+            // remove the selected point from DT and vertex_handle_array
+            // note: QList::takeAt will removes the item at index position i and returns it.
+            m_pScene->m_dt.remove( m_pScene->m_vhArray.takeAt( *vit ) );
+        }
+        // clear the selection buffer
+        m_vidSeled.clear();
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-del
+
+    /* Cancel the selection */
+    else if( m_curMode == SELECT
+             && event->key()==Qt::Key_Escape && modifiers==Qt::NoButton ) {
+        // clear the selection buffer
+        for(QList<int>::iterator iit=m_vidSeled.begin(); iit<m_vidSeled.end(); ++iit) {
+            m_pScene->m_vhArray.at(*iit)->setSeled( false );
+        }
+        m_vidSeled.clear();
+
+        // redraw
+        changed(); updateGL();
+    }//end-if-escapeSel
+
+
+    /* Show/hide the trackball when drawing the empty sphere */
+    else if( m_curMode == EMPTYSPH
+             && event->key()==Qt::Key_S && modifiers==Qt::NoButton ) {
+        m_showTrackball = !m_showTrackball;
+        // redraw
+        changed(); updateGL();
+    }//end-if-showBall
+
+    else
+        QGLViewer::keyPressEvent(event);
+
+
+    // redraw
+    changed(); updateGL();
+}
+
+/*************************************************************/
+/*  Computation functions */
+
+bool Viewer::computeIntersect( const QPoint & pos, Vec & pt )
+{
+    Vec eye, dir;
+    // Compute eye position and direction to the clicked point,
+    //  used to draw a representation of the intersecting line
+    camera()->convertClickToLine( pos, eye, dir );
+    // Compute the intersection point with the sphere
+    //  note that the center of the sphere is at the origin (0, 0, 0)
+    //  thus, (1) pt = eye + t*dir and (2) dist( pt, origin ) = radius
+    //  i.e. (x_eye + t*x_dir)^2 + (y_eye + t*y_dir)^2 + (z_eye + t*z_dir)^2 = r^2
+    //  --> t^2( dir*dir ) + 2t( eye*dir ) + eye*eye - r^2 = 0
+    //      where "dir*dir" is the dot product of vector dir
+    //  we need to solve t and the smaller t (nearer to eye position) is what we want
+    float a = dir*dir;
+    float b = eye*dir;
+    float c = eye*eye - m_fRadius*m_fRadius;
+    float delta = b*b - a*c;
+    if( delta < 0 ) {
+        displayMessage( tr("Point is not on the sphere!") );
+        return false;
+    } else {
+        float t = ( (-1.)*b - sqrt(delta) ) / a;
+        pt = eye + t*dir;
+        return true;
+    }
+}
+
+void Viewer::computeConflict( Point_3 pt )
+{
+    // find the cell that contains point p in its interior
+    m_cellContain = m_pScene->m_dt.locate( pt );
+    // erase old conflict hole info
+    m_boundaryFacets.clear();
+    m_conflictCells.clear();
+    // show msg if point is outside the convex hull
+    if( m_pScene->m_dt.is_infinite( m_cellContain ) )
+        displayMessage( tr("Note: point is outside the convex hull.") );
+    // compute the conflict hole induced by point p
+    m_pScene->m_dt.find_conflicts( pt, // the point
+                                   m_cellContain, // starting cell that must be in conflict
+                                   std::back_inserter(m_boundaryFacets), // the facets on the boundary
+                                   std::back_inserter(m_conflictCells) ); // the cells in conflict
+}
+
+/*************************************************************/
+/*  Animation functions */
+
+void Viewer::toggleIncremental(bool on) {
+    if( on ) {  // play
+        if( m_incrementalPts.isEmpty() ) {
+            /* start play */
+            if( m_pScene->m_dt.number_of_vertices() == 0 ) {
+                CGAL::Random_points_in_cube_3<Point_3> pts_generator(1.0);
+                CGAL::cpp11::copy_n( pts_generator, 100, std::back_inserter(m_incrementalPts) );
+            } else {
+                for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
+                    vit < m_pScene->m_vhArray.end(); ++vit) {
+                    m_incrementalPts.push_back( (*vit)->point() );
+                }//end-for
+                // erase existing vertices
+                initClean();
+            }//end-if-pts
+            // sorts points in a way that improves space locality
+            CGAL::spatial_sort( m_incrementalPts.begin(), m_incrementalPts.end() );
+            // set the current to "hightlight the new point"
+            m_curStep = INIT;
+        }/* else resume play */
+
+        // set up the timer
+        m_pTimer->start(1000);
+    } else { // pause
+        m_pTimer->stop();
+    }
+
+    // redraw
+    changed(); updateGL();
+}
+
+void Viewer::stopIncremental() {
+    if( !m_incrementalPts.isEmpty() ) {
+        // will call toggleIncremental to stop the timer
+    Q_EMIT( stopIncAnimation() );
+
+        // insert the rest points
+        for(QList<Point_3>::iterator pit=m_incrementalPts.begin();
+            pit < m_incrementalPts.end(); ++pit) {
+            Vertex_handle hint;
+            if( m_pScene->m_vhArray.isEmpty() ) {
+                hint = m_pScene->m_dt.insert( *pit );
+            } else {
+                hint = m_pScene->m_vhArray.last();
+                hint = m_pScene->m_dt.insert( *pit, hint );
+            }
+            m_pScene->m_vhArray.push_back( hint );
+        }
+        m_incrementalPts.clear();
+    }
+
+    // redraw
+    changed(); updateGL();
+}
+
+void Viewer::incremental_insert() {
+    Vertex_handle hint;
+    if( !m_incrementalPts.isEmpty() ) {
+        switch( m_curStep ) {
+        case INIT:  // end of INIT: get the next-to-insert point
+            m_curIncPt = m_incrementalPts.at(0);
+            m_curStep = NEWPT;
+            break;
+        case NEWPT:  // end of NEWPT: locate the cell containing the point
+            if( m_pScene->m_dt.is_valid() && m_pScene->m_dt.dimension() == 3 ) {
+                computeConflict( m_curIncPt );
+                m_curStep = CELL;
+            }
+            else {
+                // popup the first point and insert it
+                m_curIncPt = m_incrementalPts.takeFirst();
+                if( m_pScene->m_vhArray.isEmpty() ) {
+                    hint = m_pScene->m_dt.insert( m_curIncPt );
+                }
+                else {
+                    hint = m_pScene->m_vhArray.last();
+                    hint = m_pScene->m_dt.insert( m_curIncPt, hint );
+                }
+                m_pScene->m_vhArray.push_back( hint );
+                m_curStep = INIT;
+            }
+            break;
+        case CELL:  // end of CELL: compute the conflict region
+            m_curStep = CONFLICT;
+            break;
+        case CONFLICT:  // end of CONFLICT: do the insertion and go back to INIT
+            // popup the first point and insert it
+            m_curIncPt = m_incrementalPts.takeFirst();
+            if( m_pScene->m_vhArray.isEmpty() ) {
+                hint = m_pScene->m_dt.insert( m_curIncPt );
+            } else {
+                hint = m_pScene->m_vhArray.last();
+                hint = m_pScene->m_dt.insert( m_curIncPt, hint );
+            }
+            m_pScene->m_vhArray.push_back( hint );
+            m_curStep = INIT;
+            break;
+        }//end-of-switch
+    } else {
+        /* if finished, then start over */
+        for(QList<Vertex_handle>::iterator vit = m_pScene->m_vhArray.begin();
+            vit < m_pScene->m_vhArray.end(); ++vit) {
+            m_incrementalPts.push_back( (*vit)->point() );
+        }//end-for
+        // erase existing vertices
+        initClean();
+        // set the current to "hightlight the new point"
+        m_curStep = INIT;
+    }
+
+    // redraw
+    changed(); updateGL();
+}
+
+
+void Viewer::draw_cylinder(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals)
+{
+    vertices->resize(0);
+    normals->resize(0);
+    // int rings=360/prec, sectors=360/prec;
+    // float T, P;
+    // float x[4],y[4],z[4];
+    //Closing nicely the tubes will cause z-fighting and the spherical parts will get all messy
+    /*
+//top of the cylinder
+    for(int t=0; t<360; t+=sectors)
+    {
+
+        vertices->push_back(0);
+        vertices->push_back(R+1);
+        vertices->push_back(0);
+
+
+        normals->push_back(0);
+        normals->push_back(1);
+        normals->push_back(0);
+
+
+
+        P = rings*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        z[1] = sin(P) * sin(T) ;
+        y[1] = cos(P);
+        vertices->push_back(R * x[1]);
+        vertices->push_back(R * y[1]+1);
+        vertices->push_back(R * z[1]);
+
+
+        normals->push_back(x[1]);
+        normals->push_back(y[1]);
+        normals->push_back(z[1]);
+
+        //
+        P = rings*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        z[2] = sin(P) * sin(T) ;
+        y[2] = cos(P);
+        vertices->push_back(R * x[2]);
+        vertices->push_back(R * y[2]+1);
+        vertices->push_back(R * z[2]);
+
+        normals->push_back(x[2]);
+        normals->push_back(y[2]);
+        normals->push_back(z[2]);
+
+    }
+    //Body of the sphere
+    for (int p=rings; p<90; p+=rings)
+        for(int t=0; t<360; t+=sectors)
+        {
+            //A
+            P = p*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[0] = sin(P) * cos(T) ;
+            z[0] = sin(P) * sin(T) ;
+            y[0] = cos(P);
+
+            vertices->push_back(R * x[0]);
+            vertices->push_back(R * y[0]+1);
+            vertices->push_back(R * z[0]);
+
+
+            normals->push_back(x[0]);
+            normals->push_back(y[0]);
+            normals->push_back(z[0]);
+
+            //B
+            P = (p+rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            z[1] = sin(P) * sin(T) ;
+            y[1] = cos(P);
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]+1);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            //C
+            P = p*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            z[2] = sin(P) * sin(T) ;
+            y[2] = cos(P);
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]+1);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+            //D
+            P = (p+rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[3] = sin(P) * cos(T) ;
+            z[3] = sin(P) * sin(T) ;
+            y[3] = cos(P);
+            vertices->push_back(R * x[3]);
+            vertices->push_back(R * y[3]+1);
+            vertices->push_back(R * z[3]);
+
+
+            normals->push_back(x[3]);
+            normals->push_back(y[3]);
+            normals->push_back(z[3]);
+
+
+
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]+1);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]+1);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+
+        }
+
+*/
+    //body of the cylinder
+    for(int d = 0; d<360; d+= 360/prec)
+    {
+
+        //point A1
+        float D = d*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point B1
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point C1
+        D = (d+360/prec)*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point A2
+        D = (d+360/prec)*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(1);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point B2
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+        //point C2
+        D = d*M_PI/180.0;
+        vertices->push_back(R * sin(D));
+        vertices->push_back(0);
+        vertices->push_back(R * cos(D));
+
+        normals->push_back(sin(D));
+        normals->push_back(0);
+        normals->push_back(cos(D));
+
+    }
+    /*
+   //bottom of the cylinder
+       for(int t=0; t<360; t+=sectors)
+       {
+
+           vertices->push_back(0);
+           vertices->push_back(-R);
+           vertices->push_back(0);
+
+
+           normals->push_back(0);
+           normals->push_back(-1);
+           normals->push_back(0);
+
+
+
+           P = rings*M_PI/180.0;
+           T = t*M_PI/180.0;
+           x[1] = sin(P) * cos(T) ;
+           z[1] = sin(P) * sin(T) ;
+           y[1] = cos(P);
+           vertices->push_back(R * x[1]);
+           vertices->push_back(R * y[1]);
+           vertices->push_back(R * z[1]);
+
+
+           normals->push_back(x[1]);
+           normals->push_back(y[1]);
+           normals->push_back(z[1]);
+
+           //
+           P = rings*M_PI/180.0;
+           T = (t+sectors)*M_PI/180.0;
+           x[2] = sin(P) * cos(T) ;
+           z[2] = sin(P) * sin(T) ;
+           y[2] = cos(P);
+           vertices->push_back(R * x[2]);
+           vertices->push_back(R * y[2]);
+           vertices->push_back(R * z[2]);
+
+           normals->push_back(x[2]);
+           normals->push_back(y[2]);
+           normals->push_back(z[2]);
+
+       }
+       //Body of the sphere
+       for (int p=90; p<180; p+=rings)
+           for(int t=0; t<360; t+=sectors)
+           {
+               //A
+               P = p*M_PI/180.0;
+               T = t*M_PI/180.0;
+               x[0] = sin(P) * cos(T) ;
+               z[0] = sin(P) * sin(T) ;
+               y[0] = cos(P);
+
+               vertices->push_back(R * x[0]);
+               vertices->push_back(R * y[0]);
+               vertices->push_back(R * z[0]);
+
+
+               normals->push_back(x[0]);
+               normals->push_back(y[0]);
+               normals->push_back(z[0]);
+
+               //B
+               P = (p+rings)*M_PI/180.0;
+               T = t*M_PI/180.0;
+               x[1] = sin(P) * cos(T) ;
+               z[1] = sin(P) * sin(T) ;
+               y[1] = cos(P);
+               vertices->push_back(R * x[1]);
+               vertices->push_back(R * y[1]);
+               vertices->push_back(R * z[1]);
+
+
+               normals->push_back(x[1]);
+               normals->push_back(y[1]);
+               normals->push_back(z[1]);
+
+               //C
+               P = p*M_PI/180.0;
+               T = (t+sectors)*M_PI/180.0;
+               x[2] = sin(P) * cos(T) ;
+               z[2] = sin(P) * sin(T) ;
+               y[2] = cos(P);
+               vertices->push_back(R * x[2]);
+               vertices->push_back(R * y[2]);
+               vertices->push_back(R * z[2]);
+
+
+               normals->push_back(x[2]);
+               normals->push_back(y[2]);
+               normals->push_back(z[2]);
+               //D
+               P = (p+rings)*M_PI/180.0;
+               T = (t+sectors)*M_PI/180.0;
+               x[3] = sin(P) * cos(T) ;
+               z[3] = sin(P) * sin(T) ;
+               y[3] = cos(P);
+               vertices->push_back(R * x[3]);
+               vertices->push_back(R * y[3]);
+               vertices->push_back(R * z[3]);
+
+
+               normals->push_back(x[3]);
+               normals->push_back(y[3]);
+               normals->push_back(z[3]);
+
+
+
+               vertices->push_back(R * x[1]);
+               vertices->push_back(R * y[1]);
+               vertices->push_back(R * z[1]);
+
+
+               normals->push_back(x[1]);
+               normals->push_back(y[1]);
+               normals->push_back(z[1]);
+
+               vertices->push_back(R * x[2]);
+               vertices->push_back(R * y[2]);
+               vertices->push_back(R * z[2]);
+
+
+               normals->push_back(x[2]);
+               normals->push_back(y[2]);
+               normals->push_back(z[2]);
+
+           }*/
+
+
+}
+
+void Viewer::draw_sphere(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals)
+{
+    vertices->resize(0);
+    normals->resize(0);
+    int rings=180/prec, sectors=360/prec;
+    float T, P;
+    float x[4],y[4],z[4];
+
+
+    //Top of the sphere
+    for(int t=0; t<360; t+=sectors)
+    {
+
+        vertices->push_back(0);
+        vertices->push_back(0);
+        vertices->push_back(R);
+
+
+        normals->push_back(0);
+        normals->push_back(0);
+        normals->push_back(1);
+
+
+
+        P = rings*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        y[1] = sin(P) * sin(T) ;
+        z[1] = cos(P);
+        vertices->push_back(R * x[1]);
+        vertices->push_back(R * y[1]);
+        vertices->push_back(R * z[1]);
+
+
+        normals->push_back(x[1]);
+        normals->push_back(y[1]);
+        normals->push_back(z[1]);
+
+        //
+        P = rings*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        y[2] = sin(P) * sin(T) ;
+        z[2] = cos(P);
+        vertices->push_back(R * x[2]);
+        vertices->push_back(R * y[2]);
+        vertices->push_back(R * z[2]);
+
+        normals->push_back(x[2]);
+        normals->push_back(y[2]);
+        normals->push_back(z[2]);
+
+    }
+
+    //Body of the sphere
+    for (int p=rings; p<180-rings; p+=rings)
+        for(int t=0; t<360; t+=sectors)
+        {
+            //A
+            P = p*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[0] = sin(P) * cos(T) ;
+            y[0] = sin(P) * sin(T) ;
+            z[0] = cos(P);
+
+            vertices->push_back(R * x[0]);
+            vertices->push_back(R * y[0]);
+            vertices->push_back(R * z[0]);
+
+
+            normals->push_back(x[0]);
+            normals->push_back(y[0]);
+            normals->push_back(z[0]);
+
+            //B
+            P = (p+rings)*M_PI/180.0;
+            T = t*M_PI/180.0;
+            x[1] = sin(P) * cos(T) ;
+            y[1] = sin(P) * sin(T) ;
+            z[1] = cos(P);
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            //C
+            P = p*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[2] = sin(P) * cos(T) ;
+            y[2] = sin(P) * sin(T) ;
+            z[2] = cos(P);
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+            //D
+            P = (p+rings)*M_PI/180.0;
+            T = (t+sectors)*M_PI/180.0;
+            x[3] = sin(P) * cos(T) ;
+            y[3] = sin(P) * sin(T) ;
+            z[3] = cos(P);
+            vertices->push_back(R * x[3]);
+            vertices->push_back(R * y[3]);
+            vertices->push_back(R * z[3]);
+
+
+            normals->push_back(x[3]);
+            normals->push_back(y[3]);
+            normals->push_back(z[3]);
+
+
+
+            vertices->push_back(R * x[1]);
+            vertices->push_back(R * y[1]);
+            vertices->push_back(R * z[1]);
+
+
+            normals->push_back(x[1]);
+            normals->push_back(y[1]);
+            normals->push_back(z[1]);
+
+            vertices->push_back(R * x[2]);
+            vertices->push_back(R * y[2]);
+            vertices->push_back(R * z[2]);
+
+
+            normals->push_back(x[2]);
+            normals->push_back(y[2]);
+            normals->push_back(z[2]);
+
+        }
+    //Bottom of the sphere
+    for(int t=0; t<360; t+=sectors)
+    {
+
+
+        vertices->push_back(0);
+        vertices->push_back(0);
+        vertices->push_back(-R);
+
+
+        normals->push_back(0);
+        normals->push_back(0);
+        normals->push_back(-1);
+
+
+        P = (180-rings)*M_PI/180.0;
+        T = t*M_PI/180.0;
+        x[1] = sin(P) * cos(T) ;
+        y[1] = sin(P) * sin(T) ;
+        z[1] = cos(P);
+        vertices->push_back(R * x[1]);
+        vertices->push_back(R * y[1]);
+        vertices->push_back(R * z[1]);
+
+
+        normals->push_back(x[1]);
+        normals->push_back(y[1]);
+        normals->push_back(z[1]);
+
+
+        P = (180-rings)*M_PI/180.0;
+        T = (t+sectors)*M_PI/180.0;
+        x[2] = sin(P) * cos(T) ;
+        y[2] = sin(P) * sin(T) ;
+        z[2] = cos(P);
+        vertices->push_back(R * x[2]);
+        vertices->push_back(R * y[2]);
+        vertices->push_back(R * z[2]);
+
+
+        normals->push_back(x[2]);
+        normals->push_back(y[2]);
+        normals->push_back(z[2]);
+
+    }
+
+}
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.h b/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.h
new file mode 100644
index 0000000..c865f01
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3/Viewer.h
@@ -0,0 +1,402 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include "Scene.h"
+#include <QGLViewer/qglviewer.h>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QSettings>
+#include "PreferenceDlg.h"
+
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QOpenGLBuffer>
+#include <QOpenGLShaderProgram>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+#include <iostream>
+using namespace qglviewer;
+
+class MainWindow;
+
+class Viewer : public QGLViewer, QOpenGLFunctions_2_1 {
+
+  Q_OBJECT
+
+public:
+  Viewer(QWidget* parent)
+    : QGLViewer(CGAL::Qt::createOpenGLContext(),parent)
+    , m_showAxis(false)
+    , m_showVertex(true)
+    , m_showDEdge(true)
+    , m_showVEdge(false)
+    , m_showFacet(false)
+    , m_isFlat(false)
+    , m_fRadius(1.)
+    , m_curMode(NONE)
+    , m_isPress(false)
+    , m_isMoving(false)
+    , m_hasNewPt(false)
+    , m_selMode(NORMAL)
+    , m_nearestNb(NULL)
+    , m_hasEmptyS(false)
+    , m_showTrackball(true)
+    , m_pDlgPrefer(NULL)
+    {
+      pos_emptyFacet = new std::vector<float>();
+      pos_emptySphere= new std::vector<float>();
+      points_emptySphere = new std::vector<float>();
+      pos_points = new std::vector<float>();
+      pos_newPoint = new std::vector<float>();
+      pos_selectedVertex = new std::vector<float>();
+      pos_movingPoint = new std::vector<float>();
+      pos_queryPoint = new std::vector<float>();
+      pos_trackBall  = new std::vector<float>();
+      pos_voronoi = new std::vector<float>();
+      pos_delaunay = new std::vector<float>();
+      pos_facets = new std::vector<float>();
+      pos_newFacet = new std::vector<float>();
+      pos_nearest_neighbor = new std::vector<float>();
+      points_locationSphere = new std::vector<float>();
+      points_cylinder = new std::vector<float>();
+      normals_cylinder = new std::vector<float>();
+      points_sphere = new std::vector<float>();
+      points_trackBall = new std::vector<float>();
+      normals_sphere = new std::vector<float>();
+      normals_emptySphere = new std::vector<float>();
+      normals_trackBall= new std::vector<float>();
+      transfo1_voronoi = new std::vector<float>();
+      transfo2_voronoi = new std::vector<float>();
+      transfo3_voronoi = new std::vector<float>();
+      transfo4_voronoi = new std::vector<float>();
+      transfo1_delaunay = new std::vector<float>();
+      transfo2_delaunay = new std::vector<float>();
+      transfo3_delaunay = new std::vector<float>();
+      transfo4_delaunay = new std::vector<float>();
+      incremental_points = new std::vector<float>();
+      incremental_next_point = new std::vector<float>();
+      incremental_facet = new std::vector<float>();
+      incremental_conflict = new std::vector<float>();
+    }
+
+  ~Viewer()
+  {
+      for(int i=0; i< vboSize; i++)
+          buffers[i].destroy();
+
+      for(int i=0; i< vaoSize; i++)
+          vao[i].destroy();
+
+
+  }
+  enum Mode { NONE, INSERT_V, INSERT_PT, MOVE, SELECT, FINDNB, EMPTYSPH };
+
+public:
+  inline void setScene(Scene* pScene) { m_pScene = pScene; }
+
+  // set current mode
+  inline void setMode(Mode m) {
+    m_curMode = m;
+    m_isMoving = false;
+    m_hasEmptyS = false;
+    m_nearestNb = NULL;
+    updateGL();
+  }
+
+  // set selectBuffer size (if necessary)
+  inline void setSelBuffSize() {
+    // Default selectBuffer size is 4000
+    // (i.e. 1000 objects in selection region, since each object pushes 4 values).
+    if( m_pScene->m_vhArray.size() > 900 )
+      // The previous selectBuffer is deleted and a new one is created.
+      setSelectBufferSize( 4*(m_pScene->m_vhArray.size() + 100) );
+  }
+
+  void readSettings() {
+    // read from an .ini file
+    QSettings settings("settings.ini", QSettings::IniFormat);
+    // QVariant value ( const QString & key, const QVariant & defaultValue = QVariant() )
+    // Because QVariant is part of the QtCore library,
+    //   it cannot provide conversion functions to data types such as QColor and QImage,
+    //   which are part of QtGui.
+    // In other words, there is no toColor(), toImage(), or toPixmap() functions in QVariant.
+    // Instead, use the QVariant::value() or the qVariantValue() template function
+    m_colorVertex = settings.value( "Show/vertexcolor", QColor(255, 150, 0) ).value<QColor>();
+    m_fSizeVertex = settings.value( "Show/vertexsize", 0.04f ).toFloat();
+    m_colorDEdge = settings.value( "Show/dedgecolor", QColor(0, 255, 0) ).value<QColor>();
+    m_fSizeDEdge = settings.value( "Show/dedgesize", 0.01f ).toFloat();
+    m_colorVEdge = settings.value( "Show/vedgecolor", QColor(0, 0, 255) ).value<QColor>();
+    m_fSizeVEdge = settings.value( "Show/vedgesize", 0.01f ).toFloat();
+    m_colorFacet = settings.value( "Show/facetcolor",
+                             QColor(255, 255, 0, 96) ).value<QColor>();
+    m_colorTrackball = settings.value( "Show/ballcolor",
+                                 QColor(150, 150, 150, 128) ).value<QColor>();
+    m_iStep = settings.value( "Show/ballstep", 4000 ).toInt();
+    m_colorEmptySphere = settings.value( "Show/spherecolor",
+                                   QColor(180, 50, 180, 64) ).value<QColor>();
+  }
+
+  void writeSettings() {
+    // write to an .ini file
+    QSettings settings("settings.ini", QSettings::IniFormat);
+    // The inverse conversion (e.g., from QColor to QVariant) is automatic
+    //   for all data types supported by QVariant, including GUI-related types
+    settings.setValue("Show/vertexcolor", m_colorVertex);
+    settings.setValue("Show/vertexsize", m_fSizeVertex);
+    settings.setValue("Show/dedgecolor", m_colorDEdge);
+    settings.setValue("Show/dedgesize", m_fSizeDEdge);
+    settings.setValue("Show/vedgecolor", m_colorVEdge);
+    settings.setValue("Show/vedgesize", m_fSizeVEdge);
+    settings.setValue("Show/facetcolor", m_colorFacet);
+    settings.setValue("Show/ballcolor", m_colorTrackball);
+    settings.setValue("Show/ballstep", m_iStep);
+    settings.setValue("Show/spherecolor", m_colorEmptySphere);
+  }
+
+public Q_SLOTS:
+  // clear scene
+  void changed()
+  {
+      compute_elements();
+      are_buffers_initialized = false;
+  }
+  void clear() {
+    m_pScene->eraseOldData();
+    m_hasNewPt = false;
+    m_boundaryFacets.clear();
+    m_conflictCells.clear();
+    m_vidSeled.clear();
+    m_isMoving = false;
+    m_nearestNb = NULL;
+    m_hasEmptyS = false;
+    if( !m_incrementalPts.isEmpty() ) {
+      Q_EMIT( stopIncAnimation() );
+      m_incrementalPts.clear();
+    }
+  }
+
+  // play/pause incremental construction
+  void toggleIncremental(bool on);
+  // clean up old data and information
+  void initClean() {
+    m_pScene->eraseOldData();
+    m_hasNewPt = false;
+    m_boundaryFacets.clear();
+    m_conflictCells.clear();
+    m_vidSeled.clear();
+    m_isMoving = false;
+    m_nearestNb = NULL;
+    m_hasEmptyS = false;
+  }
+  // stop incremental construction
+  void stopIncremental();
+  // incremental insert a vertex (invoked by Timer)
+  void incremental_insert();
+
+  // show options
+  inline void toggleShowAxis(bool flag)  { m_showAxis = flag; updateGL(); }
+  inline void toggleShowVertex(bool flag)  { m_showVertex = flag; updateGL(); }
+  inline void toggleShowDEdge(bool flag)  { m_showDEdge = flag; updateGL(); }
+  inline void toggleShowVEdge(bool flag)  { m_showVEdge = flag; updateGL(); }
+  inline void toggleShowFacet(bool flag)  { m_showFacet = flag; updateGL(); }
+  inline void toggleFlat(bool flag)  { m_isFlat = flag; updateGL(); }
+
+  // set preferences
+  void setPreferences() {
+    if (!m_pDlgPrefer) {
+      m_pDlgPrefer = new PreferenceDlg(this);
+      m_pDlgPrefer->init( m_colorVertex, m_fSizeVertex, m_colorDEdge, m_fSizeDEdge, m_colorVEdge, m_fSizeVEdge,
+              m_colorFacet, m_colorTrackball, m_colorEmptySphere, m_iStep/40 ); // 5*8, 5 degrees of wheel
+      connect(m_pDlgPrefer, SIGNAL(applyChanges()), this, SLOT(acceptChanges()) );
+    }
+    m_pDlgPrefer->show();
+    m_pDlgPrefer->raise();
+    m_pDlgPrefer->activateWindow();
+  }
+
+  void acceptChanges() {
+    m_colorVertex = m_pDlgPrefer->m_colorVertex;
+    m_fSizeVertex = m_pDlgPrefer->m_fSizeVertex;
+    m_colorDEdge = m_pDlgPrefer->m_colorDEdge;
+    m_fSizeDEdge = m_pDlgPrefer->m_fSizeDEdge;
+    m_colorVEdge = m_pDlgPrefer->m_colorVEdge;
+    m_fSizeVEdge = m_pDlgPrefer->m_fSizeVEdge;
+    m_colorFacet = m_pDlgPrefer->m_colorFacet;
+    m_colorTrackball = m_pDlgPrefer->m_colorTrackball;
+    m_iStep = m_pDlgPrefer->m_iStep*40;
+    m_colorEmptySphere = m_pDlgPrefer->m_colorEmptySphere;
+    // redraw
+    updateGL();
+  }
+
+  Q_SIGNALS:
+  void stopIncAnimation();
+
+// overloading QGLViewer virtual functions
+protected:
+  // initialize Viewer OpenGL context
+  // Note: the default implement is empty and this is overloading.
+  void init();
+  // draw points, segments, and polygons
+  void draw();
+
+  // customize selection process
+  void drawWithNames();
+  void endSelection(const QPoint& point);
+  // customize mouse events
+  void mousePressEvent(QMouseEvent *event);
+  void mouseMoveEvent(QMouseEvent *event);
+  void mouseReleaseEvent(QMouseEvent *event);
+  void wheelEvent(QWheelEvent *event);
+  // customize key events
+  void keyPressEvent(QKeyEvent *event);
+
+  // customize help message
+  QString helpString() const;
+
+private:
+  // draw a 3d effect vertex
+  void drawVertex(const Point_3& p, std::vector<float> *vertices);
+  // draw a 3d effect edge
+  void drawEdge(const Point_3& from, const Point_3 &to, std::vector<float> *vertices);
+  // draw a facet
+  void drawFacet(const Triangle_3& t, std::vector<float> *vertices);
+  // test whether the give 3D point is on the sphere
+  inline bool isOnSphere( const Point_3 & pt ) {
+    return ( (pt.x()*pt.x() + pt.y()*pt.y() + pt.z()*pt.z()) == (m_fRadius*m_fRadius) );
+  }
+
+  // compute the intersection point with the sphere
+  bool computeIntersect( const QPoint & pos, Vec & pt );
+  // compute the conflict region
+  void computeConflict( Point_3 pt );
+
+
+private:
+  Scene* m_pScene;
+  // play timer
+  QTimer* m_pTimer;
+  Point_3 m_curIncPt;
+  QList<Point_3> m_incrementalPts;
+  enum Step { INIT, NEWPT, CELL, CONFLICT };
+  Step m_curStep;
+  Cell_handle m_cellContain;
+  QList<Facet> m_boundaryFacets;
+  QList<Cell_handle> m_conflictCells;
+  // show options
+  bool m_showAxis;
+  bool m_showVertex;
+  bool m_showDEdge;
+  bool m_showVEdge;
+  bool m_showFacet;
+  bool m_isFlat;
+  // trackball
+  float m_fRadius;
+  // mode
+  Mode m_curMode;
+  bool m_isPress;
+  bool m_isMoving;
+  // insert point
+  bool m_hasNewPt;
+  Point_3 m_newPt;
+  // select vertex
+  enum selectionMode { NORMAL, ADD };
+  selectionMode m_selMode;
+  QRect m_rectSel;
+  QList<int> m_vidSeled;
+  // move vertex/point
+  int m_vidMoving;
+  // nearest neighbor
+  Point_3 m_queryPt;
+  Vertex_handle m_nearestNb;
+  // empty sphere
+  bool m_hasEmptyS;
+  bool m_showTrackball;
+  Point_3 m_centerPt;
+  float m_fREmptyS;
+  // change colors
+  PreferenceDlg* m_pDlgPrefer;
+  float m_fSizeVertex;
+  float m_fSizeDEdge;
+  float m_fSizeVEdge;
+  QColor m_colorVertex;
+  QColor m_colorDEdge;
+  QColor m_colorVEdge;
+  QColor m_colorFacet;
+  QColor m_colorTrackball;
+  QColor m_colorEmptySphere;
+  // trackball resizing fineness
+  int m_iStep;
+
+
+  QColor color;
+  static const int vaoSize = 29;
+  static const int vboSize = 33;
+  // define material
+   QVector4D	ambient;
+   QVector4D	diffuse;
+   QVector4D	specular;
+   GLfloat      shininess ;
+      int poly_vertexLocation[3];
+      int normalsLocation[3];
+      int mvpLocation[3];
+      int mvLocation[2];
+      int centerLocation[5];
+      int colorLocation[3];
+      int lightLocation[5*2];
+
+      bool are_buffers_initialized;
+      bool extension_is_found;
+
+      std::vector<float> *pos_emptyFacet;
+      std::vector<float> *pos_emptySphere;
+      std::vector<float> *points_emptySphere;
+      std::vector<float> *pos_points;
+      std::vector<float> *pos_newPoint;
+      std::vector<float> *pos_selectedVertex;
+      std::vector<float> *pos_movingPoint;
+      std::vector<float> *pos_queryPoint;
+      std::vector<float> *pos_trackBall;
+      std::vector<float> *points_trackBall;
+      std::vector<float> *pos_voronoi;
+      std::vector<float> *pos_delaunay;
+      std::vector<float> *pos_facets;
+      std::vector<float> *pos_newFacet;
+      std::vector<float> *pos_nearest_neighbor;
+      std::vector<float> *points_locationSphere;
+      std::vector<float> *points_cylinder;
+      std::vector<float> *normals_cylinder;
+      std::vector<float> *points_sphere;
+      std::vector<float> *normals_sphere;
+      std::vector<float> *normals_emptySphere;
+      std::vector<float> *normals_trackBall;
+      std::vector<float> *transfo1_voronoi;
+      std::vector<float> *transfo2_voronoi;
+      std::vector<float> *transfo3_voronoi;
+      std::vector<float> *transfo4_voronoi;
+      std::vector<float> *transfo1_delaunay;
+      std::vector<float> *transfo2_delaunay;
+      std::vector<float> *transfo3_delaunay;
+      std::vector<float> *transfo4_delaunay;
+      std::vector<float> *incremental_points;
+      std::vector<float> *incremental_next_point;
+      std::vector<float> *incremental_facet;
+      std::vector<float> *incremental_conflict;
+
+      QOpenGLBuffer buffers[vboSize];
+      QOpenGLVertexArrayObject vao[vaoSize];
+      QOpenGLShaderProgram rendering_program;
+      QOpenGLShaderProgram rendering_program_spheres;
+      QOpenGLShaderProgram rendering_program_cylinders;
+      typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+      typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+      PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced;
+      PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor;
+      void initialize_buffers();
+      void compute_elements();
+      void attrib_buffers(QGLViewer*);
+      void compile_shaders();
+      void draw_cylinder(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals);
+      void draw_sphere(float R, int prec, std::vector<float> *vertices, std::vector<float> *normals);
+};
+
+#endif
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/documentation/about.html b/3rdparty/CGAL-4.8/demo/Triangulation_3/documentation/about.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/documentation/about.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/documentation/about.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/documentation/about_CGAL.html b/3rdparty/CGAL-4.8/demo/Triangulation_3/documentation/about_CGAL.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/documentation/about_CGAL.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/documentation/about_CGAL.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/about_CGAL.html b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/about_CGAL.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/about_CGAL.html
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/about_CGAL.html
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/clear.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/clear.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/clear.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/clear.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/coordinates.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/coordinates.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/coordinates.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/coordinates.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/empty_sphere.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/empty_sphere.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/empty_sphere.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/empty_sphere.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/icons/fileOpen.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/fileOpen.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/fileOpen.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/fileOpen.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/fileSave.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/fileSave.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/fileSave.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/fileSave.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/flat.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/flat.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/flat.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/flat.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/grid.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/grid.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/grid.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/grid.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/insert.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/insert.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/insert.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/insert.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/insert_point.jpg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/insert_point.jpg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/insert_point.jpg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/insert_point.jpg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/move_1.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/move_1.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/move_1.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/move_1.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/nearest_nb.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/nearest_nb.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/nearest_nb.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/nearest_nb.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/normal_view.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/normal_view.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/normal_view.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/normal_view.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/pause.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/pause.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/pause.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/pause.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/play.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/play.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/play.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/play.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/pointRandom.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/pointRandom.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/pointRandom.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/pointRandom.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/preferences.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/preferences.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/preferences.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/preferences.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/quit.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/quit.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/quit.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/quit.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/select_hand.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/select_hand.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/select_hand.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/select_hand.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_delaunay.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_delaunay.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_delaunay.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_delaunay.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_facet.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_facet.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_facet.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_facet.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_point.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_point.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_point.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_point.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_voronoi.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_voronoi.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/show_voronoi.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/show_voronoi.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/stereo.png b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/stereo.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/stereo.png
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/stereo.png
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/icons/stop.jpeg b/3rdparty/CGAL-4.8/demo/Triangulation_3/icons/stop.jpeg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/icons/stop.jpeg
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/icons/stop.jpeg
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3/typedefs.h b/3rdparty/CGAL-4.8/demo/Triangulation_3/typedefs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3/typedefs.h
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3/typedefs.h
diff --git a/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/CMakeLists.txt b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/CMakeLists.txt
new file mode 100644
index 0000000..82989fc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Triangulation_3_Demo )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  create_single_source_cgal_program( "Triangulation_3_demo.cpp" )
+  create_single_source_cgal_program( "Triangulation_3_color_demo.cpp" )
+  create_single_source_cgal_program( "Triangulation_3_remove_demo.cpp" )
+  create_single_source_cgal_program( "Triangulation_3_voronoi_demo.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/README b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/README
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/README
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_remove_demo.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_remove_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_remove_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_remove_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp
diff --git a/3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/data/points b/3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/data/points
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Triangulation_3_Geomview_demos/data/points
rename to 3rdparty/CGAL-4.8/demo/Triangulation_3_Geomview_demos/data/points
diff --git a/3rdparty/CGAL-4.6/demo/icons/Delaunay_triangulation_2.png b/3rdparty/CGAL-4.8/demo/icons/Delaunay_triangulation_2.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/Delaunay_triangulation_2.png
rename to 3rdparty/CGAL-4.8/demo/icons/Delaunay_triangulation_2.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/File.qrc b/3rdparty/CGAL-4.8/demo/icons/File.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/File.qrc
rename to 3rdparty/CGAL-4.8/demo/icons/File.qrc
diff --git a/3rdparty/CGAL-4.6/demo/icons/Input.qrc b/3rdparty/CGAL-4.8/demo/icons/Input.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/Input.qrc
rename to 3rdparty/CGAL-4.8/demo/icons/Input.qrc
diff --git a/3rdparty/CGAL-4.6/demo/icons/Triangulation_2.qrc b/3rdparty/CGAL-4.8/demo/icons/Triangulation_2.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/Triangulation_2.qrc
rename to 3rdparty/CGAL-4.8/demo/icons/Triangulation_2.qrc
diff --git a/3rdparty/CGAL-4.6/demo/icons/Voronoi_diagram_2.png b/3rdparty/CGAL-4.8/demo/icons/Voronoi_diagram_2.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/Voronoi_diagram_2.png
rename to 3rdparty/CGAL-4.8/demo/icons/Voronoi_diagram_2.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileNew.png b/3rdparty/CGAL-4.8/demo/icons/fileNew.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileNew.png
rename to 3rdparty/CGAL-4.8/demo/icons/fileNew.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/fileOpen.png b/3rdparty/CGAL-4.8/demo/icons/fileOpen.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_3_triangulation_3/icons/fileOpen.png
rename to 3rdparty/CGAL-4.8/demo/icons/fileOpen.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileSave.png b/3rdparty/CGAL-4.8/demo/icons/fileSave.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_Lloyd_3/icons/fileSave.png
rename to 3rdparty/CGAL-4.8/demo/icons/fileSave.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/fit-page-32.png b/3rdparty/CGAL-4.8/demo/icons/fit-page-32.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/fit-page-32.png
rename to 3rdparty/CGAL-4.8/demo/icons/fit-page-32.png
diff --git a/3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/inputPoint.png b/3rdparty/CGAL-4.8/demo/icons/inputPoint.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Periodic_2_triangulation_2/icons/inputPoint.png
rename to 3rdparty/CGAL-4.8/demo/icons/inputPoint.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/inputPoint.svg b/3rdparty/CGAL-4.8/demo/icons/inputPoint.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/inputPoint.svg
rename to 3rdparty/CGAL-4.8/demo/icons/inputPoint.svg
diff --git a/3rdparty/CGAL-4.6/demo/icons/inputPolyline.png b/3rdparty/CGAL-4.8/demo/icons/inputPolyline.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/inputPolyline.png
rename to 3rdparty/CGAL-4.8/demo/icons/inputPolyline.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/license.txt b/3rdparty/CGAL-4.8/demo/icons/license.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/license.txt
rename to 3rdparty/CGAL-4.8/demo/icons/license.txt
diff --git a/3rdparty/CGAL-4.6/demo/icons/zoom-best-fit.png b/3rdparty/CGAL-4.8/demo/icons/zoom-best-fit.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/zoom-best-fit.png
rename to 3rdparty/CGAL-4.8/demo/icons/zoom-best-fit.png
diff --git a/3rdparty/CGAL-4.6/demo/icons/zoom-best-fit.svg b/3rdparty/CGAL-4.8/demo/icons/zoom-best-fit.svg
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/icons/zoom-best-fit.svg
rename to 3rdparty/CGAL-4.8/demo/icons/zoom-best-fit.svg
diff --git a/3rdparty/CGAL-4.6/demo/resources/CGAL.qrc b/3rdparty/CGAL-4.8/demo/resources/CGAL.qrc
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/resources/CGAL.qrc
rename to 3rdparty/CGAL-4.8/demo/resources/CGAL.qrc
diff --git a/3rdparty/CGAL-4.6/demo/resources/about_CGAL.html b/3rdparty/CGAL-4.8/demo/resources/about_CGAL.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/resources/about_CGAL.html
rename to 3rdparty/CGAL-4.8/demo/resources/about_CGAL.html
diff --git a/3rdparty/CGAL-4.6/demo/resources/cgal_logo.xpm b/3rdparty/CGAL-4.8/demo/resources/cgal_logo.xpm
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/resources/cgal_logo.xpm
rename to 3rdparty/CGAL-4.8/demo/resources/cgal_logo.xpm
diff --git a/3rdparty/CGAL-4.6/demo/resources/cgal_logo_ipe_2013.png b/3rdparty/CGAL-4.8/demo/resources/cgal_logo_ipe_2013.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/resources/cgal_logo_ipe_2013.png
rename to 3rdparty/CGAL-4.8/demo/resources/cgal_logo_ipe_2013.png
diff --git a/3rdparty/CGAL-4.6/doc_html/Manual/index.html b/3rdparty/CGAL-4.8/doc_html/Manual/index.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/doc_html/Manual/index.html
rename to 3rdparty/CGAL-4.8/doc_html/Manual/index.html
diff --git a/3rdparty/CGAL-4.6/doc_html/Manual/packages.html b/3rdparty/CGAL-4.8/doc_html/Manual/packages.html
similarity index 100%
rename from 3rdparty/CGAL-4.6/doc_html/Manual/packages.html
rename to 3rdparty/CGAL-4.8/doc_html/Manual/packages.html
diff --git a/3rdparty/CGAL-4.6/doc_html/cgal.ico b/3rdparty/CGAL-4.8/doc_html/cgal.ico
similarity index 100%
rename from 3rdparty/CGAL-4.6/doc_html/cgal.ico
rename to 3rdparty/CGAL-4.8/doc_html/cgal.ico
diff --git a/3rdparty/CGAL-4.6/doc_html/images/cgal_2013_grey.png b/3rdparty/CGAL-4.8/doc_html/images/cgal_2013_grey.png
similarity index 100%
rename from 3rdparty/CGAL-4.6/doc_html/images/cgal_2013_grey.png
rename to 3rdparty/CGAL-4.8/doc_html/images/cgal_2013_grey.png
diff --git a/3rdparty/CGAL-4.8/doc_html/index.html b/3rdparty/CGAL-4.8/doc_html/index.html
new file mode 100644
index 0000000..a791ff1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/doc_html/index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
+<html lang="en-US">
+<head>
+  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+  <link rel="shortcut icon" href="cgal.ico">
+  <TITLE>CGAL - Computational Geometry Algorithms Library</TITLE>
+  <LINK REL=stylesheet TYPE="text/css" HREF="cgal.css">	  
+</head>
+
+<body>
+
+    <CENTER>
+        <IMG SRC="images/cgal_2013_grey.png" ALT="CGAL">
+    </CENTER>
+    <CENTER>
+        <span class=subtitle>Computational Geometry Algorithms Library</span>
+    </CENTER>
+
+
+
+<p>
+The goal of the CGAL Open Source Project is to provide 
+<em>easy access to efficient and reliable geometric algorithms</em>
+in the form of a C++ library.
+</p>
+
+<h3>Manuals</h3>
+
+<ul>
+<li><a href ="Manual/index.html">CGAL Manual - Table of Contents</a>
+<li><a href ="Manual/packages.html">CGAL Manual - Package Overview</a>
+<li>You can also access the CGAL Online Manual from the
+  <a href="http://doc.cgal.org/">CGAL website</a>.
+</ul>
+
+
+
+<h3>Further Links</h3>
+
+<ul>
+<li><a href ="http://www.cgal.org/">CGAL Homepage</a>
+<li><a href ="http://www.cgal.org/FAQ.html#installation">FAQ concerning Installation</a>
+<li><a href ="http://www.boost.org/doc/">Boost Documentation</a>
+<li><a href ="http://en.cppreference.com/w/">STL Reference</a>
+</ul>
+
+
+<h3>License</h3>
+
+<p>CGAL is distributed under a dual-license scheme.  CGAL can be used together
+with Open Source software free of charge.  Using CGAL in other contexts can be
+done by obtaining a commercial license from
+<a href="http://www.geometryfactory.com">GeometryFactory</a>.
+For more details see the <a href="http://www.cgal.org/license.html">License</a> page.
+<p>
+
+</body>
+</html>
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_indexed_triangle_set_array_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_indexed_triangle_set_array_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_indexed_triangle_set_array_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_indexed_triangle_set_array_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_indexed_triangle_set_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_indexed_triangle_set_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_indexed_triangle_set_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_indexed_triangle_set_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_triangle_soup_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_triangle_soup_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_custom_triangle_soup_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_custom_triangle_soup_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_face_graph_triangle_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_face_graph_triangle_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_face_graph_triangle_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_face_graph_triangle_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_halfedge_graph_edge_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_halfedge_graph_edge_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_halfedge_graph_edge_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_halfedge_graph_edge_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_insertion_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_insertion_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_insertion_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_insertion_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_edge_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_edge_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_edge_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_edge_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_facet_distance_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_facet_distance_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_facet_distance_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_facet_distance_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_segment_3_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_segment_3_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_segment_3_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_segment_3_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/AABB_tree/AABB_triangle_3_example.cpp b/3rdparty/CGAL-4.8/examples/AABB_tree/AABB_triangle_3_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/AABB_tree/AABB_triangle_3_example.cpp
rename to 3rdparty/CGAL-4.8/examples/AABB_tree/AABB_triangle_3_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/AABB_tree/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/AABB_tree/CMakeLists.txt
new file mode 100644
index 0000000..4106721
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/AABB_tree/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( AABB_tree_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "AABB_custom_example.cpp" )
+  create_single_source_cgal_program( "AABB_custom_indexed_triangle_set_array_example.cpp" )
+  create_single_source_cgal_program( "AABB_custom_indexed_triangle_set_example.cpp" )
+  create_single_source_cgal_program( "AABB_custom_triangle_soup_example.cpp" )
+  create_single_source_cgal_program( "AABB_face_graph_triangle_example.cpp" )
+  create_single_source_cgal_program( "AABB_halfedge_graph_edge_example.cpp" )
+  create_single_source_cgal_program( "AABB_insertion_example.cpp" )
+  create_single_source_cgal_program( "AABB_polyhedron_edge_example.cpp" )
+  create_single_source_cgal_program( "AABB_polyhedron_facet_distance_example.cpp" )
+  create_single_source_cgal_program( "AABB_polyhedron_facet_intersection_example.cpp" )
+  create_single_source_cgal_program( "AABB_segment_3_example.cpp" )
+  create_single_source_cgal_program( "AABB_triangle_3_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/CMakeLists.txt
new file mode 100644
index 0000000..a06965f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Advancing_front_surface_reconstruction_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "boundaries.cpp" )
+  create_single_source_cgal_program( "reconstruction_class.cpp" )
+  create_single_source_cgal_program( "reconstruction_fct.cpp" )
+  create_single_source_cgal_program( "reconstruction_surface_mesh.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/boundaries.cpp b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/boundaries.cpp
new file mode 100644
index 0000000..7e4d85e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/boundaries.cpp
@@ -0,0 +1,81 @@
+#include <fstream>
+#include <iostream>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Advancing_front_surface_reconstruction.h>
+#include <boost/foreach.hpp>
+
+struct Perimeter {
+
+  double bound;
+
+  Perimeter(double bound)
+    : bound(bound)
+  {}
+
+  template <typename AdvancingFront, typename Cell_handle>
+  double operator() (const AdvancingFront& adv, Cell_handle& c,
+                     const int& index) const
+  {
+    // bound == 0 is better than bound < infinity
+    // as it avoids the distance computations
+    if(bound == 0){
+      return adv.smallest_radius_delaunay_sphere (c, index);
+    }
+
+    // If perimeter > bound, return infinity so that facet is not used
+    double d  = 0;
+    d = sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                              c->vertex((index+2)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d += sqrt(squared_distance(c->vertex((index+2)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d += sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+
+    // Otherwise, return usual priority value: smallest radius of
+    // delaunay sphere
+    return adv.smallest_radius_delaunay_sphere (c, index);
+  }
+};
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Advancing_front_surface_reconstruction<CGAL::Default, Perimeter> Reconstruction;
+typedef Reconstruction::Triangulation_3 Triangulation_3;
+typedef Reconstruction::Outlier_range Outlier_range;
+typedef Reconstruction::Boundary_range Boundary_range;
+typedef Reconstruction::Vertex_on_boundary_range Vertex_on_boundary_range;
+typedef Reconstruction::Vertex_handle Vertex_handle;
+typedef K::Point_3 Point_3;
+
+
+int main(int argc, char* argv[])
+{
+  std::ifstream in((argc>1)?argv[1]:"data/half.xyz");
+  std::istream_iterator<Point_3> begin(in);
+  std::istream_iterator<Point_3> end;
+
+  Perimeter perimeter(0.5);
+  Triangulation_3 dt(begin, end);
+  Reconstruction reconstruction(dt, perimeter);
+
+  reconstruction.run();
+
+  std::cout << reconstruction.number_of_outliers() << " outliers:\n" << std::endl;
+  BOOST_FOREACH(const Point_3& p, reconstruction.outliers()){
+    std::cout << p << std::endl;
+  }
+
+  std::cout << "Boundaries:" << std::endl ;
+  BOOST_FOREACH(const Vertex_on_boundary_range & vobr, reconstruction.boundaries()){
+    std::cout << "boundary\n";
+    // As we use BOOST_FOREACH we do not use the type Boundary_range
+    BOOST_FOREACH(Vertex_handle v, vobr){
+      std::cout << v->point() << std::endl;
+    }
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/data/half.xyz b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/data/half.xyz
new file mode 100644
index 0000000..22721a1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/data/half.xyz
@@ -0,0 +1,325 @@
+-7.515480024991e-007 0.4928415052762 -1.734723475977e-018
+0.1362245936528 0.2204059209894 -0.4192549456997
+-0.3566293497428 0.2204059209894 -0.2590997754675
+-0.3566293497428 0.2204059209894 0.2590997754675
+0.3566293497428 -0.2204059209894 -0.2590997754675
+-0.1362245936528 -0.2204059209894 -0.4192549456997
+-0.4408118419787 -0.2204059209894 1.734723475977e-018
+7.515480024995e-007 -0.4928415052762 8.673617379884e-019
+0.1304938471362 0.4747717502931 0
+0.2574163248409 0.4195039861274 0
+0.3648848981566 0.3296449948398 0
+0.03997961642157 0.4744285141983 -0.1241
+0.0795435898012 0.4194849174555 -0.2448222222222
+0.1127521490808 0.3296439354692 -0.347001509329
+-0.1056956186181 0.4744094455264 -0.07636388888889
+-0.2082580899232 0.4194838580848 -0.1512841049383
+-0.2951937466481 0.3296438766152 -0.2144713266892
+-0.1053014650092 0.4744083861557 0.0769075617284
+-0.2082361925005 0.4194837992309 0.1513143089849
+-0.2951925301246 0.3296438733456 0.2144730046918
+0.04027120169883 0.4740650912069 0.1239115312071
+0.07955978898327 0.4194647272893 0.2448117517337
+0.4057914855631 0.2478389397683 -0.1245861111111
+0.3382717491979 0.2583549410982 -0.245688117284
+0.2435693606629 0.2475891554198 -0.3471802540174
+0.006912096818534 0.2478388809144 -0.4244420252794
+-0.1291490501767 0.2583549378286 -0.3976273347377
+-0.2549567859204 0.2475891519685 -0.3389332464941
+-0.4015346164662 0.2478388776447 -0.1377400612309
+-0.4180935898037 0.2583549376469 -6.055895727388e-005
+-0.4011314149817 0.2475891517768 0.1377367900668
+-0.2550845488815 0.2478388774631 0.3393151544533
+0.4715474070857 0.1170580478199 -0.07682700617284
+0.468102633727 4.489154554834e-005 -0.152037611454
+0.4266601101928 -0.1173339460802 -0.214804854829
+0.07264926058174 0.1170580445502 -0.4721859428322
+4.440336565236e-005 4.489136390043e-005 -0.4921631079351
+-0.07245809390484 -0.1173339460903 -0.472134336313
+-0.4266507759005 0.1170580443686 -0.2150022131499
+-0.4680750431056 4.489135380887e-005 -0.152122345175
+-0.4714381602825 -0.1173339460909 -0.07699290806528
+-0.3363035499236 0.1170580443585 0.3393230516623
+0.2188162897165 0.1170890622755 -0.4242178412527
+0.289253682762 4.661457086236e-005 -0.398159324514
+0.3356412857054 -0.1173940695833 -0.3392729974895
+-0.3358187173091 0.1170890620737 -0.3391936241729
+-0.2892982620727 4.661455964952e-005 -0.3981274235652
+-0.2189461638684 -0.1173940695844 -0.4240731503099
+-0.426378573036 0.1170890620625 0.2145810898443
+-0.4680599207242 4.661455902659e-005 0.1520989494358
+-0.4709811068325 -0.1173940695845 0.0771753356317
+0.2549872575249 -0.248327777254 -0.3390290429421
+0.1292592643069 -0.2583820987363 -0.397573835719
+-0.007139690180596 -0.2480762203231 -0.4237896176518
+-0.2436511531956 -0.2483277772541 -0.3472376720005
+-0.3381861751775 -0.2583820987363 -0.2457770928889
+-0.4052408987466 -0.2480762203231 -0.1241677778308
+-0.4055440527117 -0.2483277772541 0.1244125186462
+0.4180767837242 -0.2583820987363 6.030299350821e-005
+0.4008425690922 -0.2480762203225 -0.1377552404057
+0.1055711528638 -0.4747717502931 -0.07668888888889
+0.2082511751591 -0.4195039861274 -0.1513021604938
+0.2946533528622 -0.3291285502607 -0.2140964566283
+-0.04059822753268 -0.4744285141983 -0.123899382716
+-0.07957795708515 -0.4194849174555 -0.2448110768176
+-0.112563799673 -0.3291274908901 -0.3463718506761
+-0.1304037486658 -0.4744094455264 0.0003361454046639
+-0.2574113193703 -0.4194838580848 1.867474470355e-005
+-0.3642282284893 -0.3291274320362 1.463419778445e-005
+0.1782518543444 0.4386105093375 -0.1295317901235
+0.3040759062279 0.3614751872873 -0.1300503343621
+0.2173702560731 0.3609754803371 -0.2488374570743
+-0.06812086123992 0.4385892630703 -0.2095400120027
+-0.02971955976201 0.3614728852632 -0.3293601724206
+-0.1695110052039 0.3609741096017 -0.2836120109602
+-0.2203384092251 0.4385880827221 3.18820492303e-005
+-0.3224176917815 0.361472757373 -0.0735013427648
+-0.3221005460232 0.3609740334497 0.07355522689281
+-0.06808064815709 0.4385678891046 0.2095608418697
+-0.1695585311816 0.3614716320434 0.283930724489
+-0.02957205890907 0.3609717273766 0.3290751147583
+0.1782689534811 0.4385891974954 0.1295207379412
+0.4669085084433 -0.1267977790161 -0.07361031177914
+0.1516674242459 -0.00115896595775 -0.4667736786963
+0.214419939697 -0.1268536831645 -0.4218421599645
+0.07426629152944 -0.1267977790504 -0.4668042631267
+-0.3970412665771 -0.001158965980238 -0.2884886447813
+-0.3349540567162 -0.1268536831664 -0.3342668879748
+-0.4209964222559 -0.1267977790524 -0.2148786475953
+-0.4214192677113 -0.1268536831665 0.2152714897852
+0.3970309840215 0.001136860580719 -0.2884791549048
+0.3349440036867 0.1267981463303 -0.3342680384429
+0.421038236849 0.1267684348413 -0.2148825577428
+-0.1516615620267 0.001136860569378 -0.4667610010068
+-0.2144241320836 0.1267981459444 -0.4218329238876
+-0.07425716575118 0.1267684311762 -0.4668451297599
+-0.4907752350525 0.001136860568748 8.83510151191e-006
+-0.4674743740888 0.126798145923 0.07354806141617
+-0.4669446463565 0.1267684309725 -0.07363157122197
+0.06807728574472 -0.4386105093375 -0.2095473060509
+0.02971917239516 -0.3614600687079 -0.3292857603842
+0.1694859726663 -0.3609896105791 -0.2835908090121
+-0.1782828473697 -0.4385892630703 -0.1295003132991
+-0.3040055260641 -0.3614588262362 -0.1300284375042
+-0.2173593032536 -0.3609872429801 -0.2488070246215
+-0.1782462772615 -0.4385880827221 0.1295525974779
+-0.3038167909279 -0.3609871114469 0.1298222044149
+0.2203380200369 -0.4385891974954 -7.233207945732e-006
+0.3223478833819 -0.3614600029412 -0.07347782154124
+0.05962333333333 0.4873 -0.04331666666667
+0.1934666666667 0.4511666666667 -0.04381666666667
+0.1199233333333 0.4697 -0.08713333333333
+0.1014566666667 0.4511666666667 -0.1704666666667
+0.3136333333333 0.3776166666667 -0.04411666666667
+0.2509 0.41425 -0.08793333333333
+0.2370666666667 0.3958666666667 -0.1722333333333
+0.1611666666667 0.41425 -0.21145
+0.1388833333333 0.3776166666667 -0.2846333333333
+0.4092 0.27125 -0.04331666666667
+0.3631166666667 0.3201166666667 -0.08743333333333
+0.3547833333333 0.2953 -0.1707666666667
+0.2914666666667 0.3344166666667 -0.21175
+0.27205 0.2953 -0.2846333333333
+0.1953666666667 0.3201166666667 -0.3183
+0.16765 0.27125 -0.3757833333333
+-0.02277666666667 0.4873 -0.07008333333333
+0.01812333333333 0.4511666666667 -0.1975333333333
+-0.04581 0.4697 -0.1409666666667
+-0.1307666666667 0.4511666666667 -0.14915
+0.05496833333333 0.3776166666667 -0.3119
+-0.006081666666667 0.41425 -0.2657833333333
+-0.09054833333333 0.3958666666667 -0.2786666666667
+-0.1513 0.41425 -0.2186
+-0.2278 0.3776166666667 -0.2200333333333
+0.08525516666667 0.27125 -0.4025666666667
+0.02905683333333 0.3201166666667 -0.37235
+-0.0527765 0.2953 -0.3901833333333
+-0.1113316666667 0.3344166666667 -0.3426166666667
+-0.1866666666667 0.2953 -0.3466833333333
+-0.2423833333333 0.3201166666667 -0.2841666666667
+-0.3056 0.27125 -0.2755666666667
+-0.0737 0.4873 0
+-0.1822666666667 0.4511666666667 -0.07826666666667
+-0.1482333333333 0.4697 0
+-0.1822666666667 0.4511666666667 0.07826666666667
+-0.27965 0.3776166666667 -0.14865
+-0.25465 0.41425 -0.07633333333333
+-0.293 0.3958666666667 0
+-0.25465 0.41425 0.07633333333333
+-0.27965 0.3776166666667 0.14865
+-0.3565166666667 0.27125 -0.2054833333333
+-0.34515 0.3201166666667 -0.1427
+-0.3874 0.2953 -0.07038333333333
+-0.36025 0.3344166666667 0
+-0.3874 0.2953 0.07038333333333
+-0.34515 0.3201166666667 0.1427
+-0.3565166666667 0.27125 0.2054833333333
+-0.02277666666667 0.4873 0.07008333333333
+-0.1307666666667 0.4511666666667 0.14915
+-0.04581 0.4697 0.1409666666667
+0.01812333333333 0.4511666666667 0.1975333333333
+-0.2278 0.3776166666667 0.2200333333333
+-0.1513 0.41425 0.2186
+-0.09054833333333 0.3958666666667 0.2786666666667
+-0.006081666666667 0.41425 0.2657833333333
+0.05496833333333 0.3776166666667 0.3119
+-0.3056 0.27125 0.2755666666667
+-0.2423833333333 0.3201166666667 0.2841666666667
+-0.1866666666667 0.2953 0.3466833333333
+-0.1113316666667 0.3344166666667 0.3426166666667
+0.05962333333333 0.4873 0.04331666666667
+0.1014566666667 0.4511666666667 0.1704666666667
+0.1199233333333 0.4697 0.08713333333333
+0.1934666666667 0.4511666666667 0.04381666666667
+0.2509 0.41425 0.08793333333333
+0.3136333333333 0.3776166666667 0.04411666666667
+0.4850666666667 0.03875 -0.07826666666667
+0.4844166666667 -0.04251666666667 -0.07633333333333
+0.4628333333333 -0.08126666666667 -0.14865
+0.46025 -0.17265 0
+0.4374 -0.2144166666667 -0.07038333333333
+0.4407 -0.16555 -0.1427
+0.4020666666667 -0.1975666666667 -0.2054833333333
+0.1448833333333 0.1520333333333 -0.4458833333333
+0.2243333333333 0.03875 -0.4371333333333
+0.1503166666667 0.0775 -0.4626166666667
+0.07545 0.03875 -0.4855
+0.2844 -0.08126666666667 -0.3942166666667
+0.2223 -0.04251666666667 -0.4371
+0.1499166666667 -0.08503333333333 -0.4613833333333
+0.07708333333333 -0.04251666666667 -0.4843
+0.001633333333333 -0.08126666666667 -0.4861
+0.3196666666667 -0.1975666666667 -0.3188833333333
+0.2719 -0.16555 -0.3750166666667
+0.2021166666667 -0.2144166666667 -0.3942166666667
+0.1422333333333 -0.17265 -0.4377
+0.06822816666667 -0.2144166666667 -0.4377333333333
+0.0004615 -0.16555 -0.4632166666667
+-0.0711885 -0.1975666666667 -0.4458833333333
+-0.3792833333333 0.1520333333333 -0.2755666666667
+-0.3464 0.03875 -0.3484333333333
+-0.3935166666667 0.0775 -0.2859166666667
+-0.4384333333333 0.03875 -0.2217833333333
+-0.28705 -0.08126666666667 -0.3923
+-0.3470166666667 -0.04251666666667 -0.3464833333333
+-0.3924666666667 -0.08503333333333 -0.28515
+-0.4367666666667 -0.04251666666667 -0.2229666666667
+-0.4618166666667 -0.08126666666667 -0.1517666666667
+-0.2045 -0.1975666666667 -0.4025666666667
+-0.27265 -0.16555 -0.3744666666667
+-0.3124833333333 -0.2144166666667 -0.3140166666667
+-0.3723333333333 -0.17265 -0.2705166666667
+-0.3952166666667 -0.2144166666667 -0.20015
+-0.4404 -0.16555 -0.1435833333333
+-0.44605 -0.1975666666667 -0.07008333333333
+-0.3792833333333 0.1520333333333 0.2755666666667
+-0.4384333333333 0.03875 0.2217833333333
+-0.3935166666667 0.0775 0.2859166666667
+-0.4618166666667 -0.08126666666667 0.1517666666667
+-0.4367666666667 -0.04251666666667 0.2229666666667
+-0.44605 -0.1975666666667 0.07008333333333
+-0.4404 -0.16555 0.1435833333333
+-0.3952166666667 -0.2144166666667 0.20015
+0.3792833333333 -0.1520333333333 -0.2755666666667
+0.3464 -0.03875 -0.3484333333333
+0.3935166666667 -0.0775 -0.2859166666667
+0.4384333333333 -0.03875 -0.2217833333333
+0.28705 0.08126666666667 -0.3923
+0.3470166666667 0.04251666666667 -0.3464833333333
+0.3924666666667 0.08503333333333 -0.28515
+0.4367666666667 0.04251666666667 -0.2229666666667
+0.4618166666667 0.08126666666667 -0.1517666666667
+0.2045 0.1975666666667 -0.4025666666667
+0.27265 0.16555 -0.3744666666667
+0.3124833333333 0.2144166666667 -0.3140166666667
+0.3723333333333 0.17265 -0.2705166666667
+0.3952166666667 0.2144166666667 -0.20015
+0.4404 0.16555 -0.1435833333333
+0.44605 0.1975666666667 -0.07008333333333
+-0.1448833333333 -0.1520333333333 -0.4458833333333
+-0.2243333333333 -0.03875 -0.4371333333333
+-0.1503166666667 -0.0775 -0.4626166666667
+-0.07545 -0.03875 -0.4855
+-0.2844 0.08126666666667 -0.3942166666667
+-0.2223 0.04251666666667 -0.4371
+-0.1499166666667 0.08503333333333 -0.4613833333333
+-0.07708333333333 0.04251666666667 -0.4843
+-0.001633333333333 0.08126666666667 -0.4861
+-0.3196666666667 0.1975666666667 -0.3188833333333
+-0.2719 0.16555 -0.3750166666667
+-0.2021166666667 0.2144166666667 -0.3942166666667
+-0.1422333333333 0.17265 -0.4377
+-0.06822816666667 0.2144166666667 -0.4377333333333
+-0.0004615 0.16555 -0.4632166666667
+0.0711885 0.1975666666667 -0.4458833333333
+-0.4688333333333 -0.1520333333333 0
+-0.4850666666667 -0.03875 0.07826666666667
+-0.4864333333333 -0.0775 0
+-0.4850666666667 -0.03875 -0.07826666666667
+-0.4628333333333 0.08126666666667 0.14865
+-0.4844166666667 0.04251666666667 0.07633333333333
+-0.4851333333333 0.08503333333333 0
+-0.4844166666667 0.04251666666667 -0.07633333333333
+-0.4628333333333 0.08126666666667 -0.14865
+-0.4020666666667 0.1975666666667 0.2054833333333
+-0.4407 0.16555 0.1427
+-0.4374 0.2144166666667 0.07038333333333
+-0.46025 0.17265 0
+-0.4374 0.2144166666667 -0.07038333333333
+-0.4407 0.16555 -0.1427
+-0.4020666666667 0.1975666666667 -0.2054833333333
+-0.2719 0.16555 0.3750166666667
+-0.3196666666667 0.1975666666667 0.3188833333333
+0.02277666666667 -0.4873 -0.07008333333333
+-0.01812333333333 -0.4511666666667 -0.1975333333333
+0.04581 -0.4697 -0.1409666666667
+0.1307666666667 -0.4511666666667 -0.14915
+-0.05496833333333 -0.3776166666667 -0.3119
+0.006081666666667 -0.41425 -0.2657833333333
+0.09054833333333 -0.3958666666667 -0.2786666666667
+0.1513 -0.41425 -0.2186
+0.2278 -0.3776166666667 -0.2200333333333
+-0.08525516666667 -0.27125 -0.4025666666667
+-0.02905683333333 -0.3201166666667 -0.37235
+0.0527765 -0.2953 -0.3901833333333
+0.1113316666667 -0.3344166666667 -0.3426166666667
+0.1866666666667 -0.2953 -0.3466833333333
+0.2423833333333 -0.3201166666667 -0.2841666666667
+0.3056 -0.27125 -0.2755666666667
+-0.05962333333333 -0.4873 -0.04331666666667
+-0.1934666666667 -0.4511666666667 -0.04381666666667
+-0.1199233333333 -0.4697 -0.08713333333333
+-0.1014566666667 -0.4511666666667 -0.1704666666667
+-0.3136333333333 -0.3776166666667 -0.04411666666667
+-0.2509 -0.41425 -0.08793333333333
+-0.2370666666667 -0.3958666666667 -0.1722333333333
+-0.1611666666667 -0.41425 -0.21145
+-0.1388833333333 -0.3776166666667 -0.2846333333333
+-0.4092 -0.27125 -0.04331666666667
+-0.3631166666667 -0.3201166666667 -0.08743333333333
+-0.3547833333333 -0.2953 -0.1707666666667
+-0.2914666666667 -0.3344166666667 -0.21175
+-0.27205 -0.2953 -0.2846333333333
+-0.1953666666667 -0.3201166666667 -0.3183
+-0.16765 -0.27125 -0.3757833333333
+-0.05962333333333 -0.4873 0.04331666666667
+-0.1199233333333 -0.4697 0.08713333333333
+-0.1934666666667 -0.4511666666667 0.04381666666667
+-0.2370666666667 -0.3958666666667 0.1722333333333
+-0.2509 -0.41425 0.08793333333333
+-0.3136333333333 -0.3776166666667 0.04411666666667
+-0.3547833333333 -0.2953 0.1707666666667
+-0.3631166666667 -0.3201166666667 0.08743333333333
+-0.4092 -0.27125 0.04331666666667
+0.02277666666667 -0.4873 0.07008333333333
+0.0737 -0.4873 0
+0.1822666666667 -0.4511666666667 -0.07826666666667
+0.1482333333333 -0.4697 0
+0.27965 -0.3776166666667 -0.14865
+0.25465 -0.41425 -0.07633333333333
+0.293 -0.3958666666667 0
+0.3565166666667 -0.27125 -0.2054833333333
+0.34515 -0.3201166666667 -0.1427
+0.3874 -0.2953 -0.07038333333333
+0.36025 -0.3344166666667 0
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_class.cpp b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_class.cpp
new file mode 100644
index 0000000..dc85210
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_class.cpp
@@ -0,0 +1,56 @@
+#include <iostream>
+#include <fstream>
+#include <algorithm>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Advancing_front_surface_reconstruction.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Advancing_front_surface_reconstruction<> Reconstruction;
+typedef Reconstruction::Triangulation_3 Triangulation_3;
+typedef Reconstruction::Triangulation_data_structure_2 TDS_2;
+typedef K::Point_3 Point_3;
+typedef K::Vector_3 Vector_3;
+
+int main(int argc, char* argv[])
+{
+  std::ifstream in((argc>1)?argv[1]:"data/half.xyz");
+  std::istream_iterator<Point_3> begin(in);
+  std::istream_iterator<Point_3> end;
+
+  Triangulation_3 dt(begin,end);
+
+  Reconstruction reconstruction(dt);
+
+  reconstruction.run();
+
+  const TDS_2& tds = reconstruction.triangulation_data_structure_2();
+
+  std::cout << "solid produced with CGAL::Advancing_front_surface_reconstruction\n";
+  for(TDS_2::Face_iterator fit = tds.faces_begin();
+      fit != tds.faces_end();
+      ++fit){
+    if(reconstruction.has_on_surface(fit)){
+      Triangulation_3::Facet f = fit->facet();
+      Triangulation_3::Cell_handle ch = f.first;
+      int ci = f.second;
+      Point_3 points[3];
+      for(int i = 0, j = 0; i < 4; i++){
+        if(ci != i){
+          points[j] = ch->vertex(i)->point();
+          j++;
+        }
+      }
+      std::cout << "  facet normal "
+                << CGAL::unit_normal(points[0],points[1], points[2]) << "\n"
+                << "  outer loop\n"
+                << "    vertex " << points[0]  << "\n"
+                << "    vertex " << points[1]  << "\n"
+                << "    vertex " << points[2]  << "\n"
+                << "  endloop\n"
+                << "  endfacet\n";
+    }
+  }
+    std::cout << "endsolid" << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp
new file mode 100644
index 0000000..b9f31a3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp
@@ -0,0 +1,85 @@
+#include <iostream>
+#include <fstream>
+#include <algorithm>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Advancing_front_surface_reconstruction.h>
+#include <CGAL/tuple.h>
+#include <boost/lexical_cast.hpp>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef K::Point_3  Point_3;
+
+typedef CGAL::cpp11::array<std::size_t,3> Facet;
+
+namespace std {
+  std::ostream&
+  operator<<(std::ostream& os, const Facet& f)
+  {
+    os << "3 " << f[0] << " " << f[1] << " " << f[2];
+    return os;
+  }
+}
+
+struct Perimeter {
+
+  double bound;
+
+  Perimeter(double bound)
+    : bound(bound)
+  {}
+
+  template <typename AdvancingFront, typename Cell_handle>
+  double operator() (const AdvancingFront& adv, Cell_handle& c,
+                     const int& index) const
+  {
+    // bound == 0 is better than bound < infinity
+    // as it avoids the distance computations
+    if(bound == 0){
+      return adv.smallest_radius_delaunay_sphere (c, index);
+    }
+
+    // If perimeter > bound, return infinity so that facet is not used
+    double d  = 0;
+    d = sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                              c->vertex((index+2)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d += sqrt(squared_distance(c->vertex((index+2)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+    d += sqrt(squared_distance(c->vertex((index+1)%4)->point(),
+                               c->vertex((index+3)%4)->point()));
+    if(d>bound) return adv.infinity();
+
+    // Otherwise, return usual priority value: smallest radius of
+    // delaunay sphere
+    return adv.smallest_radius_delaunay_sphere (c, index);
+  }
+};
+
+int main(int argc, char* argv[])
+{
+  std::ifstream in((argc>1)?argv[1]:"data/half.xyz");
+  double per = (argc>2)?boost::lexical_cast<double>(argv[2]):0;
+  std::vector<Point_3> points;
+  std::vector<Facet> facets;
+
+  std::copy(std::istream_iterator<Point_3>(in),
+            std::istream_iterator<Point_3>(),
+            std::back_inserter(points));
+
+  Perimeter perimeter(per);
+  CGAL::advancing_front_surface_reconstruction(points.begin(),
+                                               points.end(),
+                                               std::back_inserter(facets),
+                                               perimeter);
+
+  std::cout << "OFF\n" << points.size() << " " << facets.size() << " 0\n";
+  std::copy(points.begin(),
+            points.end(),
+            std::ostream_iterator<Point_3>(std::cout, "\n"));
+  std::copy(facets.begin(),
+            facets.end(),
+            std::ostream_iterator<Facet>(std::cout, "\n"));
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp
new file mode 100644
index 0000000..225eef0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp
@@ -0,0 +1,71 @@
+#include <iostream>
+#include <fstream>
+#include <algorithm>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Advancing_front_surface_reconstruction.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/array.h>
+
+typedef CGAL::cpp11::array<std::size_t,3> Facet;
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3  Point_3;
+
+typedef CGAL::Surface_mesh<Point_3> Mesh;
+
+struct Construct{
+  Mesh& mesh;
+
+  template < typename PointIterator>
+  Construct(Mesh& mesh,PointIterator b, PointIterator e)
+    : mesh(mesh)
+  {
+    for(; b!=e; ++b){
+      boost::graph_traits<Mesh>::vertex_descriptor v;
+      v = add_vertex(mesh);
+      mesh.point(v) = *b;
+    }
+  }
+
+  Construct& operator=(const Facet f)
+  {
+    typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+    typedef boost::graph_traits<Mesh>::vertices_size_type size_type;
+    mesh.add_face(vertex_descriptor(static_cast<size_type>(f[0])),
+                  vertex_descriptor(static_cast<size_type>(f[1])),
+                  vertex_descriptor(static_cast<size_type>(f[2])));
+    return *this;
+  }
+
+  Construct&
+  operator*() { return *this; }
+
+  Construct&
+  operator++() { return *this; }
+
+  Construct
+  operator++(int) { return *this; }
+
+};
+
+int main(int argc, char* argv[])
+{
+  std::ifstream in((argc>1)?argv[1]:"data/half.xyz");
+  std::vector<Point_3> points;
+  std::vector<Facet> facets;
+  Mesh m;
+
+  std::copy(std::istream_iterator<Point_3>(in),
+            std::istream_iterator<Point_3>(),
+            std::back_inserter(points));
+
+  Construct construct(m,points.begin(),points.end());
+
+  CGAL::advancing_front_surface_reconstruction(points.begin(),
+                                               points.end(),
+                                               construct);
+
+  std::cout << m  << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Algebraic_foundations/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/CMakeLists.txt
new file mode 100644
index 0000000..6ca9c39
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Algebraic_foundations_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "algebraic_structure_dispatch.cpp" )
+  create_single_source_cgal_program( "fraction_traits.cpp" )
+  create_single_source_cgal_program( "implicit_interoperable_dispatch.cpp" )
+  create_single_source_cgal_program( "integralize.cpp" )
+  create_single_source_cgal_program( "interoperable.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/algebraic_structure_dispatch.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/algebraic_structure_dispatch.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_foundations/algebraic_structure_dispatch.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_foundations/algebraic_structure_dispatch.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/fraction_traits.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/fraction_traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_foundations/fraction_traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_foundations/fraction_traits.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/implicit_interoperable_dispatch.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/implicit_interoperable_dispatch.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_foundations/implicit_interoperable_dispatch.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_foundations/implicit_interoperable_dispatch.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/integralize.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/integralize.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_foundations/integralize.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_foundations/integralize.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_foundations/interoperable.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_foundations/interoperable.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_foundations/interoperable.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_foundations/interoperable.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/CMakeLists.txt
new file mode 100644
index 0000000..9313329
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Algebraic_kernel_d_test )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core MPFI)
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+  include( CGAL_VersionUtils )
+
+  include_directories (BEFORE ../../include)
+
+  create_single_source_cgal_program( "Compare_1.cpp" )
+  create_single_source_cgal_program( "Construct_algebraic_real_1.cpp" )
+  create_single_source_cgal_program( "Isolate_1.cpp" )
+  create_single_source_cgal_program( "Sign_at_1.cpp" )
+  create_single_source_cgal_program( "Solve_1.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Compare_1.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Compare_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Compare_1.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Compare_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Construct_algebraic_real_1.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Construct_algebraic_real_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Construct_algebraic_real_1.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Construct_algebraic_real_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Isolate_1.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Isolate_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Isolate_1.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Isolate_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Sign_at_1.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Sign_at_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Sign_at_1.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Sign_at_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Solve_1.cpp b/3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Solve_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Algebraic_kernel_d/Solve_1.cpp
rename to 3rdparty/CGAL-4.8/examples/Algebraic_kernel_d/Solve_1.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/CMakeLists.txt
new file mode 100644
index 0000000..6b465b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Alpha_shapes_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "ex_alpha_shapes_2.cpp" )
+  create_single_source_cgal_program( "ex_weighted_alpha_shapes_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/README b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_2/README
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_2/README
diff --git a/3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fin b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/data/fin
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Alpha_shapes_2/data/fin
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_2/data/fin
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp
new file mode 100644
index 0000000..0162ccc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp
@@ -0,0 +1,99 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Weighted_point.h>
+#include <CGAL/Weighted_alpha_shape_euclidean_traits_2.h>
+#include <CGAL/Regular_triangulation_2.h>
+#include <CGAL/Alpha_shape_2.h>
+
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <list>
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::FT FT;
+typedef K::Point_2 Point_base;
+typedef CGAL::Weighted_point<Point_base,FT>  Point;
+
+typedef CGAL::Weighted_alpha_shape_euclidean_traits_2<K> Gt;
+typedef CGAL::Regular_triangulation_vertex_base_2<Gt> Rvb;
+typedef CGAL::Alpha_shape_vertex_base_2<Gt,Rvb> Vb;
+typedef CGAL::Regular_triangulation_face_base_2<Gt> Rf;
+typedef CGAL::Alpha_shape_face_base_2<Gt, Rf>  Fb;
+
+typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
+typedef CGAL::Regular_triangulation_2<Gt,Tds> Triangulation_2;
+
+typedef CGAL::Alpha_shape_2<Triangulation_2>  Alpha_shape_2;
+
+typedef Alpha_shape_2::Alpha_shape_edges_iterator Alpha_shape_edges_iterator;
+
+template <class InputIterator, class OutputIterator>
+void
+alpha_edges(InputIterator begin, InputIterator end,
+	    const FT &Alpha,
+	    bool mode,
+	    OutputIterator out)
+  // Generate Alpha Shape
+{
+  std::vector<Gt::Segment_2> V_seg;
+  Alpha_shape_2 A(begin,end);
+
+  if (mode)
+    { A.set_mode(Alpha_shape_2::GENERAL); }
+  else
+    { A.set_mode(Alpha_shape_2::REGULARIZED); };
+  A.set_alpha(Alpha);
+
+  for(Alpha_shape_edges_iterator it =  A.alpha_shape_edges_begin();
+      it != A.alpha_shape_edges_end();
+      ++it){
+    *out++ = A.segment(*it);
+  }
+}
+
+bool
+file_input(std::list<Point>& L)
+{
+
+  std::ifstream is("./data/fin", std::ios::in);
+
+  if(is.fail())
+    {
+      std::cerr << "unable to open file for input" << std::endl;
+      return false;
+    }
+
+  CGAL::set_ascii_mode(is);
+
+  int n;
+  is >> n;
+  std::cout << "Reading " << n << " points" << std::endl;
+  for( ; n>0 ; n--)
+    {
+      Point_base p(0., 0.);
+      is >> p;
+      if(is) {
+        L.push_back(Point (p, FT(10)));
+      } else {
+        return false;
+      }
+    }
+  std::cout << "Points inserted" << std::endl;
+  return true;
+}
+
+
+// Reads a list of points and returns a list of segments corresponding to
+// the weighted Alpha Shape.
+int main()
+{
+  std::list<Point> points;
+  file_input(points);
+  std::vector<Gt::Segment_2> segments;
+  alpha_edges(points.begin(), points.end(),
+	      FT(10000),Alpha_shape_2::GENERAL,
+	      std::back_inserter(segments));
+  std::cout << segments.size() << " alpha shape edges." << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/CMakeLists.txt
new file mode 100644
index 0000000..35aec41
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Alpha_shapes_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "ex_alpha_shapes_3.cpp" )
+  create_single_source_cgal_program( "ex_alpha_shapes_exact_alpha.cpp" )
+  create_single_source_cgal_program( "ex_alpha_shapes_with_fast_location_3.cpp" )
+  create_single_source_cgal_program( "ex_fixed_weighted_alpha_shapes_3.cpp" )
+  create_single_source_cgal_program( "ex_periodic_alpha_shapes_3.cpp" )
+  create_single_source_cgal_program( "ex_weighted_alpha_shapes_3.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/README b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/README
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/README
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/bunny_1000 b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/bunny_1000
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/bunny_1000
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/bunny_1000
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/bunny_5000 b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/bunny_5000
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/bunny_5000
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/bunny_5000
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/fin b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/fin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/data/fin
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/data/fin
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp
new file mode 100644
index 0000000..9f795ed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp
@@ -0,0 +1,64 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+#include <CGAL/Alpha_shape_3.h>
+
+#include <CGAL/Random.h>
+#include <CGAL/point_generators_3.h>
+
+// Traits
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<K> PK;
+
+// Vertex type
+typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> DsVb;
+typedef CGAL::Triangulation_vertex_base_3<PK,DsVb> Vb;
+typedef CGAL::Alpha_shape_vertex_base_3<PK,Vb> AsVb;
+// Cell type
+typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> DsCb;
+typedef CGAL::Triangulation_cell_base_3<PK,DsCb> Cb;
+typedef CGAL::Alpha_shape_cell_base_3<PK,Cb> AsCb;
+
+typedef CGAL::Triangulation_data_structure_3<AsVb,AsCb> Tds;
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<PK,Tds> P3DT3;
+typedef CGAL::Alpha_shape_3<P3DT3>  Alpha_shape_3;
+
+typedef PK::Point_3                                 Point;
+
+int main()
+{
+  typedef CGAL::Creator_uniform_3<double, Point> Creator;
+  CGAL::Random random(7);
+  CGAL::Random_points_in_cube_3<Point, Creator> in_cube(1, random);
+  std::vector<Point> pts;
+
+  // Generating 1000 random points
+  for (int i=0 ; i < 1000 ; i++) {
+    Point p = *in_cube++;
+    pts.push_back(p);
+  }
+
+  // Define the periodic cube
+  P3DT3 pdt(PK::Iso_cuboid_3(-1,-1,-1,1,1,1));
+  // Heuristic for inserting large point sets (if pts is reasonably large)
+  pdt.insert(pts.begin(), pts.end(), true);
+  // As pdt won't be modified anymore switch to 1-sheeted cover if possible
+  if (pdt.is_triangulation_in_1_sheet()) pdt.convert_to_1_sheeted_covering();
+  std::cout << "Periodic Delaunay computed." << std::endl;
+
+  // compute alpha shape
+  Alpha_shape_3 as(pdt);
+  std::cout << "Alpha shape computed in REGULARIZED mode by default."
+	    << std::endl;
+
+   // find optimal alpha values
+  Alpha_shape_3::NT alpha_solid = as.find_alpha_solid();
+  Alpha_shape_3::Alpha_iterator opt = as.find_optimal_alpha(1);
+  std::cout << "Smallest alpha value to get a solid through data points is "
+	    << alpha_solid << std::endl;
+  std::cout << "Optimal alpha value to get one connected component is "
+	    <<  *opt    << std::endl;
+  as.set_alpha(*opt);
+  assert(as.number_of_solid_components() == 1);
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp b/3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/CMakeLists.txt
new file mode 100644
index 0000000..9f97c4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Apollonius_graph_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "ag2_exact_traits.cpp" )
+  create_single_source_cgal_program( "ag2_exact_traits_sqrt.cpp" )
+  create_single_source_cgal_program( "ag2_filtered_traits_no_hidden.cpp" )
+  create_single_source_cgal_program( "ag2_hierarchy.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/README b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/README
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/README
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_exact_traits.cpp b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_exact_traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_exact_traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_exact_traits.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp
new file mode 100644
index 0000000..f26e8f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp
@@ -0,0 +1,76 @@
+#include <CGAL/basic.h>
+
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+#if defined CGAL_USE_LEDA
+#  include <CGAL/leda_real.h>
+#elif defined CGAL_USE_CORE
+#  include <CGAL/CORE_Expr.h>
+#endif
+
+// *** WARNING ***
+// The use of a kernel based on an exact number type is highly inefficient.
+// It is used in this example primarily for illustration purposes.
+// In an efficiency critical context, and/or for the purposes of
+// benchmarking the Apollonius_graph_filtered_traits_2<> class should
+// be used.
+
+#if defined CGAL_USE_LEDA
+// If LEDA is present use leda_real as the exact number type
+typedef leda_real NT;
+
+#elif defined CGAL_USE_CORE
+// Otherwise if CORE is present use CORE's Expr as the exact number type
+typedef CORE::Expr NT;
+
+#else
+
+// Otherwise just use double. This may cause numerical errors but it
+// is still worth doing it to show how to define correctly the traits
+// class
+typedef double NT;
+
+#endif
+
+
+#include <CGAL/Simple_cartesian.h>
+
+typedef CGAL::Simple_cartesian<NT>  Kernel;
+
+
+// typedefs for the traits and the algorithm
+
+#include <CGAL/Apollonius_graph_2.h>
+#include <CGAL/Apollonius_graph_traits_2.h>
+
+// the traits class is now going to assume that the operations
+// +,-,*,/ and sqrt are supported exactly
+typedef
+CGAL::Apollonius_graph_traits_2<Kernel,CGAL::Field_with_sqrt_tag> Traits;
+
+typedef CGAL::Apollonius_graph_2<Traits> Apollonius_graph;
+
+
+
+int main()
+{
+  std::ifstream ifs("data/sites.cin");
+  assert( ifs );
+
+  Apollonius_graph ag;
+  Apollonius_graph::Site_2 site;
+
+  // read the sites and insert them in the Apollonius graph
+  while ( ifs >> site ) {
+    ag.insert(site);
+  }
+
+  // validate the Apollonius graph
+  assert( ag.is_valid(true, 1) );
+  std::cout << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_filtered_traits_no_hidden.cpp b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_filtered_traits_no_hidden.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_filtered_traits_no_hidden.cpp
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_filtered_traits_no_hidden.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_hierarchy.cpp b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_hierarchy.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/ag2_hierarchy.cpp
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/ag2_hierarchy.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/data/hierarchy.cin b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/data/hierarchy.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/data/hierarchy.cin
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/data/hierarchy.cin
diff --git a/3rdparty/CGAL-4.6/examples/Apollonius_graph_2/data/sites.cin b/3rdparty/CGAL-4.8/examples/Apollonius_graph_2/data/sites.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Apollonius_graph_2/data/sites.cin
rename to 3rdparty/CGAL-4.8/examples/Apollonius_graph_2/data/sites.cin
diff --git a/3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/CMakeLists.txt
new file mode 100644
index 0000000..df14e3d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Approximate_min_ellipsoid_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "ellipsoid.cpp" )
+  create_single_source_cgal_program( "ellipsoid_for_maple.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/ellipsoid.cpp b/3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/ellipsoid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/ellipsoid.cpp
rename to 3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/ellipsoid.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/ellipsoid_for_maple.cpp b/3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/ellipsoid_for_maple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Approximate_min_ellipsoid_d/ellipsoid_for_maple.cpp
rename to 3rdparty/CGAL-4.8/examples/Approximate_min_ellipsoid_d/ellipsoid_for_maple.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Bezier.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Bezier.dat
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier.dat
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Bezier_curves.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier_curves.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Bezier_curves.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier_curves.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier_polycurve.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier_polycurve.dat
new file mode 100644
index 0000000..dc66d70
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Bezier_polycurve.dat
@@ -0,0 +1,3 @@
+2
+5 0 0 100 10 200 20 300 30 400 40
+4 400 40 500 0 600 100 700 200
\ No newline at end of file
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/CMakeLists.txt
new file mode 100644
index 0000000..1ae57dc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/CMakeLists.txt
@@ -0,0 +1,78 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Arrangement_on_surface_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Bezier_curves.cpp" )
+  create_single_source_cgal_program( "aggregated_insertion.cpp" )
+  create_single_source_cgal_program( "algebraic_curves.cpp" )
+  create_single_source_cgal_program( "algebraic_segments.cpp" )
+  create_single_source_cgal_program( "batched_point_location.cpp" )
+  create_single_source_cgal_program( "bgl_dual_adapter.cpp" )
+  create_single_source_cgal_program( "bgl_primal_adapter.cpp" )
+  create_single_source_cgal_program( "bounded_planar_vertical_decomposition.cpp" )
+  create_single_source_cgal_program( "circles.cpp" )
+  create_single_source_cgal_program( "circular_arcs.cpp" )
+  create_single_source_cgal_program( "circular_line_arcs.cpp" )
+  create_single_source_cgal_program( "conic_multiplicities.cpp" )
+  create_single_source_cgal_program( "conics.cpp" )
+  create_single_source_cgal_program( "consolidated_curve_data.cpp" )
+  create_single_source_cgal_program( "curve_history.cpp" )
+  create_single_source_cgal_program( "dcel_extension.cpp" )
+  create_single_source_cgal_program( "dcel_extension_io.cpp" )
+  create_single_source_cgal_program( "dual_lines.cpp" )
+  create_single_source_cgal_program( "dual_with_data.cpp" )
+  create_single_source_cgal_program( "edge_insertion.cpp" )
+  create_single_source_cgal_program( "edge_manipulation.cpp" )
+  create_single_source_cgal_program( "edge_manipulation_curve_history.cpp" )
+  create_single_source_cgal_program( "face_extension.cpp" )
+  create_single_source_cgal_program( "face_extension_overlay.cpp" )
+  create_single_source_cgal_program( "generic_curve_data.cpp" )
+  create_single_source_cgal_program( "global_insertion.cpp" )
+  create_single_source_cgal_program( "global_removal.cpp" )
+  create_single_source_cgal_program( "incremental_insertion.cpp" )
+  create_single_source_cgal_program( "io.cpp" )
+  create_single_source_cgal_program( "io_curve_history.cpp" )
+  create_single_source_cgal_program( "io_unbounded.cpp" )
+  create_single_source_cgal_program( "isolated_vertices.cpp" )
+  create_single_source_cgal_program( "observer.cpp" )
+  create_single_source_cgal_program( "overlay.cpp" )
+  create_single_source_cgal_program( "overlay_unbounded.cpp" )
+  create_single_source_cgal_program( "point_location_example.cpp" )
+  create_single_source_cgal_program( "polycurve_bezier.cpp" )
+  create_single_source_cgal_program( "polycurve_circular_arc.cpp" )
+  create_single_source_cgal_program( "polycurve_conic.cpp" )
+  create_single_source_cgal_program( "polycurve_geodesic.cpp" )
+  create_single_source_cgal_program( "polycurves_basic.cpp" )
+  create_single_source_cgal_program( "polylines.cpp" )
+  create_single_source_cgal_program( "predefined_kernel.cpp" )
+  create_single_source_cgal_program( "predefined_kernel_non_intersecting.cpp" )
+  create_single_source_cgal_program( "rational_functions.cpp" )
+  create_single_source_cgal_program( "rational_functions_rational_coefficients.cpp" )
+  create_single_source_cgal_program( "special_edge_insertion.cpp" )
+  create_single_source_cgal_program( "spherical_insert.cpp" )
+  create_single_source_cgal_program( "tracing_counting.cpp" )
+  create_single_source_cgal_program( "unb_planar_vertical_decomposition.cpp" )
+  create_single_source_cgal_program( "unbounded_non_intersecting.cpp" )
+  create_single_source_cgal_program( "unbounded_rational_functions.cpp" )
+  create_single_source_cgal_program( "vertical_ray_shooting.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Europe.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Europe.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/Europe.dat
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/Europe.dat
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/aggregated_insertion.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/aggregated_insertion.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/aggregated_insertion.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/aggregated_insertion.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/algebraic_curves.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/algebraic_curves.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/algebraic_curves.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/algebraic_curves.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/algebraic_segments.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/algebraic_segments.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/algebraic_segments.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/algebraic_segments.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_print.h b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/arr_print.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/arr_print.h
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/arr_print.h
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/batched_point_location.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/batched_point_location.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/batched_point_location.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/batched_point_location.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
new file mode 100644
index 0000000..aac2d9b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
@@ -0,0 +1,85 @@
+//! \file examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
+// Adapting the dual of an arrangement to a BGL graph.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_extended_dcel.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/graph_traits_Dual_Arrangement_2.h>
+#include <CGAL/Arr_face_index_map.h>
+
+#include <climits>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/visitors.hpp>
+
+#include "arr_print.h"
+
+// A property map that reads/writes the information to/from the extended
+// face.
+template <typename Arrangement, class Type> class Extended_face_property_map {
+public:
+  typedef typename Arrangement::Face_handle       Face_handle;
+
+  // Boost property type definitions.
+  typedef boost::read_write_property_map_tag      category;
+  typedef Type                                    value_type;
+  typedef value_type&                             reference;
+  typedef Face_handle                             key_type;
+
+  // The get function is required by the property map concept.
+  friend reference get(const Extended_face_property_map& /* map */,
+                       key_type key)
+  { return key->data(); }
+
+  // The put function is required by the property map concept.
+  friend void put(Extended_face_property_map /* map */,
+                  key_type key, value_type val)
+  { key->set_data(val); }
+};
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>                Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                   Traits_2;
+typedef CGAL::Arr_face_extended_dcel<Traits_2, unsigned int> Dcel;
+typedef CGAL::Arrangement_2<Traits_2, Dcel>                  Ex_arrangement;
+typedef CGAL::Dual<Ex_arrangement>                           Dual_arrangement;
+typedef CGAL::Arr_face_index_map<Ex_arrangement>             Face_index_map;
+typedef Extended_face_property_map<Ex_arrangement,unsigned int>
+                                                             Face_property_map;
+typedef Kernel::Point_2                                      Point_2;
+typedef Kernel::Segment_2                                    Segment_2;
+
+int main()
+{
+  // Construct an arrangement of seven intersecting line segments.
+  Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3);
+  Ex_arrangement  arr;
+  insert(arr, Segment_2(p1, p6));
+  insert(arr, Segment_2(p1, p4));  insert(arr, Segment_2(p2, p6));
+  insert(arr, Segment_2(p3, p7));  insert(arr, Segment_2(p3, p5));
+  insert(arr, Segment_2(p6, p7));  insert(arr, Segment_2(p4, p7));
+
+  // Create a mapping of the arrangement faces to indices.
+  Face_index_map  index_map(arr);
+
+  // Perform breadth-first search from the unbounded face, using the event
+  // visitor to associate each arrangement face with its discover time.
+  unsigned int    time = 0;
+  boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(),
+                              boost::vertex_index_map(index_map).visitor
+                              (boost::make_bfs_visitor
+                               (stamp_times(Face_property_map(), time,
+                                            boost::on_discover_vertex()))));
+
+  // Print the discover time of each arrangement face.
+  Ex_arrangement::Face_iterator  fit;
+  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
+    std::cout << "Discover time " << fit->data() << " for ";
+    if (fit != arr.unbounded_face()) {
+      std::cout << "face ";
+      print_ccb<Ex_arrangement>(fit->outer_ccb());
+    }
+    else std::cout << "the unbounded face." << std::endl;
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
new file mode 100644
index 0000000..daa6729
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
@@ -0,0 +1,144 @@
+//! \file examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
+// Adapting an arrangement to a BGL graph.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/graph_traits_Arrangement_2.h>
+#include <CGAL/Arr_vertex_index_map.h>
+
+#include <CGAL/boost/graph/dijkstra_shortest_paths.h>
+
+#include <CGAL/property_map.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>           Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>              Traits_2;
+typedef Traits_2::Point_2                               Point_2;
+typedef Traits_2::X_monotone_curve_2                    Segment_2;
+typedef CGAL::Arrangement_2<Traits_2>                   Arrangement_2;
+
+// A functor used to compute the length of an edge.
+class Edge_length_func
+{
+public:
+
+  // Boost property type definitions:
+  typedef boost::readable_property_map_tag        category;
+  typedef double                                  value_type;
+  typedef value_type                              reference;
+  typedef Arrangement_2::Halfedge_handle          key_type;
+
+  double operator()(Arrangement_2::Halfedge_handle e) const
+  {
+    const double     x1 = CGAL::to_double (e->source()->point().x());
+    const double     y1 = CGAL::to_double (e->source()->point().y());
+    const double     x2 = CGAL::to_double (e->target()->point().x());
+    const double     y2 = CGAL::to_double (e->target()->point().y());
+    const double     diff_x = x2 - x1;
+    const double     diff_y = y2 - y1;
+
+    return std::sqrt(diff_x*diff_x + diff_y*diff_y);
+  }
+};
+
+double get(Edge_length_func edge_length, Arrangement_2::Halfedge_handle e)
+{
+  return edge_length(e);
+}
+
+/* The folowing is a workaround for a bug in the BGL upto and including version
+ * 103400.
+ *
+ * Unfortunately some of the calls to the get() function below from the BGL
+ * code are qualified with the boost namespace, while others are not. For The
+ * qualified calls the compiler naturally looks for the definition of the
+ * function in boost namespace. For the other calls it searches the CGAL
+ * namespace according to ADL (Koenig Lookup), as the type of the 1st
+ * parameter is in CGAL namespace.
+ *
+ * One way to get around it is to provide 2 similar functions that do the
+ * same thing. One in CGAL namespace provided in CGAL/Arr_vertex_map.h, and
+ * the other in boost namespace below. The signature of the latter is slightly
+ * changed to avoid redefinition. The type of its 1st parameter is defined in
+ * boost namespace, and is a simple derivation of the 1st parameter of the
+ * CGAL::get() function.
+ */
+
+namespace boost {
+
+template <typename Arrangement_2>
+class Arr_vertex_index_map_boost :
+    public CGAL::Arr_vertex_index_map<Arrangement_2>
+{
+ public:
+  typedef CGAL::Arr_vertex_index_map<Arrangement_2>     Base;
+  /*! Default constructor. */
+  Arr_vertex_index_map_boost() : Base() {}
+
+  /*! Constructor from CGAL index map. */
+  Arr_vertex_index_map_boost(Base & other) :
+    CGAL::Arr_vertex_index_map<Arrangement_2>(other)
+  {}
+};
+
+/*!
+ * Get the index property-map function. Provided so that boost is able to
+ * access the Arr_vertex_index_map above.
+ * \param index_map The index map.
+ * \param v A vertex handle.
+ * \return The vertex index.
+ */
+template<class Arrangement>
+unsigned int
+get(const boost::Arr_vertex_index_map_boost<Arrangement> & index_map,
+    typename Arrangement::Vertex_handle v)
+{
+  const CGAL::Arr_vertex_index_map<Arrangement> & index_map_tmp =
+    static_cast<const CGAL::Arr_vertex_index_map<Arrangement> &>(index_map);
+  return CGAL::get<Arrangement>(index_map_tmp, v);
+}
+
+}
+
+int main()
+{
+  Arrangement_2   arr;
+
+  // Construct an arrangement of seven intersecting line segments.
+  // We keep a handle for the vertex v_0 that corresponds to the point (1,1).
+  Arrangement_2::Halfedge_handle  e =
+    insert_non_intersecting_curve (arr, Segment_2 (Point_2 (1, 1),
+                                                   Point_2 (7, 1)));
+  Arrangement_2::Vertex_handle    v0 = e->source();
+  insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7)));
+  insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1)));
+  insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3)));
+  insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4)));
+  insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3)));
+  insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3)));
+
+  // Create a mapping of the arrangement vertices to indices.
+  CGAL::Arr_vertex_index_map<Arrangement_2>        index_map_tmp(arr);
+  boost::Arr_vertex_index_map_boost<Arrangement_2> index_map(index_map_tmp);
+
+  // Perform Dijkstra's algorithm from the vertex v0.
+  Edge_length_func                                      edge_length;
+
+  boost::vector_property_map<double, boost::Arr_vertex_index_map_boost<Arrangement_2> > dist_map(static_cast<unsigned int>(arr.number_of_vertices()), index_map);
+  boost::dijkstra_shortest_paths(arr, v0,
+                                 boost::vertex_index_map(index_map).
+                                 weight_map(edge_length).
+                                 distance_map(dist_map));
+
+  // Print the results:
+  Arrangement_2::Vertex_iterator      vit;
+
+  std::cout << "The distances of the arrangement vertices from ("
+            << v0->point() << ") :" << std::endl;
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
+    std::cout << "(" << vit->point() << ") at distance "
+              << dist_map[vit] << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circles.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circles.cpp
new file mode 100644
index 0000000..0b06921
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circles.cpp
@@ -0,0 +1,60 @@
+//! \file examples/Arrangement_on_surface_2/circles.cpp
+// Constructing an arrangement of circles using the conic-arc traits.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef Kernel::Circle_2                              Circle_2;
+typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
+typedef Traits_2::CoordNT                             CoordNT;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Curve_2                             Curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
+
+int main()
+{
+  // Create a circle centered at the origin with radius 5.
+  Kernel::Point_2 c1 = Kernel::Point_2(0, 0);
+  CGAL::Exact_rational sqr_r1 = CGAL::Exact_rational(25);       // = 5^2
+  Circle_2 circ1 = Circle_2(c1, sqr_r1, CGAL::CLOCKWISE);
+  Curve_2 cv1 = Curve_2(circ1);
+
+  // Create a circle centered at (7,7) with radius 5.
+  Kernel::Point_2 c2 = Kernel::Point_2(7, 7);
+  CGAL::Exact_rational sqr_r2 = CGAL::Exact_rational(25);       // = 5^2
+  Circle_2 circ2 = Circle_2(c2, sqr_r2, CGAL::CLOCKWISE);
+  Curve_2 cv2 = Curve_2(circ2);
+
+  // Create a circle centered at (4,-0.5) with radius 3.5 (= 7/2).
+  Kernel::Point_2 c3 = Kernel::Point_2(4, CGAL::Exact_rational(-1,2));
+  CGAL::Exact_rational sqr_r3 = CGAL::Exact_rational(49, 4);    // = 3.5^2
+  Circle_2 circ3 = Circle_2(c3, sqr_r3, CGAL::CLOCKWISE);
+  Curve_2 cv3 = Curve_2(circ3);
+
+  // Construct the arrangement of the three circles.
+  Arrangement_2 arr;
+
+  insert(arr, cv1);
+  insert(arr, cv2);
+  insert(arr, cv3);
+
+  // Locate the vertex with maximal degree.
+  Arrangement_2::Vertex_const_iterator vit;
+  Arrangement_2::Vertex_const_handle v_max;
+  std::size_t max_degree = 0;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
+    if (vit->degree() > max_degree) {
+      v_max = vit;
+      max_degree = vit->degree();
+    }
+  }
+
+  std::cout << "The vertex with maximal degree in the arrangement is: "
+            << "v_max = (" << v_max->point() << ") "
+            << "with degree " << max_degree << "." << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circular_arcs.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circular_arcs.cpp
new file mode 100644
index 0000000..e9d7e22
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circular_arcs.cpp
@@ -0,0 +1,95 @@
+//! \file examples/Arrangement_on_surface_2/circular_arc.cpp
+// Constructing an arrangement of various circular arcs and line segments.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef Kernel::Circle_2                              Circle_2;
+typedef Kernel::Segment_2                             Segment_2;
+typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
+typedef Traits_2::CoordNT                             CoordNT;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Curve_2                             Curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
+
+int main()
+{
+  std::list<Curve_2>  curves;
+
+  // Create a circle centered at the origin with squared radius 2.
+  Kernel::Point_2 c1 = Kernel::Point_2(0, 0);
+  Circle_2 circ1 = Circle_2(c1, CGAL::Exact_rational(2));
+
+  curves.push_back(Curve_2(circ1));
+
+  // Create a circle centered at (2,3) with radius 3/2 - note that
+  // as the radius is rational we use a different curve constructor.
+  Kernel::Point_2 c2 = Kernel::Point_2(2, 3);
+
+  curves.push_back(Curve_2(c2, CGAL::Exact_rational(3, 2)));
+
+  // Create a segment of the line (y = x) with rational endpoints.
+  Kernel::Point_2 s3 = Kernel::Point_2(-2, -2);
+  Kernel::Point_2 t3 = Kernel::Point_2(2, 2);
+  Segment_2 seg3 = Segment_2(s3, t3);
+
+  curves.push_back(Curve_2(seg3));
+
+  // Create a line segment with the same supporting line (y = x), but
+  // having one endpoint with irrational coefficients.
+  CoordNT sqrt_15 = CoordNT(0, 1, 15); // = sqrt(15)
+  Point_2 s4 = Point_2(3, 3);
+  Point_2 t4 = Point_2(sqrt_15, sqrt_15);
+
+  curves.push_back(Curve_2(seg3.supporting_line(), s4, t4));
+
+  // Create a circular arc that correspond to the upper half of the
+  // circle centered at (1,1) with squared radius 3. We create the
+  // circle with clockwise orientation, so the arc is directed from
+  // (1 - sqrt(3), 1) to (1 + sqrt(3), 1).
+  Kernel::Point_2 c5 = Kernel::Point_2(1, 1);
+  Circle_2 circ5 = Circle_2(c5, 3, CGAL::CLOCKWISE);
+  CoordNT one_minus_sqrt_3 = CoordNT(1, -1, 3);
+  CoordNT one_plus_sqrt_3 = CoordNT(1, 1, 3);
+  Point_2 s5 = Point_2(one_minus_sqrt_3, CoordNT(1));
+  Point_2 t5 = Point_2(one_plus_sqrt_3, CoordNT(1));
+
+  curves.push_back(Curve_2(circ5, s5, t5));
+
+  // Create a circular arc of the unit circle, directed clockwise from
+  // (-1/2, sqrt(3)/2) to (1/2, sqrt(3)/2). Note that we orient the
+  // supporting circle accordingly.
+  Kernel::Point_2 c6 = Kernel::Point_2(0, 0);
+  CoordNT sqrt_3_div_2 = CoordNT(CGAL::Exact_rational(0),
+                                 CGAL::Exact_rational(1,2),
+                                 CGAL::Exact_rational(3));
+  Point_2 s6 = Point_2(CGAL::Exact_rational(-1, 2), sqrt_3_div_2);
+  Point_2 t6 = Point_2(CGAL::Exact_rational(1, 2), sqrt_3_div_2);
+
+  curves.push_back(Curve_2(c6, 1, CGAL::CLOCKWISE, s6, t6));
+
+  // Create a circular arc defined by two endpoints and a midpoint,
+  // all having rational coordinates. This arc is the upper-right
+  // quarter of a circle centered at the origin with radius 5.
+  Kernel::Point_2 s7 = Kernel::Point_2(0, 5);
+  Kernel::Point_2 mid7 = Kernel::Point_2(3, 4);
+  Kernel::Point_2 t7 = Kernel::Point_2(5, 0);
+
+  curves.push_back(Curve_2(s7, mid7, t7));
+
+  // Construct the arrangement of the curves.
+  Arrangement_2 arr;
+
+  insert(arr, curves.begin(), curves.end());
+
+  // Print the size of the arrangement.
+  std::cout << "The arrangement size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circular_line_arcs.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/coll_points.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/coll_points.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/coll_points.dat
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/coll_points.dat
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/conic_multiplicities.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/conics.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/conics.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/conics.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/conics.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
new file mode 100644
index 0000000..421baeb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
@@ -0,0 +1,113 @@
+//! \file examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
+// Associating a color attribute with segments using the consolidated
+// curve-data traits.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_landmarks_point_location.h>
+
+enum Segment_color {
+  RED,
+  BLUE
+};
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>             Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                Segment_traits_2;
+typedef Segment_traits_2::Curve_2                         Segment_2;
+typedef CGAL::Arr_consolidated_curve_data_traits_2
+                   <Segment_traits_2, Segment_color>      Traits_2;
+typedef Traits_2::Point_2                                 Point_2;
+typedef Traits_2::Curve_2                                 Colored_segment_2;
+typedef CGAL::Arrangement_2<Traits_2>                     Arrangement_2;
+typedef CGAL::Arr_landmarks_point_location<Arrangement_2> Landmarks_pl;
+
+int main ()
+{
+  // Construct an arrangement containing three RED line segments.
+  Arrangement_2     arr;
+  Landmarks_pl      pl (arr);
+
+  Segment_2         s1 (Point_2(-1, -1), Point_2(1, 3));
+  Segment_2         s2 (Point_2(2, 0), Point_2(3, 3));
+  Segment_2         s3 (Point_2(0, 3), Point_2(2, 5));
+
+  insert (arr, Colored_segment_2 (s1, RED), pl);
+  insert (arr, Colored_segment_2 (s2, RED), pl);
+  insert (arr, Colored_segment_2 (s3, RED), pl);
+
+  // Insert three BLUE line segments.
+  Segment_2         s4 (Point_2(-1, 3), Point_2(4, 1));
+  Segment_2         s5 (Point_2(-1, 0), Point_2(4, 1));
+  Segment_2         s6 (Point_2(-2, 1), Point_2(1, 4));
+
+  insert (arr, Colored_segment_2 (s4, BLUE), pl);
+  insert (arr, Colored_segment_2 (s5, BLUE), pl);
+  insert (arr, Colored_segment_2 (s6, BLUE), pl);
+
+  // Go over all vertices and print just the ones corresponding to intersection
+  // points between RED segments and BLUE segments. Note that we skip endpoints
+  // of overlapping sections.
+  Arrangement_2::Vertex_const_iterator   vit;
+  Segment_color                          color;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
+    // Go over the incident halfedges of the current vertex and examine their
+    // colors.
+    bool       has_red = false;
+    bool       has_blue = false;
+
+    Arrangement_2::Halfedge_around_vertex_const_circulator  eit, first;
+
+    eit = first = vit->incident_halfedges();
+    do {
+      // Get the color of the current half-edge.
+      if (eit->curve().data().size() == 1) {
+        color = eit->curve().data().front();
+
+        if (color == RED)
+          has_red = true;
+        else if (color == BLUE)
+          has_blue = true;
+      }
+
+      ++eit;
+    } while (eit != first);
+
+    // Print the vertex only if incident RED and BLUE edges were found.
+    if (has_red && has_blue)
+    {
+      std::cout << "Red-blue intersection at (" << vit->point() << ")"
+                << std::endl;
+    }
+  }
+
+  // Locate the edges that correspond to a red-blue overlap.
+  Arrangement_2::Edge_iterator   eit;
+
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit)
+  {
+    // Go over the incident edges of the current vertex and examine their
+    // colors.
+    bool       has_red = false;
+    bool       has_blue = false;
+
+    Traits_2::Data_container::const_iterator       dit;
+
+    for (dit = eit->curve().data().begin(); dit != eit->curve().data().end();
+         ++dit)
+    {
+      if (*dit == RED)
+        has_red = true;
+      else if (*dit == BLUE)
+        has_blue = true;
+    }
+
+    // Print the edge only if it corresponds to a red-blue overlap.
+    if (has_red && has_blue)
+      std::cout << "Red-blue overlap at [" << eit->curve() << "]"  << std::endl;
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/curve_history.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/curve_history.cpp
new file mode 100644
index 0000000..24409fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/curve_history.cpp
@@ -0,0 +1,74 @@
+//! \file examples/Arrangement_on_surface_2/curve_history.cpp
+// Constructing an arrangement with curve history.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+
+#include <CGAL/Arrangement_on_surface_with_history_2.h>
+#include <CGAL/Arrangement_with_history_2.h>
+#include <CGAL/Arr_simple_point_location.h>
+
+#include "point_location_utils.h"
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>             Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                Traits_2;
+typedef Traits_2::Point_2                                 Point_2;
+typedef Traits_2::Curve_2                                 Segment_2;
+typedef CGAL::Arrangement_with_history_2<Traits_2>        Arr_with_hist_2;
+typedef Arr_with_hist_2::Curve_handle                     Curve_handle;
+typedef CGAL::Arr_simple_point_location<Arr_with_hist_2>  Point_location;
+
+int main()
+{
+  Arr_with_hist_2   arr;
+
+  // Insert s1, s2 and s3 incrementally:
+  Segment_2 s1(Point_2(0, 3), Point_2(4, 3));
+  insert(arr, s1);
+  Segment_2 s2(Point_2(3, 2), Point_2(3, 5));
+  insert(arr, s2);
+  Segment_2 s3(Point_2(2, 3), Point_2(5, 3));
+  insert(arr, s3);
+
+  // Insert three additional segments aggregately:
+  Segment_2 segs[3];
+  segs[0] = Segment_2(Point_2(2, 6), Point_2(7, 1));
+  segs[1] = Segment_2(Point_2(0, 0), Point_2(2, 6));
+  segs[2] = Segment_2(Point_2(3, 4), Point_2(6, 4));
+  insert(arr, segs, segs + 3);
+
+  // Print out the curves and the number of edges each one induces.
+  Arr_with_hist_2::Curve_iterator            cit;
+  std::cout << "The arrangement contains "
+            << arr.number_of_curves() << " curves:" << std::endl;
+  for (cit = arr.curves_begin(); cit != arr.curves_end(); ++cit)
+    std::cout << "Curve [" << *cit << "] induces "
+              << arr.number_of_induced_edges(cit) << " edges." << std::endl;
+
+  // Print the arrangement edges, along with the list of curves that
+  // induce each edge.
+  Arr_with_hist_2::Edge_iterator                  eit;
+  Arr_with_hist_2::Originating_curve_iterator     ocit;
+  std::cout << "The arrangement is comprised of "
+            << arr.number_of_edges() << " edges:" << std::endl;
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
+    std::cout << "[" << eit->curve() << "]. Originating curves: ";
+    for (ocit = arr.originating_curves_begin(eit);
+         ocit != arr.originating_curves_end(eit); ++ocit)
+      std::cout << " [" << *ocit << "]" << std::flush;
+    std::cout << std::endl;
+  }
+
+  // Perform some point-location queries:
+  Point_location   pl(arr);
+
+  Point_2          p1(4, 6);
+  point_location_query(pl, p1);
+  Point_2          p2(6, 2);
+  point_location_query(pl, p2);
+  Point_2          p3(2, 4);
+  point_location_query(pl, p3);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension.cpp
new file mode 100644
index 0000000..f239177
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension.cpp
@@ -0,0 +1,97 @@
+//! \file examples/Arrangement_on_surface_2/dcel_extension.cpp
+// Extending all DCEL records (vertices, edges and faces).
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_extended_dcel.h>
+
+enum Color {BLUE, RED, WHITE};
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                      Traits_2;
+typedef Traits_2::Point_2                                       Point_2;
+typedef Traits_2::X_monotone_curve_2                            Segment_2;
+typedef CGAL::Arr_extended_dcel<Traits_2,Color, bool, int>      Dcel;
+typedef CGAL::Arrangement_2<Traits_2, Dcel>                     Arrangement_2;
+
+int main ()
+{
+  // Construct the arrangement containing two intersecting triangles.
+  Arrangement_2          arr;
+
+  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
+  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
+  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
+  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
+  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
+  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
+
+  insert_non_intersecting_curve (arr, s1);
+  insert_non_intersecting_curve (arr, s2);
+  insert_non_intersecting_curve (arr, s3);
+  insert (arr, s4);
+  insert (arr, s5);
+  insert (arr, s6);
+
+  // Go over all arrangement vertices and set their colors according to our
+  // coloring convention.
+  Arrangement_2::Vertex_iterator            vit;
+  std::size_t                               degree;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
+  {
+    degree = vit->degree();
+    if (degree == 0)
+      vit->set_data (BLUE);       // Isolated vertex.
+    else if (degree <= 2)
+      vit->set_data (RED);        // Vertex represents an endpoint.
+    else
+      vit->set_data (WHITE);      // Vertex represents an intersection point.
+  }
+
+  // Go over all arrangement edges and set their flags.
+  Arrangement_2::Edge_iterator              eit;
+  bool                                      flag;
+
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
+    // Check if the halfegde has the same diretion as its associated
+    // segment. Note that its twin always has an opposite direction.
+    flag = (eit->source()->point() == eit->curve().source());
+    eit->set_data (flag);
+    eit->twin()->set_data (!flag);
+  }
+
+  // For each arrangement face, print the outer boundary and its size.
+  Arrangement_2::Face_iterator              fit;
+  Arrangement_2::Ccb_halfedge_circulator    curr;
+  int                                       boundary_size;
+
+  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
+    boundary_size = 0;
+    if (! fit->is_unbounded()) {
+      curr = fit->outer_ccb();
+      do {
+        ++boundary_size;
+        ++curr;
+      } while (curr != fit->outer_ccb());
+    }
+    fit->set_data (boundary_size);
+  }
+
+  // Copy the arrangement and print the vertices.
+  Arrangement_2    arr2 = arr;
+
+  std::cout << "The arrangement vertices:" << std::endl;
+  for (vit = arr2.vertices_begin(); vit != arr2.vertices_end(); ++vit) {
+    std::cout << '(' << vit->point() << ") - ";
+    switch (vit->data()) {
+     case BLUE  : std::cout << "BLUE."  << std::endl; break;
+     case RED   : std::cout << "RED."   << std::endl; break;
+     case WHITE : std::cout << "WHITE." << std::endl; break;
+    }
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension_io.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
new file mode 100644
index 0000000..58ee05e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
@@ -0,0 +1,137 @@
+//! \file examples/Arrangement_on_surface_2/dcel_extension_io.cpp
+// Using the I/O operators for arrangements with extended DCEL records.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_extended_dcel.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/IO/Arr_text_formatter.h>
+#include <CGAL/IO/Arr_iostream.h>
+#include <fstream>
+
+enum Color {BLUE, RED, WHITE};
+
+std::ostream& operator<< (std::ostream& os, const Color& color)
+{
+  switch (color)
+  {
+  case BLUE:  os << "BLUE";  break;
+  case RED:   os << "RED";   break;
+  case WHITE: os << "WHITE"; break;
+  default: os << "ERROR!";
+  }
+  return (os);
+}
+
+std::istream& operator>> (std::istream& is, Color& color)
+{
+  std::string   str;
+  is >> str;
+
+  if (str == "BLUE")
+    color = BLUE;
+  else if (str == "RED")
+    color = RED;
+  else if (str == "WHITE")
+    color = WHITE;
+
+  return (is);
+}
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>             Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                Traits_2;
+typedef Traits_2::Point_2                                 Point_2;
+typedef Traits_2::X_monotone_curve_2                      Segment_2;
+typedef CGAL::Arr_extended_dcel<Traits_2,
+                                Color, bool, int>         Dcel;
+typedef CGAL::Arrangement_2<Traits_2, Dcel>               Arrangement_2;
+typedef CGAL::Arr_extended_dcel_text_formatter<Arrangement_2>  Formatter;
+
+int main ()
+{
+  // Construct the arrangement containing two intersecting triangles.
+  Arrangement_2          arr;
+
+  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
+  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
+  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
+  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
+  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
+  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
+
+  insert_non_intersecting_curve (arr, s1);
+  insert_non_intersecting_curve (arr, s2);
+  insert_non_intersecting_curve (arr, s3);
+  insert (arr, s4);
+  insert (arr, s5);
+  insert (arr, s6);
+
+  // Go over all arrangement vertices and set their colors.
+  Arrangement_2::Vertex_iterator            vit;
+  std::size_t                               degree;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
+  {
+    degree = vit->degree();
+    if (degree == 0)
+      vit->set_data (BLUE);       // Isolated vertex.
+    else if (degree <= 2)
+      vit->set_data (RED);        // Vertex represents an endpoint.
+    else
+      vit->set_data (WHITE);      // Vertex represents an intersection point.
+  }
+
+  // Go over all arrangement edges and set their flags.
+  Arrangement_2::Edge_iterator              eit;
+  bool                                      flag;
+
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit)
+  {
+    // Check if the halfegde has the same diretion as its associated
+    // segment. Note that its twin always has an opposite direction.
+    flag = (eit->source()->point() == eit->curve().source());
+    eit->set_data (flag);
+    eit->twin()->set_data (!flag);
+  }
+
+  // Go over all arrangement faces and print their outer boundary and indices.
+  Arrangement_2::Face_iterator              fit;
+  Arrangement_2::Ccb_halfedge_circulator    curr;
+  int                                       boundary_size;
+
+  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+  {
+    boundary_size = 0;
+    if (! fit->is_unbounded())
+    {
+      curr = fit->outer_ccb();
+      do
+      {
+        ++boundary_size;
+        ++curr;
+      } while (curr != fit->outer_ccb());
+    }
+    fit->set_data (boundary_size);
+  }
+
+  // Write the arrangement to a file.
+  std::ofstream    out_file ("arr_ex_dcel_io.dat");
+  Formatter        formatter;
+
+  write (arr, out_file, formatter);
+  out_file.close();
+
+  // Read the arrangement from the file.
+  Arrangement_2    arr2;
+  std::ifstream    in_file ("arr_ex_dcel_io.dat");
+
+  read (arr2, in_file, formatter);
+  in_file.close();
+
+  std::cout << "The arrangement vertices: " << std::endl;
+  for (vit = arr2.vertices_begin(); vit != arr2.vertices_end(); ++vit)
+    std::cout << '(' << vit->point() << ") - " << vit->data() << std::endl;
+
+  return (0);
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_lines.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_lines.cpp
new file mode 100644
index 0000000..caf71fc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_lines.cpp
@@ -0,0 +1,112 @@
+//! \file examples/Arrangement_on_surface_2/dual_lines.cpp
+// Checking whether there are three collinear points in a given input set
+// using the arrangement of the dual lines.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <cstdlib>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef CGAL::Arr_linear_traits_2<Kernel>             Traits_2;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Line_2                              Line_2;
+typedef Traits_2::X_monotone_curve_2                  X_monotone_curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
+
+int main(int argc, char *argv[])
+{
+  // Get the name of the input file from the command line, or use the default
+  // points.dat file if no command-line parameters are given.
+  const char* filename = (argc > 1) ? argv[1] : "points.dat";
+
+  // Open the input file.
+  std::ifstream in_file(filename);
+
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open " << filename << "!" << std::endl;
+    return 1;
+  }
+
+  // Read the points from the file, and consturct their dual lines.
+  // The input file format should be (all coordinate values are integers):
+  // <n>                                 // number of point.
+  // <x_1> <y_1>                         // point #1.
+  // <x_2> <y_2>                         // point #2.
+  //   :      :       :      :
+  // <x_n> <y_n>                         // point #n.
+  std::vector<Point_2> points;
+  std::list<X_monotone_curve_2> dual_lines;
+
+  size_t n;
+  in_file >> n;
+  points.resize(n);
+  unsigned int k;
+  for (k = 0; k < n; ++k) {
+    int px, py;
+    in_file >> px >> py;
+    points[k] = Point_2(px, py);
+
+    // The line dual to the point (p_x, p_y) is y = p_x*x - p_y,
+    // or: p_x*x - y - p_y = 0:
+    dual_lines.push_back(Line_2(CGAL::Exact_rational(px),
+                                CGAL::Exact_rational(-1),
+                                CGAL::Exact_rational(-py)));
+  }
+  in_file.close();
+
+  // Construct the dual arrangement by aggragately inserting the lines.
+  Arrangement_2 arr;
+
+  insert(arr, dual_lines.begin(), dual_lines.end());
+
+  std::cout << "The dual arrangement size:" << std::endl
+            << "V = " << arr.number_of_vertices()
+            << " (+ " << arr.number_of_vertices_at_infinity()
+            << " at infinity)"
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces()
+            << " (" << arr.number_of_unbounded_faces()
+            << " unbounded)" << std::endl;
+
+  // Look for a vertex whose degree is greater than 4.
+  Arrangement_2::Vertex_const_iterator vit;
+  bool found_collinear = false;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
+    if (vit->degree() > 4) {
+      found_collinear = true;
+      break;
+    }
+  }
+  if (found_collinear)
+    std::cout << "Found at least three collinear points in the input set."
+              << std::endl;
+  else
+    std::cout << "No three collinear points are found in the input set."
+              << std::endl;
+
+  // Pick two points from the input set, compute their midpoint and insert
+  // its dual line into the arrangement.
+  Kernel ker;
+  const int k1 = std::rand() % n, k2 = (k1 + 1) % n;
+  Point_2 p_mid = ker.construct_midpoint_2_object()(points[k1], points[k2]);
+  X_monotone_curve_2 dual_p_mid = Line_2(CGAL::Exact_rational(p_mid.x()),
+                                         CGAL::Exact_rational(-1),
+                                         CGAL::Exact_rational(-p_mid.y()));
+
+  insert(arr, dual_p_mid);
+
+  // Make sure that we now have three collinear points.
+  found_collinear = false;
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
+    if (vit->degree() > 4) {
+      found_collinear = true;
+      break;
+    }
+  }
+  CGAL_assertion(found_collinear);
+
+  return (0);
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_with_data.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_with_data.cpp
new file mode 100644
index 0000000..2bd4d16
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/dual_with_data.cpp
@@ -0,0 +1,82 @@
+//! \file examples/Arrangement_on_surface_2/dual_lines.cpp
+// Checking whether there are three collinear points in a given input set
+// using the arrangement of the dual lines.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arr_curve_data_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>            Kernel;
+typedef CGAL::Arr_linear_traits_2<Kernel>                Linear_traits_2;
+typedef Linear_traits_2::Point_2                         Point_2;
+typedef Linear_traits_2::Line_2                          Line_2;
+typedef CGAL::Arr_curve_data_traits_2<Linear_traits_2,
+                                      unsigned int>      Traits_2;
+typedef Traits_2::X_monotone_curve_2                     X_monotone_curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                    Arrangement_2;
+
+int main(int argc, char *argv[])
+{
+  // Get the name of the input file from the command line, or use the default
+  // points.dat file if no command-line parameters are given.
+  const char * filename = (argc > 1) ? argv[1] : "coll_points.dat";
+
+  // Open the input file.
+  std::ifstream     in_file(filename);
+
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open " << filename << " ..." << std::endl;
+    return (1);
+  }
+
+  // Read the points from the file, and consturct their dual lines.
+  std::vector<Point_2>           points;
+  std::list<X_monotone_curve_2>  dual_lines;
+
+  unsigned int n;
+  in_file >> n;
+  points.resize(n);
+  unsigned int k;
+  for (k = 0; k < n; ++k) {
+    int px, py;
+    in_file >> px >> py;
+    points[k] = Point_2(px, py);
+
+    // The line dual to the point (p_x, p_y) is y = p_x*x - p_y,
+    // or: p_x*x - y - p_y = 0:
+    Line_2 dual_line = Line_2(CGAL::Exact_rational(px),
+                              CGAL::Exact_rational(-1),
+                              CGAL::Exact_rational(-py));
+
+    // Generate the x-monotone curve based on the line and the point index.
+    dual_lines.push_back(X_monotone_curve_2(dual_line, k));
+  }
+  in_file.close();
+
+  // Construct the dual arrangement by aggragately inserting the lines.
+  Arrangement_2 arr;
+
+  insert(arr, dual_lines.begin(), dual_lines.end());
+
+  // Look for vertices whose degree is greater than 4.
+  Arrangement_2::Vertex_const_iterator vit;
+  Arrangement_2::Halfedge_around_vertex_const_circulator circ;
+  size_t d;
+
+  for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) {
+    if (vit->degree() > 4) {
+      // There should be vit->degree()/2 lines intersecting at the current
+      // vertex. We print their primal points and their indices.
+      circ = vit->incident_halfedges();
+      for (d = 0; d < vit->degree() / 2; d++) {
+        k = circ->curve().data();     // The index of the primal point.
+        std::cout << "Point no. " << k+1 << ": (" << points[k] << "), ";
+        ++circ;
+      }
+      std::cout << "are collinear." << std::endl;
+    }
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_insertion.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_insertion.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_insertion.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_insertion.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_manipulation.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_manipulation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/edge_manipulation.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_manipulation.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
new file mode 100644
index 0000000..36191cc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
@@ -0,0 +1,86 @@
+//! \file examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
+// Removing curves and manipulating edges in an arrangement with history.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+#include <CGAL/Arrangement_with_history_2.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef Kernel::Point_2                               Rat_point_2;
+typedef Kernel::Circle_2                              Circle_2;
+typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Traits_2;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Curve_2                             Curve_2;
+typedef CGAL::Arrangement_with_history_2<Traits_2>    Arr_with_hist_2;
+typedef Arr_with_hist_2::Curve_handle                 Curve_handle;
+typedef CGAL::Arr_walk_along_line_point_location<Arr_with_hist_2>
+                                                      Point_location;
+
+int main()
+{
+  // Construct an arrangement containing nine circles: C[0] of radius 2 and
+  // C[1], ..., C[8] of radius 1.
+  const CGAL::Exact_rational _7_halves = CGAL::Exact_rational(7, 2);
+  Arr_with_hist_2 arr;
+  Curve_2 C[9];
+  Curve_handle handles[9];
+
+  C[0] = Circle_2(Rat_point_2(_7_halves, _7_halves), 4, CGAL::CLOCKWISE);
+  C[1] = Circle_2(Rat_point_2(_7_halves, 6), 1, CGAL::CLOCKWISE);
+  C[2] = Circle_2(Rat_point_2(5, 6), 1, CGAL::CLOCKWISE);
+  C[3] = Circle_2(Rat_point_2(6, _7_halves), 1, CGAL::CLOCKWISE);
+  C[4] = Circle_2(Rat_point_2(5, 2), 1, CGAL::CLOCKWISE);
+  C[5] = Circle_2(Rat_point_2(_7_halves, 1), 1, CGAL::CLOCKWISE);
+  C[6] = Circle_2(Rat_point_2(2, 2), 1, CGAL::CLOCKWISE);
+  C[7] = Circle_2(Rat_point_2(1, _7_halves), 1, CGAL::CLOCKWISE);
+  C[8] = Circle_2(Rat_point_2(2, 5), 1, CGAL::CLOCKWISE);
+
+  size_t k;
+  for (k = 0; k < 9; k++)
+    handles[k] = insert(arr, C[k]);
+
+  std::cout << "The initial arrangement size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  // Remove the large circle C[0].
+  std::cout << "Removing C[0] : ";
+  std::cout << remove_curve(arr, handles[0])
+            << " edges have been removed." << std::endl;
+
+  std::cout << "The arrangement size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  // Locate the point q, which should be on an edge e.
+  Point_location pl(arr);
+  const Point_2 q = Point_2(_7_halves, 7);
+  Point_location::result_type obj = pl.locate(q);
+  Arr_with_hist_2::Halfedge_const_handle  e;
+
+  CGAL_assertion_code(bool success = ) CGAL::assign(e, obj);
+  CGAL_assertion(success);
+
+  // Split the edge e to two edges e1 and e2;
+  Arr_with_hist_2::Halfedge_handle e1, e2;
+
+  e1 = arr.split_edge(arr.non_const_handle(e), q);
+  e2 = e1->next();
+
+  std::cout << "After edge split: "
+            << "V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  // Merge back the two split edges.
+  arr.merge_edge(e1, e2);
+
+  std::cout << "After edge merge: "
+            << "V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension.cpp
new file mode 100644
index 0000000..8238979
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension.cpp
@@ -0,0 +1,88 @@
+//! \file examples/Arrangement_on_surface_2/face_extension.cpp
+// Extending the arrangement-face records.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_extended_dcel.h>
+#include <CGAL/Arr_observer.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>          Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>             Traits_2;
+typedef Traits_2::Point_2                              Point_2;
+typedef Traits_2::X_monotone_curve_2                   Segment_2;
+typedef CGAL::Arr_face_extended_dcel<Traits_2, int>    Dcel;
+typedef CGAL::Arrangement_2<Traits_2, Dcel>            Arrangement_2;
+
+// An arrangement observer, used to receive notifications of face splits and
+// to update the indices of the newly created faces.
+class Face_index_observer : public CGAL::Arr_observer<Arrangement_2>
+{
+private:
+  int     n_faces;          // The current number of faces.
+
+public:
+
+  Face_index_observer (Arrangement_2& arr) :
+    CGAL::Arr_observer<Arrangement_2> (arr),
+    n_faces (0)
+  {
+    CGAL_precondition (arr.is_empty());
+
+    arr.unbounded_face()->set_data (0);
+    n_faces++;
+  }
+
+  virtual void after_split_face (Face_handle /* old_face */,
+                                 Face_handle new_face, bool )
+  {
+    // Assign index to the new face.
+    new_face->set_data (n_faces);
+    n_faces++;
+  }
+};
+
+int main ()
+{
+  // Construct the arrangement containing two intersecting triangles.
+  Arrangement_2          arr;
+  Face_index_observer    obs (arr);
+
+  Segment_2      s1 (Point_2(4, 1), Point_2(7, 6));
+  Segment_2      s2 (Point_2(1, 6), Point_2(7, 6));
+  Segment_2      s3 (Point_2(4, 1), Point_2(1, 6));
+  Segment_2      s4 (Point_2(1, 3), Point_2(7, 3));
+  Segment_2      s5 (Point_2(1, 3), Point_2(4, 8));
+  Segment_2      s6 (Point_2(4, 8), Point_2(7, 3));
+
+  insert_non_intersecting_curve (arr, s1);
+  insert_non_intersecting_curve (arr, s2);
+  insert_non_intersecting_curve (arr, s3);
+  insert (arr, s4);
+  insert (arr, s5);
+  insert (arr, s6);
+
+  // Go over all arrangement faces and print the index of each face and it
+  // outer boundary. The face index is stored in its data field in our case.
+  Arrangement_2::Face_const_iterator            fit;
+  Arrangement_2::Ccb_halfedge_const_circulator  curr;
+
+  std::cout << arr.number_of_faces() << " faces:" << std::endl;
+  for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
+    std::cout << "Face no. " << fit->data() << ": ";
+    if (fit->is_unbounded())
+      std::cout << "Unbounded." << std::endl;
+    else {
+      curr = fit->outer_ccb();
+      std::cout << curr->source()->point();
+      do {
+        std::cout << " --> " << curr->target()->point();
+        ++curr;
+      } while (curr != fit->outer_ccb());
+      std::cout << std::endl;
+    }
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension_overlay.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
new file mode 100644
index 0000000..0d64a22
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
@@ -0,0 +1,89 @@
+//! \file examples/Arrangement_on_surface_2/face_extension_overlay.cpp
+// A face overlay of two arrangements with extended face records.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_extended_dcel.h>
+#include <CGAL/Arr_overlay_2.h>
+#include <CGAL/Arr_default_overlay_traits.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>                   Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>                      Traits_2;
+typedef Traits_2::Point_2                                       Point_2;
+typedef Traits_2::X_monotone_curve_2                            Segment_2;
+typedef CGAL::Arr_face_extended_dcel<Traits_2, bool>            Dcel;
+typedef CGAL::Arrangement_2<Traits_2, Dcel>                     Arrangement_2;
+typedef CGAL::Arr_face_overlay_traits<Arrangement_2,
+                                      Arrangement_2,
+                                      Arrangement_2,
+                                      std::logical_and<bool> >  Overlay_traits;
+
+int main ()
+{
+  // Construct the first arrangement, containing a square-shaped face.
+  Arrangement_2          arr1;
+
+  Segment_2      s1 (Point_2(2, 2), Point_2(6, 2));
+  Segment_2      s2 (Point_2(6, 2), Point_2(6, 6));
+  Segment_2      s3 (Point_2(6, 6), Point_2(2, 6));
+  Segment_2      s4 (Point_2(2, 6), Point_2(2, 2));
+
+  insert_non_intersecting_curve (arr1, s1);
+  insert_non_intersecting_curve (arr1, s2);
+  insert_non_intersecting_curve (arr1, s3);
+  insert_non_intersecting_curve (arr1, s4);
+
+  // Mark just the bounded face.
+  Arrangement_2::Face_iterator   fit;
+
+  CGAL_assertion (arr1.number_of_faces() == 2);
+  for (fit = arr1.faces_begin(); fit != arr1.faces_end(); ++fit)
+    fit->set_data (fit != arr1.unbounded_face());
+
+  // Construct the second arrangement, containing a rhombus-shaped face.
+  Arrangement_2          arr2;
+
+  Segment_2      t1 (Point_2(4, 1), Point_2(7, 4));
+  Segment_2      t2 (Point_2(7, 4), Point_2(4, 7));
+  Segment_2      t3 (Point_2(4, 7), Point_2(1, 4));
+  Segment_2      t4 (Point_2(1, 4), Point_2(4, 1));
+
+  insert_non_intersecting_curve (arr2, t1);
+  insert_non_intersecting_curve (arr2, t2);
+  insert_non_intersecting_curve (arr2, t3);
+  insert_non_intersecting_curve (arr2, t4);
+
+  // Mark just the bounded face.
+  CGAL_assertion (arr2.number_of_faces() == 2);
+  for (fit = arr2.faces_begin(); fit != arr2.faces_end(); ++fit)
+    fit->set_data (fit != arr2.unbounded_face());
+
+  // Compute the overlay of the two arrangements, marking only the faces that
+  // are intersections of two marked faces in arr1 and arr2, respectively.
+  Arrangement_2          overlay_arr;
+  Overlay_traits         overlay_traits;
+
+  overlay (arr1, arr2, overlay_arr, overlay_traits);
+
+  // Go over the faces of the overlaid arrangement and print just the marked
+  // ones.
+  Arrangement_2::Ccb_halfedge_circulator    curr;
+
+  std::cout << "The union is: ";
+  for (fit = overlay_arr.faces_begin(); fit != overlay_arr.faces_end(); ++fit) {
+    if (! fit->data())
+      continue;
+
+    curr = fit->outer_ccb();
+    std::cout << curr->source()->point();
+    do {
+      std::cout << " --> " << curr->target()->point();
+      ++curr;
+    } while (curr != fit->outer_ccb());
+    std::cout << std::endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/fan_grids.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/fan_grids.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/fan_grids.dat
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/fan_grids.dat
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/generic_curve_data.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/generic_curve_data.cpp
new file mode 100644
index 0000000..aef8ff2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/generic_curve_data.cpp
@@ -0,0 +1,71 @@
+//! \file examples/Arrangement_on_surface_2/generic_curve_data.cpp
+// Associating a name attribute with segments using the generic curve-data
+// traits.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_curve_data_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <string>
+
+// Define a functor for concatenating name fields.
+typedef std::string   Name;
+
+struct Merge_names
+{
+  Name operator() (const Name& s1, const Name& s2) const
+  {
+    return (s1 + " " + s2);
+  }
+};
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>           Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>              Segment_traits_2;
+typedef CGAL::Arr_polyline_traits_2<Segment_traits_2>   Polyline_traits_2;
+typedef Polyline_traits_2::Curve_2                      Polyline_2;
+typedef CGAL::Arr_curve_data_traits_2<Polyline_traits_2, Name, Merge_names>
+                                                        Traits_2;
+typedef Traits_2::Point_2                               Point_2;
+typedef Traits_2::Curve_2                               Curve_2;
+typedef Traits_2::X_monotone_curve_2                    X_monotone_curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                   Arrangement_2;
+
+int main ()
+{
+  Polyline_traits_2 traits;
+  Polyline_traits_2::Construct_curve_2 poly_const =
+    traits.construct_curve_2_object();
+
+  // Construct an arrangement of four polylines named A--D.
+  Arrangement_2    arr;
+
+  Point_2          points1[5] = {Point_2(0,0), Point_2(2,4), Point_2(3,3),
+                                 Point_2(4,4), Point_2(6,0)};
+  insert (arr, Curve_2 (poly_const (points1, points1 + 5), "A"));
+
+  Point_2          points2[3] = {Point_2(1,5), Point_2(3,3), Point_2(5,5)};
+  insert (arr, Curve_2 (poly_const (points2, points2 + 3), "B"));
+
+  Point_2          points3[4] = {Point_2(1,0), Point_2(2,2),
+                                 Point_2(4,2), Point_2(5,0)};
+  insert (arr, Curve_2 (poly_const (points3, points3 + 4), "C"));
+
+  Point_2          points4[2] = {Point_2(0,2), Point_2(6,2)};
+  insert (arr, Curve_2 (poly_const (points4, points4 + 2), "D"));
+
+  // Print all edges that correspond to an overlapping polyline.
+  Arrangement_2::Edge_iterator    eit;
+
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
+    if (eit->curve().data().length() > 1) {
+      std::cout << "[" << eit->curve() << "]  "
+                << "named: " << eit->curve().data() << std::endl;
+
+      // Rename the curve associated with the edge.
+      arr.modify_edge (eit, X_monotone_curve_2 (eit->curve(), "overlap"));
+    }
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/global_insertion.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/global_insertion.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/global_insertion.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/global_insertion.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/global_removal.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/global_removal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/global_removal.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/global_removal.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/incremental_insertion.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/incremental_insertion.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/incremental_insertion.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/incremental_insertion.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io.cpp
new file mode 100644
index 0000000..e446b1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io.cpp
@@ -0,0 +1,48 @@
+//! \file examples/Arrangement_on_surface_2/io.cpp
+// Using the arrangement I/O operators.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/IO/Arr_iostream.h>
+#include <fstream>
+
+#include "point_location_utils.h"
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>            Traits_2;
+typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
+
+int main ()
+{
+  // Construct the arrangement.
+  Arrangement_2    arr;
+
+  construct_segments_arr (arr);
+
+  std::cout << "Writing an arrangement of size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  // Write the arrangement to a file.
+  std::ofstream    out_file ("arr_ex_io.dat");
+
+  out_file << arr;
+  out_file.close();
+
+  // Read the arrangement from the file.
+  Arrangement_2    arr2;
+  std::ifstream    in_file ("arr_ex_io.dat");
+
+  in_file >> arr2;
+  in_file.close();
+
+  std::cout << "Read an arrangement of size:" << std::endl
+            << "   V = " << arr2.number_of_vertices()
+            << ",  E = " << arr2.number_of_edges()
+            << ",  F = " << arr2.number_of_faces() << std::endl;
+
+  return (0);
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_curve_history.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_curve_history.cpp
new file mode 100644
index 0000000..05ec5ce
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_curve_history.cpp
@@ -0,0 +1,57 @@
+//! \file examples/Arrangement_on_surface_2/io_curve_history.cpp
+// Using the arrangement-with-history I/O operators.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_with_history_2.h>
+#include <CGAL/IO/Arr_with_history_iostream.h>
+#include <fstream>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>            Traits_2;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Curve_2                             Segment_2;
+typedef CGAL::Arrangement_with_history_2<Traits_2>    Arr_with_hist_2;
+
+int main ()
+{
+  Arr_with_hist_2   arr;
+
+  // Insert six additional segments aggregately:
+  Segment_2         segs[6];
+  segs[0] = Segment_2 (Point_2 (2, 6), Point_2 (7, 1));
+  segs[1] = Segment_2 (Point_2 (3, 2), Point_2 (3, 5));
+  segs[2] = Segment_2 (Point_2 (2, 3), Point_2 (5, 3));
+  segs[3] = Segment_2 (Point_2 (2, 6), Point_2 (7, 1));
+  segs[4] = Segment_2 (Point_2 (0, 0), Point_2 (2, 6));
+  segs[5] = Segment_2 (Point_2 (3, 4), Point_2 (6, 4));
+  insert (arr, segs, segs + 6);
+
+  std::cout << "Writing an arrangement of "
+            << arr.number_of_curves() << " input segments:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  // Write the arrangement to a file.
+  std::ofstream     out_file ("arr_ex_io_hist.dat");
+
+  out_file << arr;
+  out_file.close();
+
+  // Read the arrangement from the file.
+  Arr_with_hist_2   arr2;
+  std::ifstream     in_file ("arr_ex_io_hist.dat");
+
+  in_file >> arr2;
+  in_file.close();
+
+  std::cout << "Read an arrangement of "
+            << arr2.number_of_curves() << " input segments:" << std::endl
+            << "   V = " << arr2.number_of_vertices()
+            << ",  E = " << arr2.number_of_edges()
+            << ",  F = " << arr2.number_of_faces() << std::endl;
+
+  return (0);
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_unbounded.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_unbounded.cpp
new file mode 100644
index 0000000..269feba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/io_unbounded.cpp
@@ -0,0 +1,68 @@
+//! \file examples/Arrangement_2/io_unbounded.cpp
+// Using the I/O operators with an arrangement of unbounded curves.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/IO/Arr_iostream.h>
+#include <list>
+#include <fstream>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>         Kernel;
+typedef CGAL::Arr_linear_traits_2<Kernel>             Traits_2;
+typedef Traits_2::Point_2                             Point_2;
+typedef Traits_2::Segment_2                           Segment_2;
+typedef Traits_2::Ray_2                               Ray_2;
+typedef Traits_2::Line_2                              Line_2;
+typedef Traits_2::X_monotone_curve_2                  X_monotone_curve_2;
+typedef CGAL::Arrangement_2<Traits_2>                 Arrangement_2;
+
+int main ()
+{
+  // Construct an arrangement of five linear objects.
+  Arrangement_2                  arr;
+  std::list<X_monotone_curve_2>  curves;
+
+  curves.push_back (Line_2 (Point_2 (0, 0), Point_2 (2, 1)));
+  curves.push_back (Line_2 (Point_2 (0, 0), Point_2 (2, -1)));
+  curves.push_back (Line_2 (Point_2 (-1, 0), Point_2 (-1, 1)));
+  curves.push_back (Ray_2 (Point_2 (2, 3), Point_2 (2, 4)));
+  curves.push_back (Segment_2 (Point_2 (0, 1), Point_2 (0, 2)));
+
+  insert (arr, curves.begin(), curves.end());
+
+  // Print out the size of the resulting arrangement.
+  std::cout << "Writing an arrangement of size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << " (plus " << arr.number_of_vertices_at_infinity()
+            << " at infinity)"
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces()
+            << " (" << arr.number_of_unbounded_faces() << " unbounded)"
+            << std::endl << std::endl;
+
+  // Write the arrangement to a file.
+  std::ofstream    out_file ("arr_ex_io_unbounded.dat");
+
+  out_file << arr;
+  out_file.close();
+
+  // Read the arrangement from the file.
+  Arrangement_2    arr2;
+  std::ifstream    in_file ("arr_ex_io_unbounded.dat");
+
+  in_file >> arr2;
+  in_file.close();
+
+  std::cout << "Read an arrangement of size:" << std::endl
+            << "   V = " << arr2.number_of_vertices()
+            << " (plus " << arr2.number_of_vertices_at_infinity()
+            << " at infinity)"
+            << ",  E = " << arr2.number_of_edges()
+            << ",  F = " << arr2.number_of_faces()
+            << " (" << arr2.number_of_unbounded_faces() << " unbounded)"
+            << std::endl << std::endl;
+
+  return (0);
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/isolated_vertices.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/isolated_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/isolated_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/isolated_vertices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/observer.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/observer.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/observer.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/observer.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/overlay.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/overlay.cpp
new file mode 100644
index 0000000..fb75152
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/overlay.cpp
@@ -0,0 +1,59 @@
+//! \file examples/Arrangement_on_surface_2/overlay.cpp
+// A simple overlay of two arrangements.
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Exact_rational.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_overlay_2.h>
+#include <CGAL/Arr_default_overlay_traits.h>
+
+typedef CGAL::Cartesian<CGAL::Exact_rational>            Kernel;
+typedef CGAL::Arr_segment_traits_2<Kernel>               Traits_2;
+typedef Traits_2::Point_2                                Point_2;
+typedef Traits_2::X_monotone_curve_2                     Segment_2;
+typedef CGAL::Arrangement_2<Traits_2>                    Arrangement_2;
+typedef CGAL::Arr_default_overlay_traits<Arrangement_2>  Overlay_traits;
+
+int main ()
+{
+  // Construct the first arrangement, containing a square-shaped face.
+  Arrangement_2          arr1;
+
+  Segment_2      s1 (Point_2(2, 2), Point_2(6, 2));
+  Segment_2      s2 (Point_2(6, 2), Point_2(6, 6));
+  Segment_2      s3 (Point_2(6, 6), Point_2(2, 6));
+  Segment_2      s4 (Point_2(2, 6), Point_2(2, 2));
+
+  insert_non_intersecting_curve (arr1, s1);
+  insert_non_intersecting_curve (arr1, s2);
+  insert_non_intersecting_curve (arr1, s3);
+  insert_non_intersecting_curve (arr1, s4);
+
+  // Construct the second arrangement, containing a rhombus-shaped face.
+  Arrangement_2          arr2;
+
+  Segment_2      t1 (Point_2(4, 1), Point_2(7, 4));
+  Segment_2      t2 (Point_2(7, 4), Point_2(4, 7));
+  Segment_2      t3 (Point_2(4, 7), Point_2(1, 4));
+  Segment_2      t4 (Point_2(1, 4), Point_2(4, 1));
+
+  insert_non_intersecting_curve (arr2, t1);
+  insert_non_intersecting_curve (arr2, t2);
+  insert_non_intersecting_curve (arr2, t3);
+  insert_non_intersecting_curve (arr2, t4);
+
+  // Compute the overlay of the two arrangements.
+  Arrangement_2          overlay_arr;
+  Overlay_traits         overlay_traits;
+
+  overlay (arr1, arr2, overlay_arr, overlay_traits);
+
+  // Print the size of the overlaid arrangement.
+  std::cout << "The overlaid arrangement size:" << std::endl
+            << "   V = " << overlay_arr.number_of_vertices()
+            << ",  E = " << overlay_arr.number_of_edges()
+            << ",  F = " << overlay_arr.number_of_faces() << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/overlay_unbounded.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/point_location_example.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/point_location_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/point_location_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/point_location_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/point_location_utils.h b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/point_location_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/point_location_utils.h
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/point_location_utils.h
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/points.dat b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/points.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/points.dat
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/points.dat
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_bezier.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_bezier.cpp
new file mode 100644
index 0000000..17081df
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_bezier.cpp
@@ -0,0 +1,94 @@
+// Constructing a arrangement of Bezier polycurves.
+
+#include <CGAL/basic.h>
+
+#ifndef CGAL_USE_CORE
+
+#include <iostream>
+
+int main()
+{
+  std::cout << "Sorry, this example needs CORE ..." << std::endl;
+  return 0;
+}
+
+#else
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/CORE_algebraic_number_traits.h>
+#include <CGAL/Arr_Bezier_curve_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_polycurve_traits_2.h>
+#include "arr_print.h"
+
+typedef CGAL::CORE_algebraic_number_traits             Nt_traits;
+typedef Nt_traits::Rational                            NT;
+typedef Nt_traits::Rational                            Rational;
+typedef Nt_traits::Algebraic                           Algebraic;
+typedef CGAL::Cartesian<Rational>                      Rat_kernel;
+typedef CGAL::Cartesian<Algebraic>                     Alg_kernel;
+typedef Rat_kernel::Point_2                            Rat_point_2;
+typedef CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
+                                                       Bezier_traits;
+typedef Bezier_traits::Curve_2                         Bezier_curve_2;
+typedef Bezier_traits::X_monotone_curve_2              Bezier_x_curve_2;
+typedef CGAL::Arr_polycurve_traits_2<Bezier_traits>    Polycurve_bezier_traits_2;
+typedef Polycurve_bezier_traits_2::X_monotone_curve_2  X_mono_polycurve;
+typedef CGAL::Arrangement_2<Polycurve_bezier_traits_2> Arrangement_2;
+
+int main()
+{
+  Polycurve_bezier_traits_2 pc_traits;
+  Bezier_traits bezier_traits;
+
+  Polycurve_bezier_traits_2::Construct_x_monotone_curve_2
+    construct_x_mono_polycurve =
+    pc_traits.construct_x_monotone_curve_2_object();
+
+  std::vector<Bezier_x_curve_2> x_bezier_curves;
+  // Get the name of the input file from the command line, or use the default
+  // Bezier.dat file if no command-line parameters are given.
+  const char* filename = "Bezier_polycurve.dat";
+
+  // Open the input file.
+  std::ifstream in_file (filename);
+
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open " << filename << std::endl;
+    return 1;
+  }
+
+  // Read the curves from the input file.
+  unsigned int n_curves;
+  std::list<Bezier_x_curve_2> x_curves;
+  Bezier_curve_2 B;
+
+  in_file >> n_curves;
+  unsigned int k;
+  for (k = 0; k < n_curves; ++k) {
+    // Read the current curve (specified by its control points).
+    in_file >> B;
+    //convert it into x-monotone bezier curve.
+    std::vector<CGAL::Object> obj_vector;
+    bezier_traits.make_x_monotone_2_object()(B, std::back_inserter(obj_vector));
+    Bezier_x_curve_2 x_seg =
+      CGAL::object_cast<Bezier_x_curve_2>((obj_vector[0]));
+    x_curves.push_back(x_seg);
+  }
+
+  X_mono_polycurve polycurve =
+    construct_x_mono_polycurve(x_curves.begin(), x_curves.end());
+
+  // Construct the arrangement.
+  Arrangement_2 arr;
+  insert(arr, polycurve);
+
+  // Print the arrangement size.
+  std::cout << "The arrangement size:" << std::endl
+            << "   V = " << arr.number_of_vertices()
+            << ",  E = " << arr.number_of_edges()
+            << ",  F = " << arr.number_of_faces() << std::endl;
+
+  return 0;
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp
new file mode 100644
index 0000000..911fcb5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp
@@ -0,0 +1,131 @@
+// Constructing an arrangement of polycurves.
+
+#include <CGAL/basic.h>
+
+#ifndef CGAL_USE_CORE
+
+#include <iostream>
+
+int main()
+{
+  std::cout << "Sorry, this example needs CORE ..." << std::endl;
+  return 0;
+}
+
+#else
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Quotient.h>
+#include <CGAL/MP_Float.h>
+#include <CGAL/CORE_algebraic_number_traits.h>
+#include <vector>
+#include <list>
+#include <CGAL/Arr_polycurve_traits_2.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include "arr_print.h"
+
+typedef CGAL::Quotient<CGAL::MP_Float>                Number_type;
+typedef CGAL::Cartesian<Number_type>                  Kernel;
+typedef CGAL::Arr_circle_segment_traits_2<Kernel>     Arc_traits_2;
+typedef CGAL::Arr_polycurve_traits_2<Arc_traits_2>    Polycurve_arc_traits_2;
+
+typedef Arc_traits_2::CoordNT                         CoordNT;
+typedef Arc_traits_2::Point_2                         Point_2;
+typedef Arc_traits_2::Curve_2                         Arc_section_2;
+typedef Arc_traits_2::X_monotone_curve_2              Arc_x_monotone_section_2;
+
+typedef Polycurve_arc_traits_2::X_monotone_curve_2    X_monotone_polycurve;
+typedef Polycurve_arc_traits_2::Curve_2               Polycurve;
+typedef Kernel::Circle_2                              Circle_2;
+typedef CGAL::Arrangement_2<Polycurve_arc_traits_2>
+  Polycurve_circ_arc_arrangment;
+
+int main()
+{
+  Polycurve_arc_traits_2 traits;
+
+  //Containers to store conic curves that will be used to create polycurve.
+  std::vector<Arc_section_2> curves;
+  std::vector<Arc_x_monotone_section_2> x_curves;
+
+  // Create a circular arc of the circle, directed clockwise from
+  // (-1, 0) to (1, 0) centered at (0,0). Note that we orient the
+  // supporting circle accordingly.
+  Kernel::Point_2 c1(0, 0);
+  Point_2 s1(Number_type(-1, 1), Number_type(0, 1));
+  Point_2 t1(Number_type(1, 1), Number_type(0, 1));
+  Arc_section_2 circ_arc1(c1, 1, CGAL::CLOCKWISE, s1, t1);
+  curves.push_back(circ_arc1);
+
+  // Create a circular arc of the unit circle, directed clockwise from
+  // (1, 0) to (3, 0) centered at (3,0). Note that we orient the
+  // supporting circle accordingly.
+  Kernel::Point_2 c2(3, 0);
+  Point_2 s2(Number_type(1, 1), Number_type(0, 1));
+  Point_2 t2(Number_type(5, 1), Number_type(0, 1));
+  Arc_section_2 circ_arc2(c2, 2, CGAL::CLOCKWISE, s2, t2);
+  curves.push_back(circ_arc2);
+
+  // Create polycurve
+  Polycurve polycurve_1 =
+    traits.construct_curve_2_object()(curves.begin(), curves.end());
+
+  // Empty the vector in order to create another polycurve.
+  curves.clear();
+
+  // Create a circular arc of the circle, directed clockwise from
+  // (-10, 13) to (-7, 10) centered at (-10,10). Note that we orient the
+  // supporting circle accordingly.
+  Kernel::Point_2 c3(-10, 10);
+  Point_2 s3(Number_type(-10, 1), Number_type(13, 1));
+  Point_2 t3(Number_type(-7, 1), Number_type(10, 1));
+  Arc_section_2 circ_arc3(c3, 3, CGAL::CLOCKWISE, s3, t3);
+  curves.push_back(circ_arc3);
+
+  Kernel::Point_2 c4(-20, 10);
+  Point_2 s4(Number_type(-7, 1), Number_type(10, 1));
+  Point_2 t4(Number_type(-20, 1), Number_type(23, 1));
+  Arc_section_2 circ_arc4(c4, 13, CGAL::CLOCKWISE, s4, t4);
+  curves.push_back(circ_arc4);
+
+  Kernel::Point_2 c5(-20, 25);
+  Point_2 s5(Number_type(-20, 1), Number_type(23, 1));
+  Point_2 t5(Number_type(-20, 1), Number_type(27, 1));
+  Arc_section_2 circ_arc5(c5, 2, CGAL::CLOCKWISE, s5, t5);
+  curves.push_back(circ_arc5);
+
+  Polycurve polycurve_2 =
+    traits.construct_curve_2_object()(curves.begin(), curves.end());
+
+  //circle to be used by x-monotone polycurve
+  Kernel::Point_2 circle_center1(Number_type(10, 1), Number_type(10, 1));
+  Circle_2 circ_1(circle_center1, 4, CGAL::CLOCKWISE);
+  Point_2 s6(Number_type(8, 1), Number_type(10, 1));
+  Point_2 t6(Number_type(12, 1), Number_type(10, 1));
+  Arc_x_monotone_section_2 xc1(circ_1, s6, t6, CGAL::CLOCKWISE);
+  x_curves.push_back(xc1);
+
+  Kernel::Point_2 circle_center2(Number_type(13, 1), Number_type(10, 1));
+  Circle_2 circ_2(circle_center2, 1, CGAL::CLOCKWISE);
+  Point_2 s7(Number_type(12, 1), Number_type(10, 1));
+  Point_2 t7(Number_type(14, 1), Number_type(10, 1));
+  Arc_x_monotone_section_2 xc2(circ_2, s7, t7, CGAL::CLOCKWISE);
+  x_curves.push_back(xc2);
+
+  //create x-monotone polycurve
+  X_monotone_polycurve x_polycurve_1 =
+    traits.construct_x_monotone_curve_2_object()(x_curves.begin(),
+                                                 x_curves.end());
+
+  // Insert polycurves to Arangment and print.
+  Polycurve_circ_arc_arrangment polycurve_arrangment(&traits);
+  insert(polycurve_arrangment, polycurve_1);
+  insert(polycurve_arrangment, polycurve_2);
+  insert(polycurve_arrangment, x_polycurve_1);
+  std::cout << "Arrangment Statistics: " << std::endl;
+  print_arrangement(polycurve_arrangment);
+
+  return 0;
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_conic.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_conic.cpp
new file mode 100644
index 0000000..6bef40a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_conic.cpp
@@ -0,0 +1,146 @@
+// Testing the do_equal function
+
+#include <CGAL/basic.h>
+
+#ifndef CGAL_USE_CORE
+
+#include <iostream>
+
+int main()
+{
+  std::cout << "Sorry, this example needs CORE ..." << std::endl;
+  return 0;
+}
+
+#else
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/Quotient.h>
+#include <CGAL/MP_Float.h>
+#include <CGAL/CORE_algebraic_number_traits.h>
+#include <vector>
+#include <list>
+
+#include <CGAL/Arr_polycurve_traits_2.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include "arr_print.h"
+
+typedef CGAL::CORE_algebraic_number_traits            Nt_traits;
+typedef Nt_traits::Rational                           Rational;
+typedef Nt_traits::Algebraic                          Algebraic;
+typedef CGAL::Cartesian<Rational>                     Rat_kernel;
+typedef CGAL::Cartesian<Algebraic>                    Alg_kernel;
+typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
+  Conic_traits_2;
+typedef Conic_traits_2::Point_2                       Conic_point_2;
+typedef Conic_traits_2::Curve_2                       Conic_curve_2;
+typedef Conic_traits_2::X_monotone_curve_2            Conic_x_monotone_curve_2;
+typedef CGAL::Arr_polycurve_traits_2<Conic_traits_2>  Polycurve_conic_traits_2;
+typedef Polycurve_conic_traits_2::X_monotone_curve_2  X_monotone_polycurve;
+typedef Polycurve_conic_traits_2::Curve_2             Polycurve;
+typedef CGAL::Arrangement_2<Polycurve_conic_traits_2> Polycurve_conic_arrangment;
+
+int main()
+{
+  Polycurve_conic_traits_2 traits;
+
+  // Polycurve construction functors
+  Polycurve_conic_traits_2::Construct_x_monotone_curve_2
+    construct_x_mono_polycurve = traits.construct_x_monotone_curve_2_object();
+  Polycurve_conic_traits_2::Construct_curve_2  construct_polycurve =
+    traits.construct_curve_2_object();
+
+  // Containers to store conic curves that will be used to create polycurve.
+  std::vector<Conic_curve_2> conic_curves;
+  std::vector<Conic_x_monotone_curve_2> xmono_conic_curves_2;
+
+  // Create polycurves
+  // y=x^2
+  Conic_curve_2 c3(1,0,0,0,-1,0,CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(0), Algebraic(0)),
+                   Conic_point_2(Algebraic(3), Algebraic(9)));
+  Conic_curve_2 c4(1,0,0,0,-1,0,CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(3), Algebraic(9)),
+                   Conic_point_2(Algebraic(5), Algebraic(25)));
+  Conic_curve_2 c5(0,1,0,1,0,0, CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(-25), Algebraic(-5)),
+                   Conic_point_2(Algebraic(0), Algebraic(0)));
+
+  Conic_curve_2 c6(1,1,0,6,-26,162,CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(-7), Algebraic(13)),
+                   Conic_point_2(Algebraic(-3), Algebraic(9)));
+  Conic_curve_2 c7(1,0,0,0,-1,0,CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(-3), Algebraic(9)),
+                   Conic_point_2(Algebraic(0), Algebraic(0)));
+  Conic_curve_2 c8(0,1,0,-1,0,0, CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(0), Algebraic(0)),
+                   Conic_point_2(Algebraic(4), Algebraic(-2)));
+
+  Conic_curve_2 c9(1,0,0,0,-1,0,CGAL::COUNTERCLOCKWISE,
+                   Conic_point_2(Algebraic(-5), Algebraic(25)),
+                   Conic_point_2(Algebraic(5), Algebraic(25)));
+
+  // Construct poly-curve
+  conic_curves.clear();
+  conic_curves.push_back(c9);
+  Polycurve conic_polycurve_1 =
+    construct_polycurve(conic_curves.begin(), conic_curves.end());
+
+  Conic_curve_2 c11(0,1,0,-1,0,0,CGAL::COUNTERCLOCKWISE,
+                    Conic_point_2(Algebraic(25), Algebraic(-5)),
+                    Conic_point_2(Algebraic(0), Algebraic(0)));
+  Conic_curve_2 c12(1,0,0,0,-1,0,CGAL::COUNTERCLOCKWISE,
+                    Conic_point_2(Algebraic(0), Algebraic(0)),
+                    Conic_point_2(Algebraic(5), Algebraic(25)));
+
+  // Construct poly-curve
+  conic_curves.clear();
+  conic_curves.push_back(c11);
+  conic_curves.push_back(c12);
+  Polycurve conic_polycurve_2 =
+    construct_polycurve(conic_curves.begin(), conic_curves.end());
+
+  // Construct x-monotone conic curves from conic curves
+  Conic_x_monotone_curve_2 xc3(c3);
+  Conic_x_monotone_curve_2 xc4(c4);
+  Conic_x_monotone_curve_2 xc5(c5);
+  Conic_x_monotone_curve_2 xc6(c6);
+  Conic_x_monotone_curve_2 xc7(c7);
+  Conic_x_monotone_curve_2 xc8(c8);
+
+  // Construct x-monotone poly-curve from x-monotone conic curves.
+  xmono_conic_curves_2.clear();
+  xmono_conic_curves_2.push_back(xc5);
+  xmono_conic_curves_2.push_back(xc3);
+  xmono_conic_curves_2.push_back(xc4);
+  X_monotone_polycurve conic_x_mono_polycurve_1 =
+    construct_x_mono_polycurve(xmono_conic_curves_2.begin(),
+                               xmono_conic_curves_2.end());
+
+  // Construct x-monotone poly-curve.
+  xmono_conic_curves_2.clear();
+  xmono_conic_curves_2.push_back(xc6);
+  xmono_conic_curves_2.push_back(xc7);
+  xmono_conic_curves_2.push_back(xc8);
+  X_monotone_polycurve conic_x_mono_polycurve_2 =
+    construct_x_mono_polycurve(xmono_conic_curves_2.begin(),
+                               xmono_conic_curves_2.end());
+
+  // Insert the Polycurves into arrangment and print.
+  Polycurve_conic_arrangment x_pc_arrangment(&traits);
+  insert(x_pc_arrangment, conic_x_mono_polycurve_1);
+  insert(x_pc_arrangment, conic_x_mono_polycurve_2);
+  std::cout << "X-monotone polycurve arrangement Statistics: " << std::endl;
+  print_arrangement(x_pc_arrangment);
+
+  Polycurve_conic_arrangment pc_arrangment(&traits);
+  insert(pc_arrangment, conic_polycurve_1);
+  insert(pc_arrangment, conic_polycurve_2);
+  std::cout << "Polycurve arrangement Statistics: " << std::endl;
+  print_arrangement(pc_arrangment);
+
+  return 0;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
new file mode 100644
index 0000000..6d5bfd6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
@@ -0,0 +1,73 @@
+//! \file examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
+// Constructing an arrangement of polygeodesics.
+
+#define CGAL_IDENTIFICATION_XY 2
+
+#include <vector>
+#include <list>
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
+#include <CGAL/Arr_spherical_topology_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arrangement_on_surface_2.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel    Kernel;
+typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>    Segment_traits_2;
+typedef CGAL::Arr_polyline_traits_2<Segment_traits_2>        Poly_traits_2;
+
+typedef Poly_traits_2::Point_2                               Point_2;
+typedef Poly_traits_2::Curve_2                               Poly_curve_2;
+typedef Poly_traits_2::X_monotone_curve_2                    X_poly_curve_2;
+typedef CGAL::Arr_spherical_topology_traits_2<Poly_traits_2>
+  Topol_poly_traits_2;
+typedef CGAL::Arrangement_on_surface_2<Poly_traits_2, Topol_poly_traits_2>
+                                                             Poly_arr;
+
+typedef Segment_traits_2::Curve_2                            Seg_curve_2;
+typedef Segment_traits_2::X_monotone_curve_2                 X_seg_curve_2;
+typedef CGAL::Arr_spherical_topology_traits_2<Segment_traits_2>
+  Topol_segment_traits_2;
+typedef CGAL::Arrangement_on_surface_2<Segment_traits_2, Topol_segment_traits_2>
+                                                             Segment_arr;
+
+int main()
+{
+  Point_2 p1(0, 1, -1);
+  Point_2 p2(-11, 7, -7);
+  Point_2 p3(-1, 0, 0);
+  Point_2 p4(-11, 7, 7);
+  Point_2 p5(-1, 1, 1);
+
+  Segment_traits_2 seg_traits;
+  Segment_arr seg_arr(&seg_traits);
+  X_seg_curve_2 seg_cv1(p1, p2);
+  X_seg_curve_2 seg_cv2(p2, p3);
+  X_seg_curve_2 seg_cv3(p3, p4);
+  X_seg_curve_2 seg_cv4(p4, p5);
+
+  insert(seg_arr, seg_cv1);
+  insert(seg_arr, seg_cv2);
+  insert(seg_arr, seg_cv3);
+  insert(seg_arr, seg_cv4);
+  std::cout << "# seg. vertives: " << seg_arr.number_of_vertices() << std::endl;
+
+  std::list<Point_2> points;
+  points.push_back(p1);
+  points.push_back(p2);
+  points.push_back(p3);
+  points.push_back(p4);
+  points.push_back(p5);
+
+  Poly_traits_2 poly_traits;
+  Poly_traits_2::Construct_x_monotone_curve_2 ctr =
+    poly_traits.construct_x_monotone_curve_2_object();
+  Poly_arr poly_arr(&poly_traits);
+  insert(poly_arr, ctr(seg_cv1));
+  insert(poly_arr, ctr(seg_cv2));
+  insert(poly_arr, ctr(seg_cv3));
+  insert(poly_arr, ctr(seg_cv4));
+  std::cout << "# poly vertives: " << poly_arr.number_of_vertices() << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurves_basic.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurves_basic.cpp
new file mode 100644
index 0000000..bdd1e4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polycurves_basic.cpp
@@ -0,0 +1,50 @@
+//! \file examples/Arrangement_on_surface_2/polylines.cpp
+// Constructing an arrangement of polylines.
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Arr_directional_non_caching_segment_basic_traits_2.h>
+#include <CGAL/Arr_polycurve_basic_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <vector>
+#include <list>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+typedef CGAL::Arr_directional_non_caching_segment_basic_traits_2<Kernel>
+                                                          Subcurve_traits_2;
+typedef CGAL::Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+                                                          Geom_traits_2;
+typedef Geom_traits_2::Point_2                            Point_2;
+typedef Subcurve_traits_2::X_monotone_curve_2             X_monotone_subcurve_2;
+typedef Geom_traits_2::X_monotone_curve_2                 X_monotone_curve_2;
+typedef CGAL::Arrangement_2<Geom_traits_2>                Arrangement_2;
+
+int main()
+{
+  Geom_traits_2 traits;
+  Arrangement_2 arr(&traits);
+
+  Geom_traits_2::Construct_x_monotone_curve_2 ctr =
+    traits.construct_x_monotone_curve_2_object();
+
+  std::vector<X_monotone_subcurve_2> segs1;
+  segs1.push_back(X_monotone_subcurve_2(Point_2(0, 0), Point_2(1, 1)));
+  segs1.push_back(X_monotone_subcurve_2(Point_2(1, 1), Point_2(2, 2)));
+  segs1.push_back(X_monotone_subcurve_2(Point_2(2, 2), Point_2(3, 1)));
+  segs1.push_back(X_monotone_subcurve_2(Point_2(3, 1), Point_2(4, 0)));
+  X_monotone_curve_2 pc1 = ctr(segs1.begin(), segs1.end());
+
+  std::vector<X_monotone_subcurve_2> segs2;
+  segs2.push_back(X_monotone_subcurve_2(Point_2(0, 0), Point_2(1, 1)));
+  segs2.push_back(X_monotone_subcurve_2(Point_2(1, 1), Point_2(2, 2)));
+  segs2.push_back(X_monotone_subcurve_2(Point_2(2, 2), Point_2(3, 1)));
+  segs2.push_back(X_monotone_subcurve_2(Point_2(3, 1), Point_2(4, 0)));
+  X_monotone_curve_2 pc2 = ctr(segs2.begin(), segs2.end());
+
+  insert_non_intersecting_curve(arr, pc1);
+  insert_non_intersecting_curve(arr, pc2);
+
+  std::cout << "# vertices: " << arr.number_of_vertices() << std::endl;;
+  std::cout << "# halfedges: " << arr.number_of_halfedges() << std::endl;;
+  std::cout << "# faces: " << arr.number_of_faces() << std::endl;;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/polylines.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polylines.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/polylines.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/polylines.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/predefined_kernel.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/predefined_kernel.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/predefined_kernel.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/predefined_kernel.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/rational_functions.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/rational_functions.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/rational_functions.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/rational_functions.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/special_edge_insertion.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/special_edge_insertion.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/special_edge_insertion.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/special_edge_insertion.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/spherical_insert.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/spherical_insert.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/spherical_insert.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/spherical_insert.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/tracing_counting.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/tracing_counting.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/tracing_counting.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/tracing_counting.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unbounded_non_intersecting.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unbounded_non_intersecting.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unbounded_non_intersecting.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unbounded_non_intersecting.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unbounded_rational_functions.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unbounded_rational_functions.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/unbounded_rational_functions.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/unbounded_rational_functions.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp b/3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
rename to 3rdparty/CGAL-4.8/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
diff --git a/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/CMakeLists.txt
new file mode 100644
index 0000000..02119ee
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( BGL_OpenMesh )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost REQUIRED )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+find_package( OpenMesh QUIET )
+
+if ( OpenMesh_FOUND )
+include( UseOpenMesh )
+else()
+  message(STATUS "Examples that use OpenMesh will not be compiled.")
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+# Creating entries for all C++ files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+if(OpenMesh_FOUND)
+create_single_source_cgal_program( "TriMesh.cpp" )
+  target_link_libraries( TriMesh ${OPENMESH_LIBRARIES} )
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/TriMesh.cpp b/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/TriMesh.cpp
new file mode 100644
index 0000000..c28e11f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_OpenMesh/TriMesh.cpp
@@ -0,0 +1,51 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+
+#include <CGAL/mesh_segmentation.h>
+
+#include <CGAL/property_map.h>
+
+#include <iostream>
+#include <fstream>
+
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+typedef OpenMesh::TriMesh_ArrayKernelT</* MyTraits*/> Mesh;
+
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+typedef boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
+
+
+int main(int argc, char** argv )
+{
+  Mesh mesh;
+
+  std::vector<vertex_descriptor> V;
+  V.push_back(add_vertex(mesh));
+  V.push_back(add_vertex(mesh));
+  V.push_back(add_vertex(mesh));
+  add_face(V.begin(), V.end(), mesh);
+
+  //  OpenMesh::IO::read_mesh(mesh, (argc>1)?argv[1]:"in.off");
+  
+  BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){
+    BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_target(vd,mesh)){
+      if(! CGAL::is_border(edge(hd,mesh),mesh)){
+        CGAL::Euler::flip_edge(hd,mesh);
+        OpenMesh::IO::write_mesh(mesh, (argc>2)?argv[2]:"out.off");
+        return 0;
+      }
+    }
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/CMakeLists.txt
new file mode 100644
index 0000000..b380794
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( BGL_arrangement_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "arrangement_dual.cpp" )
+  create_single_source_cgal_program( "primal.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/arr_print.h b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arr_print.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_arrangement_2/arr_print.h
rename to 3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arr_print.h
diff --git a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/arr_rational_nt.h b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arr_rational_nt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_arrangement_2/arr_rational_nt.h
rename to 3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arr_rational_nt.h
diff --git a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/dual.cpp b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arrangement_dual.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_arrangement_2/dual.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_arrangement_2/arrangement_dual.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_arrangement_2/primal.cpp b/3rdparty/CGAL-4.8/examples/BGL_arrangement_2/primal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_arrangement_2/primal.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_arrangement_2/primal.cpp
diff --git a/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/CMakeLists.txt
new file mode 100644
index 0000000..a84cf74
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/CMakeLists.txt
@@ -0,0 +1,73 @@
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( BGL_polyhedron_3 )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost REQUIRED )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+find_package( OpenMesh QUIET )
+
+if ( OpenMesh_FOUND )
+include( UseOpenMesh )
+else()
+  message(STATUS "Examples that use OpenMesh will not be compiled.")
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+# Creating entries for all C++ files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+create_single_source_cgal_program( "distance.cpp" )
+
+create_single_source_cgal_program( "incident_vertices.cpp" )
+
+create_single_source_cgal_program( "kruskal.cpp" )
+
+create_single_source_cgal_program( "kruskal_with_stored_id.cpp" )
+
+create_single_source_cgal_program( "normals.cpp" )
+
+create_single_source_cgal_program( "range.cpp" )
+
+create_single_source_cgal_program( "transform_iterator.cpp" )
+
+
+
+if(OpenMesh_FOUND)
+  create_single_source_cgal_program( "polyhedron_2_OpenMesh.cpp" )
+  target_link_libraries( polyhedron_2_OpenMesh ${OPENMESH_LIBRARIES} )
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/cube.off b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/cube.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/cube.off
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/cube.off
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/distance.cmd b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/distance.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/distance.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/distance.cmd
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/distance.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/distance.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/distance.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/distance.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/incident_vertices.cmd b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/incident_vertices.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/incident_vertices.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/incident_vertices.cmd
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/incident_vertices.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/incident_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/incident_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/incident_vertices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/kruskal.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/kruskal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/kruskal.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/kruskal.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/normals.cmd b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/normals.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/normals.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/normals.cmd
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/normals.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/normals.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/normals.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/normals.cpp
diff --git a/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp
new file mode 100644
index 0000000..55f64a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp
@@ -0,0 +1,87 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+
+#if 1
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#else
+#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
+#include <CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h>
+#endif
+
+#include <CGAL/boost/graph/convert_surface_mesh.h>
+
+#include <boost/unordered_map.hpp>
+
+#include <iostream>
+#include <fstream>
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel  Kernel;
+typedef Kernel::Vector_3                                     Vector;
+typedef Kernel::Point_3                                      Point;
+typedef CGAL::Polyhedron_3<Kernel>                           Source;
+
+#if 1
+typedef OpenMesh::PolyMesh_ArrayKernelT</* MyTraits*/> Target;
+#else
+typedef OpenMesh::TriMesh_ArrayKernelT</* MyTraits*/> Target;
+#endif
+typedef boost::graph_traits<Source>::vertex_descriptor sm_vertex_descriptor;
+typedef boost::graph_traits<Target>::vertex_descriptor tm_vertex_descriptor;
+
+typedef boost::graph_traits<Source>::halfedge_descriptor sm_halfedge_descriptor;
+typedef boost::graph_traits<Target>::halfedge_descriptor tm_halfedge_descriptor;
+
+namespace OpenMesh {
+
+inline  std::size_t hash_value(const VertexHandle&  i)
+  {
+    return i.idx();
+  }
+
+inline  std::size_t hash_value(const HalfedgeHandle&  i)
+  {
+    return i.idx();
+  }
+
+inline  std::size_t hash_value(const FaceHandle&  i)
+  {
+    return i.idx();
+  }
+
+}
+
+int main(int argc, char* argv[])
+{
+  Source S;
+  Target T;
+  std::ifstream in((argc>1)?argv[1]:"cube.off");
+  in >> S;
+
+  {
+    boost::unordered_map<sm_vertex_descriptor, tm_vertex_descriptor> v2v;
+    boost::unordered_map<sm_halfedge_descriptor, tm_halfedge_descriptor> h2h;
+    
+    convert_surface_mesh(S,T,v2v,h2h);
+    OpenMesh::IO::write_mesh(T, "om.off");
+  }
+  S.clear();
+  {
+    boost::unordered_map<tm_vertex_descriptor, sm_vertex_descriptor> v2v;
+    boost::unordered_map<tm_halfedge_descriptor, sm_halfedge_descriptor> h2h;
+    
+    convert_surface_mesh(T,S,v2v,h2h);
+    std::ofstream out("reverse.off");
+    out << S << std::endl;
+  }
+
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/range.cmd b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/range.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/range.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/range.cmd
diff --git a/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/range.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/range.cpp
new file mode 100644
index 0000000..a543394
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/range.cpp
@@ -0,0 +1,68 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Iterator_range.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <boost/foreach.hpp>
+
+
+#include <iostream>
+#include <fstream>
+#include <list>
+#include <algorithm>
+
+
+typedef CGAL::Simple_cartesian<double>                       Kernel;
+typedef CGAL::Polyhedron_3<Kernel>                           Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator   vertex_iterator;
+
+typedef CGAL::Iterator_range<vertex_iterator> vertex_range;
+
+
+vertex_range vertices_range(const Polyhedron& p)
+{
+  return vertex_range(vertices(p));
+}
+
+struct Fct
+{
+  void operator()(const vertex_descriptor& vd) const
+  {
+    std::cout << vd->point() << std::endl;
+  }
+};
+
+void fct(const Polyhedron& p)
+{
+  vertex_range vr(vertices(p));
+  
+#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR
+  std::cout << "new for loop" << std::endl;
+  for(vertex_descriptor vd : vr){
+    std::cout << vd->point() << std::endl;
+  }
+#endif
+  
+  std::cout << "BOOST_FOREACH" << std::endl;
+  BOOST_FOREACH(vertex_descriptor vd, vr){
+    std::cout << vd->point() << std::endl;
+  }
+  
+  std::cout << "boost::tie + std::for_each" << std::endl;
+  vertex_iterator vb, ve;
+  
+  boost::tie(vb,ve) = vertices_range(p);
+  std::for_each(vb,ve, Fct());
+}
+
+int main(int, char** argv)
+{
+  Polyhedron P;  
+  std::ifstream in(argv[1]);
+  in >> P ;
+
+  fct(P);
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/transform_iterator.cmd b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/transform_iterator.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/transform_iterator.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/transform_iterator.cmd
diff --git a/3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/transform_iterator.cpp b/3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/transform_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_polyhedron_3/transform_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_polyhedron_3/transform_iterator.cpp
diff --git a/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/CMakeLists.txt
new file mode 100644
index 0000000..9019b9a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( BGL_surface_mesh_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "connected_components.cpp" )
+  create_single_source_cgal_program( "prim.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/connected_components.cpp b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/connected_components.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_surface_mesh/connected_components.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_surface_mesh/connected_components.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/data/prim.off b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/data/prim.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_surface_mesh/data/prim.off
rename to 3rdparty/CGAL-4.8/examples/BGL_surface_mesh/data/prim.off
diff --git a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/prim.cmd b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/prim.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_surface_mesh/prim.cmd
rename to 3rdparty/CGAL-4.8/examples/BGL_surface_mesh/prim.cmd
diff --git a/3rdparty/CGAL-4.6/examples/BGL_surface_mesh/prim.cpp b/3rdparty/CGAL-4.8/examples/BGL_surface_mesh/prim.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_surface_mesh/prim.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_surface_mesh/prim.cpp
diff --git a/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/CMakeLists.txt
new file mode 100644
index 0000000..0792542
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( BGL_triangulation_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "dijkstra.cpp" )
+  create_single_source_cgal_program( "dijkstra_with_internal_properties.cpp" )
+  create_single_source_cgal_program( "emst.cpp" )
+  create_single_source_cgal_program( "face_graph.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/dijkstra.cpp b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/dijkstra.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_triangulation_2/dijkstra.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_triangulation_2/dijkstra.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/dijkstra_with_internal_properties.cpp b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/dijkstra_with_internal_properties.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_triangulation_2/dijkstra_with_internal_properties.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_triangulation_2/dijkstra_with_internal_properties.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/emst.cpp b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/emst.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_triangulation_2/emst.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_triangulation_2/emst.cpp
diff --git a/3rdparty/CGAL-4.6/examples/BGL_triangulation_2/face_graph.cpp b/3rdparty/CGAL-4.8/examples/BGL_triangulation_2/face_graph.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/BGL_triangulation_2/face_graph.cpp
rename to 3rdparty/CGAL-4.8/examples/BGL_triangulation_2/face_graph.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/CMakeLists.txt
new file mode 100644
index 0000000..9de385a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Barycentric_coordinates_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Discrete_harmonic_coordinates_example.cpp" )
+  create_single_source_cgal_program( "Mean_value_coordinates_example.cpp" )
+  create_single_source_cgal_program( "Segment_coordinates_example.cpp" )
+  create_single_source_cgal_program( "Terrain_height_modeling.cpp" )
+  create_single_source_cgal_program( "Triangle_coordinates_example.cpp" )
+  create_single_source_cgal_program( "Triangle_coordinates_speed_test.cpp" )
+  create_single_source_cgal_program( "Wachspress_coordinates_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Mean_value_coordinates_example.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Mean_value_coordinates_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Mean_value_coordinates_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Mean_value_coordinates_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Terrain_height_modeling.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Terrain_height_modeling.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Terrain_height_modeling.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Terrain_height_modeling.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Triangle_coordinates_example.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Triangle_coordinates_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Triangle_coordinates_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Triangle_coordinates_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Triangle_coordinates_speed_test.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Triangle_coordinates_speed_test.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Triangle_coordinates_speed_test.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Triangle_coordinates_speed_test.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp b/3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/CMakeLists.txt
new file mode 100644
index 0000000..d33b944
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Boolean_set_operations_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "bezier_traits_adapter.cpp" )
+  create_single_source_cgal_program( "bezier_traits_adapter2.cpp" )
+  create_single_source_cgal_program( "circle_segment.cpp" )
+  create_single_source_cgal_program( "conic_traits_adapter.cpp" )
+  create_single_source_cgal_program( "connect_polygon.cpp" )
+  create_single_source_cgal_program( "do_intersect.cpp" )
+  create_single_source_cgal_program( "dxf_union.cpp" )
+  create_single_source_cgal_program( "sequence.cpp" )
+  create_single_source_cgal_program( "set_union.cpp" )
+  create_single_source_cgal_program( "simple_join_intersect.cpp" )
+  create_single_source_cgal_program( "symmetric_difference.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/README b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/README
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/README
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_a.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_a.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_a.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_a.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_b.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_b.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_b.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_b.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_c.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_c.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_c.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_c.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_d.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_d.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_d.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_d.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_e.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_e.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_e.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_e.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_f.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_f.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_f.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_f.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_g.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_g.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_g.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_g.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_h.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_h.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_h.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_h.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_i.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_i.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_i.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_i.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_j.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_j.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_j.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_j.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_k.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_k.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/amer_k.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/amer_k.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bezier_traits_adapter.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bezier_traits_adapter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bezier_traits_adapter.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bezier_traits_adapter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bso_rational_nt.h b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bso_rational_nt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/bso_rational_nt.h
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/bso_rational_nt.h
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_g.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_g.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_g.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_g.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_g.dat b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_g.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_g.dat
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_g.dat
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_m.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_m.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_m.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_m.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_m.dat b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_m.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/char_m.dat
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/char_m.dat
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/circle_segment.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/circle_segment.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/circle_segment.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/circle_segment.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/conic_traits_adapter.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/conic_traits_adapter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/conic_traits_adapter.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/conic_traits_adapter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/connect_polygon.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/connect_polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/connect_polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/connect_polygon.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/do_intersect.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/do_intersect.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/do_intersect.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/do_intersect.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/dxf_union.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/dxf_union.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/dxf_union.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/dxf_union.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/input_0.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/input_0.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/input_0.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/input_0.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/input_1.bps b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/input_1.bps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/input_1.bps
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/input_1.bps
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/pgn_holes.dat b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/pgn_holes.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/pgn_holes.dat
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/pgn_holes.dat
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/print_utils.h b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/print_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/print_utils.h
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/print_utils.h
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/sequence.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/sequence.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/sequence.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/sequence.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/set_union.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/set_union.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/set_union.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/set_union.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/simple_join_intersect.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/simple_join_intersect.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/simple_join_intersect.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/simple_join_intersect.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/symmetric_difference.cpp b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/symmetric_difference.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/symmetric_difference.cpp
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/symmetric_difference.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/test.dxf b/3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/test.dxf
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Boolean_set_operations_2/test.dxf
rename to 3rdparty/CGAL-4.8/examples/Boolean_set_operations_2/test.dxf
diff --git a/3rdparty/CGAL-4.8/examples/Box_intersection_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Box_intersection_d/CMakeLists.txt
new file mode 100644
index 0000000..fbe3084
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Box_intersection_d/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Box_intersection_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "box_grid.cpp" )
+  create_single_source_cgal_program( "custom_box_grid.cpp" )
+  create_single_source_cgal_program( "minimal.cpp" )
+  create_single_source_cgal_program( "minimal_self.cpp" )
+  create_single_source_cgal_program( "proximity_custom_box_traits.cpp" )
+  create_single_source_cgal_program( "triangle_self_intersect.cpp" )
+  create_single_source_cgal_program( "triangle_self_intersect_pointers.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/box_grid.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/box_grid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/box_grid.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/box_grid.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/custom_box_grid.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/custom_box_grid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/custom_box_grid.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/custom_box_grid.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/data/points.xyz b/3rdparty/CGAL-4.8/examples/Box_intersection_d/data/points.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/data/points.xyz
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/data/points.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/data/triangles.xyz b/3rdparty/CGAL-4.8/examples/Box_intersection_d/data/triangles.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/data/triangles.xyz
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/data/triangles.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/minimal.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/minimal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/minimal.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/minimal.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/minimal_self.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/minimal_self.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/minimal_self.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/minimal_self.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/proximity_custom_box_traits.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/proximity_custom_box_traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/proximity_custom_box_traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/proximity_custom_box_traits.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/triangle_self_intersect.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/triangle_self_intersect.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/triangle_self_intersect.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/triangle_self_intersect.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Box_intersection_d/triangle_self_intersect_pointers.cpp b/3rdparty/CGAL-4.8/examples/Box_intersection_d/triangle_self_intersect_pointers.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Box_intersection_d/triangle_self_intersect_pointers.cpp
rename to 3rdparty/CGAL-4.8/examples/Box_intersection_d/triangle_self_intersect_pointers.cpp
diff --git a/3rdparty/CGAL-4.8/examples/CGAL_ipelets/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/CGAL_ipelets/CMakeLists.txt
new file mode 100644
index 0000000..bf0bd4b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/CGAL_ipelets/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( CGAL_ipelets_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "test_grabbers.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/CGAL_ipelets/test_grabbers.cpp b/3rdparty/CGAL-4.8/examples/CGAL_ipelets/test_grabbers.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/CGAL_ipelets/test_grabbers.cpp
rename to 3rdparty/CGAL-4.8/examples/CGAL_ipelets/test_grabbers.cpp
diff --git a/3rdparty/CGAL-4.8/examples/CGALimageIO/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/CGALimageIO/CMakeLists.txt
new file mode 100644
index 0000000..26e7b85
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/CGALimageIO/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project( CGALImageIO_example ) 
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS ImageIO )
+
+include( ${CGAL_USE_FILE} )
+include( CGAL_CreateSingleSourceCGALProgram )
+
+if(CGAL_ImageIO_FOUND)
+  create_single_source_cgal_program( "convert_raw_image_to_inr.cpp" )
+  create_single_source_cgal_program( "test_imageio.cpp" )
+else()
+  message(STATUS "NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled.")
+endif()
diff --git a/3rdparty/CGAL-4.6/examples/CGALimageIO/convert_raw_image_to_inr.cpp b/3rdparty/CGAL-4.8/examples/CGALimageIO/convert_raw_image_to_inr.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/CGALimageIO/convert_raw_image_to_inr.cpp
rename to 3rdparty/CGAL-4.8/examples/CGALimageIO/convert_raw_image_to_inr.cpp
diff --git a/3rdparty/CGAL-4.6/examples/CGALimageIO/test_imageio.cpp b/3rdparty/CGAL-4.8/examples/CGALimageIO/test_imageio.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/CGALimageIO/test_imageio.cpp
rename to 3rdparty/CGAL-4.8/examples/CGALimageIO/test_imageio.cpp
diff --git a/3rdparty/CGAL-4.8/examples/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/CMakeLists.txt
new file mode 100644
index 0000000..dff3deb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/CMakeLists.txt
@@ -0,0 +1,42 @@
+project(CGAL_EXAMPLES)
+
+cmake_minimum_required(VERSION 2.8.11)
+
+if (CGAL_BRANCH_BUILD) 
+
+foreach (package ${CGAL_CONFIGURED_PACKAGES})
+  #message (STATUS "Current package: ${package}")
+  file( GLOB listtmp "${package}/examples/*")
+  list(APPEND list ${listtmp})
+endforeach()
+
+else()
+
+  file( GLOB list "*")
+
+endif()
+
+list( SORT list )
+
+if(NOT CGAL_BUILDING_LIBS)
+  find_package(CGAL REQUIRED)
+  include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
+endif()
+
+message("== Generating build files for examples ==")
+foreach( entry ${list} )
+
+  if (NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry} )
+
+    file(GLOB files "${entry}/*.cpp")
+
+    # If there is no .cpp files, ignore the sub-directory
+    if(files)  
+     process_CGAL_subdirectory("${entry}" examples example)
+      # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake
+   endif()
+
+  endif()
+  
+endforeach()
+message("== Generating build files for examples (DONE) ==\n")
diff --git a/3rdparty/CGAL-4.8/examples/Circular_kernel_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Circular_kernel_2/CMakeLists.txt
new file mode 100644
index 0000000..5bf5465
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Circular_kernel_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Circular_kernel_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "functor_has_on_2.cpp" )
+  create_single_source_cgal_program( "intersecting_arcs.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_2/functor_has_on_2.cpp b/3rdparty/CGAL-4.8/examples/Circular_kernel_2/functor_has_on_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circular_kernel_2/functor_has_on_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Circular_kernel_2/functor_has_on_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_2/intersecting_arcs.cpp b/3rdparty/CGAL-4.8/examples/Circular_kernel_2/intersecting_arcs.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circular_kernel_2/intersecting_arcs.cpp
rename to 3rdparty/CGAL-4.8/examples/Circular_kernel_2/intersecting_arcs.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Circular_kernel_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Circular_kernel_3/CMakeLists.txt
new file mode 100644
index 0000000..3d355fa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Circular_kernel_3/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Circular_kernel_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "functor_compare_theta_3.cpp" )
+  create_single_source_cgal_program( "functor_has_on_3.cpp" )
+  create_single_source_cgal_program( "intersecting_spheres.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_3/functor_compare_theta_3.cpp b/3rdparty/CGAL-4.8/examples/Circular_kernel_3/functor_compare_theta_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circular_kernel_3/functor_compare_theta_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Circular_kernel_3/functor_compare_theta_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_3/functor_has_on_3.cpp b/3rdparty/CGAL-4.8/examples/Circular_kernel_3/functor_has_on_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circular_kernel_3/functor_has_on_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Circular_kernel_3/functor_has_on_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Circular_kernel_3/intersecting_spheres.cpp b/3rdparty/CGAL-4.8/examples/Circular_kernel_3/intersecting_spheres.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circular_kernel_3/intersecting_spheres.cpp
rename to 3rdparty/CGAL-4.8/examples/Circular_kernel_3/intersecting_spheres.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Circulator/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Circulator/CMakeLists.txt
new file mode 100644
index 0000000..ebabfbc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Circulator/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Circulator_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "circulator_prog1.cpp" )
+  create_single_source_cgal_program( "circulator_prog2.cpp" )
+  create_single_source_cgal_program( "circulator_prog3.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Circulator/circulator_prog1.cpp b/3rdparty/CGAL-4.8/examples/Circulator/circulator_prog1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circulator/circulator_prog1.cpp
rename to 3rdparty/CGAL-4.8/examples/Circulator/circulator_prog1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Circulator/circulator_prog2.cpp b/3rdparty/CGAL-4.8/examples/Circulator/circulator_prog2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circulator/circulator_prog2.cpp
rename to 3rdparty/CGAL-4.8/examples/Circulator/circulator_prog2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Circulator/circulator_prog3.cpp b/3rdparty/CGAL-4.8/examples/Circulator/circulator_prog3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Circulator/circulator_prog3.cpp
rename to 3rdparty/CGAL-4.8/examples/Circulator/circulator_prog3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Combinatorial_map/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Combinatorial_map/CMakeLists.txt
new file mode 100644
index 0000000..e6039e3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Combinatorial_map/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Combinatorial_map_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "map_3_dynamic_onmerge.cpp" )
+  create_single_source_cgal_program( "map_3_foreach.cpp" )
+  create_single_source_cgal_program( "map_3_marks.cpp" )
+  create_single_source_cgal_program( "map_3_operations.cpp" )
+  create_single_source_cgal_program( "map_3_simple_example.cpp" )
+  create_single_source_cgal_program( "map_3_with_colored_facets.cpp" )
+  create_single_source_cgal_program( "map_4_simple_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_foreach.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_foreach.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_foreach.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_foreach.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_marks.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_marks.cpp
new file mode 100644
index 0000000..d4fc0f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_marks.cpp
@@ -0,0 +1,58 @@
+#include <CGAL/Combinatorial_map.h>
+#include <CGAL/Combinatorial_map_constructors.h>
+#include <CGAL/Combinatorial_map_operations.h>
+#include <iostream>
+#include <cstdlib>
+
+typedef CGAL::Combinatorial_map<3> CMap_3;
+typedef CMap_3::Dart_handle Dart_handle;
+typedef CMap_3::size_type size_type;
+
+int main()
+{
+  CMap_3 cm;
+
+  // 1) Reserve a mark.
+  size_type amark;
+  try
+  {
+    amark = cm.get_new_mark();
+  }
+  catch (CMap_3::Exception_no_more_available_mark)
+  {
+    std::cerr<<"No more free mark, exit."<<std::endl;
+    exit(-1);
+  }
+  
+  // 2) Create two tetrahedra.
+  Dart_handle dh1 = CGAL::make_combinatorial_tetrahedron(cm);  
+  Dart_handle dh2 = CGAL::make_combinatorial_tetrahedron(cm);
+
+  // 3) 3-sew them.
+  cm.sew<3>(dh1, dh2);
+  
+  // 4) Mark the darts belonging to the first tetrahedron.
+  for  (CMap_3::Dart_of_cell_range<3>::iterator 
+          it(cm.darts_of_cell<3>(dh1).begin()),
+          itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it)
+    cm.mark(it, amark);
+
+  // 4) Remove the common 2-cell between the two cubes:
+  // the two tetrahedra are merged.
+  CGAL::remove_cell<CMap_3, 2>(cm, dh1);
+
+  // 5) Thanks to the mark, we know which darts come from the first tetrahedron.
+  unsigned int res=0;
+  for (CMap_3::Dart_range::iterator it(cm.darts().begin()),
+	 itend(cm.darts().end()); it!=itend; ++it)
+  {
+    if ( cm.is_marked(it, amark) )
+      ++res;
+  }
+  
+  std::cout<<"Number of darts from the first tetrahedron: "<<res<<std::endl;
+  cm.free_mark(amark);
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_operations.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_operations.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_operations.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_operations.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_simple_example.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_simple_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_simple_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_simple_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_with_colored_facets.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_with_colored_facets.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_3_with_colored_facets.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_3_with_colored_facets.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Combinatorial_map/map_4_simple_example.cpp b/3rdparty/CGAL-4.8/examples/Combinatorial_map/map_4_simple_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Combinatorial_map/map_4_simple_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Combinatorial_map/map_4_simple_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Convex_decomposition_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Convex_decomposition_3/CMakeLists.txt
new file mode 100644
index 0000000..904019d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Convex_decomposition_3/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Convex_decomposition_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "list_of_convex_parts.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Convex_decomposition_3/list_of_convex_parts.cin b/3rdparty/CGAL-4.8/examples/Convex_decomposition_3/list_of_convex_parts.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_decomposition_3/list_of_convex_parts.cin
rename to 3rdparty/CGAL-4.8/examples/Convex_decomposition_3/list_of_convex_parts.cin
diff --git a/3rdparty/CGAL-4.6/examples/Convex_decomposition_3/list_of_convex_parts.cpp b/3rdparty/CGAL-4.8/examples/Convex_decomposition_3/list_of_convex_parts.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_decomposition_3/list_of_convex_parts.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_decomposition_3/list_of_convex_parts.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Convex_hull_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Convex_hull_2/CMakeLists.txt
new file mode 100644
index 0000000..cffc3a6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Convex_hull_2/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Convex_hull_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+    include_directories (BEFORE "include")
+
+  create_single_source_cgal_program( "array_convex_hull_2.cpp" )
+  create_single_source_cgal_program( "ch_from_cin_to_cout.cpp" )
+  create_single_source_cgal_program( "ch_graham_anderson.cpp" )
+  create_single_source_cgal_program( "ch_timing.cpp" )
+  create_single_source_cgal_program( "convex_hull_yz.cpp" )
+  create_single_source_cgal_program( "iostream_convex_hull_2.cpp" )
+  create_single_source_cgal_program( "vector_convex_hull_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/array_convex_hull_2.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/array_convex_hull_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/array_convex_hull_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/array_convex_hull_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_from_cin_to_cout.cin b/3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_from_cin_to_cout.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_from_cin_to_cout.cin
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_from_cin_to_cout.cin
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_from_cin_to_cout.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_from_cin_to_cout.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_from_cin_to_cout.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_from_cin_to_cout.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_graham_anderson.cin b/3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_graham_anderson.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_graham_anderson.cin
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_graham_anderson.cin
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_graham_anderson.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_graham_anderson.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_graham_anderson.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_graham_anderson.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_timing.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_timing.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/ch_timing.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/ch_timing.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/convex_hull_yz.cin b/3rdparty/CGAL-4.8/examples/Convex_hull_2/convex_hull_yz.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/convex_hull_yz.cin
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/convex_hull_yz.cin
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/convex_hull_yz.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/convex_hull_yz.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/convex_hull_yz.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/convex_hull_yz.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/files/CD500 b/3rdparty/CGAL-4.8/examples/Convex_hull_2/files/CD500
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/files/CD500
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/files/CD500
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/include/CGAL/ch_timing_2.h b/3rdparty/CGAL-4.8/examples/Convex_hull_2/include/CGAL/ch_timing_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/include/CGAL/ch_timing_2.h
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/include/CGAL/ch_timing_2.h
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/include/CGAL/ch_timing_2_impl.h b/3rdparty/CGAL-4.8/examples/Convex_hull_2/include/CGAL/ch_timing_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/include/CGAL/ch_timing_2_impl.h
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/include/CGAL/ch_timing_2_impl.h
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/iostream_convex_hull_2.cin b/3rdparty/CGAL-4.8/examples/Convex_hull_2/iostream_convex_hull_2.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/iostream_convex_hull_2.cin
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/iostream_convex_hull_2.cin
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/iostream_convex_hull_2.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/iostream_convex_hull_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/iostream_convex_hull_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/iostream_convex_hull_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_2/vector_convex_hull_2.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_2/vector_convex_hull_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_2/vector_convex_hull_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_2/vector_convex_hull_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Convex_hull_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Convex_hull_3/CMakeLists.txt
new file mode 100644
index 0000000..e41901c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Convex_hull_3/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Convex_hull_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "dynamic_hull_3.cpp" )
+  create_single_source_cgal_program( "halfspace_intersection_3.cpp" )
+  create_single_source_cgal_program( "lloyd_algorithm.cpp" )
+  create_single_source_cgal_program( "quickhull_3.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_3/dynamic_hull_3.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_3/dynamic_hull_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_3/dynamic_hull_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_3/dynamic_hull_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Convex_hull_3/halfspace_intersection_3.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_3/halfspace_intersection_3.cpp
new file mode 100644
index 0000000..100f5d6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Convex_hull_3/halfspace_intersection_3.cpp
@@ -0,0 +1,46 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Convex_hull_3/dual/halfspace_intersection_3.h>
+#include <CGAL/point_generators_3.h>
+
+#include <list>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel   K;
+typedef K::Plane_3                                            Plane;
+typedef K::Point_3                                            Point;
+typedef CGAL::Polyhedron_3<K>                                 Polyhedron_3;
+
+// compute the tangent plane of a point
+template <typename K>
+typename K::Plane_3 tangent_plane (typename K::Point_3 const& p) {
+    typename K::Vector_3 v(p.x(), p.y(), p.z());
+    v = v / sqrt(v.squared_length());
+    typename K::Plane_3 plane(v.x(), v.y(), v.z(), -(p - CGAL::ORIGIN) * v);
+
+    return plane;
+}
+
+int main (void) {
+    // number of generated planes
+    int N = 200;
+
+    // generates random planes on a sphere
+    std::list<Plane> planes;
+    CGAL::Random_points_on_sphere_3<Point> g;
+    for (int i = 0; i < N; i++) {
+        planes.push_back(tangent_plane<K>(*g++));
+    }
+
+    // define polyhedron to hold the intersection
+    Polyhedron_3 P;
+
+    // compute the intersection
+    // if no point inside the intersection is provided, one
+    // will be automatically found using linear programming
+    CGAL::halfspace_intersection_3(planes.begin(),
+                                   planes.end(),
+                                   P,
+                                   boost::make_optional(Point(0, 0, 0)) );
+
+    return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Convex_hull_3/lloyd_algorithm.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_3/lloyd_algorithm.cpp
new file mode 100644
index 0000000..3b0b9db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Convex_hull_3/lloyd_algorithm.cpp
@@ -0,0 +1,245 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Convex_hull_3/dual/halfspace_intersection_3.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/convex_hull_3.h>
+#include <CGAL/Timer.h>
+#include <CGAL/point_generators_3.h>
+
+#include <vector>
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_3 Point;
+typedef K::Plane_3 Plane;
+typedef K::Vector_3 Vector;
+
+typedef CGAL::Convex_hull_traits_3<K> Traits;
+typedef Traits::Polyhedron_3 Polyhedron;
+
+typedef CGAL::Delaunay_triangulation_3<K> DT;
+typedef DT::Vertex_handle Vertex_handle;
+
+// Function object that computes the volume and the centroid of a polyhedron.
+template <class K>
+class Centroid_volume_accumulator {
+    public:
+        typedef typename K::Point_3 Point;
+        typedef typename K::Vector_3 Vector;
+
+        Centroid_volume_accumulator() : vol(0),
+                                        cx(0), cy(0), cz(0) {}
+
+        void operator () (const Point &a,
+                          const Point &b,
+                          const Point &c) {
+            Vector ex(1, 0, 0),
+                   ey(0, 1, 0),
+                   ez(0, 0, 1);
+
+            Vector va = CGAL::ORIGIN - a;
+            Vector vb = CGAL::ORIGIN - b;
+            Vector vc = CGAL::ORIGIN - c;
+
+            // Updating the volume...
+            Vector nhat = CGAL::cross_product(b - a, c - a);
+            vol += nhat * va;
+
+            // ... and the centroid
+            // X
+            cx += (nhat * ex) * (
+                CGAL::square(ex * (va + vb)) +
+                CGAL::square(ex * (vb + vc)) +
+                CGAL::square(ex * (vc + va)) );
+
+            // Y
+            cy += (nhat * ey) * (
+                CGAL::square(ey * (va + vb)) +
+                CGAL::square(ey * (vb + vc)) +
+                CGAL::square(ey * (vc + va)) );
+
+            // Z
+            cz += (nhat * ez) * (
+                CGAL::square(ez * (va + vb)) +
+                CGAL::square(ez * (vb + vc)) +
+                CGAL::square(ez * (vc + va)) );
+        }
+
+        void end () {
+            vol /= 6;
+            cx /= (48 * vol);
+            cy /= (48 * vol);
+            cz /= (48 * vol);
+        }
+
+        Point centroid () const {
+            return Point(cx, cy, cz);
+        }
+
+        typename K::FT volume () const {
+            return vol;
+        }
+
+        void reset () {
+            vol = 0;
+            cx = 0;
+            cy = 0;
+            cz = 0;
+        }
+
+    private:
+        // Volume
+        typename K::FT vol;
+
+        // Centroid
+        typename K::FT cx, cy, cz;
+};
+
+// Apply a function object to all the triangles composing the faces of a polyhedron.
+template <typename Polyhedron, class F>
+F& apply_function_object_polyhedron (Polyhedron &P,
+                                     F &f) {
+    typedef typename Polyhedron::Halfedge_around_facet_circulator Hafc;
+    typedef typename Polyhedron::Facet_iterator Facet_iterator;
+
+    f.reset();
+
+    for (Facet_iterator fit = P.facets_begin();
+         fit != P.facets_end();
+         fit++) {
+        Hafc h0 = fit->facet_begin(), hf = h0--, hs = hf;
+        hs ++;
+
+        while (1) {
+            // Apply 'f' on each triangle of the polyhedron's facet
+            f ( h0->vertex()->point(),
+                hf->vertex()->point(),
+                hs->vertex()->point() );
+
+            if (hs == h0)
+                break;
+
+            hs++; hf++;
+        }
+    }
+
+    f.end();
+
+    return f;
+}
+
+// Lloyd algorithm
+// Generate points uniformly sampled inside a polyhedron.
+// An initial set of points needs to be given.
+template <class PolyIterator>
+void lloyd_algorithm (PolyIterator poly_begin,
+                      PolyIterator poly_end,
+                      std::vector<Point>& points) {
+    std::list<Plane> planes;
+    std::list<Point> centroids;
+    Centroid_volume_accumulator<K> centroid_acc;
+
+    // Compute Delaunay triangulation
+    DT dt(points.begin(), points.end());
+
+    for (DT::Finite_vertices_iterator vit = dt.finite_vertices_begin();
+         vit != dt.finite_vertices_end();
+         ++vit) {
+        planes.clear();
+        // Voronoi cells
+        std::list<Vertex_handle> vertices;
+        dt.incident_vertices(vit, std::back_inserter(vertices));
+        for (std::list<Vertex_handle>::iterator it = vertices.begin();
+             it != vertices.end();
+             it++)
+        {
+            if (dt.is_infinite(*it)) continue;
+            Vector p(vit->point(),(*it)->point());
+            planes.push_back (Plane(CGAL::midpoint((*it)->point(), vit->point()), p));
+        }
+
+        // Add planes of the polyhedron faces
+        for (PolyIterator it = poly_begin;
+             it != poly_end;
+             it++) {
+            planes.push_back(*it);
+        }
+
+        // Intersection
+        Polyhedron P;
+        CGAL::halfspace_intersection_3(planes.begin(),
+                                       planes.end(),
+                                       P,
+                                       boost::make_optional(vit->point()));
+
+        // Centroid
+        apply_function_object_polyhedron(P, centroid_acc);
+        centroids.push_back(centroid_acc.centroid());
+    }
+
+    // Replace the initial points by the computed centroids
+    points.clear();
+    for (std::list<Point>::iterator it = centroids.begin();
+         it != centroids.end();
+         it++) {
+        points.push_back(*it);
+    }
+}
+
+int main (int argc, char *argv[]) {
+    // Cube
+    std::list<Plane> planes;
+    planes.push_back(Plane(1, 0, 0, -1));
+    planes.push_back(Plane(-1, 0, 0, -1));
+    planes.push_back(Plane(0, 1, 0, -1));
+    planes.push_back(Plane(0, -1, 0, -1));
+    planes.push_back(Plane(0, 0, 1, -1));
+    planes.push_back(Plane(0, 0, -1, -1));
+
+    std::vector<Point> points;
+    int N, steps;
+    // Number of points
+    if (argc > 1) {
+        N = atoi(argv[1]);
+    } else {
+        N = 50;
+    }
+
+    // Number of steps
+    if (argc > 2) {
+        steps = atoi(argv[2]);
+    } else {
+        steps = 10;
+    }
+
+    CGAL::Random_points_in_sphere_3<Point> g;
+    for (int i = 0; i < N; i++) {
+        Point p = *g++;
+        points.push_back(p);
+    }
+
+    std::ofstream bos("before_lloyd.xyz");
+    std::copy(points.begin(), points.end(),
+              std::ostream_iterator<Point>(bos, "\n"));
+
+    // Apply Lloyd algorithm: will generate points
+    // uniformly sampled inside a cube.
+    for (int i = 0; i < steps; i++) {
+        std::cout << "iteration " << i + 1 << std::endl;
+
+        CGAL::Timer timer;
+        timer.start();
+        lloyd_algorithm(planes.begin(),
+                        planes.end(),
+                        points);
+        timer.stop();
+
+        std::cout << "Execution time : " << timer.time() << "s\n";
+    }
+
+    std::ofstream aos("after_lloyd.xyz");
+    std::copy(points.begin(), points.end(),
+              std::ostream_iterator<Point>(aos, "\n"));
+
+    return 0;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Convex_hull_3/quickhull_3.cpp b/3rdparty/CGAL-4.8/examples/Convex_hull_3/quickhull_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Convex_hull_3/quickhull_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Convex_hull_3/quickhull_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Core/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Core/CMakeLists.txt
new file mode 100644
index 0000000..17bda8b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Core/CMakeLists.txt
@@ -0,0 +1,49 @@
+project( Core_examples )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS Core )
+
+if ( NOT CGAL_Core_FOUND )
+
+  message(STATUS "This project requires the CGAL_Core library, and will not be compiled.")
+  return()
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()
+
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+create_single_source_cgal_program( "delaunay.cpp" )
diff --git a/3rdparty/CGAL-4.6/examples/Core/delaunay.cpp b/3rdparty/CGAL-4.8/examples/Core/delaunay.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Core/delaunay.cpp
rename to 3rdparty/CGAL-4.8/examples/Core/delaunay.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Envelope_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Envelope_2/CMakeLists.txt
new file mode 100644
index 0000000..966f865
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Envelope_2/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Envelope_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "convex_hull.cpp" )
+  create_single_source_cgal_program( "envelope_circles.cpp" )
+  create_single_source_cgal_program( "envelope_segments.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_2/ch_points.dat b/3rdparty/CGAL-4.8/examples/Envelope_2/ch_points.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_2/ch_points.dat
rename to 3rdparty/CGAL-4.8/examples/Envelope_2/ch_points.dat
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_2/convex_hull.cpp b/3rdparty/CGAL-4.8/examples/Envelope_2/convex_hull.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_2/convex_hull.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_2/convex_hull.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_2/envelope_circles.cpp b/3rdparty/CGAL-4.8/examples/Envelope_2/envelope_circles.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_2/envelope_circles.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_2/envelope_circles.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_2/envelope_segments.cpp b/3rdparty/CGAL-4.8/examples/Envelope_2/envelope_segments.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_2/envelope_segments.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_2/envelope_segments.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Envelope_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Envelope_3/CMakeLists.txt
new file mode 100644
index 0000000..759cd30
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Envelope_3/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Envelope_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "envelope_planes.cpp" )
+  create_single_source_cgal_program( "envelope_spheres.cpp" )
+  create_single_source_cgal_program( "envelope_triangles.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_3/envelope_planes.cpp b/3rdparty/CGAL-4.8/examples/Envelope_3/envelope_planes.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_3/envelope_planes.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_3/envelope_planes.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_3/envelope_spheres.cpp b/3rdparty/CGAL-4.8/examples/Envelope_3/envelope_spheres.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_3/envelope_spheres.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_3/envelope_spheres.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_3/envelope_triangles.cpp b/3rdparty/CGAL-4.8/examples/Envelope_3/envelope_triangles.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_3/envelope_triangles.cpp
rename to 3rdparty/CGAL-4.8/examples/Envelope_3/envelope_triangles.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Envelope_3/spheres.dat b/3rdparty/CGAL-4.8/examples/Envelope_3/spheres.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Envelope_3/spheres.dat
rename to 3rdparty/CGAL-4.8/examples/Envelope_3/spheres.dat
diff --git a/3rdparty/CGAL-4.8/examples/Filtered_kernel/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Filtered_kernel/CMakeLists.txt
new file mode 100644
index 0000000..c85ee47
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Filtered_kernel/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Filtered_kernel_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Filtered_predicate.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Filtered_kernel/Cartesian_I.h b/3rdparty/CGAL-4.8/examples/Filtered_kernel/Cartesian_I.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Filtered_kernel/Cartesian_I.h
rename to 3rdparty/CGAL-4.8/examples/Filtered_kernel/Cartesian_I.h
diff --git a/3rdparty/CGAL-4.6/examples/Filtered_kernel/Filtered_predicate.cpp b/3rdparty/CGAL-4.8/examples/Filtered_kernel/Filtered_predicate.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Filtered_kernel/Filtered_predicate.cpp
rename to 3rdparty/CGAL-4.8/examples/Filtered_kernel/Filtered_predicate.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Generator/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Generator/CMakeLists.txt
new file mode 100644
index 0000000..2997c09
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Generator/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Generator_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "ball_d.cpp" )
+  create_single_source_cgal_program( "combination_enumerator.cpp" )
+  create_single_source_cgal_program( "cube_d.cpp" )
+  create_single_source_cgal_program( "grid_d.cpp" )
+  create_single_source_cgal_program( "name_pairs.cpp" )
+  create_single_source_cgal_program( "random_convex_hull_2.cpp" )
+  create_single_source_cgal_program( "random_convex_set.cpp" )
+  create_single_source_cgal_program( "random_degenerate_point_set.cpp" )
+  create_single_source_cgal_program( "random_grid.cpp" )
+  create_single_source_cgal_program( "random_points_tetrahedron_and_triangle_3.cpp" )
+  create_single_source_cgal_program( "random_points_triangle_2.cpp" )
+  create_single_source_cgal_program( "random_polygon.cpp" )
+  create_single_source_cgal_program( "random_polygon2.cpp" )
+  create_single_source_cgal_program( "random_segments1.cpp" )
+  create_single_source_cgal_program( "random_segments2.cpp" )
+  create_single_source_cgal_program( "sphere_d.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Generator/README b/3rdparty/CGAL-4.8/examples/Generator/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/README
rename to 3rdparty/CGAL-4.8/examples/Generator/README
diff --git a/3rdparty/CGAL-4.6/examples/Generator/ball_d.cpp b/3rdparty/CGAL-4.8/examples/Generator/ball_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/ball_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/ball_d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/combination_enumerator.cpp b/3rdparty/CGAL-4.8/examples/Generator/combination_enumerator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/combination_enumerator.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/combination_enumerator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/cube_d.cpp b/3rdparty/CGAL-4.8/examples/Generator/cube_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/cube_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/cube_d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/grid_d.cpp b/3rdparty/CGAL-4.8/examples/Generator/grid_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/grid_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/grid_d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/name_pairs.cpp b/3rdparty/CGAL-4.8/examples/Generator/name_pairs.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/name_pairs.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/name_pairs.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_convex_hull_2.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_convex_hull_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_convex_hull_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_convex_hull_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_convex_set.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_convex_set.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_convex_set.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_convex_set.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Generator/random_degenerate_point_set.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_degenerate_point_set.cpp
new file mode 100644
index 0000000..d1bc432
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Generator/random_degenerate_point_set.cpp
@@ -0,0 +1,53 @@
+#include <CGAL/Simple_cartesian.h>
+#include <cassert>
+#include <vector>
+#include <algorithm>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/algorithm.h>
+#include <CGAL/random_selection.h>
+
+using namespace CGAL;
+
+typedef Simple_cartesian<double>         R;
+typedef R::Point_2                       Point;
+typedef Creator_uniform_2<double,Point>  Creator;
+typedef std::vector<Point>               Vector;
+
+int main() {
+    // Create test point set. Prepare a vector for 1000 points.
+    Vector points;
+    points.reserve(1000);
+
+    // Create 600 points within a disc of radius 150.
+    Random_points_in_disc_2<Point,Creator> g( 150.0);
+    CGAL::cpp11::copy_n( g, 600, std::back_inserter(points));
+
+    // Create 200 points from a 15 x 15 grid.
+    points_on_square_grid_2( 250.0, 200, std::back_inserter(points),Creator());
+
+    // Select 100 points randomly and append them at the end of
+    // the current vector of points.
+    random_selection( points.begin(), points.end(), 100,
+		      std::back_inserter(points));
+
+    // Create 100 points that are collinear to two randomly chosen
+    // points and append them to the current vector of points.
+    random_collinear_points_2( points.begin(), points.end(), 100,
+			       std::back_inserter( points));
+
+    // Check that we have really created 1000 points.
+    assert( points.size() == 1000);
+
+    // Use a random permutation to hide the creation history
+    // of the point set.
+    std::random_shuffle( points.begin(), points.end(), get_default_random());
+
+    // Check range of values.
+    for ( Vector::iterator i = points.begin(); i != points.end(); i++){
+	assert( i->x() <=  251);
+	assert( i->x() >= -251);
+	assert( i->y() <=  251);
+	assert( i->y() >= -251);
+    }
+    return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_grid.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_grid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_grid.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_grid.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Generator/random_points_tetrahedron_and_triangle_3.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_points_tetrahedron_and_triangle_3.cpp
new file mode 100644
index 0000000..768d992
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Generator/random_points_tetrahedron_and_triangle_3.cpp
@@ -0,0 +1,49 @@
+#include <iostream>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Random.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel 		K;
+typedef K::Point_3 													Point_3;
+typedef K::Triangle_3 												Triangle_3;
+typedef K::Tetrahedron_3 											Tetrahedron_3;
+typedef CGAL::Random_points_in_triangle_3<Point_3> 					Point_generator_i;
+typedef CGAL::Random_points_in_tetrahedron_3<Point_3> 				Point_generator_ii;
+
+int main() {
+	std::cout << "This example does two things:" << std::endl;
+	std::cout << "  (i) it creates 100 random points in a triangle in 3D; and" << std::endl;
+	std::cout << "  (ii) it creates 100 random points in a tetrahedron in 3D." << std::endl;
+	
+	// The input triangle is as follows
+	Triangle_3 tri(Point_3(0,0,0),Point_3(1,0,0),Point_3(0,1,0));
+	Tetrahedron_3 tet(Point_3(0,0,0),Point_3(1,0,0),Point_3(0,1,0),Point_3(0,0,1));
+	
+	// we get output points in these containers
+	std::vector<Point_3> points_in_tri, points_in_tet;
+	
+	// creating the first generator, input is the Triangle_3 tri
+	Point_generator_i g_i(tri);
+	
+	// creating the second generator, input is the Tetrahedron_3 tet
+	Point_generator_ii g_ii(tet);
+	
+	// get 100 random points in tri
+	CGAL::cpp11::copy_n(g_i, 100, std::back_inserter(points_in_tri));
+	
+	// get 100 random points in tet
+	CGAL::cpp11::copy_n(g_ii, 100, std::back_inserter(points_in_tet));
+	
+	// Check that we have really created 100 points.
+	assert( points_in_tri.size() == 100);
+	
+	// Check that we have really created 100 points.
+	assert( points_in_tet.size() == 100);
+	
+	// print the first points
+	std::cout << "In triangle: " << points_in_tri[0] << std::endl;
+	std::cout << "In tetrahedron: " << points_in_tet[0] << std::endl;
+	
+	return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Generator/random_points_triangle_2.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_points_triangle_2.cpp
new file mode 100644
index 0000000..bfb366d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Generator/random_points_triangle_2.cpp
@@ -0,0 +1,35 @@
+#include <iostream>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Random.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel 		K;
+typedef K::Point_2 													Point_2;
+typedef K::Triangle_2 												Triangle_2;
+typedef std::vector<Point_2>										Container;
+typedef CGAL::Random_points_in_triangle_2<Point_2> 					Point_generator;
+
+int main() {
+	std::cout << "Creating 100 random points in a triangle in 2D." << std::endl;
+	
+	// The input triangle is as follows
+	Triangle_2 tri(Point_2(0,0),Point_2(1,0),Point_2(0,1));
+	
+	// generated points are in that container
+	Container points;
+	
+	// creating the generator, input is the Triangle_2 tri
+	Point_generator g(tri);
+	
+	// get 100 random points in tri
+	CGAL::cpp11::copy_n(g, 100, std::back_inserter(points));
+	
+	// Check that we have really created 100 points.
+	assert( points.size() == 100);
+	
+	// print the first point that was generated
+	std::cout << points[0] << std::endl;
+	
+	return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Generator/random_polygon.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_polygon.cpp
new file mode 100644
index 0000000..cebec25
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Generator/random_polygon.cpp
@@ -0,0 +1,57 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/random_polygon_2.h>
+#include <CGAL/Random.h>
+#include <CGAL/algorithm.h>
+
+#ifdef CGAL_USE_GMP
+#include <CGAL/Gmpz.h>
+typedef CGAL::Gmpz RT;
+#else
+// NOTE: the choice of double here for a number type may cause problems
+//       for degenerate point sets
+#include <CGAL/double.h>
+typedef double RT;
+#endif
+
+
+#include <fstream>
+#include <list>
+
+typedef CGAL::Simple_cartesian<RT>                        K;
+typedef K::Point_2                                        Point_2;
+typedef std::list<Point_2>                                Container;
+typedef CGAL::Polygon_2<K, Container>                     Polygon_2;
+typedef CGAL::Creator_uniform_2<int, Point_2>             Creator;
+typedef CGAL::Random_points_in_square_2<Point_2, Creator> Point_generator;
+
+const double RADIUS = 100;
+const int MAX_POLY_SIZE = 100;
+
+int main()
+{
+   Polygon_2            polygon;
+   std::list<Point_2>   point_set;
+   CGAL::Random         rand;
+
+   std::cerr << "Seed = " <<  rand.get_seed() << std::endl;
+   int size = rand.get_int(4, MAX_POLY_SIZE);
+
+   // copy size points from the generator, eliminating duplicates, so the
+   // polygon will have <= size vertices
+   CGAL::copy_n_unique(Point_generator(RADIUS), size,
+                       std::back_inserter(point_set));
+
+   std::ostream_iterator< Point_2 >  out( std::cout, " " );
+   std::cout << "From the following " << point_set.size() << " points "
+             << std::endl;
+   std::copy(point_set.begin(), point_set.end(), out);
+   std::cout << std::endl;
+
+   CGAL::random_polygon_2(point_set.size(), std::back_inserter(polygon),
+                          point_set.begin());
+   std::cout << "The following simple polygon was made: " << std::endl;
+   std::cout << polygon << std::endl;
+   return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_polygon2.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_polygon2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_polygon2.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_polygon2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_segments1.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_segments1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_segments1.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_segments1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/random_segments2.cpp b/3rdparty/CGAL-4.8/examples/Generator/random_segments2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/random_segments2.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/random_segments2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Generator/sphere_d.cpp b/3rdparty/CGAL-4.8/examples/Generator/sphere_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Generator/sphere_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Generator/sphere_d.cpp
diff --git a/3rdparty/CGAL-4.8/examples/HalfedgeDS/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/HalfedgeDS/CMakeLists.txt
new file mode 100644
index 0000000..929724d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/HalfedgeDS/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( HalfedgeDS_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "hds_prog_color.cpp" )
+  create_single_source_cgal_program( "hds_prog_compact.cpp" )
+  create_single_source_cgal_program( "hds_prog_compact2.cpp" )
+  create_single_source_cgal_program( "hds_prog_default.cpp" )
+  create_single_source_cgal_program( "hds_prog_edge_iterator.cpp" )
+  create_single_source_cgal_program( "hds_prog_graph.cpp" )
+  create_single_source_cgal_program( "hds_prog_graph2.cpp" )
+  create_single_source_cgal_program( "hds_prog_halfedge_iterator.cpp" )
+  create_single_source_cgal_program( "hds_prog_vector.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_color.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_color.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_color.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_color.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_compact.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_compact.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_compact.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_compact.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_compact2.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_compact2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_compact2.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_compact2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_default.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_default.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_default.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_default.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_edge_iterator.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_edge_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_edge_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_edge_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_graph.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_graph.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_graph.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_graph.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_graph2.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_graph2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_graph2.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_graph2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_halfedge_iterator.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_halfedge_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_halfedge_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_halfedge_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_vector.cpp b/3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_vector.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/HalfedgeDS/hds_prog_vector.cpp
rename to 3rdparty/CGAL-4.8/examples/HalfedgeDS/hds_prog_vector.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Inscribed_areas/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Inscribed_areas/CMakeLists.txt
new file mode 100644
index 0000000..4df3c67
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Inscribed_areas/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Inscribed_areas_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "extremal_polygon_2_area.cpp" )
+  create_single_source_cgal_program( "extremal_polygon_2_perimeter.cpp" )
+  create_single_source_cgal_program( "largest_empty_rectangle.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Inscribed_areas/extremal_polygon_2_area.cpp b/3rdparty/CGAL-4.8/examples/Inscribed_areas/extremal_polygon_2_area.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Inscribed_areas/extremal_polygon_2_area.cpp
rename to 3rdparty/CGAL-4.8/examples/Inscribed_areas/extremal_polygon_2_area.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Inscribed_areas/extremal_polygon_2_perimeter.cpp b/3rdparty/CGAL-4.8/examples/Inscribed_areas/extremal_polygon_2_perimeter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Inscribed_areas/extremal_polygon_2_perimeter.cpp
rename to 3rdparty/CGAL-4.8/examples/Inscribed_areas/extremal_polygon_2_perimeter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Inscribed_areas/largest_empty_rectangle.cpp b/3rdparty/CGAL-4.8/examples/Inscribed_areas/largest_empty_rectangle.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Inscribed_areas/largest_empty_rectangle.cpp
rename to 3rdparty/CGAL-4.8/examples/Inscribed_areas/largest_empty_rectangle.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Interpolation/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Interpolation/CMakeLists.txt
new file mode 100644
index 0000000..c1f76e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Interpolation/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Interpolation_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "interpolation_2.cpp" )
+  create_single_source_cgal_program( "linear_interpolation_2.cpp" )
+  create_single_source_cgal_program( "nn_coordinates_2.cpp" )
+  create_single_source_cgal_program( "nn_coordinates_3.cpp" )
+  create_single_source_cgal_program( "rn_coordinates_2.cpp" )
+  create_single_source_cgal_program( "sibson_interpolation_2.cpp" )
+  create_single_source_cgal_program( "surface_neighbor_coordinates_3.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/README b/3rdparty/CGAL-4.8/examples/Interpolation/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/README
rename to 3rdparty/CGAL-4.8/examples/Interpolation/README
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/data/points3 b/3rdparty/CGAL-4.8/examples/Interpolation/data/points3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/data/points3
rename to 3rdparty/CGAL-4.8/examples/Interpolation/data/points3
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/interpolation_2.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/interpolation_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/interpolation_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/interpolation_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/linear_interpolation_2.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/linear_interpolation_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/linear_interpolation_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/linear_interpolation_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/nn_coordinates_2.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/nn_coordinates_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/nn_coordinates_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/nn_coordinates_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/nn_coordinates_3.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/nn_coordinates_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/nn_coordinates_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/nn_coordinates_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/rn_coordinates_2.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/rn_coordinates_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/rn_coordinates_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/rn_coordinates_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/sibson_interpolation_2.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/sibson_interpolation_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/sibson_interpolation_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/sibson_interpolation_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interpolation/surface_neighbor_coordinates_3.cpp b/3rdparty/CGAL-4.8/examples/Interpolation/surface_neighbor_coordinates_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interpolation/surface_neighbor_coordinates_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Interpolation/surface_neighbor_coordinates_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Interval_skip_list/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Interval_skip_list/CMakeLists.txt
new file mode 100644
index 0000000..0808858
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Interval_skip_list/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Interval_skip_list_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "intervals.cpp" )
+  create_single_source_cgal_program( "isl_terrain.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Interval_skip_list/intervals.cpp b/3rdparty/CGAL-4.8/examples/Interval_skip_list/intervals.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interval_skip_list/intervals.cpp
rename to 3rdparty/CGAL-4.8/examples/Interval_skip_list/intervals.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interval_skip_list/isl_terrain.cpp b/3rdparty/CGAL-4.8/examples/Interval_skip_list/isl_terrain.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interval_skip_list/isl_terrain.cpp
rename to 3rdparty/CGAL-4.8/examples/Interval_skip_list/isl_terrain.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Interval_skip_list/terrain.pts b/3rdparty/CGAL-4.8/examples/Interval_skip_list/terrain.pts
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Interval_skip_list/terrain.pts
rename to 3rdparty/CGAL-4.8/examples/Interval_skip_list/terrain.pts
diff --git a/3rdparty/CGAL-4.8/examples/Jet_fitting_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/CMakeLists.txt
new file mode 100644
index 0000000..c75cc60
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Jet_fitting_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  # use either Eigen or BLAS/LAPACK
+  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+  if (NOT EIGEN3_FOUND)
+    find_package(LAPACK)
+    if(LAPACK_FOUND)
+      include( ${LAPACK_USE_FILE} )
+    endif(LAPACK_FOUND)
+  else()
+    include( ${EIGEN3_USE_FILE} )
+  endif()
+    
+  if(EIGEN3_FOUND OR LAPACK_FOUND)
+    # Link with Boost.ProgramOptions (optional)
+    find_package(Boost QUIET COMPONENTS program_options)
+    if(Boost_PROGRAM_OPTIONS_FOUND)
+      if( CGAL_AUTO_LINK_ENABLED )
+        message( STATUS "Boost.ProgramOptions library: found" )
+      else()
+        message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
+      endif()
+      add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
+      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES})
+   endif()
+
+    create_single_source_cgal_program( "Mesh_estimation.cpp" )
+    create_single_source_cgal_program( "Single_estimation.cpp" )
+
+  else(EIGEN3_FOUND OR LAPACK_FOUND)
+
+    message(STATUS "NOTICE: This program requires either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
+
+  endif(EIGEN3_FOUND OR LAPACK_FOUND)
+
+else()
+
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Jet_fitting_3/Mesh_estimation.cpp b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/Mesh_estimation.cpp
new file mode 100644
index 0000000..e058f9c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/Mesh_estimation.cpp
@@ -0,0 +1,304 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Monge_via_jet_fitting.h>
+
+#include <fstream>
+#include <cassert>
+
+#include <CGAL/property_map.h>
+
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+#include <boost/program_options.hpp>
+namespace po = boost::program_options;
+#endif
+
+using namespace std;
+
+#include "PolyhedralSurf.h"
+#include "PolyhedralSurf_operations.h"
+#include "PolyhedralSurf_rings.h"
+
+//Kernel of the PolyhedralSurf
+typedef double                DFT;
+typedef CGAL::Simple_cartesian<DFT>  Data_Kernel;
+typedef Data_Kernel::Point_3  DPoint;
+typedef Data_Kernel::Vector_3 DVector;
+
+//HDS
+typedef PolyhedralSurf::Vertex_handle Vertex_handle;
+typedef PolyhedralSurf::Vertex Vertex;
+typedef PolyhedralSurf::Halfedge_handle Halfedge_handle;
+typedef PolyhedralSurf::Halfedge Halfedge;
+typedef PolyhedralSurf::Vertex_iterator Vertex_iterator;
+typedef PolyhedralSurf::Facet_handle Facet_handle;
+typedef PolyhedralSurf::Facet Facet;
+
+struct Hedge_cmp{
+  bool operator()(Halfedge_handle a,  Halfedge_handle b) const{
+    return &*a < &*b;
+  }
+};
+
+struct Facet_cmp{
+  bool operator()(Facet_handle a, Facet_handle b) const{
+    return &*a < &*b;
+  }
+};
+
+//Vertex property map, with std::map
+typedef std::map<Vertex*, int> Vertex2int_map_type;
+typedef boost::associative_property_map< Vertex2int_map_type > Vertex_PM_type;
+typedef T_PolyhedralSurf_rings<PolyhedralSurf, Vertex_PM_type > Poly_rings;
+
+//Hedge property map, with enriched Halfedge with its length
+// typedef HEdge_PM<PolyhedralSurf> Hedge_PM_type;
+// typedef T_PolyhedralSurf_hedge_ops<PolyhedralSurf, Hedge_PM_type> Poly_hedge_ops;
+//Hedge property map, with std::map
+typedef std::map<Halfedge_handle, double, Hedge_cmp> Hedge2double_map_type;
+typedef boost::associative_property_map<Hedge2double_map_type> Hedge_PM_type;
+typedef T_PolyhedralSurf_hedge_ops<PolyhedralSurf, Hedge_PM_type> Poly_hedge_ops;
+
+// //Facet property map with enriched Facet with its normal
+// typedef Facet_PM<PolyhedralSurf> Facet_PM_type;
+// typedef T_PolyhedralSurf_facet_ops<PolyhedralSurf, Facet_PM_type> Poly_facet_ops;
+//Facet property map, with std::map
+typedef std::map<Facet_handle, Vector_3, Facet_cmp> Facet2normal_map_type;
+typedef boost::associative_property_map<Facet2normal_map_type> Facet_PM_type;
+typedef T_PolyhedralSurf_facet_ops<PolyhedralSurf, Facet_PM_type> Poly_facet_ops;
+
+typedef double                   LFT;
+typedef CGAL::Simple_cartesian<LFT>     Local_Kernel;
+typedef CGAL::Monge_via_jet_fitting<Data_Kernel> My_Monge_via_jet_fitting;
+typedef My_Monge_via_jet_fitting::Monge_form My_Monge_form;
+
+
+// default parameter values and global variables
+unsigned int d_fitting = 2;
+unsigned int d_monge = 2;
+unsigned int nb_rings = 0;//seek min # of rings to get the required #pts
+unsigned int nb_points_to_use = 0;//
+bool verbose = false;
+unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+
+
+//gather points around the vertex v using rings on the
+//polyhedralsurf. the collection of points resorts to 3 alternatives:
+// 1. the exact number of points to be used
+// 2. the exact number of rings to be used
+// 3. nothing is specified
+void gather_fitting_points(Vertex* v,
+			   std::vector<DPoint> &in_points,
+			   Vertex_PM_type& vpm)
+{
+  //container to collect vertices of v on the PolyhedralSurf
+  std::vector<Vertex*> gathered;
+  //initialize
+  in_points.clear();
+
+  //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect
+  //enough rings and discard some points of the last collected ring to
+  //get the exact "nb_points_to_use"
+  if ( nb_points_to_use != 0 ) {
+    Poly_rings::collect_enough_rings(v, nb_points_to_use, gathered, vpm);
+    if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use);
+  }
+  else { // nb_points_to_use=0, this is the default and the option -p is not considered;
+    // then option -a nb_rings is checked. If nb_rings=0, collect
+    // enough rings to get the min_nb_points required for the fitting
+    // else collect the nb_rings required
+    if ( nb_rings == 0 )
+      Poly_rings::collect_enough_rings(v, min_nb_points, gathered, vpm);
+    else Poly_rings::collect_i_rings(v, nb_rings, gathered, vpm);
+  }
+
+  //store the gathered points
+  std::vector<Vertex*>::iterator
+    itb = gathered.begin(), ite = gathered.end();
+  CGAL_For_all(itb,ite) in_points.push_back((*itb)->point());
+}
+
+///////////////MAIN///////////////////////////////////////////////////////
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+int main(int argc, char *argv[])
+#else
+int main()
+#endif
+{
+  string if_name_string;
+  string if_name; //input file name
+  string w_if_name;  //as above, but / replaced by _
+  string res4openGL_fname;
+  string verbose_fname;
+  std::ofstream out_4ogl, out_verbose;
+
+  try {
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+    po::options_description desc("Allowed options");
+    desc.add_options()
+      ("help,h", "produce help message.")
+      ("input-file,f", po::value<string>(&if_name_string)->default_value("data/ellipe0.003.off"),
+       "name of the input off file")
+      ("degree-jet,d", po::value<unsigned int>(&d_fitting)->default_value(2),
+       "degree of the jet, 1 <= degre-jet <= 4")
+      ("degree-monge,m", po::value<unsigned int>(&d_monge)->default_value(2),
+       "degree of the Monge rep, 1 <= degree-monge <= degree-jet")
+      ("nb-rings,a", po::value<unsigned int>(&nb_rings)->default_value(0),
+       "number of rings to collect neighbors. 0 means collect enough rings to make appro possible a>=1 fixes the nb of rings to be collected")
+      ("nb-points,p", po::value<unsigned int>(&nb_points_to_use)->default_value(0),
+       "number of neighbors to use.  0 means this option is not considered, this is the default p>=1 fixes the nb of points to be used")
+      ("verbose,v", po::value<bool>(&verbose)->default_value(false),
+       "verbose output on text file")
+      ;
+
+    po::variables_map vm;
+    po::store(po::parse_command_line(argc, argv, desc), vm);
+    po::notify(vm);
+
+    if (vm.count("help")) {
+      cout << desc << "\n";
+      return 1;
+    }
+#else
+    std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
+    if_name_string = "data/ellipe0.003.off";
+    d_fitting = 2;
+    d_monge = 2;
+    nb_rings = 0;
+    nb_points_to_use = 0;
+    verbose = false;
+#endif
+  }
+  catch(exception& e) {
+    cerr << "error: " << e.what() << "\n";
+    return 1;
+  }
+  catch(...) {
+    cerr << "Exception of unknown type!\n";
+  }
+
+  //modify global variables which are fct of options:
+  min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+  if (nb_points_to_use < min_nb_points && nb_points_to_use != 0)
+    {std::cerr << "the nb of points asked is not enough to perform the fitting" << std::endl; exit(0);}
+
+  //prepare output file names
+  //--------------------------
+  std::cerr << "if_name_string" << if_name_string  << std::endl;
+  if_name = if_name_string;
+
+  w_if_name = if_name;
+  for(unsigned int i=0; i<w_if_name.size(); i++)
+    if (w_if_name[i] == '/') w_if_name[i]='_';
+  cerr << if_name << '\n';
+  cerr << w_if_name << '\n';
+
+  res4openGL_fname = w_if_name + ".4ogl.txt";
+std::cerr << "res4openGL_fname" << res4openGL_fname  << std::endl;
+  out_4ogl.open(res4openGL_fname.c_str(), std::ios::out);
+  assert(out_4ogl.good());
+  //if verbose only...
+  if(verbose){
+    verbose_fname  = w_if_name + ".verb.txt";
+    out_verbose.open(verbose_fname.c_str(), std::ios::out);
+    assert(out_verbose.good());
+    CGAL::set_pretty_mode(out_verbose);
+  }
+  unsigned int nb_vertices_considered = 0;//count vertices for verbose
+
+  //load the model from <mesh.off>
+  //------------------------------
+  PolyhedralSurf P;
+  std::ifstream stream(if_name.c_str());
+  stream >> P;
+  std::cout << "loadMesh...  "<< "Polysurf with " << P.size_of_vertices()
+	    << " vertices and " << P.size_of_facets()
+	    << " facets. " << std::endl;
+
+  if(verbose)
+    out_verbose << "Polysurf with " << P.size_of_vertices()
+                << " vertices and " << P.size_of_facets()
+                << " facets. " << std::endl;
+  //exit if not enough points in the model
+  if (min_nb_points > P.size_of_vertices())    exit(0);
+
+  //create property maps
+  //-----------------------------
+  //Vertex, using a std::map
+  Vertex2int_map_type vertex2props;
+  Vertex_PM_type vpm(vertex2props);
+
+  //Hedge, with enriched hedge
+  //HEdgePM_type hepm = get_hepm(boost::edge_weight_t(), P);
+  //Hedge, using a std::map
+  Hedge2double_map_type hedge2props;
+  Hedge_PM_type hepm(hedge2props);
+
+  //Facet PM, with enriched Facet
+  //FacetPM_type fpm = get_fpm(boost::vertex_attribute_t(), P);
+  //Facet PM, with std::map
+  Facet2normal_map_type facet2props;
+  Facet_PM_type fpm(facet2props);
+
+  //initialize Polyhedral data : length of edges, normal of facets
+  Poly_hedge_ops::compute_edges_length(P, hepm);
+  Poly_facet_ops::compute_facets_normals(P, fpm);
+
+  //MAIN LOOP: perform calculation for each vertex
+  //----------------------------------------------
+  std::vector<DPoint> in_points;  //container for data points
+  Vertex_iterator vitb, vite;
+
+  //initialize the tag of all vertices to -1
+  vitb = P.vertices_begin(); vite = P.vertices_end();
+  CGAL_For_all(vitb,vite) put(vpm, &(*vitb), -1);
+
+  vitb = P.vertices_begin(); vite = P.vertices_end();
+  for (; vitb != vite; vitb++) {
+    //initialize
+    Vertex* v = &(*vitb);
+    in_points.clear();
+    My_Monge_form monge_form;
+
+    //gather points around the vertex using rings
+    gather_fitting_points(v, in_points, vpm);
+
+    //skip if the nb of points is to small
+    if ( in_points.size() < min_nb_points )
+      {std::cerr << "not enough pts for fitting this vertex" << in_points.size() << std::endl;
+	continue;}
+
+    // perform the fitting
+    My_Monge_via_jet_fitting monge_fit;
+    monge_form = monge_fit(in_points.begin(), in_points.end(),
+			   d_fitting, d_monge);
+    //switch min-max ppal curv/dir wrt the mesh orientation
+    const DVector normal_mesh = Poly_facet_ops::compute_vertex_average_unit_normal(v, fpm);
+    monge_form.comply_wrt_given_normal(normal_mesh);
+
+    //OpenGL output. Scaling for ppal dir, may be optimized with a
+    //global mean edges length computed only once on all edges of P
+    DFT scale_ppal_dir = Poly_hedge_ops::compute_mean_edges_length_around_vertex(v, hepm)/2;
+
+    out_4ogl << v->point()  << " ";
+    monge_form.dump_4ogl(out_4ogl, scale_ppal_dir);
+
+    //verbose txt output
+    if (verbose) {
+      std::vector<DPoint>::iterator itbp = in_points.begin(), itep = in_points.end();
+      out_verbose << "in_points list : " << std::endl ;
+      for (;itbp!=itep;itbp++) out_verbose << *itbp << std::endl ;
+
+      out_verbose << "--- vertex " <<  ++nb_vertices_considered
+                  <<	" : " << v->point() << std::endl
+                  << "number of points used : " << in_points.size() << std::endl
+	;// << monge_form;
+    }
+  } //all vertices processed
+
+  //cleanup filenames
+  //------------------
+  out_4ogl.close();
+  if(verbose) {
+    out_verbose.close();
+  }  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf.h b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf.h
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf.h
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf_operations.h b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf_operations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf_operations.h
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf_operations.h
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf_rings.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/PolyhedralSurf_rings.h
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/PolyhedralSurf_rings.h
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/README b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/README
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/README
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/Single_estimation.cpp b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/Single_estimation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/Single_estimation.cpp
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/Single_estimation.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/ellipe0.003.off b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/ellipe0.003.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/ellipe0.003.off
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/ellipe0.003.off
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/in_points_d4.txt b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/in_points_d4.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/in_points_d4.txt
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/in_points_d4.txt
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/in_points_file.txt b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/in_points_file.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/in_points_file.txt
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/in_points_file.txt
diff --git a/3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/poly2x^2+y^2-0.062500-off b/3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/poly2x^2+y^2-0.062500-off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Jet_fitting_3/data/poly2x^2+y^2-0.062500-off
rename to 3rdparty/CGAL-4.8/examples/Jet_fitting_3/data/poly2x^2+y^2-0.062500-off
diff --git a/3rdparty/CGAL-4.8/examples/Kernel_23/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Kernel_23/CMakeLists.txt
new file mode 100644
index 0000000..e1b3bac
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kernel_23/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Kernel_23_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "MyKernel.cpp" )
+  create_single_source_cgal_program( "cartesian_converter.cpp" )
+  create_single_source_cgal_program( "exact.cpp" )
+  create_single_source_cgal_program( "intersection_get.cpp" )
+  create_single_source_cgal_program( "intersection_visitor.cpp" )
+  create_single_source_cgal_program( "intersections.cpp" )
+  create_single_source_cgal_program( "points_and_segment.cpp" )
+  create_single_source_cgal_program( "surprising.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_bbox_2.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_bbox_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_bbox_2.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_bbox_2.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_coord_iterator.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_coord_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_coord_iterator.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_coord_iterator.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_point_2.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyConstruct_point_2.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyConstruct_point_2.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyKernel.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/MyKernel.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyKernel.cpp
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyKernel.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyKernel.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyKernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyKernel.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyKernel.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyPointC2.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyPointC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyPointC2.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyPointC2.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MyPointC2_iostream.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MyPointC2_iostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MyPointC2_iostream.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MyPointC2_iostream.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/MySegmentC2.h b/3rdparty/CGAL-4.8/examples/Kernel_23/MySegmentC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/MySegmentC2.h
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/MySegmentC2.h
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/cartesian_converter.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/cartesian_converter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/cartesian_converter.cpp
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/cartesian_converter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/exact.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/exact.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/exact.cpp
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/exact.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_get.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_get.cpp
new file mode 100644
index 0000000..2e6c66c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_get.cpp
@@ -0,0 +1,26 @@
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/intersections.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Line_2 Line_2;
+typedef K::Intersect_2 Intersect_2;
+
+int main()
+{
+  Segment_2 seg(Point_2(0,0), Point_2(2,2));
+  Line_2 lin(1,-1,0);
+
+  CGAL::cpp11::result_of<Intersect_2(Segment_2, Line_2)>::type
+    result = intersection(seg, lin);
+  if (result) {
+    if (const Segment_2* s = boost::get<Segment_2>(&*result)) {
+      std::cout << *s << std::endl;
+    } else {
+      const Point_2* p = boost::get<Point_2 >(&*result);
+      std::cout << *p << std::endl;
+    }
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_visitor.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_visitor.cpp
new file mode 100644
index 0000000..12e3cec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kernel_23/intersection_visitor.cpp
@@ -0,0 +1,41 @@
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/intersections.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel K;
+typedef K::Point_2 Point_2;
+typedef K::Segment_2 Segment_2;
+typedef K::Line_2 Line_2;
+typedef K::Intersect_2 Intersect_2;
+
+struct Intersection_visitor {
+  typedef void result_type;
+
+  void operator()(const Point_2& p) const
+  {
+    std::cout << p << std::endl;
+  }
+
+  void operator()(const Segment_2& s) const
+  {
+    std::cout << s << std::endl;
+  }
+};
+
+int main()
+{
+  Segment_2 seg(Point_2(0,0), Point_2(1,1));
+  Line_2 lin(1,-1,0);
+
+  // with C++11 support
+  // auto result = intersection(seg, lin);
+  // without C++11
+  CGAL::cpp11::result_of<Intersect_2(Segment_2, Line_2)>::type
+    result = intersection(seg, lin);
+  if (result) { 
+    boost::apply_visitor(Intersection_visitor(), *result); 
+  } else {
+    // no intersection
+  }
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Kernel_23/intersections.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/intersections.cpp
new file mode 100644
index 0000000..6887cb4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kernel_23/intersections.cpp
@@ -0,0 +1,69 @@
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/iterator.h>
+#include <CGAL/point_generators_2.h>
+
+#include <boost/bind.hpp>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel K;
+typedef K::Point_2                     Point;
+typedef K::Segment_2                   Segment;
+
+typedef CGAL::Creator_uniform_2<double,Point>              Pt_creator;
+typedef CGAL::Random_points_on_segment_2<Point,Pt_creator> P1;
+typedef CGAL::Random_points_on_circle_2<Point,Pt_creator>  P2;
+typedef CGAL::Creator_uniform_2< Point, Segment>           Seg_creator;
+typedef CGAL::Join_input_iterator_2< P1, P2, Seg_creator>  Seg_iterator;
+
+struct Intersector{
+  typedef CGAL::cpp11::result_of<K::Intersect_2(Segment,Segment)>::type result_type;
+  const Segment& s;
+  K::Intersect_2 intersect;
+
+  Intersector(const Segment& seg): s(seg) {}
+
+  result_type
+  operator() ( const Segment& other) const
+  {
+    return intersect(s, other);
+  }
+};
+
+int main()
+{
+  std::vector<Segment> input;
+
+  // Prepare point generator for the horizontal segment, length 200.
+  P1 p1( Point(-100,0), Point(100,0));
+
+  // Prepare point generator for random points on circle, radius 250.
+  P2 p2( 250);
+
+  // Create segments.
+  Seg_iterator g( p1, p2);
+  CGAL::cpp11::copy_n( g, 200, std::back_inserter(input));
+
+
+  // splitting results with Dispatch_output_iterator
+  std::vector<Point> points;
+  std::vector<Segment> segments;
+
+  typedef CGAL::Dispatch_output_iterator<
+    CGAL::cpp11::tuple<Point,Segment>, CGAL::cpp11::tuple< std::back_insert_iterator<std::vector<Point> >,
+                                               std::back_insert_iterator<std::vector<Segment> > > >
+    Dispatcher;
+
+  Dispatcher disp = CGAL::dispatch_output<Point,Segment>( std::back_inserter(points),
+                                                          std::back_inserter(segments) );
+
+  // intersects the first segment of input with all other segments
+  // The resulting points or segments are written in the vectors with the same names
+  std::transform( input.begin(), input.end(), disp,
+                  Intersector(input.front()) );
+
+
+  std::cout << "Point intersections: " << points.size() << std::endl;
+  std::cout << "Segment intersections: " << segments.size() << std::endl;
+
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/points_and_segment.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/points_and_segment.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/points_and_segment.cpp
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/points_and_segment.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kernel_23/surprising.cpp b/3rdparty/CGAL-4.8/examples/Kernel_23/surprising.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kernel_23/surprising.cpp
rename to 3rdparty/CGAL-4.8/examples/Kernel_23/surprising.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/CMakeLists.txt
new file mode 100644
index 0000000..89addbd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Kinetic_data_structures_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Kinetic_Delaunay_triangulation_2.cpp" )
+  create_single_source_cgal_program( "Kinetic_Delaunay_triangulation_3.cpp" )
+  create_single_source_cgal_program( "Kinetic_insert_event.cpp" )
+  create_single_source_cgal_program( "Kinetic_regular_triangulation_3.cpp" )
+  create_single_source_cgal_program( "Kinetic_sort.cpp" )
+  create_single_source_cgal_program( "Kinetic_sweepline.cpp" )
+  create_single_source_cgal_program( "defining_a_simulation_traits.cpp" )
+  create_single_source_cgal_program( "trivial_kds.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_2.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_3.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_Delaunay_triangulation_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_insert_event.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_insert_event.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_insert_event.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_insert_event.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_regular_triangulation_3.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_regular_triangulation_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_regular_triangulation_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_regular_triangulation_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_sort.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_sort.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_sort.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_sort.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_sweepline.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_sweepline.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/Kinetic_sweepline.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/Kinetic_sweepline.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_1 b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_1
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_1
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_1
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_2 b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_2
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_2
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_2
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_3 b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/points_3
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/points_3
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/sweepline.input b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/sweepline.input
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/sweepline.input
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/sweepline.input
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/weighted_points_3 b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/weighted_points_3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_data_structures/data/weighted_points_3
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/data/weighted_points_3
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/defining_a_simulation_traits.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/defining_a_simulation_traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/trivial_kds.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_data_structures/trivial_kds.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/trivial_kds.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_data_structures/trivial_kds.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Kinetic_framework/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Kinetic_framework/CMakeLists.txt
new file mode 100644
index 0000000..3cb06fd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Kinetic_framework/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Kinetic_framework_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "adding_a_certificate.cpp" )
+  create_single_source_cgal_program( "listener.cpp" )
+  create_single_source_cgal_program( "pointer_queue.cpp" )
+  create_single_source_cgal_program( "ref_counted.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/adding_a_certificate.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_framework/adding_a_certificate.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/adding_a_certificate.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/adding_a_certificate.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/data/points_2 b/3rdparty/CGAL-4.8/examples/Kinetic_framework/data/points_2
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/data/points_2
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/data/points_2
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/data/points_with_color_2 b/3rdparty/CGAL-4.8/examples/Kinetic_framework/data/points_with_color_2
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/data/points_with_color_2
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/data/points_with_color_2
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/listener.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_framework/listener.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/listener.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/listener.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/pointer_queue.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_framework/pointer_queue.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/pointer_queue.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/pointer_queue.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Kinetic_framework/ref_counted.cpp b/3rdparty/CGAL-4.8/examples/Kinetic_framework/ref_counted.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Kinetic_framework/ref_counted.cpp
rename to 3rdparty/CGAL-4.8/examples/Kinetic_framework/ref_counted.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLCCViewerQt.inc b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLCCViewerQt.inc
new file mode 100644
index 0000000..467af4f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLCCViewerQt.inc
@@ -0,0 +1,33 @@
+# This file must be included in your CMakeLists.txt to use cgal_map_viewer_qt.h.
+# You need to link the libraries in your executable by using
+# TARGET_LINK_LIBRARIES( myexec ${MAP_VIEWER_LIBRARIES})
+
+if ( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND)
+  message(STATUS "NOTICE: Libraries for lcc_viewer not found "
+                 "(CGAL, Qt5, QGLViewer).")
+endif( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND)
+
+include( ${CGAL_USE_FILE} )
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+FIND_PACKAGE(Qt5        REQUIRED COMPONENTS OpenGL Xml)
+find_package(QGLViewer  REQUIRED)
+find_package(OpenGL     REQUIRED)
+
+add_definitions(${QT_DEFINITIONS})
+add_definitions(-DQT_NO_KEYWORDS)
+
+include_directories( ${QGLVIEWER_INCLUDE_DIR} )
+add_definitions(${QGLVIEWER_DEFINITIONS})
+
+set (MAP_VIEWER_LIBRARIES ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES}
+                          ${OPENGL_gl_LIBRARY}) # ${OPENGL_glu_LIBRARY}
+
+set(MAP_VIEWER_MODULES Xml OpenGL)
+
+ADD_DEFINITIONS("-DCGAL_LCC_USE_VIEWER -DCGAL_LCC_USE_QT")
+message(STATUS "Libraries for lcc_viewer found. You need to link them "
+               "in your executable by using "
+               "TARGET_LINK_LIBRARIES( myexec \${MAP_VIEWER_LIBRARIES})")
+
+set(LCC_VIEWER true)
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLists.txt
new file mode 100644
index 0000000..390519e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/CMakeLists.txt
@@ -0,0 +1,59 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project( Linear_cell_complex_examples )
+
+cmake_minimum_required(VERSION 2.8.11)
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+# If you want to visualize a linear cell complex, you can use the following viewer
+# based on qt. Just uncomment the following two lines, plus the lines qt5_use_modules below
+
+# find_package(CGAL COMPONENTS Qt5)
+# include("CMakeLCCViewerQt.inc")
+
+# If you don't want to visualize, use the following line (otherwise comment it)
+find_package(CGAL QUIET COMPONENTS Core)
+
+# For Gprof.
+# ADD_DEFINITIONS("-pg")
+# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
+
+# To use valgrind, we must disable rounding math ckeck.
+# add_definition(-DCGAL_DISABLE_ROUNDING_MATH_CHECK)
+
+if ( CGAL_FOUND )
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+  include_directories(BEFORE ../../include)
+
+  create_single_source_cgal_program( "linear_cell_complex_3.cpp" )
+  create_single_source_cgal_program( "linear_cell_complex_4.cpp" )
+  create_single_source_cgal_program(
+                  "linear_cell_complex_3_with_colored_vertices.cpp" )
+  create_single_source_cgal_program(
+                  "linear_cell_complex_3_with_mypoint.cpp" )
+
+  create_single_source_cgal_program("plane_graph_to_lcc_2.cpp")
+  create_single_source_cgal_program("linear_cell_complex_3_attributes_management.cpp")
+
+  add_executable(voronoi_2 voronoi_2.cpp)
+  target_link_libraries(voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
+                                  ${MAP_VIEWER_LIBRARIES})
+  # qt5_use_modules(voronoi_2 ${MAP_VIEWER_MODULES})
+
+  add_executable(voronoi_3 voronoi_3.cpp)
+  target_link_libraries(voronoi_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
+                                  ${MAP_VIEWER_LIBRARIES})
+  # qt5_use_modules(voronoi_3 ${MAP_VIEWER_MODULES})
+
+else()
+
+  message(STATUS "This program requires the CGAL library, "
+                  "and will not be compiled.")
+
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/README.txt b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/README.txt
new file mode 100644
index 0000000..6326da0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/README.txt
@@ -0,0 +1,28 @@
+Examples for Linear_cell_complex package:
+=========================================
+
+* linear_cell_complex_3.cpp
+  linear_cell_complex_3_with_colored_vertices.cpp
+  linear_cell_complex_4.cpp
+
+  Three "basic" examples, detailled in the user manual.
+
+
+* plane_graph_to_lcc_2.cpp
+
+  Program allowing to transform a planar graph into a 2D linear cell complex.
+
+
+* voronoi_2.cpp
+
+  Example showing how to compute 2D voronoi diagram of a set of 2D points.
+
+
+* voronoi_3.cpp
+
+  Example showing how to compute 3D voronoi diagram of a set of 3D points.
+
+
+* linear_cell_complex_3_with_mypoint.cpp
+
+  Example showing how to customize the type of points used in LCC.
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/armadillo.off b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/armadillo.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/armadillo.off
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/armadillo.off
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/graph.txt b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/graph.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/graph.txt
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/graph.txt
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/points_2 b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/points_2
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/points_2
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/points_2
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/points_3 b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/points_3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/points_3
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/points_3
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/small_points_2 b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/small_points_2
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/small_points_2
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/small_points_2
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/small_points_3 b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/small_points_3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/data/small_points_3
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/data/small_points_3
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h
new file mode 100644
index 0000000..1a16423
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h
@@ -0,0 +1,932 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+
+#ifndef CGAL_LCC_3_VIEWER_QT_H
+#define CGAL_LCC_3_VIEWER_QT_H
+
+#include <QApplication>
+#include <QKeyEvent>
+
+#include <QGLViewer/qglviewer.h>
+#include <QKeyEvent>
+#include <QOpenGLFunctions_2_1>
+#include <QOpenGLVertexArrayObject>
+#include <QGLBuffer>
+#include <QOpenGLShaderProgram>
+
+#include <CGAL/Linear_cell_complex.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
+typedef Local_kernel::Point_3  Local_point;
+typedef Local_kernel::Vector_3 Local_vector;
+
+template<class LCC, int dim=LCC::ambient_dimension>
+struct Geom_utils;
+
+template<class LCC>
+struct Geom_utils<LCC,3>
+{
+  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
+  { return converter(lcc.point_of_vertex_attribute(vh)); }
+
+  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
+  { return converter(lcc.point(dh)); }
+
+  Local_vector get_facet_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
+  {
+    Local_vector n = converter(CGAL::compute_normal_of_cell_2<LCC>(lcc,dh));
+    n = n/(CGAL::sqrt(n*n));
+    return n;
+  }
+
+  Local_vector get_vertex_normal(LCC& lcc, typename LCC::Dart_const_handle dh)
+  {
+    Local_vector n = converter(CGAL::compute_normal_of_cell_0<LCC>(lcc,dh));
+    n = n/(CGAL::sqrt(n*n));
+    return n;
+  }
+protected:
+  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;
+};
+
+template<class LCC>
+struct Geom_utils<LCC,2>
+{
+  Local_point get_point(LCC& lcc, typename LCC::Vertex_attribute_const_handle vh)
+  {
+    Local_point p(converter(lcc.point_of_vertex_attribute(vh).x()),0,
+                  converter(lcc.point_of_vertex_attribute(vh).y()));
+    return p;
+  }
+
+  Local_point get_point(LCC& lcc, typename LCC::Dart_const_handle dh)
+  { return get_point(lcc, lcc.vertex_attribute(dh)); }
+
+  Local_vector get_facet_normal(LCC&, typename LCC::Dart_const_handle)
+  {
+    Local_vector n(0,1,0);
+    return n;
+  }
+
+  Local_vector get_vertex_normal(LCC&, typename LCC::Dart_const_handle)
+  {
+    Local_vector n(0,1,0);
+    return n;
+  }
+protected:
+  CGAL::Cartesian_converter<typename LCC::Traits, Local_kernel> converter;
+};
+
+template<class LCC>
+CGAL::Bbox_3 bbox(LCC& lcc)
+{
+  CGAL::Bbox_3 bb;
+  Geom_utils<LCC> geomutils;
+
+  typename LCC::Vertex_attribute_range::const_iterator
+    it=lcc.vertex_attributes().begin(), itend=lcc.vertex_attributes().end();
+  if ( it!=itend )
+  {
+    bb = geomutils.get_point(lcc, it).bbox();
+    for( ++it; it!=itend; ++it)
+    {
+      bb = bb + geomutils.get_point(lcc, it).bbox();
+    }
+  }
+
+  return bb;
+}
+
+template<class LCC>
+class SimpleLCCViewerQt : public QGLViewer, public QOpenGLFunctions_2_1
+{
+  typedef typename LCC::Dart_handle Dart_handle;
+
+  struct Vertex_info
+  {
+    Dart_handle dh;
+    Local_vector v;
+  };
+
+  struct Face_info
+  {
+    bool exist_edge[3];
+    bool is_external;
+    bool is_process;
+  };
+
+  typedef CGAL::Triangulation_2_filtered_projection_traits_3<CGAL::Exact_predicates_inexact_constructions_kernel> P_traits;
+  typedef CGAL::Triangulation_vertex_base_with_info_2<Vertex_info, P_traits> Vb;
+
+  typedef CGAL::Triangulation_face_base_with_info_2<Face_info, P_traits> Fb1;
+
+  typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>    Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                   TDS;
+  typedef CGAL::No_intersection_tag                                     Itag;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits, TDS,
+                                                     Itag>              CDT;
+
+public:
+  // Constructor/Destructor
+  SimpleLCCViewerQt(LCC& alcc) :
+    QGLViewer(CGAL::Qt::createOpenGLContext()),
+    lcc(alcc),
+    wireframe(false),
+    flatShading(true),
+    edges(true),
+    vertices(true),
+    are_buffers_initialized(false)
+  {
+    setWindowTitle("3D lcc viewer");
+    resize(500, 450);
+
+    QGLFormat newFormat = this->format();
+    newFormat.setSampleBuffers(true);
+    newFormat.setSamples(16);
+    this->setFormat(newFormat);
+  }
+
+  ~SimpleLCCViewerQt()
+  {
+    buffers[0].destroy();
+    buffers[1].destroy();
+    buffers[2].destroy();
+    buffers[3].destroy();
+    buffers[4].destroy();
+    buffers[5].destroy();
+    vao[0].destroy();
+    vao[1].destroy();
+    vao[2].destroy();
+    vao[3].destroy();
+  }
+
+protected:
+  void compile_shaders()
+  {
+    if(!buffers[0].create() || !buffers[1].create() || !buffers[2].create() ||
+       !buffers[3].create() || !buffers[4].create() || !buffers[5].create())
+    {
+      std::cerr<<"VBO Creation FAILED"<<std::endl;
+    }
+
+    if(!vao[0].create() || !vao[1].create() || !vao[2].create() || !vao[3].create())
+    {
+      std::cerr<<"VAO Creation FAILED"<<std::endl;
+    }
+
+    //The Facets
+
+    //Vertex source code
+// "attribute highp vec3 color;\n"
+//        "uniform highp vec4 color;\n"
+        //        "varying highp vec4 fColor; \n"
+        //        "   fColor = vec4(color, 1.0); \n"
+    const char vertex_source[] =
+      {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "attribute highp vec3 normal;\n"
+
+        "uniform highp mat4 mvp_matrix;\n"
+        "uniform highp mat4 mv_matrix; \n"
+
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "void main(void)\n"
+        "{\n"
+        "   fP = mv_matrix * vertex; \n"
+        "   fN = mat3(mv_matrix)* normal; \n"
+        "   gl_Position = mvp_matrix * vertex;\n"
+        "}"
+      };
+    //Vertex source code
+// "varying highp vec4 fColor; \n"
+    const char fragment_source[] =
+      {
+        "#version 120 \n"
+        "varying highp vec4 fP; \n"
+        "varying highp vec3 fN; \n"
+        "uniform highp vec4 color; \n"
+        "uniform vec4 light_pos;  \n"
+        "uniform vec4 light_diff; \n"
+        "uniform vec4 light_spec; \n"
+        "uniform vec4 light_amb;  \n"
+        "uniform float spec_power ; \n"
+
+        "void main(void) { \n"
+
+        "   vec3 L = light_pos.xyz - fP.xyz; \n"
+        "   vec3 V = -fP.xyz; \n"
+
+        "   vec3 N = normalize(fN); \n"
+        "   L = normalize(L); \n"
+        "   V = normalize(V); \n"
+
+        "   vec3 R = reflect(-L, N); \n"
+        "   vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n"
+        "   vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
+
+        "gl_FragColor = light_amb*color + diffuse  ; \n"
+        "} \n"
+        "\n"
+      };
+
+    QOpenGLShader *vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source))
+    {
+      std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    QOpenGLShader *fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source))
+    {
+      std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program.addShader(vertex_shader))
+    {
+      std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.addShader(fragment_shader))
+    {
+      std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program.link())
+    {
+      std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program.bind();
+
+    //Vertex source code
+    const char vertex_source_p_l[] =
+      {
+        "#version 120 \n"
+        "attribute highp vec4 vertex;\n"
+        "uniform highp mat4 mvp_matrix;\n"
+        "void main(void)\n"
+        "{\n"
+        "   gl_Position = mvp_matrix * vertex;\n"
+        "}"
+      };
+    //Vertex source code
+    const char fragment_source_p_l[] =
+      {
+        "#version 120 \n"
+        "uniform highp vec4 color; \n"
+        "void main(void) { \n"
+        "gl_FragColor = color; \n"
+        "} \n"
+        "\n"
+      };
+
+    vertex_shader = new QOpenGLShader(QOpenGLShader::Vertex);
+    if(!vertex_shader->compileSourceCode(vertex_source_p_l))
+    {
+      std::cerr<<"Compiling vertex source FAILED"<<std::endl;
+    }
+
+    fragment_shader= new QOpenGLShader(QOpenGLShader::Fragment);
+    if(!fragment_shader->compileSourceCode(fragment_source_p_l))
+    {
+      std::cerr<<"Compiling fragmentsource FAILED"<<std::endl;
+    }
+
+    if(!rendering_program_p_l.addShader(vertex_shader))
+    {
+      std::cerr<<"adding vertex shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_p_l.addShader(fragment_shader))
+    {
+      std::cerr<<"adding fragment shader FAILED"<<std::endl;
+    }
+    if(!rendering_program_p_l.link())
+    {
+      std::cerr<<"linking Program FAILED"<<std::endl;
+    }
+    rendering_program_p_l.bind();
+  }
+
+  void initialize_buffers()
+  {
+    //points of the facets
+    vao[0].bind();
+    buffers[0].bind();
+    buffers[0].allocate(pos_facets.data(),
+                        static_cast<int>(pos_facets.size()*sizeof(float)));
+    vertexLocation[0] = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(vertexLocation[0]);
+    rendering_program.setAttributeBuffer(vertexLocation[0],GL_FLOAT,0,3);
+    rendering_program.release();
+    buffers[0].release();
+
+    //normals of the facets
+    buffers[1].bind();
+    buffers[1].allocate(flat_normals.data(),
+                        static_cast<int>(flat_normals.size()*sizeof(float)));
+    normalsLocation = rendering_program.attributeLocation("normal");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(normalsLocation);
+    rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3);
+    rendering_program.release();
+    buffers[1].release();
+
+    vao[0].release();
+
+    vao[1].bind();
+
+    //points of the facets
+    buffers[2].bind();
+    buffers[2].allocate(pos_facets.data(),
+                        static_cast<int>(pos_facets.size()*sizeof(float)));
+    vertexLocation[1] = rendering_program.attributeLocation("vertex");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(vertexLocation[1]);
+    rendering_program.setAttributeBuffer(vertexLocation[1],GL_FLOAT,0,3);
+    rendering_program.release();
+    buffers[2].release();
+
+    //normals of the facets
+    buffers[3].bind();
+    buffers[3].allocate(smooth_normals.data(),
+                        static_cast<int>(smooth_normals.size()*sizeof(float)));
+    normalsLocation = rendering_program.attributeLocation("normal");
+    rendering_program.bind();
+    rendering_program.enableAttributeArray(normalsLocation);
+    rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3);
+    rendering_program.release();
+    buffers[3].release();
+
+    vao[1].release();
+
+    //The lines
+    vao[2].bind();
+
+    buffers[4].bind();
+    buffers[4].allocate(pos_lines.data(), static_cast<int>(pos_lines.size()*sizeof(float)));
+    vertexLocation[2] = rendering_program_p_l.attributeLocation("vertex");
+    rendering_program_p_l.bind();
+    rendering_program_p_l.enableAttributeArray(vertexLocation[2]);
+    rendering_program_p_l.setAttributeBuffer(vertexLocation[2],GL_FLOAT,0,3);
+    buffers[4].release();
+    rendering_program_p_l.release();
+
+    vao[2].release();
+
+    //The points
+    vao[3].bind();
+    buffers[5].bind();
+    buffers[5].allocate(pos_points.data(), static_cast<int>(pos_points.size()*sizeof(float)));
+    vertexLocation[3] = rendering_program_p_l.attributeLocation("vertex");
+    rendering_program_p_l.bind();
+    rendering_program_p_l.enableAttributeArray(vertexLocation[3]);
+    rendering_program_p_l.setAttributeBuffer(vertexLocation[3],GL_FLOAT,0,3);
+    buffers[5].release();
+    rendering_program_p_l.release();
+    vao[3].release();
+
+    are_buffers_initialized = true;
+  }
+
+  void compute_face(Dart_handle dh)
+  {
+    //compute flat normals
+    Local_vector normal = geomutils.get_facet_normal(lcc, dh);
+    normal = normal/(CGAL::sqrt(normal*normal));
+
+    if (lcc.template beta<1,1,1>(dh)!=dh)
+    {
+      P_traits cdt_traits(normal);
+      CDT cdt(cdt_traits);
+
+      // Iterates on the vector of facet handles
+      typename CDT::Vertex_handle previous = NULL, first = NULL;
+      for (typename LCC::template Dart_of_orbit_range<1>::const_iterator
+             he_circ = lcc.template darts_of_orbit<1>(dh).begin(),
+             he_circ_end = lcc.template darts_of_orbit<1>(dh).end();
+           he_circ!=he_circ_end; ++he_circ)
+      {
+        typename CDT::Vertex_handle vh = cdt.insert(geomutils.get_point(lcc, he_circ));
+        if(first == NULL)
+        { first = vh; }
+        vh->info().v = geomutils.get_vertex_normal(lcc, he_circ);
+        if(previous!=NULL && previous != vh)
+        { cdt.insert_constraint(previous, vh); }
+        previous = vh;
+      }
+      if (previous!=NULL)
+        cdt.insert_constraint(previous, first);
+
+      // sets mark is_external
+      for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(),
+            fitend = cdt.all_faces_end(); fit!=fitend; ++fit)
+      {
+        fit->info().is_external = true;
+        fit->info().is_process = false;
+      }
+      //check if the facet is external or internal
+      std::queue<typename CDT::Face_handle> face_queue;
+      typename CDT::Face_handle face_internal = NULL;
+      face_queue.push(cdt.infinite_vertex()->face());
+      while(! face_queue.empty() )
+      {
+        typename CDT::Face_handle fh = face_queue.front();
+        face_queue.pop();
+        if(!fh->info().is_process)
+        {
+          fh->info().is_process = true;
+          for(int i = 0; i <3; ++i)
+          {
+            if(!cdt.is_constrained(std::make_pair(fh, i)))
+            {
+              face_queue.push(fh->neighbor(i));
+            }
+            else if (face_internal==NULL)
+            {
+              face_internal = fh->neighbor(i);
+            }
+          }
+        }
+      }
+
+      if ( face_internal!=NULL )
+        face_queue.push(face_internal);
+
+      while(! face_queue.empty() )
+      {
+        typename CDT::Face_handle fh = face_queue.front();
+        face_queue.pop();
+        if(!fh->info().is_process)
+        {
+          fh->info().is_process = true;
+          fh->info().is_external = false;
+          for(int i = 0; i <3; ++i)
+          {
+            if(!cdt.is_constrained(std::make_pair(fh, i)))
+            {
+              face_queue.push(fh->neighbor(i));
+            }
+          }
+        }
+      }
+
+      //iterates on the internal faces to add the vertices to the positions
+      //and the normals to the appropriate vectors
+      for(typename CDT::Finite_faces_iterator ffit = cdt.finite_faces_begin(),
+            ffitend = cdt.finite_faces_end(); ffit != ffitend; ++ffit)
+      {
+        if(!ffit->info().is_external)
+        {
+          flat_normals.push_back(normal.x());
+          flat_normals.push_back(normal.y());
+          flat_normals.push_back(normal.z());
+
+          flat_normals.push_back(normal.x());
+          flat_normals.push_back(normal.y());
+          flat_normals.push_back(normal.z());
+
+          flat_normals.push_back(normal.x());
+          flat_normals.push_back(normal.y());
+          flat_normals.push_back(normal.z());
+
+          smooth_normals.push_back(ffit->vertex(0)->info().v.x());
+          smooth_normals.push_back(ffit->vertex(0)->info().v.y());
+          smooth_normals.push_back(ffit->vertex(0)->info().v.z());
+
+          smooth_normals.push_back(ffit->vertex(1)->info().v.x());
+          smooth_normals.push_back(ffit->vertex(1)->info().v.y());
+          smooth_normals.push_back(ffit->vertex(1)->info().v.z());
+
+          smooth_normals.push_back(ffit->vertex(2)->info().v.x());
+          smooth_normals.push_back(ffit->vertex(2)->info().v.y());
+          smooth_normals.push_back(ffit->vertex(2)->info().v.z());
+
+          pos_facets.push_back(ffit->vertex(0)->point().x());
+          pos_facets.push_back(ffit->vertex(0)->point().y());
+          pos_facets.push_back(ffit->vertex(0)->point().z());
+
+          pos_facets.push_back(ffit->vertex(1)->point().x());
+          pos_facets.push_back(ffit->vertex(1)->point().y());
+          pos_facets.push_back(ffit->vertex(1)->point().z());
+
+          pos_facets.push_back(ffit->vertex(2)->point().x());
+          pos_facets.push_back(ffit->vertex(2)->point().y());
+          pos_facets.push_back(ffit->vertex(2)->point().z());
+        }
+      }
+    }
+    else
+    {
+      flat_normals.push_back(normal.x());
+      flat_normals.push_back(normal.y());
+      flat_normals.push_back(normal.z());
+
+      flat_normals.push_back(normal.x());
+      flat_normals.push_back(normal.y());
+      flat_normals.push_back(normal.z());
+
+      flat_normals.push_back(normal.x());
+      flat_normals.push_back(normal.y());
+      flat_normals.push_back(normal.z());
+
+      for (typename LCC::template Dart_of_orbit_range<1>::const_iterator
+             orbitIter = lcc.template darts_of_orbit<1>(dh).begin();
+           orbitIter.cont(); ++orbitIter)
+      {
+        //compute Smooth normals
+        Local_vector normal = geomutils.get_vertex_normal(lcc, orbitIter);
+        normal = normal/(CGAL::sqrt(normal*normal));
+
+        smooth_normals.push_back(normal.x());
+        smooth_normals.push_back(normal.y());
+        smooth_normals.push_back(normal.z());
+
+        Local_point p = geomutils.get_point(lcc, orbitIter);
+        pos_facets.push_back(p.x());
+        pos_facets.push_back(p.y());
+        pos_facets.push_back(p.z());
+      }
+    }
+  }
+
+  void compute_edge(Dart_handle dh)
+  {
+    Local_point p =  geomutils.get_point(lcc, dh);
+    Dart_handle d2 = lcc.other_extremity(dh);
+    if ( d2!=NULL )
+    {
+      Local_point p2 = geomutils.get_point(lcc, d2);
+      pos_lines.push_back(p.x());
+      pos_lines.push_back(p.y());
+      pos_lines.push_back(p.z());
+
+      pos_lines.push_back(p2.x());
+      pos_lines.push_back(p2.y());
+      pos_lines.push_back(p2.z());
+    }
+  }
+
+  void compute_vertex(Dart_handle dh, bool empty)
+  {
+    Local_point p =  geomutils.get_point(lcc, dh);
+    pos_points.push_back(p.x());
+    pos_points.push_back(p.y());
+    pos_points.push_back(p.z());
+
+    if ( empty )
+    {
+      bb = p.bbox();
+      empty = false;
+    }
+    else
+      bb = bb + p.bbox();
+  }
+
+  void compute_elements()
+  {
+    pos_facets.clear();
+    flat_normals.clear();
+    smooth_normals.clear();
+    pos_lines.clear();
+    pos_points.clear();
+
+    if ( lcc.is_empty() )
+    {
+      bb = Local_point(CGAL::ORIGIN).bbox();
+      bb = bb + Local_point(1,1,1).bbox(); // To avoid a warning from Qglviewer
+      return;
+    }
+
+    unsigned int markfaces    = lcc.get_new_mark();
+    unsigned int markedges    = lcc.get_new_mark();
+    unsigned int markvertices = lcc.get_new_mark();
+
+    bool empty = true;
+    for (typename LCC::Dart_range::iterator it=lcc.darts().begin(),
+           itend=lcc.darts().end(); it!=itend; ++it )
+    {
+      if ( !lcc.is_marked(it, markfaces) )
+      {
+        compute_face(it);
+        CGAL::mark_cell<LCC, 2>(lcc, it, markfaces);
+      }
+
+      if ( !lcc.is_marked(it, markedges) )
+      {
+        compute_edge(it);
+        CGAL::mark_cell<LCC, 1>(lcc, it, markedges);
+      }
+
+      if ( !lcc.is_marked(it, markvertices) )
+      {
+        compute_vertex(it, empty);
+        empty = false;
+        CGAL::mark_cell<LCC, 0>(lcc, it, markvertices);
+      }
+    }
+
+    lcc.free_mark(markfaces);
+    lcc.free_mark(markedges);
+    lcc.free_mark(markvertices);
+
+  }
+
+  void attrib_buffers(QGLViewer* viewer)
+  {
+    QMatrix4x4 mvpMatrix;
+    QMatrix4x4 mvMatrix;
+    double mat[16];
+    viewer->camera()->getModelViewProjectionMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+      mvpMatrix.data()[i] = (float)mat[i];
+    }
+    viewer->camera()->getModelViewMatrix(mat);
+    for(int i=0; i < 16; i++)
+    {
+      mvMatrix.data()[i] = (float)mat[i];
+    }
+    // define material
+    QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
+    QVector4D diffuse( 0.9f,
+                       0.9f,
+                       0.9f,
+                       0.9f );
+
+    QVector4D specular( 0.0f,
+                        0.0f,
+                        0.0f,
+                        1.0f );
+
+    QVector4D position((bb.xmax()-bb.xmin())/2, (bb.ymax()-bb.ymin())/2,bb.zmax(), 0.0 );
+    GLfloat shininess =  1.0f;
+
+    rendering_program.bind();
+    mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix");
+    mvLocation = rendering_program.uniformLocation("mv_matrix");
+    lightLocation[0] = rendering_program.uniformLocation("light_pos");
+    lightLocation[1] = rendering_program.uniformLocation("light_diff");
+    lightLocation[2] = rendering_program.uniformLocation("light_spec");
+    lightLocation[3] = rendering_program.uniformLocation("light_amb");
+    lightLocation[4] = rendering_program.uniformLocation("spec_power");
+
+    rendering_program.setUniformValue(lightLocation[0], position);
+    rendering_program.setUniformValue(lightLocation[1], diffuse);
+    rendering_program.setUniformValue(lightLocation[2], specular);
+    rendering_program.setUniformValue(lightLocation[3], ambient);
+    rendering_program.setUniformValue(lightLocation[4], shininess);
+    rendering_program.setUniformValue(mvpLocation[0], mvpMatrix);
+    rendering_program.setUniformValue(mvLocation, mvMatrix);
+
+    colorLocation2 = rendering_program.uniformLocation("color");
+    rendering_program.release();
+
+    rendering_program_p_l.bind();
+    mvpLocation[1] = rendering_program_p_l.uniformLocation("mvp_matrix");
+    colorLocation = rendering_program_p_l.uniformLocation("color");
+    rendering_program.setUniformValue(mvpLocation[1], mvpMatrix);
+    rendering_program_p_l.release();
+  }
+
+  virtual void draw()
+  {
+    glEnable(GL_DEPTH_TEST);
+    if(!are_buffers_initialized)
+      initialize_buffers();
+
+    QColor color;
+    if ( !wireframe )
+    {
+      if(flatShading)
+      {
+        vao[0].bind();
+        attrib_buffers(this);
+        color.setRgbF(0.1f, 0.7f, 0.1f);
+        rendering_program.bind();
+        rendering_program.setUniformValue(colorLocation2,color);
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_facets.size()/3));
+        rendering_program.release();
+        vao[0].release();
+      }
+      else
+      {
+        vao[1].bind();
+        attrib_buffers(this);
+        color.setRgbF(0.1f, 0.7f, 0.1f);
+        rendering_program.bind();
+        rendering_program.setUniformValue(colorLocation2,color);
+        glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(pos_facets.size()/3));
+        rendering_program.release();
+        vao[1].release();
+      }
+    }
+    if(edges)
+    {
+      vao[2].bind();
+      attrib_buffers(this);
+      color.setRgbF(0.2f, 0.2f, 0.7f);
+      rendering_program_p_l.bind();
+      rendering_program_p_l.setAttributeValue(colorLocation,color);
+      glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
+      rendering_program_p_l.release();
+      vao[2].release();
+    }
+    if(vertices)
+    {
+      ::glPointSize(7.f);
+      vao[3].bind();
+      attrib_buffers(this);
+      color.setRgbF(.2f,.2f,.6f);
+      rendering_program_p_l.bind();
+      rendering_program_p_l.setAttributeValue(colorLocation,color);
+      glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
+      rendering_program_p_l.release();
+      vao[3].release();
+    }
+  }
+
+  virtual void init()
+  {
+    // Restore previous viewer state.
+    restoreStateFromFile();
+
+    // Define 'Control+Q' as the new exit shortcut (default was 'Escape')
+    setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q);
+
+    // Add custom key description (see keyPressEvent).
+    setKeyDescription(Qt::Key_W, "Toggles wire frame display");
+    setKeyDescription(Qt::Key_F, "Toggles flat shading display");
+    setKeyDescription(Qt::Key_E, "Toggles edges display");
+    setKeyDescription(Qt::Key_V, "Toggles vertices display");
+
+    // Light default parameters
+    ::glLineWidth(2.4f);
+    ::glPointSize(7.f);
+    ::glEnable(GL_POLYGON_OFFSET_FILL);
+    ::glPolygonOffset(1.f,1.f);
+    ::glClearColor(1.0f,1.0f,1.0f,0.0f);
+    ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+
+    ::glEnable(GL_LIGHTING);
+
+    ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+
+    ::glShadeModel(GL_FLAT);
+    ::glDisable(GL_BLEND);
+    ::glDisable(GL_LINE_SMOOTH);
+    ::glDisable(GL_POLYGON_SMOOTH_HINT);
+    ::glBlendFunc(GL_ONE, GL_ZERO);
+    ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
+
+    initializeOpenGLFunctions();
+    compile_shaders();
+    compute_elements();
+
+    this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(),
+                                                       bb.ymin(),
+                                                       bb.zmin()),
+                                        qglviewer::Vec(bb.xmax(),
+                                                       bb.ymax(),
+                                                       bb.zmax()));
+
+    this->showEntireScene();
+  }
+
+  void keyPressEvent(QKeyEvent *e)
+  {
+    const Qt::KeyboardModifiers modifiers = e->modifiers();
+
+    if ((e->key()==Qt::Key_W) && (modifiers==Qt::NoButton))
+    {
+      wireframe = !wireframe;
+      if (wireframe)
+        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+      else
+        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+      updateGL();
+    }
+    else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton))
+    {
+      flatShading = !flatShading;
+      updateGL();
+    }
+    else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton))
+    {
+      edges = !edges;
+      updateGL();
+    }
+    else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton))
+    {
+      vertices = !vertices;
+      updateGL();
+    }
+    else
+      QGLViewer::keyPressEvent(e);
+  }
+
+
+  virtual QString helpString() const
+  {
+    QString text("<h2>L C C   V i e w e r</h2>");
+    text += "Use the mouse to move the camera around the object. ";
+    text += "You can respectively revolve around, zoom and translate with "
+      "the three mouse buttons. ";
+    text += "Left and middle buttons pressed together rotate around the "
+      "camera view direction axis<br><br>";
+    text += "Pressing <b>Alt</b> and one of the function keys "
+      "(<b>F1</b>..<b>F12</b>) defines a camera keyFrame. ";
+    text += "Simply press the function key again to restore it. "
+      "Several keyFrames define a ";
+    text += "camera path. Paths are saved when you quit the application "
+      "and restored at next start.<br><br>";
+    text += "Press <b>F</b> to display the frame rate, <b>A</b> for the "
+      "world axis, ";
+    text += "<b>Alt+Return</b> for full screen mode and <b>Control+S</b> "
+      "to save a snapshot. ";
+    text += "See the <b>Keyboard</b> tab in this window for a complete "
+      "shortcut list.<br><br>";
+    text += "Double clicks automates single click actions: A left button "
+      "double click aligns the closer axis with the camera (if close enough). ";
+    text += "A middle button double click fits the zoom of the camera and "
+      "the right button re-centers the scene.<br><br>";
+    text += "A left button double click while holding right button pressed "
+      "defines the camera <i>Revolve Around Point</i>. ";
+    text += "See the <b>Mouse</b> tab and the documentation web pages for "
+      "details.<br><br>";
+    text += "Press <b>Escape</b> to exit the viewer.";
+    return text;
+  }
+
+private:
+  LCC& lcc;
+  bool wireframe;
+  bool flatShading;
+  bool edges;
+  bool vertices;
+  Geom_utils<LCC> geomutils;
+
+  CGAL::Bbox_3 bb;
+  bool are_buffers_initialized;
+
+  //Shaders elements
+  int vertexLocation[4];
+  int normalsLocation;
+  int mvpLocation[2];
+  int mvLocation;
+  int colorLocation;
+  int colorLocation2;
+  int lightLocation[5];
+
+  std::vector<float> pos_points;
+  std::vector<float> pos_lines;
+  std::vector<float> pos_facets;
+  std::vector<float> smooth_normals;
+  std::vector<float> flat_normals;
+
+  QGLBuffer buffers[6];
+  QOpenGLVertexArrayObject vao[4];
+
+  QOpenGLShaderProgram rendering_program;
+  QOpenGLShaderProgram rendering_program_p_l;
+};
+
+template<class LCC>
+void display_lcc(LCC& alcc)
+{
+  int argc=1;
+
+  const char* argv[2]={"lccviewer","\0"};
+  QApplication app(argc,const_cast<char**>(argv));
+
+  SimpleLCCViewerQt<LCC> mainwindow(alcc,&app);
+  mainwindow.show();
+
+  app.exec();
+}
+
+#endif // CGAL_LCC_3_VIEWER_QT_H
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_with_mypoint.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_with_mypoint.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_3_with_mypoint.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_3_with_mypoint.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_4.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_4.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/linear_cell_complex_4.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/linear_cell_complex_4.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Linear_cell_complex/plane_graph_to_lcc_2.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/plane_graph_to_lcc_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Linear_cell_complex/plane_graph_to_lcc_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Linear_cell_complex/plane_graph_to_lcc_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_2.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_2.cpp
new file mode 100644
index 0000000..78c6788
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_2.cpp
@@ -0,0 +1,174 @@
+#include <CGAL/Linear_cell_complex.h>
+#include <CGAL/Linear_cell_complex_constructors.h>
+#include <CGAL/Linear_cell_complex_operations.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+#include <iostream>
+#include <fstream>
+
+/* If you want to use a viewer, you can use qglviewer. */
+#ifdef CGAL_LCC_USE_QT
+#include "linear_cell_complex_3_viewer_qt.h"
+#endif
+
+/* // If you want to use exact constructions.
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+typedef CGAL::Linear_cell_complex<2,2,
+  CGAL::Linear_cell_complex_traits<2, CGAL::Exact_predicates_exact_constructions_kernel> > LCC_2;
+*/
+
+typedef CGAL::Linear_cell_complex<2> LCC_2;
+typedef LCC_2::Dart_handle           Dart_handle;
+typedef LCC_2::Point                 Point;
+
+typedef CGAL::Delaunay_triangulation_2<LCC_2::Traits> Triangulation;
+
+// Function used to display the voronoi diagram.
+void display_voronoi(LCC_2& alcc, Dart_handle adart)
+{
+  // We remove the infinite face plus all the faces adjacent to it.
+  // Indeed, we cannot view these faces since they do not have
+  // a "correct geometry". 
+  std::stack<Dart_handle> toremove;
+  LCC_2::size_type mark_toremove=alcc.get_new_mark();
+
+  // adart belongs to the infinite face.
+  toremove.push(adart);
+  CGAL::mark_cell<LCC_2,2>(alcc, adart, mark_toremove);
+
+  // Now we get all the faces adjacent to the infinite face.
+  for (LCC_2::Dart_of_cell_range<2>::iterator
+         it=alcc.darts_of_cell<2>(adart).begin(),
+         itend=alcc.darts_of_cell<2>(adart).end(); it!=itend; ++it)
+  {
+    if ( !alcc.is_marked(alcc.beta(it,2), mark_toremove) )
+    {
+      CGAL::mark_cell<LCC_2,2>(alcc, alcc.beta(it,2), mark_toremove);
+      toremove.push(alcc.beta(it,2));
+    }    
+  }
+  
+  while( !toremove.empty() )
+  {
+    CGAL::remove_cell<LCC_2, 2>(alcc, toremove.top());
+    toremove.pop();
+  }
+
+  CGAL_assertion(alcc.is_without_boundary(1));
+    
+  std::cout<<"Voronoi subdvision, only finite faces:"<<std::endl<<"  ";
+  alcc.display_characteristics(std::cout) << ", valid=" 
+                                          << alcc.is_valid()
+                                          << std::endl;
+  
+#ifdef CGAL_LCC_USE_VIEWER
+  display_lcc(alcc);
+#endif // CGAL_LCC_USE_VIEWER
+}
+
+template<typename LCC, typename TR>
+void transform_dart_to_their_dual(LCC& alcc, LCC& adual,
+                                  std::map<typename TR::Face_handle,
+                                           typename LCC::Dart_handle>& assoc)
+{
+  typename LCC::Dart_range::iterator it1=alcc.darts().begin();
+  typename LCC::Dart_range::iterator it2=adual.darts().begin();
+
+  std::map<typename LCC::Dart_handle, typename LCC::Dart_handle> dual;
+  
+  for ( ; it1!=alcc.darts().end(); ++it1, ++it2 )
+  {
+    dual[it1]=it2;
+  }
+
+  for ( typename std::map<typename TR::Face_handle, typename LCC::Dart_handle>
+          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
+  {
+    assoc[it->first]=dual[it->second];
+  } 
+}
+
+template<typename LCC, typename TR>
+void set_geometry_of_dual(LCC& alcc, TR& tr,
+                          std::map<typename TR::Face_handle,
+                                   typename LCC::Dart_handle>& assoc)
+{
+  for ( typename std::map<typename TR::Face_handle, typename LCC::Dart_handle>
+          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
+  {
+    if ( !tr.is_infinite(it->first) )
+      alcc.set_vertex_attribute
+        (it->second,alcc.create_vertex_attribute(tr.circumcenter(it->first)));
+    else
+      alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());
+  }
+}
+
+int main(int narg, char** argv)
+{
+  if (narg>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"-?")) )
+  {
+    std::cout<<"Usage : voronoi_2 filename"<<std::endl   
+             <<"   filename being a fine containing 2D points used to "
+             <<" compute the Delaunay_triangulation_2."<<std::endl;
+    return EXIT_FAILURE;
+  }
+
+  std::string filename;
+  if ( narg==1 )
+  {
+    filename=std::string("data/points_2");
+    std::cout<<"No filename given: use data/points_2 by default."<<std::endl;
+  }
+  else
+    filename=std::string(argv[1]);
+  
+  // 1) Compute the Delaunay_triangulation_2.
+  Triangulation T;
+
+  std::ifstream iFile(filename.c_str());
+  if (!iFile)
+  {
+    std::cout << "Problem reading file " << filename << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  std::istream_iterator<Point> begin(iFile), end;
+  T.insert(begin, end);
+  CGAL_assertion(T.is_valid(false));
+ 
+  // 2) Convert the triangulation into a 2D lcc.
+  LCC_2 lcc;
+  std::map<Triangulation::Face_handle,
+           LCC_2::Dart_handle > face_to_dart;
+  
+  Dart_handle dh=CGAL::import_from_triangulation_2<LCC_2, Triangulation>
+    (lcc, T, &face_to_dart);
+  CGAL_assertion(lcc.is_without_boundary());
+
+  std::cout<<"Delaunay triangulation :"<<std::endl<<"  ";
+  lcc.display_characteristics(std::cout) << ", valid=" 
+                                         << lcc.is_valid() << std::endl;
+
+  // 3) Compute the dual lcc.
+  LCC_2 dual_lcc;
+  Dart_handle ddh=lcc.dual(dual_lcc, dh);
+  // Here, dual_lcc is the 2D Voronoi diagram.
+  CGAL_assertion(dual_lcc.is_without_boundary());
+
+  // 4) We update the geometry of dual_lcc by using the std::map
+  //    face_to_dart.
+  transform_dart_to_their_dual<LCC_2,Triangulation>
+    (lcc, dual_lcc, face_to_dart);
+  set_geometry_of_dual<LCC_2,Triangulation>(dual_lcc, T, face_to_dart);
+  
+  // 5) Display the dual_lcc characteristics.
+  std::cout<<"Voronoi subdvision :"<<std::endl<<"  ";
+  dual_lcc.display_characteristics(std::cout) << ", valid=" 
+                                              << dual_lcc.is_valid()
+                                              << std::endl;
+
+  display_voronoi(dual_lcc, ddh);
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_3.cpp b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_3.cpp
new file mode 100644
index 0000000..8afe5d4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Linear_cell_complex/voronoi_3.cpp
@@ -0,0 +1,173 @@
+#include <CGAL/Linear_cell_complex.h>
+#include <CGAL/Linear_cell_complex_constructors.h>
+#include <CGAL/Linear_cell_complex_operations.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <iostream>
+#include <fstream>
+
+/* If you want to use a viewer, you can use one qglviewer. */
+#ifdef CGAL_LCC_USE_QT
+#include "linear_cell_complex_3_viewer_qt.h"
+#endif
+
+/* // If you want to use exact constructions.
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+typedef CGAL::Linear_cell_complex<3,3,
+  CGAL::Linear_cell_complex_traits<3, CGAL::Exact_predicates_exact_constructions_kernel> > LCC_3;
+*/
+
+typedef CGAL::Linear_cell_complex<3> LCC_3;
+typedef LCC_3::Dart_handle           Dart_handle;
+typedef LCC_3::Point                 Point;
+
+typedef CGAL::Delaunay_triangulation_3<LCC_3::Traits> Triangulation;
+
+// Function used to display the voronoi diagram.
+void display_voronoi(LCC_3& alcc, Dart_handle adart)
+{
+  // We remove the infinite volume plus all the volumes adjacent to it.
+  // Indeed, we cannot view these volumes since they do not have
+  // a "correct geometry". 
+  std::stack<Dart_handle> toremove;
+  LCC_3::size_type mark_toremove=alcc.get_new_mark();
+
+  // adart belongs to the infinite volume.
+  toremove.push(adart);
+  CGAL::mark_cell<LCC_3,3>(alcc, adart, mark_toremove);
+ 
+  // Now we get all the volumes adjacent to the infinite volume.
+  for (LCC_3::Dart_of_cell_range<3>::iterator
+         it=alcc.darts_of_cell<3>(adart).begin(),
+         itend=alcc.darts_of_cell<3>(adart).end(); it!=itend; ++it)
+  {
+    if ( !alcc.is_marked(alcc.beta(it,3), mark_toremove) )
+    {
+      CGAL::mark_cell<LCC_3,3>(alcc, alcc.beta(it,3), mark_toremove);
+      toremove.push(alcc.beta(it,3));
+    }
+  }
+  
+  while( !toremove.empty() )
+  {
+    CGAL::remove_cell<LCC_3, 3>(alcc, toremove.top());
+    toremove.pop();
+  }
+
+  CGAL_assertion(alcc.is_without_boundary(1) && alcc.is_without_boundary(2));
+  
+  std::cout<<"Voronoi subdvision, only finite volumes:"<<std::endl<<"  ";
+  alcc.display_characteristics(std::cout) << ", valid=" 
+                                          << alcc.is_valid()
+                                          << std::endl;
+
+#ifdef CGAL_LCC_USE_VIEWER
+  display_lcc(alcc);
+#endif // CGAL_LCC_USE_VIEWER
+}
+
+template<typename LCC, typename TR>
+void transform_dart_to_their_dual(LCC& alcc, LCC& adual,
+                                  std::map<typename TR::Cell_handle,
+                                           typename LCC::Dart_handle>& assoc)
+{
+  typename LCC::Dart_range::iterator it1=alcc.darts().begin();
+  typename LCC::Dart_range::iterator it2=adual.darts().begin();
+
+  std::map<typename LCC::Dart_handle, typename LCC::Dart_handle> dual;
+  
+  for ( ; it1!=alcc.darts().end(); ++it1, ++it2 )
+  {
+    dual[it1]=it2;
+  }
+
+  for ( typename std::map<typename TR::Cell_handle, typename LCC::Dart_handle>
+          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
+  {
+    assoc[it->first]=dual[it->second];
+  }
+}
+
+template<typename LCC, typename TR>
+void set_geometry_of_dual(LCC& alcc, TR& tr,
+                          std::map<typename TR::Cell_handle,
+                                   typename LCC::Dart_handle>& assoc)
+{
+  for ( typename std::map<typename TR::Cell_handle, typename LCC::Dart_handle>
+          ::iterator it=assoc.begin(), itend=assoc.end(); it!=itend; ++it)
+  {
+    if ( !tr.is_infinite(it->first) )
+      alcc.set_vertex_attribute
+        (it->second,alcc.create_vertex_attribute(tr.dual(it->first)));
+    else
+      alcc.set_vertex_attribute(it->second,alcc.create_vertex_attribute());
+  }
+}
+
+
+int main(int narg, char** argv)
+{
+  if (narg>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"-?")) )
+  {
+    std::cout<<"Usage : voronoi_3 filename"<<std::endl   
+             <<"   filename being a fine containing 3D points used to "
+             <<" compute the Delaunay_triangulation_3."<<std::endl;
+    return EXIT_FAILURE;
+  }
+
+  std::string filename;
+  if ( narg==1 )
+  {
+    filename=std::string("data/points_3");
+    std::cout<<"No filename given: use data/points_3 by default."<<std::endl;
+  }
+  else
+    filename=std::string(argv[1]);
+  
+  // 1) Compute the Delaunay_triangulation_3.
+  Triangulation T;
+
+  std::ifstream iFile(filename.c_str());
+  if (!iFile)
+  {
+    std::cout << "Problem reading file " << filename << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  std::istream_iterator<Point> begin(iFile), end;
+  T.insert(begin, end);
+  CGAL_assertion(T.is_valid(false));
+ 
+  // 2) Convert the triangulation into a 3D lcc.
+  LCC_3 lcc;
+  std::map<Triangulation::Cell_handle,
+           LCC_3::Dart_handle > vol_to_dart;
+
+  Dart_handle dh=CGAL::import_from_triangulation_3<LCC_3, Triangulation>
+    (lcc, T, &vol_to_dart);
+
+  std::cout<<"Delaunay triangulation :"<<std::endl<<"  ";
+  lcc.display_characteristics(std::cout) << ", valid=" 
+                                         << lcc.is_valid() << std::endl;
+
+  // 3) Compute the dual lcc.
+  LCC_3 dual_lcc;
+  Dart_handle ddh=lcc.dual(dual_lcc, dh);
+  // Here, dual_lcc is the 3D Voronoi diagram.
+  CGAL_assertion(dual_lcc.is_without_boundary());
+
+  // 4) We update the geometry of dual_lcc by using the std::map
+  //    face_to_dart.
+  transform_dart_to_their_dual<LCC_3,Triangulation>
+    (lcc, dual_lcc, vol_to_dart);
+  set_geometry_of_dual<LCC_3,Triangulation>(dual_lcc, T, vol_to_dart);
+  
+  // 5) Display the dual_lcc characteristics.
+  std::cout<<"Voronoi subdvision :"<<std::endl<<"  ";
+  dual_lcc.display_characteristics(std::cout) << ", valid=" 
+                                              << dual_lcc.is_valid()
+                                              << std::endl;
+  display_voronoi(dual_lcc, ddh);
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Matrix_search/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Matrix_search/CMakeLists.txt
new file mode 100644
index 0000000..e2dc164
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Matrix_search/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Matrix_search_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "sorted_matrix_search.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Matrix_search/sorted_matrix_search.cpp b/3rdparty/CGAL-4.8/examples/Matrix_search/sorted_matrix_search.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Matrix_search/sorted_matrix_search.cpp
rename to 3rdparty/CGAL-4.8/examples/Matrix_search/sorted_matrix_search.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Mesh_2/CMakeLists.txt
new file mode 100644
index 0000000..a72d50e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_2/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Mesh_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "conforming.cpp" )
+  create_single_source_cgal_program( "mesh_class.cpp" )
+  create_single_source_cgal_program( "mesh_global.cpp" )
+  create_single_source_cgal_program( "mesh_optimization.cpp" )
+  create_single_source_cgal_program( "mesh_with_seeds.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_2/conforming.cpp b/3rdparty/CGAL-4.8/examples/Mesh_2/conforming.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_2/conforming.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_2/conforming.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_2/mesh_class.cpp b/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_class.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_2/mesh_class.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_2/mesh_class.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_2/mesh_global.cpp b/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_global.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_2/mesh_global.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_2/mesh_global.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_optimization.cpp b/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_optimization.cpp
new file mode 100644
index 0000000..486b725
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_optimization.cpp
@@ -0,0 +1,59 @@
+#define CGAL_MESH_2_OPTIMIZER_VERBOSE
+//#define CGAL_MESH_2_OPTIMIZERS_DEBUG
+//#define CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Delaunay_mesher_2.h>
+#include <CGAL/Delaunay_mesh_face_base_2.h>
+#include <CGAL/Delaunay_mesh_vertex_base_2.h>
+#include <CGAL/Delaunay_mesh_size_criteria_2.h>
+
+#include <CGAL/lloyd_optimize_mesh_2.h>
+
+#include <iostream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Delaunay_mesh_vertex_base_2<K>                Vb;
+typedef CGAL::Delaunay_mesh_face_base_2<K>                  Fb;
+typedef CGAL::Triangulation_data_structure_2<Vb, Fb>        Tds;
+typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds>  CDT;
+typedef CGAL::Delaunay_mesh_size_criteria_2<CDT>            Criteria;
+typedef CGAL::Delaunay_mesher_2<CDT, Criteria>              Mesher;
+
+typedef CDT::Vertex_handle Vertex_handle;
+typedef CDT::Point Point;
+
+
+int main()
+{
+  CDT cdt;
+
+  Vertex_handle va = cdt.insert(Point(-2,0));
+  Vertex_handle vb = cdt.insert(Point(0,-2));
+  Vertex_handle vc = cdt.insert(Point(2,0));
+  Vertex_handle vd = cdt.insert(Point(0,1));
+  cdt.insert(Point(2, 0.6));
+
+  cdt.insert_constraint(va, vb);
+  cdt.insert_constraint(vb, vc);
+  cdt.insert_constraint(vc, vd);
+  cdt.insert_constraint(vd, va);
+
+  std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
+
+  std::cout << "Meshing..." << std::endl;
+
+  Mesher mesher(cdt);
+  mesher.set_criteria(Criteria(0.125, 0.05));
+  mesher.refine_mesh();
+  
+  std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
+
+  std::cout << "Run Lloyd optimization...";
+  CGAL::lloyd_optimize_mesh_2(cdt,
+    CGAL::parameters::max_iteration_number = 10);
+  std::cout << " done." << std::endl;
+
+  std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_2/mesh_with_seeds.cpp b/3rdparty/CGAL-4.8/examples/Mesh_2/mesh_with_seeds.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_2/mesh_with_seeds.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_2/mesh_with_seeds.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Mesh_3/CMakeLists.txt
new file mode 100644
index 0000000..2f1baa9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/CMakeLists.txt
@@ -0,0 +1,105 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Mesh_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+include_directories(../../include)
+add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+                -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS)
+
+if ( MESH_3_VERBOSE )
+  add_definitions(-DCGAL_MESH_3_VERBOSE)
+endif()
+
+find_package(CGAL COMPONENTS ImageIO)
+
+if ( CGAL_FOUND )
+  include( ${CGAL_USE_FILE} )
+  find_package(Boost)
+
+  # Activate concurrency ? (turned OFF by default)
+  option(ACTIVATE_CONCURRENT_MESH_3
+    "Activate parallelism in Mesh_3"
+    OFF)
+    
+  # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
+  if( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
+    add_definitions( -DCGAL_CONCURRENT_MESH_3 )
+    find_package( TBB REQUIRED )
+  else( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
+    option( LINK_WITH_TBB
+      "Link with TBB anyway so we can use TBB timers for profiling"
+      ON)
+    if( LINK_WITH_TBB )
+      find_package( TBB )
+    endif( LINK_WITH_TBB )
+  endif()
+  
+  if( TBB_FOUND )
+    include(${TBB_USE_FILE})
+    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
+  endif()
+
+
+ set(VTK_LIBS "")
+      find_package(VTK QUIET COMPONENTS vtkImagingGeneral  vtkIOImage NO_MODULE)
+      if(VTK_FOUND)
+          include(${VTK_USE_FILE})
+          if ("${VTK_VERSION_MAJOR}" GREATER "5")
+            message(STATUS "VTK found")
+            set( VTK_LIBS vtkImagingGeneral vtkIOImage )
+          else()
+            message(STATUS "VTK version 6.0 or greater is required")
+          endif()
+      else()
+        message(STATUS "VTK was not found")
+      endif()
+
+
+  if ( Boost_FOUND AND Boost_VERSION GREATER 103400 )
+    include( CGAL_CreateSingleSourceCGALProgram )
+
+    # Compilable examples
+    create_single_source_cgal_program( "mesh_implicit_sphere.cpp" )
+    create_single_source_cgal_program( "mesh_implicit_sphere_variable_size.cpp" )
+    create_single_source_cgal_program( "mesh_two_implicit_spheres_with_balls.cpp" )
+    create_single_source_cgal_program( "mesh_implicit_domains_2.cpp" "implicit_functions.cpp" )
+    create_single_source_cgal_program( "mesh_cubes_intersection.cpp" )
+    create_single_source_cgal_program( "mesh_cubes_intersection_with_features.cpp" )
+    create_single_source_cgal_program( "mesh_implicit_domains.cpp" "implicit_functions.cpp" )
+   create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" )
+    create_single_source_cgal_program( "mesh_polyhedral_domain_with_features.cpp" )
+    if( WITH_CGAL_ImageIO )
+      if( VTK_FOUND AND "${VTK_VERSION_MAJOR}" GREATER "5" )
+        add_executable ( mesh_3D_gray_vtk_image mesh_3D_gray_vtk_image.cpp )
+        target_link_libraries(  mesh_3D_gray_vtk_image ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${VTK_LIBS}) 
+      endif()
+ 
+      if( CGAL_ImageIO_USE_ZLIB )
+        create_single_source_cgal_program( "mesh_optimization_example.cpp" )
+        create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" )
+        create_single_source_cgal_program( "mesh_3D_image.cpp" )
+        create_single_source_cgal_program( "mesh_3D_gray_image.cpp" )
+        create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" )
+      else()
+        message( STATUS "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." )
+      endif()
+    else()
+      message( STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." )
+    endif()
+#    create_single_source_cgal_program( "mesh_polyhedral_implicit_function.cpp" )
+#    create_single_source_cgal_program( "mesh_polyhedral_surface_tolerance_region.cpp" )
+#    create_single_source_cgal_program( "mesh_polyhedral_edge_tolerance_region.cpp" )
+
+  else()
+    message(STATUS "NOTICE: This program requires Boost >= 1.34.1, and will not be compiled.")
+  endif()
+
+else()
+  message(STATUS "This program requires the CGAL library, and will not be compiled.")
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/data/cheese.off b/3rdparty/CGAL-4.8/examples/Mesh_3/data/cheese.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/data/cheese.off
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/data/cheese.off
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/data/elephant.off b/3rdparty/CGAL-4.8/examples/Mesh_3/data/elephant.off
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Mesh_3/data/elephant.off
copy to 3rdparty/CGAL-4.8/examples/Mesh_3/data/elephant.off
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/data/fandisk.off b/3rdparty/CGAL-4.8/examples/Mesh_3/data/fandisk.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/data/fandisk.off
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/data/fandisk.off
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/data/liver.inr.gz b/3rdparty/CGAL-4.8/examples/Mesh_3/data/liver.inr.gz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/data/liver.inr.gz
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/data/liver.inr.gz
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/data/skull_2.9.inr b/3rdparty/CGAL-4.8/examples/Mesh_3/data/skull_2.9.inr
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Surface_mesher/data/skull_2.9.inr
copy to 3rdparty/CGAL-4.8/examples/Mesh_3/data/skull_2.9.inr
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/debug.h b/3rdparty/CGAL-4.8/examples/Mesh_3/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/debug.h
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/debug.h
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/implicit_functions.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/implicit_functions.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/implicit_functions.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/implicit_functions.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/implicit_functions.h b/3rdparty/CGAL-4.8/examples/Mesh_3/implicit_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/implicit_functions.h
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/implicit_functions.h
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_image.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_image.cpp
new file mode 100644
index 0000000..d9cce64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_image.cpp
@@ -0,0 +1,54 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Gray_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+#include <functional>
+
+typedef float Image_word_type;
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Gray_image_mesh_domain_3<CGAL::Image_3, K,
+                                       Image_word_type> Mesh_domain;
+
+// Triangulation
+typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/skull_2.9.inr";
+  // Load image
+  CGAL::Image_3 image;
+  if(!image.read(fname)){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+  // Domain
+  Mesh_domain domain(image, 2.9f, 0.f);
+
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
+                         cell_radius_edge_ratio=3, cell_size=8);
+
+  // Meshing
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
+
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp
new file mode 100644
index 0000000..910547c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp
@@ -0,0 +1,89 @@
+
+#include <vtkImageData.h>
+#include <vtkDICOMImageReader.h>
+#include <vtkImageReader.h>
+#include <vtkImageGaussianSmooth.h>
+#include <vtkDemandDrivenPipeline.h>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Gray_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+#include <CGAL/read_vtk_image_data.h>
+
+#include <boost/lexical_cast.hpp>
+
+typedef short Image_word_type;
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Gray_image_mesh_domain_3<CGAL::Image_3,K, 
+                                       Image_word_type,
+                                       std::binder1st< std::less<Image_word_type> > > Mesh_domain;
+
+// Triangulation
+typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char* argv[])
+{
+  // Loads image
+  if(argc == 1){
+    std::cerr << "Usage:  " << argv[0] << " <directory with dicom data> iso_level=1  facet_size=1  facet_distance=0.1  cell_size=1\n";
+    return 0;
+  }
+
+  Image_word_type iso = (argc>2)? boost::lexical_cast<Image_word_type>(argv[2]): 1;
+  double fs = (argc>3)? boost::lexical_cast<double>(argv[3]): 1;
+  double fd = (argc>4)? boost::lexical_cast<double>(argv[4]): 0.1;
+  double cs = (argc>5)? boost::lexical_cast<double>(argv[5]): 1;
+  
+  vtkDICOMImageReader*dicom_reader = vtkDICOMImageReader::New();
+  dicom_reader->SetDirectoryName(argv[1]);
+  
+  vtkDemandDrivenPipeline*executive =
+    vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive());
+  if (executive)
+    {
+      executive->SetReleaseDataFlag(0, 0); // where 0 is the port index
+    }
+  
+  vtkImageGaussianSmooth* smoother = vtkImageGaussianSmooth::New();
+  smoother->SetStandardDeviations(1., 1., 1.);
+  smoother->SetInputConnection(dicom_reader->GetOutputPort());
+  smoother->Update();
+  vtkImageData* vtk_image = smoother->GetOutput();
+  vtk_image->Print(std::cerr);
+  
+  CGAL::Image_3 image = CGAL::read_vtk_image_data(vtk_image);
+  if(image.image() == 0){
+    std::cerr << "could not create a CGAL::Image_3 from the vtk image\n";
+    return 0;
+  }
+  // Domain
+  Mesh_domain domain(image, std::bind1st(std::less<Image_word_type>(), iso), 0);
+  
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_size=fs, facet_distance=fd,
+                         cell_radius_edge_ratio=3, cell_size=cs);
+  
+  // Meshing
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
+  
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image.cpp
new file mode 100644
index 0000000..b7c10bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image.cpp
@@ -0,0 +1,59 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char* argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz";
+  // Loads image
+  CGAL::Image_3 image;
+  if(!image.read(fname)){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  // Domain
+  Mesh_domain domain(image);
+
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=4,
+                         cell_radius_edge_ratio=3, cell_size=8);
+
+  // Meshing
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
+
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image_variable_size.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image_variable_size.cpp
new file mode 100644
index 0000000..7c01e75
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_3D_image_variable_size.cpp
@@ -0,0 +1,70 @@
+#define CGAL_MESH_3_VERBOSE
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+#include <CGAL/Mesh_constant_domain_field_3.h>
+
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+typedef CGAL::Mesh_constant_domain_field_3<Mesh_domain::R,
+                                           Mesh_domain::Index> Sizing_field;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char* argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz";
+  // Loads image
+  CGAL::Image_3 image;
+  if(!image.read(fname)){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  // Domain
+  Mesh_domain domain(image);
+
+  // Sizing field: set global size to 8 and kidney size (label 127) to 3
+  double kidney_size = 3.;
+  int volume_dimension = 3;
+  Sizing_field size(8);
+  size.set_size(kidney_size, volume_dimension, 
+                domain.index_from_subdomain_index(127));
+  
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
+                         cell_radius_edge_ratio=3, cell_size=size);
+
+  // Meshing
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
+
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_cubes_intersection.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_cubes_intersection.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_cubes_intersection.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_cubes_intersection.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_domains.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_domains.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_domains.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_domains.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_domains_2.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_domains_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_domains_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_domains_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_ellipsoid.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_sphere.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_sphere.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_sphere.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_sphere.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_example.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_example.cpp
new file mode 100644
index 0000000..5737faa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_example.cpp
@@ -0,0 +1,69 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Mesh Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char* argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz";
+  // Domain
+  CGAL::Image_3 image;
+  if(!image.read(fname)){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  Mesh_domain domain(image);
+
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_size=5, facet_distance=1.5,
+                         cell_radius_edge_ratio=2, cell_size=7);
+
+  // Mesh generation and optimization in one call (sliver_bound is the
+  // targeted dihedral angle in degree)
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
+                                      no_exude(),
+                                      perturb(sliver_bound=10, time_limit=15));
+  
+  // Mesh generation and optimization in several call
+  C3t3 c3t3_bis = CGAL::make_mesh_3<C3t3>(domain, criteria,
+                                          no_perturb(), no_exude());
+  
+  CGAL::perturb_mesh_3(c3t3_bis, domain, time_limit=15);
+
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+  
+  std::ofstream medit_file_bis("out_bis.mesh");
+  c3t3_bis.output_to_medit(medit_file_bis);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_lloyd_example.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
new file mode 100644
index 0000000..c283261
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
@@ -0,0 +1,69 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Labeled_image_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/Image_3.h>
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Mesh Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz";
+  // Domain
+  CGAL::Image_3 image;
+  if(!image.read(fname)){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+  Mesh_domain domain(image);
+
+  // Mesh criteria
+  Mesh_criteria criteria(facet_angle=30, facet_distance=1.2,
+                         cell_radius_edge_ratio=2);
+
+  // Mesh generation and optimization in one call
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
+                                      lloyd(time_limit=30),
+                                      no_perturb(),
+                                      exude(time_limit=10, sliver_bound=10));
+  
+  // Mesh generation and optimization in several call
+  C3t3 c3t3_bis = CGAL::make_mesh_3<C3t3>(domain, criteria,
+                                          no_perturb(), no_exude());
+  
+  CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit=30);
+  CGAL::exude_mesh_3(c3t3_bis, sliver_bound=10, time_limit=10);
+  
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+  
+  std::ofstream medit_file_bis("out_bis.mesh");
+  c3t3_bis.output_to_medit(medit_file_bis);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain.cpp
new file mode 100644
index 0000000..a8e1a02
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain.cpp
@@ -0,0 +1,76 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Polyhedral_mesh_domain_3.h>
+#include <CGAL/make_mesh_3.h>
+#include <CGAL/refine_mesh_3.h>
+
+// IO
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+// Domain
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Polyhedron_3<K> Polyhedron;
+typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/elephant.off";
+  // Create input polyhedron
+  Polyhedron polyhedron;
+  std::ifstream input(fname);
+  input >> polyhedron;
+  if(input.bad()){
+    std::cerr << "Error: Cannot read file " <<  fname << std::endl;
+    return EXIT_FAILURE;
+  }
+  input.close();
+   
+  // Create domain
+  Mesh_domain domain(polyhedron);
+  
+  // Mesh criteria (no cell_size set)
+  Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008,
+                         cell_radius_edge_ratio=3);
+  
+  // Mesh generation
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, no_perturb(), no_exude());
+
+  // Output
+  std::ofstream medit_file("out_1.mesh");
+  c3t3.output_to_medit(medit_file);
+  medit_file.close();
+
+  // Set tetrahedron size (keep cell_radius_edge_ratio), ignore facets
+  Mesh_criteria new_criteria(cell_radius_edge_ratio=3, cell_size=0.03);
+
+  // Mesh refinement
+  CGAL::refine_mesh_3(c3t3, domain, new_criteria);
+
+  // Output
+  medit_file.open("out_2.mesh");
+  c3t3.output_to_medit(medit_file);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
new file mode 100644
index 0000000..7e4f4a1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
@@ -0,0 +1,53 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Mesh_triangulation_3.h>
+#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
+#include <CGAL/Mesh_criteria_3.h>
+
+#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
+#include <CGAL/make_mesh_3.h>
+
+// Domain 
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
+
+// Triangulation
+#ifdef CGAL_CONCURRENT_MESH_3
+  typedef CGAL::Mesh_triangulation_3<
+    Mesh_domain,
+    CGAL::Kernel_traits<Mesh_domain>::Kernel, // Same as sequential
+    CGAL::Parallel_tag                        // Tag to activate parallelism
+  >::type Tr;
+#else
+  typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
+#endif
+typedef CGAL::Mesh_complex_3_in_triangulation_3<
+  Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index> C3t3;
+
+// Criteria
+typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
+
+// To avoid verbose function and named parameters call
+using namespace CGAL::parameters;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/fandisk.off";
+  // Create domain
+  Mesh_domain domain(fname);
+  
+  // Get sharp features
+  domain.detect_features();
+
+  // Mesh criteria
+  Mesh_criteria criteria(edge_size = 0.025,
+                         facet_angle = 25, facet_size = 0.05, facet_distance = 0.005,
+                         cell_radius_edge_ratio = 3, cell_size = 0.05);
+  
+  // Mesh generation
+  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
+
+  // Output
+  std::ofstream medit_file("out.mesh");
+  c3t3.output_to_medit(medit_file);
+}
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp b/3rdparty/CGAL-4.8/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp
rename to 3rdparty/CGAL-4.8/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_annulus_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_annulus_d/CMakeLists.txt
new file mode 100644
index 0000000..4089d3b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_annulus_d/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_annulus_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "min_annulus_d.cpp" )
+  create_single_source_cgal_program( "min_annulus_d_fast_exact.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_annulus_d/min_annulus_d.cpp b/3rdparty/CGAL-4.8/examples/Min_annulus_d/min_annulus_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_annulus_d/min_annulus_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_annulus_d/min_annulus_d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp b/3rdparty/CGAL-4.8/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_circle_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_circle_2/CMakeLists.txt
new file mode 100644
index 0000000..672ce11
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_circle_2/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_circle_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "min_circle_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_circle_2/min_circle_2.cpp b/3rdparty/CGAL-4.8/examples/Min_circle_2/min_circle_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_circle_2/min_circle_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_circle_2/min_circle_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_ellipse_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_ellipse_2/CMakeLists.txt
new file mode 100644
index 0000000..37ce977
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_ellipse_2/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_ellipse_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "min_ellipse_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_ellipse_2/min_ellipse_2.cpp b/3rdparty/CGAL-4.8/examples/Min_ellipse_2/min_ellipse_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_ellipse_2/min_ellipse_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_ellipse_2/min_ellipse_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/CMakeLists.txt
new file mode 100644
index 0000000..202c8f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_quadrilateral_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "minimum_enclosing_parallelogram_2.cpp" )
+  create_single_source_cgal_program( "minimum_enclosing_rectangle_2.cpp" )
+  create_single_source_cgal_program( "minimum_enclosing_strip_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_parallelogram_2.cpp b/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_parallelogram_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_parallelogram_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_parallelogram_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_rectangle_2.cpp b/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_rectangle_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_rectangle_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_rectangle_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_strip_2.cpp b/3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_strip_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_quadrilateral_2/minimum_enclosing_strip_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_quadrilateral_2/minimum_enclosing_strip_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_sphere_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_sphere_d/CMakeLists.txt
new file mode 100644
index 0000000..9e044b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_sphere_d/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_sphere_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "min_sphere_d.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_d/min_sphere_d.cpp b/3rdparty/CGAL-4.8/examples/Min_sphere_d/min_sphere_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_sphere_d/min_sphere_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_sphere_d/min_sphere_d.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/CMakeLists.txt
new file mode 100644
index 0000000..eddb2c0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Min_sphere_of_spheres_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "benchmark.cpp" )
+  create_single_source_cgal_program( "min_sphere_of_spheres_d_2.cpp" )
+  create_single_source_cgal_program( "min_sphere_of_spheres_d_3.cpp" )
+  create_single_source_cgal_program( "min_sphere_of_spheres_d_d.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/benchmark.cpp b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/benchmark.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/benchmark.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/benchmark.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_2.cpp b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_3.cpp b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_d.cpp b/3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Min_sphere_of_spheres_d/min_sphere_of_spheres_d_d.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/CMakeLists.txt
new file mode 100644
index 0000000..544940c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Minkowski_sum_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "approx_inset.cpp" )
+  create_single_source_cgal_program( "approx_offset.cpp" )
+  create_single_source_cgal_program( "exact_inset.cpp" )
+  create_single_source_cgal_program( "exact_offset.cpp" )
+  create_single_source_cgal_program( "sum_by_decomposition.cpp" )
+  create_single_source_cgal_program( "sum_of_holes.cpp" )
+  create_single_source_cgal_program( "sum_triangle_square.cpp" )
+  create_single_source_cgal_program( "sum_with_holes.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_inset.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_inset.cpp
new file mode 100644
index 0000000..b714d35
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_inset.cpp
@@ -0,0 +1,48 @@
+//! \file examples/Minkowski_sum_2/approx_inset.cpp
+// Computing the approximated inset of a polygon.
+
+#include <fstream>
+#include <iostream>
+#include <list>
+#include <boost/timer.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/approximated_offset_2.h>
+
+#include "bops_circular.h"
+
+typedef CGAL::Polygon_2<Kernel>                         Linear_polygon;
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read a polygon.
+  const char* filename = (argc > 1) ? argv[1] : "tight.dat";
+  std::ifstream in_file(filename);
+
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+
+  // Read the input polygon.
+  Linear_polygon P;
+  in_file >> P;
+  in_file.close();
+
+  std::cout << "Read an input polygon with " << P.size() << " vertices."
+            << std::endl;
+
+  // Approximate the offset polygon.
+  std::list<Polygon_2> inset_polygons;
+  boost::timer timer;
+  approximated_inset_2(P, 1, 0.00001, std::back_inserter(inset_polygons));
+  double secs = timer.elapsed();
+
+  std::list<Polygon_2>::iterator it;
+  std::cout << "The inset comprises " << inset_polygons.size()
+            << " polygon(s)." << std::endl;
+  for (it = inset_polygons.begin(); it != inset_polygons.end(); ++it)
+    std::cout << "    Polygon with " << it->size() << " vertices." << std::endl;
+  std::cout << "Inset computation took " << secs << " seconds." << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_offset.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_offset.cpp
new file mode 100644
index 0000000..8694b85
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/approx_offset.cpp
@@ -0,0 +1,39 @@
+//! \file examples/Minkowski_sum_2/approx_offset.cpp
+// Computing the approximated offset of a polygon.
+
+#include <fstream>
+#include <boost/timer.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/approximated_offset_2.h>
+
+#include "bops_circular.h"
+
+typedef CGAL::Polygon_2<Kernel>                         Linear_polygon;
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read a polygon.
+  const char* filename = (argc > 1) ? argv[1] : "spiked.dat";
+  std::ifstream in_file(filename);
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+  Linear_polygon  P;
+  in_file >> P;
+  in_file.close();
+  std::cout << "Read an input polygon with " << P.size() << " vertices."
+            << std::endl;
+
+  // Approximate the offset polygon with radius 5 and error bound 0.00001.
+  boost::timer timer;
+  Polygon_with_holes_2 offset = CGAL::approximated_offset_2(P, 5, 0.00001);
+  double secs = timer.elapsed();
+
+  std::cout << "The offset polygon has " << offset.outer_boundary().size()
+            << " vertices, " << offset.number_of_holes() << " holes."
+            << std::endl;
+  std::cout << "Offset computation took " << secs << " seconds." << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/arr_conics.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/arr_conics.h
new file mode 100644
index 0000000..d0a29ba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/arr_conics.h
@@ -0,0 +1,25 @@
+#ifndef ARR_CONICS_H
+#define ARR_CONICS_H
+
+#include <CGAL/Cartesian.h>
+#include <CGAL/CORE_algebraic_number_traits.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+
+typedef CGAL::CORE_algebraic_number_traits            Nt_traits;
+typedef Nt_traits::Rational                           Rational;
+typedef CGAL::Cartesian<Rational>                     Rat_kernel;
+typedef Rat_kernel::Point_2                           Rat_point;
+typedef Rat_kernel::Segment_2                         Rat_segment;
+typedef Rat_kernel::Circle_2                          Rat_circle;
+typedef Nt_traits::Algebraic                          Algebraic;
+typedef CGAL::Cartesian<Algebraic>                    Alg_kernel;
+
+typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
+                                                      Traits;
+typedef Traits::Point_2                               Point;
+typedef Traits::Curve_2                               Conic_arc;
+typedef Traits::X_monotone_curve_2                    X_monotone_conic_arc;
+typedef CGAL::Arrangement_2<Traits>                   Arrangement;
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_circular.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_circular.h
new file mode 100644
index 0000000..af0a6d6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_circular.h
@@ -0,0 +1,15 @@
+#ifndef BOPS_CIRCULAR_H
+#define BOPS_CIRCULAR_H
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Gps_circle_segment_traits_2.h>
+#include <CGAL/General_polygon_set_2.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+typedef CGAL::Gps_circle_segment_traits_2<Kernel>         Traits;
+
+typedef CGAL::General_polygon_set_2<Traits>               Polygon_set_2;
+typedef Traits::Polygon_2                                 Polygon_2;
+typedef Traits::Polygon_with_holes_2                      Polygon_with_holes_2;
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_linear.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_linear.h
new file mode 100644
index 0000000..6566868
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/bops_linear.h
@@ -0,0 +1,15 @@
+#ifndef BOPS_LINEAR_H
+#define BOPS_LINEAR_H
+
+#include <list>
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Boolean_set_operations_2.h>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+typedef Kernel::Point_2                            Point_2;
+typedef CGAL::Polygon_2<Kernel>                    Polygon_2;
+typedef CGAL::Polygon_with_holes_2<Kernel>         Polygon_with_holes_2;
+typedef std::list<Polygon_with_holes_2>            Pgn_with_holes_2_container;
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_inset.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_inset.cpp
new file mode 100644
index 0000000..938c116
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_inset.cpp
@@ -0,0 +1,60 @@
+//! \file examples/Minkowski_sum_2/exact_inset.cpp
+// Computing the exact inner offset of a polygon.
+
+#include <iostream>
+
+#include <CGAL/basic.h>
+
+#ifndef CGAL_USE_CORE
+int main()
+{
+  std::cout << "Sorry, this example needs CORE ..." << std::endl;
+  return 0;
+}
+#else
+
+#include <fstream>
+#include <boost/timer.hpp>
+
+#include <CGAL/Gps_traits_2.h>
+#include <CGAL/offset_polygon_2.h>
+
+#include "arr_conics.h"
+
+typedef CGAL::Polygon_2<Rat_kernel>             Polygon_2;
+typedef CGAL::Gps_traits_2<Traits>              Gps_traits;
+typedef Gps_traits::Polygon_2                   Offset_polygon;
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read the input polygon.
+  const char* filename = (argc > 1) ? argv[1] : "tight.dat";
+  std::ifstream in_file(filename);
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+  Polygon_2 P;
+  in_file >> P;
+  in_file.close();
+  std::cout << "Read an input polygon with " << P.size() << " vertices."
+            << std::endl;
+
+  // Compute the inner offset of the polygon.
+  Traits traits;
+  std::list<Offset_polygon> inset_polygons;
+  boost::timer timer;
+  inset_polygon_2(P, 1, traits, std::back_inserter(inset_polygons));
+  double secs = timer.elapsed();
+
+  std::list<Offset_polygon>::iterator it;
+  std::cout << "The inset comprises "
+            << inset_polygons.size() << " polygon(s)." << std::endl;
+  for (it = inset_polygons.begin(); it != inset_polygons.end(); ++it)
+      std::cout << "    Polygon with " << it->size() << " vertices."
+                << std::endl;
+  std::cout << "Inset computation took " << secs << " seconds." << std::endl;
+  return 0;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_offset.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_offset.cpp
new file mode 100644
index 0000000..cef25bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/exact_offset.cpp
@@ -0,0 +1,56 @@
+//! \file examples/Minkowski_sum_2/exact_offset.cpp
+// Computing the exact offset of a polygon.
+
+#include <iostream>
+
+#include <CGAL/basic.h>
+
+#ifndef CGAL_USE_CORE
+int main()
+{
+  std::cout << "Sorry, this example needs CORE ..." << std::endl;
+  return 0;
+}
+#else
+
+#include <fstream>
+#include <boost/timer.hpp>
+
+#include <CGAL/Gps_traits_2.h>
+#include <CGAL/offset_polygon_2.h>
+
+#include "arr_conics.h"
+
+typedef CGAL::Polygon_2<Rat_kernel>             Polygon_2;
+typedef CGAL::Gps_traits_2<Traits>              Gps_traits;
+typedef Gps_traits::Polygon_with_holes_2        Offset_polygon_with_holes_2;
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read the input polygon.
+  const char* filename = (argc > 1) ? argv[1] : "spiked.dat";
+  std::ifstream in_file(filename);
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+  Polygon_2  P;
+  in_file >> P;
+  in_file.close();
+  std::cout << "Read an input polygon with " << P.size() << " vertices."
+            << std::endl;
+
+  // Compute the offset polygon.
+  Traits traits;
+  boost::timer timer;
+  Offset_polygon_with_holes_2 offset = CGAL::offset_polygon_2(P, 5, traits);
+  double secs = timer.elapsed();
+
+  std::cout << "The offset polygon has " << offset.outer_boundary().size()
+            << " vertices, " << offset.number_of_holes() << " holes."
+            << std::endl;
+  std::cout << "Offset computation took " << secs << " seconds." << std::endl;
+  return 0;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/holes.dat b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/holes.dat
new file mode 100644
index 0000000..dbc084f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/holes.dat
@@ -0,0 +1,6 @@
+4 0 0 3 0 3 3 0 3
+1
+4 1 1 1 2 2 2 2 1
+4 0 0 3 0 3 3 0 3
+1
+4 1 1 1 2 2 2 2 1
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/ms_rational_nt.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/ms_rational_nt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_2/ms_rational_nt.h
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_2/ms_rational_nt.h
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/pgn_print.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/pgn_print.h
new file mode 100644
index 0000000..3ac462a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/pgn_print.h
@@ -0,0 +1,73 @@
+#ifndef PGN_PRINT_H
+#define PGN_PRINT_H
+
+#include <iostream>
+#include <vector>
+
+#include <CGAL/General_polygon_2.h>
+
+//-----------------------------------------------------------------------------
+// Pretty-print a CGAL polygon.
+//
+template <typename Polygon_2> void print_polygon(const Polygon_2 & pgn)
+{
+  std::cout << "[ " << pgn.size() << " vertices: (";
+  typename Polygon_2::Vertex_const_iterator  vit;
+  for (vit = pgn.vertices_begin(); vit != pgn.vertices_end(); ++vit)
+    std::cout << "(" << *vit << ')';
+  std::cout << ") ]" << std::endl;
+}
+
+template <typename Traits>
+void print_polygon(const CGAL::General_polygon_2<Traits> & pgn)
+{
+  std::cout << "[ " << pgn.size() << " curves:" << std::endl;
+  typename CGAL::General_polygon_2<Traits>::Curve_const_iterator  cit;
+  for (cit = pgn.curves_begin(); cit != pgn.curves_end(); ++cit)
+    std::cout << *cit;
+  std::cout << " ]" << std::endl;
+}
+
+//-----------------------------------------------------------------------------
+// Pretty-print a polygon with holes.
+//
+template <typename Polygon_with_holes>
+void print_polygon_with_holes(const Polygon_with_holes & pwh)
+{
+  if (! pwh.is_unbounded()) {
+    std::cout << "{ Outer boundary = "; 
+    print_polygon (pwh.outer_boundary());
+  }
+  else std::cout << "{ Unbounded polygon." << std::endl;
+
+  unsigned int  k = 1;
+  typename Polygon_with_holes::Hole_const_iterator hit;
+  std::cout << "  " << pwh.number_of_holes() << " holes:" << std::endl;
+  for (hit = pwh.holes_begin(); hit != pwh.holes_end(); ++hit, ++k) {
+    std::cout << "    Hole #" << k << " = ";
+    print_polygon(*hit);
+  }
+  std::cout << " }" << std::endl;
+}
+
+//-----------------------------------------------------------------------------
+// Pretty-print a polygon set.
+//
+template <typename Polygon_set>
+void print_polygon_set(const Polygon_set & pgn_set)
+{
+  typedef typename Polygon_set::Polygon_with_holes_2 Polygon_with_holes;
+  typedef std::vector<Polygon_with_holes>            Pgn_with_holes_container;
+
+  Pgn_with_holes_container res(pgn_set.number_of_polygons_with_holes());
+  pgn_set.polygons_with_holes(res.begin());
+  std::cout << "The result contains " << res.size() << " components:"
+            << std::endl;
+  typename Pgn_with_holes_container::const_iterator  it;
+  for (it = res.begin(); it != res.end(); ++it) {
+    std::cout << "--> ";
+    print_polygon_with_holes(*it);
+  }
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/print_utils.h b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/print_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_2/print_utils.h
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_2/print_utils.h
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/rooms_star.dat b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/rooms_star.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_2/rooms_star.dat
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_2/rooms_star.dat
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/spiked.dat b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/spiked.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_2/spiked.dat
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_2/spiked.dat
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_by_decomposition.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_by_decomposition.cpp
new file mode 100644
index 0000000..6c4fd6a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_by_decomposition.cpp
@@ -0,0 +1,36 @@
+//! \file examples/Minkowski_sum_2/sum_by_decomposition.cpp
+// Computing the Minkowski sum of two non-convex polygons read from a file
+// using the small-side angle-bisector decomposition strategy.
+
+#include <fstream>
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/minkowski_sum_2.h>
+#include <CGAL/Small_side_angle_bisector_decomposition_2.h>
+
+#include "pgn_print.h"
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+typedef Kernel::Point_2                                   Point;
+typedef CGAL::Polygon_2<Kernel>                           Polygon_2;
+typedef CGAL::Polygon_with_holes_2<Kernel>                Polygon_with_holes_2;
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read two polygons from it.
+  const char* filename = (argc > 1) ? argv[1] : "rooms_star.dat";
+  std::ifstream    in_file(filename);
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+  Polygon_2   P, Q;
+  in_file >> P >> Q;
+  in_file.close();
+
+  // Compute the Minkowski sum using the decomposition approach.
+  CGAL::Small_side_angle_bisector_decomposition_2<Kernel>  ssab_decomp;
+  Polygon_with_holes_2  sum = CGAL::minkowski_sum_2(P, Q, ssab_decomp);
+  std::cout << "P (+) Q = "; print_polygon_with_holes(sum);
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_of_holes.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_of_holes.cpp
new file mode 100644
index 0000000..345af75
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_of_holes.cpp
@@ -0,0 +1,43 @@
+//! \file examples/Minkowski_sum_2/sum_by_decomposition.cpp
+// Computing the Minkowski sum of two non-convex polygons read from a file
+// using the small-side angle-bisector decomposition strategy.
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/minkowski_sum_2.h>
+#include <CGAL/Polygon_vertical_decomposition_2.h>
+#include <iostream>
+#include <fstream>
+
+#include "print_utils.h"
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
+
+typedef Kernel::Point_2                                   Point_2;
+typedef CGAL::Polygon_2<Kernel>                           Polygon_2;
+typedef CGAL::Polygon_with_holes_2<Kernel>                Polygon_with_holes_2;
+
+int main()
+{
+  // Open the input file.
+  std::ifstream in_file("holes.dat");
+
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+
+  // Read the two polygons from the file and compute their Minkowski sum.
+  Polygon_with_holes_2 P, Q;
+
+  in_file >> P >> Q;
+  in_file.close();
+
+  // Compute the Minkowski sum using the decomposition approach.
+  CGAL::Polygon_vertical_decomposition_2<Kernel>::Traits_2 traits;
+  CGAL::Polygon_vertical_decomposition_2<Kernel> vertical_decomp(traits);
+  Polygon_with_holes_2 sum = minkowski_sum_2(P, Q, vertical_decomp, traits);
+  std::cout << "P (+) Q = ";
+  print_polygon_with_holes(sum);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_triangle_square.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_triangle_square.cpp
new file mode 100644
index 0000000..ca13785
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_triangle_square.cpp
@@ -0,0 +1,28 @@
+//! \file examples/Minkowski_sum_2/sum_triangle_square.cpp
+// Computing the Minkowski sum of a triangle and a square.
+
+#include <CGAL/basic.h>
+#include <CGAL/minkowski_sum_2.h>
+
+#include "bops_linear.h"
+
+int main()
+{
+  // Construct the triangle.
+  Polygon_2   P;
+  P.push_back(Point_2(-1, -1));  P.push_back(Point_2(1, -1));
+  P.push_back(Point_2(0, 1));
+  std::cout << "P = " << P << std::endl;
+
+  // Construct the square.
+  Polygon_2   Q;
+  Q.push_back(Point_2(3, -1));  Q.push_back(Point_2(5, -1));
+  Q.push_back(Point_2(5, 1));   Q.push_back(Point_2(3,  1));
+  std::cout << "Q = " << Q << std::endl;
+
+  // Compute the Minkowski sum.
+  Polygon_with_holes_2  sum = CGAL::minkowski_sum_2(P, Q);
+  CGAL_assertion(sum.number_of_holes() == 0);
+  std::cout << "P (+) Q = " << sum.outer_boundary() << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_with_holes.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_with_holes.cpp
new file mode 100644
index 0000000..38a4836
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/sum_with_holes.cpp
@@ -0,0 +1,30 @@
+//! \file examples/Minkowski_sum_2/sum_with_holes.cpp
+// Computing the Minkowski sum of two non-convex polygons read from a file.
+
+#include <fstream>
+
+#include <CGAL/basic.h>
+#include <CGAL/minkowski_sum_2.h>
+
+#include "bops_linear.h"
+#include "pgn_print.h"
+
+int main(int argc, char* argv[])
+{
+  // Open the input file and read the two polygons from it.
+  const char* filename = (argc > 1) ? argv[1] : "rooms_star.dat";
+  std::ifstream    in_file(filename);
+  if (! in_file.is_open()) {
+    std::cerr << "Failed to open the input file." << std::endl;
+    return -1;
+  }
+  Polygon_2   P, Q;
+  in_file >> P >> Q;
+  in_file.close();
+
+  // Compute and print the Minkowski sum.
+  Polygon_with_holes_2  sum = CGAL::minkowski_sum_2(P, Q);
+  std::cout << "P (+) Q = ";
+  print_polygon_with_holes(sum);
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_2/tight.dat b/3rdparty/CGAL-4.8/examples/Minkowski_sum_2/tight.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_2/tight.dat
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_2/tight.dat
diff --git a/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/CMakeLists.txt
new file mode 100644
index 0000000..c0b30d0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Minkowski_sum_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "cube_offset.cpp" )
+  create_single_source_cgal_program( "glide.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube.nef3 b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube.nef3
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube.nef3
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube.nef3
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube_offset.cin b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube_offset.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube_offset.cin
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube_offset.cin
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube_offset.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube_offset.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_3/cube_offset.cpp
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_3/cube_offset.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/glide.cin b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/glide.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_3/glide.cin
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_3/glide.cin
diff --git a/3rdparty/CGAL-4.6/examples/Minkowski_sum_3/glide.cpp b/3rdparty/CGAL-4.8/examples/Minkowski_sum_3/glide.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Minkowski_sum_3/glide.cpp
rename to 3rdparty/CGAL-4.8/examples/Minkowski_sum_3/glide.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Modular_arithmetic/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Modular_arithmetic/CMakeLists.txt
new file mode 100644
index 0000000..a5c7523
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Modular_arithmetic/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Modular_arithmetic_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "modular_filter.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Modular_arithmetic/modular_filter.cpp b/3rdparty/CGAL-4.8/examples/Modular_arithmetic/modular_filter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Modular_arithmetic/modular_filter.cpp
rename to 3rdparty/CGAL-4.8/examples/Modular_arithmetic/modular_filter.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Nef_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Nef_2/CMakeLists.txt
new file mode 100644
index 0000000..cbe11d8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Nef_2/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Nef_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "nef_2_construction.cpp" )
+  create_single_source_cgal_program( "nef_2_intersection.cpp" )
+  create_single_source_cgal_program( "nef_2_polylines.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Nef_2/nef_2_construction.cpp b/3rdparty/CGAL-4.8/examples/Nef_2/nef_2_construction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_2/nef_2_construction.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_2/nef_2_construction.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_2/nef_2_intersection.cpp b/3rdparty/CGAL-4.8/examples/Nef_2/nef_2_intersection.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_2/nef_2_intersection.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_2/nef_2_intersection.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_2/nef_2_polylines.cpp b/3rdparty/CGAL-4.8/examples/Nef_2/nef_2_polylines.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_2/nef_2_polylines.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_2/nef_2_polylines.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Nef_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Nef_3/CMakeLists.txt
new file mode 100644
index 0000000..3e8ec17
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Nef_3/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Nef_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "comparison.cpp" )
+  create_single_source_cgal_program( "complex_construction.cpp" )
+  create_single_source_cgal_program( "exploration_SM.cpp" )
+  create_single_source_cgal_program( "extended_kernel.cpp" )
+  create_single_source_cgal_program( "handling_double_coordinates.cpp" )
+  create_single_source_cgal_program( "interface_polyhedron.cpp" )
+  create_single_source_cgal_program( "nefIO.cpp" )
+  create_single_source_cgal_program( "nef_3_construction.cpp" )
+  create_single_source_cgal_program( "nef_3_point_location.cpp" )
+  create_single_source_cgal_program( "nef_3_simple.cpp" )
+  create_single_source_cgal_program( "offIO.cpp" )
+  create_single_source_cgal_program( "point_set_operations.cpp" )
+  create_single_source_cgal_program( "polyline_construction.cpp" )
+  create_single_source_cgal_program( "set_operations.cpp" )
+  create_single_source_cgal_program( "shell_exploration.cpp" )
+  create_single_source_cgal_program( "topological_operations.cpp" )
+  create_single_source_cgal_program( "transformation.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/comparison.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/comparison.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/comparison.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/comparison.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/complex_construction.cin b/3rdparty/CGAL-4.8/examples/Nef_3/complex_construction.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/complex_construction.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/complex_construction.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/complex_construction.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/complex_construction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/complex_construction.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/complex_construction.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/exploration_SM.cin b/3rdparty/CGAL-4.8/examples/Nef_3/exploration_SM.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/exploration_SM.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/exploration_SM.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/exploration_SM.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/exploration_SM.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/exploration_SM.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/exploration_SM.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/extended_kernel.cin b/3rdparty/CGAL-4.8/examples/Nef_3/extended_kernel.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/extended_kernel.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/extended_kernel.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/extended_kernel.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/extended_kernel.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/extended_kernel.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/extended_kernel.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/handling_double_coordinates.cin b/3rdparty/CGAL-4.8/examples/Nef_3/handling_double_coordinates.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/handling_double_coordinates.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/handling_double_coordinates.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/handling_double_coordinates.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/handling_double_coordinates.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/handling_double_coordinates.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/handling_double_coordinates.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/interface_polyhedron.cin b/3rdparty/CGAL-4.8/examples/Nef_3/interface_polyhedron.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/interface_polyhedron.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/interface_polyhedron.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/interface_polyhedron.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/interface_polyhedron.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/interface_polyhedron.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/interface_polyhedron.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nefIO.cin b/3rdparty/CGAL-4.8/examples/Nef_3/nefIO.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nefIO.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nefIO.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nefIO.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/nefIO.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nefIO.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nefIO.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nef_3_construction.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/nef_3_construction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nef_3_construction.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nef_3_construction.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nef_3_point_location.cin b/3rdparty/CGAL-4.8/examples/Nef_3/nef_3_point_location.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nef_3_point_location.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nef_3_point_location.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nef_3_point_location.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/nef_3_point_location.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nef_3_point_location.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nef_3_point_location.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/nef_3_simple.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/nef_3_simple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/nef_3_simple.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/nef_3_simple.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/offIO.cin b/3rdparty/CGAL-4.8/examples/Nef_3/offIO.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/offIO.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/offIO.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/offIO.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/offIO.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/offIO.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/offIO.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/point_set_operations.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/point_set_operations.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/point_set_operations.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/point_set_operations.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/polyline_construction.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/polyline_construction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/polyline_construction.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/polyline_construction.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/set_operations.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/set_operations.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/set_operations.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/set_operations.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/shell_exploration.cin b/3rdparty/CGAL-4.8/examples/Nef_3/shell_exploration.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/shell_exploration.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/shell_exploration.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/shell_exploration.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/shell_exploration.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/shell_exploration.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/shell_exploration.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/topological_operations.cin b/3rdparty/CGAL-4.8/examples/Nef_3/topological_operations.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/topological_operations.cin
rename to 3rdparty/CGAL-4.8/examples/Nef_3/topological_operations.cin
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/topological_operations.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/topological_operations.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/topological_operations.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/topological_operations.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_3/transformation.cpp b/3rdparty/CGAL-4.8/examples/Nef_3/transformation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_3/transformation.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_3/transformation.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Nef_S2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Nef_S2/CMakeLists.txt
new file mode 100644
index 0000000..90eb939
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Nef_S2/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Nef_S2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+    include_directories (BEFORE "include")
+
+  create_single_source_cgal_program( "nef_s2_construction.cpp" )
+  create_single_source_cgal_program( "nef_s2_exploration.cpp" )
+  create_single_source_cgal_program( "nef_s2_point_location.cpp" )
+  create_single_source_cgal_program( "nef_s2_simple.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h b/3rdparty/CGAL-4.8/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h
rename to 3rdparty/CGAL-4.8/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_construction.cpp b/3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_construction.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_construction.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_construction.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_exploration.cpp b/3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_exploration.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_exploration.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_exploration.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_point_location.cpp b/3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_point_location.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_point_location.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_point_location.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_simple.cpp b/3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_simple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Nef_S2/nef_s2_simple.cpp
rename to 3rdparty/CGAL-4.8/examples/Nef_S2/nef_s2_simple.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt
new file mode 100644
index 0000000..060c0de
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt
@@ -0,0 +1,34 @@
+project( Optimal_transportation_reconstruction_2_example )
+
+cmake_minimum_required(VERSION 2.6.2)
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
+  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
+    cmake_policy(VERSION 2.8.4)
+  else()
+    cmake_policy(VERSION 2.6)
+  endif()
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  include_directories (BEFORE "include")
+
+  create_single_source_cgal_program( "otr2_simplest_example.cpp" )
+  create_single_source_cgal_program( "otr2_list_output_example.cpp" )
+  create_single_source_cgal_program( "otr2_indexed_output_example.cpp" )
+  create_single_source_cgal_program( "otr2_mass_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xy b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xy
new file mode 100644
index 0000000..3d6f243
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xy
@@ -0,0 +1,160 @@
+0.00605396 0.00360027
+0.0117095 0.00496933
+0.00292489 -0.0056444
+0.018654 -0.00345866
+0.0208731 -0.00712699
+0.0349622 0.00520127
+0.0226514 0.00273598
+0.0443469 0.00641652
+0.0320264 -0.00785089
+0.0536853 -0.00492172
+0.0477706 0.00445479
+0.0639807 0.00509629
+0.0673864 -0.000544755
+0.068878 0.00636891
+0.0786834 -0.00880306
+0.0838299 0.00977294
+0.087326 -0.0021897
+0.079062 0.000772423
+0.0984893 0.00905454
+0.0994487 -0.00770074
+0.100736 0.00717826
+0.0994229 0.00250389
+0.100252 0.0167278
+0.0960604 0.00802011
+0.103545 0.0289233
+0.108446 0.0183656
+0.106763 0.0262313
+0.106452 0.0420934
+0.0997256 0.0427598
+0.107064 0.0403298
+0.0928101 0.0560955
+0.10136 0.0583232
+0.104819 0.0562105
+0.0902899 0.0706163
+0.10994 0.0770702
+0.0923621 0.0704878
+0.0919434 0.0865538
+0.0963674 0.0842679
+0.103725 0.0803259
+0.102273 0.101166
+0.100319 0.0952791
+0.108403 0.0942299
+0.113529 0.0981625
+0.108027 0.103066
+0.126272 0.0950435
+0.133506 0.0939314
+0.124776 0.107205
+0.131076 0.107853
+0.136759 0.109119
+0.15444 0.102357
+0.143707 0.104111
+0.160272 0.0974776
+0.165379 0.103348
+0.173751 0.0916309
+0.174657 0.0937715
+0.167267 0.0980068
+0.170889 0.0905988
+0.185414 0.102092
+0.189813 0.10002
+0.199397 0.0909473
+0.198222 0.107717
+0.198974 0.099872
+0.201479 0.108827
+0.205074 0.107075
+0.202 0.124977
+0.191185 0.121976
+0.206848 0.134009
+0.196679 0.137767
+0.19255 0.148035
+0.190151 0.143856
+0.195263 0.155428
+0.20595 0.148822
+0.204421 0.152387
+0.191967 0.169495
+0.197981 0.169699
+0.191872 0.176798
+0.207398 0.170317
+0.194859 0.178978
+0.190444 0.183389
+0.196073 0.192833
+0.200019 0.190352
+0.205824 0.198579
+0.217043 0.198723
+0.210708 0.208976
+0.225591 0.209213
+0.224774 0.208331
+0.228376 0.201784
+0.233852 0.192014
+0.230703 0.196273
+0.241172 0.192107
+0.241027 0.203219
+0.257393 0.199803
+0.266244 0.190504
+0.263176 0.1902
+0.279822 0.191442
+0.267419 0.200092
+0.270919 0.209937
+0.294279 0.199399
+0.292596 0.208336
+0.302111 0.206854
+0.297261 0.193606
+0.302447 0.195568
+0.307461 0.217454
+0.302133 0.219113
+0.300152 0.216012
+0.296763 0.223723
+0.302571 0.234727
+0.298522 0.237272
+0.307834 0.234066
+0.296568 0.250613
+0.298385 0.251664
+0.29308 0.261943
+0.295426 0.266549
+0.293096 0.259791
+0.292439 0.271056
+0.291263 0.275271
+0.300944 0.286063
+0.308624 0.284206
+0.306603 0.285177
+0.302574 0.289769
+0.303807 0.303483
+0.308102 0.301263
+0.316854 0.306492
+0.313448 0.299638
+0.325862 0.304911
+0.328301 0.305416
+0.335535 0.300855
+0.327652 0.299601
+0.334895 0.301131
+0.339451 0.303238
+0.356128 0.293215
+0.359167 0.306227
+0.350648 0.309557
+0.359385 0.291005
+0.360515 0.305818
+0.377582 0.301763
+0.373333 0.308693
+0.375172 0.299768
+0.398744 0.298911
+0.390985 0.295462
+0.39465 0.305079
+0.397266 0.302934
+0.391293 0.303944
+0.401355 0.307406
+0.391301 0.312749
+0.401141 0.331346
+0.403843 0.339273
+0.397447 0.32984
+0.401007 0.345187
+0.401435 0.350856
+0.404534 0.358367
+0.40019 0.350997
+0.401021 0.359769
+0.398586 0.362409
+0.403735 0.370503
+0.400571 0.381428
+0.409145 0.374727
+0.402981 0.379619
+0.406312 0.38398
+0.405032 0.387826
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xym b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xym
new file mode 100644
index 0000000..f78a3ac
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xym
@@ -0,0 +1,160 @@
+0.00605396 0.00360027 1.0 
+0.0117095 0.00496933 1.0 
+0.00292489 -0.0056444 1.0 
+0.018654 -0.00345866 1.0 
+0.0208731 -0.00712699 1.0 
+0.0349622 0.00520127 1.0 
+0.0226514 0.00273598 1.0 
+0.0443469 0.00641652 1.0 
+0.0320264 -0.00785089 1.0 
+0.0536853 -0.00492172 1.0 
+0.0477706 0.00445479 1.0 
+0.0639807 0.00509629 1.0 
+0.0673864 -0.000544755 1.0 
+0.068878 0.00636891 1.0 
+0.0786834 -0.00880306 1.0 
+0.0838299 0.00977294 1.0 
+0.087326 -0.0021897 1.0 
+0.079062 0.000772423 1.0 
+0.0984893 0.00905454 1.0 
+0.0994487 -0.00770074 1.0 
+0.100736 0.00717826 1.0 
+0.0994229 0.00250389 1.0 
+0.100252 0.0167278 1.0 
+0.0960604 0.00802011 1.0 
+0.103545 0.0289233 1.0 
+0.108446 0.0183656 1.0 
+0.106763 0.0262313 1.0 
+0.106452 0.0420934 1.0 
+0.0997256 0.0427598 1.0 
+0.107064 0.0403298 1.0 
+0.0928101 0.0560955 1.0 
+0.10136 0.0583232 1.0 
+0.104819 0.0562105 1.0 
+0.0902899 0.0706163 1.0 
+0.10994 0.0770702 1.0 
+0.0923621 0.0704878 1.0 
+0.0919434 0.0865538 1.0 
+0.0963674 0.0842679 1.0 
+0.103725 0.0803259 1.0 
+0.102273 0.101166 1.0 
+0.100319 0.0952791 1.0 
+0.108403 0.0942299 1.0 
+0.113529 0.0981625 1.0 
+0.108027 0.103066 1.0 
+0.126272 0.0950435 1.0 
+0.133506 0.0939314 1.0 
+0.124776 0.107205 1.0 
+0.131076 0.107853 1.0 
+0.136759 0.109119 1.0 
+0.15444 0.102357 1.0 
+0.143707 0.104111 1.0 
+0.160272 0.0974776 1.0 
+0.165379 0.103348 1.0 
+0.173751 0.0916309 1.0 
+0.174657 0.0937715 1.0 
+0.167267 0.0980068 1.0 
+0.170889 0.0905988 1.0 
+0.185414 0.102092 1.0 
+0.189813 0.10002 1.0 
+0.199397 0.0909473 1.0 
+0.198222 0.107717 1.0 
+0.198974 0.099872 1.0 
+0.201479 0.108827 1.0 
+0.205074 0.107075 1.0 
+0.202 0.124977 1.0 
+0.191185 0.121976 1.0 
+0.206848 0.134009 1.0 
+0.196679 0.137767 1.0 
+0.19255 0.148035 1.0 
+0.190151 0.143856 1.0 
+0.195263 0.155428 1.0 
+0.20595 0.148822 1.0 
+0.204421 0.152387 1.0 
+0.191967 0.169495 1.0 
+0.197981 0.169699 1.0 
+0.191872 0.176798 1.0 
+0.207398 0.170317 1.0 
+0.194859 0.178978 1.0 
+0.190444 0.183389 1.0 
+0.196073 0.192833 1.0 
+0.200019 0.190352 1.0 
+0.205824 0.198579 1.0 
+0.217043 0.198723 1.0 
+0.210708 0.208976 1.0 
+0.225591 0.209213 1.0 
+0.224774 0.208331 1.0 
+0.228376 0.201784 1.0 
+0.233852 0.192014 1.0 
+0.230703 0.196273 1.0 
+0.241172 0.192107 1.0 
+0.241027 0.203219 1.0 
+0.257393 0.199803 1.0 
+0.266244 0.190504 1.0 
+0.263176 0.1902 1.0 
+0.279822 0.191442 1.0 
+0.267419 0.200092 1.0 
+0.270919 0.209937 1.0 
+0.294279 0.199399 1.0 
+0.292596 0.208336 1.0 
+0.302111 0.206854 1.0 
+0.297261 0.193606 1.0 
+0.302447 0.195568 1.0 
+0.307461 0.217454 1.0 
+0.302133 0.219113 1.0 
+0.300152 0.216012 1.0 
+0.296763 0.223723 1.0 
+0.302571 0.234727 1.0 
+0.298522 0.237272 1.0 
+0.307834 0.234066 1.0 
+0.296568 0.250613 1.0 
+0.298385 0.251664 1.0 
+0.29308 0.261943 1.0 
+0.295426 0.266549 1.0 
+0.293096 0.259791 1.0 
+0.292439 0.271056 1.0 
+0.291263 0.275271 1.0 
+0.300944 0.286063 1.0 
+0.308624 0.284206 1.0 
+0.306603 0.285177 1.0 
+0.302574 0.289769 1.0 
+0.303807 0.303483 1.0 
+0.308102 0.301263 1.0 
+0.316854 0.306492 1.0 
+0.313448 0.299638 1.0 
+0.325862 0.304911 1.0 
+0.328301 0.305416 1.0 
+0.335535 0.300855 1.0 
+0.327652 0.299601 1.0 
+0.334895 0.301131 1.0 
+0.339451 0.303238 1.0 
+0.356128 0.293215 1.0 
+0.359167 0.306227 1.0 
+0.350648 0.309557 1.0 
+0.359385 0.291005 1.0 
+0.360515 0.305818 1.0 
+0.377582 0.301763 1.0 
+0.373333 0.308693 1.0 
+0.375172 0.299768 1.0 
+0.398744 0.298911 1.0 
+0.390985 0.295462 1.0 
+0.39465 0.305079 1.0 
+0.397266 0.302934 1.0 
+0.391293 0.303944 1.0 
+0.401355 0.307406 1.0 
+0.391301 0.312749 1.0 
+0.401141 0.331346 1.0 
+0.403843 0.339273 1.0 
+0.397447 0.32984 1.0 
+0.401007 0.345187 1.0 
+0.401435 0.350856 1.0 
+0.404534 0.358367 1.0 
+0.40019 0.350997 1.0 
+0.401021 0.359769 1.0 
+0.398586 0.362409 1.0 
+0.403735 0.370503 1.0 
+0.400571 0.381428 1.0 
+0.409145 0.374727 1.0 
+0.402981 0.379619 1.0 
+0.406312 0.38398 1.0 
+0.405032 0.387826 1.0 
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp
new file mode 100644
index 0000000..f436192
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp
@@ -0,0 +1,68 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <iterator>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::FT                                               FT;
+typedef K::Point_2                                          Point;
+
+typedef CGAL::Optimal_transportation_reconstruction_2<K>    Otr_2;
+
+void load_xy_file(const std::string& filename, std::vector<Point>& points)
+{
+  std::ifstream ifs(filename.c_str());
+  Point point;
+  while (ifs >> point)
+    points.push_back(point);
+
+  ifs.close();
+}
+
+void indexed_output(Otr_2& otr2)
+{  
+  std::cout << "(-------------Off output---------- )" << std::endl;
+
+  std::vector<Point> points;
+  std::vector<std::size_t> isolated_vertices;
+  std::vector<std::pair<std::size_t,std::size_t> > edges;
+
+  otr2.indexed_output(
+      std::back_inserter(points),
+      std::back_inserter(isolated_vertices),
+      std::back_inserter(edges));
+
+  std::cout << "OFF " << points.size() << " 0 " << edges.size()  << std::endl;
+
+  // points
+  std::vector<Point>::iterator pit;
+  for (pit = points.begin(); pit != points.end(); pit++) 
+    std::cout << *pit << std::endl;
+
+  // isolated vertices
+  std::vector<std::size_t>::iterator vit;
+  for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++)
+    std::cout << "1 "  << *vit << std::endl;
+
+  // edges
+  std::vector<std::pair<std::size_t, std::size_t> >::iterator eit;
+  for (eit = edges.begin(); eit != edges.end(); eit++)
+    std::cout << "2 "  << eit->first << " " << eit->second << std::endl;
+}
+
+int main ()
+{
+  std::vector<Point> points;
+
+  load_xy_file("data/stair-noise00.xy", points);
+
+  Otr_2 otr2(points);
+  otr2.run(100); // 100 steps
+  indexed_output(otr2);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp
new file mode 100644
index 0000000..cd112b8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp
@@ -0,0 +1,57 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <iterator>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::FT                                               FT;
+typedef K::Point_2                                          Point;
+typedef K::Segment_2                                        Segment;
+
+typedef CGAL::Optimal_transportation_reconstruction_2<K>    Otr_2;
+
+void load_xy_file(const std::string& filename, std::vector<Point>& points)
+{
+  std::ifstream ifs(filename.c_str());
+  Point point;
+  while (ifs >> point)
+    points.push_back(point);
+
+  ifs.close();
+}
+
+void list_output(Otr_2& otr2)
+{
+  std::cout << "(-------------List output---------- )" << std::endl;
+
+  std::vector<Point> isolated_points;
+  std::vector<Segment> segments;
+
+  otr2.list_output(
+    std::back_inserter(isolated_points), std::back_inserter(segments));
+
+  std::vector<Point>::iterator pit;
+  for (pit = isolated_points.begin(); pit != isolated_points.end(); pit++) 
+    std::cout  << *pit << std::endl;
+
+  std::vector<Segment>::iterator sit;
+  for (sit = segments.begin(); sit != segments.end(); sit++) 
+    std::cout << *sit << std::endl;
+}
+
+int main ()
+{
+  std::vector<Point> points;
+
+  load_xy_file("data/stair-noise00.xy", points);
+
+  Otr_2 otr2(points);
+  otr2.run(100); // 100 steps
+  list_output(otr2);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp
new file mode 100644
index 0000000..2be1539
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp
@@ -0,0 +1,70 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <iterator>
+#include <utility>      // std::pair
+#include <vector>
+
+#include <CGAL/property_map.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::FT                                               FT;
+typedef K::Point_2                                          Point;
+typedef K::Segment_2                                        Segment;
+
+typedef std::pair<Point, FT>                                PointMassPair;
+typedef std::vector<PointMassPair>                          PointMassList;
+
+typedef CGAL::First_of_pair_property_map <PointMassPair>    Point_property_map;
+typedef CGAL::Second_of_pair_property_map <PointMassPair>   Mass_property_map;
+
+typedef CGAL::Optimal_transportation_reconstruction_2<
+    K, Point_property_map, Mass_property_map>                 Otr_2;
+
+void load_xym_file(const std::string& filename, PointMassList& points)
+{
+  std::ifstream ifs(filename.c_str());
+
+  Point point;
+  FT mass;
+
+  while (ifs >> point && ifs >> mass)
+    points.push_back(std::make_pair(point, mass));
+
+  ifs.close();
+}
+
+int main ()
+{
+  PointMassList points;
+
+  load_xym_file("data/stair.xym", points);
+
+  Point_property_map point_pmap;
+  Mass_property_map  mass_pmap;
+
+  Otr_2 otr2(points, point_pmap, mass_pmap);
+
+  otr2.run(100); // 100 steps
+
+  std::vector<Point> isolated_vertices;
+  std::vector<Segment> edges;
+
+  otr2.list_output(
+    std::back_inserter(isolated_vertices), std::back_inserter(edges));
+
+  std::cout << "Isolated vertices:" << std::endl;
+  std::vector<Point>::iterator vit;
+  for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++) 
+    std::cout << *vit << std::endl;
+
+  std::cerr << "Edges:" << std::endl;
+  std::vector<Segment>::iterator eit;
+  for (eit = edges.begin(); eit != edges.end(); eit++) 
+    std::cout << *eit << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp
new file mode 100644
index 0000000..4def459
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp
@@ -0,0 +1,28 @@
+// Simplest example for Optimal_transportation_reconstruction_2, with no mass
+// attributes for the input points
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/Optimal_transportation_reconstruction_2.h>
+
+#include <fstream>
+#include <iostream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_2                                          Point;
+
+typedef CGAL::Optimal_transportation_reconstruction_2<K>    Otr;
+
+int main ()
+{
+  // Generate a set of random points on the boundary of a square.
+  std::vector<Point> points;
+  CGAL::Random_points_on_square_2<Point> point_generator(1.);
+  CGAL::cpp11::copy_n(point_generator, 100, std::back_inserter(points));
+
+  Otr otr(points);
+  otr.run(100); // 100 steps
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Partition_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Partition_2/CMakeLists.txt
new file mode 100644
index 0000000..82f699e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Partition_2/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Partition_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "approx_convex_partition_2.cpp" )
+  create_single_source_cgal_program( "greene_approx_convex_partition_2.cpp" )
+  create_single_source_cgal_program( "optimal_convex_partition_2.cpp" )
+  create_single_source_cgal_program( "y_monotone_partition_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/README b/3rdparty/CGAL-4.8/examples/Partition_2/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Partition_2/README
rename to 3rdparty/CGAL-4.8/examples/Partition_2/README
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/approx_convex_partition_2.cpp b/3rdparty/CGAL-4.8/examples/Partition_2/approx_convex_partition_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Partition_2/approx_convex_partition_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Partition_2/approx_convex_partition_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/greene_approx_convex_partition_2.cpp b/3rdparty/CGAL-4.8/examples/Partition_2/greene_approx_convex_partition_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Partition_2/greene_approx_convex_partition_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Partition_2/greene_approx_convex_partition_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/optimal_convex_partition_2.cpp b/3rdparty/CGAL-4.8/examples/Partition_2/optimal_convex_partition_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Partition_2/optimal_convex_partition_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Partition_2/optimal_convex_partition_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Partition_2/y_monotone_partition_2.cpp b/3rdparty/CGAL-4.8/examples/Partition_2/y_monotone_partition_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Partition_2/y_monotone_partition_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Partition_2/y_monotone_partition_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/CMakeLists.txt
new file mode 100644
index 0000000..7c6d9c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Periodic_2_triangulation_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "p2t2_adding_handles.cpp" )
+  create_single_source_cgal_program( "p2t2_colored_vertices.cpp" )
+  create_single_source_cgal_program( "p2t2_covering.cpp" )
+  create_single_source_cgal_program( "p2t2_find_conflicts.cpp" )
+  create_single_source_cgal_program( "p2t2_geometric_access.cpp" )
+  create_single_source_cgal_program( "p2t2_hierarchy.cpp" )
+  create_single_source_cgal_program( "p2t2_info_insert_with_pair_iterator_2.cpp" )
+  create_single_source_cgal_program( "p2t2_info_insert_with_transform_iterator_2.cpp" )
+  create_single_source_cgal_program( "p2t2_info_insert_with_zip_iterator_2.cpp" )
+  create_single_source_cgal_program( "p2t2_large_point_set.cpp" )
+  create_single_source_cgal_program( "p2t2_simple_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/data/triangulation_prog1.cin b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/data/triangulation_prog1.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/data/triangulation_prog1.cin
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/data/triangulation_prog1.cin
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_adding_handles.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_adding_handles.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_adding_handles.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_adding_handles.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_covering.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_covering.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_covering.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_covering.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_find_conflicts.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_geometric_access.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_geometric_access.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_geometric_access.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_geometric_access.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_hierarchy.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_hierarchy.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_hierarchy.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_hierarchy.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_pair_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_pair_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_pair_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_pair_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_transform_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_transform_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_transform_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_transform_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_zip_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_zip_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_zip_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_info_insert_with_zip_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_large_point_set.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_large_point_set.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_large_point_set.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_large_point_set.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_simple_example.cpp b/3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_simple_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_2_triangulation_2/p2t2_simple_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Periodic_2_triangulation_2/p2t2_simple_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/CMakeLists.txt
new file mode 100644
index 0000000..fa8c24b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Periodic_3_triangulation_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "colored_vertices.cpp" )
+  create_single_source_cgal_program( "covering.cpp" )
+  create_single_source_cgal_program( "find_conflicts.cpp" )
+  create_single_source_cgal_program( "geometric_access.cpp" )
+  create_single_source_cgal_program( "large_point_set.cpp" )
+  create_single_source_cgal_program( "periodic_adding_handles.cpp" )
+  create_single_source_cgal_program( "simple_example.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/README b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Periodic_3_triangulation_3/README
rename to 3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/README
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/colored_vertices.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/colored_vertices.cpp
new file mode 100644
index 0000000..6d27f5a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/colored_vertices.cpp
@@ -0,0 +1,40 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_3.h>
+#include <CGAL/IO/Color.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_filtered_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> VbDS;
+typedef CGAL::Triangulation_vertex_base_3<GT,VbDS> Vb;
+
+typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> CbDS;
+typedef CGAL::Triangulation_cell_base_3<GT,CbDS> Cb;
+
+typedef CGAL::Triangulation_vertex_base_with_info_3<CGAL::Color, GT, Vb> VbInfo;
+typedef CGAL::Triangulation_data_structure_3<VbInfo, Cb>    TDS;
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT, TDS>  PDT;
+
+typedef PDT::Point   Point;
+
+int main()
+{
+  PDT T;
+
+  T.insert(Point(0,0,0));
+  T.insert(Point(.1,0,0));
+  T.insert(Point(0,.1,0));
+  T.insert(Point(0,0,.1));
+  T.insert(Point(.2,.2,.2));
+  T.insert(Point(.9,0,.1));
+
+  // Set the color of finite vertices of degree 6 to red.
+  PDT::Vertex_iterator vit;
+  for (vit = T.vertices_begin(); vit != T.vertices_end(); ++vit)
+    if (T.degree(vit) == 6)
+      vit->info() = CGAL::RED;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/covering.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/covering.cpp
new file mode 100644
index 0000000..3430005
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/covering.cpp
@@ -0,0 +1,48 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+
+#include <iostream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
+
+typedef PDT::Point                  Point;
+typedef PDT::Covering_sheets        Covering_sheets;
+
+int main()
+{
+  PDT T;
+
+  // Input point grid (27 points)
+  for (double x=0. ; x < .9 ; x += 0.33) {
+    for (double y=0. ; y < .9 ; y += 0.33) {
+      for (double z=0. ; z < .9 ; z += 0.33) {
+        T.insert(Point(x,y,z));	  
+  } } }
+
+  Covering_sheets cs = T.number_of_sheets();
+  std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
+  if ( T.is_triangulation_in_1_sheet() ) {                                      // = true
+    bool is_extensible = T.is_extensible_triangulation_in_1_sheet_h1()
+      || T.is_extensible_triangulation_in_1_sheet_h2();                         // = false
+    T.convert_to_1_sheeted_covering();
+    cs = T.number_of_sheets();
+    std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
+    if ( is_extensible )                                                        // = false
+      std::cout<<"It is safe to change the triangulation here."<<std::endl;
+    else
+      std::cout<<"It is NOT safe to change the triangulation here!"<<std::endl;
+
+    T.convert_to_27_sheeted_covering();
+    cs = T.number_of_sheets();
+    std::cout<<"Current covering: "<<cs[0]<<' '<<cs[1]<<' '<<cs[2]<<std::endl;
+  }
+
+  std::cout<<"It is (again) safe to modify the triangulation."<<std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/find_conflicts.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/find_conflicts.cpp
new file mode 100644
index 0000000..87c810f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/find_conflicts.cpp
@@ -0,0 +1,55 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+#include <CGAL/point_generators_3.h>
+
+#include <vector>
+#include <cassert>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_filtered_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> Delaunay;
+typedef Delaunay::Point                               Point;
+typedef Delaunay::Cell_handle                         Cell_handle;
+typedef Delaunay::Facet                               Facet;
+
+int main()
+{
+  Delaunay T;
+  CGAL::Random_points_in_cube_3<Point> rnd(0.5);
+  GT::Vector_3 v(0.5,0.5,0.5);
+
+  // First, make sure the triangulation is 3D.
+  T.insert(Point(0,0,0));
+  T.insert(Point(.1,0,0));
+  T.insert(Point(0,.1,0));
+  T.insert(Point(0,0,.1));
+
+  // Gets the conflict region of 100 random points
+  // in the Delaunay tetrahedralization
+  for (int i = 0; i != 100; ++i) {
+    Point p = (*rnd++)+v;
+
+    // Locate the point
+    Delaunay::Locate_type lt;
+    int li, lj;
+    Cell_handle c = T.locate(p, lt, li, lj);
+    if (lt == Delaunay::VERTEX)
+      continue; // Point already exists
+
+    // Get the cells that conflict with p in a vector V,
+    // and a facet on the boundary of this hole in f.
+    std::vector<Cell_handle> V;
+    Facet f;
+
+    T.find_conflicts(p, c,
+		     CGAL::Oneset_iterator<Facet>(f), // Get one boundary facet
+		     std::back_inserter(V));          // Conflict cells in V
+    }
+
+  std::cout << "Final triangulation has " << T.number_of_vertices()
+            << " vertices." << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/geometric_access.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/geometric_access.cpp
new file mode 100644
index 0000000..6c100c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/geometric_access.cpp
@@ -0,0 +1,39 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<K>          PK;
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<PK>       P3DT3;
+
+typedef PK::Point_3        Point;
+typedef PK::Triangle_3     Triangle;
+
+typedef P3DT3::Periodic_triangle           Periodic_triangle;
+typedef P3DT3::Periodic_triangle_iterator  Periodic_triangle_iterator;
+typedef P3DT3::Iterator_type               Iterator_type;
+
+int main() {
+  P3DT3 T;
+
+  T.insert(Point(0,0,0));
+  T.insert(Point(0,0,0.5));
+  T.insert(Point(0,0.5,0.5));
+  T.insert(Point(0.5,0,0.5));
+
+  Periodic_triangle pt;
+  Triangle t_bd;
+
+  // Extracting the triangles that have a non-empty intersection with
+  // the original domain of the 1-sheeted covering space
+  for (Periodic_triangle_iterator ptit = T.periodic_triangles_begin(P3DT3::UNIQUE_COVER_DOMAIN);
+       ptit != T.periodic_triangles_end(P3DT3::UNIQUE_COVER_DOMAIN); ++ptit) {
+    pt = *ptit;
+    if (! (pt[0].second.is_null() && pt[1].second.is_null() && pt[2].second.is_null()) ) {
+      // Convert the current Periodic_triangle to a Triangle if it is
+      // not strictly contained inside the original domain.
+      // Note that this requires EXACT constructions to be exact!
+      t_bd = T.construct_triangle(pt);
+    }
+  }
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/large_point_set.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/large_point_set.cpp
new file mode 100644
index 0000000..42caf78
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/large_point_set.cpp
@@ -0,0 +1,61 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+
+#include <CGAL/Random.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Timer.h>
+
+#include <iostream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
+
+typedef PDT::Point          Point;
+
+int main()
+{
+  CGAL::Timer t;
+  typedef CGAL::Creator_uniform_3<double, Point> Creator;
+  CGAL::Random random(7);
+  CGAL::Random_points_in_cube_3<Point, Creator> in_cube(.5, random);
+
+  int n = 10000;
+  std::vector<Point> pts;
+
+  PDT PT1, PT2, PT3;
+
+  // Generating n random points
+  for (int i=0 ; i < n ; i++) {
+    Point p = *in_cube;
+    in_cube++;
+    pts.push_back(Point(p.x()+.5,p.y()+.5,p.z()+.5));
+  }
+
+  // Standard insertion
+  t.start();
+  for (int i=0 ; i < n ; i++) {
+    PT1.insert(pts[i]);
+  }
+  t.stop();
+  std::cout<<"  Time: "<<t.time()<<" sec. (Standard insertion)"<<std::endl;
+  t.reset();
+
+  // Iterator range insertion using spatial sorting but no dummy points
+  t.start();
+  PT2.insert(pts.begin(), pts.end()); // third parameter defaults to false
+  t.stop();
+  std::cout<<"  Time: "<<t.time()<<" sec. (with spatial sorting)"<<std::endl;
+  t.reset();
+
+  // Iterator range insertion using spatial sorting and dummy point heuristic
+  t.start();
+  PT3.insert(pts.begin(), pts.end(), true);
+  t.stop();
+  std::cout<<"  Time: "<<t.time()<<" sec. (Dummy point heuristic)"<<std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp
new file mode 100644
index 0000000..d0de0f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/periodic_adding_handles.cpp
@@ -0,0 +1,69 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+#include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h>
+#include <CGAL/Triangulation_vertex_base_3.h>
+
+template < class GT, class VbDS,
+	   class Vb = CGAL::Triangulation_vertex_base_3<GT,VbDS> >
+class My_vertex_base
+  : public Vb
+{
+public:
+  typedef typename Vb::Vertex_handle  Vertex_handle;
+  typedef typename Vb::Cell_handle    Cell_handle;
+  typedef typename Vb::Point          Point;
+
+  template < class TDS2 >
+  struct Rebind_TDS {
+    typedef typename Vb::template Rebind_TDS<TDS2>::Other  Vb2;
+    typedef My_vertex_base<GT, Vb2>                        Other;
+  };
+
+  My_vertex_base() {}
+
+  My_vertex_base(const Point& p)
+    : Vb(p) {}
+
+  My_vertex_base(const Point& p, Cell_handle c)
+    : Vb(p, c) {}
+
+  Vertex_handle   vh;
+  Cell_handle     ch;
+};
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_filtered_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> VbDS;
+typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> CbDS;
+typedef CGAL::Triangulation_cell_base_3<GT,CbDS> Cb;
+
+typedef CGAL::Triangulation_data_structure_3<My_vertex_base<GT,VbDS>, Cb> TDS;
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT,TDS> PDT;
+
+typedef PDT::Vertex_handle    Vertex_handle;
+typedef PDT::Point            Point;
+
+int main()
+{
+  PDT T;
+
+  Vertex_handle v0 = T.insert(Point(0,0,0));
+  Vertex_handle v1 = T.insert(Point(.1,0,0));
+  Vertex_handle v2 = T.insert(Point(0,.1,0));
+  Vertex_handle v3 = T.insert(Point(0,0,.1));
+  Vertex_handle v4 = T.insert(Point(.2,.2,.2));
+  Vertex_handle v5 = T.insert(Point(.9,0,.1));
+
+  // Now we can link the vertices as we like.
+  v0->vh = v1;
+  v1->vh = v2;
+  v2->vh = v3;
+  v3->vh = v4;
+  v4->vh = v5;
+  v5->vh = v0;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/simple_example.cpp b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/simple_example.cpp
new file mode 100644
index 0000000..070697f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Periodic_3_triangulation_3/simple_example.cpp
@@ -0,0 +1,77 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
+
+#include <iostream>
+#include <fstream>
+#include <cassert>
+#include <list>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Periodic_3_Delaunay_triangulation_traits_3<K> GT;
+
+typedef CGAL::Periodic_3_Delaunay_triangulation_3<GT> PDT;
+
+typedef PDT::Cell_handle       Cell_handle;
+typedef PDT::Vertex_handle     Vertex_handle;
+typedef PDT::Locate_type       Locate_type;
+typedef PDT::Point             Point;
+typedef PDT::Iso_cuboid        Iso_cuboid;
+
+int main()
+{
+  Iso_cuboid domain(-1,-1,-1,2,2,2);  // The cube for the periodic domain
+
+  // construction from a list of points :
+  std::list<Point> L;
+  L.push_front(Point(0,0,0));
+  L.push_front(Point(1,0,0));
+  L.push_front(Point(0,1,0));
+
+  PDT T(L.begin(), L.end(), domain); // Put the domain with the constructor
+
+  PDT::size_type n = T.number_of_vertices();
+
+  // insertion from a vector :
+  std::vector<Point> V(3);
+  V[0] = Point(0,0,1);
+  V[1] = Point(1,1,1);
+  V[2] = Point(-1,-1,-1);
+
+  n = n + T.insert(V.begin(), V.end());
+
+  assert( n == 6 );       // 6 points have been inserted
+  assert( T.is_valid() ); // checking validity of T
+
+  Locate_type lt;
+  int li, lj;
+  Point p(0,0,0);
+  Cell_handle c = T.locate(p, lt, li, lj);
+  // p is the vertex of c of index li :
+  assert( lt == PDT::VERTEX );
+  assert( c->vertex(li)->point() == p );
+
+  Vertex_handle v = c->vertex( (li+1)&3 );
+  // v is another vertex of c
+  Cell_handle nc = c->neighbor(li);
+  // nc = neighbor of c opposite to the vertex associated with p
+  // nc must have vertex v :
+  int nli;
+  assert( nc->has_vertex( v, nli ) );
+  // nli is the index of v in nc
+
+  std::ofstream oFileT("output.tri",std::ios::out);
+  // writing file output; 
+  oFileT << T; 
+
+  PDT T1;
+  std::ifstream iFileT("output.tri",std::ios::in);
+  // reading file output; 
+  iFileT >> T1; 
+  assert( T1.is_valid() );
+  assert( T1.number_of_vertices() == T.number_of_vertices() );
+  assert( T1.number_of_cells() == T.number_of_cells() );
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Point_set_2/CMakeLists.txt
new file mode 100644
index 0000000..4d40263
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Point_set_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "nearest_neighbor.cpp" )
+  create_single_source_cgal_program( "range_search.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_2/nearest_neighbor.cpp b/3rdparty/CGAL-4.8/examples/Point_set_2/nearest_neighbor.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_2/nearest_neighbor.cpp
rename to 3rdparty/CGAL-4.8/examples/Point_set_2/nearest_neighbor.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_2/range_search.cpp b/3rdparty/CGAL-4.8/examples/Point_set_2/range_search.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_2/range_search.cpp
rename to 3rdparty/CGAL-4.8/examples/Point_set_2/range_search.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/CMakeLists.txt
new file mode 100644
index 0000000..e6a0ef7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/CMakeLists.txt
@@ -0,0 +1,81 @@
+# This is the CMake script for compiling this folder.
+
+project( Point_set_processing_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+# Find CGAL
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  find_package(Boost QUIET)
+
+  # VisualC++ optimization for applications dealing with large data
+  if (MSVC)
+  
+    # Allow Windows 32bit applications to use up to 3GB of RAM
+    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+
+    # Prints new compilation options
+    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
+    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
+    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
+    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
+  endif()
+
+  # Activate concurrency?
+  option(ACTIVATE_CONCURRENT_PSP3
+         "Enable concurrency"
+         OFF)
+     
+  if( ACTIVATE_CONCURRENT_PSP3 OR ENV{ACTIVATE_CONCURRENT_PSP3} )
+    find_package( TBB REQUIRED )
+    if( TBB_FOUND )
+      include(${TBB_USE_FILE})
+      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
+    endif()
+  endif()
+
+  # Executables that do *not* require EIGEN or LAPACK
+  create_single_source_cgal_program( "average_spacing_example.cpp" )
+  create_single_source_cgal_program( "bilateral_smooth_point_set_example.cpp" )
+  create_single_source_cgal_program( "grid_simplification_example.cpp" )
+  create_single_source_cgal_program( "grid_simplify_indices.cpp" )
+  create_single_source_cgal_program( "hierarchy_simplification_example.cpp" )
+  create_single_source_cgal_program( "normals_example.cpp" )
+  create_single_source_cgal_program( "property_map.cpp" )
+  create_single_source_cgal_program( "random_simplification_example.cpp" )
+  create_single_source_cgal_program( "read_write_xyz_point_set_example.cpp" )
+  create_single_source_cgal_program( "remove_outliers_example.cpp" )
+  create_single_source_cgal_program( "wlop_simplify_and_regularize_point_set_example.cpp" )
+  create_single_source_cgal_program( "edge_aware_upsample_point_set_example.cpp" )
+  
+  # Use Eigen or BLAS and LAPACK (optional)
+  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+  if (NOT EIGEN3_FOUND)
+    find_package(LAPACK)
+    if(LAPACK_FOUND)
+      include( ${LAPACK_USE_FILE} )
+    endif(LAPACK_FOUND)
+  else()
+    include( ${EIGEN3_USE_FILE} )
+  endif()
+
+  if(EIGEN3_FOUND OR LAPACK_FOUND)
+    # Executables that require Eigen or BLAS and LAPACK
+    create_single_source_cgal_program( "jet_smoothing_example.cpp" )
+    create_single_source_cgal_program( "normal_estimation.cpp" )
+    create_single_source_cgal_program( "edges_example.cpp" )
+  else(EIGEN3_FOUND OR LAPACK_FOUND)
+
+    message(STATUS "NOTICE: Some of the executables in this directory need either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
+
+  endif(EIGEN3_FOUND OR LAPACK_FOUND)
+else()
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+endif()
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/average_spacing_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/average_spacing_example.cpp
new file mode 100644
index 0000000..120b461
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/average_spacing_example.cpp
@@ -0,0 +1,67 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/IO/read_xyz_points.h>
+
+#include <vector>
+#include <fstream>
+#include <boost/tuple/tuple.hpp>
+
+// Types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+
+// Data type := index, followed by the point, followed by three integers that
+// define the Red Green Blue color of the point.
+typedef boost::tuple<int, Point, int, int, int> IndexedPointWithColorTuple;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+int main(int argc, char*argv[])
+{
+    const char* fname = (argc>1)?argv[1]:"data/sphere_20k.xyz";
+    // Reads a .xyz point set file in points.
+    // As the point is the second element of the tuple (that is with index 1)
+    // we use a property map that accesses the 1st element of the tuple.
+    
+    std::vector<IndexedPointWithColorTuple> points;
+    std::ifstream stream(fname);
+    if (!stream ||
+        !CGAL::read_xyz_points(
+            stream, std::back_inserter(points),
+            CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>()))
+    {
+      std::cerr << "Error: cannot read file " << fname << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Initialize index and RGB color fields in tuple.
+    // As the index and RGB color are respectively the first and third-fifth elements
+    // of the tuple we use a get function from the property map that accesses the 0
+    // and 2-4th elements of the tuple.
+    for(unsigned int i = 0; i < points.size(); i++)
+    {
+      points[i].get<0>() = i;   // set index value of tuple to i
+
+      points[i].get<2>() = 0;   // set RGB color to black
+      points[i].get<3>() = 0;
+      points[i].get<4>() = 0;
+    }
+
+    // Computes average spacing.
+    const unsigned int nb_neighbors = 6; // 1 ring
+    FT average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                            points.begin(), points.end(),
+                            CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>(),
+                            nb_neighbors);
+    std::cout << "Average spacing: " << average_spacing << std::endl;
+
+    return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp
new file mode 100644
index 0000000..c37e22f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp
@@ -0,0 +1,77 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+#include <CGAL/bilateral_smooth_point_set.h>
+#include <CGAL/tags.h>
+
+#include <utility> // defines std::pair
+#include <fstream>
+
+// Types
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+// Point with normal vector stored in a std::pair.
+typedef std::pair<Point, Vector> PointVectorPair;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+int main(int argc, char*argv[])
+{
+  const char* input_filename =  (argc>1)?argv[1]:"data/fin90_with_PCA_normals.xyz";
+  const char* output_filename = (argc>2)?argv[2]:"data/fin90_with_PCA_normals_bilateral_smoothed.xyz";
+
+  // Reads a .xyz point set file in points[] * with normals *.
+  std::vector<PointVectorPair> points;
+  std::ifstream stream(input_filename);
+  if (!stream ||
+      !CGAL::read_xyz_points_and_normals(stream,
+                     std::back_inserter(points),
+                     CGAL::First_of_pair_property_map<PointVectorPair>(),
+                     CGAL::Second_of_pair_property_map<PointVectorPair>()))
+  {
+     std::cerr << "Error: cannot read file " << input_filename << std::endl;
+     return EXIT_FAILURE;
+  }
+
+  // Algorithm parameters
+  int k = 120;                 // size of neighborhood. The bigger the smoother the result will be.
+                               // This value should bigger than 1.
+  double sharpness_angle = 25; // control sharpness of the result.
+                               // The bigger the smoother the result will be
+  int iter_number = 3;         // number of times the projection is applied
+  
+  for (int i = 0; i < iter_number; ++i)
+  {
+    /* double error = */
+    CGAL::bilateral_smooth_point_set <Concurrency_tag>(
+          points.begin(), 
+          points.end(),
+          CGAL::First_of_pair_property_map<PointVectorPair>(),
+          CGAL::Second_of_pair_property_map<PointVectorPair>(),
+          k,
+          sharpness_angle);
+  }
+  
+  //// Save point set.
+  std::ofstream out(output_filename);   
+  if (!out ||
+      !CGAL::write_xyz_points_and_normals(
+      out, points.begin(), points.end(), 
+      CGAL::First_of_pair_property_map<PointVectorPair>(),
+      CGAL::Second_of_pair_property_map<PointVectorPair>()))
+  {
+    return EXIT_FAILURE;
+  }
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/ChineseDragon-10kv.off b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/ChineseDragon-10kv.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/ChineseDragon-10kv.off
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/ChineseDragon-10kv.off
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/before_upsample.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/before_upsample.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/before_upsample.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/before_upsample.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/camel.off b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/camel.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/camel.off
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/camel.off
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/fandisk.off b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/fandisk.off
new file mode 100644
index 0000000..299673e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/fandisk.off
@@ -0,0 +1,47529 @@
+OFF
+15843 31682 0
+
+0.2422991505 15.44224742748 -0.3931136332265
+0.2587103146454 15.44505001811 -0.3381733086201
+0.3023340319987 15.44860419581 -0.3884734353776
+1.803580419363 16.19909976745 -0.4125517024584
+1.787496741365 16.18413060804 -0.3330541078409
+1.832140546917 16.23004094264 -0.3725414707068
+1.766651445374 16.16210382078 -0.3734580636379
+1.3285 13.19914379519 -1.47825281585
+1.3285 13.21139229877 -1.537301788683
+1.3285 13.13528534928 -1.509882434877
+0.9305975194238 14.33981847091 -2.023406711582
+0.9749476506723 14.30924444678 -1.990189460035
+0.9123328070941 14.36144987523 -1.966730120884
+2.577493418021 16.4283190521 -0.7287857331737
+2.526322696114 16.37588881133 -0.7380244987918
+2.516724455671 16.44541166758 -0.7257704458643
+4.401581332417 15.965600797 -3.3934e-14
+4.352885232193 15.90812141709 -3.3934e-14
+4.408739486086 15.91016928714 -3.3934e-14
+7.78e-18 15.2051861285 -1.568774167345
+7.78e-18 15.21886343164 -1.481456227593
+7.78e-18 15.26201633311 -1.534608714287
+4.767549693326 15.90652633256 -0.2100272014787
+4.8279 15.92845817524 -0.1788306228862
+4.817150629193 15.86209063415 -0.2011914710571
+4.775090000533 15.97221931771 -0.2214627170637
+1.505745714626 15.37645197896 -1.400773836472
+1.509280191864 15.36526496136 -1.469357246291
+1.462847919372 15.3692552907 -1.444894033429
+-4.367176094704e-15 14.98387365432 -0.490000891346
+-4.36436e-15 15.02708188259 -0.5658049130255
+-4.440100495176e-15 14.95492133291 -0.5535359973451
+-4.36436e-15 15.06921434622 -0.5059507007184
+3.682977088396 17.13733079223 -0.6037687485082
+3.702524384653 17.20417414155 -0.5919881265227
+3.743650686235 17.15631613152 -0.600423582314
+4.8279 14.82892283471 -0.9121398375174
+4.8279 14.88052414322 -0.8913609441214
+4.8279 14.83739085487 -0.8614158669966
+4.588454083978 16.71657432831 -0.363546669301
+4.638755240152 16.67991835762 -0.3525319323021
+4.563829408233 16.63890020546 -0.3523385414212
+-4.59664560326e-15 15.03063789264 -0.0478751593356
+0.04844131350631 14.99942491936 -3.66380113259e-14
+0.01363867268622 15.0775168271 -1.031544787246e-14
+-4.67051e-15 14.97882443192 -0.02015824904806
+-4.440806717313e-15 15.07942670021 -0.3742068730567
+-4.36436e-15 15.07172860318 -0.286040892298
+-4.36436e-15 15.12366790041 -0.2985834434096
+0.7925658968719 14.71483514394 -2.594621800438
+0.7091983392253 14.74272862152 -2.599538451753
+0.7749200422935 14.78953333901 -2.607799950919
+0.7323653754167 14.66618245811 -2.58603847016
+2.806733737226 13.45937397096 -0.2066291178521
+2.749404121679 13.45020034396 -0.2312035347854
+2.809947957484 13.45836359299 -0.2882712302818
+1.933282077517 13.19451424603 -3.3934e-14
+1.907445660987 13.13527668135 -3.3934e-14
+1.958777620079 13.14108134485 -3.3934e-14
+2.877213604051 14.81209922862 -3.3934e-14
+2.80905443932 14.79263919089 -3.3934e-14
+2.88085498387 14.76094841557 -3.3934e-14
+1.541507551826 14.77543354756 -2.605311376526
+1.607708060774 14.74238457168 -2.599484225972
+1.565425574862 14.71329648553 -2.5943572002
+7.78e-18 15.15988853993 -1.385729485705
+7.78e-18 15.21022415844 -1.422995311007
+7.78e-18 15.15652691896 -1.451061156782
+4.334752444344 15.85829019153 -3.3934e-14
+4.301323277443 15.79515795471 -3.3934e-14
+4.357864214986 15.81056393991 -3.3934e-14
+4.8279 16.76322820595 -0.1735486789309
+4.827899999994 16.83331339749 -0.1240752510598
+4.8279 16.78282341776 -0.1145048779078
+1.786360334013 16.17773176682 -0.5262022361981
+1.808653852345 16.2029183105 -0.4702884746202
+1.835520214983 16.22890040095 -0.5393741828342
+1.044006313906 15.66369271788 -0.08163865705069
+1.048324359021 15.6557994631 -3.252406347421e-15
+1.098225404499 15.68929330147 -0.02245345396278
+0.9976875272801 15.64272591717 -0.0207326666847
+4.8279 14.81972685148 -0.0006939733865494
+4.770353306935 14.87770441326 -1.981320497626e-14
+4.756319255824 14.792299775 -2.464509915662e-14
+2.240169332364 16.54495871152 -0.7082182791938
+2.276509162255 16.50751600065 -0.7148168692813
+2.216630287281 16.48770147272 -0.7183108809756
+4.426167512421 13.60513057369 -0.1449005130108
+4.371811351416 13.60356308562 -0.1403105701089
+4.400297343738 13.60370798453 -0.2039630982274
+3.009391006077 14.12253942899 -2.257284008603
+2.959480933351 14.12550057393 -2.240625276854
+2.970470897191 14.10939591349 -2.332008075486
+3.073522765594 14.13059697854 -2.211809398973
+2.991818959356 14.1347471926 -2.188067543297
+1.871777493245 15.23849731654 -2.454579813525
+1.927685718724 15.24626122627 -2.406070091494
+1.952095530235 15.23739986868 -2.461341445136
+1.771524484707 15.91822131441 0
+1.679357443803 15.91637776521 -1.963877740013e-14
+1.744498970824 15.86960387205 -1.622299035809e-14
+2.373421387179 14.02224088048 -2.472498882984
+2.320887738408 14.0564415084 -2.478523674621
+2.385009196785 14.09889645414 -2.486017572817
+1.212136407312 14.02621061204 -1.887655299102
+1.227651967273 14.00116227488 -1.827707303707
+1.188678256708 14.07688781596 -1.808772739759
+1.178196215349 14.08754153747 -1.861785883578
+1.3285 13.2984581308 -0.5404023311889
+1.3285 13.32564042448 -0.4983841306146
+1.3285 13.385945352 -0.5292586937561
+1.631942603253 12.66747769334 -1.837146136393
+1.587623642598 12.65882428594 -1.895379569888
+1.650989303133 12.6585911939 -1.896945524622
+3.329183242409 17.27712052716 -0.5791175553083
+3.35099360984 17.20327077435 -0.5921446555684
+3.261520885939 17.23337879012 -0.5868301396483
+1.790095617116 14.54427519669 -2.564552802013
+1.82160243762 14.48902421442 -2.554813085277
+1.743460792342 14.48566681594 -2.55421857917
+2.267039493623 15.2039843371 -2.660107178425
+2.20858166379 15.20621731139 -2.647206961839
+2.269646851605 15.2174721929 -2.581994543395
+1.393821194567 15.27217663932 -2.235672312323
+1.467849030617 15.26890828842 -2.257829107941
+1.386625257543 15.26454618961 -2.287460487071
+3.234925837599 15.52276699029 0
+3.207694413756 15.45740876362 0
+3.28558025174 15.48342032682 0
+4.746974793202 15.46679828533 -0.567353727878
+4.784892979857 15.39796593876 -0.5542708024132
+4.708051291154 15.3998106506 -0.5573469403627
+3.994454501705 16.86005066814 -3.3934e-14
+3.938071299718 16.87298280173 -3.3934e-14
+3.918774541955 16.81844895274 -3.3934e-14
+2.260309439328 12.85440143826 -2.266572489309
+2.210029051631 12.84668339355 -2.26520803879
+2.237831541639 12.90779128814 -2.27599295521
+2.172665245244 13.87452433865 -3.36738e-14
+2.231324749327 13.93667347895 -3.36738e-14
+2.173747015788 13.93226078341 -3.36738e-14
+2.27667015972 12.94150515565 -2.281941492684
+2.292724033066 12.89303170182 -2.273394818539
+2.216653936795 12.95980115301 -2.285172515526
+2.656432648833 16.20581345795 0
+2.695657038671 16.15221360992 0
+2.730279294571 16.2088951401 0
+2.821453024607 13.4217853082 -1.053687201464
+2.768318479732 13.4078758818 -1.126253280092
+2.849793273928 13.42251148249 -1.097748676245
+3.009518986972 14.21479722026 -1.734306862958
+3.022243721033 14.19961959443 -1.820494469816
+3.074698308335 14.20679047681 -1.779752189689
+2.570078730499 15.31347257059 -1.932830667204
+2.529826424632 15.30902749706 -1.967390329636
+2.510467959846 15.31789488633 -1.897563475358
+1.83913993032 15.02858320588 -2.649934529678
+1.880891907179 14.98324651681 -2.641945297118
+1.821753307177 14.97173868121 -2.639918706702
+2.007449822318 13.45728868111 -2.372881763517
+1.958040146057 13.4233534468 -2.366901617204
+1.955422684632 13.47926902376 -2.376761595445
+4.074146555516 14.53673710053 -3.3934e-14
+4.022443775705 14.52541553101 -3.3934e-14
+4.066067988788 14.4616849799 -3.3934e-14
+2.174850453994 14.92630141836 -3.3934e-14
+2.086731974064 14.91282450003 -3.3934e-14
+2.13577204649 14.88699591571 -3.3934e-14
+3.224800463585 14.4384464057 -2.18893586865
+3.214335519471 14.43004985209 -2.238894454332
+3.223078462784 14.5075798591 -2.209553330974
+3.211308226763 14.47498389402 -2.264343321214
+3.048978033119 15.05540563572 -1.717877189368
+2.982529778744 15.05076951846 -1.744200743944
+3.003016985134 15.06159446871 -1.682816667402
+1.971719199526 15.282308267 -2.165195980573
+1.932288241115 15.28685380009 -2.13307454145
+1.985211445211 15.2892914558 -2.115685788897
+4.033908966681 13.91764698688 -0.4530692441801
+3.985610233916 13.92752911058 -0.4751237515362
+3.995645584222 13.98035124129 -0.4802168352114
+2.4279 13.33732654643 -0.4170667588226
+2.4279 13.39038225446 -0.3981260099612
+2.4279 13.31404505267 -0.365767322457
+2.703762858578 13.83608288161 -2.401798627872
+2.704945801402 13.85996052569 -2.354076423959
+2.70466069237 13.78672417399 -2.353677605529
+3.367071695886 14.30251383293 -1.236954244571
+3.352921143148 14.2936228359 -1.287465890571
+3.405997676834 14.29296505997 -1.291094010647
+3.334317810536 13.80586100039 -0.899817983335
+3.350402206692 13.75742835162 -0.8756832170579
+3.30459611086 13.76063294897 -0.9226034544471
+0.8173618817536 14.51051689956 -1.154126635226
+0.7949815046004 14.5194208678 -1.203366672833
+0.847517533251 14.48611491268 -1.23075300505
+1.217110438894 15.22356582336 -2.545388902002
+1.163439706611 15.2249650698 -2.537027341572
+1.220853289933 15.23316516279 -2.487755768385
+1.538144284193 14.67018995276 -2.586756557066
+1.514917187455 14.72358380913 -2.596169805673
+4.667482264042 15.46360701597 -0.5715486484649
+3.680048189464 13.56249793911 -0.1490199391738
+3.706892171962 13.56396590626 -0.212635987321
+3.728989071433 13.56630294294 -0.165769237256
+4.09670092704 13.72513965415 -0.3946821434685
+4.080224835243 13.78549929423 -0.4113628753527
+4.140787466344 13.7960432723 -0.3910162095528
+3.676801195941 15.89170175932 -3.110005025237e-14
+3.727026259598 15.87415749919 -2.509041258901e-14
+3.722164577444 15.93931733192 -3.3934e-14
+4.406954949168 16.90943395653 -3.3934e-14
+4.356624814253 16.93255159235 -3.3934e-14
+4.357719860541 16.87090888962 -3.3934e-14
+0.343536562446 14.48174390942 -2.429972620843
+0.287445928461 14.47638686208 -2.465982587395
+0.3508746598646 14.47272699128 -2.480698474593
+7.78e-18 15.03566776956 -1.785487656949
+7.78e-18 14.99749710314 -1.746482758155
+7.78e-18 15.08069673382 -1.754612662978
+1.176841677524 15.61649195061 -3.3934e-14
+1.241784810621 15.68269405265 -2.573695402269e-14
+1.157311141583 15.67830115782 -1.297581494166e-14
+1.240527811092 15.60441319565 -3.3934e-14
+1.606036847761 15.32180247474 -1.865577023576
+1.661395352932 15.31899918537 -1.888280017994
+1.615007826388 15.31484139561 -1.92218992629
+4.61626909493 15.4330295827 -0.5703175857727
+4.609813959391 15.49130043525 -0.5813684952431
+3.531208058261 15.59800396459 0
+3.585328927016 15.57586080955 0
+3.586488278184 15.64162245953 0
+4.118846021121 14.37889963091 -1.032539417181
+4.049359273703 14.37828878261 -1.068282703614
+4.095999593641 14.42013351053 -1.050710090802
+2.4279 13.15942617981 -2.026962862991
+2.4279 13.20472163794 -1.990887521432
+2.4279 13.14255068018 -1.959988973117
+1.260319032054 14.03427860413 -0.5600272156546
+1.253735615786 14.05470889702 -0.5068784791801
+1.235431643327 14.09201737238 -0.5674498526934
+1.229576652445 14.10655198217 -0.5121868126733
+3.834489983809 15.88857902834 -3.145667103078e-14
+3.860629667265 15.94400870887 -3.3934e-14
+3.803154500944 15.94877508935 -3.3934e-14
+1.864737857483 14.31581739565 -2.524269003086
+1.906783573067 14.36916036077 -2.53367327827
+1.938660982384 14.33069032478 -2.526889458297
+1.823913537802 13.4794414411 -3.392790622689e-14
+1.821162761143 13.38934111436 -3.3934e-14
+1.879783732037 13.40321428775 -3.3934e-14
+2.775232427614 15.8868018082 0
+2.800520322915 15.95775999309 0
+2.72654242452 15.94554072164 0
+-1.376330294754e-16 14.76845455655 -0.6594050253751
+-1.400021929338e-15 14.73415111493 -0.7153427621816
+-3.068075252548e-15 14.70259572307 -0.6649228221699
+1.400335355754 15.28323532608 -2.158692328916
+1.469314228958 15.27814936364 -2.194840561677
+1.322628686199 13.71612404872 -1.426205343893
+1.326404424095 13.65248266998 -1.434603801008
+1.324619271168 13.69591669926 -1.367710815191
+1.315448747982 13.76815234713 -1.393411839348
+1.10862109937 15.11566308717 -3.3934e-14
+1.039494796879 15.1164324564 -3.3934e-14
+1.067273620274 15.05312862874 -3.3934e-14
+1.456832380602 12.69849954039 -1.875040575023
+1.469923227969 12.6759888716 -1.965224341658
+1.510653257116 12.66656177348 -1.936038573684
+0.02114522021678 14.49799426975 -2.335516241919
+0.05712380944973 14.51007517174 -2.259365260184
+7.78e-18 14.53896929776 -2.285833277661
+3.89525098098 16.96920419775 -3.3934e-14
+3.84889735657 16.94760186982 -3.3934e-14
+3.89936739258 16.91597481399 -3.3934e-14
+4.037056111356 15.55291634583 -0.6816061638918
+3.969346179861 15.55699467225 -0.658382963356
+4.010217344294 15.56377275202 -0.6202675440416
+3.43412977812 14.58715484998 -3.3934e-14
+3.482387199471 14.65833420579 -3.3934e-14
+3.413606738547 14.65301704583 -3.3934e-14
+4.030262827584 14.61388857976 -3.3934e-14
+1.530518178148 15.73012337431 -3.3934e-14
+1.580042565001 15.75299589217 -3.3934e-14
+1.534333933553 15.79876760784 -3.3934e-14
+2.4279 13.25573138786 -0.4848285843678
+2.4279 13.22611992306 -0.4424320956823
+2.4279 13.19461029687 -0.4958900661826
+0.008145127376032 14.80815904559 -2.611068988132
+1.021251689406e-15 14.80442163258 -2.546968378919
+1.15914659409e-15 14.8482855784 -2.572320995744
+2.210326259696e-15 14.73380723676 -2.57335410944
+2.79965147488 14.99630470382 -2.053009885464
+2.857191374411 14.98798484835 -2.100236858555
+2.811912365753 14.98341266007 -2.126123486511
+0.2189451061722 14.63011445701 -1.267759861614
+0.2831474441482 14.62791774464 -1.292679812275
+0.2476539168796 14.63368535702 -1.226628383974
+2.033092830059 14.33068173935 -3.368202358312e-14
+1.977520214061 14.32590987021 -3.36738e-14
+2.006649958238 14.2682725905 -3.36738e-14
+3.155752965062 15.07960804228 -1.580725685352
+3.158327288534 15.06827948169 -1.645059194533
+3.092838667866 15.07652813886 -1.598220519824
+4.194903874649 16.14511674421 -0.3322498579455
+4.134550339483 16.11415766365 -0.3429844158678
+4.141305805375 16.17454654338 -0.3522156696728
+3.780375376714 14.6548784358 -1.300849918687
+3.780965659681 14.7198537433 -1.311837769389
+3.829351934245 14.7039871962 -1.270006046994
+3.73775944095 14.70799902789 -1.34775500404
+2.417649293924 12.83230434731 -2.078282507268
+2.404902013804 12.78480479674 -2.047498467874
+2.410120793275 12.79029380623 -2.105489734558
+2.417527890422 12.83970230067 -2.028212030459
+4.497567668408 13.66668930795 -1.989481259962e-14
+4.455623579945 13.74326319659 -3.3934e-14
+4.43195676141 13.66730802362 -2.065514463222e-14
+1.856286518143 12.78130999616 -0.6900027331172
+1.830497962835 12.78496091071 -0.6177358060614
+1.765515560011 12.78299960836 -0.6573757697035
+1.789511511784 12.77906800522 -0.7295327021254
+1.01171599474 14.41050802418 -0.304403667544
+1.025186172968 14.39932730262 -0.2477033885905
+0.9770646028137 14.44231082265 -0.2842543683933
+3.123474721707 16.10660851742 -0.7855108512234
+3.079270067626 16.15162392112 -0.777575561065
+3.146076083043 16.17629566065 -0.7732247985889
+3.947246175323 13.68318883355 -0.4494333507866
+3.925070856514 13.63664905737 -0.4517946319497
+3.881253587792 13.67151302441 -0.478825929322
+4.578806020635 14.16603218978 -0.3555227158688
+4.620949408561 14.23432661615 -0.3626007960445
+4.637787065695 14.17049996305 -0.3496501024283
+1.739891436519 15.34726672849 -3.3934e-14
+1.681182484822 15.39317005829 -3.3934e-14
+1.678303700272 15.32092215988 -3.3934e-14
+1.3285 13.40298123582 -1.334947320042
+1.3285 13.38395893382 -1.382054469703
+1.3285 13.34243659969 -1.330174281693
+3.696095558519 16.52359855598 -0.5860150504325
+3.630667899084 16.49795653984 -0.6157285353277
+3.639572630976 16.57320776417 -0.6246247020494
+3.790474522908 17.68841973314 -0.3827552594259
+3.877811226031 17.71456750304 -0.3653864502326
+3.847807091163 17.70441616596 -0.4304702272091
+3.8361946427 17.70326941672 -0.3270413925312
+2.4279 13.06790913823 -1.179887740823
+2.4279 13.05706696676 -1.229853833336
+2.4279 13.11896279965 -1.177115244031
+1.326131245033 13.55798702042 -2.187193995771
+1.321128769154 13.61817489691 -2.233964343762
+1.325444632893 13.55820721026 -2.271868788848
+1.327475930419 13.52245219038 -2.234310949799
+0.01138952896846 14.5968820901 -1.606242021057
+0.02031191134126 14.58869337129 -1.678786168587
+0.07886705208464 14.59339050476 -1.637460714774
+1.3285 13.56945301904 -0.251230138314
+1.3285 13.58844083434 -0.1676828196792
+1.3285 13.62768875341 -0.207124262897
+1.324187052488 15.80217590618 -0.6348089638792
+1.344421582421 15.81308071076 -0.6870623225461
+1.298966353565 15.78447621167 -0.6787370094616
+1.27288292778 15.77148441491 -0.6268464866203
+2.68374806873 13.33460948892 -1.694508603894
+2.73790384129 13.35225201365 -1.621240760113
+2.684481760567 13.34584094528 -1.605596135827
+0.8183722943052 14.70043691443 -3.3934e-14
+0.8754115853316 14.78060981904 -3.3934e-14
+0.8199307452057 14.78312949175 -3.3934e-14
+1.855867638495 15.46870475813 -1.161351066041
+1.840351238013 15.49882192054 -1.113347724169
+1.892595594274 15.49847789264 -1.113850348827
+1.874891177372 15.52922214894 -1.075494279233
+3.303153707903 14.82976103206 -1.998144157117
+3.295413714817 14.75397467011 -2.004402074261
+3.272736318507 14.79628015984 -2.075792077054
+3.325657646314 14.7843993042 -1.93509093457
+1.769148940501 16.14372946962 2.754133660914e-14
+1.744084226847 16.0779512565 1.686778933194e-14
+1.801347509149 16.09374640227 6.656516491895e-15
+3.210489785854 15.12316742255 -1.333924072481
+3.16339834145 15.11354359927 -1.388322030564
+3.159639718262 15.12240812891 -1.338203084904
+3.192567191507 15.08898102189 -1.527522078198
+3.236809345853 15.07938069444 -1.582054525383
+4.697897990145 14.15431241129 -0.3425550781012
+4.694571814544 14.21446554766 -0.3533934882863
+4.442710753557 15.2029849663 -0.8810749227735
+4.450210343725 15.21456322662 -0.8154176265876
+4.492598852202 15.20685357288 -0.8591474649406
+3.57156261439 14.36730790996 -3.383182970411e-14
+3.57652323882 14.31663953049 -3.370853389344e-14
+3.620718193633 14.34230079227 -3.369811606484e-14
+4.029149443623 17.75638372256 -0.1966998576876
+4.033992233991 17.75650279813 -0.2631533504472
+3.968927182643 17.74088149118 -0.248548765297
+3.993447676368 17.74626797317 -0.3150274355251
+2.331081473322 12.78889492717 -1.323764833765
+2.355607617816 12.81312583682 -1.261119928402
+2.299062889631 12.77308092875 -1.269684072046
+2.343096119797 12.80798168354 -1.21166411701
+2.486817985916 13.27223709026 -1.910239978678
+2.485117020683 13.28398436807 -1.824968465121
+2.43870422309 13.27205165738 -1.851109949354
+2.4279 13.22422860935 -1.884055644787
+7.78e-18 14.81125665507 -1.232589316871
+7.78e-18 14.84642518519 -1.268407000178
+7.78e-18 14.76861229433 -1.292963864506
+1.857262890305 14.21104173721 -2.505795856807
+1.833398060386 14.26533923198 -2.515370213316
+1.88365864096 14.25452878772 -2.513462207692
+3.171446859822 14.14901836577 -1.144066520972
+3.18460259039 14.10138973807 -1.118807117579
+3.144075441785 14.10165162588 -1.170817424727
+3.589329874875 14.9425313762 -3.3934e-14
+3.553112172592 15.02459746091 -3.3934e-14
+3.51781137956 14.95089507454 -3.3934e-14
+1.3285 12.88610630865 -2.177278844419
+1.331535226169 12.84184128215 -2.233325358597
+1.338103933375 12.81552687212 -2.191123397642
+1.335963414639 12.83438067086 -2.144684684797
+0.4433137524136 14.63598384049 -1.105074398676
+0.5015842052619 14.63016796076 -1.06621501704
+0.4538516547955 14.63862620196 -1.047415920294
+0.4039966148416 14.64223475644 -1.068662814574
+0.9853613369487 15.4698814279 -1.158061807254
+0.9649358052876 15.49811561171 -1.117266908144
+1.02875017589 15.51277268391 -1.096560354338
+1.039008156442 15.47027623295 -1.158738682063
+3.917166685516 14.77539392291 -1.218988867372
+3.945918062447 14.72466496776 -1.191000499705
+3.892201918964 14.70096485727 -1.222900121875
+3.864355656072 14.75678313842 -1.253095599347
+3.278167320864 13.73633768705 -3.36738e-14
+3.325939344698 13.70985031788 -3.36738e-14
+3.331613628363 13.78930645521 -3.36738e-14
+0.962448325295 14.37279124157 -1.569813642951
+0.9917640356137 14.34115551416 -1.61499186518
+1.007114257485 14.3335638028 -1.556924961092
+1.628694995979 15.16642077951 -3.3934e-14
+1.670458081479 15.20201846475 -3.3934e-14
+1.627727812959 15.25520513924 -3.3934e-14
+2.406399769652 15.24898473923 -2.38925184549
+2.45722595125 15.25932045257 -2.321743782902
+2.454385147915 15.25162049495 -2.372104602618
+2.712525088165 13.44189148157 -0.3509900045961
+2.671394811576 13.43406926463 -0.3975480934236
+2.743974198386 13.44533805023 -0.4050234849228
+4.2607534795 15.61210723152 -0.3458671686411
+4.209232079067 15.60958923211 -0.3603735644075
+4.218381583837 15.61970379652 -0.3029052874817
+4.326289199927 16.98349560806 -0.4494529576498
+4.395419808513 16.93379256806 -0.4276454202509
+4.315442313052 16.92660621577 -0.4415589350991
+4.451174687971 15.38475274735 -0.5854983344829
+4.417416423393 15.42162630419 -0.5981507258906
+4.486760763189 15.43650776595 -0.5885457882858
+2.729213073747 13.44602011904 -0.2907819664678
+2.785455609168 13.45307497384 -0.3515839766529
+3.256979645442 15.83637771566 -0.7452284110632
+3.298128635158 15.81110060069 -0.708330816595
+3.239382410284 15.76143515523 -0.7455527316317
+2.339810608317 16.30671267328 0
+2.276361662257 16.33371131774 0
+2.292135908999 16.27684708019 0
+0.9577745996023 14.4613066034 -0.1182256371
+0.9207433605023 14.48911828508 -0.0387850616152
+0.9020823246969 14.50274656453 -0.105474788957
+0.9744694239168 14.44736263402 -0.05234193841117
+3.446331644979 13.53928156041 -0.2431295366446
+3.448225578981 13.5384674001 -0.2951343535778
+3.494186614412 13.54357832602 -0.2712552311967
+1.933529944975 16.34855091851 -0.1791812605506
+1.897433382185 16.30658523352 -0.1661574258429
+1.926900546384 16.34132282961 -0.1151900536387
+2.840042714748 14.10864368036 -2.336165372999
+2.795041330349 14.11593822789 -2.294744983743
+2.780019562697 14.10647415245 -2.348559313002
+3.242881689035 14.20334402205 -2.072391026376
+3.223549623083 14.21723756758 -2.156128117871
+3.233905414244 14.26577362468 -2.118780115167
+4.294568202447 13.59869547344 -0.2685960045332
+4.351941245882 13.6015267238 -0.2335231202962
+4.311910984865 13.60075758106 -0.1933503481075
+4.298753840354 15.20162025056 -0.8885616797238
+4.258059106584 15.20950831068 -0.8439858122307
+4.314401967089 15.21044190525 -0.8387578087575
+2.4279 13.06143135978 -1.709948088455
+2.4279 12.97772204788 -1.755488657482
+2.4279 13.05534620871 -1.786853896827
+0.6863251554714 14.6158568622 -0.234933319111
+0.7294855802068 14.59868279015 -0.2089721296981
+0.6678671371983 14.62315782029 -0.1811446803633
+3.550630090728 15.52879300198 0
+3.512661276373 15.46775414691 0
+3.56876129963 15.45110897768 0
+2.710124857788 13.27580995063 -2.133869401472
+2.619131804425 13.25971878416 -2.141406649574
+2.662122074924 13.25661000337 -2.202739913182
+1.935459058732 15.31451191 -1.92484623337
+1.906557940995 15.30661616236 -1.986076729012
+1.852379847178 15.31507494459 -1.920629396029
+3.437625253832 14.59822349455 -1.688418973826
+3.4790657115 14.60254311458 -1.625363197098
+3.4563744881 14.55346662949 -1.651074452673
+2.149750833847 14.97754425763 -3.3934e-14
+2.194203382118 15.01331841673 -3.3934e-14
+2.143492880505 15.03144149894 -3.3934e-14
+1.363079890443 12.9257839061 -0.3670526049635
+1.399073915601 12.87197344927 -0.3580034743797
+1.39199640915 12.8839191999 -0.3085020522416
+4.366612654174 15.20893841006 -0.8474119800799
+4.390316802545 15.19569939117 -0.9223420380075
+2.371815902421 12.80095953295 -1.586130235721
+2.374256353218 12.79679230017 -1.648014122186
+2.401106927188 12.84042513649 -1.618763085465
+1.052983095628 14.24010580774 -1.949498662898
+1.079116052116 14.20592763474 -1.985560882914
+1.086405880745 14.20546673673 -1.929976291239
+2.121827531252 15.09445268174 -2.661553655346
+2.164971444591 15.13018803359 -2.667857235851
+2.191209294714 15.0810495409 -2.659189392147
+4.551446847815 15.50765531591 -3.3934e-14
+4.490204356383 15.54205660745 -3.3934e-14
+4.478136720006 15.489585735 -3.3934e-14
+4.037300430837 15.22097848185 -0.7791537936975
+3.95962248664 15.22378440191 -0.7632392074773
+4.031867320175 15.22959709523 -0.7301690380855
+3.290206868975 16.29242282401 -0.7527461763637
+3.231231342959 16.26503043796 -0.7575784919154
+3.261120673909 16.34622015888 -0.7432583734948
+2.821981344505 13.43816654757 -0.8217244624434
+2.873516612427 13.4435589362 -0.8560126582293
+2.882836301767 13.44835498088 -0.7994473970458
+7.78e-18 15.20402596196 -2.057785623173
+7.78e-18 15.22118475214 -2.110216592936
+7.78e-18 15.13152555344 -2.085776542846
+1.861521413762 16.02223053259 0
+1.914996977061 15.9883056041 0
+1.910141365011 16.06280930764 0
+7.78e-18 14.76847580456 -2.04877462383
+7.78e-18 14.82688913195 -2.117967046968
+7.78e-18 14.74237907649 -2.115551831011
+4.580259837348 14.78796696791 -0.960154494917
+4.640592916259 14.71597521074 -0.9393164794902
+4.555716218167 14.72595451772 -0.9532353819941
+4.66454540472 14.77466371493 -0.94689452235
+1.311593256507 13.68626165186 -2.215943109668
+1.314322083743 13.65900734536 -2.268308865382
+3.912208526633 15.89570112726 -0.3792312615444
+3.892609751504 15.94032423774 -0.3948768094816
+3.944331185584 15.94002811466 -0.3749446164724
+2.316081567002 16.11967021045 -3.3934e-14
+2.327245220585 16.19148999388 -1.087535344488e-14
+2.268478085199 16.1562317574 -2.567707852187e-14
+2.939177978659 13.42939101105 -1.169669027974
+3.00124639843 13.44004168339 -1.144291476824
+2.978502480542 13.44146306082 -1.091394165897
+2.914033030166 13.43017467114 -1.116935808137
+1.634290961353 14.0446809454 -2.476461467181
+1.650457926442 14.10462491745 -2.487036408349
+1.699329800602 14.06818511257 -2.480606373175
+2.316216768209 12.6776490303 -2.08117147996
+2.286010400915 12.66607153082 -2.027876283372
+2.252247427609 12.64538320867 -2.075977979935
+2.286127177644 12.64971041555 -2.128085139428
+2.37417333246 12.83512876995 -1.315329466678
+2.397452852601 12.87392576844 -1.273852416193
+1.082231956344 14.33659457436 -0.3403992970871
+1.119696645908 14.28953676062 -0.3869727722267
+1.114033214482 14.29901028607 -0.3152114912653
+1.146928599557 14.25472169356 -0.3113724130122
+7.78e-18 15.15850008063 -2.026627561624
+1.940179299994 15.14303897147 -3.3934e-14
+1.922052830494 15.09403756792 -3.3934e-14
+1.973162359508 15.08132346122 -3.3934e-14
+4.168748501357 14.41056626525 -0.6240773211751
+4.134341396713 14.39957056724 -0.6865243267862
+4.208909333659 14.40007711357 -0.6837255483878
+3.219327136837 14.84683617935 -2.287448401068
+3.214539134206 14.91072443697 -2.32262063512
+3.223968206807 14.89479504619 -2.273727762186
+3.210226955323 14.83701197576 -2.33572386161
+1.549990689854 15.97333578029 -0.1125265841762
+1.504662675336 15.9386181786 -0.09593165719186
+1.530728910792 15.95881881747 -0.04645622968277
+1.581649248572 15.99920901739 -0.06025675461772
+4.467415574214 17.30817962645 -0.4825089244033
+4.421026419238 17.25630532078 -0.4801621292861
+4.383989087769 17.32634426609 -0.4986264456601
+4.351829359521 17.2756015185 -0.495911379241
+2.944871858787 14.10130117692 -2.377939887625
+2.936190035975 14.09032686371 -2.440340054714
+2.982304814547 14.0947351325 -2.415171967578
+3.802363876057 15.17698580501 -3.3934e-14
+3.749406822435 15.2325942315 -3.3934e-14
+3.736181826051 15.17790328814 -3.3934e-14
+2.112389536293 16.55445944138 -0.4054275314155
+2.076405300495 16.51281125744 -0.3805719166675
+2.113522930545 16.5571030763 -0.34993046371
+2.141964000257 15.3366805841 -1.739342575251
+2.127201364274 15.32882813664 -1.806821398829
+2.078870995428 15.33283484102 -1.772275437731
+2.960399482047 14.07829375744 -3.36738e-14
+3.053833844317 14.10012411288 -3.36738e-14
+2.983814286018 14.14248285128 -3.36738e-14
+4.521479541591 16.53493706284 -3.3934e-14
+4.53491212492 16.48167777252 -3.3934e-14
+4.576192120282 16.53008731724 -3.3934e-14
+4.306162046804 17.80759244577 -0.3271357901394
+4.30024171797 17.80768104169 -0.2731423445454
+4.359366147661 17.81628461181 -0.2738918721787
+2.007894704451 12.84879675238 -3.3934e-14
+2.047545840716 12.8892692358 -3.3934e-14
+1.981872065073 12.9167762563 -3.3934e-14
+4.822892416412 14.94295448933 -0.9681434525378
+4.8279 15.00377780798 -0.9542973227808
+4.8279 14.93753606175 -0.8912856710889
+4.8279 14.87017914601 -0.9428407386157
+3.483050900319 14.32392196541 -1.115351316235
+3.399950753467 14.31965169977 -1.139535700658
+3.440152574477 14.31198718658 -1.182991337577
+0.6057832746573 14.76674752222 -5.505224303916e-14
+0.5369496385835 14.73037805674 -6.386796336673e-14
+0.5941141759744 14.70562785431 -3.393398448923e-14
+0.531451179738 14.80117141295 -6.866924463862e-14
+3.345339958213 14.228278923 -1.657755367582
+3.265628822908 14.22103301392 -1.69909334256
+3.323649499543 14.21867826221 -1.712403947556
+1.536024433318 14.27215927611 -3.374371446941e-14
+1.59405876853 14.27736478584 -3.368504033441e-14
+1.554058411893 14.32918347015 -3.375854476668e-14
+2.375539174115 16.34762386081 -0.7430160490779
+2.326574526062 16.32339291784 -0.7472859709423
+2.319444784468 16.3726918641 -0.7385912014733
+1.763497279889 13.4067645308 -3.3934e-14
+1.696277931511 13.45024530047 -3.3934e-14
+1.697893847092 13.38805159101 -3.3934e-14
+1.577283559241 15.38788162392 -1.351844839168
+1.51393179723 15.3919968379 -1.338277430841
+1.57257600144 15.37462673529 -1.411954396508
+2.547664112283 16.81123771624 -0.6612616900298
+2.499593346853 16.78178104334 -0.6664533701419
+2.510866886732 16.85361331172 -0.6537970594634
+3.653762246792 14.72166847978 -3.3934e-14
+3.69795812432 14.77931492391 -3.3934e-14
+3.610343133734 14.779902222 -3.3934e-14
+2.732549030531 15.3460680122 -1.654409942119
+2.719227309008 15.33926403792 -1.716065373218
+2.675012743235 15.34484316006 -1.665478649066
+2.589284571661 16.01834921013 -0.8010679096577
+2.588929401978 15.95334524164 -0.8144634842292
+2.524158699908 16.00574886422 -0.8032895295596
+3.303125915427 15.42172608654 -2.194253129439e-14
+3.354750859845 15.41278603235 -3.224194465907e-14
+3.36157048299 15.4647336232 -8.671991525076e-15
+3.300573073079 15.33875762653 -1.794671628994e-14
+1.727577242409 14.44560188523 -3.382010065885e-14
+1.683801265979 14.53090454256 -3.3934e-14
+1.66871136897 14.45523565157 -3.382145448153e-14
+1.354034895007 12.93713721668 -0.4374230615587
+1.382863009212 12.89373292305 -0.4403136193005
+7.78e-18 14.99862646641 -2.442877217197
+7.78e-18 15.03931428175 -2.526509886297
+7.78e-18 14.97419259163 -2.496109142164
+3.896859696569 16.46320424471 -0.4854862759706
+3.838618993338 16.47340028562 -0.5110534974337
+3.890401016706 16.51269169041 -0.496687171915
+2.328780633528 15.2830994683 -2.159820749699
+2.378839613332 15.28194439807 -2.167773356784
+2.309189988048 15.27652657734 -2.206118517677
+1.153047153014 15.71607719221 -0.1803270790007
+1.102638764096 15.69097700382 -0.1322708882431
+1.151320698871 15.71568415837 -0.1253223384335
+1.198798000749 15.74075255517 -0.1622615921714
+2.187952700464 16.64713270947 -0.1026508981261
+2.136529075997 16.58727965266 -0.118129826093
+2.168577112061 16.62489983467 -0.06002364753606
+1.269818280455 15.48285665054 -3.3934e-14
+1.209841347798 15.52707442925 -3.3934e-14
+1.227820598194 15.44583595084 -3.3934e-14
+3.757819166645 15.15235397274 -1.168061334518
+3.716193865651 15.14752521987 -1.195359277033
+3.682003058696 15.15386358359 -1.159415236251
+2.470361991523 15.2212698894 -2.55938384817
+2.469057298072 15.22981763815 -2.508020137064
+2.524790481259 15.22547640803 -2.534119495647
+2.812056260208 13.41015694166 -1.177554628422
+2.874531126342 13.42095551474 -1.158986750835
+3.753881403478 16.07617151268 -0.4790472892271
+3.772757577549 16.13093155662 -0.479924215874
+3.799760252739 16.09128985885 -0.4607700876651
+7.78e-18 15.31223462814 -1.821214544797
+7.78e-18 15.32978449954 -1.771520390738
+0.05088135270373 15.33134429432 -1.785478532399
+0.0390011675694 15.32306621727 -1.854964989812
+0.09849021119152 15.21835451872 -7.690341520726e-14
+0.1440812303281 15.25594450858 -8.17662e-14
+0.1160489612422 15.29786314199 -8.17662e-14
+0.06565521252327 15.2960057172 -5.126749024572e-14
+4.082996798235 14.25212658676 -3.3934e-14
+4.041552984167 14.21258106824 -3.3934e-14
+4.10761926229 14.189437675 -3.3934e-14
+2.536985333538 16.24688716115 -0.7607675130127
+2.48362484755 16.24084114964 -0.7618378960642
+2.48569781672 16.31544051863 -0.748684795339
+0.6457063636371 15.49242388213 -0.928366743496
+0.6677022970193 15.50236069876 -0.8580737252309
+0.7018047810594 15.50896528182 -0.9089689563601
+1.835842465298 13.2349423659 -3.3934e-14
+1.858735260105 13.1524801981 -3.3934e-14
+1.894677971673 13.23910910612 -3.3934e-14
+4.221905659256 14.83868257651 -3.3934e-14
+4.278979743094 14.86433978603 -3.3934e-14
+4.230597555596 14.92382511907 -3.3934e-14
+4.487301393649 15.24097441356 -0.6655025605556
+4.556680067265 15.24376942019 -0.6497132768123
+4.530702102215 15.23581864891 -0.6947259412673
+1.3285 12.93603412533 -2.04702674239
+1.3285 12.90155125997 -2.008084345656
+1.3285 12.96781538412 -2.005849930262
+1.170768860162 14.11593624768 -1.737615471179
+1.215233478649 14.03784429477 -1.747149611432
+1.144745295654 14.14833217161 -1.788874397749
+3.130813681441 15.31103826041 -1.395318481002
+3.159148432503 15.38257163093 -1.370596505441
+3.186723883368 15.33934529446 -1.328779877188
+2.323311724136 15.590886457 -1.007125958572
+2.310141432635 15.53695291443 -1.065579924455
+2.260793936574 15.58422613657 -1.015730972421
+4.35622099929 15.60583863752 -3.3934e-14
+4.311180910457 15.65483167853 -3.3934e-14
+4.317833406336 15.56933989231 -3.3934e-14
+0.5678715403011 15.20288345296 -2.666496277082
+0.5133061367828 15.20490113074 -2.654844795628
+0.5277601006181 15.21345499901 -2.605448782807
+3.555867186433 14.66534042221 -1.532709839109
+3.533275006087 14.59908481674 -1.550147005628
+3.517860510509 14.64743099239 -1.57854393158
+0.8698723996399 14.54766890915 -3.3934e-14
+0.7988253856916 14.5973944866 -3.3934e-14
+0.8305233860191 14.54837300908 -0.05409210607509
+1.061167394606 14.30561353204 -1.292528944906
+1.019730586482 14.34757908349 -1.301469839794
+1.039030972522 14.3244808772 -1.352967646954
+1.075992014226 14.28327326308 -1.355751250964
+1.645466239346 15.36084497112 -1.510643430278
+1.627204781087 15.3531248628 -1.587251954774
+1.592023868277 15.36030019159 -1.516180854002
+0.3363468074037 14.66277480184 -0.7996653747274
+0.2769905847094 14.66358376967 -0.7925181572926
+0.3049748852805 14.65877917947 -0.8769804533175
+4.012075313752 13.58703411015 -0.098334671684
+4.075445757456 13.59036196457 -0.127398748514
+4.063704807932 13.59011814743 -0.06869119731652
+7.78e-18 14.8099601461 -2.310847478447
+7.78e-18 14.85422893784 -2.348728639814
+7.78e-18 14.81283064131 -2.381125989626
+4.508292190613 13.73616851556 -0.2892811217191
+4.50045246849 13.80761632665 -0.3031721410292
+4.554648088629 13.78577695029 -0.2913164921989
+2.409617254339 15.34581623641 -3.3934e-14
+2.427105291036 15.26872760817 -3.3934e-14
+2.452438642777 15.31500258649 -3.3934e-14
+0.9252303929723 14.40487571908 -1.53009410348
+0.918060858236 14.40406492482 -1.586412388582
+2.259797592477 12.79733562527 -0.6936117812448
+2.30891473061 12.8250683464 -0.6691249145614
+2.263906355185 12.80292937102 -0.5988784183101
+4.031881739325 14.89221695191 -3.3934e-14
+3.973348998386 14.82399392263 -3.3934e-14
+4.066295134408 14.84645231385 -3.3934e-14
+3.498376268786 14.05884085209 -3.372907103118e-14
+3.532587539256 14.10428563207 -3.382996115456e-14
+3.46359135306 14.11552379358 -3.36738e-14
+0.6234457119229 14.6360304583 -0.3517551178177
+0.6744125825299 14.61654002135 -0.3968361376853
+0.6811147230815 14.61550466778 -0.3463382191661
+4.485755499839 16.01917791026 -0.2524730255417
+4.432657926158 16.0039232431 -0.2572380521159
+4.427255513181 16.0754504006 -0.2707109357769
+0.2543974685629 15.34157981184 -1.69515322739
+0.2031858205162 15.33868544118 -1.72122500419
+0.208217476331 15.34537794147 -1.661039735169
+4.17505984967 15.1875131797 -0.9688788202175
+4.234197219956 15.18532861128 -0.9810632255053
+4.201727146384 15.17713732951 -1.027546639517
+3.70588356174 16.06220805319 -0.4998268823108
+3.672553678625 16.10122965466 -0.5234411798814
+3.721129868556 16.11412798528 -0.5013867801748
+2.698705970794 13.52561668881 -2.694379556498e-14
+2.708756338169 13.58808400357 -3.36738e-14
+2.655549479677 13.55595214957 -3.36738e-14
+2.65662581158 13.49380500691 -1.867447851963e-14
+3.357293747392 15.6941806626 0
+3.281517011297 15.70020276792 0
+3.305788993604 15.62195836071 0
+4.558662007243 13.69061953337 -2.748132239993e-14
+4.559088776934 13.76352334639 -3.3934e-14
+4.51699707766 13.73622896524 -3.3934e-14
+0.1659300351729 14.95414176595 -2.636812199402
+0.1934506152964 15.00115632045 -2.64510347782
+0.235451621066 14.95913012176 -2.637697793525
+0.1336538030312 14.99812537977 -2.644569938608
+2.882896708693 15.85595695064 -0.8425474911683
+2.850307133028 15.80011264942 -0.8643404350808
+2.822023296336 15.84686950611 -0.8461352351834
+2.882802428008 16.3181830547 -0.7482024244961
+2.854095605217 16.36076543382 -0.740690392465
+2.932459849901 16.33305085079 -0.7455831875721
+4.442640170003 15.5749652401 -0.5565964912955
+4.426671223297 15.55360658601 -0.6194486729919
+4.399217325934 15.57059573882 -0.5811629305642
+4.486468066368 15.56468322842 -0.6111949528611
+2.557018624279 14.8574102665 -2.619766839318
+2.522999871233 14.7815594717 -2.606392364947
+2.48988751249 14.82057473163 -2.613270776028
+2.889787608616 15.76282435813 -0.8835363656076
+2.852924405955 15.7289233013 -0.9013644381335
+2.813645648818 15.76049999623 -0.8844496780164
+3.36122223718 13.69950967 -0.8549852010037
+3.322665861791 13.71214589595 -0.8948433472495
+3.500487904726 15.05586509388 -1.674685802771
+3.450966456234 15.05552753176 -1.717242012687
+3.435107602337 15.06824935101 -1.645229331482
+3.481024944548 15.07207472731 -1.623614625366
+2.4279 13.11206617067 -1.261008433344
+2.4279 13.17691684857 -1.198973067791
+3.58202510896 15.18102106761 -1.005689538552
+3.594306451441 15.1911167746 -0.9482265625472
+3.643636157134 15.18814062912 -0.965188616434
+3.390074777798 17.15077281615 -0.6013995882172
+3.429090864403 17.20331698095 -0.5921322901006
+2.473176257641 13.40648269694 -0.04312050703118
+2.429455194525 13.39867647759 -0.07503979170132
+2.511220776491 13.41274842539 -0.1178228663469
+1.325298166618 13.58280805297 -2.138863797626
+1.328140834475 13.52231654316 -2.150777591697
+0.9533078402223 14.45034884444 -0.6524747840822
+0.9686678774119 14.43462615117 -0.7216760467784
+0.9889776586598 14.42037053742 -0.6337786634259
+1.02020758371 14.39093236585 -0.6598298745737
+2.467026295036 13.43956001527 -1.092170008844e-14
+2.517649434905 13.44211714193 -9.129701737332e-15
+2.494776851966 13.50591948505 -3.145491637635e-14
+2.150979714313e-16 14.86513607251 -2.524541692991
+7.78e-18 14.89230194174 -2.479961308361
+7.78e-18 14.92295311192 -2.522939934116
+7.78e-18 14.81991993888 -2.494064124536
+3.563854800417 13.54076444488 -0.575073117146
+3.626355644799 13.54631355725 -0.5801400900793
+3.58985326698 13.54527319289 -0.5257666065016
+3.367177585367 13.53152316714 -0.2161401887344
+3.37940176179 13.53167853818 -0.2831020469206
+4.018006410453 15.90878796911 -0.3432318048463
+3.994898142555 15.95632289433 -0.359545057896
+4.051492603333 15.95174720261 -0.3394109324784
+1.325544472086 13.53657838308 -2.386129730453
+1.327873137095 13.49259302039 -2.361696956125
+1.32490629339 13.55763914429 -2.340378967205
+1.318843986393 13.6114580809 -2.365606273122
+4.137591656029 16.21412539238 -3.3934e-14
+4.06045324862 16.23148461692 -3.3934e-14
+4.099560052247 16.17200784464 -3.3934e-14
+4.415709877307 17.44841127958 -3.3934e-14
+4.380912472423 17.4107621982 -3.3934e-14
+4.4557413498 17.39520800784 -3.3934e-14
+1.563707921022 13.56522897913 -3.371307990397e-14
+1.608496753533 13.62093297637 -3.36738e-14
+1.55386041608 13.6190051139 -3.36738e-14
+0.6762787495432 15.30223582731 -2.020063542986
+0.6397663818498 15.29706102001 -2.058229825059
+0.6249726591437 15.30391141174 -2.007015539323
+4.487352904969 14.36293985364 -0.8940348389536
+4.457120583404 14.37300434799 -0.8370757467107
+4.42924682878 14.36108307521 -0.904611393084
+1.941935981336 16.35769436991 -0.2327120318555
+1.949476312337 16.36552769681 -0.2961945303304
+1.914731075322 16.32508316798 -0.2791632348196
+2.134931185383 15.38749668336 -1.352666772537
+2.095053677309 15.40673502188 -1.288369425758
+2.165559783427 15.40569268697 -1.291722261666
+2.126113288466 15.43523109649 -1.226653190333
+1.911159113253 14.63851286769 -3.3934e-14
+1.855505203659 14.63899792889 -3.3934e-14
+1.882469446391 14.56398346306 -3.3934e-14
+1.429884096798 15.88287436982 -0.2360747827705
+1.382674396364 15.85092021857 -0.2301489046123
+1.418926479681 15.87606433073 -0.158124974309
+1.453947567037 15.90076620995 -0.1842223238147
+1.942577631224 14.1501329701 -2.495053137159
+1.894318680179 14.17297781963 -2.499083117791
+1.940136590034 14.21437695589 -2.506380654215
+2.002491733079 14.18474012461 -2.501155170388
+1.855560638798 15.60778065671 -0.9924715861666
+1.822820383788 15.64270412164 -0.9619950630148
+1.866540003236 15.67346361425 -0.9379600896563
+3.64844704735 15.17615728377 -1.033096240402
+3.708705061678 15.18409746941 -0.9881642806131
+1.496233477657 14.69377483945 -3.3934e-14
+1.483452682685 14.75073940566 -3.3934e-14
+1.428502925685 14.71507267318 -3.3934e-14
+3.997728189142 16.47359200242 -0.4496870072361
+4.049801393658 16.51351043474 -0.4390920713965
+4.036870162145 16.44410529228 -0.4314713045235
+1.895943380815 16.30158689379 -0.3672890915552
+1.885597937266 16.29094570139 -0.3153246680839
+1.923748056148 16.33459865601 -0.3334601398788
+3.294601057348 13.50467672723 -0.7455574135689
+3.24255525331 13.50034311062 -0.712361177744
+3.241107094568 13.49734650475 -0.7666164370499
+1.77297056326 14.90330792256 -3.3934e-14
+1.770172451039 14.95524848845 -3.3934e-14
+1.697115779799 14.94593857363 -3.3934e-14
+2.209593616987 16.66749315564 -0.4083368218637
+2.175046356629 16.62786507644 -0.3935783894505
+2.21543029382 16.6752414753 -0.3521204626611
+4.417638637943 15.63146677307 -3.3934e-14
+4.43832259997 15.55644770385 -3.3934e-14
+4.482015007948 15.62449720782 -3.3934e-14
+3.502811749173 14.80838041957 -1.627930007989
+3.51017967482 14.7608869398 -1.609160299722
+3.474985797866 14.74253032426 -1.655789334881
+3.201682193255 16.06916638166 -0.792112561989
+3.196514613499 16.13008746278 -0.7813731606231
+1.74708100599 12.62220932741 -2.125710257044
+1.674961325051 12.6159975743 -2.161801344702
+1.729228612839 12.61301711369 -2.179091628921
+1.674990398648 12.62940937742 -2.082036029641
+1.951834108603 13.25367463205 -3.3934e-14
+2.013042099309 13.2635595198 -3.3934e-14
+1.987900413768 13.34060142463 -3.3934e-14
+2.002913443622 13.19466858208 -3.3934e-14
+2.564004172698 13.31060000007 -1.727593077032
+2.581086932984 13.32150699333 -1.663898717187
+2.502733585542 13.30690622446 -1.673308258476
+2.947265967285 15.41379532229 -1.270497604352
+3.001283978178 15.39247879315 -1.334000293756
+2.93905628841 15.39460996329 -1.32934504896
+3.033023925438 15.41270000052 -1.283230148948
+4.552813192337 15.11609042558 -3.3934e-14
+4.623772537375 15.14872184867 -3.3934e-14
+4.558660437285 15.17274971744 -3.3934e-14
+4.428106557182 15.75436162088 -0.2142362919733
+4.461634369125 15.6977028298 -0.1989448261277
+4.396670269826 15.68070275199 -0.2066145631026
+4.697275862899 14.84119156176 -3.3934e-14
+4.700917660211 14.9228015018 -3.3934e-14
+4.643319269521 14.88617599472 -3.3934e-14
+7.78e-18 14.81198422834 -1.740172219841
+7.78e-18 14.81786540782 -1.678394780436
+7.78e-18 14.86435767072 -1.746422995978
+3.311784708154 15.07054646375 -1.631911353282
+3.303331068073 15.08361270276 -1.557965671469
+2.919946359692 16.47271912988 -0.7209541904696
+3.000708977548 16.51634807971 -0.7132563339424
+2.968054591472 16.4449222184 -0.7258592378541
+0.8778115167101 15.5933074996 -0.1983137599053
+0.8402103032747 15.57864474594 -0.2447216880426
+0.7950118523758 15.56356167427 -0.2196301697065
+0.8888027677562 15.59651248738 -0.2595372041805
+3.224907873639 14.95126547749 -2.279532182328
+1.3285 13.65701597936 -0.39829641001
+1.3285 13.60275683124 -0.3473228142564
+1.3285 13.66128172142 -0.3436946077685
+2.40828620811 12.84356296429 -1.683583194287
+2.392107489466 12.81106254454 -1.740964870069
+2.412998838156 12.86016392281 -1.73449012344
+2.400937346179 12.81677113844 -1.794688278149
+2.895212889241 15.13384986783 -1.762579089337
+2.921294176072 15.1874310505 -1.716700086373
+2.920730221728 15.09694646253 -1.702221289582
+4.273679014261 17.16799300452 -2.661988702271e-14
+4.218930463812 17.17453494426 -2.008142105453e-14
+4.242648959298 17.12241519807 -3.3934e-14
+2.988963960318 15.02074772751 -1.914561913937
+2.97536367374 15.03168620194 -1.852457310196
+3.064083679577 15.02849364871 -1.870583989154
+2.054431226646 13.59423550575 -3.36738e-14
+2.022056015616 13.5544381735 -3.369120743262e-14
+2.095265966356 13.54851596537 -3.36738e-14
+2.739519429955 16.7009992066 0
+2.799099537265 16.68750725865 0
+2.757232685031 16.75827279195 0
+1.931724135639 16.21494398768 -0.7664057134877
+1.904045380404 16.1562670569 -0.7767501333545
+1.862260895975 16.19335364599 -0.7702112475572
+1.772758342431 15.32124891071 -1.869774875986
+1.70797074299 15.32373855911 -1.849622251323
+1.752221340894 15.32822028705 -1.812133024989
+7.78e-18 15.04014367249 -0.9967607936622
+7.78e-18 15.06987227024 -1.054955607585
+7.78e-18 15.0058545968 -1.079005545918
+0.4297055933681 14.67413148606 -0.400802442081
+0.4559395659131 14.67162853764 -0.3491563454821
+0.3979842380947 14.67718068662 -0.3570877859193
+0.5177162961251 14.66103245819 -0.4020508535051
+0.06308494610532 14.60057616787 -1.571996804422
+0.1243493230648 14.59946594594 -1.582206640316
+1.903351381274 14.10856711399 -3.36738e-14
+1.853260950767 14.04978453698 -3.36738e-14
+1.922126059685 14.05981411195 -3.36738e-14
+0.05782581492794 15.36742159645 -2.354782805188e-06
+0.1220823910173 15.3479288754 -1.720509977246e-12
+0.0967985580719 15.40546950474 -5.786715541795e-08
+1.801668298839 14.99934864727 -3.3934e-14
+1.852895427575 14.9816683272 -3.3934e-14
+1.841700360672 15.04717510468 -3.3934e-14
+1.799160138864 14.69538475486 -3.3934e-14
+1.769485383868 14.7452463774 -3.3934e-14
+1.742879338591 14.68931226851 -3.3934e-14
+2.781985036468 16.15608093646 0
+2.800484270831 16.22590928392 0
+0.01684064005693 14.47549014318 -2.471581575781
+7.78e-18 14.49739908543 -2.399913412769
+7.78e-18 14.52263710841 -2.457541610642
+7.78e-18 15.03377993115 -2.394392099809
+7.78e-18 14.98309141945 -2.386403202035
+7.78e-18 15.04983632951 -2.345654642172
+1.502950764005 13.29261672582 -3.3934e-14
+1.451872353667 13.33707972569 -3.3934e-14
+1.451057529145 13.28457312181 -3.3934e-14
+3.641805381292 16.86470600233 -3.3934e-14
+3.623348492628 16.77733959245 -3.3934e-14
+3.664299585186 16.81432112122 -3.3934e-14
+7.78e-18 15.27024124202 -1.171195349149
+7.78e-18 15.20837521375 -1.224005233205
+7.78e-18 15.2007541861 -1.157187830599
+1.407884531758 15.31225958389 -1.942041836254
+1.467933969589 15.31326777166 -1.934596270982
+1.424128563818 15.3021364873 -2.02071458986
+2.55664112152 16.29611532202 -0.7520911303483
+2.605617382374 16.3596429967 -0.7408942668078
+2.642784483656 16.28847463135 -0.7534430348806
+2.976906974151 17.05542430975 0
+3.030488232574 17.08620466849 0
+2.961251005711 17.10880168682 0
+2.600616703279 15.47303016875 -1.154519429735
+2.653942933688 15.47752427631 -1.147720094894
+2.603459303529 15.44456004115 -1.206231817271
+4.665264858306 15.6382248444 -0.1977821411277
+4.611801129686 15.6246042468 -0.2751432526035
+4.589189018902 15.63545602393 -0.2134885867809
+2.251449819383 13.30528533453 -2.346078945057
+2.26645930346 13.23542877817 -2.333762614968
+2.216960782739 13.24275177336 -2.33505218081
+2.207102720779 13.19442280148 -2.326536202693
+1.322370605849 13.77987191884 -0.5734134472663
+1.315479967294 13.82356657051 -0.6388014284092
+1.325124333181 13.7384797314 -0.6468373462228
+1.327121184875 13.70117408226 -0.5693669577942
+1.154973968567 14.24637320688 -0.1547513058758
+1.120043774988 14.29281744019 -0.2086039596995
+1.150803503597 14.25127738713 -0.2145010633094
+1.182534213712 14.20144062177 -0.2026545793903
+3.088134026434 14.13821468233 -3.36738e-14
+3.112788143966 14.20486026854 -3.36738e-14
+3.049280064531 14.17164765435 -3.36738e-14
+3.787292601896e-07 15.35364119192 -0.788871839381
+3.297421889674e-07 15.34813714452 -0.8496305312208
+5.649462479293e-20 15.29431521399 -0.8030965191453
+0 15.32332615198 -0.7352888330123
+3.894856622809 14.17595940502 -3.3934e-14
+3.891013287479 14.23086629004 -3.3934e-14
+3.837929671374 14.23227135641 -3.3934e-14
+3.203951640995 15.49322112531 -1.020327239438
+3.255769571517 15.50042362681 -0.9791881359018
+3.24300720754 15.48770085385 -1.051690616974
+4.19352731759 15.60067817772 -0.4108233822319
+4.106166242463 15.6040482545 -0.3915257487627
+4.155774039515 15.61021400619 -0.3567571841088
+1.870397569815 12.79612142824 -0.3129757623322
+1.882617411342 12.79398257415 -0.3919202414758
+1.92724296429 12.79562398181 -0.3315528991717
+1.539851169411 15.50760608661 -1.103234944499
+1.547373060437 15.54437760284 -1.05827915467
+1.598090240605 15.51136515139 -1.099888351735
+1.581106773893 15.47971241087 -1.146835611896
+1.067924823417 15.36609490856 -1.464272329154
+1.119449404049 15.35871209527 -1.531800648274
+1.048125616561 15.35632809094 -1.555798032034
+2.4279 13.11035764195 -1.840569579682
+2.4279 13.1820263166 -1.812726565389
+2.4279 13.12712126793 -1.758489992775
+2.329418058973 16.80032241699 -0.1053755000835
+2.35915539114 16.83057614836 -0.05425410213944
+2.36698204151 16.83796378845 -0.1101018343634
+2.025457796638 13.63657369534 -3.36738e-14
+1.980944574201 13.68056017248 -3.36738e-14
+1.946865596957 13.62807340793 -3.36738e-14
+2.062331427179 13.70649739738 -3.36738e-14
+4.248620590827 14.81576474308 -1.053134117158
+4.281115783674 14.74126015261 -1.028095618873
+4.220153927219 14.75464399802 -1.053607283661
+4.299606381435 14.80419391405 -1.032421383665
+2.07830955127 15.33955664205 -1.713116297843
+2.123196254424 15.34533578844 -1.661157048822
+4.411147092425 17.00304762609 -0.4371170927653
+4.388305844084 17.07336556777 -0.4535511986155
+4.438920669204 17.06659640982 -0.4436554337879
+4.484040919288 17.04291628802 -0.4332140236103
+0.8981196316668 15.59071803415 -3.819289393128e-15
+0.9168919722193 15.60908430214 -0.05313978778615
+0.8403061497874 15.58054083508 -0.04705505288417
+1.47686455876 13.83671676059 -3.36738e-14
+1.508201081037 13.78737761089 -3.36738e-14
+1.511831640019 13.87284396498 -3.36738e-14
+4.037600127884 16.44732670783 -3.3934e-14
+4.043422135005 16.50315491567 -3.3934e-14
+3.976605061282 16.500791378 -3.3934e-14
+0.0178887853249 15.43514170472 -0.06612074673084
+0.06817796977742 15.43612894418 -0.06232996870359
+0.05830714020662 15.43570179079 -0.1117944102375
+2.185153984788 14.72861039032 -2.597055300371
+2.256207830468 14.68805139713 -2.589901980049
+2.186133136577 14.66277375878 -2.585440568397
+4.079044653492 15.02880147957 -3.3934e-14
+4.044192552658 14.99156488512 -3.3934e-14
+4.096032254192 14.96172515505 -3.3934e-14
+7.78e-18 15.15282278145 -2.237625816429
+7.78e-18 15.19563350519 -2.190412019444
+7.78e-18 15.20470640561 -2.25589324755
+4.304873051339 14.08740030933 -0.393155671993
+4.249376856098 14.02977414927 -0.3976224528067
+4.233979714142 14.07958458271 -0.4110913951323
+3.62082183728 16.44218978881 -3.3934e-14
+3.614090554597 16.39092814354 -3.3934e-14
+3.67850573594 16.429348207 -3.3934e-14
+3.650077504256 15.05418062906 -1.493736833897
+3.607814813201 14.98964456402 -1.528582061888
+3.613662035382 15.0427819821 -1.531273531829
+3.667166413319 15.00618658875 -1.467632466257
+4.770450145293 17.12880080278 -1.97798637342e-14
+4.741701067795 17.06751262445 -2.96781104447e-14
+4.806391074083 17.09310594068 -7.405477801016e-15
+4.63667767575 17.14939852536 -3.3934e-14
+4.645988865959 17.07346103127 -3.3934e-14
+4.673401181289 17.11536183345 -3.3934e-14
+3.140902133016 17.41362619702 -0.3053622886204
+3.130265664399 17.40880535469 -0.2495640110248
+3.179876462257 17.43548138527 -0.2583378868149
+3.203121069361 17.4472270846 -0.3077251363132
+1.880788395942 14.79748164855 -3.3934e-14
+1.87071216755 14.85406879697 -3.3934e-14
+1.830473324538 14.81771295112 -3.3934e-14
+0.334384253568 15.05813557988 -6.912116247902e-14
+0.3907299295134 15.0201310163 -6.853405130198e-14
+0.3789070493306 15.10948636087 -3.91263037839e-14
+0.3323359389896 14.99432732987 -8.17662e-14
+4.286964569719 13.81515821032 -0.349868669989
+4.220448004087 13.80010932536 -0.3660752587948
+4.246014377327 13.8761428659 -0.3714345401496
+4.8279 14.91602322292 -0.01382037377421
+4.8279 14.86555892927 -0.02424833515813
+2.01796503872 14.5424689771 -3.3934e-14
+2.035462410312 14.61253318899 -3.3934e-14
+1.959333951052 14.61064213142 -3.3934e-14
+2.225554360667 15.32395282903 -1.847722883646
+2.276435142079 15.32327880656 -1.853174426891
+2.215975492072 15.31787103379 -1.897625634975
+0.4456863702735 15.27400106837 -3.3934e-14
+0.4430572269149 15.21366616998 -3.3934e-14
+0.4967140656357 15.25249185116 -3.3934e-14
+3.509073545818 17.53286638795 0
+3.522419899342 17.45176393534 0
+3.56833855236 17.5045713479 -1.975603428723e-15
+3.586540538865 17.56978429273 0
+2.79758135581 14.12577698528 -2.238995980301
+2.738664216319 14.12166889994 -2.262400171296
+3.736663867247 14.30407002887 -1.2774584672
+3.703914051536 14.3023307416 -1.237765430713
+3.675643855439 14.29447014503 -1.282299819568
+3.750978730049 14.30597701978 -1.217204949524
+1.3285 13.4185489419 -1.194010980544
+1.3285 13.34392407734 -1.231867849162
+1.3285 13.34229657285 -1.16018713492
+2.032730124223 12.73067284666 -1.329522555569
+2.058358890552 12.73585882468 -1.279415635931
+2.006008111472 12.7380318289 -1.258223528686
+1.3285 13.3609216702 -2.279136310678
+1.3285 13.35702086896 -2.228665991342
+1.3285 13.41388501553 -2.247195523337
+4.449668969952 15.58380802826 -0.5065433284677
+4.443874932302 15.59262104084 -0.4563270166041
+4.497300692214 15.58707637098 -0.487742929258
+2.344843007392e-07 15.3555556511 -0.3903956113803
+-2.545151860522e-15 15.37349633185 -0.321232579757
+6.814315914639e-07 15.42532010842 -0.3674759004984
+3.678684994216 15.39793818375 -1.23968405149e-14
+3.704300110912 15.3347883415 -2.025948890374e-14
+3.740699687982 15.38654847003 -3.223188577369e-14
+3.036228155343 13.49320858518 -0.07856430968719
+3.015648004059 13.49066992526 -0.01680976740786
+2.983361421622 13.48609018669 -0.06211646879467
+3.222113156965 14.98582556307 -2.112472847827
+3.274653291804 14.94783913718 -2.096582973224
+3.257197227299 14.95328605495 -2.153196278191
+3.259751523665 14.99457917281 -2.062926535861
+2.901165724703 14.37650996392 -3.36738e-14
+2.954939310167 14.35447889338 -3.36738e-14
+2.946814480664 14.40535898684 -3.36738e-14
+0.5091052789963 14.66427439997 -0.3272216931807
+0.4668099513282 14.67147244216 -0.2783647404854
+7.78e-18 15.16748314735 -1.510651812812
+7.78e-18 15.13953035464 -1.578062315605
+7.78e-18 15.1179221599 -1.488961480779
+1.284600876255 15.03539825535 -3.3934e-14
+1.332342671182 15.01032723285 -3.3934e-14
+1.344569629802 15.0973456611 -3.3934e-14
+0.5071378035346 15.47202011716 -0.6815062525567
+0.4298020730094 15.45785747424 -0.6696355910649
+0.4756560208171 15.46802842339 -0.6306587930621
+0.5358857010202 15.47994842566 -0.640613303704
+2.138320210862 15.21403983519 -2.602021657612
+2.140606369657 15.22568083073 -2.532856405732
+2.207844898307 15.21565621732 -2.592626099553
+4.170338489365 14.09084142405 -3.3934e-14
+4.241612367509 14.10009477285 -3.3934e-14
+4.221197180797 14.15407911176 -3.3934e-14
+0.1200634150015 15.22209174565 -2.554739498183
+0.1440560237404 15.2300729275 -2.50646121644
+0.1947380711905 15.22769620173 -2.520931663158
+3.180845322283 16.69495402911 0
+3.245318972382 16.6702879514 0
+3.239023721561 16.74239251049 0
+1.156311901974 15.69967255916 -0.7726961953391
+1.152282449767 15.69469269332 -0.8306434199488
+1.080693040694 15.66024510087 -0.8068659271432
+1.225623551241 15.73569876237 -0.8102976105194
+1.229976802347 14.08428619444 -0.9300836440887
+1.225464276238 14.09723205103 -0.8775827478873
+1.206885199126 14.13228962122 -0.9197516028897
+3.661606123399 14.44048704655 -3.379984913561e-14
+3.640742385458 14.50697775024 -3.3934e-14
+3.595395102011 14.45622977692 -3.3934e-14
+2.805373919651 13.38117675066 -1.461277475284
+2.853248890323 13.38957817183 -1.449530078372
+2.828497005956 13.39056449789 -1.406090817214
+2.063236220488 15.3256879007 -1.83386926903
+1.026247774802 14.8220029475 -3.3934e-14
+1.064102407258 14.87760084775 -3.3934e-14
+0.984508319201 14.85110767718 -3.3934e-14
+3.127118017549 14.14622505646 -2.123357789682
+3.044724729367 14.14336296936 -2.139328716083
+3.092215513963 14.13922778614 -2.162816937883
+0.6736348612154 14.47417061917 -2.075675605696
+0.6097475396609 14.49803140627 -2.0632261672
+0.6380615564721 14.4810726387 -2.116929549168
+0.5853495892356 14.49588906109 -2.121041467622
+2.534036028802 13.38981629538 -0.8559827939371
+2.610086079859 13.40240401878 -0.8592195255995
+2.57634396888 13.40055486614 -0.7980144083765
+2.530297975912 15.99213905476 0
+2.469929323354 15.99467998483 -4.010858522312e-15
+2.482834123068 15.9176871122 -1.955924011317e-14
+2.533374973721 15.90811446039 -5.624984867134e-15
+2.777161990643 15.29794238873 -2.051737819993
+2.719078493827 15.29157190946 -2.099268229439
+2.687213362844 15.29896844969 -2.04408879874
+2.080847904105 14.9579114692 -2.637483661891
+2.169709716477 14.91823928803 -2.630497181987
+2.090001472492 14.90115257911 -2.62748389014
+2.025339169705 14.93108257976 -2.632758953257
+4.346581728533 14.42564667437 -0.5385793983919
+4.4038867931 14.42212119282 -0.5586342520285
+4.363988896306 14.43469564481 -0.4870787117924
+3.219590561815 13.90086770314 -1.041650634948
+3.230192039683 13.955977631 -1.03899151636
+3.255718464317 13.89694087108 -0.9988029857164
+4.8279 14.46676919434 -0.02449535579614
+4.779180437144 14.49705397309 -1.677227298902e-14
+4.797454074265 14.40860231353 -1.04803412852e-14
+4.824037529091 14.5403971085 -1.329705669385e-15
+3.608183441607 14.06756207246 -0.7140646905105
+3.55942059951 14.11429272432 -0.7579271373685
+3.619915272024 14.14450492977 -0.7190636879601
+2.038253302698 14.60597285909 -2.575419878887
+2.039263557324 14.68171986234 -2.588784281146
+2.108103543455 14.6377043131 -2.581014077355
+2.072287533085 14.56959519849 -2.569008238012
+2.25584252439 15.89727356803 -0.8282318721292
+2.234031029474 15.83031218075 -0.8523344757213
+2.205916723442 15.89998862817 -0.8275309926201
+2.206441233102 15.94854697214 -0.815603691808
+4.190297429408 16.23515851306 -3.3934e-14
+4.230474022661 16.16394767582 -3.3934e-14
+4.237971078357 16.25259767785 -3.3934e-14
+1.887088534971 12.66143538845 -1.87783770848
+1.802694522655 12.65458858717 -1.923835764384
+1.848266036823 12.64912501207 -1.959169923272
+1.799242532705 12.66310135494 -1.866645442728
+1.338525503463 12.98081886416 -0.697070195116
+1.33949003486 12.972977254 -0.7495308134412
+1.352627312037 12.92715189087 -0.7106573650033
+4.684868078026 14.47122972071 -3.3934e-14
+4.636440799714 14.43895201058 -3.3934e-14
+4.68561321258 14.41954358999 -3.3934e-14
+0.7759538055675 15.55873669452 -0.07154970790969
+0.7791916878037 15.5599813341 -0.008293196298648
+2.315023161564 15.22521702613 -2.535466539295
+2.347543031377 15.23263162302 -2.490873621677
+2.366937134795 15.22316946971 -2.547815130918
+-4.838561754835e-16 14.77801726148 -0.6007038510683
+-3.929552705437e-15 14.84687301676 -0.6444729617192
+-1.937618779301e-15 14.72760032927 -0.6178906689957
+1.211275856765 14.00512218091 -2.051136512161
+1.182761157253 14.05785955121 -2.021560026758
+1.182020983508 14.04999654815 -2.083804580309
+2.755090996742 13.32223321637 -1.875608296348
+2.766705261251 13.3586910728 -1.832747101784
+2.718799827864 13.32216203464 -1.831065121457
+2.769158030635 13.33606857706 -1.787076590572
+1.61354715272 15.23560702937 -2.472843429795
+1.576981188483 15.24627903766 -2.405987436588
+1.654140819176 15.2412461729 -2.437664601085
+1.24552375637 15.0927834511 -2.661261589172
+1.205799632887 15.14101090047 -2.669766348514
+1.256190972682 15.14557367797 -2.670571205154
+1.978516510512 16.40179366187 -0.125617804985
+2.84140877716 16.2873483812 -0.753639325381
+2.911433433138 16.26286298336 -0.7579614249495
+2.84393691828 16.225338351 -0.7645785834498
+1.161742261512 14.20083234392 -1.021611908243
+1.126481971661 14.25259173237 -0.9723088294695
+1.136286561959 14.2330652433 -1.059466170139
+3.582023670063 13.54014652314 -0.6279587618205
+2.748608795344 17.1639938319 -0.1853137186691
+2.701662075899 17.12922254677 -0.1440893271756
+2.770386092469 17.18049980781 -0.1269735214794
+2.745196731517 17.16237674393 -0.07051710316127
+2.348723005 12.86674566 -0.2323745976953
+2.391611646956 12.92570619559 -0.2479617618392
+2.370725397353 12.89592576388 -0.19055405174
+2.369274753928 12.8919012669 -0.2941323074861
+2.283864391034 13.06248245863 -3.36738e-14
+2.309966657717 13.12999480606 -3.36738e-14
+2.246114037877 13.11587998684 -3.36738e-14
+2.060255694037 16.34802447235 -0.7429448853257
+2.105830722741 16.40157808 -0.733496994555
+2.134761177113 16.35200593952 -0.7422402857097
+2.410279697308 12.96285552616 -0.09330147210844
+2.421023079752 13.01593622087 -0.04965988043526
+2.412669752239 12.97486158961 -0.02134375877238
+2.733295223895 13.44104041695 -2.009541637296
+2.72505281271 13.43543088168 -2.059877581924
+2.734737925137 13.49233393891 -2.00961068693
+0.09605431251419 15.41909960382 -0.7387074879016
+0.03260398024177 15.41930444478 -0.7084996670728
+0.07476021869457 15.42215027979 -0.6627001357517
+0.1461901995697 15.42315136086 -0.7138134265525
+0.9189603238765 15.35785371589 -1.540529427182
+0.8408890474441 15.35622686564 -1.556961047805
+0.8893911376259 15.36274282546 -1.491340968316
+2.140411277151 12.72363595556 -1.395208159503
+2.123144597536 12.71725412437 -1.4533370087
+2.200330137575 12.72214637653 -1.449434375324
+2.163802544344 12.713569925 -1.484545529302
+3.441754173337 14.30145917944 -1.242765349692
+3.519174277579 14.31185521085 -1.183909367874
+3.447428120892 15.87557338279 0
+3.394144229414 15.82893174865 0
+3.474050277234 15.82067232002 0
+2.547134204224 13.32298990415 -1.60634206803
+2.13118382753 14.86167183485 -2.620519636622
+1.267002934358 13.99724691925 -0.9089250024017
+1.278110073852 13.96909989525 -0.862574888308
+1.261465074469 14.01677631616 -0.8458884457295
+3.510222807446 15.1800281167 -1.011175989577
+3.549513402608 15.16759030496 -1.081992357976
+3.07751292114 17.38041103864 -0.04429851945233
+3.100232554107 17.39320952697 -0.09807102633779
+3.047639586384 17.36310850826 -0.08609594380466
+2.832490435173 17.18686485428 0
+2.894132675078 17.17511860067 0
+2.872399449789 17.22868337466 0
+1.518059503709 13.53174545711 -3.379200286454e-14
+1.556872532308 13.49500348351 -3.388360203997e-14
+3.267458210802 16.47860990275 -0.7199223271093
+3.31844453973 16.53783181113 -0.7094728555502
+3.339759124875 16.4912556921 -0.7176907510676
+3.083165134454 15.19482487901 -1.440658163449
+3.062733599281 15.11827976006 -1.458091960366
+3.031867678492 15.15791900399 -1.511989094355
+1.3285 13.52087067814 -0.9703356363304
+1.3285 13.49219636953 -0.9288176177487
+1.3285 13.5645358381 -0.8967646514895
+0.01970177048484 14.681068886 -0.3363205208664
+0.1038287745185 14.68129934106 -0.3268753057756
+0.05731386048002 14.682117171 -0.2888835463301
+2.4279 13.09118396279 -0.7592649366063
+2.427565049608 13.02758734415 -0.7348114797909
+2.4279 13.0477092874 -0.7890111478983
+4.440843581982 15.10481891854 -1.043664316677
+4.418077801687 15.04786349561 -1.039735689189
+4.383655718168 15.11085581457 -1.060121710238
+2.875350957721 14.91599251372 -2.508687520482
+2.820105679863 14.92703531228 -2.446155670488
+2.892177993597 14.92828063057 -2.438802289902
+2.547202406255 16.95425063461 0
+2.603486482379 16.89198681332 0
+2.61114323037 16.94174605092 0
+3.395623081834 14.82957070678 -1.800608418041
+3.384857298884 14.7712633056 -1.810696630663
+3.369287802905 14.82462042086 -1.850185755733
+3.413249891566 14.77906756532 -1.761213279415
+1.427327555228 13.55808335616 -2.390656646995
+1.403723399459 13.60262737963 -2.398508516797
+1.446293983437 13.63031974136 -2.403392832221
+4.8279 15.15853081527 -0.2287392287983
+4.8279 15.23840409421 -0.2579891132307
+4.827900000064 15.20837132654 -0.2163194585197
+4.633650605155 15.07719187996 -1.003860351143
+4.661153332964 15.03439050842 -0.9930381236203
+4.599988648852 15.03910394213 -1.001128510781
+2.931078231999 14.88522719845 -2.624670336255
+2.91399178517 14.90524608753 -2.569593129282
+2.991404038365 14.89756221277 -2.613024833648
+4.466895006408 16.83983449462 -0.3999003905224
+4.444886297408 16.78935591525 -0.3941848328979
+4.401345751277 16.86135106186 -0.4138800869225
+4.373421004029 16.81041894196 -0.4101693916139
+2.032870177402 14.76020440536 -3.3934e-14
+2.067326133496 14.82794009592 -3.3934e-14
+1.982896958662 14.8066407263 -3.3934e-14
+3.606880390554 14.78294255734 -1.492901689279
+3.655414441091 14.77575701125 -1.439190826863
+3.630137755213 14.70905002752 -1.454413503568
+3.58274786384 14.71632424024 -1.509383917776
+3.726389819363 17.07682158743 -0.6144349347974
+3.665202798986 17.08764269791 -0.6125269294074
+2.47295752313 15.9893922615 -0.806172915261
+2.494391053977 16.0462627892 -0.7961424602335
+2.157063817097 16.61014309371 -0.2243989853489
+2.125303549351 16.57285505497 -0.2392702244391
+2.128040256523 16.5767253582 -0.1874806376032
+3.678300823855 17.2792796291 -0.5787374347642
+3.65594314034 17.32455954141 -0.5707468645484
+3.719913780464 17.3253691746 -0.5706102657785
+2.41643897587 12.97849106664 -0.6236787869976
+2.424907556308 13.02159735815 -0.5961937986216
+2.414642585747 12.97211962791 -0.5709220148626
+1.233660513146 14.083209069 -0.8220075255145
+1.249436168637 14.04574346594 -0.8888389304711
+1.3285 13.10868928777 -0.4434324868073
+1.3285 13.17270114375 -0.5087512010778
+1.3285 13.11617706281 -0.5289127439744
+4.6348600192 14.09488302149 -3.3934e-14
+4.56615386267 14.09614127362 -3.3934e-14
+4.58855374193 14.03169675329 -3.3934e-14
+1.3285 12.93306266489 -1.958904710918
+1.3285 13.43778342274 -0.2261722475528
+1.3285 13.42338695229 -0.143830057338
+1.3285 13.47126301081 -0.1862976406382
+3.96020346526 14.52804494431 -1.146851877366
+3.897899274595 14.48112977807 -1.179964699981
+3.905074120392 14.54357609968 -1.186124147906
+0.2889476066969 15.40847725225 -1.16075839933
+0.2494859445969 15.4022029838 -1.195713158424
+0.2034923822702 15.40106021774 -1.147495475905
+2.041367988102 16.47250690933 -0.342805151092
+2.000385548482 16.42495846345 -0.3131764629093
+2.041323661815 16.47390481554 -0.2620930813598
+3.508039107012 15.67256651998 0
+4.449662995788 17.82723293672 -0.2760517202125
+4.387344848302 17.82065164388 -0.2212762591148
+4.472675945815 17.83055135997 -0.2145825439598
+4.399915691818 17.8228787527 -0.1563279889791
+2.830547855132 14.45606187917 -2.54899824914
+2.825341358125 14.53330951681 -2.562621660642
+2.880592785494 14.48242892972 -2.553645757572
+2.905303200704 14.43211028063 -2.544771937741
+3.208234429888 14.14695038925 -1.098291354205
+3.250472592284 14.19526328447 -1.057533200432
+3.235998346431 14.11743962701 -1.060695966581
+3.432003383275 14.17366814686 -0.8730293533533
+3.393171393574 14.14870697466 -0.9032050173642
+3.375436959858 14.19062861094 -0.9277932094169
+0.1761972647244 14.53127223993 -2.119255040257
+0.1341638475817 14.53535199921 -2.090917285952
+0.1377829407243 14.52636487029 -2.152220754969
+4.660285828283 14.37314168721 -3.3934e-14
+2.4279 13.23574305834 -1.941991915566
+2.4279 13.16620030194 -1.895096910402
+1.827520341644 15.73318116167 -3.3934e-14
+1.760560796785 15.7300812556 -3.3934e-14
+1.80053379109 15.68353056663 -3.3934e-14
+3.104743605837 16.37022795961 0
+3.115377395331 16.31363417375 0
+3.188041236248 16.34318807948 0
+4.758450014157 17.84495538743 -0.3814047189047
+4.708109683296 17.84421727932 -0.3499770742835
+4.794865811193 17.84638334612 -0.3345619903196
+4.750415760682 17.84674906631 -0.2773202900737
+-3.190962111008e-15 14.83434128155 -0.581602072253
+-4.561612657963e-15 14.88903397522 -0.5435212624149
+-4.548462277155e-15 14.91017910756 -0.6343669240224
+3.109230778306 14.04488317598 -1.208426820597
+3.107572765503 14.11710375055 -1.223508760604
+1.906231588445 13.85575273286 -3.36738e-14
+1.952871196469 13.87778396778 -3.36738e-14
+1.876636274296 13.91556940984 -3.36738e-14
+-4.476641428759e-15 14.84016830461 -0.1152680838409
+-4.4089825454e-15 14.79155444585 -0.08912908963136
+-4.632100441251e-15 14.83256724819 -0.05394666674246
+4.8279 15.33492749515 -0.105674888343
+4.8279 15.37731750726 -0.03032309623703
+4.827899999914 15.30530478771 -0.06388575491817
+2.154255619018 16.38654208791 0
+2.198704972322 16.40969962112 0
+2.130711940304 16.43941912638 0
+4.135780544213 14.27438223592 -3.3934e-14
+4.147721853287 14.22328301734 -3.3934e-14
+1.555287340613 13.25381544234 -3.3934e-14
+1.496766703257 13.22517994245 -3.3934e-14
+0.1755287967983 15.26283985872 -2.298567147969
+0.1348732144393 15.26905902083 -2.25712271691
+0.2133319282006 15.26963787118 -2.253073392869
+3.99403319333 16.94641027403 -3.3934e-14
+3.941497821423 16.94737419965 -3.3934e-14
+4.678646654466 14.979212355 -3.3934e-14
+4.730129500958 14.98751551519 -3.366217648633e-14
+4.773994535498 14.9593147227 -1.855953766642e-14
+3.140243451238 13.48011672513 -0.8484241873237
+3.0931587599 13.47798725086 -0.7857631570631
+3.071161877978 13.47206610038 -0.8367044714213
+0.1946543614594 14.67728692429 -0.4725888812448
+0.2186365491126 14.67889092697 -0.4220570617714
+0.1582499662947 14.67890042332 -0.4223340766493
+2.442220950333 14.80103126565 -2.609823583304
+2.432350420147 14.85467452823 -2.619281629439
+0.1876521232194 15.44021226293 -0.240205983232
+0.1726739602232 15.44023103008 -0.169857137234
+0.2313048968934 15.44499302958 -0.179234187701
+0.1228372677897 15.4370284442 -0.2023261991317
+3.28048546539 13.97758239813 -0.9864952237325
+1.3285 13.04750813996 -0.6910021255477
+1.3285 13.09746330741 -0.7367106908241
+1.329877357738 13.02018904003 -0.7717385000432
+0.5229097797686 14.54921018909 -1.845304744732
+0.5675619420639 14.53014767307 -1.906621883387
+0.6004716984313 14.52969749261 -1.845643797991
+3.101212860359 13.54891081966 -1.132293696022
+3.116258930321 13.50833229387 -1.103927290368
+3.086425608621 13.47305582568 -1.139814902159
+0.6459172415359 15.06698178432 -3.3934e-14
+0.6030583866139 15.11901532134 -3.3934e-14
+0.5878005743822 15.04691870286 -3.3934e-14
+0.6444808853599 15.06217930526 -2.655862128488
+0.5988990863451 15.13595740905 -2.668879084227
+0.6624263067008 15.11311849769 -2.66484368013
+3.705769506757 15.57912889207 -0.533043866218
+3.669076228725 15.58520968986 -0.4985420362728
+3.731888573352 15.58797099856 -0.4827436795332
+3.158456288528 17.03926813035 0
+3.225294699355 16.98189551012 0
+3.217123718459 17.05398045422 0
+2.806832007206 13.96689271171 -1.797438126295
+2.834210436367 13.96785923325 -1.717711585621
+2.815283826666 13.89300824586 -1.757733135564
+1.607795621815 15.40614021769 -3.3934e-14
+1.589556577995 15.46255407558 -3.3934e-14
+1.556758304538 15.40714434183 -3.3934e-14
+0.3201234365114 14.47285980976 -2.55195326321
+0.2665291633338 14.52813621035 -2.561703837516
+0.3249350754003 14.56034272359 -2.567384877063
+0.3794668760869 14.52211187414 -2.560641796615
+2.804844416216 17.20585907539 -0.05194646576552
+4.781160762166 14.38996482147 -0.8716068289578
+4.745213400109 14.44436434784 -0.8823651388208
+4.807810103956 14.46546309899 -0.88430367085
+3.667394947762 15.30054659644 -2.666683533168e-14
+3.70460997296 15.26664187595 -3.3934e-14
+2.878325176323 14.07982046564 -1.624894910592
+2.899085952787 14.08605499978 -1.579460922841
+2.887639310358 14.02594212859 -1.593624798223
+2.589326881195 17.03500347861 -0.4164648124447
+2.62791416181 17.06763634545 -0.3899919227269
+2.603920501247 17.04573893782 -0.4705616911211
+7.123541877844e-18 15.11398187501 -0.8735111215965
+7.024040703937e-18 15.118024593 -0.822513425176
+2.881044559779e-18 15.17592955946 -0.8283274075992
+2.372661131098 15.25860185912 -2.326351302577
+2.413237388328 15.2636378734 -2.293462790006
+3.64212321105 16.76531815673 -0.6570773404796
+3.590592776291 16.78469852753 -0.665948809528
+3.615119312258 16.84423685691 -0.6554429193433
+3.679746260902 16.82208081592 -0.6470705507239
+3.795110297321 15.842859353 -1.813033887428e-14
+3.853706901269 15.8303858791 -3.3934e-14
+3.922989179645 15.8775044649 -3.3934e-14
+0.8753625935994 14.51007923335 -0.577991005742
+0.8970768881384 14.49276502438 -0.6363048546475
+0.9320588518609 14.4688397804 -0.5875642934195
+0.841157908974 14.52867449657 -0.6239384688039
+3.329500997269 14.29560209107 -0.9908430970055
+3.320422143575 14.22682680555 -0.9879812304293
+3.294150354686 14.26943988328 -1.023433983219
+4.779357375046 14.41447633111 -0.6018725873973
+4.793321141624 14.42508213716 -0.5418552734926
+4.729953265288 14.42089177454 -0.5654145214024
+3.182120773773 15.47817034091 -1.105603434177
+3.24564468446 15.47854448855 -1.103591630831
+3.221022714313 15.47044633764 -1.14955562856
+1.292462814581 15.12377087128 -3.3934e-14
+1.288685550545 15.19154650043 -3.3934e-14
+1.231481140192 15.14705428086 -3.3934e-14
+1.3285 13.42282736387 -0.9523542812356
+1.3285 13.47268373129 -0.9853015975259
+1.3285 13.42402763554 -1.025597661974
+4.229987769161 16.9685493111 -0.4686153575944
+4.178552178664 17.03139792363 -0.4924516321708
+4.254409596623 17.01410748462 -0.4703655650005
+0.281814242193 15.28573711093 -4.650380458312e-14
+0.3212524089629 15.31731033199 -3.3934e-14
+0.2675690116583 15.3355520534 -5.063023488118e-14
+1.113663825251 14.14537210944 -2.116955329937
+1.149825634099 14.10492848717 -2.057511164037
+1.110565277298 14.15958623175 -2.049519103558
+1.065891746594 14.2008418482 -2.12265266825
+4.4716349185 17.25812005053 -0.4726535942043
+7.78e-18 15.05962795332 -1.455289360245
+7.78e-18 15.07002289493 -1.514109490576
+7.78e-18 14.98066792355 -1.513445945171
+3.930221488466 17.20727932704 -0.5914344504554
+3.992268793936 17.2482221861 -0.5842152733885
+3.998827324082 17.19550144706 -0.5766724416473
+3.947974001693 17.14857435249 -0.5872480018874
+4.533031809964 15.59702133136 -0.4317623975993
+4.585071541401 15.58963714288 -0.4735568356252
+4.546544667481 15.5826689834 -0.5127770813915
+1.717849555503 13.56621237203 -3.374631098312e-14
+1.77315599734 13.57472306493 -3.37361651531e-14
+1.730779646983 13.61856843171 -3.36738e-14
+1.728652046735 15.08842021542 -3.3934e-14
+1.682361296588 15.04217569771 -3.3934e-14
+1.756420626744 15.02917247342 -3.3934e-14
+1.728914534523 13.18004471048 -2.323999763098
+1.671450065933 13.21183955229 -2.329609746877
+1.75477464187 13.23334742942 -2.333397174099
+1.802639511667 13.1977407283 -2.327123944721
+4.002953643305 14.42027648506 -3.3934e-14
+3.952473840112 14.39210745607 -3.3934e-14
+3.987253546483 14.34593303945 -3.3934e-14
+0.2938427479457 14.67252495593 -0.6037315745362
+0.3487147319638 14.67150727096 -0.6030538326654
+0.313644136804 14.67455442351 -0.5525826165074
+4.8279 14.62451402919 -0.1924781364812
+4.827900000037 14.59376435373 -0.2329876523566
+4.8279 14.62500999956 -0.273115859822
+4.572337017663 14.41480447098 -0.895619720992
+4.613525437693 14.37059558198 -0.8508830809834
+4.542884621047 14.3684918657 -0.8625550817383
+3.986601974166 14.56436062877 -3.3934e-14
+1.158926739546 15.3425736028 -1.686370671252
+1.244226338204 15.34230520821 -1.688674921789
+1.176084254362 15.33731844246 -1.733798486153
+3.150866596747 17.42163710151 -0.06237019506769
+3.132134233985 17.41105181684 -0.1503657902423
+0.2635985250239 15.44911419045 -0.02064254353013
+0.3070341082711 15.39525417599 -4.467935023503e-12
+0.3115033409454 15.44725855404 -1.101644706448e-11
+0.2248484767775 15.42480657817 -1.37263857045e-11
+-4.415399917773e-15 15.23971665554 -0.1456023556042
+-4.631476188534e-15 15.31780795268 -0.1826836254081
+-4.46916263119e-15 15.26307382489 -0.2088082735353
+0.7152047133629 15.53119051961 -0.5295246722586
+0.6510788679579 15.51439137341 -0.4613216402378
+0.728681818762 15.53699638407 -0.4719952750164
+4.237438475508 14.67163126586 -3.3934e-14
+4.169770255205 14.67055914007 -3.3934e-14
+4.204396959115 14.62106990807 -3.3934e-14
+3.148884228876 15.41798021568 0
+3.182497612029 15.34905469255 0
+3.226749102214 15.38921663001 0
+0.2061721727863 14.57958195621 -1.755860692456
+0.2727786685086 14.58330202249 -1.724865685542
+0.2166338585596 14.5859218669 -1.702075307192
+4.8279 17.07075989159 -0.2851077348553
+4.827900000001 17.00585746355 -0.2541359596681
+4.8279 17.00464590074 -0.3048300434718
+2.634545997194 15.7510715102 0
+2.710385749404 15.73651252768 0
+2.696352475089 15.80996538331 0
+3.346473184996 13.8592028503 -0.897442184107
+3.315082147169 13.88585707561 -0.9335379666865
+3.348864911811 13.91868184156 -0.905609296069
+0.5221402632012 15.31228763833 -3.3934e-14
+0.5235999656177 15.38199802935 -3.3934e-14
+0.4590285839154 15.32774543974 -3.3934e-14
+0.6993581816183 15.2951114972 -2.072940471446
+0.7258125845088 15.28223597429 -2.165752038937
+0.6539531636496 15.29022920245 -2.108911756785
+0.669323280157 14.62893427772 -2.579470044499
+0.6153391862504 14.64896152422 -2.583002012798
+0.6695776421092 14.68574456553 -2.58948874184
+0.5878701105523 14.59919449366 -2.574229774372
+4.538335974952 14.12259237951 -0.3526295258039
+4.525622258206 14.1902181882 -0.3664651633627
+2.880470067676 15.36113095204 -1.507741717536
+2.813849538231 15.35533047824 -1.566116676486
+2.827538150917 15.36456426825 -1.473680550533
+3.126281476664 13.63918076091 -3.36738e-14
+3.042312312878 13.62551869217 -3.36738e-14
+3.087588647324 13.58061220578 -2.665370724638e-14
+3.071017307814 13.68246219265 -3.36738e-14
+0.4785680286885 14.90956345801 -2.628951161923
+0.5391863997384 14.88141585218 -2.623988820381
+0.4994126156331 14.83186871068 -2.615253286055
+0.4529875643027 14.85576637627 -2.619467772878
+3.284400812381 15.02065768974 -1.914811358359
+3.278769071211 15.0110735826 -1.969311529049
+3.229463863041 15.01391510308 -1.953227863774
+4.694096882392 17.37500902172 -3.3934e-14
+4.644014771522 17.42978262521 -3.3934e-14
+4.626222747935 17.36648241592 -3.3934e-14
+-4.36436e-15 15.17112223693 -0.3228046420307
+-4.36436e-15 15.1687988561 -0.2588708046899
+-4.36436e-15 15.21050169799 -0.2869181743222
+3.34115999753 15.20596317089 -1.13448001669
+3.322280185094 15.15349680339 -1.161774563506
+3.304736442077 15.21715047228 -1.173278547457
+1.877925442506 16.28326551391 -0.2623840218002
+1.850603884177 16.25168424046 -0.3028941243125
+1.830347987649 16.23055439034 -0.241006947954
+1.804769215801 16.20322158609 -0.2830187151355
+2.662779000071 15.67884232561 0
+2.633672589523 15.60355627831 0
+2.693958427106 15.62343432271 0
+2.323174663929 14.44297155676 -2.546680679265
+2.255470909676 14.39532706753 -2.538280106701
+2.285770559389 14.47665467285 -2.55261905937
+2.236131694247 14.46656888168 -2.550846042668
+1.624651795604 13.35609035903 -3.3934e-14
+1.684772201088 13.32110529226 -3.3934e-14
+1.367112973616 14.78054798493 -3.3934e-14
+1.436627494875 14.78560647193 -3.3934e-14
+1.378655187585 14.84928395989 -3.3934e-14
+0.1219250652978 14.92357628249 -2.631420794568
+0.1222189665644 14.86295613023 -2.620732835229
+0.07664358557559 14.89946847343 -2.627168609389
+0.1674382385502 14.89989381681 -2.62725284277
+3.062495074908 13.49558722707 -0.1862470356772
+2.986471682471 13.48507248932 -0.2118458916972
+3.003911150802 13.48651378032 -0.2613016422002
+4.8279 17.66909178924 -0.4974794586033
+4.8279 17.63294627111 -0.4543826687891
+4.8279 17.58909462687 -0.4896085835552
+0.4018682862138 14.57609833386 -2.570162028214
+3.608896485375 13.55711791889 -0.02298622859077
+3.633783874245 13.62771494639 -2.269120243458e-14
+3.558923477015 13.59695995633 -1.474872268506e-14
+3.680148996676 13.56794258001 -1.513283666694e-15
+4.274974442598 17.80209355779 -0.3712656653344
+4.236788919124 17.79419810015 -0.4319075666416
+4.203291402439 17.78972845687 -0.3688605026127
+3.68540895787 15.56453294314 -0.6155412567157
+3.713736464656 15.55560993926 -0.6662030889707
+3.657203996834 15.55574145042 -0.6654561526639
+4.099550897487 16.74829713891 -3.3934e-14
+4.07155346693 16.68499947389 -3.3934e-14
+4.126464296078 16.68966061868 -3.3934e-14
+3.73431339792 13.62028315903 -0.5520742341206
+3.768405896869 13.56374697575 -0.5217852647152
+3.71414496043 13.55524261557 -0.5474584106943
+3.677000742203 13.58777196998 -0.5826412466202
+3.24052650709 16.66192085996 -0.6875975405472
+3.316834774368 16.63832609253 -0.6917576541724
+3.266521286837 16.61198469805 -0.6964042466383
+3.590666055013 13.5552242004 -0.08883989609009
+3.533236098636 13.55007959626 -0.04189805064577
+3.518785981888 13.5485107169 -0.09094856115776
+0.2327722631491 14.62512276556 -1.3244071765
+0.1742516755186 14.62506025739 -1.325009217562
+0.1821975365514 14.61830064831 -1.397062721373
+1.29614752405 13.86221852797 -1.397092422952
+1.291551146876 13.8744209769 -1.457966100224
+1.307026376847 13.81339768141 -1.447383522215
+4.373229407781 14.54433830335 -3.3934e-14
+4.352851628919 14.6169234808 -3.3934e-14
+4.297377745657 14.54386516629 -3.3934e-14
+3.9471578662 17.45928502304 0
+3.943708832327 17.51260184703 0
+3.891601313731 17.5060241703 0
+1.383078069885 12.88989661371 -0.5327039398578
+1.415942645378 12.85106064805 -0.5715851593554
+1.451894182843 12.82882110545 -0.5234920051643
+1.42098670448 12.85164938402 -0.4713950471515
+2.687883836004 13.3618510622 -1.470810176329
+2.754326220189 13.37687980759 -1.428965824027
+2.70145186333 13.36909430645 -1.423051006305
+2.737481225662 13.42807938582 -0.7721972358835
+2.800282728982 13.43836671304 -0.7598170504667
+2.761186999591 13.43528521288 -0.7081915129062
+4.152696458271 17.26302839624 -5.88633112516e-15
+4.080587824326 17.25918196581 -2.047996381362e-14
+4.10751404744 17.21557760408 -2.661048621241e-14
+4.285758970219 14.92654738626 -3.3934e-14
+4.253298402472 14.9760627659 -3.3934e-14
+3.605588852404 14.08037946675 -3.3934e-14
+3.665021475778 14.0761697428 -3.3934e-14
+3.659132171887 14.13545949399 -3.3934e-14
+3.854771501713 15.26618039491 -3.3934e-14
+3.848467576312 15.20848726529 -3.3934e-14
+3.898705798816 15.23285967134 -3.3934e-14
+3.437864785147 16.16125329585 -0.6717135974174
+3.4220009715 16.09483707292 -0.6703767596959
+3.373265332474 16.15499983158 -0.7140696632528
+2.729054853183 13.41948814714 -0.892108389105
+2.749689221562 13.42630006174 -0.8358441191812
+2.696616617003 13.41717249169 -0.8487307735993
+3.012073261668 13.4829068518 -0.4456963647122
+2.967266775675 13.47853686186 -0.3880804068097
+2.958419423793 13.47544236633 -0.4490059324762
+4.685958709183 14.11436731448 -3.3934e-14
+4.680987754297 14.0561263961 -3.3934e-14
+3.520777401464 15.51037800508 -0.9228336241294
+3.565121901471 15.50544519529 -0.9508017115994
+3.497965777216 15.50060289589 -0.9782820361985
+1.697997624007 12.65229933529 -1.938997204317
+1.770096409642 12.6472401222 -1.971148335984
+1.733330756888 12.66083163694 -1.881893820902
+1.684228688013 12.64118366948 -2.009636892504
+0.7581314749565 15.50586869394 -1.593582600023e-14
+0.8352994595004 15.54648584313 -1.082680084922e-14
+0.705824265889 15.53241004611 -1.625762691291e-15
+1.835708629961 15.87281594825 -1.235774036133e-14
+1.85960815833 15.93824107005 0
+4.788710857578 16.47454828121 -1.349273903148e-14
+4.741222540236 16.44399668384 -2.984286647352e-14
+4.773523024115 16.39720195746 -1.872187804052e-14
+0.6585984170512 15.33259729782 -1.774552600072
+0.6344795228135 15.33838708013 -1.723844042978
+0.6995836277248 15.33659499457 -1.740061667389
+3.630462391888 15.36076337702 -7.677595109887e-15
+3.617057963046 15.3013688746 -2.650811215937e-14
+3.646899170572 15.25170348095 -3.3934e-14
+3.010380259498 14.63125945785 -3.3934e-14
+3.030673958391 14.54376669154 -3.371363539953e-14
+3.06229528563 14.61288019288 -3.3934e-14
+4.123695742304 15.32644050789 -0.6624918420743
+4.090388974139 15.39399293887 -0.6870049421531
+4.164830501094 15.37846737169 -0.6578797624357
+2.963247944973 14.50869081498 -3.36738e-14
+2.978765413889 14.56120585705 -3.374965087713e-14
+3.805416657856 15.78384301223 -2.115354784635e-14
+3.862522035745 15.75631406639 -2.567904390255e-14
+1.3285 13.44156863684 -0.6524178002591
+1.3285 13.40564807318 -0.5940794135145
+1.3285 13.46277403079 -0.6021822519298
+1.227640279775 15.30483722107 -2.000045068182
+1.273307525181 15.30077688781 -2.03106929323
+1.192976828689 15.29480885389 -2.075125865701
+3.18086404275 17.4307290805 -0.5080879765495
+3.228150004815 17.45210898645 -0.5482583798169
+3.19418634687 17.38969300983 -0.5592601338237
+3.128085231052 17.40097686323 -0.5333055594768
+4.791032604849 17.84877844776 -0.1514417145482
+4.735730514026 17.84814911818 -0.1169556534401
+4.788322242359 17.84911502778 -0.081660572144
+3.83806696777 13.84367904116 -3.3934e-14
+3.78487950587 13.88762422607 -3.391922438666e-14
+3.786594327537 13.82837452815 -3.388767454449e-14
+1.512563498327 15.93303829195 -0.6188612888552
+1.559473368205 15.96929419226 -0.612165580904
+1.558523461332 15.96627513816 -0.6717461288536
+1.616625984376 16.01513176084 -0.6559050529997
+4.8279 15.99898763058 -0.189875426415
+4.825931642104 16.03874831123 -0.2321703647363
+1.678016468983 15.63771389043 -3.3934e-14
+1.748454549481 15.59542026221 -3.3934e-14
+1.747374232148 15.66435983917 -3.3934e-14
+2.759774731961 14.93400057155 -2.406637278326
+2.843057795928 14.93910366995 -2.377475081014
+3.107805708662 15.7602824737 -0.8594171139532
+3.147103093247 15.71875246432 -0.8161140405694
+3.09323660668 15.6871992723 -0.8596480777055
+2.109724608939 13.10579071448 -3.3934e-14
+2.13503097338 13.17505427924 -3.3934e-14
+2.06504904701 13.16324060479 -3.3934e-14
+0.5095038046037 15.36254671611 -1.493430318542
+0.5578701186441 15.37140772228 -1.43067343298
+0.5803375798405 15.36278357751 -1.491048319813
+2.803535301999 16.02597477849 0
+2.752571015409 16.0158582337 0
+1.839140465928 15.27781459839 -3.3934e-14
+1.78113425489 15.26191362177 -3.3934e-14
+1.80910267887 15.21920412714 -3.3934e-14
+4.04757348087 13.7862896513 -3.386086667362e-14
+4.009528928799 13.86173879096 -3.393076979504e-14
+3.965829782057 13.79481340011 -3.3934e-14
+3.805760540857 16.41565929387 -0.515282411602
+3.780693614676 16.48968217477 -0.5395339176458
+2.46403382757 15.42323658702 -3.3934e-14
+2.411999314453 15.40197606367 -3.3934e-14
+2.461196675771 15.36739663082 -3.3934e-14
+2.404332453792 15.37833417401 -1.391657209222
+2.480699496343 15.38204620305 -1.37224641764
+2.469016008974 15.37299198811 -1.424481870512
+2.453017827453 15.39420864713 -1.327159552776
+0.3113471689589 14.59735279696 -1.601153291717
+0.2396899070618 14.59871799574 -1.588553385499
+0.2426280154148 14.59154306365 -1.653751245265
+4.441923807719 13.81201508243 -0.3136471984094
+4.408424136569 13.76981724563 -0.3131636715626
+4.371113579722 13.82246954119 -0.3304436180078
+0.2008918063588 15.39472043848 -1.223274635445
+0.1541700678064 15.3939791796 -1.191754111131
+0.588078280534 14.6400010705 -0.5286570540308
+0.6094182427537 14.63234846605 -0.5891247335692
+0.6529457729931 14.61960296739 -0.5431551459487
+3.70134026895 16.17593169557 -3.3934e-14
+3.694256326401 16.23789179576 -3.3934e-14
+3.638174134205 16.22431400006 -3.3934e-14
+1.126648282691 15.42201549911 -1.252903919652
+1.167798403908 15.44554011294 -1.203821862806
+1.172777314116 15.40785290259 -1.28599115164
+0.8528232550766 15.31232358997 -3.3934e-14
+0.9068997886922 15.37033053708 -3.3934e-14
+0.830854998283 15.39283092047 -3.3934e-14
+4.637895541848 15.5909200479 -3.3934e-14
+4.582891416549 15.57637183691 -3.3934e-14
+4.62500435514 15.54216288449 -3.3934e-14
+3.251049761231 15.51566721501 -0.892932480344
+3.302413993472 15.50799281182 -0.9363239773883
+0.3032470974349 15.32376638519 -1.849459304836
+0.355292235482 15.32713927053 -1.821383625098
+0.3580658205266 15.31999543199 -1.880116742041
+3.11582813309 13.9274177064 -3.36738e-14
+3.085228798714 13.98676036822 -3.36738e-14
+3.060828752409 13.9257956617 -3.36738e-14
+2.07484647737 12.66719540123 -2.233570300548
+2.123862855185 12.70526176404 -2.240282155659
+2.127466518988 12.65385780593 -2.231223537126
+2.078564931603 12.73104643154 -2.244827583346
+7.78e-18 15.26826263114 -1.78446588435
+7.78e-18 15.27913084696 -1.862222429471
+7.78e-18 15.22786069105 -1.832634435635
+3.850438649662 16.87523918131 -3.3934e-14
+2.939731666704 15.47375574922 -1.130806242679
+2.882895013093 15.47973692069 -1.096833131187
+2.94835888612 15.48621362805 -1.060116422118
+2.28507380071 13.1487931529 -2.318492416726
+2.337594267455 13.22161582439 -2.331326578847
+3.782137542734 14.558440333 -3.3934e-14
+3.868907691859 14.56715755582 -3.3934e-14
+3.848654423549 14.6289593251 -3.3934e-14
+2.744097961885 15.70166020411 -0.9181371294393
+2.69665681871 15.67174588374 -0.9386523607071
+2.693592064389 15.72784636948 -0.9016331283173
+1.223957084525 14.71095722813 -2.593935451836
+1.165072134977 14.72977535149 -2.597259041483
+1.208598376234 14.7731307166 -2.60489997964
+3.999560760308 17.01513650163 -3.3934e-14
+3.936330614478 16.99966372467 -3.3934e-14
+2.939662760506 14.31043456454 -2.523317250779
+2.885843749369 14.30532119876 -2.522419024047
+2.87625892487 14.37159088747 -2.534101598484
+3.771230158993 14.38775991941 -0.7533462964056
+3.728006675398 14.38214048872 -0.7852395310813
+3.782236620469 14.3785851742 -0.8053427195158
+3.180057108991 16.64390880944 0
+3.255822827971 16.60655342526 0
+7.78e-18 14.70017525498 -2.341983387414
+7.78e-18 14.66491670305 -2.423265823137
+7.78e-18 14.63843832626 -2.332184082548
+3.435379647779 14.92388650836 -3.3934e-14
+3.474810235413 14.89313913784 -3.3934e-14
+2.66496002345 14.63361643363 -2.580302498811
+2.653095534807 14.69264776036 -2.590719050296
+2.725105850085 14.67366099053 -2.587369900407
+3.150631540888 14.17758261232 -2.499895985231
+3.126487637567 14.1222994338 -2.490141191696
+3.08968 14.1819 -2.50066
+1.710909055781 15.84269237505 -0.8475261522255
+1.717412490187 15.76402005073 -0.8818794475258
+1.66776227998 15.81668381737 -0.8578261156669
+3.208762785527 15.23342401076 -1.282802943892
+3.163037370718 15.22714335295 -1.338014089663
+3.187600957078 15.27442070624 -1.31606843983
+1.666966838483 13.76987670487 -3.36738e-14
+1.606843044201 13.79780346744 -3.36738e-14
+1.609950693795 13.74335402257 -3.36738e-14
+1.199279937778 14.60234584601 -3.3934e-14
+1.229910056528 14.54455367911 -3.3934e-14
+1.260506404076 14.60974313686 -3.3934e-14
+3.74335877087 15.16537643871 -1.09426141244
+4.398599795347 13.7046973484 -3.341173831019e-14
+4.379062754034 13.6585567718 -1.81933718682e-14
+2.668480470718 13.3736610118 -1.328649422677
+2.660983936943 13.36575235049 -1.393577755067
+2.719961987905 13.37686058787 -1.377066721647
+0.3905236871675 15.27885395532 -3.3934e-14
+0.3861065533487 15.35251458549 -3.3934e-14
+4.247963484125 14.13136093698 -0.4159108331418
+0.0982647 15.4291 -0.492256
+0.1394994114869 15.4299337958 -0.5370373002663
+0.100551303838 15.42599243973 -0.5836621018559
+0.03843204915351 15.42612852833 -0.5418772259477
+3.305140286024 15.54496361408 -0.726890557631
+3.269900798122 15.53707508843 -0.7716554278001
+3.218686340777 15.54161121726 -0.7458785614328
+0.6844345837981 14.57257782404 -1.155646474362
+0.6326841800801 14.59191558959 -1.146357881637
+0.620859430669 14.59181642191 -1.201116414154
+0.05664034283509 15.20445778365 -2.657304854814
+0.06783414681867 15.2150745895 -2.595758678848
+0.111177374271 15.20978040015 -2.626517548607
+3.102395178754 14.6437750456 -3.3934e-14
+3.099614114998 14.69431966982 -3.3934e-14
+3.02614972743 14.68402584109 -3.3934e-14
+4.758317481249 14.2321852161 -2.394171568002e-14
+4.768600150466 14.17836727087 -2.040025440077e-14
+4.82722146582 14.18705699515 -2.334284152037e-16
+4.685461031631 14.22914489334 -3.3934e-14
+2.356887108075 15.48543305876 -3.3934e-14
+2.403529522794 15.46302368705 -3.3934e-14
+2.403914062676 15.51495173979 -2.797167430003e-14
+3.261322226949 14.23468101085 -3.36738e-14
+3.248325982904 14.29931643608 -3.36738e-14
+3.211471449255 14.24007290602 -3.36738e-14
+1.792226198533 15.48383826288 -1.136688709862
+0.2412716704266 15.36396811968 -1.479024338366
+0.2920372244214 15.36027468119 -1.516348140216
+0.2547806693401 15.35508715409 -1.568504287742
+1.978367747631 13.58503404599 -3.368977088502e-14
+4.019020450233 15.21211153088 -0.8293797526366
+3.965541574168 15.21060861377 -0.8379341969033
+4.014058897773 15.51036774875 -0.7377463332895
+4.050763047169 15.43935007415 -0.7100012489582
+3.980815303306 15.46376619979 -0.7439451412876
+4.68717376962 17.32243420788 -3.3934e-14
+4.753078190219 17.3481110667 -2.576099120445e-14
+1.3285 13.0381698636 -1.721599250567
+1.3285 13.09336239721 -1.801885561193
+1.3285 13.01511449872 -1.783144348549
+0.3594693870229 14.61681438619 -2.577340624805
+0.4100498358018 14.64466077933 -2.582249102297
+3.058891655507 16.2473632594 0
+3.02518569674 16.28811023027 0
+3.002921266028 16.23313163673 0
+4.650953191079 14.45035797444 -0.398505009566
+4.70978165937 14.43717758358 -0.3915875675428
+4.64098304766 14.39870996941 -0.3896600094319
+4.681159342637 14.4385903099 -0.465101869562
+1.961658914161 15.3453919356 -1.660814226564
+1.874415863543 15.3444706705 -1.668770196406
+1.930945779509 15.35005446738 -1.616757543485
+7.78e-18 14.83951142411 -1.421686742195
+7.78e-18 14.86642763865 -1.48163158874
+7.78e-18 14.8182673002 -1.467241033687
+4.8279 17.81350154877 -0.2736059850998
+4.8279 17.80139874338 -0.3688559917797
+4.813161271378 17.84492728736 -0.4155356060407
+1.314797040457 13.70508245535 -1.948282719375
+1.320723693806 13.67394416371 -1.882864106489
+1.306115395977 13.75927970327 -1.920626200408
+1.631187977426 15.7340231814 -3.3934e-14
+1.608364456906 15.66358091788 -3.3934e-14
+1.683464621472 15.69990230732 -3.3934e-14
+4.101851321401 16.96870378639 -3.3934e-14
+4.160488795555 16.98796705503 -3.3934e-14
+4.118095652126 17.01813397094 -3.3934e-14
+3.453295142351 13.53717065378 -0.7420234366496
+3.487551044056 13.58257512943 -0.7210992959582
+3.506465274435 13.53041769899 -0.6967126764005
+1.726080496058 12.67855894648 -1.758778862333
+1.708765712655 12.68641832158 -1.700674076691
+1.66494804845 12.67845403654 -1.759520791605
+1.703932756939 12.66968078499 -1.821565742648
+3.983485297616 15.163305084 -1.105909476305
+4.050040221909 15.17318138257 -1.050085791121
+4.043419756123 15.16124987382 -1.117699400046
+3.92095362891 15.20600410386 -0.863781009007
+3.963988376687 15.19871178945 -0.9054150175204
+3.905515676175 15.19743710562 -0.9124186510806
+2.265211407407 16.33045719135 -0.7460339162695
+3.127126370802 16.57392555879 0
+3.129267727963 16.64907354622 0
+0.4246734236273 14.59080582937 -1.617329218317
+0.3680401895033 14.59755196347 -1.581566368318
+0.3586207873319 14.59195461845 -1.636621299516
+7.78e-18 14.96160956344 -2.311211061416
+7.78e-18 14.90397994136 -2.36570641582
+3.400374784845 16.45567651581 -3.334465175338e-14
+3.389015865489 16.39403523015 -2.500461000834e-14
+3.456855497073 16.38132638655 -3.3934e-14
+3.475607412622 16.43395919103 -3.3934e-14
+3.386088264571 15.03769757353 -3.3934e-14
+3.383829034888 15.10484285069 -3.3934e-14
+3.3190446626 15.08705022662 -3.3934e-14
+3.585980349299 15.14964238598 -3.3934e-14
+3.613430790474 15.09099195282 -3.3934e-14
+3.659202471963 15.13717521587 -3.3934e-14
+3.707859705004 16.95233419439 -3.3934e-14
+3.741951295904 16.90865462762 -3.3934e-14
+3.790398283587 16.95879801447 -3.3934e-14
+3.09552479351 15.22567552313 0
+3.082729124055 15.28437959033 0
+3.019361186846 15.23993666298 0
+2.495222895749 15.33659887247 -1.74019385329
+2.534258258993 15.34348686204 -1.677829398078
+2.568527942933 15.33681727414 -1.737895174701
+2.933110447208 14.25757956183 -2.513997639211
+2.875959238347 14.22182623073 -2.507691849439
+2.844755921879 14.26772359155 -2.51578792438
+1.354665578882 12.94335701561 -0.07506484335738
+1.353412530783 12.94473169117 -0.1335430058524
+1.381365174535 12.90318821066 -0.09558795759969
+2.364458906442 13.16539763846 -3.36738e-14
+2.308907298623 13.19911387463 -3.36738e-14
+1.973141876494 15.75175242308 -3.3934e-14
+1.902334855953 15.749170128 -3.3934e-14
+1.966333052841 15.70065181799 -3.3934e-14
+0.1841915242349 15.38663597065 -1.30872405527
+0.2618191434287 15.39032857383 -1.339014629771
+0.1760822354169 15.37952613288 -1.379592938887
+0.1264316553884 15.38045743162 -1.337749976633
+4.555570935722 14.40164407758 -0.6746089669514
+4.529543492067 14.4126430501 -0.6122123596467
+4.489553493636 14.40537183653 -0.6536563976502
+0.5915196505311 15.22007625827 -2.566602875488
+0.6659994607009 15.22146007919 -2.558298135198
+0.6040038937725 15.21056534814 -2.622146766502
+1.708869108435 14.12781757839 -2.491124711559
+1.65217935367 14.16662594188 -2.497962962422
+1.713061751496 14.19868800268 -2.503614240132
+2.221619127716 13.02553963016 -3.36738e-14
+2.181784434362 13.06490843941 -3.382480598916e-14
+3.169019776378 14.3044236752 -2.522248561802
+3.11224907882 14.23819494042 -2.510576570274
+3.097776060087 14.29701604839 -2.520941462332
+3.128116366409 14.34998199103 -2.530287472507
+7.78e-18 14.65616579494 -1.382844347893
+7.78e-18 14.70268336709 -1.403476912049
+7.78e-18 14.65801423958 -1.461529791333
+2.864907138824 17.24519396257 -0.2860178781957
+2.912472184806 17.27742172148 -0.230275633458
+2.933281630118 17.29028752977 -0.2782627590902
+2.916876907367 17.27861843014 -0.3355905089038
+2.231209733363 13.84915997646 -3.36738e-14
+2.199953102166 13.79353775999 -3.36738e-14
+2.040021508123 12.67559209007 -1.7797606454
+2.067218627091 12.66720420119 -1.839080288957
+2.092987233941 12.67629319483 -1.774802391258
+3.499384356666 15.00502605443 -3.3934e-14
+3.520140902378 15.06770525809 -3.3934e-14
+4.425185312073 14.31467461785 -3.3934e-14
+4.447913607429 14.37547010605 -3.3934e-14
+4.357500590054 14.36749719449 -3.3934e-14
+1.903724370144 13.74595352068 -2.423778967409
+1.841133358097 13.71850613751 -2.41893766065
+1.839581757537 13.79112677939 -2.431743524844
+2.039874534286 15.36269783592 -1.491838161636
+1.962122378892 15.36423372157 -1.476339412129
+2.004855109982 15.3743163991 -1.413972869353
+3.059321988187 14.75660549218 -3.3934e-14
+3.148899705306 14.76069988226 -3.3934e-14
+3.102029666477 14.80418508003 -3.3934e-14
+1.239426798395 14.11186293476 -2.488296463495
+1.149353625484 14.11478677323 -2.488817812215
+1.210436166247 14.15595854754 -2.496075112647
+0.8595309394415 15.49345921957 -3.148971561306e-14
+0.7923251618814 15.45821075369 -3.3934e-14
+7.78e-18 14.94985990024 -0.8286342675323
+7.78e-18 14.98563155908 -0.8662607018589
+7.78e-18 14.92541536707 -0.8744362864269
+2.71668429437 16.52207630134 0
+2.767473930735 16.4625067981 0
+2.81180381218 16.52702791471 0
+4.050159037504 17.76230077049 -0.04488929239893
+4.081012721066 17.76860969801 -0.1249804462711
+4.007494337717 17.75194215904 -0.1188109751878
+2.612078907946 13.34725298291 -1.49159267827
+2.620310734508 13.35485265011 -1.434180399827
+2.563165149643 13.3413911265 -1.470101076987
+2.806642848046 16.62688613767 0
+2.882700769718 16.66118142009 0
+4.81097632975 14.12495833979 -0.3332317419785
+4.8279 14.15391020517 -0.2831752195189
+4.8279 14.09102753623 -0.2864068925945
+4.8279 14.19003217207 -0.3394809456366
+0.7724763293704 15.35448046157 -1.574066441347
+0.80505827967 15.36223171714 -1.496495832607
+1.74975572924 13.50798972945 -2.381824428854
+1.705231012127 13.44027011015 -2.369881760335
+1.692207732749 13.50752274554 -2.381739547666
+3.617317349496 14.40132366857 -3.378774337513e-14
+3.677887873221 14.37057832029 -3.378536071475e-14
+1.647321501017 13.47205342868 -2.375482476345
+2.191114529413 15.33493235599 -1.754610187298
+2.261912676986 15.33563914706 -1.748393243306
+2.25290732461 15.32926107706 -1.803015006722
+1.301820109375 13.73875397076 -2.174596088047
+1.286419046479 13.79588584917 -2.207142821762
+1.300862153365 13.73463901446 -2.224747843551
+0.09347291967535 14.54509537655 -2.021980572402
+0.1698999569785 14.54248135016 -2.040677018484
+0.1355980640378 14.55231333705 -1.968937879479
+3.99065981543 14.05693133463 -0.4958223814046
+3.925412166265 14.01118205759 -0.5176692599172
+3.926722317879 14.06574295769 -0.5266702955808
+1.406768518305 15.62492437652 -3.3934e-14
+1.378163245109 15.67660835554 -3.3934e-14
+1.346623225459 15.63716725036 -3.3934e-14
+2.769971695593 13.41367256166 -1.059069276078
+4.8279 17.76485755377 -0.3087855660154
+4.8279 17.74211016645 -0.2454745910513
+4.8279 17.70522974676 -0.3018310139495
+1.097693016083 14.24853273939 -1.463844014493
+1.058151427428 14.29204317716 -1.466962760467
+1.060884048252 14.28183304637 -1.53609837764
+2.197233530452 15.32899977175 -1.805396928343
+2.144734015892 15.32077912748 -1.873610676132
+4.315744934655 17.02174443672 -3.3934e-14
+4.264741598092 17.02790453181 -3.3934e-14
+4.263160879574 16.97655486345 -3.3934e-14
+1.068128073708 15.29278858831 -2.089831741579
+1.010589719134 15.29857899529 -2.047120649538
+1.065796207907 15.30463839265 -2.001470285417
+1.238156158104 13.9680612683 -1.907743612581
+1.239600669503 13.95771827341 -1.959550671212
+1.259980691533 13.91664062285 -1.905153451327
+4.087518557094 15.20375865935 -0.8766856224822
+4.018202648818 15.20268549561 -0.8827268099273
+0.8371787251779 15.45695353744 -1.184178998554
+0.8017310190146 15.42956143317 -1.236497245571
+0.7578968434498 15.45620956587 -1.181023039959
+0.7897897398712 14.9208751848 -2.630954051883
+0.8225185693599 14.84907505497 -2.618301065842
+0.7513574233366 14.87790873836 -2.623382318917
+3.558957953036 14.720667235 -3.3934e-14
+3.606730000221 14.68614331787 -3.3934e-14
+4.131270142415 17.77915069833 -0.1454253849792
+4.152577300214 17.78242828211 -0.2299215350032
+4.108145647475 17.77408062855 -0.1953700416844
+3.901506847795 14.11004772123 -3.3934e-14
+3.856380108654 14.13660085947 -3.3934e-14
+1.397188553616 12.87964117335 -0.05093911210596
+7.78e-18 14.90007614251 -2.166964889251
+7.78e-18 14.84560542649 -2.200413896874
+4.221091054308 17.43712127676 -3.3934e-14
+4.241972062578 17.48930055323 -3.3934e-14
+4.186878071914 17.49941462149 -3.361638964516e-14
+0.1544200796353 14.68107428412 -0.3384189621064
+0.2111014650975 14.68203451379 -0.2936737311768
+0.1501692007883 14.68218416122 -0.2867132080032
+3.779586447533 15.59403467367 -0.4484032453143
+3.849202855372 15.59304601167 -0.4539808257191
+3.798173141808 15.5851760263 -0.498531156595
+3.902004071111 16.65011911814 -0.5164491575839
+3.889934513667 16.70293578904 -0.5304487671238
+3.948946870011 16.66456386367 -0.5008546396414
+4.086924601897 17.11585929129 -3.3934e-14
+4.056695062196 17.1789952798 -3.3934e-14
+4.01188383794 17.13525982632 -3.3934e-14
+4.673103702955 17.2166766482 -3.3934e-14
+4.6027484719 17.23762598259 -3.3934e-14
+3.111038403977 15.56656514616 0
+3.063350397697 15.48322547038 0
+3.130453141567 15.51340207915 0
+1.736323360498 15.31066432433 -1.9545805781
+1.734263432536 15.30403127339 -2.006415465033
+1.670878005959 15.31132082784 -1.949585286679
+3.130925266422 13.97105376324 -1.164790619059
+3.153230540413 14.04037113484 -1.148268012403
+3.185725273755 13.97928911644 -1.095836364379
+4.680067056654 15.59700127252 -0.4317563520772
+4.72729450316 15.58838896727 -0.4807181312879
+4.665737166917 15.5831416659 -0.510467408787
+2.672862089335 17.10385472428 -0.3517035788056
+2.668506109807 17.09924972138 -0.4048911554124
+2.4279 13.23123079335 -1.222425742329
+2.4279 13.22932073911 -1.156032710752
+2.290096128461 16.75494186708 -0.4098413678805
+2.306905620365 16.7737284888 -0.3505639686933
+2.353818072122 16.82102718023 -0.3808823775046
+2.342820741662 16.80888765788 -0.4349444676941
+0.2280087191759 14.55736071844 -1.931445130418
+0.1959839049398 14.55017005688 -1.984514796188
+0.2609230727034 14.54862310319 -1.996395343809
+3.967954883773 17.19911704205 -3.3934e-14
+3.954280506757 17.12827058437 -3.3934e-14
+1.326760693208 13.56559799235 -2.054988468925
+1.324187989438 13.61343390013 -2.089511164691
+1.32756434742 13.54157912741 -2.103542050058
+2.142968051665 13.70246100374 -3.36738e-14
+2.100860066678 13.66872620376 -3.36738e-14
+2.149480077865 13.65118552953 -3.36738e-14
+3.725030646344 16.31102592673 -3.3934e-14
+3.724642864344 16.36274384186 -3.3934e-14
+3.673671164404 16.37150620032 -3.3934e-14
+1.468150063902 14.22505669521 -2.508256487959
+1.411338724403 14.21003947823 -2.505610577478
+1.414558454151 14.26788126837 -2.515808939988
+3.563053498217 14.93849072893 -1.572077822416
+3.568713967542 14.9955656323 -1.575110712561
+3.184449322473 16.99029104004 -0.6296951092328
+3.17851504203 16.94082103129 -0.6384122674753
+3.13464131941 16.97608997806 -0.6321918162846
+7.78e-18 15.1348065645 -1.747332614974
+7.78e-18 15.13647329144 -1.670358387541
+7.78e-18 15.18576704035 -1.70136764749
+1.920541522404 16.32239226454 -0.622787145681
+1.952222087251 16.36065345193 -0.5942245109417
+1.964048403543 16.37251614331 -0.6490224629967
+2.454990169071 15.5003106609 -1.114252996748
+2.510760043458 15.47976292696 -1.145351554916
+2.455714910277 15.47055952353 -1.156501648819
+2.35732042799 16.73860451976 -0.6740717956398
+2.31414230237 16.69474641607 -0.6818010368353
+2.302875911538 16.74389493504 -0.6731354916295
+3.525996931951 15.74855264695 0
+3.443241825966 15.71612897327 0
+2.826708015123 17.2162553336 -0.4070942687739
+2.815170120529 17.2067125486 -0.4640103218709
+2.769671170704 17.17565062648 -0.410325166288
+0.7637384634102 15.27637861685 -2.207098572237
+0.7879258288523 15.26978215556 -2.251880383051
+0.736783347968 15.26913219961 -2.256120281013
+1.449567234166 15.55129634671 -1.049348791867
+1.371956091046 15.52455546638 -1.079030566354
+1.390412176738 15.56025607163 -1.037759509756
+1.410445300491 15.4989252507 -1.113383633568
+4.070224130387 15.91481570134 -3.3934e-14
+4.147069973109 15.89126491291 -3.3934e-14
+4.15169840203 15.94664838957 -3.3934e-14
+2.739516390967 15.66763829076 0
+2.751178353274 15.60921705655 0
+2.804289193245 15.63481958153 0
+3.778008371614 14.33234809908 -0.6515486990888
+3.716797549879 14.34460781308 -0.6902432601228
+3.742327128585 14.38949034643 -0.682919920385
+4.727254060432 17.35731977826 -0.4667727799546
+4.764666601247 17.32154422359 -0.4594653668749
+4.715188077962 17.30471790236 -0.4581472411297
+4.677983740318 17.34033377863 -0.4663439859394
+3.786777855717 16.87608592088 -3.3934e-14
+3.678030541733 14.59326210826 -1.384109253884
+3.687649108481 14.51552803373 -1.361041322044
+3.657124013804 14.53965760428 -1.395756575646
+3.729743189187 14.58101339413 -1.332469829041
+2.497320230045 16.9603827111 -0.1403963911459
+2.506732500517 16.96897831491 -0.08403604544558
+2.53750704085 16.99547173756 -0.1440873773493
+0.08797469930463 14.56193023791 -1.897075346426
+0.05553227954038 14.55278051987 -1.965930591026
+3.454586736446 17.02431825413 -3.3934e-14
+3.53179498834 17.02102402716 -3.3934e-14
+3.492572655366 17.09161636745 -3.3934e-14
+3.431929616514 17.10072403929 -2.037735349568e-14
+2.379123151245 14.67256547107 -2.587165976625
+2.322680729348 14.67463232413 -2.587532454679
+2.318584094449 14.74576462863 -2.600081804982
+3.736197640279 13.5630323148 -0.3669003768112
+3.655018516903 13.55665562936 -0.3546183279288
+3.692769862051 13.55802071549 -0.4174691523239
+4.602538143121 15.23847648425 -0.6796534730826
+4.604046292985 15.25165320783 -0.60494152143
+4.651402827686 15.24287894526 -0.6547485622369
+2.929734184049 13.43700970429 -1.061074988945
+4.781363733361 16.18372185516 -0.2586278840184
+4.813748858052 16.13131852444 -0.2487351441137
+4.754734284972 16.13245957782 -0.2501303770401
+3.44896970065 14.97200596905 -3.3934e-14
+3.467957293808 15.05279694385 -3.3934e-14
+4.594086516952 17.46320512026 -3.3934e-14
+4.573697521782 17.40603710232 -3.3934e-14
+4.114660406156 17.73827206836 -3.3934e-14
+4.167954892681 17.67572167778 -3.3934e-14
+4.200931654012 17.71689597237 -3.3934e-14
+1.088780404335 15.32760678823 -3.3934e-14
+1.156265941877 15.38980410855 -3.3934e-14
+1.065387229859 15.38896990618 -3.3934e-14
+3.829782123492 13.7629321124 -0.5224648985067
+3.786832269424 13.74360514747 -0.5424727597622
+3.831990729687 13.81346795094 -0.5301971123919
+0.5900361533454 14.64321941901 -0.4137383221872
+0.6261126792453 14.63164928154 -0.4715500417277
+0.559351831122 15.27964579646 -2.184158397612
+0.5512534467179 15.28758065537 -2.127747944579
+0.607519128369 15.28520485241 -2.144611910948
+1.801828808502 14.27968071879 -3.36738e-14
+1.752376253865 14.21597778434 -3.36738e-14
+1.814917607357 14.22271934614 -3.36738e-14
+1.355643229681 14.01083541636 -2.470489571965
+1.343298044395 14.07681853779 -2.482124012414
+1.401249025982 14.07058229787 -2.481020210025
+2.4279 13.11510097418 -1.50393795664
+2.4279 13.09536677108 -1.558780782517
+2.4279 13.14412784804 -1.590710888929
+2.970089543987 13.88027390593 -1.400100893692
+2.99214753254 13.85309904132 -1.35692516897
+2.971733208283 13.8023841616 -1.383253505677
+2.951153225738 13.83666724248 -1.428894054073
+1.3285 13.36258403278 -1.967729969899
+1.3285 13.35757499329 -2.025198775218
+1.3285 13.29115880587 -2.001860215041
+3.282381790884e-07 15.40144350659 -0.9234202916762
+0.05205576464112 15.40910420902 -0.9099018181462
+0.05058030706425 15.40522465162 -0.9731405352551
+3.395280737788 14.10067691429 -3.36738e-14
+3.420264492468 14.17038318781 -3.36738e-14
+3.356577410073 14.16822875844 -3.36738e-14
+3.834435251757 15.94244382485 -0.4194273855131
+3.785969933198 15.9493847382 -0.4422340968933
+3.809698143799 16.01141677608 -0.4423198397477
+2.754648359989 13.36760432612 -1.514408361099
+3.272615422183 14.70767829972 -2.060789356678
+3.249779741027 14.67041202793 -2.128761099056
+3.257026374518 14.72769036054 -2.114561539089
+3.494869735338 16.19549521414 -3.3934e-14
+3.492644438065 16.09681077599 -2.034473783928e-14
+3.544475156461 16.13659438337 -3.3934e-14
+3.562428221284 16.21448954271 -3.3934e-14
+3.766646269103 17.6834641328 -0.2252493637203
+3.804173417267 17.69611559716 -0.1339705313564
+3.835116767449 17.7052944872 -0.1773501419211
+3.753270241111 17.68021757686 -0.1428953934478
+7.78e-18 15.1036563676 -2.017703345888
+7.78e-18 15.07081635319 -2.062525304109
+7.78e-18 15.03960798555 -2.012411778618
+0.5730963704324 15.39789345759 -1.319857502438
+0.5402063254005 15.38286965352 -1.369184375529
+0.5245817745119 15.40171518375 -1.306435454141
+2.082242353838 13.48325689299 -3.36738e-14
+2.007204228634 13.48558221791 -3.378298395636e-14
+1.167267016053 14.65505801662 -3.3934e-14
+1.10699767638 14.59705914401 -3.3934e-14
+1.229811599827 14.66516745119 -3.3934e-14
+3.169318495618 14.94539696529 -3.3934e-14
+3.123775500893 14.99878180475 -2.675356131435e-14
+3.115943716096 14.94281453406 -3.3934e-14
+0.7310276701711 14.54550073811 -1.25339163715
+0.6672044246552 14.57122036048 -1.247941162934
+0.6764261788445 14.56199109866 -1.315723116936
+1.472424113459 15.91431363461 -0.139581360953
+2.570324662548 15.3045986869 -2.001663576344
+2.482052259684 15.30010824977 -2.035702776445
+2.929603669078 13.58032981706 -3.36029420172e-14
+2.90667277756 13.52794552033 -1.732597308955e-14
+2.974741961662 13.54522319557 -1.991505903529e-14
+2.819063743019 13.54700931574 -1.686086619279
+2.833873072781 13.51733459383 -1.639209358422
+2.812158879681 13.48133450391 -1.694353240467
+4.012853324168 17.74946468583 -0.3804586573225
+4.040967935795 17.7545916974 -0.4425177041234
+3.970210546012 17.73779788391 -0.4370388245208
+0.008461695380792 15.42083192942 -0.663374442118
+4.051481306584 13.89464642867 -3.381989718866e-14
+4.089322097054 13.85708329251 -3.372915963677e-14
+0.3109834682077 14.55344490108 -1.960716790406
+3.896540040645 14.33374703789 -1.059808968941
+3.940582310771 14.34603590454 -0.9900337234725
+3.866827063613 14.34547275165 -0.9932496535639
+2.465182869008 15.32084368782 -1.873306525258
+2.514014610316 15.32420062903 -1.845852640731
+0.9226817967684 14.6164546549 -3.3934e-14
+0.8556656015252 14.63998724545 -3.3934e-14
+3.424014144921 15.51759352308 0
+3.483402199114 15.51946838565 0
+3.464187587336 15.57569342264 0
+1.022253225277 14.40390230867 -0.08655765454974
+1.017298798433 14.40863702056 -0.01387396816437
+1.054650329212 14.37089613114 -0.05532320966295
+4.095079641102 14.00609956509 -0.4448168481128
+4.04839498279 13.97374619779 -0.4568661044597
+4.053469630152 14.05461523048 -0.4689989184764
+1.313628513697 13.72780174482 -1.841392822174
+4.140309619791 15.57823006851 -0.5380815790127
+4.064346325133 15.57274089991 -0.5692353348966
+4.074015343067 15.58334559549 -0.5089830216394
+4.509642702444 14.33011467645 -3.3934e-14
+4.508873873562 14.39775267206 -3.3934e-14
+2.007618841604 15.10825265322 -2.663987917966
+2.076905324229 15.14807718726 -2.671012814697
+2.060154503863 15.06468320218 -2.656302432081
+3.387467312813 15.88686795652 0
+1.468750183524 14.29269579035 -3.385883713046e-14
+1.482267114917 14.34514955976 -3.386800544801e-14
+1.400199518486 14.33342748025 -3.3934e-14
+1.313566994367 13.82941824801 -0.7755268249093
+1.316978716385 13.80925884495 -0.7241293892817
+1.30320994913 13.88309692156 -0.7670965588036
+4.404103266052 16.22446739239 -0.3011059752465
+4.482865159051 16.23019382247 -0.290137989604
+4.444894171595 16.19631381278 -0.2895530045079
+0.2142041729713 15.42700631008 -0.7323048677821
+0.2071712188115 15.42391771671 -0.7842333572018
+0.1570610738981 15.42117644723 -0.7688376212664
+0.2602472136211 15.4296783552 -0.7687025740765
+3.382782869058 15.36852243653 -3.3934e-14
+3.350969216668 15.32797780137 -3.129576297661e-14
+3.431966034831 15.33354305705 -2.783362245354e-14
+3.430087005829 15.38583603336 -2.446461356908e-14
+3.869000320516 15.98332624119 -0.4122794123027
+3.84131645637 16.069726438 -0.4389620589086
+3.599369429467 13.63982960794 -0.6450826975483
+3.657914512667 13.6980254918 -0.6147064630428
+3.643141681372 13.64679833297 -0.6154443827105
+0.5516657817487 14.51508116787 -2.046544631953
+0.5090585654875 14.51691259314 -2.099203645919
+3.036100497582 15.08781009962 -1.534253427917
+3.108223623642 15.08879321794 -1.52859587857
+2.253109993509 13.86484575928 -2.444751952739
+2.266457152504 13.933758063 -2.456902352468
+2.31864505532 13.87723346362 -2.446937058506
+2.218956670099 13.91019428869 -2.4527487334
+2.186399091723 12.802359076 -3.36738e-14
+2.189862125911 12.86232184181 -3.36738e-14
+2.142171041782 12.83871226437 -3.375905993643e-14
+3.732229774415 15.69880681047 -0.4227063336362
+3.714292568572 15.64719038075 -0.422649558326
+3.673473581809 15.69087295471 -0.4509386827641
+4.641224364401 16.73365391839 -0.3618650739536
+4.694837524479 16.74386387341 -0.3604157696714
+4.695342600036 16.68759653376 -0.3504605943332
+3.654101517503 17.49642857532 -0.540443686981
+3.598693391587 17.46035352869 -0.5468062553743
+3.583336135836 17.51006292765 -0.5380452560609
+4.761721139688 15.61662972482 -0.3203874857065
+4.695490084943 15.6119334527 -0.3470436298761
+4.672707526231 15.62206015749 -0.2895743163294
+4.636630093768 13.77436783307 -3.3934e-14
+4.669328614115 13.81232054716 -3.3934e-14
+4.591938394648 13.80143900286 -3.3934e-14
+0.6406160302516 14.50264199654 -1.956776901778
+0.5886350128011 14.51622220672 -1.971147759605
+0.6450255045527 14.49360015629 -2.011473990362
+1.476507443268 13.03361724433 -2.298180479022
+1.404000012818 13.03226784909 -2.297948020128
+1.433437495398 13.08207975432 -2.306729358531
+2.849546720437 13.78344123592 -1.643196191971
+2.832345732835 13.74722710157 -1.684051268631
+2.829154412087 13.82406902118 -1.706570634763
+2.414716860701 13.77630997253 -2.429138239318
+2.364919645707 13.78192909548 -2.430126229022
+2.369549166594 13.84265641732 -2.440838507763
+2.313971172564 13.81623034446 -2.436179145923
+1.3285 13.32268869605 -0.4055734675357
+1.3285 13.37301581517 -0.4518803937863
+2.017764116468 13.4159387906 -3.386737404703e-14
+2.03267576796 13.36644015465 -3.3934e-14
+2.087522560653 13.41366129739 -3.36838598746e-14
+2.828195870907 13.59776484292 -1.669363421746
+2.811479109319 13.64808808613 -1.725988214603
+2.83751688169 13.6444954004 -1.651398903177
+1.184267310047 14.18513546512 -0.6495680468913
+1.168296355745 14.21377710075 -0.6029638541088
+1.158366331518 14.22644887006 -0.6790588478511
+1.387904944208 12.84990111479 -1.062640263851
+1.428945795171 12.8091282508 -1.084948096324
+1.396240439125 12.84163929573 -1.008313572738
+1.395918131869 12.8327869313 -1.121068989555
+3.926880281282 13.70677105184 -3.3934e-14
+3.92876781025 13.75857272601 -3.3934e-14
+3.878965249392 13.77294913534 -3.3934e-14
+3.56440786379 15.92796384512 -0.5520278463512
+3.532959615394 15.97349202436 -0.5785765273917
+3.579423039808 15.99726665991 -0.5555573454197
+2.4279 13.21013702871 -1.305529014641
+2.4279 13.26345164836 -1.280507576422
+2.257695418822 15.54118413744 -3.3934e-14
+2.262793265027 15.4767867931 -3.3934e-14
+2.310085345905 15.51530749677 -3.3934e-14
+2.953026295999 15.37929583214 -1.389758569135
+3.011305508532 15.3798415115 -1.38988068381
+3.001263237377 15.36957610888 -1.446241346066
+0.8099887813253 14.83338267482 -3.3934e-14
+0.854858476958 14.85809978364 -3.3934e-14
+1.59051943705 15.30605613148 -1.990587446009
+1.64487064479 15.3041379419 -2.00576713827
+1.919077483852 12.86270163132 -3.3934e-14
+1.954757013372 12.79999230996 -0.001867342823221
+2.846860160942 13.40601369698 -1.278712826967
+2.854072752081 13.40219876208 -1.329493580952
+2.915713526579 13.41520446486 -1.28745531036
+1.797458326404 15.34411198496 -1.671858087748
+1.86945442569 15.35104531207 -1.607057879366
+3.416923552996 13.7105128278 -0.8046885097962
+3.415119526324 13.65636060587 -0.7967389989061
+0.6647272061515 15.15246424574 -3.3934e-14
+0.6267505139364 15.18929626096 -3.3934e-14
+2.725703658478 13.44807744189 -0.1191092896225
+2.697405663754 13.4439704226 -0.04746035198569
+2.678166830588 13.44068548356 -0.09677746697248
+2.551889887447 15.40534190481 -3.3934e-14
+2.562673960607 15.3308319665 -3.3934e-14
+2.614321412573 15.36082285965 -3.204805820408e-14
+2.636801718591 15.43413231711 -8.362585416719e-15
+3.102539913091 17.12149653901 0
+3.137313582869 17.15916677375 0
+3.06768857825 17.19508719402 0
+4.052512933468 17.05578886765 -0.5339417952416
+4.005186553092 16.99873385691 -0.5397129553713
+4.003856007783 17.04923494832 -0.5491022304399
+1.86520774771 12.74707717226 -1.163080957198
+1.935034558313 12.7429503027 -1.206531438238
+1.926676405529 12.75009138024 -1.128356563592
+1.887814402921 12.74133103507 -1.223549589009
+1.004374224073 15.63221532896 -0.652689751829
+0.9835875997646 15.62533140173 -0.6066640816998
+1.039024335637 15.64977868015 -0.601980476131
+1.068642785193 15.66183216044 -0.657279601233
+3.752886697782 15.14033591975 -1.236109955787
+3.693034026129 15.1398368289 -1.23901326517
+0.7775235232719 15.55017604467 -0.5218437287516
+0.8248172216624 15.56827799408 -0.4720470480111
+0.8483623789665 15.57481424019 -0.5275393379281
+4.681864250776 15.52997268246 -3.3934e-14
+4.638888474407 15.49341767811 -3.3934e-14
+1.43265942922 13.70292625695 -2.416192344653
+1.360491028832 13.7229426981 -2.41972770366
+1.410998034912 13.7633640475 -2.42685595542
+2.473368099384 13.21120017316 -2.280748341608
+2.492678765912 13.22237438141 -2.235736389978
+2.428576358724 13.20703048144 -2.258384214061
+4.33282805563 15.72274379787 -3.3934e-14
+3.485349314987 15.9340001589 0
+3.508433461636 15.87447142906 0
+3.547681440117 15.92636811234 0
+0.7341449807405 15.54520836798 -0.04251935053066
+3.409713278728 16.38319379244 -0.7293313605506
+3.361923633957 16.34905870009 -0.7427597708549
+3.368899471868 16.42288725591 -0.7297448887787
+4.017612151899 13.58764953797 -0.03096554881465
+4.065899703267 13.62341378287 -1.103933227843e-14
+4.015292090496 13.63935264124 -1.73499333049e-14
+3.966315438569 13.61894516118 -1.154122462116e-14
+3.060863350205 16.33314254795 0
+7.78e-18 15.34111827113 -1.561386977066
+3.485371809647e-08 15.30254310356 -1.503595480848
+4.081994470894e-07 15.35268774288 -1.49412157355
+4.054086983242 14.40943396745 -0.630297390755
+4.110423780576 14.40844677269 -0.6359663679202
+4.094168385326 14.41785686226 -0.582542038922
+1.3285 13.22842723318 -1.250954792125
+1.3285 13.17501470191 -1.224947339192
+1.3285 13.1927083398 -1.174641359129
+1.36751732462 15.83333972208 -0.5343183391756
+1.385607253709 15.84313444852 -0.5881537124449
+1.307928359758 15.79398654483 -0.5843349576989
+0.6679798204443 15.5245706424 -0.2203530517669
+0.6021296756677 15.50768710422 -0.2026210309074
+0.6504964148864 15.52034854773 -0.1524396919684
+4.195383684693 15.9164804831 -3.3934e-14
+0.647711012935 14.46970867663 -2.169775874412
+0.5743766739059 14.49013623963 -2.17823569035
+3.778146330634 14.31424537614 -1.170356517847
+3.748218289033 14.32221471857 -1.125167783675
+3.722120833196 14.31395692928 -1.171985983145
+4.800644289057 15.86566807972 -9.384083757358e-15
+4.797632539778 15.79015930225 -1.042102267838e-14
+4.8279 15.8656043289 -0.04553562719951
+4.827024993381 15.9233529522 -3.012629321749e-16
+1.78125269413 13.24608369137 -3.3934e-14
+1.729842356622 13.22460930089 -3.3934e-14
+1.780520238339 13.16394065907 -3.3934e-14
+4.665592756838 16.99185023246 -3.3934e-14
+4.692085923175 17.04218312386 -3.3934e-14
+1.652900300099 16.05961539296 -0.08802728262279
+1.623422383843 16.03395414235 -0.04848944173446
+1.67845520337 16.08271924678 -0.02500221466352
+1.728428158088 14.87644482596 -3.3934e-14
+2.971908815194 14.08361522117 -2.478531165095
+2.910331964203 14.10327116231 -2.486780561476
+2.956263426506 14.13667879111 -2.492671641518
+3.017851385645 14.12806891203 -2.491151257413
+3.559948489622 15.71091670425 -0.5162504360412
+3.555713101948 15.62139442487 -0.5030080943704
+3.519116604437 15.67630602422 -0.534700035842
+3.595557788543 15.67553878585 -0.4900605434793
+2.920825648455 13.97991630487 -3.36738e-14
+2.968545716851 13.95323003434 -3.36738e-14
+2.973849149991 14.01130421166 -3.36738e-14
+0.9195539960505 15.12277500514 -3.3934e-14
+0.9794436877884 15.05538946522 -3.3934e-14
+0.9736171732003 15.13738899055 -3.3934e-14
+1.924101100435 15.22516837235 -2.535937782294
+1.973581859772 15.22277178293 -2.550324298895
+1.967488658324 15.21426317091 -2.600837044443
+2.13873041911 14.51542674816 -3.3934e-14
+2.070356548316 14.49326079087 -3.3934e-14
+2.119996405514 14.45667715784 -3.3934e-14
+2.4279 13.02259610554 -1.156204579048
+2.416508689803 12.94415112965 -1.135063840228
+2.423733733666 12.97387397363 -1.202307267941
+1.609604831664 15.29915231708 -2.04293609646
+0.2949270396374 14.56130272124 -1.901702403432
+0.2437761473462 14.56443059641 -1.877444832636
+1.106014870918 15.68143788532 -0.600291759254
+2.787842356038 15.12364361628 -2.049182933892
+2.783229815665 15.21258992896 -2.080520715607
+2.796936340277 15.1973393721 -2.03353653347
+2.77412336436 15.13327176639 -2.100622101541
+2.738178617997 16.09998883261 0
+2.805829548079 16.07788276845 0
+2.54080037676 13.39736018047 -0.7493728822456
+2.566864202291 13.40471093499 -0.6954637510309
+2.506299010175 13.39440740076 -0.6945820695327
+1.266046398477 13.8269742579 -2.37466570402
+1.286521642307 13.76089203216 -2.411722972912
+1.28688315906 13.77392719314 -2.329226599075
+1.300244896737 13.71435726567 -2.360054219467
+7.78e-18 14.97664931814 -2.257738271089
+7.78e-18 15.01954352942 -2.293031615585
+1.862052223536 15.88660818837 -0.8309917713468
+1.902088298867 15.94157413642 -0.8171010430389
+1.91927426418 15.88854897979 -0.8302053343346
+1.8905291547 15.8272731682 -0.8530261735277
+3.700551849903 15.77060501808 0
+3.704373220639 15.7154984578 -9.654033343769e-15
+3.758074825523 15.74496945864 -1.702831771882e-14
+4.805383817798 15.21240471547 -0.8274845153695
+4.760675278688 15.22196498525 -0.773421718863
+4.8279 15.22323301863 -0.7512346251017
+3.82992786294 14.37420602783 -0.8301482557681
+3.896182758698 14.38486893659 -0.7696834156286
+3.832198865875 14.38511016021 -0.7683094177605
+3.192315287072 14.90556211209 -2.491180110301
+3.187750995999 14.86962151277 -2.563652907181
+3.158667869813 14.91192150869 -2.531875025176
+0.788249183458 15.04927462631 -3.3934e-14
+0.8420558661059 15.05865478903 -3.3934e-14
+0.8033598882961 15.10176094023 -3.3934e-14
+4.180106349466 15.4310592093 -0.6621958471377
+4.137514519216 15.46013985045 -0.6811202710091
+4.187453562362 15.48428263491 -0.6692145884695
+2.128099458997 12.67069708858 -1.814378383853
+2.163145838229 12.67956710291 -1.751649120741
+0.9895567640599 14.62603096696 -3.3934e-14
+1.010860602372 14.69014113367 -3.3934e-14
+0.9439856350809 14.68056482161 -3.3934e-14
+0.07913382880992 15.04566296678 -5.980722380308e-14
+0.2388056186374 15.3949393914 -1.264982052882
+0.1527231399041 15.38887307403 -1.254373042298
+3.711249743199 16.53190559545 -3.3934e-14
+3.658373172145 16.56944491785 -3.3934e-14
+3.675321306054 16.48730448557 -3.3934e-14
+1.512366001433 13.66425930098 -2.409379028126
+1.548716226583 13.70134681693 -2.415915640352
+1.570423117542 13.63644088745 -2.404470121874
+2.753014427334 14.97687864821 -3.3934e-14
+2.703890852949 14.9327251027 -2.662435182307e-14
+2.758366801674 14.92152050423 -3.3934e-14
+2.709945844161 13.28990861458 -2.04376441644
+2.718308507599 13.3452932468 -2.098569471168
+1.326113505668 13.68983351654 -1.095177966642
+1.327511010463 13.66484065262 -1.049798186016
+1.325820588643 13.70207367269 -1.01378755638
+1.322408766062 13.75099993178 -1.058024093206
+4.8279 14.84577837429 -0.3939949165429
+4.8279 14.77178778195 -0.4002014111792
+4.827899999687 14.81158853755 -0.4305433880861
+2.633707914916 13.37477579084 -1.257775357531
+2.718314085833 13.38559634104 -1.287314304317
+2.678585043906 13.38560700257 -1.220392963654
+0.2268448668145 14.53059699303 -2.1238207117
+0.2130240017994 14.53797824131 -2.072419724529
+1.973680086992 16.25549540733 -0.7592525861349
+2.056370939609 16.26968683285 -0.7567564400392
+2.019630231974 16.21938568121 -0.7656211476951
+-4.391303799148e-15 14.92231779614 -0.4917116341323
+-4.538902033046e-15 14.94877953437 -0.429640727708
+3.15829724478 14.64894049585 -3.3934e-14
+3.17280851619 14.70643550859 -3.3934e-14
+1.579071526627 15.10998692079 -3.3934e-14
+1.533620797982 15.1661139631 -3.3934e-14
+1.512543712426 15.11363225483 -3.3934e-14
+2.339233592391 12.852670361 -0.5057803343095
+2.328196036855 12.8476187454 -0.4433799644744
+2.282827940948 12.81698834576 -0.4600866255987
+2.287323529095 12.81777738013 -0.5171371746422
+2.625699520989 16.76500695131 0
+2.695651212601 16.7561941684 0
+2.670374809807 16.81647056117 0
+3.643991151812 15.5451352628 -0.7256522509944
+3.600925546054 15.55010783961 -0.6973868992677
+2.704523988176 13.5376048459 -2.315750675267
+2.707170366627 13.58675150806 -2.266804984361
+2.708779006224 13.51603127806 -2.23080658345
+2.607932818364 16.83578733543 0
+1.863848371558 14.1296167547 -2.491438996483
+0.9543522138026 15.04001642714 -2.651961054419
+1.004015206739 15.00259114078 -2.645361627342
+0.9408691413042 14.98970608536 -2.643087381315
+3.306571222548 13.56404336824 -0.8858442769383
+3.27621407209 13.63823505972 -0.9312089248323
+3.319632101828 13.62814672708 -0.8832544172862
+2.796230371761 14.70438597359 -3.3934e-14
+2.846411041411 14.72089512121 -3.3934e-14
+3.513875912023 14.59230413325 -3.3934e-14
+3.564331646949 14.57783465371 -3.3934e-14
+3.566942088663 14.64265778649 -3.3934e-14
+3.309835930367 15.49456510206 -1.012547351641
+3.362466013173 15.50220974975 -0.969113657777
+3.400213060609 15.4938548578 -1.016551914402
+3.122556858746 15.51971120245 -0.8698377255979
+3.1507413341 15.5293562398 -0.8152989376747
+3.185019512163 15.51821201496 -0.8783197107563
+4.526057120897 16.67657730051 -0.3628152433106
+4.8279 15.21223859852 -0.1651006000315
+4.8279 15.15837088376 -0.1741216142964
+2.4279 13.36037566267 -0.2845565205253
+2.4279 13.32527238905 -0.2189652307501
+2.4279 13.27915412758 -0.241519339864
+1.750073225336 15.50369697022 -1.106454794661
+1.800617873065 15.53677569775 -1.06422154269
+1.126704315082 15.2981423655 -2.050405930747
+1.142426212188 15.28605368837 -2.138699216829
+2.193721512058 12.76773276722 -0.9508876323841
+2.249663465662 12.77473140368 -1.003448211043
+2.275257297616 12.78624759765 -0.9316608127295
+2.219020167551 12.77808669499 -0.8767292435974
+3.172740659956 15.93815763761 -0.8177628930648
+3.232256073186 15.96307030904 -0.7868352206674
+3.222137364864 15.89365801179 -0.7830588008692
+3.169305117627 15.86721836004 -0.8227984448163
+2.144794347732 13.149347526 -2.318586120851
+2.166101749255 13.22377428384 -2.331704915417
+2.115571250016 13.2198378158 -2.331013800279
+1.436775607952 15.29443931739 -2.077640875369
+1.459135256177 15.28659955684 -2.134592256508
+2.4279 13.15626940456 -1.330809987082
+2.4279 13.1752097987 -1.258109507665
+2.121088459058 14.55788998219 -2.56695161384
+2.18887516556 14.5891213702 -2.572457531736
+2.956501789406 15.18759997933 0
+2.896232262718 15.20445001604 0
+2.916763081235 15.15339912845 0
+3.033782291744 14.93075498965 -2.42485604997
+2.961742179901 14.92991569918 -2.429602903651
+2.992094720268 14.94050855666 -2.369578878383
+3.473770575516 16.2464660172 -0.6635682264961
+3.452745367229 16.29307333331 -0.6848778548537
+3.495928569126 16.31134125384 -0.661366024058
+0.1248020386636 14.62228936704 -1.35496617379
+0.1035855463979 14.61722204333 -1.408580969614
+4.289578547561 15.21857273509 -0.7927056809684
+4.201742056224 15.22031649174 -0.7828300343456
+4.272289005124 15.22889684792 -0.7340568104946
+2.063051947778 13.28498048322 -3.3934e-14
+1.794870113505 12.79999199432 -0.001943987336492
+1.846899956577 12.80910826522 -3.3934e-14
+1.807356911503 12.84900844318 -3.3934e-14
+1.752035545842 12.8587666764 -3.3934e-14
+1.843528460003 15.77987894343 -0.8737505822284
+1.86193885126 15.72222056631 -0.905760392745
+1.810101661108 15.73906475841 -0.8954035430795
+1.3285 12.93948980026 -2.241520072231
+1.3285 12.9499943861 -2.153248507286
+1.3285 12.99224685366 -2.225794328349
+0.9658192998983 14.45343807223 -0.2355937201453
+0.9210213777078 14.48767804079 -0.198284086438
+0.9377188222766 14.47363585181 -0.2936768580159
+2.534001501914 15.69673386407 -0.9219750577778
+2.533804634685 15.74426480321 -0.8934697599339
+2.594573564104 15.71945374677 -0.9072503800173
+2.590549350562 15.67220364461 -0.9396338542115
+2.613216928535 16.51148924015 0
+2.55813316613 16.46635243414 0
+2.61111571349 16.45787372208 0
+4.299190163373 15.74960501935 -0.2376672590849
+4.363519160076 15.73716692812 -0.2222331199322
+4.308668125427 15.66057435889 -0.2199955359956
+4.8279 16.77820293877 -0.3154006477892
+4.803620872283 16.75762865296 -0.3593753997115
+4.8279 16.83352988045 -0.3687281961998
+4.814848188537 16.70329720283 -0.3495659463119
+2.438439565893 13.39629953371 -0.3358137669563
+2.491022645633 13.40381185491 -0.4003626516097
+2.495423991039 13.40693951854 -0.3099588199481
+2.722980669398 15.15793964102 -2.351151921672
+2.733894747156 15.11861516949 -2.276990669167
+2.722062595616 15.08226705862 -2.342832929481
+0.8048943510774 14.40184211642 -2.166276601653
+0.7944852020643 14.41595668073 -2.109277384421
+0.7252710726871 14.44193475869 -2.157030337335
+3.774325450573 16.70484725384 -0.5806812851303
+3.806422051741 16.6366536037 -0.5538944970737
+3.722434658913 16.65840135591 -0.597117160521
+3.816145886631 16.68637117286 -0.5584015101135
+3.600595814582 14.22814129984 -3.389788410753e-14
+3.612145879694 14.28026756422 -3.381297882842e-14
+3.554678990241 14.25538458681 -3.371626477244e-14
+2.087770474554 12.79841129567 -0.1990407957941
+2.049151909836 12.79773947319 -0.2352871114351
+2.130611346429 12.79744794615 -0.2510156430061
+2.655366377912 16.71846032367 0
+2.684823800992 16.66920372723 0
+2.774308951487 13.38817254658 -1.348908866667
+4.796407351724 16.21632752315 -1.084285233951e-14
+4.790707394408 16.1298833391 -1.280533561455e-14
+4.8279 16.17084094671 -0.001446004443599
+-4.36436e-15 15.25215747076 -0.3161610057948
+-4.36436e-15 15.30278652453 -0.310960475866
+-4.36436e-15 15.29529717434 -0.38787776987
+3.851416667083 14.98231357289 -3.3934e-14
+3.829201822394 14.93263080213 -3.3934e-14
+3.901848790731 14.96185683956 -3.3934e-14
+3.150847565727 13.64687304117 -1.081937016149
+3.163091170263 13.6039281149 -1.058665433411
+3.12341184284 13.60155241959 -1.110243977512
+4.510131485211 17.38298635045 -0.4894786412025
+4.47841493516 17.44941799805 -0.505277405234
+4.541052175664 17.43570800092 -0.4949742159474
+3.346386408726 14.81672696062 -1.895833325678
+3.358768547649 14.77539164856 -1.861862846892
+2.093793264996 12.79641499709 -0.3020124336769
+3.342498988889 13.58885608292 -0.8536260425145
+3.366284230555 13.64476104087 -0.8404282801944
+3.500065561288 14.29853536423 -1.259425779377
+1.357703924048 14.70973162844 -3.3934e-14
+1.300859599858 14.75890664897 -3.3934e-14
+1.289889244668 14.68543407712 -3.3934e-14
+4.002435392321 13.74963781799 -3.3934e-14
+1.429590111774 15.03886730797 -3.3934e-14
+1.49466726987 15.01015436352 -3.3934e-14
+1.478938726966 15.0681429353 -3.3934e-14
+0.04805778664655 14.68429277556 -0.136111691511
+0.1032437010175 14.68437921843 -0.1290475143224
+0.0667636073118 14.68472231953 -0.08788713152765
+1.652235477484 14.59432940516 -3.3934e-14
+1.58139362939 14.59359132804 -3.3934e-14
+1.612959417885 14.53016646544 -3.3934e-14
+0.2668488922364 14.68304450994 -0.2353898477016
+0.3112246343467 14.68366319617 -0.1930048164062
+0.275028893892 14.68424054708 -0.1434506523303
+2.907993771046 13.9931867074 -1.543822925401
+2.882465059877 13.93934849375 -1.589982728001
+2.994806000389 14.22357652229 -3.36738e-14
+0.5300683966637 14.6283912951 -1.022754246728
+0.5691026924942 14.61528420265 -1.068464216186
+3.038659328462 14.9112634835 -2.535345497334
+3.082308995336 14.91773300283 -2.498601280815
+3.088033559632 14.90892939132 -2.548719724946
+1.039028380537 14.22306326713 -2.174686755352
+0.9741636228907 14.28128040762 -2.187052183007
+1.009551265149 14.24133997283 -2.234931793383
+3.293676553832 15.48610407806 -1.060696288097
+3.103452041814 14.93174613912 -2.419051316413
+3.173029957896 14.93265917854 -2.413806405564
+3.148196084512 14.92325977188 -2.467327321927
+4.542745128511 15.82996225714 -0.2115668780728
+4.47141673536 15.83998009792 -0.2227848217346
+4.526067489709 15.89464181199 -0.2250547322917
+2.38219408555 12.91346292677 -0.1391200269649
+2.401886959809 12.9418912756 -0.1897351784897
+2.851294070677 13.84193076277 -1.649217701404
+2.879327842859 13.80090505681 -1.573261344566
+2.336173639855 16.44717249447 0
+2.260052184506 16.44166071837 0
+2.281913220937 16.39125628016 0
+0.2923175935777 15.404071396 -1.222951043825
+0.3086030151907 15.40246817841 -1.271035950562
+2.98341502725 15.58133747 0
+2.925147104977 15.60183799921 0
+2.927674400627 15.54830666255 0
+1.3285 13.2100317003 -1.591512861059
+1.3285 13.16044308657 -1.569566084882
+2.056365306176 16.4923635113 -0.2057332240685
+2.024518832283 16.45576963215 -0.123878526072
+2.077911447463 16.51823742045 -0.154647877349
+2.018007329034 16.44757028862 -0.1894347327357
+4.74533037866 14.40386632068 -0.6618560636762
+4.695604204646 14.4086667342 -0.6347437605818
+0.5814952246308 15.07247422185 -2.657685648705
+3.425203195427 14.35562016628 -0.9354948006219
+3.409450178768 14.28913550695 -0.9133220166393
+3.372718789856 14.32540436536 -0.9541987828803
+3.425899775321 14.34262879248 -1.009373552201
+0.9436682664126 14.41736579386 -1.258201645594
+0.961908625568 14.39630551755 -1.34129262287
+0.9783344672772 14.38676736004 -1.283900079591
+0.9042031244081 14.44479293535 -1.280307609052
+4.438942479459 14.38389798597 -0.7753464125856
+4.500951289036 14.39206274583 -0.7291303067105
+4.429920489308 14.39920546529 -0.6885432098777
+3.745666702947 17.43677127821 -1.391585971931e-14
+3.76058023371 17.38214110208 -3.3934e-14
+3.811935819132 17.42174782493 -2.727768949713e-14
+3.796194958102 17.33811314561 -3.3934e-14
+3.170791357698 14.15868109719 -2.052722087806
+3.106827543423 14.16779898089 -2.00102273191
+3.078896524699 14.15591695862 -2.068312467737
+0.7785741218403 15.53895000277 -0.802183107134
+0.8361720945997 15.5564336198 -0.8469765120709
+0.7927418083675 15.53998413434 -0.8680230517612
+0.7472457730916 15.52673365349 -0.849201051381
+2.975848312337 15.3763179442 0
+2.908852013113 15.32896644327 0
+2.967859242719 15.29807108805 0
+0.8966335396934 15.5072836541 -1.102536512596
+0.8421187513605 15.53528977086 -1.067750993822
+0.9087851326513 15.5534663907 -1.045358330905
+1.442968124477 13.14371231572 -2.317589763434
+1.500530150065 13.09561241688 -2.309110509826
+1.503163365439 13.16300768043 -2.32099208277
+3.202970891131 16.28026661947 0
+3.26538054068 16.23883390455 0
+3.271105464794 16.3051493771 0
+1.3285 13.33381465056 -0.7913469000492
+1.3285 13.27525494196 -0.7930604171203
+1.3285 13.32828999335 -0.7405448901723
+4.308699724774 17.81104532269 -0.06772484727089
+4.240501060332 17.80000064221 -0.07404939190975
+4.254069686147 17.80241586237 -0.005358536231775
+4.609262943993 17.84278528936 -0.1020286459777
+4.587367143138 17.84159437323 -0.0497140655926
+4.644281029253 17.84492685966 -0.05754333640185
+1.882135957924 12.60847336426 -2.205450883236
+1.869156410806 12.62375823375 -2.116314865662
+1.822169912582 12.61711095377 -2.155342394272
+3.393773249065 15.15521116207 -1.152076836673
+3.361881082293 15.16290191516 -1.108527714375
+3.39690220452 15.19763244851 -1.079828086984
+0.4344738320833 15.4082461372 -6.239565412029e-13
+0.4820674575078 15.46789050448 -1.333750493142e-12
+0.4228386184087 15.47143600726 -0.002923038552146
+3.658538408454 13.56125964892 -0.08340323501945
+3.733966678167 13.56749010705 -0.1016351025982
+4.395759760421 14.58981658953 -3.3934e-14
+2.653828496792 16.89252449434 0
+2.693946361471 16.92716813828 0
+3.77409170486 15.898960764 -3.177517862653e-14
+3.926260545335 17.33013080622 -0.5697720323471
+3.951921432765 17.39034086781 -0.5591558251023
+4.000794110998 17.36614951596 -0.5634233975916
+2.368285156697 12.88550605089 -0.4599317624647
+4.234178972506 15.19524783986 -0.9246387704825
+4.199412145372 15.20670484693 -0.8600471117846
+2.4279 13.27489488379 -0.2926802694944
+2.4279 13.21695651553 -0.3203483693092
+2.4279 13.2628441048 -0.3419422958043
+3.229421012596 14.21025814508 -1.760050224781
+3.171498539553 14.2028932373 -1.801686627918
+3.223878290723 14.20098605802 -1.812458358513
+3.874489125551 17.71068492672 -0.4946328433046
+3.818178062164 17.69433051096 -0.4817122485213
+3.799402497804 17.69011327954 -0.4324432164127
+0.8655992105902 14.50789423052 -0.754259442012
+0.8474274990485 14.5222712929 -0.6834918469572
+0.7994273973356 14.54880899539 -0.728704395059
+1.611645290593 14.08796615258 -3.36738e-14
+1.600978926658 14.15690800178 -3.36738e-14
+1.559958194247 14.10566803519 -3.368728991866e-14
+1.26724242343 14.02017896051 -0.4076410400825
+1.254083705573 14.05882419422 -0.3360594792951
+1.236623820674 14.09560315339 -0.3859311227468
+1.275622384323 13.9989034764 -0.3265561570928
+3.485808262542 17.23732245717 -1.168051748629e-14
+3.543346963262 17.29249923008 -2.326426471154e-15
+3.456382295228 17.27951078912 -1.026305763204e-14
+3.472197189815 17.3284559831 0
+1.3285 13.22155340225 -0.3362631832274
+1.3285 13.2720808396 -0.3733491161323
+1.3285 13.21307233691 -0.3977717221158
+3.837747849125 16.81285042242 -3.3934e-14
+3.204973106424 14.26059182668 -2.266843594027
+3.214335028313 14.25035385121 -2.207018841449
+3.205880856919 14.20830132074 -2.251856046494
+3.197562249558 14.22605360384 -2.318141621915
+2.401196726324 16.51434665394 -0.7136151823149
+2.362171755004 16.45754613201 -0.7236323627065
+2.327284102084 16.49401318171 -0.7171960690449
+2.421933313519 14.51910729222 -3.3934e-14
+2.474828718006 14.52704246355 -3.3934e-14
+2.461945287457 14.58232586939 -3.3934e-14
+3.593194560767 13.55259559238 -0.2934073473694
+3.582043752137 13.55001863432 -0.3518098315535
+1.922565306966 13.94629390668 -3.36738e-14
+2.416183538412 12.89589420389 -1.580041622848
+2.417206885582 12.89361227617 -1.638570164725
+1.288782268758 14.70662557797 -2.593170104961
+1.334952760676 14.65191464079 -2.583529280492
+1.27041080646 14.64909500971 -2.58303090882
+3.790351792865 14.64871268007 -3.3934e-14
+3.820332857585 14.70247630658 -3.3934e-14
+3.735998753656 14.70038684264 -3.3934e-14
+3.447762942872 13.5417483063 -0.007907062295355
+3.418393857977 13.53858140769 -0.05662640171667
+3.474305457805 13.54416665014 -0.06605213773494
+2.326524924787 14.41498007892 -3.388168077728e-14
+2.310094600764 14.49224248604 -3.3934e-14
+2.271562845328 14.41932924496 -3.3934e-14
+1.183025471056 14.48989439327 -3.3934e-14
+1.091046462591 14.51596252517 -3.3934e-14
+1.125138412306 14.44598136101 -3.3934e-14
+1.692701601673 14.93556840511 -2.633548930709
+1.732290143544 14.9671810176 -2.639116078152
+1.772939948437 14.93690289471 -2.633783941352
+7.78e-18 14.93184159821 -1.867173743086
+7.78e-18 14.99776819427 -1.844142413118
+7.78e-18 14.99986065476 -1.913944847442
+2.334111350904 12.92600543655 -2.279204714829
+2.254669025479 12.92271677237 -3.36738e-14
+2.264601694356 12.98263235667 -3.36738e-14
+2.21052602963 12.96081579726 -3.36738e-14
+2.325227487708 15.3392763366 -1.715786756048
+2.2549199927 15.3411761781 -1.698717740888
+1.52481814139 15.79992860369 -0.8646162340574
+1.451452536672 15.81700007599 -0.8573001681639
+1.508643822986 15.86438562524 -0.8410493507573
+1.479777844781 15.77846963573 -0.8747769475053
+7.78e-18 14.95202948522 -1.819088789102
+3.398380222435 17.54407474746 -0.132954671156
+3.479210715494 17.57910468296 -0.1414737963637
+3.418278800677 17.5522899177 -0.1796894705704
+3.46379192944 17.57204294166 -0.1933260782474
+2.748494997829 14.01844170007 -2.030017477149
+2.75645748412 14.06891285418 -2.000582866567
+2.758765151039 14.01144860279 -1.979343583318
+1.997369523189 14.54180261132 -2.564109165428
+2.063101528754 14.52096294543 -2.560447078343
+2.826905592863 15.38461492272 -1.360735254145
+2.845813002861 15.37504690234 -1.411177844813
+2.782687503002 15.37845884292 -1.39236364852
+2.791706802095 15.40054094652 -1.30806463922
+4.462818528112 14.40246013045 -0.9146879066282
+4.48741429542 14.48101679068 -0.9232743492473
+4.509329035324 14.42208055189 -0.9081956871982
+4.619901815269 15.64574445643 -0.1717250013524
+4.550684110576 15.65641337557 -0.1801142166525
+4.599159702329 15.69325377396 -0.182018410399
+2.536982613766 16.99372798015 -0.2547469637761
+2.482970930665 16.94536173038 -0.3147166056652
+2.494354387663 16.95670080749 -0.2376372796305
+3.354946202906 14.58616500714 -3.3889725022e-14
+3.305337957783 14.56566546417 -3.385510702735e-14
+3.321378998247 14.51444150232 -3.374758516657e-14
+3.101455665042 15.13881400285 -1.404900864433
+3.149177460232 15.17176842812 -1.345865843383
+3.623197791816 14.2749046871 -0.7396596013745
+3.579709275855 14.2746168315 -0.7713744972223
+3.593676336444 14.35912609859 -0.7760756962857
+7.78e-18 14.98257526802 -2.073314668132
+7.78e-18 15.02969997452 -2.092489616246
+7.78e-18 15.01986433572 -2.142406314924
+0.5294739347416 15.32845959778 -1.810043428609
+0.5424047020589 15.32215000449 -1.86272297062
+0.4888610330842 15.32082379973 -1.873375038543
+2.020118915533 13.87196306748 -3.36738e-14
+1.967005773041 13.82817709231 -3.36738e-14
+2.038642941686 13.79804675424 -3.36738e-14
+7.78e-18 14.58214962328 -1.749170278891
+7.78e-18 14.63688158576 -1.708771082552
+7.78e-18 14.62284377464 -1.647856313203
+3.612931421448 15.95862391776 -0.5303008080149
+3.665189983924 15.95603193061 -0.5017143279176
+3.61102065557 15.90808271999 -0.5223948938361
+4.47094400559 17.56696199583 -0.5273597742033
+4.496366985767 17.50498105068 -0.5127166146055
+4.438327543845 17.49835734485 -0.5199568133002
+1.63411628795 15.37384069899 -1.416769719975
+1.615294484853 15.36573948711 -1.466446432476
+3.605764072285 15.70934926056 0
+3.552697475698 15.70212744652 0
+1.982920446727 14.67786075048 -2.588104331153
+1.957151869904 14.72735592493 -2.596828397989
+2.008637428363 14.72273691929 -2.596022305198
+1.926746708775 14.67977829166 -2.588436508159
+3.466283243617 16.46219017825 -0.7062918676912
+3.417721966393 16.47933133991 -0.7197882560092
+3.481835640611 16.52348599168 -0.7069586860759
+1.386103563592 12.79942384811 -1.578889522338
+1.368806874297 12.81751962581 -1.643212898429
+1.410309368162 12.76339953396 -1.633437026841
+1.382739088627 12.78994151621 -1.692730720483
+2.578896692772 16.21380585967 -0.7666076242769
+2.634287240106 16.20419417257 -0.7682993649708
+2.584549862166 16.14190243857 -0.7792839227585
+3.254730133572 13.68527034154 -0.9626362369439
+3.287366680406 13.71054381448 -0.9320977677934
+2.869744901376 13.43878187575 -0.920867589083
+2.947805619043 13.44883163266 -0.9364291812007
+2.91710968616 13.44741448047 -0.8933525313884
+1.616442049443 12.81992055437 -3.3934e-14
+1.558901529899 12.85581337602 -3.3934e-14
+1.566799214887 12.80224401727 -0.02599373320431
+1.509514746155 12.81377968313 -0.01983230416537
+0.3451077383489 15.00406487178 -2.645620077271
+0.390062720326 15.03572461353 -2.651205422487
+0.3963361277473 14.97898342322 -2.641202260916
+0.3493318629325 15.07978938454 -2.658978300696
+1.297827493679 14.96889611322 -3.3934e-14
+1.230114074439 14.96537884555 -3.3934e-14
+4.06716290973 13.98717067441 -3.390324098519e-14
+4.040300023551 14.04490373322 -3.3934e-14
+3.985175379365 13.9999429148 -3.3934e-14
+2.4279 13.08423050904 -1.912881441073
+1.70485361829 16.10203902332 -0.3808744736595
+1.74062081813 16.13752228284 -0.3378162370313
+4.453836897408 14.42361478376 -0.5501526628428
+4.437419066783 14.4133086749 -0.6085984667151
+4.503255997171 14.42163129693 -0.5612431744617
+2.926273897421 15.04492594519 -1.777457900988
+2.897202176739 15.08110962891 -1.748811621573
+2.954944678056 15.05834220507 -1.701264157504
+0.06520650575829 14.63635922341 -2.580787739862
+0.1190165210254 14.59030576031 -2.572667806412
+0.04699184980615 14.58773339988 -2.572214845855
+1.955676065432 13.3288304225 -2.350231792421
+1.936132840011 13.37659448002 -2.35865633325
+1.988726184095 13.37531944045 -2.35842751805
+2.004765470879 13.31214306519 -2.347289772315
+3.33094835584 15.14879517221 -3.3934e-14
+3.38947567657 15.17178840919 -3.3934e-14
+3.34945562144 15.21676809781 -3.3934e-14
+1.810957233989 16.20154529018 -0.5852291516677
+2.831407055673 15.32966635177 -1.799767964069
+2.788480010649 15.33652247132 -1.7405115007
+2.859130765877 15.33875075155 -1.720397536057
+-4.36436e-15 15.16008605156 -0.2007993977005
+-4.36436e-15 15.18856199619 -0.1568420313036
+-4.36436e-15 15.20965171755 -0.2295992198959
+4.43472510375 15.91126924643 -0.2406668468033
+4.365032337217 15.89017192307 -0.2490189624423
+4.396918968159 15.95569722294 -0.2549831862235
+2.669596974939 13.4098275997 -0.8951550178885
+2.634240304344 13.40068023354 -0.9434628524517
+2.696500738657 13.41028952467 -0.9496187117751
+4.056863331045 15.1953609889 -0.9242366169355
+4.641574960689 17.52924030426 -0.5019190868659
+4.624522703026 17.44747840718 -0.4890811717159
+4.578293119495 17.47652645508 -0.4981425823714
+4.708503287706 17.47922592636 -0.4892847456766
+1.338218130014 12.96825226573 -0.9222376113162
+1.340261209737 12.95231688052 -0.998260468456
+1.363219637402 12.89617013122 -0.9451470673286
+1.34954062778 12.92023582178 -0.8972989592782
+1.527485614778 12.79128323718 -0.6958660781526
+1.536356448527 12.79378103232 -0.6116990801672
+1.482101725525 12.80192918094 -0.6687677246232
+4.647829001406 15.6665132647 -3.3934e-14
+4.56959495695 15.6742391714 -3.3934e-14
+4.602584549893 15.62692806819 -3.3934e-14
+2.960683698486 14.23375794073 -1.626695331011
+3.026868787686 14.2336635349 -1.627265668491
+2.998833441705 14.24349720611 -1.571395000308
+1.065996167113 14.35629314819 -0.2496988334842
+1.047450854939 14.37750545999 -0.2040949922206
+1.00593197216 14.41760163557 -0.1946307932526
+4.572900499834 15.74671180256 -0.1939620615037
+4.603638044833 15.79873233894 -0.2002090175607
+3.377489315028 14.24034971662 -1.589317354462
+3.403872010965 14.2483752761 -1.543806677786
+3.335003416119 14.24532924226 -1.561052976152
+2.546007234544 13.249413727 -2.12851478481
+2.577197540353 13.2423606791 -2.203652440612
+0.6979296927862 15.37187874413 -1.427177018991
+0.7221185291516 15.36382492808 -1.480454503129
+0.6555254247429 15.36211242503 -1.497756708643
+2.873558006375 15.91249730232 0
+2.897352569618 15.96884954019 0
+3.357532376217 15.257302466 -1.127173917342
+3.417352878948 15.25003315507 -1.070221140099
+0.2258743422393 14.67315175619 -0.5885268104214
+0.2527560462679 14.67485272201 -0.5436872866745
+0.1921493959527 14.67521367726 -0.5338962083757
+1.408419715764 13.25391983063 -3.3934e-14
+1.395210357716 13.3133985907 -3.3934e-14
+1.350747319289 13.2547267556 -3.3934e-14
+1.3285 12.88893631144 -2.257466176639
+4.459184921939 17.04321088634 -3.3934e-14
+4.405657811687 17.09754409527 -3.3934e-14
+4.38217821328 17.04158882819 -3.3934e-14
+4.333367878653 17.07578827911 -3.3934e-14
+2.372816543488 15.24049956563 -2.44208600904
+2.419387216311 15.23573321352 -2.471907819891
+4.16650701174 17.64821564188 -0.5136827167821
+4.194944274405 17.58667893536 -0.5245287957907
+4.11429714076 17.58757196075 -0.5243777848809
+3.500816618694 16.26542066101 -3.3934e-14
+2.252448797775 16.08454786521 -3.3934e-14
+2.21694933626 16.00927222577 -3.3934e-14
+2.268022794645 15.99213493299 -3.3934e-14
+4.765478942155 16.25580829016 -2.149143848323e-14
+4.815293512416 16.27730456559 -4.340387070575e-15
+3.574816022561 15.79860701423 0
+3.527644861057 15.82430660498 0
+7.78e-18 15.06462593527 -0.8456515081712
+7.78e-18 15.06417986182 -0.76401419224
+1.32864384874 12.9868847276 -1.274551913397
+1.3285 13.01743029408 -1.192336204172
+1.3285 13.06730581139 -1.257465087229
+3.329566073846 15.94354497138 -0.7083530544851
+3.311571511956 15.87735190473 -0.7096334792029
+3.27348454551 15.92084836261 -0.746572828023
+8.222182323802e-19 15.24400512703 -0.85739059975
+6.183518203537e-18 15.29755797777 -0.8734624325903
+3.273064219083 16.4184780621 0
+3.329747629557 16.42186238542 -1.045335211258e-14
+3.274990999272 16.48490728983 -2.077837467652e-14
+3.0677108985 15.79268624697 0
+3.001011531743 15.73899205697 0
+3.091432088573 15.73639896102 0
+2.105692811923 16.55139584273 -0.06564682648935
+2.136082811105 16.58718307276 -0.02822111547874
+3.478449125452 15.98800311726 -0.6147162150946
+3.498314607617 16.07249160145 -0.617164680422
+3.534470993176 16.04931701346 -0.5909219023755
+0.2580941347855 14.67716566018 -0.4800729350402
+3.224196259866 15.30624817 -3.74827775216e-15
+3.584916694395 15.54155559469 -0.745852132198
+3.526255317762 15.53760790856 -0.7683206039556
+3.517921624687 15.55144049023 -0.6899189869874
+1.787998978497 14.36090675018 -2.532214993786
+1.799606369349 14.41510580948 -2.541775267954
+1.845018312376 14.37363459638 -2.534462103649
+2.481373614411 13.38700449361 -0.7502507706833
+3.801889166049 13.57290932169 -0.08239048631242
+3.780661080505 13.57037549222 -0.163860104153
+3.85144393523 13.57604691654 -0.1328649140316
+3.51068759971 16.4566332377 -0.6774553779994
+3.549539973319 16.48522145556 -0.6589066843771
+3.330303954432 17.50875519452 -0.3901480851553
+3.380689381752 17.53251889699 -0.3759009519152
+3.354320145228 17.51905759385 -0.44136789377
+3.432311661681 13.90234402866 -0.8249165916239
+3.406372484116 13.8589923358 -0.8401928376579
+3.380732582122 13.89194194651 -0.8699977713744
+3.944827219207 14.66085776601 -1.180471095273
+2.4279 13.05726780959 -2.231585500691
+2.4279 13.11757925134 -2.241257053536
+2.4279 13.09732486252 -2.165496564118
+3.369973023217 13.52870972972 -0.3637249387172
+3.314848939255 13.52290831911 -0.3571639493476
+3.36275120561 13.52628621605 -0.4190181526874
+3.977135822072 17.7447239931 -0.009896490228745
+3.997610019834 17.7496714905 -0.06278913444092
+3.942590838208 17.73581422724 -0.09502809963163
+0.871287095518 15.56561161133 -0.9126450253654
+0.9005995497576 15.57881319846 -0.8699020828559
+0.9208287623367 15.58380104619 -0.9213332117051
+0.9496381322709 15.59828089682 -0.8786592031819
+4.68263230376 16.75034495554 -3.3934e-14
+4.684857801325 16.68575563846 -3.3934e-14
+4.760883828165 16.71713055501 -2.307352653257e-14
+4.637837045246 16.70954502616 -3.3934e-14
+1.470547185214 15.89621439568 -0.7454371802102
+1.501508045366 15.91636602703 -0.7939241656619
+1.446528639153 15.87555315438 -0.8096056801474
+1.679110554821 12.75375569172 -1.086142822926
+1.631722587168 12.75126387146 -1.11484918553
+1.699234985176 12.74928642168 -1.137629877888
+1.667981033397 12.7453200649 -1.181625752728
+0.4491672247496 14.52131145609 -2.130594377948
+0.4551948797 14.52845677809 -2.074831739973
+0.3996851747629 14.53525727889 -2.066507925254
+0.3816071758573 14.52508032897 -2.14277922103
+1.3285 13.38990761449 -2.190183120443
+3.621707291758 16.10751622484 -0.5514412792733
+3.65406465444 16.16420211514 -0.5441588516231
+1.774811532699 12.71513169379 -1.471330773396
+1.846269104105 12.71266273446 -1.492221634582
+1.817630465548 12.71820463177 -1.444679321019
+2.724094441806 13.71942292977 -2.115926659822
+2.718829887094 13.78919997389 -2.172258538547
+2.72813244352 13.77327659212 -2.100277623343
+2.717395705885 13.72344745377 -2.173221296631
+2.675886108432 16.80747664555 -0.6619300998325
+2.723090194691 16.86142695356 -0.6524170689724
+2.73853203502 16.7719033523 -0.6682060809675
+1.299305603981 14.89835729868 -3.3934e-14
+3.748806357343 14.83245403367 -1.359863784205
+3.788904884862 14.81448187509 -1.322159954616
+3.755626954417 14.77200647894 -1.343157316988
+3.706672742721 14.79802249786 -1.392291493833
+2.953142457264 15.08187819344 -1.635995803111
+2.950197202261 15.15091838554 -1.653768498477
+0.6041764581309 15.26959467391 -2.253142359044
+0.6138312897872 15.2770683543 -2.202489529679
+4.118195296335 16.02580702165 -3.3934e-14
+4.203698745367 15.99067370428 -3.3934e-14
+4.1956235304 16.05832763946 -3.3934e-14
+2.918853227817 15.85716837442 0
+2.853549579882 15.82804139528 0
+4.612698893883 15.90963173251 -3.3934e-14
+4.554091891378 15.836337748 -3.3934e-14
+4.614961480885 15.81812717974 -3.3934e-14
+4.341187821757 14.36477942496 -0.8837566988095
+4.300209012919 14.35771086827 -0.9236830546386
+4.375713183637 14.35847275263 -0.9294903453793
+7.78e-18 14.89191820893 -2.241652768624
+7.78e-18 14.91522765308 -2.287990216388
+7.78e-18 14.8641654135 -2.297108162467
+3.773832443383 14.34871960243 -1.252453047264
+3.810836617614 14.31755346882 -1.216777729635
+3.070566397763 16.63777848958 -0.6918570835142
+3.063667951851 16.58602827055 -0.7009760341394
+3.023041380866 16.66087766197 -0.6877790950644
+0.2326686831736 15.41696490588 -0.9491467672938
+0.2867413404355 15.42087187553 -0.9749122278294
+0.2505006829152 15.41463348061 -1.013340078261
+1.006374271706 14.26086475803 -2.126342579152
+1.053912005267 14.2227656427 -2.065217390344
+1.088980168789 15.18801228458 -3.3934e-14
+0.4143684008077 14.89062128524 -2.625619296495
+0.3466151521735 14.94965736646 -2.636026496025
+2.59939416121 13.3371991636 -1.560605884175
+2.678219783203 13.35131267752 -1.550182937389
+1.395619942916 13.80682356797 -3.37452648159e-14
+1.44543024482 13.79679875855 -3.36738e-14
+1.455130604391 13.88643997339 -3.36738e-14
+2.714430724279 15.47886036828 -1.146561700543
+2.684078495269 15.45389147898 -1.185712905071
+4.584087681614 13.60911218531 -0.111199912739
+4.600727997724 13.60889965118 -0.1652898077176
+4.645297230954 13.61014360919 -0.1185697110891
+4.8279 16.2681137019 -0.06189904090945
+2.843638483624 14.09925523859 -2.38964056401
+2.821460567366 14.09065646526 -2.438577968661
+2.884681677492 14.09227711834 -2.429271009591
+2.077212255748 15.98956457249 -0.8061437641626
+2.094512390434 16.0524452727 -0.7950620697657
+2.152606193123 16.02054002842 -0.8006848391135
+2.134750887094 15.95772250385 -0.8133179983981
+2.733638022283 15.05764901865 -2.26846603619
+3.871496683641 13.57511551966 -0.2807153025532
+3.915812603824 13.57717153302 -0.330547265394
+3.928236767951 13.57923333444 -0.2747496719397
+4.189451302027 13.90071259622 -0.3935553002228
+4.130399946304 13.87697166149 -0.4091015720229
+4.133794724935 13.94906425305 -0.4205616430687
+1.356662215457 12.9241847063 -0.6515785075192
+1.397045634199 12.86449668953 -0.6312713180423
+1.372926801122 12.90272703494 -0.5909947136721
+3.189604437453 13.86301832839 -1.070370376781
+3.198386093416 13.93653806069 -1.072677689251
+3.168318016461 13.91530243152 -1.106871726132
+1.927786801803 14.84727748854 -3.3934e-14
+2.470723197626 14.72349334521 -3.3934e-14
+2.421700688194 14.66557701503 -3.3934e-14
+2.489674651076 14.63185687117 -3.3934e-14
+3.898462256327 14.17706736419 -0.5597675882695
+3.946419715138 14.17107069171 -0.5358468899582
+3.945195013004 14.11787968546 -0.5270551493356
+3.571998606656 15.86846977584 0
+1.797910189757 13.84508808914 -3.36738e-14
+1.773667651733 13.90368106043 -3.36738e-14
+1.727839783214 13.86088622517 -3.36738e-14
+2.936862130519 16.66136508978 -0.6876891510285
+2.912754364175 16.59155869183 -0.6999993697821
+2.886564052568 16.64561608563 -0.6904697668352
+1.712702067348 14.99757776255 -3.3934e-14
+3.69108404655 15.83493358552 -1.49703240369e-14
+3.644733212742 15.79918130472 -6.149969603649e-17
+3.742364226504 15.80670295462 -6.968138875782e-15
+0.23705074941 15.37236722608 -1.41661049389
+0.1807527923894 15.36602827756 -1.461217870567
+3.29815480362 14.20670194283 -1.780196296686
+3.695762537562 14.35905393082 -0.9161452116307
+3.638442547057 14.37059822102 -0.8507519012446
+3.633851034066 14.35982929732 -0.9117127911685
+2.636092380745 13.6439442694 -3.36738e-14
+1.693213744766 15.35252791405 -1.592868646079
+1.705261071788 15.36035612225 -1.515574291693
+0.3377182841552 14.63836107269 -1.162323205736
+0.2724094655682 14.63825436417 -1.169440729331
+0.2964223699035 14.63467672249 -1.214405422952
+4.267681159483 16.21445028437 -0.3267607168064
+4.289602092596 16.30422754016 -0.3375855593879
+4.318237591206 16.22433034794 -0.3170241976323
+2.323458896798 15.87193475803 -0.8361604871877
+2.323732346502 15.93028479436 -0.8201268973235
+2.392407027571 15.89370916124 -0.8291660126091
+2.392700663193 15.843954573 -0.847174273573
+2.726430579275 17.14413760325 -0.3925628286998
+2.76778107231 17.17543882496 -0.3554731964583
+3.567986434913 13.97264014127 -0.7266975104774
+3.557010344474 13.90090780336 -0.722059393999
+3.525588146711 13.93875120849 -0.7532930514276
+3.426332279898 14.28059049424 -1.361217474056
+3.372335747629 14.28103430084 -1.358776429008
+3.426763406519 15.93050510113 0
+2.200884374152 16.06285681654 -3.3934e-14
+3.900188621082 17.03732559767 -3.3934e-14
+0.7629536122721 14.47674739183 -1.768602024366
+0.7286898821086 14.48339065492 -1.845617079642
+0.7943434710713 14.4530016812 -1.838536110693
+3.981305579722 13.58175534976 -0.3186724506491
+4.051755294374 13.58645321486 -0.3012721515967
+4.013882344672 13.58487971074 -0.2640445371186
+3.379780336983 16.67191771334 -0.6858333513226
+3.42498282853 16.61724231569 -0.6954756464353
+3.366986773037 16.62117606513 -0.6947840781336
+2.582130998097 15.22364592399 -2.545263993149
+2.5655510998 15.23166253963 -2.497057646164
+2.613748462626 15.23464117403 -2.478860036508
+2.535891262712 15.93110448554 -0.8199553850073
+2.476347491396 15.87943089921 -0.833174349647
+2.478424585907 15.93688249646 -0.8185228803898
+2.525508711661 15.84854700612 -0.8453819485023
+2.136165779963 13.83036410914 -3.36738e-14
+2.738183074313 14.69408912364 -3.3934e-14
+2.699517869845 14.73859211032 -3.3934e-14
+2.685932226406 14.6667877912 -3.3934e-14
+0.1240698423663 14.60638429557 -1.517466889358
+2.420264084717 13.00366271577 -0.4755947244364
+2.424732897523 13.02333357866 -0.5354152766489
+2.4279 13.06233583409 -0.4799342671915
+2.654336034653 14.46742316452 -3.378216115279e-14
+2.729716962599 14.51052638571 -3.370845149356e-14
+2.630008470767 14.51163050524 -3.384689297823e-14
+2.290158144889 14.83760579383 -3.3934e-14
+2.248950395995 14.87674647483 -3.3934e-14
+2.225701282742 14.80177356193 -3.3934e-14
+1.348034235613 12.95355308761 -0.02407793405548
+1.332157139761 13.03141810665 -0.04470701176055
+1.340234658837 12.99058021777 -0.09265226052588
+1.657398522532 13.91436756864 -3.36738e-14
+1.687091618007 13.9606763275 -3.36738e-14
+1.63469195023 13.9800680405 -3.36738e-14
+1.843267973833 12.70612575786 -1.547533631267
+1.877424326934 12.69861633143 -1.607035093423
+1.925897880058 12.70607045356 -1.548001583269
+2.596999130615 16.26262640735 -0.7580015252946
+4.304312659638 17.32921672314 -0.5147994030736
+3.650322040132 15.00881652522 -3.3934e-14
+3.69615919805 15.03785930702 -3.3934e-14
+3.642280523445 14.01289304043 -3.393011064781e-14
+3.591517371136 14.00625930407 -3.379592620906e-14
+3.597330037467 13.95539559402 -3.36738e-14
+4.308547774085 14.43502342275 -0.4853592930527
+4.321888354705 14.36652506569 -0.4378790555734
+4.270395108449 14.3649654664 -0.4511854966511
+3.937274378646 14.01564031328 -3.3934e-14
+3.910763434611 14.05851319556 -3.3934e-14
+3.864132928543 14.00676936827 -3.3934e-14
+3.853554974291 15.39524953171 -0.792456443699
+3.836241687902 15.32952238523 -0.79038224706
+3.778710046841 15.37817460225 -0.8308254714517
+1.55595169595 15.9593835615 -0.782982674993
+1.618849783193 15.96372222259 -0.8121440632619
+1.567094066872 15.90126429296 -0.8270762677683
+2.816014378399 15.44109005045 0
+2.799489576942 15.38673051521 0
+2.857583548361 15.3664750149 0
+4.54020117334 15.6276256567 -0.2578647377504
+2.540059306844 13.27355112655 -1.964783209065
+2.552908090471 13.28448686351 -1.904899989474
+0.8837898575644 14.5142318629 -0.2589011461419
+4.744396994561 16.65919840009 -0.343208938669
+4.672248952894 16.64343064415 -0.3440710348282
+1.98232099338 12.81197337348 -2.259095542701
+1.946637025672 12.88382407032 -2.271765511076
+2.037492852352 12.86413416067 -2.268297052791
+1.749275564446 15.36436680069 -1.474995809108
+1.772636142897 15.37438096381 -1.413690012811
+1.817487818202 15.36444333313 -1.474395667906
+1.796561549802 15.35984250176 -1.520745175544
+1.76129851303 12.75988763568 -1.011496934419
+1.709944430209 12.75757506232 -1.040201899587
+1.761058448782 12.75244468997 -1.101245875169
+2.383748741164 16.5879427467 -0.700633202105
+2.431518855881 16.5601221766 -0.7055397665316
+2.949500387894 15.93687515979 0
+2.989548329774 15.86789916689 0
+4.613074283529 13.60994392544 -0.06260210262828
+4.694401731042 13.61091194094 -0.06709875283427
+4.076813272421 16.58143392017 -3.3934e-14
+4.005208591822 16.54924047756 -3.3934e-14
+3.921638787942 14.60522440581 -3.3934e-14
+3.93614772156 14.55622048333 -3.3934e-14
+4.386510800782 17.71400417566 -0.5020851164597
+4.435082260655 17.68942561226 -0.5064203754241
+4.390547994156 17.62738441965 -0.5173559203631
+3.138338748273 13.54992659351 -1.080882701498
+3.184669871575 13.52197761674 -1.016585903629
+3.143039579851 13.48893905086 -1.064123359882
+3.926905976393 14.23103111692 -0.555725312464
+3.876956877023 14.25265247146 -0.5835655048895
+1.275028295894 14.82573271846 -2.614172670114
+1.265094104475 14.87472481971 -2.622817557358
+1.324657370655 14.84075229194 -2.616826341665
+3.951364073553 13.57842541063 -0.3746598896458
+1.715893383492 15.3167073149 -1.90681872642
+2.694176733554 17.12147949127 -0.2949522175499
+2.646945343985 17.08559452113 -0.2377873632344
+2.681016594183 17.11242380088 -0.2104523696835
+3.982093510358 15.71047241265 -3.3934e-14
+4.041673378256 15.76907596945 -3.3934e-14
+3.99631990389 15.79084071319 -3.3934e-14
+4.232697048622 14.56770983272 -3.3934e-14
+4.166212215262 14.57202617639 -3.3934e-14
+4.174818571684 14.51179370488 -3.3934e-14
+2.926284036652 13.91854124149 -3.36738e-14
+2.962345346125 13.85902787731 -3.36738e-14
+3.013105571894 13.89840842113 -3.36738e-14
+3.485078324146 13.90667394081 -0.7802192905652
+3.500155795595 13.98291281664 -0.7815413622039
+1.462046415416 14.69783397263 -2.591626838079
+1.396248168702 14.73203614011 -2.597652042811
+1.467764249767 14.76715812352 -2.603848285999
+1.4236422228 14.82186754223 -2.613496719942
+4.368172468097 17.219233085 -0.4827984601711
+4.307329207868 17.23518611928 -0.497578157041
+2.260110193519 15.41585087059 -3.3934e-14
+2.187201557661 15.43542937589 -3.3934e-14
+4.377132139276 17.35426350399 -3.3934e-14
+4.431115971337 17.33717142271 -3.3934e-14
+4.031953137485 14.92142092885 -1.173486447991
+4.105961351137 14.91302006009 -1.132910950275
+4.064042331632 14.87190528958 -1.147443140295
+2.128447348324 15.9055169464 -0.8260882275295
+4.8279 14.0305325146 -0.04991511189083
+4.811848557802 14.0563921675 -5.51863869862e-15
+4.807092770363 14.00564028685 -7.145759847272e-15
+3.80532542457 14.26225172612 -0.6235957017501
+3.810846944046 14.20874291829 -0.6112099124747
+4.404012230929 14.44129002964 -0.4497710604258
+4.431572879501 14.43150258019 -0.5053053968901
+3.701769313138 13.74721002822 -0.594363267822
+3.633945487588 13.73588986466 -0.6372462992052
+3.650174087984 13.78329469133 -0.6348621750231
+1.393611631244 15.83817735814 -0.8292269405336
+2.096574761579 16.10015443552 -3.3934e-14
+2.054318640494 16.12793448442 -1.961034929015e-14
+2.027165672295 16.08527270757 -1.950769985706e-14
+4.319810255494 14.57289602368 -0.9848992030054
+4.35463908697 14.53949749426 -0.9680781329852
+4.316041865562 14.50660745541 -0.9743993283127
+4.273640754654 14.54610409909 -0.9964048651036
+4.611240340924 14.09019848938 -0.3383272298814
+3.35849837862 14.26370540254 -0.9571081292839
+4.440248386039 17.63588728398 -0.5158567686558
+1.216487871548 14.83077858366 -2.615058615407
+1.233204945058 14.91358019064 -2.629672473952
+4.256377277297 15.35069472679 -0.6247684089376
+4.201549872986 15.30140684756 -0.632386112311
+4.220454346781 15.39528091077 -0.6428088115654
+1.332865353107 12.9791759841 -1.126092197391
+1.328794470822 13.00585136054 -1.053398103807
+1.3285 13.05539774369 -1.119618865072
+3.598969594758 17.29589908583 -0.5757976419994
+2.402766926882 16.8728284889 -0.1297037723318
+2.458463771662 16.92479785717 -0.1604677221825
+2.439733556442 16.90688424785 -0.2105401313064
+2.439151864339 16.90727850016 -0.1104768541935
+0.07593808878495 15.35878138131 -1.531460180263
+0.121918960518 15.36318719015 -1.48683022766
+0.1369381146535 15.35524159408 -1.566962776863
+2.169380263219 13.644791038 -2.405946043431
+2.109304505466 13.68499449235 -2.413034425273
+2.204160550228 13.70028608398 -2.415730886246
+3.935055774861 15.31342858906 -0.7378262419082
+3.879036757193 15.28993214825 -0.7613318852564
+3.889735984032 15.35106309359 -0.7668068501808
+1.194422520838 15.24145780983 -2.436176889063
+1.172888617936 15.25563873265 -2.345725934122
+1.225691983772 15.25257611064 -2.365678308933
+1.137750098424 15.2460542564 -2.407635296467
+1.899280937306 15.27698678265 -3.3934e-14
+1.858814492904 15.20758219886 -3.3934e-14
+0.008382989449108 14.54344946533 -2.03361967865
+0.07229166828079 14.53601075038 -2.08608188417
+0.6923096112298 14.54859856545 -1.397618323441
+0.7096108417893 14.5331742942 -1.490000935172
+0.7369696798139 14.52603819016 -1.434586777579
+0.6418262876245 14.56090386359 -1.457624621455
+4.030010106092 17.65815106187 -0.5119260213756
+4.053910967407 17.6098667893 -0.5204448461283
+3.994610094306 17.60052601101 -0.5220917157095
+1.259358677979 15.75909259728 -0.7227694495027
+1.217055330627 15.7363915078 -0.6865445022644
+2.174072998148 14.34947553921 -3.38196060765e-14
+2.145750127261 14.40064838448 -3.391172559833e-14
+2.123709200227 14.35215358226 -3.37890407267e-14
+2.4279 13.22426952456 -0.6922182162197
+2.4279 13.18158161467 -0.7345267342682
+2.4279 13.23831302085 -0.752116850424
+0.6801233729666 14.60415078975 -0.6792794662015
+0.6672385024399 14.61171906736 -0.6107393960588
+0.6138024519774 14.62858545118 -0.6534435880333
+1.148035095578 15.29929505176 -3.3934e-14
+1.561014627136 12.75547424059 -1.106883552058
+1.622434563937 12.75723444155 -1.044429876714
+1.534358337825 12.76530084425 -1.055017203216
+4.827899999939 15.50573880813 -0.2309650140428
+4.8279 15.56109562144 -0.1945302543764
+4.8279 15.5108919834 -0.1807266827765
+3.066177288619 14.85712249559 -3.3934e-14
+3.065767657994 14.91465756327 -3.3934e-14
+3.006982262314 14.87178910546 -3.3934e-14
+1.052277223891 14.73082794985 -3.3934e-14
+1.078470588641 14.77426034033 -3.3934e-14
+1.012411380201 14.77303539061 -3.3934e-14
+3.797340750306 15.88591695457 -0.4258035248791
+4.755762844519 14.91910767054 -0.9654923024823
+4.675687140079 14.91870251646 -0.9709873665505
+4.696551805612 14.98040514855 -0.9803103516209
+2.649523515733 16.76497198023 -0.669421834157
+2.603698510198 16.80326159426 -0.6626671573215
+3.612898868476 15.52854527643 -0.8200337366896
+3.652839571883 15.52013648073 -0.8674185991159
+3.57937027815 15.51666976187 -0.8871363769791
+4.087369196294 15.1869655852 -0.9718839695254
+4.013427054843 15.18098703547 -1.005697625451
+4.827899999928 14.77826290149 -0.2824742094583
+4.8279 14.78472941824 -0.3453680804738
+4.8279 14.82382560545 -0.3048012436252
+4.455948264581 14.43987593715 -3.3934e-14
+4.445893945311 14.51689617044 -3.3934e-14
+4.393133905295 14.48711783382 -3.3934e-14
+0.501048189599 14.66130575989 -0.4755774647991
+0.5348823684802 14.65381128561 -0.5142194467627
+0.5629911414323 14.64825435566 -0.4709396710251
+0.460777888913 14.66605715152 -0.5115639836768
+1.831084170376 15.5612415467 -3.3934e-14
+1.779713360001 15.53396524517 -3.3934e-14
+1.827498373369 15.49935498582 -3.3934e-14
+1.546233800511 13.43448081002 -2.368861109942
+1.496611401535 13.41356130344 -2.365172359623
+1.488328459301 13.47482173939 -2.375978591873
+2.322812682509 15.79254027289 -3.3934e-14
+2.376052103104 15.77635351451 -3.3934e-14
+2.362489450852 15.83911425899 -3.3934e-14
+4.8279 14.54896537246 -0.2570628407113
+3.114415210043 14.19827547994 -1.827873146705
+3.130147241682 14.21016855801 -1.760558264466
+0.4537015062719 14.97085102065 -2.639767362021
+0.5420534687153 14.96841418977 -2.639327340587
+1.473355359833 12.66582222719 -2.015068843038
+1.530298090876 12.64111939243 -2.070704958778
+1.547268448131 12.64928358427 -1.998602346674
+1.3285 13.5289616403 -1.221826168204
+1.3285 13.4813442521 -1.24892204805
+1.3285 13.49841696445 -1.176344027308
+1.967073469511 13.15059502404 -2.318798488769
+2.03286934184 13.17360108435 -2.322856532202
+2.012911836444 13.12620613203 -2.314495590898
+1.986283544424 13.20006173492 -2.327532722806
+3.086926747102 14.18845280347 -1.883671564149
+3.1359204769 14.18598534992 -1.897718524076
+3.655587451631 17.64701538124 -0.1596339348461
+3.641549888053 17.64117820521 -0.2373531313065
+3.60835756005 17.6293131828 -0.1890019576189
+2.952373966487 17.16786551992 0
+2.933975505026 17.22359838116 0
+4.760023484124 14.58442224821 -2.336737029264e-14
+4.823384109311 14.60799887912 -1.554653896996e-15
+4.780727348936 14.66598534343 -1.624039157799e-14
+2.122459945905 13.90726711207 -3.36738e-14
+4.086801225525 15.59206816213 -0.4596520383525
+4.154688366549 15.5866330359 -0.4902084249946
+3.268947947415 14.19524723829 -1.98161509988
+3.210995575486 14.16790992628 -2.000262691228
+3.252003429317 14.16983654655 -2.033003623345
+3.355238882144 14.68978955368 -3.3934e-14
+3.342001127133 14.75378304427 -3.3934e-14
+3.282786645153 14.73698151184 -3.3934e-14
+4.524094953172 13.67240168324 -0.275423679263
+4.476479155716 13.69391362694 -0.2870955235751
+4.338602406713 15.47436458145 -3.3934e-14
+4.282656902105 15.52973712416 -3.3934e-14
+4.273643109708 15.44994080323 -3.3934e-14
+4.65090637692 17.6721842076 -3.3934e-14
+4.688688480384 17.63264287316 -3.3934e-14
+4.708315383932 17.68327984749 -3.3934e-14
+2.708597186365 13.99437663398 -2.317818143923
+2.704427689794 13.94952991728 -2.392611300573
+2.705460385979 14.00826459051 -2.366137619213
+4.605231194712 17.83690172342 -0.4526960218616
+4.534851954968 17.83232463911 -0.4348378358188
+4.5869784039 17.83741806543 -0.376945226611
+1.408472816594 12.77909979885 -1.516075097445
+1.473254088414 12.73242349822 -1.539935081159
+1.451097287146 12.7541571902 -1.482886828134
+1.430274478644 12.7571186559 -1.575889259407
+3.935839672778 17.2474675877 -3.3934e-14
+4.034186719074 17.23742652316 -3.3934e-14
+3.969641252142 17.29465461213 -2.155204628489e-14
+4.56167989004 14.42654714277 -0.5334897460234
+4.50449581907 14.43472640079 -0.4871951468982
+4.387894048985 16.03524974086 -0.270664366355
+4.827899999986 15.31416834821 -0.4269653185238
+4.8279 15.31222607118 -0.3766342433571
+4.8279 15.26381854246 -0.4283388646199
+2.547299666273 16.99846522438 -0.4669414534249
+2.501414068085 16.95720759829 -0.4973133186646
+2.508188875746 16.96473784711 -0.4399076009443
+2.556518001864 14.99959138237 -2.644834762295
+2.579047761544 14.92622690065 -2.631897129399
+2.505704242855 14.94238337601 -2.634747967349
+2.323567929428 12.85113273464 -0.1639480035406
+4.67123152494 14.41756932942 -0.5841717365618
+2.760418549219 15.54634312636 -1.053237478751
+2.741351804195 15.50986781083 -1.098444401594
+2.700730609248 15.53918704863 -1.064256092538
+1.701543797019 15.14797297997 -3.3934e-14
+1.646752759107 15.10050780635 -3.3934e-14
+1.286316331549 13.93635496772 -0.9931682398712
+1.272631168303 13.97810549786 -0.960557216709
+1.258862571109 14.01299084509 -1.011873121792
+1.373324048932 15.30595748487 -1.991319056583
+0.6937099417249 15.34555221277 -3.3934e-14
+0.7412994803573 15.31702805229 -3.3934e-14
+0.755313446588 15.38940715958 -3.3934e-14
+3.964546353001 13.92277325445 -3.3934e-14
+3.890417525543 13.9212186324 -3.3934e-14
+3.923701011964 13.87612009086 -3.3934e-14
+3.764153102282 15.54188896184 -0.7442659172291
+3.720314305291 15.52921073931 -0.8161043097204
+3.715514017084 15.54582710794 -0.7218594600862
+4.383460994245 14.83027270439 -3.3934e-14
+4.45871227087 14.84732096917 -3.3934e-14
+4.389200011605 14.89342003999 -3.3934e-14
+4.447229246153 15.06122078132 -3.3934e-14
+4.423251502168 14.9665391105 -3.3934e-14
+4.489502765605 14.99263594228 -3.3934e-14
+3.032994628382 15.09958586704 -8.070768805372e-15
+2.984241544651 15.04796797298 -2.843981234674e-14
+3.039284372109 15.0413607828 -2.42460889768e-14
+2.966026446945 15.11061936811 -4.41872541007e-15
+3.28916124652 14.70470173201 -2.013227061428
+2.156943882629 14.58065888945 -3.3934e-14
+2.084333687141 14.56063659949 -3.3934e-14
+2.202921008774e-07 15.35459979544 -0.2308985846126
+6.966589357483e-08 15.37828462662 -0.1587484370182
+0.03153405154074 15.43430367932 -0.1991723006023
+3.897192146698e-07 15.41725678601 -0.2566559813842
+1.230735794222 14.09856397484 -0.647166242218
+1.256744847319 14.04188430118 -0.6167273479481
+4.053336672955 13.58781121835 -0.2285833786925
+4.139460804025 13.59247681716 -0.2306566599465
+4.077089155307 13.58987731762 -0.1807855272681
+3.650615756995 14.94734276994 -3.3934e-14
+3.601055599114 14.88969751163 -3.3934e-14
+3.062108515526 14.22084996401 -1.700066480716
+3.000058900062 17.20993735785 0
+3.005380405821 17.14266685737 0
+2.747407947994 13.700191837 -1.979128958618
+2.765869894042 13.71912711239 -1.899496229603
+2.755863602793 13.63503389084 -1.926939844896
+2.429836977872 14.93954961519 -2.634247456564
+2.341222317447 14.94372504308 -2.634985357587
+2.349552379384 14.99383510192 -2.643810002685
+2.396606976011 15.01459032219 -2.647466238076
+3.83871751494 15.15048664576 -1.178810912238
+3.890458505202 15.15089068391 -1.176614578042
+3.861488712095 15.14265474562 -1.223143438921
+0.6578197911362 14.60321313847 -0.8495416890118
+0.6865279117478 14.59778855789 -0.7623278989459
+0.6358849448212 14.61521427531 -0.7766357830712
+3.831818940697 14.31616766021 -1.159550244583
+1.537017081546 13.96068483539 -3.368886639281e-14
+1.484924036555 13.97772079181 -3.376941915233e-14
+1.497050371609 13.92090003404 -3.36738e-14
+3.981528588605 16.44474464672 -3.3934e-14
+1.105654647129 14.7536179099 -2.60146209407
+1.051653105236 14.8029224517 -2.61015206324
+1.103626468712 14.83244742996 -2.615352208369
+3.813451328565 16.09544375095 -3.3934e-14
+3.763399808025 16.11277401555 -3.3934e-14
+3.737113643611 16.0405045767 -3.3934e-14
+3.199218315658 16.89775863992 0
+3.248204799023 16.93496833238 0
+3.637221513681 16.4495425673 -0.603486489146
+3.577251570035 16.44767568746 -0.6366979051346
+0.8978387147251 14.50294452026 -0.3068368531393
+0.8452044813086 14.53665809192 -0.2955755518892
+1.520602782328 15.95022948407 -0.1721042649944
+3.224904648475 16.8232315313 0
+3.173061659647 16.76354471027 0
+0.7423392933024 15.0196869847 -3.3934e-14
+0.8244378477068 15.00347214323 -3.3934e-14
+0.3010398825226 14.60371315393 -1.542407300198
+1.342951959664 12.92599637498 -1.151080652241
+1.339537046618 12.93795204796 -1.209387029126
+1.691373724134 13.77357060395 -2.428651390442
+1.716315604797 13.69651019096 -2.415057772043
+1.654053346105 13.72698287459 -2.42043271413
+3.672584876789 14.3071848486 -3.391228112928e-14
+2.385681360318 14.9600197767 -2.942087790122e-14
+2.426288917337 15.00473022812 -2.727963717904e-14
+2.371471357733 15.03008832964 -3.3934e-14
+2.444046306499 14.93698479013 -9.844883320973e-15
+1.209100034481 13.99928033176 -2.117696450557
+1.237370281322 13.94263494519 -2.096236202364
+2.234441895142 12.63377923477 -2.12466348873
+2.220835415442 12.62243252389 -2.174744261745
+2.273502961106 12.63261155 -2.177408983931
+3.209759763951 14.04594836664 -1.078709633721
+4.523760285915 14.78017148056 -0.9683025742093
+4.465798206157 14.78324822464 -0.9811476189184
+4.499052918924 14.83027781905 -0.9823830923223
+1.970349874971 16.15903692198 -0.7762610282283
+1.936670677676 16.10010911854 -0.7866485502338
+2.319942049384 13.61768195275 -3.36738e-14
+2.385557391523 13.60269043541 -3.36738e-14
+2.36518766396 13.69427896432 -3.36738e-14
+3.152598285138 17.02898764603 -0.6228708580927
+3.102703949333 17.03939529901 -0.6210318973423
+3.17788098397 17.07922960326 -0.6140125371329
+2.882873472822 16.95999941921 -0.6350389928128
+2.88359790944 16.89872073643 -0.6458435037127
+2.823904498355 16.9351382724 -0.6394154555703
+2.778700420244 13.44188910836 -0.6266708167705
+2.808340510702 13.4484140446 -0.5826859623027
+2.748681176654 13.43909419114 -0.5862241507153
+4.712403726871 16.60913803647 -0.3355991462535
+3.73404576948 14.34365639784 -1.003488765746
+3.795721504048 14.34342697714 -1.004705793926
+3.749569842213 14.35394735773 -0.9450797681862
+2.771067919286 13.99496684357 -1.927824166712
+2.791516345878 14.02382258223 -1.857698015073
+2.778885424461 13.95163693819 -1.889617988267
+0.5265616964831 15.49130814097 -0.05739756727803
+0.5262759290253 15.49135898544 -0.00687665403526
+0.4362500390779 15.47352872634 -0.06075836035282
+2.4279 13.15547813521 -1.461426104176
+2.4279 13.18672736785 -1.411817050643
+2.4279 13.12610377534 -1.399615023611
+3.311748710578 13.50578947066 -0.870106795325
+3.358601294863 13.51781676954 -0.8255127918369
+2.251255963577 15.35452910733 -1.573534550495
+2.271942626012 15.36262588955 -1.492535692158
+2.319830610948 15.35867224529 -1.532325127684
+2.261485421815 14.97798817856 -2.641019276077
+2.303505579221 15.01667757416 -2.647834421405
+1.821764482333 15.2807327784 -2.1764766787
+1.777599890814 15.27324265178 -2.228589790879
+1.758992208812 15.28454516746 -2.14938916547
+3.997488877223 15.15230503359 -1.168376177538
+2.21753352062 16.12469833706 -3.3934e-14
+1.3285 13.58344683255 -1.413131221619
+1.328399734483 13.61969120775 -1.355962942923
+3.659084463818 14.64922496995 -3.3934e-14
+0.3172739413461 14.61731601785 -1.407450410827
+0.3866700711225 14.61042153624 -1.449236895793
+0.3759651697258 14.61646403913 -1.391784671233
+3.308951458431 14.94820819191 -2.004577701517
+3.284321271294 14.90073365623 -2.061553653537
+3.291895654985 14.95812830516 -2.050655642771
+0.2077078669891 14.93074743296 -8.17662e-14
+0.2452471845791 14.87789291207 -8.17662e-14
+0.2606937308493 14.96765037253 -8.17662e-14
+0.3316283505581 14.6514929444 -0.989060786506
+0.2851100008002 14.65448422496 -0.9453832147197
+0.2848997143464 14.649761377 -1.016584679057
+3.327720246184 14.87459941897 -1.94641760524
+3.30388450905 14.88881231551 -2.006486872208
+3.339610093448 14.945040384 -1.932767187964
+1.531350870131 14.1871905425 -2.50158325916
+1.599280981037 14.21309736863 -2.506152721302
+1.585390457373 14.14940390844 -2.494925867928
+1.531306809547 14.25245943651 -2.513089652802
+0.8913212064087 14.97163561261 -2.639905248308
+0.8919126137342 15.03661679553 -2.651364218961
+1.652018839711 12.90289768734 -2.275119029159
+1.678326456126 12.82390815184 -2.26119451669
+1.616616036161 12.84771809674 -2.265393886561
+1.731547217647 12.86938581787 -2.269217830696
+4.422843349067 16.37251327518 -0.3237851044306
+4.48242586474 16.38174631314 -0.3169247321309
+4.475784785289 16.33203250367 -0.3091067347651
+1.121779862662 15.06202597199 -3.3934e-14
+1.091857625631 14.99341883433 -3.3934e-14
+1.152343421766 15.0160263847 -3.3934e-14
+2.591857679339 13.39056151548 -0.9855192430003
+2.619375162989 13.39144206506 -1.034144254383
+2.660780131055 13.40113689208 -0.9978948688079
+1.639888766303 13.42395973929 -3.3934e-14
+4.771975797987 15.23122308078 -0.7208250539596
+4.803015896556 15.23902532954 -0.6766044657304
+3.210888830737 15.53108931233 -0.8054316950461
+2.408499468094 16.7040894694 -0.6801580188848
+2.366139948478 16.65221274496 -0.6893010858745
+3.695066829839 16.18738320767 -0.5272071468818
+3.662887539418 16.2320456197 -0.5516429885565
+3.721572837777 16.22948189656 -0.5216363598235
+4.082929722003 15.59931718344 -3.3934e-14
+4.073296186365 15.52513665792 -3.3934e-14
+4.139355211995 15.55152965002 -3.3934e-14
+3.259047301364 16.88388533305 0
+2.722495786212 13.38593724785 -2.069057441781
+2.71630199404 13.41754306302 -2.128850217684
+4.450987792328 16.891626385 -0.4112889144478
+1.523078981996 12.7436661269 -1.312592943581
+1.505118567554 12.75262171953 -1.260349902471
+1.467011475226 12.76198350405 -1.31284742336
+1.500628161572 12.74288729189 -1.363851782322
+2.10235180858 16.54719272772 -0.1180512619173
+2.059860453315 16.49754863307 -0.08629222476407
+3.382904981762 16.99544452667 -2.256446687812e-14
+3.405085938335 17.04379343348 -3.110716638088e-14
+1.467274869415 13.07672401721 -3.3934e-14
+1.526093726242 13.05312226501 -3.3934e-14
+1.554186342624 13.10993340415 -3.3934e-14
+3.325546918725 13.57315032012 -1.471908835605e-14
+3.266615622592 13.53858058132 -5.491225271198e-15
+3.299518228182 13.52558912819 -0.05350292751847
+3.362055961243 13.53255940972 -0.04107836793176
+3.194595383176 14.19466872012 -1.122623855616
+2.902215678818 16.84024498014 -0.6561538778789
+2.930678269781 16.88114038088 -0.6489455061361
+2.950815422419 16.82503615166 -0.658836844956
+3.74268904604 15.76330639725 -0.4292415241867
+3.774945489292 15.72679751861 -0.4080145681622
+1.94404341751 12.79402646092 -0.3906292524037
+1.923889520999 12.79244893898 -0.4370342114095
+0.6088634272741 15.50712815455 -0.32819427217
+0.6196403559739 15.51102199813 -0.2711781235376
+0.6714809985683 15.52451769427 -0.2881598443964
+2.624523017424 15.59863340245 -1.003275588303
+2.641026593102 15.63735489169 -0.965609237634
+2.674984224322 15.60405381435 -0.9952397047852
+2.715526507927 15.62831444555 -0.9750398358621
+2.368152545248 15.37570542439 -3.3934e-14
+2.363445551785 15.43029800815 -3.3934e-14
+2.321236899764 15.35541730307 -3.3934e-14
+2.945375659072 13.48646822001 -1.378285197031
+2.975907589434 13.50212363745 -1.323107604415
+2.966334849416 13.45089243119 -1.331680912331
+4.8279 17.67291599146 -0.4148067515125
+4.8279 17.73629775827 -0.3615887784588
+4.8279 17.64719098695 -0.33600284619
+1.88451107052 16.29246026182 -0.1126111853806
+4.049846619731 15.04226452629 -1.185190621241
+4.054110520838 15.11462700404 -1.195483530415
+4.115755222477 15.09625754147 -1.160512876695
+4.527989930682 16.16681984159 -0.2727018767686
+4.8279 14.52210811704 -0.878208365336
+4.82790000005 14.49372568462 -0.836283392013
+3.260336980812 14.24621221206 -1.05529669462
+3.280825319489 14.16837714391 -1.019783666762
+0.4853265788975 15.41647885562 -5.721801812991e-13
+1.990187686992 12.79931828116 -0.1220047907945
+2.051256031625 12.79973613101 -0.06407425169309
+1.991874101088 12.79979310382 -0.05023977168175
+2.057673457649 12.79893941076 -0.1554571870431
+0.6661286705203 14.51084295555 -1.823128049934
+0.6461922226431 14.52637355167 -1.755788395253
+0.5884139900831 14.54069762027 -1.782480621291
+1.681652346985 14.81114535102 -3.3934e-14
+1.679150893983 14.86234034856 -3.3934e-14
+1.620032881024 14.83498105734 -3.3934e-14
+0.5965939750667 14.86394171708 -2.620911159141
+0.6001705247866 14.92301061359 -2.631328493644
+0.6612430063211 14.85616253599 -2.619546573337
+1.912178450491 15.60610734651 -0.9959377940189
+1.975976037941 15.5896674174 -1.011557604884
+1.929417314066 15.5588701062 -1.038939905708
+0.3772736340721 14.63236450765 -1.213403696237
+0.4546118930301 14.62758199554 -1.190183059063
+0.4063264863455 14.63446342873 -1.16884077357
+-4.459133223375e-15 14.80710191706 -0.2500224955837
+-4.36436e-15 14.84495699558 -0.1702555616931
+-4.36436e-15 14.86152048489 -0.2680224087033
+-4.36436e-15 14.8995839843 -0.2251674508877
+1.504675681806 15.25034882388 -2.37998674672
+1.456459390853 15.25368974997 -2.358337219504
+1.507290975045 15.26153683115 -2.307277018666
+3.035026540778 16.55350577964 0
+3.089981796294 16.6125885039 0
+1.895617098048 12.65343859097 -1.931561647937
+1.908527230021 12.64321996238 -1.996696318523
+7.78e-18 14.76207525533 -2.278592616815
+7.78e-18 14.8189590934 -2.255656910732
+1.115454383846 15.68078821162 -0.7363852357401
+1.176996839006 15.71354140775 -0.7208764797712
+1.21795868113 15.7340760347 -0.7585097813501
+1.3285 13.57679097498 -1.698316742728
+1.3285 13.51013702309 -1.692608481074
+1.3285 13.54321396794 -1.629804676571
+2.687812822078 15.26919149495 -2.256127969186
+2.622095428232 15.26366868416 -2.293661788601
+2.614017290662 15.27348331155 -2.226695040434
+1.739069741552 16.1278158625 -0.6171686646945
+1.699699327545 16.08994938675 -0.6166375054262
+1.726606991735 16.11760948324 -0.5659095538198
+3.36603737414 13.52457070192 -0.4800798525351
+3.308910310163 13.51935870045 -0.4486986159723
+3.313366246045 13.5174999363 -0.5103788561393
+3.54463643469 17.38540452701 0
+3.491897348714 17.37794321487 0
+8.692284120753e-16 14.99283114492 -2.6066061455
+3.988827117193e-16 15.04362439126 -2.600270988491
+4.472497975425e-16 14.96076129265 -2.566711124961
+0.6102434434824 14.62071127808 -0.825476111125
+3.609458079787 15.91234632177 -1.797302597932e-14
+3.629692017151 15.85621232411 -1.245084468605e-14
+1.725781950016 15.55970548646 -1.039414670767
+1.675459651406 15.51985993543 -1.085676543782
+1.672688174374 15.56148372464 -1.039686961765
+1.231106382933 14.79987166883 -3.3934e-14
+1.232129973839 14.72848135778 -3.3934e-14
+1.99832303118 14.11667845389 -2.489153411426
+2.060943441398 14.14115968425 -2.493476050357
+2.886531162946 15.27015741316 0
+2.940262178527 15.23745113946 0
+3.960690755998 13.58354448897 -0.1237841363113
+4.006614770493 13.58589828101 -0.1717335328894
+1.576539370037 15.65127583046 -0.9555388545116
+1.622362107198 15.62717273591 -0.9741503232004
+1.572947762263 15.59082706247 -1.007468113339
+1.712078560455 14.73680664329 -3.3934e-14
+1.62117575659 14.75828156429 -3.3934e-14
+4.657307018439 17.58574801282 -0.510992687068
+4.594635467037 17.57453607628 -0.514048408066
+4.62348305963 17.63424815211 -0.5161526568498
+1.989593308281 15.3041209876 -2.005801640258
+1.990039229822 15.29714062421 -2.057910053858
+1.939962296772 15.30092707971 -2.029531774438
+3.857060251358 13.97367163618 -0.5450283934234
+3.879446233022 14.02126633697 -0.5414337222391
+4.084227290688 16.47273245036 -0.4212263172021
+4.132177134534 16.44962087453 -0.4029550526949
+4.084534997846 16.41402842259 -0.410900266718
+2.4279 13.11555972319 -0.5061428779036
+2.4279 13.12195714111 -0.5872670991055
+2.4279 13.1623585327 -0.5570963216968
+1.875234726542 12.7919747473 -0.4509832063186
+1.3285 13.14696928935 -0.7233852756994
+1.3285 13.10600943696 -0.6737851760396
+2.010445874264 15.75981788387 -0.8849927344468
+1.964429286579 15.74161472938 -0.8941399488232
+1.950074693889 15.80683210782 -0.8608001201023
+2.956108417617 14.19291157251 -2.502587486618
+3.026026124552 14.22425909341 -2.508120326787
+1.023831373536 14.33305657845 -1.415049213621
+1.022133467148 14.32607520725 -1.498758192047
+0.9905032045934 14.35994818126 -1.44933563008
+1.494159260185 14.55914898241 -2.567172809933
+1.517913181862 14.47475945177 -2.552290367308
+1.446611035364 14.53319568897 -2.562593366797
+1.677399653049 12.70583048696 -1.550032037517
+1.682778085383 12.71352261259 -1.484945858734
+1.621236320737 12.7108030462 -1.507957207293
+1.54457253313 12.7679155179 -0.996827240701
+1.489612815558 12.77729225385 -1.017778159427
+1.3285 13.06481533337 -0.2897120469927
+1.3285 13.12402293683 -0.2794406783825
+1.3285 13.10514654334 -0.3292337712822
+3.282633189417 15.11846649456 -1.360349172796
+3.261719114889 15.13207001269 -1.283271731078
+3.045820470552 14.26748245263 -1.435439931571
+3.065224403063 14.2794715543 -1.367525771915
+3.01739686495 14.22998138629 -1.379755868865
+3.115739352737 14.27107276006 -1.415107549074
+2.178360115357 14.3489124985 -2.530100460944
+2.176691458397 14.42171723726 -2.542940826753
+2.427901812169 13.19949302718 -1.660087112341
+2.427904221483 13.23513687131 -1.600169157769
+3.496117717174 16.34157309087 -3.3934e-14
+3.553481080902 16.30689144864 -3.3934e-14
+3.565418485495 16.37348979121 -3.3934e-14
+0.3150898889161 14.93285976021 -8.17662e-14
+3.298693863993 13.63597450302 -3.36738e-14
+3.249836475359 13.67826272441 -3.36738e-14
+3.245280602036 13.59958731165 -2.653061563309e-14
+1.31712883853 13.78201096995 -1.116099289546
+1.310183934291 13.82409460814 -1.176126939415
+1.319477983126 13.75837983319 -1.2080294794
+1.324603864528 13.71563963056 -1.156852943948
+3.674063357842 14.83592626785 -1.430703253743
+3.604107917781 14.3151627119 -1.165173873679
+3.561426352622 14.3234598411 -1.118141712681
+1.9308674083 13.56077523447 -3.37486151988e-14
+1.861890293472 13.56598520772 -3.374958059133e-14
+1.878104983023 13.50726566895 -3.386717961629e-14
+2.140466805049 13.02709892415 -3.384204822976e-14
+2.062676321939 13.05026725619 -3.3934e-14
+4.500017282734 16.40258836024 -3.3934e-14
+4.425397711323 16.39606105482 -3.3934e-14
+4.465805270909 16.36391123377 -3.3934e-14
+1.3285 13.30889085325 -2.212982529619
+1.3285 13.34597498589 -2.16413622542
+1.915107982588 15.04225460225 -3.3934e-14
+4.8279 14.381235685 -0.3305778588482
+4.8279 14.294486933 -0.3462282866079
+4.795215457954 14.35380650459 -0.3739490920449
+4.8279 14.41914788191 -0.3781632391727
+2.564977214965 13.3474253963 -1.416724021572
+3.663607713632 14.72889178668 -1.422182793736
+3.699382001111 14.72565017668 -1.386651898737
+3.37758890627 16.9587733096 -0.6352551785877
+3.298895866797 16.92173299441 -0.6417822810776
+3.307251492698 16.97727609301 -0.6319934444905
+1.871351455415 15.10665014145 -3.3934e-14
+2.716275874333 15.17869466777 -2.404467935968
+2.712673263937 15.11777690292 -2.424949851101
+2.425047591629 12.92387052533 -1.705287661594
+2.4279 12.95822378788 -1.6121231115
+1.203592092837 15.74107458429 -0.3147152986115
+1.247870097328 15.76557645078 -0.3198796896062
+1.263303890957 15.77345034204 -0.3677059786977
+4.827899999897 15.29905988851 -0.327443851051
+4.8279 15.25032589355 -0.3422100555652
+2.849195974932 15.00626801002 -1.996735790545
+2.866829698896 14.99731043764 -2.04746545388
+3.749183555954 16.00511519816 -0.4689522228185
+3.685378343836 16.01213176854 -0.501396677161
+7.78e-18 14.80914804706 -0.8332485324527
+7.78e-18 14.83088175309 -0.9112924115702
+7.78e-18 14.77861835491 -0.914386483585
+0.4471031824617 15.07304976769 -3.850169964763e-14
+2.474967016746 13.2431726052 -2.088733082551
+2.496642222901 13.23979833704 -2.134366419985
+4.162119346593 15.07695761392 -1.135115543194
+4.163303298366 15.1421830981 -1.146266352778
+4.205025064312 15.12399021722 -1.124922058605
+0.4237209964983 14.57464142979 -1.757719540573
+0.3401070486089 14.5792095652 -1.754210116794
+0.3996882763105 14.56987888677 -1.806275384158
+0.4732726220805 14.56387321327 -1.787805008318
+0.7355231565497 15.21229400976 -2.612146041229
+0.7719271337538 15.21848428331 -2.576080515054
+0.819594406718 15.20762197761 -2.639115563064
+4.061933435706 13.67568928436 -2.865788430028e-14
+4.012215994822 13.69232164455 -3.3934e-14
+3.885442050502 15.1049636212 -1.298930940333
+3.941357797641 15.10892624458 -1.261345423155
+3.916071014098 15.06663842445 -1.271110366267
+4.182411354552 14.89683841066 -3.3934e-14
+4.194951207988 14.96600959849 -3.3934e-14
+2.642031942122 15.30650379542 -1.986960981958
+2.651218681591 15.31604175126 -1.912659875498
+2.712367256508 15.30912046433 -1.966766273291
+2.756347447911 13.42002618326 -0.9458919572195
+2.814303830546 13.42898808553 -0.9432747124942
+2.776805611951 13.42777582059 -0.8782956792818
+1.531607982597 12.97329292444 -3.3934e-14
+1.479343891012 13.00516037798 -3.3934e-14
+1.450822589277 12.93583999566 -3.3934e-14
+3.687951911627 13.88235898305 -3.367989801516e-14
+3.669029670001 13.94176969116 -3.379807085549e-14
+3.624078426447 13.88050442077 -3.36738e-14
+2.4279 13.24406293563 -0.5904409944785
+2.4279 13.21055042971 -0.6367368562383
+2.4279 13.2618331706 -0.6385818531725
+4.062251466835 17.76202446654 -0.3232404575048
+4.112891845054 17.7738979414 -0.269795821351
+4.07583056839 17.76647078962 -0.2347765721364
+4.313393304866 15.59673723502 -0.4333394359132
+4.244096442415 15.59178697101 -0.461362529075
+4.259957439628 15.60159411083 -0.4057641567818
+3.574193687854 14.28948548102 -1.310958330497
+3.553246446065 14.29798462885 -1.262706389933
+3.521012796144 14.29005163606 -1.307680437836
+3.541411677655 17.22306336161 -7.014951119174e-15
+3.556117827496 17.1675765097 -1.333669778436e-14
+3.598707919365 17.22655653556 -2.871365765751e-14
+3.607981653748 17.1516898789 -2.53271537336e-14
+1.3285 13.12093018546 -0.8856069506457
+1.3285 13.06570373032 -0.8816194449236
+1.3285 13.09099663457 -0.8112281356003
+1.175594842558 14.71306310919 -3.3934e-14
+1.12717220284 14.68659129633 -3.3934e-14
+0.7587235109783 15.54843415669 -0.3761452276371
+0.8145500728204 15.56782773127 -0.3421267727982
+0.8346109023813 15.57354603418 -0.3914281753594
+0.8625355074868 15.58499321116 -0.3454677293375
+7.78e-18 14.81599420982 -1.905609427078
+7.78e-18 14.8684375184 -1.869873383886
+7.78e-18 14.84149835493 -1.958824692556
+0.6165561854558 15.24631253412 -2.405707673456
+0.5692996249394 15.24971509522 -2.384217192651
+0.6343351032912 15.25433786873 -2.354083388302
+2.632330209174 15.22640025372 -2.974338466343e-14
+2.579861623 15.19038311611 -2.34240930582e-14
+2.630201480396 15.15703078491 -7.535858801976e-15
+2.561098854542 15.27112910219 -3.3934e-14
+1.90037069171 14.51292476322 -3.3934e-14
+1.860248057695 14.42909052574 -3.382371588493e-14
+1.937581199382 14.47364597083 -3.3934e-14
+1.916457264944 14.4194569133 -3.381684608189e-14
+1.738858922268 14.58260798153 -2.571306435779
+1.718589053088 14.53309849763 -2.562577836914
+1.687180466318 14.5883385604 -2.572313413998
+1.125640621679 14.23657648146 -1.197134146741
+1.113359581453 14.24857919298 -1.250112486281
+1.143825728259 14.20696989671 -1.254500063543
+1.31055184433 13.81568114274 -1.243675892115
+1.317612639607 13.76647726732 -1.259542306356
+3.687785026006 13.64996896105 -0.5864629788602
+3.731180563944 13.69140676246 -0.5664852909314
+2.718807796479 15.37337397336 -1.422618291292
+2.76915009025 15.36751195462 -1.456464218281
+2.720351950912 15.36261645509 -1.492644769148
+2.94547452462 14.16948514991 -1.991207496545
+2.862121994635 14.17496451463 -1.960139346411
+2.86391989406 14.16545322687 -2.013983668466
+3.563193500781 13.5515346052 -0.1973807900474
+3.627302686151 13.55820805213 -0.1309716599059
+3.541947774772 13.55024856113 -0.1365306967573
+4.147708366949 13.61285681977 -6.032274124609e-15
+4.194982997917 13.59697780882 -0.05751896543441
+4.228133782613 13.63118328803 -1.082607884574e-14
+2.4279 13.03701395597 -0.6504658195605
+2.4279 13.07337167935 -0.5737763186353
+0.7895399697523 14.56618064285 -0.402090974073
+0.7533321283497 14.58149525665 -0.463034523612
+0.8146710648969 14.55100323987 -0.4519769813789
+0.8475062111637 14.53259505718 -0.4080050447701
+3.664595660928 15.57395991046 -0.5622285380972
+3.605094224518 15.57829846842 -0.5377530108075
+2.861782939998 13.64481642437 -1.588756413943
+2.843852904609 13.58398972943 -1.622904259929
+3.197836997805 17.19690605446 -0.5932588356932
+3.189085663298 17.26894247988 -0.5805547519315
+2.056356330207 12.69433488389 -1.640855019639
+2.122315019918 12.69592110478 -1.628325174762
+2.080211759626 12.70249213344 -1.576419434433
+2.096525557193 12.69025453062 -1.67182158882
+0.5153021524826 15.48197697851 -0.4672279968472
+0.4815211874979 15.47643590791 -0.406806929596
+0.5367896245855 15.48848445425 -0.3989787745093
+3.830607675744 13.70709373246 -3.3934e-14
+3.818466175836 13.78515594306 -3.3934e-14
+3.762376494253 13.75940537655 -3.381280506979e-14
+3.528997490341 16.58878920241 -3.3934e-14
+3.567275727611 16.54903207848 -3.3934e-14
+3.580539853211 16.62104211967 -3.3934e-14
+3.150980093853 13.7466562604 -1.09936086027
+3.146397807536 13.81209843863 -1.116771816409
+3.193745538033 13.76252285541 -1.047409407498
+2.776749275809 13.85810509453 -1.881475090118
+2.778872232823 13.80808702578 -1.864364268841
+2.757775212516 13.79467373279 -1.945887307108
+1.568223881313 13.69925510949 -3.36738e-14
+1.523603001889 13.66453900139 -3.371761599777e-14
+3.930172717937 15.80922647892 -3.3934e-14
+1.70209 15.976 0
+3.524769767113 13.97419244949 -3.36738e-14
+1.127016395867 14.2659994121 -0.7356004648031
+1.100091045204 14.30411423001 -0.6929933702468
+1.068018896256 14.33674157469 -0.7491939637688
+1.058238994073 14.35053031891 -0.6888851856442
+4.576928350738 14.50373588965 -3.3934e-14
+4.613478180329 14.56733138041 -3.3934e-14
+4.518326265956 14.54494549483 -3.3934e-14
+1.3285 13.16548206695 -0.1996049696247
+1.3285 13.2282907105 -0.2082730959016
+1.3285 13.18495648094 -0.2476645977572
+3.967443434674 17.07175748327 -3.3934e-14
+3.28235272496 14.114139092 -1.008599720575
+3.330675645912 14.10949688445 -0.9568908638187
+3.318471575186 14.04863811173 -0.95863697076
+2.160719337592 13.74950775149 -2.424402687282
+2.111532933746 13.77972647857 -2.429738908741
+1.744198528949 12.7992694629 -2.256853298406
+1.811468613229 12.78050815525 -2.253549658739
+1.765303705938 12.73306169804 -2.24518519986
+1.797419289824 12.84474612353 -2.264882314314
+1.3285 13.08256591634 -2.193660836615
+1.3285 13.06065978582 -2.24399214538
+1.3285 13.01453792094 -2.175458317143
+2.903694077804 14.16271432217 -2.497264733299
+2.4279 13.00999998616 -1.506719952745
+2.4279 13.00629174783 -1.428528642585
+2.424539331714 12.95023075995 -1.470370933055
+1.632143462587 13.40382924019 -2.363455431395
+1.581096802104 13.47506364781 -2.376017890728
+1.3285 13.21424924801 -0.1464434957958
+1.3285 13.25503802959 -0.0676552821159
+1.3285 13.2863362978 -0.1492430495749
+3.02902058205 15.68884830918 -0.9223634352159
+2.996855075154 15.72752898996 -0.9040448060909
+3.053839918235 15.74283859094 -0.8933872782643
+4.613823430667 16.75645166519 -3.3934e-14
+0.760398348629 15.52771502432 -0.9054810511534
+1.477173513389 14.04727418527 -3.390450206826e-14
+1.468999542392 14.10357333606 -3.377127113352e-14
+1.427257207616 14.06430560207 -3.3934e-14
+1.432665639626 14.01184175162 -3.388619282701e-14
+4.045271720728 14.16985181153 -0.492759406191
+3.995308891846 14.18208313237 -0.5159307584161
+4.068315233255 14.22456679545 -0.4931545809347
+2.548730957598 16.75170944211 -0.6717582378194
+2.484979624002 16.707760259 -0.6795098496348
+2.305490600564 14.55560954183 -3.3934e-14
+2.223516706353 14.59310965857 -3.3934e-14
+2.261913157026 14.52330178024 -3.3934e-14
+3.606963915272 16.72921118774 -3.3934e-14
+3.671488325655 16.74702147845 -3.3934e-14
+1.323741261661 13.77835554724 -0.3174488153163
+1.314214775375 13.84179413184 -0.3725574243372
+1.324565646082 13.76016333597 -0.3690528141046
+1.326153090923 13.72968005617 -0.2925592893973
+4.044123768127 14.79365918575 -3.3934e-14
+4.112643147774 14.80675905819 -3.3934e-14
+0.5201287076345 14.59042226545 -1.489022898429
+0.4917834603112 14.60178171899 -1.417722724359
+0.4392132906067 14.60393877997 -1.474713332341
+0.5731417694892 14.58387513265 -1.425136163624
+3.400482104506 14.3533223322 -3.36738e-14
+3.475742222999 14.32944592796 -3.374156358629e-14
+3.46113920078 14.38009837446 -3.371719086813e-14
+3.467297802665 13.64212511451 -0.7481216858575
+3.456283487728 13.70008444033 -0.7680694348687
+0.05837688290912 15.4155282788 -0.7967587194784
+6.413756807555e-07 15.40753454408 -0.7602812856143
+1.143501795284 14.25244408789 -0.5423205782845
+1.103532057231 14.30478065876 -0.5815016892431
+1.125118039587 14.27403068992 -0.6200709003722
+1.347523023543 12.85632639704 -1.590410993081
+1.341064590408 12.89548772589 -1.535777372408
+1.334135452047 12.92280148085 -1.600460859996
+3.882094998098 17.16961454509 -0.5980795418388
+-4.36436e-15 15.1511076394 -0.5036010370977
+-4.36436e-15 15.10838047144 -0.4427190035438
+-4.36436e-15 15.15617942775 -0.4255155121527
+1.866302615332 15.22445401067 -2.54027249918
+1.909329501492 15.23310817198 -2.488142373628
+1.794298541769 15.5878931982 -1.011498887211
+4.148859079067 14.62198352323 -3.3934e-14
+4.127816433319 14.70974873206 -3.3934e-14
+4.096219443487 14.61689072392 -3.3934e-14
+3.306500653692 15.51935993929 -0.8721144815186
+3.267298168392 15.5270899127 -0.8282369312234
+2.799933107107 13.36844896265 -1.566289120262
+2.828400623104 13.37131573364 -1.628934288159
+2.847218978016 13.41183876189 -1.583394390653
+2.839534399739 13.38068859571 -1.511289448371
+2.807782865526 14.65175508077 -2.583499550634
+2.764648147841 14.61369708996 -2.576797649901
+1.3285 13.35923015013 -0.257142517017
+1.3285 13.35620749006 -0.1806122870725
+4.602215057947 15.08773691959 -3.3934e-14
+1.367054384671 15.4542253133 -1.184993241444
+1.44422583107 15.45955700586 -1.176037656302
+3.267574692109 16.10091396475 -0.7829792094186
+3.277802436807 16.17511014954 -0.7734253783155
+3.321475203649 16.12295737418 -0.7462188089237
+3.338108385961 16.21401170249 -0.7499558669805
+4.069639705417 14.6138836867 -1.098972723967
+4.106766474057 14.58532085302 -1.074680652274
+4.064947450988 14.55934015631 -1.091864492852
+4.248855857041 17.70675506101 -0.5033560810943
+4.234728930539 17.65577062004 -0.512350917979
+4.175459943496 17.69740554749 -0.505009263634
+1.936363549613 15.7881590076 -3.3934e-14
+2.280084077897 15.1539131007 -2.672042247689
+2.332809238314 15.16012537922 -2.673138070054
+2.298007027731 15.07071568977 -2.657366540007
+3.535701406167 14.15481540318 -3.384932063353e-14
+3.50092652975 14.19160754779 -3.371288735216e-14
+1.3285 13.30575691344 -0.8339697007675
+1.3285 13.24128239042 -0.8407892485927
+2.369837264669 12.88414810152 -0.5517555417914
+0.2991408456754 15.42938263937 -0.8563262837692
+0.2412886632259 15.4249799308 -0.8241136976526
+0.3141054551871 15.4345042717 -0.7976886386394
+0.361454175038 15.43870203724 -0.8354910403481
+1.3285 13.22883185547 -2.034588636869
+1.3285 13.30785070084 -2.059697043635
+1.3285 13.26016105944 -2.096431444447
+1.120148214774 15.67632788489 -0.8756882991419
+0.8862161825226 15.22442963302 -2.540398727926
+0.9481655794898 15.21444090056 -2.599676770959
+0.8877469200073 15.20891331554 -2.631636197195
+7.78e-18 14.77760826123 -2.177912375387
+1.3285 13.26472888956 -2.252353516721
+1.3285 13.20499493703 -2.316202883171
+1.3285 13.20572108462 -2.248060194295
+3.667131502282 16.91432515988 -3.3934e-14
+3.614740565885 16.93326355961 -3.3934e-14
+3.401484336995 14.41187116747 -3.375306094412e-14
+2.201365278385 15.27330502777 -2.227908244283
+2.164545521573 15.26775032936 -2.265752889998
+2.119134992619 15.27175640099 -2.238538893128
+7.78e-18 15.03364491519 -0.8885983029743
+7.78e-18 15.01786371146 -0.9391473326156
+1.3285 13.01809872296 -1.395595926146
+1.3285 13.05257995412 -1.441307900123
+1.3285 12.98687616625 -1.44359271583
+1.868668368065 12.7593356544 -1.018348437456
+1.869881709456 12.76457018838 -0.9514187885446
+1.814171773071 12.76215278769 -0.9833805899372
+2.748802677551 13.39766115507 -1.209696181265
+4.685870656983 13.88870127047 -3.3934e-14
+4.774043847555 13.90330550773 -1.845828378013e-14
+4.705377921055 13.95172311604 -3.3934e-14
+4.640524772872 13.93661825248 -3.3934e-14
+2.79215192367 13.91652685068 -3.36738e-14
+2.859634971045 13.8897679004 -3.36738e-14
+2.859264250618 13.97729205184 -3.36738e-14
+2.160266978293 13.5342601084 -3.36738e-14
+0.9651545376107 15.31982912294 -1.881270716249
+0.9991312314522 15.32518119083 -1.837608403136
+1.03512175189 15.32002316763 -1.879650467511
+0.8080979132242 14.45616221866 -1.752350002676
+0.7667014439154 14.48098207233 -1.717806074237
+1.895134568293 15.2919054676 -2.096870971446
+1.882915799253 15.28504384263 -2.145971643531
+1.828432011758 15.28947238251 -2.114227682981
+3.607838236635 14.83720424484 -3.3934e-14
+3.558777682939 14.85591160246 -3.3934e-14
+3.539211697311 14.78826321867 -3.3934e-14
+1.3285 13.04555274899 -2.114193148221
+1.3285 12.99170390387 -2.118869930508
+2.016128957148 15.26731003542 -2.268422642894
+2.044260785815 15.2610810733 -2.310062051659
+1.989864301618 15.26036027494 -2.314834232072
+2.074086852894 15.30061537323 -2.032054190094
+2.030627764001 15.29266375472 -2.091027113207
+1.3285 13.07668645162 -0.4893039048177
+2.27277297739 15.76819946428 -3.3934e-14
+2.292762087974 15.69581365693 -3.3934e-14
+2.350376858467 15.71956851063 -3.3934e-14
+2.693324013747 14.73794590956 -2.598701238682
+1.826902838879 13.34246598064 -2.352635919037
+1.885131651251 13.38795965255 -2.360663156088
+1.884473604543 13.32988948396 -2.350421751974
+0.468729574017 14.76788579281 -7.613718739628e-14
+0.4745144820613 14.84617946198 -6.991151432344e-14
+0.4075417347737 14.81290993056 -8.17662e-14
+0.4029073699967 14.72177991788 -5.21907856425e-14
+1.927280698563 13.36428146762 -3.3934e-14
+1.874430932534 13.34323997041 -3.3934e-14
+1.915602487089 13.30398763966 -3.3934e-14
+1.626891461311 13.29078937131 -3.3934e-14
+2.717632105702 14.96050718303 -2.355234017322
+2.782291359317 14.94793180942 -2.327270871174
+3.308762490408 15.95988879211 0
+3.251960298491 15.98041946862 0
+3.264166893516 15.92534882893 0
+4.8279 16.23439383891 -0.1415069989313
+4.8279 16.21799236545 -0.08761435283286
+4.827900000011 16.1868590072 -0.1648849442788
+2.323044165482 12.80627329989 -1.082099654609
+2.295489396289 12.79197132042 -1.032840264246
+2.267340408901 12.77221477425 -1.078430140656
+2.295296218065 12.78308535146 -1.135848937949
+7.78e-18 14.95775681992 -2.143889312261
+7.78e-18 14.99909779729 -2.194174123808
+7.78e-18 14.94604153161 -2.211384232102
+1.728678276312 15.34607252969 -1.65410762772
+1.632074652983 15.34621193452 -1.652960269509
+2.034645727862 15.4021786721 -1.30378494637
+2.054683344155 15.41943951241 -1.260667249825
+2.05720230574 15.38543114238 -1.359626149777
+4.385134522448 14.46517560472 -0.9456953234492
+4.39905121135 14.52021888274 -0.9517271081689
+0.03436487473978 15.23259583821 -2.491309110759
+0.09267115458426 15.23205789479 -2.494655806068
+0.06071468900164 15.22445329874 -2.540556540252
+4.541390624765 14.56425067307 -0.9271020272929
+4.590521626411 14.54610352189 -0.915807671731
+4.533546808068 14.51050673155 -0.9189273920198
+4.465102650275 14.56022454508 -0.9419969114343
+4.281516263609 14.40057962721 -0.6807578949225
+4.233227973577 14.40996678505 -0.6274997546074
+0.1995300187214 15.35163329401 -1.601225252204
+0.262306646888 15.34826967041 -1.633501157507
+1.208624291763 14.12560408902 -0.9772054899038
+1.18603049408 14.16496679165 -0.9538731202982
+1.19025962891 14.15291095575 -1.024805322938
+0.005110705787456 15.08658608262 -2.660166322225
+0.02989338658153 15.1361145579 -2.668900796863
+0.08675480610529 15.06657257169 -2.656634480672
+1.3285 13.37142325554 -1.019434496635
+1.3285 13.31940305449 -1.029389600046
+1.3285 13.34156869887 -0.975686229844
+1.594714606093 15.20946933058 -2.628592359182
+1.660638598389 15.20832099826 -2.635188570508
+1.600533411595 15.16697878878 -2.674346985502
+1.534176111159 15.20665042545 -2.644714855106
+2.78408794341 14.87220929978 -3.3934e-14
+2.824212208248 14.93192416125 -3.3934e-14
+3.062706864977 14.10761187206 -2.342029053474
+3.10935925876 14.10079413406 -2.380726020201
+3.117130914375 14.10959117096 -2.330745149997
+4.01349810619 15.56366683449 -3.3934e-14
+3.964241794327 15.55059196792 -3.3934e-14
+4.014145243075 15.48562019543 -3.3934e-14
+3.826060655344 14.95785901646 -1.317155842894
+3.803265555476 15.04151349563 -1.350430154525
+3.862911451788 15.02514731795 -1.301472282301
+3.767977489194 14.97304356943 -1.367429553218
+2.815368013331 14.58842112325 -2.572341657758
+1.294044311567 13.9221860696 -0.7219443038143
+1.285515002025 13.95415809771 -0.7618235861407
+2.520576420608 13.31030335683 -2.346959715886
+2.600695712311 13.30581902497 -2.346170321138
+2.539604374185 13.26344404311 -2.338699741305
+0.9069576951386 14.48250430797 -0.6993039399244
+4.569923248925 17.37237683604 -0.4806329606879
+3.305264352082 16.05530629484 -0.7462380224079
+3.250062462113 16.03098933175 -0.7846775641482
+2.011783292563 13.05677577099 -3.3934e-14
+2.007830002421 13.10793075804 -3.3934e-14
+1.930519128765 13.08905678058 -3.3934e-14
+3.258163359844 15.45312008416 -1.187260701181
+3.205453381101 15.44845710589 -1.195913148042
+2.734541853879 14.95155937544 -2.30679330917
+2.728049328797 15.00114850223 -2.292258156162
+1.264794256148 14.01416572518 -0.7251989459941
+1.243614116055 14.06515588708 -0.7683810433689
+1.262566189627 14.01668504919 -0.7927159556892
+1.279178774865 13.94717633227 -1.127547490225
+1.255735396008 14.01222654733 -1.136136417176
+1.260307635679 13.99459395051 -1.194258507279
+2.969202116488 15.45808894659 0
+2.919574668234 15.48991173359 0
+2.904175582167 15.40665432791 0
+0.5711015882235 14.55149989144 -1.728601676714
+0.5919264292783 14.55257919023 -1.67489404133
+0.5045591100762 14.56866598229 -1.708561035813
+3.387904173457 15.07784450812 -1.590682042567
+3.426083787119 15.08511760401 -1.549579104698
+3.477104199065 15.08087774837 -1.573640973159
+4.632606124545 17.38967363991 -0.4781568297607
+4.548256939829 14.92743450764 -3.3934e-14
+4.566540692459 15.00368771173 -3.3934e-14
+3.527682891592 15.12145007398 -3.3934e-14
+2.541117338603 15.71724152345 0
+2.556668456623 15.77447769394 -2.265388439633e-14
+2.475350409433 15.77484642641 -2.163560068355e-14
+4.380677455234 15.02541642566 -3.3934e-14
+4.352643269479 14.95733302488 -3.3934e-14
+1.244632042409 15.31156053037 -1.947790276405
+1.172381280142 15.30523234754 -1.996762845815
+1.300083420738 13.91314709856 -0.3206276137813
+1.288608222803 13.9599598107 -0.2697954422808
+1.257925009621 14.04945136772 -0.2724818515819
+3.119201094511 14.24551534871 -1.229732378741
+3.111920691978 14.18931444149 -1.230100179094
+3.089803403782 14.22099362512 -1.266900968945
+7.78e-18 14.84362446097 -1.611608801216
+7.78e-18 14.90607757237 -1.617572410155
+7.78e-18 14.88909205616 -1.684265400245
+1.3285 13.63074099858 -0.8060732309262
+1.326684487071 13.69531443378 -0.8540545717574
+1.3285 13.61832889272 -0.8665230841153
+3.224449823738 13.73036580706 -1.005915003202
+3.264468082051 13.74499229643 -0.9625189282959
+2.729375401395 17.14883842291 -0.2588447295614
+2.482680885315 13.32993087434 -1.44722319282
+2.517628244461 13.34306564386 -1.381121959677
+2.459271840882 13.33334980968 -1.37577668253
+2.4279 13.28079477118 -1.425642738971
+2.947192971774 14.7470506014 -2.600300979592
+2.87830745016 14.70888551396 -2.593575292673
+2.897674669959 14.75435891794 -2.601588518562
+4.534574304929 15.8968009231 -3.3934e-14
+4.562564225186 15.95194045726 -3.3934e-14
+4.509074918744 15.95153592948 -3.3934e-14
+3.746065666372 16.48643073325 -3.3934e-14
+4.125574567207 15.04968688184 -3.3934e-14
+4.122917287976 15.11329362985 -3.3934e-14
+4.06961385468 15.09357104039 -3.3934e-14
+3.045894793241 14.22263289849 -3.36738e-14
+3.023549676174 14.30385243329 -3.36738e-14
+2.784103437432 15.15175229123 -6.073708827948e-15
+2.736876968341 15.1146026693 -2.092616156582e-14
+2.819265878937 15.08403624852 -1.432070175275e-14
+2.335462350889 15.24699211167 -2.401547173052
+4.3852084077 14.89934142821 -1.022220167298
+4.388585327567 14.84454397922 -1.011653033693
+4.336066744465 14.84678985577 -1.028099354705
+4.44124819896 14.85545412019 -0.9997653170045
+4.701993119921e-17 15.07763295436 -2.56127727546
+1.811768402178 13.73625218348 -3.36738e-14
+1.804369402248 13.79057680413 -3.36738e-14
+1.748663097023 13.73942030394 -3.36738e-14
+2.640222986837 15.2246889214 -2.538961742103
+1.820141111999 14.88138553334 -3.3934e-14
+1.271075719913 13.82140885561 -2.323910445207
+1.2919280545 13.76425297237 -2.264449789339
+1.26609044072 13.84295179151 -2.278703213499
+2.167579931659 15.24468956069 -2.415999583387
+2.248600547634 15.25102826655 -2.37567357051
+2.235648581468 15.23926780648 -2.449854744703
+3.611305347164 17.0068899283 -3.3934e-14
+3.554376895656 17.07976340351 -3.3934e-14
+0.326128716573 14.53357852235 -2.103068312266
+0.3231962406963 14.54222811237 -2.04193791527
+0.2663697094404 14.5389480185 -2.066027883905
+0.6897452822981 14.60838895084 -0.4852404603716
+0.7105622571443 14.60254393783 -0.4351835021231
+2.504229993848 15.45224835146 -1.188735293385
+2.456424024128 15.44432356463 -1.20700081251
+0.2332566286654 14.68455521629 -0.1040327290966
+0.2197739578674 14.6839127914 -0.1758708191517
+1.3285 13.60158949311 -0.6694548856887
+1.3285 13.55505750773 -0.6927110007109
+1.3285 13.57615526243 -0.6135484418325
+2.497683979458 15.51829200334 -1.134340729275e-14
+2.449867785851 15.54276407485 -1.098125582005e-14
+2.45206951103 15.48095590201 -3.099595110414e-14
+4.470394762879 16.96216575153 -0.4208961769748
+4.520870434147 16.99420218142 -0.4195019814447
+1.834889391737 15.15336576795 -3.3934e-14
+1.780507280986 15.17691184781 -3.3934e-14
+1.758269664704 15.13050372708 -3.3934e-14
+3.793577102958 13.89693202406 -0.5654852403126
+3.800828933132 13.96022314035 -0.5727456130772
+3.83519940915 13.92524219809 -0.5481827900002
+3.289043009516 14.85412530336 -2.040116721409
+3.272045573482 14.85181388934 -2.087657968882
+3.110980105271 16.23824181799 0
+3.048742589302 16.19546524646 0
+3.088128201139 16.15976304268 0
+1.948305604593 14.54216818158 -3.3934e-14
+2.093336624108 16.4554779277 -0.7239935030129
+2.149327735311 16.45949060482 -0.7232819392493
+3.716193395745 14.39225106505 -0.7279669950346
+2.94315158595 15.22902613672 -1.68110533989
+4.013333870234 17.72533890184 -0.5000788860785
+3.943649529934 17.71671180962 -0.501603121141
+1.177380580892 15.35478813286 -1.570868736386
+1.179819032987 15.34757687144 -1.640437306159
+1.114028593839 15.35118120687 -1.605703865672
+4.026832809198 14.25413983473 -0.5153813631822
+3.976592025814 14.26185275544 -0.5378704838099
+4.045574166402 14.30645006152 -0.5167184163188
+3.881035557839 16.41461813802 -0.4832127835443
+3.484190395231 14.74431110904 -3.3934e-14
+4.183154221199 17.78932275565 -0.1293167467437
+4.203643364942 17.79254014621 -0.2069505094829
+1.239321181062 13.9483640108 -2.029664280913
+1.267003930543 13.8793171917 -2.028419843043
+3.500922018751 13.53634436111 -0.5362300071294
+3.480989503523 14.98998518984 -1.69064377186
+3.493209482861 14.92664955817 -1.662108249288
+3.45326985002 14.93369225094 -1.722857620146
+3.533479033092 15.00091220378 -1.620151777139
+4.676119534182 15.73530628481 -3.3934e-14
+4.663179917884 15.78974233408 -3.3934e-14
+4.594871845516 15.76681413297 -3.3934e-14
+3.617265428244 13.55236291696 -0.3884038980155
+3.655578450836 13.55370321652 -0.4536206894769
+3.738168847845 14.41442670305 -1.295622792277
+3.74024125921 14.46480705603 -1.302674903572
+3.773057325488 14.44057804869 -1.269333852065
+0.5761922679105 14.44304429886 -2.469024466508
+0.5985968567551 14.42919267415 -2.516173590776
+0.6373266427874 14.4270050649 -2.46034626119
+1.554915511515 15.40199256234 -1.305255035877
+1.509686732535 15.41153406602 -1.276513918573
+4.766836556209 16.87842167221 -0.3814120741715
+4.8279 16.88817214794 -0.3445783198904
+4.784837463028 16.92508585945 -0.3892781512471
+4.233371846833 17.31578805095 -3.15780407357e-14
+4.229100037764 17.38149260084 -3.3934e-14
+4.168427852762 17.3266330435 -3.245364232931e-14
+4.200439437653 17.27808471786 -2.0471219247e-14
+4.338237043793 17.81149601401 -0.3707970662657
+4.316624554991 17.80689104329 -0.4308177048038
+1.132175436103 15.27314028977 -2.229014660286
+1.177423664205 15.2790484351 -2.188332436189
+3.56960860825 17.18574049222 -0.5952349551922
+3.574054511504 17.13571796707 -0.6040523259244
+3.517277983123 17.15168030063 -0.6012389988584
+4.549621490553 17.83798866705 -0.1741689165647
+4.495041104724 17.83383949772 -0.09919088213849
+4.553082174193 17.83886574332 -0.09585178186856
+2.420080682081 14.63426348968 -2.580413786862
+2.380272762851 14.60294873465 -2.574892345274
+1.3285 12.91504270191 -2.094618111456
+1.332016001453 12.86884230656 -2.057502589746
+3.846384109098 17.49506233547 -0.5406843480498
+3.815169097316 17.44269117947 -0.5499229213198
+3.793589627553 17.49180496298 -0.5412608348934
+1.622703337902 12.92866463487 -3.3934e-14
+1.610711745798 12.87480279205 -3.3934e-14
+1.678443203594 12.85957330164 -3.3934e-14
+2.112685038644 12.70720305438 -1.538418190709
+1.182636615863 15.10375192277 -3.3934e-14
+1.215915552993 15.04316695244 -3.3934e-14
+3.18151175013 14.18993125086 -1.875142947877
+2.200594798033 15.07909156297 -3.3934e-14
+2.134739908936 15.08457704797 -3.3934e-14
+1.370650585921 15.84476495025 -0.006650428160717
+1.371394365229 15.84496769169 -0.09303539298873
+1.321241262973 15.81272307618 -0.05770552002431
+3.119768615281 15.98225690554 -0.8074315390144
+3.106851179961 15.90349482017 -0.8268011828151
+3.550604331325 15.52758361606 -0.8254888876067
+0.1535319709872 15.42602962445 -0.6582476800208
+1.018248773791 14.26309638264 -2.514968851704
+1.088612130112 14.23903816855 -2.510732510937
+1.01706456546 14.19021874094 -2.500741699729
+1.085073766967 14.16889484686 -2.498362611213
+1.520505563925 15.94734790956 -0.3404971755659
+1.45231051248 15.89716955701 -0.325218330616
+1.479480459587 15.91740131162 -0.2869737978101
+3.192494885461 13.49321548859 -0.7353337498776
+3.202743927928 13.49750903137 -0.6754594658739
+3.138396342819 13.48808346519 -0.7050929118305
+3.09545058814 16.98323404727 0
+3.10316715812 16.92155444246 0
+3.155873530005 16.96863996632 0
+4.731157825223 15.9822480909 -3.330812661215e-14
+4.769247261678 15.94952965545 -2.019401402422e-14
+4.792157759975 16.03587347936 -1.230597781063e-14
+0.5992787473702 15.37921541062 -1.382417124939
+0.6250629555408 15.37046237659 -1.436607245717
+1.97657790833 16.03275846733 -1.235535357727e-14
+1.961699246623 16.11026966709 0
+1.019995235935 14.30959866171 -1.665639951708
+1.08091653229 14.25001870724 -1.622420570735
+1.03704692789 14.30139352251 -1.598567932311
+2.97449711737 14.43280844381 -2.544889501932
+2.991209491438 14.49893702806 -2.55655167389
+3.06433707693 14.4674162359 -2.550993380696
+3.028251089677 14.38989479449 -2.537324548529
+0.229494227991 14.81500694302 -8.17662e-14
+0.2216910961885 14.73154942598 -5.443640748926e-14
+0.2704035083352 14.75304473331 -6.388743345448e-14
+4.767753226515 15.18952368855 -0.9571942976595
+4.801573209087 15.2002234042 -0.8965617945025
+4.8279 15.18809984711 -0.9497995896759
+0.0850759276605 15.41253863079 -0.8609320683994
+0.03052107511566 15.4115512738 -0.8600874329904
+1.3285 13.01641978782 -1.881054236264
+1.3285 12.97298987651 -1.852297195153
+1.3285 13.04803785551 -1.8400249385
+2.711875251691 13.43817952778 -0.4693117063556
+2.735647668978 13.43924540561 -0.5374901363633
+2.765769306263 13.44682382695 -0.4566272937822
+0.2336240118009 14.66127899558 -0.8336147105435
+0.2474722244575 14.65791358296 -0.8910885780556
+3.586430388526 15.09242918728 -1.508199211838
+3.579137719078 15.10806531824 -1.419283818156
+3.625812698966 15.10051283106 -1.462276527942
+3.129371981899 13.88360005163 -1.15156236457
+2.807111042497 13.39694467563 -1.31138602231
+2.798673903767 13.40045268311 -1.261612536949
+1.290209922613 15.61044742897 -0.9902608300547
+1.301790749257 15.66147473665 -0.9478359590058
+1.367343995044 15.64908423418 -0.9571643443719
+1.351040306635 15.59568759629 -1.002297726609
+3.421931960627 13.78107389576 -0.812700512793
+3.388947111335 13.74548334214 -0.8362050802787
+3.227290706279 13.78298599287 -3.36738e-14
+3.180846711635 13.83023099695 -3.36738e-14
+3.178135812099 13.77115769713 -3.36738e-14
+1.539512581704 15.0639205527 -3.3934e-14
+1.975786514428 15.18336934383 -3.3934e-14
+1.925564477524 15.20817202999 -3.3934e-14
+1.858693799546 13.85802520274 -2.443541266221
+1.791273269199 13.84601462708 -2.441426983873
+1.805823367279 13.89946528758 -2.450848499634
+3.987009620765 17.0957021914 -0.5631479997648
+0.7475349100788 15.39795262087 -1.317801479077
+0.7243784624709 15.38117984272 -1.375192346048
+0.6899484968237 15.39945349325 -1.31064327646
+0.7190437608655 15.41840540711 -1.264124699035
+2.079596703696 14.68519322908 -3.3934e-14
+2.014507926088 14.68164224331 -3.3934e-14
+3.18497956404 17.44006912375 -0.006307296102221
+3.187268850409 17.36910478964 0
+3.235907266664 17.4405786466 0
+2.4279 13.06604153381 -0.04872620932225
+2.4279 13.07894559783 -0.1358924411866
+2.4279 13.14064032819 -0.08222089806082
+1.674917459875 13.15165768551 -2.31899480845
+2.092338207375 15.0201672542 -2.648449987727
+2.680414883057 14.10265739174 -3.375128568971e-14
+2.740791812597 14.10731602057 -3.38478041268e-14
+2.712050898854 14.15087578216 -3.392549566218e-14
+4.519974934335 15.57428132585 -0.5606811461444
+3.203449601188 14.00262212018 -3.36738e-14
+3.250337575703 13.98218737898 -3.36738e-14
+3.260691808724 14.06233106347 -3.36738e-14
+1.516281630238 15.28988573199 -2.1116059886
+1.531165729473 15.2791288378 -2.187846661386
+1.276878452119 14.52331304347 -3.3934e-14
+3.367426266593 14.95656645272 -3.3934e-14
+3.903203568385 14.32945273133 -1.149575388751
+3.855244920126 14.35652330651 -1.189170624115
+3.888241743881 14.39751644843 -1.172274070577
+4.395989065677 15.8258658053 -0.2323354143591
+3.925911822411 16.42749705394 -3.3934e-14
+3.966633252848 16.38922098207 -3.3934e-14
+3.685221823922 14.56062370808 -3.3934e-14
+3.615996951911 14.58709981903 -3.3934e-14
+4.8279 14.13073827871 -0.01843126940242
+4.775628483851 14.1228218323 -1.797523643005e-14
+2.153304582158 16.60388767689 -0.3405529643718
+2.201141756369 16.66007016481 -0.2976040156337
+4.691717735735 15.9047221804 -3.3934e-14
+4.671847349395 15.84501975045 -3.3934e-14
+4.397303637159 16.697413468 -0.3857288488806
+4.373609036185 16.75107018179 -0.3996232573877
+4.459859128595 16.72418767027 -0.3805574860443
+1.369499943722 12.79147900928 -1.827370342512
+1.34359632736 12.84471562057 -1.826023954837
+1.339371228418 12.85749908174 -1.886535746377
+1.374674819555 12.7753860061 -1.884125807367
+2.938823643054 13.46566829526 -0.626426214601
+2.956305463874 13.46524570972 -0.6817347328745
+2.983139019031 13.47294347966 -0.5990219017018
+1.268551541357 15.35355178812 -3.3934e-14
+1.288195425258 15.41735257425 -3.3934e-14
+1.226514263663 15.390128706 -3.3934e-14
+0.7983880106716 14.89202055144 -3.3934e-14
+4.649345257588 14.62621367651 -3.3934e-14
+4.564842556986 14.6162000633 -3.3934e-14
+1.207326953045 14.14851047308 -0.6050597581512
+1.3285 13.12976233181 -1.951834818101
+1.3285 13.19472855401 -1.996949991281
+1.3285 13.15254483622 -2.025238447681
+2.1500050173 13.46477626663 -3.36738e-14
+2.822894576421 13.45613675976 -0.438898162872
+2.905094109918 13.46797562487 -0.4422188290622
+2.899855205361 13.46902703949 -0.386716278087
+3.024683102025 17.34105308497 -0.5403965958978
+3.081831902324 17.37418310533 -0.5605608784304
+3.058647957533 17.31994665551 -0.5715627195117
+2.987402153314 17.31747217741 -0.5653864277669
+2.603198684641 16.94936795111 -0.6369112045848
+2.566484637708 16.9013922773 -0.6453717460507
+2.533092303794 16.94753213485 -0.6372303687259
+0.9939911063071 14.41792096785 -0.5838843278942
+0.9932797119031 14.42074019121 -0.5290388548761
+0.9523092620587 14.45640405483 -0.5209153651941
+0.1383382956386 15.34061369898 -1.703958990113
+0.1588565301457 15.33148635489 -1.784411134917
+1.3285 13.43397764588 -2.056365717639
+1.3285 13.36329940417 -2.078336465556
+1.3285 13.40708840744 -2.013051790644
+0.2080707509785 14.49772663405 -2.337698929945
+0.1761050143452 14.50471790435 -2.294008881138
+0.1398496193679 14.49254546829 -2.369444902494
+4.826006558839 14.73459413531 -6.51907795936e-16
+4.7427175363 14.71685759657 -2.932814248361e-14
+2.784537801501 15.36080405373 -1.51099946249
+2.747447052683 15.3565191742 -1.554147887865
+3.431556112149 13.596921904 -0.7717376252076
+4.234718491074 14.5011157064 -3.3934e-14
+2.186933709587 13.19299370145 -3.386000320387e-14
+2.180913542771 13.12090797051 -3.384934271465e-14
+2.24125272116 13.18492141077 -3.36738e-14
+1.447492267808 15.08191517354 -2.659342086461
+1.430513139087 15.13242395557 -2.668251644007
+1.479738169204 15.15434987164 -2.672119292427
+1.659468361356 16.0642079638 -0.2188790890066
+1.617300145455 16.02759264153 -0.210826454711
+1.646611968981 16.05343562517 -0.1552209587903
+1.690296471487 16.0923317951 -0.187468809736
+3.306041145753 15.0524560186 -1.734697052458
+3.354412783676 15.04008811457 -1.804957115143
+3.281064324115 15.03900920143 -1.811043181477
+1.396127276331 14.67231904433 -3.3934e-14
+1.337908937119 14.63173760725 -3.3934e-14
+0.6886167313389 15.25601769028 -2.343454655913
+0.6643110841956 15.26948382118 -2.253979348663
+0.7322346462777 15.26107474091 -2.310335909091
+3.796102521318 13.66451671799 -0.5231392401856
+3.999099506902 15.31839027735 -0.7103743750476
+3.957676394244 15.37191991873 -0.7378076489403
+1.33061288541 15.49051025472 -1.126516906507
+1.318150875902 15.53855224714 -1.063945826441
+0.03860101298487 14.99897562145 -2.644720132364
+0.08629258314328 15.01645865433 -2.6478016167
+0.002992408876509 15.0357873818 -2.651210457236
+3.293758371533 16.78484869096 0
+4.096364303787 16.02094134028 -0.3379544487607
+4.029550329853 15.99921137816 -0.3551306206388
+4.021261607489 16.06280616637 -0.3689968679982
+1.914797309101 12.78384477435 -0.6402940844837
+1.937589190163 12.77935804603 -0.7244184025681
+1.95676259819 12.78217190641 -0.6741044881388
+1.960249353711 12.78554781282 -0.6058739031471
+0.6380878786946 15.49776758183 -0.7973190861445
+0.7112573915247 15.51799432784 -0.8048180333928
+0.6040712093993 15.48695715355 -0.8332961267391
+2.831736314311 13.87779869752 -1.708779985911
+3.488140103464 14.25692448309 -3.36738e-14
+3.434609749877 14.29647566485 -3.36738e-14
+4.023198423226 15.58563326364 -0.4960078444851
+4.007373755842 15.57697153655 -0.5453079700001
+3.969127719292 15.58483388962 -0.5006025819803
+0.8910007966845 15.53725783539 -2.075154020298e-14
+3.962969384106 14.74769498488 -3.3934e-14
+3.979302972209 14.6558693038 -3.3934e-14
+4.023649099152 14.73518407459 -3.3934e-14
+1.3285 13.49464908702 -0.1397792729474
+1.3285 13.47540823794 -0.06717286959605
+1.3285 13.55178448611 -0.09699788829186
+2.585145186921 15.32177794651 -1.865593785236
+2.604435014844 13.27950948199 -1.997984186738
+2.666626600683 13.29487853279 -1.963661633994
+2.593688192789 13.28580529819 -1.943333173953
+1.637948210557 14.79852238813 -2.609381951175
+1.553060034553e-07 15.37927324601 -0.08281664092671
+5.941832296441e-08 15.33454455904 -0.009176021497987
+6.546397349072e-07 15.39863882046 -0.02064993337522
+2.648992948084 15.337873778 -1.728362285153
+1.823886384485 15.25154504392 -2.372450372149
+1.888736077899 15.25350738713 -2.359597478893
+1.864075457747 15.24655950817 -2.404287604702
+3.671153615855 14.36743582173 -0.7239776095744
+3.648143392245 14.32183836792 -0.7311675389913
+3.675573784829 14.38440266502 -0.7724841205266
+2.919149717011 14.80478101075 -2.610476127128
+2.981228890311 14.78852419905 -2.607610435635
+2.972605714031 14.84116770555 -2.616896621886
+0.9580292364544 15.30581441715 -1.992501717682
+0.9219788200701 15.31306326741 -1.935934731352
+1.001269758077 15.31088764336 -1.952764058198
+1.073925213754 15.22936622803 -2.510674118707
+1.061021457422 15.21795986367 -2.579105077462
+1.014850087221 15.22354450099 -2.545624112981
+2.081076900702 14.37910114417 -3.38184286127e-14
+3.071999620556 15.06469556567 -1.665306632024
+1.118122154645 14.87307340452 -3.3934e-14
+1.088434131246 14.92893695662 -3.3934e-14
+4.8279 16.09135943848 -0.2076378796784
+4.783301936521 16.09188999481 -0.2424008883129
+3.173558049024 14.23401307616 -2.509838880929
+1.426191990497 13.483479475 -2.377503602867
+1.37277788885 13.44365163333 -2.3704741881
+1.37473456514 13.52580483034 -2.384963291702
+2.168249635143 15.99392362921 -3.3934e-14
+2.214716367656 15.95879257591 -3.3934e-14
+2.499213615327 13.37822777971 -0.9389605561321
+2.572631769343 13.39228903373 -0.9173820349528
+4.123224479278 13.59052951308 -0.2884837959611
+3.295080487615 14.18824347148 -1.885050340476
+3.254187487354 14.19335309552 -1.855891022817
+3.234712106566 14.18166025437 -1.922096438207
+3.700418999229 15.08579361226 -1.448748075524
+0.3749540403763 15.23455779008 -2.479370983843
+0.3892025101734 15.24218594256 -2.431743684362
+0.4445275205924 15.23995347087 -2.445681791501
+4.291375527737 15.18472121514 -0.984582137605
+2.542216855534 15.59834294389 0
+2.589555763697 15.5737283169 0
+2.586472671116 15.62562736894 0
+3.284398680016 16.09642806047 0
+3.344260791772 16.06121185019 0
+3.325252606592 16.1385430676 -1.576015318029e-14
+3.26825463813 16.16397821815 -7.278243241078e-16
+1.513542691391 13.53141593375 -2.38595669114
+1.462622199477 13.52025187846 -2.383987478485
+2.870812431724 13.43029228052 -1.038312190196
+2.93443701946 13.44326786181 -0.9873229074743
+4.667812298084 14.42817492451 -0.5239546233643
+1.419548432375 15.23943283623 -2.448934003109
+1.368041896854 15.23686170262 -2.464824647885
+1.372368208646 15.2448751599 -2.414836787958
+3.540179294857 17.09818839743 -0.6106679290701
+3.527159404732 17.04077922531 -0.6207886858085
+3.463677664974 17.06317100561 -0.6168461678355
+2.626354714649 14.02466813526 -2.47292239564
+2.646016137793 13.93745765589 -2.45755428147
+2.586315876025 13.97015925659 -2.463312614614
+2.556422325849 14.01379755531 -2.471010373931
+0.4977345561482 14.65663506119 -0.6144829818372
+0.4455572084319 14.66365741562 -0.6321786898406
+0.4866890101001 14.65515057292 -0.6864179661164
+0.547720869681 14.64585228124 -0.6361630942504
+1.662571378997 14.85726132327 -2.61974163911
+1.706467692107 14.8856556113 -2.624750283805
+1.709072089563 14.83322155841 -2.615501115783
+4.02741725225 16.05530454799 -3.3934e-14
+3.953920032056 16.04923677402 -3.3934e-14
+3.989510394697 16.00226623281 -3.3934e-14
+0.6041967285562 15.42822132054 -2.805968771622e-14
+0.5793327709768 15.5030467555 -1.050273059778e-16
+0.5417349740174 15.44375461085 -1.772981231456e-14
+1.3285 13.40324331265 -1.582450764474
+1.3285 13.45460144226 -1.611871607905
+1.3285 13.38049155257 -1.671040750742
+3.810871977314 14.3538106671 -0.9458154537289
+3.008254180517 16.68276674088 0
+2.991341144466 16.63416813777 0
+3.036460338651 16.60942680943 0
+0.1063504104129 15.41043135522 -0.9111403943252
+0.1557585806751 15.40914745184 -0.9785096452388
+0.1025014151724 15.4054156653 -0.9902049367397
+2.740371116071 13.78805443121 -2.028492010839
+2.749749654417 13.82664335062 -1.990159197108
+2.748385774537 13.75551639261 -1.98417227554
+4.164979123292 15.75350776033 -0.2707953858053
+4.197375393158 15.80999400451 -0.2723239549287
+4.22720703018 15.74514349577 -0.253466874927
+0.357934764568 15.24018499674 -3.3934e-14
+0.380483301932 15.43358750216 -0.972519437694
+0.3376463809956 15.42889624406 -0.9469727337607
+0.381764013048 15.43682715007 -0.922544361505
+1.552986644011 14.38898175109 -3.369581906478e-14
+1.50349106834 14.3979889516 -3.376983448695e-14
+1.562534547203 13.3838056465 -2.359920831734
+3.712743031615 16.09730198326 -3.3934e-14
+3.762865299129 16.1657382212 -3.3934e-14
+3.017912005893 16.15129829684 0
+2.968153518431 16.13067459114 0
+3.032516136853 16.09945272162 0
+2.897515338577 15.0173197174 -1.934001289943
+2.903314807642 15.00680296766 -1.99361166975
+3.605159176393 15.03790999257 -3.3934e-14
+3.850390220722 14.18150776844 -0.5852436829126
+3.877414104931 14.12672047665 -0.5611216402682
+3.829753280033 14.13101806216 -0.5873827093067
+3.878681311721 13.68823559138 -3.3934e-14
+3.817273718001 13.62057986753 -1.548773192801e-14
+3.891998361306 13.63834210332 -1.968641252543e-14
+0.2778331385182 14.74171234407 -2.599364776101
+0.19847024793 14.73158755455 -2.597579131626
+0.2353538565534 14.76777823051 -2.603963180214
+4.527435940075 16.32458667855 -3.3934e-14
+4.492094862431 16.24984008432 -3.3934e-14
+4.541502847738 16.27220753974 -3.3934e-14
+4.571398414531 17.71258763853 -0.5023380540786
+4.573667428932 17.63967129093 -0.5151924605718
+4.533248859821 17.66885657058 -0.5100457921267
+2.326794276188 16.7589568652 0
+2.324770583419 16.67392192961 0
+2.375041893404 16.71884028872 0
+1.522139812761 15.47645886914 -1.149422370859
+1.505302158101 15.44153460142 -1.210670767419
+1.468559075703 15.48717073939 -1.132089454084
+2.81521684434 14.04897660086 -1.785424712303
+2.828884940801 14.01780313201 -1.74149512493
+3.947666955597 17.7333673843 -0.3678231058831
+3.909402938638 17.72209788991 -0.4213746482162
+2.903143296562 13.45859178251 -0.6644342803631
+2.880626392612 13.45280521547 -0.7157109916095
+2.4279 13.21380235131 -1.467414305106
+4.8279 16.77748498856 -0.05868430002055
+4.096474638381 17.62127661759 -3.3934e-14
+4.151101881937 17.60621410575 -3.3934e-14
+3.193198507184 13.48426432805 -0.8859966386413
+3.253115528875 13.49287640615 -0.8621447565232
+3.201929962955 13.49013204694 -0.8087106485596
+4.727719016053 16.99936339864 -3.3934e-14
+4.712948760746 16.92441712307 -3.3934e-14
+4.778790985554 16.93138373949 -1.690813003452e-14
+3.370880057874 14.53103366146 -1.79545015417
+3.398534661124 14.58851928427 -1.753366409217
+3.396957422137 14.52141412981 -1.744280488554
+1.704921649035 14.18683861352 -3.36738e-14
+1.649944688312 14.18231112298 -3.36738e-14
+1.65556632306 14.12046008253 -3.36738e-14
+4.092098087495 16.90775871832 -3.3934e-14
+4.146660551298 16.93118229268 -3.3934e-14
+4.741962515468 17.64460235781 -2.958809456292e-14
+2.605458741376 16.74052833729 -0.6737303062729
+4.8279 16.86424320222 -0.08303652208638
+2.74605653299 14.52868826043 -2.561802414108
+2.666773705961 14.53334438164 -2.562617610777
+2.706674386827 14.58419607089 -2.571587331029
+2.670999481401 14.47407025573 -2.552169586079
+2.191053063887 13.35421453868 -2.354702811309
+2.096327144275 13.38536689178 -2.360195953172
+2.148716233777 13.41897117407 -2.366121092797
+2.117700491314 13.32750427038 -2.34999453921
+1.3285 13.12563630295 -1.44583600072
+1.3285 13.07074073687 -1.50449329475
+1.85199434551 16.12478618475 1.695863680794e-15
+1.849025992605 16.07279009289 0
+1.906421069013 16.11758425954 0
+2.187726891832 16.37542425645 -0.7381136722936
+1.912333244198 16.22913839635 1.126465127402e-14
+1.856425006622 16.25306503774 3.198187362266e-14
+1.862448836751 16.18864103644 1.475281271151e-14
+3.946571792044 15.56598110877 -0.6076902532757
+7.78e-18 15.09551670021 -0.9212200927507
+5.38041935579e-18 15.1600239753 -0.8958098571965
+7.78e-18 15.156318153 -0.9592440805477
+3.707884746272 14.16142731727 -0.6633504458912
+3.661871326937 14.18670115724 -0.6982505487061
+3.721282098315 14.22186944108 -0.6659234117465
+1.3285 13.0130419419 -1.495754647212
+1.940559649192 12.79898937223 -0.1510458340728
+1.89070120279 12.79941406477 -0.1135475680387
+1.888063251482 12.79872364369 -0.1745083600997
+7.78e-18 14.98291576406 -0.782879729566
+7.78e-18 15.00023704169 -0.7030966614787
+4.322314136781 15.40763646948 -3.3934e-14
+4.258082818674 15.38377135683 -3.3934e-14
+2.476797070205 15.30964375363 -1.962712202814
+2.425914294092 15.29993428576 -2.03680097056
+2.401176255413 15.30652203044 -1.986827592278
+4.135946095205 15.59481172724 -0.4438291907634
+3.92148956785 13.58056161794 -0.1656720201153
+3.00542666133 14.17752551 -2.499872600774
+4.542167341676 15.12566338335 -1.026043554361
+4.543854654506 15.06475662259 -1.015013930996
+4.497680435817 15.09330912382 -1.02900695144
+4.58849833687 15.09863480972 -1.013491275016
+4.604168556339 15.57839610859 -0.5370149087627
+4.664034556176 15.56780833871 -0.5901739143322
+4.585044390122 15.54959950253 -0.5946604257061
+7.78e-18 14.55358140799 -2.219092140186
+0.002865705409034 14.52267357303 -2.177669255544
+7.78e-18 14.60705523139 -2.176566343223
+7.78e-18 14.53842126053 -2.128443652728
+1.775281510349 13.02756229184 -3.3934e-14
+1.730848398688 13.07672750357 -3.3934e-14
+1.686960678327 13.01902059992 -3.3934e-14
+3.280502154407 15.73132849632 -0.7078383695636
+3.325888942857 15.76535298368 -0.6795189227484
+1.023882644304 15.53609692911 -3.3934e-14
+1.055527162872 15.59198213482 -2.491429427094e-14
+0.9749880450596 15.59561180211 -1.238058842573e-14
+1.087850846305 15.53038720891 -3.3934e-14
+3.345645165223 16.34878420249 -1.13420879428e-14
+3.419849594782 16.33946459442 -3.3934e-14
+4.142970819314 14.9599134173 -1.123417509807
+4.173592859374 14.90931555482 -1.1004943279
+3.011416005854 13.69570606899 -1.295881653195
+3.027340422662 13.74388486058 -1.277904105082
+3.042357795259 13.68062984964 -1.243351074057
+7.78e-18 15.05689243927 -2.183358797656
+7.78e-18 15.03717856521 -2.234929617541
+3.115716284476 17.39882991427 -0.359346007389
+3.177717700835 17.43266284798 -0.355263810089
+3.136566429189 16.5157722368 0
+3.195121770687 16.50927642724 -1.201147413456e-14
+3.198853222315 16.59644364479 0
+4.098623129096 17.76864937668 -0.3919124567201
+0.2649757929605 15.43493975421 -0.666040388483
+0.2103987909956 15.43048681487 -0.6457682161922
+0.2674888381709 15.43871136396 -0.5823078517204
+0.2984509597515 15.4402933545 -0.6252972925753
+3.681911966156 14.25779235215 -0.6975287385198
+3.621412686448 14.22171912939 -0.731580099529
+1.927364903871 15.35711324519 -1.548269440992
+0.4587568263354 15.47681248911 -0.1470092220208
+0.4173631179925 15.47006836775 -0.111943028896
+0.5083809495535 15.4871843326 -0.1146045906468
+2.074461775552 15.87513378042 -0.834977736923
+2.024467803627 15.85447183633 -0.8428576133658
+2.025213967461 15.91138018912 -0.8245120731896
+2.081686659947 15.93196380791 -0.8195893721934
+0.1978639101599 15.43866831189 -0.3569429346124
+0.1562069936631 15.43722905497 -0.3083843120982
+0.2157336452093 15.44179405327 -0.2946328969319
+4.306772703784 14.67805604383 -3.3934e-14
+4.27746035543 14.61705666902 -3.3934e-14
+1.171449891764 15.4441185065 -3.3934e-14
+1.136275708557 15.48820232432 -3.3934e-14
+1.3285 13.54947216369 -0.3769153780071
+1.3285 13.49916199497 -0.3408295960214
+1.3285 13.55299516234 -0.3163050296476
+1.516685190315 15.93154822283 -0.7270400062493
+0.3527779252145 14.5687540668 -1.833772241103
+0.2738569750824 14.57234599472 -1.814835983044
+3.086978225868 17.27419540814 0
+3.13070661763 17.21000576179 0
+4.601063397863 16.18728292712 -0.268926556926
+4.561648241799 16.23942981731 -0.2821101149472
+4.641570266013 16.24784690446 -0.2761747870556
+2.858285248171 13.45659764738 -0.5669818567332
+2.864908169874 13.45966197759 -0.5144955358902
+2.796232220069 13.44980944748 -0.5035664490917
+3.132811036835 14.96635524944 -2.223106817101
+3.197492432704 14.96482190787 -2.231698087042
+3.170169728986 14.95377124612 -2.294396250473
+3.343859199346 14.00375536665 -3.36738e-14
+3.350398342299 14.06238760947 -3.36738e-14
+3.29141363009 14.01762122672 -3.36738e-14
+1.90599366265 15.32198084346 -1.863831509734
+1.888510794926 15.33101365107 -1.78793098102
+1.963942730925 15.32926388864 -1.80278620325
+1.420478915815 12.91966399119 -2.278081417812
+1.47440802395 12.8986040611 -2.274368299365
+1.432845290857 12.85874406127 -2.267341477047
+1.378916182876 12.87980342536 -2.271057805439
+4.740486392517 16.29929012481 -3.00963205795e-14
+4.190231725754 15.57565637974 -0.5527404115453
+4.217478403391 15.56791502556 -0.5964601085028
+4.168399630652 15.56225305512 -0.6286707401505
+0.5321071369366 15.45314480249 -1.10286086986
+0.460780413733 15.43434719804 -1.159295233042
+0.4538188766973 15.43697974823 -1.107662980495
+2.702748340737 14.98592384704 -2.519109023906
+2.705666584126 15.06567558508 -2.49117369545
+2.707667374858 14.98734259081 -2.449557903616
+2.779286495603 15.43980562979 -1.212447481615
+2.769795212374 15.47926783743 -1.143079247184
+2.849950890927 15.45811343732 -1.178822049962
+0.23325102743 14.61356928797 -1.446411191469
+0.1867749579862 14.60814293202 -1.500026915214
+0.249273864888 14.60738050252 -1.506900052355
+3.416312564409 16.1955767895 -3.3934e-14
+3.445096460788 16.14602244707 -2.845947440222e-14
+3.461653040384 16.2335357659 -3.3934e-14
+1.920927466384 15.65570893555 -0.9506882745636
+2.952775983769 14.45653766645 -3.36738e-14
+2.891919459889 14.50487580549 -3.36738e-14
+2.098284001161 15.00218131591 -3.3934e-14
+0.2465041419708 14.6458721919 -1.069893661374
+0.2391179833051 14.65169122873 -0.9876930757287
+0.213970047332 14.65485925151 -0.9398186471082
+3.861790075615 15.89985550423 -0.4005817487764
+1.776909515121 14.06139922008 -3.36738e-14
+1.748707669776 13.99127652917 -3.36738e-14
+1.816832086785 13.98168622233 -3.36738e-14
+1.3285 13.45362696816 -1.338939977991
+4.229381581667 13.95254214268 -0.390141791184
+1.315258431804 13.7495072285 -1.578709489302
+1.310238522914 13.79067463617 -1.514498084674
+1.299852549913 13.83071242323 -1.55358431718
+1.3201807348 13.72064740356 -1.537880369671
+2.425298650315 13.70972870899 -3.36738e-14
+2.385986004423 13.75071420194 -3.36738e-14
+1.719884344861 12.7983511511 -0.2022857291567
+1.692482020169 12.79677459837 -0.2873442519068
+1.754218612383 12.79755186629 -0.2454089207002
+3.193639269537 14.94239905764 -2.358580056506
+3.206346730087 14.88590126809 -2.36789602276
+2.712857017115 13.99913111288 -2.261569955698
+2.720260228128 13.96877497419 -2.1914063665
+2.71319967583 13.94474660274 -2.248978786334
+5.08339494479e-18 15.22148174718 -0.9279005238597
+1.440292510229 12.80795716812 -1.004564331694
+1.402030705232 12.83770125277 -0.95317654223
+2.516598557553 13.23574395412 -2.18072274015
+1.712982598662 15.45946319119 -1.176376582147
+4.592806310456 17.19913701187 -0.4481259860606
+4.571469386209 17.25015799171 -0.4588633614141
+4.641458811728 17.24135633561 -0.4511315277977
+4.506394060497 17.2220433796 -0.462109998868
+2.986569373001 16.98526574804 -0.6305859548923
+2.945828670794 16.92842141338 -0.6406098703411
+2.931237280237 16.98650102907 -0.6303677140815
+2.127346236495 14.7038888439 -3.3934e-14
+2.099828998141 14.74715945158 -3.3934e-14
+4.242733701766 15.88429415317 -3.3934e-14
+4.221760672839 15.80028014996 -3.3934e-14
+4.28228779491 15.85058242947 -3.3934e-14
+4.5452210395 16.83670189248 -3.3934e-14
+4.477767182474 16.77722227718 -3.3934e-14
+4.551783092222 16.78683174624 -3.3934e-14
+4.362356208368 15.53957185188 -3.3934e-14
+2.817914455727 14.81409784304 -2.612128105611
+2.778709436348 14.78332034283 -2.606701422174
+2.797981894053 14.85940328211 -2.620118545619
+4.764874077738 15.02640304965 -2.169969202542e-14
+4.793748913932 15.08764249933 -1.175814686117e-14
+4.732470120128 15.08734019521 -3.28563062456e-14
+4.6979568516 15.03670407912 -3.3934e-14
+1.927292263627 16.28808280181 2.126685891637e-14
+1.327569397291 13.50872706188 -2.304579572444
+1.3285 13.47515471993 -2.255642603745
+2.546915738299 13.4182544273 -0.1703589253359
+2.518410687179 13.4125747251 -0.2271012102138
+2.600730194421 13.42684350454 -0.2059960472501
+0.9057364501961 15.13587683614 -2.66886988232
+0.848447715017 15.07380356773 -2.657923542027
+0.8554532500353 15.1300847517 -2.667844679905
+2.940053661375 13.88022298573 -1.457960554309
+1.3285 13.14266389699 -1.109004729927
+1.3285 13.09527832872 -1.083459965991
+1.3285 13.15920010044 -1.028139611832
+1.619998679315 14.03397417657 -3.36738e-14
+1.699848474881 14.03970884537 -3.36738e-14
+1.65903306683 14.06984388262 -3.36738e-14
+3.627711957538 16.71422444737 -0.6557491369312
+3.666930596985 16.68917656444 -0.6301655998629
+3.601084182028 16.66874855689 -0.6623005066395
+3.811619051651 17.21919630872 -3.3934e-14
+3.728360439604 17.20896280582 -3.3934e-14
+3.784267742358 17.17545026211 -3.3934e-14
+1.822361189656 15.44408727415 -3.3934e-14
+1.796824560603 15.38230555636 -3.3934e-14
+1.856442060495 15.39578212413 -3.3934e-14
+2.591257252709 15.38390696171 -1.373119166313
+2.527711994698 15.38866758164 -1.345921380777
+2.580922563561 15.40682317934 -1.292997493442
+2.541628409796 15.37409687645 -1.420459667304
+2.487638296304 14.62180135831 -2.578216077106
+2.439129475076 14.68331843717 -2.589061611226
+2.492106432028 14.68934695563 -2.590123802779
+3.59372764922 13.72166296187 -0.6636354982044
+3.558236344936 13.67210504704 -0.6808237003816
+3.011408912089 17.33466801608 -0.4918842591972
+3.0273393263 17.34579579569 -0.4346818949406
+3.062427108322 17.36440592659 -0.5046324506191
+4.295007526679 13.93675660067 -0.3691945779128
+3.849100593963 14.41889686987 -1.204698865751
+3.926999218568 14.422038742 -1.150165921726
+3.171415954506 14.71149761183 -2.594032053572
+3.187684445348 14.7898395918 -2.552491445964
+3.188244616491 14.73261430828 -2.519365636057
+4.0838497861 13.58642834083 -0.371625653718
+4.168031813425 13.59773651779 -0.3468653510837
+4.180558367002 13.59331060049 -0.2909674582888
+2.879450543216 17.25316647495 -0.3761271461146
+2.863380246911 17.24039053818 -0.4617296224988
+2.854838966621 17.23729868115 -0.3349223548974
+4.153898615641 15.23483318606 -0.7001805482965
+4.127857679713 15.22487127543 -0.7568774764643
+1.506648579903 14.18640095275 -3.36738e-14
+1.554298919039 14.21798909383 -3.36738e-14
+1.486052883522 14.24136624787 -3.375130257373e-14
+1.290588396592 13.85576209872 -1.658196418409
+1.298420080549 13.8196885736 -1.696573926139
+1.306542629417 13.79702858555 -1.61281457888
+1.312987486252 13.75592779814 -1.654845410623
+1.3285 13.35827656006 -1.846188331487
+1.3285 13.28966723433 -1.806953322084
+1.3285 13.38377824601 -1.789362578754
+1.285889805789 15.21138091274 -2.617275246689
+1.291114182768 15.22307346112 -2.548304288874
+1.338695775666 15.21230819273 -2.611898006399
+2.071182875375 12.71051931107 -1.510358004743
+2.014253035203 12.70090590068 -1.588949373068
+3.151347748137 13.47068918395 -1.005237229508
+3.196200185819 13.47948984802 -0.9604942007272
+3.138134577297 13.47523392151 -0.9194562417677
+3.363490395765 17.50896348954 -0.5382430590837
+3.405576879928 17.54090947211 -0.4867298421136
+3.308200289302 17.49561948228 -0.4912284754769
+3.478511790531 15.3719622373 -1.357548116623e-14
+3.20858291202 16.20481372429 -0.7681993546796
+2.62555944255 15.02251858744 -4.701702181472e-15
+2.617294839528 14.92363217503 -2.370067416984e-14
+2.669726404671 14.98925342848 -8.426632479154e-15
+2.576483402871 14.9970463737 0
+0.643480945631 14.54457569795 -1.606185212183
+0.6635039450425 14.53092257245 -1.664216613515
+0.5838999628919 14.56312924829 -1.598384946347
+7.78e-18 15.16884378727 -2.510218969561
+7.78e-18 15.22233437991 -2.445212799847
+7.78e-18 15.21636070185 -2.535655336683
+1.601420628757 12.76153184074 -0.9910881336987
+1.663913459244 12.75981121543 -1.012445505735
+4.452626360793 13.60498458942 -0.2067080386605
+1.3285 13.41741499689 -1.078044243441
+1.3285 13.35464719265 -1.075576378319
+3.310232086459 13.51499276216 -0.564445189793
+3.286011278414 13.51011407921 -0.617507957179
+3.336103101343 13.5158921772 -0.6120808797189
+0.431895832643 15.29507356544 -2.073139293759
+0.3686992538558 15.2981711816 -2.050329995173
+0.4275266328075 15.30668570181 -1.985428386515
+2.314753821115 15.35184505965 -1.599170725521
+2.287636538186 15.34538228559 -1.660518942504
+2.250276679987 15.34916048428 -1.624960656528
+1.849650546431 13.4393014044 -2.36971608539
+1.794878379518 13.40852241421 -2.364284390842
+7.78e-18 15.03291279147 -1.332656234173
+7.78e-18 15.09870543019 -1.356812924954
+7.78e-18 15.05002016732 -1.391857134025
+2.189720164387 13.0743535623 -2.305366180135
+2.15779992435 13.00470317599 -2.29308648629
+2.133540150413 13.07401951566 -2.305306380164
+2.214836636386 13.01734996387 -2.295318527491
+2.762992065047 16.6522343905 0
+2.724326439557 16.61978605952 0
+2.76199864919 16.56768587829 0
+2.43560777062 16.26147766738 -0.7582043810183
+2.41381121426 16.21456128427 -0.76647910761
+2.364140092772 16.28676821914 -0.7537491591454
+4.309546119697 14.31311256478 -3.3934e-14
+4.264085914101 14.34396514478 -3.3934e-14
+4.239363097605 14.29490095896 -3.3934e-14
+2.979367215489 13.61529843309 -3.36738e-14
+2.886881623139 13.61833990941 -3.36738e-14
+1.740421604977 15.38687784186 -1.355188229955
+1.706387689302 15.37370679871 -1.417574423431
+1.668131916368 15.38711838119 -1.354374534119
+1.705095943139 15.40364900243 -1.299829822541
+1.568287939186 14.91301904463 -3.3934e-14
+1.554103295291 14.83926932114 -3.3934e-14
+1.451960257434 14.57072795161 -3.3934e-14
+1.417934708039 14.62332423468 -3.3934e-14
+1.381819771763 14.57058815634 -3.3934e-14
+0.3687363773033 15.22318298301 -2.547874021575
+0.4507220024848 15.22054934373 -2.563658356255
+0.4203407309743 15.21167105407 -2.615664285197
+1.510418139809 13.34431329435 -2.352957343393
+1.446500883565 13.35953264283 -2.355642814375
+1.457865256009 13.28721888024 -2.342893571579
+2.429694166962 13.29781266872 -1.643152207213
+2.496438532961 13.31243844663 -1.620329122385
+1.294000472986 15.33911519525 -1.717391199638
+1.349739825318 15.33752797617 -1.731634465652
+1.315210361646 15.33323170957 -1.769036924335
+1.264199042185 15.33355830162 -1.766312165951
+1.599129838432 14.34730491633 -2.529816207095
+1.651852873523 14.37296533251 -2.534339111855
+1.667629209037 14.31717183436 -2.524499149589
+1.447023583722 14.20669873765 -3.373819935341e-14
+1.41037500704 14.16952341875 -3.37138270153e-14
+1.462255102856 14.15660943548 -3.36738e-14
+2.646505138955 15.36174630916 -1.501533248249
+2.610390400568 15.35812260506 -1.538265687801
+2.566188068434 15.36260665798 -1.492868677362
+2.617288689602 15.36781039503 -1.455499049448
+1.368730234471 12.83236951546 -1.523364553624
+4.481158983742 15.6290457932 -0.2498147892728
+4.501160045396 15.6384803162 -0.1962839254973
+1.240036811796 15.37710483053 -1.396787329376
+1.180685253102 15.3726687572 -1.423977686328
+1.200303473624 15.39349747952 -1.333385175079
+1.241128313774 15.36604939761 -1.464550223549
+0.4425540222957 15.45728895277 -0.7293204977955
+0.4378186290326 15.45304962235 -0.7989613645315
+0.3780406276475 15.44500162912 -0.7635768121534
+3.039121662049 14.84040922374 -2.616763804849
+2.292312103036 14.5643901845 -2.568099376386
+2.381707019798 14.55279407724 -2.566047918794
+2.315998497826 14.51671921288 -2.559689283848
+2.385359927527 14.48086628509 -2.553367836248
+1.666363544525 13.03975780196 -2.299253699859
+1.607871490291 13.05092216663 -2.301227268683
+1.659364907511 13.09335767222 -2.308709703061
+2.853556221523 16.71518922726 0
+1.3285 13.43585604036 -1.684234560129
+1.461769896835 15.73733707648 -0.8987807410021
+1.520521254176 15.74683006423 -0.8920004168753
+0.561200520475 15.3152554915 -1.918814741626
+0.596665368271 15.32139500197 -1.868835247676
+3.240650503496 14.50752341595 -2.134635386548
+3.241250698034 14.43218980241 -2.118952126817
+3.259704056453 14.46496390318 -2.059494027092
+0.1141357232257 14.67136282114 -0.6315201207373
+0.1580465540681 14.66923698091 -0.6782310788055
+0.1886359145762 14.67165453755 -0.6252304890865
+1.898820506272 13.47818727583 -2.376574938255
+2.382451300581 14.87827945724 -2.623448980601
+2.319886627229 14.88537099547 -2.624700078653
+1.98779639583 14.59243463272 -2.573032957237
+1.928040462488 14.5729769349 -2.569603121098
+1.952870537311 14.63076663999 -2.579794765008
+2.327429471679 13.8145933647 -3.36738e-14
+2.294511140657 13.85714369696 -3.36738e-14
+2.267848629612 13.79469175656 -3.36738e-14
+2.638890756539 13.55562689405 -2.390218743133
+2.696672175209 13.5140076551 -2.382879234072
+2.653443185483 13.47097120933 -2.375292681132
+2.423094719091 13.02594117164 -0.09920092836341
+2.142657845345 16.49418737091 0
+2.229991628145 16.5028122458 0
+2.177380445779 16.55498184266 0
+2.644589403954 17.08433734813 -0.1868199168397
+2.611447328665 17.05698265761 -0.2143541733471
+2.619922078616 14.63543351972 -3.3934e-14
+2.671323465215 14.6123808983 -3.389109787914e-14
+4.532497054563 15.21332618478 -0.8223936807277
+2.4279 13.25432457602 -0.1965852186682
+2.4279 13.33892219491 -0.1688841306648
+2.457792968397 13.22787749376 -2.164678268848
+2.362128707037 15.28904099685 -2.117569787373
+2.443264999069 15.28845201771 -2.121321284636
+1.914359134814 13.78716186406 -3.36738e-14
+1.98370403316 13.74307914984 -3.36738e-14
+0.8980403077855 14.40782727211 -2.540480638734
+0.9449460909517 14.3703439295 -2.533870545373
+0.8815432473366 14.35912641303 -2.531895301974
+0.2257883069328 14.66878311949 -0.6881512448339
+1.541061679522 14.76020058989 -3.3934e-14
+1.582184541046 14.68055022712 -3.3934e-14
+0.1920584594776 14.66652287109 -0.7349142271071
+1.749136740146 13.12406322357 -3.3934e-14
+1.802466787689 13.08799804411 -3.3934e-14
+3.956425879745 16.31262260804 -0.4362093018723
+4.002427601261 16.28792282996 -0.4160410699383
+3.942117338313 16.2583614031 -0.4318226443821
+3.34117742214 15.68552559199 -0.6541568839829
+3.378728554745 15.61824663284 -0.6158294781734
+3.309323094712 15.60717888954 -0.6639792620464
+3.861417660478 16.52406637769 -3.3934e-14
+3.805128302073 16.50099855429 -3.3934e-14
+3.870809023506 16.43682304598 -3.3934e-14
+3.591206410007 15.44511331719 -0.9638634516593
+3.544371104399 15.41907361494 -0.9946391652163
+3.553841773428 15.49147605069 -1.000305276324
+1.868822881001 15.33772377979 -1.729843688122
+1.939525100388 15.33996499227 -1.709667780587
+0.774895837593 14.56821292389 -0.5535673916046
+0.7787135520092 14.56394643407 -0.6125450356516
+0.8210191720691 14.54304402987 -0.5690307151154
+3.311858777274 13.52433953936 -0.278927191232
+3.254378171998 13.51678889422 -0.3201745492815
+1.556580146523 13.75457829163 -3.36738e-14
+4.459614609752 16.8922727295 -3.3934e-14
+4.417290050868 16.85502133632 -3.3934e-14
+4.471935845584 16.83509477649 -3.3934e-14
+1.678367833537 13.60586622471 -3.36738e-14
+1.63339995738 13.56687529471 -3.373139055427e-14
+2.752924223093 15.28597515081 -1.778946993871e-14
+2.75918837356 15.34421815821 -2.927742347983e-15
+2.698111411183 15.30962256127 -2.382761386398e-14
+4.638303777747 17.30184866841 -3.3934e-14
+4.56954584655 17.34587219656 -3.3934e-14
+1.3285 13.2946736643 -1.283975145965
+1.3285 13.39157543069 -1.285441369571
+2.98817700273 13.45822299463 -0.8787139537491
+2.4279 13.04581367069 -0.422954518481
+2.416349983266 12.98726563664 -0.3906322922623
+1.085423341841 14.17129677906 -2.174311005357
+1.126964594999 14.11876557327 -2.173141946152
+2.276692941941 16.72118083335 0
+2.232350937454 16.6863764761 0
+2.289991635117 16.63598776215 0
+3.947364573525 15.2806174105 -3.3934e-14
+4.024195058899 15.32330770127 -3.3934e-14
+3.954582381865 15.34841402729 -3.3934e-14
+3.271593306837 14.29117692801 -1.30101298545
+3.325429286685 14.28567928239 -1.332319119424
+2.412332751203 12.9559383194 -0.6701525034333
+3.430873653439 15.50323307703 -0.9632656178021
+3.462364082622 15.51191817448 -0.9140205071525
+4.060350051088 15.64595499191 -0.2829920376223
+4.03498635849 15.69081716296 -0.2992510826129
+4.075740678592 15.72711339411 -0.2922204475561
+4.175493211128 17.37979919984 -3.3934e-14
+3.877799160605 14.07300122698 -0.5514386053556
+2.606469356292 16.25810209192 0
+2.599491366404 16.19017799551 -1.092094174147e-14
+2.638614880284 16.14850139494 0
+3.544725528553 13.77306263639 -0.7086865752431
+3.552738551109 13.72467887793 -0.6941075137736
+3.513541846637 13.7076326899 -0.7222285286666
+3.501570937728 13.75874410527 -0.7408726592886
+4.332255376983 15.25670968628 -3.3934e-14
+4.261671486404 15.29139062504 -3.3934e-14
+4.251583003479 15.2186665987 -3.3934e-14
+0.1308585538963 15.41632840012 -0.8314785626265
+4.301919211954 17.12436879253 -3.3934e-14
+4.353690503005 17.12887590474 -3.3934e-14
+4.327833500422 17.17516479639 -3.014582398865e-14
+2.791957687376 14.20689891721 -2.505061704436
+2.844817078361 14.14807476141 -2.494685809814
+2.767743488092 14.12785160714 -2.491116296506
+1.321731443179 13.70104146843 -1.617071275492
+1.325491988471 13.6515768667 -1.610113088473
+1.324591372601 13.67590550249 -1.560304556062
+1.183105752576 14.23958388616 -3.3934e-14
+1.259376935347 14.19336726239 -3.3934e-14
+1.237658636773 14.26534196455 -3.3934e-14
+2.62691230629 13.41233447001 -0.7399733848743
+2.665539065777 13.41490414836 -0.8043657042114
+2.889317645068 13.45914920995 -0.6098601374638
+1.484794507885 15.51994128144 -1.08794682313
+1.525878614925 15.576591847 -1.023836451811
+2.4279 13.10118652155 -0.8109837272367
+3.051595826035 17.20548455164 -0.5917521048667
+3.111584998443 17.15899769943 -0.5999434733906
+3.054388596929 17.15598788519 -0.6004819910109
+1.19395050054 14.3288480308 -2.52656582859
+1.194060558407 14.26543675533 -2.515384319518
+1.134505144182 14.27870213246 -2.517725290457
+1.244757726766 14.30071038301 -2.521604812007
+2.074546088938 13.23180410372 -3.3934e-14
+1.276168745486 13.90556682984 -1.632770938525
+1.260344087436 13.94551431481 -1.671637920892
+1.277649831888 13.89433015786 -1.692555783161
+1.541484674409 15.1481516324 -2.671025946538
+4.111733961834 16.22803421215 -0.3704148148372
+4.171911797573 16.22505041482 -0.3529008225562
+2.4279 13.06719813873 -2.094329889752
+2.4279 13.12521920209 -2.076947574263
+2.048573641339 12.94591884434 -3.3934e-14
+2.033275374765 12.99889747715 -3.3934e-14
+1.967994035287 12.96618113536 -3.3934e-14
+2.183033106474 14.2028560142 -2.504351421322
+2.193607137884 14.11999102547 -2.489732666432
+2.1239495156 14.16589446195 -2.497838425632
+2.244640169208 14.1607279311 -2.496916919272
+3.099718984202 15.57744989339 -0.8341277818651
+3.132277338436 15.64597394306 -0.8166262829925
+3.162178796825 15.59217970436 -0.7807561840899
+3.003498961948 15.80417649803 0
+2.710100348801 14.10669967175 -2.315639511473
+2.709529636408 14.04451264892 -2.313022615989
+2.705791316371 14.09370700984 -2.376360369824
+1.983640511912 15.54645229876 -1.053427382358
+2.032500726029 15.5675861884 -1.03174138939
+2.030201511446 15.52542824554 -1.079777080918
+3.51243302614 17.59302048757 -0.02613710930848
+3.555283954746 17.610152363 -0.003946430535118
+0.4302695988566 15.46823053315 -0.3700160696359
+0.444277744372 15.47202590733 -0.3088054370686
+0.4817123430122 15.47781653153 -0.3512242113579
+2.576676039138 15.35140270747 -1.603770276774
+2.607785925246 15.34427035052 -1.670508353143
+0.3965925090161 14.47493782176 -2.454743431693
+1.337493638795 15.29870704107 -2.04626005697
+1.28036277878 15.29259417062 -2.091594950955
+2.680017190377 14.22821022643 -2.508814368107
+2.677315120673 14.174770168 -2.499391571501
+2.628100157159 14.19239045807 -2.502502118942
+2.729097299886 14.18245340613 -2.500746757488
+1.144971584501 14.18769554526 -1.441125526989
+1.125432219142 14.20990113761 -1.483010326461
+0.9039636819899 15.59502315209 -0.540827910757
+0.9363775470312 15.60612277333 -0.6063919957571
+0.8812532669983 15.58370374555 -0.6147429788153
+0.8316829842274 15.56679855838 -0.5852804655771
+3.655380314913 17.64172914347 -0.4471549021305
+3.676832789496 17.6478416625 -0.5060116263725
+3.627110131657 17.61382154228 -0.5197433110376
+3.598348157497 17.62060243165 -0.4633623267107
+4.492324314338 16.12232211895 -0.2697568818594
+4.441731734873 16.14621746097 -0.2811656520455
+4.680169529289 17.84037102306 -0.4686622627679
+4.727538486244 17.82342994914 -0.4827831388944
+4.658903838305 17.78556174581 -0.4894666788548
+1.814077391965 13.53536197532 -3.381669583608e-14
+3.973747871635 15.83781547036 -3.3934e-14
+3.92400143357 15.74084956878 -2.812657830266e-14
+2.531614703764 13.25950762045 -2.048165079131
+3.873926612599 15.51569268196 -3.3934e-14
+3.817957880887 15.48937716972 -3.3934e-14
+3.877138229504 15.45077322315 -3.3934e-14
+2.224232272243 15.15980299923 -2.673081203448
+2.743094840204 15.07533604212 -2.222305414874
+2.755713386849 15.08561525681 -2.165184427309
+2.755523600181 15.03468100265 -2.157155641809
+0.1037723059911 14.72502489077 -4.740379045146e-14
+0.05416853909992 14.79926887037 -4.051231117541e-14
+0.03762854963141 14.74000226329 -7.867244100115e-14
+2.497800609038 13.57778414628 -3.36738e-14
+2.4431243861 13.59675109762 -3.36738e-14
+2.459715110588 13.54339067691 -3.36738e-14
+4.447918217731 14.40960901201 -0.4180216747987
+4.488413989726 14.44396599175 -0.434709104546
+1.776521871083 15.47739350081 -3.3934e-14
+1.745429240674 15.40204212092 -3.3934e-14
+2.209001498061 13.24328017683 -3.390371769207e-14
+4.114580587631 15.5664484793 -0.6049174738867
+4.108560492742 15.55335078386 -0.6792821330659
+4.065518147486 15.56148958172 -0.6331682456137
+2.219082053515 16.01824881003 -0.8010852917419
+2.174789337049 16.09891505058 -0.7868719254322
+1.780093458163 15.24383096611 -2.421411611915
+1.818386020549 15.23790317371 -2.458339645162
+1.3285 13.43007136077 -0.3617220132642
+1.3285 13.38345283648 -0.3192550052424
+1.3285 13.44932224901 -0.3089632503207
+4.020577285476 16.90335893969 -3.3934e-14
+4.052812892928 16.86438623348 -3.3934e-14
+4.245969969051 15.63114167956 -0.2378983132927
+4.257501518977 15.69280729079 -0.2367289780278
+4.301492657637 15.61993862492 -0.3013947365415
+2.850339665495 15.39899928606 -1.313433811763
+0.452538142362 15.31293614528 -1.93745071468
+0.5062489181724 15.31176042228 -1.946410116768
+0.4817407633012 15.3054110369 -1.995390476028
+4.612213700362 15.98880145941 -3.3934e-14
+4.31980213527 14.09694640524 -3.3934e-14
+4.278387840929 14.1618455196 -3.3934e-14
+4.307933016828 17.35967411151 -3.3934e-14
+4.284459096265 17.2742497653 -2.180099184793e-14
+1.077046636477 14.82495982022 -3.3934e-14
+0.4596919984731 15.2019573893 -2.671832602487
+0.4749727437703 15.21093083071 -2.619970083958
+7.78e-18 14.97096141485 -1.313546410666
+7.78e-18 14.95102760165 -1.267562498671
+7.78e-18 15.00806886235 -1.279857919888
+2.518502226565 15.14982970362 -2.972307005517e-14
+2.523962135014 15.20826524739 -3.3934e-14
+2.463333494582 15.19847089817 -3.3934e-14
+1.44246346123 12.81191719754 -0.9328305020108
+1.467287866347 12.79836736596 -0.8890842154369
+1.422765504421 12.82859475782 -0.8862697335193
+1.459402815973 12.80716138235 -0.8365071434839
+7.78e-18 15.1752805589 -2.421840428944
+7.78e-18 15.2155831697 -2.370797342151
+4.035623659672 14.73399744698 -1.138354013275
+4.092475713786 14.78263502656 -1.116493294269
+4.091394456302 14.71645916733 -1.105410643757
+2.407657014935 13.51548589097 -2.383150440999
+2.337803547758 13.53567689119 -2.38670775147
+2.363660451027 13.58762729976 -2.395865474881
+2.422375519962 13.58569962047 -2.395529278724
+1.766884292637 15.8462596832 -0.8458934351068
+1.731287318846 15.89787435296 -0.8283110430579
+1.3285 13.65139865337 -0.5842024573508
+1.3285 13.60560788457 -0.5596506347911
+3.904493120535 14.68846700467 -3.3934e-14
+1.39939114662 15.85852007147 -0.3969567569248
+1.411943155636 15.86890229226 -0.3117419640551
+1.380339003705 15.84698322478 -0.3485804973364
+4.8279 15.58985609892 -0.3156241874298
+4.807425434655 15.62943885129 -0.2477302902349
+4.8279 15.5539194581 -0.2461000763807
+4.4701232065 15.04737182811 -1.026883481128
+4.470338106636 14.99459427778 -1.017469175489
+3.022030545528 15.63696789643 0
+2.960636556502 15.64199382143 0
+1.3285 13.6356760134 -0.2621899534157
+1.228743906063 15.74709944368 -0.5952414524625
+1.168772030422 15.71345736798 -0.6210615485151
+1.3285 13.26151803472 -1.920379579664
+1.3285 13.31472439324 -1.935524241135
+2.854643054244 14.85814524477 -3.3934e-14
+1.895905915607 15.58785630003 -3.3934e-14
+1.935295461034 15.54316956368 -3.3934e-14
+1.960899103147 15.59695519564 -3.3934e-14
+6.131592806417e-07 15.37472317047 -0.9735570659622
+1.423074573922e-15 15.33506213021 -1.014234754983
+9.56992014305e-16 15.3305823291 -0.9185800993221
+3.759122272896 17.68263126148 -0.05083691828994
+3.833996729387 17.70554744304 -0.08986674588407
+2.39961666568 12.92853370571 -0.5422590109247
+2.402403907165 12.92943422045 -0.6146379630985
+1.3285 13.10694745367 -1.744228190262
+4.192502747973 14.36253590107 -0.8966102584365
+4.207304148988 14.37106051174 -0.8482346682943
+4.158664725513 14.37521193505 -0.8243829656576
+4.506897171008 15.32676533209 -3.3934e-14
+4.546805055671 15.3881771803 -3.3934e-14
+4.461339585716 15.3841113065 -3.3934e-14
+3.779945807146 15.17968786159 -1.013029263889
+3.824221392003 15.19251590273 -0.9403202930146
+3.847439979552 15.18281812289 -0.995325886749
+2.293409775364 13.0944263773 -2.308900405575
+2.210296770785 13.12583634541 -2.314445576891
+2.245328826049 13.06647618518 -2.303975924375
+2.4279 13.26311565674 -0.3926561476605
+1.483982363409 12.80665663134 -0.561807034029
+1.475331944014 12.80897117482 -0.6157400463129
+0.1868131100632 14.68483194363 -0.0550930248925
+0.2438684521352 14.68494355623 -0.0130768926989
+4.405575547098 14.19485106643 -0.3887170508104
+4.427794724819 14.24175452857 -0.3922241553177
+4.456458692534 14.19211752845 -0.3782595328712
+3.554165656074 13.59068767902 -0.669452204774
+3.51480340011 13.63520731931 -0.7084496101077
+2.031496545926 15.23958442952 -2.447607635724
+2.032312193918 15.24849711484 -2.391957872776
+2.088008922133 15.2498003789 -2.383403731881
+3.311472448823 16.5878044189 -0.7006651153478
+0.75294797129 15.02547163784 -2.64939393108
+0.6989857531087 15.05708799143 -2.654964544012
+0.7413089172165 15.09385582462 -2.661456831774
+0.7034212376096 14.9965673204 -2.644293596261
+3.887165216998 17.72050715228 -0.1172107956502
+1.317072204584 13.81835647275 -0.5046882145169
+1.311005404501 13.8566922314 -0.570294161526
+2.4627118915 16.92260861191 -0.4868147467689
+2.458861885248 16.92039039012 -0.4340376183247
+4.726991521617 15.62750217563 -0.2587855291759
+4.719383428505 15.63687425976 -0.2054578514914
+4.782718624889 15.63874250296 -0.194811878901
+2.298549428098 15.23891662363 -2.451875556086
+2.273289848373 16.73616017726 -0.458705422277
+2.311047512191 16.77519324253 -0.4672889747947
+1.983328757823 15.32039620524 -1.876673024923
+2.266676989462 16.23930501727 -0.7621166390971
+2.171730860478 16.23342564862 -0.763143285355
+2.215003193986 16.29500478074 -0.7522921763929
+4.567021423259 13.72818693378 -0.2797063854473
+4.608422011155 13.68646479785 -0.2674687923646
+2.351004307637 12.71002720378 -2.025807630618
+2.397184739042 12.7816543795 -1.993946646195
+2.371180331882 12.74813280737 -1.960221965715
+2.377094189293 12.74111624729 -2.060505376688
+2.159180682849 16.1621633254 -0.7757179800303
+2.104868615119 16.19775991463 -0.7694382429687
+2.506621774476 16.16314368678 -0.7755371991985
+2.536280851673 16.08766705749 -0.7888429446155
+2.472545549019 16.09140662857 -0.7881813585048
+3.977219511447 15.02430367413 -3.3934e-14
+3.924812363572 15.03671949777 -3.3934e-14
+4.301791644677 16.78621417027 -0.4196461671879
+4.305142620889 16.8424223651 -0.4289220507976
+2.292392011078 12.82635040621 -0.3661860523494
+2.283357173064 12.82249206634 -0.2845973563935
+2.250849003555 12.81025694971 -0.323973670764
+3.926862305503 17.5620390945 0
+4.466603557018 17.5190373294 -3.3934e-14
+4.534036820665 17.4612232636 -3.3934e-14
+4.534333264545 17.52918204325 -3.3934e-14
+4.521781492667 17.83649320366 -0.03184862849139
+4.452092031995 17.82960955666 -0.0185159721188
+3.978876269341 14.08354222284 -3.3934e-14
+3.816814693686 14.37794624617 -1.222620540946
+4.403220231368 13.98023973486 -3.3934e-14
+4.367475833948 13.93257803066 -3.3934e-14
+4.450700998992 13.91496970931 -3.3934e-14
+3.918441841294 13.87485514728 -0.4969581030827
+3.919852194468 13.81608768385 -0.4859183341965
+3.876557775078 13.83825318647 -0.5107092551101
+3.092987768085 13.59636682034 -1.152271712815
+3.070390126523 13.6246503823 -1.189798130415
+3.093647994551 13.66093676715 -1.162723538052
+4.044270789624 17.24935758084 -0.5710286029669
+1.63301135657 12.73761714864 -1.26242670985
+1.692623356898 12.7407567481 -1.22958522023
+1.676080163142 12.73218220932 -1.314939093565
+3.482234558745 16.62764913126 -3.3934e-14
+3.532726004195 16.64426551678 -3.3934e-14
+1.3285 13.30947216679 -0.6545300812667
+1.3285 13.28366948775 -0.7156375313209
+1.3285 13.25564714904 -0.6511702770195
+4.181319643512 14.6985124057 -1.060020069456
+4.138107339152 14.71606362407 -1.082791378606
+4.159216866659 14.76344911144 -1.081093005929
+1.391939776066 13.11983536269 -2.313377496874
+1.391334099412 13.17977943442 -2.323949347937
+1.29901791085 15.28378908427 -2.154572373875
+1.338418168478 15.28984395283 -2.111647300841
+1.348975626639 15.28110999025 -2.173548545167
+1.320939996447 13.63077599925 -2.164016694312
+0.7483960420963 14.58213036818 -0.5131122826117
+0.8035411403691 14.55572763826 -0.5085839073609
+0.2931638144586 15.42481841097 -0.9222607396947
+0.337379372908 15.43213199568 -0.8933790857901
+3.702150283804 16.30362227406 -0.5442670236226
+3.663962921356 16.37706096341 -0.5765791933005
+3.712437008379 16.37793907284 -0.5523429199829
+2.904345869302 14.43453455564 -3.36738e-14
+2.758297394619 13.95973003847 -1.972473773931
+0.7256354475088 15.35804026277 -1.538802319206
+0.6905031944266 15.35329089241 -1.585636782832
+3.069476037814 15.62497041155 -0.8716556734184
+0.6061925053947 15.34369798177 -1.67603149736
+0.5676961748696 15.33955103116 -1.713491637088
+0.5301155326732 15.34386378146 -1.674425809841
+0.06993921912261 15.28274978537 -2.162561232855
+7.78e-18 15.26166609378 -2.187280566051
+0.02361649159424 15.29055102389 -2.106177950238
+3.655910070999 16.11057310484 -3.3934e-14
+3.136813844578 14.82321486665 -2.613731750656
+3.169324986999 14.86323990281 -2.620790538515
+3.186657832846 14.81506715118 -2.601162106537
+3.151301856763 14.77332946035 -2.604935302203
+3.0469320351 15.80272338905 -0.8662458016566
+3.112945504409 15.83358762587 -0.8504047584244
+1.876115291031 15.45891191435 -3.3934e-14
+1.400660689003 15.48819934266 -3.3934e-14
+1.324943862913 15.47308384747 -3.3934e-14
+1.384281861554 15.43358252793 -3.3934e-14
+0.8232100583432 15.21944565479 -2.570298765174
+0.08959071828257 15.33546703017 -1.749830772344
+0.01252170082493 15.34022842456 -1.707278810884
+2.539683954995 13.40329950283 -0.6313917592482
+2.474351834616 13.39449625646 -0.5734691657278
+2.472262176463 13.3909487688 -0.6435466456405
+0.8681427877442 15.28027233377 -2.179554639761
+0.819993460386 15.27576391814 -2.21124757252
+0.7919048175042 15.28449046355 -2.149945015245
+2.362780144765 12.71266610413 -2.103363766965
+2.4279 13.22787921817 -1.01373965507
+2.4279 13.29946510627 -0.9915650778614
+2.4279 13.25932905403 -0.9575568127593
+4.377476113714 15.18475372129 -0.9844761889016
+4.413216613042 15.17542966162 -1.037211587876
+4.340841593366 15.1755580848 -1.036617303911
+1.594784386008 15.34188224112 -1.692420429504
+1.666280217366 15.34114465739 -1.699028069049
+1.62411537664 15.33686664017 -1.738037873739
+4.762231172644 17.2658703213 -0.4497797171913
+4.812533334002 17.30101191783 -0.4549723585986
+2.984291120569 14.15272549025 -2.086223513086
+2.905485549309 14.14945565259 -2.104636295471
+2.95550255301 14.14331798079 -2.139477804922
+3.007310541993 17.33599185306 -0.3156452436475
+3.007979152579 17.3377721563 -0.2255195084613
+3.060455858887 17.36887424029 -0.24744443289
+3.049526056759 17.36336605586 -0.1869597835842
+4.630787027024 15.0260141283 -3.3934e-14
+4.675477117353 15.10985640254 -3.3934e-14
+2.125657443347 13.96423046129 -3.36738e-14
+2.193567204167 14.00826133687 -3.36738e-14
+2.131701253738 14.02820417274 -3.36738e-14
+3.8751656265 14.89081111997 -3.3934e-14
+3.793912120893 14.88603450562 -3.3934e-14
+3.834418354523 14.84389399164 -3.3934e-14
+3.716298595868 17.60403457776 -0.5214704677625
+2.198327463809 13.4328107463 -3.36738e-14
+2.222097307223 13.48615297888 -3.36738e-14
+2.210044364755 13.37379936515 -3.370062035289e-14
+2.253214839188 13.41425732748 -3.36738e-14
+2.4279 13.32080200731 -0.859494277297
+2.4279 13.2728192263 -0.9067091969206
+2.4279 13.34738309155 -0.9339446133102
+2.463974200939 13.37672984088 -0.8696098774554
+2.428936658113 16.6108226841 0
+2.408443893309 16.56101745847 0
+2.459747717886 16.54463357941 0
+1.820169355037 12.79896666926 -0.1530503949134
+1.764338648245 12.79946818117 -0.1087693559318
+1.765731396915 12.79875572556 -0.1716756888281
+1.089786105026 15.4464765716 -3.3934e-14
+0.3519954081046 14.62700061088 -1.290055614771
+0.336355631481 14.62265124014 -1.347524339406
+0.4144162804496 14.61985382848 -1.336446033001
+1.889188271756 15.63862961065 -3.3934e-14
+1.96125162851 15.64935063821 -3.3934e-14
+1.9189696668 15.68029643583 -3.3934e-14
+1.062043479312 15.64781130948 -0.8742658559433
+1.013027529642 15.62767485048 -0.8370725985111
+1.544246648395 15.95926206359 -0.5640684725418
+1.481965948754 15.91133234956 -0.5693690667743
+1.516335040239 15.93920939147 -0.5257975840569
+2.335795899872 16.60617502929 -0.6974191205644
+2.293831239532 16.57694130887 -0.7025745361483
+2.295260210039 16.63730305769 -0.6919304837476
+4.212778628305 16.29666854956 -3.3934e-14
+4.182942894637 16.35496707347 -3.3934e-14
+4.137988092964 16.32284946294 -3.3934e-14
+1.646293628099 13.65120503164 -2.40706947198
+1.719997775976 13.62813439299 -2.403005586542
+1.92436127192 16.32462395797 -0.6799072220205
+1.95217012103 16.35560601977 -0.7192652430692
+2.43847400413 14.46434838007 -3.387048272019e-14
+2.247321356597 14.24062598637 -2.511006332896
+2.315521654756 14.21023191023 -2.505643757425
+1.705835093841 12.92788265554 -3.3934e-14
+1.781818621322 12.96161696877 -3.3934e-14
+1.728163470654 12.98003019219 -3.3934e-14
+7.78e-18 15.09012410189 -1.231870875164
+7.78e-18 15.08364185514 -1.167959887835
+7.78e-18 15.15057781774 -1.19494759618
+1.56569 15.3557 -1.56279
+1.578972626131 15.34984832509 -1.618484515655
+3.785793434634 13.83776344954 -0.55970131787
+3.743123501415 13.8000761862 -0.5785137192169
+3.637474648265 17.36305191442 -2.332206613321e-14
+3.571664330859 17.43135187714 -8.478830884012e-15
+3.581715920776 17.33842828831 -5.166942525867e-16
+4.361564651372 17.15572589097 -0.4728982519791
+4.288184933275 17.14788190796 -0.4865872493662
+4.322327066249 17.18688815985 -0.4861894551948
+4.309891364171 16.37977765959 -3.3934e-14
+4.278145195792 16.30068112338 -3.3934e-14
+4.330556070633 16.33228372564 -3.3934e-14
+2.787962813399 15.71686195443 0
+0.7271134072916 14.55920593528 -1.108041148598
+0.7514001589662 14.54203210826 -1.178991657901
+0.7752946585933 14.53444475613 -1.13209952466
+2.771622762958 14.92264760395 -2.471125397784
+1.956554209664 15.03209048651 -2.650553200677
+1.983581959147 14.97766824649 -2.640962934355
+1.93170477266 14.97095555096 -2.639780793343
+3.509670973048 16.89717202463 -3.3934e-14
+3.499826349499 16.94686422645 -3.3934e-14
+3.461195275632 16.88246358167 -3.3934e-14
+3.521292271975 16.2125656568 -0.6275532763059
+3.515521500149 16.26096884093 -0.6396923768035
+2.350089649912 15.20699688276 -2.642632544868
+2.401026804923 15.20209047506 -2.671048578004
+1.3285 13.23125869465 -1.314419480042
+3.937646293384 16.49213298359 -0.4747269319075
+3.930939517999 16.54094386607 -0.4860274589663
+3.983571596 16.5220630388 -0.463234016252
+0.5595356727284 15.46458871705 -1.027035209615
+0.5775804464717 15.46498820076 -1.083173991395
+0.496079086957 15.45085129586 -1.02944980235
+4.428973760418 15.85806875363 -3.3934e-14
+3.38644689588 14.26974198794 -1.422661693737
+3.439731262285 17.3700449959 0
+2.242479594286 16.56466618575 0
+0.6843365418967 14.5345400791 -2.562827479803
+0.6313216901165 14.56208141138 -2.567684625386
+0.7094634919474 14.58813173741 -2.572275331263
+2.290733504247 16.51990855164 0
+1.341667370195 12.97931109265 -0.3362408190359
+1.346925624719 12.95472584801 -0.2531114891735
+1.336413759865 13.0072086998 -0.2745499397713
+7.78e-18 15.18782632195 -1.632770944259
+7.78e-18 15.25944902312 -1.609785509066
+7.78e-18 15.23787241101 -1.665633724468
+3.496083053746 17.58090170059 -0.4410863230395
+3.486858327107 17.5786617054 -0.3718431875742
+3.532719602857 17.59695259063 -0.4012788848417
+1.960176754649 12.67781678387 -1.764027479948
+1.903104631717 12.68171877385 -1.736019815768
+1.872556274949 12.6739508964 -1.791367263526
+1.931312391308 12.66903354482 -1.826143063204
+3.810846869543 15.29568949509 -3.3934e-14
+3.865277012568 15.3203110454 -3.3934e-14
+7.78e-18 14.86155179822 -2.069454503492
+7.78e-18 14.91024817318 -2.103858433112
+1.904075155284 14.91151325469 -3.3934e-14
+1.821792943854 14.9363365088 -3.3934e-14
+4.785913902349 17.83899911713 -0.4800431828067
+4.732392760601 17.84330275302 -0.4347027385471
+1.822105124001 15.98111190119 0
+2.328273738366 16.36177383234 0
+2.943474369978 16.01735867943 0
+3.666039127597 14.33174663828 -1.071052369857
+3.587576008642 14.33751925045 -1.038232774243
+3.620259034876 14.32511990698 -1.108658714072
+1.289778029177 13.90053927991 -1.26487504852
+1.286827473135 13.90499548207 -1.342368353468
+1.301594036731 13.84966160745 -1.301975707463
+1.271528831857 13.95415603007 -1.294822091505
+0.5627863809992 15.49664254257 -0.283413033578
+0.5063203388621 15.48419922031 -0.3017763696148
+0.5220054600002 15.48856269246 -0.2402798822787
+3.723278953224 14.6525162912 -1.350811270292
+3.67848042288 14.66484250253 -1.396292560523
+2.915657539425 16.72098851924 -0.6771795046597
+2.980261609495 16.71417809764 -0.6783766750779
+1.972977648846 12.77596907865 -0.7833108992159
+2.020024402601 12.77930848318 -0.7252926821175
+2.11463195502 13.61560795501 -2.400794355076
+2.056050162467 13.63635245565 -2.404456151164
+4.313073995539 15.34381527143 -3.3934e-14
+4.243731566105 13.69630121131 -0.3404425066806
+4.29342688407 13.66679820441 -0.3219946892323
+4.235052291064 13.64534064124 -0.3341951006744
+4.165735711618 14.8244544375 -3.3934e-14
+4.121452865209 14.86182464584 -3.3934e-14
+2.618182351851 13.42557791752 -0.392799465315
+2.582907825376 13.41840316097 -0.4331782835876
+2.640720506789 13.42692510845 -0.464321459783
+2.98085810237 15.04120738382 -1.798451942153
+3.040472074227 15.04541343104 -1.774514317607
+4.8279 17.18919585675 -0.4012753473824
+4.781461367154 17.20831759395 -0.4392875314093
+4.8279 17.25207272636 -0.401229555713
+2.627673461911 16.63848659454 -0.6917290077293
+2.649928589702 16.55428518742 -0.7065684018669
+2.592895947071 16.55077656481 -0.7071891907114
+0.3931534909553 15.31171190996 -1.946529949285
+3.804678139704 15.24313374301 -3.3934e-14
+1.356309750951 13.58407441853 -2.395235654817
+1.380796100922 13.65593620507 -2.407905562281
+1.25533245381 13.89555166509 -2.140156289144
+1.257056146552 13.87913785883 -2.213466888168
+1.279471003841 13.82697199973 -2.141768400545
+0.6423210087376 15.51892847154 -0.0446913314108
+0.5884083454359 15.50538906798 -0.08777404374188
+2.4279 13.19794658816 -1.085196721636
+2.4279 13.12076156775 -1.078522343285
+2.4279 13.16912760731 -1.140327008582
+0.137888004095 14.57279775488 -1.811422491195
+0.100567905321 14.56830205717 -1.847163269717
+0.164606902339 14.5621480367 -1.894900335799
+2.178937328884 16.61645581975 0
+1.453190425868 14.39887610369 -3.38534120234e-14
+1.397375771936 14.42370994705 -3.39178123831e-14
+3.838290659489 17.6360851302 -1.028133630136e-14
+3.880679713435 17.58643202571 0
+3.884189990769 17.67541902124 -2.477151879739e-14
+2.921597398434 14.93944828617 -2.375437460313
+1.238628802334 15.35823106715 -1.537185865164
+1.303340932582 15.36310880771 -1.487757439072
+1.30992903275 15.35416594642 -1.577578494057
+4.421386714922 14.70290474718 -0.9780670180671
+4.388235536275 14.74575861297 -0.9943152533686
+4.49050186064 14.73314273773 -0.9670637734401
+2.099313969864 16.5120551933 -0.7140199042101
+7.78e-18 14.92173470612 -0.9350933775042
+7.78e-18 14.87155013732 -0.8759398148137
+7.78e-18 15.10497105444 -2.210499782477
+7.78e-18 15.11918171095 -2.281144638468
+0.2782155587579 14.62172496185 -1.361127570717
+4.293489237458 17.80839974376 -0.1186549734448
+4.371096314376 17.8195558871 -0.09683289706355
+4.344309059315 17.81553043708 -0.146853829964
+2.958941143718 16.44030680392 0
+2.985587096777 16.38034660658 0
+3.030378203983 16.45497994112 0
+3.109703441266 15.83251793418 0
+3.136818595943 15.77727705254 0
+3.855424864395 16.65874116301 -0.5367347158883
+1.860729294453 13.76054856311 -3.36738e-14
+0.2132848588098 14.84564567668 -2.617696518014
+0.2829379521781 14.86225924313 -2.620617585247
+0.2942439812022 14.79787486467 -2.609267768407
+1.309435666718 13.73390966756 -2.002299783179
+1.294224610443 13.79410324507 -2.012953353739
+1.302200214148 13.75510067809 -2.058473360973
+1.31860540413 13.66643946405 -2.035611190373
+3.470847980866 14.14331083155 -0.8333956643707
+3.508388715992 14.08032706276 -0.7920891752983
+3.454518980882 14.08230672538 -0.8370235353264
+3.518632168024 14.1665193309 -0.7990542073153
+7.78e-18 14.61520172343 -2.074525370979
+7.78e-18 14.59267367809 -2.124072508972
+7.78e-18 14.56196353993 -2.081776168599
+1.569973871339 12.93631929754 -3.3934e-14
+1.576584652648 13.01481603867 -3.3934e-14
+4.28629744934 15.70016943781 -3.3934e-14
+7.78e-18 14.84112436466 -1.544181285953
+7.78e-18 14.90785771589 -1.554860474741
+1.700549795657 15.75994544501 -3.3934e-14
+2.276909092047 16.74462729892 -0.237295759835
+2.238917893595 16.70365661954 -0.187400345894
+2.272312339937 16.74058773332 -0.1554627370337
+4.313289578981 15.19237110612 -3.3934e-14
+3.187029123885 16.60336781415 -0.6979194622557
+3.206885076802 16.54301610389 -0.7085617293822
+7.78e-18 14.63788941529 -1.826562239557
+7.78e-18 14.58329105868 -1.807116822488
+7.78e-18 14.62979785287 -1.773621366202
+0.902061968501 15.46782166477 -1.163780107322
+0.8772590220506 15.43006325063 -1.234444357694
+1.719538590417 13.91571110501 -3.36738e-14
+2.421106076164 12.94091496492 -1.400779829765
+2.308681849602 13.0415394821 -2.299574017953
+2.354502821655 13.09132100892 -2.308352380102
+2.366585796794 13.03519226502 -2.298454193808
+3.845582062253 17.23508431788 -0.5865357905785
+3.8611151912 17.30819490852 -0.5736397730558
+3.889276589057 17.2642364718 -0.5813924970952
+4.273281118014 16.55325902244 -0.3852398942314
+4.330637989767 16.5552568687 -0.3730763508891
+4.295905114146 16.48610143028 -0.3681860177089
+4.36431422817 16.50941343444 -0.358722103581
+1.800078705184 13.62334601246 -3.36738e-14
+1.847698288042 13.65200606398 -3.36738e-14
+1.807956586568 13.68484161644 -3.36738e-14
+3.161124187039 15.7890915516 -0.8160507295283
+0.5222193309815 15.09137740061 -3.3934e-14
+0.4596490003458 15.14954750721 -3.3934e-14
+0.4082483464164 15.1517468959 -3.3934e-14
+4.374954552313 15.22265674576 -0.7693485965172
+4.509995277293 17.83146589604 -0.3664674472595
+4.556195595619 17.83657202862 -0.3138579656912
+0.1961265727962 14.66359333366 -0.7912871414045
+0.1412951658173 14.66435784021 -0.7772882292914
+0.1591643797019 14.6602520082 -0.8516919303394
+4.8279 14.0812252374 -0.07903789841754
+4.228754340075 13.75047464848 -0.3547076140357
+4.278055662597 13.74632219955 -0.3400803627941
+1.888533510311 14.43425178574 -2.545153527481
+1.224946669455 14.12175118083 -0.3307168890499
+0.4819314727037 15.39353740538 -1.332174503955
+0.495516937199 15.42024430069 -1.254547118329
+2.399159774548 15.63534988119 -3.3934e-14
+2.360714400671 15.60197135049 -3.3934e-14
+2.404405359084 15.5709225268 -2.643700669755e-14
+2.451391662039 15.59645716991 -1.427562943749e-14
+3.421993458192 15.0725163182 -3.3934e-14
+3.45156572135 15.12736304313 -3.3934e-14
+1.867027179527 15.81060033548 -3.3934e-14
+1.89364028279 15.86298752028 -1.625361380323e-14
+1.3285 13.46097629335 -0.8227960589009
+1.3285 13.40835962931 -0.8805439885845
+1.3285 13.41649648066 -0.7979953453274
+2.96075640091 14.17994544842 -1.931940450101
+2.995388372188 14.17219367144 -1.975923469114
+3.03335668002 14.17844511707 -1.940544707261
+2.503078308917 15.35064844502 -1.611218200068
+2.55140151605 15.35695877585 -1.550209128396
+1.745880453353 16.02407958799 -0.8000637522177
+1.751403963742 16.08213205773 -0.7898226591442
+1.796898228715 16.04645330474 -0.79611676162
+2.793956124818 13.45899241347 -0.01891348775645
+2.771568887652 13.45540450748 -0.06436266960861
+2.83939849869 13.46552055902 -0.08560665482734
+3.39249491134 17.08572225653 -0.6128710628737
+3.338376984228 17.14634565647 -0.6021818876988
+2.183121061828 16.570635318 -0.7036855803599
+2.228499310859 16.59411250193 -0.6995452458741
+2.185532642707 16.62311196437 -0.6944313951152
+1.3285 13.1623942015 -0.4240617963154
+1.3285 13.20709682444 -0.459574004245
+2.005196714814 12.65246154785 -1.937966348924
+1.996210428942 12.66592247747 -1.847692628649
+1.948628414659 12.66088430169 -1.881540009542
+2.92446336548 16.85989903388 0
+2.954936032428 16.801248823 0
+2.978055468857 16.84710713418 0
+0.8992160259418 15.30533066276 -1.996417604106
+0.8412436914251 15.30145169224 -2.02574809824
+0.8108703192851 15.30687422818 -1.984016915396
+1.705016340301 16.08918527617 -0.7554605028176
+1.694058966589 16.04458236877 -0.7964381724615
+1.749329907207 16.13171374611 -0.7594965688514
+2.633433850186 13.32008270406 -1.743813244082
+2.629617743156 13.32638306139 -1.689310700254
+2.4279 13.07186778316 -0.7045173444249
+3.551994283682 16.67314013222 -0.6856171444807
+3.547915288 16.61879896961 -0.6838368370294
+2.684012714959 14.12362323608 -2.490369579082
+4.258798222542 16.44799475514 -3.3934e-14
+4.325910662881 16.43028799338 -3.3934e-14
+1.345559102872 14.70684581871 -2.593210718665
+1.324732222544 13.73703888344 -0.823924333338
+1.320837205563 13.77547424467 -0.8579849286558
+0.1981705683052 14.6803137571 -2.588533161558
+0.2669389467842 14.6192939872 -2.577775927561
+0.1768921072447 14.62695705233 -2.579126860308
+3.105313847524 16.50512079279 -0.7152355740889
+3.038954247923 16.48398163533 -0.7189644905351
+3.055251606982 16.53097702632 -0.7106759567491
+2.861783170233 14.95246174591 -2.301568027886
+0.2431965022507 15.22490312402 -2.537693212051
+0.236981528749 15.21670242455 -2.586710308286
+3.187418738225 14.20272046618 -2.458073690855
+3.187528193446 14.27846780462 -2.466551617178
+3.189680376147 14.2448744166 -2.412588412947
+0.8892432563765 14.70358884102 -2.592645765533
+0.9161461273045 14.65420802945 -2.583936889731
+0.8507670302203 14.66230201839 -2.585362096725
+3.79056939131 15.56701795869 -0.6016373150945
+3.753690573593 15.57623156433 -0.5494428256142
+3.823293953464 15.57368481741 -0.5639618203923
+1.866958012746 13.08945196648 -3.3934e-14
+4.73321367699 17.84766528111 -0.1829116124739
+2.4279 13.28184423905 -0.7090063329673
+2.4279 13.2957219575 -0.7673509774778
+2.4279 13.34765070838 -0.7501035093612
+4.738985178046 15.72692813339 -3.061318555391e-14
+4.70739626549 15.67462432041 -3.3934e-14
+4.783834066622 15.68542963411 -1.517180786582e-14
+3.063259309426 15.17422679348 -6.608319034484e-16
+3.140540223015 15.19206698243 -1.49774250472e-14
+3.813179625317 14.33318937372 -1.062979591675
+2.758757945299 14.12783122948 -1.99989889617
+2.773865129497 14.11467838916 -1.937994905914
+1.604904605684 12.76568952768 -0.9359272925307
+1.650849995116 12.76381899075 -0.961815256394
+1.649966712032 12.76757222113 -0.909871084133
+3.502130598412 13.54316176113 -0.3263581764908
+1.847727331792 14.50042988149 -3.3934e-14
+4.329010137939 14.37457323094 -0.8282668210047
+4.351608311525 14.38650508725 -0.7606339225155
+4.299971506279 14.38239815166 -0.7838781765392
+3.845601140851 17.53137063791 0
+3.80778033414 17.58134266757 0
+3.770743114521 17.53874133095 0
+2.373891436093 16.26057581606 -7.386163831928e-15
+2.391326827666 16.32931598608 0
+2.32760538264 16.2415373092 0
+2.010695453878 14.38110251051 -3.377633199193e-14
+1.940775145801 14.36787278649 -3.370618528033e-14
+2.579549449909 14.51154955931 -3.3934e-14
+2.609248621987 14.58312334576 -3.3934e-14
+7.78e-18 14.67882464813 -1.752067183296
+7.78e-18 14.67180052034 -1.659634122648
+3.922392531487 15.16360254731 -1.104191643488
+3.897718269408 15.17165118661 -1.05850056694
+3.972883290594 15.17375710181 -1.046632851249
+3.247682524985 14.58280872463 -2.120347238741
+3.231897321437 14.5634740405 -2.179405178333
+3.253094854403 14.53805131386 -2.094397285297
+3.210279534672 17.03311992035 -0.6221470334904
+7.78e-18 14.76114391411 -1.63491637474
+7.78e-18 14.76208659628 -1.723076138891
+2.381568076246 15.31900981626 -1.888422724411
+2.381929933579 15.32508523464 -1.838670557506
+2.427574358675 15.31658897065 -1.908168135131
+3.206342684837 14.57467190629 -2.313555327414
+3.211793157968 14.54088503833 -2.272827768357
+3.202134982447 14.49273994206 -2.326016271303
+0.7516925085596 14.56889624942 -0.7793688016684
+0.7376876499584 14.57892889214 -0.7104443474725
+4.236339218043 13.76634260988 -3.36738e-14
+4.276770810375 13.82340977839 -3.372452383983e-14
+4.228976856054 13.84271026009 -3.377840786022e-14
+4.097746249933 15.77749476068 -0.2945081461072
+4.144654633117 15.80416422612 -0.285629156762
+2.666818798256 16.49852497814 0
+2.709935045509 16.47180050109 0
+3.693344333619 14.32340016861 -1.11841222626
+3.729145567677 14.33269969655 -1.0656828311
+2.705068434361 13.48788817879 -2.283086498245
+3.818295764947 16.5498330154 -3.3934e-14
+3.768103340135 16.55186721912 -3.3934e-14
+1.000448635135 15.6434454654 -0.120212544873
+0.9698530429935 15.63103412445 -0.06820258628611
+0.9424301081834 15.61929938782 -0.1230323952797
+0.9745669400671 15.63217604405 -0.1749693292718
+1.043920257684 15.66288596801 -0.1713726633027
+0.9031905820251 14.49677240969 -0.3968910809223
+0.8844362081899 14.50889283691 -0.4589700623212
+0.9361061562554 14.47052425134 -0.4602389982687
+2.330512815695 15.33170461536 -1.782267036271
+2.38978266542 15.33725441479 -1.734046936103
+3.037581130425 15.2312489484 -1.5163424261
+3.000746045089 15.20432080628 -1.572321311769
+3.013733418096 15.25716879677 -1.559704004456
+2.941094395881 13.99461658439 -1.47612285297
+2.921503545874 13.95368295541 -1.507636828553
+1.908298547183 14.69872316099 -3.3934e-14
+1.968867652321 14.73659654063 -3.3934e-14
+1.91583843002 14.75403432558 -3.3934e-14
+4.450970222176 14.35378435844 -0.4076779366399
+4.388823980139 14.35313214747 -0.4202175414788
+1.924259884443 16.16950643806 -5.297645226556e-16
+0.1498785618981 14.61317708694 -1.450078942655
+3.195591692859 15.17847874663 -1.28933635884
+3.259361233358 13.58219283977 -0.9392582472258
+7.78e-18 15.08866429616 -1.297673031168
+7.78e-18 15.15123205837 -1.257741224902
+2.362513655395 15.32379795386 -3.3934e-14
+3.526467945846 13.53423513638 -0.6426517250329
+3.437160184253 13.52611783999 -0.6272294655807
+3.449204673233 13.52452911988 -0.6847525316497
+2.4279 13.24280028816 -0.03489163389989
+2.4279 13.22145127215 -0.09472952033204
+2.4279 13.27716243968 -0.08087879781318
+4.048677503662 14.94057240637 -3.3934e-14
+3.160147810727 15.91147181377 0
+3.208201508781 15.88572792533 0
+3.202297229822 15.94604538979 0
+2.906518988435 14.60821152831 -2.575820026907
+2.870148740479 14.5734772334 -2.56969832579
+2.862350524743 14.63265187968 -2.580127862149
+-4.634506539472e-15 14.6970227516 -0.01122000248501
+0.05174377874953 14.68488952662 -0.03497712435793
+3.888035979763 17.60152183011 -0.5219145790605
+3.916302217345 17.55320441336 -0.530432249415
+3.863099300167 17.54448757896 -0.5319695452429
+1.3285 13.58208481006 -1.480807079723
+1.3285 13.53859976625 -1.50908977258
+1.3285 13.53363212697 -1.435525532374
+4.273303956272 14.03558715026 -3.3934e-14
+4.351041510676 14.00899179741 -3.3934e-14
+1.80214087959 13.077238496 -2.305867715112
+1.870819631079 13.08253552995 -2.30681070583
+1.799963942872 13.02157408269 -2.296055133242
+1.827375072276 13.12709252127 -2.314663419149
+3.982314953049 14.49090418551 -3.3934e-14
+2.4279 13.00047610964 -1.347831870804
+2.426933428947 12.98335162721 -1.268764757127
+2.423207443149 12.96025829497 -1.315205785933
+1.3011268027 14.76833204878 -2.604049743198
+1.253809243454 14.75103652193 -2.600998940616
+3.12042908627 15.37558328301 -1.404828177797
+3.111199305968 15.38990424738 -1.348689051461
+3.170487136392 15.40726544259 -1.296452340568
+3.986761382587 16.76649714081 -3.3934e-14
+3.967872872685 16.68304400751 -3.3934e-14
+4.039843187398 16.73686602545 -3.3934e-14
+3.735078345035 14.62161585844 -3.3934e-14
+3.003889223861 15.47675200293 -1.113625374436
+2.459136675062 13.9294486432 -2.456137486069
+2.420480909336 13.87719537399 -2.446922178509
+2.395245929705 13.94430404082 -2.458761238976
+1.307914365006 13.76811085162 -1.802229601749
+1.320083334129 13.6933336127 -1.770551811063
+1.297280509366 13.80542647952 -1.843286859925
+3.432808339263 17.55803431245 -0.2319442110652
+3.387300046982 17.53827022741 -0.2183074588423
+3.538008893219 15.17446879668 -3.3934e-14
+3.494196520612 15.20606131594 -3.3934e-14
+1.527295474166 15.21779910099 -2.580187939571
+4.072166661834 15.15172868509 -3.3934e-14
+4.019370223094 15.12013820096 -3.3934e-14
+2.4279 13.2242941181 -1.362696294251
+2.4279 13.28416114631 -1.362342806875
+1.511072111055 13.36666777565 -3.3934e-14
+4.141549036393 14.46085101143 -3.3934e-14
+4.103041361246 14.41762365761 -3.3934e-14
+4.159049744529 14.40452818529 -3.3934e-14
+3.288643909428 14.79151118117 -3.3934e-14
+3.226172450518 14.85270846729 -3.3934e-14
+3.215461195321 14.79409870145 -3.3934e-14
+0.2490277805129 14.67115123823 -0.635388504907
+4.766062400034 15.8174876387 -0.1943483723848
+4.696339915697 15.76040143651 -0.1868739209224
+4.703687949613 15.82167887927 -0.197248420978
+1.3285 13.54807660364 -0.5467365679147
+3.315393395549 16.44097646546 -0.7265562770874
+2.898134436994 16.96590118258 0
+2.939733399802 16.99399009909 0
+2.871267594869 17.01563427669 0
+3.075584696726 14.2575349273 -1.491753248908
+0.5550578533795 14.83179120892 -2.615237317976
+0.6084187513282 14.80592518624 -2.610678665981
+0.5390432088119 14.78221076405 -2.606496168214
+1.021077385827 14.91057778486 -3.3934e-14
+1.011641877845 14.97975120121 -3.3934e-14
+4.089992591737 15.26807049772 -0.6649801856264
+4.062624527287 15.30961325861 -0.6826731352629
+0.6678978904967 15.22254862779 -3.3934e-14
+0.6109780683707 15.25199205196 -3.3934e-14
+1.12971854052 14.2733109815 -0.4762110895013
+1.158834521499 14.2357542242 -0.4238888236789
+1.09036427745 14.32465996343 -0.4477436712641
+7.78e-18 14.96468514897 -1.363270505002
+7.78e-18 14.89920408475 -1.327152988378
+7.78e-18 14.76337424134 -2.341778584065
+7.78e-18 14.74377364123 -2.419395160844
+0.2548972354625 14.51111584384 -2.253037817355
+0.2087184281514 14.51581226654 -2.22256117203
+0.3368490100941 14.64468316257 -1.08043461591
+0.3705428039296 14.64694770332 -1.026599227221
+7.78e-18 15.03087660477 -0.805016040812
+1.345810802514 12.89924758114 -1.282209765273
+1.364528611558 12.85982321986 -1.333241704505
+1.388869384132 12.8287079563 -1.278943798255
+1.367371244477 12.86681528959 -1.219701600791
+3.20415386272 14.33214032782 -2.284718248593
+3.204693039908 14.41918923753 -2.296687934921
+3.214521152004 14.37928474967 -2.228957283279
+3.196515035317 14.36254962749 -2.351473662314
+3.509584862165 16.75760997961 -3.3934e-14
+3.453805678735 16.72832033785 -3.3934e-14
+3.501859410159 16.68754072567 -3.3934e-14
+0.5194566670133 14.50557850368 -2.165196968679
+0.4335561187955 14.51414313354 -2.194079303564
+0.4824768609057 14.50044970847 -2.235848650684
+2.193483755238 12.63107890724 -2.090942471988
+1.341185523594 12.81741385345 -2.085706043846
+2.117892952945 12.729705337 -1.338870633934
+2.114684679831 12.73633990176 -1.274767469186
+2.069497656001 12.74290890901 -1.206966476934
+3.764475749597 14.20803723959 -0.6377097954415
+3.758566175263 14.26937637326 -0.6520544346098
+2.806083756974 15.41931615924 -1.257229897588
+2.738523263788 15.18466281714 -2.263778760135
+2.746502216676 15.1249668755 -2.214674207316
+1.888880478492 15.1619272631 -3.3934e-14
+2.79277712485 13.45806457769 -0.1377200956907
+3.068541695811 15.37750608513 -1.399946199207
+3.051732984376 15.36946444164 -1.446854438396
+2.914799104046 14.72248559551 -3.3934e-14
+2.945606028397 14.67425763887 -3.3934e-14
+2.964595182762 14.73481208595 -3.3934e-14
+1.592440312223e-15 14.88841578424 -2.603246187788
+1.325569797733 14.54023485334 -3.3934e-14
+1.308180563574 14.5891631332 -3.3934e-14
+4.393482864049 14.07462625677 -3.3934e-14
+1.855448788835 13.92542370203 -2.455422521558
+1.905135966166 13.89396848305 -2.449879669736
+1.543414619316 15.90440249707 -2.302866597777e-15
+1.615848256759 15.91020013186 -3.069373308102e-14
+1.572958545143 15.9598069752 1.605177420252e-14
+3.118989992766 14.88374821031 -3.3934e-14
+3.209188204914 14.90981688209 -3.3934e-14
+4.104026307369 13.83195573834 -0.4108312380988
+4.180694797945 13.84129289479 -0.3858373499858
+4.626449159205 16.65809405415 -3.3934e-14
+2.329157487604 12.66941937349 -2.181909860944
+2.374873953834 12.711091339 -2.218112115713
+2.371835846438 12.7165838966 -2.160485403739
+0.149576099608 14.67354871881 -0.5780991937627
+0.06759836177497 14.67510380127 -0.5365130746489
+0.07948748990201 14.67306621345 -0.589584071526
+2.4279 12.89236531954 -2.115005388354
+2.4279 12.95353019992 -2.100126749717
+2.4279 12.88589188563 -2.06432375917
+4.318946376979 16.23686345456 -3.3934e-14
+4.273031052298 16.2158866509 -3.3934e-14
+3.028591978387 14.48268681442 -3.36738e-14
+4.385043616319 17.8186175905 -0.3277946198867
+4.663775503623 17.84120692646 -0.4084987571975
+2.480229716442 15.21270215088 -2.609804269767
+2.5463206334 15.21077518365 -2.620853536443
+4.8279 16.52988510562 -0.06000530071287
+4.8279 16.59470566141 -0.05183801232166
+4.80657858286 16.54448545185 -7.340918924892e-15
+4.8279 16.47451469254 -0.0445499212554
+4.563606944679 14.89891932345 -0.9824455372119
+4.501766416363 14.8888956722 -0.9921384795364
+4.516102786072 14.94619911589 -0.9991646591491
+4.566472979038 14.94928435398 -0.9908596638671
+1.103324373334 15.31418530898 -1.927482983111
+1.049919078469 15.31372981087 -1.930679723157
+1.388817202694 15.83740308496 -0.7786796794441
+1.339202136382 15.80325495554 -0.8091723551587
+1.161121145832 14.81138629531 -2.611639291881
+1.526678616868 14.12174688818 -2.490046114274
+1.468005151039 14.08907233453 -2.484283229153
+1.472474130598 14.15722347589 -2.496298183788
+2.765020427897 17.17545504433 -0.2328115080711
+0.6850436208141 14.53640622944 -1.54427620043
+0.6297284031536 14.55717384119 -1.535985774139
+1.625749009913 16.02052812024 -0.7084637805067
+3.686176142977 14.37514457378 -0.8250401574702
+3.633423823897 14.37942016067 -0.8007678862284
+1.3285 13.51520847285 -2.035167441965
+1.328100469698 13.54685588596 -1.995444226866
+1.32563593562 13.59550412356 -2.009829192909
+2.818828476032 16.4747123453 0
+2.791780030419 16.38809358424 0
+2.845531278363 16.39740815739 0
+4.70271585155 13.61040867193 -0.1481291962271
+4.6532353162 13.60960214917 -0.1707632359477
+4.691010297084 13.60948791025 -0.2076483031451
+3.753879694711 17.67507318371 -0.4483472983008
+3.734030390601 17.6700898494 -0.3918967602021
+4.111667004942 16.90952103811 -0.4897373960237
+4.13073191304 16.96121981557 -0.4935732359032
+4.182346770096 16.95033359367 -0.4771920063131
+4.174216273687 16.87778471422 -0.4671304295358
+0.9693438344959 14.54615465963 -3.3934e-14
+0.9192957014437 14.52638912282 -3.3934e-14
+0.9628777950224 14.47309665493 -3.3934e-14
+4.67500125747 16.45134190545 -3.3934e-14
+4.70893701946 16.39766974207 -3.3934e-14
+4.029443496101 17.74242243496 -3.3934e-14
+4.073371693592 17.7674447073 -0.0002732880342996
+3.509164049055 15.15908401107 -1.130162431327
+3.4937263629 15.1684254336 -1.077145459151
+3.724266422497 16.71481546394 -0.6065628830865
+2.952504072511 14.89919872823 -3.3934e-14
+2.926986086644 14.82444286253 -3.3934e-14
+3.043220543811 14.61251712593 -2.576587622917
+3.091927845873 14.54118257995 -2.56400778332
+3.028265118962 14.55082022746 -2.56570086255
+4.45309462705 14.91926076162 -1.007873841785
+1.614600437216 12.74447981169 -1.190456631319
+0.258212212887 14.6664410851 -0.7358250640729
+3.183126989607 13.49775506012 -0.6178094661619
+3.116029562188 13.48822040343 -0.6470652749826
+2.825183848388 15.31924445456 -1.886487809719
+2.756485685709 15.32506998244 -1.838709676686
+2.368547390073 16.40111299766 0
+3.184638929314 14.25672609746 -1.496333071602
+3.192775235488 14.24804016964 -1.545758505321
+3.23547618737 14.25670113905 -1.496634549648
+4.158982050262 14.34399863415 -0.4812969067026
+4.107375888018 14.34992182878 -0.5009300973442
+4.128154813278 14.41141218252 -0.5041589093474
+1.119558710988 14.46543179754 -2.550639520439
+1.094990670647 14.4219663897 -2.542976212176
+1.054877337433 14.47123013372 -2.551662126804
+4.422884801209 16.59274048726 -3.3934e-14
+4.390152255662 16.52924024477 -3.3934e-14
+4.466225958283 16.53416582506 -3.3934e-14
+2.831984602514 15.20390501807 -1.93015895811
+2.836184141795 15.27030142931 -1.930187857939
+2.851880963748 15.25035907572 -1.884928468469
+3.08007482527 14.16643129628 -1.271013305945
+3.016351465297 13.55168703677 -1.261959906312
+3.008288185001 13.50011487975 -1.266810894772
+2.991583821457 13.56302193957 -1.30675186715
+3.486186499013 15.62142850539 0
+3.408605974408 15.61928456979 0
+0.9874474580103 14.28789774435 -2.060547680912
+1.020659392153 14.26627770513 -1.998519327759
+2.629594827005 13.41910314576 -0.6149559303098
+2.57962995333 13.41164911751 -0.5962006907759
+2.589336502773 13.41081757036 -0.6480857616999
+2.6561213797 14.88079494291 -3.3934e-14
+4.17786277865 13.83606783924 -3.367418278804e-14
+3.873051864227 16.607677632 -0.5204436541386
+2.832539788975 13.4090312474 -1.224340111975
+2.880577192841 13.41454740026 -1.24082354296
+1.643848500575 12.68668764197 -1.698648492741
+0.1963892613004 14.46513717173 -2.531293055073
+0.2263283164595 14.47253184275 -2.488408739249
+0.1587974093093 14.47305767058 -2.485473198198
+3.54648882236 16.16666938158 -0.6044654236086
+3.564937531633 16.21361967598 -0.602178150937
+2.4279 13.0731902862 -2.304845911848
+4.33910214069 17.43847606365 -3.3934e-14
+0.3093211454352 15.43677701606 -0.737186662678
+4.165790707086 16.14592472961 -3.3934e-14
+4.235914955459 16.10359271049 -3.3934e-14
+0.4369607952971 14.6123183858 -1.392780809342
+0.4810683173331 14.61062452241 -1.341412858735
+0.9417169533472 14.31916224563 -2.109016507628
+4.205394650054 17.73775705133 -0.4978888653762
+0.7930779105916 15.3369625972 -3.3934e-14
+0.8285613578862 15.26843530223 -3.3934e-14
+3.407007343382 14.74710495739 -3.3934e-14
+2.841232341696 14.18559089843 -1.899902523692
+2.856223235797 14.19609128853 -1.84042587781
+2.806812266025 14.15501839785 -1.830673753108
+4.750839510621 14.26914010597 -0.3600540939257
+4.761299911838 14.18879720116 -0.3456481484444
+7.78e-18 15.1059938769 -1.417632174033
+2.802891984213 15.05230015742 -1.988663407027
+2.784774119339 15.06963071866 -2.049487548173
+2.806726896856 15.10526426779 -1.985825616548
+4.605813130175 16.47974624431 -0.3200195101221
+4.67096710581 16.48800096626 -0.3167488614396
+4.639314192389 16.43219017374 -0.3088205330903
+3.749347096931 16.2912420747 -0.5190055702023
+2.456587639765 16.18249955386 -0.772127985924
+1.516377442076e-15 14.94781386027 -2.630968661202
+1.326332634222 13.5962506003 -1.904964734204
+1.3285 13.53702551446 -1.883713115709
+1.327374753761 13.58329383718 -1.844037237615
+3.150344006301 16.27377031708 0
+3.301262218616 14.27633603433 -3.36738e-14
+3.365394709708 15.48513086872 -1.066116079445
+3.441759057893 15.46199477876 -1.085669734651
+3.397426023766 15.47820209541 -1.105403554444
+3.358507522765 15.53267134785 -0.7965102799446
+4.359100749185 15.30617742285 -3.3934e-14
+4.392002904057 15.26299641276 -3.3934e-14
+2.666961554844 15.50415069185 0
+2.737317005677 15.47622948787 0
+2.714222119463 15.5632770153 0
+7.78e-18 15.14881114629 -1.956073482444
+7.78e-18 15.22537555976 -1.941142112255
+7.78e-18 15.21827846347 -2.004491187521
+1.477395890619 14.4962886359 -3.389768892203e-14
+1.418144634241 14.51799645597 -3.3934e-14
+4.445547564058 14.59966879297 -3.3934e-14
+2.266017870466 16.21620496425 -7.545826733966e-15
+2.37896005577 13.67294164293 -2.410905827666
+2.411962023056 13.63477138067 -2.404180714658
+4.8279 15.16825489669 -0.7928013034555
+4.8279 15.15520789363 -0.8518680949609
+1.3285 13.09279559128 -1.568454245362
+1.3285 13.10946568118 -1.624553262951
+1.3285 13.04425444112 -1.615583605082
+1.799368496027 16.03437760881 0
+1.765145639799 15.98116581101 0
+2.967261875443 13.68283152557 -1.37073482128
+2.967005525941 13.74191114345 -1.381644757721
+2.989928375815 13.72167926093 -1.337588231505
+0.9688741713575 15.26591965886 -2.278181379111
+0.9147379695469 15.27544444491 -2.213447205986
+0.9908106583175 15.2755705423 -2.212801025865
+4.182570127313 14.83487958244 -1.083559961909
+4.136554917069 14.8084155704 -1.099811026156
+4.023049698387 14.38138831869 -0.7892781557885
+4.035821378678 14.37115017578 -0.847377037159
+4.074273073742 14.38135310447 -0.7895187104751
+4.66243106186 14.30457424075 -3.3934e-14
+4.594921945695 14.31676505598 -3.3934e-14
+4.625466733147 14.23603230144 -3.3934e-14
+3.030292105313 14.95101267094 -2.310051004103
+2.941468983766 14.95127033264 -2.308574325064
+2.994156127103 14.96172358173 -2.249285784395
+2.423424395194 13.37692227565 -6.317652037803e-15
+2.4279 13.33735781676 -0.06192832373941
+4.8279 17.40477670019 -0.1945875640737
+4.8279 17.41837178783 -0.2436496165125
+4.8279 17.47270832684 -0.2398567907879
+2.31399641368 14.13261090494 -2.491954905828
+2.409481449422 16.49168434675 0
+2.48440338049 16.47077300788 0
+3.613123689081 16.27629518913 -3.3934e-14
+3.618939341945 16.3394543084 -3.3934e-14
+2.445411516268 14.58361679666 -2.571483364218
+2.154691880247 13.39469527473 -3.36738e-14
+-4.67051e-15 14.72721492619 -0.4400463560649
+-4.408372237162e-15 14.77022732641 -0.4825987585652
+-3.016080810566e-15 14.720972317 -0.509455992359
+-4.67051e-15 14.6773 -0.474241
+3.893341353015 15.21359122457 -0.8206841194559
+1.549572089349 14.98575103759 -3.3934e-14
+1.595518715388 15.04046136724 -3.3934e-14
+3.403956940695 15.55085339807 -0.6935292556066
+3.40283318136 15.54013287889 -0.7542653841457
+3.359036469148 15.54563934414 -0.7231023897033
+2.61398398484 15.33076321261 -1.790086062359
+2.539504426855 15.32955432692 -1.80059826293
+4.69746160905 16.55186891555 -0.3264068109729
+4.760506077506 16.56245684429 -0.3258300057426
+0.09985374045354 14.50160550848 -2.313225949695
+0.1256468192642 14.51395862793 -2.234327903607
+2.451391389533 13.80995623047 -2.435073013871
+2.56261861526 13.21929744344 -2.324113129832
+2.492501911188 13.20663310651 -2.326974737848
+2.402960440151 15.68612121193 -3.3934e-14
+2.341427014304 15.65952881402 -3.3934e-14
+3.308633750988 15.28151301221 -1.180793539717
+3.264470331901 15.26422668323 -1.225121588581
+3.951110158176 15.01114422475 -1.237757803539
+3.909549191578 14.96858457208 -1.258185194986
+3.903146054761 15.01738508744 -1.271241709486
+0.1421736700952 14.58104531884 -1.743650768317
+0.1776765109113 14.59044632098 -1.663289183589
+1.522156779574 12.91281363355 -3.3934e-14
+0.3577213333442 14.65328748199 -0.9415206527959
+0.439766957636 14.59591304359 -1.551923434423
+0.4792392161981 14.58313016909 -1.614785259335
+2.181379351815 12.72920318877 -1.350392404729
+2.23872249696 12.73677627886 -1.386166151066
+2.225740202498 12.74120910306 -1.319543147042
+2.191313333033 12.72580692373 -1.399835058441
+3.284887174957 15.2690809733 -2.548721107591e-14
+1.248707596087 13.89714482348 -2.450441820788
+1.238697440306 13.89171431887 -2.393995290689
+1.211074072092 13.94953546072 -2.402484469549
+3.522528056953 15.75681669604 -0.5468424981697
+3.781701948491 15.53307326227 -0.7942423152891
+3.832092153298 15.53821375168 -0.7650343715651
+0.5938404992628 15.34930868643 -1.623893462594
+0.6580076294303 15.34533786181 -1.661370991016
+3.181340730722 13.51023627138 -0.209328251173
+3.257267733995 13.5197531762 -0.173658975439
+3.178196591571 13.5104958343 -0.1564276228975
+1.496430857983 14.94790229348 -3.3934e-14
+4.328035535202 15.85516230057 -0.2502100975774
+1.1685264343 14.77123510471 -3.3934e-14
+1.110206391663 14.73469642108 -3.3934e-14
+1.412637913687 15.60773519445 -0.9911772345465
+3.373576077678 15.93871074643 0
+1.3285 12.99750857318 -2.06513096673
+1.3285 13.01868028684 -2.017449292361
+2.937338725436 14.1877071904 -1.888016127645
+2.927727715118 14.1962989285 -1.83931511345
+4.566333580639 17.78550225255 -0.4894752862646
+4.346972605093 15.56301308229 -0.6241978875833
+4.327958906028 15.5032787769 -0.6322825566432
+4.291899960356 15.53655052306 -0.647884598523
+4.378270232357 15.50549844242 -0.6215809729016
+2.346028762831 14.71625548351 -3.3934e-14
+2.316683993419 14.78734198142 -3.3934e-14
+2.262715272622 14.73255345295 -3.3934e-14
+2.162663252646 16.28514100045 -0.754028499954
+2.111448086332 16.29964099322 -0.751472059103
+4.69522711601 14.58027186471 -3.3934e-14
+4.64844757585 14.50791157393 -3.3934e-14
+4.721549629421 14.52091767116 -3.3934e-14
+2.590499400248 15.2539408087 -2.3568797297
+2.508384851293 15.25279800242 -2.364380319209
+2.556886230809 15.26065404482 -2.313278136332
+3.015021647464 15.49227009975 -1.025547960546
+0.1200606102149 14.67999853915 -0.3808611524551
+3.948237399365 14.46792286058 -1.144179076927
+2.026489937294 16.17015857902 -2.437816523551e-14
+2.318049990886 12.88365254818 -3.36738e-14
+2.277139072283 12.82153687993 -0.003331798845215
+2.316153713327 12.84716224547 -0.04670493033577
+2.367295589853 12.89230650496 -0.002978960602166
+0.6123901919544 15.26203620974 -2.304036219102
+0.5546133776203 15.26722084672 -2.269037225836
+4.681220235437 17.7069576062 -0.5033228991763
+4.677673055373 17.65110171123 -0.5131725507815
+4.615135692424 17.68482729341 -0.5072308869809
+0.9747013127547 14.36822414614 -1.508963747796
+0.9397263761739 14.4003815525 -1.468759782443
+1.300234103236 15.37297464272 -1.42210193838
+1.351588536022 15.36800400839 -1.452567428582
+1.3285 13.42409481164 -1.836839696354
+1.3285 13.51507947249 -1.826839831896
+1.3285 13.47225629158 -1.882664482986
+4.163806824161 15.76377760762 -3.3934e-14
+4.210922560737 15.72896677004 -3.3934e-14
+5.639745992168e-08 15.37365289793 -0.681374684004
+1.407154944105 14.65406985848 -2.58391165794
+1.918507020159 12.95259889994 -3.3934e-14
+1.922995600088 13.0104894186 -3.3934e-14
+1.848585127362 12.96171590344 -3.3934e-14
+2.039915061258 14.47642559814 -2.55259090425
+1.989563374929 14.46963038924 -2.551390958591
+4.715593192425 17.7464918307 -3.3934e-14
+4.755738949289 17.71493772696 -2.48461438815e-14
+4.763025664832 17.771489647 -2.234120987976e-14
+0.5388124701537 15.47110859268 -0.8441158850207
+0.566701154269 15.47950516354 -0.7998851491416
+3.206314305083 15.09999045583 -1.465157813641
+3.230605323495 15.11050717647 -1.405718679101
+3.271004837126 15.10066589894 -1.461393361267
+4.621149831846 14.4425035878 -0.4428206210206
+1.868874601945 12.85491331126 -3.3934e-14
+1.838588127125 12.89570199503 -3.3934e-14
+3.666645073729 14.10280259028 -0.6803047241873
+1.926924723617 15.47729017475 -1.147053289015
+1.93254616621 15.51969771438 -1.087124068547
+1.984992146433 15.49890194446 -1.113089494541
+2.611100813804 17.05490249523 -0.3296069549907
+2.649130024301 17.08645767211 -0.2889961940772
+1.3285 13.51910729995 -0.2068351938041
+3.331415641934 14.27487217159 -1.393552200393
+3.311188192023 14.26459889214 -1.451753835227
+3.627320975784 15.43152207926 -7.178795228587e-15
+3.611696601205 15.49086868275 -1.636531663588e-14
+0.8635937502617 15.12497650103 -3.3934e-14
+0.8740274720149 15.18868064407 -3.3934e-14
+0.8162555320929 15.15805015842 -3.3934e-14
+4.331661871511 15.19270445524 -0.9393020127892
+1.114416228762 15.26451668727 -2.287454513175
+1.053775699569 15.26618095082 -2.276277357138
+3.312096702503 16.33789534559 -0.744727432978
+3.322616424906 16.38714099351 -0.7360431438435
+4.8279 14.48191941283 -0.3964673588315
+4.811433273039 14.44516660099 -0.4277964880621
+4.8279 14.51198364248 -0.4545315301062
+2.414320873933 12.97857262429 -0.3411337968602
+2.397348006227 12.93235415233 -0.3308594887745
+1.407630225966 15.36314224779 -1.487409559452
+1.404394720599 15.37256233164 -1.424623562973
+0.1154502622918 15.39770290753 -1.113171430286
+0.06856583995073 15.39221411528 -1.164643634245
+4.528734951993 15.57966263763 -3.3934e-14
+-4.537923137255e-15 14.88425314781 -0.1391311250606
+-4.665349095088e-15 14.9260421525 -0.1041963529632
+-4.501994290655e-15 14.93188143858 -0.1547664713632
+4.410284639548 13.87991129118 -3.391349727725e-14
+4.42328424558 13.81329755742 -3.3934e-14
+4.477185631629 13.8684816568 -3.3934e-14
+2.386968284707 15.6021580254 -0.9960684753849
+2.353969996403 15.63196011194 -0.9697106528102
+2.376374657017 15.56600342286 -1.03145782367
+4.698604648026 16.40766296606 -0.3009042313548
+4.77110120091 16.38627273673 -0.2945482023778
+4.68890255761 16.35549001005 -0.292295184043
+3.745700041842 16.99935149106 -3.3934e-14
+4.335517123167 14.50986672249 -3.3934e-14
+0.2719730323025 15.03122793207 -8.17662e-14
+7.78e-18 15.20041161173 -1.089938087132
+7.78e-18 15.13782921605 -1.133458239429
+1.833005103277 14.58855674583 -3.3934e-14
+1.799447506947 14.52438563126 -3.3934e-14
+1.787800585636 12.76797423042 -0.9043073330295
+1.841457533591 12.76942666218 -0.8842058849872
+1.889141196449 12.78738813011 -0.5662989604041
+1.965264685997 12.78811419428 -0.5491130212767
+0.2481327506464 15.42230122909 -0.8846082587128
+0.1910390269693 15.41625662474 -0.8970827010524
+1.617987672229 12.66712305129 -2.233560414279
+1.65833435557 12.63154900034 -2.227290862174
+1.590504120116 12.61740594055 -2.224798296725
+1.689942700449 12.69232120973 -2.238006783248
+2.674531459714 15.36727376257 -1.458514063237
+2.659522558068 15.3804691964 -1.384451099497
+3.194020717562 14.83447270987 -2.456027044671
+3.190506611842 14.84905119592 -2.50695881301
+3.196676279748 14.88562866799 -2.44206487581
+3.200619374734 14.83693950208 -2.399679821694
+1.711140994865 13.51065852773 -3.386472619115e-14
+1.652655570511 15.32594682634 -1.831761718272
+4.020101266516 15.618982283 -0.3069251977276
+4.568045073745 14.68461682551 -3.3934e-14
+4.500703020775 14.67212053141 -3.3934e-14
+2.44996359764 14.52733799334 -2.561560361848
+2.515107136714 14.55975394783 -2.567273154901
+2.532795639645 14.49386815331 -2.555653388201
+2.453824685857 14.45556028047 -2.548904820518
+2.344320178392 13.92475350739 -2.455313970691
+3.056658521864 17.01779890475 -0.6248476707311
+3.088129263101 17.08752757247 -0.6125461129865
+4.145635096384 14.34253393099 -1.009906547895
+4.219977066478 14.34778586922 -0.9799501661094
+4.136501454777 14.35230935042 -0.9544913897448
+0.526788825396 14.66278534831 -2.58544174131
+0.5339707189691 14.57942139549 -2.570745553643
+0.5021153410238 14.61874168492 -2.577677718209
+3.91854482256 17.29555653377 -2.625211446611e-14
+3.832779982365 17.28239969312 -3.3934e-14
+3.879237799669 17.23460718325 -3.3934e-14
+3.880924168038 17.33014475333 -2.470276962976e-14
+3.464309061148 14.29000269336 -1.307747648505
+2.107184942103 15.23698684515 -2.463893441426
+2.783270603973 14.07562378395 -1.894340001473
+2.789214985016 14.15353311176 -1.888114842765
+2.800377360023 14.09624165789 -1.841408555321
+2.848542084825 14.11919944777 -2.276353736465
+2.506150575995 13.99593745171 -3.36738e-14
+2.515295134748 13.9451661937 -3.36738e-14
+2.597817430186 13.99352848881 -3.36738e-14
+4.245916175297 14.9086961816 -1.07053351924
+4.298810754059 14.89014161477 -1.047840321937
+4.226266083531 14.86016058696 -1.069624749805
+3.943951130088 13.58289575295 -0.0637009089135
+3.905385561006 13.58010140781 -0.1086280787663
+3.747506981042 17.59851066322 0
+2.579335272354 15.57339339138 -1.025891627935
+2.573200660375 15.52576651679 -1.080402785076
+2.527100719406 15.54832673483 -1.051831235577
+1.063474947554 14.26138571387 -1.690973065049
+1.052400485315 14.26793879244 -1.739736171941
+1.08293171702 14.23178347273 -1.757173599899
+3.318544926173 14.16613443141 -0.9792697011729
+4.792024833977 14.81517370471 -0.9463240800537
+4.737538906237 14.85104856086 -0.9546330001358
+2.413177910371 13.0007437861 -2.292380848481
+2.4279 13.00168997052 -2.215943257871
+2.4279 13.36511105397 -0.8019610705861
+2.488954447082 13.38476286703 -0.8125528650285
+1.307833070278 15.30833329011 -1.972884965796
+1.31758985935 15.31756324123 -1.899835552861
+1.353255852158 15.3124134919 -1.940908865179
+2.599425508425 13.26770303529 -2.069521249581
+1.481419719479 12.70144064897 -1.73709832803
+1.440808863631 12.72676919551 -1.753732405118
+1.454347475194 12.7110274807 -1.799953329113
+1.465045926064 12.72101988266 -1.673894406927
+4.314333321893e-08 15.28074468478 -1.392076084198
+4.292830885822e-08 15.27433182698 -1.4610706217
+0.5244108350513 15.45989341073 -0.9852389745121
+2.4279 13.26597238595 -1.476477236462
+2.427902428796 13.26262975734 -1.538986790549
+2.5272579708 14.42593599985 -2.543678548527
+4.290150006941 17.53888582563 -3.3934e-14
+4.278633991571 17.6070561634 -3.3934e-14
+4.231933162021 17.55889778096 -3.3934e-14
+2.775348830618 15.2204514531 -5.056447882165e-15
+2.808258152791 15.26262243225 -2.119352031461e-15
+1.938996024187 15.25735619576 -2.334472577436
+1.979117558721 15.25134428879 -2.373539899373
+3.165417495421 13.50982754211 -0.04336048410248
+3.238809607923 13.51867942028 -0.04030318154284
+3.205781519109 13.52753244303 -4.191442022275e-15
+2.261083833561 15.93871175661 -3.3934e-14
+2.21096383113 15.87396078312 -3.3934e-14
+2.263799926806 15.88483639354 -3.3934e-14
+1.368274027984 12.87223967342 -1.146259529321
+1.399620448636 12.82052758396 -1.194922473712
+2.93245822404 13.41207229756 -1.343306183658
+2.071766192048 15.36967147234 -3.3934e-14
+2.025412003647 15.40424541801 -3.3934e-14
+2.010881108389 15.35463273297 -3.3934e-14
+0.04190066964715 14.68300204093 -0.2387423934115
+0.1020017692575 14.6828621337 -0.2487572993183
+4.609878617637 14.82667200173 -3.3934e-14
+4.584251041353 14.88022309784 -3.3934e-14
+1.438885336448 13.94798281541 -3.374265713019e-14
+0.7333526030126 14.59315874037 -0.3865447532529
+0.7627456092286 14.58030918421 -0.348107309996
+0.7236354409155 14.59939028669 -0.3233524475521
+1.679874280989 13.26004423084 -3.3934e-14
+1.61449831131 13.22663607885 -3.3934e-14
+0.3683635570887 15.45768614911 -0.3903128883513
+0.3181595174364 15.45207960581 -0.330310549112
+0.383923867441 15.46122152753 -0.3280598833823
+1.918008623836 12.79051024931 -0.4923983988871
+2.013519628062 12.79017508054 -0.5003318436225
+1.973989646704 12.79220378652 -0.4442457053611
+4.546370745709 14.46014786656 -0.907936147491
+4.585397737091 14.49617786588 -0.9078401858363
+2.692416670281 13.4417417377 -0.2055983676896
+2.646986981913 13.4333602399 -0.2662128573339
+2.4279 13.05893485558 -0.8432801112737
+2.426864647016 13.01484904204 -0.8843859907575
+2.4279 13.06526079007 -0.9052321690972
+3.796380197478 13.56697323066 -0.3957242921829
+3.852264266591 13.57231011703 -0.3502786607495
+3.782853458951 13.56718056551 -0.3464288405113
+3.286412800494 14.68225817697 -3.3934e-14
+3.3317047959 14.63804333723 -3.3934e-14
+2.547714566931 17.0005156442 -0.3981973361051
+0.06685773635583 15.31057549639 -1.95572128198
+0.1388414112301 15.31325198149 -1.934364534497
+0.1030558839389 15.30581013377 -1.992478238122
+1.910776756602 13.67883643316 -2.411947133609
+1.979875394876 13.71941890088 -2.419102367294
+1.99224421276 13.65501117017 -2.407750798466
+4.36511369295 15.18234716483 -3.3934e-14
+4.409129898732 15.21148119675 -3.3934e-14
+1.061764562812 14.29401733182 -1.408230571931
+2.851130274389 16.77127678846 -0.6683172617397
+2.859590375557 16.69029344992 -0.6825949036833
+2.794684741663 16.74607700042 -0.6727614024606
+3.920597268685 14.7773795216 -3.3934e-14
+3.870942573352 14.76285440141 -3.3934e-14
+7.78e-18 14.91531829192 -2.028286914132
+4.197286843113 15.0490441657 -3.3934e-14
+4.242096731676 15.08569086721 -3.3934e-14
+4.186235529424 15.11990270129 -3.3934e-14
+2.185843789442 16.33451005258 0
+2.199850628573 16.27823378829 0
+7.78e-18 14.98325772195 -1.994805659201
+2.174980981076 15.35522648895 -1.566918922165
+2.131341290662 15.3513219572 -1.604394902697
+2.120961069305 15.35994945099 -1.51954404258
+4.621886006757 14.40565339717 -0.6518038823481
+4.584339189511 14.41594880004 -0.5933395652995
+2.111691624405 13.92215150552 -2.45484897065
+2.065326285923 14.00088007117 -2.468731180955
+2.134445899487 13.99685942008 -2.46801736342
+1.328551820734 13.04297476972 -0.4183024394046
+1.3285 13.05574635163 -0.349115707583
+1.3285 13.10683065939 -0.3824581461969
+3.454271497907 14.8171350309 -3.3934e-14
+2.995593748219 16.5138286802 0
+3.077671789502 16.51730356823 0
+4.487351139955 14.25537874773 -0.3842964584828
+4.548452523761 14.30959897647 -0.384411114454
+4.55710001678 14.25257337437 -0.3733422946958
+0.424166553276 14.6800206816 -0.08203436203642
+0.394305287646 14.68164765992 -0.03620059143986
+0.3657825656059 14.68286875013 -0.085088936222
+1.349397186928 15.38847907 -3.3934e-14
+1.729882577252 16.02417654309 6.101880943388e-15
+4.117396501526 16.84453822794 -0.4767038573577
+4.058143150306 16.86553838045 -0.498598147142
+0.6049061659937 14.58929268767 -1.279974281737
+0.5255749682169 14.60887217364 -1.283677686416
+0.5598268659254 14.59468116135 -1.346468493827
+4.817747384922 15.53813022482 -3.495523945513e-15
+4.817994156606 15.61620116816 -3.410560975515e-15
+4.775311916544 15.57306625528 -1.810596615253e-14
+4.062393232051 14.39862879758 -0.6917163789719
+3.990441054163 14.39174816469 -0.7306733868091
+4.04441730947 14.38946396729 -0.7434294656702
+1.786814836876 12.67930574923 -2.235709617544
+1.290038914143 13.82684817289 -1.900955382311
+3.167001712004 13.50330288547 -0.4251244363032
+3.158266836125 13.50043491602 -0.480983184397
+3.215263632599 13.50877135312 -0.4390387421102
+3.6559589569 13.55943486297 -0.2281825219405
+3.622388423334 13.55716215192 -0.1866581730693
+3.601153305165 13.55436973393 -0.2381955626303
+3.862310800602 16.55486432038 -0.5156587480304
+3.813166217183 16.56063109045 -0.5375463231132
+2.193153937474 15.44996041429 -1.197086012475
+2.189413178829 15.42645493758 -1.246694775256
+3.229940496317 14.7223160103 -3.3934e-14
+3.225714365865 14.65268174701 -3.3934e-14
+4.74892147705 13.6097199993 -0.2257213013842
+4.809579344716 13.61056003316 -0.1798230796243
+4.764406271981 13.61098468253 -0.1361276582759
+2.578689682549 15.82324903884 -0.8554030296084
+2.575276112725 15.89006953643 -0.8300955508835
+2.629031285278 15.85305998325 -0.8433342472475
+1.3285 13.40301051972 -0.6896585250916
+1.3285 13.44668844045 -0.7207364790557
+4.82405652796 16.51426859399 -0.3160498994149
+4.8279 16.59461950427 -0.2577898072083
+4.8279 16.53675636477 -0.2390048114
+4.8279 16.58435599596 -0.3257710576102
+0.3872608698015 15.35332983707 -1.585560133305
+0.4407428675579 15.35238389097 -1.594362600279
+0.3689137946342 15.34801144448 -1.636292784092
+2.739337998733 13.54277593522 -1.990221473511
+2.728329158526 13.54883188318 -2.059476528614
+3.731567129133 16.86371265899 -0.6292095188996
+3.730256665785 16.91722388558 -0.6386182048381
+3.779083859884 16.93054414602 -0.6188149769307
+0.1043723684951 14.47983066875 -2.445959165945
+0.07119438952372 14.4906833951 -2.380639428413
+3.565712274872 16.53430291622 -0.6583462805172
+3.599180090433 16.60877034928 -0.6528155056104
+3.718869567871 14.29217337063 -0.6797657696791
+2.914968861798 15.67131125197 -0.9401938995033
+2.854710751621 15.68459831396 -0.930658157614
+7.78e-18 14.55359843555 -2.415768888314
+7.78e-18 14.60907698095 -2.422198822656
+7.78e-18 14.57289230637 -2.470882494684
+7.78e-18 14.58722977706 -2.368033200128
+2.371350500126 12.88225192072 -0.640952025823
+2.395901889385 12.91450453474 -0.717220005692
+4.774921293846 13.81409657028 -0.2792590169251
+4.812419220237 13.89373696972 -0.2924153031732
+4.8279 13.81487236586 -0.2711477568723
+4.806993815381 13.73468307686 -0.2644995853246
+3.138457169758 15.50928810181 -0.9290019873402
+1.284439687101 13.93874267089 -1.047800157012
+1.258402255539 14.00960852279 -1.075341474852
+1.300269608423 13.87291036763 -1.09446194284
+4.78022433796 15.60810800397 -0.3686015607622
+2.460748764853 16.41651757264 -0.7308664798084
+3.141752145989 15.97971491829 0
+3.141116307749 16.04898930054 0
+3.067197387366 16.03200015524 0
+2.319550100198 13.67033646756 -2.41043641653
+2.313300100462 13.61742075718 -2.40110697097
+2.269713082599 13.69105011747 -2.414095629668
+2.829995514305 15.87821963172 0
+2.795408055207 15.83652958805 0
+4.086542967262 14.90612600827 -3.3934e-14
+4.146566251367 14.93905892193 -3.3934e-14
+2.50681088075 16.96819970414 -0.1897172147007
+2.544756818588 17.00128054265 -0.1967518001245
+1.657639263161 15.15910381368 -2.672957869767
+2.365374740525 12.76899412781 -1.757738972865
+2.364642083971 12.77530199425 -1.702444773886
+2.329669559064 12.73889051908 -1.733558922493
+2.353904032626 12.74542841405 -1.803333293486
+0.4141085525266 15.31768827752 -1.899148175433
+1.265500668104 14.40600325054 -3.3934e-14
+1.330666544371 14.46298871526 -3.3934e-14
+1.254507581431 14.47687234008 -3.3934e-14
+4.735746259159 16.35201860582 -3.172833849113e-14
+4.785424549351 16.33372027099 -1.462420801881e-14
+1.49618118966 14.61509704172 -3.3934e-14
+1.50830566054 14.53735904718 -3.3934e-14
+7.78e-18 15.08914172177 -2.491733284853
+7.78e-18 15.05713164434 -2.440085044517
+4.333574357351 14.44386476401 -0.9578286064513
+4.288009967004 14.46160668151 -0.9762354862775
+4.151027409261 16.27820025298 -0.3679598480981
+4.064281691505 16.26950165307 -0.3916485376997
+1.386789899746 14.21981059518 -3.383866145978e-14
+1.429143767141 14.25574396848 -3.384992270593e-14
+3.101752170128 15.49653503512 -1.001423288809
+3.111490009172 15.4876151379 -1.051975522483
+3.065536436583 15.48328411106 -1.07645877753
+3.244138474359 17.47020471637 -0.1457011504869
+3.285955673169 17.49086680194 -0.1886858630615
+3.239799607642 17.46741622535 -0.2084525413274
+1.789307156078 14.30552975806 -2.522450476004
+1.776970399857 14.23152597537 -2.509405253258
+1.725168431617 14.27790144142 -2.517574907832
+1.732073369118 14.35499876014 -2.531170837541
+3.106392830654 14.53719122306 -3.379693394261e-14
+3.106332143733 15.92017696598 0
+7.78e-18 14.6674972479 -2.130046086073
+1.143796002011 14.22269476205 -2.507849386378
+3.07750911442 14.26277626503 -3.36738e-14
+4.8279 17.38010730931 -0.2926522512043
+4.8279 17.43983939797 -0.289812947334
+0.362026887096 14.664710351 -0.7380653808259
+0.3683028366525 14.66848134219 -0.6530317565576
+0.3239401050814 14.66905930892 -0.6834004405725
+0.4077364733171 14.66487201149 -0.6893993794946
+1.995699589353 15.35620827628 -1.557370044756
+2.068264821993 15.35783472698 -1.54091301542
+1.432378153094 12.80139011278 -1.146370872344
+7.78e-18 14.92753913077 -2.441442018984
+2.92784067036 13.75042484418 -3.36738e-14
+2.978888658772 13.72894166279 -3.36738e-14
+2.960984531003 13.79479723093 -3.36738e-14
+2.384322147233 15.39425330813 -1.327893536119
+2.406141863276 15.41705376056 -1.264780380367
+4.608184592114 16.05599291084 -0.245058680542
+4.64823353496 16.00642550115 -0.2331921157328
+4.580647717831 16.00436496201 -0.2387364832607
+2.34479964597 15.36563907195 -1.467143461107
+2.32258893789 15.3764771948 -1.401493947924
+1.189006421388 14.30459539824 -3.3934e-14
+1.264417515574 14.3373497007 -3.3934e-14
+1.114504257433 14.29939309648 -0.2599127039173
+1.086302870964 14.3331432869 -0.2899785588522
+7.78e-18 14.83284298428 -2.017197721061
+7.78e-18 14.90031579935 -1.954046185407
+1.632817165045 12.98949864259 -3.3934e-14
+2.850634621721 15.13635512513 0
+1.81932447484 13.32912895718 -3.3934e-14
+1.859929838065 13.28770841167 -3.3934e-14
+3.606108804036 13.54974601417 -0.4379404439709
+3.547075430595 13.54524303543 -0.4079925769496
+3.570029163026 13.54518273424 -0.4765614760791
+4.636815981569 14.63770434561 -0.925962015393
+4.562062198158 14.66040292879 -0.9406447080123
+4.700686350099 14.70424464032 -0.9313089591987
+3.377386143836 16.23332771136 -0.7253237706434
+3.364546277086 16.27876446697 -0.7424477215408
+2.963548016972 14.22225708321 -1.691813118026
+3.014393526801 14.2247556983 -1.677793617686
+4.8279 15.73408567576 -0.0406235814898
+4.8279 15.81721385717 -0.06732400561016
+0.9350014968717 15.42504554949 -1.243354936868
+4.637134454739 13.60847354839 -0.2355186561647
+4.563098680106 13.61968089709 -0.261029482099
+4.686240493606 13.66651978881 -0.2573574690743
+0.8747204825471 15.58714088257 -0.4382655228965
+0.9066891007378 15.60103718094 -0.3655044173772
+0.9510054918732 15.61810895067 -0.4014071574913
+1.345161923256 14.41131968639 -3.3934e-14
+4.361261391478 17.55057590178 -3.3934e-14
+4.322624685858 17.58273232255 -3.3934e-14
+4.414702560207 13.86277174621 -0.3282083798396
+4.323684643323 13.87486155791 -0.3507186367268
+1.934606966983 12.79970690916 -0.07117007696312
+1.900347283885 12.79997370217 -0.006385795771451
+2.261400979791 15.22770443769 -2.520650302021
+2.893553648085 17.08259013769 -0.6134233456171
+2.842983994692 17.08073484877 -0.6137511472381
+2.857953962041 17.14307782678 -0.6027576140277
+2.92116627476 14.99793191757 -2.044025199248
+2.948392123555 15.01202717051 -1.963952983687
+2.4279 12.93946178257 -2.023903621624
+2.424930230611 12.88290051121 -1.987910227374
+1.27140295147 13.92769444253 -1.556636744992
+1.268972862477 13.94000350335 -1.507253510006
+1.252589885547 13.983882506 -1.527312258788
+4.466186060468 17.45738165577 -3.3934e-14
+4.266750823861 14.73263064067 -3.3934e-14
+4.217134223324 14.77415733501 -3.3934e-14
+4.202860309703 14.71805697004 -3.3934e-14
+3.558886665465 16.88517006003 -3.3934e-14
+3.503332715593 16.82030057764 -3.3934e-14
+1.578784227197 13.74424300199 -2.423476323407
+1.496181712948 13.78978082462 -2.431511011311
+1.567925157416 13.8195966473 -2.436762577906
+1.624983488467 13.7891354589 -2.431392672985
+1.571572081374 13.11730138908 -2.312935550087
+1.622269817675 13.13732356233 -2.316467998995
+1.541412061223 13.04150296284 -2.299567791564
+3.407537461946 15.51186944458 -0.9144092248447
+2.884948289962 15.38533938178 -1.35909197126
+2.899767866862 15.3752453815 -1.40999441279
+0.2091775411123 15.20593367655 -2.648884859825
+0.2650724010917 15.20919892918 -2.630021125483
+0.2641415208377 15.18952829716 -2.678326675225
+0.3274692458723 15.20206374186 -2.671223070228
+2.930651062586 14.77327490602 -3.3934e-14
+3.003598045099 14.81089815656 -3.3934e-14
+2.348221158365 15.27380517109 -3.3934e-14
+2.942627806868 13.45510513248 -0.8293909753233
+3.020690194025 13.46673818078 -0.8135061366225
+4.651512828248 17.55907875351 -3.3934e-14
+4.697319291207 17.53282124314 -3.3934e-14
+4.728076277097 17.59525410502 -3.3934e-14
+3.109776953348 14.23238346399 -1.634486890206
+3.150189653028 14.21977370713 -1.706148290517
+1.35621367459 14.80014958801 -2.609664307194
+1.367893375847 14.86906072204 -2.621821865872
+4.640434889017 17.82806679132 -3.3934e-14
+4.58118229366 17.81327736952 -3.3934e-14
+4.624627936104 17.77009757102 -3.3934e-14
+1.3285 12.94946889847 -1.779981422132
+1.270436946132 15.77977178883 -0.2765578268786
+1.311920167127 15.80423702136 -0.3056353866417
+4.097566938175 17.68101795342 -3.3934e-14
+1.202181198646 15.33999981628 -3.3934e-14
+1.973438138635 14.42179389886 -3.385061119234e-14
+1.20010185901 15.71940682401 -0.8530361025259
+3.027813563858 15.91290790994 0
+3.061284492383 15.86422822184 0
+3.481439055401 13.53863807185 -0.4150870426823
+3.423651635417 13.53139068914 -0.4606799104599
+3.46842219857 13.53520653816 -0.4833873539696
+2.621441013881 16.32569385386 0
+2.6733958956 16.27581183921 0
+2.704478394123 16.36271401008 0
+4.412151198943 14.79694351981 -0.9970731510513
+4.343986204705 14.77559483952 -1.013057074248
+3.371988133085 14.68276665924 -1.820007409607
+3.394527268359 14.66262438825 -1.773399500209
+3.370353414892 14.62662795176 -1.81331607412
+3.344958471864 14.63081165499 -1.865992794084
+1.3285 13.29500664707 -2.160858263337
+2.379000041567 15.29584197593 -2.067378959129
+2.653294868387 13.28276848967 -2.030293302174
+2.831331372493 13.60938229868 -3.36738e-14
+2.861993686181 13.67359131192 -3.36738e-14
+2.80337865606 13.65821584024 -3.36738e-14
+4.442573761369 17.82486189153 -0.3631702642766
+0.8775824222692 14.69523696654 -3.3934e-14
+4.45724841757 16.46173241534 -3.3934e-14
+1.868450897571 15.56741415415 -1.030217815974
+2.496732439216 13.79707420653 -3.36738e-14
+2.481972360035 13.70607010452 -3.36738e-14
+2.540839223564 13.75590977193 -3.36738e-14
+2.721730241077 13.49769269445 -2.095461321964
+2.714947355956 13.54495714083 -2.163176110446
+2.721593856068 13.58315376432 -2.111728914816
+3.918014101134 13.57966428818 -0.2193532990302
+3.969359772701 13.58266873681 -0.2351380725581
+2.964243192651 15.56734363444 -0.9681370093207
+2.923139436675 15.5760978727 -1.015606668171
+2.93490146937 15.62445868869 -0.9763331399673
+2.992526951414 15.64329912554 -0.9518417701422
+1.928814843612 15.91005581817 0
+2.151649494467 12.65058601475 -1.949885299651
+2.205523112419 12.65719258654 -1.942988305714
+2.174614077271 12.65925226625 -1.892504320343
+2.212547447568 12.64674238812 -2.018486877155
+0.9072885402935 14.55977073641 -2.567275575038
+0.8468272817434 14.51971318899 -2.560209135816
+0.8475946377613 14.59238911156 -2.573028189238
+0.895678964299 14.60844824472 -2.575863732746
+2.048316649293 12.64710245004 -1.972023238052
+1.971020274571 12.64307193935 -1.997636999996
+2.045299189735 12.65807107802 -1.900439757655
+2.202478796 13.78397569473 -2.43048276155
+2.254742126351 13.79914878131 -2.433162411757
+2.243758395247 13.74261774535 -2.423197231434
+1.451353155528 15.89285250998 -0.4774079741592
+1.392128464381 15.85199816359 -0.4687627443042
+1.433699837864 15.88170949381 -0.4292332678555
+3.979107565665 15.74591654734 -0.3280144175716
+3.935258065818 15.78492305976 -0.3511691527681
+4.008589667131 15.82405332216 -0.3313552554077
+0.8870724029347 15.43337872018 -3.3934e-14
+1.791063310104 15.31935223011 -3.3934e-14
+1.67969400106 12.79142213089 -0.4672391716299
+1.608357296458 12.79190892276 -0.4529195247853
+1.640063858133 12.7900139178 -0.5041465655687
+1.651718960895 12.79319546081 -0.415074253659
+1.824497097038 13.2693049347 -2.339737117811
+4.599716239077 17.84144519887 -0.176313953612
+3.705325651499 15.09134299007 -3.3934e-14
+3.744501036197 15.12615793311 -3.3934e-14
+3.263712727489 14.94476851311 -3.3934e-14
+3.205924581632 14.98432678044 -2.792090086717e-14
+3.278393648138 17.35023742072 0
+3.235764567544 17.31686376216 0
+1.777972515386 12.77183312708 -0.8479711653661
+1.806188821806 12.77548102564 -0.790940699142
+1.726094014426 12.7759782063 -0.7831677457684
+1.714879458358 13.36015550205 -2.355754423039
+1.750495668911 13.29227169497 -2.343782627994
+1.674538809331 13.27668063709 -2.341039638443
+2.271050235348 13.26769003485 -3.378994763558e-14
+2.19650974783 13.31620291801 -3.382931918425e-14
+3.627455221509 13.59450875464 -0.6166057309563
+1.970029456332 15.40514564071 -1.294207502379
+1.975073128536 15.38972735939 -1.345468356839
+1.899436432377 15.38629581253 -1.357046876384
+1.922851106045 15.41468078147 -1.270246668022
+4.8279 15.43848770803 -0.5431340072832
+4.78795224941 15.50909734669 -0.573809699536
+4.8279 15.49750555653 -0.5316214345419
+4.824094430052 15.56537885182 -0.5828471759299
+3.394118385942 17.43034602739 0
+3.340129798342 17.46908076376 0
+3.336069681451 17.40294326971 0
+1.092557199316 15.68628069643 -0.0798602526863
+1.139055772549 15.70983971604 -0.06747383864236
+7.78e-18 14.76142356766 -1.779366586626
+2.4279 13.3394216064 -0.4798905277782
+2.452252368189 13.39481989394 -0.4651081703233
+2.093098609141 16.53483902385 -0.2510128560384
+2.095322343312 16.53820575815 -0.1992730893472
+1.717797704414 14.58324622923 -3.3934e-14
+1.3285 13.21505494277 -1.950403877246
+3.671321014748 16.62739712361 -0.6176068932648
+4.389861798371 14.4266226731 -3.3934e-14
+4.313910029262 14.40441232729 -3.3934e-14
+3.579342841002 14.12364675449 -3.3934e-14
+3.582487702891 14.17415438903 -3.3934e-14
+2.42439366621 16.78288731703 0
+2.461749226018 16.72709478814 0
+2.485405167186 16.81092017056 0
+4.203640159293 15.58435031966 -0.5031586484909
+1.72908834998 14.11733143819 -3.36738e-14
+4.6682493085 14.69554627159 -3.3934e-14
+4.682901454064 14.76546698024 -3.3934e-14
+4.610853470653 14.73808224067 -3.3934e-14
+1.297226351094 15.40839160573 -1.284290768906
+1.300308361593 15.38301482296 -1.367975256072
+1.25691453646 15.39284315044 -1.335557847314
+2.475169052864 15.10871426006 -3.375716568388e-14
+2.52763085059 15.07684872651 -1.457608148638e-14
+1.496521906513 15.35218669008 -1.596286560916
+1.526146765108 15.36002892097 -1.518939803998
+1.954210442547 14.9244358747 -2.631588433513
+3.583982844851 17.61640803624 -0.4099114166302
+3.541857369753 17.59894613301 -0.4610942309848
+4.610100878255 16.32298883226 -3.3934e-14
+1.049597574465 14.3692924245 -0.4591122423536
+1.066185180874 14.34949759901 -0.5025361182175
+4.134346521909 16.39385544671 -0.3926830908537
+3.420473098097 13.53298060473 -0.3994762657482
+2.040251590097 16.46840525702 -0.4575243706679
+2.018886527648 16.44090318044 -0.5359257362566
+1.99469164896 16.41382138927 -0.4929498423015
+3.411195793552 15.69651217913 -0.6069752600183
+3.451875178166 15.64490747563 -0.5713083715834
+1.29395361274 14.83375160323 -3.3934e-14
+1.235533089956 14.88671229329 -3.3934e-14
+0.5560601005961 15.26322252327 -3.3934e-14
+0.5870902877542 15.31416433684 -3.3934e-14
+4.418425553809 13.98162282366 -0.3483703701795
+4.366233767708 14.05467157974 -0.3724344377424
+4.437106181236 14.05298174233 -0.3569450138306
+3.128710591839 15.23102914659 -1.384130272451
+3.085307463615 15.27516828292 -1.451653072015
+4.722336397867 15.23518379576 -0.6984629002001
+3.064524105304 15.68156362703 0
+2.995025654042 15.68458159818 0
+2.406466928822 14.57030965256 -3.3934e-14
+1.07073189629 14.33069824655 -0.8042256616822
+1.1064711012 14.29080079558 -0.7899682917249
+3.640960669036 14.49084002945 -1.404402793669
+3.619694718888 14.42690917504 -1.415810263748
+3.598041519591 14.46470106884 -1.447135760176
+3.661782693714 14.44188965185 -1.373556624861
+2.497354728162 15.57088760741 0
+2.545185130796 15.54427923306 0
+4.524537053208 13.9890214483 -3.3934e-14
+4.461394675686 13.96739317802 -3.3934e-14
+4.513132305817 13.92493669802 -3.3934e-14
+3.868168204724 15.54618550347 -0.719716924204
+3.794317200429 15.54956919598 -0.7005113733299
+3.826902603121 15.56095688641 -0.6359585621112
+2.079021399608 12.72419916639 -1.390078158997
+3.080499462281 15.0194874927 -1.921795806736
+1.515011071113 14.08151070862 -3.379397816743e-14
+3.752980528417 14.91221143991 -1.370177874726
+3.730328033564 14.97184337209 -1.400918372879
+3.792053789266 14.92590710987 -1.339299804494
+4.261308306391 15.1725214062 -1.053804869215
+4.544151637818 15.25420736978 -0.5906141093641
+4.479184857734 15.25327961947 -0.5958375216333
+4.518948577568 15.3003127454 -0.5590273396281
+-4.49920628742e-15 14.99668957728 -0.1580240739832
+-4.36436e-15 14.98266210934 -0.2213797127162
+1.3285 13.17742381976 -1.42795423694
+1.3285 13.23400874063 -1.429741174919
+1.136750383773 14.96552736565 -3.3934e-14
+0.4304984762977 15.34560990535 -1.658823876087
+0.3645716594439 15.34173415882 -1.693779894163
+2.459258472355 16.91719789616 -0.5588936630881
+2.424641100616 16.8868905526 -0.4957592122946
+3.698996283966 14.35016475011 -0.9665796539275
+4.347175361018 14.39812454827 -0.694640021327
+4.400950926701 14.39094651055 -0.735317923458
+4.367595137479 14.29690945152 -3.3934e-14
+0.8402744181644 14.43257490614 -1.786027839456
+0.8721750476139 14.40427440591 -1.857987328434
+1.335241597519 13.01497029739 -0.1625779881893
+1.3285 13.07240362674 -0.1217835119917
+1.3285 13.06769395905 -0.2093004892955
+1.525536918585 12.7311836028 -1.424009158403
+1.470549328792 12.74812918708 -1.420101030372
+1.504904114079 12.72926356963 -1.47782980661
+3.444032177964 14.70242650747 -3.3934e-14
+1.687096907663 15.56397074479 -3.3934e-14
+3.41360621887 17.30807563108 -4.644879806306e-15
+3.387289721543 17.36425127165 0
+3.331465946766 15.90543345457 0
+3.33161139557 15.84643506848 0
+1.984182664267 15.96023926312 0
+4.179116716277 17.78671561796 -0.3016035255148
+2.4279 13.24834980181 -1.06431234061
+0.758321739413 14.96902320281 -2.639440683871
+0.7234528660442 14.9257929234 -2.631820506106
+0.8292531135101 14.99489168606 -2.644008547348
+1.565738585089 15.84225743701 -0.8468231786673
+1.352454824519 15.83169599189 -0.1854035560796
+1.365373946928 15.33195066401 -1.779947543433
+1.378448431874 15.32532390033 -1.836535792833
+1.33084446686 15.32760427835 -1.817344195586
+0.3570761707296 15.4605482963 -0.09973985231682
+0.3915052646309 15.46522707708 -0.1598647722673
+0.7590875854153 14.83915271032 -3.3934e-14
+0.7177355926723 14.88417338952 -3.3934e-14
+3.410443851721 15.91592451636 -0.6464606190277
+3.365569107582 15.89556317858 -0.6740804413144
+3.38512358712 15.95976945969 -0.6715142907334
+4.681515308169 15.9747034446 -3.3934e-14
+3.843923716651 14.54725458806 -1.23112355593
+3.795546328685 14.58469191935 -1.276244775292
+3.8346148899 14.59398459108 -1.246396671794
+3.314900914921 16.99591253615 0
+3.365899771504 16.93168490538 -7.157112400232e-15
+2.4279 12.94460324127 -1.953925103741
+2.4279 13.01523312877 -1.927603766667
+2.4279 12.95914908767 -1.884936311848
+2.250154496622 14.08706494412 -2.483923308242
+4.254245282306 14.38726971512 -0.7563063869514
+0.4670693919545 14.67376135888 -0.1133231888807
+0.5071205635633 14.66807796973 -0.04630294118968
+3.902736378962 14.825934197 -3.3934e-14
+1.994990726251 14.96967737774 -3.3934e-14
+1.970360951055 15.02281882995 -3.3934e-14
+1.927271433553 14.97539198352 -3.3934e-14
+2.956164969446 16.27156660083 0
+1.269298606402 14.01955460318 -0.1469768913632
+1.285728876193 13.97312531619 -0.160961903158
+1.282001939623 13.98457215248 -0.08660235296885
+1.297887909539 13.92471247788 -0.1495791088704
+0.9982498347282 14.39572432778 -0.9325138022059
+0.9914650420996 14.39611006132 -1.017637911273
+1.029998977999 14.36186058466 -1.007443016188
+1.054104827545 14.33913107907 -0.9666495810998
+1.999146277629 15.2318045222 -2.495905649664
+1.98633191474 15.24342835483 -2.42366928541
+7.78e-18 15.12930518539 -1.072171915103
+2.4279 13.00860299063 -2.062694183448
+2.4279 13.00075073033 -1.996568913679
+3.799619318104 16.20026717666 -3.3934e-14
+3.783444341544 16.24803198388 -3.3934e-14
+3.742068232589 16.21465886554 -3.3934e-14
+3.793910542619 17.48726415355 -1.894901316517e-15
+3.727641426434 17.50228760683 0
+0.9389241473305 14.35879655362 -1.836237405104
+0.9379363817318 14.3695606379 -1.756548323782
+0.8983103095933 14.39464984949 -1.792495416879
+0.9800623936742 14.33281089242 -1.775698857922
+2.116997076428 15.80792671704 -3.3934e-14
+2.032915555871 15.82141736578 -3.3934e-14
+2.062218652502 15.74146095121 -3.3934e-14
+2.088968494504 15.88936855119 -1.251674144821e-14
+2.596649748804 13.68749671345 -3.36738e-14
+2.551205941186 13.60464447384 -3.36738e-14
+2.820744966904 16.4160022196 -0.7309497616409
+2.778725134835 16.36683498077 -0.7396194679107
+2.733963083386 16.42672289142 -0.7290688709939
+2.732199765519 13.35808989977 -1.565354119465
+0.8810869947387 14.45637557174 -2.54904115663
+0.8333884025247 14.40126348226 -2.539327203394
+0.9425214310963 14.43460006728 -2.545200998285
+1.271300916358 15.02144541629 -2.648691076513
+1.315851261941 14.97043393409 -2.639698789043
+1.244187549823 14.97027534798 -2.63966950987
+0.160753736349 15.21320956685 -2.606942129978
+3.304178370188 13.52455823974 -0.2160114426497
+3.269350997947 13.5199086707 -0.252173858842
+3.392165402816 13.51698168276 -0.7140718582986
+3.381896677641 13.51903342272 -0.652573264369
+3.328966604247 13.51182584616 -0.6824565446264
+1.621638862405 16.02357169156 -0.5358137986895
+1.640976111015 16.0419395301 -0.4864978459343
+1.681347248236 16.07641475707 -0.5355925516616
+2.856214069153 14.20092685713 -1.700452608581
+2.906535441787 14.22015953853 -1.703924590035
+2.881951975742 14.22934365058 -1.65183978937
+2.858038050835 14.14873473721 -1.686783411742
+2.561041457143 14.05615865925 -3.36738e-14
+2.567478109973 14.13738779302 -3.368919045144e-14
+2.526947826212 14.09972985148 -3.36738e-14
+1.48627598883 12.78412146413 -0.9374615109875
+1.552885827568 12.77132708696 -0.9290768151665
+4.635589139798 16.34888111648 -0.2943605167127
+4.653814608621 16.29939848982 -0.2845310351637
+4.591228632463 16.29899209261 -0.2896273176298
+1.676037453206 14.33551973965 -3.36738e-14
+1.613790713333 14.3321893401 -3.36738e-14
+1.657649184532 14.27595784108 -3.36738e-14
+7.78e-18 14.70345369996 -1.914003603452
+7.78e-18 14.67692594396 -1.966272722428
+7.78e-18 14.65364082896 -1.921588725194
+3.225120420727 15.04731093728 -1.763930957664
+4.279247655096 17.78536831401 -0.4895027336708
+4.350522395891 17.77540486073 -0.4912578341992
+4.387450988217 17.81630310226 -0.4449323297401
+2.4279 13.12644715829 -0.981609373575
+2.4279 13.16686658315 -1.030179858637
+2.4279 13.17651881499 -0.9810440795905
+3.206692447373 15.62124920163 -0.74752470177
+3.249790156631 15.5981989852 -0.7082550295872
+2.27402036111 16.45577886622 -0.7239358613292
+2.219764270791 16.42717183868 -0.7289835685808
+4.8279 15.57713399545 -0.04481816601898
+1.095282103482 14.56303574059 -2.56784981109
+1.043651971104 14.52822307913 -2.561711740435
+1.0489421694 14.58604372688 -2.571909088432
+7.78e-18 14.76766226563 -1.969973242028
+7.78e-18 14.70347041913 -2.018533352685
+2.924228160573 13.69322925317 -1.455822414472
+2.943987544371 13.77364210693 -1.431585492833
+2.947835736373 13.70564072448 -1.412184027163
+3.300141617503 16.92952778429 0
+1.094145375198 14.31767925875 -0.5300758632034
+1.071218690179 14.33994802959 -0.6063653495483
+1.3285 13.15731832189 -2.224794505899
+1.3285 13.14946471194 -2.171667859982
+7.78e-18 14.75775273514 -1.883378422056
+0.9286712327862 15.38935865737 -1.346500492969
+0.9028516497296 15.37566449692 -1.405588631232
+0.8774736700944 15.3923845965 -1.338797240922
+4.130798939144 17.77967307397 -0.06912566920877
+2.4279 13.14593561442 -0.3013188299291
+2.4279 13.1443244059 -0.3713167224665
+1.108260218028 15.34276550096 -1.684306349708
+3.024529250613 13.47565710908 -0.6587694617784
+3.069164651254 13.48483125163 -0.5901348739012
+3.811053537336 15.14284326038 -1.2219200784
+3.463136970192 17.12872093848 -0.6052858396896
+3.503527121277 14.84460175303 -3.3934e-14
+2.934155182782 14.15895427125 -2.050889152742
+0.6681697455181 15.40769408737 -3.3934e-14
+0.6200052276917 15.36753902075 -3.3934e-14
+0.6532290513851 15.4719880962 -1.721192775092e-14
+2.94896057508 17.08346630643 -0.6132696489626
+2.919392225206 17.12544010847 -0.6058677297229
+2.979670915584 17.15078527189 -0.6014011259338
+3.307591441377 15.75301770714 0
+3.251160145622 15.76989380172 0
+1.985368346379 15.5069268885 -3.3934e-14
+1.925722816353 15.48437496215 -3.3934e-14
+1.976222370267 15.44421131054 -3.3934e-14
+2.668235700131 13.83733221171 -3.36738e-14
+2.715661626413 13.89966811008 -3.36738e-14
+2.662513700236 13.89210775944 -3.36738e-14
+3.639228543484 14.19128938402 -3.3934e-14
+3.709586845912 14.19993942078 -3.3934e-14
+3.663989417141 14.24514131231 -3.3934e-14
+1.760734666115 13.47051153824 -3.3934e-14
+3.815563564986 16.86228849292 -0.5897851509036
+3.864050812613 16.84862631884 -0.5666295265397
+3.7903573198 16.78461517382 -0.587900074573
+1.541663896494 15.2557428781 -2.344884508928
+1.128380627834 14.26735830262 -0.6709044779729
+2.802491958033 13.81479560049 -1.784852767962
+3.254295881431 15.09029761306 -1.520357768745
+4.408756569013 15.48796528503 -3.3934e-14
+2.425189452839 15.74187850879 -2.367102442324e-14
+4.757056475648 16.73000965932 -0.3554378570698
+3.823325568026 15.45013963307 -0.818864202617
+2.899672679036 14.18188948069 -1.920961559328
+2.737435483975 14.79976670247 -3.3934e-14
+1.906639973708 12.80110749384 -2.257181005737
+1.853810614008 12.81430337219 -2.25951127775
+1.869636849314 12.86566448747 -2.268570457248
+2.007772877474 16.4234653587 -0.6580639127303
+2.045538102903 16.46910196674 -0.6251931394334
+2.042360599822 16.46229370494 -0.7014856696397
+3.74285406421 14.25485416101 -3.3934e-14
+1.903322825527 13.66507072759 -3.36738e-14
+1.752968402677 14.86161584638 -2.620509760468
+1.802576220362 14.86780312985 -2.621601173801
+1.33628774002 13.68828460057 -3.3934e-14
+1.325602897547 13.74440548619 -0.01676024198909
+1.328112298384 13.69273099273 -0.05905715117046
+1.3285 13.63500317706 -0.02539815714907
+4.827900000003 17.55800061201 -0.448929196323
+4.8279 17.59034266166 -0.409234837405
+4.463735116305 16.28320836958 -0.3022004131276
+4.517122373455 16.30459204201 -0.2983869987898
+4.584737331419 16.12334985861 -0.2592994498531
+1.148664795827 15.38673545641 -1.355693986914
+2.848130052444 16.12089483979 0
+2.918648543408 16.15672507637 0
+2.866992802494 16.17819726218 0
+2.626268460478 15.0778068198 -1.051019891036e-14
+2.577192420799 15.05233460605 -2.57385346191e-15
+7.78e-18 14.5957095935 -2.293974242604
+7.78e-18 14.53543617329 -2.364592047098
+4.649579515065 15.18555072973 -0.9799143576845
+4.717298070885 15.17985530633 -1.012107036237
+4.670009856378 15.11276739931 -1.005775693372
+4.59883820482 15.16679151089 -1.023889051309
+2.642974876553 13.39136429143 -1.084794293643
+2.644510220958 13.38663934532 -1.146458016277
+2.70559784371 13.39625253763 -1.14818601141
+3.396146877376 14.23698924697 -3.36738e-14
+4.072281747922 17.72829080067 -0.4995588966441
+4.093149743472 17.64717868569 -0.513862037808
+4.124931688652 17.70201659189 -0.5041942039685
+1.318271571289 15.24033412484 -2.443048585985
+1.335541018801 15.2291281688 -2.51192079607
+1.3285 13.10645611372 -0.08384035241822
+1.3285 13.15770237208 -0.1016458276565
+1.3285 13.12492665958 -0.1535372949969
+3.358360594375 15.78288050696 0
+1.927555934848 14.08756911474 -2.48402255806
+3.901761957137 17.72486528924 -0.03800772757235
+3.926024121824 17.73100948183 -0.1638805355531
+3.751817896668 17.53216714117 -0.534140700689
+3.8085058674 17.5435315526 -0.5321366620119
+3.262490512215 14.90608417563 -2.128109948701
+4.108015166871 15.62602768783 -0.2671418916524
+4.122500871435 15.7042591195 -0.2743619109601
+4.095980358344 15.61482947832 -0.3305085934121
+0.5656618230227 15.48495704087 -0.6812313942992
+0.6023757511114 15.4953402336 -0.6457452967747
+0.6330660156377 15.50149440458 -0.6940261837374
+0.6524213390531 15.50893675184 -0.6406895926804
+4.103169200739 16.84316164744 -3.3934e-14
+4.062321766917 16.80664473828 -3.3934e-14
+4.143390189732 16.80616823136 -3.3934e-14
+1.816046403725 12.64130310126 -2.00887790746
+1.892747825709 12.63552462785 -2.044942004234
+2.548593040575 16.2201135556 -2.574378695787e-14
+2.531848613708 16.16955028809 -2.539685696268e-14
+0.9560643426044 14.45747678937 -0.4004478900312
+0.9719779036312 14.44577975061 -0.3397589656945
+0.9278074815923 14.47978614379 -0.348958192782
+0.9943071111772 14.42437573774 -0.3832974637428
+0.04695925313149 15.42884479189 -0.465436202507
+0.1109635452919 15.43150542481 -0.4336510936178
+0.1535920423246 15.43287127584 -0.4732110133978
+3.275093305751 17.48612761039 -0.0932359395542
+3.317054200159 17.5068225373 -0.04786251109337
+3.346712838069 17.52047313403 -0.09906879048152
+3.32553472378 17.51017927238 -0.1550471839013
+3.297285834184 15.39587791857 -1.212501401419
+3.320948499528 15.34524045169 -1.179626879768
+3.271441337339 15.33490316886 -1.22969545546
+4.558712156911 13.60919813721 -0.001959790377247
+4.526378693098 13.60833999535 -0.04110618250266
+3.199021443523 13.6159077499 -1.015409151103
+3.215296259221 13.6702424422 -1.006003103243
+3.237306076862 13.62812794817 -0.9728983058792
+2.782194894761 14.90568741879 -2.567057476148
+2.837345334203 14.90372215361 -2.57825320633
+2.747267348926 14.89800456159 -2.610552508732
+1.04605317015 14.18652191873 -2.354003044249
+1.000134877496 14.21882848416 -2.425342165793
+1.051275895658 14.16900784514 -2.423399023197
+1.0826612853 14.14177489976 -2.377059337554
+4.195131572341 15.16585839406 -1.091499747503
+4.111671329358 15.16300371212 -1.107879095455
+4.133464723665 15.17601427385 -1.03399712266
+-4.67051e-15 14.88179582144 -0.07902302729231
+1.633955216703 12.78789224903 -0.5543664655134
+1.691223243387 12.78851600875 -0.5396020728167
+0.005963730861363 15.21486292517 -2.597237565096
+1.278892465095 15.2343780293 -2.480158568685
+7.78e-18 14.88976331989 -0.8252248904394
+3.228854477046 15.35862095734 -1.281546266799
+3.228911709133 15.29465238219 -1.27018686449
+4.812828820298 15.74144188423 -0.1800001359131
+4.8279 15.67691481813 -0.1540896840881
+4.784920779676 15.69541095138 -0.1723977367439
+0.6283532523056 14.73632026277 -2.598406612107
+0.5626509363619 14.71953907144 -2.595446256219
+2.889294521149 14.91270957587 -3.3934e-14
+2.863377851427 14.97053341287 -3.3934e-14
+4.371158399673 14.25091414882 -0.4059680098155
+4.359110230167 14.17223908406 -0.3946835385691
+4.311648395597 14.24626468359 -0.4193682009273
+3.257397753406 14.23166172687 -1.638755649579
+3.189312577155 14.23668938359 -1.610339588904
+3.206017130274 14.22571716898 -1.672609025135
+2.981534029415 13.4763336488 -0.511805856466
+3.052469371901 13.48555727492 -0.5200901193421
+1.723682344777 13.16796319597 -3.3934e-14
+0.8417385312692 14.51748722746 -0.8394988128044
+0.8109033478528 14.53360298392 -0.8817397574458
+0.8830798533978 14.49015662105 -0.8828574582485
+2.735697716947 16.81422159116 0
+7.78e-18 15.14358337825 -2.149657963915
+7.78e-18 15.08277747321 -2.128056587888
+2.820394917492 14.95750270912 -2.272961367548
+2.855114980496 14.96390540471 -2.236763819223
+2.427900215801 13.19555636499 -1.538438267725
+2.42878226105 16.13719181921 -0.7801127875757
+2.576936455459 14.62245541192 -2.578330598668
+2.588694791638 14.53404228985 -2.562736014423
+2.628186505025 14.58281988845 -2.571340823326
+2.646111356629 15.69795998019 -0.9206417873428
+4.610972716082 15.60441626918 -0.389758080574
+2.544801432367 16.75511262525 0
+2.997228626042 13.44914443774 -1.024061608654
+1.584483996875 12.783314633 -0.6510087935065
+1.613575006082 12.7797316146 -0.717832182843
+2.166756923641 15.94288430988 -3.085166752104e-14
+3.987842554429 14.97150393186 -3.3934e-14
+4.8279 17.80750473698 -0.03740412791178
+4.827900000024 17.77615928799 -0.0768331809919
+4.8279 17.81101455447 -0.1131965938921
+4.423285788095 15.22637714374 -0.7482677184419
+4.369942015546 15.23242824023 -0.7140848308878
+1.693337556035 16.0958889629 -0.08058918321424
+1.724910244937 16.12579558791 -0.04719714879574
+2.011412894797 13.58374893511 -2.395181742128
+2.085083678194 13.56164558469 -2.391279555911
+0.5742455652354 15.49568148514 -0.4414793965715
+3.69601351759 15.85560880221 -0.4686216382924
+3.712409550055 15.80672710685 -0.4517366083069
+3.664720052268 15.81025937872 -0.4764051152289
+4.671261251204 13.9445369856 -0.307442351935
+4.665062326744 13.88679005128 -0.2976924699764
+4.612877795646 13.94952315224 -0.3133334931525
+-4.592749564119e-15 15.15542909736 -0.02688938855112
+0.03592942641084 15.12620881765 -2.702356356456e-14
+3.73619109384 13.88659458826 -0.5979133702213
+3.693720496747 13.83832691615 -0.6157481800847
+2.364692184835 12.81511963364 -1.372576572899
+2.804342955434 16.01441328056 -0.8017607920504
+2.743065774388 16.03966893834 -0.7973149414946
+2.790373065295 16.06626601031 -0.7926189885598
+3.9372950321 14.89203343915 -3.3934e-14
+0.7447162197649 14.50063463802 -1.638879046627
+0.7252585942692 14.50307464343 -1.697641356883
+0.7862179736949 14.4786669359 -1.659024199368
+2.167384635415 15.86957939884 -0.8370706649293
+2.179120404266 15.78410004102 -0.8720769572795
+3.546077849187 14.47930897237 -3.3934e-14
+3.573758286943 14.52619856668 -3.3934e-14
+0.7388071169877 14.40859520886 -2.33000637137
+0.6920075194322 14.43258741533 -2.306355589486
+0.688110577014 14.42317071691 -2.372776557962
+0.6413662275622 14.44717856612 -2.329759556304
+2.4279 13.07541702731 -1.640485197763
+2.4279 13.0406143151 -1.578764347942
+2.4279 13.01046478907 -1.622724841073
+1.15353994659 14.07834586907 -2.199542261126
+1.126490933091 14.10954032204 -2.236042061166
+2.514096112105 16.96575211258 -0.5795183864397
+2.563948670838 16.9953546642 -0.6287978872889
+2.482427456437 16.92068258849 -0.6419623393672
+1.696735477169 15.23597988176 -2.470454187443
+1.72420671868 15.24368403887 -2.422388804922
+2.142366007998 13.24564627729 -3.3934e-14
+4.571937853216 14.01974536149 -0.3305402153745
+4.530792720176 13.93951364145 -0.3214056010882
+4.496204373043 14.00644207446 -0.3389328731989
+2.047694732532 12.96793317611 -2.28660322378
+2.078834636678 12.90333521162 -2.275211821236
+2.004581974096 12.92999663736 -2.279910491376
+4.072039878346 17.2980514702 -0.5706876394361
+4.01871606634 17.3152553977 -0.5723991761069
+4.058997799929 17.34938190219 -0.5663805945154
+4.629032253664 15.21319061535 -3.3934e-14
+4.568912650387 15.26771851707 -3.3934e-14
+4.540747020607 15.22272131413 -3.3934e-14
+4.533673204973 16.22009381053 -3.3934e-14
+1.362508459494 14.60327160988 -2.574953068193
+1.293883148789 14.59339313793 -2.573210988446
+1.257694700589 14.53257643826 -2.562483051444
+1.213586058468 14.50459249373 -2.557546401903
+1.188051282013 14.54885273223 -2.565353570228
+3.27197510515 15.05569907729 -3.3934e-14
+3.221374922626 15.08095891362 -1.730112802728e-14
+3.227736008218 15.03039062044 -3.3934e-14
+3.292254720517 15.00290537497 -3.3934e-14
+3.418848984228 14.11441392047 -0.8742022469961
+-4.428253109273e-15 15.25106354244 -0.2576509050075
+0.6037567168815 15.50880535368 -0.1361169229712
+0.6642984198746 15.52484151053 -0.09713955693544
+3.606914148532 14.27544925103 -1.390323510705
+3.659774144393 14.29461402919 -1.349779078731
+3.619103535397 14.29551284303 -1.276658192503
+4.728567474144 14.03438157774 -3.3934e-14
+4.733016310322 14.08650522614 -3.261639873851e-14
+1.476751351231 14.62980599281 -2.579632917138
+3.343221225785 15.09144585499 -1.513519519609
+3.994917312507 17.41974895164 -0.5539743160302
+4.8279 17.51028805055 -0.4303506661153
+4.8279 17.5430566758 -0.3591735226687
+4.050516343953 14.37140251308 -3.3934e-14
+3.294136512552 14.251855377 -1.524170354718
+3.291719974208 14.24058506207 -1.588122493579
+1.3285 13.31380262135 -1.747344935093
+4.257099508873 14.3984601182 -3.3934e-14
+4.193943904368 14.3559782544 -3.3934e-14
+2.363927651709 13.07022509678 -3.36738e-14
+2.417738832138 13.11810869936 -3.36738e-14
+3.584425880939 15.33994327365 -1.620832606962e-14
+1.381857732988 15.29435863631 -2.078344207233
+3.101258128567 14.9525599936 -2.3014269799
+3.072675497228 14.94205783037 -2.360775875632
+7.78e-18 15.15660244447 -1.885284717727
+7.78e-18 15.21263042594 -1.886567916246
+1.84645197467 15.33751471076 -3.3934e-14
+3.885789421542 15.18902228758 -0.9602000463844
+3.906649189613 15.18066120007 -1.00750711048
+2.848821449212 14.97695546059 -2.162691712757
+2.917496260046 14.9829332942 -2.128852357829
+5.901001067068e-18 15.13662916648 -0.767371269087
+4.815520812411 15.3322848702 -0.5419493640167
+4.757983021201 15.34588166803 -0.5457340134075
+2.008949411669 15.67103768868 -3.3934e-14
+2.013639971501 15.72141859346 -3.3934e-14
+1.022711956939 15.02913588464 -3.3934e-14
+4.180597845396 14.42302355053 -0.5533211720122
+3.874994756971 14.3740522736 -3.3934e-14
+3.913602908074 14.32725084455 -3.3934e-14
+0.1922874627719 14.52394507662 -2.168621675427
+2.957405574602 13.92382707973 -1.432216455393
+3.893853296135 16.16331302626 -3.3934e-14
+3.887743669894 16.23508800716 -3.3934e-14
+3.846282331845 16.18114468141 -3.3934e-14
+3.231907834678 14.00917890198 -1.046377821004
+4.647150492932 16.26320048185 -3.3934e-14
+4.582156870383 16.23630903675 -3.3934e-14
+4.624051076337 16.20852869487 -3.3934e-14
+0.1311238534735 14.63018749351 -1.266577729054
+0.06630443185527 14.63579701389 -1.200734172612
+0.05003147429237 14.6314866813 -1.252238582914
+1.347451293577 13.41730945327 -3.3934e-14
+1.3285 13.39541566458 -0.04917144656903
+1.3285 13.49200038189 -0.0151479237349
+0.8587385069728 15.18775440999 -2.678012751236
+0.9303659150353 15.17943633494 -2.676548360493
+3.196618665524 14.42830186349 -2.362184991102
+3.191429893844 14.38815516393 -2.411398932006
+3.191271140644 14.45045686952 -2.424784188599
+3.187769743629 14.42816009351 -2.482132459878
+1.987128895752 12.79679453293 -0.2862687381998
+2.001536542606 12.79467461399 -0.3670070405293
+2.036779304956 12.79595826152 -0.3190692236895
+1.949435043663 15.83823116321 -2.760185253891e-14
+2.015168089741 15.89315188173 -4.649041241263e-15
+2.020561137324 15.77154178552 -3.3934e-14
+4.011255603187 16.81157600039 -3.3934e-14
+4.506006629667 15.77281336685 -0.2062945252442
+0.6646385772261 15.28180455267 -2.168623900379
+0.589383386235 15.48049053289 -0.8813668794624
+2.953290257607 16.20064912411 0
+2.900971729893 16.22466884091 0
+3.795735746463 13.61054252279 -0.5138226459521
+7.78e-18 14.60471170463 -2.237499761683
+7.78e-18 14.64796064002 -2.270403824507
+0.7560797157592 15.30818516055 -1.973879052669
+0.8352299499804 15.31274640051 -1.938568447466
+1.414094356837 14.13205478338 -2.491859623512
+1.363843580981 14.12289944809 -2.490247456952
+1.052000197553 15.32739126871 -1.818829417981
+1.087594735969 15.33363519931 -1.765287098711
+1.110047164891 15.32432128722 -1.844510066414
+2.74549714054 15.4155677039 0
+2.826650555062 14.06656137345 -3.367679717513e-14
+2.902295349351 14.04234375639 -3.36738e-14
+2.802721297499 15.1539271039 -2.006893130695
+3.909716430212 17.41801395317 -0.5542734161915
+3.869233278893 17.4480792069 -0.5489729645391
+3.951022802456 17.44783874495 -0.5490180468189
+0.7388389579722 14.59568527317 -0.02889295140922
+0.7402477216948 14.66213232732 -3.3934e-14
+0.687406188431 14.64882275713 -3.3934e-14
+3.459418854337 15.55936648699 -0.645065679645
+3.407685126871 15.56333644701 -0.6226546853024
+3.056060464069 15.94754365049 -0.8150987740141
+3.058693025021 15.86413444656 -0.8387722855713
+2.993328430814 15.92165653762 -0.8222745691538
+4.8279 17.47863995874 -0.0718520233289
+4.813188435036 17.45015693728 -5.065160770086e-15
+4.8279 17.41040298142 -0.05059626792377
+4.8279 17.49389987884 -0.02272520094859
+0.3294294584787 14.676534856 -0.4931395601364
+0.4141885095793 14.67266944879 -0.4846379806539
+0.3670916341908 14.67643375448 -0.4410249605302
+2.4279 13.29916577198 -1.084171305661
+2.4279 12.99355746488 -1.673278389561
+4.536357386088 15.60866580128 -0.3657110402984
+4.465425091169 15.60281396466 -0.3988491103216
+4.610879797254 13.98576059677 -3.3934e-14
+4.660032036944 13.99964009805 -3.3934e-14
+1.3285 13.58307586266 -0.04920568904229
+1.3285 13.62920003504 -0.1022601350546
+1.413245802774 12.85900555422 -0.4098503977929
+4.641529745589 17.84429194762 -0.148573021388
+3.395866530788 16.72440489733 -2.196606104802e-14
+3.363132868188 16.67643842079 -1.180836379133e-14
+3.428769760386 16.66690069409 -2.754813655456e-14
+3.680119233633 17.01595853617 -3.3934e-14
+3.656206034047 16.96767263408 -3.3934e-14
+2.441134870182 16.89800855403 -0.6224414736724
+2.41452872766 16.8744792715 -0.5858526808534
+1.650155093263 12.72014006704 -1.427050427098
+1.733138880341 12.71839540619 -1.442941654023
+1.701863059099 12.72532054228 -1.379864117217
+2.353795365719 14.63171885631 -3.3934e-14
+4.538928993663 13.60743893496 -0.1799023461352
+3.44927414715 13.68250530865 -3.36738e-14
+3.475125926538 13.75751839169 -3.36738e-14
+3.430437721055 13.73095810577 -3.36738e-14
+-3.353077122358e-15 15.35096336443 -0.5014823364396
+8.257377521727e-08 15.40000678348 -0.4831794017279
+6.17989511614e-08 15.37343781774 -0.5479554965265
+2.527694838591 15.17801404855 -2.676293563464
+3.922889807684 14.39989900033 -0.6847114411501
+3.994597643898 14.40588295671 -0.6504579067728
+4.447979081442 14.03401810796 -3.3934e-14
+3.65389736684 14.30446862535 -1.225729094065
+3.592489834201 14.30424483131 -1.227209367897
+4.691406518858 17.39759061152 -0.4757259331893
+4.740638446981 17.43045610504 -0.479084705175
+4.776996701755 17.37979410954 -0.469514908435
+4.751282065284 15.73204142975 -0.1795496641461
+4.740819881796 15.6715708876 -0.1690410595414
+2.739487212875 14.03519036299 -2.076331163528
+2.740890089894 14.0851941054 -2.078398317644
+1.327292242823 13.70289658606 -0.428180596707
+1.32720473901 13.70621805891 -0.3740426577926
+3.828784983689 16.91769083372 -0.5938140222094
+3.842768159233 16.9918347596 -0.6014538737502
+3.881454071696 16.92549108164 -0.5731844225446
+0.694190274232 15.50280551531 -0.9837310093433
+3.792162400134 14.99682633965 -3.3934e-14
+3.830762187313 15.03266503264 -3.3934e-14
+3.780031762419 15.08763055947 -3.3934e-14
+2.695766328952 15.23150372752 -2.461619488823e-14
+2.737565273501 15.1807291464 -2.020841172847e-15
+3.984538582898 14.91779471361 -3.3934e-14
+4.527316895254 16.73012770075 -0.3721339378105
+3.036392843479 13.54624838878 -1.748112268937e-14
+1.3285 13.3381902483 -1.525314076628
+1.3285 13.26986862479 -1.552043780681
+1.3285 13.25755534214 -1.493056895233
+1.414517900892 15.20057673915 -2.679815652612
+1.342424691564 15.20329479346 -2.664081325916
+1.406702775476 15.21216350174 -2.612722976374
+0.2735202435848 15.09192176211 -7.682762871273e-14
+0.2973117890472 15.14777959264 -4.594682728838e-14
+2.864434484721 16.48109644186 -0.7194733260089
+2.890915740657 16.42581521075 -0.7292231245802
+1.092752408631 14.30317627184 -0.8600503414471
+1.127470299557 14.25974292563 -0.8370397145445
+4.263493993665 13.59994925167 -0.06587403825299
+4.302504360864 13.60172591216 -0.008887829558868
+3.69261568374 16.57893396434 -0.597506439597
+0.773667581847 14.44351032694 -2.546776141933
+0.8251840895644 14.46770402316 -2.551039559296
+0.7691261907257 14.37461396844 -2.534634209203
+4.717158238755 14.31996209364 -0.3704033804558
+2.853990670517 15.68856632908 0
+2.871975637104 15.60853025083 0
+2.905546241746 15.65377001137 0
+1.583461944184 15.85944429976 -3.3934e-14
+1.63707551781 15.85175499928 -3.3934e-14
+4.5378549458 16.65079872254 -3.3934e-14
+4.570194286635 16.59342409982 -3.3934e-14
+3.346051731796 15.8298418506 -0.6759928090232
+2.999402715295 13.48782920681 -0.1320298141444
+2.944736672135 13.48036521789 -0.1269786385188
+3.044268663903 13.47258899289 -0.7666676321119
+1.607492978287 12.79742006801 -0.2525197307058
+1.618016028023 12.79880610181 -0.1672277132172
+1.565868905897 12.80123891628 -0.1773587092149
+1.868115434963 16.26314362135 -0.601392656975
+1.905797016319 16.30756134272 -0.5545508862365
+4.092431469604 16.13922821142 -0.3598532312759
+4.067668332929 16.18216858669 -0.3750189733324
+3.003377752705 15.16411578905 0
+2.712318358333 14.86721450588 -3.3934e-14
+3.205183769554 15.82695179054 -0.784896587671
+4.36646369086 16.21982384735 -3.3934e-14
+4.321245571421 16.1823018379 -3.3934e-14
+4.384517711107 16.16173396097 -3.3934e-14
+2.85837845092 13.71377527908 -1.609263344047
+0.8822858863397 15.29547162708 -2.070235866992
+0.8163167850136 15.29429367811 -2.079056379436
+0.8546043694856 15.28815137887 -2.123897138894
+1.009378333644 15.16431224757 -2.673883337099
+0.9411022058516 15.10020148219 -2.662582438638
+4.540187489896 14.24938192191 -3.3934e-14
+4.499796877258 14.28024496113 -3.3934e-14
+4.462231092529 14.24599966076 -3.3934e-14
+3.249166499741 14.28972000267 -2.063539416357
+3.258283796677 14.2380664734 -2.024225137977
+1.556165100756 13.18284673838 -3.3934e-14
+1.484612500702 13.14719686506 -3.3934e-14
+3.769769226548 16.34224971159 -0.518678255443
+3.834571487794 16.31256537301 -0.4845415969539
+2.181338031052 12.77940767615 -0.7355569387704
+2.203880978753 12.78752231401 -0.6699847850015
+2.147312047639 12.78241203004 -0.6692513395608
+2.171937229569 12.78494165215 -0.6181250416441
+0.4344947363654 14.62369600426 -1.27214644698
+3.763647892244 14.60799909014 -1.307176527758
+0.002049129529466 15.42900607851 -0.4289030623217
+2.122808762786e-07 15.35048999303 -0.4498622668998
+0.7501258022414 15.12468296251 -3.3934e-14
+3.098177293225 16.44623831936 0
+3.158124661773 16.46011010403 0
+0.8634796651943 15.40856600176 -1.285689668664
+0.9393235992875 15.40381093871 -1.297845118372
+0.9978381862882 15.28527190402 -2.144204837683
+0.9282469661085 15.28868263416 -2.120042919988
+0.9771780368279 15.29249437821 -2.092189690051
+1.3285 13.28920095901 -0.2258800191142
+3.05674357861 17.14485598098 0
+0.1491605867794 15.29628769436 -2.064386669922
+0.1525589911185 15.30379634067 -2.007626683951
+4.638158526201 15.59116832892 -0.4649797088353
+2.489372201976 16.20168709408 -3.3934e-14
+2.511520273539 16.26381361693 -6.402137245417e-15
+2.455678348027 16.27668858376 -8.842295649123e-16
+4.466446993426 15.91922293628 -3.3934e-14
+4.126297193896 13.64911730844 -0.3704314917364
+4.061108759752 13.65641445622 -0.3956177337727
+3.259408319738 13.51479671148 -0.4118678734275
+4.649450188775 15.19724783722 -0.9134077612102
+4.705019118391 15.19075697313 -0.9501469219551
+2.699194009236 16.57259799952 0
+3.12426403253 15.47598328021 -1.117957820192
+3.062411535116 15.46789013371 -1.160551167068
+2.97574064078 17.03971490382 -0.6209844808404
+2.919400962503 17.0397453838 -0.6209786614244
+3.124916055997 14.4873293895 -2.55450550557
+3.119002635614 14.41012896447 -2.54089665112
+7.460933065654e-18 15.16708044433 -2.575909488985
+7.78e-18 15.12601408128 -2.542937194282
+0.08576867751413 14.95965786972 -2.637785904791
+2.988110877562 14.1896235851 -1.877044160067
+3.358618115664 14.25323087506 -1.516235205933
+7.78e-18 15.0133998562 -1.221750576894
+7.78e-18 14.97134972914 -1.17710535887
+7.78e-18 15.02363054639 -1.145040973246
+3.067497429172 14.99363876244 -3.3934e-14
+2.312352662033 12.77116560996 -1.373784365148
+2.340530084334 12.78480739985 -1.42054957681
+3.938041400414 17.73219228164 -0.2986246781656
+1.994221650878 12.69496529092 -1.635875320851
+1.94467838317 12.69666917851 -1.622416005509
+1.946029045496 12.68741074304 -1.693209981809
+2.006400705117 12.68845560979 -1.685351441022
+3.813092012215 14.03269819242 -0.5789664344029
+3.019190429151 14.11259085295 -2.313800770996
+3.734797757624 17.05871189433 -3.3934e-14
+2.747192068879 13.45073915326 -0.1730882730446
+1.941068119995 15.20158282791 -2.674011369731
+1.971454872164 15.16065816448 -2.673232051353
+1.934145428289 15.1264473699 -2.667197396967
+2.164414830981 16.61784091765 -0.2810451027502
+2.124548935895 16.57112856995 -0.2904240708283
+2.622374547609 13.43186097886 -0.0606856066005
+2.580414814048 13.42448914813 -0.1164754953238
+2.646149932534 13.43510769865 -0.138692952312
+4.191459907393 13.66769685905 -0.3518371870023
+4.008295619549 14.33744426958 -1.038607807126
+3.963744066001 14.32517611272 -1.10848628295
+4.000203668501 14.36641023923 -1.094256886933
+3.528394556592 14.70996046685 -1.575959501243
+3.55345623915 14.76363176122 -1.553180457952
+7.78e-18 14.62300159648 -1.989249828121
+1.070228933807 14.34832803824 -0.3972568542034
+1.360384841832 12.9653092931 -2.286132508312
+3.254928382551 13.52352940816 -0.9339204755786
+4.321288586882 15.00811418677 -3.3934e-14
+4.216700971749 15.233649771 -0.7069904871558
+4.196278977057 15.24359108953 -0.6505570051902
+4.262963608064 15.2402021866 -0.6698817649258
+3.194416673939 14.60736741377 -3.3934e-14
+1.450310357392 14.66607786352 -3.3934e-14
+2.17705869942 13.27251251536 -2.340297633595
+4.483260979285 13.86328294929 -0.31583546738
+3.680562305532 16.44076575625 -0.5793768718673
+3.727686549575 16.4875344247 -0.5641069986482
+3.885138523427 15.2264720847 -0.7479783418109
+3.947638036005 15.2607713918 -0.7226054598187
+1.665145057446 13.85990499193 -3.36738e-14
+4.805361979148 15.59353213002 -0.4514404760056
+4.790535953488 15.58377370254 -0.5068155951602
+4.789968969174 17.84814870414 -0.2166067190978
+4.532144266784 17.09119138078 -0.4352788971936
+4.500314549796 17.15824283253 -0.4515233507551
+4.564196972701 17.15096073697 -0.4422737830464
+4.591200274612 17.09894369033 -0.4307162437073
+3.827682261245 17.70214184274 -0.25157537435
+3.880867231439 17.71677637131 -0.2931024443173
+3.87058497601 15.58194346988 -0.5168098802625
+3.908431519806 15.59032757339 -0.4693775206121
+3.93120842969 15.57691784377 -0.5455760332578
+2.314471451576 13.43411550033 -3.36738e-14
+2.279940858442 13.34314072988 -3.378383792485e-14
+2.347123977865 13.37861295879 -2.626687715708e-14
+3.128391394181 13.50202929671 -0.3005711563251
+3.14489093307 13.50220707645 -0.3744868535951
+3.186065500105 13.50818526391 -0.3381114714098
+1.616552144736 15.2701674632 -2.249052124312
+1.548570713465 15.27048829557 -2.246989621144
+1.623438944791 15.2776825446 -2.197920470208
+2.086231609917 15.22019848998 -2.565736448561
+2.059647957635 15.23116900358 -2.499662728865
+4.152727458963 14.7679895075 -3.3934e-14
+3.579135165499 15.39351855161 -7.702107505353e-17
+3.535386137411 15.35210635712 -1.2669039651e-14
+1.03100198536 15.33997994001 -1.70907481867
+4.513524990351 16.87575893398 -3.3934e-14
+4.573714599409 16.87815317794 -3.3934e-14
+1.401227268057 14.56266891445 -2.567791546111
+1.33993214619 14.55220119338 -2.565945568712
+0.3697230195709 14.51567112988 -2.209840900191
+0.2868078342392 14.52143238986 -2.185597171832
+0.3102492084249 14.51039256705 -2.257396773762
+1.242442808145 15.28592967236 -2.139529792114
+1.248253805311 15.35067297238 -1.610811948957
+1.437085923583 14.46439350905 -3.390662861933e-14
+2.204103892498 14.963454009 -2.638459732321
+2.244904151824 14.92374054963 -2.631465983109
+1.23185310539 15.21443570176 -2.599615041726
+4.609796862732 15.95459602983 -0.2270285600238
+0.6521130954595 15.29007113043 -3.3934e-14
+3.158927191545 14.16749774443 -2.002733111334
+2.089542437715 15.58896868941 -1.012272491797
+2.076596415288 15.63600627136 -0.967023021822
+2.168196103011 15.62275480454 -0.9781297852516
+2.128489408585 15.66966472098 -0.9424898980461
+1.045396911482 14.35630545464 -0.8463537923999
+1.779111544059 12.74638067305 -1.170478991626
+1.817175850929 12.75049748602 -1.123678128351
+3.003467139731 15.98261183007 -0.8073690745846
+4.508023014208 17.359976175 -3.3934e-14
+3.623066677551 16.40121301285 -0.6026958715699
+3.563795894328 16.35958398338 -0.6286033953381
+3.548406555435 16.40576229281 -0.6462091923629
+2.297126920997 13.7647469283 -2.427098458036
+2.331233314238 13.72235098558 -2.419610613029
+2.526991888436 16.64569703825 -0.6904518186367
+2.560605445209 16.69594931185 -0.6815944987118
+0.08759696446156 14.58524776038 -1.708284757634
+0.08435649401682 14.57743525331 -1.773503299224
+3.617875543357 13.85947217993 -0.6702912439631
+3.640742791218 13.90585303893 -0.6627159507385
+3.651337662359 13.83322766153 -0.6428930332753
+2.88661046569 13.73847017794 -1.545164787448
+3.235261153028 14.27615765401 -1.089539572835
+3.20321594628 14.24768589029 -1.121913972741
+3.205122632156 14.30827794908 -1.130364521137
+1.482608468378 15.92215150312 -0.01668433842417
+1.456753214096 15.90360576013 -0.07394115984721
+0.9932133792508 14.36410784702 -1.381764973406
+1.336615477656 15.26202795332 -2.30433356379
+1.267408652988 15.26538953519 -2.281697531516
+1.343811436848 15.26966980622 -2.252547092993
+4.116668983028 14.03574425429 -3.3934e-14
+4.098913426139 14.1067277368 -3.3934e-14
+2.433132961496 15.06627358777 -3.3934e-14
+2.352474363979 15.11663106238 -3.3934e-14
+1.311398705109 15.27572590252 -2.211258392107
+0.08147378715222 14.52784561245 -2.141996679283
+2.135682649878 12.6424512879 -2.001581219417
+1.762315290737 13.52316917214 -3.383964623291e-14
+2.414120255915 12.91321143858 -1.335404064374
+0.6792440591651 14.47572456847 -2.552459563689
+0.6188743400759 14.47337862709 -2.552042871361
+1.561339075913 14.54404303161 -3.3934e-14
+3.79112642831 15.17026354103 -1.066520836327
+3.845301175022 15.17233721626 -1.054860256613
+3.826282904629 15.15921828898 -1.129300750886
+2.726251541785 17.14517259601 -0.3361960232903
+2.770017836249 17.17807422806 -0.3006972212174
+4.382289519529 16.33480446371 -3.3934e-14
+4.366477674352 16.39619650865 -3.3934e-14
+0.1967104087299 15.25214140781 -8.17662e-14
+0.2316460729183 15.29168623506 -7.02979320877e-14
+0.1822327825379 15.33026577987 -8.17662e-14
+4.736943704618 13.93298331579 -0.3011102645406
+4.727243182591 14.38016658086 -0.3803091295067
+4.661905402383 14.35066289376 -0.3797157747024
+2.824592127668 14.63317851 -3.3934e-14
+2.882679744992 14.68248636306 -3.3934e-14
+4.542103978953 16.4312620333 -3.3934e-14
+4.569397341068 16.35632568924 -3.3934e-14
+1.571527546423 12.65223745335 -1.948418736751
+1.626537224849 12.64939632165 -1.957445759924
+1.614203660523 12.6380763239 -2.029383970786
+1.400629069123 12.96802883047 -3.3934e-14
+4.327048522356 14.31462255706 -0.4273647604723
+0.9502562338805 15.61940166159 -0.3321952954032
+1.332834595391 13.19990075113 -3.3934e-14
+1.382796834289 13.20988211049 -3.3934e-14
+1.303925350652 13.91323389311 -2.453278329016
+1.239703805755 13.95315499981 -2.460325962967
+1.715510682709 12.79280297873 -0.4266196492957
+4.446961899673 15.31526514366 -0.5739689746964
+4.498416424443 15.36733278018 -0.5743571626977
+3.379458728173 13.7207783817 -3.36738e-14
+2.380974281238 13.44266476126 -2.370312080523
+2.347857830602 13.48398016197 -2.377594393106
+2.376826671071 16.11081241384 -0.7847641740545
+2.315134517985 16.10351966853 -0.7860492356249
+2.358203993957 16.16538056629 -0.7751514538948
+1.634880135543 13.33428468695 -2.351196876065
+2.4279 13.20772308363 -0.2568100186835
+4.139988908368 15.0252266527 -1.13625357317
+4.198218937264 14.98358002318 -1.103147765772
+4.087098541043 14.96889191432 -1.152070614454
+1.293541536156 13.89576531866 -1.145487529558
+1.293499641347 13.89113784087 -1.20161070603
+2.876587591308 16.60011688885 0
+2.940179301616 16.63967639052 0
+3.000757656254 14.68362646466 -2.589122435338
+3.025000137133 14.75713348968 -2.602075770575
+1.881654782007 13.54176529882 -2.387784046457
+1.827001178187 13.50624996764 -2.381519489234
+1.830691554194 13.58225463173 -2.39492289565
+4.731719854651 14.38251205881 -0.7833171378188
+4.733530158639 14.39327686286 -0.7220422963118
+4.680421014346 14.38814339681 -0.7511811354916
+2.584847480879 13.88701900672 -2.448664968216
+0.3490838795546 15.30813929403 -1.974188037334
+4.092284461234 14.75484225988 -3.3934e-14
+4.376505182564 15.07566846607 -3.3934e-14
+0.401034523547 15.4650802197 -0.2766097316354
+0.3455258899175 15.45690520013 -0.2767079269798
+0.362346047376 15.45990020817 -0.2246676924388
+0.4164232134233 15.46860242423 -0.2245946908151
+2.412129553115 13.03233522009 -3.36738e-14
+2.37334760502 12.99926817725 -3.36738e-14
+2.356355735582 12.9410952288 -3.36738e-14
+2.054370847551 16.17845632328 -0.7728387660398
+2.276495204419 14.65344843925 -3.3934e-14
+2.305670649813 14.60887886681 -3.3934e-14
+2.323285360047 14.67154090437 -3.3934e-14
+1.510019199047 13.60071758665 -2.39817486453
+4.618819168116 14.42357384842 -0.5501835403884
+1.609046756211 14.41464031096 -2.541689151157
+1.542042788921 14.40084876689 -2.539254602041
+1.564716535892 14.44880285519 -2.54771350875
+4.8016721087 15.21135072694 -9.030207623488e-15
+4.778648748384 15.27104024979 -1.695710199208e-14
+4.744193848932 15.22346532276 -2.881985116013e-14
+2.698408974861 13.42484415014 -0.7205637256497
+2.726079299589 13.43363609452 -0.6309931542496
+3.529814131079 14.67827110825 -3.3934e-14
+0.7013969367815 15.53047942823 -0.4093505252422
+0.7030118966446 15.53274056948 -0.3339435933906
+4.633414726206 14.03261133029 -0.3256399280678
+0.9716982742199 14.73233541313 -3.3934e-14
+2.446751101566 15.8822429506 -3.3934e-14
+2.426615607314 15.83584429864 -3.3934e-14
+2.482263821953 15.83033745166 -3.3934e-14
+1.3285 13.30858522004 -1.112059506281
+1.3285 13.2516103583 -1.136236517275
+0.253538886705 14.50246590891 -2.307871183616
+0.799590702265 14.56357962331 -0.3186275226265
+0.8212927739297 14.5520587829 -0.2381898413083
+0.7544122991775 14.58613877064 -0.2542828417353
+2.718027486332 16.92507972731 -0.6411968785004
+2.717931042613 16.99712274034 -0.6284890283866
+2.767878194846 16.96589871321 -0.6339915646624
+4.133337259216 16.51461143321 -0.4138957918486
+2.106450117128 14.62579581619 -3.3934e-14
+1.249590907414 15.76342088493 -0.4565217365526
+1.205227878941 15.73819140065 -0.4602765463788
+1.23365576059 15.75568043117 -0.4071545021056
+2.720678051312 14.10042144167 -2.210955833296
+2.772491839394 14.13347743976 -2.195330287945
+2.730123621287 14.13838184478 -2.167467150506
+2.729251579745 14.07194169313 -2.145970943548
+1.115984753864 14.2339699378 -1.370506172875
+1.095970484109 14.25568428636 -1.412793311479
+4.8279 17.81546805994 -0.1643356965826
+4.171824003787 16.43408570942 -3.3934e-14
+4.091932463607 16.43323125284 -3.3934e-14
+4.124571998137 16.37913815313 -3.3934e-14
+3.334685821518 15.02478703639 -1.891397546712
+3.359120933698 14.9787272288 -1.897541460704
+3.336568600146 15.00421445695 -1.949356629551
+3.384657421553 14.98446773936 -1.848839302775
+3.025379015742 13.62237165268 -1.259532915689
+1.624580718169 13.07631405725 -3.3934e-14
+2.742937908386 14.25296337923 -2.513181859167
+2.680666316585 14.28306727214 -2.518488632319
+1.980809834388 13.01587215143 -3.3934e-14
+4.408247840455 17.49913238684 -3.3934e-14
+2.872813299288 13.86796274215 -1.601055523208
+2.895875699844 13.87137463439 -1.548556931112
+4.241054922916 17.08946775432 -0.4868075333374
+4.313926015977 17.06877083717 -0.4670769150313
+3.974454643123 15.07809045065 -3.3934e-14
+2.968481074633 14.20649840513 -1.78144196044
+4.429460173931 13.71511819141 -0.2990078465549
+4.358576255929 13.75071411726 -0.3204697292381
+4.131462044788 16.47257207108 -3.3934e-14
+2.964024551342 14.54684406415 -2.564998833683
+2.956685862479 14.60124608313 -2.574591724807
+4.504228912485 17.73312363086 -3.3934e-14
+4.548756310505 17.68964447983 -3.3934e-14
+4.562402168213 17.75429037434 -3.3934e-14
+4.8279 13.65679120679 -0.01695879280536
+4.8279 13.70441654556 -0.03640297633156
+4.799710996333 13.72736109944 -9.607179556292e-15
+3.382909992884 14.39623047931 -1.748316208561
+3.399433277185 14.46501598457 -1.7299969893
+3.406515385476 14.41905796329 -1.709570529302
+3.359901726695 14.44298010536 -1.801227575882
+2.865127880999 13.56507969084 -3.161850657738e-14
+2.837997787984 13.47579424297 -3.355527514287e-15
+0.237770024288 15.40964782035 -1.072082495698
+0.1920171695675 15.40840332627 -1.026701067776
+2.791117343464 15.34582732439 -1.656443579664
+2.839672318295 15.34397355978 -1.673135239906
+4.759555367272 15.89809292483 -2.35309128143e-14
+2.497838970106 16.90358655057 0
+2.553686229537 16.88460153521 0
+2.442612190318 15.27797650607 -2.195872323222
+1.395316792989 13.97597171025 -3.383986326083e-14
+1.349669607756 13.92600046238 -3.379865249174e-14
+1.401664551205 13.89572134291 -3.368170346545e-14
+3.559237116237 16.07998257323 -3.3934e-14
+3.57673496168 16.02415571672 -1.646512334713e-14
+3.616526442932 16.06750295368 -3.3934e-14
+3.599884036837 16.12226227792 -3.3934e-14
+3.179975902129 14.1533721772 -3.36738e-14
+3.174501834825 14.20619931485 -3.36738e-14
+1.354863483732 15.71654078789 -0.9091797306898
+2.015847019567 15.31257202228 -1.939851203568
+2.040837857109 15.30608519651 -1.990465018752
+3.639673950817 16.16663107913 -3.3934e-14
+3.39050873884 13.95792648225 -0.8721598554163
+3.34092931064 13.97020160704 -0.9223869922371
+3.394150902143 14.02406900958 -0.8802905091255
+3.180921384051 15.50174887562 0
+3.179512536692 15.553525857 0
+3.047426381577 14.27448192979 -2.516971097024
+2.991265674301 14.291727699 -2.520014169218
+3.04276104858 14.32875182131 -2.526544705029
+3.940419851524 14.14508013303 -3.3934e-14
+3.971986180419 14.22038039974 -3.3934e-14
+2.725566443909 16.16822306173 -0.7746467997358
+2.688884007088 16.07917555804 -0.7903515804362
+2.656835618317 16.1534509213 -0.777246562296
+2.750630693348 16.1045548933 -0.7858767998707
+3.019701367202 15.07420700641 -1.611456941086
+2.706127246483 14.46431472816 -3.37000457953e-14
+2.687488588084 14.38716682412 -3.370207991066e-14
+2.748958508067 14.43503205358 -3.36738e-14
+1.325220074863 13.6964185554 -1.23252152533
+2.865723793422 15.3536023374 -1.582645297576
+0.7710545734258 15.52025658675 -1.067414474361
+0.7627078013007 15.49248872392 -1.126413133133
+0.6987498069562 15.49495767864 -1.111418341713
+4.353319668679 15.02425638851 -1.053890064517
+4.286870330266 15.02888256539 -1.076569163915
+4.325326761514 15.0720450657 -1.071282280004
+1.01251748839 15.64661374043 -0.2928065595488
+1.06430704808 15.67124899726 -0.2440387256678
+1.072956617953 15.67403125567 -0.3127351756752
+1.100983127563 15.68836788651 -0.273676613017
+1.104664280901 14.31505373607 -0.0349403417191
+1.138091980564 14.34567403383 -3.3934e-14
+1.067560022677 14.35684119495 -0.002879246912281
+1.134635078242 14.27469273765 -0.007580109022507
+1.3285 12.97319917924 -1.909603920539
+1.3285 12.91627860073 -1.902959199006
+0.9602525574914 14.78449792998 -3.3934e-14
+2.166548313922 13.91912228981 -2.454315525794
+2.195667484706 13.96500601919 -2.462407149067
+2.287368669005 14.78872613813 -2.60765567219
+2.359143887129 14.8047630627 -2.610481869781
+1.181581532021 15.3282574618 -1.811827323254
+1.141176128292 15.33249177988 -1.775431501737
+3.506644079212 15.52049011984 -0.8655279396157
+1.286779861792 13.83128718492 -1.9626535336
+1.275182469242 13.87068209692 -1.927012253018
+2.71503934615 15.23254471676 -2.424887681667
+2.684983043325 15.23273458963 -2.490547205588
+2.649096407744 15.24358267715 -2.422776740737
+2.708070624464 15.25257419273 -2.365799932559
+2.565799141359 13.37516385658 -1.126807247448
+2.606078100352 13.37607541681 -1.193770515762
+2.336679505813 14.9834423865 -3.3934e-14
+2.300259400722 15.02373353118 -3.3934e-14
+0.9858436855367 15.62771311667 -0.5558008137549
+1.084823858237 14.97291833293 -2.640130060231
+1.022904339884 14.93092954832 -2.63272001417
+3.611348289508 14.0076963556 -0.7011956881513
+3.621809362536 13.94996734062 -0.6833783281144
+7.78e-18 14.65291566591 -2.212409407365
+1.725253531957 15.45326664307 -3.3934e-14
+4.639380198855 14.55951098183 -0.9118851575877
+4.641364165811 14.50366186546 -0.9018043375231
+0.4381143432268 14.67753414008 -0.1581137531561
+0.517932785943 14.66554856349 -0.1704218420409
+2.777601238449 17.17926423145 -0.5000491043436
+2.826774662905 17.21307316103 -0.5268017231924
+2.245536233875 12.86754868135 -3.36738e-14
+0.4680411319423 14.67470649332 -3.4234817581e-14
+0.3653735347384 15.20926659808 -2.629597462234
+4.68818481449 15.59471909194 -3.3934e-14
+4.750346385181 15.62203581158 -2.670154591376e-14
+3.527540897711 14.89876530407 -3.3934e-14
+2.932177487613 14.96194269845 -2.248222868895
+3.281027253639 14.45771938042 -1.992839905743
+3.258710797127 14.40773440506 -2.052697900343
+4.136889602135 15.32788993688 -3.3934e-14
+4.080976489372 15.37076422414 -3.3934e-14
+4.087207671514 15.32099463752 -3.3934e-14
+4.600084545019 15.21824968834 -0.7944101223044
+4.54997917418 15.22729883852 -0.7428924931534
+-1.894080193232e-15 14.73066806376 -0.564713204139
+-2.405173877416e-15 14.78764913831 -0.5415780613592
+3.873793605397 13.77876029729 -0.50170450175
+1.509457298261 15.29702914169 -2.058685327917
+1.482372432848 15.3032106301 -2.012572472844
+3.447026472923 17.51134637315 0
+3.453724390481 17.56856294838 -0.02696214431926
+3.411184177234 17.55022226831 -0.001427967464915
+4.768193936644 16.04467705442 -0.2343738480414
+4.693192095828 16.07248755291 -0.242130847137
+3.246281711547 15.02772520888 -1.874926216409
+3.196786413469 15.02091805278 -1.913467266884
+2.639681551154 15.35236552598 -1.594524015605
+2.676932894075 15.35763620077 -1.543053561385
+3.460966233853 13.77203431099 -0.7766205473933
+3.31104534532 13.8613360245 -3.36738e-14
+3.27920280981 13.79026201539 -3.36738e-14
+2.557310542452 15.26981652536 -2.251825020639
+2.510673477864 15.27579954116 -2.211207238238
+2.567788155989 15.27975378136 -2.183398296697
+4.682166700912 14.53304655109 -0.9024379261866
+4.69434535303 14.48515094919 -0.8931427765803
+4.744696631849 14.49489341102 -0.8913128807003
+4.763238986349 17.47034552846 -2.226265053997e-14
+4.780067112145 17.52152502456 -1.64687623423e-14
+2.706305559148 13.29012046136 -2.227143649659
+2.704240766497 13.32107385988 -2.29000958054
+2.706710102555 13.35051969086 -2.231881037951
+2.22137246515 15.75631387157 -0.8873085831828
+2.189598547003 15.71309941318 -0.9106210148396
+2.129370242436 15.76773411696 -0.8811296245038
+1.917386157864 12.62612261411 -2.101972953403
+1.216626249787 14.0728215898 -1.40969213897
+1.187856635615 14.12741133366 -1.373128913005
+1.176871314234 14.14024274598 -1.429069772085
+1.448660818569 14.58568602197 -2.571850998672
+2.723341043347 13.85121414683 -2.143847600917
+4.62454690647 14.95180069102 -3.3934e-14
+0.1754916470599 14.6833150219 -0.2221633910912
+1.816989489204 12.7926534228 -0.4310190409334
+1.824856451035 12.79508376337 -0.3517273570233
+1.760323426734 12.79433211943 -0.3797974998758
+1.765898134952 12.79245254039 -0.4369282711032
+0.7911891190108 15.06785103334 -2.656875360694
+2.96909579702 14.30185959819 -3.36738e-14
+3.009190444084 14.35619696258 -3.36738e-14
+1.834065156633 15.42869652414 -1.239111858857
+1.890612619166 15.44531054266 -1.202553250289
+1.849151133442 15.40297940181 -1.30173147171
+3.055298766391 13.49322045623 -0.2694513106276
+3.056978995506 13.4923300637 -0.3212393203437
+3.243583003399 16.04023433811 0
+3.189802136296 16.01479605659 0
+1.23768195524 13.99842224242 -1.678274383572
+1.2480557413 13.96754130693 -1.74982828266
+3.164323920756 15.71203309324 0
+3.193482114883 15.76572975122 0
+2.567163133395 15.62518954916 -0.9764303706382
+2.509435492526 15.64582987559 -0.9581364123619
+3.339942112981 14.86947553615 -3.3934e-14
+3.278248410912 14.88165548767 -3.3934e-14
+4.275926227834 17.58748721504 -0.5243900100098
+4.236141571784 17.51839637612 -0.5365726845668
+2.604354880837 13.50984108284 -2.382145023699
+2.548631790022 13.48068395623 -2.377008751978
+2.551566003849 13.53330250824 -2.386286056027
+2.594550946537 13.45362761525 -2.37223638618
+1.770895211674 15.657035724 -0.9500412508546
+1.733922133516 15.62525290655 -0.9758744844231
+4.171616226954 14.63905406546 -1.053611196391
+4.122761256366 14.66254094176 -1.080668222502
+4.238905962278 14.66746209266 -1.030540057612
+2.310588209345 15.07905102365 -3.3934e-14
+2.303178582811 15.14136362133 -3.3934e-14
+2.261057338515 15.10576061174 -3.3934e-14
+2.376895270799 12.89480869606 -2.27370637542
+2.383340931975 12.95166148081 -2.283727226691
+2.426603073586 12.91812351657 -2.277816749243
+3.784432115555 17.68786733352 -0.3067104597072
+3.628936039169 15.14497923959 -1.209949932853
+3.622365180235 15.13279636475 -1.279145850209
+4.628910578693 17.84144206284 -0.3113928496553
+4.591244508273 17.83957063492 -0.2751388994136
+2.132664275571 14.69386910362 -2.590922618171
+2.082173340329 14.71605802939 -2.594839514554
+2.123621774864 14.75436916764 -2.601593507204
+2.250412355333 13.36501711821 -2.356613392266
+2.310731912855 13.36730991387 -2.357020323889
+3.138727042443 17.41525288896 -0.01144468942716
+4.214501740974 17.03863970153 -3.3934e-14
+4.276612964996 17.07897964732 -3.3934e-14
+1.728180130185 15.29164453236 -2.098481660259
+1.781794320623 15.29521569779 -2.071946313659
+-4.36436e-15 15.2393263364 -0.3654124889049
+4.670930397643 15.23458119816 -0.7016863053471
+0.6589350415088 14.86745980096 -3.3934e-14
+0.6767236792395 14.93819099994 -3.3934e-14
+0.6063308319548 14.89109059208 -3.3934e-14
+2.956048030688 16.20434251383 -0.7682842166764
+2.948846589672 16.13625655201 -0.7802889436474
+2.903087416348 16.21093815259 -0.7671181099709
+4.003908219559 14.34877205497 -0.9744837889595
+1.3285 13.55714371743 -1.298071257675
+1.3285 13.5666124137 -1.350575856712
+1.3285 13.49958536402 -1.303814799434
+4.48266858192 15.25764927151 -3.3934e-14
+2.903941477712 13.83226193054 -3.36738e-14
+2.530054584275 13.84736887573 -3.36738e-14
+2.473793328032 13.91452400655 -3.36738e-14
+1.166967519222 14.48260145803 -2.553666769736
+1.74559750133 14.52215038433 -3.3934e-14
+2.327897922048 12.84126628394 -0.5961866820719
+2.851232172066 13.95265981903 -1.668906574891
+3.658125743455 15.66339994288 -2.070045112736e-15
+3.749415406568 15.68167439441 -3.207517569147e-14
+3.745155622443 15.6255075001 -1.429893204163e-14
+4.291828974319 13.95797193589 -3.3934e-14
+2.147165347091 15.04079572909 -2.652088772444
+2.13323466173 14.98323142187 -2.64194263882
+1.736783534544 12.73331076825 -1.304034957149
+2.4279 13.15408464955 -0.832730870521
+2.4279 13.14296972685 -0.7744225626345
+2.53134936361 16.67472954072 0
+1.937046699345 13.49187819133 -3.389149917539e-14
+1.896074578184 13.4555163547 -3.3934e-14
+1.154969673901 15.54187161758 -3.3934e-14
+1.119495364873 15.58627241462 -3.3934e-14
+4.811051034911 17.3715067152 -5.801063122201e-15
+4.753692915006 17.41062369906 -2.554934275754e-14
+1.156786810365 14.55764982595 -3.3934e-14
+2.303113862233 16.77221266447 -0.2025809709269
+4.735977500988 13.72750689403 -0.264900496724
+4.731810874824 13.7825694919 -0.2747122813363
+4.584129354411 13.89810581196 -0.3076527800325
+2.905820830967 17.11346531831 0
+2.473666469329 13.3408163317 -1.327609885368
+4.204064692567 14.03012527335 -3.3934e-14
+4.8279 17.65158180789 -0.1053888902863
+4.8279 17.60484686566 -0.1246378343803
+4.8279 17.67824047666 -0.1483306188635
+1.279034745263 15.46639567129 -1.165675231815
+1.301799847487 15.43548921343 -1.223135940991
+0.305902007817 15.2999107594 -2.037579714321
+0.2993301798775 15.3070701003 -1.982539213319
+2.932723199086 13.47772119376 -0.2096060979059
+2.924736927536 13.4755864658 -0.2632681896645
+2.828000325856 16.57792747608 0
+2.866637003211 16.50688416123 0
+3.220488706745 13.57362065581 -0.9829043755471
+3.221245646937 13.52289276523 -0.9731005154222
+2.496757384295 15.67787134517 -1.506174425775e-14
+2.473172883228 15.72351543847 -9.387208278654e-15
+2.447231321952 15.65212186421 -2.972979170095e-14
+2.496235031555 15.62481594761 -5.902888578431e-15
+3.025997911053 15.36705917533 0
+3.031892707952 15.31640388516 0
+3.078760477179 15.33444147475 0
+0.9590637361563 14.87028708027 -2.622030278379
+0.9478600024999 14.93813055981 -2.633990193205
+2.840811107334 13.8130333738 -3.36738e-14
+4.768843525187 15.29667803644 -0.536800020383
+4.702881349706 15.32416090108 -0.5443894015478
+0.07059211959757 14.61011471479 -1.480515648984
+2.642895141748 17.08350108077 -0.135817547661
+1.725218559203 15.20557382466 -3.3934e-14
+1.686632872596 15.25445630068 -3.3934e-14
+2.535362489892 13.28993549726 -1.845459718085
+2.497832944678 13.29321707018 -1.772690582117
+3.038887563323 15.435300415 -1.224503935897
+3.10065745081 15.44293144137 -1.206507127395
+1.848843896887 16.25251215828 -0.06878312474516
+1.88893095167 16.29774127328 -0.04956802088669
+1.804348642538 16.2051330703 -0.04502830391635
+1.325231258977 13.64082563725 -1.741527900442
+1.3285 13.55845858319 -1.762653800211
+3.188263412204 17.44121868458 -0.1471591936004
+3.162696795843 17.42699224547 -0.2005501108357
+2.684563306313 14.81847807481 -3.3934e-14
+2.615499744647 14.83965601435 -2.651905232753e-14
+3.169651749855 14.26773669666 -3.36738e-14
+3.653216002691 15.74213304189 0
+4.712898481848 17.60654027515 -0.5114617410798
+4.775159095308 17.61579276306 -0.5112338226123
+4.716411907917 17.54275614603 -0.499970217774
+3.129230838196 16.56790966282 -0.7041676907569
+3.157458641746 16.52053512599 -0.7125215598024
+4.036683254884 15.769558099 -0.3124879625148
+7.78e-18 15.069421099 -1.869498555665
+4.793991927838 17.5865397363 -1.167447768599e-14
+0.8999326076372 15.58163854607 -0.8164976484911
+0.9036594118082 15.58705592887 -0.7441089057291
+0.9595719384115 15.60576943789 -0.8073002066647
+1.316988686704 13.66517271478 -2.116496315667
+1.205085821063 14.42909525407 -3.3934e-14
+1.604156658969 16.01759046863 -0.1199171480766
+1.578137909542 15.99539367692 -0.186062950671
+7.78e-18 15.03522371001 -1.64163503754
+7.78e-18 15.06425776662 -1.576648202923
+7.78e-18 15.09167110304 -1.63315339059
+2.744974806873 13.34352549184 -1.92800533961
+2.738107477847 13.37674545084 -1.96826120217
+2.755331580595 13.39827849839 -1.887769962403
+7.78e-18 15.27733470662 -1.322868115009
+9.19552374356e-08 15.34732883116 -1.28141503491
+1.252716994329e-06 15.3617690091 -1.354998503369
+1.3285 13.11872504343 -0.2260066192425
+5.923292082442e-07 15.34062523906 -1.42694283295
+1.3285 13.24692085483 -1.740474960354
+1.3285 13.30593365102 -1.683518952828
+3.614794672687 15.5676469359 -0.5980312352649
+4.499668573816 13.60585806849 -0.2298112348078
+4.463946745635 13.64294819195 -0.2801828703969
+1.3114103677 13.65701587353 -2.395617564029
+1.3172786296 13.63109355018 -2.314191812682
+1.290279911821 13.95056108174 -0.3864381262192
+2.654936165708 14.55550224288 -3.38458239817e-14
+2.714427778011 14.57611046797 -3.379398655238e-14
+1.3285 13.47290467146 -2.129121681668
+1.3285 13.48275889021 -2.0770576717
+2.323237461616 16.78195019888 -0.645661789211
+2.402252540344 16.7842443414 -0.6660288225211
+3.686953539238 15.46335317525 -2.535748762901e-14
+3.169547828621 13.69071842053 -1.065700576124
+1.975300550329 16.39741901956 -0.190703585717
+4.487429257997 17.70474217204 -0.5037218889709
+4.491124078008 17.64040114976 -0.5150596008117
+1.050459419178 14.37482218283 -0.1506408092401
+0.9993765734137 14.42421325741 -0.1366654537496
+3.129805451627 16.72389901559 0
+3.068144576069 16.66370634014 0
+3.288468605997 13.82279852779 -0.9507176067964
+2.510538063361 15.29150555583 -2.099824840103
+2.491557153156 15.28369052378 -2.155544552649
+0.3042324966732 15.3383778222 -1.723735828012
+0.3148369609014 15.34504697925 -1.664140203557
+0.4213565791099 15.45891620735 -0.6121885253761
+0.3710850687712 15.44879432038 -0.6556571729169
+2.9213824122 14.13183114511 -2.204768288175
+0.9727425104975 14.78745527751 -2.607433253996
+1.032960659327 14.74677353938 -2.600258202911
+3.43074569805 16.33516997063 -0.707130938153
+3.453497990387 16.41052086834 -0.7052972425916
+1.884739997048 16.02791847276 -0.7993794847019
+1.95197313289 16.00498150454 -0.8034232146705
+3.271052446704 16.40637883172 -0.732653074995
+2.052604801309 13.93264984324 -3.36738e-14
+2.025263886481 14.00719673375 -3.36738e-14
+1.973777626091 13.98224434068 -3.36738e-14
+4.717794397859 15.57822277995 -0.5382920820988
+4.741454255669 15.54504459098 -0.5812779179282
+4.778419805466 15.57479387137 -0.5576377450468
+0.190384777015 15.05712368382 -8.17662e-14
+4.007298083503 16.19130682277 -3.3934e-14
+4.047341630526 16.15255532889 -3.3934e-14
+1.874241851272 14.48436141924 -2.553990872906
+3.962438354571 14.82604348281 -1.197917214518
+3.885523271264 14.82675862495 -1.249928110707
+1.353334195162 15.37946201193 -1.382333075521
+3.836146930896 13.93523189305 -3.3934e-14
+3.473520962789 15.72774625556 -0.5717711235099
+3.123139164668 13.66179322799 -1.121248231392
+1.007452244963 15.64534179165 -0.2286794647106
+0.9324990072463 15.61416620712 -0.2151653094975
+3.852071973192 14.38399488871 -0.6200461302403
+3.830860817032 14.31092604787 -0.618512238096
+3.673603272301 15.61377747906 -0.4372769833561
+3.631463349903 15.64039527323 -0.4640476293856
+2.21360150541 13.66335252774 -3.36738e-14
+2.422418263416 16.8862078496 -0.4447176617073
+2.553369288482 16.59141742746 -0.7000210890659
+1.361289753357 15.35420472739 -1.57717201715
+1.423281594023 15.35465126392 -1.572869246842
+1.378654913537 15.34915974661 -1.625245811774
+3.1516578214 17.31874307776 0
+3.171465802385 17.26032996878 0
+2.794256802906 15.30948442374 -1.963846610013
+2.754636377016 15.30460834249 -2.001866047258
+4.373485741577 14.68943620556 -3.3934e-14
+0.2566611427033 15.31963838408 -1.882866888565
+0.2090191086535 15.32317107946 -1.854501278545
+0.2578173183293 15.32822064876 -1.811715282143
+3.173808206508 14.2679821761 -1.16202486899
+3.359184830666 16.56945922562 -0.7038947234606
+3.422712225767 16.55244494246 -0.7068926582611
+4.8279 15.43485883335 -0.2203768108071
+2.269455823876 13.49805551535 -2.380070559233
+2.312138019439 13.44482500705 -2.370690579035
+3.353322900096 14.30123642308 -3.36738e-14
+3.326440892689 14.22437567598 -3.36738e-14
+3.734717916705 16.16722818382 -0.5042404741563
+3.780269617081 16.18286524716 -0.4857346370856
+4.79085856951 15.24863551787 -0.622174480154
+4.801778142548 15.2608699391 -0.552669969457
+4.8279 15.20859453249 -0.6070936457214
+3.156131711085 15.03492378221 -1.83414073965
+3.215873111426 15.03689313692 -1.823098521145
+2.444287056118 15.83299633281 -0.8514944324309
+1.583524048893 15.04044113576 -2.652026223526
+1.628607014895 15.00887036369 -2.646457791417
+1.594001489244 14.96982021243 -2.639580854252
+1.641284221783 15.05973659877 -2.655429870005
+3.76176400714 17.44599980883 -0.5493372939436
+3.711009116604 17.46269276833 -0.5463911380791
+1.3285 13.15840758381 -0.7733610133688
+2.734308450762 13.85743348042 -2.076658871078
+2.632404503112 13.33515463832 -1.623303108322
+2.174497684589 15.57271658633 -1.028168072494
+4.084893980414 14.4269497389 -0.5309484410889
+4.009010555821 14.41949832547 -0.5732697222534
+4.056598975783 14.3822316027 -0.5254461381704
+0.3635612989735 15.40531934259 -3.253514524052e-12
+0.3646255855665 15.46186422478 -0.009908302537438
+3.370798471586 17.3091824089 -0.5734606787917
+3.43289597097 17.32310716009 -0.5710025880559
+3.397438551671 17.26424607572 -0.58138683203
+0.6145725826623 15.35668254404 -1.552805066067
+1.3285 13.606509908 -1.307469698583
+1.3285 13.58371883793 -1.223629407188
+1.327577945081 13.64431496756 -1.274374702751
+3.285344325505 17.47448637403 -0.5443176793601
+1.3285 13.63839760787 -0.4821775385534
+1.3285 13.59132471399 -0.507929912334
+1.3285 13.55342916225 -0.4331063198794
+3.062829474325 13.49088837526 -0.4050891560783
+3.092173304224 13.49601581739 -0.3590994546892
+3.027353140378 13.48741833885 -0.3634743482948
+4.771804251921 14.69925127695 -0.9263515022424
+4.71682179503 14.64574923412 -0.9198685778584
+1.145233798713 14.12137443808 -1.985816965963
+1.018580146079 14.40545969472 -2.54006839406
+0.6161977502423 14.519622161 -1.893576871729
+0.662755546023 14.50145548594 -1.905772942399
+3.471694368213 13.85817600044 -0.7824364979986
+3.517450643993 13.87845543798 -0.7492065016767
+3.500644850373 13.8284405612 -0.7539098483288
+4.221553090299 16.55727211417 -0.397873589502
+4.240995406227 16.47925050848 -0.3795575909817
+4.196586394355 16.51011021264 -0.3958928949421
+1.212506508632 15.33308459228 -1.770474982341
+1.250944385022 15.32384249561 -1.848842503231
+0.7720462805654 15.37168585548 -1.428736468129
+1.3285 13.68282703448 -0.1155835138851
+1.325897531491 13.73757340831 -0.10855292337
+1.326438592894 13.72589250256 -0.1653389239392
+4.528357754069 15.70548344982 -0.1914873760014
+1.377177925116 12.82878942311 -1.444405353666
+1.414702739879 12.78309196906 -1.445756571766
+1.389919825211 12.81573926855 -1.388142290575
+3.058148480244 15.38992721771 -1.34439581239
+1.3285 13.38911757064 -1.916507656109
+0.6015806190921 15.49103223319 -0.7406525903885
+0.6688218298287 15.50919079218 -0.7380386409766
+2.117409016752 12.65699135185 -1.907693554369
+4.222935543234 17.79039399536 -0.4866615309847
+3.299109727672 15.00183070687 -2.022007404146
+4.346374700524 15.58940876792 -0.4748818858311
+4.372591089127 15.59873029643 -0.4218927333207
+2.4279 13.08419334653 -0.3521078830529
+2.4279 13.113590891 -0.4264545032948
+2.562023755834 15.24664226186 -2.403910363678
+2.526102579544 15.23699287611 -2.464218449978
+2.471550347346 15.24414360296 -2.41957062929
+3.392722517247 15.73470157529 0
+0.3309307909723 15.24311714971 -2.425991187822
+4.684146807167 13.75850077011 -3.3934e-14
+4.73765946928 13.77439234779 -3.077393555025e-14
+2.903853403408 16.08407734131 -0.7894876163729
+2.956887271741 16.08462874839 -0.7893896123378
+2.510184205324 14.56442472693 -3.3934e-14
+4.163872663856 13.59507339117 -0.1210841922221
+4.224510449377 13.59792725051 -0.1261094085656
+1.003829762853 15.6197804201 -0.8969655268784
+1.467302074426 15.20798825101 -2.636882276088
+1.609557878537 12.73057401895 -1.330477428937
+1.566657892775 12.73842162677 -1.277872802101
+2.374655667387 12.84702817223 -1.2012600864
+2.351054014382 12.81988916306 -1.139601077487
+1.503455790971 13.72723467772 -2.420483094796
+1.686836397084 15.08677069486 -2.660198582001
+1.627930320599 15.11043453827 -2.664372794212
+4.039212425638 16.93046795719 -0.5160213451472
+4.048191459129 16.97963237117 -0.5218845694896
+4.268053006709 15.56536879567 -0.6108440568929
+4.234566819725 15.55767619013 -0.6546134637558
+3.940554205331 17.36737219966 0
+4.281914310686 16.89512618948 -3.3934e-14
+4.211817165193 16.84964311222 -3.3934e-14
+4.265733131092 16.82222346065 -3.3934e-14
+4.091746918585 15.02170959575 -1.159071823432
+4.032310815029 14.9826495868 -1.184138915047
+3.999127883795 15.01982957071 -1.209994209333
+3.76731894619 17.01205650188 -0.6258617144861
+3.820012425982 17.05146078477 -0.6189063954002
+1.203842767341 13.99890122205 -2.177783689082
+1.180493454579 14.03259188438 -2.214275207956
+1.20385875018 13.99067699178 -2.229872963659
+1.22634956258 13.94767435661 -2.216051893891
+0.5509298583021 15.41560507109 -1.265676743429
+0.567718183617 15.44392358661 -1.206761379284
+3.709995386953 16.58916411611 -3.3934e-14
+7.78e-18 14.86480260561 -2.399127056678
+7.78e-18 14.85055657666 -2.448612948929
+1.081132488389 14.29301361269 -2.520246911292
+1.13654343747 14.33880158202 -2.528317705793
+4.8279 13.65038438609 -0.2419930388572
+4.8279 13.68649938545 -0.1571109817706
+4.818595547958 13.61144578643 -0.1042939273209
+2.222492646074 16.17767005081 -0.7729812405567
+0.8368684620059 14.35844390531 -2.320038708111
+0.7890422335835 14.38255086636 -2.341745667856
+0.8100028567845 14.36296221649 -2.39191162114
+0.866684331987 14.3322635625 -2.369057587361
+2.165417654454 15.36457136601 -3.3934e-14
+2.211149445062 15.3848101833 -3.3934e-14
+1.103363629275 14.51255143933 -2.558947062979
+1.898390960084 15.21132205182 -2.617834346765
+4.588181223553 13.60792179835 -0.2163403150669
+4.574951206686 16.42950749533 -0.3142812278794
+3.330760411204 17.02842910971 -0.6229727327728
+3.224320074777 15.65013391594 0
+4.124357110849 16.26930815714 -3.3934e-14
+0.7760694034469 15.55581066558 -0.3069047288148
+0.8434689750851 15.57895700807 -0.2984735890089
+2.977990246143 17.32083520781 -0.03034350952234
+3.026258565815 17.3503434193 -0.03794282518667
+2.994052672357 17.3304782708 -0.0842631221725
+1.575878285897 13.06484557122 -3.3934e-14
+3.608599278087 16.67839659039 -3.3934e-14
+3.649934991107 16.62405715954 -3.3934e-14
+2.3897156578 12.78418698447 -1.904298284202
+2.410212420019 12.81495137689 -1.953217436073
+3.323589921272 14.39868298387 -1.87188626491
+3.351893244674 14.35898711729 -1.803005803272
+3.325355724848 14.33635348383 -1.856838785326
+3.29699357739 14.34104533837 -1.927491069089
+2.771024396515 14.95941041748 -2.262207201007
+2.576601462535 16.70847376546 0
+1.305130729843 13.70625290146 -2.292320163135
+3.428278133178 15.43617657339 -2.5139000015e-14
+3.440439735494 13.97097775444 -0.8298424042629
+2.185512433361 16.45805221432 0
+3.640196671481 15.59608253963 0
+1.49104830887 12.80872018922 -0.4752097687584
+1.526882636738 12.7993972721 -0.5287037874683
+1.550624075977 12.79755498651 -0.4515731002688
+1.51906009447 12.80624223846 -0.3807568393799
+1.841982268055 15.11398468884 -2.664999027305
+1.788862181196 15.19573704851 -2.679419833425
+1.866327032732 15.15984511792 -2.673088633024
+2.677245567466 14.25430148179 -3.374131319913e-14
+2.726692838568 14.27219763777 -3.36738e-14
+2.695601728664 14.32515746734 -3.369389928139e-14
+4.358496687751 14.11304688961 -0.38438043951
+4.417222024885 14.12567728787 -0.3740251168915
+0.9895691377054 15.49491837926 -3.3934e-14
+0.9419016752309 15.51943169655 -3.305284289253e-14
+0.9091076125217 15.47983274866 -3.3934e-14
+0.9530897969323 15.43652551343 -3.3934e-14
+2.4279 13.01353657499 -2.159434551299
+1.433027063875 12.78823780501 -1.28093808435
+1.413772121745 12.7961921624 -1.330216982996
+1.582313756441 13.40124050593 -3.3934e-14
+1.527869299418 13.4306827617 -3.3934e-14
+2.722977343473 15.86153953192 0
+0.9693315878351 14.30858938258 -2.522985234474
+0.9576897023301 14.24845265898 -2.474556909367
+0.9032195609038 14.29629042965 -2.520816785905
+1.671624238198 13.19454434963 -3.3934e-14
+3.945702156846 13.59001631865 -0.4337531432348
+3.896773874048 13.58823567559 -0.4567446773668
+4.8279 17.2077459926 -0.01663207644756
+4.791962029054 17.17466050621 -1.237336755344e-14
+4.8279 17.1389651208 -0.0321311681292
+3.590321060466 16.32056692605 -0.6065955829841
+3.635696247062 16.33132637018 -0.5834528560604
+0.943916695914 15.33264766893 -1.773839997208
+1.000096625904 15.33163836358 -1.782410297416
+0.7156843269996 14.46394010516 -2.036766811307
+0.2744708106686 14.67894454108 -0.4183536457084
+0.2494232019351 14.68031163217 -0.36907569943
+1.9327821899 16.34405289213 -0.3867168411791
+2.904599312698 14.97153879508 -2.193542993691
+4.388676657851 16.56255874141 -0.3635761533643
+4.445526489191 16.57507429408 -0.3562980320575
+4.429827439317 16.51105870245 -0.3472446122968
+2.724221036774 14.90849381318 -2.551287206709
+2.716944288944 14.92231717253 -2.472992960823
+4.326738720817 15.06754598434 -3.3934e-14
+4.264719147552 15.13897438385 -3.3934e-14
+2.231876198035 12.78865532807 -0.7491262596285
+2.282939981552 12.80331614356 -0.7502674689434
+2.255737259939 12.78810249286 -0.8343777543206
+1.3285 13.49913675311 -1.97805523797
+3.399797774392 14.88875671586 -3.3934e-14
+3.375542784494 14.81763871254 -3.3934e-14
+2.773848399178 16.90068794173 -0.6454972887459
+0.5255577545339 14.53074310997 -1.981682439135
+0.501141068368 14.54256031684 -1.921976864245
+1.243420983907 15.66775511755 -0.9423809804569
+1.183950365201 15.69346874044 -0.9240399476027
+1.220828582669 15.72696529242 -0.9025886331493
+3.913030740635 14.60449121298 -1.19158140352
+3.96138519117 14.58858807061 -1.156757882017
+3.475530732474 15.14799782772 -1.19282615239
+3.529711631745 15.14864342447 -1.189235050465
+2.913167706661 16.77136739052 0
+2.975399331526 16.75414525165 0
+4.476134072986 15.22657292209 -0.7471843954867
+1.3285 13.4280493746 -1.246507784409
+1.423457625554 15.68570239322 -0.9310184188763
+1.40524082123 15.73849168735 -0.8954625144253
+2.701406847004 17.12422553903 -0.4389917263627
+3.293826778382 14.33036452522 -1.034513454322
+7.78e-18 15.20579695721 -0.9787013632079
+7.78e-18 15.24990388095 -1.008388350147
+7.78e-18 15.16565318099 -1.022097012567
+2.702604447198 15.35133525325 -1.604309852371
+4.8279 16.12663633608 -0.03332714366772
+2.521818501016 13.37785722747 -0.9989887163412
+2.561941463262 13.38073500641 -1.048952347845
+4.680633276556 13.73512259635 -0.2698542301591
+2.474489934047 14.12477377484 -2.490575088901
+2.442629236878 14.06863949041 -2.480683525897
+2.421908864618 14.13813095074 -2.492931728776
+3.008603347779 14.76029260148 -3.3934e-14
+2.4279 13.28813780531 -0.4445281475437
+2.4279 13.29489635431 -0.5261827717659
+3.601072392077 16.04995984945 -0.5526079108752
+3.644893156171 16.06016883699 -0.5307112050979
+4.164055258779 17.7796406576 -0.4887615626189
+4.165855379544 17.78157363849 -0.429267759997
+1.327625767539 13.68540963796 -0.6883184993153
+1.3285 13.66609312541 -0.6340387793491
+1.838397263265 15.20628196594 -2.646912780264
+1.791640667831 15.20968685143 -2.627295326026
+2.204885972195 15.34046343124 -1.705298065403
+2.199418559223 15.34819415055 -1.634284992593
+2.97760166634 13.95926712125 -1.400776566007
+3.64515109399 15.11052970869 -1.405259923265
+3.680923542795 15.12312808193 -1.333939850082
+3.703716162403 15.11333696429 -1.389386591196
+4.18790040885 17.12895713781 -3.3934e-14
+2.955689759233 13.46080876862 -0.7637094676973
+0.8737885245927 14.44126153927 -1.53478838365
+0.8582362270787 14.44449310101 -1.590826147968
+2.545594918573 14.06534726969 -2.480097461247
+2.494440585363 14.07695505286 -2.482146250606
+2.53583790631 14.12499437008 -2.49061640588
+2.503029547489 14.01130708939 -2.47057476553
+3.654373696398 14.81288647063 -3.3934e-14
+1.666792064802 12.75662962468 -2.24934012936
+1.610692799408 12.77933865864 -2.253343688832
+4.245036970366 17.79812439745 -0.3108566151871
+3.381195300829 15.44165687198 -1.137317954779
+3.414383948768 15.37582537891 -1.095198098501
+0.9110157795532 14.33676326524 -2.145394198757
+0.9174790923393 14.32458429827 -2.194236728653
+4.8279 15.27796725536 -0.4936190181043
+4.8279 15.34042782367 -0.4699470532034
+3.194060917524 16.48084528412 -0.7195241997182
+3.20887216579 16.41986324295 -0.7302791814183
+3.148807425722 16.39906306961 -0.733944129039
+4.316223147696 16.96799892873 -3.3934e-14
+4.39718954045 16.98055795298 -3.3934e-14
+2.294033876928 16.57185720244 0
+2.35846392996 16.54095462784 0
+3.634742026515 16.01126569297 -0.5276476144452
+4.720262750403 14.64657492558 -3.3934e-14
+3.382364832882 16.78088480254 -2.556288339741e-14
+3.336765214815 16.75388805532 -2.842193039913e-15
+3.463417582686 16.77777318086 -3.3934e-14
+4.592784274212 14.59616027392 -0.9242639239409
+4.504290356995 14.62104735241 -0.9443644357758
+3.251413559715 17.12905842952 0
+3.277595707557 17.05277283551 0
+3.313389944065 17.10269689079 0
+2.351621602575 15.08343026762 -2.659609343308
+3.642395987758 16.98326983843 -0.6309374279273
+3.709652246613 16.99664414526 -0.6285796171865
+3.682964919435 16.94399330579 -0.6378560196978
+1.31066605299 13.87073773531 -0.05073532719347
+1.298798368234 13.92185951744 -0.03186328270736
+1.301826048595 13.90956391941 -0.09108070217899
+2.960820071987 17.3028133747 -0.5005886909535
+2.914196734836 17.27306173593 -0.4965707363507
+2.922367936077 17.27986052061 -0.4421460403652
+2.387909535148 13.72838589768 -2.420683719712
+2.444320846958 13.73647734307 -2.42211834505
+2.795840460832 17.12790580591 -0.6054306007676
+2.793760167861 17.05347712848 -0.6185533949041
+2.754213451361 17.09930300529 -0.610471741341
+3.648151721043 17.51471110483 0
+2.359530883137 12.86101560228 -0.7129579041194
+2.37433817371 12.8787570975 -0.785356209134
+0.2419291992484 15.43777895896 -0.5369073502052
+0.2088532290647 15.43714939099 -0.4555491750958
+0.2671482554045 15.44323359271 -0.4448550050125
+0.2882198258597 15.44320687215 -0.5136031509031
+2.286480917397 15.62943454482 -0.9725391501515
+2.27453174237 15.66912899038 -0.9425739801527
+2.799028295094 13.42266846387 -0.998489427685
+1.758770122556 15.23449356561 -2.479665168415
+7.78e-18 14.71020974292 -2.202148148157
+7.78e-18 14.70599936716 -2.260821685405
+2.24125985066 15.82932802487 -3.3934e-14
+2.201752103343 15.79259833919 -3.3934e-14
+3.452676314003 17.56347653506 -0.4159183974457
+3.464402922051 14.33295059589 -1.064255375706
+3.412302416473 14.32980336241 -1.082023060989
+1.282899228802 14.23972918143 -3.3934e-14
+0.6357304257538 14.44006046875 -2.385516311054
+0.5895713926437 14.4484609484 -2.416980908245
+0.6988628371416 14.4084543043 -2.438195894273
+1.577835694013 12.71742700256 -1.45298588402
+1.553233959226 12.71382097003 -1.525731023565
+1.606529664684 12.70201224801 -1.580210135997
+0.6997492950334 15.30882394097 -1.969047913001
+0.7287673610223 15.30106873173 -2.028951555397
+3.255704263894 13.51249932921 -0.4690950652182
+4.8279 15.17831810296 -0.6810662282435
+1.101402441953 14.2592057094 -1.312774541706
+1.153309833153 14.18990590874 -1.302433794257
+4.410786188414 13.64623412594 -0.2908701681795
+1.675620644252 14.69915199172 -2.591861791395
+1.709858940174 14.63605316284 -2.580732136628
+1.649608603671 14.62374746115 -2.578564912487
+2.809343363519 13.40749157937 -1.690601990827
+2.828708031843 13.44633180759 -1.641229290741
+2.142514630434 16.59025700602 -0.3875319147628
+1.697194752046 13.81552096239 -3.36738e-14
+2.091757892993 15.0543315915 -3.3934e-14
+3.547348514601 13.54899421122 -0.2556316738547
+3.503037331384 13.5459116693 -0.1979289946108
+4.684775067497 15.47189363371 -3.3934e-14
+4.669197207009 15.39255857057 -3.3934e-14
+4.724775050977 15.42284249543 -3.3934e-14
+1.342068416716 12.97541944734 -0.4040371002704
+1.3285 13.56772980569 -0.799338506834
+1.3285 13.51525402016 -0.8348639747573
+1.3285 13.48272469516 -0.7767467793233
+3.130671444096 13.49266714414 -0.5889705679494
+4.122757484206 13.5933825991 -0.07617292893853
+4.103497411217 13.59251140937 -0.02497921642335
+3.971178935074 15.67909655278 -0.3191782626411
+3.949351198342 15.61537339961 -0.3274705572514
+3.90424141506 15.65818961968 -0.3404206666963
+3.523783200848 14.3311369374 -1.074596331037
+2.515587968453 14.44410019321 -3.391956092716e-14
+2.524315883417 14.49987527154 -3.3934e-14
+1.169716415319 15.71622216359 -0.5615346128997
+3.547690624923 14.03734984306 -0.7529320217101
+2.201257264014 15.32969259333 -3.3934e-14
+0.70572562107 14.70010274457 -3.3934e-14
+0.6549589550317 14.69260116894 -3.3934e-14
+0.2656032306551 15.44727467391 -0.2551516956243
+0.2758303419986 15.44903436418 -0.2047375978122
+2.089821156991 16.52244122161 -0.5873113273142
+2.096410067682 16.52780070416 -0.6513925435175
+3.915209273886 17.10228365618 -0.5913193496843
+3.952283976668 17.05356282604 -0.5682575211856
+3.901147730266 17.0473543998 -0.5870788768152
+2.569122518413 16.60371627164 0
+2.499275275504 16.61211606922 0
+2.531740789972 16.53249617624 0
+2.112080361447 16.54116909857 0
+4.555091699901 15.45674405203 -0.5819332240465
+4.402532960259 15.73763947231 -3.3934e-14
+4.434626356908 15.68804462059 -3.3934e-14
+4.47040103062 15.7350532171 -3.3934e-14
+2.4279 13.20623209318 -0.383652121411
+1.328363936537 13.60221009037 -1.52772605251
+4.079568199772 14.27386816921 -0.4977203410359
+2.174173287815 14.78732894608 -2.60740666644
+3.993474322612 13.67635812852 -0.427534240152
+3.981447177041 13.72706907195 -0.4415297670159
+4.030617535317 13.73939246569 -0.4230220221685
+3.534677357201 14.34855219118 -0.9759047402241
+3.509806503664 14.35781156397 -0.9233482034076
+3.473495566694 14.349600953 -0.9698643419975
+3.65122379959 13.55809900626 -0.2814010456016
+3.694637528922 13.56098895734 -0.3159291679495
+3.062633523007 13.94696210563 -1.25871332646
+3.095724979072 13.97603566849 -1.215353002432
+3.092736545813 13.90778805301 -1.207534388594
+3.687818468809 15.21068202284 -3.3934e-14
+3.631293597552 15.19590370421 -3.3934e-14
+3.113817880707 15.46069796852 0
+2.468403769248 13.35148462618 -1.204966009296
+2.519925976169 13.35489684808 -1.265334753076
+2.52531043583 13.36114100804 -1.208541894034
+3.141843808558 14.17048978164 -1.185806604101
+2.016532906701 15.18410295013 -2.677367622604
+4.609150188282 13.61010815365 -0.01142589043521
+4.762819535037 16.79273860288 -0.3663824234209
+4.632465613302 16.07132900887 -3.3934e-14
+4.581816243757 16.0494201542 -3.3934e-14
+4.256426145676 15.94071969287 -0.2805805157978
+4.230996536076 15.86506897189 -0.2736393902498
+4.196893467854 15.91690320651 -0.2914033006401
+7.78e-18 14.95529885019 -1.946930015696
+2.018684233807 13.51557122185 -2.383158525159
+2.4279 13.06283567008 -1.516103140037
+2.584571882085 17.03606378181 -0.03842174190861
+2.549716706916 17.00649238437 -0.09320209147549
+2.54609851923 17.003542424 -0.03367694992513
+2.112108524978 15.93902610089 -1.900978157031e-14
+2.133349361078 16.03119575251 -3.3934e-14
+2.06940726634 15.9733471697 -1.824068833521e-14
+3.813267487111 16.30388494199 -3.3934e-14
+3.786460018159 16.36124636239 -3.3934e-14
+0.488026101118 14.78288914126 -2.606617930486
+0.44112709366 14.80551694208 -2.610609482403
+2.612510672925 13.29638125253 -1.891605733309
+4.00874486937 15.25093682277 -3.3934e-14
+3.958339756448 15.21380937758 -3.3934e-14
+3.080815804421 15.97400660296 0
+0.9450958513595 15.61850433455 -0.2745983154205
+0.8256062561215 14.33268568389 -2.513962212532
+3.82872563375 14.85928787258 -1.297788433311
+3.832278759933 14.80407163232 -1.285243793306
+3.51052150105 15.8807225149 -0.5757062504998
+3.486706295348 15.80455783668 -0.576816268567
+3.456523223236 15.85622972414 -0.6056711364287
+1.778309685537 14.85308636276 -3.3934e-14
+1.72825053927 14.78682165108 -3.3934e-14
+3.369561089308 15.32898733308 -1.128081882355
+2.272377205983 16.39088895909 -0.7353776171683
+1.3285 13.14020759844 -1.370518662321
+1.3285 13.07840434117 -1.380848747319
+0.6094428069206 15.31038662069 -1.956793350463
+0.5396717673758 15.30454523866 -2.001981164971
+2.464638624399 13.31195103284 -1.57713710607
+2.515935331612 13.32286361982 -1.561315799337
+2.475434760587 13.32012719338 -1.524058380249
+1.377217057871 15.14114014189 -2.669789146209
+1.3063635425 15.13908095856 -2.669425914082
+1.269904489926 15.19354339084 -2.679032880534
+2.201835464309 12.80062278862 -0.3216863262742
+2.192862412101 12.80024721304 -0.2596342096239
+2.20589654334 13.47693552931 -2.376343882265
+2.246483924456 13.42433872359 -2.367072172848
+2.198555927126 13.40477243925 -2.363617549906
+1.33216046428 15.02453046045 -2.649234693768
+2.46901136672 13.26218431472 -1.957155794175
+3.593591528304 16.15292927448 -0.5750217872488
+3.61416735613 16.20778059609 -0.5733753449744
+4.462741941162 17.82558464194 -0.4279226175651
+4.391956417394 17.81821156752 -0.3882591250876
+2.814292934507 15.19384394686 -1.977081794861
+2.808384492003 15.23725434375 -2.003474987716
+0.09224097055759 14.66158134662 -0.8283770693991
+1.3285 13.15799867825 -0.8444755953111
+1.3285 13.18429555222 -0.8985012409404
+1.844049620608 12.63287998013 -2.060983968644
+2.844544161067 15.22331924445 0
+0.843192841555 14.39058606883 -2.086031309893
+0.8693202741185 14.36489610453 -2.152156044274
+3.351340855256 14.32285646751 -1.121456888503
+3.296246369798 14.31900368732 -1.143352593509
+3.350608805686 14.31384180324 -1.172625591055
+4.064896553404 15.8631792108 -0.3195082185849
+4.064313878201 15.81267342648 -0.310926406063
+1.017989676767 14.30372647552 -1.730872474009
+1.035626076867 14.28032021419 -1.789480418232
+4.117851579704 15.18607335822 -3.3934e-14
+1.3285 13.37933160437 -0.385796084084
+2.812422807533 14.20508617813 -3.36738e-14
+2.837379418755 14.25432889535 -3.36738e-14
+2.777416916887 14.25832778207 -3.36738e-14
+3.019417576392 14.06630323356 -1.347408021137
+2.99188352984 14.0638276184 -1.394540789926
+2.998915026987 14.12780249633 -1.393673732564
+3.084447815328 17.38381184241 -0.1498283936693
+1.996748922102 16.41344878275 -0.5797655069791
+4.083379205196 16.33123662435 -3.3934e-14
+2.583500607873 16.13333546766 -3.136211596627e-15
+4.009673249946 15.93699215101 -3.3934e-14
+3.953709128405 15.95545624469 -3.3934e-14
+3.964669361824 15.90610784711 -3.3934e-14
+1.3285 13.16363172721 -0.3602103731185
+1.3285 13.1779217653 -0.2990405983059
+4.349760305667 17.41317025352 -0.5206081504596
+4.345702822334 17.36147153965 -0.5121691437625
+4.295449090667 17.38762301846 -0.5273884039431
+4.394057468544 17.38124400568 -0.5065731811518
+3.779653039166 15.55793151354 -0.6530790964464
+4.037619058037 15.26589065707 -0.6844406655235
+4.072941951529 15.23453872059 -0.7020307995423
+4.273697186787 16.05621308845 -3.3934e-14
+3.123498895914 14.61897539539 -2.577726826551
+3.185733679804 14.64601064818 -2.58248992719
+3.186694496205 14.57379649179 -2.556447643805
+3.146622070734 14.53694925461 -2.563260799508
+3.24060662927 13.81476158435 -1.001946893185
+1.962150315923 16.37937125293 -0.3489276510615
+2.72284229719 16.88273110383 0
+2.783611055909 16.91687745219 0
+2.743594679892 16.96481040311 0
+0.4546202113146 14.66911862561 -0.4486929999374
+3.772391845534 15.33204016817 -3.3934e-14
+3.823535210713 15.36340199605 -3.3934e-14
+3.399876093313 16.03034760208 -0.6743967477127
+3.344485399213 16.01214260852 -0.7101330948837
+2.406631304297 15.97667650119 -2.87566766288e-14
+2.405064015569 15.91088662168 -3.3934e-14
+3.031916113912 16.23394060071 -0.7630627381041
+3.088522906948 16.21357909551 -0.7666509020587
+3.024161540979 16.18286706192 -0.772068902661
+4.33761249667 17.48861530116 -3.3934e-14
+1.973733006897 16.39655179861 -0.06160657017804
+1.987006071811 13.07041648739 -2.304674682917
+1.946415149238 13.03037774223 -2.297616182552
+1.933269875968 13.09043061003 -2.308196427931
+2.653171230069 15.99163760054 0
+2.69477816383 16.03696085474 0
+0.8761728250661 15.25268825014 -3.3934e-14
+0.9315968387244 15.28477804424 -3.3934e-14
+1.666213772478 12.79855164205 -0.189695260746
+1.660820879542 12.79758720592 -0.2435022692739
+1.708038625689 12.79914987976 -0.1368738076203
+3.742787016922 16.59328776892 -0.5755297566721
+3.809633666024 16.14604529982 -3.3934e-14
+3.896930078085 16.11260308658 -3.3934e-14
+3.468127607573 14.02522392381 -0.8149383766366
+1.983505873684 14.03166413189 -2.474161840094
+1.896973892763 14.01830829118 -2.471802155996
+1.954762052843 13.98637117899 -2.466174503997
+0.9312501440067 15.60838161462 -0.4567199024678
+0.9745923436555 15.62491835517 -0.4960787467081
+0.884911786397 15.58927765412 -0.4909485806671
+1.3285 13.18132513138 -1.894980015812
+7.78e-18 14.84233859269 -1.325160450775
+7.78e-18 14.86164137112 -1.374030360186
+2.675923609985 15.20599366074 -2.648580036435
+2.591214015854 15.20695952582 -2.642971606592
+2.608675117138 15.21500633707 -2.596608444162
+0.7197341562684 14.54250092654 -1.347719275352
+0.7828917034161 14.50779795534 -1.396789681887
+4.565871804872 17.03352573893 -0.4216477839393
+4.624132411937 17.02122091806 -0.4136678925464
+4.580391031906 16.97869414089 -0.4105857275289
+2.871495534754 13.46861418591 -0.2226231216257
+2.871521479044 13.4672639599 -0.2951546927934
+0.6470141767048 15.41962751831 -1.258609733161
+1.748592166413 13.98655709729 -2.466202196976
+1.703189695116 14.00793743359 -2.469977017261
+1.779433214948 14.02572158223 -2.47311054649
+1.782221802539 13.94968510538 -2.459701717351
+4.759893099401 13.67764689778 -0.25554386799
+2.387970596161 13.89692857409 -3.36738e-14
+2.45257533269 13.97009377395 -3.36738e-14
+2.375582611359 13.95134036567 -3.36738e-14
+1.894493424679 13.61055748434 -3.36738e-14
+1.3285 13.26945658287 -1.068222607446
+3.937086924463 14.39090996593 -0.7355959854241
+3.847645678188 14.39569973116 -0.7083314516392
+3.619236226553 16.53043210801 -3.3934e-14
+3.592327274238 16.48581318039 -3.3934e-14
+2.4279 13.1065362996 -0.8669942890349
+3.549159255686 13.90056787916 -3.36738e-14
+1.921692112272 12.76779091165 -0.9068444386768
+1.985706151787 12.7660496775 -0.9309428704305
+1.976969783499 12.771585304 -0.8518455594248
+3.570549604587 16.81895914354 -3.3934e-14
+0.4456888916675 14.66647127838 -0.5636355982258
+0.5217247945152 14.65514217664 -0.5644113639578
+3.227653877117 17.14336237375 -0.6026967717248
+2.763509667853 15.3509632416 -1.607738091778
+1.287514260348 13.959288466 -0.4622215175894
+1.268484386228 14.01481927374 -0.4662202869142
+1.277653526737 13.98688367724 -0.5328470275417
+1.299643442002 13.90909957418 -0.5126553351184
+3.914294920757 15.40828436212 -0.7648003040363
+2.595382198213 17.00496300645 0
+2.674861020207 14.01043426485 -2.470413219766
+2.703086836662 13.97123338187 -2.455301807908
+1.384209461821 15.78536518927 -0.8716206000376
+4.717203257105 17.02196269453 -0.4081005595242
+4.768629385507 17.03393002027 -0.4087974050594
+4.774214330629 16.97380069785 -0.3980797285492
+7.78e-18 14.68446793007 -1.859938283107
+1.235874400693 14.01717116172 -2.471604701689
+1.291409863531 14.05065084089 -2.477509506934
+1.300083233273 13.97729710026 -2.464582055186
+2.767632821584 17.17898248282 -0.01051623402685
+2.814242160432 15.56129738143 -1.038737946528
+2.871232897716 15.55484655039 -1.045163671868
+2.815331406137 15.51340606439 -1.093364888629
+2.636909290824 15.54936348422 0
+2.761763690048 17.02454954609 0
+2.814178532539 16.99138580609 0
+2.792572078802 17.0654758132 0
+4.630119352186 15.90940054186 -0.2171259507269
+4.596407885133 15.87189933326 -0.2138253865859
+4.557284164851 15.93937511084 -0.2295148418627
+0.9176383783429 14.81668432976 -3.3934e-14
+0.9218789873019 14.89531503794 -3.3934e-14
+0.7190588539321 15.54068573301 -0.09277578944994
+3.155021000661 17.22839528686 -0.5877059567513
+1.798368726302 16.16418730721 -0.7753486816934
+1.794779362836 16.11211749915 -0.7845341155483
+3.012698949243 13.47894131986 -0.5550223879606
+4.301849740432 14.15685372127 -0.4061955009112
+3.847276157171 15.51731917072 -0.8174897226902
+3.788474563955 15.49634706718 -0.8462544747933
+2.989936277369 16.04377735682 -0.7965890483407
+3.058206119875 16.01443479691 -0.8017603582114
+0.7808788720411 14.74250450171 -3.3934e-14
+4.8279 13.67011411477 -0.07981134053903
+4.690297965872 16.2029646987 -0.265317901535
+4.701535019266 16.27593108526 -0.2775053613295
+4.750552571892 16.23245512627 -0.2678418321401
+4.8279 15.8075982785 -0.1634040595597
+2.808483490972 14.00933199762 -3.36738e-14
+2.136862211916 16.30346146923 0
+0.1955085000488 15.4340324323 -0.5135310313648
+4.150977773319 17.51157155416 -0.5377700941361
+4.074166491303 17.50228100857 -0.5394128142239
+4.077433931321 17.55259229377 -0.5305460594363
+0.7137424749147 15.2688720208 -3.3934e-14
+2.423161986787 15.13809977894 -3.3934e-14
+2.37951416224 15.19600737332 -3.3934e-14
+2.856835371932 15.20295273504 -1.864420111047
+2.87171050485 15.26716654615 -1.840019691392
+2.889099714899 15.20664931938 -1.788734939031
+1.592884139176 12.67622641661 -1.775274650758
+1.600764220521 12.68311995863 -1.725481373641
+0.1909554038731 15.43105251213 -0.5907130305552
+0.1441207738639 15.42754371647 -0.6088222366339
+4.612250464691 13.84748968362 -0.2954177089486
+4.547092932196 13.85209765732 -0.3039058623037
+1.932521941064 16.34819596471 -0.05106339231483
+3.648044770119 15.42082136446 -0.9202871602723
+3.692973779103 15.41435747358 -0.8892615137162
+3.628352948745 15.35349458384 -0.9218440728022
+4.244663312447 15.93622952841 -3.3934e-14
+1.624817171394 14.4010476113 -3.368933610007e-14
+7.78e-18 15.01928209662 -1.696444812915
+7.78e-18 15.08654124306 -1.700329013627
+2.923140895737 16.7075715231 0
+1.802965039662 15.45531448621 -1.183125790857
+1.762683727875 15.44072901746 -1.212503131509
+3.707657026032 13.99928443459 -3.3934e-14
+3.151966761452 14.13225325147 -2.202346678532
+1.674443918693 13.83052042399 -2.438694968943
+1.615825857579 13.87573154453 -2.446660388518
+1.671876831458 13.88675317169 -2.448608068603
+7.78e-18 15.25049984765 -1.724158259473
+1.468367058605 15.36129948861 -1.506089206883
+1.669762112449 15.36678975292 -1.460006333803
+7.78e-18 15.08525457196 -2.390415375137
+7.78e-18 15.14272246054 -2.463075123369
+7.78e-18 15.14163129558 -2.381491242197
+0.05935661474242 14.6644669914 -0.7747497738768
+1.899562836384 13.72208508619 -3.36738e-14
+2.547794206466 16.81780950252 0
+4.174385126827 14.00975515737 -0.4175230720102
+0.6471862447154 15.48134629571 -1.099431500644
+0.6023680668207 15.46772387476 -1.127600910168
+4.8279 14.64420648053 -0.779035452778
+4.8279 14.62175342332 -0.8239067889617
+4.8279 14.68998603596 -0.8275620318783
+3.247944525209 16.36755200151 0
+1.2447660197 14.08215310566 -0.215884291825
+1.27525450475 14.00211216536 -0.2154642628682
+1.277954363617 13.886616173 -1.747351798565
+1.291370776822 13.83865300642 -1.771471004906
+1.302277132353 13.79841489411 -1.742504825627
+4.8279 15.66413131624 -0.0310478836383
+4.794128818127 15.73734709809 -1.162734664848e-14
+3.285656026001 14.02724063515 -0.9897596184964
+3.25751 14.0507 -1.02383
+4.266253053193 15.74820796675 -3.3934e-14
+0.627507402242 14.57442778435 -1.370827574309
+1.753731324503 14.67854208794 -2.588224488764
+1.745338857676 14.73953414957 -2.598976104758
+2.128935018039 12.79323699587 -0.4138524432823
+2.197916744504 12.79724347304 -0.4125059948901
+2.171592218949 12.79483083176 -0.3611730877524
+2.163502511335 12.79171790527 -0.4585385648269
+3.898025570445 16.04476996557 -0.411022347466
+3.918949453248 15.98414120422 -0.3923448723085
+4.385002767358 15.4227580146 -3.3934e-14
+1.021923086939 14.48016331693 -3.3934e-14
+1.065910147984 14.44006128368 -3.3934e-14
+1.874722182583 13.97394361186 -3.36738e-14
+3.383943860687 16.51828935463 -0.7129177169462
+4.272985487564 15.4026208358 -0.6293885367873
+3.129298932451 16.04421074769 -0.7965100261146
+3.183141494427 16.01082328675 -0.8023956797652
+3.299229165781 15.06160032288 -1.682780522486
+3.252980260733 15.05704340172 -1.7085801486
+3.238971578421 15.06705406439 -1.651816271682
+2.87769028726 14.13477375632 -1.636133175302
+2.859906780069 14.0964410161 -1.672988109342
+3.912060220073 16.37115077297 -3.3934e-14
+3.108147293172 13.45855808456 -1.092334905969
+2.414393772943 12.97308320385 -0.5181780997747
+3.694583945933 14.97939991846 -3.3934e-14
+3.709054102199 14.92826218644 -3.3934e-14
+3.768424017319 14.94980671962 -3.3934e-14
+3.740365796929 15.00639019778 -3.3934e-14
+4.257187236238 14.37311179906 -0.8364271280146
+2.587106277232 17.0375859756 -0.1480164760509
+2.4279 13.12382047931 -0.7179159066857
+2.4279 13.16578220144 -0.6807339822357
+4.665181602736 15.70203924042 -0.1783613929602
+4.638322583676 15.75295647811 -0.188929895975
+0.5670136576849 15.23175173752 -2.496736822977
+0.6185002146742 15.22814881248 -2.518281876253
+3.440520485571 14.86213775331 -1.730114853003
+3.438731579247 14.8084232582 -1.723518668228
+2.233182010517 14.87198857988 -2.622339471309
+2.276464107817 14.84045006042 -2.616776196116
+2.22926186195 14.80814701668 -2.611079395037
+1.505161660845 12.84376227095 -2.264703513753
+3.429503597907 15.98840107887 -0.6465795598465
+2.979556591804 16.59345653419 -0.6996660096647
+2.25486073111 16.69922323275 -0.6810112904932
+2.27320041489 16.73028016827 -0.633745097152
+1.256763461905 14.41228251153 -2.541277493094
+1.17770288066 14.4139809186 -2.541570849879
+1.243953417696 14.46339774973 -2.550282659162
+2.718671061748 17.14300430163 -0.01874381089968
+2.77726545377 17.1143616331 0
+2.899935708661 15.40560068384 -1.294611806418
+3.740509021287 15.60057647937 -0.4114315282481
+0.7030673295711 15.18584361537 -3.3934e-14
+3.913694558441 16.74133956018 -3.3934e-14
+3.887826974933 17.71971453296 -0.2225732710675
+1.439036953349 15.64349748991 -0.9606978998932
+2.390527631293 12.87784357319 -1.12027060489
+2.375017019185 12.8598843188 -1.061629761368
+0.6390072475999 14.45765182919 -2.26874630795
+0.5897733431977 14.46982066117 -2.284771110611
+2.373661953017 16.77880174994 0
+4.230241920163 16.7732424172 -3.3934e-14
+4.165799263522 16.72825706625 -3.3934e-14
+2.259543500542 14.01017454675 -2.470375356211
+0.08323910276056 14.66744124566 -0.7165572038542
+3.213083543743 14.61311787527 -2.277410307553
+3.200947577426 14.63392193178 -2.359561121882
+3.208112685008 14.66980237872 -2.318941971458
+3.220460738676 14.67611831716 -2.25205334048
+2.031418795166 12.7868672751 -0.5786275984733
+2.062307223532 12.78397017706 -0.6377595652299
+2.112677472933 12.78564881773 -0.6038324887253
+2.078187184316 12.7892028796 -0.5233438398965
+1.928191448432 12.75684048919 -1.049319835566
+1.991420077488 12.7543253477 -1.079580250398
+1.984150102414 12.76054980258 -1.003277745305
+2.167179775845 16.10750422888 -3.3934e-14
+-4.505156422071e-15 14.73771019082 -0.05285612763251
+-4.503579844803e-15 14.73745286312 -0.1113382941721
+4.405979496036 15.36030281999 -0.5898524483676
+4.365706488284 15.39944149624 -0.6056441494218
+2.788546602067 16.62803827377 -0.6935705566019
+2.750555057874 16.57880101893 -0.7022490135754
+2.707474029981 16.64530381512 -0.6905247416459
+2.670087106119 13.44061836938 -2.765361675508e-16
+1.192543144421 15.28781286104 -2.126304861657
+1.697725995713 13.70203410012 -3.36738e-14
+1.624105747383 13.69068492357 -3.36738e-14
+0.4547780668852 15.46918335356 -0.4895503633916
+0.4204169105805 15.46490456646 -0.4320582893296
+2.418333624894 12.81802042646 -2.18216651232
+2.421470672426 12.84325492273 -2.127549931239
+1.494909907657 13.57991723325 -3.367391516071e-14
+1.337202107732 13.00431752014 -0.2180801604484
+4.657637954271 14.8094892217 -3.3934e-14
+4.390814473487 16.71867896025 -3.3934e-14
+4.439564152363 16.69374040089 -3.3934e-14
+4.430174586388 16.75406435425 -3.3934e-14
+1.3285 13.07066460806 -2.013043174215
+1.3285 13.07642997218 -1.959475618781
+3.014263529497 16.11311237713 -0.7843685971885
+1.876665796504 15.52511299644 -3.3934e-14
+3.598722804704 13.90492134489 -0.6922991245375
+3.115988012868 17.36906317483 0
+1.922475007093 14.00757215569 -3.36738e-14
+3.225992642568 17.45970094679 -0.2580831400984
+3.311047221828 17.5023884586 -0.2367347871993
+3.252493237179 17.4724385813 -0.3010811085917
+0.0329934908 14.56006925721 -1.911316166883
+0.05162731312152 14.57045654433 -1.830116834898
+2.230771622784 16.37118019379 0
+1.742612647724 13.40401551976 -2.363488814621
+7.78e-18 15.08509679678 -1.110441550126
+2.838648338844 15.01854621713 -1.92716504089
+2.822160448781 15.08741966737 -1.936475977311
+2.844013451302 15.08150650467 -1.875901810605
+3.867880532042 14.62624676502 -1.227524345711
+4.216817448065 17.16154503848 -0.5053888627595
+4.160002946983 17.10639425714 -0.5105522647594
+1.754547755423 15.3569886777 -1.54962509914
+1.784313505883 15.3509430772 -1.607865532463
+3.982676986203 14.77599870407 -1.176963180445
+4.0384989145 14.79744043938 -1.14802190732
+2.956256486412 16.07457528829 0
+3.465329716596 13.5385088696 -0.3644313829547
+3.403765787274 13.5148412698 -0.7783597994486
+2.74851080281 14.62904720659 -3.390895348756e-14
+2.955524542116 15.82164501796 0
+2.925884083446 15.78007414647 0
+2.998561636116 14.42945839556 -3.36738e-14
+2.866739773706 15.06795484367 -1.81689659356
+2.922774910555 15.03515881984 -1.832757728753
+3.300392911024 14.30086688187 -1.246375100692
+1.085707681257 14.65688211886 -3.3934e-14
+1.99352357565 12.62547138678 -2.10592318298
+2.071373284294 12.62072056603 -2.134402267848
+2.083060009718 12.63032306453 -2.076493765563
+2.022784593492 12.61478396464 -2.168841751809
+3.116903252987 13.49739418505 -0.41696971641
+1.100067135615 14.10678329006 -2.466692855626
+1.105244583338 14.10935443095 -2.41335431004
+1.177431545252 15.36257125996 -1.493026368721
+1.125926585272 15.36396019327 -1.479077058938
+3.085360314901 13.80735882495 -3.36738e-14
+3.102544188653 13.86198524049 -3.36738e-14
+1.191555833698 14.09574112479 -1.614160657734
+1.200006534773 14.09028624073 -1.535443425172
+1.169969370231 14.13708723613 -1.568104732298
+1.219903229515 14.0477571848 -1.579655712448
+0.3963474486067 15.33095414029 -1.788517579782
+0.3495776666786 15.33401348493 -1.762342799896
+3.515671384168 16.52946567642 -3.3934e-14
+3.091646379217 15.0595703415 -1.21753227985e-14
+3.1148117776 15.14212731886 -1.827277516563e-14
+2.33275813698 13.2960008377 -2.344438506754
+0.9003253985219 15.35230231006 -1.594748114953
+1.068287256543 15.67037561102 -0.3840165734366
+1.130678678536 15.70207107493 -0.3388826520781
+1.037264382868 15.65695647899 -0.3454088182004
+3.980983727818 17.74492969729 -0.1686629026041
+2.206158560325 16.66762811361 -0.1754685062032
+2.219031468442 16.68243828799 -0.1244321503252
+1.3285 13.02024318915 -1.338377562554
+1.334647486718 12.94904487825 -1.347295525974
+4.071976014223 14.69641475716 -3.3934e-14
+4.030195954365 14.66572751836 -3.3934e-14
+3.784692571772 17.39838483781 -0.5577330728008
+3.733447593773 17.37810059259 -0.5613087849464
+2.73915807619 13.65043617903 -2.010072925819
+2.732640101142 13.71029413725 -2.061108308856
+2.829747310951 15.31160846138 0
+2.856399400986 16.34394937102 0
+2.906963235553 16.29306865103 0
+2.934510998618 16.33915844959 0
+0.9755049723027 15.2051197618 -2.653549074756
+2.001956424178 12.78362493541 -0.6447372586117
+3.349742208135 14.34239182268 -1.010775716271
+3.356861974804 14.3324716558 -1.066973219033
+3.025844341726 14.1648139677 -2.017760099649
+3.437605007702 17.55832558877 -0.350283357858
+3.510076188585 17.58916690858 -0.320317999713
+3.440068109498 17.56051269614 -0.2828238541992
+0.6840895036408 15.21333476125 -2.606144288687
+0.6551637696937 15.20600490058 -2.648477489687
+2.155021701765 12.79634461242 -0.3046409492164
+0.6709044368976 14.94502635916 -2.635211677048
+3.494879026011 17.58398240625 -0.2576009817623
+1.472821572756 15.7395273769 -3.3934e-14
+1.483356468046 15.802613165 -3.3934e-14
+2.782662181198 14.08517569156 -2.469685957361
+2.854410797209 14.09282380167 -2.48493853727
+4.7038681129 16.11740090322 -3.3934e-14
+4.667790085735 16.02849840233 -3.3934e-14
+2.27817418427 12.75264788071 -1.33309068085
+3.737335639081 15.26543443492 -0.8356237187778
+3.817378722512 15.25016739295 -0.7868693256792
+3.768208126242 15.21841734416 -0.8085586018988
+3.828065704847 15.20746067786 -0.8556246292834
+3.757634042036 15.20515465538 -0.868629623768
+3.903102220966 15.72065981532 -0.351909943289
+3.850029312708 15.67863496845 -0.3664756519252
+3.799989245525 16.44038332153 -3.3934e-14
+3.848411321397 16.37696237476 -3.3934e-14
+3.913491875786 13.81926248267 -3.3934e-14
+2.811663188156 13.444794035 -0.6686326388304
+1.561272257421 12.72892105623 -1.378799339073
+3.946130065415 14.40876464334 -0.6342503686365
+2.486978164397 16.56216621325 -0.7051800884573
+2.47438701292 16.49162143133 -0.7176270484641
+0.006614647480553 15.30704973962 -1.983476766171
+7.78e-18 15.29944540241 -1.917822763133
+4.564545369606 16.35891984486 -0.3028878033113
+1.927283493089e-07 15.3434992139 -0.6062131484567
+0.01377719928641 15.42305534715 -0.6124993904062
+3.164564402296 15.04835115754 -1.75808528187
+3.192109876071 16.3722975115 -0.7386634736087
+2.424684196737 13.18980419745 -3.36738e-14
+2.357679388936 13.24810214964 -3.36738e-14
+2.036209334956 13.2714405968 -2.340114426911
+2.049262820651 13.3385111462 -2.351937704138
+2.094962370558 13.2740864834 -2.340578936388
+2.168887841852 14.7603551643 -3.3934e-14
+2.154507380174 14.83483240602 -3.3934e-14
+2.113432674064 14.79956226202 -3.3934e-14
+0.7693754600606 14.37141735934 -2.464980980983
+0.7491412047135 14.39290865988 -2.395270052201
+0.8373559945249 14.33692982553 -2.447734932896
+2.556453289803 15.12518696485 -2.666973386151
+2.607965262539 15.11757850934 -2.665628313733
+2.588589500171 15.06190696314 -2.655814516917
+2.640286871699 15.07188806724 -2.657580378803
+4.273104799826 15.59771448401 -3.3934e-14
+4.239621322564 15.6778975218 -3.3934e-14
+4.213527247155 15.6256014667 -3.3934e-14
+4.166517937561 15.66032758025 -3.3934e-14
+3.673544478782 13.55349601692 -0.5024669218011
+2.238833676022 16.63038066602 0
+2.435584174025 13.39844800936 -0.2079770928573
+3.35768645953 15.63942435167 0
+3.382046448587 15.56324744325 0
+1.511959267098 13.71986218353 -3.368914497235e-14
+3.691360702546 13.97587124453 -0.6415657595466
+3.684468697712 13.90807670749 -0.6341750927822
+1.283724887618 13.97991491118 -0.01384973463119
+1.314654738126 13.84397342597 -0.001968589047698
+1.741298413813 15.25220610598 -2.368263556489
+1.744051436505 15.26226493776 -2.302756648464
+1.784249050355 15.25678110876 -2.338452861106
+3.899421312913 14.35295826987 -0.9507109903834
+3.950436323679 14.35609013602 -0.9329454049324
+3.903860883689 14.36231399334 -0.8976005715838
+0.3126393924883 15.21284716664 -2.608919037175
+0.2845612193548 15.22025340166 -2.565548074313
+3.292156536537 15.19828588825 -3.3934e-14
+3.267131101453 15.13336912668 -2.8931293489e-14
+1.787168146336 15.63050517649 -3.3934e-14
+1.838126854228 15.61897678193 -3.3934e-14
+2.961245706804 14.9704040864 -2.199910452228
+2.047033160295 12.76952114891 -0.882898202146
+2.038042199677 12.77454348262 -0.8055982537109
+2.067688402795 13.75672290786 -3.36738e-14
+3.751194797747 13.98345302385 -0.6060306333154
+3.76697350065 14.03433970444 -0.6055935095949
+2.4279 13.06073320382 -1.379926180998
+1.333128212947 15.31510688437 -3.3934e-14
+2.686546776643 16.22466992699 -0.7646877765193
+4.330070374554 13.7914358917 -0.3343190095505
+2.371525852204 16.05348279912 -0.7948690416849
+1.817362012281 14.63066817139 -2.579778338171
+1.852480127473 14.55979593019 -2.567290056248
+1.482092564557 13.91924219979 -2.454338790003
+1.43134198854 13.88214153198 -2.447801124198
+1.431773837363 13.94522738978 -2.458921412179
+1.448805822112 13.99860840052 -2.468333320519
+2.395163696848 12.88033858974 -1.170040901851
+2.655479738565 17.08736356966 -0.4693928297992
+3.564649512846 17.40946496615 -0.5557794396846
+3.547043359844 17.46103784887 -0.5466881835171
+4.8279 14.66064038959 -0.04217706078742
+1.231818062383 14.06343982882 -1.158833380772
+1.239431093657 14.04301529989 -1.209084112317
+3.923125921208 16.48331399876 -3.3934e-14
+1.689319087988 15.29961925646 -2.039544632541
+0.9520881133574 15.23019455145 -2.505783826905
+0.9654252610913 15.22225948226 -2.553359643326
+0.5218480005078 14.57307823785 -1.648345107143
+0.4506283736792 14.58027651264 -1.678544322907
+2.904197516194 16.09862803806 0
+2.687790158831 15.21513065924 -2.595871758947
+2.704339472046 15.17517377301 -2.529619849856
+2.700844548654 15.14164843233 -2.584805135764
+2.69946571301 15.15652150144 -2.647721503787
+2.035607002345 13.88934720591 -2.449067652737
+1.958894749334 13.85524000792 -2.443051684758
+1.958314544001 13.91928772909 -2.454345566954
+3.674928608278 16.05328388263 -3.3934e-14
+4.324047280458 13.6244794031 -0.3064816013436
+4.236786424878 13.59534327492 -0.3197522568078
+2.211121627534 12.80572034321 -0.1368424666971
+2.216000154365 12.80731922405 -0.05202595419987
+2.176154566328 12.79962049948 -0.09215259233113
+3.737441357397 15.51823978266 -0.8781334223848
+1.626262234136 13.50778675592 -3.385959349532e-14
+7.78e-18 14.78612456653 -0.7087280864491
+-1.892965102639e-15 14.83851264406 -0.7080331481411
+7.78e-18 14.8440966711 -0.7753935508786
+7.78e-18 14.7719125803 -0.7612990983996
+3.935365251557 15.50860052032 -3.3934e-14
+3.332410741115 17.04806832499 -1.016101373673e-14
+3.34505888054 15.00442336066 -3.3934e-14
+4.736570060149 16.33154946002 -0.2855927324029
+4.756146002097 16.28376789239 -0.2767738788248
+4.345295827016 15.13342405804 -3.3934e-14
+4.734356770537 15.85221590666 -3.220673649128e-14
+2.975596858228 14.98856738598 -3.3934e-14
+2.918374328161 14.97043613138 -3.3934e-14
+0.5194604368492 14.66603183943 -0.1059573001394
+0.5715770592405 14.65335449744 -0.1105637719299
+1.092901255972 14.15241324278 -2.241593998547
+3.487637337775 16.16555898536 -0.6400497678947
+3.021292422769 15.97162323851 0
+3.962057969982 14.28433922231 -3.3934e-14
+3.887172600332 14.28260586952 -3.3934e-14
+4.368347298266 15.45277252378 -0.6144695305926
+4.424126367579 15.47679515714 -0.6064095912428
+1.3285 13.27748562186 -0.4450227519711
+2.4279 13.17264975039 -0.1228466907122
+4.329956059236 13.60254138946 -0.08454133357432
+4.377457443791 13.6042811802 -0.05548384199691
+3.708120078764 15.0083172615 -1.427693084084
+3.103736130834 15.37800934313 0
+3.300069324029 14.31031741938 -1.192705365593
+2.848489915787 16.60961976617 -0.6968167894112
+4.170653267689 17.55302803317 -3.3934e-14
+4.207049884463 17.61520499085 -3.3934e-14
+4.050396984105 16.94568523371 -3.3934e-14
+3.05566149785 14.18934822634 -1.312317652725
+3.010243230522 14.17800088452 -1.382944801181
+2.641505050456 16.39936620949 -0.7338923958486
+2.686017205964 16.36927595003 -0.7391960596693
+1.3285 13.53981537705 -0.7424478080224
+1.3285 13.50690570529 -0.6730265786621
+1.113358231757 14.11699004618 -2.301462066375
+1.121799996786 14.09507439216 -2.364360270065
+1.16292455396 14.0484412442 -2.300331530684
+2.364598630038 13.15880247382 -2.320254709528
+2.4279 13.14744895866 -2.294537533303
+2.399553317711 12.84617722317 -1.553897747177
+2.413103096572 12.88905534514 -1.508932244625
+0.8739115216256 14.4765692209 -1.153396189937
+0.8234856250603 14.51108774304 -1.100726464432
+1.641743226822 14.89738106028 -3.3934e-14
+1.631045791841 14.97847637347 -3.3934e-14
+1.3285 13.36518399865 -0.00259876669749
+1.3285 13.32887597395 -0.08612708195167
+2.048383601912 15.23103928671 -3.3934e-14
+2.046840461438 15.31749124185 -3.3934e-14
+1.997499339023 15.29100173456 -3.3934e-14
+2.878293060425 15.91955230577 -0.8227087965375
+2.936508621834 15.88429642682 -0.8314271158946
+2.939409789694 15.93955488818 -0.8178010943276
+2.931454727655 15.82086933485 -0.8571078448635
+2.978513430362 15.36010544659 -1.518148979491
+2.920286003186 15.36698909429 -1.459222525267
+0.5715928443164 15.47195431446 -0.963618667096
+0.2117104131384 15.33128844744 -1.786008006544
+3.08441229108 17.38175160007 -0.3062841270325
+2.648024941787 16.58809246941 0
+1.946700847833 13.53435603741 -2.386475611351
+0.2529683997722 14.46254905929 -2.550134491261
+7.78e-18 14.65314910256 -1.224145694911
+7.78e-18 14.71605122574 -1.178503622748
+7.78e-18 14.6971544156 -1.253572785066
+2.271231044639 15.7715594322 -0.8788821235699
+2.353251070584 15.74710513787 -0.8921607939197
+2.310548622571 15.69811085791 -0.9206838248312
+3.627578070488 15.54238186994 -1.079117757422e-14
+3.302182557854 13.91457496565 -3.36738e-14
+3.244261364619 13.89748591247 -3.36738e-14
+4.280855227391 15.57423541304 -0.5605582934918
+2.471888779423 13.2945590079 -2.34418220764
+2.417267736836 13.23572157254 -2.333805470846
+4.092045503585 17.06317407737 -3.3934e-14
+4.14497011671 17.06414398751 -3.3934e-14
+4.138353880407 17.1151508304 -3.3934e-14
+0.05842650053777 15.36610436656 -1.461489179672
+0.05965879305506 15.35155753724 -1.602409364501
+3.528333599056 14.33306058686 -3.38066442784e-14
+3.820483387233 16.1593774131 -0.4635284329054
+3.818440127064 16.2156410045 -0.474302093136
+3.426145880478 14.52468886179 -1.69399918959
+4.437907525066 16.19871894613 -3.3934e-14
+4.432556385762 16.12441548988 -3.3934e-14
+4.49197524134 16.12074100329 -3.3934e-14
+0.6715316827915 14.79643002649 -3.3934e-14
+0.7238779791819 14.8002313951 -3.3934e-14
+2.427901201706 13.30146045437 -0.01049208398521
+2.892877692563 14.10326473226 -2.3668350228
+0.656046328418 15.23488821589 -2.477380706044
+0.6707257528331 15.24802767474 -2.39508905633
+3.291034351667 15.98714746427 -0.7446999225205
+2.49429959023 15.25890768822 -3.3934e-14
+2.159681902945 16.5169933523 -0.7131500269133
+1.569463816762 14.88933638993 -2.625395808837
+1.579809126294 14.83804296247 -2.616345343801
+1.516382390787 14.887838057 -2.625132632189
+3.846818767652 13.56933669225 -0.4389572245998
+3.754241975839 13.56191812343 -0.452419659656
+2.652859589155 17.03832529441 0
+2.706622692171 17.02822212243 0
+2.680677114744 17.09868155338 0
+2.391210103153 15.33115706124 -1.786759102507
+2.467512166557 15.32703204271 -1.822276013335
+1.359494805571 15.22049724269 -2.563746320741
+2.962906705891 16.25516780615 -0.7593224053136
+1.106471279101 14.22941845513 -1.541369127405
+1.146343328945 14.17798965438 -1.517268088828
+2.711070903554 13.33599248159 -2.165567195063
+3.717972435305 17.66622220562 -0.329573953016
+2.979279741699 15.68594965191 -0.9288253806328
+2.62865039554 13.82135525476 -2.437077986134
+2.565982408093 13.80469372533 -2.434144395036
+2.64397882998 13.87866151769 -2.447190856064
+1.513821399187 14.13317013464 -3.36738e-14
+4.469581416561 14.91246681105 -3.3934e-14
+4.148855441897 16.56404016172 -0.4182248803974
+2.109084937162 14.04658267525 -2.476784248412
+2.060395311574 14.07481216872 -2.481769711921
+1.035858182224 15.33785416958 -3.3934e-14
+1.039606780014 15.28407946891 -3.3934e-14
+4.535150466033 15.63300559953 -3.3934e-14
+3.377383862436 14.48394637064 -1.774482854121
+1.551341702153 12.68994374681 -1.715489494809
+1.541139334639 12.68492390854 -1.7673263501
+4.605599508893 14.29911973264 -0.3758306284429
+4.591999817168 14.36370416037 -0.3888250922395
+2.803149107773 15.7092458651 -0.9132773431153
+0.4458759581996 14.55393915532 -1.898734621928
+0.4372190397579 14.54724389582 -1.958769140818
+0.385010909041 14.55773858067 -1.907526522363
+2.621792666802 16.6746480324 0
+1.3285 13.37503577458 -1.727693531791
+1.3285 13.42844502928 -1.738151017894
+3.064670338262 17.36901160053 -0.3758589835658
+3.005896134699 17.33392554303 -0.3776604606827
+4.112534571508 14.38966116429 -0.7426782394271
+1.448792573297 15.37786004913 -1.392144086377
+4.479624397192 13.60728613641 -0.0213184463588
+4.426370415605 13.6058585777 -0.03191713490709
+4.475704556983 13.60680360987 -0.1043588101591
+2.083458267617 15.3181380076 -1.895205046485
+2.129154709893 15.31424521651 -1.926500125668
+2.084470571064 15.31000826813 -1.959710024972
+4.660976875639 15.25733258474 -0.5727409474757
+4.635489432223 15.31526919978 -0.5477285209897
+4.662028420861 15.36565774541 -0.5546795625573
+4.03695849512 15.59448119403 -0.4461247557754
+3.963240112394 15.59510243642 -0.4424386699961
+3.983476208843 15.60582181542 -0.3817739733616
+0.8352518255143 15.56518093161 -0.658330570195
+0.7863362500531 15.54997194664 -0.6191121375748
+0.8325271112846 14.51198211738 -1.013331488124
+0.8883347020536 14.47697617189 -1.024745253905
+0.8446277919729 14.50947800565 -0.9415829096064
+0.1671781961435 15.43541627951 -0.4130064808229
+3.979959893962 14.90090093984 -1.20064568034
+4.00977644325 14.84888593724 -1.173617394155
+3.933027370023 14.86807910423 -1.224771528029
+4.68987966697 15.22179526708 -0.7744170835429
+4.627006316371 15.22989523852 -0.7281824784733
+3.523890945584 14.4677020528 -1.53905603734
+3.555003480152 14.52770059345 -1.509560623698
+3.56907310929 14.48489650838 -1.484620689342
+4.732571488522 13.63691458844 -4.394610275185e-10
+4.776060808977 13.6741105872 -1.760871980159e-14
+4.728475652494 13.70589920465 -2.631760474716e-11
+4.690938159617 13.66751473063 -4.033802710452e-11
+2.673417799957 13.43661946683 -0.3136025630812
+3.784603305694 14.77269209389 -3.3934e-14
+3.739341180282 14.75062895793 -3.3934e-14
+0.4874578773375 14.72115522842 -5.657495360364e-14
+0.7086659032543 14.58592081734 -0.8332784083588
+4.100890949507 15.97181388394 -3.3934e-14
+3.044272552472 16.75091698849 -0.6719011349992
+3.096157431405 16.7289919432 -0.6757608499902
+3.053408442854 16.70137945299 -0.6806311994319
+2.527045654408 13.41590668627 -0.04235521526773
+3.993043628597 16.35462910866 -0.4309567431199
+3.989953247079 16.4059059614 -0.4404210095073
+4.035936718456 16.38914301445 -0.4221737523821
+1.609913267779 13.88659471055 -3.36738e-14
+1.551652508051 13.90353875506 -3.36738e-14
+1.562780590624 13.84733401247 -3.36738e-14
+2.256867219065 15.10688237735 -2.6637462065
+4.655967418731 17.84197677624 -0.3564918443942
+1.812670962448 15.3848959295 -1.361814686612
+1.856063249271 15.37354048002 -1.418875800961
+4.267870563908 14.20372381703 -0.4234178130595
+4.819714906363 13.61172629137 -0.04862368367854
+1.3285 13.22956713702 -0.2741007476353
+0.9846400220485 15.35466102788 -3.3934e-14
+0.511336433008 15.15580209746 -2.672379247826
+2.861843293444 13.43370364234 -0.9755192060716
+4.147923537252 14.20776774963 -0.4610010155066
+4.114189480423 14.24085575705 -0.4792077952623
+4.199750900524 14.25243995058 -0.4523369311221
+2.925322945443 15.70651945137 0
+4.684053599655 16.98212225552 -0.4030780053638
+1.692808844337 15.21636089496 -2.588847613572
+1.741798472382 15.21138281248 -2.617523108194
+1.594929310281 15.32857900022 -1.809321738071
+3.20231184228 14.75310005449 -2.370156318586
+3.195156161327 14.78474064451 -2.437470141291
+2.986196126819 15.29404989274 -1.612972001322
+3.017489474299 15.31280232112 -1.563107151479
+2.463437837174 13.34525541033 -1.262245479898
+3.163285296433 15.10316687495 -1.469443430513e-14
+3.194037804183 15.17492254571 -2.966355194334e-14
+3.163707198501 15.48795966568 -1.050196521596
+3.967452695686 16.00173723659 -0.3771533935048
+4.788833219749 13.61183848487 -0.001190173468318
+2.398906861142 15.66027924962 -0.9477261223751
+2.360646277445 15.68838503622 -0.9277232919799
+2.407031959817 15.70671651302 -0.9148296439868
+4.8279 13.97648097227 -0.07219334367618
+4.824915413426 13.95788335752 -1.02498695263e-15
+4.271944342941 14.45546414956 -3.3934e-14
+4.205429413784 14.4409625346 -3.3934e-14
+1.576923573433 13.56557564217 -2.391975676722
+1.629132238036 13.59462237654 -2.39709285838
+0.9351603964027 15.18504922518 -3.3934e-14
+0.2408913285989 14.48176944783 -2.43485919071
+0.2057430449109 14.48896614358 -2.391525894702
+0.159996861354 14.48288765325 -2.42768713335
+1.718133230366 15.33839668814 -1.723961055123
+1.694751527615 15.33157323624 -1.783475742575
+2.876212750007 14.8588764411 -2.62002084312
+1.66002763139 14.74874510503 -2.60060417044
+1.700318116896 14.78222458217 -2.606507518463
+4.118076870608 14.36210461717 -3.3934e-14
+2.261895873947 13.62916406098 -3.36738e-14
+2.288404812238 13.69088815616 -3.36738e-14
+4.659416830659 13.70845503593 -3.313655717715e-14
+2.27848181313 15.96929422275 -0.8105075810502
+2.4279 12.91038480807 -2.162815752467
+2.4279 12.96252155914 -2.178235782603
+2.534029473114 16.31651486312 0
+2.524026785695 16.4038359807 0
+2.471267666285 16.34300346636 0
+1.78245088309 15.3138003406 -1.930136494302
+0.7204593764156 15.53905758038 -0.2647573851753
+1.3285 13.39160758253 -1.124178268425
+1.3285 13.45232607993 -1.117737910169
+1.743655167351 13.35197455283 -3.3934e-14
+1.753867891488 13.29460425231 -3.3934e-14
+4.538164986958 16.08318291961 -3.3934e-14
+4.469251642174 16.06253925874 -3.3934e-14
+7.78e-18 15.14896134738 -1.324060914386
+1.936210546732 14.4598007217 -2.549658928526
+1.967601091377 14.40034945205 -2.53917096596
+1.625521806914 14.64419281612 -3.3934e-14
+1.547126435288 14.63738604254 -3.3934e-14
+1.348547286301 12.77408845201 -2.144341284837
+1.345455914983 12.77352461801 -2.217549911107
+1.383738951526 12.7125226973 -2.191145716523
+2.506861613106 15.41193525508 -1.276448059043
+2.545614102485 15.43800188762 -1.216416261514
+2.337599777213 12.86114706885 -0.1001930564639
+2.978914387289 16.866944509 -0.6514490433575
+1.558511394372 15.29996291557 -2.036701589338
+2.162699986065 13.75348072235 -3.36738e-14
+2.113643728628 13.7776849478 -3.36738e-14
+3.409983444729 15.12253215013 -1.337245483983
+3.341568616464 15.11943592246 -1.354616337054
+3.360341042556 15.12918743397 -1.299301838058
+7.78e-18 14.88727666898 -1.80927262644
+2.069173528639 16.20516241415 -2.753294482001e-14
+2.087049650785 16.25738886053 -1.958749552606e-15
+1.996277025065 16.2494885716 -2.29087622208e-15
+2.249579803113 15.3709522589 -1.434893127077
+2.210774771692 15.36141395941 -1.504746933163
+2.171284430033 15.37047735379 -1.43769036511
+3.213356369643 14.73687726622 -2.298056935855
+1.642243558294 15.96502172568 -6.595398296142e-15
+2.922727399854 13.55544956132 -1.434771669789
+2.956916688691 13.57427065669 -1.371522577996
+3.44203577228 15.17217891772 -1.055923351206
+3.46472536909 15.22524450651 -1.024792011181
+0.8123715960919 15.21566689864 -3.3934e-14
+0.7537934752339 15.18252615742 -3.3934e-14
+1.819742090943 16.20467486605 -0.7351670404503
+1.849348280405 16.2381779439 -0.692662076226
+1.869487162541 16.24829087373 -0.7605263450409
+1.884187187291 16.27641195268 -0.7212712445955
+1.208929161677 14.11607712291 -1.099573243835
+1.170519696142 14.18030662581 -1.100031511247
+1.213281369446 14.11148428849 -1.047436074857
+3.057155283869 14.3816038797 -3.36738e-14
+2.022489106103 15.33504411129 -1.753262196504
+1.303960096498 13.88421469248 -0.6881039641119
+3.597345230043 13.79583443822 -0.6740720874016
+3.559787723518 13.83682232962 -0.7087361483006
+2.76345028986 15.00164603719 -2.118365767994
+2.768754269805 15.06274011164 -2.10901805926
+1.431217332891 13.03384348331 -3.3934e-14
+1.371530880375 13.0793031421 -3.3934e-14
+1.376353636524 13.02249178966 -3.3934e-14
+3.101959286671 14.74295108434 -2.599582836655
+3.090833128725 14.79919977093 -2.609506430029
+4.434870753688 14.29967435927 -0.4009240709861
+4.376338880237 14.30253283647 -0.4139644428863
+3.134558137465 14.29029649401 -1.306085585275
+3.213800854765 14.2870281427 -1.324495551788
+3.158072753 14.29808673526 -1.261785566424
+1.304199136364 13.88630556345 -0.6252993625418
+1.293696475415 13.93008385492 -0.5814587173794
+3.834161244845 16.73392814942 -0.5590969697839
+0.6046568813774 14.64460433547 -0.1521238121678
+4.443135437116 16.42115571504 -0.3294740135243
+4.517880842959 16.42679735332 -0.3198171620003
+7.78e-18 14.76540581839 -2.495325705665
+8.836052685641e-16 14.67846054525 -2.510475731683
+2.4279 13.37675207633 -0.5297599794057
+0.5587724693465 14.65375064838 -0.3046742693638
+0.5627299986338 14.65156563234 -0.357639482145
+0.5381576161729 14.48696238853 -2.259034796734
+0.5490833437404 14.47485913197 -2.318650158283
+0.4964762493032 14.48847053272 -2.299017420183
+2.750412452112 14.09180944949 -2.432016223619
+2.415021752543 12.85709386938 -1.828929566927
+2.418983859442 12.86704702457 -1.896240301045
+2.426277956687 12.90885986668 -1.858293550168
+2.384941018531 16.40079020629 -0.733643076233
+2.326284104172 16.42203101192 -0.7298911708054
+2.040859506705 14.99976776624 -2.644854776096
+7.78e-18 14.8041732201 -1.84917151059
+4.559495431897 17.08746128525 -3.3934e-14
+4.589098160751 17.12963066828 -3.3934e-14
+4.525492146184 17.12781633761 -3.3934e-14
+2.974804995975 17.31319079702 -0.4409333970788
+1.419315367682 15.24793431484 -2.395645007406
+1.433777384114 15.26097444652 -2.311038865458
+0.180034349572 14.68442768802 -0.1256236201292
+3.207148630021 14.14628561213 -2.122933081787
+3.196798819257 14.13721877114 -2.174257812603
+3.211312846272 14.17237675117 -2.211363252115
+4.243855275498 17.8000867259 -0.1359639109753
+2.4279 13.31006955891 -0.6560911184126
+2.4279 13.30033932329 -0.5827243689048
+1.973568660908 13.92503059004 -3.36738e-14
+4.526077602096 16.16953783967 -3.3934e-14
+1.176953201069 13.99936999613 -2.450359607813
+1.181742963965 14.07148254339 -2.481175694633
+2.827849829313 15.01251414133 -3.184881276887e-14
+1.008545436355 14.39001943314 -0.8757608744765
+1.060951196483 14.3355851094 -0.9039586973942
+3.557643160186 16.71687178611 -3.3934e-14
+2.925248919579 16.92366061237 0
+2.982345708903 16.92999331969 0
+1.76913841271 12.97589038887 -2.287999524582
+1.716360686409 13.01748194717 -2.295327492323
+1.739201600694 15.11597820529 -2.665350676044
+1.74413409146 15.06467809017 -2.656301530342
+4.107830379181 15.85190749798 -3.3934e-14
+4.156327953976 15.82086924132 -3.3934e-14
+4.195151343589 15.86339138328 -3.3934e-14
+2.870696244523 16.16914944803 -0.7744805203014
+2.789693188882 16.14662853878 -0.7784612414646
+2.784969511609 16.20344647818 -0.7684378017572
+2.4279 13.17271247888 -2.114537165181
+2.4279 13.22351640497 -2.045658549622
+1.3285 13.35803893096 -0.6310846075446
+2.472714364146 13.25530497986 -2.007734349799
+4.74089870031 17.77368439371 -0.4915638909483
+1.3285 13.59949508346 -0.2971305347814
+1.3285 13.67738072072 -0.2938624013782
+1.372671824436 15.04612380461 -3.3934e-14
+0.341537192473 14.56317533442 -1.882594762841
+0.3965692005766 14.56345508579 -1.858585794147
+3.160817616587 15.4637500037 -1.168310974046
+3.346947222006 13.50911960774 -0.7695987006791
+0.8525167616091 15.58445511625 -0.1472588732941
+0.9026475451189 15.60302914949 -0.1531278225278
+2.758720819328 14.74707584666 -3.3934e-14
+1.941773954567 12.73760063986 -2.245979910176
+2.014936477513 12.74384597766 -2.247085644112
+3.944387172183 17.5985503269 -0.5224397333493
+3.969289978333 17.54329827646 -0.5321822534181
+-4.491047741451e-15 15.30085719751 -0.2529150636565
+4.8279 14.76310333395 -0.4858625480324
+4.8279 14.8231327756 -0.4792410910768
+3.320725698009 15.03339380043 -1.842909702515
+3.273443921317 17.17727468668 -6.857056670006e-15
+3.324526929141 17.16310886167 -1.254484154719e-14
+3.323754444168 17.22629438563 -2.302308373111e-14
+3.203589534161 17.44423199431 -0.4480217860236
+3.249627263943 17.46690179606 -0.4883966722299
+-4.428969249865e-15 15.02879499664 -0.4365497958045
+-4.578149756763e-15 15.02267672817 -0.3798491646599
+2.477081087273 16.66300695968 0
+3.063366728675 13.46752766489 -0.8917733246542
+3.801512144191 13.57089541354 -0.2414593274828
+3.747987048183 13.56554135089 -0.3011508239194
+3.810484977944 13.57030651844 -0.3035361281359
+1.708175025663 14.38893251548 -3.369119978872e-14
+0.5847524742 14.57441444149 -1.490014133999
+2.283072951668 12.82511035482 -0.09070340649784
+2.267946822016 12.81660738824 -0.1676993870717
+2.276235838169 12.81874015178 -0.2327111055795
+3.196797815883 13.72417001984 -3.36738e-14
+3.108080515982 16.67464568145 -0.6853509261488
+3.172326161561 16.66561708653 -0.6869461242905
+3.133538479032 16.62413868476 -0.6942595966365
+0.2862882033913 15.41183641921 -1.107842730809
+0.3401787990471 15.41710261069 -1.133039942384
+3.181938622951 15.01030200604 -1.973869064425
+3.245628349416 15.00367744729 -2.011468241739
+2.61058101544 14.40810096499 -2.540535088698
+2.614347896445 14.35728190468 -2.531577060656
+2.560825011432 14.37933278378 -2.535465486813
+7.78e-18 15.17612982259 -2.31656513442
+4.735766403892 16.50183083081 -0.3156376555031
+3.231081119749 14.62598793628 -2.193624515178
+3.234284159622 14.71255552568 -2.195948997243
+2.067879632532 14.2071579924 -2.505114099893
+-4.67051e-15 14.96808450735 -0.07549313823895
+3.465170485473 16.56705262345 -3.3934e-14
+3.412165404848 16.53308821879 -3.3934e-14
+3.462667787745 16.49554367948 -3.3934e-14
+7.78e-18 14.73855680686 -0.8806802758612
+-1.54531179049e-15 14.72616187841 -0.8128665788083
+3.998781826094 16.12522202814 -3.3934e-14
+4.084055784244 16.10253521547 -3.3934e-14
+3.716494423447 16.77000256744 -0.6195670461197
+3.678550830703 16.73875454565 -0.6332094876369
+4.284712250916 15.47621209337 -0.6391964434832
+4.320056727643 15.42931747118 -0.6213208826228
+1.111629663311e-07 15.34348437938 -0.2803672009467
+2.412972079127 16.45480602518 -0.7241210342745
+0.3930527540532 14.68054368554 -0.1881079833925
+0.4213099385325 14.67836441431 -0.2435083747951
+0.4803444901158 14.67051621088 -0.2225820465242
+3.757358230661 17.26238836173 -3.3934e-14
+0.2145764216122 15.31518377682 -1.918865276052
+0.4567983158701 14.99568507094 -5.793534173167e-14
+1.591897524842 14.46252395765 -3.381826979085e-14
+1.536758016747 14.48503653742 -3.386395199332e-14
+4.63149239668 17.51022313746 -3.3934e-14
+4.709700375649 17.46433355687 -3.3934e-14
+7.78e-18 15.07861764707 -1.96809954604
+3.000241179377 15.45944813474 -1.175699109196
+3.219052455389 16.43600495715 0
+1.66315514017 12.79994793542 -0.01264263489141
+1.635251496738 12.79976551336 -0.05693945165764
+0.2415577648471 15.23313258558 -2.488315650417
+0.2887040290586 15.23757892062 -2.460593229937
+0.2922888626157 15.22874898116 -2.514632603167
+0.1976355828094 15.35879129529 -1.530946327903
+1.049068959308 15.22893775537 -3.3934e-14
+1.028568950317 15.17688114157 -3.3934e-14
+4.504645657058 14.61189910121 -3.3934e-14
+1.640142949482 15.21662151514 -2.587366095725
+1.664453877727 15.22450494774 -2.540096006155
+3.870399091568 15.16399548068 -1.102121768905
+3.520689350367 14.30065254768 -0.8210454412608
+3.502531401362 14.23164581685 -0.8234857723174
+3.45969691461 14.27024954907 -0.8655874804917
+2.005658771413 13.96792111799 -2.462922482341
+4.530978898226 13.60812231561 -0.09167712311404
+3.907222273157 16.32837161656 -0.4577492375307
+3.840027708226 16.37180043567 -0.4927436063012
+1.3285 13.12028453051 -1.87299025369
+0.8374173095653 14.41986729353 -1.899075729039
+0.8183832818766 14.42398829702 -1.954088609677
+0.8663875869806 14.39674168482 -1.941092682888
+4.334016437923 16.05141322323 -3.3934e-14
+4.359921982804 16.10609734806 -3.3934e-14
+4.289867068233 16.13262317995 -3.3934e-14
+3.751267627004 13.56917407975 -0.02575042113283
+4.653716023009 16.59725682911 -0.3370511966902
+2.615809166703 14.81435122152 -2.612167712417
+2.667154398552 14.7974582797 -2.609189919223
+2.633658630706 14.7555764649 -2.601806241656
+3.731809555256 15.31988788641 -0.84863688463
+3.779284227402 15.31340303302 -0.819155353996
+2.57223214319 17.02222420158 -0.3529219512592
+7.78e-18 14.75693739791 -2.226261603917
+2.007124102891 14.88681047277 -3.3934e-14
+7.78e-18 14.72535542021 -1.679383979039
+7.78e-18 14.71289589093 -1.609713148758
+2.762992182115 15.06048770463 -2.802936244128e-14
+2.815724070988 16.8544588444 0
+2.880303883128 16.82694927879 0
+2.876726354332 16.88741128586 0
+4.446486723507 15.61203579746 -0.3465922411389
+4.39280588994 15.61498196465 -0.3297348227973
+4.423879283132 15.62757092021 -0.2582685881671
+2.836899811951 14.33226376523 -2.52716258299
+3.654401679374 17.17975093256 -3.3934e-14
+3.683061480286 17.24949879224 -3.3934e-14
+3.623023154054 17.29512277169 -1.327308872612e-14
+4.424959157704 14.6569491476 -3.3934e-14
+3.264490719933 15.15502933821 -1.205627840027
+3.319965069323 15.13899125478 -1.243880335994
+1.666794123629 13.65822825396 -3.36738e-14
+4.21495808354 17.29892260808 -0.5304663001071
+4.245517761293 17.21949749853 -0.5088713094879
+4.18364139817 17.22835728594 -0.5258166007141
+4.269780736909 17.27963190814 -0.5139057520702
+3.292895952977 14.65804960643 -1.994400820857
+3.270973594361 14.62413879676 -2.050851511166
+0.7496334949104 14.93632099438 -3.3934e-14
+3.989049106429 14.72730124238 -1.164576076692
+2.4279 13.13316075392 -1.681550439957
+3.28002921644 15.56046008384 -0.6781878344258
+3.355698087566 15.55945639997 -0.6444877974662
+4.67902722044 17.8462877281 -0.1041616320985
+1.334375506214 13.31003245313 -3.3934e-14
+2.02577747981 15.2134586243 -2.605444977913
+1.063826966581 15.656183361 -0.7278031457325
+1.023899474858 15.63559420209 -0.7740311184932
+3.081563510764 13.83761906324 -1.210934127292
+2.739522067049 16.23098546707 -0.7635759673819
+2.25865431522 14.62127132057 -2.578121974002
+0.914868776566 14.74152526414 -3.3934e-14
+3.523671608079 15.1249218124 -1.323680802638
+3.523189746574 15.11199757256 -1.39702724526
+3.472538779788 15.12356892541 -1.331402854835
+4.681180932331 14.3991141051 -0.6888873643047
+1.679224019974 15.93043834295 -0.8206596263172
+1.756444891539 15.97020704164 -0.810316397463
+1.229423171945 15.27442542481 -2.220144865456
+1.182617101744 15.2709030053 -2.244092696041
+1.885124770698 14.6193592953 -2.577786780273
+1.654361562134 15.2835444599 -2.156353894687
+1.587139005216 15.28292563426 -2.160864095419
+2.708499678447 13.77790510169 -2.281073957526
+2.709580115878 13.85370547484 -2.278629510808
+2.714555136779 13.83437482599 -2.21763824882
+1.189663280036 14.1804274724 -0.5472241453767
+1.354717222392 14.93200387712 -3.3934e-14
+0.4682607236259 15.4554885545 -0.8618706379198
+0.5255601570065 15.46549578466 -0.8950816743589
+2.049396115574 14.42725479069 -2.543916323365
+2.045838622107 14.35736395067 -2.531591633787
+4.773770683532 15.16442708557 -1.00838016619
+4.74969380513 15.11309274732 -0.9999461843336
+3.185501727818 13.91142167393 -3.36738e-14
+1.693271901794 16.09543957524 -0.1354167548093
+3.447283837978 15.52187970581 -0.8577576145344
+3.36530565215 15.51797609986 -0.8799811140418
+3.414916520852 15.53025014614 -0.8102341930933
+4.77884880089 17.52566257716 -0.4952523053895
+4.8279 17.49893010571 -0.4858489949255
+4.795571127909 17.4525715857 -0.4820020397878
+3.576200252516 15.76515068241 -0.5165429561949
+3.543446219488 15.81534368756 -0.5445525443242
+1.31755795019 15.80214750591 -0.5262420133461
+1.320002264225 15.80505079981 -0.4669148130516
+3.565755384608 17.60648486766 -0.5199399487135
+3.608205319298 17.55588653769 -0.5299616161052
+3.555182451718 17.55551466766 -0.530030504726
+1.158472595717 14.22183434881 -0.7680509352909
+1.178688678805 14.18619850834 -0.8087364419116
+1.185235770236 14.17905063196 -0.7402313760053
+3.926345278834 15.14462967837 -1.212041693337
+3.942657736153 15.15450253984 -1.155897626231
+3.749446599482 16.81410295177 -0.6114304396884
+1.891748292373 13.14076752138 -2.317079424457
+2.070108336546 12.79600715129 -2.256284962664
+2.147202507445 12.81633038384 -2.259865575122
+2.136857031329 12.75923899832 -2.249799270918
+0.9198907798146 14.97194904469 -3.3934e-14
+0.9349380460907 15.02418173745 -3.3934e-14
+1.3285 13.38257272755 -0.104428503572
+3.806516099732 13.5734659982 -0.02715403078932
+3.867870088795 13.57774846337 -0.05716573566775
+4.546439775727 15.2037050036 -0.8769368860695
+4.602403144076 15.20568386595 -0.865706865745
+4.577553354748 15.19217540924 -0.9422124199549
+4.501911971021 15.19746869726 -0.9121549345824
+1.3285 13.52340608459 -1.381874454995
+1.3285 13.45271860406 -1.415317157232
+2.853408335101 16.01140139332 0
+1.730042254795 15.27771228109 -2.19780833629
+1.721796702888 15.2697137475 -2.252277723459
+1.677418461173 15.27457790484 -2.219024280929
+3.185767155527 17.17591508685 0
+3.019259795566 16.9740103248 0
+3.031313850065 16.89995554872 0
+2.423369003257 12.83307393094 -2.240283882924
+2.4279 12.88774421179 -2.217664656949
+4.218046865752 17.79422768145 -0.2614700213905
+0.1388325038442 15.34788313219 -1.63722109981
+2.157158178435 12.95212758534 -2.283810899465
+2.18099671248 12.9050807091 -2.275506875677
+2.125299884035 12.87016247048 -2.2693612159
+2.445557426601 15.35020551411 -1.615222610653
+2.37450515949 15.34859643823 -1.63015366002
+2.429762780089 15.3559890413 -1.560068613978
+1.006451178431 15.64051872506 -0.4466543419633
+0.99436795437 15.6369508468 -0.3652260244379
+1.048896897998 15.66029101401 -0.4290244624258
+7.78e-18 14.79281863138 -1.168541996614
+7.78e-18 14.7613730116 -1.226989846929
+1.348078652669 12.9443067806 -0.4887696167348
+1.354567270858 12.93243474212 -0.539830799652
+1.398767596302 12.75174762766 -1.794632463707
+1.364143964212 12.807773592 -1.769699592513
+2.433990785431 16.90039548617 -0.2888843051424
+2.459342885295 16.92446418299 -0.253084844486
+1.594425460953 13.45485988369 -3.3934e-14
+1.454563798842 12.6647906758 -2.100064672883
+1.515424394419 12.63053609597 -2.152036680932
+3.665983664757 13.82400592318 -3.36738e-14
+3.527416920427 14.40206532084 -1.522925263072
+3.566937436277 14.43385530841 -1.47811075118
+3.569087517458 14.35366747612 -1.461430850871
+3.588685153102 14.39915190077 -1.446520946246
+0.7975719316617 14.55262610567 -0.6686198177873
+3.223978244911 15.71659645701 0
+4.250683576657 14.36304518577 -0.8934501097492
+2.99994477136 14.92012977813 -2.485111161603
+2.939972618021 14.91597871279 -2.508819516116
+2.876645149918 15.63510711715 -0.9683320976249
+0.725444232939 14.59152319532 -0.5569020018989
+4.783804926298 16.59258183851 -1.51818408177e-14
+4.705279145796 16.62443923437 -3.3934e-14
+4.739304400962 16.563399565 -3.050327777742e-14
+4.654673168913 16.61505390291 -3.3934e-14
+4.648049945164 16.56401291693 -3.3934e-14
+3.259998024293 16.72417465742 -0.6766214810502
+3.301980037717 16.68995883396 -0.6826499169899
+4.04329649926 17.40005777242 -0.5574443096541
+4.073418561941 17.44686772104 -0.5491860730513
+4.095995498598 17.38694142474 -0.5597539624031
+3.443953875959 14.75729455115 -1.706473441424
+3.447196731513 14.70751657581 -1.692618758323
+3.420156846453 14.72332745661 -1.739489534007
+2.123654272755 15.18456690617 -3.3934e-14
+2.084019305599 15.11617081555 -3.3934e-14
+2.142361637413 15.13603149883 -3.3934e-14
+1.326717792739 14.04866736817 -3.3934e-14
+1.30916047695 14.13703218248 -3.3934e-14
+1.269784788428 14.09514618047 -3.3934e-14
+3.223270652574 17.4557666917 -0.3903852036564
+3.164908147224 17.42452898071 -0.4105596268411
+0.1833239539667 14.60167805363 -1.561980782998
+2.321364812209 14.37498900923 -2.53469874042
+2.382953046858 14.41626505905 -2.54198043539
+2.371827943155 14.32856801878 -2.526511356704
+3.03531163375 13.44949089156 -1.086324090613
+1.892270551679 16.29433013756 -0.4864486586843
+1.857152268574 16.25595643602 -0.4385935789698
+1.894131376708 16.2981115946 -0.4248835080723
+2.001927336769 15.42222757415 -1.254438544613
+4.8279 14.43002077393 -0.6478347071974
+4.801950746678 14.39683804297 -0.7020202699885
+3.715092705967 16.86019064852 -3.3934e-14
+3.133713026285 13.50399945254 -0.2317142583352
+3.118459104389 13.50307498617 -0.1640334089687
+2.647228135514 16.45223618194 -0.724570547122
+2.323029078526 16.78446156531 -0.571722045635
+2.301181729176 16.76327602075 -0.5227936454615
+2.353381747807 16.81773800318 -0.4913177490426
+1.307708311632 13.87912233358 -0.4474944973106
+1.325513262542 13.68281849837 -1.314001418395
+3.288548003236 14.39410560772 -1.960263110871
+3.305087337335 14.4439868966 -1.925636039448
+1.52239882188 15.94666767421 -0.4283406077175
+1.467783000693 15.90714212765 -0.3728767417677
+0.647474891071 14.59093150917 -1.09014781995
+0.608403938715 14.60879265203 -1.021579834487
+0.6531208495379 14.59255240537 -1.039611026741
+2.836205991036 16.54002595934 -0.7090848894292
+2.244859531917 12.8014358929 -0.5475771788897
+2.221831722543 12.79897151454 -0.4979739939684
+1.169893492172 14.2236712561 -0.09811909649777
+1.153013722604 14.24974823574 -0.05229629685698
+1.138880965081 14.26865543425 -0.1013097971219
+1.181899707738 14.20380102838 -0.04855541494796
+3.021988965667 13.96477044675 -3.36738e-14
+0.03858067091307 15.43261332568 -0.3101824285684
+0.0487715417668 15.43385680509 -0.2484143517286
+1.3285 13.29376831381 -0.9408103545509
+1.3285 13.27198201859 -0.9958245420894
+1.3285 13.23137787936 -0.935831529409
+4.306068437324 13.7567734526 -3.36738e-14
+4.383712594984 13.75254105287 -3.383676646446e-14
+4.346155245718 13.81462481892 -3.374559297201e-14
+2.974171834348 16.57952014188 0
+1.153783941487 14.18208506648 -1.377412281256
+0.1305577631049 14.66165392373 -2.585246093957
+0.1991992026284 14.57400900199 -2.569794828814
+4.333857814812 15.80553333362 -0.2402641170381
+4.053213201947 15.35894981138 -0.6949260924172
+4.014544582813 15.38631396606 -0.7156322358781
+3.052874398692 15.41039924299 0
+4.104533936834 14.36482381606 -0.8834119426483
+4.063995404639 14.35318166742 -0.9493930892161
+1.369451964568 14.27773723771 -3.3934e-14
+1.322610578018 14.36262429256 -3.3934e-14
+1.307114978337 14.29042247849 -3.3934e-14
+2.09421066175 12.78134441821 -0.6893958160595
+2.069110765206 12.77753909741 -0.7564898486509
+0.9296476590252 14.49935856594 -2.55661964457
+0.9883073254251 14.54821590022 -2.565241146835
+0.9910820953345 14.47758249631 -2.552782690998
+3.360185508917 16.07870152741 -0.7103658260491
+2.210853307229 14.72975456021 -3.3934e-14
+2.176846236868 14.69049877821 -3.3934e-14
+3.932790487947 13.73033904575 -0.4646373558879
+1.477682193857 14.93822632924 -2.634009333922
+1.43532192395 14.89078002111 -2.625646652943
+1.815698627883 12.7244195951 -1.388070386124
+1.824991427192 12.73288000999 -1.308196943503
+1.768137192068 12.72784187529 -1.35687540099
+1.76884931131 12.72231654546 -1.407225993909
+3.795886356995 14.39565856049 -0.7085272076721
+4.366507915367 13.67421525483 -0.3052768160213
+2.304207429623 14.9399066005 -3.3934e-14
+1.573077006458 12.98319466171 -2.289281671921
+1.616427931527 12.94379539723 -2.282332028599
+1.568866152967 12.91719973544 -2.27765113393
+1.639536435661 12.99261356665 -2.290942844531
+2.662817687181 16.44352294512 0
+2.720728973479 16.42223539673 0
+2.427906559803 13.25300856847 -1.676813489854
+2.006420384164 15.05434872655 -2.654479469783
+2.040367589246 15.46563650434 -3.3934e-14
+2.098798279359 15.48968623354 -3.3934e-14
+2.046673678047 15.52850754907 -3.3934e-14
+4.8279 17.05112964627 -0.2312932915177
+2.36893012975 15.3549840557 -1.569215893043
+4.542695267733 16.0104983636 -3.3934e-14
+3.456527987249 15.13916222708 -1.242923163171
+3.506537171117 15.14074538149 -1.23381105943
+1.533217639234 15.95893779951 -0.2485954113776
+1.593718995183 16.00729992204 -0.2578989526629
+1.559938771 15.97862105634 -0.2995806896101
+1.602768267357 16.01384446559 -0.3123009452637
+2.90785813734 16.39912031545 0
+3.837283411647 16.25517280613 -3.3934e-14
+1.374028357052 12.88991447956 -0.7977702317698
+1.384277482959 12.87961090871 -0.7093390672291
+1.352055602124 12.92475536322 -0.7677322808222
+3.71018913186 17.31370401667 -3.3934e-14
+0.1684872602397 14.63898247928 -1.161036173315
+0.1288066358801 14.64209405901 -1.121520994386
+0.1164568334571 14.63741825659 -1.180284219528
+2.092168988759 15.66540960162 -3.3934e-14
+4.74000821385 15.53093617366 -3.026095648537e-14
+4.754053223319 15.47383666257 -2.542528936581e-14
+2.443990004847 16.35898111666 -0.7410110361398
+2.412502548686 16.3077833028 -0.7500407530992
+2.6004048413 16.39926031073 0
+1.294187973675 13.77955909997 -2.110938823069
+2.436797184952 16.44487996585 0
+2.732650605906 14.00103674765 -2.112295128964
+2.740701609363 13.9394629299 -2.05359799726
+2.088172541535 12.99369424981 -3.390019446263e-14
+2.038055003874 14.87501703626 -2.622873679525
+2.009908993315 14.82470023576 -2.613997986793
+1.967790798415 14.86683962392 -2.621431215009
+1.854314923342 12.73013408323 -2.244662830474
+1.918261495487 12.66908580125 -2.233902542344
+1.581045982519 14.00755625355 -2.469911799622
+1.58777242913 13.94365152782 -2.458637510036
+1.524395493798 13.97569268762 -2.464290060198
+3.577778719934 15.12824901405 -1.304900337764
+3.536455176153 15.13362269522 -1.274315819626
+3.565062591259 15.11953338577 -1.35423858221
+1.847368695295 12.66707246037 -1.83996683444
+3.032732279819 16.77823684593 0
+3.589374355969 16.17171353929 -3.3934e-14
+2.186356196877 14.84581612778 -2.617722750043
+2.4279 13.10650989445 -1.029062977709
+2.4279 13.0754918974 -0.9625922725316
+3.166900562536 15.84137379509 0
+3.67976968882 15.52889615537 -2.16766087801e-14
+3.747301755646 15.48991598244 -3.285915038392e-14
+3.760521642482 15.55793796915 -1.417309314705e-14
+4.291574301774 16.61565657696 -0.3919874933648
+4.262633168793 16.67187912094 -0.4085724819586
+4.330095292423 16.6588864513 -0.3914893152871
+2.053820964286 15.92544911792 -3.85969360166e-15
+2.02456639203 16.0055118673 -1.658343261294e-14
+1.862056343099 15.29708190343 -2.058318517004
+2.713272401354 13.48064430693 -2.166496633252
+1.523712000225 15.62000960429 -0.9812058342177
+0.05283051011291 14.52057695456 -2.191029060318
+2.427970995003 16.83479495292 0
+2.376196772096 16.82963454717 0
+1.759700779884 12.79613423643 -0.3124974404365
+2.272145420995 16.73177233345 -0.5613232809248
+2.244247404524 16.70332493625 -0.4918909935097
+1.909864967933 13.81315679837 -2.435629891811
+1.734215433914 13.81192215777 -2.435416393152
+1.786578955332 13.79394641059 -2.432242198314
+1.749186545699 13.75684521281 -2.425699655806
+1.267528004435 15.27601462723 -3.3934e-14
+1.207708601912 15.2802835502 -3.3934e-14
+4.118555494905 14.85608841956 -1.116817816757
+3.03210365841 14.1524729021 -1.342525002244
+4.8279 17.78362711141 -0.4695599405528
+4.794659675753 17.73018903746 -0.4992299634943
+0.947301811496 15.3681756608 -1.451521610813
+2.920983010426 14.19284053898 -1.550932065369
+2.949353443583 14.22660803451 -1.501117720284
+2.938524144026 14.15913255309 -1.510081844815
+2.889169604229 13.67187142572 -1.527884040115
+2.531576318234 15.85670650297 -1.992481952651e-14
+2.42293517117 16.67528232087 0
+3.546836747856 14.2749435942 -1.393403144028
+3.500194701233 14.28151199235 -1.35598109792
+1.410040941928 13.12134792657 -3.3934e-14
+1.428747156602 13.18787255053 -3.3934e-14
+1.350976573399 13.14051386999 -3.3934e-14
+3.432136774683 14.03790973023 -0.8489779968859
+2.731862385789 13.30285479586 -1.980796280555
+2.729732366854 13.37576937316 -2.020224315459
+2.850879859901 16.82428981219 -0.6589679636646
+2.827561400962 16.8720710915 -0.6505387532939
+1.22354950631 15.43264596734 -1.231186897409
+3.373157333872 15.74114551922 -0.6412881250631
+4.8279 17.64521097041 -0.2396150127566
+4.8279 17.69585108793 -0.2063204240763
+2.75540863194 15.7516072729 -0.8887072672129
+2.705164148444 15.77931886745 -0.8746959455641
+2.768905726979 14.05030333769 -1.946031404339
+3.115488792786 17.39727733246 -0.4207059012858
+3.074237145301 17.37281786555 -0.4502194430161
+3.141511066254 15.0999433729 -1.465331829477
+2.4279 13.26815743894 -0.1439553389282
+2.4279 13.21453034998 -0.1531958837294
+3.193876352332 16.72590073877 -0.6763143930312
+3.144474691248 16.71083081048 -0.6789664958634
+3.504804930136 17.58285140104 -0.5061877443816
+0.5434708771448 14.61049972104 -1.213006968612
+0.7232549449943 14.58931480216 -0.6336339401299
+0.5596407458291 14.65513310074 -0.2184864720027
+3.865246600586 13.57597639295 -0.2095271049423
+4.312872248146 17.66308425636 -3.3934e-14
+0.7345771061598 15.51188458014 -1.023703618134
+0.6808033480647 15.49458524709 -1.047870051306
+-4.36436e-15 15.20443171191 -0.4414031619025
+-4.36436e-15 15.24561953295 -0.4710045365996
+-4.36436e-15 15.23021118406 -0.519329072508
+0.9737641813771 15.44450527091 -1.203889221664
+0.988182110949 15.42235981679 -1.250697390474
+1.681409895549 13.1297562989 -3.3934e-14
+1.613910427252 13.14479609977 -3.3934e-14
+3.117832250488 15.4222122951 -1.254646971504
+3.093217244799 15.40546614073 -1.301072925088
+3.06609736522 15.23181910943 -1.472908768405
+3.04950834118 15.29482672853 -1.509402118286
+1.640144501419 16.03761947851 -0.5868389971589
+1.947606587179 13.42223476403 -3.3934e-14
+3.056658110939 13.7553926751 -1.234246132101
+4.256448063368 14.97196366799 -1.077824265807
+4.234045735872 15.02633834482 -1.095782830976
+4.8279 14.47705938442 -0.5453504398341
+4.8279 14.48252328715 -0.4953270873485
+4.818261268333 14.43642513586 -0.4776001212742
+3.551257030553 14.03788222403 -3.379095663284e-14
+2.934386376144 15.99490492901 -0.8052026385983
+1.161054770445 15.17394376904 -3.3934e-14
+1.703744697196 15.00876388394 -2.646439039771
+-4.36436e-15 15.12143077619 -0.2420765505683
+1.695140786244 16.09121154258 -0.4588722004906
+1.741834586991 16.13436948157 -0.506330604494
+1.879940173894 14.33096708332 -3.36738e-14
+1.868551355717 14.24594294765 -3.36738e-14
+4.415066477705 15.3121413311 -3.3934e-14
+4.8279 14.50320560344 -0.06678406610704
+4.8279 14.55834287637 -0.07549199701713
+3.161334330151 15.04100746739 -1.005593916641e-14
+2.218810269625 15.26292153331 -2.298266941189
+2.292027035622 15.26308455488 -2.296936712736
+3.466979978396 15.99724684414 -4.040602796711e-15
+3.402478973908 15.98393534006 0
+4.376723690578 15.16099771065 -1.070976616111
+4.47068677435 15.95932466859 -0.2439033536261
+0.7766725472646 15.55293398508 -0.4356231970463
+0.2604663489959 15.11300380893 -2.664838752976
+0.2053465275422 15.05894715517 -2.655293508128
+0.1859446959924 15.15015536818 -2.671379553799
+0.1481719261628 15.09475796763 -2.66160536578
+3.002427551518 13.67221816366 -3.36738e-14
+2.92528626372 13.67996211598 -3.36738e-14
+4.813861496245 17.2545338925 -4.833427216291e-15
+4.741963782007 17.22234744006 -2.958765849607e-14
+7.78e-18 14.57320976418 -1.955677796096
+3.153100525112 16.09880227973 0
+3.140523716694 16.16873988643 0
+3.102826749514 16.10867658215 0
+3.257791794347 14.27511749036 -1.391963698551
+2.134768916999 16.57380668799 -0.6270905230511
+1.197531770679 14.15225857313 -0.8514790702477
+3.60023320632 15.1561711217 -1.146463219545
+3.649726239995 15.1642986394 -1.100247298062
+3.45795489156 15.92426514568 -0.6170613619496
+1.357419979664 15.35931786594 -1.526211532316
+1.383687352452 13.37322693172 -3.3934e-14
+1.14089277098 15.17781526396 -2.676258498617
+1.206622732434 15.20361297096 -2.662247899936
+4.474978586894 16.65837514235 -0.3667820136455
+2.981503973913 13.63526842433 -1.336905725694
+4.000900808832 17.47773897462 -0.543750342745
+1.487527613997 15.22724816488 -2.52349343713
+1.415110676749 15.22801961692 -2.518932403328
+1.46844641218 15.23583059671 -2.471474144241
+0.07967922654406 15.27180671817 -2.238274133948
+0.01437946455793 15.26976911082 -2.251956633169
+1.153834426404 14.08965978664 -2.123416505686
+1.180679929737 14.04194586155 -2.152833257241
+1.713259527996 15.43411915104 -1.22706013168
+1.656751240964 15.43586462002 -1.223188944668
+3.187519278939 14.53656082624 -2.512604957949
+3.18656916663 14.47400186593 -2.544507882008
+2.041420586603 16.46605817596 -0.5743178593393
+4.8279 17.7544296304 -0.1678065229896
+2.4279 13.13657033953 -0.2354115560154
+2.4279 13.0710475456 -0.2236539795538
+2.4279 13.082693911 -0.287361719678
+0.7765842245061 14.57763880721 -0.08071684052168
+2.85332811728 16.9432769776 0
+1.827694014558 12.69204434078 -1.658360258816
+1.766224307146 12.69049029828 -1.670048358134
+1.80364438908 12.68344704451 -1.723021330078
+1.789125710389 12.6983087786 -1.60946450874
+3.66431142796 17.03496946795 -0.621815315583
+3.586774239157 17.03711639259 -0.6214332573212
+2.041890241014 12.76334759539 -0.9683393009394
+2.047803020044 12.75775262803 -1.037997853724
+1.697065674302 12.79971008962 -0.07039777699601
+1.770143821464 12.79981009919 -0.04611285494214
+1.16589040796 14.9214348181 -3.3934e-14
+1.3285 13.19719099239 -0.0583648841185
+3.306104537512 13.96707067314 -3.36738e-14
+2.103809177847 12.9542221151 -2.28418260142
+0.3767732949633 14.5850743439 -1.689292441014
+2.957492678984 17.30678378144 -0.2267612626085
+2.944876182837 17.29918279642 -0.1693700228764
+3.714695211615 14.49244057422 -3.3934e-14
+3.763572203744 14.50995336255 -3.3934e-14
+1.794532527605 15.09399030459 -3.3934e-14
+4.753051461766 16.08354447706 -2.577019375438e-14
+2.621584208692 13.24131004179 -2.254631749531
+2.783799210601 14.1421209829 -2.146412949092
+1.065639740058 14.24163630972 -1.831460571349
+1.1078472328 14.19487429904 -1.817624400917
+1.116734442911 14.18954616301 -1.764080508134
+4.430404627195 14.78764856054 -3.3934e-14
+4.484007279286 14.79877086582 -3.3934e-14
+3.985146096882 17.42171543582 0
+4.073556542454 17.45329808655 -9.754670489695e-15
+4.009112451008 17.48753158363 0
+4.08101242356 17.50367123708 -1.929693093766e-15
+2.512950426027 13.30231675778 -1.723934674756
+4.10612408742 14.37399754355 -0.8312364859355
+4.141133728116 13.70133294849 -0.3741949233899
+0.554945679586 15.45453103481 -1.15361832073
+0.6337874051444 15.44991379451 -1.194360504473
+2.481816158659 13.34926633759 -2.353833989721
+2.459208870609 13.40018639436 -2.362815082211
+2.537560565378 13.35791810959 -2.355353739101
+1.188174674161 15.73015287699 -0.4127026658053
+1.125148876359 15.69728817292 -0.4174422146308
+1.176151381967 15.72492665962 -0.3594131469132
+2.709121046243 13.46507737895 -2.216820288485
+2.650037846392 17.08107985464 -0.5351441180054
+2.693046807118 17.11405491459 -0.5669833554357
+2.669480759377 17.09351960182 -0.6114982239777
+4.77386323628 14.40950985418 -0.3842675884769
+4.760589333588 14.4459500112 -0.4235873666504
+0.5820937394439 14.607591797 -1.128104244905
+1.354777610144 15.4202476392 -1.257096276957
+2.4279 13.37051966814 -0.700393540506
+-4.539318218601e-15 14.91130483248 -0.345767619478
+-4.632151721666e-15 14.88020042059 -0.3968163626604
+-4.572162949927e-15 14.96960801934 -0.3589659914252
+2.4279 12.94574196461 -2.230204975533
+0.8633806564163 14.52758999736 -0.1863455021339
+4.650346370712 15.82495599714 -0.2009722560439
+4.670959683771 15.87384089639 -0.2084078756764
+3.438528059206 14.32737172794 -0.8943714618956
+4.315125893635 15.12766545657 -1.084403411594
+2.915239838608 15.35595342997 -1.560067570269
+2.424424823396 12.94108984753 -1.543692212038
+2.452320270054 15.72613044845 -0.90351220807
+2.411863731091 15.77774389356 -0.8751773963184
+2.478354925831 15.76409675724 -0.8826131079927
+4.173478581319 14.38902139886 -0.7462016136028
+2.928387149791 13.80894255894 -1.467866847664
+3.003310488398 16.04179431745 0
+1.3285 13.32818152389 -1.398190476796
+1.3285 13.36871010677 -1.458599313961
+1.3285 13.29209972013 -1.443683263268
+0.659925101515 15.37909960613 -1.38254559208
+0.6339431313234 15.39468074543 -1.325145255208
+1.599399102069 13.68847709902 -2.41364264647
+4.252602976199 15.58167209183 -0.5183476169188
+1.321412673029 13.73668092085 -1.302207945576
+1.312596823322 13.7934271791 -1.333277034727
+0.03071545413722 15.259767761 -2.31895602705
+0.06563195391362 15.24782497562 -2.396323379348
+1.158470885992 14.16781643144 -2.498169734016
+3.634998541514 14.63843823571 -1.436783698496
+4.654812378763 13.63057382193 -4.775068531505e-11
+4.613901781472 13.67206923458 -2.096738880876e-14
+1.267921851174 13.90862002499 -1.797125092587
+1.195692278166 15.26344552132 -2.294591606235
+3.797819589902 14.19747155936 -3.3934e-14
+3.820016543238 14.28226099884 -3.3934e-14
+1.929475169565 16.33864964574 -0.4458587456989
+1.970291949524 16.38666674729 -0.4413848609726
+4.180380719571 15.86744229548 -0.2867844560953
+4.8279 17.61949606487 -0.2883575067087
+4.735570478605 16.18049090508 -3.178885936492e-14
+4.673450253076 16.19922314676 -3.3934e-14
+4.715891360097 16.24830034853 -3.3934e-14
+2.703552156269 13.45445477723 -2.343753253106
+2.703322910565 13.58094956767 -2.376119865768
+2.056411096836 16.41882289029 -0.7304602276869
+2.689686137829 13.3103002997 -1.882483236274
+2.610174092664 13.30321454663 -1.840368536016
+2.369224753314 15.342773727 -1.683983499346
+2.065361784566 16.49074058811 -0.6664659974736
+2.860810176362 16.76720834649 0
+3.530851441072 17.12415361601 -3.193381227332e-14
+3.271886505582 17.40398401777 0
+1.68838879577e-07 15.42638548386 -0.1227825691249
+-4.594635019132e-15 15.30346051204 -0.1237559330082
+3.378413235377 17.53333814108 -0.284948227222
+1.768239326336 16.1676600889 -0.04621707799006
+1.810411824655 16.17737641258 2.547508175853e-14
+4.09951800822 13.93232663794 -3.376059369903e-14
+2.48510218277 14.87120458891 -2.622195433942
+1.821251906358 15.8331492867 -0.850464942026
+1.792968131323 15.89289200977 -0.8287563970938
+1.832791310554 15.97284049728 -0.8095778578709
+3.300385195316 16.01970366159 0
+3.349420259697 15.99607713444 0
+2.02510325242 15.22318745649 -2.547787694782
+3.539989136091 14.81169553935 -1.578869234567
+0.2991288210191 15.04652749408 -2.653110963205
+1.814666226229 15.30580280215 -1.992428392623
+4.149270368033 15.19857548581 -0.906226339042
+3.628282624879 16.90780763972 -0.644231802312
+3.541654942031 16.88990533851 -0.6473906856621
+4.471975530349 15.13262606248 -3.3934e-14
+4.522508753763 15.06786069792 -3.3934e-14
+2.584109473068 13.30487664931 -1.795700013296
+2.652642311126 13.31404997882 -1.812864941126
+3.25308802586 14.32521405664 -1.108276388994
+3.306876466027 14.32755142841 -1.094982152962
+1.970730675798 15.38719817779 -3.3934e-14
+2.604261745269 13.35872841987 -1.370680751065
+7.78e-18 14.74319237819 -1.564489292219
+7.78e-18 14.79738980234 -1.579562995583
+1.4852512413 13.63036767606 -3.379515635817e-14
+1.433128176502 13.61356138798 -3.375633719618e-14
+0.8782447128889 14.51973916775 -0.05798386952201
+3.354754336615 13.66344511099 -3.36738e-14
+3.654554989974 17.0626406738 -3.3934e-14
+2.331983421091 12.97838986344 -2.288439209314
+1.170943555854 14.21370441041 -0.4899482618101
+0.1003158102992 14.99394691544 -7.58717008387e-14
+0.14953007079 14.97665736631 -8.17662e-14
+0.1334431992318 15.03424019089 -8.17662e-14
+0.1352301430618 15.1435036665 -2.67020520332
+0.1346257240066 15.20161854898 -2.673807409632
+3.661238195591 14.02993481271 -0.671027363529
+3.717130784197 14.10411147456 -0.6476426893583
+3.71950879279 14.03797413869 -0.6345560169202
+4.621285273459 16.48520826229 -3.3934e-14
+4.668050906175 16.51327251592 -3.3934e-14
+2.105911753719 16.12506893519 -0.7822586503019
+0.8819456656754 14.45658353756 -1.330561604828
+0.9162034662269 14.42810376519 -1.364842540179
+0.8360783148643 14.48557117312 -1.315872153678
+3.086029387135 13.45960279737 -1.04287711666
+1.917174661339 15.42118392101 -3.3934e-14
+3.445814427415 14.64839755786 -1.684402333273
+3.424195591002 14.6729376318 -1.72353088139
+2.341744450136 12.82361906884 -1.021885199106
+3.913997075487 14.37373093212 -0.8328277316357
+3.8450759594 14.36212076995 -0.8987199396765
+0.8602986548828 14.43150381958 -1.694270081809
+0.8103785931096 14.46093596252 -1.70040873449
+1.172030030564 14.83996666652 -3.3934e-14
+3.06919781005 16.8286128023 0
+2.180583827638 14.27569827948 -2.517191598943
+2.126707423685 14.23747909671 -2.510461251611
+4.71200010688 15.20165994532 -0.8883476839776
+4.665505332311 15.21056482449 -0.8380567535021
+4.728425513209 15.21242024694 -0.827640998667
+4.124397599679 17.77513147502 -0.3333482811148
+1.363967068975 12.92622001763 -0.3002449487436
+2.602016336443 16.56278859992 0
+2.33918660112 13.31228874906 -3.014109517453e-14
+2.387745252679 13.33621248873 -1.816780268896e-14
+0.07378312847978 14.65251818807 -0.9751403664494
+0.1147371862389 14.64815308081 -1.039728482905
+0.1474879431868 14.65273993947 -0.9717495826469
+1.801076909103 12.78784738027 -0.5554285090098
+1.739266036154 12.78653178064 -0.5859868885142
+2.484134671497 13.55470072068 -2.390061357638
+2.465577117757 13.61221674964 -2.400197224134
+2.516396594746 13.61512391892 -2.400702230282
+1.975039233026 15.8763313883 -0.8346489587047
+1.963771322279 15.93520143848 -0.8186730619023
+4.098412710601 15.93041071096 -0.3213921206368
+4.160118507572 15.9957901643 -0.3148429993631
+-4.623397610521e-15 14.7768567527 -0.01468195332519
+1.599051752175 15.29242207067 -2.092870070664
+2.177212318632 16.63429411776 -0.151708123911
+1.171121149662 15.58851037689 -1.009408847282
+1.102474799606 15.58944114834 -1.008301454019
+1.125428598252 15.65251945857 -0.9535959969661
+1.156517306792 15.5431378547 -1.058830259998
+3.556193496962 15.57097522162 -0.579146058014
+1.606058644455 14.67532423736 -2.58766329659
+1.417826896737 15.86837941895 -0.5190174670909
+1.431553919295 15.87562063008 -0.5757045540505
+2.4279 13.31772613069 -0.1215010044761
+2.4279 13.38313962162 -0.1416949239589
+2.199657874254 16.65251546179 -0.5347695121473
+2.234299043466 16.69034932276 -0.5577776416806
+2.196266399731 16.64683090771 -0.5859171800124
+1.650751564126 12.7952798545 -0.3444043336436
+1.710546539823 12.79522093218 -0.3466047878651
+4.623379214497 13.8622536168 -3.3934e-14
+4.556232876154 13.87205300534 -3.3934e-14
+1.557674976792 15.334268801 -1.7601024027
+1.301572787634 13.77073978016 -1.969215274512
+4.759080584422 15.20522391705 -0.868188875078
+0.1219678052811 14.68377851309 -0.1891051029421
+1.759497085875 15.73926157886 -0.8951767437594
+1.680136695557 15.71598461703 -0.9091603904717
+1.747155511232 15.69770148923 -0.9212795730248
+3.898556899564 15.55833809514 -0.6507015988301
+3.883193525992 15.56935236966 -0.5886010795573
+1.3285 13.17100188322 -1.278123026662
+1.3285 13.12436552066 -1.241633168227
+2.804274886894 15.56220702486 0
+0.4039034418063 14.84119951804 -2.616901192705
+2.450136236029 16.75284166218 -0.6715608979023
+3.976513381184 14.37769282811 -0.8103638812886
+3.962175726436 14.36765827712 -0.8672647135544
+1.155307215569 14.06775739406 -2.251504019311
+1.286155783244 13.85302641918 -1.822387614232
+0.3073723992967 15.23930553584 -3.679046056994e-14
+0.2542328510959 15.24341094702 -6.180451938919e-14
+2.374253577361 16.64568797534 0
+4.374142801513 15.36041272161 -3.3934e-14
+1.487649492009 14.82932913327 -3.3934e-14
+4.13432502627 16.06020495184 -0.3333419735243
+3.036438689952 14.08765547507 -2.455500778412
+3.042245231609 14.09746112944 -2.399645396956
+4.175550897113 14.4319449619 -0.5026741073274
+4.225166180494 14.42857623825 -0.5217678125683
+4.244087453852 14.4372667037 -0.4709815491579
+4.1915639837 14.38890721953 -0.4789776472886
+2.781763019282 13.70830678873 -3.36738e-14
+2.662632932256 13.27530981398 -2.087729824348
+4.038480823112 17.68990903504 -3.3934e-14
+1.97439732633 16.39543967219 -0.2559791946319
+2.769266732637 13.6053414298 -3.36738e-14
+3.200296177015 16.20851787967 0
+3.24866699884 14.5049801118 -3.387443624478e-14
+4.2686984464 14.36560804227 -0.9663554902956
+4.260546680074 14.41721587093 -0.9784550213592
+3.109681770339 17.27576318018 -0.5793507605145
+3.103390180124 17.21482522163 -0.5900991832758
+3.051146652078 17.25505544773 -0.5830082513752
+1.578708325656 15.22253318377 -3.3934e-14
+3.487076622754 15.1319118112 -1.283938963887
+3.43739697423 15.13054083421 -1.291928113402
+2.922226468837 15.34291369529 -1.682809916277
+2.874980910978 15.34801544925 -1.636032679914
+2.137677125109 14.30369142042 -3.369261953901e-14
+2.079532640954 14.29450946731 -3.36738e-14
+1.59770505687 12.62371971046 -2.116548541115
+1.623853672651 12.61260408737 -2.181487682258
+3.436969007257 13.83268367303 -0.8085207280089
+3.385112369807 13.81381793844 -0.85196980064
+4.72539522215 15.93890728673 -0.216631567858
+4.671928940177 15.93767411486 -0.2196281104932
+2.70767947665 13.30613356032 -1.932132064001
+1.3285 13.49563895977 -0.5094722120178
+1.3285 13.46254393345 -0.5476549550603
+1.3285 13.43293651088 -0.4804554774785
+3.120410879548 14.11851427337 -2.280292261603
+3.061642282293 14.1178255324 -2.28403930824
+2.933638853173 17.29272360312 -0.007960336114634
+2.943731367985 17.29909191013 -0.07651223183996
+0.7406795510701 14.59398989122 -0.1571606822608
+0.8028551585269 14.56401431399 -0.1712560007565
+0.8437869103218 14.5401163521 -0.119135961341
+4.008548355657 15.10819496435 -1.219710443369
+3.971045001334 15.14040733427 -1.235837655788
+4.087192084917 13.91791885309 -0.4321599571439
+4.067629156394 13.8641752886 -0.429861264216
+2.741860656222 14.38779379469 -2.536952229208
+2.661795069488 14.41534597961 -2.541816876551
+2.727292704993 14.45268544788 -2.548400850156
+2.916749515046 16.53690391807 0
+1.334524597495 12.90497935697 -1.7234700374
+1.3285 12.94630842612 -1.664607791854
+1.3285 12.97458245922 -1.721563373981
+7.78e-18 15.22403751677 -2.302063998519
+1.70848700446 15.59255120165 -1.004981765567
+1.413058025628 15.86054606042 -0.6314922018867
+1.457157558261 15.89173946022 -0.6273525394884
+1.43816916722 15.87584442847 -0.6818471849537
+3.292552048364 17.31301143818 -0.5727862683703
+1.03023340648 15.40936175831 -1.28155256052
+1.039095127457 15.43620520134 -1.21994358593
+1.074310738182 15.42083876213 -1.255603421803
+2.811255283452 13.59458269368 -1.717282526448
+1.133458441527 14.3889570708 -2.537157831751
+2.80464452234 13.7578322942 -3.36738e-14
+2.733532789099 13.73380549008 -3.36738e-14
+2.10199857542 12.87361247352 -3.386641136449e-14
+2.149423268648 12.89514900039 -3.37327735016e-14
+2.101405468892 12.92906444405 -3.386485387056e-14
+2.4279 13.32018515292 -0.3154490741529
+1.09075062346 14.2891245199 -1.09782879947
+1.099337609045 14.28608839131 -1.009379374248
+1.046649037598 14.3412622578 -1.052833667198
+1.787397955565 13.46489094293 -2.374225297547
+1.3285 13.48895833409 -0.459386566628
+1.3285 13.43320491677 -0.4177957557137
+1.3285 13.49319046563 -0.3996836961555
+1.491131772495 14.4467556357 -3.381355530388e-14
+3.684375314233 17.45514617422 -1.771615257882e-14
+3.703959570478 17.38312600806 -3.3934e-14
+3.217732420417 16.16100681646 0
+3.202391746802 16.11277832443 0
+3.861491113362 17.10222561421 -0.6099550060192
+3.499712214983 14.34029690423 -1.022549932575
+2.049334206117 14.27778267364 -2.517562355989
+1.763771080145 14.08992046593 -2.484438538589
+3.748099024586 13.56666054412 -0.2472678970071
+3.471893291007 16.35006064173 -0.6824782483408
+1.560537481444 12.81292682258 -2.259271218932
+2.892494002593 17.26548820362 -0.1247029818867
+2.831260784864 17.22387596989 -0.1048717440832
+2.879756178189 17.25754267252 -0.04954328984868
+2.85079508701 17.23702074183 -0.1552800739026
+3.060681085557 14.24580575238 -1.55821346621
+3.137114980743 14.24155771471 -1.582724433816
+3.090563669975 14.09074728368 -2.437876429393
+1.790274030252 15.10477032348 -2.663373648209
+4.449219940371 17.82284771912 -0.4821301802213
+1.661429260202 15.80337694795 -3.3934e-14
+1.691203536118 15.85367808348 -2.988931243081e-14
+2.4279 12.94837099115 -1.817333648542
+2.4279 13.00395426963 -1.809448974402
+4.018488529981 14.12026240781 -0.4952798774332
+0.1273714563282 14.67651602966 -0.4970986635008
+3.107813086065 14.29672645026 -1.254840627468
+3.787696372128 14.87473578541 -1.333799370079
+3.863239360639 14.90031586295 -1.279232233549
+3.282160413611 16.23395617402 -0.763055600992
+4.550750226145 15.39734920075 -0.5719932136181
+-4.547120289395e-15 15.04502020441 -0.1147244516174
+-4.479731893054e-15 15.0969170558 -0.06664926483233
+3.148428644626 14.22552580022 -1.187069894344
+1.72211258593 15.51411186068 -3.3934e-14
+1.844793890595 12.7900987779 -0.502137927168
+1.783266761463 12.90546022826 -3.3934e-14
+1.605489914102 16.01351181467 3.082019613781e-14
+1.666303223882 16.02697995891 2.202309064523e-14
+2.409111051397 13.18519050344 -2.324898722847
+2.382838410297 16.84805407283 -0.442400808101
+2.408822542961 16.87468988821 -0.3968309211045
+4.8279 17.29350963355 -0.3279875364939
+4.8279 17.32585556044 -0.3673746820884
+2.708603835735 13.66307699744 -3.36738e-14
+1.855301368343 12.6845091695 -1.71503298845
+1.823543178601 12.67674592833 -1.771600633326
+2.471840252322 14.09483293794 -3.36738e-14
+2.40415517044 14.05701036685 -3.36738e-14
+2.455485953685 14.033759584 -3.36738e-14
+1.3285 13.16694499842 -0.6761689651372
+1.3285 13.41053637895 -0.2721693499306
+3.739143637036 14.37296993398 -0.8372865767692
+3.788520226103 14.36491379543 -0.8828894095634
+1.252600715836 13.9449789776 -1.848749285964
+2.139735944945 12.79856196577 -0.1887837265555
+2.161981020878 12.79907021428 -0.1439078782816
+2.122876147575 12.79942469592 -0.1126088894027
+2.778058482144 15.785213466 0
+2.843238058803 15.75827055446 0
+2.009759566517 15.32607294884 -1.830400809415
+2.035079509384 15.32038192596 -1.876965350021
+2.479686352512 15.01182058231 -2.646994373755
+3.837842976242 14.51002055375 -3.3934e-14
+3.91163821758 14.51137432643 -3.3934e-14
+3.209374180731 15.51025113591 -0.9235950253924
+1.871314611809 14.68894104798 -2.590049785553
+1.315637692927 13.7601669649 -1.458491565795
+2.161491554772 14.63655791776 -3.3934e-14
+1.095978731659 14.31112669264 -0.641727871731
+3.056183464599 14.12759037282 -1.300613258163
+4.8279 15.13797603054 -0.9157122547348
+1.973758848472 15.6341647121 -0.9706876077918
+2.330522184831 13.9768397785 -2.464488658616
+4.130815864621 15.85545148077 -0.298613734087
+4.150631788194 15.94191681968 -0.3079549368657
+7.78e-18 15.10171023016 -0.9917342109713
+4.472618402567 15.99067915335 -3.3934e-14
+3.113312695621 13.5032761498 -0.05808204830367
+3.140386831251 13.52570937106 -6.237354347961e-15
+3.094537919783 13.50103510222 -0.006925026752526
+1.3285 13.16988905907 -1.628789413814
+1.3285 13.22825184806 -1.642588469837
+1.3285 13.18922257794 -1.680810997085
+1.326389989755 13.64561988318 -1.500928126281
+3.924214060841 14.31888113404 -0.5724996363853
+3.990082545216 14.34960288852 -0.5476655831272
+1.018768456763 15.38972990358 -1.345726137922
+0.9632897451283 15.37923036698 -1.383765264031
+0.9883308305768 15.40115034702 -1.307668219377
+1.020882562651 15.37375209173 -1.417340268588
+4.423110701152 13.60335105763 -0.2598829227596
+1.218224368618 14.13955856733 -0.09222358180326
+1.22383236673 14.12799051426 -0.01070077982539
+1.208031859763 14.16016712163 -0.04682304724256
+1.249902836523 14.07263718262 -0.07457420277978
+2.595419495372 14.79232719869 -2.380984299173e-14
+2.644999841195 14.77872490068 -3.3934e-14
+0.8800800432103 15.31990622387 -1.88083804824
+0.8157282039699 15.32312037066 -1.854637130468
+0.1057300732756 14.93596179726 -7.995374403293e-14
+0.060251857192 14.87573700358 -4.555855447749e-14
+0.1175716570976 14.87973609922 -8.17662e-14
+0.1558912247283 14.91716632346 -8.17662e-14
+1.3285 13.49794504628 -1.476870935006
+1.3285 13.48168333438 -1.546108246525
+0.3385565820092 15.44706022567 -0.5913120574023
+1.241703684586 14.3617665908 -2.532372287672
+2.719546015923 15.41755125332 -1.26138744537
+2.649649918281 15.39982102342 -1.315212280736
+2.642183583611 15.42419452842 -1.245961851117
+1.596503019846 14.27818541589 -2.51762768497
+2.499859475606 15.58405047591 -1.013986415636
+3.229003164784 14.17721694577 -3.36738e-14
+0.4422851485034 15.32793736868 -1.814225312238
+0.4835432085037 15.33378485708 -1.76412139356
+2.48623956074 13.40771765441 -0.1740060852334
+2.604365874175 17.04440107275 -0.5294024940735
+4.420688257975 13.60544066937 -0.09060503948556
+2.851519312932 13.44628440185 -0.7581482299155
+2.693644377837 15.43945788044 0
+2.558367220492 13.47230493953 -1.692229680962e-14
+2.615525036842 13.44636340714 -5.115104650337e-15
+2.602204566323 13.5072399915 -2.607087835731e-14
+2.163244818209 16.60889424282 -0.5745029435808
+2.167673852546 16.61655736335 -0.4973869781384
+1.281536788777 15.73006597178 -1.790012323496e-14
+1.232425218457 15.76022291939 -0.005580813146413
+3.869728250824 16.02990982981 -3.3934e-14
+3.836856698517 15.98995914235 -3.3934e-14
+3.90308478377 15.98294431226 -3.3934e-14
+0.02168418442119 14.67355042126 -0.579373721288
+1.783106376436 16.18126435478 -0.2359555052639
+1.813084852496 16.2132633361 -0.1885278092409
+1.8692576024 16.27432434745 -0.2055523679617
+4.539009200427 16.93846056557 -0.4076728888365
+4.558577008831 16.88463106799 -0.3962063772424
+4.507202166098 16.89162884477 -0.403280491705
+1.56245184006 13.32495222192 -3.3934e-14
+2.726606666965 13.91898214466 -2.135473609922
+2.71583330065 13.89853640244 -2.217769632014
+2.802548044 14.16265148437 -2.029814596578
+2.857796997017 14.15535401126 -2.071276014847
+3.093469514896 13.50045566089 -0.1088053011277
+1.498419207968 14.82501978819 -2.614046755834
+4.137478432073 17.17271204115 -0.5287322371051
+4.110636852843 17.23998503118 -0.5485531588861
+4.063361487781 17.18500384889 -0.5533857524507
+3.601153168131 14.51795259572 -1.452877496111
+2.128105696966 15.3057326701 -1.992990935272
+2.198369665335 15.30296038754 -2.014380097469
+2.146721986253 15.29896128736 -2.044347591026
+0.6487986277512 15.0055670316 -3.3934e-14
+0.5873999478754 14.9455629592 -3.3934e-14
+0.9732049467727 14.34825532608 -1.699890082134
+1.516090775482 12.68339483477 -1.814087212616
+4.8279 17.343872474 -0.08507211423207
+4.8279 17.31339136456 -0.03798803123403
+2.915365194078 14.12424108168 -1.550983985674
+2.917491882151 14.06758875076 -1.536398805963
+1.702895200304 14.64385419373 -3.3934e-14
+4.390792268639 16.78942503362 -3.3934e-14
+2.939659491348 15.02460193271 -1.892533178597
+1.118346697743 15.30707628021 -1.982585402366
+1.488613157185 15.66049204139 -0.9481191024495
+0.8498015428253 15.56410277948 -0.7894774846583
+4.690352108156 15.51680814382 -0.5792571068748
+4.8279 14.5449346686 -0.1794468748293
+4.55349934952 16.5405385288 -0.3360367724761
+4.622283177687 16.53604739113 -0.3282800491762
+3.184743386887 17.10506698802 0
+2.464302564728 15.26897640613 -2.257186723475
+0.4489448494692 14.47061611063 -2.451705502074
+0.5346641927875 14.45886191095 -2.438330897932
+0.4930189966244 14.47296087647 -2.397763676122
+4.551993621281 17.52392639295 -0.5093074794851
+0.3943495655872 15.17946587495 -2.67655019201
+7.78e-18 15.2385973815 -1.057319689355
+3.250056706703 14.56340695642 -3.3934e-14
+3.192674032042 14.5523229089 -3.3934e-14
+3.151486613637 13.48575549233 -0.777653098271
+3.302115227903 16.71379406656 0
+3.306230908037 16.63495710625 -7.495083600413e-15
+2.738806132471 13.41293378209 -1.004164406862
+2.512168130436 16.85449652811 0
+2.002596080143 15.13672537487 -3.3934e-14
+4.321376358087 13.8800072207 -3.38639354427e-14
+1.602521270004 12.72218989232 -1.408379612885
+1.471347278818 15.32222842023 -1.861833146268
+1.504177556351 15.31759561607 -1.899816054239
+1.968426223603 13.25002002521 -2.33633923354
+1.3285 13.06068884525 -1.907949515284
+3.216809129629 14.79691381946 -2.290804886316
+2.718978788726 15.39197971789 -1.335162165429
+4.787997936322 15.42582236348 -1.373819631537e-14
+3.279542588322 14.33419974312 -1.975258562931
+3.268422836317 14.36681501187 -2.013281293254
+3.223917602903 13.51637043448 -0.1359902223195
+3.248720718002 13.51965301603 -0.09221078323307
+3.199112055987 13.51382569401 -0.08153855250763
+1.652225168436 14.69406174864 -3.3934e-14
+2.305164253287 16.27545022093 -0.7557411522211
+1.34005161589 12.98381033163 -0.4551672700884
+3.068970049207 17.33157152237 0
+3.001047508251 17.27741076973 0
+2.691019685052 16.306498146 -0.7502627381588
+2.737011360903 16.28347819193 -0.7543177952762
+3.254439183013 17.35104815729 -0.5660787772406
+3.241927635917 17.40466801004 -0.5566229796847
+2.648398752489 13.41912849002 -0.6780815227437
+2.675867830617 13.42558509492 -0.6355329402973
+4.734698147847 15.2498464844 -0.6152955086398
+4.732817156755 15.26184962366 -0.5471849411854
+4.8279 15.30979412253 -0.01285946422874
+4.205572571029 16.92601118191 -3.3934e-14
+2.424134088079 16.3921879792 0
+4.020131546749 16.66183901721 -3.3934e-14
+1.778396819049 14.80258187085 -3.3934e-14
+2.210029422476 15.50738683305 -3.3934e-14
+1.309585207207 13.83234431073 -1.125106665731
+2.699827805842 14.99398403143 -2.604450797461
+2.70082873169 15.07777510336 -2.574716710019
+2.701029211766 15.02483262144 -2.558476901943
+1.119052657323 14.16583722022 -1.922117525409
+1.149449207347 14.13370436559 -1.85304682061
+1.093796453941 14.2041107473 -1.878579681226
+3.430386878646 16.94473101597 -3.3934e-14
+1.906989473751 16.31685919963 -0.2212648442775
+3.460724136729 15.49225605263 -1.025545550489
+2.083059429915 12.84365574169 -2.264686912521
+4.530443322849 15.17885561585 -1.017809575372
+1.165429989398 15.23774999233 -3.3934e-14
+3.192387566856 15.50172940724 -0.9720224420216
+2.061214348285 16.4140882516 0
+3.451564921361 15.65853640575 0
+3.401923771088 15.66973187357 0
+7.78e-18 15.02513949301 -1.541507001458
+2.326692153707 13.76080113799 -3.36738e-14
+3.743319830237 15.56397812303 -0.6187552954682
+2.4279 13.03064188161 -1.85883966482
+3.819982751649 16.04412185609 -3.3934e-14
+7.78e-18 15.22219038413 -1.287850766226
+0.870340668158 14.31107235508 -2.481148745445
+0.9137377146882 14.28293079015 -2.467083575081
+0.891767609855 14.30726987039 -2.421243711005
+3.145320603211 14.30694950582 -1.21158137291
+2.421976969142 15.97248870541 -0.8097318161208
+2.355167697644 15.98049129048 -0.8077574201901
+2.380755131623 14.17302071672 -2.49908081426
+2.379697737237 14.25277595638 -2.513149691629
+1.30415731598 13.89497134629 -0.3922432549729
+1.066820361956 14.30444856907 -1.234102457443
+1.082921243639 14.2912600277 -1.179204446536
+1.044750007474 14.33361462131 -1.178209879926
+1.718545745448 12.75497248936 -2.249043671049
+2.969620730801 14.08876287482 -1.437765216467
+4.184746813121 14.0922948195 -0.4288152492487
+1.657537015456 14.24395988871 -2.511591936695
+4.513202021793 14.05311856637 -3.3934e-14
+1.399493687614 13.98454265635 -2.465849737862
+0.06185616286286 15.40195261126 -1.026390920456
+0.1142206751768 15.40255294425 -1.04351061678
+0.04512092329677 15.39814634195 -1.078148999697
+2.80742093996 14.17480714136 -1.960962696795
+4.301864020251 16.00250847735 -0.2816713279219
+4.333189207629 16.04211321673 -0.2818756600739
+4.341218181258 15.97386701627 -0.2682265811333
+3.280539917965 14.61327078391 -3.3934e-14
+2.626085877974 16.04672447218 0
+2.596631779452 15.99476016239 0
+1.853584950218 13.81473750461 -3.36738e-14
+1.05908391226 14.89604549628 -2.626566908137
+1.027548503704 14.85703346827 -2.61968948597
+1.207967194881 14.10031406885 -1.303193804185
+1.208783259106 14.10584945649 -1.225745051304
+1.191285977763 14.13160600005 -1.266328034641
+1.239787922655 14.03748696676 -1.263577835383
+2.79235225754 13.941299622 -1.840401269716
+2.789466313489 13.88931802029 -1.840693665794
+2.008405378548 16.43555729917 -0.2417127694971
+4.089034721362 14.34135434749 -1.016601928168
+0.9856946829758 15.29878837163 -3.3934e-14
+1.354470996625 14.16977786818 -3.381789182525e-14
+1.673899775526 14.22748058266 -3.36738e-14
+3.507073039823 16.38219232091 -0.6665863613003
+2.961178214534 17.30747023462 -0.3219417678175
+2.979405525902 17.31955514237 -0.2734847376893
+4.564558757122 17.17493404664 -3.3934e-14
+2.924260488847 13.46669586578 -0.5501491647844
+2.928328047952 13.4695566812 -0.4937862173265
+1.638589669505 12.78367104628 -0.6438053099411
+4.389390353246 14.37922411263 -0.8018648900305
+1.779593939764 14.574492071 -3.3934e-14
+3.590353487591 16.25668950053 -0.5951827216644
+4.173437939482 15.19937091064 -3.3934e-14
+3.60405768815 15.17011389664 -1.067509403888
+1.3285 13.25370776355 -1.688457023684
+3.57789407383 15.87084462589 -0.534079118521
+4.109536377566 17.56103702015 -3.3934e-14
+4.050230749476 17.54423640684 -1.040535514908e-14
+3.124012986875 15.6653905956 0
+3.0788153102 15.61309380353 0
+3.038360273258 14.19119395999 -1.868192350364
+7.78e-18 14.60594775671 -1.905333662941
+2.811184751014 16.78441084007 0
+1.103297757669 14.39687650087 -3.3934e-14
+3.964713224402 13.67099217998 -2.903522652598e-14
+3.154814653353 16.39866779572 0
+2.841315271459 17.08123072758 0
+2.854494129047 17.13551739297 0
+1.731334220356 15.29049099594 -3.3934e-14
+3.868771615055 16.79458137463 -0.5551967161666
+3.158687872148 14.2294115606 -1.651614658502
+0.742931766683 14.50645378103 -2.557873429369
+0.7872249107717 14.56100065081 -2.567489817445
+4.315559377546 14.98883273932 -1.059638022994
+4.331397152177 14.94105855438 -1.046202782678
+4.398272565308 14.97470220504 -1.032098377502
+3.052251972769 14.98799073695 -2.100402740217
+3.012311803763 14.97479767402 -2.174938544284
+2.98005408081 14.98712655766 -2.105400709011
+1.728289521187 14.26618595205 -3.36738e-14
+2.4279 13.07411358974 -1.446873379726
+4.644895230074 16.09506176709 -0.2490363440261
+4.181617403831 13.96037312092 -0.4065377551968
+4.8279 13.9799199714 -0.1735750831047
+4.827900000104 14.0462536313 -0.1843464744724
+4.8279 14.03845684947 -0.1347551826376
+4.252013600051 13.88881968527 -3.389314512747e-14
+4.152125055227 17.77990283127 -0.3781790198777
+1.3285 13.28987630994 -1.616076291473
+2.153864706377 12.94704502286 -3.371487412517e-14
+2.111258488235 14.38468278293 -2.536408870748
+2.115549247748 14.31047938224 -2.523326992111
+1.323768823106 13.76378753119 -0.6950019658406
+1.325655745188 13.72348109836 -0.7315257076789
+2.863965862299 15.53742402396 0
+4.451099718268 15.18723903326 -0.9702375156162
+3.388791109105 17.50232074553 0
+2.376538588335 15.36054374727 -1.51355294307
+-4.36436e-15 14.79543886617 -0.1401808045364
+2.929289911277 13.47861651851 -0.0738002461941
+2.892701481122 13.47347989048 -0.02583815389115
+2.888341890451 13.47249694518 -0.1106161520923
+3.071400306784 16.72953103965 0
+4.129581540584 13.59290857029 -0.1713810187673
+1.335039062992 12.94077764 -1.406344402156
+2.147697427364 15.26030011431 -2.315546487908
+2.189613302777 15.25352042852 -2.359603733071
+2.64596108429 15.25394311448 -2.356764659633
+0.150233136308 14.81209767841 -2.611771255011
+2.959111330565 14.14197345826 -1.46739301393
+2.942808011845 14.10085128151 -1.491554376586
+2.208573290357 15.39810472372 -1.316775764675
+2.233989381955 15.41238236822 -1.275719849958
+-4.436246357681e-15 14.75673023794 -0.1736921222762
+-4.590577793194e-15 14.70812941924 -0.2196260808743
+-4.634858004673e-15 14.69523518729 -0.1518092450959
+-4.58316580515e-15 14.75031777154 -0.2585866649259
+0.2052850256289 14.56972939814 -1.836153388298
+3.902157316508 13.57431089034 -0.4024657992914
+3.994450166357 13.58459897349 -0.4109487110073
+2.101443234497 13.6147745676 -3.36738e-14
+0.3666485544135 15.24926151751 -2.387349736843
+0.4194137494278 15.24852836463 -2.392036985147
+1.554308243764 13.89066755369 -2.449294722535
+3.329737055546 15.52994135728 0
+2.711984290756 13.59868463893 -2.198595711528
+2.473029095755 16.1418577945 -3.3934e-14
+2.388928309427 14.26172348288 -3.367906164505e-14
+2.466280558164 14.24658301821 -3.368491128388e-14
+2.445493830302 14.29413241814 -3.368042447706e-14
+1.959169693461 14.7888326538 -2.607670095052
+4.667952176536 17.72811584468 -3.3934e-14
+2.315818836848 12.80212965443 -2.257360579703
+2.366752277746 12.83543342747 -2.263237661756
+2.382598120304 12.77442058237 -2.252475899805
+2.310141996223 12.73073725072 -2.244780109264
+3.778085089457 15.66086841228 -0.3949525987611
+1.417247684689 12.74808002046 -1.714258502474
+2.4279 13.07936792056 -1.127080000214
+2.016145172578 12.6362825546 -2.04034455488
+2.080691526604 12.63964444884 -2.019418588728
+4.183646186268 16.08229762145 -0.3242172983134
+4.234418832365 16.11035196473 -0.3157662266132
+4.231650942308 16.05597376949 -0.3069865600434
+1.326909660851 13.71554142436 -0.2223829371429
+1.324140967928 13.77147061354 -0.2497567654113
+1.233440247888 14.06729772688 -1.067423261309
+2.037343617403 13.40578613471 -2.363797319934
+2.132105541163 16.57429277546 -0.5231166530918
+2.137718337575 16.5831891708 -0.4456923098849
+0.6794205666911 14.51901429036 -1.716422730719
+0.704345089097 14.50347953456 -1.771703622498
+2.343108346423 16.54821198168 -0.7076389280719
+1.3285 13.37900051066 -0.7468543655147
+1.299594579159 13.88329643698 -0.9916353514102
+4.8279 15.14756305379 -0.02339569940957
+4.8279 15.0662748172 -0.02990300583317
+1.058518114251 15.27788934666 -2.196699375047
+3.783010146573 17.65642385882 -0.5122351576333
+3.72946081148 17.66583228175 -0.4980909602452
+0.5614592676911 14.6392567612 -0.7049156510242
+3.904955169007 17.15883206866 -3.3934e-14
+1.849843183619 13.66485588614 -2.409481846347
+1.882511619851 13.62107391124 -2.401765959817
+0.844912037456 15.36729535853 -1.45656014874
+1.231819292476 15.40835385607 -1.28438729666
+4.506620442199 17.41430200156 -3.3934e-14
+2.849870705245 13.8991472644 -1.66280381677
+1.76771575195 14.6384442418 -3.3934e-14
+2.302667869198 15.25437917331 -2.353739751712
+0.4055266555503 15.39791217485 -1.324312371128
+0.4315677329098 15.38074205554 -1.378857077971
+0.4932931428456 15.37361157601 -1.423655821475
+1.322194083716 13.7927963396 -0.06652395505256
+4.605813955513 15.37497959281 -0.5613636835762
+4.211302522365 16.97756184517 -3.3934e-14
+2.770654483064 16.52533240161 -0.7116790494892
+2.718988077467 16.49960674821 -0.716215435489
+1.786077900864 14.15218529101 -2.495421245289
+3.209703836803 17.4532022294 -0.07609260394543
+1.825977768377 16.21526641952 -0.6403692862672
+1.887145043732 16.28194865073 -0.6711868679881
+2.343286526981 16.2389322775 -0.7621850728245
+1.781281140036 15.7808870499 -0.8730795889988
+3.192350348131 14.18147641081 -2.361327351577
+3.189231282064 14.13806689027 -2.400251306191
+3.18716725262 14.14066649339 -2.458545140647
+4.450252042966 17.11685719151 -0.4508012000862
+1.3285 13.66805698117 -0.1688302322625
+2.599668693147 14.45790975262 -2.549311104067
+2.057013059762 15.44063012393 -1.214796683682
+4.547074928684 17.2899069382 -3.3934e-14
+2.207701084629 14.52526041524 -3.3934e-14
+0.187742109303 14.6430182374 -1.109141444964
+0.5301611154403 15.48296156388 -0.5312855618685
+0.4695339491718 15.46933230644 -0.5617404888618
+4.132368789328 13.88956269057 -3.370640186307e-14
+1.387649189098 15.56550965605 -3.3934e-14
+1.353520601068 15.52713553752 -3.3934e-14
+4.25163625695 15.13207992217 -1.107915619919
+1.758576593615 15.33439847754 -1.759126449723
+3.529620713314 15.56062133152 -0.637715950476
+1.046585339613 14.33613219917 -1.121269231959
+0.9918557030507 14.39063273133 -1.088546903845
+4.522810758232 14.76015428897 -3.3934e-14
+2.872654490224 14.21193628324 -1.750679059028
+2.943786514126 14.21416908958 -1.737814255903
+1.884582465514 13.02226848286 -2.296185843667
+2.283837691278 12.79572151698 -0.8795021990592
+2.306556577177 12.8137832885 -0.834318973014
+4.215628153501 16.68034266809 -3.3934e-14
+4.141467225935 16.63663385634 -3.3934e-14
+4.222703587857 16.61157751662 -3.3934e-14
+1.346252536992 15.1826355397 -3.3934e-14
+1.3285 13.2208718029 -1.803685734965
+1.3285 13.24081243939 -1.869080888835
+4.8279 17.73126318732 -0.09967015856224
+2.246296590574 16.70775818178 -0.4119876554289
+2.571082331956 14.31290331314 -2.523750598424
+2.511434637036 14.34935420912 -2.530180004294
+1.301541132137 15.07222920109 -2.657639713961
+3.832202876357 17.59344781987 -0.523341964127
+3.791134092068 17.11455390478 -0.6077830189287
+4.104892184721 16.52319516062 -3.3934e-14
+0.5419252907514 14.44181382568 -2.546486231494
+0.5658328918397 14.50186561249 -2.557070444142
+4.543526776821 14.39323136446 -0.3997394339508
+4.506691248007 14.34874557406 -0.3975548180955
+0.6670643212309 14.62156950896 -0.2977395120945
+2.20556255089 12.91044252086 -3.36738e-14
+4.499357868674 14.07055028807 -0.3497188208384
+4.558895805519 14.07244355001 -0.3413679704535
+4.618062802415 16.63329048434 -0.3458496246183
+4.270991051369 15.81773210908 -0.2556109732785
+2.704128450855 13.89064458084 -2.395371274226
+2.702969938413 13.87040940466 -2.442664396925
+2.703304443381 13.92230696593 -2.437128331253
+3.14863316209 15.60887209466 0
+3.1998879209 15.60490253815 0
+3.174841853674 15.66220225646 0
+3.193905246758 15.05799843683 -1.70330521715
+1.858115445234 14.37762483901 -3.370750735493e-14
+0.4018223541947 15.45950706082 -0.5023470516146
+0.3513905995648 15.45274719655 -0.4806068644648
+4.724647649607 16.45197909862 -0.307139650481
+4.776384006271 16.45041207242 -0.3057497524505
+3.499184891582 16.68649680168 -0.6832640315534
+3.482088334719 16.64010289704 -0.6914452066974
+3.443314814695 16.67137349352 -0.6859332005373
+2.369159288199 12.89484752698 -0.05296859980184
+2.504026759834 13.79320787928 -2.432126511462
+1.676604207266 14.42550223252 -2.543606132399
+0.06996663662129 15.34391169237 -1.674425165224
+4.375677038941 13.92318715496 -0.3472204680847
+4.346046994691 13.98541930209 -0.3645418438367
+-4.479277354176e-15 14.89785764681 -0.4457736693384
+2.938753637799 15.44996803917 -1.192883132262
+2.981309358834 15.43274774398 -1.227893517365
+1.966993929824 15.68960555436 -0.9273618102514
+1.91793230706 15.71393973978 -0.9118242880011
+1.904208844723 15.76766247893 -0.8804471678595
+4.8279 17.54527876319 -0.02017175594053
+3.767455444539 14.15585018899 -0.6267251414993
+0.536512919226 14.61662911651 -1.15834574141
+2.40980540838 12.95341169874 -0.4377352070146
+2.724807153274 14.01385459943 -2.163397969869
+1.467224745592 13.51524542135 -3.383131336517e-14
+2.706013745146 15.36879347886 -8.332932044382e-15
+4.366229799372 14.62940273645 -0.9803013229676
+4.399850339934 14.5809746063 -0.9622298243826
+0.3086150288875 15.3300707455 -1.796045676668
+0.9003223130732 14.49499470903 -0.5201819328423
+4.8279 17.36082460249 -0.4259619135531
+3.079724206541 14.99962745402 -2.034462424108
+3.108313965853 14.9863979481 -2.109376445462
+3.375025307892 15.14629195984 -1.202492574007
+3.399000323197 15.13694826359 -1.255507634829
+4.532722744196 17.61120482991 -0.5202047317713
+1.116001105888 15.22061308841 -2.563162767847
+1.547149594953 15.34476491593 -1.666171022847
+0.9955453278512 14.23657051181 -2.344311928387
+0.952174077303 14.26542154222 -2.400239891018
+2.593755447031 13.56265463875 -3.36738e-14
+2.657673357283 15.28898939935 -2.117642254573
+2.577863212821 15.28849854421 -2.121164205918
+2.61562465026 15.29701181824 -2.058457883321
+0.9393031639026 14.44736015797 -0.9011745274865
+1.81205761176 15.33500151935 -1.753865904599
+3.616244976882 14.34686919243 -1.405360102381
+3.575635364523 14.29296635538 -1.443050436598
+1.401479646483 13.54751505622 -3.375254463435e-14
+2.384008384284 14.90131715138 -1.868285381871e-14
+2.436362062639 14.87471095979 -2.118679912952e-15
+3.120762332236 15.18138537933 -1.386268115368
+2.522069024607 13.40735592282 -0.4568727132
+2.560945493334 13.41225969786 -0.5046288080716
+4.732090428545 17.84829945903 -0.06355012694735
+4.8279 15.38305545086 -0.5213693045136
+3.706779632971 15.17366479871 -1.047311891454
+1.706218400391 15.2849772913 -2.146117720738
+4.377918181427 16.45399533133 -3.3934e-14
+4.8279 15.5997377333 -0.3885152476143
+4.8279 14.38983842075 -0.06026047465724
+4.81481598114 14.33157203852 -4.50297257586e-15
+1.3285 13.01576090866 -2.27557077782
+0.2879173477487 14.64211475731 -1.120903674184
+4.567241567295 15.32805352418 -3.3934e-14
+3.980282480418 14.96213446048 -1.211244883622
+3.937692820308 14.92538945671 -1.231776327026
+1.152764088484 15.70999842139 -0.471206740288
+1.195731880711 15.73135892406 -0.5100946861475
+1.127097401309 15.69539482368 -0.5254536819477
+7.78e-18 14.68723266702 -0.8665122169517
+7.78e-18 14.73612382781 -0.9449683611845
+7.78e-18 14.6721481419 -0.951749873906
+2.298082812608 12.68888479458 -1.933540154092
+2.267652282107 12.67891189144 -1.881117033418
+2.258737125594 12.66313556423 -1.97297706358
+2.290096646297 12.75023981422 -1.428648840612
+2.322788635649 12.76227755151 -1.513530531539
+2.357993276239 12.79294272041 -1.481995023487
+2.805354090528 17.20451587815 -0.246427846354
+3.660001530725 15.51141171062 -0.9168539339064
+3.689308163556 15.47285208605 -0.9018358042378
+4.241602854503 16.78578210304 -0.4336307990713
+4.269716882061 16.73450568293 -0.4180608883347
+1.544072778295 15.31014175579 -1.958741381013
+4.347859831076 16.88021172722 -0.4269634063751
+4.284613805454 16.88674571872 -0.4413046525348
+2.767066087614 15.21406735957 -2.142208300433
+2.759999375256 15.14404056161 -2.157038329903
+1.3285 13.39825383274 -2.118766292889
+1.3285 13.4414503924 -2.173304931334
+1.923131646237 12.76195304027 -0.98585996764
+1.567737620922 13.31257310966 -2.347363263512
+2.682783919503 16.97898536535 0
+1.3285 13.50505374953 -1.747805483644
+4.358702308887 14.40958164839 -0.629480814392
+1.181317865247 14.12697560781 -1.485805240457
+3.016872454456 14.9449842987 -3.3934e-14
+3.184169398337 15.67253779936 -0.7756853867503
+2.161732824366 15.28097758756 -2.174854451456
+2.150778340005 15.2887487459 -2.119697493925
+2.207128526683 15.28777799101 -2.12650893209
+2.446518425667 15.34405924932 -1.672547852077
+2.658197656019 15.38746974866 -1.363242421727e-14
+1.3285 13.20227418514 -1.379126338018
+1.3285 13.17724446382 -1.331533087663
+0.06863049722953 14.6466383797 -1.060239753938
+1.867010847158 13.02588964392 -3.3934e-14
+4.06278920266 14.46082415295 -1.075649199448
+4.109486325383 14.47283354214 -1.053561792155
+2.085348943905 12.60993590015 -2.196966402279
+3.459827004977 17.42047056396 0
+2.042648186103 15.07305264973 -3.3934e-14
+2.038314793924 15.01237738779 -3.3934e-14
+2.694290275004 16.59023557355 -0.70023156009
+3.824951564667 14.6454715959 -1.263253179774
+2.4279 13.06016137837 -1.051449448886
+2.4279 13.02996294297 -0.9923446346679
+4.395779096344 15.58581060773 -0.4952169037012
+0.7277712791294 15.53096045706 -0.6345953661451
+0.7420123605653 15.53777974672 -0.5820880065964
+3.338483704469 14.439118102 -1.84634465372
+0.5678058157683 14.6256712366 -0.9210411630732
+0.5099910676632 14.64003202042 -0.9017899232374
+0.4829639133433 14.64037166512 -0.958259428426
+3.829807668731 15.5590346236 -3.3934e-14
+0.3326615029641 15.25542313261 -2.347180240358
+0.2628244594277 15.26128164345 -2.30904805946
+0.3143429508417 15.26286677645 -2.29840577282
+1.324984149312 13.72522847147 -0.9287371861293
+2.436694038608 15.20826300045 -2.635488743226
+2.395739250126 15.2133615855 -2.605968187526
+1.015485250405 14.38759427995 -0.8075954527706
+4.194316196383 15.67913369415 -0.2500022451208
+3.706959287309 17.66458504507 -0.1581296486649
+3.698225721242 17.66199248163 -0.1077494297016
+1.809906136293 15.69197329532 -0.9247368227993
+0.9629020271235 14.69993360824 -2.592000851766
+0.05050805759345 15.43416981123 -3.482253369999e-06
+3.101212535579 17.39293749061 -0.2031533510088
+7.78e-18 14.696218948 -2.077752786778
+7.78e-18 14.65195441056 -2.034892532451
+1.3285 13.15258099774 -1.800442116157
+1.581952899917 14.79406589132 -3.3934e-14
+2.779529792397 15.33059424078 -1.79188302377
+1.3285 13.46730287503 -2.017830925441
+0.9433288589059 14.43654625456 -1.018454543498
+0.9392471796293 14.43568772164 -1.072402861638
+1.820739857592 13.00444299363 -3.3934e-14
+3.128666537022 15.32310491475 0
+1.318552452191 13.78173600943 -0.9944125104922
+1.328163602365 13.65669013069 -0.979064601412
+2.674303715256 13.42853604932 -0.5646701496638
+1.795924869101 13.65335264675 -2.407453595873
+1.783148956819 13.70973936791 -2.417391040982
+2.576551667958 16.65322068491 0
+2.099091840303 12.64948301895 -1.956894801404
+2.926329132585 15.35027314117 -1.614416183963
+4.637438417807 16.93596237203 -3.3934e-14
+2.774607222817 16.68833501635 -0.6829414997228
+1.249854831805 14.04055197477 -0.9553122819999
+4.130629379062 15.41283066543 -3.3934e-14
+4.165029453241 15.37266493104 -3.3934e-14
+4.118527627737 17.30522715735 -8.597919652616e-15
+4.064289429158 17.30776924984 -8.973820473964e-15
+0.4860416471641 14.93159557496 -6.975291398429e-14
+0.5451081349526 14.87085225613 -4.201107214772e-14
+0.4129864108238 14.88868248598 -8.17662e-14
+1.344502547061 13.9859471112 -3.390671656296e-14
+1.379864342353 14.03075120796 -3.3934e-14
+1.865113002782 16.26623780482 -0.3886996617001
+2.4279 13.0832302581 -1.99536370897
+2.435675379177 14.37775549262 -2.535186809969
+2.448444880962 14.29457962794 -2.520522394779
+0.2193957613019 15.2809814145 -2.17457862341
+0.1709504492156 15.27566027047 -2.211690879458
+0.2618173848748 15.27467721358 -2.218886597325
+0.1028641490292 15.24106819645 -2.439149833853
+0.04725960056343 15.2404362133 -2.442950895394
+0.1573783245847 15.23830397379 -2.456077898122
+2.24679631431 15.65632290206 -3.3934e-14
+2.294696891516 15.64065137853 -3.3934e-14
+3.237623690034 16.93860655671 -0.6388068405452
+7.78e-18 14.70059563124 -1.102651179392
+7.78e-18 14.75084756952 -1.129801491661
+3.358914005139 14.452079841 -3.375751761121e-14
+3.430954623662 14.46247228193 -3.3866049724e-14
+3.198706956857 14.6806082491 -2.387916509641
+2.622099222371 16.07516449601 -0.7910526476421
+2.427901305931 13.20463204063 -1.72961577874
+1.721045930662 12.69382725006 -1.644864910829
+4.093581609263 16.99829937774 -0.5107752409557
+2.390259772054 12.83995559745 -1.489547384192
+2.379675645071 12.83059296704 -1.433791730487
+3.617547826716 15.20041141745 -0.9023633238108
+3.702712344962 15.19719361137 -0.9139649931425
+4.582800622214 14.1623057368 -3.3934e-14
+4.514458514031 14.11945953455 -3.3934e-14
+2.673753233275 15.89229279836 0
+2.613027197259 15.8330989624 -2.551023502238e-16
+2.610076389983 15.89687201581 0
+2.669561384823 14.36135843808 -2.532293709288
+2.624974127268 14.28178763173 -2.518263273321
+2.98804163808 13.48331214561 -0.3112014591781
+-2.909968629326e-15 14.97883521494 -0.6195715265239
+-2.087851258666e-15 15.0470655907 -0.6362202709564
+1.347357782314 12.87100606144 -1.4731579075
+1.954282517699 16.36507024458 -0.5371311897705
+0.7040901603641 14.56143261842 -1.206917624305
+1.254120972419 13.86806321307 -2.332190080561
+1.226491075304 13.92420558734 -2.357608985095
+3.050283610216 13.49456357207 -0.136230118899
+3.22019183768 14.15523295945 -2.072145448271
+3.729473899291 17.6592241005 -1.624106833839e-14
+3.789306735356 17.67113220564 -2.69654691375e-14
+2.147018862863 15.72600928584 -3.3934e-14
+4.086145640236 17.12209278461 -0.5349410205964
+1.678793534422 15.24884145339 -2.390211982287
+2.673630437962 13.4306886594 -0.5090540752182
+2.612549708801 13.41956819959 -0.5377899626959
+4.568506598878 14.38995125197 -0.7409747355053
+4.623968191278 14.39485977374 -0.713094565819
+3.510595965699 15.249725089 -0.990666363688
+3.475783613251 15.28984453996 -1.026909973106
+1.312271755097 13.74909756085 -1.749213176504
+3.423029585695 17.16139789939 -2.991203661896e-14
+3.489853962762 17.15845044246 -2.561256643116e-14
+3.427982509635 17.22121928646 -3.3934e-14
+2.690434022748 15.1527272886 -1.490595024096e-15
+0.5217608148872 15.47886195215 -0.5920248264851
+2.569054101627 13.42003322557 -0.2864671345698
+3.916769638874 15.60442648588 -0.3895865495776
+2.220508465508 15.71547210194 -3.3934e-14
+1.40093716279 15.31969260612 -1.882385553152
+2.292462836567 14.33206260173 -2.527127618469
+2.311882999566 14.2842390359 -2.5186963454
+4.525216585173 15.18856793003 -0.9626128329584
+4.8279 16.41997288167 -0.02638560827516
+4.8279 16.36818992161 -0.007302362544957
+2.887821161455 14.11226372451 -2.315808001621
+3.174385965432 14.11540106947 -2.297853302703
+7.78e-18 14.95055484992 -1.587453710624
+4.8279 16.99491042465 -0.200784573034
+4.8279 16.95515025103 -0.2545055755708
+1.907827233098 14.86984189425 -2.621960804107
+1.841667378904 14.89851062212 -2.62701785895
+1.893598582519 14.92636775957 -2.631928648606
+3.681597733401 15.30700053454 -0.8774739424276
+3.632329156988 15.28501019274 -0.9071075488475
+2.839648703272 13.4510697427 -0.6247012525208
+3.071593528669 14.11466363995 -2.488790264566
+3.907784081102 15.53487648589 -0.7840361425964
+3.960567955964 15.51708412384 -0.762119268047
+3.932871451548 15.45738016222 -0.7643484464508
+3.887559170412 15.46822831166 -0.7885311694336
+1.41496222338 14.9283424798 -3.3934e-14
+1.380987082836 14.98634318524 -3.3934e-14
+3.122855905675 14.59747329609 -3.3934e-14
+3.239514831644 16.55103952713 -1.88087670169e-14
+3.298861613376 16.56492692689 -3.724924599007e-15
+3.876756052178 15.05861323299 -3.3934e-14
+3.907241480579 15.10173380073 -3.3934e-14
+0.6293277725828 15.4839280541 -0.9904761649766
+0.6174209670602 15.47702885708 -1.053790038955
+1.160653070133 14.21357366573 -0.8567521380548
+1.176635204119 14.18365689716 -0.9073251879577
+3.278454143795 17.48394414523 -0.3886006302545
+3.280100633607 17.48330963283 -0.444484509036
+3.524272304961 17.33922557225 0
+2.36336351239 13.38915723919 -2.360875119033
+2.076322823468 15.20843902885 -2.634418050795
+0.3622832681417 14.68257102762 -0.1435166540673
+3.173279080364 14.08368075103 -2.478150376385
+2.030557967029 12.69465579753 -2.238410123998
+1.996398002849 12.65560812686 -2.231529305253
+2.035629548917 12.61490829135 -2.224357651334
+3.152434232925 13.87258879317 -3.36738e-14
+0.9677370610755 14.42080285853 -0.9728014673356
+0.9228658037934 14.45499035545 -0.9718831280981
+3.876561487619 16.30219898797 -3.3934e-14
+1.058105059784 14.19308330558 -2.23008971793
+3.937725952691 16.18892854061 -3.3934e-14
+3.945794596489 16.13555045605 -3.3934e-14
+3.649311906628 17.59515742566 0
+1.642114928943 12.79934294669 -0.1198269454568
+3.068481819052 14.96441139714 -2.2339611805
+1.392493507883 12.74176464182 -1.928305943338
+1.409822999919 12.73368883959 -1.853490277212
+4.607057628501 17.71141790557 -3.3934e-14
+2.827818368023 17.00911584617 -0.6263729638642
+1.762290160459 13.57464654048 -2.393580046215
+3.355650348096 15.27665467863 -3.3934e-14
+3.542087135865 14.41392146026 -3.391917523795e-14
+0.7605856123259 15.31730920185 -1.901800543888
+0.7264608263512 15.32318888298 -1.853921396792
+1.520786344127 12.81130587805 -0.07705888177175
+1.439392195052 12.84777781363 -0.05233218518769
+1.481551378835 12.81900964475 -0.1195949757874
+3.451331307762 14.36869824157 -1.626418921805
+3.432153391938 14.43186920446 -1.667640814657
+3.480452188316 14.432916109 -1.593468424838
+3.421411710842 14.37524677272 -1.675939481342
+3.700951795464 14.38667100964 -1.32538226933
+3.705094933365 14.4368324164 -1.330201618513
+1.668710149015 15.29265052672 -2.091155776494
+4.318587871301 13.71455830516 -0.3237859970032
+3.867402064799 14.97424267839 -1.28910463962
+2.846082028862 14.01400239384 -1.692466736348
+4.636013165667 16.82247276018 -0.377842351288
+4.68951725457 16.83240422056 -0.3763477809393
+4.66047197564 16.77953716735 -0.3687883071804
+0.9181019326612 14.36554914946 -1.903772464929
+0.9691498912858 14.32295986628 -1.92868040259
+4.571344368205 16.13185056348 -3.3934e-14
+2.607256551316 17.04491749908 -0.5883460367446
+2.559400971028 17.00671888293 -0.5341394115327
+1.136339076593 15.00016239364 -2.6449380047
+1.10356664417 15.04785380985 -2.653344513441
+1.048181593868 15.03718747482 -2.651463736823
+2.888068846767 15.02748759509 -1.876373689646
+3.109420807347 15.04385231444 -1.783407795544
+2.399302052829 14.77309507608 -2.6048945282
+3.146379040876 16.34012283229 -0.7443361658515
+3.203783879747 16.32327915743 -0.7473057026086
+3.152523454627 16.26193830026 -0.7581246034162
+3.087777244711 16.32791424376 -0.746486261151
+3.463359228774 15.53806369763 -0.765986550881
+1.3285 13.17670986508 -1.733986908294
+-4.369162715196e-15 15.18630853741 -0.1045156382841
+-4.444378883458e-15 15.23709346279 -0.09399166388055
+4.820369319997 17.02376539722 -0.405967426469
+4.814223399402 17.07578500272 -0.4152633530901
+1.04386578873 15.34853930707 -1.630563192894
+4.00060333921 16.60893089175 -3.3934e-14
+2.801244293118 13.86429685725 -1.797666442545
+0.4688757200502 14.66082312562 -2.585097543241
+0.4526969852341 14.60602509864 -2.575437246162
+2.088557816578 14.82370619498 -2.61382264177
+1.3285 13.36181493086 -0.9188841986261
+1.3285 13.31221486431 -0.8845882213263
+3.846910146977 15.40918984245 -3.3934e-14
+3.894490413433 15.38342533494 -3.3934e-14
+3.137220561425 17.40772596695 -0.474996669803
+2.237570753576 12.73522767117 -2.245568099324
+2.185507013754 12.73421426865 -2.245389388118
+2.196343917331 12.78437459727 -2.254232175003
+3.999708876391 16.20725111443 -0.4024587732471
+0.7894690066493 15.54522547709 -0.7502169117021
+1.434439365522 12.77671492037 -1.382471626168
+2.49536623479 16.95483238326 -0.383912237226
+1.724563629549 16.10985039364 -0.7107843032998
+1.747735956375 16.13413789594 -0.6698176473245
+1.68665606502 16.07497783807 -0.698454347087
+2.800241765984 13.67987761436 -1.768435995875
+2.813875077112 13.75593214228 -1.737525860108
+2.82429176953 13.6920484394 -1.696971164373
+2.299469937346 14.8884420958 -3.3934e-14
+3.744986538443 13.94391486942 -3.3934e-14
+0.2841406562271 14.68131645166 -0.3260494709642
+0.3637822647682 14.50652507534 -2.270687616419
+2.664726869958 16.71747043443 -0.6778015787089
+2.714417499861 13.64907766782 -2.186184154162
+1.379569615093 14.08683558785 -3.3934e-14
+7.78e-18 14.59285220746 -2.029486648581
+2.4279 13.05761573222 -2.041995919307
+1.4222965807 14.35339969628 -2.530886966557
+1.36009119468 14.30179177128 -2.521791805043
+1.356311570537 14.36514248506 -2.532963230236
+2.671626675059 13.26083644412 -2.338241764761
+2.613530867488 13.22859869729 -2.320538771306
+2.640873412087 15.74480114326 -0.8928640645146
+2.467681495328 16.63122682429 -0.693002209727
+2.890308207531 15.47073992108 -1.147903584176
+2.824244291854 15.47360502185 -1.131630741533
+0.187031826727 15.41911608494 -0.8403570374132
+3.544963143389 15.57961824882 -0.5301758932954
+3.609075592561 15.58947163615 -0.474368434706
+2.038416038906 13.69300256254 -2.414448298197
+1.29118365738 13.92055421037 -0.9407424849801
+1.864909854186 12.776987654 -0.7662119382157
+2.538477990475 13.40615384868 -0.5618476978614
+4.608660166552 15.37195802552 -3.3934e-14
+4.605682923343 15.45512596502 -3.3934e-14
+0.8543834111335 14.93386946254 -3.3934e-14
+4.621383107156 15.26516337864 -3.3934e-14
+0.756454337274 15.52221441842 -0.971492352444
+0.8153468304388 15.54389452005 -0.9313853949437
+1.174930854013 15.21426519767 -2.600618930065
+2.704260481228 13.25701124103 -2.277841486023
+2.507500321581 15.36691520027 -1.459970961426
+2.50573470748 15.36069603224 -1.512274401055
+2.451844308214 15.36081391768 -1.51113379304
+3.772359647535 16.81230481183 -3.3934e-14
+3.7121381071 16.78682382548 -3.3934e-14
+3.740772132862 16.72815210512 -3.3934e-14
+3.300141923126 15.65920526668 -0.6801610366757
+3.2447284077 15.17902533643 -3.364154811208e-14
+3.433773049678 15.21356150321 -3.3934e-14
+3.441531238893 15.27395238952 -3.3934e-14
+3.397759419652 15.24888181412 -3.3934e-14
+0.4530875119065 15.35901816397 -1.529040731946
+0.4903429946936 15.35494965711 -1.569832419634
+3.474729152578 17.46890907159 0
+1.446213912685 15.42585818643 -3.3934e-14
+1.407682624551 15.38158573253 -3.3934e-14
+2.795060940757 16.81163088909 -0.6611977181713
+3.366252481019 13.92122510742 -3.36738e-14
+2.260601401344 16.72494021992 -0.3468508047764
+3.634086006259 17.17923618145 -0.5963824094081
+3.614970765792 17.10575568902 -0.6093331529435
+1.028379822054 15.45794784391 -3.3934e-14
+1.011204174929 15.40431651827 -3.3934e-14
+3.108926939703 14.17846923471 -1.940364132661
+2.703802380008 15.11466538475 -2.526758328292
+1.02492377346 15.64766430209 -0.4982594821748
+1.388649027532 14.51399228558 -2.559206208159
+1.428545630601 14.48270111595 -2.553687319945
+1.380307582249 14.43114504995 -2.544598916078
+2.388933261779 13.2847885467 -2.34245827424
+2.393025441925 13.34108997163 -2.352392309119
+1.3285 13.64693049573 -0.7311993956424
+1.3285 13.59483487841 -0.7507452192647
+2.711382445017 17.12944109359 -0.5181397163767
+2.231168823683 13.73100231025 -3.36738e-14
+3.570201390511 17.61400270966 -0.2665021186583
+3.530919373056 17.59932413471 -0.2060550613793
+3.563792133072 17.61287277456 -0.1684376083375
+1.3285 13.18481626161 -1.842279782602
+2.391074950463 12.79507978838 -1.843972935728
+4.226692114108 16.24376676707 -0.3412109850352
+1.203025440884 14.18077820614 -3.3934e-14
+1.330487491893 13.00989424171 -0.8856201576137
+1.3285 13.0330337525 -0.8307763330349
+1.3285 13.05693214299 -0.9317543004885
+3.26158421968 13.51113667006 -0.522261089784
+3.25756002233 13.50854929782 -0.5755543185166
+4.079725845195 16.08919060597 -0.3551741664232
+3.666773083654 14.36341860527 -1.354497553906
+3.696308713771 14.33051584709 -1.319981949269
+4.098044902876 14.17519173108 -0.4735428105396
+3.560211559104 16.96480389168 -3.3934e-14
+2.427901494136 13.25513431263 -1.781524645886
+2.4279 13.23055698083 -1.825187663319
+4.538808525674 16.47979034447 -0.3268023489948
+4.8279 15.43163891114 -0.0740674788315
+4.8279 15.47534675337 -0.02094256367515
+0.7025696529459 14.52397352305 -1.59993645717
+1.957942135589 14.66866152867 -3.3934e-14
+0.7386713744802 15.3405018545 -1.70498542909
+0.7533416839122 15.32940928971 -1.801669981198
+0.7876010492466 15.33834470458 -1.724342381991
+2.712785186322 14.82614252227 -2.614251243689
+1.115657865264 15.64163315435 -1.791512520205e-14
+2.758874857891 15.53129520449 0
+4.262564876315 16.66295244023 -3.3934e-14
+4.277761025778 16.71064471439 -3.3934e-14
+2.332187214963 12.68077264305 -2.235966000511
+7.78e-18 15.1995393718 -1.770123226957
+3.170010599927 14.17707464825 -1.948399618111
+2.445337395205 16.90940185656 -0.3664499857951
+2.129190833677 15.32090559408 -3.3934e-14
+2.700263525435 15.3190918986 -1.887699446665
+2.677042703791 15.32513733314 -1.838081211334
+3.319513398151 17.31502086557 0
+2.393801261657 15.27072719451 -2.245240110113
+7.107925273165e-07 15.4021121337 -0.8151499225269
+3.221081529088 15.41152612663 -1.279559203581
+4.176196092644 13.76220762024 -3.36738e-14
+3.786314813899 17.11719945958 -3.3934e-14
+3.830449468853 17.15244898274 -3.3934e-14
+2.501603320334 13.89703818144 -2.45041912779
+2.52267378747 13.94570931009 -2.459004595974
+2.51665370946 13.84624459486 -2.441472007396
+4.258394664144 16.92779248637 -0.4542290581306
+3.955840676065 16.93629914611 -0.5462470518305
+3.989639847234 16.86813188964 -0.5220263110946
+3.915242227458 16.85841155067 -0.5477208140748
+1.480185314425 12.7752397333 -1.076551827937
+4.8279 13.79924083716 -0.01005055761956
+4.8279 13.86474108148 -0.0001788749910921
+4.777365937221 13.80851009659 -1.726042160379e-14
+3.195921399865 14.28320154791 -2.342854319117
+0.723723978389 14.39074940129 -2.480079024693
+0.6765663394723 14.40826390615 -2.486419596451
+3.307469491794 15.12688466973 -1.312519295228
+2.081849480753 14.00064149118 -3.36738e-14
+2.081862968037 14.06876657748 -3.36738e-14
+2.979641889554 14.17495781154 -1.435281775186
+3.57649220829 15.37687682823 -0.9629150046281
+4.575678768425 13.94875423526 -3.3934e-14
+3.048537939807 13.85739236688 -3.36738e-14
+1.16463086778 14.13570467344 -1.658596967042
+1.127313007503 14.18166823568 -1.711162153818
+1.203054546898 14.06899667562 -1.67709114233
+1.125830613523 14.19420300381 -1.621979263345
+2.57782438208 16.64874983483 -0.6899170881983
+3.633922877531 17.6396934117 -0.02584038529982
+3.682188153914 17.65687139556 -0.04206942556688
+3.634265383885 17.63957318954 -0.1058148447424
+1.3285 13.30281895852 -1.874436202808
+4.214121162389 15.4934824937 -3.3934e-14
+4.211620716076 15.56718791271 -3.3934e-14
+3.263604267912 14.31517670943 -2.020172110925
+3.546961518993 16.460183341 -3.3934e-14
+2.949696372381 14.36275763223 -2.532540184162
+3.07969678679 14.37360942981 -2.534456941464
+4.571564673577 15.32706015019 -0.5570729132867
+4.199191511946 13.59524843108 -0.2366523735566
+4.188436256806 13.5956924919 -0.1747421025527
+2.73683345271 13.59144318716 -2.014027420348
+2.52235687026 14.71948675336 -3.3934e-14
+2.488807447628 14.80711536682 -8.808939222135e-15
+1.715237912004 15.1617861513 -2.673431023948
+4.8279 17.05364647151 -0.03286778750244
+0.5611369732892 15.24168214875 -2.434966021093
+1.35068615259 12.83662150439 -1.706882095722
+1.341282661963 12.87976100205 -1.654490565101
+1.341350615296 12.86429064364 -1.768340896804
+2.97403479204 15.35385903848 -1.580131103905
+2.97473 15.3474 -1.64195
+4.724452473296 14.27525801206 -3.3934e-14
+4.783794247687 14.28069334827 -1.517935698786e-14
+0.2355717807731 14.64109750708 -1.134139960437
+2.541008540315 13.53997019765 -3.36738e-14
+0.517762749326 15.4715759228 -0.7404928071057
+1.308070416496 13.81630504299 -1.378553905924
+0.3079147348645 14.59079664131 -1.660676573157
+2.462344473086 14.74310135193 -2.599606220705
+2.403755208676 14.72262060056 -2.595992014038
+4.684208800734 15.24955925673 -0.616919529897
+0.4703767836392 15.47746698263 -0.2607261698854
+2.802747940483 14.91480494951 -2.515431701991
+1.828087287265 15.32454682221 -1.842927471083
+2.723727525456 13.40307644384 -1.09992067172
+0.01122105214788 14.67153208116 -2.58698883137
+3.364284987374e-15 14.61090792321 -2.567270511943
+3.046752088997 14.90140085501 -2.591332293387
+2.984716509208 14.9078349833 -2.55472856168
+4.114696294106 14.56868647371 -3.3934e-14
+4.121084570634 14.51055103888 -3.3934e-14
+0.1247319327855 15.28045048348 -2.178491444301
+3.529109128061 17.59925505453 -0.1325084609631
+2.134073384552 15.62606581062 -3.3934e-14
+2.09191045701 15.55600694683 -3.3934e-14
+2.143151804529 15.56930759916 -3.3934e-14
+2.203246843164 13.53006225907 -2.38571338406
+3.582505687007 15.55851061364 -0.6497591215666
+1.381199948994 14.99006504355 -2.643153421284
+1.385509154739 14.92839388156 -2.632280485491
+0.4012980279809 15.32399582641 -1.847904744289
+4.117463815931 15.72514267202 -3.3934e-14
+1.861977610022 15.30371001474 -2.008688035278
+1.903967970031 15.36062275556 -3.3934e-14
+4.272961779383 15.08209217679 -1.091107368259
+4.477267582444 16.46675423792 -0.3326511962977
+0.1676644703969 14.59623827228 -1.611938974913
+0.1236144705204 14.58989492381 -1.667961313161
+2.918906739866 13.89864602809 -1.503551822726
+2.90188390801 13.92411433054 -1.544862633492
+3.369429874587 16.59853147207 -2.314255743751e-14
+1.771911635989 13.14232875189 -2.317345202107
+2.767448806155 15.80675982324 -0.8612072898991
+2.703195208686 15.84764015431 -0.8453361956202
+2.769521616689 15.85674534895 -0.8420235701841
+2.21452655839 12.67278970454 -1.850887315058
+1.223925157584 15.21189091325 -3.3934e-14
+1.775740794315 12.67356631853 -1.794087020865
+1.810506972186 14.70585232998 -2.593037052375
+1.801074751117 14.76738100051 -2.603887866485
+4.180303231387 13.73856346844 -0.367839010398
+2.133919289077 15.37618717305 -1.402822487396
+2.211939369124 15.38376399021 -1.364925841038
+2.424654475275 13.00744542027 -0.8303741312063
+2.412551381748 12.95160977343 -0.767698487901
+1.761221262414 13.66308418511 -3.36738e-14
+2.721404536142 15.02909710581 -2.337339988551
+2.556059344892 14.58772527774 -3.3934e-14
+2.553575825336 14.67816526051 -3.3934e-14
+2.388598192078 16.8519967701 -0.5051119474269
+2.372762903415 16.83497108594 -0.5505378285874
+2.336174444158 15.26884673367 -2.258106998961
+2.013454147915 15.8044188362 -0.861878711685
+2.062600723914 15.79430901618 -0.8668993019661
+2.308819707017 15.44423317094 -3.3934e-14
+2.398498623916 14.78299134446 -2.98609675771e-14
+2.393987419945 14.8385287951 -1.79259691096e-14
+3.677844089505 15.24613742561 -0.8690649881096
+3.73181025135 14.36401774628 -1.292349803396
+3.852622059064 13.72119019675 -0.5028790868158
+3.471847873153 15.09307110851 -1.504555567573
+3.4016996984 15.093992857 -1.499313028399
+4.827900000016 15.41659603669 -0.4347076099951
+4.8279 15.48756376646 -0.4680968142367
+4.8279 15.45687725861 -0.4042302773234
+4.294477175257 14.41166950305 -0.6176927274955
+4.333611516891 14.41716005912 -0.5864873350219
+4.293123815507 14.42610814127 -0.5358379632159
+1.373107009109 13.60171679409 -3.382308988275e-14
+1.395604201542 13.6934015103 -3.3934e-14
+3.759050747712 15.19137032736 -0.9468843831496
+1.531325334687 15.45140470858 -3.3934e-14
+2.606072085718 13.36517763234 -1.309474985422
+2.049446907499 16.0802228738 -0.790161623822
+3.041252065781 13.45777950578 -0.9887345758884
+3.096423163285 13.46586873466 -0.9764324920437
+3.059543671199 13.46347130388 -0.9419861348143
+4.5951641745 14.42432050534 -0.3991408069826
+2.087045206435 16.52373227042 -0.4441793548697
+1.627132619268 15.84572833413 -0.8455858012152
+1.626788994302 15.9028224542 -0.8280635218656
+2.558112931143 14.75695131045 -2.76714065559e-14
+2.624459184424 14.71421956966 -3.3934e-14
+2.549620849874 14.83324657124 -9.641209261862e-15
+2.151443952887 12.68785181551 -1.689892634468
+2.227418491637 12.69355515047 -1.721396073763
+2.198382771796 12.69746178362 -1.64837360302
+7.78e-18 15.0038785409 -1.593930458224
+2.302112259687 15.29694093054 -2.059467496974
+2.308890917963 15.28959147201 -2.113639230579
+1.833684772375 14.82924905802 -2.614800381784
+1.897635205473 14.79937060693 -2.609530345396
+2.891531619176 15.49680606116 -1.037953833167
+3.040397530542 16.96993874769 -0.6332886551415
+3.01965508952 16.92378907632 -0.641426447434
+0.149579978512 15.43937742167 -0.1149560278561
+0.1152631763385 15.43781138497 -0.04431610102344
+0.1930767830928 15.4424186403 -0.03462536072887
+3.086170752402 16.94724306175 -0.6372864908844
+1.196687234087 14.17314608052 -0.4171548635038
+4.414840778492 17.58384541705 -0.5250299670338
+4.356538480032 17.58998723938 -0.5239482938488
+3.475151865227 14.82182876174 -1.669358160373
+3.471969699973 14.87761667003 -1.684151664462
+3.520777573309 14.85363560025 -1.610859077099
+3.527222564053 15.10058979347 -1.461821351276
+3.464536882154 15.1095490891 -1.410985744907
+3.261523628969 15.38159624331 -1.249030155311
+0.9665744868667 14.93481742122 -3.3934e-14
+1.017634260382 14.38882744404 -0.7495457498365
+1.936634094583 14.2879702917 -3.36738e-14
+3.62418801941 15.12015446427 -1.350701451216
+2.862107946788 15.4192392518 -1.259388749605
+2.888450899955 15.43858254011 -1.214167921521
+2.677023625419 14.86298594944 -2.620748434692
+3.717587362987 13.78942215661 -3.370497493778e-14
+7.78e-18 14.90332648155 -1.406018121438
+7.78e-18 14.95502388133 -1.414813025148
+7.78e-18 14.93209014234 -1.466864508823
+0.4935407377728 14.72641642314 -2.596660836164
+0.4262285706165 14.69945880631 -2.591909399376
+0.4470596608338 14.7529375398 -2.60133847599
+4.119929439478 15.25950255815 -3.3934e-14
+4.16284099242 13.97422791845 -3.3934e-14
+3.247281693694 15.42947549139 -1.236493024768
+1.093562588836 15.12439881046 -2.666836038852
+1.020956030654 15.08586957353 -2.660044750328
+3.656217322424 14.34524105667 -0.9944870957956
+3.589317072206 14.35235435897 -0.9543054354543
+2.720286575616 13.66789993618 -2.13811440497
+4.578868739836 14.37821003653 -0.8075985238149
+4.523136022537 14.37910534855 -0.8025307676513
+1.641474557867 16.04417430197 -0.4142246318712
+1.586766003353 15.99670450844 -0.4708864024236
+2.255513843657 15.29135778883 -2.10071550938
+2.248552725133 15.2986341218 -2.046698361051
+1.445235461443 12.83861526279 -0.3717760356478
+1.591734799312 15.22006084203 -2.566853140638
+1.616571668238 15.22735288936 -2.523000967454
+0.6272457480951 14.62100657359 -0.7221849351863
+0.5808186472332 14.6313008673 -0.7676175522425
+3.26388716083 17.48068936183 -0.01555405214931
+2.958723592881 14.61216610525 -3.391132133778e-14
+3.93694407103 13.93172071931 -0.4981641564049
+0.006567894113457 15.40107648232 -1.023457429422
+3.050537084828 16.38965956164 0
+0.3397573183801 14.68433139423 -0.03268016679221
+4.112397930976 13.66148386107 -2.295151113029e-14
+3.860522653925 15.64236144759 -1.981149361164e-14
+3.799601478541 15.65609659236 -5.972924583054e-15
+3.794571731842 15.60130016276 -1.111284993217e-14
+0.790377738505 14.62906147697 -2.579491703899
+1.1204789819 14.24795526783 -1.142861923746
+3.313850246852 15.45344277933 -1.187667634186
+1.001111903434 15.61587757181 -0.9474771550463
+1.047076187629 15.6373870946 -0.9363842479462
+1.018623192668 15.6049172226 -0.9938157896767
+2.772510355459 14.15039589562 -3.380551836313e-14
+3.959600651823 16.06566887929 -0.3912455588154
+4.132931418984 15.47786677502 -3.3934e-14
+1.988695141696 15.35028941071 -1.6144344432
+2.069419184824 15.34642443173 -1.651388423271
+2.016454183522 15.34493620764 -1.664844954406
+0.7924414252277 14.51594692037 -1.258013016914
+0.7662840144668 14.52290322603 -1.320733302929
+2.467167138372 13.85750076631 -2.443450276015
+4.548512720959 14.3643798723 -3.3934e-14
+0.9974483468997 14.30692511803 -1.855102521201
+1.051809665965 14.24878879143 -1.894047860434
+2.899337130243 14.16240398228 -1.592377596944
+0.4865763021417 15.45364941084 -0.9482443036183
+2.171848649542 12.68472673021 -2.23666444954
+2.281288339844 16.75075256911 -0.04634769235545
+2.319257335852 16.79004377129 -0.05398121039089
+2.000064911368 14.48202112436 -3.3934e-14
+2.218295426302 14.40510505802 -3.3934e-14
+2.181476717162 14.46240341863 -3.3934e-14
+2.250479864887 14.4702728742 -3.3934e-14
+1.298539733601 15.79363723185 -0.4119773759882
+1.336039298711 15.81803127567 -0.3545526202953
+1.441639413223 15.39174489085 -1.339132813934
+1.402825060049 15.38218913445 -1.370674046705
+1.404372853345 15.4025497114 -1.303591263592
+2.43388729206 14.0049107193 -2.469448443985
+3.858947537411 16.75928084777 -3.3934e-14
+2.679908937607 13.32805617408 -2.350103602186
+4.191729390046 17.45617854635 -0.5475424259345
+4.127254569602 17.43073313436 -0.5520264626757
+3.261623880188 13.83964610422 -3.36738e-14
+2.55650107956 13.22704661331 -2.273183051172
+4.143401739422 16.08942114161 -3.3934e-14
+2.33248053031 16.60694864903 0
+4.031290819704 17.13473645505 -0.5546385969922
+2.54286441034 13.6638392841 -3.36738e-14
+1.602983364424 15.80248868647 -3.3934e-14
+1.492064542754 15.85298835467 -1.011207849475e-14
+1.42855184685 14.96098684306 -2.638020265547
+1.408332579631 15.04019943803 -2.651990452919
+1.3285 13.52032322157 -1.021380150549
+1.3285 13.47362134042 -1.056502433987
+3.677234899142 17.65084403005 -0.3888369672041
+3.704458183875 17.65935837083 -0.435177342198
+3.631155114919 17.63433829322 -0.4029550996114
+3.541610444919 15.30163021644 -0.9761085413025
+2.236893305862 14.95816342366 -3.3934e-14
+2.802463636245 16.47769397023 -0.7200792362506
+0.2529374885319 15.33510184244 -1.753115630728
+4.032786314423 15.05028167894 -3.3934e-14
+2.748952710088 13.8802120038 -2.003434383243
+2.76611705746 13.88231114006 -1.927302130659
+2.699800927255 15.11160007957 -2.625116769974
+4.8279 14.78169959781 -0.8621353657325
+4.8279 14.76892375982 -0.9163461742043
+1.565072022632 14.05165513711 -3.372427778149e-14
+1.3285 13.13897670812 -0.9379537229346
+1.3285 13.08866642055 -0.9715460096101
+4.245617377254 13.59806696212 -0.1891506444924
+4.241956893047 13.5966527676 -0.2673575257609
+0.8898825084383 14.41990270553 -1.633091657614
+0.9008090868957 14.40122790567 -1.723222121427
+0.9340620215028 14.38038232094 -1.689611677588
+4.317938332007 15.23620509588 -0.6927296516496
+4.325619414218 15.22679879751 -0.7460721878681
+0.2482255478412 15.01946991804 -2.648331355816
+4.633397869384 14.14756382829 -3.3934e-14
+2.436550453836 13.28959170564 -1.718414476119
+3.041984565858 15.55363077687 0
+1.535906271431 14.60803955806 -2.575796693087
+1.52670738658 13.24145171648 -2.334821272976
+1.552471917178 13.19130248766 -2.325984179092
+1.454111844406 13.21577532252 -2.330294406613
+1.379633341732 13.2420993803 -2.334942134396
+2.617367795596 16.09621268054 -1.845265070042e-15
+2.564909172729 16.0416657707 -1.811412397124e-14
+2.226188327337 16.67948715248 -0.6123396724844
+2.449872958855 14.7717689328 -2.378736992796e-14
+1.974080954463 14.06529431875 -3.36738e-14
+1.73573599043 16.13565020728 -0.1470409519989
+1.776713767984 16.17552816073 -0.1639461668308
+1.725694484243 16.12528447783 -0.2080055337758
+0.2805632340731 14.80423834646 -8.17662e-14
+1.821660843226 16.22266476988 -0.1320554990538
+3.90140444376 14.41919290384 -3.3934e-14
+3.878677120674 14.46837481659 -3.3934e-14
+3.838760075671 14.43174120805 -3.3934e-14
+0.5275268004614 15.1598231048 -3.3934e-14
+2.996835716957 15.85177669949 -0.8444918769224
+3.448137958316 13.54117274517 -0.1243402307498
+3.385605688165 13.53483742394 -0.1030706148559
+3.380275832108 13.5337238491 -0.1541232892776
+3.41417713652 14.97197099748 -1.793547136907
+3.425177403312 14.90550684655 -1.763186577445
+3.398398192182 14.91857701684 -1.811374458484
+2.241293197971 13.57369580848 -3.36738e-14
+2.17234855873 13.60483239238 -3.36738e-14
+3.082038711329 14.45304676096 -3.370142019156e-14
+2.046455635898 12.71779604867 -1.4484008963
+1.348244630058 15.82769957054 -0.2696499467051
+2.776674167267 13.75579007609 -1.863728913681
+2.780280561722 13.6929113848 -1.83854024237
+0.2021076787597 15.00512075092 -8.17662e-14
+2.4279 13.20132156639 -0.2043587700768
+4.703584802676 16.87485323877 -3.3934e-14
+4.653174999299 16.87661790886 -3.3934e-14
+4.685407926023 16.82436426075 -3.3934e-14
+4.751238457269 16.85831868281 -2.639440737665e-14
+3.348001880489 14.68924353023 -1.869693733142
+3.31447572921 14.70543954487 -1.94851269332
+3.336347442973 14.73607219947 -1.903317684067
+3.367387031134 14.73094396861 -1.837442765171
+1.3285 13.60278663362 -0.405960052978
+3.927217948629 16.73979145642 -0.5222111711583
+3.976842909732 16.73733858242 -0.5035671540742
+0.4119344552078 15.42457820232 -1.174784644901
+0.3768935419824 15.41356217735 -1.248857643008
+0.3318599904533 15.41125544719 -1.191890912186
+2.809004156221 15.28957914824 -2.01046690157
+4.330117923083 15.92469894915 -0.261995983038
+1.301693497101 15.77693337162 -0.8735599515434
+2.416576707332 12.99311179151 -0.1594276885634
+2.641870584431 15.97399798837 -0.8093618191548
+2.682255409195 16.01360609975 -0.8019056019224
+1.2025362348 13.98481279515 -2.279972338846
+0.004073152011936 14.92634252676 -3.080680079538e-15
+-4.67051e-15 14.87801703033 -0.02472047747495
+0.0005892198707909 14.82952376284 -4.455299277716e-16
+1.3285 13.55156750744 -1.559316234121
+1.3285 13.50435852888 -1.593904031225
+1.327530557215 13.61362701983 -1.577479390374
+4.808824822446 14.38346247311 -0.7778479224376
+4.280932558166 16.08474733483 -0.3008461690442
+3.026645940963 15.03587856266 -1.828659539373
+1.3285 13.11407476014 -2.256639663502
+7.78e-18 14.67820940339 -1.531940181934
+7.78e-18 14.66047172409 -1.595057737717
+0.01596972973245 14.60486030977 -1.531740131182
+1.611346593133 14.22172116522 -3.36738e-14
+4.353966258221 15.57432239691 -0.560030047251
+3.624971609353 17.43136654049 -2.645772055208e-14
+0.7519202059651 15.55038048455 -0.1311476673256
+0.6964284411162 15.53375185065 -0.1370987912527
+2.863159387488 15.47279771912 0
+1.651403320968 15.77214626901 -0.8776495822592
+0.1941921877848 14.68021562905 -0.3717390601003
+4.699733156296 17.84741027515 -0.02091634492808
+0.2107297568095 15.44361164654 -0.1211766663863
+0.2651638698626 15.4490324241 -0.0928312453013
+1.636821006659 16.04317374599 -0.2664436248167
+1.69548810351 16.09619720055 -0.2392957670334
+1.707952473284 16.10686032832 -0.2889798794474
+1.751497773463 16.14925024786 -0.2782066015564
+2.421313418048 12.89622171009 -1.773477555755
+3.25309548941 16.99483230194 -0.6288982154019
+3.277360264664 17.04429034093 -0.6201741402614
+1.747341139371 13.09104596867 -2.308295655778
+2.220715294401 16.68467662548 -0.05512965594161
+1.3285 13.02821311239 -0.9737740787881
+2.410591645206 12.90826644901 -1.208600125874
+2.415484611102 12.92734762326 -1.262612543814
+0.1490585632852 14.68499210269 -0.00258893217963
+0.1694604086327 14.74188879791 -5.910988192083e-14
+1.3285 13.35875956277 -0.8462480112848
+3.807839612195 15.6020677575 -0.402862312326
+3.066834077309 14.08045381577 -1.275707815783
+3.370678781812 15.06238403744 -1.678548434836
+4.611201366245 15.71418363829 -3.3934e-14
+4.70595112484 14.80831386986 -0.9492954597437
+4.726194744666 14.75990062655 -0.9393513753666
+2.870632848534 13.4394271173 -1.530851057322
+2.889644040099 13.40546398063 -1.479921395889
+1.3285 13.00928792063 -1.954120291983
+3.252163074736 14.31482395477 -1.167121381331
+3.246340980426 14.36281284631 -2.086630636054
+1.962146248112 15.08313753195 -2.659557705846
+1.790650941182 16.17847365633 -0.6303840268624
+2.681523961478 15.50304135033 -1.109012464555
+2.705853166558 13.4334789527 -2.259044614328
+2.709862089468 13.40824405302 -2.195963354021
+3.751199696887 15.02375423577 -1.391264705159
+3.754874963264 15.08174009409 -1.397996206844
+0.6972817862786 15.19299236286 -2.678936647348
+0.721330190935 15.14583742068 -2.670624042125
+0.6163493213473 15.18505345048 -2.677534835727
+1.3285 13.41153988207 -1.523846921248
+1.3285 13.43953831494 -1.472393213792
+4.052962409414 14.66089243728 -1.116188482206
+4.027993450353 14.58664470641 -1.116521642926
+3.998480159492 14.62587845347 -1.141067215073
+1.343311277435 12.81799865908 -2.014116922954
+1.36528190411 12.76416703289 -2.050158078405
+2.581270508108 13.71984783183 -2.419173051129
+2.615418948899 13.66080403071 -2.408764428491
+2.546443216464 13.67888466772 -2.411947772144
+1.354059134065 15.39808331683 -1.318333156441
+0.08954232189684 15.1001758166 -6.74043594532e-14
+1.845732930367 16.1264647808 -0.7820022976132
+3.467598152617 16.11331010846 -0.6434884261185
+3.515440557439 16.11976692781 -0.6149796163417
+1.3285 13.32637330881 -2.116973837307
+2.745212361237 16.28128179199 0
+0.6745827888796 14.62141610024 -0.1242317071521
+4.8279 14.84304920254 -0.1500980332022
+4.8279 14.84820909575 -0.07277019198219
+4.827900000152 14.81297091011 -0.1092549100785
+7.78e-18 14.97960936383 -1.009061404715
+7.78e-18 14.93795428939 -1.087142517043
+7.78e-18 14.91505072488 -1.024772089626
+3.29579843851 13.50096976701 -0.8118800783382
+2.402573874308 15.08828125058 -2.660465038301
+-4.36436e-15 14.93815364013 -0.292337422756
+2.806773175032 16.30202819714 0
+0.3810686667678 14.65696562111 -0.8626374549748
+2.402776950383 16.87320091633 -0.0589392631451
+3.969583764323 15.86906482117 -0.3530887594544
+1.27558807933 13.87751215855 -1.868377444181
+7.78e-18 14.81610234172 -1.792756350635
+3.765119568109 14.08657705892 -0.6159102210444
+2.197040244899 15.29537988977 -2.07091297227
+2.617768412986 16.86434624567 -0.6519050971084
+2.653866751899 16.91591496964 -0.6428113971814
+2.670323957312 16.85920010307 -0.6528121412437
+4.738618193677 13.84371289122 -3.053591457812e-14
+2.742394492657 15.02531106642 -2.216821211706
+3.487778007637 16.59106670332 -0.7000879839392
+3.898543835663 17.43712073668 -8.500105619203e-15
+3.862575606767 17.38810591627 -2.732023190292e-14
+3.851168483336 17.47250334764 -4.833651062342e-15
+1.184507983863 14.0000631545 -2.372159625101
+1.142742391763 14.05655889874 -2.422004952383
+4.131086671196 17.49441844395 -1.246325310868e-14
+4.165086326914 17.43241342063 -2.587865520509e-14
+4.352143013877 17.03193438439 -0.4526682487673
+2.15133711745 13.51536805095 -2.383121374485
+2.172774457838 13.57840114773 -2.394235944135
+1.924691886215 15.37342405714 -1.419551596422
+0.06978638238989 15.2645443839 -2.287283343244
+4.613825838689 14.43320593074 -0.4954867175843
+3.24130208044 14.89810072119 -2.201072368974
+3.215465333526 14.97371781298 -2.181257342356
+1.624382209586 15.25101254691 -2.376038759786
+0.02144289657249 14.66176987213 -0.824958041626
+4.208489854393 17.2286754506 -2.360412725101e-15
+1.320284505747 13.7736544804 -0.9440731923102
+1.313590309837 13.82015377029 -0.9241894840009
+2.4279 12.98835965545 -1.568128884276
+2.537976377703 14.72556725297 -2.59652045181
+2.594068357614 14.70821132313 -2.593464234683
+2.54576254591 14.66972636403 -2.586668887557
+4.41321514301 15.60475648489 -0.3877394248035
+3.392791294265 13.56176566929 -8.533037642216e-15
+0.619393394716 14.64164724401 -0.01118839647786
+0.8982237617753 14.35643276759 -2.077639358368
+4.396574359997 16.04076807392 -3.3934e-14
+0.5346801102522 14.95338809529 -5.407950910258e-14
+0.597932996677 14.99619998907 -3.3934e-14
+0.526477532524 15.00605052736 -4.393828005462e-14
+4.827900000133 15.06319341267 -0.3108067084046
+4.8279 15.02980412734 -0.2467765115148
+4.8279 15.01548257303 -0.3276036531316
+3.858103347518 17.00644696244 -3.3934e-14
+1.956497509692 13.77359505653 -2.428655032895
+2.016748290097 13.75782536232 -2.425876141532
+0.3623020101337 14.54725511746 -1.994337408175
+2.260888221767 15.27087997434 -2.244180241382
+3.572299230334 16.76687841574 -3.3934e-14
+2.31099387506 15.46161962161 -1.175332637514
+2.358572286057 15.47375250671 -1.154740953048
+2.358327454896 15.44520086563 -1.203342731933
+2.319798427809 15.428636403 -1.23911818286
+4.330743552187 14.45899709189 -3.3934e-14
+4.8279 15.26550754254 -0.1368122903364
+4.8279 15.25586205725 -0.07727429006671
+3.525384029905 15.29270176845 -2.807726979954e-14
+3.481886591535 15.32046834694 -2.383032014873e-14
+3.48940723009 15.25671872006 -3.3934e-14
+4.316771982985 16.48248374301 -3.3934e-14
+2.864054551624 13.99958277596 -1.64574381498
+2.050454730633 14.95673139882 -3.3934e-14
+0.4439067793602 15.41304585249 -1.276920244679
+2.573804033509 14.22460800997 -2.508180053384
+4.082354191065 14.11654757782 -0.468956240397
+2.705439301235 13.91480825075 -2.349963756248
+2.708912808235 13.94576153556 -2.304628787072
+2.093046310934 15.37112364314 -1.433616724087
+2.864646353786 16.44850191258 0
+1.75087027823 13.80256652217 -3.36738e-14
+1.903522164043 15.03050636687 -2.650273767981
+3.835133001193 17.70597591315 -0.01770852130768
+1.836100025497 13.98967008645 -2.466748299977
+1.840839134788 14.06254122011 -2.479606231403
+1.909050735242 13.95762715223 -2.46110373226
+4.681595475722 14.16888039535 -3.3934e-14
+4.728299199369 14.14505049139 -3.3934e-14
+4.560400891862 16.93690065987 -3.3934e-14
+0.8738496818161 14.34652787766 -2.253719109397
+0.9498862084986 14.28997344235 -2.259761739439
+3.099596911351 16.87018076777 0
+1.671489892803 12.69573455302 -1.629798780797
+2.499978800429 14.38511411787 -3.384914086806e-14
+2.559410860974 14.36273502377 -3.392522504748e-14
+2.589090033231 14.43120406977 -3.389461498303e-14
+1.3285 13.24111103642 -2.163088390774
+2.332111182127 15.21647464525 -2.587740976747
+4.069914500448 15.21719737991 -3.3934e-14
+4.06263870166 15.27726587006 -3.3934e-14
+3.067366031213 15.35510021673 -1.492645928909
+3.031431203616 15.35847050357 -1.534811447091
+4.107412468555 17.76838646042 -0.4742210412419
+4.51388717165 14.47652975357 -3.3934e-14
+1.13923005991 14.18169770093 -1.570920479217
+0.6009640560455 14.83367269532 -4.674699275777e-14
+2.221138984714 12.79325304252 -0.6232371097594
+2.188206907206 12.78971291149 -0.559567133702
+4.294885896013 15.90720443667 -3.3934e-14
+0.9017068130498 14.31670614224 -2.318971267172
+2.915404103536 13.7611617793 -1.486884560408
+2.908674280612 13.82793829453 -1.513214347594
+3.459275350749 16.04803780039 -0.637437252573
+1.888216228677 15.2630633878 -2.297415280337
+1.948494358978 15.26568454587 -2.279585817441
+1.860890219273 14.74960731519 -2.600752955637
+1.906028817759 14.72592808245 -2.596573094606
+1.816428226264 15.22930300577 -2.511134937085
+4.183537986887 13.90658156936 -3.387468292302e-14
+0.5811155504603 15.49202881574 -0.5982897944122
+0.6333849401772 15.50557817945 -0.5895130194623
+1.284521057842 13.9607875287 -0.6887095049513
+1.265346710859 14.01548523677 -0.6674191024698
+3.273647115047 14.28030783951 -1.982482332723
+4.322774268909 15.60789339279 -0.3698085317267
+2.729619029974 13.63890238535 -2.067319700328
+1.309645907387 13.87472892246 -0.2829203509361
+2.004475236726 16.42768805902 -0.4076147251564
+2.621844597454 13.38069955869 -2.359377433259
+2.570387023074 13.40273269246 -2.363257905566
+1.296670528599 15.62974419887 -3.3934e-14
+2.714829274303 15.02297192828 -2.390036264087
+4.575072647658 14.78198874817 -3.3934e-14
+4.524661421169 14.85090267503 -3.3934e-14
+1.609515451787 13.18962896023 -2.325692834129
+1.608303281846 13.25758537274 -2.337674327491
+0.5929793345187 14.47724373797 -2.232202377837
+0.4519527632801 15.05579098001 -2.654742862249
+0.4308364972213 15.11649625916 -2.665444373872
+0.1992153335529 14.64923648658 -1.024246717838
+4.297991404512 14.69372688493 -1.013529704063
+4.300022286937 14.64219531036 -1.003694241326
+4.347993939821 14.69809329025 -0.9981334397107
+2.800819673794 15.49583627485 0
+4.382427288886 13.60504938605 -3.090566342919e-16
+2.825958351306 13.4345597207 -0.8871046724185
+1.673434092246 15.98874670591 -0.8062860658955
+3.648989451833 17.64187101833 -0.3463271494657
+0.2038749862712 14.50980738908 -2.558470772615
+0.1489354401623 14.47493963014 -2.552320166038
+1.3285 13.43221790328 -0.09384293955741
+4.288335296929 13.60053668288 -0.1335214518285
+1.3285 13.32532238563 -1.576704526118
+1.961171155332 14.92240377705 -3.3934e-14
+2.7723879513 15.58927607103 -1.010519771362
+2.71229813131 15.57805199096 -1.019153450137
+4.441811893666 14.71543766607 -3.3934e-14
+4.36397061608 14.76055051136 -3.3934e-14
+2.320556462311 12.81404847687 -0.9641135895422
+2.360469135649 12.8467490265 -0.9546844378987
+2.335914601412 12.82848340873 -0.9055145602326
+3.146616481883 16.89118460313 0
+2.549824711724 13.41457749449 -0.3759445609095
+3.820667469297 13.56656808232 -0.4927322457473
+3.85184283887 13.61707292756 -0.4849434432321
+7.78e-18 15.1234351312 -1.819827138178
+2.707675615513 13.64544959183 -2.269771160488
+2.711192127621 13.68341580829 -2.225041762256
+4.26131898539 15.99928332658 -3.3934e-14
+1.3285 13.10298679997 -2.143033882571
+1.245677276696 13.9932980641 -1.576559123451
+1.229490225715 14.03305169744 -1.528236876076
+3.13328928865 14.94097021788 -2.366748866184
+4.8279 16.07666212146 -0.04276861832309
+4.8279 16.11884124155 -0.08276162501079
+4.135801840947 14.5323128987 -1.051493893347
+4.07847424914 14.51148374599 -1.076183249544
+2.85716607481 16.04499414262 -0.7963684286333
+2.866375805596 15.98533628144 -0.8068883671437
+4.512399555895 15.68167824577 -3.3934e-14
+2.849895792203 14.14531752747 -2.128361362649
+2.299027774944 15.36916814829 -1.44573514863
+4.457822167411 17.7721532795 -3.3934e-14
+4.397277628925 17.76879793739 -3.3934e-14
+2.579423518201 15.12434932543 -1.036248977053e-14
+4.238212385641 16.62017350907 -0.4051029713968
+0.07642144594817 14.70569343587 -2.593009221984
+0.1466414750265 14.73648225815 -2.598440446689
+1.292594994958 13.85396748311 -1.605015402003
+3.876903813101 15.58899889512 -3.3934e-14
+2.054891678659 16.48343523791 -0.5281542359524
+4.645372748985 17.84325533613 -0.262244309012
+4.608521391485 17.84141442766 -0.2257962834892
+3.376090818894 15.381448899 -1.131358911756
+1.9421593835 12.63325694767 -2.058697350355
+3.055244489216 13.80722660774 -1.245590353428
+1.426986232214 12.85574033552 -0.1165093634188
+1.456458255925 12.8353514879 -0.167039560297
+3.001641777965 17.21159759916 -0.5906777667937
+2.990063134249 17.26471715703 -0.5813055385142
+3.101713295144 15.34315094565 -1.441128244286
+4.418714012865 17.27392922408 -3.3934e-14
+4.360692891039 17.30007730202 -3.3934e-14
+2.25235761623 15.71881030642 -0.9078685759499
+0.5024754053378 15.46499511036 -0.8060779808335
+4.560373229538 16.7126906218 -3.3934e-14
+2.867652700664 14.1285280406 -2.223479648874
+3.501020185923 17.20748020659 -0.5913996371672
+2.4279 13.10667009616 -1.350079721382
+0.5644349520231 14.5739058341 -1.544577691167
+1.157416522448 15.31218160779 -1.942941733095
+3.201278161572 15.07303305047 -1.618037609386
+2.341407676978 15.96792189789 -3.3934e-14
+2.335634805482 15.89743822152 -3.3934e-14
+3.269947223199 16.55597008336 -0.7062801168763
+0.05997748824353 14.68015407274 -0.3769605125875
+1.987316640471 14.31767159368 -2.524593225802
+1.989677117734 14.25452889953 -2.513458923655
+1.926561415999 14.28248768865 -2.518390077705
+7.78e-18 15.32662492251 -1.643631337374
+0.8806528722763 15.56517495084 -0.9821686778736
+0.956011312731 15.59610954458 -0.9596921205636
+7.78e-18 15.08403859309 -0.6963117544355
+-2.436894678866e-15 15.12540615318 -0.6391565773777
+-1.337509872042e-15 15.17053699485 -0.7032586269126
+1.645705946566 15.48159178791 -3.3934e-14
+3.21966552968 13.51426836967 -0.2457065609757
+4.29254331599 17.64340510829 -0.5145300314459
+1.677733779965 13.07158028874 -3.3934e-14
+1.444549853671 13.42067765184 -3.3934e-14
+1.226921594382 14.11884999686 -0.2686172142903
+1.3285 13.27293835235 -2.310944969875
+0.9467794300073 14.37678155324 -1.63965910017
+3.518382518787 13.53989331008 -0.4874607545523
+3.118039112103 14.90172219063 -2.589583593258
+4.8279 14.39803040122 -0.833651983844
+4.774158279766 14.37614964478 -0.819312675321
+0.8986949731472 15.07080100341 -3.3934e-14
+1.138285004827 15.23288388475 -2.489519927044
+2.451757576664 16.81502137023 -0.6605952241162
+3.52248686931 15.97895424843 0
+4.125623344595 14.28998424601 -0.4836741109548
+4.205599503614 14.32040784564 -0.4624812182644
+2.420276683913 15.22362519292 -2.545280247235
+3.672705894702 15.13180493732 -1.284712422478
+3.751426406879 15.12993834956 -1.295108080212
+2.445188169364 16.91310399532 -0.05249279822915
+2.441880447308 16.88493203582 0
+2.485818439648 16.95072702383 -0.03335610622267
+2.579040291212 14.77150506779 -2.604615677372
+1.3285 13.25944079253 -0.8907187883168
+3.152704055005 13.50801173133 -0.102065822669
+4.796301190271 17.02169026983 -1.087940350383e-14
+2.981162475396 16.32150224187 -0.7476246020034
+3.037938106088 16.32034853368 -0.7478234192588
+3.008400569269 16.28009864856 -0.7549261205697
+4.604875961749 17.00700247798 -3.3934e-14
+2.08817848508 13.86166197434 -3.36738e-14
+2.254531336172 12.80849473874 -0.4110686816172
+0.4014794075086 15.45747115861 -0.5576410916828
+1.31249145194 13.68849210465 -2.16341299881
+3.58615633905 17.6220585159 -0.043026718061
+3.577789580254 17.61865163224 -0.1026555658583
+2.502953515133 15.330214424 -3.3934e-14
+4.012882258485 16.12809163327 -0.3836637814071
+4.662307431748 17.29123263516 -0.4586236522975
+4.626671771469 17.33141718433 -0.4683057939761
+2.524040697608 13.43388174589 -2.368749134594
+1.3285 13.34941595502 -0.6907642447276
+0.1159804704577 14.68483406979 -0.0532445003939
+-4.537413860205e-15 14.85525103613 -0.3249967135155
+-4.621375815029e-15 14.80417999943 -0.3980119189994
+-4.67051e-15 14.77203385898 -0.3233536654407
+2.745047414834 17.15621947559 -0.4585692496079
+3.601644026341 17.62425291382 -0.3578778167851
+3.561881176704 17.60982843019 -0.3215058985836
+3.607287646291 17.6274274078 -0.3014203953355
+3.466702488326 14.27273157939 -1.405644444816
+3.520047023321 14.26405975917 -1.454869277742
+4.396786606409 16.46521252992 -0.3449069908105
+3.322873428598 17.09757469542 -0.6107787892985
+4.087898853866 16.6339132682 -3.3934e-14
+0.3494876435977 14.49891975328 -2.323557409251
+3.977330675106 15.54734152525 -0.7132668792675
+3.921844546853 15.54936982119 -0.701644343998
+2.953121933907 17.3012788329 -0.3787710358982
+2.712297952977 13.75719818922 -2.223800949727
+2.709176071926 13.72096303239 -2.261141563433
+1.778655144033 15.01451538724 -2.647453019835
+0.3822296260078 14.95108330336 -8.17662e-14
+0.352885936403 14.88605789827 -8.17662e-14
+0.4352213914269 14.94712330489 -7.565537892951e-14
+4.8279 15.91572999774 -0.06296515705307
+3.198362257076 14.99907332804 -2.037447411935
+4.43852591227 17.82785446495 -0.08594735974989
+4.465298797613 17.83040321645 -0.1492784616303
+4.8279 17.30316834914 -0.2779444007256
+4.827901250017 17.25175001609 -0.2769525789601
+3.134784752226 13.70387416241 -3.36738e-14
+3.062983692374 13.74944878022 -3.36738e-14
+1.461893327567 15.21901488682 -2.57267528056
+1.620561221443 15.55382248852 -1.046489279362
+1.453132500896 12.73623477665 -1.618678622915
+4.090653070109 16.35563115807 -0.3985693731039
+1.61936705939 16.02653718898 -0.3664279620975
+1.667219120512 16.06825378762 -0.3778316037288
+1.568455378334 15.9830547691 -0.4152548485373
+4.04079093918 16.33017142694 -0.4108040125491
+1.465420022116 15.00024015243 -2.644936544594
+1.528729843385 15.0329547452 -2.650705652631
+1.541738991845 14.96371892241 -2.638506326613
+4.549359626966 15.73574549636 -3.3934e-14
+3.94891589362 14.44708717046 -3.3934e-14
+0.536812966353 15.3346206618 -1.757177970079
+3.699665884003 15.58586260005 -1.25617092807e-15
+2.973571004719 15.18321621044 -1.615534845946
+2.970944798206 15.23655147671 -1.629668095096
+1.537509763847 12.70018967424 -1.659659711149
+1.548575073708 12.70766529442 -1.583542792173
+1.500625625267 12.71325253472 -1.616275517175
+1.380444196648 15.27429072388 -3.3934e-14
+1.336209495959 15.24001585406 -3.3934e-14
+7.78e-18 14.7313053073 -1.826926491022
+1.178351585815 15.31863977819 -1.891086516172
+4.627347669678 16.43529084833 -3.3934e-14
+4.586390431274 16.40611885001 -3.3934e-14
+4.646028899256 16.37818263751 -3.3934e-14
+3.955468539704 15.42956089962 -3.3934e-14
+4.014616749568 15.39246566126 -3.3934e-14
+0.8007336324921 15.56651165611 -0.1293331780375
+1.540670238537 15.23021318272 -2.505863140542
+1.571726131823 12.66943974809 -1.832985530363
+4.123483831513 14.06786256515 -0.4452957713567
+4.195020767813 15.42225106841 -3.3934e-14
+4.77873838348 14.62418788326 -0.9129576574462
+1.582678310807 14.56625569254 -2.568428939358
+1.559184708094 14.51440520258 -2.559284534747
+1.606531316398 14.48200641173 -2.553569655383
+4.580338057237 16.18370846422 -3.3934e-14
+4.8279 15.14619035106 -0.5572667026792
+4.8279 15.21846071221 -0.5579836869186
+1.234500144875 14.01183962935 -1.622308141547
+1.257700637547 13.95995857718 -1.612692321211
+2.294095946336 15.84020363529 -3.3934e-14
+2.013156001739 12.74334327059 -1.202401431183
+1.99410607133 12.74826403051 -1.149408067533
+3.000462423038 17.08957188964 -0.6121938745977
+1.230768794086 15.31790105756 -1.89725540982
+2.865683699897 15.32419634945 -1.845779817183
+2.902944979519 15.30246388187 -1.77596638991
+0.5082205594796 14.45472959494 -2.491832868919
+3.133768116263 15.02149595879 -1.910321679544
+2.813484477148 17.20847433701 -0.3387058436109
+2.771463957075 14.34272128927 -2.529004937188
+2.713099502413 14.32767159426 -2.526353180777
+3.113033988863 15.01010026807 -1.975048132344
+2.940566907418 16.39197673231 -0.7351935958547
+3.010110498878 16.3617643457 -0.7405211941696
+3.046948584314 16.43494904805 -0.727611250053
+3.08768615571 16.38895007111 -0.7357222640562
+3.109527661214 16.44511828216 -0.7258172311207
+2.485489328378 14.39442940107 -2.538127675509
+0.09357558211499 15.32769623235 -1.816301724158
+3.857125279102 14.3249011819 -3.3934e-14
+2.917070508679 16.47953134746 0
+2.70963860912 15.17526762571 -2.461586452108
+0.9930264787339 15.36140899765 -1.504740124093
+0.9676554045573 15.35476687267 -1.571139967356
+2.396920335893 12.9267976116 -0.4880668116195
+2.383374408308 12.9094963576 -0.4097986682664
+2.343398883064 12.85998212465 -0.3720094963803
+2.737304223491 17.05217195055 -0.6187833543172
+3.424698417442 15.14819796923 -1.191818855278
+1.295728843659 13.838879225 -2.440164544735
+1.944507049269 15.29362113404 -2.08396086594
+1.500055890426 15.92825066245 -0.4753956780384
+1.476634536076 15.91192821217 -0.4294557785193
+0.7819704538056 15.30133380876 -2.026766637977
+1.588657770962 12.79374674494 -0.3988574791859
+1.580778353934 12.79555187071 -0.3342458883332
+2.342483122903 14.859790657 -2.260914043955e-14
+4.461358988661 17.2266896369 -3.3934e-14
+4.406211790985 17.22416743373 -3.3934e-14
+4.411727596778 17.17315648179 -3.3934e-14
+2.004519224623 16.05222814478 -0.7950917053762
+2.049569294285 16.03068930898 -0.7988962023453
+2.013942694651 15.97066729169 -0.8101358170347
+4.355021848337 17.22068446038 -3.3934e-14
+1.698583441001 13.56875259893 -2.39253646507
+1.643187100925 13.53721453436 -2.386971422191
+4.8279 17.42851482231 -0.4173985185495
+4.8279 17.40646747966 -0.470478242933
+0.8160415866808 15.5406192571 -0.9941622754725
+1.828679183653 12.79960403598 -0.0961503603282
+1.874798265883 12.79977500103 -0.05463560015572
+1.826036030221 12.79820294418 -0.2102818216077
+1.824551499928 12.97036254124 -2.287030665555
+2.411056509963 12.88618835836 -1.445437220087
+2.162810508724 12.70753992803 -1.535567766842
+2.216246882772 12.71840425687 -1.508210039623
+2.506887532043 14.04976959439 -3.36738e-14
+2.567489892435 16.50036956789 -0.7160821759263
+1.013478363739 15.63400304456 -0.7098226309119
+0.8386635569583 15.37622581394 -1.400972157437
+3.564862205247 15.22955758838 -3.3934e-14
+1.10896690249 14.90459727742 -2.628074748563
+2.002442169555 13.00337225528 -2.292845081787
+2.042741733919 13.0841374166 -2.307086861973
+2.081700438024 13.02302090197 -2.296310141715
+3.530582431793 17.50925628952 -0.5381894869456
+7.78e-18 15.28062393328 -1.246001052589
+3.412621525565e-07 15.34628294335 -1.200073523747
+4.273679561668e-07 15.34940436179 -1.121059534379
+0.009139185056065 15.39129749412 -1.16228316697
+2.766876594754e-15 15.36194796728 -1.065000257886
+7.78e-18 15.2766384539 -1.090106724861
+0.7539208615265 14.55836762925 -0.9386431162899
+0.753472871337 14.56266100356 -0.8739546095171
+0.7136328509098 14.57944030448 -0.9078324372865
+3.377397505407 13.52323701778 -0.54955978652
+1.3285 13.29928295771 -0.3029672081707
+1.3285 13.33403348605 -0.3490128858869
+1.332440984139 13.02090840922 -0.490587315453
+2.444979853437 14.21189664083 -2.505936416431
+3.008200978419 16.80707767986 -0.6620036633476
+0.5916633590502 15.29195166443 -2.096001306314
+0.5884027613726 15.29883679156 -2.044992686425
+2.041659866981 16.47153693125 -0.4002116779376
+0.3595775028979 14.68162912843 -0.2307399831573
+0.3481610731192 14.68089771812 -0.2992106992068
+0.4171092280723 14.67738280343 -0.306484356442
+3.566313459571 16.73525986058 -0.6746677791753
+0.3487576852452 14.67899066171 -0.3794481001485
+1.57763968759 12.79982820243 -0.08369289387948
+3.368905035191 17.53030495151 -0.1717848410955
+2.4279 13.3051396335 -1.240319707418
+2.527671355087 14.89773602498 -2.626873953156
+2.220386412905 15.01762562342 -2.6480016537
+3.957056236884 16.44204794538 -0.4588596140295
+2.226715289469 15.6543782455 -0.9531732991147
+2.545004147927 15.47151940216 -2.34156382253e-14
+2.596469664292 15.46649401227 -1.080700009686e-14
+3.542478187545 14.24649959191 -0.7939726033764
+3.342291700224 14.23415448105 -1.801960377255
+3.371756327035 14.2377021062 -1.741949547678
+3.320834089227 14.2044438866 -1.844764982234
+3.394624539187 14.26035969678 -1.475819811606
+7.78e-18 14.7938335167 -2.446180103226
+2.323162704681 15.30368864225 -2.009010697405
+4.8279 15.14725818443 -1.000551479214
+0.2333802537655 15.24210146978 -2.432296638471
+2.143779954898 12.76477878224 -0.9485318793241
+2.174512419674 12.76812132316 -0.9022715904488
+2.122250447029 12.7680377142 -0.903428726611
+2.155002723024 12.77234907615 -0.8399049673888
+4.506809163147 16.95369057679 -3.3934e-14
+4.526732740957 17.00619796431 -3.3934e-14
+4.4744744197 16.99391674986 -3.3934e-14
+1.757626663419 12.76446227192 -0.9529123368956
+1.808061379888 12.75701484116 -1.047155680584
+4.772815553935 14.53733044848 -0.8977889467867
+3.207965377594 14.27615373856 -1.386200862524
+3.256281584622 14.26555621049 -1.446293843901
+4.8279 14.68970114903 -0.757873890307
+1.542922155258 15.96092405734 -0.4799111178073
+1.076956082416 15.20455848239 -2.65678681358
+1.017972310406 15.21154776673 -2.616382611403
+2.120515694121 16.24792594574 -0.7605885714917
+2.4279 13.02215260198 -0.9384723441136
+2.418780385576 12.97257685385 -0.9179223332639
+1.361313516119 15.07311207787 -2.657795286142
+3.689491170886 17.65814067295 -0.2058213460637
+3.717073289501 17.66687531353 -0.2643206208822
+2.143463215368 15.67565970318 -3.3934e-14
+0.05915188914112 14.67717547865 -0.4778901841345
+0.02670157632485 14.678823848 -0.4235769202122
+-4.67051e-15 14.70852252589 -0.3825018715192
+1.3285 13.57131801705 -0.9693218131456
+1.3285 13.62035468473 -1.023228629794
+0.09697822127173 14.67860704322 -0.4322897755859
+4.083159682956 14.30941019024 -3.3934e-14
+4.026696009162 14.28098896288 -3.3934e-14
+1.015403973105 14.27968915432 -1.936363562564
+4.4283317313 17.18484925708 -0.4664338753514
+3.578048061105 14.36207554787 -0.8989947270651
+2.389165663177 16.85907016877 -0.1797642915419
+2.056326195286 13.79595720339 -2.432600770947
+2.068618455925 13.74424920391 -2.423483544819
+0.7224734174878 14.57023321181 -0.9850109338205
+0.7690138353171 14.5465741279 -1.008546981607
+0.7087156574321 14.57208520323 -1.046704343316
+0.6691885422235 14.59022539483 -0.9913939561838
+2.937341925241 14.47913129508 -2.553061098808
+2.911141520355 14.52953680143 -2.561948706761
+0.3293970533631 14.58549013963 -1.705649874196
+4.714368209521 16.94077887924 -0.3939601061537
+2.77947253055 14.4269233728 -2.543854294802
+1.114087629538 14.16511858676 -1.976404385151
+1.848090603301 16.07060964199 -0.7918521504183
+3.180173159058 13.50874485167 -0.2834942914789
+1.3285 13.20086448729 -2.196181775766
+7.78e-18 14.70631653361 -2.461493006132
+7.78e-18 14.63231220599 -2.472985999898
+2.86070223456 16.26580936695 0
+3.170147038825 15.24953467616 -7.474282877256e-15
+2.130386148997 15.36533410549 -1.468957920277
+1.044375244403 14.58654804387 -3.3934e-14
+1.023529944293 14.5353857864 -3.3934e-14
+4.502793409053 17.08017684745 -3.3934e-14
+1.555991752673 15.26326764462 -2.295939504341
+1.650788538987 13.96655316479 -2.46267684849
+1.707357396783 13.93088435294 -2.456389438769
+1.728699811621 13.86867976132 -2.445424958884
+2.4279 13.15444912184 -0.6258263968174
+7.78e-18 15.10621305312 -2.336730509232
+0.1512584665724 15.40626725469 -1.332855417494e-11
+2.703621604334 13.72196636541 -2.387870442169
+2.704109963115 13.67166574048 -2.357565079682
+2.69581388147 13.64144921479 -2.405352521838
+2.705616072925 13.70347643535 -2.310117062354
+2.704669652171 13.62488612263 -2.324749578387
+3.156222994172 14.09396221021 -2.419601226516
+2.624522534926 16.50387744925 -0.715457185116
+2.4279 13.07189039222 -1.309808314064
+4.692008443481 17.84549258253 -0.2344302034034
+4.680837752446 17.84565867679 -0.1832193965528
+4.113201234591 17.33560056831 -0.564511767876
+4.152899752263 17.28863240419 -0.544916826261
+3.724585118229 13.55799584196 -0.4947317669711
+1.300473076027 13.8349490918 -1.492474681314
+3.552506355709 16.99603622487 -0.6286787540713
+3.483532233836 17.00060217367 -0.6278763356646
+4.121633460293 13.78784378265 -3.367825506711e-14
+4.094590866908 13.71888006741 -3.392894976918e-14
+4.139763161881 15.60921751777 -3.3934e-14
+0.725080296777 15.22205548616 -2.554705024493
+0.7197362670596 15.23335810195 -2.486940639259
+0.7737833274937 15.2275902527 -2.521520821869
+2.4279 13.16501794362 -2.202778755568
+0.7992979244597 14.53531471737 -0.9625326119941
+4.622792600394 14.88811312077 -0.9717493589076
+4.045474516238 15.98380213912 -3.3934e-14
+1.488914297295 15.91248199334 -0.6736573368531
+4.198670639068 14.21071535129 -3.3934e-14
+4.191215762302 14.26624626391 -3.3934e-14
+3.668135698022 14.31484899235 -1.166884856749
+4.653347542743 16.14742893172 -0.2577602625386
+3.855272565684 15.19974396263 -0.8992515069513
+4.731732047921 17.7223897499 -0.5006080437687
+4.751286913077 17.67399728392 -0.5091368880188
+4.827899999998 17.78714411944 -0.4182605109759
+2.035921850621 14.43016905239 -3.390146272898e-14
+3.605904290575 14.91297780315 -1.516991881386
+3.635732458159 14.85953925502 -1.474847336326
+3.602254278846 14.86285251173 -1.512459130917
+4.304174840215 14.39169282559 -0.731240126701
+1.3285 13.54144789233 -0.4881474768191
+0.6869901075567 15.5204610208 -0.5943280151447
+0.6598089164942 15.51413308972 -0.5423824230001
+0.07594959910031 14.46710318406 -2.519910908235
+3.442541817607 15.00025204822 -1.750963892741
+0.05010576066497 14.67123864471 -0.6353596962711
+0.03791693018785 14.66883498011 -0.6876687641299
+1.291545078106 15.570384037 -1.027878745978
+1.233899985748 15.59656602841 -1.004309955233
+2.707422220728 15.12542545097 -2.476064330194
+0.8695853259563 14.52099754709 -0.3455465514357
+4.611669367274 16.8313775749 -3.3934e-14
+4.802764866577 14.24154151136 -0.3539705237776
+3.060511766553 14.17113779974 -1.982072971303
+1.053305600827 14.67770502375 -2.588078952954
+1.118593545582 14.68950191828 -2.590159984936
+1.284638059566 15.53684472022 -3.3934e-14
+7.78e-18 14.64478363285 -1.27641844238
+0.2800464175633 15.44999224236 -0.1486382854086
+4.496198768874 16.77347038956 -0.3840299439318
+4.549294022111 16.78574682501 -0.3797143164262
+4.8279 16.14837606926 -0.1328237135377
+4.8279 16.14194444062 -0.1870556622985
+4.327501347085 15.35747123413 -0.6066923729686
+3.068823470765 16.27062482406 -0.7565923800727
+4.384510216256 14.23906388596 -3.3934e-14
+4.413826314095 14.15819992437 -3.3934e-14
+4.450736327185 14.19509396609 -3.3934e-14
+0.3187025556366 14.68458866966 -0.111965258195
+0.2815712820472 14.68469475965 -0.07297683388841
+4.002616150895 15.19090127823 -0.9495140547391
+3.760733418931 16.39289297031 -0.5317981933234
+3.66609645575 16.30326479985 -3.3934e-14
+0.8818949535028 14.45062854735 -1.393674698937
+0.9098968520032 14.42642946745 -1.431734980374
+4.262374878262 14.27745115894 -0.437865429882
+2.628281302065 14.88012054027 -2.623770448228
+1.3285 13.14470906728 -0.05013624626436
+3.248444170422 15.58801768364 0
+0.7468785476291 15.54765769549 -0.2222743456667
+0.7274495516876 15.5423546662 -0.1756789035031
+1.800716344398 12.91880796618 -2.2779409951
+1.872933903882 12.93972584579 -2.281631884507
+2.267684097337 13.46320173896 -3.36738e-14
+2.298384109674 13.50397457415 -3.36738e-14
+0.4176402092029 14.50578755983 -2.25819081666
+2.260638028589 15.31029644819 -1.957695649711
+2.172578979492 15.30985271846 -1.960818333821
+3.876437156438 15.78241984299 -0.3738465189283
+3.81957906692 15.82668989059 -0.4051872472239
+3.865924701351 15.84788301638 -0.3897297641845
+1.857565375016 16.2617042686 -0.1516790999701
+0.5437428922071 15.35644757501 -1.555180023321
+2.788254780162 16.31040893422 -0.7495689284244
+2.795940680515 16.25664990365 -0.7590527744368
+1.3285 13.61730645081 -1.145945600872
+1.32753947104 13.65347031439 -1.181315071898
+1.3285 13.56671489216 -1.146436843025
+4.417893240188 14.42136951796 -0.9293334076563
+-4.36436e-15 15.01998418706 -0.2569483129503
+2.156457621849 13.81270204464 -2.435552981611
+4.349589133565 14.41193948039 -0.4389952646414
+2.440698727066 15.33339269836 -1.7676890785
+4.496425627486 15.19350376658 -3.3934e-14
+2.431885671058 13.21620873792 -2.207731290574
+0.3492007899917 15.15226648184 -3.3934e-14
+0.3345431347571 15.42534260927 -0.9978033509294
+1.440406068171 13.82054063794 -2.436938624126
+1.350438664361 13.79300678305 -2.432084893573
+1.372088644349 13.86047954613 -2.443977361115
+1.375349960481 13.93865500686 -2.457757482975
+3.163352561297 14.97635706253 -2.166299924511
+0.701697490211 15.09283982169 -3.3934e-14
+0.5225097281527 14.66342133784 -0.2670280017601
+1.323791847764 13.77953940293 -0.1904496989134
+1.313465884213 13.85072865907 -0.1762648219586
+1.317401434922 13.82350532596 -0.2262635663189
+2.294357555615 13.57112137457 -3.36738e-14
+2.337698511269 14.32162433292 -3.37875238801e-14
+2.283348691943 14.26754117575 -3.373258291204e-14
+2.335918731475 14.26064395287 -3.372412285316e-14
+3.733742395232 15.43888742403 -3.018237744206e-14
+1.421177475634 15.33884008957 -1.719688232725
+1.489932435983 15.33630418791 -1.742361931928
+1.47404115913 15.32946618028 -1.801094582578
+1.412863255193 15.32976416451 -1.798647021358
+1.271451365091 15.71047491511 -0.9129608154469
+1.084576346139 15.28511673725 -2.145145751811
+0.1197403221284 15.3714492454 -1.423171164173
+2.709212336749 14.94066766741 -2.423204016
+0.235541173447 14.61867876132 -1.393222039196
+2.960292244351 15.29828488168 -1.660793139959
+1.311226491936 13.83247703998 -0.9768940246868
+3.785767311894 14.32722091371 -3.3934e-14
+3.822864292803 14.36986147891 -3.3934e-14
+2.633026489546 15.52374796009 -1.080683770822
+2.650069504248 15.56236467255 -1.038238882692
+1.823771869076 14.1126952135 -3.36738e-14
+3.536419243683 14.32628151446 -1.497947725352
+3.513844788982 14.27946014127 -1.519133620113
+3.192251165422 14.71151272885 -2.456827351316
+1.781502241521 14.47109884545 -3.389209857227e-14
+1.026843332439 14.34730279018 -1.230592406167
+2.85767926429 14.78402561093 -2.606821712084
+2.838202217431 14.73852330038 -2.598801428367
+1.363840887218 12.89006649485 -1.0130631168
+1.344194342195 12.92663213675 -1.071488945779
+1.363666910481 12.8836851479 -1.095022531098
+0.7392802327123 15.52923562608 -0.7410530044634
+0.166082343248 14.63451476083 -1.216302394942
+0.7651183499113 15.54101587865 -0.6734594719415
+1.81250878009 14.35368121687 -3.36738e-14
+1.771990842655 14.40578439381 -3.37483320248e-14
+1.747162653083 14.33230005889 -3.36738e-14
+1.3285 13.04837754684 -0.5594724144846
+1.331161162076 13.02136407218 -0.6285986189877
+1.34457196547 12.95586276341 -0.5848238196542
+1.339919700929 12.9815153588 -0.532781549954
+2.778029698953 14.48078444191 -2.553357923301
+4.370998763771 15.67317069785 -3.3934e-14
+3.005633802833 13.43475905892 -1.21183990551
+3.04854297031 13.50021074932 -1.201917456886
+3.055363043371 13.44511990362 -1.181624319678
+4.153143105631 14.32353387971 -3.3934e-14
+4.254347585534 14.21208355775 -3.3934e-14
+0.3169315269515 15.35338981524 -1.584924245037
+0.3443442556243 15.36264256307 -1.492458930716
+0.8983732677846 14.8363425357 -2.616052329822
+3.294574819072 14.22951896606 -1.914347306676
+7.78e-18 14.80348640784 -1.366731620179
+0.9829996861856 15.34208802705 -1.690096006482
+2.731555351064 15.23212166555 -2.311290604616
+1.822053789848 12.79981614639 -0.04464443566504
+0.06958586428875 14.6429208018 -1.110579601163
+0.01777068416534 14.6377460851 -1.176718160202
+1.142992786019 14.23412272254 -0.912753189265
+4.758188328066 13.99126230271 -2.394085492777e-14
+1.83403885072 15.21653717397 -2.587773427098
+1.765215201049 12.70930916706 -1.520597521546
+3.460639005959 14.49615883502 -1.634278850493
+3.494632259534 14.49508293878 -1.584309370414
+0.09679161800727 15.43449895225 -0.2688047977728
+4.450939556089 16.94798429044 -3.3934e-14
+0.3769805922517 14.67255727664 -0.5413784147032
+4.8279 14.1817351196 -0.08110926216033
+4.8279 14.23756029285 -0.07235333008187
+4.8279 14.24405197682 -0.01621978971134
+4.787714898053 17.66772803956 -1.383564579417e-14
+4.680428448212 17.26936477849 -3.3934e-14
+0.9393420276102 15.33905808612 -1.71754939197
+0.7579226676835 14.40817899103 -2.274914316301
+1.974540892513 13.52996662747 -3.37970317973e-14
+1.553890433292 15.31860626464 -1.89147340772
+1.817652459828 15.78700643465 -3.3934e-14
+1.3285 13.63850952392 -0.9248410680202
+2.257988829718 15.35412018468 -3.3934e-14
+0.4731097129852 15.47888120355 -0.2058361693357
+0.5077651718554 15.48659500319 -0.1671246617166
+4.243180770078 15.50517183311 -0.6555764483441
+4.228542039533 15.45425065211 -0.650619041844
+2.258999200504e-18 15.17795630306 -2.646558102761
+1.852525858931 14.73639798415 -3.3934e-14
+3.387233463726 16.86944615889 -1.650876056492e-14
+3.313988520787 16.85643649733 -7.216923856234e-15
+3.339303629492 16.81063030388 -1.2774641404e-14
+1.367943118108 13.85335984412 -3.379406251828e-14
+3.357787637588 14.86821380381 -1.880502449122
+3.365100509711 14.93098636675 -1.876532343097
+1.919796548154 14.51075160386 -2.558644184572
+3.199704340803 14.31096750589 -1.188946912445
+2.277072239383 13.90815417121 -3.36738e-14
+2.266842016454 13.98392501568 -3.36738e-14
+2.4279 13.35478219849 -0.5989278085972
+0.8686825776458 14.48484164498 -1.088165327982
+1.46775665428 15.24428512409 -2.418473553901
+1.526204474127 15.24014438704 -2.444370819318
+1.458013476469 15.48229387603 -3.3934e-14
+1.438067091798 15.55574397219 -3.3934e-14
+3.088816287953 14.97710727711 -2.161907725856
+2.733993240198 17.07558664956 0
+2.167836721199 12.73421993594 -1.295250578977
+2.150183220865 12.74313615576 -1.204578162975
+4.8279 13.86105883844 -0.2262947633336
+4.8279 13.92543800413 -0.2257431254837
+1.950010273408 12.65222188788 -1.939489380074
+0.8064333630409 14.41694537483 -2.056736982709
+0.7513863624846 14.44125268231 -2.076733807406
+4.607418406749 16.86761115957 -0.3882548360065
+4.585151854875 16.82201164178 -0.3824737927644
+3.416398005442 15.03004032602 -1.799928866427
+2.730912000726 17.14155178048 -0.5947102499071
+3.942059570634 16.99997099204 -0.5626825297407
+2.641978816282 15.28930566778 -3.3934e-14
+2.809051538429 14.38159627587 -2.535857291573
+0.9851875108328 15.22037215639 -3.3934e-14
+3.556842588318 14.87845913966 -1.569222216252
+3.526789035789 14.91370031634 -1.613569746146
+4.472314472491 15.50550609801 -0.603181129715
+3.373389817983 17.1398903415 -1.02514423439e-14
+4.498404453915 14.17385087133 -3.3934e-14
+0.949381026355 15.28156530131 -2.170707950401
+4.201728125972 16.65848886513 -0.4206189251001
+4.145843703757 16.68151149138 -0.4401312293791
+4.210756564859 16.73228026641 -0.4315078374844
+0.5421233956863 15.1106328929 -2.664415479658
+3.739886737982 16.43832063443 -0.5496940439558
+0.103518918516 14.5208552045 -2.189211510848
+3.650532586651 14.86776722302 -3.3934e-14
+2.934565573096 15.51492854876 -0.9918465094258
+2.985857536127 15.50029647143 -0.9800635254301
+2.852537960726 13.46292195044 -0.3578564269746
+4.556698038398 14.8407493575 -0.9733263659941
+4.65230318437 14.83610771989 -0.9591522242586
+3.750577870366 14.51646668288 -1.302628628837
+3.188124085849 14.48972497348 -2.4792074541
+2.782100110983 13.38440351218 -1.777085314942
+2.78701980738 13.34677839065 -1.726523350298
+3.55111688389 14.34171918932 -0.8040975843872
+0.416994391936 14.64812979265 -0.9759453830825
+1.698770309429 15.48987411148 -1.129286083119
+1.641903732641 15.47546529513 -1.151859093573
+1.387191151669 12.81312974526 -2.259306477404
+2.685349078199 15.02143657988 -2.648683044334
+2.695148291138 15.0737666393 -2.657919274095
+2.631374383944 13.74033365972 -2.422786663623
+2.246748796243 14.75422273182 -2.601573037971
+2.62693765943 15.32512121859 -1.838157798482
+1.580195860504 12.79005830849 -0.5030958381347
+3.08392858525 13.49208130055 -0.4556441567932
+3.63516502155 15.74451692806 -0.4803673665192
+3.652349075266 14.95119016722 -1.473354077888
+1.28077982563 13.91780159126 -1.401790031076
+1.263696882601 13.96813596256 -1.378935387693
+0.314489688259 14.6826545245 -0.2584242636508
+4.066295409812 15.50171025648 -0.7151264129515
+3.305182246375 13.93837608824 -0.9533207329523
+3.3138986757 13.99836995035 -0.9546318335722
+0.606130556285 14.6423077146 -0.2834134846584
+0.6251342751596 14.63808857847 -0.2163326761573
+3.643506322528 17.24238780565 -0.5852429495127
+4.207421772504 14.44292994399 -1.003976837145
+4.253032502264 14.49555448964 -0.9950457444617
+3.940928456836 16.38139905516 -0.4539712604927
+1.321676748842 13.79588172493 -0.1302934141274
+1.313497633647 13.85134025479 -0.1029478976472
+2.574957455086 17.02655487894 -0.2377978469188
+3.714878169599 15.96243002584 -0.4778698958235
+3.747712865314 15.90634522641 -0.4521709833038
+3.417869111363 16.25768810112 -0.7016958260088
+3.076466087311 13.69769304824 -1.193454980694
+1.3285 13.44009950724 -1.922708887767
+1.3285 13.43994053102 -1.974066339614
+2.526640579088 16.11654183378 -2.584647599684e-14
+1.311089849974 13.84309023843 -0.829068193972
+1.299872038499 13.88932226741 -0.8859880613311
+1.165900767379 14.22596260947 -0.36300364654
+2.356135712648 12.73711669838 -1.883891815301
+1.279031628598 13.97921220289 -0.624552487553
+2.314285645035 12.70659833354 -1.887501805514
+2.301432546946 12.70545754917 -1.837209387979
+1.525645670667 12.80740543062 -0.286120421256
+1.464337999458 12.82704216606 -0.3228892708496
+0.9030682777565 15.58981653493 -0.6704006564999
+0.3606580955875 14.68335615723 -2.589071583133
+0.3935822893091 14.75795032767 -2.602223433196
+1.3285 13.54581877129 -0.005902644136756
+4.030775486367 16.75313619073 -0.4876125695238
+4.008620809014 16.69094901669 -0.4841824034444
+4.063578055861 16.70831769357 -0.4694982170404
+2.578455424689 13.42457646744 -0.03143965793748
+3.573056860622 15.14169610702 -1.228706522955
+1.175850347911 14.21064240773 -0.3102481904765
+1.196442192362 14.17548252551 -0.3437216645791
+2.910509196951 15.24818436955 -1.750242218884
+0.7892625338785 14.44604251892 -1.910714900695
+0.7607297889313 14.4526877636 -1.96271923182
+2.621726653409 17.06665993299 -0.05403423415635
+2.683020137909 17.11516724864 -0.07650668197578
+2.4279 13.19527291225 -0.7930486679437
+0.6865029633729 15.43639743913 -1.219845853178
+3.663697806982 15.53488162809 -0.7841086574929
+2.924480827925 15.03199303619 -3.117767079371e-14
+4.195005339177 16.44557650729 -0.3850262030813
+2.186533199207 14.04178559324 -2.475938747338
+2.132040405801 14.09742609292 -2.4857526444
+2.8257596059 15.6110686215 -0.9884322618077
+2.872682948851 15.59220188543 -1.00657232519
+3.617296515642 15.50667345523 -0.9437815817129
+0.4988315308612 15.00315538841 -2.64546126895
+0.5171065143848 15.05506793112 -2.654616855174
+0.5603284524944 15.02032613776 -2.648486297795
+0.162605158698 14.64645838337 -1.062545874002
+4.008868936653 14.50961242896 -1.114341727888
+3.15798306967 13.97919445888 -3.36738e-14
+1.266153482476 13.87299200445 -2.086907183285
+2.505030660506 15.26354365683 -2.294227188879
+0.8653245466906 15.33405959056 -1.761850688533
+1.242050215202 15.55376834519 -1.045087550312
+1.25448171622 15.50478088187 -1.106957325923
+1.20685961921 15.52558172864 -1.081418254932
+4.8279 14.84406778103 -0.5541755440684
+4.827900000022 14.80168008245 -0.581752287961
+4.8279 14.87543025077 -0.6094550831744
+1.274657805701 13.9508551441 -1.234107475938
+1.259482773001 13.99111543808 -1.260498993182
+1.3285 13.61769979315 -1.095353186351
+0.32788351413 14.74155687966 -2.599335033977
+1.755075987153 14.80363342203 -2.610282037149
+2.776394353184 13.82737432367 -3.36738e-14
+2.811607296149 13.86711931731 -3.36738e-14
+4.275449174004 13.98503059192 -0.3828605372622
+3.841150251534 15.06592019311 -1.324878458264
+1.463355973501 14.40560728749 -2.540091270378
+1.500615461287 14.36980486367 -2.533777875877
+2.989387949037 15.51820490608 0
+2.687510431543 14.91289709739 -2.629548722272
+2.700598464426 14.95600473844 -2.564962675468
+0.5277177822399 14.55798350836 -1.765953478271
+1.958541948066 15.33123309108 -3.3934e-14
+1.585679625114 15.44798171242 -1.196500802607
+1.888085215302 12.68987683192 -1.674662296151
+3.734322694138 13.84067644479 -3.375809843778e-14
+4.639141473044 17.61040748298 -3.3934e-14
+3.318583101807 14.9241754321 -3.3934e-14
+3.188046249992 14.5980220009 -2.499885474847
+3.187940063024 14.66651287039 -2.517670554277
+2.405618638651 14.72339869282 -3.3934e-14
+2.710447155963 15.06063488371 -2.43373591746
+4.018172145815 17.6149607535 -3.240948353248e-14
+3.993109647588 17.66197757304 -3.3934e-14
+3.940562038702 17.6124391363 -1.135984375907e-14
+3.987991318691 17.55865201397 0
+4.602241512214 13.73793944856 -3.3934e-14
+3.637302295129 16.27668171454 -0.5729178298305
+1.141702067089 15.70929478775 -0.2531673880063
+1.210469405544 15.74657562777 -0.2157241543589
+1.188672522971 15.73378456012 -0.2633863428681
+3.022288006786 15.599801978 -0.9131408247124
+3.054850568927 15.56340056657 -0.8747406075653
+4.729340041575 17.29027762146 -3.393398568599e-14
+4.787774098934 17.30411832051 -1.381526305586e-14
+1.3285 13.52619427609 -0.05293079376227
+0.7555788734931 14.41833318799 -2.2175373962
+0.6952363315839 14.4403767545 -2.24931096876
+4.254787539881 16.42592883762 -0.3669917524691
+4.181306422035 16.36728649685 -0.3751086473173
+2.719798653207 14.04199284918 -2.20834762226
+0.8699695780967 14.38432428863 -2.015594515723
+0.4873025935284 15.1039401528 -2.663231167248
+3.842015170151 15.13366793006 -1.274114808139
+3.900231078188 15.13705039871 -1.254968890482
+3.189860037823 14.32571791496 -2.424040858603
+4.8279 17.3678421286 -0.2374315030432
+1.339126147926 13.13959171051 -2.316863443056
+2.334434885791 12.7073533883 -1.97219093519
+2.025719186847 16.31303564169 2.151385638057e-16
+2.086112592134 16.34849981523 0
+4.267316258821 15.03358633483 -3.3934e-14
+1.179900851346 14.07744280475 -1.915904994846
+2.985496505945 15.13501434196 -1.585724652776
+4.293758539826 17.80814330388 -0.171872428092
+0.2265068319696 15.37464891958 -3.703198359468e-12
+1.002923965953 14.37513974388 -1.157072080852
+0.9687085270924 14.40163060691 -1.214340405514
+3.448368902087 14.21822905365 -3.36738e-14
+2.752395409515 15.18629066361 -2.197724364708
+0.4516466233467 15.42804111402 -1.219467379224
+0.3556476159339 15.4039492344 -1.297632042515
+7.78e-18 14.97508361548 -1.124539445731
+7.78e-18 14.91030346714 -1.171209379467
+3.002288888418 14.10268553445 -2.370013699898
+4.385173634172 17.53270264999 -0.5340480823033
+2.353734781745 14.57837370958 -3.3934e-14
+4.024011522093 13.94034462953 -3.388249518621e-14
+2.221512240501 15.6118848301 -0.988250973529
+4.71572600413 16.87594144755 -0.3824392949744
+1.856802423344 15.67830595919 -3.3934e-14
+1.584192989852 15.99163750503 -0.5626723956663
+3.322510603262 14.11437582255 -3.36738e-14
+3.266667057 14.12056339308 -3.36738e-14
+1.428957954678 13.47600057345 -3.392736459667e-14
+1.481880792763 13.4617289729 -3.3934e-14
+2.584453969161 13.59897312773 -2.397864003478
+3.00876492719 14.01579448948 -1.356898966501
+3.877072918221 14.33756086042 -0.598480687861
+3.353289124088 14.49013585961 -1.82303158588
+3.338509756338 14.53352941766 -1.862946248616
+3.331207100638 14.48270399456 -1.869935297309
+3.23277272856 15.22845641889 -2.533345809194e-14
+3.236305535266 14.24195822054 -1.580404393557
+2.194688809233 16.65375347545 -0.2222609754661
+2.541126073395 15.65055269535 0
+4.325011483331 16.71551892769 -0.4024371205373
+0.8812996663852 15.01537272853 -3.3934e-14
+1.156002805969 14.19763858174 -1.171374270499
+1.171485915119 14.16747093277 -1.235698032227
+3.739814587884 17.14926385777 -3.3934e-14
+1.373237956153 12.76322602906 -1.978985513083
+1.429481480717 12.70517418726 -1.954627316878
+1.404190758957 12.70955500117 -2.03662499651
+1.570585973399 12.61638350246 -2.168865162238
+1.590938255548 14.62150304164 -2.578172220416
+4.8279 17.07786797044 -0.34194800278
+4.8279 17.12667491933 -0.4079563063025
+0.5970791751048 15.49944518311 -0.5098452183111
+3.787111199341 16.00417116864 -3.3934e-14
+3.692319746933 15.9979207894 -3.3934e-14
+0.6059338046344 15.23734952046 -2.461970828458
+3.962501368507 14.39212953223 -0.567164199132
+2.006711832314 16.40237720049 -0.7333632007439
+2.130814527484 12.61953242065 -2.141294951215
+3.256312911521 14.62881960046 -2.099662388535
+1.298563591309 15.2483859321 -2.392947649668
+1.359582074754 15.25248936793 -2.366254309353
+3.880389091391 17.37728005031 -0.5614536784495
+4.690445241835 14.87045309666 -0.9613261405588
+3.18727074088 14.36769152465 -2.494029240836
+0.710103599983 14.80964706459 -2.611345509686
+4.115297149977 15.50467493165 -0.6971378565473
+4.779861562035 14.75221573306 -0.9355065038271
+4.822953073565 14.69810240702 -0.9249607350488
+7.78e-18 15.27167641647 -2.039306884102
+4.179066260611 13.70199087998 -3.376881522711e-14
+2.905740986702 13.40065871798 -1.418062296056
+2.87177172315 13.39983322575 -1.378495986878
+2.645975725285 13.6122886179 -2.400211810794
+4.016553219438 13.63237614035 -0.4100722816486
+3.693024105124 13.62579851528 -2.046531898463e-14
+7.78e-18 15.2134185787 -1.352582261256
+0.5820711372217 14.54938368476 -2.565448964121
+3.791860941089 15.77904781586 -0.4094736778448
+3.745031950016 15.84866165404 -0.4432176206835
+1.173754250922 14.87050256808 -2.622063589881
+1.528733903047 12.67192061248 -1.875325786735
+1.504411386689 13.85221212512 -2.442517956171
+4.803959523914 16.30498603366 -0.2795533570653
+3.358862483608 14.04708625788 -0.9185624071629
+4.114442700524 17.16216223269 -3.3934e-14
+0.3179141622671 15.45555089504 -0.05113284492243
+1.507602961786 12.8130411837 -0.1728858106422
+1.482371709782 12.81725592932 -0.2267359770554
+3.80151536306 15.12826391037 -1.304671906206
+2.768181155899 13.66571093543 -1.881046133252
+3.856565398295 14.32581936688 -1.104890830063
+4.164326055909 14.39624354157 -1.013874891437
+4.158775271699 14.47554017838 -1.030527223424
+2.4279 13.34578332971 -1.127284460152
+2.4279 13.31623494986 -1.183487965624
+2.489146385045 13.36141230536 -1.133330633957
+0.2906131509653 14.92303349369 -2.631327980964
+0.235501676395 14.90027856528 -2.627326397049
+2.707158825711 15.28029120306 -2.179753719174
+2.646837076991 15.28074548301 -2.176499075078
+0.3301161203501 14.52576420435 -2.155343492212
+2.123794656742 16.56276796933 -0.5752978471749
+0.4429267242901 14.56205754164 -1.838325135772
+0.6523183050108 14.42242134704 -2.543058037463
+4.251369836697 15.25036297772 -0.612240063669
+0.3226605644757 15.41995782395 -1.05836066966
+0.3752747602205 15.42877380857 -1.033127871967
+1.3285 13.46115391952 -1.781648558084
+1.3285 13.51935949378 -1.092870851941
+1.3285 13.56968904031 -1.057474778109
+3.258615985745 15.67216928898 -0.7142259498774
+3.224077582204 15.70507267954 -0.7480117257518
+2.331427284087 14.2078139648 -3.36738e-14
+4.625075454563 16.1559831402 -3.3934e-14
+2.270491394756 12.99212753339 -2.290865950683
+3.813120833993 14.43885649894 -1.236359737177
+2.903801228197 13.4741570612 -0.1637937169639
+2.4279 13.15899145684 -0.1727316499266
+0.7727211580746 14.55629178641 -0.8256572572347
+0.8126802163853 14.53733908182 -0.7975900814816
+1.891428227854 15.20283441856 -2.666795856572
+4.30116054775 13.65585652108 -1.806294789947e-14
+4.264625248346 13.69679664891 -3.221301028218e-14
+3.688366818288 15.75872864603 -0.4553965516798
+2.62427431639 14.08522797781 -2.48359819776
+2.595559001663 14.13881723061 -2.493054308017
+4.669624948232 14.2805660387 -0.366805133045
+2.948717360911 14.0494736186 -1.471110800065
+2.87296304038 17.25180378105 -0.2041208079265
+2.426205810772 12.997399506 -1.072976215111
+2.462635972884 13.40219278792 -0.2606925908454
+3.084388093058 14.6883202113 -2.589944127949
+0.3395688589399 15.44920421889 -0.5352969589012
+0.7570436101641 15.29417283582 -2.080074620025
+3.345458426434 16.5036446267 -3.355911845745e-14
+2.956226937977 16.54588121987 -0.7080496155678
+2.212409452111 16.17765946329 -3.150457530486e-14
+2.16299320306 16.15986094364 -3.3934e-14
+0.7951960728555 14.51000839667 -2.558498993502
+0.3343082821745 15.13751188031 -2.669153266386
+1.644557840277 16.04901936247 -0.3223336618004
+4.479976257526 17.29116610132 -3.3934e-14
+4.530877068194 17.22862792239 -3.3934e-14
+4.686875607157 14.00063577118 -0.3162351575237
+2.585239898155e-15 14.5244290353 -2.517783062386
+2.082554055751e-15 14.57793630097 -2.52458385797
+3.205772725029 14.30111377933 -1.244707324548
+1.512713561744 12.72999803814 -2.244645584153
+1.479445843172 12.69253361861 -2.238038122608
+1.462799329127 12.75237443504 -2.248579778895
+4.8279 15.25506759448 -0.02182407812779
+7.78e-18 14.94165182014 -1.709237008484
+0.7019894533539 14.39187445467 -2.52711179226
+0.7194528517617 14.43970986207 -2.546109894589
+1.306344868858 14.90380577099 -2.627947950129
+4.032140336885 14.13664878526 -3.3934e-14
+3.988869760834 14.16903616865 -3.3934e-14
+1.711387500126 12.76606708931 -0.9307018934791
+1.071810301266 14.16836283456 -2.289531039562
+2.28147120214 15.39033825662 -1.342257548181
+1.556728901164 12.75144433032 -1.163245284608
+1.485003120235 12.76802927695 -1.138725620459
+1.510371070232 12.75775315529 -1.195220317971
+1.562897453884 12.74489063197 -1.219193926372
+4.827900000007 16.84900074836 -0.03519343891959
+0.1521730972984 15.0942935505 -8.17662e-14
+4.8279 16.80550232291 -0.01010997843316
+4.8279 16.8870420599 -0.002419186478964
+3.3851644567 15.11247708733 -1.394089962236
+4.710408684001 15.98939001778 -0.2264316101692
+3.239345842387 14.31614203974 -2.106103889804
+1.3285 12.96132130212 -1.54403720616
+2.056320843559 15.16911929007 -3.3934e-14
+2.171750862563 12.75813408044 -1.033263051284
+2.214804559599 12.76278288817 -1.066625945587
+3.422305739652 13.53786691158 -0.1833182355066
+1.440482217355 12.78834825945 -1.227958437918
+2.951140541207 13.48181034487 -0.01238675051469
+1.117998867502 15.37218659015 -1.426935415628
+0.473565579695 14.53323198695 -2.021572235592
+3.67128158001 14.89211271561 -1.443262300855
+3.714790774901 14.87036810595 -1.397079328504
+4.375599148209 15.30527252198 -0.586863267876
+1.042668732568 14.33216379886 -2.527147623953
+0.996498774918 14.35793479224 -2.53168839504
+4.104583055261 17.37826287492 -2.760363341599e-14
+3.238272500753 15.20457317047 -1.243662798701
+2.512700409689 14.18573496281 -2.501321902019
+3.034269173352 14.15188667273 -2.090965283692
+2.4279 13.10008228748 -0.6588824251824
+4.43497689413 14.48327434958 -0.9357570592662
+0.01176588917874 14.68472014705 -0.08847284680687
+0.05339911188281 14.68379293048 -0.1875599258828
+4.8279 15.75762926085 -0.110078215462
+7.78e-18 14.9576545185 -1.653290394171
+0.1027769012513 15.43641740549 -0.1483601558361
+0.7179593870867 15.24353682974 -2.423353077156
+2.52675396191 13.33091199476 -1.508222189818
+2.584051650569 15.16869107853 -2.674648262434
+2.631192459874 15.2005862759 -2.679762509683
+0.7422597577581 15.34627010923 -1.652761787537
+1.400206211144 12.84788665109 -0.838824588398
+1.401539223657 12.84965185475 -0.7829027877435
+3.304409918364 14.51733604738 -1.940270213647
+0.8265571187818 15.34710169449 -1.644596495874
+2.90535483665 13.71222149404 -1.499993358623
+3.75321171985 15.28409404457 -3.3934e-14
+2.244529152534 14.53984700761 -2.563772876738
+0.4997631935828 14.62663189 -1.118056355534
+1.827240591256 13.8915349885 -3.36738e-14
+2.257901770717 15.37907512176 -1.385622151255
+0.08001310755678 14.78130968013 -2.606335355928
+0.06148616821016 14.83992339513 -2.616669148336
+1.338033701163 12.97458571751 -0.8428297651228
+1.34812514924 12.92740205038 -0.8206322852481
+1.166979229981 15.49981273398 -1.114783369012
+1.210041756177 15.46764852355 -1.161988779031
+0.4007748332611 14.48336705658 -2.402973460487
+7.78e-18 14.68468689313 -1.803783040762
+4.525900543008 15.98284167493 -0.2405224527544
+4.509289471303 16.06908291595 -0.2579871232347
+4.54570984264 15.00963922611 -1.004927340875
+2.575381232529 13.36567206839 -1.251154512777
+3.095357317458 14.85677823945 -2.619655746216
+0.3016688814741 14.61157937705 -1.465883061051
+0.3681092973993 14.6056265576 -1.504774006994
+4.429100143456 15.16292620792 -3.3934e-14
+3.842302710586 15.11704084372 -1.33319574014
+3.426029831375 16.60934264249 -3.3934e-14
+3.606176086134 15.75948625177 0
+3.02809511013 13.80719415857 -3.36738e-14
+1.037699441365 14.37825682245 -0.5752734425876
+3.96164588588 15.14142959651 -3.3934e-14
+2.239647247948 13.56935933994 -2.392642154205
+1.751309212022e-16 15.12538443359 -2.608081854153
+0.4845523631708 14.56670487416 -2.568504713141
+3.207918672687 14.41614496905 -3.381889034593e-14
+3.285296824565 14.44145996825 -3.36738e-14
+3.211745754152 14.46815262085 -3.391558684947e-14
+2.999584742947 15.00120923608 -2.025406892664
+4.084666511048 16.63858996956 -0.4500776437984
+4.134356523266 16.6124017485 -0.4306221577882
+4.097197181097 16.56610006689 -0.4335842080899
+3.415063649366 14.22871466788 -0.8977064699598
+4.582689760278 15.27018843134 -0.5456914790126
+3.072709186899 17.04108512999 0
+1.160103538168 14.92209169804 -2.631160338693
+1.185591224036 14.96912379118 -2.639460411671
+3.225148524409 15.82463366463 0
+0.8479021305925 14.92270176452 -2.631275400697
+3.782225242547 14.46150006279 -3.3934e-14
+1.674189342577 15.87896521546 -0.8338923694587
+1.3285 13.09396681857 -0.03441088009425
+1.509125509139 12.78684373207 -2.254666368347
+0.02533462821545 14.64850293728 -1.034339474372
+3.153460372444 15.27691865729 -1.358880844577
+2.692910643638 15.05557146881 -2.658939030125e-14
+2.671920268512 15.10364587438 -1.668965624589e-14
+1.234741259167 14.09756272299 -0.4554577149645
+1.207288860902 14.15314616665 -0.4870516637082
+0.4851524147858 14.61886478611 -1.240808252898
+4.765419543012 15.35246978121 -2.151188948278e-14
+3.926451434301 17.50000331747 -0.539815155884
+1.826071404067 15.26158819338 -2.307113619627
+4.295057131556 15.58673026961 -0.4899346861308
+1.307454638086 15.78681016963 -0.7459140874879
+1.271212178244 15.76252603787 -0.7977505919512
+1.986167178238 15.23615811606 -3.3934e-14
+3.576299998679 13.78667677939 -3.36738e-14
+3.530299185665 13.72091897914 -3.36738e-14
+3.594104190234 13.70324054839 -3.36738e-14
+3.166567809866 14.84861330283 -3.3934e-14
+1.3285 13.31000315392 -2.275880829462
+0.3783821941789 14.46408091435 -2.550405682843
+2.748572448274 15.2496967043 -2.227241541401
+3.160920809967 14.47982598571 -3.387155011371e-14
+3.135474629769 14.40217546141 -3.37771500728e-14
+3.106366537338 14.3241450007 -3.36738e-14
+3.18083721115 14.34399021664 -3.36738e-14
+3.268005919804 14.37007751434 -3.36738e-14
+3.340534938455 14.38165212306 -3.368841752045e-14
+3.48940171472 14.52336558697 -3.3934e-14
+3.395299251757 14.52576199137 -3.386719282592e-14
+2.110557579388 12.74937754078 -1.136580164174
+2.047695283848 12.7475570223 -1.15755297053
+2.053046952439 12.75222206033 -1.103810621612
+3.191703937435 14.26790865947 -1.432939926813
+4.390314758581 17.82223493467 -0.03536577864633
+4.3236103842 17.80903038823 -3.3934e-14
+3.914547248737 15.84182843461 -0.3688685533159
+1.25263345441 15.74868883724 -0.8532520726238
+1.168662611211 15.09082383275 -2.660916283792
+1.312781893302 13.81627760166 -1.055118978975
+2.202796090522 15.22556086209 -2.533605906402
+2.177720305548 15.23449728784 -2.479769850174
+2.720907762751 13.33055177059 -1.771422023149
+3.787200118887 14.39733609091 -0.6575291439338
+1.47106926285 14.45515364504 -2.54883052351
+2.27140816771 12.69460357401 -2.238407395452
+3.506565110374 15.35958990375 -1.0135602513
+3.498581914907 15.43398131075 -1.033367284468
+4.713775084142 15.60364900756 -0.393988736629
+2.488478990813 13.63749219101 -3.36738e-14
+2.714428989317 14.06859403721 -2.260052018661
+2.750433950933 13.5449115318 -1.937176055818
+2.747298437909 13.59359650841 -1.960859607635
+2.767035189508 13.57691782712 -1.869872619509
+2.289839202089 16.16607240384 -0.7750246364544
+4.439981671941 15.63783250847 -0.2000225317265
+1.328040174429 13.68470855773 -0.5150315098263
+1.325394061226 13.7391828139 -0.499224788284
+2.80994664861 13.55733652344 -3.171689696368e-14
+2.245529049779 16.08445935034 -0.7894126611438
+2.217628145574 16.12713830313 -0.7818917349286
+2.239415891234 16.70280157191 -0.2868573227025
+0.003527322711533 14.5663205605 -1.862753231526
+0.1628919024606 14.65670766931 -0.9104269845647
+1.203351359566 15.63341432589 -0.968674795622
+3.344171362115 15.10190192398 -1.454208380408
+1.997033210781 16.35376809349 -0.7419351442053
+4.283207062071 16.77221318866 -3.3934e-14
+4.8279 14.66140616497 -0.8896284576067
+3.143255653639 14.26186063643 -1.46725422495
+3.523183976445 16.55220379441 -0.6868211667624
+2.574484867214 16.35205769608 0
+1.048673455517 14.37456988789 -0.2955440220496
+1.042010135583 14.38081748387 -0.3470461052844
+3.303136877778 15.10902022915 -1.413803794433
+2.585237899649 15.67760325183 0
+2.555259059373 15.29687941656 -2.059618820587
+3.492765378973 13.54538957561 -0.1482005542355
+0.8534083802599 14.5259492805 -0.5051404150457
+0.7247729713647 14.74775488476 -3.3934e-14
+3.182375778711 13.50033036025 -0.557074067862
+3.210022008177 13.50602371236 -0.5032293203621
+2.075765335083 13.33787861552 -3.390096254598e-14
+4.302502948083 17.70540493343 -0.5035951261083
+1.247498765419 13.96232764295 -1.800802687139
+1.273062655519 13.9338561243 -1.456839171448
+1.249515041771 13.99963704989 -1.441558640545
+0.7868673852957 15.38387121045 -1.365374299544
+1.624497384845 15.70326184169 -0.9199534441615
+4.8279 14.96874536446 -0.8124132518946
+4.8279 14.98106154829 -0.8628975541707
+4.8279 15.0335608269 -0.8007462212504
+4.827900000316 15.04729813124 -0.8499597685366
+4.369434199421 13.60107279223 -0.2874736117263
+3.461458314724 15.54834991501 -0.7076534644266
+3.437801634519 16.06129422091 0
+3.519352810541 16.03718006557 -1.632696181327e-14
+0.08438550844591 15.14911072333 -2.671192197585
+2.840249277131 15.14257294225 -1.896841487757
+2.866035349279 15.14155718953 -1.831465429969
+0.6094754236373 14.6439739913 -0.07349900439761
+0.5582833714081 14.6570389248 -0.01506821301749
+0.6791865893948 14.62014890803 -0.04560286028407
+3.909879087347 15.92770009849 -3.3934e-14
+4.460304121868 14.10262349663 -3.3934e-14
+2.728406302178 13.84871754988 -3.36738e-14
+0.8247561605914 15.26459248298 -2.287243449816
+2.247563419246 15.28027117001 -2.179631989529
+2.765644281201 15.62500955068 -0.9758638360824
+2.791324230062 15.65872185278 -0.9488932332332
+3.430786823277 15.31589985237 -1.069522071822
+2.719063356227 13.79703490574 -3.36738e-14
+3.945342426547 16.54968336946 -3.3934e-14
+3.892250827063 16.60228058399 -3.3934e-14
+3.032800734154 13.83431389673 -1.285339603611
+3.028655223307 13.90323255599 -1.303952980362
+4.255305467156 16.16388679705 -0.3205523160621
+4.214782031381 16.19328506896 -0.33533122753
+0.7947842329626 14.48017941617 -1.608674082187
+0.8370573569584 14.45134515114 -1.644650425468
+4.422098836953 17.7748062852 -0.4913638944044
+3.734359875747 13.66827711848 -3.363225514473e-14
+3.721465520595 13.72211224601 -3.379633818542e-14
+3.668508964411 13.68658507335 -3.381880043858e-14
+-4.36436e-15 14.8018838695 -0.1986802318649
+2.059829186095 13.22168273705 -2.331342456463
+1.458537284331 13.67424137568 -3.387052120971e-14
+1.463761104419 13.74941160242 -3.370950583782e-14
+2.493447208267 13.40034753144 -0.5131577769855
+3.729564930353 14.3331955352 -3.3934e-14
+3.783595763975 14.40727743809 -3.3934e-14
+3.729364307982 14.40823688532 -3.387125411474e-14
+2.910318769236 13.62139062759 -1.473237629301
+2.944751433927 13.64019979781 -1.406586034475
+4.8279 15.29126648354 -0.1913493036506
+2.4279 13.10596786651 -0.1825604553098
+1.533347679404 15.33932057814 -1.715251044344
+1.42105702086 15.83438095326 8.030015215203e-15
+4.8279 14.45253955261 -0.8068390650806
+4.350027620053 17.10577836141 -0.4661204420829
+1.706272636425 12.76229392515 -0.9816287121425
+3.179716459869 14.21248053573 -1.747481477247
+2.293979854451 13.5673696306 -2.392290653827
+2.750171064728 14.98609924165 -2.173586056431
+2.799024794636 14.96998714886 -2.202239755441
+2.4279 13.11650815129 -0.9268745505814
+4.71987399336 16.49627268151 -3.3934e-14
+1.3285 13.49903956705 -1.926599881852
+4.8279 17.47837665723 -0.335538910528
+4.8279 17.50754859685 -0.2858017683244
+3.39229356562 15.05054276732 -1.745458370388
+4.453737000159 16.31370427502 -3.3934e-14
+4.730649029137 14.4472273073 -3.347809947536e-14
+3.477480455653 14.33921110448 -0.8626036287061
+3.550731079405 14.37080381085 -0.8494128097602
+1.881924959278 15.36222231952 -1.49667120466
+4.064597275499 17.01791316515 -3.3934e-14
+7.78e-18 15.07305917395 -1.819250833257
+1.927139987754 16.33435304912 -0.5005686220503
+3.162551021281 14.98931305663 -2.092767550515
+4.047865086536 15.60713979382 -0.3742277514061
+2.422837881139 14.1690145154 -3.36738e-14
+2.375662496498 14.14984049893 -3.36738e-14
+2.420326425539 14.11407989649 -3.36738e-14
+2.385392435319 14.20787426025 -3.36738e-14
+3.182702644464 14.41051687172 -2.540965031225
+4.137024547657 15.21263518661 -0.8263630452935
+2.234359115029 16.64426222267 -0.6907036269698
+2.854976009288 14.10928912152 -3.36738e-14
+2.905045375247 14.12029141242 -3.36738e-14
+2.825994485929 14.15157461687 -3.36738e-14
+1.519331680876 14.88419607788 -3.3934e-14
+0.663388258167 14.5968421437 -0.921585119695
+4.497964489284 17.83143393883 -0.3090607004038
+3.676542092455 13.75445990365 -3.370424880455e-14
+4.641297136139 15.61220814518 -0.3454968105664
+1.106642653238 14.28224192475 -0.9280331543381
+4.8279 15.01670103538 -0.03761691745179
+4.8279 14.97098731266 -0.006150536717255
+0.5770344723625 15.20738332008 -3.3934e-14
+3.846682697735 14.47281831126 -1.215975004986
+3.800196467041 14.50219056505 -1.257946475224
+7.78e-18 15.00419006855 -1.433051926153
+1.867367422332 12.75341345127 -1.090085514333
+2.303205763065 16.0346444195 -0.798193095805
+4.212019533639 14.37991421591 -0.7979223909589
+2.916933118696 17.05452303557 0
+2.218764557581 14.65070953912 -3.3934e-14
+1.243506260502 14.08558153585 -0.149307228781
+1.012178239772 15.55450196795 -1.044599765258
+1.053317786016 15.57662451325 -1.020957119299
+1.07935154753 15.54555461577 -1.055812800142
+-4.67051e-15 14.75912295249 -0.3731626312452
+3.679387720127 16.8802900194 -0.6490839803427
+3.110831757521 13.74917225248 -1.154028934193
+4.449779767717 17.37413384418 -0.4961992212453
+1.38568164973 13.30519637079 -2.346064746542
+1.137110291024 15.69394365976 -0.684400651246
+1.544662617985 14.31470479805 -2.524064615822
+3.381970837688 16.29815300798 -3.3934e-14
+3.452782531462 16.29418607541 -3.3934e-14
+1.77023018966 16.15919425346 -0.5866496573009
+3.498381338432 15.60002573921 -0.5337212530368
+3.496209138698 15.56804761277 -0.5955872124113
+3.749598832917 16.53543657083 -0.5621547568394
+2.186589226958 15.64943242298 -3.3934e-14
+2.435523855648 13.44899028801 -2.371423418933
+1.330670152499 12.90948811805 -1.832968351757
+4.423284628861 15.2355487033 -0.6962097159094
+4.372551270665 15.2459127102 -0.6376424900516
+4.433759866232 15.24612018733 -0.6362573976539
+4.41767254655 15.25700620272 -0.5745157597518
+2.215197942849 12.74471804393 -1.265319057872
+4.8279 16.42431197477 -0.2932986426476
+4.8279 16.37216899497 -0.265527209479
+0.6057510764151 15.3315067635 -1.784110990794
+0.6748194319197 15.32668502705 -1.825418278497
+2.47450633089 13.48709769774 -2.378138728119
+2.726451996605 15.43909377054 -1.213621385649
+2.015475836736 16.44552200093 -0.05891349373194
+4.608154273904 16.39139140975 -0.3042074916019
+2.999204988846 13.93720198686 -1.359560408858
+2.562257856996 14.17619776915 -2.499645152933
+4.686269674261 17.84437727378 -0.2941198924112
+3.978257075752 15.0674871757 -1.231091991907
+2.535887732824 16.54220205813 -0.7087021602565
+-4.36436e-15 15.24981596299 -0.4162363601684
+-4.36436e-15 15.2908362973 -0.4480236269503
+0.9236668204323 15.23456660815 -3.3934e-14
+2.25203324314 12.73104229441 -1.461532755448
+4.289382967238 17.43183031547 -3.3934e-14
+1.878025021789 15.07632723814 -2.658356395853
+4.566712264905 14.43282702215 -3.3934e-14
+1.151412090084 14.12380124272 -1.90721590593
+4.759674328391 15.59976309214 -0.4160108916927
+2.214553393502 12.80563803984 -0.2002245299216
+2.4279 13.23799629606 -0.5334060237727
+0.6888394421101 15.31581711541 -1.914012153076
+-4.67051e-15 14.69984834975 -0.2859841400623
+3.042787865031 17.24306484146 0
+2.667448026167 16.09208251912 0
+4.52815069771 17.83515734419 -0.24951682859
+2.026948973536 12.799958765 -0.01001292964512
+1.975207691126 16.19604598711 -1.361702898794e-14
+3.620619261905 13.75251622043 -3.369700611493e-14
+1.089879021339 15.65856414448 -0.9165142433421
+0.9647266531458 14.45520868524 -0.1762348159197
+2.408551074453 13.539433742 -3.36738e-14
+1.19284241759 14.13776299233 -1.164813051603
+1.3285 13.31703886117 -0.5868691228598
+4.301943285189 14.2410048947 -3.3934e-14
+4.708619366036 17.21379930444 -0.4424200887404
+3.19142871209 15.74645338077 -0.7823079230989
+3.161852583444 14.27961393631 -1.366743392415
+3.113408686799 14.28228760512 -1.35160229524
+4.8279 15.60808212164 -0.1720978523517
+0.1397244287726 15.1614665167 -8.17662e-14
+0.1934790175123 15.15486116201 -8.17662e-14
+0.1686200423416 15.20747346281 -8.17662e-14
+2.534362833888 14.95606337036 -3.568458472659e-15
+1.255346297675 15.77289628841 -0.07495022946994
+1.274330195203 15.78447661597 -0.02693272553057
+3.437441861787 15.5716579344 -0.5753294131712
+1.595285096177 12.69237187754 -1.65589682415
+2.772723108078 13.49102518251 -1.832488214855
+2.78322859633 13.54737537243 -1.801354201927
+2.787430808621 13.49955192425 -1.778645614214
+4.186350626988 17.79028430186 -0.0541300609876
+0.2936524230899 14.98420214214 -2.642111767673
+1.331252693964 14.22063289297 -3.390880490613e-14
+2.751253293202 15.31656867503 -1.908469618544
+3.121310288555 15.05576463975 -1.715937834998
+4.8279 16.87876183604 -0.1480600281019
+4.8279 16.82688098146 -0.1898598366037
+4.8279 13.99109546131 -0.2790294152624
+4.764186767619 13.99895404694 -0.3121067753648
+4.8279 14.0392580271 -0.3071471908217
+4.793993136398 13.9488944785 -0.3025786557301
+2.074139454667 15.35207451429 -1.5972185052
+3.233328312208 13.50374204849 -0.6197054942862
+3.372450279172 17.08579968748 -1.086129369566e-14
+2.182073125445 16.62830223656 -0.6414564303112
+1.320391457176 13.79843944257 -0.432908500498
+2.110813032003 12.79485300684 -0.3603449595219
+1.379979429923 12.90364112506 -0.2237791289451
+1.347384051847 12.95349616389 -0.1954674615503
+-4.67051e-15 14.92384784368 -0.05055613331679
+2.401581644627 14.00071804787 -3.36738e-14
+3.352355673152 14.28819450776 -1.789559786048
+3.322235163897 14.27239491226 -1.853087185556
+3.301850824475 14.28691749889 -1.905926678283
+2.280580111529 13.74061368165 -3.36738e-14
+2.675280293667 13.4062485519 -2.363885551505
+2.703928946582 13.38738911243 -2.315387881016
+3.193549237974 14.58777272311 -2.417842113433
+3.191839283448 14.63097830117 -2.448044596604
+1.819502805422 12.79688149961 -0.2815766924726
+1.22970555906 14.07967805057 -1.005402104554
+2.525015221297 15.51481887185 -1.092728711279
+3.382675343679 14.87130957222 -1.832539846578
+4.027336472548 17.5629569503 -0.5287186452716
+7.78e-18 14.77057826841 -1.433093706454
+3.380914232661 16.11998234225 -1.93726153205e-14
+0.1729121216773 14.86427695283 -8.17662e-14
+3.799451772173 15.2001949009 -0.8967973857683
+0.2868252320219 15.36842122848 -1.446434907549
+0.3418965545089 15.37067939746 -1.435522608737
+1.160387704038 14.23731704533 -0.2639552087035
+4.766202529715 17.84900422443 -0.02230341866421
+0.9032628879721 14.89659829376 -2.626670481967
+4.521621105133 16.83793417285 -0.3917406882369
+2.098805381299 15.4661816569 -1.164347809783
+4.691969393269 14.09424435058 -0.3323759712723
+2.988473615112 13.42968015083 -1.288672893652
+2.945981010043 13.42403646237 -1.238308686081
+4.00961585892 17.35425304909 -5.668010739516e-15
+3.810728479911 17.06626450535 -3.3934e-14
+3.884161779924 17.08700256141 -3.3934e-14
+0.6469409454788 14.46251836036 -2.219434542153
+1.764752035294 14.62780068962 -2.579272243643
+3.574827307033 13.84650525885 -3.36738e-14
+2.839395960167 14.11288281405 -1.728699693511
+1.779920470602 15.2180987068 -2.578566539477
+0.6343303312995 15.31651999765 -1.908349628394
+0.8939326711141 15.34495625251 -1.664299998089
+4.114819710895 17.05971327765 -0.5153400259912
+4.307592464214 15.24526356316 -0.6412963291655
+4.319379104706 15.26089253734 -0.5917858278169
+4.280639040451 15.3003439463 -0.6092871666697
+0.8316580272204 15.49205268042 -1.125173589689
+4.408519781334 15.1146266602 -3.3934e-14
+0.9524514787339 14.4207013579 -1.139683892527
+0.9147775726803 14.44438602962 -1.193955384666
+2.758727755442 16.33894652031 0
+4.025206507874 13.58336717667 -0.3594873286295
+3.423387920078 13.52687944193 -0.5759178769465
+1.313271799756 15.3468580377 -1.647262907314
+2.743569631617 15.97443176037 -0.80923563659
+3.135817465657 14.67108367018 -2.586907319845
+0.1118574395709 14.8206719713 -8.17662e-14
+0.1699464858064 14.80269422767 -8.17662e-14
+2.825878814028 15.34999692032 -1.617106714688
+1.3285 13.46841861375 -0.8731760251381
+3.458021113518 17.53819048512 -0.5330899871288
+2.793634801466 13.50612909049 -1.561333264679e-14
+2.749436254142 13.5400790972 -2.910918341952e-14
+2.748364930678 13.47716503785 -8.305897940751e-15
+4.533635504136 15.51405463343 -0.5946391539122
+0.1621963599104 14.53912939346 -2.5636431186
+0.112427216475 14.52720265221 -2.561539264054
+2.254337658329 12.80463271726 -2.257799829039
+1.303323083707 15.80151237701 -0.1237093675997
+3.653751006866 15.94931252283 -3.3934e-14
+1.757940357132 16.15758311253 -0.09623613451223
+1.980392427792 12.71645865758 -1.460102797375
+1.918307768636 12.72226593235 -1.407687002988
+1.897328186678 12.71529794373 -1.469924065611
+1.942780868174 12.71201348891 -1.497715163176
+1.751467690626 12.6331892308 -2.227581676441
+1.801556016785 12.60773007711 -2.209762849662
+1.705264835105 12.61233764657 -2.223905493155
+1.128176941279 14.60256417077 -2.574826021417
+1.179741791242 14.66406997399 -2.585674295781
+1.224402553332 14.60929421537 -2.576015381477
+4.36285776943 16.10531454331 -0.2876786256564
+1.07941681432 15.67325691013 -0.4664919872707
+1.056807680093 15.66045567616 -0.5415628744377
+1.262768585989 14.03861173423 -0.007714356884717
+1.8876046211 12.7364677237 -1.273532453599
+1.950446638727 12.73437635107 -1.293739295971
+-4.36436e-15 15.20806959471 -0.6441850090056
+0.1051648113767 15.25917273992 -2.32294879801
+-4.36436e-15 15.17797415661 -0.5809975657034
+-4.36436e-15 15.10608198224 -0.5688533555931
+3.484114141366 17.47967895334 -0.54340161742
+2.523366771966 13.35008519538 -1.322417322223
+4.8279 14.5868816197 -0.8897694113502
+4.8279 15.54121244365 -0.4930706242812
+3.570877922154 16.09644581078 -0.5779498195237
+1.432314796682 13.42086538825 -2.366460264252
+2.426024695825 13.03803192306 -0.263632364706
+2.421922760962 13.01686228858 -0.3094178747134
+4.8279 15.52615600948 -0.2924327943989
+4.8279 15.47618881031 -0.2719191685675
+3.03817105397 15.01352888351 -1.955649017136
+0.4033801218573 15.33694621224 -1.736605179804
+0.1041856041544 14.65702121845 -0.904973950082
+0.03534591531676 14.65774616527 -0.893272517941
+2.373490421129 14.49643182229 -3.391195642885e-14
+3.044973346207 15.50264729613 -0.9667201361572
+2.717203217525 15.33153990235 -1.783589251859
+1.259950278623 13.90895410749 -1.960543148295
+2.660649484208 14.15989728562 -3.388619800542e-14
+2.649999216177 14.21131054897 -3.385529181806e-14
+2.604373702043 14.18875181623 -3.388346474278e-14
+2.749815542506 13.99655250238 -3.36738e-14
+1.207050736354 14.36444748939 -3.3934e-14
+2.408941335512 12.91323465826 -1.059451579489
+2.380355828087 12.87307904084 -0.995458279377
+2.667401017852 15.92446302317 -0.8216017507671
+2.138514335096 12.79985104465 -0.03617023292714
+2.2352644765 13.63485758208 -2.404186453826
+3.614649703262 17.09785885971 -3.3934e-14
+3.684059372216 17.10693789668 -3.3934e-14
+0.4273704380907 14.4988655608 -2.556541430824
+4.070930503729 15.44179030123 -3.3934e-14
+2.34943748105 16.81826357261 -0.3078733154012
+2.328933452104 16.79850999884 -0.2385609365476
+2.388029416956 16.85700410075 -0.255822759894
+2.34741594123 16.8180792835 -0.1862128976834
+1.3285 13.42840429772 -2.317792381014
+3.795719833659 13.99367447586 -3.3934e-14
+3.770529662434 14.04019059727 -3.3934e-14
+1.390032228733 12.8919844131 -3.3934e-14
+3.724987440939 13.9369570225 -0.6134787787356
+2.088297096039 16.47880525327 0
+3.713844395961 15.21835004444 -0.8418690077549
+2.4279 13.2827747341 -1.138113508643
+2.368299692894 16.82819127794 -0.6196661735089
+2.419133575679 16.86289694939 -0.6521630479233
+0.8350014719344 15.23084417113 -2.501979963502
+0.5143295882152 15.24829833504 -2.393564629404
+0.5513539981735 15.25712355052 -2.335950537814
+1.3285 13.10911195106 -1.184416136711
+2.046365586383 14.75754578422 -2.602160443612
+1.227502552461 13.95476119662 -2.155339206302
+4.8279 14.60787084571 -0.05385770691206
+2.898517818991 13.53827196734 -1.484099829688
+2.89523576904 13.48087364492 -1.481082938688
+4.516810396071 17.78906863226 -3.3934e-14
+0.0574809087527 15.37308466412 -1.392362938487
+2.379304029455 16.18283220172 -2.802476961045e-14
+2.387912000502 16.1307651317 -2.848358528478e-14
+2.427415620359 16.20451979649 -3.3934e-14
+4.499336479205 17.17364901999 -3.3934e-14
+2.05742893399 13.94223599849 -2.458393293164
+4.048789924886 17.3991250466 -1.145209117862e-14
+2.443211505016 13.76922768604 -3.36738e-14
+1.950071802473 15.2722089609 -3.3934e-14
+1.767990725435 15.7797215038 -3.3934e-14
+2.583921052612 14.8823383147 -3.026913539101e-14
+2.532981761502 14.89731099566 -9.880754062904e-15
+0.3171473778994 14.67822283208 -0.4445940249225
+1.506175180384 15.09894990394 -2.662346948282
+1.120679796823 15.21095550778 -2.619788114355
+3.787749261718 14.82351810875 -3.3934e-14
+3.830700656351 14.79346798525 -3.3934e-14
+4.328156251514 17.81250718235 -0.2205337834861
+1.611920948216 15.31195467525 -3.3934e-14
+1.500163641167 12.97357635173 -2.287588305482
+1.901657910207 13.27433580736 -2.340626216361
+1.91853149354 13.20001486348 -2.327527714484
+3.739022259092 14.14287898827 -3.3934e-14
+3.723384933411 14.06418369632 -3.3934e-14
+3.391053542168 16.03589601999 0
+4.19272303545 17.76900554829 -3.3934e-14
+4.26907443326 17.71517979235 -3.3934e-14
+4.301334375085 17.75920429216 -3.3934e-14
+2.922168239297 14.11905959597 -2.277280068461
+3.058715954698 13.88162363816 -1.253299216485
+2.745394155626 13.48734480369 -1.95129840827
+2.760485740379 13.52311922022 -1.885982573061
+3.762307382069 16.60907387862 -3.3934e-14
+3.076863117108 13.48001147422 -0.7090933319805
+1.60456452953 16.0069659748 -0.6069408192529
+7.78e-18 14.806167445 -1.118230704322
+7.78e-18 14.85492029896 -1.136467375815
+2.590229785382 15.72753360854 -5.448399429436e-17
+4.755187230032 15.24184250572 -0.6607247586493
+0.2450952180575 15.14691894285 -6.822756434088e-14
+0.2773210046913 15.19629290387 -5.392688636138e-14
+0.5194664616799 15.3495450088 -1.621403509963
+2.000769286896 16.37847701621 0
+1.969295375996 16.32900057329 1.433366738548e-14
+1.3285 13.18745372338 -2.102147119343
+-4.36436e-15 15.30976571126 -0.5325887510973
+0.02819740822801 15.38547847928 -1.2402471142
+0.09093185970422 15.38658934668 -1.243151690524
+-4.255202704314e-15 14.67549314804 -0.7251995378646
+2.702938840514 13.79075754308 -2.429974586915
+2.664964899932 13.6887875011 -2.413697412053
+3.147505743611 16.8381810175 0
+3.111042775301 16.77997761644 0
+3.458431553898 17.56431733168 -0.4746799116343
+4.320170273576 14.7298432276 -3.3934e-14
+2.741355755936 13.42869520515 -1.960391508931
+2.141247213761 12.63289971992 -2.060864230556
+1.3285 13.25336352452 -0.5187024981399
+4.368511691277 14.12496755283 -3.3934e-14
+0.2801041404544 15.24951721301 -2.385489121341
+4.144164888762 14.99450142681 -3.3934e-14
+3.582168406999 15.27286102294 -0.9402233665612
+1.343289500367 14.49102631262 -2.555155067386
+2.181374663111 12.75249438963 -1.108636703454
+2.110990549735 12.75540036503 -1.067195469062
+2.173060050131 12.74743682486 -1.158937673571
+0.8024218005036 14.95275688533 -3.3934e-14
+2.177430486121 14.51318103481 -2.559071830348
+2.115378222607 14.47653259149 -2.552605519839
+3.801539959257 14.32398716817 -1.115188465222
+2.004102423506 13.80919266627 -2.434933339883
+2.680411001255 16.95808674488 -0.635374497051
+4.216696653073 15.16557274094 -3.3934e-14
+4.725679248769 15.87142105147 -0.2047182724297
+3.190645232538 14.79243952059 -2.49470217011
+0.41956160499 15.43790699557 -1.003565725499
+0.4252162481085 15.43516104433 -1.059369989056
+1.917133714344 16.29993343185 -0.7514227800935
+1.933073053536 15.33413716503 -1.761065418624
+3.208891001152 13.50962681879 -0.3889250436738
+2.749710345292 14.7356425997 -2.598288359827
+-4.36436e-15 15.06561944731 -0.2329590272294
+-4.40083110806e-15 15.02320142553 -0.3084042376238
+1.3285 13.51704257473 -0.5968714904611
+2.069629219497 16.03736486342 -3.3934e-14
+0.8104856356546 15.40249269564 -1.306494285136
+2.370828571751 12.80599723904 -1.532579884448
+2.328719858824 12.7595019687 -1.569488768669
+2.340900395066 12.76089070703 -1.623085989473
+3.085531626881 13.77220640474 -1.193799155873
+3.565842109239 14.20715340149 -0.7696125548759
+3.819284017409 14.06071636516 -3.3934e-14
+0.08983197762372 15.31835261151 -1.893543544635
+0.9231950123798 14.74856070397 -2.600575667189
+0.8600070546727 14.75318483066 -2.601393206764
+3.796057229981 15.41673274351 -3.3934e-14
+2.150388715836 12.60614266072 -2.21897178884
+0.0725912678596 15.1652433796 -5.507727813259e-14
+0.03965844022526 15.22386551579 -3.108889173539e-14
+1.321947522442 13.71417565284 -1.488089502271
+3.021621096481 17.026962001 0
+1.392349092492 15.8438083271 -0.6921189430398
+1.369070386037 15.83069993734 -0.6419435307651
+1.095902625132 15.50367266348 -1.10767805287
+3.261561179925 13.50516509143 -0.6616637100809
+3.011514110753 14.25629283917 -1.498786694703
+0.05221118461417 14.48234621739 -2.430883924543
+1.941048448869 12.96491750307 -2.286067812246
+2.084938886817 13.47006237636 -2.375130432036
+0.1148137587841 15.38386167232 -1.288171611869
+4.24933993939 17.34858437219 -0.5306528514789
+0.06395422841629 15.37946856617 -1.320073037736
+3.507936405977 14.55341619826 -1.575714121367
+1.535267095561 15.32658574445 -1.826032490211
+3.583945287335 14.55757325626 -1.480020257698
+1.608104069219 12.77690597092 -0.767652700429
+1.679107261264 12.77878148633 -0.7345839319934
+1.645051072616 12.77480100633 -0.8015715366271
+1.130554363 14.06453334538 -2.47234740956
+4.06984115572 16.79845760158 -0.4830702407835
+4.124846693421 16.7522434581 -0.4583108441908
+2.757157399771 13.46690691549 -1.891063413275
+2.767926422452 13.43247324867 -1.840923598072
+1.326514174412 13.60858254137 -1.78700277358
+0.8909052018126 14.48104416554 -0.9361093915617
+4.8279 14.50221042675 -0.7863707181765
+3.941995329112 17.26669777733 -0.5809570197081
+2.80140519585 13.53127689066 -1.738412993764
+2.798559922079 13.44286166973 -1.732166351998
+0.4860326906401 14.59144332331 -1.528397705542
+-4.3948196854e-15 14.86137354695 -0.4828884369227
+1.3285 13.49419956311 -1.644102445816
+4.355003481048 16.60840354204 -0.3779248414927
+4.4156906211 16.63133226863 -0.3706606599422
+0.7165360728748 15.45432682886 -2.937107744455e-14
+1.37725786541 12.90855064845 -0.1684314750852
+1.411018801932 12.86576836559 -0.1796005645313
+2.132071555529 13.87232357564 -2.446067484761
+4.141605906585 15.61867445464 -0.3088851314863
+0.9610515242053 14.33677870539 -1.878576172844
+4.8279 17.73630187381 -0.4259460089939
+1.483025156005 15.92096919165 -0.2197760071391
+3.705522396339 15.36350254459 -0.8725493361028
+2.518626221079 14.22875850582 -3.378277245423e-14
+2.551724565203 14.18780327469 -3.381943757633e-14
+2.572031750139 14.24309835009 -3.390512011585e-14
+1.516986588509 15.69915906281 -0.9201949366714
+4.206356990957 15.33966968974 -3.3934e-14
+2.275227127555 15.44211446968 -1.209614095824
+1.324039403486 13.65541673791 -1.81716335604
+2.607049907699 17.05256651396 -0.2709706633205
+2.568327181541 17.02007604668 -0.2972230267876
+4.031430848714 16.38816844979 -3.3934e-14
+3.414998444785 16.25286918545 -3.3934e-14
+3.447430150318 14.26273818472 -1.46215976179
+3.456055721865 14.25016271833 -1.533542988965
+3.225873782277 14.75597544074 -2.23997805937
+4.8279 16.94259596654 -0.3692165400201
+4.8279 16.99646024962 -0.3590337773277
+2.41475794774 15.36481731953 -1.472222809282
+3.844347982796 15.12581706162 -3.3934e-14
+3.896118301303 15.16685048552 -3.3934e-14
+2.4279 13.21827443584 -0.8787213329446
+2.4279 13.20883625881 -0.942793939892
+4.536421758129 17.31012301317 -0.473410871611
+2.353640743322 15.30887937878 -1.968407329239
+2.342110088843 15.31522365998 -1.919099295465
+2.827395658213 14.13553068451 -2.183752568292
+2.884128162878 13.78406441693 -3.36738e-14
+2.131237508503 12.77933807885 -0.7247708620247
+4.734222276555 17.81470121982 -3.226528507512e-14
+4.683684456574 17.78635629901 -3.3934e-14
+3.011335392251 13.47056460298 -0.7254933292919
+4.178665225522 16.80561613493 -0.4528972570661
+1.77787613931 16.1609997912 -0.7282337349277
+1.792899866659 16.17875318607 -0.6823095672634
+3.945605364051 16.58924018229 -0.4887776946238
+3.110144454404 13.80891545529 -1.165532680269
+3.816700260174 14.75274259653 -1.288788173687
+3.616044615657 13.81758746723 -3.36738e-14
+0.3855398128886 15.46492556944 -0.05695341122177
+4.825676041662 16.69346080152 -7.657041622321e-16
+4.748260724641 16.66167900772 -2.741963443629e-14
+4.801850799117 16.64264428269 -8.968684890164e-15
+3.803607081809 17.01195546164 -3.3934e-14
+3.421510974699 15.77594176418 -0.6142133624262
+2.715443902868 15.0104824982 -3.043890165775e-14
+2.322419736521 13.00122292292 -3.36738e-14
+7.78e-18 15.02564473913 -1.960792503138
+4.293216864904 15.8898409904 -0.2636601719415
+2.398166775086 16.86544867386 -0.3397142774703
+1.328432778333 13.54754981927 -1.943758379126
+1.325979631099 13.59586567109 -1.959084070559
+7.78e-18 14.92644925013 -0.7822952818059
+7.78e-18 15.10579037894 -1.915835758274
+4.169197878524 15.62601863053 -0.2670665379435
+2.001280558503 15.55959121059 -3.3934e-14
+3.974580504194 13.8694619785 -0.4695294328127
+3.414604865458 17.01888179745 -0.6246598497779
+1.958352600036 16.37134418532 -0.4875796264555
+4.078899335496 15.21381961161 -0.8196854497433
+1.837660332848 12.74108858074 -1.226097731373
+4.321475458777 16.15714190211 -0.3045016557321
+3.789991677189 13.66906919592 -3.245749924869e-14
+2.828638456794 16.1044475663 -0.7858836652914
+4.795724001609 16.63179657513 -0.3373406380355
+2.794728036739 15.25084080141 -2.049942793988
+2.77287866495 15.2765585064 -2.13081191768
+3.386467856174 17.35887639255 -0.5646988189788
+2.444990990276 16.03468541306 -0.7981844027902
+4.8279 15.20676360614 -0.04812624166145
+1.186014108451 14.19634211891 -0.1427148102164
+1.733211820627 12.78028097009 -0.7081458522618
+1.3285 13.0810075745 -1.03155358277
+4.319210582932 15.99274263928 -3.3934e-14
+1.665134274866 14.54195322631 -2.564135237377
+1.682856679924 14.48487249743 -2.554074577899
+1.294133176121 13.91608314553 -0.8247701075474
+1.278653189164 13.9706314245 -0.8106319402844
+3.581520389984 13.64844299566 -3.114841880517e-14
+3.52371113979 13.65503876076 -3.36738e-14
+1.3285 13.10936016647 -2.088816900333
+4.8279 17.79828955922 -0.2127086295929
+4.461957760441 17.12018474955 -3.3934e-14
+2.042650737879 12.68308062154 -1.725777231602
+0.7211711908304 14.60384973532 -0.08778319490788
+1.289817799833 14.49047537611 -2.555057223337
+3.093575760124 15.50521078975 -0.9521719789919
+1.308887336216 14.42397932903 -2.543337592905
+1.3285 13.09972273415 -0.6131279219927
+1.919084525182 12.6177532552 -2.151616267383
+2.22722601433 15.5563720339 -1.044403845099
+2.98220600521 14.01055029465 -1.401863533573
+4.399869724482 17.12328250068 -0.4604963687132
+-4.457010258519e-15 15.06701067405 -0.1718049188036
+-4.36436e-15 15.11768159087 -0.1375380444553
+2.483653271514 15.35588478104 -1.561210710355
+1.747110150857 12.6353662989 -2.045902399565
+1.37482698122 13.46737832978 -3.3934e-14
+2.125673667729 16.56054427867 -0.6916282437244
+3.780245427828 15.42938630593 -0.8389903648582
+2.006919388303 15.443393954 -1.208527151696
+1.956411653665 15.44217460386 -1.21047744275
+1.997629589224 15.46632438041 -1.164433876858
+1.637526360369 15.36025930806 -3.3934e-14
+3.162315883548 15.43372139357 -1.224143719228
+0.3450316837672 14.88458002449 -2.62454886762
+0.3571100946537 14.82057898182 -2.613266922193
+1.989835097468 12.70861330469 -1.526485493861
+3.493072232456 15.52987403404 -0.812353232525
+3.640065931182 15.87226327679 -0.5001708836353
+2.47287592636 16.40834180398 0
+0.8897871980205 14.45951656295 -1.234648366144
+4.72859021039 15.0482480745 -0.9900090558609
+4.182547786753 15.53713129375 -0.6801200882365
+1.098776382903 15.68839973634 -0.1946894354835
+1.323446250397 13.68237459123 -1.676325503583
+1.325953987938 13.63244414227 -1.690303408987
+1.327183440018 13.61310209087 -1.642146438409
+3.31053841324 14.56801798466 -1.934020439843
+3.330734136062 14.57830324378 -1.887850935687
+1.341146477656 12.97072367533 -0.6344849120244
+1.566995157714 15.09243044818 -2.661196941016
+4.750741052922 14.12447052916 -0.33455462925
+3.136872965889 14.12234301718 -3.36738e-14
+1.128445524874 14.80773331087 -3.3934e-14
+3.276867199562 17.28086929464 0
+2.934888697776 15.28174730551 -1.706147036755
+2.408323576213 12.92573268398 -0.8476488392431
+3.423748684993 15.77868474269 0
+4.8279 14.89987083548 -0.4382643041362
+0.5359289043432 14.59637213963 -1.391948440229
+3.594709779079 14.65686133912 -1.484904219454
+3.569365846395 14.59985672665 -1.504559724753
+4.8279 15.87166656941 -0.1355743486318
+3.400759771073 15.84886912267 -0.6410245541379
+2.500273402244 14.17659572495 -3.36988489064e-14
+2.820167452783 15.14391639027 -1.951865029386
+2.483607270892 14.98568805127 -9.279797631981e-15
+2.796760242402 17.19019499772 -0.5802104885109
+2.878042043849 17.20291531586 -0.5922046060445
+1.346573284907 12.88373609232 -1.393363882073
+1.3285 13.50407387796 -0.2714691321838
+2.124115993287 12.77646427681 -0.7754406946466
+2.091873630994 12.77243663467 -0.8385361029263
+1.3285 13.49234155543 -2.192056484537
+0.02299725470346 14.62254829126 -1.352338988611
+0.02418815122205 14.61753580289 -1.405477162054
+0.5424845063545 15.29487581899 -2.07432236976
+0.4944246524185 15.29836116667 -2.048583128058
+4.331711505359 16.75091331659 -3.3934e-14
+4.326073155025 16.81799851299 -3.3934e-14
+4.8279 16.71264793529 -0.2844502261135
+4.8279 16.64586263956 -0.290579440717
+2.417484945979 12.99648359922 -0.2360261755692
+2.411338414209 12.9652829545 -0.2853367641244
+3.942810961741 15.18915585657 -0.9595438790465
+3.7742428828 17.58540018665 -0.52475762513
+4.298262811005 17.21917411813 -1.533821407485e-14
+2.008492709855 15.61870981552 -3.3934e-14
+3.426570687189 14.31966350483 -1.657188648155
+3.397335187833 14.33524412232 -1.71073115215
+1.207257650802 14.15848955326 -0.2958356319447
+4.251620853486 14.42021201115 -0.5691278517213
+2.936633606447 13.4375712401 -1.386521233554
+7.78e-18 14.87180042763 -0.9404000584087
+7.78e-18 14.85907479313 -0.9889763001046
+7.78e-18 14.81007112636 -0.9628028589795
+2.984072897866 14.24171116921 -1.439398585937
+2.621262151618 14.11129360453 -3.36738e-14
+2.4279 13.25897258795 -0.8328725040536
+2.4279 13.36556432511 -0.6492088036188
+2.137595764094 15.25245160189 -2.366438966633
+2.504426949584 15.12768601753 -2.66741588971
+2.461292487652 15.1743396109 -2.675645406601
+0.1557257971457 15.04428351601 -2.652705647342
+0.3773100273315 15.42543409298 -1.087010746943
+2.228128060826 16.6911967227 -0.237080663319
+2.53536940753 13.74832534525 -2.424197581799
+2.455163621409 13.66128783401 -2.408852492936
+1.217410677055 14.00273742064 -1.976101082042
+3.286526822276 14.53610288031 -1.991001319922
+0.4319364733819 15.36649817093 -1.461582800008
+1.591187545166 13.94500908363 -3.36738e-14
+1.577226981657 13.99877979909 -3.373252950025e-14
+2.101029621543 15.29244804175 -2.092603918761
+3.253541765973 14.30547819424 -1.220167484816
+3.379326926784 17.25637272247 -2.243686701212e-14
+2.109271248282 15.81181958601 -0.8592807181514
+3.548632463916 16.29619757294 -0.6260494914041
+2.788965126938 13.73873642227 -1.815788207415
+1.202918003398 14.0940493202 -1.453740915811
+1.222042755691 14.05420262837 -1.478747160989
+3.328244442796 17.3498093474 -0.5663013687932
+1.5783557897 14.08278336438 -2.483181960823
+4.78291704846 14.0677135619 -0.3237922698749
+1.415906031176 12.69384181612 -2.083747182872
+1.036126049514 14.64615069274 -3.3934e-14
+0.9387003609803 15.29852036961 -2.047708178889
+0.6916854565566 15.03835411528 -3.3934e-14
+2.393421823362 15.13788055449 -2.669214167357
+2.451370719229 15.10957661408 -2.664221459639
+2.439526757706 15.05339551581 -2.654311327025
+2.097204044838 15.26414882497 -2.290194332086
+3.380126601978 15.79669244586 -0.6460477584584
+0.01650847590259 14.67542376292 -0.5278460750324
+2.710260939283 13.90373139198 -2.27749980413
+3.194444045487 14.5159582819 -2.397274338451
+0.5973812756219 15.42562978137 -1.245076399889
+0.7082180009773 14.47508830514 -1.980139195398
+0.7955656591554 14.43016014829 -2.005634217092
+4.307523444765 14.02827652765 -0.3820262506946
+2.775205842697 14.05139394521 -3.370167942244e-14
+1.3285 13.02626851595 -1.552592773853
+3.330701812567 16.27550495118 -1.587375326929e-14
+4.560914577254 16.07701325428 -0.2535236334727
+2.334303168528 16.07257189034 -2.655050470979e-14
+2.304361834045 16.03190501183 -3.3934e-14
+2.377011995916 16.04562315044 -2.030765404501e-14
+1.577075634355 15.41923420018 -1.259629245003
+4.8279 14.32343241499 -0.06474921937035
+4.701575102768 16.12481730315 -0.2508574803942
+4.328210426304 17.50221080314 -0.5394278765289
+4.378271457453 17.47525635078 -0.5260435188419
+4.321329066134 17.45275513269 -0.5331508544263
+4.273880957719 17.46439355058 -0.5452273481328
+4.336012561729 14.39065066044 -0.947649285464
+4.240550981281 17.40693208008 -0.5435655129709
+4.181330093545 17.36228737075 -0.5505407175355
+1.341207331393 12.83931173021 -1.945770822357
+0.6170921681209 14.61554972554 -0.8861192111818
+0.5704796899029 14.62813527257 -0.870393353088
+0.9037019737701 15.60108884918 -0.3114166776091
+4.827900000348 14.86201521717 -0.658434179219
+4.8279 14.91816464143 -0.6481580202702
+4.635519280799 16.96326356512 -0.4026828993008
+4.668143827339 16.89380217154 -0.3884747088757
+4.594154247599 16.92287802221 -0.3993395889728
+1.1801637216 15.73123018621 -0.02502015743225
+1.212886144751 15.74926142102 -0.05965460807616
+1.26153506188 15.7683022848 -0.5307775441284
+0.3863299374452 15.35877462999 -1.531632497367
+0.3953051596968 15.37312232013 -1.420296686046
+3.199153753473 14.57966675387 -2.366027843402
+0.07202534233363 14.62455128976 -1.331304650699
+0.3234889677119 15.45531085965 -0.1863383430925
+4.761990362532 17.0854974368 -0.4180209666429
+4.708749105502 17.1417976428 -0.4297093420997
+4.77184349054 17.1468902886 -0.4286460439152
+2.703984608502 14.03096654495 -2.426421343804
+3.634813458205 16.0113518122 -2.974008614293e-14
+3.594611136554 15.96809514855 -1.446435568196e-14
+4.8279 15.36845293728 -0.3237593802255
+0.7017752183353 15.27527272177 -2.214460591124
+2.657158413494 13.24058472848 -2.292570069969
+1.675127343457 12.95171541135 -2.283732370156
+3.61202838415 17.47986211341 -1.605291639164e-14
+0.3900737159171 15.44946677826 -0.7087075744196
+3.374494152571 17.19553213318 -3.3934e-14
+3.190287126934 14.55331776064 -2.457642240353
+1.28564612938 13.82023987071 -2.069622816718
+3.579742962081 15.05182731282 -1.571680185685
+3.528196237932 15.08765994738 -1.535131989685
+3.531264717144 15.07349218048 -1.61560292043
+1.160263496194 14.20727153412 -0.9661479770062
+0.4099653542199 15.44438675057 -0.870211676944
+2.135847685154 13.46754344531 -2.374687419044
+0.2642231849709 15.31173362368 -1.946593888095
+3.307029280751 14.33115183609 -3.36738e-14
+4.8279 16.96418196234 -0.02993849679246
+4.560301950277 14.43654049353 -0.4767665360099
+3.415914497541 15.10385190005 -1.44327687727
+2.4279 12.91525883978 -1.91171017862
+2.776193687311 14.56390705352 -3.374777401615e-14
+2.846881034138 14.56031809339 -3.373288454182e-14
+2.757321501839 14.2016915126 -3.370719330747e-14
+1.559677200492 12.7585698183 -2.249684791189
+2.894356848679 14.19899413531 -3.36738e-14
+2.193585787678 14.87413790867 -3.3934e-14
+1.245345894488 15.09186713355 -3.3934e-14
+4.511723751906 16.593666882 -0.3501143298094
+4.594130601687 16.58808553742 -0.3403042369904
+2.637890785552 14.95595662594 -2.63713701247
+3.760879419974 13.61846231492 -1.623977792911e-14
+2.198940172115 12.74607508827 -1.217499732328
+2.221702676141 12.75479573288 -1.173242943673
+1.385206093636 15.13932291366 -3.3934e-14
+4.68477098123 15.23995247935 -3.3934e-14
+4.679944286622 14.393155104 -0.877936421691
+4.635530992921 14.44610798583 -0.8923437804379
+1.076417550254 15.37975643088 -1.380543011568
+1.100882427449 15.4030021796 -1.301871725258
+3.071458420986 14.01480541448 -1.2569279369
+2.4279 13.15797610764 -0.8897923000497
+4.586383748 17.29911884505 -0.4660576802713
+1.3285 13.2815166585 -1.363637900602
+2.809298181498 15.9430527804 -0.8169056539529
+0.4272028187425 14.46250675902 -2.517426666685
+0.009330324400007 14.64245158233 -1.116905261465
+4.444565827339 15.44085729271 -3.3934e-14
+2.964138265272 17.31196159203 -0.1226840421329
+2.42796034127 16.02834048196 -8.788216448718e-15
+3.969672280586 13.78439284594 -0.4565880038044
+4.026746122569 13.81118497119 -0.4373102809721
+4.723208466413 16.03182740999 -3.3934e-14
+1.646321539616 14.96006391607 -2.637862719114
+1.85149543608 13.17075297627 -2.32236823371
+1.365957338633 14.17318344352 -2.499113772522
+3.283610241098 17.48760206766 -0.3382238684746
+3.325705685166 17.50797678626 -0.3184595497666
+1.341219278953 13.79511733052 -3.388561247342e-14
+0.898002704751 14.50523127427 -0.1562710140318
+3.944158569431 17.68301330657 -3.3934e-14
+2.357116571102 15.5459525209 -3.3934e-14
+2.314292132381 15.57682788669 -3.3934e-14
+4.703559969561 15.18104596839 -3.3934e-14
+4.763801750736 15.14897024103 -2.206889194921e-14
+0.403157397936 14.66904596819 -0.5979890154661
+2.681726618263 13.71230761108 -3.36738e-14
+1.976357514096 12.79846687451 -0.1960421936604
+1.925733980895 12.79817433828 -0.2118251732803
+0.7787176959896 15.27395171638 -3.3934e-14
+1.334551161465 12.93476522224 -1.48335524582
+4.613633843321 14.96870208196 -0.9870579931502
+2.878630567392 17.00987057993 -0.6262452091806
+3.736988440968 15.43799843778 -0.8663093279785
+4.761722742077 14.98908950209 -0.9777030215726
+4.138236396525 16.3315028805 -0.3806766355229
+2.923499557482 14.55965540138 -3.372418073011e-14
+1.190938212962 14.05197995089 -1.965567747487
+3.999785018501 14.68004655998 -1.149837616342
+1.363813913706 15.82328958436 -0.7367958366363
+0.9905022788145 14.42558264963 -0.4615343803864
+1.030143037153 14.39129992194 -0.4050713680321
+4.226138354296 13.95660491396 -3.3934e-14
+0.5542087418443 15.49345333642 -0.3426168282786
+1.099117457528 15.2539435394 -3.3934e-14
+3.744794795902 13.75088725699 -0.5688471469905
+0.5910126414871 15.50130557236 -0.38646754005
+0.6453643652056 15.51530839683 -0.3727241563062
+1.658055304393 15.59574601923 -1.001816662438
+4.512891150123 13.79786765432 -3.3934e-14
+1.156994448775 14.39910514371 -3.3934e-14
+3.213515303563 14.31000316257 -2.22160480901
+3.229176856147 14.38081345559 -2.157912084212
+3.227179203768 14.3152833037 -2.15567746372
+1.425893078277 12.8570436723 -0.00477606655893
+0.7492427056724 15.2328769482 -3.3934e-14
+4.421448617875 16.32028394474 -0.3148201032509
+4.357793645071 16.28537030434 -0.3203774554669
+3.380584067425 13.5822384817 -0.8155442360891
+3.044233413225 13.56750281608 -1.220478656776
+4.221574428312 16.31296261315 -0.3545952760695
+2.850522596546 13.4754753058 -1.586493575707
+-2.062998251174e-15 15.28849985453 -0.67027617403
+4.726585452261 14.04591626655 -0.3214147617382
+2.919627926563 13.47324407472 -0.3347514739547
+1.504473715548 15.3863113085 -3.3934e-14
+4.8279 13.98821848262 -0.1225443895666
+4.8279 13.92299878005 -0.1128082164951
+4.827900000499 13.93091654123 -0.1624344161031
+3.512102529869 15.48439797533 -1.030936807637
+4.7221966385 15.78567924563 -3.3934e-14
+2.681868525431 15.26075707091 -2.312553928612
+2.369225243397 12.86665847034 -0.8553989674939
+4.181288722312 13.65112602765 -1.831255007248e-14
+0.780875835263 14.53582763683 -1.07923814658
+1.374522442898 13.37769364147 -2.358845097829
+1.319432675872 15.81014005826 -0.2250539131059
+4.213765152761 15.07599628457 -1.112778795255
+1.890422764994 12.90747024056 -3.3934e-14
+4.003976504418 14.36029845538 -0.9090078956769
+4.163505542136 14.15574149725 -3.3934e-14
+0.8389863745325 15.57990336871 -0.09816312038555
+0.8872873992391 15.59777586892 -0.1032321645771
+3.196424435639 13.64189663986 -3.36738e-14
+3.163662058477 13.57279612099 -2.090504059763e-14
+2.879513663995 15.07447239632 -1.362021993462e-14
+3.92178097509 13.96767294275 -3.3934e-14
+1.299804800315 14.33720128319 -2.528041129916
+3.130688751808 14.251773118 -1.524713782836
+1.725745817855 12.70031001295 -1.593656397741
+0.5920156044059 14.45937691778 -2.346771598804
+2.031530349762 16.46453569084 -0.005635242449767
+2.075449883978 16.5159814177 -0.03755858601805
+1.238943065673 14.02663090297 -1.397520876394
+1.3285 13.33581694041 -2.339323944789
+1.589339598262 12.78688158639 -0.5782888500341
+1.694215758556 12.76955254318 -0.8824637098439
+1.6935876764 12.77314117109 -0.8275212626536
+2.748526499589 15.90357276621 -0.8266202433306
+1.946185885262 13.60769067544 -2.399407969668
+2.027854975856 15.61091907789 -0.9908392453152
+2.179976810437 15.67200387639 -0.940283631868
+4.608281239767 16.77599117139 -0.3720150565038
+3.699728319432 17.55821253765 0
+4.8279 14.46909414245 -0.689129417173
+4.8279 14.44480274675 -0.7405289239282
+2.141073512257 12.78944838577 -0.5175327089413
+2.100619904382 12.79152012821 -0.4643564467327
+2.408338003217 15.45739387082 -1.182396712417
+2.407779875912 15.48756599494 -1.13096723427
+4.032084874856 17.07382129433 -3.3934e-14
+2.195157650995 12.6764638 -1.798014767458
+3.919009361341 17.65747979865 -0.5120489483355
+3.854965647303 17.64655362363 -0.5139739752493
+0.3193354824977 15.44954442826 -0.4385986925489
+1.3285 13.22141469015 -0.6995732266373
+1.3285 13.22795253362 -0.7584965953165
+1.384708194923 12.86694358283 -0.9020949956816
+3.031975583948 13.99457046784 -1.314881154485
+0.8790819874793 15.26837088671 -2.261485376728
+1.326966714617 13.69343757093 -0.7891145571463
+4.8279 14.85357962908 -0.2299525342392
+4.8279 14.76634276767 -0.2331551780756
+1.476018922461 15.90894970237 -0.5188949052404
+1.381337925504 13.75011452018 -3.388573823595e-14
+2.798719797798 14.70808664756 -2.5934265539
+1.647943248898 12.77142409957 -0.8543655852367
+1.56839116759 12.77435290369 -0.8404320830863
+1.603609962241 12.76949136343 -0.8833104289338
+4.645908582041 17.07658851768 -0.4220113298541
+4.162668340158 17.18615172656 -1.841852841598e-14
+2.373054477909 13.46085028321 -3.36738e-14
+2.34381031969 13.55170803154 -3.36738e-14
+2.427589400922 13.48352528439 -2.725117084563e-14
+2.22110761291 12.64860931697 -2.230297420787
+2.282270089121 12.64316144117 -2.229336057272
+3.867709423226 13.89029598092 -0.5246218476778
+3.889788625214 13.93865493974 -0.521869361636
+0.2141925519382 15.10481981898 -8.17662e-14
+1.197103069912 15.74030813755 -0.1072588184009
+1.247462702924 15.76788949338 -0.1407756001113
+3.245723991298 17.29149723717 -0.5765756339798
+3.50959926877 13.53514549637 -0.587407855391
+0.9113499756433 14.45298305938 -1.118335542403
+2.233912863719 12.76191011807 -1.120437041643
+2.082618685093 13.13366558016 -2.315816084671
+1.3285 13.05014530663 -2.061641145655
+0.05346182840839 14.94636787225 -4.04340110049e-14
+2.198534705656 16.65339712024 -0.4599189064721
+1.900971033806 12.77222870458 -0.8417867222594
+1.916860284732 12.77567669389 -0.7878814613224
+3.495581887713 14.45893745883 -3.384906908376e-14
+3.297434732425 15.57065928029 0
+2.415258947015 13.4291006448 -1.304198282216e-14
+3.916817543102 13.58136685383 -0.007332737071698
+3.859411329032 13.58090777486 -1.180217762711e-15
+3.427832982603 14.2580631157 -1.644224525854
+3.464890659379 14.30124595778 -1.593322661552
+3.39853229708 14.27364894769 -1.697731086145
+1.781973031752 15.82849756037 -3.3934e-14
+2.845531036771 13.46567355705 -0.1627712187073
+3.282062244923 13.52310653189 -0.1298803522238
+0.6159591421331 15.0161559133 -2.647746384636
+0.6250184258168 14.96679561737 -2.639049090581
+1.317669982311 13.82064809358 -0.2832568726646
+0.4818832645028 15.34107088367 -1.699383601623
+3.069475833818 13.5447327366 -1.177128712791
+3.483096036783 14.37761408115 -1.579946947995
+4.637974103692 17.16694587085 -0.438262069776
+2.913679649845 14.20553427912 -1.786866029701
+2.823105916086 14.12827563409 -1.777221392869
+2.823971699813 14.19122522026 -1.785885707847
+2.839494632402 14.16556583312 -1.737707996327
+4.401523111558 16.65435331992 -3.3934e-14
+4.472313225195 16.64432082494 -3.3934e-14
+3.457725102272 14.24055437444 -1.593875501139
+4.578347635679 14.21409159328 -3.3934e-14
+2.610948602301 13.87717786883 -3.36738e-14
+2.651545612767 13.94465832572 -3.36738e-14
+2.631318516512 15.02076430137 -2.648564387509
+2.663391265647 15.1185134123 -2.665803705915
+2.531477717931 15.07922585838 -2.658872625518
+2.559681487619 15.49250205639 -1.122625628382
+3.700994284362 14.87750537526 -3.3934e-14
+3.745957138799 14.85261448805 -3.3934e-14
+2.430073762911 16.0820988113 -6.724475316474e-15
+3.063920428363 14.24174932245 -1.308689913144
+3.463204181269 15.38439220201 -1.054143263411
+3.581328241724 14.16113916968 -0.7501886282616
+2.186493750121 13.8687045909 -2.445430014684
+0.7778569201497 15.23850315489 -2.454725598557
+0.7688356852814 15.24724828274 -2.400083070516
+3.13924830408 15.00074908843 -2.028063991386
+4.200930033466 14.52332858425 -1.020884907487
+1.903980741561 12.79727813648 -0.2601772522187
+1.7377048661 14.41570934907 -2.541879802305
+2.626277665512 13.42837650182 -0.3393873680215
+4.167903077893 16.57812447676 -3.3934e-14
+4.8279 14.76571919487 -0.5461993927347
+4.8279 14.74434985435 -0.6167719520137
+2.2758437192 12.73134833289 -1.50982029889
+2.292396806633 12.73173476094 -1.597057110924
+1.843703359834 16.23937653462 -0.4875994228339
+2.520796546232 14.27639966487 -2.517312789332
+2.492522792507 14.2331653487 -2.509687353409
+2.458936724718 13.36644447536 -1.004477749307
+0.2966032585907 14.7023605261 -4.158033661742e-14
+0.3501272618145 14.72455464499 -5.201045966953e-14
+1.438727395875 12.82640128134 -0.7512618856731
+1.516447801427 12.7836831056 -0.8582473758744
+1.204303907946 15.03363931536 -2.650839769886
+2.087257355184 15.54317794816 -1.056901140699
+2.137999872283 15.51899187089 -1.087461908252
+2.080764291742 15.49993995663 -1.111768435043
+1.46303915352 14.89185310103 -3.3934e-14
+1.561215518268 12.77931724481 -0.7854192119819
+1.567215313471 15.35717968448 -3.3934e-14
+4.637832984504 15.31505405012 -3.3934e-14
+1.441232083823 14.98268178791 -3.3934e-14
+2.212325194729 12.78185270216 -0.7980673916848
+3.9327005396 15.59062052828 -3.3934e-14
+2.680216696328 14.05999971208 -2.479150718476
+2.729157282169 14.08744892515 -2.483989883661
+3.995223514696 15.24267425806 -0.6987123249271
+2.030849477755 12.79213808744 -0.4461783334114
+2.072753160887 12.79344551422 -0.4077185917358
+0.5527859463538 15.495646878 -0.2004441514688
+4.68857502644 16.32187514147 -3.3934e-14
+2.182427193117 12.62062067905 -2.140282660374
+4.417215363235 16.2601497843 -3.3934e-14
+4.342004036936 16.28176988672 -3.3934e-14
+0.4937788100162 15.20005881377 -3.3934e-14
+4.243330220382 16.38316717178 -3.3934e-14
+2.374829453322 12.89830164177 -0.3610287488786
+3.374201069057 14.10164719054 -0.9133053353265
+3.292374085878 14.1705227401 -3.36738e-14
+2.015338878626 12.72386870933 -1.393088124002
+2.4279 13.32202845642 -1.315971987982
+4.527078316979 15.448772811 -3.3934e-14
+3.220980872741 14.57954958591 -2.232548372366
+4.8279 14.82100513395 -0.6284827510348
+2.552492198535 15.46272231431 -1.171219845619
+3.69564803024 15.91038835662 -0.4783940757358
+0.2190626125477 14.63700874704 -1.185394441798
+4.34663366793 14.17958622199 -3.3934e-14
+1.912840474002 12.73023804206 -1.333723637606
+2.906510820816 16.52603133584 -0.7115507478034
+4.710673419099 14.5741388808 -0.9076815424755
+2.72158986812 14.05000233466 -3.369136934713e-14
+3.89527083802 14.40779321514 -0.6399503590162
+0.4158226176543 14.65214900539 -0.9139364991065
+0.4579749158948 14.6497336649 -0.8683297156047
+2.095390844409 13.83256622857 -2.439056246046
+4.8126460581 16.74805182914 -5.2519000044e-15
+3.742225468344 14.80269264628 -3.3934e-14
+2.699970921509 14.20164552807 -3.381293414901e-14
+4.478288930215 13.60635890908 -0.1610239690065
+4.728251093674 14.37103925371 -0.8483124432426
+3.609146502365 16.57969108001 -3.3934e-14
+2.147741668738 15.86405160972 -3.3934e-14
+7.78e-18 15.17456618019 -1.83505078657
+1.267216678793 14.02602172932 -0.05830312784287
+2.058892749702 13.11235741091 -3.3934e-14
+2.004519720316 16.30478434726 -0.7505690304973
+4.491966177542 15.84964666996 -3.3934e-14
+4.438619565872 15.79283373284 -3.3934e-14
+4.51145722805 15.789156381 -3.3934e-14
+4.742557528782 14.43141032811 -0.5059031180924
+4.491826885833 16.71008266584 -3.3934e-14
+4.816744702206 16.23181299177 -0.2663893171266
+2.330632399977 12.83336175745 -0.7791206785943
+4.3396803962 13.69493520382 -3.066488233273e-14
+1.083342188093 15.62649617152 -0.9744654068218
+1.3285 13.13470375443 -1.677355074761
+3.53348723093 17.27082664256 -0.5802275039799
+3.562579974092 17.33462490278 -0.5689742094807
+2.078846802877 12.80736345884 -3.39316178991e-14
+3.297838950911 15.47721547758 -1.111240345027
+-4.67051e-15 15.32318456343 -0.06961567408378
+-4.64040242375e-15 15.26811430552 -0.05266065908977
+1.355939732654 14.23761406262 -2.510474238505
+1.301694760055 14.27496118886 -2.517061529531
+0.3201239727631 15.44088291897 -0.6809301977524
+0.2626202197507 15.43241436302 -0.7169908794914
+0.3060208046449 15.31649705223 -1.908177103578
+0.2528186562481 15.30454858916 -2.001946327953
+0.9600532024899 15.57800870015 -1.019374123831
+0.9248078726086 14.46574228576 -0.7704616464146
+0.8847592655233 14.49287854656 -0.8162942271541
+0.9271194105507 14.45987771524 -0.8435464971017
+2.757302111716 14.31495716789 -3.36738e-14
+3.211382446172 14.1105434383 -3.36738e-14
+0.5325683083468 14.63945102822 -0.8385640811062
+2.4279 13.16843510809 -0.4444463625717
+1.33549088461 13.40969385489 -2.364486594187
+4.415960889809 17.43291354497 -0.5119586384074
+2.702366951702 13.40349158288 -1.05250392763
+2.403763743776 12.76489067053 -2.157783333733
+4.013414850227 15.18404603368 -3.3934e-14
+-4.534337431574e-15 14.8158987065 -0.4518233649536
+-4.614103341922e-15 14.83837512034 -0.5296485729357
+2.355635033646 15.51228414475 -1.096858102226
+2.310449825197 15.48973441144 -1.130119894117
+4.395108210706 14.36947331999 -0.8571162800513
+2.28790625227 14.36301133079 -3.387447444026e-14
+3.701033391457 14.93669323203 -1.422053997372
+1.59104447865 15.25786191003 -2.331229518836
+3.449606765633 13.53153999983 -0.5299397760291
+1.608573349499 12.71964312838 -2.242817156245
+2.433126706094 13.35745148448 -1.061123324747
+2.495045615067 13.36806713611 -1.064141406125
+4.764815352001 13.61146191752 -0.05792296917647
+1.292260210854 13.93309602852 -0.6451358916204
+1.309222495512 14.12340037857 -2.490334640456
+1.521652937729 14.04579825265 -2.476655791653
+1.313404136247 14.19822954921 -2.503529548853
+4.8279 15.02229700225 -0.8945201805177
+2.037687426097 15.27397844516 -2.223092687636
+1.349452038004 15.82534436969 -0.4153871290404
+2.216025253499 16.22918225164 -1.676109496007e-14
+0.7025787439836 15.52099394219 -0.6822644197623
+3.15214312234 15.49647585794 -1.001893116778
+2.302724106788 16.77058013315 -0.2881357963399
+2.645047916905 15.93815016859 0
+2.568709147276 15.94549773775 0
+3.399938551388 13.62036614131 -2.773562142468e-14
+3.36600707835 16.23870323431 -2.334016914901e-14
+3.734356104281 16.41354291755 -3.3934e-14
+7.78e-18 15.05463047565 -1.918548878687
+2.949195238097 16.77484112828 -0.6676842448673
+0.4808506893703 14.4553203992 -2.54886648677
+0.4775438046479 14.51687872501 -2.559721767254
+2.649850480859 16.37360833373 0
+2.430109014163 13.6531411206 -3.36738e-14
+3.181055989185 14.04860675831 -3.36738e-14
+2.940455725768 17.19878089813 -0.5929345630337
+4.8279 15.09483463936 -0.8248850630443
+1.78119770313 15.39994547502 -1.311991054872
+1.757286398896 15.41938395442 -1.259552097973
+1.383377936148 14.4762239799 -3.3934e-14
+4.8279 15.08366617853 -0.8858492085372
+2.294056433009 15.82260721584 -0.8555218884512
+4.478285266979 14.13515725421 -0.3646038855757
+2.353840655843 15.81052725233 -0.8603050312535
+0.4932139497376 15.04716021082 -3.729857645951e-14
+1.577236841767 15.99176802639 -0.3564039419358
+1.02759577743 14.21582590309 -2.291820605341
+0.9869599801371 14.25420917472 -2.284896784539
+2.483706808331 15.04185031786 -1.942879852603e-14
+3.552036291435 15.22127248975 -0.9540450670383
+4.8279 13.72437028527 -0.2066578098031
+4.8279 13.78531664529 -0.1934428780543
+4.59821681996 14.37902516263 -3.3934e-14
+4.8279 14.44356025831 -0.5920119981881
+4.8279 14.79284316153 -0.6725909317136
+4.8279 14.82558530564 -0.7134147028875
+4.478813941397 14.67411421864 -0.9591466602513
+2.048218023959 15.47646673438 -1.148086882142
+4.625997747148 14.38345231468 -0.7778664753958
+2.421475107007 12.97842125675 -1.018303325893
+2.478272882243 15.52747632163 -1.076962968981
+1.663622486921 12.78606807248 -0.595358913436
+1.687705644213 12.78249426526 -0.6675892799989
+4.020329174437 13.86052859589 -0.4487142028037
+7.78e-18 15.29061656819 -1.685836693616
+0.8080031499621 14.38636282441 -2.254500786083
+2.097098850351 12.68354851842 -1.722258135306
+4.8279 16.45569984553 -0.2432492229503
+2.694146272381 15.96573802624 -0.8114030857015
+2.4279 13.03401657815 -1.275478695753
+1.292255675743 13.94657851711 -0.2042502544467
+-3.159967549538e-15 14.88734863807 -0.6838498223053
+2.420498586208 16.08107611514 -0.7900023114707
+4.627619966821 17.73457301235 -0.4984540770642
+4.218849121783 16.55627987594 -3.3934e-14
+4.229124953717 16.50180884464 -3.3934e-14
+4.168878817727 16.51392751656 -3.3934e-14
+4.278677377028 16.53815463469 -3.3934e-14
+1.125715671553 15.47469126299 -1.153806596031
+3.436424322369 16.8203094745 -3.3934e-14
+3.29471 14.5908 -1.97733
+3.27739128587 14.57997585627 -2.024798180563
+0.3124538159638 14.65323287733 -2.583760742673
+3.157279382741 13.86332160822 -1.111859544696
+1.77571821385 12.7382014954 -1.256440370575
+1.726027490518 12.74492642673 -1.185762804285
+3.945011844795 16.6286640135 -3.3934e-14
+2.950198926353 14.18833095529 -3.36738e-14
+4.255600646225 16.36484958034 -0.3560056997824
+2.4279 13.18642466215 -0.05372550576228
+3.702230819811 13.56510282804 -0.05026319027962
+3.116229094336 17.07067922676 0
+3.287853221443 17.1580065543 -0.6001211958336
+2.915262775506 14.32315256727 -3.36738e-14
+2.922775153381 14.27316126514 -3.36738e-14
+2.865291001478 14.33079376552 -3.36738e-14
+1.362005953922 13.07241054665 -2.305016686017
+3.162536087954 17.13322677003 -0.6044847292324
+2.493193943621 14.92763869411 0
+2.490207580527 14.86234488168 0
+4.262092860553 17.8023688328 -0.2247168041845
+2.891318530179 15.74355835405 0
+1.714590698725 12.7999881243 -0.002883727622546
+2.303059836647 12.94547575384 -3.36738e-14
+-4.36436e-15 15.15965284196 -0.374833802093
+4.8279 16.18272609997 -0.2233781948926
+2.659076174817 17.00303523669 -0.6274484924577
+2.107762465299 12.76216447746 -0.9832354898677
+0.3041434504148 14.85079991271 -8.17662e-14
+0.3550920654978 14.82980680206 -8.17662e-14
+0.3408227727136 14.77658218974 -7.447330743993e-14
+3.037362044198 14.03453328119 -3.36738e-14
+3.109393142363 14.05448157285 -3.36738e-14
+1.304704662494 13.89638437479 -0.2329617624777
+2.468652109023 15.68599759906 -0.9295629609367
+1.303967592866 13.8694518974 -0.9400770931696
+2.249476441629 15.0579533838 -2.655115317648
+1.860163722441 13.21971972949 -2.331000112908
+3.574756133548 14.82956536896 -1.538578690323
+4.436955065299 14.63021187623 -0.9611648343959
+4.8279 15.31007703307 -0.2777280026008
+3.103123964945 15.03470781495 -1.835252089305
+2.188348907809 15.16033833366 -3.3934e-14
+0.6717059230461 14.74316515149 -3.3934e-14
+4.091902274831 15.15287662703 -1.165367132383
+3.91763051207 14.41032533482 -0.5917599664781
+1.340997880767 15.58698030869 -3.3934e-14
+3.364828243367 13.85682673022 -3.36738e-14
+7.78e-18 14.94699993352 -1.767181013274
+2.434507664119 15.58727701103 -1.009865178636
+2.44474133373 15.55288658326 -1.047010441315
+2.410329837803 15.5282014357 -1.076568731069
+2.612612175566 14.66008056884 -2.584973423719
+0.05853218779036 15.43082742694 -0.4044607722464
+2.078563475945 16.51673243274 -0.3121623671324
+2.092687448515 16.52848874067 -0.5064340430753
+1.214917866043 14.13608207179 -0.5513595596965
+4.025757812636 16.57107802753 -0.4571696946472
+2.807396285163 17.20685015936 -0.1726482533254
+2.880548748205 17.24960888599 -0.5338911913508
+2.529413456807 16.98570885418 -0.3371074338485
+1.427913221365 15.88291683784 -0.1093093380934
+2.325108569628 12.8497672817 -0.3010246753739
+3.822877228248 15.73849046628 -0.3882716355461
+2.401627391952 12.8688235842 -1.382532521569
+4.383174205038 16.1653687056 -0.2945190563168
+0.4166379158326 14.5421227807 -2.012103544926
+4.366550049247 16.3468036313 -0.3296172422486
+4.314999333182 16.3790848509 -0.3449973745406
+4.333810961955 16.43867204399 -0.3518887263552
+4.387682857924 16.40997523516 -0.3368450009102
+4.490355994965 16.53149980521 -0.3422100698139
+3.128751420525 13.49483129249 -0.5289640419264
+3.462424154948 15.47346507364 -1.054855404585e-15
+2.075231367134 12.76630124317 -0.9274612375871
+1.059386449987 15.16054794747 -2.673212773017
+0.8405496771624 14.4766281077 -1.382258735474
+3.163345823137 14.10571612688 -2.352768776336
+3.331084732572 13.52853965002 -0.1403616474292
+0.6153778851819 14.61124670579 -0.9592926824798
+2.411626961344 12.93249376737 -0.9841659846906
+2.421283922448 12.98135142668 -0.9677410541258
+1.980875966144 15.27261673917 -2.232462864861
+4.149087526063 16.8727884628 -3.3934e-14
+1.46077430412 13.75410415982 -2.425218602456
+0.3969012707658 14.4923717192 -2.349446815572
+0.350341817599 14.48979702447 -2.379010864935
+0.4460510394948 14.48396693208 -2.373800524791
+2.622490870333 14.26887079582 -3.384446039325e-14
+3.223607547236 17.2658585327 0
+0.8437875292322 14.37209640259 -2.207140468558
+2.243391207857 14.31424645919 -2.523983915963
+1.324956230375 13.74983736615 -0.4489570633059
+2.110069321961 15.19465495429 -2.679228956111
+2.167109041249 15.18566605132 -2.677643347726
+2.266379957224 16.73451383191 -0.09692196809141
+1.080776500865 14.63050537974 -2.579752630576
+1.364384569552 12.75735086236 -2.099817554793
+4.8279 15.09424137376 -0.3507377199508
+4.8279 15.09946305456 -0.2755508628217
+1.322070470341 13.77143483558 -0.7856829178943
+3.610124208906 15.81730374829 -0.5069435555193
+1.457530087535 12.82868725839 -0.4231475861092
+0.813802102379 15.33032052715 -1.794163238404
+3.510977471117 17.34881649002 -0.5664775796631
+0.9225493591576 15.32656906726 -1.826157688273
+4.704152149717 17.07782943933 -0.4187375698052
+4.143020426214 14.14089752973 -0.4510032490857
+0.7938045304512 14.65172214659 -3.3934e-14
+4.25262 16.0045 -0.292667
+4.139109260877 15.26388978721 -0.6460612302446
+4.618610550653 13.76576426049 -0.2802573553105
+4.676973148163 14.37671736489 -0.8160855926643
+4.744570951021 13.85748022405 -0.2876168264899
+4.669321772748 13.81630474396 -0.2849701472638
+2.244967137961 15.04158262958 -3.3934e-14
+0.4275629247696 14.65927103237 -0.7807180277916
+0.5174764664256 14.64696347292 -0.7593700201305
+0.4810646963529 14.6497656727 -0.8079661131623
+0.150074228743 15.25009822024 -2.381768865911
+2.022769456985 15.71726181729 -0.9088603529415
+1.419847413681 14.11891227162 -3.377952905019e-14
+3.964666626956 16.15777009809 -0.4055851408606
+3.812658758805 15.71716664431 -2.244238395476e-14
+2.331720409765 15.32197253687 -1.864106673968
+2.072646824752 15.68872103288 -0.9283395832109
+0.335217841034 15.26995668277 -2.250615626797
+2.313259180993 16.78322324112 -0.1533001566982
+3.266449470653 15.86898779487 0
+2.875371113018 13.73269436884 -3.36738e-14
+1.3285 13.20304142324 -1.079228088605
+1.3285 13.21037648048 -0.9937828209913
+7.78e-18 14.71132571641 -1.035752693427
+0.9496186724089 14.39912012819 -1.40786530783
+2.686398729722 17.04580996015 -0.6199050545618
+1.308284146527 13.72287070442 -2.109277850018
+7.78e-18 15.24274708922 -1.128229635946
+0.9577176032738 15.61125558246 -0.6849779512918
+3.502592569086 15.93136180631 -0.589319129947
+2.020075973166 15.66372470147 -0.9454643483729
+0.3140021405275 15.45318460628 -0.2374803073207
+1.187249220816 14.19251385023 -0.2620596447071
+2.492859907895 16.06781858198 -1.968280644695e-14
+4.661885632967 17.12366978892 -0.4292957609484
+0.379655274027 15.19451722143 -3.3934e-14
+4.286791288543 17.53576536825 -0.5335133873757
+4.65045879802 14.12229886173 -0.340252762842
+0.9608605021507 15.53326220429 -1.068322776988
+3.935927461478 16.79179660968 -0.5281995891049
+0.1349630381476 14.667044875 -0.7252846280842
+3.865725587733 16.24442010744 -0.4594129418139
+3.779503337044 16.2503886019 -0.4980164187941
+1.102655327121 14.21984167441 -1.671452683653
+4.620183925516 14.67140819495 -3.3934e-14
+1.611716013964 14.9210137648 -2.630985781949
+2.918370200908 13.46046725179 -1.427477198849
+4.193183420736 15.2687492989 -3.3934e-14
+3.08166304846 14.2912437998 -1.300805633671
+0.1793093646561 15.40317926449 -1.085428174553
+1.640482434491 12.79665309111 -0.2931208126418
+3.463234987733 17.57252465974 -0.08972685725599
+3.41426162635 17.55133072192 -0.08193024421635
+3.37610994989 17.53439348196 -0.04778438376306
+4.369230946207 15.25462684897 -0.5881367319712
+4.8279 16.04974530135 -0.1749816507749
+4.746321177507 16.78705922602 -2.808741642122e-14
+1.215520659805 14.14424295642 -0.1945058774582
+0.7010675117785 14.98575367019 -3.3934e-14
+4.8279 14.01450167461 -0.2232296235135
+4.8279 14.07496823688 -0.2255236217622
+4.272050601136 14.78936748585 -3.3934e-14
+4.321219021304 14.8181706749 -3.3934e-14
+4.8279 13.88072776789 -0.164991301004
+3.127636065365 13.76873122193 -3.36738e-14
+4.005134977367 15.64126680054 -3.3934e-14
+3.880789871631 15.69899969418 -1.325199495134e-14
+3.93387969988 15.66605519211 -3.3934e-14
+4.0470833253 15.71906222954 -3.3934e-14
+4.096424164631 15.66859476548 -3.3934e-14
+2.859674957029 16.06615229716 0
+4.090923343756 15.77932695016 -3.3934e-14
+4.679286656062 14.61241831888 -0.916622032094
+4.047936719536 15.82893103536 -3.3934e-14
+4.00677343356 15.87813217547 -3.3934e-14
+2.627248867347 14.50059859191 -2.556839008882
+2.243177725614 12.71430336553 -1.58592050643
+2.17182674066 12.70019934646 -1.594530572271
+1.72561306102 16.12090958855 -0.426434302447
+1.82900130424 15.35596018472 -1.559987285111
+1.877248978349 15.35730547871 -1.546362639684
+3.072885223022 15.51321174825 -0.9066121254461
+4.8279 15.2046955245 -0.5098209506651
+3.253078714361 15.43333208023 0
+0.2718684510942 14.69277401394 -2.590731844875
+3.138267960676 17.33016287802 -0.5697564867062
+1.289583654566 13.87562553954 -1.52017790803
+2.789428450992 14.09769291995 -2.398622765136
+1.212465911337 14.15127895748 -0.1428187378948
+2.831065996489 15.89605429447 -0.828410895779
+1.568785031587 15.71602779207 -0.9095969910051
+1.584522100425 15.7732244469 -0.878674539504
+1.637553812839 15.53727562906 -3.3934e-14
+2.738666590695 13.34267021091 -1.699175756247
+3.65639823667 17.6454240494 -0.295161822197
+4.530252967011 17.82001485693 -0.4833896996169
+3.406792187306 13.79252863795 -3.36738e-14
+1.434075147925 14.84434697273 -3.3934e-14
+0.5136728129534 14.58275125943 -1.571692370724
+0.6602069498305 14.7827381654 -2.606595095346
+2.723241973655 14.77772472062 -2.605710639627
+4.188961754773 16.59672487233 -0.4131310052292
+0.4378119226104 15.44635251505 -0.9198127537864
+2.911010430663 15.33710097909 -1.735320069478
+4.520652692688 17.56215099722 -0.5197385757633
+0.7550140303731 14.50521004084 -1.553131191961
+0.7954528870056 14.49211042117 -1.494086186426
+2.528651718178 15.79290415339 -0.8674036515882
+2.581857658749 15.76847106698 -0.8801752268171
+1.742062793155 15.22462673694 -2.539321344715
+1.564361793431 12.67455407357 -2.234872005848
+3.826443664357 13.86450943646 -0.5421613014536
+2.712349990788 13.9552977417 -3.36738e-14
+3.249116005539 14.77543013294 -2.149105551326
+0.1441593019862 15.32251308705 -1.859994677394
+2.302424228665 12.73182094224 -1.649496016538
+2.252794177839 12.7071257944 -1.657397849188
+2.283296090909 12.71176979645 -1.704125761349
+3.354972071935 14.57321457003 -1.833972466316
+4.8279 16.27526412292 -0.2176914857062
+4.8279 16.22738428389 -0.1943223520978
+1.481376758661 14.3221682314 -2.525377547462
+1.464802707499 14.2749282024 -2.517049114535
+2.097112517513 15.2832291239 -2.158623276357
+3.33825933683 15.47134148107 -1.144533337287
+0.7497264298882 15.20185228707 -2.672450134881
+4.815787347179 15.97540142128 -4.170360803762e-15
+4.8279 15.99898763058 -0.04617685781436
+7.78e-18 14.92187703355 -0.7260111489585
+-1.328083868933e-15 14.94974916685 -0.6758847075595
+2.706451692714 13.82352550843 -2.319064548085
+0.2185952271823 15.25285153067 -2.363803584311
+0.5011486786644 15.23690997972 -2.464833218973
+0.5052063317986 15.22504252605 -2.536867844817
+0.4398239228259 15.23041639324 -2.504579294609
+0.8358089824894 15.24405285902 -2.419968632303
+0.889687459973 15.23628150328 -2.468513973735
+1.443437996922 12.82628903148 -0.6973870897259
+1.437680411231 12.83286570617 -0.6448535046372
+0.95306521087 15.24209118019 -2.432108509234
+1.017751972872 15.23552463796 -2.473141500405
+1.081455280254 15.24135893148 -2.436898937086
+3.729985089561 15.12087714249 -1.346647087639
+3.780399215536 15.11987429016 -1.352213610347
+1.411815202743 12.86376119502 -0.2655596127551
+3.284417144612 15.81548904174 0
+0.2964094717994 14.49635403037 -2.345952071663
+2.793336350767 13.60697416095 -1.778228096059
+2.054112677568 15.59307325117 -3.3934e-14
+3.28466819098 14.18312661419 -1.934182950672
+2.23357543764 15.5215890988 -1.082804656497
+1.250646059911 14.23985630134 -2.510870078983
+1.201417832409 14.20773368198 -2.505207051595
+1.232770904418 13.918987286 -2.307990700302
+3.908165305376 16.21029454531 -0.4366023097494
+3.907888576385 16.15215137361 -0.4263405571803
+4.779905880522 15.03771434312 -0.9858573255208
+4.8279 15.05900968628 -0.9837202205333
+3.469948858089 13.60870175622 -2.149904354329e-14
+0.3971993747568 15.26258331375 -2.300820851559
+1.3285 13.35688666047 -1.619251638152
+0.4895624537364 15.26180006611 -2.305487278817
+0.4415481233209 15.25675752634 -2.338518576008
+0.4615487472787 15.26986185536 -2.2513236818
+4.741377371548 14.3665812916 -2.978115092146e-14
+1.837257415941 12.64979894976 -2.230502655923
+3.67136223412 16.69013021673 -3.3934e-14
+0.01714201872565 14.61029053497 -1.478542617695
+1.871989921254 16.26994887001 -0.5318934350302
+4.588765718707 15.61454466735 -0.3322932257221
+2.301688973732 12.71387405031 -1.778930572936
+2.249674330264 12.68852865993 -1.789858133509
+0.9646727342154 15.34734402215 -1.642081868814
+0.8158304435675 14.48597833225 -1.439742923663
+3.697728982992 17.61676042955 0
+0.5698338965839 15.36164224153 -3.3934e-14
+4.33112149612 14.89013070114 -3.3934e-14
+4.205626871467 14.18005343273 -0.4377286066519
+3.513969584983 16.394006079 -3.3934e-14
+1.454632287197 15.43642530616 -1.221508928438
+1.419522023404 15.42052481903 -1.256515361207
+0.79032231188 15.15390276359 -2.672045385962
+0.9711070391651 15.61415091485 -0.7438933068375
+2.243251514461 15.15775963604 -3.3934e-14
+2.213870501057 15.24356212546 -3.3934e-14
+3.0241143655 17.3485415188 -0.1327133779862
+2.723299832937 16.71619011619 -0.6780294445202
+3.522962564388 15.41009873137 -1.037883515697e-15
+0.8366150013863 15.56201573214 -0.7314044669922
+1.458328826292 15.40648706259 -1.29051837685
+1.419862380271 12.97679317797 -2.288157751955
+0.8259733222615 14.54675686797 -0.361555071603
+2.801636682147 14.1516488788 -2.092289264371
+1.552229701644 12.80303209458 -0.2342063956118
+1.511065600966 13.29173105264 -2.343686239038
+1.3285 13.0599182435 -1.307311309391
+3.392663673693 15.28861254783 -1.099721209131
+1.491158657439 15.34279083031 -1.683953673758
+1.477408153361 15.58809394449 -1.009540137453
+1.258377494484 14.17901447505 -2.500139092626
+1.815244292453 14.10842096029 -2.487701804203
+2.30099836062 12.78099042307 -1.200344766053
+2.252991235965 12.75631817587 -1.22243928054
+2.944684514715 15.7167173042 -0.9093104634186
+3.936172469482 16.29102792077 -3.3934e-14
+3.983997307602 16.25373118151 -3.3934e-14
+4.030849352267 16.29612410766 -3.3934e-14
+3.979717421774 16.33324283556 -3.3934e-14
+0.8197105979412 14.47224341295 -1.550076197554
+3.867391943459 15.60153318141 -0.4059154058526
+3.854368159903 15.61028633293 -0.3562472776128
+2.991867552771 17.32849112662 -0.1732108312141
+1.180291829436 14.14505284126 -1.321009497628
+2.250453308351 15.47283945342 -1.155229104112
+1.64673546168 12.72621021436 -1.371760547487
+1.3285 13.20153154268 -0.8050022164869
+2.591927057504 17.04194659416 -0.0932764969877
+3.900961990491 16.27909261942 -0.4514213039653
+0.9779695536195 14.42315327425 -0.7810617502884
+0.9745476152537 14.42279988461 -0.8421598298009
+3.59028006898 16.96080604508 -0.6348947179226
+0.3806528998216 15.11845402289 -2.6657888313
+2.765212190194 16.8552206934 0
+1.156389394289 14.04886431201 -2.358028981597
+4.707508998061 15.34899341219 -3.3934e-14
+4.718193661541 15.29197101024 -3.3934e-14
+1.454578903034 12.80577203195 -2.257999592249
+1.769886741902 13.3451423824 -2.35310435373
+1.3285 12.98423178122 -1.601319731699
+1.3285 13.00860756952 -1.666720146364
+1.3285 13.07312035727 -1.670422741924
+3.918062284676 16.09791517732 -0.4127795184518
+3.859835813842 16.12412225837 -0.4408584370822
+1.099678917989 14.32029346504 -0.1694012378348
+1.086329490195 14.33583592969 -0.08501805230296
+1.110256783575 14.30706507304 -0.1206123830747
+2.150845946911 16.22778939212 -1.953184651866e-14
+1.087336933638 14.36660728522 -2.533217413712
+2.935240377379 17.27079141201 -0.5802285810306
+4.504825346255 16.58727848121 -3.3934e-14
+4.8279 14.62133590022 -0.6966481036946
+4.8279 14.60380859745 -0.7492766283421
+3.796582250369 14.11882355943 -3.3934e-14
+1.218350756574 14.12051331436 -0.7333284612302
+1.205305586162 14.14329605945 -0.7807215581436
+1.569188649455 15.97226491759 -0.7282252816621
+3.371235365563 14.33071640415 -1.759424162842
+2.329167120884 15.40722985325 -1.289045504611
+1.383476362448 15.79388901761 -8.581677180956e-15
+1.318756094601 15.774419738 -1.125623543982e-14
+1.380474511247 15.74108676247 -3.286473210177e-14
+1.240030634299 14.07566970301 -0.7120125281422
+2.738143556603 14.14490662372 -2.103474546095
+2.152589350766 15.46530745189 -1.165253900565
+2.127991253092 15.48938504973 -1.127695193782
+2.286824756618 15.31655341812 -1.908169982661
+1.155655807997 14.15475234527 -1.612944358191
+3.475949507587 15.76727229389 0
+3.699403658465 13.5623874344 -0.2636048472692
+1.517991803674 12.92585963365 -2.279174841519
+1.554389728485 12.86586197083 -2.268602857004
+3.95162645705 14.33632780994 -1.045164581254
+2.320252199236 13.95859644756 -3.36738e-14
+1.800725034903 12.62630402671 -2.100872536707
+-4.36436e-15 15.25792899276 -0.5950685269256
+2.407425508217 14.32940048221 -3.373136211123e-14
+2.4868076793 14.32553622954 -3.378314504997e-14
+4.8279 14.10615442161 -0.1534792178118
+1.947215769152 12.60665885119 -2.215977258459
+4.8279 15.10891612914 -0.9618190490469
+4.8279 17.47484549332 -0.3895036044534
+3.267757029086 14.5332772809 -2.044716821778
+2.73155367666 16.33792840576 -0.7447192449695
+4.460328916328 13.76110827891 -0.3016238737602
+2.22254863361 12.80350420723 -0.3671070052488
+0.9158213729378 14.29759914537 -2.370634553401
+0.9523611287976 14.2780848707 -2.322384829098
+3.737706419234 14.36410871326 -0.8875216430604
+3.962458927035 14.39822009654 -1.122461478474
+4.021830346707 14.43187803904 -1.092888540188
+3.200373930125 14.16346517356 -2.282173389163
+3.194671727801 14.12565353518 -2.239723067869
+1.421007615859 15.86073546731 -0.747088717411
+2.933117994756 14.66609738588 -2.58602950348
+4.542908265809 14.44591050228 -0.4235121107065
+7.78e-18 14.66513560372 -1.329807769274
+0.4485771836145 14.65875412287 -0.7281404786579
+2.408583147354 12.9234818161 -0.900638495453
+2.749594944842 14.15511762838 -2.048823551875
+0.5023977298541 15.44035199913 -1.190169561928
+2.665029733147 15.33217040376 -1.778000905829
+3.403999214816 17.54165227905 -0.4312516769734
+4.47533356642 15.15368017346 -1.044536340643
+0.04322696403086 14.74511350134 -2.59995626193
+2.4279 13.22919019319 -2.11672809025
+0.5631792876369 14.62318469064 -0.9772846822605
+2.895698789548 14.14017301691 -2.157435121217
+7.78e-18 14.78577502855 -1.50559150378
+0.8440554915054 14.46354845455 -1.492359370636
+0.8657583483339 14.45578002615 -1.440884925322
+0.8951222710056 14.43215428754 -1.483138506381
+0.3098361838655 14.66576186937 -0.7502200151573
+4.485639882136 15.61901703374 -0.3066826325719
+2.757718900323 17.16302688916 -0.5501307081926
+7.78e-18 14.72846312353 -1.343934197213
+1.655111917467 15.66154679964 -0.946348473543
+1.71020493584 15.66387274391 -0.9444032722664
+1.68340138189 15.62896238384 -0.9730343326873
+0.2994826869587 14.48699760293 -2.402771159779
+2.458630515883 15.4202433673 -1.254759790303
+0.2957667122438 15.3775095001 -1.391713052651
+3.291099355636 17.41414490565 -0.5549597532366
+4.8279 15.42538019028 -0.4844497781369
+4.8279 14.88720219585 -0.702531016757
+1.306255506046 13.70860321328 -2.417197392762
+2.31861949562 12.82867403852 -0.7208424213427
+4.8279 16.72179861108 -0.0520916446219
+4.214774019828 14.62307593528 -1.03265723878
+4.249891759793 14.59229735372 -1.013256534498
+4.177943521397 14.58022535913 -1.040585344132
+4.8279 16.66376723868 -0.04757422731096
+4.337642380605 16.66745733252 -3.3934e-14
+4.351478326832 16.59493496907 -3.3934e-14
+4.289340330392 16.62066117597 -3.3934e-14
+4.334999014631 16.54100286766 -3.3934e-14
+1.772264138596 16.16485652162 -0.4755814652005
+1.763927209522 16.15815965468 -0.4237492900982
+2.032245659634 16.12976310379 -0.7814214905726
+2.795808650171 14.29469290323 -2.520539970085
+4.81480856281 17.77407290718 -4.509641961147e-15
+1.608490803201 16.00388511779 -0.7564214169936
+0.7270498738645 14.4752964534 -1.913942932834
+4.207758312665 15.97142556948 -0.2982692393585
+3.448024521092 15.15615832424 -1.146720867597
+0.4431554504242 14.4930645119 -2.320789162952
+1.277656560335 15.78530577915 -0.1973901075038
+2.900205491673 14.21775930283 -1.600266430857
+4.8279 13.92734495658 -0.04629737922717
+3.892267974555 16.98006102613 -0.5783701449311
+3.419270929826 13.53450402524 -0.3382002423909
+0.3079711991058 15.39627087703 -1.320666352184
+2.781447461416 13.3536718107 -1.665241061503
+7.78e-18 14.85083810054 -1.201717952755
+1.524473296373 14.01566502978 -3.381330943103e-14
+1.846818520617 12.77305192904 -0.8289163094004
+1.727967372463 15.81001158959 -3.3934e-14
+0.3484921911045 15.38853366599 -1.348953580287
+2.998248745241 13.45469581422 -0.951293526764
+0.01212044478126 15.2810905581 -9.51142292887e-15
+-4.524766073574e-15 15.20934222721 -0.05039793080197
+3.318087745281 14.63687477165 -1.927443165922
+3.066851395427 16.07699667429 -0.7907329615107
+2.165998286262 15.21829141314 -3.3934e-14
+2.162465452622 15.27230878939 -3.3934e-14
+3.204764865288 13.81668688983 -1.044109866543
+3.443366167086 14.04436577813 -3.36738e-14
+3.401768544004 14.004076412 -3.36738e-14
+3.423650487364 13.95045947602 -3.36738e-14
+3.41812557067 13.88786294178 -3.36738e-14
+3.457336044521 13.81807150395 -3.36738e-14
+3.513782250255 13.81349489341 -3.36738e-14
+3.477453516793 13.87100926755 -3.36738e-14
+3.481413695793 13.93163365761 -3.36738e-14
+3.498884124882 13.56149424351 -4.853576395144e-15
+3.467657946158 13.99024289582 -3.36738e-14
+4.581984104334 17.57592807719 -3.3934e-14
+4.581355529656 17.51172185502 -3.3934e-14
+4.8279 16.32684601627 -0.04385816525627
+1.540265546046 12.80695418905 -0.1286535630539
+2.493853455353 13.70505326045 -2.416564748869
+1.369952761945 12.89242036316 -0.8541091543348
+1.786256748274 14.17178340807 -3.36738e-14
+1.861475053827 14.17105469447 -3.36738e-14
+1.957840947113 14.14737343895 -3.36738e-14
+1.909095866607 14.20433338509 -3.36738e-14
+1.96642987294 14.21371553716 -3.36738e-14
+2.022509830433 14.20001338802 -3.36738e-14
+2.021418344536 14.12656579183 -3.36738e-14
+2.810856627041 14.48234224405 -3.36738e-14
+2.849328558908 14.44226092972 -3.36738e-14
+2.817526330534 14.3967063518 -3.36738e-14
+2.890207107636 14.61341151242 -3.390856000245e-14
+2.196921469626 14.28265225643 -3.369438186783e-14
+2.230315204368 14.33342376836 -3.382843324975e-14
+2.367332040838 14.3724083727 -3.380636507598e-14
+2.272226583459 14.19871925213 -3.36738e-14
+2.32491468536 14.14561918538 -3.36738e-14
+2.21890417054 14.22599849394 -3.36738e-14
+2.154090084811 14.23954355176 -3.36738e-14
+2.066803730232 14.23703717718 -3.36738e-14
+2.072025500522 14.17033327786 -3.36738e-14
+2.115205518915 14.11932957712 -3.36738e-14
+2.138761458012 14.17512796746 -3.36738e-14
+2.196264263693 14.14183634678 -3.36738e-14
+2.262671069782 14.13959118002 -3.36738e-14
+2.308643179472 14.08813693187 -3.36738e-14
+2.226143923277 14.08739848422 -3.36738e-14
+2.164157421365 14.08366371279 -3.36738e-14
+2.545330252836 14.3007655638 -3.38858688344e-14
+2.633066972445 14.32453485814 -3.380060388469e-14
+2.627259754619 14.38454057284 -3.380503469997e-14
+2.760689321186 14.37551986124 -3.36738e-14
+2.808770798074 14.3400984754 -3.36738e-14
+2.439338819313 14.3918813847 -3.378428427821e-14
+2.387861235062 14.42750571343 -3.383356568293e-14
+4.710095501094 14.3251487639 -3.3934e-14
+-3.709744162089e-15 14.68296763601 -0.7793554930064
+1.50577928764 12.65005542677 -2.230545773263
+3.25542533618 14.85464895427 -2.141888972451
+3.242593304325 14.81913637058 -2.182008759106
+3.229162130443 14.81812926215 -2.235431518519
+1.430405322043 12.68051212139 -2.235918389073
+4.054974225604 14.36206322207 -0.8989466039633
+1.867872582831 12.72691966406 -1.365298531649
+3.173123309769 15.29969168667 0
+0.6900326197235 14.4504108128 -2.196745517571
+1.240443687135 13.91134676549 -2.254401614341
+3.86083839407 16.19202062362 -0.4522998746306
+1.00104918036 14.66099393387 -2.585132781265
+0.969777264033 14.61650606935 -2.577286056282
+4.8279 17.57185403882 -0.2175086818954
+4.8279 17.56465421658 -0.2937850991923
+0.2225097837958 15.20058206675 -7.756823663807e-14
+0.6446415387132 15.35067096897 -1.610939808575
+2.451315872513 13.84338846283 -3.36738e-14
+2.381108287529 13.81816156057 -3.36738e-14
+2.664748551186 13.78073028017 -3.36738e-14
+2.596712851677 13.8088636582 -3.36738e-14
+2.683565137343 14.00301623976 -3.36738e-14
+2.642521882858 14.0554218439 -3.36738e-14
+4.598888371064 17.05665255578 -3.3934e-14
+2.564313979131 13.92908836768 -3.36738e-14
+2.630627079583 13.73543498199 -3.36738e-14
+2.426825078104 13.04345045578 -0.1769342347121
+2.367271320955 14.0996135341 -3.36738e-14
+2.339650009575 14.03463125703 -3.36738e-14
+2.269535736535 14.04297523041 -3.36738e-14
+2.330625676724 13.90197249594 -3.36738e-14
+3.974583952875 17.64592655257 -0.5140847914666
+3.19858223192 17.32858175704 -0.5700348647297
+3.364904615509 17.41290428825 -0.5551720946154
+3.33859020833 17.46056865962 -0.5467743682145
+3.428954304452 17.47542262721 -0.5441520934804
+3.43857796165 17.39714310785 -0.5579526258705
+3.465336524044 17.26436790331 -0.5813688818197
+3.585696551515 17.24045605957 -0.5855809266573
+3.771756300099 17.21795630842 -0.589557704001
+3.726554315218 17.26263813499 -0.5816780006569
+3.817445080756 17.1727984033 -0.5975178069352
+4.350066214507 17.65702568045 -0.5121313356057
+4.525989489453 17.74420991367 -0.496763081487
+4.492152893881 17.78767617019 -0.4890957204131
+3.695442257724 17.54762778928 -0.5314139931237
+1.318852694634 13.67216320894 -1.985836102969
+3.50630318239 17.42976389321 -0.5522005017646
+3.606614918568 17.36467952399 -0.5636736405863
+3.679998950684 17.39180036833 -0.5588915989232
+3.651856623449 17.44046667892 -0.5503080127485
+3.787289429061 17.29106768871 -0.5766661630723
+3.813261360984 17.3453654057 -0.5670820306611
+2.641365450245 15.79305743754 -0.8670915895493
+1.7282 12.9387 -2.28144
+1.68454516517 16.08471029915 -0.333154450319
+7.78e-18 14.89848723182 -1.238361496356
+7.78e-18 14.77377344291 -1.07748704732
+7.78e-18 14.76903201395 -1.00024881511
+7.78e-18 14.81803568072 -1.026422256235
+7.78e-18 14.72279441478 -1.480951654665
+7.78e-18 14.85090229397 -1.071212814513
+0.556245829698 15.49691371843 -0.1497397749656
+1.991943474849 15.33981766781 -1.710913213536
+3.460702002103 14.21661684273 -0.855247696372
+2.99239681586 15.52268994545 -0.9306715016589
+3.532024200702 17.6007130304 -0.07729044284146
+3.343143319625 15.40224979893 -1.167238948589
+4.249753305464 16.84645415035 -0.4420521943093
+1.209115643854 13.96487395084 -2.333675333033
+1.184782304123 14.00794084064 -2.32193425057
+0.5072520491084 14.47893488624 -2.348548641035
+4.355013770561 15.6274786723 -0.2587179580592
+4.358107244979 15.64230456457 -0.2064477097674
+2.132893211528 13.30896823591 -3.383160479781e-14
+4.142452470161 17.78218635512 -0.01605493395764
+2.991956159551 15.08478370405 -1.565885174164
+1.202690723908 14.15224370021 -0.6923006466302
+3.587585269176 15.32662177386 -0.9455992717963
+3.834702905083 17.39734044193 -0.5579165963233
+2.592556413824 15.51805601756 0
+1.280273759288 13.93969512792 -1.181291623001
+2.335139974776 15.38800835537 -1.349969712098
+1.561848198622 15.36484109806 -1.471955793222
+4.480007667233 13.95504406175 -0.3325590395091
+4.444340001934 13.91416822124 -0.3312559429172
+2.419280462863 16.65284005839 -0.6891906273522
+0.8459067714718 15.34065131615 -1.703313656007
+2.027788590659 14.07272243511 -3.36738e-14
+1.865341176743 12.72101114627 -1.419116210182
+4.8279 16.17084094671 -0.0567895357801
+3.604710353653 14.60241158038 -1.463593008427
+3.223723946322 15.15289071586 -1.250773132847
+2.417066759807 12.97663034809 -0.7199293653172
+4.8279 17.24254479537 -0.3275499365628
+2.986998018016 16.32633398368 0
+1.360082905671 12.79008891583 -1.934009655469
+2.735730418489 15.26658141119 -2.273756867864
+1.524001248131 12.78895018498 -0.7487948527687
+1.478535004234 12.79820392236 -0.7746062482425
+1.515900383626 12.78704233682 -0.8074051231414
+1.481386460872 12.79938124839 -0.7207636230476
+1.3285 13.10957962805 -1.315853493377
+0.3865767338019 14.63933520804 -1.119641781584
+0.8284342851695 14.79626543731 -2.608991704739
+4.539385003315 15.61827148701 -0.3109611908046
+4.8279 14.54501280007 -0.8223085420983
+3.168587907291 15.54081028779 -0.765745851494
+3.396712794983 14.22545378991 -1.673727465234
+3.005255085982 13.769814366 -1.319591919822
+4.8279 17.6169092422 -0.04846389365917
+2.425125887847 13.03128386982 -0.3610845688632
+3.525880105341 16.9520196297 -0.6364401540672
+2.207694856983 15.57194140175 -3.3934e-14
+2.266365375274 15.5989694024 -3.3934e-14
+0.8643916861101 15.3269695049 -1.822849225854
+1.639011755229 16.02791781186 -0.79348832934
+1.378099126278 15.34300441053 -1.682181346978
+1.442670953246 15.34645714374 -1.650929357581
+1.655897511366 16.04497056354 -0.7454557384493
+0.5484504362304 14.46541505482 -2.37741977007
+1.438006531336 12.84694990775 -0.2219177568528
+1.637874924204 15.40615976352 -1.291537767625
+2.981603070581 15.77151420895 -0.8776049887773
+1.456267611114 12.83372464026 -0.2704297487292
+2.402305241402 12.7543041018 -2.208714062592
+2.842425778284 14.06244159509 -1.711288105839
+1.3285 13.27102030198 -1.203820788726
+0.5121898897512 15.27496702174 -2.216785769259
+0.5078840382347 15.28276236016 -2.162019448533
+0.4609486204258 15.27854987255 -2.191955413337
+0.4102194312423 15.27484266197 -2.217798343351
+0.3929844322995 15.28203264685 -2.167364967985
+0.4404673546604 15.28600771389 -2.139230187568
+0.49327503921 15.29020984055 -2.10901218745
+0.06543855344833 15.30118826214 -2.02780051358
+0.2009852142796 15.30803177249 -1.975228472957
+0.2055150470738 15.2977086118 -2.053814029406
+0.09889969614236 15.29256931388 -2.09176625078
+0.1621038714615 15.28645986913 -2.135730184028
+0.2368371079076 15.28918300024 -2.116431260565
+0.2789981007439 15.28300151921 -2.16057638445
+0.3116811728755 15.29132170776 -2.100840439467
+0.2591318606597 15.29598889513 -2.066482856258
+0.3772706290199 15.28921058955 -2.116435409308
+0.3393630957396 15.28142180393 -2.171444864852
+0.7746293059035 15.25574594133 -2.344966017175
+0.8397368190263 15.25422900381 -2.354986232681
+1.252461580349 15.24266899637 -2.428579641055
+1.116423236947 15.25523995713 -2.348404382469
+1.065452661176 15.25821699096 -2.329027307549
+1.072657513382 15.25001553588 -2.382535807776
+1.019929543489 15.25271896934 -2.364643352144
+1.012102666567 15.26094152659 -2.311207797729
+0.9495474691633 15.25302582639 -2.36264052473
+0.8946771851342 15.2597621943 -2.319033012266
+0.8971959959296 15.2472227582 -2.40006172551
+1.007490340769 15.24422894883 -2.418681601978
+1.277650203802 15.25672221699 -2.338791585233
+1.663822164637 15.26301764242 -2.2974283285
+1.695923348176 15.25651797956 -2.33993815679
+1.859619948967 15.27257855243 -2.23294878023
+1.925861276221 15.27511621921 -2.215600690074
+2.033975326019 15.28391574449 -2.153665903792
+1.969545890017 12.61486911594 -2.168347771055
+1.346104730912 15.8279736307 -0.1344874108994
+2.779827765655 13.64153256176 -1.831258597908
+2.613203735172 16.68879784133 -0.6828564829557
+1.408030382824 12.74959327449 -2.248090584486
+2.385077262536 12.88502589719 -0.9285965556207
+1.302847380197 13.86664944316 -1.041872594161
+3.393548821376 14.7203500616 -1.78524183029
+3.80524621349 16.73841714913 -3.3934e-14
+3.756179922336 16.66471017714 -3.3934e-14
+4.710537215369 17.18304105638 -3.3934e-14
+3.874337755043 16.67483612659 -3.3934e-14
+3.816085727519 16.66012433893 -3.3934e-14
+3.817549697087 16.60006110392 -3.3934e-14
+3.703975205289 16.64473483096 -3.3934e-14
+2.28504941391 15.19345111262 -3.3934e-14
+2.30041619234 15.24637906531 -3.3934e-14
+1.316132008906 13.72900855596 -1.700354654228
+2.273047146376 15.29421672179 -3.3934e-14
+2.428171827366 13.31483692982 -1.496874091634
+2.802434823883 16.57881096711 -0.702248102013
+1.434033672812 15.69579143794 -3.3934e-14
+1.435532428084 15.78454796361 -2.732306992087e-14
+4.720025309104 17.13361842022 -3.3934e-14
+1.410676673035 12.68557100657 -2.1546058794
+1.450586753232 12.65538315404 -2.171430659601
+1.388268495826 12.71782369019 -2.119323700279
+2.759556752392 15.27426905648 -2.181835723667
+1.661622251268 16.05454335375 -0.6474062600441
+1.233994156513 14.04195962216 -1.347318305543
+1.794922558002 16.19514143412 -0.09591767662607
+0.04862493630261 14.53592989244 -2.563078732686
+2.087151821724 15.43497638867 -3.3934e-14
+2.107297355682 15.25168524044 -3.3934e-14
+2.1245216476 15.39335544183 -3.3934e-14
+2.15661031634 15.48473387313 -3.3934e-14
+4.8279 13.78728703802 -0.06365092074137
+2.782800099789 13.44707345871 -1.785352918498
+3.260610331725 17.22870855941 -1.089219229386e-14
+1.104379128626 15.4444187889 -1.203655478207
+4.8279 15.3785550695 -0.401476157115
+1.53992174293 12.6152772519 -2.211327514416
+-3.422587036312e-15 15.238741949 -0.6866477494821
+2.040552751546e-18 15.19139393075 -0.7570138704186
+0 15.2290894391 -0.7980687576117
+-7.50363187475e-16 15.24405545825 -0.7387595932938
+7.78e-18 15.27857455936 -0.9530018898994
+4.8279 17.732252893 -0.02770997009051
+7.78e-18 14.96892736302 -0.9577939107764
+3.021225894656 15.45211845296 0
+2.739077748023 14.9734429246 -2.223167693395
+3.043328703239 14.04489344091 -1.30607033542
+2.332276081465 12.68030211616 -2.130861779796
+2.692176306637 15.22376350873 -2.544518853208
+3.490655046393 16.90235960699 -0.6451978097524
+3.449131972936 16.93406907119 -0.6396075402078
+3.237931897383 17.08314136615 -0.6133193521593
+2.188979191932 15.48665689093 -1.131873044988
+2.184428170146 15.53531972202 -1.065615510861
+1.98883918728 16.10124136062 -0.786447819588
+3.299768403282 16.37364772888 0
+2.329324060613 14.60296800929 -2.574893706408
+1.979920248476 12.70360472877 -2.239988864909
+0.6318511980386 14.53740800868 -1.706090092536
+4.8279 17.59332791188 -0.3395169121166
+1.21464514388 14.1422721393 -0.3793584361982
+0.09804606634887 15.43294275783 -0.3468715835768
+0.1466335022543 15.43539732121 -0.3652366656442
+4.8279 13.86113625606 -0.1162126930324
+1.75295903217 12.78867006396 -0.5359555861165
+2.532875069411 15.02520488307 -3.865011120605e-15
+1.429395878043 15.88432678187 -0.01134645037357
+1.408174843866 15.32289614179 -3.3934e-14
+1.464166485565 15.34269497185 -3.3934e-14
+1.502253657616 15.51926715204 -3.3934e-14
+1.575500165497 15.52850959345 -3.3934e-14
+1.556485574521 15.58652231949 -3.3934e-14
+1.617444895586 15.58983777224 -3.3934e-14
+1.549691471794 15.67374731831 -3.3934e-14
+1.511638960885 15.62794468418 -3.3934e-14
+1.49143712906 15.57494527829 -3.3934e-14
+1.458809404789 15.64012653469 -3.3934e-14
+1.491585085709 15.68331350285 -3.3934e-14
+1.562901460913 15.27928271978 -3.3934e-14
+1.517789336691 15.31716758559 -3.3934e-14
+1.51450269521 15.23074777019 -3.3934e-14
+1.407919391165 15.08932543023 -3.3934e-14
+1.448894983558 15.12588555963 -3.3934e-14
+1.465096806721 15.18892791134 -3.3934e-14
+1.404299251482 15.22367045319 -3.3934e-14
+1.460153339225 15.26590441842 -3.3934e-14
+4.461489113242 17.69374191206 -3.3934e-14
+4.404013346414 17.68513107923 -3.3934e-14
+3.809702954562 14.08328594389 -0.589695530122
+3.469190012604 14.68160998756 -1.653561627626
+3.497075187924 14.71038300371 -1.618783573201
+4.012329006235 16.6327349024 -0.4725651138108
+4.003763757375 16.80176193043 -0.5054658592655
+3.505200593927 14.3411019797 -1.54217937518
+4.223647736625 16.88919491372 -0.4558950041961
+2.446956582116 15.63526570928 -0.9669657186342
+0.1269180395751 14.7712336232 -7.212607325479e-14
+0.2551459104484 14.49135493831 -2.376623740251
+7.78e-18 15.29048991193 -1.040342789785
+1.5809860073 12.63166295777 -2.068366210592
+4.8279 17.23478915322 -0.06058068957186
+2.127415242014 15.72081338164 -0.9060192895621
+0.6933382936221 15.46465117403 -1.169863479962
+0.7512723092432 15.43439446355 -1.227234102047
+0.7696216320168 15.41308107787 -1.273546097636
+4.187064083896 15.03208605964 -1.11646645274
+7.78e-18 15.07073521753 -2.298593415749
+0.4223245596381 14.65668872458 -0.8318585778637
+0.2804954326763 14.52932385524 -2.132225600604
+4.019145785934 17.28547568453 -2.943870979643e-14
+1.788154460639 12.79087720304 -0.4832689671853
+1.728833943531 12.79061042673 -0.490027199409
+2.899553049572 16.7893244965 -0.665133598633
+4.8279 17.16703850963 -0.3424318702838
+4.8279 17.12738838789 -0.2764732545969
+4.8279 17.10379653601 -0.2293455615545
+4.8279 17.15696424116 -0.2258782154552
+4.8279 17.121067706 -0.1795529756218
+4.8279 16.94313292536 -0.3112328362812
+4.8279 16.8914566839 -0.2849276221115
+4.8279 16.84205033539 -0.3141142525906
+4.8279 16.8244819178 -0.261705935577
+4.8279 16.88028237411 -0.2230521544343
+4.8279 16.93229441687 -0.1877224770005
+4.8279 16.71913323034 -0.1157379820225
+4.8279 16.91965340371 -0.06672798345962
+4.8279 16.65586288215 -0.1052419686295
+4.8279 16.57327126046 -0.1239796664049
+4.8279 16.4796735631 -0.1018049424634
+4.8279 16.41847970492 -0.08890627869186
+4.8279 16.35655394049 -0.09763917662615
+4.8279 15.70674830525 -0.08860803994253
+4.8279 15.91870943247 -0.1144479547044
+4.8279 15.97015408293 -0.1180261421147
+4.8279 16.05713655506 -0.1180261421147
+4.8279 16.29648880151 -0.1223993445395
+4.8279 16.33783577218 -0.1725123653213
+4.8279 16.41501161105 -0.1730164534064
+4.8279 16.49285937851 -0.1767936573591
+4.8279 16.52169196598 -0.1330701754217
+4.8279 16.5586636803 -0.1826508945827
+4.8279 16.6219747955 -0.1472624251079
+4.8279 16.70110463306 -0.176835692282
+4.8279 16.75858358572 -0.2355855249841
+4.8279 16.67111069475 -0.2325550985702
+4.8279 16.61629195052 -0.2009450708322
+4.8279 16.40611581457 -0.2250725156659
+4.8279 16.33038142456 -0.2281077655483
+4.8279 16.09817125474 -0.1536956757355
+4.8279 15.05883828438 -0.9316356975963
+4.8279 15.08607448797 -0.7622315183743
+4.8279 15.02894817224 -0.7350508089842
+4.8279 14.98442374788 -0.7625081562126
+4.8279 14.89777834758 -0.8417677929762
+4.8279 14.92770948922 -0.7799727336289
+4.8279 14.94338787264 -0.7300676379468
+4.8279 14.98974437188 -0.6711538398562
+4.8279 15.06049286941 -0.6751643747964
+4.8279 15.10826318936 -0.6982653664324
+4.8279 15.14421462502 -0.737292966374
+4.8279 15.54257313139 -0.4348073812982
+4.8279 15.54818009026 -0.38328983577
+4.8279 15.51336002973 -0.344909386707
+4.8279 15.43980412493 -0.3341734880223
+4.8279 15.41625217903 -0.1569845868851
+4.8279 15.47442641668 -0.1255885117473
+4.8279 15.53045423729 -0.1282593207539
+4.8279 15.58136503642 -0.1049441671699
+4.8279 15.65153174898 -0.08762214290692
+4.8279 15.51597151465 -0.07416905730554
+4.8279 15.38958381446 -0.1091496075794
+4.8279 15.35218209229 -0.1684304710118
+4.8279 15.37021808976 -0.2340280344192
+4.8279 15.41333336745 -0.2783180415502
+4.8279 15.12205318407 -0.647025778914
+4.8279 15.09189098124 -0.5977366860144
+4.8279 15.03591809852 -0.6120966845349
+4.8279 14.97429537882 -0.6114960748245
+4.8279 14.98537419161 -0.5424378608596
+4.8279 14.92315660892 -0.577107900572
+4.8279 14.87545216043 -0.7823183400243
+4.8279 14.72101103452 -0.8794615175159
+4.8279 14.7566149395 -0.8124081728793
+4.8279 14.81749521583 -0.8031359807536
+4.8279 14.77141781041 -0.7491984497861
+4.8279 14.55285113777 -0.7684356310587
+4.8279 13.74857566014 -0.1408228531143
+4.8279 13.82819805756 -0.1630395161806
+4.8279 13.87525680636 -0.06557881118735
+4.8279 13.80860654574 -0.114260908209
+4.8279 13.73434403921 -0.07824308018185
+4.8279 14.62262770587 -0.1163377578161
+4.8279 14.56901212997 -0.1297102695586
+4.8279 14.51187887653 -0.220076150512
+4.8279 14.46672188768 -0.2768170832991
+4.8279 14.46077161685 -0.2086100508863
+4.8279 14.4106760886 -0.221864038001
+4.8279 14.39841092879 -0.2722107953923
+4.8279 14.45644787518 -0.3338334416205
+4.8279 14.51390713936 -0.3264271328616
+4.8279 14.54707556473 -0.3909917985361
+4.8279 14.58444051505 -0.3309944799874
+4.8279 14.65786007514 -0.3359594528819
+4.8279 14.67567521813 -0.286639371548
+4.8279 14.68981270834 -0.232396897367
+4.8279 14.69184885567 -0.1481079938728
+4.8279 14.70531653637 -0.0865776085913
+4.8279 14.7768769448 -0.03254808036956
+4.8279 14.76828949198 -0.08524584396653
+4.8279 14.76961806171 -0.1592308081406
+4.8279 14.72538185486 -0.1910870878063
+4.8279 14.72761553176 -0.2794245560039
+4.8279 14.72867004856 -0.339753173834
+4.8279 14.69045065808 -0.3903872871225
+4.8279 14.68511263441 -0.5056687924483
+4.8279 14.71552949492 -0.4486589541614
+4.8279 14.6517286597 -0.4507184393502
+4.8279 14.62210723439 -0.5200084797805
+4.8279 14.5883688107 -0.4584848793386
+4.8279 14.54944733358 -0.5168676958412
+4.8279 14.56719864704 -0.5873958220028
+4.8279 14.62573620364 -0.5790294304807
+4.8279 14.687138117 -0.5702536551098
+4.8279 14.69399705744 -0.6396037786629
+4.8279 14.74367318483 -0.6905057770589
+4.8279 14.676618642 -0.6920888921924
+4.820751941854 17.62944547653 -2.46106133439e-15
+4.8279 14.90657010786 -0.5078408288053
+4.8279 14.90171376465 -0.3526127484363
+4.8279 14.9132958588 -0.2840043901545
+4.8279 14.80872930938 -0.1979984141366
+4.8279 14.90167521679 -0.1387607597144
+4.8279 14.92492558481 -0.08376108967261
+4.8279 14.97945801239 -0.07788232201943
+4.8279 15.2195400045 -0.1137089745901
+4.8279 15.17308230827 -0.09160783857224
+4.8279 15.08977802525 -0.0742275305157
+4.8279 15.0220197195 -0.1247130256545
+4.8279 15.10759595614 -0.1539966020645
+4.8279 15.17045261461 -0.3129601711328
+4.8279 15.21509500489 -0.3918504688094
+4.8279 15.2242280655 -0.4618029356927
+4.8279 15.17737295217 -0.4396252831019
+4.8279 15.15489267258 -0.3773318892444
+4.8279 15.10019244022 -0.2157990169715
+4.8279 15.04944713141 -0.1842438475166
+4.8279 14.96494201595 -0.2447101434846
+4.8279 14.99450496031 -0.1967425332602
+4.8279 14.93938344933 -0.1850601389381
+4.8279 14.96257758242 -0.1300684950033
+4.8279 14.88065968357 -0.1859558960111
+4.8279 14.90810622158 -0.229724847087
+4.8279 14.95559052605 -0.3264261410417
+4.8279 14.96101201668 -0.3890128725618
+4.8279 15.03360334588 -0.3985395075377
+4.8279 14.96529808567 -0.4628620269615
+4.8279 15.0383346012 -0.4745980992338
+4.8279 15.07079605412 -0.5439391283772
+4.8279 15.13055312764 -0.4901684099633
+4.8279 15.15661980872 -0.6081962025291
+4.8279 15.10056646366 -0.4281401613555
+4.8279 14.56950101244 -0.6768968415051
+4.8279 14.51118121805 -0.7334021060884
+4.8279 14.49824139066 -0.6403193862157
+4.8279 14.51235627837 -0.5873244766824
+4.8279 14.32994984096 -0.2860540523514
+4.8279 14.36066387894 -0.2082990459398
+4.8279 14.39880730589 -0.1446230656113
+4.8279 14.33281216584 -0.1483528070349
+4.8279 14.2894298802 -0.2291621452887
+4.8279 14.2352123486 -0.2901465465239
+4.8279 14.13362356902 -0.2280804142295
+4.8279 14.17661468614 -0.1880960544786
+4.8279 14.13099189739 -0.1037667037341
+4.8279 14.20215352767 -0.1357024250917
+4.8279 14.24530589688 -0.1748840261074
+4.8279 14.22044065223 -0.2307797812425
+4.8279 14.27719798166 -0.112627018033
+4.8279 14.36350561026 -0.1057180612011
+4.8279 14.4441668697 -0.07649936321587
+4.8279 14.4488446732 -0.158163695274
+4.8279 14.48224145647 -0.1185184982525
+4.8279 14.61951465343 -0.3956090403789
+4.8279 14.63878575871 -0.6367039582343
+4.8279 17.55062504368 -0.07700961552568
+4.8279 17.62222983343 -0.1831090754796
+2.996410390514 14.63325854122 -2.580239500196
+4.8279 17.67905745294 -0.06296524590087
+4.8279 17.53262666538 -0.1516972660982
+4.8279 17.51707055728 -0.2055661862054
+4.8279 17.39331050045 -0.3592941299208
+4.8279 17.26651871532 -0.2275325714544
+4.8279 17.32350837537 -0.202299124667
+4.8279 17.27464057757 -0.1643347787658
+4.8279 17.21776133479 -0.1887090472308
+4.8279 17.22186056895 -0.124058173257
+4.8279 17.28419529177 -0.1031950972261
+4.8279 17.33488508393 -0.1404366852528
+4.8279 17.39194514209 -0.1139689564057
+4.8279 17.45912855304 -0.1446062574338
+4.8279 17.1729974001 -0.08152665604998
+4.8279 17.16499462267 -0.140055268269
+4.8279 17.08701657427 -0.08303777215675
+4.8279 17.08419489771 -0.1382975978078
+4.8279 17.02955404461 -0.147014670863
+4.8279 17.20221846295 -0.2631158911791
+4.8279 16.95717956496 -0.1106375050291
+4.8279 17.017502447 -0.07521852007329
+3.072365292605 16.8421320045 -0.6558235876993
+3.076042035804 16.7912302998 -0.6647941315246
+3.125628076304 16.77641854451 -0.6674035627613
+3.122186565817 16.82750536429 -0.6584015337943
+3.174174256478 16.79797892329 -0.6636073823538
+3.549118401936 16.82140814051 -0.6594705359686
+3.492642158123 16.78075702951 -0.6666408365702
+3.514760100249 16.73489607897 -0.6747312677647
+3.42594287719 16.72580973045 -0.6763302686761
+3.43528006787 16.78155245086 -0.6665003231777
+3.378005360247 16.75356191275 -0.6714349174746
+3.324441411311 16.73885400201 -0.6740299805719
+3.227419836032 16.79704418175 -0.663771834275
+3.168809367746 16.85015680598 -0.6544052600186
+3.237022806051 16.88035628525 -0.6490750764193
+3.296627306458 16.83586719391 -0.6569183444977
+3.283242357849 16.77977266263 -0.6668166847879
+3.332735774792 16.79791524877 -0.6636142785178
+3.384555902707 16.8079429774 -0.6618461835934
+3.460181792257 16.86020516463 -0.6526335770349
+3.418211931505 16.89184976777 -0.6470545178625
+3.366178412726 16.8826905581 -0.6486662938729
+3.063619932951 16.89398508369 -0.6466814962361
+3.116832891659 16.88990204786 -0.6473962106249
+3.632139644739 14.57201396196 -1.428129617408
+1.319970111285 15.68675993266 -3.3934e-14
+3.359818576446 16.18595520603 -3.3934e-14
+3.317881655842 16.22182804941 -1.797708762018e-14
+0.6475523919454 15.47510561621 -1.150028032142
+1.212212572986 14.08774567259 -1.352393041131
+1.464206741737 12.77643881072 -1.184470977119
+1.930283109461 16.05035498009 -0.7954214067023
+4.341452658781 17.7221991068 -3.3934e-14
+4.227849474238 17.67152835973 -3.3934e-14
+4.410324240123 17.63238671512 -3.3934e-14
+4.463344218513 17.63565431615 -3.3934e-14
+4.425105758152 17.56852814675 -3.3934e-14
+4.359519409111 17.61687335085 -3.3934e-14
+4.799657023717 13.60985873878 -0.2297358786548
+2.397641885809 12.93687623342 -0.05152694680895
+3.336346294843 13.52958933939 -0.08919833572022
+1.475057329794 12.86651638418 -3.3934e-14
+1.323722599712 13.64439487646 -1.944416476336
+3.405815251534 16.20089302505 -0.6995872675529
+3.639047132448 14.38886987946 -1.388456716612
+0.04408469292249 14.48624914201 -2.554315142492
+4.562271974847e-15 14.46292998104 -2.545463709395
+3.101001121626 15.52770130886 -0.8247064025011
+2.111376530775 16.16958062028 -3.3934e-14
+4.540217442752 17.62799860822 -3.3934e-14
+4.489587839712 17.57625025751 -3.3934e-14
+4.503917449714 17.66602349729 -3.3934e-14
+4.595926398972 17.65228171189 -3.3934e-14
+1.033063801395 14.38511770152 -0.5162035728535
+1.999329693165 16.42672805439 -0.01489026448521
+2.878608135519 13.62161962961 -1.543406982908
+2.880882326732 13.57007058843 -1.528734771263
+2.873415351278 13.50037025355 -1.53475610915
+2.857848282787 13.53877697343 -1.579696601509
+2.888757477878 17.25146890101 -0.5836386004392
+2.074795429231 15.75099614264 -0.8896607796829
+1.3285 13.16055802926 -0.6156186276395
+1.3285 13.19411346533 -0.5648134167216
+0.0007579739504217 14.67163606553 -0.6251728732251
+1.3285 13.21279853324 -0.6208343264831
+1.3285 13.25346167731 -0.5876261575267
+3.990398978303 14.46285588018 -1.117127267099
+1.961966740224 12.7276743444 -1.358424532816
+1.968511522116 12.72185011175 -1.411474500949
+1.158513093026 15.71699353815 -0.2998490366566
+3.499649445762 16.82968885077 -0.6580124824006
+2.319361805326 12.85129883342 -2.266033870839
+4.827899999989 15.82537297235 -0.1166617451212
+0.6870446987664 14.46204310169 -2.125809709107
+2.791454674914 14.10323101866 -3.376327387031e-14
+1.41151050345 15.87146661657 -0.06336885489219
+1.252732445719 14.00564197626 -1.308364407019
+2.93576586575 14.24439387043 -1.56630676553
+0.8025170526506 14.50259054093 -1.350128641669
+3  0 1 2
+3  3 4 5
+3  3 6 4
+3  7 8 9
+3  10 11 12
+3  13 14 15
+3  16 17 18
+3  19 20 21
+3  22 23 24
+3  25 23 22
+3  26 27 28
+3  29 30 31
+3  29 32 30
+3  33 34 35
+3  36 37 38
+3  39 40 41
+3  42 43 44
+3  42 45 43
+3  46 47 48
+3  49 50 51
+3  52 50 49
+3  53 54 55
+3  56 57 58
+3  59 60 61
+3  62 63 64
+3  65 66 67
+3  68 69 70
+3  71 72 73
+3  74 75 76
+3  77 78 79
+3  80 78 77
+3  81 82 83
+3  84 85 86
+3  87 88 89
+3  90 91 92
+3  93 94 90
+3  95 96 97
+3  98 99 100
+3  101 102 103
+3  104 105 106
+3  107 104 106
+3  108 109 110
+3  111 112 113
+3  114 115 116
+3  117 118 119
+3  120 121 122
+3  123 124 125
+3  126 127 128
+3  129 130 131
+3  132 133 134
+3  135 136 137
+3  138 139 140
+3  141 142 137
+3  143 141 137
+3  144 145 146
+3  147 148 149
+3  150 151 152
+3  153 154 155
+3  156 157 158
+3  159 160 161
+3  162 163 164
+3  165 166 167
+3  168 169 170
+3  171 170 169
+3  172 173 174
+3  175 176 177
+3  178 179 180
+3  181 182 183
+3  184 185 186
+3  187 188 189
+3  190 191 192
+3  193 194 195
+3  196 197 198
+3  64 199 200
+3  129 131 201
+3  202 203 204
+3  205 206 207
+3  208 209 210
+3  211 212 213
+3  214 215 216
+3  217 218 219
+3  220 221 222
+3  223 221 220
+3  224 225 226
+3  227 228 201
+3  229 230 231
+3  232 233 234
+3  235 236 237
+3  238 239 240
+3  241 240 239
+3  242 243 244
+3  245 246 247
+3  248 249 250
+3  251 252 253
+3  254 255 256
+3  123 257 258
+3  259 260 261
+3  259 261 262
+3  263 264 265
+3  266 267 268
+3  269 270 271
+3  272 273 274
+3  275 276 277
+3  278 279 280
+3  162 281 163
+3  282 283 284
+3  285 286 287
+3  288 289 290
+3  288 291 289
+3  292 293 294
+3  295 296 297
+3  298 299 300
+3  301 302 303
+3  304 305 306
+3  307 308 309
+3  310 308 307
+3  311 312 313
+3  311 314 312
+3  315 316 317
+3  318 319 320
+3  321 318 320
+3  322 323 324
+3  325 326 327
+3  328 329 330
+3  331 332 333
+3  334 335 336
+3  337 338 339
+3  340 341 342
+3  343 344 345
+3  346 344 343
+3  347 348 349
+3  350 351 352
+3  350 352 353
+3  354 355 356
+3  357 358 359
+3  360 361 362
+3  360 362 363
+3  364 365 366
+3  367 368 369
+3  370 371 372
+3  373 372 371
+3  374 375 376
+3  377 375 374
+3  378 379 380
+3  381 382 383
+3  384 385 301
+3  386 333 387
+3  388 389 390
+3  391 392 393
+3  394 395 396
+3  397 396 395
+3  398 399 400
+3  401 400 399
+3  402 403 404
+3  402 404 405
+3  406 407 408
+3  409 410 411
+3  412 413 414
+3  415 416 417
+3  418 419 420
+3  418 420 421
+3  422 423 424
+3  425 422 424
+3  426 427 428
+3  429 426 428
+3  430 431 432
+3  430 432 433
+3  434 435 436
+3  437 438 439
+3  440 441 442
+3  443 444 445
+3  446 447 448
+3  449 450 451
+3  452 453 454
+3  455 456 457
+3  458 446 459
+3  460 461 462
+3  463 464 465
+3  466 467 468
+3  469 467 466
+3  470 471 472
+3  473 474 475
+3  476 477 478
+3  479 480 481
+3  482 483 484
+3  485 486 487
+3  488 489 490
+3  491 492 493
+3  494 495 496
+3  497 498 499
+3  500 501 502
+3  503 504 505
+3  506 507 508
+3  509 510 511
+3  512 388 513
+3  514 515 516
+3  517 518 519
+3  520 521 522
+3  523 524 525
+3  526 527 528
+3  529 530 531
+3  532 533 534
+3  535 536 537
+3  538 539 540
+3  541 542 543
+3  544 545 546
+3  544 547 545
+3  351 548 549
+3  550 551 552
+3  553 554 555
+3  556 557 558
+3  556 558 559
+3  560 561 562
+3  563 564 565
+3  566 563 565
+3  399 567 568
+3  569 570 571
+3  572 571 570
+3  573 535 537
+3  574 575 576
+3  577 578 579
+3  580 581 582
+3  583 581 580
+3  584 585 586
+3  587 584 586
+3  588 589 590
+3  591 590 589
+3  592 593 594
+3  595 596 597
+3  598 599 600
+3  601 602 603
+3  604 605 606
+3  607 608 609
+3  610 611 612
+3  613 614 615
+3  616 617 618
+3  619 616 618
+3  620 621 622
+3  623 624 625
+3  623 626 624
+3  627 628 629
+3  630 631 632
+3  633 634 635
+3  636 637 638
+3  639 26 640
+3  639 641 26
+3  642 643 644
+3  645 646 647
+3  648 649 650
+3  651 652 653
+3  654 655 656
+3  654 657 655
+3  658 659 660
+3  661 662 509
+3  663 664 665
+3  666 667 668
+3  669 670 671
+3  672 673 674
+3  675 672 674
+3  676 677 678
+3  679 680 681
+3  682 683 684
+3  685 686 687
+3  149 688 689
+3  690 691 692
+3  693 694 695
+3  696 693 695
+3  697 698 699
+3  697 699 700
+3  701 702 703
+3  704 705 706
+3  707 708 709
+3  710 711 712
+3  713 714 715
+3  716 717 718
+3  719 720 721
+3  722 106 723
+3  722 724 106
+3  725 726 727
+3  728 729 730
+3  731 732 733
+3  734 735 736
+3  737 738 739
+3  740 741 742
+3  743 744 745
+3  743 745 746
+3  747 748 749
+3  750 751 752
+3  753 754 755
+3  756 757 758
+3  759 760 761
+3  762 763 764
+3  437 765 766
+3  767 768 769
+3  770 771 772
+3  773 774 775
+3  776 777 778
+3  779 780 781
+3  782 783 784
+3  785 786 787
+3  788 789 790
+3  791 792 793
+3  794 791 793
+3  795 796 797
+3  798 799 800
+3  798 800 315
+3  801 802 803
+3  804 802 801
+3  805 806 807
+3  808 809 810
+3  811 812 813
+3  814 812 811
+3  815 816 817
+3  818 819 820
+3  806 818 820
+3  191 821 822
+3  823 824 825
+3  826 823 825
+3  827 828 349
+3  829 830 831
+3  832 115 833
+3  834 835 836
+3  837 350 838
+3  839 840 841
+3  842 841 840
+3  843 844 845
+3  846 847 848
+3  846 849 847
+3  850 851 852
+3  470 853 854
+3  855 856 857
+3  858 859 860
+3  858 860 861
+3  862 863 864
+3  865 866 867
+3  868 869 870
+3  871 872 873
+3  874 875 876
+3  877 878 879
+3  880 881 882
+3  883 882 881
+3  884 885 886
+3  887 888 889
+3  887 889 890
+3  891 892 893
+3  894 891 893
+3  895 896 897
+3  898 831 899
+3  900 901 902
+3  903 904 905
+3  906 907 908
+3  909 910 911
+3  912 913 914
+3  915 916 917
+3  918 919 920
+3  921 922 923
+3  924 325 925
+3  926 927 928
+3  929 927 926
+3  930 931 932
+3  56 933 930
+3  934 935 936
+3  937 938 939
+3  940 938 937
+3  941 942 943
+3  944 945 946
+3  947 82 948
+3  947 948 949
+3  950 951 952
+3  953 385 954
+3  955 956 957
+3  958 959 960
+3  958 961 959
+3  581 962 582
+3  963 964 965
+3  966 967 968
+3  969 968 967
+3  970 971 972
+3  973 974 975
+3  976 977 978
+3  979 980 981
+3  982 983 984
+3  985 986 987
+3  988 989 990
+3  991 992 993
+3  994 995 996
+3  994 997 995
+3  998 356 999
+3  1000 1001 1002
+3  1003 700 1004
+3  1003 1004 1005
+3  1006 1007 1008
+3  1009 1010 1011
+3  146 1012 1013
+3  1014 1015 1016
+3  1017 1018 1019
+3  1020 1021 1022
+3  1023 1024 1025
+3  1026 1027 1028
+3  1029 1030 1031
+3  1032 1033 1034
+3  1035 1036 1037
+3  1038 1039 1040
+3  1041 1042 1043
+3  1044 1045 1046
+3  1047 1046 1045
+3  1048 1049 1050
+3  1048 1050 1051
+3  1052 1053 1054
+3  1052 1054 1055
+3  1056 1057 1058
+3  1059 1060 1061
+3  1059 1061 1062
+3  1063 1064 1065
+3  1066 1067 1068
+3  1069 1070 1071
+3  1072 1073 1074
+3  1075 1076 1077
+3  1075 1077 1078
+3  1079 1080 1081
+3  1082 1083 1084
+3  1085 1086 1087
+3  1088 1089 1090
+3  1091 1089 1088
+3  1092 1093 1094
+3  1092 1095 1093
+3  1096 1097 601
+3  1098 1099 1100
+3  1098 1100 1101
+3  1102 1103 1104
+3  1105 1106 1107
+3  1108 1109 1110
+3  1111 1112 1113
+3  1114 1115 1116
+3  1117 1118 1119
+3  1120 1121 1122
+3  1123 1124 1125
+3  1126 1127 1128
+3  1129 1130 1131
+3  1129 1132 1130
+3  1133 1134 1135
+3  1136 1137 1138
+3  1139 1140 1141
+3  1142 1139 1141
+3  1143 1144 1145
+3  1146 1147 1148
+3  1146 1149 1147
+3  1150 1151 1152
+3  1153 82 1154
+3  81 1154 82
+3  1155 1156 1157
+3  1158 1159 1160
+3  1161 1162 1163
+3  1164 1165 1166
+3  1164 1166 1167
+3  477 1168 1169
+3  1170 1171 1172
+3  1173 1171 1170
+3  1174 1175 1176
+3  1177 1178 1179
+3  1180 1181 1182
+3  1183 1184 1185
+3  1186 1187 1188
+3  1189 1190 1191
+3  1192 1193 1194
+3  1195 1196 1197
+3  1198 1196 1195
+3  1199 1200 1201
+3  995 1202 1203
+3  1204 1205 1206
+3  1207 1208 1209
+3  1210 1211 1212
+3  1213 1210 1212
+3  1214 1215 1216
+3  1217 1218 1219
+3  1220 1221 1222
+3  1223 1224 1225
+3  1226 1227 1228
+3  1229 1227 1226
+3  1230 1231 1232
+3  1233 1234 1235
+3  1236 1237 1238
+3  603 602 1239
+3  1240 1241 1242
+3  1243 1244 1245
+3  1246 1247 1248
+3  1249 1248 1247
+3  1250 1251 1252
+3  1253 1254 1255
+3  1256 1253 1255
+3  1257 1258 1259
+3  1260 1261 1262
+3  1263 1260 1262
+3  1264 1265 1266
+3  1267 1268 1269
+3  1270 1271 1272
+3  1273 1271 1270
+3  1274 1275 1276
+3  1277 1278 1279
+3  1280 1277 1279
+3  1281 1282 1283
+3  1281 1283 1284
+3  1285 1286 1287
+3  1288 1289 1290
+3  1291 1289 1288
+3  1292 1293 1294
+3  1295 1296 1297
+3  1104 1298 1299
+3  1300 1301 1302
+3  1303 1304 254
+3  1303 254 1305
+3  1306 1307 1308
+3  1309 1310 1311
+3  1312 1311 1310
+3  1313 1314 1315
+3  1316 1317 1318
+3  473 475 1319
+3  1320 1321 1322
+3  1323 1324 1325
+3  1326 851 850
+3  1327 1328 1329
+3  1330 1329 1328
+3  1331 1332 1333
+3  1331 1334 1332
+3  1335 1336 1337
+3  1338 1339 1340
+3  1341 1342 1343
+3  1344 1345 1346
+3  1347 1348 1349
+3  1350 1347 1349
+3  1351 1352 1353
+3  1354 1355 1356
+3  1357 1356 1355
+3  1358 1359 622
+3  1360 1361 1362
+3  935 1363 936
+3  1262 1261 1364
+3  1365 1366 1367
+3  1368 829 1369
+3  1370 1371 1372
+3  1373 1374 1375
+3  1376 1377 868
+3  1378 1379 1380
+3  1381 1382 1383
+3  1384 1385 1386
+3  1387 1388 1389
+3  1390 1391 1392
+3  1393 1394 1395
+3  1396 1397 1398
+3  1399 1400 1401
+3  1402 1403 1404
+3  1405 1403 1402
+3  1406 1407 1408
+3  1409 1410 1411
+3  1412 1413 1414
+3  1415 1416 1417
+3  1418 1419 1420
+3  1421 1420 1419
+3  1422 1423 1424
+3  1425 1426 1427
+3  1425 1427 1428
+3  33 1429 1430
+3  653 1431 1432
+3  1433 1434 1435
+3  1436 1437 1438
+3  1439 1440 1441
+3  1442 1231 1443
+3  1367 1442 1443
+3  1444 1445 1446
+3  1447 1448 1449
+3  721 720 1450
+3  1451 1452 1453
+3  1454 1455 1456
+3  1457 1458 1459
+3  1460 1461 1462
+3  231 1463 229
+3  1464 1465 1466
+3  1467 1466 1465
+3  1468 1469 1470
+3  1468 1470 1471
+3  1472 1473 1474
+3  1475 1476 1477
+3  1478 1479 1480
+3  1296 1481 1297
+3  1482 402 405
+3  1482 405 1483
+3  1484 1485 1486
+3  1487 1488 1489
+3  1490 1491 1492
+3  1493 1492 1491
+3  1494 1495 1496
+3  1494 1496 1304
+3  414 1497 1498
+3  1499 1500 1501
+3  1502 1503 1504
+3  1505 1506 1507
+3  1508 1509 1510
+3  1511 701 1512
+3  1513 1020 1514
+3  1515 1516 1517
+3  1518 1519 133
+3  1520 948 1521
+3  1522 1521 948
+3  1523 1524 1525
+3  1526 1527 1528
+3  817 1529 1530
+3  1531 1532 1533
+3  1531 1534 1532
+3  1269 1268 1535
+3  1536 1537 1538
+3  1539 1540 1541
+3  1542 1543 1544
+3  1545 1546 1547
+3  1548 1549 1550
+3  1551 1552 1553
+3  1554 1555 1556
+3  1557 1558 1559
+3  1560 1561 1562
+3  1563 1564 1565
+3  1566 1563 1565
+3  1329 1330 1567
+3  1568 1569 1570
+3  1190 1571 1572
+3  1573 1574 1575
+3  1576 1577 1578
+3  1579 1580 1581
+3  1582 1583 444
+3  1584 1585 1586
+3  1584 1586 1587
+3  242 1588 1589
+3  242 1589 1590
+3  1591 1592 1593
+3  1591 1594 1592
+3  1595 1596 1597
+3  1598 1599 1600
+3  1601 1602 1603
+3  1604 1605 1606
+3  1607 1608 1609
+3  1610 1611 1612
+3  1613 1614 1615
+3  1616 1617 1618
+3  1619 1616 1618
+3  588 1620 589
+3  1621 1622 1623
+3  1624 1625 1626
+3  1624 1626 1627
+3  1628 1629 1630
+3  1631 1632 1633
+3  1634 1635 1636
+3  1637 1638 1639
+3  1640 1637 1639
+3  1641 1642 1643
+3  1644 1645 1646
+3  1647 1648 1649
+3  1650 1651 1652
+3  163 281 1653
+3  1654 1655 1656
+3  1371 1657 1658
+3  1659 1660 1661
+3  1659 1662 1660
+3  1663 1664 1665
+3  1666 1667 1668
+3  1669 1670 1671
+3  1672 1673 1674
+3  1675 1676 1677
+3  1678 1679 1680
+3  1681 1682 1683
+3  1684 1685 1686
+3  1687 1688 1689
+3  1690 1691 1692
+3  1693 1694 1695
+3  1696 1694 1693
+3  1697 1698 331
+3  1699 1700 1701
+3  1702 1703 1704
+3  1702 1705 1703
+3  1706 1707 1708
+3  1706 1708 1709
+3  1710 1711 1712
+3  1713 1714 1715
+3  1716 1717 1718
+3  1719 1720 1721
+3  1722 1723 1724
+3  1725 1724 1723
+3  1726 1727 1728
+3  1729 1730 1731
+3  1732 1731 1730
+3  638 1733 1734
+3  1735 1736 1737
+3  1738 1739 1740
+3  1738 1741 1739
+3  1742 1743 1744
+3  1745 1746 1747
+3  1565 1748 1566
+3  1749 1750 1751
+3  1752 1750 1749
+3  1753 1754 1755
+3  1756 1757 1758
+3  1759 1760 1761
+3  1762 1763 1764
+3  1762 1764 1765
+3  1766 1767 1768
+3  1769 1770 1771
+3  1772 1773 1774
+3  1775 1776 1777
+3  1778 1779 1780
+3  1781 1782 1783
+3  1784 1785 1786
+3  1787 1784 1786
+3  1788 1789 1790
+3  1791 1792 1793
+3  1794 1795 1796
+3  1797 1798 715
+3  1799 1800 1801
+3  1802 1803 1804
+3  1805 1806 1807
+3  1808 1809 1810
+3  1811 1812 1813
+3  1814 1447 1815
+3  1816 1817 1818
+3  1819 1820 1821
+3  1822 1820 1819
+3  1299 1823 1824
+3  1299 1825 1823
+3  1826 1827 98
+3  1828 1829 1830
+3  1831 1832 1833
+3  1571 1834 1835
+3  1571 1835 1836
+3  1837 1838 1839
+3  1840 1841 1842
+3  1843 1838 1844
+3  1845 1846 1589
+3  1845 1589 1588
+3  1847 1848 1849
+3  1850 1851 1852
+3  1853 1854 1855
+3  1853 1855 1856
+3  1857 1858 1859
+3  1860 1861 1862
+3  1863 1864 1865
+3  1866 1865 1864
+3  1867 23 25
+3  1867 25 1868
+3  1869 1870 1871
+3  1397 1872 1873
+3  1874 1875 1876
+3  1877 1878 1879
+3  1880 1881 1882
+3  1883 1884 252
+3  1885 1886 1887
+3  1888 1889 1890
+3  1891 1892 667
+3  1893 1894 1895
+3  1896 1897 1898
+3  1896 1899 1897
+3  1900 1901 1902
+3  1903 1904 1905
+3  1459 1458 1906
+3  1459 1906 1907
+3  1908 1909 1910
+3  1911 1912 1913
+3  1914 1915 1916
+3  1917 1918 1919
+3  1920 1921 1922
+3  1923 1924 1067
+3  1925 1926 1927
+3  1928 1929 1930
+3  1931 1932 1933
+3  1931 1934 1932
+3  1935 1936 1937
+3  134 133 1938
+3  1939 1940 1941
+3  1942 1045 1943
+3  1944 1945 1946
+3  1947 1948 1949
+3  1950 1951 1952
+3  1518 1953 1954
+3  1955 1956 1957
+3  1958 1959 1960
+3  1961 1962 1224
+3  1963 1964 1965
+3  417 1966 1967
+3  1968 1969 1970
+3  1971 1972 1973
+3  1974 1975 1976
+3  1977 1978 1979
+3  1980 1981 1982
+3  1983 1984 1985
+3  684 1986 682
+3  1987 1988 317
+3  1989 1990 1991
+3  1992 1689 1993
+3  1123 1125 1994
+3  1995 1996 1997
+3  1995 1997 1998
+3  1999 2000 2001
+3  2002 2003 2004
+3  2005 2006 2007
+3  2008 2009 2010
+3  2011 2012 2013
+3  2011 2014 2012
+3  2015 2016 2017
+3  2018 2019 2020
+3  2021 371 370
+3  2022 2023 2024
+3  1088 1090 2025
+3  2026 2027 527
+3  2028 2029 2030
+3  1713 2031 2032
+3  2033 2034 2035
+3  1748 2036 2037
+3  2038 2039 2040
+3  2041 2042 2043
+3  2041 2044 2042
+3  2045 2046 2047
+3  2048 2049 2050
+3  1492 2051 2052
+3  1492 2052 2053
+3  2054 2055 2056
+3  2057 2058 2059
+3  2060 2061 2062
+3  121 1216 122
+3  2063 2064 2065
+3  2066 2067 2068
+3  2066 2068 2069
+3  2070 2071 2072
+3  2073 2074 2075
+3  2076 635 634
+3  2077 1961 2078
+3  2079 2080 2081
+3  2082 1018 2083
+3  2084 2085 2086
+3  2087 2084 2086
+3  2088 2089 2090
+3  2091 2092 2093
+3  2094 2095 2096
+3  2097 2098 2099
+3  2100 2101 2102
+3  2103 2104 1956
+3  2105 1956 2104
+3  2106 2107 2108
+3  1336 2109 2110
+3  2111 2112 2113
+3  2114 2115 2116
+3  2117 2114 2116
+3  2118 2119 2120
+3  2121 2122 2123
+3  2124 2125 2126
+3  2127 1337 2128
+3  2129 2130 2131
+3  2132 2129 2131
+3  2133 2134 2135
+3  2136 2137 2138
+3  2139 2136 2138
+3  2140 138 2141
+3  2142 2143 2144
+3  2145 416 2146
+3  2147 2148 2149
+3  2150 2151 2152
+3  2153 2154 2155
+3  2156 2157 2158
+3  2159 2160 2161
+3  2162 1824 2163
+3  2164 2165 2166
+3  2167 2168 2169
+3  2170 2171 2172
+3  394 2172 2171
+3  2173 2174 2175
+3  983 2176 2177
+3  2178 2179 2180
+3  2181 2179 2178
+3  1352 2182 2183
+3  2184 2185 2186
+3  2187 2188 1233
+3  2186 2185 2189
+3  2190 2191 2192
+3  2193 2194 2195
+3  2196 2197 2198
+3  2199 2200 2201
+3  2202 2203 2204
+3  2205 148 147
+3  2206 2207 2208
+3  2209 2210 2211
+3  2212 2213 602
+3  2214 2215 2216
+3  2217 2218 2219
+3  2220 2221 2222
+3  2026 2223 2224
+3  2225 2226 2227
+3  2228 2229 2230
+3  2231 2232 647
+3  2233 2234 2235
+3  2236 1063 2237
+3  2106 2108 2238
+3  2239 2240 542
+3  2241 2242 2243
+3  2244 2245 2246
+3  2247 2248 2249
+3  2250 2251 2252
+3  2253 2254 2255
+3  2256 2257 1136
+3  2258 2259 2260
+3  2261 2262 2263
+3  2264 2265 2266
+3  2267 2268 2269
+3  1577 2270 2271
+3  2272 2273 828
+3  325 327 925
+3  2274 2275 2276
+3  2277 2274 2276
+3  2278 2279 2280
+3  2281 2282 2255
+3  2283 2284 2285
+3  2286 2287 2288
+3  2289 2290 2291
+3  2292 2293 2294
+3  1130 2295 2296
+3  2082 1019 1018
+3  2297 2298 2299
+3  2300 2301 2302
+3  2303 2304 2305
+3  2306 2307 2308
+3  2309 2310 2311
+3  2312 2313 1463
+3  2314 2315 2316
+3  2317 2318 2319
+3  2320 2321 2322
+3  2320 2323 2321
+3  2324 2325 2326
+3  2327 2328 2329
+3  2330 2331 2332
+3  2333 2334 2335
+3  2333 2335 2336
+3  1938 273 2337
+3  2338 2339 2340
+3  2341 2339 2338
+3  2342 2343 2344
+3  2345 2346 2198
+3  2347 2348 2349
+3  2347 2349 2350
+3  2351 2352 2353
+3  2354 2355 2356
+3  2357 2358 2359
+3  2360 559 558
+3  2361 2362 2363
+3  2088 2364 2365
+3  2366 2367 1714
+3  2368 2369 2370
+3  2371 2372 2373
+3  2374 2375 2376
+3  777 2377 2378
+3  2379 2380 2381
+3  2382 2383 2384
+3  2385 2386 2387
+3  2388 2389 2390
+3  2391 2392 2393
+3  2391 2393 2394
+3  2395 2396 2397
+3  2398 2399 2400
+3  2401 2402 2403
+3  2404 2405 2406
+3  2407 1789 1788
+3  2408 2409 2410
+3  2411 2412 2413
+3  2411 2413 2414
+3  2415 2416 2417
+3  2418 2416 2415
+3  2419 2420 2421
+3  2422 2423 2424
+3  2425 980 2426
+3  1983 2427 2428
+3  1983 2429 2427
+3  2430 2431 2432
+3  2433 2434 2435
+3  890 889 2436
+3  154 2437 2438
+3  2439 2440 2441
+3  2442 2443 2444
+3  2445 2446 2447
+3  1349 1348 2448
+3  2449 1889 2450
+3  2278 2280 2451
+3  2452 2453 2454
+3  155 2455 2456
+3  2457 2458 740
+3  2459 2460 2461
+3  2462 2463 469
+3  2464 2463 2462
+3  2465 2466 2467
+3  2468 2056 2055
+3  2469 2470 2471
+3  2472 2473 2148
+3  2474 2475 2476
+3  2477 1361 1360
+3  2478 2479 2480
+3  2481 2482 2483
+3  2059 1869 1871
+3  2484 2485 2486
+3  2487 2488 2489
+3  2487 2490 2488
+3  2491 2492 2493
+3  2491 2493 2494
+3  2495 2406 2496
+3  2497 2498 2499
+3  2500 2501 1249
+3  1382 2502 1383
+3  1382 2503 2502
+3  2504 2505 2506
+3  2504 2507 2505
+3  2508 2509 2510
+3  2511 2512 2513
+3  2514 2515 2516
+3  2517 2518 2519
+3  2520 2521 2522
+3  2523 2524 2525
+3  2526 2527 2528
+3  2529 2530 2531
+3  2532 2533 2534
+3  2535 2536 2537
+3  2538 2537 2536
+3  2539 2540 109
+3  2541 2542 2543
+3  2544 2545 2546
+3  2547 2548 2549
+3  2550 2551 2552
+3  2553 2551 2550
+3  2554 2555 2556
+3  2557 2558 2559
+3  2272 2560 2561
+3  2562 2563 2564
+3  2565 2566 2567
+3  2568 368 2569
+3  2570 226 2571
+3  613 2572 2573
+3  2574 2575 2576
+3  2577 2578 2046
+3  2579 2580 821
+3  1546 2581 2582
+3  2583 2584 2585
+3  2586 2587 2588
+3  2589 2586 2588
+3  2590 2591 2592
+3  2593 2594 2595
+3  2596 2597 2598
+3  2599 2597 2596
+3  2600 2601 2602
+3  2603 2600 2602
+3  2604 2605 683
+3  2606 2607 2608
+3  2609 1922 2610
+3  2611 2612 2613
+3  2614 2615 2616
+3  70 69 2617
+3  2618 2619 2620
+3  2621 1299 1298
+3  2622 2623 2624
+3  2625 2626 2627
+3  2625 2627 2628
+3  2038 2629 2039
+3  2630 2631 2632
+3  2633 2634 2635
+3  2636 2637 2638
+3  2639 2640 2641
+3  2642 2643 2644
+3  2326 2325 2645
+3  2646 1249 2647
+3  2648 2649 2650
+3  2651 2652 2653
+3  2651 2653 2654
+3  2655 2656 2657
+3  1137 2658 2659
+3  2660 2661 2662
+3  2663 912 914
+3  2664 2665 2666
+3  2667 2664 2666
+3  2668 2669 2670
+3  2668 2671 2669
+3  2672 2673 2674
+3  2675 2676 2677
+3  2678 2679 2680
+3  2681 2682 2683
+3  2684 2685 2686
+3  2687 2570 2571
+3  2278 2688 2689
+3  2602 2690 2603
+3  2691 2692 2693
+3  2694 2692 2691
+3  2695 1884 2696
+3  2697 2698 2699
+3  2700 2701 2702
+3  2703 2702 2701
+3  2704 2705 2082
+3  2706 2707 2708
+3  2706 2708 2709
+3  2710 2711 2712
+3  2713 2714 2715
+3  2716 2717 2718
+3  2719 2720 2721
+3  2722 2723 2724
+3  2725 2726 2727
+3  2728 2729 2144
+3  2730 2731 2732
+3  43 2733 44
+3  1906 2734 2114
+3  1906 2114 2735
+3  2736 2737 2738
+3  2739 2740 2741
+3  2742 2743 2744
+3  2745 497 2746
+3  2747 2748 2749
+3  2747 2749 2750
+3  2751 2752 2753
+3  2754 2755 2756
+3  2757 2758 1478
+3  2759 2760 2761
+3  29 31 2762
+3  29 2762 2763
+3  2764 2765 2009
+3  2766 2767 2768
+3  2769 2770 2771
+3  2769 2771 2772
+3  2773 2774 2775
+3  1758 2776 2777
+3  2778 2779 2780
+3  2773 2775 2781
+3  2782 409 892
+3  2783 2784 2785
+3  2786 2787 2788
+3  60 2789 2790
+3  2791 2792 2793
+3  2794 2795 2796
+3  2797 2798 2799
+3  41 2800 39
+3  1411 2801 2802
+3  2803 2804 2805
+3  2806 2807 2021
+3  2586 1893 1895
+3  2808 1852 2809
+3  2810 2811 2812
+3  2810 2812 2813
+3  2814 2815 2816
+3  2814 2816 2817
+3  2818 2819 1047
+3  2820 2819 2818
+3  257 2821 2822
+3  2823 2560 2824
+3  2825 1279 2826
+3  2827 2828 2829
+3  2830 2831 2832
+3  2833 2834 2835
+3  2836 2837 1774
+3  2838 2839 2840
+3  932 931 2841
+3  2842 2843 2844
+3  2842 2844 2845
+3  2846 2847 2848
+3  2849 2850 2851
+3  2852 2853 2854
+3  2855 2856 2857
+3  2858 2855 2857
+3  2859 2860 2861
+3  2862 2863 2864
+3  2865 2866 2867
+3  2865 2868 2866
+3  2869 2870 2871
+3  2872 2873 2874
+3  2875 2876 2877
+3  2878 2879 2880
+3  2878 2881 2879
+3  2882 2883 2884
+3  2885 2886 2887
+3  2888 2889 982
+3  1238 2890 1789
+3  2891 2892 2893
+3  2894 2895 2896
+3  2897 2898 2899
+3  2900 2901 2902
+3  2903 2904 2905
+3  2906 2907 377
+3  2886 2908 2887
+3  2909 2788 2910
+3  2911 1359 1358
+3  2912 2913 2914
+3  1888 1890 2915
+3  2916 2917 2918
+3  2919 2920 2921
+3  2922 2923 2924
+3  2925 2926 2927
+3  1575 2928 2929
+3  606 1058 2930
+3  424 423 2931
+3  2932 2931 423
+3  2933 2934 2935
+3  2936 2937 2938
+3  2939 1068 2794
+3  2940 2941 2942
+3  2943 2944 2945
+3  2946 1333 2947
+3  2948 2949 2532
+3  2950 2951 2952
+3  2953 2954 2734
+3  2953 2734 1458
+3  2955 2956 2957
+3  8 2958 2959
+3  2960 2961 2962
+3  2963 2961 2960
+3  2964 1598 2965
+3  2966 1549 1548
+3  2967 2968 2969
+3  2970 2967 2969
+3  2971 2972 2973
+3  2974 2972 2971
+3  2975 2976 2977
+3  1652 875 874
+3  2978 2979 2980
+3  2981 2980 2979
+3  2982 2983 2984
+3  2985 2986 2987
+3  2988 2985 2987
+3  2989 2990 2991
+3  2992 2993 2994
+3  2995 2996 2531
+3  2997 2996 2995
+3  2998 2999 3000
+3  3001 3002 3003
+3  3004 3005 3006
+3  3007 3008 3009
+3  3010 3011 3012
+3  3013 3014 3015
+3  1719 3015 3014
+3  3016 3017 3018
+3  3019 202 3020
+3  3021 1779 1778
+3  3022 3023 1401
+3  3024 210 209
+3  244 210 3024
+3  3025 3026 3027
+3  2770 2769 3028
+3  486 3029 3030
+3  3031 3032 3033
+3  3034 3035 3036
+3  3037 3038 345
+3  3039 345 3038
+3  3040 3041 3042
+3  3043 3044 3045
+3  3046 3047 3048
+3  3046 3049 3047
+3  3050 3051 3052
+3  3053 3052 3051
+3  3054 3055 3056
+3  134 1938 3057
+3  3058 3059 3060
+3  3061 3058 3060
+3  3062 3063 3064
+3  3065 3066 3067
+3  3068 3069 2355
+3  1500 3070 1501
+3  3071 516 3072
+3  966 3072 516
+3  3073 3074 3075
+3  3076 3077 3078
+3  3079 3080 3081
+3  3082 3083 3084
+3  3085 3086 3087
+3  3088 3089 3090
+3  3091 3092 3093
+3  3094 142 141
+3  3095 3096 3097
+3  3098 2191 3099
+3  3100 3101 3102
+3  3100 3103 3101
+3  3092 3104 217
+3  3105 3106 3107
+3  3108 3107 3106
+3  3109 3110 3111
+3  3112 1277 1280
+3  3113 3112 1280
+3  3114 3115 3116
+3  3114 3116 3117
+3  3118 3119 3120
+3  3121 1043 3122
+3  3121 3122 3123
+3  3124 3125 3126
+3  3127 3128 3129
+3  383 382 3130
+3  383 3130 3131
+3  3132 3133 3134
+3  3135 3136 3137
+3  3138 3139 3140
+3  3141 3142 3143
+3  3144 355 3145
+3  3146 3145 355
+3  3147 3148 3149
+3  3150 3151 3152
+3  3153 3154 641
+3  3155 3156 231
+3  3157 3158 3159
+3  3157 3160 3158
+3  3161 3162 3163
+3  3164 3165 3166
+3  3167 3166 3165
+3  3168 3169 3170
+3  3171 3172 2787
+3  3173 3174 3175
+3  3176 3177 3178
+3  3179 3178 3177
+3  3180 3181 3182
+3  3180 3183 3181
+3  3184 1207 3185
+3  3186 3187 3188
+3  1483 1082 3189
+3  3190 3191 6
+3  3192 3193 3194
+3  3195 3196 3197
+3  173 3195 3197
+3  3198 3199 3200
+3  3201 3202 3203
+3  3204 3201 3203
+3  3205 3206 3207
+3  3208 74 76
+3  3209 3210 3211
+3  3212 3213 3214
+3  3215 3216 3217
+3  3218 3219 3220
+3  3221 2224 2223
+3  3222 3223 3224
+3  3222 3225 3223
+3  3226 3227 3228
+3  3226 3228 3229
+3  3230 3231 3232
+3  3233 3234 3235
+3  3236 3237 3238
+3  323 3239 3240
+3  323 3240 3241
+3  3242 2943 3243
+3  3244 3245 3246
+3  498 3247 3248
+3  3249 3250 3251
+3  3252 3253 252
+3  3254 3255 3015
+3  3256 3257 3258
+3  3259 3260 3261
+3  419 418 3262
+3  3263 3264 3265
+3  3264 3266 3265
+3  3267 443 3268
+3  3269 3270 3271
+3  2411 2414 3272
+3  3273 3274 3275
+3  3276 2891 3277
+3  3278 3279 2312
+3  3280 3281 1580
+3  3282 3283 3284
+3  3285 3286 3287
+3  3288 1061 3289
+3  3290 3291 3292
+3  3293 3294 3295
+3  677 3296 3297
+3  3298 3299 3300
+3  3301 1526 3258
+3  1674 3302 657
+3  3303 3304 3305
+3  3306 3307 3308
+3  2699 3309 2697
+3  3310 3311 3312
+3  3313 3163 3314
+3  3315 3316 3317
+3  3318 3319 3320
+3  431 3321 432
+3  3322 3323 3324
+3  3325 3326 3327
+3  3328 3329 3330
+3  3331 3332 3333
+3  3334 3333 3332
+3  3335 3336 3337
+3  3338 3336 3335
+3  3339 3340 3341
+3  3342 3343 3344
+3  3345 3344 3343
+3  3346 3347 3348
+3  3346 3348 3349
+3  3350 1182 1181
+3  3351 3352 789
+3  3353 3354 3355
+3  3356 3357 3358
+3  3359 3357 3356
+3  3360 3361 3362
+3  3363 3184 3185
+3  3364 3365 3366
+3  3364 3366 3367
+3  3368 3197 972
+3  3369 3368 972
+3  3370 2379 3371
+3  3372 3373 3374
+3  3375 3252 3376
+3  3377 3378 3379
+3  3380 3381 3382
+3  3383 3384 3385
+3  3386 3387 1173
+3  3386 1173 1170
+3  3388 3389 3390
+3  3391 3392 3393
+3  3394 1619 3395
+3  3396 264 263
+3  3397 3398 3182
+3  2173 3399 3400
+3  3401 3402 1105
+3  3403 3401 1105
+3  1687 1689 1163
+3  3404 3405 1039
+3  3406 3407 3408
+3  3277 2891 3409
+3  3410 3411 3412
+3  3413 3414 3415
+3  3413 3415 3416
+3  2874 2873 3417
+3  3418 3419 3420
+3  3421 3422 3423
+3  3424 3425 3426
+3  3427 3428 1267
+3  3429 3428 3427
+3  1143 3430 1144
+3  3431 3432 3433
+3  3434 3435 3436
+3  3437 2619 3279
+3  3438 3439 3440
+3  3441 3442 3443
+3  913 1636 3444
+3  2710 3445 3446
+3  2710 3447 3445
+3  2116 2115 3448
+3  2116 3448 3449
+3  3450 3034 3036
+3  3451 3452 3453
+3  793 792 3454
+3  3455 747 3456
+3  3457 3458 3459
+3  3460 3461 3462
+3  3463 3464 3465
+3  3463 3465 3466
+3  3467 3468 2316
+3  3469 3470 3471
+3  3472 189 3473
+3  3474 1360 2618
+3  3475 3274 3273
+3  3476 272 1954
+3  2696 1884 1883
+3  3477 3478 3479
+3  3480 3481 3482
+3  3483 3484 3485
+3  3486 3487 3488
+3  3489 3490 3491
+3  3489 3492 3490
+3  138 3493 2141
+3  3494 3495 3496
+3  998 999 3497
+3  3498 3499 3500
+3  1906 1458 2734
+3  3501 3502 3503
+3  3504 3505 3506
+3  3507 3508 3509
+3  3510 3511 3512
+3  3513 3514 3515
+3  3513 3515 3354
+3  704 1032 3516
+3  3517 590 591
+3  3518 3519 2092
+3  3520 3521 3522
+3  3523 3524 3525
+3  3526 3527 3528
+3  3529 3530 3531
+3  3532 3533 3534
+3  3535 3536 3537
+3  1043 3538 3122
+3  3539 3540 402
+3  2853 3541 2854
+3  2516 3542 3543
+3  1652 874 3120
+3  1652 3120 1650
+3  3544 3545 3546
+3  3547 3548 3549
+3  3547 3549 3550
+3  3551 3552 3553
+3  3554 3555 3062
+3  3556 3375 3557
+3  3558 3408 3559
+3  3560 3561 1109
+3  3562 1945 3563
+3  3564 3565 3566
+3  3567 3568 3569
+3  3570 3434 3571
+3  3572 3573 3574
+3  3419 3575 3480
+3  225 3576 2263
+3  3577 3578 3579
+3  3580 3581 3582
+3  3583 3584 3585
+3  3586 3587 3588
+3  3471 3589 3590
+3  3591 3592 3593
+3  3594 3593 3592
+3  3595 3596 591
+3  3595 591 589
+3  3597 2563 3598
+3  867 3599 3600
+3  3601 3602 3603
+3  1284 3604 3416
+3  3605 3606 3607
+3  3608 3571 3609
+3  3610 1266 3611
+3  3612 3613 3614
+3  3102 3101 3341
+3  3615 3341 3101
+3  3616 3617 3618
+3  3619 3620 3621
+3  3619 3621 3622
+3  3623 1697 331
+3  1595 2969 3624
+3  3565 3625 3566
+3  3573 3626 3627
+3  3628 3629 3630
+3  3631 3632 3633
+3  3631 3633 3283
+3  1437 1436 3634
+3  3635 3636 3637
+3  3635 3638 3636
+3  3639 3640 3641
+3  3642 3643 3644
+3  3645 3646 3647
+3  3648 3649 3650
+3  3648 3651 3649
+3  3652 1885 3653
+3  2196 3654 3655
+3  3656 3657 3658
+3  3659 3657 3656
+3  3660 3661 3662
+3  362 3663 3664
+3  3665 3666 3667
+3  3205 2090 2089
+3  3668 3669 3670
+3  3671 3672 3673
+3  3674 2372 2371
+3  3675 3676 3677
+3  3678 3679 3680
+3  3681 3682 3683
+3  3684 3685 3686
+3  2404 3687 2405
+3  3688 3689 3690
+3  3691 3692 3360
+3  3693 3694 3695
+3  3696 2071 3697
+3  3698 3699 3700
+3  3701 3702 3703
+3  3704 3705 3706
+3  3707 3705 3704
+3  3708 3709 3710
+3  3711 3712 3713
+3  3714 3715 3716
+3  1648 3717 1649
+3  152 3718 3719
+3  3720 3721 1706
+3  1707 1706 3721
+3  3722 3723 3724
+3  3725 3726 3727
+3  3728 3729 3730
+3  3728 3731 3729
+3  3718 3732 3733
+3  3734 3735 3736
+3  1374 3737 3738
+3  3739 3740 3741
+3  3742 138 140
+3  3743 3744 2471
+3  3745 3746 3747
+3  3748 3749 3750
+3  759 3751 3752
+3  3753 3754 3755
+3  3756 3757 3758
+3  3759 3760 3761
+3  3762 3763 3764
+3  3765 3766 3767
+3  3768 3766 3765
+3  3769 2281 3770
+3  3771 3769 3770
+3  3772 3773 3194
+3  3774 781 780
+3  3775 3776 3777
+3  3778 3779 3780
+3  3781 3782 3783
+3  1331 1333 3784
+3  2965 1600 3785
+3  3786 3787 3788
+3  3789 3790 1634
+3  3791 3792 3793
+3  1031 3794 1029
+3  3795 3796 3797
+3  3798 3799 3800
+3  3801 3802 3803
+3  3804 3805 3806
+3  3807 3808 3809
+3  3810 3811 3812
+3  3813 3811 3810
+3  375 3814 2408
+3  3815 3816 2681
+3  3817 3818 3819
+3  3817 3819 3820
+3  240 3821 3822
+3  3823 3824 3825
+3  3826 415 3827
+3  150 152 3828
+3  3829 3830 2592
+3  3831 3832 3833
+3  3834 3835 3836
+3  3837 3834 3836
+3  3838 3839 3840
+3  3841 3842 3843
+3  2648 1173 3387
+3  3844 2648 3387
+3  3845 3846 3847
+3  3848 1108 1110
+3  3849 3850 3851
+3  3852 3853 3854
+3  3855 3856 1555
+3  341 3857 3858
+3  3859 2854 3541
+3  3860 3859 3541
+3  3861 585 584
+3  3861 2436 585
+3  3862 3863 1225
+3  2722 3864 3865
+3  2080 3866 1900
+3  3867 3631 3868
+3  3869 3870 3871
+3  2883 3872 393
+3  3873 3874 3875
+3  3873 3876 3874
+3  3877 1306 1308
+3  3877 3878 1306
+3  3879 3880 3881
+3  3612 2498 3613
+3  2265 413 3882
+3  3883 3884 3885
+3  986 3886 3887
+3  3888 3889 3890
+3  3891 3892 3893
+3  3894 3895 3896
+3  3897 3898 3899
+3  146 145 1012
+3  1247 2527 2500
+3  1247 2528 2527
+3  3543 3542 3900
+3  3901 3902 3903
+3  3904 3905 3906
+3  3907 3017 3908
+3  3907 3909 3017
+3  3910 3911 3912
+3  3913 2786 3914
+3  3915 3916 3917
+3  3918 3919 3835
+3  3920 3921 3922
+3  3923 2070 2072
+3  3924 3475 3273
+3  3925 3926 260
+3  2793 3927 2232
+3  3928 3929 3930
+3  3931 3932 3933
+3  3934 3935 3936
+3  3937 3938 3939
+3  3931 3940 3941
+3  3942 3940 3931
+3  3943 3944 3945
+3  3946 3944 3943
+3  2785 3947 3948
+3  2785 3948 2783
+3  3949 3950 3951
+3  3949 3952 3950
+3  3953 3954 3955
+3  3956 3957 3958
+3  3959 3960 3961
+3  638 637 3962
+3  2715 3963 3964
+3  2798 3965 2799
+3  2309 3966 3967
+3  3968 3969 3970
+3  3971 3972 3973
+3  3855 3974 3856
+3  3975 3976 1345
+3  3977 1418 1420
+3  3978 3979 3980
+3  3978 3980 3981
+3  3982 3983 3296
+3  3984 2347 3985
+3  3986 3987 3988
+3  3989 3990 3991
+3  3992 3989 3991
+3  3993 1473 1472
+3  3994 3995 3996
+3  2511 3997 3998
+3  3999 1074 1073
+3  3999 1073 4000
+3  4001 4002 4003
+3  4004 4005 4006
+3  4007 4006 4005
+3  4008 4009 4010
+3  4011 4012 4013
+3  4014 4015 4016
+3  474 4017 475
+3  4018 4019 4020
+3  2485 4021 2486
+3  4022 4023 1570
+3  4024 4025 1473
+3  4026 3016 1689
+3  1688 4026 1689
+3  4027 4028 4029
+3  4030 4028 4027
+3  4031 4032 4033
+3  4034 4035 4036
+3  4037 4038 4039
+3  4040 4041 4042
+3  4043 4044 4045
+3  4046 4047 4048
+3  4049 4048 4047
+3  4050 4051 4052
+3  4053 2077 4054
+3  4055 1288 1290
+3  4055 1290 4056
+3  4057 4058 756
+3  1226 4059 4060
+3  4061 1226 4060
+3  4062 4063 4064
+3  4065 4066 4067
+3  4068 4069 4070
+3  4071 4072 4073
+3  4074 1165 4075
+3  4076 664 4077
+3  4076 4078 664
+3  3841 3843 4079
+3  3863 1223 1225
+3  4080 3437 4081
+3  4082 4083 4084
+3  2913 4085 4086
+3  4087 894 4088
+3  4087 891 894
+3  2991 4089 4090
+3  4091 4092 753
+3  409 411 893
+3  4093 4094 4095
+3  4096 4034 4097
+3  4098 4099 4100
+3  4101 4102 4103
+3  4104 4105 2200
+3  4106 4107 4108
+3  4109 4110 4111
+3  4000 1073 4112
+3  4113 1537 4114
+3  801 1741 1738
+3  4115 4116 4117
+3  2991 2990 4089
+3  4118 2103 4119
+3  4120 4121 2210
+3  4120 4122 4121
+3  4123 4124 4125
+3  4126 4127 4128
+3  3677 4129 4130
+3  4131 4132 4133
+3  4134 381 4135
+3  4136 4137 4138
+3  4139 4137 4136
+3  4140 4141 1730
+3  4142 4143 2390
+3  4144 4145 4146
+3  3936 3935 4147
+3  4148 4149 4150
+3  3989 4148 4150
+3  4151 4152 4153
+3  4151 4153 4154
+3  4155 3367 1426
+3  4156 4157 1359
+3  4158 4159 4160
+3  4161 1877 4162
+3  4163 4164 4165
+3  1181 4166 4167
+3  1007 4168 1008
+3  4169 4170 4171
+3  4169 4171 4172
+3  2175 2174 4173
+3  4174 3367 4175
+3  4174 1426 3367
+3  4176 4177 4178
+3  1008 4168 4179
+3  4180 2872 4181
+3  3072 4182 4183
+3  4184 4185 4186
+3  4187 4188 3776
+3  4189 4190 292
+3  738 504 739
+3  788 4191 4192
+3  4193 4194 4195
+3  1148 1147 4196
+3  3247 4197 4198
+3  2460 494 229
+3  4199 4020 4200
+3  4199 4200 4201
+3  4202 4203 4204
+3  4202 4204 4205
+3  4206 4207 4208
+3  4209 4210 2627
+3  4211 4212 4213
+3  4214 715 4215
+3  4216 4217 4218
+3  4219 4220 4221
+3  4222 4223 4224
+3  4225 4226 4227
+3  4228 4229 4230
+3  4231 395 4232
+3  4233 4232 395
+3  4234 4235 4236
+3  4237 4238 4239
+3  4240 4241 4242
+3  4243 4242 4241
+3  4244 4245 4246
+3  2427 4247 4248
+3  4249 4250 4251
+3  4252 4251 4250
+3  4253 4254 4255
+3  4256 4257 4258
+3  4259 4260 4261
+3  4262 4260 4259
+3  4263 4264 4265
+3  4266 4265 4264
+3  4267 4268 4269
+3  4270 4271 4272
+3  4153 4273 4274
+3  4275 4276 1762
+3  4277 4278 4279
+3  4280 4281 4282
+3  4283 4284 4285
+3  4286 4287 4288
+3  1440 4289 4290
+3  4291 4292 4293
+3  4291 4293 4294
+3  1552 4295 4296
+3  4297 4298 2546
+3  116 4299 4300
+3  4301 4302 4303
+3  4301 4304 4302
+3  4305 4306 4307
+3  4308 4309 4310
+3  4311 4312 4313
+3  4314 4315 4316
+3  4317 4318 4319
+3  870 4320 4321
+3  2762 31 1495
+3  1589 4322 1590
+3  98 4323 99
+3  3522 3521 4324
+3  4325 4326 4327
+3  4328 4327 4326
+3  4329 4330 4331
+3  4332 4333 4334
+3  1954 1953 4335
+3  4336 4337 4338
+3  4339 3644 3643
+3  4339 3643 4340
+3  4341 4342 4343
+3  4341 4344 4342
+3  4345 4346 4347
+3  2666 2665 4348
+3  4349 4350 4351
+3  2189 4352 4353
+3  2185 4352 2189
+3  4354 4355 4356
+3  4357 4358 4359
+3  4360 3338 3335
+3  708 2988 709
+3  4361 709 2988
+3  4362 4363 4364
+3  4365 4362 4364
+3  4366 4367 4368
+3  4369 4370 643
+3  4371 4372 4373
+3  1876 4359 1874
+3  1876 4357 4359
+3  4374 4375 1024
+3  4376 4377 4378
+3  4376 4378 4379
+3  772 4380 4381
+3  4382 4383 4384
+3  4382 4385 4383
+3  4386 4387 4388
+3  4389 2580 4390
+3  4391 4392 1348
+3  4393 4394 4395
+3  4396 4397 4398
+3  4399 1624 1627
+3  240 3822 238
+3  4400 4401 4402
+3  2678 4403 4404
+3  2807 2806 4082
+3  4405 2807 4082
+3  4406 4407 4408
+3  4409 1923 4410
+3  4411 4412 4413
+3  4411 4413 4414
+3  162 4408 281
+3  4415 4416 1970
+3  4417 4418 1451
+3  4419 942 941
+3  4420 2323 4421
+3  4422 4423 4424
+3  4425 4424 4423
+3  4426 4427 4428
+3  4429 4430 4431
+3  2111 4432 2112
+3  4433 4434 4435
+3  295 1773 1772
+3  775 4436 4437
+3  3002 4438 4439
+3  2769 4440 3028
+3  4441 4442 4443
+3  4441 4443 4444
+3  2948 2532 2534
+3  4445 4446 4447
+3  1228 1227 4448
+3  4449 4450 4451
+3  2406 4191 690
+3  542 4452 543
+3  4453 4454 4455
+3  4456 4457 1023
+3  4386 4388 4458
+3  4459 4460 4461
+3  2165 4462 4463
+3  4464 4465 4466
+3  4467 4468 4469
+3  4470 2756 2755
+3  4471 4472 4473
+3  4471 4473 4474
+3  4475 4476 4477
+3  981 2425 4478
+3  4479 4480 4481
+3  3477 4482 4483
+3  4484 4485 4486
+3  4487 4488 4489
+3  4490 4347 4491
+3  4492 4493 4494
+3  4102 4495 4496
+3  1446 4497 1444
+3  4498 4499 4500
+3  1970 1969 4501
+3  4502 4503 4504
+3  4505 4506 4507
+3  4505 4507 4508
+3  4509 4510 4511
+3  1734 1733 4512
+3  1872 4513 4514
+3  4515 4516 4517
+3  4518 4519 4520
+3  4521 4522 4523
+3  4521 4523 4524
+3  4525 4526 4527
+3  3455 4528 4529
+3  881 4530 4531
+3  881 4532 4530
+3  3621 3620 4533
+3  4534 4533 3620
+3  4535 4536 4537
+3  4538 4539 4540
+3  4541 4538 4540
+3  4542 4543 579
+3  4544 4545 784
+3  4546 4547 4548
+3  4549 4550 4551
+3  4552 4553 4554
+3  4555 4556 4557
+3  4555 4557 4558
+3  2744 4559 4560
+3  4561 4562 4563
+3  4564 4565 4566
+3  4567 4568 4569
+3  4567 4570 4568
+3  4416 4415 4571
+3  4572 4573 2483
+3  4574 4575 4576
+3  840 839 4577
+3  4578 2903 2905
+3  4579 4580 4422
+3  4581 4582 4583
+3  1603 4584 4585
+3  4586 4514 4513
+3  4586 4513 4587
+3  4588 4589 4590
+3  4591 4592 4593
+3  4594 4595 4596
+3  4597 4598 4599
+3  4600 4601 4602
+3  4578 2905 3223
+3  4578 3223 4603
+3  4604 4605 3809
+3  2092 2091 4606
+3  4607 4608 4609
+3  3808 4610 4611
+3  4612 1850 4613
+3  3049 4614 4615
+3  4616 3049 4615
+3  4617 4618 4619
+3  4620 4621 4622
+3  4623 4624 4625
+3  3171 4626 4627
+3  4628 3579 1327
+3  1328 1327 3579
+3  4629 4630 4631
+3  4632 4629 4631
+3  4633 4634 4635
+3  4636 4637 4638
+3  2736 2738 4639
+3  4640 4641 4642
+3  2930 4643 4644
+3  4645 4646 4647
+3  4648 1582 443
+3  4649 4650 4651
+3  4649 4652 4650
+3  4077 664 4653
+3  4654 4655 4656
+3  4657 3486 3488
+3  1144 4658 1145
+3  4659 4660 4661
+3  4662 4663 4664
+3  2348 4665 4666
+3  4667 4668 4669
+3  4670 4292 4671
+3  777 4670 4671
+3  2308 2307 4672
+3  2308 4672 4673
+3  4674 4675 2927
+3  4676 4677 4678
+3  4640 4642 1117
+3  4679 4680 4681
+3  4682 1101 4683
+3  4684 4685 4686
+3  4687 4688 4689
+3  4690 4691 3932
+3  4692 4693 4694
+3  4263 4695 886
+3  1339 4696 4697
+3  2332 2331 4698
+3  1958 2332 4698
+3  971 4699 3369
+3  4700 2447 2446
+3  4701 2447 4700
+3  4702 4703 4704
+3  4705 4706 4707
+3  4708 667 666
+3  2231 4489 4709
+3  4710 4711 2233
+3  4712 3878 4713
+3  850 852 4714
+3  4715 4716 4717
+3  4718 4716 4715
+3  4719 4720 4721
+3  4577 3041 3040
+3  2356 4722 4723
+3  4724 4725 4726
+3  4727 4728 4729
+3  4730 640 4731
+3  2867 4732 4733
+3  4734 4733 4732
+3  4735 4736 4737
+3  4735 4737 4738
+3  4739 4740 1753
+3  4741 2809 4742
+3  4743 4744 4745
+3  4746 4747 4748
+3  2351 4749 4750
+3  4751 418 421
+3  4751 421 4752
+3  4753 4754 4755
+3  4756 4757 4758
+3  2408 376 375
+3  2408 2410 376
+3  4303 4302 4759
+3  4760 3958 4761
+3  3035 4762 3036
+3  4763 4764 508
+3  4765 4766 4767
+3  4768 2814 4769
+3  4770 3304 3303
+3  1350 4771 2487
+3  4772 4773 4774
+3  4775 4774 4773
+3  4776 4777 4778
+3  4779 4780 4781
+3  4782 4783 4784
+3  4785 4786 4787
+3  4788 4789 1881
+3  4790 4791 540
+3  4792 4793 4794
+3  438 4792 4794
+3  4795 4796 4797
+3  4795 4797 4798
+3  4799 4800 4801
+3  4802 4803 4804
+3  4805 2399 4806
+3  4807 4808 4809
+3  4810 4811 4812
+3  4813 4814 752
+3  4815 4816 4817
+3  2264 3429 4818
+3  2755 4819 4820
+3  4821 4822 4823
+3  4821 4823 4824
+3  4825 2579 4826
+3  4827 4828 4829
+3  2917 4830 2918
+3  574 4831 4832
+3  4833 4834 4835
+3  2593 2595 4836
+3  4837 4838 4839
+3  4840 4837 4839
+3  1156 4841 4842
+3  4843 4844 4845
+3  4846 4847 4848
+3  1637 4849 1638
+3  2476 520 4850
+3  4851 4852 4853
+3  4854 1183 1185
+3  4855 4856 4857
+3  2822 4858 4859
+3  1984 4860 1985
+3  2088 4861 2364
+3  4862 4863 4864
+3  2944 4865 3215
+3  3848 4866 4867
+3  1234 4868 4869
+3  4870 4871 3606
+3  917 4872 4873
+3  4874 3377 4875
+3  4876 4877 4878
+3  4879 4880 4881
+3  4879 4881 4882
+3  4883 4884 4885
+3  4886 4887 4888
+3  2568 2569 4889
+3  4330 4890 4891
+3  240 4892 3821
+3  4893 4894 4895
+3  4896 2425 2543
+3  4897 4898 4899
+3  58 933 56
+3  4900 4901 4902
+3  4900 4902 4903
+3  4904 4905 4906
+3  4907 4908 4909
+3  4907 4909 1593
+3  4910 783 4911
+3  4912 4913 4914
+3  4915 4916 4917
+3  3741 4918 4919
+3  4920 1700 4921
+3  4922 2064 2063
+3  1780 3583 4923
+3  4924 4925 4926
+3  4927 4928 4929
+3  4930 4931 4932
+3  4930 4932 4933
+3  4934 4935 4936
+3  4937 2912 4938
+3  4939 4940 4941
+3  1762 4276 4942
+3  4943 3645 4944
+3  1098 453 452
+3  4682 453 1098
+3  4097 4034 4036
+3  2321 4945 4946
+3  4947 4551 4948
+3  4947 4949 4551
+3  3862 1225 4950
+3  4951 4952 4953
+3  4954 4955 4956
+3  4954 4956 4957
+3  4958 4959 708
+3  4958 708 4960
+3  4961 2948 2534
+3  4914 4913 2396
+3  4962 4387 4963
+3  4964 4965 4966
+3  2162 4967 1824
+3  4968 4969 4970
+3  4971 4972 4973
+3  155 2456 4974
+3  4975 4976 4977
+3  4978 63 62
+3  4979 4980 4981
+3  4982 650 649
+3  4983 4984 4985
+3  4986 4987 3134
+3  4986 3134 4988
+3  4633 4989 4990
+3  4991 4990 4989
+3  2895 1187 1186
+3  2896 2895 1186
+3  4992 4993 4994
+3  4995 4996 4997
+3  2683 4998 3666
+3  303 302 4999
+3  5000 5001 1241
+3  5002 1868 5003
+3  5002 5003 2362
+3  2129 5004 2130
+3  5005 5006 5007
+3  5008 5009 3274
+3  1250 5010 5011
+3  3823 5012 3824
+3  5013 5014 5015
+3  4817 5016 1129
+3  4817 1129 4815
+3  5017 5018 5019
+3  5020 786 3029
+3  5021 5022 5023
+3  5024 5025 5026
+3  5024 5026 5027
+3  5028 3713 5029
+3  5030 2360 5031
+3  1600 5032 3785
+3  5033 5034 5035
+3  5036 5037 5038
+3  5039 5040 5041
+3  5039 5041 5042
+3  5043 5044 5045
+3  5043 5045 5046
+3  898 829 831
+3  5047 5048 5049
+3  5050 5051 5052
+3  5053 5054 5055
+3  5056 5057 5058
+3  2454 5059 3902
+3  5060 5061 5062
+3  5063 5064 5065
+3  5063 5065 2400
+3  5066 5067 5068
+3  5069 5070 5071
+3  1614 5072 1992
+3  5073 5074 5075
+3  5076 5077 2479
+3  632 5076 2479
+3  3711 5078 3712
+3  5079 5080 1911
+3  3450 3036 5014
+3  5081 5082 5083
+3  4189 5084 5085
+3  3518 5086 415
+3  5087 5088 5089
+3  5090 4308 5091
+3  5092 5090 5091
+3  5093 5094 5095
+3  5096 5097 5098
+3  5099 5100 5101
+3  5102 5103 5104
+3  5105 5106 4421
+3  5105 4421 5107
+3  1557 5108 5109
+3  5110 2447 5111
+3  908 907 879
+3  3254 1719 1721
+3  5112 5113 4884
+3  5114 4632 3911
+3  5115 73 72
+3  5110 2445 2447
+3  5110 397 2445
+3  5116 5117 2369
+3  5118 5119 5120
+3  5121 5122 5123
+3  2658 5122 5121
+3  5124 5125 5126
+3  4423 4422 925
+3  924 925 4422
+3  5127 5128 5129
+3  2060 5130 5131
+3  3758 3757 5132
+3  3692 5133 4369
+3  5115 72 5134
+3  5135 5136 5137
+3  5138 5136 5135
+3  5139 5140 5141
+3  5139 5142 5140
+3  5143 5144 4465
+3  5145 5146 5147
+3  5148 1339 4697
+3  5149 5150 5151
+3  276 5152 277
+3  5153 5154 5155
+3  5156 5157 5158
+3  4465 5144 5159
+3  5160 5161 5162
+3  3281 5163 5164
+3  5165 3755 5166
+3  3219 3961 3220
+3  5167 5168 5169
+3  1069 5170 1070
+3  5171 4092 4091
+3  5172 2667 2666
+3  1973 2667 5172
+3  5173 5174 5175
+3  5173 5176 5174
+3  1308 1307 1617
+3  5177 5178 5179
+3  5177 5179 4854
+3  5180 5181 5182
+3  5183 5182 5181
+3  5184 5185 5186
+3  5187 461 5188
+3  5189 5190 5191
+3  5192 5190 5189
+3  5193 5194 2085
+3  2086 2085 5194
+3  5195 5196 3602
+3  3215 4865 3216
+3  5197 5198 5199
+3  5200 5201 4526
+3  5202 1139 5203
+3  2077 5204 5205
+3  5206 2077 5205
+3  5207 2446 2445
+3  5207 2445 4231
+3  5208 5209 5210
+3  5208 5210 5211
+3  3132 5212 5213
+3  2578 5214 2047
+3  3909 5215 5216
+3  3909 5217 5215
+3  4236 4235 1069
+3  5218 5219 5220
+3  5221 5218 5220
+3  5222 5223 5224
+3  1 5222 5224
+3  5225 1669 5226
+3  5227 680 5228
+3  5229 5230 5231
+3  5232 3532 3340
+3  3339 5232 3340
+3  5233 4203 5234
+3  5235 2592 5236
+3  5237 5238 5239
+3  5240 5241 5242
+3  4216 4218 1259
+3  5243 5244 5245
+3  5246 5247 5248
+3  5249 5250 5251
+3  5252 5253 5254
+3  5252 5254 5255
+3  5256 3276 3277
+3  4760 263 3956
+3  5257 5258 5259
+3  5260 5261 5262
+3  5263 5264 5265
+3  5266 5267 5268
+3  5269 5270 5271
+3  5272 5273 2411
+3  5272 2411 5274
+3  5275 895 897
+3  4040 895 5275
+3  5276 1843 5277
+3  506 508 5278
+3  4203 5233 4204
+3  5279 3939 5280
+3  3938 5281 5280
+3  550 5282 551
+3  5283 5284 5285
+3  338 337 5286
+3  3556 3253 3252
+3  1152 3421 5287
+3  5288 5289 5290
+3  5291 5289 5288
+3  5292 5293 3890
+3  5294 5295 5296
+3  5297 581 5298
+3  5299 5300 5301
+3  5302 3288 3289
+3  2552 5303 5304
+3  2551 5303 2552
+3  5305 3247 4198
+3  5306 2806 2021
+3  4875 3379 4720
+3  1749 1770 1769
+3  5307 5308 5309
+3  5310 5308 5307
+3  5311 5312 5313
+3  4841 5314 5315
+3  5316 5317 5318
+3  5319 5320 5321
+3  5322 3754 3753
+3  5323 5324 5325
+3  5326 5327 5328
+3  5326 5328 5329
+3  2811 4523 4522
+3  5330 5150 5149
+3  353 352 5331
+3  353 5331 5332
+3  5333 5334 5335
+3  5336 5337 5338
+3  577 2635 2634
+3  2391 2394 5339
+3  5340 5341 5342
+3  5343 5344 5345
+3  5346 5347 5348
+3  5349 5350 5351
+3  5352 5353 5354
+3  5355 5356 5357
+3  5355 5358 5356
+3  5359 5360 5361
+3  5362 2497 5363
+3  5364 5365 5366
+3  4900 5364 5366
+3  5367 1152 5287
+3  2232 645 647
+3  485 3029 486
+3  1455 4864 5368
+3  5369 4864 1455
+3  5370 5371 5372
+3  5012 5373 5374
+3  5012 5374 5375
+3  2314 5376 5377
+3  5378 5376 2314
+3  5379 2839 5380
+3  5381 5382 5383
+3  5384 5385 5386
+3  5387 5386 5385
+3  5388 5389 5390
+3  5391 5392 5393
+3  4303 5394 5395
+3  4301 4303 5395
+3  5396 5397 5398
+3  5399 3317 5400
+3  5401 3317 5399
+3  2494 2493 5402
+3  925 5403 4423
+3  5404 5405 5406
+3  5404 5407 5405
+3  5408 4598 5409
+3  5408 5410 4598
+3  5411 5412 4535
+3  5413 5411 4535
+3  5414 3676 5415
+3  5416 87 89
+3  4552 5417 5418
+3  5419 5420 5421
+3  5422 5423 5424
+3  5425 5426 5427
+3  1700 4920 1701
+3  5428 4503 5429
+3  5430 5431 5432
+3  5433 5434 5435
+3  5436 5434 5433
+3  5437 5438 5439
+3  5440 5441 5442
+3  5443 5444 5445
+3  2439 5446 5447
+3  2439 2441 5446
+3  5448 5449 5450
+3  5448 5450 5451
+3  4036 5452 5453
+3  5454 5455 5456
+3  393 3872 2188
+3  5457 5458 5459
+3  5460 5461 3712
+3  5462 5461 5460
+3  628 3450 629
+3  5463 936 5464
+3  5465 5466 5467
+3  5465 5467 5468
+3  5469 5470 5471
+3  5472 5473 5474
+3  5475 5476 5477
+3  5478 5475 5477
+3  5479 4396 3164
+3  3538 5480 5481
+3  5482 5483 5484
+3  5485 5483 5482
+3  5486 5487 5488
+3  1417 4991 1415
+3  1417 5489 4991
+3  5490 5491 5492
+3  5493 5492 5491
+3  5494 5495 5496
+3  5497 983 2177
+3  5058 5057 5498
+3  5499 3103 5500
+3  5501 3139 5502
+3  2935 2934 2721
+3  5503 5504 168
+3  5505 5504 5503
+3  5506 5507 5508
+3  4503 5509 160
+3  3835 5510 5511
+3  5512 5513 5514
+3  5515 5516 5517
+3  5518 5519 5520
+3  4846 5521 4847
+3  5522 5523 5524
+3  5525 3578 5526
+3  5527 5528 3496
+3  390 389 5529
+3  5530 2804 5531
+3  2615 5305 5532
+3  5533 5534 670
+3  3142 5535 5536
+3  60 2790 61
+3  5537 5538 5539
+3  5540 5508 5507
+3  5541 5542 4097
+3  5543 5540 5507
+3  3739 1273 3740
+3  5544 5185 5545
+3  5546 5547 5548
+3  5549 5550 5551
+3  5552 5553 5554
+3  5360 4749 2351
+3  5555 5556 5557
+3  5558 2046 5559
+3  5560 5561 5562
+3  3326 5563 5564
+3  1981 5565 1982
+3  5566 5567 5568
+3  5569 869 5570
+3  5571 5572 5573
+3  5574 1715 5575
+3  5576 5577 339
+3  3175 3174 5578
+3  3498 5579 5580
+3  5581 5582 1616
+3  5581 1616 1619
+3  5583 5584 5585
+3  486 3030 2839
+3  5586 5587 5588
+3  188 5589 5590
+3  5591 4289 1439
+3  5592 5593 1818
+3  5594 5595 5596
+3  4736 5597 4737
+3  5598 5089 5088
+3  144 5599 5600
+3  144 5600 5601
+3  5602 5603 5604
+3  5605 5602 5604
+3  5606 5607 5608
+3  3024 209 1588
+3  4805 4806 4391
+3  5609 4805 4391
+3  5610 5611 5612
+3  5613 5614 5615
+3  5616 5617 5618
+3  5288 5616 5618
+3  5619 5620 5621
+3  5622 1252 5623
+3  4883 5624 5112
+3  5625 5626 1076
+3  5627 1390 1392
+3  5628 5629 5630
+3  5631 5632 5633
+3  5631 5634 5632
+3  933 5635 931
+3  5636 5637 5638
+3  5636 5638 5384
+3  4558 4557 5639
+3  5640 5641 306
+3  5237 4021 5238
+3  5642 3324 5643
+3  5644 5645 5646
+3  5647 5648 5649
+3  5650 5648 5647
+3  5651 5652 5653
+3  5654 3294 3293
+3  5655 5656 5657
+3  478 5655 5657
+3  439 2211 4121
+3  5658 4041 5659
+3  5660 5658 5659
+3  5661 1164 5662
+3  5663 5664 5665
+3  2101 5666 5667
+3  5315 1422 4841
+3  5668 214 216
+3  1851 5669 5670
+3  5671 5672 5673
+3  5674 5672 5671
+3  5675 2209 5676
+3  5677 5678 5679
+3  5680 5677 5679
+3  5681 5682 5683
+3  5681 5683 5684
+3  4021 5685 5686
+3  5687 5688 5689
+3  4159 1632 5690
+3  3582 5691 4322
+3  5692 3582 4322
+3  5693 4975 3539
+3  5694 5695 5696
+3  4433 5697 120
+3  5698 5699 5700
+3  5701 5702 5703
+3  5704 5705 5706
+3  3724 268 267
+3  3722 3724 267
+3  660 659 2924
+3  5707 3610 5708
+3  3611 5708 3610
+3  5709 5710 5352
+3  5711 4924 4926
+3  5712 5713 5714
+3  4465 5159 4466
+3  5715 3415 5716
+3  5717 4985 5718
+3  5719 5720 5721
+3  5722 132 5723
+3  5724 5725 2864
+3  5724 2864 5726
+3  5727 3114 3117
+3  2031 1715 5574
+3  5728 5729 5730
+3  3377 5731 4637
+3  1218 5732 5733
+3  4735 5734 4736
+3  5735 5734 4735
+3  4744 5036 4745
+3  5736 1241 1240
+3  5737 5459 5738
+3  5739 5740 5741
+3  5742 5743 5744
+3  5745 5746 5747
+3  5748 5747 5746
+3  5412 5749 5750
+3  5751 5752 5753
+3  5710 5353 5352
+3  5754 5755 5756
+3  5757 5754 5756
+3  5758 1974 5759
+3  5760 4678 5761
+3  3562 5762 1946
+3  4969 5762 3562
+3  5763 5764 4777
+3  5765 5764 5763
+3  5766 5767 5768
+3  1394 5769 5770
+3  5771 5772 2955
+3  357 359 5773
+3  3664 5774 363
+3  5775 5774 3664
+3  2120 2119 3193
+3  3184 1208 1207
+3  2397 5776 5777
+3  4560 4559 5778
+3  5778 4559 60
+3  5779 5780 5781
+3  5782 5783 5784
+3  5782 5784 2398
+3  2416 5785 5786
+3  1441 5787 5788
+3  2033 5789 2034
+3  5790 5791 5792
+3  5793 5794 5795
+3  5796 5797 5798
+3  1942 5799 5800
+3  5801 5800 5799
+3  181 183 5802
+3  3231 5803 5804
+3  3232 3231 5804
+3  5805 4674 5806
+3  5807 5808 5809
+3  5810 5363 2497
+3  5811 5363 5810
+3  5812 5813 5814
+3  1767 3485 5815
+3  5816 5817 5818
+3  5816 5819 5817
+3  5820 2417 2416
+3  5820 2416 5786
+3  5821 5822 1048
+3  5823 5824 3780
+3  5825 5826 5827
+3  4527 2704 3384
+3  4663 4648 5828
+3  5829 2274 5830
+3  5831 500 5249
+3  5832 5833 5834
+3  5835 5836 3751
+3  5837 5838 5839
+3  5840 5838 5837
+3  5841 5842 5833
+3  5843 5844 5845
+3  5846 5847 2899
+3  1421 5848 5849
+3  5850 5851 5852
+3  1782 5853 1783
+3  5854 5855 5856
+3  5857 4747 5858
+3  4693 2038 2040
+3  3526 3188 5859
+3  5860 3386 4726
+3  4724 4726 3386
+3  5861 5862 5863
+3  5864 5865 5866
+3  5867 5868 5869
+3  1625 5870 1626
+3  4416 5135 5137
+3  5871 5872 3345
+3  5873 5872 5871
+3  187 1358 622
+3  5874 4311 5875
+3  5876 5877 5878
+3  5879 5880 5881
+3  5879 5881 1094
+3  2995 5882 5883
+3  2531 5882 2995
+3  5884 5885 5886
+3  5887 351 350
+3  5887 548 351
+3  5888 5560 5889
+3  5074 5890 5891
+3  5074 5891 5075
+3  5892 5893 5894
+3  1199 1201 5895
+3  3904 5896 3111
+3  5897 2182 5898
+3  5899 1876 5652
+3  5900 5901 5902
+3  5903 5904 5905
+3  5079 1911 5906
+3  5907 5908 5909
+3  5907 5909 5910
+3  5911 1874 4359
+3  5911 5912 1874
+3  3710 5352 5913
+3  5914 5915 5916
+3  4449 4451 5917
+3  5918 695 5919
+3  5920 5921 5922
+3  5923 5924 5925
+3  4968 5762 4969
+3  5837 5926 5840
+3  5927 5928 5929
+3  2776 3303 2777
+3  5930 5931 5932
+3  5933 5934 5935
+3  5936 2335 2334
+3  5937 5936 2334
+3  5938 5939 5940
+3  5941 5942 5943
+3  5944 5943 5942
+3  5945 5946 4419
+3  5947 5948 5949
+3  936 1363 5464
+3  5950 5951 5952
+3  5683 5682 5953
+3  4896 5954 5955
+3  5956 5957 5954
+3  5958 5959 5960
+3  5958 5960 5961
+3  5962 5963 5964
+3  5965 5966 5967
+3  5228 5192 5968
+3  5969 5970 5971
+3  5972 5973 5974
+3  1228 4448 5975
+3  5976 1228 5975
+3  5977 5978 5979
+3  5980 5981 5982
+3  5983 5984 5985
+3  3871 3870 5986
+3  5987 5986 3870
+3  5988 2305 5989
+3  3066 3065 5990
+3  5650 5991 5992
+3  5650 5647 5991
+3  5993 5994 5995
+3  5996 5997 5998
+3  5999 748 6000
+3  6001 2375 6002
+3  6001 2376 2375
+3  4074 6003 6004
+3  6005 6003 4074
+3  6006 6007 6008
+3  6009 6010 6011
+3  2327 2329 6012
+3  6013 2002 6014
+3  6013 6014 6015
+3  1397 6016 1872
+3  6017 6018 6019
+3  6020 6021 6022
+3  6023 2833 6024
+3  4434 120 6025
+3  6026 4434 6025
+3  5576 6027 2636
+3  1175 5577 5576
+3  6028 6029 6030
+3  6031 6032 5260
+3  6031 5260 6033
+3  17 68 6034
+3  6035 3472 3473
+3  6036 3053 4075
+3  6037 5524 5523
+3  6038 6039 6040
+3  2579 4390 2580
+3  6041 6037 5523
+3  6042 6043 6044
+3  6045 6046 6047
+3  6048 6049 6050
+3  6051 6052 6053
+3  6051 6053 6054
+3  6055 1802 6056
+3  6057 6058 542
+3  4658 6059 6060
+3  6061 6062 2053
+3  6063 1827 538
+3  6064 2952 464
+3  6065 3253 3556
+3  6066 6067 6068
+3  6069 6070 6071
+3  6069 6072 6070
+3  6073 6074 6075
+3  6076 6077 4175
+3  6076 4175 310
+3  3441 6078 6079
+3  6080 6081 4955
+3  6082 3643 3642
+3  6082 6083 3643
+3  6084 5166 5607
+3  6085 6086 6087
+3  6088 6089 4381
+3  6090 6091 6092
+3  6093 173 6094
+3  6095 6096 6097
+3  6098 6099 6100
+3  5424 6101 5728
+3  595 6102 596
+3  1407 6103 6104
+3  6105 6106 6107
+3  5054 6108 6109
+3  3907 5054 6109
+3  6110 6111 6112
+3  6113 6114 6115
+3  6037 6116 5524
+3  2480 6117 6118
+3  6119 6120 6121
+3  6122 2831 1398
+3  6123 6124 6125
+3  6126 6127 3884
+3  6126 3884 6128
+3  4696 6129 4697
+3  2166 6130 6131
+3  6132 6133 5201
+3  1772 6134 296
+3  6135 3004 6136
+3  6135 6136 6137
+3  6138 6139 6140
+3  6141 3293 6142
+3  6143 2251 2250
+3  6144 4655 4654
+3  6145 6146 6147
+3  6148 6149 6150
+3  6148 6150 6151
+3  6152 6153 6154
+3  6155 6153 6152
+3  6156 6157 6158
+3  6159 6160 4222
+3  2617 6161 732
+3  4620 6162 6163
+3  1485 6164 2059
+3  6165 6166 6167
+3  6168 5606 5608
+3  6169 1768 6170
+3  6171 6172 6173
+3  6174 6175 2225
+3  5284 3511 6176
+3  4351 4350 6177
+3  6178 6179 6180
+3  6181 6182 6183
+3  6184 6185 6186
+3  6187 6186 6185
+3  6188 6189 6190
+3  1874 6191 1875
+3  6192 6193 4196
+3  6194 4196 6193
+3  6195 487 2838
+3  3764 6196 6197
+3  3763 6196 3764
+3  6198 6199 6200
+3  6201 3606 3605
+3  6201 4870 3606
+3  6202 6203 6085
+3  118 6204 3307
+3  3048 3047 6205
+3  690 788 790
+3  2424 6206 6207
+3  6208 6209 6210
+3  6208 6210 6211
+3  6212 6213 2089
+3  1826 6214 6215
+3  6216 6217 6218
+3  6219 6220 6221
+3  6222 6223 5666
+3  6224 6225 6226
+3  6227 6228 6229
+3  2035 2034 4809
+3  1091 1088 2287
+3  6230 6231 832
+3  6232 6233 84
+3  6234 6233 6232
+3  6235 6236 1445
+3  6237 6238 6239
+3  6240 6241 6242
+3  6243 6244 6245
+3  6246 6225 6247
+3  6248 6225 6246
+3  934 6249 6250
+3  6251 4289 1391
+3  6252 5348 6253
+3  5674 6254 5672
+3  6255 6009 6256
+3  6257 3074 3073
+3  6258 6259 4624
+3  6260 6261 6262
+3  6263 6264 6265
+3  1873 4514 6266
+3  1222 6267 6268
+3  6269 6270 6271
+3  6272 6273 6274
+3  6275 6276 6277
+3  6278 711 5545
+3  1857 6279 1858
+3  6280 6281 6282
+3  6283 4719 6284
+3  6283 6284 6285
+3  5946 942 4419
+3  2097 6286 6287
+3  6288 2454 3902
+3  6289 6290 3110
+3  6291 6292 6293
+3  3068 6294 3069
+3  4263 886 6295
+3  6296 6297 6298
+3  6299 6300 6301
+3  5071 2862 5725
+3  6302 6303 463
+3  6302 463 6304
+3  299 6305 6306
+3  6307 3503 6308
+3  6309 3145 6310
+3  3287 2816 2815
+3  3962 1733 638
+3  6311 6312 6313
+3  6314 5503 6315
+3  6316 5503 6314
+3  3891 6317 2297
+3  6318 951 6319
+3  6320 6321 6322
+3  3507 2106 2238
+3  95 4985 96
+3  6323 6324 6325
+3  6326 6327 3842
+3  6328 6329 6330
+3  6331 6332 5069
+3  6333 6334 2167
+3  6335 2649 6336
+3  2778 2780 6337
+3  6338 6339 5553
+3  6340 6341 77
+3  6342 6341 6340
+3  6343 6340 6344
+3  6342 6340 6343
+3  6345 4294 6346
+3  6345 6346 6347
+3  6348 3098 6349
+3  6350 6351 6352
+3  2928 6353 6354
+3  6355 6356 6357
+3  5707 6358 6359
+3  6360 5149 5151
+3  1774 2837 6361
+3  6063 98 1827
+3  6362 1978 1977
+3  6363 2787 2786
+3  6364 5996 6365
+3  762 6366 763
+3  6367 6368 6369
+3  6370 6371 6372
+3  1119 1118 6373
+3  6374 6375 6376
+3  6377 6378 6379
+3  4571 6379 6378
+3  5703 6380 6381
+3  5703 6381 5701
+3  6382 6383 6384
+3  6385 6386 6387
+3  6388 6389 5732
+3  6390 6391 6392
+3  6393 6391 6390
+3  3197 3196 972
+3  163 1653 6394
+3  6395 6396 6397
+3  6398 3073 6399
+3  726 6400 6401
+3  726 6401 6402
+3  4109 4111 287
+3  6403 6404 6405
+3  3076 6406 1944
+3  6407 1939 1941
+3  6408 6409 6410
+3  6411 2468 6412
+3  6411 6413 2468
+3  6356 1424 6357
+3  6414 6415 3107
+3  6416 6417 6213
+3  4558 6418 4555
+3  4642 6419 6420
+3  2561 6421 6422
+3  6423 1021 1020
+3  6424 6425 6426
+3  6427 6428 6429
+3  1644 3256 6430
+3  6431 6432 6433
+3  5761 4678 6434
+3  1378 1380 6435
+3  6436 6437 6438
+3  4139 4136 6439
+3  3177 4757 6159
+3  6440 4037 6441
+3  6440 6441 6442
+3  6443 5001 6444
+3  6445 6446 1840
+3  2582 6447 6448
+3  6449 6450 570
+3  6451 6449 570
+3  5739 6452 6453
+3  1963 6454 6455
+3  4916 6456 6457
+3  3939 6458 6459
+3  3280 2165 6460
+3  6460 2165 5163
+3  6461 6462 6463
+3  6461 6463 6464
+3  6465 6466 6467
+3  6465 6468 6466
+3  6469 6470 6471
+3  5970 3930 5971
+3  6472 6473 6474
+3  6475 3879 565
+3  1337 1336 4926
+3  6476 4752 421
+3  6477 6478 1178
+3  6479 1178 6478
+3  6480 5158 6481
+3  5616 5288 5387
+3  5386 5387 5288
+3  6482 5727 3117
+3  6483 6484 2873
+3  575 6485 4179
+3  6228 2583 6486
+3  2566 6487 6488
+3  6489 6490 6491
+3  848 6492 846
+3  4078 6492 848
+3  4860 6493 6494
+3  5732 6389 6495
+3  4833 6496 6497
+3  4833 4835 6496
+3  6498 6499 6500
+3  6501 6502 2430
+3  6503 3422 6504
+3  3338 6505 3336
+3  6506 6507 6508
+3  4353 3711 3713
+3  6509 6510 6511
+3  6512 6513 6514
+3  6515 6010 6516
+3  1843 5276 6517
+3  1464 612 1465
+3  6518 612 1464
+3  6062 6519 1491
+3  6520 687 6521
+3  6522 6523 6524
+3  6525 6522 6524
+3  6526 6527 6528
+3  6526 6528 6529
+3  6530 2219 6531
+3  6532 3615 6533
+3  3626 1952 6534
+3  6535 6536 6537
+3  3993 1472 412
+3  4628 1327 6538
+3  6539 3657 6540
+3  1866 6541 1865
+3  6542 4988 6543
+3  2283 6544 6545
+3  2283 6545 6546
+3  6547 6548 6549
+3  6550 3408 6551
+3  6550 6551 6552
+3  6553 6554 343
+3  3039 6553 343
+3  6555 6556 6557
+3  6555 6557 6558
+3  6559 6560 6561
+3  1829 6562 6563
+3  1829 6563 1830
+3  2170 6564 6565
+3  6566 6567 1369
+3  2878 2880 6568
+3  3683 6569 6570
+3  6571 6572 6573
+3  6574 6528 6527
+3  5871 3345 6575
+3  751 6576 6198
+3  3287 460 2816
+3  4780 6577 6578
+3  6579 6580 3209
+3  6303 6581 6064
+3  6582 6583 6584
+3  6057 542 541
+3  6585 6586 6587
+3  6588 6589 6590
+3  6591 6592 6593
+3  6594 6595 6596
+3  4618 6597 4619
+3  6598 6599 6600
+3  2461 6601 6602
+3  6603 11 10
+3  6603 6604 11
+3  6605 6606 6607
+3  6024 2833 2835
+3  5405 6608 2743
+3  5405 2743 5406
+3  6328 6330 6609
+3  6610 6143 2250
+3  6611 6612 689
+3  5603 5362 5363
+3  2067 6613 2068
+3  6614 6615 6616
+3  6617 6023 6618
+3  3322 6619 3323
+3  6620 5734 866
+3  6621 5488 4443
+3  2490 6621 4443
+3  6622 6623 1286
+3  5971 6624 6625
+3  3930 6624 5971
+3  3394 3395 6603
+3  6626 3394 6603
+3  4429 4431 6627
+3  1917 6628 6629
+3  3748 6630 3749
+3  6631 6632 6633
+3  387 6634 6635
+3  5431 65 6636
+3  6637 6638 6639
+3  6640 6641 6642
+3  6643 3970 5892
+3  705 6644 5441
+3  3511 5344 3512
+3  6492 4078 6645
+3  6646 6647 6648
+3  1489 6649 2998
+3  705 5441 5440
+3  2018 6650 2019
+3  6651 6652 6653
+3  6651 2796 6652
+3  759 5835 3751
+3  4974 4217 153
+3  6654 4409 4410
+3  6655 5606 6656
+3  6657 6658 6659
+3  6660 6661 6662
+3  6663 5454 6664
+3  4331 6665 3702
+3  6304 6666 554
+3  5756 6667 6668
+3  6669 6670 2713
+3  6669 2713 2715
+3  6671 6672 6673
+3  5282 3687 2404
+3  6674 6675 6063
+3  6676 6677 6678
+3  6679 6680 6681
+3  6682 5881 6683
+3  6684 6685 6686
+3  6687 6688 6689
+3  6690 6691 6692
+3  834 6693 835
+3  6694 835 6693
+3  6695 6696 6697
+3  5650 5992 6698
+3  5964 6699 6700
+3  4145 6701 6702
+3  4749 5359 6703
+3  3909 3018 3017
+3  4896 2543 6704
+3  6705 6706 6707
+3  6705 6707 6708
+3  6709 2027 2073
+3  6710 6711 4830
+3  5586 6056 1802
+3  6712 6713 6714
+3  6713 6654 6714
+3  4938 2912 2914
+3  6715 4974 6716
+3  6717 3900 6718
+3  6719 4916 6720
+3  2535 2537 6721
+3  2349 2348 4666
+3  4576 6722 6723
+3  6724 6725 6208
+3  6726 1721 6727
+3  6728 6729 6730
+3  6731 1677 6732
+3  6733 4222 4224
+3  3938 6734 752
+3  2080 2079 6735
+3  6736 6735 2079
+3  6737 6738 6739
+3  6740 6738 6737
+3  657 3302 6741
+3  6742 6743 6744
+3  2668 2670 6745
+3  6746 3801 6747
+3  6748 6749 5900
+3  6750 6751 6752
+3  5452 6710 6753
+3  3216 4865 6754
+3  4247 6755 6756
+3  2322 6757 2320
+3  6758 2477 3474
+3  6759 721 6760
+3  6761 6762 6632
+3  3762 5687 5689
+3  3762 5689 6763
+3  6764 6765 6766
+3  6767 6765 6764
+3  6768 6769 6770
+3  6771 6772 1340
+3  6773 6774 6775
+3  6776 6777 6778
+3  6407 1941 6779
+3  862 864 6622
+3  2244 1388 6780
+3  164 6394 1641
+3  1454 6781 1455
+3  6782 3618 3617
+3  6782 4791 3618
+3  6783 6784 6785
+3  6786 6783 6785
+3  6787 6788 3370
+3  6789 6790 6791
+3  765 6792 6793
+3  6794 6795 6124
+3  6796 6797 6798
+3  6114 2345 6115
+3  6799 6800 5317
+3  4392 1059 1062
+3  4392 1062 6801
+3  6802 3592 3591
+3  6803 6804 6805
+3  3112 6806 6807
+3  3113 6806 3112
+3  6808 6809 6810
+3  6811 6812 4960
+3  4958 4960 6812
+3  6813 6814 6815
+3  2041 6816 2044
+3  2844 6817 6818
+3  1276 5157 6819
+3  6820 6821 6822
+3  2270 6823 6824
+3  1577 6823 2270
+3  357 6825 358
+3  6035 6826 6827
+3  496 6828 6829
+3  6830 6831 6832
+3  513 5930 6833
+3  4741 6834 6835
+3  6836 531 6837
+3  4854 1630 5177
+3  6838 6839 6840
+3  5580 6841 6842
+3  28 6843 6844
+3  6845 1459 1907
+3  6846 6845 1907
+3  1921 6847 523
+3  6848 6849 6850
+3  6851 6852 6853
+3  6854 728 6855
+3  6854 6856 728
+3  6857 6858 6859
+3  6860 2094 2096
+3  3703 1778 6861
+3  208 4080 4081
+3  6862 3936 1149
+3  6862 1149 1146
+3  6863 1028 6864
+3  1819 1821 113
+3  6295 6865 6866
+3  6867 4468 6868
+3  4469 4468 6867
+3  6869 4954 4957
+3  6869 4957 6870
+3  6871 3391 6872
+3  6873 6874 6875
+3  6873 6876 6874
+3  2584 2583 6228
+3  6877 6878 4277
+3  6879 6880 6881
+3  6882 6879 6881
+3  6883 1631 5570
+3  224 6884 225
+3  6885 5595 5594
+3  4891 6886 6887
+3  6888 6889 6890
+3  6891 6888 6890
+3  6410 6409 6892
+3  2537 6892 6409
+3  3892 6893 6894
+3  6895 6896 6897
+3  6898 6899 6900
+3  6901 6902 6903
+3  6904 6902 6901
+3  6905 1358 189
+3  5812 5814 6906
+3  6907 6908 6909
+3  1523 5118 5120
+3  477 6910 1168
+3  6911 6912 6913
+3  6914 6915 6916
+3  6917 6918 4091
+3  6300 6919 6301
+3  6920 6921 6922
+3  6923 6924 6925
+3  6926 4337 4336
+3  6927 6928 619
+3  3688 619 6928
+3  6619 3322 6929
+3  6930 6929 3322
+3  6931 3309 6282
+3  6931 6932 3309
+3  6933 6934 6935
+3  6936 5693 3247
+3  3247 5693 4197
+3  6937 6938 6939
+3  6937 6940 6938
+3  66 6941 6942
+3  6943 6031 6033
+3  6944 5114 6945
+3  6946 6891 6890
+3  6947 6948 6949
+3  5571 6950 6951
+3  96 6952 6953
+3  6954 6955 6956
+3  6957 6958 6959
+3  6960 6961 2553
+3  2576 2575 6962
+3  6963 6964 6965
+3  6010 5983 1287
+3  6966 1389 6967
+3  6968 949 6969
+3  3846 4365 6970
+3  6971 6972 6973
+3  778 6971 6973
+3  6974 4512 6975
+3  6976 6977 6978
+3  6976 6978 5663
+3  6979 6870 6980
+3  6979 6980 6981
+3  4540 6982 3119
+3  4540 6983 6982
+3  6984 5335 6985
+3  3377 4637 4636
+3  6986 6987 6988
+3  6989 6990 6991
+3  3748 6992 6993
+3  6994 3778 3780
+3  6995 6996 6997
+3  6998 6999 7000
+3  4236 450 449
+3  6656 7001 7002
+3  7003 4120 2210
+3  7004 7005 7006
+3  7007 7008 5762
+3  6058 7009 3135
+3  7010 7011 7012
+3  464 7013 7014
+3  7009 7015 3135
+3  7016 7017 7018
+3  7019 7020 2118
+3  7021 7022 7023
+3  7024 7025 7026
+3  4489 7027 4709
+3  3718 3733 4762
+3  7028 6140 7029
+3  7030 7031 7032
+3  1241 6443 1242
+3  6836 6837 2623
+3  7033 7034 7035
+3  7036 4887 4886
+3  7037 6675 6674
+3  379 7037 6674
+3  1882 1881 4789
+3  7038 6555 6558
+3  7038 7039 6555
+3  2140 2141 5517
+3  7040 7041 7042
+3  6625 7042 7041
+3  7043 7044 7045
+3  7046 7047 7048
+3  7049 6876 4343
+3  7050 2056 6413
+3  2468 6413 2056
+3  7051 7052 7053
+3  7054 7055 7056
+3  7057 7058 6610
+3  7059 7060 883
+3  6992 7061 7062
+3  7063 7064 7065
+3  7066 7067 7068
+3  7069 1847 7070
+3  7071 7072 7073
+3  7074 7072 7071
+3  7075 7076 7077
+3  7078 1346 7079
+3  7080 7081 7082
+3  7083 4917 7084
+3  342 7085 7086
+3  6896 5790 6897
+3  6481 7087 2330
+3  7088 7089 819
+3  7090 7091 7092
+3  1965 7091 7093
+3  7094 7095 5591
+3  5788 7094 5591
+3  7096 7097 7098
+3  7099 7096 7098
+3  2797 2799 7100
+3  4591 7101 7102
+3  4591 7103 7101
+3  7104 2521 2520
+3  15 14 7105
+3  7106 7107 7108
+3  7109 6667 7110
+3  7111 7109 7110
+3  7112 251 7113
+3  7114 7115 1119
+3  2998 3000 1489
+3  3868 3283 3282
+3  3868 3631 3283
+3  3124 7116 7117
+3  4556 7118 4557
+3  2418 5785 2416
+3  7119 7120 7121
+3  7122 7119 7121
+3  1927 7123 6101
+3  7124 7125 7126
+3  1830 7127 7128
+3  7129 5454 7130
+3  7131 664 7132
+3  3621 4533 7133
+3  3621 7133 7134
+3  7135 5640 7136
+3  7137 5472 7138
+3  860 859 5331
+3  7139 7140 7141
+3  7142 7143 7144
+3  7145 7146 7147
+3  7148 7145 7147
+3  1838 6517 7149
+3  7150 6141 6374
+3  6156 7151 6157
+3  2663 914 4035
+3  5633 5632 7152
+3  4643 7153 4644
+3  6696 7154 7155
+3  7156 7157 7158
+3  7156 7159 7157
+3  7160 2153 7161
+3  7162 2551 2553
+3  7162 2553 6961
+3  1018 7163 2083
+3  7164 7165 7166
+3  7167 7168 1899
+3  1896 7167 1899
+3  7169 7170 7171
+3  2558 3298 3300
+3  1896 7172 7173
+3  7174 5621 7175
+3  7176 3239 7177
+3  7178 7179 7009
+3  6159 4756 7180
+3  4645 4647 7181
+3  7182 7183 4510
+3  7184 7185 7186
+3  545 7187 7188
+3  545 7189 7187
+3  7190 4425 7191
+3  7192 7193 3236
+3  7194 7195 2652
+3  2653 2652 7195
+3  7196 6175 6174
+3  7197 7198 5836
+3  7197 5836 7199
+3  7200 4251 7201
+3  7200 7201 7202
+3  7203 7125 7124
+3  7204 7205 6947
+3  7206 1905 7207
+3  3020 3311 3310
+3  7208 2573 7209
+3  5828 1300 7210
+3  5828 1301 1300
+3  7211 7212 7213
+3  7214 5085 7215
+3  3368 174 3197
+3  6514 7216 7217
+3  7218 7219 7220
+3  7221 5855 5854
+3  7222 7223 7224
+3  2006 4537 1220
+3  7225 6020 7226
+3  7116 2342 2344
+3  7227 7228 7229
+3  7230 7227 7229
+3  7231 7232 5495
+3  7231 5495 7233
+3  5592 2795 7234
+3  7235 7236 3115
+3  7237 7238 7239
+3  7240 7239 7238
+3  3233 3235 1920
+3  6570 7241 7242
+3  1333 1332 2947
+3  6366 4010 7243
+3  7244 5578 7245
+3  6135 3005 3004
+3  6888 5493 5491
+3  7246 7247 7248
+3  7249 3828 7250
+3  3594 7251 7252
+3  7253 7254 7255
+3  4808 7256 2035
+3  4184 7257 4185
+3  7258 4185 7257
+3  5116 2369 7259
+3  7260 4886 4888
+3  7261 4265 4266
+3  1227 7262 4448
+3  7263 3557 7264
+3  7265 7266 7267
+3  4582 933 58
+3  2822 2821 4858
+3  7268 7269 7270
+3  7271 3884 6127
+3  7272 7271 6127
+3  7273 7274 7275
+3  7273 7275 7276
+3  4166 7277 4167
+3  7278 5534 5533
+3  7279 4976 4975
+3  7280 7281 7282
+3  7283 6518 1464
+3  367 7284 368
+3  2544 4298 2442
+3  6592 7285 6593
+3  7286 4405 895
+3  7287 7288 7289
+3  7290 7291 7292
+3  7079 7290 7292
+3  7293 7294 5171
+3  7295 7296 7297
+3  7295 7297 7298
+3  539 1827 7299
+3  6906 5814 4662
+3  7300 7301 7302
+3  7303 7301 7300
+3  7304 7305 7306
+3  7304 7306 7307
+3  7308 6237 7309
+3  7308 7310 6237
+3  7311 7312 7313
+3  7314 7315 7316
+3  7317 7318 7319
+3  7320 1919 1918
+3  7321 1886 1885
+3  7322 7323 7324
+3  7322 7325 7323
+3  2239 4525 4527
+3  4502 4504 7326
+3  4746 4748 7327
+3  3007 7327 4748
+3  2093 7328 7329
+3  6502 7330 7331
+3  7332 4844 7333
+3  7334 7335 7336
+3  321 7336 7335
+3  7337 7338 7339
+3  5711 7340 7341
+3  2497 2499 7342
+3  7343 7344 7345
+3  7343 7345 7346
+3  3946 3943 2292
+3  2356 2355 4722
+3  7347 7348 7349
+3  7350 7349 7348
+3  5512 5514 3157
+3  7351 7352 7353
+3  7354 77 79
+3  7354 79 7355
+3  6319 950 7356
+3  7357 7358 181
+3  1406 6103 1407
+3  1844 1838 1837
+3  7359 7360 1434
+3  7361 2922 659
+3  4893 7362 4894
+3  7363 342 7086
+3  7364 7365 2149
+3  7366 7367 4436
+3  7368 7369 7370
+3  5257 2469 7371
+3  5344 5283 7372
+3  7373 7374 7375
+3  7376 7377 7378
+3  5742 7379 7380
+3  5999 7381 7382
+3  7383 6019 6018
+3  4367 3436 3435
+3  1236 1789 2407
+3  6050 7384 7385
+3  5684 7385 7384
+3  7386 5096 5098
+3  6451 7387 7388
+3  281 4969 1653
+3  4107 7389 4108
+3  7390 3327 7266
+3  7391 7392 7393
+3  7394 7395 5550
+3  5904 1122 1121
+3  7396 3363 7397
+3  1687 7398 7399
+3  7400 7401 7402
+3  7403 1381 7404
+3  2714 7405 3963
+3  7406 7407 5771
+3  7408 3065 3067
+3  7409 7410 4327
+3  4325 4327 7410
+3  7411 7412 7413
+3  7414 7412 7411
+3  7415 7416 5021
+3  7417 7418 7419
+3  7420 7421 7422
+3  1354 7423 1355
+3  7424 976 978
+3  7425 4363 4362
+3  7426 7427 4570
+3  7426 4570 7428
+3  7416 5022 5021
+3  5932 7429 5020
+3  7430 716 7431
+3  7432 7430 7431
+3  751 4813 752
+3  6850 7433 7434
+3  6388 5732 1218
+3  7435 7436 7
+3  3958 7437 3185
+3  7438 7439 7077
+3  7440 7441 5823
+3  7442 3903 3451
+3  2977 7443 7444
+3  5443 7445 2149
+3  7446 3479 7447
+3  7448 7449 7450
+3  7451 7452 7453
+3  7451 3981 7452
+3  4709 7454 279
+3  1869 7455 1870
+3  7456 3053 6036
+3  7457 7456 6036
+3  2477 7458 7459
+3  4790 540 539
+3  4790 539 7460
+3  4232 2235 2234
+3  7461 4232 2234
+3  5928 5927 7462
+3  7463 2228 7464
+3  7465 2228 7463
+3  3102 3534 7466
+3  7467 889 888
+3  7468 7469 7470
+3  7471 5216 7472
+3  7473 4889 7474
+3  7475 7476 7477
+3  3377 4874 7478
+3  7479 7480 7481
+3  3984 7482 7483
+3  7484 7485 7486
+3  5650 6698 7487
+3  7488 4542 579
+3  7033 7489 7490
+3  7007 7491 7008
+3  7492 7493 7494
+3  2039 7495 2040
+3  7496 7497 7498
+3  7499 7498 7497
+3  7500 7501 7502
+3  7500 7502 7503
+3  7504 7505 5812
+3  6863 6864 7506
+3  7216 7507 7508
+3  7509 7510 7511
+3  7512 6299 6301
+3  7513 7512 6301
+3  7514 7515 7516
+3  7517 7515 7514
+3  7518 7519 7520
+3  7521 7519 7518
+3  3454 7522 7523
+3  7524 7525 7526
+3  366 7527 3400
+3  7528 5537 7529
+3  7528 7530 5537
+3  7531 7532 7533
+3  7534 1220 1222
+3  5563 7535 7536
+3  7537 7538 7539
+3  7540 7541 7542
+3  7543 7544 7545
+3  7543 7545 7546
+3  7547 7548 7549
+3  7550 4129 7551
+3  4130 4129 7550
+3  7552 7553 7554
+3  7555 7556 7557
+3  7558 7559 7560
+3  4934 4936 7561
+3  7562 4740 7563
+3  7564 7563 4740
+3  7565 7566 7567
+3  2001 7568 7569
+3  2581 6447 2582
+3  5456 5455 4938
+3  7570 7571 86
+3  7043 7572 7044
+3  7573 7574 7575
+3  7576 7577 7559
+3  7578 7579 7580
+3  5644 5646 615
+3  3856 7581 7482
+3  4394 7582 7583
+3  4393 7582 4394
+3  7584 4345 7585
+3  7586 7576 7558
+3  7587 7588 7589
+3  854 5563 3326
+3  7590 2171 2170
+3  3032 7591 7592
+3  7593 4704 4703
+3  7594 7595 4885
+3  3840 7596 3838
+3  4745 5036 7597
+3  4488 7598 4489
+3  4280 4282 7599
+3  7600 5053 7601
+3  7600 7602 5053
+3  7603 7604 7605
+3  7606 7607 796
+3  7608 7609 7610
+3  7611 7612 7613
+3  6581 6699 2950
+3  7614 7615 7616
+3  248 7617 636
+3  297 296 3459
+3  7618 7619 7620
+3  4050 7621 1314
+3  2549 7622 4325
+3  1559 2534 7623
+3  7624 385 384
+3  5322 7625 919
+3  3715 3714 4500
+3  7626 3715 4500
+3  3542 7627 2868
+3  7628 3529 3531
+3  7629 6761 6632
+3  4559 7630 60
+3  5196 6914 6916
+3  7631 7632 7633
+3  7634 7635 7636
+3  7616 7637 3872
+3  1089 7638 1090
+3  5048 3090 7639
+3  7640 7639 3090
+3  7641 7642 7643
+3  7641 7643 7644
+3  7645 1746 7646
+3  7647 7648 2485
+3  7649 4021 5237
+3  5484 5483 7650
+3  7651 7652 7653
+3  7654 7655 5404
+3  3251 3250 5897
+3  7656 7657 271
+3  7658 7659 7660
+3  7658 7660 7661
+3  2318 4941 2319
+3  7662 7663 7664
+3  2402 7665 2403
+3  7666 7667 3660
+3  7668 3269 7667
+3  7669 5034 7670
+3  5830 2274 2277
+3  7671 7672 7673
+3  6362 381 383
+3  6362 383 3131
+3  1361 7459 7674
+3  7675 2782 891
+3  5390 6796 5388
+3  3330 5820 7676
+3  7677 5820 3330
+3  4755 7678 7679
+3  7680 1196 3932
+3  3933 3932 1196
+3  1408 1407 6104
+3  7681 5594 7682
+3  7681 7683 5594
+3  7684 7685 7686
+3  7687 7686 7685
+3  7688 7689 7690
+3  7691 7692 4056
+3  1290 7691 4056
+3  5600 7693 7694
+3  7695 7696 7697
+3  7698 7696 7695
+3  1995 7699 7700
+3  1995 7700 7701
+3  7702 7703 7704
+3  7702 7704 7705
+3  7706 7707 7708
+3  3558 7709 7710
+3  2776 1758 3803
+3  7711 7712 7713
+3  5325 7714 7715
+3  5325 7716 7714
+3  7717 7718 7719
+3  7717 7719 7720
+3  7721 7722 7723
+3  6848 1502 7724
+3  7725 7726 7324
+3  4537 7727 5413
+3  4537 5413 4535
+3  196 7728 5392
+3  196 198 7728
+3  6131 4193 7729
+3  7730 7731 727
+3  7731 1979 727
+3  7732 7733 7734
+3  6441 7735 7736
+3  6441 7736 6442
+3  717 716 7430
+3  7737 7738 4560
+3  7739 7740 7741
+3  5128 3044 5129
+3  7742 7743 7744
+3  7745 7746 1811
+3  2656 7747 2657
+3  7748 7749 7750
+3  2774 7751 2775
+3  3692 4369 642
+3  4481 4994 4479
+3  7752 6132 7753
+3  6266 7754 7755
+3  7756 5114 3910
+3  5843 7757 6644
+3  6889 7758 7759
+3  7760 7759 7758
+3  1948 4005 7761
+3  1628 7762 1629
+3  2944 3215 2945
+3  7370 7369 7763
+3  5031 2360 7764
+3  5900 1832 5901
+3  7765 3230 7766
+3  2064 4922 4389
+3  7767 6958 5009
+3  6957 5009 6958
+3  1118 7768 6373
+3  6435 2624 6837
+3  7769 7770 7771
+3  7772 6195 7773
+3  2662 7774 2660
+3  2662 7775 7774
+3  7776 6083 7777
+3  4305 4307 7778
+3  7779 7780 7781
+3  1818 1817 5557
+3  7782 7783 7784
+3  4144 2086 5194
+3  4275 1762 1765
+3  7785 44 7786
+3  7787 6002 7788
+3  567 399 398
+3  7789 567 398
+3  7790 7791 7792
+3  7793 7491 771
+3  7794 7795 7796
+3  5409 7795 7794
+3  1282 7797 1283
+3  1282 7798 7797
+3  7799 1235 7800
+3  7801 7802 7803
+3  7804 7803 7802
+3  1957 1468 1471
+3  7805 7806 7807
+3  7808 5582 7809
+3  1338 1340 6772
+3  4906 7810 7811
+3  7812 7810 4906
+3  7813 1315 7814
+3  7815 4924 5711
+3  7816 7817 7818
+3  7819 7820 7821
+3  7822 7823 7824
+3  4813 6198 6200
+3  7825 7826 7827
+3  5098 5097 7828
+3  3074 6802 7829
+3  7830 3074 7829
+3  7831 7832 7833
+3  7834 7835 7836
+3  7834 7836 7837
+3  1475 6152 7838
+3  1665 7839 3214
+3  7062 7061 2765
+3  7840 6109 7841
+3  2890 4819 2755
+3  7842 7843 4237
+3  7844 4237 7843
+3  7845 3606 7846
+3  7845 7846 1815
+3  7847 3591 199
+3  7847 6802 3591
+3  7848 4601 4600
+3  3027 3026 7849
+3  229 6601 2461
+3  7850 7646 7851
+3  164 1641 7852
+3  7853 7854 3246
+3  5390 5389 7855
+3  5444 7856 7857
+3  7858 7859 2109
+3  1835 1834 7860
+3  5669 3794 7861
+3  1031 7861 3794
+3  4999 172 174
+3  6690 7862 7863
+3  7864 7865 6661
+3  5354 5353 7866
+3  7867 7868 5798
+3  3583 3585 4923
+3  4226 3520 3522
+3  7869 293 7870
+3  6531 4994 4481
+3  1580 3281 7871
+3  130 7872 7873
+3  2113 7874 7875
+3  7241 6570 59
+3  6444 7876 2676
+3  7877 577 4543
+3  1642 7878 7879
+3  6720 7880 1480
+3  4174 4175 6077
+3  4174 6077 1427
+3  6354 6353 7881
+3  7882 7883 7884
+3  1535 1268 7885
+3  7886 7887 7888
+3  7889 7890 7891
+3  7892 4972 7893
+3  7892 7894 4972
+3  5336 7895 7896
+3  7897 7898 7899
+3  7900 7899 7898
+3  7901 7902 7903
+3  2886 7901 7903
+3  7904 7519 7905
+3  7904 7906 7519
+3  7689 7907 6405
+3  2944 7908 944
+3  1691 7909 1692
+3  7910 708 707
+3  7911 7912 7652
+3  6475 565 7303
+3  1762 7913 1763
+3  7914 7915 7656
+3  6245 7916 7917
+3  7918 6536 2387
+3  7918 2387 7919
+3  7920 7921 7922
+3  3535 7923 3536
+3  7924 4477 7925
+3  2691 2693 7926
+3  7927 7928 7929
+3  7930 7931 7932
+3  7933 6712 7934
+3  7935 7936 7937
+3  5924 2318 2317
+3  7938 7939 7940
+3  7941 7939 7938
+3  7942 7943 7944
+3  5928 7462 7945
+3  488 7805 7946
+3  7947 1628 7948
+3  1449 7949 7950
+3  4973 7951 7952
+3  662 1787 7953
+3  662 1784 1787
+3  7327 3007 7954
+3  7955 7956 7957
+3  2094 7958 7959
+3  7960 7961 7440
+3  7962 7963 7964
+3  7962 4127 7963
+3  6768 7965 3432
+3  3406 7966 3407
+3  7967 7968 7969
+3  7970 7971 7972
+3  7973 6520 6521
+3  3693 4770 3303
+3  7974 7047 7975
+3  7976 6495 5861
+3  7844 7977 7978
+3  2333 7979 7980
+3  2333 7980 7981
+3  7982 7734 7983
+3  7984 7985 3110
+3  7986 7987 4378
+3  2246 6967 1388
+3  7988 7082 7989
+3  7988 7989 7990
+3  1190 1834 1571
+3  7991 707 709
+3  7992 7993 7994
+3  7995 7996 6950
+3  5571 7995 6950
+3  7997 7793 771
+3  2800 4878 7998
+3  655 2491 2494
+3  1704 1703 7999
+3  8000 8001 8002
+3  8003 8004 8005
+3  989 988 3576
+3  8006 6862 1146
+3  8006 1146 8007
+3  8008 955 8009
+3  7409 8010 7410
+3  8011 7410 8010
+3  7307 6274 6273
+3  4287 8012 4288
+3  8013 4288 8012
+3  8014 342 7363
+3  5541 900 5542
+3  9 2959 6671
+3  7529 8015 8016
+3  8017 8015 7529
+3  4171 6634 8018
+3  7928 4754 4753
+3  8019 8020 8021
+3  5570 869 868
+3  6499 8022 8023
+3  6498 8022 6499
+3  8024 8025 6505
+3  8026 5188 461
+3  8027 1194 8028
+3  8029 7245 1525
+3  8030 8031 8032
+3  5736 5000 1241
+3  2303 8033 8034
+3  306 8035 8036
+3  8037 3810 6286
+3  2331 7087 4987
+3  6608 8038 2743
+3  460 462 8039
+3  8040 8041 8042
+3  2949 8043 2532
+3  8044 8045 6244
+3  8044 8046 8045
+3  8047 8048 7896
+3  8049 8050 8051
+3  4431 4430 3269
+3  479 8052 8053
+3  479 481 8052
+3  8054 1514 8055
+3  6643 8056 8057
+3  8058 8059 8060
+3  8061 8060 8059
+3  6625 7041 8062
+3  6076 8063 2341
+3  6076 2341 2338
+3  1186 8064 8065
+3  7971 8065 8064
+3  6152 6154 7838
+3  8066 2724 6832
+3  5204 8067 8068
+3  8069 8070 7589
+3  8071 8072 8073
+3  4333 4356 8074
+3  8075 2590 2592
+3  8076 6997 8077
+3  4021 7649 5685
+3  2269 5177 8078
+3  8079 8080 8081
+3  640 4730 639
+3  8082 16 18
+3  6701 4145 2414
+3  4145 3272 2414
+3  7112 252 251
+3  3252 252 7112
+3  8083 8084 205
+3  8085 3326 5564
+3  7658 8086 8087
+3  8088 2167 5439
+3  6821 6820 372
+3  6821 372 373
+3  8089 8090 7141
+3  7965 7408 3432
+3  8091 8092 7603
+3  5153 991 4463
+3  558 7764 2360
+3  8093 4797 6572
+3  8093 8094 4797
+3  5411 8095 8096
+3  8097 4947 4948
+3  804 8097 4948
+3  6761 8098 6762
+3  6515 6516 8041
+3  3246 3245 8099
+3  8100 8101 8102
+3  3682 2432 8103
+3  2431 8103 2432
+3  7789 398 8104
+3  8105 7789 8104
+3  5521 4846 1342
+3  397 8106 396
+3  8107 8108 8109
+3  8110 8107 8109
+3  1992 1993 1614
+3  4104 4688 8111
+3  92 8112 90
+3  380 379 6674
+3  6860 8113 7958
+3  53 6486 8114
+3  8115 8116 8117
+3  8118 8119 1434
+3  8120 8121 8122
+3  8123 5374 8083
+3  8124 8125 8126
+3  8124 8126 233
+3  8127 8128 1428
+3  7559 8129 7560
+3  8130 6451 570
+3  8131 3262 2849
+3  3913 5119 8132
+3  4611 8133 1797
+3  8134 8135 8136
+3  1965 7093 7656
+3  7062 2764 8137
+3  8138 900 902
+3  1046 2819 8139
+3  1047 2819 1046
+3  760 1903 8140
+3  8141 341 340
+3  8142 8141 340
+3  8143 3646 8144
+3  527 8143 8144
+3  3440 6176 8145
+3  6822 5658 5660
+3  8146 8147 2268
+3  8148 1493 6279
+3  8149 8150 8151
+3  8149 8151 8152
+3  8153 8154 346
+3  8155 8156 8157
+3  5925 2317 1691
+3  8158 5957 8159
+3  8160 8158 8159
+3  8161 8162 8163
+3  8164 8165 8166
+3  8167 8168 1215
+3  4103 501 4101
+3  18 17 6034
+3  7224 8169 4407
+3  7860 8170 8171
+3  7921 8172 7593
+3  8173 5319 8174
+3  8175 8176 7829
+3  8177 8178 8179
+3  5670 8180 1852
+3  6123 8181 4702
+3  5322 731 733
+3  8182 6663 6664
+3  1261 8183 8184
+3  5391 8185 5392
+3  7170 8186 7171
+3  6448 6447 8187
+3  2982 3746 8188
+3  8189 8190 8191
+3  8192 8191 8190
+3  8193 8010 7409
+3  3553 8194 8195
+3  7937 8196 7935
+3  8197 5575 2367
+3  8198 8199 8200
+3  5223 1531 5224
+3  7111 8201 8202
+3  8203 4370 8204
+3  8205 8206 6731
+3  8207 8208 8209
+3  8043 2949 8210
+3  2442 4298 2443
+3  8211 8212 8213
+3  857 856 4952
+3  8214 586 585
+3  8215 8214 585
+3  4120 8216 4122
+3  7251 3594 3592
+3  8217 8218 8219
+3  8220 8221 3187
+3  8222 8223 3875
+3  8219 8218 8224
+3  3655 5183 8225
+3  6376 7106 6374
+3  7303 7300 8226
+3  8227 7617 248
+3  6397 8228 6177
+3  6038 8229 8230
+3  6038 8230 6039
+3  2923 7129 8231
+3  8232 8233 8234
+3  8235 8236 3468
+3  6011 8237 8238
+3  8239 8240 8241
+3  8239 8241 698
+3  8242 7783 7782
+3  2043 8243 8244
+3  2790 8245 8246
+3  8247 4163 8248
+3  8249 8250 112
+3  8251 8250 8249
+3  4223 8252 4224
+3  7741 8253 7739
+3  7202 7201 8254
+3  8255 8256 3261
+3  8257 6742 8258
+3  8078 1629 7762
+3  6384 4753 7679
+3  3459 296 5969
+3  7322 8259 7325
+3  8260 8261 7432
+3  7431 8260 7432
+3  7967 7969 8262
+3  3571 3434 5087
+3  8263 8264 5754
+3  8265 8266 8267
+3  4352 5078 3711
+3  8268 5078 4352
+3  5530 8269 2805
+3  8270 8271 5195
+3  8270 5195 8272
+3  8273 8274 4152
+3  2177 8275 8276
+3  8277 4633 8278
+3  8279 5509 8280
+3  8281 8279 8280
+3  8282 8283 8284
+3  8285 5041 5040
+3  5423 8286 5424
+3  8169 8287 4407
+3  3807 8288 4610
+3  5711 4926 7340
+3  3701 3703 7364
+3  8289 8290 8291
+3  8289 8291 8292
+3  1343 8293 8294
+3  1343 8294 8295
+3  2761 5842 8296
+3  8297 8298 8299
+3  8300 2739 2741
+3  8301 7020 3785
+3  8302 8303 8304
+3  8302 5469 8303
+3  8305 8306 8307
+3  8308 1793 8309
+3  2791 8310 279
+3  8311 8312 4249
+3  7784 7816 8313
+3  3684 3686 8314
+3  5 4 1725
+3  5 1725 1723
+3  8315 8316 8317
+3  8315 8317 1255
+3  8318 1176 8319
+3  4915 8320 4916
+3  8321 3860 8322
+3  8323 8321 8322
+3  7600 3795 3797
+3  3039 343 345
+3  905 904 4106
+3  8324 8325 8326
+3  904 8327 4106
+3  1156 8328 4841
+3  3558 3406 3408
+3  8329 8330 8331
+3  8332 8333 8334
+3  8332 8334 8335
+3  3498 3500 5579
+3  8336 8337 5675
+3  8338 1857 7771
+3  1859 7771 1857
+3  8339 8340 8341
+3  8342 8343 8344
+3  8342 8345 8343
+3  6598 6600 8346
+3  4457 7225 1023
+3  7180 5186 8347
+3  8348 5671 8349
+3  710 712 7183
+3  5645 4581 8350
+3  7221 8351 865
+3  4769 7936 7935
+3  8352 8353 2949
+3  1995 1998 7699
+3  1612 1611 8354
+3  1612 8354 8355
+3  8356 5847 5846
+3  151 150 8357
+3  7925 2674 604
+3  1904 8358 8359
+3  4756 5993 7180
+3  8340 8360 1109
+3  6828 1834 1189
+3  6828 8170 1834
+3  6573 8361 8362
+3  8363 8364 8365
+3  7629 6219 6761
+3  8366 8367 8368
+3  8369 8370 8371
+3  8372 8370 8369
+3  2440 8373 8374
+3  3393 8375 8376
+3  8377 8378 3210
+3  8379 2654 4786
+3  8379 4786 4874
+3  1399 8380 8381
+3  5534 8382 670
+3  534 533 7244
+3  8383 8384 8385
+3  5445 5444 7857
+3  7365 7856 5444
+3  8049 6689 6688
+3  8386 8387 8388
+3  8386 8388 8389
+3  8390 8391 1057
+3  4822 8392 4823
+3  4101 8393 8394
+3  5906 8395 8389
+3  8396 8397 8398
+3  2260 8399 8400
+3  8401 4119 8402
+3  8401 8402 8403
+3  8404 8405 1063
+3  8406 8407 8408
+3  8406 8409 8407
+3  3789 441 440
+3  2502 303 8410
+3  3437 3279 3278
+3  8411 8412 8413
+3  735 5737 5738
+3  4274 8414 4153
+3  1699 8415 1700
+3  8416 8417 8418
+3  8419 8420 8421
+3  8422 8423 8424
+3  8425 8424 8423
+3  3007 4748 3008
+3  8426 8427 8428
+3  8429 8427 8426
+3  527 2027 6709
+3  8430 8431 4808
+3  3553 3552 3342
+3  3553 3342 3344
+3  1240 1242 8432
+3  8433 8434 2507
+3  2353 8435 8436
+3  3020 202 204
+3  8437 7922 8438
+3  5593 8439 1816
+3  7050 8440 2056
+3  7050 8441 8440
+3  8442 8443 8444
+3  8442 8444 8445
+3  8446 8447 7663
+3  8448 3875 8449
+3  7598 7027 4489
+3  5678 5677 8450
+3  8451 8452 2784
+3  8453 8454 3469
+3  5182 8455 7914
+3  8456 5710 5709
+3  4539 8457 8458
+3  8459 8460 7489
+3  8074 4418 4417
+3  6489 6491 7241
+3  8461 2315 8462
+3  2265 1497 414
+3  6784 6783 8463
+3  2508 6784 8463
+3  8464 4508 7034
+3  7609 7608 5780
+3  7310 6238 6237
+3  8465 5457 5459
+3  8466 8467 6284
+3  3233 8466 6284
+3  3827 415 8468
+3  8469 6266 7755
+3  5505 8470 8471
+3  5505 8471 5504
+3  8472 8473 8474
+3  8475 5529 8476
+3  8477 6707 8478
+3  6706 8478 6707
+3  2376 8479 2374
+3  8480 2821 8481
+3  8482 1164 8483
+3  8482 8483 8484
+3  5003 8485 8486
+3  8487 1712 8488
+3  8489 5476 8490
+3  8491 2579 4825
+3  2355 3069 4722
+3  436 8492 8493
+3  8494 8495 8496
+3  8458 8497 8498
+3  8499 8498 8497
+3  7247 8500 8501
+3  8502 8503 8504
+3  8505 8506 7798
+3  7798 8506 8507
+3  8508 7692 3011
+3  8509 8510 8511
+3  8512 8175 7829
+3  3357 8513 3358
+3  8514 5945 4605
+3  2246 8515 6967
+3  8516 8517 8518
+3  8516 8518 8519
+3  5816 7465 7463
+3  8520 7465 5816
+3  1200 8521 8522
+3  8523 8524 7346
+3  8523 7346 8525
+3  8526 8527 8161
+3  8528 8529 4516
+3  8530 723 8531
+3  6142 8532 8533
+3  8534 8535 2858
+3  2855 2858 8535
+3  8536 8537 6427
+3  8538 8539 3270
+3  8540 8541 8542
+3  8543 8541 8540
+3  8544 4405 8545
+3  8546 8547 5879
+3  8546 5879 8548
+3  8549 8550 8551
+3  5087 5089 3609
+3  8552 8553 8554
+3  1728 1727 6659
+3  3957 5001 7437
+3  346 8555 8153
+3  343 8555 346
+3  8556 2605 8557
+3  8558 6197 8559
+3  8560 8561 8562
+3  8560 8562 1114
+3  8563 8564 1044
+3  1370 1657 1371
+3  8565 1657 1370
+3  975 8566 8567
+3  8568 8569 3922
+3  6278 4583 57
+3  8570 2894 2896
+3  7405 8571 2359
+3  8572 8573 8574
+3  8575 8576 8577
+3  8578 2453 8124
+3  8579 8580 8581
+3  8582 6656 7002
+3  4926 2110 7340
+3  4476 8583 3586
+3  8584 6912 8585
+3  7833 7832 8586
+3  8587 659 658
+3  769 768 8588
+3  769 8588 2772
+3  8352 2949 2948
+3  4961 1558 8589
+3  8590 8591 2711
+3  8590 8592 8591
+3  7494 4168 1007
+3  6388 8593 6389
+3  8594 8595 4850
+3  8594 4850 520
+3  7964 8596 5873
+3  8597 8598 5627
+3  1206 1622 1621
+3  7763 7369 8599
+3  459 446 448
+3  6720 270 6719
+3  8600 4160 8601
+3  8602 8603 5192
+3  8604 7939 8605
+3  8606 1984 1983
+3  8607 6165 6167
+3  8608 8609 7099
+3  5823 3779 7440
+3  7784 8610 7817
+3  8611 1037 3737
+3  4631 4630 8612
+3  8613 1217 8220
+3  8614 8615 8616
+3  8617 4945 4420
+3  8618 8617 4420
+3  1519 274 133
+3  636 7617 637
+3  8619 8620 8286
+3  1743 8621 8622
+3  8623 8624 8275
+3  3568 8625 8626
+3  6341 5191 80
+3  1103 5191 6341
+3  8627 8628 8629
+3  8627 8629 8630
+3  8631 8632 8633
+3  8264 5755 5754
+3  3392 5890 5074
+3  3392 3391 5890
+3  8452 8634 8635
+3  2784 8452 8635
+3  8636 8583 4476
+3  237 1483 3189
+3  7873 8637 8638
+3  998 3497 8639
+3  1328 5525 8640
+3  8641 8642 441
+3  403 8643 8644
+3  8645 8090 8646
+3  8647 5150 8648
+3  8649 5150 8647
+3  4062 8650 8651
+3  7707 6726 7708
+3  1658 8652 8653
+3  6608 8654 8038
+3  8655 8654 6608
+3  6888 5491 6703
+3  2020 2019 8656
+3  8657 2711 2710
+3  8657 8590 2711
+3  8658 8659 8660
+3  4098 8658 8660
+3  8661 8662 6263
+3  5596 5595 8663
+3  3093 3092 8664
+3  7248 7247 8501
+3  8665 7248 8501
+3  8666 8667 8668
+3  8669 5887 2284
+3  837 2284 5887
+3  8670 7124 7126
+3  584 8671 8672
+3  3861 584 8672
+3  8673 8674 8675
+3  8676 8677 8678
+3  8679 8680 8681
+3  6941 8679 8681
+3  8682 7673 4332
+3  8683 6941 8681
+3  2944 944 4865
+3  8684 8685 7855
+3  8686 4295 1756
+3  8687 8688 3751
+3  8687 3751 7198
+3  6461 3868 3282
+3  8689 861 8690
+3  8689 8690 2703
+3  8691 3049 3046
+3  5528 8692 8693
+3  2285 8694 8695
+3  5822 1049 1048
+3  2309 8696 8697
+3  2309 2311 8696
+3  6931 6282 6281
+3  4503 160 3202
+3  1545 2581 1546
+3  6828 1189 8698
+3  6062 6061 5688
+3  6062 5688 5687
+3  1475 7838 1476
+3  5408 6539 6540
+3  5408 6540 5410
+3  8699 4316 4626
+3  8700 877 473
+3  8701 8702 3565
+3  3241 8703 8704
+3  8705 8706 2078
+3  8707 1685 1684
+3  8708 8709 5534
+3  7439 8710 8711
+3  8712 1211 8713
+3  8712 1212 1211
+3  8714 94 5940
+3  8715 3850 8716
+3  3849 8716 3850
+3  8717 2622 8718
+3  4916 8320 6456
+3  2707 8719 8720
+3  8721 6837 531
+3  8722 8723 8724
+3  5178 8725 8726
+3  8727 8726 8725
+3  6862 8006 8728
+3  863 8729 8730
+3  8731 6204 118
+3  8732 430 8733
+3  8515 2925 4675
+3  3636 3638 2342
+3  8734 6795 6794
+3  3799 8735 1860
+3  2670 7395 8736
+3  8699 2900 8737
+3  8377 3210 649
+3  8738 6343 6344
+3  8738 8739 6343
+3  3096 2127 3097
+3  8740 8741 2330
+3  2513 8742 8743
+3  2286 2288 8744
+3  5823 7441 8745
+3  6098 6100 8746
+3  8747 8748 8749
+3  8750 8751 7333
+3  8752 8753 4218
+3  8754 5225 1779
+3  8755 8756 8757
+3  2499 4275 1765
+3  4182 7946 4183
+3  8212 8758 8213
+3  8212 3993 8758
+3  8759 3484 8760
+3  3678 3680 8761
+3  1714 2367 1715
+3  8762 8264 8763
+3  8762 5755 8264
+3  7665 8764 8765
+3  691 8766 8767
+3  8768 8769 8770
+3  8488 8771 8772
+3  3466 3465 8773
+3  8774 8775 8776
+3  8774 8777 8775
+3  8778 8779 7678
+3  4113 8780 1537
+3  2402 775 4437
+3  5067 5066 8781
+3  3399 1363 8782
+3  8783 8189 8191
+3  7279 4975 6936
+3  2635 8784 8785
+3  8786 8785 8784
+3  8787 8788 1661
+3  8789 8790 8791
+3  3251 8792 1882
+3  3251 1882 4789
+3  8793 8579 8794
+3  8793 8794 8795
+3  5401 5399 8796
+3  8797 8798 8799
+3  8800 8801 8802
+3  324 2852 2854
+3  323 2852 324
+3  7189 8803 8804
+3  8805 1618 1617
+3  8805 1617 1307
+3  6589 8806 6590
+3  8807 2526 8808
+3  8809 8810 8811
+3  8812 6184 8813
+3  8812 8813 8814
+3  6981 4000 6979
+3  8631 2989 8632
+3  8815 8816 8437
+3  6233 5981 84
+3  4838 8817 3249
+3  5971 6625 8062
+3  5969 5971 8062
+3  8818 8819 8820
+3  6045 1205 19
+3  3122 5481 8821
+3  3122 3538 5481
+3  8822 8823 8824
+3  3765 8823 8822
+3  938 940 8825
+3  938 8825 2566
+3  8826 5388 6796
+3  4878 4877 1419
+3  8827 8828 4958
+3  8829 2143 7310
+3  1754 4740 7562
+3  1754 7562 8830
+3  5843 5845 7757
+3  3931 3933 8831
+3  3931 8831 8344
+3  8832 4234 8833
+3  2115 2114 2734
+3  8834 8835 7592
+3  8836 8837 8838
+3  7674 7606 8839
+3  5017 8840 5018
+3  5242 4811 3898
+3  8841 8842 2524
+3  2378 1908 1910
+3  2378 1910 4670
+3  1012 2696 7651
+3  8741 3571 3608
+3  8843 8576 8844
+3  3067 3066 8845
+3  4287 8846 8847
+3  2996 2529 2531
+3  7025 4133 7026
+3  5976 5975 8848
+3  3334 5976 8848
+3  8003 8005 8849
+3  8850 5871 8851
+3  8852 401 399
+3  8852 8853 401
+3  5718 4985 95
+3  2739 2611 8854
+3  7207 1150 1152
+3  7118 8855 8856
+3  7539 5421 5420
+3  8857 8858 6556
+3  8859 6764 6766
+3  8860 8859 6766
+3  6901 3771 8861
+3  8862 8863 8864
+3  4018 8865 8866
+3  4018 8866 8867
+3  8868 8869 7989
+3  8868 7989 7082
+3  8870 8871 8872
+3  8870 8872 8873
+3  3964 8768 8770
+3  8874 6207 8875
+3  2424 6207 8874
+3  8876 2736 6339
+3  8877 7163 8878
+3  8879 8880 5633
+3  7064 8881 8882
+3  8883 7064 8882
+3  5832 8884 5833
+3  8885 8886 8887
+3  8888 8885 8887
+3  3598 8889 8890
+3  8891 7574 7573
+3  4403 2678 8892
+3  7966 8893 3407
+3  8894 6640 6642
+3  4176 4178 8895
+3  796 8896 797
+3  1285 8897 862
+3  8898 959 8899
+3  8900 8901 8902
+3  8903 6160 8347
+3  8904 4313 8905
+3  8906 5839 8907
+3  5838 8907 5839
+3  8908 8909 8910
+3  8908 8910 8911
+3  4514 8912 7754
+3  7763 8913 2773
+3  8914 2195 4660
+3  2494 5402 8915
+3  3318 8396 8916
+3  1510 8917 5522
+3  231 8590 3155
+3  231 8918 8590
+3  8919 8920 8921
+3  8922 8919 8921
+3  5438 8088 5439
+3  8923 8924 8925
+3  8926 8927 8928
+3  8929 7740 8930
+3  8931 8932 8933
+3  8934 8931 8933
+3  8935 5642 7507
+3  3980 8936 8937
+3  8938 8939 6423
+3  251 253 8940
+3  8941 4772 8942
+3  8941 8942 8943
+3  2656 6974 8944
+3  8945 8946 329
+3  8947 8948 8949
+3  8950 8198 8951
+3  8950 8199 8198
+3  8952 8953 4480
+3  8954 2528 1246
+3  3519 7328 2092
+3  1527 8955 8956
+3  906 908 8957
+3  8958 8469 7755
+3  8959 8960 8961
+3  8962 5263 8963
+3  6016 8962 8963
+3  8964 8965 7011
+3  2657 5544 5545
+3  8966 8967 767
+3  8968 8967 8966
+3  6545 6544 8969
+3  7027 8970 8971
+3  3896 8972 8326
+3  5613 5615 5674
+3  8973 2527 1540
+3  8973 1540 8974
+3  8318 4553 5418
+3  8975 8976 8977
+3  1456 8978 8979
+3  1456 7479 8978
+3  8980 6566 8981
+3  8982 8983 6241
+3  6041 5523 2951
+3  8476 5529 8984
+3  6534 1951 3849
+3  1952 1951 6534
+3  867 866 3599
+3  8581 8985 3726
+3  3630 1842 2725
+3  5499 8986 8987
+3  2271 3467 8988
+3  2271 2270 3467
+3  8989 1597 4024
+3  5374 5373 8083
+3  8990 8991 8992
+3  8993 8489 8490
+3  2893 2892 8994
+3  3959 8995 8996
+3  8997 8609 8608
+3  1161 1163 1689
+3  8998 8999 9000
+3  2010 2156 9001
+3  9002 285 9003
+3  9004 3351 9005
+3  9006 9007 8830
+3  9008 4676 9009
+3  9010 8924 9011
+3  9012 1097 9013
+3  7881 6353 9014
+3  9015 9016 9017
+3  9018 975 974
+3  9018 8566 975
+3  534 7244 9019
+3  65 67 6636
+3  9020 9021 766
+3  765 9020 766
+3  9022 9023 9024
+3  9025 9023 9022
+3  9026 4487 647
+3  1602 1068 2939
+3  3950 9027 9028
+3  9029 611 610
+3  1753 9029 610
+3  1834 8170 7860
+3  9030 6652 9031
+3  9032 9033 2937
+3  9034 9035 3775
+3  9036 9037 9038
+3  9039 9040 2214
+3  9041 6041 9042
+3  9043 3148 3147
+3  3958 3185 4761
+3  1986 8234 682
+3  9044 3741 4919
+3  9044 4919 7373
+3  7955 9045 9046
+3  7955 9047 9045
+3  7188 9048 9049
+3  7188 7187 9048
+3  9050 9051 9052
+3  4435 4434 9053
+3  9054 9055 9056
+3  9057 9058 9059
+3  9060 9061 9062
+3  7538 5421 7539
+3  2536 2535 9063
+3  9064 9063 2535
+3  9065 9066 9067
+3  3857 8198 3858
+3  1166 9068 1167
+3  4277 3116 4278
+3  5725 2862 2864
+3  9069 9070 7095
+3  9071 9072 9073
+3  9071 9073 9074
+3  6855 728 9075
+3  9076 6855 9075
+3  9077 2205 147
+3  7813 7814 9078
+3  9079 9080 8455
+3  9081 9082 4498
+3  9083 6049 6048
+3  9084 9085 620
+3  5620 9086 5621
+3  9087 9088 4729
+3  9089 9087 4729
+3  4128 9090 9091
+3  4128 9091 9092
+3  9093 9094 871
+3  4073 4072 9095
+3  3964 9096 2715
+3  3964 8770 9096
+3  9097 746 8336
+3  9098 9097 8336
+3  9099 3752 8688
+3  9100 9101 9102
+3  9103 9104 4412
+3  598 600 9105
+3  9106 1981 1980
+3  9107 508 4764
+3  9108 9109 472
+3  9110 9111 9112
+3  9113 6042 7025
+3  9113 7025 7024
+3  9114 9115 9116
+3  8082 18 6034
+3  9117 6578 6577
+3  9117 7595 6578
+3  4287 4286 9118
+3  9119 9118 4286
+3  9120 9121 9122
+3  2025 1090 4158
+3  9123 9084 620
+3  9124 9125 5990
+3  5588 6056 5586
+3  5775 9126 5774
+3  3469 3590 9127
+3  8890 8889 9128
+3  7932 9129 9130
+3  9131 1533 9132
+3  1531 1533 9131
+3  7635 9133 9134
+3  9135 4836 9136
+3  9135 9136 9137
+3  9138 9139 9140
+3  5524 6116 3297
+3  5524 3297 9141
+3  227 9142 228
+3  9143 9144 9145
+3  3032 7592 9146
+3  6386 6385 9147
+3  9148 4707 6586
+3  9149 1114 8562
+3  9150 9151 9152
+3  9153 9154 9155
+3  1207 4761 3185
+3  9156 2355 9157
+3  9158 9159 9160
+3  2093 9161 9162
+3  2260 2259 9163
+3  5200 4526 3137
+3  7359 2960 7360
+3  9164 9165 9166
+3  412 414 9167
+3  2474 9168 2475
+3  7709 3558 9169
+3  2515 9170 7627
+3  9171 9172 5731
+3  9173 9174 9175
+3  3091 9176 7179
+3  159 161 9177
+3  7806 9178 4349
+3  745 7003 746
+3  9179 9180 9181
+3  642 4369 643
+3  8098 6219 6221
+3  9182 9183 9184
+3  9185 9186 2289
+3  7946 4182 489
+3  1708 9187 9188
+3  2785 8635 3947
+3  2785 2784 8635
+3  7742 7744 628
+3  3540 4977 9189
+3  6882 6881 5298
+3  9190 5586 9191
+3  7150 7106 9192
+3  8254 9193 8422
+3  8943 9194 5539
+3  9195 8733 9196
+3  9195 9196 3365
+3  9197 9198 9199
+3  9200 2663 9201
+3  9202 6726 7707
+3  3967 5982 2310
+3  1031 8481 2821
+3  2076 5148 9203
+3  9204 5143 9205
+3  9206 873 9207
+3  9208 9209 9210
+3  8004 9211 9212
+3  8004 9212 9213
+3  8004 8003 9211
+3  9214 5852 9215
+3  9216 9217 9218
+3  5141 9216 9218
+3  3739 1271 1273
+3  9219 7532 7531
+3  3539 402 9220
+3  9221 9222 3352
+3  9223 9224 7283
+3  9225 2693 9226
+3  6200 6199 9227
+3  9228 9229 4244
+3  7691 9230 7692
+3  9019 7244 7245
+3  6950 7996 4645
+3  6950 4645 9231
+3  2875 9232 2876
+3  2875 9233 9232
+3  9234 9235 9236
+3  7319 9237 9238
+3  9239 9240 6924
+3  9239 7517 9240
+3  9241 4641 7012
+3  2539 9242 2540
+3  9243 9244 9245
+3  8232 5796 8233
+3  9246 9247 9248
+3  1371 1658 9249
+3  2305 9250 7634
+3  7634 9250 7635
+3  8897 5985 9251
+3  5600 7694 9252
+3  7224 4407 1670
+3  9253 9254 9255
+3  9256 4133 9257
+3  9258 9259 9260
+3  9258 9261 9259
+3  6338 5553 5552
+3  5707 6359 3610
+3  7422 9262 6275
+3  9263 6446 6445
+3  9263 6445 9264
+3  3835 5511 8184
+3  6623 3374 9265
+3  9266 9267 9268
+3  9269 9266 9268
+3  4627 9270 8707
+3  908 9271 8957
+3  9272 9273 9274
+3  3704 9275 3707
+3  7943 3707 9275
+3  8569 4486 3922
+3  9276 6055 9277
+3  9278 7477 9279
+3  9280 9281 1255
+3  1254 9280 1255
+3  9282 9283 9284
+3  659 2922 2924
+3  9285 6947 2242
+3  1319 475 9286
+3  9287 9288 9289
+3  9290 253 9291
+3  9292 9293 1917
+3  5294 9294 9295
+3  9296 9294 5294
+3  7495 7912 7911
+3  9297 2879 7058
+3  7884 9298 9299
+3  6154 6153 9300
+3  7675 9301 9302
+3  9303 9302 9301
+3  7058 2879 6610
+3  5677 9304 9305
+3  9306 9304 5677
+3  4893 9307 7362
+3  9308 6453 9309
+3  9310 9311 9312
+3  9313 3656 3658
+3  9313 3658 9314
+3  577 2634 578
+3  144 146 7269
+3  9315 9316 9317
+3  9176 7015 7009
+3  8622 9318 9319
+3  9320 4840 4839
+3  9321 9322 9323
+3  9321 9323 9324
+3  9325 7199 8608
+3  9326 9327 9328
+3  7638 6189 9329
+3  8318 9330 4553
+3  610 4739 1753
+3  6857 6859 7552
+3  7906 7875 7520
+3  2717 9331 9332
+3  9333 4312 9334
+3  1098 1101 4682
+3  9335 6986 6988
+3  3816 1155 2682
+3  9336 3522 4324
+3  9337 9338 9339
+3  1023 7225 9340
+3  9341 9342 3707
+3  9343 4299 116
+3  4921 9344 8993
+3  9345 9346 9347
+3  9348 9345 9347
+3  1090 7638 9329
+3  3647 9349 4944
+3  9350 1399 1401
+3  9351 9352 5040
+3  8987 8986 8392
+3  9353 8987 8392
+3  9354 9355 9356
+3  1444 6235 1445
+3  9357 7586 7558
+3  9358 9359 9360
+3  9358 9360 8258
+3  568 8852 399
+3  1567 1330 9361
+3  9362 9363 9364
+3  1960 2718 1958
+3  6066 6068 6335
+3  6657 6659 9365
+3  9366 9367 9368
+3  9369 9370 9371
+3  2569 9372 9373
+3  9374 2621 1298
+3  1582 444 443
+3  4299 5629 9375
+3  9376 9377 6248
+3  6225 6248 9377
+3  9378 4885 7595
+3  9379 7741 7740
+3  6746 9380 9381
+3  8196 9382 9383
+3  9384 9129 7931
+3  9385 8883 8882
+3  9386 9387 9388
+3  9389 7732 6431
+3  9389 6431 24
+3  9390 4477 7924
+3  9391 7014 7013
+3  6466 6468 7897
+3  7898 7897 6468
+3  6285 6284 8467
+3  1996 7701 9392
+3  9393 9394 9395
+3  8187 6447 9396
+3  9397 5744 9398
+3  4020 4199 8270
+3  9399 9400 9401
+3  1946 3076 1944
+3  9402 2068 9403
+3  6613 9403 2068
+3  8070 7587 7589
+3  7728 7669 7670
+3  3688 616 619
+3  1996 9404 9405
+3  9406 9407 8610
+3  8648 5150 5330
+3  9408 8648 5330
+3  9409 9410 9411
+3  2645 5316 9412
+3  7555 9413 7556
+3  219 9414 9415
+3  8982 5497 9416
+3  5306 9417 9418
+3  2021 9417 5306
+3  4226 9419 3520
+3  6198 5543 6199
+3  93 9420 1245
+3  3467 8235 3468
+3  5640 306 8036
+3  9421 9422 9423
+3  9424 2302 6047
+3  5242 4897 4812
+3  9425 6843 28
+3  9426 3456 747
+3  9427 9428 7132
+3  9429 9428 9427
+3  9430 9227 6199
+3  9431 6144 4654
+3  7458 4515 4517
+3  8381 9432 2781
+3  1125 1124 9433
+3  6032 9434 9435
+3  9436 9437 9438
+3  1489 3000 9439
+3  9440 9441 7496
+3  5385 9442 9443
+3  5385 9443 9444
+3  9445 7194 6285
+3  9446 6285 7194
+3  4336 9447 9448
+3  9449 6161 2617
+3  9450 4385 3659
+3  3656 9450 3659
+3  9451 9100 9452
+3  6902 5349 6903
+3  9453 9454 9455
+3  9453 9456 9454
+3  2495 9457 9458
+3  7625 3753 9459
+3  3086 9460 9461
+3  1001 5285 9462
+3  9463 3162 1380
+3  3628 3630 9464
+3  7200 9306 2607
+3  7200 9304 9306
+3  325 924 9465
+3  2815 9466 4580
+3  2814 9466 2815
+3  4025 4336 1474
+3  9467 9468 9469
+3  7546 9470 9471
+3  4867 4866 9472
+3  3569 9473 1543
+3  1544 1543 9473
+3  9474 5787 1441
+3  2458 741 740
+3  9475 9476 9477
+3  9478 9475 9477
+3  6296 9479 3380
+3  1036 2590 8075
+3  9480 5525 5526
+3  9480 8640 5525
+3  9481 3669 9482
+3  9483 9484 6432
+3  494 230 229
+3  9485 9486 2121
+3  202 7055 7054
+3  7054 7056 9156
+3  9487 9488 1402
+3  9489 9490 9491
+3  5253 9492 5254
+3  9278 9493 7477
+3  3441 9494 3442
+3  2311 9495 9496
+3  8696 2311 9496
+3  4487 3827 4488
+3  9497 9498 9499
+3  2104 5614 5613
+3  9361 9500 9501
+3  7235 9502 939
+3  6667 8202 9063
+3  2210 4121 2211
+3  7029 2077 4053
+3  6406 3076 3078
+3  2247 1553 9503
+3  9504 6447 2581
+3  4971 4973 358
+3  134 9505 6403
+3  7272 4650 7271
+3  7272 4651 4650
+3  396 9506 7677
+3  396 8106 9506
+3  4823 9507 6757
+3  4823 8986 9507
+3  8853 9508 9509
+3  7804 7802 9510
+3  7804 9510 9511
+3  9512 5104 7368
+3  9513 7690 9514
+3  8863 7690 9513
+3  102 7487 6698
+3  102 9515 7487
+3  9516 9430 6199
+3  9517 9518 9519
+3  9517 9519 9520
+3  6219 8098 6761
+3  9521 9522 9523
+3  9521 9523 9524
+3  9525 9526 9527
+3  2598 9526 9525
+3  3295 3294 7406
+3  3924 9528 3475
+3  9529 1503 9530
+3  9531 9532 456
+3  9533 9534 9535
+3  2584 9536 8120
+3  1852 8180 9537
+3  9538 1980 9539
+3  5906 1911 8395
+3  9540 4306 4305
+3  9541 4306 9540
+3  2113 2112 5974
+3  9542 9543 313
+3  868 870 9544
+3  6043 9545 6044
+3  9546 949 6968
+3  9547 9548 9549
+3  9550 6760 9551
+3  8576 9552 8844
+3  9553 3710 5913
+3  9554 3470 3469
+3  9042 6041 2950
+3  9555 8750 4844
+3  3070 8724 9556
+3  4781 4780 6578
+3  9557 7144 9558
+3  9557 9558 9559
+3  9560 2345 9561
+3  1479 8225 1480
+3  9562 2952 2951
+3  2185 9563 7337
+3  8377 649 648
+3  993 9564 8102
+3  9565 9566 9567
+3  5532 5305 4198
+3  7479 9568 8978
+3  7479 7481 9568
+3  3799 3528 8735
+3  9569 6007 8354
+3  9569 8354 9570
+3  3455 9571 9572
+3  5751 9573 9574
+3  5752 5751 9574
+3  7935 4768 4769
+3  5083 5082 9575
+3  6294 471 9576
+3  2063 6369 7537
+3  2063 7537 9577
+3  9578 8245 2789
+3  1306 3878 4712
+3  9579 3375 9580
+3  5276 9581 6517
+3  9582 3195 9583
+3  9584 5589 188
+3  3684 2731 9585
+3  9586 9587 9588
+3  9589 9587 9586
+3  3675 3343 3676
+3  8611 3737 1374
+3  8801 9590 8162
+3  7719 9591 9592
+3  9593 1080 9594
+3  9595 4828 9596
+3  9597 9598 9599
+3  9600 9598 9597
+3  9601 1926 9602
+3  1274 9127 1275
+3  4311 9603 4312
+3  3810 9604 9605
+3  6286 3810 9605
+3  1044 8564 9606
+3  1045 1044 9606
+3  9607 1352 1351
+3  7294 3480 3482
+3  3420 3480 7294
+3  9608 8424 9609
+3  9608 9610 8424
+3  8206 6114 6113
+3  3123 9484 9483
+3  7677 9611 396
+3  6166 9612 9613
+3  3282 9614 9615
+3  5276 1201 9581
+3  9616 9617 4408
+3  9618 9619 8778
+3  3831 9620 9621
+3  4106 8327 4107
+3  3536 7923 5572
+3  3536 5572 9622
+3  9623 9624 9625
+3  4591 7102 4592
+3  4451 4450 7896
+3  9626 7896 4450
+3  4956 9627 4957
+3  774 1799 7366
+3  8953 7921 7920
+3  1 5224 9131
+3  6977 1 9131
+3  9628 1595 8989
+3  9628 8989 9629
+3  5938 9630 7599
+3  9631 9632 6049
+3  9631 9633 9632
+3  2123 9634 9635
+3  9214 9215 9636
+3  9214 9636 9455
+3  5819 7464 9637
+3  5819 7463 7464
+3  9633 9638 9632
+3  9639 284 9640
+3  3411 9641 9642
+3  9643 9171 9644
+3  9645 6739 6738
+3  9478 3519 9475
+3  9646 9647 9648
+3  9649 9648 9647
+3  9649 9650 9648
+3  9651 9122 9652
+3  9653 9186 9654
+3  9655 2556 2555
+3  1793 1792 9656
+3  7866 1885 3652
+3  3708 3710 9553
+3  3978 8850 8851
+3  9657 8850 3978
+3  7975 9658 7974
+3  6089 7115 7114
+3  3555 9659 9660
+3  9661 9662 6995
+3  949 8514 6969
+3  3954 9663 3955
+3  6801 9664 9665
+3  2448 6801 9665
+3  8772 9666 7561
+3  9037 8721 9667
+3  2109 9668 9669
+3  9670 9671 9672
+3  9673 9674 9675
+3  5359 4749 5360
+3  9676 8887 9677
+3  9676 9678 8887
+3  9679 9680 9681
+3  9682 9681 9680
+3  9683 9684 9685
+3  9684 9686 9685
+3  851 1764 9687
+3  2407 4414 1236
+3  5585 9688 9041
+3  5531 2804 9689
+3  4527 3384 3383
+3  775 774 4436
+3  113 1821 2069
+3  6602 9690 9691
+3  8935 7507 6513
+3  9692 5565 1106
+3  8208 9693 9694
+3  8384 9695 9058
+3  8384 9058 9696
+3  9697 9698 9699
+3  367 369 9384
+3  7858 2109 1336
+3  9700 9701 9702
+3  9703 9704 5457
+3  3241 2852 323
+3  1754 9007 1755
+3  9705 9706 3205
+3  6195 512 487
+3  1486 9707 9708
+3  8469 9709 6692
+3  2421 3136 3135
+3  9339 9338 9710
+3  9339 9710 9711
+3  113 112 8250
+3  9712 1091 2286
+3  1917 1919 6628
+3  1247 2500 1249
+3  9713 9714 8111
+3  4350 9715 6395
+3  7036 4886 9716
+3  3834 5510 3835
+3  8406 8408 9717
+3  7207 1905 9718
+3  7207 9718 1150
+3  9719 8266 8265
+3  117 9720 9721
+3  9722 9723 9724
+3  9722 9724 9725
+3  4441 6871 4442
+3  9726 8853 8852
+3  9508 8853 9726
+3  9727 1577 2271
+3  7224 1670 1669
+3  7222 7224 1669
+3  7223 8169 7224
+3  9728 9729 2518
+3  4918 3741 9730
+3  3740 9730 3741
+3  2099 6286 2097
+3  2099 8037 6286
+3  9731 9732 4592
+3  4593 4592 9732
+3  9733 5552 5554
+3  9734 2571 2262
+3  9735 4997 9736
+3  9737 6736 9738
+3  9575 9739 6065
+3  9740 9741 9742
+3  9743 9740 9742
+3  6204 3308 3307
+3  9744 9745 9746
+3  5906 8388 9747
+3  6086 9748 9749
+3  6086 9749 6087
+3  9750 9751 9752
+3  9181 9180 2343
+3  3802 6746 9381
+3  3802 9381 9753
+3  9754 868 1377
+3  2118 7020 2119
+3  2498 4276 4275
+3  9755 9756 9757
+3  9755 9757 9758
+3  3527 3526 5859
+3  3518 415 3826
+3  8217 8219 125
+3  4565 9759 4566
+3  3154 747 749
+3  7482 3984 9760
+3  2088 9761 4861
+3  9762 9763 9387
+3  9764 8965 8964
+3  4873 4872 8118
+3  2651 8379 9765
+3  6569 9766 9767
+3  9768 9769 7490
+3  7489 9768 7490
+3  8780 4246 1537
+3  7978 1359 4238
+3  7221 865 867
+3  9770 7809 5582
+3  9137 7989 8869
+3  2537 2506 6892
+3  9771 1805 2833
+3  9772 6065 3556
+3  5329 5946 5945
+3  1064 9773 9774
+3  456 9775 9776
+3  6236 3056 9777
+3  4847 9778 4848
+3  8601 248 250
+3  9779 9780 8013
+3  1132 5016 9781
+3  1132 1129 5016
+3  1672 9782 1673
+3  9783 9584 187
+3  7005 9784 9533
+3  5117 9785 9786
+3  1518 5722 9787
+3  5112 9656 5113
+3  9788 9789 4138
+3  9790 9791 1033
+3  9792 7070 9793
+3  9794 9795 9796
+3  715 1798 4215
+3  6179 9797 9798
+3  6179 9798 6619
+3  9799 3071 9800
+3  193 9801 9802
+3  9803 9804 5452
+3  9805 7893 9806
+3  8316 4609 8317
+3  9807 9808 9809
+3  9810 9811 805
+3  9810 9812 9811
+3  9813 805 9811
+3  9814 9815 2567
+3  6031 6943 9816
+3  148 688 149
+3  4911 9817 8756
+3  1139 9818 1140
+3  5202 9818 1139
+3  8565 9555 4844
+3  8565 4844 4843
+3  1159 2192 6348
+3  9819 6333 8088
+3  5509 9820 161
+3  9821 1564 1563
+3  631 7556 632
+3  9822 9823 9824
+3  2901 2900 7711
+3  687 686 8837
+3  9825 9826 9827
+3  8918 230 9828
+3  9829 4856 9830
+3  8859 5258 9831
+3  9832 6723 9833
+3  4576 6723 9832
+3  9834 9835 9836
+3  3639 2632 9837
+3  3639 9838 2630
+3  3639 2630 2632
+3  391 9839 392
+3  9840 8767 9841
+3  5125 503 9842
+3  5126 5125 9842
+3  4464 9615 9614
+3  9185 9654 9186
+3  9843 9844 9845
+3  9846 9847 8572
+3  9848 6694 6693
+3  9109 470 472
+3  9849 3410 3412
+3  9273 9367 9274
+3  9850 4256 9851
+3  7120 7119 967
+3  9852 2815 4580
+3  33 35 1429
+3  6619 6180 6179
+3  6929 6180 6619
+3  764 763 9853
+3  9854 84 86
+3  9855 9856 9857
+3  9858 6989 9859
+3  9860 9861 9862
+3  6321 9863 9864
+3  5392 7670 9865
+3  810 9866 1321
+3  5676 9867 9868
+3  8502 8504 9869
+3  6554 9870 343
+3  7298 9871 4357
+3  9872 9873 8285
+3  9874 9872 8285
+3  9875 3044 5381
+3  3809 3808 9876
+3  6204 246 3308
+3  245 3308 246
+3  2094 4456 2095
+3  8814 9877 8812
+3  7022 9878 7023
+3  7022 9879 9878
+3  2371 9880 9881
+3  4059 1226 1228
+3  9882 6847 1921
+3  5124 5126 9883
+3  9403 9884 9885
+3  9403 9885 9402
+3  4854 814 811
+3  9886 7031 9887
+3  819 9888 820
+3  819 7089 9888
+3  9889 9890 8974
+3  9889 9891 9890
+3  8913 9892 2888
+3  9893 5498 9894
+3  9895 9896 5941
+3  9895 5365 9896
+3  578 7046 9897
+3  9898 28 6844
+3  8791 115 114
+3  833 115 8791
+3  9899 9900 9901
+3  9902 9903 9904
+3  9905 9906 8638
+3  9907 8638 9906
+3  9908 9909 9910
+3  9911 9912 5680
+3  9911 5680 5679
+3  9913 9914 9915
+3  9072 0 9073
+3  9916 0 9072
+3  8732 9917 9918
+3  8732 9919 9917
+3  9920 9921 8571
+3  9922 9923 9924
+3  5880 5879 8547
+3  9925 9926 9927
+3  9928 9925 9927
+3  458 6985 9929
+3  8999 103 9000
+3  6649 1488 4692
+3  3077 9930 9931
+3  645 9931 646
+3  9932 4505 4508
+3  9933 3842 3841
+3  6326 3842 9933
+3  9934 2326 3372
+3  9935 9936 9937
+3  9938 834 836
+3  7850 7645 7646
+3  9939 9940 9941
+3  9942 9943 9944
+3  4236 1069 450
+3  5697 4433 9945
+3  9946 3764 8558
+3  5008 9182 7767
+3  5008 7767 5009
+3  1479 2196 3655
+3  9947 8525 7345
+3  9948 9947 7345
+3  9949 7741 9379
+3  8883 9385 9950
+3  8366 9950 9385
+3  4334 4333 9951
+3  9952 8934 1918
+3  7084 4917 6719
+3  9365 6659 1727
+3  9953 5737 735
+3  9953 735 734
+3  9954 9077 5030
+3  9955 9956 9957
+3  3403 8385 3401
+3  8019 8021 9958
+3  9959 9316 9354
+3  9960 9961 4556
+3  4968 7007 5762
+3  9962 6884 224
+3  9963 9964 6882
+3  583 9963 6882
+3  6160 6159 7180
+3  6352 9965 9966
+3  8612 9165 9967
+3  9968 7835 9969
+3  7140 9970 8089
+3  9458 9457 9971
+3  9972 9926 9925
+3  9973 9974 9975
+3  9826 9975 9974
+3  9976 3607 9977
+3  9976 3605 3607
+3  9978 4923 9979
+3  9980 2741 9981
+3  2675 2677 9982
+3  5067 4319 5068
+3  9983 9984 9985
+3  5934 9986 9987
+3  9988 1416 1415
+3  9988 7715 1416
+3  7342 2499 1765
+3  9452 9100 9989
+3  9990 9452 9989
+3  6425 7852 9991
+3  8744 9992 9993
+3  9928 9927 9994
+3  1281 9995 3464
+3  5817 5819 1548
+3  9996 9997 6513
+3  9998 9999 10000
+3  988 502 10001
+3  5981 85 84
+3  3518 3826 9475
+3  8312 4003 10002
+3  8898 8312 10002
+3  1174 10003 10004
+3  10005 1734 10006
+3  638 1734 10005
+3  10007 9845 10008
+3  6364 10009 5431
+3  10010 6807 10011
+3  10012 10013 2923
+3  7505 96 6953
+3  5167 154 2438
+3  10014 10015 10016
+3  7932 7931 9129
+3  10017 10018 5357
+3  2946 10019 3784
+3  1333 2946 3784
+3  9745 6497 9746
+3  1963 6455 1964
+3  3995 10020 3996
+3  3962 8938 1733
+3  8480 8481 10021
+3  10022 10023 2286
+3  10024 10025 10026
+3  8710 782 8711
+3  10027 3091 4254
+3  2127 2128 4161
+3  10028 10029 10030
+3  10028 10030 6782
+3  10031 10032 10033
+3  10034 9520 9519
+3  53 8114 54
+3  99 4323 10035
+3  4011 10036 10037
+3  1368 6567 10038
+3  1368 10038 10039
+3  2901 3568 3567
+3  6832 10040 10041
+3  10042 10043 10044
+3  10045 10044 10043
+3  3419 3480 3420
+3  10046 4548 10047
+3  10048 4548 10046
+3  3242 3243 9484
+3  6832 6831 10040
+3  10049 8522 4644
+3  603 1239 10050
+3  1049 10051 2482
+3  10052 5602 10053
+3  10054 5700 10055
+3  4582 1879 933
+3  10056 10057 10058
+3  10059 8278 10060
+3  10061 10062 6359
+3  9029 1755 7461
+3  1753 1755 9029
+3  10063 10064 10065
+3  10066 5822 10067
+3  1049 5822 10066
+3  2878 10068 2881
+3  10069 9769 8460
+3  10070 10071 3954
+3  6102 595 1803
+3  10072 289 291
+3  10073 10072 291
+3  10074 7357 9003
+3  10075 1202 10076
+3  6120 6300 6299
+3  8438 7922 7921
+3  2232 3927 645
+3  9511 10077 10078
+3  10079 10078 10077
+3  3411 10080 9641
+3  10081 10082 10083
+3  7458 2477 6758
+3  5503 168 170
+3  295 7889 1773
+3  10084 10085 3063
+3  10086 1260 1263
+3  10087 4253 7586
+3  10088 10089 10090
+3  6168 7001 5606
+3  9060 10091 5364
+3  4051 10092 10093
+3  10091 9896 5365
+3  5364 10091 5365
+3  4675 10094 8515
+3  480 10095 10096
+3  10097 480 10096
+3  4710 3005 10098
+3  4710 10098 4711
+3  10099 10100 4230
+3  9700 2453 9701
+3  7959 4665 4457
+3  10101 8724 3070
+3  5479 3164 3765
+3  8822 5479 3765
+3  9486 9850 2122
+3  9843 9845 10102
+3  9358 10103 10104
+3  9358 8258 10103
+3  10105 2742 4560
+3  10106 10107 8193
+3  8010 8193 10107
+3  8904 10108 5875
+3  6918 3312 5171
+3  8901 1370 1372
+3  6437 10109 10110
+3  6392 10111 10112
+3  10113 10114 8855
+3  10115 10116 2325
+3  2325 10116 10117
+3  2859 2861 6333
+3  10118 10119 10120
+3  235 10121 10122
+3  10123 1848 1847
+3  10122 4197 10124
+3  6061 10125 5688
+3  10126 10127 965
+3  1208 10128 1209
+3  10129 9891 10130
+3  3718 152 151
+3  8646 8089 10131
+3  8090 8089 8646
+3  3524 8253 3525
+3  7537 7539 10132
+3  6367 6369 2065
+3  958 10133 10134
+3  10135 3495 3494
+3  9753 3694 3802
+3  7631 3544 10136
+3  10137 10136 3544
+3  6383 10138 10139
+3  7839 10140 2895
+3  7839 2895 2894
+3  2753 10141 10142
+3  10143 8487 4936
+3  6170 9036 8662
+3  10144 10145 10146
+3  10147 10148 1853
+3  10149 10150 46
+3  10149 46 4401
+3  9139 10151 5962
+3  1523 1525 10152
+3  7019 2965 3785
+3  10153 10154 10155
+3  10156 9413 7555
+3  4385 4382 10157
+3  3784 10158 10159
+3  10160 3784 10159
+3  2544 2546 4298
+3  434 4827 10161
+3  10162 10163 10164
+3  10165 1457 1459
+3  10165 10166 1457
+3  9422 9421 7230
+3  7229 9422 7230
+3  10167 1712 10168
+3  10169 10170 10171
+3  9429 10172 5750
+3  5353 334 7321
+3  10173 6718 7071
+3  9757 7729 4193
+3  3948 8048 2783
+3  10174 9520 10175
+3  2409 10174 10175
+3  10176 5649 4088
+3  42 10177 45
+3  6770 6769 3506
+3  10178 10179 10180
+3  4193 4195 10181
+3  4193 10181 10182
+3  10183 5050 10184
+3  1587 10185 10186
+3  1587 10186 1584
+3  4677 9793 4678
+3  9464 10187 10188
+3  10189 3820 1187
+3  3817 3820 10189
+3  5892 5894 8056
+3  3062 10190 3063
+3  8459 10191 10192
+3  8459 10192 10193
+3  10194 6902 2981
+3  6902 10194 5349
+3  10195 8756 8755
+3  4196 1147 10196
+3  10197 8231 10198
+3  5863 6851 6853
+3  7247 10199 10200
+3  7247 10200 8500
+3  480 479 10095
+3  355 8205 356
+3  10201 6660 2419
+3  5068 3832 3831
+3  2169 2168 6547
+3  4850 8595 1260
+3  10202 1939 6407
+3  1489 9439 10203
+3  10204 3176 10205
+3  3178 10205 3176
+3  10206 10207 10208
+3  6774 6773 4330
+3  3641 3640 10209
+3  10210 10211 3396
+3  1151 207 6504
+3  4331 10212 6665
+3  7630 3495 10135
+3  10213 10214 9960
+3  10215 8233 6312
+3  10216 10217 10218
+3  10219 9744 9746
+3  10220 7966 3406
+3  10221 8057 10222
+3  10222 1891 4708
+3  10223 4809 2034
+3  10224 10225 10226
+3  10227 10228 10229
+3  10230 3020 3310
+3  7493 576 4168
+3  6990 3419 3418
+3  6717 10231 3900
+3  10232 10233 10234
+3  9646 10235 10236
+3  6994 10237 1576
+3  2694 10055 5699
+3  4452 4058 10238
+3  3562 1946 1945
+3  1423 166 10239
+3  2737 9333 2738
+3  4278 4920 4279
+3  6318 10240 10241
+3  4646 10242 4647
+3  7029 5204 2077
+3  10243 10244 10245
+3  1518 133 5722
+3  10246 10247 10248
+3  10178 10180 9603
+3  10249 1957 1956
+3  4242 10250 10251
+3  4242 10251 10252
+3  6639 6638 2691
+3  10253 8754 1779
+3  1720 10254 1721
+3  10255 10254 1720
+3  5569 10256 869
+3  10257 10258 10259
+3  10257 10260 10258
+3  10261 10262 3814
+3  7474 4889 10263
+3  10264 9573 5751
+3  9630 6220 4280
+3  10265 2390 7805
+3  1999 10266 10267
+3  6714 1999 10267
+3  10268 3007 3009
+3  10268 7954 3007
+3  3261 3260 10269
+3  2199 2201 3436
+3  1075 5105 5107
+3  1075 5107 5625
+3  2680 10270 9168
+3  2680 9168 8115
+3  10271 4059 1228
+3  10272 10271 1228
+3  10273 9160 4818
+3  6833 512 513
+3  8406 9717 10274
+3  1116 10275 2826
+3  1115 10275 1116
+3  2899 5950 7793
+3  5234 1676 1675
+3  2732 8314 10276
+3  10277 10278 10279
+3  2781 9432 2773
+3  9432 7763 2773
+3  10280 2965 7019
+3  5836 7198 3751
+3  5759 10281 10282
+3  4742 10283 10284
+3  2463 9461 9460
+3  6561 2463 9460
+3  6049 9632 6050
+3  3160 3157 5514
+3  10285 3160 5514
+3  10286 8166 10287
+3  10288 10289 10290
+3  2548 4393 4395
+3  10291 4393 2548
+3  10292 1208 3184
+3  878 908 879
+3  10293 6811 10294
+3  10295 10296 10011
+3  7659 10297 10298
+3  7659 10298 7660
+3  9830 4856 10299
+3  2660 7774 10300
+3  10301 10302 10303
+3  10304 10305 10306
+3  10307 6745 10308
+3  10309 10310 2639
+3  7315 2639 10310
+3  10311 10312 10313
+3  5683 10312 10311
+3  10314 10315 10316
+3  10317 10318 3923
+3  10185 10319 7620
+3  1204 1206 67
+3  1172 7977 7844
+3  10320 9289 6391
+3  6280 3668 3670
+3  10321 10322 10323
+3  10324 6444 10325
+3  5716 3415 3414
+3  9806 7893 10326
+3  6442 9187 1708
+3  10327 3310 10328
+3  10329 10330 10331
+3  10332 10329 10331
+3  10333 6387 10334
+3  4594 4596 2989
+3  10335 1883 252
+3  1576 1578 3778
+3  10336 10337 10338
+3  10329 5529 10330
+3  10339 9050 10144
+3  1321 8577 1322
+3  8835 3500 4109
+3  4612 6934 6933
+3  4500 4499 6725
+3  10340 10341 4783
+3  9542 10342 10343
+3  10344 9029 7461
+3  1206 1205 1622
+3  8456 335 5710
+3  9776 6767 812
+3  5023 1727 1726
+3  8351 9285 865
+3  8814 8327 9877
+3  7436 8002 7
+3  10345 3641 4544
+3  10346 10347 10348
+3  143 10347 10346
+3  10349 10350 10351
+3  10352 7202 10353
+3  10352 10353 10354
+3  10355 10356 9823
+3  1784 662 10357
+3  1784 10357 10358
+3  10359 10360 4879
+3  3125 10361 10362
+3  10363 9754 1377
+3  10364 3723 3722
+3  10365 3723 10364
+3  10366 4225 4227
+3  10367 10368 10369
+3  10370 10369 10368
+3  3042 3041 10371
+3  3042 10371 6327
+3  8533 8532 10372
+3  10373 9479 5791
+3  10374 10375 2831
+3  10376 7089 7088
+3  537 7752 7753
+3  10377 5561 5560
+3  10378 10379 10380
+3  10381 10379 3336
+3  10382 10380 10379
+3  10381 10382 10379
+3  10383 10384 1766
+3  10203 9439 3290
+3  10203 3290 3292
+3  10385 10386 10387
+3  10388 10389 10390
+3  923 10389 10388
+3  3086 8606 2428
+3  10391 10392 10393
+3  10394 10395 10396
+3  5203 10397 10398
+3  10147 10398 10397
+3  5271 10399 1901
+3  6387 10333 3925
+3  10400 10401 10402
+3  558 557 10403
+3  10404 10405 10406
+3  7343 10407 4530
+3  7344 7343 4530
+3  10408 1598 2964
+3  10408 2964 10409
+3  10410 1023 1025
+3  10411 6750 10412
+3  9790 13 10413
+3  10414 10415 10416
+3  9348 5821 10417
+3  5488 4444 4443
+3  5488 5487 4444
+3  1169 1168 8333
+3  1169 8333 8332
+3  8793 10418 3926
+3  6573 6572 4797
+3  6573 4797 4796
+3  10419 8470 10420
+3  10421 10422 4776
+3  3539 4977 3540
+3  8344 1710 8342
+3  8344 1711 1710
+3  2932 10423 10424
+3  10425 10424 10423
+3  9784 3442 10426
+3  769 2772 10427
+3  252 1884 253
+3  10428 2772 2771
+3  10427 2772 10428
+3  7493 4168 7494
+3  9879 9301 4087
+3  9879 4087 4088
+3  4087 9301 7675
+3  10429 10430 10431
+3  10429 10432 10430
+3  9059 7498 7499
+3  2673 10433 2674
+3  3418 3420 7293
+3  10434 3820 10435
+3  3819 10435 3820
+3  10184 5050 3372
+3  10183 5051 5050
+3  10436 10437 10438
+3  10439 10440 10441
+3  7028 4053 10442
+3  3512 5344 5343
+3  1839 2010 1837
+3  3291 5193 2085
+3  5675 10443 8336
+3  3199 10444 6262
+3  10445 3199 6262
+3  6754 4865 10446
+3  7216 7508 7484
+3  2699 5920 5922
+3  10447 4943 10448
+3  4463 4462 5153
+3  1889 3800 1890
+3  2259 10449 9163
+3  6897 10450 10451
+3  10452 2480 10453
+3  10454 10452 10453
+3  3029 786 785
+3  3904 3906 5896
+3  9522 6081 10455
+3  10456 10455 6081
+3  9711 10456 6081
+3  4625 1386 9114
+3  10457 10458 10459
+3  1806 9278 10460
+3  10461 9673 10462
+3  328 10463 9151
+3  10464 9857 10465
+3  7166 3587 8583
+3  914 9804 9803
+3  8533 10372 7607
+3  8056 10222 8057
+3  10466 10467 10468
+3  10466 10468 10469
+3  10470 2718 9332
+3  10471 8358 9099
+3  8449 10472 8448
+3  10473 10474 10475
+3  10476 10474 10473
+3  10477 10478 6334
+3  3875 8223 8549
+3  1995 7701 1996
+3  1218 5733 1219
+3  10479 5463 4143
+3  6243 8044 6244
+3  2285 8695 6544
+3  2283 2285 6544
+3  10480 2476 10086
+3  7896 8048 5336
+3  7610 10481 7608
+3  10482 10483 10481
+3  6212 2089 2088
+3  7941 8500 7939
+3  8501 8500 7941
+3  1678 10484 1679
+3  10485 10350 5425
+3  777 2378 4670
+3  9172 10486 5731
+3  10487 8980 10488
+3  10489 10490 10491
+3  10492 10491 10490
+3  2329 8020 8019
+3  9623 9625 10493
+3  7884 7883 10494
+3  2121 9486 2122
+3  10495 10496 10497
+3  7509 10494 7510
+3  2722 3865 2723
+3  6003 10252 10498
+3  10499 10500 10501
+3  7874 10502 7875
+3  7602 5054 5053
+3  10503 10504 7043
+3  10505 706 10506
+3  2860 10507 2861
+3  6107 2193 10508
+3  6700 6699 10509
+3  10510 3109 10511
+3  5644 10512 5645
+3  9970 1066 1068
+3  1207 1209 1604
+3  10513 10514 10515
+3  10516 10136 10517
+3  10516 7631 10136
+3  583 6882 5298
+3  10518 10519 10520
+3  10521 10277 10522
+3  10523 10277 10521
+3  1291 1288 10524
+3  8009 7524 8008
+3  8983 5060 10525
+3  1913 10526 8395
+3  9553 7609 5780
+3  5470 7148 5471
+3  10527 9489 9491
+3  10528 7565 10529
+3  6374 6141 10530
+3  4322 5691 1590
+3  10531 8698 10532
+3  10533 10531 10532
+3  10534 10535 10536
+3  10537 9184 7460
+3  10538 7460 9184
+3  4103 4484 10539
+3  7290 10540 7291
+3  1729 1731 5492
+3  4095 10541 4093
+3  4095 5626 10541
+3  8663 5595 7317
+3  5180 270 10542
+3  5180 10542 5181
+3  10543 10544 7368
+3  10545 8518 8517
+3  7631 7633 3545
+3  3544 7631 3545
+3  10546 10547 10415
+3  5829 10415 10547
+3  10548 4833 6497
+3  4231 2445 397
+3  10549 10550 10551
+3  10552 7260 10553
+3  10553 7260 3674
+3  8304 8303 4124
+3  4363 9875 5474
+3  3602 10554 3603
+3  3602 5196 10554
+3  9788 10555 9789
+3  10125 6061 10556
+3  10557 10125 10556
+3  1353 7588 10558
+3  6177 6395 6397
+3  10559 10560 10561
+3  7145 3306 245
+3  7145 245 410
+3  10562 8043 8210
+3  4608 8317 4609
+3  10563 8317 4608
+3  5950 5952 7491
+3  10151 10564 5962
+3  3590 3589 8916
+3  10565 4237 10566
+3  10567 10568 10569
+3  10570 8398 7838
+3  8677 8676 10571
+3  8677 10571 10572
+3  3994 10573 10574
+3  3994 10574 3895
+3  8618 10575 8617
+3  10576 7394 5549
+3  7745 1811 1813
+3  10577 2208 10578
+3  7342 1326 5810
+3  1947 1949 10579
+3  10580 10579 1949
+3  6028 668 6029
+3  3111 10581 3904
+3  9895 5202 10582
+3  10583 9895 10582
+3  5365 9895 10583
+3  9041 9688 6037
+3  3130 1382 1381
+3  10584 1382 3130
+3  10585 10586 5530
+3  1717 3214 1718
+3  7839 1718 3214
+3  10587 10163 10588
+3  10589 6048 7385
+3  6050 7385 6048
+3  2004 10590 7040
+3  2434 2004 7040
+3  2372 5968 2373
+3  6327 10591 3671
+3  10371 10591 6327
+3  8460 10592 10069
+3  9498 8586 9499
+3  7832 9499 8586
+3  3418 7293 10593
+3  7205 10594 6948
+3  8416 8418 10595
+3  10596 10595 8418
+3  9318 53 55
+3  4090 2828 2827
+3  10597 10598 10599
+3  7196 10600 10601
+3  7196 10601 8070
+3  10602 8944 10603
+3  7791 8407 8409
+3  8944 6975 10603
+3  9225 9226 6594
+3  10604 940 8645
+3  10605 940 10604
+3  4865 944 2863
+3  2434 7040 2435
+3  7404 10606 10607
+3  10398 5202 5203
+3  7542 10608 7540
+3  10609 932 2541
+3  5198 10610 5199
+3  2541 2426 10609
+3  6090 6092 447
+3  1488 2629 2038
+3  8661 6170 8662
+3  5049 9990 4978
+3  5049 4978 5047
+3  10611 8271 10612
+3  10611 10612 8420
+3  4227 4226 3522
+3  10613 10614 10615
+3  6322 5167 5169
+3  773 10616 774
+3  9382 10617 8844
+3  1606 10618 4760
+3  8777 8855 10619
+3  10620 48 47
+3  2469 5712 2470
+3  6711 3790 2766
+3  7542 10621 10622
+3  7541 10621 7542
+3  4968 771 7007
+3  939 938 2565
+3  10623 2382 10624
+3  5793 5795 10625
+3  1273 10626 10627
+3  1273 1270 10626
+3  10628 7331 7836
+3  7835 10628 7836
+3  10629 10630 4663
+3  10631 3474 2618
+3  10631 10632 3474
+3  8704 8703 2462
+3  5931 1393 1395
+3  5931 1395 10633
+3  779 10634 780
+3  2607 10635 4251
+3  2607 4251 7200
+3  10636 10637 10638
+3  10639 10638 10637
+3  10640 7165 10641
+3  3789 440 3790
+3  10635 8311 4249
+3  10635 4249 4251
+3  9447 7885 9448
+3  10642 10643 8948
+3  2246 1388 2244
+3  3654 2346 10644
+3  9560 10644 2346
+3  5172 2666 4118
+3  10645 10646 10647
+3  6827 6826 10648
+3  6486 6229 6228
+3  9134 9133 10649
+3  1231 1442 10650
+3  10651 10652 684
+3  9493 10653 7475
+3  9281 8316 8315
+3  9281 8315 1255
+3  6124 10654 6125
+3  3260 1021 10655
+3  1317 10656 10657
+3  7997 2899 7793
+3  10658 4876 4878
+3  10037 10659 6600
+3  7849 10660 10386
+3  9825 8505 1282
+3  10661 10662 10663
+3  10664 5904 5903
+3  10664 10665 5904
+3  7808 10666 5582
+3  7808 10667 10666
+3  10668 10669 5306
+3  2745 10571 4976
+3  9269 8093 6572
+3  9269 9268 10670
+3  10671 9269 10670
+3  1303 1494 1304
+3  7371 2469 3744
+3  9250 10672 7635
+3  7771 10673 8338
+3  5654 9580 3294
+3  10674 10675 10676
+3  10677 741 7930
+3  742 741 10677
+3  3557 5654 7264
+3  10678 6436 6438
+3  10679 10680 10681
+3  10682 10680 10679
+3  3395 1618 518
+3  10683 9054 10684
+3  1597 1596 4024
+3  10685 9338 9527
+3  10685 9527 10686
+3  10687 9296 5966
+3  10687 5966 10688
+3  6124 6123 5485
+3  7437 10689 3185
+3  10690 4355 4354
+3  10691 5246 5248
+3  10692 10348 7820
+3  9738 4202 4599
+3  9738 10693 4202
+3  10694 2137 10695
+3  10696 10697 4868
+3  1008 4179 10698
+3  1695 50 52
+3  6157 7151 5182
+3  10699 4787 2892
+3  10700 499 3248
+3  8333 10701 8334
+3  6925 10702 10703
+3  6925 10703 10704
+3  10705 10706 3805
+3  10707 10708 10709
+3  10710 10709 10708
+3  10711 8644 934
+3  5792 10712 10450
+3  10713 8083 205
+3  6474 10077 6472
+3  2647 6472 10077
+3  10509 6699 6581
+3  10714 10715 8875
+3  10714 9435 10715
+3  4437 2884 4962
+3  10716 10717 10718
+3  10719 10720 10721
+3  10719 10721 8331
+3  10674 7591 8269
+3  10722 2780 10540
+3  6122 6266 6691
+3  10723 10724 10725
+3  2042 10726 8243
+3  2042 10727 10726
+3  2002 10423 2003
+3  10728 2003 10423
+3  8618 4420 10729
+3  5328 5946 5329
+3  10730 2699 5922
+3  10731 2763 10732
+3  10731 10733 2763
+3  10734 9997 9996
+3  8322 3541 10735
+3  2853 10735 3541
+3  10736 9370 10737
+3  10738 2968 2967
+3  10633 1395 10739
+3  5830 2277 10416
+3  7046 2633 7975
+3  1627 4836 9135
+3  5085 5084 7215
+3  1699 10740 8415
+3  10741 4349 4351
+3  10742 10743 10744
+3  8773 10744 10743
+3  10745 578 9897
+3  5339 2394 10746
+3  7108 10747 9772
+3  9572 4528 3455
+3  3773 3192 3194
+3  10748 10749 10750
+3  10751 4789 4788
+3  10752 10751 4788
+3  10752 4788 2422
+3  2423 4788 1881
+3  2422 4788 2423
+3  5986 2741 10753
+3  5986 10753 3871
+3  10754 5258 5257
+3  9224 6518 7283
+3  1981 9944 5565
+3  10755 262 261
+3  10756 262 10755
+3  5750 10757 10758
+3  10759 2160 4775
+3  3497 999 10399
+3  6238 2143 2142
+3  7310 2143 6238
+3  6077 6076 2338
+3  6077 2338 10760
+3  9169 10761 10762
+3  9169 10762 7709
+3  10763 9443 9442
+3  3036 4762 5014
+3  8218 10764 10283
+3  10765 1065 10766
+3  10767 8957 10768
+3  9175 9174 10769
+3  6466 171 169
+3  10577 10770 2208
+3  8422 9610 10353
+3  8254 8422 10353
+3  10667 1308 10666
+3  9273 10243 10678
+3  3327 4072 4071
+3  10771 10772 9643
+3  10771 9643 2892
+3  2891 10771 2892
+3  10773 10772 10771
+3  8595 1261 1260
+3  5081 2040 7911
+3  8018 8244 8243
+3  5519 2778 10774
+3  10775 2778 5519
+3  1339 10776 4696
+3  10777 10778 9189
+3  6041 2951 2950
+3  3098 10779 6349
+3  7636 10780 6129
+3  10781 5497 8982
+3  10362 10361 3637
+3  10782 4243 4241
+3  9371 9370 2945
+3  10783 4844 7332
+3  3818 4979 10784
+3  1664 10785 3818
+3  10786 9633 9631
+3  10787 378 10788
+3  10787 10788 8649
+3  10789 2449 2450
+3  1530 3834 10790
+3  1530 5510 3834
+3  2706 10791 10792
+3  2706 10792 10793
+3  9203 5148 7571
+3  10794 4515 10795
+3  10796 7504 8168
+3  921 10797 922
+3  10798 3183 3180
+3  10799 8569 2262
+3  10799 10539 8569
+3  785 3696 10800
+3  10801 1586 10802
+3  7348 129 8726
+3  3702 3021 1778
+3  3915 10032 3916
+3  10803 3807 10804
+3  6639 2691 7926
+3  10805 10806 6249
+3  2027 2074 2073
+3  8989 8211 10807
+3  10808 8989 10807
+3  10809 6964 7610
+3  4630 4173 10810
+3  6318 10811 10812
+3  2142 6051 6238
+3  3127 6993 3128
+3  9544 10813 10814
+3  869 4320 870
+3  467 10815 468
+3  10816 8262 435
+3  7873 8638 131
+3  10817 7958 8113
+3  10818 8553 3094
+3  10818 3094 141
+3  6792 439 4121
+3  4393 10291 10819
+3  10820 10821 10822
+3  10823 10824 10638
+3  9325 8608 7099
+3  5813 4494 4493
+3  427 6174 2992
+3  10825 6819 10826
+3  10825 10826 10827
+3  10828 10829 10382
+3  8459 10193 8460
+3  5841 10830 5842
+3  2974 10831 10832
+3  2974 10833 10831
+3  10403 10834 7764
+3  6687 1481 6688
+3  7610 7609 10835
+3  7658 8087 7659
+3  10389 10836 10837
+3  745 8216 4120
+3  745 4120 7003
+3  4521 8853 9509
+3  4521 9509 10838
+3  9231 4645 7181
+3  10839 10840 9702
+3  4482 10841 10842
+3  4483 4482 10842
+3  10843 7397 10689
+3  6242 10844 10341
+3  1309 8676 8678
+3  1309 8678 1310
+3  5647 10845 5991
+3  10846 10845 5647
+3  10847 10848 10849
+3  2962 3983 3982
+3  2363 5003 8486
+3  10850 4232 7461
+3  509 511 10851
+3  9819 10852 2859
+3  10853 7340 9669
+3  10854 10853 9669
+3  5322 3753 7625
+3  10056 10567 10057
+3  10855 10856 10857
+3  9901 10220 7710
+3  9901 7710 9899
+3  2279 2198 2197
+3  319 10858 10859
+3  319 10859 320
+3  10860 10861 10862
+3  5427 3915 5425
+3  5219 10863 5220
+3  10864 5220 10863
+3  10865 4951 10866
+3  5184 5545 5185
+3  1503 10867 1504
+3  9529 10867 1503
+3  3706 1908 2378
+3  4858 10021 10868
+3  10869 677 676
+3  10870 10871 10872
+3  10873 10871 10870
+3  8686 10874 4296
+3  10280 2964 2965
+3  64 10875 199
+3  10876 10877 2640
+3  2639 10876 2640
+3  6694 10878 10879
+3  6863 7506 8992
+3  6624 4383 6625
+3  10880 10881 10882
+3  9311 6521 9312
+3  6944 4632 5114
+3  5295 10883 10884
+3  2525 10885 10886
+3  7527 2407 3400
+3  3803 1757 7421
+3  5933 5935 10887
+3  5652 1876 1875
+3  10888 2056 8440
+3  10847 10889 4802
+3  5622 5623 8308
+3  3062 9660 10190
+3  8515 10890 6967
+3  10891 10892 1975
+3  10893 10892 10891
+3  977 9583 6093
+3  10894 10895 5152
+3  8877 8878 758
+3  7152 4775 4773
+3  2637 10896 10897
+3  2329 2328 10898
+3  10899 1709 9188
+3  3397 1709 10899
+3  4370 10900 643
+3  10901 10839 10902
+3  7809 9794 10903
+3  3494 3496 9578
+3  10674 10676 7591
+3  6413 9443 10904
+3  10763 10904 9443
+3  10905 1613 10906
+3  7175 10454 10453
+3  10564 10907 5962
+3  10908 5165 6084
+3  5541 10909 901
+3  2206 2208 4015
+3  10910 10866 4951
+3  594 10911 10912
+3  10913 10914 10915
+3  10913 10915 10916
+3  7281 10917 7282
+3  2745 7279 10918
+3  7259 2368 10919
+3  10920 878 877
+3  2029 2726 1841
+3  5383 7138 5472
+3  10921 7280 7282
+3  3103 3100 5500
+3  10922 4692 10646
+3  3129 3128 10923
+3  886 885 6865
+3  7826 8582 7827
+3  10924 6896 10925
+3  10926 10927 10928
+3  5723 7689 7688
+3  4537 4536 1220
+3  4589 1442 4590
+3  2556 9655 1860
+3  440 442 10929
+3  10930 10279 10931
+3  2474 8116 9168
+3  10932 8378 10933
+3  10934 3667 10935
+3  927 929 10936
+3  927 10936 10937
+3  3319 10938 10939
+3  10940 10737 10941
+3  10942 10777 4976
+3  7753 6132 5200
+3  10943 10944 10945
+3  6975 1513 8054
+3  4563 10946 10947
+3  10948 8900 10949
+3  10950 10951 10677
+3  10952 10677 10951
+3  10953 10954 3923
+3  10953 3923 4019
+3  10955 10956 178
+3  10957 10958 10959
+3  8275 10960 10442
+3  10961 10962 10963
+3  10961 10963 7256
+3  1122 5904 10665
+3  10964 1122 10665
+3  4082 4084 10965
+3  10966 10967 10968
+3  10969 114 116
+3  7062 2765 2764
+3  10970 10971 10972
+3  10973 2544 2442
+3  10974 6588 9498
+3  6589 6588 10974
+3  10975 10976 10917
+3  6496 4835 9324
+3  8280 5509 5428
+3  10977 10978 10979
+3  3033 183 10980
+3  10981 10982 10983
+3  10981 1325 10982
+3  54 458 55
+3  8280 5428 10984
+3  2184 8280 10984
+3  10985 10986 10987
+3  8182 6117 10988
+3  10086 2476 4850
+3  10086 4850 1260
+3  3132 5213 3133
+3  8836 6777 6776
+3  7505 6953 5813
+3  10989 10990 2978
+3  7576 7559 7558
+3  10991 10992 5027
+3  5024 5027 10992
+3  4399 9135 10993
+3  4399 1627 9135
+3  10994 9155 2970
+3  9886 9887 8244
+3  10995 10846 10176
+3  562 9323 9322
+3  10996 9323 562
+3  204 203 10997
+3  6593 608 607
+3  10998 8717 8718
+3  3950 9028 3951
+3  10999 3951 9028
+3  11000 11001 11002
+3  11000 11003 11001
+3  9167 3993 412
+3  4830 2768 2918
+3  11004 7249 11005
+3  4660 2195 2194
+3  4660 2194 4661
+3  10912 10911 11006
+3  5132 3757 7248
+3  5132 7248 8665
+3  11007 8924 8923
+3  9223 11008 7564
+3  9223 7564 9224
+3  8023 11009 11010
+3  7223 713 6088
+3  11011 7486 11012
+3  8644 8643 10805
+3  1624 6181 6183
+3  2199 3436 11013
+3  11014 3258 1526
+3  10065 11015 10063
+3  9195 11016 7428
+3  9195 7428 11017
+3  529 11018 530
+3  920 524 6847
+3  457 9142 11019
+3  6313 2071 2070
+3  11020 42 11021
+3  3993 9167 11022
+3  1870 7455 11023
+3  3447 1845 1588
+3  4112 8516 11024
+3  2845 2844 11025
+3  2661 11026 11027
+3  2661 11027 2662
+3  9504 2581 8066
+3  5083 9575 10747
+3  11028 9798 9797
+3  11029 2276 11030
+3  3800 3799 1860
+3  5009 6957 3275
+3  11031 6097 11032
+3  8066 6832 10041
+3  7016 7018 10032
+3  792 10921 11033
+3  11034 11035 6053
+3  11036 11037 11038
+3  4739 6518 9224
+3  11039 4113 4114
+3  85 7570 86
+3  8148 6279 1857
+3  389 388 512
+3  1451 5721 11040
+3  1960 11041 11042
+3  11043 105 2220
+3  4367 11013 3436
+3  11044 11045 11046
+3  8446 7662 8996
+3  1214 1216 121
+3  3376 11047 11048
+3  6767 9775 6765
+3  11049 1239 11050
+3  3834 3837 11051
+3  1945 11052 11053
+3  5977 1863 5978
+3  2591 10339 5236
+3  7150 9192 7263
+3  601 603 1096
+3  5222 1 0
+3  10270 10796 8167
+3  1348 4392 6801
+3  1348 6801 2448
+3  3568 2901 7711
+3  3568 7711 8625
+3  3390 3389 9494
+3  7100 2799 11054
+3  10285 11055 3160
+3  262 1777 11056
+3  3815 11057 8328
+3  4326 11058 4328
+3  7622 11058 4326
+3  971 3369 972
+3  11059 9246 10555
+3  835 6694 10879
+3  835 10879 836
+3  9482 3668 4229
+3  11060 4804 4803
+3  11060 4803 6670
+3  5645 4162 4581
+3  4040 5275 11061
+3  5495 10476 10473
+3  9515 11062 2505
+3  6892 2505 11062
+3  3318 3320 8396
+3  11063 11064 10769
+3  11065 5155 8992
+3  4638 10486 11066
+3  11067 11068 11069
+3  6954 11068 11067
+3  11070 11071 11072
+3  260 11073 6385
+3  4706 11074 11075
+3  9108 4283 9109
+3  11076 11077 11078
+3  11079 11077 11076
+3  8687 11080 8688
+3  6909 6908 6633
+3  6631 6633 6908
+3  1173 2650 1171
+3  11081 11082 11083
+3  11084 11082 11081
+3  8655 11085 11086
+3  8655 11086 8654
+3  8721 6435 6837
+3  11087 7917 11088
+3  1935 9424 694
+3  8839 7606 795
+3  10317 3839 10318
+3  2601 5678 8450
+3  11089 11090 11091
+3  11089 11091 11092
+3  11093 6386 11094
+3  8713 5211 11095
+3  8713 11095 8712
+3  5381 5383 5472
+3  10124 9220 1482
+3  10124 1482 236
+3  9498 11096 5631
+3  8929 8930 7401
+3  2104 4348 5614
+3  4330 4891 4331
+3  11097 11098 11099
+3  9755 1304 9756
+3  4085 7397 10843
+3  1235 1234 7800
+3  2403 7665 8765
+3  3946 11100 3944
+3  8534 11101 8535
+3  2652 9446 7194
+3  5176 1414 5174
+3  5176 1412 1414
+3  5025 5024 10794
+3  6319 6309 10240
+3  11102 2018 2020
+3  3138 11103 11104
+3  469 466 8704
+3  469 8704 2462
+3  790 3968 8766
+3  10879 5531 9689
+3  10879 9689 11105
+3  913 3444 914
+3  1578 10723 11106
+3  11107 9780 88
+3  9300 6153 3590
+3  7682 5594 5596
+3  532 11108 1792
+3  11109 7923 6658
+3  11110 11111 11112
+3  11113 11114 10880
+3  9319 9318 55
+3  55 458 459
+3  221 11115 11116
+3  11117 11118 11119
+3  6510 11120 6511
+3  230 494 9828
+3  4087 7675 891
+3  5662 1164 1167
+3  637 9754 3962
+3  9427 1017 1019
+3  2353 2352 1115
+3  11121 11122 1724
+3  11123 1724 11122
+3  11124 11125 11126
+3  11127 6423 1020
+3  5300 11128 11129
+3  4282 11130 11131
+3  11067 1192 11132
+3  62 11133 9856
+3  9857 9856 11133
+3  9835 2061 8566
+3  10350 10485 10351
+3  9291 1884 2695
+3  1588 209 3447
+3  3871 7230 3869
+3  3871 7227 7230
+3  10477 6334 6333
+3  10259 11134 11135
+3  11136 11135 11134
+3  9924 9923 11137
+3  11138 11139 11140
+3  8573 11141 11142
+3  9239 6923 4792
+3  11143 9239 4792
+3  9353 3103 8987
+3  9353 3101 3103
+3  266 11144 6939
+3  6937 6939 11144
+3  11145 8604 11146
+3  7940 8604 11145
+3  11147 11148 1574
+3  11149 10012 2922
+3  5567 213 11150
+3  7215 5084 11151
+3  6530 11152 2219
+3  8517 1073 1072
+3  182 2870 2869
+3  183 182 2869
+3  8986 11153 9507
+3  10497 10496 1294
+3  2986 11154 8666
+3  2986 2985 11154
+3  9458 9971 552
+3  11155 8726 129
+3  7768 2899 7997
+3  1648 11156 3717
+3  9301 10219 9303
+3  11157 11158 6640
+3  2590 11159 2591
+3  8382 8495 11160
+3  11161 11162 11163
+3  3222 3224 11164
+3  11165 8465 5459
+3  5737 11165 5459
+3  8991 11166 8992
+3  8027 8028 1743
+3  11167 11168 10923
+3  8025 609 10382
+3  11169 5120 4779
+3  11170 11171 7956
+3  3220 3961 11172
+3  8381 11173 9432
+3  574 576 11174
+3  11175 10441 6851
+3  11176 8850 9657
+3  11176 9657 9090
+3  10964 10665 10757
+3  5750 10964 10757
+3  11177 11178 1030
+3  477 476 6910
+3  8932 5191 1102
+3  11179 3204 9670
+3  8772 4936 8487
+3  6361 5270 5269
+3  10223 11180 4809
+3  11181 9963 583
+3  11182 4277 6878
+3  11182 6878 11098
+3  10504 9110 9112
+3  10504 9112 11183
+3  10419 11184 11185
+3  11186 11187 11188
+3  1011 11189 11149
+3  1572 9161 596
+3  11190 5832 5834
+3  6935 1029 3794
+3  10493 6139 6138
+3  6388 1218 8613
+3  1960 1959 11041
+3  11191 661 9113
+3  10357 661 11191
+3  11192 11193 5235
+3  11194 11195 9717
+3  11196 1855 11197
+3  6435 1380 2624
+3  5654 3293 7264
+3  11198 8308 11199
+3  11200 11201 8769
+3  8637 8769 11201
+3  7632 7631 10516
+3  1507 1506 11202
+3  4854 811 1183
+3  2216 11203 8862
+3  6303 11204 6581
+3  6250 364 8782
+3  6405 11205 1760
+3  1010 11206 9201
+3  3748 3750 6992
+3  2563 11207 3598
+3  6481 5158 7087
+3  11208 8273 4152
+3  11208 4152 4151
+3  11209 11210 11211
+3  153 4217 4216
+3  11212 11213 11214
+3  3548 9947 9948
+3  3548 9948 3549
+3  11215 3984 7483
+3  2347 3984 11215
+3  8836 6776 8444
+3  1088 2025 979
+3  877 11216 473
+3  2796 5592 11217
+3  1747 10305 10304
+3  1747 10304 8659
+3  3546 11218 10321
+3  7820 11218 3546
+3  6366 7243 763
+3  10331 7661 11219
+3  10331 7658 7661
+3  9816 7910 707
+3  10294 7910 9816
+3  8404 1063 2236
+3  11220 10553 3674
+3  8028 8621 1743
+3  5224 1531 9131
+3  11054 1067 11221
+3  10848 10330 8475
+3  4579 9852 4580
+3  11222 1508 1510
+3  11223 11224 6602
+3  11225 1622 8674
+3  8074 4356 4418
+3  10847 10849 10889
+3  9993 3890 11226
+3  11227 1757 1756
+3  11228 1082 490
+3  3852 3854 11229
+3  1069 7371 3744
+3  957 956 6264
+3  6365 1027 11230
+3  11231 11232 11233
+3  9678 11231 11233
+3  10156 660 9413
+3  11234 4617 11015
+3  10065 11234 11015
+3  1608 1607 1385
+3  11235 3465 11236
+3  11237 5992 11238
+3  9345 8691 3046
+3  11239 8691 9345
+3  2466 180 2467
+3  4947 4076 4949
+3  4947 6645 4076
+3  8391 8656 1057
+3  11240 11241 11242
+3  3481 5012 3823
+3  3950 4341 11243
+3  9027 3950 11243
+3  9237 10865 11063
+3  10354 10353 9608
+3  9248 9247 11244
+3  11245 1125 9433
+3  11100 5471 11246
+3  5469 5471 11100
+3  1449 1448 11247
+3  9724 11248 9725
+3  11249 11250 11251
+3  559 689 556
+3  4282 4281 11252
+3  11253 11254 11255
+3  11256 6992 7062
+3  9494 6265 956
+3  11257 11258 9290
+3  573 537 2419
+3  11259 3438 4655
+3  8452 8451 11260
+3  8452 11260 11261
+3  39 2800 7998
+3  10591 5561 10377
+3  10591 10377 3672
+3  11262 11263 11264
+3  11265 11263 11262
+3  5635 7815 2841
+3  11266 1559 11267
+3  1462 1461 11268
+3  11269 6897 10451
+3  9880 11270 9881
+3  5887 350 837
+3  11271 5473 7137
+3  4081 3278 3446
+3  4081 3437 3278
+3  5127 11272 5128
+3  410 245 411
+3  1488 2038 4692
+3  8199 2835 11273
+3  2389 9178 7806
+3  4757 3176 4758
+3  11274 11275 5941
+3  91 94 8714
+3  1136 2257 11276
+3  11277 7745 11278
+3  7766 11279 7765
+3  11280 6297 6296
+3  8587 11281 7361
+3  7382 7381 9425
+3  6618 6024 11282
+3  11283 9241 7012
+3  11284 898 10652
+3  11071 11285 11072
+3  6369 7538 7537
+3  10308 9197 11286
+3  7711 7713 8625
+3  931 5635 2841
+3  5116 11287 5117
+3  5116 11288 11287
+3  8609 7096 7099
+3  726 6402 727
+3  712 711 56
+3  10055 2694 6638
+3  3708 9553 5779
+3  11289 7406 11290
+3  11291 151 8098
+3  9665 1349 2448
+3  8491 4390 2579
+3  7560 8129 11292
+3  8671 4932 4931
+3  8672 8671 4931
+3  10243 11293 10244
+3  8041 6516 10229
+3  11294 3087 9461
+3  11295 2628 2627
+3  6360 5151 5147
+3  6360 5147 4791
+3  8067 11296 8068
+3  9501 11297 11298
+3  1886 11299 8641
+3  3988 8054 8055
+3  5838 5840 312
+3  7619 11300 7620
+3  434 436 8493
+3  11301 7744 7743
+3  11302 6040 11303
+3  11304 11305 10611
+3  11304 11306 11305
+3  11307 11308 11309
+3  10208 5457 9704
+3  11310 11272 2383
+3  11311 3912 9715
+3  9023 8998 9024
+3  8999 8998 9023
+3  500 4101 501
+3  11312 8486 7169
+3  11313 3421 3423
+3  11314 11315 11316
+3  6329 11175 11317
+3  11318 5207 10850
+3  11071 11319 11285
+3  10512 11320 4161
+3  11321 4141 4140
+3  11322 11321 4140
+3  5720 11040 5721
+3  7753 5200 3137
+3  5066 5068 9621
+3  2888 9892 2889
+3  11323 11324 9008
+3  2482 11324 11323
+3  8020 11325 2957
+3  2789 3494 9578
+3  11326 5931 5930
+3  7351 8482 11327
+3  10351 10485 11328
+3  11329 9530 1503
+3  11329 1503 1502
+3  8621 9318 8622
+3  11330 11331 11332
+3  11333 8706 8705
+3  754 3825 11334
+3  11335 9615 4464
+3  4466 11335 4464
+3  11310 7557 11272
+3  2986 3332 3331
+3  8907 7217 10082
+3  10585 5531 10878
+3  2899 2898 5950
+3  11336 10629 11337
+3  5825 1041 5826
+3  11338 8445 8444
+3  6145 5095 11339
+3  11320 3097 4161
+3  796 10372 8896
+3  8251 929 1822
+3  8251 1822 8250
+3  10561 11340 11341
+3  11342 882 11343
+3  7060 11343 882
+3  11344 11345 11346
+3  11344 11347 11345
+3  1675 6113 11348
+3  3575 11349 8945
+3  3575 8945 11350
+3  11351 979 981
+3  2214 3266 8567
+3  5018 11352 11353
+3  2420 537 7753
+3  9422 11354 10519
+3  9691 11355 2459
+3  11356 7291 2780
+3  6813 384 10584
+3  5974 5973 2113
+3  8079 11357 7694
+3  948 82 1522
+3  11358 11359 11360
+3  3158 11361 3159
+3  11362 3756 3758
+3  11363 11364 11365
+3  11363 11365 11366
+3  11367 2512 2511
+3  10359 11368 10360
+3  3167 10360 11368
+3  7663 2756 7664
+3  11369 349 6112
+3  11370 9588 11371
+3  11370 11371 7308
+3  3982 3296 677
+3  6512 311 9543
+3  6514 311 6512
+3  6444 3957 7876
+3  11372 11373 11374
+3  4379 11375 11376
+3  11377 10048 10046
+3  3203 160 11378
+3  9671 3203 11378
+3  11114 11379 11380
+3  11381 4032 11382
+3  4459 10629 4460
+3  2705 1019 2082
+3  10230 3310 10327
+3  11383 3064 85
+3  6218 11384 7070
+3  7101 3791 3793
+3  11385 3791 7101
+3  9581 8522 10049
+3  4361 2988 2987
+3  6605 11198 11199
+3  6719 270 269
+3  4076 4077 4949
+3  9080 4057 1963
+3  11386 5327 11387
+3  9140 5964 6700
+3  4741 6835 11388
+3  6553 11389 11390
+3  3038 11389 6553
+3  11391 3673 5046
+3  4883 5112 4884
+3  3540 8643 402
+3  10009 6365 11230
+3  3769 11392 2281
+3  11393 6998 11394
+3  1353 11395 7588
+3  9979 6424 6426
+3  7376 11396 10575
+3  7376 7378 11396
+3  867 8197 11397
+3  2929 8352 11398
+3  8468 415 417
+3  7361 11399 11149
+3  7980 7979 3225
+3  3223 3225 7979
+3  10630 1582 11400
+3  1682 2327 6012
+3  11048 11047 6012
+3  7643 7952 7644
+3  11401 6206 11402
+3  11403 11402 6206
+3  8819 7642 11404
+3  7643 7642 8819
+3  6588 6590 8891
+3  11405 9907 9906
+3  8566 11406 2215
+3  11407 11408 9534
+3  2782 11409 409
+3  9192 7108 9772
+3  8652 7142 7144
+3  11410 7142 8652
+3  11411 8033 10043
+3  11412 10043 8033
+3  11413 5441 8267
+3  1974 11414 1975
+3  1974 5758 11414
+3  10786 9631 3316
+3  5380 526 9264
+3  6269 11415 11416
+3  11417 6269 11416
+3  11418 1101 1100
+3  11418 8149 1101
+3  717 2358 2357
+3  1043 1042 3538
+3  359 358 11419
+3  10958 10169 11420
+3  10958 11420 5138
+3  4531 10407 11421
+3  1824 1823 2163
+3  5574 5575 11422
+3  8886 9677 8887
+3  11423 4372 3815
+3  11424 10500 10499
+3  1699 1701 9815
+3  3115 9815 1701
+3  9540 11425 11426
+3  6609 11427 2450
+3  5914 11428 11429
+3  8973 8974 9890
+3  5234 11348 2689
+3  2082 2083 3384
+3  6932 1252 2697
+3  4201 4200 7721
+3  4201 7721 11430
+3  11431 990 9987
+3  3305 7933 11432
+3  11433 10981 10983
+3  11434 11433 10983
+3  1127 6702 2291
+3  8825 940 10605
+3  4667 3348 4668
+3  6887 6886 11435
+3  3346 3349 6473
+3  3346 6473 6472
+3  7544 11436 11437
+3  9474 1441 3499
+3  4480 8953 7920
+3  11438 6391 9289
+3  11438 9289 9288
+3  8968 11439 11440
+3  8968 11440 8967
+3  11441 11442 11443
+3  11444 1604 1209
+3  11445 5389 11446
+3  9725 2387 6536
+3  11447 8614 8616
+3  915 917 11448
+3  10171 11449 11450
+3  10170 11449 10171
+3  1316 11451 7531
+3  11452 6384 7679
+3  883 4531 11421
+3  855 10865 9237
+3  9254 9253 5052
+3  1429 11453 8869
+3  8360 11454 1109
+3  11455 11456 8230
+3  11457 9887 7031
+3  11457 7031 11458
+3  11459 778 6973
+3  3681 3683 7242
+3  5398 5397 5118
+3  11460 3095 3097
+3  7818 11461 11462
+3  7816 7818 11462
+3  6923 9239 6924
+3  11463 3543 10231
+3  11464 2862 5071
+3  11465 11466 11467
+3  10468 7964 10469
+3  8596 7964 10468
+3  11468 11469 11470
+3  9469 11471 302
+3  6306 11472 10623
+3  11473 9541 9540
+3  11473 11474 9541
+3  11475 10173 11476
+3  11130 11252 6289
+3  11130 4282 11252
+3  2945 3215 10634
+3  11477 11478 11479
+3  2946 11480 10019
+3  9064 2535 6721
+3  9064 6721 11481
+3  8302 11482 5470
+3  5469 8302 5470
+3  4910 11483 10345
+3  11484 11485 7400
+3  10732 2763 11486
+3  11487 11488 937
+3  1970 5137 1968
+3  1970 4416 5137
+3  6561 6560 467
+3  11061 5275 11489
+3  11490 11489 5275
+3  11490 5275 897
+3  11490 11491 4116
+3  4117 4116 11491
+3  6261 1564 10445
+3  6261 1565 1564
+3  8665 8501 11492
+3  11493 10826 5156
+3  11494 10590 2004
+3  11495 3498 5580
+3  5300 11496 10510
+3  5178 2269 8725
+3  11497 1376 9544
+3  9544 1376 868
+3  5790 5792 10450
+3  5572 11498 5573
+3  11499 11500 3619
+3  8534 2858 4005
+3  4004 8534 4005
+3  7357 9002 9003
+3  1925 8757 11501
+3  2823 2824 827
+3  4909 11502 1593
+3  11032 6097 5937
+3  11032 5937 11503
+3  2779 11356 2780
+3  11504 11505 11307
+3  10255 11506 11507
+3  8702 11508 3150
+3  4995 11509 4996
+3  6000 11510 7381
+3  6067 10994 9123
+3  11511 11512 7718
+3  11513 793 3454
+3  11514 11515 11516
+3  7690 1759 9514
+3  11517 7500 10106
+3  10107 10106 7500
+3  11518 2577 5558
+3  4839 10751 10752
+3  9320 4839 10752
+3  11519 7842 11520
+3  11519 7843 7842
+3  11521 9544 10814
+3  7672 10690 4354
+3  8149 11418 8150
+3  10559 10561 11147
+3  2016 1894 1893
+3  4681 2016 1893
+3  6895 6897 11269
+3  11522 11523 3876
+3  7609 5913 10835
+3  11524 3130 1381
+3  6091 11525 11526
+3  7396 1737 3363
+3  4356 9806 4418
+3  1858 10268 11527
+3  7872 9035 9034
+3  7872 11528 9035
+3  11529 5796 8232
+3  10338 11530 10336
+3  1284 1283 3604
+3  7797 3604 1283
+3  2470 5714 277
+3  3349 3348 4667
+3  7571 4697 86
+3  4164 7285 11531
+3  5766 11532 7104
+3  11533 1272 11534
+3  1270 1272 11533
+3  4632 4631 6422
+3  4346 2851 4347
+3  4346 11535 2851
+3  5279 11536 6458
+3  11537 5794 5793
+3  1634 1636 10698
+3  7875 10502 7520
+3  1031 1030 8481
+3  11538 3601 9917
+3  11538 9917 11539
+3  11540 11541 11542
+3  3182 3398 3180
+3  11543 11544 11545
+3  11546 11547 11548
+3  1715 2367 5575
+3  11549 11550 11551
+3  11549 11551 8105
+3  8236 6538 11552
+3  494 496 6829
+3  9828 494 6829
+3  11553 9753 11554
+3  11555 5848 11556
+3  1030 11557 8481
+3  11558 5849 11559
+3  1871 1870 9707
+3  3121 3123 9483
+3  1041 3121 9483
+3  2489 5609 1347
+3  4391 1347 5609
+3  11560 2694 11561
+3  263 265 3956
+3  11562 11563 3350
+3  11564 4467 9525
+3  10035 4323 11027
+3  10035 11027 11026
+3  5460 3712 5078
+3  5460 5078 11565
+3  1401 11566 9350
+3  4063 8651 11567
+3  10440 316 6852
+3  3193 11568 2977
+3  5675 11569 8511
+3  9149 1364 10527
+3  11570 3682 8103
+3  6051 8109 6052
+3  6912 6911 9327
+3  3858 3313 3314
+3  7568 5653 11571
+3  11572 11573 11574
+3  10350 10349 11575
+3  2589 2588 11576
+3  11577 9204 11578
+3  4956 4955 6081
+3  4956 6081 9627
+3  10856 10855 11579
+3  7837 2090 7834
+3  11580 6278 5545
+3  234 11581 11582
+3  11583 9587 9589
+3  10084 635 10085
+3  6036 11584 7351
+3  9107 11585 11586
+3  6098 11587 6099
+3  309 432 11588
+3  309 11588 307
+3  11589 10528 11590
+3  1780 9978 6861
+3  8308 1791 1793
+3  11252 6631 6908
+3  11252 6908 6290
+3  7907 7689 5723
+3  8832 8833 11591
+3  9293 9952 1918
+3  9912 11592 11593
+3  8372 8369 8909
+3  8372 8909 11594
+3  7437 5001 10689
+3  3534 3102 3340
+3  3534 3340 3532
+3  11595 11596 11597
+3  6235 3056 6236
+3  10533 5695 11598
+3  5694 11598 5695
+3  11073 5618 9147
+3  11599 11600 11601
+3  4624 6259 11602
+3  11603 11604 685
+3  6520 11603 685
+3  7409 4327 11605
+3  2077 5206 1961
+3  11606 5071 5725
+3  7148 7147 5471
+3  11607 11608 2418
+3  2554 2556 5090
+3  2554 5090 5092
+3  440 2766 3790
+3  11175 6851 5862
+3  5024 10992 8528
+3  6570 6569 7737
+3  3807 4610 3808
+3  11609 2847 897
+3  896 11609 897
+3  11610 6273 6272
+3  3905 5108 1557
+3  1003 1005 11611
+3  5943 5944 11612
+3  2064 5810 2065
+3  7577 11613 11614
+3  10223 2034 11615
+3  11616 4036 5453
+3  5463 5464 9208
+3  4143 5463 9208
+3  3210 3209 11617
+3  3306 3308 245
+3  11035 11034 10681
+3  10679 10681 11034
+3  1217 8221 8220
+3  11618 8695 4912
+3  11619 9914 11620
+3  9049 9048 4538
+3  6805 11580 11621
+3  11317 11175 8593
+3  1673 9782 11622
+3  11602 11623 2749
+3  11602 2749 11624
+3  3298 10653 9493
+3  4164 8237 4165
+3  11625 8309 3899
+3  2151 11626 11627
+3  9138 9819 11628
+3  2175 4173 4629
+3  4695 1155 1157
+3  7308 11629 7310
+3  1936 7865 1937
+3  2878 6568 7620
+3  8415 10740 11630
+3  11631 5122 2658
+3  9533 9535 11632
+3  5397 8132 5118
+3  5119 5118 8132
+3  11633 1443 1230
+3  1365 1443 11633
+3  11634 8473 11635
+3  11636 11637 1795
+3  1794 11636 1795
+3  11638 4506 11639
+3  11638 11640 4506
+3  8699 4626 7712
+3  1375 1374 3738
+3  2505 6892 2506
+3  2148 3701 7364
+3  5841 5716 10830
+3  4160 248 8601
+3  10394 11641 11642
+3  8383 11642 11641
+3  9259 590 3517
+3  5779 5781 5972
+3  10546 10415 10414
+3  10405 11643 10406
+3  7485 11644 3189
+3  955 957 8009
+3  11645 10402 10401
+3  11645 11646 10402
+3  11647 1517 11648
+3  11649 1517 11647
+3  10758 11650 11651
+3  1089 9431 7638
+3  11650 11652 4536
+3  1900 3866 1901
+3  2272 2824 2560
+3  4499 11653 11654
+3  2126 7147 7146
+3  10116 5317 10117
+3  935 6250 8782
+3  4178 4177 11655
+3  11656 11657 9823
+3  11658 4458 11659
+3  9519 11660 9963
+3  10034 9519 9963
+3  8407 11661 8408
+3  1083 11662 1084
+3  11663 2067 10680
+3  2277 2276 11029
+3  6556 8858 11664
+3  10603 8054 3988
+3  11551 11665 11666
+3  831 11667 11668
+3  7240 9703 8465
+3  11669 11670 1448
+3  11190 11413 5832
+3  11671 11672 1683
+3  11673 11672 11671
+3  11674 11675 10170
+3  8349 11675 11674
+3  11676 8802 8527
+3  5164 11677 11678
+3  4397 5479 11679
+3  4396 5479 4397
+3  4434 4433 120
+3  2951 5523 8917
+3  2840 2839 8134
+3  2304 11680 9250
+3  11681 2004 2434
+3  11682 6743 2700
+3  11682 11683 6743
+3  11684 1192 8027
+3  2982 11685 3746
+3  718 2357 8476
+3  492 8323 10951
+3  8322 10951 8323
+3  11686 6919 11687
+3  7520 11688 7518
+3  1127 2291 1128
+3  11136 11134 11689
+3  10373 5791 5790
+3  7814 11690 9697
+3  6224 6247 6225
+3  11625 11691 11692
+3  2118 11693 11694
+3  10168 1711 8831
+3  11695 10039 11696
+3  1155 3816 1156
+3  11697 6411 6412
+3  5368 4863 5860
+3  4864 4863 5368
+3  11514 11516 1259
+3  4464 9205 4465
+3  11698 11699 11700
+3  3050 11700 11699
+3  7996 4646 4645
+3  7996 11701 4646
+3  1212 11426 11702
+3  1212 8712 11426
+3  5335 11703 6985
+3  4333 8074 9951
+3  9910 9909 11704
+3  4498 11705 4499
+3  1029 6935 11706
+3  6638 2694 2691
+3  10402 11707 10400
+3  10402 11708 11707
+3  11219 11326 11709
+3  11710 1830 11711
+3  1828 1830 11710
+3  7693 8080 8079
+3  7693 8079 7694
+3  11712 6910 476
+3  4563 11713 10946
+3  6014 2433 194
+3  4621 6163 11714
+3  1679 11715 11716
+3  11397 8197 2367
+3  11717 11718 11719
+3  11717 11719 7383
+3  9411 11720 11721
+3  5240 3898 11722
+3  10911 11723 11006
+3  6278 57 711
+3  11724 11725 11726
+3  11724 11726 11727
+3  10292 11728 11729
+3  4375 1025 1024
+3  7149 11730 1839
+3  1962 5206 11731
+3  11732 1962 11731
+3  11733 5847 11734
+3  11735 10596 11736
+3  7991 10596 11735
+3  338 10748 339
+3  10650 11737 11738
+3  1733 8938 11127
+3  11739 11740 10397
+3  4075 11741 4074
+3  7314 10876 7315
+3  11742 8263 10717
+3  10270 11743 9168
+3  2926 10191 11744
+3  14 1033 1032
+3  1972 11745 11006
+3  11723 1972 11006
+3  516 3071 9799
+3  11746 1931 11747
+3  11748 11747 1931
+3  9596 11749 1928
+3  7500 11517 11750
+3  11751 11750 11517
+3  11752 9654 9185
+3  2936 2938 11753
+3  2936 11753 5581
+3  6935 6934 11706
+3  8729 11754 11755
+3  9068 11756 1167
+3  9775 10188 6765
+3  3682 3681 6501
+3  8031 9294 11757
+3  11758 6692 11308
+3  11759 11760 4882
+3  8365 8364 11761
+3  7386 5098 7887
+3  7454 280 279
+3  10158 9751 9750
+3  10158 9750 10159
+3  11762 9066 7212
+3  7775 2662 379
+3  378 7775 379
+3  11626 8281 11763
+3  657 6741 11764
+3  11765 1235 7799
+3  11088 11766 11767
+3  11768 3179 11769
+3  11770 11768 11769
+3  11771 11772 11773
+3  11774 11772 11771
+3  4724 11775 11776
+3  9407 761 760
+3  8422 8738 8423
+3  8422 9193 8738
+3  9104 4413 4412
+3  1572 1836 9161
+3  1571 1836 1572
+3  8940 253 11671
+3  3871 10753 7227
+3  2740 7227 10753
+3  505 9842 503
+3  11777 9734 8568
+3  11778 6086 6085
+3  4567 11017 7428
+3  11779 11017 4567
+3  8589 1558 11780
+3  7493 11585 576
+3  2879 6143 6610
+3  11781 11782 11783
+3  11784 12 11785
+3  11786 9172 9171
+3  11106 11787 11788
+3  9178 2388 11311
+3  9790 10413 7526
+3  4355 9806 4356
+3  8090 10202 6407
+3  691 9840 692
+3  3033 5802 183
+3  11789 8451 11790
+3  11791 11790 8451
+3  9565 9567 11792
+3  9565 11792 5084
+3  5105 1075 1078
+3  8771 11793 9666
+3  2353 8436 11794
+3  1529 11794 8436
+3  7973 6521 9311
+3  11795 11796 11797
+3  11798 11795 11797
+3  10303 6713 11799
+3  11445 11615 11800
+3  9163 10449 9782
+3  1663 11801 11802
+3  1663 3213 11801
+3  11803 9355 11804
+3  4704 11805 1081
+3  11205 6404 11806
+3  11807 7623 4318
+3  11808 6900 11809
+3  3763 9223 6196
+3  1262 1364 11810
+3  11810 1364 9149
+3  11811 10436 11812
+3  9228 4246 8780
+3  6494 4938 1985
+3  1401 1400 3022
+3  4780 4779 910
+3  2982 1243 10095
+3  11813 11814 5696
+3  11815 1853 1856
+3  11816 11817 11818
+3  6930 8935 9997
+3  1227 1229 7262
+3  7456 3052 3053
+3  5235 5236 8751
+3  5187 462 461
+3  7136 5640 8036
+3  7136 8036 11819
+3  2985 11820 11154
+3  8823 11821 8824
+3  8937 8824 11821
+3  6994 3780 11822
+3  11823 4069 11824
+3  11823 11825 4069
+3  3780 5824 11822
+3  11826 11827 11828
+3  4774 8942 4772
+3  9843 8042 9844
+3  3505 11829 10472
+3  11830 9419 4226
+3  1703 10640 5446
+3  1703 5446 7999
+3  2245 11831 2925
+3  2830 7863 2940
+3  11832 8177 8179
+3  11833 9535 6098
+3  3767 7452 8823
+3  11821 8823 7452
+3  8048 5337 5336
+3  11356 11834 7292
+3  6519 9946 1491
+3  11835 11271 10395
+3  11835 10395 10394
+3  10644 8129 11836
+3  5950 2898 5951
+3  9476 5951 9477
+3  3899 3898 4811
+3  4248 4247 6756
+3  5604 5811 4389
+3  11644 11837 5643
+3  11838 11839 11840
+3  5206 1962 1961
+3  4916 6457 6720
+3  4575 11841 11842
+3  1949 11843 10580
+3  11844 4370 8203
+3  11845 11846 1940
+3  9364 1940 11846
+3  4442 11847 2488
+3  11848 11849 4296
+3  2669 11849 11848
+3  6083 11850 3643
+3  6083 7000 11850
+3  11851 3792 3791
+3  11851 3791 11385
+3  7599 9630 4280
+3  11852 4955 318
+3  4954 318 4955
+3  11526 11853 11692
+3  7442 3451 3453
+3  4637 10486 4638
+3  11854 11855 5794
+3  3286 461 460
+3  4468 4467 11564
+3  4468 11564 9337
+3  2569 9373 11856
+3  11856 9373 10324
+3  11857 11537 7826
+3  11238 11708 10402
+3  2528 1247 1246
+3  10305 7645 7850
+3  11858 4361 11859
+3  197 196 11860
+3  5022 1727 5023
+3  11861 8503 8502
+3  11862 11863 11864
+3  11862 11864 1898
+3  7864 6661 6660
+3  11865 11866 11867
+3  5549 5551 11868
+3  9969 9706 11869
+3  11870 11871 11872
+3  3272 4145 4144
+3  11873 11874 7076
+3  1165 11875 11584
+3  11876 5916 11877
+3  532 534 11108
+3  11878 3361 8972
+3  1743 8622 1744
+3  10973 2545 2544
+3  4576 11842 6722
+3  4576 4575 11842
+3  6657 11109 6658
+3  9829 8492 11879
+3  11172 4219 3220
+3  2274 11448 11880
+3  5829 11448 2274
+3  7046 7975 7047
+3  1250 1252 6932
+3  650 8489 8993
+3  4273 4153 4152
+3  4273 4152 8274
+3  6137 6136 1467
+3  1465 6137 1467
+3  11881 33 11882
+3  11883 8934 11884
+3  11885 3733 3732
+3  11210 11886 5264
+3  9305 9304 10352
+3  11887 9305 10352
+3  11888 11889 11890
+3  4125 11889 11888
+3  11891 9606 11892
+3  1943 9606 11891
+3  6149 10888 8440
+3  6149 8440 4713
+3  190 8707 1684
+3  4676 11893 11894
+3  10723 9727 11895
+3  10723 11895 10724
+3  2141 10022 11896
+3  8913 2888 2773
+3  2460 495 494
+3  11897 11898 3736
+3  11899 3736 11898
+3  7192 7544 11437
+3  10163 6169 10164
+3  11445 11446 11900
+3  7907 6403 6405
+3  11901 10082 10081
+3  9375 5629 10927
+3  7135 11902 5641
+3  8115 9168 8116
+3  7600 7601 3795
+3  11903 5619 10432
+3  894 10176 4088
+3  7668 7667 7666
+3  8422 8424 9610
+3  11904 11905 4245
+3  11904 4245 11906
+3  9392 9404 1996
+3  9392 9071 9404
+3  8187 3795 7601
+3  1801 7367 7366
+3  5419 11907 11908
+3  10910 4951 11909
+3  5154 3288 5302
+3  11519 11910 7843
+3  11911 7843 11910
+3  11912 9956 9955
+3  8159 7340 10853
+3  2509 2508 8463
+3  2348 6021 11913
+3  9299 5051 11755
+3  11755 5051 10183
+3  404 403 11914
+3  404 11914 11915
+3  433 9196 8733
+3  433 8733 430
+3  3019 4284 202
+3  6869 6870 6979
+3  11916 8894 10071
+3  11183 11917 11918
+3  1506 11917 11183
+3  3489 652 7067
+3  9660 15 7105
+3  5409 11919 5408
+3  7794 11919 5409
+3  11920 6355 884
+3  11921 11922 1833
+3  11923 11922 11921
+3  9380 7628 9381
+3  5325 11924 7716
+3  6093 3195 173
+3  5059 10840 11042
+3  2287 1088 11351
+3  4134 6814 381
+3  11925 220 222
+3  4553 10437 4554
+3  5795 10908 10625
+3  8492 9829 9830
+3  5154 1579 1581
+3  2328 11926 10898
+3  2520 2522 5825
+3  265 3957 3956
+3  11441 11927 11928
+3  11366 6507 11929
+3  11366 11365 6507
+3  11930 2300 2302
+3  11931 11885 8188
+3  11030 11932 5824
+3  9128 8889 11933
+3  7286 2807 4405
+3  373 2807 7286
+3  11934 11935 6580
+3  11930 2302 9424
+3  7457 11936 7456
+3  671 670 11937
+3  5863 6853 7419
+3  1107 3847 3403
+3  4391 4806 11938
+3  4391 11938 4392
+3  7730 727 6402
+3  11939 7730 6402
+3  6328 6609 11940
+3  11941 11942 5351
+3  11943 11944 8285
+3  11945 11943 8285
+3  11946 454 11559
+3  10895 7422 6277
+3  11947 11948 11949
+3  11947 11949 7990
+3  4130 7550 5303
+3  4130 5303 11950
+3  11951 11952 11953
+3  8368 11951 11953
+3  8476 9921 8475
+3  3061 11954 3058
+3  6271 11954 3061
+3  896 8544 11609
+3  896 4405 8544
+3  11955 9089 11956
+3  11955 9676 9089
+3  1806 10460 1807
+3  11957 4135 10255
+3  2153 7160 2154
+3  11958 5949 11959
+3  9248 11340 11960
+3  8042 8041 10228
+3  11961 5555 9409
+3  10886 10885 11962
+3  11963 9596 1930
+3  11964 11965 722
+3  11964 722 11966
+3  11964 11967 11965
+3  11968 8746 8203
+3  11969 11970 11971
+3  7800 4869 2792
+3  7137 5473 5472
+3  11972 5388 8826
+3  3973 11973 11974
+3  11184 11975 11185
+3  2087 10180 2084
+3  10180 2087 11976
+3  4798 8403 11977
+3  11978 8403 4798
+3  11019 11405 11979
+3  9906 11979 11405
+3  10866 11064 10865
+3  3824 11980 11981
+3  4238 2911 4239
+3  7078 7079 11982
+3  10683 1429 9055
+3  3431 3433 11983
+3  3431 11983 11984
+3  4556 11985 7118
+3  8949 1135 11986
+3  4232 4233 2235
+3  11987 4257 4256
+3  11988 11989 10961
+3  11988 10961 11990
+3  11991 9965 11992
+3  11991 9966 9965
+3  1689 3016 1993
+3  11993 2014 2011
+3  11994 11993 2011
+3  7716 8962 7714
+3  11995 3458 11536
+3  11513 7523 11996
+3  370 372 6820
+3  8827 4958 6812
+3  11997 8827 6812
+3  6071 11998 10756
+3  1775 11998 6071
+3  5817 1550 5818
+3  5817 1548 1550
+3  10756 11998 262
+3  1902 1676 11999
+3  8383 11641 8384
+3  8695 8694 4912
+3  7420 7422 10894
+3  12000 5360 12001
+3  8725 2268 8147
+3  2190 601 9012
+3  2358 9905 12002
+3  12003 6075 6074
+3  12004 7714 8962
+3  3433 3067 8845
+3  2569 11856 4889
+3  537 536 7752
+3  990 12005 988
+3  7849 3026 7929
+3  3166 3167 11368
+3  12006 7664 148
+3  12007 12008 10073
+3  291 12007 10073
+3  12009 1417 12010
+3  12011 162 12012
+3  4919 83 7374
+3  4918 83 4919
+3  12013 10664 5903
+3  12014 11898 3106
+3  9660 7105 10190
+3  7423 1354 6477
+3  12015 12016 12017
+3  1890 9655 2555
+3  5135 10959 5138
+3  8762 9216 12018
+3  1758 2777 12019
+3  2686 348 2684
+3  2686 6396 348
+3  12020 12021 7532
+3  4649 11305 11306
+3  4649 11306 6574
+3  9601 12022 1926
+3  602 2213 1239
+3  9827 9974 6855
+3  6800 12023 9686
+3  2642 4002 2643
+3  1174 1176 10003
+3  2851 2850 4347
+3  10799 12024 10539
+3  10809 10835 12025
+3  6520 685 687
+3  10739 8421 12026
+3  10739 1395 8421
+3  8802 1811 8800
+3  11916 10071 12027
+3  12028 999 12029
+3  6354 12030 12031
+3  1924 2795 2794
+3  11171 11732 12032
+3  7956 11171 12032
+3  10003 8318 5418
+3  10003 1176 8318
+3  1640 12033 1637
+3  1640 6393 12033
+3  9387 5239 7553
+3  4040 11061 4041
+3  6005 10252 6003
+3  12034 12035 12036
+3  10580 12035 12034
+3  11547 12037 7301
+3  11548 11547 7301
+3  11154 8667 8666
+3  5602 10052 5603
+3  5362 5603 10052
+3  12038 10618 1606
+3  6411 9443 6413
+3  2069 1821 12039
+3  2069 12039 2066
+3  12040 9451 9452
+3  12041 12040 9452
+3  11160 11937 8382
+3  10713 12042 8123
+3  10033 12043 12044
+3  880 12044 12043
+3  12045 1392 12046
+3  1391 12046 1392
+3  4656 9538 12047
+3  8097 1738 1740
+3  4513 12048 4587
+3  4096 4097 11189
+3  12049 5527 12050
+3  3433 12049 12050
+3  10416 12051 12052
+3  11298 8611 1374
+3  8671 2660 4932
+3  10300 4932 2660
+3  9300 8916 10570
+3  6154 9300 10570
+3  12053 11937 1583
+3  12054 4117 10863
+3  12054 4115 4117
+3  12055 12054 5219
+3  4115 12054 12055
+3  9038 9037 9667
+3  10256 9539 869
+3  2564 2563 12056
+3  12057 6769 6768
+3  12057 12058 6769
+3  235 237 11644
+3  402 8643 403
+3  11721 11720 12059
+3  2461 2460 229
+3  5762 7008 3077
+3  12060 11911 11775
+3  2374 8479 12061
+3  12062 4601 12063
+3  4269 9102 9101
+3  4269 9101 4267
+3  9116 6218 7070
+3  8091 5311 5313
+3  12064 12065 12066
+3  5762 3077 1946
+3  12067 12068 12069
+3  11760 266 6939
+3  8300 1406 1408
+3  647 4489 2231
+3  12070 10814 12071
+3  12070 12071 7641
+3  464 9562 7013
+3  3962 9754 10363
+3  11668 9650 12072
+3  1562 1561 12073
+3  10096 1243 9420
+3  10095 1243 10096
+3  6172 9561 8206
+3  3144 6172 8206
+3  9300 3590 8916
+3  12074 1989 2754
+3  4863 3844 3387
+3  4863 4862 3844
+3  2171 2235 394
+3  9713 8111 4688
+3  10028 6782 3617
+3  9386 5239 9387
+3  1971 2130 5004
+3  1973 2130 1971
+3  4331 4891 10212
+3  4891 6887 10212
+3  3414 12075 10830
+3  848 7163 665
+3  12076 12077 12078
+3  12079 2043 9887
+3  12080 599 598
+3  12081 7466 3534
+3  12081 3534 12082
+3  12083 12084 11085
+3  12083 11085 12085
+3  12086 12087 12088
+3  2729 12087 12086
+3  6710 9804 6711
+3  9804 1635 6711
+3  12089 8674 8673
+3  11204 10509 6581
+3  12090 5533 12091
+3  8932 1102 4967
+3  455 457 8261
+3  3087 8670 3085
+3  3085 8670 7126
+3  8901 8900 11193
+3  8901 11193 11192
+3  10265 4142 2390
+3  3509 3508 7449
+3  3509 7449 7448
+3  12092 11717 12093
+3  9277 11814 11813
+3  7296 12094 9363
+3  8328 11057 5314
+3  2090 9761 2088
+3  1941 1940 12094
+3  9363 12094 1940
+3  12095 5311 6893
+3  12096 5311 12095
+3  12097 12098 12099
+3  12100 12095 6893
+3  9543 311 313
+3  9025 5042 11944
+3  5042 9025 9022
+3  11024 6869 6979
+3  11024 6979 4112
+3  10819 6450 6449
+3  12101 6450 10819
+3  10410 1025 11866
+3  3566 12102 12103
+3  12104 9487 12105
+3  12104 12105 12106
+3  2304 9250 2305
+3  6060 1007 1006
+3  11292 8129 10644
+3  10278 12107 12108
+3  12109 7708 7730
+3  6306 4266 11472
+3  9373 12110 10324
+3  6058 3135 4525
+3  6938 6940 11368
+3  12111 842 840
+3  4328 842 12111
+3  299 6306 12112
+3  12005 5250 5249
+3  12113 4816 10523
+3  4091 6918 5171
+3  12114 5268 12115
+3  12116 11924 10233
+3  8644 10805 934
+3  162 164 12012
+3  4310 1862 12117
+3  4497 7024 1444
+3  934 10805 6249
+3  10201 2419 2421
+3  7593 1654 1656
+3  12118 12119 12120
+3  7817 7816 7784
+3  12121 12122 12123
+3  11808 12122 12121
+3  10754 5257 7371
+3  11283 12124 9241
+3  6835 6679 6681
+3  12125 8613 8220
+3  4584 12126 4585
+3  12127 11790 12128
+3  2886 7903 2908
+3  12129 12130 6067
+3  9237 11063 9238
+3  11834 3359 12131
+3  6969 8514 4604
+3  6951 6950 9231
+3  12132 12133 1652
+3  1123 8929 7401
+3  7541 12134 10621
+3  12135 12134 7541
+3  12090 12136 12137
+3  510 7953 12138
+3  12139 12140 10213
+3  12141 11391 12142
+3  12143 7352 7703
+3  7703 7352 11327
+3  12144 1844 1837
+3  7857 6426 9991
+3  10630 12053 1582
+3  180 2200 2199
+3  12145 2200 180
+3  12146 11249 11251
+3  6140 12147 8067
+3  3358 8781 5066
+3  3373 2326 2645
+3  2496 2406 692
+3  12148 7035 7034
+3  4411 4414 2407
+3  9119 4286 12149
+3  9119 12149 2626
+3  1636 1008 10698
+3  12150 12151 12152
+3  12153 52 49
+3  6274 12153 49
+3  11433 11241 10981
+3  12154 10981 11241
+3  4584 7706 12126
+3  12155 7706 4584
+3  10053 8810 3470
+3  3363 10292 3184
+3  12156 12157 12158
+3  4852 12159 4853
+3  11882 10684 5036
+3  11882 10683 10684
+3  9457 12160 9971
+3  2533 11828 11827
+3  3400 2407 1788
+3  2499 2498 4275
+3  1631 5569 5570
+3  3973 3972 12161
+3  12162 12163 12164
+3  1096 12163 1097
+3  12165 2433 12166
+3  12165 12166 10833
+3  8848 5975 12157
+3  5344 7372 5345
+3  6647 6797 6648
+3  6775 6774 1295
+3  11943 12167 6408
+3  11945 12167 11943
+3  2651 2654 8379
+3  12168 2473 2472
+3  10702 12169 12170
+3  9470 7545 12171
+3  1172 7844 7843
+3  6943 12172 10294
+3  6943 10294 9816
+3  636 638 10005
+3  11817 12173 1932
+3  1933 1932 12173
+3  12174 5102 12175
+3  12176 1155 4695
+3  9289 3728 9287
+3  9289 10320 3728
+3  6348 2191 3098
+3  12177 12178 3666
+3  12179 12178 12177
+3  12179 11423 12178
+3  12180 4186 12181
+3  12182 12183 12184
+3  1430 1429 10683
+3  8999 101 103
+3  12185 101 8999
+3  11261 3850 8715
+3  1554 1556 11159
+3  6818 6805 11025
+3  273 2096 2337
+3  9298 5080 3853
+3  3471 3470 8810
+3  1547 1546 6192
+3  3057 12186 134
+3  10921 7282 11033
+3  8503 11861 11841
+3  12187 8503 11841
+3  1300 122 7210
+3  12188 12189 9393
+3  4827 8493 12190
+3  11842 10700 12191
+3  1294 10496 3424
+3  7999 5446 2441
+3  9920 8571 7405
+3  10184 3372 12192
+3  2467 180 2199
+3  5103 12193 10907
+3  11913 4457 4665
+3  11362 3758 6808
+3  6809 6808 3758
+3  686 3268 8838
+3  12194 2593 4836
+3  12194 11689 2593
+3  10902 10839 9702
+3  7522 12195 7523
+3  8022 284 12196
+3  8022 6498 12197
+3  8022 12197 284
+3  1065 1064 9774
+3  12198 12020 12199
+3  12200 12201 1608
+3  5681 12202 12203
+3  12204 12202 5681
+3  11695 11696 12205
+3  1002 1001 9556
+3  8449 12206 10472
+3  6179 6178 5799
+3  5801 5799 6178
+3  6179 5799 1942
+3  11407 10426 12207
+3  9817 12208 8757
+3  1117 4642 12209
+3  9489 5511 9490
+3  3117 11182 11097
+3  3116 11182 3117
+3  1656 8815 8438
+3  5302 8990 5155
+3  5896 12210 10511
+3  5896 12211 12210
+3  10697 1944 4868
+3  12212 9743 9742
+3  12213 12214 36
+3  3976 10540 7290
+3  6 3191 4
+3  12215 3043 3045
+3  9895 9818 5202
+3  5343 3043 12215
+3  3608 6481 2330
+3  11906 12216 12217
+3  482 12218 12219
+3  12220 12221 12222
+3  12220 10841 12221
+3  12223 7773 12224
+3  10636 10798 12225
+3  10941 8186 7170
+3  12226 11669 1448
+3  12227 8644 10711
+3  12228 2259 2258
+3  199 12229 7847
+3  12230 12231 2997
+3  12230 2997 12232
+3  2997 7231 2996
+3  12231 7231 2997
+3  12233 5462 12232
+3  12234 9252 12235
+3  782 784 4545
+3  10881 10546 12236
+3  12057 12237 12058
+3  8723 12238 8724
+3  453 11558 454
+3  5028 4353 3713
+3  12239 12240 12241
+3  4801 12242 4799
+3  3935 4799 12242
+3  11122 12240 12243
+3  12244 12245 12246
+3  12247 6193 6192
+3  7936 12248 7937
+3  7936 5911 12248
+3  2076 9203 635
+3  12249 12250 12251
+3  11290 5771 12228
+3  3818 10784 3819
+3  12252 4717 12253
+3  12252 12253 12254
+3  6066 3901 12129
+3  1111 10784 4979
+3  1111 4979 4981
+3  8034 2304 2303
+3  4478 12255 12256
+3  2577 9572 2578
+3  6517 12257 7149
+3  232 11269 233
+3  6895 11269 232
+3  5996 8100 5997
+3  1712 1711 10168
+3  1355 7423 12258
+3  1355 12258 5394
+3  5610 8567 3266
+3  7258 12259 12181
+3  5765 12181 12259
+3  2991 4090 2099
+3  9803 5452 4036
+3  12260 12261 3832
+3  1365 1367 1443
+3  3781 3783 11051
+3  237 1482 1483
+3  3934 3936 12262
+3  12263 8269 5530
+3  12264 12265 12266
+3  12264 12266 12267
+3  4763 508 507
+3  7119 7122 969
+3  6303 10000 11204
+3  11118 243 11119
+3  9754 5570 868
+3  12268 12269 12270
+3  12268 12270 12271
+3  963 8797 12272
+3  2252 2251 12273
+3  2252 12273 12274
+3  10084 3063 10190
+3  12275 12276 12277
+3  6579 6595 8752
+3  12278 8752 6595
+3  154 5167 155
+3  3217 3216 12279
+3  6533 3615 9353
+3  6533 9353 12280
+3  2946 12281 1341
+3  2947 12281 2946
+3  12282 651 12283
+3  8841 2524 2523
+3  8871 9796 12284
+3  8871 10903 9796
+3  11090 12285 12286
+3  11090 12286 12287
+3  11094 12288 12289
+3  9147 12290 12288
+3  6426 6425 9991
+3  8854 2740 2739
+3  12291 10409 8283
+3  11373 12292 11374
+3  12293 6093 6094
+3  12294 4345 7584
+3  10118 10120 1322
+3  4605 4419 10804
+3  11786 9845 10007
+3  12295 12296 12297
+3  7557 12298 11272
+3  9969 7835 9706
+3  813 12299 11591
+3  12300 10990 10989
+3  12300 6003 10990
+3  12301 12302 9374
+3  4595 11325 12303
+3  1976 12304 12081
+3  1527 8956 12305
+3  4894 7362 4445
+3  5961 5960 5010
+3  8892 2680 8115
+3  11527 10268 12306
+3  4223 4222 3987
+3  12097 12099 12307
+3  12308 12307 12099
+3  12309 12310 12311
+3  12312 12311 12310
+3  12034 12036 807
+3  6414 3108 9638
+3  6414 9638 9633
+3  9352 11467 5040
+3  11467 9874 5040
+3  11466 9874 11467
+3  12313 10081 10083
+3  1589 1846 4322
+3  161 9820 9177
+3  10325 6444 2676
+3  4271 11240 743
+3  1182 3350 11563
+3  4178 12314 12315
+3  1894 2016 4009
+3  12316 10112 5494
+3  12316 5494 5496
+3  192 191 822
+3  9111 11855 11854
+3  1111 1113 10784
+3  3819 10784 1113
+3  676 678 12317
+3  7926 2693 9225
+3  1595 1597 8989
+3  7824 10385 10387
+3  2510 2509 10978
+3  12318 3632 3227
+3  3226 12318 3227
+3  12319 12320 2686
+3  11498 11576 5573
+3  1274 8453 9127
+3  12321 4800 12322
+3  12321 12322 5701
+3  10825 8453 1274
+3  12323 11811 11812
+3  12324 2248 2247
+3  11966 722 723
+3  11966 723 8530
+3  12323 6217 11811
+3  1498 1497 12325
+3  4600 12326 953
+3  3803 1758 1757
+3  4719 12327 3233
+3  12328 6927 12329
+3  9562 2951 1509
+3  11796 530 11797
+3  530 5403 11797
+3  4414 12330 12331
+3  4413 12330 4414
+3  721 12332 6760
+3  9235 12333 9783
+3  1363 9209 5464
+3  11975 12334 11185
+3  497 2745 10918
+3  6017 12335 10480
+3  6017 10480 6018
+3  2799 4410 1923
+3  11411 12336 3208
+3  3404 12337 3787
+3  3788 3787 12337
+3  1683 1682 11047
+3  9360 9359 2385
+3  2386 2385 9359
+3  4692 2038 4693
+3  9706 2090 3205
+3  12338 10722 12339
+3  10169 10171 6946
+3  12340 9781 12341
+3  5016 12341 9781
+3  3576 10001 2261
+3  1767 3483 3485
+3  10922 10991 5027
+3  2999 10922 5027
+3  1550 12342 12343
+3  1550 12344 12342
+3  10886 11962 7419
+3  12345 12346 11094
+3  9576 7265 7185
+3  12347 4426 12348
+3  12347 12348 12349
+3  11427 12125 10789
+3  3586 2673 2672
+3  12350 6476 12351
+3  11093 12346 10334
+3  6622 864 12192
+3  7304 10458 10457
+3  12352 12353 12354
+3  7859 9668 2109
+3  3696 3221 10800
+3  12184 12183 12355
+3  2733 12356 44
+3  9377 9376 12357
+3  12067 11568 12068
+3  8432 1242 9372
+3  3020 204 3311
+3  12358 9771 12359
+3  7277 4447 12360
+3  12361 146 1013
+3  987 12357 9376
+3  1071 1070 7683
+3  10773 3276 5256
+3  493 12362 10069
+3  11235 3491 3465
+3  12363 12364 12365
+3  1672 9163 9782
+3  12256 9992 8744
+3  1944 11052 1945
+3  12366 12367 12368
+3  3914 12369 3913
+3  8669 2284 6151
+3  10542 8225 5183
+3  5181 10542 5183
+3  3837 3836 9053
+3  3837 9053 12370
+3  642 644 4905
+3  7434 4049 6850
+3  12371 4049 7434
+3  12361 1013 12372
+3  752 6734 12373
+3  11914 8644 12227
+3  11914 12227 11662
+3  11164 3224 3151
+3  5350 10194 10251
+3  8771 9666 8772
+3  10931 11507 10487
+3  4244 9229 12216
+3  1086 12374 1087
+3  855 12375 552
+3  12376 7050 6413
+3  950 952 12377
+3  5089 12378 11493
+3  5478 6878 6877
+3  3742 5947 8722
+3  12136 11574 12379
+3  4446 2396 4913
+3  2636 10896 2637
+3  1923 4409 1924
+3  12380 12381 12382
+3  7534 7237 10824
+3  7534 6268 7237
+3  6213 6212 2365
+3  1791 1810 1809
+3  6269 5004 6270
+3  11952 4472 12383
+3  11953 11952 12383
+3  902 1736 1735
+3  2083 8877 757
+3  5698 12384 3417
+3  9478 7994 3519
+3  8760 3163 3162
+3  8760 12385 3163
+3  2808 4613 1852
+3  8861 12386 12387
+3  12388 12387 12386
+3  10260 591 3596
+3  10260 3596 10258
+3  10103 12389 12390
+3  12391 12392 2243
+3  2241 2243 12392
+3  9011 8924 9961
+3  8355 12393 452
+3  1612 8355 452
+3  2389 2388 9178
+3  12332 721 1450
+3  8529 6376 4516
+3  8558 3764 6197
+3  12394 7777 12395
+3  8563 1044 5139
+3  8139 5139 1044
+3  6893 5311 8091
+3  12396 7345 7344
+3  3558 7710 10220
+3  3882 9448 7885
+3  10664 12397 10665
+3  12398 2044 6816
+3  212 9040 9039
+3  5244 12399 962
+3  12400 12399 5244
+3  4648 443 3267
+3  9039 2214 2216
+3  5397 5396 3568
+3  3569 3568 5396
+3  3322 3324 8935
+3  3324 5642 8935
+3  1315 1314 12401
+3  6753 6710 2917
+3  2419 537 2420
+3  8168 7504 5812
+3  103 102 6698
+3  9430 12402 9227
+3  4738 12403 5735
+3  4738 5735 4735
+3  12404 6259 12405
+3  11602 6259 12404
+3  2471 2470 4965
+3  12245 11053 11052
+3  660 2924 10197
+3  7806 4349 12406
+3  6774 4329 1296
+3  12407 12408 12409
+3  5704 5706 845
+3  1184 8833 12410
+3  12310 12241 12312
+3  11121 12312 12241
+3  9626 8047 7896
+3  3897 11722 3898
+3  9317 4683 9315
+3  10931 10279 10024
+3  10457 7305 7304
+3  7528 7305 10457
+3  1214 8167 1215
+3  3080 3079 12411
+3  3080 12411 3992
+3  8028 11330 11332
+3  9130 625 12412
+3  9130 12412 7932
+3  6626 6603 10
+3  12413 6626 10
+3  12414 10008 9844
+3  11968 8203 8204
+3  8098 151 6762
+3  11501 8757 12208
+3  12415 11142 12416
+3  12417 12415 12416
+3  12418 12419 12420
+3  5344 3511 5284
+3  2982 8188 2983
+3  3476 12421 272
+3  2093 2092 7328
+3  9162 2091 2093
+3  1084 11662 10265
+3  9566 6637 6639
+3  12422 12423 6999
+3  9891 2451 12424
+3  1827 1826 6215
+3  1827 6215 7299
+3  6550 6552 7063
+3  12425 10630 10629
+3  12426 6469 10108
+3  12427 12428 12429
+3  12427 12429 12430
+3  12431 9978 7365
+3  12432 1507 12433
+3  1505 1507 12432
+3  7876 265 264
+3  12434 12435 12436
+3  262 11056 259
+3  2989 2991 8632
+3  6255 6256 12437
+3  12438 1575 2929
+3  2447 4701 5111
+3  3037 5111 4701
+3  2990 3537 9622
+3  6594 6596 9399
+3  12439 11586 7492
+3  10239 12439 7492
+3  5178 8726 11155
+3  12122 11808 2037
+3  7284 367 2458
+3  5322 733 3754
+3  12440 6206 11401
+3  3936 4147 1149
+3  3584 12012 3585
+3  11675 5673 12441
+3  11675 12441 11449
+3  9919 8732 8733
+3  2199 11013 2467
+3  12442 11013 4366
+3  3759 12443 3760
+3  12444 12443 3759
+3  12445 2155 4532
+3  10584 3130 382
+3  3783 10790 3834
+3  8965 7012 7011
+3  6547 6549 12446
+3  3438 3440 12447
+3  1352 2183 1353
+3  11395 1353 2183
+3  11807 1559 7623
+3  12448 6017 6019
+3  12335 6017 12448
+3  6583 11005 7743
+3  3505 12206 165
+3  5785 12449 5786
+3  12449 7676 5786
+3  9302 12450 12451
+3  9302 12452 12450
+3  1930 1929 10433
+3  4051 10093 4052
+3  2755 1991 2890
+3  2012 12453 12454
+3  2012 12454 4871
+3  11631 12455 8174
+3  9033 12456 12457
+3  10556 6061 2053
+3  10341 10844 12458
+3  8513 11129 11128
+3  4126 4128 9092
+3  12459 4126 9092
+3  6195 2838 12224
+3  9705 3207 6741
+3  11164 4099 3222
+3  10804 3807 3809
+3  9124 12460 12461
+3  12462 9124 12461
+3  9269 10671 8093
+3  4166 12463 7277
+3  2302 2301 6045
+3  2647 1249 6472
+3  10990 6003 10498
+3  6306 10623 12112
+3  1801 7615 7614
+3  120 122 12464
+3  12465 12466 9190
+3  8196 9383 7935
+3  2567 6488 12467
+3  2567 12467 12468
+3  7666 12469 7668
+3  9006 7668 12469
+3  8294 8293 7858
+3  10006 2656 2655
+3  5541 5453 10909
+3  7909 2381 1692
+3  6949 2242 6947
+3  4331 3702 12470
+3  4042 373 7286
+3  4040 4042 7286
+3  7235 3115 3114
+3  7235 3114 5727
+3  8212 1473 3993
+3  10503 2609 9110
+3  10503 9110 10504
+3  11967 12471 9867
+3  4793 11967 9867
+3  4175 3367 3366
+3  12472 8572 8574
+3  9846 8572 12472
+3  1694 7735 1695
+3  1041 5825 2522
+3  9139 5962 5964
+3  9139 5964 9140
+3  6904 6901 8861
+3  1935 11930 9424
+3  4024 1473 8212
+3  8059 12473 8061
+3  12474 8061 12473
+3  6441 4037 4039
+3  5318 12475 5316
+3  12456 8885 12476
+3  12457 12456 12476
+3  12477 12478 10746
+3  12479 12358 3299
+3  12480 12481 6952
+3  11055 12482 12483
+3  3160 11055 12483
+3  12484 5718 95
+3  11317 12485 6330
+3  7685 12486 12487
+3  7685 12487 7687
+3  318 4954 319
+3  6869 319 4954
+3  5541 11616 5453
+3  7056 9108 3068
+3  12488 12489 4588
+3  12490 11975 11184
+3  4320 9539 1982
+3  4234 4236 12491
+3  1225 11170 4950
+3  9620 12492 9621
+3  1094 6682 1092
+3  5881 6682 1094
+3  6318 6319 10240
+3  10240 6309 6310
+3  12493 4615 4614
+3  12277 12276 2954
+3  2953 12277 2954
+3  12494 9271 1461
+3  4969 3562 1653
+3  12495 10718 12496
+3  12497 221 223
+3  7450 7449 7673
+3  12048 12498 2874
+3  5941 5943 9818
+3  9895 5941 9818
+3  10588 10162 9936
+3  12499 6968 12500
+3  1638 12501 12502
+3  12503 2647 10077
+3  12504 3181 12505
+3  12506 5281 10857
+3  1728 6659 2328
+3  3098 3099 5426
+3  12507 12508 8548
+3  12507 12509 12508
+3  1839 11730 2008
+3  7210 4664 5828
+3  10898 12510 11325
+3  8893 7198 7197
+3  9780 12511 8013
+3  6704 5954 4896
+3  133 274 1938
+3  532 12512 533
+3  6055 6056 9277
+3  10281 3533 12513
+3  12514 12202 12204
+3  6614 12515 9821
+3  12516 12515 6614
+3  7590 4710 2233
+3  11557 226 2570
+3  8439 3695 1816
+3  1452 10326 12517
+3  88 12518 484
+3  2061 11203 11406
+3  12018 9216 12394
+3  12519 8001 8000
+3  10239 7492 12520
+3  12521 12522 4007
+3  11490 4116 11489
+3  8754 12523 12524
+3  11674 10170 10169
+3  11674 10169 10958
+3  773 4324 10616
+3  11151 9583 977
+3  11151 977 976
+3  12525 10838 12526
+3  12525 12526 12527
+3  9845 9844 10008
+3  10302 1924 4409
+3  5627 1392 6986
+3  10550 4834 2152
+3  4783 12458 12528
+3  2870 12529 2871
+3  3436 2201 5598
+3  12530 7913 12531
+3  7987 4379 4378
+3  67 66 20
+3  12532 2300 11930
+3  93 1245 1244
+3  12533 12534 11834
+3  10625 6655 6656
+3  3374 3373 12535
+3  8202 6667 7109
+3  7111 8202 7109
+3  7585 4345 12536
+3  7220 12537 7218
+3  12538 12537 7220
+3  11819 5548 5547
+3  12539 5297 2941
+3  12323 3001 6218
+3  10340 10110 10341
+3  12540 12541 8994
+3  12542 11582 12543
+3  7790 12544 12545
+3  433 432 309
+3  6068 6067 4157
+3  9144 920 12546
+3  5939 11131 12547
+3  7172 3916 12548
+3  3917 3916 7172
+3  9973 6855 9974
+3  6854 6855 9973
+3  12549 5858 12550
+3  5742 7380 12551
+3  11628 9892 8913
+3  4143 9208 6945
+3  11961 5556 5555
+3  10535 10534 12552
+3  10444 3198 12553
+3  10444 12553 12554
+3  12555 5636 5384
+3  166 5278 12439
+3  4458 4388 11659
+3  283 12196 284
+3  6036 4075 11584
+3  2835 10998 11273
+3  1681 1726 1682
+3  12556 11598 5694
+3  12556 12152 11598
+3  10672 7392 12557
+3  12558 8559 12559
+3  536 5904 1121
+3  64 63 10875
+3  2591 11159 10339
+3  12358 1805 9771
+3  9202 7707 12560
+3  8508 9586 12561
+3  8917 5523 5522
+3  5198 12562 10610
+3  9780 9779 88
+3  3001 4438 3002
+3  6500 10035 11026
+3  11770 12563 12564
+3  11770 11769 12563
+3  8849 4558 4929
+3  8849 4929 8003
+3  7623 2534 11827
+3  10928 12565 12566
+3  10334 10749 338
+3  12467 6488 12567
+3  5978 10967 10877
+3  1863 10967 5978
+3  7047 10901 6684
+3  1368 10039 11695
+3  12568 3600 12569
+3  3399 8782 3400
+3  9827 9076 12570
+3  9827 12570 9825
+3  11997 6812 12571
+3  12572 6505 3338
+3  4828 10299 11749
+3  10277 10279 10930
+3  1168 6910 12573
+3  4343 11243 4341
+3  10415 5830 10416
+3  12574 7597 833
+3  1502 1504 7724
+3  5560 5888 10377
+3  9715 3912 12575
+3  11296 1487 1489
+3  9805 10655 7892
+3  10269 10655 9805
+3  10047 1323 1325
+3  4548 1323 10047
+3  10157 12576 6540
+3  12577 4613 11152
+3  12578 9469 302
+3  12579 9281 9280
+3  12579 12580 9281
+3  1001 5283 5285
+3  12581 1768 5815
+3  5128 12298 3044
+3  12049 8845 6307
+3  12582 6780 1388
+3  12583 10995 12584
+3  12583 12584 12585
+3  12584 10995 10176
+3  7209 2572 6817
+3  2843 7209 6817
+3  11652 10206 1222
+3  9838 12586 2630
+3  3168 3170 5843
+3  12587 3331 3333
+3  12588 12587 3333
+3  6317 12314 2297
+3  12589 12590 12591
+3  4920 4921 4279
+3  11023 12592 8456
+3  3233 12327 3234
+3  12593 6751 6750
+3  8297 8299 6770
+3  4430 8538 3270
+3  12594 8538 4430
+3  3503 12462 3501
+3  12595 5186 5185
+3  6084 5165 5166
+3  1870 11023 3709
+3  10655 1021 12596
+3  1373 9361 9501
+3  12589 12591 7871
+3  12589 7871 3281
+3  11272 5127 2383
+3  710 2657 711
+3  711 2657 5545
+3  12597 4616 9440
+3  9441 9440 4616
+3  2698 5920 2699
+3  7135 5641 5640
+3  12598 4454 4453
+3  5447 7281 7280
+3  6277 2249 8155
+3  10568 1514 3259
+3  11227 1756 6276
+3  766 12220 12599
+3  1527 3301 8955
+3  3084 12179 12177
+3  7125 6493 4860
+3  10672 12557 9133
+3  7267 4714 12600
+3  2324 10115 2325
+3  10603 6975 8054
+3  10603 8347 10602
+3  5446 10640 10641
+3  12601 2721 2720
+3  5908 12601 2720
+3  2422 2424 8874
+3  12602 12291 12603
+3  4810 11691 4811
+3  12359 9771 6617
+3  12604 2675 6830
+3  825 4600 4602
+3  7907 134 6403
+3  10336 11530 3922
+3  2466 178 180
+3  198 12605 3648
+3  643 12606 644
+3  12607 2618 2620
+3  12608 12609 9957
+3  11604 12610 685
+3  12611 12612 9016
+3  9017 12341 5016
+3  3269 4430 3270
+3  696 1936 693
+3  696 9662 1936
+3  12613 12614 12615
+3  816 815 12616
+3  10436 10438 12617
+3  8520 5816 5818
+3  9921 9920 8475
+3  6752 11188 12618
+3  5121 5123 12619
+3  12620 12621 12622
+3  5098 7828 7887
+3  7341 5956 6704
+3  12171 1574 9470
+3  11412 2303 5988
+3  7728 7670 5392
+3  12193 9041 9042
+3  3143 3142 5536
+3  12623 11631 2658
+3  12624 3143 10023
+3  5988 2303 2305
+3  11580 4583 6278
+3  10428 12625 9454
+3  9540 11426 12626
+3  9540 12626 11473
+3  548 5887 12627
+3  12628 11971 12629
+3  386 387 6635
+3  2586 1895 12630
+3  2844 6818 11025
+3  3796 6628 3797
+3  12178 2681 2683
+3  4841 1422 4842
+3  5801 5436 5433
+3  5801 5433 5800
+3  3572 3574 6398
+3  8036 8035 12631
+3  8256 3259 3261
+3  12632 12633 2336
+3  12632 2336 2335
+3  5895 5276 5277
+3  7026 6235 1444
+3  8086 10330 10848
+3  3329 3328 6564
+3  3329 6564 2170
+3  4217 11935 11934
+3  12634 10718 10717
+3  12496 10718 12634
+3  11384 3003 12635
+3  5701 6381 12636
+3  5701 12636 12321
+3  12637 12638 12639
+3  10732 12638 12637
+3  2315 12640 2316
+3  2315 8461 12640
+3  11562 12360 4913
+3  12641 12642 12643
+3  11897 12643 12642
+3  8750 5235 8751
+3  12644 12645 10565
+3  2002 2004 11681
+3  6014 2002 11681
+3  1655 5468 8815
+3  6187 8961 12646
+3  6230 12647 6231
+3  10299 4856 4855
+3  11205 11806 12648
+3  12648 3560 11442
+3  8179 12649 11832
+3  12650 12651 276
+3  12485 12125 11427
+3  6609 12485 11427
+3  1713 1715 2031
+3  10091 9060 9062
+3  10091 9062 12652
+3  12653 3359 12534
+3  12653 12534 12654
+3  12216 5342 12217
+3  11007 12655 10114
+3  254 1304 9755
+3  254 9755 255
+3  2713 10849 2714
+3  2804 5530 2805
+3  11640 12656 12657
+3  12658 12656 11640
+3  12659 2654 2653
+3  4684 10698 4179
+3  10167 10168 12660
+3  1251 1810 5623
+3  5337 7465 8520
+3  12661 4747 12662
+3  11031 12663 12664
+3  7154 12663 11031
+3  3489 653 652
+3  9203 10085 635
+3  6060 6059 1007
+3  12665 12666 1705
+3  8592 12152 12151
+3  12667 10661 6418
+3  7178 7009 6057
+3  3716 8316 9281
+3  4083 12668 4084
+3  4083 1077 12668
+3  3265 3266 2214
+3  12669 3766 3768
+3  705 5843 6644
+3  7261 4266 6306
+3  6058 2239 542
+3  12303 3535 4596
+3  1786 5803 8920
+3  8919 1786 8920
+3  4803 10889 2713
+3  7603 7211 7604
+3  9941 4108 12670
+3  12134 12671 12672
+3  12673 12671 12134
+3  9939 9941 12674
+3  6958 9082 9081
+3  10446 2863 2862
+3  11127 8938 6423
+3  8513 11128 8781
+3  12675 12676 12677
+3  12675 12677 10464
+3  12678 12546 3234
+3  1641 12679 1642
+3  1642 12679 12244
+3  5902 5901 12680
+3  6394 11053 12679
+3  12681 8590 8918
+3  8657 3155 8590
+3  6351 12682 12683
+3  12684 12685 12686
+3  12687 9716 12688
+3  10087 7586 12689
+3  12690 12577 6530
+3  12377 10027 10087
+3  10087 10027 4254
+3  10087 4254 4253
+3  6562 10829 10828
+3  12691 12692 12693
+3  12691 8247 12692
+3  9759 5696 12694
+3  1702 12665 1705
+3  4566 12694 12695
+3  12152 10533 11598
+3  9759 5694 5696
+3  12694 5588 12695
+3  960 12696 10133
+3  960 10133 958
+3  8592 12681 10533
+3  8592 10533 12152
+3  10661 10663 12697
+3  9885 12698 9402
+3  2467 12442 12699
+3  12700 11634 11635
+3  8804 8803 12701
+3  3563 1945 11053
+3  12702 4123 12229
+3  12702 12703 4123
+3  12704 11482 8302
+3  12704 12703 12702
+3  12705 7828 10102
+3  1542 5867 2902
+3  12706 8770 12707
+3  11185 12334 8471
+3  11966 9597 11964
+3  11966 12708 9597
+3  9597 12708 9600
+3  12709 5637 5636
+3  12709 8530 5637
+3  12709 12708 8530
+3  12710 3714 3716
+3  299 12112 300
+3  2597 12711 12712
+3  12713 8091 7603
+3  6374 10530 6375
+3  12714 12577 12690
+3  6607 2698 11198
+3  12715 12716 9400
+3  11162 12717 4727
+3  11161 12717 11162
+3  11455 4728 4727
+3  11455 4727 12717
+3  4727 4729 9088
+3  2662 7037 379
+3  11027 7037 2662
+3  7037 4323 6675
+3  11027 4323 7037
+3  10167 12718 8488
+3  10461 3506 9673
+3  11081 11083 10432
+3  3468 8236 12719
+3  12720 12721 10957
+3  12722 12718 10167
+3  12723 957 12724
+3  12724 957 12725
+3  12725 12726 12724
+3  12726 12725 12727
+3  9038 12726 12727
+3  12723 8009 957
+3  3209 12715 6579
+3  7939 8604 7940
+3  810 809 12723
+3  809 8009 12723
+3  8009 809 7524
+3  6946 12728 6891
+3  10171 12728 6946
+3  7176 7177 571
+3  7176 571 572
+3  696 695 12729
+3  11999 2081 1900
+3  9037 1378 8721
+3  9036 1378 9037
+3  9036 6170 1378
+3  6170 12581 1378
+3  9774 12730 10766
+3  8624 12731 10960
+3  12731 10493 6138
+3  12732 8442 4180
+3  4180 4181 12732
+3  2832 2831 6122
+3  12733 12734 1351
+3  12734 9607 1351
+3  12733 1351 10558
+3  4405 10965 8545
+3  4082 10965 4405
+3  12034 807 806
+3  12034 806 820
+3  7764 558 10403
+3  9808 6965 9809
+3  6963 6965 9808
+3  9002 5802 286
+3  286 5802 9146
+3  4703 1654 7593
+3  4440 12735 3028
+3  3028 12735 12736
+3  2770 3028 12736
+3  12737 2770 12736
+3  9067 12738 10725
+3  9067 9066 12738
+3  7185 7265 12600
+3  11506 3013 12739
+3  470 854 471
+3  9858 9859 12530
+3  6728 8867 11538
+3  6728 11538 6729
+3  8257 12740 6742
+3  12740 2700 6743
+3  12740 6743 6742
+3  12740 2701 2700
+3  4102 12741 4103
+3  11725 12650 2028
+3  12742 7314 12743
+3  12742 12743 10421
+3  8946 11349 9858
+3  2028 12650 275
+3  2028 2030 11725
+3  785 7723 3696
+3  785 787 7723
+3  787 7429 7721
+3  6245 6244 12744
+3  7323 7325 12745
+3  10883 12745 7325
+3  10883 12746 12745
+3  12747 11829 3504
+3  3505 3504 11829
+3  4536 11652 1221
+3  748 4529 6000
+3  10238 4057 9080
+3  9079 4452 10238
+3  12748 12749 12750
+3  5257 5712 2469
+3  10238 4058 4057
+3  7316 12743 7314
+3  12751 12752 12753
+3  12749 12754 12750
+3  12755 2186 12756
+3  12756 4353 9980
+3  12756 2189 4353
+3  2186 2189 12756
+3  2184 2186 12755
+3  2184 12755 11763
+3  10305 7850 10306
+3  12757 10306 7850
+3  12757 12758 10306
+3  12640 8461 11895
+3  11858 10595 7991
+3  11858 12759 10595
+3  7991 10595 10596
+3  12624 3742 8722
+3  8005 5393 9865
+3  12760 5965 5161
+3  12760 5161 12761
+3  5965 5162 5161
+3  12762 5162 5965
+3  5241 11278 4898
+3  6392 11438 12763
+3  6391 11438 6392
+3  8706 5062 4054
+3  9800 12764 11665
+3  9800 11665 9799
+3  12765 12766 1357
+3  6092 11691 4810
+3  6911 7547 12767
+3  6911 12767 11038
+3  6849 10177 7433
+3  1039 12337 3404
+3  9660 12768 15
+3  311 6514 314
+3  3362 3361 11878
+3  7902 7901 1074
+3  5161 5160 7208
+3  5161 7208 12761
+3  4061 3664 3663
+3  4060 3664 4061
+3  7250 7744 11301
+3  2603 10271 12769
+3  5384 5638 5385
+3  251 8940 7113
+3  10743 9975 9826
+3  2143 2728 2144
+3  8829 2728 2143
+3  2287 11351 2288
+3  2288 11351 12256
+3  3315 3317 11740
+3  3315 11740 11739
+3  575 4168 576
+3  8 8001 2958
+3  8817 11395 2183
+3  8817 12770 11395
+3  3851 3850 11261
+3  11260 3851 11261
+3  11503 5937 7981
+3  11503 7981 12758
+3  12758 7981 10306
+3  1835 7860 12434
+3  12771 1835 12434
+3  8843 8844 10617
+3  1942 1943 9797
+3  1309 1311 10777
+3  7407 9958 5772
+3  12772 11260 8451
+3  8578 9701 2453
+3  8527 8801 8161
+3  443 445 8838
+3  12773 9287 12774
+3  12773 12774 12775
+3  12774 5435 12775
+3  5436 143 5434
+3  12773 12775 7819
+3  9057 9696 9058
+3  9516 5507 5506
+3  9729 12776 2519
+3  8679 12777 8680
+3  12778 12779 12780
+3  12779 12781 11251
+3  12780 12779 11251
+3  12782 12781 12779
+3  12782 12779 1026
+3  1026 12779 12778
+3  12781 12146 11251
+3  12783 12784 12785
+3  12786 4073 5419
+3  9933 3841 12785
+3  9933 12785 12784
+3  1387 12582 1388
+3  12787 5720 12788
+3  12789 11191 7024
+3  12790 11237 11238
+3  12790 9000 11237
+3  9000 103 11237
+3  12791 3996 10020
+3  12792 12793 872
+3  12792 1692 2381
+3  872 1692 12792
+3  12794 599 12080
+3  7391 12794 12080
+3  12795 12796 10192
+3  10192 12796 12797
+3  10192 12797 1203
+3  1203 12797 995
+3  12798 5346 5348
+3  12798 5348 6252
+3  7511 1912 1911
+3  7511 2289 1912
+3  996 12796 12799
+3  995 12797 996
+3  12796 996 12797
+3  4240 3051 3050
+3  3178 12800 10205
+3  4072 8085 9095
+3  7705 7704 12801
+3  9164 9967 9165
+3  9164 12802 9967
+3  12446 12731 8624
+3  6588 8586 9498
+3  11405 227 9907
+3  3782 815 12803
+3  3782 12803 3783
+3  8183 1261 8595
+3  12804 8183 8595
+3  8594 12804 8595
+3  522 12804 8594
+3  666 6028 12805
+3  8506 8505 12570
+3  8506 12570 12806
+3  7416 4679 12807
+3  2586 12808 12807
+3  2586 12807 1893
+3  8722 8724 10101
+3  11191 9113 7024
+3  9737 4598 5410
+3  2079 9738 6736
+3  10216 3133 12809
+3  8035 11909 12631
+3  10582 10398 11815
+3  11815 10398 10147
+3  1853 11815 10147
+3  3450 12810 12811
+3  3450 12812 12810
+3  3245 12813 8099
+3  9335 8597 5627
+3  10950 12362 493
+3  1251 3218 1810
+3  12814 758 8878
+3  6455 758 12814
+3  12137 12815 12090
+3  4802 4804 10297
+3  7659 4802 10297
+3  10297 4804 12816
+3  11652 12817 10206
+3  12818 12819 12820
+3  12821 12820 12819
+3  12822 12823 12824
+3  9832 11891 11892
+3  9833 11891 9832
+3  1943 11891 9833
+3  12825 3551 4469
+3  12825 4469 6867
+3  3551 12826 4469
+3  1570 8499 12827
+3  10648 12828 12829
+3  12830 9436 9438
+3  3858 8200 3313
+3  8400 8399 126
+3  8080 7693 5599
+3  5600 5599 7693
+3  9295 5295 5294
+3  12831 10421 12673
+3  12831 12673 12135
+3  12832 12833 4996
+3  6171 9357 11292
+3  6772 6771 12834
+3  9219 12199 12020
+3  7532 9219 12020
+3  12835 6987 12836
+3  11451 9219 7531
+3  11451 9212 12837
+3  11451 12837 9219
+3  11607 2418 2415
+3  3734 11608 11607
+3  12838 11607 2415
+3  12839 12838 2415
+3  11688 12840 11705
+3  12788 5720 9242
+3  2539 12788 9242
+3  3055 12788 2539
+3  12841 12842 6708
+3  12842 12843 6705
+3  12842 6705 6708
+3  3939 5279 6458
+3  12844 11624 12845
+3  12842 12841 12846
+3  12455 12823 12822
+3  12847 12848 701
+3  12170 517 519
+3  12170 12849 517
+3  6006 6008 3595
+3  12850 6006 3595
+3  3452 12851 3453
+3  3635 1087 12374
+3  12852 1087 3635
+3  12423 12853 12854
+3  12423 12854 11850
+3  12855 12856 12783
+3  12857 12856 12855
+3  12857 12855 12858
+3  2838 486 2839
+3  3554 3062 11383
+3  2433 2435 9313
+3  2433 9313 12166
+3  9313 9314 12166
+3  12859 8361 4796
+3  12859 12860 8361
+3  1747 1746 7645
+3  8069 6175 7196
+3  8069 7196 8070
+3  1958 10470 2332
+3  2466 10955 178
+3  2465 10955 2466
+3  2465 3423 10955
+3  3423 3422 10955
+3  12861 2081 11999
+3  12861 10693 2081
+3  8831 1711 8344
+3  8488 1712 10167
+3  12862 9356 4734
+3  12863 10957 10959
+3  1922 523 2610
+3  8805 12864 1618
+3  518 1618 12864
+3  6455 12814 10072
+3  3887 12865 12357
+3  12866 12593 6750
+3  7221 11397 5855
+3  7221 867 11397
+3  7584 7585 12867
+3  1210 11997 5486
+3  1964 6455 12868
+3  1964 12868 12869
+3  12868 6455 10072
+3  7686 8828 8827
+3  7684 8827 11997
+3  7684 7686 8827
+3  7684 11997 1210
+3  8684 11285 8685
+3  9623 12870 9624
+3  6044 7450 4131
+3  3055 12787 12788
+3  3054 12787 3055
+3  9951 12787 3054
+3  3054 9257 9951
+3  9256 9257 3054
+3  12582 1387 12843
+3  12582 12843 12842
+3  12871 2098 2097
+3  12043 10033 12872
+3  3086 12873 12874
+3  12823 10088 12875
+3  4160 5690 248
+3  4943 8144 3645
+3  8144 3646 3645
+3  4052 8165 12876
+3  12877 10519 10518
+3  12877 10518 560
+3  12878 9423 12877
+3  12878 12879 9423
+3  12880 4229 4111
+3  4229 4228 4111
+3  2889 5438 5437
+3  12881 6133 10172
+3  1662 12099 12882
+3  12883 12884 12885
+3  12886 12533 12887
+3  12884 12886 12887
+3  11006 11745 12888
+3  12883 12886 12884
+3  2516 2515 7627
+3  3542 2516 7627
+3  13 12768 12889
+3  13 12889 10413
+3  1989 10810 1990
+3  12890 12575 827
+3  795 9690 11224
+3  12891 12892 6279
+3  3976 7290 1345
+3  1345 7290 1346
+3  7079 1346 7290
+3  12492 7292 12131
+3  12131 9621 12492
+3  7822 7824 12893
+3  4440 5788 5787
+3  10387 12893 7824
+3  12492 9620 11982
+3  11982 7079 12492
+3  7079 7292 12492
+3  9303 10219 9746
+3  7823 3027 7824
+3  3901 7442 12129
+3  8504 12339 9869
+3  7517 7514 12169
+3  7876 3957 265
+3  5597 4736 2241
+3  12392 5597 2241
+3  6568 10185 7620
+3  10259 11135 12894
+3  10259 12894 10257
+3  2676 7876 264
+3  10854 9669 9848
+3  6357 3430 1143
+3  3516 1032 1034
+3  4951 4953 11909
+3  12895 9687 1764
+3  5418 5417 10003
+3  546 6128 3883
+3  546 3883 544
+3  5290 5289 12896
+3  7996 7995 11701
+3  5037 12897 12898
+3  11940 12899 12900
+3  29 2763 10149
+3  12901 3971 3973
+3  12902 12903 12904
+3  12905 10121 3324
+3  4453 12463 4166
+3  3601 8866 8272
+3  11538 8866 3601
+3  2356 9859 2354
+3  10848 8475 9920
+3  12906 7749 12783
+3  9915 7749 12906
+3  278 280 3127
+3  6529 12907 6526
+3  10738 10218 2968
+3  12053 12425 671
+3  532 1792 1809
+3  5927 7567 7566
+3  920 919 524
+3  5050 12908 3372
+3  1863 1865 12909
+3  10967 1863 12909
+3  10968 10967 12909
+3  12910 12911 1512
+3  12912 2650 6335
+3  12913 7649 5237
+3  9649 6709 12914
+3  12915 10557 12916
+3  7589 7588 12770
+3  11395 12770 7588
+3  12833 4997 4996
+3  1284 3415 5715
+3  2474 8117 8116
+3  2856 10742 10744
+3  2053 2052 12917
+3  2053 12917 10556
+3  4815 12107 4816
+3  11185 8471 8470
+3  11185 8470 10419
+3  6305 12918 7261
+3  4230 10100 4228
+3  12747 11522 11829
+3  10472 11829 11522
+3  8430 4808 4807
+3  4820 4819 2574
+3  3537 3536 9622
+3  12919 12920 12921
+3  6297 12922 6298
+3  1877 4925 1878
+3  10985 12923 10943
+3  7690 7689 1759
+3  5833 5842 12834
+3  12924 12925 1666
+3  12924 12487 12925
+3  663 1017 7132
+3  7615 7637 7616
+3  7083 12926 6616
+3  982 5437 983
+3  336 442 8642
+3  10505 10084 7105
+3  12927 4715 4717
+3  12252 12927 4717
+3  1962 11732 11171
+3  1224 1962 11171
+3  11170 1224 11171
+3  12928 12929 9516
+3  11268 1461 10920
+3  10602 7747 8944
+3  9298 3852 9299
+3  9617 281 4408
+3  12930 12931 4821
+3  9741 12732 12932
+3  12933 6345 7697
+3  8184 3918 3835
+3  8174 5319 12934
+3  4170 6634 4171
+3  12935 6634 4170
+3  8514 1520 5945
+3  2983 11885 12936
+3  3301 3258 3257
+3  8930 5807 5809
+3  6066 6335 6336
+3  8715 8716 11610
+3  3849 12937 8716
+3  12938 12937 3849
+3  9843 8040 8042
+3  692 2406 690
+3  680 12939 223
+3  1461 878 10920
+3  11423 2681 12178
+3  12173 11817 11816
+3  1183 811 11591
+3  7891 9822 12940
+3  9393 9395 3271
+3  12307 12941 1533
+3  12942 12943 7998
+3  1937 11930 1935
+3  4520 12944 12945
+3  9531 12946 9532
+3  11160 444 1583
+3  12947 11797 9283
+3  11798 11797 12947
+3  12948 12949 12950
+3  2927 12951 12952
+3  12953 2224 3221
+3  8056 12954 1891
+3  8056 1891 10222
+3  8485 5003 1868
+3  10584 2503 1382
+3  662 510 509
+3  1912 2289 12955
+3  12955 2291 6702
+3  12098 11611 1005
+3  12098 1005 12882
+3  6992 3750 7061
+3  326 9283 327
+3  2289 2291 12955
+3  11993 6687 2014
+3  2014 6687 6689
+3  10832 12956 12957
+3  3525 12958 12609
+3  3612 4276 2498
+3  12959 815 3782
+3  12960 7672 7671
+3  8896 12961 797
+3  1206 1621 6636
+3  164 7852 6425
+3  6424 164 6425
+3  12962 2642 12963
+3  12962 12963 960
+3  7368 5104 7369
+3  2959 2958 11070
+3  12964 12965 7633
+3  4344 12964 7633
+3  1158 1160 2213
+3  5955 12966 12967
+3  496 8170 6828
+3  6473 8177 12968
+3  6473 12968 6474
+3  10496 3425 3424
+3  12969 12970 1160
+3  12971 12972 12973
+3  12974 8647 4017
+3  12243 8647 12974
+3  9666 11471 7561
+3  4134 4135 11957
+3  1880 12975 11874
+3  12976 1320 12977
+3  11393 11626 2151
+3  12978 12979 8794
+3  12978 8794 12980
+3  12981 876 3382
+3  3118 876 12981
+3  12911 1511 1512
+3  11408 11587 9534
+3  1653 3562 3563
+3  3395 518 6604
+3  6603 3395 6604
+3  4618 1498 6597
+3  3484 12385 8760
+3  12371 7434 12982
+3  4339 4340 12983
+3  3610 12984 1266
+3  3610 6359 12984
+3  970 9401 971
+3  9863 12985 9864
+3  69 9449 2617
+3  943 12986 10803
+3  1060 2398 5784
+3  12987 5532 12905
+3  12987 2615 5532
+3  11743 10270 8167
+3  4196 6194 1148
+3  12988 1148 6194
+3  12989 3392 5074
+3  12989 5074 5073
+3  12990 12991 12992
+3  12990 12992 9723
+3  9723 12992 12993
+3  12994 1195 12400
+3  8066 2581 12995
+3  1202 10075 12996
+3  1203 1202 12996
+3  12997 12998 12999
+3  885 11399 6865
+3  12307 12308 12941
+3  7471 12941 12308
+3  2111 7875 7906
+3  6295 886 6865
+3  11651 5750 10758
+3  5412 5750 11651
+3  9369 8186 10941
+3  8442 8445 4180
+3  6830 2675 6831
+3  12255 12967 13000
+3  12256 12255 9992
+3  1261 10527 1364
+3  13001 13002 13003
+3  4061 1229 1226
+3  4470 6611 688
+3  9449 9684 6161
+3  1644 3257 3256
+3  6161 9684 732
+3  8698 1189 13004
+3  7379 5742 5744
+3  7379 5744 9397
+3  4266 4264 11472
+3  4336 4338 9447
+3  13005 13006 13007
+3  13005 13007 13008
+3  4822 8975 13009
+3  11388 8071 13010
+3  9194 8017 7529
+3  5539 9194 7529
+3  13010 8071 2217
+3  11468 11290 2258
+3  1394 11306 8419
+3  1394 5770 11306
+3  12624 3493 3742
+3  7300 7302 8829
+3  13011 2116 3449
+3  13011 3449 3640
+3  8145 1981 9106
+3  6691 6266 8469
+3  5591 1439 5788
+3  12498 13012 5265
+3  6160 7180 8347
+3  6804 4583 11580
+3  11407 12207 11408
+3  1772 1774 13013
+3  8581 3726 3725
+3  7263 9192 9772
+3  1110 1109 3561
+3  13014 11992 9965
+3  6799 5317 10116
+3  5954 12966 5955
+3  7470 7469 6934
+3  10143 4935 8345
+3  8342 10143 8345
+3  6223 5476 5666
+3  2990 4596 3537
+3  12469 2446 5207
+3  12552 6184 8812
+3  5412 5411 9428
+3  13015 11623 12404
+3  1500 10101 3070
+3  13016 12730 13017
+3  3788 13018 13019
+3  12337 13018 3788
+3  3852 9298 3853
+3  13020 5283 1001
+3  12645 13021 11520
+3  13022 13021 12645
+3  13023 9963 11660
+3  9513 9514 11441
+3  6548 12372 9623
+3  4264 6295 13024
+3  5508 3256 6509
+3  743 11240 13025
+3  743 13025 744
+3  5899 4357 1876
+3  4127 7962 4128
+3  13026 5324 5323
+3  13026 13027 5324
+3  482 484 12218
+3  5322 919 731
+3  5089 11493 3609
+3  13028 13029 13030
+3  1677 1676 1902
+3  13031 4959 8828
+3  10499 10501 13032
+3  13033 11820 13031
+3  12571 10293 5487
+3  12571 6811 10293
+3  13034 13035 13036
+3  3629 1840 1842
+3  8914 548 2195
+3  549 548 8914
+3  13037 13038 13039
+3  13040 13037 13039
+3  1468 13041 1469
+3  13042 918 9144
+3  12924 7687 12487
+3  13043 13044 13045
+3  6599 13044 13043
+3  1511 13046 12847
+3  13047 12911 12910
+3  12592 335 8456
+3  9708 5779 5972
+3  13048 2023 13049
+3  6594 9226 6595
+3  1895 762 764
+3  7457 6036 7351
+3  7443 11568 4542
+3  8715 13050 8634
+3  4760 3956 3958
+3  3745 12490 13051
+3  3745 8053 12490
+3  6722 11842 12191
+3  707 11735 9816
+3  707 7991 11735
+3  4389 4922 2580
+3  13052 9308 9309
+3  8953 13053 8172
+3  2872 8445 13054
+3  4180 8445 2872
+3  11740 10148 10147
+3  10397 11740 10147
+3  2001 2000 3965
+3  11566 9861 9860
+3  2842 10688 13055
+3  13056 13057 7890
+3  11737 13058 11738
+3  8011 13058 11737
+3  7489 8460 9768
+3  9769 9768 8460
+3  9977 3607 13059
+3  13060 12484 4403
+3  6112 349 828
+3  651 5844 11661
+3  3353 13061 3354
+3  13062 11773 11772
+3  13062 13063 11773
+3  9093 7916 9094
+3  855 857 10865
+3  12911 7857 13046
+3  4509 4511 932
+3  10609 4509 932
+3  13064 10435 1534
+3  13064 1534 1531
+3  13065 9040 211
+3  1645 13066 1646
+3  13065 211 5566
+3  13067 13068 2013
+3  13069 2013 13068
+3  6809 3758 5132
+3  6809 5132 13070
+3  2666 4348 4118
+3  1205 8675 8674
+3  2256 13071 2257
+3  13071 2256 10643
+3  8953 13072 13053
+3  13 15 12768
+3  13073 7802 7801
+3  12679 11053 12245
+3  9902 1239 2213
+3  13074 4158 8600
+3  11256 7062 8137
+3  13075 11557 11178
+3  13076 6214 1826
+3  13076 1484 6214
+3  2187 391 393
+3  1386 4625 13077
+3  4010 3597 13078
+3  4010 12056 3597
+3  10751 4839 4838
+3  10751 4838 3249
+3  7826 11537 5793
+3  13079 5215 13080
+3  13081 13082 2727
+3  2840 8134 8136
+3  5658 4042 4041
+3  5658 6821 4042
+3  2873 5698 3417
+3  12314 11655 2297
+3  4550 13083 2005
+3  12603 1568 12602
+3  885 6355 13084
+3  13085 13086 13087
+3  13088 8385 8384
+3  12583 247 10011
+3  13017 12730 7878
+3  1626 12194 1627
+3  11136 12194 1626
+3  3942 13089 3940
+3  13090 13089 3942
+3  2101 11575 6222
+3  5513 13091 9721
+3  5513 9721 10285
+3  1497 2265 2264
+3  6647 6798 6797
+3  8588 7094 4440
+3  8213 8758 13092
+3  8213 13092 12333
+3  768 9069 7094
+3  768 7094 8588
+3  2280 4669 4668
+3  139 13093 13094
+3  13095 5921 10074
+3  13095 10074 10100
+3  1992 5072 1162
+3  3705 1908 3706
+3  3363 1737 10292
+3  10287 10868 10286
+3  6730 6729 11779
+3  11772 8370 9842
+3  13062 11772 9842
+3  11254 3774 11255
+3  13096 11620 9914
+3  9913 13096 9914
+3  9557 1141 7144
+3  10663 13097 13098
+3  13099 13100 5914
+3  10331 10330 8086
+3  13101 11308 11307
+3  13102 9368 9501
+3  6478 13103 13104
+3  6478 6477 13103
+3  13105 7097 13106
+3  13105 7098 7097
+3  12230 12232 5462
+3  2508 9751 6784
+3  6237 6239 13107
+3  7309 6237 13107
+3  7554 5239 5238
+3  13108 13109 2876
+3  9232 13108 2876
+3  13110 11781 13111
+3  8345 13112 12252
+3  12927 12252 13112
+3  6446 4943 10447
+3  2563 3597 12056
+3  11013 4367 4366
+3  10070 3954 3953
+3  9067 13113 9065
+3  10725 13113 9067
+3  2190 2212 602
+3  1487 11296 8067
+3  9136 2595 13114
+3  9137 9136 13114
+3  10651 8981 6566
+3  2714 9920 7405
+3  2587 4262 13115
+3  3123 3122 8821
+3  10452 7137 7138
+3  13116 12720 10957
+3  12863 13116 10957
+3  13042 9144 9143
+3  3396 10211 264
+3  264 10211 2677
+3  10211 13117 2677
+3  2295 12919 13118
+3  2295 13118 13119
+3  13120 9776 812
+3  4632 6422 6421
+3  6055 6102 1802
+3  5854 8351 7221
+3  11940 6609 12899
+3  12730 7879 7878
+3  1191 1190 9276
+3  1191 9276 9277
+3  1730 4141 1732
+3  3086 12874 9460
+3  11698 13121 2350
+3  11699 11698 2350
+3  11669 13122 11670
+3  13123 6680 5923
+3  660 10197 9413
+3  13124 13125 13126
+3  13124 13126 10535
+3  7723 787 7721
+3  2966 13127 1549
+3  1422 1424 6356
+3  1891 13128 1892
+3  5411 5413 8095
+3  8299 8298 7965
+3  9822 7890 13057
+3  9822 7891 7890
+3  1457 2953 1458
+3  12277 2953 1457
+3  13129 8225 10542
+3  13130 4487 9026
+3  2486 4021 5686
+3  10383 1766 10587
+3  1633 6188 12047
+3  13131 7295 13132
+3  4897 4899 13133
+3  544 13134 13135
+3  1097 7017 9013
+3  8188 11885 2983
+3  663 665 7163
+3  8029 9019 7245
+3  12201 1609 1608
+3  6392 10112 12316
+3  6392 12316 6390
+3  2341 8063 13136
+3  7480 13136 8063
+3  7900 10671 13137
+3  7900 13137 7899
+3  1879 1878 5635
+3  7269 12361 7270
+3  3035 3718 4762
+3  2125 11246 2126
+3  10449 8631 9782
+3  1312 13138 13139
+3  1312 1310 13138
+3  6755 4086 4085
+3  6232 84 9854
+3  9191 5586 1804
+3  5033 5035 10092
+3  3134 3133 13140
+3  12565 5628 5630
+3  1575 11148 2928
+3  6459 424 13141
+3  11597 13141 424
+3  6472 2501 3346
+3  6472 1249 2501
+3  13142 5306 13143
+3  10669 13143 5306
+3  1889 3798 3800
+3  419 13144 10015
+3  13145 13146 11210
+3  11209 13145 11210
+3  13147 12352 9873
+3  5278 9107 11586
+3  1114 9149 13148
+3  4503 4502 5429
+3  249 10005 7182
+3  6715 13149 4974
+3  8921 7323 12745
+3  13150 7323 8921
+3  8800 1811 13151
+3  2030 10448 4944
+3  2513 2671 13152
+3  5482 5484 7378
+3  1130 13153 12919
+3  2295 1130 12919
+3  10203 3292 5205
+3  13154 6070 13155
+3  1775 6070 13154
+3  13142 2806 5306
+3  5680 11593 2606
+3  5680 2606 2608
+3  11002 10949 11000
+3  13156 12795 2926
+3  2925 13156 2926
+3  4993 6243 7917
+3  13157 2028 275
+3  5713 13157 275
+3  5069 5071 11606
+3  4316 9270 4626
+3  9649 9647 6709
+3  6887 10253 6665
+3  6563 7127 1830
+3  8529 7106 6376
+3  13158 1535 13159
+3  13160 13161 10592
+3  12042 6085 8123
+3  7530 5538 5537
+3  1436 13162 3634
+3  10925 13163 13164
+3  10925 13164 7134
+3  9531 456 455
+3  9940 13165 12805
+3  13166 8819 11404
+3  13166 11404 13167
+3  7499 12998 13167
+3  13166 13167 12998
+3  12027 10071 10070
+3  5526 13168 9480
+3  13169 2405 13170
+3  8496 8495 8709
+3  6650 8765 8764
+3  7746 13151 1811
+3  13171 7190 7191
+3  1378 6435 8721
+3  9082 11705 4498
+3  9082 11688 11705
+3  7294 3823 4092
+3  7252 10465 3594
+3  4686 8641 3789
+3  5869 5868 13172
+3  5199 13172 5868
+3  11914 11662 1083
+3  13173 13174 8826
+3  7694 11357 13175
+3  12405 13176 13177
+3  6259 13176 12405
+3  11247 7976 7417
+3  8664 12532 7864
+3  2984 2983 9630
+3  11630 10740 11991
+3  11991 10740 9814
+3  13178 572 570
+3  7122 13179 11901
+3  13180 10067 9347
+3  238 13180 9347
+3  13181 11547 11546
+3  13182 11547 13181
+3  5800 5433 2818
+3  5435 2818 5433
+3  8922 13183 13184
+3  5679 5678 13185
+3  9911 5679 13185
+3  9323 10996 12451
+3  2341 13136 2339
+3  1788 1790 2174
+3  10694 5942 11275
+3  12122 2037 13186
+3  12122 13186 13187
+3  13188 11521 12070
+3  12274 13189 13190
+3  13191 13190 13189
+3  11110 844 13192
+3  11111 11110 13192
+3  10848 9920 10849
+3  9404 5210 5209
+3  9404 5209 9405
+3  12211 5067 12210
+3  5167 6322 155
+3  4817 4816 9015
+3  13193 10488 8981
+3  9415 8675 2301
+3  572 13178 13194
+3  13195 13194 13178
+3  11540 10720 10719
+3  11540 10719 8330
+3  11458 10061 6358
+3  935 8782 1363
+3  971 13196 4699
+3  3645 3647 4944
+3  4491 4347 2850
+3  1887 4685 4684
+3  10681 10680 2067
+3  10681 2067 2066
+3  13197 13198 10225
+3  13197 10225 10224
+3  10681 2066 12039
+3  13199 9862 13200
+3  9500 13200 9862
+3  1096 603 10050
+3  11270 9293 13117
+3  8946 12531 329
+3  2406 2405 4191
+3  3670 3669 13201
+3  536 1121 7752
+3  8979 12349 12348
+3  10284 6834 4741
+3  4742 10284 4741
+3  10539 4484 4486
+3  3988 8903 8347
+3  13202 4840 9320
+3  5742 4260 5743
+3  5742 12551 4260
+3  9853 5744 5743
+3  3802 13203 3803
+3  9197 2557 11286
+3  8468 417 1967
+3  671 11937 12053
+3  1890 3800 9655
+3  2766 440 2767
+3  7738 9767 13204
+3  8814 13205 4107
+3  7729 2166 6131
+3  6670 4803 2713
+3  7516 7515 12221
+3  7516 12221 7446
+3  2404 551 5282
+3  13206 7023 9878
+3  13206 9878 13207
+3  9362 13208 13209
+3  13209 13208 10376
+3  899 831 11668
+3  9409 5555 13210
+3  13211 13212 13213
+3  4225 11830 4226
+3  13214 10856 10500
+3  1861 11830 4225
+3  12348 13215 1454
+3  4428 13215 12348
+3  1171 7977 1172
+3  11983 3433 12050
+3  11529 898 899
+3  10647 5083 7108
+3  6484 5699 5698
+3  7083 9985 4917
+3  9219 12837 12199
+3  1788 2173 3400
+3  10299 4855 13216
+3  3505 10472 12206
+3  4713 3878 13217
+3  444 11160 13218
+3  13196 9400 12716
+3  10843 10689 5000
+3  5000 10689 5001
+3  13072 8952 13219
+3  13220 13221 13222
+3  13223 13224 13225
+3  10655 12596 7892
+3  9890 9891 12424
+3  7519 7521 7905
+3  13226 13227 6072
+3  13226 6072 6069
+3  3430 6059 1144
+3  7520 10502 11688
+3  13228 12978 12980
+3  7904 7905 7299
+3  13008 11177 11706
+3  7469 13008 11706
+3  12651 7420 10894
+3  10173 7071 11476
+3  7712 7711 8699
+3  2900 8699 7711
+3  2493 11871 12435
+3  7657 7093 7090
+3  13187 13186 13229
+3  9865 7670 10662
+3  13230 12092 12041
+3  13230 9452 9990
+3  6423 8939 12596
+3  13231 8636 13232
+3  13233 5367 5287
+3  12768 6100 12889
+3  5410 6540 12576
+3  14 13 1033
+3  11464 5071 5070
+3  8922 8921 12745
+3  8922 12745 12746
+3  4211 4213 4569
+3  4211 4569 13234
+3  1780 5226 3583
+3  10666 1617 1616
+3  1308 1617 10666
+3  5229 8799 10987
+3  13235 13236 11838
+3  13235 8303 13236
+3  12228 13237 2259
+3  13238 11209 13239
+3  7265 7267 12600
+3  4597 13240 4033
+3  10161 4827 4829
+3  9629 9234 9085
+3  12871 6287 9969
+3  6287 6286 9605
+3  1243 2982 2984
+3  4759 1357 1355
+3  3652 13241 12025
+3  13242 5106 5105
+3  1078 13242 5105
+3  13243 8109 8108
+3  11377 4592 7102
+3  11377 9731 4592
+3  12117 13244 10366
+3  3757 13245 7246
+3  2219 2808 2217
+3  8081 10000 6303
+3  13246 8970 4861
+3  13247 9267 13248
+3  9268 9267 13247
+3  9330 8318 8319
+3  7330 13246 7837
+3  8957 9271 10768
+3  13249 3431 12237
+3  13249 3432 3431
+3  2166 2165 6130
+3  13250 2874 12498
+3  9605 9968 9969
+3  6287 9605 9969
+3  5049 13230 9990
+3  7639 13230 5049
+3  13251 13252 13253
+3  13251 13253 13254
+3  13255 2525 799
+3  316 10440 1987
+3  316 1987 317
+3  10056 10058 8252
+3  8950 8951 13256
+3  13257 13258 13259
+3  2245 12305 8956
+3  11631 12265 5122
+3  1119 6373 7114
+3  1646 13066 7942
+3  12794 1460 599
+3  10676 8834 7591
+3  2606 1666 1668
+3  13260 4357 5899
+3  13261 13260 5899
+3  2429 2914 4086
+3  13262 13263 2032
+3  13262 2032 2031
+3  13264 13188 7951
+3  13073 13265 13266
+3  13205 13267 13268
+3  13269 8335 11496
+3  8711 782 4545
+3  8361 12860 8362
+3  9232 13270 13108
+3  13212 13271 13127
+3  13212 12504 13271
+3  13272 3840 13273
+3  8218 10283 8224
+3  11954 6468 6465
+3  11954 13274 6468
+3  6695 13275 6696
+3  6934 4612 12714
+3  5358 1897 5356
+3  5811 5810 2064
+3  7406 3294 7407
+3  5882 13276 5883
+3  8352 2948 11398
+3  13277 11546 11548
+3  13277 11548 564
+3  7736 6898 12121
+3  6637 9566 9565
+3  6637 9565 4189
+3  8718 3162 3161
+3  11808 11809 2037
+3  10154 9157 2354
+3  3234 12546 9882
+3  8426 8428 2464
+3  2503 303 2502
+3  13278 10029 13279
+3  13148 1115 1114
+3  13280 7011 7010
+3  13281 104 107
+3  2502 13282 1383
+3  10098 3005 6135
+3  10098 6135 13283
+3  8241 13284 12882
+3  8241 12882 1004
+3  12314 4178 11655
+3  9709 11309 11308
+3  13025 13285 13286
+3  13025 11242 13285
+3  8132 8626 6363
+3  10582 5202 10398
+3  8168 5812 6906
+3  2402 4437 13287
+3  7665 13287 4963
+3  8168 6906 1215
+3  10796 8168 8167
+3  3595 6008 3596
+3  10258 3596 6008
+3  8958 7870 9709
+3  13288 11560 11561
+3  12276 13289 12440
+3  11401 13290 12276
+3  11401 12276 12440
+3  13291 8101 13292
+3  1772 13013 6134
+3  6057 7009 6058
+3  10912 4561 13293
+3  2742 2744 4560
+3  12102 3150 3152
+3  12102 3152 13294
+3  798 315 7709
+3  798 7709 10762
+3  6045 19 6046
+3  1205 1204 19
+3  13295 7965 8298
+3  12125 3186 10789
+3  13296 3186 3188
+3  5171 7294 4092
+3  10341 10110 6242
+3  2425 2541 2543
+3  12806 9075 13297
+3  730 13297 9075
+3  9170 11782 13298
+3  9170 13298 4732
+3  13299 1486 9708
+3  13300 12831 12135
+3  7446 12221 10841
+3  4482 7446 10841
+3  706 14 1032
+3  125 124 10093
+3  9864 2100 6716
+3  4857 13301 13302
+3  12465 6419 9241
+3  3520 1799 3521
+3  3521 10616 4324
+3  13303 12596 13304
+3  13303 13304 11497
+3  1179 6479 12711
+3  1178 6479 1179
+3  4716 12106 12105
+3  13119 12106 4716
+3  8542 10862 13305
+3  8542 10860 10862
+3  5567 211 213
+3  6309 6319 7356
+3  13211 13213 3721
+3  13306 9247 9246
+3  6328 10439 6329
+3  6744 12389 10103
+3  13307 8741 8740
+3  2063 2065 6369
+3  13308 13309 5124
+3  13308 13310 13309
+3  9705 11869 9706
+3  9705 13311 11869
+3  3312 10593 5171
+3  13312 6583 7743
+3  7761 11843 1949
+3  1948 7761 1949
+3  9322 12878 12877
+3  9322 12877 560
+3  13313 1433 10869
+3  4607 8628 8627
+3  4607 8627 13314
+3  4876 13315 4877
+3  12211 4317 4319
+3  7136 5547 12674
+3  11090 12287 5702
+3  3259 1022 3260
+3  10324 10325 13316
+3  9346 239 9347
+3  11290 12228 2258
+3  13317 4272 13318
+3  4270 4272 13317
+3  1144 6059 4658
+3  10375 1396 1398
+3  12410 8833 12491
+3  10247 12410 12491
+3  1151 12042 207
+3  12042 205 207
+3  11941 5351 13319
+3  8008 7524 12207
+3  12174 12317 5583
+3  5584 5583 12317
+3  13320 13321 11759
+3  13322 13321 13320
+3  4189 9565 5084
+3  10936 3723 10365
+3  10936 10365 13323
+3  10008 11066 10486
+3  13324 12702 12229
+3  1037 3830 3737
+3  13325 11803 11804
+3  13325 11804 13326
+3  13327 7778 1667
+3  9221 6618 9222
+3  13328 13329 210
+3  5154 5302 5155
+3  9222 6618 11282
+3  573 6662 535
+3  10338 8164 8166
+3  13330 9850 9486
+3  2390 7756 2388
+3  3254 1721 6726
+3  8785 13331 9658
+3  8785 9658 7975
+3  1710 8487 10143
+3  8865 4018 4020
+3  8270 8865 4020
+3  4514 7754 6266
+3  4587 12048 3417
+3  3396 263 10618
+3  10618 263 4760
+3  2305 7634 13332
+3  5989 2305 13332
+3  7634 7636 13332
+3  13333 9588 9587
+3  11583 13333 9587
+3  2940 7863 12539
+3  6315 10174 6314
+3  13334 6314 10174
+3  13334 10262 6314
+3  5035 13335 13336
+3  13337 7928 7927
+3  184 11466 11465
+3  8630 5021 13314
+3  8630 7415 5021
+3  3689 3688 13338
+3  12907 3689 13338
+3  13339 7900 7898
+3  13340 51 50
+3  3022 1400 2781
+3  3554 11383 5980
+3  13157 13341 2029
+3  3030 3029 10800
+3  10180 10179 2084
+3  13342 6927 12214
+3  13342 12214 13343
+3  3853 5080 5079
+3  6958 9081 6959
+3  9554 10053 3470
+3  10062 7739 8253
+3  536 13344 5905
+3  5904 536 5905
+3  9009 4678 5760
+3  13345 12900 12149
+3  13345 11940 12900
+3  6051 8110 8109
+3  8021 2956 5772
+3  13346 13347 1237
+3  986 3887 12357
+3  11155 129 201
+3  7553 5239 7554
+3  5590 10648 6826
+3  4143 7756 2390
+3  11400 4648 4663
+3  10775 5519 5518
+3  13348 10775 5518
+3  6859 9387 7553
+3  9762 9387 6859
+3  8956 12799 11831
+3  5518 8542 13305
+3  13348 5518 13305
+3  11350 8945 13349
+3  12624 10023 3493
+3  1720 1719 3014
+3  3013 1720 3014
+3  7667 3271 3661
+3  1752 13350 1750
+3  65 10009 13351
+3  8230 13352 6039
+3  2490 4442 2488
+3  2490 4443 4442
+3  8084 9152 205
+3  8084 9150 9152
+3  3506 9674 9673
+3  3977 453 4682
+3  12151 8591 8592
+3  6903 11392 3769
+3  13353 3997 13354
+3  13355 3627 3626
+3  13355 3626 6534
+3  2010 9001 6491
+3  11055 12040 12482
+3  12551 7654 4261
+3  12551 7655 7654
+3  9774 9773 7879
+3  266 13356 11144
+3  266 268 13356
+3  9981 2741 5986
+3  3481 5373 5012
+3  12617 10438 9229
+3  4439 12617 9229
+3  2212 1158 2213
+3  4974 153 155
+3  921 12104 12106
+3  5458 736 5738
+3  7228 12990 13357
+3  9220 402 1482
+3  13255 2523 2525
+3  6858 13358 9762
+3  6386 11093 6387
+3  4337 13359 4338
+3  7826 5793 8582
+3  8582 5793 10625
+3  4643 1057 7153
+3  5888 4670 10377
+3  1910 10377 4670
+3  4071 4073 12786
+3  5844 3170 11661
+3  5843 3170 5844
+3  2253 13360 2254
+3  3822 13180 238
+3  9708 3708 5779
+3  10693 4203 4202
+3  3130 11524 3131
+3  6883 8227 1631
+3  10839 2716 10840
+3  7227 8854 7228
+3  4599 4598 9737
+3  4599 9737 9738
+3  5604 4389 4390
+3  1530 8436 5510
+3  1529 8436 1530
+3  12308 12099 1659
+3  13361 12308 1659
+3  12564 13362 11770
+3  13363 13362 12564
+3  5317 9449 69
+3  13364 12612 2604
+3  7596 13364 2604
+3  13365 3833 3832
+3  8453 10825 8454
+3  6288 13366 2452
+3  9838 10345 11483
+3  13367 234 13368
+3  13367 13368 13163
+3  9164 13369 13370
+3  9164 13371 13369
+3  803 13372 13373
+3  13374 13375 11514
+3  13376 8178 8177
+3  3349 13376 8177
+3  9772 3556 7263
+3  630 632 2479
+3  10948 10949 11002
+3  9133 13377 10649
+3  4842 11920 1157
+3  11931 8188 3746
+3  7046 578 2634
+3  1539 13378 9889
+3  8229 13379 8230
+3  4030 2886 2885
+3  2176 5439 8623
+3  8037 2827 3813
+3  2829 3813 2827
+3  3251 4789 3249
+3  4474 7950 7949
+3  3249 4789 10751
+3  13380 8135 3629
+3  8136 8135 13380
+3  1664 3818 3817
+3  454 11558 11559
+3  9433 3423 2465
+3  12989 13381 3393
+3  13382 13381 12989
+3  13311 9705 6741
+3  3302 13311 6741
+3  13383 11567 6797
+3  4473 7845 7950
+3  4473 13059 7845
+3  1344 10572 1345
+3  2777 3303 3305
+3  13384 13385 12980
+3  13386 7568 13387
+3  13001 13003 11358
+3  13002 13388 13003
+3  11112 11513 11996
+3  11110 11112 11996
+3  12913 11312 7649
+3  3989 4150 3990
+3  9432 7370 7763
+3  10772 13389 9643
+3  12048 2874 3417
+3  2051 1493 8148
+3  2051 1492 1493
+3  13390 143 5436
+3  5860 13391 5368
+3  8275 10442 8276
+3  6569 9767 7737
+3  8028 11332 13392
+3  12263 13393 10674
+3  6326 13394 13395
+3  10617 12545 12544
+3  10674 8269 12263
+3  3039 3038 6553
+3  1696 6039 13352
+3  8892 13396 9010
+3  4288 13397 13398
+3  13152 7781 13399
+3  12320 12319 568
+3  8228 12320 568
+3  8581 10333 5286
+3  8837 8836 3487
+3  3488 3487 8836
+3  13400 5039 9022
+3  13400 9022 13401
+3  8139 5142 5139
+3  4490 4491 6759
+3  32 4401 4400
+3  6634 13402 8018
+3  12920 4155 1426
+3  12920 1426 1425
+3  11341 11244 13403
+3  11000 13404 11003
+3  13405 11589 11590
+3  11862 1898 5358
+3  3489 3491 653
+3  7397 3363 3185
+3  13406 2871 5334
+3  13407 8278 10059
+3  13407 8277 8278
+3  13408 9074 11474
+3  8045 13409 12744
+3  61 2790 6489
+3  9708 5972 13299
+3  3291 13410 3292
+3  11732 3292 13410
+3  9709 11308 6692
+3  4479 4994 4993
+3  6433 10736 10737
+3  8596 5872 5873
+3  6759 4491 4751
+3  1474 3882 413
+3  4491 2850 4751
+3  13411 956 955
+3  13412 13413 3924
+3  13414 8016 8015
+3  8710 12208 782
+3  3692 12380 3360
+3  2794 2796 6651
+3  3630 13082 9464
+3  8129 11614 11836
+3  13071 2031 5574
+3  9329 4159 4158
+3  10459 8806 7530
+3  11220 10618 12038
+3  10654 8748 8747
+3  10979 11320 10512
+3  1318 10657 9213
+3  1318 1317 10657
+3  260 6385 3925
+3  13415 7240 11165
+3  7239 7240 13415
+3  1524 8029 1525
+3  12309 13416 10492
+3  11422 13417 13418
+3  12995 2581 1545
+3  12689 7586 9357
+3  8694 11562 4912
+3  8242 7782 13419
+3  9002 7357 181
+3  13420 7092 13421
+3  13420 1016 7092
+3  3330 2172 9611
+3  13422 11234 10065
+3  13423 13424 13425
+3  4690 376 4691
+3  11202 13426 1507
+3  1791 5623 1810
+3  13427 9414 218
+3  13428 13379 13429
+3  8017 13428 13429
+3  10228 10227 12414
+3  7533 7532 13430
+3  7533 13430 3627
+3  7577 541 11613
+3  5859 13431 13432
+3  11613 541 543
+3  8404 13432 8405
+3  11613 7151 6156
+3  6416 12771 6417
+3  58 57 4583
+3  5446 10641 5447
+3  9854 4697 6129
+3  7263 3556 3557
+3  12825 6867 13433
+3  7720 13434 7717
+3  7720 9794 13434
+3  9201 2663 4034
+3  13435 11342 11343
+3  10410 11865 2337
+3  11044 11046 2885
+3  11044 2885 2887
+3  13436 13437 13438
+3  3675 13437 13436
+3  13436 13438 13439
+3  13440 5115 5134
+3  2838 487 486
+3  10822 13441 12356
+3  10822 12356 2733
+3  3329 2172 3330
+3  4193 6131 4194
+3  13440 12267 13442
+3  13443 12267 13440
+3  9170 4732 2867
+3  9170 2867 2866
+3  10024 13444 10025
+3  8486 13445 7170
+3  2533 11827 2534
+3  8052 12334 11975
+3  13446 12334 8052
+3  7473 369 2568
+3  4398 4397 13447
+3  7197 3407 8893
+3  6551 3407 7197
+3  1985 2914 2429
+3  2354 9859 6989
+3  5547 9939 12674
+3  574 11174 4831
+3  6696 7155 6697
+3  11174 13448 4831
+3  10917 11033 7282
+3  13449 13450 2811
+3  13449 2811 2810
+3  13451 470 9109
+3  8936 13452 6463
+3  6961 6463 13452
+3  2440 13453 2441
+3  4295 8686 4296
+3  4978 9990 9989
+3  63 9989 9100
+3  4978 9989 63
+3  7385 10311 10589
+3  10108 6471 5875
+3  1080 4704 1081
+3  7012 4641 4640
+3  11903 5620 5619
+3  13454 9594 1079
+3  1080 1079 9594
+3  13455 8973 9890
+3  13456 13457 4155
+3  12920 13456 4155
+3  4663 5828 4664
+3  9531 13458 12946
+3  8941 13459 4772
+3  8941 13460 13459
+3  13461 11636 4737
+3  13461 4737 5597
+3  1556 9051 9050
+3  11876 13099 5914
+3  2419 6660 573
+3  13308 11594 13310
+3  1721 13462 6727
+3  8998 13463 9024
+3  1244 13464 5938
+3  7877 6587 2635
+3  5442 11413 11190
+3  4945 13221 4946
+3  4945 8617 13221
+3  8238 4164 11531
+3  3614 7788 3612
+3  6002 3612 7788
+3  7488 579 10745
+3  11646 11238 10402
+3  9482 12880 13465
+3  4541 3119 13466
+3  4541 13466 4534
+3  11346 2919 13467
+3  13468 2919 11346
+3  12635 7069 11384
+3  2161 2160 10759
+3  10123 7069 12635
+3  3360 12380 12382
+3  7733 7732 13469
+3  9389 13469 7732
+3  3313 8718 3161
+3  8763 8263 11742
+3  11813 5696 5695
+3  4622 13470 13427
+3  9872 13147 9873
+3  1534 3819 13471
+3  1534 13471 1532
+3  5020 3029 6833
+3  2183 3250 8817
+3  5897 3250 2183
+3  6578 7595 7594
+3  10229 1286 6623
+3  9850 9851 13472
+3  10229 6623 9265
+3  4221 12512 532
+3  9265 10227 10229
+3  3787 3786 9364
+3  3787 9364 5267
+3  13473 9209 3399
+3  11718 7640 3090
+3  2679 2678 7504
+3  7973 9311 13474
+3  13475 13474 9311
+3  4610 8964 8133
+3  2182 13476 5898
+3  5898 13476 6749
+3  13477 5748 13478
+3  5747 5748 13477
+3  2216 8862 9039
+3  13479 13309 13310
+3  10988 6663 8182
+3  10353 9610 9608
+3  11854 5794 11537
+3  2182 13480 13476
+3  13481 8210 12477
+3  809 7525 7524
+3  2783 8048 12128
+3  13482 1572 596
+3  13482 1190 1572
+3  2798 5651 5653
+3  4424 4579 4422
+3  10192 1203 10193
+3  4525 3135 3137
+3  2826 10275 13483
+3  5490 13483 10275
+3  11282 8950 13256
+3  5411 7131 9428
+3  1930 9596 1928
+3  3263 9040 12824
+3  10728 2932 13484
+3  10728 10423 2932
+3  6569 11570 9766
+3  1499 13485 11259
+3  13435 13486 12044
+3  13435 12044 11342
+3  1741 11339 1739
+3  11339 13487 1739
+3  13488 1739 13487
+3  7424 978 12718
+3  3974 13086 7581
+3  13075 226 11557
+3  6692 6691 8469
+3  11784 7447 10226
+3  10224 10226 7447
+3  9900 12511 9780
+3  9900 11107 9901
+3  11269 8578 8124
+3  5961 5010 1250
+3  763 7243 9398
+3  2492 11764 2493
+3  2492 657 11764
+3  1293 13489 13490
+3  9766 11570 8103
+3  9766 8103 3812
+3  2427 4248 9585
+3  13491 13221 13492
+3  13222 13221 13491
+3  11161 13493 5668
+3  10387 10386 12189
+3  13330 4256 9850
+3  6309 7356 13494
+3  11987 4256 13330
+3  10441 10440 6852
+3  7171 13495 13496
+3  779 13496 13495
+3  5174 13497 5769
+3  9413 5076 7556
+3  10766 13016 7637
+3  9121 9910 11704
+3  9122 9121 11704
+3  1142 1141 9557
+3  13498 9166 9165
+3  3445 209 208
+3  4081 3445 208
+3  9770 11753 13434
+3  4723 7184 852
+3  13499 12009 12601
+3  5908 13499 12601
+3  8731 10010 6204
+3  9015 9017 5016
+3  4817 9015 5016
+3  3929 13500 13501
+3  4207 5917 4208
+3  10469 3355 10466
+3  10469 3353 3355
+3  12260 4319 4318
+3  12986 13502 10803
+3  2756 8447 2754
+3  13503 13364 13272
+3  10179 13504 12032
+3  10178 13504 10179
+3  3420 7294 7293
+3  8047 12128 8048
+3  3278 13505 3446
+3  1574 1573 9470
+3  9429 12881 10172
+3  6059 7494 1007
+3  10511 8781 11128
+3  12367 993 13291
+3  11225 8674 12089
+3  10678 6438 9367
+3  7047 6684 7048
+3  8327 8814 4107
+3  9595 13506 12666
+3  13507 7583 7582
+3  9828 6829 10531
+3  8159 5957 5956
+3  911 910 4779
+3  9435 10714 6032
+3  5260 6032 10714
+3  35 11453 1429
+3  6012 2329 8019
+3  1682 6012 11047
+3  8356 13508 11734
+3  12255 13000 9992
+3  9623 12372 12870
+3  3987 6160 8903
+3  10478 7270 6548
+3  12367 13291 13292
+3  3170 8408 11661
+3  7822 12894 11135
+3  7822 11135 5870
+3  12018 13509 8762
+3  8847 12218 12518
+3  12518 12218 484
+3  4550 13510 13083
+3  4550 4549 13510
+3  7519 7906 7520
+3  6018 10480 10086
+3  6018 10086 1263
+3  6900 13511 11809
+3  13512 13513 13514
+3  11617 3209 6580
+3  8373 2439 5447
+3  8373 2440 2439
+3  2372 5227 5968
+3  11307 13515 11504
+3  13516 13517 13518
+3  3614 3613 10052
+3  11765 2187 1235
+3  13519 3624 2968
+3  13520 9906 9905
+3  13520 9905 2358
+3  102 11062 9515
+3  101 11062 102
+3  13334 2408 10262
+3  3814 10262 2408
+3  13521 4782 1554
+3  8347 12595 10602
+3  1694 1696 6898
+3  11435 7375 12499
+3  6959 12710 12580
+3  5715 9995 1284
+3  3888 3890 9993
+3  5885 5669 7861
+3  2269 5178 5177
+3  2589 11109 6657
+3  6851 10441 6852
+3  5531 10879 10878
+3  13522 11789 13523
+3  13522 13523 3627
+3  10630 11400 4663
+3  13109 8954 1246
+3  7596 2604 682
+3  1886 8641 1887
+3  1509 7013 9562
+3  7110 6667 5756
+3  10530 8533 13524
+3  6037 9688 6116
+3  3099 5427 5426
+3  13156 12796 12795
+3  13525 2229 2228
+3  7465 13525 2228
+3  1013 7653 12870
+3  1012 7653 1013
+3  13526 10697 10696
+3  1754 1753 4740
+3  1700 9344 4921
+3  1657 11410 8652
+3  1658 1657 8652
+3  9459 5165 10908
+3  905 4106 4108
+3  1383 13282 6351
+3  1239 9902 11050
+3  475 8648 9408
+3  5759 1974 13527
+3  5759 13527 10281
+3  7671 3508 13528
+3  7449 3508 7671
+3  2623 8717 7191
+3  2622 8717 2623
+3  10999 13529 9492
+3  8131 2849 2851
+3  11535 8131 2851
+3  3846 4362 4365
+3  5170 1069 3744
+3  10737 9370 9369
+3  583 5298 581
+3  11579 10855 13530
+3  7288 12195 7289
+3  7403 725 13531
+3  11372 10910 305
+3  305 10910 11909
+3  1184 1628 1185
+3  9939 13165 9940
+3  4460 10629 11336
+3  2095 10410 2337
+3  9002 286 285
+3  13406 2803 2869
+3  13406 2869 2871
+3  10393 4764 4763
+3  11424 13214 10500
+3  10732 12637 10731
+3  1735 1737 7396
+3  2913 1735 7396
+3  13532 13533 7654
+3  13532 7654 5404
+3  7624 6815 7848
+3  10895 8157 5152
+3  13534 13535 241
+3  7848 4600 954
+3  7041 10590 13536
+3  7041 7040 10590
+3  1603 4585 10131
+3  1506 11183 13537
+3  1506 13537 11202
+3  8894 9663 10071
+3  7545 7192 3236
+3  5497 2177 9416
+3  2177 8276 9416
+3  2177 2176 8275
+3  7928 4753 13538
+3  7962 11176 9090
+3  7962 9090 4128
+3  12919 12921 13118
+3  4983 9699 13539
+3  4075 1165 11584
+3  4234 13540 4235
+3  13541 6533 13542
+3  11631 12623 12455
+3  12455 12623 12823
+3  4831 13543 4832
+3  13544 13545 13546
+3  5467 7470 5468
+3  1309 10777 10942
+3  13315 11556 5848
+3  13315 5848 4877
+3  6630 7027 8971
+3  6429 13547 2157
+3  2010 2009 2156
+3  2009 2157 2156
+3  6641 11158 6717
+3  12041 12482 12040
+3  1181 13548 4166
+3  5825 5827 5767
+3  4868 3927 4869
+3  4869 3927 2793
+3  13549 216 1563
+3  2665 2664 593
+3  4709 7027 6630
+3  7061 6429 2157
+3  13288 6483 13550
+3  1838 7149 1839
+3  12257 13551 7149
+3  7149 13551 11168
+3  11400 1582 4648
+3  13513 3129 10923
+3  1522 5326 1521
+3  13552 13512 13551
+3  12257 13552 13551
+3  12257 10049 13552
+3  13552 13553 13554
+3  13552 13554 13512
+3  13554 13555 13512
+3  13555 13513 13512
+3  13555 13556 13513
+3  13513 13556 11658
+3  2474 2476 10480
+3  4933 12239 12241
+3  2019 13555 13554
+3  11501 12208 8710
+3  278 13557 2791
+3  278 2791 279
+3  13549 1563 1566
+3  9485 13330 9486
+3  10616 1799 774
+3  13558 3127 3129
+3  11658 13558 3129
+3  13513 11658 3129
+3  11658 11659 13558
+3  11659 13557 13558
+3  13558 13557 278
+3  278 3127 13558
+3  6479 13559 13560
+3  13561 13560 13559
+3  1521 5326 5329
+3  1520 1521 5329
+3  7027 1967 8970
+3  12743 7316 10422
+3  12743 10422 10421
+3  7508 11837 11644
+3  6584 13562 6582
+3  13563 5858 12661
+3  3004 13564 13563
+3  3006 13564 3004
+3  12375 13565 550
+3  13542 12280 13566
+3  11942 5349 5351
+3  12127 10656 13567
+3  12127 13567 11790
+3  2346 3654 2196
+3  1105 1107 3403
+3  1514 1022 3259
+3  8038 7630 4559
+3  2750 11623 13568
+3  2749 11623 2750
+3  1194 13453 11330
+3  3773 3611 3192
+3  2934 2940 2942
+3  7364 12431 7365
+3  4664 7210 13569
+3  4664 13569 13570
+3  1084 10265 488
+3  490 1084 488
+3  13571 6249 10806
+3  3640 3449 10209
+3  3933 1196 1198
+3  3933 1198 8831
+3  3753 5165 9459
+3  6056 5588 11814
+3  10992 10991 10646
+3  11469 12961 8896
+3  4305 7778 13327
+3  3313 11273 8718
+3  2330 2332 13572
+3  10470 13572 2332
+3  8303 13573 4124
+3  5287 3421 11313
+3  9218 9217 8563
+3  586 6498 6500
+3  8214 6498 586
+3  2503 301 303
+3  9774 7879 12730
+3  8686 1756 1758
+3  8526 8161 10411
+3  11816 11366 13574
+3  7492 11586 7493
+3  11586 11585 7493
+3  5556 13575 13576
+3  13577 2521 7104
+3  13578 5705 5704
+3  10089 11276 10090
+3  12992 12991 12740
+3  12992 12740 8257
+3  985 987 10044
+3  2245 8515 2246
+3  6090 12529 6091
+3  5656 13579 5299
+3  5677 2608 9306
+3  965 7987 963
+3  13580 13581 13582
+3  5673 5672 13401
+3  8267 8266 13583
+3  945 13584 946
+3  4680 6211 6210
+3  7229 13357 11354
+3  9422 7229 11354
+3  6531 4481 6530
+3  566 3879 3881
+3  566 565 3879
+3  11876 5914 5916
+3  4875 3377 3379
+3  1626 5870 11136
+3  11135 11136 5870
+3  1051 13585 13586
+3  4274 10755 8414
+3  8582 7002 12986
+3  10921 13587 7280
+3  1285 6622 1286
+3  13588 5716 13589
+3  13590 917 4873
+3  3516 1034 3169
+3  10276 7284 2732
+3  2732 7284 2457
+3  7284 2458 2457
+3  13591 9560 9561
+3  6018 1263 7383
+3  13592 4814 6200
+3  6119 6300 6120
+3  12931 13593 4821
+3  8975 4821 13593
+3  4822 4821 8975
+3  12063 7848 13594
+3  13595 13332 1338
+3  4768 9466 2814
+3  7800 2792 13557
+3  9513 11928 13596
+3  2136 13404 2137
+3  8803 13597 12701
+3  13343 13597 8803
+3  13562 4139 13598
+3  3302 12871 13311
+3  10232 12116 10233
+3  12959 12116 10232
+3  11019 9142 227
+3  12802 2272 2561
+3  6159 4222 6733
+3  3314 3163 13599
+3  1451 1453 6825
+3  10507 13600 7268
+3  13600 9998 7268
+3  13601 322 13602
+3  13601 13602 569
+3  6815 6814 13603
+3  13604 5023 1726
+3  9834 9836 2253
+3  4195 11544 10181
+3  12444 5299 5301
+3  11515 8708 13605
+3  7284 10276 368
+3  6747 9380 6746
+3  6747 11724 9380
+3  2053 6062 1490
+3  10393 10392 4764
+3  11890 13235 11838
+3  11890 11838 11840
+3  983 5437 2176
+3  9109 4285 13606
+3  4349 9178 11311
+3  4293 4292 5889
+3  4293 5889 13607
+3  9847 9846 13608
+3  11908 11907 13609
+3  4073 9095 11907
+3  628 3034 3450
+3  9095 13610 11907
+3  5984 8341 5985
+3  5669 6933 3794
+3  2542 932 2841
+3  13611 2542 2841
+3  13612 12594 4429
+3  13613 10763 8531
+3  13614 13154 13155
+3  13614 13155 13615
+3  7747 2656 8944
+3  7576 7178 541
+3  7576 541 7577
+3  9674 167 1423
+3  12748 12568 12749
+3  12674 9941 12670
+3  5847 8356 11734
+3  3911 4632 6421
+3  12895 4723 9687
+3  4858 10868 10287
+3  13616 12770 8817
+3  13008 7469 7468
+3  3691 3360 3362
+3  13374 4065 13375
+3  13617 12304 10892
+3  9462 5285 1501
+3  11018 4423 5403
+3  13618 13619 13620
+3  13621 13620 13619
+3  482 13622 483
+3  6531 2219 4994
+3  12884 12887 12885
+3  10775 12885 12887
+3  11961 13575 5556
+3  684 10652 1986
+3  8099 7853 3246
+3  4471 10885 2524
+3  12635 5877 5876
+3  3305 13623 7933
+3  8753 1257 1259
+3  7203 2480 6118
+3  10194 2981 10498
+3  1835 12771 1836
+3  9162 1836 12771
+3  2926 11744 12951
+3  2926 12951 2927
+3  6999 2150 12422
+3  6998 2150 6999
+3  9145 12546 12678
+3  10992 10646 10645
+3  10453 2480 7203
+3  8570 1716 2894
+3  2808 2219 11152
+3  10026 10255 11507
+3  13624 10631 13625
+3  12607 13625 10631
+3  2309 8697 3966
+3  13626 10824 10823
+3  11918 7043 10504
+3  11918 10504 11183
+3  416 2092 2146
+3  1289 1291 1821
+3  1289 1821 1820
+3  13627 9399 13628
+3  13629 12412 13630
+3  13631 12412 13629
+3  8671 584 587
+3  4320 5565 9692
+3  10624 2382 2384
+3  8112 10947 90
+3  5987 11626 11763
+3  11119 243 13632
+3  5693 6936 4975
+3  10808 10807 9235
+3  8842 11953 12383
+3  8842 12383 2524
+3  11462 1697 3623
+3  7816 11462 3623
+3  4172 6839 6838
+3  12628 11969 11971
+3  317 12511 9900
+3  317 9900 9899
+3  4782 4784 1554
+3  861 860 8690
+3  10255 1720 11506
+3  11670 13122 13633
+3  10727 6839 10726
+3  10727 10615 6839
+3  7611 13634 7612
+3  5924 13635 2318
+3  13636 12136 12091
+3  13208 12521 13637
+3  13208 13637 13638
+3  6503 10956 3422
+3  9031 13639 9202
+3  13640 13231 13634
+3  225 989 3576
+3  13641 13642 5552
+3  5240 5624 11277
+3  13643 2392 13644
+3  2217 2808 2809
+3  6764 9831 12299
+3  334 336 11299
+3  7912 12870 7653
+3  3919 9053 3836
+3  4435 9053 3919
+3  13384 12980 3727
+3  11257 9290 9291
+3  1131 1130 2296
+3  3460 13645 13646
+3  4447 4446 12360
+3  13647 13648 9021
+3  11884 8934 9952
+3  13649 3565 3564
+3  9108 6294 3068
+3  4532 2155 7344
+3  4532 7344 4530
+3  9167 1498 4618
+3  1527 12305 1528
+3  2977 11568 7443
+3  13650 13651 13652
+3  13350 13650 13652
+3  10153 3418 10593
+3  346 8154 344
+3  3311 10153 10593
+3  2833 13171 2834
+3  11344 9530 11329
+3  13653 11344 11329
+3  6103 858 861
+3  6103 861 8689
+3  3731 9670 13654
+3  7319 7318 12375
+3  13655 13656 12071
+3  13655 12071 10814
+3  10328 6918 6917
+3  8114 2583 6984
+3  5921 11853 13657
+3  941 943 10803
+3  13658 13016 13659
+3  13658 13659 13660
+3  13661 13662 10036
+3  2151 10550 2152
+3  1411 13663 2801
+3  13664 10675 10674
+3  10328 3312 6918
+3  10724 11895 13113
+3  13033 11592 9912
+3  13033 9912 9911
+3  367 9384 7931
+3  2607 2606 10635
+3  1668 10635 2606
+3  3816 8328 1156
+3  13006 13665 10887
+3  5455 4937 4938
+3  9640 12197 13666
+3  9640 284 12197
+3  4722 3069 7185
+3  1287 1286 6516
+3  4702 4704 1080
+3  4023 13667 1570
+3  12602 1570 13667
+3  5983 1285 1287
+3  8355 13668 12393
+3  1099 12393 13668
+3  1090 9329 4158
+3  3552 13669 5415
+3  3719 3035 13670
+3  5756 5755 13671
+3  12710 4498 3714
+3  5178 11155 228
+3  10734 9996 10343
+3  13672 294 13673
+3  7250 3719 13670
+3  13674 6988 10529
+3  3369 13282 3368
+3  8410 174 3368
+3  6524 13675 1828
+3  10829 13675 10380
+3  6524 10380 13675
+3  6798 6647 13676
+3  13375 4065 4067
+3  9399 6596 9400
+3  2192 1159 1158
+3  13677 7851 13678
+3  4774 4775 7719
+3  9591 7719 4775
+3  9673 9675 5315
+3  11470 11469 8896
+3  13679 4935 4934
+3  12326 13679 4934
+3  5917 4451 4208
+3  9819 9138 10852
+3  11551 11666 8105
+3  7789 8105 11666
+3  3476 1954 4335
+3  7268 9998 5599
+3  4163 4165 5096
+3  4165 8237 13680
+3  1271 13681 1272
+3  10216 10218 13682
+3  13683 10216 13682
+3  9154 13683 13682
+3  8410 303 4999
+3  9798 2616 3323
+3  8410 4999 174
+3  9630 13464 2984
+3  13684 9948 12396
+3  9787 13685 1953
+3  13074 2025 4158
+3  3789 8641 441
+3  3224 3223 2905
+3  4446 4913 12360
+3  1638 7339 1639
+3  5716 3414 10830
+3  8892 2678 2680
+3  8420 8419 11304
+3  8624 10960 8275
+3  363 2641 360
+3  2860 9999 10507
+3  2860 6700 9999
+3  9140 6700 2860
+3  9140 2860 2859
+3  756 3385 757
+3  10764 6834 10284
+3  4769 2817 5912
+3  4769 2814 2817
+3  9861 9366 13102
+3  8664 3092 13686
+3  1201 1200 8522
+3  4108 7389 12670
+3  5207 4231 10850
+3  4232 10850 4231
+3  10404 10767 13687
+3  13688 1195 12994
+3  9908 9910 13689
+3  8976 4448 7262
+3  8976 7262 8977
+3  3530 3647 3646
+3  13690 13691 13692
+3  13693 13691 13690
+3  8649 10788 5150
+3  8720 12751 12753
+3  2132 13694 13339
+3  2129 2132 13339
+3  7239 10636 10638
+3  9329 6189 4159
+3  6188 4159 6189
+3  7024 7026 1444
+3  6448 8187 7399
+3  2746 3976 3975
+3  10870 13593 12931
+3  5396 10834 3569
+3  9473 3569 10834
+3  6173 6172 3144
+3  2512 8742 2513
+3  13695 5380 2839
+3  3030 13695 2839
+3  2077 2078 4054
+3  3839 10215 6311
+3  9567 13628 9582
+3  12000 11794 1529
+3  4783 12528 4784
+3  8700 473 1319
+3  5982 13696 9495
+3  2963 8700 1319
+3  3977 11126 1418
+3  10954 10317 3923
+3  8201 2536 8202
+3  9063 8202 2536
+3  13324 12229 199
+3  10 12 13270
+3  4236 449 12491
+3  11387 5327 5326
+3  34 13162 1436
+3  11434 7501 11620
+3  11434 10983 7501
+3  2209 9867 5676
+3  2209 2211 9867
+3  6502 8537 7330
+3  2658 5121 2659
+3  13594 7848 6815
+3  9284 326 9552
+3  11229 13328 11118
+3  2591 5236 2592
+3  6746 3802 3801
+3  4847 13393 9778
+3  11515 8496 8709
+3  10468 10467 8596
+3  3329 2170 2172
+3  1416 1396 10375
+3  10282 10793 10792
+3  5758 10792 10791
+3  11337 4663 4662
+3  7129 8138 5455
+3  13395 3042 6326
+3  3040 3042 13395
+3  13697 13698 13699
+3  1452 4418 10326
+3  9383 4768 7935
+3  3147 3149 2557
+3  8353 12478 2949
+3  11907 13610 13609
+3  10819 10291 13535
+3  2493 12435 5402
+3  6518 4739 610
+3  6518 610 612
+3  5453 5452 13700
+3  1216 13569 122
+3  12785 3841 13701
+3  6197 6196 13702
+3  10561 11341 11147
+3  5681 12203 5682
+3  13651 13703 13652
+3  13577 2267 13704
+3  3449 3448 2022
+3  1065 9774 10766
+3  8814 8813 13205
+3  7676 3328 3330
+3  10657 11860 8185
+3  9211 4928 12837
+3  4928 9211 8003
+3  4928 8003 4929
+3  13058 13705 1324
+3  13706 11387 5326
+3  13707 13706 5326
+3  1546 2582 13708
+3  13709 13710 7479
+3  13709 7479 1456
+3  2755 1989 1991
+3  1157 11920 884
+3  13711 1621 1623
+3  12826 13712 4467
+3  8195 13712 12826
+3  6188 6190 12047
+3  8266 9719 13713
+3  9719 11236 13713
+3  8266 13713 13588
+3  13588 13713 5715
+3  3497 10399 5270
+3  13526 11052 10697
+3  7488 13714 9479
+3  11297 13715 8611
+3  8297 6770 13716
+3  12395 6082 3642
+3  12395 7777 6082
+3  4859 8165 124
+3  258 4859 124
+3  3705 9342 1908
+3  3707 9342 3705
+3  6699 9042 2950
+3  13717 11084 11081
+3  7496 11084 13717
+3  13718 13719 13720
+3  13718 13720 428
+3  7700 9916 7701
+3  9194 8943 11231
+3  12639 13721 12843
+3  11149 2922 7361
+3  10243 10245 10678
+3  3846 6970 3847
+3  2196 2198 2346
+3  9056 7081 13722
+3  13172 13723 5869
+3  8380 12614 11173
+3  9261 590 9259
+3  13724 590 9261
+3  8381 8380 11173
+3  5461 5462 13725
+3  13726 2690 5775
+3  2603 2690 13726
+3  11100 3946 13727
+3  5469 11100 13727
+3  5194 13728 13729
+3  5193 13728 5194
+3  11838 2294 11839
+3  6374 7106 7150
+3  5775 3664 13726
+3  4431 3269 7668
+3  13722 7081 7080
+3  13722 7080 1587
+3  13730 74 3208
+3  961 8739 9193
+3  885 1009 11399
+3  12077 5396 5398
+3  13708 6448 7398
+3  953 9469 385
+3  5980 11383 5981
+3  12090 7278 5533
+3  13731 11848 13732
+3  10874 13732 11848
+3  12446 10493 12731
+3  5051 11119 5052
+3  11182 3116 4277
+3  1050 9008 9009
+3  9008 11324 11893
+3  2825 3113 1280
+3  2323 2320 5625
+3  2323 5625 5107
+3  13733 8142 340
+3  13296 3798 1889
+3  651 653 5844
+3  8589 12438 2929
+3  11518 12005 990
+3  11518 5250 12005
+3  686 12610 3268
+3  12840 13734 11705
+3  6819 10825 1274
+3  13077 11624 12844
+3  7365 9978 7856
+3  8227 1632 1631
+3  6438 6437 13715
+3  13735 10717 8263
+3  6023 6024 6618
+3  2218 4994 2219
+3  12892 12891 12559
+3  12558 12559 12891
+3  10061 7739 10062
+3  9634 12902 4206
+3  4880 13736 4881
+3  12943 39 7998
+3  7860 8171 12434
+3  11706 11177 1030
+3  4008 4010 6366
+3  5136 7759 7760
+3  13737 13738 13739
+3  13740 13739 13738
+3  9807 13543 4831
+3  8943 8942 11232
+3  11231 8943 11232
+3  11556 13315 10535
+3  6739 13741 13103
+3  6739 13103 6737
+3  754 11334 8846
+3  11709 11326 10332
+3  9326 8585 9327
+3  7360 2962 3982
+3  7360 3982 1435
+3  7917 7916 11766
+3  6858 11476 13742
+3  7071 13742 11476
+3  13358 6858 13743
+3  13742 13743 6858
+3  7917 11766 11088
+3  5432 5431 6636
+3  9118 754 8846
+3  13659 13526 13660
+3  8065 2896 1186
+3  10325 2676 12604
+3  12005 502 988
+3  13744 5502 3138
+3  13745 5502 13744
+3  13275 7154 6696
+3  4287 9118 8846
+3  3138 3140 11103
+3  770 7997 771
+3  919 525 524
+3  8541 12634 13746
+3  13735 13746 12634
+3  8543 12634 8541
+3  12496 12634 8543
+3  2296 2295 4718
+3  11099 3405 13747
+3  11099 13747 11097
+3  11626 5987 3870
+3  1873 6266 6122
+3  1398 1873 6122
+3  1319 13748 2961
+3  9819 2859 6333
+3  6642 6857 7552
+3  6642 7552 13749
+3  6919 6300 11687
+3  6119 11687 6300
+3  8722 10101 3141
+3  13644 2392 13750
+3  3923 10318 2070
+3  5673 13751 12441
+3  12764 4351 6177
+3  9946 8558 13752
+3  12558 13752 8558
+3  11361 11717 10515
+3  12093 11717 11361
+3  5438 9819 8088
+3  13753 4018 8867
+3  9659 8746 13754
+3  13755 13756 10598
+3  13757 9293 9292
+3  13758 6738 1356
+3  6740 1356 6738
+3  11267 1559 11807
+3  9285 2242 13759
+3  12448 156 13760
+3  12448 157 156
+3  3654 10644 11836
+3  3654 11836 6158
+3  1296 4329 13761
+3  13762 107 11213
+3  13762 11213 11212
+3  5305 3248 3247
+3  4784 3855 1555
+3  12200 13384 12201
+3  13763 13577 7104
+3  10159 9750 13764
+3  13249 6768 3432
+3  13765 285 287
+3  5240 11722 5624
+3  11766 13766 11767
+3  677 3297 678
+3  13767 1389 6966
+3  13767 1387 1389
+3  7337 8268 4352
+3  2185 7337 4352
+3  11193 3829 13768
+3  9721 118 117
+3  13365 3832 12261
+3  145 13769 2695
+3  145 2695 1012
+3  13702 1464 13770
+3  1466 13770 1464
+3  2573 4029 13771
+3  1237 12331 13346
+3  4414 12331 1237
+3  13772 10030 5149
+3  13772 5149 6360
+3  8494 8496 4067
+3  6521 687 3486
+3  11484 7206 7207
+3  157 12448 6019
+3  4053 5062 10442
+3  13017 12246 13659
+3  12651 10894 276
+3  7921 8953 8172
+3  13773 13703 10366
+3  3868 6461 6464
+3  3868 6464 3867
+3  10872 4448 8976
+3  10872 13774 4448
+3  8704 13775 3241
+3  5705 13776 5706
+3  13777 10046 10047
+3  9731 10046 13777
+3  9805 9806 10269
+3  4355 10269 9806
+3  5876 13778 10123
+3  7695 7697 6345
+3  13779 5445 13047
+3  9342 5046 1909
+3  5043 5046 9342
+3  12907 13134 6526
+3  6527 6526 13134
+3  10001 502 10799
+3  12632 13780 5309
+3  9270 1269 8707
+3  8707 1269 1685
+3  11961 12205 13575
+3  1875 13781 11571
+3  1671 1670 4406
+3  8556 10651 684
+3  2605 8556 684
+3  13782 10063 13783
+3  12858 12855 13701
+3  3974 7581 3856
+3  5164 11678 12589
+3  5164 12589 3281
+3  12639 13767 11347
+3  11175 5862 8593
+3  3674 7260 2372
+3  9941 9940 905
+3  5767 3679 5768
+3  13784 3679 5767
+3  13785 13786 13787
+3  13788 5405 5407
+3  4767 13789 13790
+3  6305 7261 6306
+3  298 6305 299
+3  13731 13791 7395
+3  13732 13791 13731
+3  5610 973 975
+3  8567 5610 975
+3  2820 8139 2819
+3  5133 3692 3691
+3  774 7366 4436
+3  4380 4968 4970
+3  13792 9403 6613
+3  13793 13794 13795
+3  7041 13536 8062
+3  7381 8748 9425
+3  36 12214 6927
+3  36 6927 619
+3  10085 7570 3064
+3  13796 3005 4710
+3  8815 8437 8438
+3  803 13797 13372
+3  3398 13372 13797
+3  13798 10454 9086
+3  4329 12470 13761
+3  11229 3854 13328
+3  13024 6866 8587
+3  6579 13799 6580
+3  12031 2928 6354
+3  7580 7579 6677
+3  12207 7526 11408
+3  7508 11644 7485
+3  7485 7484 7508
+3  1791 1809 1792
+3  11793 13800 9666
+3  6177 4350 6395
+3  13801 72 13802
+3  71 13802 72
+3  13803 13804 13805
+3  13806 13804 13803
+3  12624 3141 3143
+3  9109 4283 4285
+3  2586 12630 2587
+3  2457 2730 2732
+3  12162 13807 12163
+3  6136 3004 13563
+3  4154 2747 4151
+3  5420 11908 13808
+3  630 2478 5383
+3  5383 2478 7138
+3  9052 13809 13121
+3  1978 13531 1979
+3  195 10833 2974
+3  195 12165 10833
+3  4813 6200 4814
+3  3070 9556 9462
+3  12464 11604 6025
+3  10882 12236 13810
+3  7857 9979 6426
+3  4378 4377 13811
+3  9455 13812 9453
+3  13813 6043 10851
+3  13813 13814 6043
+3  12162 2047 7160
+3  66 65 13351
+3  7724 13815 6849
+3  10177 6849 13815
+3  9283 326 9284
+3  9327 11038 13816
+3  13817 13818 8910
+3  13819 8910 13818
+3  13820 11226 5517
+3  7546 7545 9470
+3  13821 13822 12187
+3  13821 10774 13822
+3  13823 13824 9518
+3  13625 2412 13624
+3  12762 5296 13825
+3  5601 13769 145
+3  3793 11633 13826
+3  3792 11633 3793
+3  8224 10283 5884
+3  5097 10102 7828
+3  10993 9137 8869
+3  9135 9137 10993
+3  967 7119 969
+3  6922 6921 13827
+3  3839 8234 10215
+3  7882 7884 9299
+3  12326 4934 9467
+3  6118 6117 8182
+3  2718 2717 9332
+3  3684 8314 2731
+3  13828 13090 12254
+3  13828 13089 13090
+3  3661 13829 3662
+3  13052 2048 13830
+3  11521 11497 9544
+3  5026 5025 13831
+3  13337 7927 3026
+3  2774 982 984
+3  207 6503 6504
+3  207 206 6503
+3  3934 11092 13832
+3  5797 13833 12914
+3  13698 604 606
+3  13049 2023 13834
+3  13049 13834 13835
+3  1112 11611 12098
+3  1111 11611 1112
+3  13390 141 143
+3  13836 1054 7176
+3  5382 12298 631
+3  8084 13349 9150
+3  1859 13837 7769
+3  8634 13050 13838
+3  3867 6960 13030
+3  3637 12852 3635
+3  12942 13839 12943
+3  12942 1418 13839
+3  13840 883 11421
+3  13051 13819 13818
+3  11245 9433 12699
+3  3623 13841 8313
+3  2576 13842 13843
+3  2576 6962 13842
+3  12686 3766 12669
+3  12686 12669 6940
+3  13844 8861 3771
+3  13084 1010 1009
+3  3426 3425 1785
+3  1784 3426 1785
+3  7295 13131 7296
+3  10901 6685 6684
+3  8368 11953 8842
+3  4942 7913 1762
+3  13845 12421 13846
+3  12503 2646 2647
+3  13847 2646 12503
+3  11942 13846 11392
+3  13845 13846 11942
+3  9451 13848 9101
+3  4267 9101 13848
+3  6903 11942 11392
+3  13849 4227 9336
+3  13428 11956 13379
+3  13850 7546 9471
+3  6612 2576 13843
+3  12030 8353 12031
+3  4729 4728 13379
+3  11956 4729 13379
+3  13060 9011 13851
+3  13729 4144 5194
+3  3272 4144 13729
+3  1761 1760 12648
+3  5501 5502 13852
+3  11268 10920 8700
+3  10876 2639 7315
+3  9120 5595 6885
+3  2587 12630 4262
+3  5595 9120 7317
+3  31 30 11677
+3  1496 31 11677
+3  691 790 8766
+3  6617 9771 6023
+3  13193 10522 10488
+3  11613 543 7151
+3  3333 3334 12588
+3  9607 13853 13480
+3  587 6500 11026
+3  587 586 6500
+3  8354 1611 9570
+3  13854 9570 1611
+3  2182 1352 13480
+3  8068 10203 5205
+3  5204 8068 5205
+3  7029 8067 5204
+3  13855 8136 13380
+3  13855 12223 8136
+3  13856 13855 13380
+3  13856 13380 13857
+3  11370 9586 9588
+3  11299 8642 8641
+3  10239 166 12439
+3  258 2822 4859
+3  13858 2227 8417
+3  2225 2227 13858
+3  9804 914 3444
+3  3444 1636 1635
+3  12470 3701 2473
+3  258 257 2822
+3  10803 13859 3807
+3  13860 13861 13286
+3  13860 13286 13285
+3  6153 6155 1275
+3  2958 11319 11071
+3  11985 8855 7118
+3  13300 12135 7540
+3  7540 12135 7541
+3  9933 13394 6326
+3  6548 13862 12372
+3  6781 5369 1455
+3  13287 4962 4963
+3  6486 2583 8114
+3  3575 13863 3480
+3  9677 8886 7801
+3  13073 7801 8886
+3  12759 12587 2993
+3  12759 2993 8416
+3  6116 9688 5584
+3  13864 5421 7538
+3  11326 5930 513
+3  12141 3842 3671
+3  6327 3671 3842
+3  5045 11391 5046
+3  9125 3066 5990
+3  6123 6125 8181
+3  8181 6125 13865
+3  10686 9527 9526
+3  4068 11824 4069
+3  7790 13866 7791
+3  6977 6976 2
+3  1 6977 2
+3  2598 12712 9526
+3  2597 12712 2598
+3  8303 5469 13727
+3  1605 10552 12038
+3  12688 10552 1605
+3  13167 9057 9059
+3  11404 9057 13167
+3  1150 6203 1151
+3  2399 5063 2400
+3  5370 9267 13867
+3  10059 5370 13867
+3  3749 6427 3750
+3  8907 5838 314
+3  312 314 5838
+3  13601 569 7177
+3  6072 13155 6070
+3  13832 13868 13869
+3  10619 10114 12655
+3  10619 12655 3089
+3  8378 13870 10933
+3  4599 13240 4597
+3  4205 13240 4599
+3  9115 1386 13871
+3  13871 1386 1385
+3  10235 3531 10236
+3  11049 11050 5831
+3  5400 13872 5399
+3  7319 12375 855
+3  4615 9441 4616
+3  2805 8269 3031
+3  2164 2166 7729
+3  13873 13874 13875
+3  4854 13876 814
+3  5179 13876 4854
+3  3199 13877 13878
+3  11816 13879 11366
+3  11816 11818 13879
+3  8955 12799 8956
+3  411 12585 893
+3  13305 10862 12354
+3  4767 13880 13789
+3  8400 126 12961
+3  208 210 13881
+3  208 13881 4080
+3  10300 7774 12239
+3  13882 12239 7774
+3  8039 2816 460
+3  2595 9136 4836
+3  4655 12447 4656
+3  12631 11909 4953
+3  8036 12631 11819
+3  5360 12000 5361
+3  12407 5361 12000
+3  13883 13884 13885
+3  13886 13883 13885
+3  4026 1688 5055
+3  4659 2700 2702
+3  9970 1068 1601
+3  4623 4625 9114
+3  13887 13888 928
+3  13889 13887 928
+3  1768 1767 5815
+3  8089 9970 1601
+3  5540 6430 5508
+3  13890 13891 13892
+3  12938 13891 13890
+3  13893 781 3774
+3  9115 9114 1386
+3  2573 2572 7209
+3  9907 131 8638
+3  13894 13895 11887
+3  11542 13895 13894
+3  11328 3917 7172
+3  12777 1027 1026
+3  3586 2672 4477
+3  3120 3119 6982
+3  12946 13857 3628
+3  2674 7925 2672
+3  9695 10394 13896
+3  11641 10394 9695
+3  13897 2597 2599
+3  13898 2597 13897
+3  1878 4925 4924
+3  530 11018 5403
+3  6616 12926 12516
+3  6614 6616 12516
+3  13899 12591 12590
+3  8663 9238 6331
+3  1516 1515 13900
+3  12590 13901 13899
+3  12590 13902 13901
+3  11612 1658 8653
+3  1140 11612 8653
+3  13902 11678 30
+3  12590 11678 13902
+3  1895 1894 762
+3  2630 6046 21
+3  2630 12586 6046
+3  12776 9729 13903
+3  5741 8100 5996
+3  13904 13498 9165
+3  10013 5542 900
+3  13905 12701 13597
+3  5157 5156 6819
+3  12596 8939 13304
+3  8147 8146 13906
+3  7350 8147 13906
+3  4694 5081 5083
+3  13203 3693 3303
+3  10187 13082 13081
+3  13413 9528 3924
+3  3243 9370 10736
+3  2521 13704 2522
+3  9004 13907 3351
+3  3713 13908 5005
+3  7415 6211 4680
+3  13909 13910 10676
+3  13385 12844 12845
+3  13911 3678 13912
+3  6292 13669 13433
+3  5415 13669 6292
+3  5535 11259 6144
+3  11155 201 228
+3  13913 12722 11504
+3  9553 5780 5779
+3  13914 9602 7439
+3  12320 6397 6396
+3  5943 1140 9818
+3  11612 1140 5943
+3  6960 2553 13030
+3  13915 9227 13916
+3  13916 9227 12402
+3  12620 12622 9866
+3  11545 13530 10855
+3  11545 10855 13916
+3  13916 10855 13915
+3  11464 10446 2862
+3  1790 1990 2174
+3  3492 3489 7067
+3  7066 3492 7067
+3  10568 3259 8256
+3  744 2973 2972
+3  8091 5313 8092
+3  4880 10360 11990
+3  11988 11990 10360
+3  7408 13917 3065
+3  12501 12231 12502
+3  4880 11990 13736
+3  11261 8634 8452
+3  8715 8634 11261
+3  13918 6779 13132
+3  649 3210 13919
+3  1512 701 703
+3  4713 13920 4712
+3  3621 7134 13164
+3  2212 2192 1158
+3  2778 6337 10774
+3  10978 11460 11320
+3  13921 13922 13923
+3  10774 6337 12338
+3  4475 9390 13924
+3  4475 4477 9390
+3  12484 9078 5718
+3  6401 8825 10605
+3  6401 6487 8825
+3  13925 7175 7124
+3  13926 13927 9509
+3  13926 9509 9508
+3  4438 12617 4439
+3  7068 13928 12035
+3  11247 13633 7976
+3  808 810 1321
+3  4751 2850 418
+3  2849 418 2850
+3  9751 2508 13929
+3  9752 9751 13929
+3  8017 9194 9676
+3  3642 3644 13930
+3  12186 9505 134
+3  11258 11257 12235
+3  11258 12235 1253
+3  3360 12382 3361
+3  11464 5070 9174
+3  5885 7861 257
+3  8248 4163 5096
+3  8248 5096 7386
+3  8248 7386 12693
+3  6768 8299 7965
+3  9666 13800 11471
+3  3959 5011 8995
+3  10471 6086 11778
+3  6898 6900 11808
+3  13931 10817 13932
+3  4243 13931 13932
+3  13931 4665 10817
+3  13549 1566 13933
+3  13934 12695 8473
+3  11634 13934 8473
+3  4792 6923 4793
+3  13203 3303 2776
+3  249 636 10005
+3  1194 1193 13453
+3  3972 4566 13934
+3  7607 10372 796
+3  8878 7163 847
+3  6337 2780 10722
+3  13935 13936 13937
+3  13938 13937 13936
+3  7815 5711 7341
+3  8971 8536 6427
+3  8536 8971 8970
+3  5331 859 13939
+3  9419 13940 13941
+3  4224 8252 13942
+3  13943 9693 9713
+3  11388 6681 8071
+3  3507 13942 8252
+3  3507 8252 10058
+3  813 812 6764
+3  13944 5522 9141
+3  9141 5522 5524
+3  2922 10012 2923
+3  8876 2737 2736
+3  13945 12059 9646
+3  3583 1671 3584
+3  13946 13369 7945
+3  11211 11210 5264
+3  13947 8697 8696
+3  13948 8697 13947
+3  3408 3407 6551
+3  1552 4296 11849
+3  13295 7408 7965
+3  12904 13949 5917
+3  4637 5731 10486
+3  6719 4917 4916
+3  4257 13950 13951
+3  13535 13534 12101
+3  10819 13535 12101
+3  5034 7669 5035
+3  7669 13335 5035
+3  3046 3048 13534
+3  11564 9527 9338
+3  9337 11564 9338
+3  11564 9525 9527
+3  2637 10897 13952
+3  13217 6105 6107
+3  3159 13953 8561
+3  2638 2637 13952
+3  3878 6105 13217
+3  13954 6105 3878
+3  6903 5349 11942
+3  7727 2006 2005
+3  3753 3755 5165
+3  4993 7917 11087
+3  11087 4479 4993
+3  437 439 6792
+3  437 6792 765
+3  9672 5142 8139
+3  9672 8139 2820
+3  9341 5043 9342
+3  6499 99 10035
+3  6500 6499 10035
+3  9659 11844 8203
+3  13775 2852 3241
+3  2853 2852 13775
+3  9875 5381 5474
+3  7087 2331 2330
+3  851 9687 852
+3  13955 9730 3740
+3  13955 3740 1273
+3  13956 10036 13957
+3  13958 5857 5858
+3  7254 5857 13958
+3  9284 8576 8575
+3  9284 9552 8576
+3  4395 11058 7622
+3  12638 6705 13721
+3  13846 2282 11392
+3  2010 6491 6490
+3  13959 13011 9837
+3  8916 3589 3318
+3  61 7241 59
+3  4330 6773 4890
+3  13960 13961 13962
+3  4982 2102 5667
+3  2101 5667 2102
+3  11931 4762 3733
+3  1761 12648 11442
+3  13418 13963 11276
+3  9490 8435 9491
+3  13148 9491 8435
+3  13964 10219 7022
+3  13461 13965 11637
+3  13461 11637 11636
+3  10166 12275 12277
+3  13966 7288 7287
+3  10632 6758 3474
+3  2279 2758 2280
+3  4933 10300 12239
+3  4932 10300 4933
+3  13467 9529 9530
+3  11346 13467 9530
+3  8392 12280 9353
+3  4832 13543 13967
+3  12280 8392 13009
+3  4822 13009 8392
+3  3063 10085 3064
+3  6642 6641 6857
+3  13076 13968 1484
+3  13969 13970 12085
+3  8564 8563 9217
+3  8564 9217 8763
+3  7942 7944 13971
+3  4929 5639 13972
+3  8865 8270 8272
+3  8865 8272 8866
+3  7753 3137 3136
+3  2420 7753 3136
+3  1989 12074 10810
+3  2397 7362 5776
+3  9502 5727 12114
+3  2300 9415 2301
+3  11860 10657 10656
+3  11860 10656 13973
+3  5952 13974 13975
+3  13973 10656 12832
+3  11427 10789 2450
+3  615 5646 6803
+3  611 13976 612
+3  12625 2771 2770
+3  12625 2770 5850
+3  8261 11019 11979
+3  3055 2539 9777
+3  8198 8200 3858
+3  11133 10465 9857
+3  11133 3594 10465
+3  336 13977 442
+3  2529 7233 13978
+3  12980 8794 3725
+3  11050 8393 5831
+3  1852 9537 2809
+3  11453 10993 8869
+3  5148 4697 7571
+3  12039 11035 10681
+3  13868 11090 5702
+3  3077 13975 9930
+3  5707 11458 6358
+3  13979 11179 13980
+3  3593 11133 62
+3  3593 3594 11133
+3  1800 13981 1801
+3  3520 1800 1799
+3  13982 13981 1800
+3  13983 10795 10632
+3  8121 836 5333
+3  12454 1814 7846
+3  4871 12454 7846
+3  8206 6113 6731
+3  6731 6113 1675
+3  4977 4976 9189
+3  3732 3718 11291
+3  6197 13770 8559
+3  5550 10267 5551
+3  3006 13984 13985
+3  13986 3006 13985
+3  4181 2874 13250
+3  1862 13244 12117
+3  4223 3987 3986
+3  8714 13987 91
+3  2707 10864 2708
+3  1225 1224 11170
+3  12618 11067 11132
+3  13643 13644 13988
+3  9804 3444 1635
+3  13989 13580 13990
+3  13991 8876 6339
+3  8029 1524 13992
+3  13060 9010 9011
+3  1864 13300 13993
+3  1864 5977 13300
+3  13994 13995 10355
+3  10411 10412 1742
+3  4608 13996 1681
+3  11672 4608 1681
+3  4583 4582 58
+3  8659 8658 12916
+3  6790 12916 8658
+3  1229 13566 7262
+3  2758 2197 1478
+3  13997 11200 8768
+3  7421 9262 7422
+3  4546 13826 1230
+3  13112 4935 13679
+3  13112 13679 824
+3  13998 8007 13999
+3  7246 10199 7247
+3  4862 13366 3844
+3  3286 460 3287
+3  6748 5902 14000
+3  11848 4296 10874
+3  6988 12835 10529
+3  2825 1280 1279
+3  4341 3952 4344
+3  14001 14002 13278
+3  14001 13278 13279
+3  2796 11217 6652
+3  6427 8537 6428
+3  10530 6142 8533
+3  13234 4569 4568
+3  12618 6954 11067
+3  4447 14003 4445
+3  14003 4895 4445
+3  14004 10598 13756
+3  1578 11106 11788
+3  8664 13686 12532
+3  8894 11916 6640
+3  4719 3233 6284
+3  8330 11541 11540
+3  14005 6846 14006
+3  1907 14006 6846
+3  255 14007 256
+3  12505 5737 9953
+3  11165 5737 12505
+3  13147 14008 12883
+3  13147 12883 14009
+3  9872 14008 13147
+3  14010 14011 3863
+3  1733 11127 4512
+3  13872 14012 10589
+3  5400 14012 13872
+3  5225 14013 7222
+3  4943 4944 10448
+3  7268 5599 7269
+3  10572 1344 8677
+3  14014 8677 1344
+3  11371 14015 8226
+3  9588 14015 11371
+3  6607 5920 2698
+3  2072 2071 7722
+3  2926 12795 10191
+3  7051 9590 7052
+3  9182 10537 7521
+3  7242 3683 6570
+3  2955 2957 13237
+3  13199 9179 9860
+3  9862 13199 9860
+3  8718 2622 2624
+3  8718 2624 3162
+3  11797 327 9283
+3  794 13875 791
+3  8023 11010 99
+3  14016 9777 109
+3  12949 14017 6495
+3  6606 11853 5920
+3  4843 11410 1657
+3  8565 4843 1657
+3  10221 10222 4708
+3  10221 4708 13165
+3  19 1204 20
+3  67 20 1204
+3  2097 6287 12871
+3  2093 7329 597
+3  1326 850 6367
+3  9061 5377 9062
+3  8589 2929 11398
+3  4820 2574 6611
+3  5651 5899 5652
+3  10207 14018 8840
+3  10208 10207 5017
+3  8480 10021 4858
+3  12813 6827 8099
+3  14019 4640 1117
+3  14019 1117 1119
+3  2848 2847 11609
+3  7365 5444 5443
+3  6574 11306 5770
+3  6574 5770 6528
+3  9479 6296 6298
+3  8128 922 10797
+3  5795 9459 10908
+3  6298 7488 9479
+3  4353 4352 3711
+3  12873 6559 12874
+3  831 830 11667
+3  14020 11667 830
+3  8176 11888 14021
+3  10945 110 2540
+3  5256 3277 7128
+3  10400 1730 1729
+3  10332 388 390
+3  13559 14022 14023
+3  14024 14022 13559
+3  13127 13271 9953
+3  4889 14025 10263
+3  2826 14026 2825
+3  2825 14027 3113
+3  14026 14027 2825
+3  8458 6983 4539
+3  4540 4539 6983
+3  13851 9011 9961
+3  10998 2834 8717
+3  2835 2834 10998
+3  5449 3153 5450
+3  9426 3153 5449
+3  12960 10690 7672
+3  3112 6807 13091
+3  14028 3844 13366
+3  12960 8255 10690
+3  1063 8405 1064
+3  14026 4141 14027
+3  7861 1031 2821
+3  14029 12423 12422
+3  13174 13173 13676
+3  10154 6991 10155
+3  6789 12915 12916
+3  5445 7857 12911
+3  4904 14030 12381
+3  1370 11192 9555
+3  8901 11192 1370
+3  3508 3507 10058
+3  12979 8414 8795
+3  12979 8795 8794
+3  7233 10473 13978
+3  5608 11283 14031
+3  13299 5972 5974
+3  10940 22 14032
+3  155 6322 2455
+3  3441 6079 3390
+3  6879 14033 6880
+3  13570 4662 4664
+3  14034 6033 14035
+3  14034 14035 13382
+3  4486 4485 3920
+3  2759 985 14036
+3  14037 5558 5559
+3  8694 11563 11562
+3  9957 12958 9949
+3  7053 14038 7051
+3  9202 3254 6726
+3  6010 1287 6516
+3  3934 13832 3935
+3  3966 8697 10900
+3  14039 1970 4501
+3  13585 8797 7986
+3  13586 13585 7986
+3  6774 4330 4329
+3  12789 13037 13040
+3  4724 12060 11775
+3  5951 13974 5952
+3  7160 5214 2154
+3  47 12982 14040
+3  14041 12982 47
+3  14042 9793 1849
+3  2979 2978 10990
+3  10498 2979 10990
+3  11396 1916 10575
+3  11396 5484 1916
+3  4244 12216 11906
+3  14043 3618 10538
+3  14043 10538 9184
+3  8069 7589 14044
+3  8069 14044 2226
+3  13445 10941 7170
+3  514 14045 14046
+3  14047 514 14046
+3  6175 2226 2225
+3  6175 8069 2226
+3  2746 3975 10572
+3  3975 1345 10572
+3  465 6666 6304
+3  958 8739 961
+3  2222 12376 11043
+3  2222 11043 2220
+3  14048 12562 10273
+3  4111 13765 287
+3  11971 3734 3736
+3  11971 11970 11608
+3  3734 11971 11608
+3  3133 5213 14049
+3  11797 5403 327
+3  925 327 5403
+3  3750 6427 6429
+3  2225 13858 6174
+3  2992 6174 13858
+3  2992 13858 2993
+3  13940 14050 13941
+3  5419 11908 5420
+3  2495 2404 2406
+3  9866 8575 1321
+3  5315 9675 1422
+3  8255 4355 10690
+3  12190 8492 9830
+3  12478 8210 2949
+3  12477 8210 12478
+3  11016 7426 7428
+3  12070 7641 7644
+3  1449 1815 1447
+3  14051 9662 696
+3  6995 9662 14051
+3  4812 4811 5242
+3  9980 8300 2741
+3  9980 5028 8300
+3  8281 8280 11763
+3  9368 6438 11297
+3  1205 2301 8675
+3  11158 10231 6717
+3  7773 12223 13738
+3  4471 4474 10885
+3  3508 10058 10057
+3  3508 10057 13528
+3  3197 174 173
+3  117 119 4268
+3  3003 5877 12635
+3  5680 2608 5677
+3  5283 5344 5284
+3  13716 10461 10462
+3  11004 3237 7249
+3  5291 5288 5618
+3  8867 8866 11538
+3  4641 6419 4642
+3  14052 6272 14053
+3  11610 6272 14052
+3  13004 1191 14054
+3  13004 1189 1191
+3  4903 5364 4900
+3  2548 4395 2549
+3  7622 2549 4395
+3  14055 13333 11583
+3  697 13787 698
+3  14056 697 14057
+3  11073 260 14058
+3  4575 12187 11841
+3  7422 6275 6277
+3  6664 5456 6493
+3  8701 5101 8702
+3  10340 4782 14059
+3  6153 9127 3590
+3  14060 14061 10966
+3  14060 10966 10968
+3  9160 13988 9158
+3  13988 13644 9158
+3  11089 11092 10821
+3  11092 3934 10821
+3  12450 12452 6496
+3  12450 6496 9324
+3  9538 4656 1980
+3  369 368 2568
+3  9467 4934 9468
+3  434 8493 4827
+3  12233 13725 5462
+3  13429 13379 8229
+3  6964 10481 7610
+3  13484 2932 423
+3  422 13484 423
+3  13013 1774 5269
+3  8581 3725 8579
+3  428 13720 14062
+3  428 14062 429
+3  14063 4780 910
+3  1473 4025 1474
+3  12550 13563 13564
+3  5858 13563 12550
+3  2840 8136 12223
+3  7439 9602 8710
+3  11004 6439 14064
+3  1015 14065 7084
+3  1015 7084 269
+3  8847 8846 11981
+3  9521 6980 6870
+3  11496 5300 13269
+3  14066 12965 11438
+3  14066 11438 9288
+3  7391 12557 7392
+3  1818 11217 5592
+3  12120 1623 6163
+3  3483 11479 3484
+3  9282 9284 8575
+3  14067 159 9177
+3  7933 13791 13732
+3  5939 5938 7599
+3  2057 11009 12196
+3  2735 2114 14068
+3  5082 9739 9575
+3  10257 14069 10260
+3  3517 10260 14069
+3  7171 8186 9371
+3  2273 6112 828
+3  1913 12955 6701
+3  8680 14005 14070
+3  8681 8680 14070
+3  5439 2167 2169
+3  504 14071 505
+3  504 738 14071
+3  13514 13513 10923
+3  14072 11178 11177
+3  14072 13075 11178
+3  10847 8086 10848
+3  10331 8086 7658
+3  14073 11137 9923
+3  8454 10825 9693
+3  10662 12667 8005
+3  10662 8005 9865
+3  11575 10349 6222
+3  14074 14075 7766
+3  14074 14076 14075
+3  2160 10104 14077
+3  7206 1903 1905
+3  10548 2150 2152
+3  6359 10062 8253
+3  12332 8430 4807
+3  14078 14079 13191
+3  14078 13191 13189
+3  11988 3165 11989
+3  4396 11989 3165
+3  3397 3182 3720
+3  5158 5157 5212
+3  8678 14080 14081
+3  3501 8411 3502
+3  3026 7927 7929
+3  7884 7509 9298
+3  7884 10494 7509
+3  14082 8651 8650
+3  8454 9693 8208
+3  14083 7750 9915
+3  11517 7750 14083
+3  13667 4023 14084
+3  6085 6087 8123
+3  1624 14085 1625
+3  11806 13641 3561
+3  10296 10995 12583
+3  13795 14086 14087
+3  7434 14040 12982
+3  10459 7530 10457
+3  7528 10457 7530
+3  6735 14088 4384
+3  6735 4384 13501
+3  10295 11321 10296
+3  1495 14089 2762
+3  11486 2762 14089
+3  8963 5263 5265
+3  5498 5057 14090
+3  14091 10536 14092
+3  10536 4876 14092
+3  10536 13315 4876
+3  9209 13473 9210
+3  3560 11806 3561
+3  10535 13315 10536
+3  1583 11937 11160
+3  12191 3248 2615
+3  7600 3797 14093
+3  7600 14093 7602
+3  14094 12563 2108
+3  14095 12563 14094
+3  8433 14096 7021
+3  2069 2068 111
+3  2069 111 113
+3  8972 8324 8326
+3  1095 4651 7272
+3  4669 2280 2758
+3  7681 14097 7683
+3  14098 12169 7514
+3  14098 7514 11784
+3  11754 7882 11755
+3  9301 9879 7022
+3  10219 9301 7022
+3  14099 12917 4015
+3  4059 10271 2603
+3  4059 2603 13726
+3  14100 10489 4778
+3  14100 4778 887
+3  9410 14101 9411
+3  296 5970 5969
+3  4579 9279 9852
+3  14102 14103 14104
+3  10460 9279 4579
+3  10460 9278 9279
+3  11153 8986 14105
+3  5499 14105 8986
+3  11635 8472 14106
+3  5809 7030 1698
+3  12427 12430 14107
+3  13976 13283 6137
+3  1698 7030 7032
+3  3694 3693 13203
+3  6138 6140 7028
+3  1229 4061 13542
+3  9344 648 8993
+3  1559 4961 2534
+3  1457 10166 12277
+3  6392 12763 10111
+3  13474 9680 9679
+3  1142 9557 9559
+3  1015 7090 1016
+3  2055 6648 14108
+3  2055 14108 2468
+3  14109 6823 14110
+3  6115 2279 2278
+3  7358 13657 11525
+3  9603 10180 11976
+3  8340 1108 14111
+3  13996 4607 13604
+3  13729 13728 14112
+3  1584 10186 5346
+3  8802 8801 8527
+3  5353 7321 7866
+3  4288 8013 13397
+3  12511 13397 8013
+3  7972 9665 9664
+3  10164 6169 8661
+3  5090 2556 4308
+3  13022 12645 14113
+3  13022 14113 14114
+3  2793 2232 8310
+3  2745 4976 7279
+3  8537 13246 7330
+3  14115 10034 11181
+3  9963 11181 10034
+3  5476 6223 5477
+3  5477 6223 11863
+3  14116 9356 14117
+3  11803 14117 9356
+3  13148 2353 1115
+3  5059 2454 9700
+3  11864 14118 1898
+3  3372 2326 3373
+3  3373 9412 12535
+3  3986 10567 10056
+3  1803 14119 14120
+3  9982 13117 13757
+3  5080 7509 7511
+3  10882 11113 10880
+3  13508 14120 11734
+3  7207 1152 5367
+3  11484 5367 11485
+3  7207 5367 11484
+3  14121 14122 5959
+3  2903 4578 14123
+3  2903 14123 588
+3  4621 13470 4622
+3  7303 565 564
+3  7303 564 11548
+3  3883 3885 13134
+3  3883 13134 544
+3  14124 6320 6322
+3  14124 14125 6320
+3  1813 1812 4898
+3  12887 2779 2778
+3  8333 14126 10701
+3  7796 7795 4483
+3  7796 4483 10842
+3  13648 7796 10842
+3  8656 13554 13553
+3  8636 14127 8583
+3  6421 2823 3911
+3  7646 4014 4016
+3  2961 13748 3983
+3  1422 6356 4842
+3  13684 3549 9948
+3  14128 8060 10455
+3  9523 10455 8060
+3  1368 1369 6567
+3  14129 14130 6808
+3  14129 6808 6810
+3  4884 14131 7594
+3  2792 4869 2793
+3  11555 13126 14132
+3  14079 14132 13126
+3  10213 9960 4556
+3  8235 3467 2270
+3  2752 10141 2753
+3  10042 14133 14134
+3  6277 6276 2249
+3  10620 1717 48
+3  9869 497 8502
+3  9869 2746 497
+3  6132 5201 5200
+3  10215 6312 6311
+3  13638 9888 7089
+3  9242 5720 5719
+3  651 11661 12283
+3  9190 5587 5586
+3  3757 7246 7248
+3  3844 14028 2648
+3  5831 8393 500
+3  11358 13693 11359
+3  3735 3734 12838
+3  11351 1088 979
+3  11741 3051 6005
+3  8672 4931 10490
+3  8672 10490 10489
+3  7527 4411 2407
+3  248 636 249
+3  2168 10478 6548
+3  14135 7057 6610
+3  13723 14048 14136
+3  4417 12787 8074
+3  7825 943 942
+3  8536 8970 13246
+3  14137 9196 433
+3  633 10505 10506
+3  2322 4946 4824
+3  2322 2321 4946
+3  9517 9520 10174
+3  14049 6155 12809
+3  14138 13773 10366
+3  13361 14139 7471
+3  8568 2262 8569
+3  14140 14141 14142
+3  1244 2984 13464
+3  8941 8943 5538
+3  5539 5538 8943
+3  2830 10374 2831
+3  9042 6699 5963
+3  6860 2096 14143
+3  9291 253 1884
+3  9198 14144 9199
+3  13486 10031 12044
+3  12044 10031 10033
+3  8350 4583 6804
+3  10242 14145 2742
+3  3096 1335 2127
+3  14146 1335 3096
+3  14147 7015 9176
+3  2122 12902 9634
+3  2123 2122 9634
+3  9173 12279 14148
+3  11030 2276 14149
+3  3577 8235 2270
+3  9025 11944 6408
+3  13616 14044 7589
+3  13616 7589 12770
+3  3770 2254 1796
+3  3770 1796 1795
+3  14150 14151 6545
+3  8969 14150 6545
+3  962 12399 582
+3  4427 4426 8547
+3  8546 4427 8547
+3  14152 2164 7729
+3  8664 7864 14153
+3  7681 7682 14154
+3  7681 14154 14097
+3  13357 12990 9723
+3  8264 8263 8763
+3  8195 12826 3553
+3  172 13800 11793
+3  7608 10483 14155
+3  2818 1047 5800
+3  13654 9672 2820
+3  13654 9670 9672
+3  1555 7482 9051
+3  9433 5287 11313
+3  8030 9294 8031
+3  8030 9295 9294
+3  7557 7556 631
+3  10610 14048 13172
+3  2881 6143 2879
+3  13014 9965 12683
+3  178 14156 179
+3  179 14156 12145
+3  11536 5279 11995
+3  9120 9122 9651
+3  2024 2023 13048
+3  14157 4176 8895
+3  734 1549 9953
+3  12344 1549 734
+3  795 797 9690
+3  10875 9100 9102
+3  822 2788 2787
+3  10768 7393 14158
+3  8198 3857 8141
+3  8427 7174 13925
+3  9951 8074 12787
+3  7914 7656 271
+3  12773 9288 9287
+3  364 6250 6249
+3  2373 9880 2371
+3  2223 14159 13695
+3  13723 4315 4314
+3  6899 13511 6900
+3  10153 10155 3418
+3  11139 12970 12969
+3  7578 13481 12477
+3  2596 8195 8194
+3  2596 8194 14160
+3  2596 13712 8195
+3  3460 14161 13645
+3  14162 4310 13651
+3  3824 11981 11334
+3  10119 8409 8406
+3  5153 1579 5154
+3  14163 8409 10119
+3  5316 12475 9412
+3  5375 5374 9749
+3  5157 5213 5212
+3  9655 3800 1860
+3  14164 6718 3900
+3  14164 3900 3542
+3  1257 14165 14166
+3  12278 14165 1257
+3  8906 10082 11901
+3  8906 8907 10082
+3  9628 9629 2970
+3  9629 9085 2970
+3  10600 429 10971
+3  10600 10971 10601
+3  13043 557 556
+3  11432 7933 13732
+3  14167 8790 8789
+3  1694 6898 7736
+3  1694 7736 7735
+3  10143 4936 4935
+3  4314 8699 8737
+3  4317 12211 3906
+3  4317 3906 11267
+3  4314 4316 8699
+3  12154 1325 10981
+3  10047 1325 12154
+3  13317 10047 12154
+3  13777 10047 13317
+3  14168 11235 9719
+3  8312 8898 4249
+3  4250 4249 8898
+3  8969 13676 14150
+3  6930 3322 8935
+3  3465 3491 3490
+3  8773 3465 3490
+3  267 266 13321
+3  4655 3438 12447
+3  5242 5241 4897
+3  5241 4898 4897
+3  366 3400 8782
+3  4897 459 448
+3  13864 7538 6368
+3  3492 8773 3490
+3  3474 2477 1360
+3  4450 9736 12833
+3  13636 11574 12136
+3  13426 8305 14169
+3  11386 14169 8305
+3  11081 10432 10429
+3  3065 13917 5990
+3  10779 10350 11575
+3  13851 12484 13060
+3  11198 5622 8308
+3  10429 10431 1052
+3  10429 1052 14170
+3  320 14171 321
+3  12217 5342 14172
+3  3858 3314 341
+3  3911 2823 3912
+3  4119 5172 4118
+3  1973 5172 4119
+3  476 478 3410
+3  1908 9342 1909
+3  12867 7585 14003
+3  4391 1348 1347
+3  11608 5785 2418
+3  11970 5785 11608
+3  8285 11944 5041
+3  5042 5041 11944
+3  3523 1264 1266
+3  12475 17 14173
+3  14174 14175 12704
+3  12702 14174 12704
+3  12704 14175 11482
+3  14176 2483 4573
+3  14177 14176 4573
+3  1380 3162 2624
+3  14178 14179 1751
+3  13546 13545 14179
+3  13546 14179 14178
+3  1750 14178 1751
+3  1750 13546 14178
+3  6725 11654 6209
+3  3140 5501 5729
+3  11361 13953 3159
+3  11361 10514 13953
+3  4966 4965 8157
+3  14003 14180 4895
+3  11517 14083 11751
+3  9915 9914 14083
+3  11751 14083 9914
+3  4345 4347 4490
+3  4447 12463 14003
+3  6719 269 7084
+3  12911 13046 1511
+3  12629 3736 11899
+3  9310 13475 9311
+3  6745 9198 10308
+3  5442 5441 11413
+3  8043 4297 2546
+3  8338 10673 14181
+3  8121 5333 5335
+3  10090 13963 14182
+3  8110 14183 4301
+3  10950 14184 12362
+3  10677 14184 10950
+3  6599 13043 13842
+3  12362 14184 13631
+3  3019 1769 4284
+3  1705 10640 1703
+3  3573 3627 13430
+3  2645 2325 10117
+3  1187 3820 10434
+3  1187 10434 1188
+3  1215 13569 1216
+3  13569 7210 122
+3  1632 8227 5690
+3  8828 4959 4958
+3  8176 14185 7831
+3  7139 13918 14186
+3  14021 14187 14185
+3  8176 14021 14185
+3  1721 10254 13462
+3  10255 4135 10254
+3  11423 3815 2681
+3  13038 13037 14188
+3  13038 14188 1536
+3  14189 8508 3011
+3  14189 3011 3010
+3  1292 1536 1538
+3  13038 1536 1292
+3  1483 405 1083
+3  9419 13982 1800
+3  12396 9948 7345
+3  14190 8783 13297
+3  9014 6353 14191
+3  12850 8150 11418
+3  12850 11418 14192
+3  12739 11507 11506
+3  14193 11020 14194
+3  3212 14194 3213
+3  3212 14193 14194
+3  14195 11864 11863
+3  6223 14195 11863
+3  9353 3615 3101
+3  14168 1432 1431
+3  1821 1291 12039
+3  14196 1820 1822
+3  9074 5210 9071
+3  9074 13408 5210
+3  8227 6883 7617
+3  13411 3442 9494
+3  7892 12596 14197
+3  6576 5540 5543
+3  5652 1875 11571
+3  13696 6233 6234
+3  8633 2098 11622
+3  4907 1593 841
+3  12601 2935 2721
+3  4268 119 14175
+3  13377 11379 11113
+3  5649 13207 4088
+3  9879 4088 13207
+3  10286 10868 11777
+3  218 9414 219
+3  10356 406 408
+3  13694 10671 7900
+3  13339 13694 7900
+3  10778 10806 10805
+3  1232 11738 4547
+3  2421 2420 3136
+3  6960 6464 6961
+3  12694 5696 11814
+3  7326 1640 1639
+3  5432 13711 6452
+3  5430 5432 6452
+3  6961 6464 6463
+3  14198 6232 9854
+3  6129 14198 9854
+3  1779 5226 1780
+3  5225 5226 1779
+3  8670 13925 7124
+3  8316 3715 7626
+3  3716 3715 8316
+3  3025 3027 7823
+3  9381 7628 14199
+3  3151 2904 3152
+3  13705 7503 10982
+3  13705 10982 1324
+3  7908 945 944
+3  970 13628 9401
+3  14200 14201 14202
+3  10481 10483 7608
+3  7563 7564 13649
+3  11008 13649 7564
+3  2045 12162 12164
+3  12873 2730 6559
+3  2730 2457 6559
+3  13026 4989 4635
+3  4633 4635 4989
+3  6440 1708 1707
+3  4037 6440 1707
+3  12933 7697 3859
+3  3860 12933 3859
+3  1484 13299 2112
+3  7435 5143 9204
+3  4245 4244 11906
+3  7933 7934 13791
+3  3873 3875 8448
+3  5339 10746 12478
+3  8580 10333 8581
+3  336 335 14203
+3  336 14203 13977
+3  6107 2194 2193
+3  6106 2194 6107
+3  10131 4585 14204
+3  4706 3570 11074
+3  3892 6894 3893
+3  197 12605 198
+3  3177 6159 6733
+3  5705 3889 13776
+3  10899 14205 3397
+3  14206 14205 10899
+3  2872 13054 6483
+3  2872 6483 2873
+3  5395 14207 3515
+3  8108 5395 3515
+3  1880 1882 12975
+3  634 5442 11190
+3  12200 12844 13385
+3  646 9026 647
+3  9720 12040 11055
+3  9720 11055 10285
+3  14208 10303 11799
+3  2669 11848 13731
+3  2669 13731 2670
+3  13461 12392 10708
+3  11142 11639 8574
+3  14205 13372 3398
+3  6146 13372 14205
+3  5874 5875 6471
+3  7957 5874 6471
+3  13412 3924 555
+3  13412 555 6666
+3  412 1472 413
+3  7445 2147 2149
+3  11286 3149 14209
+3  9999 6700 14210
+3  3140 5728 7123
+3  7737 9767 7738
+3  6592 12437 11531
+3  7664 4470 148
+3  7414 11776 11775
+3  1812 8802 11676
+3  148 4470 688
+3  2920 13468 10890
+3  10860 8542 13746
+3  8541 13746 8542
+3  1094 8548 5879
+3  1094 1093 8548
+3  12622 9282 9866
+3  13861 14211 2971
+3  6606 6605 11692
+3  13364 7596 13272
+3  2605 12612 12611
+3  12200 13385 13384
+3  9676 9677 9089
+3  11995 5279 11424
+3  6235 9256 3056
+3  1523 11169 1524
+3  7433 10177 11020
+3  12455 8173 8174
+3  7660 1413 1412
+3  7660 14212 1413
+3  4699 12682 3369
+3  4432 7906 7904
+3  4432 2111 7906
+3  12977 1322 10120
+3  11195 12976 12977
+3  3572 3626 3573
+3  3572 1952 3626
+3  14092 4876 10658
+3  11172 9077 4219
+3  2727 13341 14213
+3  12072 9650 13833
+3  7808 8871 10667
+3  13807 7017 12163
+3  4535 5412 11651
+3  4459 12425 10629
+3  14214 6344 673
+3  14214 673 672
+3  672 13258 13257
+3  14214 672 13257
+3  6883 5570 9754
+3  14215 14216 14217
+3  14218 14219 13309
+3  5296 10545 13825
+3  8517 13825 10545
+3  1292 1294 3424
+3  14220 1292 3424
+3  1790 1991 1990
+3  1790 1789 1991
+3  283 2057 12196
+3  4557 14221 5639
+3  10562 8210 13481
+3  14118 1896 1898
+3  5429 9563 10984
+3  5428 5429 10984
+3  14222 386 6635
+3  4247 4086 6755
+3  8391 2020 8656
+3  140 139 5948
+3  2414 2413 10526
+3  12120 13711 1623
+3  11361 10515 10514
+3  1095 1092 6915
+3  1095 6915 4651
+3  11638 10196 12658
+3  14223 8390 1057
+3  13028 3228 3227
+3  387 332 13402
+3  14224 6755 10843
+3  7019 3785 7020
+3  1773 2836 1774
+3  5593 10301 8439
+3  14225 7332 7333
+3  3430 12520 6059
+3  4474 11962 10885
+3  8599 9138 11628
+3  1372 1371 9249
+3  6244 8045 12744
+3  10007 10008 10486
+3  8599 11628 8913
+3  11078 11077 7587
+3  9987 990 989
+3  6519 3762 3764
+3  6519 3764 9946
+3  12191 2615 2614
+3  12574 4745 7597
+3  13196 12716 14226
+3  4743 4745 12574
+3  12538 9600 12537
+3  2356 4723 12895
+3  6420 8356 12209
+3  2315 2314 5377
+3  7244 3175 5578
+3  12045 12046 14227
+3  11211 5263 13239
+3  6372 10878 6694
+3  1361 14228 1362
+3  10142 14229 2753
+3  2751 2753 14229
+3  9297 13733 8014
+3  12571 5487 5486
+3  11997 12571 5486
+3  13300 7540 13993
+3  10608 13993 7540
+3  3202 160 3203
+3  5382 630 5383
+3  3805 10706 12500
+3  6213 3206 2089
+3  683 2605 684
+3  6190 4656 12047
+3  6643 5892 8056
+3  14230 7042 6625
+3  4383 14230 6625
+3  737 14231 14232
+3  737 14232 738
+3  14233 9389 24
+3  14233 24 23
+3  8026 7476 14234
+3  11614 11613 6156
+3  7548 14103 14235
+3  3286 3285 7476
+3  8580 8793 3926
+3  209 3445 3447
+3  4472 9977 13059
+3  4472 13059 4473
+3  14236 6639 7926
+3  2444 9104 9103
+3  14087 2444 9103
+3  3874 3876 14237
+3  8835 5579 3500
+3  4810 4812 448
+3  7947 7762 1628
+3  2438 13605 8708
+3  512 485 487
+3  3819 1534 10435
+3  12246 13526 13659
+3  9065 14238 7213
+3  14239 7213 14238
+3  9615 14240 6462
+3  6461 9615 6462
+3  4354 4333 4332
+3  10428 2771 12625
+3  6537 6536 7918
+3  9525 13712 2598
+3  9525 4467 13712
+3  4709 6630 7454
+3  2015 4009 2016
+3  901 1736 902
+3  12397 13900 10757
+3  901 10909 1736
+3  3746 11685 3747
+3  13907 9221 3351
+3  1451 6825 14241
+3  3530 9647 10236
+3  2245 2925 8515
+3  7005 9533 11632
+3  5153 11065 991
+3  11413 8267 13583
+3  11413 13583 5832
+3  1623 11714 6163
+3  6675 4323 98
+3  2744 2743 8038
+3  2744 8038 4559
+3  3905 6909 5108
+3  2137 10694 2138
+3  10252 6005 3051
+3  7813 1313 1315
+3  8058 14128 14242
+3  14242 14128 10456
+3  14242 10456 14243
+3  14128 10455 10456
+3  6513 7216 6514
+3  1069 1071 450
+3  5101 5100 11508
+3  7360 2960 2962
+3  14244 353 5332
+3  7833 8891 7573
+3  7833 7573 13890
+3  3585 12012 6424
+3  3962 10363 8938
+3  14245 2133 14246
+3  12451 7675 9302
+3  10332 11326 388
+3  388 11326 513
+3  9207 14247 14248
+3  14247 9207 12793
+3  13596 11928 14249
+3  13047 12910 1219
+3  6168 5608 8965
+3  9764 6168 8965
+3  6064 464 463
+3  9209 1363 3399
+3  7756 6945 5114
+3  12711 13560 12712
+3  13561 12712 13560
+3  9731 13777 11263
+3  9731 11263 9732
+3  13596 14249 14250
+3  8864 13596 14250
+3  3219 3218 1251
+3  5011 3219 1251
+3  2865 14251 2868
+3  14252 2868 14251
+3  12213 36 38
+3  2076 11190 5834
+3  14253 14254 13910
+3  1366 13177 14176
+3  2074 12953 14255
+3  7679 7678 14256
+3  7856 9979 7857
+3  973 5610 5612
+3  14257 973 5612
+3  12372 1013 12870
+3  13177 13176 14176
+3  5973 14258 7874
+3  14258 5973 5781
+3  7874 14258 10502
+3  11774 11771 14259
+3  11774 14259 14260
+3  13194 13195 14261
+3  6205 14261 13195
+3  10916 3525 12609
+3  10915 3525 10916
+3  1523 5120 11169
+3  7877 14262 10914
+3  3073 3075 1950
+3  8702 3625 3565
+3  5375 9749 12219
+3  6135 6137 13283
+3  6962 4013 13842
+3  14263 4013 6962
+3  11730 2764 2008
+3  8205 6731 12029
+3  10529 12835 11590
+3  9384 13608 9129
+3  14264 14265 14266
+3  14064 4136 14267
+3  14267 4136 4138
+3  14267 4138 11960
+3  670 669 5533
+3  8000 12345 5056
+3  10821 12262 10822
+3  14263 4011 4013
+3  3051 4242 10252
+3  4240 4242 3051
+3  8863 9513 8864
+3  10560 14064 14267
+3  10560 14267 11960
+3  12616 815 10232
+3  7547 14268 7548
+3  5058 5498 9893
+3  4016 4015 2208
+3  10296 12583 10011
+3  10471 13622 9748
+3  10471 9099 13622
+3  5958 6281 14269
+3  5546 9939 5547
+3  3149 11286 2557
+3  12823 12875 3263
+3  4160 4159 5690
+3  14270 10099 10730
+3  14270 10730 5922
+3  3081 3080 12249
+3  11336 11337 14271
+3  14240 8824 6462
+3  8822 8824 14240
+3  7973 14272 14273
+3  12731 7028 10960
+3  6891 11645 10401
+3  6891 12728 11645
+3  7552 7554 9663
+3  9663 7554 7648
+3  7554 5238 7648
+3  939 9502 937
+3  1783 12388 12386
+3  1781 1783 12386
+3  10900 12606 643
+3  3966 10900 4370
+3  8709 8495 8382
+3  4742 2809 9537
+3  2698 2697 5622
+3  3601 3603 9918
+3  3601 9918 9917
+3  11896 13820 5517
+3  5713 5259 14213
+3  8860 14213 5259
+3  4751 719 6759
+3  2224 12953 2074
+3  2027 2224 2074
+3  14274 4551 10639
+3  14274 4948 4551
+3  951 4622 952
+3  5530 5531 10585
+3  13381 14275 10166
+3  14276 9612 6166
+3  2748 2747 13228
+3  12302 12963 2642
+3  2644 12302 2642
+3  9938 836 8121
+3  14208 8439 10301
+3  14275 12275 10166
+3  5262 12275 14275
+3  13887 6876 7049
+3  3471 3590 3469
+3  8478 1494 1303
+3  7231 12501 7232
+3  6504 3422 3421
+3  10677 10952 742
+3  3488 8836 8444
+3  12012 164 6424
+3  12733 10558 11079
+3  11079 1079 12733
+3  4154 8414 12979
+3  4153 8414 4154
+3  4380 4970 8287
+3  3111 3110 10581
+3  14277 12352 12354
+3  14026 2826 13483
+3  14025 3864 10263
+3  3865 3864 14025
+3  10861 14278 10862
+3  14279 1306 4712
+3  1307 1306 14279
+3  13676 13173 6798
+3  12192 3372 3374
+3  8748 6843 9425
+3  192 8707 190
+3  7186 7185 12600
+3  13309 13479 14218
+3  14280 14218 13479
+3  4372 8297 13716
+3  13988 9160 10273
+3  6504 3421 1152
+3  1151 6504 1152
+3  5205 11731 5206
+3  11868 7569 13386
+3  1880 11873 14281
+3  1880 14281 11403
+3  12915 6789 5689
+3  14282 14283 3845
+3  1373 11298 1374
+3  9501 11298 1373
+3  302 11471 13800
+3  9304 7200 7202
+3  9304 7202 10352
+3  5535 6144 9431
+3  11259 4655 6144
+3  13041 10959 5135
+3  6016 1397 12004
+3  5063 6872 5064
+3  3391 5064 6872
+3  1967 1966 8970
+3  4496 4495 14284
+3  5537 5539 7529
+3  8532 11289 11470
+3  10372 8532 11470
+3  3131 7403 1978
+3  2955 5772 2956
+3  7129 900 8138
+3  12333 14285 9783
+3  12326 9467 953
+3  8806 10459 6590
+3  1439 4289 1440
+3  10146 14286 11936
+3  4566 12695 13934
+3  3500 3499 4290
+3  9272 9274 3023
+3  6907 6909 3905
+3  4109 3500 4290
+3  5218 3604 7797
+3  5218 7797 14287
+3  14288 2835 8199
+3  1925 11501 1926
+3  6357 1143 13084
+3  9400 6596 12715
+3  13046 9991 12847
+3  7857 9991 13046
+3  6165 14276 6166
+3  7623 11827 14289
+3  11826 14289 11827
+3  5015 11931 3746
+3  497 10918 498
+3  6990 11349 3419
+3  6575 13436 13439
+3  4921 8993 8490
+3  2323 5107 4421
+3  1524 11169 4781
+3  2832 7863 2830
+3  2832 6690 7863
+3  6664 5454 5456
+3  3323 12905 3324
+3  14290 9598 14291
+3  11569 9598 14290
+3  4933 12241 12310
+3  4933 12310 4930
+3  10969 11196 14292
+3  3016 3018 8788
+3  3016 8788 8787
+3  11382 4032 4031
+3  3478 11382 4031
+3  3478 3477 11382
+3  10915 10914 12069
+3  11285 8684 11072
+3  3945 561 14293
+3  1573 1575 12438
+3  9324 12879 12878
+3  3448 13834 2022
+3  4381 4380 8287
+3  14294 14222 2178
+3  3722 14295 10364
+3  3023 9274 11566
+3  4757 4756 6159
+3  9511 9510 12503
+3  9585 14296 12873
+3  10606 1383 6350
+3  11740 3317 5401
+3  14297 4992 2218
+3  4992 14297 6243
+3  5177 1630 1629
+3  1404 2907 2906
+3  1403 2907 1404
+3  12395 3642 13930
+3  13509 12395 13930
+3  6902 6904 2981
+3  5777 11972 8826
+3  9727 2271 8988
+3  4248 6756 9585
+3  3928 5269 13500
+3  13032 10501 7889
+3  10084 10505 633
+3  13060 8892 9010
+3  3861 890 2436
+3  6312 8233 7868
+3  1545 11141 14298
+3  14080 13990 13793
+3  9153 12130 9154
+3  14299 14300 12370
+3  12370 14300 14301
+3  5895 1201 5276
+3  4211 13234 13503
+3  14302 5814 4493
+3  12001 2351 2353
+3  12001 5360 2351
+3  14303 14144 10576
+3  14304 12841 6708
+3  6510 12841 14304
+3  10289 185 14305
+3  7897 14306 6325
+3  7899 14306 7897
+3  9792 9116 7070
+3  10715 9320 14307
+3  2373 11883 11884
+3  3566 3625 12102
+3  2422 14307 10752
+3  12369 10132 909
+3  6513 7507 7216
+3  13010 4741 11388
+3  14308 2528 8954
+3  14308 8954 13198
+3  8954 14309 13198
+3  8122 8121 5335
+3  14310 1123 7401
+3  13696 5982 6233
+3  3659 6540 3657
+3  10157 6540 3659
+3  9390 7924 14311
+3  5159 5144 14312
+3  748 5999 749
+3  9936 10162 9937
+3  458 6984 6985
+3  5036 5038 7597
+3  7597 5038 6230
+3  3000 2999 14313
+3  5193 3000 14313
+3  13585 5761 8797
+3  4682 11126 3977
+3  11124 11126 4682
+3  13614 1776 13154
+3  1775 13154 1776
+3  8940 11671 1683
+3  14314 7171 13496
+3  7842 4237 10565
+3  7000 6083 7776
+3  11520 10565 12645
+3  7842 10565 11520
+3  12517 4972 4971
+3  14315 14316 14317
+3  12388 2980 12387
+3  7512 2980 12388
+3  7512 2978 2980
+3  13494 9357 6171
+3  3153 641 639
+3  1078 1077 13143
+3  14318 5106 13242
+3  3242 8821 7908
+3  13333 14015 9588
+3  13774 12157 5975
+3  4448 13774 5975
+3  7815 1878 4924
+3  12424 4668 3348
+3  9879 13207 9878
+3  13965 13844 11637
+3  14319 11533 11534
+3  13069 14319 11534
+3  1322 8577 10118
+3  12908 2324 9934
+3  9859 12895 1763
+3  9859 1763 12530
+3  2176 5437 5439
+3  2181 6635 12935
+3  11720 10235 9646
+3  10445 12515 13877
+3  10445 1564 12515
+3  12913 9386 14320
+3  12536 14180 14003
+3  10448 2029 10447
+3  1841 10447 2029
+3  1134 12619 1135
+3  832 7597 6230
+3  13025 2973 744
+3  10227 14173 12414
+3  13640 13634 7611
+3  8378 8377 13870
+3  14321 14322 14323
+3  14321 14323 14324
+3  9999 9998 13600
+3  13383 6797 6796
+3  626 11639 4506
+3  6989 9858 6990
+3  3274 5009 3275
+3  10945 10986 10985
+3  7177 569 571
+3  6794 6124 5485
+3  6428 13547 6429
+3  6502 13547 6428
+3  14246 8639 2837
+3  46 4402 4401
+3  13013 5269 3928
+3  10306 3225 10304
+3  10863 5219 12054
+3  9998 8080 5599
+3  3382 3381 14325
+3  10924 14325 3381
+3  11241 11240 4271
+3  11241 4271 4270
+3  12188 14324 14326
+3  12188 14326 14327
+3  8539 14324 12188
+3  4941 4940 2319
+3  14328 8431 1450
+3  14328 1450 720
+3  3913 12369 5119
+3  11595 14329 14330
+3  961 14331 8899
+3  961 9193 14331
+3  5119 12369 5120
+3  13225 14332 14333
+3  7364 3703 12431
+3  4373 4372 11423
+3  14334 12862 14335
+3  14334 14335 14336
+3  7355 14337 14338
+3  10310 14339 8329
+3  10309 14339 10310
+3  7847 4123 8512
+3  13049 14281 14340
+3  14341 14281 13049
+3  14342 6323 6325
+3  14306 14342 6325
+3  13736 4808 8431
+3  7256 4808 13736
+3  1471 1470 12859
+3  5647 5649 10846
+3  5375 11980 3824
+3  2130 4119 8401
+3  1973 4119 2130
+3  11410 7702 7142
+3  5510 8436 5511
+3  2836 7889 14343
+3  11322 10995 10296
+3  11322 10846 10995
+3  8522 8521 4644
+3  10846 5649 10176
+3  9312 3486 4657
+3  3169 8408 3170
+3  1533 12941 9132
+3  14344 9132 12941
+3  14345 14346 14347
+3  6243 14297 8044
+3  8072 8044 14297
+3  2382 11310 2383
+3  12959 13238 12116
+3  3547 5449 3548
+3  10631 2618 12607
+3  8467 8466 7045
+3  8467 7045 7044
+3  1451 14241 5721
+3  1276 6819 1274
+3  12708 12537 9600
+3  3760 9352 14348
+3  836 10879 11105
+3  2029 10448 2030
+3  7526 10413 11408
+3  14201 7346 8524
+3  14201 8524 6820
+3  14349 8387 14350
+3  4139 6439 13598
+3  9789 10555 9248
+3  9789 11960 4138
+3  4045 4044 422
+3  13484 422 4044
+3  13484 4044 11494
+3  14351 4187 3776
+3  4921 8490 4279
+3  11119 9254 5052
+3  4940 3371 7909
+3  14352 4940 7909
+3  3033 9146 5802
+3  8141 8142 13128
+3  137 142 135
+3  4963 4386 8764
+3  14353 11861 499
+3  14353 499 10700
+3  5029 5005 1406
+3  3713 5005 5029
+3  4384 14088 4382
+3  14354 10474 10476
+3  1166 14355 9068
+3  1166 6004 14355
+3  14356 5488 6621
+3  14356 5486 5488
+3  4612 12577 12714
+3  11483 5919 12586
+3  11483 12586 9838
+3  8625 7713 6363
+3  7712 3171 7713
+3  14357 14286 10146
+3  10145 14357 10146
+3  7449 7671 7673
+3  4744 11882 5036
+3  9590 13151 7052
+3  13346 6962 13347
+3  2575 13347 6962
+3  1136 11276 10089
+3  14358 13247 13824
+3  14358 13824 13823
+3  14359 10508 6150
+3  14360 14361 4815
+3  14360 14362 14361
+3  6751 11186 6752
+3  695 5918 12729
+3  13912 3678 8761
+3  3345 3343 6575
+3  8087 8086 10847
+3  8087 10847 4802
+3  10769 11064 9175
+3  14363 4547 11738
+3  13058 14363 11738
+3  8681 14070 13959
+3  5891 4441 4444
+3  5891 4444 14364
+3  9024 13751 13401
+3  14365 12394 9216
+3  5141 14365 9216
+3  9213 5391 8004
+3  10195 8755 14366
+3  11406 11203 2216
+3  13938 1087 12852
+3  14367 8764 13556
+3  6650 8764 14367
+3  7015 2421 3135
+3  9907 227 131
+3  14368 5123 13443
+3  12619 5123 14368
+3  8394 9904 4495
+3  12398 14369 3772
+3  13444 12108 14370
+3  7574 10459 10458
+3  6590 10459 7574
+3  7484 14371 7217
+3  12084 5527 3496
+3  9578 14372 8245
+3  14372 14373 8245
+3  14374 9243 9245
+3  864 8730 10184
+3  863 8730 864
+3  472 6294 9108
+3  10999 9028 14375
+3  13699 14376 9243
+3  2430 6502 7331
+3  12083 12085 11984
+3  3506 14377 9674
+3  3922 3921 10336
+3  817 1530 10790
+3  4761 14378 4760
+3  11157 14379 14380
+3  14380 14379 41
+3  7418 5861 5863
+3  14378 1604 1606
+3  2884 2883 392
+3  3077 7008 13975
+3  7491 5952 13975
+3  5773 359 11375
+3  5209 2487 4771
+3  5208 2487 5209
+3  2685 12319 2686
+3  13843 13043 556
+3  6612 13843 556
+3  13238 12959 14381
+3  13069 11994 2011
+3  2013 13069 2011
+3  9573 430 8732
+3  14382 13650 13350
+3  9055 1429 8868
+3  13232 8636 4476
+3  8826 6796 13173
+3  14024 14383 14384
+3  5643 10121 235
+3  9963 13023 9964
+3  13248 5372 13023
+3  5370 5372 13248
+3  9267 5370 13248
+3  12827 12701 13905
+3  8197 11422 5575
+3  7018 7161 2153
+3  14385 11444 1209
+3  11319 8001 12519
+3  3397 14205 3398
+3  7924 7925 13697
+3  14386 11857 7825
+3  14137 3365 9196
+3  14137 3366 3365
+3  8655 12085 11085
+3  8654 3495 7630
+3  10661 12697 6418
+3  4112 1073 8516
+3  8517 8516 1073
+3  2679 10270 2680
+3  14387 14388 8498
+3  14387 8498 1569
+3  5299 3759 5656
+3  9431 6190 6189
+3  8833 4234 12491
+3  7650 13454 14389
+3  14390 7650 14389
+3  3713 3712 13908
+3  705 704 5843
+3  5590 3473 188
+3  9159 14391 1497
+3  14392 8597 9335
+3  11492 8501 7941
+3  7169 7171 14314
+3  12381 14030 8324
+3  8324 14030 8325
+3  456 9532 9775
+3  9853 763 5744
+3  11138 9903 12970
+3  4525 3137 4526
+3  13243 8108 3514
+3  1834 1190 1189
+3  9191 1804 14120
+3  13508 9191 14120
+3  5744 763 9398
+3  8428 8427 11294
+3  4495 11138 11140
+3  4495 9904 11138
+3  11138 9904 9903
+3  184 9872 11466
+3  14008 9872 184
+3  184 186 14008
+3  594 2664 10911
+3  7614 7616 2882
+3  6917 753 2625
+3  10726 4171 8243
+3  9854 86 4697
+3  9779 8013 8012
+3  13422 14285 13092
+3  4456 1023 10410
+3  14393 5309 5308
+3  14393 12632 5309
+3  8012 4287 8847
+3  5063 5609 6872
+3  4805 5609 5063
+3  4949 4549 4551
+3  8178 6457 6456
+3  6532 3341 3615
+3  222 14337 7355
+3  222 7355 79
+3  1910 1909 3672
+3  3673 1909 5046
+3  3672 1909 3673
+3  9075 728 730
+3  9987 989 6884
+3  3310 3312 10328
+3  12113 12611 9016
+3  12866 6750 10411
+3  7848 954 7624
+3  7703 7702 12143
+3  4264 13024 13035
+3  13938 13936 8607
+3  13231 10975 8636
+3  1851 6933 5669
+3  9249 1658 11612
+3  7465 3947 13525
+3  3948 3947 7465
+3  10750 7436 14394
+3  11474 11473 13408
+3  13408 11473 12626
+3  724 10703 11213
+3  724 11213 106
+3  4221 532 1809
+3  5733 13047 1219
+3  6364 5741 5996
+3  1267 1269 9270
+3  1677 1902 6732
+3  213 8862 14250
+3  9810 14395 12545
+3  14396 216 13549
+3  8376 11250 5064
+3  8511 10443 5675
+3  8510 10443 8511
+3  2665 593 3412
+3  2665 3412 9642
+3  5638 8531 9442
+3  5638 9442 5385
+3  13057 9823 9822
+3  13057 14397 9823
+3  2724 6830 6832
+3  7814 5717 9078
+3  13347 2575 1238
+3  60 10135 2789
+3  5814 5813 4493
+3  14398 7625 9459
+3  11459 491 13161
+3  11459 13161 13160
+3  3110 6290 10581
+3  1880 11874 11873
+3  3206 11872 3207
+3  14399 10949 8902
+3  8900 8902 10949
+3  1254 14400 9280
+3  9152 14401 14402
+3  10155 6990 3418
+3  9226 14165 12278
+3  1538 4246 11905
+3  1537 4246 1538
+3  2441 13453 1193
+3  2441 1193 7999
+3  4708 666 12805
+3  14403 4785 4787
+3  14403 7478 4785
+3  7999 1193 11069
+3  4246 4245 11905
+3  14404 10619 3088
+3  8775 8777 10619
+3  8775 10619 14404
+3  5724 5726 451
+3  7339 1638 12502
+3  8268 7339 12502
+3  14405 13980 10320
+3  12524 10705 3804
+3  10705 3805 3804
+3  7510 9185 2289
+3  2138 10694 11275
+3  2138 11275 11274
+3  11354 9722 10520
+3  10519 11354 10520
+3  7918 14406 2293
+3  7918 2293 6537
+3  10397 9559 14407
+3  1142 9559 10397
+3  10397 14407 11739
+3  14407 9559 14408
+3  9558 14408 9559
+3  11404 14409 9696
+3  7642 14409 11404
+3  9674 1423 9675
+3  1205 6045 2301
+3  9406 761 9407
+3  10952 14410 468
+3  9809 13967 13543
+3  14411 13253 13252
+3  6386 9147 12288
+3  9147 5618 12290
+3  309 14137 433
+3  309 308 14137
+3  3366 310 4175
+3  14412 6210 6209
+3  14413 14412 6209
+3  9236 187 622
+3  3366 308 310
+3  14137 308 3366
+3  8307 14414 14415
+3  8305 8307 14415
+3  12124 8474 12466
+3  11212 11214 519
+3  12170 519 11214
+3  13066 14416 9341
+3  11033 10976 14417
+3  3376 7113 11047
+3  5666 5476 8489
+3  1855 1854 11197
+3  10569 10568 8256
+3  14418 5160 14419
+3  4865 2863 10446
+3  10020 3995 5312
+3  13072 8953 8952
+3  4386 4963 4387
+3  7638 9431 6189
+3  10323 11817 1932
+3  4570 4567 7428
+3  9950 8366 9972
+3  6628 3796 14420
+3  13051 12490 13819
+3  9043 9004 9005
+3  4397 14421 13447
+3  4397 11679 14421
+3  1639 7339 7338
+3  7326 1639 7338
+3  592 13293 92
+3  10236 9647 9646
+3  5144 6671 14312
+3  8830 9007 1754
+3  13414 11302 11303
+3  13531 727 1979
+3  725 727 13531
+3  10808 9234 9629
+3  14422 1413 3690
+3  5313 14423 8092
+3  9753 9381 14424
+3  14425 3688 3690
+3  616 3688 14425
+3  10570 8916 8398
+3  6068 4156 12912
+3  6335 6068 12912
+3  7389 13268 14426
+3  7483 7581 13086
+3  8958 9709 8469
+3  13085 11215 7483
+3  6022 11215 13085
+3  6022 6021 11215
+3  2347 11215 6021
+3  2348 2347 6021
+3  10943 6434 10944
+3  14427 1844 12144
+3  12675 12198 12199
+3  12675 10464 12198
+3  6407 7141 8090
+3  9152 9151 14401
+3  104 14279 2220
+3  104 14428 14279
+3  12721 8348 8349
+3  5751 5753 12347
+3  14429 5751 12347
+3  6245 12744 7916
+3  6243 6245 7917
+3  13647 7794 7796
+3  13648 13647 7796
+3  10060 13499 5907
+3  5908 5907 13499
+3  14060 14430 361
+3  4877 1421 1419
+3  7698 14431 14432
+3  4877 5848 1421
+3  3077 9931 3078
+3  10164 8661 3389
+3  5414 5415 6292
+3  5414 6292 6291
+3  9553 5913 7609
+3  7032 7031 9886
+3  8416 2993 13858
+3  8416 13858 8417
+3  12208 783 782
+3  9667 8721 531
+3  1466 1467 12662
+3  13770 1466 4746
+3  12125 14433 8613
+3  14433 11317 8593
+3  14433 8593 6388
+3  8613 14433 6388
+3  5789 11615 2034
+3  8918 10531 12681
+3  8918 9828 10531
+3  5649 5648 13207
+3  13206 13207 5648
+3  13206 5648 7487
+3  13206 7487 9515
+3  5650 7487 5648
+3  8948 1133 8949
+3  1135 8949 1133
+3  6477 6737 13103
+3  6477 1354 6737
+3  3432 3067 3433
+3  14434 6074 6073
+3  4001 14434 6073
+3  3555 11844 9659
+3  2371 9881 14435
+3  10349 14195 6222
+3  6222 14195 6223
+3  10834 12076 7764
+3  11244 14191 13403
+3  11244 9247 14191
+3  242 244 3024
+3  242 3024 1588
+3  3832 4319 12260
+3  6002 2375 14436
+3  5875 4311 4313
+3  14437 4001 14438
+3  4094 14439 4095
+3  12668 4095 14439
+3  9025 6408 12185
+3  12185 6408 6410
+3  5493 6888 6891
+3  10401 5493 6891
+3  1729 5492 5493
+3  1729 5493 10401
+3  13838 13050 2229
+3  13525 13838 2229
+3  1729 10401 10400
+3  8753 8752 12278
+3  8753 12278 1257
+3  7298 13260 7295
+3  9725 11248 2387
+3  2385 2387 11248
+3  12631 4953 12160
+3  4952 9971 4953
+3  6139 12147 6140
+3  10373 5790 6896
+3  4937 902 2912
+3  2525 10886 14440
+3  10886 6853 14440
+3  1870 3708 9707
+3  14441 8670 3087
+3  14442 6465 6467
+3  14442 6467 14443
+3  14442 14443 14444
+3  2238 14445 13942
+3  14443 168 5504
+3  6467 168 14443
+3  14446 14420 9396
+3  5865 8479 5866
+3  4348 2665 5614
+3  5993 11025 5994
+3  1435 10869 1433
+3  14447 7647 2484
+3  14447 2484 14448
+3  8106 8154 9506
+3  14318 4731 5106
+3  14318 4730 4731
+3  9421 12879 10549
+3  3603 10554 5752
+3  3603 5752 9574
+3  3165 11988 3167
+3  9024 13463 13751
+3  11832 12968 8177
+3  12752 3414 3413
+3  12292 14161 13893
+3  2580 14449 2910
+3  12051 11029 8745
+3  14161 12292 13645
+3  14450 6598 8346
+3  4620 6163 4621
+3  14451 3461 11902
+3  7135 14451 11902
+3  7713 2787 6363
+3  1479 2197 2196
+3  7713 3171 2787
+3  5776 11446 11972
+3  2249 2248 8155
+3  3059 14444 481
+3  14452 9104 2443
+3  9873 14277 11481
+3  12352 14277 9873
+3  812 6767 6764
+3  13904 4630 10810
+3  4529 5934 5933
+3  9942 9944 1981
+3  2476 2475 520
+3  14312 6671 6673
+3  6358 10061 6359
+3  4610 8133 4611
+3  12902 12904 4207
+3  7972 7971 1998
+3  9665 7972 1998
+3  7972 9664 14004
+3  6801 14453 9664
+3  14210 10509 11204
+3  179 12145 180
+3  14222 14294 14454
+3  14222 14454 13841
+3  6654 4410 2000
+3  12329 13342 8803
+3  12329 8803 7189
+3  2716 2718 1960
+3  10891 1975 11414
+3  9319 14455 8622
+3  14456 1562 12073
+3  14144 7394 10576
+3  8158 12967 12966
+3  6794 5485 5482
+3  8687 5416 11080
+3  6318 10812 4620
+3  10812 6162 4620
+3  7440 7812 7960
+3  7810 7812 7440
+3  10340 4783 4782
+3  14457 9976 14458
+3  14459 14457 14458
+3  2051 8148 14181
+3  8338 14181 8148
+3  5556 13576 14460
+3  9446 2652 14461
+3  12430 12429 7168
+3  4206 12902 4207
+3  363 362 3664
+3  13465 4289 6251
+3  1320 808 1321
+3  2996 7233 2529
+3  7231 7233 2996
+3  12678 3234 12327
+3  12327 4721 12678
+3  4646 11701 13533
+3  4646 13533 13532
+3  7298 4357 13260
+3  6779 7139 7141
+3  7139 6779 13918
+3  13449 14022 13450
+3  13 9790 1033
+3  5932 10633 10739
+3  5932 10739 7429
+3  614 10979 5644
+3  14462 11338 4066
+3  6906 13570 1215
+3  6341 80 77
+3  4737 11636 1794
+3  4738 4737 1794
+3  3022 2775 9272
+3  2775 7751 9272
+3  12380 4905 4904
+3  9576 7390 7265
+3  14463 14227 9070
+3  5810 1326 6367
+3  5810 6367 2065
+3  4922 2063 9577
+3  4922 9577 14449
+3  13345 12149 14464
+3  10158 10019 6785
+3  13632 9255 9254
+3  10117 5317 5316
+3  2645 10117 5316
+3  9957 12609 12958
+3  10423 2002 6013
+3  1958 2718 10470
+3  1479 3655 8225
+3  12676 14221 8774
+3  12676 8774 12677
+3  12857 6013 14465
+3  10423 6013 12857
+3  9232 12413 13270
+3  10 13270 12413
+3  189 3472 6905
+3  12089 1623 11225
+3  4568 4570 12340
+3  2630 21 2631
+3  2348 11913 4665
+3  824 4715 12927
+3  823 4715 824
+3  12905 5532 10121
+3  824 13679 12326
+3  825 824 12326
+3  6070 1775 6071
+3  13138 14087 9103
+3  667 7057 668
+3  8727 8725 8147
+3  5461 13725 14466
+3  5461 14466 13908
+3  14467 12259 7258
+3  14467 7258 7257
+3  12914 2073 2075
+3  295 1772 296
+3  14097 1071 7683
+3  701 12848 702
+3  14468 4201 11430
+3  14468 11430 12026
+3  2572 14469 6817
+3  4098 4100 6790
+3  4098 6790 8658
+3  387 333 332
+3  13101 12994 5243
+3  9672 9671 5142
+3  7400 11485 7401
+3  10480 12335 2474
+3  11269 10451 8578
+3  10451 14470 8578
+3  9870 12839 8555
+3  2415 8555 12839
+3  7250 13670 7744
+3  1623 1622 11225
+3  14471 703 8221
+3  1217 14471 8221
+3  12207 7524 7526
+3  6782 10030 13772
+3  6782 13772 4791
+3  13589 5716 5841
+3  14472 1298 1104
+3  14472 1104 14473
+3  8884 13589 5841
+3  9615 6461 3282
+3  14474 1702 14475
+3  14474 12665 1702
+3  4114 1537 1536
+3  5083 10747 7108
+3  2829 14476 3813
+3  7181 14476 2829
+3  8137 2764 11730
+3  3953 3955 14447
+3  14447 3955 7647
+3  3320 10939 1684
+3  3319 10939 3320
+3  3188 3526 14477
+3  4254 3091 7179
+3  11840 14187 11890
+3  14478 14187 11840
+3  1971 11417 1972
+3  11745 1972 11417
+3  11004 11005 14479
+3  10682 13061 14480
+3  8975 13593 8976
+3  8118 1434 1433
+3  6062 1491 1490
+3  10078 14481 9511
+3  7804 9511 14481
+3  12098 12882 12099
+3  14482 14483 3983
+3  7078 13580 13989
+3  1518 9787 1953
+3  12692 8248 12693
+3  14291 13615 14484
+3  1180 13939 14485
+3  10589 10311 10313
+3  502 501 12024
+3  3759 3761 5656
+3  9246 9248 10555
+3  4889 11856 14025
+3  655 2494 8915
+3  655 8915 656
+3  6454 758 6455
+3  9360 8257 8258
+3  6569 3683 11570
+3  11086 3495 8654
+3  12084 3495 11086
+3  12084 11086 11085
+3  7765 11279 14486
+3  12993 8257 9360
+3  12992 8257 12993
+3  8049 2472 8050
+3  1722 879 907
+3  4512 11127 1513
+3  14487 7334 14488
+3  11069 1193 1192
+3  4320 1982 5565
+3  1980 1982 9539
+3  757 8877 758
+3  13270 12 10226
+3  10225 13270 10226
+3  9570 13854 11689
+3  9647 3530 3646
+3  9647 3646 8143
+3  9647 8143 6709
+3  527 6709 8143
+3  1095 7272 1093
+3  12909 3339 10968
+3  5232 3339 12909
+3  7682 6331 5069
+3  7682 5069 11606
+3  4626 9270 4627
+3  10105 4647 10242
+3  10105 10242 2742
+3  14489 13866 14395
+3  12980 3725 3727
+3  338 5286 10334
+3  6998 14490 11394
+3  7000 14490 6998
+3  5659 4041 14491
+3  8279 11394 14490
+3  8279 8281 11394
+3  8191 8192 14492
+3  12943 13111 14493
+3  11247 7417 1449
+3  13123 5923 8072
+3  8653 8652 7144
+3  8653 7144 1141
+3  14494 11756 9068
+3  6681 6680 13123
+3  8071 6681 13123
+3  7513 14494 9068
+3  11461 7818 7402
+3  2613 2612 12991
+3  5947 140 5948
+3  2613 12991 12990
+3  7319 9238 8663
+3  11269 8124 233
+3  12397 10757 10665
+3  6111 10528 11589
+3  280 6993 3127
+3  10409 14495 10408
+3  14496 14495 10409
+3  7966 8687 7198
+3  7966 7198 8893
+3  9524 9523 14497
+3  14498 9524 14497
+3  9744 14029 9745
+3  2782 892 891
+3  13092 8758 11234
+3  13422 13092 11234
+3  3506 3505 14377
+3  165 167 14377
+3  14499 14500 2308
+3  2306 2308 14500
+3  9831 13540 12299
+3  892 409 893
+3  8234 8233 10215
+3  3485 3484 8759
+3  6604 517 12849
+3  11 6604 12849
+3  1953 14501 4335
+3  5662 1167 12628
+3  11969 12628 1167
+3  5730 5422 5424
+3  14418 4027 5160
+3  6077 10760 1427
+3  14231 1427 10760
+3  14248 5422 5730
+3  7306 6274 7307
+3  2728 14502 2729
+3  3037 14503 14504
+3  4701 14503 3037
+3  1880 11403 1881
+3  11474 14505 6976
+3  9541 11474 6976
+3  5976 3334 8668
+3  8666 8668 3334
+3  6586 4707 8786
+3  577 7877 2635
+3  9765 4874 4875
+3  8379 4874 9765
+3  14506 14507 4113
+3  14508 5747 13477
+3  5304 5747 14508
+3  9158 14509 14391
+3  9158 13644 14509
+3  14509 13644 13750
+3  4113 14507 8780
+3  8099 6827 7853
+3  1341 5521 1342
+3  13798 10452 10454
+3  13798 7137 10452
+3  1843 1844 14427
+3  2760 12834 5842
+3  6680 14510 5923
+3  14054 5695 10532
+3  13004 14054 10532
+3  11765 9839 391
+3  11765 4388 9839
+3  7708 6727 7731
+3  821 2580 2910
+3  14438 4001 4003
+3  14438 4003 8312
+3  855 552 856
+3  9971 856 552
+3  7730 11939 12109
+3  12062 14370 12108
+3  4623 14511 4624
+3  11324 14511 11893
+3  3543 11463 40
+3  41 40 11463
+3  182 7358 2870
+3  181 7358 182
+3  12850 5310 8150
+3  14038 5564 8163
+3  3698 14512 14513
+3  4796 8361 6573
+3  6613 2067 12459
+3  5769 13497 5770
+3  2068 9402 111
+3  5978 10877 14514
+3  5978 14514 5979
+3  9909 9908 4964
+3  2117 13011 13959
+3  2117 2116 13011
+3  10654 8747 6125
+3  12071 13656 14515
+3  12071 14515 7641
+3  9484 3243 10736
+3  14516 13027 4634
+3  14516 4634 4415
+3  4812 4897 448
+3  13028 13030 2550
+3  14517 14518 14519
+3  14517 14076 14518
+3  8152 14520 9316
+3  8152 9316 9315
+3  9836 13360 2253
+3  9836 14521 13360
+3  9836 9018 14521
+3  9836 9835 9018
+3  2517 2519 10312
+3  2472 2148 2147
+3  14522 13776 14523
+3  14522 14524 13776
+3  2119 3772 3194
+3  1766 6169 10163
+3  13737 7773 13738
+3  7004 7006 11878
+3  8556 13193 10651
+3  9518 13824 11660
+3  9518 11660 9519
+3  1305 254 256
+3  14525 3881 3880
+3  14526 3881 14525
+3  13500 5269 5271
+3  7205 6948 6947
+3  7191 529 6836
+3  2623 7191 6836
+3  4043 3457 3459
+3  531 6836 529
+3  14527 4689 14528
+3  1067 2794 1068
+3  11377 13826 10048
+3  10975 13231 13640
+3  8728 14529 13441
+3  674 14530 675
+3  675 14530 14531
+3  7317 9120 9651
+3  9148 4705 4707
+3  7719 9592 7720
+3  12784 12783 7749
+3  4368 4705 9148
+3  9941 905 4108
+3  5350 10251 10250
+3  11284 10651 1369
+3  9031 12560 9030
+3  171 6466 6325
+3  7897 6325 6466
+3  14215 8650 14216
+3  14532 116 4300
+3  6431 7982 6432
+3  1237 13347 1238
+3  14533 6368 6367
+3  3604 5221 3416
+3  14269 3670 13201
+3  5218 5221 3604
+3  11510 5933 13665
+3  2340 7411 11137
+3  2339 7411 2340
+3  1470 1469 12860
+3  12859 1470 12860
+3  14534 13860 11620
+3  11434 11620 13860
+3  3735 12838 12839
+3  14061 361 360
+3  822 821 2788
+3  821 2910 2788
+3  8178 2757 7880
+3  13450 14535 4523
+3  13450 4523 2811
+3  14022 14535 13450
+3  9 6671 5144
+3  7 9 5143
+3  5143 9 5144
+3  12923 6434 10943
+3  7017 7016 9013
+3  6405 6404 11205
+3  14532 11196 10969
+3  10259 10258 9569
+3  10259 9569 11134
+3  9616 4970 9617
+3  11691 11625 4811
+3  4718 13119 4716
+3  2295 13119 4718
+3  4970 4969 9617
+3  205 9152 206
+3  5435 12774 14536
+3  2818 5435 14536
+3  6759 6760 14537
+3  5029 1406 8300
+3  6668 6667 14278
+3  5028 5029 8300
+3  2237 1063 1065
+3  11089 10821 10820
+3  11089 10820 14538
+3  11897 9638 11898
+3  11897 9632 9638
+3  8470 14280 13479
+3  3761 14348 5657
+3  10080 5657 14348
+3  11211 5264 5263
+3  6019 7383 11719
+3  13760 8117 12335
+3  11704 9909 8156
+3  14442 14444 3059
+3  3058 14442 3059
+3  14539 916 915
+3  14540 9339 14541
+3  9337 9339 14540
+3  9354 12862 9959
+3  9354 9356 12862
+3  12553 3198 12007
+3  10729 12184 12355
+3  13370 12802 9164
+3  13370 2272 12802
+3  13370 2273 2272
+3  1849 10944 14042
+3  14542 4388 11765
+3  11659 4388 14542
+3  8337 2209 5675
+3  8337 2210 2209
+3  725 6400 726
+3  12567 6400 725
+3  7003 2210 8337
+3  6474 10079 10077
+3  9515 2505 8434
+3  2507 8434 2505
+3  5178 228 5179
+3  5674 5615 6254
+3  797 12961 14543
+3  13097 10092 4051
+3  14273 14300 14299
+3  942 14414 7825
+3  6387 11093 10334
+3  5946 14415 14414
+3  5946 14414 942
+3  12009 12010 2933
+3  809 808 1320
+3  4862 2452 13366
+3  4862 8125 2452
+3  430 9573 431
+3  11756 11969 1167
+3  14544 6693 843
+3  12704 8302 8304
+3  12704 8304 12703
+3  9993 13820 11896
+3  1859 1858 11527
+3  13837 1859 11527
+3  405 11915 1083
+3  405 404 11915
+3  10328 14545 14546
+3  10328 14546 10327
+3  13805 13804 14294
+3  7353 7352 10783
+3  7457 7353 11936
+3  10234 10233 4501
+3  11454 3560 1109
+3  14547 14259 14548
+3  14549 14259 14547
+3  7076 7438 7077
+3  14550 13968 13076
+3  14550 13076 1826
+3  2428 9585 12873
+3  7180 5993 5186
+3  13968 6164 1485
+3  104 2220 105
+3  6229 14551 11332
+3  12445 2153 2155
+3  5778 7737 4560
+3  6570 7737 5778
+3  13958 5858 12549
+3  8020 10898 11325
+3  4255 4254 7179
+3  8094 10671 13694
+3  8093 10671 8094
+3  12517 7893 4972
+3  10326 7893 12517
+3  8092 14423 7211
+3  12010 1416 10375
+3  7473 2568 4889
+3  434 10161 4149
+3  7232 12501 4849
+3  1638 4849 12501
+3  6751 14552 11186
+3  8739 8738 9193
+3  14416 13066 1645
+3  3294 9958 7407
+3  12850 3595 589
+3  9555 11192 8750
+3  2966 14553 13213
+3  14554 13213 14553
+3  3041 4577 1592
+3  839 1592 4577
+3  10730 6282 3309
+3  6280 6282 10730
+3  14555 4377 4376
+3  14310 1124 1123
+3  3356 3358 9621
+3  5902 12680 14556
+3  8982 9416 8983
+3  3138 11104 12680
+3  1431 3491 11235
+3  5722 133 132
+3  14432 13602 7698
+3  8130 13602 14432
+3  8300 1408 2739
+3  5713 275 5714
+3  1408 2611 2739
+3  10181 11544 11543
+3  8000 8002 10750
+3  2438 2437 13605
+3  1544 14557 1542
+3  13044 14557 1544
+3  10611 11305 6914
+3  8271 10611 6914
+3  8271 6914 5196
+3  7550 5746 5745
+3  5303 7550 5745
+3  11342 12044 880
+3  12069 14262 12067
+3  10914 14262 12069
+3  6688 12168 2472
+3  11485 14310 7401
+3  10875 63 9100
+3  13016 13658 7637
+3  14558 11773 10367
+3  11771 11773 14558
+3  14347 14346 13780
+3  14559 13780 14346
+3  6632 6762 14560
+3  14561 14562 14563
+3  12192 864 10184
+3  6622 3374 6623
+3  12535 9265 3374
+3  14564 14565 9548
+3  10702 9240 12169
+3  7517 12169 9240
+3  11106 10723 11787
+3  10638 7237 7239
+3  10824 7237 10638
+3  14430 6532 6533
+3  14430 6533 13541
+3  14566 3245 3244
+3  6372 10585 10878
+3  13122 11669 14567
+3  2223 13695 10800
+3  10800 13695 3030
+3  8668 10272 5976
+3  10272 1228 5976
+3  6267 10208 9704
+3  13534 241 239
+3  9346 13534 239
+3  14568 7613 14569
+3  7611 7613 14568
+3  3388 10164 3389
+3  10162 10164 3388
+3  13145 9682 13146
+3  13145 14570 9682
+3  8843 14163 10118
+3  13146 9682 14571
+3  3781 14572 9681
+3  6169 6170 8661
+3  11404 9696 9057
+3  14573 13018 1038
+3  6921 13018 14573
+3  12581 5815 1379
+3  9476 14574 14575
+3  3903 3902 5059
+3  4555 12139 10213
+3  5007 5006 859
+3  5007 859 858
+3  10090 11276 13963
+3  13961 11357 13962
+3  14576 11357 13961
+3  4137 14577 4138
+3  9788 4138 14577
+3  10088 10090 12875
+3  12464 1300 1302
+3  14578 6652 13576
+3  13575 14578 13576
+3  11696 14578 13575
+3  11696 13639 14578
+3  13639 9031 14578
+3  1745 10557 14099
+3  10556 14099 10557
+3  1671 4406 3584
+3  1655 8815 1656
+3  5468 8816 8815
+3  11522 3876 3873
+3  12233 4454 12598
+3  14579 1276 1275
+3  13725 12233 12598
+3  13725 12598 14485
+3  13451 12251 853
+3  5883 13276 4454
+3  5883 4454 12233
+3  4526 5201 2704
+3  9707 3708 9708
+3  2504 7312 14580
+3  14581 13472 14582
+3  12518 8012 8847
+3  9779 8012 12518
+3  88 9779 12518
+3  12018 12394 12395
+3  13768 2592 5235
+3  11193 13768 5235
+3  12722 10167 14583
+3  6489 2790 8246
+3  14584 13164 13163
+3  14584 13163 13368
+3  10933 8415 11630
+3  6102 1803 1802
+3  13163 10925 6896
+3  13163 6896 13367
+3  10980 183 2869
+3  5586 1802 1804
+3  7677 9506 2417
+3  5820 7677 2417
+3  14419 5160 5162
+3  14419 5162 14585
+3  3586 8583 3587
+3  3603 9574 9918
+3  2831 10375 1398
+3  690 4191 788
+3  13165 4708 12805
+3  12916 1745 8659
+3  12916 10557 1745
+3  3307 3306 14586
+3  7406 5771 11290
+3  9281 12580 3716
+3  12710 3716 12580
+3  7591 3032 8269
+3  6985 11703 14587
+3  11443 11442 14588
+3  11442 3560 14588
+3  14588 3560 11454
+3  899 5796 11529
+3  13224 14589 14590
+3  9746 12452 9303
+3  9746 6497 12452
+3  5426 10350 10779
+3  1593 11502 1591
+3  13965 10707 13844
+3  535 13344 536
+3  12861 1676 4203
+3  8134 2839 5379
+3  13418 13417 12748
+3  12748 13417 12568
+3  2975 11280 875
+3  13417 3600 12568
+3  12585 12584 893
+3  12584 10176 894
+3  12584 894 893
+3  1801 7614 7367
+3  14591 14592 14046
+3  14591 14046 11550
+3  10404 14593 10405
+3  75 10405 14593
+3  7004 6078 7005
+3  1127 11976 4146
+3  8663 7317 7319
+3  3395 1619 1618
+3  8801 8800 9590
+3  9894 11567 13383
+3  13913 7424 12722
+3  3501 8412 8411
+3  8411 8413 3502
+3  9516 5506 12928
+3  9988 5323 5325
+3  14594 12441 14595
+3  5010 14596 8995
+3  9384 9847 13608
+3  9847 7474 8572
+3  7413 9924 11137
+3  7413 11137 7411
+3  4801 14597 14598
+3  10242 4646 13532
+3  2119 3194 3193
+3  14599 13478 5748
+3  3084 3083 12179
+3  13964 7022 7021
+3  9602 11501 8710
+3  7550 14600 5746
+3  803 12225 13797
+3  10798 13797 12225
+3  11336 14271 14302
+3  13432 13431 702
+3  1316 7531 14601
+3  12382 12381 8324
+3  14462 4066 4065
+3  5241 11277 11278
+3  485 512 6833
+3  1652 12133 875
+3  7818 7400 7402
+3  3519 7994 7328
+3  8964 7011 13280
+3  7754 8912 13673
+3  4799 13832 13869
+3  4819 2575 2574
+3  5726 449 451
+3  12491 449 5726
+3  11399 1011 11149
+3  6825 4971 358
+3  755 754 9118
+3  3781 9681 14570
+3  9682 14570 9681
+3  8772 7561 4936
+3  6831 9292 10040
+3  13402 9886 8244
+3  1864 1863 5977
+3  9831 10754 13540
+3  14043 3616 3618
+3  14043 9183 3616
+3  9956 12608 9957
+3  12021 10465 7252
+3  5593 7234 10301
+3  7855 8685 9893
+3  6001 6002 7787
+3  4687 6001 7787
+3  5987 11763 12755
+3  9980 4353 5028
+3  3009 3008 7253
+3  12306 3009 7253
+3  8776 8775 14404
+3  4748 5857 3008
+3  8200 8199 11273
+3  5774 2641 363
+3  1625 14085 7823
+3  3413 5221 12753
+3  12752 3413 12753
+3  8189 8783 14602
+3  14603 14602 8783
+3  14603 14604 14602
+3  14602 14604 5660
+3  14605 6753 11728
+3  14518 14074 14606
+3  12082 3534 3533
+3  614 10977 10979
+3  3199 10445 13877
+3  392 2883 393
+3  8958 7755 7869
+3  7870 8958 7869
+3  1579 3280 1580
+3  14456 14607 1562
+3  7259 2369 2368
+3  13863 3481 3480
+3  4404 4403 95
+3  12484 95 4403
+3  3396 10618 11220
+3  3396 11220 14435
+3  4349 10741 12406
+3  592 9849 3412
+3  13882 7774 7775
+3  6164 2057 2059
+3  10312 2519 10313
+3  11936 14286 7456
+3  7138 2478 2480
+3  8062 4044 4043
+3  8062 13536 4044
+3  5659 8189 14602
+3  5660 5659 14602
+3  11854 14608 9111
+3  11729 11728 14609
+3  7058 1892 13733
+3  6717 6718 10173
+3  6641 6717 10173
+3  2813 8968 14610
+3  14611 5694 9759
+3  11594 10420 13310
+3  2480 2479 6117
+3  1946 3077 3076
+3  7979 4603 3223
+3  8822 11679 5479
+3  11679 8822 14240
+3  791 13874 792
+3  791 13875 13874
+3  3138 5502 3139
+3  10080 14348 14612
+3  14613 10080 14612
+3  9263 528 14614
+3  9263 14614 4943
+3  9714 10827 12378
+3  14498 14615 9524
+3  14498 14616 14615
+3  13251 13254 11288
+3  13251 11288 5116
+3  13251 5116 10919
+3  10709 13254 1782
+3  12809 10217 10216
+3  9648 9650 13945
+3  9648 13945 9646
+3  6075 13080 14617
+3  6075 13079 13080
+3  5169 14124 6322
+3  12815 14124 5169
+3  13212 2966 13213
+3  1149 12656 1147
+3  1149 4147 12656
+3  6096 5936 6097
+3  5937 6097 5936
+3  4356 4333 4354
+3  452 12393 1098
+3  7792 8409 14163
+3  5251 14037 10050
+3  5097 9843 10102
+3  11601 11600 11649
+3  14618 7386 7886
+3  7886 7386 7887
+3  7133 14325 10925
+3  5097 5096 13680
+3  13333 14619 6475
+3  13333 6475 14015
+3  11450 11646 11645
+3  11450 11645 12728
+3  10571 10942 4976
+3  5125 7275 7274
+3  10837 5125 7274
+3  4163 7285 4164
+3  13680 8237 14620
+3  14620 8237 14621
+3  14307 9320 10752
+3  1163 1162 14622
+3  6087 9749 5374
+3  1350 2489 1347
+3  13684 3550 3549
+3  6407 6779 7141
+3  9807 4831 13448
+3  1028 1027 5998
+3  14623 5984 5983
+3  14623 5983 6010
+3  6842 14624 12736
+3  6516 1286 10229
+3  3233 1920 8466
+3  6009 14623 6010
+3  6255 14623 6009
+3  6255 8339 14623
+3  14623 8339 5984
+3  14620 14621 8040
+3  9843 14620 8040
+3  5097 14620 9843
+3  5097 13680 14620
+3  1285 5983 8897
+3  7902 1074 3999
+3  7902 3999 6981
+3  10651 6566 1369
+3  8686 1758 12019
+3  4337 14625 13359
+3  12474 9523 8061
+3  12474 14497 9523
+3  13024 8587 658
+3  14049 14579 6155
+3  14304 11120 6510
+3  8765 2018 14626
+3  1177 14627 7423
+3  14627 12258 7423
+3  14207 5394 12258
+3  5395 5394 14207
+3  13883 14207 12258
+3  14627 13883 12258
+3  5815 3485 8759
+3  6721 2537 6409
+3  4129 3677 3676
+3  5414 4129 3676
+3  2322 4824 6757
+3  4823 6757 4824
+3  14628 2561 6422
+3  13730 10622 74
+3  4070 10622 13730
+3  9015 12113 9016
+3  4069 7542 4070
+3  4069 10608 7542
+3  12237 11984 12058
+3  13209 7296 9363
+3  13209 7297 7296
+3  5794 14629 5795
+3  5794 11855 14629
+3  14630 10174 6315
+3  10905 5072 1614
+3  14631 13224 14590
+3  14211 2974 2971
+3  14211 195 2974
+3  5667 8489 650
+3  5667 5666 8489
+3  12125 8220 3186
+3  13308 9883 8372
+3  13308 8372 11594
+3  802 10637 12225
+3  10636 12225 10637
+3  12925 13327 1667
+3  12925 1667 1666
+3  13242 1078 13143
+3  10669 13242 13143
+3  9642 3412 3411
+3  881 4531 883
+3  12137 12136 12379
+3  14632 10018 4672
+3  14632 4672 2307
+3  3148 14633 14209
+3  3148 14209 3149
+3  9977 4472 11952
+3  9901 11107 87
+3  7363 7086 5348
+3  13235 13573 8303
+3  6385 11073 9147
+3  4289 13465 4290
+3  10600 426 429
+3  10499 13032 14634
+3  13384 10004 12201
+3  6815 7624 6813
+3  3235 1921 1920
+3  14017 5732 6495
+3  12949 14635 14017
+3  9025 8999 9023
+3  3578 6824 14109
+3  13592 13915 10857
+3  8156 4966 8157
+3  13898 13897 14636
+3  7318 12971 13565
+3  10547 14539 11448
+3  915 11448 14539
+3  955 14637 13411
+3  12827 14638 12701
+3  6270 13339 13274
+3  11291 8098 6221
+3  6270 2129 13339
+3  5004 2129 6270
+3  3442 13411 14637
+3  14639 14311 4852
+3  14640 8740 9332
+3  7974 14640 9332
+3  10938 8491 4825
+3  10963 2035 7256
+3  14514 10877 10876
+3  12742 5979 14514
+3  12742 14514 7314
+3  14641 11597 14642
+3  11596 14642 11597
+3  14642 12373 14641
+3  1311 10806 10777
+3  13645 11373 304
+3  4656 12447 9106
+3  14641 13141 11597
+3  14641 6734 13141
+3  12853 14643 4340
+3  12853 4340 12854
+3  13338 13135 12907
+3  13134 12907 13135
+3  4656 9106 1980
+3  2769 8588 4440
+3  8386 8389 2413
+3  8386 2413 2412
+3  12147 1487 8067
+3  736 2123 734
+3  736 2121 2123
+3  14334 9959 12862
+3  4533 13466 12981
+3  14644 3337 14140
+3  8729 10183 8730
+3  8730 10183 10184
+3  2356 12895 9859
+3  12193 5585 9041
+3  1207 1604 14378
+3  1207 14378 4761
+3  4123 12703 4124
+3  8637 11201 8638
+3  314 7217 8907
+3  6514 7217 314
+3  12506 10857 10856
+3  13214 12506 10856
+3  14645 646 9931
+3  8118 1433 13313
+3  3053 3051 11741
+3  10748 10750 14394
+3  14145 5406 2743
+3  14145 2743 2742
+3  13922 14646 8926
+3  3286 8026 461
+3  10811 10241 12295
+3  12297 998 8639
+3  3192 1265 3193
+3  6092 11526 11692
+3  10220 14647 7966
+3  6092 6091 11526
+3  10852 9140 2859
+3  12291 8282 12603
+3  14648 12603 8282
+3  4313 14649 8905
+3  14649 2737 8905
+3  6562 12693 6563
+3  10021 11557 2570
+3  2428 2427 9585
+3  7872 8637 7873
+3  11131 7599 4282
+3  7521 14650 9182
+3  7767 9182 14650
+3  7872 8769 8637
+3  11859 12587 12759
+3  11858 11859 12759
+3  2122 12903 12902
+3  9293 1918 1917
+3  3467 2316 12640
+3  5703 10867 9529
+3  6380 5703 9529
+3  7864 12532 14651
+3  3687 13170 2405
+3  10933 13870 8415
+3  9695 13896 14652
+3  14271 4662 5814
+3  10630 12425 12053
+3  13808 13609 6577
+3  14271 5814 14302
+3  14653 4162 1877
+3  4581 14653 4582
+3  12529 11525 6091
+3  6724 8628 7626
+3  6724 7626 4500
+3  13500 5271 3866
+3  14654 1338 2760
+3  8372 9883 8370
+3  6482 5266 5268
+3  6482 11097 5266
+3  3117 11097 6482
+3  14514 10876 7314
+3  4800 5806 4801
+3  14597 4801 5806
+3  12321 5806 4800
+3  5007 858 6103
+3  3377 4636 3378
+3  3378 4636 14655
+3  4636 8082 14655
+3  14655 8082 6034
+3  7901 14419 14585
+3  7901 14585 1074
+3  70 14656 6034
+3  14656 14655 6034
+3  14656 14657 14655
+3  3378 14655 14657
+3  9145 14657 14656
+3  14656 9143 9145
+3  9090 7451 7453
+3  9090 7453 9091
+3  1028 5998 6864
+3  10727 14658 10615
+3  10465 12198 10464
+3  12021 12198 10465
+3  11898 9638 3108
+3  3106 11898 3108
+3  6217 13871 1607
+3  8239 10906 8240
+3  12414 11066 10008
+3  11066 16 8082
+3  11066 12414 16
+3  12414 14173 16
+3  16 14173 17
+3  7901 14418 14419
+3  1441 1440 3499
+3  4828 11749 9596
+3  70 2617 9143
+3  70 9143 14656
+3  7464 4039 9637
+3  7464 2230 4039
+3  3935 13832 4799
+3  13394 7748 13395
+3  13394 12784 7749
+3  13394 7749 7748
+3  4372 11057 3815
+3  2487 2489 1350
+3  13576 11217 14460
+3  6652 11217 13576
+3  14460 11217 1818
+3  5557 14460 1818
+3  3720 3181 12504
+3  3182 3181 3720
+3  5613 5674 8348
+3  5671 8348 5674
+3  5605 8491 8811
+3  10186 10185 6568
+3  14416 5044 9341
+3  5043 9341 5044
+3  2969 2968 3624
+3  6269 11417 1971
+3  5004 6269 1971
+3  9548 14565 14659
+3  14660 2361 9388
+3  14236 6594 13627
+3  10046 9731 11377
+3  12750 5612 5611
+3  12754 14257 5612
+3  12750 12754 5612
+3  3917 11328 10485
+3  14118 7172 1896
+3  14118 11328 7172
+3  7102 3793 11377
+3  7101 3793 7102
+3  347 349 11369
+3  9215 11044 2887
+3  9215 2887 9636
+3  4943 14614 8144
+3  10500 13056 10501
+3  1326 7342 851
+3  1765 851 7342
+3  10566 4237 4239
+3  14320 2363 8486
+3  3062 3555 9660
+3  11970 11686 5785
+3  2266 3882 7885
+3  11440 14463 14661
+3  11440 12527 14463
+3  3833 9620 3831
+3  5068 3831 9621
+3  13580 7078 13581
+3  4838 4837 13616
+3  4838 13616 8817
+3  2995 12232 2997
+3  12232 5883 12233
+3  2995 5883 12232
+3  11619 11751 9914
+3  11676 8527 8526
+3  2766 2768 4830
+3  11 12849 11785
+3  11 11785 12
+3  1545 1547 11141
+3  3092 217 13686
+3  3446 3445 4081
+3  10952 10815 742
+3  468 10815 10952
+3  9892 9819 2889
+3  2889 9819 5438
+3  14381 14570 13145
+3  6328 13398 10439
+3  10439 13398 14662
+3  13397 14662 13398
+3  14465 6015 9802
+3  6013 6015 14465
+3  13719 14663 10871
+3  13719 10871 13720
+3  9269 6572 9266
+3  7289 12195 7522
+3  6015 6014 194
+3  193 6015 194
+3  6329 10439 10441
+3  6066 12129 6067
+3  11072 11800 14664
+3  3634 14665 14666
+3  614 5644 615
+3  614 14667 10977
+3  10747 9575 6065
+3  613 14667 614
+3  1032 704 706
+3  11214 10702 12170
+3  10703 11214 11213
+3  10703 10702 11214
+3  3380 9479 10373
+3  7918 7919 14406
+3  12334 5504 8471
+3  12334 14443 5504
+3  1602 2939 14668
+3  3523 1266 12984
+3  3523 12984 3524
+3  1836 9162 9161
+3  14669 14670 4980
+3  5884 8180 5670
+3  5885 5884 5670
+3  12744 13409 9094
+3  11839 14671 14672
+3  11839 14672 14478
+3  12447 3440 9106
+3  11839 14478 11840
+3  3744 2469 2471
+3  560 10518 14293
+3  6748 5900 5902
+3  6600 10659 8346
+3  8346 10659 5197
+3  3535 3537 4596
+3  11344 11346 9530
+3  13357 9723 9722
+3  14673 6621 14674
+3  14356 6621 14673
+3  4790 7460 10538
+3  8050 2472 2147
+3  8620 14366 14675
+3  8620 14676 14366
+3  5927 7566 6110
+3  12587 14677 2994
+3  12587 2994 2993
+3  11449 12441 14594
+3  9720 9451 12040
+3  9720 10285 9721
+3  7398 6448 7399
+3  11972 5389 5388
+3  5389 11972 11446
+3  13152 2668 10307
+3  8405 13432 702
+3  13152 2671 2668
+3  14036 985 10044
+3  5998 1027 6365
+3  14273 6026 11603
+3  3552 3551 13669
+3  14678 14679 14680
+3  10428 9456 14497
+3  10428 14497 12474
+3  3380 10373 3381
+3  13581 3833 13582
+3  14024 14384 14535
+3  14022 14024 14535
+3  10100 13765 4228
+3  8927 9245 14681
+3  6759 14537 4490
+3  4490 14537 14180
+3  969 7122 11901
+3  1195 1197 12400
+3  5358 1898 1897
+3  10209 2022 2024
+3  4240 3050 11699
+3  3449 2022 10209
+3  653 3491 1431
+3  14682 13302 11102
+3  456 9776 457
+3  11096 5634 5631
+3  7647 3955 7648
+3  13303 11521 14197
+3  12718 8771 8488
+3  9651 12971 7318
+3  9651 7318 7317
+3  4987 5212 3132
+3  2081 2080 1900
+3  14683 14642 11596
+3  14683 11596 14330
+3  2720 5371 5909
+3  2720 6880 5371
+3  6942 20 66
+3  14684 287 286
+3  13393 12263 10586
+3  11763 8280 2184
+3  1316 13567 1317
+3  1316 14601 13567
+3  11491 11490 2847
+3  11490 897 2847
+3  14685 14485 13939
+3  14685 13939 859
+3  12145 14528 2200
+3  14528 4104 2200
+3  11966 8530 12708
+3  13457 3364 3367
+3  13457 3367 4155
+3  1885 1887 3653
+3  2349 4666 10782
+3  3653 1887 4684
+3  458 54 6984
+3  5182 7914 5180
+3  5180 7914 271
+3  10544 1086 12175
+3  2682 1155 12176
+3  2682 12176 12918
+3  12918 12176 7261
+3  7261 12176 4265
+3  4265 12176 4695
+3  13724 2904 2903
+3  13724 14686 2904
+3  4922 14449 2580
+3  14392 14122 14121
+3  11172 2205 9077
+3  14172 5341 3632
+3  3633 3632 5341
+3  14687 2205 11172
+3  11297 8611 11298
+3  695 694 5919
+3  13564 3006 13986
+3  1774 6361 5269
+3  4530 10407 4531
+3  11331 13453 2440
+3  11331 2440 8374
+3  11523 11522 12058
+3  12747 12058 11522
+3  4025 6926 4336
+3  9542 313 14688
+3  6254 14612 13400
+3  6254 13400 13401
+3  6769 12747 3504
+3  6769 3504 3506
+3  6419 14689 6420
+3  8368 8842 9927
+3  8368 9927 9926
+3  824 12927 13112
+3  7087 5212 4987
+3  14690 14691 6706
+3  14690 6706 6705
+3  13769 9291 2695
+3  13990 13580 13582
+3  5544 10602 5185
+3  14692 14693 729
+3  6417 12436 11870
+3  2124 561 2125
+3  5520 8543 8540
+3  561 560 14293
+3  6473 3349 8177
+3  4755 8778 7678
+3  14694 6296 3380
+3  9433 1124 5287
+3  3084 12177 14695
+3  3382 876 14694
+3  3382 14694 3380
+3  11486 2763 2762
+3  3099 9013 5427
+3  2716 1960 11042
+3  3945 2125 561
+3  3945 3944 2125
+3  5313 5312 3894
+3  2377 10076 997
+3  7510 2289 7511
+3  1612 452 11946
+3  1610 1612 11946
+3  3252 7112 3376
+3  3499 1440 4290
+3  6629 6628 14420
+3  13908 5006 5005
+3  9105 600 4872
+3  13153 14696 13456
+3  13874 10921 792
+3  2651 9765 2652
+3  9765 4875 14461
+3  9765 14461 2652
+3  14435 10210 3396
+3  5536 9431 1089
+3  1091 5536 1089
+3  9212 9211 12837
+3  913 1006 1636
+3  2761 2760 5842
+3  7975 2633 8785
+3  8786 11075 8785
+3  2633 2635 8785
+3  7621 12876 14697
+3  7621 4052 12876
+3  8164 14697 12876
+3  8164 12876 8165
+3  4707 11075 8786
+3  4706 11075 4707
+3  14698 4714 7267
+3  12613 2343 3638
+3  12613 12615 2343
+3  14375 9028 14699
+3  10733 14041 10150
+3  9848 6372 6694
+3  12110 6444 10324
+3  6154 10570 7838
+3  1596 1477 6926
+3  6552 7197 7199
+3  6552 7199 7063
+3  10358 3426 1784
+3  5366 11815 1856
+3  10583 11815 5366
+3  2284 2283 6546
+3  2284 6546 6151
+3  2145 2365 2364
+3  7305 13414 11303
+3  7305 11303 7306
+3  13369 14700 7945
+3  13369 13371 14700
+3  14700 13371 14701
+3  14700 5928 7945
+3  14596 5928 14700
+3  14596 14700 14701
+3  5985 8341 9251
+3  9864 12985 2100
+3  9022 9024 13401
+3  14107 12430 11343
+3  11333 5060 8706
+3  5060 5062 8706
+3  9040 3265 2214
+3  3263 3265 9040
+3  10463 328 330
+3  13473 2175 4629
+3  7065 7064 8883
+3  14702 7065 8883
+3  3559 7065 14702
+3  3559 6550 7065
+3  7708 7731 7730
+3  6862 8728 12262
+3  2773 2888 2774
+3  7559 7577 11614
+3  5259 5712 5257
+3  11403 14281 11402
+3  11873 14340 14281
+3  4572 10051 14703
+3  12488 4572 14703
+3  12488 4588 4573
+3  12488 4573 4572
+3  9182 9184 10537
+3  11348 6115 2689
+3  11307 11505 13101
+3  12036 12035 14489
+3  10580 12034 10579
+3  3840 3839 10317
+3  13273 3840 10317
+3  9817 8757 8756
+3  6932 5961 1250
+3  6931 5958 5961
+3  6931 5961 6932
+3  6931 6281 5958
+3  5687 3762 6519
+3  14704 2386 9359
+3  9346 9345 3046
+3  2495 551 2404
+3  1104 1824 1102
+3  1104 1299 1824
+3  9725 6536 14705
+3  10609 8601 250
+3  14406 14704 14706
+3  7005 3443 9784
+3  14434 4307 5665
+3  4306 5663 5665
+3  4307 4306 5665
+3  12347 8547 4426
+3  14704 7919 2386
+3  14406 7919 14704
+3  5935 5934 9987
+3  5414 6291 7551
+3  12175 5102 9512
+3  12175 9512 10544
+3  13796 3006 3005
+3  13619 14707 13621
+3  7870 11309 9709
+3  13745 13766 13852
+3  685 12610 686
+3  5620 13798 9086
+3  13771 4029 4028
+3  13771 613 2573
+3  14667 613 13771
+3  1058 1057 4643
+3  1058 4643 2930
+3  3894 3896 11762
+3  10718 4575 4574
+3  10718 12495 4575
+3  4461 14302 14708
+3  6885 5594 7683
+3  13689 6885 7683
+3  3151 2905 2904
+3  3151 3224 2905
+3  14168 1431 11235
+3  9235 10807 12333
+3  9250 7392 10672
+3  12969 12815 12137
+3  9503 11367 12324
+3  9503 12324 2247
+3  13969 5405 13788
+3  13969 13788 13970
+3  13969 6608 5405
+3  13969 8655 6608
+3  10634 3215 3217
+3  10634 3217 780
+3  10310 14709 7315
+3  11931 3733 11885
+3  11091 11090 13868
+3  13832 11091 13868
+3  12210 5067 8781
+3  13445 10940 10941
+3  3364 13457 7426
+3  3364 7426 11016
+3  14710 13412 6666
+3  1745 1747 8659
+3  8187 7601 7399
+3  9783 14285 9584
+3  3941 4690 3932
+3  10761 3559 9925
+3  7686 7687 14711
+3  7100 11221 14712
+3  12494 1460 12794
+3  12494 12794 7391
+3  8851 5871 13439
+3  6575 13439 5871
+3  4608 4607 13996
+3  7420 6747 7421
+3  9908 13689 1070
+3  9231 7181 2828
+3  3304 11799 13623
+3  11880 13590 14713
+3  6165 14713 13590
+3  14714 14715 11673
+3  10816 14716 7967
+3  10816 7967 8262
+3  7943 13066 9341
+3  7943 9341 3707
+3  5274 13729 14112
+3  5272 14112 14717
+3  5272 5274 14112
+3  3394 2937 2936
+3  3394 2936 1619
+3  1619 2936 5581
+3  14641 12373 6734
+3  7186 12600 852
+3  4327 4328 12111
+3  1128 14718 4639
+3  4639 14718 9653
+3  14718 9186 9653
+3  3093 14719 14147
+3  12308 13361 7471
+3  5664 12003 6074
+3  8289 12003 5664
+3  8274 6069 4273
+3  8274 13226 6069
+3  1379 5815 8759
+3  12791 14720 3996
+3  14721 11456 11455
+3  14722 11456 14721
+3  14396 14721 12717
+3  11455 12717 14721
+3  13259 13258 7257
+3  6169 1766 1768
+3  2334 7981 5937
+3  4346 4345 12294
+3  8965 14031 7012
+3  5608 14031 8965
+3  1137 12623 2658
+3  10477 10507 14723
+3  10507 7268 14723
+3  14723 7268 7270
+3  2625 2628 6917
+3  14545 6917 2628
+3  13578 14724 5705
+3  4520 4519 12944
+3  803 802 12225
+3  10328 6917 14545
+3  1653 3563 6394
+3  732 731 13042
+3  13042 731 918
+3  7462 13946 7945
+3  14725 4855 4857
+3  9954 5031 3173
+3  12565 7605 14726
+3  6662 13344 535
+3  7129 10013 900
+3  8964 13280 8133
+3  10077 9511 12503
+3  13620 13621 14727
+3  8523 14728 14729
+3  8523 14729 9418
+3  7125 14730 6493
+3  13621 14731 14727
+3  1281 3464 3463
+3  1281 3463 14732
+3  5859 2236 3527
+3  2885 11046 4030
+3  3755 3754 11973
+3  2776 3803 13203
+3  358 4973 7952
+3  2149 7365 5443
+3  1599 10615 14658
+3  11837 5642 5643
+3  8603 220 11925
+3  8602 220 8603
+3  414 1498 9167
+3  5589 10064 10648
+3  5590 5589 10648
+3  12475 68 17
+3  12475 5318 68
+3  12209 8356 5846
+3  14521 1794 1796
+3  1118 12209 5846
+3  1118 5846 7768
+3  13519 1477 3624
+3  3624 1477 1596
+3  9123 10994 9084
+3  7768 5846 2899
+3  8825 6487 2566
+3  7915 1963 1965
+3  5809 1698 14733
+3  14733 1698 1697
+3  2118 2976 11693
+3  11693 2976 12133
+3  5809 14733 8930
+3  7402 8930 14733
+3  7402 14733 11461
+3  11461 14733 1697
+3  7142 7702 7705
+3  7142 7705 7143
+3  228 9142 13876
+3  228 13876 5179
+3  457 13876 9142
+3  457 13120 13876
+3  11362 11761 3756
+3  7308 7309 11370
+3  11370 7309 12561
+3  11370 12561 9586
+3  13718 14677 12158
+3  14422 3689 12907
+3  14422 12907 6529
+3  3690 3689 14422
+3  7598 1967 7027
+3  11592 12924 11593
+3  11592 7687 12924
+3  9415 8673 8675
+3  5103 5585 12193
+3  14053 6272 6274
+3  10868 10021 2687
+3  14732 3463 14734
+3  13708 2582 6448
+3  3262 418 2849
+3  11545 13916 11543
+3  12402 11543 13916
+3  1029 11706 1030
+3  438 11143 4792
+3  438 12599 11143
+3  12417 14735 10196
+3  2153 12445 12872
+3  2153 12872 7018
+3  12140 10214 10213
+3  3737 3830 3829
+3  6932 2697 3309
+3  3755 12700 5166
+3  5166 12700 14106
+3  12161 11634 12700
+3  12161 13934 11634
+3  12161 12700 11973
+3  12700 3755 11973
+3  3973 12161 11973
+3  5166 14106 5607
+3  7759 6890 6889
+3  9280 14317 12579
+3  14400 14317 9280
+3  6331 5596 8663
+3  4564 4566 3972
+3  4776 14736 12673
+3  10421 4776 12673
+3  7682 5596 6331
+3  1162 6193 14622
+3  14737 2938 14738
+3  11753 2938 14737
+3  13933 14722 14721
+3  11493 12378 10826
+3  14533 14698 13864
+3  4714 14698 14533
+3  10400 11707 1730
+3  11148 11341 13403
+3  7379 9397 8222
+3  7379 8222 14739
+3  8223 8222 9397
+3  6437 10110 10340
+3  6062 5687 6519
+3  829 14740 830
+3  14020 830 14740
+3  8881 7099 14741
+3  7099 7098 14742
+3  14741 7099 14742
+3  984 11293 7751
+3  1861 4225 13244
+3  1481 1296 14743
+3  14743 1296 13761
+3  6361 3497 5270
+3  4253 7576 7586
+3  11336 14302 4460
+3  10156 7555 13036
+3  13036 7555 11310
+3  7555 7557 11310
+3  10613 1599 14744
+3  10613 10615 1599
+3  14745 14746 14332
+3  13488 288 6492
+3  1740 6492 6645
+3  1740 13488 6492
+3  1741 6145 11339
+3  2263 2262 2571
+3  546 7188 14747
+3  546 545 7188
+3  6128 14747 6126
+3  6128 546 14747
+3  4440 7094 5788
+3  1770 3081 1771
+3  14587 12529 6090
+3  1759 6405 1760
+3  681 680 5227
+3  7627 2866 2868
+3  1197 12399 12400
+3  6578 7594 13992
+3  14663 12158 12157
+3  2054 2056 10888
+3  7803 9089 9677
+3  9087 9089 7803
+3  13745 13852 5502
+3  1315 11690 7814
+3  1315 12401 11690
+3  2198 6115 2345
+3  7855 9893 5390
+3  2897 2899 5847
+3  6796 5390 13383
+3  4452 2240 4058
+3  12366 991 993
+3  14748 14200 14202
+3  8388 5906 8389
+3  10925 7134 7133
+3  4307 14434 14437
+3  11694 10280 7019
+3  11562 3350 4167
+3  669 13636 12091
+3  8071 13123 8072
+3  11693 14749 11694
+3  14365 5141 14067
+3  5140 14067 5141
+3  2670 13731 7395
+3  14750 13926 13405
+3  2306 13827 2307
+3  14751 13827 2306
+3  10649 13377 11113
+3  11149 11189 10012
+3  11189 5542 10012
+3  10859 14752 14753
+3  10859 7726 14752
+3  13159 8397 13158
+3  8626 8625 6363
+3  7732 7982 6431
+3  2520 5825 5767
+3  14754 14156 178
+3  2846 2709 11491
+3  2846 11491 2847
+3  13973 4996 11509
+3  12832 4996 13973
+3  6047 14755 9424
+3  8664 14153 14719
+3  5710 334 5353
+3  5710 335 334
+3  13250 12498 5265
+3  4844 8750 7333
+3  2795 1924 10302
+3  8039 462 13781
+3  2456 6716 4974
+3  14756 13073 8886
+3  8885 14756 8886
+3  4568 12340 12341
+3  9585 2731 14296
+3  14296 2731 2730
+3  11579 14397 13056
+3  13530 14397 11579
+3  13173 6796 6798
+3  8359 11778 9718
+3  6203 9718 11778
+3  5611 5610 3266
+3  12727 6263 8662
+3  6459 3937 3939
+3  7629 6632 6631
+3  12727 8662 9036
+3  1184 11591 8833
+3  3609 11493 6480
+3  14391 12325 1497
+3  14136 14048 10273
+3  5205 3292 11731
+3  11732 11731 3292
+3  12472 623 9846
+3  623 12472 626
+3  12472 11639 626
+3  8010 10107 13705
+3  7503 13705 10107
+3  7500 7503 10107
+3  4089 9231 2828
+3  4089 2828 4090
+3  2828 7181 2829
+3  1127 4146 6702
+3  6805 11621 5994
+3  11624 2749 2748
+3  12845 11624 2748
+3  14757 2729 12086
+3  2144 2729 14757
+3  2273 6110 6112
+3  10834 5396 12077
+3  3751 8688 3752
+3  14758 7071 7073
+3  13742 7071 14758
+3  4558 8849 6418
+3  13866 14759 12283
+3  13866 12283 7791
+3  12597 3047 4616
+3  6205 3047 12597
+3  3049 4616 3047
+3  7048 6684 6686
+3  4781 6578 13992
+3  2697 1252 5622
+3  1524 4781 13992
+3  6242 10525 10844
+3  10844 10525 14011
+3  827 14760 12890
+3  9441 7497 7496
+3  14761 7497 9441
+3  6667 9063 14278
+3  9064 14278 9063
+3  1428 14231 737
+3  1427 14231 1428
+3  14762 1304 1496
+3  5190 11925 78
+3  7061 3750 6429
+3  725 7404 12567
+3  12449 6119 6121
+3  11687 6119 12449
+3  6319 951 950
+3  3877 1308 10667
+3  10283 4742 8180
+3  5582 10666 1616
+3  11932 14149 10361
+3  11030 14149 11932
+3  5972 5781 5973
+3  1378 12581 1379
+3  1637 12316 4849
+3  1637 12033 12316
+3  272 12421 273
+3  10691 9829 11879
+3  14339 10309 2641
+3  10309 2639 2641
+3  5845 14168 14763
+3  5099 14764 6791
+3  160 5509 161
+3  899 11668 12072
+3  13261 5899 5651
+3  10646 4694 10647
+3  9787 2060 13685
+3  9657 3981 7451
+3  9657 3978 3981
+3  551 2495 9458
+3  6804 11580 6805
+3  354 998 12297
+3  3107 12801 3105
+3  6415 12801 3107
+3  14765 11443 14588
+3  3383 4058 2240
+3  9797 6179 1942
+3  14766 14765 14767
+3  14768 14765 14766
+3  14769 13491 13492
+3  1915 14769 13492
+3  7650 5483 13454
+3  13625 8387 8386
+3  13625 8386 2412
+3  13720 10871 10873
+3  13720 10873 14062
+3  13491 14062 10873
+3  14769 14062 13491
+3  429 14062 14769
+3  7226 14770 9047
+3  9047 14770 9045
+3  6219 7629 4280
+3  14696 7426 13457
+3  14696 13457 13456
+3  14280 14771 14218
+3  14280 14772 14771
+3  6261 14773 2036
+3  6261 2036 1565
+3  11014 1526 1528
+3  11014 1528 12846
+3  9466 924 4580
+3  4422 4580 924
+3  5167 2438 5168
+3  4315 14774 3427
+3  14775 14776 5872
+3  14775 5872 8596
+3  13642 13641 14777
+3  13698 14778 14376
+3  6450 13178 570
+3  12101 13178 6450
+3  13698 606 14778
+3  10426 14637 8008
+3  10426 8008 12207
+3  4558 5639 4929
+3  12130 12851 9154
+3  13267 14779 13268
+3  14779 14451 13268
+3  1132 9781 14696
+3  1132 14696 13153
+3  6271 3061 11415
+3  6269 6271 11415
+3  1319 9286 13748
+3  9286 475 9408
+3  4301 5395 8107
+3  4301 8107 8110
+3  10430 8426 10431
+3  5619 8429 10430
+3  5619 10430 10432
+3  9778 14780 4848
+3  579 4543 577
+3  8344 3942 3931
+3  8344 8343 3942
+3  9150 329 328
+3  8706 4054 2078
+3  6026 11604 11603
+3  2258 2260 8400
+3  6024 14288 11282
+3  4904 4906 7811
+3  4183 12406 10741
+3  2299 12100 6893
+3  9468 7561 11471
+3  4043 5969 8062
+3  13536 10590 4044
+3  4934 7561 9468
+3  12753 5220 10864
+3  6332 11063 10769
+3  2461 6602 9691
+3  2461 9691 2459
+3  14781 10230 1752
+3  2958 11071 11070
+3  13521 1554 14782
+3  3022 9272 3023
+3  2239 3383 2240
+3  2239 4527 3383
+3  3833 13581 9620
+3  9724 12993 11248
+3  3843 12141 12142
+3  3842 12141 3843
+3  13204 3811 3813
+3  9766 3811 13204
+3  11305 4649 6915
+3  11305 6915 6914
+3  14783 9343 116
+3  6524 10378 10380
+3  12685 9091 3766
+3  12686 12685 3766
+3  2551 13437 11950
+3  2551 7162 13437
+3  12630 1895 764
+3  11616 5541 4097
+3  7957 7956 13504
+3  7957 13504 5874
+3  3612 14436 4276
+3  12466 8474 5587
+3  14784 14785 8521
+3  1200 14784 8521
+3  14785 14784 14786
+3  186 10288 12886
+3  12883 186 12886
+3  14784 1200 1199
+3  10785 14669 4979
+3  3818 10785 4979
+3  67 1206 6636
+3  4095 1076 5626
+3  5007 6103 1406
+3  5005 5007 1406
+3  4755 4754 8778
+3  6028 666 668
+3  8532 3295 11289
+3  983 5497 11293
+3  13615 13155 14484
+3  5882 14787 13276
+3  2531 14787 5882
+3  13752 12558 12891
+3  12117 13703 13651
+3  8229 6038 11302
+3  9003 13765 10100
+3  4299 14788 5629
+3  68 70 6034
+3  7869 7755 13673
+3  13059 3607 7845
+3  9547 14564 9548
+3  2998 6649 10922
+3  7331 2431 2430
+3  7331 10628 2431
+3  9027 6876 14699
+3  9028 9027 14699
+3  10303 6654 6713
+3  14789 11523 14790
+3  9717 8408 3169
+3  14574 13130 9026
+3  8328 5314 4841
+3  5314 9673 5315
+3  3318 10938 3319
+3  11057 10462 5314
+3  13246 4861 9761
+3  5644 10979 10512
+3  11989 4398 10962
+3  10961 11989 10962
+3  1941 12094 13131
+3  7296 13131 12094
+3  10416 2277 11029
+3  14780 6370 9668
+3  1414 14422 13497
+3  1414 1413 14422
+3  12013 1516 10664
+3  13192 8121 8120
+3  10098 14791 4711
+3  10098 13283 14791
+3  8088 6333 2167
+3  12477 10746 7579
+3  3326 4072 3327
+3  8446 7663 7662
+3  9297 7058 13733
+3  9580 14792 9958
+3  8287 4970 9616
+3  14793 10688 2842
+3  5332 13939 1182
+3  3095 14794 3096
+3  3123 8821 3242
+3  8570 14795 1716
+3  7727 8095 5413
+3  7727 13083 8095
+3  7778 4307 14437
+3  8844 9552 9382
+3  14660 14796 2361
+3  2362 2361 14796
+3  14030 14797 8325
+3  8503 13822 8504
+3  13822 12338 8504
+3  8504 12338 12339
+3  10774 12338 13822
+3  7423 6477 1177
+3  1178 1177 6477
+3  12889 11408 10413
+3  2778 10775 12887
+3  6099 11408 12889
+3  3812 3811 9766
+3  8130 14432 7387
+3  14431 7387 14432
+3  7908 2943 3242
+3  8138 902 4937
+3  9541 6976 5663
+3  14023 13449 14798
+3  12818 14798 13449
+3  12657 14799 14800
+3  4801 14598 14801
+3  4150 6956 3990
+3  14626 2018 11102
+3  14516 14039 5324
+3  14516 5324 13027
+3  2019 13554 8656
+3  1057 8656 7153
+3  2663 4035 4034
+3  14802 14803 605
+3  604 14802 605
+3  2674 14802 604
+3  10433 1929 14802
+3  1929 14803 14802
+3  1929 13216 14803
+3  14803 13216 14725
+3  14725 4857 14682
+3  14725 14682 14223
+3  14234 14144 14303
+3  14725 14223 14803
+3  1928 10299 13216
+3  1928 13216 1929
+3  14804 4615 12493
+3  9660 9659 13754
+3  4987 3132 3134
+3  4150 14475 6956
+3  4150 14474 14475
+3  14598 4508 14801
+3  4507 14801 4508
+3  4150 4149 14474
+3  4149 10161 14474
+3  14474 10161 12665
+3  9973 9975 14805
+3  10742 14805 9975
+3  10743 10742 9975
+3  13857 3629 3628
+3  12388 1783 6299
+3  7512 12388 6299
+3  13380 3629 13857
+3  10604 8645 8646
+3  13035 658 10156
+3  5018 11353 5019
+3  658 660 10156
+3  2974 10832 2972
+3  13024 658 13035
+3  13177 11851 14806
+3  13177 14806 12405
+3  12955 6702 6701
+3  1710 10143 8342
+3  5860 4863 3387
+3  3386 5860 3387
+3  362 13541 3663
+3  361 13541 362
+3  7189 545 547
+3  7189 547 12329
+3  11674 10958 10957
+3  12721 11674 10957
+3  12721 8349 11674
+3  14807 4435 3919
+3  3918 14807 3919
+3  7354 673 77
+3  3249 8817 3250
+3  2919 2921 13467
+3  1959 4988 6542
+3  1816 3695 1817
+3  10120 10119 8406
+3  7701 9916 9072
+3  2237 1065 10765
+3  11041 1959 6542
+3  7203 6118 14730
+3  7125 7203 14730
+3  8570 2896 13755
+3  1640 7326 14808
+3  13118 14809 10797
+3  12921 14809 13118
+3  11488 11487 10202
+3  6981 3999 4000
+3  7656 7093 7657
+3  11105 9689 5334
+3  5333 11105 5334
+3  836 11105 5333
+3  13201 14121 14269
+3  3902 6336 6288
+3  3901 6336 3902
+3  11631 8174 12265
+3  10113 11007 10114
+3  8596 10467 14775
+3  12801 6415 9558
+3  10786 9558 6415
+3  8924 11007 10113
+3  7705 12801 9558
+3  12801 7704 3105
+3  9902 9904 8393
+3  3839 6311 10318
+3  11332 11331 6229
+3  8846 11334 11981
+3  7086 6253 5348
+3  10416 11029 12051
+3  11834 12131 7292
+3  12178 2683 3666
+3  4668 2451 2280
+3  4668 12424 2451
+3  2278 2451 2688
+3  9662 6661 7865
+3  9049 4538 4541
+3  14810 9049 4541
+3  14810 4541 11500
+3  11499 14810 11500
+3  2902 5867 8737
+3  13153 13456 12920
+3  12919 13153 12920
+3  14139 5216 7471
+3  14139 3909 5216
+3  10287 8166 8165
+3  4859 10287 8165
+3  1410 4188 4187
+3  14811 1410 4187
+3  14351 14811 4187
+3  14812 6094 11793
+3  6158 11836 6156
+3  14813 10393 4763
+3  13506 7165 12666
+3  7676 5820 5786
+3  13608 9846 14814
+3  9130 14814 625
+3  1082 1084 490
+3  1477 1476 4337
+3  10777 10806 10778
+3  4200 14815 7722
+3  4200 7722 7721
+3  14815 2072 7722
+3  3923 2072 14815
+3  4020 14815 4200
+3  4019 14815 4020
+3  13736 8431 4881
+3  9551 11180 4893
+3  9551 12332 11180
+3  6865 11399 11281
+3  4881 8431 14328
+3  11074 13307 14816
+3  13328 244 11118
+3  11118 244 243
+3  7974 9658 14640
+3  13875 6227 13873
+3  8374 13873 6227
+3  14146 8295 8294
+3  7080 7082 7618
+3  10728 11494 2004
+3  2003 10728 2004
+3  14640 9658 14816
+3  10623 11472 13034
+3  7501 7500 11750
+3  7273 12268 12271
+3  5347 2880 7363
+3  3923 14815 4019
+3  5347 7363 5348
+3  5047 4978 9856
+3  5047 9856 9855
+3  8366 8368 9926
+3  9972 8366 9926
+3  2878 7620 10068
+3  7620 11300 10068
+3  10420 11594 8908
+3  10420 8908 10419
+3  14611 12556 5694
+3  12939 12497 223
+3  14817 12497 12939
+3  8492 14818 11879
+3  8156 9909 4966
+3  10014 6476 421
+3  5501 9207 5729
+3  988 10001 3576
+3  2897 5847 11733
+3  6096 13780 5936
+3  13512 13514 13551
+3  12989 3393 3392
+3  13427 218 14819
+3  3088 10619 3089
+3  7347 130 129
+3  7347 129 7348
+3  2975 2977 7444
+3  11002 11001 1567
+3  8293 7859 7858
+3  14611 9759 4565
+3  13200 1328 8640
+3  6856 14820 14821
+3  6856 14821 14822
+3  10099 13095 10100
+3  10100 10074 9003
+3  13937 12852 3637
+3  13095 5922 5921
+3  14713 6165 13936
+3  7760 1968 5137
+3  14823 1968 7760
+3  5604 5363 5811
+3  8064 1188 14824
+3  10434 14824 1188
+3  1186 1188 8064
+3  8835 4109 14684
+3  12332 1450 8430
+3  8430 1450 8431
+3  10768 9271 12494
+3  12494 1461 1460
+3  599 1460 14825
+3  599 14825 600
+3  600 14825 8119
+3  600 8119 4872
+3  4872 8119 8118
+3  917 916 4872
+3  11380 14826 12080
+3  7391 12080 14826
+3  7391 14826 12557
+3  12557 14826 9133
+3  13655 10814 10813
+3  4321 13655 10813
+3  11380 11379 14826
+3  11380 916 14539
+3  11448 917 11880
+3  11880 917 13590
+3  10880 14539 10547
+3  10546 9496 12236
+3  9496 10414 8696
+3  8696 10414 13947
+3  13947 10414 12052
+3  10414 10416 12052
+3  11812 12617 4438
+3  13947 12052 7961
+3  7440 7961 7441
+3  11822 5824 11932
+3  3779 7810 7440
+3  3779 11788 7810
+3  3778 11788 3779
+3  10446 11464 6754
+3  12528 14010 3855
+3  3778 1578 11788
+3  3439 6176 3440
+3  10725 11787 10723
+3  4892 14827 10291
+3  240 14827 4892
+3  14238 8461 8462
+3  6030 6029 14135
+3  6030 14135 14828
+3  11552 13404 2136
+3  14829 13404 11552
+3  1577 9727 1578
+3  9727 10723 1578
+3  7844 7978 4238
+3  12759 8416 10595
+3  14135 6029 7057
+3  11552 2136 12719
+3  8236 11552 12719
+3  8235 4628 8236
+3  14830 8462 5377
+3  240 241 14827
+3  11822 14831 6994
+3  11822 3125 14831
+3  11822 11932 3125
+3  11932 10361 3125
+3  10361 13937 3637
+3  14149 13937 10361
+3  14149 13935 13937
+3  14713 13936 13935
+3  2275 14713 13935
+3  2275 11880 14713
+3  2274 11880 2275
+3  2276 2275 13935
+3  2276 13935 14149
+3  10546 10414 9496
+3  5419 4073 11907
+3  12696 1298 14472
+3  12444 3759 5299
+3  7393 12494 7391
+3  10768 12494 7393
+3  585 2436 8215
+3  14832 8215 2436
+3  11680 7393 9250
+3  6612 2574 2576
+3  7326 13979 14808
+3  7326 4504 13979
+3  14808 13979 13980
+3  11819 5547 7136
+3  6760 12332 9551
+3  9550 9551 4893
+3  14828 13516 13518
+3  14828 13518 904
+3  13518 8327 904
+3  6030 14828 904
+3  581 5297 5245
+3  581 5245 962
+3  6740 1354 1356
+3  4895 9550 4893
+3  4312 9603 9334
+3  7286 895 4040
+3  9392 7701 9072
+3  9071 9392 9072
+3  9334 9603 11976
+3  6315 5503 170
+3  7270 13862 6548
+3  1318 9213 9212
+3  1079 1081 12733
+3  1334 1331 14833
+3  1334 14833 12737
+3  4156 7978 7977
+3  4156 7977 12912
+3  6211 8629 6208
+3  6724 6208 8629
+3  2120 2977 2976
+3  6701 2414 1913
+3  14761 14804 7499
+3  12998 7499 14804
+3  3855 3862 3974
+3  7892 7893 9805
+3  250 4509 10609
+3  2083 7163 8877
+3  12666 10640 1705
+3  12666 7165 10640
+3  11367 3998 14834
+3  3667 4998 10935
+3  3727 10004 13384
+3  857 4952 4951
+3  1069 4235 7371
+3  13587 10921 13874
+3  13587 13874 13873
+3  8428 9461 2463
+3  8623 5439 2169
+3  6559 6561 9460
+3  7327 12892 12559
+3  7954 12892 7327
+3  8228 568 567
+3  8228 567 14835
+3  8634 13838 8635
+3  3947 8635 13838
+3  2396 2395 4914
+3  3154 9426 747
+3  3153 9426 3154
+3  12962 960 8898
+3  12962 8898 10002
+3  4192 3148 9043
+3  4131 7450 8682
+3  4131 8682 4132
+3  5686 781 13893
+3  14101 3531 10235
+3  14836 13893 14161
+3  3462 14836 14161
+3  3461 14448 3462
+3  2484 3462 14448
+3  2484 14836 3462
+3  14836 5686 13893
+3  11083 11903 10432
+3  11082 11903 11083
+3  13367 232 234
+3  4021 2485 5238
+3  5238 2485 7648
+3  14837 12424 3348
+3  9890 12424 14837
+3  9890 14837 13455
+3  12528 3855 4784
+3  14838 14447 14448
+3  7139 14712 7140
+3  3461 14838 14448
+3  14839 14838 3461
+3  14839 3461 14779
+3  6186 14840 13267
+3  13267 14840 14839
+3  14840 14841 14839
+3  14841 14838 14839
+3  8961 14842 12027
+3  14842 11916 12027
+3  14842 11157 11916
+3  14092 10658 8960
+3  8960 10658 14379
+3  14842 8960 14379
+3  8960 14842 8961
+3  10385 7849 10386
+3  6655 6084 5606
+3  14843 7595 9117
+3  13120 814 13876
+3  11648 1516 12013
+3  6187 14840 6186
+3  11157 14842 14379
+3  13267 14839 14779
+3  1108 3848 14111
+3  8340 1109 1108
+3  12205 14020 14740
+3  11721 11667 14020
+3  2459 656 8915
+3  14844 2459 8915
+3  10708 12392 12391
+3  662 7953 510
+3  13471 3819 1113
+3  3574 7252 7251
+3  1330 1328 13200
+3  1330 13200 9500
+3  10609 8600 8601
+3  14798 12818 14845
+3  12820 14845 12818
+3  3710 5709 5352
+3  10656 12127 14846
+3  14846 12127 12128
+3  14846 12128 8047
+3  14847 10831 10833
+3  7390 7266 7265
+3  12306 7253 14130
+3  14129 12306 14130
+3  5157 1276 5213
+3  5059 11042 3903
+3  7441 12051 8745
+3  5011 1251 1250
+3  10410 11866 11865
+3  11867 11866 4375
+3  247 246 10011
+3  4834 10549 12879
+3  2026 2224 2027
+3  1742 8526 10411
+3  12281 2947 14253
+3  12320 8228 6397
+3  13451 853 470
+3  11713 4563 14848
+3  4562 14848 4563
+3  7535 853 14849
+3  853 7535 5563
+3  6751 7535 14849
+3  368 10276 9372
+3  9421 10549 3869
+3  903 9940 12805
+3  903 905 9940
+3  4372 4371 8298
+3  4372 8298 8297
+3  1244 5938 5940
+3  10511 12210 8781
+3  1244 5940 94
+3  2248 8156 8155
+3  9651 9652 14834
+3  1734 6974 10006
+3  1478 2197 1479
+3  10134 6342 6343
+3  12619 14368 11986
+3  12619 11986 1135
+3  14329 11595 14850
+3  13701 14329 14850
+3  10140 3817 10189
+3  10140 1664 3817
+3  6899 14722 13511
+3  1911 1913 8395
+3  1912 12955 1913
+3  1541 4031 4033
+3  5506 5508 6509
+3  14658 5032 1600
+3  14658 2044 5032
+3  13402 8244 8018
+3  14117 11803 13325
+3  14851 14852 12836
+3  3075 3074 7830
+3  3075 7830 13892
+3  3075 13892 13891
+3  8171 5402 12435
+3  11900 11446 9307
+3  8528 10992 8529
+3  6871 11847 4442
+3  11847 6872 5609
+3  6871 6872 11847
+3  13458 8260 13740
+3  13740 8260 7431
+3  13740 7431 13739
+3  7431 716 13739
+3  13737 13739 716
+3  13442 5115 13440
+3  13458 9531 8260
+3  2964 10280 8283
+3  14222 13841 386
+3  2400 12146 5782
+3  2400 5782 2398
+3  5783 12146 12781
+3  5782 12146 5783
+3  12346 12345 10749
+3  27 9425 28
+3  1793 3897 8309
+3  5349 10194 5350
+3  7359 1462 2960
+3  1547 6192 12417
+3  14735 12417 6192
+3  14302 4493 4492
+3  14302 4492 14708
+3  4492 14853 14708
+3  6040 6039 1693
+3  5131 5130 14854
+3  13386 7569 7568
+3  1693 1695 52
+3  5724 14154 11606
+3  5724 451 14154
+3  1535 7885 9447
+3  11521 10814 12070
+3  7266 4071 14698
+3  7434 7433 14193
+3  14040 7434 14193
+3  1165 6004 1166
+3  4074 6004 1165
+3  6004 6003 12300
+3  14477 3526 3528
+3  12939 11429 14817
+3  5915 11429 12939
+3  14210 6700 10509
+3  1040 3405 11099
+3  1040 1039 3405
+3  11079 10558 11077
+3  14855 8854 2611
+3  2613 14855 2611
+3  14764 6789 6791
+3  13954 3878 3877
+3  816 12407 12000
+3  6833 5930 5020
+3  7474 10263 8573
+3  304 11373 11372
+3  5012 5375 3824
+3  409 7146 410
+3  409 11409 7146
+3  14856 14857 13493
+3  14856 13493 14858
+3  5340 3633 5341
+3  9863 6348 6349
+3  3912 2823 12575
+3  12575 2823 827
+3  13789 14338 11116
+3  13790 13789 11116
+3  354 3146 355
+3  6310 3145 3146
+3  2902 2901 3567
+3  2902 3567 1542
+3  13923 13922 14859
+3  13723 4314 8737
+3  14114 14548 13022
+3  14566 14548 14114
+3  14547 14548 14566
+3  9979 4923 3585
+3  9979 3585 6424
+3  5199 10610 13172
+3  8346 5199 5868
+3  14450 8346 5868
+3  14858 13493 11161
+3  14858 11161 11163
+3  8346 5197 5199
+3  10907 5963 5962
+3  14860 14225 7333
+3  8751 14860 7333
+3  8207 10053 9554
+3  10154 2354 6991
+3  8932 4967 8933
+3  3622 3621 13164
+3  11096 14478 5634
+3  9675 1423 1422
+3  14861 12456 9033
+3  8387 13625 12607
+3  14756 2875 13265
+3  14756 14861 2875
+3  2875 2877 13265
+3  2875 14861 9233
+3  4991 4989 1415
+3  13026 9988 4989
+3  1415 4989 9988
+3  10869 676 9613
+3  9612 10869 9613
+3  5325 7715 9988
+3  10954 4212 10317
+3  13273 10317 4212
+3  6470 7955 7957
+3  6471 6470 7957
+3  1539 9889 8974
+3  1539 8974 1540
+3  4392 11938 1059
+3  11938 1060 1059
+3  4806 2398 1060
+3  4806 1060 11938
+3  14862 4140 1730
+3  11707 14862 1730
+3  2336 7979 2333
+3  4212 13753 4213
+3  1360 1362 2619
+3  1360 2619 2618
+3  6799 12023 6800
+3  6800 9449 5317
+3  11141 12416 11142
+3  13811 10417 5821
+3  13811 5821 14863
+3  3941 374 4690
+3  3940 374 3941
+3  1696 6899 6898
+3  9449 6800 9684
+3  11398 4961 8589
+3  14797 4904 7811
+3  13686 217 219
+3  14864 14865 521
+3  521 14865 5697
+3  11006 4562 10912
+3  11006 12888 4562
+3  14795 46 48
+3  14795 48 1716
+3  14841 3953 14838
+3  2361 2363 9386
+3  2361 9386 9388
+3  4603 7979 2336
+3  648 650 8993
+3  14866 9613 12317
+3  12459 2067 11663
+3  12459 11663 14480
+3  10682 11663 10680
+3  10682 14480 11663
+3  1435 677 10869
+3  7573 7575 14867
+3  13890 7573 14867
+3  14619 3879 6475
+3  14619 3880 3879
+3  13322 12351 14868
+3  14869 14870 12418
+3  14871 6258 14511
+3  1087 13938 1085
+3  2619 1362 3279
+3  1215 13570 13569
+3  13199 13200 8640
+3  14872 13152 10307
+3  4062 14217 14216
+3  3336 10379 14141
+3  4429 12594 4430
+3  7562 13612 4429
+3  2510 14667 13929
+3  2510 13929 2508
+3  2638 13952 5340
+3  6054 6053 10524
+3  6054 10524 1288
+3  14873 7953 1787
+3  12138 7953 14873
+3  7562 4429 6627
+3  9261 14686 13724
+3  2963 1319 2961
+3  2961 3983 2962
+3  10934 3665 3667
+3  12265 12264 5122
+3  8648 4017 8647
+3  475 4017 8648
+3  5122 12267 5123
+3  12264 12267 5122
+3  1701 4278 3115
+3  4278 3116 3115
+3  13378 4205 4204
+3  166 506 5278
+3  12206 507 506
+3  12206 506 165
+3  166 165 506
+3  3254 3015 1719
+3  3013 11506 1720
+3  14874 11922 11923
+3  13219 14874 11923
+3  14666 14875 9728
+3  4158 4160 8600
+3  13240 4205 1539
+3  13240 1539 4033
+3  4033 1539 1541
+3  4205 13378 1539
+3  6490 6489 8246
+3  9572 2577 4528
+3  4528 2577 9986
+3  2343 2342 3638
+3  7799 7800 13557
+3  14542 7799 13557
+3  5935 9962 10887
+3  10887 9962 14072
+3  5935 6884 9962
+3  5935 9987 6884
+3  13007 11177 13008
+3  8816 7470 6934
+3  12690 6530 7922
+3  6530 4481 7922
+3  8437 12690 7922
+3  8816 12690 8437
+3  5543 6198 6576
+3  1760 11205 12648
+3  14876 4479 11087
+3  11444 1605 1604
+3  11444 12688 1605
+3  3128 11256 11167
+3  13006 10887 13007
+3  13007 10887 14072
+3  13007 14072 11177
+3  5637 8530 8531
+3  5637 8531 5638
+3  2091 9162 12771
+3  2909 2786 2788
+3  7994 14119 595
+3  7994 7993 14119
+3  9355 14877 14345
+3  9355 14345 11804
+3  7841 2621 9374
+3  7841 6108 2621
+3  6420 13508 8356
+3  6420 14689 13508
+3  14689 12465 9190
+3  14878 11912 9955
+3  14154 451 14097
+3  6968 6969 12500
+3  9015 4816 12113
+3  10754 7371 4235
+3  9689 2803 13406
+3  9689 2804 2803
+3  10754 4235 13540
+3  9689 13406 5334
+3  14786 14784 1199
+3  7916 12744 9094
+3  9105 4872 916
+3  11380 9105 916
+3  3884 7271 4652
+3  3884 4652 3885
+3  10005 10006 7182
+3  367 14879 2458
+3  13946 7462 2273
+3  12709 5636 7218
+3  12555 7218 5636
+3  5221 5220 12753
+3  9969 11869 13311
+3  12871 9969 13311
+3  14136 10273 4818
+3  13723 14136 4315
+3  14038 8162 7051
+3  14038 8163 8162
+3  11374 12292 14880
+3  6585 10916 12609
+3  10489 10491 4776
+3  4778 10489 4776
+3  8135 5379 14881
+3  8135 14881 3629
+3  8134 5379 8135
+3  8997 5836 14882
+3  7199 5836 8997
+3  7621 14697 1314
+3  4050 4052 7621
+3  11883 5189 8931
+3  8932 5189 5191
+3  8931 5189 8932
+3  14362 826 4602
+3  14883 1651 14387
+3  14648 14883 14387
+3  1569 14648 14387
+3  1569 1568 14648
+3  826 825 4602
+3  9325 7099 8881
+3  7097 14884 8242
+3  14884 7783 8242
+3  11635 8473 8472
+3  8242 13419 13804
+3  14885 7783 14884
+3  7783 14885 9406
+3  14885 14882 9406
+3  9406 14882 761
+3  14885 8997 14882
+3  14885 8609 8997
+3  8268 7337 7339
+3  7085 3314 13599
+3  3314 7085 341
+3  4311 10178 9603
+3  5874 10178 4311
+3  4832 13967 3652
+3  14749 8284 11694
+3  1899 10017 5356
+3  1897 1899 5356
+3  979 2025 980
+3  7689 6405 1759
+3  507 14886 4763
+3  12622 12621 12947
+3  3960 14687 3961
+3  750 14887 7156
+3  8014 340 342
+3  8014 13733 340
+3  14683 14888 14889
+3  12142 14888 14683
+3  4079 12142 14683
+3  7662 14687 3960
+3  9604 8103 2431
+3  10628 9604 2431
+3  6401 6400 6487
+3  4428 12348 4426
+3  1454 8979 12348
+3  4271 743 9097
+3  4272 4271 9097
+3  14335 13298 11782
+3  4427 12543 4428
+3  12542 12543 4427
+3  4428 12543 13215
+3  8175 11888 8176
+3  3742 3493 138
+3  7010 4640 14019
+3  4910 784 783
+3  9428 7131 7132
+3  9062 5376 12652
+3  2139 12652 5376
+3  11502 6347 6346
+3  11502 6346 13607
+3  13559 13104 14024
+3  13762 13281 107
+3  13547 6502 6501
+3  11650 14890 11652
+3  3285 3287 9852
+3  11143 7517 9239
+3  11143 7515 7517
+3  14891 4116 4115
+3  11489 4116 14891
+3  14069 10257 14327
+3  6088 4381 8169
+3  4381 8287 8169
+3  10669 14318 13242
+3  13667 14496 12291
+3  13667 12291 12602
+3  10835 5354 12025
+3  9732 11263 11265
+3  2165 3280 4462
+3  4384 3929 13501
+3  9604 9968 9605
+3  9604 10628 9968
+3  4118 2104 2103
+3  4348 2104 4118
+3  5025 10795 13983
+3  7082 7988 7618
+3  6711 2766 4830
+3  7834 2090 9706
+3  7835 7834 9706
+3  4364 14892 11835
+3  4364 11835 11642
+3  3472 10566 6905
+3  13148 8435 2353
+3  5511 8436 9490
+3  8435 9490 8436
+3  9494 956 13411
+3  2911 1358 6905
+3  1474 9448 3882
+3  9723 12993 9724
+3  6361 2837 8639
+3  11819 12631 14893
+3  14894 2712 8591
+3  14894 8591 12151
+3  2712 2711 8591
+3  7838 8398 14625
+3  7635 10672 9133
+3  4035 9803 4036
+3  4035 914 9803
+3  12737 12736 14624
+3  3540 9189 10778
+3  1334 14624 6842
+3  3493 10022 2141
+3  2894 1716 1718
+3  2894 1718 7839
+3  14810 11499 6126
+3  14810 6126 14747
+3  11499 12509 6126
+3  1159 6348 14895
+3  11499 12508 12509
+3  9049 14747 7188
+3  14810 14747 9049
+3  10727 2042 2044
+3  6544 8695 11618
+3  8192 8190 14896
+3  4093 10541 11153
+3  14105 4093 11153
+3  3001 3003 11384
+3  14057 697 700
+3  7439 8711 7077
+3  8862 8864 14250
+3  11727 7628 9380
+3  6313 7868 14255
+3  11727 3529 7628
+3  10102 9845 11786
+3  14897 11601 11649
+3  2442 14086 10973
+3  3786 3788 12522
+3  3786 12522 12521
+3  7722 2071 7723
+3  7723 2071 3696
+3  1664 1663 10785
+3  14426 14451 7135
+3  274 273 1938
+3  3948 7465 5337
+3  3948 5337 8048
+3  9495 2311 2310
+3  6686 6685 10712
+3  10567 10569 10057
+3  10125 10557 12915
+3  330 329 12531
+3  12377 10087 7356
+3  14898 8607 6167
+3  9903 9902 2213
+3  13025 11240 11242
+3  14586 11482 14175
+3  119 14586 14175
+3  7114 770 772
+3  6089 7114 772
+3  1434 7360 1435
+3  6375 10530 13524
+3  6375 13524 14899
+3  7328 7994 7329
+3  7994 595 7329
+3  7329 595 597
+3  14654 2760 2759
+3  6281 6280 3670
+3  9825 1282 14732
+3  1281 14732 1282
+3  5447 10641 7281
+3  10641 14900 7281
+3  5228 8602 5192
+3  5228 680 8602
+3  11651 4536 4535
+3  4588 4590 4573
+3  13029 3632 3631
+3  14172 3632 12318
+3  9630 5938 13464
+3  14901 5342 14902
+3  12216 14902 5342
+3  12216 10438 14902
+3  14902 10438 10437
+3  775 2402 2401
+3  13530 11545 14903
+3  13530 14903 11656
+3  13530 11656 14397
+3  12812 5014 5013
+3  12812 3450 5014
+3  12339 3976 9869
+3  9869 3976 2746
+3  12339 10540 3976
+3  9330 14901 14902
+3  9330 14902 10437
+3  3632 13029 3227
+3  7661 5176 5173
+3  7661 7660 5176
+3  5869 13723 8737
+3  11098 5355 5357
+3  11099 11098 5357
+3  11099 5357 1040
+3  14904 4122 8216
+3  10725 12738 14905
+3  8113 13845 11941
+3  12627 8669 14906
+3  2193 12627 14906
+3  12058 11984 11523
+3  3472 12644 10566
+3  2264 2266 3429
+3  6035 12644 3472
+3  6035 14113 12644
+3  12572 8024 6505
+3  971 9401 13196
+3  14441 13925 8670
+3  8182 6664 14730
+3  4794 439 438
+3  5361 12407 12409
+3  5359 5361 12409
+3  5556 14460 5557
+3  11212 12864 8805
+3  6118 8182 14730
+3  8455 7915 7914
+3  3464 9995 11236
+3  13713 11236 9995
+3  12692 8247 8248
+3  13915 10855 10857
+3  11497 13304 1376
+3  3183 10636 13415
+3  12369 909 911
+3  5805 5806 12321
+3  1717 1716 48
+3  8272 3602 3601
+3  8272 5195 3602
+3  10122 10124 236
+3  235 10122 236
+3  8233 5798 7868
+3  9741 12932 11886
+3  3531 14101 14424
+3  14907 1026 1028
+3  9055 7082 7081
+3  9055 8868 7082
+3  13185 5678 14908
+3  14908 8667 13185
+3  3694 13203 3802
+3  10653 14909 9197
+3  5803 1785 5804
+3  1786 1785 5803
+3  2178 6635 2181
+3  14222 6635 2178
+3  7883 11752 10494
+3  10494 9185 7510
+3  1004 700 699
+3  1004 699 8241
+3  5826 1041 7983
+3  9483 7983 1041
+3  11364 10342 11365
+3  9631 6049 9083
+3  6856 14692 729
+3  728 6856 729
+3  13399 2511 2513
+3  3997 2511 13399
+3  11061 11489 14910
+3  14891 14910 11489
+3  7978 4156 1359
+3  574 4832 6485
+3  7341 7340 8159
+3  6693 8160 10854
+3  8313 14454 13419
+3  13804 13419 14454
+3  11069 1192 11067
+3  8313 13841 14454
+3  12449 6121 7676
+3  7676 14411 3328
+3  6121 14411 7676
+3  7844 4238 4237
+3  2497 7342 5810
+3  5867 14557 5868
+3  14450 5868 14557
+3  9131 9132 14911
+3  14557 5867 1542
+3  13194 14261 14912
+3  12597 14912 14261
+3  9922 13063 14071
+3  9922 14071 9923
+3  4079 14330 14329
+3  4079 14329 3841
+3  1253 14913 1254
+3  12235 14913 1253
+3  3600 3599 12569
+3  14520 14914 14877
+3  14520 8152 14914
+3  13357 9722 11354
+3  14330 11596 11595
+3  13107 6239 4055
+3  13107 4055 4056
+3  13018 1039 1038
+3  10821 3934 12262
+3  9060 5364 4903
+3  13375 4067 8496
+3  5072 14915 1162
+3  10905 12988 14915
+3  10905 14915 5072
+3  5226 1671 3583
+3  5226 1669 1671
+3  14324 14916 14321
+3  8539 14916 14324
+3  14326 9260 14069
+3  14326 14069 14327
+3  3623 14917 13841
+3  4002 2642 4003
+3  10002 4003 2642
+3  1123 1994 9379
+3  13579 8332 13269
+3  6157 5182 5183
+3  10794 4516 4515
+3  8528 4516 10794
+3  3023 11566 1401
+3  14918 2994 14677
+3  2992 14918 427
+3  2994 14918 2992
+3  13718 14918 14677
+3  428 427 14918
+3  428 14918 13718
+3  8623 8275 2176
+3  2884 9839 4962
+3  2884 392 9839
+3  11300 14919 12273
+3  12698 112 111
+3  9402 12698 111
+3  14920 5507 9516
+3  4259 4261 11701
+3  7995 4259 11701
+3  1214 14864 11743
+3  6302 8081 6303
+3  7769 7771 1859
+3  121 120 5697
+3  121 5697 14865
+3  4262 4259 13115
+3  12279 9173 11255
+3  13534 9346 3046
+3  6408 11944 11943
+3  11157 14380 11158
+3  14380 10231 11158
+3  10281 13527 12082
+3  10029 9391 13279
+3  5592 7234 5593
+3  7234 10302 10301
+3  14921 9841 8057
+3  14922 8057 9841
+3  5426 10779 3098
+3  1976 13527 1974
+3  6352 12683 9965
+3  2094 6860 7958
+3  4793 14923 11967
+3  6923 14923 4793
+3  14923 11965 11967
+3  14923 6925 11965
+3  14923 6923 6925
+3  13504 7956 12032
+3  13504 10178 5874
+3  7444 7443 6297
+3  9090 9657 7451
+3  14924 6886 4891
+3  14404 3088 14925
+3  8592 8590 12681
+3  13346 12331 14926
+3  13346 14926 14263
+3  4797 11978 4798
+3  5607 14106 14927
+3  14927 14106 8472
+3  14927 8472 12124
+3  13715 6437 1035
+3  12695 5587 8473
+3  11283 14927 12124
+3  5608 14927 11283
+3  14787 11535 4346
+3  14787 4346 12294
+3  5607 14927 5608
+3  9880 11884 9952
+3  10533 12681 10531
+3  2373 11884 9880
+3  4890 14924 4891
+3  4699 12683 12682
+3  10650 10315 11737
+3  14072 9962 224
+3  14072 224 13075
+3  13075 224 226
+3  7410 8011 10314
+3  1808 3220 4219
+3  7393 7392 9250
+3  14928 11015 4619
+3  10063 11015 14928
+3  3391 3393 8376
+3  3391 8376 5064
+3  14006 2735 14068
+3  11251 11250 6845
+3  11250 14929 6845
+3  14929 8375 1459
+3  6845 14929 1459
+3  8376 8375 14929
+3  8376 14929 11250
+3  12814 849 10072
+3  8375 3393 13381
+3  1948 1947 13638
+3  1948 13638 4007
+3  10490 4931 12309
+3  4930 12309 4931
+3  7303 8226 14015
+3  7303 14015 6475
+3  3686 8432 8314
+3  12436 11871 11870
+3  12436 12435 11871
+3  13449 14023 14022
+3  8529 10645 7107
+3  14930 8030 12746
+3  10883 14930 12746
+3  7425 9875 4363
+3  6217 1607 11811
+3  10892 12304 1975
+3  1976 1975 12304
+3  3105 14931 3106
+3  14932 14931 3105
+3  4960 7910 6811
+3  4960 708 7910
+3  7704 14933 14932
+3  7704 14932 3105
+3  13740 13738 14934
+3  13458 13740 14934
+3  6859 6858 9762
+3  13581 11982 9620
+3  3386 1170 12060
+3  11911 12060 1170
+3  3398 13797 3180
+3  10798 3180 13797
+3  2650 2649 6335
+3  8455 7151 9079
+3  14935 1867 1868
+3  5002 14935 1868
+3  10597 13755 10598
+3  14644 13442 14936
+3  12267 14936 13442
+3  12267 12266 14936
+3  12266 3335 14936
+3  14936 3335 3337
+3  14644 14936 3337
+3  8950 11282 14288
+3  7843 11911 1172
+3  1170 1172 11911
+3  7993 11733 14119
+3  12572 4360 5321
+3  5321 4360 12934
+3  12934 4360 12266
+3  4360 3335 12266
+3  12266 12265 12934
+3  11733 11734 14119
+3  1870 3709 3708
+3  10906 1613 8240
+3  8002 8001 8
+3  7 8002 8
+3  14937 14170 1055
+3  14912 12597 14937
+3  1055 14912 14937
+3  9440 14937 12597
+3  2799 1923 11054
+3  6023 9771 2833
+3  6417 11870 6213
+3  11378 160 159
+3  10773 5256 14618
+3  10773 14618 7886
+3  5678 2601 14908
+3  2600 14908 2601
+3  14938 11141 8573
+3  14298 11141 14938
+3  9153 9155 10994
+3  14753 320 10859
+3  14171 320 14753
+3  14075 14171 14753
+3  8650 4062 14216
+3  559 149 689
+3  8304 4124 12703
+3  14939 14940 11315
+3  10371 5561 10591
+3  1594 5561 10371
+3  5562 5561 1594
+3  3041 1594 10371
+3  3671 10591 3672
+3  714 14941 14942
+3  714 713 14941
+3  7222 14941 7223
+3  5876 10123 12635
+3  4763 14886 8551
+3  9445 7044 7572
+3  1002 12238 1000
+3  8449 14886 12206
+3  14886 507 12206
+3  13355 12772 13522
+3  13355 13522 3627
+3  13669 3551 12825
+3  13433 13669 12825
+3  13705 13058 8011
+3  13705 8011 8010
+3  11023 8456 5709
+3  5299 13579 13269
+3  14943 13105 13106
+3  14459 14943 13106
+3  1419 1418 12942
+3  13506 3587 7166
+3  4878 12942 7998
+3  4878 1419 12942
+3  3907 6109 5217
+3  3909 3907 5217
+3  5717 4983 4985
+3  3588 1930 10433
+3  7166 7165 13506
+3  14944 9595 12666
+3  2673 3588 10433
+3  3971 4564 3972
+3  3971 14945 4564
+3  14945 14611 4564
+3  13264 4972 7894
+3  5805 12636 10094
+3  12150 14946 14894
+3  12151 12150 14894
+3  5692 14947 3580
+3  14946 14947 5692
+3  3580 14947 14945
+3  14947 14611 14945
+3  12150 14611 14947
+3  12150 14947 14946
+3  14948 3580 14945
+3  14949 14948 14945
+3  3971 14949 14945
+3  9629 8989 10808
+3  12023 14949 9686
+3  2696 1883 14950
+3  9683 732 9684
+3  10956 14754 178
+3  2429 4247 2427
+3  9683 11974 3754
+3  6799 14951 12023
+3  12023 14951 14948
+3  14952 8804 14638
+3  12701 14638 8804
+3  3580 3582 5692
+3  10975 14900 14127
+3  5052 9253 12908
+3  13284 8241 8240
+3  13284 8240 1615
+3  4673 14499 2308
+3  2324 14953 10115
+3  14953 14951 10115
+3  7187 8804 14952
+3  2324 14954 14953
+3  1846 5692 4322
+3  14946 5692 1846
+3  1846 1845 14894
+3  1846 14894 14946
+3  14949 12023 14948
+3  5138 11420 14955
+3  5284 6176 3439
+3  3908 3017 5055
+3  3908 5055 5054
+3  8599 7369 10151
+3  3738 3737 3829
+3  9684 6800 9686
+3  12765 14956 12766
+3  12765 14957 14956
+3  14957 12088 14956
+3  6 14958 3190
+3  4302 12088 14957
+3  4302 12086 12088
+3  280 7454 3748
+3  13281 8805 14428
+3  9930 14645 9931
+3  7417 11962 7949
+3  10412 6752 12618
+3  10412 12618 11132
+3  6044 4131 7025
+3  7986 8797 963
+3  10652 11529 1986
+3  11961 9409 9411
+3  10652 898 11529
+3  2789 8245 2790
+3  2090 7837 9761
+3  1707 4038 4037
+3  4439 9229 9228
+3  13387 7568 11571
+3  10601 11078 8070
+3  2098 8632 2099
+3  2362 5003 2363
+3  11515 8709 8708
+3  5855 2367 2366
+3  3160 12483 3158
+3  3158 12483 11361
+3  12093 11361 12483
+3  11222 14001 13279
+3  119 118 3307
+3  119 3307 14586
+3  410 7146 7145
+3  14914 8152 14559
+3  8151 14559 8152
+3  14709 12180 12181
+3  1868 25 8485
+3  786 7429 787
+3  1511 12847 701
+3  417 416 2145
+3  14185 14187 9499
+3  9497 9499 14187
+3  3221 3696 12953
+3  6967 1389 1388
+3  12501 7231 12231
+3  13862 12361 12372
+3  7127 14618 5256
+3  7128 7127 5256
+3  7574 10458 7575
+3  14959 13684 14960
+3  1409 1411 2802
+3  761 14882 5835
+3  5835 14882 5836
+3  8299 6768 6770
+3  3630 3629 1842
+3  5285 13485 1501
+3  14186 13918 14961
+3  14486 7725 13150
+3  12706 12707 14962
+3  127 1674 14963
+3  14964 5094 5093
+3  1400 8381 2781
+3  7120 966 515
+3  967 966 7120
+3  3938 5280 3939
+3  11577 7435 9204
+3  7436 7435 11577
+3  1856 1855 14965
+3  1856 14965 4901
+3  3206 11870 11872
+3  12269 10261 3814
+3  2409 2408 13334
+3  5430 6364 5431
+3  12465 12124 12466
+3  6002 14436 3612
+3  12466 5587 9190
+3  1493 13752 12891
+3  6279 1493 12891
+3  1493 1491 13752
+3  11383 85 5981
+3  10730 3309 2699
+3  10730 10099 6280
+3  12038 10553 11220
+3  12038 10552 10553
+3  5987 12755 9981
+3  5987 9981 5986
+3  12756 9980 9981
+3  12756 9981 12755
+3  13774 14663 12157
+3  13774 10872 14663
+3  984 983 11293
+3  2774 984 7751
+3  7164 10641 7165
+3  1387 13767 12639
+3  1387 12639 12843
+3  3433 8845 12049
+3  14048 10610 12562
+3  14048 13723 13172
+3  12896 14966 5290
+3  9827 6855 9076
+3  2555 2915 1890
+3  2554 11295 2915
+3  2554 2915 2555
+3  10080 14967 5657
+3  14608 11537 11857
+3  10931 10024 10026
+3  11507 10931 10026
+3  7566 7565 10528
+3  6111 7566 10528
+3  14937 13717 14968
+3  14170 14937 14968
+3  14774 4818 3429
+3  14489 14395 14969
+3  12036 14489 14969
+3  12036 14969 807
+3  9874 8285 5040
+3  8734 6844 6795
+3  6843 6795 6844
+3  6843 10654 6795
+3  5050 5052 12908
+3  12119 13711 12120
+3  10589 10313 12776
+3  10589 12776 13872
+3  14970 5500 14971
+3  1522 82 1153
+3  13707 1522 1153
+3  1522 13707 5326
+3  8026 3286 7476
+3  4770 3695 8439
+3  11699 10782 4241
+3  11699 2349 10782
+3  13768 3829 2592
+3  12275 13289 12276
+3  5278 508 9107
+3  7765 14486 3231
+3  8920 14486 13150
+3  3231 14486 8920
+3  8920 13150 8921
+3  5234 2689 2688
+3  13015 12405 14806
+3  13015 12404 12405
+3  9316 9959 14334
+3  9316 14334 9317
+3  6094 172 11793
+3  3462 14161 3460
+3  4944 11726 2030
+3  9349 11726 4944
+3  14972 12592 11023
+3  10898 11926 12510
+3  8331 4184 4186
+3  8331 10721 4184
+3  6060 1006 913
+3  13179 5839 8906
+3  1769 4285 4284
+3  811 813 11591
+3  4927 12837 4928
+3  12199 12837 4927
+3  14973 365 364
+3  7946 7807 4183
+3  9068 10989 7513
+3  2978 7513 10989
+3  7512 7513 2978
+3  14974 12839 9870
+3  3735 12839 14974
+3  8598 1390 5627
+3  5295 10884 10545
+3  5295 10545 5296
+3  699 698 8241
+3  7325 10884 10883
+3  7325 8259 10884
+3  9791 9790 7526
+3  11563 5332 1182
+3  13825 8517 1072
+3  6777 8836 8838
+3  5162 12762 14585
+3  13825 1072 14585
+3  12762 13825 14585
+3  132 7907 5723
+3  8020 2957 2956
+3  3762 6763 14975
+3  2566 6488 2567
+3  8262 7969 14976
+3  1736 10909 14977
+3  10909 14605 14977
+3  8021 8020 2956
+3  14977 14605 11728
+3  4300 4299 9375
+3  11682 2700 4659
+3  5410 12576 14978
+3  12371 10731 12637
+3  10731 12371 10733
+3  13287 4437 4962
+3  9745 12422 10548
+3  9745 14029 12422
+3  829 11284 1369
+3  12422 2150 10548
+3  8190 14910 14896
+3  8190 14491 14910
+3  14896 14910 14891
+3  4832 3653 6485
+3  14970 14105 5500
+3  14970 4093 14105
+3  8190 8189 14491
+3  8189 5659 14491
+3  4829 14944 12665
+3  3235 3234 9882
+3  14522 14544 14524
+3  12369 911 5120
+3  5120 911 4779
+3  6145 1741 13373
+3  10767 10768 14158
+3  6146 6145 13373
+3  11174 10392 13448
+3  10391 13448 10392
+3  13340 14979 4039
+3  14730 6664 6493
+3  50 7735 14979
+3  1695 7735 50
+3  13283 13976 14791
+3  611 14791 13976
+3  5324 14980 11924
+3  13331 11074 14816
+3  13331 14816 9658
+3  551 9458 552
+3  13156 11831 12796
+3  5480 10248 13584
+3  61 6489 7241
+3  13714 10745 5792
+3  13714 7488 10745
+3  12442 11912 14878
+3  12699 12442 14878
+3  14898 6167 14866
+3  7436 11577 14394
+3  13518 9877 8327
+3  12973 5282 550
+3  13517 14981 9877
+3  7143 9558 7144
+3  13845 11942 11941
+3  8113 11941 13319
+3  9874 11466 9872
+3  10293 14982 14364
+3  10528 10529 11590
+3  3810 3812 9604
+3  3812 8103 9604
+3  12568 12754 12749
+3  5432 6636 1621
+3  11877 5916 7036
+3  11987 13950 4257
+3  5036 10684 5037
+3  14983 3211 10932
+3  8891 8586 6588
+3  7833 8586 8891
+3  3533 10281 12082
+3  12300 10989 14355
+3  9068 14355 10989
+3  14984 3150 11508
+3  14984 11508 4099
+3  13045 557 13043
+3  9848 6370 6372
+3  12081 14971 7466
+3  14208 11799 3304
+3  8375 10165 1459
+3  13381 10165 8375
+3  13381 10166 10165
+3  194 2433 12165
+3  194 12165 195
+3  11805 8172 13053
+3  9350 9181 1399
+3  9181 12615 1399
+3  7995 5573 13115
+3  7995 13115 4259
+3  1381 1383 10606
+3  6499 8023 99
+3  13403 14191 6353
+3  11148 13403 6353
+3  11148 6353 2928
+3  12854 4340 3643
+3  10875 13324 199
+3  13237 2957 4595
+3  2957 11325 4595
+3  14315 14317 13961
+3  14576 13961 14317
+3  12437 6256 11531
+3  14985 3657 6539
+3  14986 3657 14985
+3  11919 14985 6539
+3  11919 6539 5408
+3  4687 13943 4688
+3  4688 13943 9713
+3  13487 11339 12554
+3  1242 6443 12110
+3  1242 12110 9373
+3  744 2972 8216
+3  14987 7066 14988
+3  2856 14987 14988
+3  1163 7398 1687
+3  14989 9961 9960
+3  14989 13851 9961
+3  4308 4310 14162
+3  4308 14162 5091
+3  14162 14382 5091
+3  3931 3941 3932
+3  6770 3506 10461
+3  12194 4836 1627
+3  2102 4982 6715
+3  13084 11206 1010
+3  1620 12850 589
+3  5310 12850 1620
+3  7787 9694 13943
+3  11712 476 9849
+3  8106 397 5110
+3  2158 6501 3681
+3  2158 13547 6501
+3  14421 11679 11335
+3  11335 11679 14240
+3  14990 6873 6875
+3  7389 14426 12670
+3  3867 13030 13029
+3  13714 5791 9479
+3  8028 13392 8621
+3  13029 3631 3867
+3  8989 4024 8211
+3  14527 5866 14991
+3  3493 10023 10022
+3  753 755 2625
+3  9126 11542 11541
+3  2690 9126 5775
+3  2690 11542 9126
+3  13895 11542 2690
+3  2690 2602 13895
+3  5774 9126 11541
+3  5774 11541 14339
+3  5774 14339 2641
+3  371 2807 373
+3  574 6485 575
+3  4042 6821 373
+3  3176 4757 3177
+3  4475 14992 7612
+3  3267 3268 1301
+3  14525 13574 14526
+3  4165 13680 5096
+3  11602 12404 11623
+3  11567 8651 6797
+3  7579 2394 2393
+3  14316 3275 12579
+3  14316 12579 14317
+3  10907 12193 5963
+3  7578 12477 7579
+3  13271 12505 9953
+3  13271 12504 12505
+3  10549 4834 10550
+3  3864 14938 10263
+3  12307 1532 12097
+3  12307 1533 1532
+3  9266 13407 13867
+3  10059 13867 13407
+3  227 201 131
+3  7757 5845 14763
+3  3373 2645 9412
+3  3027 7849 10385
+3  8494 13218 8495
+3  6581 2950 6064
+3  376 2410 14993
+3  6510 11014 12841
+3  1103 14473 1104
+3  6864 9564 7506
+3  9564 992 7506
+3  10563 4608 11672
+3  5977 5979 12831
+3  13300 5977 12831
+3  7278 5168 5534
+3  3377 7478 5731
+3  12224 2838 2840
+3  6650 14367 2019
+3  13555 14367 13556
+3  11958 5947 5949
+3  14675 1925 1927
+3  14994 4911 8756
+3  14994 12729 4911
+3  12729 5918 4911
+3  5918 4910 4911
+3  5918 11483 4910
+3  5918 5919 11483
+3  6131 14264 4194
+3  14994 8756 10195
+3  9900 9780 11107
+3  9094 13409 1690
+3  3416 5221 3413
+3  805 807 14969
+3  9810 805 14969
+3  10813 9544 870
+3  4321 10813 870
+3  6342 1103 6341
+3  14473 1103 6342
+3  14995 14996 14997
+3  14592 14996 14995
+3  14592 14956 14996
+3  14591 14956 14592
+3  9810 14969 14395
+3  10945 2540 10986
+3  9242 10986 2540
+3  12841 11014 12846
+3  10984 2185 2184
+3  447 6092 4810
+3  11912 4368 9956
+3  5125 14998 7275
+3  4047 11329 1502
+3  13653 11329 4047
+3  874 876 3118
+3  13174 2395 8826
+3  7478 9644 5731
+3  14660 14999 15000
+3  14660 15000 14796
+3  6574 4652 4649
+3  6574 6527 4652
+3  4649 4651 6915
+3  4361 2987 11859
+3  2986 3331 11859
+3  2987 2986 11859
+3  8353 12030 12478
+3  12778 14005 8680
+3  12780 14005 12778
+3  12780 11251 6846
+3  6845 6846 11251
+3  12780 6846 14005
+3  11821 7452 3981
+3  3980 11821 3981
+3  3980 8937 11821
+3  3765 3767 8823
+3  8154 8106 344
+3  8106 5110 344
+3  5111 344 5110
+3  2463 6561 469
+3  467 469 6561
+3  9172 10007 10486
+3  3311 204 10997
+3  12605 11509 4995
+3  4210 2915 11295
+3  4210 11295 2627
+3  12710 9081 4498
+3  1091 2287 2286
+3  12608 9956 9148
+3  12063 13594 14370
+3  10789 13296 2449
+3  8728 13441 10822
+3  10453 7203 7124
+3  13539 12480 4984
+3  14613 14612 6254
+3  5615 14613 6254
+3  9958 8021 5772
+3  7805 7807 7946
+3  15001 13727 3946
+3  15001 3946 15002
+3  11572 4461 15003
+3  4459 4461 11572
+3  4459 11572 13636
+3  11572 11574 13636
+3  5982 9495 2310
+3  13662 7580 6676
+3  7926 9225 14236
+3  14236 9225 6594
+3  13256 8951 5892
+3  12053 1583 1582
+3  7813 14989 10214
+3  1313 7813 10214
+3  6421 2561 2560
+3  11583 9589 11748
+3  9030 15004 6653
+3  7825 7827 943
+3  7827 12986 943
+3  7827 8582 12986
+3  10663 13098 12697
+3  12697 13098 1313
+3  13098 1314 1313
+3  12895 1764 1763
+3  5075 5891 14364
+3  14982 5075 14364
+3  4515 6758 10795
+3  8178 6456 8179
+3  10709 10710 11288
+3  10709 11288 13254
+3  6418 12697 12139
+3  15004 6651 6653
+3  14989 7813 9078
+3  8394 8393 9904
+3  4983 13539 4984
+3  1659 12099 1662
+3  15005 4206 4208
+3  2122 9850 12903
+3  13472 12903 9850
+3  488 10265 7805
+3  15006 4787 4786
+3  15007 4787 15006
+3  12540 4787 15007
+3  9252 7694 13175
+3  6864 5997 9564
+3  15008 15009 5164
+3  5163 15008 5164
+3  690 790 691
+3  7348 8727 7350
+3  8726 8727 7348
+3  7350 8727 8147
+3  185 15010 186
+3  5834 6771 5148
+3  13810 12236 13696
+3  9495 13696 12236
+3  9496 9495 12236
+3  10639 10823 10638
+3  1515 14890 13900
+3  13900 14890 10758
+3  11652 14890 12817
+3  12817 14890 15011
+3  15011 14890 1515
+3  11600 15011 1515
+3  14018 15011 11600
+3  14018 12817 15011
+3  11599 14018 11600
+3  1517 11649 11600
+3  11600 1515 1517
+3  13521 14782 1036
+3  8000 5056 12519
+3  11353 13950 5019
+3  5019 13950 15012
+3  15012 13950 11987
+3  15013 9485 2121
+3  736 15013 2121
+3  5458 15013 736
+3  5458 15014 15013
+3  15014 15012 15013
+3  15013 15012 9485
+3  15012 11987 9485
+3  15014 5019 15012
+3  5017 5019 15014
+3  5457 5017 15014
+3  5457 15014 5458
+3  10208 5017 5457
+3  10757 13900 10758
+3  9938 8121 13192
+3  1726 1681 13996
+3  1726 13996 13604
+3  934 6250 935
+3  10824 13626 2005
+3  4550 2005 13626
+3  13949 14581 15015
+3  13949 15015 15016
+3  7025 4131 4133
+3  14370 12062 12063
+3  9933 12784 13394
+3  13542 13566 1229
+3  10496 15017 15018
+3  3425 10496 15018
+3  15016 15019 9735
+3  9735 15019 15020
+3  4997 9735 15020
+3  4997 15020 4995
+3  4995 15020 15021
+3  12605 4995 15021
+3  8244 9887 2043
+3  12606 13948 644
+3  4219 9077 4220
+3  15016 9735 4449
+3  15016 4449 13949
+3  12904 14581 13949
+3  3304 13623 3305
+3  11799 6713 13623
+3  13623 6713 6712
+3  13779 7445 5443
+3  13779 12948 7445
+3  12948 2147 7445
+3  7116 3126 3636
+3  2342 7116 3636
+3  11534 11994 13069
+3  7435 7 5143
+3  12990 7228 14855
+3  12990 14855 2613
+3  2014 12453 2012
+3  90 94 91
+3  7238 6268 9704
+3  7238 9704 9703
+3  13633 13122 12949
+3  14635 12949 12948
+3  14635 5733 5732
+3  6497 6496 12452
+3  13633 12949 6495
+3  13633 6495 7976
+3  13067 2013 4870
+3  6207 6206 12440
+3  4582 14653 1879
+3  11666 12764 14835
+3  11666 11665 12764
+3  9991 7852 12847
+3  5250 14037 5251
+3  5318 69 68
+3  13779 5733 14635
+3  13779 14635 12948
+3  5445 13779 5443
+3  5258 8860 5259
+3  8051 2147 12948
+3  13122 8049 8051
+3  12336 13730 3208
+3  12336 4068 13730
+3  2014 6689 12453
+3  7302 2728 8829
+3  12946 3628 9464
+3  9017 9016 15022
+3  15023 15022 12612
+3  15022 9016 12612
+3  511 13184 15024
+3  510 13184 511
+3  11558 1421 5849
+3  4882 11760 4879
+3  10359 4879 11760
+3  12104 10388 9488
+3  3938 4814 5281
+3  752 4814 3938
+3  12705 11786 13389
+3  12705 10102 11786
+3  11530 8568 3922
+3  4714 852 12600
+3  6493 5456 6494
+3  10131 1601 1603
+3  4217 13149 11935
+3  15025 13524 7607
+3  682 3838 7596
+3  14899 15025 7459
+3  9513 13596 8864
+3  12345 11094 5056
+3  7784 7783 8610
+3  7783 9406 8610
+3  14629 14398 5795
+3  14629 525 14398
+3  1145 11206 13084
+3  11811 4554 10436
+3  4554 10437 10436
+3  7657 1015 269
+3  7657 269 271
+3  1015 7657 7090
+3  13498 8447 9166
+3  828 2824 2272
+3  827 2824 828
+3  13498 2754 8447
+3  7115 14019 1119
+3  5262 14035 6033
+3  5260 5262 6033
+3  6596 6579 12715
+3  6595 6579 6596
+3  1316 1318 9212
+3  1316 9212 11451
+3  8173 5566 5568
+3  5229 10987 5230
+3  5501 13852 9206
+3  3734 11607 12838
+3  4615 14761 9441
+3  14804 14761 4615
+3  12885 10775 13348
+3  11561 6484 13288
+3  11561 5699 6484
+3  10526 8389 8395
+3  8320 15026 8179
+3  12649 8179 15026
+3  5767 5827 13784
+3  7733 13784 5827
+3  6260 10444 12554
+3  6260 12554 5094
+3  6260 6262 10444
+3  3677 4130 11950
+3  3675 3677 11950
+3  3675 11950 13437
+3  158 11719 11718
+3  3090 158 11718
+3  13637 12521 4007
+3  10973 15027 2545
+3  1357 12766 1356
+3  2424 2423 6206
+3  11403 6206 2423
+3  14808 13980 14405
+3  11638 12658 11640
+3  15027 10973 14086
+3  5733 13779 13047
+3  5086 416 415
+3  6029 668 7057
+3  14834 13353 12971
+3  14087 14086 2444
+3  14086 2442 2444
+3  14258 15028 10502
+3  14155 15028 14258
+3  12380 4904 12381
+3  14863 5821 13586
+3  4845 12143 11410
+3  4845 11410 4843
+3  13314 8627 8630
+3  3745 15029 5015
+3  3745 5015 3746
+3  10084 633 635
+3  1198 10168 8831
+3  3745 13051 15029
+3  280 3748 6993
+3  4674 5805 10094
+3  3468 12719 2314
+3  3468 2314 2316
+3  2545 11828 2546
+3  13116 10249 12720
+3  1957 10249 13116
+3  11826 11828 2545
+3  5913 5352 5354
+3  10835 5913 5354
+3  432 3321 9568
+3  432 9568 11588
+3  9832 4574 4576
+3  9832 10716 4574
+3  820 9888 10579
+3  13638 1947 9888
+3  10579 9888 1947
+3  7355 674 673
+3  7355 673 7354
+3  15030 729 14693
+3  14190 729 15030
+3  4107 13205 7389
+3  7389 13205 13268
+3  9906 13520 11979
+3  7430 13520 2358
+3  7432 11979 13520
+3  7432 13520 7430
+3  7430 2358 717
+3  8261 11979 7432
+3  14352 7909 1691
+3  2317 14352 1691
+3  10664 1516 12397
+3  15031 15032 5632
+3  5634 15031 5632
+3  4661 11682 4659
+3  4661 15033 11682
+3  8281 11393 11394
+3  11626 11393 8281
+3  7915 1965 7656
+3  15034 14893 15035
+3  11819 14893 15034
+3  5548 11819 15034
+3  8785 11075 13331
+3  4940 3370 3371
+3  15036 15037 617
+3  6089 772 4381
+3  3992 12411 3989
+3  14162 13651 13650
+3  14162 13650 14382
+3  15038 14716 12411
+3  7967 14716 15038
+3  12411 14716 3989
+3  10816 3989 14716
+3  6734 3937 13141
+3  6459 13141 3937
+3  6734 3938 3937
+3  11461 1697 11462
+3  436 14976 14818
+3  436 8262 14976
+3  8847 11981 12218
+3  4253 4255 7576
+3  4255 7178 7576
+3  14831 3125 3124
+3  14110 14831 3124
+3  11210 13146 12212
+3  11352 11599 15039
+3  8840 14018 11599
+3  11352 8840 11599
+3  7459 7458 14899
+3  5808 10061 7030
+3  10061 5808 7739
+3  5808 7030 5809
+3  3591 200 199
+3  3018 3909 14139
+3  3593 200 3591
+3  3593 62 200
+3  6026 6025 11604
+3  9685 12901 11974
+3  12901 3973 11974
+3  9686 12901 9685
+3  13485 3439 3438
+3  13485 3438 11259
+3  5259 5713 5712
+3  4125 4124 13573
+3  5910 5909 5371
+3  5910 5371 5370
+3  9861 13102 9862
+3  11566 9274 9861
+3  9363 1940 9364
+3  3110 7985 6289
+3  12519 5056 15040
+3  5268 11846 11845
+3  15041 15042 15043
+3  15039 15043 15042
+3  6434 14042 10944
+3  6434 4678 14042
+3  14483 3296 3983
+3  9141 3297 3296
+3  9141 3296 14483
+3  14483 14482 13944
+3  9141 14483 13944
+3  1297 1481 15044
+3  6590 7574 8891
+3  8316 7626 4609
+3  8628 4609 7626
+3  9279 3285 9852
+3  4699 13196 14226
+3  13409 1691 1690
+3  10395 13798 5620
+3  10395 11271 13798
+3  4796 4795 12859
+3  12859 4795 1471
+3  1630 4854 1185
+3  4681 12807 4679
+3  4681 1893 12807
+3  13888 15045 3010
+3  11398 2948 4961
+3  1496 1495 31
+3  12043 12872 12445
+3  9344 13870 8377
+3  10118 14163 10119
+3  11452 7679 14256
+3  5740 5739 6453
+3  5230 14241 5231
+3  5721 14241 5230
+3  9129 14814 9130
+3  7351 11327 7352
+3  4609 8628 4607
+3  4374 15046 4375
+3  8728 10822 12262
+3  8006 14529 8728
+3  12041 9452 13230
+3  9051 7482 9760
+3  9052 9051 9760
+3  9052 9760 13809
+3  13130 3827 4487
+3  14153 6660 10201
+3  8723 11958 11959
+3  8722 5947 11958
+3  1780 4923 9978
+3  5763 4777 10422
+3  2074 14255 2075
+3  9349 3529 11727
+3  3647 3529 9349
+3  14246 2133 2135
+3  15047 14246 2135
+3  13510 8095 13083
+3  7606 796 795
+3  10404 15048 14593
+3  7655 5407 5404
+3  12074 13498 13904
+3  10810 12074 13904
+3  6421 2560 2823
+3  7745 1813 11278
+3  11278 1813 4898
+3  10946 93 10947
+3  12653 3357 3359
+3  13704 7762 15049
+3  1075 5625 1076
+3  12857 12858 10425
+3  14646 8927 8926
+3  5771 7407 5772
+3  3624 1596 1595
+3  8927 14681 8928
+3  15050 14997 15051
+3  13182 15051 11547
+3  13182 15050 15051
+3  14922 6643 8057
+3  6332 10769 5070
+3  846 6492 290
+3  14276 4873 13313
+3  14276 13590 4873
+3  5859 8404 2236
+3  14276 6165 13590
+3  2588 2587 13115
+3  10769 9174 5070
+3  11847 5609 2489
+3  2488 11847 2489
+3  11724 7420 12651
+3  107 106 11213
+3  14922 3970 6643
+3  292 294 10054
+3  292 10054 10055
+3  11805 13053 15052
+3  14847 9314 15053
+3  3658 15053 9314
+3  875 11280 14694
+3  3795 9396 3796
+3  3796 9396 14420
+3  13321 266 11759
+3  11760 11759 266
+3  4674 10094 4675
+3  7087 5158 5212
+3  1722 1724 11123
+3  10193 10592 8460
+3  14359 4713 13217
+3  6149 4713 14359
+3  9241 6419 4641
+3  6149 14359 6150
+3  2292 6537 2293
+3  2292 3943 6537
+3  5944 9249 11612
+3  6919 15054 14494
+3  377 12270 12269
+3  377 12269 375
+3  14751 2306 14822
+3  14751 14822 14821
+3  10244 6240 10245
+3  11429 11428 14817
+3  14482 11222 13944
+3  15055 1688 1687
+3  15055 5055 1688
+3  7399 15055 1687
+3  13748 14482 3983
+3  9787 5130 2060
+3  10902 9701 14470
+3  10824 2007 7534
+3  2716 11042 10840
+3  2007 1220 7534
+3  2006 1220 2007
+3  4000 4112 6979
+3  6151 6150 14906
+3  8669 6151 14906
+3  13354 13170 3687
+3  10795 6758 10632
+3  4562 12888 14848
+3  12887 12533 2779
+3  3828 3719 7250
+3  7939 8500 8605
+3  2738 1128 4639
+3  6339 2736 4639
+3  4611 1797 15056
+3  9756 1304 14762
+3  714 14942 15056
+3  3804 15056 14942
+3  3804 3806 15056
+3  4611 15056 3806
+3  4456 10410 2095
+3  8523 370 8524
+3  14959 3550 13684
+3  9571 3550 14959
+3  4475 13924 14992
+3  3928 13500 3929
+3  8561 13953 8562
+3  6965 13241 9809
+3  4385 10157 3659
+3  6624 4384 4383
+3  3929 4384 6624
+3  3930 3929 6624
+3  11301 7249 7250
+3  12846 12582 12842
+3  9242 5719 10986
+3  9276 13482 6055
+3  9276 1190 13482
+3  6055 13482 6102
+3  13482 596 6102
+3  2183 2182 5897
+3  7031 7030 11458
+3  6919 14494 6301
+3  6301 14494 7513
+3  12251 14849 853
+3  12464 122 1300
+3  6298 12922 7488
+3  14583 12660 13688
+3  11245 14878 15057
+3  13688 12660 1195
+3  8113 6860 14143
+3  8113 14143 13845
+3  12552 8812 14981
+3  14029 12853 12423
+3  5743 4260 4262
+3  5743 4262 9853
+3  14011 8705 3863
+3  8705 1223 3863
+3  8705 2078 1223
+3  14011 11333 8705
+3  10288 10290 12653
+3  12653 10290 3357
+3  15018 1785 3425
+3  9321 9324 12878
+3  9321 12878 9322
+3  7237 6268 7238
+3  7240 7238 9703
+3  9309 6453 12118
+3  15045 10516 10517
+3  15045 7049 10516
+3  15045 13888 7049
+3  13887 7049 13888
+3  10534 14091 6185
+3  10534 6185 6184
+3  14092 8960 8959
+3  14092 8959 14091
+3  14091 8959 6185
+3  6185 8959 6187
+3  6187 8959 8961
+3  4146 15058 4144
+3  15059 15060 4420
+3  15059 4420 4421
+3  482 12219 9749
+3  1823 1825 14093
+3  6628 1919 3797
+3  2163 3797 1919
+3  2163 1823 14093
+3  2163 14093 3797
+3  7283 1464 13702
+3  742 10815 740
+3  2890 2575 4819
+3  15061 15005 4208
+3  15061 4208 7895
+3  4208 4451 7895
+3  6605 6607 11198
+3  10697 11052 1944
+3  10600 7196 6174
+3  14944 4828 9595
+3  5489 13499 10060
+3  12009 5489 1417
+3  12009 13499 5489
+3  10030 14002 5330
+3  7438 13914 7439
+3  10030 13278 14002
+3  10030 10029 13278
+3  7399 7601 15055
+3  8667 14908 15062
+3  12769 15062 14908
+3  11112 11111 794
+3  13279 1508 11222
+3  11871 2493 11764
+3  11872 11871 11764
+3  2388 7756 3910
+3  13473 3399 2173
+3  11311 2388 3910
+3  6615 9985 6616
+3  1266 1265 3611
+3  15063 15064 14813
+3  644 13948 7960
+3  644 7960 7812
+3  2145 2146 2365
+3  8445 11338 14462
+3  6238 6051 6054
+3  6238 6054 6239
+3  6054 1288 6239
+3  7309 4056 12561
+3  13107 4056 7309
+3  9243 14376 9244
+3  10547 11448 5829
+3  10381 8025 10382
+3  8697 13948 12606
+3  3352 9222 3969
+3  40 2516 3543
+3  10880 10547 10881
+3  5317 69 5318
+3  687 3487 3486
+3  1372 9249 15065
+3  5944 15065 9249
+3  12374 12614 12613
+3  3638 12374 12613
+3  5988 10045 11412
+3  11632 15066 7006
+3  15066 11632 9535
+3  15066 9535 11833
+3  13374 11514 1258
+3  3071 4183 10741
+3  3072 4183 3071
+3  1157 884 886
+3  4048 12637 4046
+3  664 663 7132
+3  1961 1224 1223
+3  1018 663 7163
+3  8170 15067 8171
+3  8171 15067 5402
+3  6213 11870 3206
+3  2215 11406 2216
+3  8567 8566 2215
+3  533 3175 7244
+3  9834 2062 9835
+3  13685 2062 9834
+3  9357 7560 11292
+3  9357 7558 7560
+3  14680 7750 11517
+3  14679 7748 7750
+3  14679 7750 14680
+3  523 6847 524
+3  872 1690 1692
+3  11820 15068 11154
+3  8667 11154 15068
+3  871 1690 872
+3  10256 9538 9539
+3  10323 1932 1934
+3  10321 10323 1934
+3  7748 3040 13395
+3  14679 14678 3040
+3  14679 3040 7748
+3  12184 15069 12182
+3  15060 15069 12184
+3  14787 2531 2530
+3  12355 7377 7376
+3  8734 7377 12355
+3  8734 6794 7377
+3  2530 8131 11535
+3  2530 11535 14787
+3  8131 2530 15070
+3  9408 5330 14002
+3  8066 12995 2722
+3  2722 12995 3864
+3  6307 12462 3503
+3  8286 8620 14675
+3  9012 9013 3099
+3  2530 2529 15070
+3  13978 15070 2529
+3  5939 7599 11131
+3  6971 4291 6972
+3  15071 6972 4291
+3  15071 3860 8321
+3  6972 15071 8321
+3  12547 11131 15072
+3  13950 11353 15042
+3  10810 2174 1990
+3  1788 2174 2173
+3  11272 12298 5128
+3  5580 6842 12736
+3  5580 12736 11495
+3  4097 4036 11616
+3  8655 13969 12085
+3  13218 8494 6778
+3  13218 6778 6777
+3  8922 12746 13183
+3  13183 8030 15073
+3  12746 8030 13183
+3  13363 13183 15073
+3  8609 14885 14884
+3  8609 14884 7096
+3  13363 15073 13362
+3  6718 7074 7071
+3  6718 14164 7074
+3  3542 2868 14164
+3  9952 11270 9880
+3  13523 7533 3627
+3  7531 7533 14601
+3  13523 11789 14601
+3  13523 14601 7533
+3  14601 11789 13567
+3  11790 13567 11789
+3  9521 6870 4957
+3  9627 9521 4957
+3  14768 11443 14765
+3  11565 12230 15074
+3  12502 12230 11565
+3  1299 2621 1825
+3  6108 1825 2621
+3  8429 8426 10430
+3  5801 13390 5436
+3  6178 13390 5801
+3  8345 12252 12254
+3  13090 8345 12254
+3  156 8923 13760
+3  13387 11571 13781
+3  462 13387 13781
+3  5187 13387 462
+3  6654 10302 4409
+3  3284 15075 3282
+3  3910 5114 3911
+3  842 7583 13507
+3  841 842 13507
+3  9683 9685 11974
+3  2061 5131 11203
+3  5131 14854 11203
+3  2061 2060 5131
+3  1883 10335 14950
+3  11926 6659 6658
+3  2328 6659 11926
+3  3311 10997 10153
+3  14379 2800 41
+3  10658 2800 14379
+3  4339 7313 3644
+3  11681 2434 2433
+3  6014 11681 2433
+3  13639 3255 15076
+3  7312 2504 2538
+3  9623 10493 6549
+3  14561 14563 13850
+3  14563 7546 13850
+3  3643 11850 12854
+3  6549 10493 12446
+3  10967 10966 10877
+3  2640 10877 10966
+3  2640 10966 14061
+3  6150 10508 14906
+3  15077 11510 13665
+3  13606 13451 9109
+3  45 10177 13815
+3  2685 13405 13926
+3  12472 8574 11639
+3  12684 12686 6940
+3  12684 6940 6937
+3  8574 8573 11142
+3  11445 11900 11615
+3  8599 8913 7763
+3  2714 10849 9920
+3  243 242 13632
+3  3152 14686 14322
+3  3152 2904 14686
+3  3152 14322 13294
+3  3381 10373 10924
+3  6896 10924 10373
+3  9507 10541 15078
+3  9507 11153 10541
+3  11956 9089 4729
+3  2030 11726 11725
+3  5241 5240 11277
+3  5665 5664 6074
+3  14434 5665 6074
+3  11463 14380 41
+3  1516 11648 1517
+3  12888 11416 14848
+3  14384 4524 14535
+3  9516 14007 9430
+3  9516 12929 14007
+3  12888 11417 11416
+3  12888 11745 11417
+3  15031 15079 15032
+3  14706 15079 15031
+3  14704 15079 14706
+3  14672 15031 5634
+3  14706 15031 14672
+3  14672 5634 14478
+3  14706 14671 14406
+3  14672 14671 14706
+3  2146 4606 6213
+3  8802 1812 1811
+3  2368 2370 13984
+3  10874 11432 13732
+3  14843 13151 7746
+3  1011 1010 4096
+3  7820 3546 7821
+3  12735 11495 12736
+3  14909 3298 2558
+3  4371 13917 13295
+3  5159 14312 13447
+3  5159 14421 4466
+3  13447 14421 5159
+3  4774 7718 8942
+3  10513 1263 1262
+3  10515 1263 10513
+3  7383 1263 10515
+3  10513 1262 11810
+3  10514 10513 11810
+3  10514 11810 13953
+3  9092 12685 13792
+3  9092 9091 12685
+3  12684 9884 13792
+3  12684 13792 12685
+3  10223 11900 9307
+3  10223 11615 11900
+3  15080 2782 12451
+3  7675 12451 2782
+3  15081 4524 14384
+3  15081 14384 15082
+3  15081 15082 400
+3  400 15082 13741
+3  11084 10396 11082
+3  13896 10396 11084
+3  11082 10395 5620
+3  10396 10395 11082
+3  12200 1608 1384
+3  4058 3385 756
+3  1628 1630 1185
+3  12456 14756 8885
+3  12456 14861 14756
+3  13073 14756 13265
+3  9871 15083 4358
+3  3217 11255 3774
+3  13893 3774 11254
+3  9472 5554 9654
+3  10349 10351 14195
+3  10756 10755 4274
+3  6226 10793 10282
+3  8719 10793 6226
+3  11752 9472 9654
+3  15084 9472 11752
+3  15084 11752 7883
+3  15085 15084 7883
+3  11754 15085 7883
+3  337 5577 5286
+3  15086 863 8897
+3  9251 15086 8897
+3  9251 8341 14111
+3  8341 8340 14111
+3  3017 3016 4026
+3  3017 4026 5055
+3  15087 9472 15084
+3  15087 15084 15085
+3  15085 15086 15087
+3  15086 14111 15087
+3  9251 14111 15086
+3  15086 15085 863
+3  863 15085 8729
+3  15085 11754 8729
+3  4417 11040 5720
+3  873 12793 9207
+3  12607 2620 14350
+3  8387 12607 14350
+3  14572 14301 14300
+3  14572 11051 14301
+3  10978 11320 10979
+3  12598 13548 14485
+3  6616 9985 7083
+3  13751 5673 13401
+3  12350 4752 6476
+3  9265 12535 14173
+3  12535 9412 14173
+3  5006 14466 14685
+3  13908 14466 5006
+3  6257 6802 3074
+3  3592 6802 6257
+3  3592 6257 7251
+3  11919 7794 14985
+3  14985 7794 13647
+3  15088 13647 9021
+3  15088 14985 13647
+3  9020 15088 9021
+3  1679 11716 1680
+3  10484 11715 1679
+3  11704 8156 15089
+3  9122 11704 15090
+3  15089 15090 11704
+3  10694 10695 15091
+3  14399 15091 10695
+3  6511 11120 12928
+3  4753 6384 13538
+3  6380 9529 13467
+3  5182 7151 8455
+3  12495 12496 8543
+3  11264 13318 9098
+3  4272 9098 13318
+3  11262 11264 15092
+3  13109 14309 8954
+3  5481 5480 13584
+3  945 5481 13584
+3  7908 8821 945
+3  8277 13407 6571
+3  6571 13407 9266
+3  10059 5910 5370
+3  10060 5910 10059
+3  952 4622 13427
+3  952 13427 14819
+3  1509 8917 1510
+3  1509 2951 8917
+3  7992 2897 7993
+3  10151 7369 10564
+3  11502 13607 1591
+3  5562 1591 13607
+3  12950 12949 13122
+3  14693 12427 15093
+3  14107 15093 12427
+3  4674 2927 12952
+3  14744 1598 10408
+3  14744 1599 1598
+3  8051 12950 13122
+3  7962 15094 11176
+3  7861 2821 257
+3  10939 4826 191
+3  9471 9470 1573
+3  15095 4439 9228
+3  15096 9480 9180
+3  14921 15097 15034
+3  7161 13807 7160
+3  3961 14687 11172
+3  7160 13807 12162
+3  4694 4693 5081
+3  13674 10529 7565
+3  6413 10904 12376
+3  10763 12376 10904
+3  10647 4694 5083
+3  2117 14070 14068
+3  2117 14068 2114
+3  3702 6665 3021
+3  5211 5210 11095
+3  10303 10302 6654
+3  9500 9862 13102
+3  9501 9500 13102
+3  15098 15099 11605
+3  15098 14680 15099
+3  14680 15098 14678
+3  10792 5759 10282
+3  5758 5759 10792
+3  10684 15100 12897
+3  745 744 8216
+3  11165 12505 15101
+3  3183 13415 15101
+3  11165 15101 13415
+3  11856 10324 13316
+3  11856 13316 3865
+3  11004 14479 6439
+3  8029 13992 14131
+3  5092 11295 2554
+3  5092 2628 11295
+3  5780 14155 5781
+3  12933 15071 4294
+3  12933 4294 6345
+3  13617 14970 14971
+3  13617 4093 14970
+3  12081 12304 14971
+3  13617 14971 12304
+3  12917 2052 4015
+3  7418 5863 7419
+3  1093 12509 12507
+3  10243 15102 11293
+3  15102 7751 11293
+3  10712 6685 10450
+3  8712 12626 11426
+3  8712 11095 12626
+3  13519 1475 1477
+3  12390 15103 9795
+3  12389 15103 12390
+3  11727 9380 11724
+3  14255 12953 3697
+3  12953 3696 3697
+3  6313 14255 3697
+3  2071 6313 3697
+3  14198 6129 9134
+3  10780 9134 6129
+3  14750 14851 13926
+3  10780 7636 7635
+3  9134 10780 7635
+3  6318 10241 10811
+3  5148 1340 1339
+3  14411 6121 13253
+3  14225 11936 7332
+3  8419 8421 1395
+3  8419 1395 1394
+3  4125 13573 11889
+3  7464 2228 2230
+3  6523 10378 6524
+3  14142 10378 6523
+3  8155 10895 6277
+3  13353 12972 12971
+3  4842 6356 11920
+3  6305 4998 12918
+3  3854 9747 13329
+3  9747 14349 13329
+3  13444 13594 13603
+3  13444 13603 10025
+3  6815 13603 13594
+3  12596 13303 14197
+3  7539 14063 909
+3  910 909 14063
+3  13303 11497 11521
+3  4335 2255 2282
+3  5624 4883 11277
+3  4883 4885 11277
+3  7018 12872 10032
+3  10033 10032 12872
+3  15104 9111 14608
+3  15105 15104 14608
+3  13537 15104 15105
+3  8131 5252 5255
+3  8131 15070 5252
+3  5254 9492 15106
+3  13144 5254 15106
+3  4590 1442 1367
+3  4590 1367 14177
+3  3589 8809 3318
+3  12789 7024 4497
+3  12789 4497 13037
+3  9224 4740 4739
+3  7564 4740 9224
+3  154 153 2437
+3  13856 13857 12946
+3  13458 13856 12946
+3  1508 9391 7013
+3  7338 7337 15107
+3  5429 4502 15107
+3  13017 13659 13016
+3  14587 6090 447
+3  762 4008 6366
+3  997 10076 1202
+3  995 997 1202
+3  6184 6186 8813
+3  5080 7511 1911
+3  12998 12997 13166
+3  8820 13166 12997
+3  8819 13166 8820
+3  11375 11419 8820
+3  4321 4320 9692
+3  4907 841 13507
+3  15099 14680 11517
+3  15099 11517 10106
+3  10106 8193 11605
+3  15099 10106 11605
+3  6260 5094 14964
+3  6260 14964 6261
+3  11676 8622 14455
+3  14159 2223 2026
+3  15108 15109 10962
+3  10963 10962 15109
+3  2033 2035 10963
+3  2033 10963 15109
+3  15110 2033 15109
+3  6673 15110 15109
+3  6673 15109 15108
+3  11989 4396 4398
+3  13533 11701 4261
+3  13533 4261 7654
+3  7668 9006 4431
+3  6627 4431 9006
+3  15111 9457 2496
+3  15112 15111 2496
+3  5789 11800 11615
+3  15110 5789 2033
+3  14664 5789 15110
+3  14664 11800 5789
+3  14893 15111 15035
+3  15111 15112 15035
+3  13599 3163 12385
+3  13599 12385 6253
+3  9561 6172 13591
+3  11292 13591 6171
+3  6172 6171 13591
+3  6672 15110 6673
+3  6672 14664 15110
+3  11070 14664 6672
+3  15113 15114 8703
+3  15115 15114 15113
+3  15115 1052 10431
+3  3865 13316 2723
+3  2723 13316 12604
+3  2724 2723 6830
+3  15116 13412 14710
+3  15116 13413 13412
+3  14763 14168 9719
+3  13023 5372 14033
+3  9964 13023 14033
+3  8923 8925 13760
+3  1916 5484 7650
+3  3155 13505 3156
+3  14574 3826 13130
+3  14257 12403 973
+3  13097 4051 4050
+3  8123 6087 5374
+3  9573 8732 9918
+3  9574 9573 9918
+3  9782 8633 11622
+3  7864 14651 7865
+3  12532 11930 14651
+3  14628 9967 12802
+3  14628 12802 2561
+3  10534 10536 14091
+3  10873 13222 13491
+3  13220 10873 10870
+3  13220 13222 10873
+3  13220 10870 12931
+3  10575 1915 13492
+3  15117 13459 8806
+3  12563 11769 2238
+3  14445 2238 11769
+3  10000 9999 14210
+3  12566 12565 14726
+3  13238 13239 8962
+3  7716 13238 8962
+3  4903 4902 12566
+3  4903 12566 15118
+3  14824 7699 8064
+3  7971 8064 7699
+3  1998 7971 7699
+3  6593 607 15119
+3  607 609 8025
+3  15119 607 8025
+3  2095 2337 2096
+3  7700 7699 14824
+3  6076 307 8063
+3  15120 15121 9436
+3  15120 9436 12830
+3  14938 8573 10263
+3  10808 9235 9234
+3  9235 9783 9236
+3  6346 4293 13607
+3  4294 4293 6346
+3  14651 1937 7865
+3  2837 2836 14343
+3  14651 11930 1937
+3  1602 14668 1603
+3  12769 14908 2600
+3  12769 2600 2603
+3  8426 15114 15115
+3  8426 15115 10431
+3  3298 14909 10653
+3  7264 3293 6141
+3  7150 7264 6141
+3  10530 6141 6142
+3  7667 3269 3271
+3  11043 13613 105
+3  10763 13613 11043
+3  5092 5091 14546
+3  4308 2556 4309
+3  2556 1860 4309
+3  9394 13829 9395
+3  3872 13658 2188
+3  2188 13658 13660
+3  3872 7637 13658
+3  10765 10766 7637
+3  7615 10765 7637
+3  13981 10765 7615
+3  13981 15122 10765
+3  15122 2237 10765
+3  7355 14530 674
+3  10948 1375 3738
+3  10948 3738 11193
+3  15123 10316 15124
+3  15123 15124 4589
+3  12246 11052 13526
+3  7986 963 7987
+3  13526 10696 13660
+3  7852 1641 1643
+3  7852 1643 12848
+3  12848 1643 9773
+3  9773 1643 7879
+3  14199 7628 3531
+3  1064 8405 9773
+3  8405 12848 9773
+3  12848 8405 702
+3  13296 3188 3798
+3  3798 3188 14477
+3  3528 3527 14050
+3  14050 2237 15122
+3  15122 13981 13982
+3  11830 13940 9419
+3  8735 13940 11830
+3  8735 11830 1861
+3  1860 8735 1861
+3  14868 12351 6476
+3  14868 6476 10014
+3  5092 14546 14545
+3  5092 14545 2628
+3  15125 1865 6541
+3  15125 5232 1865
+3  13642 6338 5552
+3  3528 13940 8735
+3  13940 3528 14050
+3  15000 4520 14796
+3  14549 12811 15126
+3  13817 15126 12811
+3  4520 12945 14796
+3  694 693 1935
+3  693 1936 1935
+3  12847 7852 12848
+3  13532 5406 14145
+3  10242 13532 14145
+3  3187 5859 3188
+3  10569 8255 12960
+3  13528 10569 12960
+3  13579 5656 5655
+3  478 477 5655
+3  4581 4162 14653
+3  10692 12775 5434
+3  7819 12775 10692
+3  12775 5435 5434
+3  11587 6098 9535
+3  11587 11408 6099
+3  12773 14066 9288
+3  12773 7819 7821
+3  12773 7821 14066
+3  9535 9534 11587
+3  13435 11343 15127
+3  12430 15127 11343
+3  1643 1642 7879
+3  3140 5729 5728
+3  15128 15129 15130
+3  10948 11002 1375
+3  1567 1375 11002
+3  1567 1373 1375
+3  1567 9361 1373
+3  11264 11263 13318
+3  12489 3821 15131
+3  12489 15131 4588
+3  14334 14336 9317
+3  9317 14336 11124
+3  4683 9317 11124
+3  4683 11124 4682
+3  10649 14198 9134
+3  14437 14434 4001
+3  5686 5685 781
+3  13454 1079 14389
+3  11079 14389 1079
+3  14673 14674 5208
+3  14674 2487 5208
+3  14438 8312 8311
+3  1667 14437 14438
+3  1667 14438 8311
+3  1667 7778 14437
+3  8335 15132 7985
+3  8334 10701 15132
+3  8335 8334 15132
+3  883 13840 15133
+3  15134 15133 13840
+3  14126 12547 10701
+3  7249 11301 11005
+3  977 6093 12293
+3  4685 8641 4686
+3  11743 14864 9168
+3  9168 14864 2475
+3  1159 15135 1160
+3  4686 3789 1634
+3  15135 14125 12969
+3  3261 10269 4355
+3  3261 4355 8255
+3  9077 9954 4220
+3  12471 11967 15136
+3  12471 15136 9599
+3  9942 14282 9943
+3  10282 6224 6226
+3  4550 13626 4551
+3  15124 10315 10650
+3  15124 10650 1442
+3  7456 14286 3052
+3  3625 8702 3150
+3  3625 3150 12102
+3  3052 11700 3050
+3  3052 14286 11700
+3  10314 4325 7410
+3  1362 14228 15137
+3  203 7054 15138
+3  8957 10767 10406
+3  10404 10406 10767
+3  15138 7054 9156
+3  15138 9156 9157
+3  7592 8835 14684
+3  9146 7592 14684
+3  1217 1219 14471
+3  14471 1219 12910
+3  12521 13208 9362
+3  3235 9882 1921
+3  920 9882 12546
+3  920 6847 9882
+3  7158 6430 5540
+3  7158 5540 6576
+3  7739 5807 7740
+3  7740 5807 8930
+3  4678 9793 14042
+3  11375 359 11419
+3  14949 12901 9686
+3  14949 3971 12901
+3  6040 1693 52
+3  1650 3120 6982
+3  5777 2395 2397
+3  12675 12199 4927
+3  12675 4927 12676
+3  12676 4927 13972
+3  4927 4929 13972
+3  8338 8148 1857
+3  11498 7923 11109
+3  11498 5572 7923
+3  9374 1298 12301
+3  12696 12301 1298
+3  12644 10565 10566
+3  7117 7116 2344
+3  9718 1905 8359
+3  1904 8359 1905
+3  13470 12089 8673
+3  9415 9414 8673
+3  13470 8673 9414
+3  3847 6970 3403
+3  12881 9427 1019
+3  9429 9427 12881
+3  8016 7305 7528
+3  14407 3315 11739
+3  14407 14408 3315
+3  6783 6786 8295
+3  9492 5253 15139
+3  9492 15139 15140
+3  13978 15139 5253
+3  5136 7760 5137
+3  11376 12999 14555
+3  9597 9599 15136
+3  12998 14804 12999
+3  12997 12999 11376
+3  12997 11376 11375
+3  8820 12997 11375
+3  14530 7355 14338
+3  8125 15141 2452
+3  9693 10827 9713
+3  5746 14600 5748
+3  652 651 12282
+3  10738 13682 10218
+3  10738 9154 13682
+3  11273 10998 8718
+3  652 12282 13928
+3  4404 95 97
+3  3062 3064 11383
+3  13747 3405 3404
+3  14799 12657 4147
+3  3935 14799 4147
+3  5266 11097 13747
+3  14006 14068 14070
+3  14006 14070 14005
+3  12952 14597 5806
+3  12148 14597 12952
+3  2558 3300 2559
+3  2559 9043 3147
+3  2559 9004 9043
+3  1018 1017 663
+3  13093 15142 13094
+3  14628 6422 4631
+3  14628 4631 8612
+3  3012 926 928
+3  3012 15143 926
+3  15143 14196 926
+3  929 926 14196
+3  1822 929 14196
+3  3012 928 13888
+3  10688 14793 10687
+3  30 32 13902
+3  32 4400 13902
+3  13902 4400 13901
+3  4400 10599 13901
+3  10599 15144 13901
+3  13901 15144 13899
+3  10599 14004 15144
+3  3685 14224 5736
+3  11358 11360 15145
+3  10599 4400 10597
+3  15145 11360 15146
+3  11360 11359 15146
+3  10597 14795 8570
+3  7433 11020 14193
+3  10463 330 12061
+3  4942 12061 330
+3  8479 10463 12061
+3  5865 10463 8479
+3  12536 4490 14180
+3  11749 10299 1928
+3  4345 4490 12536
+3  5865 5864 14156
+3  14156 5864 12145
+3  4689 4104 14528
+3  11424 10499 11995
+3  4488 8468 7598
+3  10662 5033 10663
+3  7356 10087 12689
+3  10662 5034 5033
+3  10463 5865 14401
+3  14401 5865 14156
+3  14402 14401 14156
+3  11995 10499 14634
+3  4942 330 12531
+3  3483 1767 10384
+3  8714 12573 13987
+3  12573 6910 13987
+3  13714 5792 5791
+3  1168 12573 14126
+3  13158 1269 1535
+3  1685 1269 13158
+3  11199 8308 8309
+3  8196 9812 10617
+3  8196 10617 9382
+3  7937 9812 8196
+3  9813 9811 12248
+3  7937 12248 9811
+3  7937 9811 9812
+3  12375 7318 13565
+3  9010 13396 8925
+3  9010 8925 8924
+3  13338 3688 6928
+3  13338 12328 13135
+3  13338 6928 12328
+3  11316 11315 15147
+3  4964 2471 4965
+3  776 778 11459
+3  9598 9600 12538
+3  9967 14628 8612
+3  10517 11747 15148
+3  11748 15148 11747
+3  10298 12816 15149
+3  15037 10298 15149
+3  8612 4630 13904
+3  5104 10907 10564
+3  5104 5103 10907
+3  2540 110 109
+3  912 6060 913
+3  8760 3162 9463
+3  7850 7851 15150
+3  7692 12561 4056
+3  8508 12561 7692
+3  8470 5505 15151
+3  8470 15151 14280
+3  4658 6060 912
+3  7526 7525 15152
+3  12616 10232 10234
+3  12408 12616 10234
+3  816 12616 12407
+3  12408 12407 12616
+3  10804 941 10803
+3  4419 941 10804
+3  5853 13254 13253
+3  5853 13253 6120
+3  6674 6063 538
+3  9408 14002 14001
+3  15153 8358 1904
+3  1903 15153 1904
+3  8306 8305 13426
+3  11202 8306 13426
+3  10725 10724 13113
+3  12974 11122 12243
+3  11025 6805 5994
+3  7732 7734 7982
+3  1737 14977 11728
+3  5807 7739 5808
+3  6606 11692 11853
+3  3718 3035 3719
+3  10266 2001 7569
+3  10266 1999 2001
+3  5551 10266 7569
+3  6011 14621 8237
+3  12242 4801 14801
+3  2665 9642 5614
+3  15040 5058 8685
+3  8566 2061 11406
+3  5056 5058 15040
+3  12627 5887 8669
+3  167 166 1423
+3  14338 13789 14530
+3  14794 6783 8295
+3  10782 13931 4243
+3  4666 13931 10782
+3  10560 11340 10561
+3  12555 14966 7218
+3  5290 14966 12555
+3  7017 13807 7161
+3  7017 7161 7018
+3  10348 10347 136
+3  137 136 10347
+3  143 137 10347
+3  136 11818 10322
+3  136 10322 10348
+3  973 12403 974
+3  13724 2903 588
+3  9611 394 396
+3  3330 9611 7677
+3  9627 9522 9521
+3  6980 9524 14615
+3  6980 9521 9524
+3  14616 7903 7902
+3  14616 7902 14615
+3  9522 9627 6081
+3  104 13281 14428
+3  3229 13489 3226
+3  13490 13489 3229
+3  12932 4181 13250
+3  12732 4181 12932
+3  7736 12121 6442
+3  6441 4039 14979
+3  6441 14979 7735
+3  12026 11430 10739
+3  8890 3597 3598
+3  250 4510 4509
+3  250 249 4510
+3  4510 249 7182
+3  12983 14096 14580
+3  1979 7731 1977
+3  1977 13462 6362
+3  15154 5850 5852
+3  15154 12625 5850
+3  1086 10544 12374
+3  10692 10346 10348
+3  11123 474 11216
+3  473 11216 474
+3  14595 12790 11646
+3  7448 7450 9545
+3  8739 958 10134
+3  8739 10134 6343
+3  12476 8885 8888
+3  15155 12476 8888
+3  15156 12476 15155
+3  11512 15155 11233
+3  9678 11233 8888
+3  15155 8888 11233
+3  9678 8888 8887
+3  7091 1964 12869
+3  1324 10982 1325
+3  3451 15157 6542
+3  11042 15157 3903
+3  8125 4862 15158
+3  8126 8125 15158
+3  2803 2805 10980
+3  8126 15158 15159
+3  8126 15159 233
+3  1211 1210 5486
+3  14356 1211 5486
+3  14356 8713 1211
+3  14673 8713 14356
+3  14154 7682 11606
+3  11713 14848 11415
+3  11416 11415 14848
+3  15160 11713 11415
+3  15161 11713 15160
+3  9833 6723 11028
+3  11356 7292 7291
+3  14060 15162 14430
+3  10968 15162 14060
+3  3339 15162 10968
+3  13505 2312 3156
+3  2710 3446 8657
+3  13505 8657 3446
+3  3278 2312 13505
+3  1469 13041 5135
+3  4571 1469 5135
+3  4416 4571 5135
+3  7491 13975 7008
+3  1469 4571 6378
+3  12860 1469 6378
+3  4634 15163 6379
+3  4571 4415 6379
+3  4634 6379 4415
+3  13681 1297 15044
+3  13681 15044 1272
+3  14967 478 5657
+3  9560 2346 2345
+3  8684 7855 5389
+3  10644 9560 11292
+3  13591 11292 9560
+3  8684 11445 11800
+3  12160 9457 15111
+3  12631 12160 14893
+3  15111 14893 12160
+3  5577 337 339
+3  3535 6658 7923
+3  12510 6658 3535
+3  12303 12510 3535
+3  5452 6753 13700
+3  13700 6753 14605
+3  10909 13700 14605
+3  10909 5453 13700
+3  6174 427 426
+3  10600 6174 426
+3  2281 2254 3770
+3  2281 2255 2254
+3  5920 11853 5921
+3  11457 15164 12079
+3  9887 11457 12079
+3  3772 14369 3773
+3  9626 4450 12833
+3  14245 12940 15165
+3  14245 15165 2133
+3  11505 13688 12994
+3  2267 8078 7762
+3  9682 9680 14571
+3  7277 12360 4167
+3  11562 4167 12360
+3  6048 14012 9083
+3  6048 10589 14012
+3  12713 7603 7605
+3  14888 15166 14889
+3  867 3600 8197
+3  3600 13417 8197
+3  13417 11422 8197
+3  15166 7156 14887
+3  15166 14887 14889
+3  9617 4969 281
+3  12568 12569 12754
+3  13418 12748 13963
+3  12748 12750 13963
+3  13963 12750 14182
+3  12750 3264 14182
+3  3263 14182 3264
+3  3263 12875 14182
+3  7551 14519 14518
+3  6291 14519 7551
+3  12750 5611 3264
+3  3264 5611 3266
+3  6320 14125 14895
+3  4157 9123 620
+3  11112 793 11513
+3  11112 794 793
+3  14851 12836 15167
+3  13944 1510 5522
+3  5627 6986 9335
+3  2285 837 838
+3  5855 11397 2367
+3  4195 14266 11544
+3  15168 6289 7985
+3  11130 6289 15168
+3  15072 11130 15168
+3  15132 15168 7985
+3  15072 15168 15132
+3  10125 12915 5689
+3  89 88 484
+3  89 484 483
+3  11080 89 483
+3  11247 11670 13633
+3  11247 1448 11670
+3  8040 14621 6515
+3  14621 6010 6515
+3  15169 8875 6207
+3  15169 6207 13289
+3  6207 12440 13289
+3  6978 8290 8289
+3  6978 8289 5664
+3  6715 4982 15170
+3  12702 13324 9102
+3  10875 9102 13324
+3  3082 3084 14695
+3  2243 2242 6949
+3  9785 12391 2243
+3  9785 2243 6949
+3  2324 2326 9934
+3  11341 11340 11244
+3  1660 1615 1614
+3  1660 1614 1993
+3  1660 13284 1615
+3  8787 1993 3016
+3  1660 1993 8787
+3  7619 7618 7988
+3  7619 7988 7990
+3  14526 13574 11929
+3  11366 11929 13574
+3  11816 13574 14525
+3  12173 11816 14525
+3  11349 3575 3419
+3  3575 11350 13863
+3  10669 10668 5451
+3  5451 10668 14729
+3  4024 1596 4025
+3  11023 5709 3709
+3  3317 3316 15171
+3  1301 5828 3267
+3  3267 5828 4648
+3  11925 222 79
+3  11925 79 78
+3  11219 5173 15172
+3  11219 7661 5173
+3  9532 10188 9775
+3  14469 6805 6818
+3  6803 6805 14469
+3  4717 12105 9487
+3  4717 9487 12253
+3  4717 4716 12105
+3  11621 5545 5184
+3  11580 5545 11621
+3  9050 9052 10145
+3  10144 9050 10145
+3  12954 13128 1891
+3  8056 5894 12954
+3  14691 14089 1495
+3  9222 13256 3969
+3  13236 15001 11838
+3  13236 13727 15001
+3  14690 11486 14089
+3  14690 14089 14691
+3  7046 2634 2633
+3  11258 1253 14715
+3  12569 3599 5734
+3  12569 5734 5735
+3  14257 5735 12403
+3  7159 15166 5045
+3  7156 15166 7159
+3  8014 2880 9297
+3  8014 7363 2880
+3  953 9467 9469
+3  11117 11229 11118
+3  13503 13272 4211
+3  13273 4211 13272
+3  15173 12553 12007
+3  10307 2668 6745
+3  12380 642 4905
+3  3692 642 12380
+3  12015 15028 12016
+3  9764 8964 8288
+3  13610 7052 13609
+3  5778 59 6570
+3  7052 14843 13609
+3  1009 1011 11399
+3  2545 15027 11826
+3  10372 11470 8896
+3  5268 5267 11846
+3  9364 11846 5267
+3  6627 9006 8830
+3  7562 6627 8830
+3  1736 14977 1737
+3  3558 10220 3406
+3  9417 2021 370
+3  9417 370 8523
+3  12022 7123 1927
+3  12022 1927 1926
+3  8206 9561 6114
+3  12033 6390 12316
+3  4849 12316 5496
+3  6393 6390 12033
+3  6127 6126 12509
+3  7272 6127 12509
+3  1093 7272 12509
+3  11527 12306 13837
+3  12646 10070 14841
+3  12027 10070 12646
+3  12646 14841 14840
+3  6187 12646 14840
+3  7847 12229 4123
+3  12974 474 11123
+3  4017 474 12974
+3  6954 6956 11068
+3  12694 11814 5588
+3  4566 9759 12694
+3  11068 14475 1704
+3  1702 1704 14475
+3  11122 12974 11123
+3  6043 13814 9545
+3  6442 1708 6440
+3  13455 2501 2500
+3  13455 3347 2501
+3  3346 2501 3347
+3  3347 14837 3348
+3  3347 13455 14837
+3  4192 4191 13169
+3  14273 11603 6520
+3  7973 14273 6520
+3  869 9539 4320
+3  9692 13656 13655
+3  13656 9692 1106
+3  4321 9692 13655
+3  8661 6265 3389
+3  9494 3389 6265
+3  8661 6263 6265
+3  2597 1179 12711
+3  13898 1179 2597
+3  10686 9526 13561
+3  7781 7780 13399
+3  15174 4197 10122
+3  10121 15174 10122
+3  3141 1500 3142
+3  3141 10101 1500
+3  14498 9456 9453
+3  14497 9456 14498
+3  14616 9453 13812
+3  14498 9453 14616
+3  1484 1486 13299
+3  2854 7697 7696
+3  12130 3453 12851
+3  9601 9602 13914
+3  14574 9026 14645
+3  14396 13549 13933
+3  14396 13933 14721
+3  12464 1302 11604
+3  1302 12610 11604
+3  770 6373 7997
+3  10276 8432 9372
+3  11104 9601 13914
+3  4268 14175 14174
+3  12702 9102 14174
+3  12009 2933 2935
+3  6294 9576 7185
+3  10652 10651 11284
+3  12205 11696 13575
+3  829 898 11284
+3  7475 14234 7476
+3  3693 3695 4770
+3  10424 12858 14850
+3  15175 10424 14850
+3  12858 13701 14850
+3  15175 14850 11595
+3  11597 15175 11595
+3  11252 4281 6631
+3  4194 14266 4195
+3  6920 8534 4004
+3  4004 13019 6920
+3  5213 1276 14579
+3  1278 1277 3157
+3  6965 10809 13241
+3  9065 7212 9066
+3  5940 5939 15176
+3  12573 15176 14126
+3  8714 5940 15176
+3  6248 14133 9376
+3  10042 9376 14133
+3  6454 756 758
+3  4057 756 6454
+3  13285 11433 11434
+3  13285 11434 13860
+3  13861 14534 9801
+3  13860 14534 13861
+3  968 4182 966
+3  12313 4182 968
+3  4619 6597 9788
+3  968 969 12313
+3  10081 12313 969
+3  15061 8520 5818
+3  12343 15061 5818
+3  13830 2050 15177
+3  13505 3155 8657
+3  2784 12128 11791
+3  2784 2783 12128
+3  2784 11791 8451
+3  11790 11791 12128
+3  10230 13350 1752
+3  14382 13350 10230
+3  11892 10717 10716
+3  11892 11742 10717
+3  10716 9832 11892
+3  3142 1500 1499
+3  10427 10428 12474
+3  10096 9420 15161
+3  15051 12087 14502
+3  7303 11548 7301
+3  7302 7301 12037
+3  2728 12037 14502
+3  2728 7302 12037
+3  14502 12037 15051
+3  14666 14665 14875
+3  10745 9897 5792
+3  12442 4366 11912
+3  4368 11912 4366
+3  5925 5924 2317
+3  4516 6376 4517
+3  6376 6375 4517
+3  4517 6375 14899
+3  3657 14986 3658
+3  15053 14986 15178
+3  3658 14986 15053
+3  15179 15053 15178
+3  9260 14323 9258
+3  15180 765 6793
+3  15180 15178 9020
+3  15180 9020 765
+3  15178 15088 9020
+3  14986 15088 15178
+3  14986 14985 15088
+3  13852 13766 9093
+3  9206 13852 9093
+3  3845 3847 9943
+3  14282 3845 9943
+3  11293 10781 10244
+3  4144 15058 2086
+3  8173 12455 12822
+3  8173 12822 5566
+3  6780 12846 1528
+3  12822 13065 5566
+3  12305 6780 1528
+3  1850 4612 6933
+3  4613 1850 1852
+3  1851 1850 6933
+3  6020 11913 6021
+3  7225 11913 6020
+3  5749 9428 9429
+3  13370 13946 2273
+3  10917 10976 11033
+3  9164 9166 13371
+3  13370 13369 13946
+3  1160 9903 2213
+3  2475 521 520
+3  2475 14864 521
+3  15135 12969 1160
+3  10085 9203 7570
+3  9203 7571 7570
+3  14125 15135 14895
+3  2151 6998 11393
+3  2150 6998 2151
+3  12317 678 6116
+3  5584 12317 6116
+3  3297 6116 678
+3  12428 14692 14500
+3  14822 14500 14692
+3  15096 8640 9480
+3  13199 8640 15096
+3  11657 13994 10355
+3  10788 378 380
+3  10788 380 5145
+3  11512 11233 11232
+3  6576 751 15181
+3  4774 7719 7718
+3  13817 12811 12810
+3  12810 13818 13817
+3  12812 13818 12810
+3  12812 13051 13818
+3  7947 10246 15182
+3  7947 7948 10246
+3  15182 10246 10248
+3  12049 6308 5527
+3  2169 6547 8624
+3  6386 12288 11094
+3  13780 14559 5309
+3  5307 5309 14559
+3  6096 14347 13780
+3  5307 14559 8151
+3  5310 5307 8151
+3  5310 8151 8150
+3  1085 13938 14898
+3  10348 10322 11218
+3  10321 11218 10322
+3  11851 11385 14806
+3  10985 8799 12923
+3  8797 8799 12272
+3  2861 10507 10477
+3  10985 10987 8799
+3  11753 14737 13434
+3  14737 14738 11511
+3  14738 15156 11511
+3  12457 12476 15156
+3  14738 12457 15156
+3  2938 12457 14738
+3  9187 12123 9188
+3  7103 4591 8273
+3  5365 10583 5366
+3  4901 5366 1856
+3  11852 14541 4955
+3  5929 5928 5960
+3  8995 5011 5010
+3  1636 1006 1008
+3  13277 5839 13179
+3  13277 5837 5839
+3  5959 5929 5960
+3  1632 4159 6188
+3  5152 276 10894
+3  275 12650 276
+3  4612 4613 12577
+3  8798 12923 8799
+3  11219 11709 10331
+3  11709 10332 10331
+3  14843 7746 7595
+3  10908 6084 6655
+3  11726 9349 11727
+3  11895 15183 13113
+3  14238 13113 15183
+3  15165 15184 2133
+3  11549 8104 6738
+3  9645 6738 8104
+3  14757 12086 4304
+3  11012 11228 490
+3  14886 8449 8549
+3  14886 8549 8551
+3  1015 1014 14065
+3  15185 15186 15187
+3  10892 15186 15185
+3  7136 12674 12670
+3  7136 12670 14426
+3  7136 14426 7135
+3  14411 13252 3328
+3  1724 1725 11121
+3  1725 12312 11121
+3  13510 8096 8095
+3  13510 4653 8096
+3  10916 6585 6587
+3  4 3191 12312
+3  4 12312 1725
+3  7877 4543 14262
+3  367 7931 14879
+3  3218 3220 1808
+3  9714 9713 10827
+3  3217 3774 780
+3  15163 6377 6379
+3  9902 8393 11050
+3  11720 14101 10235
+3  15188 9983 215
+3  215 9983 6615
+3  12608 6585 12609
+3  12608 6586 6585
+3  5264 12932 13250
+3  6303 6064 463
+3  12319 8852 568
+3  12319 9726 8852
+3  5558 2577 2046
+3  3306 7148 14586
+3  3306 7145 7148
+3  5667 650 4982
+3  3169 1034 9717
+3  13960 13962 6302
+3  8081 6302 13962
+3  9473 10403 1544
+3  13604 4607 13314
+3  8946 8945 11349
+3  10860 5757 10861
+3  10861 6668 14278
+3  5757 6668 10861
+3  12131 3359 3356
+3  15161 10946 11713
+3  15161 9420 10946
+3  234 11582 13368
+3  1817 3695 13210
+3  8377 648 9344
+3  3285 7477 7476
+3  10547 10546 10881
+3  4484 176 4485
+3  10018 15189 4672
+3  10017 15189 10018
+3  14857 15026 15188
+3  12649 15026 14857
+3  8123 8083 10713
+3  12042 10713 205
+3  10247 10246 12410
+3  13755 2896 13756
+3  10569 8256 8255
+3  9324 4835 12879
+3  1452 12517 4971
+3  3448 15190 13834
+3  3448 2115 15190
+3  13302 14626 11102
+3  4857 13302 14682
+3  14303 10576 5188
+3  14234 14303 8026
+3  11196 11197 15191
+3  14058 5291 11073
+3  14058 5289 5291
+3  6398 7251 6257
+3  6398 3574 7251
+3  6398 6257 3073
+3  15192 12065 12064
+3  7872 130 11528
+3  7347 11528 130
+3  2509 8463 11460
+3  11460 3097 11320
+3  9960 10214 14989
+3  7379 14739 7380
+3  14739 3874 14237
+3  8222 3874 14739
+3  8222 3875 3874
+3  10986 5719 10987
+3  6780 12582 12846
+3  5719 5721 5230
+3  5719 5230 10987
+3  11618 13174 8969
+3  13174 11618 4914
+3  147 149 5030
+3  14745 14332 14631
+3  14290 8509 8511
+3  14291 14484 8509
+3  14291 8509 14290
+3  14332 14746 15193
+3  14332 15193 14333
+3  6104 6103 8689
+3  8689 15194 2612
+3  6104 8689 2612
+3  15194 2703 2701
+3  15194 8689 2703
+3  2612 15194 2701
+3  2612 2701 12991
+3  2701 12740 12991
+3  579 578 10745
+3  6604 518 517
+3  14809 8128 10797
+3  1425 8128 14809
+3  8767 3970 14922
+3  9841 8767 14922
+3  691 8767 9840
+3  1677 6731 1675
+3  767 8967 15195
+3  767 15195 768
+3  2079 2081 10693
+3  9738 2079 10693
+3  804 4948 14274
+3  13286 2971 2973
+3  13286 2973 13025
+3  5113 11108 534
+3  15196 14644 14140
+3  8548 15197 8546
+3  15197 15198 15199
+3  6294 7185 3069
+3  15200 14140 14142
+3  15200 14142 6523
+3  15196 14140 15200
+3  14249 11928 15201
+3  9547 14249 15201
+3  9547 15201 14564
+3  14564 15201 15202
+3  15203 15202 15201
+3  15203 15204 15202
+3  15202 15204 6592
+3  8024 15119 8025
+3  14565 15119 8024
+3  14659 14565 8024
+3  14659 8024 12572
+3  14659 12572 5321
+3  3337 14141 14140
+3  3336 14141 3337
+3  5568 5567 11150
+3  5320 5568 11150
+3  15205 3 75
+3  15206 3 15205
+3  11150 14249 9547
+3  5320 14659 5321
+3  14564 6591 14565
+3  14565 6591 15119
+3  15119 6591 6593
+3  14564 15202 6591
+3  6591 15202 6592
+3  14766 6255 12437
+3  14768 14766 12437
+3  15204 14768 12437
+3  15203 14768 15204
+3  11443 14768 15203
+3  5750 10172 10964
+3  14588 11454 14767
+3  8296 15207 3886
+3  14766 14767 8339
+3  6255 14766 8339
+3  2105 15208 10249
+3  2105 10249 1956
+3  12124 8472 8474
+3  12648 11806 3560
+3  4142 10479 4143
+3  13837 14129 6810
+3  15209 13837 6810
+3  12227 936 5463
+3  10479 12227 5463
+3  4406 4408 12011
+3  3584 4406 12011
+3  6876 6873 14699
+3  11095 5210 13408
+3  11095 13408 12626
+3  1414 13497 5174
+3  2813 14610 12821
+3  2813 12821 12819
+3  12894 14327 10257
+3  3539 4975 4977
+3  3901 3903 7442
+3  15057 9949 1994
+3  1994 9949 9379
+3  7443 4542 12922
+3  12922 4542 7488
+3  6541 15210 15125
+3  7443 12922 6297
+3  365 7527 366
+3  364 366 8782
+3  7447 11784 7514
+3  3478 8808 15211
+3  15211 13198 13197
+3  3478 15211 13197
+3  3479 13197 10224
+3  3479 3478 13197
+3  9115 6216 9116
+3  11146 13263 10642
+3  8604 13263 11146
+3  5416 89 11080
+3  4223 10056 8252
+3  4223 3986 10056
+3  10399 999 12028
+3  14880 9173 15212
+3  12028 12029 6732
+3  5892 8951 5893
+3  6248 11823 14133
+3  2128 1337 4925
+3  10039 10038 3255
+3  3255 10038 3015
+3  15213 3015 10038
+3  6567 15213 10038
+3  15213 6567 6566
+3  11696 10039 3255
+3  9248 11960 9789
+3  2616 12987 12905
+3  2616 2615 12987
+3  14997 14996 12087
+3  15051 14997 12087
+3  6547 12446 8624
+3  12767 7549 11036
+3  4961 1559 1558
+3  12080 598 11380
+3  4870 2012 4871
+3  2013 2012 4870
+3  11904 3226 13489
+3  13489 11905 11904
+3  1538 11905 13489
+3  4887 679 681
+3  5915 679 4887
+3  1461 9271 878
+3  10221 13165 5546
+3  9939 5546 13165
+3  3219 3959 3961
+3  12132 1652 1651
+3  14749 12132 1651
+3  9924 7413 10368
+3  9922 9924 10368
+3  13312 7854 7853
+3  369 7473 9847
+3  9847 7473 7474
+3  8851 13439 3979
+3  3978 8851 3979
+3  13438 3979 13439
+3  4848 14780 7859
+3  4846 4848 7859
+3  1526 3301 1527
+3  12272 8799 5229
+3  12272 5229 964
+3  12968 15214 10079
+3  4912 11562 4913
+3  6051 14183 8110
+3  2142 14183 6051
+3  1060 5784 3289
+3  1060 3289 1061
+3  14461 4875 4720
+3  14461 4720 4719
+3  14435 9881 10210
+3  10210 9881 13117
+3  10211 10210 13117
+3  3919 3836 3835
+3  15138 9157 10154
+3  3524 6359 8253
+3  7651 9739 7652
+3  5082 7652 9739
+3  7911 7652 5082
+3  7028 7029 4053
+3  3401 8385 13088
+3  9583 11151 11792
+3  11792 11151 5084
+3  2558 2557 14909
+3  964 5231 10126
+3  2245 8956 11831
+3  14909 2557 9197
+3  7467 888 14467
+3  7467 14467 15215
+3  7257 13258 15215
+3  7257 15215 14467
+3  5757 5756 6668
+3  3963 13997 3964
+3  273 12421 14143
+3  13095 10099 14270
+3  13095 14270 5922
+3  14143 12421 13845
+3  2678 4404 97
+3  7504 2678 97
+3  7545 3236 15216
+3  7545 15216 12171
+3  9474 12735 5787
+3  10148 11740 5401
+3  12874 6559 9460
+3  9976 9977 15217
+3  15217 9977 11952
+3  5773 10127 10126
+3  385 9469 12578
+3  6530 12577 11152
+3  12481 4494 6952
+3  3848 9733 4866
+3  7113 8940 11047
+3  8996 3960 3959
+3  4634 13027 4635
+3  13026 4635 13027
+3  10237 14110 6823
+3  10237 6823 1577
+3  12530 1763 7913
+3  9137 13114 15218
+3  9137 15218 7989
+3  6350 6352 10607
+3  7091 12869 7092
+3  1965 1964 7091
+3  12513 6247 6224
+3  12513 6224 10282
+3  12513 10282 10281
+3  1139 1142 5203
+3  1142 10397 5203
+3  9927 8842 8841
+3  9927 8841 9994
+3  810 12620 9866
+3  4064 12289 12288
+3  128 14963 654
+3  656 128 654
+3  12824 9040 13065
+3  12822 12824 13065
+3  268 3724 8249
+3  268 8249 13356
+3  12823 3263 12824
+3  3325 854 3326
+3  15219 854 3325
+3  15219 3325 7390
+3  8703 2464 2462
+3  15114 2464 8703
+3  8374 13587 13873
+3  10198 8231 7130
+3  14485 14685 14466
+3  13725 14485 14466
+3  12139 12697 12140
+3  15190 2115 15220
+3  13211 12504 13212
+3  13211 3720 12504
+3  11289 11468 11470
+3  3720 13211 3721
+3  12171 10559 11147
+3  15216 10559 12171
+3  6046 14755 6047
+3  9632 12642 6050
+3  9632 11897 12642
+3  10682 3514 3513
+3  10682 10679 3514
+3  3513 3354 13061
+3  10682 3513 13061
+3  10945 10985 10943
+3  6509 11014 6510
+3  8008 14637 955
+3  12790 14595 13463
+3  8998 12790 13463
+3  2519 12776 10313
+3  8845 9125 6307
+3  2818 14536 2820
+3  13654 2820 14536
+3  5032 8301 3785
+3  8301 12398 3772
+3  7020 8301 3772
+3  14082 8650 14108
+3  6412 14108 8650
+3  14108 6412 2468
+3  14108 6648 14082
+3  14082 6648 8651
+3  6797 8651 6648
+3  12487 13327 12925
+3  5643 3324 10121
+3  5873 8850 15094
+3  7964 5873 15094
+3  7964 15094 7962
+3  8085 5564 14038
+3  681 5227 4888
+3  4888 5227 2372
+3  2372 7260 4888
+3  8373 13587 8374
+3  7280 13587 8373
+3  10606 6350 10607
+3  6926 4025 1596
+3  7182 10006 2655
+3  7182 2655 7183
+3  2655 710 7183
+3  710 2655 2657
+3  9584 14285 5589
+3  14285 13422 5589
+3  3993 11022 8758
+3  14285 12333 13092
+3  5671 5673 11675
+3  8349 5671 11675
+3  5604 4390 5605
+3  5605 8811 5602
+3  6361 8639 3497
+3  10477 14723 10478
+3  15221 365 14973
+3  14973 13139 15221
+3  13139 14973 13571
+3  14973 364 13571
+3  15222 406 10355
+3  15222 407 406
+3  5526 14109 13168
+3  13777 13317 13318
+3  14702 8883 9950
+3  14702 9950 9972
+3  7584 13276 12294
+3  7584 4455 13276
+3  10158 6785 6784
+3  8969 6544 11618
+3  8026 14303 5188
+3  4770 14208 3304
+3  10301 10303 14208
+3  8303 13727 13236
+3  15223 7425 4362
+3  15223 4362 3846
+3  7334 6868 15224
+3  6867 6868 7334
+3  4467 4469 12826
+3  7334 15224 7335
+3  11852 7335 15224
+3  11852 321 7335
+3  11852 318 321
+3  14541 15224 14540
+3  11852 15224 14541
+3  6868 14540 15224
+3  11457 11458 5707
+3  11457 5707 5708
+3  15164 11457 5708
+3  15164 5708 3773
+3  3611 3773 5708
+3  14409 14515 3401
+3  7642 14515 14409
+3  7641 14515 7642
+3  7779 13170 13354
+3  14633 13170 7779
+3  14633 7779 14209
+3  9823 10356 9824
+3  10356 408 9824
+3  11657 10355 9823
+3  9824 408 15184
+3  408 13052 15184
+3  15184 13052 13830
+3  751 6198 4813
+3  11003 13404 14829
+3  8929 9379 7740
+3  1123 9379 8929
+3  2975 7444 11280
+3  11280 7444 6297
+3  13814 14094 2107
+3  13813 14094 13814
+3  2107 14094 2108
+3  13941 15122 13982
+3  14392 9335 13674
+3  15225 11009 6164
+3  15225 100 11010
+3  15225 11010 11009
+3  100 99 11010
+3  7234 2795 10302
+3  435 8262 436
+3  14308 13198 15211
+3  14308 2526 2528
+3  8808 2526 14308
+3  8808 14308 15211
+3  10012 5542 10013
+3  1624 6183 14085
+3  3168 3516 3169
+3  587 11026 2661
+3  13835 15226 14341
+3  15226 11401 11402
+3  14341 15226 11402
+3  7854 7742 627
+3  7849 7929 10660
+3  5031 15227 3174
+3  3174 15227 5578
+3  14500 14499 12428
+3  9132 14344 14911
+3  12429 12428 14499
+3  7168 12429 14499
+3  4980 15228 700
+3  4980 700 1003
+3  700 15228 14057
+3  12415 11639 11142
+3  12415 11638 11639
+3  8832 13540 4234
+3  15229 14057 15228
+3  15229 7785 14057
+3  14670 15228 4980
+3  14670 15229 15228
+3  4319 3832 5068
+3  8755 14675 14366
+3  14675 8755 1925
+3  14471 12910 1512
+3  11935 13919 6580
+3  7526 15152 9791
+3  14953 5691 3582
+3  5130 7688 14854
+3  6892 11062 6410
+3  101 6410 11062
+3  5130 5723 7688
+3  14953 14954 5691
+3  1674 657 654
+3  14963 1674 654
+3  1256 14715 1253
+3  12268 7273 7276
+3  12268 7276 15230
+3  12123 13187 9188
+3  3140 7123 12022
+3  3140 12022 11103
+3  1293 13490 10497
+3  1293 10497 1294
+3  10124 3539 9220
+3  1255 10563 1256
+3  1255 8317 10563
+3  10443 9098 8336
+3  15092 9098 10443
+3  14446 9396 6447
+3  2856 14988 2857
+3  14987 3492 7066
+3  8159 10853 8160
+3  10854 8160 10853
+3  7055 4284 4283
+3  7056 7055 4283
+3  9108 7056 4283
+3  14736 4776 10491
+3  14736 10491 10492
+3  8162 9590 7051
+3  8598 3669 9481
+3  9478 9477 7992
+3  9477 2898 7992
+3  7992 2898 2897
+3  9643 9644 14403
+3  9643 14403 10699
+3  10699 14403 4787
+3  14403 9644 7478
+3  5942 10694 15091
+3  6826 3473 5590
+3  15091 15065 5944
+3  15091 5944 5942
+3  7046 7048 9897
+3  9897 7048 6686
+3  14029 9744 12853
+3  4706 4367 3570
+3  4705 4367 4706
+3  14554 14553 5819
+3  1548 5819 14553
+3  694 14755 5919
+3  12586 5919 14755
+3  3787 5267 3404
+3  6046 12586 14755
+3  3316 9631 9083
+3  15171 3316 9083
+3  3317 15171 5400
+3  10027 14819 3104
+3  2572 615 14469
+3  14469 615 6803
+3  10607 9966 12468
+3  12467 10607 12468
+3  11991 9814 12468
+3  9814 2567 12468
+3  10817 4665 7958
+3  9382 15231 9383
+3  9383 15231 9465
+3  15231 325 9465
+3  325 15231 326
+3  326 15231 9552
+3  9382 9552 15231
+3  12468 9966 11991
+3  14819 218 3104
+3  6033 14034 12172
+3  6033 12172 6943
+3  4191 2405 13169
+3  13169 13170 14633
+3  3148 13169 14633
+3  4192 13169 3148
+3  11724 6747 7420
+3  8544 15186 10893
+3  8545 15186 8544
+3  10791 11414 5758
+3  2848 11414 2846
+3  10791 2846 11414
+3  11097 11182 11098
+3  11338 6776 4066
+3  4066 6776 6778
+3  11314 13106 14939
+3  14459 13106 11314
+3  14813 15064 15232
+3  15064 15233 15232
+3  1986 8232 8234
+3  11529 8232 1986
+3  14830 5377 9061
+3  9060 4903 15118
+3  9060 15118 9061
+3  1742 1744 8526
+3  14879 7931 7930
+3  741 14879 7930
+3  15153 1903 760
+3  759 15153 760
+3  9167 4618 11022
+3  8758 11022 11234
+3  8028 1194 11330
+3  11494 4044 10590
+3  7179 9176 7009
+3  3091 3093 9176
+3  2667 11723 10911
+3  2664 2667 10911
+3  1973 11723 2667
+3  1973 1972 11723
+3  297 3459 3458
+3  14571 13475 9743
+3  13475 14571 9680
+3  13474 13475 9680
+3  7587 11077 7588
+3  10558 7588 11077
+3  12559 13770 4746
+3  8559 13770 12559
+3  11776 4725 4724
+3  8369 15126 8909
+3  8369 14260 15126
+3  14549 15126 14260
+3  14549 14260 14259
+3  15126 13817 8909
+3  8910 8909 13817
+3  10704 10703 724
+3  7409 11605 8193
+3  4376 11376 14555
+3  4376 4379 11376
+3  9097 743 746
+3  8535 14805 2855
+3  2856 10744 14987
+3  7542 10622 4070
+3  10999 14375 13529
+3  13423 13529 14375
+3  621 9236 622
+3  1214 121 14865
+3  1214 14865 14864
+3  3512 5343 14283
+3  3512 14283 14282
+3  5223 13064 1531
+3  11976 2087 15058
+3  6089 4214 7115
+3  4214 4215 7115
+3  4215 14019 7115
+3  9340 6469 12426
+3  11285 11319 8685
+3  12020 12198 12021
+3  7164 14900 10641
+3  1689 1992 1161
+3  4315 3427 15234
+3  15234 1267 9270
+3  9270 4316 15234
+3  4315 15234 4316
+3  3427 1267 15234
+3  8729 11755 10183
+3  13799 11934 6580
+3  4373 11423 12179
+3  8765 6650 2018
+3  2403 8765 14626
+3  13301 2403 14626
+3  2401 2403 13301
+3  5247 2401 13301
+3  5247 15235 2401
+3  15236 15235 5247
+3  5246 15236 5247
+3  5246 11879 15236
+3  15236 11879 15237
+3  15237 11879 15238
+3  11879 14818 15238
+3  14818 14976 15238
+3  15238 14976 15239
+3  14976 7968 15239
+3  15239 7968 15240
+3  7968 13545 15240
+3  13545 13544 15240
+3  13544 13849 15240
+3  13849 9336 15240
+3  15240 9336 15241
+3  15241 9336 15242
+3  15242 9336 4324
+3  2402 13287 7665
+3  4963 8764 7665
+3  4386 13556 8764
+3  3081 1770 15243
+3  3081 15243 3079
+3  1751 15038 15243
+3  1751 14179 15038
+3  13545 7968 7967
+3  14567 11669 6689
+3  3079 15243 15038
+3  3079 15038 12411
+3  1770 1751 15243
+3  1749 1751 1770
+3  15235 773 775
+3  15235 15244 773
+3  15244 4324 773
+3  15244 15242 4324
+3  15237 15242 15244
+3  15236 15237 15244
+3  15235 15236 15244
+3  15237 15238 15242
+3  15242 15238 15241
+3  15238 15239 15241
+3  15239 15240 15241
+3  15245 15246 10199
+3  15247 3277 3409
+3  503 10837 10836
+3  503 5125 10837
+3  9523 8060 8061
+3  8058 8060 14128
+3  9763 14660 9388
+3  13358 14660 9763
+3  8265 14763 9719
+3  7757 14763 8265
+3  11770 13362 15248
+3  11770 15248 11768
+3  3179 11768 3178
+3  12800 3178 11768
+3  12800 11768 15248
+3  7362 9307 5776
+3  5776 9307 11446
+3  2950 2952 6064
+3  4772 13459 8879
+3  4772 8879 4773
+3  14511 11324 14871
+3  12107 12062 12108
+3  2483 14176 13176
+3  2481 2483 13176
+3  11945 9873 11481
+3  8285 9873 11945
+3  12471 9868 9867
+3  12354 12353 13305
+3  13348 13305 12353
+3  12353 13147 14009
+3  5754 5757 10860
+3  11481 15249 9064
+3  2538 2506 2537
+3  2538 2504 2506
+3  14277 15249 11481
+3  14277 12354 15249
+3  3926 10418 261
+3  10755 261 10418
+3  8414 10755 10418
+3  8414 10418 8795
+3  13282 12682 6351
+3  13282 3369 12682
+3  13028 3227 13029
+3  11862 5477 11863
+3  5358 5477 11862
+3  3229 14508 15250
+3  3228 14508 3229
+3  8450 9305 11887
+3  5677 9305 8450
+3  8450 11887 13895
+3  11540 11542 13894
+3  8801 8162 8161
+3  14775 8194 14776
+3  11419 8818 8820
+3  11419 7952 8818
+3  5549 11868 5187
+3  11868 13386 5187
+3  5551 7569 11868
+3  12030 6354 7881
+3  10770 4016 2208
+3  14099 4014 1745
+3  3044 5382 5381
+3  3044 12298 5382
+3  13120 812 814
+3  10332 390 10329
+3  10329 390 5529
+3  1551 4295 1552
+3  5129 7372 5127
+3  5127 7372 15251
+3  7372 13020 15251
+3  15252 15251 13020
+3  1000 15252 13020
+3  1000 13020 1001
+3  12238 15253 1000
+3  1000 15253 15254
+3  15253 15255 15254
+3  15255 12112 15254
+3  15254 12112 10624
+3  2383 5127 15251
+3  2384 2383 15251
+3  15252 2384 15251
+3  15252 10624 2384
+3  15252 15254 10624
+3  1000 15254 15252
+3  300 12112 15255
+3  15256 300 15255
+3  15256 15255 15253
+3  15257 15256 15253
+3  12238 15257 15253
+3  13703 12117 10366
+3  7755 7754 13673
+3  12189 9394 9393
+3  3270 9393 3271
+3  14301 3837 12370
+3  14301 11051 3837
+3  7687 11592 14711
+3  13033 14711 11592
+3  8539 12188 9393
+3  8539 9393 3270
+3  8057 10221 15097
+3  74 15205 75
+3  10622 15205 74
+3  1843 6517 1838
+3  10049 13553 13552
+3  10049 4644 13553
+3  4644 7153 13553
+3  14785 14778 2930
+3  14785 14376 14778
+3  14376 14785 9244
+3  9244 14785 14786
+3  9581 10049 12257
+3  6517 9581 12257
+3  5277 1843 14427
+3  14373 5277 14427
+3  15258 5277 14373
+3  15258 15259 5277
+3  15259 5895 5277
+3  15259 1199 5895
+3  15260 1199 15259
+3  15260 15259 15258
+3  8413 15260 15258
+3  8413 15258 3502
+3  3502 15258 14372
+3  14372 15258 14373
+3  6490 8246 15261
+3  6490 15261 12144
+3  15261 14427 12144
+3  14373 14427 15261
+3  8245 14373 15261
+3  15220 2734 2954
+3  2115 2734 15220
+3  13970 14790 12085
+3  11984 12085 14790
+3  8693 3502 14372
+3  8692 3502 8693
+3  14790 11523 11984
+3  15229 14670 11802
+3  10250 13932 13319
+3  4243 13932 10250
+3  5967 5294 5296
+3  9296 5294 5967
+3  3665 12177 3666
+3  2609 8466 1920
+3  10934 15262 3665
+3  3665 15262 15263
+3  15262 13002 15263
+3  13002 14695 15263
+3  14695 12177 15263
+3  15263 12177 3665
+3  15264 3082 14695
+3  13001 15264 14695
+3  13002 13001 14695
+3  12718 978 14812
+3  14235 11359 13690
+3  11359 14235 14102
+3  7548 14235 7549
+3  14235 13690 11036
+3  9409 11554 9410
+3  5908 2720 5909
+3  5571 5573 7995
+3  15265 15266 13388
+3  15265 13388 13002
+3  15267 15265 13002
+3  15267 13002 15262
+3  15268 15267 15262
+3  15268 15262 10934
+3  10935 15268 10934
+3  2609 1920 1922
+3  10935 298 300
+3  15269 10935 300
+3  15269 300 15256
+3  15269 15256 15270
+3  15270 15256 15257
+3  15271 15270 15257
+3  11959 15271 15257
+3  15271 15272 15270
+3  15272 15269 15270
+3  15269 15272 15268
+3  15272 15267 15268
+3  15272 15273 15267
+3  15273 15265 15267
+3  15273 15274 15265
+3  15274 15266 15265
+3  15275 15266 15274
+3  15273 15276 15274
+3  15277 15276 15273
+3  15277 15273 15271
+3  15271 15273 15272
+3  15269 15268 10935
+3  13923 14859 14104
+3  14104 14859 15278
+3  14859 15279 15278
+3  15278 15279 12461
+3  12461 15279 15280
+3  15280 15279 8412
+3  15279 8928 8412
+3  8928 15281 8412
+3  8412 15281 8413
+3  8413 15281 15260
+3  15281 15282 15260
+3  15260 15282 14786
+3  15282 9244 14786
+3  9245 9244 15282
+3  9245 15282 14681
+3  15281 14681 15282
+3  8928 14681 15281
+3  12057 13249 12237
+3  12057 6768 13249
+3  8926 8928 15279
+3  14859 8926 15279
+3  11906 12217 12318
+3  13921 13923 14268
+3  13923 7548 14268
+3  3226 11904 11906
+3  3226 11906 12318
+3  15260 14786 1199
+3  3501 15280 8412
+3  3501 12462 15280
+3  12461 15280 12462
+3  12460 15146 12461
+3  15146 15278 12461
+3  11359 15278 15146
+3  12260 14289 12261
+3  15145 15146 15283
+3  12460 15283 15146
+3  9124 15283 12460
+3  9125 9124 12462
+3  6307 9125 12462
+3  9124 5990 15283
+3  5990 15284 15283
+3  15284 15264 15283
+3  15264 15145 15283
+3  15264 13001 15145
+3  13001 11358 15145
+3  3082 15264 15284
+3  13917 3082 15284
+3  13917 15284 5990
+3  13917 3083 3082
+3  4371 3083 13917
+3  11359 14102 15278
+3  14102 14104 15278
+3  7372 5283 13020
+3  15044 15285 11994
+3  15044 11994 11534
+3  1455 5368 13709
+3  2803 10980 2869
+3  8226 11629 11371
+3  8843 12544 14163
+3  15285 6687 11993
+3  15285 11993 11994
+3  9018 9835 8566
+3  10994 2970 9084
+3  9085 9084 2970
+3  10534 6184 12552
+3  8898 8899 4250
+3  4252 4250 8899
+3  15074 12230 5462
+3  11565 15074 5460
+3  5462 5460 15074
+3  15212 11064 10866
+3  15212 9175 11064
+3  10064 10063 13782
+3  2139 5378 2136
+3  2139 5376 5378
+3  12402 15286 10182
+3  12402 10182 11543
+3  12029 6731 6732
+3  15127 12430 7168
+3  7167 15127 7168
+3  11543 10182 10181
+3  10258 6007 9569
+3  10258 6008 6007
+3  14367 13555 2019
+3  4218 4217 11934
+3  13662 7578 7580
+3  4218 11934 13799
+3  6093 9583 3195
+3  7202 8254 10353
+3  3963 7405 13997
+3  8107 5395 8108
+3  6065 9739 14950
+3  14950 9739 7651
+3  2696 14950 7651
+3  13924 14311 14639
+3  13924 9390 14311
+3  1761 11442 11441
+3  9514 1761 11441
+3  1759 1761 9514
+3  4721 3379 3378
+3  4720 3379 4721
+3  1755 9007 11318
+3  1755 11318 7461
+3  4721 3378 14657
+3  12678 4721 14657
+3  1741 801 13373
+3  803 13373 801
+3  14800 11640 12657
+3  4507 4506 11640
+3  4507 11640 14800
+3  3218 1808 1810
+3  5267 13747 3404
+3  5266 13747 5267
+3  8805 13281 13762
+3  8805 13762 11212
+3  13100 2202 11428
+3  5914 13100 11428
+3  10110 6240 6242
+3  10110 10109 6240
+3  10245 6240 10109
+3  2222 13920 8441
+3  2221 13920 2222
+3  156 11007 8923
+3  4829 4828 14944
+3  13840 11421 14748
+3  13840 14748 14604
+3  14604 14748 5660
+3  13423 14990 15287
+3  13424 13423 15287
+3  4691 376 15288
+3  376 14993 15288
+3  15289 15288 14993
+3  14993 14115 15289
+3  14115 15290 15289
+3  14115 11181 15290
+3  15291 13424 15287
+3  14748 6822 5660
+3  14748 14202 6822
+3  5467 7468 7470
+3  7539 5420 14063
+3  14075 7336 14171
+3  14076 7336 14075
+3  14076 14488 7336
+3  13168 14109 14110
+3  13168 3124 7117
+3  14110 3124 13168
+3  7895 5336 5338
+3  7895 5338 15061
+3  12947 9283 9282
+3  13711 12119 6452
+3  10451 15292 14470
+3  10343 10342 8554
+3  10342 8552 8554
+3  11364 8552 10342
+3  8631 8633 9782
+3  14636 13897 10467
+3  14636 10467 15293
+3  13562 12828 13782
+3  12828 13562 12829
+3  7467 15215 13880
+3  15215 14531 13880
+3  13258 14531 15215
+3  675 14531 13258
+3  672 675 13258
+3  1673 15294 3302
+3  1674 1673 3302
+3  11069 11068 1704
+3  11069 1704 7999
+3  6956 14475 11068
+3  1913 2414 10526
+3  7060 882 883
+3  13000 3888 9992
+3  9992 3888 9993
+3  13000 14523 3888
+3  13776 3889 14523
+3  3889 3888 14523
+3  15295 2646 13847
+3  14107 7060 7059
+3  14107 7059 15093
+3  14107 11343 7060
+3  14926 4011 14263
+3  15185 4094 4093
+3  13617 15185 4093
+3  10483 15028 14155
+3  3807 13859 8288
+3  6176 3511 3510
+3  6176 3510 8145
+3  15296 8873 12284
+3  1121 1120 7752
+3  1120 6132 7752
+3  1120 6133 6132
+3  10172 6133 1120
+3  13983 10632 10631
+3  13983 10631 13624
+3  13467 2921 6381
+3  2920 12636 2921
+3  14991 5866 2376
+3  15112 9840 15297
+3  15297 9840 9841
+3  15034 15297 14921
+3  9687 4723 852
+3  12140 12697 1313
+3  13690 13692 11036
+3  5796 5798 8233
+3  14101 9410 14424
+3  11554 14424 9410
+3  515 514 14047
+3  7120 515 14047
+3  5527 6308 5528
+3  14183 2144 14757
+3  14183 14757 4304
+3  7120 14047 14995
+3  7121 7120 14995
+3  5528 6308 8692
+3  8292 13079 12003
+3  6075 12003 13079
+3  3019 14781 1752
+3  3019 1752 1749
+3  10230 14781 3020
+3  14781 3019 3020
+3  4946 13220 12930
+3  4946 13221 13220
+3  12930 13220 12931
+3  10503 7043 7045
+3  10503 8466 2609
+3  10503 7045 8466
+3  13846 3476 4335
+3  879 1722 11216
+3  879 11216 877
+3  7869 294 293
+3  12090 12091 12136
+3  8434 8433 7023
+3  7021 7023 8433
+3  14299 12370 9053
+3  13307 8740 14816
+3  14640 14816 8740
+3  15298 8716 12937
+3  11610 8716 15298
+3  7575 15298 14867
+3  12937 14867 15298
+3  7575 15299 15298
+3  10458 15299 7575
+3  11610 15298 6273
+3  8879 5633 4773
+3  5564 12866 8163
+3  8163 12866 8161
+3  8161 12866 10411
+3  1332 6842 14254
+3  1841 2726 1842
+3  2725 1842 2726
+3  13687 11680 8034
+3  10404 13687 8034
+3  10404 8034 15048
+3  4815 14361 12107
+3  5754 13746 13735
+3  5754 10860 13746
+3  12062 12107 14361
+3  7854 13312 7742
+3  9014 14191 13306
+3  10965 14439 15187
+3  10965 4084 14439
+3  4541 4540 3119
+3  7111 7313 8201
+3  7312 8201 7313
+3  2538 8201 7312
+3  15227 12076 12078
+3  4908 4907 13507
+3  10152 12078 5398
+3  12397 1516 13900
+3  4909 4908 14431
+3  4909 14431 6347
+3  4909 6347 11502
+3  377 374 3940
+3  377 3940 2906
+3  2906 3940 13089
+3  4990 5489 8278
+3  10060 8278 5489
+3  4991 5489 4990
+3  15300 15301 10770
+3  14911 14344 8291
+3  14911 8291 8290
+3  465 7014 14710
+3  6666 465 14710
+3  15116 14710 7014
+3  3321 12349 8979
+3  3321 8979 8978
+3  14429 12349 3321
+3  14429 12347 12349
+3  13787 8239 698
+3  15302 8239 13787
+3  15302 10906 8239
+3  11652 1222 1221
+3  3321 8978 9568
+3  8871 8870 10667
+3  8870 13954 3877
+3  8870 3877 10667
+3  13954 8870 8873
+3  6749 15303 5898
+3  9608 9609 10720
+3  10721 10720 9609
+3  10476 5495 5494
+3  10112 10476 5494
+3  12817 10207 10206
+3  2335 13780 12632
+3  2335 5936 13780
+3  13718 12158 13719
+3  14027 11321 10295
+3  14027 10295 6806
+3  12158 14663 13719
+3  3043 5345 5129
+3  10642 8948 8947
+3  3487 687 8837
+3  10305 1747 7645
+3  15304 8585 9326
+3  15305 15304 9326
+3  794 11111 9536
+3  10048 13826 4546
+3  10048 4546 4548
+3  13640 7611 15306
+3  15307 15306 7611
+3  15307 7611 14568
+3  7612 14992 14569
+3  14992 15308 14569
+3  6913 14569 15308
+3  6913 15308 15309
+3  15308 14639 15309
+3  14639 4851 15309
+3  15309 4851 14268
+3  4851 13921 14268
+3  14639 4852 4851
+3  7547 15309 14268
+3  7547 6913 15309
+3  6911 6913 7547
+3  1137 15310 12623
+3  15311 14569 6913
+3  15311 14568 14569
+3  8584 14568 15311
+3  15304 8584 8585
+3  7287 8584 15304
+3  13966 7287 15304
+3  7287 7289 8584
+3  8584 7289 15307
+3  7289 15312 15307
+3  15307 15312 15306
+3  15312 14417 15306
+3  14417 10976 15306
+3  15306 10976 13640
+3  15313 13664 4847
+3  2657 7747 5544
+3  7226 9047 6469
+3  794 9536 13875
+3  3454 11033 14417
+3  7522 3454 14417
+3  7522 14417 15312
+3  7289 7522 15312
+3  792 11033 3454
+3  8584 15307 14568
+3  13924 14639 15308
+3  14992 13924 15308
+3  11036 13692 11037
+3  13692 15314 11037
+3  15315 11037 15314
+3  15275 15315 15314
+3  15275 15314 15266
+3  15276 15275 15274
+3  15277 5948 15276
+3  15276 5948 15316
+3  5948 13094 15316
+3  13094 15315 15316
+3  15316 15315 15275
+3  15276 15316 15275
+3  15142 15315 13094
+3  5948 139 13094
+3  15317 9328 15142
+3  15142 9328 15315
+3  9328 13816 15315
+3  15315 13816 11037
+3  5949 5948 15277
+3  11959 5949 15277
+3  15277 15271 11959
+3  1313 10214 12140
+3  14503 15318 10138
+3  4701 15318 14503
+3  4701 4700 15318
+3  15318 4700 3660
+3  4700 7666 3660
+3  9740 9310 9312
+3  10926 10928 4902
+3  4902 10928 12566
+3  4901 14965 4902
+3  14965 10926 4902
+3  4300 10926 14965
+3  14532 4300 15319
+3  15319 4300 14965
+3  1855 15319 14965
+3  1855 11196 15319
+3  11196 14532 15319
+3  8626 8132 5397
+3  11196 15191 14292
+3  14292 15191 15320
+3  15321 15320 15191
+3  15322 15320 15321
+3  15322 15323 15320
+3  15323 14167 15320
+3  15320 14167 14292
+3  15324 8791 8790
+3  15323 8790 14167
+3  15323 14875 8790
+3  14875 15324 8790
+3  14875 14665 15324
+3  14665 12574 15324
+3  34 11881 13162
+3  13162 11881 15325
+3  15325 11881 4743
+3  15325 4743 12574
+3  14665 15325 12574
+3  14665 3634 15325
+3  3634 13162 15325
+3  15326 34 15327
+3  34 15326 35
+3  15326 15328 35
+3  35 15328 11453
+3  11453 15328 10993
+3  15328 4399 10993
+3  9310 9740 9743
+3  1662 13284 1660
+3  9743 13475 9310
+3  1670 4407 4406
+3  5689 6789 14764
+3  2289 9186 2290
+3  6789 12916 6790
+3  2062 2061 9835
+3  12102 13294 12103
+3  12103 13294 14321
+3  12594 12103 8538
+3  15329 12103 12594
+3  13612 15329 12594
+3  3564 15329 13612
+3  7563 3564 13612
+3  7562 7563 13612
+3  13649 3564 7563
+3  14722 1748 13511
+3  11809 13511 1748
+3  15330 5101 8701
+3  15331 15330 8701
+3  15331 8701 13649
+3  15331 13649 11008
+3  4125 11888 8175
+3  6763 5689 14764
+3  6763 14764 5099
+3  15330 6763 5099
+3  5099 5101 15330
+3  15331 6763 15330
+3  964 10126 965
+3  3207 11764 6741
+3  11872 11764 3207
+3  14085 3025 7823
+3  10597 8570 13755
+3  7929 7928 13538
+3  10660 13538 10139
+3  7929 13538 10660
+3  12647 14783 6231
+3  10386 10660 9394
+3  9394 10660 13829
+3  10660 10139 13829
+3  4967 1102 1824
+3  14503 10138 6382
+3  14503 6382 14504
+3  14504 6382 11452
+3  11452 6382 6384
+3  14256 7678 5953
+3  7678 15332 5953
+3  15332 5683 5953
+3  14256 5953 11389
+3  14256 11389 11452
+3  11452 11389 14504
+3  15332 10312 5683
+3  3793 13826 11377
+3  12776 13903 13872
+3  13903 15322 13872
+3  15322 5399 13872
+3  15322 15321 5399
+3  5399 15321 8796
+3  8796 15321 15191
+3  8796 15191 1854
+3  6546 14151 15333
+3  15322 13903 15323
+3  13903 15334 15323
+3  15334 14875 15323
+3  9728 14875 15334
+3  1437 3634 15335
+3  1437 15335 15336
+3  15336 15335 15337
+3  15335 9728 15337
+3  15337 9728 2518
+3  6729 11017 11779
+3  11539 11017 6729
+3  2517 15337 2518
+3  8779 15337 2517
+3  8779 15336 15337
+3  9619 15336 8779
+3  9619 1438 15336
+3  1438 1437 15336
+3  15327 1438 15338
+3  15338 1438 15339
+3  15339 1438 9619
+3  15339 9619 9618
+3  6182 15339 13337
+3  6182 15338 15339
+3  6181 15338 6182
+3  15326 15338 6181
+3  15326 15327 15338
+3  15328 15326 6181
+3  4399 15328 6181
+3  4399 6181 1624
+3  6182 13337 3025
+3  13337 3026 3025
+3  7678 8779 15332
+3  8779 2517 15332
+3  15332 2517 10312
+3  12946 9464 10188
+3  11593 12924 1666
+3  12863 10959 13041
+3  12863 13041 1468
+3  6162 2050 2049
+3  6162 15177 2050
+3  10580 15340 12035
+3  11843 15340 10580
+3  7068 12035 15340
+3  15340 7066 7068
+3  15340 14988 7066
+3  15340 11843 14988
+3  14988 11843 2857
+3  2857 11843 7761
+3  2858 2857 7761
+3  9908 1070 3743
+3  2840 12223 12224
+3  7773 6195 12224
+3  9119 755 9118
+3  9119 2626 755
+3  2625 755 2626
+3  11826 12261 14289
+3  15341 3952 3949
+3  14354 15341 3949
+3  293 4190 7214
+3  293 7214 7870
+3  10112 10111 15341
+3  10112 15341 14354
+3  10112 14354 10476
+3  14354 3949 10474
+3  10475 10474 3949
+3  6332 5070 5069
+3  2017 2016 4681
+3  4680 2017 4681
+3  15342 13416 12309
+3  15342 12309 12311
+3  3191 12311 12312
+3  3191 15342 12311
+3  14736 10492 12671
+3  10492 13416 12671
+3  6432 7982 9483
+3  7088 9871 7298
+3  7297 7088 7298
+3  10444 3199 3198
+3  12999 14804 12493
+3  12999 12493 14555
+3  14555 12493 4377
+3  4614 4377 12493
+3  3300 3299 12359
+3  3300 12359 13907
+3  3298 12479 3299
+3  10889 4803 4802
+3  2049 12120 6163
+3  12118 12120 2049
+3  2048 12118 2049
+3  13724 588 590
+3  9260 9259 3517
+3  9260 3517 14069
+3  408 9308 13052
+3  408 407 9308
+3  9308 407 6453
+3  407 15343 6453
+3  15343 5740 6453
+3  11478 11477 6252
+3  6453 6452 12118
+3  6253 12385 11478
+3  6253 11478 6252
+3  5741 5740 8100
+3  5740 8101 8100
+3  12572 3338 4360
+3  15343 13292 8101
+3  5740 15343 8101
+3  15343 15222 13292
+3  13292 15222 13995
+3  15222 10355 13995
+3  12689 9357 13494
+3  11656 15344 11657
+3  11656 14903 15344
+3  14903 15345 15344
+3  15344 15345 15346
+3  14266 15346 15345
+3  14266 15345 11544
+3  15345 14903 11544
+3  11544 14903 11545
+3  9099 8358 3752
+3  15165 12940 9824
+3  9824 15184 15165
+3  2134 15184 13830
+3  2134 13830 15347
+3  13830 15177 15347
+3  15347 15177 10811
+3  10811 15177 10812
+3  10812 15177 6162
+3  12295 15347 10811
+3  2135 15347 12295
+3  2313 11224 11223
+3  2313 8839 11224
+3  2134 15347 2135
+3  15153 3752 8358
+3  14793 10204 10687
+3  9430 15286 12402
+3  9430 14007 15286
+3  255 15286 14007
+3  15176 12547 14126
+3  14265 6130 12368
+3  14265 12368 15348
+3  12368 12367 15348
+3  12367 13995 15348
+3  15344 15346 15348
+3  14265 15348 15346
+3  14266 14265 15346
+3  4874 4786 4785
+3  4874 4785 7478
+3  7958 4665 7959
+3  2094 7959 4456
+3  12573 8714 15176
+3  9758 10182 15286
+3  255 9758 15286
+3  12367 13292 13995
+3  6436 10109 6437
+3  10678 10109 6436
+3  15343 407 15222
+3  14617 15349 2643
+3  14617 13080 15349
+3  14479 11005 6583
+3  6933 6935 3794
+3  12164 1096 15350
+3  15350 1096 10050
+3  994 996 12799
+3  2759 2761 985
+3  2045 12164 15350
+3  15351 1475 13519
+3  6152 1475 15351
+3  6155 6152 10217
+3  15351 10217 6152
+3  6067 12130 9153
+3  6067 9153 10994
+3  10218 15351 13519
+3  13132 7295 15352
+3  13918 13132 15352
+3  4075 3053 11741
+3  12964 10111 12763
+3  7232 5496 5495
+3  13875 2584 6228
+3  6227 13875 6228
+3  4849 5496 7232
+3  2159 10104 2160
+3  2159 9358 10104
+3  2159 9359 9358
+3  2362 12945 5002
+3  14796 12945 2362
+3  2041 2043 12079
+3  2041 12079 6816
+3  5813 6953 4494
+3  6952 4494 6953
+3  13649 8701 3565
+3  14197 7894 7892
+3  13188 7894 11521
+3  14197 11521 7894
+3  10338 8166 10286
+3  14584 12542 15199
+3  15198 3622 14584
+3  15198 14584 15199
+3  12279 6754 14148
+3  12279 3216 6754
+3  11274 5941 9896
+3  12652 11274 9896
+3  12652 2139 11274
+3  2138 11274 2139
+3  11460 8463 3095
+3  3010 15148 14189
+3  12761 7208 7209
+3  2514 2516 40
+3  39 2514 40
+3  14493 2514 39
+3  9159 2264 9160
+3  14114 14113 12813
+3  12813 14113 6035
+3  6035 6827 12813
+3  14527 5864 5866
+3  7585 12536 14003
+3  403 8644 11914
+3  1143 1145 13084
+3  2715 2714 3963
+3  3571 5087 3609
+3  3434 5088 5087
+3  10901 10902 6685
+3  10902 14470 6685
+3  3434 3436 5088
+3  11279 14753 14752
+3  7766 14753 11279
+3  14075 14753 7766
+3  14826 13377 9133
+3  14826 11379 13377
+3  6015 193 9802
+3  1033 9791 1034
+3  4189 5085 4190
+3  9566 6639 14236
+3  7214 4190 5085
+3  12512 3173 533
+3  3173 3175 533
+3  12045 14227 6987
+3  6987 14227 12836
+3  4220 9954 3173
+3  10241 12296 12295
+3  6817 14469 6818
+3  10241 6310 12296
+3  14186 14712 7139
+3  3173 12512 4220
+3  7462 6110 2273
+3  14701 8446 8996
+3  13371 8446 14701
+3  8995 14701 8996
+3  14900 10917 7281
+3  14900 10975 10917
+3  14931 15353 12014
+3  14931 12014 3106
+3  14931 5661 15353
+3  6548 9623 6549
+3  10064 12828 10648
+3  4699 13014 12683
+3  4699 14226 13014
+3  1977 6727 13462
+3  7731 6727 1977
+3  4134 11957 10025
+3  10025 11957 10026
+3  10026 11957 10255
+3  9098 4272 9097
+3  13964 7021 9744
+3  14096 9744 7021
+3  12983 14643 14096
+3  12983 4340 14643
+3  9582 970 3196
+3  9582 3196 3195
+3  3196 970 972
+3  12042 6202 6085
+3  11864 11328 14118
+3  10704 11965 6925
+3  724 722 11965
+3  724 11965 10704
+3  12560 15354 9030
+3  12722 7424 12718
+3  13053 13072 15052
+3  15213 3013 3015
+3  3443 3442 9784
+3  15208 12721 12720
+3  4342 4344 7632
+3  7632 4344 7633
+3  11009 8023 12196
+3  9236 9783 187
+3  14762 1496 15009
+3  13391 4726 13710
+3  4725 13710 4726
+3  14152 7729 9757
+3  9756 14762 15008
+3  9756 15008 9757
+3  15008 14152 9757
+3  5163 14152 15008
+3  15008 14762 15009
+3  1462 11268 2963
+3  2963 11268 8700
+3  13631 7932 12412
+3  7930 7932 13631
+3  2648 14028 2649
+3  4644 8521 2930
+3  6086 10471 9748
+3  5106 15059 4421
+3  4339 12983 7311
+3  4339 7311 7313
+3  7312 7311 14580
+3  12983 14580 7311
+3  9202 13639 15076
+3  11559 5849 15355
+3  12544 7792 14163
+3  12544 7790 7792
+3  12006 2205 14687
+3  7662 7664 12006
+3  12542 13368 11582
+3  14584 13368 12542
+3  11371 11629 7308
+3  11629 8829 7310
+3  6267 9704 6268
+3  8226 7300 11629
+3  8829 11629 7300
+3  6000 5933 11510
+3  6000 4529 5933
+3  11765 7799 14542
+3  9290 14714 253
+3  14714 11671 253
+3  6743 11683 6744
+3  15356 12389 6744
+3  11683 15356 6744
+3  15356 15357 12389
+3  11682 15033 11683
+3  14288 6024 2835
+3  12835 6988 6987
+3  13071 5574 2257
+3  14381 13145 11209
+3  13238 14381 11209
+3  12249 13451 13606
+3  3827 8468 4488
+3  8468 1967 7598
+3  5025 10794 10795
+3  15358 10078 10079
+3  15358 10079 15214
+3  5506 6511 12928
+3  10944 1848 110
+3  10944 110 10945
+3  6509 6511 5506
+3  9894 13383 5390
+3  9893 9894 5390
+3  5498 4063 9894
+3  9894 4063 11567
+3  10248 15359 15360
+3  15359 2864 15360
+3  2863 946 15360
+3  2863 15360 2864
+3  10248 15360 13584
+3  946 13584 15360
+3  14402 14754 10956
+3  3299 12358 12359
+3  12649 14856 11832
+3  14856 15214 12968
+3  11832 14856 12968
+3  12649 14857 14856
+3  14228 7674 8839
+3  2313 14228 8839
+3  4703 1655 1654
+3  2841 15361 13611
+3  3061 15160 11415
+3  3060 15160 3061
+3  15160 3060 10097
+3  3059 480 10097
+3  3060 3059 10097
+3  481 480 3059
+3  7590 13796 4710
+3  15362 13796 7590
+3  13796 15362 13984
+3  13796 13984 3006
+3  7627 9170 2866
+3  452 454 11946
+3  3368 13282 15363
+3  8410 3368 15363
+3  15363 13282 2502
+3  8410 15363 2502
+3  7110 5756 13671
+3  3644 7313 7111
+3  13671 13509 13930
+3  3644 7111 13930
+3  7110 13671 13930
+3  7111 7110 13930
+3  6685 15292 10450
+3  12145 5864 14528
+3  14528 5864 14527
+3  9929 6985 14587
+3  9929 14587 447
+3  446 9929 447
+3  458 9929 446
+3  1022 1021 3260
+3  8310 2232 2231
+3  4669 2758 2757
+3  14698 12786 13864
+3  12786 5421 13864
+3  10387 14327 12893
+3  12189 14327 10387
+3  12926 7083 14065
+3  14065 7083 7084
+3  2524 10885 2525
+3  12926 14065 1014
+3  6927 13342 12329
+3  11688 10502 12840
+3  4053 4054 5062
+3  14061 14060 361
+3  3664 4060 13726
+3  13227 9732 11265
+3  4593 9732 13227
+3  4593 13227 13226
+3  12840 12015 13734
+3  3652 13967 13241
+3  13967 9809 13241
+3  2285 2284 837
+3  11748 1931 11583
+3  1933 11583 1931
+3  14055 11583 1933
+3  1933 12173 14055
+3  14525 14055 12173
+3  10137 10321 1934
+3  14930 10883 5295
+3  14930 5295 9295
+3  4856 5248 4857
+3  14291 9598 12538
+3  2398 4806 2399
+3  3217 12279 11255
+3  5890 3391 6871
+3  2399 4805 5063
+3  15364 10316 15123
+3  15131 3821 15123
+3  15364 15123 3821
+3  15213 6566 8980
+3  10108 8904 4374
+3  3254 9202 15076
+3  15365 14020 12205
+3  11961 15365 12205
+3  9411 11721 15365
+3  13461 10708 13965
+3  15339 9618 15366
+3  8451 11789 13522
+3  12772 8451 13522
+3  15367 6657 9365
+3  8582 10625 6656
+3  14537 9550 14180
+3  13609 9117 6577
+3  9117 13609 14843
+3  3685 1240 3686
+3  4440 5787 12735
+3  5886 257 123
+3  3482 3823 7294
+3  8736 7395 7394
+3  11432 12019 3305
+3  10874 12019 11432
+3  246 6204 10011
+3  10010 10011 6204
+3  11178 11557 1030
+3  6288 14028 13366
+3  8453 3469 9127
+3  2649 14028 6336
+3  14028 6288 6336
+3  4591 4593 15368
+3  4591 15368 8273
+3  14551 6486 53
+3  14551 53 9318
+3  13392 14551 9318
+3  11332 14551 13392
+3  12281 15313 5521
+3  13392 9318 8621
+3  12281 14253 15313
+3  15369 13435 15127
+3  7173 13435 15369
+3  2008 2764 2009
+3  356 12029 999
+3  8205 12029 356
+3  641 15370 27
+3  15370 7382 27
+3  7382 9425 27
+3  7817 15371 7818
+3  7817 8140 15371
+3  15372 7400 15371
+3  15373 3966 4370
+3  14449 2909 2910
+3  3914 2909 14449
+3  3914 2786 2909
+3  6942 6941 8683
+3  2631 6942 8683
+3  2632 2631 8683
+3  11633 1230 13826
+3  1365 11633 3792
+3  11851 1365 3792
+3  14283 12215 15223
+3  14283 15223 3845
+3  15223 3846 3845
+3  5343 12215 14283
+3  10250 4242 4243
+3  13319 5350 10250
+3  6749 1833 1832
+3  13470 4621 11714
+3  3128 11167 10923
+3  14134 10043 10042
+3  10341 12458 4783
+3  11412 10045 10043
+3  13072 13219 15374
+3  15374 13219 11923
+3  13480 15374 11923
+3  13853 15374 13480
+3  13072 15374 13853
+3  15052 13072 13853
+3  9607 15052 13853
+3  7593 11805 4704
+3  5485 6123 9593
+3  9593 6123 4702
+3  5485 9593 5483
+3  13009 8977 13566
+3  13009 13566 12280
+3  13566 8977 7262
+3  13480 11923 13476
+3  8001 11319 2958
+3  7086 7085 6253
+3  13599 6253 7085
+3  11959 15257 15375
+3  1439 1441 5788
+3  4884 7594 4885
+3  11959 15375 8723
+3  15375 12238 8723
+3  997 9275 3704
+3  997 3704 3706
+3  997 3706 2377
+3  997 994 9275
+3  7943 9275 994
+3  7944 7943 994
+3  13704 15049 1042
+3  11092 11091 13832
+3  2522 13704 1042
+3  7403 11524 1381
+3  7942 13066 7943
+3  12522 3788 13019
+3  12522 13019 4006
+3  12522 4006 4007
+3  6310 3146 12296
+3  3907 3908 5054
+3  13114 2595 2594
+3  11744 10191 8459
+3  6587 7877 10913
+3  6587 10913 10916
+3  10913 7877 10914
+3  8902 8901 1372
+3  8902 1372 15065
+3  7075 13048 14340
+3  7076 7075 14340
+3  12711 6479 13560
+3  5000 5736 14224
+3  5000 14224 10843
+3  117 4268 4267
+3  13884 15293 15376
+3  14636 15293 13884
+3  15376 15293 10466
+3  10467 10466 15293
+3  3355 15376 10466
+3  3354 15376 3355
+3  13885 15376 3354
+3  13885 13884 15376
+3  192 3172 4627
+3  4627 3172 3171
+3  192 822 3172
+3  3172 822 2787
+3  2247 2249 1553
+3  516 515 966
+3  15377 2893 8994
+3  7789 14835 567
+3  11666 14835 7789
+3  9799 514 516
+3  10403 9473 10834
+3  526 2026 527
+3  15131 15123 4589
+3  15131 4589 4588
+3  3982 677 1435
+3  10186 6568 5347
+3  5346 10186 5347
+3  5279 5280 12506
+3  13701 3841 14329
+3  3376 7112 7113
+3  10830 15207 8296
+3  10830 8296 5842
+3  12164 12163 1096
+3  2761 8296 3886
+3  630 2479 2478
+3  15378 14232 14231
+3  15378 14231 10760
+3  12196 8023 8022
+3  6362 15379 381
+3  4135 381 15379
+3  10254 15379 13462
+3  4135 15379 10254
+3  15379 6362 13462
+3  1232 4547 4546
+3  1232 4546 1230
+3  14838 3953 14447
+3  10070 3953 14841
+3  7241 6491 9001
+3  4315 4818 14774
+3  4315 14136 4818
+3  5152 4965 277
+3  8157 4965 5152
+3  12972 3687 12973
+3  14320 8486 11312
+3  12913 14320 11312
+3  12973 3687 5282
+3  9031 9202 12560
+3  7242 9001 2156
+3  3925 10333 8580
+3  11277 4885 9378
+3  5213 14579 14049
+3  12253 13828 12254
+3  15380 1391 4289
+3  9019 5113 534
+3  12046 1391 15380
+3  5113 9019 4884
+3  5591 15380 4289
+3  9475 3519 3518
+3  14776 3345 5872
+3  14776 3344 3345
+3  5059 9700 10840
+3  10840 9700 9702
+3  7501 11619 11620
+3  667 7058 7057
+3  667 1892 7058
+3  4265 4695 4263
+3  10999 9492 15140
+3  14353 10700 11842
+3  10475 3949 3951
+3  10475 3951 15140
+3  15140 3951 10999
+3  12964 4344 3952
+3  12964 3952 15341
+3  10145 13121 14357
+3  14357 11700 14286
+3  14357 13121 11698
+3  14357 11698 11700
+3  13121 10145 9052
+3  2350 13121 13809
+3  9146 14684 286
+3  10425 10423 12857
+3  1801 7366 1799
+3  9556 12238 1002
+3  12831 12742 10421
+3  9294 9296 11757
+3  9296 10687 11757
+3  10205 11757 10687
+3  9365 1727 5022
+3  15367 9365 5022
+3  15367 5022 7416
+3  12286 7724 1504
+3  5551 10267 10266
+3  1955 2103 1956
+3  13291 8102 8101
+3  8402 4119 2103
+3  1955 8402 2103
+3  12287 12286 1504
+3  10867 12287 1504
+3  592 594 13293
+3  15381 6097 11031
+3  15381 11031 12664
+3  15226 13290 11401
+3  13293 4561 8112
+3  1107 9943 3847
+3  7559 11614 8129
+3  10627 13955 1273
+3  7469 11706 6934
+3  8378 3211 3210
+3  7114 6373 770
+3  907 1723 1722
+3  8094 11978 4797
+3  8094 13694 2132
+3  11978 8094 2132
+3  2131 8403 11978
+3  2131 11978 2132
+3  10267 6712 6714
+3  2629 15382 2039
+3  2629 6139 15382
+3  13382 14035 14275
+3  13382 14275 13381
+3  4606 2091 6416
+3  3607 3606 7845
+3  14067 12394 14365
+3  2091 12771 6416
+3  12350 15383 14328
+3  4882 15383 11759
+3  13320 11759 15383
+3  13320 15383 12350
+3  12351 13320 12350
+3  3540 10778 8643
+3  15383 4882 4881
+3  14328 15383 4881
+3  13314 5023 13604
+3  6382 10138 6383
+3  1958 4698 1959
+3  7006 3362 11878
+3  11795 11798 12726
+3  6265 6264 956
+3  12727 6264 6263
+3  13014 10932 11992
+3  12716 14983 14226
+3  14226 14983 10932
+3  13014 14226 10932
+3  5483 9594 13454
+3  9593 9594 5483
+3  8751 10339 14860
+3  3905 1557 11266
+3  14211 13861 9801
+3  14211 9801 195
+3  11795 12726 9038
+3  13054 14462 15384
+3  13054 8445 14462
+3  3211 14983 12716
+3  3209 3211 12716
+3  15385 15386 15387
+3  15385 15388 15386
+3  3964 13997 8768
+3  2664 594 593
+3  7546 14563 7543
+3  11436 7543 14563
+3  11436 7544 7543
+3  9815 7236 2565
+3  15389 9205 15075
+3  7236 7235 2565
+3  939 2565 7235
+3  15048 76 14593
+3  75 14593 76
+3  15390 422 425
+3  15390 425 6458
+3  6459 6458 425
+3  6459 425 424
+3  4534 13466 4533
+3  8715 14052 13050
+3  14053 13050 14052
+3  15391 13050 14053
+3  13050 15391 2229
+3  13340 4039 2230
+3  51 13340 2230
+3  51 2230 2229
+3  51 2229 15391
+3  45 14538 43
+3  45 12285 14538
+3  14538 12285 11090
+3  15391 49 51
+3  14053 49 15391
+3  6274 49 14053
+3  12834 2760 6772
+3  6771 1340 5148
+3  11089 14538 11090
+3  11610 14052 8715
+3  14780 6371 6370
+3  13393 13664 10674
+3  4847 13664 13393
+3  54 8114 6984
+3  9945 4433 4435
+3  3635 12374 3638
+3  10292 11729 1208
+3  1042 15049 15392
+3  15392 15049 7947
+3  15392 7947 15182
+3  3538 15392 15182
+3  1042 15392 3538
+3  8224 5884 5886
+3  4310 12117 13651
+3  9427 7132 1017
+3  3743 5170 3744
+3  5516 13093 2140
+3  13093 139 2140
+3  985 2761 3886
+3  985 3886 986
+3  7299 6215 7904
+3  5559 2046 2045
+3  1338 10776 1339
+3  10351 11328 11864
+3  14195 10351 11864
+3  13359 8397 13159
+3  846 290 289
+3  14084 4023 15393
+3  5251 10050 11049
+3  2001 15394 5653
+3  2001 3965 15394
+3  15394 2798 5653
+3  15394 3965 2798
+3  4492 12481 14853
+3  12900 2915 4210
+3  12900 4210 4209
+3  5030 5031 9954
+3  11590 14852 14750
+3  1839 2008 2010
+3  12548 10031 13486
+3  4198 4197 15174
+3  5532 4198 15174
+3  10121 5532 15174
+3  11590 12835 14852
+3  13486 13435 7173
+3  12548 13486 7173
+3  14097 451 1071
+3  4012 6600 6599
+3  7664 2756 4470
+3  14549 14547 15395
+3  14549 15395 12811
+3  3244 14547 14566
+3  3244 15395 14547
+3  15396 2392 13643
+3  15395 3244 627
+3  2393 2392 15396
+3  6677 2393 15396
+3  6677 7579 2393
+3  12483 12482 12093
+3  7578 13662 13661
+3  12811 629 3450
+3  15395 629 12811
+3  15395 627 629
+3  5963 12193 9042
+3  8898 960 959
+3  11485 13233 14310
+3  11485 5367 13233
+3  14310 13233 1124
+3  13140 10216 13683
+3  3134 13140 13683
+3  3452 13683 12851
+3  8184 5511 9489
+3  1261 8184 9489
+3  1261 9489 10527
+3  12951 11744 7035
+3  14591 11549 13758
+3  13758 11549 6738
+3  15397 8615 8614
+3  14591 13758 12766
+3  14956 14591 12766
+3  1311 1312 13571
+3  8480 4858 2821
+3  9769 13629 13630
+3  7490 9769 13630
+3  13629 12362 13631
+3  10069 12362 13629
+3  9769 10069 13629
+3  13031 11820 2985
+3  13031 2985 4959
+3  13033 15068 11820
+3  11500 4541 4534
+3  11500 4534 3620
+3  4079 14683 14330
+3  3451 6542 3452
+3  2457 6560 6559
+3  3997 13399 7780
+3  14209 7779 7781
+3  9262 11227 6275
+3  7779 13354 7780
+3  3997 7780 13354
+3  14400 14576 14317
+3  4460 14302 4461
+3  14913 14576 14400
+3  14913 14400 1254
+3  859 5006 14685
+3  6957 12580 12579
+3  3275 6957 12579
+3  14338 14337 11116
+3  2267 2269 8078
+3  11551 14045 11665
+3  9799 14045 514
+3  11665 14045 9799
+3  14847 15053 15179
+3  15180 6793 12957
+3  14904 6793 4122
+3  12957 6793 14904
+3  15180 12957 15179
+3  15178 15180 15179
+3  14924 7375 6886
+3  11197 1854 15191
+3  10320 13980 3728
+3  3731 3728 13980
+3  13265 2877 15295
+3  1644 6430 7158
+3  7158 1645 1644
+3  7158 7157 1645
+3  1050 9009 1051
+3  11315 14940 15147
+3  5044 7157 7159
+3  5045 5044 7159
+3  1645 7157 14416
+3  7157 5044 14416
+3  9802 13096 9913
+3  14465 9802 9913
+3  6147 13229 5093
+3  2173 2175 13473
+3  8428 11294 9461
+3  11431 9987 9986
+3  14468 4199 4201
+3  2577 11431 9986
+3  2577 11518 11431
+3  2266 7885 1268
+3  4238 1359 2911
+3  13133 55 459
+3  4897 13133 459
+3  13133 4899 14455
+3  5579 15398 5580
+3  12897 15399 12898
+3  10244 8982 6241
+3  8464 9932 4508
+3  13721 6705 12843
+3  2279 2197 2758
+3  749 7382 15370
+3  5999 7382 749
+3  64 200 62
+3  3154 749 15370
+3  641 3154 15370
+3  126 128 14543
+3  4068 4070 13730
+3  12961 126 14543
+3  9691 797 14543
+3  14543 128 11355
+3  13670 3034 7744
+3  10554 6682 6683
+3  10554 6683 5752
+3  1623 12089 11714
+3  3095 6783 14794
+3  14794 8295 14146
+3  15400 2562 15401
+3  3096 14794 14146
+3  15400 11207 2562
+3  8927 14374 9245
+3  9504 14446 6447
+3  10041 14446 9504
+3  2564 12056 2015
+3  2015 12056 4009
+3  4010 4009 12056
+3  4309 1860 1862
+3  4310 4309 1862
+3  6747 3801 7421
+3  3661 3271 9395
+3  3661 9395 13829
+3  7495 9624 7912
+3  9624 12870 7912
+3  7922 4481 7920
+3  4480 7920 4481
+3  14876 4480 4479
+3  8952 4480 14876
+3  8952 14876 13219
+3  14876 15402 13219
+3  13219 15402 14874
+3  15402 11088 14874
+3  14874 11088 11922
+3  11088 11767 11922
+3  11922 11767 13745
+3  7381 11510 15077
+3  5999 6000 7381
+3  12513 3533 15403
+3  12513 15403 6247
+3  3533 3532 15210
+3  3533 15210 15403
+3  13828 1402 1404
+3  3102 3341 3340
+3  7785 15229 11801
+3  3213 14194 11801
+3  1833 13745 1831
+3  1831 13745 13744
+3  7438 14556 13914
+3  1832 13744 5901
+3  13744 12680 5901
+3  1831 13744 1832
+3  11104 14556 12680
+3  1833 11922 13745
+3  8749 15404 13865
+3  15404 5466 13865
+3  13865 5466 5465
+3  7468 13005 13008
+3  5466 13005 7468
+3  5468 7470 8816
+3  1866 1864 13993
+3  13005 5466 15404
+3  15405 13005 15404
+3  15405 15077 13005
+3  15077 13006 13005
+3  7381 15077 15405
+3  8748 7381 15405
+3  8749 8748 15405
+3  15405 15404 8749
+3  7593 1656 8438
+3  7593 8438 7921
+3  1655 5465 5468
+3  13865 5465 1655
+3  13865 1655 8181
+3  15406 6247 15403
+3  6246 6247 15406
+3  15406 15403 15210
+3  14876 11087 15402
+3  15402 11087 11088
+3  6256 6009 8238
+3  6256 8238 11531
+3  4139 13783 4137
+3  8538 14916 8539
+3  12103 14916 8538
+3  12103 14321 14916
+3  1613 1615 8240
+3  3554 5980 3967
+3  5198 5197 6678
+3  5198 6678 15396
+3  10256 1633 9538
+3  5569 1633 10256
+3  15139 10475 15140
+3  10473 10475 15139
+3  10473 15139 13978
+3  1054 13836 1055
+3  14912 1055 13836
+3  11818 11817 10323
+3  11818 10323 10322
+3  1872 13012 4513
+3  12498 4513 13012
+3  8963 13012 1872
+3  6016 8963 1872
+3  12511 1988 13397
+3  13397 1988 14662
+3  5769 5175 5174
+3  5769 1394 1393
+3  5769 1393 5175
+3  14481 15407 9088
+3  14481 9088 9087
+3  12564 14095 15408
+3  12564 12563 14095
+3  15024 15408 13813
+3  14095 13813 15408
+3  9194 11231 9678
+3  9194 9678 9676
+3  7158 6576 15181
+3  4676 9008 11893
+3  15181 750 7156
+3  751 750 15181
+3  7158 15181 7156
+3  2112 4432 6214
+3  6215 6214 7904
+3  4432 7904 6214
+3  13307 3571 8741
+3  10901 7047 9331
+3  10901 9331 2717
+3  7974 9331 7047
+3  451 450 1071
+3  12343 12342 15005
+3  12343 15005 15061
+3  12342 4206 15005
+3  14138 10366 4227
+3  15335 3634 14666
+3  4730 14318 15409
+3  4730 15409 639
+3  6432 10736 6433
+3  6432 9484 10736
+3  2268 2267 13763
+3  13763 8146 2268
+3  10940 13445 25
+3  22 10940 25
+3  3156 1463 231
+3  6173 3144 3145
+3  6309 6173 3145
+3  13441 13786 13785
+3  12356 13441 13785
+3  12356 13785 14056
+3  12356 14056 7786
+3  7785 14056 14057
+3  7785 7786 14056
+3  12356 7786 44
+3  1555 3856 7482
+3  10645 10647 7107
+3  8529 10992 10645
+3  4359 4358 15410
+3  5911 4359 15410
+3  15410 12248 5911
+3  9813 12248 15410
+3  15083 15410 4358
+3  10915 12069 3523
+3  10915 3523 3525
+3  188 3473 189
+3  882 11342 880
+3  2391 5339 7881
+3  5339 12030 7881
+3  12478 12030 5339
+3  717 2357 718
+3  4815 1129 1131
+3  4815 1131 14360
+3  14360 2296 4718
+3  1131 2296 14360
+3  11180 4807 4809
+3  5754 13735 8263
+3  14204 12126 11939
+3  4585 12126 14204
+3  14204 11939 6402
+3  9014 13750 2391
+3  9014 2391 7881
+3  12203 11390 5682
+3  12203 6553 11390
+3  6554 6553 12203
+3  12202 6554 12203
+3  9870 6554 12202
+3  10405 75 3
+3  12986 7002 13502
+3  13502 7002 7001
+3  13859 13502 7001
+3  10803 13502 13859
+3  13298 14335 12862
+3  13298 12862 4732
+3  3979 13452 8936
+3  3979 8936 3980
+3  8937 8936 6463
+3  9113 509 6042
+3  661 509 9113
+3  4619 9788 14577
+3  13782 13783 4139
+3  15408 13363 12564
+3  15411 13363 15408
+3  1430 10683 11882
+3  33 1430 11882
+3  5571 6951 9622
+3  5572 5571 9622
+3  14851 14750 14852
+3  9985 9984 4917
+3  1181 4167 3350
+3  4089 6951 9231
+3  9622 6951 4089
+3  14013 14942 14941
+3  12524 14942 14013
+3  8754 12524 14013
+3  8754 14013 5225
+3  4636 4638 8082
+3  14507 15095 8780
+3  3002 15095 14507
+3  3002 4439 15095
+3  10897 15389 3284
+3  10896 15389 10897
+3  10896 11578 15389
+3  9204 15389 11578
+3  15047 12297 8639
+3  12295 12297 15047
+3  12295 15047 2135
+3  15047 8639 14246
+3  6027 11578 10896
+3  11577 11578 6027
+3  11577 6027 14394
+3  14394 6027 5576
+3  14394 5576 339
+3  339 10748 14394
+3  13879 136 135
+3  13879 11818 136
+3  11224 8839 795
+3  14207 13886 3515
+3  2344 2343 9180
+3  3503 3502 8692
+3  3093 14147 9176
+3  10201 2421 14147
+3  15412 10342 9542
+3  11744 7033 7035
+3  8459 7489 7033
+3  11744 8459 7033
+3  206 14402 10956
+3  206 10956 6503
+3  9497 14187 14478
+3  8176 7830 7829
+3  9497 14478 11096
+3  13890 13892 7833
+3  13892 7831 7833
+3  9498 9497 11096
+3  7831 14185 9499
+3  7830 7831 13892
+3  7830 8176 7831
+3  13975 13974 9930
+3  11487 937 12115
+3  7235 5727 9502
+3  2924 2923 8231
+3  10197 2924 8231
+3  5039 5042 9022
+3  5108 14561 13850
+3  6762 8357 14560
+3  13850 9471 15413
+3  5108 13850 15413
+3  13304 8939 1377
+3  13304 1377 1376
+3  202 7054 203
+3  1793 9656 3897
+3  13468 11346 11345
+3  13468 11345 6966
+3  375 12269 3814
+3  3279 1362 15137
+3  3279 15137 2312
+3  15137 2313 2312
+3  14228 2313 15137
+3  46 10150 14041
+3  46 14041 47
+3  10620 47 14040
+3  14193 10620 14040
+3  3864 14298 14938
+3  13231 13232 13634
+3  8861 1781 12386
+3  1781 10709 1782
+3  10707 10709 1781
+3  7612 13634 4475
+3  4092 3823 3825
+3  4092 3825 754
+3  2133 15184 2134
+3  11493 5156 6480
+3  6480 5156 5158
+3  13135 12328 547
+3  544 13135 547
+3  6928 6927 12328
+3  547 12328 12329
+3  7695 6347 14431
+3  7695 14431 7698
+3  7695 6345 6347
+3  569 13602 8130
+3  8130 570 569
+3  313 312 5840
+3  313 5926 14688
+3  313 5840 5926
+3  14183 4304 4301
+3  14183 2142 2144
+3  1085 14898 14866
+3  12175 1085 14866
+3  12174 12175 14866
+3  12175 1086 1085
+3  365 4411 7527
+3  13952 10897 3284
+3  13952 3284 3283
+3  13952 3283 3633
+3  14343 7891 12940
+3  14343 12940 14245
+3  1175 15414 1176
+3  5576 15414 1175
+3  14245 14246 14343
+3  15414 2636 2638
+3  2638 8319 15414
+3  5576 2636 15414
+3  13886 13885 3515
+3  4105 4104 8111
+3  4028 14667 13771
+3  13929 14667 4028
+3  11195 10274 9717
+3  10274 11195 12977
+3  10274 12977 10120
+3  10120 8406 10274
+3  4619 11015 4617
+3  11257 12234 12235
+3  3926 3925 8580
+3  8985 5577 1175
+3  1174 8985 1175
+3  3726 8985 1174
+3  15032 2161 10759
+3  14704 9359 2159
+3  2161 15079 2159
+3  14704 2159 15079
+3  15032 15079 2161
+3  4939 6787 4940
+3  3730 12774 9287
+3  12774 3730 14536
+3  3729 14536 3730
+3  6788 15415 2379
+3  15416 2379 15415
+3  15417 15416 15415
+3  15043 15417 15415
+3  15043 15418 15417
+3  15419 15417 15418
+3  15420 15417 15419
+3  15420 15416 15417
+3  15420 15421 15416
+3  15421 2380 15416
+3  15416 2380 2379
+3  15421 14247 2380
+3  14198 6234 6232
+3  14803 1056 605
+3  1056 1058 605
+3  6234 13810 13696
+3  10649 13810 6234
+3  14198 10649 6234
+3  14051 12729 14994
+3  696 12729 14051
+3  15422 9661 6995
+3  6996 15423 8077
+3  15424 8077 15423
+3  15424 8076 8077
+3  15425 15422 8076
+3  15425 5905 15422
+3  5905 15425 5903
+3  12013 5903 15425
+3  15426 12013 15425
+3  15426 15425 8076
+3  15426 8076 15424
+3  15427 15426 15424
+3  11647 15426 15427
+3  11648 15426 11647
+3  11648 12013 15426
+3  11649 11647 15428
+3  15428 11647 15427
+3  15428 15427 15429
+3  15427 15430 15429
+3  15430 8619 15429
+3  15429 8619 5423
+3  5423 8619 8286
+3  15423 14366 14676
+3  15423 10195 14366
+3  6996 14994 10195
+3  6996 14051 14994
+3  6995 14051 6996
+3  6996 10195 15423
+3  3503 8692 6308
+3  15424 15423 14676
+3  15424 14676 15430
+3  15430 14676 8619
+3  15427 15424 15430
+3  15429 5423 15431
+3  15431 5423 5422
+3  15420 15431 5422
+3  15419 15431 15420
+3  15432 15431 15419
+3  15432 15429 15431
+3  15432 15428 15429
+3  15432 11649 15428
+3  14897 11649 15432
+3  14782 2590 1036
+3  14782 1554 11159
+3  15039 14897 15418
+3  15418 14897 15432
+3  15432 15419 15418
+3  15043 15039 15418
+3  13950 15042 15041
+3  13950 15041 13951
+3  6788 13951 15041
+3  6787 13951 6788
+3  4258 13951 6787
+3  7176 1053 3239
+3  7176 1054 1053
+3  13472 4939 14582
+3  14582 4939 15433
+3  15433 4939 4941
+3  15434 15433 13635
+3  15434 14582 15433
+3  15434 15015 14582
+3  15015 14581 14582
+3  198 3648 15435
+3  15435 3648 3650
+3  3650 3649 10764
+3  10764 3649 6834
+3  3649 15436 6834
+3  6834 15436 15437
+3  15438 15437 15436
+3  15439 15437 15438
+3  15437 15439 15440
+3  15441 15440 15439
+3  15440 15441 6679
+3  15441 15442 6679
+3  6679 15442 14510
+3  14510 15442 13635
+3  15442 15434 13635
+3  15434 15442 15443
+3  15443 15442 15441
+3  15443 15441 15019
+3  15019 15441 15444
+3  15444 15441 15439
+3  15438 15444 15439
+3  15021 15444 15438
+3  3651 15021 15438
+3  3651 15438 15436
+3  3651 15436 3649
+3  12605 15021 3651
+3  3648 12605 3651
+3  15021 15020 15444
+3  15020 15019 15444
+3  15016 15443 15019
+3  15016 15015 15443
+3  15015 15434 15443
+3  14510 13635 5924
+3  13433 14487 6293
+3  14488 7334 7336
+3  15445 10764 8218
+3  15445 8218 8217
+3  3921 10337 10336
+3  3921 9698 10337
+3  9698 15446 10337
+3  10337 15446 10338
+3  10338 15446 8164
+3  15446 14697 8164
+3  9641 14613 5615
+3  5614 9642 9641
+3  5614 9641 5615
+3  1314 14697 12401
+3  12401 14697 15446
+3  15447 12401 15446
+3  11690 12401 15447
+3  198 15435 7728
+3  7669 7728 15435
+3  13335 7669 15435
+3  14515 3402 3401
+3  13335 15445 13336
+3  15445 8217 13336
+3  10092 13336 10093
+3  10093 124 4052
+3  13097 4050 13098
+3  13098 4050 1314
+3  13097 5033 10092
+3  14515 13656 3402
+3  10663 5033 13097
+3  13335 3650 15445
+3  3650 10764 15445
+3  13335 15435 3650
+3  9697 11690 15447
+3  9698 9697 15447
+3  13539 9698 3921
+3  13539 3921 15448
+3  3920 15448 3921
+3  4485 15448 3920
+3  4485 15449 15448
+3  15449 12480 15448
+3  15448 12480 13539
+3  15449 12481 12480
+3  15449 14853 12481
+3  7725 7324 13150
+3  7323 13150 7324
+3  175 14708 14853
+3  15450 14708 175
+3  15450 4496 14284
+3  11573 11140 12379
+3  11574 11573 12379
+3  4461 14708 15003
+3  15003 14708 15450
+3  15003 15450 14284
+3  11573 15003 14284
+3  14284 11140 11573
+3  14284 4495 11140
+3  11572 15003 11573
+3  175 14853 15449
+3  9698 15447 15446
+3  6834 15437 6835
+3  15437 15440 6835
+3  15440 6679 6835
+3  6679 14510 6680
+3  9851 4939 13472
+3  9851 4258 4939
+3  4258 6787 4939
+3  4256 4258 9851
+3  15420 5422 15421
+3  15421 5422 14248
+3  10228 9844 8042
+3  10228 12414 9844
+3  12659 15007 15006
+3  2654 12659 15006
+3  2654 15006 4786
+3  14693 12428 12427
+3  5145 5151 10788
+3  5145 5147 5151
+3  4791 5147 540
+3  11748 9589 15451
+3  11748 15451 15148
+3  15121 9437 9436
+3  15452 4767 4766
+3  15452 13880 4767
+3  14189 15148 15451
+3  2573 7208 4029
+3  4043 4045 3457
+3  13484 11494 10728
+3  3091 3104 3092
+3  3104 218 217
+3  10027 3104 3091
+3  6402 6401 10605
+3  13932 10817 8113
+3  5583 5585 5103
+3  6766 10187 13081
+3  13081 2727 14213
+3  8860 6766 13081
+3  8860 13081 14213
+3  10735 10951 8322
+3  492 10951 10950
+3  493 492 10950
+3  9699 9698 13539
+3  14114 12813 3245
+3  9715 12575 12890
+3  12528 12458 14010
+3  6543 4988 3134
+3  9584 188 187
+3  7508 7507 11837
+3  10918 6936 498
+3  10918 7279 6936
+3  7507 5642 11837
+3  3769 3771 6901
+3  3769 6901 6903
+3  9549 14659 5320
+3  114 10969 14292
+3  12249 12251 13451
+3  1476 14625 4337
+3  7838 14625 1476
+3  12220 13648 10841
+3  12220 12222 12599
+3  12599 12222 11143
+3  8784 6587 8786
+3  6586 8786 6587
+3  2635 6587 8784
+3  9517 10174 14630
+3  6323 14342 9518
+3  6323 9518 9517
+3  11650 4536 11651
+3  10642 13263 10643
+3  9760 3984 3985
+3  9760 3985 13809
+3  7315 5763 7316
+3  14709 5763 7315
+3  15027 15453 11826
+3  832 6231 115
+3  6231 14783 115
+3  2982 10095 11685
+3  13582 3833 13365
+3  13990 13582 13794
+3  13794 13582 15027
+3  15027 13582 15453
+3  13582 13365 15453
+3  13793 13990 13794
+3  14081 14080 13793
+3  7316 5763 10422
+3  6749 6748 15303
+3  15297 9841 14921
+3  9263 4943 6446
+3  4338 13159 9447
+3  9264 526 528
+3  2507 2504 14580
+3  2942 6881 2719
+3  2941 6881 2942
+3  2719 6880 2720
+3  2719 6881 6880
+3  2942 2719 2721
+3  12800 11757 10205
+3  12800 8031 11757
+3  10555 9788 11059
+3  8872 12284 8873
+3  2191 9012 3099
+3  14577 14928 4619
+3  10076 776 10075
+3  776 11459 13160
+3  10075 776 13160
+3  10075 13160 10592
+3  12996 10075 10592
+3  14575 14574 14645
+3  13974 14575 14645
+3  15080 11409 2782
+3  10996 15080 12451
+3  11409 10996 2124
+3  11409 15080 10996
+3  14287 7798 8507
+3  7797 7798 14287
+3  10796 2679 7504
+3  10796 10270 2679
+3  15373 3554 3967
+3  3554 15373 11844
+3  9420 1243 1245
+3  13353 14834 3998
+3  3997 13353 3998
+3  14610 8968 8966
+3  8058 14610 8966
+3  12956 15179 12957
+3  14847 15179 12956
+3  10656 14846 12832
+3  8047 12832 14846
+3  14014 13989 14080
+3  10436 12617 11812
+3  9996 6513 6512
+3  4083 13142 13143
+3  4083 13143 1077
+3  10556 12917 14099
+3  8848 12156 12588
+3  3334 8848 12588
+3  14116 4733 4734
+3  12668 14439 4084
+3  12588 12156 12158
+3  12588 12158 14677
+3  15071 4291 4294
+3  1650 6982 6983
+3  1650 6983 14388
+3  14388 6983 8458
+3  14388 8458 8498
+3  12376 8441 7050
+3  12376 2222 8441
+3  10586 12263 5530
+3  15034 15035 15297
+3  15035 15112 15297
+3  14907 1028 6863
+3  12782 1026 14907
+3  5675 9868 11569
+3  5675 5676 9868
+3  13232 4476 4475
+3  11833 6098 15454
+3  11514 13375 11515
+3  13375 8496 11515
+3  5133 15454 8204
+3  11833 15454 5133
+3  13615 14291 12538
+3  7766 3230 15385
+3  14606 7766 15385
+3  8920 5803 3231
+3  11845 12115 5268
+3  11845 11487 12115
+3  11487 11845 1939
+3  9762 13358 9763
+3  9863 6321 6348
+3  7772 8984 389
+3  13737 7772 7773
+3  13737 8984 7772
+3  10551 10550 11627
+3  2151 11627 10550
+3  12562 5198 13643
+3  15396 13643 5198
+3  12562 13643 13988
+3  12562 13988 10273
+3  14114 3245 14566
+3  1744 8622 11676
+3  14223 1057 1056
+3  13459 13460 8806
+3  8806 13460 5538
+3  7530 8806 5538
+3  13460 8941 5538
+3  6937 9885 9884
+3  6937 9884 12684
+3  11144 13356 12698
+3  11144 12698 9885
+3  6937 11144 9885
+3  4264 13035 11472
+3  11472 13035 13034
+3  2549 10316 15364
+3  127 14963 128
+3  14646 14374 8927
+3  13086 4950 13087
+3  9046 13087 4950
+3  2549 15364 2547
+3  10407 14201 14200
+3  7961 13948 13947
+3  7960 13948 7961
+3  13144 15455 10015
+3  5255 13144 419
+3  5255 419 3262
+3  2584 8120 2585
+3  15167 15456 14851
+3  13927 14851 15456
+3  13927 13926 14851
+3  7764 12076 15227
+3  14463 15456 15167
+3  14463 15167 14227
+3  12836 14227 15167
+3  15044 1481 15285
+3  1486 1871 9707
+3  15285 1481 6687
+3  6649 4692 10922
+3  1489 1488 6649
+3  7101 15457 11385
+3  15457 13568 13015
+3  11623 13015 13568
+3  7103 13568 15457
+3  11385 15457 13015
+3  13003 13388 13693
+3  13003 13693 11358
+3  9401 9400 13196
+3  978 12293 14812
+3  12293 6094 14812
+3  14812 11793 8771
+3  12718 14812 8771
+3  11969 15054 11970
+3  11686 11970 15054
+3  15054 11756 14494
+3  11969 11756 15054
+3  11686 15054 6919
+3  15458 7274 7273
+3  10390 7274 15458
+3  10837 7274 10390
+3  7429 10739 11430
+3  7429 11430 7721
+3  14059 4782 13521
+3  14059 13521 1036
+3  1035 14059 1036
+3  1035 6437 14059
+3  10712 9897 6686
+3  9572 9571 14959
+3  12865 6226 9377
+3  12357 12865 9377
+3  6225 9377 6226
+3  3057 1938 2337
+3  2337 11865 3057
+3  3057 11865 15459
+3  11865 11867 15459
+3  15459 11867 15460
+3  15460 11867 15046
+3  11867 4375 15046
+3  2256 1136 15461
+3  3109 7984 3110
+3  15103 15357 9796
+3  15103 9796 9795
+3  10108 6469 6471
+3  9046 7956 7955
+3  9046 11170 7956
+3  9046 4950 11170
+3  11746 1934 1931
+3  11746 10137 1934
+3  14770 13085 9045
+3  13085 7483 13086
+3  7226 6469 9340
+3  12803 10790 3783
+3  815 10790 12803
+3  1023 9340 1024
+3  7483 7482 7581
+3  3057 15459 12186
+3  12186 15459 15462
+3  15459 15463 15462
+3  15462 15463 13642
+3  15463 15464 13642
+3  13991 15464 15463
+3  15460 13991 15463
+3  15459 15460 15463
+3  13991 15460 15465
+3  15465 15460 15046
+3  15465 15046 8905
+3  8905 15046 8904
+3  8876 15465 8905
+3  8876 8905 2737
+3  13991 15465 8876
+3  14777 15462 13642
+3  6404 15462 14777
+3  9505 15462 6404
+3  9505 12186 15462
+3  15366 4754 7928
+3  15466 15467 15064
+3  7184 4722 7185
+3  11697 6412 15468
+3  8650 14215 6412
+3  15468 6412 14215
+3  5387 5385 15468
+3  15339 15366 13337
+3  15467 15469 15064
+3  15466 15064 15063
+3  873 872 12793
+3  9206 9093 873
+3  873 9093 871
+3  5442 634 633
+3  13056 14397 13057
+3  6248 6246 11823
+3  11825 6246 15406
+3  11823 6246 11825
+3  11825 15406 6541
+3  6541 15406 15210
+3  13997 7405 12002
+3  11200 13997 12002
+3  12840 10502 12015
+3  6812 6811 12571
+3  6811 7910 10294
+3  15470 6944 6945
+3  15470 9210 4629
+3  9210 13473 4629
+3  15470 4632 6944
+3  15470 4629 4632
+3  8746 6100 13754
+3  13754 6100 12768
+3  9660 13754 12768
+3  8288 8964 4610
+3  14505 2 6976
+3  9073 0 2
+3  9073 2 14505
+3  14505 11474 9074
+3  14505 9074 9073
+3  12892 7954 10268
+3  15153 759 3752
+3  10543 7368 7370
+3  13685 9834 14501
+3  12614 10543 7370
+3  12374 10543 12614
+3  10544 10543 12374
+3  7044 9445 6285
+3  6285 9446 6283
+3  6283 9446 14461
+3  6283 14461 4719
+3  4719 4721 12327
+3  5320 11150 9549
+3  9549 11150 9547
+3  15205 14958 15206
+3  10622 10621 14958
+3  15205 10622 14958
+3  8057 15097 14921
+3  10524 6053 11035
+3  12805 6028 903
+3  903 6028 6030
+3  6030 904 903
+3  10524 11035 12039
+3  10524 12039 1291
+3  11115 15129 13790
+3  11115 13790 11116
+3  3463 3466 14734
+3  9826 14734 10743
+3  3466 10743 14734
+3  14464 4288 13345
+3  14464 12149 4286
+3  4286 4288 14464
+3  3466 8773 10743
+3  13861 2971 13286
+3  13813 14095 14094
+3  2108 12563 2238
+3  13942 3507 2238
+3  14647 5416 8687
+3  7703 11327 14933
+3  8484 14933 11327
+3  8484 14932 14933
+3  14932 8483 14931
+3  8484 8483 14932
+3  11176 15094 8850
+3  9381 14199 14424
+3  10711 934 936
+3  4132 4334 9257
+3  8682 4334 4132
+3  2245 2244 12305
+3  12305 2244 6780
+3  11119 13632 9254
+3  15471 9533 9784
+3  10426 15471 9784
+3  2202 15472 2203
+3  15472 15130 2203
+3  15130 15473 15128
+3  15472 15473 15130
+3  15472 9639 15473
+3  10426 11407 15471
+3  10338 10286 11530
+3  10286 11777 11530
+3  11530 11777 8568
+3  3410 478 14967
+3  10004 10003 5417
+3  12201 10004 5417
+3  1609 12201 5417
+3  1609 5417 4552
+3  13056 7890 10501
+3  10506 5442 633
+3  12875 10090 14182
+3  7772 389 6195
+3  7417 7949 1449
+3  6955 3991 3990
+3  4507 14800 14801
+3  7034 14598 12148
+3  4508 14598 7034
+3  15474 1134 1133
+3  1138 1134 15474
+3  2659 1134 1138
+3  1137 2659 1138
+3  9721 8731 118
+3  9721 13091 8731
+3  13091 10010 8731
+3  6924 9240 6925
+3  4712 13920 2221
+3  4712 2221 14279
+3  14428 1307 14279
+3  2220 14279 2221
+3  6337 10722 12338
+3  12339 10722 10540
+3  13336 125 10093
+3  8219 5886 123
+3  8224 5886 8219
+3  14292 8789 114
+3  8789 8791 114
+3  14292 14167 8789
+3  13559 14023 13561
+3  13561 14023 10686
+3  14798 10686 14023
+3  10686 14798 10685
+3  14845 10685 14798
+3  14845 9338 10685
+3  9710 9338 14845
+3  14243 10456 9711
+3  9710 14243 9711
+3  12820 9710 14845
+3  12820 14243 9710
+3  13246 9761 7837
+3  3280 6460 3281
+3  6614 9821 6615
+3  1550 1549 12344
+3  12344 2123 9635
+3  12344 734 2123
+3  12342 12344 9635
+3  13544 13773 14138
+3  13849 14138 4227
+3  13544 14138 13849
+3  3166 12669 3768
+3  3166 11368 6940
+3  3166 6940 12669
+3  3361 12382 8324
+3  13000 12967 14523
+3  14522 14523 12967
+3  8158 14522 12967
+3  8160 6693 14544
+3  8160 14522 8158
+3  8160 14544 14522
+3  4478 5955 12255
+3  5955 12967 12255
+3  14524 14544 843
+3  14877 9354 14520
+3  9355 9354 14877
+3  7193 150 3828
+3  7192 150 7193
+3  10927 5629 5628
+3  12565 10928 5628
+3  6445 1840 14881
+3  6445 14881 5379
+3  11653 15401 11654
+3  15401 14413 11654
+3  9264 6445 5379
+3  9264 5379 5380
+3  6552 6551 7197
+3  14413 2562 2564
+3  15401 2562 14413
+3  15475 15291 15476
+3  10016 15291 15475
+3  5018 8840 11352
+3  10016 15475 15477
+3  12660 1198 1195
+3  12660 10168 1198
+3  11505 14583 13688
+3  11504 14583 11505
+3  11504 12722 14583
+3  6595 9226 12278
+3  6934 12714 8816
+3  11758 5243 7862
+3  14166 11560 15478
+3  13101 11758 11308
+3  13101 5243 11758
+3  3390 6079 9937
+3  9937 6079 9935
+3  348 6396 14760
+3  10162 3388 9937
+3  9937 3388 3390
+3  13621 14707 14731
+3  15478 11560 13288
+3  13550 15478 13288
+3  13374 14166 15478
+3  13374 1258 14166
+3  1258 1257 14166
+3  13687 14158 11680
+3  5973 7874 2113
+3  4777 887 4778
+3  5764 887 4777
+3  7604 7211 7213
+3  8553 6929 8554
+3  14634 3458 11995
+3  5409 11381 7795
+3  15479 10608 4069
+3  8694 838 14244
+3  13922 8926 14859
+3  12630 764 9853
+3  3498 12735 9474
+3  11495 12735 3498
+3  7745 9378 7746
+3  7746 9378 7595
+3  11277 9378 7745
+3  14306 13823 14342
+3  14358 13823 14306
+3  1370 9555 8565
+3  9930 13974 14645
+3  6219 4280 6220
+3  14484 13155 15480
+3  8509 14484 15480
+3  4105 5598 2201
+3  2200 4105 2201
+3  4962 9839 4387
+3  13733 1892 8142
+3  13128 8142 1892
+3  8647 15481 8649
+3  15481 8647 12243
+3  12243 12240 15481
+3  150 7192 11437
+3  1447 12226 1448
+3  12226 1447 1814
+3  12453 12226 1814
+3  6689 12226 12453
+3  10290 11129 8513
+3  12155 4584 14668
+3  15004 12155 14668
+3  1603 14668 4584
+3  14668 6651 15004
+3  12155 15004 15354
+3  9030 15354 15004
+3  12129 7442 3453
+3  14014 1344 13989
+3  12167 6721 6409
+3  12167 6409 6408
+3  13710 4725 13136
+3  4725 2339 13136
+3  2339 7414 7411
+3  11776 7414 2339
+3  11776 2339 4725
+3  3735 12643 11897
+3  9481 1390 8598
+3  8308 5623 1791
+3  9481 6251 1390
+3  5375 12219 11980
+3  11921 1833 6749
+3  13476 11921 6749
+3  11923 11921 13476
+3  13870 1700 8415
+3  1700 13870 9344
+3  5557 1817 5555
+3  13210 5555 1817
+3  9150 8945 329
+3  9150 13349 8945
+3  11350 13349 13863
+3  5373 13863 13349
+3  8084 5373 13349
+3  8083 5373 8084
+3  5246 10691 11879
+3  10691 5248 4856
+3  9829 10691 4856
+3  15212 10866 11374
+3  11374 10866 11372
+3  11372 10866 10910
+3  6764 8859 9831
+3  14880 15212 11374
+3  1901 10399 12028
+3  12346 11093 11094
+3  6732 1902 12028
+3  12028 1902 1901
+3  11601 14897 15039
+3  15039 11599 11601
+3  2345 6114 9561
+3  2590 14782 11159
+3  14221 8856 8777
+3  14221 8777 8774
+3  8856 8855 8777
+3  3198 3200 12008
+3  12007 3198 12008
+3  3200 13421 12008
+3  3200 15482 13421
+3  3199 13878 15482
+3  3199 15482 3200
+3  14362 823 826
+3  2881 2251 6143
+3  14688 15412 9542
+3  12856 12857 14465
+3  216 14396 5668
+3  11161 14396 12717
+3  5668 14396 11161
+3  5927 5929 14122
+3  14122 5929 5959
+3  10482 10481 15483
+3  10481 6964 15483
+3  6963 15483 6964
+3  2541 932 2542
+3  6963 9808 11933
+3  11933 9808 15484
+3  15484 9808 9807
+3  9807 9809 13543
+3  15233 11933 15484
+3  15233 9128 11933
+3  15310 1137 10089
+3  15485 6963 11933
+3  15485 15483 6963
+3  15485 15486 15483
+3  15483 15486 10482
+3  12017 10482 15486
+3  12017 15486 11207
+3  3598 11207 15486
+3  15485 3598 15486
+3  10088 15310 10089
+3  9128 13078 8890
+3  13078 3597 8890
+3  1808 4221 1809
+3  4221 4220 12512
+3  4680 4679 7415
+3  7415 4679 7416
+3  11301 7743 11005
+3  15064 9128 15233
+3  15064 15469 9128
+3  15469 13078 9128
+3  4010 13078 15469
+3  15469 7243 4010
+3  15467 7243 15469
+3  2929 2928 12031
+3  11705 13734 11653
+3  13734 15400 11653
+3  11653 15400 15401
+3  13734 12015 15400
+3  12015 12017 15400
+3  12017 11207 15400
+3  12017 12016 10482
+3  9107 10392 11585
+3  4764 10392 9107
+3  7503 7502 10983
+3  7503 10983 10982
+3  10445 6262 6261
+3  5372 5371 14033
+3  11889 13235 11890
+3  13573 13235 11889
+3  12816 10298 10297
+3  10298 15037 15036
+3  1413 14212 3690
+3  14212 14425 3690
+3  15036 14425 14212
+3  10089 1137 1136
+3  14425 15036 617
+3  616 14425 617
+3  8378 10932 3211
+3  9104 2444 2443
+3  7825 11857 7826
+3  11857 14386 14608
+3  13757 13117 9293
+3  8368 15487 11951
+3  8368 8367 15487
+3  6831 13757 9292
+3  11622 15294 1673
+3  6831 9982 13757
+3  10526 2413 8389
+3  3088 5048 5047
+3  3088 5047 14925
+3  3088 3090 5048
+3  5048 7639 5049
+3  14622 12247 13708
+3  14622 13708 7398
+3  1163 14622 7398
+3  13138 15488 14087
+3  15488 13795 14087
+3  511 13813 10851
+3  10083 14371 7486
+3  13794 15027 14086
+3  13795 13794 14086
+3  15488 13793 13795
+3  14081 13793 15488
+3  1310 8678 14081
+3  479 3747 11685
+3  10095 479 11685
+3  3747 8053 3745
+3  3747 479 8053
+3  13827 6921 14573
+3  13827 14573 2307
+3  3830 8075 2592
+3  10082 14371 10083
+3  8454 9554 3469
+3  3967 5980 5982
+3  8933 4967 2162
+3  7320 8933 2162
+3  8208 8207 9554
+3  13801 5134 72
+3  9554 8454 8208
+3  8934 8933 7320
+3  15160 10097 15161
+3  15161 10097 10096
+3  1310 14081 13138
+3  14081 15488 13138
+3  3193 1265 11568
+3  9485 11987 13330
+3  11998 1777 262
+3  1775 1777 11998
+3  14191 9247 13306
+3  2285 838 8694
+3  7853 6584 13312
+3  6583 13312 6584
+3  14509 13750 13306
+3  13919 3210 11617
+3  15152 12976 11195
+3  15152 7525 12976
+3  13919 11617 6580
+3  11915 11914 1083
+3  8585 6912 9327
+3  13786 15302 13787
+3  15302 13999 10906
+3  13999 10905 10906
+3  9563 2185 10984
+3  3897 9656 11722
+3  11722 9656 5112
+3  11073 5291 5618
+3  1451 11040 4417
+3  13532 5404 5406
+3  14920 5543 5507
+3  6199 5543 14920
+3  14920 9516 6199
+3  9793 7070 1847
+3  4273 6069 6071
+3  12526 13927 15456
+3  12526 10838 13927
+3  9509 13927 10838
+3  13159 1535 9447
+3  8331 4186 12180
+3  8329 8331 12180
+3  3342 5415 3676
+3  3342 3676 3343
+3  3552 5415 3342
+3  10339 15489 14860
+3  10339 10144 15489
+3  15350 5559 2045
+3  7636 4696 10776
+3  7636 6129 4696
+3  7636 10776 13332
+3  4209 2627 2626
+3  12900 1888 2915
+3  4209 12149 12900
+3  4209 2626 12149
+3  11902 3461 3460
+3  7649 7169 14314
+3  5685 7649 14314
+3  11076 14390 14389
+3  10970 10972 14390
+3  10970 14390 11076
+3  14390 10972 1914
+3  10972 15490 1914
+3  10971 429 15490
+3  10971 15490 10972
+3  429 14769 15490
+3  14647 87 5416
+3  1858 12892 10268
+3  1858 6279 12892
+3  14077 10103 12390
+3  7177 3239 13601
+3  9034 3775 3777
+3  9035 15491 3775
+3  14077 10104 10103
+3  14077 9592 9591
+3  14077 12390 9592
+3  2160 14077 9591
+3  4775 2160 9591
+3  3775 15491 3776
+3  3589 8810 8809
+3  2100 12985 11575
+3  706 705 5440
+3  10506 5440 5442
+3  706 5440 10506
+3  10365 15492 13323
+3  6875 10937 13323
+3  15492 6875 13323
+3  14990 6875 15492
+3  15287 14990 15492
+3  15287 15492 10365
+3  15476 15287 10365
+3  15291 15287 15476
+3  13899 15493 12591
+3  12591 15494 7871
+3  1581 7871 15494
+3  1580 7871 1581
+3  1581 3288 5154
+3  1581 15495 3288
+3  15495 1061 3288
+3  15496 1061 15495
+3  1062 1061 15496
+3  15496 15493 14453
+3  1062 15496 14453
+3  13899 14453 15493
+3  15144 14453 13899
+3  9729 15334 13903
+3  9728 15334 9729
+3  2518 9729 2519
+3  8990 15497 8991
+3  5302 15497 8990
+3  12591 15496 15494
+3  12591 15493 15496
+3  15494 15496 15495
+3  15494 15495 1581
+3  5797 7867 5798
+3  10051 4572 2483
+3  10051 2483 2482
+3  7769 15498 7770
+3  6916 1092 6682
+3  6915 1092 6916
+3  15499 2165 4463
+3  6130 2165 15499
+3  12368 6130 15499
+3  10127 7987 965
+3  4379 7987 10127
+3  6841 14254 6842
+3  6254 13401 5672
+3  13237 15500 2259
+3  2259 15500 10449
+3  10449 15500 2989
+3  15500 4594 2989
+3  13237 4594 15500
+3  4901 4900 5366
+3  4587 12384 15501
+3  4587 15501 8912
+3  8912 15501 13673
+3  15501 12384 13672
+3  15501 13672 13673
+3  5145 380 5146
+3  5146 538 540
+3  5146 380 6674
+3  5146 6674 538
+3  5146 540 5147
+3  3557 9579 5654
+3  6431 6433 14032
+3  22 6431 14032
+3  13763 7104 11532
+3  8146 13763 11532
+3  5819 9637 14554
+3  22 24 6431
+3  9421 3869 7230
+3  2740 10753 2741
+3  12325 15502 11059
+3  15502 9246 11059
+3  12829 13562 6584
+3  6584 7853 12829
+3  12829 7853 6827
+3  15502 12325 14391
+3  15502 14391 14509
+3  14509 13306 15502
+3  15502 13306 9246
+3  14155 14258 5781
+3  2843 2842 13055
+3  11125 14336 13110
+3  14335 13110 14336
+3  11124 14336 11125
+3  11126 11125 13839
+3  11126 13839 1418
+3  11985 10113 8855
+3  157 6019 11719
+3  5853 6120 1783
+3  14529 13998 13786
+3  14529 13786 13441
+3  7498 14652 7496
+3  14652 11084 7496
+3  7498 9059 9058
+3  9695 14652 7498
+3  9695 7498 9058
+3  14905 8325 14797
+3  3488 8444 8443
+3  1344 1346 13989
+3  288 290 6492
+3  11975 12490 8053
+3  11975 8053 8052
+3  3256 3258 6509
+3  8798 5761 6434
+3  2895 10140 10189
+3  1187 2895 10189
+3  14862 10845 4140
+3  14862 5991 10845
+3  14862 11707 11708
+3  14862 11708 5991
+3  13017 7878 12246
+3  7878 12244 12246
+3  1642 12244 7878
+3  10799 2261 10001
+3  10799 2262 2261
+3  3576 2261 2263
+3  5512 3157 1277
+3  3112 5512 1277
+3  3112 5513 5512
+3  3112 13091 5513
+3  14579 1275 6155
+3  8325 14905 12738
+3  13837 12306 14129
+3  13979 3201 11179
+3  4504 3202 3201
+3  13979 4504 3201
+3  563 15503 5926
+3  563 5926 5837
+3  6508 5926 15503
+3  6508 15503 6506
+3  2727 2726 13341
+3  6052 11034 6053
+3  6052 13243 11034
+3  11034 13243 10679
+3  3514 10679 13243
+3  13893 11254 12292
+3  2813 12819 2810
+3  7758 14823 7760
+3  6889 5359 7758
+3  12409 14823 7758
+3  5359 12409 7758
+3  12409 12408 14823
+3  1969 14823 12408
+3  4738 1794 12403
+3  8293 1343 1342
+3  8293 1342 4846
+3  9054 10801 15100
+3  9056 10801 9054
+3  9056 13722 10801
+3  11999 1900 1902
+3  7213 7212 9065
+3  9546 7375 7374
+3  270 13129 10542
+3  4657 8443 15504
+3  4657 15504 9740
+3  15504 9741 9740
+3  15504 8443 9741
+3  2934 2942 2721
+3  15353 12628 12629
+3  5662 12628 15353
+3  5661 5662 15353
+3  3477 4483 11382
+3  7795 11381 11382
+3  4483 7795 11382
+3  6968 7375 9546
+3  9054 15100 10684
+3  4257 13951 4258
+3  15399 15100 10802
+3  15505 15399 10802
+3  15506 15399 15505
+3  12898 15399 15506
+3  5037 12898 5038
+3  5038 12898 14157
+3  14157 12898 15506
+3  4176 14157 15506
+3  5038 14157 6230
+3  6230 14157 8895
+3  6230 8895 12647
+3  8895 12315 12647
+3  12315 15507 12647
+3  12647 15507 14783
+3  14783 15507 9343
+3  9343 15507 3893
+3  3893 15507 6317
+3  15507 12315 6317
+3  6317 3891 3893
+3  14788 3893 6894
+3  5629 14788 6894
+3  5630 5629 6894
+3  5630 6894 12713
+3  6894 6893 12713
+3  6893 8091 12713
+3  14239 7604 7213
+3  14726 7604 14239
+3  7605 7604 14726
+3  7605 5630 12713
+3  12565 5630 7605
+3  9343 3893 14788
+3  13998 14529 8006
+3  13998 8006 8007
+3  6647 6646 14150
+3  6647 14150 13676
+3  9864 6716 2456
+3  4482 3477 3479
+3  7446 4482 3479
+3  13180 12489 12488
+3  13180 12488 14703
+3  14703 10066 10067
+3  13180 14703 10067
+3  5641 13646 306
+3  13646 304 306
+3  11902 13646 5641
+3  15093 7059 15508
+3  15093 15508 15030
+3  15030 15508 15509
+3  15030 15509 14190
+3  14190 15509 8783
+3  14693 15093 15030
+3  13361 1661 8788
+3  13361 1659 1661
+3  12948 12950 8051
+3  14646 4853 14374
+3  4853 12159 14374
+3  13921 4851 4853
+3  13921 4853 14646
+3  3743 1070 5170
+3  15510 3887 3886
+3  15207 15510 3886
+3  15510 15207 12075
+3  12751 15510 12075
+3  5951 14575 13974
+3  6339 4639 5553
+3  5553 4639 9653
+3  3290 9439 15511
+3  15511 9439 3000
+3  5193 15511 3000
+3  15511 5193 3291
+3  15511 3291 3290
+3  1126 1128 2738
+3  2291 14718 1128
+3  4145 6702 4146
+3  11976 15058 4146
+3  6788 2379 3370
+3  9733 5554 4866
+3  13641 9733 1110
+3  3561 13641 1110
+3  13641 5552 9733
+3  55 13133 9319
+3  14675 6101 8286
+3  14675 1927 6101
+3  8337 8336 746
+3  8337 746 7003
+3  1454 1456 8979
+3  8769 7872 9034
+3  8770 8769 12707
+3  14037 5559 15350
+3  14037 15350 10050
+3  12654 10288 12653
+3  12886 10288 12654
+3  3011 7692 9230
+3  2336 12633 4603
+3  4578 4603 12633
+3  10975 14127 8636
+3  7166 14127 7164
+3  7166 8583 14127
+3  1024 9340 12426
+3  1494 14691 1495
+3  14690 12638 10732
+3  14690 6705 12638
+3  14691 1494 8478
+3  6706 14691 8478
+3  12463 12867 14003
+3  4455 7584 12867
+3  9333 9334 2738
+3  9334 1126 2738
+3  9334 11976 1126
+3  3728 3730 9287
+3  8589 11780 12438
+3  11780 1573 12438
+3  9471 1573 11780
+3  15413 9471 11780
+3  15413 11780 5109
+3  5109 11780 1558
+3  12576 14088 14978
+3  14088 6735 14978
+3  6735 13501 2080
+3  11109 2589 11576
+3  11109 11576 11498
+3  4750 6703 5491
+3  15512 4750 5491
+3  15512 5491 5490
+3  5745 5747 5304
+3  5303 5745 5304
+3  9652 9122 15090
+3  15090 15089 12324
+3  9652 15090 12324
+3  9652 12324 11367
+3  15089 2248 12324
+3  6293 14487 14517
+3  14488 14517 14487
+3  10783 4845 4844
+3  14488 14076 14517
+3  6291 6293 14519
+3  14517 14519 6293
+3  2353 11794 12001
+3  12000 12001 11794
+3  279 8310 4709
+3  8310 2231 4709
+3  13999 12988 10905
+3  13999 8007 12988
+3  2791 2793 8310
+3  12988 1146 1148
+3  12988 8007 1146
+3  15513 11746 11747
+3  15513 10137 11746
+3  15513 11747 10517
+3  4731 15069 15059
+3  4731 640 15069
+3  15069 640 12182
+3  15060 15059 15069
+3  4731 15059 5106
+3  11339 5094 12554
+3  11339 5095 5094
+3  4749 6703 4750
+3  5748 15386 14599
+3  15388 14599 15386
+3  3230 15388 15385
+3  3230 3232 15388
+3  3232 15018 15017
+3  3232 15017 15388
+3  15017 14599 15388
+3  3232 5804 15018
+3  13987 6910 11712
+3  4449 9736 4450
+3  4449 9735 9736
+3  13994 15348 13995
+3  15344 15348 13994
+3  11657 15344 13994
+3  13494 6171 6173
+3  6309 13494 6173
+3  12739 15213 8980
+3  12739 3013 15213
+3  14743 13761 12168
+3  14690 10732 11486
+3  214 15188 215
+3  13493 214 5668
+3  15412 14688 6508
+3  15412 6508 6507
+3  4598 4597 15514
+3  10761 9928 10762
+3  10761 9925 9928
+3  5409 15514 11381
+3  5409 4598 15514
+3  15154 9454 12625
+3  10002 2642 12962
+3  1053 15113 3239
+3  3240 3239 15113
+3  8703 3240 15113
+3  8703 3241 3240
+3  14170 1052 1055
+3  1053 1052 15113
+3  6316 15151 5505
+3  6316 5505 5503
+3  9047 7955 6470
+3  6469 9047 6470
+3  13678 7851 15301
+3  15150 7851 13677
+3  13678 15301 15300
+3  15301 15515 10770
+3  4752 719 4751
+3  4752 720 719
+3  10734 6930 9997
+3  11842 11841 14353
+3  14353 11841 11861
+3  10734 10343 8554
+3  14470 15292 6685
+3  7662 12006 14687
+3  11369 6111 11589
+3  12101 13195 13178
+3  15516 13195 12101
+3  13534 15516 12101
+3  13534 3048 15516
+3  13487 12554 12553
+3  13487 12553 15173
+3  15173 288 13487
+3  13488 13487 288
+3  14824 10434 15517
+3  15517 5223 15518
+3  5222 15518 5223
+3  3120 874 3118
+3  7700 14824 15517
+3  15518 7700 15517
+3  9916 7700 15518
+3  12072 13833 5797
+3  12914 2075 7867
+3  3531 3530 10236
+3  5797 12914 7867
+3  13517 9877 13518
+3  1987 14662 1988
+3  10440 14662 1987
+3  8076 15422 6997
+3  7969 7968 14976
+3  315 7710 7709
+3  9899 7710 315
+3  8049 14567 6689
+3  13122 14567 8049
+3  11824 4068 12336
+3  11824 12336 14134
+3  11411 14134 12336
+3  9691 14543 11355
+3  2307 14573 14632
+3  14632 14573 1038
+3  14632 1038 1040
+3  7486 14371 7484
+3  14632 1040 10018
+3  5357 10018 1040
+3  175 177 15450
+3  14177 1367 1366
+3  14177 1366 14176
+3  9234 9236 621
+3  11314 14457 14459
+3  12864 11212 519
+3  12864 519 518
+3  384 2503 10584
+3  2503 384 301
+3  10606 7404 1381
+3  15075 9205 9614
+3  1051 9009 5760
+3  5760 5761 13585
+3  5760 13585 1051
+3  9833 11028 1943
+3  9797 1943 11028
+3  8769 9034 14962
+3  12707 8769 14962
+3  505 13062 9842
+3  505 14071 13062
+3  350 14244 838
+3  13015 14806 11385
+3  5124 9883 13308
+3  9418 14729 10668
+3  5306 9418 10668
+3  14943 14458 15519
+3  14459 14458 14943
+3  13716 6770 10461
+3  12760 5966 5965
+3  10688 5966 12760
+3  10688 12760 13055
+3  2509 11460 10978
+3  12761 7209 2843
+3  12761 2843 13055
+3  12760 12761 13055
+3  3995 3994 3895
+3  5312 3995 3895
+3  13179 7122 13182
+3  13181 13179 13182
+3  15175 2931 10424
+3  2932 10424 2931
+3  13277 13179 13181
+3  12858 10424 10425
+3  5163 2165 2164
+3  5163 2164 14152
+3  2585 8122 2583
+3  10586 9778 13393
+3  13709 13391 13710
+3  5368 13391 13709
+3  6371 9778 10586
+3  2585 8120 8122
+3  10858 15520 10859
+3  7726 10859 15520
+3  10209 2024 4544
+3  8550 8223 9398
+3  9397 9398 8223
+3  7655 12551 7380
+3  15521 7655 7380
+3  14739 15521 7380
+3  14237 15521 14739
+3  9398 7243 15467
+3  9398 15467 15466
+3  8550 9398 15466
+3  15063 8550 15466
+3  8551 8550 15063
+3  15366 9618 4754
+3  7646 4016 15515
+3  15515 4016 10770
+3  7851 15515 15301
+3  7646 15515 7851
+3  6803 5646 6804
+3  5752 5881 5880
+3  5752 5880 5753
+3  4078 4076 6645
+3  14857 15188 214
+3  14857 214 13493
+3  350 353 14244
+3  11826 15453 12261
+3  15453 13365 12261
+3  555 554 6666
+3  15128 15473 13666
+3  2354 6989 6991
+3  13666 12197 15522
+3  4765 13666 15522
+3  15128 13666 4765
+3  15128 4765 15129
+3  5915 5914 11429
+3  7036 5915 4887
+3  15523 7036 9716
+3  11877 7036 15523
+3  15524 11877 15523
+3  15524 11876 11877
+3  14456 11876 15524
+3  14456 12073 11876
+3  11876 12073 13099
+3  13099 12073 15525
+3  12073 15526 15525
+3  15525 15526 15527
+3  15528 15527 15526
+3  2058 15527 15528
+3  2058 15529 15527
+3  15529 15530 15527
+3  15531 15527 15530
+3  15525 15527 15531
+3  15525 15531 13100
+3  15531 15532 13100
+3  15532 2202 13100
+3  15532 15472 2202
+3  15533 15472 15532
+3  15530 15533 15532
+3  15530 15532 15531
+3  15529 15533 15530
+3  282 15533 15529
+3  282 15529 283
+3  15529 2058 283
+3  283 2058 2057
+3  10929 442 15534
+3  15534 442 13977
+3  14607 15534 13977
+3  14203 14607 13977
+3  1560 14607 14203
+3  335 1560 14203
+3  12592 1560 335
+3  1560 12592 1561
+3  12592 15526 1561
+3  1561 15526 12073
+3  15535 14607 14456
+3  14607 15535 15534
+3  15536 15534 15535
+3  15536 10929 15534
+3  2767 10929 15536
+3  11729 10128 1208
+3  11729 2916 10128
+3  2916 15537 10128
+3  15537 1209 10128
+3  15537 14385 1209
+3  15538 14385 15537
+3  2918 15538 15537
+3  2918 15537 2916
+3  2768 15538 2918
+3  2768 15539 15538
+3  15538 15539 14385
+3  15539 15540 14385
+3  15540 11444 14385
+3  15540 12688 11444
+3  15540 12687 12688
+3  15540 15541 12687
+3  15523 12687 15541
+3  15523 9716 12687
+3  15541 15524 15523
+3  15541 15535 15524
+3  15535 14456 15524
+3  15541 15536 15535
+3  15539 15536 15541
+3  2767 15536 15539
+3  2767 15539 2768
+3  15539 15541 15540
+3  14972 15526 12592
+3  15528 15526 14972
+3  7455 15528 14972
+3  1869 15528 7455
+3  2058 15528 1869
+3  15533 282 9639
+3  9639 282 284
+3  15472 15533 9639
+3  15525 13100 13099
+3  10265 11662 4142
+3  11662 10479 4142
+3  10711 936 12227
+3  11662 12227 10479
+3  12549 15542 8363
+3  12549 8363 13958
+3  11625 3899 4811
+3  4862 4864 5369
+3  4862 5369 15158
+3  15498 6809 13070
+3  15209 6809 15498
+3  11362 7255 11761
+3  7255 8365 11761
+3  14130 7255 11362
+3  6810 6809 15209
+3  15498 7769 15209
+3  7769 13837 15209
+3  11775 11911 11910
+3  8546 15197 15199
+3  8546 15199 4427
+3  12550 15543 15542
+3  12550 15542 12549
+3  8111 9714 15544
+3  15544 9714 12378
+3  14470 9701 8578
+3  5598 8111 15544
+3  5598 15544 5089
+3  10000 14210 11204
+3  12514 9870 12202
+3  14974 9870 12514
+3  3735 14974 12643
+3  12514 12643 14974
+3  13213 14554 3721
+3  4038 3721 14554
+3  14998 13309 14219
+3  15245 5856 15246
+3  15246 2366 10199
+3  5856 5855 15246
+3  14274 10639 10637
+3  802 14274 10637
+3  804 14274 802
+3  13234 4568 15023
+3  13234 15023 13503
+3  14410 10952 10735
+3  8399 127 126
+3  8399 1672 127
+3  9163 1672 8399
+3  2260 9163 8399
+3  6009 6011 8238
+3  14307 2422 8874
+3  8875 14307 8874
+3  9634 12342 9635
+3  9634 4206 12342
+3  3838 8234 3839
+3  9898 12183 12182
+3  6844 12183 9898
+3  8987 3103 5499
+3  12183 8734 12355
+3  6844 8734 12183
+3  11983 12050 12083
+3  11983 12083 11984
+3  4102 177 12741
+3  4102 4496 177
+3  4672 15189 4673
+3  6970 8383 8385
+3  1171 12912 7977
+3  6641 10173 11475
+3  6641 11475 6857
+3  10818 141 13390
+3  10389 10837 10390
+3  923 15545 10389
+3  15546 15545 923
+3  922 15546 923
+3  5931 10633 5932
+3  15547 13516 14828
+3  14135 15547 14828
+3  2252 15547 14135
+3  15547 2252 13190
+3  2252 12274 13190
+3  13191 14079 13125
+3  14079 13126 13125
+3  13126 11556 10535
+3  13124 12552 14981
+3  13517 13124 14981
+3  13125 13124 13517
+3  10535 12552 13124
+3  13125 13517 13516
+3  5931 15172 1393
+3  13516 13191 13125
+3  15547 13191 13516
+3  15547 13190 13191
+3  13126 11555 11556
+3  13189 15548 14078
+3  14078 15548 7039
+3  7039 15548 11948
+3  15548 14919 11948
+3  14919 11949 11948
+3  7990 15218 11947
+3  11947 15218 13114
+3  11664 2593 13854
+3  13854 2593 11689
+3  12979 2747 4154
+3  12978 2747 12979
+3  12273 14919 12274
+3  12274 14919 15548
+3  12274 15548 13189
+3  11300 11949 14919
+3  11300 7619 11949
+3  7990 7989 15218
+3  15075 9614 3282
+3  15355 14132 6558
+3  14132 7038 6558
+3  7039 8857 6555
+3  6555 8857 6556
+3  6117 5077 10988
+3  2479 5077 6117
+3  11664 1611 6556
+3  2291 2290 14718
+3  11664 13854 1611
+3  5077 5076 10988
+3  11948 11947 8857
+3  11948 8857 7039
+3  11947 13114 2594
+3  14078 7039 7038
+3  15355 11555 14132
+3  6467 169 168
+3  6466 169 6467
+3  7499 7497 14761
+3  13468 2920 2919
+3  6001 14991 2376
+3  4687 14991 6001
+3  4687 4689 14991
+3  394 4233 395
+3  2235 4233 394
+3  10370 7413 7412
+3  10368 7413 10370
+3  14558 10367 15549
+3  6328 11940 13345
+3  11946 15550 1610
+3  6557 15550 6558
+3  1610 15550 6557
+3  6557 6556 1611
+3  6557 1611 1610
+3  10588 10163 10162
+3  8266 13588 13583
+3  11741 6005 4074
+3  285 13765 9003
+3  12807 12808 15367
+3  7416 12807 15367
+3  12808 6657 15367
+3  2589 6657 12808
+3  13040 10358 10357
+3  13039 10358 13040
+3  13039 3424 3426
+3  13039 3426 10358
+3  3743 2471 4964
+3  9908 3743 4964
+3  12850 14192 6006
+3  13668 6007 6006
+3  13668 6006 14192
+3  1099 13668 14192
+3  6007 13668 8355
+3  6007 8355 8354
+3  1100 14192 11418
+3  1099 14192 1100
+3  5380 14159 526
+3  13695 14159 5380
+3  10447 1841 1840
+3  6446 10447 1840
+3  12482 12092 12093
+3  3157 3159 1278
+3  1278 3159 8561
+3  11718 11717 12092
+3  3411 14967 10080
+3  8557 10521 13193
+3  12113 10521 8557
+3  12113 10523 10521
+3  14820 6854 15551
+3  9973 15551 6854
+3  6854 14820 6856
+3  6856 14822 14692
+3  14123 4578 14393
+3  12633 14393 4578
+3  14123 5308 5310
+3  14123 14393 5308
+3  12633 12632 14393
+3  15552 5702 5701
+3  12322 15552 5701
+3  13869 15552 12322
+3  13868 5702 15552
+3  13869 13868 15552
+3  2022 13834 2023
+3  15190 13835 13834
+3  15220 13290 15226
+3  3641 10209 4544
+3  14822 2306 14500
+3  10262 14772 6316
+3  10262 6316 6314
+3  10261 14772 10262
+3  10261 14771 14772
+3  15230 14771 10261
+3  5466 7468 5467
+3  12222 12221 7515
+3  11143 12222 7515
+3  15026 8320 15553
+3  15553 8320 4915
+3  15026 15553 15188
+3  15553 9984 9983
+3  15188 15553 9983
+3  15554 5783 12781
+3  12782 15554 12781
+3  15497 3289 5784
+3  11538 11539 6729
+3  7228 8854 14855
+3  14820 15551 11101
+3  14821 14820 11101
+3  5478 6877 5475
+3  4279 5475 6877
+3  8490 5475 4279
+3  8490 5476 5475
+3  9154 10738 2967
+3  9155 9154 2967
+3  13333 14055 14619
+3  4549 4949 4077
+3  4549 4077 13510
+3  13756 8065 7970
+3  13756 2896 8065
+3  7970 8065 7971
+3  14004 13756 7970
+3  7970 7972 14004
+3  1062 14453 6801
+3  10936 13323 10937
+3  10936 15555 3723
+3  15555 3724 3723
+3  3724 8251 8249
+3  3724 15555 8251
+3  15555 929 8251
+3  10936 929 15555
+3  11146 10642 15556
+3  8947 15556 10642
+3  1150 9718 6203
+3  10797 921 12106
+3  10797 12106 13118
+3  1151 6203 6202
+3  1151 6202 12042
+3  13919 15170 649
+3  11935 15170 13919
+3  9791 15152 11194
+3  1034 9791 11194
+3  15557 14492 8192
+3  12823 15310 10088
+3  12806 8191 14492
+3  13297 8191 12806
+3  12806 14492 8506
+3  14858 11163 15358
+3  15407 15358 11163
+3  15214 14858 15358
+3  14856 14858 15214
+3  2331 4987 4986
+3  4698 4986 4988
+3  1959 4698 4988
+3  4698 2331 4986
+3  10882 10881 12236
+3  10882 13810 11113
+3  14803 14223 1056
+3  8260 9531 455
+3  8260 455 8261
+3  8984 716 718
+3  13737 716 8984
+3  13673 294 7869
+3  5700 5699 10055
+3  11643 907 906
+3  12289 4064 14090
+3  5057 12289 14090
+3  14090 4064 4063
+3  14032 10737 10940
+3  1675 11348 5234
+3  14090 4063 5498
+3  906 10406 11643
+3  8957 10406 906
+3  10405 5 11643
+3  10405 3 5
+3  1723 11643 5
+3  907 11643 1723
+3  12860 6377 8362
+3  12860 6378 6377
+3  6377 15163 8362
+3  4654 4656 6190
+3  9431 4654 6190
+3  7125 4860 7126
+3  7126 4860 1984
+3  669 12091 5533
+3  12485 6609 6330
+3  8894 6642 13749
+3  4313 4312 14649
+3  13968 1485 1484
+3  6538 14829 11552
+3  1327 1329 14829
+3  6538 1327 14829
+3  13589 8884 13583
+3  13588 13589 13583
+3  3915 9013 7016
+3  3915 5427 9013
+3  6610 2250 14135
+3  2250 2252 14135
+3  15558 8417 2227
+3  2226 15559 2227
+3  13202 15558 2227
+3  13202 2227 15559
+3  13202 15559 4840
+3  2226 15560 15559
+3  2226 14044 15560
+3  15560 14044 4837
+3  15560 4840 15559
+3  15560 4837 4840
+3  13425 15291 15455
+3  13424 15291 13425
+3  10612 8271 15561
+3  4199 14468 15561
+3  12026 8421 8420
+3  12026 8420 10612
+3  14468 10612 15561
+3  14468 12026 10612
+3  4199 15561 8270
+3  2357 8571 9921
+3  2357 2359 8571
+3  8607 13936 6165
+3  13938 8607 14898
+3  2481 13176 14871
+3  14871 13176 6259
+3  6258 14871 6259
+3  14511 6258 4624
+3  7706 7708 12109
+3  12126 7706 12109
+3  12126 12109 11939
+3  10279 12108 10024
+3  10024 12108 13444
+3  601 2190 602
+3  5834 5833 6771
+3  2212 2190 2192
+3  11132 1192 11684
+3  11684 10412 11132
+3  1742 10412 11684
+3  1742 11684 8027
+3  12881 15562 6133
+3  6133 15562 5201
+3  15562 2705 5201
+3  15562 1019 2705
+3  12881 1019 15562
+3  4363 5474 14892
+3  14892 5474 5473
+3  14892 4364 4363
+3  4365 4364 11642
+3  4365 11642 8383
+3  4365 8383 6970
+3  389 512 6195
+3  6765 10187 6766
+3  2687 10021 2570
+3  11777 2687 9734
+3  11777 10868 2687
+3  804 801 1738
+3  804 1738 8097
+3  12373 15563 750
+3  15563 14887 750
+3  14889 14887 15563
+3  6505 10381 3336
+3  10381 6505 8025
+3  10442 5062 5061
+3  10442 5061 8276
+3  7105 14 10505
+3  2455 9864 2456
+3  2455 6321 9864
+3  4667 4669 15564
+3  15564 4669 2757
+3  6242 6241 10525
+3  6241 8983 10525
+3  624 626 4505
+3  624 4505 9932
+3  13174 13676 8969
+3  626 4506 4505
+3  9633 10786 6414
+3  6415 6414 10786
+3  12921 1425 14809
+3  12920 1425 12921
+3  12113 8557 12611
+3  2605 12611 8557
+3  6414 3107 3108
+3  8845 3066 9125
+3  12443 11465 3760
+3  11465 11467 3760
+3  185 11465 12443
+3  184 11465 185
+3  10231 14380 11463
+3  12302 7841 9374
+3  14915 12988 6194
+3  14915 6194 1162
+3  6194 6193 1162
+3  14735 6192 4196
+3  15513 10136 10137
+3  7770 11447 7771
+3  10517 10136 15513
+3  4895 4894 4445
+3  4109 4290 4110
+3  8293 4846 7859
+3  8374 6227 6229
+3  11331 8374 6229
+3  12821 14243 12820
+3  15565 11637 13844
+3  15565 13844 3771
+3  960 12301 12696
+3  960 12963 12301
+3  12271 12270 2907
+3  12271 2907 1403
+3  7273 12271 15458
+3  15458 1405 10390
+3  10390 1405 10388
+3  15458 12271 1403
+3  15458 1403 1405
+3  11673 1256 10563
+3  11672 11673 10563
+3  11673 14715 1256
+3  15520 10858 15566
+3  15520 15566 15567
+3  8519 15567 15566
+3  8259 15567 8519
+3  8519 8518 8259
+3  10884 8259 8518
+3  10884 8518 10545
+3  15568 3994 3996
+3  15230 7276 14219
+3  15230 14219 14218
+3  13326 15569 13325
+3  15569 15570 13325
+3  1678 13325 15570
+3  1678 15570 15571
+3  15572 15571 15570
+3  15572 15573 15571
+3  10484 15571 15573
+3  1678 15571 10484
+3  15574 1680 11716
+3  14117 1680 15574
+3  14117 13325 1680
+3  1678 1680 13325
+3  14116 14117 15574
+3  14116 15574 4733
+3  15574 15575 4733
+3  4733 15575 15576
+3  15576 15575 15577
+3  15577 15575 15578
+3  15578 15575 11716
+3  15574 11716 15575
+3  15579 15578 11716
+3  15579 13801 15578
+3  15578 13801 13802
+3  71 73 15580
+3  15580 73 5115
+3  13801 15581 5134
+3  3613 2498 5362
+3  3613 5362 10052
+3  15580 5115 15196
+3  15580 15196 15582
+3  15196 15200 15582
+3  15200 6523 15582
+3  15582 6523 15583
+3  15583 6523 6522
+3  6522 6525 15584
+3  15584 6525 15585
+3  6525 11710 15585
+3  15585 11710 15586
+3  15586 11710 11711
+3  12659 2653 14233
+3  9445 15587 7194
+3  15587 13469 7194
+3  13469 7195 7194
+3  4414 1237 1236
+3  23 15588 14233
+3  15588 12659 14233
+3  15589 12659 15588
+3  15589 15007 12659
+3  15589 15590 15007
+3  12540 15007 15590
+3  15590 12541 12540
+3  108 14016 109
+3  12541 12944 15377
+3  4519 15377 12944
+3  15586 11711 15247
+3  15591 15586 15247
+3  15592 15586 15591
+3  15592 15593 15586
+3  15585 15586 15593
+3  15584 15585 15593
+3  15594 15584 15593
+3  15594 15595 15584
+3  15595 6522 15584
+3  15583 6522 15595
+3  15596 15583 15595
+3  15597 15583 15596
+3  15582 15583 15597
+3  15598 15582 15597
+3  15598 15580 15582
+3  15598 71 15580
+3  15598 15599 71
+3  71 15599 13802
+3  13802 15599 15577
+3  2865 15577 15599
+3  2865 15599 14251
+3  15599 15600 14251
+3  14252 14251 15600
+3  7074 14252 7072
+3  7072 14252 15600
+3  7072 15600 15601
+3  15600 15598 15601
+3  15598 15597 15601
+3  15601 15597 15596
+3  7072 15601 15596
+3  7072 15596 7073
+3  7073 15596 15594
+3  15596 15595 15594
+3  7073 15594 14758
+3  14758 15594 15593
+3  14758 15593 15602
+3  15602 15593 15592
+3  15603 15602 15592
+3  15602 15603 13743
+3  15603 15592 14999
+3  14999 15592 15591
+3  14999 15591 4518
+3  4518 15591 4519
+3  4519 15591 3409
+3  15591 15247 3409
+3  7820 10348 11218
+3  12945 12944 15604
+3  15604 12944 12541
+3  15590 15604 12541
+3  15604 15590 14935
+3  14935 15590 15589
+3  1867 14935 15589
+3  5002 15604 14935
+3  12945 15604 5002
+3  10206 10208 6267
+3  14999 4518 15000
+3  13742 15602 13743
+3  13742 14758 15602
+3  2867 15576 2865
+3  15576 15577 2865
+3  2867 4733 15576
+3  12816 4804 15149
+3  15149 4804 11060
+3  6670 14731 11060
+3  11060 14731 15149
+3  15149 14731 15605
+3  14731 14707 15605
+3  15605 14707 617
+3  617 14707 618
+3  618 14707 13619
+3  5823 8745 5824
+3  6670 14727 14731
+3  6669 14727 6670
+3  15606 14727 6669
+3  15606 13620 14727
+3  15607 13620 15606
+3  15607 15608 13620
+3  15608 13618 13620
+3  8745 11030 5824
+3  13619 13618 15609
+3  15609 13618 15610
+3  13618 15608 15610
+3  15608 15611 15610
+3  15610 15611 15193
+3  15193 15611 14333
+3  15612 14333 15611
+3  15612 15611 15607
+3  15608 15607 15611
+3  15612 15607 15613
+3  15613 15607 15614
+3  15614 15607 15606
+3  15614 15606 15615
+3  15606 6669 15615
+3  15615 6669 2715
+3  7347 15192 11528
+3  11528 15192 9035
+3  3143 5536 9712
+3  9712 5536 1091
+3  12065 15616 12066
+3  15616 15617 12066
+3  15617 15618 12066
+3  12066 15618 15619
+3  15619 15618 13912
+3  15618 13911 13912
+3  5274 2411 3272
+3  8761 3680 15620
+3  15620 3680 15621
+3  15621 3680 15622
+3  3680 3679 15622
+3  3679 13784 15622
+3  15622 13784 15623
+3  13784 15624 15623
+3  15623 15624 7572
+3  15624 9445 7572
+3  15625 11918 11917
+3  11917 1506 15626
+3  1506 1505 15626
+3  1505 15627 15626
+3  15620 15626 15627
+3  15627 15628 15620
+3  15628 8761 15620
+3  15629 8761 15628
+3  15629 13912 8761
+3  15619 13912 15629
+3  14351 15619 15629
+3  15491 15619 14351
+3  15491 12066 15619
+3  15491 14351 3776
+3  6728 4213 13753
+3  6728 6730 4213
+3  3777 3776 4188
+3  9096 15615 2715
+3  15614 15615 9096
+3  15630 15614 9096
+3  15630 15613 15614
+3  15631 15613 15630
+3  15632 15613 15631
+3  15612 15613 15632
+3  15612 15632 15633
+3  15634 15633 15632
+3  15634 15635 15633
+3  14333 15633 15635
+3  15612 15633 14333
+3  15635 13225 14333
+3  8511 11569 14290
+3  15636 15193 14746
+3  15636 15610 15193
+3  15609 15610 15636
+3  38 15609 15636
+3  37 15609 38
+3  37 618 15609
+3  618 13619 15609
+3  619 618 37
+3  15037 15605 617
+3  15149 15605 15037
+3  4532 12043 12445
+3  4532 880 12043
+3  15637 12214 12213
+3  13905 13597 9437
+3  9437 13597 9438
+3  13597 15637 9438
+3  9438 15637 15638
+3  12213 15638 15637
+3  15638 12213 15639
+3  12213 38 15639
+3  15639 38 15636
+3  15639 15636 14746
+3  15640 15639 14746
+3  15638 15639 15640
+3  12830 15638 15640
+3  12830 9438 15638
+3  15641 9437 15121
+3  15393 9437 15641
+3  15393 13905 9437
+3  4022 13905 15393
+3  14940 13805 2180
+3  14940 14939 13805
+3  14939 13803 13805
+3  13105 14742 7098
+3  8881 14741 8882
+3  8882 14741 15642
+3  14741 14742 15642
+3  15642 14742 15643
+3  15643 14742 13105
+3  14943 15643 13105
+3  15643 14943 15519
+3  8795 10418 8793
+3  15519 14458 15644
+3  14458 15217 15644
+3  15217 11952 15644
+3  11952 11951 15644
+3  15487 15644 11951
+3  15645 15644 15487
+3  15645 15519 15644
+3  15643 15519 15645
+3  15642 15643 15645
+3  15646 15642 15645
+3  15646 15645 15487
+3  15646 15487 8367
+3  9730 13955 15647
+3  13955 10627 15647
+3  10627 15648 15647
+3  15647 15648 1647
+3  15648 11156 1647
+3  1478 1480 7880
+3  11156 15649 3717
+3  3717 15649 15650
+3  15649 15651 15650
+3  15651 15652 15650
+3  15652 15653 15650
+3  15653 15654 15650
+3  15650 15654 15655
+3  15654 6838 15655
+3  6838 15656 15655
+3  15657 15655 15656
+3  3717 15655 15657
+3  3717 15650 15655
+3  3717 15657 1649
+3  15658 1649 15657
+3  15659 1649 15658
+3  15660 1649 15659
+3  1647 1649 15660
+3  15661 1647 15660
+3  15647 1647 15661
+3  15662 15647 15661
+3  9730 15647 15662
+3  12364 81 15663
+3  6720 1480 13129
+3  15664 15663 15662
+3  15664 15662 15665
+3  15662 15661 15665
+3  15661 15666 15665
+3  15665 15666 14513
+3  15666 15660 14513
+3  14513 15660 15667
+3  15660 15659 15667
+3  15667 15659 15668
+3  15659 15658 15668
+3  15669 15668 15658
+3  2752 15668 15669
+3  3699 15668 2752
+3  3700 3699 2751
+3  3699 2752 2751
+3  12540 2892 4787
+3  8994 2892 12540
+3  10142 10141 14589
+3  14589 10141 15670
+3  10141 15671 15670
+3  15671 15672 15670
+3  15670 15672 15673
+3  15672 15674 15673
+3  15674 15675 15673
+3  15676 15673 15675
+3  15677 15673 15676
+3  15677 15678 15673
+3  15678 15670 15673
+3  14589 15670 15678
+3  14589 15678 14590
+3  15678 15679 14590
+3  14590 15679 15680
+3  15679 15681 15680
+3  15681 12830 15680
+3  12830 15640 15680
+3  15640 14745 15680
+3  14745 14590 15680
+3  14631 14590 14745
+3  15397 15682 8665
+3  11492 15397 8665
+3  15682 5132 8665
+3  10142 14589 13223
+3  15683 10142 13223
+3  15683 14229 10142
+3  15684 2751 14229
+3  15684 3700 2751
+3  15685 3700 15684
+3  15685 14512 3700
+3  14512 15686 14513
+3  15686 15665 14513
+3  15686 12363 15665
+3  13129 1480 8225
+3  15687 12364 12363
+3  15688 12364 15687
+3  12364 15688 1154
+3  1154 15688 1153
+3  15688 15689 1153
+3  15689 13707 1153
+3  13426 14169 12433
+3  14169 15690 12433
+3  12432 12433 15690
+3  12515 12516 13877
+3  13877 12516 13878
+3  1505 12432 15627
+3  12432 13663 15627
+3  13663 15628 15627
+3  14811 15628 13663
+3  14351 15628 14811
+3  14351 15629 15628
+3  14811 13663 1410
+3  8747 8749 13865
+3  13663 12432 2801
+3  2801 12432 15690
+3  2801 15690 15691
+3  14169 15691 15690
+3  11386 15691 14169
+3  15691 11386 15692
+3  15689 13706 13707
+3  15693 13706 15689
+3  15692 13706 15693
+3  15694 15692 15693
+3  15694 15691 15692
+3  2802 15691 15694
+3  2801 15691 2802
+3  1409 15695 1410
+3  4188 1410 15695
+3  15696 4188 15695
+3  3777 4188 15696
+3  15697 3777 15696
+3  15698 15697 15696
+3  15698 15696 15699
+3  15699 15696 15695
+3  15699 15695 14869
+3  14869 15695 14870
+3  14870 15695 1409
+3  14870 1409 15700
+3  15700 1409 2802
+3  15700 2802 15694
+3  15701 15700 15694
+3  12419 15700 15701
+3  12419 14870 15700
+3  12420 12419 15702
+3  12419 15703 15702
+3  15702 15703 15704
+3  15703 15705 15704
+3  15705 15687 15704
+3  15704 15687 15706
+3  15687 12363 15706
+3  15706 12363 15686
+3  14512 15706 15686
+3  14512 15707 15706
+3  15706 15707 15704
+3  15704 15707 15702
+3  15702 15707 15685
+3  14512 15685 15707
+3  15708 15702 15685
+3  12420 15702 15708
+3  15709 12420 15708
+3  12420 15709 15710
+3  15710 15709 15711
+3  15709 14229 15711
+3  15711 14229 15683
+3  15683 15634 15711
+3  15711 15634 15712
+3  15634 15713 15712
+3  15712 15713 15714
+3  15714 15713 12706
+3  15713 15631 12706
+3  15631 15715 12706
+3  12706 15715 8770
+3  15715 9096 8770
+3  15630 9096 15715
+3  15631 15630 15715
+3  11044 13764 11045
+3  11044 9215 13764
+3  14962 9034 15697
+3  15697 9034 3777
+3  14962 15697 15698
+3  15714 14962 15698
+3  12706 14962 15714
+3  15716 15714 15698
+3  15712 15714 15716
+3  15716 15710 15712
+3  15712 15710 15711
+3  14869 15710 15716
+3  15716 15699 14869
+3  15716 15698 15699
+3  15632 15631 15713
+3  15634 15632 15713
+3  15683 15635 15634
+3  15683 13223 15635
+3  13223 13225 15635
+3  15709 15684 14229
+3  15709 15708 15684
+3  15684 15708 15685
+3  15688 15687 15705
+3  15705 15689 15688
+3  15693 15689 15705
+3  15703 15693 15705
+3  15701 15693 15703
+3  15701 15694 15693
+3  12419 15701 15703
+3  12364 1154 81
+3  15640 14746 14745
+3  15681 15120 12830
+3  15120 15717 15121
+3  15641 15121 15717
+3  15718 15641 15717
+3  14084 15641 15718
+3  14084 15393 15641
+3  14084 15718 14496
+3  14496 15718 14495
+3  14495 15718 15719
+3  15718 15717 15719
+3  15676 15719 15717
+3  15719 15676 15720
+3  15720 15676 15675
+3  10613 15720 15675
+3  10613 14744 15720
+3  15720 14744 15719
+3  14744 10408 15719
+3  10408 14495 15719
+3  13667 14084 14496
+3  8858 8857 2594
+3  11947 2594 8857
+3  15674 6840 15675
+3  15674 15656 6840
+3  6838 6840 15656
+3  4172 6838 15654
+3  4169 4172 15654
+3  4170 4169 15721
+3  15721 4169 15653
+3  15653 4169 15654
+3  15721 15653 15722
+3  15652 15722 15653
+3  15652 15723 15722
+3  15724 15722 15723
+3  15724 15725 15722
+3  15725 15721 15722
+3  15726 15721 15725
+3  15726 4170 15721
+3  2179 2181 15726
+3  15727 2180 2179
+3  14940 2180 15727
+3  14940 15727 15147
+3  15727 15728 15147
+3  15147 15728 15729
+3  15729 15728 15730
+3  15730 15728 15731
+3  15728 15732 15731
+3  15731 15732 15725
+3  15732 15726 15725
+3  15732 2179 15726
+3  15727 2179 15732
+3  15728 15727 15732
+3  15731 15725 15724
+3  15731 15724 15733
+3  14319 15733 15724
+3  14319 15724 15734
+3  15723 15734 15724
+3  15734 15723 15735
+3  15735 15723 15736
+3  15736 15723 15652
+3  15736 15652 15651
+3  15736 15651 15649
+3  11156 15736 15649
+3  11156 15737 15736
+3  15735 15736 15737
+3  10626 15735 15737
+3  1270 15735 10626
+3  1270 11533 15735
+3  11533 15734 15735
+3  14319 15734 11533
+3  14319 13069 13068
+3  15729 4870 6201
+3  13067 4870 15729
+3  15729 15730 13067
+3  13067 15730 13068
+3  13068 15730 15733
+3  15730 15731 15733
+3  14319 13068 15733
+3  6201 15147 15729
+3  11316 15147 6201
+3  14074 7766 14606
+3  14939 13106 13803
+3  12234 5601 9252
+3  14458 9976 15217
+3  14457 3605 9976
+3  11316 3605 14457
+3  11316 6201 3605
+3  11314 11316 14457
+3  10626 15737 10627
+3  10627 15737 15648
+3  15648 15737 11156
+3  15738 15656 15674
+3  15657 15656 15738
+3  15658 15657 15738
+3  15669 15658 15738
+3  15669 15738 15672
+3  15672 15738 15674
+3  15671 15669 15672
+3  2752 15669 15671
+3  2752 15671 10141
+3  15676 15717 15739
+3  15739 15717 15120
+3  15739 15120 15681
+3  15679 15739 15681
+3  15678 15739 15679
+3  15677 15739 15678
+3  15677 15676 15739
+3  15661 15660 15666
+3  9385 8882 15646
+3  8882 15642 15646
+3  8367 9385 15646
+3  8366 9385 8367
+3  11917 15626 15620
+3  15621 11917 15620
+3  15625 11917 15621
+3  15621 15622 15625
+3  15622 15623 15625
+3  15623 7572 15625
+3  9445 15624 15587
+3  7733 15587 15624
+3  7733 13469 15587
+3  7349 13906 12065
+3  13906 15616 12065
+3  15616 11532 15617
+3  11532 5766 15617
+3  15617 5766 15618
+3  5766 13911 15618
+3  13911 5766 5768
+3  13784 7733 15624
+3  7349 12065 15192
+3  7347 7349 15192
+3  23 1867 15589
+3  23 15589 15588
+3  15599 15598 15600
+3  15577 15578 13802
+3  7941 15740 11492
+3  11492 15740 15397
+3  15740 8615 15397
+3  374 376 4690
+3  8615 15741 8616
+3  15741 10578 8616
+3  10578 10673 8616
+3  11447 8616 10673
+3  11447 10673 7771
+3  15742 6571 6573
+3  8362 15742 6573
+3  2207 14181 10673
+3  2207 2051 14181
+3  8277 6571 15742
+3  15163 8277 15742
+3  15163 15742 8362
+3  15498 15743 11447
+3  2052 2051 2206
+3  2051 2207 2206
+3  2052 2206 4015
+3  14099 4015 4014
+3  2207 10673 10578
+3  15741 10577 10578
+3  15300 10577 15741
+3  15300 10770 10577
+3  15744 15300 15741
+3  15745 15300 15744
+3  15745 13678 15300
+3  6697 13678 15745
+3  7155 13678 6697
+3  7155 13677 13678
+3  7155 15746 13677
+3  15746 15150 13677
+3  15746 12757 15150
+3  12757 7850 15150
+3  12757 15746 11503
+3  15746 11032 11503
+3  10114 10619 8855
+3  3089 12655 3090
+3  12663 15747 12664
+3  15748 15747 12663
+3  15748 15749 15747
+3  15747 15749 15750
+3  15751 15750 15749
+3  15751 15749 15752
+3  15753 15752 15749
+3  15752 15753 11145
+3  15753 15754 11145
+3  15754 7940 11145
+3  7938 7940 15754
+3  15754 15755 7938
+3  15755 15744 7938
+3  7938 15744 15740
+3  15740 15744 8615
+3  15744 15741 8615
+3  7938 15740 7941
+3  15745 15744 15755
+3  6697 15745 15755
+3  6697 15755 6695
+3  6695 15755 15754
+3  15754 15753 6695
+3  15753 15748 6695
+3  6695 15748 13275
+3  13275 15748 12663
+3  7154 13275 12663
+3  7154 11032 15746
+3  7154 15746 7155
+3  15753 15749 15748
+3  15556 15752 11146
+3  15752 11145 11146
+3  15752 15556 15751
+3  15556 15756 15751
+3  15751 15756 15757
+3  15756 15758 15757
+3  15757 15758 15759
+3  15758 15760 15759
+3  10484 15759 15760
+3  10484 15573 15759
+3  15757 15759 15573
+3  15757 15573 15572
+3  15757 15572 15750
+3  15761 15750 15572
+3  15761 15572 15570
+3  15761 15570 15569
+3  15761 15381 12664
+3  15761 15569 15381
+3  6095 15381 15569
+3  6095 15569 13326
+3  15381 6095 6097
+3  12758 12757 11503
+3  15747 15750 15761
+3  15747 15761 12664
+3  15751 15757 15750
+3  11715 10484 15760
+3  15760 15762 11715
+3  11715 15762 15579
+3  15579 15762 13801
+3  13801 15762 15581
+3  15762 14368 15581
+3  14368 13443 15581
+3  8947 8949 15756
+3  8949 15758 15756
+3  11986 15758 8949
+3  15763 15758 11986
+3  15763 11986 14368
+3  15762 15763 14368
+3  15760 15763 15762
+3  15763 15760 15758
+3  15556 8947 15756
+3  11715 15579 11716
+3  2684 347 11369
+3  2684 348 347
+3  34 1436 15327
+3  15327 1436 1438
+3  11795 9667 11796
+3  9667 531 11796
+3  11795 9038 9667
+3  6078 7004 15568
+3  10573 15568 7004
+3  15568 10573 3994
+3  3895 10574 3896
+3  10574 8972 3896
+3  5312 3895 3894
+3  10020 15764 12791
+3  15764 15765 12791
+3  15765 9935 12791
+3  12791 9935 14720
+3  6079 14720 9935
+3  15765 9936 9935
+3  15766 9936 15765
+3  15767 15766 15765
+3  15767 15768 15766
+3  15768 10587 15766
+3  10587 10588 15766
+3  10588 9936 15766
+3  13374 15478 13550
+3  11758 7862 6690
+3  15384 13550 6483
+3  13054 15384 6483
+3  4065 13550 15384
+3  4065 13374 13550
+3  4065 15384 14462
+3  7863 7862 12539
+3  12539 7862 5245
+3  5243 5245 7862
+3  962 5245 5244
+3  5297 12539 5245
+3  1585 15769 1586
+3  15769 10802 1586
+3  12798 15770 15769
+3  12798 15769 1585
+3  12798 6252 15771
+3  15771 6252 11477
+3  10767 14158 13687
+3  3483 15772 11479
+3  11477 11479 15772
+3  11477 15772 15771
+3  15771 15772 15770
+3  15770 15772 15773
+3  15773 15772 15774
+3  15772 3483 15774
+3  15774 3483 15775
+3  3483 10384 15775
+3  15775 10384 10383
+3  15776 10383 10587
+3  15776 10587 15768
+3  15777 15776 15768
+3  15778 15776 15777
+3  15778 15779 15776
+3  15779 15780 15776
+3  15776 15780 10383
+3  15780 15775 10383
+3  15781 15775 15780
+3  15781 15774 15775
+3  15782 15774 15781
+3  15773 15774 15782
+3  15783 15773 15782
+3  15783 15782 15784
+3  15784 15782 15785
+3  15782 15781 15785
+3  15781 15779 15785
+3  15785 15779 4177
+3  4177 15779 15778
+3  11655 4177 15778
+3  15785 4177 4176
+3  15784 15785 4176
+3  15506 15784 4176
+3  15505 15784 15506
+3  15783 15784 15505
+3  5311 12096 5312
+3  12096 10020 5312
+3  12096 15786 10020
+3  15786 15764 10020
+3  15787 15764 15786
+3  15787 15767 15764
+3  15767 15765 15764
+3  15787 15777 15767
+3  15777 15768 15767
+3  2298 15777 15787
+3  2298 15778 15777
+3  11655 15778 2298
+3  2298 15787 2299
+3  2299 15787 12100
+3  12100 15787 15786
+3  12100 15786 12096
+3  12100 12096 12095
+3  15781 15780 15779
+3  12798 15771 15770
+3  6078 14720 6079
+3  6078 15568 14720
+3  11878 8972 10574
+3  10573 11878 10574
+3  7004 11878 10573
+3  1866 10608 15479
+3  13993 10608 1866
+3  4474 7949 11962
+3  5989 13332 13595
+3  13111 12943 13839
+3  13111 13839 11125
+3  11125 13110 13111
+3  4252 14331 7201
+3  8254 7201 14331
+3  8051 8050 2147
+3  4251 4252 7201
+3  4485 176 15449
+3  176 175 15449
+3  177 176 12741
+3  12741 176 4484
+3  3274 3475 5008
+3  5008 3475 9183
+3  5008 9183 9182
+3  2267 13577 13763
+3  7536 12593 5564
+3  7536 6751 12593
+3  481 13446 8052
+3  481 14444 13446
+3  12334 13446 14443
+3  14444 14443 13446
+3  11481 6721 12167
+3  11481 12167 11945
+3  9736 4997 12833
+3  3732 11291 6221
+3  8158 12966 5957
+3  5954 5957 12966
+3  5525 3579 3578
+3  1328 3579 5525
+3  3722 13321 13322
+3  3722 13322 14295
+3  15475 14295 15477
+3  10364 14295 15475
+3  10364 15475 15476
+3  13058 1324 14363
+3  14363 1324 1323
+3  14363 1323 4547
+3  4547 1323 4548
+3  3001 12323 4438
+3  15223 12215 7425
+3  4453 4166 13548
+3  12598 4453 13548
+3  8880 10974 5631
+3  9498 5631 10974
+3  10974 8880 15117
+3  6589 10974 15117
+3  6589 15117 8806
+3  12121 12123 9187
+3  13503 15023 13364
+3  2853 13775 14410
+3  466 13775 8704
+3  14410 13775 466
+3  466 468 14410
+3  15788 11137 14073
+3  2340 11137 15788
+3  15378 15788 14073
+3  9923 14071 738
+3  9923 738 14232
+3  9923 14232 14073
+3  15378 14073 14232
+3  13063 13062 14071
+3  3891 2299 3892
+3  3892 2299 6893
+3  13831 13624 5273
+3  2204 15789 12497
+3  2203 15789 2204
+3  13831 5273 5272
+3  15790 5272 14717
+3  15790 13831 5272
+3  12752 12751 12075
+3  13728 14717 14112
+3  14817 2202 2204
+3  14817 2204 12497
+3  15790 5026 13831
+3  15791 5027 5026
+3  15790 15791 5026
+3  15790 14717 15791
+3  2999 5027 15791
+3  15791 14717 14313
+3  2999 15791 14313
+3  15545 504 10836
+3  739 504 15545
+3  10389 15545 10836
+3  15546 739 15545
+3  15546 8127 739
+3  737 739 8127
+3  737 8127 1428
+3  504 503 10836
+3  4544 2024 4545
+3  2024 13048 4545
+3  13048 8711 4545
+3  13048 7077 8711
+3  7075 7077 13048
+3  10714 8875 15169
+3  9434 8418 15792
+3  9435 9434 15792
+3  8418 8417 15558
+3  8418 15558 15792
+3  3251 5898 8792
+3  15303 8792 5898
+3  6748 8792 15303
+3  12975 8792 6748
+3  14000 12975 6748
+3  14000 11874 12975
+3  12975 1882 8792
+3  10715 15792 15558
+3  9435 15792 10715
+3  10715 14307 8875
+3  14000 7076 11874
+3  14000 7438 7076
+3  14000 14556 7438
+3  14000 5902 14556
+3  10607 6352 9966
+3  301 12578 302
+3  4565 4564 14611
+3  13264 7894 13188
+3  5805 12321 12636
+3  4972 13264 4973
+3  15793 11262 15092
+3  15480 11262 15793
+3  8510 15793 15092
+3  15387 14518 14606
+3  15385 15387 14606
+3  14600 14518 15387
+3  7551 14518 14600
+3  7550 7551 14600
+3  13614 13615 7219
+3  13437 7162 15794
+3  15794 13438 13437
+3  13452 13438 15794
+3  3979 13438 13452
+3  6961 13452 15794
+3  7162 6961 15794
+3  6031 11736 6032
+3  10596 9434 11736
+3  6032 11736 9434
+3  10596 8418 9434
+3  14035 5262 14275
+3  8178 15564 2757
+3  15134 13840 14604
+3  14603 15134 14604
+3  4038 14554 9637
+3  4039 4038 9637
+3  15190 15220 15226
+3  15190 15226 13835
+3  11515 13605 11516
+3  11968 6098 8746
+3  15454 6098 11968
+3  15454 11968 8204
+3  13871 6217 6216
+3  9115 13871 6216
+3  14649 4312 9333
+3  2737 14649 9333
+3  8247 7285 4163
+3  608 7285 8247
+3  10828 608 8247
+3  10040 6629 14420
+3  8719 15795 8720
+3  15795 3887 15510
+3  12751 15795 15510
+3  8720 15795 12751
+3  13691 15314 13692
+3  15266 15314 13691
+3  13388 15266 13691
+3  13388 13691 13693
+3  12550 13564 15796
+3  15796 13564 13986
+3  15796 13986 13985
+3  15796 13985 10594
+3  10594 13985 15797
+3  15797 13985 2370
+3  2370 13985 13984
+3  2369 15797 2370
+3  2369 9786 15797
+3  9786 6948 15797
+3  10594 15797 6948
+3  10233 14980 4501
+3  11924 14980 10233
+3  15543 15798 15799
+3  15799 15798 15800
+3  15798 15801 15800
+3  15800 15801 7204
+3  15800 7204 8351
+3  7204 9285 8351
+3  15800 8351 5854
+3  15543 15801 15798
+3  15543 10594 15801
+3  15543 15796 10594
+3  15543 12550 15796
+3  10710 10708 12391
+3  11287 12391 9785
+3  10710 12391 11287
+3  5117 9786 2369
+3  11288 10710 11287
+3  5117 11287 9785
+3  8230 11456 13352
+3  6899 1696 13352
+3  13920 8440 8441
+3  4713 8440 13920
+3  6850 6849 7433
+3  10298 15036 14212
+3  7660 10298 14212
+3  7660 1412 5176
+3  13466 3118 12981
+3  13466 3119 3118
+3  7063 9325 15802
+3  7063 7199 9325
+3  8881 15802 9325
+3  8881 7064 15802
+3  14591 11550 11549
+3  11549 8105 8104
+3  8967 14661 15195
+3  8967 11440 14661
+3  12527 11440 11439
+3  10160 1331 3784
+3  7063 15802 7064
+3  2772 8588 2769
+3  14833 5850 12737
+3  12737 5850 2770
+3  14833 5851 5850
+3  12525 12527 2812
+3  12527 11439 2812
+3  4522 10838 12525
+3  4521 10838 4522
+3  8853 4521 4524
+3  8853 4524 15081
+3  15081 400 401
+3  9645 398 400
+3  9645 8104 398
+3  15081 401 8853
+3  5926 6508 14688
+3  566 15503 563
+3  566 6506 15503
+3  3881 6506 566
+3  14526 6506 3881
+3  14526 11929 6506
+3  11929 6507 6506
+3  563 5837 564
+3  564 5837 13277
+3  7122 15050 13182
+3  15050 7121 14997
+3  14997 7121 14995
+3  7122 7121 15050
+3  14995 14047 14592
+3  14592 14047 14046
+3  11546 13277 13181
+3  4722 7184 4723
+3  8085 14038 7053
+3  12739 10487 11507
+3  15356 12284 15357
+3  15356 15033 12284
+3  12284 15033 15296
+3  4661 15296 15033
+3  9796 15357 12284
+3  15103 12389 15357
+3  7840 15349 6109
+3  5217 6109 15349
+3  5217 15349 13080
+3  2643 15349 7840
+3  3302 15294 12871
+3  12871 15294 11622
+3  12871 11622 2098
+3  10063 14928 13783
+3  14577 4137 14928
+3  13783 14928 4137
+3  13889 928 927
+3  6874 927 10937
+3  6874 13889 927
+3  6874 10937 6875
+3  6876 13889 6874
+3  13889 6876 13887
+3  4539 4538 9048
+3  8457 4539 9048
+3  13656 1106 3402
+3  3402 1106 1105
+3  11754 7883 7882
+3  11755 7882 9299
+3  10597 4402 14795
+3  4402 46 14795
+3  4400 4402 10597
+3  2946 1341 15803
+3  6955 11188 11187
+3  3991 6955 11187
+3  15804 3992 3991
+3  15803 11480 2946
+3  3080 12250 12249
+3  3080 3992 12250
+3  3992 15804 12250
+3  15804 14849 12250
+3  6955 6954 11188
+3  1343 15803 1341
+3  11046 11045 9752
+3  11046 9752 13929
+3  13063 9922 11773
+3  8371 11772 11774
+3  8371 8370 11772
+3  11774 14260 8371
+3  8369 8371 14260
+3  12249 13606 1771
+3  1771 13606 4285
+3  15162 3339 3341
+3  6532 15162 3341
+3  14430 15162 6532
+3  5845 1432 14168
+3  5844 1432 5845
+3  14683 14889 14642
+3  7305 8016 13414
+3  7529 8016 7528
+3  7307 6273 15299
+3  7304 7307 15299
+3  7304 15299 10458
+3  8015 8017 13429
+3  5385 9444 15468
+3  9444 6411 11697
+3  9444 9443 6411
+3  14624 1334 12737
+3  14445 15805 4224
+3  14445 4224 13942
+3  11769 3179 15805
+3  11769 15805 14445
+3  947 949 9546
+3  82 947 83
+3  83 947 7374
+3  9546 7374 947
+3  6665 10253 3021
+3  3021 10253 1779
+3  9033 9032 9233
+3  14861 9033 9233
+3  12413 9233 9032
+3  12413 9232 9233
+3  12413 9032 6626
+3  6626 9032 2937
+3  3394 6626 2937
+3  7680 1197 1196
+3  7944 12799 13971
+3  8955 13971 12799
+3  12399 1197 7680
+3  6546 6545 14151
+3  13971 8955 3301
+3  7942 13971 3301
+3  15806 14151 6646
+3  14150 6646 14151
+3  3700 14512 3698
+3  15187 14439 4094
+3  12862 4734 4732
+3  15186 8545 15187
+3  10892 15185 13617
+3  15185 15187 4094
+3  1756 4295 1551
+3  1756 1551 6276
+3  2513 13152 13399
+3  2513 8743 2671
+3  3574 3573 13430
+3  3574 13430 7252
+3  15022 15023 12341
+3  15022 12341 9017
+3  14296 2730 12873
+3  10478 2168 6334
+3  6334 2168 2167
+3  12364 15664 12365
+3  12364 15663 15664
+3  2397 2396 4446
+3  270 6720 13129
+3  5736 1240 3685
+3  6756 3685 3684
+3  3623 331 14917
+3  14917 331 333
+3  8284 10280 11694
+3  8283 10280 8284
+3  14917 333 386
+3  386 13841 14917
+3  14560 8357 11437
+3  150 11437 8357
+3  3032 9146 3033
+3  2871 12529 11703
+3  13171 7191 8717
+3  2834 13171 8717
+3  11553 3694 9753
+3  11553 3695 3694
+3  11553 9409 13210
+3  11553 11554 9409
+3  13210 3695 11553
+3  9493 7475 7477
+3  12479 9493 9278
+3  1806 12479 9278
+3  12479 1806 12358
+3  1806 1805 12358
+3  15807 1805 1807
+3  2833 1805 15807
+3  2833 15807 13171
+3  12479 3298 9493
+3  13636 669 671
+3  14748 11421 14200
+3  14200 11421 10407
+3  2459 14844 2460
+3  495 2460 14844
+3  10369 10370 11519
+3  15808 11519 10370
+3  7414 15808 7412
+3  7412 15808 10370
+3  5516 15317 13093
+3  5515 15317 5516
+3  15305 15317 5515
+3  15305 9326 15317
+3  13578 12195 7288
+3  14724 13578 7288
+3  14724 7288 5292
+3  13966 5292 7288
+3  5292 13966 5293
+3  5293 13966 15305
+3  13966 15304 15305
+3  13578 7523 12195
+3  13578 5704 7523
+3  11996 5704 845
+3  11110 845 844
+3  11110 11996 845
+3  13192 844 9938
+3  2610 523 11855
+3  1165 1164 11875
+3  11875 1164 8482
+3  11875 8482 7351
+3  11584 11875 7351
+3  14961 7100 14186
+3  10359 6938 11368
+3  12672 15342 3190
+3  3191 3190 15342
+3  12671 13416 12672
+3  15342 12672 13416
+3  12673 14736 12671
+3  3151 3150 14984
+3  3151 14984 11164
+3  11164 14984 4099
+3  10621 3190 14958
+3  10621 12672 3190
+3  10621 12134 12672
+3  11014 6509 3258
+3  10469 7964 7963
+3  12548 7173 7172
+3  3916 10031 12548
+3  13878 15809 15482
+3  15810 13420 15809
+3  15482 15809 13420
+3  15810 15809 12926
+3  15809 13878 12926
+3  12516 12926 13878
+3  9573 10264 431
+3  10264 14429 3321
+3  10264 3321 431
+3  5751 14429 10264
+3  5651 15811 13261
+3  14961 15811 2797
+3  13261 15811 14961
+3  15811 2798 2797
+3  5651 2798 15811
+3  14612 9351 5039
+3  12709 7218 12537
+3  12708 12709 12537
+3  7684 1210 1213
+3  7684 1213 7685
+3  7685 1213 12486
+3  1213 11702 12486
+3  1212 11702 1213
+3  7219 7218 14966
+3  10130 13378 4204
+3  5233 10130 4204
+3  13378 10130 9889
+3  14253 13910 13909
+3  10675 13909 10676
+3  2848 10891 11414
+3  11609 8544 10893
+3  11609 10893 10891
+3  11609 10891 2848
+3  7211 14423 7212
+3  9181 9350 9179
+3  9179 9350 9860
+3  13199 15096 9179
+3  2113 7875 2111
+3  13228 2747 12978
+3  13808 6577 4780
+3  14063 13808 4780
+3  5420 13808 14063
+3  11908 13609 13808
+3  8209 8208 9694
+3  9694 7788 8209
+3  7788 3614 8209
+3  3891 2297 2299
+3  9787 5722 5130
+3  5722 5723 5130
+3  11833 3691 15066
+3  3691 3362 15066
+3  11833 5133 3691
+3  3475 9528 9183
+3  3616 9183 9528
+3  15812 3617 3616
+3  15812 3616 9528
+3  15812 9528 13413
+3  10028 3617 15812
+3  15812 13413 15116
+3  15245 15813 15814
+3  15799 15814 15813
+3  15800 15814 15799
+3  5854 15814 15800
+3  5856 15814 5854
+3  15542 15543 15799
+3  15542 15799 15815
+3  15815 15799 15813
+3  8364 15815 15813
+3  8364 15813 15816
+3  11761 8364 15816
+3  3756 11761 15816
+3  15816 13245 3756
+3  3756 13245 3757
+3  13070 5132 15682
+3  15743 13070 15682
+3  15498 13070 15743
+3  15743 15682 15397
+3  8363 15542 15815
+3  8363 15815 8364
+3  15245 15814 5856
+3  2855 10742 2856
+3  2855 14805 10742
+3  9973 14805 15551
+3  6565 6564 10919
+3  6565 10919 2368
+3  15362 6565 2368
+3  15362 2368 13984
+3  6565 15362 7590
+3  2170 6565 7590
+3  185 10289 15010
+3  13632 1590 9255
+3  9255 1590 5691
+3  9255 5691 14954
+3  9253 9255 14954
+3  12719 5378 2314
+3  12719 2136 5378
+3  12766 13758 1356
+3  6737 1354 6740
+3  15082 14383 13741
+3  13104 14383 14024
+3  13103 14383 13104
+3  13103 13741 14383
+3  7053 7052 13610
+3  9095 7053 13610
+3  8085 7053 9095
+3  6839 10614 6840
+3  10615 10614 6839
+3  7582 4393 6449
+3  6449 4393 10819
+3  6451 7388 7582
+3  6451 7582 6449
+3  7388 13507 7582
+3  15817 4908 13507
+3  15817 13507 7388
+3  14431 4908 15817
+3  10614 15675 6840
+3  10613 15675 10614
+3  6813 382 6814
+3  7387 15817 7388
+3  7387 14431 15817
+3  10925 14325 10924
+3  13367 6895 232
+3  6896 6895 13367
+3  9273 9272 15102
+3  9273 15102 10243
+3  9286 9408 14001
+3  15818 9286 14001
+3  15818 14001 11222
+3  15818 11222 14482
+3  14482 13748 15818
+3  15818 13748 9286
+3  5053 5055 15055
+3  7601 5053 15055
+3  11201 12002 9905
+3  11201 9905 8638
+3  11201 11200 12002
+3  9383 9465 4768
+3  2358 12002 2359
+3  9035 12064 15491
+3  9035 15192 12064
+3  10023 9712 2286
+3  10023 3143 9712
+3  11206 9200 9201
+3  1145 4658 9200
+3  9200 4658 912
+3  9200 912 2663
+3  1145 9200 11206
+3  13911 5768 3678
+3  5768 3679 3678
+3  3272 13729 5274
+3  3273 3275 14316
+3  3273 14316 14315
+3  553 14315 13961
+3  553 555 3273
+3  553 3273 14315
+3  9173 14880 11253
+3  12292 11253 14880
+3  11646 14594 14595
+3  10500 10856 11579
+3  4552 1607 1609
+3  10500 11579 13056
+3  4554 1607 4552
+3  11811 1607 4554
+3  8043 2546 11828
+3  8043 11828 2533
+3  15029 5013 5015
+3  12812 5013 13051
+3  15029 13051 5013
+3  10562 7578 13661
+3  7578 10562 13481
+3  10562 13661 15819
+3  15819 13661 15820
+3  15820 13661 13956
+3  13956 13661 10036
+3  15820 13956 15821
+3  15821 13956 13957
+3  15821 13957 12330
+3  13957 12331 12330
+3  14452 12330 4413
+3  14452 15821 12330
+3  15822 15821 14452
+3  15820 15821 15822
+3  15819 15820 15822
+3  4298 15819 15822
+3  4298 4297 15819
+3  4297 10562 15819
+3  4298 15822 2443
+3  2443 15822 14452
+3  14452 4413 9104
+3  13957 14926 12331
+3  5428 5509 4503
+3  14808 14405 1640
+3  10320 6391 6393
+3  14405 10320 6393
+3  1640 14405 6393
+3  8871 12284 8872
+3  5279 13214 11424
+3  12200 1384 12844
+3  12844 1384 1386
+3  14239 14238 8462
+3  9065 13113 14238
+3  15823 14726 14239
+3  15118 14726 15823
+3  14239 14830 15823
+3  14239 8462 14830
+3  15118 15823 14830
+3  9061 15118 14830
+3  12097 1112 12098
+3  12097 1113 1112
+3  12621 11798 12947
+3  12621 12726 11798
+3  12724 12726 12621
+3  957 6264 12725
+3  12727 12725 6264
+3  15824 12055 8507
+3  14287 8507 12055
+3  5218 14287 12055
+3  5218 12055 5219
+3  12880 4111 4110
+3  14849 15804 14552
+3  15804 3991 14552
+3  13465 4110 4290
+3  12880 4110 13465
+3  11199 11625 6605
+3  11199 8309 11625
+3  5563 7536 5564
+3  12583 12585 247
+3  245 247 12585
+3  411 245 12585
+3  10129 2451 9891
+3  10129 2688 2451
+3  2688 10129 5234
+3  5233 5234 10129
+3  1777 5289 11056
+3  12896 5289 1777
+3  11056 5289 14058
+3  13614 7219 1776
+3  1776 12896 1777
+3  7426 14696 7427
+3  9781 7427 14696
+3  1132 13153 1130
+3  6730 11779 4569
+3  12340 4570 7427
+3  9781 12340 7427
+3  4221 1808 4219
+3  6987 6986 12045
+3  12045 6986 1392
+3  14712 1066 9970
+3  14712 11221 1066
+3  11559 15355 15550
+3  6558 15550 15355
+3  11946 11559 15550
+3  13040 10357 11191
+3  10495 10497 13490
+3  15250 10495 13490
+3  13477 10495 15250
+3  14508 13477 15250
+3  3228 13028 2552
+3  13028 2550 2552
+3  1292 14220 13038
+3  14220 13039 13038
+3  13040 11191 12789
+3  4114 1536 14188
+3  1538 1293 1292
+3  11039 4114 15825
+3  15825 4114 14188
+3  14188 1446 15825
+3  15825 1446 15826
+3  1446 1445 15826
+3  15826 1445 14016
+3  1445 6236 14016
+3  1446 13037 4497
+3  14188 13037 1446
+3  6707 14304 6708
+3  6707 8477 14304
+3  14304 8477 11120
+3  1305 15827 11120
+3  1305 11120 8477
+3  1305 256 15827
+3  12929 256 14007
+3  12929 15827 256
+3  15828 14506 11039
+3  5878 14506 15828
+3  5878 15828 15829
+3  15828 15826 15829
+3  15829 15826 14016
+3  5876 15829 13778
+3  5878 15829 5876
+3  13778 1848 10123
+3  15827 12928 11120
+3  12929 12928 15827
+3  13778 110 1848
+3  14305 185 12443
+3  15825 15826 15828
+3  15828 11039 15825
+3  15250 13490 3229
+3  13926 9508 2685
+3  9726 2685 9508
+3  12319 2685 9726
+3  8737 2900 2902
+3  1264 12068 1265
+3  12068 11568 1265
+3  12958 8253 7741
+3  3525 8253 12958
+3  13346 14263 6962
+3  15158 5369 6781
+3  15158 6781 15830
+3  15830 6781 1454
+3  15830 1454 13215
+3  12543 11581 13215
+3  15158 15830 15159
+3  15831 15832 14627
+3  15831 13898 14636
+3  13883 13886 14207
+3  13883 14627 15832
+3  13884 13883 15832
+3  7490 9932 8464
+3  13630 9932 7490
+3  12171 11147 1574
+3  3237 7193 3828
+3  10930 10488 10522
+3  15354 12560 7707
+3  15354 7707 7706
+3  10277 10930 10522
+3  4771 1349 9405
+3  1349 9665 1997
+3  9405 1349 1997
+3  1998 1997 9665
+3  9405 1997 1996
+3  5209 4771 9405
+3  8873 15296 6106
+3  6106 15296 4661
+3  8914 8690 549
+3  8914 2703 8690
+3  8914 2702 2703
+3  2702 8914 4660
+3  2702 4660 4659
+3  14491 11061 14910
+3  4041 11061 14491
+3  5888 4292 4670
+3  7187 8457 9048
+3  7187 14952 8457
+3  14952 14638 8457
+3  14165 2692 14166
+3  2693 2692 14165
+3  11309 13515 11307
+3  2693 14165 9226
+3  5251 11049 5831
+3  5249 5251 5831
+3  14975 11008 9223
+3  3763 14975 9223
+3  3762 14975 3763
+3  15331 11008 14975
+3  15331 14975 6763
+3  5231 357 10126
+3  10126 357 5773
+3  417 2364 1966
+3  15398 13910 6841
+3  6841 13910 14254
+3  11676 14455 1812
+3  4899 1812 14455
+3  5580 15398 6841
+3  12212 9742 11210
+3  297 13032 295
+3  14634 13032 297
+3  14634 297 3458
+3  8499 8497 14638
+3  8499 14638 12827
+3  14638 8497 8457
+3  8497 8458 8457
+3  15356 11683 15033
+3  10828 12691 6562
+3  10828 8247 12691
+3  14792 3376 11048
+3  9580 3376 14792
+3  11048 8019 14792
+3  14792 8019 9958
+3  1107 1106 9944
+3  1107 9944 9943
+3  10772 7888 13389
+3  7888 12705 13389
+3  7886 7888 10772
+3  15801 10594 7205
+3  15801 7205 7204
+3  13830 2048 2050
+3  3660 3662 15318
+3  3662 10138 15318
+3  10139 10138 3662
+3  12559 4746 7327
+3  1717 3212 3214
+3  10620 3212 1717
+3  14193 3212 10620
+3  2365 6212 2088
+3  14914 14559 14346
+3  14877 14346 14345
+3  14877 14914 14346
+3  12963 12302 12301
+3  2644 7840 7841
+3  12302 2644 7841
+3  2643 7840 2644
+3  1267 3428 1268
+3  3428 3429 2266
+3  6723 2614 11028
+3  12191 2614 6723
+3  2614 2616 11028
+3  9798 11028 2616
+3  11782 9170 2515
+3  11782 2515 11783
+3  11783 2515 2514
+3  14493 11783 2514
+3  11783 14493 11781
+3  13111 11781 14493
+3  15464 6339 6338
+3  13642 15464 6338
+3  13638 13637 4007
+3  14807 9945 4435
+3  522 9945 14807
+3  522 14807 12804
+3  12804 3918 8183
+3  14807 3918 12804
+3  8183 3918 8184
+3  13866 14489 14759
+3  13928 14759 14489
+3  13928 14489 12035
+3  4277 4279 6877
+3  7190 1807 4425
+3  15807 1807 7190
+3  13171 15807 7190
+3  11166 6863 8992
+3  11166 14907 6863
+3  12782 14907 11166
+3  12782 11166 15554
+3  15554 11166 8991
+3  13897 14160 10467
+3  13897 2599 14160
+3  2599 2596 14160
+3  2596 2598 13712
+3  14264 6130 14265
+3  6131 6130 14264
+3  15581 13443 13440
+3  9609 15833 10721
+3  4184 10721 15833
+3  5394 4759 1355
+3  4303 4759 5394
+3  4302 14957 4759
+3  4759 14957 12765
+3  1357 4759 12765
+3  3041 1592 1594
+3  14550 100 15225
+3  14550 15225 13968
+3  14550 1826 100
+3  100 1826 98
+3  12882 13284 1662
+3  13266 15295 13847
+3  13266 13265 15295
+3  9510 13847 12503
+3  9510 13266 13847
+3  15505 10802 15834
+3  15769 15834 10802
+3  15770 15834 15769
+3  15834 15770 15773
+3  15783 15834 15773
+3  15505 15834 15783
+3  13396 8115 8117
+3  13396 8117 8925
+3  8892 8115 13396
+3  890 14100 887
+3  3861 8672 10489
+3  3861 10489 14100
+3  3861 14100 890
+3  7467 13880 15452
+3  10014 421 420
+3  10014 420 10015
+3  10015 420 419
+3  8425 13257 15833
+3  13259 15833 13257
+3  13259 4184 15833
+3  7257 4184 13259
+3  8424 8425 9609
+3  15833 9609 8425
+3  865 9285 6620
+3  6620 9285 13759
+3  6620 13759 5734
+3  769 10427 12473
+3  769 12473 767
+3  10427 12474 12473
+3  8058 8966 8059
+3  8059 8966 767
+3  12473 8059 767
+3  2983 12936 9630
+3  11266 11267 3906
+3  15795 8719 12865
+3  3887 15795 12865
+3  14960 2578 14959
+3  2578 14960 5214
+3  10040 9292 6629
+3  11102 2020 8391
+3  14516 4415 1970
+3  14516 1970 14039
+3  9988 13026 5323
+3  14276 13313 9612
+3  9612 13313 10869
+3  10014 10016 15477
+3  10014 15477 14868
+3  13322 14868 14295
+3  15477 14295 14868
+3  4046 12637 12639
+3  4046 12639 11347
+3  13653 11347 11344
+3  13653 4046 11347
+3  4046 13653 4047
+3  6848 4047 1502
+3  4049 4047 6848
+3  6848 6850 4049
+3  6849 6848 7724
+3  11999 1676 12861
+3  5099 6791 5100
+3  6791 4100 5100
+3  5430 6452 5739
+3  5430 5739 5741
+3  11478 12385 3484
+3  11479 11478 3484
+3  14832 889 4766
+3  15452 4766 889
+3  2436 889 14832
+3  6715 15170 13149
+3  15170 11935 13149
+3  15806 2054 15333
+3  15806 15333 14151
+3  6148 6151 15333
+3  15333 6151 6546
+3  6149 6148 10888
+3  2054 10888 6148
+3  2054 6148 15333
+3  11181 583 580
+3  15290 11181 580
+3  582 12399 15290
+3  582 15290 580
+3  15289 15290 12399
+3  15288 15289 12399
+3  7680 15288 12399
+3  13382 12989 5073
+3  14034 13382 5073
+3  12620 12723 12724
+3  810 12723 12620
+3  5617 14215 14217
+3  5616 5387 14215
+3  5616 14215 5617
+3  5617 14217 12290
+3  10693 12861 4203
+3  10019 11480 6785
+3  6786 6785 11480
+3  11480 15803 6786
+3  15803 1343 8295
+3  15803 8295 6786
+3  3414 12752 12075
+3  10221 5546 15097
+3  15097 5546 5548
+3  14392 7567 14122
+3  14392 13674 7567
+3  13674 7565 7567
+3  12024 4103 10539
+3  502 12024 10799
+3  1138 15461 1136
+3  15461 1138 15474
+3  1133 15461 15474
+3  1133 8948 15461
+3  8335 7985 7984
+3  8335 7984 10510
+3  10510 7984 3109
+3  15176 5939 12547
+3  6971 778 777
+3  3860 15071 12933
+3  6973 6972 8321
+3  6973 8321 8323
+3  11441 11443 11927
+3  10172 1122 10964
+3  15835 11363 135
+3  13879 135 11363
+3  13879 11363 11366
+3  11363 15835 11364
+3  142 15835 135
+3  11364 15835 8552
+3  8552 15835 3094
+3  142 3094 15835
+3  11078 10970 11076
+3  10601 10971 10970
+3  10601 10970 11078
+3  13186 2036 14773
+3  6261 14964 14773
+3  14964 5093 13229
+3  14964 13229 14773
+3  13229 13186 14773
+3  6304 13960 6302
+3  554 13960 6304
+3  6304 463 465
+3  13778 15829 108
+3  108 15829 14016
+3  13778 108 110
+3  11129 14305 5301
+3  5301 14305 12444
+3  14305 12443 12444
+3  92 9849 592
+3  92 11712 9849
+3  13987 11712 92
+3  4192 9043 9005
+3  4192 9005 788
+3  788 9005 789
+3  9005 3351 789
+3  11588 9568 7481
+3  11588 7481 7480
+3  3987 8903 3988
+3  10354 11887 10352
+3  13894 11887 10354
+3  13894 10354 10720
+3  11540 13894 10720
+3  15233 15484 15232
+3  15232 15484 10391
+3  10391 15484 9807
+3  10391 9807 13448
+3  14813 10391 10393
+3  15232 10391 14813
+3  15521 5407 7655
+3  15521 13788 5407
+3  14789 13970 13788
+3  14789 14790 13970
+3  14237 14789 13788
+3  14237 13788 15521
+3  14789 14237 3876
+3  11523 14789 3876
+3  14813 4763 15063
+3  15063 4763 8551
+3  2604 683 682
+3  15836 2653 7195
+3  14233 2653 15836
+3  9389 14233 15836
+3  13469 9389 15836
+3  13469 15836 7195
+3  7640 11718 12092
+3  12092 13230 7640
+3  7640 13230 7639
+3  15154 5852 9214
+3  9455 15154 9214
+3  9455 9454 15154
+3  2676 264 2677
+3  10111 12964 15341
+3  11896 5517 2141
+3  8072 8046 8044
+3  7460 539 7299
+3  1093 12507 8548
+3  8776 14404 14925
+3  10810 4173 2174
+3  8011 11737 10314
+3  10315 10314 11737
+3  10204 14793 4758
+3  3176 10204 4758
+3  7189 8804 7187
+3  7594 14131 13992
+3  10527 9491 9149
+3  13148 9149 9491
+3  13074 980 2025
+3  8339 8341 5984
+3  2602 2601 8450
+3  13895 2602 8450
+3  11425 4305 13327
+3  9540 4305 11425
+3  11641 9695 8384
+3  2877 2876 13109
+3  15837 2877 13109
+3  10030 5330 5149
+3  1585 5346 12798
+3  1585 1584 5346
+3  1994 1125 11245
+3  1302 1301 3268
+3  12610 1302 3268
+3  8243 4171 8018
+3  8108 3515 3514
+3  6645 4947 8097
+3  1740 6645 8097
+3  1332 1334 6842
+3  14629 523 525
+3  8659 10304 8660
+3  2218 8073 14297
+3  9158 14391 9159
+3  8319 1176 15414
+3  9173 14148 9174
+3  11017 9919 8733
+3  11017 8733 9195
+3  2774 2888 982
+3  3002 14507 5877
+3  8577 8576 10118
+3  12371 12982 14041
+3  10733 12371 14041
+3  6468 13274 7898
+3  13339 7898 13274
+3  7010 7012 4640
+3  6907 3905 3904
+3  8027 1743 1742
+3  1317 13567 10656
+3  10334 12346 10749
+3  3456 9426 3547
+3  5449 3547 9426
+3  2583 8122 6984
+3  11147 11341 11148
+3  9480 7117 2344
+3  9180 9480 2344
+3  9372 1242 9373
+3  10807 8211 8213
+3  10807 8213 12333
+3  15098 12111 840
+3  14678 15098 840
+3  6011 6010 14621
+3  9481 13465 6251
+3  15097 5548 15034
+3  6716 2102 6715
+3  13959 8683 8681
+3  4098 8660 3222
+3  4099 4098 3222
+3  9363 9362 13209
+3  12532 13686 219
+3  2253 2255 14501
+3  4011 10037 4012
+3  3521 1799 10616
+3  7712 4626 3171
+3  4292 4291 6971
+3  11080 13622 9099
+3  11080 9099 8688
+3  8290 6977 9131
+3  15361 7341 6704
+3  3294 9580 9958
+3  13601 323 322
+3  3239 323 13601
+3  13824 13248 13023
+3  13824 13023 11660
+3  2465 2467 12699
+3  10826 12378 10827
+3  10199 2366 1714
+3  8752 13799 6579
+3  2952 9562 464
+3  1222 10206 6267
+3  4557 7118 8856
+3  7337 9563 15107
+3  5429 15107 9563
+3  8916 8396 8398
+3  11901 10081 969
+3  12724 12621 12620
+3  6066 6336 3901
+3  5464 9209 9208
+3  11437 11436 14560
+3  10749 8000 10750
+3  8033 76 15048
+3  3208 76 8033
+3  5593 1816 1818
+3  11996 7523 5704
+3  13871 1385 1607
+3  1238 2575 2890
+3  13326 14347 6095
+3  6096 6095 14347
+3  13389 9171 9643
+3  13495 10634 779
+3  1026 12778 12777
+3  8680 12777 12778
+3  3440 8145 9106
+3  8186 9369 9371
+3  12168 13761 2473
+3  4111 4228 13765
+3  1557 5109 1558
+3  7151 543 9079
+3  5116 7259 10919
+3  3455 3456 9571
+3  12849 12170 12169
+3  12849 12169 11785
+3  12000 1529 817
+3  816 12000 817
+3  7982 7983 9483
+3  3085 8606 3086
+3  14944 12666 12665
+3  6373 7768 7997
+3  14490 7776 9820
+3  14660 13358 14999
+3  15603 14999 13358
+3  731 919 918
+3  2740 8854 7227
+3  215 1563 216
+3  9821 1563 215
+3  8606 3085 1984
+3  6563 12693 14618
+3  6563 14618 7127
+3  6710 4830 2917
+3  6317 12315 12314
+3  9031 6652 14578
+3  2192 2191 6348
+3  12459 9092 13792
+3  12459 13792 6613
+3  6063 6675 98
+3  14153 10201 14719
+3  7603 8092 7211
+3  14369 15164 3773
+3  13019 4004 4006
+3  7836 7331 7837
+3  10037 10036 13662
+3  7131 8096 4653
+3  7131 4653 664
+3  11511 7718 7717
+3  13373 13372 6146
+3  14990 13423 14375
+3  15471 9534 9533
+3  13662 6676 10659
+3  259 11056 14058
+3  259 14058 260
+3  10636 3183 10798
+3  7785 11801 11021
+3  14194 11021 11801
+3  10773 7886 10772
+3  3327 4071 7266
+3  1230 1443 1231
+3  10582 11815 10583
+3  5273 13624 2412
+3  5273 2412 2411
+3  10065 10064 13422
+3  11765 391 2187
+3  5777 8826 2395
+3  5734 13759 4736
+3  2338 2340 15788
+3  11256 8137 11167
+3  4077 4653 13510
+3  3518 2092 5086
+3  7042 14230 4385
+3  7042 4385 9450
+3  13297 8783 8191
+3  7266 14698 7267
+3  3798 14477 3799
+3  2297 11655 2298
+3  900 5541 901
+3  3442 14637 10426
+3  9152 14402 206
+3  11786 10007 9172
+3  4940 6787 3370
+3  2890 1991 1789
+3  7934 6712 10267
+3  7934 10267 5550
+3  4300 9375 10926
+3  15390 3457 4045
+3  11781 14335 11782
+3  11781 13110 14335
+3  230 8918 231
+3  4852 15838 12159
+3  7321 334 11299
+3  14760 6396 6395
+3  13646 13645 304
+3  14111 3848 4867
+3  6362 3131 1978
+3  8319 14901 9330
+3  3251 5897 5898
+3  7816 3623 8313
+3  5020 7429 786
+3  4999 302 13800
+3  11894 4623 9114
+3  13500 3866 13501
+3  6208 6725 6209
+3  14252 7074 14164
+3  14252 14164 2868
+3  13881 13329 14349
+3  13881 14349 14350
+3  11407 9534 15471
+3  15083 818 15410
+3  9813 15410 818
+3  13080 5215 5217
+3  5459 5458 5738
+3  1393 15172 5175
+3  9476 14575 5951
+3  9274 9367 9366
+3  4981 1003 11611
+3  4981 4980 1003
+3  11283 7012 14031
+3  14825 1460 1462
+3  3945 14293 6535
+3  11894 9114 9792
+3  6288 2452 2454
+3  13036 11310 2382
+3  2249 6276 1553
+3  9199 14234 7475
+3  7270 12361 13862
+3  7353 7332 11936
+3  3147 2557 2559
+3  11131 11130 15072
+3  1238 1789 1236
+3  12016 10483 10482
+3  12661 5858 4747
+3  4599 4202 4205
+3  12163 7017 1097
+3  15359 5726 2864
+3  4868 6406 3927
+3  4857 5248 5247
+3  172 4999 13800
+3  8988 3467 12640
+3  5654 9579 9580
+3  8474 8473 5587
+3  11390 5953 5682
+3  11389 5953 11390
+3  8963 5265 13012
+3  11159 9050 10339
+3  5967 5296 12762
+3  5965 5967 12762
+3  8039 13781 6191
+3  2148 7364 2149
+3  12995 1545 14298
+3  4695 1157 886
+3  2211 4793 9867
+3  3988 8347 10603
+3  11512 11232 8942
+3  11512 8942 7718
+3  2674 10433 14802
+3  14832 15839 8215
+3  4766 15839 14832
+3  12190 9830 4828
+3  7038 14132 14079
+3  7038 14079 14078
+3  10289 10288 15010
+3  123 258 124
+3  11179 9670 3731
+3  13980 11179 3731
+3  844 843 834
+3  6693 834 843
+3  7791 12283 8407
+3  12067 4542 11568
+3  7670 5034 10662
+3  9039 8862 212
+3  9206 9207 5501
+3  11065 7506 992
+3  8816 12714 12690
+3  12828 10064 13782
+3  10022 2286 11896
+3  1894 4009 4008
+3  815 817 10790
+3  11883 5968 5192
+3  3890 5293 11226
+3  3736 3735 11897
+3  10980 2805 3031
+3  713 715 4214
+3  11386 14415 5327
+3  8305 14415 11386
+3  14381 12959 3782
+3  3781 14381 3782
+3  10472 11522 3873
+3  8448 10472 3873
+3  4602 12062 14361
+3  12495 12187 4575
+3  1601 1068 1602
+3  2765 2157 2009
+3  9461 3087 3086
+3  5450 639 15409
+3  5450 3153 639
+3  5656 3761 5657
+3  5983 5985 8897
+3  8292 7472 5215
+3  8292 5215 13079
+3  9476 3826 14574
+3  5766 2520 5767
+3  5766 7104 2520
+3  8694 14244 11563
+3  8211 4024 8212
+3  15125 15210 3532
+3  15125 3532 5232
+3  6142 3293 3295
+3  11265 15480 15840
+3  9477 5951 2898
+3  6403 9505 6404
+3  1706 3397 3720
+3  8019 11048 6012
+3  301 385 12578
+3  9352 9351 14348
+3  3985 2350 13809
+3  2347 2350 3985
+3  5569 1631 1633
+3  9455 9636 13812
+3  11045 13764 9750
+3  11045 9750 9752
+3  14244 5332 11563
+3  14860 15489 14225
+3  11762 8326 9066
+3  2611 6104 2612
+3  1408 6104 2611
+3  9827 9826 9974
+3  12332 4807 11180
+3  12821 14610 14242
+3  8058 14242 14610
+3  14709 12181 5765
+3  14709 5765 5763
+3  5338 8520 15061
+3  5337 8520 5338
+3  6217 12323 6218
+3  12412 625 13630
+3  11309 7214 13515
+3  6192 1546 12247
+3  2146 2092 4606
+3  2567 9815 2565
+3  8934 11883 8931
+3  3125 10362 3126
+3  9643 10699 2892
+3  10558 1351 1353
+3  14599 15017 10496
+3  13478 14599 10496
+3  7101 7103 15457
+3  4478 2425 4896
+3  9767 9766 13204
+3  7715 7714 12004
+3  6753 2917 14609
+3  15317 9326 9328
+3  8360 8340 8339
+3  944 946 2863
+3  6385 6387 3925
+3  15067 8170 496
+3  495 15067 496
+3  9998 10000 8080
+3  8081 8080 10000
+3  11450 11449 14594
+3  11450 14594 11646
+3  14049 12809 3133
+3  13187 12123 12122
+3  11844 15373 4370
+3  8055 1514 10568
+3  13223 14589 13224
+3  12851 13683 9154
+3  13218 6777 444
+3  5867 5869 8737
+3  5997 8102 9564
+3  5426 5425 10350
+3  4918 15662 15663
+3  9730 15662 4918
+3  1849 9793 1847
+3  14612 5039 13400
+3  5714 275 277
+3  4002 4001 6073
+3  2846 10791 2709
+3  2706 2709 10791
+3  5804 1785 15018
+3  3698 15668 3699
+3  6153 1275 9127
+3  4688 4104 4689
+3  11693 12132 14749
+3  9727 8988 11895
+3  3256 5508 6430
+3  8141 3857 341
+3  14525 3880 14055
+3  6038 6040 11302
+3  14131 9019 8029
+3  13018 12337 1039
+3  12480 6952 4984
+3  12936 6220 9630
+3  12009 2935 12601
+3  1587 7080 10319
+3  10865 857 4951
+3  12131 3356 9621
+3  12211 4319 5067
+3  9548 14659 9549
+3  3253 10335 252
+3  4917 9984 4915
+3  9883 5126 8370
+3  9842 8370 5126
+3  8231 7129 7130
+3  13201 8597 14121
+3  4945 2321 2323
+3  4945 2323 4420
+3  12957 14904 10832
+3  2333 7981 2334
+3  12691 12693 6562
+3  8521 14785 2930
+3  4055 6239 1288
+3  8628 6724 8629
+3  26 28 9898
+3  261 260 3926
+3  8390 11102 8391
+3  13562 13782 4139
+3  13978 5253 5252
+3  13978 5252 15070
+3  4459 13636 12425
+3  10451 10450 15292
+3  11509 197 11860
+3  8812 9877 14981
+3  611 9029 10344
+3  14791 611 10344
+3  12143 7702 11410
+3  2809 4741 13010
+3  12880 9482 4229
+3  10729 15060 12184
+3  4420 15060 10729
+3  6285 8467 7044
+3  7006 7005 11632
+3  2559 3300 9004
+3  344 5111 345
+3  3037 345 5111
+3  15433 4941 2318
+3  15433 2318 13635
+3  11134 9570 11689
+3  9569 9570 11134
+3  899 12072 5796
+3  14521 974 12403
+3  3710 3709 5709
+3  3722 267 13321
+3  2999 2998 10922
+3  3531 14424 14199
+3  3291 2085 2084
+3  211 9040 212
+3  3965 4410 2799
+3  2792 2791 13557
+3  9055 7081 9056
+3  1424 10239 3430
+3  1764 851 1765
+3  8514 4605 4604
+3  4425 1807 4424
+3  10809 7610 10835
+3  7787 7788 9694
+3  13389 11786 9171
+3  7535 6751 7536
+3  9240 10702 6925
+3  8719 6226 12865
+3  10508 2193 14906
+3  3139 5501 3140
+3  11051 14572 3781
+3  11263 13777 13318
+3  11696 3255 13639
+3  1523 5398 5118
+3  8558 8559 12558
+3  13496 779 781
+3  4374 12426 10108
+3  15421 14248 14247
+3  5970 6134 3928
+3  5970 3928 3930
+3  8985 5286 5577
+3  12867 12463 4453
+3  5562 1594 1591
+3  9110 2610 11855
+3  13592 6200 13915
+3  3523 12069 1264
+3  15144 14004 9664
+3  15144 9664 14453
+3  3464 11236 3465
+3  987 10042 10044
+3  9376 10042 987
+3  13247 13248 13824
+3  10517 15148 3010
+3  15045 10517 3010
+3  14390 1914 1916
+3  14390 1916 7650
+3  9996 6512 9543
+3  9734 2262 8568
+3  11927 11443 15203
+3  15141 8124 2453
+3  14740 11695 12205
+3  13913 976 7424
+3  13744 3138 12680
+3  13760 8925 8117
+3  7806 12406 7807
+3  13269 8332 8335
+3  1321 8575 8577
+3  14663 10872 10871
+3  1466 12662 4746
+3  4747 4746 12662
+3  7808 7809 10903
+3  7808 10903 8871
+3  4543 12067 14262
+3  6368 7538 6369
+3  14793 2842 2845
+3  12514 12641 12643
+3  12204 12641 12514
+3  682 8234 3838
+3  14184 7930 13631
+3  10677 7930 14184
+3  13749 7552 9663
+3  3543 3900 10231
+3  6158 6157 5183
+3  5519 10774 5520
+3  13821 5520 10774
+3  5300 10510 11128
+3  8894 13749 9663
+3  5236 10339 8751
+3  4914 2395 13174
+3  8485 13445 8486
+3  11072 8684 11800
+3  4511 930 932
+3  1862 1861 13244
+3  14866 12317 12174
+3  5188 10576 5549
+3  9994 2523 13255
+3  9994 13255 10762
+3  6371 14780 9778
+3  13685 2060 2062
+3  11280 6296 14694
+3  7686 14711 8828
+3  10396 13896 10394
+3  13760 12335 12448
+3  3320 1686 8396
+3  13429 8229 11302
+3  8787 1661 1660
+3  15509 15508 14603
+3  15509 14603 8783
+3  14343 14246 2837
+3  4982 649 15170
+3  4555 10213 4556
+3  2733 43 10820
+3  2733 10820 10822
+3  12150 12152 12556
+3  14611 12150 12556
+3  1005 1004 12882
+3  5795 14398 9459
+3  13952 3633 5340
+3  12267 13443 5123
+3  5153 5155 11065
+3  1686 8397 8396
+3  5250 5558 14037
+3  12734 15052 9607
+3  7396 7397 4085
+3  14179 13545 7967
+3  15038 14179 7967
+3  8221 703 13431
+3  13938 12852 13937
+3  5635 1878 7815
+3  8482 8484 11327
+3  1722 11123 11216
+3  4343 10516 7049
+3  4343 4342 10516
+3  1177 1179 13898
+3  14449 9577 3914
+3  8079 8081 13962
+3  8079 13962 11357
+3  761 5835 759
+3  8904 5875 4313
+3  4350 4349 11311
+3  13738 12223 13855
+3  10960 7028 10442
+3  5603 5363 5604
+3  3969 13256 5892
+3  10585 6371 10586
+3  888 887 5764
+3  12259 888 5764
+3  3852 11229 11117
+3  4528 9986 5934
+3  6769 12058 12747
+3  4086 4247 2429
+3  2882 7616 2883
+3  4031 1541 8807
+3  8808 4031 8807
+3  2449 13296 1889
+3  13556 4458 11658
+3  1668 8311 10635
+3  8214 15522 12197
+3  8214 12197 6498
+3  1829 1828 13675
+3  1829 13675 6562
+3  4181 2872 2874
+3  8071 8073 2217
+3  11866 1025 4375
+3  4512 1513 6975
+3  2510 10978 10977
+3  5886 5885 257
+3  2572 613 615
+3  7376 10575 8618
+3  12369 3914 10132
+3  9577 10132 3914
+3  13634 13232 4475
+3  115 14783 116
+3  12265 8174 12934
+3  6897 5790 10450
+3  4474 4473 7950
+3  413 2265 414
+3  8774 8776 12677
+3  5792 9897 10712
+3  14320 9386 2363
+3  8525 14728 8523
+3  9947 14728 8525
+3  1021 6423 12596
+3  2145 2364 417
+3  14371 10082 7217
+3  5290 12555 5386
+3  5290 5386 5288
+3  10053 5602 8811
+3  14895 6348 6321
+3  15195 14661 9069
+3  4217 4974 13149
+3  13728 14313 14717
+3  5193 14313 13728
+3  11447 15743 8614
+3  14978 6735 6736
+3  3209 12716 12715
+3  13351 11230 8679
+3  9994 8841 2523
+3  4133 4132 9257
+3  7421 1757 9262
+3  12313 11011 489
+3  4182 12313 489
+3  9628 2970 2969
+3  9628 2969 1595
+3  14312 15108 13447
+3  6868 4468 9337
+3  6868 9337 14540
+3  9831 5258 10754
+3  132 134 7907
+3  2981 12387 2980
+3  4605 10804 3809
+3  9131 14911 8290
+3  14238 15183 8461
+3  15451 9589 9586
+3  34 33 11881
+3  543 4452 9079
+3  14654 13595 1338
+3  212 8862 213
+3  6289 11252 6290
+3  6222 5666 2101
+3  6271 13274 11954
+3  6270 13274 6271
+3  11183 9112 13537
+3  3457 11536 3458
+3  7703 14933 7704
+3  3510 3512 14282
+3  10758 14890 11650
+3  4884 9019 14131
+3  3570 3571 11074
+3  9912 11593 5680
+3  9770 13434 9794
+3  9770 9794 7809
+3  393 2188 2187
+3  12527 12526 15456
+3  14463 12527 15456
+3  9266 6572 6571
+3  10149 4401 32
+3  3238 11004 14064
+3  5639 14221 13972
+3  933 1879 5635
+3  10759 4775 7152
+3  5715 5716 13588
+3  10560 3238 14064
+3  11419 358 7952
+3  11167 8137 11168
+3  9367 6438 9368
+3  127 1672 1674
+3  8488 8772 8487
+3  6542 6543 3452
+3  6867 7334 14487
+3  13433 6867 14487
+3  13245 15816 15245
+3  13147 12353 12352
+3  14614 527 8144
+3  528 527 14614
+3  295 13032 7889
+3  15105 14386 8307
+3  8306 15105 8307
+3  9653 9654 5554
+3  10091 12652 9896
+3  8220 3187 3186
+3  3859 7697 2854
+3  2080 13501 3866
+3  14430 13541 361
+3  11221 1067 1066
+3  15361 7815 7341
+3  14196 15143 7691
+3  14196 7691 1820
+3  13698 7925 604
+3  143 10346 5434
+3  10692 5434 10346
+3  2053 1490 1492
+3  9697 9699 5717
+3  4983 5717 9699
+3  7747 10602 5544
+3  5606 6084 5607
+3  7007 771 7491
+3  14171 7336 321
+3  11129 10290 10289
+3  13328 3854 13329
+3  14440 6852 316
+3  9150 328 9151
+3  2757 1478 7880
+3  3187 13431 5859
+3  9160 2264 4818
+3  14027 6806 3113
+3  8848 12157 12156
+3  13237 4595 4594
+3  9044 4890 6773
+3  3739 9044 6773
+3  5632 15032 7152
+3  11018 529 4425
+3  7191 4425 529
+3  14791 10344 4711
+3  13561 9526 12712
+3  2059 2058 1869
+3  12551 4261 4260
+3  14759 12282 12283
+3  14759 13928 12282
+3  800 14440 316
+3  800 316 315
+3  12835 12836 14852
+3  5298 6881 2941
+3  5298 2941 5297
+3  594 10912 13293
+3  9145 9144 12546
+3  6065 14950 10335
+3  7908 2944 2943
+3  5319 5321 12934
+3  5574 11422 2257
+3  6039 1696 1693
+3  8693 14372 9578
+3  3915 7016 10032
+3  13648 10842 10841
+3  8493 8492 12190
+3  8526 1744 11676
+3  14904 2972 10832
+3  14904 8216 2972
+3  5991 11708 5992
+3  11238 5992 11708
+3  3358 5066 9621
+3  14926 10036 4011
+3  13957 10036 14926
+3  7715 12004 1396
+3  2375 12061 4942
+3  3905 11266 3906
+3  12655 11007 156
+3  12655 156 158
+3  6922 13827 14751
+3  7613 7612 14569
+3  9223 7283 6196
+3  13702 6196 7283
+3  4371 13295 8298
+3  5900 6749 1832
+3  3102 7466 3100
+3  14971 3100 7466
+3  12112 10623 10624
+3  7056 3068 9156
+3  6745 8736 9198
+3  12050 5527 12084
+3  12050 12084 12083
+3  2615 3248 5305
+3  15023 4568 12341
+3  2233 4711 2234
+3  4674 12952 5806
+3  15091 14399 15065
+3  1115 2352 10275
+3  8962 13239 5263
+3  595 14119 1803
+3  10901 2717 10839
+3  11174 11585 10392
+3  653 1432 5844
+3  12809 6155 10217
+3  10160 13764 9215
+3  14139 13361 8788
+3  3018 14139 8788
+3  5271 5270 10399
+3  4866 5554 9472
+3  10800 3029 785
+3  8599 9139 9138
+3  5260 10714 15169
+3  5260 15169 5261
+3  2893 15377 2891
+3  3915 3917 5425
+3  2965 1598 1600
+3  3517 591 10260
+3  11686 11687 5785
+3  12449 5785 11687
+3  15512 10275 2352
+3  5490 10275 15512
+3  5956 5954 6704
+3  14345 14347 13326
+3  11804 14345 13326
+3  215 6615 9821
+3  10609 2426 8600
+3  6442 12121 9187
+3  14160 8194 14775
+3  14160 14775 10467
+3  6191 13781 1875
+3  11330 13453 11331
+3  13628 9399 9401
+3  7831 9499 7832
+3  15001 15002 11838
+3  10625 10908 6655
+3  13224 14631 13225
+3  9457 2495 2496
+3  11016 9195 3365
+3  11016 3365 3364
+3  354 12296 3146
+3  6167 6166 9613
+3  6911 11038 9327
+3  12856 12906 12783
+3  13769 11257 9291
+3  5073 5075 14982
+3  6481 3608 6480
+3  8700 10920 877
+3  15010 10288 186
+3  11076 14389 11079
+3  10794 5024 8528
+3  15324 833 8791
+3  13506 9595 11963
+3  11208 4151 13568
+3  11208 13568 7103
+3  13821 8543 5520
+3  14010 3863 3862
+3  12350 720 4752
+3  14328 720 12350
+3  4342 7632 10516
+3  6956 6955 3990
+3  13116 12863 1468
+3  1957 13116 1468
+3  2781 2775 3022
+3  15468 9444 11697
+3  7164 14127 14900
+3  10735 10952 10951
+3  3826 3827 13130
+3  5568 5320 5319
+3  5196 6916 6682
+3  10554 5196 6682
+3  12014 11899 11898
+3  2044 12398 5032
+3  3430 10239 12520
+3  11121 12241 12240
+3  11122 11121 12240
+3  11482 14586 7148
+3  11482 7148 5470
+3  15235 775 2401
+3  3584 12011 12012
+3  2589 12808 2586
+3  6035 3473 6826
+3  2717 2716 10839
+3  15118 12566 14726
+3  15208 8348 12721
+3  11242 11433 13285
+3  11241 11433 11242
+3  6550 7063 7065
+3  11113 11379 11114
+3  5280 5281 12506
+3  6750 6752 10412
+3  8900 10948 11193
+3  6973 8323 491
+3  11459 6973 491
+3  14355 6004 12300
+3  9411 14101 11720
+3  3771 3770 15565
+3  7455 14972 11023
+3  2076 634 11190
+3  3401 13088 14409
+3  322 7696 7698
+3  322 7698 13602
+3  6755 4085 10843
+3  4102 4101 8394
+3  4102 8394 4495
+3  12019 2777 3305
+3  820 10579 12034
+3  4239 6905 10566
+3  130 7873 131
+3  9071 5210 9404
+3  10009 6364 6365
+3  2279 6115 2198
+3  2140 139 138
+3  7395 13791 5550
+3  7934 5550 13791
+3  1989 2755 2754
+3  7948 1628 1184
+3  7673 4354 4332
+3  3739 3741 9044
+3  10359 6939 6938
+3  11760 6939 10359
+3  12452 9302 9303
+3  6110 7566 6111
+3  3142 1499 5535
+3  12533 12654 12534
+3  13193 8556 8557
+3  4117 2708 10863
+3  10864 10863 2708
+3  13410 10179 12032
+3  11732 13410 12032
+3  7899 13137 14306
+3  1698 7032 331
+3  13846 12421 3476
+3  10417 11239 9345
+3  6760 9550 14537
+3  14884 7097 7096
+3  6997 6996 8077
+3  2527 8807 1540
+3  2526 8807 2527
+3  11168 8137 11730
+3  5173 5175 15172
+3  7867 14255 7868
+3  12845 2748 13228
+3  13385 12845 13228
+3  880 4532 881
+3  7824 3027 10385
+3  11337 10629 4663
+3  1633 12047 9538
+3  6609 2450 12899
+3  6463 6462 8937
+3  8824 8937 6462
+3  6322 6321 2455
+3  7233 5495 10473
+3  437 766 12599
+3  437 12599 438
+3  3554 11844 3555
+3  3570 4367 3435
+3  7903 14616 13812
+3  7903 13812 2908
+3  14141 10379 10378
+3  14142 14141 10378
+3  6592 11531 7285
+3  6795 10654 6124
+3  6615 9983 9985
+3  11355 128 656
+3  2459 11355 656
+3  3456 3547 9571
+3  12368 15499 12366
+3  14225 10146 11936
+3  8462 2315 5377
+3  14364 5487 10293
+3  14364 4444 5487
+3  1518 1954 1519
+3  14533 13864 6368
+3  6776 11338 8444
+3  1746 4014 7646
+3  14539 11114 11380
+3  708 4959 2988
+3  13290 15220 2954
+3  13290 2954 12276
+3  11012 7486 11228
+3  2684 13405 2685
+3  4456 7959 4457
+3  1556 1555 9051
+3  12657 12656 4147
+3  6395 9715 12890
+3  2565 938 2566
+3  7486 7485 11228
+3  11554 9753 14424
+3  3357 10290 8513
+3  6020 6022 7226
+3  5626 5625 2320
+3  15078 5626 2320
+3  6101 7123 5728
+3  993 992 9564
+3  6814 382 381
+3  6833 3029 485
+3  8270 15561 8271
+3  14377 167 9674
+3  2923 10013 7129
+3  8426 2464 15114
+3  11644 237 3189
+3  11157 6640 11916
+3  7726 7322 7324
+3  8200 11273 3313
+3  9468 11471 9469
+3  14669 4980 4979
+3  6820 14202 14201
+3  6820 6822 14202
+3  14103 14102 14235
+3  8682 4332 4334
+3  7805 2390 2389
+3  3313 3161 3163
+3  4341 3950 3952
+3  13009 8975 8977
+3  305 11909 8035
+3  15173 12007 291
+3  288 15173 291
+3  13743 15603 13358
+3  7228 13357 7229
+3  12936 11885 6221
+3  10604 14204 6402
+3  5996 5998 6365
+3  4492 4494 12481
+3  9272 7751 15102
+3  15042 11353 11352
+3  6630 8971 3749
+3  10310 8329 12180
+3  10310 12180 14709
+3  13856 13738 13855
+3  12646 8961 12027
+3  2704 5201 2705
+3  3558 3559 10761
+3  9169 3558 10761
+3  13158 8397 1686
+3  2357 9921 8476
+3  14172 5342 5341
+3  11762 3896 8326
+3  5645 8350 5646
+3  3860 3541 8322
+3  8420 11304 10611
+3  11412 8033 2303
+3  1513 11127 1020
+3  3478 4031 8808
+3  338 10749 10748
+3  12939 680 679
+3  2500 2527 8973
+3  2500 8973 13455
+3  10523 10278 10277
+3  8722 11958 8723
+3  13805 14294 2180
+3  2178 2180 14294
+3  4638 11066 8082
+3  6433 10737 14032
+3  14570 14381 3781
+3  5633 7152 4773
+3  10670 13247 14358
+3  9268 13247 10670
+3  3509 7448 2107
+3  13814 2107 7448
+3  3767 7453 7452
+3  3766 7453 3767
+3  1001 9462 9556
+3  2492 655 657
+3  2491 655 2492
+3  15198 12508 3619
+3  11499 3619 12508
+3  7727 4537 2006
+3  13753 8867 6728
+3  1907 2735 14006
+3  15189 7168 4673
+3  1899 7168 15189
+3  3221 2223 10800
+3  15396 6678 6677
+3  8125 8124 15141
+3  14834 9652 11367
+3  4407 9616 4408
+3  13096 14534 11620
+3  9656 11108 5113
+3  9192 7106 7108
+3  221 11116 14337
+3  221 14337 222
+3  10525 11333 14011
+3  13336 8217 125
+3  1241 5001 6443
+3  10820 43 14538
+3  14934 13738 13856
+3  13458 14934 13856
+3  5599 144 7269
+3  12231 12230 12502
+3  5528 8693 9578
+3  735 5738 736
+3  9413 10197 5076
+3  2131 8401 8403
+3  2130 8401 2131
+3  3808 4611 3806
+3  9690 797 9691
+3  6183 3025 14085
+3  3167 11988 10360
+3  7717 13434 14737
+3  7717 14737 11511
+3  14668 2939 6651
+3  14059 6437 10340
+3  13983 13831 5025
+3  13983 13624 13831
+3  1769 1771 4285
+3  8646 10131 14204
+3  8646 14204 10604
+3  3177 6733 15805
+3  1244 1243 2984
+3  5993 4758 2845
+3  5578 10152 7245
+3  7781 13152 14872
+3  8606 1983 2428
+3  15062 10272 8668
+3  8667 15062 8668
+3  2687 2571 9734
+3  10700 3248 12191
+3  13034 2382 10623
+3  5583 5103 5102
+3  14968 13717 11081
+3  14170 14968 11081
+3  9662 7865 1936
+3  7171 9371 13495
+3  8502 497 499
+3  11861 8502 499
+3  11326 15172 5931
+3  11326 11219 15172
+3  1646 3257 1644
+3  15838 13697 13699
+3  8306 11202 13537
+3  158 157 11719
+3  15464 13991 6339
+3  13726 4060 4059
+3  7845 1815 7950
+3  10247 12491 5726
+3  1103 1102 5191
+3  7385 5684 10311
+3  13244 4225 10366
+3  6122 6691 2832
+3  2920 10094 12636
+3  12041 12092 12482
+3  14951 3581 14948
+3  3048 6205 15516
+3  13195 15516 6205
+3  11169 4779 4781
+3  7026 9256 6235
+3  9545 7450 6044
+3  1766 10163 10587
+3  12792 2380 14247
+3  13869 12322 4800
+3  13869 4800 4799
+3  10707 1781 8861
+3  6251 1391 1390
+3  14436 2375 4276
+3  10139 3662 13829
+3  3038 14504 11389
+3  3037 14504 3038
+3  498 6936 3247
+3  10781 8982 10244
+3  3855 14010 3862
+3  753 4092 754
+3  15667 15668 3698
+3  15101 3181 3183
+3  15101 12505 3181
+3  12439 5278 11586
+3  670 8382 11937
+3  11702 11426 11425
+3  1726 2327 1682
+3  14765 14588 14767
+3  2811 4522 12525
+3  2811 12525 2812
+3  9282 8575 9866
+3  623 14814 9846
+3  625 14814 623
+3  4952 856 9971
+3  9315 1101 8149
+3  9315 8149 8152
+3  14476 13204 3813
+3  12894 12893 14327
+3  12894 7822 12893
+3  3281 6460 5163
+3  553 13961 13960
+3  554 553 13960
+3  10202 11487 1939
+3  11901 13179 8906
+3  3567 3569 1543
+3  10171 11450 12728
+3  7359 14825 1462
+3  8725 2269 2268
+3  4965 2470 277
+3  1272 15044 11534
+3  7459 15025 7674
+3  14103 13923 14104
+3  1106 5565 9944
+3  10462 9673 5314
+3  5752 6683 5881
+3  5989 14654 14036
+3  5989 13595 14654
+3  6656 5606 7001
+3  10988 5076 10198
+3  9475 3826 9476
+3  7458 4517 14899
+3  10965 15187 8545
+3  7447 7514 7516
+3  7447 7516 7446
+3  8752 4218 13799
+3  3686 1240 8432
+3  11271 7137 13798
+3  13896 11084 14652
+3  2943 2945 9370
+3  60 7630 10135
+3  4837 14044 13616
+3  5583 5102 12174
+3  11299 336 8642
+3  5343 5345 3043
+3  13319 13932 8113
+3  13024 6295 6866
+3  489 11011 11012
+3  15514 4032 11381
+3  15514 4597 4032
+3  6094 173 172
+3  15557 8506 14492
+3  8507 8506 15557
+3  5685 14314 13496
+3  10777 9189 4976
+3  8403 8402 11977
+3  1955 11977 8402
+3  255 9755 9758
+3  14055 3880 14619
+3  9861 9274 9366
+3  406 10356 10355
+3  6216 6218 9116
+3  7822 5870 7823
+3  1625 7823 5870
+3  5133 8204 4369
+3  6307 6308 12049
+3  5216 5215 7472
+3  6451 8130 7387
+3  9277 6056 11814
+3  9881 11270 13117
+3  823 14362 4718
+3  14360 4718 14362
+3  1801 13981 7615
+3  4023 4022 15393
+3  165 14377 3505
+3  3097 2127 4161
+3  8748 10654 6843
+3  6957 6959 12580
+3  8633 8632 2098
+3  14657 9145 12678
+3  2000 4410 3965
+3  8487 1710 1712
+3  6022 13085 14770
+3  7226 6022 14770
+3  640 9898 12182
+3  640 26 9898
+3  6329 10441 11175
+3  2648 2650 1173
+3  12125 12485 14433
+3  8924 10113 11985
+3  10521 10522 13193
+3  12984 6359 3524
+3  9198 9197 10308
+3  5724 11606 5725
+3  1463 2313 11223
+3  471 15219 9576
+3  8049 6688 2472
+3  11337 4662 14271
+3  9834 2253 14501
+3  14951 10116 10115
+3  10718 4574 10716
+3  5646 8350 6804
+3  8617 13492 13221
+3  8617 10575 13492
+3  7192 7545 7544
+3  4335 14501 2255
+3  6535 14705 6536
+3  6535 14293 14705
+3  7895 4451 7896
+3  9613 676 12317
+3  13657 11853 11526
+3  2925 11831 13156
+3  2704 2082 3384
+3  10894 7422 10895
+3  3564 3566 15329
+3  6101 5424 8286
+3  5387 15468 14215
+3  1385 1384 1608
+3  7579 10746 2394
+3  2808 11152 4613
+3  5331 352 860
+3  8690 860 352
+3  950 12377 7356
+3  10562 4297 8043
+3  10548 6497 9745
+3  15482 13420 13421
+3  9597 15136 11964
+3  11967 11964 15136
+3  2542 13611 2543
+3  8738 6344 8423
+3  2104 5613 2105
+3  8984 5529 389
+3  12956 10832 10831
+3  12956 10831 14847
+3  349 348 827
+3  12814 8878 849
+3  5994 5184 5995
+3  13161 10069 10592
+3  493 10069 13161
+3  3128 6993 11256
+3  11456 14722 6899
+3  13352 11456 6899
+3  11428 2202 14817
+3  14712 9970 7140
+3  15067 8915 5402
+3  15067 14844 8915
+3  3326 8085 4072
+3  11058 4394 7583
+3  4395 4394 11058
+3  3828 152 3719
+3  3173 5031 3174
+3  12490 11184 8911
+3  12490 8911 13819
+3  8524 370 6820
+3  10706 11435 12500
+3  4161 2128 1877
+3  229 1463 6601
+3  6993 6992 11256
+3  3008 5857 7254
+3  7253 3008 7254
+3  1646 7942 3301
+3  3257 1646 3301
+3  689 6612 556
+3  13279 9391 1508
+3  12815 12969 14124
+3  7993 2897 11733
+3  9012 2191 2190
+3  14724 5292 3890
+3  1453 4971 6825
+3  10485 5425 3917
+3  3947 13838 13525
+3  13844 10707 8861
+3  13928 7067 652
+3  13928 7068 7067
+3  3598 15485 8889
+3  13280 7010 1798
+3  5993 5995 5186
+3  884 6355 885
+3  12417 11638 12415
+3  12417 10196 11638
+3  8860 5258 8859
+3  2327 1728 2328
+3  7167 1896 15369
+3  7173 15369 1896
+3  7146 11409 2126
+3  2124 2126 11409
+3  6788 15041 15415
+3  15043 15415 15041
+3  5452 9804 6710
+3  10733 10150 2763
+3  10092 5035 13336
+3  13404 11000 10695
+3  13404 10695 2137
+3  1586 13722 1587
+3  4151 2750 13568
+3  2747 2750 4151
+3  4675 2925 2927
+3  3086 2428 12873
+3  10025 13603 4134
+3  14682 11102 8390
+3  2099 4090 2827
+3  14735 4196 10196
+3  15837 2646 15295
+3  15837 15295 2877
+3  6619 9798 3323
+3  14609 2917 2916
+3  3703 6861 12431
+3  10766 12730 13016
+3  9416 8276 5060
+3  9961 8924 11985
+3  9961 11985 4556
+3  9004 3300 13907
+3  4687 7787 13943
+3  13089 1404 2906
+3  13828 1404 13089
+3  9913 9915 12906
+3  9913 12906 12856
+3  6883 9754 637
+3  11468 2258 8400
+3  4858 10287 4859
+3  5992 11237 6698
+3  103 6698 11237
+3  12129 3453 12130
+3  6774 1296 1295
+3  4708 1891 667
+3  13276 4455 4454
+3  9748 13622 482
+3  9749 9748 482
+3  6042 6044 7025
+3  1081 11805 12734
+3  1488 1487 2629
+3  3311 10593 3312
+3  8584 15311 6912
+3  11518 990 11431
+3  11020 10177 42
+3  10643 2256 15461
+3  8948 10643 15461
+3  5693 10124 4197
+3  14951 6799 10116
+3  1191 9277 14054
+3  10991 10922 10646
+3  10705 12523 10706
+3  8005 8004 5393
+3  8449 3875 8549
+3  4052 124 8165
+3  12135 12673 12134
+3  15549 13021 13022
+3  15549 13022 14548
+3  13241 10809 12025
+3  11369 6112 6111
+3  12530 12531 9858
+3  8946 9858 12531
+3  5237 5239 9386
+3  14883 14648 8282
+3  11075 11074 13331
+3  11384 6218 3001
+3  9517 14630 6324
+3  6323 9517 6324
+3  10384 1767 1766
+3  12153 7306 11303
+3  12153 6274 7306
+3  2257 11422 13418
+3  9641 10080 14613
+3  4066 8494 4067
+3  9913 12856 14465
+3  520 522 8594
+3  7902 6981 14615
+3  13158 1686 1685
+3  6733 4224 15805
+3  12977 1320 1322
+3  15143 9230 7691
+3  11955 13428 8017
+3  11955 8017 9676
+3  7143 7705 9558
+3  10560 11960 11340
+3  8207 10052 10053
+3  12629 11971 3736
+3  750 752 12373
+3  13593 10872 8976
+3  10870 10872 13593
+3  1944 6406 4868
+3  14673 5211 8713
+3  14673 5208 5211
+3  3727 3726 1174
+3  7805 2389 7806
+3  2881 10068 2251
+3  11619 11750 11751
+3  11619 7501 11750
+3  6372 6371 10585
+3  13134 3885 6527
+3  4652 6527 3885
+3  14572 9679 9681
+3  8179 6456 8320
+3  5573 2588 13115
+3  11576 2588 5573
+3  5481 945 8821
+3  11312 7169 7649
+3  11291 3718 151
+3  8038 8654 7630
+3  331 7032 332
+3  5960 14596 5010
+3  5928 14596 5960
+3  1985 4938 2914
+3  10218 13519 2968
+3  11020 11021 14194
+3  12147 6139 2629
+3  14953 3582 3581
+3  11500 3620 3619
+3  9243 12159 13699
+3  14374 12159 9243
+3  13672 5700 10054
+3  13672 10054 294
+3  3647 3530 3529
+3  5121 12619 1134
+3  2659 5121 1134
+3  612 13976 1465
+3  6137 1465 13976
+3  3862 4950 13086
+3  3862 13086 3974
+3  14693 14692 12428
+3  2990 9622 4089
+3  10930 10931 10487
+3  14130 7253 7255
+3  12286 13815 7724
+3  12534 3359 11834
+3  7948 1184 12410
+3  13611 15361 6704
+3  5143 4465 9205
+3  11198 2698 5622
+3  10928 10927 5628
+3  6067 9123 4157
+3  10198 7130 6663
+3  4911 783 9817
+3  4032 4597 4033
+3  7905 10537 7460
+3  7905 7460 7299
+3  9693 13943 9694
+3  12993 9360 2385
+3  11248 12993 2385
+3  11602 11624 13077
+3  7138 2480 10452
+3  6562 13675 10829
+3  4691 15288 7680
+3  3932 4691 7680
+3  12011 4408 162
+3  4770 8439 14208
+3  6866 6865 11281
+3  1453 1452 4971
+3  6273 15298 15299
+3  14682 8390 14223
+3  9785 6949 9786
+3  15354 7706 12155
+3  2707 8720 10864
+3  1052 15115 15113
+3  2010 6490 1837
+3  14774 3429 3427
+3  10902 9702 9701
+3  12935 4170 15726
+3  12935 15726 2181
+3  13157 2029 2028
+3  5254 13144 5255
+3  9351 5040 5039
+3  443 8838 3268
+3  12218 11981 11980
+3  5100 4099 11508
+3  5100 4100 4099
+3  15212 9173 9175
+3  1557 1559 11266
+3  1016 7090 7092
+3  9982 2677 13117
+3  11396 7378 5484
+3  15216 3236 15841
+3  15216 15841 10559
+3  14299 4434 6026
+3  14273 14299 6026
+3  12869 13421 7092
+3  7802 13073 13266
+3  7802 13266 9510
+3  11621 5184 5994
+3  13615 12538 7220
+3  7219 13615 7220
+3  15497 5783 15554
+3  5784 5783 15497
+3  13598 14479 6582
+3  10519 12877 9422
+3  9423 9422 12877
+3  12281 5521 1341
+3  9671 3204 3203
+3  14186 7100 14712
+3  14671 2293 14406
+3  10605 10604 6402
+3  7175 10453 7124
+3  9848 9669 6370
+3  9668 6370 9669
+3  2844 2843 6817
+3  13833 9649 12914
+3  8447 2756 7663
+3  10818 13390 6178
+3  10818 6178 6180
+3  14866 6167 9613
+3  4827 12190 4828
+3  332 9886 13402
+3  2675 9982 6831
+3  2110 9669 7340
+3  1926 11501 9602
+3  13108 14309 13109
+3  13108 13270 14309
+3  9478 7992 7994
+3  7367 2882 2884
+3  14892 5473 11271
+3  93 1244 94
+3  9151 10463 14401
+3  13087 9046 9045
+3  13085 13087 9045
+3  7973 13474 9679
+3  11189 4097 5542
+3  3109 3111 5896
+3  9901 87 14647
+3  4222 6160 3987
+3  12532 219 2300
+3  14870 12419 12418
+3  15024 15411 15408
+3  13184 15411 15024
+3  9875 7425 3045
+3  12215 3045 7425
+3  2188 13660 1233
+3  4486 3920 3922
+3  13710 13136 7480
+3  7479 13710 7480
+3  11802 11801 15229
+3  10318 6311 2070
+3  6050 12642 12641
+3  7384 6050 12641
+3  14827 13535 10291
+3  241 13535 14827
+3  13528 12960 7671
+3  13272 7596 3840
+3  13045 13044 1544
+3  14490 7000 7776
+3  5995 5184 5186
+3  1041 1043 3121
+3  9279 7477 3285
+3  13598 6439 14479
+3  13350 13652 1750
+3  10140 7839 1665
+3  1664 10140 1665
+3  1684 10939 190
+3  7777 6083 6082
+3  4557 8856 14221
+3  10074 5921 13657
+3  8766 3970 8767
+3  11168 11730 7149
+3  12567 7404 12467
+3  14272 14572 14300
+3  8040 6515 8041
+3  14020 15365 11721
+3  4816 12107 10278
+3  7345 8525 7346
+3  7801 7803 9677
+3  13478 10496 10495
+3  13478 10495 13477
+3  2317 2319 14352
+3  10041 10040 14446
+3  8676 1309 10942
+3  10571 8676 10942
+3  13722 1586 10801
+3  10158 3784 10019
+3  2070 6311 6313
+3  11159 1556 9050
+3  14719 10201 14147
+3  7793 5950 7491
+3  15227 5031 7764
+3  13921 14646 13922
+3  2870 11525 12529
+3  91 13987 92
+3  6978 6977 8290
+3  3588 11963 1930
+3  11491 2709 4117
+3  2708 4117 2709
+3  9368 11297 9501
+3  12555 5384 5386
+3  2157 13547 2158
+3  8532 6142 3295
+3  9909 4964 4966
+3  15387 15386 5748
+3  14600 15387 5748
+3  3432 7408 3067
+3  7076 14340 11873
+3  3967 3966 15373
+3  6898 11808 12121
+3  725 7403 7404
+3  2989 4596 2990
+3  9075 12806 9076
+3  9038 12727 9036
+3  11369 11589 13405
+3  4438 12323 11812
+3  3674 14435 11220
+3  7548 13923 14103
+3  4329 4331 12470
+3  225 2263 226
+3  1336 2110 4926
+3  6726 6727 7708
+3  13750 9014 13306
+3  11691 6092 11692
+3  11784 10226 12
+3  8837 686 8838
+3  981 980 2425
+3  9876 3808 3806
+3  3801 3803 7421
+3  13772 6360 4791
+3  5156 10826 6819
+3  4103 12741 4484
+3  9915 7750 7749
+3  5153 4462 1579
+3  7223 14941 713
+3  14583 10167 12660
+3  14241 6825 357
+3  8155 8157 10895
+3  4418 1452 1451
+3  4030 4027 14418
+3  4030 14418 2886
+3  2040 7495 7911
+3  7471 7472 14344
+3  7471 14344 12941
+3  9348 5822 5821
+3  10067 5822 9348
+3  2684 11369 13405
+3  11454 8360 14767
+3  14472 14473 10133
+3  12696 14472 10133
+3  9307 4893 10223
+3  12994 12400 5244
+3  6752 11186 11188
+3  2425 2426 2541
+3  10134 10133 14473
+3  10134 14473 6342
+3  10669 15409 14318
+3  13542 4061 3663
+3  13542 3663 13541
+3  14402 14156 14754
+3  12090 12815 7278
+3  8683 9837 2632
+3  13959 9837 8683
+3  12059 11720 9646
+3  447 4810 448
+3  2042 8243 2043
+3  15692 11387 13706
+3  13863 5373 3481
+3  3375 3376 9580
+3  10520 9722 9725
+3  14705 10520 9725
+3  1477 4337 6926
+3  12547 15072 10701
+3  13699 13698 14376
+3  5229 5231 964
+3  12938 14867 12937
+3  13890 14867 12938
+3  13470 11714 12089
+3  9952 9293 11270
+3  12602 1568 1570
+3  5432 1621 13711
+3  8434 7023 13206
+3  14486 14752 7725
+3  11279 14752 14486
+3  4417 5720 12787
+3  15042 11352 15039
+3  10858 11024 15566
+3  8516 15566 11024
+3  4826 821 191
+3  6756 3684 9585
+3  10345 4544 784
+3  9813 818 806
+3  9813 806 805
+3  4280 7629 4281
+3  7417 7419 11962
+3  2826 1279 1116
+3  8560 1116 1279
+3  13183 13363 15411
+3  13183 15411 13184
+3  7215 976 13913
+3  15816 15813 15245
+3  9651 14834 12971
+3  5589 13422 10064
+3  13044 14450 14557
+3  1634 3790 1635
+3  1169 8332 13579
+3  5884 10283 8180
+3  4680 6210 2017
+3  14412 2017 6210
+3  12767 7547 7549
+3  850 4714 14533
+3  6829 8698 10531
+3  6829 6828 8698
+3  5325 5324 11924
+3  13605 2437 11516
+3  15824 15557 14896
+3  8192 14896 15557
+3  2988 4959 2985
+3  12237 3431 11984
+3  6966 11345 13767
+3  7295 13260 15352
+3  4852 14311 15838
+3  14070 2117 13959
+3  12695 5588 5587
+3  8697 12606 10900
+3  14496 10409 12291
+3  8843 10118 8576
+3  13186 2037 2036
+3  12769 10271 10272
+3  12769 10272 15062
+3  4190 293 292
+3  15489 10146 14225
+3  15489 10144 10146
+3  8078 5177 1629
+3  13571 364 6249
+3  6399 1952 3572
+3  6399 3572 6398
+3  10132 7539 909
+3  2672 7925 4477
+3  9271 908 878
+3  10671 10670 13137
+3  14016 6236 9777
+3  11672 1681 1683
+3  9566 13627 9567
+3  12994 5244 5243
+3  11411 3208 8033
+3  5356 10017 5357
+3  10867 5702 12287
+3  10867 5703 5702
+3  8268 12502 11565
+3  3760 14348 3761
+3  5979 12742 12831
+3  1417 1416 12010
+3  14661 9070 9069
+3  14661 14463 9070
+3  1951 12938 3849
+3  560 562 9322
+3  1632 6188 1633
+3  12799 7944 994
+3  4526 2704 4527
+3  3766 9091 7453
+3  8835 8834 5579
+3  7672 4354 7673
+3  3443 7005 6078
+3  1663 1665 3214
+3  3213 1663 3214
+3  4978 62 9856
+3  12159 15838 13699
+3  4262 12630 9853
+3  14722 13933 1748
+3  1566 1748 13933
+3  14209 7781 14872
+3  13262 2031 13071
+3  15520 15567 7726
+3  12909 1865 5232
+3  9319 13133 14455
+3  3563 11053 6394
+3  3193 2977 2120
+3  15380 7095 12046
+3  15380 5591 7095
+3  14158 7393 11680
+3  5351 5350 13319
+3  14341 11402 14281
+3  11300 12273 2251
+3  10068 11300 2251
+3  6052 8109 13243
+3  7518 11688 9082
+3  186 12883 14008
+3  5299 13269 5300
+3  1923 1067 11054
+3  3943 6535 6537
+3  3943 3945 6535
+3  1044 1046 8139
+3  10880 11114 14539
+3  13915 6200 9227
+3  680 220 8602
+3  14227 12046 9070
+3  7095 9070 12046
+3  12470 3702 3701
+3  2437 153 4216
+3  6640 11158 6641
+3  11049 10050 1239
+3  6197 13702 13770
+3  645 3078 9931
+3  2365 2146 6213
+3  12384 5698 5700
+3  10009 65 5431
+3  2454 2453 9700
+3  13704 2267 7762
+3  2236 2237 14050
+3  954 385 7624
+3  6688 14743 12168
+3  3070 9462 1501
+3  9870 8555 343
+3  15009 1496 11677
+3  15009 11677 5164
+3  11051 3783 3834
+3  15409 10669 5451
+3  5450 15409 5451
+3  2729 14502 12087
+3  10249 15208 12720
+3  3795 8187 9396
+3  7346 14201 10407
+3  7343 7346 10407
+3  5445 12911 13047
+3  9375 10927 10926
+3  5138 10959 10958
+3  495 14844 15067
+3  13052 9309 2048
+3  11735 6031 9816
+3  13364 15023 12612
+3  8998 9000 12790
+3  8813 13267 13205
+3  12247 1546 13708
+3  13461 5597 12392
+3  2643 4002 6073
+3  10041 9504 8066
+3  5285 3439 13485
+3  11920 6356 6355
+3  15076 3255 3254
+3  13603 6814 4134
+3  8911 10419 8908
+3  11184 10419 8911
+3  1397 1873 1398
+3  1235 2187 1233
+3  4241 4240 11699
+3  10997 15138 10154
+3  7167 15369 15127
+3  1641 6394 12679
+3  10946 9420 93
+3  2807 371 2021
+3  11039 14506 4113
+3  11081 10429 14170
+3  625 624 13630
+3  15313 10675 13664
+3  7033 8464 7034
+3  7490 8464 7033
+3  4105 8111 5598
+3  7509 5080 9298
+3  11420 6946 6890
+3  10169 6946 11420
+3  6904 8861 12387
+3  2981 6904 12387
+3  12995 14298 3864
+3  14534 13096 9801
+3  9802 9801 13096
+3  4380 771 4968
+3  8794 8579 3725
+3  4542 12067 4543
+3  4560 7738 10105
+3  1140 8653 1141
+3  14033 5371 6880
+3  7178 6057 541
+3  2032 13263 8604
+3  221 15789 11115
+3  12497 15789 221
+3  489 11012 490
+3  2712 14894 1845
+3  4022 1570 12827
+3  4022 12827 13905
+3  12595 5185 10602
+3  11378 14067 5140
+3  11378 159 14067
+3  14702 9925 3559
+3  14702 9972 9925
+3  14325 12981 3382
+3  4567 4569 11779
+3  1499 11259 5535
+3  4784 1555 1554
+3  14913 11357 14576
+3  13175 11357 14913
+3  3622 13164 14584
+3  8593 5862 6389
+3  11516 4216 1259
+3  1184 1183 11591
+3  12290 4064 12288
+3  8561 8560 1279
+3  8986 4823 8392
+3  14678 4577 3040
+3  10763 11043 12376
+3  10232 815 12959
+3  6837 2624 2623
+3  15837 13109 1246
+3  11703 5334 2871
+3  11165 7240 8465
+3  7846 1814 1815
+3  3384 2083 3385
+3  9488 10388 1405
+3  8619 14676 8620
+3  8507 15557 15824
+3  11895 8461 15183
+3  6598 14450 13044
+3  6599 6598 13044
+3  4470 4820 6611
+3  12569 5735 12754
+3  14257 12754 5735
+3  4239 2911 6905
+3  13102 9366 9368
+3  8301 5032 12398
+3  14322 14321 13294
+3  6606 5920 6607
+3  8146 11532 15616
+3  13906 8146 15616
+3  5418 4553 4552
+3  6312 7868 6313
+3  8 2959 9
+3  15100 10801 10802
+3  5925 13409 8045
+3  2830 2940 2934
+3  8427 14441 11294
+3  10071 9663 3954
+3  2319 4940 14352
+3  8994 12541 15377
+3  7418 7976 5861
+3  12523 8754 10253
+3  8046 5923 5925
+3  10187 9464 13082
+3  15353 12629 12014
+3  11899 12014 12629
+3  15206 14958 6
+3  15206 6 3
+3  1462 2963 2960
+3  3481 3823 3482
+3  14054 11813 5695
+3  8581 5286 8985
+3  4463 991 12366
+3  5584 9688 5585
+3  2118 11694 7019
+3  5873 5871 8850
+3  2706 10793 2707
+3  7219 14966 1776
+3  12896 1776 14966
+3  15133 15134 15508
+3  14603 15508 15134
+3  11378 5140 9671
+3  12458 10844 14010
+3  11207 2563 2562
+3  13320 12351 13322
+3  1182 13939 1180
+3  9222 11282 13256
+3  2410 10175 14993
+3  14115 14993 10175
+3  13949 4449 5917
+3  14133 11824 14134
+3  11823 11824 14133
+3  13592 10857 5281
+3  2638 5340 14901
+3  11654 14413 6209
+3  6318 4620 951
+3  9801 193 195
+3  6858 6857 11475
+3  6858 11475 11476
+3  9002 181 5802
+3  7193 3237 3236
+3  9201 4034 4096
+3  2767 440 10929
+3  9199 7475 10653
+3  7720 9592 9795
+3  12390 9795 9592
+3  2155 12396 7344
+3  2155 2154 12396
+3  1359 620 622
+3  15368 8274 8273
+3  12216 9229 10438
+3  9387 9763 9388
+3  6994 1576 3778
+3  15248 8032 8031
+3  12800 15248 8031
+3  4555 6418 12139
+3  13867 9267 9266
+3  5302 3289 15497
+3  1600 1599 14658
+3  15171 9083 14012
+3  5400 15171 14012
+3  5877 14507 14506
+3  12523 6887 11435
+3  12515 1564 9821
+3  5377 5376 9062
+3  13341 5713 14213
+3  13341 13157 5713
+3  13925 7174 7175
+3  15116 9391 10029
+3  15116 7014 9391
+3  10912 4562 4561
+3  4005 2858 7761
+3  9296 5967 5966
+3  10073 12868 10072
+3  10073 12869 12868
+3  9615 11335 14240
+3  9566 14236 13627
+3  9792 9114 9116
+3  11693 12133 12132
+3  1709 1708 9188
+3  4992 4994 2218
+3  1499 1501 13485
+3  14180 9550 4895
+3  8350 4581 4583
+3  4892 10291 2548
+3  11420 6890 7759
+3  14955 11420 7759
+3  10692 7820 7819
+3  15112 2496 692
+3  8983 9416 5060
+3  5861 6495 6389
+3  1284 9995 1281
+3  10094 2920 10890
+3  5139 5141 9218
+3  5139 9218 8563
+3  4627 8707 192
+3  8037 3813 3810
+3  647 4487 4489
+3  9542 9996 9543
+3  9542 10343 9996
+3  13436 6575 3343
+3  3675 13436 3343
+3  10470 9332 13572
+3  56 711 57
+3  930 933 931
+3  12004 8962 6016
+3  9260 14324 14323
+3  9260 14326 14324
+3  10676 13910 8834
+3  15398 8834 13910
+3  12489 13180 3822
+3  12489 3822 3821
+3  8972 3361 8324
+3  6958 14650 9082
+3  14214 8423 6344
+3  13048 13049 14340
+3  7856 9978 9979
+3  4666 4665 13931
+3  6349 10779 11575
+3  12299 13540 8832
+3  13964 9744 10219
+3  8678 14014 14080
+3  5730 9207 14248
+3  7811 7810 11788
+3  11787 7811 11788
+3  10938 8809 8491
+3  8811 8491 8809
+3  4533 14325 7133
+3  4533 12981 14325
+3  10975 13640 10976
+3  5264 11886 12932
+3  7208 5160 4027
+3  7208 4027 4029
+3  13556 4386 4458
+3  4189 292 6637
+3  6638 6637 292
+3  11367 9503 2512
+3  8828 14711 13031
+3  13033 13031 14711
+3  13428 11955 11956
+3  50 14979 13340
+3  7534 1222 6268
+3  1484 2112 6214
+3  9086 10454 5621
+3  14821 11101 6922
+3  14751 14821 6922
+3  3056 3055 9777
+3  8328 3816 3815
+3  12705 7887 7828
+3  5730 5729 9207
+3  9348 10417 9345
+3  11230 1027 12777
+3  14479 6583 6582
+3  4281 7629 6631
+3  5684 5683 10311
+3  3853 5079 3854
+3  11313 3423 9433
+3  11644 5643 235
+3  6290 6908 6907
+3  2486 5686 14836
+3  9221 3352 3351
+3  8970 1966 4861
+3  4470 2755 4820
+3  7915 9080 1963
+3  14653 1877 1879
+3  2168 6548 6547
+3  4633 15163 4634
+3  4633 8277 15163
+3  13468 6966 6967
+3  14312 6673 15108
+3  849 289 10072
+3  846 289 849
+3  6859 7553 7552
+3  12604 2676 2675
+3  1429 8869 8868
+3  298 4998 6305
+3  7848 12063 4601
+3  5057 11094 12289
+3  8780 15095 9228
+3  5095 6145 6147
+3  5095 6147 5093
+3  12930 4821 4824
+3  12930 4824 4946
+3  4754 9618 8778
+3  5562 5889 5560
+3  13607 5889 5562
+3  6485 4684 4179
+3  8664 14719 3093
+3  11059 9788 6597
+3  2682 12918 2683
+3  11894 9792 4677
+3  5592 2796 2795
+3  3454 7523 11513
+3  10460 4579 4424
+3  4194 14264 14266
+3  6080 4955 14541
+3  6080 14541 9339
+3  10464 12677 9857
+3  12363 12365 15665
+3  10105 7738 13204
+3  10105 13204 14476
+3  2118 2120 2976
+3  14147 2421 7015
+3  6139 9625 15382
+3  1396 12004 1397
+3  1449 7950 1815
+3  4405 896 895
+3  13632 242 1590
+3  13608 14814 9129
+3  15129 4765 4767
+3  15129 4767 13790
+3  1953 13685 14501
+3  13317 12154 4270
+3  9230 15143 3011
+3  3012 3011 15143
+3  10932 10933 11630
+3  13356 8249 112
+3  13356 112 12698
+3  11011 10083 7486
+3  11367 2511 3998
+3  3325 3327 7390
+3  3968 790 789
+3  3968 789 3352
+3  472 471 6294
+3  5777 5776 11972
+3  3287 2815 9852
+3  441 8642 442
+3  177 4496 15450
+3  4018 10953 4019
+3  13753 10953 4018
+3  11296 1489 10203
+3  11074 3571 13307
+3  7369 5104 10564
+3  4383 4385 14230
+3  6221 6220 12936
+3  219 9415 2300
+3  8691 4614 3049
+3  5214 13684 2154
+3  12396 2154 13684
+3  14021 11890 14187
+3  11888 11890 14021
+3  9656 1792 11108
+3  4953 9971 12160
+3  3944 11100 11246
+3  3944 11246 2125
+3  8684 5389 11445
+3  4657 3488 8443
+3  14524 5706 13776
+3  9077 147 5030
+3  825 12326 4600
+3  6959 9081 12710
+3  12638 13721 12639
+3  12189 12188 14327
+3  4919 7374 7373
+3  15839 15522 8215
+3  4765 15522 15839
+3  6404 14777 11806
+3  7204 6947 9285
+3  6703 5359 6889
+3  6703 6889 6888
+3  4096 11189 1011
+3  526 14159 2026
+3  8215 15522 8214
+3  12608 9148 6586
+3  10893 15186 10892
+3  2609 2610 9110
+3  8686 12019 10874
+3  5771 2955 12228
+3  12018 12395 13509
+3  3003 3002 5877
+3  5109 5108 15413
+3  4373 12179 3083
+3  501 4103 12024
+3  13359 13159 4338
+3  5231 14241 357
+3  1966 2364 4861
+3  12016 15028 10483
+3  9812 9810 12545
+3  10617 9812 12545
+3  5441 7757 8267
+3  5480 15182 10248
+3  13814 7448 9545
+3  7040 7042 9450
+3  7040 9450 2435
+3  8759 9463 1379
+3  387 13402 6634
+3  13548 1180 14485
+3  13918 15352 14961
+3  12272 964 963
+3  7168 14499 4673
+3  3739 6773 6775
+3  3739 6775 1271
+3  1014 1016 13420
+3  1014 13420 15810
+3  8140 1903 7206
+3  14703 10051 10066
+3  1049 10066 10051
+3  1795 11637 15565
+3  3770 1795 15565
+3  10932 11630 11992
+3  6351 12683 6352
+3  11703 12529 14587
+3  12292 11254 11253
+3  15156 15155 11512
+3  15156 11512 11511
+3  4080 14350 2620
+3  3437 4080 2620
+3  10374 2830 2934
+3  12485 11317 14433
+3  8181 1655 4703
+3  10858 319 6869
+3  10858 6869 11024
+3  833 7597 832
+3  10749 12345 8000
+3  3935 12242 14799
+3  3671 3673 12141
+3  11391 12141 3673
+3  105 13613 8531
+3  8880 5631 5633
+3  2886 14418 7901
+3  5564 12593 12866
+3  2912 1735 2913
+3  6125 8747 13865
+3  7504 97 7505
+3  6909 6633 14561
+3  7320 2162 2163
+3  7320 2163 1919
+3  6406 3078 3927
+3  14043 9184 9183
+3  1922 1921 523
+3  14524 845 5706
+3  14524 843 845
+3  4790 10538 3618
+3  4790 3618 4791
+3  11464 14148 6754
+3  9364 3786 9362
+3  1514 1020 1022
+3  2490 2487 14674
+3  2490 14674 6621
+3  14854 7688 7690
+3  8698 13004 10532
+3  8598 13201 3669
+3  7462 5927 6110
+3  1284 3416 3415
+3  4825 4826 10939
+3  3742 140 5947
+3  3328 10919 6564
+3  13252 10919 3328
+3  5894 5893 8141
+3  5115 14644 15196
+3  5115 13442 14644
+3  6711 1635 3790
+3  4896 5955 4478
+3  7866 7321 1885
+3  3729 13654 14536
+3  3729 3731 13654
+3  14899 13524 15025
+3  2731 8314 2732
+3  4203 1676 5234
+3  13715 1037 8611
+3  9503 1553 8742
+3  9503 8742 2512
+3  15221 9103 4412
+3  15221 13139 9103
+3  15481 10787 8649
+3  13882 10787 15481
+3  163 6394 164
+3  12084 3496 3495
+3  14654 2759 14036
+3  5690 8227 248
+3  9419 13941 13982
+3  2694 5699 11561
+3  2959 6672 6671
+3  4185 7258 4186
+3  12181 4186 7258
+3  11286 14872 10308
+3  2392 2391 13750
+3  12869 12008 13421
+3  10073 12008 12869
+3  5832 13583 8884
+3  6601 11223 6602
+3  7069 10123 1847
+3  9044 7373 4890
+3  13816 11038 11037
+3  7933 13623 6712
+3  13140 3133 10216
+3  445 6777 8838
+3  3509 2106 3507
+3  2107 2106 3509
+3  7078 11982 13581
+3  4080 13881 14350
+3  435 4149 4148
+3  11173 12614 7370
+3  8797 5761 8798
+3  719 721 6759
+3  8984 718 8476
+3  10237 6994 14831
+3  14110 10237 14831
+3  8120 11111 13192
+3  9536 11111 8120
+3  8238 8237 4164
+3  13118 12106 13119
+3  11488 940 937
+3  7010 14019 4215
+3  6775 1295 13681
+3  6775 13681 1271
+3  9069 7095 7094
+3  1907 1906 2735
+3  13571 10806 1311
+3  9257 4334 9951
+3  10939 191 190
+3  14991 4689 14527
+3  12133 2976 2975
+3  3496 5528 9578
+3  15805 3179 3177
+3  3630 2725 13082
+3  885 13084 1009
+3  10935 4998 298
+3  6280 10099 4230
+3  2172 394 9611
+3  1282 8505 7798
+3  3640 3639 9837
+3  13011 3640 9837
+3  14552 3991 11187
+3  11618 4912 4914
+3  15581 13440 5134
+3  15096 9180 9179
+3  10684 12897 5037
+3  6162 2049 6163
+3  5601 5600 9252
+3  3611 1265 3192
+3  3557 3375 9579
+3  11141 1547 12416
+3  15499 4463 12366
+3  12545 14395 7790
+3  1248 15837 1246
+3  10241 10240 6310
+3  3479 10224 7447
+3  10518 10520 14705
+3  13789 13880 14531
+3  13789 14531 14530
+3  1739 13488 1740
+3  6134 13013 3928
+3  12010 10374 2933
+3  9764 7001 6168
+3  14386 15105 14608
+3  5335 5334 11703
+3  5534 8709 8382
+3  10131 8089 1601
+3  760 8140 9407
+3  13209 10376 7297
+3  7088 7297 10376
+3  11992 11630 11991
+3  10706 12523 11435
+3  6182 3025 6183
+3  6344 77 673
+3  6340 77 6344
+3  3556 3252 3375
+3  12187 13822 8503
+3  14189 9586 8508
+3  15451 9586 14189
+3  11626 3870 11627
+3  10551 11627 3870
+3  11235 11236 9719
+3  9290 11258 14714
+3  7093 7091 7090
+3  2290 9186 14718
+3  5332 5331 13939
+3  4888 4887 681
+3  14214 8425 8423
+3  14214 13257 8425
+3  5301 5300 11129
+3  4676 4678 9009
+3  8292 12003 8289
+3  6984 8122 5335
+3  9800 4351 12764
+3  3682 6501 2432
+3  10905 1614 1613
+3  13671 5755 8762
+3  13509 13671 8762
+3  14662 10440 10439
+3  14146 7858 1335
+3  3205 2089 3206
+3  13033 9911 15068
+3  8944 6974 6975
+3  15692 11386 11387
+3  12119 12118 6452
+3  9354 9316 14520
+3  601 1097 9012
+3  13302 13301 14626
+3  1778 1780 6861
+3  12799 12796 11831
+3  3577 6824 3578
+3  8133 13280 1798
+3  5047 9855 14925
+3  8988 12640 11895
+3  5490 5492 13483
+3  4857 5247 13301
+3  8153 2415 2417
+3  14608 11854 11537
+3  12879 9421 9423
+3  5225 7222 1669
+3  1519 272 274
+3  3422 10956 10955
+3  6646 6648 2055
+3  7804 9087 7803
+3  14481 9087 7804
+3  1424 3430 6357
+3  7716 12116 13238
+3  7716 11924 12116
+3  1606 1605 12038
+3  14311 7924 15838
+3  14905 11787 10725
+3  14905 14797 11787
+3  11677 30 11678
+3  3244 3246 7854
+3  13030 2553 2550
+3  12365 15664 15665
+3  5482 7378 7377
+3  5482 7377 6794
+3  2745 2746 10572
+3  2745 10572 10571
+3  9764 8288 13859
+3  8677 14014 8678
+3  10581 6290 6907
+3  3732 6221 11885
+3  3652 12025 7866
+3  6835 6681 11388
+3  5861 6389 5862
+3  8744 9993 11896
+3  2470 5712 5714
+3  13254 5853 1782
+3  2329 10898 8020
+3  10316 10315 15124
+3  4255 7179 7178
+3  9309 12118 2048
+3  13034 13036 2382
+3  1117 12209 1118
+3  7184 7186 852
+3  9066 8326 12738
+3  7154 11031 11032
+3  4304 12086 4302
+3  7223 6088 8169
+3  13385 13228 12980
+3  14388 1651 1650
+3  14388 14387 1651
+3  9155 2967 2970
+3  5811 2064 4389
+3  5255 3262 8131
+3  1513 1514 8054
+3  2093 597 9161
+3  6917 4091 753
+3  7052 13151 14843
+3  14293 10518 14705
+3  3219 5011 3959
+3  7353 10783 7332
+3  10760 15788 15378
+3  2338 15788 10760
+3  12060 4724 3386
+3  13262 13071 10643
+3  13263 13262 10643
+3  15082 14384 14383
+3  8535 15551 14805
+3  8535 11101 15551
+3  14109 6824 6823
+3  14414 14386 7825
+3  6027 10896 2636
+3  10094 10890 8515
+3  13907 12359 6617
+3  11778 8359 10471
+3  11245 15057 1994
+3  2169 8624 8623
+3  151 8357 6762
+3  471 854 15219
+3  10449 2989 8631
+3  4683 1101 9315
+3  3653 4832 3652
+3  8117 2474 12335
+3  236 1482 237
+3  5617 12290 5618
+3  10198 6663 10988
+3  5014 4762 5015
+3  9946 13752 1491
+3  9156 3068 2355
+3  6633 6632 14562
+3  6633 14562 14561
+3  8719 2707 10793
+3  4826 2579 821
+3  8326 8325 12738
+3  13341 2726 2029
+3  3548 5449 5448
+3  12940 9822 9824
+3  10511 11128 10510
+3  1072 1074 14585
+3  10541 5626 15078
+3  2457 740 6560
+3  1386 13077 12844
+3  6878 5478 5355
+3  6878 5355 11098
+3  4263 6295 4264
+3  7775 378 10787
+3  9858 11349 6990
+3  8072 5923 8046
+3  10382 10829 10380
+3  13470 9414 13427
+3  9758 9757 4193
+3  9758 4193 10182
+3  14423 11762 7212
+3  11351 981 12256
+3  7036 5916 5915
+3  7947 15049 7762
+3  7215 11151 976
+3  14115 9520 10034
+3  14115 10175 9520
+3  13514 10923 11168
+3  13514 11168 13551
+3  12935 6635 6634
+3  9312 4657 9740
+3  9820 7776 9177
+3  15246 5855 2366
+3  12589 11678 12590
+3  1538 13489 1293
+3  11139 12379 11140
+3  3012 13888 3010
+3  10409 2964 8283
+3  7103 8273 11208
+3  2724 8066 2722
+3  15841 3236 3238
+3  12574 833 15324
+3  15480 13155 15840
+3  6072 15840 13155
+3  12219 12218 11980
+3  9181 2343 12615
+3  11013 12442 2467
+3  10190 7105 10084
+3  12398 6816 14369
+3  14399 11000 10949
+3  14399 10695 11000
+3  11689 12194 11136
+3  9942 3510 14282
+3  1950 13891 1951
+3  1950 3075 13891
+3  292 10055 6638
+3  2292 2294 15002
+3  3946 2292 15002
+3  13018 6920 13019
+3  6921 6920 13018
+3  11711 1830 7128
+3  12062 4602 4601
+3  14493 39 12943
+3  10954 13753 4212
+3  10954 10953 13753
+3  15151 14772 14280
+3  15151 6316 14772
+3  10502 15028 12015
+3  1426 4174 1427
+3  14854 7690 8863
+3  15051 12037 11547
+3  6568 2880 5347
+3  8419 11306 11304
+3  2940 12539 2941
+3  11717 7383 10515
+3  12908 9253 2324
+3  8809 10938 3318
+3  14622 6193 12247
+3  5923 14510 5924
+3  3126 3637 3636
+3  10362 3637 3126
+3  7946 489 488
+3  8509 15793 8510
+3  15480 15793 8509
+3  6756 14224 3685
+3  6592 15204 12437
+3  9532 12946 10188
+3  502 12005 5249
+3  4227 3522 9336
+3  4318 7623 14289
+3  12260 4318 14289
+3  19 21 6046
+3  4692 4694 10646
+3  13989 13990 14080
+3  4736 13759 2241
+3  14054 9277 11813
+3  8219 123 125
+3  7020 3772 2119
+3  8087 4802 7659
+3  7888 7887 12705
+3  5816 7463 5819
+3  8743 2669 2671
+3  8743 11849 2669
+3  8314 8432 10276
+3  7183 712 4511
+3  5521 15313 4847
+3  4561 4563 10947
+3  12886 12654 12533
+3  9177 7777 14067
+3  12394 14067 7777
+3  13958 8363 8365
+3  12970 11139 11138
+3  3986 8055 10567
+3  11736 6031 11735
+3  10717 13735 12634
+3  10886 7419 6853
+3  1768 12581 6170
+3  10750 8002 7436
+3  4122 6793 6792
+3  4122 6792 4121
+3  1899 15189 10017
+3  15117 8880 8879
+3  15117 8879 13459
+3  6329 11317 6330
+3  4143 6945 7756
+3  5441 6644 7757
+3  12972 13354 3687
+3  7236 9815 3115
+3  12021 7252 13430
+3  12021 13430 7532
+3  15517 13064 5223
+3  10434 13064 15517
+3  5081 7911 5082
+3  9696 14409 13088
+3  8384 9696 13088
+3  4328 7583 842
+3  11058 7583 4328
+3  10230 10327 14382
+3  11179 3201 3204
+3  9488 1405 1402
+3  10498 10252 10251
+3  10498 10251 10194
+3  8463 6783 3095
+3  1168 14126 8333
+3  8258 6742 6744
+3  8258 6744 10103
+3  6541 1866 15479
+3  11825 6541 15479
+3  317 9899 315
+3  9776 13120 457
+3  5826 7983 5827
+3  7734 5827 7983
+3  15329 3566 12103
+3  4372 13716 11057
+3  11519 15808 11910
+3  10191 12795 10192
+3  4499 11654 6725
+3  13139 13138 9103
+3  4600 953 954
+3  5180 271 270
+3  5430 5741 6364
+3  80 5190 78
+3  5191 5190 80
+3  13293 8112 92
+3  10377 1910 3672
+3  7951 7644 7952
+3  8776 14925 12677
+3  14625 8398 13359
+3  9419 1800 3520
+3  1082 1483 1083
+3  11365 10342 15412
+3  11365 15412 6507
+3  3019 1749 1769
+3  11192 5235 8750
+3  9177 7776 7777
+3  10747 6065 9772
+3  13229 6147 14206
+3  13229 14206 13187
+3  10185 1587 10319
+3  5778 60 59
+3  5500 14105 5499
+3  13792 9884 9403
+3  3867 6464 6960
+3  3498 9474 3499
+3  8745 11029 11030
+3  12567 6487 6400
+3  6488 6487 12567
+3  1961 1223 2078
+3  4893 11180 10223
+3  6912 15311 6913
+3  7919 2387 2386
+3  14471 1512 703
+3  14648 1568 12603
+3  12923 8798 6434
+3  14895 15135 1159
+3  4504 4503 3202
+3  2498 2497 5362
+3  12693 7386 14618
+3  8221 13431 3187
+3  5261 12275 5262
+3  11107 88 87
+3  10512 4161 4162
+3  9928 9994 10762
+3  13821 12495 8543
+3  12187 12495 13821
+3  5963 6699 5964
+3  7254 13958 8365
+3  6058 4525 2239
+3  9492 13529 15106
+3  6757 9507 15078
+3  6757 15078 2320
+3  9571 3547 3550
+3  4437 7367 2884
+3  13630 624 9932
+3  8632 2991 2099
+3  9661 13344 6662
+3  9661 6662 6661
+3  11162 9088 15407
+3  11162 15407 11163
+3  10363 1377 8939
+3  9351 14612 14348
+3  14980 14039 4501
+3  5324 14039 14980
+3  12148 14598 14597
+3  12763 12965 12964
+3  11438 12965 12763
+3  5624 11722 5112
+3  14259 11771 14548
+3  8005 12667 8849
+3  3906 12211 5896
+3  4633 4990 8278
+3  10696 4868 1234
+3  6601 1463 11223
+3  7602 14093 1825
+3  15841 3238 10560
+3  15841 10560 10559
+3  13106 13806 13803
+3  7097 13806 13106
+3  10628 7835 9968
+3  12463 4447 7277
+3  9582 9583 11792
+3  9567 9582 11792
+3  7032 9886 332
+3  1012 7651 7653
+3  12204 5681 5684
+3  10498 2981 2979
+3  4476 3586 4477
+3  13216 4855 14725
+3  2001 5653 7568
+3  11851 13177 1366
+3  11851 1366 1365
+3  823 4718 4715
+3  6582 13562 13598
+3  3189 1082 11228
+3  6533 12280 13542
+3  7502 7501 10983
+3  7720 9795 9794
+3  8512 4123 4125
+3  8512 4125 8175
+3  7341 8159 5956
+3  15358 15407 10078
+3  14481 10078 15407
+3  8330 10719 8331
+3  7782 7784 13419
+3  10786 14408 9558
+3  1379 9463 1380
+3  14342 13823 9518
+3  7373 14924 4890
+3  1111 4981 11611
+3  13881 210 13329
+3  5264 13250 5265
+3  680 223 220
+3  853 5563 854
+3  4825 10939 10938
+3  307 11588 7480
+3  307 7480 8063
+3  13193 8981 10651
+3  1852 1851 5670
+3  9705 3205 3207
+3  14684 4109 287
+3  11581 233 15159
+3  11581 234 233
+3  13291 993 8102
+3  1295 1297 13681
+3  11294 14441 3087
+3  8950 14288 8199
+3  6186 13267 8813
+3  10027 952 14819
+3  12104 921 923
+3  12104 923 10388
+3  12913 5237 9386
+3  273 14143 2096
+3  12973 550 13565
+3  6907 3904 10581
+3  10420 8470 13479
+3  10420 13479 13310
+3  12153 6040 52
+3  11080 483 13622
+3  7854 627 3244
+3  1467 12661 12662
+3  6191 2817 8039
+3  15025 7607 7606
+3  6745 2670 8736
+3  8724 12238 9556
+3  4515 7458 6758
+3  1067 1924 2794
+3  5653 5652 11571
+3  5060 8276 5061
+3  3385 2083 757
+3  7744 3034 628
+3  11249 12146 2400
+3  14309 10225 13198
+3  14309 13270 10225
+3  7100 11054 11221
+3  2233 2171 7590
+3  2233 2235 2171
+3  12618 11188 6954
+3  1034 11194 9717
+3  1837 6490 12144
+3  5558 5250 11518
+3  1180 13548 1181
+3  14689 9191 13508
+3  10344 2234 4711
+3  7461 2234 10344
+3  2046 2578 2047
+3  8599 10151 9139
+3  6543 3134 13683
+3  3452 6543 13683
+3  13693 13690 11359
+3  1520 5329 5945
+3  6042 10851 6043
+3  509 10851 6042
+3  5619 5621 7174
+3  10367 13021 15549
+3  10369 13021 10367
+3  11766 7916 9093
+3  4115 12055 15824
+3  14120 1804 1803
+3  9204 9205 15389
+3  8605 1713 2032
+3  8604 8605 2032
+3  14667 2510 10977
+3  4756 4758 5993
+3  11293 5497 10781
+3  9256 3054 3056
+3  12320 6396 2686
+3  10617 12544 8843
+3  4173 4630 4629
+3  13215 15159 15830
+3  11581 15159 13215
+3  14476 4647 10105
+3  203 15138 10997
+3  4765 15839 4766
+3  4905 7812 4906
+3  4776 10422 4777
+3  3754 11974 11973
+3  1873 1872 4514
+3  171 6325 6324
+3  171 6324 170
+3  1939 11845 1940
+3  10053 8811 8810
+3  3586 3588 2673
+3  6443 6444 12110
+3  2813 2812 11439
+3  2813 11439 8968
+3  5101 11508 8702
+3  959 961 8899
+3  1732 4141 14026
+3  13483 1732 14026
+3  2692 2694 11560
+3  12434 8171 12435
+3  3295 7406 11289
+3  10539 4486 8569
+3  15568 3996 14720
+3  1992 1162 1161
+3  3123 3242 9484
+3  11963 9595 9596
+3  170 6324 14630
+3  170 14630 6315
+3  5997 8100 8102
+3  4418 9806 10326
+3  11725 12651 12650
+3  11724 12651 11725
+3  12269 15230 10261
+3  12268 15230 12269
+3  10889 10849 2713
+3  6886 7375 11435
+3  12908 9934 3372
+3  1486 1485 1871
+3  8904 15046 4374
+3  7269 146 12361
+3  11038 12767 11036
+3  5249 500 502
+3  4973 13264 7951
+3  4412 4411 365
+3  15221 4412 365
+3  14878 9955 15057
+3  5893 8198 8141
+3  8708 5534 2438
+3  6722 12191 6723
+3  4513 12498 12048
+3  12383 4472 4471
+3  1647 11156 1648
+3  5021 5023 13314
+3  11347 13767 11345
+3  2128 4925 1877
+3  3156 2312 1463
+3  11113 13810 10649
+3  12291 8283 8282
+3  6047 2302 6045
+3  2426 13074 8600
+3  15842 9314 14847
+3  12166 9314 15842
+3  981 4478 12256
+3  9776 9775 6767
+3  7153 8656 13553
+3  3045 3044 9875
+3  6739 9645 400
+3  6739 400 13741
+3  9094 1690 871
+3  8329 11541 8330
+3  14339 11541 8329
+3  8279 14490 9820
+3  5509 8279 9820
+3  2695 2696 1012
+3  4269 4268 14174
+3  4269 14174 9102
+3  5168 7278 5169
+3  1049 2482 11323
+3  1050 1049 11323
+3  13674 9335 6988
+3  8690 351 549
+3  352 351 8690
+3  2683 12918 4998
+3  11787 14797 7811
+3  605 1058 606
+3  8235 3577 4628
+3  712 930 4511
+3  10834 12077 12076
+3  2270 6824 3577
+3  11758 6690 6692
+3  11927 15201 11928
+3  9577 7537 10132
+3  3352 3969 3968
+3  10172 1120 1122
+3  713 4214 6088
+3  15368 4593 13226
+3  15368 13226 8274
+3  1737 11728 10292
+3  702 13431 703
+3  13759 2242 2241
+3  10494 11752 9185
+3  3608 3609 6480
+3  15203 15201 11927
+3  11297 6438 13715
+3  6978 5664 5663
+3  3779 5823 3780
+3  3727 1174 10004
+3  15371 7400 7818
+3  733 732 9683
+3  11469 8400 12961
+3  5526 3578 14109
+3  1576 10237 1577
+3  1481 14743 6688
+3  3668 6280 4230
+3  6597 12325 11059
+3  1498 12325 6597
+3  14146 8294 7858
+3  7367 7614 2882
+3  14477 3528 3799
+3  5535 9431 5536
+3  1507 13426 12433
+3  2473 3701 2148
+3  3682 11570 3683
+3  5529 8475 10330
+3  11785 12169 14098
+3  11785 14098 11784
+3  8897 863 862
+3  202 4284 7055
+3  15048 8034 8033
+3  120 12464 6025
+3  15824 14891 4115
+3  14896 14891 15824
+3  8810 3589 3471
+3  14723 7270 10478
+3  13060 4403 8892
+3  7909 3371 2381
+3  9100 9451 9101
+3  8483 1164 5661
+3  15104 9112 9111
+3  13537 9112 15104
+3  2650 12912 1171
+3  2110 2109 9669
+3  11042 11041 15157
+3  11021 44 7785
+3  11021 42 44
+3  3606 4871 7846
+3  7129 5455 5454
+3  9599 9868 12471
+3  9355 11803 9356
+3  1593 1592 839
+3  841 1593 839
+3  6383 10139 13538
+3  1036 8075 3830
+3  15157 3451 3903
+3  13627 6594 9399
+3  7734 7733 5827
+3  10845 10846 11322
+3  4140 10845 11322
+3  12688 9716 10552
+3  6887 12523 10253
+3  2643 6073 14617
+3  6075 14617 6073
+3  14678 840 4577
+3  10864 8720 12753
+3  3567 1543 1542
+3  762 1894 4008
+3  11766 9093 13766
+3  1948 4007 4005
+3  13859 7001 9764
+3  12793 12792 14247
+3  5516 2140 5517
+3  10148 5401 8796
+3  10148 8796 1854
+3  4528 5934 4529
+3  10471 8359 8358
+3  10037 13662 10659
+3  2873 6484 5698
+3  6653 6652 9030
+3  2931 11597 424
+3  15175 11597 2931
+3  7059 883 15133
+3  3527 2236 14050
+3  951 4620 4622
+3  4423 11018 4425
+3  6720 6457 7880
+3  3854 5079 9747
+3  9938 844 834
+3  9007 12469 5207
+3  4455 12867 4453
+3  453 1420 11558
+3  3977 1420 453
+3  10549 10551 3869
+3  3228 2552 5304
+3  14508 3228 5304
+3  4126 12459 14480
+3  4168 575 4179
+3  8685 5058 9893
+3  4553 9330 10437
+3  6622 12192 3374
+3  5893 8951 8198
+3  1487 12147 2629
+3  4667 15564 13376
+3  3349 4667 13376
+3  8555 2415 8153
+3  6765 10188 10187
+3  4910 10345 784
+3  13360 1796 2254
+3  13360 14521 1796
+3  14987 8773 3492
+3  14987 10744 8773
+3  847 7163 848
+3  5328 5327 14415
+3  5328 14415 5946
+3  10734 6929 6930
+3  10734 8554 6929
+3  730 14190 13297
+3  6676 7580 6677
+3  8455 9080 7915
+3  4879 10360 4880
+3  7841 6109 6108
+3  13348 12353 14009
+3  12885 13348 14009
+3  1565 2036 1748
+3  1041 2522 1042
+3  7889 10501 7890
+3  3825 3824 11334
+3  10074 13657 7358
+3  10074 7358 7357
+3  7175 5621 10454
+3  12624 8722 3141
+3  3083 4371 4373
+3  12952 12951 12148
+3  7035 12148 12951
+3  3457 15390 6458
+3  11536 3457 6458
+3  10726 4172 4171
+3  10726 6839 4172
+3  12371 4048 4049
+3  12637 4048 12371
+3  4771 1350 1349
+3  3064 7570 85
+3  6689 11669 12226
+3  1346 7078 13989
+3  10544 9512 7368
+3  7088 819 15083
+3  818 15083 819
+3  8849 12667 6418
+3  809 1320 12976
+3  5190 8603 11925
+3  5192 8603 5190
+3  8763 11742 8564
+3  9487 12104 9488
+3  5214 7160 2047
+3  10045 5988 14036
+3  5989 14036 5988
+3  2452 15141 2453
+3  14166 2692 11560
+3  14829 1329 11001
+3  1567 11001 1329
+3  3090 12655 158
+3  1773 7889 2836
+3  3085 7126 1984
+3  1925 8755 8757
+3  4743 11881 4744
+3  14647 8687 7966
+3  2375 2374 12061
+3  977 12293 978
+3  12790 11238 11646
+3  15077 13665 13006
+3  6771 5833 12834
+3  4377 11239 10417
+3  4377 10417 13811
+3  11391 5045 14888
+3  15166 14888 5045
+3  12543 11582 11581
+3  1047 1942 5800
+3  692 9840 15112
+3  11902 3460 13646
+3  14650 7518 9082
+3  14650 7521 7518
+3  2324 9253 14954
+3  7216 7484 7217
+3  11835 14892 11271
+3  13716 10462 11057
+3  213 14250 11150
+3  9917 9919 11539
+3  11017 11539 9919
+3  9412 12475 14173
+3  9513 11441 11928
+3  8895 4178 12315
+3  8027 1192 1194
+3  3960 8996 7662
+3  8494 4066 6778
+3  7817 8610 9407
+3  7817 9407 8140
+3  12078 12077 5398
+3  5168 2438 5534
+3  15364 3821 4892
+3  15364 4892 2547
+3  5102 5104 9512
+3  15840 6072 13227
+3  15840 13227 11265
+3  10367 9922 10368
+3  11773 9922 10367
+3  7980 10306 7981
+3  8500 10200 8605
+3  11226 5515 5517
+3  2437 4216 11516
+3  12996 10592 10193
+3  12996 10193 1203
+3  4676 11894 4677
+3  9572 14959 2578
+3  2620 2619 3437
+3  5183 3655 6158
+3  3654 6158 3655
+3  11210 9742 11886
+3  1416 7715 1396
+3  11520 10369 11519
+3  13021 10369 11520
+3  9228 4244 4246
+3  5233 10129 10130
+3  14397 11656 9823
+3  3639 3641 9838
+3  6866 11281 8587
+3  8434 13206 9515
+3  13410 2084 10179
+3  13410 3291 2084
+3  9173 11253 11255
+3  10060 5907 5910
+3  11325 12510 12303
+3  730 729 14190
+3  2913 7396 4085
+3  2765 7061 2157
+3  11557 10021 8481
+3  12817 14018 10207
+3  12679 12245 12244
+3  14978 9737 5410
+3  14978 6736 9737
+3  8034 11680 2304
+3  3320 1684 1686
+3  8912 4514 4586
+3  8912 4586 4587
+3  3970 3969 5892
+3  13112 8345 4935
+3  15116 10029 10028
+3  15116 10028 15812
+3  97 96 7505
+3  12072 5797 5796
+3  4318 4317 11267
+3  4318 11267 11807
+3  14273 14272 14300
+3  7961 12052 12051
+3  7097 8242 13806
+3  3441 3390 9494
+3  15372 11484 7400
+3  10376 13208 13638
+3  10376 13638 7089
+3  6243 4993 4992
+3  1037 1036 3830
+3  395 4231 397
+3  14778 606 2930
+3  13351 8679 6941
+3  66 13351 6941
+3  15157 11041 6542
+3  6920 11101 8534
+3  6920 6922 11101
+3  11065 8992 7506
+3  341 7085 342
+3  10741 4351 9800
+3  4798 11977 4795
+3  1471 4795 11977
+3  14740 829 1368
+3  14740 1368 11695
+3  8269 3032 3031
+3  4510 7183 4511
+3  12897 15100 15399
+3  5670 5669 5885
+3  14412 2564 2015
+3  14412 2015 2017
+3  3410 14967 3411
+3  7864 6660 14153
+3  13268 14451 14426
+3  93 90 10947
+3  8567 2215 2214
+3  850 14533 6367
+3  7767 14650 6958
+3  8548 12508 15198
+3  8548 15198 15197
+3  13212 13127 2966
+3  5188 5549 5187
+3  14556 11104 13914
+3  732 13042 2617
+3  11022 4618 4617
+3  10567 8055 10568
+3  8015 13429 11302
+3  8015 11302 13414
+3  2889 5437 982
+3  4702 8181 4703
+3  3898 5240 5242
+3  644 7812 4905
+3  1951 13891 12938
+3  8245 15261 8246
+3  10648 12829 6827
+3  5581 9770 5582
+3  5581 11753 9770
+3  12772 3851 11260
+3  11977 1955 1957
+3  11977 1957 1471
+3  4873 8118 13313
+3  5818 1550 12343
+3  7225 4457 11913
+3  14645 9026 646
+3  15371 8140 15372
+3  3714 4498 4500
+3  13835 14341 13049
+3  12971 12973 13565
+3  10578 2208 2207
+3  9593 4702 1080
+3  8209 10052 8207
+3  8922 13184 12138
+3  8922 12138 14873
+3  3580 14948 3581
+3  8762 9217 9216
+3  8763 9217 8762
+3  2604 12612 2605
+3  12059 11667 11721
+3  11668 11667 12059
+3  3553 12826 3551
+3  8519 15566 8516
+3  10199 1714 10200
+3  12622 12947 9282
+3  14513 15667 3698
+3  7404 10607 12467
+3  3805 9876 3806
+3  849 8878 847
+3  11805 15052 12734
+3  12570 9076 12806
+3  14989 9078 12484
+3  10947 8112 4561
+3  8090 8645 10202
+3  8353 8352 2929
+3  8353 2929 12031
+3  11380 598 9105
+3  10540 2780 7291
+3  5227 5228 5968
+3  2939 2794 6651
+3  2086 15058 2087
+3  8204 4370 4369
+3  2861 10477 6333
+3  14631 14332 13225
+3  7619 7990 11949
+3  187 189 1358
+3  11950 5303 2551
+3  11322 10296 11321
+3  4624 11602 13077
+3  7757 8265 8267
+3  7450 7673 8682
+3  6381 6380 13467
+3  8587 7361 659
+3  918 920 9144
+3  12926 1014 15810
+3  9328 9327 13816
+3  10778 10805 8643
+3  12821 14242 14243
+3  11222 1510 13944
+3  11767 13766 13745
+3  197 11509 12605
+3  3706 2378 2377
+3  9265 14173 10227
+3  8626 5397 3568
+3  15002 2294 11838
+3  11275 5942 5941
+3  8477 1303 1305
+3  8478 1303 8477
+3  12235 13175 14913
+3  9252 13175 12235
+3  11070 11072 14664
+3  10354 9608 10720
+3  10696 1233 13660
+3  14034 5073 14982
+3  14034 14982 12172
+3  3889 14724 3890
+3  2057 6164 11009
+3  608 10828 609
+3  8674 1622 1205
+3  2377 777 776
+3  10076 2377 776
+3  12520 7494 6059
+3  9433 2465 12699
+3  4012 6599 13842
+3  4013 4012 13842
+3  10306 7980 3225
+3  10295 10011 6807
+3  10295 6807 6806
+3  13043 13843 13842
+3  7880 6457 8178
+3  13811 14863 4378
+3  7986 4378 14863
+3  5142 9671 5140
+3  865 6620 866
+3  11065 992 991
+3  8043 2533 2532
+3  2841 7815 15361
+3  3144 8206 8205
+3  355 3144 8205
+3  10079 6474 12968
+3  4606 6416 6213
+3  8999 9025 12185
+3  14571 12212 13146
+3  9743 12212 14571
+3  3408 6550 3559
+3  7170 7169 8486
+3  9817 783 12208
+3  7624 384 6813
+3  8309 3897 3899
+3  6654 2000 1999
+3  13973 11509 11860
+3  4063 4062 8651
+3  4686 1634 10698
+3  9659 8203 8746
+3  13449 2810 12818
+3  12819 12818 2810
+3  10357 662 661
+3  9234 621 9085
+3  15335 14666 9728
+3  7394 5550 5549
+3  510 12138 13184
+3  6822 6821 5658
+3  3712 5461 13908
+3  10161 4829 12665
+3  8119 7359 1434
+3  14331 9193 8254
+3  12533 11834 11356
+3  12732 8443 8442
+3  9741 8443 12732
+3  3344 14776 8194
+3  3553 3344 8194
+3  5780 7608 14155
+3  3668 4230 4229
+3  12377 952 10027
+3  3702 1778 3703
+3  14066 7821 3545
+3  14066 3545 12965
+3  11063 6332 6331
+3  9238 11063 6331
+3  7593 8172 11805
+3  12425 13636 671
+3  12899 2450 1888
+3  12499 7375 6968
+3  10170 11675 11449
+3  4769 5912 7936
+3  5911 7936 5912
+3  11594 8909 8908
+3  7986 14863 13586
+3  3669 3668 9482
+3  9159 1497 2264
+3  15397 8614 15743
+3  5717 7814 9697
+3  1667 8311 1668
+3  8938 10363 8939
+3  4794 2211 439
+3  4794 4793 2211
+3  10825 10827 9693
+3  10493 9625 6139
+3  7492 7494 12520
+3  5859 13432 8404
+3  14535 4524 4523
+3  948 8514 949
+3  13836 13194 14912
+3  13836 572 13194
+3  7775 10787 13882
+3  9331 7974 9332
+3  8759 8760 9463
+3  12366 993 12367
+3  14013 14941 7222
+3  493 13161 491
+3  8347 5186 12595
+3  9166 8447 8446
+3  714 1797 715
+3  7320 1918 8934
+3  15130 15129 15789
+3  2203 15130 15789
+3  827 348 14760
+3  9670 3204 9671
+3  13537 15105 8306
+3  12416 1547 12417
+3  6229 6486 14551
+3  3955 9663 7648
+3  11063 10865 11064
+3  13035 10156 13036
+3  13185 15068 9911
+3  13185 8667 15068
+3  4742 9537 8180
+3  5187 13386 13387
+3  11227 6276 6275
+3  542 2240 4452
+3  9350 11566 9860
+3  12786 5419 5421
+3  14017 14635 5732
+3  14217 4062 4064
+3  7225 7226 9340
+3  9079 10238 9080
+3  2484 2486 14836
+3  10593 7293 5171
+3  6764 12299 813
+3  10818 6180 6929
+3  10818 6929 8553
+3  8671 587 2661
+3  8671 2661 2660
+3  5412 9428 5749
+3  15422 13344 9661
+3  5905 13344 15422
+3  8041 10229 10228
+3  3968 3970 8766
+3  10833 15842 14847
+3  12166 15842 10833
+3  13815 12286 12285
+3  13815 12285 45
+3  11115 15789 15129
+3  12985 6349 11575
+3  4252 8899 14331
+3  13529 13423 13425
+3  13529 13425 15106
+3  8133 1798 1797
+3  11435 12499 12500
+3  13494 7356 12689
+3  4642 6420 12209
+3  11022 4617 11234
+3  9825 14734 9826
+3  9825 14732 14734
+3  6485 3653 4684
+3  748 3455 4529
+3  14518 14076 14074
+3  14004 10599 10598
+3  5155 8990 8992
+3  3094 8553 8552
+3  12450 9323 12451
+3  12450 9324 9323
+3  12383 4471 2524
+3  12318 12217 14172
+3  8185 196 5392
+3  11590 14750 13405
+3  9258 14686 9261
+3  522 521 5697
+3  7622 4326 4325
+3  5340 5342 14901
+3  3851 13355 6534
+3  3851 6534 3849
+3  12524 3804 14942
+3  15375 15257 12238
+3  632 7556 5076
+3  3884 3883 6128
+3  9481 9482 13465
+3  4267 13848 117
+3  6140 8067 7029
+3  12511 317 1988
+3  6355 6357 13084
+3  1423 10239 1424
+3  11963 3588 3587
+3  14134 11411 10043
+3  1757 11227 9262
+3  772 771 4380
+3  1410 13663 1411
+3  13299 5974 2112
+3  5279 12506 13214
+3  2426 980 13074
+3  14130 11362 6808
+3  11311 3910 3912
+3  11659 14542 13557
+3  7130 5454 6663
+3  15390 4045 422
+3  2832 6691 6690
+3  9121 9120 6885
+3  9910 9121 6885
+3  8068 11296 10203
+3  10153 10997 10154
+3  2464 8428 2463
+3  14869 12420 15710
+3  12418 12420 14869
+3  7727 2005 13083
+3  9792 9793 4677
+3  5605 4390 8491
+3  14960 13684 5214
+3  6678 5197 10659
+3  6678 10659 6676
+3  688 6611 689
+3  3237 3828 7249
+3  2914 2913 4086
+3  7791 8409 7792
+3  6121 6120 13253
+3  14780 9668 7859
+3  1278 8561 1279
+3  9777 2539 109
+3  9576 15219 7390
+3  876 875 14694
+3  12771 12436 6417
+3  12771 12434 12436
+3  7905 7521 10537
+3  434 4149 435
+3  8679 11230 12777
+3  3230 7765 3231
+3  5958 14269 5959
+3  4368 4367 4705
+3  13515 13913 11504
+3  12615 12614 8380
+3  1399 12615 8380
+3  8740 2330 13572
+3  9332 8740 13572
+3  14749 1651 14883
+3  3441 3443 6078
+3  15066 3362 7006
+3  3034 13670 3035
+3  11319 12519 15040
+3  2410 2409 10175
+3  13337 15366 7928
+3  3843 12142 4079
+3  10533 10532 5695
+3  10715 15558 13202
+3  10715 13202 9320
+3  3866 5271 1901
+3  144 5601 145
+3  4595 12303 4596
+3  6884 989 225
+3  4904 14797 14030
+3  986 12357 987
+3  7263 7264 7150
+3  966 4182 3072
+3  13167 9059 7499
+3  2723 12604 6830
+3  9523 9522 10455
+3  8793 8580 8579
+3  13769 5601 12234
+3  13769 12234 11257
+3  7107 10647 7108
+3  12972 13353 13354
+3  7549 14235 11036
+3  14025 11856 3865
+3  5286 10333 10334
+3  6974 1734 4512
+3  8613 1218 1217
+3  14269 14121 5959
+3  1706 1709 3397
+3  3882 2266 2265
+3  13544 13546 13773
+3  9582 13628 970
+3  11173 7370 9432
+3  5705 14724 3889
+3  10212 6887 6665
+3  12899 1888 12900
+3  7241 9001 7242
+3  9465 9466 4768
+3  14643 12853 9744
+3  14096 14643 9744
+3  11593 1666 2606
+3  9711 6081 6080
+3  9339 9711 6080
+3  15377 4519 2891
+3  3409 2891 4519
+3  13506 11963 3587
+3  15032 10759 7152
+3  15025 7606 7674
+3  6560 740 10815
+3  6560 10815 467
+3  4350 11311 9715
+3  2880 2879 9297
+3  3447 2710 2712
+3  14370 13594 13444
+3  14343 7889 7891
+3  10488 8980 8981
+3  12124 12465 9241
+3  13251 10919 13252
+3  5281 4814 13592
+3  7276 7275 14998
+3  7276 14998 14219
+3  13245 15245 7246
+3  7467 15452 889
+3  7069 7070 11384
+3  511 15024 13813
+3  12204 5684 7384
+3  12204 7384 12641
+3  11203 8863 8862
+3  1051 13586 1048
+3  5821 1048 13586
+3  712 56 930
+3  593 592 3412
+3  15389 15075 3284
+3  1954 272 1519
+3  3629 14881 1840
+3  14009 12883 12885
+3  9855 12677 14925
+3  9855 9857 12677
+3  2966 1548 14553
+3  15491 12064 12066
+3  15455 13144 15106
+3  13425 15455 15106
+3  7255 7254 8365
+3  1425 1428 8128
+3  11860 196 8185
+3  14752 7726 7725
+3  10278 12108 10279
+3  14767 8360 8339
+3  7326 7338 15107
+3  4502 7326 15107
+3  14217 4064 12290
+3  13362 8032 15248
+3  15073 8032 13362
+3  7742 628 627
+3  1745 4014 1746
+3  6088 4214 6089
+3  12075 15207 10830
+3  9661 6661 9662
+3  8630 6211 7415
+3  14116 4734 9356
+3  8889 15485 11933
+3  1114 1116 8560
+3  5566 211 5567
+3  14777 13641 11806
+3  9849 476 3410
+3  3058 11954 6465
+3  3058 6465 14442
+3  499 498 3248
+3  13717 14937 9440
+3  13717 9440 7496
+3  14408 3316 3315
+3  10786 3316 14408
+3  12309 10492 10490
+3  6965 6964 10809
+3  12454 12453 1814
+3  5727 6482 12114
+3  5268 12114 6482
+3  13082 2725 2727
+3  2263 2571 226
+3  14699 14990 14375
+3  6873 14990 14699
+3  3749 8971 6427
+3  13652 13703 13773
+3  1251 5623 1252
+3  12313 10083 11011
+3  10009 11230 13351
+3  7321 11299 1886
+3  8073 8072 14297
+3  5056 11094 5057
+3  875 12133 2975
+3  4758 14793 2845
+3  5015 4762 11931
+3  15225 6164 13968
+3  2156 2158 7242
+3  5086 2092 416
+3  296 6134 5970
+3  748 747 3455
+3  7359 8119 14825
+3  630 5382 631
+3  11896 2286 8744
+3  11258 14715 14714
+3  12310 12309 4930
+3  9863 6349 12985
+3  14148 11464 9174
+3  13627 13628 9567
+3  10200 1714 1713
+3  8605 10200 1713
+3  9955 9957 15057
+3  14595 12441 13463
+3  13751 13463 12441
+3  4628 3577 3579
+3  5693 3539 10124
+3  12025 5354 7866
+3  3031 3033 10980
+3  14144 8736 7394
+3  11226 5293 15305
+3  5051 9299 11117
+3  14552 11187 11186
+3  9208 15470 6945
+3  9208 9210 15470
+3  1787 1786 8919
+3  14873 1787 8919
+3  10218 10217 15351
+3  4518 4520 15000
+3  9947 5448 14728
+3  3548 5448 9947
+3  8145 3510 9942
+3  9371 2945 10634
+3  5471 7147 11246
+3  2126 11246 7147
+3  96 4984 6952
+3  369 9847 9384
+3  4684 4686 10698
+3  6949 6948 9786
+3  6791 6790 4100
+3  6861 9978 12431
+3  619 37 36
+3  11375 10127 5773
+3  4379 10127 11375
+3  14953 3581 14951
+3  11496 8335 10510
+3  13531 1978 7403
+3  15554 8991 15497
+3  5553 9653 5554
+3  3447 2712 1845
+3  4466 14421 11335
+3  10552 4886 7260
+3  15564 8178 13376
+3  13415 10636 7239
+3  3538 15182 5480
+3  8096 7131 5411
+3  15806 2055 2054
+3  6646 2055 15806
+3  4057 6454 1963
+3  9916 15518 5222
+3  9916 5222 0
+3  768 15195 9069
+3  4671 4292 6971
+3  777 4671 6971
+3  9465 924 9466
+3  2100 11575 2101
+3  12855 12785 13701
+3  12855 12783 12785
+3  1820 7691 1290
+3  1820 1290 1289
+3  2853 14410 10735
+3  10386 9394 12189
+3  10788 5151 5150
+3  3081 12249 1771
+3  9876 4604 3809
+3  12070 7644 7951
+3  12070 7951 13188
+3  2127 1335 1337
+3  3674 2371 14435
+3  14642 15563 12373
+3  14889 15563 14642
+3  799 14440 800
+3  9264 528 9263
+3  4082 2806 4083
+3  13142 4083 2806
+3  7141 7140 8089
+3  6381 2921 12636
+3  8597 14392 14121
+3  14414 8307 14386
+3  14359 6107 10508
+3  13217 6107 14359
+3  4095 12668 1076
+3  1077 1076 12668
+3  15108 10962 4398
+3  15108 4398 13447
+3  10415 5829 5830
+3  14446 10040 14420
+3  4867 9472 15087
+3  11810 9149 8562
+3  11810 8562 13953
+3  4276 2375 4942
+3  12172 14982 10293
+3  12172 10293 10294
+3  15372 7206 11484
+3  12576 4382 14088
+3  12576 10157 4382
+3  10903 9794 9796
+3  8261 457 11019
+3  3614 10052 8209
+3  1887 8641 4685
+3  9007 5207 11318
+3  10708 10707 13965
+3  3667 3666 4998
+3  7026 4133 9256
+3  10032 10031 3916
+3  14113 12645 12644
+3  13715 1035 1037
+3  8287 9616 4407
+3  10198 5076 10197
+3  13904 9165 8612
+3  14615 6981 6980
+3  1285 862 6622
+3  10701 15072 15132
+3  8800 13151 9590
+3  7800 1234 4869
+3  5051 11117 11119
+3  11078 7587 8070
+3  1420 1421 11558
+3  555 3924 3273
+3  10488 10930 10487
+3  5447 7280 8373
+3  5697 9945 522
+3  7088 15083 9871
+3  5753 5880 8547
+3  12347 5753 8547
+3  8537 8536 13246
+3  14931 8483 5661
+3  81 83 15663
+3  4918 15663 83
+3  6146 14205 14206
+3  13515 7215 13913
+3  13524 8533 7607
+3  9703 5457 8465
+3  2763 10150 10149
+3  2288 12256 8744
+3  14111 4867 15087
+3  6106 4661 2194
+3  25 13445 8485
+3  10460 4424 1807
+3  1220 4536 1221
+3  5718 9078 5717
+3  15553 4915 9984
+3  3164 4396 3165
+3  4218 8753 1259
+3  2943 9370 3243
+3  1098 12393 1099
+3  12587 11859 3331
+3  5866 8479 2376
+3  8004 5391 5393
+3  9964 14033 6879
+3  6882 9964 6879
+3  12306 10268 3009
+3  10158 6784 9751
+3  14872 10307 10308
+3  8073 2218 2217
+3  9742 9741 11886
+3  2400 5065 11249
+3  465 464 7014
+3  5065 5064 11250
+3  11249 5065 11250
+3  12597 14261 6205
+3  13289 12275 5261
+3  15169 13289 5261
+3  704 3168 5843
+3  4898 1812 4899
+3  13104 13559 6479
+3  13104 6479 6478
+3  6876 9027 11243
+3  6876 11243 4343
+3  10756 4274 4273
+3  6071 10756 4273
+3  491 8323 492
+3  14849 14552 6751
+3  2350 2349 11699
+3  13316 10325 12604
+3  7742 13312 7743
+3  6756 6755 14224
+3  6076 310 307
+3  14873 8919 8922
+3  3958 3957 7437
+3  6611 2574 6612
+3  6724 4500 6725
+3  14871 11324 2482
+3  14871 2482 2481
+3  4434 14299 9053
+3  1783 6120 6299
+3  5285 5284 3439
+3  9148 9956 4368
+3  9021 12220 766
+3  9021 13648 12220
+3  7401 8930 7402
+3  7373 7375 14924
+3  13327 12486 11425
+3  12487 12486 13327
+3  13039 14220 3424
+3  6233 5982 5981
+3  368 9372 2569
+3  14209 14872 11286
+3  29 10149 32
+3  13355 3851 12772
+3  7647 2485 2484
+3  3276 10773 10771
+3  3276 10771 2891
+3  12074 2754 13498
+3  14879 741 2458
+3  3383 3385 4058
+3  7961 12051 7441
+3  3599 866 5734
+3  14278 9064 15249
+3  5685 13496 781
+3  7683 1070 13689
+3  1472 1474 413
+3  12510 11926 6658
+3  12408 10234 1969
+3  4501 1969 10234
+3  4157 620 1359
+3  9636 2887 2908
+3  9636 2908 13812
+3  7924 13697 15838
+3  14399 8902 15065
+3  2005 2007 10824
+3  105 723 106
+3  8531 723 105
+3  15382 9625 7495
+3  9198 8736 14144
+3  12296 354 12297
+3  11046 13929 4028
+3  11046 4028 4030
+3  11729 14609 2916
+3  6108 5054 7602
+3  6108 7602 1825
+3  14563 14562 11436
+3  5764 5765 12259
+3  5381 5472 5474
+3  12250 14849 12251
+3  9237 7319 855
+3  12676 13972 14221
+3  5688 10125 5689
+3  14253 2947 1332
+3  14253 1332 14254
+3  6502 6428 8537
+3  9299 3852 11117
+3  9502 12114 937
+3  12115 937 12114
+3  1331 5851 14833
+3  10160 5851 1331
+3  8630 8629 6211
+3  8132 6363 2786
+3  14989 12484 13851
+3  8858 2594 2593
+3  8858 2593 11664
+3  12142 11391 14888
+3  9683 3754 733
+3  902 1735 2912
+3  13090 3942 8343
+3  13090 8343 8345
+3  9166 8446 13371
+3  14395 13866 7790
+3  15247 7128 3277
+3  11711 7128 15247
+3  8398 8397 13359
+3  11835 10394 11642
+3  10016 15455 15291
+3  10015 15455 10016
+3  10525 5060 11333
+3  9362 3786 12521
+3  7652 7912 7653
+3  2446 7666 4700
+3  12469 7666 2446
+3  11319 15040 8685
+3  14269 6281 3670
+3  1024 12426 4374
+3  11103 12022 9601
+3  14369 6816 15164
+3  12079 15164 6816
+3  11455 8230 4728
+3  13379 4728 8230
+3  11224 9690 6602
+3  1853 10148 1854
+3  1553 1552 8742
+3  9221 6617 6618
+3  11728 6753 14609
+3  1726 1728 2327
+3  11303 6040 12153
+3  12161 3972 13934
+3  14558 14548 11771
+3  14558 15549 14548
+3  13657 11526 11525
+3  13468 6967 10890
+3  4071 12786 14698
+3  3428 2266 1268
+3  11524 7403 3131
+3  4693 2040 5081
+3  2933 10374 2934
+3  6105 8873 6106
+3  6105 13954 8873
+3  1574 11148 1575
+3  11743 8167 1214
+3  4652 7271 4650
+3  2354 9157 2355
+3  13645 12292 11373
+3  14607 1560 1562
+3  5863 5862 6851
+3  8564 11892 9606
+3  11742 11892 8564
+3  5088 3436 5598
+3  2100 2102 6716
+3  6974 2656 10006
+3  550 552 12375
+3  13846 4335 2282
+3  6969 4604 12500
+3  13998 13999 15302
+3  13786 13998 15302
+3  11264 9098 15092
+3  15422 6995 6997
+3  7246 15245 10199
+3  12486 11702 11425
+3  8510 15092 10443
+3  14835 6177 8228
+3  14835 12764 6177
+3  14027 4141 11321
+3  4942 12531 7913
+3  360 2640 14061
+3  360 2641 2640
+3  11129 10289 14305
+3  2638 14901 8319
+3  5079 5906 9747
+3  11239 4614 8691
+3  4377 4614 11239
+3  8153 2417 9506
+3  8154 8153 9506
+3  8768 11200 8769
+3  2435 9450 3656
+3  2435 3656 9313
+3  11245 12699 14878
+3  4038 1707 3721
+3  8132 2786 3913
+3  1330 9500 9361
+3  6714 6654 1999
+3  14423 3894 11762
+3  14398 525 7625
+3  4445 7362 2397
+3  9347 239 238
+3  548 2193 2195
+3  548 12627 2193
+3  11961 9411 15365
+3  5812 7505 5813
+3  2617 13042 9143
+3  15198 3619 3622
+3  10683 9055 9054
+3  10823 10639 13626
+3  4551 13626 10639
+3  1110 9733 3848
+3  10862 14278 15249
+3  12354 10862 15249
+3  13101 11505 12994
+3  9199 14144 14234
+3  572 13836 7176
+3  694 9424 14755
+3  12259 14467 888
+3  11858 709 4361
+3  11858 7991 709
+3  4445 2397 4446
+3  4860 6494 1985
+3  9650 9649 13833
+3  9814 10740 1699
+3  9814 1699 9815
+3  12299 8832 11591
+3  14714 11673 11671
+3  9607 13480 1352
+3  6909 14561 5108
+3  4499 11705 11653
+3  11281 11399 7361
+3  608 6593 7285
+3  3760 11467 9352
+3  10207 8840 5017
+3  14322 14686 9258
+3  14322 9258 14323
+3  11104 11103 9601
+3  13848 9451 9720
+3  13848 9720 117
+3  10246 7948 12410
+3  12570 8505 9825
+3  1579 4462 3280
+3  4292 5888 5889
+3  1819 113 8250
+3  1822 1819 8250
+3  12739 8980 10487
+3  10523 4816 10278
+3  5993 2845 11025
+3  3042 6327 6326
+3  8499 1570 1569
+3  8499 1569 8498
+3  11883 5192 5189
+3  15372 8140 7206
+3  3927 3078 645
+3  2689 6115 2278
+3  14670 14669 10785
+3  14378 1606 4760
+3  304 11372 305
+3  6399 3073 1950
+3  1952 6399 1950
+3  1010 9201 4096
+3  1113 12097 13471
+3  1532 13471 12097
+3  11226 15305 5515
+3  15544 12378 5089
+3  1335 7858 1336
+3  4129 5414 7551
+3  1050 11323 9008
+3  10155 6991 6990
+3  6632 11436 14562
+3  6632 14560 11436
+3  10244 6241 6240
+3  4808 2035 4809
+3  2525 14440 799
+3  1047 1045 1942
+3  11139 12137 12379
+3  7414 11775 11910
+3  7414 11910 15808
+3  10204 10205 10687
+3  13131 13132 1941
+3  6779 1941 13132
+3  13665 5933 10887
+3  3354 3515 13885
+3  9273 10678 9367
+3  10511 3109 5896
+3  2047 12162 2045
+3  6191 5912 2817
+3  6191 1874 5912
+3  7059 15133 15508
+3  6999 11850 7000
+3  12423 11850 6999
+3  10696 1234 1233
+3  922 8128 8127
+3  922 8127 15546
+3  8173 5568 5319
+3  1828 6525 6524
+3  11710 6525 1828
+3  3164 3768 3765
+3  3166 3768 3164
+3  10584 382 6813
+3  3260 10655 10269
+3  148 2205 12006
+3  11990 7256 13736
+3  10961 7256 11990
+3  2039 15382 7495
+3  306 305 8035
+3  1732 13483 1731
+3  5492 1731 13483
+3  4925 1337 4926
+3  6138 7028 12731
+3  8818 7952 7643
+3  8819 8818 7643
+3  2281 11392 2282
+3  12658 10196 1147
+3  12658 1147 12656
+3  14580 14096 8433
+3  14580 8433 2507
+3  8201 2538 2536
+3  9248 11244 11340
+3  3570 3435 3434
+3  2075 14255 7867
+3  11468 11289 11290
+3  14413 2564 14412
+3  9536 2584 13875
+3  11203 14854 8863
+3  13398 13345 4288
+3  13398 6328 13345
+3  8666 3334 3332
+3  2986 8666 3332
+3  2294 2293 14671
+3  2294 14671 11839
+3  2037 11809 1748
+3  8940 1683 11047
+3  12733 1081 12734
+3  11555 15355 5848
+3  5849 5848 15355
+3  10247 15359 10248
+3  6501 2430 2432
+3  13472 14581 12903
+3  14581 12904 12903
+3  12890 14760 6395
+3  9581 1201 8522
+3  8185 9213 10657
+3  5391 9213 8185
+3  9993 11226 13820
+3  1124 13233 5287
+3  12914 6709 2073
+3  7770 15498 11447
+3  1797 714 15056
+3  9088 11162 4727
+3  3417 12384 4587
+3  1160 12970 9903
+3  1258 11514 1259
+3  15089 8156 2248
+3  13497 6529 6528
+3  5770 13497 6528
+3  13497 14422 6529
+3  13787 697 13785
+3  14056 13785 697
+3  538 1827 539
+3  2809 13010 2217
+3  3957 6444 5001
+3  13295 13917 7408
+3  5945 4419 4605
+3  1881 11403 2423
+3  10364 15476 10365
+3  7043 15625 7572
+3  11918 15625 7043
+3  3546 3545 7821
+3  7963 3353 10469
+3  7963 13061 3353
+3  15837 1248 2646
+3  1249 2646 1248
+3  13255 799 798
+3  13255 798 10762
+3  6203 11778 6085
+3  704 3516 3168
+3  14123 5310 1620
+3  14123 1620 588
+3  11318 10850 7461
+3  14521 12403 1794
+3  11019 227 11405
+3  9541 5663 4306
+3  10135 3494 2789
+3  2549 4325 10314
+3  2549 10314 10316
+3  1467 6136 12661
+3  13563 12661 6136
+3  1383 6351 6350
+3  7330 7837 7331
+3  10678 10245 10109
+3  1888 2450 1889
+3  13273 4212 4211
+3  8030 14930 9295
+3  4985 4984 96
+3  576 11585 11174
+3  1798 7010 4215
+3  9480 13168 7117
+3  9997 8935 6513
+3  14440 6853 6852
+3  10057 10569 13528
+3  7625 525 919
+3  3323 2616 12905
+3  5930 5932 5020
+3  13819 8911 8910
+3  8513 8781 3358
+3  12969 12137 11139
+3  3546 10321 3544
+3  10137 3544 10321
+3  10220 9901 14647
+3  14895 6321 6320
+3  13288 6484 6483
+3  12833 8047 9626
+3  12832 8047 12833
+3  3816 2682 2681
+3  8778 9619 8779
+3  1307 14428 8805
+3  12253 1402 13828
+3  9487 1402 12253
+3  2547 4892 2548
+3  6113 6115 11348
+3  12587 12588 14677
+3  7759 5136 14955
+3  5138 14955 5136
+3  531 530 11796
+3  6942 21 20
+3  6942 2631 21
+3  10653 9197 9199
+3  6730 4569 4213
+3  13806 8242 13804
+3  2351 4750 15512
+3  2351 15512 2352
+3  5715 13713 9995
+3  3403 6970 8385
+3  7472 8291 14344
+3  8292 8291 7472
+3  14787 12294 13276
+3  14596 14701 8995
+3  5925 8045 8046
+3  5478 5477 5358
+3  5478 5358 5355
+3  3371 2379 2381
+3  9949 12958 7741
+3  8807 1541 1540
+3  6276 1551 1553
+3  9999 13600 10507
+3  3124 3126 7116
+3  1338 6772 2760
+3  13342 13343 8803
+3  7454 6630 3748
+3  6494 5456 4938
+3  12111 15098 11605
+3  12111 11605 4327
+3  11228 7485 3189
+3  4747 5857 4748
+3  9018 974 14521
+3  9110 11855 9111
+3  13091 6807 10010
+3  10816 4148 3989
+3  435 4148 10816
+3  12457 2937 9033
+3  12457 2938 2937
+3  10505 14 706
+3  2360 149 559
+3  5030 149 2360
+3  14294 13804 14454
+3  7784 8313 13419
+3  11265 11262 15480
+3  4441 5890 6871
+3  4441 5891 5890
+3  1264 12069 12068
+3  3936 6862 12262
+3  2779 12533 11356
+3  3225 3222 8660
+3  3225 8660 10304
+3  609 10828 10382
+3  5915 12939 679
+3  12059 13945 11668
+3  9650 11668 13945
+3  436 14818 8492
+3  12667 10662 10661
+3  4628 6538 8236
+3  12524 12523 10705
+3  7457 7351 7353
+3  14629 11855 523
+3  11836 11614 6156
+3  8608 7199 8997
+3  5860 4726 13391
+3  8282 8284 14883
+3  10764 10284 10283
+3  13697 7925 13698
+3  10658 4878 2800
+3  12242 14801 14800
+3  12242 14800 14799
+3  9138 9140 10852
+3  354 356 998
+3  9644 9171 5731
+3  6384 6383 13538
+3  5345 7372 5129
+3  9839 4388 4387
+3  2257 13418 11276
+3  4436 7367 4437
+3  10512 4162 5645
+3  3641 10345 9838
+3  9889 10130 9891
+3  4753 4755 7679
+3  12239 13882 12240
+3  15481 12240 13882
+3  1361 7674 14228
+3  15637 13597 13343
+3  15637 13343 12214
+3  11160 8495 13218
+3  13127 9953 1549
+3  8271 5196 5195
+3  8427 13925 14441
+3  10327 5091 14382
+3  14546 5091 10327
+3  6660 6662 573
+3  6419 12465 14689
+3  11692 6605 11625
+3  8393 4101 500
+3  4207 12904 5917
+3  11628 9819 9892
+3  11468 8400 11469
+3  14823 1969 1968
+3  7030 10061 11458
+3  5424 5728 5730
+3  7350 13906 7349
+3  11211 13239 11209
+3  7358 11525 2870
+3  4157 4156 6068
+3  15831 14636 13884
+3  15831 13884 15832
+3  15199 12542 4427
+3  12185 6410 101
+3  14218 14771 15230
+3  3805 12500 9876
+3  1848 10944 1849
+3  5925 1691 13409
+3  6292 13433 6293
+3  2152 4834 4833
+3  10548 2152 4833
+3  9614 9205 4464
+3  6693 10854 9848
+3  11314 14939 11315
+3  4078 665 664
+3  4078 848 665
+3  5749 9429 5750
+3  6906 4662 13570
+3  3238 3237 11004
+3  1508 7013 1509
+3  11903 11082 5620
+3  15057 9957 9949
+3  4299 9343 14788
+3  13907 6617 9221
+3  324 2854 7696
+3  324 7696 322
+3  12002 7405 2359
+3  8597 13201 8598
+3  14124 12969 14125
+3  7807 12406 4183
+3  15073 8030 8032
+3  10789 3186 13296
+3  10737 9369 10941
+3  10996 562 2124
+3  561 2124 562
+3  5877 14506 5878
+3  7616 3872 2883
+3  7376 8618 10729
+3  7376 10729 12355
+3  7591 8834 7592
+3  7322 15567 8259
+3  7726 15567 7322
+3  1156 4842 1157
+3  10374 12010 10375
+3  2607 9306 2608
+3  5129 3044 3043
+3  8512 7829 6802
+3  7847 8512 6802
+3  12469 9007 9006
+3  377 2907 12270
+3  1338 13332 10776
+3  12384 5700 13672
+3  15473 9639 9640
+3  13666 15473 9640
+3  10551 3870 3869
+3  8549 8223 8550
+3  13328 210 244
+3  2543 13611 6704
+3  8407 12283 11661
+3  6521 3486 9312
+3  9456 10428 9454
+3  13652 13773 13546
+3  13652 13546 1750
+3  10247 5726 15359
+3  7417 7976 7418
+3  4625 4624 13077
+3  12246 12245 11052
+3  2477 7459 1361
+3  3660 7667 3661
+3  5518 8540 8542
+3  5520 8540 5518
+3  4835 4834 12879
+3  8145 9942 1981
+3  1169 13579 5655
+3  477 1169 5655
+3  4828 9830 10299
+3  2521 13577 13704
+3  10174 2409 13334
+3  8284 14749 14883
+3  9800 3071 10741
+3  14961 2797 7100
+3  14064 6439 4136
+3  10763 9442 8531
+3  14253 13909 10675
+3  15313 14253 10675
+3  12500 4604 9876
+3  1701 4920 4278
+3  8884 5841 5833
+3  13137 14358 14306
+3  10670 14358 13137
+3  8645 11488 10202
+3  8645 940 11488
+3  10044 10045 14036
+3  11893 14511 4623
+3  11894 11893 4623
+3  10319 7618 7620
+3  10319 7080 7618
+3  11825 15479 4069
+3  14476 7181 4647
+3  10783 7352 12143
+3  10783 12143 4845
+3  7215 13515 7214
+3  8741 3608 2330
+3  15831 1177 13898
+3  14627 1177 15831
+3  11150 14250 14249
+3  3738 3829 11193
+3  4043 3459 5969
+3  9679 14572 14272
+3  7973 9679 14272
+3  1455 13709 1456
+3  14349 8388 8387
+3  9747 8388 14349
+3  641 27 26
+3  1976 12081 13527
+3  12082 13527 12081
+3  1525 7245 10152
+3  13761 12470 2473
+3  13689 9910 6885
+3  4357 9871 4358
+3  14045 11550 14046
+3  11551 11550 14045
+3  4744 11881 11882
+3  7567 5927 14122
+3  4126 14480 13061
+3  4126 13061 4127
+3  9371 10634 13495
+3  620 9085 621
+3  10285 5514 5513
+3  5579 8834 15398
+3  5455 8138 4937
+3  5834 5148 2076
+3  14728 5451 14729
+3  14728 5448 5451
+3  9190 9191 14689
+3  1231 10650 1232
+3  11738 1232 10650
+3  5851 10160 9215
+3  5852 5851 9215
+3  12228 2955 13237
+3  1943 1045 9606
+3  15317 15142 13093
+3  948 1520 8514
+3  7557 631 12298
+3  14010 10844 14011
+3  14532 10969 116
+3  11001 11003 14829
+3  596 9161 597
+3  1474 4336 9448
+3  12700 11635 14106
+3  7397 3185 10689
+3  5894 8141 13128
+3  9041 6037 6041
+3  5393 5392 9865
+3  5500 3100 14971
+3  14050 15122 13941
+3  9347 10067 9348
+3  8523 9418 9417
+3  5998 5997 6864
+3  15208 5613 8348
+3  2105 5613 15208
+3  10160 10159 13764
+3  10899 13187 14206
+3  9188 13187 10899
+3  10727 2044 14658
+3  2373 5968 11883
+3  7870 7214 11309
+3  4270 12154 11241
+3  6147 6146 14206
+3  1916 1915 10575
+3  1985 2429 1983
+3  2099 2827 8037
+3  2959 11070 6672
+3  4012 10037 6600
+3  14996 14956 12088
+3  14996 12088 12087
+3  8529 7107 7106
+3  15124 1442 4589
+3  10435 13064 10434
+3  5894 13128 12954
+3  14779 3461 14451
+3  1399 8381 1400
+3  15352 13260 13261
+3  14961 15352 13261
+3  2817 2816 8039
+3  7617 6883 637
+3  3986 3988 8055
+3  12815 5169 7278
+3  2158 3681 7242
+3  14362 4602 14361
+3  7633 12965 3545
+3  9599 11569 9868
+3  9599 9598 11569
+3  14998 5124 13309
+3  5125 5124 14998
+3  13139 13571 1312
+3  445 444 6777
+3  5313 3894 14423
+3  4127 13061 7963
+3  6065 10335 3253
+3  11565 5078 8268
+3  12623 15310 12823
+3  809 12976 7525
+3  9292 1917 6629
+3  1126 11976 1127
+3  1485 2059 1871
+3  8742 1552 11849
+3  8742 11849 8743
+3  9625 9624 7495
+3  11734 14120 14119
+3  4590 14177 4573
+3  12792 2381 2380
+3  8572 7474 8573
+3  14769 1915 15490
+3  1914 15490 1915
+3  14670 10785 11802
+3  1663 11802 10785
+3  15227 10152 5578
+3  12078 10152 15227
+3  1544 10403 557
+3  13045 1544 557
+3  6100 6099 12889
+3  11194 15152 11195
+3  7174 8427 8429
+3  7174 8429 5619
+3  2310 2309 3967
+3  10152 5398 1523
+3  9716 4886 10552
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/fin90_with_PCA_normals.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/fin90_with_PCA_normals.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/fin90_with_PCA_normals.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/fin90_with_PCA_normals.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/oni.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/oni.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/oni.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/oni.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_1k.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_1k.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_1k.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_1k.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_20k.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_20k.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_20k.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_20k.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_20k_normal.xyz b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_20k_normal.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/data/sphere_20k_normal.xyz
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/data/sphere_20k_normal.xyz
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp
new file mode 100644
index 0000000..8338457
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp
@@ -0,0 +1,80 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/edge_aware_upsample_point_set.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+
+#include <vector>
+#include <fstream>
+
+// types
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+
+// Point with normal vector stored in a std::pair.
+typedef std::pair<Point, Vector> PointVectorPair;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+int main(int argc, char* argv[])
+{
+  const char* input_filename = (argc>1)?argv[1]:"data/before_upsample.xyz";
+  const char* output_filename = (argc>2)?argv[2]:"data/before_upsample_UPSAMPLED.xyz";
+
+  // Reads a .xyz point set file in points[], *with normals*.
+  std::vector<PointVectorPair> points;
+  std::ifstream stream(input_filename);
+
+  if (!stream ||
+      !CGAL::read_xyz_points_and_normals(stream,
+                        std::back_inserter(points),
+                        CGAL::First_of_pair_property_map<PointVectorPair>(),
+                        CGAL::Second_of_pair_property_map<PointVectorPair>()))
+  {
+    std::cerr << "Error: cannot read file " << input_filename << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  //Algorithm parameters
+  const double sharpness_angle = 25;   // control sharpness of the result.
+  const double edge_sensitivity = 0;    // higher values will sample more points near the edges          
+  const double neighbor_radius = 0.25;  // initial size of neighborhood.
+  const std::size_t number_of_output_points = points.size() * 4;
+
+   //Run algorithm 
+  CGAL::edge_aware_upsample_point_set<Concurrency_tag>(
+            points.begin(), 
+            points.end(), 
+            std::back_inserter(points),
+            CGAL::First_of_pair_property_map<PointVectorPair>(),
+            CGAL::Second_of_pair_property_map<PointVectorPair>(),
+            sharpness_angle, 
+            edge_sensitivity,
+            neighbor_radius,
+            number_of_output_points);
+
+  // Saves point set.
+  std::ofstream out(output_filename);  
+
+  if (!out ||
+     !CGAL::write_xyz_points_and_normals(
+      out, points.begin(), points.end(), 
+      CGAL::First_of_pair_property_map<PointVectorPair>(),
+      CGAL::Second_of_pair_property_map<PointVectorPair>()))
+  {
+    return EXIT_FAILURE;
+  }
+
+  return EXIT_SUCCESS;
+}
+
+
+
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edges_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edges_example.cpp
new file mode 100644
index 0000000..afab79d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/edges_example.cpp
@@ -0,0 +1,58 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/vcm_estimate_edges.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_off_points.h>
+
+#include <utility> // defines std::pair
+#include <vector>
+#include <fstream>
+
+#include <boost/foreach.hpp>
+
+// Types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+// Point with normal vector stored in a std::pair.
+typedef std::pair<Point, Vector> PointVectorPair;
+typedef std::vector<PointVectorPair> PointList;
+
+typedef CGAL::cpp11::array<double,6> Covariance;
+
+int main (int , char**) {
+    // Reads a .xyz point set file in points[].
+    std::list<PointVectorPair> points;
+    std::ifstream stream("data/fandisk.off");
+    if (!stream ||
+        !CGAL::read_off_points(stream,
+                               std::back_inserter(points),
+                               CGAL::First_of_pair_property_map<PointVectorPair>()))
+    {
+        std::cerr << "Error: cannot read file data/fandisk.off" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    // Estimates covariance matrices per points.
+    double R = 0.2,
+           r = 0.1;
+    std::vector<Covariance> cov;
+    CGAL::First_of_pair_property_map<PointVectorPair> point_pmap;
+
+    CGAL::compute_vcm(points.begin(), points.end(), point_pmap, cov, R, r, Kernel());
+
+    // Find the points on the edges.
+    // Note that this step is not expensive and can be done several time to get better results
+    double threshold = 0.16;
+    std::ofstream output("points_on_edges.xyz");
+    int i = 0;
+    BOOST_FOREACH(const PointVectorPair& p, points)
+    {
+      if (CGAL::vcm_is_on_feature_edge(cov[i], threshold))
+          output << p.first << "\n";
+      ++i;
+    }
+
+    return 0;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/grid_simplification_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/grid_simplification_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/grid_simplification_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/grid_simplification_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/grid_simplify_indices.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/grid_simplify_indices.cpp
new file mode 100644
index 0000000..5f72af0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/grid_simplify_indices.cpp
@@ -0,0 +1,57 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/grid_simplify_point_set.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/property_map.h>
+
+#include <vector>
+#include <fstream>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+int main(int argc, char*argv[])
+{
+  // Reads a .xyz point set file in points[].
+  std::vector<Point> points;
+  std::vector<Vector> normals;
+  const char* fname = (argc>1)?argv[1]:"data/fin90_with_PCA_normals.xyz";
+  std::ifstream stream(fname);
+  Point p;
+  Vector v;
+  while(stream >> p >> v){
+    points.push_back(p);
+    normals.push_back(v);
+  } 
+
+  std::cout << points.size() << " input points" << std::endl;
+  std::vector<std::size_t> indices(points.size());
+  for(std::size_t i = 0; i < points.size(); ++i){
+    indices[i] = i;
+  }
+  // simplification by clustering using erase-remove idiom
+  double cell_size = 0.05;
+  std::vector<std::size_t>::iterator end;
+  end = CGAL::grid_simplify_point_set(indices.begin(), indices.end(), &(points[0]),cell_size);
+
+  std::size_t k = end - indices.begin();
+
+  std::cerr << "Keep " << k << " of " << indices.size() <<  "indices" << std::endl;
+
+  {
+    std::vector<Point> tmp_points(k);
+    std::vector<Vector> tmp_normals(k);
+    for(std::size_t i=0; i<k; ++i){
+      tmp_points[i] = points[indices[i]];
+      tmp_normals[i] = normals[indices[i]];
+    }
+    points.swap(tmp_points);
+    normals.swap(tmp_normals);
+  }
+
+  std::cout << points.size() << " points after the simplification" << std::endl;
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/hierarchy_simplification_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/hierarchy_simplification_example.cpp
new file mode 100644
index 0000000..beb2bb7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/hierarchy_simplification_example.cpp
@@ -0,0 +1,48 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/hierarchy_simplify_point_set.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <vector>
+#include <fstream>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+
+int main(int argc, char*argv[])
+{
+  // Reads a .xyz point set file in points[].
+  std::vector<Point> points;
+  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
+  std::ifstream stream(fname);
+  if (!stream ||
+      !CGAL::read_xyz_points(stream, std::back_inserter(points)))
+  {
+    std::cerr << "Error: cannot read file " << fname << std::endl;
+    return EXIT_FAILURE;
+  }
+  std::cout << "Read " << points.size () << " point(s)" << std::endl;
+
+  CGAL::Timer task_timer; task_timer.start();
+
+  // simplification by clustering using erase-remove idiom
+  points.erase (CGAL::hierarchy_simplify_point_set (points.begin (), points.end (),
+						    100, // Max cluster size
+						    0.01), // Max surface variation
+		points.end ());
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size();
+  
+  std::cout << points.size () << " point(s) kept, computed in "
+	    << task_timer.time() << " seconds, "
+	    << (memory>>20) << " Mib allocated." << std::endl;
+
+  std::ofstream f ("out.xyz");
+  CGAL::write_xyz_points (f, points.begin (), points.end ());
+  
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/jet_smoothing_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/jet_smoothing_example.cpp
new file mode 100644
index 0000000..eb50153
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/jet_smoothing_example.cpp
@@ -0,0 +1,38 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/jet_smooth_point_set.h>
+
+#include <vector>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+int main(void)
+{
+  // generate point set
+  std::vector<Point> points;
+  points.push_back(Point( 0.0, 0.0, 0.001));
+  points.push_back(Point(-0.1,-0.1, 0.002));
+  points.push_back(Point(-0.1,-0.2, 0.001));
+  points.push_back(Point(-0.1, 0.1, 0.002));
+  points.push_back(Point( 0.1,-0.1, 0.000));
+  points.push_back(Point( 0.1, 0.2, 0.001));
+  points.push_back(Point( 0.2, 0.0, 0.002));
+  points.push_back(Point( 0.2, 0.1, 0.000));
+  points.push_back(Point( 0.0,-0.1, 0.001));
+
+  // Smoothing.
+  const unsigned int nb_neighbors = 8; // default is 24 for real-life point sets
+  CGAL::jet_smooth_point_set<Concurrency_tag>(points.begin(), points.end(), nb_neighbors);
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/normal_estimation.cmd b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normal_estimation.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/normal_estimation.cmd
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/normal_estimation.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normal_estimation.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normal_estimation.cpp
new file mode 100644
index 0000000..886f10f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normal_estimation.cpp
@@ -0,0 +1,346 @@
+// normal_estimation.cpp
+
+//----------------------------------------------------------
+// Normal estimation:
+// Reads a point set, compute and orient its normals,
+// and save the point set.
+// Input file formats are .off, .xyz and .pwn.
+// Output file formats are .xyz and .pwn.
+//----------------------------------------------------------
+// normal_estimation file_in file_out [options]
+
+// CGAL
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Memory_sizer.h>
+#include <CGAL/Timer.h>
+
+// This package
+#include <CGAL/pca_estimate_normals.h>
+#include <CGAL/jet_estimate_normals.h>
+#include <CGAL/vcm_estimate_normals.h>
+#include <CGAL/mst_orient_normals.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_off_points.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+
+#include <utility> // defines std::pair
+#include <vector>
+#include <string>
+#include <fstream>
+#include <iostream>
+
+
+// ----------------------------------------------------------------------------
+// Types
+// ----------------------------------------------------------------------------
+
+// kernel
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+// Simple geometric types
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+// Point with normal vector stored in a std::pair.
+typedef std::pair<Point, Vector> PointVectorPair;
+typedef std::vector<PointVectorPair> PointList;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+
+// ----------------------------------------------------------------------------
+// Private functions
+// ----------------------------------------------------------------------------
+
+// Computes normals direction by Principal Component Analysis
+void run_pca_estimate_normals(PointList& points, // input points + output normals
+                              unsigned int nb_neighbors_pca_normals) // number of neighbors
+{
+  CGAL::Timer task_timer; task_timer.start();
+  std::cerr << "Estimates Normals Direction by PCA (k="
+            << nb_neighbors_pca_normals << ")...\n";
+
+  // Estimates normals direction.
+  // Note: pca_estimate_normals() requires an iterator over points
+  // as well as property maps to access each point's position and normal.
+  CGAL::pca_estimate_normals<Concurrency_tag>(points.begin(), points.end(),
+                             CGAL::First_of_pair_property_map<PointVectorPair>(),
+                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                             nb_neighbors_pca_normals);
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size();
+  std::cerr << "done: " << task_timer.time() << " seconds, "
+                        << (memory>>20) << " Mb allocated"
+                        << std::endl;
+}
+
+// Computes normals direction by Jet Fitting
+void run_jet_estimate_normals(PointList& points, // input points + output normals
+                              unsigned int nb_neighbors_jet_fitting_normals) // number of neighbors
+{
+  CGAL::Timer task_timer; task_timer.start();
+  std::cerr << "Estimates Normals Direction by Jet Fitting (k="
+            << nb_neighbors_jet_fitting_normals << ")...\n";
+
+  // Estimates normals direction.
+  // Note: jet_estimate_normals() requires an iterator over points
+  // + property maps to access each point's position and normal.
+  CGAL::jet_estimate_normals<Concurrency_tag>(points.begin(), points.end(),
+                             CGAL::First_of_pair_property_map<PointVectorPair>(),
+                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                             nb_neighbors_jet_fitting_normals);
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size();
+  std::cerr << "done: " << task_timer.time() << " seconds, "
+                        << (memory>>20) << " Mb allocated"
+                        << std::endl;
+}
+
+// Compute normals direction using the VCM
+void run_vcm_estimate_normals(PointList &points, // input points + output normals
+                              double R, // radius of the offset
+                              double r) { // radius used during the convolution
+    CGAL::Timer task_timer; task_timer.start();
+    std::cerr << "Estimates Normals Direction using VCM (R="
+        << R << " and r=" << r << ")...\n";
+
+  // Estimates normals direction.
+  // Note: vcm_estimate_normals() requires an iterator over points
+  // + property maps to access each point's position and normal.
+    CGAL::vcm_estimate_normals(points.begin(), points.end(),
+                               CGAL::First_of_pair_property_map<PointVectorPair>(),
+                               CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                               R,
+                               r);
+
+    std::size_t memory = CGAL::Memory_sizer().virtual_size();
+    std::cerr << "done: " << task_timer.time() << " seconds, "
+        << (memory>>20) << " Mb allocated"
+        << std::endl;
+
+}
+
+// Hoppe92 normal orientation using a Minimum Spanning Tree.
+void run_mst_orient_normals(PointList& points, // input points + input/output normals
+                            unsigned int nb_neighbors_mst) // number of neighbors
+{
+  std::cerr << "Orients Normals with a Minimum Spanning Tree (k="<< nb_neighbors_mst << ")...\n";
+  CGAL::Timer task_timer; task_timer.start();
+
+  // Orients normals.
+  // Note: mst_orient_normals() requires an iterator over points
+  // as well as property maps to access each point's position and normal.
+  PointList::iterator unoriented_points_begin =
+    CGAL::mst_orient_normals(points.begin(), points.end(),
+                             CGAL::First_of_pair_property_map<PointVectorPair>(),
+                             CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                             nb_neighbors_mst);
+
+  // Optional: delete points with an unoriented normal
+  // if you plan to call a reconstruction algorithm that expects oriented normals.
+  points.erase(unoriented_points_begin, points.end());
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size();
+  std::cerr << "done: " << task_timer.time() << " seconds, "
+                        << (memory>>20) << " Mb allocated"
+                        << std::endl;
+}
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "Normal estimation" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    // usage
+    if (argc-1 < 2)
+    {
+      std::cerr << "Reads a point set, compute and orient its normals,\n";
+      std::cerr << "and save the point set.\n";
+      std::cerr << "If the input mesh has normals, print the normals deviation.\n";
+      std::cerr << "\n";
+      std::cerr << "Usage: " << argv[0] << " file_in file_out [options]\n";
+      std::cerr << "Input file formats are .off, .xyz and .pwn.\n";
+      std::cerr << "Output file formats are .xyz and .pwn.\n";
+      std::cerr << "Options:\n";
+      std::cerr << "  -estimate plane|quadric|vcm          Estimates normals direction\n";
+      std::cerr << "  using a tangent plane or quadric or vcm (default=quadric)\n";
+      std::cerr << "  -nb_neighbors_pca <int>              Number of neighbors\n";
+      std::cerr << "  to compute tangent plane (default=18)\n";
+      std::cerr << "  -nb_neighbors_jet_fitting <int>      Number of neighbors\n";
+      std::cerr << "  to compute quadric (default=18)\n";
+      std::cerr << "  -offset_radius_vcm <double>           Offset radius\n";
+      std::cerr << "  to compute VCM (default=0.1)\n";
+      std::cerr << "  -convolve_radius_vcm <double>         Convolve radius\n";
+      std::cerr << "  to compute VCM (default=0)\n";
+      std::cerr << "  -orient MST                          Orient normals\n";
+      std::cerr << "  using a Minimum Spanning Tree (default=MST)\n";
+      std::cerr << "  -nb_neighbors_mst <int>              Number of neighbors\n";
+      std::cerr << "  to compute the MST (default=18)\n";
+      return EXIT_FAILURE;
+    }
+
+    // Normals Computing options
+    unsigned int nb_neighbors_pca_normals = 18; // K-nearest neighbors = 3 rings (estimate normals by PCA)
+    unsigned int nb_neighbors_jet_fitting_normals = 18; // K-nearest neighbors (estimate normals by Jet Fitting)
+    unsigned int nb_neighbors_mst = 18; // K-nearest neighbors (orient normals by MST)
+    double offset_radius_vcm = 0.1; // Offset radius (estimate normals by VCM)
+    double convolve_radius_vcm = 0; // Convolve radius (estimate normals by VCM)
+    std::string estimate = "quadric"; // estimate normals by jet fitting
+    std::string orient = "MST"; // orient normals using a Minimum Spanning Tree
+
+    // decode parameters
+    std::string input_filename  = argv[1];
+    std::string output_filename = argv[2];
+    for (int i=3; i+1<argc ; ++i)
+    {
+      if (std::string(argv[i])=="-estimate") {
+        estimate = argv[++i];
+        if (estimate != "plane" && estimate != "quadric" && estimate != "vcm")
+          std::cerr << "invalid option " << argv[i] << "\n";
+      }
+      else if (std::string(argv[i])=="-nb_neighbors_pca") {
+        nb_neighbors_pca_normals = atoi(argv[++i]);
+      }
+      else if (std::string(argv[i])=="-nb_neighbors_jet_fitting") {
+        nb_neighbors_jet_fitting_normals = atoi(argv[++i]);
+      }
+      else if (std::string(argv[i])=="-offset_radius_vcm") {
+          offset_radius_vcm = atof(argv[++i]);
+      }
+      else if (std::string(argv[i])=="-convolve_radius_vcm") {
+          convolve_radius_vcm = atof(argv[++i]);
+      }
+      else if (std::string(argv[i])=="-orient") {
+        orient = argv[++i];
+        if (orient != "MST")
+          std::cerr << "invalid option " << argv[i] << "\n";
+      }
+      else if (std::string(argv[i])=="-nb_neighbors_mst") {
+        nb_neighbors_mst = atoi(argv[++i]);
+      }
+      else {
+        std::cerr << "invalid option " << argv[i] << "\n";
+      }
+    }
+
+    // Accumulated errors
+    int accumulated_fatal_err = EXIT_SUCCESS;
+
+    CGAL::Timer task_timer; task_timer.start();
+
+    //***************************************
+    // Loads point set
+    //***************************************
+
+    // Reads a .off or .xyz point set file in points[].
+    PointList points;
+    std::cerr << "Open " << input_filename << " for reading..." << std::endl;
+
+    // If OFF file format
+    bool success = false;
+    std::string extension = input_filename.substr(input_filename.find_last_of('.'));
+    if (extension == ".off" || extension == ".OFF")
+    {
+      std::ifstream stream(input_filename.c_str());
+      success = stream &&
+                CGAL::read_off_points(stream,
+                                      std::back_inserter(points),
+                                      CGAL::First_of_pair_property_map<PointVectorPair>());
+    }
+    // If XYZ file format
+    else if (extension == ".xyz" || extension == ".XYZ" ||
+             extension == ".pwn" || extension == ".PWN")
+    {
+      std::ifstream stream(input_filename.c_str());
+      success = stream &&
+                CGAL::read_xyz_points(stream,
+                                      std::back_inserter(points),
+                                      CGAL::First_of_pair_property_map<PointVectorPair>());
+    }
+    if (!success)
+    {
+      std::cerr << "Error: cannot read file " << input_filename << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Prints status
+    std::size_t nb_points = points.size();
+    std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
+                                                         << task_timer.time() << " seconds"
+                                                         << std::endl;
+    task_timer.reset();
+
+    //***************************************
+    // Check requirements
+    //***************************************
+
+    if (nb_points == 0)
+    {
+      std::cerr << "Error: empty file" << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Computes normals
+    //***************************************
+
+    // Estimates normals direction.
+    if (estimate == "plane")
+      run_pca_estimate_normals(points, nb_neighbors_pca_normals);
+    else if (estimate == "quadric")
+      run_jet_estimate_normals(points, nb_neighbors_jet_fitting_normals);
+    else if (estimate == "vcm")
+      run_vcm_estimate_normals(points, offset_radius_vcm, convolve_radius_vcm);
+
+    // Orient normals.
+    if (orient == "MST")
+      run_mst_orient_normals(points, nb_neighbors_mst);
+
+    //***************************************
+    // Saves the point set
+    //***************************************
+
+    std::cerr << "Write file " << output_filename << std::endl << std::endl;
+
+    // If XYZ file format
+    /*std::string*/ extension = output_filename.substr(output_filename.find_last_of('.'));
+    if (extension == ".xyz" || extension == ".XYZ" ||
+        extension == ".pwn" || extension == ".PWN")
+    {
+      std::ofstream stream(output_filename.c_str());
+      if (!stream ||
+          !CGAL::write_xyz_points_and_normals(stream,
+                                              points.begin(), points.end(),
+                                              CGAL::First_of_pair_property_map<PointVectorPair>(),
+                                              CGAL::Second_of_pair_property_map<PointVectorPair>()))
+      {
+        std::cerr << "Error: cannot write file " << output_filename << std::endl;
+        return EXIT_FAILURE;
+      }
+    }
+    else
+    {
+        std::cerr << "Error: cannot write file " << output_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    // Returns accumulated fatal error
+    std::cerr << "Tool returned " << accumulated_fatal_err << std::endl;
+    return accumulated_fatal_err;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normals_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normals_example.cpp
new file mode 100644
index 0000000..7032932
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/normals_example.cpp
@@ -0,0 +1,65 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/pca_estimate_normals.h>
+#include <CGAL/mst_orient_normals.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_xyz_points.h>
+
+#include <utility> // defines std::pair
+#include <list>
+#include <fstream>
+
+// Types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+// Point with normal vector stored in a std::pair.
+typedef std::pair<Point, Vector> PointVectorPair;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/sphere_1k.xyz";
+    // Reads a .xyz point set file in points[].
+    std::list<PointVectorPair> points;
+    std::ifstream stream(fname);
+    if (!stream ||
+        !CGAL::read_xyz_points(stream,
+                               std::back_inserter(points),
+                               CGAL::First_of_pair_property_map<PointVectorPair>()))
+    {
+      std::cerr << "Error: cannot read file " << fname<< std::endl;
+        return EXIT_FAILURE;
+    }
+
+    // Estimates normals direction.
+    // Note: pca_estimate_normals() requires an iterator over points
+    // as well as property maps to access each point's position and normal.
+    const int nb_neighbors = 18; // K-nearest neighbors = 3 rings
+    CGAL::pca_estimate_normals<Concurrency_tag>(points.begin(), points.end(),
+                               CGAL::First_of_pair_property_map<PointVectorPair>(),
+                               CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                               nb_neighbors);
+
+    // Orients normals.
+    // Note: mst_orient_normals() requires an iterator over points
+    // as well as property maps to access each point's position and normal.
+    std::list<PointVectorPair>::iterator unoriented_points_begin =
+      CGAL::mst_orient_normals(points.begin(), points.end(),
+                                 CGAL::First_of_pair_property_map<PointVectorPair>(),
+                                 CGAL::Second_of_pair_property_map<PointVectorPair>(),
+                                 nb_neighbors);
+
+    // Optional: delete points with an unoriented normal
+    // if you plan to call a reconstruction algorithm that expects oriented normals.
+    points.erase(unoriented_points_begin, points.end());
+
+    return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Point_set_processing_3/property_map.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/property_map.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Point_set_processing_3/property_map.cpp
rename to 3rdparty/CGAL-4.8/examples/Point_set_processing_3/property_map.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/random_simplification_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/random_simplification_example.cpp
new file mode 100644
index 0000000..7b2f3e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/random_simplification_example.cpp
@@ -0,0 +1,49 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/random_simplify_point_set.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
+  // Reads a .xyz point set file in points[].
+  std::vector<Point> points;
+  std::ifstream stream(fname);
+  if (!stream ||
+      !CGAL::read_xyz_points(stream, std::back_inserter(points)))
+  {
+    std::cerr << "Error: cannot read file " << fname << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  // Randomly simplifies using erase-remove idiom
+  const double removed_percentage = 97.0; // percentage of points to remove
+  points.erase(CGAL::random_simplify_point_set(points.begin(), points.end(), removed_percentage),
+               points.end());
+
+  // Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
+  std::vector<Point>(points).swap(points);
+
+  // Saves point set.
+  // Note: write_xyz_points_and_normals() requires an output iterator
+  // over points as well as property maps to access each
+  // point position and normal.
+  std::ofstream out((argc>2)?argv[2]:"Three_lady_copy.xyz");
+  if (!out ||
+	  !CGAL::write_xyz_points(
+	  out, points.begin(), points.end()))
+  {
+	  return EXIT_FAILURE;
+  }
+
+  return EXIT_SUCCESS;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp
new file mode 100644
index 0000000..688b897
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp
@@ -0,0 +1,53 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+
+#include <utility> // defines std::pair
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+
+// Point with normal vector stored as a std::pair.
+typedef std::pair<Point, Vector> Pwn;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
+    // Reads a .xyz point set file in points[].
+    // Note: read_xyz_points_and_normals() requires an output iterator
+    // over points and as well as property maps to access each
+    // point position and normal.
+    std::vector<Pwn> points;
+    std::ifstream in(fname);
+    if (!in ||
+        !CGAL::read_xyz_points_and_normals(
+            in,std::back_inserter(points),
+            CGAL::First_of_pair_property_map<Pwn>(),
+            CGAL::Second_of_pair_property_map<Pwn>()))
+    {
+      std::cerr << "Error: cannot read file " << fname << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Saves point set.
+    // Note: write_xyz_points_and_normals() requires an output iterator
+    // over points as well as property maps to access each
+    // point position and normal.
+    std::ofstream out("oni_copy.xyz");
+    if (!out ||
+        !CGAL::write_xyz_points_and_normals(
+            out, points.begin(), points.end(),
+            CGAL::First_of_pair_property_map<Pwn>(),
+            CGAL::Second_of_pair_property_map<Pwn>()))
+    {
+      return EXIT_FAILURE;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/remove_outliers_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/remove_outliers_example.cpp
new file mode 100644
index 0000000..88b2b10
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/remove_outliers_example.cpp
@@ -0,0 +1,42 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/property_map.h>
+#include <CGAL/remove_outliers.h>
+#include <CGAL/IO/read_xyz_points.h>
+
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+// types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+
+int main(int argc, char*argv[])
+{
+  const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
+  // Reads a .xyz point set file in points[].
+  // The Identity_property_map property map can be omitted here as it is the default value.
+  std::vector<Point> points;
+  std::ifstream stream(fname);
+  if (!stream ||
+      !CGAL::read_xyz_points(stream, std::back_inserter(points),
+                             CGAL::Identity_property_map<Point>()))
+  {
+    std::cerr << "Error: cannot read file " << fname << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  // Removes outliers using erase-remove idiom.
+  // The Identity_property_map property map can be omitted here as it is the default value.
+  const double removed_percentage = 5.0; // percentage of points to remove
+  const int nb_neighbors = 24; // considers 24 nearest neighbor points
+  points.erase(CGAL::remove_outliers(points.begin(), points.end(),
+                                     CGAL::Identity_property_map<Point>(),
+                                     nb_neighbors, removed_percentage), 
+               points.end());
+
+  // Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
+  std::vector<Point>(points).swap(points);
+
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp
new file mode 100644
index 0000000..2375ec6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp
@@ -0,0 +1,64 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/wlop_simplify_and_regularize_point_set.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/IO/write_xyz_points.h>
+
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+// types
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point;
+
+// Concurrency
+#ifdef CGAL_LINKED_WITH_TBB
+typedef CGAL::Parallel_tag Concurrency_tag;
+#else
+typedef CGAL::Sequential_tag Concurrency_tag;
+#endif
+
+int main(int argc, char** argv)
+{
+  const char* input_filename = (argc>1)?argv[1]:"data/sphere_20k.xyz";
+  const char* output_filename = (argc>2)?argv[2]:"data/sphere_20k_WLOPED.xyz";
+
+  // Reads a .xyz point set file in points[]
+  std::vector<Point> points;
+  std::ifstream stream(input_filename);
+
+  if (!stream || !CGAL::read_xyz_points(stream, std::back_inserter(points)))
+  {
+    std::cerr << "Error: cannot read file " << input_filename  << std::endl;
+
+    return EXIT_FAILURE;
+  }
+
+  std::vector<Point> output;
+
+  //parameters
+  const double retain_percentage = 2;   // percentage of points to retain.
+  const double neighbor_radius = 0.5;   // neighbors size.
+
+  CGAL::wlop_simplify_and_regularize_point_set
+                          <Concurrency_tag>
+                          (points.begin(), 
+                           points.end(),
+                           std::back_inserter(output),
+                           retain_percentage,
+                           neighbor_radius
+                           );
+  
+  std::ofstream out(output_filename);
+  if (!out || !CGAL::write_xyz_points(
+      out, output.begin(), output.end()))
+  {
+    return EXIT_FAILURE;
+  }
+
+  return EXIT_SUCCESS;
+}
+
+
+
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/CMakeLists.txt
new file mode 100644
index 0000000..6e1d154
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Point_set_shape_detection_3_example )
+
+cmake_minimum_required(VERSION 2.6.2)
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
+  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
+    cmake_policy(VERSION 2.8.4)
+  else()
+    cmake_policy(VERSION 2.6)
+  endif()
+endif()
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "efficient_RANSAC_basic.cpp" )
+  create_single_source_cgal_program( "efficient_RANSAC_custom_shape.cpp" )
+  create_single_source_cgal_program( "efficient_RANSAC_parameters.cpp" )
+  create_single_source_cgal_program( "efficient_RANSAC_point_access.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/data/cube.pwn b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/data/cube.pwn
new file mode 100644
index 0000000..081dcd1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/data/cube.pwn
@@ -0,0 +1,50000 @@
+-0.175308 0.371795 0.209773 0 1 0
+-0.141154 -0.363152 0.201209 0.990799 -0.133193 -0.023999
+0.5 0.0441081 0.196315 1 0 0
+0.08936 -0.0774271 0.320513 0 0 1
+-0.290057 -0.297095 -0.371795 0 0 1
+0.448718 -0.36392 0.0547574 0.976736 -0.213449 -0.0206468
+-0.182599 -0.0370015 -0.333333 0 0 1
+0.5 -0.00285131 0.0869351 1 0 0
+-0.0989006 -0.294872 0.249767 0 1 0
+-0.0789977 0.371795 0.140704 0 1 0
+-0.141154 -0.36179 0.308 0.997682 -0.0674773 0.00881441
+0.430612 0.294872 -0.198977 0 1 0
+-0.308641 -0.292294 0.320513 0 0 1
+-0.320626 0.113088 -0.371795 -0.529254 0.104864 0.841958
+0.268815 -0.0524244 0.371795 0 0 1
+-0.47068 0.328755 0.320513 0 0 1
+0.193989 0.0107743 -0.0787523 0.964406 -0.26416 -0.0118578
+0.293993 0.143009 -0.333333 0 0 1
+-0.193447 0.0682159 0.349761 0.92746 -0.373864 -0.00660013
+-0.300249 -0.371795 -0.0252303 0 1 0
+-0.120317 0.371795 -0.237095 0 1 0
+0.43857 -0.341214 0.320513 0 0 1
+-0.5 -0.265252 -0.3565 1 0 0
+-0.482807 -0.169107 0.320513 0 0 1
+-0.5 0.106203 0.0955505 1 0 0
+0.5 -0.260753 0.0349716 1 0 0
+-0.308374 0.270759 0.320513 0 0 1
+-0.121341 -0.294872 0.102386 0 1 0
+-0.142553 -0.161556 0.371795 0.0235089 0.0135376 0.999632
+0.141109 -0.367806 0.0700695 0.971509 0.232341 0.0467667
+-0.49762 -0.294872 0.247568 0.759435 0.649029 0.0449486
+0.5 0.283134 -0.194903 1 0 0
+-0.496587 0.371795 0.211573 -0.486287 0.842689 -0.231086
+0.5 -0.0638011 -0.222696 1 0 0
+0.476264 -0.13706 0.320513 0 0 1
+-0.270564 -0.0174098 -0.280647 0.90856 0.417558 -0.0128257
+0.462212 -0.294872 -0.18191 0 1 0
+-0.444893 0.237314 0.320513 0 0 1
+0.487468 -0.294872 0.30666 0 1 0
+0.0872504 0.280378 0.320513 0 0 1
+-0.267977 0.371795 0.222768 0 1 0
+-0.5 -0.0492109 0.297311 1 0 0
+-0.121073 0.371795 0.301548 0 1 0
+0.00485881 0.371795 -0.355845 0 1 0
+-0.5 -0.241845 -0.0952188 1 0 0
+-0.176704 0.175022 0.371795 0 0 1
+-0.448718 -0.353033 -0.32061 1 0 0
+0.15669 0.0653235 0.320513 0 0 1
+-0.366841 0.0916801 0.343718 0.936946 -0.349475 0
+0.494107 -0.294872 -0.102009 -0.290637 0.956804 0.00745479
+-0.42243 -0.290286 0.320513 0 0 1
+-0.270966 -0.332976 0.320513 0 0 1
+0.274714 0.184192 0.371795 0 0 1
+-0.0665744 0.371795 0.229323 0 1 0
+-0.5 0.277703 -0.284327 1 0 0
+0.367067 0.0983783 -0.371795 0 0 1
+0.246213 0.294872 -0.0862662 0 1 0
+-0.389174 0.190686 -0.371795 0 0 1
+-0.236716 -0.242262 0.320513 0 0 1
+-0.460261 -0.253533 0.320513 0 0 1
+-0.21754 -0.041411 -0.141795 -0.30894 0.951011 0.0115509
+0.136664 -0.294872 -0.214021 0.382757 0.919096 -0.0935953
+0.0757205 -0.294872 0.311042 -0.00443723 0.999961 -0.00761507
+-0.5 -0.119719 -0.251617 1 0 0
+-0.228819 -0.371795 -0.324266 0 1 0
+-0.104791 -0.226121 -0.333333 -0.0777123 -0.262883 0.961693
+-0.330813 -0.175801 -0.371795 0 0 1
+0.141109 -0.318863 -0.119759 1 0 0
+-0.0945738 -0.294872 -0.289467 0 1 0
+-0.392673 0.173262 -0.371795 0 0 1
+-0.274307 -0.000595314 -0.227503 0.999135 0.0326483 0.025744
+-0.5 0.335507 -0.16173 1 0 0
+-0.0368013 0.35182 -0.371795 0 0 1
+0.5 -0.228689 0.0165172 1 0 0
+0.306936 -0.164799 -0.333333 0 0 1
+-0.0851371 -0.294872 0.0156446 0 1 0
+0.437007 -0.164712 0.320513 0 0 1
+0.0178559 0.256282 0.346814 0 1 0
+-0.5 -0.0024875 -0.0316024 1 0 0
+-0.035111 0.371795 -0.370603 -0.129395 0.768687 -0.6264
+0.462376 -0.294872 -0.106268 0 1 0
+-0.5 -0.224917 0.162628 1 0 0
+0.209725 -0.0320387 -0.302206 0.551405 0.834042 -0.0180435
+0.371777 -0.21818 -0.371795 0 0 1
+0.5 0.111261 -0.143062 1 0 0
+-0.5 -0.124921 -0.243749 1 0 0
+-0.484996 0.185733 -0.371795 0 0 1
+-0.5 0.190558 0.245983 1 0 0
+0.172253 -0.17794 0.371795 0 0 1
+0.334944 0.294872 0.000474903 0 1 0
+-0.5 0.328379 0.000398196 1 0 0
+-0.121135 -0.199446 -0.333333 0 0 1
+0.5 0.284786 0.0794085 0.986496 0.15539 -0.0517558
+0.150325 0.230897 -0.347127 0 1 0
+0.362063 0.294872 -0.0146486 0 1 0
+0.0150047 0.371795 0.183972 0 1 0
+0.5 -0.0349558 0.0139484 1 0 0
+-0.113136 0.371795 -0.0560379 0 1 0
+-0.0297842 0.371795 -0.13097 0 1 0
+-0.323207 -0.365705 0.320513 0 0 1
+0.165816 0.294872 0.249865 0 1 0
+0.00514397 0.371795 -0.178136 0 1 0
+-0.5 -0.140524 -0.0723453 1 0 0
+0.31526 0.174459 0.367333 0.5989 0.688046 0.409769
+0.5 0.0899173 0.202437 1 0 0
+-0.5 0.183375 0.0429166 1 0 0
+0.0885291 -0.160963 0.320513 0 0 1
+0.5 0.0890126 0.13143 1 0 0
+-0.5 -0.0222531 -0.00632244 1 0 0
+0.0358362 -0.294872 -0.0401928 0 1 0
+-0.308306 -0.195151 -0.368266 0.823122 0.550572 -0.13907
+-0.5 0.152461 -0.144486 1 0 0
+-0.483325 0.371795 0.19782 0 1 0
+0.435004 -0.240747 -0.371795 0 0 1
+0.216551 -0.371795 0.156357 0 1 0
+0.494796 -0.144366 -0.371795 -0.355461 0.000921565 0.934691
+-0.296072 -0.293859 0.320513 0 0 1
+0.5 0.146538 0.162965 1 0 0
+-0.5 -0.259356 -0.208807 1 0 0
+-0.248912 0.371795 0.023256 0 1 0
+0.362519 -0.371795 -0.0767839 0 1 0
+0.291357 0.144699 -0.333333 0 0 1
+0.5 -0.0388215 -0.295793 1 0 0
+0.5 0.0123891 -0.184128 1 0 0
+0.160462 -0.0760716 0.320513 0 0 1
+0.208588 0.126871 0.371795 0 0 1
+0.0123203 -0.294872 0.268433 0 1 0
+0.448718 -0.344588 0.193528 1 0 0
+0.0505319 0.0445833 0.320513 0 0 1
+-0.290081 0.371795 0.111984 0 1 0
+0.46905 0.294872 -0.285648 0 1 0
+0.141026 0.309242 0.196576 1 0 0
+-0.0270338 0.371795 -0.105464 0 1 0
+-0.5 0.330624 -0.173384 1 0 0
+0.141109 -0.353314 -0.18833 1 0 0
+0.463944 0.294872 0.0284453 0 1 0
+0.146369 0.229495 -0.333333 -0.115678 0.942117 0.314698
+-0.0805013 -0.294872 -0.246948 0 1 0
+-0.0476432 -0.294872 -0.163905 0 1 0
+0.133821 -0.108862 -0.333333 0 0 1
+0.5 0.134295 0.179942 1 0 0
+0.0255239 -0.256282 0.356508 0 1 0
+0.478305 -0.294872 0.113852 0 1 0
+0.5 0.202333 -0.364662 0.988697 0.0527554 -0.140339
+-0.106445 -0.294872 -0.267222 0 1 0
+0.277142 -0.0168969 0.371795 0 0 1
+-0.0877995 0.230897 -0.356218 0 1 0
+0.5 -0.0665353 0.320198 0.891738 0.0278387 0.451694
+0.101581 0.230897 -0.36849 -0.0218704 0.948864 0.314926
+0.5 -0.131363 0.230693 1 0 0
+0.00150959 -0.294872 0.085344 0 1 0
+0.365084 -0.31491 -0.371795 0 0 1
+-0.0599326 -0.294872 -0.36245 0.00255378 0.999921 0.0123288
+-0.00313806 0.371795 0.201332 0 1 0
+0.0436869 0.371795 -0.344728 0 1 0
+-0.217619 -0.0368248 0.371795 0 0 1
+0.12872 0.371795 0.0332511 0 1 0
+0.5 0.195729 -0.3572 1 0 0
+0.286021 -0.231045 -0.371795 0.019822 -0.04702 0.998697
+-0.17528 -0.371795 -0.181953 0 1 0
+-0.276823 -0.0184489 0.371795 0 0 1
+-0.0210858 -0.141521 0.320513 0 0 1
+0.0391543 -0.0233289 -0.333333 0 0 1
+0.164271 -0.188425 -0.333333 0 0 1
+-0.276471 0.371795 0.155631 0 1 0
+-0.273136 -0.371795 -0.208608 0 1 0
+0.401803 0.294872 0.313761 -0.0619489 0.963275 0.261272
+-0.201819 0.314401 -0.371795 0 0 1
+-0.364571 -0.0116137 -0.371795 0 0 1
+-0.292703 -0.371795 0.13122 0 1 0
+-0.188157 0.0087436 -0.139289 0.982494 0.186227 -0.00495783
+0.186394 -0.371795 0.218918 0 1 0
+0.320869 0.169944 0.320513 0.391186 0.593493 0.703377
+-0.139802 -0.294872 -0.157241 -0.614096 0.78543 -0.0773694
+0.5 -0.0140288 0.183937 1 0 0
+0.5 0.256593 -0.0627829 1 0 0
+-0.5 -0.247006 -0.247507 1 0 0
+0.225823 0.0380287 -0.126955 -0.129822 0.991253 0.02373
+0.0880292 -0.102856 -0.333333 0 0 1
+-0.468618 -0.214206 0.320513 0 0 1
+-0.468748 0.298285 0.320513 0 0 1
+0.5 0.0952033 -0.0105031 1 0 0
+-0.0152632 -0.0673939 -0.333333 0 0 1
+0.5 -0.109417 0.0137275 1 0 0
+-0.320204 -0.371795 -0.0610345 0 1 0
+-0.5 0.315763 0.268086 1 0 0
+-0.236999 0.351379 0.320513 0 0 1
+-0.327184 -0.160757 0.339609 0.800553 0.599261 0
+0.426572 -0.261768 0.320513 0 0 1
+-0.349579 -0.371795 -0.245921 0 1 0
+-0.5 -0.145304 -0.357307 1 0 0
+0.5 -0.201624 -0.081307 1 0 0
+-0.5 0.147221 -0.200287 1 0 0
+0.107855 -0.0251765 0.320513 0 0 1
+-0.141154 -0.323589 -0.274093 1 0 0
+-0.186285 0.371795 -0.270683 0 1 0
+0.276491 -0.23532 0.320513 0 0 1
+0.141466 -0.105679 -0.333333 0 0 1
+0.0315621 -0.294872 0.052192 0 1 0
+-0.5 -0.158644 0.204824 1 0 0
+-0.414271 0.371795 -0.0151055 0 1 0
+0.233403 -0.233594 0.353612 -0.40761 0.913004 -0.0166887
+-0.0873689 -0.18386 0.320513 0.391982 0.683726 0.615523
+0.5 -0.0375905 0.199254 1 0 0
+-0.206671 -0.371795 -0.0548458 0 1 0
+0.288516 -0.371795 -0.264604 0 1 0
+0.38256 0.0962436 0.320513 0 0 1
+0.00883953 0.371795 0.314327 0.047772 0.995533 0.0814357
+-0.00200517 -0.26281 -0.371795 0 0 1
+0.368666 0.111883 -0.371795 0 0 1
+0.392745 -0.371795 0.0411448 0 1 0
+-0.438487 0.0670388 0.320513 0 0 1
+0.4303 -0.269496 -0.371795 0 0 1
+-0.5 0.134938 -0.361558 1 0 0
+0.164044 0.0640007 0.320513 0 0 1
+0.361551 0.282859 0.320513 0 0 1
+0.5 -0.0861703 -0.350478 1 0 0
+0.42928 0.0271483 -0.371795 0 0 1
+0.219281 -0.371795 -0.343597 0 1 0
+0.5 -0.162347 0.0788819 1 0 0
+0.5 0.153668 0.135941 1 0 0
+-0.332076 0.371795 -0.199417 0 1 0
+0.240659 0.192975 0.371795 0 0 1
+0.141026 0.335639 -0.245957 1 0 0
+-0.266923 0.371795 -0.0180394 0 1 0
+0.0583704 0.308254 0.320513 0 0 1
+0.5 -0.267027 0.159861 1 0 0
+-0.5 0.0406111 0.306232 1 0 0
+0.318205 0.171582 -0.346483 0.969766 0.244004 0.00402977
+-0.287887 -0.0407964 -0.333333 0 0 1
+-0.0395141 0.371795 -0.0882759 0 1 0
+-0.5 0.0659407 0.172527 1 0 0
+-0.367747 0.371795 0.303047 0 1 0
+-0.283307 0.371795 -0.292959 0 1 0
+-0.260425 0.217071 0.371795 -0.21119 0.517291 0.829343
+-0.364695 -0.0900085 0.371795 -0.659878 -0.213971 0.720262
+0.392792 0.294872 0.203428 0 1 0
+0.00918205 -0.0218745 -0.333333 0 0 1
+0.141026 0.320427 0.0886891 1 0 0
+-0.107873 -0.294872 0.135653 0 1 0
+0.194401 -0.0123114 -0.021749 0.931359 0.364095 -0.00214326
+-0.5 -0.0740112 0.293544 1 0 0
+0.369807 0.294872 0.0397171 0 1 0
+0.306096 0.294872 -0.292799 0 1 0
+-0.407426 -0.371795 -0.29985 0 1 0
+0.5 -0.124137 -0.050351 1 0 0
+-0.133524 0.371795 -0.0655704 0 1 0
+-0.399205 -0.314748 0.320513 0 0 1
+-0.107508 0.339185 -0.371795 0 0 1
+0.141109 -0.349436 0.0843835 1 0 0
+0.472117 0.294872 0.230566 0 1 0
+-0.204904 0.297632 -0.371795 0 0 1
+-0.5 0.0625565 -0.0917705 1 0 0
+0.390393 0.197842 0.320513 0 0 1
+-0.5 -0.292511 0.31377 0.778877 0.517269 0.354659
+0.198261 0.294872 -0.181778 0 1 0
+0.141109 -0.308865 0.0227317 1 0 0
+0.200623 -0.371795 0.131083 0 1 0
+0.28516 0.294872 -0.203214 0 1 0
+-0.5 0.296277 -0.328414 1 0 0
+0.319616 -0.371795 0.128261 0 1 0
+-0.131608 -0.175769 -0.333333 0 0 1
+-0.274677 -0.0435516 0.371795 0 0 1
+0.477651 0.157367 -0.371795 0 0 1
+0.472653 -0.283417 -0.371795 0 0 1
+-0.5 0.0712432 -0.0575553 1 0 0
+0.0384467 0.221206 -0.333333 -0.00433253 0.026527 0.999639
+0.448718 -0.344026 -0.290662 1 0 0
+-0.104037 -0.294872 0.129568 0 1 0
+-0.392129 0.141173 -0.371795 0 0 1
+0.280175 0.294872 0.17981 0 1 0
+-0.180038 -0.0984258 0.350328 0.86588 0.500234 0.00419934
+-0.5 0.18924 -0.329049 1 0 0
+0.259389 -0.371795 -0.19009 0 1 0
+-0.0469526 -0.294872 0.0599885 0 1 0
+0.375388 -0.371795 -0.0773694 0 1 0
+-0.48175 -0.294872 -0.310293 0 1 0
+0.158896 0.294872 0.152164 0 1 0
+-0.133102 0.371795 -0.346338 0 1 0
+-0.169833 -0.371795 0.147139 0 1 0
+0.11023 0.127385 -0.333333 0 0 1
+0.5 -0.183991 0.130868 1 0 0
+-0.454568 -0.294872 -0.269557 0.373204 0.927735 -0.00523635
+-0.273229 -0.224706 -0.339623 0.354391 0.877604 -0.322828
+-0.492537 0.371795 -0.327459 -0.234114 0.970299 -0.0609193
+-0.0594497 -0.294872 0.255787 0 1 0
+0.5 0.0345239 0.0858754 1 0 0
+0.404509 -0.138561 0.320513 0 0 1
+-0.320513 -0.110896 -0.346253 1 0 0
+0.269924 -0.371795 0.117682 0 1 0
+-0.429811 -0.340442 -0.371795 0 0 1
+-0.5 -0.265837 0.129585 1 0 0
+-0.248551 0.371795 -0.246599 0 1 0
+-0.5 0.32537 -0.296333 1 0 0
+0.5 0.252488 -0.142195 1 0 0
+-0.5 -0.0175006 -0.0448222 1 0 0
+-0.5 0.34895 0.199963 1 0 0
+0.5 -0.0702291 0.262263 1 0 0
+-0.0566181 0.256282 0.341667 0 1 0
+-0.190506 -0.371795 0.169389 0 1 0
+0.0790056 0.371795 -0.250455 0 1 0
+0.475273 -0.294872 -0.073752 0 1 0
+0.5 0.00934372 0.314529 0.979802 -0.0171757 0.199229
+0.0279978 -0.294872 0.10487 0 1 0
+0.207709 0.0306271 -0.23764 -0.622974 0.781772 0.0271369
+0.405695 0.294872 -0.233077 0 1 0
+0.448718 -0.297462 0.156564 0.719096 -0.693994 0.0356655
+0.365488 -0.371795 0.0908883 0 1 0
+0.320513 -0.126707 -0.343969 0.998159 0.0167791 0.0582838
+0.187933 -0.371795 -0.225145 0 1 0
+-0.115885 -0.294872 -0.0789661 0 1 0
+-0.5 -0.227924 -0.0488872 1 0 0
+-0.38512 -0.371795 -0.0770097 0 1 0
+-0.20441 0.168869 -0.333333 0 0 1
+0.295262 0.294872 0.231137 0 1 0
+-0.484402 0.371795 -0.0433338 0 1 0
+-0.5 -0.219424 -0.263958 1 0 0
+-0.5 0.178954 0.183408 1 0 0
+0.350035 -0.0027222 -0.371795 0 0 1
+-0.5 -0.259633 0.157729 1 0 0
+0.448718 -0.34115 -0.318499 1 0 0
+-0.318225 -0.213901 0.320513 0 0 1
+0.5 0.0594448 0.123166 1 0 0
+-0.0933823 -0.294872 -0.195432 0 1 0
+-0.0185997 0.0944697 -0.333333 0 0 1
+-0.224981 -0.371795 -0.222831 0 1 0
+-0.473383 -0.294872 -0.290512 0 1 0
+0.164124 0.294872 0.00064716 0 1 0
+0.310346 0.294872 -0.307982 0 1 0
+-0.0585302 0.371795 0.0979202 0 1 0
+0.362278 -0.371795 -0.307107 0 1 0
+0.329309 0.0147841 0.371795 0 0 1
+-0.141154 -0.335431 0.269572 1 0 0
+0.323401 0.286492 -0.371795 0.0746346 -0.116531 0.990379
+0.141026 0.322908 -0.315459 1 0 0
+-0.5 0.296304 -0.187695 1 0 0
+0.441718 0.133296 0.320513 0 0 1
+-0.271324 -0.364688 -0.371795 -0.0403332 0.250964 0.967156
+-0.141154 -0.359062 -0.0277197 1 0 0
+0.294806 -0.371795 -0.286176 0 1 0
+0.409058 -0.176824 -0.371795 0 0 1
+0.125349 -0.294872 -0.246272 0 1 0
+0.455562 -0.294872 0.10413 -0.27635 0.957319 -0.0846762
+0.354229 0.210767 -0.371795 0 0 1
+0.14757 -0.265741 -0.371795 0 0 1
+-0.265196 0.0265414 -0.123497 0.784652 -0.619814 -0.0122912
+-0.437216 0.179459 -0.371795 0 0 1
+-0.0065653 -0.0884955 0.320513 0 0 1
+-0.203932 -0.0159832 0.339412 0.996586 0.0825621 0
+0.141109 -0.317968 -0.162746 1 0 0
+-0.210631 0.371795 -0.0151476 0 1 0
+-0.5 -0.266255 0.287188 1 0 0
+-0.5 0.0658853 0.0373403 1 0 0
+0.5 -0.266925 -0.0903877 1 0 0
+-0.367345 -0.371795 -0.302954 0 1 0
+-0.479221 -0.294872 -0.0343111 0 1 0
+-0.5 -0.255003 0.0245821 1 0 0
+-0.239905 0.230897 -0.333572 -0.0957289 0.680964 0.726033
+0.470591 0.19448 -0.371795 0 0 1
+0.303356 0.288636 0.320513 0.219946 0.134396 0.96621
+-0.493903 0.0647704 0.320513 -0.158391 0.0633164 0.985344
+0.0969021 -0.264981 0.320513 0.0518462 -0.0823657 0.995253
+0.383031 -0.0203591 0.330241 0.997453 -0.0713217 0
+-0.319465 0.165951 -0.363936 0.986136 -0.123457 -0.110877
+0.397405 -0.371795 0.040459 0 1 0
+0.141026 0.316939 0.00250052 1 0 0
+-0.0115941 -0.0936477 -0.333333 0 0 1
+-0.194826 -0.0243754 -0.296859 0.824692 -0.565553 -0.00571201
+-0.184406 -0.147291 0.371795 0 0 1
+0.335767 0.247629 0.320513 0 0 1
+0.490904 -0.294872 0.0789985 -0.11663 0.992945 0.0213968
+-0.405506 -0.371795 -0.184848 0 1 0
+-0.143746 -0.141347 0.320513 0.159616 0.217301 0.962966
+0.111476 -0.294872 -0.173357 0 1 0
+-0.0812038 -0.266124 -0.371795 0 0 1
+0.224845 0.126109 0.371795 0 0 1
+0.120955 -0.294872 0.244015 0 1 0
+0.239097 0.0374354 -0.0358331 0.219733 0.975519 -0.00888392
+-0.5 -0.0354455 0.0560889 1 0 0
+-0.353168 0.371795 0.134494 0 1 0
+-0.127363 0.128652 0.320513 0 0 1
+-0.316115 0.115695 -0.333333 -0.327348 -0.0189917 0.944713
+-0.116262 0.371795 -0.218491 0 1 0
+-0.495617 -0.118622 0.320513 -0.182107 -0.0134311 0.983187
+0.459313 -0.294872 0.0384465 -0.0508129 0.998563 -0.0170045
+0.5 0.0495258 0.126717 1 0 0
+-0.370005 0.00260261 -0.371795 0 0 1
+-0.486668 0.371795 0.257166 0 1 0
+0.355709 0.0726768 -0.371795 0 0 1
+-0.5 0.114321 -0.367985 0.82603 -0.0634332 0.560046
+-0.136905 -0.294872 0.180246 -0.231993 0.969288 -0.0816124
+0.315241 -0.371795 -0.31194 0 1 0
+0.5 0.0792885 0.301706 1 0 0
+0.124211 0.371795 0.0751934 0 1 0
+0.5 -0.133035 0.0873566 1 0 0
+-0.141154 -0.348988 0.229305 1 0 0
+-0.242164 0.0419025 -0.234029 -0.305179 0.952257 -0.00846612
+0.214969 0.294872 0.092555 0 1 0
+0.141026 0.370481 0.0812157 0.859878 0.473864 0.189899
+0.5 0.231513 0.0978108 1 0 0
+0.5 -0.145887 0.155975 1 0 0
+-0.157482 -0.371795 -0.163468 0 1 0
+0.449937 0.225268 0.320513 0 0 1
+-0.379471 -0.0475407 0.363669 0.974231 0.196139 -0.111374
+-0.0397603 0.240664 0.371795 0 0 1
+0.102952 -0.294872 -0.351805 0 1 0
+-0.42742 -0.371795 -0.335296 0 1 0
+0.141109 -0.341571 -0.189065 1 0 0
+0.0246854 -0.294872 -0.227038 0 1 0
+-0.233394 -0.0429655 -0.0350193 0.114613 0.9237 -0.365572
+-0.5 -0.0106643 -0.0658963 1 0 0
+-0.352621 0.341631 -0.371795 0 0 1
+0.305311 -0.371795 0.00202698 0 1 0
+0.320984 0.294872 0.0919924 0 1 0
+-0.262186 -0.0299934 -0.0502409 0.743724 0.668484 0.00193523
+0.0256667 -0.268114 -0.371795 0 0 1
+-0.0780259 0.353263 0.320513 0 0 1
+-0.5 -0.0491308 0.275906 1 0 0
+0.141026 0.306145 0.149189 0.994811 0.100621 0.0150373
+0.249658 -0.0765791 -0.333333 0 0 1
+-0.192923 0.341931 0.320513 0 0 1
+0.0478964 0.371795 0.227296 0 1 0
+-0.284385 -0.0474106 0.371795 0 0 1
+-0.161503 0.289487 0.320513 0 0 1
+-0.449719 -0.294872 0.194297 0.354956 0.933558 0.0497594
+-0.241634 0.371795 -0.204812 0 1 0
+-0.323455 0.177028 -0.371795 -0.237811 -0.126073 0.963095
+0.20728 -0.371795 0.249684 0 1 0
+0.448718 -0.316158 -0.264347 1 0 0
+0.410184 -0.018666 0.320513 0 0 1
+-0.414823 0.349793 -0.371795 0 0 1
+-0.0161343 -0.239306 0.371795 0 0 1
+0.494738 0.0109459 -0.371795 -0.559374 -0.349986 0.751406
+-0.470205 -0.294872 -0.315454 0 1 0
+-0.1237 0.371795 0.286593 0 1 0
+-0.272044 0.0137376 -0.167457 0.946228 -0.323446 0.00588363
+0.243629 -0.0362211 -0.270443 -0.258436 0.965904 -0.0155021
+0.142888 -0.371795 0.0785351 0.54556 0.8124 -0.205843
+0.252973 0.0783229 0.371795 0 0 1
+0.22591 -0.116618 0.371795 0 0 1
+0.097464 -0.294872 -0.0316958 0 1 0
+-0.208616 0.0374993 -0.29947 0.545345 0.838193 0.00567684
+-0.5 0.0133237 -0.310346 1 0 0
+0.448718 -0.361415 -0.246101 1 0 0
+0.226585 0.271763 -0.371795 0 0 1
+-0.5 -0.053574 0.014955 1 0 0
+-0.434174 0.00530315 -0.371795 0 0 1
+-0.5 0.194551 0.275596 1 0 0
+0.199091 -0.0215595 -0.0599463 0.81999 0.57235 0.00561355
+0.335818 0.294872 -0.0610093 0 1 0
+0.145366 0.293844 -0.371795 -0.0880627 -0.271238 0.958475
+0.0540526 0.213132 -0.333333 0 0 1
+-0.258753 -0.0334159 -0.163566 0.638166 0.769863 0.0073827
+0.5 0.26175 0.314971 0.992725 -0.00980261 0.12
+-0.076435 0.198935 -0.333333 0 0 1
+0.422914 0.224826 0.320513 0 0 1
+0.5 -0.277687 0.156512 1 0 0
+0.5 0.132917 0.0202556 1 0 0
+0.0444404 0.137744 0.320513 0 0 1
+0.366381 -0.296465 0.320513 0 0 1
+-0.148184 0.141054 0.343099 0.735718 -0.677288 0
+-0.147593 0.141695 0.358699 0.735718 -0.677288 0
+0.496122 -0.288872 -0.371795 -0.249356 0.209357 0.945511
+-0.448718 -0.3707 0.248155 0.773219 0.632363 0.047433
+0.41976 -0.371795 -0.195475 0 1 0
+0.191199 0.129406 -0.333333 0 0 1
+-0.410454 0.086638 0.320513 0 0 1
+-0.0968974 -0.294872 -0.220467 0 1 0
+0.378969 0.0498472 0.360315 0.977147 0.212566 0
+-0.213975 -0.0400814 -0.271809 -0.429984 0.902835 -0.00187865
+0.445752 -0.371795 -0.124278 -0.326558 0.935853 0.132437
+0.346956 -0.0157325 0.371795 0 0 1
+-0.5 0.10157 -0.128352 1 0 0
+0.481536 0.294872 -0.359093 -0.00207993 0.999974 -0.00687918
+-0.148519 -0.147765 -0.333333 0 0 1
+0.286217 0.125937 0.371795 0 0 1
+-0.39606 -0.371795 0.135359 0 1 0
+0.448718 -0.297877 0.294915 0.864487 -0.472259 0.172143
+-0.135068 -0.294872 -0.0450504 -0.232135 0.972583 0.0139988
+0.5 0.158491 0.0941332 1 0 0
+-0.286076 0.068135 -0.333333 0 0 1
+0.5 0.282782 -0.283751 1 0 0
+0.391763 -0.195721 0.320513 0 0 1
+0.105943 -0.277985 -0.371795 0 0 1
+0.141109 -0.299201 0.0815814 0.983082 0.182715 -0.0128416
+-0.199473 0.192797 -0.333333 0 0 1
+0.303024 -0.142068 -0.333333 0 0 1
+-0.419203 -0.371795 0.053502 0 1 0
+-0.055276 0.371795 0.0570053 0 1 0
+0.328341 0.159212 0.350715 0.800536 0.599284 0
+-0.192234 0.371795 -0.351803 0 1 0
+-0.208562 0.262922 0.320513 0 0 1
+0.370193 0.294872 -0.129463 0 1 0
+0.232755 -0.363048 0.320513 0.0626883 -0.265728 0.962008
+0.5 0.157443 0.105442 1 0 0
+-0.101487 -0.0853852 -0.333333 0 0 1
+-0.200513 -0.157512 -0.333333 0 0 1
+-0.5 0.271269 -0.0119417 1 0 0
+-0.465454 -0.278205 -0.371795 0 0 1
+0.4984 0.0335339 0.320513 0.733707 -0.234253 0.637809
+0.141109 -0.363146 -0.267623 0.993568 0.103425 0.0461169
+0.138141 0.270069 -0.371795 0 0 1
+0.108988 -0.173608 0.362096 -0.500155 0.865928 0.00378274
+0.167071 -0.132681 -0.333333 0 0 1
+-0.263969 -0.371795 0.00576561 0 1 0
+0.111835 -0.165239 0.320513 -0.208107 0.236733 0.949025
+-0.470901 0.0483544 0.320513 0 0 1
+-0.400786 -0.371795 0.208464 0 1 0
+-0.5 -0.0213687 -0.261467 1 0 0
+0.00201384 0.34111 0.320513 0 0 1
+-0.17427 0.371795 0.15463 0 1 0
+0.195272 -0.0145382 -0.224302 0.928285 0.371868 0
+-0.489347 0.371795 0.299551 0 1 0
+0.219742 -0.230897 -0.343192 -0.00571905 0.99953 -0.0301056
+-0.0749564 -0.294872 -0.184159 0 1 0
+0.448718 -0.323431 -0.22018 1 0 0
+0.416856 0.0015199 0.320513 0 0 1
+-0.347508 -0.371795 -0.0094893 0 1 0
+0.19669 0.0175769 -0.187966 0.886425 -0.462863 0.00282573
+0.5 -0.1298 -0.0160594 1 0 0
+-0.0846908 0.219363 -0.333333 0 0 1
+0.245706 -0.035311 -0.191573 -0.375371 0.926809 -0.0110294
+0.164941 0.253616 0.355246 0.141688 0.989897 0.00527153
+0.247029 -0.371795 -0.180492 0 1 0
+0.5 -0.0774392 0.136117 1 0 0
+-0.5 0.106791 0.229621 1 0 0
+0.0581824 0.371795 0.255053 0 1 0
+-0.5 0.295616 -0.246028 1 0 0
+-0.374642 0.0697369 0.363176 0.965134 -0.261577 -0.00970287
+-0.5 0.308427 0.0778405 1 0 0
+-0.0734083 0.371795 -0.0109936 0 1 0
+0.0108048 -0.184582 0.320513 0 0 1
+-0.5 0.036672 0.289136 1 0 0
+-0.250678 -0.249739 -0.371795 0 0 1
+-0.262017 0.0130302 -0.0294679 -0.46275 0.164911 0.871015
+0.484544 0.294872 -0.362651 0.00249251 0.976427 -0.215832
+0.396118 -0.178914 -0.371795 0 0 1
+-0.163018 0.333147 0.320513 0 0 1
+0.141109 -0.368211 -0.0372632 0.816042 0.571813 -0.0842927
+-0.5 -0.082011 0.151256 1 0 0
+0.448718 -0.300274 -0.0158657 0.982587 -0.164594 0.0862033
+0.262115 -0.209084 -0.333333 0 0 1
+0.341654 -0.246682 0.320513 0 0 1
+0.155505 0.248263 -0.371795 0 0 1
+0.5 -0.231044 0.111075 1 0 0
+-0.126287 0.0861759 -0.333333 0 0 1
+0.5 0.272483 0.143426 1 0 0
+-0.327105 -0.333232 0.320513 0 0 1
+0.101388 -0.294872 0.250801 0 1 0
+0.5 -0.0865197 -0.365556 0.991443 0.0785405 -0.104268
+0.269166 -0.218309 -0.333333 0.138946 -0.124261 0.982473
+-0.0404945 0.371795 0.0451505 0 1 0
+-0.189797 0.212326 0.371795 0 0 1
+0.342332 -0.371795 0.101056 0 1 0
+0.155845 -0.249815 -0.371795 0 0 1
+-0.122176 0.371795 -0.361295 0.0308328 0.99814 -0.0525992
+-0.421537 0.247053 0.320513 0 0 1
+0.167221 -0.371795 0.00507142 0 1 0
+-0.5 0.203502 0.248868 1 0 0
+-0.5 0.0725384 -0.01635 1 0 0
+0.5 0.161102 0.0487506 1 0 0
+0.170399 0.113179 0.324205 0.787129 0.533577 -0.309393
+0.334864 -0.371795 -0.351372 0 1 0
+-0.255807 0.371795 -0.024876 0 1 0
+0.105029 0.10838 -0.333333 0 0 1
+0.0131828 -0.294872 -0.218083 0 1 0
+-0.5 -0.150914 -0.331353 1 0 0
+0.127397 -0.143082 0.320513 0 0 1
+0.0244156 -0.141039 0.320513 0 0 1
+0.316069 0.294872 -0.121043 0 1 0
+-0.384928 -0.371795 0.230438 0 1 0
+0.145344 0.294872 -0.345461 0.205146 0.976905 -0.0597591
+-0.0831227 -0.256282 0.323339 -0.0214515 0.971154 -0.237486
+-0.164296 -0.12252 0.322671 0.568448 0.267834 0.777902
+0.419642 0.294872 -0.259375 0 1 0
+0.365515 -0.0997947 0.320513 0.670925 -0.0935791 0.735597
+0.421856 -0.371795 0.171293 0 1 0
+0.0609455 -0.256282 0.336684 0 1 0
+0.0909696 0.371795 0.0573539 0 1 0
+-0.126561 0.230897 -0.360754 0 1 0
+0.448718 -0.324408 -0.307029 1 0 0
+-0.262859 -0.320029 0.320513 0 0 1
+-0.5 0.158049 -0.280749 1 0 0
+-0.5 0.272088 0.12583 1 0 0
+-0.160687 0.332536 0.320513 0 0 1
+0.5 0.247973 0.157519 1 0 0
+0.116768 0.371795 -0.297904 0 1 0
+0.158981 0.110014 -0.333333 0 0 1
+-0.5 -0.02356 0.225368 1 0 0
+-0.400733 0.218964 -0.371795 0 0 1
+-0.259287 -0.0328923 -0.319796 0.608075 0.793788 -0.012035
+-0.49958 0.274509 -0.371795 0.78514 -0.0214553 0.618947
+-0.267122 0.0237901 -0.320652 0.836496 -0.547959 0.00395188
+-0.5 0.219285 -0.0821661 1 0 0
+-0.311698 -0.371795 -0.175444 0 1 0
+-0.249968 -0.149788 -0.333333 0 0 1
+0.5 0.274985 -0.153273 1 0 0
+-0.142673 0.371795 -0.0576153 0 1 0
+-0.335077 -0.371795 -0.12267 0 1 0
+-0.0761177 0.371795 0.117795 0 1 0
+-0.379741 0.284788 -0.371795 0 0 1
+0.429834 -0.212184 0.320513 0 0 1
+-0.167904 0.371795 0.306111 0 1 0
+-0.5 -0.0604329 0.0546551 1 0 0
+-0.147751 0.0427399 0.320513 0 0 1
+-0.267523 -0.128472 0.371795 0 0 1
+0.5 -0.126813 -0.281739 1 0 0
+0.154539 -0.158697 0.371795 0 0 1
+0.157225 0.0162978 0.320513 0 0 1
+-0.5 -0.126031 0.30223 1 0 0
+-0.5 0.336593 0.0340868 1 0 0
+-0.435533 -0.371795 -0.264172 0 1 0
+-0.0244191 0.371795 -0.332559 0 1 0
+-0.5 -0.274411 0.286242 1 0 0
+-0.141154 -0.359212 -0.222217 1 0 0
+-0.5 0.279908 -0.161814 1 0 0
+-0.231175 -0.0435542 -0.0504454 0.0457106 0.998948 -0.00366373
+-0.141154 -0.347804 -0.309802 1 0 0
+0.424697 -0.346144 0.320513 0 0 1
+0.0596901 -0.294872 0.312411 -0.00115988 0.994185 -0.107677
+0.5 -0.224955 0.102203 1 0 0
+-0.199707 -0.284309 0.320513 0 0 1
+-0.156806 -0.0542078 0.320513 0 0 1
+-0.5 0.0810215 0.0609719 1 0 0
+-0.451805 -0.294872 -0.367609 0.550355 0.811851 0.194954
+0.383208 0.017887 0.33909 0.997454 0.0713185 0
+0.322735 -0.155484 -0.371795 0.20517 0.0278655 0.978329
+0.141026 0.33432 -0.320527 1 0 0
+-0.032024 0.371795 0.0595183 0 1 0
+-0.185595 -0.371795 -0.323661 0 1 0
+0.0446878 -0.294872 0.252862 0 1 0
+-0.5 -0.240132 -0.25917 1 0 0
+0.306011 0.198579 0.320513 0.0639603 0.0762203 0.995037
+0.387163 -0.231148 0.320513 0 0 1
+-0.203631 -0.171107 0.371795 0 0 1
+0.194526 0.00557733 0.320513 -0.0350975 -0.000823047 0.999384
+-0.0824745 -0.14768 -0.333333 0 0 1
+-0.265407 0.227462 -0.350896 -0.280498 0.959854 -0.00145556
+-0.489198 -0.211179 0.320513 -0.0613031 0.00320217 0.998114
+-0.381164 -0.0591816 -0.371795 0 0 1
+0.257975 0.0269802 -0.0837106 0.716493 0.696789 -0.033502
+-0.10046 0.213535 0.371795 0 0 1
+0.0679265 0.2173 -0.333333 0 0 1
+-0.368998 -0.371795 -0.155392 0 1 0
+0.255659 -0.371795 0.00494371 0 1 0
+-0.101274 0.371795 -0.215537 0 1 0
+-0.0113259 0.191087 -0.333333 0 0 1
+-0.326814 -0.371795 -0.0838576 0 1 0
+0.10662 -0.0664107 -0.333333 0 0 1
+0.5 -0.119005 -0.12367 1 0 0
+-0.187464 0.00325434 -0.129636 0.997291 0.0713743 0.0177794
+0.469783 -0.294872 -0.0357479 0 1 0
+0.447934 0.294872 0.196246 0 1 0
+0.5 -0.128662 0.0256771 1 0 0
+0.0671849 -0.294872 -0.161035 0 1 0
+0.0197988 -0.117368 -0.333333 0 0 1
+0.101917 0.371795 -0.283585 0 1 0
+-0.0268174 -0.294872 -0.0325946 0 1 0
+-0.281409 -0.176004 -0.333333 0 0 1
+-0.188411 -0.0306839 -0.333333 0.10024 0.0170541 0.994817
+0.5 0.111855 -0.0556001 1 0 0
+-0.265743 -0.371795 0.314988 0.0530995 0.977917 -0.202138
+0.0522834 -0.256282 0.35987 0 1 0
+-0.304597 -0.185122 0.331378 0.707623 0.706356 -0.0182283
+-0.372252 -0.371795 -0.363141 0.0243649 0.998163 0.055467
+-0.5 -0.169724 -0.165403 1 0 0
+0.499673 -0.294872 -0.227763 -0.661263 0.735893 -0.145577
+-0.119651 -0.294872 0.0249507 0 1 0
+0.433266 0.294872 0.263845 0 1 0
+0.0166607 0.195044 0.320513 0.0100169 -0.104171 0.994509
+-0.163019 -0.124474 0.349568 0.796503 0.604602 0.00630782
+0.0536744 0.353349 -0.371795 0 0 1
+-0.285465 0.371795 -0.31223 0 1 0
+-0.347999 0.371795 0.301213 0 1 0
+-0.0777302 0.371795 -0.0405708 0 1 0
+-0.5 -0.0297413 -0.201819 1 0 0
+0.366952 -0.371795 -0.168693 0 1 0
+-0.35768 0.0443657 0.371795 0 0 1
+0.123454 0.163125 0.325152 0.537646 0.786422 -0.3041
+0.0118738 -0.294872 -0.120825 0 1 0
+-0.464148 -0.0721313 0.320513 0 0 1
+0.141026 0.364942 -0.134975 0.983813 0.165134 -0.0695892
+0.448718 -0.334045 0.234498 1 0 0
+-0.433388 -0.0916845 -0.371795 0 0 1
+-0.0950644 -0.120069 0.320513 0 0 1
+-0.416365 0.371795 0.0381764 0 1 0
+0.5 -0.116747 -0.260667 1 0 0
+0.5 -0.272631 0.182912 1 0 0
+-0.315062 -0.105079 -0.333333 -0.506193 0.26037 0.822178
+-0.210997 -0.371795 -0.0456321 0 1 0
+-0.107562 -0.25699 -0.371795 0 0 1
+-0.332922 0.371795 -0.0422747 0 1 0
+-0.5 -0.251901 -0.145504 1 0 0
+-0.346676 -0.371795 0.17483 0 1 0
+-0.5 -0.243275 0.108043 1 0 0
+-0.5 0.263925 -0.332873 1 0 0
+-0.0625058 0.13073 -0.333333 0 0 1
+0.5 -0.205441 -0.276404 1 0 0
+0.235573 -0.371795 -0.281171 0 1 0
+0.0686085 0.371795 0.223437 0 1 0
+-0.24982 -0.371795 0.202767 0 1 0
+-0.5 -0.229446 -0.268947 1 0 0
+-0.121176 0.371795 -0.120724 0 1 0
+0.170379 0.294872 -0.151487 0 1 0
+0.325172 -0.169793 -0.371795 0.10178 -0.0121956 0.994732
+-0.268635 -0.0215469 -0.203664 0.88318 0.468993 0.00621854
+-0.104536 -0.294872 0.179565 0 1 0
+0.34625 0.294872 -0.307841 0 1 0
+-0.498033 0.0145888 0.320513 -0.663439 0.0703119 0.744919
+0.215279 0.294872 0.0784903 0 1 0
+-0.381077 0.0401572 0.369415 0.941938 -0.237342 -0.237531
+-0.405871 0.371795 -0.198226 0 1 0
+0.291577 0.26437 -0.371795 0 0 1
+-0.272796 -0.371795 -0.320514 0 1 0
+-0.102842 0.371795 -0.363849 0.0624251 0.978649 -0.195828
+0.19845 -0.371795 0.0831607 0 1 0
+-0.496286 0.28545 0.320513 -0.27117 0.00386691 0.962524
+0.274938 -0.209477 0.370863 -0.381945 0.713101 -0.587882
+-0.166586 -0.371795 -0.360502 0.00112899 0.999998 0.00183091
+-0.5 0.00195246 -0.0470087 1 0 0
+-0.178363 -0.0808826 -0.333333 0 0 1
+0.279039 -0.371795 0.129137 0 1 0
+0.433887 -0.371795 -0.336343 0 1 0
+0.448718 -0.303275 -0.323713 0.994858 -0.100782 -0.0100761
+-0.271386 -0.0156472 -0.259306 0.934918 0.354671 -0.0117041
+0.317316 0.276087 0.320513 0 0 1
+-0.474697 0.113668 0.320513 0 0 1
+-0.315601 0.279539 -0.371795 0 0 1
+-0.238834 -0.371795 0.153298 0 1 0
+0.129226 -0.294872 -0.024395 0 1 0
+0.199414 0.274049 0.320513 0 0 1
+0.335087 -0.264256 -0.371795 0 0 1
+-0.0536749 -0.0599469 0.320513 0 0 1
+-0.306618 0.0862506 -0.333333 0 0 1
+-0.5 -0.206733 0.0893633 1 0 0
+-0.449511 -0.294872 0.0795744 0.452895 0.891517 -0.00913257
+-0.448718 -0.34092 -0.216879 1 0 0
+-0.198443 0.371795 -0.194559 0 1 0
+0.5 -0.284533 0.27435 0.999185 -0.027575 -0.0294803
+0.166521 0.238614 0.371795 0 0 1
+0.268842 0.00443987 -0.238085 0.995901 0.0903736 -0.00367186
+0.380474 0.268878 0.320513 0 0 1
+-0.155414 0.230897 -0.365615 0.0416455 0.996363 0.0743432
+-0.440024 -0.371795 -0.223667 0.112649 0.993635 0
+-0.203508 0.371795 -0.0442884 0 1 0
+-0.449934 0.371795 0.143642 0 1 0
+0.443094 0.0468228 -0.371795 0 0 1
+-0.5 0.147594 0.00856833 1 0 0
+0.5 -0.114795 0.108214 1 0 0
+0.213478 0.165662 0.371795 0 0 1
+0.300004 -0.189715 0.336008 -0.689472 0.724312 0
+0.448718 -0.349194 -0.218809 1 0 0
+-0.24227 0.293773 -0.371795 0 0 1
+0.382154 0.0326273 0.336993 0.993597 0.11132 0.0193015
+0.217195 -0.0359464 -0.229851 0.330957 0.943646 0
+-0.458164 0.371795 0.205581 0 1 0
+-0.202623 -0.245075 0.342028 0.311649 0.950165 -0.0078038
+-0.382848 -0.228654 -0.371795 0 0 1
+0.494377 0.208551 -0.371795 -0.0918786 -0.0337332 0.995199
+0.5 0.274378 0.265526 1 0 0
+0.136387 -0.294872 0.0171306 0.286575 0.957678 0.0269675
+-0.5 -0.0481118 -0.283207 1 0 0
+0.448718 -0.359993 -0.199875 1 0 0
+0.389613 -0.371795 0.187955 0 1 0
+0.5 -0.0567349 0.0381107 1 0 0
+0.0902529 -0.256282 0.329866 -0.0044555 0.993585 -0.112996
+-0.237565 0.313962 0.320513 0 0 1
+0.473 -0.24104 -0.371795 0 0 1
+-0.19863 -0.0419988 0.320513 0.849721 0.216493 0.480733
+0.262533 0.0214376 -0.318307 0.841365 0.540464 0.00195191
+0.193496 -0.0274475 0.320513 -0.115873 0.0256635 0.992932
+0.0406592 -0.259076 -0.371795 0 0 1
+-0.207166 -0.254399 -0.371795 0 0 1
+-0.216917 0.371795 0.0220348 0 1 0
+0.193631 -0.00943862 -0.279575 0.975561 0.219727 -0.00108085
+-0.130938 -0.294872 0.0319428 -0.0491807 0.998624 0.0181921
+-0.159051 -0.371795 0.310974 0.00790654 0.999658 -0.0249335
+-0.270439 0.371795 -0.187215 0 1 0
+-0.5 0.0774203 -0.196196 1 0 0
+0.448718 -0.314102 -0.107243 1 0 0
+0.0127492 -0.161106 0.320513 0 0 1
+0.5 -0.0280179 0.217121 1 0 0
+0.161115 -0.371795 0.306571 0 1 0
+-0.399178 -0.371795 -0.168233 0 1 0
+0.5 0.050595 -0.00185932 1 0 0
+0.443064 -0.371795 -0.0606067 -0.0996027 0.994667 0.0267629
+0.5 -0.252628 -0.189785 1 0 0
+-0.207606 0.320026 0.320513 0 0 1
+0.0788807 -0.294872 -0.346076 0 1 0
+-0.0681569 0.0258915 0.320513 0 0 1
+-0.436855 0.371795 0.16102 0 1 0
+-0.36175 -0.371795 -0.0152383 0 1 0
+-0.407523 0.371795 -0.140095 0 1 0
+0.5 -0.170571 0.216639 1 0 0
+0.00885458 0.371795 0.0963131 0 1 0
+0.000924192 -0.256282 0.343617 0 1 0
+-0.417641 0.136904 0.320513 0 0 1
+0.5 -0.00838996 -0.149436 1 0 0
+0.191727 -0.00280033 0.320513 0 0 1
+0.5 0.0576622 0.0430312 1 0 0
+-0.263934 -0.371795 -0.337932 0 1 0
+0.257449 0.294872 0.0216762 0 1 0
+-0.383279 0.0168964 0.351317 0.997451 -0.0713602 1.96454e-005
+-0.5 -0.124024 -0.0357748 1 0 0
+-0.5 -0.0722128 0.210133 1 0 0
+0.419437 0.294872 0.203039 0 1 0
+0.035432 0.260636 -0.371795 0 0 1
+-0.267675 -0.248144 -0.371795 0 0 1
+0.249928 0.218112 -0.333333 0 0 1
+-0.230001 0.082834 0.371795 0 0 1
+0.5 0.159883 0.263165 1 0 0
+0.0664567 0.202819 0.371795 -0.0025171 -0.0384502 0.999257
+-0.299233 0.371795 0.231635 0 1 0
+-0.172485 -0.371795 0.12809 0 1 0
+-0.456879 -0.169735 0.320513 0 0 1
+0.436833 -0.371795 -0.235677 -0.00837368 0.999962 0.00233239
+0.138025 -0.151784 0.331801 -0.668545 0.743668 0.00209665
+0.5 0.153094 -0.177036 1 0 0
+-0.448718 -0.308928 -0.238881 1 0 0
+0.174416 -0.107031 0.338274 0.838956 -0.544199 0
+-0.420322 -0.0739876 0.320513 0 0 1
+-0.5 0.172135 -0.214997 1 0 0
+0.0664454 -0.294872 0.0274668 0 1 0
+-0.264785 0.371795 0.122105 0 1 0
+0.46006 -0.16226 -0.371795 0 0 1
+0.183884 0.0900165 0.361269 0.917766 0.396035 -0.0293542
+-0.5 -0.00903048 0.131369 1 0 0
+0.0302994 -0.294872 -0.301929 0 1 0
+0.105353 0.223103 -0.333333 0.0488685 0.163907 0.985265
+-0.5 -0.0610438 -0.0878238 1 0 0
+-0.10277 0.339162 -0.371795 0 0 1
+0.260121 -0.371795 -0.361859 -0.0698011 0.992121 0.104033
+0.0831318 0.371795 0.307249 0 1 0
+0.225212 0.0379753 -0.285341 -0.186259 0.982396 0.0143172
+-0.5 -0.168102 0.279645 1 0 0
+0.151258 -0.137714 0.325114 -0.615721 0.688916 0.382469
+0.169613 -0.00271171 -0.333333 0 0 1
+0.136044 -0.153325 0.358811 -0.637563 0.770375 0.00602037
+0.5 -0.225306 -0.265382 1 0 0
+0.152607 0.294872 0.00625274 0.0915974 0.995678 0.0153527
+0.5 0.253893 0.194191 1 0 0
+0.0622609 0.116774 0.320513 0 0 1
+-0.0868739 0.371795 -0.0827258 0 1 0
+0.219328 0.185359 0.371795 0 0 1
+0.469707 -0.0143412 -0.371795 0 0 1
+-0.327125 -0.224904 0.320513 0 0 1
+0.5 -0.0975177 0.00578255 1 0 0
+0.273839 -0.207617 -0.333333 0 0 1
+-0.5 0.215861 -0.0265959 1 0 0
+-0.296291 -0.371795 -0.357409 0 1 0
+0.5 0.172011 -0.193293 1 0 0
+0.5 0.220476 0.227059 1 0 0
+0.12333 0.292663 -0.371795 0 0 1
+0.268627 -0.00674803 -0.153714 0.985936 -0.167059 -0.00465327
+-0.0257419 -0.294872 0.147137 0 1 0
+0.463071 -0.0311383 -0.371795 0 0 1
+-0.5 -0.267345 0.0739852 1 0 0
+-0.270639 -0.255176 0.320513 0 0 1
+0.5 -0.130592 0.172383 1 0 0
+0.15356 -0.371795 0.126635 0.0770176 0.996584 0.0297966
+0.247362 -0.0345386 -0.0294523 -0.455244 0.890364 -0.00206121
+0.237819 -0.371795 0.287024 0 1 0
+0.402044 0.294872 0.216077 0 1 0
+0.125348 0.256282 0.368147 0.126951 0.856881 0.499638
+0.404787 -0.283836 0.320513 0 0 1
+0.5 -0.188467 0.227528 1 0 0
+0.498656 0.0283978 -0.371795 -0.34399 -0.0664235 0.936621
+0.5 -0.212304 -0.0254908 1 0 0
+-0.0842939 -0.294872 0.079112 0 1 0
+-0.321716 0.306899 0.320513 0 0 1
+0.5 0.204882 0.2841 1 0 0
+0.5 0.225487 -0.241171 1 0 0
+-0.399481 -0.31368 0.320513 0 0 1
+0.267883 -0.169542 0.371795 0 0 1
+-0.38355 0.232687 -0.371795 0 0 1
+0.141026 0.368787 0.318698 0.443804 0.578115 0.684705
+-0.427551 0.371795 0.0361339 0 1 0
+-0.0901395 0.371795 -0.0977297 0 1 0
+0.241849 -0.278001 0.320513 0 0 1
+-0.271088 0.0162847 -0.0938849 0.925973 -0.377584 -0.00198523
+0.302726 0.294872 -0.272474 0 1 0
+0.0368035 -0.157298 0.320513 0 0 1
+-0.5 -0.010796 0.0100422 1 0 0
+-0.5 -0.107491 0.261452 1 0 0
+0.472626 0.294872 -0.290133 0 1 0
+0.448718 -0.323715 -0.144336 1 0 0
+-0.187107 0.0826686 0.362137 0.927099 -0.368037 0.0709627
+0.372783 0.294872 -0.0312423 0 1 0
+-0.5 0.207199 -0.18813 1 0 0
+-0.378411 0.0524162 0.32195 0.934652 -0.198225 -0.295182
+-0.0762775 -0.294872 -0.288588 0 1 0
+0.245415 0.294872 -0.0989659 0 1 0
+0.316331 0.146256 0.371795 0 0 1
+-0.105053 -0.168163 0.320513 0.132407 0.155794 0.978875
+-0.188258 0.080045 0.368351 0.803606 -0.30908 0.508613
+0.281076 -0.371795 0.299762 0 1 0
+-0.115823 0.00970798 0.320513 0 0 1
+0.0311755 0.230897 -0.344388 0 1 0
+-0.233187 -0.371795 0.318724 0.0237657 0.883174 -0.468443
+0.5 -0.180349 0.206045 1 0 0
+-0.39282 0.371795 0.278883 0 1 0
+0.445878 0.0808088 0.320513 0 0 1
+0.282949 -0.232572 -0.371795 0 0 1
+-0.251613 -0.371795 -0.327885 0 1 0
+-0.00308652 0.371795 0.309712 0 1 0
+-0.425891 -0.371795 -0.298651 0 1 0
+-0.5 0.208781 -0.195167 1 0 0
+0.298563 0.0453391 0.371795 0 0 1
+-0.40772 -0.371795 -0.00577633 0 1 0
+0.262817 0.0208592 5.94004e-005 0.71488 0.495954 0.492927
+-0.454088 0.0311821 -0.371795 0 0 1
+-0.373572 0.271027 0.320513 0 0 1
+-0.28473 0.218595 -0.333333 -0.386066 0.665307 0.638999
+0.321224 0.294872 0.258068 0 1 0
+0.436316 -0.35322 0.320513 0 0 1
+-0.263135 0.0290447 -0.246848 0.743176 -0.669096 0
+0.182464 -0.0932536 0.341089 0.912831 -0.408331 0.00242847
+0.28282 0.203577 0.360644 0.599276 0.800543 0
+-0.0614593 -0.112689 0.320513 0 0 1
+0.20259 -0.0321812 0.321759 -0.539338 0.0982803 0.836334
+0.0575317 0.138807 0.320513 0 0 1
+0.364954 -0.371795 0.0307215 0 1 0
+-0.000188841 -0.212921 0.371795 0 0 1
+0.297996 0.0664401 -0.333333 0 0 1
+0.103214 -0.294233 -0.371795 0.0235356 0.572304 0.819704
+-0.327662 -0.371795 -0.0835079 0 1 0
+-0.256286 0.163063 -0.333333 0 0 1
+-0.16165 0.251079 -0.371795 0 0 1
+0.242008 -0.280117 -0.371795 0 0 1
+-0.190087 0.230897 -0.33941 -0.0063177 0.950223 0.311505
+-0.141154 -0.349498 -0.213592 1 0 0
+0.5 0.228219 -0.149464 1 0 0
+0.5 0.110463 -0.11724 1 0 0
+0.412964 0.219996 0.320513 0 0 1
+-0.267308 -0.0541497 0.371795 0 0 1
+0.15749 -0.371795 0.14632 0 1 0
+-0.5 -0.180667 0.0228491 1 0 0
+0.5 -0.174396 0.0444115 1 0 0
+0.297903 -0.371795 -0.12622 0 1 0
+-0.140336 -0.264353 0.320513 -0.00943226 -0.0479915 0.998803
+0.5 0.075496 -0.34278 1 0 0
+-0.22479 -0.321083 -0.371795 0 0 1
+-0.5 0.221852 0.11094 1 0 0
+0.358737 0.294872 -0.0148453 0 1 0
+-0.283588 0.29552 -0.371795 0 0 1
+0.142638 -0.371795 -0.11881 0.527893 0.834556 0.157626
+0.320513 -0.0357827 -0.358312 1 0 0
+0.419876 0.261976 0.320513 0 0 1
+0.308988 -0.371795 -0.0643886 0 1 0
+0.5 0.109052 -0.345437 1 0 0
+-0.497214 0.122133 0.320513 -0.494126 0.0238179 0.869064
+0.236712 0.164567 -0.333333 0 0 1
+0.35289 -0.371795 -0.0963806 0 1 0
+-0.149309 -0.371795 0.290689 -0.173262 0.98486 -0.0056385
+0.360642 -0.233472 -0.371795 0 0 1
+-0.473781 0.142823 0.320513 0 0 1
+0.390433 0.294872 -0.328413 0 1 0
+-0.0891245 0.340263 0.320513 0 0 1
+0.5 -0.0490959 0.272046 1 0 0
+-0.0614 0.0952145 0.320513 0 0 1
+0.141026 0.35394 -0.281741 1 0 0
+0.0679551 0.00131354 0.320513 0 0 1
+-0.43974 -0.337557 -0.371795 0.0774514 0.0276481 0.996613
+-0.494654 -0.0233439 0.320513 -0.396622 0.011046 0.917916
+0.0569366 -0.294872 0.0326457 0 1 0
+-0.196521 -0.0307885 0.320513 0.292706 0.00702556 0.956177
+0.176117 -0.371795 0.105573 0 1 0
+0.208134 -0.241508 0.371795 -0.293659 0.726454 -0.621312
+0.448718 -0.351159 0.274449 1 0 0
+-0.5 -0.0317754 0.0022753 1 0 0
+-0.448718 -0.314002 0.175855 1 0 0
+-0.402089 0.371795 -0.0647323 0 1 0
+0.300547 0.294872 -0.0448231 0 1 0
+-0.119699 0.196065 -0.333333 0 0 1
+0.0363021 -0.189664 -0.333333 0 0 1
+0.267992 0.0700343 0.371795 0 0 1
+-0.5 -0.189054 0.0731016 1 0 0
+0.298282 0.0997667 0.371795 0 0 1
+0.0326753 0.371795 -0.103035 0 1 0
+-0.238224 0.27648 -0.371795 0 0 1
+-0.141154 -0.330767 0.276512 1 0 0
+0.238891 0.0374904 -0.057886 0.23199 0.972672 -0.00945277
+-0.5 0.095528 0.23083 1 0 0
+0.401483 -0.371795 0.266391 0 1 0
+-0.5 0.0622649 -0.118838 1 0 0
+-0.5 0.285519 -0.0133458 1 0 0
+0.103845 0.371795 -0.0255486 0 1 0
+-0.158361 -0.117958 0.320513 0.142038 0.130773 0.981185
+-0.141154 -0.344429 0.197839 1 0 0
+0.5 0.149829 0.122833 1 0 0
+0.0385408 -0.294872 -0.191889 0 1 0
+-0.380154 -0.00219211 0.371795 -0.459378 0.0727231 0.885259
+0.5 -0.284131 -0.0436727 1 0 0
+0.0445458 0.371795 -0.279682 0 1 0
+-0.5 0.321804 0.0464331 1 0 0
+0.5 0.0175452 -0.0357431 1 0 0
+0.25782 0.027135 -0.0791616 0.728199 0.68518 -0.0159518
+0.225281 -0.0379813 -0.228707 0.139659 0.990184 0.00549971
+0.5 0.0957831 -0.0094735 1 0 0
+-0.197941 -0.361626 0.320513 -0.0251596 -0.1077 0.993865
+0.197235 -0.371787 0.320513 -0.0913954 -0.403841 0.910252
+-0.141154 -0.341271 -0.281352 1 0 0
+-0.5 0.109587 -0.139499 1 0 0
+0.470978 -0.294872 -0.216454 0 1 0
+0.26854 -0.00707536 -0.0303396 0.981997 -0.188892 -0.00100811
+-0.192791 0.0213066 -0.183209 0.874936 0.483669 0.0234612
+-0.5 0.3632 -0.144517 0.998466 -0.0531691 0.0154517
+-0.0609901 -0.114322 0.320513 0 0 1
+0.47639 0.294872 0.233747 0 1 0
+-0.0331869 0.201846 0.323735 -0.0754549 0.908552 -0.410902
+-0.5 -0.230564 -0.175865 1 0 0
+-0.0589963 -0.274655 -0.371795 0 0 1
+0.267699 0.0102149 -0.258364 0.968258 0.249893 0.00550662
+0.334312 -0.371795 0.176504 0 1 0
+-0.0437017 -0.0782307 -0.333333 0 0 1
+0.0308763 0.334105 -0.371795 0 0 1
+-0.160113 -0.354925 -0.371795 0 0 1
+-0.5 -0.150895 0.0707422 1 0 0
+-0.348581 0.12122 -0.371795 0 0 1
+0.428383 0.294872 0.193633 0 1 0
+-0.5 0.323984 0.0172094 1 0 0
+0.0866164 -0.294872 0.133087 0 1 0
+-0.141154 -0.351343 -0.191767 1 0 0
+-0.20099 -0.265473 -0.371795 0 0 1
+0.0609621 -0.294872 0.28413 0 1 0
+0.0473676 0.0409903 0.320513 0 0 1
+-0.5 -0.26079 0.307811 1 0 0
+0.0371471 -0.294872 -0.163527 0 1 0
+0.124273 -0.0643383 0.320513 0 0 1
+0.5 -0.00953748 0.267121 1 0 0
+0.5 0.00304204 -0.327255 1 0 0
+-0.289506 0.183156 0.371795 0 0 1
+-0.0573738 -0.294872 0.245967 0 1 0
+-0.13144 0.340962 -0.371795 0 0 1
+0.115517 -0.229338 0.371795 0 0 1
+-0.238901 -0.0902008 0.371795 0 0 1
+0.316009 -0.179781 -0.358231 0.937131 -0.348642 -0.0152848
+0.5 -0.0202587 0.311071 0.998866 -0.0119048 0.0460996
+0.211567 -0.371795 0.0201294 0 1 0
+0.207076 0.0301836 -0.139504 -0.64636 0.763008 0.00605463
+-0.10615 0.0527375 -0.333333 0 0 1
+-0.5 0.236999 -0.255088 1 0 0
+-0.124652 0.230897 -0.343954 -0.0254551 0.99536 0.0927881
+0.5 -0.194244 0.24557 1 0 0
+0.5 0.26467 0.0633233 1 0 0
+-0.487463 -0.111788 -0.371795 0 0 1
+-0.48915 0.371795 0.209862 -0.0500712 0.99871 0.00846774
+-0.324232 -0.371795 0.234379 0 1 0
+-0.272274 -0.0128797 -0.262857 0.951995 0.304892 -0.0273265
+-0.0486256 -0.294872 -0.306792 0 1 0
+-0.0954658 -0.294872 0.249317 0 1 0
+-0.262806 0.371795 0.249254 0 1 0
+-0.427664 -0.255002 -0.371795 0 0 1
+0.469877 0.155738 -0.371795 0 0 1
+0.5 0.012346 -0.0433052 1 0 0
+0.303776 -0.371795 0.115718 0 1 0
+-0.3345 0.371795 0.0107995 0 1 0
+0.5 0.204489 0.20838 1 0 0
+0.5 0.0852676 0.183221 1 0 0
+-0.5 0.1942 -0.309567 1 0 0
+0.0630382 -0.0629364 0.320513 0 0 1
+-0.0711718 0.120724 -0.333333 0 0 1
+0.13005 0.293886 -0.371795 -0.0261254 -0.010885 0.999599
+-0.421167 -0.371795 0.0892688 0 1 0
+-0.279794 0.107637 0.371795 0 0 1
+-0.5 0.122127 -0.0712694 1 0 0
+-0.221181 -0.21389 0.371795 0 0 1
+-0.267866 0.371795 0.135612 0 1 0
+-0.480394 0.368976 -0.371795 0.034833 -0.393395 0.918709
+0.141109 -0.361981 0.311017 0.994969 0.10004 0.00532933
+0.487027 -0.0840993 -0.371795 0 0 1
+-0.498472 0.371795 -0.345998 0.843807 -0.532147 0.0693567
+0.434901 0.294872 -0.149775 0 1 0
+-0.20173 0.270495 -0.371795 0 0 1
+0.0121739 0.371795 0.252627 0 1 0
+-0.5 -0.128463 -0.359335 1 0 0
+0.141109 -0.349383 0.316775 0.97614 -0.0605427 -0.208529
+-0.448718 -0.368939 0.308077 0.720305 0.688496 -0.0844591
+0.390006 -0.371795 -0.156296 0 1 0
+-0.448718 -0.314501 -0.0903669 1 0 0
+-0.0440772 0.269132 0.320513 0 0 1
+-0.0350101 0.371795 0.221882 0 1 0
+0.5 0.168701 -0.285456 1 0 0
+0.214727 0.294872 0.138348 0 1 0
+-0.00995919 -0.174025 0.320513 0 0 1
+-0.312367 -0.08275 -0.333333 -0.209844 -0.0624537 0.975738
+0.141109 -0.354892 -0.194014 1 0 0
+0.141109 -0.337765 -0.0229247 1 0 0
+-0.5 -0.144238 0.0112023 1 0 0
+0.5 -0.146004 -0.323829 1 0 0
+0.387683 0.294872 -0.312707 0 1 0
+-0.214004 0.040095 -0.179475 0.361789 0.93225 -0.00437259
+0.41732 0.294872 0.108768 0 1 0
+0.414643 0.100998 -0.371795 0 0 1
+0.172465 -0.371795 0.252364 0 1 0
+-0.47923 -0.203712 -0.371795 0 0 1
+-0.235093 0.366404 -0.371795 0.00881623 -0.151896 0.988357
+0.430429 -0.181968 0.320513 0 0 1
+-0.141154 -0.34461 -0.00214335 1 0 0
+0.410629 -0.371795 -0.207354 0 1 0
+-0.363235 -0.101348 0.3668 0.862991 0.342289 -0.371597
+0.288685 -0.00328113 -0.333333 0 0 1
+0.442596 -0.200123 -0.371795 0 0 1
+0.384823 -0.371795 0.118461 0 1 0
+-0.439539 -0.28874 -0.371795 0 0 1
+0.290146 -0.0860452 0.371795 0 0 1
+0.31507 -0.0380845 0.371795 0 0 1
+-0.256514 -0.103168 -0.333333 0 0 1
+-0.5 -0.0624867 -0.264501 1 0 0
+-0.456884 -0.294872 0.210842 0.241724 0.968921 -0.0525538
+0.18786 0.0521729 0.320513 -0.0596594 0.00579609 0.998202
+0.251135 0.294872 -0.13274 0 1 0
+-0.0147203 -0.294872 -0.025878 0 1 0
+0.33183 0.154551 0.353576 0.800539 0.599281 0
+-0.394959 0.368787 -0.371795 -0.0311894 -0.659968 0.750646
+-0.219134 -0.0418382 -0.116905 -0.186187 0.982172 -0.025927
+-0.400089 -0.204399 -0.371795 0 0 1
+-0.122018 0.371795 -0.0803083 0 1 0
+0.152089 -0.0152713 -0.333333 0 0 1
+-0.5 0.0100492 -0.198694 1 0 0
+-0.374755 0.371795 0.126269 0 1 0
+-0.119345 0.065071 0.320513 0 0 1
+0.5 0.182522 -0.16098 1 0 0
+0.5 0.157359 -0.19697 1 0 0
+0.455574 -0.0487003 0.320513 0 0 1
+0.0259897 0.0173225 0.320513 0 0 1
+0.0816045 0.371795 -0.0730109 0 1 0
+0.0667506 -0.193358 0.362136 -0.322251 0.94599 0.0354532
+-0.5 0.313871 0.0769171 1 0 0
+0.153634 -0.371795 0.0267359 0 1 0
+0.327806 -0.312131 0.320513 0 0 1
+0.345165 0.136062 0.343287 0.855516 0.517765 -0.00358372
+0.243891 0.229997 -0.333333 0.0100308 0.406796 0.913464
+-0.152232 0.136656 0.364698 0.751113 -0.632598 0.188811
+-0.412526 0.371795 0.242635 0 1 0
+0.42418 -0.0767474 -0.371795 0 0 1
+-0.178515 0.288518 0.320513 0 0 1
+0.230732 0.294872 0.0696953 0 1 0
+0.5 0.0731925 0.289495 1 0 0
+-0.5 -0.0213333 0.2884 1 0 0
+-0.315184 0.371795 -0.327952 0 1 0
+-0.277842 -0.371795 -0.294513 0 1 0
+-0.200327 -0.0421968 0.355421 0.971243 0.238091 0.000235717
+-0.19823 0.281037 0.320513 0 0 1
+0.495043 0.219529 -0.371795 -0.224835 -0.1054 0.96868
+0.365 -0.0966189 0.349099 0.936955 -0.34945 0
+-0.0218354 0.141434 -0.333333 0 0 1
+0.145414 0.294872 0.116545 0.414265 0.908269 -0.0585826
+0.3299 0.0143699 -0.371795 0.0074391 0.00143633 0.999971
+-0.0401251 0.141439 -0.333333 0 0 1
+-0.5 0.106913 -0.0518921 1 0 0
+-0.439423 -0.347325 -0.371795 0.19054 0.0785689 0.97853
+0.23277 -0.0182354 0.371795 0 0 1
+-0.5 0.189804 -0.0518944 1 0 0
+-0.171953 0.371795 -0.106031 0 1 0
+-0.356756 -0.114834 0.327601 0.873603 0.483964 -0.0509599
+-0.335354 -0.371795 0.27952 0 1 0
+0.361857 -0.371795 0.241511 0 1 0
+0.386697 0.294872 -0.350544 0 1 0
+0.161647 0.0669012 -0.333333 0 0 1
+-0.043623 0.371795 -0.293091 0 1 0
+-0.280851 0.348268 0.320513 0 0 1
+-0.239354 0.0426554 -0.180941 -0.22103 0.97442 0.0406506
+-0.365132 0.371795 -0.0880101 0 1 0
+0.5 0.120895 -0.262118 1 0 0
+0.244474 -0.371795 -0.33334 0 1 0
+0.414646 0.294872 0.11086 0 1 0
+-0.252249 -0.371795 0.188013 0 1 0
+-0.5 -0.287008 -0.339544 0.994983 0.0876206 0.0482891
+-0.292061 -0.0714527 -0.333333 0 0 1
+0.140459 -0.160499 -0.333333 0 0 1
+0.5 -0.285534 0.20149 0.998041 -0.0578258 -0.0238707
+-0.490294 0.371795 -0.228328 -0.064882 0.997879 -0.00534436
+-0.314565 -0.371795 0.198127 0 1 0
+0.386172 -0.275931 0.320513 0 0 1
+-0.265195 -0.108432 0.371795 0 0 1
+-0.495168 -0.212341 -0.371795 0.252783 0.0538282 0.966025
+-0.5 0.152231 0.148188 1 0 0
+-0.274154 -0.00234664 -0.289391 0.999177 0.0392354 0.0103062
+-0.353555 -0.371795 0.174666 0 1 0
+-0.192973 -0.371795 -0.11633 0 1 0
+-0.100862 -0.256282 0.331604 0 1 0
+-0.194022 -0.371795 -0.0512163 0 1 0
+0.183753 0.277562 0.320513 0 0 1
+0.120722 0.256282 0.330928 0.0127245 0.993451 0.11355
+-0.354416 -0.361185 -0.371795 0 0 1
+0.454388 0.263007 -0.371795 0 0 1
+0.091254 0.361845 0.320513 0.031235 0.0772152 0.996525
+-0.286035 0.0498434 0.371795 0 0 1
+0.0532406 0.371795 0.30398 0 1 0
+-0.210475 0.0384496 -0.237532 0.476243 0.879299 -0.00516861
+-0.398497 0.319485 0.320513 0 0 1
+0.147153 -0.338584 0.320513 -0.0828636 0.0341227 0.995977
+-0.448718 -0.360804 -0.34708 1 0 0
+0.5 0.262327 -0.351247 1 0 0
+0.147126 0.142203 0.354803 0.735303 0.677739 0
+0.26267 -0.134257 0.371795 0 0 1
+0.5 0.0439813 0.279357 1 0 0
+0.5 -0.172636 0.30364 1 0 0
+-0.141154 -0.337865 -0.00630733 1 0 0
+0.221635 -0.364647 0.320513 -0.0115376 -0.282218 0.959281
+-0.5 -0.128655 -0.00572917 1 0 0
+-0.5 0.100875 0.196278 1 0 0
+0.0772684 0.371795 -0.136052 0 1 0
+0.5 -0.222399 -0.0446372 1 0 0
+0.103286 0.163937 -0.333333 0 0 1
+0.392219 0.294872 0.20077 0 1 0
+0.382361 0.294872 0.254919 0 1 0
+0.150401 -0.230897 -0.356289 0 1 0
+-0.0623096 -0.283241 -0.371795 0 0 1
+0.482554 0.294872 -0.0281661 0 1 0
+-0.5 0.0276736 0.034077 1 0 0
+-0.0027493 0.257865 -0.371795 0 0 1
+-0.358157 0.371795 -0.140218 0 1 0
+-0.182254 -0.371795 0.228484 0 1 0
+-0.5 0.142202 0.0194353 1 0 0
+-0.271046 -0.0163757 -0.122765 0.92722 0.374518 0
+-0.448718 -0.355005 -0.193166 1 0 0
+0.411365 -0.178044 -0.371795 0 0 1
+0.141026 0.301648 -0.0945267 0.979979 0.198784 -0.011231
+0.102332 0.371795 0.260447 0 1 0
+0.133186 -0.294872 -0.0215649 0.137255 0.989186 0.0516887
+-0.5 -0.118186 -0.33239 1 0 0
+-0.454628 0.0106462 0.320513 0 0 1
+-0.5 0.158001 0.292896 1 0 0
+-0.214618 0.0342285 -0.0318928 0.207647 0.479804 0.85245
+-0.0354671 -0.294872 -0.241455 0 1 0
+0.448718 -0.36506 -0.100052 0.988457 -0.132704 0.0730865
+-0.262973 0.152323 -0.333333 0 0 1
+0.117196 -0.179902 -0.333333 0 0 1
+-0.448718 -0.340558 -0.255919 1 0 0
+0.349477 0.149991 0.320513 0.0390594 0.00976659 0.999189
+-0.36201 -0.371795 -0.0460891 0 1 0
+0.107628 -0.174343 0.356667 -0.491592 0.870804 0.00614971
+0.0837907 0.371795 0.00416751 0 1 0
+0.120708 0.0401389 0.320513 0 0 1
+-0.5 0.0790486 -0.256817 1 0 0
+-0.409607 -0.305921 0.320513 0 0 1
+-0.5 -0.0881733 0.212631 1 0 0
+-0.0441215 -0.0752688 -0.333333 0 0 1
+0.0474557 -0.256282 0.352804 0 1 0
+-0.0089804 0.371795 0.272956 0 1 0
+0.346313 0.294872 -0.361808 0.00271326 0.999734 -0.0228829
+0.368563 0.294872 0.304346 0 1 0
+-0.177196 -0.371795 0.230381 0 1 0
+0.149794 -0.254738 0.32674 -0.095945 0.972916 -0.210307
+0.0993174 -0.294872 -0.0523454 0 1 0
+0.141109 -0.33802 -0.299723 1 0 0
+0.218973 0.0561175 -0.333333 0 0 1
+-0.399945 -0.371795 -0.289158 0 1 0
+-0.248459 0.282156 0.320513 0 0 1
+0.259875 -0.158298 0.371795 0 0 1
+-0.0941921 0.0511973 0.320513 0 0 1
+0.5 -0.177973 -0.122756 1 0 0
+0.5 -0.113096 0.266321 1 0 0
+0.0470843 0.371795 -0.102788 0 1 0
+-0.185427 0.369934 0.320513 -0.133479 0.464308 0.875558
+-0.209823 -0.0496548 -0.333333 0 0 1
+0.413702 0.294872 0.112091 0 1 0
+-0.15268 0.16596 -0.333333 0 0 1
+-0.391533 -0.184942 -0.371795 0 0 1
+0.463754 -0.294872 -0.359093 0 1 0
+-0.262848 0.371795 0.114866 0 1 0
+0.229977 -0.0383922 -0.0189232 0.0536526 0.998559 -0.00137003
+0.5 -0.250014 0.0638693 1 0 0
+-0.0271712 0.147817 -0.333333 0 0 1
+0.093711 -0.154371 -0.333333 0 0 1
+0.5 0.00390656 0.233111 1 0 0
+0.200962 0.280178 -0.371795 0 0 1
+-0.024412 0.256282 0.332784 0 1 0
+0.29904 -0.0308595 0.371795 0 0 1
+-0.0304153 -0.230897 -0.350287 0 1 0
+0.5 -0.111448 -0.0360785 1 0 0
+-0.273831 -0.00603817 -0.255025 0.989351 0.145377 -0.00712797
+0.169101 -0.371795 -0.311819 0 1 0
+0.0918026 -0.294872 -0.0899103 0 1 0
+-0.251316 -0.119949 -0.333333 0 0 1
+-0.5 0.217141 0.169337 1 0 0
+0.436577 -0.371795 -0.00776262 0 1 0
+0.06292 0.371795 -0.131366 0 1 0
+0.141109 -0.346787 -0.15327 1 0 0
+0.200442 -0.371795 -0.183106 0 1 0
+-0.395859 -0.093665 -0.371795 0 0 1
+-0.112499 -0.256282 0.368591 -0.0539897 0.854052 -0.517378
+0.5 0.262676 0.129809 1 0 0
+0.126482 0.371795 -0.0378752 0 1 0
+0.141109 -0.300877 0.137714 0.983011 0.0958904 -0.156505
+-0.5 0.0308229 0.299553 1 0 0
+0.173193 -0.371795 -0.311235 0 1 0
+0.448718 -0.339897 0.0406004 1 0 0
+-0.294859 -0.299088 0.320513 0 0 1
+0.363866 -0.371795 -0.249309 0 1 0
+-0.125299 0.371795 -0.307616 0 1 0
+0.375023 0.0679859 0.326626 0.954915 0.249116 0.161492
+-0.228817 0.043419 -0.0381326 -0.0526936 0.904177 0.423896
+0.197844 0.0520015 0.322151 -0.538969 -0.0610898 0.840108
+-0.260043 -0.0321369 -0.20601 0.663932 0.747696 0.0120633
+0.297734 0.294872 -0.345391 0 1 0
+-0.438818 0.371795 -0.0506963 0 1 0
+-0.264453 0.0276023 -0.0684419 0.739261 -0.673333 -0.0107214
+0.151194 -0.230897 -0.363565 0.0224193 0.978212 -0.206392
+-0.5 -0.0700366 -0.218608 1 0 0
+-0.357484 -0.177587 0.320513 0 0 1
+0.0874397 -0.0910779 0.320513 0 0 1
+0.179864 0.0986922 0.357715 0.874452 0.485092 0.00439091
+-0.103215 0.133835 -0.333333 0 0 1
+0.164547 -0.188199 0.371795 0 0 1
+0.164735 -0.371795 0.233193 0 1 0
+-0.5 0.0221515 0.256353 1 0 0
+-0.448718 -0.298853 0.0958626 0.915509 0.39073 0.0957803
+0.199128 -0.0474787 -0.333333 0 0 1
+0.5 0.204113 -0.122938 1 0 0
+-0.251918 0.209 -0.333333 0 0 1
+0.448718 -0.34341 0.146889 1 0 0
+-0.179507 -0.371795 -0.341532 0 1 0
+-0.0457926 -0.294872 -0.184543 0 1 0
+0.5 0.214255 0.0233912 1 0 0
+-0.5 0.083928 -0.019721 1 0 0
+-0.5 0.207018 -0.268643 1 0 0
+-0.190595 -0.0165964 -0.0675566 0.912928 -0.408121 0
+-0.352406 -0.371795 0.213293 0 1 0
+0.0433448 0.345567 -0.371795 0 0 1
+0.194589 -0.371795 0.146956 0 1 0
+0.335447 -0.371795 0.313146 -0.0126716 0.995354 -0.0954406
+-0.215576 -0.0625397 -0.333333 0 0 1
+-0.204664 0.0347318 -0.0772689 0.603031 0.797505 -0.0184119
+-0.116974 -0.000487012 0.320513 0 0 1
+0.415147 0.294872 -0.00823774 0 1 0
+0.5 0.0184287 0.0167176 1 0 0
+0.5 -0.0490793 0.296891 1 0 0
+-0.0188298 0.205114 0.371795 0.0678228 -0.517498 0.852993
+0.265331 0.016543 -0.240311 0.885243 0.464357 0.026774
+0.255347 -0.371795 -0.156578 0 1 0
+-0.0395692 -0.294872 0.157669 0 1 0
+0.5 -0.176829 -0.0452421 1 0 0
+0.308407 -0.064977 -0.333333 0 0 1
+0.392872 -0.371795 -0.144484 0 1 0
+0.00550481 -0.0924915 -0.333333 0 0 1
+-0.14581 0.371795 0.144222 0 1 0
+0.340541 0.294872 -0.288599 0 1 0
+-0.419062 0.16202 0.320513 0 0 1
+-0.401334 -0.371795 0.0621928 0 1 0
+-0.5 0.0393962 -0.0379992 1 0 0
+-0.369757 -0.263627 0.320513 0 0 1
+0.219301 0.198538 -0.333333 0 0 1
+0.216732 -0.371795 -0.212536 0 1 0
+0.0738917 -0.143366 -0.333333 0 0 1
+-0.5 -0.127333 0.267091 1 0 0
+0.228097 0.294872 0.149842 0 1 0
+0.416472 0.0699031 0.320513 0 0 1
+0.452129 -0.294872 -0.176927 -0.38646 0.905467 0.175438
+0.447352 -0.21739 0.320513 0 0 1
+-0.179204 0.371795 -0.183278 0 1 0
+0.124678 -0.116128 0.320513 0 0 1
+0.204811 -0.30518 0.320513 0 0 1
+-0.448718 -0.322025 0.170522 1 0 0
+0.233149 -0.0382533 -0.28471 -0.0809649 0.996709 0.00402798
+-0.257918 0.371795 -0.298138 0 1 0
+0.0823639 0.00233119 -0.333333 0 0 1
+-0.287348 0.248215 -0.371795 0 0 1
+0.168302 -0.246792 -0.371795 0 0 1
+0.306755 0.294872 -0.199743 0 1 0
+-0.0512994 0.25962 0.320513 0.0310524 0.4238 0.905223
+-0.345816 -0.068323 -0.371795 0 0 1
+0.178513 0.294872 -0.0824487 0 1 0
+-0.0702432 -0.294872 -0.0624466 0 1 0
+0.11782 -0.248634 0.371795 0.0392775 -0.173857 0.983987
+0.413185 0.294872 -0.237362 0 1 0
+0.381823 0.294872 -0.267097 0 1 0
+0.285458 -0.371795 0.0387503 0 1 0
+0.138754 -0.294872 0.250268 0.674479 0.738187 -0.0125589
+-0.453913 -0.0361411 -0.371795 0 0 1
+0.231458 -0.23432 0.347171 -0.396396 0.918049 0.00742389
+0.5 -0.243348 0.184306 1 0 0
+-0.5 -0.199742 -0.0923864 1 0 0
+0.264496 -0.0183349 -0.0221284 0.858394 -0.512795 -0.0141951
+-0.112942 0.234312 -0.371795 -0.249921 0.557858 0.791412
+-0.288754 0.0432435 0.371795 0 0 1
+-0.267121 0.371795 0.078774 0 1 0
+-0.245387 -0.0187248 0.371795 0 0 1
+0.155544 0.00820973 0.320513 0 0 1
+0.0836784 -0.294872 -0.0434002 0 1 0
+0.488247 0.129451 -0.371795 -0.0382021 0.0275233 0.998891
+-0.251161 0.06858 0.371795 0 0 1
+-0.5 -0.0428397 0.141298 1 0 0
+-0.402687 -0.371795 0.106666 0 1 0
+-0.197836 -0.371795 0.284223 0 1 0
+-0.448718 -0.333886 -0.312984 1 0 0
+0.00164299 0.131511 0.320513 0 0 1
+-0.5 0.0615471 0.25213 1 0 0
+-0.277187 -0.227654 0.320513 0 0 1
+-0.451672 0.208922 -0.371795 0 0 1
+0.344455 -0.371795 0.149128 0 1 0
+-0.489628 -0.0252482 0.320513 0 0 1
+-0.0130864 0.371795 -0.0167648 0 1 0
+-0.273873 0.00555203 -0.283576 0.986223 -0.16493 0.0127187
+-0.457269 0.371795 -0.292623 0 1 0
+-0.5 -0.227334 0.230512 1 0 0
+0.217065 0.294872 0.203626 0 1 0
+-0.357058 0.0798518 -0.371795 0 0 1
+-0.5 -0.294162 -0.166466 0.84092 0.533417 -0.091211
+0.0252585 -0.203169 0.342103 -0.152371 0.988321 0.00225896
+-0.188146 0.371795 -0.240121 0 1 0
+0.472905 -0.294872 -0.0128421 0 1 0
+0.497203 -0.294872 0.0708971 -0.664334 0.745517 -0.0535184
+0.459169 0.0122636 -0.371795 0 0 1
+0.00447608 -0.248779 -0.371795 0 0 1
+-0.303444 -0.191748 0.320513 -0.271145 -0.369385 0.888839
+0.351033 -0.371795 0.0415858 0 1 0
+0.141026 0.349726 -0.354052 1 0 0
+0.104761 0.371795 0.235639 0 1 0
+-0.0889754 0.0799266 -0.333333 0 0 1
+0.5 -0.142356 -0.212661 1 0 0
+-0.229176 -0.371795 -0.244186 0 1 0
+-0.141154 -0.365854 0.104754 0.952064 -0.305498 0.0156359
+-0.0979203 -0.294872 -0.221343 0 1 0
+0.5 0.17213 -0.275047 1 0 0
+-0.295844 0.371795 0.285746 0 1 0
+-0.276675 -0.119892 0.371795 0 0 1
+-0.5 -0.187171 -0.00376868 1 0 0
+0.064743 0.122739 -0.333333 0 0 1
+0.448718 -0.369856 0.0620814 0.808769 -0.582489 -0.081241
+-0.455528 -0.294872 0.0876004 0.173745 0.984771 0.00622831
+-0.223681 -0.371795 0.212491 0 1 0
+0.271565 -0.259453 -0.371795 0 0 1
+0.418225 -0.371795 0.240149 0 1 0
+-0.5 0.0716563 0.196021 1 0 0
+-0.0369323 -0.294872 -0.0894353 0 1 0
+-0.375258 0.235596 -0.371795 0 0 1
+-0.5 -0.225412 -0.0438908 1 0 0
+-0.5 -0.0332272 0.0450483 1 0 0
+-0.5 -0.197496 -0.3225 1 0 0
+-0.5 -0.0762064 0.263379 1 0 0
+-0.411254 0.371795 -0.16351 0 1 0
+-0.460379 -0.205726 0.320513 0 0 1
+0.489539 -0.294872 0.206163 -0.0619198 0.998057 0.00696689
+0.261439 0.294872 0.00900268 0 1 0
+0.5 -0.289123 -0.243809 0.966831 -0.241821 -0.0822231
+-0.254344 -0.315202 -0.371795 0 0 1
+-0.5 0.279054 0.124568 1 0 0
+-0.256043 0.371795 -0.15306 0 1 0
+0.0975763 -0.141851 0.320513 0 0 1
+0.447848 -0.371795 0.269288 0.769454 -0.638666 -0.00678178
+0.47939 0.294872 0.124481 0 1 0
+-0.352225 -0.371795 -0.240697 0 1 0
+-0.453577 -0.294872 0.291416 0.225175 0.97245 0.0603107
+0.448718 -0.362422 -0.254168 0.998234 -0.0593791 0.00147341
+-0.2667 0.107625 0.371795 0 0 1
+-0.5 0.26051 -0.150266 1 0 0
+-0.5 -0.193172 0.262191 1 0 0
+0.448718 -0.359192 0.0671877 1 0 0
+0.0425261 -0.179036 -0.333333 0 0 1
+0.5 -0.282646 -0.284126 1 0 0
+0.245142 -0.371795 0.179352 0 1 0
+-0.5 0.231381 0.0301691 1 0 0
+0.0681348 -0.294872 0.125073 0 1 0
+0.247665 -0.11618 0.371795 0 0 1
+0.5 0.268417 -0.216281 1 0 0
+0.251263 -0.0312176 0.371795 0 0 1
+-0.433027 -0.371795 -0.365035 -0.0190351 0.989366 0.144198
+0.394642 -0.0760316 0.320513 0 0 1
+0.448718 -0.319759 -0.0816745 1 0 0
+-0.188634 -0.361619 -0.371795 -0.0775735 0.166375 0.983006
+-0.203881 0.0165957 0.3372 0.996584 -0.0825841 0
+-0.479414 0.359795 0.320513 0 0 1
+-0.5 0.333535 0.0753185 1 0 0
+0.450541 0.294872 -0.258788 0 1 0
+-0.122975 -0.0810313 0.320513 0 0 1
+0.5 0.0658742 0.114769 1 0 0
+-0.0630867 -0.0211154 -0.333333 0 0 1
+0.5 0.0148224 0.255091 1 0 0
+-0.0424623 0.153341 0.320513 0 0 1
+-0.292001 0.196704 0.356251 -0.625157 0.780499 0
+0.276756 -0.236109 -0.371795 0 0 1
+0.0853346 -0.294872 -0.292445 0 1 0
+0.448718 -0.330821 -0.158405 1 0 0
+0.5 -0.227018 -0.0494517 1 0 0
+-0.433264 -0.371795 0.112625 0 1 0
+0.128519 0.371795 -0.318378 0 1 0
+-0.479757 0.371795 -0.273 0 1 0
+-0.109845 0.167629 -0.333333 0 0 1
+0.268967 0.294872 -0.0946211 0 1 0
+-0.126608 0.332222 -0.371795 0 0 1
+-0.376571 0.371795 -0.213654 0 1 0
+0.477105 0.0863969 -0.371795 0 0 1
+0.5 -0.147767 -0.0558567 1 0 0
+-0.245691 -0.0409548 -0.218403 0.340904 0.940097 0.00158344
+0.141026 0.309104 0.223917 1 0 0
+-0.18771 0.00606198 -0.0420273 0.966012 0.179682 0.185837
+-0.141154 -0.367513 0.105568 0.930253 -0.366897 -0.00409567
+0.5 -0.04856 -0.0410983 1 0 0
+0.405955 -0.300343 0.320513 0 0 1
+0.0266926 -0.294872 0.106663 0 1 0
+-0.168331 0.0915718 -0.333333 0 0 1
+0.148821 0.23024 -0.333333 -0.174885 0.933313 0.313596
+0.32031 0.294872 0.162492 0 1 0
+0.5 -0.164482 0.100247 1 0 0
+-0.115336 -0.258486 0.320513 0.0435521 0.737869 -0.673537
+0.445385 -0.338045 0.320513 0.491815 -0.0433967 0.869618
+-0.214607 0.085213 -0.333333 0 0 1
+-0.365061 0.153606 0.320513 0 0 1
+0.433332 -0.298569 -0.371795 0 0 1
+0.33623 -0.195746 -0.371795 0 0 1
+-0.5 0.336281 0.160316 1 0 0
+-0.448718 -0.308924 -0.299758 1 0 0
+0.412672 0.129772 -0.371795 0 0 1
+-0.347744 -0.371795 -0.165508 0 1 0
+-0.5 0.234889 0.0848289 1 0 0
+-0.5 -0.150696 0.235327 1 0 0
+0.5 0.248266 0.192134 1 0 0
+-0.420589 0.100793 -0.371795 0 0 1
+-0.290856 -0.371795 -0.0228088 0 1 0
+0.323223 0.294872 0.153487 0 1 0
+-0.081033 -0.171777 0.320513 0 0 1
+0.13571 0.0285667 0.320513 0 0 1
+-0.0817101 -0.188222 0.347647 0.387333 0.921831 0.0141729
+0.0984462 0.371795 -0.201781 0 1 0
+-0.343334 -0.139183 0.340905 0.831027 0.556221 -0.00360618
+0.488715 0.294872 -0.181099 0 1 0
+0.141109 -0.338849 0.248512 1 0 0
+0.269875 0.294872 0.176718 0 1 0
+0.298965 0.179435 -0.333333 0 0 1
+-0.221999 0.0426058 -0.266795 0.196037 0.980595 -0.00141608
+-0.5 0.278343 0.271294 1 0 0
+-0.249169 -0.371795 0.220411 0 1 0
+-0.275954 0.371795 -0.165276 0 1 0
+0.0440774 0.371795 0.0622879 0 1 0
+0.354787 -0.371795 -0.34675 0 1 0
+-0.209766 0.371795 0.202405 0 1 0
+0.5 0.171932 0.00361272 1 0 0
+0.5 -0.00578892 -0.12597 1 0 0
+0.0416389 0.371795 0.182948 0 1 0
+0.458294 0.0336271 0.320513 0 0 1
+0.34915 0.140982 0.320513 0.211376 0.279839 0.936488
+-0.5 0.343383 -0.215427 1 0 0
+-0.0915988 -0.294872 -0.113598 0 1 0
+-0.0902159 0.371795 0.126636 0 1 0
+0.0975722 -0.248707 -0.371795 0 0 1
+-0.5 -0.0899488 0.0669696 1 0 0
+-0.5 0.00183912 0.0648181 1 0 0
+-0.26937 -0.371795 -0.217795 0 1 0
+-0.180222 -0.322484 0.320513 0 0 1
+0.144013 -0.0886786 -0.333333 0 0 1
+0.0136278 -0.294872 -0.315603 0 1 0
+-0.25149 0.371795 0.0043831 0 1 0
+0.335551 0.294872 -0.328668 0 1 0
+-0.365059 -0.0349086 0.371795 0 0 1
+0.377352 -0.0710275 -0.371795 0 0 1
+0.425909 0.294872 0.159022 0 1 0
+0.231379 0.234349 0.355414 0.387368 0.921922 -0.00245214
+-0.206373 -0.371795 0.0525734 0 1 0
+-0.479559 -0.294872 0.260311 0 1 0
+-0.0888528 0.371795 -0.265635 0 1 0
+0.169729 -0.371795 -0.104435 0 1 0
+0.183287 -0.249625 0.351579 -0.212552 0.97715 0
+0.0151403 0.350959 -0.371795 0 0 1
+0.5 -0.278807 0.198436 1 0 0
+-0.5 -0.194791 0.226705 1 0 0
+-0.442157 -0.371795 0.0852486 0.0864241 0.99614 0.0153814
+-0.5 -0.256269 0.093114 1 0 0
+0.214562 -0.371795 0.115401 0 1 0
+-0.448718 -0.302767 -0.26003 0.999716 0.022308 -0.00833181
+0.0916296 -0.294872 0.227294 0 1 0
+-0.0503274 -0.154995 0.320513 0 0 1
+-0.372629 -0.371795 0.214404 0 1 0
+-0.124976 -0.289114 0.320513 0.0218617 -0.295717 0.955025
+-0.126188 -0.294872 -0.078421 0 1 0
+0.158558 -0.371795 -0.0895641 0 1 0
+0.167341 -0.253094 0.338696 -0.170031 0.98541 -0.00747172
+0.0314206 -0.0160901 -0.333333 0 0 1
+0.0663254 0.230897 -0.348201 0 1 0
+0.448718 -0.343424 0.189433 1 0 0
+-0.251107 -0.371795 0.133503 0 1 0
+-0.184255 0.115821 -0.333333 0 0 1
+-0.165702 0.308651 0.320513 0 0 1
+0.5 0.183497 -0.0769749 1 0 0
+-0.250931 -0.0514985 0.371795 0 0 1
+-0.258112 0.0338651 -0.111508 -0.636909 0.770188 0.0340139
+-0.5 -0.198527 -0.294733 1 0 0
+-0.37034 0.140936 0.320513 0 0 1
+-0.33309 0.371795 -0.322934 0 1 0
+-0.446155 -0.371795 -0.188554 0.0774012 0.99666 -0.0260536
+-0.170813 -0.112545 0.326349 0.863393 0.458634 0.210257
+-0.5 -0.0881606 -0.244707 1 0 0
+0.422011 -0.371795 -0.355681 0 1 0
+-0.0445046 -0.169605 0.320513 0 0 1
+0.316368 0.0291113 -0.333333 0.484361 0.184713 0.855146
+0.150015 -0.285483 -0.371795 0 0 1
+-0.5 -0.247585 -0.31451 1 0 0
+-0.134137 0.255858 0.348113 -0.0712621 0.997458 0
+-0.216196 -0.0915974 -0.333333 0 0 1
+-0.419239 0.371795 0.0115253 0 1 0
+-0.5 -0.0685081 0.175023 1 0 0
+0.141349 -0.156772 0.371795 -0.16463 0.307138 0.937317
+0.141026 0.297809 -0.331198 0.937974 0.344447 -0.0395041
+0.254492 0.0301632 -0.26086 0.633147 0.774028 -0.00224182
+-0.435702 -0.371795 -0.004444 0 1 0
+0.5 0.23451 -0.279796 1 0 0
+-0.5 0.308023 -0.178336 1 0 0
+0.5 -0.141655 -0.226287 1 0 0
+-0.473129 0.220345 -0.371795 0 0 1
+-0.320013 0.0586388 -0.333333 -0.601859 -0.00682609 0.798573
+-0.5 0.0584643 -0.210563 1 0 0
+0.114694 0.371795 -0.18382 0 1 0
+0.25892 0.202099 -0.333333 0 0 1
+-0.218914 0.0417791 -0.0696056 0.286617 0.958015 0.00758299
+-0.256987 -0.371795 -0.0285391 0 1 0
+-0.18842 0.00972847 -0.0877009 0.971554 0.236801 0.00280099
+-0.162001 0.147889 -0.333333 0 0 1
+0.279452 -0.00686782 0.371795 0 0 1
+-0.5 0.254511 0.0256386 1 0 0
+-0.5 0.263442 -0.23064 1 0 0
+-0.5 -0.201853 -0.109454 1 0 0
+-0.211618 -0.265647 0.320513 0 0 1
+0.496315 -0.294872 -0.103433 -0.444535 0.895253 -0.0301761
+-0.117514 0.371795 -0.0912289 0 1 0
+-0.380423 0.371795 -0.185462 0 1 0
+-0.286455 -0.308876 0.320513 0 0 1
+-0.304911 -0.0156999 0.371795 0 0 1
+-0.494561 0.371795 0.122461 -0.247481 0.959518 -0.134456
+-0.254403 0.371795 -0.296714 0 1 0
+0.258064 -0.114081 0.371795 0 0 1
+0.292642 0.294872 0.317231 0.0179766 0.963535 0.266978
+0.448718 -0.347129 0.2333 1 0 0
+0.495232 -0.294872 -0.282838 -0.365748 0.918583 -0.149776
+-0.111274 -0.261723 0.320513 0.12481 -0.52457 0.842169
+-0.43637 -0.371795 -0.361472 0 1 0
+0.447201 -0.371795 0.162773 -0.39383 0.915298 0.0844261
+-0.202434 0.0330752 -0.0678366 0.640134 0.768261 -0.00191047
+0.175843 0.294872 0.153499 0 1 0
+0.442445 -0.371795 0.147543 -0.329326 0.936687 -0.119006
+0.040138 -0.294872 0.284708 0 1 0
+-0.5 -0.231099 -0.0016296 1 0 0
+0.184981 0.173833 -0.333333 0 0 1
+-0.311264 -0.371795 0.162708 0 1 0
+0.141109 -0.344384 -0.230503 1 0 0
+0.290735 0.154732 0.371795 0 0 1
+-0.181024 0.371795 -0.292386 0 1 0
+-0.5 0.176569 0.272075 1 0 0
+0.361784 -0.105241 0.335356 0.90842 -0.41802 -0.00565022
+-0.444223 -0.371795 0.25002 0.354586 0.911585 -0.208041
+0.0198451 0.371795 0.0104955 0 1 0
+0.141109 -0.362484 -0.272138 0.997434 0.0664401 -0.0266667
+-0.106895 0.371795 -0.189295 0 1 0
+-0.5 0.311192 0.27833 1 0 0
+-0.5 -0.0306325 -0.0475329 1 0 0
+-0.141154 -0.338557 -0.0129378 1 0 0
+0.5 -0.256048 -0.323109 1 0 0
+0.5 -0.219843 -0.126112 1 0 0
+0.0468714 0.29154 0.320513 0 0 1
+0.00371506 -0.294872 0.276483 0 1 0
+-0.436381 0.299713 0.320513 0 0 1
+-0.5 0.351991 -0.145286 1 0 0
+0.190618 0.294872 -0.041906 0 1 0
+-0.337188 -0.371795 -0.363649 -0.00356987 0.999699 0.0242617
+0.293735 0.274211 0.320513 0 0 1
+-0.5 0.202043 -0.117912 1 0 0
+-0.429927 0.371795 0.223182 0 1 0
+-0.277308 -0.207703 0.321738 0.500312 0.575801 -0.646638
+0.200823 0.294872 -0.15223 0 1 0
+0.393418 -0.371795 0.0860837 0 1 0
+-0.127568 0.371795 -0.17056 0 1 0
+0.0389837 0.242162 0.371795 0 0 1
+-0.189705 -0.169898 0.371795 0 0 1
+0.0910035 -0.294872 -0.0916416 0 1 0
+0.194992 0.00310765 0.00144958 0.832236 -0.129506 -0.539084
+-0.297655 -0.371146 0.320513 -0.153496 0.750154 -0.643201
+0.215159 -0.0773885 0.371795 0 0 1
+-0.459111 -0.156086 0.320513 0 0 1
+-0.00678615 0.371795 0.0573511 0 1 0
+-0.288504 -0.371795 -0.0185481 0 1 0
+-0.0115343 0.321252 -0.371795 0 0 1
+-0.5 0.00765951 -0.207931 1 0 0
+-0.464948 0.236538 -0.371795 0 0 1
+0.5 -0.0424724 -0.251581 1 0 0
+-0.0910159 0.230897 -0.334909 -0.0709979 0.782943 0.618028
+-0.0187974 0.371795 -0.222042 0 1 0
+-0.263634 -0.371795 0.31528 0.0530995 0.977917 -0.202138
+0.5 -0.193873 -0.16705 1 0 0
+-0.25662 0.317856 0.320513 0 0 1
+-0.385024 -0.371795 0.182501 0 1 0
+-0.463118 0.371795 -0.298827 0 1 0
+0.41291 0.294872 0.112292 0 1 0
+0.392626 -0.0471349 -0.371795 0 0 1
+-0.5 0.101217 0.0417231 1 0 0
+0.00798725 0.371795 0.151585 0 1 0
+0.234327 -0.0381503 -0.182132 -0.0884346 0.996056 -0.00715856
+-0.265893 -0.371795 -0.200644 0 1 0
+-0.5 0.0791405 0.0699324 1 0 0
+-0.231755 -0.365711 0.320513 0.227512 -0.286126 0.93079
+0.149322 -0.371795 -0.158083 0.0747988 0.996357 -0.0409697
+-0.310554 0.371795 0.0206453 0 1 0
+0.102337 -0.162338 0.320513 0 0 1
+-0.133244 0.0408677 -0.333333 0 0 1
+-0.275384 0.11225 -0.333333 0 0 1
+-0.320314 0.371795 -0.306993 0 1 0
+0.205316 0.294872 0.17337 0 1 0
+-0.162445 -0.371795 -0.0846706 0 1 0
+0.5 0.280529 -0.331241 1 0 0
+0.448718 -0.338282 -0.0951129 1 0 0
+0.0996182 0.371795 0.152096 0 1 0
+-0.5 0.208839 -0.332557 1 0 0
+-0.0884682 0.315591 -0.371795 0 0 1
+-0.141154 -0.316986 -0.179539 1 0 0
+-0.5 -0.0556154 -0.195207 1 0 0
+0.141109 -0.333124 -0.00518983 1 0 0
+-0.429096 -0.106596 -0.371795 0 0 1
+0.5 -0.130478 -0.101344 1 0 0
+-0.0712832 -0.0924133 -0.333333 0 0 1
+-0.5 0.101211 -0.164284 1 0 0
+0.379509 -0.110198 -0.371795 0 0 1
+0.289792 -0.112564 -0.333333 0 0 1
+-0.26943 -0.213601 0.343054 0.573521 0.819146 -0.00856685
+0.327785 -0.353154 -0.371795 0 0 1
+0.158933 0.294872 -0.317587 0 1 0
+-0.5 -0.0166124 0.0111043 1 0 0
+-0.302368 -0.371795 -0.324441 0 1 0
+-0.0388164 0.158868 0.320513 0 0 1
+-0.141154 -0.368304 -0.177391 0.962745 -0.264085 -0.0581541
+0.208343 0.00116128 0.00957415 -0.488169 0.0500914 0.871311
+-0.5 -0.00888795 0.0750822 1 0 0
+0.490353 -0.294872 -0.0457168 -0.132557 0.991092 -0.0128899
+-0.5 -0.152999 0.18929 1 0 0
+-0.448718 -0.341282 -0.11916 1 0 0
+-0.270529 -0.371795 0.108037 0 1 0
+-0.5 -0.170037 0.0361353 1 0 0
+0.5 -0.0716003 -0.125883 1 0 0
+-0.133267 -0.294872 -0.0319847 -0.0612191 0.997559 -0.033583
+-0.277526 -0.364084 -0.371795 -0.0876331 0.132006 0.987368
+-0.445709 0.314342 -0.371795 0 0 1
+0.5 -0.126294 -0.0278619 1 0 0
+-0.236881 0.0689011 -0.333333 0 0 1
+-0.141154 -0.332187 0.149094 1 0 0
+0.0193689 -0.294872 -0.116265 0 1 0
+-0.5 0.0828789 0.224323 1 0 0
+-0.0162838 -0.230897 -0.34445 0 1 0
+-0.456071 0.2159 -0.371795 0 0 1
+0.45409 0.294872 -0.240458 0 1 0
+-0.192572 0.170545 0.371795 0 0 1
+-0.311762 -0.371795 -0.330511 0 1 0
+-0.433672 -0.371795 0.259622 0 1 0
+0.258992 0.18863 0.371795 0 0 1
+-0.141154 -0.353089 -0.346578 1 0 0
+0.391312 -0.164711 0.320513 0 0 1
+0.5 -0.176437 -0.0612073 1 0 0
+0.0485213 0.230897 -0.365131 -0.059203 0.954642 0.291811
+0.314314 0.294872 0.0795243 0 1 0
+-0.5 0.134973 0.29538 1 0 0
+-0.324181 0.329405 0.320513 0 0 1
+0.0481838 0.292662 -0.371795 0 0 1
+0.469795 -0.0646423 0.320513 0 0 1
+-0.0716375 -0.206389 0.371795 0 0 1
+-0.359735 -0.369414 0.320513 0.0691905 -0.522428 0.849872
+-0.5 -0.284753 0.290309 1 0 0
+-0.206066 0.243791 0.331141 -0.312863 0.94612 0.0835139
+-0.373478 -0.371795 0.189609 0 1 0
+-0.5 0.0692719 -0.187937 1 0 0
+-0.359505 -0.0223506 -0.371795 0 0 1
+-0.448718 -0.348334 0.240162 1 0 0
+0.131758 -0.294872 -0.0130397 0.0220181 0.999756 0.00166294
+-0.406143 0.371795 0.0320264 0 1 0
+-0.188045 0.371795 -0.241152 0 1 0
+-0.366385 -0.236147 0.320513 0 0 1
+-0.189672 0.371795 0.251337 0 1 0
+0.479048 -0.294872 -0.0604841 0 1 0
+-0.229142 -0.0434474 -0.0702526 -0.0536475 0.998488 -0.011989
+-0.5 0.0767853 0.316586 0.838308 0.0365649 -0.543969
+0.276996 -0.371795 -0.0911957 0 1 0
+-0.124866 0.209883 0.371795 0 0 1
+0.242718 0.294872 -0.301862 0 1 0
+0.5 0.130523 0.0157359 1 0 0
+-0.27914 0.371795 -0.0393523 0 1 0
+-0.326726 -0.371795 0.0307765 0 1 0
+-0.45491 0.351993 0.320513 0 0 1
+0.141109 -0.330173 0.155766 1 0 0
+-0.04671 -0.294872 -0.33556 0 1 0
+-0.5 0.252646 -0.0795046 1 0 0
+0.47745 -0.0594788 0.320513 0 0 1
+-0.5 -0.124341 -0.147378 1 0 0
+0.304054 0.201223 -0.339756 0.779323 0.568414 0.263744
+-0.275353 0.371795 -0.145007 0 1 0
+0.185253 0.294872 0.228869 0 1 0
+0.00121364 0.371795 0.164202 0 1 0
+0.018835 -0.294872 -0.295112 0 1 0
+0.344539 0.294872 -0.00784582 0 1 0
+0.292176 0.294872 -0.15979 0 1 0
+-0.5 -0.0998847 -0.188367 1 0 0
+-0.0209885 0.371795 -0.211826 0 1 0
+0.5 0.214809 -0.0820223 1 0 0
+0.461901 -0.162962 -0.371795 0 0 1
+0.448718 -0.368733 -0.360069 0.902797 -0.428019 0.041928
+-0.10527 -0.013654 -0.333333 0 0 1
+-0.0387779 0.371795 -0.0248973 0 1 0
+-0.35609 0.258421 0.320513 0 0 1
+-0.379673 0.371795 0.195978 0 1 0
+-0.159601 -0.371795 -0.136552 0 1 0
+-0.296287 -0.35552 -0.371795 0 0 1
+-0.40793 -0.371795 -0.185055 0 1 0
+0.228083 0.294872 -0.227386 0 1 0
+-0.217335 0.371795 0.0675767 0 1 0
+0.302384 0.053649 0.371795 0 0 1
+-0.266439 0.254759 -0.371795 0 0 1
+0.5 -0.203108 0.00612409 1 0 0
+0.128362 -0.294872 -0.190793 0 1 0
+-0.352514 -0.371795 -0.20014 0 1 0
+0.448718 -0.33817 0.304018 1 0 0
+-0.0159612 -0.294872 0.0232589 0 1 0
+0.5 0.048045 0.242929 1 0 0
+0.5 -0.0798298 0.163062 1 0 0
+-0.448718 -0.345301 0.128243 1 0 0
+0.313367 0.0435484 -0.333333 0.232556 -0.0285282 0.972165
+0.427628 -0.299399 -0.371795 0 0 1
+0.402236 0.294872 -0.111547 0 1 0
+-0.121467 0.143901 -0.333333 0 0 1
+0.24455 -0.371795 0.0163888 0 1 0
+-0.190311 0.230897 -0.366975 0.0788136 0.921182 0.381068
+-0.467677 0.0150705 0.320513 0 0 1
+0.0853158 -0.101829 -0.333333 0 0 1
+-0.5 -0.130031 0.154846 1 0 0
+-0.0785585 -0.294872 0.0750947 0 1 0
+-0.5 0.218068 -0.22823 1 0 0
+0.261014 -0.0236056 -0.119483 0.759607 -0.650209 -0.015018
+0.32739 -0.270587 0.320513 0 0 1
+-0.5 0.194318 -0.0048327 1 0 0
+-0.20223 -0.230897 -0.371432 0.117268 0.753849 -0.646498
+-0.267984 0.371795 -0.12952 0 1 0
+-0.0166671 -0.294872 0.252974 0 1 0
+-0.0375668 0.256282 0.354665 0 1 0
+0.0326848 0.150878 -0.333333 0 0 1
+0.23699 -0.279952 0.320513 0 0 1
+-0.352373 0.371795 -0.166062 0 1 0
+0.270044 -0.371795 0.0510282 0 1 0
+0.085224 0.159497 0.320513 0 0 1
+0.130706 0.234681 0.371795 0 0 1
+0.189337 0.00387822 0.320513 0 0 1
+-0.448718 -0.363884 -0.197264 0.959775 0.246733 -0.133997
+0.209534 0.294872 0.264716 0 1 0
+-0.5 -0.0787768 0.283456 1 0 0
+-0.479785 0.0441147 0.320513 0 0 1
+0.377415 -0.371795 0.139004 0 1 0
+-0.5 -0.0835512 -0.156811 1 0 0
+0.0647991 -0.294872 0.260434 0 1 0
+-0.230676 -0.0435816 -0.0373202 0.0407859 0.961264 -0.272596
+-0.5 -0.0174192 0.0893852 1 0 0
+-0.5 0.15062 0.100329 1 0 0
+0.234637 0.294872 0.311787 0.027737 0.983592 0.178264
+0.5 -0.219493 0.281211 1 0 0
+0.0910317 -0.294872 0.130539 0 1 0
+0.349452 -0.122838 -0.371795 0 0 1
+0.5 -0.185723 -0.113128 1 0 0
+-0.408213 -0.371795 0.0399319 0 1 0
+-0.441523 0.213478 -0.371795 0 0 1
+0.391335 -0.0892322 0.320513 0 0 1
+0.16147 -0.371795 -0.108541 0 1 0
+-0.5 -0.210023 0.218587 1 0 0
+-0.5 -0.271736 0.224922 1 0 0
+0.448718 -0.350718 0.191051 1 0 0
+-0.264464 0.371795 -0.201815 0 1 0
+0.485178 -0.294872 -0.083893 0 1 0
+0.0370326 -0.214109 -0.333333 0 0 1
+0.26775 -0.371795 -0.0601808 0 1 0
+0.141026 0.353004 -0.157005 1 0 0
+-0.00376083 0.371795 0.20146 0 1 0
+-0.237261 0.168506 -0.333333 0 0 1
+0.482118 0.0686263 -0.371795 0 0 1
+-0.332632 -0.044283 0.371795 0 0 1
+0.141026 0.343278 0.0622962 1 0 0
+0.123448 0.371795 0.199352 0 1 0
+0.425898 0.294872 -0.21417 0 1 0
+0.0616072 -0.230835 -0.333333 -0.0897023 -0.6451 0.758814
+-0.171504 0.353171 -0.371795 0 0 1
+0.444296 -0.0207572 -0.371795 0 0 1
+0.299177 -0.371795 0.257213 0 1 0
+0.0809684 -0.294872 0.255884 0 1 0
+0.302616 -0.371795 -0.327764 0 1 0
+-0.259363 -0.0328164 -0.112715 0.643926 0.765088 0
+-0.313944 -0.371795 0.256212 0 1 0
+-0.0537482 -0.287299 0.320513 -0.0695651 -0.136327 0.988218
+0.0240146 0.371795 0.124214 0 1 0
+0.429105 0.294872 -0.35693 0 1 0
+-0.5 0.0745322 0.250081 1 0 0
+0.5 -0.286011 -0.242789 0.996614 -0.0819209 0.00702537
+-0.405776 -0.371795 0.312061 0.0146949 0.999164 -0.0381596
+0.289482 -0.280319 -0.371795 0 0 1
+0.325194 0.294872 0.242981 0 1 0
+-0.416809 -0.0540923 -0.371795 0 0 1
+0.0184937 -0.216106 -0.333333 0 0 1
+-0.5 -0.277153 -0.368096 0.924609 0.0237729 0.380176
+0.141109 -0.306466 0.244385 1 0 0
+-0.362833 -0.305337 0.320513 0 0 1
+-0.289305 0.371795 -0.222578 0 1 0
+-0.227801 -0.0433301 -0.291767 -0.0718056 0.997386 0.00805404
+0.0161636 -0.135588 -0.333333 0 0 1
+0.479183 0.167203 -0.371795 0 0 1
+0.454187 0.294872 0.15394 0 1 0
+-0.1243 0.128596 0.320513 0 0 1
+-0.45022 -0.294872 -0.341558 0.473834 0.874337 0.104959
+0.5 -0.198506 -0.0755578 1 0 0
+0.0259881 0.371795 -0.344246 0 1 0
+-0.448016 0.371795 0.0298196 0 1 0
+-0.5 0.274457 0.202445 1 0 0
+-0.262864 0.0293161 -0.125115 0.749256 -0.662271 -0.00337709
+0.253319 0.193933 0.371795 0 0 1
+0.376635 0.0605775 0.342242 0.977142 0.212589 0
+0.19919 0.0466833 0.326914 0.96027 0.223622 -0.166955
+0.141026 0.341326 0.0636231 1 0 0
+-0.294358 -0.00478298 0.371795 0 0 1
+-0.48684 0.371795 0.212 0 1 0
+0.141109 -0.326902 -0.310027 1 0 0
+0.230438 0.0779978 -0.333333 0 0 1
+-0.5 0.0262665 -0.36537 0.966942 -0.0786974 0.242547
+0.218151 0.294872 -0.132425 0 1 0
+0.224393 -0.319068 0.320513 0 0 1
+-0.254013 -0.227184 -0.333333 0.0737457 -0.494915 0.865806
+-0.166942 -0.205566 -0.333333 0 0 1
+0.5 -0.119801 0.156266 1 0 0
+0.248817 0.0203914 0.371795 0 0 1
+-0.416517 0.3004 -0.371795 0 0 1
+0.201196 -0.371795 -0.340004 0 1 0
+-0.5 0.362405 -0.258571 0.998545 -0.0495854 -0.0211742
+-0.101341 0.371795 -0.221519 0 1 0
+-0.5 0.164654 -0.348272 1 0 0
+0.132851 -0.109725 -0.333333 0 0 1
+-0.430054 0.0607612 -0.371795 0 0 1
+0.141109 -0.339247 0.231763 1 0 0
+-0.246549 0.371795 -0.150908 0 1 0
+-0.383778 0.371795 0.286818 0 1 0
+0.477281 0.294872 -0.2554 0 1 0
+0.5 0.100937 -0.042232 1 0 0
+-0.453646 0.371795 0.106137 0 1 0
+0.4292 -0.0187443 0.320513 0 0 1
+-0.448718 -0.313524 -0.347335 1 0 0
+0.157787 0.230897 -0.348778 0 1 0
+-0.5 0.33119 0.213393 1 0 0
+-0.5 0.0633725 0.306659 1 0 0
+0.350695 -0.371795 -0.118022 0 1 0
+0.5 0.217384 -0.234901 1 0 0
+0.421452 -0.166422 0.320513 0 0 1
+0.448718 -0.355422 -0.0145563 1 0 0
+-0.243442 -0.371795 0.0676404 0 1 0
+-0.347757 0.371795 0.17443 0 1 0
+-0.409718 -0.371795 -0.323061 0 1 0
+-0.5 -0.163239 0.194177 1 0 0
+-0.5 0.0321214 0.106983 1 0 0
+0.183439 -0.253906 -0.371795 0 0 1
+0.5 0.170215 -0.0671951 1 0 0
+0.328346 0.0859545 0.371795 0 0 1
+0.421932 0.0116848 -0.371795 0 0 1
+0.171277 -0.371795 0.171276 0 1 0
+-0.271113 -0.187464 0.371795 0 0 1
+0.5 -0.0744448 -0.184513 1 0 0
+-0.474194 -0.294872 0.295511 0 1 0
+0.5 0.166697 -0.182537 1 0 0
+0.5 -0.157404 -0.269324 1 0 0
+-0.0545016 -0.294872 0.299403 0 1 0
+0.494168 0.294872 0.0779667 0.33344 0.942515 0.0219665
+-0.3813 -0.0391328 0.362981 0.980293 0.193269 -0.0409094
+0.112141 0.219255 -0.333333 -0.00269437 0.0244417 0.999698
+0.306407 -0.260451 -0.371795 0 0 1
+0.0520702 0.198398 0.367097 0.123015 0.922352 -0.366243
+-0.320513 0.00517716 -0.369035 0.911179 -0.257364 -0.321741
+0.0769978 0.239675 -0.371795 -0.00947985 0.133815 0.990961
+-0.366843 0.371795 -0.0812987 0 1 0
+0.204367 -0.326164 -0.371795 0 0 1
+-0.0645631 0.236074 -0.371795 0.0941719 0.13121 0.986872
+-0.0106637 0.371795 0.120224 0 1 0
+0.473616 -0.294872 0.180581 0 1 0
+0.258248 -0.0267071 -0.328206 0.661926 -0.680597 0.314074
+0.5 -0.136088 0.0515424 1 0 0
+-0.400066 0.198265 -0.371795 0 0 1
+-0.205294 0.192354 -0.333333 0 0 1
+-0.299493 0.371795 0.264092 0 1 0
+-0.337632 -0.371795 -0.28348 0 1 0
+-0.5 -0.290866 -0.152859 0.881527 0.471839 -0.0166514
+-0.5 -0.254163 -0.330892 1 0 0
+0.5 0.185532 -0.331696 1 0 0
+-0.410584 0.371795 -0.201531 0 1 0
+-0.141154 -0.319165 -0.35419 1 0 0
+-0.210153 -0.371795 -0.170577 0 1 0
+-0.121945 0.371795 -0.0323414 0 1 0
+0.5 -0.0296706 -0.186395 1 0 0
+0.268913 0.00363324 -0.250293 0.996606 0.0823147 0.000762282
+-0.5 0.0548863 -0.00185416 1 0 0
+0.5 0.28566 0.122504 0.997708 0.065625 -0.0164739
+0.288504 0.240256 0.320513 0 0 1
+0.192498 0.00217755 -0.234614 0.999783 -0.0183138 0.00995791
+0.5 0.130467 -0.0635318 1 0 0
+0.464206 0.0222636 -0.371795 0 0 1
+0.320825 0.294872 0.227775 0 1 0
+-0.402926 -0.356732 -0.371795 0 0 1
+0.361851 0.294872 0.283155 0 1 0
+0.229479 -0.307069 -0.371795 0 0 1
+-0.105821 0.285216 0.320513 0 0 1
+0.487711 0.264138 0.320513 0 0 1
+0.375173 -0.0672981 0.323749 0.916815 -0.237311 0.321145
+0.0263109 0.272956 0.320513 0 0 1
+0.224534 -0.371795 -0.187693 0 1 0
+-0.174738 -0.371795 -0.129156 0 1 0
+0.473138 0.2543 -0.371795 0 0 1
+0.277178 0.157223 -0.333333 0 0 1
+0.0340728 0.220924 0.371795 0 0 1
+0.355603 -0.290679 -0.371795 0 0 1
+0.5 -0.0827608 0.0526627 1 0 0
+0.295248 0.294872 -0.15186 0 1 0
+-0.00198537 0.371795 0.246041 0 1 0
+0.397955 0.136907 -0.371795 0 0 1
+-0.215656 0.0408653 -0.173925 0.334839 0.942274 0.00156263
+0.0177578 -0.294872 -0.160562 0 1 0
+-0.366268 0.0226309 0.371795 0 0 1
+-0.153784 0.371795 0.220171 0 1 0
+0.0465191 0.355314 0.320513 0 0 1
+-0.00521906 -0.294872 -0.0562172 0 1 0
+0.448718 -0.360506 -0.210505 1 0 0
+-0.078958 -0.294872 0.105162 0 1 0
+-0.248452 -0.371795 -0.275959 0 1 0
+-0.0264574 0.371795 -0.284956 0 1 0
+-0.259982 -0.371795 0.127965 0 1 0
+0.0792705 -0.256282 0.368478 -0.0712258 0.905566 -0.418183
+0.289747 0.294872 0.0380974 0 1 0
+-0.333241 -0.311866 -0.371795 0 0 1
+-0.498695 0.0502122 -0.371795 0.873102 0.0649402 0.483193
+0.5 0.14161 -0.182656 1 0 0
+0.347729 -0.371795 0.122108 0 1 0
+-0.41708 -0.362392 -0.371795 -0.0127909 0.0450955 0.998901
+-0.251714 -0.0477324 -0.333333 -0.0552057 -0.0837078 0.99496
+-0.5 -0.0226417 -0.228188 1 0 0
+-0.211957 -0.371795 -0.328306 0 1 0
+-0.240362 -0.371795 -0.0745787 0 1 0
+-0.145213 -0.371795 -0.147027 -0.356547 0.922104 0.150327
+-0.409894 0.366485 -0.371795 -0.250361 -0.361787 0.898014
+-0.391874 -0.371795 -0.0604039 0 1 0
+-0.193133 0.0901265 -0.333333 0 0 1
+0.0788463 0.0405727 -0.333333 0 0 1
+-0.281233 0.371795 -0.0735854 0 1 0
+-0.382541 0.027216 0.368452 0.929187 -0.0880433 -0.35897
+-0.146575 0.110807 0.320513 0 0 1
+0.451877 0.294872 -0.0301229 0 1 0
+0.287742 0.294872 0.0442573 0 1 0
+-0.5 -0.205051 -0.0923219 1 0 0
+0.191718 0.294872 -0.0429488 0 1 0
+-0.141154 -0.332121 -0.144041 1 0 0
+0.4798 0.294872 -0.185048 0 1 0
+-0.148581 0.330339 -0.371795 0 0 1
+0.382062 -0.123105 0.320513 0 0 1
+-0.338403 -0.371795 0.242972 0 1 0
+0.141602 -0.371795 -0.00700529 0.400508 0.915534 0.0372816
+0.192662 -0.00404597 -0.188196 0.992627 0.119423 0.0207529
+0.40907 -0.371795 0.152813 0 1 0
+0.448718 -0.370448 0.0140932 0.761673 -0.645909 -0.0515372
+-0.121955 0.371795 0.3192 -0.156282 0.683218 0.713295
+-0.0625486 0.371795 -0.0829693 0 1 0
+-0.15153 -0.254613 0.356791 0.0714086 0.997447 -1.19842e-005
+0.023559 -0.0280057 -0.333333 0 0 1
+-0.27414 -0.178228 -0.333333 0 0 1
+-0.453924 -0.294872 0.222114 0.436546 0.896229 -0.0787519
+-0.5 0.167332 -0.163762 1 0 0
+0.5 -0.205604 0.312926 0.969651 -0.0295585 0.242699
+-0.00364626 0.371795 -0.211239 0 1 0
+0.128477 0.315523 0.320513 0 0 1
+0.141109 -0.300233 0.106212 0.953578 0.301015 0.0088298
+0.448718 -0.348827 0.304011 1 0 0
+0.166549 0.0573875 0.320513 0 0 1
+0.185366 -0.371795 0.0767748 0 1 0
+-0.5 0.145459 -0.341711 1 0 0
+0.487672 -0.294872 0.261851 0 1 0
+0.5 0.287961 0.131214 0.971545 0.235661 0.0237752
+0.5 -0.236875 -0.196022 1 0 0
+0.256265 -0.0286899 -0.253574 -0.667936 0.744176 -0.00800514
+0.400744 0.0155719 0.320513 0 0 1
+-0.480266 0.371795 -0.110105 0 1 0
+-0.0233101 -0.0744718 0.320513 0 0 1
+-0.0161656 -0.294872 0.150225 0 1 0
+0.240264 -0.356284 0.320513 0 0 1
+0.185248 -0.263868 0.320513 0 0 1
+0.5 -0.209125 -0.222238 1 0 0
+0.127783 0.371795 0.135374 0.0445299 0.999008 0
+-0.5 -0.0292548 0.013772 1 0 0
+-0.139753 -0.294872 -0.296662 -0.455193 0.881533 -0.125298
+0.5 -0.099573 -0.27442 1 0 0
+-0.301297 -0.312577 0.320513 0 0 1
+-0.187611 -0.0049365 -0.320003 0.995024 -0.0995674 -0.00358181
+-0.225919 -0.371795 -0.276816 0 1 0
+0.133128 0.371795 -0.306644 0.182767 0.981427 0.0582867
+0.13887 0.371795 0.0715952 0.653469 0.741951 -0.149957
+0.3711 -0.0563712 -0.371795 0 0 1
+-0.312601 0.187302 -0.344074 0.938365 -0.316853 -0.138116
+-0.5 -0.0990249 -0.217216 1 0 0
+0.0634499 0.371795 0.0379616 0 1 0
+-0.491972 0.156344 0.320513 -0.136048 -0.00962194 0.990656
+0.296844 0.294872 -0.0676969 0 1 0
+-0.410323 0.0518408 -0.371795 0 0 1
+-0.0214783 0.258112 0.320513 0.0387008 0.36751 0.929214
+0.217629 -0.179098 0.371795 0 0 1
+0.0611805 0.371795 0.0766664 0 1 0
+-0.253288 0.371795 0.0756463 0 1 0
+0.215104 0.0349711 -0.097656 -0.416174 0.909125 -0.0170711
+0.448718 -0.346323 0.0512581 1 0 0
+-0.241458 0.229415 0.347313 -0.479257 0.877675 0
+-0.09514 0.371795 0.211383 0 1 0
+-0.5 -0.183209 -0.358163 1 0 0
+-0.132691 0.265375 0.320513 0.0572829 0.259786 0.963966
+0.5 -0.169691 0.167319 1 0 0
+0.446324 0.294872 0.252695 0 1 0
+0.215826 -0.0977549 -0.333333 0 0 1
+0.141026 0.369294 0.191684 0.817471 0.572055 -0.0670383
+0.478857 0.26477 -0.371795 0 0 1
+-0.5 -0.0445822 -0.037056 1 0 0
+-0.210727 -0.130939 0.371795 0 0 1
+0.129893 -0.158113 0.321053 -0.573885 0.693993 0.434775
+0.207653 0.294872 -0.15664 0 1 0
+0.129757 0.371795 0.258757 0.0414018 0.999141 0.00149389
+0.5 0.228628 0.284403 1 0 0
+-0.111779 -0.256282 0.343742 0 1 0
+0.130706 0.256103 0.320867 -0.0578106 0.657885 0.750896
+0.19325 -0.0080151 -0.141181 0.975658 0.219299 0
+-0.138293 -0.157536 -0.333333 0 0 1
+-0.394348 -0.371795 -0.185998 0 1 0
+0.434841 -0.0145087 -0.371795 0 0 1
+0.5 -0.022263 0.221359 1 0 0
+0.5 -0.189052 0.10886 1 0 0
+-0.5 -0.122991 -0.0532672 1 0 0
+-0.0980567 -0.294872 0.0854727 0 1 0
+-0.353725 -0.102123 0.371795 -0.241564 -0.0631754 0.968326
+0.5 0.0931027 -0.275539 1 0 0
+0.172004 -0.110722 0.371169 0.695514 -0.460702 -0.551374
+-0.5 0.185386 0.0429975 1 0 0
+-0.0552585 0.371795 -0.278135 0 1 0
+0.45837 -0.262033 -0.371795 0 0 1
+-0.5 -0.265653 -0.228862 1 0 0
+0.13765 -0.247614 -0.371795 0 0 1
+-0.284857 0.371795 0.313833 0.0798301 0.934197 0.34771
+0.5 -0.220877 0.196125 1 0 0
+-0.144121 -0.104075 -0.333333 0 0 1
+0.141026 0.310878 -0.214536 1 0 0
+-0.49591 0.371795 -0.205453 -0.380282 0.923262 0.054526
+-0.448718 -0.308417 -0.267052 1 0 0
+0.5 0.105264 -0.290868 1 0 0
+0.5 0.27095 0.082025 1 0 0
+-0.405323 -0.148394 -0.371795 0 0 1
+0.5 -0.267077 -0.107299 1 0 0
+-0.490754 -0.17822 0.320513 -0.189805 -0.0908699 0.977608
+-0.5 0.0177963 0.268404 1 0 0
+-0.470433 0.371795 0.132663 0 1 0
+0.448718 -0.295514 -0.151919 -0.480898 0.859379 0.173796
+0.0547828 -0.294872 0.318013 0.0220128 -0.61151 0.79093
+0.5 -0.0969759 -0.140015 1 0 0
+-0.150405 0.331061 -0.371795 0 0 1
+-0.448718 -0.36577 -0.0155664 0.991729 0.114804 -0.0573829
+-0.190136 -0.134983 0.371795 0 0 1
+0.47522 -0.294872 -0.123909 0 1 0
+-0.325309 0.371795 -0.250489 0 1 0
+-0.15814 0.0718093 -0.333333 0 0 1
+0.158978 0.146213 0.371795 -0.0555423 -0.0585267 0.99674
+0.0892508 -0.294872 -0.32236 0 1 0
+0.40559 -0.326209 -0.371795 0 0 1
+0.350337 0.228862 -0.371795 0 0 1
+0.353061 0.0530219 -0.371795 0 0 1
+0.18132 0.250053 0.366388 0.185669 0.932384 0.310142
+-0.5 -0.189609 0.247146 1 0 0
+-0.268113 0.214586 0.368062 -0.492998 0.844237 0.210276
+0.227619 0.203434 0.371795 0 0 1
+0.294813 -0.371795 0.0448027 0 1 0
+-0.0116729 -0.294872 -0.32008 0 1 0
+0.310648 0.294872 -0.256235 0 1 0
+-0.394054 0.371795 -0.062038 0 1 0
+0.5 -0.105645 0.124996 1 0 0
+0.5 -0.292548 0.172425 0.941091 -0.335971 -0.0383485
+0.333631 0.210116 -0.371795 0 0 1
+-0.5 -0.107385 -0.133347 1 0 0
+0.5 -0.0150448 0.278821 1 0 0
+0.0628219 0.194707 0.365139 0.276519 0.924023 -0.264044
+-0.383317 0.179783 0.320513 0 0 1
+0.5 0.0306169 0.0506841 1 0 0
+0.39908 -0.231919 0.320513 0 0 1
+0.419084 -0.119791 -0.371795 0 0 1
+-0.5 -0.200044 -0.18222 1 0 0
+-0.5 -0.279427 -0.279401 1 0 0
+0.284045 0.294872 -0.308674 0 1 0
+0.448718 -0.3445 -0.297983 1 0 0
+0.370138 -0.371795 0.193369 0 1 0
+0.265058 0.15939 0.371795 0 0 1
+0.0382183 0.340592 0.320513 0 0 1
+0.149342 0.257048 -0.371795 0 0 1
+-0.140059 -0.230897 -0.360456 0 1 0
+0.077213 -0.250868 -0.371795 0 0 1
+0.156915 0.106588 0.320513 0 0 1
+-0.0860771 -0.294872 0.176713 0 1 0
+-0.0460592 0.371795 0.195837 0 1 0
+0.5 -0.0660935 -0.181228 1 0 0
+0.353591 0.294872 -0.227834 0 1 0
+-0.181754 0.260731 -0.371795 0 0 1
+-0.108818 -0.23623 0.371795 0 0 1
+0.0541865 0.173997 0.320513 0 0 1
+0.236724 -0.371795 -0.0874665 0 1 0
+0.0167684 0.371795 0.0656912 0 1 0
+0.419844 -0.121343 0.320513 0 0 1
+-0.483731 0.371795 -0.0921902 0 1 0
+0.0565065 -0.294872 -0.145614 0 1 0
+0.5 0.281335 -0.194224 1 0 0
+-0.228194 0.371795 0.0272391 0 1 0
+-0.0261003 -0.294872 -0.020953 0 1 0
+0.346335 -0.297572 0.320513 0 0 1
+0.087091 0.226833 -0.333333 0.0475533 0.632969 0.772715
+-0.360111 -0.371795 -0.249552 0 1 0
+0.472251 0.294872 -0.0709209 0 1 0
+0.158724 0.171144 -0.333333 0 0 1
+-0.5 0.0997017 -0.16122 1 0 0
+0.236562 0.214189 0.371795 0 0 1
+-0.5 -0.0853581 -0.357226 1 0 0
+0.1819 0.234199 -0.371795 -0.0521403 0.507632 0.859995
+0.141026 0.323531 0.108161 1 0 0
+-0.458913 -0.160636 0.320513 0 0 1
+0.311435 -0.371795 -0.0798753 0 1 0
+-0.225214 0.371795 -0.0691334 0 1 0
+0.0147619 0.194509 -0.333333 0 0 1
+0.0261128 0.371795 0.0235643 0 1 0
+-0.218245 -0.274439 -0.371795 0 0 1
+-0.5 0.170207 -0.22898 1 0 0
+0.141109 -0.296263 -0.125574 0.886256 0.463047 -0.0117571
+-0.0463651 0.371795 -0.0214742 0 1 0
+-0.276544 0.266683 0.320513 0 0 1
+0.208078 -0.323762 -0.371795 0 0 1
+-0.248908 0.0394546 -0.310984 -0.411737 0.911285 0.00571932
+0.260159 0.294872 -0.306244 0 1 0
+-0.181447 -0.371795 -0.231225 0 1 0
+0.347872 0.13109 -0.371795 0 0 1
+-0.372212 0.371795 0.253757 0 1 0
+-0.5 0.260124 0.285419 1 0 0
+0.5 -0.0684628 -0.0921316 1 0 0
+-0.267392 -0.371795 0.179795 0 1 0
+0.0710185 0.324741 -0.371795 0 0 1
+0.5 -0.235653 -0.326925 1 0 0
+-0.228563 -0.186377 -0.333333 0 0 1
+0.275101 -0.371795 -0.175 0 1 0
+0.327232 0.283203 -0.371795 0 0 1
+0.243061 -0.118833 0.371795 0 0 1
+-0.5 -0.00504057 -0.0195915 1 0 0
+-0.5 -0.292695 -0.172086 0.637739 0.768194 0.0562755
+-0.141154 -0.368513 0.299128 0.942236 -0.332271 -0.0422794
+0.494902 -0.294872 0.216571 -0.283168 0.959045 0.00694867
+-0.142746 0.371795 -0.0898335 0 1 0
+0.390538 -0.258654 -0.371795 0 0 1
+0.073 -0.294872 -0.349036 0 1 0
+-0.215645 -0.371795 -0.128362 0 1 0
+0.408961 0.294872 0.147923 0 1 0
+0.390812 0.294872 0.0822575 0 1 0
+0.167904 -0.371795 0.150274 0 1 0
+-0.365676 -0.143324 0.320513 0 0 1
+-0.122968 0.371795 0.0457229 0 1 0
+0.5 0.214545 -0.368265 0.649611 0.128468 -0.749334
+0.450461 -0.294872 0.186992 -0.362988 0.93053 -0.0485181
+0.255004 0.244278 -0.371795 0 0 1
+-0.5 -0.00472752 0.0398937 1 0 0
+-0.5 0.231562 -0.0997319 1 0 0
+-0.5 -0.0210421 0.237206 1 0 0
+-0.0743034 0.307238 -0.371795 0 0 1
+-0.0950804 0.371795 0.04347 0 1 0
+-0.384687 -0.177897 -0.371795 0 0 1
+-0.5 0.153885 0.0803624 1 0 0
+-0.307949 0.18301 -0.333333 -0.195648 0.113164 0.974123
+0.0372028 0.0300567 -0.333333 0 0 1
+0.5 0.24618 0.0660964 1 0 0
+-0.5 0.0224239 0.230732 1 0 0
+0.399948 0.294872 -0.13148 0 1 0
+0.253033 0.294872 -0.00188383 0 1 0
+-0.241155 0.289281 0.320513 0 0 1
+-0.424243 -0.371795 0.142949 0 1 0
+-0.472509 -0.183179 0.320513 0 0 1
+-0.5 0.342505 -0.0922008 1 0 0
+0.26923 -0.36312 -0.371795 0.0535102 0.0921194 0.994309
+0.391777 0.294872 -0.14408 0 1 0
+0.402352 0.294872 -0.180982 0 1 0
+-0.123841 -0.0258815 0.320513 0 0 1
+0.5 0.165171 -0.248957 1 0 0
+-0.273949 0.00468734 -0.229181 0.997434 -0.0704757 0.0125867
+-0.468983 -0.294872 -0.231819 0 1 0
+0.030307 0.371795 0.235742 0 1 0
+0.156534 -0.356579 -0.371795 0 0 1
+-0.239086 -0.350162 0.320513 0 0 1
+0.5 -0.286153 -0.0523077 0.989103 -0.14377 -0.0316964
+0.37645 0.294872 -0.0400164 0 1 0
+0.5 0.091763 -0.077984 1 0 0
+0.0239725 0.371795 -0.323727 0 1 0
+0.351058 -0.371795 -0.175422 0 1 0
+0.141109 -0.321835 0.217404 1 0 0
+0.5 0.222059 -0.340344 1 0 0
+-0.141154 -0.365511 -0.0383316 0.878873 -0.452043 -0.152447
+0.5 0.146426 -0.236209 1 0 0
+-0.221804 -0.138275 0.371795 0 0 1
+0.445099 -0.371795 0.24049 -0.699058 0.697276 0.158504
+0.0643495 0.332632 0.320513 0 0 1
+-0.30808 0.0326348 0.371795 0 0 1
+0.123521 0.371795 -0.13864 0 1 0
+0.201055 0.0243641 -0.193906 0.778705 -0.626925 0.024146
+0.485787 0.294872 -0.0673909 0 1 0
+0.5 0.164226 -0.0352826 1 0 0
+-0.268417 -0.371795 0.254473 0 1 0
+-0.10879 0.195287 0.371795 0 0 1
+-0.117467 0.0361754 0.320513 0 0 1
+0.437899 -0.169859 0.320513 0 0 1
+-0.440999 0.371795 -0.0305209 0 1 0
+-0.310393 -0.179326 0.333377 0.707107 0.707107 0
+0.140524 -0.141815 -0.333333 0 0 1
+-0.263735 -0.371795 -0.345923 0 1 0
+-0.469735 0.371795 -0.279429 0 1 0
+-0.311921 0.161823 -0.333333 -0.181735 -0.0908186 0.979145
+0.5 0.242963 -0.0294552 1 0 0
+-0.5 -0.103891 -0.168222 1 0 0
+-0.5 0.0783734 -0.322057 1 0 0
+0.200517 -0.339996 -0.371795 0 0 1
+0.0452651 0.371795 -0.070982 0 1 0
+0.0283696 -0.294872 0.183824 0 1 0
+0.0433142 -0.152704 -0.333333 0 0 1
+0.141026 0.316528 -0.157061 1 0 0
+-0.0567169 -0.294872 -0.2379 0 1 0
+-0.495121 0.305803 0.320513 -0.322174 0.128095 0.937974
+0.141109 -0.313469 -0.369017 0.895335 0.0502595 0.442549
+-0.176241 0.371795 0.277926 0 1 0
+-0.235002 0.0727125 -0.333333 0 0 1
+0.360326 -0.371795 0.0802518 0 1 0
+0.5 0.286335 0.277466 0.993296 0.114345 0.0169893
+0.211039 -0.0329595 -0.122107 0.523652 0.851759 0.0171689
+-0.452501 -0.000621404 0.320513 0 0 1
+-0.384728 0.0532881 -0.371795 0 0 1
+0.114905 0.349632 0.320513 0 0 1
+0.216347 -0.227791 0.371795 -0.00566894 -0.0494276 0.998762
+0.199427 -0.371795 -0.131526 0 1 0
+0.183653 -0.269166 -0.371795 0 0 1
+-0.5 0.0782959 0.111407 1 0 0
+-0.5 -0.0551342 0.177623 1 0 0
+0.348969 -0.129096 0.362338 0.877678 -0.479251 0
+-0.5 -0.15169 0.228657 1 0 0
+0.469444 -0.294872 -0.365884 -0.0225804 0.948294 0.316589
+-0.466659 0.371795 0.281547 0 1 0
+0.47388 -0.294872 0.0187803 0 1 0
+-0.200174 0.371795 -0.0691867 0 1 0
+-0.190335 -0.248092 0.348118 0.214107 0.97681 0
+-0.305725 0.0942378 0.371795 0 0 1
+-0.4393 -0.371795 -0.0929594 0.131056 0.991006 0.0270458
+0.1153 0.371795 0.0178382 0 1 0
+0.422391 -0.371795 -0.135246 0 1 0
+-0.5 0.0782554 0.185638 1 0 0
+0.5 0.146158 0.310199 1 0 0
+-0.489758 0.371795 0.263365 -0.0396458 0.999181 -0.00810653
+-0.5 -0.182169 0.203391 1 0 0
+0.5 0.252741 -0.124395 1 0 0
+0.258069 -0.371795 0.0447032 0 1 0
+-0.37106 0.371795 -0.278599 0 1 0
+0.35162 -0.331238 0.320513 0 0 1
+0.5 -0.263689 0.0585488 1 0 0
+0.486406 0.227659 0.320513 0 0 1
+0.141109 -0.332926 0.059972 1 0 0
+0.5 -0.0851957 -0.274054 1 0 0
+0.178315 -0.371795 0.211805 0 1 0
+-0.289577 0.262331 -0.371795 0 0 1
+-0.5 -0.288705 0.123655 0.975071 0.193392 -0.108797
+0.0821067 0.185522 -0.333333 0 0 1
+-0.267036 0.0239136 -0.262789 0.827416 -0.561099 -0.023462
+-0.5 0.0568588 0.0887647 1 0 0
+0.0539264 0.256282 0.335339 0 1 0
+0.300476 0.294872 -0.314634 0 1 0
+0.141109 -0.328564 -0.0835514 1 0 0
+0.222233 0.294872 -0.368196 -0.108494 0.945775 -0.306168
+-0.260614 -0.208251 0.371795 -0.00220235 -0.036107 0.999345
+-0.463164 0.371795 0.294717 0 1 0
+-0.453722 -0.0929911 -0.371795 0 0 1
+-0.326864 0.13627 0.371795 0 0 1
+0.174797 -0.0518363 0.320513 0 0 1
+-0.5 -0.214802 0.0568197 1 0 0
+0.281301 -0.371795 -0.277274 0 1 0
+-0.26232 0.0298595 -0.0668961 0.713823 -0.699713 -0.0293201
+-0.413341 -0.134836 0.320513 0 0 1
+-0.5 0.341392 0.0210786 1 0 0
+0.254116 -0.222503 0.361394 -0.479237 0.877686 0
+-0.0623579 0.0800298 -0.333333 0 0 1
+0.5 -0.24384 0.0166976 1 0 0
+0.141109 -0.312933 -0.295062 1 0 0
+-0.362183 -0.371795 -0.0221798 0 1 0
+-0.14947 -0.0993191 0.320513 0 0 1
+-0.305024 -0.371795 -0.128277 0 1 0
+-0.0337638 -0.294872 -0.175076 0 1 0
+-0.141138 -0.283937 -0.371795 0 0 1
+0.141109 -0.296778 0.257675 0.891433 0.452764 -0.0187682
+0.284519 -0.371795 0.0611354 0 1 0
+-0.5 0.0175489 -0.127709 1 0 0
+0.5 0.287584 0.297822 0.980738 0.183244 -0.067634
+0.266559 -0.371795 0.208396 0 1 0
+-0.164749 0.371795 0.152564 0 1 0
+0.482025 0.294872 0.108254 0 1 0
+0.34609 -0.137989 -0.371795 0 0 1
+-0.5 0.0615471 -0.352697 1 0 0
+-0.161982 -0.11891 -0.333333 0 0 1
+-0.274138 -0.00252808 -0.0755594 0.995326 0.0898348 0.0354308
+-0.225597 -0.371795 0.0345037 0 1 0
+-0.153054 -0.371795 0.160751 0 1 0
+0.23257 -0.371795 0.227295 0 1 0
+-0.0707488 -0.191985 0.349661 0.324697 0.945818 0
+-0.192782 0.147744 0.371795 0 0 1
+0.140867 -0.294872 -0.133394 0.685317 0.728245 0
+0.016515 0.0204111 0.320513 0 0 1
+-0.134131 0.102418 -0.333333 0 0 1
+-0.461345 0.11887 -0.371795 0 0 1
+-0.212531 -0.371795 -0.0211849 0 1 0
+0.292927 0.0446725 -0.333333 0 0 1
+0.0765855 -0.282595 -0.371795 -0.00403403 0.0130558 0.999907
+0.401266 0.224735 0.320513 0 0 1
+-0.4601 0.1658 0.320513 0 0 1
+-0.5 0.266943 0.196982 1 0 0
+0.315748 -0.0450708 0.371795 0 0 1
+-0.144679 -0.371795 0.00756529 -0.274359 0.961291 -0.0254181
+0.141026 0.324984 0.293065 1 0 0
+0.421854 -0.371795 0.258835 0 1 0
+-0.215494 -0.371795 -0.193826 0 1 0
+0.141026 0.30118 0.225691 0.981259 0.186358 -0.0489977
+-0.383639 0.180516 -0.371795 0 0 1
+0.274973 -0.209451 0.362024 -0.627222 0.772078 -0.102417
+0.478911 -0.294872 0.00314444 0 1 0
+0.284873 -0.371795 0.257373 0 1 0
+0.487641 -0.285293 -0.371795 0.0213991 0.0520654 0.998414
+-0.0124886 -0.294872 -0.175604 0 1 0
+0.194188 0.0115173 -0.210843 0.948808 -0.314496 0.0292428
+-0.0891519 -0.294872 0.120712 0 1 0
+-0.171778 0.184603 0.371795 0 0 1
+-0.114908 -0.290068 -0.371795 -0.00808963 0.133044 0.991077
+0.141109 -0.370304 0.265089 0.849575 0.527284 0.0138993
+-0.304003 0.371795 0.00494821 0 1 0
+0.305681 -0.322347 0.320513 0 0 1
+-0.5 -0.00122519 0.267762 1 0 0
+0.220445 0.294872 0.29746 0 1 0
+-0.141154 -0.346443 0.19822 1 0 0
+-0.23091 0.371795 0.0513437 0 1 0
+-0.198297 0.289483 0.320513 0 0 1
+-0.18946 0.0136096 -0.289993 0.956791 0.290745 -0.00418471
+-0.5 -0.0492319 -0.0993199 1 0 0
+0.498149 0.294872 0.309577 0.559365 0.825259 0.0778327
+0.153319 0.294872 -0.291358 0 1 0
+0.467581 -0.213776 -0.371795 0 0 1
+-0.419614 0.371795 0.0608405 0 1 0
+0.141026 0.328027 0.266963 1 0 0
+-0.5 0.34836 -0.19127 1 0 0
+0.141026 0.308448 -0.120768 1 0 0
+0.0645209 -0.194124 0.361285 -0.326783 0.944818 0.0230759
+-0.384478 -0.344284 -0.371795 0 0 1
+0.375863 0.294872 -0.246017 0 1 0
+0.273165 -0.371795 0.0802329 0 1 0
+0.360633 -0.371795 0.0927868 0 1 0
+-0.111519 -0.294872 -0.104606 0 1 0
+-0.152948 0.34307 0.320513 0 0 1
+-0.299253 -0.277479 -0.371795 0 0 1
+0.141026 0.29834 0.0661699 0.795919 0.605396 0.002861
+0.498719 -0.294872 -0.129457 -0.409932 0.912062 0.00991213
+0.381983 -0.371795 -0.0583745 0 1 0
+0.5 -0.154134 -0.199394 1 0 0
+-0.0493672 -0.294872 -0.146817 0 1 0
+0.125434 -0.190507 -0.333333 0 0 1
+-0.443494 -0.371795 -0.179369 0.156809 0.98272 -0.0983519
+0.181767 0.258433 -0.371795 0 0 1
+0.5 -0.152685 -0.235379 1 0 0
+0.183325 0.294872 -0.0341265 0 1 0
+-0.0522192 0.371795 -0.35 0 1 0
+-0.0629514 0.371795 -0.229402 0 1 0
+-0.0101417 -0.204555 0.357306 0.0127014 0.999918 0.00136625
+0.0782638 0.371795 -0.331108 0 1 0
+0.4453 -0.371795 -0.208387 -0.396894 0.911622 -0.106872
+-0.5 -0.268292 0.20581 1 0 0
+0.180426 -0.305919 -0.371795 0 0 1
+0.5 0.00824858 -0.0864848 1 0 0
+0.474784 -0.228634 -0.371795 0 0 1
+-0.45083 -0.0243462 0.320513 0 0 1
+0.363726 -0.371795 -0.240226 0 1 0
+-0.5 0.338072 0.24198 1 0 0
+-0.431306 -0.371795 -0.288672 0 1 0
+0.339177 0.144737 0.329362 0.800865 0.59353 0.0796057
+0.243272 0.149301 -0.333333 0 0 1
+0.5 -0.0586076 0.317363 0.817378 0.351322 0.456581
+0.316533 0.274074 -0.371795 0 0 1
+-0.453184 -0.205984 0.320513 0 0 1
+0.5 0.069342 0.211818 1 0 0
+0.154559 0.105464 -0.333333 0 0 1
+0.0799284 -0.294872 0.00410104 0 1 0
+0.288898 -0.371795 -0.335922 0 1 0
+-0.00697253 0.295392 -0.371795 0 0 1
+-0.5 0.257773 0.247212 1 0 0
+-0.5 -0.111001 -0.197398 1 0 0
+0.297487 0.208449 -0.353003 0.713695 0.700436 0.00529239
+0.078748 0.0861444 0.320513 0 0 1
+-0.278041 -0.295792 -0.371795 0 0 1
+-0.448718 -0.359027 -0.334505 1 0 0
+0.466114 0.185611 0.320513 0 0 1
+0.472492 0.282081 0.320513 0 0 1
+-0.287739 -0.00868066 -0.333333 0 0 1
+-0.320643 0.371795 0.023358 0 1 0
+0.38292 0.220628 0.320513 0 0 1
+0.152838 -0.0770322 -0.333333 0 0 1
+-0.349265 0.337733 -0.371795 0 0 1
+-0.476726 -0.0162496 0.320513 0 0 1
+0.5 0.00170418 0.313344 0.982141 -0.0538868 0.180263
+-0.44608 -0.321554 -0.371795 0.27775 -0.0102763 0.960598
+0.339296 0.294872 -0.326817 0 1 0
+0.136479 0.0204783 0.320513 0 0 1
+0.110367 -0.294872 -0.309996 0 1 0
+0.065662 0.193732 0.35835 0.324723 0.945809 0
+0.372465 0.10334 -0.371795 0 0 1
+0.347846 -0.131152 0.339487 0.873792 -0.4863 0
+-0.448718 -0.308897 0.237014 1 0 0
+-0.2167 -0.371795 -0.262982 0 1 0
+0.292876 -0.138452 0.371795 0 0 1
+0.107219 0.280434 0.320513 0 0 1
+-0.5 0.221687 0.148644 1 0 0
+0.12998 0.268343 0.320513 0 0 1
+-0.5 0.250126 -0.0203636 1 0 0
+-0.10218 0.319362 0.320513 0 0 1
+-0.0173849 -0.204482 0.325357 0.0989128 0.949478 0.297839
+-0.26903 -0.00225068 0.371795 0 0 1
+0.12694 -0.294872 -0.24211 0 1 0
+-0.0312396 0.0234865 -0.333333 0 0 1
+-0.365012 -0.371795 -0.332041 0 1 0
+0.109879 0.371795 0.12211 0 1 0
+0.19462 0.0131268 -0.0802358 0.926932 -0.375111 0.00938984
+-0.0445496 0.0702474 0.320513 0 0 1
+0.182361 -0.371795 0.164049 0 1 0
+0.0794915 0.256282 0.339959 0 1 0
+0.429092 -0.0163434 0.320513 0 0 1
+0.186654 0.169687 0.371795 0 0 1
+-0.453305 -0.294872 0.218559 0.443768 0.886496 -0.131127
+-0.161242 -0.126868 0.32435 0.730827 0.506239 0.457837
+0.5 -0.258655 -0.150035 1 0 0
+-0.198228 0.371795 0.171479 0 1 0
+-0.374952 -0.371795 -1.41673e-005 0 1 0
+0.5 -0.138427 -0.334737 1 0 0
+0.194015 0.0108696 -0.165453 0.953585 -0.301092 -0.00445281
+-0.5 0.254786 0.147588 1 0 0
+-0.202612 0.0319096 0.335694 0.990213 -0.138358 -0.0183136
+0.5 -0.225767 0.17057 1 0 0
+0.437619 0.0446799 0.320513 0 0 1
+-0.21976 0.371795 0.0502939 0 1 0
+-0.0302154 0.371795 0.315695 0.103457 0.957652 0.2687
+-0.154837 0.371795 -0.0220843 0 1 0
+0.177334 0.10818 -0.333333 0 0 1
+-0.234484 -0.371795 0.00610618 0 1 0
+-0.0543566 0.0202065 0.320513 0 0 1
+-0.141154 -0.366988 0.172062 0.966285 -0.245657 -0.0771107
+0.347293 0.294872 0.142981 0 1 0
+-0.230124 0.168018 0.371795 0 0 1
+-0.375931 -0.371795 -0.168711 0 1 0
+0.5 0.0764687 -0.216716 1 0 0
+-0.243851 0.0414505 -0.102072 -0.287004 0.957841 0.0130104
+-0.199628 0.371795 0.317449 -0.142976 0.876766 0.459172
+0.297084 0.0950601 0.371795 0 0 1
+-0.458264 0.154409 0.320513 0 0 1
+-0.188185 0.122819 0.371795 0 0 1
+-0.141154 -0.36001 -0.160513 1 0 0
+0.0813536 0.371795 -0.312578 0 1 0
+-0.223526 0.203436 0.371795 0 0 1
+-0.268137 -0.169794 0.371795 0 0 1
+-0.132868 0.368629 0.320513 0.230452 0.590836 0.773178
+0.067414 0.371795 -0.216708 0 1 0
+0.355783 -0.28906 0.320513 0 0 1
+-0.5 0.115147 -0.36799 0.81003 -0.0454399 0.584625
+0.448718 -0.311754 -0.20361 1 0 0
+-0.26766 0.0230212 -0.222076 0.843656 -0.536799 -0.00953622
+0.197096 0.220918 0.371795 0 0 1
+-0.0753204 -0.230897 -0.363827 0.0259911 0.990953 -0.131671
+-0.358155 0.371795 0.227836 0 1 0
+0.0297727 0.371795 0.24858 0 1 0
+0.170399 -0.371795 -0.14645 0 1 0
+-0.1443 0.371795 0.0299158 0 1 0
+0.301276 -0.339076 -0.371795 0 0 1
+-0.0586528 -0.196138 0.361058 0.303818 0.946817 0.105985
+0.0885759 -0.230897 -0.354598 0 1 0
+0.5 -0.117948 0.168862 1 0 0
+-0.372711 0.371795 -0.253291 0 1 0
+-0.5 -0.256274 0.0577094 1 0 0
+-0.5 0.279137 -0.186999 1 0 0
+-0.5 0.340468 -0.0577462 1 0 0
+0.150384 -0.371795 -0.125754 0.171953 0.985026 0.0124959
+-0.5 0.138028 0.173877 1 0 0
+-0.313408 -0.371795 0.143415 0 1 0
+-0.5 0.0793723 0.0422891 1 0 0
+0.0832131 -0.294872 -0.227193 0 1 0
+0.5 -0.211428 -0.0564979 1 0 0
+-0.255167 -0.371795 0.0542642 0 1 0
+0.141026 0.312133 -0.310185 1 0 0
+-0.5 0.281551 -0.0411779 1 0 0
+0.191089 -0.371795 0.173652 0 1 0
+-0.19746 -0.297077 0.320513 0 0 1
+0.19444 -0.0124569 -0.292974 0.944817 0.327497 0.00812988
+-0.380817 0.255551 0.320513 0 0 1
+0.31685 -0.371795 -0.293192 0 1 0
+0.192428 -0.00137656 -0.037345 0.997512 0.0698429 0.00958103
+0.367345 -0.371795 -0.213498 0 1 0
+-0.265607 0.103227 -0.333333 0 0 1
+-0.5 0.0911516 0.172639 1 0 0
+-0.329627 -0.371795 0.0371142 0 1 0
+-0.186418 0.094717 -0.333333 0 0 1
+0.0160826 0.230897 -0.355109 0 1 0
+-0.331079 -0.103702 -0.371795 0 0 1
+0.448718 -0.318126 0.0495972 1 0 0
+-0.480725 0.282939 0.320513 0 0 1
+0.194442 0.0124658 -0.129486 0.942748 -0.333487 0.00360513
+0.266707 -0.371795 -0.0631067 0 1 0
+-0.257864 -0.335628 -0.371795 0 0 1
+-0.449183 -0.294872 0.0914154 0.689407 0.724374 0
+0.469052 0.257686 -0.371795 0 0 1
+-0.141154 -0.33683 0.173818 1 0 0
+0.125066 0.371795 -0.0224007 0 1 0
+-0.5 -0.05108 -0.218489 1 0 0
+-0.105507 0.107074 -0.333333 0 0 1
+0.0425439 0.200285 0.367816 0.0372043 0.943504 -0.329265
+-0.22269 -0.0128491 0.371795 0 0 1
+-0.265475 0.264082 0.320513 0 0 1
+-0.0564626 -0.294872 0.206559 0 1 0
+-0.372457 -0.0766243 0.344683 0.946786 0.321862 0
+-0.112309 -0.1718 0.365318 0.382146 0.897112 0.221708
+0.220944 0.294872 -0.137701 0 1 0
+-0.5 -0.0580906 0.146278 1 0 0
+-0.229751 0.371795 -0.224572 0 1 0
+0.495714 -0.159883 0.320513 0.375169 0.0805882 0.923447
+0.5 -0.0861601 -0.253015 1 0 0
+-0.5 -0.071586 0.0578934 1 0 0
+-0.0345838 -0.0975131 0.320513 0 0 1
+0.415519 0.294872 -0.280818 0 1 0
+-0.141154 -0.329004 -0.181251 1 0 0
+0.0964451 0.358389 0.320513 0 0 1
+0.448718 -0.29505 -0.169153 -0.502318 0.864067 0.0326479
+-0.5 0.0752471 0.0855082 1 0 0
+-0.202589 -0.0332307 -0.139003 -0.634012 0.773251 -0.0106124
+0.433131 0.294872 0.215363 0 1 0
+-0.5 0.0276495 -0.362275 0.999128 -0.0162008 0.0384886
+0.5 0.114437 -0.219001 1 0 0
+0.182042 -0.180473 -0.333333 0 0 1
+-0.425687 0.371795 -0.117279 0 1 0
+0.116051 -0.294872 0.276649 0 1 0
+-0.397191 -0.371795 -0.0770535 0 1 0
+0.388024 -0.0714659 -0.371795 0 0 1
+-0.046003 0.371795 -0.34646 0 1 0
+0.341129 0.142128 0.341537 0.81795 0.575277 -0.00382638
+-0.5 0.280487 -0.213705 1 0 0
+0.340758 0.294872 0.111347 0 1 0
+0.194224 0.0662967 0.333719 0.953464 0.301412 0.00757399
+-0.0482273 0.371795 0.315763 -0.0845938 0.95898 0.270556
+0.0863271 -0.294872 -0.115722 0 1 0
+0.119428 -0.256282 0.335971 -0.00125804 0.999999 0.000642093
+-0.133853 0.371795 0.100352 0 1 0
+-0.266798 0.0126342 -0.0320279 -0.658855 0.237272 0.713871
+0.352846 -0.371795 -0.227087 0 1 0
+-0.0765076 0.0148986 0.320513 0 0 1
+0.10696 -0.107136 0.320513 0 0 1
+0.448718 -0.30079 0.160642 0.942469 -0.319737 -0.0975771
+0.5 -0.139468 0.103997 1 0 0
+-0.5 0.156899 -0.335832 1 0 0
+-0.219955 -0.0396167 -0.033834 -0.229862 0.775138 -0.588494
+0.224397 -0.371795 0.275254 0 1 0
+-0.35505 0.194129 0.320513 0 0 1
+-0.412194 -0.27597 0.320513 0 0 1
+-0.353838 -0.332607 -0.371795 0 0 1
+0.5 0.0714786 -0.185108 1 0 0
+0.448718 -0.338102 0.0323621 1 0 0
+0.343244 0.132693 -0.371795 0 0 1
+-0.214735 -0.191913 -0.333333 0 0 1
+0.423893 -0.119937 -0.371795 0 0 1
+0.0941377 -0.294872 0.225129 0 1 0
+0.37262 -0.371795 -0.132472 0 1 0
+0.0842012 0.0804524 -0.333333 0 0 1
+-0.5 0.346902 0.200857 1 0 0
+0.428965 0.294872 -0.283028 0 1 0
+-0.0879756 -0.294872 -0.228011 0 1 0
+0.295996 0.193713 0.339028 0.653098 0.757273 0
+-0.495275 -0.294872 -0.299712 0.24435 0.969525 0.0177019
+0.0374492 -0.294872 -0.317477 0 1 0
+-0.266004 0.0253875 -0.232146 0.811987 -0.583662 0.00390021
+-0.199472 -0.0455703 0.354359 0.969405 0.245469 0
+0.367939 0.088738 0.346038 0.936951 0.349462 0
+-0.141154 -0.330119 -0.340822 1 0 0
+0.338252 0.145972 0.362567 0.800529 0.599294 0
+-0.339162 0.371795 0.165206 0 1 0
+0.438818 0.0657883 -0.371795 0 0 1
+0.5 0.198827 -0.163358 1 0 0
+0.284908 -0.371795 -0.100231 0 1 0
+0.35913 0.239793 0.320513 0 0 1
+0.155852 0.294872 0.0845779 0 1 0
+-0.0153889 0.371795 -0.319639 0 1 0
+-0.14972 -0.224909 -0.333333 0.135047 -0.405293 0.904157
+-0.442851 -0.316383 -0.371795 0.26287 -0.0862546 0.960968
+-0.201926 -0.0325672 -0.0362134 -0.611206 0.741898 -0.275706
+-0.333644 -0.293733 0.320513 0 0 1
+-0.483507 0.371795 0.106181 0 1 0
+-0.236108 -0.229223 0.371795 -0.35076 -0.446168 0.823348
+0.0320267 0.0964543 0.320513 0 0 1
+-0.266478 -0.371795 -0.367785 0.0792283 0.880953 0.466523
+-0.37436 -0.348564 -0.371795 0 0 1
+0.179469 -0.3226 0.320513 0 0 1
+0.17383 -0.0519684 -0.333333 0 0 1
+0.38101 -0.371795 -0.212575 0 1 0
+-0.480792 -0.0382927 0.320513 0 0 1
+0.143469 0.294872 -0.0331239 0.316729 0.93478 0.160841
+-0.5 -0.0512616 -0.318292 1 0 0
+0.204154 -0.371795 0.173279 0 1 0
+-0.384323 0.00229558 0.358593 0.999176 -0.040565 0.00135485
+-0.141154 -0.35146 -0.0643116 1 0 0
+0.5 -0.117152 0.211227 1 0 0
+0.378162 -0.155506 -0.371795 0 0 1
+0.250098 -0.00450784 0.0111452 0.491818 -0.137816 0.859722
+-0.195424 -0.371795 -0.210052 0 1 0
+-0.248297 0.371795 -0.364472 -0.0538596 0.973337 -0.222968
+0.280114 0.294872 -0.325 0 1 0
+-0.0945239 -0.294872 -0.281303 0 1 0
+0.356912 0.194864 -0.371795 0 0 1
+0.250718 0.230274 -0.371548 0.084431 0.551809 0.829685
+0.340574 -0.371795 0.155586 0 1 0
+-0.295105 -0.194381 0.360754 0.642105 0.766607 -0.00393973
+-0.290217 0.130202 -0.333333 0 0 1
+0.5 -0.155648 0.230878 1 0 0
+0.5 -0.106726 0.172358 1 0 0
+-0.0874162 -0.294872 -0.0727935 0 1 0
+-0.5 0.0478688 0.188618 1 0 0
+-0.271225 0.371795 0.0767608 0 1 0
+-0.5 0.348515 -0.154999 1 0 0
+0.0996899 -0.0482184 0.320513 0 0 1
+0.0413263 -0.168203 -0.333333 0 0 1
+0.5 0.0305876 -0.361668 0.999357 -0.0093187 -0.0346192
+0.5 0.140293 -0.321795 1 0 0
+0.19981 -0.120368 0.371795 0 0 1
+-0.105527 0.0485144 -0.333333 0 0 1
+0.0478347 -0.294872 0.215201 0 1 0
+-0.354859 -0.371795 0.0723366 0 1 0
+0.0559724 -0.294872 -0.148219 0 1 0
+0.141109 -0.296089 0.00351428 0.782237 0.62243 -0.0262006
+-0.5 0.236015 0.0990342 1 0 0
+-0.103926 0.371795 0.130852 0 1 0
+0.5 0.236643 0.0751514 1 0 0
+-0.4103 0.371795 -0.289465 0 1 0
+-0.393246 -0.312074 0.320513 0 0 1
+0.0682454 -0.294872 0.14268 0 1 0
+-0.285327 -0.164763 0.371795 0 0 1
+0.350268 -0.371795 -0.0723922 0 1 0
+0.0264913 -0.294872 0.0736677 0 1 0
+0.5 -0.236192 0.239623 1 0 0
+0.219913 0.111542 0.371795 0 0 1
+-0.206191 -0.371795 0.197351 0 1 0
+0.332524 -0.153624 0.356631 0.800545 -0.599272 0
+0.132796 -0.256125 0.320513 -0.0429489 0.876599 -0.479302
+-0.146485 -0.371795 0.20399 -0.175691 0.983238 0.0487522
+-0.0931987 -0.068054 0.320513 0 0 1
+0.5 0.201936 0.267431 1 0 0
+0.250573 -0.371795 -0.180473 0 1 0
+-0.183274 0.371795 -0.228811 0 1 0
+-0.449039 -0.294872 -0.151436 0.652827 0.75539 0.0565926
+-0.270983 -0.0165113 -0.177464 0.924306 0.380982 0.0226123
+0.0556582 -0.294872 0.0188322 0 1 0
+0.00508187 0.204555 0.335605 0 1 0
+0.448718 -0.366678 -0.298038 0.882463 -0.456674 0.11273
+0.183113 -0.371795 -0.268522 0 1 0
+0.457248 -0.215989 -0.371795 0 0 1
+-0.248856 0.0129764 -0.0224908 -0.359938 0.373097 0.855128
+0.5 0.0348132 0.241085 1 0 0
+0.141228 -0.103176 0.320513 0 0 1
+-0.41984 0.280761 -0.371795 0 0 1
+0.356574 -0.236502 0.320513 0 0 1
+-0.439719 -0.371795 -0.261657 0.0944378 0.995398 -0.0162539
+-0.5 -0.0116098 0.264535 1 0 0
+-0.0708712 -0.247155 -0.371795 0 0 1
+-0.431305 0.288093 -0.371795 0 0 1
+-0.388609 -0.371795 -0.357852 0 1 0
+0.433125 0.294872 0.139728 0 1 0
+0.292416 0.294872 0.015084 0 1 0
+-0.1105 -0.294872 -0.153137 0 1 0
+-0.334814 -0.371795 -0.339761 0 1 0
+-0.0784772 -0.294872 -0.262637 0 1 0
+0.296263 -0.226378 0.320513 0 0 1
+-0.213569 -0.371795 -0.253168 0 1 0
+-0.5 0.162181 0.0592879 1 0 0
+0.237301 -0.00328455 0.0187024 0.462033 -0.173418 0.869742
+-0.438691 0.371795 0.0333416 0 1 0
+0.124629 -0.09876 0.320513 0 0 1
+0.5 0.0787667 0.165885 1 0 0
+-0.26764 0.0230496 -0.215186 0.84423 -0.535675 -0.0181351
+-0.304505 0.371795 0.0973981 0 1 0
+-0.0808366 0.371795 0.300783 0 1 0
+-0.0118141 -0.294872 -0.317346 0 1 0
+0.222079 -0.0373381 -0.250126 0.211785 0.977263 -0.0101858
+-0.200792 0.371795 -0.287722 0 1 0
+0.153534 0.0515106 0.320513 0 0 1
+0.5 -0.162676 0.0917011 1 0 0
+0.0405726 0.365831 0.320513 -0.00229668 0.21498 0.976616
+0.5 -0.0148042 -0.25163 1 0 0
+-0.480893 -0.294872 0.010492 0 1 0
+-0.389378 0.1058 -0.371795 0 0 1
+-0.141154 -0.357669 0.0629565 1 0 0
+-0.200022 -0.230897 -0.363882 -0.00475555 0.996375 -0.08494
+-0.5 0.310356 0.0485271 1 0 0
+-0.0508499 0.371795 0.130791 0 1 0
+-0.5 -0.228513 0.222375 1 0 0
+-0.470498 -0.0716077 0.320513 0 0 1
+0.5 0.0187318 0.24761 1 0 0
+0.5 0.001133 0.30669 1 0 0
+-0.49687 0.371795 0.169862 -0.516336 0.854556 0.0559511
+0.0840757 0.129093 0.320513 0 0 1
+0.245597 0.294872 -0.0458926 0 1 0
+-0.247108 0.00547152 -0.0194382 -0.490461 0.165568 0.855591
+-0.5 -0.0836873 0.194539 1 0 0
+-0.351697 -0.371795 -0.021062 0 1 0
+-0.141154 -0.34777 0.0750415 1 0 0
+-0.116506 0.227774 0.371795 0 0 1
+-0.113922 0.170544 0.343282 -0.568607 0.822602 -0.003539
+-0.5 0.303472 -0.274564 1 0 0
+-0.357742 0.289301 0.320513 0 0 1
+-0.5 0.169854 -0.170638 1 0 0
+-0.5 0.0909297 -0.0411363 1 0 0
+-0.5 -0.255743 0.262599 1 0 0
+0.387882 0.294872 -0.147672 0 1 0
+0.244471 -0.337687 0.320513 0 0 1
+0.0299671 0.346971 0.320513 0 0 1
+0.13692 -0.294872 -0.0724437 0.362833 0.928768 -0.0757798
+0.410909 0.294872 -0.185917 0 1 0
+-0.412264 -0.0956196 0.320513 0 0 1
+-0.456869 0.371795 0.0363833 0 1 0
+0.5 0.153941 0.166137 1 0 0
+0.5 -0.271818 -0.00673116 1 0 0
+-0.5 -0.0402951 0.0245968 1 0 0
+0.486156 0.294872 -0.0171259 0 1 0
+0.141109 -0.359358 0.109516 1 0 0
+-0.122281 0.146174 -0.333333 0 0 1
+0.256924 -0.371795 0.244345 0 1 0
+0.010264 -0.294872 0.270268 0 1 0
+-0.5 0.213332 -0.178224 1 0 0
+-0.320621 -0.371795 0.215748 0 1 0
+-0.410636 0.371795 0.236495 0 1 0
+0.5 -0.103439 0.190754 1 0 0
+-0.5 0.177859 -0.123451 1 0 0
+0.347366 -0.371795 0.069263 0 1 0
+0.468347 0.294872 -0.24362 0 1 0
+0.337907 -0.12702 -0.371795 0 0 1
+0.289011 0.294872 -0.341002 0 1 0
+-0.5 0.0203667 -0.245505 1 0 0
+0.0442254 0.289509 0.320513 0 0 1
+-0.383684 -0.0112348 0.338851 0.997453 0.071326 0
+0.5 0.0623149 0.164173 1 0 0
+-0.5 -0.184974 -0.227984 1 0 0
+-0.156306 -0.366514 0.320513 0.141348 -0.29982 0.943466
+-0.0510571 -0.288002 0.320513 0.0579671 -0.134409 0.989229
+-0.400631 -0.256437 0.320513 0 0 1
+0.156324 0.294872 0.253813 0 1 0
+0.0359018 0.231915 0.371795 0 0 1
+-0.326309 -0.371795 0.171754 0 1 0
+-0.0537655 -0.294872 0.28448 0 1 0
+-0.325556 -0.323151 -0.371795 0 0 1
+-0.163036 0.371795 -0.319298 0 1 0
+0.25325 -0.371795 0.261059 0 1 0
+-0.244991 -0.337527 0.320513 0 0 1
+0.5 -0.280668 -0.220376 1 0 0
+0.277919 0.294872 -0.334868 0 1 0
+0.0684564 -0.0838045 0.320513 0 0 1
+0.443771 -0.356559 0.320513 0.289763 0.121582 0.949345
+0.231803 0.294872 -0.00603585 0 1 0
+0.15582 0.176477 0.371795 0 0 1
+0.5 -0.229052 0.0291383 1 0 0
+-0.215991 -0.371795 0.0983777 0 1 0
+0.424962 0.119912 -0.371795 0 0 1
+0.448718 -0.33997 -0.367906 0.990928 0.0202768 -0.132858
+0.5 0.265488 -0.229885 1 0 0
+-0.164002 0.371795 0.0789995 0 1 0
+-0.5 0.343243 -0.105002 1 0 0
+0.448718 -0.31428 0.172692 1 0 0
+0.128373 0.0218583 0.320513 0 0 1
+-0.5 -0.191486 0.089759 1 0 0
+-0.145598 -0.0701595 -0.333333 0 0 1
+0.293664 -0.205053 -0.333333 0.212022 -0.183012 0.959976
+0.103022 0.178655 -0.333333 0 0 1
+0.124061 0.362265 -0.371795 0.0221474 -0.046165 0.998688
+-0.5 -0.0116832 -0.201427 1 0 0
+0.476651 -0.204081 0.320513 0 0 1
+-0.0283069 0.371795 -0.196788 0 1 0
+0.170553 0.227897 0.371795 0 0 1
+-0.13421 0.371795 -0.0206992 0 1 0
+-0.174837 -0.00246841 -0.333333 0 0 1
+0.236979 -0.114032 0.371795 0 0 1
+0.400554 -0.371795 -0.26903 0 1 0
+0.5 0.00424686 0.0188155 1 0 0
+0.369791 0.256741 -0.371795 0 0 1
+-0.5 0.361741 -0.337807 0.999262 -0.036001 0.0134252
+-0.5 0.0589731 0.00858899 1 0 0
+-0.0821227 -0.294872 0.0778653 0 1 0
+0.134934 0.205468 -0.333333 0 0 1
+0.347816 -0.322957 -0.371795 0 0 1
+-0.0254518 -0.294872 0.287197 0 1 0
+-0.215205 0.240382 0.361062 -0.34948 0.936944 0
+-0.398169 -0.371795 0.180803 0 1 0
+-0.110127 -0.294872 -0.0940532 0 1 0
+0.5 -0.198542 -0.294146 1 0 0
+-0.47786 -0.0512188 -0.371795 0 0 1
+0.388862 0.294872 -0.0231876 0 1 0
+-0.171846 0.371795 0.110006 0 1 0
+-0.333841 0.0219889 0.371795 0 0 1
+0.279331 0.294872 -0.182495 0 1 0
+-0.5 0.149059 0.269725 1 0 0
+-0.445493 0.371795 -0.23381 0 1 0
+-0.102193 0.230897 -0.340858 -0.0904822 0.955892 0.279433
+-0.0194431 -0.294872 0.202107 0 1 0
+0.486499 -0.294872 0.29131 0 1 0
+0.214713 -0.371795 0.0173683 0 1 0
+0.132689 0.145856 0.320513 -0.021037 -0.0540171 0.998318
+0.247107 0.098852 -0.333333 0 0 1
+0.404531 0.294872 0.1072 0 1 0
+-0.5 -0.0265716 0.0444674 1 0 0
+0.0558565 -0.0124762 -0.333333 0 0 1
+-0.5 -0.0185679 -0.23709 1 0 0
+-0.302266 0.153099 -0.333333 0 0 1
+-0.5 0.218229 -0.119772 1 0 0
+-0.297017 -0.294967 0.320513 0 0 1
+0.5 0.0046743 0.104348 1 0 0
+-0.146865 0.113896 -0.333333 0 0 1
+-0.277957 0.178351 0.371795 0 0 1
+0.382713 -0.371795 -0.281382 0 1 0
+0.154406 0.294872 -0.149095 0.0491288 0.998755 -0.00867925
+0.212367 -0.0427211 -0.333333 -0.00991397 -0.0519091 0.998603
+0.189865 0.230759 0.371795 0 0 1
+0.225597 0.254139 -0.371795 0 0 1
+-0.0947751 0.043753 0.320513 0 0 1
+0.141026 0.328307 0.0534013 1 0 0
+0.454347 0.294872 -0.0482531 0 1 0
+-0.454706 -0.294872 -0.308624 0.179349 0.981968 -0.0597753
+0.421514 0.035052 -0.371795 0 0 1
+-0.112175 0.371795 0.316111 -0.1204 0.856457 0.501982
+-0.5 -0.0132802 0.274547 1 0 0
+0.302437 0.294872 0.16506 0 1 0
+-0.060589 -0.294872 0.318418 -0.00199667 0.930419 -0.366493
+-0.5 -0.1521 0.158229 1 0 0
+0.141109 -0.345098 0.20249 1 0 0
+0.330815 0.294872 0.17587 0 1 0
+0.0380164 -0.134547 -0.333333 0 0 1
+0.303536 -0.347621 0.320513 0 0 1
+-0.320501 0.169218 0.358516 0.747542 -0.664189 0.00586647
+-0.085992 0.371795 -0.100202 0 1 0
+0.253251 -0.371795 0.158391 0 1 0
+-0.0252553 0.355282 -0.371795 0 0 1
+-0.433847 0.302745 0.320513 0 0 1
+-0.367147 0.322746 0.320513 0 0 1
+-0.0171545 0.071487 0.320513 0 0 1
+-0.252595 0.0572498 0.371795 0 0 1
+-0.5 0.315929 -0.257007 1 0 0
+-0.322207 -0.371795 -0.103679 0 1 0
+-0.5 -0.0716402 -0.298731 1 0 0
+-0.421848 -0.371795 0.273811 0 1 0
+0.16137 0.130498 0.371795 0.545599 0.674662 -0.497145
+0.141109 -0.298654 -0.192304 0.87236 0.428109 -0.236034
+-0.5 0.0200666 0.311701 0.999983 0.00198963 -0.00556851
+-0.0380039 -0.0010822 0.320513 0 0 1
+-0.141154 -0.336582 -0.0592232 1 0 0
+-0.162495 0.371795 -0.261528 0 1 0
+0.5 0.220766 -0.279626 1 0 0
+0.036135 0.107576 -0.333333 0 0 1
+-0.276442 -0.371795 0.24596 0 1 0
+0.205325 0.0287411 -0.106489 -0.635883 0.771782 -0.00240152
+-0.488356 -0.0907442 -0.371795 0 0 1
+0.252757 -0.230095 -0.35985 -0.0556439 0.995324 -0.0789557
+0.325942 -0.102586 0.371795 0 0 1
+-0.209789 0.230897 -0.366986 -0.0760304 0.96103 0.265783
+0.243375 0.036289 -0.0250021 0.286082 0.958198 0.00358663
+-0.439646 -0.309501 -0.371795 0.125329 -0.0355477 0.991478
+-0.19501 0.222377 -0.333333 0.0298018 0.129081 0.991186
+-0.177229 0.0646651 -0.333333 0 0 1
+0.324739 -0.310513 0.320513 0 0 1
+0.203756 -0.0181108 0.355782 0.996571 -0.0827434 -0.000128096
+0.37247 -0.0765889 0.320519 0.688649 -0.140511 0.711351
+0.278104 -0.371795 0.1181 0 1 0
+-0.20034 -0.0421448 0.324981 0.937053 0.294914 0.186967
+0.219536 0.282352 -0.371795 0 0 1
+-0.421357 -0.371795 -0.0733939 0 1 0
+-0.0974505 -0.294872 -0.242701 0 1 0
+0.15534 -0.298446 -0.371795 0 0 1
+-0.370524 -0.252564 0.320513 0 0 1
+-0.381355 0.0388811 0.358266 0.984924 -0.172728 0.00945543
+-0.268403 0.231454 0.320513 0 0 1
+-0.000337141 -0.0477197 0.320513 0 0 1
+-0.383382 -0.371795 0.297176 0 1 0
+0.266325 -0.371795 -0.172852 0 1 0
+0.267228 -0.113391 0.371795 0 0 1
+-0.5 0.370156 0.0173917 0.801044 -0.598574 0.00604491
+0.45855 0.286101 0.320513 0.0897867 0.209668 0.973641
+-0.333525 0.152286 0.324639 0.803169 -0.526029 -0.279667
+-0.339401 0.0904748 0.371795 0 0 1
+-0.5 0.263214 0.0269124 1 0 0
+-0.465694 -0.294872 0.114787 0 1 0
+-0.302668 -0.371795 0.0548869 0 1 0
+-0.222607 -0.371795 -0.0269815 0 1 0
+0.309048 -0.123621 -0.333333 0 0 1
+-0.141154 -0.347654 0.256726 1 0 0
+-0.226296 0.17926 0.371795 0 0 1
+-0.318386 0.371795 -0.225868 0 1 0
+-0.432313 0.371795 -0.0883507 0 1 0
+-0.395759 0.0831324 -0.371795 0 0 1
+0.213964 0.287548 -0.371795 -0.00913852 -0.181697 0.983312
+-0.133086 0.371795 -0.187086 0 1 0
+-0.5 -0.206299 0.242508 1 0 0
+-0.179762 -0.371795 -0.106005 0 1 0
+0.267428 0.215099 0.33835 0.536703 0.843764 0.00329526
+-0.430098 -0.126495 0.320513 0 0 1
+0.0321449 -0.294872 0.226343 0 1 0
+-0.177128 -0.133794 0.371795 0 0 1
+-0.416759 0.318216 -0.371795 0 0 1
+-0.373398 0.24432 -0.371795 0 0 1
+0.367761 -0.00229552 0.371795 0 0 1
+0.212327 -0.371795 0.197998 0 1 0
+-0.5 -0.143977 0.317356 0.88116 0.166869 -0.442393
+-0.197775 -0.0505328 0.320513 0.349713 0.132895 0.927383
+-0.498882 0.252197 0.320513 -0.526826 -0.0857087 0.845641
+-0.00349911 -0.294872 0.146872 0 1 0
+0.265167 -0.0168953 -0.178149 0.89847 -0.43903 -0.00176262
+-0.253233 -0.371795 -0.32225 0 1 0
+-0.113545 -0.294872 0.266561 0 1 0
+0.41929 0.294872 0.135592 0 1 0
+-0.468017 -0.120869 0.320513 0 0 1
+0.325496 -0.148286 0.371795 0.0312111 -0.023279 0.999242
+0.5 0.180622 -0.343277 1 0 0
+-0.5 -0.0840333 -0.309363 1 0 0
+0.428315 0.294872 0.0672491 0 1 0
+-0.474959 0.123111 -0.371795 0 0 1
+0.250867 -0.173522 -0.333333 0 0 1
+-0.141154 -0.349171 -0.315196 1 0 0
+-0.5 -0.195048 0.182206 1 0 0
+-0.00996576 -0.0676935 0.320513 0 0 1
+-0.327675 -0.160101 0.368657 0.813247 0.558204 -0.164432
+-0.387555 0.0916204 -0.371795 0 0 1
+0.176079 -0.264049 0.320513 0 0 1
+-0.245315 -0.227309 0.352652 0.479253 0.877677 0
+0.5 0.109347 -0.371253 -0.309286 -0.0987005 0.945833
+-0.388033 -0.371795 0.0733465 0 1 0
+0.466807 0.294872 0.292784 0 1 0
+-0.212788 0.0395283 -0.168048 0.410973 0.911608 -0.00852442
+0.389678 -0.371795 0.260734 0 1 0
+-0.323972 0.371795 0.0770512 0 1 0
+0.118465 -0.172002 -0.333333 0 0 1
+0.216466 0.281979 0.320513 0 0 1
+0.178353 0.0239456 0.320513 0 0 1
+-0.220462 -0.0421938 -0.299822 -0.252858 0.967495 -0.00406639
+0.0402582 -0.294872 -0.075166 0 1 0
+0.456788 0.294872 0.0581558 0 1 0
+-0.40056 -0.0297136 -0.371795 0 0 1
+-0.183161 0.371795 -0.158043 0 1 0
+0.274886 0.276282 0.320513 0 0 1
+0.5 0.222714 0.211963 1 0 0
+-0.5 -0.155016 -0.0347382 1 0 0
+0.346611 0.23282 0.320513 0 0 1
+-0.5 0.087934 0.19534 1 0 0
+0.349214 -0.128648 0.357901 0.877675 -0.479257 0
+0.323795 -0.371795 -0.214546 0 1 0
+-0.369102 -0.371795 -0.12246 0 1 0
+0.290694 0.294872 0.283098 0 1 0
+-0.5 0.0914955 0.106118 1 0 0
+-0.5 0.0648547 -0.0270786 1 0 0
+0.5 0.073406 0.212548 1 0 0
+-0.209847 0.0381571 -0.154329 0.524407 0.851427 -0.00830118
+-0.494969 -0.294872 0.0796102 0.20518 0.977989 0.0379358
+0.329565 0.294872 -0.327393 0 1 0
+-0.128964 0.158836 0.364858 -0.6253 0.712714 -0.317865
+0.187252 0.294872 -0.0183903 0 1 0
+0.5 0.265952 0.183748 1 0 0
+-0.5 -0.0895326 -0.364355 0.967839 0.0267418 0.250146
+0.331872 0.148794 0.371795 0.442561 0.176245 0.879248
+-0.486871 -0.207498 0.320513 0 0 1
+-0.399974 0.273724 0.320513 0 0 1
+0.215061 0.0349512 -0.17461 -0.464323 0.885666 0
+-0.141154 -0.321903 0.306244 1 0 0
+-0.453228 -0.294872 -0.0998208 0.692348 0.709591 -0.130901
+0.396228 0.294872 -0.0935418 0 1 0
+-0.49011 0.262232 -0.371795 0 0 1
+-0.127292 0.371795 0.0339082 0 1 0
+0.103844 -0.294872 -0.322655 0 1 0
+-0.5 0.0355984 -0.12774 1 0 0
+0.5 -0.0233134 -0.0950883 1 0 0
+0.5 0.0867216 0.216554 1 0 0
+0.0625684 -0.0584747 0.320513 0 0 1
+0.0409489 0.297662 0.320513 0 0 1
+-0.0958266 -0.294872 -0.0127215 0 1 0
+0.452947 0.294872 0.0177871 0 1 0
+-0.212509 0.371795 0.168626 0 1 0
+0.29329 -0.107427 -0.333333 0 0 1
+-0.318359 -0.0451627 0.371795 0 0 1
+0.141026 0.335988 -0.320789 1 0 0
+-0.448718 -0.327326 -0.328047 1 0 0
+0.133596 0.135207 0.320513 0 0 1
+0.141026 0.329086 0.0507695 1 0 0
+0.149516 0.294872 -0.0252191 0.00644455 0.999979 -0.000480804
+0.130594 0.0972258 0.320513 0 0 1
+-0.5 0.0651743 -0.267324 1 0 0
+-0.216947 0.041252 -0.114627 0.280478 0.959837 0.00666946
+0.413391 0.00618489 -0.371795 0 0 1
+0.440232 -0.358243 -0.371795 -0.157186 0 0.987569
+-0.208647 0.371795 -0.175518 0 1 0
+-0.312687 0.107509 -0.333333 -0.22148 -0.0215654 0.974927
+0.483659 -0.294872 0.162743 0 1 0
+-0.5 0.11965 -0.242781 1 0 0
+0.252635 0.242474 0.320513 0 0 1
+-0.5 0.0608633 -0.181084 1 0 0
+-0.0258719 0.342081 0.320513 0 0 1
+0.353194 0.294872 -0.258564 0 1 0
+0.374917 -0.0684728 0.35686 0.972761 -0.23176 -0.00490663
+-0.065522 -0.294872 0.264142 0 1 0
+-0.425983 0.273362 -0.371795 0 0 1
+-0.26801 0.0218156 0.371795 0 0 1
+-0.5 0.0576082 0.0892136 1 0 0
+0.141109 -0.308964 -0.0736437 1 0 0
+0.103412 -0.294872 0.184431 0 1 0
+-0.5 -0.167707 -0.142045 1 0 0
+0.5 0.117323 0.258948 1 0 0
+-0.5 0.0960665 -0.086515 1 0 0
+0.00128144 0.371795 0.222565 0 1 0
+-0.164741 -0.0466184 0.320513 0 0 1
+0.5 0.109165 -0.123453 1 0 0
+0.198524 -0.0207485 -0.25516 0.830738 0.556663 0
+-0.265895 -0.0255418 -0.235124 0.808166 0.588773 0.0146305
+0.221915 0.294872 0.0303696 0 1 0
+-0.141154 -0.318611 -0.299907 1 0 0
+0.388217 -0.371795 -0.31789 0 1 0
+0.278032 0.122619 0.371795 0 0 1
+0.394732 -0.371795 0.0425646 0 1 0
+-0.142507 0.230897 -0.371329 0.0176923 0.887644 0.46019
+0.0373963 0.339957 0.320513 0 0 1
+-0.198529 -0.173724 -0.333333 0 0 1
+0.5 -0.103592 -0.078822 1 0 0
+-0.5 -0.250771 0.299793 1 0 0
+-0.0521939 0.125268 0.320513 0 0 1
+0.360087 -0.108736 0.369055 0.615177 -0.514975 0.596957
+-0.402692 0.371795 0.280032 0 1 0
+-0.13612 0.347788 -0.371795 0 0 1
+0.0285777 -0.231806 -0.371795 -0.0400998 0.84722 -0.529726
+0.326293 -0.168663 0.320513 0.237324 -0.262201 0.935376
+-0.480173 -0.294872 0.00893728 0 1 0
+0.5 0.165645 -0.363128 0.998371 0.0032423 -0.0569644
+-0.424519 -0.268736 -0.371795 0 0 1
+0.133716 0.193134 0.371795 0 0 1
+-0.5 -0.163222 0.260054 1 0 0
+0.5 -0.0812305 -0.000556737 1 0 0
+-0.0992247 -0.294872 -0.052712 0 1 0
+-0.5 -0.276617 0.316541 0.995461 0.0463989 -0.0830898
+0.303858 -0.0551794 -0.333333 0 0 1
+0.200256 0.0232228 -0.144923 0.789458 -0.6138 0.0024407
+0.0594719 -0.294872 0.291085 0 1 0
+-0.5 0.24452 -0.119888 1 0 0
+0.269546 0.294872 0.0825261 0 1 0
+-0.344173 -0.13788 0.325005 0.832777 0.463247 -0.303125
+0.0290895 0.250527 -0.371795 0 0 1
+-0.5 0.215702 0.0319064 1 0 0
+-0.5 0.300923 -0.218636 1 0 0
+-0.5 -0.00650065 0.144534 1 0 0
+0.145221 0.230897 -0.367282 -0.26975 0.714147 0.645932
+0.400085 0.294872 -0.0120923 0 1 0
+-0.5 -0.193335 -0.0786796 1 0 0
+0.218844 0.0364711 -0.174445 -0.313389 0.949505 -0.0150894
+-0.360292 0.108359 0.342744 0.898517 -0.438927 -0.00321259
+0.0944416 0.371795 -0.236932 0 1 0
+0.453081 0.294872 0.191859 0 1 0
+0.216575 0.0356572 -0.123499 -0.353752 0.935328 -0.00452996
+-0.112917 0.371795 -0.186109 0 1 0
+0.364482 -0.15707 0.320513 0 0 1
+0.5 -0.0740306 -0.123747 1 0 0
+0.218096 0.0362707 -0.0737994 -0.336394 0.941695 -0.0070041
+0.417525 0.294872 -0.281461 0 1 0
+0.5 0.0341841 0.058709 1 0 0
+-0.260855 0.0313246 -0.0637959 -0.696842 0.717186 0.00738869
+0.5 -0.0971192 -0.0818804 1 0 0
+-0.323939 0.000972817 -0.371795 0.69694 -0.144354 -0.70245
+-0.5 0.323898 0.0192085 1 0 0
+-0.5 -0.0551825 -0.295907 1 0 0
+-0.141154 -0.31022 0.0122283 1 0 0
+-0.141154 -0.315118 0.112216 1 0 0
+0.0542202 0.0551829 0.320513 0 0 1
+0.320358 0.294872 -0.061135 0 1 0
+0.303171 -0.296582 -0.371795 0 0 1
+-0.0650258 -0.294872 0.045794 0 1 0
+-0.5 -0.292321 0.00650059 0.763509 0.62051 0.178946
+0.257877 -0.220449 0.334055 -0.479254 0.877676 0
+0.157107 0.294872 0.0923676 0 1 0
+-0.0442777 0.0509106 -0.333333 0 0 1
+-0.5 -0.19327 -0.289573 1 0 0
+-0.369059 0.371795 -0.0294707 0 1 0
+-0.334536 0.191027 0.320513 0 0 1
+0.5 0.0553998 -0.0153366 1 0 0
+-0.0621812 -0.294872 -0.355767 0 1 0
+-0.190829 0.0170976 -0.110107 0.93497 0.354724 0.00122095
+0.446018 0.290635 0.320513 0.0167831 0.372638 0.927825
+-0.455783 0.371795 0.0218069 0 1 0
+-0.5 0.234328 0.313629 0.991734 -0.0262727 -0.125595
+-0.296876 -0.00184915 -0.333333 0 0 1
+0.235839 0.294872 -0.335647 0 1 0
+0.325474 0.294872 -0.371658 -0.145316 0.793249 -0.591303
+0.07819 0.256282 0.365694 -0.0504102 0.993304 0.103952
+-0.235428 -0.371795 -0.0745272 0 1 0
+-0.5 -0.109737 -0.37035 0.477964 -0.0224429 0.878093
+0.419288 -0.371795 0.168643 0 1 0
+-0.320513 0.098367 -0.360279 1 0 0
+-0.5 -0.0846494 0.213072 1 0 0
+0.0348326 -0.0515581 -0.333333 0 0 1
+0.5 0.0416262 0.112881 1 0 0
+0.133795 0.371795 0.270427 0.277678 0.957122 -0.0825411
+-0.260958 0.0715164 0.371795 0 0 1
+-0.5 0.173191 -0.0501599 1 0 0
+0.096434 0.371795 -0.131904 0 1 0
+-0.149605 -0.334019 -0.371795 -0.169302 0.0609742 0.983676
+0.5 0.223855 -0.269457 1 0 0
+0.141026 0.315339 -0.0240439 1 0 0
+-0.14023 -0.294872 0.109989 0.714493 -0.695945 -0.0718372
+0.221105 -0.0370772 -0.0887537 0.256855 0.966445 0.00299952
+-0.269971 -0.0186815 -0.215801 0.895056 0.445776 -0.0125749
+-0.173726 -0.171646 -0.333333 0 0 1
+-0.394441 -0.371795 0.0137924 0 1 0
+-0.0894559 -0.294872 -0.198145 0 1 0
+0.320513 0.0888272 -0.352671 1 0 0
+-0.367852 0.371795 0.0242956 0 1 0
+-0.351661 -0.142509 0.320513 -0.0963682 -0.0749979 0.992516
+0.175649 0.0244918 0.320513 0 0 1
+0.129911 -0.0771965 -0.333333 0 0 1
+0.0610177 0.371795 0.266955 0 1 0
+-0.5 -0.199442 -0.318045 1 0 0
+0.250584 -0.0791791 -0.333333 0 0 1
+0.5 0.134987 -0.0912784 1 0 0
+0.107497 -0.294872 -0.302676 0 1 0
+-0.358862 0.275848 0.320513 0 0 1
+-0.264176 -0.0881808 0.371795 0 0 1
+0.040779 0.371795 -0.098666 0 1 0
+0.229892 0.294872 -0.342312 0 1 0
+0.223314 0.0376689 -0.234432 -0.232856 0.971959 -0.0327721
+-0.448718 -0.300206 -0.153348 0.977747 0.2008 0.0607406
+-0.0302696 -0.256282 0.347108 0 1 0
+-0.5 0.0523772 -0.2523 1 0 0
+-0.27439 -0.371795 -0.197635 0 1 0
+0.199094 0.0215632 -0.216024 0.824339 -0.566038 -0.00809554
+-0.5 -0.269397 0.230253 1 0 0
+-0.200031 0.371795 0.0791054 0 1 0
+0.323039 0.294872 -0.162157 0 1 0
+0.20451 -0.371795 -0.203589 0 1 0
+0.318024 0.00639238 -0.333333 0.509469 0.112246 0.853137
+-0.278531 -0.371795 -0.0931288 0 1 0
+-0.455048 0.371795 0.140627 0 1 0
+0.5 -0.20707 -0.260409 1 0 0
+0.149571 -0.371795 -0.22633 0.114642 0.992185 0.0492566
+-0.171159 -0.371795 -0.0822314 0 1 0
+-0.353774 0.213346 0.320513 0 0 1
+0.373543 -0.371795 0.107846 0 1 0
+-0.081196 -0.294872 0.102442 0 1 0
+0.5 -0.0390161 -0.219057 1 0 0
+0.117975 -0.294872 -0.141533 0 1 0
+0.184715 -0.0881227 0.365352 0.878816 -0.393965 -0.269209
+-0.5 0.127512 0.127752 1 0 0
+0.358197 -0.269715 -0.371795 0 0 1
+-0.410521 0.153385 0.320513 0 0 1
+0.231545 0.0383936 -0.316133 0.0256027 0.999212 -0.0303249
+-0.0056584 0.371795 -0.0389708 0 1 0
+0.448718 -0.341618 0.16415 1 0 0
+0.0759584 0.230897 -0.349854 0 1 0
+-0.337187 0.157697 0.320513 -0.276294 0.153336 0.948762
+0.247747 0.034359 -0.22403 0.427769 0.90382 0.0111021
+-0.287171 0.150631 -0.333333 0 0 1
+0.281597 -0.319081 -0.371795 0 0 1
+-0.379627 0.0803501 0.320513 -0.0250286 -0.0123162 0.999611
+-0.139308 -0.294872 -0.256553 0.814973 -0.548669 -0.186499
+0.196211 -0.371795 0.225208 0 1 0
+0.23525 -0.0380695 -0.0354208 -0.159143 0.987035 -0.0208745
+-0.328701 0.0546157 0.371795 0 0 1
+-0.0338851 -0.176571 -0.333333 0 0 1
+-0.162997 0.349406 0.320513 0 0 1
+-0.5 0.111099 0.2642 1 0 0
+-0.5 0.0554687 -0.238805 1 0 0
+0.309366 -0.371795 -0.106993 0 1 0
+0.216643 0.162988 -0.333333 0 0 1
+-0.428264 -0.155203 0.320513 0 0 1
+-0.402338 -0.371795 -0.0601805 0 1 0
+0.141109 -0.344431 -0.168244 1 0 0
+0.141109 -0.306952 0.198643 0.999534 0.0262818 -0.015511
+0.439047 -0.371795 -0.203653 -0.0613293 0.997982 0.0164386
+-0.401404 -0.371795 0.213367 0 1 0
+0.202667 0.294872 -0.182732 0 1 0
+0.0558394 -0.0214048 0.320513 0 0 1
+-0.428945 0.277935 0.320513 0 0 1
+-0.0958733 -0.294872 0.154641 0 1 0
+0.186077 0.085018 0.338664 0.915775 0.401693 0
+-0.136963 0.0921545 -0.333333 0 0 1
+-0.270624 -0.22592 -0.345843 0.354285 0.934941 0.0191429
+0.0168202 -0.172191 0.320513 0 0 1
+-0.316937 -0.371795 -0.180973 0 1 0
+0.5 -0.0351275 -0.289601 1 0 0
+-0.5 0.0159195 0.117702 1 0 0
+0.160457 -0.371795 -0.325487 0 1 0
+-0.0113912 -0.294872 0.256555 0 1 0
+-0.266023 0.26179 0.320513 0 0 1
+0.5 -0.204112 -0.353486 1 0 0
+0.286183 0.201059 0.362461 0.602375 0.798116 0.0124621
+0.141026 0.306759 0.1006 1 0 0
+0.5 -0.0789603 0.290467 1 0 0
+0.158606 -0.371795 -0.149475 0 1 0
+-0.361295 -0.197294 0.320513 0 0 1
+-0.5 -0.200966 -0.0991833 1 0 0
+0.141026 0.335736 -0.184883 1 0 0
+0.192707 -0.00456012 -0.225125 0.991139 0.132494 -0.00940969
+-0.448718 -0.347573 -0.0596456 1 0 0
+-0.5 0.278091 -0.0481905 1 0 0
+-0.5 0.13588 -0.26215 1 0 0
+0.318547 -0.368985 0.320513 0.127799 0.884975 -0.447757
+-0.318357 -0.0468494 -0.333333 -0.475026 -0.0477783 0.878674
+0.279935 0.294872 -0.276398 0 1 0
+-0.5 0.255712 -0.243644 1 0 0
+0.5 -0.185929 0.0929457 1 0 0
+0.141109 -0.336652 0.196836 1 0 0
+-0.193426 0.282496 0.320513 0 0 1
+0.212362 -0.371795 -0.169127 0 1 0
+-0.210645 0.242083 0.349768 -0.348505 0.937307 0
+0.414254 0.294872 0.227348 0 1 0
+0.46184 0.0688519 0.320513 0 0 1
+0.374951 -0.124188 0.320513 0 0 1
+-0.192289 -0.200064 0.371795 0 0 1
+-0.0835814 -0.294872 0.0381788 0 1 0
+0.351119 -0.125159 0.362232 0.875006 -0.469791 0.116878
+0.5 0.169897 0.0272312 1 0 0
+-0.5 -0.19219 0.319579 0.729129 -0.0386399 -0.683285
+-0.472015 0.371795 0.0654522 0 1 0
+0.121246 -0.294872 -0.0701395 0 1 0
+-0.0503848 0.25215 -0.371795 0 0 1
+0.314988 -0.182183 -0.358689 0.929676 -0.368362 -0.00337148
+0.5 0.0555257 0.302591 1 0 0
+-0.5 0.33202 -0.368428 0.968352 0.0946664 0.230939
+0.444966 -0.371795 -0.347091 -0.502025 0.864731 -0.0145473
+-0.5 0.110146 -0.206806 1 0 0
+-0.13749 0.337355 -0.371795 0 0 1
+0.180768 -0.239454 -0.371795 0.00846144 -0.0473528 0.998842
+-0.375512 0.0657412 0.332288 0.975844 -0.218468 0.000907779
+0.472351 0.294872 0.254244 0 1 0
+-0.366565 0.371795 -0.332134 0 1 0
+-0.492466 0.0928601 0.320513 -0.0743926 -0.0279645 0.996837
+-0.5 0.198464 -0.281544 1 0 0
+-0.186383 -0.207021 0.371795 0 0 1
+0.34461 -0.371795 -0.085859 0 1 0
+-0.5 0.132204 -0.291017 1 0 0
+0.310127 -0.0520165 0.371795 0 0 1
+-0.422808 0.035009 0.320513 0 0 1
+-0.5 0.151452 -0.212492 1 0 0
+-0.321295 0.371795 -0.193831 0 1 0
+-0.5 -0.280207 -0.128763 1 0 0
+0.0936899 0.371795 -0.202661 0 1 0
+0.167827 0.294872 0.259053 0 1 0
+-0.205441 0.0352757 -0.132727 0.566415 0.823899 -0.0190743
+-0.383301 0.0165823 0.325921 0.968474 -0.0354136 -0.246583
+-0.240806 -0.0583876 0.371795 0 0 1
+0.5 0.00638133 0.224065 1 0 0
+0.173229 0.294872 0.292271 0 1 0
+-0.240436 -0.345236 -0.371795 0 0 1
+0.5 -0.272074 -0.183357 1 0 0
+0.229816 0.294872 -0.125871 0 1 0
+-0.179143 0.230897 -0.350699 0 1 0
+-0.0951511 -0.294872 0.200673 0 1 0
+-0.5 -0.106442 0.0868005 1 0 0
+-0.5 -0.287277 0.128993 0.987226 0.143472 -0.0692927
+-0.195936 -0.0452959 0.320513 0.154553 0.0657913 0.985791
+0.054181 0.371795 -0.260606 0 1 0
+-0.235899 -0.371795 -0.328392 0 1 0
+0.384915 -0.371795 -0.0765739 0 1 0
+0.5 -0.283292 0.150781 1 0 0
+-0.00982429 0.371795 0.0586486 0 1 0
+-0.5 -0.171766 0.200881 1 0 0
+0.196116 0.0588222 0.332228 0.969429 0.244706 -0.0180791
+0.452394 0.294872 -0.221016 0 1 0
+0.254373 -0.0290831 0.00057495 -0.534776 0.736665 -0.413932
+-0.5 -0.189222 0.253455 1 0 0
+0.5 0.0919809 -0.0725344 1 0 0
+0.0397629 -0.294872 0.0429527 0 1 0
+-0.237718 -0.371795 0.00240746 0 1 0
+0.488624 0.0322886 0.320513 0.0413165 0.000570405 0.999146
+0.321976 0.0901953 -0.371795 0.519633 0.120873 0.845796
+-0.20347 -0.033896 -0.19584 -0.639917 0.768388 0.00933525
+0.0751808 -0.294872 -0.0665128 0 1 0
+0.114698 -0.230897 -0.356776 0 1 0
+-0.29265 -0.0576898 -0.333333 0 0 1
+-0.162387 -0.371795 0.256066 0 1 0
+-0.118703 0.371795 -0.353804 0 1 0
+-0.211407 -0.230897 -0.360902 0 1 0
+0.162662 0.271142 -0.371795 0 0 1
+0.382146 0.294872 -0.0230766 0 1 0
+-0.4021 0.0910756 -0.371795 0 0 1
+0.334246 -0.169779 -0.371795 0 0 1
+0.5 -0.179 0.251192 1 0 0
+0.5 -0.050496 0.0425537 1 0 0
+-0.00685644 0.0970551 -0.333333 0 0 1
+-0.493266 -0.178241 -0.371795 0.312756 -0.105441 0.943963
+0.5 -0.148121 -0.309059 1 0 0
+0.427662 0.203517 0.320513 0 0 1
+-0.5 -0.132013 0.0898084 1 0 0
+-0.45348 0.112091 0.320513 0 0 1
+-0.448718 -0.312172 -0.2521 1 0 0
+0.141026 0.352748 -0.0524558 1 0 0
+-0.5 0.0336069 0.18864 1 0 0
+0.5 -0.0445222 0.215751 1 0 0
+-0.265743 0.371795 -0.34553 0 1 0
+0.0455611 -0.294872 -0.00242477 0 1 0
+0.5 0.247951 0.0754973 1 0 0
+-0.5 -0.156154 -0.0536409 1 0 0
+-0.0238097 0.371795 -0.107883 0 1 0
+0.0619152 0.226725 0.371795 0 0 1
+-0.415976 0.371795 -0.148697 0 1 0
+-0.248156 -0.0398055 -0.257718 0.366684 0.930341 0.00280218
+0.5 -0.0321642 0.025415 1 0 0
+0.257237 0.166905 0.371795 0 0 1
+0.265267 -0.371795 0.0949322 0 1 0
+0.5 0.0996101 -0.179586 1 0 0
+0.412395 -0.270714 0.320513 0 0 1
+0.0450225 -0.0882993 -0.333333 0 0 1
+0.5 -0.177464 0.176172 1 0 0
+0.268477 0.294872 -0.269555 0 1 0
+-0.117649 0.163142 0.320513 0.344207 -0.420232 0.839599
+0.100269 0.319308 -0.371795 0 0 1
+0.5 -0.0553538 0.268295 1 0 0
+-0.342807 0.371795 0.167976 0 1 0
+0.287151 0.294872 -0.0659814 0 1 0
+0.5 0.0517428 -0.128459 1 0 0
+0.304473 0.294872 0.0499809 0 1 0
+-0.00412205 0.371795 0.0155774 0 1 0
+0.360381 -0.25481 -0.371795 0 0 1
+-0.338328 -0.371795 -0.227378 0 1 0
+-0.42252 0.371795 -0.256765 0 1 0
+-0.36643 0.371795 0.215878 0 1 0
+0.479221 -0.294872 -0.335907 0 1 0
+-0.5 -0.194905 0.253774 1 0 0
+0.5 0.288601 -0.280713 0.91243 0.409228 0.00218223
+-0.5 -0.0647808 -0.255401 1 0 0
+-0.27333 -0.00893702 -0.308959 0.97698 0.212275 -0.0211855
+0.27515 0.294872 -0.14298 0 1 0
+0.141109 -0.334308 0.246383 1 0 0
+-0.307436 -0.0317686 -0.333333 0 0 1
+-0.446748 -0.371795 -0.221581 0.654642 0.752892 0.0678075
+-0.0882231 -0.042815 -0.333333 0 0 1
+0.448718 -0.301838 0.231126 0.963771 -0.247284 0.0999795
+-0.216215 0.240005 0.353302 -0.349475 0.936946 0
+-0.0527215 0.371795 -0.233028 0 1 0
+0.5 0.282377 -0.307174 1 0 0
+-0.416007 0.353131 -0.371795 0 0 1
+0.132061 -0.0421771 0.320513 0 0 1
+0.35084 -0.12567 0.35076 0.877674 -0.479258 0
+0.229569 0.179874 0.371795 0 0 1
+-0.448718 -0.350911 -0.134835 1 0 0
+0.371563 0.294872 0.277492 0 1 0
+-0.5 -0.111784 -0.019554 1 0 0
+0.5 -0.139889 -0.324982 1 0 0
+-0.0092167 -0.256653 0.320513 -0.0460953 -0.380912 0.923461
+0.220058 0.294872 0.0679022 0 1 0
+0.5 0.129861 0.075171 1 0 0
+-0.240364 -0.0423847 -0.0613245 0.178108 0.983992 -0.00612029
+-0.0864297 -0.294872 0.138127 0 1 0
+-0.5 0.209997 -0.16109 1 0 0
+-0.5 0.0624049 -0.0611842 1 0 0
+-0.188726 -0.0108697 -0.140888 0.965592 -0.259333 -0.0194744
+-0.445734 -0.318246 -0.371795 0.490049 -0.0207843 0.871447
+0.0306944 -0.0294767 0.320513 0 0 1
+0.375959 0.294872 -0.241504 0 1 0
+-0.5 0.0272382 0.243449 1 0 0
+0.141026 0.357325 0.16872 1 0 0
+0.294073 -0.371795 0.138084 0 1 0
+-0.244276 0.371795 0.248197 0 1 0
+-0.0457777 -0.0886782 0.320513 0 0 1
+-0.0537073 0.247182 0.371795 0.0608705 0.0914515 0.993947
+-0.256027 0.0749207 -0.333333 0 0 1
+-0.445078 -0.371795 0.141995 0.588933 0.805542 -0.0652659
+0.0725957 0.029169 -0.333333 0 0 1
+-0.0260916 0.261552 -0.371795 0 0 1
+0.5 0.106598 -0.128199 1 0 0
+-0.247365 -0.0784412 -0.333333 0 0 1
+-0.5 -0.020921 -0.169047 1 0 0
+-0.5 0.160475 -0.179695 1 0 0
+0.439515 0.105461 0.320513 0 0 1
+-0.195808 -0.0906024 0.371795 0.0044187 -0.000947931 0.99999
+0.199796 0.022566 -0.018931 0.818577 -0.574391 -0.0026602
+-0.141154 -0.310559 -0.0702432 1 0 0
+0.37273 -0.371795 -0.0900903 0 1 0
+-0.5 -0.222424 0.0112151 1 0 0
+-0.212977 0.371795 -0.274527 0 1 0
+0.394191 0.199884 0.320513 0 0 1
+-0.208215 -0.0372183 -0.290086 -0.548192 0.836352 0.000799506
+0.0975853 -0.104911 0.320513 0 0 1
+0.419916 -0.371795 -0.125297 0 1 0
+0.2522 -0.223549 0.322419 -0.380329 0.718075 -0.582854
+-0.243292 0.0404818 0.371795 0 0 1
+-0.5 -0.010283 -0.0825065 1 0 0
+-0.5 -0.21914 -0.0657903 1 0 0
+-0.350386 0.296866 0.320513 0 0 1
+0.219117 -0.14507 0.371795 0 0 1
+0.071446 -0.294872 -0.194367 0 1 0
+-0.5 0.141996 0.0885059 1 0 0
+0.0657175 0.322139 -0.371795 0 0 1
+0.112383 -0.294872 0.00249444 0 1 0
+0.0737874 -0.246566 -0.371795 0 0 1
+-0.274473 -0.371795 0.282223 0 1 0
+-0.0368967 0.324667 0.320513 0 0 1
+-0.438945 0.371795 -0.229621 0 1 0
+0.313118 0.294872 -0.211372 0 1 0
+-0.0310636 -0.147959 -0.333333 0 0 1
+-0.264175 0.0279985 -0.0733346 0.765449 -0.642791 0.0301154
+0.5 -0.250244 0.077294 1 0 0
+-0.0388586 0.371795 -0.0867111 0 1 0
+-0.5 -0.0808355 0.0621686 1 0 0
+-0.345171 -0.136051 0.362058 0.874727 0.481605 -0.0539372
+-0.460752 0.257785 0.320513 0 0 1
+-0.5 -0.083376 -0.213332 1 0 0
+0.016613 0.371795 -0.309728 0 1 0
+-0.0887604 0.327281 -0.371795 0 0 1
+0.5 -0.0553129 -0.0223759 1 0 0
+-0.152186 0.193528 0.371795 0 0 1
+0.24361 0.0362261 -0.324716 0.371498 0.902063 0.219708
+0.250558 0.294872 -0.333747 0 1 0
+-0.346116 0.291463 -0.371795 0 0 1
+-0.491554 0.0565259 0.320513 -0.00636667 0.00118651 0.999979
+0.414554 -0.051106 0.320513 0 0 1
+0.159391 -0.371795 -0.326322 0 1 0
+-0.0600618 -0.294872 0.186356 0 1 0
+-0.327636 0.243356 -0.371795 0 0 1
+0.19136 -0.230897 -0.364503 0.0156932 0.9793 -0.201804
+-0.135145 -0.285311 -0.371795 0 0 1
+0.183529 -0.119098 -0.333333 0 0 1
+-0.5 -0.152281 0.131416 1 0 0
+0.251836 -0.223748 0.325167 -0.434089 0.871795 -0.227027
+0.448718 -0.33834 0.128195 1 0 0
+0.0249978 0.201509 -0.333333 0 0 1
+-0.323657 -0.371795 -0.118084 0 1 0
+0.276069 -0.17442 0.371795 0 0 1
+-0.472213 0.28209 -0.371795 0 0 1
+-0.229038 0.371795 0.0651233 0 1 0
+-0.141154 -0.367967 -0.236039 0.958355 -0.277867 -0.0659183
+-0.211483 0.212567 0.371795 0 0 1
+0.147158 -0.0848651 0.320513 0 0 1
+-0.006048 0.371795 -0.200067 0 1 0
+0.291016 0.294872 0.0262362 0 1 0
+-0.333476 0.152352 0.339849 0.800542 -0.599277 0
+-0.177336 -0.371795 0.0688699 0 1 0
+-0.28132 0.2047 0.355591 -0.599278 0.800541 0
+0.343199 0.222192 0.320513 0 0 1
+-0.5 0.155658 0.255794 1 0 0
+0.163521 0.230897 -0.342878 0.00116118 0.999857 0.0168975
+-0.320513 -0.0470597 -0.353349 1 0 0
+-0.0227633 -0.135976 -0.333333 0 0 1
+0.100015 0.371795 -0.172086 0 1 0
+-0.133587 -0.294872 0.133056 -0.160135 0.986945 -0.0172111
+0.322429 -0.371795 -0.0706096 0 1 0
+0.118628 0.371795 -0.0725606 0 1 0
+-0.093037 -0.294872 0.255419 0 1 0
+0.0583101 -0.294872 0.286227 0 1 0
+-0.448718 -0.35381 0.245083 1 0 0
+-0.291165 0.19733 0.348364 -0.605111 0.796141 0
+0.448718 -0.311035 -0.217308 1 0 0
+-0.254781 -0.0488559 0.371795 0 0 1
+-0.185507 -0.371795 -0.140676 0 1 0
+0.0137307 0.25831 -0.371795 0 0 1
+0.5 0.228576 0.279716 1 0 0
+0.215141 0.0349886 -0.229933 -0.390603 0.920408 0.0166959
+0.268327 -0.371795 0.160203 0 1 0
+0.359491 0.265118 0.320513 0 0 1
+0.208247 -0.169766 -0.333333 0 0 1
+0.5 0.0588891 0.0526403 1 0 0
+0.5 -0.0108315 0.0139909 1 0 0
+-0.0868442 -0.294872 0.0721502 0 1 0
+0.36111 -0.142503 -0.371795 0 0 1
+0.5 0.0362267 0.0478013 1 0 0
+-0.229815 -0.371795 -0.0711048 0 1 0
+0.5 0.152517 0.0483616 1 0 0
+0.320513 -0.0117591 -0.340181 0.941572 -0.0240207 0.335953
+0.0214371 0.247708 0.371795 0.00298725 0.0878503 0.996129
+-0.103903 -0.294872 -0.146403 0 1 0
+-0.0271037 0.358525 -0.371795 0.00750813 -0.0570366 0.998344
+0.0935315 0.371795 -0.345822 0 1 0
+0.0935239 -0.294872 0.22392 0 1 0
+0.254926 -0.0298593 -0.324504 -0.634051 0.763883 -0.12026
+0.370626 -0.371795 0.287521 0 1 0
+-0.5 -0.137358 -0.118672 1 0 0
+-0.212506 -0.0343 -0.0324703 0.316774 -0.540265 0.779595
+-0.234867 -0.371795 -0.276853 0 1 0
+-0.340033 0.168785 0.320513 0 0 1
+-0.5 -0.111481 -0.0526081 1 0 0
+0.422951 -0.152696 -0.371795 0 0 1
+-0.354861 0.348642 -0.371795 0 0 1
+0.206976 -0.079027 -0.333333 0 0 1
+0.5 -0.188447 -0.0132669 1 0 0
+-0.46001 0.363565 -0.371795 -0.0156596 -0.0400349 0.999076
+0.369701 0.115202 -0.371795 0 0 1
+0.5 -0.150561 0.0125733 1 0 0
+0.165915 0.205834 0.371795 0 0 1
+-0.5 0.355863 -0.279306 1 0 0
+0.5 0.249475 0.123795 1 0 0
+0.5 0.276258 -0.057092 1 0 0
+-0.5 -0.21627 -0.0115359 1 0 0
+-0.360498 0.237321 -0.371795 0 0 1
+0.239898 0.294872 -0.0105342 0 1 0
+-0.0964801 -0.238055 -0.371795 -0.00722523 -0.214798 0.976632
+0.5 -0.0985458 -0.0812244 1 0 0
+-0.5 0.225672 0.0219258 1 0 0
+0.448718 -0.343462 -0.246564 1 0 0
+-0.374201 -0.259703 0.320513 0 0 1
+-0.0658851 -0.294872 0.00801065 0 1 0
+0.5 -0.11496 0.0508636 1 0 0
+-0.249615 -0.039125 -0.132489 0.441088 0.897359 -0.0137367
+-0.158357 -0.371795 0.10643 0 1 0
+-0.0129766 -0.249768 -0.371795 0 0 1
+0.448718 -0.363337 -0.284156 0.97466 -0.223483 -0.00961073
+-0.5 0.00472594 0.291324 1 0 0
+-0.339658 0.330046 0.320513 0 0 1
+0.487592 -0.294872 0.159665 0 1 0
+0.26325 -0.371795 -0.0074156 0 1 0
+0.147588 0.294872 -0.237163 0.223015 0.974591 -0.0208806
+0.442161 0.205294 -0.371795 0 0 1
+0.0707015 0.0227518 0.320513 0 0 1
+-0.137888 -0.294872 0.225381 -0.297877 0.950025 -0.0933899
+0.410773 -0.312619 0.320513 0 0 1
+0.5 -0.0505339 0.290969 1 0 0
+0.355515 0.0608282 -0.371795 0 0 1
+-0.0562082 0.371795 -0.173473 0 1 0
+0.00697719 -0.204555 0.343803 -0.00942034 0.999955 -0.00145963
+0.141109 -0.344424 -0.326661 1 0 0
+-0.281898 0.371795 -0.0333504 0 1 0
+-0.302444 -0.371795 -0.213785 0 1 0
+0.242239 -0.371795 0.0522489 0 1 0
+-0.374817 0.149733 0.320513 0 0 1
+0.0674692 0.230897 -0.350823 0 1 0
+0.375057 0.0678301 0.341036 0.969253 0.245868 0.0098924
+-0.226795 -0.0432421 -0.0815085 -0.123544 0.992247 0.0135008
+0.405215 0.294872 0.0963044 0 1 0
+0.0885166 0.371795 -0.303172 0 1 0
+-0.4479 0.0274646 0.320513 0 0 1
+-0.478747 0.371795 0.0601117 0 1 0
+0.106065 -0.294872 0.000432895 0 1 0
+-0.5 0.160283 -0.16272 1 0 0
+0.0934258 -0.167881 0.320513 -0.00876002 0.0119098 0.999891
+-0.5 0.249781 -0.219573 1 0 0
+0.399523 -0.371795 0.122628 0 1 0
+-0.5 0.254527 0.31629 0.813535 -0.00988585 -0.581432
+0.195228 -0.0144429 -0.227386 0.935706 0.352732 0.00595084
+0.141026 0.349535 0.304815 1 0 0
+-0.0978787 0.371795 0.242151 0 1 0
+-0.442347 0.0858782 -0.371795 0 0 1
+0.289076 -0.20488 0.320513 0.272888 -0.395049 0.877194
+0.100283 0.0426159 0.320513 0 0 1
+0.298166 -0.371795 -0.285562 0 1 0
+0.219512 -0.371795 0.0654905 0 1 0
+0.248844 -0.195986 0.371795 0 0 1
+-0.00678183 0.371795 0.286652 0 1 0
+-0.339944 -0.266063 0.320513 0 0 1
+0.164743 -0.370366 -0.371795 -0.017578 0.822079 0.569101
+-0.417902 0.29015 -0.371795 0 0 1
+0.396688 -0.0594069 -0.371795 0 0 1
+-0.5 0.33692 0.201512 1 0 0
+0.107183 -0.294872 -0.263079 0 1 0
+0.454062 -0.294872 0.213821 -0.346554 0.927229 -0.141937
+0.212628 -0.277151 -0.371795 0 0 1
+0.0667038 -0.294872 -0.335744 0 1 0
+0.207811 0.0799622 -0.333333 0 0 1
+0.174819 -0.0765668 -0.333333 0 0 1
+0.17597 -0.0316452 -0.333333 0 0 1
+-0.0494258 0.371483 0.320513 -0.0806645 0.493057 0.866249
+-0.448718 -0.371778 -0.202153 0.521646 0.852077 -0.043008
+0.0375589 0.182883 0.320513 0 0 1
+-0.0874002 0.371795 -0.230196 0 1 0
+0.5 0.218382 -0.130261 1 0 0
+0.382306 -0.371795 0.0935182 0 1 0
+0.254684 -0.0300287 -0.0115775 -0.625837 0.779883 -0.0104689
+-0.136791 -0.294872 -0.263034 -0.258162 0.9661 0.00143099
+0.00554307 -0.294872 0.1794 0 1 0
+0.5 -0.10932 0.191271 1 0 0
+0.5 -0.152413 -0.313855 1 0 0
+0.413745 -0.355094 0.320513 0 0 1
+-0.5 0.190256 -0.0275595 1 0 0
+0.5 -0.0218559 -0.233357 1 0 0
+-0.114996 0.371795 -0.099247 0 1 0
+-0.316344 -0.371795 -0.257865 0 1 0
+-0.301924 -0.173989 0.371795 7.07167e-005 -0.0205772 0.999788
+0.159902 -0.371795 0.0243816 0 1 0
+-0.122424 0.3165 0.320513 0 0 1
+0.448718 -0.355509 -0.0610094 1 0 0
+-0.440603 -0.0678391 -0.371795 0 0 1
+0.129562 -0.294872 -0.0801676 0 1 0
+0.0264755 0.371795 0.29602 0 1 0
+0.5 -0.212882 0.244516 1 0 0
+-0.255439 0.371795 0.310549 -0.00144421 0.99989 0.0147655
+-0.219022 -0.0985391 -0.333333 0 0 1
+-0.390377 -0.371795 -0.181105 0 1 0
+-0.5 -0.174889 -0.244113 1 0 0
+0.251691 -0.223827 0.365746 -0.464251 0.879568 -0.104069
+-0.110192 0.348836 0.320513 0 0 1
+-0.390969 -0.371795 -0.0606902 0 1 0
+-0.124845 -0.294872 -0.250275 0 1 0
+-0.0135367 0.0752177 0.320513 0 0 1
+0.00375652 -0.158978 0.320513 0 0 1
+-0.137272 0.371795 0.0659993 0 1 0
+0.238732 0.230897 -0.357728 0.02215 0.999753 -0.00190636
+-0.334546 0.371795 0.0285032 0 1 0
+-0.5 0.208286 -0.167503 1 0 0
+0.28705 0.265077 0.320513 0 0 1
+-0.165436 0.120775 0.35326 0.836092 -0.548589 0
+0.252763 -0.0313743 -0.297395 -0.611258 0.791415 0.00515817
+0.489174 0.294872 -0.000924818 0.051761 0.998617 -0.00918806
+0.194428 0.206231 0.371795 0 0 1
+0.141109 -0.300019 0.0742007 0.958537 0.281715 0.0429314
+-0.141154 -0.361242 -0.159523 0.99976 -0.0217647 -0.00239373
+0.5 -0.142053 0.170047 1 0 0
+0.0595679 0.371795 0.200792 0 1 0
+-0.30145 -0.371795 0.0532102 0 1 0
+0.334284 0.294872 0.0202069 0 1 0
+0.242025 -0.282211 -0.371795 0 0 1
+-0.141154 -0.316501 0.311885 0.978407 0.0273349 0.204872
+0.0848543 -0.294872 0.0877206 0 1 0
+0.126307 0.371795 -0.0110023 0 1 0
+0.0488594 0.371795 -0.320517 0 1 0
+0.324327 -0.360335 -0.371795 0 0 1
+0.0714719 -0.0577858 -0.333333 0 0 1
+0.443974 -0.371795 -0.301516 -0.282928 0.956512 0.0709644
+0.320513 -0.0251141 -0.351404 1 0 0
+0.352132 -0.317038 0.320513 0 0 1
+0.5 -0.277573 0.225377 1 0 0
+0.468263 -0.294872 -0.29272 0 1 0
+0.307148 -0.336556 0.320513 0 0 1
+0.212409 -0.241425 0.324954 -0.396562 0.871047 -0.289855
+0.0155132 0.352793 0.320513 0 0 1
+0.0589626 -0.230897 -0.333565 -0.0397165 -0.642529 0.765231
+-0.315691 -0.191885 -0.371795 -0.189992 -0.294974 0.936426
+-0.47757 -0.294872 -0.249599 0 1 0
+0.207059 -0.371795 -0.0544446 0 1 0
+-0.306587 -0.371795 0.0350088 0 1 0
+-0.449078 -0.294872 -0.284372 0.748041 0.662899 0.0316173
+-0.148117 -0.371795 0.269465 -0.0194508 0.999787 -0.00691921
+-0.218521 0.0645795 0.371795 0 0 1
+0.258491 -0.371795 0.263402 0 1 0
+0.483036 -0.294872 0.289053 0 1 0
+0.5 0.211223 0.211261 1 0 0
+0.5 0.198552 0.017981 1 0 0
+-0.411754 -0.108883 -0.371795 0 0 1
+-0.141154 -0.361238 -0.237881 1 0 0
+-0.131179 0.123154 -0.333333 0 0 1
+-0.5 0.206466 -0.326888 1 0 0
+-0.233047 0.152732 0.371795 0 0 1
+-0.164582 -0.0379662 0.320513 0 0 1
+0.0812326 -0.293272 -0.371795 -0.00250629 0.395245 0.918573
+-0.18716 0.151333 0.371795 0 0 1
+-0.0170473 -0.256282 0.323556 -0.0846609 0.76768 -0.635216
+0.254389 0.0302358 -0.0686468 0.594195 0.804321 0
+-0.379652 -0.261509 0.320513 0 0 1
+0.216826 -0.239777 0.369724 -0.321884 0.773981 -0.545293
+0.206947 0.294872 0.300534 0 1 0
+-0.188393 -0.0096249 -0.0966745 0.976631 -0.214868 0.00487795
+0.236597 -0.371795 0.223955 0 1 0
+-0.0594834 0.371795 0.0128343 0 1 0
+0.00179298 -0.0591683 0.320513 0 0 1
+-0.156351 -0.371795 -0.180881 0 1 0
+-0.5 0.360684 0.199215 0.999189 -0.0394549 0.00805958
+-0.5 0.00355315 0.170778 1 0 0
+0.0186345 0.204274 0.331848 0.121017 0.991295 -0.0518546
+-0.339954 -0.0516416 -0.371795 0 0 1
+0.4644 -0.239647 0.320513 0 0 1
+-0.5 -0.216449 0.180258 1 0 0
+-0.116472 -0.166499 -0.333333 0 0 1
+0.0970675 0.250674 -0.371795 0 0 1
+0.5 0.0981391 -0.229176 1 0 0
+-0.494321 0.371795 0.289234 -0.352159 0.935909 -0.0076147
+0.215916 0.294872 0.219952 0 1 0
+0.131916 -0.262463 0.320513 -0.0351306 -0.192793 0.98061
+0.398446 -0.370559 -0.371795 -0.193889 0.339357 0.920459
+0.5 0.289453 0.182041 0.982827 0.184453 -0.00532902
+0.141026 0.321112 0.145219 1 0 0
+0.368182 0.153035 0.320513 0 0 1
+0.197056 -0.0183624 -0.313869 0.888181 0.459488 0.00221744
+0.0491875 0.152137 -0.333333 0 0 1
+0.163565 -0.191916 0.371795 0 0 1
+-0.169175 0.115052 0.35368 0.837153 -0.546969 0
+0.215161 0.0349979 -0.15304 -0.363159 0.931657 -0.0114037
+-0.448718 -0.368974 -0.155645 0.978337 0.206041 0.0201083
+0.5 -0.261909 -0.100244 1 0 0
+-0.0556592 -0.294872 0.173238 0 1 0
+-0.261978 -0.371795 -0.343722 0 1 0
+0.26363 -0.371795 -0.294608 0 1 0
+-0.275413 0.225023 0.320513 0 0 1
+-0.266012 -0.0253761 -0.0835065 0.804914 0.59297 0.0223711
+0.289677 -0.287033 -0.371795 0 0 1
+-0.5 0.0214788 0.112232 1 0 0
+0.211177 0.294872 0.252387 0 1 0
+-0.475337 0.371795 -0.231475 0 1 0
+-0.5 -0.0139158 0.0492111 1 0 0
+0.256165 -0.0287902 -0.256961 -0.651903 0.75732 0.0385955
+0.446798 0.294872 0.25484 0 1 0
+0.126641 0.316675 0.320513 0 0 1
+-0.468429 0.0114619 0.320513 0 0 1
+-0.446004 -0.366012 -0.371795 0.661968 0.298881 0.687364
+-0.473587 0.203918 0.320513 0 0 1
+0.287414 -0.0912723 -0.333333 0 0 1
+-0.148603 0.358898 -0.371795 0 0 1
+-0.141154 -0.301987 0.319262 0.60986 -0.084116 0.788033
+0.5 0.223687 0.219802 1 0 0
+-0.227903 0.0433391 -0.20026 0.0781715 0.996845 -0.0137642
+-0.452553 0.371795 0.0148282 0 1 0
+-0.113504 0.0691888 0.320513 0 0 1
+-0.338913 0.323786 0.320513 0 0 1
+0.5 -0.243709 -0.133362 1 0 0
+-0.499529 -0.115568 -0.371795 0.598317 -0.0807327 0.797182
+-0.391302 0.353968 0.320513 0 0 1
+-0.092089 0.371795 -0.313149 0 1 0
+-0.0302995 0.171685 -0.333333 0 0 1
+-0.123984 0.00229385 0.320513 0 0 1
+0.141026 0.351225 0.0461681 1 0 0
+0.5 -0.0705875 -0.358694 1 0 0
+-0.448718 -0.357881 0.260181 1 0 0
+-0.5 0.278077 -0.0660774 1 0 0
+-0.291016 0.155176 0.371795 0 0 1
+0.5 -0.234972 -0.159584 1 0 0
+-0.440729 0.371795 0.247781 0 1 0
+0.196055 0.0590632 0.32551 0.893179 0.201178 -0.402193
+0.309019 -0.371795 -0.211823 0 1 0
+0.160722 -0.253956 0.330617 -0.10471 0.994364 -0.0165897
+-0.5 0.192253 -0.2524 1 0 0
+-0.239948 0.371795 -0.264852 0 1 0
+0.293307 0.294872 -0.30528 0 1 0
+-0.198291 0.0289318 -0.249141 0.751058 0.659923 -0.0203316
+0.243473 0.294872 -0.283328 0 1 0
+-0.5 0.174072 0.261753 1 0 0
+0.141026 0.307867 -0.340239 1 0 0
+0.5 0.137375 -0.181488 1 0 0
+0.146847 0.294872 0.20751 0.307743 0.949758 -0.0570373
+-0.273872 -0.00556384 -0.260791 0.991404 0.130331 0.0114753
+0.0432654 0.371795 -0.245879 0 1 0
+-0.224169 -0.371795 0.0895199 0 1 0
+0.325073 0.294872 -0.314011 0 1 0
+-0.310111 0.371795 -0.0132416 0 1 0
+0.141109 -0.315679 -0.311621 1 0 0
+-0.319121 0.170598 0.363914 0.697506 -0.706541 -0.119516
+-0.313183 -0.192381 -0.371795 -0.385596 -0.32641 0.863002
+-0.5 -0.222353 -0.365995 0.827058 -0.122661 0.548571
+-0.066128 -0.294872 -0.0185058 0 1 0
+-0.5 0.0806496 0.306776 1 0 0
+-0.25384 -0.142325 -0.333333 0 0 1
+-0.208563 -0.0374624 -0.0864301 -0.472549 0.881304 0
+-0.0459081 0.256282 0.334015 0.00802307 0.998954 0.0450224
+-0.5 -0.182332 -0.181711 1 0 0
+-0.173471 -0.228771 0.371795 0 0 1
+0.356175 0.294872 -0.0218491 0 1 0
+0.234755 0.294872 -0.0562312 0 1 0
+0.5 0.0312226 -0.266613 1 0 0
+-0.145044 0.371795 0.312175 0.0116366 0.998902 0.0453759
+-0.459322 0.161743 -0.371795 0 0 1
+-0.360558 -0.371795 -0.201813 0 1 0
+-0.0266433 -0.294872 0.147287 0 1 0
+-0.420944 0.371795 0.111634 0 1 0
+-0.121511 0.371795 0.272443 0 1 0
+-0.376462 0.119474 0.320513 0 0 1
+-0.479168 0.371795 -0.204883 0 1 0
+-0.29684 -0.191963 -0.333333 0 0 1
+-0.141154 -0.348816 -0.105328 1 0 0
+0.24296 -0.230897 -0.344825 -0.0414257 0.999134 -0.00386517
+-0.256345 0.371795 0.168712 0 1 0
+-0.494127 -0.164746 0.320513 -0.431539 0.094867 0.897092
+0.14664 -0.0474445 -0.333333 0 0 1
+-0.5 0.261182 0.0727073 1 0 0
+-0.0856287 -0.00629503 0.320513 0 0 1
+0.180581 -0.0975471 0.353566 0.873948 -0.485974 0.00661282
+-0.5 0.217965 0.0963829 1 0 0
+-0.283967 -0.130003 -0.333333 0 0 1
+-0.374983 -0.371795 0.142287 0 1 0
+0.151338 -0.371795 -0.0434671 0.0631593 0.998002 0.0016864
+0.448718 -0.333093 -0.301381 1 0 0
+-0.177309 -0.371795 -0.09941 0 1 0
+0.00176334 0.371795 0.0611187 0 1 0
+-0.185732 0.371795 0.125909 0 1 0
+-0.215525 -0.371795 0.0350037 0 1 0
+0.372582 -0.332589 -0.371795 0 0 1
+-0.313489 0.183519 -0.333333 -0.519842 0.306083 0.797545
+-0.387385 -0.371795 -0.153938 0 1 0
+0.5 -0.186616 0.0937724 1 0 0
+0.251423 0.269327 0.320513 0 0 1
+0.249366 0.0317478 0.000990447 0.417118 0.736785 0.532128
+0.0697569 0.208902 0.371795 0 0 1
+-0.5 0.00353778 -0.00358852 1 0 0
+0.426622 -0.179248 0.320513 0 0 1
+0.173401 -0.371795 -0.270258 0 1 0
+0.5 0.180755 -0.368124 0.845555 0.0470635 -0.531809
+-0.448718 -0.340567 -0.289088 1 0 0
+0.497949 -0.19704 -0.371795 -0.606381 0.10008 0.788851
+-0.483772 -0.294872 0.0940275 0 1 0
+0.0387419 0.221359 -0.333333 -0.00433253 0.026527 0.999639
+-0.108695 0.371795 0.241355 0 1 0
+0.448718 -0.34169 -0.00576772 1 0 0
+-0.230895 0.200777 0.371795 0 0 1
+0.5 0.248574 0.312016 0.998807 0.022437 0.0433803
+0.5 0.285001 -0.273128 0.986138 0.159247 0.0466076
+-0.190038 -0.322793 0.320513 0 0 1
+0.5 0.0909186 0.285797 1 0 0
+-0.5 0.230544 -0.115205 1 0 0
+-0.357741 0.235208 0.320513 0 0 1
+0.5 0.227245 -0.181201 1 0 0
+0.448718 -0.297161 -0.353204 0.876369 -0.47489 0.0803584
+0.5 -0.0869858 -0.342351 1 0 0
+0.5 -0.27901 -0.369814 0.814882 0.0514332 -0.57734
+-0.18016 0.29067 0.320513 0 0 1
+0.5 0.00270638 0.211863 1 0 0
+0.259776 -0.0332973 -0.333333 0.108918 -0.113136 0.987592
+0.5 0.0278612 0.250892 1 0 0
+0.180714 -0.063629 -0.333333 0 0 1
+0.414919 0.294872 -0.00303392 0 1 0
+0.448718 -0.319262 -0.213163 1 0 0
+-0.5 0.138856 0.122269 1 0 0
+0.447715 0.162232 0.320513 0 0 1
+0.246201 -0.371795 -0.0728992 0 1 0
+-0.5 -0.053799 -0.0757113 1 0 0
+0.3281 -0.371795 -0.278214 0 1 0
+-0.0788593 0.173987 -0.333333 0 0 1
+-0.5 0.0375532 -0.235943 1 0 0
+-0.410331 0.139715 0.320513 0 0 1
+0.184021 0.13753 -0.333333 0 0 1
+-0.5 0.181159 0.0812989 1 0 0
+-0.141154 -0.341068 -0.28175 1 0 0
+-0.5 0.0702479 0.165956 1 0 0
+0.0593325 0.371795 0.0699453 0 1 0
+-0.379654 0.0467006 0.325568 0.951713 -0.194565 -0.237459
+-0.5 -0.0226091 0.281805 1 0 0
+0.260811 0.294872 -0.250272 0 1 0
+-0.5 -0.0639751 -0.270363 1 0 0
+0.0891542 -0.0880022 0.320513 0 0 1
+0.5 -0.0682038 -0.0256063 1 0 0
+0.311697 -0.371795 -0.227533 0 1 0
+0.302896 -0.371795 0.0250184 0 1 0
+-0.5 -0.0254567 0.177126 1 0 0
+0.354709 0.294872 0.0565692 0 1 0
+0.393584 -0.371795 0.2297 0 1 0
+-0.243182 0.371795 -0.170102 0 1 0
+-0.175752 0.371795 -0.17887 0 1 0
+-0.250937 0.109689 0.371795 0 0 1
+-0.5 -0.0995969 0.265601 1 0 0
+0.388273 -0.371795 0.286384 0 1 0
+-0.212784 0.343837 0.320513 0 0 1
+0.5 -0.0132927 0.0946069 1 0 0
+0.310817 -0.371795 -0.141187 0 1 0
+-0.219893 -0.371795 -0.0351395 0 1 0
+-0.104936 0.371795 -0.324994 0 1 0
+-0.5 0.0438961 0.0242284 1 0 0
+0.286174 -0.0747325 0.371795 0 0 1
+-0.199005 -0.0474148 0.33339 0.969406 0.245464 0
+0.179842 -0.371795 0.209271 0 1 0
+0.194152 -0.0273607 -0.333333 -0.0555592 -0.0750069 0.995634
+0.215668 -0.0365617 0.371795 0 0 1
+-0.29562 -0.210316 -0.335654 -0.428793 -0.59313 0.68142
+-0.115564 -0.256282 0.330707 0 1 0
+-0.5 -0.143469 0.304082 1 0 0
+0.188605 -0.172905 0.371795 0 0 1
+-0.0986064 -0.294872 -0.197251 0 1 0
+0.266742 -0.371795 0.191879 0 1 0
+0.0565924 -0.294872 -0.112671 0 1 0
+-0.141154 -0.330665 0.0377959 1 0 0
+0.141026 0.34266 -0.254327 1 0 0
+-0.229894 -0.0574915 0.371795 0 0 1
+0.5 0.203806 -0.327657 1 0 0
+0.354679 -0.371795 -0.0870677 0 1 0
+0.5 -0.205345 0.266935 1 0 0
+-0.115873 -0.0591695 0.320513 0 0 1
+-0.263028 -0.371795 -0.364557 -0.000736808 0.97054 0.24094
+-0.268361 -0.0220206 -0.187859 0.857649 0.514188 -0.00692419
+0.114324 0.371795 -0.145244 0 1 0
+-0.141491 -0.117407 0.320513 0 0 1
+0.5 0.112779 -0.168005 1 0 0
+-0.5 -0.289719 -0.212706 0.980456 0.187949 0.0581452
+-0.0691582 0.371795 -0.0393916 0 1 0
+0.101914 0.177435 0.321796 -0.274126 -0.585158 0.763181
+-0.204202 0.0127168 0.343332 0.996585 -0.0825748 0
+0.357257 0.113918 0.334074 0.877665 0.479274 0
+0.423497 -0.371795 0.179946 0 1 0
+-0.485546 -0.229249 -0.371795 0 0 1
+0.428117 -0.082799 -0.371795 0 0 1
+-0.5 0.218522 -0.247436 1 0 0
+0.320513 -0.0142927 -0.33603 0.845158 0.0432599 0.532763
+-0.5 0.353169 -0.127481 1 0 0
+0.276187 0.294872 -0.0698892 0 1 0
+-0.0849847 -0.294872 -0.246383 0 1 0
+-0.5 0.352966 -0.342313 1 0 0
+0.2136 -0.120142 -0.333333 0 0 1
+-0.0742246 0.350457 -0.371795 0 0 1
+0.5 -0.155412 0.178603 1 0 0
+0.448718 -0.309007 0.297115 1 0 0
+0.196633 -0.0174554 -0.183996 0.908262 0.418071 -0.016626
+-0.216495 -0.371795 -0.0447774 0 1 0
+-0.345179 0.371795 0.0921558 0 1 0
+0.141109 -0.356092 -0.211414 1 0 0
+0.348106 0.293512 0.320513 -0.0577089 0.761973 0.645032
+-0.203724 0.239406 -0.371795 0.089868 0.141686 0.985824
+0.118532 -0.29032 0.320513 -0.0651061 -0.247448 0.966711
+-0.385264 -0.371795 -0.331086 0 1 0
+0.366165 -0.25275 0.320513 0 0 1
+0.372338 0.0776748 -0.371795 0 0 1
+-0.371531 0.366222 -0.371795 -0.00414471 -0.291643 0.956518
+0.259077 0.0258776 -0.23168 0.777394 0.628874 0.0132781
+0.0516543 0.371795 -0.0655368 0 1 0
+0.5 -0.112053 0.118127 1 0 0
+-0.320341 -0.155938 -0.356249 0.998509 0.05455 0.00187405
+-0.5 -0.222161 -0.134471 1 0 0
+0.22199 -0.0373143 -0.149184 0.21461 0.976535 -0.0179186
+-0.075135 0.11423 0.320513 0 0 1
+0.00329777 0.371795 0.1104 0 1 0
+-0.46751 0.0876613 -0.371795 0 0 1
+0.457454 -0.294872 0.152412 -0.158474 0.986761 -0.0344861
+0.256536 0.0284191 -0.122857 0.693487 0.720438 0.00674133
+0.104368 0.0631398 0.320513 0 0 1
+-0.166296 0.0901406 -0.333333 0 0 1
+-0.0559242 0.251801 0.371795 -0.0140576 0.191729 0.981347
+0.469674 0.294872 0.284002 0 1 0
+-0.0810932 -0.294872 0.00586391 0 1 0
+0.5 -0.087513 -0.268945 1 0 0
+-0.051296 0.0330991 -0.333333 0 0 1
+0.403642 -0.18578 -0.371795 0 0 1
+0.0683907 0.371795 -0.103922 0 1 0
+0.5 -0.0330641 0.12853 1 0 0
+-0.5 -0.194533 0.223046 1 0 0
+-0.448718 -0.300703 -0.35624 0.98852 0.148719 0.0266481
+0.5 -0.159229 -0.224762 1 0 0
+0.448718 -0.361961 0.0747733 1 0 0
+-0.334129 0.371795 -0.338397 0 1 0
+0.5 0.279802 0.0626591 1 0 0
+0.383873 -0.00858027 0.337286 0.997804 -0.0662329 0.000582607
+0.409949 -0.371795 0.0617677 0 1 0
+-0.470229 -0.208778 -0.371795 0 0 1
+-0.5 -0.197421 -0.149875 1 0 0
+0.302756 0.294872 0.279524 0 1 0
+-0.401534 -0.238546 -0.371795 0 0 1
+-0.467274 -0.294872 0.201303 0 1 0
+0.0972314 -0.179969 0.327483 -0.552956 0.793786 0.253267
+-0.337217 0.220232 0.320513 0 0 1
+0.25581 -0.0291451 -0.229883 -0.64972 0.760129 -0.00819061
+-0.210003 -0.242322 0.329563 0.365901 0.928044 -0.0696443
+0.152697 -0.371795 0.269544 0.019744 0.999795 0.00443317
+-0.219078 -0.152336 0.371795 0 0 1
+-0.413879 0.371795 0.254436 0 1 0
+0.0409101 0.303478 0.320513 0 0 1
+-0.242239 -0.371795 -0.00860661 0 1 0
+0.120194 -0.286842 0.320513 0.0262788 -0.045359 0.998625
+-0.5 -0.0390626 0.26609 1 0 0
+-0.387968 -0.231403 0.320513 0 0 1
+-0.415122 -0.166822 -0.371795 0 0 1
+-0.5 0.044193 -0.03887 1 0 0
+0.0545315 0.371795 -0.195031 0 1 0
+-0.141154 -0.326821 -0.28027 1 0 0
+0.448718 -0.352138 0.0704013 1 0 0
+-0.432647 -0.179281 0.320513 0 0 1
+-0.401231 -0.183621 -0.371795 0 0 1
+0.5 0.292145 -0.0219352 0.745734 0.650616 -0.143456
+0.320513 0.12275 -0.353614 1 0 0
+-0.389445 0.367602 -0.371795 0.00279353 -0.465386 0.885103
+-0.457826 0.0658327 0.320513 0 0 1
+0.200192 0.0231308 -0.189878 0.837782 -0.545818 0.0143042
+0.221004 -0.371795 0.271761 0 1 0
+0.173472 0.051612 0.320513 0 0 1
+-0.5 -0.279784 -0.152812 1 0 0
+0.0956231 0.371795 0.189666 0 1 0
+0.137828 0.136795 0.320513 -0.0203007 -0.013518 0.999703
+-0.257407 0.0681422 0.371795 0 0 1
+0.0485569 0.13294 -0.333333 0 0 1
+-0.5 0.328086 0.286791 1 0 0
+-0.0931607 0.371795 0.0729424 0 1 0
+-0.176839 0.314227 -0.371795 0 0 1
+-0.206981 0.03969 -0.333333 0.211548 0.440334 0.872556
+-0.157598 0.371795 -0.0633211 0 1 0
+0.320957 0.0333342 0.371795 0 0 1
+0.5 0.0578451 0.0536239 1 0 0
+0.206207 0.294872 0.0341427 0 1 0
+0.306626 0.294872 -0.281731 0 1 0
+0.320306 -0.169413 0.337095 0.752414 -0.65868 0.00369965
+0.267007 -0.371795 0.0638862 0 1 0
+-0.5 0.161749 0.283212 1 0 0
+0.421836 0.164589 0.320513 0 0 1
+0.418356 -0.371795 0.299865 0 1 0
+-0.5 0.00741113 -0.221591 1 0 0
+-0.39723 -0.0702496 0.320513 0 0 1
+0.159664 -0.0195034 0.320513 0 0 1
+-0.274056 -0.0356292 0.371795 0 0 1
+-0.470363 -0.294872 -0.175425 0 1 0
+0.5 0.217601 -0.276594 1 0 0
+0.171511 0.294872 0.165586 0 1 0
+0.343765 0.00203871 -0.371795 0 0 1
+0.349386 -0.371795 0.142148 0 1 0
+-0.0425391 -0.294872 -0.0285674 0 1 0
+0.274739 -0.209626 0.321179 0.532107 -0.541837 0.650596
+0.140071 -0.294872 0.310646 0.159967 0.980285 -0.11598
+0.00542611 0.190582 0.320513 0 0 1
+-0.480107 0.371795 0.183614 0 1 0
+0.120203 -0.294872 -0.212698 0 1 0
+0.279388 -0.146422 -0.333333 0 0 1
+-0.0720424 0.213576 -0.333333 0 0 1
+0.5 -0.214325 0.3014 1 0 0
+0.141026 0.365306 0.303236 0.944475 0.321265 0.0689573
+-0.360751 -0.107518 0.320778 0.605697 0.43031 -0.669301
+-0.5 0.365213 0.0248353 0.965816 -0.240404 -0.0969871
+-0.262631 0.371795 0.311479 0.000833603 0.999561 0.0296139
+0.341864 0.294872 -0.269061 0 1 0
+-0.141154 -0.310286 -0.126705 1 0 0
+0.300514 -0.371795 0.269662 0 1 0
+0.274467 0.294872 0.310053 -0.00656104 0.998154 0.0603769
+0.5 0.273416 -0.0829978 1 0 0
+0.5 -0.278238 -0.0691196 1 0 0
+-0.5 -0.194872 0.183237 1 0 0
+-0.268036 0.0912525 -0.333333 0 0 1
+-0.0127056 -0.294872 0.293286 0 1 0
+-0.491296 0.344399 -0.371795 0.0930342 0.0410593 0.994816
+-0.303692 -0.201741 -0.351451 0.778846 0.626964 -0.0177227
+0.000147376 -0.256282 0.356563 0 1 0
+-0.489893 0.371795 -0.0766469 -0.117055 0.992911 0.0206506
+0.0531857 0.203937 0.371795 0.0860664 0.829646 -0.551616
+0.433762 0.294872 -0.101349 0 1 0
+0.445703 -0.23154 -0.371795 0 0 1
+0.5 0.290525 -0.156286 0.93021 0.358949 0.0765847
+-0.343892 0.0964569 -0.371795 0 0 1
+-0.00167296 0.371795 0.106962 0 1 0
+-0.5 0.0695729 0.0457634 1 0 0
+-0.485837 0.276698 -0.371795 0 0 1
+0.5 -0.0969408 0.224206 1 0 0
+0.198686 0.230263 -0.333333 0.0515335 0.633417 0.772093
+0.5 0.0311887 0.163172 1 0 0
+-0.235422 0.0431827 -0.111261 -0.0947509 0.995498 0.00253622
+-0.163603 0.371795 0.0589062 0 1 0
+0.0165459 0.0314586 0.320513 0 0 1
+-0.448718 -0.348901 -0.112397 1 0 0
+-0.486402 0.055415 -0.371795 0 0 1
+-0.427245 -0.371795 -0.264308 0 1 0
+-0.5 0.231309 0.20348 1 0 0
+-0.145896 0.123146 -0.333333 0 0 1
+-0.156515 -0.371795 -0.149773 0 1 0
+-0.5 -0.15581 0.146712 1 0 0
+0.194154 0.0113901 -0.0814329 0.948229 -0.317365 0.0118356
+0.20249 -0.371795 0.124883 0 1 0
+0.5 -0.229245 0.0860629 1 0 0
+-0.448718 -0.317872 -0.23232 1 0 0
+0.245025 -0.371795 0.316221 0.0587161 0.898884 -0.434236
+0.220602 0.294872 0.0616181 0 1 0
+-0.5 -0.0847837 -0.256321 1 0 0
+-0.141154 -0.329644 0.319787 0.729529 -0.00415429 0.683938
+0.5 0.0161808 0.0279523 1 0 0
+-0.220219 0.0421288 -0.0379123 0.302576 0.925305 0.228603
+0.227202 -0.0381494 -0.323069 -0.0655544 0.99371 -0.090795
+-0.426583 -0.119968 0.320513 0 0 1
+-0.472869 0.371795 0.207294 0 1 0
+-0.496117 0.102055 0.320513 -0.337144 0.186177 0.922861
+0.0847201 0.371795 -0.341399 0 1 0
+-0.448718 -0.321846 0.243278 1 0 0
+-0.0633668 -0.294872 0.235962 0 1 0
+-0.171095 -0.0616267 0.320513 0 0 1
+0.5 -0.153054 -0.00910818 1 0 0
+-0.261155 0.371795 -0.250267 0 1 0
+0.312537 0.228795 0.320513 0 0 1
+0.0342628 -0.294872 -0.316747 0 1 0
+0.341773 -0.371795 0.135575 0 1 0
+-0.0653338 -0.0802932 -0.333333 0 0 1
+-0.5 0.290315 -0.362432 0.994586 0.0174687 0.102434
+0.224169 0.237038 0.357203 0.349475 0.936946 0
+0.126339 0.230921 0.371795 0 0 1
+-0.5 -0.0771713 -0.262681 1 0 0
+-0.233006 0.230897 -0.346691 0 1 0
+-0.246121 -0.0407543 -0.16931 0.382853 0.923801 0.0039327
+0.289912 0.125378 -0.333333 0 0 1
+0.0827937 0.371795 -0.0221056 0 1 0
+-0.0534976 -0.106143 0.320513 0 0 1
+-0.429965 0.302381 -0.371795 0 0 1
+-0.5 0.175141 -0.161288 1 0 0
+0.160603 -0.371795 0.143896 0 1 0
+-0.5 0.365612 0.279476 0.999052 -0.0433805 0.00364142
+0.229798 -0.234939 0.357751 -0.361273 0.932435 -0.00689799
+0.394856 0.2047 -0.371795 0 0 1
+-0.422723 -0.371795 0.271401 0 1 0
+-0.102381 0.371795 0.171909 0 1 0
+-0.164107 -0.371795 0.303386 0 1 0
+-0.227991 -0.0433467 -0.0671748 -0.110095 0.993917 0.00276799
+-0.298892 0.098256 -0.333333 0 0 1
+-0.5 0.215997 0.299551 1 0 0
+-0.336518 0.122493 -0.371795 0 0 1
+0.5 0.280553 0.224682 1 0 0
+0.5 0.229656 -0.145834 1 0 0
+-0.273168 -0.371795 0.249845 0 1 0
+-0.157031 0.362249 0.320513 -0.0287216 0.185446 0.982235
+0.141026 0.313921 0.291727 1 0 0
+0.5 0.293442 0.0764167 0.719607 0.655676 0.228592
+-0.0600696 -0.294872 -0.220932 0 1 0
+-0.397175 0.0556583 -0.371795 0 0 1
+0.409938 -0.274347 0.320513 0 0 1
+-0.268026 0.371795 0.0309027 0 1 0
+-0.260392 0.371795 0.0463448 0 1 0
+0.137175 -0.294872 -0.0204695 0.394734 0.89393 -0.212306
+0.141026 0.369135 0.200457 0.806037 0.590632 0.0381867
+-0.48537 0.236255 0.320513 0 0 1
+0.218798 -0.371795 0.163633 0 1 0
+0.5 0.278098 -0.271283 1 0 0
+-0.245464 0.371795 0.238005 0 1 0
+0.32124 -0.109357 0.371795 0 0 1
+-0.197596 -0.117997 -0.333333 0 0 1
+-0.107318 -0.294872 -0.29253 0 1 0
+0.430312 0.294872 -0.0692971 0 1 0
+-0.0783726 -0.294872 0.0615634 0 1 0
+0.275317 -0.371795 -0.170269 0 1 0
+0.0941579 -0.294872 -0.14694 0 1 0
+0.315021 -0.366461 0.320513 0.111227 -0.431845 0.895063
+-0.437734 -0.116551 -0.371795 0 0 1
+-0.5 -0.0437 -0.206881 1 0 0
+0.162656 -0.371795 0.00240585 0 1 0
+0.5 0.184906 -0.28884 1 0 0
+0.141109 -0.34094 0.117508 1 0 0
+0.203294 -0.0819857 0.371795 0 0 1
+-0.345759 0.371795 -0.14999 0 1 0
+0.388784 -0.117113 -0.371795 0 0 1
+0.253387 -0.0459034 0.371795 0 0 1
+-0.5 0.35669 -0.252151 1 0 0
+-0.354367 0.0457507 0.371795 0 0 1
+0.29741 0.294872 -0.0339107 0 1 0
+-0.0666937 -0.193378 0.337522 0.324719 0.945811 0
+0.310027 0.174014 0.371795 0.40372 0.397362 0.824083
+-0.295487 0.371795 -0.173701 0 1 0
+0.311886 0.142118 0.371795 0 0 1
+-0.453841 0.305059 -0.371795 0 0 1
+0.207044 0.00920236 0.00779511 -0.473861 0.173582 0.863322
+0.00196172 0.171315 0.320513 0 0 1
+0.448718 -0.297514 -0.32318 0.772075 -0.623717 -0.121973
+-0.0259729 0.230897 -0.334154 -0.0470637 0.839193 0.541794
+0.5 0.029927 -0.124557 1 0 0
+0.302233 0.271789 0.320513 0 0 1
+0.5 -0.221508 0.256218 1 0 0
+0.176265 0.00768739 -0.333333 0 0 1
+0.5 0.0294463 -0.0342001 1 0 0
+0.365975 -0.179355 -0.371795 0 0 1
+0.5 0.00925934 0.131705 1 0 0
+-0.124743 -0.294872 -0.124986 0 1 0
+0.00697601 0.0925029 0.320513 0 0 1
+-0.474939 -0.294872 0.134036 0 1 0
+0.141109 -0.360491 0.228248 1 0 0
+0.141026 0.358195 -0.0898039 1 0 0
+-0.107532 -0.294872 -0.228326 0 1 0
+-0.5 -0.191253 -0.118345 1 0 0
+0.141026 0.314889 0.107178 1 0 0
+-0.288409 -0.371795 0.262526 0 1 0
+-0.448718 -0.296222 -0.279335 0.790407 0.604742 -0.0976917
+-0.5 0.133957 0.0215759 1 0 0
+-0.5 -0.0348477 0.304406 1 0 0
+-0.0253499 0.371795 -0.335785 0 1 0
+-0.375585 -0.371795 0.200711 0 1 0
+-0.5 0.15212 -0.0953133 1 0 0
+0.0435001 -0.173666 -0.333333 0 0 1
+0.150492 -0.0750172 -0.333333 0 0 1
+0.448718 -0.32805 -0.247788 1 0 0
+-0.5 -0.230041 0.150998 1 0 0
+-0.139186 -0.294872 0.29801 0.758859 -0.630098 -0.164649
+0.379975 -0.371795 0.171745 0 1 0
+-0.0150565 0.109088 -0.333333 0 0 1
+-0.269726 -0.371795 -0.123139 0 1 0
+-0.191121 0.0177239 -0.0805252 0.902848 0.429906 0.00682735
+-0.148963 -0.140207 0.341535 0.735723 0.677283 0
+0.21097 -0.241961 0.350401 -0.349457 0.936952 0
+0.2333 -0.236865 0.320513 0.0140039 -0.336933 0.941424
+0.242146 0.234357 -0.371795 0.114974 0.346629 0.930929
+0.41088 0.111546 -0.371795 0 0 1
+-0.289734 0.371795 -0.148742 0 1 0
+0.470492 -0.294872 -0.0169631 0 1 0
+-0.25301 -0.0374377 -0.22277 0.528573 0.848792 0.0128014
+0.269958 0.101796 -0.333333 0 0 1
+0.470593 -0.255472 0.320513 0 0 1
+0.448718 -0.298677 -0.147763 0.880304 -0.415883 -0.228266
+-0.252725 0.371795 -0.0998178 0 1 0
+0.266609 -0.0175664 -0.333333 0.521882 -0.127255 0.843472
+-0.470264 -0.0577273 -0.371795 0 0 1
+-0.5 0.0483629 0.143289 1 0 0
+-0.189668 0.07683 0.367975 0.861018 -0.2931 0.415621
+-0.0110892 0.343524 0.320513 0 0 1
+-0.445386 -0.13263 -0.371795 0 0 1
+-0.5 0.199785 -0.261187 1 0 0
+-0.177052 -0.371795 -0.0467406 0 1 0
+-0.5 0.191583 -0.329935 1 0 0
+0.26322 0.0204564 -0.0246344 0.851685 0.523961 -0.00992135
+-0.367423 -0.234498 -0.371795 0 0 1
+-0.0294298 0.371795 -0.0111806 0 1 0
+0.375186 0.294872 -0.160519 0 1 0
+-0.00681154 -0.0980171 0.320513 0 0 1
+0.5 0.175581 0.299562 1 0 0
+0.243382 0.294872 -0.331512 0 1 0
+-0.18082 -0.283555 -0.371795 0 0 1
+0.293268 0.00964165 -0.333333 0 0 1
+0.200546 0.0394515 -0.333333 -0.00634572 0.0113509 0.999915
+0.137743 -0.0113638 0.320513 0 0 1
+-0.262176 -0.31326 0.320513 0 0 1
+0.448718 -0.296859 0.102348 0.807914 -0.587501 -0.046031
+-0.236746 0.371795 -0.26663 0 1 0
+0.300911 0.294872 -0.0911749 0 1 0
+0.448718 -0.33116 -0.263645 1 0 0
+0.268138 -0.371795 -0.306684 0 1 0
+-0.5 0.307418 -0.0582522 1 0 0
+-0.398115 -0.371795 -0.144575 0 1 0
+0.4802 -0.294872 -0.0998982 0 1 0
+-0.352799 0.371795 0.121735 0 1 0
+-0.241668 -0.371795 -0.215667 0 1 0
+0.110646 0.269273 -0.371795 0 0 1
+0.5 -0.0832581 -0.213022 1 0 0
+-0.323065 -0.371795 -0.16094 0 1 0
+-0.225738 0.0431497 -0.318533 0.122779 0.992369 0.0113557
+0.209017 0.115273 0.371795 0 0 1
+-0.0764404 0.371795 -0.218727 0 1 0
+-0.0883285 0.236685 0.371795 0 0 1
+-0.46903 -0.294872 -0.0213722 0 1 0
+-0.384822 -0.371795 -0.181564 0 1 0
+-0.437425 -0.206756 0.320513 0 0 1
+0.141109 -0.352035 0.210698 1 0 0
+0.258053 0.294872 0.232635 0 1 0
+0.219903 -0.263333 -0.371795 0 0 1
+0.192883 0.129462 0.371795 0 0 1
+-0.338113 0.337613 -0.371795 0 0 1
+-0.39333 -0.331408 -0.371795 0 0 1
+-0.272132 0.0134106 -0.123584 0.947283 -0.320286 -0.00845616
+0.237516 0.294872 -0.0436497 0 1 0
+0.22587 0.294872 -0.026862 0 1 0
+0.00113927 0.183203 -0.333333 0 0 1
+0.0759707 -0.294872 -0.107568 0 1 0
+0.192589 -0.00321827 -0.145329 0.989416 0.144782 0.00965643
+0.110564 0.168026 0.320513 -0.386142 -0.499683 0.775378
+0.154277 -0.195459 -0.333333 0 0 1
+0.5 0.27519 0.143405 1 0 0
+-0.141154 -0.321556 0.252974 1 0 0
+0.352446 -0.0363637 -0.371795 0 0 1
+0.474203 -0.199466 0.320513 0 0 1
+0.467851 0.294872 -0.311499 0 1 0
+-0.42603 0.371795 0.145309 0 1 0
+0.307423 0.294872 0.115634 0 1 0
+0.5 0.116862 -0.201278 1 0 0
+0.288265 -0.100123 -0.333333 0 0 1
+-0.484495 -0.294872 0.217682 0 1 0
+0.434964 0.0640503 0.320513 0 0 1
+0.5 -0.152061 0.116073 1 0 0
+-0.328098 0.371795 0.0787326 0 1 0
+-0.43996 0.327922 0.320513 0 0 1
+-0.229792 -0.371795 -0.0682513 0 1 0
+-0.486873 -0.101638 -0.371795 0 0 1
+-0.5 0.0940482 -0.070978 1 0 0
+-0.5 -0.158592 -0.161448 1 0 0
+-0.085366 -0.168432 0.320513 0 0 1
+-0.5 0.0375044 -0.0189579 1 0 0
+-0.0733249 0.261312 -0.371795 0 0 1
+-0.5 0.13035 -0.0228926 1 0 0
+0.13423 -0.192346 -0.333333 0 0 1
+-0.5 -0.107824 -0.0292548 1 0 0
+-0.0963525 -0.127473 -0.333333 0 0 1
+-0.254909 0.259616 0.320513 0 0 1
+0.494181 -0.294872 -0.337294 -0.25333 0.966134 0.049086
+-0.5 0.291422 0.263568 1 0 0
+0.203544 0.294872 0.253757 0 1 0
+0.448718 -0.368896 0.155387 0.860403 -0.488252 -0.146002
+-0.163518 0.0789429 -0.333333 0 0 1
+-0.5 0.048283 -0.0707414 1 0 0
+0.465453 -0.227304 -0.371795 0 0 1
+-0.35612 0.0587458 0.371795 0 0 1
+-0.5 0.0998865 0.106928 1 0 0
+0.448718 -0.314469 0.201408 1 0 0
+-0.5 -0.261766 0.116096 1 0 0
+0.448718 -0.361702 -0.34581 0.99666 -0.0814179 -0.00633077
+-0.208905 0.166101 -0.333333 0 0 1
+-0.0453623 -0.173493 0.320513 0 0 1
+0.141026 0.295136 0.257155 0.834492 0.530594 -0.148638
+-0.0212006 -0.00944976 0.320513 0 0 1
+-0.44815 0.10467 -0.371795 0 0 1
+-0.306622 -0.360318 0.320513 0 0 1
+-0.141154 -0.338043 -0.126071 1 0 0
+-0.452309 -0.294872 0.317553 -0.163294 -0.517932 0.839692
+-0.394713 -0.0606808 -0.371795 0 0 1
+0.0523233 -0.294872 -0.130926 0 1 0
+-0.218944 -0.0126692 -0.0195117 0.349564 -0.373064 0.859435
+-0.199447 0.371795 0.217913 0 1 0
+-0.216909 0.160721 -0.333333 0 0 1
+-0.396323 0.371795 0.000765902 0 1 0
+-0.467536 -0.294872 0.184016 0 1 0
+-0.5 -0.248955 -0.143318 1 0 0
+-0.0295709 0.118935 0.320513 0 0 1
+-0.468315 -0.292366 -0.371795 0.0980496 0.379999 0.919776
+0.47227 -0.294872 0.224946 0 1 0
+0.482024 -0.294872 0.306645 0 1 0
+0.248169 -0.0075252 0.371795 0 0 1
+-0.138979 -0.14544 0.320513 0.322212 0.622911 0.712854
+-0.383379 -0.00406463 0.371795 0.748562 0.0559671 -0.660699
+-0.261668 0.285236 -0.371795 0 0 1
+-0.41551 -0.147629 -0.371795 0 0 1
+-0.0217437 0.371795 0.300752 0 1 0
+0.076888 0.0827584 0.320513 0 0 1
+0.095676 -0.194209 -0.333333 0 0 1
+0.0308268 0.198115 -0.333333 0 0 1
+0.211414 0.151097 -0.333333 0 0 1
+-0.120931 0.0843779 0.320513 0 0 1
+0.0879888 0.371795 -0.0847467 0 1 0
+0.431322 -0.135267 -0.371795 0 0 1
+0.439046 -0.371795 0.201059 0 1 0
+-0.0121323 0.371795 0.257041 0 1 0
+-0.271848 0.0144668 -0.294065 0.941501 -0.337011 0
+0.375019 0.294872 -0.346345 0 1 0
+0.376226 -0.371795 0.154973 0 1 0
+0.240108 -0.371795 -0.048064 0 1 0
+0.328911 -0.146905 0.371795 0.252414 -0.0785113 0.964429
+0.5 -0.222237 0.0172546 1 0 0
+0.0655177 0.371795 -0.275244 0 1 0
+-0.267001 0.371795 -0.20037 0 1 0
+-0.445704 0.371795 -0.2785 0 1 0
+0.5 -0.0941231 0.309756 0.999926 0.00756749 0.00957629
+-0.344493 0.371795 -0.0826421 0 1 0
+0.363133 -0.371795 0.234268 0 1 0
+-0.122838 0.289238 -0.371795 0 0 1
+-0.0883944 -0.294872 -0.0971037 0 1 0
+0.00835393 -0.0442009 -0.333333 0 0 1
+0.152256 0.265354 -0.371795 0 0 1
+-0.5 -0.0529841 0.147026 1 0 0
+-0.5 0.0773317 -0.0854053 1 0 0
+-0.14922 -0.139914 0.320513 0.762773 0.513558 0.392981
+-0.448718 -0.366839 -0.0364985 0.969638 0.23024 -0.0824115
+0.446661 -0.276353 0.320513 0 0 1
+-0.454862 -0.294872 -0.285835 0.0990227 0.993567 -0.0549524
+0.5 -0.236599 -0.174018 1 0 0
+0.5 -0.191535 0.197645 1 0 0
+-0.273072 0.00990294 -0.121336 0.975911 -0.217982 -0.00902923
+-0.233639 -0.0433387 -0.0781733 0.106241 0.994307 0.00814876
+-0.139482 0.244109 0.371795 -0.023849 0.0343156 0.999126
+0.170652 -0.371795 0.0369733 0 1 0
+0.260224 -0.024731 -0.0815546 0.739856 -0.672751 -0.0043411
+-0.5 0.320601 -0.0639983 1 0 0
+0.5 0.254254 -0.185495 1 0 0
+0.410251 0.294872 -0.364637 0.0521479 0.984614 -0.166783
+-0.112774 -0.0952156 -0.333333 0 0 1
+-0.0505899 0.371795 -0.361573 0 1 0
+0.368653 0.294872 0.120782 0 1 0
+-0.448718 -0.298434 -0.149045 0.906971 0.412271 0.0862275
+-0.270227 -0.371795 0.200573 0 1 0
+-0.0184798 0.17029 0.320513 0 0 1
+-0.5 0.213937 0.129663 1 0 0
+0.126622 0.186894 -0.333333 0 0 1
+0.5 0.216134 -0.176675 1 0 0
+0.5 -0.0893917 -0.364591 1 0 0
+-0.373931 0.371795 -0.295847 0 1 0
+-0.5 0.244479 -0.0700454 1 0 0
+-0.5 -0.0108426 -0.367359 0.933558 0.112263 0.340392
+0.0729578 -0.294872 -0.200323 0 1 0
+-0.414205 0.0273814 -0.371795 0 0 1
+-0.253199 0.182078 0.371795 0 0 1
+0.269139 -0.0652723 -0.333333 0 0 1
+0.433381 -0.012197 0.320513 0 0 1
+0.345796 -0.144708 -0.371795 0 0 1
+0.331651 -0.254674 -0.371795 0 0 1
+-0.353771 -0.296516 -0.371795 0 0 1
+-0.125606 0.371795 0.131245 0 1 0
+0.4491 0.294872 0.145027 0 1 0
+-0.5 0.222008 -0.0379519 1 0 0
+0.186195 -0.371795 0.144281 0 1 0
+0.5 0.202983 0.207137 1 0 0
+0.0711976 0.371795 -0.0893388 0 1 0
+0.5 -0.13999 -0.0887263 1 0 0
+0.348493 0.0863543 -0.371795 0 0 1
+0.456121 -0.0982133 -0.371795 0 0 1
+-0.5 0.244068 -0.0462393 1 0 0
+-0.465171 0.123373 0.320513 0 0 1
+0.306055 -0.21776 -0.371795 0 0 1
+0.5 0.277293 0.187112 1 0 0
+0.0771319 -0.294872 0.303635 0 1 0
+0.177695 -0.371795 -0.184322 0 1 0
+0.5 -0.0470623 0.0486563 1 0 0
+-0.100397 -0.173271 0.320513 0.196175 0.396279 0.896927
+-0.0225361 -0.294872 -0.0141164 0 1 0
+-0.264983 0.371795 -0.280309 0 1 0
+0.121539 -0.242826 -0.371795 0 0 1
+-0.14523 0.371795 0.316065 -0.00963971 0.997445 0.0707794
+-0.225535 -0.371795 0.206532 0 1 0
+0.448718 -0.332307 -0.101883 1 0 0
+0.5 -0.290987 0.147251 0.904386 -0.41832 0.0842329
+-0.20319 0.0336997 -0.11224 0.60757 0.794262 -0.00243495
+-0.5 0.148499 -0.31592 1 0 0
+-0.218316 0.0346865 0.371795 0 0 1
+-0.0253065 -0.294872 -0.137722 0 1 0
+-0.0757344 0.371795 -0.237725 0 1 0
+0.0598398 -0.266714 -0.371795 0 0 1
+0.289794 -0.231391 0.320513 0 0 1
+-0.382364 -0.371795 -0.251764 0 1 0
+-0.346219 0.371795 0.207402 0 1 0
+-0.145261 0.186937 -0.333333 0 0 1
+0.5 -0.0436566 -0.20402 1 0 0
+0.443507 0.272548 0.320513 0 0 1
+0.481736 0.294872 -0.268309 0 1 0
+0.5 -0.213336 -0.0808442 1 0 0
+0.3201 -0.371795 -0.194863 0 1 0
+-0.354361 -0.119221 0.345359 0.877693 0.479224 0
+-0.345459 -0.0315388 0.371795 0 0 1
+-0.218038 -0.3162 0.320513 0 0 1
+-0.197713 -0.204267 0.371795 0 0 1
+-0.236215 0.371795 0.292423 0 1 0
+-0.200477 -0.0874304 0.371795 0 0 1
+0.00471226 -0.204555 0.348919 0 1 0
+-0.289508 -0.00755805 0.371795 0 0 1
+-0.0100259 0.371795 0.303888 0 1 0
+0.0360716 0.0703934 -0.333333 0 0 1
+0.390113 -0.149726 -0.371795 0 0 1
+-0.144549 -0.0172297 0.320513 0 0 1
+-0.233182 -0.0433786 -0.103083 0.0827933 0.996508 -0.0108622
+-0.1387 0.255531 0.358001 -0.071457 0.997444 -0.000107863
+-0.141154 -0.300106 0.256344 0.983477 -0.180992 0.00380001
+0.5 0.106105 -0.205328 1 0 0
+-0.136408 0.0806197 0.320513 0 0 1
+0.157348 -0.320986 -0.371795 0 0 1
+-0.246306 -0.371795 0.0579325 0 1 0
+0.291814 -0.371795 -0.248164 0 1 0
+0.141026 0.311876 -0.229692 1 0 0
+-0.371303 0.371795 0.0789826 0 1 0
+-0.5 0.157486 0.0858169 1 0 0
+-0.176713 -0.371795 0.140803 0 1 0
+-0.270752 0.371795 -0.190535 0 1 0
+0.156325 -0.371795 -0.34313 0 1 0
+-0.129349 -0.101242 0.320513 0 0 1
+0.5 0.118043 0.0953405 1 0 0
+-0.495532 -0.294872 0.274907 0.351648 0.931247 0.0955167
+-0.235556 0.295592 0.320513 0 0 1
+-0.5 0.0965625 -0.221237 1 0 0
+-0.305495 -0.0306807 -0.333333 0 0 1
+-0.0894004 0.130092 0.320513 0 0 1
+-0.268839 0.0211077 -0.121897 0.88357 -0.468218 0.00875303
+0.0303498 0.256282 0.336687 0 1 0
+0.266412 -0.0142257 -0.213847 0.922965 -0.383755 0.0294408
+0.430567 0.294872 0.109009 0 1 0
+0.233478 -0.242239 -0.371795 -0.00015381 -0.00723146 0.999974
+-0.5 0.0620877 -0.0242847 1 0 0
+0.5 0.22988 0.00845464 1 0 0
+-0.5 0.333524 0.272427 1 0 0
+0.439978 -0.147533 0.320513 0 0 1
+-0.272636 0.0115293 -0.236664 0.969952 -0.243172 0.00777316
+-0.182071 0.200026 -0.333333 0 0 1
+0.248139 -0.225767 0.356289 -0.479243 0.877682 0
+0.298259 0.294872 -0.0979951 0 1 0
+0.131139 -0.157144 0.324702 -0.546693 0.748587 0.375159
+-0.249189 0.371795 -0.180199 0 1 0
+-0.360675 0.316195 0.320513 0 0 1
+0.5 0.227765 0.0530548 1 0 0
+-0.192143 0.371795 0.297499 0 1 0
+-0.5 0.259185 0.0735594 1 0 0
+-0.344345 -0.127788 0.371795 -0.226599 -0.119844 0.966587
+-0.150815 -0.140735 0.371795 0.701296 0.540182 0.465174
+0.5 -0.0636867 -0.225309 1 0 0
+0.5 0.140751 0.261222 1 0 0
+-0.141154 -0.34981 0.00274867 1 0 0
+0.448718 -0.321054 -0.317101 1 0 0
+0.232876 -0.137446 0.371795 0 0 1
+0.448718 -0.369218 -0.281516 0.789267 -0.592625 -0.160786
+0.0919809 -0.294872 0.166965 0 1 0
+0.420473 -0.371795 -0.24045 0 1 0
+0.127275 0.371795 -0.191834 0 1 0
+-0.0911257 0.195145 -0.333333 0 0 1
+0.417793 0.294872 0.0154373 0 1 0
+-0.288252 0.371795 0.16109 0 1 0
+0.0541737 -0.294872 0.0181574 0 1 0
+-0.474168 -0.294872 0.0188832 0 1 0
+-0.439373 -0.140197 -0.371795 0 0 1
+-0.208413 0.371795 -0.099999 0 1 0
+0.106239 0.360719 0.320513 0 0 1
+0.217604 -0.371795 -0.148921 0 1 0
+0.0331438 0.371795 -0.347022 0 1 0
+-0.305819 -0.291127 -0.371795 0 0 1
+-0.400208 0.371795 -0.224923 0 1 0
+0.0848651 0.256282 0.36699 -0.0429205 0.98782 0.149567
+-0.247624 -0.0400536 -0.0874817 0.388419 0.921481 -0.00175411
+0.5 0.206042 -0.0654087 1 0 0
+0.389209 -0.371795 -0.206593 0 1 0
+0.448718 -0.337874 0.149043 1 0 0
+-0.131833 0.156603 0.334273 -0.614218 0.789136 0
+0.5 -0.129462 0.125432 1 0 0
+-0.128604 0.371795 0.0528783 0 1 0
+-0.102797 0.371795 0.239291 0 1 0
+0.141109 -0.336885 0.169649 1 0 0
+0.141109 -0.370586 0.188817 0.794143 0.598904 0.103203
+-0.5 -0.175224 0.208268 1 0 0
+-0.5 -0.0495714 -0.10518 1 0 0
+0.0393608 0.371795 0.156751 0 1 0
+0.258397 -0.0265578 -0.224518 0.710594 -0.703583 0.00513308
+0.291148 0.294872 0.112104 0 1 0
+-0.358029 0.371795 0.0611291 0 1 0
+-0.481175 -0.294872 0.147277 0 1 0
+-0.396543 0.371795 0.0228697 0 1 0
+0.5 0.125381 -0.044951 1 0 0
+0.5 -0.292626 -0.0787659 0.893235 -0.436438 0.107946
+0.104506 0.371795 0.112792 0 1 0
+-0.141281 0.0451534 -0.333333 0 0 1
+0.216696 0.0276141 0.00442764 -0.230854 0.47367 0.849908
+0.141109 -0.297893 -0.151031 0.806777 0.587935 0.0586766
+-0.413359 -0.149518 0.320513 0 0 1
+0.136061 0.371795 -0.323029 0.399768 0.913621 -0.0740377
+-0.0500451 -0.225255 -0.333333 -0.0572349 -0.318088 0.946332
+0.497502 0.119039 0.320513 0.479829 0.0796327 0.87374
+-0.5 -0.192388 -0.161288 1 0 0
+-0.422177 0.371795 -0.221046 0 1 0
+0.286134 0.294872 -0.0350049 0 1 0
+-0.0731427 -0.256282 0.35829 0 1 0
+-0.328358 0.10279 -0.371795 -0.472605 -0.123404 0.872591
+0.279057 0.206394 0.370241 0.357809 0.457552 0.814014
+-0.236493 -0.307007 -0.371795 0 0 1
+-0.129362 0.308084 0.320513 0 0 1
+-0.3126 -0.371795 0.254964 0 1 0
+0.290618 -0.371795 0.0790664 0 1 0
+-0.5 0.26804 -0.339715 1 0 0
+-0.0112101 0.371795 0.171691 0 1 0
+-0.207679 0.273297 -0.371795 0 0 1
+-0.389199 -0.371795 0.0692766 0 1 0
+0.0912618 0.0448936 0.320513 0 0 1
+-0.436458 -0.0695124 0.320513 0 0 1
+0.374921 0.294872 -0.26549 0 1 0
+0.0926223 -0.109702 -0.333333 0 0 1
+-0.205361 -0.0352202 -0.24007 -0.553755 0.832438 -0.0200724
+-0.5 0.300372 0.0731778 1 0 0
+-0.30765 0.182069 0.322971 -0.633807 0.601468 0.486339
+-0.433313 -0.371795 -0.0443121 0 1 0
+-0.403803 0.140796 -0.371795 0 0 1
+0.345581 -0.371795 -0.152183 0 1 0
+-0.0208176 0.371795 -0.285377 0 1 0
+0.34394 0.294872 -0.273736 0 1 0
+0.0427785 -0.200246 0.368904 -0.232203 0.887141 0.398827
+-0.0519724 -0.102628 0.320513 0 0 1
+-0.141154 -0.323784 -0.216862 1 0 0
+0.408561 -0.348587 -0.371795 0 0 1
+-0.5 0.256711 -0.266162 1 0 0
+-0.265779 -0.0257081 -0.188067 0.79155 0.611105 0
+0.5 0.177327 -0.291325 1 0 0
+-0.5 0.146783 0.256467 1 0 0
+0.36309 -0.227537 -0.371795 0 0 1
+0.386775 -0.371795 0.0978885 0 1 0
+0.448718 -0.295815 -0.0771826 0.884376 -0.465935 -0.0279759
+0.137851 0.371795 0.212339 0.480729 0.876573 0.0227824
+0.176915 0.294872 -0.0787877 0 1 0
+-0.129555 -0.294872 0.305168 0 1 0
+-0.0124945 -0.294872 -0.140343 0 1 0
+-0.180054 -0.371795 -0.125806 0 1 0
+-0.0493858 -0.0888631 0.320513 0 0 1
+-0.263044 -0.029136 -0.0837334 0.736279 0.676661 -0.00481783
+-0.14953 0.371795 -0.237937 0 1 0
+-0.363738 -0.324894 0.320513 0 0 1
+0.448832 0.234818 -0.371795 0 0 1
+0.369271 -0.371795 0.247854 0 1 0
+-0.204968 0.0349446 -0.243055 0.599327 0.800476 -0.00676421
+0.0347407 -0.0674374 -0.333333 0 0 1
+0.0884056 0.371795 -0.309913 0 1 0
+-0.141154 -0.365167 0.279971 0.931 -0.340957 -0.130334
+-0.417929 -0.20825 -0.371795 0 0 1
+-0.37237 -0.371795 0.265296 0 1 0
+-0.5 -0.185091 0.270465 1 0 0
+-0.372266 -0.202965 0.320513 0 0 1
+0.133235 -0.185062 -0.333333 0 0 1
+0.0120687 -0.294872 0.104213 0 1 0
+0.165091 -0.371795 0.107965 0 1 0
+0.399198 0.294872 0.0172195 0 1 0
+-0.247819 -0.267683 0.320513 0 0 1
+0.5 0.0573364 -0.16886 1 0 0
+-0.448718 -0.355489 -0.205907 1 0 0
+0.400091 0.294872 -0.0361728 0 1 0
+0.5 0.20094 0.261314 1 0 0
+0.302835 -0.202964 -0.340805 0.636984 -0.543881 0.546301
+0.492997 0.294872 -0.301218 0.139738 0.988241 0.0620778
+-0.141154 -0.333055 0.115566 1 0 0
+-0.183243 -0.371795 0.0768219 0 1 0
+-0.11069 -0.294872 -0.184947 0 1 0
+-0.130847 0.10059 0.320513 0 0 1
+0.469246 0.0638051 0.320513 0 0 1
+0.468513 0.0924324 0.320513 0 0 1
+-0.286905 -0.200519 0.363938 0.596278 0.802117 -0.0325561
+-0.5 0.193384 0.206031 1 0 0
+-0.5 -0.182264 0.272005 1 0 0
+-0.46164 -0.154316 0.320513 0 0 1
+-0.5 0.290394 -0.243482 1 0 0
+-0.404592 0.362324 -0.371795 0.00634731 -0.019633 0.999787
+0.0388307 0.218124 0.371795 0 0 1
+0.5 -0.136522 0.140093 1 0 0
+-0.262603 -0.136321 0.371795 0 0 1
+0.5 0.148763 0.0476213 1 0 0
+0.5 0.0130917 -0.0463586 1 0 0
+0.5 -0.0645029 0.099705 1 0 0
+-0.309132 -0.371795 0.255501 0 1 0
+-0.46492 0.181205 -0.371795 0 0 1
+-0.287879 0.371795 -0.337305 0 1 0
+0.351674 -0.371795 0.294259 0 1 0
+-0.00655384 -0.294872 0.245781 0 1 0
+0.0450678 -0.294872 0.115592 0 1 0
+0.248979 0.0337847 -0.0667112 0.484246 0.874751 -0.0178089
+0.210722 0.254577 0.320513 0.0305519 0.0207682 0.999317
+0.0643076 -0.294872 -0.237235 0 1 0
+-0.03687 0.371795 -0.279378 0 1 0
+0.5 0.121804 -0.0926659 1 0 0
+0.353167 -0.121409 0.345206 0.877656 -0.479292 0
+-0.38696 0.166899 0.320513 0 0 1
+-0.390318 0.371795 -0.298839 0 1 0
+0.284847 -0.371795 -0.192502 0 1 0
+0.126031 0.371795 -0.0957516 0 1 0
+0.5 0.214897 0.26484 1 0 0
+-0.5 0.0966171 -0.370726 0.335593 -0.0467244 0.940848
+-0.159531 0.253987 0.371795 -0.0977218 0.657124 0.747421
+-0.433768 -0.120404 -0.371795 0 0 1
+-0.5 -0.181645 -0.1615 1 0 0
+-0.161694 0.10579 -0.333333 0 0 1
+-0.448718 -0.351633 -0.209158 1 0 0
+0.497904 0.0300652 -0.371795 -0.542135 -0.0777922 0.836683
+0.4755 0.294872 -0.253153 0 1 0
+-0.175686 -0.20133 -0.333333 0 0 1
+-0.46546 0.0366513 -0.371795 0 0 1
+-0.308105 -0.188921 0.320513 -0.0909155 -0.0758272 0.992968
+-0.165671 0.165161 0.371795 0 0 1
+-0.15371 -0.371795 0.25977 0 1 0
+0.141026 0.333749 -0.112768 1 0 0
+-0.0403568 -0.231783 0.371795 0 0 1
+-0.174437 0.215573 0.371795 0 0 1
+0.5 0.100366 0.0221875 1 0 0
+-0.037513 0.371795 0.16443 0 1 0
+-0.134425 -0.270626 -0.371795 0 0 1
+-0.5 0.276055 -0.128563 1 0 0
+-0.00488768 -0.0694928 0.320513 0 0 1
+-0.30324 0.371795 -0.218563 0 1 0
+-0.447868 0.371795 -0.0353163 0 1 0
+-0.5 0.0681145 0.129622 1 0 0
+-0.5 0.0398352 -0.222684 1 0 0
+0.141026 0.328312 0.134654 1 0 0
+0.121232 0.371795 -0.265642 0 1 0
+0.5 -0.106693 -0.226027 1 0 0
+0.373604 0.0735498 0.345526 0.947084 0.320968 -0.0034688
+0.332122 0.262308 -0.371795 0 0 1
+0.192422 0.00130028 -0.333064 0.82835 0.063369 -0.556615
+0.338258 0.294872 0.175085 0 1 0
+0.141026 0.320584 -0.0587998 1 0 0
+-0.22525 0.211239 -0.333333 0 0 1
+-0.5 0.160976 0.0658013 1 0 0
+-0.43649 -0.371795 -0.316236 0 1 0
+-0.220018 0.184903 -0.333333 0 0 1
+-0.0204841 -0.294872 0.26702 0 1 0
+0.5 0.289936 -0.318078 0.956956 0.265356 0.117563
+-0.032073 -0.274474 -0.371795 0 0 1
+0.315089 0.294872 -0.31898 0 1 0
+-0.255908 -0.22982 -0.352187 0.143999 0.989565 0.00503232
+-0.448718 -0.36646 -0.0486802 0.960569 0.26601 0.0809045
+-0.0929251 0.140709 -0.333333 0 0 1
+-0.301143 0.213231 -0.371795 -0.590076 0.198895 0.782464
+0.24601 0.131113 0.371795 0 0 1
+0.5 0.193395 -0.0135865 1 0 0
+0.336779 0.294872 -0.0586557 0 1 0
+0.476139 -0.294872 -0.156092 0 1 0
+-0.441616 0.371795 0.0691951 0 1 0
+-0.186098 0.371795 0.155932 0 1 0
+0.245428 0.294872 0.228695 0 1 0
+0.283141 0.18456 0.371795 0 0 1
+-0.36753 0.311012 -0.371795 0 0 1
+0.5 0.244669 -0.11426 1 0 0
+0.379388 -0.371795 0.225323 0 1 0
+0.227248 0.198898 -0.333333 0 0 1
+-0.222093 0.371795 -0.344939 0 1 0
+-0.0476612 -0.294872 0.289623 0 1 0
+0.448718 -0.324366 0.0589345 1 0 0
+0.5 -0.203729 -0.0656952 1 0 0
+-0.255439 -0.358952 -0.371795 0 0 1
+-0.188513 -0.0100732 -0.177634 0.980432 -0.195561 0.022543
+-0.0747949 -0.216476 0.371795 0 0 1
+0.141026 0.368179 -0.334197 0.813322 0.581688 -0.0120986
+-0.5 -0.270566 -0.135945 1 0 0
+0.40322 0.135217 0.320513 0 0 1
+-0.0222543 -0.146294 0.320513 0 0 1
+-0.204968 0.027128 0.371795 0.743896 -0.382406 0.548074
+0.5 -0.1382 0.274344 1 0 0
+-0.282911 -0.371795 0.183107 0 1 0
+-0.150975 -0.289623 -0.371795 0 0 1
+0.0614724 -0.294872 0.270824 0 1 0
+0.053696 0.371795 -0.320947 0 1 0
+0.477903 0.294872 0.149289 0 1 0
+-0.0974405 0.185429 0.371795 0.305644 -0.331515 0.892569
+-0.132769 0.371795 0.17073 0 1 0
+-0.320513 0.0532583 -0.357695 1 0 0
+-0.0755279 -0.294872 -0.140666 0 1 0
+-0.367349 -0.0189907 -0.371795 0 0 1
+-0.303887 0.363188 -0.371795 -0.00831235 -0.0797798 0.996778
+-0.188832 -0.159737 -0.333333 0 0 1
+0.231801 -0.0925702 0.371795 0 0 1
+0.5 0.0429478 -0.14091 1 0 0
+-0.5 -0.114247 -0.171433 1 0 0
+-0.5 0.0364178 -0.153329 1 0 0
+0.183786 -0.09024 0.332712 0.914125 -0.405424 -0.00278231
+-0.362617 0.371795 -0.0863537 0 1 0
+-0.242251 -0.0418792 -0.153252 0.293434 0.955928 0.00987279
+-0.5 -0.276257 -0.116817 1 0 0
+0.0784115 -0.294872 0.185811 0 1 0
+0.5 0.106583 0.0800749 1 0 0
+0.194394 0.294872 -0.30992 0 1 0
+0.26213 0.022012 -0.0571552 0.806617 0.591002 0.00919992
+0.470198 0.164898 0.320513 0 0 1
+0.308047 -0.255066 0.320513 0 0 1
+0.5 0.228628 0.137903 1 0 0
+0.5 -0.245189 0.253601 1 0 0
+0.5 -0.119402 -0.241442 1 0 0
+0.0324039 0.371795 0.188541 0 1 0
+0.141026 0.295129 0.213015 0.745461 0.66539 0.0392978
+0.295928 0.122287 -0.333333 0 0 1
+0.205083 -0.371795 -0.133399 0 1 0
+-0.337614 0.142051 0.371795 -0.281739 0.165303 0.945144
+0.11332 0.371795 -0.0375607 0 1 0
+0.270108 0.294872 -0.0702587 0 1 0
+0.194203 0.0115708 -0.136554 0.943144 -0.332232 -0.010038
+-0.117641 0.256282 0.358633 0 1 0
+0.262317 0.0217453 -0.073431 0.821798 0.569757 -0.00490471
+-0.073109 -0.294872 0.174972 0 1 0
+0.194163 0.294872 -0.190509 0 1 0
+-0.347904 0.0231289 -0.371795 0 0 1
+0.5 0.0969294 0.209567 1 0 0
+0.141026 0.308452 -0.203881 1 0 0
+0.158182 0.294872 0.123306 0 1 0
+-0.313266 0.307499 0.320513 0 0 1
+0.5 -0.169335 -0.169595 1 0 0
+-0.5 0.333091 -0.308938 1 0 0
+0.218985 0.238972 0.366503 0.305821 0.906472 0.291172
+-0.5 0.150228 -0.305878 1 0 0
+0.225041 0.255459 0.320513 0 0 1
+0.5 0.270875 0.0662206 1 0 0
+-0.100038 -0.230897 -0.346083 -0.00264431 0.999859 -0.0165606
+0.5 0.0917057 -0.209748 1 0 0
+-0.191525 0.309905 0.320513 0 0 1
+-0.0547138 0.230897 -0.36845 -0.0165286 0.960129 0.279069
+0.5 -0.272677 -0.355213 1 0 0
+0.213814 -0.0343697 -0.0201312 0.445104 0.895405 0.0114964
+0.37646 -0.371795 0.279896 0 1 0
+-0.401567 0.272238 -0.371795 0 0 1
+-0.158706 0.026194 -0.333333 0 0 1
+-0.216311 -0.371795 -0.149837 0 1 0
+0.5 -0.0636206 -0.166416 1 0 0
+-0.202002 0.306603 0.320513 0 0 1
+-0.116287 -0.294872 0.26387 0 1 0
+-0.0828311 -0.294872 0.267032 0 1 0
+0.5 0.221682 0.0235309 1 0 0
+-0.5 -0.157534 -0.158198 1 0 0
+0.368117 0.294872 0.0297301 0 1 0
+-0.5 0.028774 0.178984 1 0 0
+0.0368314 0.371795 -0.153465 0 1 0
+-0.448718 -0.356715 -0.00330928 1 0 0
+-0.0615889 -0.294872 -0.195735 0 1 0
+-0.122016 -0.294872 0.0126987 0 1 0
+0.440777 -0.039592 0.320513 0 0 1
+-0.0739929 -0.198455 0.371795 -0.000610897 0.136664 0.990617
+-0.212728 0.216089 0.371795 0 0 1
+0.5 -0.22664 -0.123789 1 0 0
+-0.110098 0.064271 -0.333333 0 0 1
+-0.256631 0.202065 -0.333333 0 0 1
+0.5 -0.015596 0.300103 1 0 0
+-0.5 -0.020326 -0.277488 1 0 0
+0.191424 -0.241767 0.371795 0.0331336 -0.466228 0.884044
+-0.401362 0.371795 0.0824322 0 1 0
+-0.13069 -0.294872 -0.149491 -0.126705 0.991439 0.0315251
+-0.5 -0.137742 -0.00976298 1 0 0
+-0.229267 0.1268 -0.333333 0 0 1
+0.5 -0.227838 -0.348717 1 0 0
+-0.162901 0.0254098 0.320513 0 0 1
+0.5 -0.225987 0.071102 1 0 0
+0.124166 -0.162571 0.355164 -0.614234 0.789124 0
+0.32797 0.294872 -0.31098 0 1 0
+0.476349 -0.217146 -0.371795 0 0 1
+0.357588 -0.371795 0.157312 0 1 0
+-0.161349 0.267781 -0.371795 0 0 1
+0.5 -0.0937256 0.161197 1 0 0
+-0.469858 0.0204971 -0.371795 0 0 1
+0.415451 -0.184395 0.320513 0 0 1
+-0.5 -0.165305 0.276656 1 0 0
+-0.485888 0.371795 0.123744 0 1 0
+-0.0410451 -0.148069 0.320513 0 0 1
+0.317807 0.269778 -0.371795 0 0 1
+0.230264 -0.012994 0.0152759 -0.0249016 -0.479514 0.877181
+0.155171 -0.163448 -0.333333 0 0 1
+0.307678 -0.371795 -0.029217 0 1 0
+-0.5 -0.125738 -0.354818 1 0 0
+-0.213332 -0.371795 0.0767692 0 1 0
+0.5 0.265194 -0.0125833 1 0 0
+0.187429 -0.167969 0.371795 0 0 1
+0.148222 0.0392902 0.320513 0 0 1
+-0.0297224 -0.0689103 0.320513 0 0 1
+-0.334187 0.371795 -0.262919 0 1 0
+0.00285579 0.371795 0.06341 0 1 0
+0.327452 -0.154618 0.371795 0.148656 -0.0563772 0.987281
+-0.142333 -0.211899 -0.333333 0 0 1
+-0.5 -0.171081 -0.348103 1 0 0
+0.421115 0.294872 -0.000370498 0 1 0
+0.448718 -0.348068 0.170592 1 0 0
+-0.430727 -0.276488 0.320513 0 0 1
+0.411601 0.294872 0.013703 0 1 0
+0.5 -0.162295 0.26329 1 0 0
+-0.116128 -0.196833 -0.333333 0 0 1
+-0.0735789 0.28926 -0.371795 0 0 1
+0.104082 0.371795 0.246025 0 1 0
+0.10392 0.371795 -0.364966 -0.101484 0.963968 -0.245899
+0.5 0.23368 0.201459 1 0 0
+-0.5 0.178101 0.0753147 1 0 0
+-0.320513 0.0979083 -0.349671 1 0 0
+0.490398 -0.294872 -0.0321653 -0.0859438 0.994664 0.0570717
+0.199261 0.0218012 -0.0931733 0.829024 -0.558838 0.0204918
+-0.297675 -0.371795 -0.115751 0 1 0
+0.0966453 0.371795 -0.322649 0 1 0
+-0.5 0.210369 -0.219992 1 0 0
+0.5 0.176094 -0.344477 1 0 0
+-0.355906 0.260622 0.320513 0 0 1
+-0.21004 0.242308 0.32932 -0.344351 0.926837 0.149652
+-0.213924 -0.371795 -0.208258 0 1 0
+-0.5 0.196315 0.241666 1 0 0
+0.0763069 -0.275628 -0.371795 0 0 1
+0.08152 0.302734 0.320513 0 0 1
+0.5 0.0883295 -0.23308 1 0 0
+0.5 0.0360389 -0.355454 1 0 0
+-0.5 -0.223152 0.29269 1 0 0
+-0.5 -0.016442 0.220254 1 0 0
+0.5 0.0344575 0.0206283 1 0 0
+-0.0844056 0.371795 -0.10983 0 1 0
+0.0450868 -0.141279 -0.333333 0 0 1
+0.429969 -0.371795 0.204986 0 1 0
+-0.341391 0.371795 -0.0935646 0 1 0
+0.141109 -0.359159 -0.362586 0.99827 0 0.0587967
+0.0566459 0.152168 0.320513 0 0 1
+0.0963185 -0.294872 -0.182806 0 1 0
+-0.459621 -0.242556 0.320513 0 0 1
+0.370936 -0.212192 0.320513 0 0 1
+-0.294398 0.0605574 0.371795 0 0 1
+-0.353516 0.371795 -0.220378 0 1 0
+0.141109 -0.370122 0.047418 0.524203 0.850331 0.0463516
+-0.209422 -0.242539 0.325828 0.440364 0.822411 -0.360167
+-0.220475 0.270174 0.320513 0 0 1
+-0.0277547 -0.294872 0.136271 0 1 0
+0.0530779 0.371795 -0.169536 0 1 0
+0.270018 0.135048 0.371795 0 0 1
+0.231544 -0.0683317 0.371795 0 0 1
+0.20015 0.0428951 0.359725 0.969402 0.245478 0
+0.0506621 0.328918 0.320513 0 0 1
+-0.437167 0.371795 -0.154207 0 1 0
+-0.203183 -0.0250222 0.332489 0.996377 0.0850275 -0.00173499
+-0.386552 -0.371795 -0.121853 0 1 0
+-0.294683 0.149665 -0.333333 0 0 1
+0.033254 -0.238709 0.371795 0 0 1
+0.5 -0.110158 0.197669 1 0 0
+0.397584 -0.216698 -0.371795 0 0 1
+0.42636 0.0986777 -0.371795 0 0 1
+0.198091 0.0201303 -0.276347 0.851244 -0.524281 -0.0226455
+-0.5 -0.240968 0.0552396 1 0 0
+0.250138 -0.371795 -0.264397 0 1 0
+0.448718 -0.37116 -0.188959 -0.680172 0.720138 -0.136991
+0.020959 0.371795 -0.120363 0 1 0
+-0.147253 0.021782 0.320513 0 0 1
+0.139425 0.192042 -0.333333 0 0 1
+0.486151 -0.294872 -0.0554548 0 1 0
+-0.324765 0.371795 -0.0609318 0 1 0
+0.211302 0.294872 -0.347764 0 1 0
+0.318356 -0.371795 0.315036 0.141407 0.898473 -0.415633
+0.302117 0.292736 0.320513 0.245667 0.322513 0.91413
+0.163903 -0.0312936 0.320513 0 0 1
+0.5 -0.285 -0.222309 1 0 0
+0.101989 -0.0308563 0.320513 0 0 1
+-0.261214 0.371795 -0.321606 0 1 0
+0.231039 0.234476 0.344188 0.393322 0.91935 -0.00970947
+0.5 0.0689975 0.200453 1 0 0
+0.00150117 -0.137063 0.320513 0 0 1
+0.5 -0.126562 0.142537 1 0 0
+0.5 -0.157685 0.121731 1 0 0
+-0.5 0.0244276 0.24787 1 0 0
+0.253122 -0.371795 -0.290136 0 1 0
+-0.482291 0.371795 -0.301909 0 1 0
+-0.172849 0.371795 -0.088625 0 1 0
+0.448718 -0.330262 -0.28482 1 0 0
+-0.195243 -0.331451 -0.371795 0 0 1
+0.141026 0.363355 -0.34254 0.978197 0.195037 0.0713564
+-0.123393 0.371795 -0.0725811 0 1 0
+-0.214936 -0.136714 0.371795 0 0 1
+0.5 0.285577 0.158359 0.967114 0.254344 0
+-0.00919711 -0.294872 0.131972 0 1 0
+0.420856 -0.287025 0.320513 0 0 1
+-0.5 -0.0106136 -0.0862416 1 0 0
+0.254205 -0.270329 0.320513 0 0 1
+-0.5 -0.0245408 0.130016 1 0 0
+0.425096 0.294872 -0.13709 0 1 0
+0.312724 0.209456 -0.371795 0 0 1
+-0.5 -0.0418891 0.144922 1 0 0
+-0.281521 0.371795 -0.332718 0 1 0
+-0.328123 -0.28946 -0.371795 0 0 1
+0.200392 -0.012085 0.320513 -0.249207 0.0132618 0.968359
+-0.134063 0.371795 -0.342161 0 1 0
+0.141026 0.303133 0.183917 0.999394 0.0341608 -0.00674528
+0.1296 -0.294872 -0.139074 0 1 0
+-0.36756 -0.371795 -0.0117945 0 1 0
+0.0857318 -0.016636 -0.333333 0 0 1
+-0.448718 -0.326068 0.306655 1 0 0
+0.030282 -0.294872 -0.119976 0 1 0
+0.302491 0.0252885 0.371795 0 0 1
+-0.5 0.0751295 0.0734092 1 0 0
+-0.448718 -0.371672 -0.0322477 0.85379 0.511666 -0.0961265
+0.194034 -0.0109411 -0.3219 0.960941 0.276755 0
+0.302899 0.294872 -0.159345 0 1 0
+-0.175565 0.286707 0.320513 0 0 1
+-0.5 -0.0636842 0.23922 1 0 0
+-0.21621 0.0410545 -0.26575 0.371438 0.928446 0.0046761
+-0.149508 0.12254 -0.333333 0 0 1
+-0.5 0.370916 -0.245347 -0.683139 0.72408 0.0950244
+-0.489144 0.0484462 0.320513 0 0 1
+0.0282588 -0.294872 -0.114658 0 1 0
+-0.5 -0.278866 0.259767 1 0 0
+-0.0066887 -0.294872 -0.179567 0 1 0
+-0.0800388 0.29262 -0.371795 0 0 1
+0.4107 -0.0268601 -0.371795 0 0 1
+-0.413556 0.0344959 0.320513 0 0 1
+-0.131091 -0.15541 -0.333333 0 0 1
+-0.361083 0.0511645 0.371795 0 0 1
+0.389775 0.0627533 -0.371795 0 0 1
+0.206382 -0.029698 -0.188816 0.635558 0.771962 0.0118619
+0.5 -0.225967 -0.219888 1 0 0
+-0.0121519 0.263331 -0.371795 0 0 1
+-0.454905 -0.294872 -0.103107 0.290253 0.956812 0.0162688
+-0.295079 -0.0585231 -0.333333 0 0 1
+-0.5 0.322284 -0.328329 1 0 0
+-0.406466 -0.371795 -0.181217 0 1 0
+-0.5 -0.112052 0.097864 1 0 0
+0.0568396 0.371795 0.156519 0 1 0
+0.162988 -0.371795 0.165478 0 1 0
+0.340206 0.294872 -0.00631212 0 1 0
+0.157489 -0.371795 -0.189432 0 1 0
+0.240309 0.294872 0.274923 0 1 0
+-0.160848 -0.371795 0.0267888 0 1 0
+0.00795789 -0.230897 -0.335426 -0.0243377 0.758195 -0.651574
+-0.019006 0.371795 -0.172005 0 1 0
+-0.5 -0.149287 0.065938 1 0 0
+-0.0429042 0.371795 -0.335401 0 1 0
+0.354577 -0.371795 0.0639202 0 1 0
+0.0233232 0.0430097 0.320513 0 0 1
+-0.329812 -0.124186 0.371795 0 0 1
+0.00641413 0.196841 0.320513 -0.0775939 -0.202909 0.976119
+-0.131628 0.0348395 -0.333333 0 0 1
+-0.5 -0.00952944 0.309303 1 -0.000355621 -0.0008172
+0.250611 -0.371795 -0.0804109 0 1 0
+0.19019 -0.0420202 -0.333333 0 0 1
+0.445119 0.233985 0.320513 0 0 1
+-0.00738447 0.0464062 0.320513 0 0 1
+0.367559 -0.371795 0.192329 0 1 0
+0.356854 -0.371795 -0.0855662 0 1 0
+-0.5 -0.0457736 0.050331 1 0 0
+-0.41216 -0.371795 -0.159736 0 1 0
+0.250858 -0.371795 0.19805 0 1 0
+-0.141939 -0.371795 -0.253226 -0.68677 0.725176 0.0496759
+0.18634 -0.235787 -0.371795 -0.147429 -0.31297 0.938251
+-0.5 -0.153748 0.157446 1 0 0
+-0.159882 0.371795 -0.103088 0 1 0
+0.5 -0.147826 -0.240202 1 0 0
+0.124961 0.371795 0.0201864 0 1 0
+-0.0856043 -0.0362303 -0.333333 0 0 1
+-0.298222 -0.371795 -0.301744 0 1 0
+0.141109 -0.360291 0.236479 0.999992 0.00407433 -0.000323316
+-0.293761 -0.371795 0.305557 0 1 0
+0.191203 0.113531 -0.333333 0 0 1
+0.320513 0.121298 -0.371754 0.699826 -0.0378617 0.71331
+-0.218717 0.239072 0.365333 -0.344075 0.928968 0.136496
+-0.103618 0.371795 0.0540853 0 1 0
+0.170727 -0.371795 0.271363 0 1 0
+-0.376576 -0.371795 0.0480583 0 1 0
+0.141764 -0.230897 -0.340136 -0.0662804 0.955489 -0.287485
+-0.30994 -0.026362 0.371795 0 0 1
+0.5 -0.131127 0.163659 1 0 0
+-0.5 -0.106581 0.170934 1 0 0
+-0.174973 -0.28993 0.320513 0 0 1
+0.472694 0.217036 0.320513 0 0 1
+0.199646 -0.371795 -0.2421 0 1 0
+0.203831 0.0272475 -0.0893012 -0.698168 0.715742 0.0165785
+-0.297598 0.371795 0.0601428 0 1 0
+-0.0281199 0.371795 0.30732 0 1 0
+-0.258522 0.237659 -0.371795 -0.023605 0.182254 0.982968
+0.335849 -0.149183 0.333493 0.800546 -0.599272 0
+-0.0395579 0.272949 -0.371795 0 0 1
+-0.197363 0.0279972 -0.194449 0.770297 0.637629 -0.0084346
+-0.364289 -0.371795 0.318831 -0.0085979 0.82174 -0.569798
+-0.179843 0.369428 -0.371795 0.582494 -0.45049 0.676579
+-0.353179 -0.190154 0.320513 0 0 1
+0.013896 0.371795 0.0784448 0 1 0
+0.448718 -0.328637 0.261337 1 0 0
+-0.389549 -0.154356 -0.371795 0 0 1
+0.354823 -0.0594884 0.371795 0 0 1
+0.5 0.12477 0.0540653 1 0 0
+-0.5 -0.0755443 0.293598 1 0 0
+0.5 0.0272323 0.129912 1 0 0
+0.402496 0.294872 0.309201 0 1 0
+0.5 -0.192634 0.00231903 1 0 0
+0.276871 -0.371795 0.201369 0 1 0
+-0.194344 -0.371795 -0.00962428 0 1 0
+-0.187194 0.359732 0.320513 0 0 1
+0.148085 0.294872 -0.186694 0.1851 0.982612 -0.0145128
+-0.5 0.0860373 -0.112198 1 0 0
+-0.300898 0.0189605 0.371795 0 0 1
+-0.0484214 -0.250547 0.371795 0.105361 -0.376865 0.920257
+0.5 -0.134812 -0.0244366 1 0 0
+-0.204869 -0.244237 0.353593 0.338389 0.941006 0
+0.5 0.161334 0.0443902 1 0 0
+0.328336 -0.159218 0.346507 0.80053 -0.599292 0
+0.287064 -0.0665861 -0.333333 0 0 1
+0.31954 -0.0809076 0.371795 0 0 1
+-0.5 -0.128875 -0.107083 1 0 0
+-0.243879 -0.371795 0.229744 0 1 0
+-0.0190856 -0.159458 -0.333333 0 0 1
+-0.5 0.105767 -0.350603 1 0 0
+0.490861 0.294872 -0.0429562 0 1 0
+-0.251711 0.171605 -0.333333 0 0 1
+0.0446295 0.371795 -0.304399 0 1 0
+-0.5 -0.0441972 -0.156097 1 0 0
+-0.0218701 0.162672 0.320513 0 0 1
+-0.283539 0.371795 0.296844 0 1 0
+0.265239 -0.371795 0.149234 0 1 0
+0.400358 0.221863 -0.371795 0 0 1
+0.5 -0.0461099 -0.0790711 1 0 0
+-0.5 -0.0713026 0.201557 1 0 0
+-0.00273947 0.204555 0.33799 0 1 0
+-0.272926 -0.0104455 -0.0794742 0.967303 0.253395 -0.0107815
+0.409329 0.0417837 -0.371795 0 0 1
+-0.298636 0.371795 -0.149867 0 1 0
+-0.00356883 -0.173328 -0.333333 0 0 1
+0.141109 -0.357457 -0.0574451 1 0 0
+-0.0163388 0.371795 0.315042 0.0899333 0.973322 0.211082
+-0.419816 -0.371795 -0.114068 0 1 0
+0.477549 -0.0357598 0.320513 0 0 1
+-0.186513 -0.364776 -0.371795 -0.127445 0.278539 0.951932
+-0.394617 -0.371795 0.157525 0 1 0
+0.277876 -0.371795 0.170175 0 1 0
+0.481326 0.294872 -0.354613 0 1 0
+-0.185202 0.0772671 0.320513 0.582368 -0.279808 0.763252
+-0.173973 -0.371795 0.0995357 0 1 0
+-0.150779 -0.371795 0.199767 0 1 0
+-0.248636 -0.0768579 0.371795 0 0 1
+0.5 0.29031 -0.0632165 0.982789 0.180942 -0.0372369
+0.141109 -0.32362 -0.324893 1 0 0
+-0.363369 0.371795 -0.215359 0 1 0
+-0.119871 -0.294872 -0.13354 0 1 0
+-0.435864 0.119135 -0.371795 0 0 1
+-0.0148422 -0.266707 -0.371795 0 0 1
+-0.141154 -0.367131 0.28629 0.920377 -0.389358 -0.0361331
+-0.5 -0.122815 -0.115792 1 0 0
+-0.0680391 -0.189076 -0.333333 0 0 1
+0.338718 -0.166589 0.320513 0 0 1
+0.5 -0.201949 -0.206791 1 0 0
+-0.476174 0.371795 -0.331169 0 1 0
+0.5 -0.115388 -0.0988571 1 0 0
+0.5 0.0821288 -0.0356691 1 0 0
+-0.140427 0.371795 0.200029 0 1 0
+-0.320513 0.0983638 -0.342341 0.999639 0.0186297 -0.0193637
+-0.251569 0.223894 0.330883 -0.479244 0.877682 0
+0.5 0.0725397 -0.181083 1 0 0
+-0.5 0.229465 0.0398762 1 0 0
+-0.5 0.238329 -0.272803 1 0 0
+-0.284356 -0.371795 0.158963 0 1 0
+-0.0752103 -0.0191044 0.320513 0 0 1
+-0.5 0.0595137 -0.207708 1 0 0
+0.5 0.0224551 -0.20256 1 0 0
+0.356874 0.294872 0.239539 0 1 0
+-0.246716 0.371795 -0.169339 0 1 0
+-0.0220187 0.27662 0.320513 0 0 1
+0.262375 -0.0109846 0.371795 0 0 1
+-0.384616 -0.361248 -0.371795 0 0 1
+-0.5 0.289578 -0.315507 1 0 0
+-0.5 0.0869792 0.0335688 1 0 0
+0.5 -0.232188 0.147163 1 0 0
+-0.5 0.151482 -0.0465419 1 0 0
+-0.349684 -0.371795 -0.276298 0 1 0
+-0.494063 0.312867 0.320513 -0.302472 -0.00796055 0.953125
+0.133474 -0.294872 -0.0525909 0.0205056 0.999772 0.00587658
+-0.313538 -0.0420426 -0.333333 -0.114282 0.0363092 0.992785
+0.155692 0.271051 -0.371795 0 0 1
+-0.445637 0.371795 0.229494 0 1 0
+-0.250175 0.371795 0.0109352 0 1 0
+-0.277417 -0.371795 -0.218329 0 1 0
+-0.252935 -0.371795 -0.0474501 0 1 0
+0.286192 0.294292 0.320513 0.0217005 0.648882 0.760579
+0.184834 -0.371795 0.308416 0 1 0
+-0.149298 -0.169605 0.371795 0 0 1
+0.131985 -0.294872 0.097318 0.0847362 0.995995 -0.0285227
+0.463335 -0.294872 -0.0285535 0 1 0
+-0.489644 0.371795 -0.0920922 -0.0437453 0.99904 -0.00238262
+0.481789 -0.294872 0.276735 0 1 0
+0.370798 0.165123 0.320513 0 0 1
+-0.5 0.292364 -0.00355821 1 0 0
+0.0119416 0.371795 -0.20204 0 1 0
+-0.5 0.153353 -0.297569 1 0 0
+0.5 0.00756913 -0.13095 1 0 0
+-0.5 -0.204402 0.281815 1 0 0
+-0.175567 -0.251304 0.327841 0.259342 0.892057 -0.370103
+0.159972 -0.25401 0.34054 -0.099142 0.995063 -0.00457803
+0.299696 0.16929 -0.333333 0 0 1
+-0.5 -0.0806672 -0.114781 1 0 0
+0.223311 0.294872 -0.337577 0 1 0
+-0.472773 -0.294872 -0.109156 0 1 0
+-0.349767 -0.355914 -0.371795 0 0 1
+-0.382945 0.109133 -0.371795 0 0 1
+0.482605 0.0540657 -0.371795 0 0 1
+-0.175012 -0.239388 0.371795 0 0 1
+0.24092 0.0369468 -0.00905112 0.24345 0.96991 0.00261324
+-0.448718 -0.360068 -0.0401534 1 0 0
+-0.293753 -0.371795 0.0169147 0 1 0
+0.4228 -0.0656243 -0.371795 0 0 1
+0.5 0.107245 0.0621504 1 0 0
+-0.407274 0.271904 0.320513 0 0 1
+-0.241394 0.154855 0.371795 0 0 1
+0.401748 -0.371795 0.0363868 0 1 0
+-0.5 0.325027 -0.0624592 1 0 0
+-0.164278 -0.230897 -0.365571 -0.0480195 0.987722 -0.148659
+-0.3723 0.371795 -0.312635 0 1 0
+-0.227771 0.00904869 -0.0148048 0.0934899 0.429377 0.898273
+-0.166916 -0.11851 0.322618 0.588014 0.535509 0.606193
+0.274345 0.249456 0.320513 0 0 1
+0.259864 0.294872 0.0274046 0 1 0
+0.329414 -0.371795 -0.112688 0 1 0
+-0.117217 0.371795 -0.0675012 0 1 0
+0.0299142 -0.294872 -0.0388396 0 1 0
+-0.186555 0.371795 -0.160635 0 1 0
+-0.152378 -0.371795 -0.143921 0 1 0
+-0.258755 -0.371795 -0.304349 0 1 0
+-0.446455 -0.182869 0.320513 0 0 1
+-0.31098 -0.154799 0.371795 0 0 1
+-0.233213 -0.153452 -0.333333 0 0 1
+-0.0141254 0.371795 0.279075 0 1 0
+0.263448 -0.217407 0.330828 -0.507292 0.861773 -0.00162424
+-0.141154 -0.302912 0.103703 0.994915 -0.100548 -0.00577751
+0.180642 0.294872 0.0318942 0 1 0
+0.218705 -0.172277 -0.333333 0 0 1
+-0.5 -0.137432 -0.101861 1 0 0
+0.235938 0.0278738 0.00606371 0.114082 0.500642 0.858105
+0.260953 -0.0236937 -0.18464 0.795305 -0.606044 0.0141741
+0.5 0.158904 0.203936 1 0 0
+-0.283103 0.371795 -0.217137 0 1 0
+0.0767571 0.123324 -0.333333 0 0 1
+-0.0252002 -0.294872 0.131267 0 1 0
+-0.25371 -0.0369473 -0.218115 0.545626 0.838029 0
+0.491569 0.294872 0.254247 0.168713 0.984393 -0.050061
+0.448718 -0.362477 0.184953 1 0 0
+-0.224603 -0.371795 -0.274589 0 1 0
+-0.454621 0.371795 -0.301625 0 1 0
+-0.0424827 0.371795 0.00638522 0 1 0
+-0.300325 -0.205611 -0.335207 -0.406073 -0.569778 0.714464
+-0.5 -0.122422 -0.333373 1 0 0
+0.405782 -0.371795 -0.144496 0 1 0
+-0.201731 0.371795 0.15156 0 1 0
+0.169224 -0.371795 -0.189539 0 1 0
+0.167342 0.250977 -0.371795 0 0 1
+-0.5 -0.194541 -0.0901737 1 0 0
+0.196139 -0.0163971 -0.30329 0.907566 0.418834 0.0300394
+0.137739 0.0182155 0.320513 0 0 1
+-0.306964 -0.371795 -0.095308 0 1 0
+-0.0689723 -0.294872 0.236223 0 1 0
+0.448718 -0.352201 -0.333858 1 0 0
+-0.338896 -0.371795 -0.253479 0 1 0
+0.0757341 0.371795 0.286396 0 1 0
+-0.372099 -0.371795 -0.0218747 0 1 0
+0.5 -0.121779 -0.0569194 1 0 0
+0.302907 0.294872 -0.0760423 0 1 0
+0.112495 0.371795 -0.0651893 0 1 0
+-0.141154 -0.337456 -0.108085 1 0 0
+-0.5 0.160239 0.029752 1 0 0
+-0.5 0.151854 0.0461364 1 0 0
+-0.329462 0.295226 -0.371795 0 0 1
+0.141026 0.309637 0.317539 0.879368 -0.0245297 0.47551
+0.164961 0.294872 -0.0267085 0 1 0
+-0.5 0.256468 0.236731 1 0 0
+0.254361 -0.371795 0.307486 0 1 0
+-0.5 0.225073 -0.0778305 1 0 0
+-0.319772 -0.371795 -0.288825 0 1 0
+0.465046 0.294872 0.2749 0 1 0
+0.5 0.225908 0.310465 1 0 0
+0.0216417 0.220575 -0.333333 -0.00846541 0.0434019 0.999022
+-0.190437 0.0540859 -0.333333 0 0 1
+-0.228846 0.0440392 0.371795 0 0 1
+0.196178 0.0585781 0.337808 0.967652 0.25225 0.00444597
+-0.0881294 0.191705 0.371795 0.119431 -0.291643 0.949042
+-0.5 -0.0309724 0.01074 1 0 0
+-0.5 0.184582 0.10789 1 0 0
+0.141026 0.352562 -0.0702724 1 0 0
+0.448718 -0.339866 0.260285 1 0 0
+0.139451 -0.294872 -0.180365 0.437304 0.896122 -0.0757042
+-0.5 0.355818 0.224282 1 0 0
+-0.5 0.145001 0.123048 1 0 0
+0.141026 0.359743 0.318052 0.769185 -0.0168775 0.638803
+-0.151454 0.371795 -0.109067 0 1 0
+0.187333 0.294872 -0.244656 0 1 0
+0.0427527 0.342074 -0.371795 0 0 1
+-0.0815526 0.217746 -0.333333 0 0 1
+0.0993732 -0.294872 -0.148199 0 1 0
+-0.474253 -0.294872 0.0196034 0 1 0
+0.17935 -0.371795 -0.11915 0 1 0
+0.238164 -0.371795 -0.060561 0 1 0
+-0.239478 -0.272921 0.320513 0 0 1
+-0.5 0.253445 -0.354111 1 0 0
+-0.256402 -0.221255 0.328792 0.466314 0.878271 -0.105789
+0.488391 -0.294872 -0.0843761 0 1 0
+-0.0612555 -0.294872 0.156065 0 1 0
+0.153088 0.294872 -0.26965 0 1 0
+-0.337972 0.371795 0.164426 0 1 0
+0.375419 -0.371795 -0.363593 -0.0682497 0.985725 0.153912
+-0.432978 0.0744621 0.320513 0 0 1
+-0.256979 0.371795 0.0485364 0 1 0
+0.18528 -0.371795 0.166932 0 1 0
+0.184927 0.106602 -0.333333 0 0 1
+-0.460179 -0.177756 0.320513 0 0 1
+0.117482 0.371795 -0.0876605 0 1 0
+-0.144039 0.35922 0.320513 -0.044474 0.0824309 0.995604
+0.370947 -0.371795 0.149935 0 1 0
+-0.406208 -0.028199 -0.371795 0 0 1
+-0.448124 -0.0429114 0.320513 0 0 1
+0.235544 0.0258194 0.371795 0 0 1
+0.285132 -0.371795 -0.0756891 0 1 0
+0.104161 0.371795 0.185625 0 1 0
+-0.467743 -0.294872 -0.295409 0 1 0
+0.0940614 0.205382 -0.333333 0 0 1
+0.320513 -0.00319555 -0.336535 0.751864 -0.0142426 0.659164
+-0.0726873 0.0798557 0.320513 0 0 1
+-0.5 0.0352507 -0.238126 1 0 0
+-0.344329 -0.371795 -0.150233 0 1 0
+0.269022 0.0023897 -0.28935 0.998811 0.0406048 0.0269832
+0.5 -0.280854 0.16753 1 0 0
+-0.320513 0.0346917 -0.336137 -0.5431 -0.0152298 0.83953
+0.141109 -0.310095 -0.148734 1 0 0
+-0.146226 -0.317501 0.320513 0.305979 -0.086741 0.948079
+-0.152193 -0.136698 0.361519 0.743577 0.668051 0.0283147
+-0.357323 -0.371795 0.30193 0 1 0
+0.205213 -0.371795 -0.0210625 0 1 0
+-0.230055 -0.246895 0.320513 0 0 1
+0.148768 0.294872 0.128809 0.217632 0.958144 0.185999
+-0.157248 -0.371795 0.274695 0 1 0
+-0.5 -0.0947249 0.0585188 1 0 0
+-0.369729 0.371795 0.2181 0 1 0
+-0.5 -0.112557 0.0782231 1 0 0
+-0.322962 -0.262966 -0.371795 0 0 1
+-0.0268382 -0.0700566 0.320513 0 0 1
+0.477304 0.172832 -0.371795 0 0 1
+-0.5 0.151554 -0.323158 1 0 0
+-0.247937 -0.371795 -0.294962 0 1 0
+0.376529 0.294872 -0.282373 0 1 0
+-0.196577 0.227192 -0.333333 0.0041132 0.73767 0.675149
+0.0950458 0.132382 0.320513 0 0 1
+0.448718 -0.301158 -0.204665 0.966788 -0.212997 0.141258
+-0.492068 -0.108997 -0.371795 0.168223 0.0065567 0.985727
+0.066808 -0.294872 0.0316251 0 1 0
+-0.111636 -0.222167 -0.333333 0.0239506 -0.111591 0.993466
+-0.291159 0.371795 -0.27823 0 1 0
+-0.320513 0.104068 -0.351827 1 0 0
+-0.255085 0.0359847 -0.294461 -0.574695 0.818221 -0.0154987
+-0.0102156 0.371795 0.0534952 0 1 0
+0.408475 -0.371795 -0.0924172 0 1 0
+-0.338721 0.371795 0.0559572 0 1 0
+0.0514598 0.29692 -0.371795 0 0 1
+0.5 -0.124881 0.253399 1 0 0
+-0.5 -0.262444 0.252258 1 0 0
+0.179431 0.260454 0.320513 0.0253845 0.0548838 0.99817
+0.0445215 -0.294872 -0.0419173 0 1 0
+-0.433248 0.371795 -0.265146 0 1 0
+0.141109 -0.341764 0.0902118 1 0 0
+-0.355497 -0.0943681 -0.371795 0 0 1
+0.393183 0.294872 0.186326 0 1 0
+-0.149628 0.128546 0.320513 0.151872 -0.258987 0.953866
+-0.160548 0.0263674 0.320513 0 0 1
+0.236433 -0.0100492 0.371795 0 0 1
+0.329248 0.24294 0.320513 0 0 1
+0.356313 -0.371795 0.138896 0 1 0
+-0.0217728 -0.294872 -0.216379 0 1 0
+0.465006 -0.294872 -0.280366 0 1 0
+-0.5 -0.0220837 0.0821498 1 0 0
+0.5 0.0255765 0.0778598 1 0 0
+-0.311387 -0.216155 -0.371795 0 0 1
+-0.448718 -0.353281 -0.109968 1 0 0
+0.246191 -0.231133 0.320513 0.266899 -0.335943 0.903276
+-0.5 -0.0209832 0.236869 1 0 0
+0.36774 -0.00530552 -0.371795 0 0 1
+-0.26191 0.156233 -0.333333 0 0 1
+0.439489 0.294872 0.0403655 0 1 0
+0.421806 0.157805 -0.371795 0 0 1
+0.448718 -0.29501 0.00272709 -0.450098 0.887685 0.0971002
+0.0549597 0.336557 0.320513 0 0 1
+-0.448718 -0.350353 0.281238 1 0 0
+-0.226938 -0.371795 0.303035 0 1 0
+-0.5 0.247301 0.213443 1 0 0
+0.141109 -0.363834 0.295213 0.976489 0.213484 -0.0299024
+0.448718 -0.339056 -0.298142 1 0 0
+0.118339 -0.247792 0.371795 0.0147453 -0.107165 0.994132
+-0.220493 -0.0422021 -0.298721 -0.244168 0.969666 -0.0113804
+0.380896 0.0556037 0.320513 0.764504 0.23596 0.599881
+0.352817 0.0693906 0.371795 0 0 1
+0.141026 0.334826 -0.0774252 1 0 0
+0.402355 -0.371795 -0.255365 0 1 0
+-0.0428318 -0.200237 0.364515 0.179271 0.982331 0.0537373
+-0.320513 0.00420408 -0.341352 0.960493 0.0247195 -0.277203
+-0.0103335 0.324713 -0.371795 0 0 1
+-0.313616 -0.371795 0.154545 0 1 0
+0.12588 0.226229 -0.333333 -0.108618 0.276272 0.954922
+0.215473 0.294872 -0.159124 0 1 0
+-0.373929 -0.0649199 -0.371795 0 0 1
+0.452345 -0.294872 -0.176918 -0.268316 0.96167 0.0565491
+0.0499038 0.175212 -0.333333 0 0 1
+-0.5 0.0215292 0.128164 1 0 0
+0.259483 0.176116 -0.333333 0 0 1
+0.259465 -0.0254892 -0.23388 0.758561 -0.651378 -0.0171044
+0.232357 -0.100322 -0.333333 0 0 1
+-0.5 0.218517 0.0118264 1 0 0
+0.0778594 -0.294872 -0.105073 0 1 0
+-0.448718 -0.362489 -0.253038 0.999947 0.00986961 -0.00308582
+0.136203 0.371795 0.0968286 0.34154 0.934719 -0.0982366
+-0.310064 -0.0953833 0.371795 0 0 1
+-0.480014 0.244079 -0.371795 0 0 1
+-0.141154 -0.362152 -0.217112 1 0 0
+0.451098 -0.0405595 0.320513 0 0 1
+0.00685201 0.371795 0.129889 0 1 0
+0.175482 -0.371795 -0.305597 0 1 0
+0.5 -0.172751 0.217199 1 0 0
+-0.224085 0.371795 0.260654 0 1 0
+0.320086 -0.371795 -0.183614 0 1 0
+0.448718 -0.371261 -0.103976 -0.547471 0.836453 -0.0249215
+0.0807447 0.371795 -0.183271 0 1 0
+-0.5 0.116678 0.107804 1 0 0
+0.310369 -0.371795 0.121704 0 1 0
+-0.0980263 -0.155361 0.320513 0 0 1
+-0.283078 -0.203384 0.353741 0.599287 0.800534 0
+0.448718 -0.357163 0.00266805 1 0 0
+-0.187582 0.00460127 -0.293808 0.995552 0.0929461 0.0153995
+0.454822 0.134507 -0.371795 0 0 1
+0.115742 -0.294872 0.0484601 0 1 0
+0.0656835 -0.294872 -0.327983 0 1 0
+0.405263 0.294872 -0.333175 0 1 0
+-0.380237 0.044021 0.344121 0.979888 -0.199525 -0.00309385
+0.149872 0.294872 -0.160262 0.109002 0.992922 -0.0471595
+0.5 0.18064 0.100057 1 0 0
+-0.141154 -0.339338 -0.0168842 1 0 0
+-0.418069 0.369072 -0.371795 0.000213311 -0.394972 0.918693
+-0.5 -0.27463 -0.319244 1 0 0
+-0.145721 0.371795 0.25574 0 1 0
+0.48921 0.180435 -0.371795 -0.0425596 0.00360083 0.999087
+0.395691 -0.277037 -0.371795 0 0 1
+0.260063 -0.212317 0.371795 0.0664524 -0.139847 0.987941
+-0.5 0.0152514 0.0857518 1 0 0
+-0.267059 0.227019 -0.363525 -0.311408 0.872652 0.37617
+0.00696141 -0.294872 -0.062063 0 1 0
+-0.0144495 0.371795 -0.252721 0 1 0
+0.470794 0.294872 0.251698 0 1 0
+0.290214 0.294872 -0.120446 0 1 0
+-0.352657 -0.355766 0.320513 0 0 1
+0.5 0.0368987 -0.215623 1 0 0
+-0.26952 0.0248465 0.371795 0 0 1
+-0.0863957 0.371795 -0.35992 0 1 0
+0.5 -0.275275 -0.312804 1 0 0
+0.338749 -0.371795 0.131805 0 1 0
+0.186421 0.0421962 -0.333333 0 0 1
+-0.314446 -0.322211 0.320513 0 0 1
+0.0054557 0.371795 0.194921 0 1 0
+0.253768 0.123839 -0.333333 0 0 1
+-0.285531 -0.080181 0.371795 0 0 1
+-0.302444 -0.0503512 0.371795 0 0 1
+0.360503 -0.371795 -0.277584 0 1 0
+-0.320513 0.0821503 -0.339344 0.925436 0.107757 -0.363259
+-0.5 -0.283927 0.165493 1 0 0
+-0.5 -0.0836511 -0.218226 1 0 0
+-0.448718 -0.359671 -0.169888 1 0 0
+-0.17753 -0.102265 0.35356 0.851588 0.524191 -0.0046406
+-0.407682 -0.371795 -0.250348 0 1 0
+0.5 -0.0449123 0.186577 1 0 0
+-0.0723221 -0.291176 -0.371795 0.0230281 0.245775 0.969053
+-0.5 -0.00216218 -0.211586 1 0 0
+-0.435544 -0.371795 -0.0643378 0 1 0
+0.0351929 -0.294872 0.25926 0 1 0
+0.436555 -0.371795 -0.288181 0 1 0
+-0.448718 -0.34853 0.0270316 1 0 0
+0.484599 0.0837762 0.320513 0 0 1
+0.281164 0.0894348 0.371795 0 0 1
+0.209132 0.294872 0.273076 0 1 0
+0.00917497 -0.294872 -0.181756 0 1 0
+-0.400526 0.371795 0.164563 0 1 0
+-0.0237985 -0.210575 0.371795 0.0314187 0.0683962 0.997163
+-0.5 0.273078 0.232377 1 0 0
+-0.5 0.243355 0.280429 1 0 0
+-0.189812 -0.0149167 -0.0563152 0.936304 -0.351086 0.00857868
+-0.259159 0.371795 0.193402 0 1 0
+0.449536 0.294872 0.301367 0 1 0
+0.448718 -0.35716 -0.0695498 1 0 0
+-0.264139 0.0280412 -0.179522 0.748951 -0.662224 0.0230751
+-0.448718 -0.295128 -0.052615 0.763566 0.570576 -0.302341
+0.248388 0.294872 0.172568 0 1 0
+0.412318 0.294872 0.306341 0 1 0
+-0.318852 0.255484 0.320513 0 0 1
+-0.448718 -0.329699 -0.0825044 1 0 0
+-0.376932 -0.217878 -0.371795 0 0 1
+0.0820322 -0.294872 0.162075 0 1 0
+-0.26113 0.371795 0.249206 0 1 0
+0.5 0.0962627 0.219416 1 0 0
+0.0512419 -0.294872 -0.168604 0 1 0
+-0.19843 0.0496862 0.360731 0.969397 -0.245499 0
+-0.214607 -0.371795 0.270051 0 1 0
+0.5 -0.151824 0.137555 1 0 0
+-0.306578 0.291875 0.320513 0 0 1
+-0.29174 -0.371795 -0.294912 0 1 0
+-0.4122 -0.31062 -0.371795 0 0 1
+-0.5 -0.130912 -0.0331013 1 0 0
+-0.5 0.183201 0.00778888 1 0 0
+0.5 0.138646 0.260655 1 0 0
+0.421734 -0.255446 -0.371795 0 0 1
+0.5 -0.17309 -0.133801 1 0 0
+0.199239 -0.306873 0.320513 0 0 1
+0.0587825 -0.294872 -0.234235 0 1 0
+0.5 -0.193763 0.247416 1 0 0
+0.141109 -0.363407 -0.268501 0.994955 0.0984135 0.0194887
+-0.35726 -0.249824 -0.371795 0 0 1
+-0.448718 -0.370285 0.0515343 0.690969 0.722608 -0.0199762
+-0.0123094 0.141612 0.320513 0 0 1
+-0.380039 0.371795 0.230633 0 1 0
+0.272253 -0.371795 -0.00838617 0 1 0
+0.0585581 -0.0072473 0.320513 0 0 1
+0.219635 0.294872 -0.188034 0 1 0
+0.0774214 0.371795 -0.289523 0 1 0
+-0.270797 0.371795 0.241933 0 1 0
+0.41833 -0.371795 0.068108 0 1 0
+-0.191325 0.371795 -0.0660071 0 1 0
+0.479526 -0.294872 0.147627 0 1 0
+-0.122384 0.371795 -0.013633 0 1 0
+0.213543 -0.262919 0.320513 0 0 1
+-0.0741846 -0.109236 -0.333333 0 0 1
+0.126528 0.0832477 -0.333333 0 0 1
+-0.388169 -0.371795 -0.145082 0 1 0
+-0.5 -0.151096 -0.0145202 1 0 0
+-0.0490421 0.371795 -0.317469 0 1 0
+-0.5 -0.255617 0.268283 1 0 0
+-0.354887 -0.105431 -0.371795 0 0 1
+-0.5 0.100494 -0.0814753 1 0 0
+0.348594 0.172871 -0.371795 0 0 1
+-0.448718 -0.340411 -0.261705 1 0 0
+0.24697 0.00708311 0.371795 0 0 1
+0.00619626 -0.294872 0.277451 0 1 0
+-0.286834 -0.371795 -0.067386 0 1 0
+0.089114 -0.294872 0.121773 0 1 0
+0.399378 -0.173924 -0.371795 0 0 1
+0.291125 0.205473 0.320513 0.3699 0.349493 0.86083
+-0.441177 -0.371795 -0.131976 0.225419 0.972863 -0.0521874
+-0.141154 -0.306062 0.118725 1 0 0
+0.456297 -0.294872 -0.121524 -0.247731 0.966434 -0.0680849
+0.0351716 -0.146336 0.320513 0 0 1
+-0.5 0.329914 0.304264 1 0 0
+0.5 0.285692 -0.0110155 0.998666 0.0507498 -0.00949979
+-0.258715 -0.0334431 -0.327096 0.652278 0.661764 -0.369596
+0.201396 0.0248122 -0.114759 0.76266 -0.645994 -0.0322726
+-0.442381 0.371795 0.138206 0 1 0
+-0.458042 -0.294872 0.00349128 0.0475407 0.998758 0.0148898
+0.089232 -0.184298 0.338549 -0.469263 0.883059 0
+0.331134 0.294872 0.0800904 0 1 0
+0.5 0.126257 0.23038 1 0 0
+-0.394494 -0.371795 -0.278335 0 1 0
+0.0648234 -0.0409735 -0.333333 0 0 1
+-0.113986 0.230897 -0.344274 -0.00140204 0.999878 0.0155293
+0.351323 0.294872 0.0200549 0 1 0
+-0.0452723 -0.197349 -0.333333 0 0 1
+0.492656 0.294872 -0.0993455 0.0936258 0.993427 -0.0658589
+0.496102 -0.294872 0.027262 -0.258938 0.965883 0.00457722
+-0.448718 -0.349108 -0.207277 1 0 0
+0.5 -0.19638 -0.333713 1 0 0
+-0.361444 -0.371795 -0.231126 0 1 0
+0.254233 -0.371795 0.286259 0 1 0
+0.171122 -0.371795 -0.212069 0 1 0
+-0.342408 0.14042 0.370468 0.717667 -0.492353 -0.492487
+0.5 0.13445 0.149559 1 0 0
+-0.5 0.327133 0.0390175 1 0 0
+-0.243453 0.134764 -0.333333 0 0 1
+0.354221 -0.371795 -0.354296 0 1 0
+0.320513 -0.0927504 -0.368951 0.767778 -0.193573 0.610776
+-0.5 -0.0739359 0.00492572 1 0 0
+-0.411751 -0.335558 -0.371795 0 0 1
+0.424162 -0.311713 0.320513 0 0 1
+-0.244195 -0.328143 -0.371795 0 0 1
+-0.404544 -0.175967 0.320513 0 0 1
+0.141026 0.305664 0.260528 1 0 0
+0.165296 -0.202892 0.371795 0 0 1
+-0.5 0.212829 0.218257 1 0 0
+0.215602 0.275591 -0.371795 0 0 1
+0.196282 0.279056 -0.371795 0 0 1
+-0.272038 -0.0137575 -0.162422 0.948262 0.316952 -0.0184815
+-0.400519 -0.371795 0.282156 0 1 0
+-0.320513 -0.128948 -0.348871 1 0 0
+-0.10637 0.371795 -0.163745 0 1 0
+0.373109 0.0375356 0.371795 0.0993317 0.0442198 0.994071
+-0.192198 0.0200336 -0.317637 0.897086 0.441662 -0.0130991
+-0.160556 0.127614 0.366437 0.766056 -0.641487 0.0406553
+-0.42607 0.146931 0.320513 0 0 1
+0.187514 0.294872 0.0613939 0 1 0
+-0.385394 -0.371795 0.315904 0.0829674 0.897412 -0.433322
+-0.5 0.109359 -0.311039 1 0 0
+-0.152957 -0.0712121 0.320513 0 0 1
+0.280525 0.294872 0.246469 0 1 0
+0.0630988 -0.294872 0.254546 0 1 0
+0.0993294 -0.0374876 0.320513 0 0 1
+-0.247431 0.123462 -0.333333 0 0 1
+0.240967 -0.230897 -0.340658 -0.0515652 0.986597 -0.154816
+-0.300322 -0.20371 -0.333333 -0.348547 -0.370002 0.86117
+-0.330721 -0.311414 0.320513 0 0 1
+-0.5 0.300306 -0.354941 1 0 0
+0.300353 -0.371795 0.0143892 0 1 0
+0.242437 -0.371795 0.213301 0 1 0
+0.349174 0.118719 -0.371795 0 0 1
+0.361526 -0.169749 -0.371795 0 0 1
+0.5 -0.069834 -0.354643 1 0 0
+0.5 -0.241352 0.0492856 1 0 0
+-0.124956 0.371795 -0.0805557 0 1 0
+0.141565 0.294872 -0.309315 0.704054 0.71014 -0.00301223
+-0.5 0.207966 0.0544582 1 0 0
+0.485876 -0.0961374 -0.371795 0 0 1
+0.443615 -0.371795 -0.333761 -0.251272 0.963735 -0.0898788
+0.015068 -0.294872 -0.13133 0 1 0
+-0.17268 0.371795 -0.0691992 0 1 0
+0.430077 0.294872 -0.170761 0 1 0
+-0.447697 -0.371795 -0.0836384 0.612079 0.785478 -0.091558
+-0.1667 -0.3315 -0.371795 0 0 1
+-0.448918 0.371795 -0.0543783 0 1 0
+-0.117854 0.123666 0.320513 0 0 1
+-0.0118107 0.371795 -0.0211119 0 1 0
+-0.295944 0.371795 0.145333 0 1 0
+0.422044 0.193478 0.320513 0 0 1
+-0.5 -0.0990624 -0.167252 1 0 0
+0.187135 -0.371795 -0.170746 0 1 0
+0.5 -0.126252 0.290591 1 0 0
+0.342444 0.0394534 -0.371795 0 0 1
+-0.5 -0.0350354 -0.0549618 1 0 0
+0.141109 -0.357129 -0.112598 1 0 0
+-0.5 0.0127096 0.23223 1 0 0
+0.5 0.150279 -0.125349 1 0 0
+0.0675176 0.193095 0.369804 0.311505 0.778229 -0.545274
+0.5 -0.170462 -0.332012 1 0 0
+0.5 -0.0570603 0.240634 1 0 0
+0.132085 0.328407 -0.371795 -0.209738 -0.014234 0.977654
+-0.291712 0.371795 -0.194378 0 1 0
+0.141026 0.31666 0.167841 1 0 0
+0.339884 -0.371795 -0.0745664 0 1 0
+-0.233728 -0.371795 -0.19536 0 1 0
+-0.0219591 0.256282 0.324165 0.0853235 0.96008 0.266396
+0.164348 0.274235 -0.371795 0 0 1
+-0.360143 0.371795 -0.0830515 0 1 0
+0.226369 0.0380765 -0.262052 -0.0872572 0.995863 -0.025365
+-0.5 -0.186216 -0.310436 1 0 0
+-0.235927 0.0404537 0.371795 0 0 1
+-0.265618 0.371795 0.180598 0 1 0
+-0.0922706 0.371795 0.102746 0 1 0
+0.196901 0.0180309 -0.198243 0.904616 -0.426155 0.00791122
+-0.0634089 0.325313 -0.371795 0 0 1
+0.169897 -0.195864 -0.333333 0 0 1
+0.141109 -0.364062 -0.0855964 0.995401 0.0953844 -0.00884189
+-0.131485 -0.15235 -0.333333 0 0 1
+-0.5 0.0469359 -0.261307 1 0 0
+0.235998 -0.371795 -0.181314 0 1 0
+-0.139062 0.272282 -0.371795 0 0 1
+-0.5 -0.110443 -0.275851 1 0 0
+0.426943 -0.371795 0.265354 0 1 0
+-0.5 0.0665547 0.302388 1 0 0
+0.338621 -0.00974626 0.371795 0 0 1
+0.141026 0.346188 0.114374 1 0 0
+-0.5 0.325835 -0.254125 1 0 0
+0.5 -0.155774 0.0343918 1 0 0
+0.272447 -0.243539 -0.371795 0 0 1
+-0.11778 -0.0845274 0.320513 0 0 1
+0.141109 -0.348227 0.274643 1 0 0
+0.5 -0.0135392 -0.36733 0.936242 0.0617936 -0.34588
+0.5 -0.121461 0.00378978 1 0 0
+-0.5 -0.157045 0.230401 1 0 0
+-0.5 0.294164 -0.143985 1 0 0
+0.30167 -0.371795 -0.178172 0 1 0
+-0.208212 -0.371795 0.0765767 0 1 0
+-0.0951264 0.230897 -0.346202 0 1 0
+0.220126 -0.371795 0.000213903 0 1 0
+-0.5 0.221659 -0.0274181 1 0 0
+-0.448718 -0.300267 -0.36987 0.84398 0.225628 0.48661
+-0.311265 0.371795 -0.36401 -0.0938777 0.969473 -0.226513
+-0.352629 -0.0706788 -0.371795 0 0 1
+-0.245445 -0.145328 0.371795 0 0 1
+0.12378 0.132927 -0.333333 0 0 1
+-0.141154 -0.370455 -0.349285 -0.669039 0.739443 -0.0749046
+0.5 -0.064163 -0.302285 1 0 0
+-0.5 -0.0608403 -0.310952 1 0 0
+-0.278648 -0.243866 -0.371795 0 0 1
+0.0294784 -0.294872 0.145847 0 1 0
+-0.5 -0.0960504 0.141687 1 0 0
+-0.457774 -0.294872 -0.0573502 0.0470856 0.998891 0
+-0.5 0.290766 -0.268025 1 0 0
+0.127333 0.371795 -0.184347 0 1 0
+-0.5 0.336082 -0.130344 1 0 0
+-0.5 0.368996 -0.0598204 0.722785 -0.632482 0.278476
+-0.190964 0.0173877 -0.217766 0.915887 0.401286 0.010995
+-0.151062 -0.251598 0.371795 -0.18973 -0.61216 0.767634
+-0.0943764 0.124602 -0.333333 0 0 1
+0.5 0.19098 0.24614 1 0 0
+-0.469067 -0.294872 -0.0494581 0 1 0
+0.133327 0.321418 0.320513 0.0201282 0.0182993 0.99963
+-0.5 -0.040652 -0.0595347 1 0 0
+0.0869987 -0.230897 -0.350556 0 1 0
+0.223457 -0.371795 0.192299 0 1 0
+0.5 0.173016 -0.22806 1 0 0
+0.336466 0.0663379 0.371795 0 0 1
+0.498946 -0.294872 -0.0765622 0.739522 -0.634984 -0.223389
+0.5 -0.0037649 -0.254415 1 0 0
+-0.5 -0.1305 0.108031 1 0 0
+-0.224319 -0.371795 -0.012084 0 1 0
+-0.328348 -0.0800328 0.371795 0 0 1
+-0.0203925 -0.234993 0.371795 0 0 1
+-0.297461 -0.339235 -0.371795 0 0 1
+0.0178083 0.209297 0.371795 0.0284835 -0.16468 0.985936
+0.262852 -0.371795 -0.243861 0 1 0
+0.118656 -0.21503 -0.333333 0 0 1
+0.100795 0.289902 0.320513 0 0 1
+0.382634 0.294872 0.00367783 0 1 0
+0.35527 0.155087 0.320513 0 0 1
+-0.266498 0.0246818 -0.057169 0.822706 -0.568207 0.0171727
+-0.34737 0.259217 0.320513 0 0 1
+-0.0266335 0.371795 -0.195093 0 1 0
+-0.228376 -0.365196 -0.371795 0.00371608 0.0910622 0.995838
+0.342669 -0.210034 0.320513 0 0 1
+0.128761 -0.294872 -0.333745 0 1 0
+-0.021402 -0.294872 -0.252419 0 1 0
+0.263617 0.294872 -0.173986 0 1 0
+0.0942932 -0.240126 0.371795 0 0 1
+-0.5 0.346479 -0.246937 1 0 0
+0.445584 0.294872 -0.172512 0 1 0
+0.0936077 -0.294872 -0.308721 0 1 0
+0.497422 -0.294872 -0.150425 -0.448021 0.873634 0.189846
+-0.5 0.287931 0.00906381 1 0 0
+-0.235882 -0.141032 -0.333333 0 0 1
+0.5 0.0213574 -0.206934 1 0 0
+-0.457427 -0.294872 -0.172908 0.162454 0.986647 0.0117226
+-0.350483 0.308885 -0.371795 0 0 1
+0.304086 0.294872 -0.22909 0 1 0
+-0.279594 0.303454 -0.371795 0 0 1
+0.5 -0.182657 -0.118877 1 0 0
+-0.160932 -0.253941 0.357932 0.0911289 0.995839 -0.000458255
+0.151747 -0.106692 -0.333333 0 0 1
+0.5 0.0674282 0.11042 1 0 0
+-0.5 -0.271974 -0.192747 1 0 0
+0.311215 -0.371795 -0.192793 0 1 0
+-0.387018 0.178863 -0.371795 0 0 1
+-0.373138 0.0906002 -0.371795 0 0 1
+-0.0981952 -0.294872 -0.116877 0 1 0
+0.419218 0.122208 -0.371795 0 0 1
+-0.187828 -0.00740699 -0.23577 0.990499 -0.137482 -0.00309932
+0.0999153 0.178517 0.350041 0.475938 0.879479 0
+-0.5 -0.197117 -0.241197 1 0 0
+0.5 0.188936 -0.291501 1 0 0
+0.424466 -0.371795 -0.30737 0 1 0
+-0.328279 -0.205393 0.320513 0 0 1
+-0.186986 -0.371795 -0.319822 0 1 0
+0.5 -0.172905 -0.096172 1 0 0
+-0.101538 0.371795 -0.00586877 0 1 0
+0.442258 0.294872 0.287958 0 1 0
+0.159003 -0.371795 0.102853 0 1 0
+-0.489994 -0.22633 0.320513 -0.00897745 0.00212079 0.999957
+0.304947 -0.0297864 -0.333333 0 0 1
+-0.129403 0.371795 0.179593 0 1 0
+-0.0454662 -0.206785 0.371795 0.0420281 0.156689 0.986753
+-0.5 0.0156299 0.144501 1 0 0
+0.296671 0.150157 0.371795 0 0 1
+0.231662 0.0383834 -0.233594 0.021989 0.999635 0.0157295
+-0.24823 -0.0397709 -0.155555 0.37894 0.92542 0.00177566
+0.5 0.288003 0.0105963 0.984032 0.164781 -0.067298
+-0.170206 -0.142739 -0.333333 0 0 1
+0.454038 -0.193965 -0.371795 0 0 1
+-0.438897 0.363566 0.320513 -0.048283 0.123653 0.99115
+0.279876 -0.212005 0.320513 0.188677 -0.272382 0.943509
+0.483364 0.294872 -0.0793254 0 1 0
+0.059975 0.371795 -0.184302 0 1 0
+-0.0467919 -0.294872 -0.0355196 0 1 0
+-0.477887 -0.294872 0.0140669 0 1 0
+0.295665 0.294872 -0.181712 0 1 0
+0.229605 -0.0383596 -0.193239 0.0266046 0.999638 -0.00403595
+0.0461032 0.256282 0.356228 0 1 0
+0.499247 -0.12262 -0.371795 -0.448791 0.0265854 0.893241
+0.44649 -0.371795 -0.108022 0.675669 -0.703264 0.221113
+-0.338361 0.145827 0.353468 0.800534 -0.599288 0
+0.272085 0.0381511 0.371795 0 0 1
+-0.448944 -0.294501 -0.371795 0.29029 0.237243 0.927064
+-0.5 -0.0646472 0.00682029 1 0 0
+-0.37905 0.0411653 0.371795 -0.548581 0.30338 0.779115
+-0.263572 0.0400526 0.371795 0 0 1
+0.458837 0.294872 0.228972 0 1 0
+-0.0852535 -0.171682 -0.333333 0 0 1
+-0.415068 0.0526896 0.320513 0 0 1
+-0.474896 -0.112639 0.320513 0 0 1
+-0.331509 -0.340107 -0.371795 0 0 1
+-0.104584 0.102157 0.320513 0 0 1
+-0.00137109 -0.204555 0.332154 0 1 0
+-0.129428 0.371795 -0.145792 0 1 0
+0.24728 -0.21918 -0.333333 0 0 1
+-0.424486 0.371795 0.128222 0 1 0
+-0.0390173 0.252495 0.371795 0.0487064 0.354089 0.933942
+-0.46347 0.371795 0.112744 0 1 0
+0.5 0.264522 0.303642 1 0 0
+0.19129 0.294872 -0.127527 0 1 0
+0.00437299 0.371795 -0.0716476 0 1 0
+-0.379737 0.0463189 0.331122 0.976203 -0.206594 -0.0659294
+0.0615975 0.183531 0.320513 -0.0833317 -0.151668 0.984912
+-0.491485 0.371795 -0.0785889 -0.173565 0.984366 0.0299685
+0.126143 -0.294872 -0.24384 0 1 0
+0.5 0.254067 0.0852289 1 0 0
+-0.298992 0.371795 0.155952 0 1 0
+0.0869473 -0.294872 -0.274923 0 1 0
+0.310067 0.0336291 -0.333333 0.188621 0.00323671 0.982045
+0.304321 0.294872 -0.218298 0 1 0
+0.320513 0.0279609 -0.360563 1 0 0
+-0.0581787 0.140948 0.320513 0 0 1
+0.144228 0.294872 -0.0227974 0.692549 0.690989 -0.207148
+-0.141154 -0.340884 0.0964445 1 0 0
+-0.497274 0.053343 -0.371795 0.704479 -0.14096 0.695586
+-0.141154 -0.332528 -0.140465 1 0 0
+-0.318782 0.371795 -0.0667671 0 1 0
+-0.00351263 -0.294872 -0.0729962 0 1 0
+-0.5 0.322843 -0.105905 1 0 0
+0.0036092 -0.294872 -0.0550407 0 1 0
+-0.184331 -0.249398 0.332853 0.212548 0.977151 0
+0.00408141 -0.294872 -0.239317 0 1 0
+0.00951932 -0.186273 0.320513 0 0 1
+0.187078 -0.176499 0.371795 0 0 1
+-0.491808 0.371795 -0.0389143 -0.154459 0.987974 0.00706267
+0.264592 0.0181284 -0.237367 0.871556 0.489955 0.0182913
+0.262398 0.021629 -0.1918 0.826081 0.562727 0.0304895
+0.346791 0.167064 -0.371795 0 0 1
+0.127563 -0.0951388 0.320513 0 0 1
+0.00414216 -0.294872 0.27535 0 1 0
+-0.243662 0.371795 -0.310749 0 1 0
+-0.448718 -0.324304 -0.226221 1 0 0
+0.141109 -0.323745 0.115616 1 0 0
+0.215727 0.0188278 0.00860374 -0.294171 0.411139 0.862802
+0.376783 0.294872 0.272977 0 1 0
+0.0425375 0.154698 -0.333333 0 0 1
+0.5 0.151449 -0.020205 1 0 0
+0.5 0.0669705 -0.153073 1 0 0
+0.168052 -0.371795 0.236355 0 1 0
+-0.448718 -0.344209 -0.281458 1 0 0
+0.225438 0.294872 0.0852889 0 1 0
+0.5 -0.0926328 0.165928 1 0 0
+-0.165958 0.230897 -0.366862 0.0447634 0.978985 0.198961
+-0.5 0.00340511 0.135615 1 0 0
+-0.363463 0.176436 -0.371795 0 0 1
+0.141848 -0.371795 -0.0672597 0.72489 0.672144 -0.150857
+-0.394256 -0.290886 0.320513 0 0 1
+0.5 -0.238265 0.0892969 1 0 0
+0.141109 -0.325475 0.0878836 1 0 0
+-0.325133 0.371795 0.296992 0 1 0
+-0.306528 0.303205 0.320513 0 0 1
+0.5 0.182598 0.237939 1 0 0
+0.5 0.154851 -0.186061 1 0 0
+-0.168199 0.371795 0.0881658 0 1 0
+-0.5 0.35022 0.0434186 1 0 0
+0.332358 0.0167194 0.371795 0 0 1
+0.121796 0.148098 0.320513 0 0 1
+0.252005 -0.179084 0.371795 0 0 1
+0.320513 -0.118702 -0.359841 1 0 0
+0.5 -0.0812927 0.139118 1 0 0
+0.0937523 0.371795 -0.119464 0 1 0
+0.5 -0.182456 -0.347567 1 0 0
+-0.5 -0.219727 -0.120789 1 0 0
+0.0444476 0.0671632 0.320513 0 0 1
+-0.5 0.337773 -0.202966 1 0 0
+-0.5 -0.0133948 0.211197 1 0 0
+0.5 -0.0325113 0.0851042 1 0 0
+-0.339008 -0.347738 -0.371795 0 0 1
+0.144708 0.294872 -0.296285 0.426381 0.904453 -0.0128223
+-0.5 -0.0593803 0.115395 1 0 0
+0.119525 0.169393 -0.333333 0 0 1
+-0.0242826 0.154018 0.320513 0 0 1
+0.257863 -0.0270923 -0.172529 0.753399 -0.655325 -0.0542196
+0.465387 -0.294872 0.00365823 0 1 0
+0.0252853 -0.294872 0.190788 0 1 0
+-0.249307 0.371795 0.158562 0 1 0
+-0.490061 0.343328 -0.371795 0.0903038 0.0263209 0.995566
+0.248491 -0.371795 0.066258 0 1 0
+0.0424285 -0.294872 -0.191351 0 1 0
+-0.427364 -0.194579 0.320513 0 0 1
+0.237581 -0.231532 0.326763 -0.428067 0.899892 -0.0833837
+0.297608 0.267793 -0.371795 0 0 1
+0.334793 0.294872 0.0566598 0 1 0
+-0.5 0.0254637 0.277541 1 0 0
+-0.5 0.12528 0.105503 1 0 0
+-0.231971 0.0434847 -0.121569 0.00604021 0.999967 0.00551081
+-0.5 -0.141814 -0.0446054 1 0 0
+0.140551 0.255399 0.324872 -0.0301953 0.88899 0.456929
+0.255841 -0.132265 -0.333333 0 0 1
+0.408205 0.292689 0.320513 -0.0369579 0.525829 0.849787
+-0.42779 -0.299825 0.320513 0 0 1
+0.413609 -0.191725 -0.371795 0 0 1
+0.5 0.267839 -0.00360327 1 0 0
+-0.0201998 0.25138 -0.371795 0 0 1
+0.5 0.00551781 0.0457574 1 0 0
+-0.424627 0.209276 -0.371795 0 0 1
+-0.189723 -0.371795 0.207724 0 1 0
+-0.5 0.366565 -0.331233 0.960552 -0.277934 0.0095754
+-0.141154 -0.348601 0.205111 1 0 0
+-0.445414 -0.371795 0.0662314 0.268021 0.961874 -0.0544256
+-0.0125895 0.371795 -0.0526858 0 1 0
+0.239931 -0.371795 -0.0464052 0 1 0
+-0.5 0.320119 -0.313882 1 0 0
+-0.416378 0.302734 -0.371795 0 0 1
+0.338579 0.294872 0.0570479 0 1 0
+-0.207684 -0.242942 -0.371795 0 0 1
+-0.0557348 -0.230897 -0.35912 0 1 0
+-0.5 0.189651 0.0638665 1 0 0
+0.0744674 -0.249693 0.371795 0.0582746 -0.231008 0.971205
+0.0224948 -0.294872 -0.153009 0 1 0
+0.0712073 -0.134643 0.320513 0 0 1
+0.070549 0.371795 0.174719 0 1 0
+0.267176 0.012167 -0.272288 0.938576 0.34489 -0.0112273
+0.204344 0.231778 0.371795 0 0 1
+-0.278541 0.245278 -0.371795 0 0 1
+0.388219 -0.368525 0.320513 0.0303223 -0.331521 0.94296
+0.396254 -0.371795 0.0897135 0 1 0
+0.141026 0.308219 -0.327148 1 0 0
+0.258378 0.0265764 -0.316071 0.708681 0.705529 0
+0.5 0.0325498 0.0712879 1 0 0
+0.400677 -0.233945 0.320513 0 0 1
+0.141109 -0.35905 0.292663 1 0 0
+0.335624 0.149483 0.328833 0.787841 0.594199 0.161966
+-0.141033 -0.153396 0.371795 0.538191 0.269361 0.798621
+0.5 0.294657 -0.05593 0.396989 0.91763 0.0188561
+0.149857 -0.371795 -0.285996 0.0188708 0.99982 0.00218476
+0.5 0.268922 0.289828 1 0 0
+0.125741 0.235893 0.371795 0 0 1
+0.141026 0.358571 -0.137657 1 0 0
+-0.5 0.0229838 0.16341 1 0 0
+0.407843 -0.098193 -0.371795 0 0 1
+-0.414738 -0.371795 -0.325325 0 1 0
+-0.352995 0.121722 0.344215 0.877687 -0.479235 0
+0.282407 -0.371795 -0.334183 0 1 0
+0.0755277 -0.256282 0.340065 0 1 0
+0.392626 -0.371795 -0.112954 0 1 0
+0.00824016 -0.294872 0.0709874 0 1 0
+0.448718 -0.364831 -0.0262745 0.981236 -0.191699 0.0206959
+0.5 0.187836 -0.327713 1 0 0
+0.0293413 -0.294872 0.268215 0 1 0
+-0.0152264 0.371795 -0.166785 0 1 0
+-0.484814 -0.294872 0.192721 0 1 0
+-0.233398 0.371795 -0.149805 0 1 0
+0.338347 -0.105008 -0.371795 0 0 1
+-0.167843 -0.252984 0.343705 0.181285 0.983422 0.00414338
+-0.17568 0.360887 0.320513 0 0 1
+0.5 -0.247177 -0.12396 1 0 0
+-0.124504 0.371795 -0.0171382 0 1 0
+-0.317814 0.371795 -0.0257562 0 1 0
+0.213355 -0.0341561 -0.164088 0.418427 0.908077 -0.0177681
+0.141026 0.339557 0.274377 1 0 0
+-0.256415 -0.285615 0.320513 0 0 1
+0.5 0.196373 0.281507 1 0 0
+-0.152231 -0.371795 -0.177279 -0.0636787 0.997941 -0.00761342
+0.165159 0.129738 -0.333333 0 0 1
+0.455968 0.294872 0.164028 0 1 0
+0.192349 -0.000466095 -0.0099152 0.998913 0.00130198 -0.0466013
+-0.5 0.22253 -0.00765203 1 0 0
+0.141109 -0.334275 0.146533 1 0 0
+0.212234 0.134319 0.371795 0 0 1
+-0.460716 0.34013 0.320513 0 0 1
+-0.223084 0.0428965 -0.0820194 0.199357 0.979919 0.00388858
+-0.083758 0.371795 -0.115684 0 1 0
+0.271829 0.294872 -0.209882 0 1 0
+0.407484 0.0890383 0.320513 0 0 1
+-0.175549 -0.205498 0.371795 0 0 1
+-0.121097 -0.164959 0.324072 0.548225 0.703293 0.45258
+0.469414 0.24186 -0.371795 0 0 1
+-0.049351 0.371795 -0.040386 0 1 0
+0.0484108 0.145716 -0.333333 0 0 1
+-0.141237 0.371795 -0.0905241 0 1 0
+-0.253293 -0.371795 -0.0282123 0 1 0
+-0.136452 -0.294872 0.198164 -0.181005 0.98289 -0.0341373
+-0.302782 0.371795 -0.235767 0 1 0
+0.107696 0.230897 -0.35704 0 1 0
+0.5 -0.073358 0.148543 1 0 0
+-0.5 0.148323 -0.222212 1 0 0
+-0.0120387 0.0636087 0.320513 0 0 1
+-0.286449 -0.103717 0.371795 0 0 1
+-0.448718 -0.329512 0.144445 1 0 0
+-0.0341425 -0.294872 -0.267417 0 1 0
+-0.417674 0.11976 0.320513 0 0 1
+0.439404 -0.0375213 0.320513 0 0 1
+-0.166048 0.230897 -0.342123 -0.0842935 0.985222 0.149103
+0.432016 -0.371795 0.291956 0 1 0
+-0.187603 -0.00484227 -0.162512 0.990959 -0.133535 0.0129977
+0.415284 0.294872 0.131346 0 1 0
+0.240662 -0.0993165 0.371795 0 0 1
+0.4126 0.0385022 -0.371795 0 0 1
+-0.5 -0.158934 -0.198435 1 0 0
+0.5 -0.033649 -0.120157 1 0 0
+-0.349259 0.323526 -0.371795 0 0 1
+-0.222676 0.371795 0.0570076 0 1 0
+0.211307 -0.10115 0.371795 0 0 1
+-0.270135 0.00739242 -0.0331535 0.724059 -0.133409 -0.676713
+-0.162358 0.191914 -0.333333 0 0 1
+0.144098 -0.276201 -0.371795 0 0 1
+0.5 0.0161483 0.0430907 1 0 0
+-0.00738625 -0.225618 0.371795 0 0 1
+0.0756723 -0.0565325 -0.333333 0 0 1
+0.499871 0.0644063 -0.371795 0.96039 -0.0221562 -0.277778
+-0.0901415 0.13819 0.320513 0 0 1
+0.5 0.00347086 0.0136253 1 0 0
+-0.462493 0.371795 0.248965 0 1 0
+0.5 -0.192219 -0.185355 1 0 0
+-0.448145 -0.171493 0.320513 0 0 1
+-0.229687 -0.043495 -0.308342 -0.0535815 0.997878 -0.0369893
+-0.0889165 -0.294872 -0.246223 0 1 0
+-0.00663808 0.0242028 0.320513 0 0 1
+0.348668 -0.371795 0.2076 0 1 0
+-0.232065 -0.371795 0.198605 0 1 0
+-0.467398 -0.160348 -0.371795 0 0 1
+0.00258656 -0.294872 0.0193359 0 1 0
+-0.485793 0.371795 -0.0981684 0 1 0
+-0.0479419 0.371795 -0.277102 0 1 0
+-0.228585 0.371795 -0.069844 0 1 0
+0.438883 0.294872 0.315081 -0.178665 0.898517 0.400932
+-0.5 0.147759 0.155162 1 0 0
+0.5 0.294117 -0.0753104 0.843054 0.520905 -0.133858
+0.5 0.08974 0.207356 1 0 0
+0.177935 -0.209516 0.371795 0 0 1
+-0.234505 0.371795 -0.15682 0 1 0
+0.467286 -0.114103 0.320513 0 0 1
+-0.236514 0.172458 0.371795 0 0 1
+0.273883 -0.273485 0.320513 0 0 1
+-0.448718 -0.33704 -0.0843974 1 0 0
+-0.322677 -0.110842 -0.371795 -0.153921 -0.113609 0.98153
+0.0775615 -0.160008 -0.333333 0 0 1
+-0.332632 0.371795 0.121572 0 1 0
+0.326581 0.161562 0.339159 0.792949 0.609267 0.00510383
+0.281408 -0.220892 -0.369529 0.421949 -0.526113 0.738352
+-0.394202 0.34617 -0.371795 0 0 1
+0.232374 -0.0792266 0.371795 0 0 1
+0.158354 0.267058 -0.371795 0 0 1
+-0.170777 0.371795 0.030779 0 1 0
+-0.105824 0.371795 0.134828 0 1 0
+0.26892 -0.319128 -0.371795 0 0 1
+0.293001 0.134022 -0.333333 0 0 1
+0.238106 0.230897 -0.364384 0.00797252 0.977241 0.211984
+0.141109 -0.303277 0.317661 0.82783 0.069117 -0.556705
+0.5 -0.0666224 0.124077 1 0 0
+0.5 -0.0977781 0.244978 1 0 0
+0.0479396 0.30563 0.320513 0 0 1
+-0.5 0.0309677 -0.0764183 1 0 0
+-0.0424152 -0.0199882 0.320513 0 0 1
+-0.295186 -0.248278 0.320513 0 0 1
+0.249495 -0.0335442 -0.221982 -0.529078 0.848562 0.00433197
+-0.5 0.260399 0.163402 1 0 0
+-0.10115 -0.256282 0.354386 0 1 0
+0.400226 0.294872 -0.167758 0 1 0
+-0.173838 0.026053 -0.333333 0 0 1
+-0.288147 -0.371795 0.0554049 0 1 0
+0.462904 0.294872 -0.282122 0 1 0
+-0.448718 -0.302069 -0.31709 0.99194 0.108504 -0.0654334
+0.139282 0.371795 -0.0781449 0.304345 0.951714 -0.0401803
+0.0746471 0.371795 0.288543 0 1 0
+0.264336 -0.0186774 -0.0827117 0.886458 -0.46273 0.00858794
+0.0258704 -0.267167 0.320513 0 0 1
+0.5 0.269159 0.106391 1 0 0
+0.154507 0.294872 -0.109608 0 1 0
+0.0631071 -0.294872 0.113211 0 1 0
+-0.321028 -0.371795 -0.160624 0 1 0
+-0.327548 0.135228 -0.371795 -0.259955 0.00715054 0.965594
+0.133724 -0.294872 0.235124 0.118808 0.989748 -0.0792698
+0.244447 -0.316964 -0.371795 0 0 1
+0.5 -0.205167 -0.13516 1 0 0
+0.340845 -0.298572 -0.371795 0 0 1
+-0.317701 0.371795 -0.0791418 0 1 0
+-0.5 -0.0828535 -0.268532 1 0 0
+0.0597892 -0.0527206 -0.333333 0 0 1
+-0.235482 -0.370185 0.320513 -0.00347882 0.796874 -0.604135
+0.268907 0.00369804 -0.180741 0.995829 0.0854773 0.0319104
+-0.5 0.314483 -0.0545938 1 0 0
+-0.340069 0.143544 0.328541 0.75611 -0.600953 -0.25914
+-0.0281125 -0.294872 -0.0182609 0 1 0
+0.5 -0.145412 -0.0580026 1 0 0
+0.242874 -0.0491758 -0.333333 0 0 1
+0.268648 0.00665942 -0.213927 0.988784 0.148661 -0.0143426
+0.261337 0.0231448 -0.280165 0.77702 0.629455 0.00514331
+0.346046 -0.0243496 0.371795 0 0 1
+0.141109 -0.310139 -0.210964 1 0 0
+0.0225755 -0.294872 -0.357755 0 1 0
+-0.167739 0.24474 0.371795 -0.00144383 0.0527325 0.998608
+0.385733 -0.0852824 -0.371795 0 0 1
+-0.22893 0.218796 0.371795 0 0 1
+-0.0545957 0.371795 0.121552 0 1 0
+0.222804 0.100802 0.371795 0 0 1
+0.255861 0.294872 0.0795102 0 1 0
+0.279305 0.242727 -0.371795 0 0 1
+0.289878 -0.371795 -0.00836628 0 1 0
+0.41847 -0.356872 0.320513 0 0 1
+-0.5 0.192916 0.270852 1 0 0
+0.164332 -0.365072 0.320513 -0.00871289 -0.0953099 0.995409
+0.5 0.146737 -0.237402 1 0 0
+0.349129 0.294872 0.19837 0 1 0
+0.5 0.232781 0.0117845 1 0 0
+-0.0787536 -0.294872 -0.162832 0 1 0
+0.415781 -0.106437 0.320513 0 0 1
+-0.323649 -0.259159 -0.371795 0 0 1
+-0.124923 -0.294872 0.214228 0 1 0
+0.264698 -0.216725 0.321145 -0.470549 0.734756 -0.488587
+-0.5 0.258834 0.0821036 1 0 0
+0.158627 -0.371795 0.172998 0 1 0
+-0.5 0.179264 -0.286761 1 0 0
+0.141109 -0.301028 -0.226361 0.984333 0.160175 -0.0737056
+0.5 -0.101902 0.300423 1 0 0
+-0.176107 -0.371795 -0.142428 0 1 0
+0.259387 -0.255708 -0.371795 0 0 1
+-0.320513 0.087674 -0.343205 0.99999 0.000203132 -0.00443864
+0.5 -0.0111978 0.159703 1 0 0
+0.250314 0.0330889 -0.17366 0.498973 0.866559 0.0100629
+-0.324665 -0.371795 -0.172198 0 1 0
+0.213665 -0.230897 -0.363486 -0.0406768 0.994837 -0.0929763
+0.5 -0.0436885 -0.251922 1 0 0
+-0.350921 0.190955 0.320513 0 0 1
+0.0413387 0.371795 0.161318 0 1 0
+0.235913 0.294872 0.167946 0 1 0
+0.352095 0.294872 -0.0191971 0 1 0
+-0.1236 0.0190725 0.320513 0 0 1
+0.5 -0.0843832 -0.341796 1 0 0
+-0.429632 0.371795 0.286363 0 1 0
+-0.220083 0.0623907 -0.333333 0 0 1
+-0.294846 -0.111948 -0.333333 0 0 1
+-0.5 -0.153781 0.168592 1 0 0
+-0.5 -0.0322713 0.0191513 1 0 0
+-0.5 -0.131842 0.243227 1 0 0
+0.141109 -0.369112 -0.260673 0.832667 0.553759 0.00405515
+-0.215139 0.207247 -0.333333 0 0 1
+0.39003 0.294872 0.00577227 0 1 0
+-0.5 0.148295 0.272346 1 0 0
+-0.5 0.0294093 0.214143 1 0 0
+-0.288167 -0.199574 0.350923 0.600509 0.799618 0
+-0.5 -0.255764 0.181785 1 0 0
+0.314408 0.294872 -0.179408 0 1 0
+0.233651 -0.0382093 -0.152719 -0.0269191 0.999557 0.0127071
+0.13776 -0.238115 -0.371795 0.0528916 -0.194335 0.979508
+0.202463 0.02588 -0.0106318 0.748732 -0.662843 0.00630264
+-0.128767 0.299314 0.320513 0 0 1
+-0.285261 -0.371795 0.016115 0 1 0
+-0.251631 -0.165338 -0.333333 0 0 1
+-0.5 0.350445 -0.0796804 1 0 0
+-0.308541 0.354122 -0.371795 0 0 1
+-0.5 -0.0582968 -0.32063 1 0 0
+0.272359 -0.211408 0.321631 0.290171 -0.535349 0.793223
+0.5 -0.182212 -0.0391195 1 0 0
+0.289181 0.294872 -0.273202 0 1 0
+-0.27412 0.0027352 -0.0858515 0.994419 -0.10421 0.0164878
+0.141026 0.333525 0.305868 1 0 0
+0.35153 -0.109949 -0.371795 0 0 1
+-0.0935156 -0.294872 -0.346286 0 1 0
+0.0656989 -0.182406 -0.333333 0 0 1
+0.133923 0.371795 -0.0771177 0.276718 0.959313 -0.056087
+0.482443 0.294872 0.0749709 0 1 0
+0.448718 -0.341352 -0.100492 1 0 0
+0.365647 -0.371795 0.224777 0 1 0
+0.141026 0.36525 -0.0643534 0.982941 0.141686 -0.117267
+-0.194361 0.0568441 0.320513 0.362532 -0.204079 0.909353
+-0.448718 -0.305234 -0.144415 0.989768 0.142618 0.00442662
+0.183514 0.216744 0.371795 0 0 1
+0.5 0.166742 0.0346721 1 0 0
+0.255897 0.289159 -0.371795 -0.0308933 -0.111684 0.993263
+0.5 -0.226226 -0.125571 1 0 0
+0.422593 0.115551 0.320513 0 0 1
+-0.460058 -0.127305 0.320513 0 0 1
+-0.111684 0.371795 -0.00249517 0 1 0
+-0.134155 -0.294872 -0.336071 -0.251315 0.95153 -0.177289
+-0.141154 -0.326641 0.134303 1 0 0
+-0.5 -0.165379 0.280076 1 0 0
+0.45142 0.294872 -0.146875 0 1 0
+0.373469 0.294872 -0.310764 0 1 0
+0.5 0.189344 -0.0589114 1 0 0
+-0.268571 -0.371795 -0.3029 0 1 0
+-0.406405 -0.371795 0.0553201 0 1 0
+0.5 -0.194671 0.310889 1 0 0
+-0.0735638 0.371795 0.262468 0 1 0
+0.0480908 0.349892 0.320513 0 0 1
+0.404996 0.140107 -0.371795 0 0 1
+0.338768 -0.132435 0.371795 0.194196 -0.0913984 0.976695
+0.210794 -0.0327875 -0.0520154 0.531467 0.847079 0
+0.414569 -0.0731903 -0.371795 0 0 1
+0.239325 0.0373742 -0.108904 0.198686 0.980057 0.0034939
+-0.5 0.0233208 -0.188256 1 0 0
+0.4338 0.294872 0.28528 0 1 0
+0.0281018 0.256282 0.335781 0 1 0
+0.163231 -0.12415 0.370417 -0.493177 0.441443 0.749603
+-0.199359 0.22247 -0.333333 -0.0413548 0.184672 0.98193
+0.5 0.250943 -0.268453 1 0 0
+0.141109 -0.309933 0.120706 1 0 0
+0.17713 -0.102877 0.356044 0.845549 -0.533895 0.00187049
+-0.1758 0.112692 -0.333333 0 0 1
+0.141109 -0.332071 0.24024 1 0 0
+0.202448 -0.371795 -0.235614 0 1 0
+0.491495 0.210922 -0.371795 -0.0852377 -0.0386366 0.995611
+0.29431 0.294872 0.14435 0 1 0
+0.322395 0.294872 -0.136322 0 1 0
+0.208032 -0.371795 -0.101671 0 1 0
+0.339926 0.294872 -0.0967616 0 1 0
+0.48951 -0.261638 -0.371795 -0.0535649 -0.0155662 0.998443
+-0.5 0.112071 -0.0250633 1 0 0
+0.343049 -0.139564 0.340644 0.836658 -0.547657 -0.00861975
+0.269972 0.294872 0.170203 0 1 0
+0.209876 -0.0321448 -0.0597897 0.527749 0.849341 0.0100237
+-0.5 -0.250384 -0.0823675 1 0 0
+0.5 -0.040182 -0.282255 1 0 0
+-0.107715 -0.294872 -0.0769741 0 1 0
+-0.0248587 -0.294872 0.234969 0 1 0
+-0.220194 -0.149613 0.371795 0 0 1
+0.167625 0.294872 0.280144 0 1 0
+0.344007 -0.108128 -0.371795 0 0 1
+-0.314261 0.0656375 -0.333333 -0.186974 -0.0383973 0.981614
+-0.49628 -0.266077 -0.371795 0.304424 -0.16386 0.938337
+0.5 -0.141698 0.0652291 1 0 0
+-0.478841 -0.239777 0.320513 0 0 1
+-0.0563898 -0.294872 -0.0426124 0 1 0
+-0.383764 0.257012 -0.371795 0 0 1
+-0.5 0.0266332 0.198447 1 0 0
+-0.18743 0.0819337 0.334385 0.915772 -0.401699 0
+-0.0917455 -0.294872 0.00815362 0 1 0
+0.354497 0.294872 -0.347891 0 1 0
+0.180145 -0.275171 -0.371795 0 0 1
+-0.039191 0.371795 -0.0600268 0 1 0
+0.36266 -0.0341265 -0.371795 0 0 1
+0.320513 0.117482 -0.347858 1 0 0
+0.417364 -0.371795 0.281875 0 1 0
+0.141026 0.327007 0.00980495 1 0 0
+-0.5 0.170323 0.0344861 1 0 0
+-0.115886 0.169015 0.334322 -0.594587 0.804031 0
+-0.5 -0.180795 -0.275991 1 0 0
+0.0471174 0.371795 -0.269133 0 1 0
+0.0692844 -0.294297 0.320513 0.0862881 -0.527844 0.844947
+-0.160836 -0.371795 0.0347546 0 1 0
+-0.194114 -0.0233588 -0.041036 0.811961 -0.517707 0.269625
+0.250977 0.0470796 -0.333333 0 0 1
+-0.201588 -0.350689 -0.371795 0 0 1
+-0.154023 0.0979383 0.320513 0 0 1
+-0.347293 0.0332031 -0.371795 0 0 1
+-0.5 -0.219467 0.0569326 1 0 0
+0.471613 0.294872 0.106597 0 1 0
+-0.263875 -0.371795 -0.265713 0 1 0
+-0.394907 0.116923 -0.371795 0 0 1
+0.422754 -0.371795 0.161297 0 1 0
+0.5 -0.164351 -0.0924581 1 0 0
+0.0580055 -0.239389 0.371795 0 0 1
+0.0614188 0.371795 -0.038863 0 1 0
+-0.0163467 0.285549 -0.371795 0 0 1
+-0.459992 0.192786 0.320513 0 0 1
+-0.112488 -0.133832 0.320513 0 0 1
+-0.394205 -0.104813 0.320513 0 0 1
+-0.31923 0.0183035 0.371795 0 0 1
+-0.218999 -0.371795 -0.168937 0 1 0
+-0.260198 -0.371795 0.0399128 0 1 0
+-0.349912 -0.12945 0.320513 0.678741 0.49445 -0.542983
+0.00058699 0.371795 -0.311996 0 1 0
+-0.5 0.0945376 -0.370653 0.600955 0.078001 0.795468
+0.434379 0.294872 -0.300721 0 1 0
+0.220587 0.275728 -0.371795 0 0 1
+0.136939 0.371795 -0.172208 0.397916 0.909497 0.120328
+0.157773 -0.371795 0.222113 0 1 0
+-0.263376 -0.0288038 -0.119801 0.759488 0.649996 0.0261416
+0.263668 -0.371795 -0.0625303 0 1 0
+-0.5 -0.08469 0.264444 1 0 0
+-0.5 -0.124256 -0.265538 1 0 0
+0.263876 -0.0195195 -0.299218 0.854047 -0.520126 -0.00855299
+0.5 -0.258718 -0.171573 1 0 0
+0.277757 0.294872 0.0955374 0 1 0
+-0.260679 -0.371795 0.0550338 0 1 0
+-0.5 0.157771 -0.133662 1 0 0
+0.454582 0.0226465 0.320513 0 0 1
+-0.355994 -0.11623 0.35286 0.877705 0.479201 0
+0.212791 0.0338929 -0.0478372 -0.460662 0.887451 0.0149033
+-0.5 -0.134005 0.153601 1 0 0
+-0.206744 -0.0361883 -0.245822 -0.527168 0.849712 0.0090844
+-0.068308 0.192823 0.356818 -0.32471 0.945814 0
+-0.157076 -0.137408 -0.333333 0 0 1
+-0.0568523 0.172573 0.320513 0 0 1
+0.015351 0.256282 0.365654 -0.0187861 0.969092 0.245985
+-0.5 0.128471 0.259978 1 0 0
+0.480497 -0.294872 0.192156 0 1 0
+-0.214472 -0.240699 0.320513 0.34089 0.75974 -0.553704
+-0.378332 -0.0497181 0.371795 0.830461 0.203142 -0.518717
+-0.5 -0.0413314 0.255694 1 0 0
+0.5 -0.0735211 0.191299 1 0 0
+0.44401 0.0980148 0.320513 0 0 1
+-0.141154 -0.354646 -0.127606 1 0 0
+0.240576 0.294872 0.160251 0 1 0
+-0.5 -0.0927685 -0.13292 1 0 0
+0.0327705 0.145867 0.320513 0 0 1
+-0.391829 0.371795 -0.195457 0 1 0
+-0.0894973 -0.294872 -0.0982592 0 1 0
+0.492319 0.294872 -0.0782631 0.126098 0.991559 0.030155
+0.141109 -0.333508 0.185289 1 0 0
+-0.192524 0.371795 0.12171 0 1 0
+0.332585 -0.267567 -0.371795 0 0 1
+-0.141154 -0.335416 0.137596 1 0 0
+-0.453417 0.146641 0.320513 0 0 1
+-0.314445 0.371795 -0.116633 0 1 0
+-0.204682 -0.371795 -0.305919 0 1 0
+0.11815 -0.294872 0.0570582 0 1 0
+-0.242289 -0.294266 0.320513 0 0 1
+-0.5 0.356664 -0.18374 1 0 0
+0.5 0.267878 -0.28727 1 0 0
+-0.149273 -0.371795 -0.240163 -0.133288 0.98914 -0.0619319
+0.439799 -0.371795 -0.00210427 -0.00411754 0.999991 -0.00054961
+0.5 0.171357 0.259835 1 0 0
+0.172898 0.230897 -0.369285 -0.131032 0.834489 0.535219
+0.267381 -0.371795 -0.038723 0 1 0
+0.160403 -0.355931 0.320513 0 0 1
+-0.284865 -0.0880281 0.371795 0 0 1
+-0.359106 0.371795 -0.141469 0 1 0
+0.5 -0.102066 -0.3384 1 0 0
+0.5 -0.17672 -0.332947 1 0 0
+0.5 -0.113053 0.289976 1 0 0
+0.332166 -0.114767 0.371795 0 0 1
+-0.100054 -0.245268 -0.371795 0 0 1
+-0.5 0.0670238 -0.332892 1 0 0
+0.126793 -0.294872 0.00922361 0 1 0
+0.422665 0.114638 -0.371795 0 0 1
+0.199094 -0.0215635 -0.192383 0.838275 0.544357 -0.0311411
+0.387462 0.294872 -0.261896 0 1 0
+0.220698 -0.11122 -0.333333 0 0 1
+0.377206 0.294872 0.196518 0 1 0
+0.0522848 -0.288816 0.320513 -0.0669062 -0.146443 0.986954
+0.482144 0.294872 0.0898225 0 1 0
+0.299781 -0.371795 0.127943 0 1 0
+0.227848 0.0382059 -0.260138 -0.0757837 0.997002 -0.0155996
+0.169769 -0.371795 -0.0767519 0 1 0
+0.156661 0.294872 0.14047 0 1 0
+0.141026 0.35834 -0.0823955 1 0 0
+0.0783419 -0.294872 -0.370702 0.00838227 0.91803 0.396423
+0.0102558 -0.270283 0.320513 0 0 1
+-0.311167 -0.371795 0.125851 0 1 0
+0.205014 0.0284299 -0.301745 -0.691527 0.722328 0.00571516
+-0.402056 0.371795 0.22418 0 1 0
+-0.255782 0.318351 0.320513 0 0 1
+0.143788 0.245806 0.371795 -0.00455032 0.0154395 0.99987
+-0.482479 -0.294872 0.0909443 0 1 0
+-0.377002 0.371795 0.0739958 0 1 0
+-0.141154 -0.32097 -0.20614 1 0 0
+0.453185 0.240374 0.320513 0 0 1
+0.465133 -0.294872 0.255874 0 1 0
+-0.5 -0.268185 -0.27052 1 0 0
+0.0690082 -0.256282 0.333 0 1 0
+-0.0192027 -0.294872 0.120759 0 1 0
+0.5 0.165599 0.0271894 1 0 0
+0.5 0.252821 0.279423 1 0 0
+0.486604 0.0925819 -0.371795 0 0 1
+-0.497199 0.371795 -0.234874 -0.486815 0.872055 -0.0503211
+-0.3332 0.371795 0.162223 0 1 0
+-0.141154 -0.2993 0.165806 0.742378 -0.600792 -0.296519
+-0.319151 0.296973 0.320513 0 0 1
+0.294979 -0.371795 0.0394498 0 1 0
+0.216519 -0.117443 0.371795 0 0 1
+-0.450884 -0.171592 -0.371795 0 0 1
+0.462242 -0.294872 -0.169294 0 1 0
+0.469199 -0.294872 -0.261532 0 1 0
+0.424919 0.294872 -0.037997 0 1 0
+-0.258918 -0.119357 -0.333333 0 0 1
+0.5 0.17814 -0.235132 1 0 0
+-0.448718 -0.368991 -0.321684 0.888333 0.444744 0.114313
+0.264684 -0.371795 0.072911 0 1 0
+-0.384391 0.217783 -0.371795 0 0 1
+0.5 -0.104554 -0.169525 1 0 0
+0.234239 0.294872 0.284812 0 1 0
+0.16796 -0.275446 -0.371795 0 0 1
+0.12688 -0.160458 0.329408 -0.61701 0.786093 0.0368195
+0.141109 -0.299125 0.00477735 0.924002 0.377672 -0.0598746
+-0.141154 -0.371079 -0.065611 0.752107 -0.658865 0.015253
+-0.198934 0.371795 0.279228 0 1 0
+0.312415 0.294872 0.195424 0 1 0
+-0.439784 0.238298 -0.371795 0 0 1
+0.448718 -0.329885 0.183958 1 0 0
+0.256729 -0.196884 0.371795 0 0 1
+-0.5 -0.197254 0.0511013 1 0 0
+-0.233422 0.371795 0.0389131 0 1 0
+0.188974 -0.371795 -0.170433 0 1 0
+0.313688 0.292681 0.320513 -0.0893162 0.742377 0.664002
+-0.141154 -0.350528 -0.110595 1 0 0
+-0.485387 -0.294872 0.0608968 0 1 0
+-0.141154 -0.302299 0.0247454 0.974588 -0.205323 -0.0895535
+-0.109564 0.371795 -0.251471 0 1 0
+-0.5 -0.0435813 -0.0433704 1 0 0
+0.0382117 0.371795 0.219217 0 1 0
+0.147526 0.245025 0.371795 0.0138601 0.0652784 0.997771
+-0.354578 0.267088 -0.371795 0 0 1
+-0.250073 0.221519 0.371795 -0.247707 0.305408 0.919439
+0.455824 -0.128501 0.320513 0 0 1
+0.219165 0.0365573 -0.28506 -0.285596 0.958256 -0.0134519
+0.240235 0.290211 0.320513 0.132802 0.154275 0.979062
+-0.307128 0.182591 0.346398 -0.707107 0.707107 0
+0.280295 0.294872 0.0907025 0 1 0
+-0.198816 0.0294576 -0.226709 0.714178 0.699946 0.00501804
+0.121263 0.0876929 -0.333333 0 0 1
+-0.06448 0.00484166 0.320513 0 0 1
+0.0530634 0.371795 -0.201775 0 1 0
+-0.000713536 -0.136633 0.320513 0 0 1
+-0.474319 -0.294872 -0.108742 0 1 0
+0.0833834 -0.257972 0.320513 -0.106077 -0.62378 0.774368
+0.448718 -0.305913 0.146119 0.999822 -0.0187283 0.00248213
+0.223341 -0.371795 0.294566 0 1 0
+0.329575 0.286112 0.320513 0.0218559 0.0777584 0.996733
+0.370874 0.294872 0.231089 0 1 0
+0.233862 -0.318747 0.320513 0 0 1
+0.188441 0.241414 -0.371795 -0.00859519 0.0466784 0.998873
+0.3253 -0.371795 -0.267027 0 1 0
+0.5 0.107974 -0.185729 1 0 0
+-0.287693 0.307899 0.320513 0 0 1
+-0.5 0.183023 -0.364054 0.818304 0.215271 0.532951
+-0.5 -0.220586 0.216652 1 0 0
+0.480431 0.294872 -0.191792 0 1 0
+-0.0411087 -0.201991 0.371795 0.339694 0.651179 0.678655
+-0.448718 -0.352082 -0.26715 1 0 0
+0.5 -0.16187 0.308459 1 0 0
+0.167002 0.216396 0.371795 0 0 1
+0.119753 -0.294872 0.245968 0 1 0
+0.491168 -0.0981646 -0.371795 0 0 1
+-0.393017 -0.194915 0.320513 0 0 1
+-0.248099 -0.0881131 -0.333333 0 0 1
+-0.436579 0.371795 -0.153717 0 1 0
+-0.351982 0.0601688 -0.371795 0 0 1
+0.5 -0.0531976 0.179053 1 0 0
+-0.412345 0.371795 -0.182274 0 1 0
+-0.175357 0.371795 0.279423 0 1 0
+-0.483476 0.0786414 -0.371795 0 0 1
+0.0427881 -0.294872 -0.147422 0 1 0
+0.188109 0.248664 0.320513 0.242879 0.56307 0.789913
+0.141109 -0.34424 0.0776457 1 0 0
+-0.353581 -0.071588 -0.371795 0 0 1
+-0.23004 0.0165906 -0.019072 0.0230423 0.493047 0.869697
+0.200666 -0.371795 -0.345355 0 1 0
+0.0960085 -0.138593 0.320513 0 0 1
+0.5 -0.143381 0.139391 1 0 0
+0.5 0.238375 -0.137279 1 0 0
+0.430707 -0.295889 -0.371795 0 0 1
+0.333939 -0.103815 -0.371795 0 0 1
+0.495437 0.294872 0.009101 0.381987 0.915412 0.126913
+0.456309 -0.294872 -0.147856 -0.249586 0.961632 0.113889
+-0.5 -0.177798 0.179511 1 0 0
+0.0917368 -0.182943 0.324021 -0.437728 0.780278 0.446722
+0.0931007 0.371795 -0.200647 0 1 0
+0.479014 -0.0854939 0.320513 0 0 1
+0.0480738 0.371795 0.262512 0 1 0
+0.5 0.221262 0.272979 1 0 0
+-0.293914 0.195272 0.33112 -0.60515 0.785717 0.128229
+0.490784 -0.294304 0.320513 0.0346569 -0.482641 0.875133
+0.5 0.242438 0.112248 1 0 0
+0.0150481 -0.014325 0.320513 0 0 1
+-0.107588 -0.294872 0.0776953 0 1 0
+-0.327157 0.0598347 0.371795 0 0 1
+0.171176 0.286382 0.320513 0.0717384 0.167609 0.98324
+-0.278705 -0.0679712 0.371795 0 0 1
+-0.0479298 -0.0655628 -0.333333 0 0 1
+0.5 0.140407 -0.229431 1 0 0
+-0.5 0.198985 -0.0429016 1 0 0
+0.5 0.210424 0.296525 1 0 0
+0.4665 0.164947 0.320513 0 0 1
+-0.313857 0.371795 0.0505038 0 1 0
+-0.5 -0.226769 -0.303952 1 0 0
+-0.5 -0.255805 -0.0926388 1 0 0
+0.298328 -0.191095 0.371795 0.540372 -0.510929 0.668543
+-0.5 0.0275024 0.0470324 1 0 0
+0.372381 -0.0768269 0.344062 0.946573 -0.322484 -0.00197593
+0.176883 0.103255 0.354332 0.851858 0.523727 -0.00692642
+-0.476174 0.0750182 -0.371795 0 0 1
+0.5 -0.140784 -0.203411 1 0 0
+0.329103 0.163345 -0.371795 0.134237 -0.0178756 0.990788
+0.5 0.25602 -0.10157 1 0 0
+0.476002 -0.294872 0.0783003 0 1 0
+-0.5 0.225391 0.140447 1 0 0
+-0.0194228 0.0427489 -0.333333 0 0 1
+0.0363694 -0.270715 0.320513 0 0 1
+0.157402 -0.371795 -0.146258 0 1 0
+-0.312432 0.371795 -0.156833 0 1 0
+-0.359284 0.371795 -0.367356 0.00680803 0.910844 -0.412695
+-0.448718 -0.328677 -0.319443 1 0 0
+0.0621193 -0.256282 0.354859 0 1 0
+0.5 -0.123025 -0.10975 1 0 0
+-0.393855 -0.371795 0.209498 0 1 0
+0.0144232 0.371795 -0.147136 0 1 0
+0.186747 0.230897 -0.368475 0.0796877 0.92718 0.366043
+0.0536548 0.371795 0.0193423 0 1 0
+0.5 0.257644 -0.112977 1 0 0
+0.5 0.184571 0.0791976 1 0 0
+0.128992 -0.294872 0.151788 0 1 0
+-0.5 -0.293433 0.100878 0.520347 0.842282 0.140716
+0.0316371 -0.294872 -0.25813 0 1 0
+0.5 0.185361 0.0233419 1 0 0
+0.418329 -0.371795 0.157279 0 1 0
+-0.5 0.291219 -0.191849 1 0 0
+-0.5 -0.111174 -0.0276116 1 0 0
+0.0634163 0.371795 -0.290823 0 1 0
+0.267692 0.294872 -0.0884017 0 1 0
+-0.120676 -0.0191842 0.320513 0 0 1
+-0.272264 -0.299149 0.320513 0 0 1
+0.409086 -0.0632868 -0.371795 0 0 1
+0.0679327 0.244332 0.371795 -0.00687902 0.0695513 0.997555
+0.13435 -0.294872 -0.112112 0.169967 0.984972 0.0306772
+-0.111878 0.371795 0.104457 0 1 0
+-0.0153627 0.194232 -0.333333 0 0 1
+-0.488846 0.0628956 -0.371795 0.0625832 0.00581434 0.998023
+-0.383696 -0.0110597 0.348487 0.997443 0.0714602 0.00010386
+0.141109 -0.329317 0.0276931 1 0 0
+0.448718 -0.327003 0.0140505 1 0 0
+0.150918 0.294872 0.0509862 0.236412 0.964834 -0.11491
+0.264356 -0.251897 0.320513 0 0 1
+-0.203048 -0.244916 0.340788 0.314609 0.949201 -0.00617495
+0.252414 -0.371795 -0.235834 0 1 0
+0.406929 0.106331 -0.371795 0 0 1
+0.5 -0.141649 -0.167754 1 0 0
+-0.111919 -0.294872 -0.310611 0 1 0
+0.0726563 -0.0789948 0.320513 0 0 1
+-0.469224 0.371795 0.0283796 0 1 0
+0.268748 -0.00551241 -0.17693 0.98285 -0.182292 -0.0278445
+-0.428024 0.371795 -0.338497 0 1 0
+0.152384 0.294872 0.272173 0 1 0
+0.181235 0.294872 -0.369632 0.128367 0.88768 -0.442207
+-0.431474 0.209237 -0.371795 0 0 1
+0.37745 -0.0782239 0.320513 0.335811 -0.014644 0.941816
+0.170621 0.0180007 0.320513 0 0 1
+0.247688 -0.132704 0.371795 0 0 1
+-0.0687284 -0.294872 -0.337092 0 1 0
+-0.5 -0.294009 0.22334 0.857375 0.5132 -0.0391693
+-0.123711 0.165126 -0.333333 0 0 1
+0.152279 -0.0551003 0.320513 0 0 1
+-0.5 -0.167077 -0.283693 1 0 0
+0.411563 -0.371795 -0.285556 0 1 0
+0.112564 0.371795 -0.0795702 0 1 0
+-0.265697 0.371795 -0.125815 0 1 0
+-0.484523 -0.187504 -0.371795 0 0 1
+-0.295953 0.016796 0.371795 0 0 1
+-0.0929255 -0.294872 -0.300712 0 1 0
+0.348226 -0.371795 0.115319 0 1 0
+0.5 -0.243618 0.121135 1 0 0
+-0.110666 -0.280892 0.320513 0 0 1
+0.5 0.293102 0.0498504 0.567094 0.821982 0.0524435
+0.448718 -0.320051 -0.246829 1 0 0
+0.460418 -0.294872 0.186615 -0.0500903 0.998663 0.0127628
+0.0052333 0.115212 0.320513 0 0 1
+0.319918 0.159885 -0.333333 0.915741 0.132663 0.379235
+-0.244491 -0.041279 -0.0920276 0.318135 0.948045 0
+0.141109 -0.371427 -0.289734 0.741528 0.668501 0.0569472
+0.0562627 0.371795 -0.291435 0 1 0
+0.290359 0.294872 0.187807 0 1 0
+0.161474 -0.371795 -0.364796 -0.0658946 0.958954 0.275797
+0.0887464 0.371795 -0.267719 0 1 0
+-0.413332 -0.026436 -0.371795 0 0 1
+-0.282485 0.299798 0.320513 0 0 1
+-0.2281 -0.235572 0.368503 0.261257 0.812613 -0.520966
+-0.141154 -0.338523 0.189428 1 0 0
+-0.141154 -0.345721 -0.335977 1 0 0
+-0.0415053 -0.294872 0.163716 0 1 0
+0.0176418 -0.292062 -0.371795 -0.0938778 0.459417 0.883245
+-0.464735 -0.294872 -0.14391 0 1 0
+0.448847 0.130775 0.320513 0 0 1
+-0.172681 0.371795 0.0890045 0 1 0
+-0.298222 0.371795 -0.214244 0 1 0
+0.141026 0.366621 0.238517 0.905991 0.422077 -0.0321113
+-0.5 -0.188628 0.300704 1 0 0
+-0.0681089 0.371795 -0.0312523 0 1 0
+-0.192993 -0.201663 -0.333333 0 0 1
+-0.224484 -0.287588 0.320513 0 0 1
+0.448718 -0.300255 0.0553815 0.95503 -0.295186 0.0279743
+-0.343829 -0.132368 0.371795 -0.444787 -0.39201 0.80529
+0.5 -0.168554 0.217056 1 0 0
+0.141026 0.352184 -0.110344 1 0 0
+-0.100379 0.332621 0.320513 0 0 1
+0.227249 -0.0381535 -0.072185 0.092434 0.995715 0.00292684
+-0.448718 -0.313948 -0.233504 1 0 0
+-0.162326 0.0637375 -0.333333 0 0 1
+0.219707 0.149675 -0.333333 0 0 1
+0.20441 -0.371795 -0.342456 0 1 0
+0.309285 0.294872 -0.324935 0 1 0
+-0.155078 -0.371795 -0.230322 0 1 0
+0.5 -0.161753 0.173065 1 0 0
+-0.141154 -0.317832 -0.144375 1 0 0
+-0.5 -0.18239 -0.118177 1 0 0
+-0.145059 -0.361995 0.320513 0.550609 0.156895 0.819887
+-0.474794 -0.289665 0.320513 -0.0674336 -0.4204 0.90483
+0.367121 0.294872 0.278995 0 1 0
+-0.445028 0.371795 0.107519 0 1 0
+0.301021 -0.0795298 0.371795 0 0 1
+-0.5 -0.122897 0.291792 1 0 0
+0.447015 0.18812 -0.371795 0 0 1
+0.172116 0.246794 0.371795 -2.73746e-006 0.34432 0.938852
+-0.387316 0.237264 -0.371795 0 0 1
+-0.491833 -0.25726 0.320513 -0.122119 -0.0115647 0.992448
+-0.141142 0.28851 -0.371795 0 0 1
+0.421087 -0.371795 -0.0882361 0 1 0
+0.5 0.241756 0.131239 1 0 0
+-0.325466 0.163052 0.357095 0.789209 -0.614125 0
+-0.352361 -0.0165801 -0.371795 0 0 1
+0.5 0.142933 -0.189472 1 0 0
+-0.466777 0.281859 -0.371795 0 0 1
+0.0338588 -0.230897 -0.340891 0.0413446 0.995591 -0.0842018
+-0.332748 -0.0215518 0.371795 0 0 1
+0.385929 0.185157 -0.371795 0 0 1
+0.320513 -0.0275209 -0.363751 0.996856 -0.00755331 0.078873
+-0.179984 -0.127954 0.371795 0 0 1
+-0.0832172 0.371795 -0.327661 0 1 0
+-0.5 0.133491 0.318796 0.845027 -0.0754135 -0.529379
+-0.190858 -0.371795 -0.177607 0 1 0
+0.428328 0.294872 0.0163954 0 1 0
+-0.289169 0.155906 0.371795 0 0 1
+-0.153433 -0.34475 -0.371795 0 0 1
+-0.5 0.246245 0.217977 1 0 0
+0.299193 0.190526 0.369379 0.699676 0.553476 0.451794
+0.234934 0.0244929 0.371795 0 0 1
+0.4896 0.215413 0.320513 0.0723454 0.00609406 0.997361
+-0.331161 -0.155444 0.33191 0.800542 0.599277 0
+0.213053 -0.0340149 -0.159193 0.421971 0.906109 -0.0301105
+0.0568219 0.371795 -0.0908449 0 1 0
+0.338841 -0.208759 -0.371795 0 0 1
+0.320513 -0.0244263 -0.347349 1 0 0
+0.29875 -0.371795 0.0579074 0 1 0
+-0.437175 -0.371795 0.128948 0.0473504 0.998837 -0.00913593
+-0.075634 0.20542 0.371795 0 0 1
+0.128493 -0.030695 -0.333333 0 0 1
+-0.215164 0.371795 0.277679 0 1 0
+0.0160629 -0.294872 0.018946 0 1 0
+0.148288 0.294872 0.0490125 0.233473 0.967215 -0.0999278
+0.0513314 -0.294872 -0.123292 0 1 0
+0.227781 0.294872 -0.216735 0 1 0
+-0.0470289 -0.294872 0.186926 0 1 0
+-0.5 0.217472 -0.286509 1 0 0
+-0.178598 0.10027 0.320513 0.649006 -0.289682 0.703474
+0.5 -0.12061 0.226423 1 0 0
+0.0265441 0.190249 -0.333333 0 0 1
+-0.262927 -0.371795 -0.318134 0 1 0
+-0.5 0.235898 -0.240762 1 0 0
+0.268417 0.00753413 -0.0125652 0.981162 0.19307 -0.00675588
+-0.378163 0.0535556 0.33174 0.97542 -0.216385 -0.0416406
+-0.5 0.295112 0.245174 1 0 0
+0.320513 -0.0636005 -0.347649 1 0 0
+0.205645 0.0290607 -0.223529 -0.674701 0.737463 -0.0304352
+-0.0475404 -0.294872 -0.226819 0 1 0
+-0.235605 -0.0221982 -0.0227526 -0.0725709 -0.510361 0.856893
+0.207121 -0.371795 -0.119811 0 1 0
+0.5 0.194908 0.156386 1 0 0
+-0.0373604 0.371795 0.295661 0 1 0
+0.441574 -0.371795 0.238271 -0.0660239 0.997788 0.00770798
+-0.00400771 0.0385479 0.320513 0 0 1
+-0.0634359 -0.184782 0.320513 -0.0161817 0.0979817 0.995057
+0.243964 0.0571486 0.371795 0 0 1
+0.164389 0.294872 0.155379 0 1 0
+-0.377657 0.371795 0.280204 0 1 0
+0.269927 0.177545 0.371795 0 0 1
+0.392394 0.294872 -0.20921 0 1 0
+-0.175042 0.087786 -0.333333 0 0 1
+0.446641 0.294872 0.0715795 0 1 0
+-0.5 0.272521 -0.215135 1 0 0
+0.5 0.147478 -0.371082 -0.372295 -0.0672363 0.925676
+-0.274085 0.00313413 -0.0845621 0.994407 -0.105343 0.00762366
+0.222858 0.117742 0.371795 0 0 1
+-0.146249 -0.362499 0.320513 0.367221 0.089371 0.92583
+0.362398 -0.292733 0.320513 0 0 1
+0.141109 -0.297345 -0.337875 0.902383 0.430165 0.0257374
+-0.271691 0.252292 -0.371795 0 0 1
+-0.0815641 0.0925256 -0.333333 0 0 1
+0.159059 -0.351368 -0.371795 0 0 1
+-0.0327236 -0.294872 -0.356537 0 1 0
+0.0794281 0.148439 0.320513 0 0 1
+0.5 -0.114208 0.318057 0.962994 -0.0339376 0.267378
+-0.00354789 -0.294872 0.0918765 0 1 0
+-0.33173 -0.323104 0.320513 0 0 1
+-0.5 0.106302 -0.0156692 1 0 0
+0.199234 -0.0217638 -0.0146443 0.816388 0.577116 -0.0211317
+0.185513 0.294872 0.083541 0 1 0
+-0.320513 0.137443 -0.364899 0.963652 -0.0703368 -0.257734
+0.304174 0.294872 0.0428676 0 1 0
+-0.333646 0.371795 0.00326659 0 1 0
+-0.0485352 0.371795 0.235344 0 1 0
+0.153437 0.0693115 0.320513 0 0 1
+0.459885 0.0863261 0.320513 0 0 1
+-0.22181 -0.369485 -0.371795 -0.102383 0.233498 0.966952
+-0.270189 -0.371795 0.286156 0 1 0
+0.242029 -0.307116 -0.371795 0 0 1
+0.308938 0.294872 -0.200032 0 1 0
+-0.497405 -0.294872 -0.336069 0.597212 0.760079 0.256158
+0.095987 0.371795 0.0614049 0 1 0
+-0.206708 -0.24084 0.371795 -0.17555 -0.463641 0.868458
+-0.5 -0.00288884 -0.351844 1 0 0
+0.5 0.0592877 0.0417875 1 0 0
+-0.141154 -0.325134 -0.215438 1 0 0
+0.42973 -0.264463 -0.371795 0 0 1
+0.38985 0.294872 0.103712 0 1 0
+0.0919899 -0.284848 -0.371795 0.0102501 0.0410378 0.999105
+0.0812067 0.371795 0.276152 0 1 0
+0.0615224 -0.294872 0.17187 0 1 0
+-0.0510808 0.299818 -0.371795 0 0 1
+0.350696 0.294872 0.25478 0 1 0
+-0.141154 -0.358787 0.0601585 0.998924 -0.046287 -0.00288591
+-0.5 0.0241869 0.197732 1 0 0
+0.287356 0.294872 0.0994021 0 1 0
+0.378377 0.294872 0.312192 0 1 0
+-0.5 0.269969 -0.191486 1 0 0
+0.404021 -0.287453 -0.371795 0 0 1
+-0.468312 0.371795 -0.344737 0 1 0
+-0.5 0.200851 -0.209035 1 0 0
+-0.187061 0.245142 -0.371795 0 0 1
+0.141109 -0.338141 -0.0945804 1 0 0
+0.242484 0.294872 -0.15629 0 1 0
+-0.5 -0.200082 0.039069 1 0 0
+0.141109 -0.337297 0.158914 1 0 0
+-0.436182 -0.371795 -0.0909788 0 1 0
+0.5 -0.144521 0.138101 1 0 0
+-0.202761 -0.143196 -0.333333 0 0 1
+0.498779 0.0393729 0.320513 0.47974 -0.0152985 0.877278
+0.276778 -0.371795 -0.206957 0 1 0
+0.5 0.0111151 0.261629 1 0 0
+0.0103643 0.371795 0.120846 0 1 0
+0.277751 0.294872 -0.283788 0 1 0
+0.139267 0.289882 -0.371795 -0.194128 -0.333383 0.922589
+-0.321045 -0.371795 -0.138378 0 1 0
+0.167436 0.294872 -0.190289 0 1 0
+-0.448718 -0.321248 0.272038 1 0 0
+-0.5 0.158534 0.252679 1 0 0
+-0.300331 -0.312631 0.320513 0 0 1
+0.382622 0.192826 -0.371795 0 0 1
+-0.456149 0.371795 0.279761 0 1 0
+0.5 -0.112526 0.256042 1 0 0
+-0.0155983 -0.294872 0.182696 0 1 0
+-0.448718 -0.344117 -0.0218774 1 0 0
+0.215126 -0.0349815 -0.33077 0.12622 0.866386 -0.48316
+-0.240926 0.319719 -0.371795 0 0 1
+0.356082 -0.371795 -0.0383602 0 1 0
+-0.190032 0.0153881 -0.0803437 0.928853 0.369995 0.0183324
+0.5 -0.067557 0.295362 1 0 0
+0.276463 -0.371795 0.298895 0 1 0
+-0.357923 -0.371795 0.236225 0 1 0
+0.129692 -0.294872 -0.0710254 0 1 0
+-0.451085 0.371795 -0.063078 0 1 0
+-0.418526 0.371795 -0.0283911 0 1 0
+0.188755 0.0543959 -0.333333 0 0 1
+-0.0367016 0.371795 0.157922 0 1 0
+-0.371367 -0.211039 -0.371795 0 0 1
+0.273179 -0.21686 -0.333333 0.156947 -0.164262 0.973851
+-0.350575 -0.320834 0.320513 0 0 1
+0.141026 0.361414 0.0873165 1 0 0
+0.5 0.0198352 -0.331829 1 0 0
+0.12691 0.371795 -0.263163 0 1 0
+-0.192541 -0.0207698 -0.202097 0.869862 -0.492502 -0.0279795
+0.5 0.0314657 0.0997928 1 0 0
+-0.0295836 -0.294872 -0.103982 0 1 0
+-0.129257 0.296605 -0.371795 0 0 1
+0.462796 0.194941 -0.371795 0 0 1
+0.310781 -0.371795 -0.310762 0 1 0
+-0.0284012 0.371795 0.223675 0 1 0
+0.5 0.106478 -0.0326109 1 0 0
+0.0957288 0.204835 0.371795 0 0 1
+0.5 -0.0978438 0.244502 1 0 0
+0.359672 0.294872 -0.119872 0 1 0
+-0.5 -0.136005 -0.0745716 1 0 0
+-0.463808 -0.0324939 0.320513 0 0 1
+-0.202494 -0.371795 0.145273 0 1 0
+-0.443221 -0.371795 -0.294773 0.389268 0.912634 -0.124779
+-0.386952 0.371795 0.0653249 0 1 0
+0.208513 0.294872 0.187103 0 1 0
+-0.479943 -0.294872 0.312246 0.0748411 0.992386 -0.0978222
+-0.5 -0.20468 0.165149 1 0 0
+0.0845584 -0.0457352 -0.333333 0 0 1
+0.187601 -0.219477 0.371795 0 0 1
+0.306428 -0.130863 0.371795 0 0 1
+0.10238 0.158342 -0.333333 0 0 1
+0.193406 0.00859703 -0.229378 0.98206 -0.184509 -0.038906
+-0.187079 -0.286862 0.320513 0 0 1
+-0.25502 -0.0360298 -0.315141 0.544147 0.838875 0.0139023
+0.302154 0.294872 0.131828 0 1 0
+0.141109 -0.33925 0.189064 1 0 0
+-0.121423 0.371795 0.235908 0 1 0
+0.244059 0.294872 -0.251578 0 1 0
+-0.141154 -0.319759 -0.200069 1 0 0
+-0.0209767 0.0934051 0.320513 0 0 1
+-0.177576 0.371795 0.197587 0 1 0
+-0.429637 0.371795 0.263964 0 1 0
+0.441754 0.294872 -0.0127221 0 1 0
+0.320513 -0.131225 -0.333711 0.68833 0.0284856 0.724838
+0.5 -0.0121191 0.198139 1 0 0
+0.151324 0.294872 -0.244843 0 1 0
+0.0389723 0.371795 0.147359 0 1 0
+0.397185 -0.0844338 -0.371795 0 0 1
+-0.341456 -0.235421 0.320513 0 0 1
+0.162545 0.294872 0.129011 0 1 0
+-0.107984 -0.294872 0.188217 0 1 0
+0.0440398 0.224014 -0.333333 0.025378 0.130294 0.991151
+-0.141154 -0.355686 0.063469 1 0 0
+-0.291017 0.371795 -0.152503 0 1 0
+0.155727 -0.072448 0.320513 0 0 1
+0.247092 -0.0580944 -0.333333 0 0 1
+-0.208348 -0.371795 0.18237 0 1 0
+0.0637966 -0.224344 0.371795 0 0 1
+-0.129659 0.371795 0.18617 0 1 0
+-0.378551 -0.371795 0.228205 0 1 0
+-0.491665 0.137538 -0.371795 0.170773 -0.0633834 0.98327
+0.154599 -0.371795 -0.300932 0 1 0
+-0.5 0.22199 -0.293635 1 0 0
+-0.0291394 0.225895 -0.333333 -0.175764 0.386068 0.905571
+-0.17661 0.175869 -0.333333 0 0 1
+0.141026 0.370356 0.0740489 0.761338 0.617757 -0.196825
+-0.0783342 0.354222 -0.371795 0 0 1
+0.346845 0.294872 -0.263102 0 1 0
+-0.24818 0.00105421 0.371795 0 0 1
+-0.0497627 0.371795 -0.340147 0 1 0
+0.5 -0.0907521 0.100433 1 0 0
+0.5 0.286317 0.139749 0.952331 0.3045 -0.0185951
+-0.136694 0.210462 -0.333333 0 0 1
+-0.5 -0.116136 0.0596041 1 0 0
+-0.448718 -0.298165 -0.267558 0.859013 0.510784 0.034589
+0.370407 -0.135502 0.320513 0 0 1
+0.5 0.0119787 -0.28913 1 0 0
+-0.5 -0.103557 -0.062213 1 0 0
+-0.488249 0.371795 -0.256284 0 1 0
+-0.12481 0.0454397 -0.333333 0 0 1
+-0.249211 -0.208633 -0.333333 0 0 1
+-0.320513 -0.0987138 -0.353734 1 0 0
+0.0700903 0.0398588 0.320513 0 0 1
+0.364117 -0.371795 0.0652473 0 1 0
+-0.241595 -0.265721 -0.371795 0 0 1
+0.472928 0.294872 0.0469247 0 1 0
+0.5 0.0775018 -0.0811679 1 0 0
+-0.330501 0.371795 0.157667 0 1 0
+-0.5 0.117977 -0.22524 1 0 0
+0.5 0.15261 0.0759869 1 0 0
+0.0129654 -0.294872 -0.0906188 0 1 0
+0.209803 -0.0320933 -0.216947 0.547944 0.836241 0.0214049
+-0.5 0.0677869 0.0144455 1 0 0
+-0.0778075 -0.260171 -0.371795 0 0 1
+-0.382682 -0.316344 -0.371795 0 0 1
+-0.439698 0.371795 -0.159334 0 1 0
+-0.399109 0.283198 0.320513 0 0 1
+-0.318131 -0.0325535 -0.333333 -0.498933 -0.0263735 0.866239
+-0.239332 0.159537 0.371795 0 0 1
+-0.0990519 0.371795 0.00959383 0 1 0
+0.141026 0.312725 -0.0134011 1 0 0
+-0.427344 0.371795 -0.00173394 0 1 0
+0.5 -0.0665267 0.266439 1 0 0
+0.165411 -0.206517 -0.333333 0 0 1
+0.139679 0.283709 0.320513 0.00493965 0.0430001 0.999063
+0.5 -0.0457914 -0.035134 1 0 0
+0.270313 0.197853 0.371795 0 0 1
+-0.17158 -0.252172 0.325193 0.156979 0.888624 -0.430935
+-0.5 -0.00387617 -0.367993 0.740938 -0.180206 0.646945
+0.167068 -0.371795 0.0688387 0 1 0
+0.179031 -0.371795 -0.0652381 0 1 0
+0.148404 -0.371795 0.293424 0.372289 0.911893 0.172776
+0.233037 0.0382631 -0.216905 0.0623574 0.997831 -0.0210986
+0.091456 0.0589258 0.320513 0 0 1
+0.160712 -0.161995 -0.333333 0 0 1
+0.0232687 0.0686651 -0.333333 0 0 1
+0.306981 -0.371795 0.0873358 0 1 0
+0.13958 -0.255468 0.335533 -0.0713523 0.997451 0
+-0.5 0.234804 -0.146772 1 0 0
+0.255525 0.233643 0.320513 0 0 1
+0.141109 -0.302009 0.153262 0.991653 0.120133 0.0468272
+0.138334 0.180317 0.371795 0 0 1
+0.141109 -0.297244 0.0943088 0.929886 0.367845 -0.00177873
+-0.285034 0.371795 -0.117179 0 1 0
+-0.205474 0.035299 -0.214226 0.563627 0.82602 0.00396472
+-0.141154 -0.308864 -0.244188 1 0 0
+-0.5 0.112575 0.169146 1 0 0
+0.5 -0.159624 0.147619 1 0 0
+0.157097 0.0842143 0.320513 0 0 1
+-0.296426 0.371795 -0.0788282 0 1 0
+-0.5 0.321461 -0.257078 1 0 0
+-0.341779 -0.182588 -0.371795 0 0 1
+0.422949 -0.311818 0.320513 0 0 1
+0.154224 0.19527 -0.333333 0 0 1
+-0.0554406 -0.279991 -0.371795 0 0 1
+0.141109 -0.311318 -0.0907219 1 0 0
+-0.326244 0.371795 -0.295765 0 1 0
+-0.0721151 -0.232617 -0.371795 -0.0991037 0.773722 -0.625726
+0.5 -0.221961 -0.273426 1 0 0
+0.141026 0.314337 0.126531 1 0 0
+0.360622 -0.039801 -0.371795 0 0 1
+-0.141154 -0.324728 -0.251586 1 0 0
+-0.263326 0.371795 0.0592831 0 1 0
+0.0334089 -0.294872 0.0725312 0 1 0
+-0.0509587 -0.294872 0.256057 0 1 0
+-0.187726 0.371795 0.137564 0 1 0
+0.141026 0.332041 0.241838 1 0 0
+-0.38646 0.371795 0.270013 0 1 0
+0.129151 -0.236778 0.371795 0 0 1
+-0.332606 -0.301644 0.320513 0 0 1
+-0.0542276 -0.294872 -0.129976 0 1 0
+-0.161977 -0.044792 0.320513 0 0 1
+0.425671 0.18817 0.320513 0 0 1
+0.29776 -0.371795 -0.246084 0 1 0
+-0.5 -0.189055 -0.0281841 1 0 0
+-0.141154 -0.307996 0.0491165 1 0 0
+-0.117874 0.166827 -0.333333 0 0 1
+0.5 0.254714 -0.173399 1 0 0
+-0.16618 0.371795 0.277914 0 1 0
+0.5 -0.276517 -0.28529 1 0 0
+0.151359 -0.371795 0.242761 0 1 0
+0.5 -0.222236 0.0205893 1 0 0
+0.5 -0.231644 0.306167 1 0 0
+0.220941 0.0370331 -0.225365 -0.252967 0.967466 -0.00423594
+0.443724 0.268205 0.320513 0 0 1
+-0.0633471 0.194527 0.36498 -0.372504 0.90228 -0.217098
+-0.199021 -0.0864841 0.371795 0 0 1
+-0.373024 0.156114 -0.371795 0 0 1
+-0.360731 0.300242 -0.371795 0 0 1
+-0.227431 0.371795 -0.187031 0 1 0
+-0.432452 0.0195346 -0.371795 0 0 1
+0.5 -0.0237117 -0.0393821 1 0 0
+-0.465487 0.371795 -0.109859 0 1 0
+-0.5 -0.176026 -0.141094 1 0 0
+0.0129831 0.371795 -0.0734309 0 1 0
+-0.074143 0.0929382 0.320513 0 0 1
+-0.187794 0.00702192 -0.0970492 0.98667 0.162725 0.00159953
+-0.455078 0.371795 0.089983 0 1 0
+-0.216039 0.371795 0.0989436 0 1 0
+0.269595 0.294872 0.0972762 0 1 0
+0.249618 0.294872 0.105886 0 1 0
+-0.37793 -0.347118 0.320513 0 0 1
+-0.0135933 0.371795 0.00634804 0 1 0
+0.43381 0.294872 -0.151775 0 1 0
+-0.448718 -0.295782 -0.0880823 0.853465 0.508673 -0.113355
+0.0158741 0.366921 0.320513 0.0952707 0.379246 0.920378
+-0.347573 0.202417 -0.371795 0 0 1
+0.127031 0.369702 0.320513 0.177937 0.56561 0.805248
+0.141026 0.331243 -0.000899132 1 0 0
+-0.0333725 0.291251 0.320513 0 0 1
+-0.0370739 0.371795 0.154153 0 1 0
+0.109457 0.371795 -0.281472 0 1 0
+-0.212141 -0.0392264 -0.306666 -0.431214 0.902246 -0.00275681
+-0.311879 -0.145551 0.371795 0 0 1
+-0.3235 0.371795 0.105048 0 1 0
+0.5 0.155886 -0.091575 1 0 0
+-0.213468 0.186627 0.371795 0 0 1
+0.5 -0.0404998 -0.0320826 1 0 0
+-0.320513 0.00459361 -0.341447 0.961171 0.0581384 -0.26976
+-0.148145 0.371795 -0.118572 0 1 0
+-0.324562 -0.371795 0.231039 0 1 0
+0.246885 0.294872 -0.31614 0 1 0
+0.5 -0.201693 0.144781 1 0 0
+0.0861538 0.371795 -0.111793 0 1 0
+0.0401235 -0.256282 0.339338 0 1 0
+0.219484 0.294872 0.270928 0 1 0
+0.5 0.0795961 0.134288 1 0 0
+-0.05167 0.224273 0.371795 0 0 1
+-0.5 -0.0502518 -0.315843 1 0 0
+0.410457 -0.320478 0.320513 0 0 1
+-0.333572 0.222056 0.320513 0 0 1
+-0.0313513 0.371795 0.161881 0 1 0
+-0.211293 -0.371795 0.106522 0 1 0
+0.0360375 0.20137 0.371747 -0.092586 -0.521758 0.848055
+0.365489 0.193784 -0.371795 0 0 1
+0.105304 -0.294872 0.0979904 0 1 0
+0.257815 -0.371795 -0.148583 0 1 0
+0.442505 0.294872 -0.0669049 0 1 0
+0.5 0.0387405 0.0697342 1 0 0
+0.365107 -0.371795 -0.0996042 0 1 0
+-0.0489992 0.371795 -0.0282237 0 1 0
+-0.436919 0.244024 0.320513 0 0 1
+0.199648 0.203488 0.371795 0 0 1
+0.370869 0.0619625 0.371795 0.296504 -0.126356 0.946636
+0.192656 -0.00397808 -0.178102 0.993159 0.11604 -0.0130027
+0.162537 -0.371795 0.0609334 0 1 0
+0.226226 0.0893052 -0.333333 0 0 1
+-0.5 0.0271684 -0.0168508 1 0 0
+-0.0102502 -0.230897 -0.351931 0 1 0
+0.0902765 0.371795 -0.284029 0 1 0
+0.465451 0.0433944 0.320513 0 0 1
+0.448718 -0.370309 0.2173 0.835667 -0.548524 -0.0279678
+0.5 0.0119905 -0.350075 1 0 0
+-0.253803 -0.00589501 0.371795 0 0 1
+0.5 -0.0140552 -0.0672748 1 0 0
+0.208002 -0.336355 -0.371795 0 0 1
+0.5 0.105815 -0.044016 1 0 0
+0.411914 -0.371795 -0.0242192 0 1 0
+0.141026 0.367036 -0.299632 0.838351 0.503185 0.209695
+0.5 -0.19719 0.0199418 1 0 0
+0.367681 -0.0894299 0.325627 0.909911 -0.312452 0.272831
+0.22186 -0.173625 0.371795 0 0 1
+0.0494864 -0.294872 -0.207246 0 1 0
+-0.11412 0.371795 -0.221884 0 1 0
+-0.142364 -0.371795 0.301788 0.744239 -0.658789 0.110022
+-0.186754 0.216686 -0.333333 0 0 1
+-0.0309292 0.157222 0.320513 0 0 1
+0.448718 -0.300365 -0.300827 0.930903 -0.354143 0.0894584
+0.458245 0.101491 -0.371795 0 0 1
+0.486856 -0.0700111 0.320513 0 0 1
+-0.496368 0.203261 -0.371795 0.200427 0.0164741 0.97957
+0.0301215 -0.153077 0.320513 0 0 1
+-0.431325 0.123648 0.320513 0 0 1
+0.5 -0.0614913 0.00329688 1 0 0
+-0.5 -0.0684162 0.0642719 1 0 0
+0.141109 -0.294883 0.144824 0.811222 0.580499 0.0702878
+0.5 -0.0746969 0.249588 1 0 0
+0.267842 -0.0096787 -0.204187 0.954227 -0.29873 -0.0145104
+-0.44236 -0.371795 0.0181929 0.126967 0.991251 0.0360619
+-0.282777 -0.371795 -0.310505 0 1 0
+-0.0642515 0.371795 -0.353226 0 1 0
+-0.339979 0.307408 0.320513 0 0 1
+-0.442269 -0.296923 0.320513 -0.182123 -0.0382561 0.982531
+0.0136152 -0.294872 -0.0588224 0 1 0
+-0.118821 0.371795 0.272769 0 1 0
+0.208325 -0.146464 -0.333333 0 0 1
+-0.270523 0.371795 0.316753 -0.016307 0.784994 0.619289
+0.0390672 0.200865 0.325812 0.0958971 0.95099 -0.293977
+-0.0318305 0.371795 -0.131061 0 1 0
+0.0574846 -0.0830518 -0.333333 0 0 1
+-0.5 -0.0764356 0.102426 1 0 0
+-0.204511 0.0346246 -0.224467 0.622821 0.782363 -0.00148389
+0.5 -0.258827 0.00146711 1 0 0
+0.28687 0.0251402 -0.333333 0 0 1
+-0.357911 -0.261939 -0.371795 0 0 1
+0.141026 0.338373 -0.297181 1 0 0
+-0.212667 0.371795 0.177179 0 1 0
+0.116836 0.230897 -0.35643 0 1 0
+-0.25709 -0.115363 -0.333333 0 0 1
+-0.418634 -0.257534 0.320513 0 0 1
+-0.480086 0.121682 -0.371795 0 0 1
+0.5 0.261042 -0.217979 1 0 0
+-0.144092 0.210776 0.371795 0 0 1
+-0.276753 0.326049 0.320513 0 0 1
+0.0697078 0.371795 -0.120519 0 1 0
+0.5 -0.0297796 0.0709022 1 0 0
+-0.396828 0.371795 -0.225446 0 1 0
+0.481216 0.0530661 -0.371795 0 0 1
+0.219137 -0.000383063 0.371795 0 0 1
+0.234694 -0.174421 -0.333333 0 0 1
+0.405653 -0.0703995 -0.371795 0 0 1
+-0.173787 -0.371795 -0.343384 0 1 0
+-0.0038281 0.230897 -0.356792 0 1 0
+0.419323 -0.253159 -0.371795 0 0 1
+-0.448718 -0.315468 0.126017 1 0 0
+-0.276506 -0.371795 0.0954619 0 1 0
+-0.198482 0.257524 -0.371795 0 0 1
+0.0315179 -0.282979 0.320513 0 0 1
+-0.369095 -0.0856371 0.331782 0.936947 0.349471 0
+0.197127 -0.0185143 -0.0914872 0.849096 0.528232 -0.00280941
+0.5 -0.182552 -0.0947645 1 0 0
+-0.390029 0.371795 -0.211687 0 1 0
+0.0559845 0.0239222 0.320513 0 0 1
+0.0302642 -0.143525 -0.333333 0 0 1
+0.141026 0.364661 -0.128604 0.965673 0.254936 0.0498289
+0.319225 0.176309 0.320513 0.287052 0.332564 0.898333
+-0.075726 0.371795 -0.11546 0 1 0
+0.5 0.26315 -0.0474289 1 0 0
+0.21651 0.294872 -0.0571943 0 1 0
+-0.0290314 -0.294872 -0.00538358 0 1 0
+-0.189637 0.307662 0.320513 0 0 1
+0.5 0.215228 0.187375 1 0 0
+0.23025 0.294872 0.178098 0 1 0
+0.377327 0.294872 -0.00971283 0 1 0
+-0.5 0.14636 0.0520313 1 0 0
+0.5 -0.1519 0.22053 1 0 0
+-0.5 -0.201688 -0.254438 1 0 0
+-0.217597 -0.0512513 0.371795 0 0 1
+0.164129 -0.371795 0.207531 0 1 0
+0.487951 0.240648 0.320513 0.232639 0.0702862 0.97002
+-0.5 0.334796 0.101675 1 0 0
+-0.235767 -0.0371292 -0.0316372 -0.0411235 -0.585289 0.809781
+0.219126 0.294872 -0.313854 0 1 0
+-0.212744 0.371795 0.15017 0 1 0
+0.0699824 0.192249 0.331115 0.324693 0.945819 0
+-0.5 0.2713 0.27812 1 0 0
+0.267329 0.294872 -0.142196 0 1 0
+-0.0882621 -0.162719 0.320513 0 0 1
+0.482945 0.28303 -0.371795 0 0 1
+-0.33316 0.371795 -0.218463 0 1 0
+-0.328759 0.353038 -0.371795 0 0 1
+-0.213781 0.100566 -0.333333 0 0 1
+0.448718 -0.356431 0.161715 1 0 0
+0.320513 0.153276 -0.340089 0.998583 0.0217689 0.0485582
+0.410031 0.294872 0.269659 0 1 0
+0.177618 0.294872 -0.331458 0 1 0
+-0.141154 -0.36935 -0.129816 0.903916 -0.422356 -0.0674626
+0.147464 -0.371795 -0.243322 0.332338 0.937286 -0.105102
+0.294528 -0.0137042 0.371795 0 0 1
+0.125955 -0.0414739 0.320513 0 0 1
+0.141026 0.331625 0.173072 1 0 0
+0.5 -0.1166 0.290721 1 0 0
+-0.0814898 -0.213817 -0.333333 0 0 1
+-0.225514 0.0431301 -0.264039 0.127063 0.991722 -0.0185314
+-0.0292773 -0.294872 0.225961 0 1 0
+-0.5 -0.0998231 0.221845 1 0 0
+0.314099 -0.371795 0.130921 0 1 0
+-0.5 -0.0819228 -0.1811 1 0 0
+0.5 -0.290764 0.253682 0.856349 -0.509632 0.0833141
+0.0511804 -0.294872 -0.312262 0 1 0
+0.5 0.0473773 0.237495 1 0 0
+-0.0432388 -0.230897 -0.3482 0 1 0
+-0.426944 -0.371795 -0.312366 0 1 0
+0.380147 -0.0775993 -0.371795 0 0 1
+0.0419076 -0.262866 -0.371795 0 0 1
+-0.35596 0.142443 -0.371795 0 0 1
+0.13992 -0.137393 0.320513 -0.157024 0.131434 0.97881
+-0.295198 0.371795 -0.206414 0 1 0
+0.206918 0.220142 0.371795 0 0 1
+0.5 -0.294853 -0.0199305 -0.405743 0.911456 0.0679778
+0.197802 -0.0521655 0.360263 0.969403 -0.245476 0
+-0.388938 -0.371795 -0.274666 0 1 0
+-0.426748 -0.119838 -0.371795 0 0 1
+0.5 -0.262622 -0.311454 1 0 0
+-0.0504775 -0.242055 0.371795 0 0 1
+-0.161368 -0.371795 -0.330827 0 1 0
+-0.278472 -0.0696725 0.371795 0 0 1
+-0.5 -0.180975 0.319718 -0.554588 0.0487651 0.830695
+-0.0347743 -0.294872 -0.103405 0 1 0
+0.229711 -0.371795 -0.0616118 0 1 0
+0.450932 0.205818 -0.371795 0 0 1
+-0.5 0.37087 -0.225897 0.667047 -0.732127 0.137982
+0.249982 -0.286722 0.320513 0 0 1
+0.1439 0.294872 0.247733 0.87707 0.402132 0.26275
+0.5 0.118999 0.199908 1 0 0
+-0.256589 0.0349317 -0.0724075 -0.620616 0.784113 0.00164943
+-0.17458 -0.347815 -0.371795 0 0 1
+0.222172 0.168138 -0.333333 0 0 1
+0.214189 0.0698798 -0.333333 0 0 1
+0.5 -0.0309231 -0.322721 1 0 0
+-0.359222 0.245394 0.320513 0 0 1
+0.0315475 0.371795 -0.297466 0 1 0
+-0.416042 0.371795 0.0896957 0 1 0
+-0.276424 -0.208365 0.347941 0.599286 0.800535 0
+-0.146234 -0.143088 0.320513 0.585141 0.602169 0.543141
+0.1143 -0.294872 -0.269233 0 1 0
+-0.479795 -0.0834202 0.320513 0 0 1
+0.388236 -0.371795 -0.350792 0 1 0
+-0.243871 0.349314 0.320513 0 0 1
+0.252974 -0.371795 -0.157116 0 1 0
+0.159202 -0.191709 0.371795 0 0 1
+0.5 0.0836048 -0.300796 1 0 0
+0.01101 -0.294872 0.073455 0 1 0
+0.374243 0.0486962 -0.371795 0 0 1
+0.00814463 0.371795 -0.0471905 0 1 0
+0.183921 -0.371795 -0.307692 0 1 0
+0.425466 0.294872 0.147162 0 1 0
+0.104161 -0.294872 -0.110873 0 1 0
+0.197475 -0.371795 -0.233218 0 1 0
+0.238273 -0.371795 0.172781 0 1 0
+0.378318 0.18902 0.320513 0 0 1
+-0.495721 -0.294872 -0.200946 0.63461 0.772698 -0.0144428
+0.150509 -0.371795 0.229745 0.0657679 0.997815 0.00637303
+-0.492416 0.298405 0.320513 -0.154478 -0.0124862 0.987917
+0.265053 -0.205832 0.371795 0 0 1
+0.456122 0.018955 -0.371795 0 0 1
+-0.343281 0.371795 0.040538 0 1 0
+-0.5 0.157339 0.00381328 1 0 0
+0.5 -0.186889 -0.0361194 1 0 0
+-0.275425 -0.371795 0.274798 0 1 0
+-0.221666 -0.0425165 -0.301723 -0.221674 0.975022 0.0139167
+0.224872 0.0379456 -0.217732 -0.155352 0.987502 0.0265655
+0.317163 -0.371795 -0.125473 0 1 0
+0.5 0.199999 0.00260371 1 0 0
+-0.5 0.089497 -0.175932 1 0 0
+0.29125 0.294872 -0.198084 0 1 0
+0.274276 0.166712 -0.333333 0 0 1
+-0.5 -0.0551398 -0.202235 1 0 0
+-0.195606 -0.260502 -0.371795 0 0 1
+-0.211619 -0.207835 0.371795 0 0 1
+-0.250919 -0.371795 -0.227332 0 1 0
+-0.281821 0.0135323 0.371795 0 0 1
+0.5 0.0583672 0.192285 1 0 0
+-0.5 -0.0249058 -0.190444 1 0 0
+0.117246 -0.256282 0.355939 0 1 0
+0.233792 0.294872 -0.103218 0 1 0
+-0.347708 0.371795 -0.28441 0 1 0
+0.162782 -0.371795 -0.0829436 0 1 0
+0.254431 0.294872 -0.262011 0 1 0
+-0.356633 0.0700109 -0.371795 0 0 1
+0.322746 0.291504 0.320513 0 0.259861 0.965646
+0.361748 0.294872 0.0332705 0 1 0
+0.5 -0.062126 -0.139612 1 0 0
+-0.5 0.112271 -0.300758 1 0 0
+0.26339 0.294872 0.152738 0 1 0
+0.466219 -0.126638 0.320513 0 0 1
+-0.477327 -0.294872 0.305787 0 1 0
+-0.0088 0.0973176 0.320513 0 0 1
+0.5 0.105828 0.19091 1 0 0
+-0.124622 -0.294872 0.0422987 0 1 0
+-0.5 -0.0394206 -0.0529508 1 0 0
+0.3938 0.00510746 -0.371795 0 0 1
+0.00829962 0.00576465 0.320513 0 0 1
+-0.225064 -0.331398 0.320513 0 0 1
+0.166006 -0.371795 -0.331797 0 1 0
+-0.5 0.217082 0.121551 1 0 0
+-0.347929 0.250095 -0.371795 0 0 1
+-0.220668 0.371795 -0.0498006 0 1 0
+0.107545 -0.0709288 0.320513 0 0 1
+-0.490158 -0.294872 -0.339925 0.109239 0.993265 -0.03863
+-0.5 -0.134495 0.116347 1 0 0
+-0.5 -0.189145 0.170409 1 0 0
+-0.131632 -0.0702368 0.320513 0 0 1
+-0.5 0.218889 0.00421667 1 0 0
+-0.291649 -0.301126 -0.371795 0 0 1
+0.237998 -0.03773 -0.309526 -0.202651 0.979251 0
+-0.00626627 -0.0687765 -0.333333 0 0 1
+-0.448718 -0.371769 0.050345 0.469601 0.88028 -0.0676927
+-0.307301 -0.371795 -0.361261 0.0372527 0.98995 0.136425
+-0.214223 0.371795 -0.184122 0 1 0
+0.243079 0.294872 -0.228666 0 1 0
+0.357031 0.294872 0.276788 0 1 0
+0.0349898 0.371795 -0.343224 0 1 0
+0.384376 -0.371795 -0.358574 0 1 0
+-0.457137 0.320006 -0.371795 0 0 1
+-0.5 0.110529 -0.211433 1 0 0
+-0.489153 0.371795 -0.0724652 -0.0892997 0.996004 0.00125116
+-0.0345978 -0.294872 0.279105 0 1 0
+0.013735 -0.204555 0.371585 -0.0100288 0.716401 0.697617
+0.201505 -0.318754 0.320513 0 0 1
+0.141026 0.357822 -0.293252 1 0 0
+-0.0257949 -0.294872 -0.0892239 0 1 0
+-0.40611 0.371795 -0.0316668 0 1 0
+0.141109 -0.337684 -0.0953901 1 0 0
+-0.0732241 0.371795 -0.235684 0 1 0
+0.139511 -0.0510192 -0.333333 0 0 1
+0.5 -0.17494 -0.164642 1 0 0
+0.0309626 0.0944618 0.320513 0 0 1
+-0.5 -0.241606 -0.146561 1 0 0
+-0.178548 -0.180655 0.371795 0 0 1
+-0.285939 -0.0924356 0.371795 0 0 1
+-0.5 0.0469691 -0.186054 1 0 0
+-0.00841129 -0.0751024 -0.333333 0 0 1
+0.324795 0.0328062 -0.371795 0.571895 0.0112453 0.82025
+-0.5 0.0280361 -0.359452 1 0 0
+0.10292 0.371795 -0.10319 0 1 0
+0.141109 -0.337786 -0.258137 1 0 0
+0.192322 0.000157973 -0.0989091 0.999766 -0.0212921 0.00386928
+0.338988 -0.247206 0.320513 0 0 1
+0.249831 -0.371795 0.230967 0 1 0
+0.5 0.162325 -0.143389 1 0 0
+-0.197004 0.371795 0.272889 0 1 0
+0.5 -0.140986 -0.268002 1 0 0
+0.239484 0.294872 -0.0484108 0 1 0
+-0.419047 0.371795 -0.211672 0 1 0
+0.350177 0.294872 -0.22004 0 1 0
+0.355145 -0.247259 0.320513 0 0 1
+0.0285321 -0.000675833 0.320513 0 0 1
+-0.271511 0.195662 0.371795 0 0 1
+-0.141154 -0.313897 0.0394896 1 0 0
+0.207642 0.0305802 -0.170189 -0.604014 0.796974 0
+0.293614 0.294872 0.176297 0 1 0
+0.0824049 0.0641767 0.320513 0 0 1
+0.141026 0.311962 0.246036 1 0 0
+0.109025 -0.101449 0.320513 0 0 1
+0.245632 -0.0353456 -0.270795 -0.394019 0.9191 0.00202329
+0.142586 0.294872 0.0533081 0.443833 0.896085 -0.00665243
+-0.5 -0.290687 0.239696 0.965562 0.253766 0.0573798
+-0.36103 -0.337554 -0.371795 0 0 1
+0.412398 -0.211488 -0.371795 0 0 1
+-0.498208 -0.294872 -0.20082 0.63461 0.772698 -0.0144428
+-0.183836 0.371795 -0.0173133 0 1 0
+0.239862 -0.323727 -0.371795 0 0 1
+-0.448718 -0.329356 -0.168011 1 0 0
+0.320513 0.00417269 -0.34266 0.990698 -0.0219355 0.134301
+0.0418938 0.117637 0.320513 0 0 1
+-0.259466 0.19155 0.371795 0 0 1
+0.5 -0.216643 0.164516 1 0 0
+0.499516 0.100218 -0.371795 -0.400416 0.250131 0.881534
+0.448718 -0.354625 0.226242 1 0 0
+0.456483 -0.0706932 0.320513 0 0 1
+-0.14394 -0.371795 -0.0762234 -0.349851 0.936353 -0.0291213
+-0.1685 -0.202316 -0.333333 0 0 1
+0.448718 -0.323577 0.0634027 1 0 0
+0.201042 0.294872 -0.111969 0 1 0
+0.276449 -0.371795 0.196266 0 1 0
+0.0642793 -0.294872 0.289084 0 1 0
+-0.5 0.265924 -0.264506 1 0 0
+-0.4606 0.289473 0.320513 0 0 1
+-0.0108833 -0.152618 0.320513 0 0 1
+0.376603 0.0607228 0.355474 0.977143 0.212583 0
+-0.5 -0.091244 -0.048983 1 0 0
+-0.5 0.216722 -0.350434 1 0 0
+-0.141154 -0.317577 0.21953 1 0 0
+-0.385123 -0.371795 -0.210493 0 1 0
+0.141109 -0.347523 -0.26901 1 0 0
+0.266721 -0.013563 -0.161268 0.933823 -0.357664 0.00708428
+-0.141154 -0.307722 0.291609 1 0 0
+0.483184 -0.294872 0.119947 0 1 0
+0.0746851 -0.0246745 0.320513 0 0 1
+-0.5 -0.166612 -0.0108926 1 0 0
+-0.5 -0.193809 0.247494 1 0 0
+0.5 -0.205854 -0.33769 1 0 0
+-0.240907 -0.0422394 -0.0690928 0.16292 0.986419 0.0208258
+-0.129965 -0.294872 -0.0379196 0 1 0
+-0.0245964 -0.125949 0.320513 0 0 1
+0.128261 0.221723 -0.333333 0.00193567 0.12551 0.99209
+-0.320002 0.366357 -0.371795 0.161016 -0.320604 0.933428
+0.231449 0.038402 -0.15054 0.0135085 0.999881 0.00738735
+0.5 0.240857 -0.0154758 1 0 0
+-0.24113 -0.371795 0.09314 0 1 0
+-0.405213 -0.217263 0.320513 0 0 1
+0.482592 -0.0166656 -0.371795 0 0 1
+-0.0974269 -0.294872 0.0227083 0 1 0
+-0.317534 0.231747 -0.371795 0 0 1
+0.5 -0.0489364 -0.236347 1 0 0
+0.478343 -0.294872 0.280123 0 1 0
+0.45085 0.294872 0.157634 0 1 0
+0.211383 -0.230897 -0.362234 -0.058025 0.992129 -0.110966
+0.337269 0.27382 0.320513 0 0 1
+0.064666 -0.104311 0.320513 0 0 1
+-0.0706498 0.371795 0.019779 0 1 0
+-0.5 -0.0917096 0.31102 0.999349 -0.0055724 -0.0356559
+0.18062 0.294872 0.215545 0 1 0
+0.0152806 0.371795 -0.322196 0 1 0
+-0.471457 0.0191805 -0.371795 0 0 1
+-0.334089 -0.151533 0.343903 0.800552 0.599264 0
+0.418138 -0.371795 0.14076 0 1 0
+0.168321 0.00853256 -0.333333 0 0 1
+-0.147923 -0.116366 -0.333333 0 0 1
+-0.182207 0.371795 0.108352 0 1 0
+0.448718 -0.302489 -0.289698 0.99127 -0.122383 0.0490454
+0.466514 0.294872 -0.255632 0 1 0
+0.272285 0.225146 -0.333393 0.0690361 0.408373 0.910201
+0.174744 0.0285137 -0.333333 0 0 1
+0.5 0.0245381 -0.0848061 1 0 0
+-0.48868 -0.294872 0.000437888 0 1 0
+0.129858 -0.0979782 -0.333333 0 0 1
+-0.216624 0.169067 -0.333333 0 0 1
+-0.26757 -0.0231506 -0.131154 0.859224 0.511587 -0.00359745
+0.37191 -0.262366 -0.371795 0 0 1
+-0.261962 0.371795 0.130193 0 1 0
+0.485706 -0.108274 -0.371795 0 0 1
+-0.282398 0.371795 0.0126638 0 1 0
+0.110936 0.371795 -0.265461 0 1 0
+0.447626 -0.272686 0.320513 0 0 1
+-0.5 -0.173803 0.030395 1 0 0
+-0.492509 0.0466363 -0.371795 0.290934 0.058398 0.954959
+-0.5 -0.139887 -0.0397664 1 0 0
+0.310114 0.294872 -0.00417927 0 1 0
+0.240789 -0.371795 0.127655 0 1 0
+0.5 -0.149164 -0.0221654 1 0 0
+0.448718 -0.362321 -0.179864 0.988916 -0.136822 -0.0576664
+0.468757 -0.153574 0.320513 0 0 1
+0.121898 0.0856547 0.320513 0 0 1
+0.292916 0.212985 -0.334638 0.586232 0.772811 0.243094
+-0.0819069 -0.294872 -0.0384705 0 1 0
+0.319328 0.294872 -0.339054 0 1 0
+0.355262 -0.145138 0.320513 0 0 1
+-0.229878 -0.371795 0.243306 0 1 0
+-0.035985 -0.0448392 -0.333333 0 0 1
+-0.323555 -0.371795 -0.300316 0 1 0
+0.247501 0.251074 -0.371795 0 0 1
+0.5 0.0971143 0.282102 1 0 0
+0.142103 0.189782 -0.333333 0 0 1
+0.0850619 -0.294872 0.0521524 0 1 0
+0.332781 0.220993 0.320513 0 0 1
+0.2109 0.0580653 0.371795 0 0 1
+-0.22695 -0.197782 0.371795 0 0 1
+-0.448718 -0.34159 0.0165863 1 0 0
+0.0830006 0.17596 0.320513 0 0 1
+0.439286 -0.371795 0.280328 -0.190979 0.981496 -0.0139008
+-0.149414 0.2601 0.320513 -0.0205474 0.196288 0.980331
+-0.5 0.137644 0.175606 1 0 0
+0.432315 0.273178 -0.371795 0 0 1
+0.253642 -0.132444 -0.333333 0 0 1
+0.5 -0.221799 -0.00660028 1 0 0
+-0.0652782 0.154435 0.320513 0 0 1
+-0.441808 -0.371795 -0.266466 0.262004 0.96417 -0.041603
+-0.165004 0.371795 -0.0819558 0 1 0
+-0.131472 0.371795 0.305518 0 1 0
+0.126648 0.371795 0.211422 0 1 0
+0.327494 -0.371795 -0.318444 0 1 0
+-0.276849 0.371795 -0.0556545 0 1 0
+-0.136894 0.315563 -0.371795 0 0 1
+0.5 -0.294578 -0.0670873 -0.491583 0.860359 -0.134643
+-0.4423 -0.137538 0.320513 0 0 1
+-0.196173 -0.0585974 0.36628 0.924022 0.27155 0.269153
+-0.314489 -0.371795 0.129515 0 1 0
+-0.0440605 -0.173991 -0.333333 0 0 1
+0.5 0.0256128 -0.16957 1 0 0
+-0.0624425 -0.176565 -0.333333 0 0 1
+0.5 -0.00287996 -0.343462 1 0 0
+-0.5 -0.0767051 0.213774 1 0 0
+0.0936743 -0.294872 -0.0428265 0 1 0
+0.162772 -0.371795 -0.0302519 0 1 0
+0.341812 0.294872 0.0437727 0 1 0
+-0.5 0.0941267 -0.0285514 1 0 0
+-0.096803 0.0960083 -0.333333 0 0 1
+0.0945676 0.371795 0.151296 0 1 0
+-0.5 0.242664 -0.202236 1 0 0
+0.5 -0.18159 0.0370478 1 0 0
+0.383168 0.112513 -0.371795 0 0 1
+0.221167 -0.371795 0.131975 0 1 0
+0.193694 0.294872 0.226005 0 1 0
+-0.5 0.0868375 0.248426 1 0 0
+0.298083 -0.343468 0.320513 0 0 1
+-0.5 -0.0215443 -0.129273 1 0 0
+0.389642 -0.371795 -0.178161 0 1 0
+0.0370881 0.324187 0.320513 0 0 1
+0.0771579 -0.206308 0.371795 0 0 1
+0.0864328 -0.0195948 0.320513 0 0 1
+-0.202199 0.371795 -0.159557 0 1 0
+-0.14649 0.0956931 0.320513 0 0 1
+0.5 0.0388813 0.194844 1 0 0
+0.10973 -0.294872 0.0171702 0 1 0
+0.220054 -0.371795 0.233899 0 1 0
+-0.5 -0.0961229 -0.127837 1 0 0
+0.11974 0.256282 0.348579 0 1 0
+0.5 0.294223 0.170606 0.710146 0.699346 0.0812864
+-0.5 -0.170499 0.00144297 1 0 0
+0.480879 -0.0759593 0.320513 0 0 1
+0.181892 -0.119459 0.371795 0 0 1
+0.5 -0.183672 0.148724 1 0 0
+-0.5 0.2615 0.239716 1 0 0
+0.318195 0.171524 0.352157 0.726374 0.687283 0.00474501
+-0.219819 0.0420216 -0.278445 0.237155 0.971377 0.0136093
+-0.388645 0.371795 0.143865 0 1 0
+-0.133735 0.371795 -0.200201 0 1 0
+0.237202 -0.298833 0.320513 0 0 1
+-0.0456081 -0.204551 -0.333333 0 0 1
+-0.448718 -0.319435 0.0916463 1 0 0
+-0.0397769 0.371795 -0.219038 0 1 0
+0.5 0.203138 -0.174261 1 0 0
+-0.177482 -0.371795 -0.0725081 0 1 0
+0.443478 0.294872 -0.204061 0 1 0
+0.196651 0.294872 0.252758 0 1 0
+-0.189351 -0.129071 -0.333333 0 0 1
+-0.420673 0.348904 -0.371795 0 0 1
+0.117148 -0.113507 -0.333333 0 0 1
+-0.22201 0.061553 0.371795 0 0 1
+0.264349 -0.0186498 -0.0531236 0.888717 -0.45814 -0.01703
+-0.5 -0.172751 -0.24455 1 0 0
+0.228816 0.294872 0.195572 0 1 0
+-0.311332 0.371795 -0.0717529 0 1 0
+-0.0567525 -0.116398 -0.333333 0 0 1
+-0.241304 0.328982 0.320513 0 0 1
+-0.0778451 0.371795 -0.142885 0 1 0
+0.106917 0.371795 0.21724 0 1 0
+0.219082 0.064562 -0.333333 0 0 1
+0.5 0.0958985 -0.23395 1 0 0
+0.5 -0.169736 -0.211504 1 0 0
+-0.107372 -0.127108 -0.333333 0 0 1
+-0.481528 -0.0880264 -0.371795 0 0 1
+0.16385 -0.297405 -0.371795 0 0 1
+0.0686998 0.371795 -0.164259 0 1 0
+-0.145845 0.371795 0.283394 0 1 0
+-0.334181 0.25428 0.320513 0 0 1
+-0.386101 -0.266835 -0.371795 0 0 1
+0.457663 0.294872 0.208468 0 1 0
+0.5 0.0491318 0.0193948 1 0 0
+-0.220394 0.230897 -0.370285 0.0787913 0.939091 0.334515
+0.11806 0.22194 -0.333333 -0.0271419 0.08573 0.995949
+-0.478897 0.0672962 -0.371795 0 0 1
+0.311015 0.294872 0.205692 0 1 0
+0.0877775 -0.294872 -0.0144606 0 1 0
+0.117919 0.371795 -0.108323 0 1 0
+0.406123 -0.165229 -0.371795 0 0 1
+-0.161829 0.371795 0.247718 0 1 0
+0.5 -0.0202384 -0.0086005 1 0 0
+-0.358519 0.0584606 0.371795 0 0 1
+-0.131009 0.371795 0.0225712 0 1 0
+0.219457 -0.0366357 -0.104591 0.249971 0.968157 0.0136674
+0.0572253 0.371795 -0.242826 0 1 0
+-0.5 0.363791 0.30637 0.994995 -0.0914663 0.0402236
+-0.5 0.088495 -0.294734 1 0 0
+0.483951 0.0590191 -0.371795 0 0 1
+0.108562 0.173838 0.352684 0.485082 0.874469 0
+-0.10396 0.173994 0.320513 0.18515 -0.414008 0.891245
+0.491896 0.294872 -0.286727 0.124964 0.991335 -0.0404787
+-0.5 0.169392 -0.0191569 1 0 0
+-0.353496 0.262453 0.320513 0 0 1
+0.0369692 -0.12531 -0.333333 0 0 1
+0.5 0.199248 0.314779 0.865089 0.165735 0.473449
+-0.5 0.202216 -0.0499232 1 0 0
+-0.325766 0.371795 0.18077 0 1 0
+0.185317 -0.371795 -0.238063 0 1 0
+0.152293 -0.32057 -0.371795 0.0108796 0.00503622 0.999928
+-0.416408 -0.371795 -0.349575 0 1 0
+-0.5 -0.225016 0.111319 1 0 0
+-0.105748 0.371795 -0.349705 0 1 0
+-0.481996 0.275328 -0.371795 0 0 1
+-0.0600235 -0.294872 -0.00606796 0 1 0
+0.5 0.216892 0.139445 1 0 0
+-0.5 -0.165252 0.0945642 1 0 0
+-0.5 0.219162 0.0735522 1 0 0
+-0.5 -0.00357143 -0.231201 1 0 0
+-0.379084 -0.0493208 0.351461 0.977146 0.212571 0
+-0.5 0.00581491 -0.295212 1 0 0
+0.130099 0.175614 -0.333333 0 0 1
+0.141026 0.306678 -0.126522 0.999615 0.0270764 -0.00598832
+0.5 -0.0396962 0.204403 1 0 0
+-0.015027 0.371795 0.0845235 0 1 0
+0.145282 0.294872 -0.32 0.514126 0.856466 -0.0462638
+0.5 0.119832 -0.368113 0.946977 -0.0306988 -0.319831
+-0.246094 -0.371795 -0.295347 0 1 0
+-0.5 -0.0636365 -0.294065 1 0 0
+0.0200604 -0.256282 0.35088 0 1 0
+0.278368 -0.20691 0.365396 -0.560189 0.800991 -0.21119
+0.358005 -0.371795 -0.0711422 0 1 0
+-0.155328 -0.261137 0.320513 -0.0921067 -0.170489 0.981045
+-0.218687 0.0417182 -0.169263 0.328913 0.944303 0.0103967
+-0.23475 0.371795 0.114463 0 1 0
+-0.115211 0.166826 0.320513 0.428943 -0.468783 0.772173
+0.0249185 0.371795 -0.23479 0 1 0
+-0.4462 0.014427 0.320513 0 0 1
+-0.278347 0.371795 0.251882 0 1 0
+-0.5 -0.217153 0.200803 1 0 0
+0.000226655 0.20221 -0.333333 0 0 1
+0.141109 -0.340596 -0.297398 1 0 0
+0.17489 -0.101339 -0.333333 0 0 1
+-0.448718 -0.333204 -0.14508 1 0 0
+0.0205034 -0.294872 0.171164 0 1 0
+0.186669 -0.20454 0.371795 0 0 1
+0.5 -0.24836 -0.0716881 1 0 0
+-0.0349542 0.0347161 0.320513 0 0 1
+-0.0601183 -0.294872 -0.146692 0 1 0
+0.40832 0.294872 -0.00487263 0 1 0
+-0.378113 0.0028107 0.371795 -0.173759 0.0804913 0.981493
+-0.18774 0.00639931 -0.28771 0.991829 0.127227 -0.00941266
+-0.28016 0.00800757 -0.333333 -0.361917 -0.10372 0.926422
+0.125341 0.371795 -0.347791 0 1 0
+0.499563 0.256169 -0.371795 0.721934 -0.249597 -0.645377
+-0.350894 -0.0951879 -0.371795 0 0 1
+0.5 -0.00222649 -0.11955 1 0 0
+-0.431678 -0.371795 -0.147189 0 1 0
+-0.00210327 -0.294872 0.00598573 0 1 0
+-0.0803669 0.371795 -0.18963 0 1 0
+0.393569 -0.371795 -0.0756135 0 1 0
+-0.212846 -0.186141 0.371795 0 0 1
+0.00483795 0.371795 -0.190614 0 1 0
+0.5 0.207685 -0.243234 1 0 0
+0.5 -0.242436 -0.165314 1 0 0
+-0.0810557 0.371795 0.255234 0 1 0
+0.448718 -0.332095 -0.0581701 1 0 0
+0.5 0.188868 0.134419 1 0 0
+0.240064 -0.166791 -0.333333 0 0 1
+-0.415901 0.174098 0.320513 0 0 1
+-0.392737 -0.371795 0.0457354 0 1 0
+0.439346 0.175997 0.320513 0 0 1
+-0.280253 -0.147728 -0.333333 0 0 1
+0.170845 -0.371795 0.313487 -0.0062171 0.998513 -0.0541629
+0.0833316 0.371795 -0.157873 0 1 0
+-0.5 0.254748 0.0371679 1 0 0
+-0.330821 -0.328973 0.320513 0 0 1
+-0.187601 -0.00481976 -0.0591924 0.995228 -0.0962369 0.0161126
+0.135134 -0.294872 -0.33651 0.205538 0.978408 -0.0217187
+-0.220287 -0.042147 -0.274849 -0.222539 0.974919 -0.0032133
+0.498643 0.0609434 -0.371795 0.808593 -0.120498 -0.575897
+0.356678 0.258917 -0.371795 0 0 1
+0.5 0.231454 0.16073 1 0 0
+0.377802 -0.371795 -0.306844 0 1 0
+0.189831 -0.103263 0.371795 0 0 1
+-0.137936 -0.294872 0.161847 -0.293349 0.955997 -0.00400905
+-0.498257 0.371795 0.28776 -0.537601 0.839002 0.0840254
+-0.448718 -0.304993 0.0584717 1 0 0
+0.318985 0.168673 -0.36262 0.984719 0.173858 -0.0101269
+0.0784573 0.371795 0.070814 0 1 0
+-0.0380328 0.189784 -0.333333 0 0 1
+0.5 -0.0982363 -0.165077 1 0 0
+0.269002 0.00261821 -0.184535 0.999464 0.0318067 -0.00769784
+0.5 -0.155177 -0.115632 1 0 0
+-0.172755 -0.248028 0.371795 -0.119138 -0.261182 0.957909
+0.328977 -0.371795 0.186277 0 1 0
+0.0555393 0.22668 -0.333333 0.0338292 0.437596 0.898535
+-0.0866477 0.0116666 0.320513 0 0 1
+0.448718 -0.350915 0.0418626 1 0 0
+-0.104485 0.371795 0.295168 0 1 0
+-0.0167254 -0.220773 0.371795 0 0 1
+0.0637069 0.189985 0.320513 -0.297357 -0.434193 0.850326
+0.112688 0.175033 0.371795 -0.195094 -0.299661 0.933885
+0.5 0.0720635 -0.179527 1 0 0
+-0.398026 -0.0692185 -0.371795 0 0 1
+0.252962 0.294872 0.140566 0 1 0
+0.448718 -0.332688 0.287787 1 0 0
+-0.300807 0.371795 0.173104 0 1 0
+-0.30515 -0.199659 -0.368306 0.811399 0.435173 -0.3902
+-0.0331586 -0.0905682 -0.333333 0 0 1
+0.370181 -0.371795 -0.0109326 0 1 0
+-0.2294 -0.109595 -0.333333 0 0 1
+0.282484 -0.371795 0.120498 0 1 0
+0.448718 -0.331638 0.287903 1 0 0
+0.141026 0.317764 0.00516754 1 0 0
+-0.5 0.157547 -0.220866 1 0 0
+0.0762462 -0.0774475 0.320513 0 0 1
+0.489393 -0.0847165 0.320513 0.0904132 0.0332217 0.99535
+0.348136 -0.371795 -0.333607 0 1 0
+-0.0934224 -0.294872 0.276259 0 1 0
+0.092148 0.0252334 0.320513 0 0 1
+-0.254793 -0.371795 0.0523657 0 1 0
+0.5 0.271935 -0.080053 1 0 0
+-0.141154 -0.305052 -0.18363 0.996938 -0.0781415 -0.00298632
+0.206853 0.0568054 0.371795 0 0 1
+0.475121 -0.158511 -0.371795 0 0 1
+-0.141154 -0.334028 0.0771055 1 0 0
+0.498861 -0.294872 -0.287658 -0.626829 0.777623 -0.0488683
+0.406046 -0.0812339 0.320513 0 0 1
+0.245096 -0.0917508 -0.333333 0 0 1
+0.213635 -0.132716 -0.333333 0 0 1
+0.0539782 0.256282 0.357243 0 1 0
+-0.5 -0.139684 0.224631 1 0 0
+0.264289 -0.371795 0.0169621 0 1 0
+-0.117852 0.309614 -0.371795 0 0 1
+-0.405012 -0.00643895 0.320513 0 0 1
+0.154721 -0.371795 0.00526252 0 1 0
+-0.469818 0.206095 -0.371795 0 0 1
+-0.271827 -0.371795 -0.107608 0 1 0
+0.365892 -0.287707 -0.371795 0 0 1
+0.227208 -0.371795 0.311205 0.028774 0.963482 -0.266223
+-0.0416208 -0.294872 -0.155297 0 1 0
+-0.215433 0.0407612 -0.256968 0.300811 0.95367 0.00503116
+0.141109 -0.337595 -0.271785 1 0 0
+0.279165 -0.206313 0.363013 -0.600223 0.799665 -0.01636
+-0.44805 -0.371795 -0.249394 0.763617 0.61779 0.187685
+-0.342763 -0.371795 0.0911603 0 1 0
+-0.5 -0.102288 -0.286818 1 0 0
+0.5 0.15941 -0.00274371 1 0 0
+-0.221593 -0.197908 -0.333333 0 0 1
+0.084515 0.281358 0.320513 0 0 1
+0.141026 0.345722 -0.296964 1 0 0
+-0.163145 -0.124282 0.356318 0.810355 0.585939 0
+-0.448718 -0.369146 0.00289021 0.860714 0.490132 0.13763
+0.5 0.190235 0.0992358 1 0 0
+0.267032 0.294872 -0.270149 0 1 0
+0.492543 -0.0774541 -0.371795 -0.406019 0.0874786 0.909668
+0.412052 0.0175984 0.320513 0 0 1
+0.5 0.09307 -0.221782 1 0 0
+0.489605 -0.294872 -0.0439653 -0.033009 0.999454 0.00104107
+-0.5 0.093128 -0.105613 1 0 0
+0.448718 -0.332342 0.0902561 1 0 0
+-0.5 -0.218899 -0.160647 1 0 0
+0.5 -0.278237 -0.0585128 1 0 0
+-0.166504 0.253714 0.320513 -0.122137 0.901858 0.414408
+-0.196246 -0.0583111 0.342176 0.96718 0.254093 0
+0.401627 -0.371795 0.188345 0 1 0
+0.5 -0.199204 0.0409575 1 0 0
+0.378346 -0.0527139 0.329512 0.966952 -0.252248 0.0370851
+-0.5 0.282567 0.148448 1 0 0
+-0.194073 0.371795 -0.113889 0 1 0
+-0.5 0.00972585 -0.315119 1 0 0
+-0.397823 -0.054348 -0.371795 0 0 1
+0.5 0.0380032 -0.0413268 1 0 0
+0.196901 0.0180296 -0.308997 0.856326 -0.516238 -0.0142845
+0.141026 0.334434 -0.230947 1 0 0
+-0.41994 0.0714904 0.320513 0 0 1
+-0.480515 -0.294872 0.15988 0 1 0
+0.0248282 0.371795 -0.205652 0 1 0
+-0.5 0.146078 -0.112329 1 0 0
+-0.5 0.251164 0.23135 1 0 0
+-0.232691 -0.371795 -0.356901 0 1 0
+0.473374 -0.294872 -0.145201 0 1 0
+0.17102 0.294872 -0.135792 0 1 0
+-0.5 -0.184325 -0.367232 0.939963 0.107196 0.324005
+0.284237 0.294872 -0.255194 0 1 0
+-0.342485 -0.130475 0.371795 -0.216628 -0.16331 0.962498
+0.368353 -0.103952 -0.371795 0 0 1
+0.227846 -0.371795 -0.316738 0 1 0
+-0.376778 0.371795 -0.311561 0 1 0
+0.0406809 0.371795 0.170353 0 1 0
+-0.486187 0.259525 -0.371795 0 0 1
+0.134873 -0.294872 0.0199356 0.276006 0.960756 0.027735
+-0.0271287 -0.280765 0.320513 0 0 1
+0.141109 -0.313025 0.0563737 1 0 0
+0.5 -0.123363 -0.123406 1 0 0
+-0.352251 0.263104 0.320513 0 0 1
+-0.0550825 0.371795 -0.17273 0 1 0
+0.487326 0.10865 -0.371795 0 0 1
+-0.457936 -0.0162551 -0.371795 0 0 1
+-0.0771454 0.371795 0.190797 0 1 0
+0.445523 -0.371795 -0.252138 -0.410742 0.910825 0.0410927
+0.5 0.255917 -0.030362 1 0 0
+-0.276997 0.371795 0.176446 0 1 0
+-0.366199 0.359607 0.320513 0 0 1
+-0.363216 0.305341 0.320513 0 0 1
+0.448718 -0.332478 -0.279919 1 0 0
+-0.261525 0.030655 -0.0914057 0.708784 -0.705308 -0.0128419
+0.258292 -0.220223 0.356814 -0.479231 0.877689 0
+0.5 -0.284633 0.27231 0.996692 -0.0809047 -0.00768956
+0.5 0.18251 0.0483497 1 0 0
+-0.24468 0.224883 -0.333333 -0.0465332 0.331527 0.942297
+0.141109 -0.339665 0.273666 1 0 0
+0.150578 -0.0658921 0.320513 0 0 1
+0.3149 0.182372 -0.359511 0.933438 0.358573 -0.0108815
+-0.354615 -0.120317 -0.371795 0 0 1
+-0.5 -0.233122 0.00310555 1 0 0
+0.0718359 0.0907394 0.320513 0 0 1
+0.205793 -0.0998751 -0.333333 0 0 1
+0.438933 0.192034 -0.371795 0 0 1
+0.126055 0.371795 -0.0666219 0 1 0
+-0.5 0.31164 -0.171457 1 0 0
+0.270454 0.294872 -0.142504 0 1 0
+0.250468 -0.0329807 -0.116076 -0.513186 0.855177 0.0728936
+-0.0774295 0.371795 -0.266273 0 1 0
+-0.5 0.368712 0.11509 0.969255 -0.242075 0.0441044
+0.5 0.267594 -0.0462131 1 0 0
+-0.464902 -0.294872 0.228488 0 1 0
+0.405355 -0.302044 -0.371795 0 0 1
+0.0559023 0.371795 0.147023 0 1 0
+0.158517 0.294872 0.161597 0 1 0
+-0.220741 0.0102717 0.371795 0 0 1
+-0.155554 0.129305 0.320513 0.363622 -0.50545 0.782496
+0.164032 0.162862 -0.333333 0 0 1
+-0.259421 0.0327588 -0.321323 -0.657975 0.753021 -0.00526503
+0.0761395 -0.294872 -0.274924 0 1 0
+0.0987117 0.234728 0.371795 0 0 1
+-0.5 0.247507 -0.0568608 1 0 0
+-0.0714723 0.371795 0.254239 0 1 0
+0.330011 -0.131649 0.371795 0 0 1
+0.5 -0.218036 -0.107737 1 0 0
+0.5 0.122707 -0.196766 1 0 0
+0.320513 -0.0915398 -0.342761 0.987182 -0.0994026 0.124866
+-0.131513 -0.294872 -0.0672563 -0.288993 0.955549 -0.0583819
+0.095799 0.371795 0.294751 0 1 0
+-0.312353 0.177366 0.350156 0.707107 -0.707107 0
+0.40224 -0.178174 -0.371795 0 0 1
+-0.200116 -0.371795 -0.00393275 0 1 0
+0.317964 -0.172482 -0.363492 0.964976 -0.243493 0.0976336
+0.141026 0.368117 -0.257454 0.883523 0.457921 0.0984642
+-0.424864 0.371795 -0.269063 0 1 0
+-0.5 0.0919659 -0.105698 1 0 0
+0.360018 0.0835387 -0.371795 0 0 1
+-0.0948616 -0.294872 -0.0207696 0 1 0
+-0.5 0.297609 -0.238466 1 0 0
+0.5 0.250086 0.295236 1 0 0
+0.5 -0.127448 -0.0509003 1 0 0
+0.201235 0.0386098 0.358963 0.973065 0.230532 0
+0.5 -0.0444961 -0.000713935 1 0 0
+-0.100592 0.0768626 -0.333333 0 0 1
+0.371499 -0.371795 -0.24759 0 1 0
+0.420284 -0.371795 -0.0407797 0 1 0
+0.5 -0.0815351 0.28188 1 0 0
+0.234342 -0.371795 -0.116886 0 1 0
+-0.451302 0.371795 0.178943 0 1 0
+0.141109 -0.355671 -0.0746001 1 0 0
+-0.150934 -0.0336217 0.320513 0 0 1
+0.308125 -0.371795 -0.0380543 0 1 0
+0.5 0.169336 -0.0287223 1 0 0
+-0.169 0.232846 -0.371795 0.0894597 0.667409 0.739299
+-0.5 0.306849 -0.0435198 1 0 0
+0.5 -0.115482 0.0915415 1 0 0
+-0.385474 0.0815978 0.320513 0 0 1
+-0.413551 0.371795 0.012966 0 1 0
+0.214443 0.133018 0.371795 0 0 1
+0.317595 -0.337022 -0.371795 0 0 1
+0.384052 0.294872 0.13903 0 1 0
+-0.320513 0.137974 -0.362249 0.998548 -0.0210322 -0.0495956
+-0.422452 0.0300271 0.320513 0 0 1
+-0.5 -0.0510537 -0.258222 1 0 0
+0.0537199 0.371795 0.241791 0 1 0
+0.5 -0.129188 0.211036 1 0 0
+0.276359 0.21233 0.320513 0.36254 0.343188 0.866479
+0.5 -0.257315 0.107013 1 0 0
+-0.470778 0.371795 -0.0747427 0 1 0
+-0.5 -0.293712 -0.0482219 0.879527 0.454752 0.140118
+0.178142 0.17082 -0.333333 0 0 1
+-0.448718 -0.338546 -0.138583 1 0 0
+-0.300617 -0.0757829 0.371795 0 0 1
+0.0122019 -0.175121 0.320513 0 0 1
+-0.150434 -0.371795 -0.129514 -0.164887 0.98033 -0.10847
+-0.378528 0.371795 0.301519 0 1 0
+0.5 0.169351 0.276222 1 0 0
+0.251333 0.294872 0.027376 0 1 0
+-0.105491 0.0413051 -0.333333 0 0 1
+-0.5 -0.205973 -0.348089 1 0 0
+0.5 0.28457 -0.0695701 1 0 0
+-0.240133 0.106584 0.371795 0 0 1
+0.0983645 0.0975504 0.320513 0 0 1
+0.139273 0.371795 -0.154927 0.624109 0.769725 0.134208
+-0.365772 0.0945453 0.354619 0.93694 -0.349489 0
+-0.178568 0.371795 -0.129916 0 1 0
+-0.194439 -0.253493 0.320513 0.00343669 -0.107379 0.994212
+0.5 -0.114668 0.205753 1 0 0
+-0.184514 0.0840948 -0.333333 0 0 1
+-0.239234 0.371795 0.30874 0 1 0
+-0.429863 0.0173088 -0.371795 0 0 1
+-0.267739 0.0229095 -0.120751 0.852673 -0.522412 -0.00583423
+0.242965 0.294872 0.282944 0 1 0
+-0.475174 0.0809415 0.320513 0 0 1
+-0.5 -0.259274 -0.156791 1 0 0
+-0.244148 -0.109086 -0.333333 0 0 1
+0.0556762 0.226602 0.371795 0 0 1
+-0.256162 -0.371795 -0.370297 -0.0723224 0.781617 0.619552
+0.0347851 0.290877 0.320513 0 0 1
+-0.333017 -0.0586018 0.371795 0 0 1
+-0.0834241 -0.230897 -0.371137 0.0773542 0.778066 -0.623401
+0.5 0.137974 0.049386 1 0 0
+-0.141154 -0.308707 -0.25315 1 0 0
+0.5 -0.114651 -0.171163 1 0 0
+0.366163 -0.228632 -0.371795 0 0 1
+0.493965 0.227112 0.320513 0.363114 0.106911 0.925591
+-0.238183 0.371795 -0.0696381 0 1 0
+0.5 0.053044 -0.0489526 1 0 0
+0.5 0.00562482 0.307346 1 0 0
+-0.244705 -0.371795 -0.0205146 0 1 0
+0.360373 -0.298732 0.320513 0 0 1
+-0.410381 0.355419 -0.371795 0 0 1
+0.474708 -0.294872 -0.13103 0 1 0
+0.223923 -0.31944 -0.371795 0 0 1
+-0.5 0.264703 -0.0921514 1 0 0
+0.192352 -0.000508183 -0.145229 0.999612 0.00356779 -0.0276232
+-0.126277 0.371795 0.295336 0 1 0
+0.379197 0.0488008 0.335932 0.977148 0.212562 0
+-0.5 -0.224261 0.109419 1 0 0
+0.0368889 0.246164 0.371795 0 0 1
+-0.5 -0.133601 0.206126 1 0 0
+0.448718 -0.358796 -0.0356411 1 0 0
+0.194045 0.0109835 -0.169502 0.954045 -0.299579 0.00708872
+-0.39117 -0.278506 0.320513 0 0 1
+-0.304752 -0.366884 -0.371795 0.121923 0.324715 0.93792
+-0.286097 -0.371795 0.130434 0 1 0
+0.0964498 -0.107073 -0.333333 0 0 1
+-0.385863 0.278323 0.320513 0 0 1
+0.141109 -0.323812 -0.0189633 1 0 0
+0.434172 -0.321393 -0.371795 0 0 1
+0.5 0.0132555 -0.366158 0.916219 0.0880185 -0.390891
+0.5 -0.202871 -0.0381943 1 0 0
+0.156199 -0.371795 -0.244377 0 1 0
+-0.152098 0.230897 -0.34773 0 1 0
+-0.5 0.299169 -0.189088 1 0 0
+-0.251954 0.112714 0.371795 0 0 1
+-0.5 0.302194 0.232346 1 0 0
+0.197395 0.0702333 0.371795 -0.422701 0.114983 0.898945
+-0.278066 -0.371795 -0.357113 0 1 0
+-0.141154 -0.362328 0.02758 0.998581 -0.0528784 -0.00632912
+0.00305775 0.096558 0.320513 0 0 1
+-0.5 0.0576234 -0.107071 1 0 0
+0.093374 0.256282 0.367362 0.133737 0.922262 0.362694
+-0.26404 -0.0281395 -0.237554 0.778659 0.6273 -0.013633
+0.247456 0.294872 -0.0020271 0 1 0
+0.341986 -0.371795 0.161004 0 1 0
+0.0385462 -0.293391 -0.371795 -0.132045 0.388697 0.911854
+0.448718 -0.312397 0.150982 1 0 0
+-0.216297 0.301851 -0.371795 0 0 1
+0.382665 0.0254795 0.323162 0.831344 0.063071 0.552167
+-0.174656 0.122193 -0.333333 0 0 1
+0.11871 -0.174825 0.371795 -0.166503 0.173201 0.97071
+-0.182947 0.249699 0.358845 -0.212572 0.977145 0
+0.0883161 0.371795 0.273252 0 1 0
+0.126589 0.371795 -0.367637 0.076069 0.926398 -0.368783
+0.311494 -0.371795 -0.333274 0 1 0
+-0.5 0.293493 -0.147504 1 0 0
+-0.5 0.0783761 -0.0633057 1 0 0
+0.41027 0.294872 0.273448 0 1 0
+-0.480468 -0.294872 -0.0227428 0 1 0
+-0.238883 -0.371795 -0.329411 0 1 0
+-0.293791 -0.0368325 -0.333333 0 0 1
+-0.5 0.249552 0.0754252 1 0 0
+-0.413284 -0.145507 0.320513 0 0 1
+-0.187497 -0.00363122 -0.298568 0.99779 -0.0664384 -0.000906714
+-0.238645 0.306051 -0.371795 0 0 1
+0.437259 0.055903 0.320513 0 0 1
+-0.052361 -0.294872 0.113167 0 1 0
+0.204094 -0.0140301 0.335959 0.996564 -0.0828292 -0.000179886
+-0.0146444 0.0974422 -0.333333 0 0 1
+-0.260045 -0.0321347 -0.157068 0.670659 0.74162 0.014709
+0.43542 0.294872 -0.242819 0 1 0
+0.417033 0.151693 -0.371795 0 0 1
+0.0989892 0.286167 0.320513 0 0 1
+0.398756 -0.274105 -0.371795 0 0 1
+-0.382108 -0.117637 -0.371795 0 0 1
+0.313864 -0.0829379 0.371795 0 0 1
+0.0541981 0.197668 0.338976 0.282306 0.95932 -0.00268551
+0.5 0.169116 -0.107982 1 0 0
+-0.271465 0.077573 -0.333333 0 0 1
+-0.226596 -0.371795 -0.287563 0 1 0
+0.12041 -0.288735 -0.371795 0.0324663 0.253453 0.966803
+0.141026 0.297157 -0.149592 0.813468 0.578086 -0.0639239
+0.392699 -0.323735 -0.371795 0 0 1
+0.272003 -0.203262 0.371795 0.217466 -0.239737 0.946169
+-0.219873 0.217266 -0.333333 0 0 1
+0.136143 -0.294872 -0.0635953 0.136313 0.990489 -0.0187043
+-0.465774 -0.152515 0.320513 0 0 1
+-0.448718 -0.319046 0.0791065 1 0 0
+-0.204329 -0.371795 -0.327386 0 1 0
+0.5 0.0507311 0.088472 1 0 0
+-0.13606 -0.232698 -0.371795 0.0349906 0.727641 -0.685065
+0.211974 0.033512 -0.0330715 -0.488357 0.872537 -0.0136683
+-0.146747 0.261455 -0.371795 0 0 1
+0.0263752 0.332702 0.320513 0 0 1
+-0.155925 0.335085 -0.371795 0 0 1
+-0.321391 -0.0836338 0.371795 0 0 1
+-0.324497 -0.371795 -0.224442 0 1 0
+-0.317519 0.0216701 -0.333333 -0.445524 0.0303817 0.894755
+-0.178809 0.132286 -0.333333 0 0 1
+0.233805 -0.371795 -0.0771896 0 1 0
+-0.5 0.329574 -0.135638 1 0 0
+-0.5 0.0625454 -0.229063 1 0 0
+-0.215534 -0.371795 -0.144065 0 1 0
+-0.179563 0.371795 -0.111333 0 1 0
+-0.5 0.259207 -0.365851 0.904009 0.179833 0.387849
+-0.0859689 0.371795 -0.222317 0 1 0
+-0.494484 -0.294872 -0.194313 0.296556 0.950064 -0.0971274
+0.5 -0.270629 0.26341 1 0 0
+-0.0435662 0.371795 -0.256281 0 1 0
+-0.190222 0.238781 0.371795 0.0200989 0.0523911 0.998424
+-1.02191e-005 -0.294872 0.0484504 0 1 0
+-0.448718 -0.299767 0.112928 0.983906 0.174833 -0.0369185
+-0.377074 -0.371795 0.156779 0 1 0
+0.323177 0.294872 -0.150691 0 1 0
+0.0578253 0.355754 -0.371795 0 0 1
+0.201518 -0.371795 -0.316912 0 1 0
+-0.358991 -0.194808 -0.371795 0 0 1
+0.0988474 -0.0148016 0.320513 0 0 1
+-0.452984 0.193686 0.320513 0 0 1
+-0.180702 -0.371795 0.194192 0 1 0
+0.332952 0.294872 0.209083 0 1 0
+-0.5 -0.0614513 -0.0226088 1 0 0
+-0.195737 -0.0256762 -0.199076 0.825594 -0.564212 -0.00763683
+-0.10904 -0.0739497 0.320513 0 0 1
+-0.213288 0.29077 0.320513 0 0 1
+0.141109 -0.325264 -0.196649 1 0 0
+-0.360393 -0.113628 0.320513 0.633003 0.404453 -0.660094
+-0.335179 0.121875 -0.371795 0 0 1
+0.437334 -0.371795 0.201263 0 1 0
+0.448718 -0.298055 -0.344646 0.97434 -0.223937 -0.0226614
+0.393441 0.294872 -0.366022 -0.025278 0.998699 -0.0442932
+0.150083 0.294872 0.078201 0.00530024 0.999984 0.0018831
+0.180331 0.262651 -0.371795 0 0 1
+-0.14644 0.371795 -0.106002 0 1 0
+0.141109 -0.353723 0.188064 1 0 0
+0.141026 0.330987 -0.141555 1 0 0
+0.194336 0.128295 -0.333333 0 0 1
+-0.283661 -0.308444 -0.371795 0 0 1
+0.5 -0.0799448 -0.213046 1 0 0
+0.5 -0.0428173 0.250467 1 0 0
+-0.0904752 0.0472577 0.320513 0 0 1
+0.40188 -0.148432 0.320513 0 0 1
+0.141026 0.303272 -0.349354 0.994949 0.0994114 0.0139484
+0.201515 0.0249317 -0.271177 0.764136 -0.64501 0.00764445
+-0.5 0.0429099 -0.229806 1 0 0
+-0.5 -0.0191559 -0.0788449 1 0 0
+-0.141154 -0.318481 -0.183455 1 0 0
+-0.442311 -0.371795 -0.312678 0.0323333 0.999406 0.0119076
+-0.299484 -0.293144 0.320513 0 0 1
+0.360509 -0.163794 0.320513 0 0 1
+0.153098 0.294872 0.0727316 0 1 0
+-0.362596 0.263055 -0.371795 0 0 1
+0.327024 -0.371795 -0.0239634 0 1 0
+0.393346 0.107244 -0.371795 0 0 1
+0.283099 0.0303152 -0.333333 0 0 1
+-0.308025 0.371795 -0.338883 0 1 0
+0.331665 -0.267938 0.320513 0 0 1
+-0.273907 0.371795 0.233089 0 1 0
+-0.5 -0.0930966 -0.319924 1 0 0
+-0.0577771 0.074616 0.320513 0 0 1
+0.5 0.197659 0.107664 1 0 0
+0.233661 0.294872 0.121647 0 1 0
+0.0903085 0.0468483 -0.333333 0 0 1
+0.0357026 0.371795 0.103302 0 1 0
+0.479052 0.0836799 -0.371795 0 0 1
+0.205449 -0.0288654 -0.0558164 0.682395 0.730975 0.00366181
+0.403825 -0.371795 0.103641 0 1 0
+0.352071 0.294872 -0.0663858 0 1 0
+-0.5 -0.0773446 0.0926802 1 0 0
+-0.448718 -0.297077 -0.154455 0.759203 0.649808 -0.0368853
+-0.0300559 0.371795 0.29618 0 1 0
+0.308319 -0.371795 0.0889993 0 1 0
+-0.405943 0.371795 -0.176361 0 1 0
+-0.461126 0.371795 0.177508 0 1 0
+0.203808 -0.0174745 0.341546 0.996585 -0.0825685 0
+-0.487037 -0.294872 0.0438021 0 1 0
+-0.295651 0.371795 -0.263597 0 1 0
+0.286887 0.286925 -0.371795 0.00410277 -0.238841 0.97105
+-0.5 -0.205429 -0.243348 1 0 0
+0.5 0.250406 -0.0215058 1 0 0
+-0.217538 -0.0414103 -0.282946 -0.308598 0.951076 0.0149192
+-0.5 0.0139431 -0.270013 1 0 0
+-0.31847 -0.349504 0.320513 0 0 1
+0.268093 -0.00874342 -0.0511434 0.956253 -0.291915 0.0191231
+0.5 -0.129896 0.24053 1 0 0
+0.337848 0.153974 0.320513 0.32798 0.329366 0.885408
+-0.5 -0.091872 0.280077 1 0 0
+-0.483298 0.0768056 -0.371795 0 0 1
+0.269173 0.213793 0.334083 0.563446 0.826135 -0.00542129
+0.37623 0.106363 -0.371795 0 0 1
+-0.1492 -0.371795 -0.0317657 -0.129388 0.990024 0.0557863
+-0.25813 0.371795 -0.14276 0 1 0
+-0.448718 -0.329268 0.0207336 1 0 0
+-0.133701 0.371795 0.286961 0 1 0
+0.331623 -0.371795 -0.159222 0 1 0
+0.448718 -0.307668 -0.297096 1 0 0
+0.5 -0.0104721 -0.074416 1 0 0
+0.00336181 -0.19086 0.320513 0 0 1
+-0.362877 0.371795 0.221921 0 1 0
+0.131486 0.371795 -0.049302 0.0350108 0.999379 0.00389176
+-0.5 0.274672 0.0701733 1 0 0
+-0.216935 -0.0588127 0.371795 0 0 1
+0.141109 -0.33446 0.120579 1 0 0
+-0.5 0.0341546 0.176871 1 0 0
+0.392579 0.294872 0.113707 0 1 0
+-0.5 0.356579 -0.0453261 1 0 0
+0.198189 -0.21024 0.371795 0 0 1
+0.470556 -0.0819055 -0.371795 0 0 1
+-0.046704 0.371795 0.250671 0 1 0
+0.0903932 0.276184 -0.371795 0 0 1
+-0.0733565 -0.21039 -0.333333 0 0 1
+0.448718 -0.324812 0.071341 1 0 0
+-0.0595583 -0.294872 -0.0574411 0 1 0
+-0.00696842 0.322641 -0.371795 0 0 1
+-0.410818 0.371795 0.274228 0 1 0
+-0.5 -0.273589 0.209258 1 0 0
+-0.106462 -0.294872 -0.255606 0 1 0
+-0.191733 0.371795 0.222928 0 1 0
+-0.189144 -0.371795 -0.206643 0 1 0
+0.175062 0.223672 -0.333333 -0.0020329 0.308794 0.951127
+0.5 -0.069214 0.00416868 1 0 0
+0.218504 0.294872 0.0520866 0 1 0
+-0.448718 -0.341388 0.068557 1 0 0
+0.148783 -0.371795 0.203699 0.209793 0.97589 0.060216
+-0.410341 0.371795 -0.0656102 0 1 0
+-0.39361 -0.371795 0.11205 0 1 0
+-0.029739 0.371795 0.145045 0 1 0
+-0.217063 0.041283 -0.0758795 0.323783 0.946117 -0.00510952
+0.237535 -0.00782207 0.371795 0 0 1
+-0.399586 -0.00811348 -0.371795 0 0 1
+-0.372866 -0.204212 0.320513 0 0 1
+-0.5 0.193506 0.267217 1 0 0
+-0.320513 0.0209687 -0.354724 1 0 0
+-0.499926 -0.00695567 0.320513 0.712834 -0.217472 -0.666763
+0.141026 0.368521 -0.0659809 0.881006 0.450693 -0.143893
+0.331627 -0.371795 -0.246094 0 1 0
+-0.18425 -0.337697 -0.371795 0 0 1
+0.497049 0.0708279 0.320513 0.63055 -0.285267 0.721824
+0.5 -0.118047 0.128657 1 0 0
+-0.489002 -0.00353801 0.320513 0 0 1
+-0.395377 0.0374497 -0.371795 0 0 1
+0.193626 0.0678081 0.350779 0.940872 0.338752 0.00265803
+0.0485479 -0.195923 -0.333333 0 0 1
+0.0458007 0.371795 -0.108906 0 1 0
+-0.5 0.254741 -0.329058 1 0 0
+0.363763 -0.371795 -0.1062 0 1 0
+0.433952 -0.295172 -0.371795 0 0 1
+-0.0223841 -0.203648 0.343594 0.128268 0.991696 0.00932198
+-0.0574554 -0.181227 0.320513 0 0 1
+-0.380745 0.371795 0.176163 0 1 0
+-0.341528 0.371795 0.170726 0 1 0
+-0.263309 -0.371795 0.31809 0.126223 0.958478 -0.255709
+0.391784 0.294872 0.140618 0 1 0
+-0.387974 -0.202928 0.320513 0 0 1
+0.232819 -0.371795 0.264397 0 1 0
+0.27638 0.0328081 0.371795 0 0 1
+0.304257 0.185462 0.345227 0.706833 0.70738 0
+-0.0969339 -0.222343 -0.333333 -0.0146781 -0.0601604 0.998081
+-0.272659 -0.0114415 -0.137644 0.959074 0.283064 -0.00711613
+0.141109 -0.297708 -0.165251 0.740304 0.660539 0.125056
+0.5 0.140562 -0.179433 1 0 0
+-0.141154 -0.311735 0.0209432 1 0 0
+0.193738 -0.328013 -0.371795 0 0 1
+-0.5 -0.0381464 -0.0364678 1 0 0
+-0.0944698 0.181464 0.364408 -0.482254 0.793634 -0.370913
+0.5 0.0139705 -0.0684948 1 0 0
+0.259111 -0.371795 0.200111 0 1 0
+0.00383709 -0.294872 -0.110089 0 1 0
+0.314657 0.294872 0.242832 0 1 0
+-0.28932 0.371795 0.152354 0 1 0
+0.210099 -0.371795 0.252171 0 1 0
+0.189828 0.294872 -0.251616 0 1 0
+-0.5 -0.0132179 -0.327749 1 0 0
+-0.5 -0.0544288 -0.0564989 1 0 0
+-0.353919 0.309783 -0.371795 0 0 1
+-0.5 0.330277 -0.160073 1 0 0
+0.155958 0.230897 -0.336888 0.101896 0.935052 0.339552
+0.0184697 0.371795 -0.113406 0 1 0
+0.177519 -0.362846 0.320513 -0.00119378 -0.171423 0.985197
+-0.339412 0.222906 0.320513 0 0 1
+-0.413976 -0.0700831 -0.371795 0 0 1
+-0.5 0.284042 0.23445 1 0 0
+-0.5 0.343419 -0.0320345 1 0 0
+0.400208 -0.0575267 -0.371795 0 0 1
+0.162539 0.294872 0.120612 0 1 0
+0.5 -0.257283 0.122866 1 0 0
+-0.173467 -0.111805 0.371795 0.665796 0.357568 0.654875
+0.384712 0.224768 0.320513 0 0 1
+-0.0827298 -0.256282 0.354509 0 1 0
+0.20645 0.0297456 -0.130016 -0.620309 0.784356 0.00179242
+0.141026 0.359605 0.280533 0.999151 0.0412011 0.000352766
+0.203694 0.0188545 0.323143 0.766105 0.234584 -0.598376
+0.157481 -0.371795 0.15162 0 1 0
+0.5 0.245438 -0.0368962 1 0 0
+-0.5 0.0513516 0.116942 1 0 0
+0.0334516 0.371795 0.200873 0 1 0
+0.5 0.293402 -0.102489 0.407334 0.911753 0.0527827
+0.364735 0.0969327 -0.371795 0 0 1
+-0.319114 0.25658 -0.371795 0 0 1
+0.0273513 -0.273891 0.320513 0 0 1
+0.138202 0.00839243 0.320513 0 0 1
+-0.5 -0.19314 -0.21426 1 0 0
+-0.338686 -0.0609124 -0.371795 0 0 1
+-0.5 -0.277922 -0.21715 1 0 0
+0.449351 0.149855 0.320513 0 0 1
+0.105161 -0.230897 -0.346104 0 1 0
+-0.5 -0.0194784 -0.0594969 1 0 0
+0.295716 0.294872 0.238451 0 1 0
+-0.093445 -0.294872 0.278242 0 1 0
+-0.5 -0.0506372 0.22639 1 0 0
+0.190764 -0.236131 0.371795 -0.0033078 -0.0278915 0.999606
+-0.385375 -0.145351 -0.371795 0 0 1
+-0.370378 0.298022 0.320513 0 0 1
+-0.0534545 0.320662 0.320513 0 0 1
+-0.22941 -0.235083 0.351174 0.357397 0.933945 -0.00377572
+-0.188585 0.0103425 -0.181385 0.976094 0.217028 -0.0118058
+-0.5 -0.14859 0.214363 1 0 0
+0.144834 -0.371795 -0.189512 0.387191 0.903152 0.185473
+-0.275084 -0.324223 -0.371795 0 0 1
+0.357504 -0.301644 -0.371795 0 0 1
+-0.269536 0.371795 0.0309415 0 1 0
+-0.342566 -0.0265009 -0.371795 0 0 1
+0.451356 -0.294872 0.11446 -0.305955 0.952044 -0.00171841
+0.5 -0.0587055 -0.188915 1 0 0
+-0.342378 -0.371795 -0.146107 0 1 0
+0.5 0.237625 0.137715 1 0 0
+-0.320513 0.13842 -0.349669 1 0 0
+0.5 0.0702396 0.270236 1 0 0
+-0.448718 -0.347736 -0.210094 1 0 0
+-0.5 0.354245 -0.180771 1 0 0
+-0.4026 -0.371795 -0.00183518 0 1 0
+-0.5 -0.288276 -0.035718 0.980994 0.193793 0.00974419
+0.247119 0.294872 0.0715635 0 1 0
+-0.125831 0.371795 -0.365032 0.00275884 0.961126 -0.276096
+0.5 0.182997 -0.344494 1 0 0
+-0.5 -0.117278 -0.032379 1 0 0
+0.089196 0.109047 -0.333333 0 0 1
+-0.448718 -0.325629 0.247553 1 0 0
+-0.198061 0.0259216 0.320513 0.391986 -0.145052 0.908464
+-0.13663 0.230897 -0.348498 0 1 0
+0.141109 -0.306378 -0.0126824 0.999921 0.0123107 0.00248563
+-0.104455 0.371795 -0.176945 0 1 0
+0.384446 0.000568614 0.35164 0.999927 0.00184936 0.0119027
+-0.499672 0.29513 -0.371795 0.87842 0.17096 0.446263
+-0.382657 -0.170345 -0.371795 0 0 1
+-0.297171 -0.371795 -0.16813 0 1 0
+-0.5 0.2707 -0.355214 1 0 0
+0.409954 -0.371795 0.201202 0 1 0
+-0.355154 0.143268 0.320513 0 0 1
+0.0332076 -0.294872 -0.0599107 0 1 0
+0.351792 0.294872 -0.314965 0 1 0
+0.448718 -0.365028 0.122499 0.998278 -0.0480136 -0.0337029
+0.12672 0.227764 -0.333333 -0.108618 0.276272 0.954922
+-0.437754 -0.371795 -0.242644 0.0631708 0.997971 -0.00801597
+0.455015 0.176171 0.320513 0 0 1
+0.130402 -0.15707 -0.333333 0 0 1
+-0.302134 0.371795 0.24574 0 1 0
+0.141109 -0.364258 0.257145 0.964966 0.262111 0.0118126
+-0.141154 -0.332092 0.133609 1 0 0
+0.377502 -0.296586 0.320513 0 0 1
+-0.0723601 0.371795 -0.225531 0 1 0
+-0.196945 0.371795 -0.248591 0 1 0
+0.299282 0.294872 -0.207717 0 1 0
+-0.382064 -0.353217 0.320513 0 0 1
+-0.268181 0.371795 0.0524047 0 1 0
+0.5 -0.0452269 -0.0765151 1 0 0
+0.396066 0.112359 0.320513 0 0 1
+0.5 -0.0285949 -0.325155 1 0 0
+-0.355532 0.371795 0.00818409 0 1 0
+0.111885 0.0385516 0.320513 0 0 1
+-0.0721145 0.371795 0.123607 0 1 0
+0.459199 0.294872 0.171571 0 1 0
+0.357008 0.294872 -0.244817 0 1 0
+0.26744 0.0944841 0.371795 0 0 1
+-0.12856 0.220043 -0.333333 0 0 1
+-0.11299 -0.17127 0.365912 0.443533 0.861437 0.247396
+0.032442 -0.294872 0.266912 0 1 0
+0.36164 -0.236758 0.320513 0 0 1
+0.204439 0.0569263 0.371795 -0.0209722 -0.00938351 0.999736
+0.184775 -0.371795 0.0276222 0 1 0
+-0.137033 0.371795 -0.0543627 0 1 0
+-0.1398 0.371795 -0.219812 0 1 0
+0.5 -0.225972 -0.318967 1 0 0
+-0.34363 0.325046 -0.371795 0 0 1
+0.260257 -0.315641 0.320513 0 0 1
+-0.0825771 -0.262908 -0.371795 0 0 1
+-0.5 0.210611 -0.205225 1 0 0
+-0.0492056 -0.294872 -0.311925 0 1 0
+-0.139911 0.230897 -0.351573 0 1 0
+-0.307273 -0.371795 0.27828 0 1 0
+-0.263382 -0.371795 -0.208741 0 1 0
+0.450239 0.294872 -0.233499 0 1 0
+0.479132 -0.23642 -0.371795 0 0 1
+-0.230216 0.234783 0.323208 -0.174274 0.795667 0.580123
+-0.372805 -0.261979 0.320513 0 0 1
+-0.243692 0.247809 -0.371795 0 0 1
+-0.5 -0.210348 0.146952 1 0 0
+0.141026 0.295583 -0.278918 0.794428 0.605748 -0.0442052
+-0.259335 -0.305203 0.320513 0 0 1
+-0.180159 0.371795 -0.325138 0 1 0
+-0.448718 -0.303485 0.133614 0.997844 0.0654911 -0.00422138
+-0.437122 -0.371795 -0.0122663 0 1 0
+0.0669879 0.0654135 -0.333333 0 0 1
+-0.483625 -0.294872 0.033296 0 1 0
+0.316365 0.294872 0.187532 0 1 0
+-0.0838908 0.371795 0.100678 0 1 0
+-0.282857 0.371795 0.150971 0 1 0
+-0.452146 0.371795 -0.0195235 0 1 0
+0.472336 -0.294872 0.0114411 0 1 0
+0.141109 -0.316778 0.305366 1 0 0
+-0.286477 0.217493 -0.354456 -0.551942 0.833858 -0.00645382
+0.171013 -0.0655426 0.320513 0 0 1
+-0.00922071 0.260101 0.320513 -0.118551 0.340623 0.932696
+0.5 0.112955 0.260466 1 0 0
+-0.256444 0.0350327 -0.238245 -0.594379 0.804155 0.00690588
+-0.141154 -0.336692 -0.136238 1 0 0
+0.378987 -0.0468229 -0.371795 0 0 1
+-0.244993 0.371795 0.24819 0 1 0
+-0.392724 -0.276398 -0.371795 0 0 1
+0.0105406 0.363313 0.320513 -0.0106244 0.130668 0.991369
+-0.429657 0.0845119 0.320513 0 0 1
+-0.138835 0.0456944 -0.333333 0 0 1
+-0.214454 0.040305 -0.331729 0.254434 0.426317 0.868053
+-0.161001 0.371795 0.0998156 0 1 0
+0.5 0.205137 -0.342906 1 0 0
+-0.309318 -0.354801 0.320513 0 0 1
+0.312498 -0.262195 0.320513 0 0 1
+0.26821 0.242335 -0.371795 0 0 1
+0.5 0.0805075 -0.00172604 1 0 0
+-0.5 0.0445247 -0.289048 1 0 0
+-0.408527 -0.168333 0.320513 0 0 1
+-0.335961 -0.0545113 0.371795 0 0 1
+0.448718 -0.360837 -0.108117 0.99992 -0.0125658 -0.00118093
+-0.141154 -0.34136 -0.236793 1 0 0
+-0.247668 -0.371795 0.314494 -0.0602764 0.958147 -0.27986
+-0.182903 0.371795 -0.222511 0 1 0
+0.136174 0.371795 -0.274275 0.386746 0.920518 -0.0554402
+-0.188269 -0.0614581 0.320513 0.0421075 0.0481278 0.997953
+-0.243056 0.371795 0.237394 0 1 0
+-0.5 0.0369621 -0.286925 1 0 0
+-0.5 -0.170001 -0.217222 1 0 0
+0.437574 0.294872 0.319179 -0.0678924 0.756174 0.65084
+0.5 0.0501616 0.243243 1 0 0
+0.305407 0.184312 0.345461 0.706833 0.70738 0
+-0.0180107 -0.230897 -0.366738 -0.0163318 0.987441 -0.157143
+0.5 -0.127349 0.123486 1 0 0
+0.448718 -0.354487 -0.293776 1 0 0
+-0.0155929 0.371795 0.092429 0 1 0
+-0.212444 0.371795 0.226133 0 1 0
+0.141026 0.325866 0.154489 1 0 0
+-0.212778 0.0395237 -0.144587 0.393631 0.919264 0.00285083
+-0.122256 0.371795 0.193797 0 1 0
+0.229399 -0.325406 -0.371795 0 0 1
+0.000462304 0.0239523 -0.333333 0 0 1
+0.208842 -0.371795 -0.351433 0 1 0
+-0.258037 -0.371795 -0.319956 0 1 0
+-0.0333314 -0.169583 -0.333333 0 0 1
+0.141109 -0.349985 0.168355 1 0 0
+-0.159035 -0.371795 0.0175943 0 1 0
+0.106408 -0.294872 0.0375286 0 1 0
+-0.032393 -0.294872 0.216698 0 1 0
+0.0454246 0.363073 0.320513 0.011362 0.0571369 0.998302
+-0.197282 0.258115 -0.371795 0 0 1
+0.289342 0.294872 -0.0382567 0 1 0
+-0.324473 -0.209078 0.320513 0 0 1
+0.169801 0.294872 0.0018661 0 1 0
+-0.138699 0.371795 0.239568 0 1 0
+0.0614423 -0.0238364 0.320513 0 0 1
+0.5 -0.261628 -0.112651 1 0 0
+0.37435 0.294872 0.115592 0 1 0
+0.209947 -0.371795 0.0921953 0 1 0
+-0.142243 -0.303134 0.320513 0.349171 0.00959282 0.93701
+-0.0188787 0.371795 -0.211222 0 1 0
+-0.5 -0.120991 -0.194027 1 0 0
+-0.319754 0.371795 -0.150152 0 1 0
+0.360489 -0.371795 0.157294 0 1 0
+0.282294 0.294872 0.0816267 0 1 0
+0.5 -0.27923 -0.0841462 1 0 0
+0.5 -0.246519 0.319393 0.56863 -0.0472415 0.821236
+-0.5 0.0860248 0.161949 1 0 0
+-0.5 -0.239158 0.180999 1 0 0
+0.0615461 0.371795 -0.233108 0 1 0
+0.134188 -0.294872 -0.147336 0.240451 0.970351 -0.0245459
+-0.261129 0.371795 -0.162308 0 1 0
+-0.0897056 -0.294872 -0.0555868 0 1 0
+-0.0192056 -0.294872 -0.00508647 0 1 0
+-0.318547 0.371795 -0.0762614 0 1 0
+-0.353304 0.355936 -0.371795 0 0 1
+0.448718 -0.370264 -0.15049 -0.674122 0.73352 0.0866511
+0.5 0.291569 -0.234444 0.940097 0.332046 0.0772209
+-0.0446215 -0.222604 -0.333333 -0.00983058 -0.166741 0.985952
+-0.5 0.201954 -0.0599512 1 0 0
+-0.183123 -0.178192 0.371795 0 0 1
+0.313461 0.294872 -0.0975674 0 1 0
+-0.32592 -0.371795 -0.319057 0 1 0
+-0.0958839 -0.294872 -0.109784 0 1 0
+-0.5 -0.15622 -0.183067 1 0 0
+-0.143102 -0.117386 -0.333333 0 0 1
+0.0229106 0.0718988 -0.333333 0 0 1
+-0.131809 -0.0454214 0.320513 0 0 1
+-0.417649 -0.371795 0.124771 0 1 0
+-0.163314 0.351961 -0.371795 0 0 1
+-0.5 -0.106033 0.139549 1 0 0
+0.323559 0.266897 0.320513 0 0 1
+0.494107 0.138326 -0.371795 -0.224733 0.0376314 0.973693
+-0.0635391 0.347737 0.320513 0 0 1
+-0.5 -0.215545 -0.0880975 1 0 0
+-0.347113 -0.11863 0.371795 -0.154658 -0.133742 0.978874
+-0.5 0.102667 0.160478 1 0 0
+-0.308047 -0.361682 0.320513 0.0118212 -0.0957394 0.995336
+0.387475 0.0414509 -0.371795 0 0 1
+0.396294 -0.371795 0.24894 0 1 0
+-0.274248 0.00127161 -0.276522 0.999069 -0.0430972 0.00182321
+0.399564 0.0293681 -0.371795 0 0 1
+0.344252 0.294872 0.302589 0 1 0
+0.202205 -0.0347797 0.356916 0.984425 -0.175804 0
+-0.456134 0.371795 0.271769 0 1 0
+0.391248 -0.0832772 -0.371795 0 0 1
+0.0768468 -0.189892 0.336086 -0.342503 0.939511 0.00310314
+-0.476664 0.371795 0.282944 0 1 0
+-0.182804 0.356455 0.320513 0 0 1
+0.119606 -0.0372614 -0.333333 0 0 1
+-0.0387591 0.371795 -0.0402883 0 1 0
+0.210213 -0.171074 -0.333333 0 0 1
+0.5 -0.23304 -0.0126111 1 0 0
+0.381294 -0.255031 0.320513 0 0 1
+-0.0482433 -0.294872 0.230624 0 1 0
+-0.050809 0.371795 0.248048 0 1 0
+-0.448718 -0.371541 -0.155812 0.890982 0.453316 -0.0256113
+-0.141154 -0.312263 -0.335571 1 0 0
+0.0606349 0.36198 -0.371795 -0.0324798 -0.115781 0.992744
+-0.186029 -0.0830273 -0.333333 0 0 1
+-0.448718 -0.339006 0.196201 1 0 0
+0.495553 -0.294872 0.137954 -0.559914 0.828413 -0.0151052
+-0.387346 -0.371795 -0.244595 0 1 0
+-0.200208 0.371795 -0.177702 0 1 0
+0.347462 -0.107683 -0.371795 0 0 1
+0.213585 -0.371795 0.205785 0 1 0
+-0.366281 0.371795 -0.166668 0 1 0
+-0.268956 -0.371795 0.16887 0 1 0
+0.5 -0.112351 -0.309689 1 0 0
+-0.0736461 -0.131523 -0.333333 0 0 1
+0.5 -0.278486 0.258403 1 0 0
+-0.411624 0.215281 -0.371795 0 0 1
+-0.5 0.0264214 -0.270642 1 0 0
+-0.460953 0.232638 0.320513 0 0 1
+0.0170117 -0.0856113 0.320513 0 0 1
+0.394149 0.174693 -0.371795 0 0 1
+-0.5 0.313865 0.0706396 1 0 0
+-0.181662 -0.26565 -0.371795 0 0 1
+0.169932 -0.125555 0.371795 -0.120263 0.113968 0.986179
+0.49032 -0.294872 -0.277762 0 1 0
+0.383474 0.0141683 0.331211 0.996797 0.0705562 0.0376447
+-0.0850461 0.127054 -0.333333 0 0 1
+0.163015 -0.371795 -0.363656 -0.0688045 0.965405 0.251513
+-0.366815 -0.0933949 0.320513 -0.458898 -0.251896 0.852034
+-0.135931 0.371795 0.0673776 0 1 0
+-0.0408699 0.371795 0.123014 0 1 0
+0.141109 -0.349474 -0.00917799 1 0 0
+0.5 0.0688284 0.206689 1 0 0
+-0.0460971 -0.294872 0.24567 0 1 0
+0.227121 -0.364099 0.320513 -0.0734187 -0.41893 0.905045
+0.228229 0.201073 -0.333333 0 0 1
+-0.5 0.136991 0.193117 1 0 0
+0.320513 -0.0641769 -0.333824 0.689321 -0.130863 0.712538
+0.0323794 -0.279465 0.320513 0 0 1
+0.494114 -0.294872 0.0445009 -0.0546265 0.998192 0.0250627
+0.118176 -0.294872 0.0784318 0 1 0
+-0.121225 0.371795 -0.168542 0 1 0
+-0.0527014 -0.147342 -0.333333 0 0 1
+-0.141154 -0.320877 0.17579 1 0 0
+0.374427 -0.371795 -0.190587 0 1 0
+-0.158647 0.0526087 0.320513 0 0 1
+0.29656 0.294872 -0.336286 0 1 0
+0.487427 0.294872 0.262638 0 1 0
+-0.5 -0.230782 0.307259 1 0 0
+-0.5 0.319128 -0.0146656 1 0 0
+-0.258519 0.03358 -0.143976 -0.606656 0.794945 -0.00554361
+-0.408847 -0.371795 -0.142674 0 1 0
+-0.340981 0.175559 0.320513 0 0 1
+-0.294252 -0.313743 -0.371795 0 0 1
+-0.0679708 -0.192939 0.343819 0.324716 0.945811 0
+-0.141154 -0.304353 0.280196 0.993093 -0.116017 -0.0174886
+-0.270872 0.280571 -0.371795 0 0 1
+-0.267383 -0.371795 -0.181747 0 1 0
+0.26083 -0.291518 0.320513 0 0 1
+-0.5 0.12115 -0.368309 0.961 -0.0313615 0.274765
+-0.5 -0.222733 -0.295645 1 0 0
+-0.268589 -0.294523 0.320513 0 0 1
+-0.5 -0.228247 -0.0113274 1 0 0
+0.5 -0.203031 0.0569742 1 0 0
+-0.0666671 -0.291665 -0.371795 0.0635833 0.315425 0.946818
+0.205346 -0.244059 0.335049 -0.324186 0.94595 -0.00900839
+0.424512 -0.371795 -0.0963135 0 1 0
+-0.5 0.311477 0.188361 1 0 0
+-0.125393 0.371795 0.310512 -0.0143398 0.997611 0.0675825
+0.5 0.253992 0.0308144 1 0 0
+-0.199546 0.0452797 0.334825 0.969396 -0.245501 0
+0.00192586 0.0470061 -0.333333 0 0 1
+-0.188001 -0.080631 0.332692 0.91577 0.401703 0
+0.5 0.100161 -0.347061 1 0 0
+0.293674 0.294872 0.319252 -0.0043518 0.182245 0.983243
+-0.333847 0.0618839 -0.371795 -0.0230459 -0.00862395 0.999697
+-0.429439 -0.0704795 -0.371795 0 0 1
+-0.5 0.316937 0.0540289 1 0 0
+0.178769 -0.371795 -0.252995 0 1 0
+0.0225424 0.371795 -0.0047087 0 1 0
+-0.182724 -0.301023 -0.371795 0 0 1
+0.22398 -0.371795 0.239222 0 1 0
+-0.315199 0.0852711 -0.333333 -0.261084 -0.0492323 0.96406
+-0.351195 0.371795 0.198459 0 1 0
+-0.0426847 0.309412 0.320513 0 0 1
+0.141109 -0.349222 -0.347473 1 0 0
+-0.110686 -0.184338 -0.333333 0 0 1
+0.466859 -0.294872 0.184147 0 1 0
+-0.0297819 -0.294872 -0.144622 0 1 0
+-0.0324885 -0.294872 0.0984311 0 1 0
+0.00443592 -0.267673 0.320513 -0.000797044 -0.0133135 0.999911
+-0.5 0.327121 -0.175646 1 0 0
+-0.339559 -0.371795 0.0475154 0 1 0
+0.31512 0.294872 0.147607 0 1 0
+-0.34546 0.371795 0.169763 0 1 0
+0.0517516 0.369026 -0.371795 -0.168861 -0.42216 0.890655
+-0.301912 -0.371795 -0.307711 0 1 0
+0.5 -0.0710668 0.118767 1 0 0
+-0.5 -0.0319312 0.175785 1 0 0
+0.0342592 0.371795 -0.346625 0 1 0
+0.0629331 0.256282 0.35161 0 1 0
+0.0154641 -0.23524 -0.371795 0.107041 -0.617307 0.779406
+0.5 0.242067 -0.0320625 1 0 0
+0.5 0.288994 0.00605204 0.944726 0.327861 -0.00106241
+0.0548425 0.371795 -0.226177 0 1 0
+0.178704 -0.226346 0.371795 0 0 1
+-0.5 -0.247013 -0.199959 1 0 0
+0.341471 -0.371795 0.109216 0 1 0
+0.018126 -0.294872 -0.178556 0 1 0
+0.356604 -0.371795 -0.295836 0 1 0
+-0.284825 0.00703656 0.371795 0 0 1
+-0.34075 0.142635 0.321407 -0.449521 0.409262 0.794
+0.48166 -0.115862 -0.371795 0 0 1
+-0.5 0.0130249 -0.0431469 1 0 0
+-0.459976 -0.294872 0.271834 0 1 0
+-0.196751 0.0271237 -0.127332 0.768673 0.639456 -0.015463
+0.5 -0.285907 0.122205 0.974304 -0.219633 0.0499335
+0.448718 -0.357789 -0.110008 1 0 0
+0.15029 0.294872 -0.194596 0.0118531 0.999929 0.0015131
+0.319498 0.294872 0.292041 0 1 0
+0.490457 0.294872 -0.0916036 0.0240004 0.9996 0.0149882
+-0.5 0.301567 -0.216629 1 0 0
+-0.36617 -0.176828 -0.371795 0 0 1
+-0.12663 0.207991 0.371795 0 0 1
+-0.398715 -0.0352999 -0.371795 0 0 1
+-0.175188 0.311485 -0.371795 0 0 1
+0.5 0.0311213 -0.307211 1 0 0
+0.193784 0.010009 -0.0910039 0.962755 -0.2674 0.0399974
+-0.13709 -0.294872 0.279691 -0.386121 0.900226 0.201253
+0.295578 -0.068096 0.371795 0 0 1
+-0.5 0.126562 -0.074879 1 0 0
+-0.5 0.160237 0.314032 0.96475 0.00590913 -0.263104
+-0.235217 -0.0365062 -0.031234 -0.0690891 -0.558037 0.826935
+0.294475 0.211461 -0.341379 0.645566 0.7539 0.121984
+0.448718 -0.33565 0.303862 1 0 0
+0.141109 -0.312883 0.265018 1 0 0
+-0.142517 -0.371795 0.26456 -0.674872 0.737814 -0.0133214
+-0.0925113 -0.294872 -0.21838 0 1 0
+-0.0725027 -0.294872 0.054705 0 1 0
+0.0313434 0.204053 -0.333333 0 0 1
+-0.5 0.190654 -0.302894 1 0 0
+0.406183 -0.371795 -0.0950422 0 1 0
+-0.5 0.298202 -0.298096 1 0 0
+-0.463756 0.121148 -0.371795 0 0 1
+0.104186 -0.212442 -0.333333 0 0 1
+0.402716 -0.0618499 -0.371795 0 0 1
+-0.055448 -0.0167386 0.320513 0 0 1
+-0.104365 0.371795 -0.260777 0 1 0
+-0.173816 0.0283449 -0.333333 0 0 1
+-0.5 -0.0970139 0.297428 1 0 0
+-0.448718 -0.360316 0.128719 1 0 0
+0.000622654 0.11265 -0.333333 0 0 1
+0.169811 0.230897 -0.366647 0.0197169 0.9908 0.133887
+0.199219 0.021742 -0.0573442 0.853928 -0.520069 0.0183063
+-0.448718 -0.311922 -0.022911 1 0 0
+-0.5 -0.271913 0.309247 1 0 0
+-0.5 -0.0431515 0.315975 0.944428 0.0502816 -0.324851
+-0.185081 0.371795 -0.331643 0 1 0
+0.0256127 0.371795 0.160839 0 1 0
+-0.093486 0.371795 -0.213327 0 1 0
+-0.479305 -0.14512 0.320513 0 0 1
+-0.5 0.189049 0.125879 1 0 0
+-0.230556 -0.211324 -0.333333 0 0 1
+-0.141154 -0.31317 -0.0941739 1 0 0
+0.112214 0.371795 -0.0558251 0 1 0
+-0.5 -0.280584 0.212283 1 0 0
+0.0667029 -0.256038 0.371795 0.120533 0.851985 -0.509503
+-0.5 0.0102823 0.103556 1 0 0
+-0.236424 -0.371795 -0.141094 0 1 0
+0.216009 -0.0353933 -0.0622318 0.435373 0.900231 0.00589804
+0.426693 -0.371795 -0.258601 0 1 0
+-0.249324 0.362602 -0.371795 0.00392861 -0.0898488 0.995948
+0.341119 -0.371795 0.0088859 0 1 0
+-0.0782146 0.371795 -0.227798 0 1 0
+0.448718 -0.34375 -0.364474 0.994433 0.0557875 -0.0893858
+0.5 -0.28735 0.0595863 0.998148 -0.0573981 0.0201726
+0.147113 -0.157208 -0.333333 0 0 1
+-0.389386 0.371795 0.0201778 0 1 0
+0.448718 -0.328534 -0.0965226 1 0 0
+0.435859 0.294872 0.289756 0 1 0
+-0.288301 -0.371795 -0.349318 0 1 0
+-0.0298127 -0.294872 -0.191954 0 1 0
+-0.233729 0.371795 -0.0293129 0 1 0
+-0.0465517 0.371795 0.18456 0 1 0
+-0.5 -0.130257 -0.268966 1 0 0
+0.257201 0.0277536 -0.293742 0.660533 0.750797 0
+-0.0417397 0.31927 0.320513 0 0 1
+-0.216869 -0.0214674 -0.0244804 0.232813 -0.457626 0.858124
+0.142476 0.294872 -0.180954 0.460646 0.887126 0.0285151
+0.397413 -0.357918 0.320513 0 0 1
+-0.181389 -0.371795 -0.196612 0 1 0
+-0.377148 -0.371795 -0.0726699 0 1 0
+-0.463511 -0.161259 -0.371795 0 0 1
+0.120762 -0.0672521 0.320513 0 0 1
+0.418785 -0.371795 0.15756 0 1 0
+-0.5 -0.131591 -0.322064 1 0 0
+0.345043 0.294872 0.292955 0 1 0
+0.255429 0.0295073 -0.00516425 0.593736 0.768602 0.238178
+-0.276885 0.371795 0.0335082 0 1 0
+-0.0216436 -0.256282 0.335958 0 1 0
+-0.0606308 -0.294872 0.156661 0 1 0
+-0.141154 -0.357764 0.161543 1 0 0
+-0.224211 0.371795 0.253251 0 1 0
+-0.0324279 0.371795 0.100223 0 1 0
+-0.461281 0.371795 -0.335524 0 1 0
+0.5 0.279564 -0.0749853 1 0 0
+0.285037 0.294872 -0.180215 0 1 0
+-0.5 0.0821923 0.283301 1 0 0
+-0.0803404 0.371795 0.263374 0 1 0
+-0.5 0.0605101 -0.251943 1 0 0
+-0.128549 0.371795 0.19641 0 1 0
+-0.103325 0.176672 0.341431 -0.481119 0.876655 0
+-0.397644 -0.371795 -0.259832 0 1 0
+-0.485147 0.371795 0.145833 0 1 0
+-0.331153 -0.371795 -0.232468 0 1 0
+0.351015 -0.128434 0.320513 0.441776 -0.255855 0.859868
+0.22596 -0.371795 -0.339917 0 1 0
+-0.441751 0.371795 0.184001 0 1 0
+-0.448718 -0.312219 -0.182583 1 0 0
+-0.195211 -0.0249251 -0.320722 0.807657 -0.589443 0.0157057
+0.156376 -0.122858 -0.333333 0 0 1
+0.43336 -0.048782 0.320513 0 0 1
+0.157381 -0.0736647 0.320513 0 0 1
+-0.317803 0.171916 0.345124 0.726144 -0.687524 -0.00506272
+0.5 -0.0528997 0.0580883 1 0 0
+-0.135089 -0.294872 0.219039 -0.227583 0.972012 0.0583027
+-0.246128 0.371795 -0.0783498 0 1 0
+0.5 -0.136284 -0.228955 1 0 0
+-0.5 -0.0330653 -0.113827 1 0 0
+-0.5 -0.0115371 -0.336217 1 0 0
+0.264509 0.172684 -0.333333 0 0 1
+0.5 0.0321931 -0.262738 1 0 0
+0.137563 -0.0742021 0.320513 0 0 1
+-0.435981 0.281148 0.320513 0 0 1
+-0.396687 0.371795 -0.29435 0 1 0
+-0.265253 0.0264601 -0.166593 0.800905 -0.598647 0.0131581
+-0.42702 0.371795 0.0691167 0 1 0
+0.141109 -0.31162 0.284369 1 0 0
+0.374167 0.294872 -0.111715 0 1 0
+-0.112812 0.256282 0.355831 0 1 0
+0.385119 -0.303149 -0.371795 0 0 1
+-0.5 -0.269861 0.21855 1 0 0
+0.384419 0.000946216 0.323939 0.835491 -0.0766155 0.544137
+-0.5 0.242856 0.0439334 1 0 0
+-0.5 -0.0992989 0.0845598 1 0 0
+0.244712 0.117457 -0.333333 0 0 1
+-0.483894 -0.294872 0.132904 0 1 0
+-0.5 -0.220865 -0.204157 1 0 0
+-0.208872 0.371795 0.0465316 0 1 0
+0.241945 0.294872 -0.305766 0 1 0
+-0.5 -0.0820663 0.0347499 1 0 0
+0.129528 0.371795 -0.168935 0 1 0
+-0.162224 0.371795 -0.233758 0 1 0
+-0.365279 -0.371795 -0.215156 0 1 0
+0.118455 -0.111187 0.320513 0 0 1
+0.47011 0.294872 -0.148275 0 1 0
+-0.412549 -0.231504 0.320513 0 0 1
+-0.5 0.329157 -0.149286 1 0 0
+-0.5 0.319804 0.130715 1 0 0
+-0.261418 -0.030762 -0.038556 0.68634 0.63676 -0.351388
+0.424216 0.294872 0.00954552 0 1 0
+0.161457 0.12612 0.320513 0.696478 0.396047 -0.598386
+0.341598 -0.141502 0.370774 0.413711 -0.306118 0.8574
+0.5 -0.023047 0.13052 1 0 0
+-0.270204 0.371795 -0.0867103 0 1 0
+-0.181649 -0.0951136 0.350597 0.880415 0.474013 0.0134508
+-0.108909 -0.294872 0.142247 0 1 0
+0.141109 -0.341523 0.126802 1 0 0
+-0.183792 -0.0380909 -0.333333 0 0 1
+-0.0862669 -0.294872 -0.0737012 0 1 0
+0.199668 0.279621 0.320513 0 0 1
+0.364989 0.030905 0.371795 0 0 1
+0.29732 0.129462 -0.333333 0 0 1
+-0.5 0.14985 -0.28334 1 0 0
+0.466579 -0.294872 0.0738489 0 1 0
+-0.19015 0.0156423 -0.0898383 0.936078 0.351418 0.0162272
+-0.139007 0.323323 0.320513 0 0 1
+-0.286553 0.213428 -0.333333 -0.223173 0.365454 0.90368
+-0.5 -0.0624545 0.057168 1 0 0
+-0.320513 0.115479 -0.340996 0.981962 0.0454422 -0.183535
+0.0353568 -0.131334 0.320513 0 0 1
+-0.310297 -0.0746207 -0.333333 -0.156956 -0.0492754 0.986376
+0.5 0.226004 -0.332984 1 0 0
+-0.250666 -0.0386351 -0.260068 0.477551 0.877707 -0.0396833
+0.192178 -0.260039 0.320513 0 0 1
+-0.223999 0.0429975 -0.196563 0.152527 0.988299 0
+-0.196003 0.371795 -0.123886 0 1 0
+-0.204538 -0.0346438 -0.252345 -0.531198 0.847248 0
+0.202014 -0.371795 0.298232 0 1 0
+0.0381355 0.371795 -0.178806 0 1 0
+-0.438009 0.371795 0.185094 0 1 0
+0.316987 -0.371795 -0.085253 0 1 0
+-0.5 0.359938 -0.289151 1 0 0
+-0.454878 -0.294872 -0.144264 0.149733 0.988702 0.006901
+0.5 -0.173219 0.311749 0.998094 0.00057649 0.0617073
+-0.448718 -0.303447 -0.0240237 0.970166 0.184566 0.157206
+-0.350515 -0.295764 -0.371795 0 0 1
+-0.141154 -0.367818 -0.223644 0.940394 -0.327492 0.0916953
+-0.5 0.0306182 -0.319311 1 0 0
+0.0654846 -0.21107 0.371795 0 0 1
+0.353685 -0.259084 0.320513 0 0 1
+-0.304611 -0.0671637 -0.333333 0 0 1
+0.12485 0.162038 0.324321 0.513272 0.680177 -0.523365
+0.185598 -0.371795 0.118852 0 1 0
+-0.142932 -0.0523723 -0.333333 0 0 1
+0.459475 0.227956 -0.371795 0 0 1
+-0.20978 -0.158294 -0.333333 0 0 1
+0.201279 0.0246839 -0.0936682 0.779088 -0.624888 0.0503687
+-0.115229 0.0469094 -0.333333 0 0 1
+-0.405341 0.371795 0.0112405 0 1 0
+0.143692 0.059655 -0.333333 0 0 1
+0.0676287 0.242338 0.371795 0 0 1
+0.192219 0.0877889 -0.333333 0 0 1
+0.5 0.225225 -0.246969 1 0 0
+0.228129 0.268314 0.320513 0 0 1
+-0.050465 -0.294872 -0.131685 0 1 0
+-0.055599 0.166228 0.320513 0 0 1
+-0.127687 0.371795 -0.173177 0 1 0
+-0.0784187 0.180004 0.320513 0.0108303 -0.0173241 0.999791
+0.26545 0.0162883 -0.16913 0.881221 0.472588 0.0104585
+-0.448718 -0.352917 0.0869953 1 0 0
+-0.448718 -0.300008 0.151701 0.868808 0.479362 -0.124034
+-0.448718 -0.324759 -0.0162561 1 0 0
+-0.478875 0.371795 0.174148 0 1 0
+0.457629 -0.294872 -0.0488207 -0.183616 0.982795 0.0199994
+0.293286 0.294872 -0.150864 0 1 0
+-0.192987 -0.371795 -0.0518136 0 1 0
+0.228745 0.0938916 -0.333333 0 0 1
+-0.5 -0.0345693 0.253854 1 0 0
+-0.5 0.0466998 -0.0829914 1 0 0
+0.0898145 -0.247344 0.371795 0 0 1
+-0.354908 0.00490802 0.371795 0 0 1
+0.406974 0.104504 -0.371795 0 0 1
+-0.478171 -0.294872 -0.274253 0 1 0
+-0.00414791 0.365355 -0.371795 -0.109859 -0.299733 0.947677
+-0.5 0.226152 0.129338 1 0 0
+0.476791 -0.27264 0.320513 0 0 1
+-0.181025 -0.238193 0.371795 0 0 1
+0.0410112 -0.195572 -0.333333 0 0 1
+-0.5 0.093214 0.149392 1 0 0
+-0.126317 0.203638 0.371795 0 0 1
+-0.193913 -0.219794 0.371795 0 0 1
+0.108268 0.371795 -0.291228 0 1 0
+-0.45418 -0.294872 -0.114563 0.371766 0.926071 0.0646726
+-0.185154 0.334803 -0.371795 0 0 1
+-0.5 0.00726162 -0.103408 1 0 0
+-0.5 -0.124056 0.0619399 1 0 0
+0.365675 -0.371795 0.0309336 0 1 0
+-0.0292237 0.371795 0.180092 0 1 0
+-0.5 -0.106429 -0.108433 1 0 0
+0.0788073 -0.294872 0.135736 0 1 0
+-0.174504 0.0456663 -0.333333 0 0 1
+0.0144923 -0.0266935 -0.333333 0 0 1
+-0.212397 -0.371795 0.255953 0 1 0
+-0.327226 -0.371795 -0.362142 0 1 0
+-0.0282295 0.11768 0.320513 0 0 1
+-0.274348 -0.000120702 -0.142491 0.999986 0.00184815 -0.00488873
+-0.166672 -0.371795 -0.27749 0 1 0
+-0.149611 0.313686 0.320513 0 0 1
+0.0464352 0.203712 0.371795 -0.14982 -0.635089 0.75777
+0.444316 0.294872 0.188775 0 1 0
+-0.5 0.0568907 0.0226073 1 0 0
+0.32019 -0.157665 -0.349965 0.996727 -0.0808272 -0.0014706
+0.223883 0.237145 0.365996 0.42589 0.878508 0.21643
+0.0691471 0.371795 0.161685 0 1 0
+0.448718 -0.310947 0.0329397 1 0 0
+-0.5 0.00698283 0.104879 1 0 0
+0.141026 0.297347 0.0176015 0.88491 0.462153 -0.0578728
+-0.320513 -0.146309 -0.351502 0.99999 0.00450739 0.00038259
+-0.5 -0.218707 0.131368 1 0 0
+-0.0604524 -0.294872 0.226339 0 1 0
+-0.429249 -0.371795 -0.1089 0 1 0
+0.0256183 0.112751 -0.333333 0 0 1
+-0.31494 0.321587 -0.371795 0 0 1
+-0.0616941 0.371795 0.0263561 0 1 0
+-0.282781 0.371795 -0.266503 0 1 0
+-0.5 -0.169751 0.124505 1 0 0
+0.5 -0.064551 -0.00579791 1 0 0
+0.0889215 -0.196013 -0.333333 0 0 1
+-0.448718 -0.319241 -0.308425 1 0 0
+-0.448718 -0.368411 -0.164039 0.959416 0.280101 0.0326381
+-0.178003 -0.220738 0.371795 0 0 1
+-0.141154 -0.322708 0.193967 1 0 0
+-0.261073 -0.228623 -0.347747 0.194583 0.980883 -0.0026317
+0.320513 -0.0318207 -0.352779 1 0 0
+0.5 0.255707 0.102824 1 0 0
+0.5 0.0719987 -0.278509 1 0 0
+-0.149102 0.140055 0.350658 0.735731 -0.677274 0
+-0.136558 -0.082196 -0.333333 0 0 1
+0.5 0.287248 -0.0167042 0.994166 0.106365 -0.0179025
+-0.5 0.259529 -0.105589 1 0 0
+-0.438057 -0.371795 -0.111439 0 1 0
+0.5 -0.0623965 0.188847 1 0 0
+-0.5 -0.160968 0.167894 1 0 0
+0.332869 0.137528 -0.371795 0 0 1
+0.237628 -0.00944864 0.0160688 0.334855 -0.392032 0.856845
+0.448718 -0.311309 -0.352366 1 0 0
+-0.5 0.203602 0.0266026 1 0 0
+0.201146 0.294872 -0.210785 0 1 0
+-0.0397722 -0.294872 0.208402 0 1 0
+-0.0823847 -0.0278375 -0.333333 0 0 1
+0.462011 -0.294872 -0.210484 0 1 0
+-0.141154 -0.355142 -0.258934 1 0 0
+0.488816 -0.141337 0.320513 0 0 1
+-0.201123 0.371795 -0.245373 0 1 0
+-0.380689 -0.188149 -0.371795 0 0 1
+-0.393391 -0.248692 0.320513 0 0 1
+0.261107 0.023473 -0.171444 0.80685 0.590349 -0.0219508
+-0.100727 0.371795 -0.219944 0 1 0
+-0.11909 -0.041752 0.320513 0 0 1
+0.5 -0.292029 0.214899 0.860352 -0.282671 0.424136
+0.334058 -0.371795 0.225643 0 1 0
+-0.317777 -0.371795 0.176337 0 1 0
+0.279174 -0.120697 -0.333333 0 0 1
+0.178811 0.1265 0.371795 0 0 1
+0.052517 -0.294872 -0.193067 0 1 0
+-0.481595 -0.294872 0.155516 0 1 0
+0.106912 -0.170397 -0.333333 0 0 1
+-0.193241 0.371795 0.0740232 0 1 0
+-0.185985 -0.0636552 -0.333333 0 0 1
+-0.5 -0.262742 0.233346 1 0 0
+0.215451 -0.0666968 0.371795 0 0 1
+-0.361414 0.0251846 0.371795 0 0 1
+-0.227478 0.230897 -0.351757 0 1 0
+-0.400342 0.0586434 0.320513 0 0 1
+-0.421342 0.371795 0.212951 0 1 0
+0.16017 0.0902386 -0.333333 0 0 1
+0.46369 0.124643 0.320513 0 0 1
+0.296723 0.0411232 -0.333333 0 0 1
+0.228967 -0.172429 -0.333333 0 0 1
+0.141026 0.307299 0.228544 1 0 0
+0.390833 -0.371795 -0.209731 0 1 0
+-0.274805 -0.244287 -0.371795 0 0 1
+-0.109389 -0.256282 0.358893 0 1 0
+0.482507 -0.294872 -0.292592 0 1 0
+-0.5 0.165197 -0.0442305 1 0 0
+-0.0936345 0.371795 -0.336628 0 1 0
+-0.208596 0.371795 -0.143072 0 1 0
+0.039376 0.200813 0.327748 0.181503 0.953041 -0.242423
+-0.334992 0.371795 -0.301862 0 1 0
+0.168267 -0.0963299 0.320513 -0.0114007 0.0138706 0.999839
+-0.226387 0.371795 0.0850831 0 1 0
+0.000294807 -0.204555 0.330214 -0.0268439 0.996902 0.0739289
+0.5 -0.203639 0.163676 1 0 0
+0.26913 -0.371795 -0.201453 0 1 0
+0.318076 -0.116033 -0.333333 0.52931 0.0840294 0.844257
+0.5 -0.213221 -0.185398 1 0 0
+0.5 -0.214636 0.278384 1 0 0
+0.424904 -0.340231 -0.371795 0 0 1
+0.141109 -0.323857 -0.237417 1 0 0
+-0.354447 0.03002 0.371795 0 0 1
+-0.5 -0.166993 -0.124517 1 0 0
+-0.0975873 0.117559 0.320513 0 0 1
+0.0317879 0.319814 -0.371795 0 0 1
+0.20308 0.0262649 0.335469 0.995507 0.0946786 0.00111881
+-0.276179 0.371795 0.184334 0 1 0
+-0.5 -0.0485463 -0.0909377 1 0 0
+0.411878 -0.371795 0.124285 0 1 0
+-0.011667 -0.294872 0.317477 0.0503422 0.866987 -0.495781
+-0.267987 0.0225552 -0.0759162 0.811874 -0.583812 0.00490578
+-0.369145 -0.371528 0.320513 -0.0123614 -0.535868 0.844211
+-0.15126 -0.371795 -0.288498 -0.19593 0.980541 -0.012239
+-0.448718 -0.362446 -0.151535 0.999805 0.0182418 -0.00756387
+0.114949 -0.169745 0.369242 -0.371329 0.822991 0.429884
+-0.112993 0.371795 0.184362 0 1 0
+-0.203575 0.0202888 0.36608 0.939424 -0.242023 0.242711
+0.3954 -0.371795 0.0844698 0 1 0
+-0.19438 -0.0218346 0.320513 0.0292476 -0.00993823 0.999523
+0.448718 -0.307952 -0.0961654 1 0 0
+-0.335312 0.142813 0.371795 -0.229266 0.161864 0.959811
+0.141026 0.325476 -0.213853 1 0 0
+0.157027 -0.371795 -0.187162 0 1 0
+0.414327 -0.371795 -0.222766 0 1 0
+-0.141154 -0.36412 -0.188357 0.981536 -0.159336 -0.105825
+-0.490908 0.106717 -0.371795 0.125622 -0.0463102 0.990997
+-0.230833 -0.0435841 -0.30818 0.00167119 0.999959 -0.00889317
+-0.456684 0.371795 0.212093 0 1 0
+-0.5 -0.149614 0.13627 1 0 0
+-0.269964 0.0186964 -0.179022 0.895194 -0.445642 -0.00559999
+0.495143 0.294872 -0.358535 0.522161 0.852024 0.0374653
+0.312246 0.294872 -0.247095 0 1 0
+-0.311372 -0.371795 -0.214672 0 1 0
+0.10996 -0.0746115 -0.333333 0 0 1
+0.456623 0.0594871 0.320513 0 0 1
+0.306794 -0.19731 -0.358463 0.828732 -0.559646 0
+0.483984 -0.294872 0.238729 0 1 0
+-0.365535 -0.371795 0.0746823 0 1 0
+-0.5 -0.110025 -0.249024 1 0 0
+0.218243 -0.190918 0.371795 0 0 1
+0.379664 -0.0390372 -0.371795 0 0 1
+0.128968 0.371795 -0.0758093 0 1 0
+-0.457929 0.371795 -0.0554456 0 1 0
+0.191083 0.294872 0.294572 0 1 0
+-0.336416 0.371795 -0.190852 0 1 0
+0.364951 0.294872 -0.0167398 0 1 0
+0.136738 0.371795 0.19277 0.374433 0.922975 -0.0889754
+0.37851 0.294872 0.18491 0 1 0
+0.5 -0.0610543 -0.0900553 1 0 0
+0.240028 0.161474 0.371795 0 0 1
+0.292117 0.294872 0.0625409 0 1 0
+-0.5 0.124851 0.10638 1 0 0
+0.5 0.219541 0.0594112 1 0 0
+0.5 0.218626 -0.328864 1 0 0
+-0.141154 -0.363349 -0.0210969 0.998624 -0.0503346 0.0147352
+-0.5 0.210624 -0.30067 1 0 0
+0.423936 0.294872 0.10871 0 1 0
+-0.5 0.0423996 0.190442 1 0 0
+0.141026 0.299152 -0.168505 0.993025 0.117623 0.0081805
+-0.293144 0.133138 0.371795 0 0 1
+-0.358612 0.173478 -0.371795 0 0 1
+-0.5 -0.11426 -0.11077 1 0 0
+-0.120815 0.145965 -0.333333 0 0 1
+0.132769 -0.228386 0.371795 0 0 1
+-0.33401 0.0573383 -0.371795 -0.0370618 -0.00126871 0.999312
+0.410448 0.122652 -0.371795 0 0 1
+-0.382684 -0.0252099 0.347869 0.997454 0.071314 0
+0.5 -0.116159 0.297621 1 0 0
+0.0500637 0.371795 0.216685 0 1 0
+0.319472 0.279962 -0.371795 0 0 1
+-0.00908793 -0.294872 0.095433 0 1 0
+-0.448718 -0.358027 0.311464 0.990734 0.00395593 -0.135758
+0.203915 0.0273313 -0.330566 -0.572131 0.418233 0.705512
+-0.5 -0.242871 -0.0294051 1 0 0
+-0.5 0.352213 -0.35374 1 0 0
+0.178227 0.196977 -0.333333 0 0 1
+0.175368 0.105573 0.351641 0.839842 0.542831 0
+0.159538 0.140518 -0.333333 0 0 1
+-0.280714 0.0144433 -0.333333 -0.0517367 0.0331251 0.998111
+-0.425074 -0.371795 -0.0661595 0 1 0
+0.221057 0.0370642 -0.201494 -0.23629 0.97168 -0.00232693
+0.200107 0.0230105 -0.147575 0.790004 -0.613041 -0.00858853
+0.5 0.21349 -0.241552 1 0 0
+0.240289 -0.037116 -0.0736013 -0.277803 0.960512 0.015544
+0.414263 -0.245297 0.320513 0 0 1
+0.5 0.10515 -0.173827 1 0 0
+-0.5 0.321833 0.045878 1 0 0
+0.491046 -0.205 0.320513 0.0315912 0.0111478 0.999439
+0.396181 0.181304 0.320513 0 0 1
+0.5 -0.0319126 -0.154693 1 0 0
+0.175964 -0.271295 -0.371795 0 0 1
+0.373949 0.294872 0.275308 0 1 0
+-0.468341 -0.259341 -0.371795 0 0 1
+-0.5 -0.208848 -0.02886 1 0 0
+-0.266869 0.371795 0.282197 0 1 0
+0.105273 -0.291679 0.320513 0.00961808 -0.186622 0.982385
+0.00448776 -0.294872 -0.234394 0 1 0
+-0.158734 0.0473432 -0.333333 0 0 1
+-0.269772 -0.371795 0.133643 0 1 0
+-0.108765 -0.131273 -0.333333 0 0 1
+-0.222452 0.371795 0.154979 0 1 0
+0.5 0.0629176 -0.208153 1 0 0
+-0.121166 0.365786 0.320513 -0.0761011 0.517043 0.85257
+0.114422 -0.0986805 0.320513 0 0 1
+0.311926 -0.371795 -0.319256 0 1 0
+0.5 0.0333234 -0.104306 1 0 0
+-0.213363 -0.371795 0.0580114 0 1 0
+0.434076 -0.25343 -0.371795 0 0 1
+0.391106 -0.371795 0.206432 0 1 0
+-0.5 -0.0122052 -0.0186048 1 0 0
+0.117946 0.0490876 -0.333333 0 0 1
+0.04569 0.371795 0.255826 0 1 0
+-0.5 -0.0109438 -0.195776 1 0 0
+-0.129609 -0.175318 -0.333333 0 0 1
+-0.465251 -0.0193959 0.320513 0 0 1
+0.5 -0.0691341 0.0978553 1 0 0
+-0.0557917 0.371795 -0.306222 0 1 0
+0.241226 -0.161439 -0.333333 0 0 1
+0.5 0.00491121 0.298949 1 0 0
+0.105359 -0.294872 0.0737011 0 1 0
+0.5 0.0222769 0.307577 1 0 0
+0.236761 0.294872 0.224357 0 1 0
+-0.161497 -0.2539 0.335108 0.113458 0.993521 -0.00660545
+0.294257 -0.371795 -0.173298 0 1 0
+0.261472 -0.0229523 -0.140013 0.776119 -0.630136 0.0238456
+0.106621 0.36364 0.320513 -0.00845355 0.0775377 0.996954
+-0.322126 -0.308231 -0.371795 0 0 1
+-0.5 0.246655 -0.227625 1 0 0
+0.0641189 0.371795 0.299523 0 1 0
+0.215036 0.0377187 0.371795 0 0 1
+-0.282902 -0.203516 0.322899 0.499637 0.661872 -0.558827
+-0.247459 0.371795 0.158903 0 1 0
+-0.0729373 -0.0110473 0.320513 0 0 1
+0.25009 0.294872 0.000234329 0 1 0
+-0.296092 0.309389 -0.371795 0 0 1
+-0.5 -0.105068 -0.237418 1 0 0
+0.409492 0.294872 0.299306 0 1 0
+-0.5 0.240584 -0.363456 0.999162 -0.00666171 0.0403945
+0.0138855 -0.0777805 -0.333333 0 0 1
+-0.244673 -0.187346 0.371795 0 0 1
+0.141026 0.311009 -0.331802 1 0 0
+0.354595 0.0112015 -0.371795 0 0 1
+-0.375679 0.0649724 0.366186 0.964647 -0.177205 -0.195078
+0.302789 0.290158 0.320513 0.297333 0.216143 0.929987
+-0.0901236 0.371795 0.203849 0 1 0
+-0.209769 -0.131194 -0.333333 0 0 1
+0.141026 0.306669 -0.218124 1 0 0
+0.141026 0.355828 0.0922061 1 0 0
+0.5 -0.224153 -0.196621 1 0 0
+0.430046 -0.371795 0.118437 0 1 0
+-0.346541 -0.212178 -0.371795 0 0 1
+-0.312484 -0.371795 0.299131 0 1 0
+-0.186418 -0.371795 0.299726 0 1 0
+-0.36898 0.359618 -0.371795 0 0 1
+-0.312001 -0.371795 -0.0260352 0 1 0
+-0.212734 -0.371795 -0.36986 -0.0595882 0.864792 0.498582
+-0.5 0.308331 0.00528446 1 0 0
+-0.415671 -0.264734 -0.371795 0 0 1
+0.493658 -0.0916231 -0.371795 -0.321618 -0.0477783 0.945663
+0.163282 -0.334796 0.320513 0 0 1
+0.455179 -0.294872 0.246713 -0.0401151 0.999171 -0.00700357
+0.0316101 0.0852942 -0.333333 0 0 1
+-0.5 0.112907 0.184821 1 0 0
+-0.0921411 -0.294872 -0.00336025 0 1 0
+-0.0123625 0.371795 0.0421633 0 1 0
+-0.104622 -0.294872 0.25619 0 1 0
+-0.23525 -0.371795 -0.186572 0 1 0
+0.0789718 0.201961 0.371795 0 0 1
+0.141109 -0.299447 0.223244 0.972693 0.230055 -0.0307047
+0.5 0.224725 -0.326041 1 0 0
+-0.156768 0.371795 0.193382 0 1 0
+-0.264655 -0.343977 -0.371795 0 0 1
+0.5 -0.0625139 0.304977 1 0 0
+-0.0531667 -0.294872 0.162877 0 1 0
+0.5 -0.0711268 -0.27219 1 0 0
+0.0406101 0.230897 -0.362382 0.0122096 0.997978 0.0623766
+0.0423076 0.296359 0.320513 0 0 1
+-0.448718 -0.323993 -0.0496987 1 0 0
+-0.386929 -0.371795 0.0948313 0 1 0
+-0.5 0.0520853 0.111409 1 0 0
+0.36733 0.19128 -0.371795 0 0 1
+-0.276884 0.292722 -0.371795 0 0 1
+-0.4393 0.371795 0.257591 0 1 0
+0.5 0.119278 -0.337656 1 0 0
+-0.124354 -0.162425 0.336637 0.614224 0.789132 0
+-0.0651862 0.371795 -0.335937 0 1 0
+0.113429 0.371795 0.220917 0 1 0
+0.141026 0.360342 -0.322896 1 0 0
+-0.5 0.311136 0.0264869 1 0 0
+0.431871 -0.371795 -0.140328 0 1 0
+0.0133348 -0.112611 0.320513 0 0 1
+-0.409542 0.371795 0.168757 0 1 0
+0.263473 0.0200941 -0.0289474 0.858831 0.512233 -0.00511579
+0.176891 0.294872 -0.301863 0 1 0
+0.204035 0.074902 0.371795 0 0 1
+0.0429922 -0.294872 -0.112624 0 1 0
+-0.5 0.287516 0.205059 1 0 0
+0.0473889 0.295384 0.320513 0 0 1
+-0.232862 0.371795 0.267107 0 1 0
+0.280446 -0.371795 -0.0504407 0 1 0
+-0.243238 -0.0550475 -0.333333 0 0 1
+-0.211278 -0.0809579 0.371795 0 0 1
+-0.23704 0.371795 -0.213251 0 1 0
+-0.13268 -0.155944 0.334411 0.624415 0.781081 -0.00439578
+0.103199 0.17674 0.353845 0.475931 0.879482 0
+-0.204608 -0.371795 -0.181014 0 1 0
+-0.260519 -0.371795 0.313157 -0.0163682 0.992437 -0.121659
+-0.5 -0.00896015 0.271034 1 0 0
+0.409 -0.371795 -0.106522 0 1 0
+0.141026 0.297381 0.140876 0.918919 0.394347 0.00888727
+0.0199204 0.0418292 0.320513 0 0 1
+-0.320513 0.00824189 -0.360556 1 0 0
+0.35428 -0.214402 -0.371795 0 0 1
+0.141109 -0.328603 -0.18906 1 0 0
+0.285047 -0.371795 -0.203191 0 1 0
+-0.5 0.0663593 -0.0592015 1 0 0
+-0.5 0.14442 -0.0401795 1 0 0
+0.175309 0.294872 -0.281903 0 1 0
+-0.128035 0.371795 -0.24709 0 1 0
+-0.273913 0.00509625 -0.194338 0.991649 -0.127968 -0.0160344
+-0.219871 -0.198362 0.371795 0 0 1
+0.173865 0.107875 0.37063 0.502963 0.482945 -0.716793
+-0.5 0.0921225 -0.164575 1 0 0
+-0.141154 -0.33586 0.118614 1 0 0
+-0.5 0.182274 -0.227201 1 0 0
+-0.387762 0.371795 -0.126625 0 1 0
+-0.242563 0.230897 -0.335643 -0.143812 0.849974 0.506815
+-0.269132 0.203895 -0.333333 0 0 1
+-0.299913 -0.321348 -0.371795 0 0 1
+0.176113 0.0533458 -0.333333 0 0 1
+-0.235134 0.371795 -0.200798 0 1 0
+0.5 -0.276363 0.216796 1 0 0
+0.319929 -0.343697 -0.371795 0 0 1
+-0.5 -0.11594 0.107491 1 0 0
+0.337327 -0.31383 0.320513 0 0 1
+0.0117977 -0.294872 -0.000215027 0 1 0
+0.448718 -0.333557 -0.105053 1 0 0
+0.5 -0.0127903 0.163417 1 0 0
+0.354867 -0.159861 -0.371795 0 0 1
+-0.417566 -0.371795 -0.0380783 0 1 0
+-0.141154 -0.348423 0.0504297 1 0 0
+0.5 0.130512 0.271736 1 0 0
+-0.470476 -0.115979 0.320513 0 0 1
+0.065008 0.371795 -0.0189854 0 1 0
+0.220502 0.0239305 0.371795 0 0 1
+0.15712 0.294872 -0.213837 0 1 0
+-0.5 -0.118439 -0.333188 1 0 0
+0.5 0.143039 -0.0398978 1 0 0
+-0.5 0.176054 0.203944 1 0 0
+-0.315807 0.371795 -0.240989 0 1 0
+-0.238752 0.371795 -0.338169 0 1 0
+0.263774 -0.019665 -0.0511287 0.887345 -0.460916 -0.0132233
+-0.194828 0.19071 -0.333333 0 0 1
+0.5 0.293619 0.0140893 0.735591 0.673489 -0.0729233
+0.262594 -0.371795 -0.16437 0 1 0
+-0.0880671 0.371795 -0.102409 0 1 0
+-0.0303673 0.371795 -0.241331 0 1 0
+0.378954 -0.10803 -0.371795 0 0 1
+0.5 -0.140591 -0.366223 0.881677 -0.0843827 -0.464246
+0.434053 0.294872 -0.0189911 0 1 0
+-0.273145 0.371795 -0.187129 0 1 0
+-0.0755065 -0.135329 -0.333333 0 0 1
+-0.075064 0.334438 -0.371795 0 0 1
+0.091346 0.371795 -0.278509 0 1 0
+-0.5 0.345761 0.0243015 1 0 0
+0.282019 -0.132646 0.371795 0 0 1
+0.140398 0.371795 -0.136119 0.718613 0.687947 -0.101608
+-0.000584816 -0.294872 0.258667 0 1 0
+-0.112682 -0.294872 0.236095 0 1 0
+0.162938 -0.124598 0.349846 0.80052 -0.599231 0.0094379
+0.5 -0.177803 0.140409 1 0 0
+-0.5 0.0156487 -0.13185 1 0 0
+0.420548 -0.269706 0.320513 0 0 1
+-0.405994 0.371795 -0.0339679 0 1 0
+-0.363711 0.371795 0.0472892 0 1 0
+0.265893 -0.0153371 -0.32997 0.742722 -0.217952 0.633136
+-0.375629 -0.371795 0.210066 0 1 0
+0.5 0.171845 -0.333097 1 0 0
+0.193602 0.294872 0.276604 0 1 0
+0.5 -0.00121645 -0.307335 1 0 0
+0.321383 0.278925 -0.371795 0 0 1
+-0.301824 0.371795 0.299425 0 1 0
+-0.308636 0.278959 0.320513 0 0 1
+-0.448718 -0.313273 -0.318139 1 0 0
+0.191988 -0.258977 0.320513 0 0 1
+-0.448718 -0.348649 0.304099 1 0 0
+0.5 -0.200733 -0.0939207 1 0 0
+-0.245484 -0.230731 -0.343781 0.0636839 0.997116 -0.0412788
+0.448718 -0.339867 0.000510184 1 0 0
+0.432195 0.277953 -0.371795 0 0 1
+0.398338 0.294872 0.0873912 0 1 0
+-0.156728 -0.149933 0.371795 0 0 1
+-0.293132 0.371795 0.239757 0 1 0
+-0.5 -0.0597354 0.2571 1 0 0
+-0.163767 -0.371795 0.11854 0 1 0
+-0.113266 0.130186 0.320513 0 0 1
+0.0282298 0.371795 -0.203893 0 1 0
+-0.412021 0.371795 0.026248 0 1 0
+-0.5 0.352872 0.32048 -0.593229 0.298155 0.747785
+-0.141154 -0.339247 0.290333 1 0 0
+0.0380533 -0.294872 0.268166 0 1 0
+0.258657 -0.161595 -0.333333 0 0 1
+-0.336232 0.371795 -0.173324 0 1 0
+-0.300886 -0.188833 0.342789 0.69812 0.71598 0
+0.399614 0.294872 -0.0856158 0 1 0
+0.0639175 0.0922458 0.320513 0 0 1
+0.315542 -0.0306924 0.371795 0 0 1
+-0.5 0.303787 0.0607625 1 0 0
+0.0649728 -0.114414 0.320513 0 0 1
+-0.5 0.076625 -0.271388 1 0 0
+0.286064 0.010722 0.371795 0 0 1
+0.320513 0.153751 -0.345894 0.999271 0.0381186 -0.00191636
+0.448718 -0.349384 0.202073 1 0 0
+-0.201089 0.0317307 -0.155639 0.683727 0.729595 0.0144508
+0.5 -0.217901 0.213441 1 0 0
+0.0652396 -0.294872 0.163493 0 1 0
+-0.0605882 0.0909249 -0.333333 0 0 1
+-0.211271 0.0388211 -0.160414 0.44481 0.895622 0.0020532
+-0.174466 0.153968 0.371795 0 0 1
+-0.0394194 -0.0220002 0.320513 0 0 1
+-0.263082 -0.371795 -0.317438 0 1 0
+0.446488 -0.371795 -0.0507131 -0.364626 0.931038 0.0146931
+-0.5 0.00986729 -0.0346466 1 0 0
+-0.172985 0.11197 -0.333333 0 0 1
+0.14929 -0.371795 -0.0369333 0.228153 0.97337 0.0223141
+-0.5 0.0670004 -0.146327 1 0 0
+0.5 0.170471 0.19989 1 0 0
+0.365627 -0.371795 -0.0904596 0 1 0
+0.32786 -0.182131 0.320513 0 0 1
+-0.11002 -0.294872 -0.190713 0 1 0
+-0.482057 -0.0753139 0.320513 0 0 1
+0.266304 0.294872 0.0360922 0 1 0
+-0.260215 0.0319648 -0.23852 -0.672708 0.739793 0.013041
+-0.261824 -0.030356 -0.0775159 0.744775 0.667152 0.0147534
+-0.382513 -0.140251 0.320513 0 0 1
+-0.242508 -0.371795 0.117789 0 1 0
+-0.252031 -0.0379985 -0.274716 0.460289 0.887753 0.0054162
+0.340029 -0.371795 0.296792 0 1 0
+-0.10411 -0.230897 -0.336054 0.00276936 0.754484 -0.656313
+-0.0960488 0.182357 -0.333333 0 0 1
+0.0506937 0.371795 0.128929 0 1 0
+-0.5 0.0977406 -0.246339 1 0 0
+-0.5 0.0349252 0.00899415 1 0 0
+-0.0933842 0.0134147 0.320513 0 0 1
+-0.5 -0.0573532 -0.180624 1 0 0
+0.5 0.129498 0.181784 1 0 0
+0.353976 0.0183086 0.371795 0 0 1
+0.260725 -0.0240192 -0.169244 0.791508 -0.611111 0.00763012
+0.358023 0.219329 0.320513 0 0 1
+0.5 0.288259 -0.294101 0.948577 0.315256 -0.028558
+-0.410017 -0.236032 0.320513 0 0 1
+-0.5 -0.162544 -0.162065 1 0 0
+-0.5 -0.00696375 -0.0931799 1 0 0
+0.0260358 0.15862 -0.333333 0 0 1
+-0.262628 0.371795 -0.12761 0 1 0
+0.5 0.25241 0.0682116 1 0 0
+-0.384322 -0.00231224 0.356232 0.999656 0.0252915 0.00696362
+0.5 0.231844 -0.311052 1 0 0
+0.351733 -0.371795 0.155959 0 1 0
+-0.117351 0.371795 0.121911 0 1 0
+0.437891 -0.0391214 0.320513 0 0 1
+-0.274155 0.169953 -0.333333 0 0 1
+-0.5 -0.166716 -0.170966 1 0 0
+0.228077 0.149164 0.371795 0 0 1
+-0.429008 -0.339943 -0.371795 0 0 1
+0.285471 -0.344894 -0.371795 0 0 1
+0.453816 0.271279 -0.371795 0 0 1
+-0.5 0.308675 -0.349546 1 0 0
+0.5 -0.114334 -0.333313 1 0 0
+0.5 -0.108981 -0.0883351 1 0 0
+0.370664 -0.0814311 0.340904 0.937693 -0.347464 0
+0.478685 -0.0955751 0.320513 0 0 1
+-0.264968 0.0268671 -0.0520907 0.786215 -0.617842 0.011732
+0.272447 0.294872 -0.179075 0 1 0
+-0.5 -0.0784369 0.290377 1 0 0
+0.473586 0.294872 0.171098 0 1 0
+0.148531 0.294872 -0.21588 0.215203 0.975161 -0.052433
+0.448718 -0.326345 0.0674772 1 0 0
+-0.206917 0.0363093 -0.0462666 0.54435 0.8387 -0.0162776
+-0.177319 -0.250923 0.369876 0.201965 0.899338 -0.387817
+0.0743053 -0.294872 -0.190608 0 1 0
+0.263549 0.294872 0.0631138 0 1 0
+0.339723 -0.240012 0.320513 0 0 1
+0.5 -0.0615578 0.0993717 1 0 0
+0.248775 0.0991536 0.371795 0 0 1
+0.23553 -0.371795 -0.209858 0 1 0
+-0.236759 0.371795 0.0855836 0 1 0
+0.141109 -0.368883 -0.243375 0.859045 0.509582 0.0486547
+-0.156744 -0.108694 0.320513 0 0 1
+0.473189 -0.0997033 -0.371795 0 0 1
+0.082665 -0.227696 -0.333333 -0.100851 -0.446285 0.88919
+-0.5 0.0876829 -0.0817638 1 0 0
+0.135753 -0.275413 -0.371795 0 0 1
+-0.17186 -0.11102 0.371795 0.800455 0.448623 0.397502
+0.5 0.0681736 -0.307343 1 0 0
+0.141109 -0.364294 0.00492362 0.973074 0.221445 0.0639472
+-0.141154 -0.340427 -0.240343 1 0 0
+-0.268166 -0.371795 -0.352486 0 1 0
+0.250734 -0.371795 0.166434 0 1 0
+0.141109 -0.343279 -0.136803 1 0 0
+0.5 0.096085 0.297326 1 0 0
+0.288229 0.294872 0.291864 0 1 0
+0.214473 0.294872 0.163413 0 1 0
+-0.454558 -0.294872 0.235992 0.354006 0.931575 -0.0827489
+0.374844 -0.339827 -0.371795 0 0 1
+-0.5 0.224629 0.16488 1 0 0
+-0.141154 -0.365811 -0.280121 0.99493 -0.0956707 0.0309955
+-0.210565 -0.371795 -0.150533 0 1 0
+-0.090892 0.0160977 0.320513 0 0 1
+0.448718 -0.371243 -0.301071 -0.292043 0.953469 0.074884
+0.291939 -0.371795 -0.218068 0 1 0
+-0.15488 -0.123068 -0.333333 0 0 1
+-0.304564 -0.00230664 -0.333333 0 0 1
+-0.5 0.180014 -0.264969 1 0 0
+0.461924 -0.294872 -0.0168304 0 1 0
+0.19614 -0.371795 0.0692691 0 1 0
+0.5 -0.176472 -0.309273 1 0 0
+0.467209 -0.294872 0.16088 0 1 0
+-0.0394135 -0.294872 0.0549235 0 1 0
+-0.5 -0.275843 0.307332 1 0 0
+0.263804 -0.034587 0.371795 0 0 1
+-0.0132218 -0.294872 0.234228 0 1 0
+-0.17529 -0.00201782 0.320513 0 0 1
+-0.448718 -0.302215 -0.0243492 0.944906 0.255079 0.205152
+0.5 -0.282741 -0.216045 1 0 0
+-0.0454545 0.256282 0.358464 0 1 0
+0.326765 0.294872 0.277729 0 1 0
+-0.085226 0.359698 -0.371795 0.00345819 -0.0251971 0.999676
+-0.5 -0.0347587 -0.196955 1 0 0
+-0.239512 0.248216 0.320513 0 0 1
+-0.5 -0.00748841 0.124278 1 0 0
+0.440078 0.216119 -0.371795 0 0 1
+0.202181 0.025598 -0.0870605 0.747797 -0.663757 -0.0150575
+0.412697 0.294872 -0.250687 0 1 0
+-0.151233 -0.371795 -0.325992 -0.158401 0.98708 0.0241196
+0.0565903 -0.265681 -0.371795 0 0 1
+0.448718 -0.30791 0.308406 1 0 0
+0.0852342 -0.294872 -0.219581 0 1 0
+-0.105292 -0.0917937 -0.333333 0 0 1
+-0.141154 -0.308432 -0.0114141 1 0 0
+-0.44485 0.117138 -0.371795 0 0 1
+0.448718 -0.337326 0.113203 1 0 0
+-0.165444 0.371795 -0.271856 0 1 0
+-0.271974 -0.371795 -0.211163 0 1 0
+-0.5 -0.0689856 0.0596834 1 0 0
+-0.141154 -0.33235 -0.0776845 1 0 0
+-0.296118 -0.271514 -0.371795 0 0 1
+0.17522 -0.039829 0.320513 0 0 1
+-0.5 -0.170267 -0.247486 1 0 0
+-0.261643 0.0281569 -0.0342414 -0.505457 0.64884 0.568788
+-0.5 0.247279 0.220732 1 0 0
+0.00647894 -0.163481 -0.333333 0 0 1
+0.231834 -0.0766441 -0.333333 0 0 1
+-0.268384 -0.371795 -0.262442 0 1 0
+0.5 -0.070176 0.138396 1 0 0
+-0.201418 0.0320599 -0.157138 0.708475 0.705709 -0.00615712
+-0.0288787 -0.204064 0.371795 0.14718 0.629198 0.763183
+-0.186502 -0.180413 -0.333333 0 0 1
+0.5 -0.0604543 -0.036251 1 0 0
+-0.5 0.334267 0.0329446 1 0 0
+0.5 -0.0479143 0.253528 1 0 0
+-0.141154 -0.33724 0.0466627 1 0 0
+0.160444 -0.371795 0.160103 0 1 0
+0.060282 -0.294872 0.00827622 0 1 0
+-0.122541 0.205557 -0.333333 0 0 1
+0.261529 0.0228701 -0.114838 0.793533 0.608525 -0.00162096
+-0.5 0.332547 0.0684494 1 0 0
+0.26806 -0.00886706 -0.0126455 0.962602 -0.270682 -0.0113129
+0.343541 0.294872 -0.0115889 0 1 0
+-0.5 0.0574223 0.310482 0.998258 -0.0163548 -0.0566821
+-0.248028 0.0666378 -0.333333 0 0 1
+0.192461 0.0017476 -0.0297477 0.997787 -0.0539155 -0.038909
+0.5 0.0932031 -0.168132 1 0 0
+-0.115141 0.0708603 0.320513 0 0 1
+0.0646169 0.371795 0.211518 0 1 0
+0.5 0.183723 0.0764558 1 0 0
+0.320513 -0.120897 -0.338557 0.915475 -0.00380163 0.402358
+-0.467961 -0.294872 -0.117215 0 1 0
+-0.5 0.368597 -0.109476 0.699215 -0.712902 0.0535622
+-0.20335 0.371795 0.0494656 0 1 0
+-0.5 0.106497 -0.190901 1 0 0
+0.0884578 -0.294872 -0.23441 0 1 0
+-0.0308265 0.371795 -0.22502 0 1 0
+0.0908983 0.113556 0.320513 0 0 1
+-0.5 0.121705 -0.0488291 1 0 0
+-0.302142 0.338528 -0.371795 0 0 1
+0.301435 -0.132247 0.371795 0 0 1
+0.5 0.26408 -0.321355 1 0 0
+0.0373593 -0.294872 -0.150217 0 1 0
+-0.5 0.118139 -0.245361 1 0 0
+-0.5 -0.236533 0.1002 1 0 0
+0.103155 0.176764 0.347868 0.475932 0.879482 0
+-0.202932 0.0280468 0.367273 0.955323 -0.132879 0.264009
+0.11559 0.164022 -0.333333 0 0 1
+-0.397854 -0.371795 -0.0669811 0 1 0
+0.0579366 -0.294872 -0.27601 0 1 0
+-0.393414 -0.371795 0.161708 0 1 0
+0.153796 -0.371795 -0.220339 0 1 0
+-0.494416 0.308929 0.320513 -0.286902 0.0668376 0.955625
+0.233372 -0.325762 0.320513 0 0 1
+-0.5 0.210138 -0.341263 1 0 0
+-0.303632 -0.346627 -0.371795 0 0 1
+0.5 0.102194 -0.2013 1 0 0
+0.238321 0.159637 0.371795 0 0 1
+0.5 -0.0537603 -0.00305517 1 0 0
+-0.242486 -0.230897 -0.354249 0.0278536 0.999612 -0.000938899
+0.480732 -0.294872 -0.339258 0 1 0
+0.0742106 0.371795 0.102266 0 1 0
+0.5 0.241675 0.193087 1 0 0
+-0.108961 -0.294872 -0.188173 0 1 0
+-0.496942 0.243661 -0.371795 0.500743 0.0570092 0.863717
+0.0449381 0.371795 -0.190167 0 1 0
+-0.337541 0.371795 0.177889 0 1 0
+0.0175097 -0.0648593 0.320513 0 0 1
+-0.145075 0.37083 -0.371795 0.0283471 -0.635156 0.771863
+-0.131661 0.268909 -0.371795 0 0 1
+0.181396 0.0408076 0.320513 0 0 1
+-0.5 0.0377553 0.114857 1 0 0
+0.141026 0.318614 -0.00418694 1 0 0
+0.200105 -0.249369 -0.371795 0 0 1
+-0.44295 0.371795 0.0637656 0 1 0
+0.32227 0.294872 0.190999 0 1 0
+0.5 0.216686 0.252332 1 0 0
+0.292239 -0.371795 -0.0601963 0 1 0
+0.5 0.216367 0.0872244 1 0 0
+-0.274544 0.371795 -0.087977 0 1 0
+-0.462918 -0.294872 0.257505 0 1 0
+-0.5 -0.0514773 0.209257 1 0 0
+-0.5 0.261799 -0.279091 1 0 0
+0.28011 -0.290346 -0.371795 0 0 1
+-0.235832 -0.371795 0.221508 0 1 0
+0.0553871 0.3664 0.320513 -0.0862818 0.414296 0.906043
+-0.5 -0.132171 -0.244861 1 0 0
+-0.5 0.234466 0.0107117 1 0 0
+0.278521 0.294872 -0.198023 0 1 0
+0.409263 0.0757106 0.320513 0 0 1
+-0.00463351 0.371795 -0.281351 0 1 0
+-0.5 0.172278 0.101121 1 0 0
+0.141109 -0.343222 -0.124237 1 0 0
+0.5 -0.0143711 -0.342938 1 0 0
+-0.5 -0.141139 0.260042 1 0 0
+0.5 0.146013 0.0657115 1 0 0
+-0.314853 -0.371795 -0.193525 0 1 0
+0.380939 -0.185817 0.320513 0 0 1
+-0.315735 -0.371795 0.142061 0 1 0
+0.272885 -0.155919 0.371795 0 0 1
+-0.211347 -0.0388563 -0.256546 -0.471397 0.88191 0.00434629
+0.5 -0.0827649 0.0928837 1 0 0
+-0.015079 0.116799 0.320513 0 0 1
+0.242273 -0.371795 0.134278 0 1 0
+-0.290888 0.371795 -0.216529 0 1 0
+0.0332068 -0.294872 0.138644 0 1 0
+-0.11426 0.170281 0.352007 -0.579037 0.815129 0.0167658
+-0.119135 0.230897 -0.333545 0.171663 0.358338 0.917674
+-0.5 -0.125655 -0.118693 1 0 0
+0.179302 -0.171001 -0.333333 0 0 1
+0.5 -0.191637 -0.303088 1 0 0
+-0.141154 -0.312933 0.25867 1 0 0
+0.141109 -0.335963 0.245674 1 0 0
+0.141109 -0.322266 0.199016 1 0 0
+-0.5 -0.16071 0.17966 1 0 0
+0.5 0.175935 0.180091 1 0 0
+0.396663 0.217633 0.320513 0 0 1
+0.141026 0.360287 0.179826 1 0 0
+0.5 0.226832 0.169928 1 0 0
+0.265017 0.294872 0.220511 0 1 0
+0.367539 -0.0947263 -0.371795 0 0 1
+0.15937 -0.371795 -0.154695 0 1 0
+0.5 -0.178017 0.106705 1 0 0
+0.5 0.285955 0.157921 0.967114 0.254344 0
+-0.0943094 0.152327 -0.333333 0 0 1
+0.462126 0.294872 -0.100401 0 1 0
+-0.185015 0.224476 -0.333333 -0.0732479 0.220503 0.972632
+0.5 -0.0638388 0.00988269 1 0 0
+-0.5 -0.00720664 -0.0502107 1 0 0
+-0.407187 0.371795 0.1619 0 1 0
+-0.215491 -0.255008 -0.371795 0 0 1
+-0.5 0.236186 0.183959 1 0 0
+0.191224 -0.371795 -0.0748907 0 1 0
+-0.213127 0.113651 -0.333333 0 0 1
+0.157866 0.180769 0.371795 0 0 1
+-0.231001 -0.371795 -0.176795 0 1 0
+-0.0279991 0.262415 0.320513 -0.0327343 0.236588 0.971058
+0.305377 -0.371795 0.136935 0 1 0
+-0.422534 -0.160131 -0.371795 0 0 1
+0.141026 0.302451 0.262199 0.999675 0.0237399 -0.00930137
+0.277024 0.119595 0.371795 0 0 1
+0.300725 0.294872 0.238145 0 1 0
+0.267457 0.0111182 -0.0818629 0.946264 0.322764 -0.0202028
+0.22161 0.0372125 -0.330414 -0.223486 0.851186 0.474907
+-0.5 0.36968 -0.0931148 0.747078 -0.583699 -0.318072
+0.0326639 0.371795 -0.116635 0 1 0
+-0.175372 -0.371795 0.302597 0 1 0
+0.448718 -0.332522 0.0511631 1 0 0
+-0.0800379 -0.294872 -0.12704 0 1 0
+0.381217 -0.0395146 0.355403 0.987605 -0.156898 0.0043942
+0.5 -0.00318799 -0.0368684 1 0 0
+0.141026 0.312616 0.28684 1 0 0
+-0.33188 -0.371795 -0.0940064 0 1 0
+0.5 -0.05174 -0.257274 1 0 0
+-0.0346417 -0.201787 0.371795 0.278313 0.653416 0.703981
+-0.0405481 -0.209614 -0.333333 0 0 1
+0.465315 -0.0156216 0.320513 0 0 1
+-0.5 0.0921075 -0.192824 1 0 0
+0.314247 0.119767 -0.333333 0.333784 -0.116009 0.935484
+-0.448718 -0.322748 -0.0445146 1 0 0
+0.327587 -0.371795 -0.0635401 0 1 0
+-0.5 0.202474 0.129484 1 0 0
+0.5 0.16913 -0.156602 1 0 0
+-0.5 -0.272986 -0.100807 1 0 0
+-0.0351895 0.371795 0.0197084 0 1 0
+0.0469104 -0.0206125 -0.333333 0 0 1
+-0.190549 -0.371795 -0.22263 0 1 0
+0.5 0.134105 0.079922 1 0 0
+-0.141154 -0.323948 -0.232903 1 0 0
+0.448718 -0.342879 0.0559861 1 0 0
+0.313636 -0.371795 0.230411 0 1 0
+0.343253 -0.371795 0.270004 0 1 0
+0.413724 0.111944 0.320513 0 0 1
+-0.371409 0.0841532 0.320513 0.710975 -0.398063 -0.579707
+-0.245621 0.244629 0.320513 0 0 1
+0.00309195 -0.204555 0.329243 -0.00972795 0.997543 0.0693776
+0.5 -0.146733 -0.279915 1 0 0
+-0.342769 -0.120479 -0.371795 0 0 1
+-0.309432 -0.0746134 -0.333333 -0.0867771 -0.0191702 0.996043
+0.268831 0.294872 -0.202348 0 1 0
+0.5 0.123123 -0.013747 1 0 0
+-0.309001 0.371795 0.247646 0 1 0
+-0.111557 0.371795 0.0283538 0 1 0
+-0.345682 -0.371795 -0.304907 0 1 0
+-0.426373 0.371795 -0.235505 0 1 0
+-0.167494 -0.0947084 0.320513 0 0 1
+-0.5 0.033093 -0.129777 1 0 0
+-0.247176 0.371795 -0.290557 0 1 0
+0.0785201 -0.230897 -0.3392 0.0225919 0.964796 -0.262026
+0.0649275 0.0125062 0.320513 0 0 1
+-0.5 -0.264546 -0.0507088 1 0 0
+0.5 0.247684 0.310333 1 0 0
+-0.260824 -0.371795 0.145144 0 1 0
+-0.127256 0.371795 0.225819 0 1 0
+-0.00670978 0.221199 -0.333333 -0.0184628 0.150873 0.988381
+0.5 -0.208177 0.150724 1 0 0
+0.173774 -0.0975352 0.320513 -0.177514 0.115494 0.977318
+-0.366339 -0.282323 -0.371795 0 0 1
+0.272949 0.248251 -0.371795 0 0 1
+-0.122186 0.371795 0.249175 0 1 0
+-0.250001 -0.038945 -0.292346 0.467511 0.88395 0.00811718
+0.141026 0.333977 -0.143453 1 0 0
+-0.5 0.185173 -0.304491 1 0 0
+0.457674 -0.294872 -0.149578 -0.155161 0.987676 0.0205177
+0.367248 -0.371795 -0.191336 0 1 0
+-0.120599 -0.0771339 0.320513 0 0 1
+0.24165 0.063764 0.371795 0 0 1
+0.065565 -0.161803 -0.333333 0 0 1
+0.126984 -0.294872 0.128551 0 1 0
+-0.00728585 0.0867339 -0.333333 0 0 1
+-0.5 0.370502 0.125213 -0.550131 0.825251 -0.127737
+0.258627 0.180429 0.371795 0 0 1
+0.200454 -0.292697 0.320513 0 0 1
+0.146588 0.294872 0.283699 0.346235 0.937404 -0.037363
+0.244253 -0.0359885 -0.139142 -0.31612 0.948719 0
+0.312638 -0.170459 0.371795 0.208248 -0.15714 0.96537
+0.373094 0.203391 -0.371795 0 0 1
+0.0620017 -0.294872 0.227335 0 1 0
+0.43453 -0.230753 0.320513 0 0 1
+-0.407612 -0.0741546 0.320513 0 0 1
+0.5 0.0111109 -0.114312 1 0 0
+-0.29376 -0.355286 0.320513 0 0 1
+0.5 -0.187043 0.26935 1 0 0
+0.307083 0.0181852 -0.333333 0 0 1
+0.187034 0.294872 -0.136351 0 1 0
+0.208261 -0.371795 0.208567 0 1 0
+-0.0607529 -0.294872 0.0438064 0 1 0
+0.323607 0.294872 -0.354876 0 1 0
+0.124273 -0.294872 0.185679 0 1 0
+0.141109 -0.358414 -0.365407 0.955792 -0.0621718 0.287396
+0.155797 0.294872 -0.190621 0 1 0
+0.320513 -0.0698855 -0.367597 0.850511 0.056054 0.522961
+-0.10109 -0.294872 0.240859 0 1 0
+0.328423 -0.371795 0.281923 0 1 0
+-0.0995286 -0.23205 0.371795 0 0 1
+-0.257911 -0.0817522 0.371795 0 0 1
+-0.5 0.0574661 -0.140939 1 0 0
+0.407802 0.0327309 -0.371795 0 0 1
+0.445081 -0.296269 0.320513 0.311829 -0.163192 0.936019
+0.424188 0.00404769 0.320513 0 0 1
+-0.0400337 0.371795 0.123662 0 1 0
+0.36902 -0.371795 0.303213 0 1 0
+-0.273879 0.00548624 -0.0588358 0.989655 -0.143453 0.00214163
+-0.272129 -0.159406 -0.333333 0 0 1
+0.5 -0.221962 -0.0101379 1 0 0
+0.5 -0.136545 0.17443 1 0 0
+-0.186128 -0.151102 -0.333333 0 0 1
+0.0995831 0.178697 0.359917 0.475928 0.879484 0
+0.356913 -0.371795 -0.264985 0 1 0
+0.486451 -0.0215605 0.320513 0 0 1
+-0.5 0.343641 0.0350499 1 0 0
+-0.439861 0.371795 -0.0170102 0 1 0
+0.5 -0.211511 -0.12237 1 0 0
+-0.299334 -0.371795 0.0543761 0 1 0
+0.222268 -0.371795 -0.0227088 0 1 0
+0.0501529 0.00837505 -0.333333 0 0 1
+-0.5 0.0331668 -0.29099 1 0 0
+0.0418062 -0.0982683 0.320513 0 0 1
+-0.5 -0.238005 0.239617 1 0 0
+0.123419 0.371795 -0.0350648 0 1 0
+0.0167424 0.371795 -0.327463 0 1 0
+-0.0177112 -0.204428 0.341838 0.0959362 0.995386 -0.00185896
+-0.5 -0.143129 0.040008 1 0 0
+-0.5 0.285588 -0.193666 1 0 0
+-0.077227 -0.164803 0.320513 0 0 1
+0.216851 -0.371795 -0.02493 0 1 0
+-0.258821 0.203095 0.371795 0 0 1
+0.197025 0.294872 -0.163304 0 1 0
+-0.311425 0.0430506 -0.333333 -0.126584 0.0393023 0.991177
+-0.5 -0.135205 0.300284 1 0 0
+-0.299098 0.335553 0.320513 0 0 1
+0.494465 0.277108 0.320513 0.381098 0.000315396 0.924535
+-0.141154 -0.345723 -0.347395 1 0 0
+0.5 -0.207899 -0.295105 1 0 0
+0.323389 0.219564 0.320513 0 0 1
+0.126419 -0.294872 0.234115 0 1 0
+0.241337 0.121551 -0.333333 0 0 1
+-0.397845 -0.371795 -0.128238 0 1 0
+-0.448718 -0.37092 0.018756 0.661172 0.741426 -0.114626
+-0.00196419 0.371795 -0.358877 0 1 0
+-0.193914 -0.0230722 -0.291121 0.835853 -0.548953 0
+0.5 -0.0213174 -0.166459 1 0 0
+-0.5 -0.0297532 0.210606 1 0 0
+0.206632 -0.0298729 -0.175868 0.616305 0.786745 -0.0346506
+-0.5 -0.103028 0.121448 1 0 0
+0.0273957 -0.230897 -0.352234 0 1 0
+-0.393305 0.371795 0.304102 0 1 0
+0.268413 0.0112525 -0.333333 0.640278 0.294847 0.709302
+0.5 0.0922237 -0.179479 1 0 0
+-0.320513 -0.0293341 -0.344759 0.992944 0.0354137 -0.113171
+-0.1326 -0.294872 -0.0268035 -0.0924225 0.995377 0.0261112
+0.5 0.169169 0.240572 1 0 0
+-0.20183 -0.0324721 -0.316333 -0.672738 0.739726 0.0151285
+-0.438071 0.371795 -0.120755 0 1 0
+0.010999 -0.182341 0.320513 0 0 1
+-0.196332 0.371795 -0.0978865 0 1 0
+0.426268 0.294872 0.0138502 0 1 0
+-0.303544 -0.371795 -0.194769 0 1 0
+0.141109 -0.3053 0.105122 1 0 0
+-0.197371 0.371795 0.200296 0 1 0
+-0.137946 -0.294872 0.164203 -0.24627 0.959959 0.133529
+-0.0376196 -0.000846907 -0.333333 0 0 1
+-0.132687 0.255961 0.358319 -0.0613181 0.998114 0.00278928
+0.317073 -0.341013 -0.371795 0 0 1
+0.259034 -0.0259207 -0.120064 0.708413 -0.705291 0.0267397
+-0.176894 0.371795 0.110887 0 1 0
+0.411371 0.294427 0.320513 -0.0196466 0.61862 0.785445
+0.288093 0.294872 0.180787 0 1 0
+-0.5 0.185495 0.0162591 1 0 0
+-0.416707 -0.00539502 0.320513 0 0 1
+0.155206 0.133425 0.353858 0.735715 0.677292 0
+0.304014 0.0624519 0.371795 0 0 1
+0.0292959 0.173441 -0.333333 0 0 1
+0.00490412 -0.204555 0.35895 0 1 0
+-0.22647 -0.371795 -0.182772 0 1 0
+-0.251227 -0.173843 0.371795 0 0 1
+0.450564 0.294872 0.317441 0.0562057 0.859474 0.508081
+-0.158538 0.254112 0.355503 -0.0749108 0.997188 0.00205972
+0.0817341 0.371795 0.00350885 0 1 0
+0.5 0.0774173 0.152043 1 0 0
+-0.295973 -0.371795 0.0579754 0 1 0
+0.192691 -0.00438361 -0.173041 0.99451 0.10447 0.006042
+-0.5 -0.290336 0.0310126 0.980886 0.194575 -0.00202083
+0.5 -0.0768667 -0.29769 1 0 0
+-0.5 0.21069 0.274552 1 0 0
+0.316546 -0.371795 0.0109778 0 1 0
+-0.0454546 -0.294872 0.124517 0 1 0
+-0.397416 -0.242015 -0.371795 0 0 1
+-0.147779 0.171553 -0.333333 0 0 1
+0.267368 -0.0114507 -0.189552 0.960191 -0.278643 0.0197674
+0.5 0.00916736 -0.201982 1 0 0
+0.112509 0.256282 0.336805 0 1 0
+0.0499255 0.371795 0.295005 0 1 0
+0.177946 0.294872 -0.0790947 0 1 0
+-0.5 -0.225431 -0.276154 1 0 0
+0.12574 -0.0755047 -0.333333 0 0 1
+-0.455017 -0.294872 0.101398 0.121778 0.991437 -0.0471445
+0.124618 -0.198604 -0.333333 0 0 1
+0.5 0.0887745 -0.334474 1 0 0
+-0.448718 -0.369838 -0.304754 0.898742 0.43826 0.0138524
+-0.266893 0.361693 0.320513 -0.0352455 0.112068 0.993075
+0.0571225 0.371795 -0.152295 0 1 0
+-0.5 0.0115458 0.186272 1 0 0
+0.188652 0.294872 -0.286677 0 1 0
+-0.225094 0.371795 0.242052 0 1 0
+-0.0736287 -0.220479 0.371795 0 0 1
+-0.17967 0.105324 -0.333333 0 0 1
+-0.5 -0.199648 -0.296751 1 0 0
+-0.163923 0.371795 -0.245384 0 1 0
+0.48966 0.294872 -0.136258 0.143116 0.989662 0.00936544
+0.140535 0.371795 -0.307328 0.642305 0.765131 0.0449375
+0.296862 -0.0387663 -0.333333 0 0 1
+0.478524 -0.231388 0.320513 0 0 1
+-0.210615 0.242585 0.320513 -0.334611 0.335215 0.880719
+-0.5 -0.0758701 -0.113699 1 0 0
+0.449603 0.294872 0.17806 0 1 0
+-0.5 0.221444 -0.0269315 1 0 0
+-0.375575 -0.143135 0.320513 0 0 1
+-0.498375 0.0257313 -0.371795 0.622969 -0.130468 0.771289
+-0.107297 -0.294872 -0.00223412 0 1 0
+0.399274 -0.371795 -0.240349 0 1 0
+0.496798 -0.294872 0.128015 -0.633142 0.773147 0.0370832
+0.445855 0.294872 -0.0585586 0 1 0
+-0.203403 0.307062 0.320513 0 0 1
+-0.5 0.0925378 0.0237874 1 0 0
+0.0702575 0.31582 0.320513 0 0 1
+-0.0808498 0.198962 -0.333333 0 0 1
+0.315763 0.294872 -0.196625 0 1 0
+-0.118985 0.101044 -0.333333 0 0 1
+-0.187425 0.00280672 -0.138964 0.998917 0.0446189 -0.013225
+0.228951 -0.235255 0.359692 -0.3594 0.93317 -0.00492583
+0.114973 -0.126777 0.320513 0 0 1
+-0.320513 0.0988754 -0.369858 0.873761 -0.0647005 -0.482032
+0.183537 0.294872 -0.0965809 0 1 0
+0.0583854 -0.294872 -0.331659 0 1 0
+0.261704 0.127131 -0.333333 0 0 1
+-0.458076 -0.294872 -0.257262 0.0798714 0.996729 -0.012349
+0.267454 0.0665417 -0.333333 0 0 1
+-0.115161 0.26984 -0.371795 0 0 1
+0.5 0.252705 0.057941 1 0 0
+0.0176843 0.0303841 -0.333333 0 0 1
+0.22093 0.0969016 -0.333333 0 0 1
+0.166405 0.294872 -0.270005 0 1 0
+0.293959 0.294872 -0.225899 0 1 0
+-0.34843 0.319971 0.320513 0 0 1
+0.105997 -0.00173313 0.320513 0 0 1
+-0.251455 -0.00632243 -0.0221037 -0.484243 -0.209839 0.849398
+0.116905 -0.256282 0.363869 -0.102059 0.986493 -0.128126
+0.0821813 0.371795 -0.184838 0 1 0
+0.313114 -0.192169 -0.371795 0.592566 -0.413552 0.69126
+-0.187254 -0.000855044 -0.0928028 0.999869 -0.0149847 0.0060497
+0.5 -0.0564119 0.172888 1 0 0
+0.0606003 -0.276591 0.320513 0 0 1
+-0.5 -0.0686829 0.0507411 1 0 0
+0.126094 0.371795 -0.288523 0 1 0
+0.326612 0.0457432 0.371795 0 0 1
+0.244882 -0.0356953 -0.23056 -0.350873 0.936419 -0.00257705
+-0.0777488 -0.189582 0.361587 0.336123 0.941348 0.0297424
+0.401585 0.294872 -0.194119 0 1 0
+-0.291466 -0.371795 0.00124874 0 1 0
+0.435944 -0.371795 0.0632962 0 1 0
+0.0636937 0.371795 0.229454 0 1 0
+-0.208683 -0.0375464 -0.178584 -0.476713 0.878753 0.0231833
+-0.323547 0.313283 0.320513 0 0 1
+0.324663 0.294872 0.0216341 0 1 0
+-0.113421 0.371795 -0.0796549 0 1 0
+0.462518 -0.251406 0.320513 0 0 1
+0.5 0.212928 0.0496577 1 0 0
+0.141026 0.348677 0.118906 1 0 0
+0.5 -0.182687 0.1251 1 0 0
+-0.5 0.204908 -0.12956 1 0 0
+-0.00623534 0.371795 0.0130029 0 1 0
+0.5 0.223778 0.295368 1 0 0
+0.5 -0.08855 -0.0909724 1 0 0
+-0.185809 -0.265573 -0.371795 0 0 1
+0.153066 -0.0542669 0.320513 0 0 1
+0.0844126 0.371795 0.128642 0 1 0
+0.448718 -0.340355 -0.00963773 1 0 0
+0.343901 -0.138377 0.321467 0.545273 -0.438727 0.71428
+0.317101 0.294872 -0.20964 0 1 0
+0.484091 0.115945 -0.371795 0 0 1
+0.204361 0.0277777 -0.0956802 -0.684685 0.728839 0
+-0.138704 -0.169291 0.371795 0 0 1
+-0.267352 0.371795 0.15285 0 1 0
+-0.00758478 -0.287489 -0.371795 0.0323325 0.370731 0.928177
+0.0818998 0.337403 0.320513 0 0 1
+0.5 -0.0481349 -0.305896 1 0 0
+-0.5 -0.053567 0.168287 1 0 0
+-0.473648 -0.294872 0.112264 0 1 0
+0.190454 -0.371795 0.189899 0 1 0
+-0.378667 0.371795 0.202662 0 1 0
+-0.5 0.305069 -0.0959526 1 0 0
+-0.382279 -0.371795 0.0950086 0 1 0
+-0.141154 -0.319374 -0.0465124 1 0 0
+-0.234476 0.185569 0.371795 0 0 1
+-0.281909 -0.371795 0.0281072 0 1 0
+-0.307021 -0.182698 0.371113 0.53713 0.611248 -0.581263
+-0.179453 -0.0431519 0.320513 0 0 1
+-0.5 0.0241156 0.0945748 1 0 0
+-0.5 -0.279648 -0.273431 1 0 0
+-0.5 -0.266896 -0.270559 1 0 0
+0.437355 0.294872 0.119122 0 1 0
+-0.5 -0.114592 -0.0292446 1 0 0
+0.141109 -0.335838 0.262949 1 0 0
+0.157128 -0.189934 -0.333333 0 0 1
+0.0756706 -0.157779 -0.333333 0 0 1
+0.132474 0.371795 -0.36204 0.0682735 0.997269 0.0281612
+0.0823728 0.0452423 0.320513 0 0 1
+0.0830497 0.211797 0.371795 0 0 1
+-0.274128 -0.00263745 -0.0601898 0.998792 0.0436256 -0.0226026
+0.5 0.242799 -0.138656 1 0 0
+0.467595 -0.294872 0.285276 0 1 0
+-0.0711118 0.371795 0.031774 0 1 0
+-0.5 0.194857 -0.100289 1 0 0
+0.141109 -0.355404 0.0623509 1 0 0
+0.0699056 0.371795 -0.0881204 0 1 0
+-0.5 0.220898 -0.0844921 1 0 0
+0.122424 0.256282 0.352981 0.00372958 0.999989 0.00285492
+-0.428716 -0.371795 -0.223477 0 1 0
+0.199382 0.0219751 -0.0811304 0.845836 -0.533389 0.00760603
+-0.5 0.281945 0.0736634 1 0 0
+-0.5 0.179131 0.230282 1 0 0
+-0.141154 -0.320628 0.0579357 1 0 0
+0.337202 0.294872 -0.312988 0 1 0
+0.0435133 0.0705988 -0.333333 0 0 1
+0.141026 0.307125 0.0724089 1 0 0
+0.328336 -0.159218 0.334636 0.800517 -0.599309 0
+-0.17841 -0.371795 0.151583 0 1 0
+-0.223937 -0.198082 0.371795 0 0 1
+0.394958 0.294872 0.0479984 0 1 0
+0.0443857 -0.294872 0.095652 0 1 0
+-0.023208 -0.167572 0.320513 0 0 1
+0.21954 0.0366579 -0.3147 -0.300555 0.953757 0.00376858
+-0.274107 -0.00287979 -0.210134 0.998184 0.0600602 -0.00459346
+-0.28197 0.210627 -0.333333 -0.0982914 0.156603 0.982758
+-0.114751 -0.256282 0.363543 0.0104947 0.977405 -0.211116
+-0.355238 -0.198909 0.320513 0 0 1
+0.213549 0.198549 -0.333333 0 0 1
+-0.189704 0.310763 -0.371795 0 0 1
+0.215954 -0.371795 0.20125 0 1 0
+-0.249266 -0.371795 -0.272326 0 1 0
+0.5 0.278661 -0.221285 1 0 0
+0.410165 0.294872 -0.142412 0 1 0
+0.0472668 0.371795 -0.0206676 0 1 0
+-0.5 -0.151807 0.0360879 1 0 0
+0.5 -0.163816 -0.366884 0.907825 0.172926 -0.382035
+0.5 -0.0502824 -0.195421 1 0 0
+-0.141154 -0.322434 0.122877 1 0 0
+-0.5 -0.146057 0.208502 1 0 0
+-0.231218 -0.25382 -0.371795 0 0 1
+0.156699 0.294872 0.269347 0 1 0
+0.141026 0.298927 -0.0682817 0.971552 0.236156 0.0177975
+0.30349 -0.307187 0.320513 0 0 1
+0.310203 -0.192442 -0.344004 0.87604 -0.482156 0.0089179
+0.0109769 0.255182 -0.371795 0 0 1
+-0.0483551 -0.149575 -0.333333 0 0 1
+0.202854 -0.213827 0.371795 0 0 1
+-0.462654 -0.294872 0.0328845 0 1 0
+-0.213386 -0.110274 -0.333333 0 0 1
+0.19747 0.0192435 -0.115786 0.877617 -0.478978 -0.0191773
+-0.0832607 0.371795 -0.162129 0 1 0
+0.310273 0.184072 0.320513 0.287358 0.258702 0.922225
+0.134562 -0.294872 -0.149832 0.0924526 0.995483 -0.0216129
+0.354071 -0.299783 0.320513 0 0 1
+0.212781 0.230897 -0.336973 -0.112545 0.972222 0.205225
+0.304587 -0.200462 -0.35402 0.798791 -0.601271 0.0201554
+-0.0704715 -0.0968505 0.320513 0 0 1
+-0.415972 0.371795 -0.234149 0 1 0
+-0.420607 0.371795 -0.366126 -0.0638002 0.927674 -0.367899
+-0.168798 0.371795 -0.0925899 0 1 0
+-0.115367 0.256282 0.329639 -0.00257723 0.999503 0.0314207
+0.260241 0.0247102 -0.323449 0.75857 0.651485 0.0117665
+0.336051 0.0220592 -0.371795 0 0 1
+0.448718 -0.329981 -0.148928 1 0 0
+0.0516441 -0.294872 0.30747 0 1 0
+0.474571 -0.294872 -0.187209 0 1 0
+-0.0369499 -0.294872 -0.029688 0 1 0
+0.5 0.042427 -0.241395 1 0 0
+-0.114682 -0.294386 -0.371795 0.019299 0.568822 0.822234
+-0.296389 0.294861 -0.371795 0 0 1
+0.5 -0.168262 0.0276379 1 0 0
+0.448718 -0.314531 0.21075 1 0 0
+0.201405 -0.371795 0.123554 0 1 0
+0.00971662 -0.294872 -0.0221594 0 1 0
+0.262369 0.0216709 -0.229015 0.829594 0.55796 0.0213061
+-0.220154 0.371795 0.165148 0 1 0
+-0.132882 0.371795 -0.247649 0 1 0
+-0.5 -0.288591 0.0525932 0.963155 0.268489 0.0156722
+0.5 -0.0365993 -0.287953 1 0 0
+0.148315 -0.255945 -0.371795 0 0 1
+-0.256755 -0.134329 0.371795 0 0 1
+-0.143827 0.371795 0.096101 0 1 0
+-0.206817 0.371795 0.279568 0 1 0
+0.141867 0.294872 -0.314314 0.451312 0.89188 -0.0294388
+0.0792639 -0.189062 0.348969 -0.377431 0.926014 -0.00660791
+-0.5 0.0113678 0.251491 1 0 0
+0.307263 -0.100707 -0.333333 0 0 1
+0.295054 -0.194418 0.368708 -0.545329 0.78414 -0.29621
+-0.5 0.0915668 -0.125836 1 0 0
+0.448718 -0.309606 -0.0813927 1 0 0
+-0.340119 -0.132256 -0.371795 0 0 1
+-0.485908 -0.294872 0.0455515 0 1 0
+0.5 -0.0269472 -0.279199 1 0 0
+-0.5 -0.206978 -0.0261734 1 0 0
+0.0736693 0.32641 -0.371795 0 0 1
+-0.5 -0.109533 -0.230182 1 0 0
+0.5 0.197184 -0.114792 1 0 0
+-0.320488 0.00204214 0.371795 0 0 1
+-0.256425 0.210509 0.371795 0 0 1
+-0.389845 -0.353216 0.320513 0 0 1
+0.5 0.27028 0.0228152 1 0 0
+-0.154618 0.134064 0.336689 0.737884 -0.674928 0
+-0.409755 0.0341527 0.320513 0 0 1
+-0.477108 -0.0131007 -0.371795 0 0 1
+0.108319 0.213931 0.371795 0 0 1
+0.5 -0.230588 0.0842104 1 0 0
+-0.268063 -0.0224455 -0.0555167 0.85169 0.523961 -0.00939238
+0.0424237 0.256282 0.352465 0 1 0
+0.111153 -0.228164 0.371795 0 0 1
+0.5 0.152023 0.180726 1 0 0
+-0.5 0.092495 -0.202743 1 0 0
+0.361418 0.294872 -0.257172 0 1 0
+-0.0893821 -0.294872 -0.222612 0 1 0
+0.262264 -0.270522 0.320513 0 0 1
+-0.465481 0.194576 0.320513 0 0 1
+-0.435977 -0.189414 0.320513 0 0 1
+-0.5 0.244663 -0.368442 0.85819 0.0207496 0.512913
+0.245148 0.197023 -0.333333 0 0 1
+-0.328234 0.224045 -0.371795 0 0 1
+-0.222981 -0.371795 -0.251488 0 1 0
+0.075376 0.17463 -0.333333 0 0 1
+-0.135744 0.371795 0.0821805 0 1 0
+0.15156 0.0503902 0.320513 0 0 1
+-0.34954 0.371795 0.112812 0 1 0
+-0.0127991 -0.0838058 0.320513 0 0 1
+-0.5 -0.0070116 -0.277031 1 0 0
+-0.0824796 -0.256282 0.34705 0 1 0
+-0.116126 -0.294872 0.154179 0 1 0
+0.410042 -0.294449 -0.371795 0 0 1
+-0.0620279 0.308417 -0.371795 0 0 1
+0.5 0.128705 -0.106513 1 0 0
+-0.5 0.197506 -0.341519 1 0 0
+-0.244368 -0.041312 -0.182009 0.352039 0.935965 -0.00623819
+0.0529635 0.371795 -0.355646 0 1 0
+0.5 0.0988328 0.259629 1 0 0
+0.248999 -0.119686 0.371795 0 0 1
+0.141026 0.296754 0.160831 0.744908 0.647316 -0.161537
+-0.0563894 0.0575928 0.320513 0 0 1
+0.5 0.129146 -0.163509 1 0 0
+0.0624349 -0.238299 0.371795 0 0 1
+-0.220834 0.0422935 -0.0541188 0.301438 0.95347 -0.00554913
+-0.461265 -0.0836732 0.320513 0 0 1
+0.192694 0.294872 -0.0924894 0 1 0
+0.141026 0.299318 -0.241716 0.913194 0.406505 -0.028826
+0.307196 -0.146429 0.371795 0 0 1
+0.0212021 0.371795 -0.080942 0 1 0
+0.243215 -0.371795 -0.0128941 0 1 0
+-0.0131494 0.104675 -0.333333 0 0 1
+-0.154151 0.153832 -0.333333 0 0 1
+-0.448718 -0.363926 -0.111045 0.948697 0.254275 -0.18793
+-0.179039 0.114103 0.371795 0 0 1
+-0.5 -0.00829002 -0.180833 1 0 0
+-0.275534 -0.209031 0.322781 0.562742 0.531392 -0.633201
+0.403808 -0.371795 -0.272141 0 1 0
+-0.5 -0.0146854 -0.160634 1 0 0
+0.5 0.242475 0.224264 1 0 0
+0.476052 0.169763 0.320513 0 0 1
+0.00887204 -0.0160203 -0.333333 0 0 1
+-0.110721 0.0682936 0.320513 0 0 1
+-0.282433 -0.371795 -0.354783 0 1 0
+0.459895 -0.294872 0.242472 0 1 0
+0.5 0.212582 -0.281132 1 0 0
+-0.0092263 -0.256282 0.32194 -0.143255 -0.517775 0.843438
+-0.5 0.0413883 -0.272997 1 0 0
+0.000763246 -0.204555 0.369369 -0.0221803 0.540313 0.841172
+0.103646 -0.267702 0.320513 0 0 1
+0.142761 -0.363902 -0.371795 0.773817 0.253891 0.580299
+-0.463674 -0.0912824 0.320513 0 0 1
+0.141109 -0.348699 0.0855282 1 0 0
+-0.258976 -0.229185 -0.344563 0.18139 0.982523 -0.0417808
+-0.254009 0.371795 0.209997 0 1 0
+-0.216815 0.0412165 -0.102903 0.330474 0.943789 0.00700535
+-0.19531 0.371795 -0.104954 0 1 0
+-0.5 -0.0415604 -0.32432 1 0 0
+0.0912327 0.371795 -0.0206204 0 1 0
+0.193301 0.00820515 -0.142479 0.984588 -0.174586 0.0102889
+0.417821 0.294872 -0.364463 0.145857 0.94586 -0.289958
+0.29179 0.248546 -0.371795 0 0 1
+-0.0257245 0.371795 0.0778174 0 1 0
+0.347741 0.294872 -0.0398876 0 1 0
+0.218594 -0.0364045 -0.026109 0.317722 0.948096 0.012883
+-0.5 -0.0699868 -0.229827 1 0 0
+0.276738 0.294872 0.0723954 0 1 0
+0.194057 -0.0236005 0.320513 -0.102405 0.0415508 0.993875
+0.197008 0.0553 0.335879 0.969399 0.245491 0
+-0.448718 -0.304422 -0.267835 1 0 0
+-0.5 -0.231069 -0.124151 1 0 0
+-0.5 -0.214475 0.180131 1 0 0
+0.5 -0.00611509 -0.206209 1 0 0
+-0.345409 0.258368 -0.371795 0 0 1
+0.5 -0.276802 0.157721 1 0 0
+-0.24827 -0.0397524 -0.0563135 0.408667 0.912127 0.0318806
+-0.5 0.157813 -0.0878311 1 0 0
+0.0642271 -0.294872 -0.179359 0 1 0
+0.193332 -0.00831966 -0.137279 0.970749 0.238259 -0.0296591
+-0.0601648 -0.294872 -0.282924 0 1 0
+-0.141154 -0.295522 0.00300452 0.79532 -0.574965 -0.192047
+-0.414428 0.371795 0.205049 0 1 0
+0.5 -0.157658 0.168276 1 0 0
+0.130093 0.286206 0.320513 0 0 1
+-0.17582 -0.229113 -0.333333 0.0775498 -0.723445 0.686012
+0.5 -0.15041 0.153548 1 0 0
+-0.403884 -0.0540688 -0.371795 0 0 1
+-0.0908565 0.121768 0.320513 0 0 1
+-0.249801 0.371795 0.152003 0 1 0
+0.202456 0.245137 0.335759 0.292062 0.956395 -0.00300917
+0.5 0.0131061 0.0355478 1 0 0
+-0.197164 0.24062 0.371795 -0.145078 0.185559 0.971864
+-0.5 0.349639 -0.0987024 1 0 0
+-0.240647 -0.182896 -0.333333 0 0 1
+-0.314171 0.246138 0.320513 0 0 1
+-0.5 -0.0219443 -0.103845 1 0 0
+0.139553 -0.294872 -0.205471 0.579994 0.80673 0.113108
+0.5 -0.114876 0.232615 1 0 0
+0.176033 0.294872 -0.0688257 0 1 0
+-0.177327 0.0411014 0.320513 0 0 1
+-0.107473 -0.0340597 0.320513 0 0 1
+0.0811037 -0.258297 0.320513 0.0457174 -0.557922 0.828633
+-0.244541 0.196923 -0.333333 0 0 1
+0.260095 -0.0248596 -0.303388 0.76114 -0.648588 0
+0.5 -0.00800169 0.0194545 1 0 0
+-0.496614 0.371795 0.0830976 -0.405325 0.909929 0.0879862
+-0.221368 -0.165165 0.371795 0 0 1
+-0.0395126 -0.223699 -0.333333 0.0388186 -0.220253 0.97467
+0.5 0.113458 0.0611498 1 0 0
+-0.5 0.321244 0.00301065 1 0 0
+-0.5 0.0957279 -0.236314 1 0 0
+-0.5 0.311998 -0.221362 1 0 0
+0.30022 -0.161812 0.371795 0 0 1
+-0.5 0.106857 0.0630382 1 0 0
+0.5 0.148249 0.0870468 1 0 0
+0.23047 -0.114408 -0.333333 0 0 1
+0.455506 0.00211771 -0.371795 0 0 1
+-0.404317 0.123649 0.320513 0 0 1
+0.410096 0.122134 0.320513 0 0 1
+-0.291074 -0.371795 -0.196618 0 1 0
+0.34506 0.139278 0.320513 0.534226 0.248874 0.807877
+0.108945 0.260513 0.320513 -0.0842611 0.568422 0.818411
+-0.322643 -0.371795 0.0156492 0 1 0
+-0.0324732 -0.294872 -0.209151 0 1 0
+0.34415 -0.371795 0.104431 0 1 0
+-0.5 -0.178613 0.287985 1 0 0
+-0.475346 0.371795 -0.163993 0 1 0
+-0.33076 0.15598 0.355797 0.800542 -0.599277 0
+0.141026 0.342777 -0.131423 1 0 0
+-0.495143 -0.191939 -0.371795 0.389145 0.0012934 0.921176
+0.205952 -0.371795 -0.298709 0 1 0
+0.260538 -0.371795 -0.0562909 0 1 0
+0.178872 0.294872 0.0804812 0 1 0
+0.5 0.217647 0.241412 1 0 0
+-0.448718 -0.335466 -0.144815 1 0 0
+0.265198 -0.371795 0.14906 0 1 0
+-0.5 0.161137 0.285 1 0 0
+-0.101328 -0.294872 0.14247 0 1 0
+-0.470992 0.371795 -0.255333 0 1 0
+-0.5 -0.282902 -0.186879 1 0 0
+-0.187276 -0.00110778 -0.241284 0.999636 -0.0266839 0.00395307
+0.302727 -0.206823 -0.371795 0.311275 -0.357214 0.880628
+0.5 -0.0434811 0.137612 1 0 0
+-0.5 0.140351 0.05023 1 0 0
+0.5 0.278265 -0.292288 1 0 0
+0.5 -0.222599 0.294043 1 0 0
+0.369233 0.0611826 -0.371795 0 0 1
+-0.271125 0.0162061 -0.29374 0.930999 -0.36474 0.0143349
+-0.161355 0.112242 0.320513 0.165242 -0.176442 0.970342
+-0.192261 -0.0609299 0.320513 0.46981 0.130735 0.873033
+0.141109 -0.298432 -0.354546 0.911314 0.40815 -0.0540296
+0.442207 -0.078863 0.320513 0 0 1
+0.474681 -0.261854 0.320513 0 0 1
+0.5 -0.158625 -0.166271 1 0 0
+-0.353469 -0.0868709 0.371795 0 0 1
+-0.0601903 0.256449 0.320513 0.0399104 0.698014 0.714971
+-0.0100981 0.371795 -0.226639 0 1 0
+-0.5 -0.0161323 -0.266441 1 0 0
+-0.0176638 -0.294872 0.199791 0 1 0
+0.5 0.289728 -0.191458 0.994223 0.100822 0.0368135
+0.5 0.213882 -0.207242 1 0 0
+0.0132163 -0.103916 0.320513 0 0 1
+-0.150156 0.371795 0.0409624 0 1 0
+0.417493 0.294872 0.225181 0 1 0
+-0.0808352 -0.294872 -0.0858409 0 1 0
+-0.11998 -0.294872 0.123924 0 1 0
+-0.5 0.0291581 0.191011 1 0 0
+-0.132285 0.218206 0.371795 0 0 1
+-0.350096 -0.266917 0.320513 0 0 1
+-0.5 0.0216937 -0.2474 1 0 0
+-0.142402 -0.371795 0.114856 0.798238 -0.597617 0.0752964
+-0.5 -0.000628907 -0.222567 1 0 0
+-0.361131 0.0926377 -0.371795 0 0 1
+-0.0489243 -0.228164 0.371795 0 0 1
+-0.112944 -0.294872 0.29399 0 1 0
+-0.367663 -0.371795 0.292758 0 1 0
+0.212356 -0.371795 0.316244 -0.0447436 0.850392 -0.524244
+-0.0470653 -0.0792784 0.320513 0 0 1
+-0.209345 -0.270193 -0.371795 0 0 1
+0.5 -0.271978 -0.0624137 1 0 0
+-0.5 -0.293363 0.0787815 0.814187 0.561202 -0.148839
+0.15783 0.0280852 -0.333333 0 0 1
+-0.184897 0.12807 -0.333333 0 0 1
+-0.141154 -0.308498 0.288069 1 0 0
+0.0996416 0.0435904 0.320513 0 0 1
+-0.5 -0.10127 0.0705519 1 0 0
+-0.070014 0.173975 -0.333333 0 0 1
+0.403655 0.242163 -0.371795 0 0 1
+-0.362947 -0.371795 -0.0725723 0 1 0
+0.454057 0.0323491 0.320513 0 0 1
+-0.445724 0.345543 0.320513 0 0 1
+0.5 -0.0273825 -0.0636933 1 0 0
+0.160918 0.294872 0.237868 0 1 0
+-0.101682 0.371795 -0.23736 0 1 0
+-0.5 0.0506895 -0.238085 1 0 0
+0.0991689 -0.294872 -0.066934 0 1 0
+0.0620473 -0.294872 -0.184289 0 1 0
+-0.141154 -0.315347 0.215527 1 0 0
+-0.148311 0.371795 -0.16449 0 1 0
+0.129222 -0.294872 0.105272 0.0399308 0.999202 -0.000378645
+0.5 0.156038 0.074742 1 0 0
+-0.0960807 0.371795 -0.165179 0 1 0
+-0.218124 0.123656 -0.333333 0 0 1
+0.184613 -0.371795 0.0978489 0 1 0
+0.166409 -0.371795 0.161562 0 1 0
+0.454197 -0.294872 0.00093224 -0.037127 0.999263 -0.00971987
+-0.5 -0.158229 -0.23485 1 0 0
+-0.5 0.310645 -0.341221 1 0 0
+0.0201646 -0.204032 0.371795 -0.0245728 0.650222 0.759347
+0.1621 0.294872 -0.218637 0 1 0
+-0.5 0.173538 -0.359251 1 0 0
+-0.464315 -0.163005 -0.371795 0 0 1
+-0.5 0.285188 0.135327 1 0 0
+-0.40101 0.371795 0.0516341 0 1 0
+0.212351 -0.0336877 -0.201178 0.484521 0.874764 0.00523895
+0.496122 -0.0044606 0.320513 0.444115 -0.0763586 0.89271
+0.5 -0.288107 0.249278 0.960111 -0.279435 -0.0101235
+0.192901 0.233991 -0.371795 -0.0244916 0.44571 0.894842
+0.132007 0.247496 0.371795 -0.0123902 0.0606065 0.998085
+-0.364969 -0.0704424 -0.371795 0 0 1
+0.5 -0.190443 -0.35441 1 0 0
+-0.367871 0.00348408 0.371795 0 0 1
+0.487754 -0.294872 0.0298832 0 1 0
+-0.5 -0.116768 -0.121418 1 0 0
+-0.5 0.00320471 0.186618 1 0 0
+0.260258 0.228842 -0.342464 0.216794 0.975935 0.0234634
+0.267367 0.126641 0.371795 0 0 1
+-0.321164 0.00305821 -0.371795 0.706533 -0.116112 -0.698089
+0.477002 0.294872 0.19226 0 1 0
+-0.141154 -0.340432 -0.156587 1 0 0
+0.256841 0.294872 -0.121049 0 1 0
+-0.00685147 0.18792 0.320513 0 0 1
+0.158586 0.294872 -0.227632 0 1 0
+-0.5 -0.234724 0.152074 1 0 0
+-0.331053 -0.160759 0.320513 -0.45573 -0.308921 0.834792
+-0.236264 -0.371795 -0.227492 0 1 0
+-0.207592 -0.113479 0.371795 0 0 1
+0.141026 0.349689 0.156461 1 0 0
+0.237407 0.263843 0.320513 0 0 1
+-0.0763211 -0.294872 -0.218009 0 1 0
+-0.246491 0.371795 -0.318906 0 1 0
+0.30835 -0.307758 -0.371795 0 0 1
+-0.5 -0.212027 0.229444 1 0 0
+-0.40152 0.284093 -0.371795 0 0 1
+0.477274 -0.266868 -0.371795 0 0 1
+-0.327257 0.371795 0.103379 0 1 0
+0.482977 0.294872 0.300124 0 1 0
+-0.267852 0.0227477 -0.292315 0.856271 -0.516504 -0.00490299
+-0.5 -0.0280521 0.250256 1 0 0
+-0.158178 -0.371795 0.183204 0 1 0
+-0.404284 -0.371795 0.155729 0 1 0
+0.224714 -0.253814 0.320513 0 0 1
+-0.5 0.0206916 -0.36766 0.911291 -0.100895 0.399211
+-0.5 -0.27687 0.266041 1 0 0
+0.5 0.284744 -0.074156 1 0 0
+0.074546 -0.294872 -0.00283755 0 1 0
+0.165144 0.1686 0.371795 0 0 1
+-0.219631 -0.0540558 0.371795 0 0 1
+0.5 -0.268081 0.263844 1 0 0
+-0.5 -0.294759 -0.0537762 0.767599 0.633153 0.0995455
+0.5 -0.124369 0.0302849 1 0 0
+-0.383351 0.371795 0.0460512 0 1 0
+0.147864 0.190796 0.371795 0 0 1
+-0.387726 -0.233818 -0.371795 0 0 1
+-0.0606126 0.371795 0.265234 0 1 0
+0.039907 -0.125881 -0.333333 0 0 1
+0.223398 -0.371795 0.103769 0 1 0
+-0.5 -0.172314 0.124868 1 0 0
+0.5 0.0660205 -0.0254438 1 0 0
+0.5 0.214895 0.185555 1 0 0
+0.462802 0.0606782 0.320513 0 0 1
+-0.227791 -0.0433292 -0.0668786 -0.112055 0.99365 0.0101224
+0.336668 -0.0699821 0.371795 0 0 1
+-0.100916 0.371795 0.26252 0 1 0
+0.23668 -0.371795 0.151557 0 1 0
+0.418035 -0.371795 0.295034 0 1 0
+0.201229 -0.371795 0.287535 0 1 0
+-0.143654 -0.0434324 0.320513 0 0 1
+0.0438575 -0.294872 0.268869 0 1 0
+-0.115131 0.300621 0.320513 0 0 1
+0.414346 -0.371795 0.274655 0 1 0
+0.141109 -0.35635 0.171463 1 0 0
+-0.012974 -0.294872 0.223274 0 1 0
+0.111722 0.371795 -0.147755 0 1 0
+0.5 0.189455 -0.0473115 1 0 0
+0.33067 -0.371795 0.2547 0 1 0
+0.5 -0.0461343 0.208853 1 0 0
+0.141109 -0.303138 -0.274068 0.984928 0.156574 -0.0734999
+0.5 0.0290537 -0.094657 1 0 0
+-0.5 -0.0464048 -0.0216908 1 0 0
+0.343546 -0.218297 0.320513 0 0 1
+0.171372 0.294872 0.0745262 0 1 0
+0.448718 -0.304417 -0.305123 0.99623 -0.0846894 0.0188112
+0.5 0.292401 -0.16805 0.948213 0.315092 -0.0401124
+0.312816 -0.371795 -0.187076 0 1 0
+-0.230695 0.0435834 -0.261165 0.0109421 0.999871 0.0117361
+-0.28497 0.14896 -0.333333 0 0 1
+0.10699 0.235434 0.371795 0 0 1
+-0.0274721 0.101588 0.320513 0 0 1
+-0.168832 0.00601326 0.320513 0 0 1
+0.23765 -0.042902 0.371795 0 0 1
+0.354626 0.0815006 0.371795 0 0 1
+0.5 -0.0622394 0.15846 1 0 0
+0.153305 0.294872 0.312823 -0.00372358 0.990121 0.140168
+-0.381132 -0.0399048 0.337716 0.987313 0.158746 0.00363591
+0.141026 0.319885 -0.0776597 1 0 0
+-0.5 0.188484 0.240719 1 0 0
+-0.217056 -0.347246 -0.371795 0 0 1
+-0.141154 -0.311142 -0.370638 -0.490893 -0.023368 0.870906
+0.5 0.142809 0.244634 1 0 0
+0.448718 -0.297116 0.0177846 -0.677429 0.735426 -0.0154588
+0.388151 0.294872 0.134269 0 1 0
+0.0442605 0.360302 0.320513 0 0 1
+-0.364622 0.371795 -0.00911899 0 1 0
+0.195695 0.294872 -0.268112 0 1 0
+0.5 0.0274116 -0.366677 0.97403 -0.0195522 -0.225573
+0.482644 -0.123336 0.320513 0 0 1
+0.488544 -0.294872 -0.231516 0 1 0
+-0.5 0.180899 -0.334682 1 0 0
+-0.494553 -0.26007 0.320513 -0.248617 0.00614963 0.968582
+-0.408197 -0.220868 -0.371795 0 0 1
+-0.439531 0.371795 -0.176708 0 1 0
+0.433984 0.154852 0.320513 0 0 1
+-0.488108 0.371795 -0.181295 0 1 0
+0.0856459 0.367527 -0.371795 0.186545 -0.501291 0.844931
+0.148715 -0.371795 0.218656 0.08603 0.99629 0.00216546
+0.356994 0.294872 -0.0483454 0 1 0
+-0.35978 -0.351897 -0.371795 0 0 1
+-0.0690683 -0.283009 0.320513 0 0 1
+-0.148779 -0.00884803 0.320513 0 0 1
+0.5 -0.17786 0.0668119 1 0 0
+0.481673 0.111151 -0.371795 0 0 1
+-0.205957 0.263626 0.320513 0 0 1
+0.476467 -0.294872 -0.201568 0 1 0
+0.35319 0.294872 -0.273699 0 1 0
+0.0428458 0.371795 -0.239874 0 1 0
+0.5 0.0333288 0.00541636 1 0 0
+0.5 0.270301 0.216421 1 0 0
+0.448718 -0.34848 -0.355772 1 0 0
+-0.337648 0.371795 -0.208931 0 1 0
+0.5 -0.159009 -0.302338 1 0 0
+0.44008 -0.252036 0.320513 0 0 1
+0.317541 -0.371795 -0.229857 0 1 0
+0.310071 -0.371795 0.066836 0 1 0
+0.124801 -0.236572 -0.371795 0.0757132 -0.332658 0.940003
+0.152293 -0.371795 0.212826 0 1 0
+-0.38019 0.331489 0.320513 0 0 1
+-0.111617 0.235996 0.371795 0 0 1
+0.260451 -0.02441 -0.257428 0.782899 -0.620801 -0.0409278
+-0.0689595 0.1926 0.370059 -0.414083 0.833839 -0.365031
+-0.0623441 -0.230897 -0.354038 0 1 0
+-0.133694 0.371795 0.275915 0 1 0
+0.448718 -0.321252 0.124316 1 0 0
+0.5 -0.23247 0.118573 1 0 0
+0.5 0.0552738 0.031441 1 0 0
+0.357593 -0.187624 -0.371795 0 0 1
+0.245522 -0.035397 -0.0665167 -0.377983 0.924829 -0.0426564
+-0.242783 -0.146104 0.371795 0 0 1
+0.0290645 0.168594 0.320513 0 0 1
+-0.5 -0.261758 -0.31889 1 0 0
+-0.0561803 -0.182805 -0.333333 0 0 1
+0.375121 -0.371795 0.150786 0 1 0
+-0.303662 -0.371795 -0.346131 0 1 0
+-0.320624 -0.0611148 -0.371795 0.933967 0.030296 -0.356072
+-0.406499 -0.371795 -0.0596435 0 1 0
+-0.187714 -0.371795 -0.310345 0 1 0
+-0.271743 0.244478 0.320513 0 0 1
+0.42344 0.198215 0.320513 0 0 1
+0.498711 0.294872 -0.184678 0.819493 0.571848 -0.0377052
+0.410741 0.0505925 -0.371795 0 0 1
+0.260659 0.0241126 -0.239785 0.77803 0.626114 -0.0514851
+0.17634 -0.371795 0.119994 0 1 0
+0.449675 -0.294872 0.244093 0.779964 -0.621904 -0.06994
+0.141026 0.308403 -0.351896 1 0 0
+-0.199893 -0.371795 0.186624 0 1 0
+-0.5 0.0753032 -0.0527934 1 0 0
+0.5 -0.224222 -0.0322849 1 0 0
+0.5 -0.0432724 -0.0130391 1 0 0
+-0.0421046 -0.187377 0.320513 0 0 1
+-0.46466 0.371795 -0.160536 0 1 0
+0.149543 -0.369178 -0.371795 0.167035 0.484943 0.858446
+0.5 0.0426446 -0.311507 1 0 0
+0.0410266 -0.284498 -0.371795 0 0 1
+0.5 0.178144 0.0636242 1 0 0
+-0.0457538 -0.0327463 0.320513 0 0 1
+0.0351508 0.349207 0.320513 0 0 1
+-0.448718 -0.329989 -0.275845 1 0 0
+0.141026 0.354839 -0.143238 1 0 0
+0.0561889 0.371795 0.287136 0 1 0
+-0.382743 -0.207418 -0.371795 0 0 1
+-0.5 -0.259189 -0.238452 1 0 0
+-0.197581 0.314936 0.320513 0 0 1
+-0.5 -0.0123663 -0.274873 1 0 0
+0.462211 0.120996 -0.371795 0 0 1
+0.448718 -0.365513 -0.371279 0.687576 0.0437099 -0.724796
+0.469518 -0.294872 0.0473466 0 1 0
+0.053918 0.371795 0.133629 0 1 0
+0.5 -0.0422836 -0.136938 1 0 0
+-0.229916 0.371795 -0.30846 0 1 0
+-0.5 0.0726556 -0.0673211 1 0 0
+-0.141154 -0.331364 0.140975 1 0 0
+-0.0816313 -0.229324 -0.333333 0.0883233 -0.619454 0.780049
+-0.141154 -0.344328 0.251204 1 0 0
+0.448718 -0.29759 0.282389 0.796766 -0.593324 -0.114587
+-0.436916 -0.371795 -0.167603 0 1 0
+0.5 -0.113596 -0.231287 1 0 0
+0.386789 0.294872 -0.272488 0 1 0
+0.310354 0.179365 0.322437 0.59181 0.63497 0.496562
+0.372688 0.254113 0.320513 0 0 1
+-0.5 0.148246 0.208043 1 0 0
+0.4725 -0.122956 0.320513 0 0 1
+0.330285 -0.371795 -0.0360754 0 1 0
+-0.102568 -0.150581 0.320513 0 0 1
+0.377785 -0.259748 0.320513 0 0 1
+-0.218735 -0.123661 -0.333333 0 0 1
+0.246329 0.0563474 -0.333333 0 0 1
+-0.5 0.292726 -0.0714698 1 0 0
+0.47193 0.294872 -0.279174 0 1 0
+-0.183209 0.371795 -0.0971497 0 1 0
+-0.343101 -0.274854 -0.371795 0 0 1
+0.358656 -0.371795 0.293273 0 1 0
+0.0230987 -0.294872 0.0030131 0 1 0
+-0.5 -0.231508 -0.169414 1 0 0
+0.131513 -0.233924 0.371795 0 0 1
+-0.194086 -0.187594 -0.333333 0 0 1
+-0.115211 -0.260345 -0.371795 0 0 1
+0.337043 0.294872 0.257367 0 1 0
+-0.31803 -0.371795 -0.0482305 0 1 0
+0.5 0.230749 -0.100919 1 0 0
+0.0344005 -0.294872 0.0468434 0 1 0
+0.337891 0.294872 -0.366129 -0.0096268 0.975533 -0.219641
+-0.433728 0.190119 0.320513 0 0 1
+0.295541 0.255322 0.320513 0 0 1
+-0.358116 -0.0796141 0.371795 0 0 1
+0.194602 0.0130622 -0.191403 0.94527 -0.326157 -0.00926799
+-0.483251 -0.294872 0.0284446 0 1 0
+-0.169057 -0.371795 -0.0207198 0 1 0
+-0.474849 -0.294872 0.297058 0 1 0
+-0.421777 -0.196945 -0.371795 0 0 1
+-0.271124 -0.371795 0.161025 0 1 0
+0.0579312 0.371795 0.00666668 0 1 0
+0.497412 0.20835 -0.371795 -0.390414 0.149825 0.908366
+0.0316074 0.0347738 -0.333333 0 0 1
+0.412515 0.202454 0.320513 0 0 1
+0.192661 -0.00404079 -0.0669175 0.996166 0.0870792 -0.00841159
+0.404693 0.294872 -0.35524 0 1 0
+-0.222958 0.23749 0.338692 -0.349473 0.936947 0
+0.461046 -0.294872 -0.251768 0 1 0
+-0.253578 -0.268478 0.320513 0 0 1
+-0.231496 -0.371795 0.178322 0 1 0
+0.395172 0.294872 0.0953502 0 1 0
+0.5 0.0173497 0.132421 1 0 0
+-0.5 0.229417 0.226948 1 0 0
+-0.448718 -0.321574 0.230391 1 0 0
+0.14257 0.192981 0.371795 0 0 1
+-0.448718 -0.305896 -0.00710801 1 0 0
+-0.366031 -0.0938519 0.360154 0.936944 0.34948 0
+-0.0296411 0.138514 0.320513 0 0 1
+-0.448718 -0.348623 -0.0772482 1 0 0
+-0.163768 -0.0578995 0.320513 0 0 1
+-0.273898 -0.00526887 -0.115762 0.988832 0.148961 -0.00474293
+0.331612 0.0124531 -0.371795 0 0 1
+-0.246128 0.312488 -0.371795 0 0 1
+-0.141154 -0.316301 -0.1559 1 0 0
+-0.420193 -0.371795 0.119943 0 1 0
+0.5 0.105711 0.098275 1 0 0
+0.141026 0.343127 -0.0673045 1 0 0
+0.233497 0.0382229 -0.119116 0.108477 0.994098 0.00115267
+-0.205576 0.197763 -0.333333 0 0 1
+-0.420306 -0.309059 0.320513 0 0 1
+0.0159896 0.371795 0.136742 0 1 0
+-0.226588 0.236136 0.362261 -0.383755 0.917464 0.104847
+-0.27823 0.371795 -0.0211955 0 1 0
+0.237567 -0.371795 0.103423 0 1 0
+-0.370141 -0.0118302 0.371795 0 0 1
+0.205877 -0.170906 -0.333333 0 0 1
+0.265595 0.0159778 -0.299626 0.906965 0.420607 -0.0224318
+-0.095924 -0.0361621 0.320513 0 0 1
+-0.00875956 0.371795 0.0240141 0 1 0
+0.415724 0.294872 0.155533 0 1 0
+-0.5 0.144072 -0.240147 1 0 0
+-0.0821161 -0.294872 -0.0746477 0 1 0
+0.5 -0.22565 -0.293393 1 0 0
+0.445559 -0.343328 -0.371795 -0.45364 -0.10804 0.884612
+0.193135 0.110784 -0.333333 0 0 1
+-0.350702 0.0222055 -0.371795 0 0 1
+-0.439377 0.210157 -0.371795 0 0 1
+-0.187391 0.00241764 -0.159366 0.998643 0.052072 -0.00128961
+-0.0184513 -0.294872 -0.018253 0 1 0
+-0.199726 -0.0303677 -0.329017 -0.568314 0.755699 -0.325482
+-0.113645 -0.157376 0.320513 0 0 1
+0.111903 -0.294872 0.0803336 0 1 0
+-0.5 0.0722845 -0.368839 0.873524 -0.0477079 0.484438
+0.489388 0.159061 0.320513 0.0623194 -0.0291773 0.99763
+0.5 -0.26775 0.0515317 1 0 0
+0.199867 -0.0226675 -0.121798 0.794636 0.606411 -0.0286183
+-0.0717326 -0.230897 -0.365321 0.0230581 0.990643 -0.134515
+0.301118 0.294872 0.242238 0 1 0
+0.140221 0.255422 0.331827 0.0715085 0.99744 -0.000150192
+0.485436 0.294872 0.11017 0 1 0
+-0.141154 -0.322453 0.297258 1 0 0
+0.459562 0.154174 -0.371795 0 0 1
+0.340407 -0.0527265 0.371795 0 0 1
+0.5 -0.158486 0.186788 1 0 0
+-0.255494 -0.371795 -0.0512645 0 1 0
+0.274954 0.189206 0.371795 0 0 1
+0.235093 0.0380832 -0.321927 0.0842509 0.99569 -0.038778
+-0.405418 0.371795 -0.17088 0 1 0
+0.141026 0.321563 0.279971 1 0 0
+-0.5 -0.23533 -0.308917 1 0 0
+0.0609044 -0.0232307 0.320513 0 0 1
+0.5 -0.263815 -0.089392 1 0 0
+-0.0944687 0.371795 -0.231364 0 1 0
+0.28638 -0.371795 -0.0858587 0 1 0
+-0.343211 -0.352115 -0.371795 0 0 1
+-0.5 -0.0864062 -0.123937 1 0 0
+-0.427428 0.371795 0.0951351 0 1 0
+-0.254804 -0.371795 -0.14251 0 1 0
+0.456815 0.294872 -0.127169 0 1 0
+-0.040881 -0.243355 0.371795 0 0 1
+0.5 -0.163531 0.162201 1 0 0
+-0.5 -0.253027 -0.0696444 1 0 0
+-0.404515 -0.0133738 -0.371795 0 0 1
+0.130067 -0.0689088 0.320513 0 0 1
+-0.5 0.344618 -0.210045 1 0 0
+0.160679 -0.204177 -0.333333 0 0 1
+-0.141154 -0.366077 0.156371 0.951568 -0.271955 -0.143385
+0.5 -0.288394 0.283775 0.938343 -0.328781 -0.106845
+0.359343 -0.035373 0.371795 0 0 1
+-0.141154 -0.30679 0.101855 0.999722 -0.0229028 0.00561506
+-0.320806 -0.371795 0.00871638 0 1 0
+0.5 -0.209455 -0.359476 1 0 0
+-0.5 0.371385 0.0942054 0.912402 -0.407969 0.0329322
+-0.229722 0.371795 -0.22947 0 1 0
+0.240282 0.0371179 -0.221069 0.215574 0.976153 -0.0255678
+0.000884071 -0.294872 -0.330411 0 1 0
+-0.460029 0.371795 0.189362 0 1 0
+-0.294323 0.371795 0.2496 0 1 0
+0.0146808 0.371795 -0.145611 0 1 0
+-0.431015 -0.371795 -0.226458 0 1 0
+0.258884 -0.273052 -0.371795 0 0 1
+0.248606 -0.371795 0.118571 0 1 0
+0.00554847 -0.294872 0.0406577 0 1 0
+0.4607 0.294872 0.302204 0 1 0
+-0.485966 0.20002 0.320513 0 0 1
+-0.285585 0.3464 -0.371795 0 0 1
+-0.341051 -0.151136 -0.371795 0 0 1
+0.338396 -0.284581 0.320513 0 0 1
+0.299808 -0.371795 0.220103 0 1 0
+0.00851524 0.346158 -0.371795 0 0 1
+0.200079 0.0431756 0.330548 0.969416 0.24356 -0.0301952
+-0.313827 -0.180991 -0.333333 0.813792 0.405285 -0.416517
+-0.337557 0.1469 0.365301 0.724081 -0.644256 -0.246255
+-0.228142 -0.302507 -0.371795 0 0 1
+0.381291 0.039175 0.365463 0.959169 0.16823 0.227363
+-0.426948 0.0861542 0.320513 0 0 1
+0.181149 -0.371795 -0.274425 0 1 0
+0.177348 0.17759 -0.333333 0 0 1
+-0.5 0.222818 -0.319737 1 0 0
+-0.0836702 0.371795 -0.164575 0 1 0
+-0.5 0.34162 0.201541 1 0 0
+0.322035 -0.371795 0.18147 0 1 0
+-0.171331 0.323957 -0.371795 0 0 1
+0.417106 -0.194998 -0.371795 0 0 1
+-0.5 -0.147013 -0.214613 1 0 0
+0.38877 0.294872 0.0232904 0 1 0
+-0.5 -0.0857174 0.258883 1 0 0
+-0.396091 0.371795 -0.329576 0 1 0
+-0.235426 0.0431824 -0.200563 -0.0903349 0.995867 -0.00945311
+-0.448718 -0.297307 -0.369912 0.736545 0.558104 0.382127
+-0.487137 0.371795 -0.259308 0 1 0
+0.00919464 0.371795 0.23659 0 1 0
+0.307213 0.294872 -0.182073 0 1 0
+0.160177 -0.188535 0.371795 0 0 1
+0.420716 -0.371795 -0.236748 0 1 0
+-0.268043 -0.292948 0.320513 0 0 1
+0.140805 -0.294872 0.0974534 0.829384 0.551031 0.092124
+0.5 0.153774 -0.109143 1 0 0
+-0.35116 0.330845 -0.371795 0 0 1
+0.5 -0.285743 -0.0265498 0.999007 -0.0442381 0.00525882
+-0.0486115 -0.199272 0.360734 0.227739 0.973682 0.00886217
+0.0266369 0.277792 -0.371795 0 0 1
+0.467703 0.254525 0.320513 0 0 1
+0.192337 -0.000331357 -0.0583757 0.99999 -0.00424865 0.001208
+-0.170261 -0.371795 -0.0193185 0 1 0
+0.37124 0.111232 0.320513 0 0 1
+0.229564 -0.038356 -0.320462 -0.0285831 0.999475 0.0152358
+-0.360267 -0.171981 0.320513 0 0 1
+0.141026 0.312738 0.201321 1 0 0
+-0.00570444 0.371795 -0.0684586 0 1 0
+0.269335 0.294872 -0.135485 0 1 0
+-0.274113 -0.0028071 -0.0747453 0.993847 0.110598 0.0060521
+-0.0895496 -0.294872 0.310347 -0.0274847 0.985994 -0.164501
+0.25408 -0.371795 -0.11139 0 1 0
+0.5 -0.191569 0.225658 1 0 0
+0.435002 -0.0314757 -0.371795 0 0 1
+0.136173 0.371795 0.290436 0.313815 0.949401 -0.0125334
+0.428964 0.257654 -0.371795 0 0 1
+-0.0814094 0.188325 0.337868 -0.412251 0.91101 -0.0105069
+-0.5 0.367219 -0.201604 0.895002 -0.433622 -0.104613
+0.376508 -0.160683 -0.371795 0 0 1
+-0.310571 -0.162688 -0.333333 -0.299026 0.0192091 0.954052
+-0.5 -0.0616523 0.07462 1 0 0
+0.130333 0.314955 -0.371795 -0.0819465 -0.0612673 0.994752
+0.5 -0.129166 -0.0201224 1 0 0
+-0.5 0.0864264 0.0103102 1 0 0
+-0.432348 0.371795 0.0952855 0 1 0
+-0.5 0.00575424 -0.0718481 1 0 0
+0.179839 0.089139 -0.333333 0 0 1
+-0.084856 -0.23192 0.371795 0 0 1
+-0.321658 -0.371795 0.00558022 0 1 0
+-0.328475 -0.159033 0.340697 0.800551 0.599264 0
+-0.5 0.352128 0.201976 1 0 0
+0.492679 -0.180123 -0.371795 -0.219087 -0.0142309 0.975602
+0.0488975 0.300736 0.320513 0 0 1
+-0.181207 -0.0961202 0.338362 0.896577 0.442887 0
+0.448718 -0.297864 -0.139792 0.807878 -0.585089 0.0707423
+-0.5 -0.0924155 -0.241855 1 0 0
+-0.0167525 0.371795 0.0376293 0 1 0
+-0.141154 -0.317475 0.159594 1 0 0
+0.448718 -0.308474 -0.236525 1 0 0
+-0.312595 -0.0920183 0.371795 0 0 1
+0.141109 -0.3033 -0.0567276 0.996365 0.0827321 0.0202834
+-0.197673 0.0283143 -0.15052 0.781782 0.623086 -0.0240975
+0.477023 0.148073 -0.371795 0 0 1
+0.5 -0.182925 -0.276606 1 0 0
+-0.441167 -0.250088 0.320513 0 0 1
+0.179702 -0.0989401 0.359332 0.866199 -0.499453 0.015661
+-0.236072 -0.371795 -0.284495 0 1 0
+-0.159204 0.371795 0.293803 0 1 0
+-0.0767728 0.371795 -0.0710112 0 1 0
+0.277889 0.207268 0.356289 0.599282 0.800538 0
+0.5 -0.192955 0.122115 1 0 0
+0.44498 -0.323903 0.320513 0.277176 0.0179041 0.960652
+0.284743 -0.215078 0.320513 0.0465799 -0.075767 0.996037
+-0.34479 -0.371795 -0.19354 0 1 0
+0.24851 0.294872 0.285089 0 1 0
+0.242633 0.0364878 -0.0972592 0.300669 0.953274 0.0294478
+-0.244972 0.265523 -0.371795 0 0 1
+0.5 0.125524 0.165801 1 0 0
+-0.0623541 -0.294872 -0.21842 0 1 0
+0.398481 -0.371795 0.0841895 0 1 0
+0.265783 0.294872 -0.270084 0 1 0
+-0.5 0.365076 0.18135 0.980459 -0.1908 0.0479216
+0.408943 0.255677 0.320513 0 0 1
+-0.260152 -0.0320277 -0.129847 0.677942 0.734567 0.0284115
+-0.113087 -0.294872 -0.135017 0 1 0
+0.468491 -0.134164 0.320513 0 0 1
+0.5 -0.0783099 -0.0835625 1 0 0
+-0.489189 0.314564 0.320513 0 0 1
+0.316823 0.0228367 -0.333333 0.497455 -0.0299759 0.866972
+-0.5 -0.26207 -0.169891 1 0 0
+-0.5 -0.0544954 0.151861 1 0 0
+-0.188396 -0.00963745 -0.0992903 0.979971 -0.198694 -0.0133581
+0.0691277 0.371795 0.119248 0 1 0
+-0.186462 -0.064709 0.320513 0.0714676 0.0236831 0.997162
+0.5 -0.190098 -0.0934217 1 0 0
+-0.101678 -0.201649 0.371795 0 0 1
+0.270577 0.00761076 -0.333333 0.520887 0.0869599 0.849184
+0.5 -0.165554 -0.34813 1 0 0
+-0.271969 0.0140175 -0.0561765 0.944804 -0.327635 0
+0.236025 0.294872 -0.0288002 0 1 0
+0.394298 -0.371795 0.0829099 0 1 0
+-0.5 0.167569 -0.352044 1 0 0
+0.0932659 0.194459 -0.333333 0 0 1
+-0.5 0.193789 -0.0559936 1 0 0
+0.243282 -0.0475899 -0.333333 0 0 1
+0.5 0.275813 -0.224528 1 0 0
+-0.125147 0.161807 0.339544 -0.614227 0.78913 0
+-0.264799 0.275505 0.320513 0 0 1
+-0.0479166 -0.215596 -0.333333 0 0 1
+0.171232 -0.371795 -0.0999222 0 1 0
+-0.286494 0.0306127 0.371795 0 0 1
+-0.419004 0.371795 0.111666 0 1 0
+0.355727 0.0190114 -0.371795 0 0 1
+0.204694 -0.371795 -0.163622 0 1 0
+-0.381716 -0.0500197 -0.371795 0 0 1
+0.5 -0.19159 0.311319 0.998174 -0.0178507 0.0577019
+0.317798 0.294872 0.0116449 0 1 0
+-0.26442 -0.193759 0.371795 0 0 1
+-0.5 0.265952 0.0280554 1 0 0
+-0.5 0.161518 0.096305 1 0 0
+-0.265324 -0.371795 0.0755628 0 1 0
+-0.437611 0.371795 -0.18989 0 1 0
+-0.232614 0.371795 -0.187528 0 1 0
+0.5 0.10672 0.140865 1 0 0
+-0.206501 0.371795 0.229063 0 1 0
+-0.48684 0.330596 0.320513 0 0 1
+0.0297322 -0.243228 0.371795 0 0 1
+-0.157741 -0.230897 -0.338887 -0.0441962 0.954529 -0.294825
+-0.376462 -0.0613747 0.32195 -0.366273 -0.264277 0.89219
+0.0665896 -0.100599 0.320513 0 0 1
+0.5 0.262884 0.316232 0.929082 -0.130173 0.346211
+-0.403431 0.371795 -0.00362501 0 1 0
+-0.478567 0.371795 -0.369512 0.073582 -0.683127 0.726583
+0.192743 0.294872 -0.127777 0 1 0
+0.205401 0.294872 0.00586351 0 1 0
+-0.345467 0.0073169 -0.371795 0 0 1
+0.5 0.186076 -0.342113 1 0 0
+-0.333255 0.371795 0.131032 0 1 0
+-0.31647 -0.17806 -0.35126 0.955919 0.293552 -0.00670921
+-0.159746 -0.0564183 0.320513 0 0 1
+-0.288506 -0.222076 -0.371795 -0.149038 -0.258134 0.954544
+-0.231722 -0.0463951 -0.333333 0.0322286 -0.700748 0.71268
+0.447479 -0.371795 -0.165329 -0.607894 0.783803 -0.126955
+0.333741 -0.371795 0.124462 0 1 0
+0.282545 -0.19179 -0.333333 0 0 1
+-0.192205 -0.371795 -0.133092 0 1 0
+0.5 -0.0980074 -0.237658 1 0 0
+-0.5 0.356071 -0.243738 1 0 0
+0.0630784 0.190016 -0.333333 0 0 1
+0.0164639 -0.0274452 0.320513 0 0 1
+0.111683 -0.175942 -0.333333 0 0 1
+-0.448718 -0.313755 0.320216 0.74272 -0.156227 -0.651122
+-0.25992 -0.0107515 0.371795 0 0 1
+0.243187 -0.371795 -0.336718 0 1 0
+0.5 -0.281977 -0.262896 1 0 0
+-0.235658 0.371795 -0.0579302 0 1 0
+0.280051 -0.371795 -0.0276995 0 1 0
+-0.448718 -0.346365 -0.248391 1 0 0
+-0.109136 -0.294872 0.215606 0 1 0
+0.452708 -0.294872 0.0201184 -0.374962 0.913813 0.15604
+0.054856 -0.11632 0.320513 0 0 1
+0.263667 -0.0190449 0.000267415 0.667063 -0.383339 0.63881
+0.194506 -0.0127047 -0.327171 0.876128 0.389645 -0.283859
+0.494027 -0.294872 -0.139414 -0.227638 0.970676 0.0772553
+-0.392926 0.371795 0.112488 0 1 0
+-0.217607 0.230897 -0.366118 -0.0138587 0.991503 0.129347
+0.272552 0.294872 0.110562 0 1 0
+0.114503 0.371795 0.18031 0 1 0
+0.141026 0.368793 -0.321392 0.908075 0.416269 0.0460363
+-0.5 -0.220165 -0.156771 1 0 0
+0.226455 0.294872 -0.168729 0 1 0
+0.245977 0.294872 -0.034867 0 1 0
+0.261711 0.0226108 -0.032862 0.769728 0.638356 -0.00457994
+-0.408056 -0.280836 0.320513 0 0 1
+0.116314 -0.294872 -0.344012 0 1 0
+0.0279659 -0.294872 0.1459 0 1 0
+-0.39183 -0.133983 -0.371795 0 0 1
+-0.5 -0.136568 -0.217085 1 0 0
+0.448718 -0.297275 -0.13731 0.719757 -0.694217 -0.00359476
+-0.160009 -0.194345 0.371795 0 0 1
+0.35333 -0.371795 -0.0893451 0 1 0
+0.15307 0.294872 0.0928283 0 1 0
+0.448718 -0.309573 0.0944287 1 0 0
+0.208241 0.294872 -0.347014 0 1 0
+0.477601 -0.286276 -0.371795 -0.012801 0.109136 0.993944
+-0.239179 -0.371795 -0.313642 0 1 0
+0.308146 -0.371795 0.153497 0 1 0
+-0.5 0.282946 0.165981 1 0 0
+-0.20683 -0.151926 0.371795 0 0 1
+0.319645 0.124162 -0.333333 0.742966 -0.136519 0.655259
+0.101027 -0.294872 -0.25265 0 1 0
+0.387352 0.111687 -0.371795 0 0 1
+0.5 -0.193727 -0.341134 1 0 0
+-0.141154 -0.297858 0.292341 0.920809 -0.384022 0.0680973
+0.5 0.204766 -0.248718 1 0 0
+-0.141154 -0.307925 -0.0550305 1 0 0
+0.152315 -0.371795 -0.252695 0.0136999 0.999899 -0.00388453
+-0.263684 0.0284958 -0.250582 0.768982 -0.639264 -0.00282376
+-0.393302 0.147387 0.320513 0 0 1
+-0.00885673 0.213501 0.371795 -0.0156609 -0.140116 0.990011
+0.366714 -0.0149742 -0.371795 0 0 1
+-0.235954 -0.196126 -0.333333 0 0 1
+-0.177729 0.250834 0.337953 -0.212555 0.977149 0
+-0.085305 -0.256282 0.367587 0.0170471 0.960113 -0.279091
+-0.5 -0.194991 -0.150809 1 0 0
+0.41713 0.126441 -0.371795 0 0 1
+-0.428212 -0.141078 -0.371795 0 0 1
+0.292494 -0.371795 -0.22937 0 1 0
+-0.5 0.0797141 -0.279823 1 0 0
+0.298785 0.207151 -0.359142 0.717987 0.696023 -0.00684349
+0.0653203 0.29109 0.320513 0 0 1
+0.220011 -0.126651 0.371795 0 0 1
+-0.373914 -0.0237325 -0.371795 0 0 1
+0.154306 -0.195951 0.371795 0 0 1
+0.5 0.0354417 0.138472 1 0 0
+-0.148902 0.140273 0.358397 0.735726 -0.677279 0
+-0.448718 -0.323085 -0.0950221 1 0 0
+0.473977 -0.208069 -0.371795 0 0 1
+0.0829953 -0.294872 0.175593 0 1 0
+-0.029766 -0.084401 -0.333333 0 0 1
+0.0298078 -0.230897 -0.349353 0 1 0
+-0.190815 -0.371795 -0.244176 0 1 0
+-0.5 -0.180762 0.0286417 1 0 0
+0.194102 0.0667221 0.321968 0.757499 0.246818 -0.604381
+-0.3411 0.0666264 -0.371795 0 0 1
+0.253476 0.0804606 -0.333333 0 0 1
+-0.141154 -0.348737 -0.096467 1 0 0
+0.472513 -0.294872 -0.181281 0 1 0
+-0.5 -0.0884743 0.0632905 1 0 0
+-0.232915 0.371795 -0.359165 0 1 0
+-0.5 -0.0688064 0.19025 1 0 0
+-0.419479 0.371795 0.262796 0 1 0
+-0.188531 0.256244 -0.371795 0 0 1
+0.0963548 0.180444 0.341444 0.475946 0.879475 0
+0.0248507 0.371795 -0.196596 0 1 0
+-0.379934 0.371795 0.245055 0 1 0
+0.010174 0.257748 0.320513 -0.0529435 0.304399 0.951072
+0.448718 -0.364402 -0.233604 0.96531 -0.238117 0.107129
+0.5 -0.238931 0.248838 1 0 0
+0.320615 -0.260071 0.320513 0 0 1
+-0.269076 0.371795 -0.208961 0 1 0
+-0.193713 -0.371795 -0.12687 0 1 0
+0.5 -0.0394665 -0.0551734 1 0 0
+-0.448718 -0.296665 -0.217977 0.850404 0.519327 -0.0843352
+-0.474185 -0.0637207 -0.371795 0 0 1
+0.0212849 -0.294872 0.0197072 0 1 0
+-0.473425 -0.294872 -0.347782 0 1 0
+-0.180754 0.371795 0.194311 0 1 0
+0.245552 -0.371795 0.0249138 0 1 0
+0.110319 -0.294872 -0.130225 0 1 0
+0.285644 0.294872 0.153955 0 1 0
+-0.362002 0.371795 -0.106767 0 1 0
+-0.358122 -0.371795 -0.0861298 0 1 0
+0.114886 -0.112118 0.320513 0 0 1
+-0.436023 0.371795 0.227131 0 1 0
+-0.0679893 0.291392 -0.371795 0 0 1
+0.318853 0.294872 0.319101 -0.14631 0.735323 0.661735
+0.408544 -0.322111 -0.371795 0 0 1
+-0.418207 0.371795 0.0831161 0 1 0
+0.226068 0.294872 -0.234008 0 1 0
+-0.448718 -0.340442 -0.322957 1 0 0
+0.363028 -0.371795 -0.129129 0 1 0
+-0.303116 0.202563 -0.337055 0.628628 -0.518721 -0.579444
+-0.144908 -0.371795 0.207268 -0.300576 0.945041 -0.128656
+0.357628 0.113239 0.360799 0.879971 0.475028 0
+0.023569 -0.294872 0.0832106 0 1 0
+-0.5 0.12876 0.196557 1 0 0
+0.172933 -0.371795 0.00670737 0 1 0
+-0.5 0.063722 0.0590186 1 0 0
+0.108877 0.125638 0.320513 0 0 1
+0.170528 -0.00780885 -0.333333 0 0 1
+-0.337927 0.164003 0.320513 -0.0387154 0.0505048 0.997973
+0.5 0.102085 -0.298097 1 0 0
+-0.161031 -0.262635 -0.371795 0 0 1
+0.0479102 0.371795 0.120216 0 1 0
+0.5 -0.0158276 -0.0287528 1 0 0
+0.141026 0.364585 -0.327391 0.998692 0.0419121 -0.0292697
+-0.48116 -0.294872 0.137187 0 1 0
+0.448718 -0.332578 -0.249256 1 0 0
+-0.158947 -0.371795 0.0201117 0 1 0
+-0.0800574 -0.275078 -0.371795 0 0 1
+0.226521 0.294872 -0.128411 0 1 0
+-0.202664 -0.0755672 -0.333333 0 0 1
+0.5 -0.242829 -0.371487 -0.64848 -0.114376 0.75259
+-0.206545 0.342062 -0.371795 0 0 1
+0.40833 -0.13921 -0.371795 0 0 1
+0.246782 -0.371795 0.314527 -0.0650545 0.983454 -0.169077
+0.23925 0.294872 0.0935698 0 1 0
+-0.369167 -0.0854436 0.332949 0.936944 0.34948 0
+0.237541 0.294872 -0.330881 0 1 0
+-0.00550371 0.371795 -0.310375 0 1 0
+0.239995 0.0371946 -0.117429 0.226669 0.973971 -0.0015216
+-0.026711 -0.202926 0.321665 0.258257 0.608812 0.7501
+-0.215482 0.371795 0.234631 0 1 0
+-0.5 0.0216541 0.162918 1 0 0
+0.141109 -0.333287 -0.256369 1 0 0
+0.5 0.0313898 -0.302939 1 0 0
+0.197752 -0.247892 -0.371795 0 0 1
+0.410326 -0.141367 0.320513 0 0 1
+-0.0739537 0.164562 0.320513 0 0 1
+-0.102989 0.336278 0.320513 0 0 1
+-0.5 0.310338 0.314287 0.923528 0.0302779 -0.382335
+0.0621707 -0.294872 0.123347 0 1 0
+-0.448718 -0.330439 0.291506 1 0 0
+0.141109 -0.359637 -0.32726 0.999686 0.024849 0.0032071
+-0.320513 0.00147816 -0.361408 1 0 0
+0.0276227 -0.294872 0.22059 0 1 0
+0.352023 0.294872 0.25541 0 1 0
+-0.0937874 0.261301 0.320513 -0.118621 0.230667 0.965775
+-0.316879 0.313045 -0.371795 0 0 1
+0.212529 0.24138 0.345232 0.349465 0.936949 0
+-0.188149 0.00871468 -0.0973383 0.980475 0.196572 0.0053267
+-0.234689 -0.0737484 0.371795 0 0 1
+0.294913 -0.164988 -0.333333 0 0 1
+0.260671 -0.0240955 -0.00576631 0.777649 -0.627378 0.040728
+0.23876 -0.0637952 0.371795 0 0 1
+0.0321544 0.3257 0.320513 0 0 1
+0.283358 -0.198994 0.371795 0.277223 -0.276466 0.92017
+0.30893 0.294872 -0.217907 0 1 0
+-0.379242 -0.371795 0.120225 0 1 0
+0.448718 -0.3432 -0.304962 1 0 0
+-0.141154 -0.342117 -0.0619999 1 0 0
+0.0694077 -0.0905503 -0.333333 0 0 1
+0.0214924 -0.273518 0.320513 0 0 1
+0.238131 -0.106385 -0.333333 0 0 1
+-0.0787533 0.11436 -0.333333 0 0 1
+0.446793 -0.288023 0.320513 0.0289999 -0.0561192 0.998003
+0.088369 0.237152 -0.371795 0.0190227 0.204569 0.978667
+0.5 0.0623747 -0.262783 1 0 0
+-0.485539 0.371795 -0.311785 0 1 0
+-0.217014 -0.0371861 0.371795 0 0 1
+0.196302 0.0580897 0.33232 0.969429 0.244706 -0.0180791
+-0.5 -0.0449157 0.10274 1 0 0
+0.361134 0.294872 0.220338 0 1 0
+-0.13685 0.180786 -0.333333 0 0 1
+0.0433887 0.279904 0.320513 0 0 1
+-0.448718 -0.33093 -0.160616 1 0 0
+0.117642 -0.294872 0.148016 0 1 0
+0.080035 0.0526638 0.320513 0 0 1
+-0.408607 -0.371795 -0.260293 0 1 0
+-0.5 0.274976 0.123225 1 0 0
+0.366883 0.294872 -0.180493 0 1 0
+-0.192181 -0.371795 0.0625245 0 1 0
+0.5 0.0708582 -0.328229 1 0 0
+0.314502 0.104768 -0.333333 0.403063 -0.102392 0.909426
+-0.5 0.190144 0.0935567 1 0 0
+-0.5 0.246071 -0.160381 1 0 0
+-0.160765 -0.370633 0.320513 -0.0229213 -0.437689 0.898834
+-0.270058 0.0184935 -0.0410001 0.900565 -0.398217 -0.174373
+0.369162 -0.371795 0.16753 0 1 0
+-0.0787567 -0.294872 0.129926 0 1 0
+-0.00362234 -0.0279503 -0.333333 0 0 1
+-0.135375 0.371795 0.250728 0 1 0
+0.233929 -0.371795 -0.315068 0 1 0
+-0.250676 0.0321102 -0.0318169 -0.287506 0.561384 0.776008
+-0.363839 0.178815 0.320513 0 0 1
+0.493023 0.294872 -0.12693 0.0695739 0.997235 -0.026103
+0.359691 0.0807664 0.371795 0.0458103 0.00482676 0.998939
+0.141109 -0.359307 -0.264652 1 0 0
+0.493168 0.277559 -0.371795 -0.0677726 0.0206767 0.997487
+-0.0341496 -0.294872 -0.208825 0 1 0
+0.5 -0.0957746 -0.218249 1 0 0
+0.448718 -0.305375 -0.305678 0.99623 -0.0846894 0.0188112
+0.254658 0.0108615 0.00728259 0.472182 0.222442 0.852974
+0.24496 -0.299004 0.320513 0 0 1
+0.5 -0.137525 0.0548148 1 0 0
+0.118505 0.371795 0.111886 0 1 0
+-0.5 0.178204 0.0633948 1 0 0
+0.5 0.217367 0.0256653 1 0 0
+-0.453006 -0.0258144 0.320513 0 0 1
+-0.163881 -0.371795 0.308294 0 1 0
+-0.115894 -0.294872 -0.252867 0 1 0
+-0.386961 -0.371795 -0.0960868 0 1 0
+0.5 0.0440446 0.138695 1 0 0
+-0.5 0.0325994 -0.219467 1 0 0
+-0.00111989 0.371795 0.222102 0 1 0
+-0.5 -0.153049 -0.249305 1 0 0
+0.195758 0.114311 -0.333333 0 0 1
+-0.227093 0.371795 0.283231 0 1 0
+0.139764 0.371795 -0.356256 0.730641 0.6599 -0.175202
+-0.5 0.106478 -0.265739 1 0 0
+-0.5 0.339179 -0.0130511 1 0 0
+0.141026 0.352702 -0.307403 1 0 0
+-0.269152 -0.340127 0.320513 0 0 1
+-0.240948 -0.229693 0.362515 0.474382 0.876118 -0.0858994
+-0.321663 0.338446 -0.371795 0 0 1
+-0.358399 0.357381 0.320513 0 0 1
+0.378603 0.294872 -0.178367 0 1 0
+0.215845 0.294872 0.163303 0 1 0
+0.448718 -0.307492 -0.351674 1 0 0
+-0.239456 0.371795 -0.116889 0 1 0
+0.274012 -0.371795 0.241824 0 1 0
+0.325353 0.294872 0.268803 0 1 0
+0.0595398 -0.0862462 0.320513 0 0 1
+-0.373513 -0.371795 0.047963 0 1 0
+-0.00545491 -0.070489 0.320513 0 0 1
+-0.275429 0.371795 -0.0484349 0 1 0
+0.113256 0.328226 -0.371795 0 0 1
+-0.177252 0.371795 -0.0273835 0 1 0
+0.191628 -0.371795 -0.114471 0 1 0
+-0.326759 -0.0114493 0.371795 0 0 1
+0.407738 0.294872 -0.0651003 0 1 0
+-0.5 0.28885 0.00443119 1 0 0
+-0.448718 -0.37172 0.303461 0.506957 0.861853 0.0142387
+0.272843 -0.0296853 0.371795 0 0 1
+0.5 0.025058 0.105653 1 0 0
+-0.448718 -0.310243 0.191887 1 0 0
+-0.327613 -0.371795 -0.359231 0 1 0
+0.265514 -0.371795 0.177404 0 1 0
+0.294449 -0.371795 -0.287125 0 1 0
+-0.0245237 -0.140843 0.320513 0 0 1
+0.147555 0.294872 0.219262 0.259183 0.965754 0.0119421
+-0.0153859 -0.233783 -0.371795 -0.132671 -0.532777 0.835791
+-0.287609 0.0325336 -0.333333 0 0 1
+-0.5 0.113054 -0.241988 1 0 0
+-0.5 0.303928 -0.255972 1 0 0
+0.5 -0.236102 0.0184961 1 0 0
+-0.5 0.248276 -0.0800275 1 0 0
+0.5 0.28953 0.252201 0.907074 0.414749 -0.0721118
+-0.5 0.356874 0.175306 1 0 0
+-0.360842 0.371795 -0.0311112 0 1 0
+0.304161 0.228984 0.320513 0 0 1
+-0.112135 0.371795 -0.0491908 0 1 0
+-0.450765 0.268616 -0.371795 0 0 1
+0.5 0.0922674 0.320338 0.910924 0.128909 0.391917
+-0.5 -0.19596 -0.118462 1 0 0
+-0.5 0.291787 -0.269831 1 0 0
+-0.369049 0.0857615 0.340385 0.936946 -0.349475 0
+0.5 0.238584 -0.276746 1 0 0
+0.300786 0.236728 0.320513 0 0 1
+0.315071 0.290607 0.320513 -0.116421 0.615189 0.779737
+-0.395634 -0.121089 -0.371795 0 0 1
+0.468673 0.0236794 0.320513 0 0 1
+0.0373211 -0.294872 0.0229712 0 1 0
+0.0689321 0.371795 0.268992 0 1 0
+-0.0105503 0.125755 0.320513 0 0 1
+0.0374908 -0.128396 0.320513 0 0 1
+0.156498 0.230897 -0.354997 0 1 0
+0.389429 -0.174202 -0.371795 0 0 1
+0.415885 0.288711 -0.371795 0.155663 -0.521209 0.839113
+0.338478 -0.326283 -0.371795 0 0 1
+-0.333901 -0.0673329 -0.371795 0 0 1
+0.425279 -0.154968 0.320513 0 0 1
+-0.00173837 0.371795 -0.280314 0 1 0
+0.37799 0.294872 -0.179786 0 1 0
+-0.372201 0.158526 0.320513 0 0 1
+0.187536 0.0874144 -0.333333 0 0 1
+-0.5 -0.258346 0.266326 1 0 0
+0.496882 -0.294872 -0.356022 -0.400248 0.915277 0.0454956
+0.43631 -0.371795 0.169999 0 1 0
+0.141109 -0.323329 0.160175 1 0 0
+0.244157 0.000103755 0.371795 0 0 1
+-0.297442 -0.094503 0.371795 0 0 1
+0.141109 -0.37123 0.220226 0.522148 0.85065 0.0612818
+0.268678 0.00631304 -0.132299 0.987996 0.154334 0.0067706
+0.373499 -0.0615124 -0.371795 0 0 1
+0.481027 0.294872 0.269742 0 1 0
+-0.5 0.350591 -0.287218 1 0 0
+0.293757 -0.195389 0.366304 -0.476084 0.827134 -0.298652
+-0.0534539 0.0451463 0.320513 0 0 1
+-0.218783 0.126673 -0.333333 0 0 1
+-0.5 0.01426 -0.158667 1 0 0
+0.0748154 -0.294872 -0.262838 0 1 0
+-0.442175 0.238394 0.320513 0 0 1
+-0.450993 0.371795 0.152082 0 1 0
+0.0537177 -0.294872 -0.280846 0 1 0
+0.5 0.022267 -0.221524 1 0 0
+-0.234213 0.371795 -0.100364 0 1 0
+0.15209 -0.13681 0.331836 0.734265 -0.677928 -0.0355979
+-0.141645 -0.371795 0.109478 0.884985 -0.465171 0.0204385
+-0.5 0.0416003 -0.160402 1 0 0
+0.5 -0.164438 0.232273 1 0 0
+0.364835 -0.243858 -0.371795 0 0 1
+0.5 -0.122959 -0.0585074 1 0 0
+0.283303 -0.360039 0.320513 0 0 1
+-0.327948 0.317552 -0.371795 0 0 1
+0.44538 0.294872 0.14206 0 1 0
+0.139226 0.136607 -0.333333 0 0 1
+0.151593 -0.121641 0.320513 0 0 1
+0.444331 0.294872 -0.115974 0 1 0
+-0.311678 0.348862 -0.371795 0 0 1
+0.448718 -0.307343 -0.343223 1 0 0
+-0.367252 0.371795 -0.237414 0 1 0
+-0.0765971 -0.276512 0.320513 0 0 1
+-0.5 -0.226839 -0.1905 1 0 0
+0.0258668 0.203067 0.340454 0.161694 0.986841 0
+0.5 -0.203288 -0.0675767 1 0 0
+-0.5 0.041359 0.255743 1 0 0
+-0.0593189 -0.294872 0.0762718 0 1 0
+0.5 -0.162158 -0.293191 1 0 0
+0.208578 -0.344475 0.320513 0 0 1
+-0.130906 -0.118584 -0.333333 0 0 1
+-0.5 0.0317268 0.315061 0.956867 0.0380158 -0.288029
+0.100752 0.371795 -0.0200725 0 1 0
+-0.108546 -0.294872 0.262343 0 1 0
+0.212862 0.294872 -0.370689 0.0708045 -0.606603 0.791846
+-0.141154 -0.314368 0.304409 1 0 0
+0.276021 0.0844206 -0.333333 0 0 1
+-0.362976 -0.0419925 0.371795 0 0 1
+0.5 0.277394 -0.110421 1 0 0
+-0.283143 0.371795 -0.344147 0 1 0
+0.0339533 0.195972 -0.333333 0 0 1
+0.0720448 -0.294872 -0.0189641 0 1 0
+-0.482669 -0.294872 0.0199925 0 1 0
+-0.256006 -0.371795 -0.0486839 0 1 0
+0.5 -0.145817 -0.284012 1 0 0
+0.078797 0.371795 0.116756 0 1 0
+-0.206054 0.371795 -0.236753 0 1 0
+-0.201953 -0.0325941 -0.189556 -0.665281 0.746584 -0.0037065
+-0.395851 -0.371795 -0.0217558 0 1 0
+0.122897 0.3435 0.320513 0 0 1
+-0.5 -0.0776979 0.129622 1 0 0
+0.3478 0.0803058 0.371795 0 0 1
+0.1484 -0.0783978 0.320513 0 0 1
+-0.115719 0.371795 -0.289242 0 1 0
+-0.369896 -0.371795 -0.0116946 0 1 0
+0.448718 -0.30975 -0.216953 1 0 0
+-0.5 0.0957586 -0.290588 1 0 0
+0.399307 0.294872 -0.271141 0 1 0
+-0.222271 0.0898355 0.371795 0 0 1
+0.154888 0.294872 -0.122594 0 1 0
+0.192748 -0.00503682 -0.139783 0.986092 0.162848 -0.033208
+-0.242778 0.0650382 0.371795 0 0 1
+-0.5 -0.0413841 0.229768 1 0 0
+-0.252322 0.0378629 -0.296961 -0.50211 0.864665 -0.0154666
+0.165673 0.230897 -0.341949 0 1 0
+0.254098 -0.229978 -0.347687 -0.1385 0.990349 0.00510061
+-0.365934 0.371795 -0.0869322 0 1 0
+0.238118 -0.0084283 0.371795 0 0 1
+0.21266 0.294872 0.00103425 0 1 0
+0.141109 -0.320663 0.262971 1 0 0
+0.141109 -0.310038 -0.348269 1 0 0
+-0.163229 -0.371795 -0.353057 0 1 0
+0.5 -0.0901809 0.0609116 1 0 0
+0.279931 0.100145 -0.333333 0 0 1
+0.5 -0.176892 0.0803487 1 0 0
+0.329024 -0.371795 -0.168051 0 1 0
+-0.5 -0.240469 0.0658098 1 0 0
+-0.0978656 0.371795 -0.174864 0 1 0
+0.171622 -0.0109443 -0.333333 0 0 1
+0.0653748 -0.294872 0.196957 0 1 0
+-0.5 -0.0919432 0.213974 1 0 0
+-0.262852 -0.188159 0.371795 0 0 1
+-0.466623 0.371795 -0.0644931 0 1 0
+0.5 -0.077541 -0.191645 1 0 0
+0.170625 -0.324603 0.320513 0 0 1
+0.35196 0.294872 -0.090039 0 1 0
+-0.421854 -0.371795 -0.210245 0 1 0
+0.496252 0.294872 0.0948413 0.646593 0.737662 0.194352
+-0.101911 0.371795 0.317786 0.122772 0.903505 0.410617
+0.5 0.0824687 -0.351541 1 0 0
+-0.320513 -0.0298227 -0.360028 1 0 0
+-0.215867 -0.371795 0.128833 0 1 0
+0.237 -0.111644 0.371795 0 0 1
+-0.381686 -0.371795 0.251906 0 1 0
+0.0457902 0.190445 -0.333333 0 0 1
+0.5 0.20389 0.23987 1 0 0
+0.154281 -0.254417 0.322136 -0.144599 0.821732 -0.551224
+0.162565 -0.230897 -0.344061 0 1 0
+0.0146299 -0.0255619 -0.333333 0 0 1
+-0.117212 0.230897 -0.351814 0 1 0
+0.101782 0.371795 -0.25479 0 1 0
+0.133209 0.00780391 -0.333333 0 0 1
+0.5 0.19364 -0.291161 1 0 0
+0.380045 -0.371795 0.145153 0 1 0
+-0.5 0.225161 -0.208241 1 0 0
+-0.423909 0.345315 0.320513 0 0 1
+-0.0388283 -0.294872 0.066346 0 1 0
+0.267816 0.20112 0.371795 0 0 1
+0.393115 0.294872 -0.0876696 0 1 0
+-0.5 -0.134556 0.0169396 1 0 0
+-0.5 0.340381 0.247207 1 0 0
+-0.312911 -0.321044 -0.371795 0 0 1
+0.464292 0.294872 -0.122817 0 1 0
+0.491348 0.294872 0.13575 0.334052 0.942516 0.00848552
+-0.133873 0.371795 0.195161 0 1 0
+0.452696 -0.294872 0.11288 -0.157689 0.987051 -0.0294133
+0.182305 -0.371795 -0.290661 0 1 0
+0.162179 0.294872 -0.191852 0 1 0
+0.5 -0.181601 0.0883292 1 0 0
+0.247171 0.265741 0.320513 0 0 1
+0.33276 -0.0790999 -0.371795 0 0 1
+-0.5 -0.0695741 0.293926 1 0 0
+0.252213 0.0317588 -0.27939 0.541157 0.84092 -0.00141283
+0.100733 0.0292397 -0.333333 0 0 1
+0.379069 -0.0140011 -0.371795 0 0 1
+-0.32401 -0.371795 -0.177694 0 1 0
+-0.362752 -0.00483053 0.371795 0 0 1
+-0.332994 0.371795 0.320042 0.0159211 0.80439 0.593888
+0.16899 0.294872 -0.180354 0 1 0
+0.408037 0.186177 -0.371795 0 0 1
+0.5 -0.171179 -0.23029 1 0 0
+-0.388454 0.211018 -0.371795 0 0 1
+-0.316336 0.346301 -0.371795 0 0 1
+-0.00510698 0.0101903 0.320513 0 0 1
+-0.134769 0.371795 0.152668 0 1 0
+0.354252 -0.257922 -0.371795 0 0 1
+0.027356 0.352312 0.320513 0 0 1
+0.194908 0.0137576 -0.0280138 0.947909 -0.318443 -0.00795212
+0.369901 -0.371795 -0.144689 0 1 0
+0.448718 -0.299424 -0.0602438 0.953166 -0.291104 0.0820561
+-0.5 0.242294 0.0183099 1 0 0
+0.0585032 -0.239 0.371795 0 0 1
+0.175729 0.294872 -0.334016 0 1 0
+-0.5 0.0276029 -0.291103 1 0 0
+0.5 0.064066 -0.178348 1 0 0
+0.382626 -0.143321 0.320513 0 0 1
+-0.5 -0.285825 -0.195592 0.990141 0.139378 -0.0139638
+-0.349258 -0.0136428 0.371795 0 0 1
+0.198621 -0.00809633 0.320513 -0.173676 0.0439302 0.983823
+0.0986423 -0.294872 -0.0872385 0 1 0
+-0.469285 -0.294872 -0.137098 0 1 0
+0.356747 0.0525251 0.371795 0 0 1
+0.317959 -0.371795 -0.0581405 0 1 0
+0.168347 -0.371795 0.309174 0 1 0
+-0.498136 0.249786 0.320513 -0.342917 0.110331 0.932864
+-0.141154 -0.299951 -0.0801604 0.944852 -0.32739 -0.00840165
+0.320513 -0.140537 -0.356289 1 0 0
+-0.444406 -0.0983582 -0.371795 0 0 1
+-0.210566 0.0384921 -0.291206 0.471415 0.88189 -0.0062234
+0.5 -0.115286 -0.218111 1 0 0
+-0.0435606 0.185419 0.320513 0 0 1
+0.145311 0.173828 0.371795 0 0 1
+-0.265567 0.0260112 -0.22517 0.799553 -0.600584 -0.00366135
+-0.120142 0.371795 0.215444 0 1 0
+-0.5 0.0616234 0.126679 1 0 0
+0.5 0.273737 -0.187397 1 0 0
+-0.189194 -0.371795 -0.0631059 0 1 0
+-0.5 0.336977 -0.199037 1 0 0
+0.375448 0.294872 0.0823984 0 1 0
+0.0546986 -0.294872 -0.0520432 0 1 0
+-0.0259591 0.00150711 0.320513 0 0 1
+0.0237642 -0.294872 -0.362604 0.00555183 0.99896 0.0452635
+0.448718 -0.325482 -0.00781228 1 0 0
+-0.00754258 -0.294872 -0.0218275 0 1 0
+0.5 0.159928 -0.27011 1 0 0
+0.49191 0.0837365 -0.371795 -0.159255 0.0325411 0.986701
+0.5 0.102873 -0.143344 1 0 0
+0.293313 -0.371795 0.108287 0 1 0
+-0.206911 0.230897 -0.351039 0 1 0
+0.211491 0.0332757 -0.132152 -0.490942 0.871071 -0.0145312
+0.201075 -0.0392434 0.329581 0.933991 -0.337505 -0.117263
+-0.297284 -0.0693604 0.371795 0 0 1
+-0.320513 0.109567 -0.351376 1 0 0
+-0.435065 -0.371795 -0.241984 0 1 0
+0.5 -0.216668 0.220629 1 0 0
+-0.124346 0.0507319 0.320513 0 0 1
+0.0572561 0.371795 -0.121969 0 1 0
+0.5 0.0118363 -0.245838 1 0 0
+-0.240006 0.113938 0.371795 0 0 1
+0.5 0.281568 0.311339 0.978421 0.0479076 0.200992
+0.141026 0.35986 0.110149 1 0 0
+-0.448718 -0.329855 -0.145946 1 0 0
+0.5 -0.105676 -0.0268832 1 0 0
+-0.389652 -0.371795 -0.131032 0 1 0
+0.287571 0.263422 0.320513 0 0 1
+-0.240964 0.371795 0.0767501 0 1 0
+-0.00161257 -0.0624429 -0.333333 0 0 1
+-0.5 0.356 -0.355264 1 0 0
+0.5 -0.0509959 0.0935898 1 0 0
+-0.5 -0.040997 0.0222219 1 0 0
+-0.0458683 -0.0405787 -0.333333 0 0 1
+0.0883352 0.325487 -0.371795 0 0 1
+0.22909 -0.371795 -0.0951328 0 1 0
+0.5 -0.235547 -0.238886 1 0 0
+-0.496694 0.371795 0.12656 -0.383571 0.923316 0.0190222
+-0.318635 -0.371795 -0.00497111 0 1 0
+0.5 0.239677 0.0473201 1 0 0
+0.0174142 0.315791 -0.371795 0 0 1
+0.234205 -0.371795 0.185829 0 1 0
+-0.377937 -0.371795 -0.00193913 0 1 0
+-0.210471 0.349328 -0.371795 0 0 1
+0.139434 -0.294872 -0.007771 0.323663 0.941574 0.0931706
+0.5 -0.232611 -0.164062 1 0 0
+0.317174 -0.371795 0.197458 0 1 0
+-0.5 0.0274665 0.156472 1 0 0
+-0.5 -0.0459017 0.196923 1 0 0
+-0.271819 -0.371795 -0.112222 0 1 0
+-0.5 -0.135058 -0.142905 1 0 0
+-0.5 0.317443 0.213537 1 0 0
+0.5 0.247334 -0.308603 1 0 0
+0.5 0.194445 0.227993 1 0 0
+0.289056 0.263547 -0.371795 0 0 1
+-0.250857 -0.308297 -0.371795 0 0 1
+0.5 0.215173 -0.194642 1 0 0
+0.264008 -0.323619 -0.371795 0 0 1
+0.0989976 0.274256 -0.371795 0 0 1
+0.150794 -0.339649 0.320513 -0.0311075 -0.00840952 0.999481
+0.0845793 0.371795 -0.170482 0 1 0
+0.0764876 -0.230897 -0.357707 0 1 0
+-0.0302064 0.371795 -0.347096 0 1 0
+0.448718 -0.337651 -0.205751 1 0 0
+-0.448718 -0.324621 0.152259 1 0 0
+0.5 -0.0413076 -0.347505 1 0 0
+-0.5 0.151493 -0.137328 1 0 0
+0.290179 -0.214901 -0.340872 -0.514258 0.811201 -0.278374
+0.299243 -0.19829 0.320513 0.282035 -0.208786 0.936411
+-0.5 0.216784 0.192376 1 0 0
+-0.273888 0.371795 0.274599 0 1 0
+-0.0317828 0.371795 0.304377 0 1 0
+0.449048 0.294872 0.22714 0 1 0
+-0.0751732 0.371795 -0.015161 0 1 0
+0.289723 -0.0912491 -0.333333 0 0 1
+0.5 -0.289197 -0.170481 0.87153 -0.49027 0.00840628
+0.029388 -0.294872 0.0837164 0 1 0
+0.5 -0.273467 0.189773 1 0 0
+0.448718 -0.319236 0.188773 1 0 0
+0.441421 0.258931 -0.371795 0 0 1
+-0.0128883 -0.294872 -0.0352074 0 1 0
+-0.292661 0.371795 -0.183224 0 1 0
+0.141109 -0.318413 -0.156767 1 0 0
+-0.5 -0.190187 -0.0387244 1 0 0
+0.474127 -0.294872 -0.00210555 0 1 0
+-0.280091 -0.371795 0.274656 0 1 0
+0.32067 0.225683 0.320513 0 0 1
+-0.113598 -0.294872 0.106209 0 1 0
+-0.285601 -0.304994 0.320513 0 0 1
+0.0773965 0.371795 0.114671 0 1 0
+-0.063858 0.171745 -0.333333 0 0 1
+-0.257366 0.28917 0.320513 0 0 1
+0.227071 0.0381379 -0.203909 -0.0703011 0.997512 0.00529283
+0.5 -0.018798 -0.132077 1 0 0
+0.35551 0.264149 -0.371795 0 0 1
+0.24846 0.294872 0.143013 0 1 0
+0.141128 -0.162498 -0.333333 0 0 1
+-0.431355 0.371795 0.245051 0 1 0
+0.12592 -0.294872 0.307505 0 1 0
+-0.287763 0.198819 0.371795 -0.522768 0.612057 0.593381
+0.300287 -0.0367818 0.371795 0 0 1
+0.5 -0.0862623 0.194657 1 0 0
+0.0230071 0.256282 0.349292 0 1 0
+-0.141154 -0.35641 0.137082 1 0 0
+-0.0794459 0.371795 0.0544952 0 1 0
+-0.170219 0.0224011 -0.333333 0 0 1
+0.473801 -0.294872 -0.218276 0 1 0
+0.40402 0.0816906 -0.371795 0 0 1
+-0.379094 0.0492751 0.333487 0.977148 -0.212558 0
+0.246564 -0.0597289 0.371795 0 0 1
+-0.403461 0.371795 -0.278435 0 1 0
+0.330005 0.294872 0.00129407 0 1 0
+0.318813 -0.257795 0.320513 0 0 1
+-0.108479 0.317915 0.320513 0 0 1
+-0.263974 -0.158827 -0.333333 0 0 1
+0.5 -0.243614 -0.292856 1 0 0
+0.444427 -0.371795 -0.223539 -0.237398 0.966977 0.0927289
+-0.5 -0.148691 0.149837 1 0 0
+0.322008 -0.12163 -0.371795 0.798303 -0.124416 0.589264
+-0.140219 -0.294872 -0.320411 -0.221458 0.972355 -0.0740342
+0.193172 0.0688423 0.343058 0.933098 0.359535 -0.00788949
+0.5 -0.147851 -0.213508 1 0 0
+-0.465924 -0.294872 -0.0200946 0 1 0
+0.5 -0.0427389 -0.339635 1 0 0
+0.107467 -0.294872 0.163858 0 1 0
+0.0972472 -0.294872 -0.197242 0 1 0
+-0.229914 0.0555911 0.371795 0 0 1
+0.161412 0.294872 -0.091585 0 1 0
+-0.141154 -0.315083 0.182228 1 0 0
+0.150166 0.0796087 0.320513 0 0 1
+0.243976 0.0361174 -0.269467 0.314839 0.948961 0.0186877
+-0.5 -0.0341521 -0.2098 1 0 0
+-0.150449 -0.227597 -0.333333 0.215382 -0.600381 0.770164
+-0.5 -0.214715 -0.171191 1 0 0
+-0.269797 0.371795 0.0139382 0 1 0
+-0.115102 -0.246562 0.371795 0.042591 -0.124837 0.991263
+0.5 0.0371896 0.314556 0.922425 -0.0846818 0.376777
+-0.168359 -0.371795 -0.36836 -0.0130158 0.987029 0.160015
+0.187881 -0.33381 0.320513 0 0 1
+0.397272 0.0933743 0.320513 0 0 1
+0.154305 -0.0808523 -0.333333 0 0 1
+0.141026 0.335966 0.14994 1 0 0
+-0.5 0.29001 -0.198494 1 0 0
+0.438702 -0.103412 0.320513 0 0 1
+-0.276983 0.371795 -0.25446 0 1 0
+-0.3878 0.0300807 -0.371795 0 0 1
+0.211034 0.294872 0.193349 0 1 0
+0.189618 -0.371795 0.280645 0 1 0
+-0.210753 0.0385795 -0.233305 0.469785 0.882779 0.00165366
+-0.187186 -7.93782e-005 -0.0416374 0.974445 -0.0643796 0.215203
+0.473925 0.294872 0.00366874 0 1 0
+0.5 0.00927267 -0.0427775 1 0 0
+-0.141154 -0.309566 0.255319 1 0 0
+0.256838 -0.371795 -0.038432 0 1 0
+-0.32736 0.371795 0.0151553 0 1 0
+0.288024 0.178253 0.371795 0 0 1
+-0.398156 -0.148364 0.320513 0 0 1
+0.264814 0.0176528 -0.0995176 0.867403 0.497288 -0.0178146
+0.5 -0.0486299 0.206567 1 0 0
+0.499666 0.294872 -0.0153365 0.739519 0.671895 -0.0408568
+0.0531821 -0.230897 -0.369526 0.0414877 0.870775 -0.489928
+-0.376744 0.0630916 0.320513 0.761216 -0.13284 -0.634747
+0.266539 0.294872 0.308426 0 1 0
+0.141109 -0.302865 -0.220884 0.99663 0.0819552 -0.00357282
+-0.0648911 0.371795 -0.353733 0 1 0
+-0.224465 -0.314673 0.320513 0 0 1
+0.184308 0.0890502 0.345192 0.91531 0.40275 0
+-0.3288 0.192517 -0.371795 0 0 1
+-0.5 -0.083108 0.311948 0.998387 0.000559352 -0.0567684
+0.239916 0.294872 0.320019 -0.164119 0.770579 0.615851
+-0.219259 -0.0418717 -0.0506216 -0.262299 0.964984 -0.00206857
+0.5 0.220448 -0.069987 1 0 0
+0.224038 -0.0298326 0.371795 0 0 1
+0.253228 -0.0310488 -0.0210047 -0.581072 0.813851 -0.0015619
+-0.0613293 -0.294872 0.222864 0 1 0
+-0.31471 0.187492 -0.371795 -0.549402 0.273663 0.789472
+0.261475 -0.014623 0.371795 0 0 1
+0.139742 -0.188498 -0.333333 0 0 1
+0.220528 0.250123 -0.371795 0 0 1
+-0.238388 0.371795 0.00439938 0 1 0
+0.299495 -0.371795 0.218279 0 1 0
+-0.0570326 0.371795 -0.149666 0 1 0
+0.284945 -0.0259973 -0.333333 0 0 1
+-0.42123 -0.371795 -0.337301 0 1 0
+0.0853062 -0.294872 0.0297072 0 1 0
+-0.399134 -0.16177 0.320513 0 0 1
+-0.5 -0.19669 -0.110646 1 0 0
+-0.25106 0.371795 -0.144246 0 1 0
+0.5 -0.0165779 -0.216337 1 0 0
+0.5 0.0877005 -0.349169 1 0 0
+-0.5 -0.0872221 -0.0799643 1 0 0
+0.0761955 0.338523 0.320513 0 0 1
+-0.493176 0.137038 0.320513 -0.186894 -0.0962545 0.977653
+-0.494423 -0.224183 -0.371795 0.200601 -0.0751501 0.976786
+-0.209898 -0.371795 -0.343425 0 1 0
+-0.492689 0.371795 -0.326693 -0.22563 0.973242 -0.0434804
+0.192567 0.00296093 -0.0685027 0.997125 -0.0752582 -0.00879868
+0.236414 -0.242476 0.320513 0.0154319 -0.0480775 0.998724
+0.5 -0.0467748 -0.0665918 1 0 0
+-0.230003 -0.0126953 0.371795 0 0 1
+-0.5 0.258116 0.291912 1 0 0
+0.286845 -0.0322185 0.371795 0 0 1
+0.141026 0.365672 -0.180308 0.973581 0.225655 0.0349234
+-0.320513 0.094665 -0.36579 0.931946 -0.136762 -0.335815
+-0.123997 0.256282 0.332351 -0.0159933 0.999872 0.000335696
+-0.0599141 0.371795 0.205632 0 1 0
+0.245935 -0.371795 0.114616 0 1 0
+0.479964 -0.268281 0.320513 0 0 1
+-0.0452673 0.268469 -0.371795 0 0 1
+-0.139283 -0.294872 0.103287 0.810507 -0.585143 -0.026182
+-0.487979 -0.294872 0.0188118 0 1 0
+0.5 -0.0816474 0.106984 1 0 0
+-0.340673 -0.371795 -0.258416 0 1 0
+0.322398 -0.204578 0.320513 0 0 1
+0.5 0.0613847 0.144431 1 0 0
+-0.341762 0.371795 0.269666 0 1 0
+-0.126881 -0.160457 0.340242 0.614234 0.789124 0
+-0.27472 0.371795 0.216229 0 1 0
+-0.448718 -0.365969 0.310793 0.979099 0.20323 0.00797534
+-0.256493 -0.034999 -0.162705 0.584863 0.811048 -0.0116746
+0.448718 -0.297685 0.0236545 0.750441 -0.616582 -0.238043
+0.0522595 -0.294872 -0.361109 0.0174871 0.996862 0.0772036
+0.448718 -0.322287 -0.189039 1 0 0
+0.227143 0.190229 0.371795 0 0 1
+0.402149 -0.267731 -0.371795 0 0 1
+0.0119244 0.371795 -0.251476 0 1 0
+-0.348316 0.31497 -0.371795 0 0 1
+0.425125 -0.342106 -0.371795 0 0 1
+-0.457893 0.0135302 0.320513 0 0 1
+-0.177324 -0.201203 -0.333333 0 0 1
+0.230507 0.201267 0.371795 0 0 1
+-0.271579 -0.211992 0.371128 0.528081 0.545025 -0.651213
+-0.0912204 0.371795 -0.234606 0 1 0
+0.5 -0.21053 -0.277761 1 0 0
+0.338305 -0.371795 -0.281116 0 1 0
+0.5 0.273618 -0.10739 1 0 0
+0.175246 -0.371795 0.0417065 0 1 0
+-0.186776 0.230897 -0.363013 0.023466 0.99862 0.0469832
+0.5 0.249126 -0.289683 1 0 0
+0.252996 0.294872 -0.369504 0.0536874 -0.381073 0.922985
+0.202081 -0.193506 0.371795 0 0 1
+0.175129 0.115047 -0.333333 0 0 1
+-0.173498 -0.371795 -0.133926 0 1 0
+0.0744861 0.324249 -0.371795 0 0 1
+-0.241459 -0.0420913 -0.202328 0.297474 0.954656 0.0118498
+0.345207 0.0502488 0.371795 0 0 1
+-0.0408945 0.354359 0.320513 0 0 1
+0.149563 -0.18512 -0.333333 0 0 1
+-0.5 0.00318285 0.0182627 1 0 0
+-0.315009 0.371795 0.22645 0 1 0
+0.0744691 -0.175092 -0.333333 0 0 1
+-0.410392 0.184193 -0.371795 0 0 1
+-0.271793 0.0146719 -0.105247 0.940813 -0.338886 0.00513205
+-0.273823 -0.00612916 -0.0693316 0.990456 0.137793 0.00323601
+0.097271 0.230897 -0.365398 0.0151532 0.950163 0.311386
+0.405365 0.294872 -0.229656 0 1 0
+0.141026 0.337871 0.103906 1 0 0
+-0.0490813 -0.199194 0.365083 0.111539 0.982969 0.146049
+-0.204546 -0.371795 0.148062 0 1 0
+0.407499 -0.371795 -0.238022 0 1 0
+0.494894 0.112422 0.320513 0.263302 -0.0165817 0.964571
+0.5 -0.186026 0.180957 1 0 0
+-0.37841 -0.371795 0.291457 0 1 0
+-0.0142215 -0.197873 -0.333333 0 0 1
+0.41273 0.105899 -0.371795 0 0 1
+-0.203453 -0.284138 0.320513 0 0 1
+0.177005 -0.371795 0.29488 0 1 0
+0.025593 0.371795 0.13538 0 1 0
+0.267513 -0.0109064 -0.219285 0.956474 -0.290769 0.0247255
+0.0590517 0.101549 0.320513 0 0 1
+-0.319557 0.272216 0.320513 0 0 1
+-0.206967 -0.269822 -0.371795 0 0 1
+0.385422 -0.247858 0.320513 0 0 1
+-0.113844 -0.233627 0.371795 0 0 1
+0.194446 0.230897 -0.350453 0 1 0
+-0.0773626 -0.294872 -0.325322 0 1 0
+0.359569 -0.109685 0.3357 0.896764 -0.442492 -0.00391049
+-0.394178 0.371795 0.0885123 0 1 0
+0.374415 0.139002 -0.371795 0 0 1
+-0.5 -0.00598073 -0.218594 1 0 0
+0.239039 -0.0374509 -0.301344 -0.267503 0.963545 0.00474978
+0.321144 0.294872 0.111307 0 1 0
+0.384981 0.0117021 0.320513 0.615189 -0.0381597 0.787455
+0.461162 -0.156136 -0.371795 0 0 1
+-0.5 0.344353 0.151688 1 0 0
+0.355018 -0.270071 0.320513 0 0 1
+-0.141154 -0.339702 0.21123 1 0 0
+0.298982 -0.371795 0.221919 0 1 0
+0.141026 0.334926 0.0243988 1 0 0
+-0.392141 -0.371795 -0.170085 0 1 0
+-0.5 -0.0988596 0.256522 1 0 0
+0.214344 -0.00824289 0.371795 -0.0463513 0.0209575 0.998705
+-0.5 0.253944 -0.0349793 1 0 0
+-0.5 0.169898 -0.289751 1 0 0
+0.5 0.182346 -0.326707 1 0 0
+0.5 0.237963 -0.0830287 1 0 0
+-0.387212 -0.371795 -0.216618 0 1 0
+0.336764 -0.14796 0.322154 0.77995 -0.533919 0.32651
+0.5 -0.215182 -0.283123 1 0 0
+0.412394 0.294177 -0.371795 0.0119132 0.716951 -0.697022
+0.117053 0.371795 -0.282131 0 1 0
+-0.129665 0.0459717 0.320513 0 0 1
+-0.481471 -0.116706 0.320513 0 0 1
+-0.458752 -0.294872 -0.197358 0 1 0
+-0.34042 -0.371795 0.022741 0 1 0
+0.043104 -0.294872 -0.262619 0 1 0
+-0.5 -0.11093 -0.0846295 1 0 0
+-0.0698333 -0.234487 -0.371795 -0.0463378 -0.664222 0.746098
+0.0756117 -0.190316 0.346322 -0.340041 0.940407 -0.00266834
+0.408673 0.278761 -0.371795 0 0 1
+0.127032 0.371795 -0.319943 0 1 0
+-0.5 -0.0940177 0.19104 1 0 0
+-0.0795468 -0.294872 -0.0326962 0 1 0
+0.189667 0.230897 -0.36886 -0.00528051 0.919104 0.39398
+-0.5 -0.151068 0.0418073 1 0 0
+-0.2667 0.0243932 -0.0952834 0.811115 -0.584886 0
+-0.105411 0.00284923 0.320513 0 0 1
+-0.160597 0.330404 0.320513 0 0 1
+-0.343899 0.0637258 0.371795 0 0 1
+0.154198 -0.371795 -0.298997 0 1 0
+-0.309047 -0.371795 0.127219 0 1 0
+-0.457691 -0.294872 0.082691 0.00967362 0.999952 0.00181539
+-0.0234415 -0.294872 0.034199 0 1 0
+0.00230252 -0.294872 -0.286737 0 1 0
+0.422996 0.0569058 -0.371795 0 0 1
+0.228166 0.235547 0.321579 0.328594 0.675564 0.660029
+0.5 -0.156172 0.150944 1 0 0
+-0.354463 -0.226374 0.320513 0 0 1
+0.393328 0.294872 -0.0393094 0 1 0
+-0.308679 0.157151 -0.333333 0 0 1
+0.5 0.226615 -0.285657 1 0 0
+0.492385 -0.294872 -0.284659 -0.100744 0.99387 -0.0455202
+-0.377185 0.371795 -0.14651 0 1 0
+0.5 -0.0444834 -0.149978 1 0 0
+0.0894913 -0.294872 -0.242364 0 1 0
+-0.266936 -0.0240551 -0.292617 0.829876 0.557938 0.00321755
+-0.5 0.33537 0.157997 1 0 0
+0.359507 0.294872 0.101613 0 1 0
+-0.0279938 -0.249344 0.371795 0.0907792 -0.333357 0.93842
+0.450352 -0.294872 -0.176418 -0.509389 0.855112 0.0964721
+0.393133 -0.371795 0.0836301 0 1 0
+-0.5 -0.119 -0.217657 1 0 0
+-0.061364 0.105935 0.320513 0 0 1
+0.141026 0.357478 -0.142636 1 0 0
+-0.220984 0.0218469 -0.0235019 0.226258 0.453066 0.862287
+0.320513 0.152363 -0.33622 0.937095 -0.0781595 0.340212
+0.448718 -0.33649 -0.0912173 1 0 0
+-0.188461 -0.371795 -0.1584 0 1 0
+-0.5 -0.106902 0.0113809 1 0 0
+-0.117452 -0.167797 0.341886 0.613198 0.789929 0
+-0.187229 0.00057172 -0.0673159 0.999353 0.0353836 0.00639521
+-0.141154 -0.363269 -0.327072 0.999554 -0.0298491 -0.000453938
+-0.261429 -0.276184 -0.371795 0 0 1
+-0.439925 0.320399 0.320513 0 0 1
+-0.0991323 0.0652894 0.320513 0 0 1
+-0.169941 -0.261703 0.320513 -0.0508233 -0.13106 0.990071
+0.421561 0.294872 -0.156816 0 1 0
+-0.189179 -0.371795 -0.109432 0 1 0
+-0.47627 0.371795 0.2122 0 1 0
+-0.441216 -0.371795 -0.0898896 0.183818 0.980786 0.0653479
+0.5 -0.147829 -0.0280113 1 0 0
+0.257926 0.294872 -0.262602 0 1 0
+-0.267847 0.371795 0.0327801 0 1 0
+-0.241385 -0.371795 -0.26617 0 1 0
+0.5 0.0470039 -0.332955 1 0 0
+-0.118495 0.329244 -0.371795 0 0 1
+-0.331629 0.264006 0.320513 0 0 1
+0.466355 0.0651306 0.320513 0 0 1
+0.00889145 0.056783 -0.333333 0 0 1
+-0.5 0.359937 -0.0739582 1 0 0
+0.5 -0.0404962 0.216695 1 0 0
+-0.128369 0.293638 -0.371795 0 0 1
+-0.141154 -0.370876 -0.237245 -0.578582 0.809383 0.100704
+0.0121175 -0.0230823 -0.333333 0 0 1
+-0.0879875 -0.0199089 0.320513 0 0 1
+0.5 0.233798 -0.229553 1 0 0
+-0.188253 0.00910342 -0.051428 0.970547 0.240913 0
+0.141109 -0.311286 -0.335955 1 0 0
+-0.122496 -0.294872 0.146707 0 1 0
+0.18211 -0.156089 -0.333333 0 0 1
+0.194781 -0.103364 0.371795 0 0 1
+-0.192685 -0.163911 0.371795 0 0 1
+-0.40003 0.371795 -0.356556 0 1 0
+-0.200453 0.371795 -0.287741 0 1 0
+-0.141154 -0.34358 0.0757478 1 0 0
+0.194624 -0.0647163 0.371602 -0.623085 0.106132 0.77492
+0.227689 -0.274651 -0.371795 0 0 1
+-0.363884 0.272415 0.320513 0 0 1
+-0.211098 -0.212003 -0.333333 0 0 1
+0.083723 -0.240332 0.371795 0 0 1
+-0.5 -0.218806 -0.164182 1 0 0
+0.0122509 -0.0295031 0.320513 0 0 1
+0.1402 -0.294872 -0.014176 0.432496 0.898715 -0.0725166
+-0.229235 -0.371795 -0.109736 0 1 0
+-0.0100263 0.371795 -0.0118149 0 1 0
+0.321657 0.146537 -0.371795 0.394847 -0.0220776 0.918482
+-0.403504 -0.208404 0.320513 0 0 1
+-0.5 0.143964 -0.0861373 1 0 0
+-0.347912 0.371795 0.313753 -0.0563071 0.8995 0.433277
+0.106518 0.371795 0.121907 0 1 0
+0.324228 0.294872 -0.221196 0 1 0
+-0.5 0.106794 -0.186822 1 0 0
+-0.203307 -0.0235291 0.370573 0.615834 -0.131892 0.776758
+0.0167106 0.371795 -0.210187 0 1 0
+0.0293668 -0.294872 -0.02744 0 1 0
+-0.204943 0.0037763 0.342324 0.998198 -0.0600036 -0.000672581
+-0.5 0.192825 -0.0731616 1 0 0
+-0.5 -0.23494 -0.169215 1 0 0
+0.209995 -0.156154 -0.333333 0 0 1
+0.202489 0.294872 -0.0726336 0 1 0
+-0.5 0.228848 -0.0376163 1 0 0
+0.237401 -0.371795 -0.17035 0 1 0
+-0.12695 -0.294872 -0.267619 0 1 0
+0.5 -0.181038 0.213056 1 0 0
+0.444514 -0.13514 0.320513 0 0 1
+-0.243276 0.228422 0.328063 -0.533586 0.83742 0.118375
+0.260872 0.252121 0.320513 0 0 1
+-0.290363 0.371795 -0.121904 0 1 0
+0.355685 -0.0995767 0.371795 0.152394 0.0154053 0.9882
+0.334854 0.294872 -0.0118267 0 1 0
+0.0925435 -0.0182323 0.320513 0 0 1
+-0.378847 -0.371795 0.249765 0 1 0
+-0.0857828 -0.294872 -0.0335149 0 1 0
+-0.241804 0.214081 -0.333333 0 0 1
+-0.5 -0.123513 0.0409117 1 0 0
+-0.5 0.184857 0.0547966 1 0 0
+-0.0869954 0.164639 -0.333333 0 0 1
+-0.487765 0.347427 -0.371795 0 0 1
+0.448718 -0.362712 0.263028 0.99745 -0.0666517 -0.0254981
+-0.200127 0.307678 -0.371795 0 0 1
+0.299755 0.294872 -0.0814393 0 1 0
+-0.298284 -0.371795 -0.0678212 0 1 0
+-0.5 0.138945 -0.197533 1 0 0
+-0.393293 -0.0305533 0.320513 0 0 1
+-0.5 -0.190106 -0.345404 1 0 0
+-0.141154 -0.37068 0.0523481 0.823399 -0.560291 0.0899352
+-0.118253 -0.00236835 0.320513 0 0 1
+0.372822 0.0392881 0.371795 0.133885 0.105591 0.985355
+0.367985 0.294872 0.0634195 0 1 0
+-0.271784 0.161123 0.371795 0 0 1
+-0.5 -0.0284942 -0.157282 1 0 0
+-0.0730564 0.371795 -0.0143539 0 1 0
+-0.481371 0.134386 -0.371795 0 0 1
+-0.229099 -0.371795 0.2778 0 1 0
+-0.5 -0.010621 0.246792 1 0 0
+-0.448718 -0.301613 0.278258 0.986788 0.162004 -0.00209488
+-0.459751 0.0895311 -0.371795 0 0 1
+0.38003 0.234001 -0.371795 0 0 1
+0.320513 0.0951374 -0.352578 1 0 0
+-0.347833 0.371795 0.282637 0 1 0
+-0.315755 -0.18054 -0.360759 0.940666 0.339022 0.0145411
+0.289459 -0.0237836 -0.333333 0 0 1
+0.5 -0.162577 -0.295564 1 0 0
+-0.183054 -0.194908 0.371795 0 0 1
+0.267001 0.0128203 -0.0791602 0.936466 0.350736 0.00406662
+-0.5 -0.0438266 -0.13447 1 0 0
+0.245222 0.275217 0.320513 0 0 1
+0.5 -0.0245036 -0.0570913 1 0 0
+0.182136 0.110677 0.371795 -0.299501 -0.144008 0.943165
+0.141026 0.334458 -0.329133 1 0 0
+-0.255466 0.229858 -0.341213 -0.129355 0.975974 0.175333
+0.318687 -0.24301 -0.371795 0 0 1
+-0.133947 -0.154958 0.348256 0.621809 0.783169 0
+0.445073 0.0135674 0.320513 0 0 1
+0.189518 -0.371795 0.142145 0 1 0
+-0.445618 0.371795 -0.0871325 0 1 0
+-0.420386 0.259546 -0.371795 0 0 1
+-0.0787215 -0.294872 -0.000386252 0 1 0
+-0.390608 0.138571 -0.371795 0 0 1
+-0.304499 -0.172742 0.371795 0 0 1
+0.137226 0.305984 -0.371795 -0.334294 0.0179388 0.942298
+0.141026 0.319474 -0.265131 1 0 0
+-0.0326183 0.230897 -0.358341 0 1 0
+-0.238828 -0.0427964 -0.157998 0.213417 0.975305 0.0568659
+-0.286754 -0.371795 0.199381 0 1 0
+0.400267 -0.371795 -0.128338 0 1 0
+-0.476238 -0.200003 0.320513 0 0 1
+0.208766 0.0313677 -0.221732 -0.572988 0.819289 0.0212058
+0.0416305 -0.294872 0.269621 0 1 0
+0.404836 -0.284201 -0.371795 0 0 1
+0.284755 0.215716 0.320513 0 0 1
+0.448718 -0.368524 -0.23093 0.880078 -0.463262 0.104171
+-0.117435 -0.0167874 -0.333333 0 0 1
+0.37845 -0.371795 0.058853 0 1 0
+0.0430433 0.306505 0.320513 0 0 1
+0.5 -0.146874 -0.152009 1 0 0
+-0.388639 0.19557 -0.371795 0 0 1
+0.238502 -0.371795 0.220282 0 1 0
+-0.5 0.0138006 0.218806 1 0 0
+0.369122 -0.0629277 -0.371795 0 0 1
+0.5 0.0622012 0.237428 1 0 0
+-0.232116 0.371795 -0.0875129 0 1 0
+0.406603 0.294872 0.292788 0 1 0
+0.141026 0.321526 -0.108929 1 0 0
+0.0214515 -0.294872 0.212902 0 1 0
+0.141026 0.327367 0.1194 1 0 0
+-0.431538 0.179369 -0.371795 0 0 1
+-0.173267 -0.0515915 0.320513 0 0 1
+0.5 0.140774 0.268233 1 0 0
+0.5 0.262257 0.242765 1 0 0
+0.300652 -0.371795 -0.229894 0 1 0
+-0.0117755 -0.294872 -0.2619 0 1 0
+0.359235 -0.243666 -0.371795 0 0 1
+0.222657 -0.290078 -0.371795 0 0 1
+-0.23676 -0.0750251 -0.333333 0 0 1
+-0.15149 0.076555 -0.333333 0 0 1
+-0.448718 -0.346977 0.176425 1 0 0
+-0.5 0.0263184 -0.305597 1 0 0
+0.459626 0.294872 -0.366638 0.0754884 0.950078 -0.302743
+0.116431 0.0743762 0.320513 0 0 1
+0.0147763 -0.230897 -0.364214 -0.00141105 0.959776 -0.280763
+0.209336 -0.030467 0.371795 -0.228092 0.113988 0.966944
+-0.181026 0.0965331 0.366054 0.892951 -0.430978 0.129984
+-0.128214 0.109101 -0.333333 0 0 1
+-0.448718 -0.326503 -0.115674 1 0 0
+0.325723 -0.160814 -0.371795 0.154854 -0.0784184 0.98482
+-0.168161 0.197609 0.371795 0 0 1
+0.459574 0.294872 -0.368512 0.000413481 0.906511 -0.422182
+0.285114 -0.371795 -0.343903 0 1 0
+0.0608769 0.346398 0.320513 0 0 1
+0.223743 0.214336 -0.333333 0 0 1
+0.00903613 -0.230897 -0.344373 -0.00623998 0.999507 -0.0307754
+0.27146 0.294872 0.139818 0 1 0
+-0.5 0.281392 -0.178416 1 0 0
+-0.337646 0.371795 -0.340172 0 1 0
+-0.273472 -0.371795 0.233126 0 1 0
+0.437483 0.177389 0.320513 0 0 1
+-0.5 0.0229655 0.00687185 1 0 0
+-0.152084 -0.371795 -0.311596 0 1 0
+-0.194674 -0.064517 0.339791 0.954989 0.296633 -0.00235537
+0.432766 0.294872 -0.187034 0 1 0
+0.448718 -0.298578 -0.0171565 0.92551 -0.372241 0.0697756
+-0.216266 0.239986 0.368044 -0.370663 0.918986 0.134437
+0.250706 0.0328143 -0.115556 0.531491 0.847054 -0.00411454
+0.469206 0.151518 -0.371795 0 0 1
+-0.321135 -0.194179 -0.371795 -0.0543916 -0.0423646 0.997621
+-0.303015 -0.0415979 -0.333333 0 0 1
+0.141109 -0.352253 0.00975135 1 0 0
+0.315027 -0.371795 -0.158569 0 1 0
+-0.5 0.0191811 0.0351459 1 0 0
+-0.213092 0.227884 0.371795 0 0 1
+-0.383789 -0.197761 0.320513 0 0 1
+0.307201 -0.371795 0.00822368 0 1 0
+0.14909 -0.067952 0.320513 0 0 1
+0.186768 -0.371795 0.0371746 0 1 0
+0.361211 0.294872 0.0477999 0 1 0
+0.200448 0.0234967 -0.114223 0.779653 -0.623928 -0.0534314
+0.150616 -0.371795 -0.174539 0.0739965 0.997225 -0.00820396
+0.5 0.177865 -0.0766462 1 0 0
+-0.474912 0.0692109 -0.371795 0 0 1
+0.273432 0.294872 -0.328537 0 1 0
+0.0749434 -0.294872 -0.0332083 0 1 0
+-0.0155922 -0.294872 0.283989 0 1 0
+0.448718 -0.32414 -0.207268 1 0 0
+-0.20581 0.118872 -0.333333 0 0 1
+0.141109 -0.300379 -0.179477 0.970114 0.232726 -0.0686851
+0.286997 -0.052738 0.371795 0 0 1
+0.141109 -0.344348 0.192713 1 0 0
+-0.134728 0.0598128 -0.333333 0 0 1
+-0.0305057 0.371795 -0.242072 0 1 0
+0.141026 0.315818 0.121677 1 0 0
+-0.420834 -0.371795 -0.232902 0 1 0
+-0.2582 0.25643 -0.371795 0 0 1
+0.5 0.11183 0.241911 1 0 0
+0.383112 -0.325634 -0.371795 0 0 1
+-0.5 0.101017 -0.262888 1 0 0
+-0.226219 0.371795 0.061553 0 1 0
+-0.159541 -0.25404 0.357876 0.0830332 0.996511 0.00841757
+-0.242797 -0.371795 0.03418 0 1 0
+-0.240536 -0.371795 -0.111165 0 1 0
+-0.5 0.104208 0.227123 1 0 0
+0.0236134 0.371795 -0.0539834 0 1 0
+0.348425 -0.371795 0.0306763 0 1 0
+-0.5 0.364859 -0.115338 0.965771 -0.243511 -0.0893821
+-0.403838 0.108094 0.320513 0 0 1
+-0.491938 0.371795 -0.213151 -0.134494 0.989838 0.0461737
+0.444259 -0.324483 0.320513 0.193297 -0.027272 0.980761
+-0.217015 0.0412702 -0.140665 0.353196 0.935549 0
+-0.193999 -0.0330739 -0.333333 0.0954607 -0.0790367 0.99229
+-0.302817 -0.371795 -0.0781251 0 1 0
+-0.278269 0.371795 -0.235432 0 1 0
+-0.239991 0.371795 -0.287313 0 1 0
+0.114028 -0.256282 0.354671 0 1 0
+-0.231295 0.260043 -0.371795 0 0 1
+-0.0960972 -0.294872 0.235013 0 1 0
+0.331645 0.294872 -0.0801902 0 1 0
+-0.343227 0.0626467 -0.371795 0 0 1
+-0.405797 0.371795 -0.201763 0 1 0
+-0.406684 0.371795 0.175527 0 1 0
+-0.211543 -0.252012 -0.371795 0 0 1
+-0.203555 0.244727 0.346697 -0.309533 0.950866 0.00664112
+0.5 0.0266633 -0.0547157 1 0 0
+-0.316898 -0.371795 -0.136463 0 1 0
+0.357764 0.294872 -0.28925 0 1 0
+0.5 -0.280149 -0.35969 1 0 0
+-0.5 0.239747 -0.134283 1 0 0
+-0.254983 0.371795 0.223182 0 1 0
+0.0143677 0.204555 0.370185 0.0259882 -0.525325 0.850504
+0.197049 0.0183466 -0.274264 0.881007 -0.472451 -0.0248337
+0.448718 -0.317452 -0.224872 1 0 0
+0.481509 -0.00822894 -0.371795 0 0 1
+-0.141154 -0.366308 0.118426 0.960946 -0.267003 0.0727434
+0.24984 -0.371795 -0.29657 0 1 0
+0.153646 -0.290499 -0.371795 0 0 1
+0.156679 0.294872 -0.293913 0 1 0
+-0.5 -0.088213 -0.205391 1 0 0
+0.198399 0.0613001 0.371795 -0.120262 0.105579 0.987112
+0.145501 0.0577582 -0.333333 0 0 1
+-0.317773 0.371795 -0.266952 0 1 0
+0.5 0.231851 0.314709 0.986479 -0.0881717 0.138149
+-0.30653 -0.33518 0.320513 0 0 1
+0.393019 -0.0333709 -0.371795 0 0 1
+0.247377 -0.034532 -0.259922 -0.473109 0.880914 -0.0126029
+0.106705 0.271985 -0.371795 0 0 1
+-0.202767 -0.275679 -0.371795 0 0 1
+-0.438859 0.371795 0.175135 0 1 0
+0.141109 -0.349267 0.137596 1 0 0
+0.127902 0.321966 0.320513 0 0 1
+0.271991 -0.17258 0.371795 0 0 1
+-0.1583 0.371795 0.270859 0 1 0
+-0.465819 -0.101494 0.320513 0 0 1
+-0.471162 -0.294872 -0.0391132 0 1 0
+-0.136933 0.307723 -0.371795 0 0 1
+0.141026 0.357247 0.085162 1 0 0
+-0.470429 0.371795 0.110743 0 1 0
+-0.183988 0.371795 0.248223 0 1 0
+0.5 -0.204014 0.15373 1 0 0
+-0.205191 0.0262097 0.371795 0.560284 -0.386223 0.732744
+0.5 -0.100283 0.190546 1 0 0
+0.0524137 0.260337 0.320513 -0.0307998 0.0900888 0.995457
+0.364499 -0.371795 0.150513 0 1 0
+-0.338355 0.371795 -0.0743775 0 1 0
+-0.5 0.184829 0.101994 1 0 0
+0.238131 -0.139602 0.371795 0 0 1
+-0.108555 0.293124 -0.371795 0 0 1
+-0.11671 0.247494 0.371795 -0.000413685 0.0733751 0.997304
+0.448718 -0.306894 -0.103101 1 0 0
+0.314465 0.0172684 0.371795 0 0 1
+-0.346765 0.188874 0.320513 0 0 1
+-0.2011 -0.230897 -0.361327 0 1 0
+0.00631296 0.134066 0.320513 0 0 1
+-0.5 -0.106353 -0.0440957 1 0 0
+-0.253888 0.371795 0.0840603 0 1 0
+0.135696 -0.248118 0.371795 -0.0235228 -0.0836419 0.996218
+0.370108 0.294872 0.299359 0 1 0
+0.0846485 0.256282 0.326234 -0.0090641 0.893311 0.449348
+0.5 -0.269199 -0.200687 1 0 0
+-0.5 -0.0475527 0.271117 1 0 0
+-0.448718 -0.327603 0.071095 1 0 0
+-0.5 -0.00317649 -0.0119107 1 0 0
+-0.141154 -0.370925 -0.183038 -0.603051 0.794838 0.0675509
+0.181985 -0.154839 -0.333333 0 0 1
+-0.0642024 0.371795 0.189753 0 1 0
+0.361965 0.294872 -0.361849 0 1 0
+0.389236 0.294872 0.242403 0 1 0
+0.483457 -0.294872 -0.313032 0 1 0
+-0.00127365 -0.294872 -0.0633419 0 1 0
+-0.226669 -0.371795 0.294862 0 1 0
+-0.154289 0.134421 0.360667 0.735716 -0.67729 0
+0.5 0.266233 0.150657 1 0 0
+-0.0691248 0.371795 0.147838 0 1 0
+-0.5 0.186745 0.31288 0.970443 0.0888789 -0.224368
+0.5 -0.0422228 -0.0841518 1 0 0
+0.498927 -0.227797 0.320513 0.762275 0.0673254 0.643742
+-0.141008 -0.294872 -0.0922777 0.823298 -0.566403 -0.0369778
+-0.473434 0.10064 0.320513 0 0 1
+0.144829 -0.371795 -0.348987 0.418779 0.90786 0.0203675
+-0.448718 -0.318159 0.200112 1 0 0
+-0.5 -0.16627 0.0391163 1 0 0
+-0.210727 0.332479 0.320513 0 0 1
+-0.299877 -0.371795 -0.282739 0 1 0
+-0.5 -0.113989 0.106899 1 0 0
+-0.5 -0.0129416 -0.00367976 1 0 0
+0.0568507 0.371795 0.0218925 0 1 0
+0.5 -0.171654 -0.0799929 1 0 0
+-0.33986 -0.371795 0.0776331 0 1 0
+-0.194352 -0.0657906 0.360305 0.953933 0.299938 -0.00693254
+0.5 -0.0206797 -0.000252295 1 0 0
+0.308766 0.294872 -0.120219 0 1 0
+-0.218033 0.109567 0.371795 0 0 1
+0.0220139 -0.294872 0.262338 0 1 0
+0.5 0.123342 0.0810442 1 0 0
+0.00567509 0.371795 0.0330152 0 1 0
+-0.5 0.318572 0.127964 1 0 0
+0.5 -0.0726843 -0.355243 1 0 0
+-0.5 0.202928 0.257739 1 0 0
+-0.372404 -0.0767661 0.331933 0.943666 0.330878 -0.00369048
+0.199369 -0.023027 -0.333333 -0.42796 -0.212057 0.878569
+0.294798 0.294872 -0.36897 -0.0267307 0.940941 -0.337514
+-0.5 0.150523 -0.284273 1 0 0
+-0.370256 0.371795 0.270916 0 1 0
+-0.253673 -0.371795 -0.0674111 0 1 0
+0.432171 -0.0679139 -0.371795 0 0 1
+-0.176603 -0.0838354 0.320513 0.083427 0.00180923 0.996512
+0.489007 -0.294872 -0.0819314 0 1 0
+0.5 0.0272364 -0.285434 1 0 0
+0.221824 -0.15723 -0.333333 0 0 1
+0.5 -0.18969 -0.167907 1 0 0
+0.124955 -0.161957 0.322242 -0.470692 0.767244 0.435644
+0.5 0.0447077 -0.181894 1 0 0
+0.5 0.259727 -0.323347 1 0 0
+0.0421357 0.0580687 -0.333333 0 0 1
+0.0623943 0.304223 0.320513 0 0 1
+0.330771 0.0663683 0.371795 0 0 1
+0.385455 -0.371795 -0.241681 0 1 0
+0.293701 0.294872 0.307504 0.00902179 0.999883 0.0123505
+-0.110398 0.371795 -0.253246 0 1 0
+0.5 -0.289908 0.292301 0.930868 -0.357188 -0.0768219
+0.309258 -0.34224 0.320513 0 0 1
+0.179805 -0.371795 0.306981 0 1 0
+0.233595 -0.233523 0.357664 -0.410676 0.911578 -0.0192424
+0.141026 0.330406 0.101968 1 0 0
+-0.141154 -0.3341 -0.0664439 1 0 0
+-0.5 -0.211968 -0.0601007 1 0 0
+0.390365 0.294872 0.18061 0 1 0
+-0.422187 0.334525 -0.371795 0 0 1
+-0.230784 0.371795 -0.0258074 0 1 0
+-0.0394983 0.371795 -0.0817518 0 1 0
+-0.5 -0.131815 0.318981 -0.593134 0.00194789 0.805101
+0.0539742 0.237516 -0.371795 0.0119993 0.200134 0.979695
+-0.5 -0.0284635 -0.0222513 1 0 0
+0.068295 0.350617 -0.371795 0 0 1
+-0.00293932 -0.294872 -0.214646 0 1 0
+0.201867 -0.371795 -0.10297 0 1 0
+-0.363939 0.153463 0.320513 0 0 1
+-0.129961 -0.16124 0.371795 0.486878 0.514218 0.706066
+-0.260276 0.0319035 -0.14513 -0.658469 0.752505 -0.0124566
+0.141109 -0.304279 -0.0613544 0.997399 0.0694508 -0.0192917
+-0.108285 -0.294872 0.0706058 0 1 0
+0.262374 -0.216805 -0.333333 -0.000303893 -0.00269093 0.999996
+-0.5 0.224943 0.175683 1 0 0
+0.243296 -0.371795 -0.081925 0 1 0
+-0.0973606 0.0594028 0.320513 0 0 1
+0.5 0.194417 -0.366447 0.856551 0.179691 -0.483769
+-0.205106 0.00180623 0.360046 0.999938 -0.00902217 0.0065231
+-0.479299 -0.146911 -0.371795 0 0 1
+-0.384442 0.000635858 0.342347 0.999786 0.0196958 -0.006274
+-0.5 -0.0214114 0.137594 1 0 0
+0.141026 0.353163 -0.173235 1 0 0
+-0.5 -0.148917 0.112694 1 0 0
+0.0679155 -0.29151 -0.371795 -0.0822614 0.796894 0.598492
+-0.331079 0.371795 0.12686 0 1 0
+0.448718 -0.369254 -0.0957292 0.923496 -0.383503 0.00894991
+-0.286606 -0.262371 -0.371795 0 0 1
+-0.431632 0.341876 0.320513 0 0 1
+0.136449 0.371795 -0.0764161 0.373966 0.92481 -0.0698255
+0.141026 0.322985 -0.0404646 1 0 0
+-0.0955207 -0.294872 0.0855476 0 1 0
+-0.00226934 0.371795 0.0133962 0 1 0
+0.285952 -0.371795 0.0830092 0 1 0
+-0.32776 -0.371795 -0.0685747 0 1 0
+-0.0576298 -0.294872 -0.267849 0 1 0
+0.457525 0.294872 -0.369433 -0.00194553 0.899954 -0.435981
+0.5 0.109162 -0.232347 1 0 0
+-0.240166 -0.327971 0.320513 0 0 1
+-0.141154 -0.299755 -0.0442455 0.888279 -0.459231 0.00827585
+0.0700059 -0.173211 0.320513 0 0 1
+0.285653 -0.14278 0.371795 0 0 1
+-0.190031 0.0153863 -0.269259 0.947919 0.318493 -0.00334327
+0.5 0.0504986 -0.179599 1 0 0
+0.136007 -0.153906 -0.333333 0 0 1
+0.0491381 0.371795 -0.237303 0 1 0
+-0.199762 0.0444275 0.354801 0.969397 -0.2455 0
+-0.201484 0.371795 -0.203179 0 1 0
+0.172792 0.171594 -0.333333 0 0 1
+-0.08153 -0.291296 0.320513 -0.0300516 -0.0840027 0.996012
+0.266447 0.0141501 -0.193299 0.935817 0.352299 0.0114604
+-0.448718 -0.368128 0.109841 0.900494 0.401872 0.166162
+-0.268051 0.371795 0.220453 0 1 0
+-0.5 -0.179284 0.134952 1 0 0
+-0.295251 -0.115773 0.371795 0 0 1
+0.448718 -0.344264 -0.364766 0.992883 -0.0653459 -0.0995633
+0.315571 -0.1399 0.371795 0 0 1
+0.198204 -0.371795 -0.267099 0 1 0
+0.0943802 0.371795 -0.215686 0 1 0
+-0.5 0.0500323 0.00750324 1 0 0
+0.37007 0.187547 0.320513 0 0 1
+0.5 -0.138425 0.213375 1 0 0
+-0.5 0.280737 -0.0825148 1 0 0
+-0.5 0.307872 -0.308331 1 0 0
+-0.5 -0.0866651 -0.0970579 1 0 0
+0.448718 -0.335053 0.186056 1 0 0
+0.393851 -0.371795 -0.0540324 0 1 0
+-0.2792 0.349979 -0.371795 0 0 1
+-0.412854 0.371795 -0.0554778 0 1 0
+0.0382323 -0.0310899 0.320513 0 0 1
+-0.115671 0.344549 0.320513 0 0 1
+-0.252963 0.0374705 -0.237805 -0.47172 0.881487 -0.0214491
+0.141109 -0.3696 -0.108258 0.709301 0.704903 -0.00194452
+-0.466152 -0.294872 -0.158169 0 1 0
+-0.301719 -0.037571 0.371795 0 0 1
+-0.5 0.274762 0.162318 1 0 0
+-0.132616 -0.0829048 0.320513 0 0 1
+0.5 0.147679 0.0334305 1 0 0
+-0.5 -0.206817 0.0955682 1 0 0
+-0.5 -0.129701 -0.183046 1 0 0
+-0.381639 0.0375745 0.337967 0.988854 -0.148852 0.00326406
+-0.443188 0.371795 0.279986 0 1 0
+0.0568261 -0.181609 0.320513 0 0 1
+0.304976 -0.371795 -0.23693 0 1 0
+0.5 0.096847 -0.16885 1 0 0
+-0.149425 0.217488 0.371795 0 0 1
+0.5 0.170238 -0.22537 1 0 0
+-0.281747 0.307141 -0.371795 0 0 1
+-0.0575158 -0.155083 0.320513 0 0 1
+0.277079 -0.233413 -0.371795 0 0 1
+0.316997 -0.371795 0.107743 0 1 0
+0.5 0.167871 -0.109404 1 0 0
+0.337768 0.146619 0.329784 0.825419 0.560568 0.0666854
+0.5 0.115176 -0.240462 1 0 0
+-0.5 -0.171779 -0.206513 1 0 0
+-0.5 -0.28126 0.120426 1 0 0
+0.5 0.0297574 0.201156 1 0 0
+0.128064 -0.224948 -0.333333 0.147958 -0.352932 0.923876
+0.328375 0.111348 0.371795 0 0 1
+-0.5 -0.281093 -0.265762 1 0 0
+0.448718 -0.335523 0.250462 1 0 0
+-0.252279 0.349901 -0.371795 0 0 1
+-0.441278 0.371795 0.262689 0 1 0
+-0.411183 -0.371795 0.11346 0 1 0
+0.225448 -0.371795 -0.253486 0 1 0
+-0.431844 -0.284379 -0.371795 0 0 1
+-0.5 0.0268368 -0.269482 1 0 0
+0.0966313 -0.294872 -0.216417 0 1 0
+-0.287298 0.371795 -0.0816682 0 1 0
+-0.103757 0.371795 -0.221707 0 1 0
+-0.5 0.322422 0.0171485 1 0 0
+-0.5 0.0963924 -0.352159 1 0 0
+0.00324962 -0.287621 0.320513 -0.0133224 -0.236276 0.971595
+-0.5 -0.270278 -0.310859 1 0 0
+-0.0993762 -0.178809 0.32637 0.449284 0.874137 0.184468
+0.257685 0.294872 -0.347104 0 1 0
+0.0756913 0.305664 -0.371795 0 0 1
+0.5 -0.291464 -0.0956383 0.749403 -0.662108 0.00296449
+-0.0393768 -0.161258 0.320513 0 0 1
+-0.0658345 -0.187313 0.320513 -0.128443 0.21671 0.96775
+0.5 -0.0525905 0.0107284 1 0 0
+-0.442443 0.287715 -0.371795 0 0 1
+-0.342953 -0.371795 0.0776641 0 1 0
+-0.141154 -0.314277 -0.0461335 1 0 0
+0.5 0.195049 -0.328607 1 0 0
+0.154842 -0.371795 0.103896 0 1 0
+-0.217288 -0.0413435 -0.1969 -0.340651 0.940187 0.002368
+0.0284329 0.371795 -0.365301 0.0433861 0.987362 -0.152424
+-0.0220462 0.203705 0.371257 -0.167523 0.907589 -0.384992
+-0.367677 0.371795 0.287351 0 1 0
+-0.104342 -0.212533 -0.333333 0 0 1
+0.484699 -0.0493202 0.320513 0 0 1
+0.450255 0.274793 -0.371795 0 0 1
+0.5 -0.224301 -0.359039 0.999506 0.0049443 -0.031028
+0.0144732 0.371795 -0.0948192 0 1 0
+0.124862 0.371795 0.0918101 0 1 0
+-0.154955 0.0506939 -0.333333 0 0 1
+-0.283848 -0.296582 -0.371795 0 0 1
+0.35231 -0.371795 0.101628 0 1 0
+-0.191366 -0.0182491 -0.301195 0.916864 -0.398659 -0.020758
+0.221207 -0.0371044 -0.0774325 0.234306 0.97216 -0.00220074
+-0.147712 -0.371795 -0.348289 -0.243265 0.969022 -0.0426459
+0.0860504 -0.00634311 -0.333333 0 0 1
+0.262584 0.175961 -0.333333 0 0 1
+0.0314111 -0.294872 -0.287919 0 1 0
+0.361317 0.294872 0.22273 0 1 0
+0.111908 -0.0126069 0.320513 0 0 1
+0.306084 -0.163674 0.371795 0 0 1
+0.229817 -0.371795 0.137155 0 1 0
+0.0129469 0.146522 -0.333333 0 0 1
+-0.231118 -0.371795 -0.148134 0 1 0
+-0.136305 -0.282244 0.320513 0 0 1
+0.209231 -0.0316931 -0.175693 0.518814 0.854694 -0.0181733
+0.215989 -0.300715 -0.371795 0 0 1
+-0.00697225 -0.204103 0.320513 -0.00808383 0.742269 0.670053
+-0.5 0.33 -0.325739 1 0 0
+0.141109 -0.300396 -0.0248679 0.952582 0.30418 -0.00787687
+-0.5 0.283344 -0.157942 1 0 0
+-0.217871 -0.132101 0.371795 0 0 1
+-0.117713 -0.294872 0.0274584 0 1 0
+-0.5 0.128354 -0.197385 1 0 0
+-0.390728 0.30849 0.320513 0 0 1
+0.157618 -0.151145 -0.333333 0 0 1
+-0.364582 0.371795 -0.140133 0 1 0
+-0.5 -0.0405448 -0.0926927 1 0 0
+-0.42086 0.362541 -0.371795 0.0118567 -0.116231 0.993151
+-0.315887 -0.180237 -0.360628 0.941337 0.337122 0.0152883
+-0.443337 0.0401145 0.320513 0 0 1
+-0.5 -0.187311 0.164505 1 0 0
+0.5 -0.266982 0.166579 1 0 0
+-0.36815 0.371795 0.116988 0 1 0
+0.494966 -0.209667 0.320513 0.290208 -0.0348514 0.956329
+-0.159298 0.269986 -0.371795 0 0 1
+0.5 -0.0679814 -0.0163958 1 0 0
+-0.243181 0.371795 -0.345209 0 1 0
+-0.16289 0.353931 0.320513 0 0 1
+0.268228 0.139111 -0.333333 0 0 1
+-0.443058 -0.288408 0.320513 0 0 1
+-0.339044 -0.0155213 -0.371795 0 0 1
+0.5 0.216571 0.161874 1 0 0
+-0.329309 -0.0515869 0.371795 0 0 1
+-0.252373 0.371795 -0.108082 0 1 0
+-0.0650493 0.193942 0.357995 -0.324714 0.945812 0
+0.173845 -0.249125 0.371795 0.281003 -0.446097 0.849726
+-0.119916 0.371795 0.0380997 0 1 0
+0.0735748 0.0651378 0.320513 0 0 1
+-0.209103 -0.0810136 0.371795 0 0 1
+0.429549 -0.173121 0.320513 0 0 1
+-0.5 0.278425 -0.026521 1 0 0
+-0.0600032 -0.195675 0.321061 0.337838 0.929032 0.150879
+0.0691327 0.255232 0.371795 -0.119403 0.37194 0.920545
+-0.5 0.0214227 -0.364386 0.991291 0.044222 0.124045
+0.269638 0.163093 0.371795 0 0 1
+0.348288 0.294872 -0.315108 0 1 0
+-0.5 -0.194055 -0.026807 1 0 0
+0.297419 0.207266 -0.333333 0.734999 0.613097 0.289636
+-0.5 0.312337 -0.342845 1 0 0
+0.210649 -0.16127 -0.333333 0 0 1
+0.0837821 0.371795 0.315533 0.0369203 0.991477 0.12494
+0.156378 -0.371795 -0.233195 0 1 0
+0.199531 -0.0221879 -0.2185 0.817877 0.575374 0.00479584
+-0.428213 0.371795 -0.125903 0 1 0
+0.201871 0.294872 0.17593 0 1 0
+0.39281 -0.371795 -0.118162 0 1 0
+-0.00842993 0.371795 0.0423242 0 1 0
+-0.478044 0.371795 0.00861013 0 1 0
+-0.5 -0.286791 -0.0297581 0.999271 0.0377209 -0.00581212
+-0.141154 -0.301647 0.262896 0.99318 -0.110553 -0.0370317
+0.496834 0.294872 -0.254077 0.203586 0.979056 0.00135415
+0.5 0.22527 0.0540799 1 0 0
+-0.220072 0.0420893 -0.164462 0.274166 0.961679 -0.00242532
+0.5 -0.144124 -0.300723 1 0 0
+-0.102216 -0.172446 -0.333333 0 0 1
+-0.396486 -0.137373 -0.371795 0 0 1
+-0.268358 0.371795 -0.342722 0 1 0
+0.246068 -0.371795 0.18156 0 1 0
+-0.237818 0.332038 -0.371795 0 0 1
+0.5 -0.0436312 0.179958 1 0 0
+0.5 -0.248135 0.177954 1 0 0
+0.214738 0.165584 0.371795 0 0 1
+-0.0314539 0.123544 -0.333333 0 0 1
+-0.5 -0.0307582 0.283316 1 0 0
+-0.47203 0.116909 -0.371795 0 0 1
+-0.494609 -0.294872 -0.265097 0.303756 0.948848 0.0861416
+-0.201116 -0.0390785 0.345193 0.976853 0.213892 -0.00296962
+-0.0272759 -0.294872 0.150428 0 1 0
+0.116542 0.144282 -0.333333 0 0 1
+0.161134 0.04891 -0.333333 0 0 1
+0.130529 0.371795 0.24036 0.106232 0.993652 -0.0370098
+-0.345756 -0.203106 0.320513 0 0 1
+0.172284 0.294872 -0.275925 0 1 0
+0.243498 -0.00166153 0.371795 0 0 1
+0.269784 0.294872 -0.190978 0 1 0
+-0.5 -0.147023 -0.0582726 1 0 0
+0.2363 0.0379777 -0.0499406 0.197801 0.979596 0.0355937
+0.0998636 0.371795 0.0782842 0 1 0
+0.177948 -0.371795 -0.30982 0 1 0
+-0.381742 -0.371795 -0.0298776 0 1 0
+-0.5 0.35503 0.272679 1 0 0
+-0.341483 0.371795 -0.197276 0 1 0
+0.5 -0.0809539 -0.318118 1 0 0
+0.337911 0.130777 -0.371795 0 0 1
+0.0796655 0.216652 0.371795 0 0 1
+-0.448718 -0.310868 -0.170201 1 0 0
+0.272109 -0.265413 -0.371795 0 0 1
+0.5 0.194031 -0.249239 1 0 0
+0.448718 -0.333402 0.0799716 1 0 0
+0.175742 -0.371795 -0.332938 0 1 0
+-0.269899 0.226258 -0.349451 -0.341121 0.939901 -0.0149366
+0.1966 -0.331604 0.320513 0 0 1
+-0.404484 0.29813 -0.371795 0 0 1
+-0.5 0.0328691 0.0378677 1 0 0
+0.0642444 -0.294872 -0.144489 0 1 0
+-0.141154 -0.316485 -0.0352684 1 0 0
+0.141109 -0.369193 -0.0934622 0.906823 0.420966 0.0214464
+0.141026 0.37005 0.0798231 0.874201 0.468851 0.1263
+0.294304 -0.0435922 0.371795 0 0 1
+-0.180802 -0.338921 0.320513 0 0 1
+0.141026 0.368865 -0.0820257 0.855041 0.489511 0.171128
+-0.301463 0.371795 -0.0150279 0 1 0
+-0.128594 0.152119 0.320513 0.336219 -0.369378 0.866324
+-0.5 0.00473535 -0.172786 1 0 0
+-0.234384 0.371795 -0.219623 0 1 0
+0.358548 -0.360145 -0.371795 -0.013311 0.103618 0.994528
+-0.448718 -0.34441 0.0676251 1 0 0
+0.263486 0.0200768 -0.113789 0.840759 0.541379 0.00584142
+0.0374562 -0.0203816 -0.333333 0 0 1
+0.5 0.0143616 0.141828 1 0 0
+0.194928 -0.369885 0.320513 -0.123297 -0.317041 0.940363
+-0.0865753 0.325436 -0.371795 0 0 1
+-0.0911569 -0.141242 -0.333333 0 0 1
+0.5 0.145886 -0.100346 1 0 0
+-0.5 -0.0699904 0.167399 1 0 0
+-0.333115 0.260775 -0.371795 0 0 1
+0.174098 -0.371795 0.00413575 0 1 0
+-0.5 0.028083 -0.220654 1 0 0
+-0.5 -0.0266188 -0.124173 1 0 0
+0.448718 -0.328289 -0.0787915 1 0 0
+0.290697 -0.371795 0.000512711 0 1 0
+0.317513 -0.371795 -0.136308 0 1 0
+0.318484 -0.371795 -0.332156 0 1 0
+0.141109 -0.367184 0.192992 0.967536 0.249561 -0.0399141
+0.446306 -0.342216 0.320513 0.524841 -0.162885 0.83547
+-0.0389538 -0.294872 0.118053 0 1 0
+0.45356 0.294872 0.0324569 0 1 0
+0.5 0.138834 -0.300922 1 0 0
+-0.5 0.332614 0.175918 1 0 0
+-0.149973 0.369625 0.320513 0.0636844 0.621728 0.78064
+-0.5 -0.0149879 -0.217938 1 0 0
+0.5 0.139305 -0.370562 -0.331841 0.00207132 0.943333
+-0.448718 -0.295065 -0.228725 0.792648 0.607499 0.0515165
+0.168249 0.230897 -0.365989 0.00671227 0.990671 0.136112
+0.321467 -0.165885 -0.371795 0.343582 -0.100641 0.933715
+0.375117 -0.250806 -0.371795 0 0 1
+-0.188558 0.371795 0.290883 0 1 0
+-0.0055495 0.242602 -0.371795 0.0111524 0.121075 0.992581
+0.357049 0.294872 0.00817632 0 1 0
+-0.246408 0.285955 0.320513 0 0 1
+-0.5 0.304174 -0.356028 1 0 0
+0.210804 -0.371795 0.269621 0 1 0
+0.172494 -0.109972 0.366887 0.695514 -0.460702 -0.551374
+-0.0935684 -0.294872 -0.22929 0 1 0
+0.448718 -0.352626 0.202152 1 0 0
+-0.0666209 -0.294872 0.152929 0 1 0
+-0.5 -0.0221002 -0.302694 1 0 0
+-0.213913 -0.240864 0.351619 0.349463 0.93695 0
+-0.371415 -0.0517776 -0.371795 0 0 1
+-0.164992 0.371795 0.0694643 0 1 0
+-0.482201 0.371795 -0.328867 0 1 0
+0.5 0.213328 0.0885071 1 0 0
+0.101504 -0.294872 -0.0939135 0 1 0
+-0.389348 -0.371795 -0.26295 0 1 0
+0.5 -0.0333629 -0.334879 1 0 0
+0.141026 0.37159 0.0460282 0.39048 0.917048 -0.0809199
+0.419875 0.294872 -0.132944 0 1 0
+-0.5 0.0510756 -0.00817564 1 0 0
+-0.5 0.214928 -0.0853096 1 0 0
+0.426985 -0.101032 0.320513 0 0 1
+0.20561 -0.029026 -0.0461631 0.654607 0.755883 -0.0113926
+-0.203625 -0.286865 0.320513 0 0 1
+0.317023 -0.371795 0.0688564 0 1 0
+0.354833 0.294622 0.320513 -0.082927 0.748763 0.65763
+-0.387202 -0.371795 0.0993398 0 1 0
+0.314053 -0.25837 0.320513 0 0 1
+0.5 0.252587 -0.029325 1 0 0
+-0.0433513 0.251314 -0.371795 0 0 1
+0.353182 -0.371795 -0.183852 0 1 0
+-0.5 0.21389 0.138204 1 0 0
+-0.399601 -0.371795 -0.153037 0 1 0
+0.197234 0.0187451 -0.284587 0.861138 -0.508328 0.00668076
+0.00699271 0.371795 0.117388 0 1 0
+-0.5 0.238645 0.260358 1 0 0
+-0.0683757 0.238599 -0.371795 0.0390763 0.0504942 0.99796
+0.421263 -0.371795 -0.252567 0 1 0
+-0.5 0.298988 0.198774 1 0 0
+0.209153 0.294872 -0.179976 0 1 0
+0.17137 0.294872 0.278908 0 1 0
+0.336382 0.294872 -0.167861 0 1 0
+-0.5 -0.262544 0.286744 1 0 0
+0.320513 -0.148191 -0.370175 0.770571 -0.165459 0.615503
+-0.419474 -0.371795 -0.279512 0 1 0
+-0.175649 0.10349 0.320513 0.45436 -0.254148 0.853795
+-0.5 -0.0547765 0.198429 1 0 0
+0.0256365 0.183316 -0.333333 0 0 1
+0.222339 0.294872 -0.130186 0 1 0
+-0.129143 -0.182572 0.371795 0 0 1
+0.5 -0.0802012 0.196472 1 0 0
+-0.5 0.0573241 -0.331154 1 0 0
+-0.0690554 0.346927 0.320513 0 0 1
+0.5 0.107112 0.117402 1 0 0
+0.0708104 -0.294872 -0.167707 0 1 0
+-0.0755971 0.371795 -0.245733 0 1 0
+-0.100504 -0.294872 0.122087 0 1 0
+-0.19601 -0.0260652 -0.060147 0.817345 -0.576068 0.00965616
+-0.135405 0.371795 -0.0682943 0 1 0
+-0.44936 0.29123 -0.371795 0 0 1
+0.5 0.150139 -0.121801 1 0 0
+0.5 -0.271385 -0.124179 1 0 0
+-0.300458 0.371795 -0.130737 0 1 0
+0.0826485 -0.294872 -0.15286 0 1 0
+-0.5 -0.00167338 -0.152064 1 0 0
+-0.5 0.353588 0.281902 1 0 0
+0.350176 -0.371795 -0.0263188 0 1 0
+0.19876 -0.371795 -0.369705 -0.00754423 0.778729 0.627315
+0.217525 0.0361002 -0.0918087 -0.370838 0.928686 0.00470099
+-0.340663 -0.371795 0.291169 0 1 0
+0.141026 0.308047 -0.207691 1 0 0
+-0.231627 -0.0435147 -0.133708 -0.0173659 0.99968 0.0184063
+-0.037718 -0.294872 0.237223 0 1 0
+0.428114 -0.371795 -0.364448 0.0563893 0.983606 0.171286
+-0.141154 -0.353039 -0.187622 1 0 0
+-0.5 0.0779107 -0.16666 1 0 0
+-0.5 0.153505 -0.336478 1 0 0
+-0.5 -0.159688 -0.298618 1 0 0
+-0.5 -0.252206 0.153481 1 0 0
+0.428938 -0.371795 -0.334354 0 1 0
+-0.275382 -0.0210998 0.371795 0 0 1
+-0.192814 0.247553 0.353007 -0.21255 0.97715 0
+-0.0603729 0.099605 0.320513 0 0 1
+0.304166 -0.371795 -0.338125 0 1 0
+-0.5 -0.144965 -0.303107 1 0 0
+-0.101532 0.177642 0.359703 -0.475926 0.879485 0
+-0.121355 0.0205965 0.320513 0 0 1
+0.316342 -0.173377 0.353163 0.707107 -0.707107 0
+0.365491 -0.371795 -0.0540994 0 1 0
+-0.448718 -0.303984 -0.0988819 0.989784 0.127859 -0.063089
+0.0151948 -0.294872 0.0738183 0 1 0
+-0.12219 0.16435 -0.333333 0 0 1
+-0.25395 -0.151537 -0.333333 0 0 1
+-0.448718 -0.314752 -0.358582 1 0 0
+-0.017246 -0.294872 0.311763 0.00668215 0.995016 -0.0994889
+0.320513 -0.136173 -0.341387 0.994056 -0.0571223 0.0926788
+0.204655 0.0394579 0.371795 -0.184426 0.0484708 0.98165
+0.0338631 -0.294872 -0.261992 0 1 0
+-0.344401 0.16778 0.320513 0 0 1
+0.371545 -0.100788 0.320513 0.0657719 -0.0157635 0.99771
+-0.477612 -0.285441 0.320513 -0.00442363 -0.0643707 0.997916
+-0.5 0.155206 -0.179308 1 0 0
+0.5 0.182546 -0.022844 1 0 0
+0.086241 -0.294872 -0.070478 0 1 0
+-0.464487 -0.0325122 0.320513 0 0 1
+0.0310239 0.256282 0.366038 -0.135374 0.833493 0.53569
+0.128316 0.371795 0.0448845 0 1 0
+-0.183268 -0.371795 0.0284415 0 1 0
+0.190316 -0.371795 -0.137649 0 1 0
+0.39429 -0.254401 0.320513 0 0 1
+-0.127541 0.221515 -0.333333 -0.000733581 0.0203932 0.999792
+0.346378 -0.0157333 0.371795 0 0 1
+0.320513 -0.0518171 -0.369897 0.816907 0.037825 0.575528
+-0.378246 -0.371795 0.274695 0 1 0
+-0.262685 -0.371795 -0.0922071 0 1 0
+0.5 -0.0247999 -0.0534493 1 0 0
+0.35992 -0.213312 -0.371795 0 0 1
+-0.5 0.136809 0.145772 1 0 0
+-0.480032 -0.0520788 0.320513 0 0 1
+-0.5 0.242112 -0.18723 1 0 0
+-0.0495697 -0.294872 0.205671 0 1 0
+0.424167 -0.371795 -0.370697 -0.0395259 0.632998 0.773144
+-0.0862247 -0.117782 -0.333333 0 0 1
+0.237636 -0.349713 -0.371795 0 0 1
+-0.5 -0.237204 0.103548 1 0 0
+0.445448 0.00909066 0.320513 0 0 1
+-0.375141 -0.184576 0.320513 0 0 1
+-0.448718 -0.319768 -0.0394999 1 0 0
+-0.0267559 0.371795 -0.227161 0 1 0
+-0.229304 0.371795 -0.129973 0 1 0
+0.378506 0.147727 -0.371795 0 0 1
+0.5 0.0112082 -0.273722 1 0 0
+0.5 -0.192174 0.0635708 1 0 0
+0.150005 0.283864 -0.371795 0 0 1
+-0.448718 -0.346216 0.243854 1 0 0
+-0.187102 0.371795 0.229824 0 1 0
+-0.383794 -0.178764 -0.371795 0 0 1
+-0.419228 0.216069 -0.371795 0 0 1
+-0.141154 -0.331431 0.308882 1 0 0
+-0.32955 0.231862 -0.371795 0 0 1
+0.5 -0.0137317 -0.120401 1 0 0
+-0.406512 -0.0581103 -0.371795 0 0 1
+-0.173414 -0.12431 0.371795 0.109546 0.0424961 0.993073
+-0.46184 0.371795 0.0896935 0 1 0
+-0.486515 -0.225736 -0.371795 0 0 1
+0.141109 -0.365943 0.26601 0.899672 0.436566 -0.000702767
+0.5 -0.218328 0.307889 1 0 0
+-0.182363 -0.371795 -0.264653 0 1 0
+-0.0499368 -0.294872 -0.322933 0 1 0
+-0.5 0.15455 -0.030269 1 0 0
+-0.5 0.0950228 -0.151398 1 0 0
+-0.141154 -0.34066 0.248829 1 0 0
+-0.0453411 0.371795 -0.364461 0.0136829 0.996521 -0.0822136
+0.157733 -0.161102 0.371795 0 0 1
+0.469577 0.294872 -0.252221 0 1 0
+-0.448718 -0.303672 -0.011086 0.996381 0.0804443 0.0274467
+-0.276463 -0.208336 0.356605 0.599297 0.800527 0
+0.187345 -0.371795 0.291922 0 1 0
+0.334497 0.294872 -0.261445 0 1 0
+0.489985 -0.294872 0.271673 0 1 0
+-0.5 -0.289721 -0.18102 0.909132 0.415997 -0.020646
+0.262293 -0.253349 0.320513 0 0 1
+0.0836341 0.371795 0.161286 0 1 0
+-0.0702121 -0.294872 0.152351 0 1 0
+-0.333596 0.371795 -0.00608228 0 1 0
+-0.5 -0.02835 -0.312067 1 0 0
+-0.0559874 0.34341 0.320513 0 0 1
+0.0152903 -0.0464036 0.320513 0 0 1
+-0.145221 -0.132381 0.320513 0.0502588 0.0402656 0.997924
+-0.5 -0.0482217 0.120402 1 0 0
+0.367186 0.271209 -0.371795 0 0 1
+-0.5 -0.262389 -0.279694 1 0 0
+0.232621 0.294872 0.174057 0 1 0
+0.481202 -0.14528 0.320513 0 0 1
+0.141026 0.310393 0.268472 1 0 0
+0.44134 0.0711021 0.320513 0 0 1
+-0.400477 0.3004 0.320513 0 0 1
+0.110783 -0.234155 -0.371795 0.00551086 -0.253815 0.967237
+0.239903 -0.0372196 -0.17158 -0.234521 0.971556 -0.0328491
+0.209123 0.294872 0.258514 0 1 0
+0.141109 -0.306136 0.114601 1 0 0
+0.0372132 -0.294872 0.0669342 0 1 0
+0.5 0.220474 0.0139928 1 0 0
+-0.0769721 0.291276 -0.371795 0 0 1
+0.217068 -0.0131538 0.0116567 -0.368818 -0.333725 0.867526
+0.0713355 0.239159 -0.371795 -0.0647835 0.15145 0.98634
+0.12291 -0.163549 0.339716 -0.61422 0.789135 0
+0.141026 0.363145 -0.258373 0.997545 0.0642438 0.0278735
+-0.154363 0.371795 -0.365227 0.0262407 0.991341 -0.128666
+-0.448718 -0.333883 -0.110243 1 0 0
+0.5 -0.141223 0.247446 1 0 0
+0.5 -0.0418301 0.196301 1 0 0
+-0.383173 -0.0578997 0.320513 -0.302765 -0.101307 0.947666
+-0.484152 -0.294872 0.0654388 0 1 0
+-0.1879 0.0976923 -0.333333 0 0 1
+0.365413 0.0955102 0.345634 0.936955 0.349451 0
+-0.5 0.211958 0.0734187 1 0 0
+-0.0131765 -0.294872 -0.24731 0 1 0
+0.5 0.268925 0.00952336 1 0 0
+-0.273945 -0.00473761 -0.0844285 0.992178 0.124828 0.00100703
+-0.178331 0.0525205 -0.333333 0 0 1
+0.238559 -0.187335 -0.333333 0 0 1
+0.37578 0.294872 0.126664 0 1 0
+-0.448718 -0.311509 -0.0334177 1 0 0
+0.0117466 0.371795 0.22962 0 1 0
+0.5 0.0813647 -0.217938 1 0 0
+-0.165237 -0.371795 0.15782 0 1 0
+-0.10641 -0.0267609 -0.333333 0 0 1
+0.359742 -0.371795 0.191465 0 1 0
+-0.0283685 0.371795 -0.367886 -0.0906206 0.971623 -0.218486
+0.31595 -0.18 -0.349817 0.935187 -0.354093 0.0065376
+-0.5 0.362887 0.233681 1 0 0
+0.235178 0.173256 -0.333333 0 0 1
+0.5 -0.13048 -0.0148684 1 0 0
+-0.194303 0.247229 0.353705 -0.222295 0.974974 0.00336181
+0.160458 -0.230447 -0.333333 0.261556 0.819953 -0.509182
+-0.5 0.172918 -0.0528452 1 0 0
+-0.485355 -0.0578384 -0.371795 0 0 1
+0.256898 -0.229733 -0.349626 -0.183186 0.983043 0.00830015
+-0.377804 -0.371795 -0.123946 0 1 0
+0.5 0.276186 -0.240032 1 0 0
+-0.320303 -0.317881 0.320513 0 0 1
+-0.287146 0.371795 0.213762 0 1 0
+-0.103493 -0.294872 -0.146727 0 1 0
+0.083832 -0.271034 0.320513 0 0 1
+-0.191876 -0.371795 -0.0317304 0 1 0
+0.0459973 0.371795 -0.259335 0 1 0
+-0.0598763 0.371795 0.0801709 0 1 0
+0.141026 0.338467 -0.255629 1 0 0
+0.5 -0.000406175 -0.0380897 1 0 0
+-0.290707 -0.197673 0.353712 0.605451 0.795878 0.00273604
+0.303934 0.284247 -0.371795 -0.0702524 -0.0972004 0.992782
+-0.5 -0.00241315 -0.228749 1 0 0
+-0.281199 0.0556241 0.371795 0 0 1
+-0.411371 0.187536 0.320513 0 0 1
+-0.218462 -0.371795 -0.267595 0 1 0
+0.101276 0.371795 0.169606 0 1 0
+-0.455926 0.262009 0.320513 0 0 1
+-0.0740578 0.371795 0.0360047 0 1 0
+-0.143646 0.271367 0.320513 0 0 1
+0.5 0.128186 0.086152 1 0 0
+0.448718 -0.362134 -0.359606 1 0 0
+-0.412459 0.198092 -0.371795 0 0 1
+-0.291497 -0.371795 0.0681755 0 1 0
+-0.493544 0.0594263 0.320513 -0.0678778 0.000258697 0.997694
+-0.0321397 0.371795 0.304811 0 1 0
+-0.5 0.356009 0.311079 0.999363 -0.00249163 -0.0356089
+0.0373932 0.371795 -0.318314 0 1 0
+0.349797 0.203844 -0.371795 0 0 1
+0.217378 0.0360316 -0.211484 -0.357064 0.93408 0
+0.5 -0.0527957 -0.274761 1 0 0
+0.141109 -0.299632 0.144961 0.993121 0.101517 0.0583496
+-0.0654998 -0.294872 0.0428359 0 1 0
+0.158746 -0.291444 0.320513 0 0 1
+0.141109 -0.312465 -0.213017 1 0 0
+0.231649 0.0383845 -0.212746 -0.0115192 0.999931 -0.00232769
+-0.197734 -0.105791 0.371795 0 0 1
+-0.499054 -0.294872 -0.137907 0.833861 0.54989 0.0479168
+0.268272 0.0080761 -0.253223 0.975203 0.22127 0.00442374
+0.312669 -0.371795 0.0106569 0 1 0
+-0.362116 0.104348 0.325469 0.92136 -0.36262 -0.14001
+-0.193965 -0.247302 0.324031 0.318377 0.790454 -0.523277
+-0.5 0.148882 0.159908 1 0 0
+-0.208118 0.187062 -0.333333 0 0 1
+0.247626 0.268246 0.320513 0 0 1
+0.206352 0.294872 -0.256678 0 1 0
+-0.127339 -0.0943426 0.320513 0 0 1
+0.207029 0.220897 -0.333333 0.0614085 0.0833767 0.994624
+0.192648 0.294872 -0.11778 0 1 0
+-0.24382 0.371795 0.227512 0 1 0
+-0.0832773 0.371795 -0.233793 0 1 0
+0.300685 0.29216 0.320513 -0.0500427 0.125729 0.990802
+-0.00788284 -0.294872 0.180687 0 1 0
+-0.207576 -0.371795 -0.143699 0 1 0
+-0.5 0.00771008 -0.0312448 1 0 0
+0.298373 0.207563 -0.339957 0.712452 0.680703 0.170456
+0.16346 -0.341911 -0.371795 0 0 1
+0.5 0.045137 -0.108779 1 0 0
+0.187259 -0.371795 0.176318 0 1 0
+-0.164129 -0.154537 -0.333333 0 0 1
+-0.116772 -0.0460691 -0.333333 0 0 1
+0.343122 -0.371795 0.276389 0 1 0
+0.0725663 -0.294872 -0.336212 0 1 0
+0.405201 -0.371795 -0.173004 0 1 0
+0.00236332 0.371795 -0.149541 0 1 0
+-0.237252 0.371795 -0.169605 0 1 0
+-0.1019 0.18241 0.371795 0.367015 -0.432189 0.823719
+-0.408305 -0.371795 -0.226309 0 1 0
+-0.5 -0.159948 0.136862 1 0 0
+-0.196838 -0.0272477 -0.0637946 0.808064 -0.589095 0
+0.277077 -0.371795 0.0468816 0 1 0
+-0.42993 0.344085 0.320513 0 0 1
+-0.112692 -0.0697905 -0.333333 0 0 1
+0.0185974 0.358155 0.320513 0 0 1
+-0.273894 -0.00531791 -0.208041 0.993421 0.114491 -0.00274768
+-0.5 -0.28756 0.255752 0.990976 0.118402 -0.0628243
+-0.0189915 -0.294872 -0.000673702 0 1 0
+-0.14491 0.0315304 -0.333333 0 0 1
+-0.250691 0.371795 0.102027 0 1 0
+-0.0299563 -0.294872 -0.241246 0 1 0
+-0.5 -0.247596 -0.322326 1 0 0
+-0.277341 -0.371795 -0.0795058 0 1 0
+-0.132529 -0.198953 -0.333333 0 0 1
+-0.421513 -0.371795 0.22559 0 1 0
+-0.287913 -0.139394 0.371795 0 0 1
+-0.0727151 0.0437196 -0.333333 0 0 1
+0.236344 0.0379738 -0.154764 0.100788 0.99469 -0.0207971
+0.401554 -0.371795 -0.146192 0 1 0
+-0.165158 -0.371795 0.143496 0 1 0
+0.354642 -0.273997 0.320513 0 0 1
+-0.454428 0.147429 -0.371795 0 0 1
+-0.0725285 -0.294872 -0.2842 0 1 0
+-0.5 0.31179 -0.332618 1 0 0
+0.135236 -0.276223 0.320513 0 0 1
+0.310779 0.294872 0.245908 0 1 0
+-0.15491 -0.323985 0.320513 0 0 1
+-0.432538 -0.156358 -0.371795 0 0 1
+-0.198033 0.240667 0.371795 -0.145078 0.185559 0.971864
+0.5 -0.0727488 -0.340805 1 0 0
+-0.5 -0.179725 0.14719 1 0 0
+-0.355454 -0.371795 -0.30241 0 1 0
+-0.408333 -0.188879 -0.371795 0 0 1
+0.5 -0.0296803 -0.0219813 1 0 0
+-0.5 0.338865 -0.306409 1 0 0
+-0.5 -0.0623194 -0.0635844 1 0 0
+0.5 -0.190682 -0.143951 1 0 0
+0.0550072 0.371795 -0.0534495 0 1 0
+-0.175565 -0.371795 -0.17002 0 1 0
+0.5 0.275159 0.204643 1 0 0
+-0.5 -0.283728 -0.227009 1 0 0
+0.436689 -0.115251 0.320513 0 0 1
+0.105932 0.371795 -0.0511749 0 1 0
+-0.5 0.0798677 -0.216824 1 0 0
+-0.123233 -0.294872 0.280176 0 1 0
+-0.208085 -0.0371277 -0.29619 -0.530269 0.847734 0.0127196
+0.317418 -0.0536181 0.371795 0 0 1
+-0.0444807 -0.0238014 0.320513 0 0 1
+0.376383 -0.371795 0.0459908 0 1 0
+0.0644293 0.356684 0.320513 0 0 1
+0.305814 -0.371795 -0.114375 0 1 0
+0.5 0.17933 0.024085 1 0 0
+0.193529 0.106369 0.371795 0 0 1
+0.5 -0.291434 0.214801 0.900367 -0.244284 0.360089
+0.220249 -0.371795 0.161338 0 1 0
+-0.269478 -0.039706 -0.333333 -0.015804 -0.0162997 0.999742
+-0.448718 -0.357508 -0.257452 1 0 0
+0.141026 0.340901 0.187529 1 0 0
+-0.141154 -0.35883 0.0461551 1 0 0
+-0.3336 0.371795 0.117547 0 1 0
+0.5 0.240314 0.0424118 1 0 0
+-0.100114 -0.294872 0.0750423 0 1 0
+-0.18974 -0.0146551 -0.0583735 0.937796 -0.347131 0.0062519
+-0.19269 -0.021089 -0.197618 0.8717 -0.490022 0.00417239
+-0.495559 0.254861 -0.371795 0.328791 -0.0439912 0.943378
+0.5 -0.192229 0.315191 0.986133 0.0701027 0.150421
+0.141026 0.355981 -0.188225 1 0 0
+-0.0527927 -0.294872 0.0141039 0 1 0
+0.11767 0.371795 -0.111285 0 1 0
+0.224517 -0.371795 -0.218099 0 1 0
+-0.5 0.265063 -0.331839 1 0 0
+0.5 0.205765 -0.128983 1 0 0
+-0.0220617 -0.294872 -0.249804 0 1 0
+-0.352196 0.371795 -0.0905734 0 1 0
+-0.343872 -0.13843 0.325841 0.819242 0.474906 -0.321413
+-0.243238 0.371795 -0.162244 0 1 0
+-0.141154 -0.299445 0.265554 0.939078 -0.343098 -0.0203927
+-0.272911 -0.31336 0.320513 0 0 1
+0.5 0.0255461 -0.131562 1 0 0
+-0.395876 0.317863 -0.371795 0 0 1
+0.5 -0.255193 0.0783655 1 0 0
+0.0314113 -0.294872 -0.294485 0 1 0
+-0.244049 0.228 0.371687 -0.232794 0.74263 0.62794
+0.5 -0.147148 -0.124847 1 0 0
+0.5 -0.060448 -0.203444 1 0 0
+-0.165864 0.371795 -0.0287189 0 1 0
+-0.260091 -0.229593 -0.371795 -0.155301 -0.526559 0.835833
+0.415837 0.294872 -0.268428 0 1 0
+0.320513 0.0501711 -0.365561 0.995046 0.00212494 0.099392
+0.128956 0.371795 0.0637612 0 1 0
+-0.229929 -0.0435162 -0.0820085 -0.0722316 0.997154 0.0216084
+0.220242 -0.253084 -0.371795 0 0 1
+-0.5 0.111385 -0.00188776 1 0 0
+-0.5 -0.278907 -0.0960989 1 0 0
+-0.5 -0.00655353 -0.0609489 1 0 0
+0.012598 0.27135 -0.371795 0 0 1
+-0.5 0.322742 0.296794 1 0 0
+-0.243537 0.371795 -0.220139 0 1 0
+0.5 -0.0101932 -0.359605 1 0 0
+0.288446 0.199366 0.342828 0.59929 0.800532 0
+0.287 0.108506 0.371795 0 0 1
+-0.403148 0.33246 -0.371795 0 0 1
+-0.5 0.0319066 0.0739842 1 0 0
+-0.5 0.0709537 0.24727 1 0 0
+-0.5 -0.232751 -0.0580682 1 0 0
+0.254496 -0.371795 0.183756 0 1 0
+-0.331062 0.371795 -0.114434 0 1 0
+-0.0690705 0.305633 0.320513 0 0 1
+0.117746 0.0491637 -0.333333 0 0 1
+0.363014 0.294872 -0.0808957 0 1 0
+0.0500452 -0.109161 0.320513 0 0 1
+0.337851 0.294872 0.127659 0 1 0
+0.141026 0.363053 -0.023595 1 0 0
+0.141109 -0.332409 0.246923 1 0 0
+-0.247833 0.0773526 0.371795 0 0 1
+0.277054 0.294872 -0.330472 0 1 0
+0.422783 -0.0557049 -0.371795 0 0 1
+-0.2585 -0.00316205 -0.0258935 -0.508224 -0.0927197 0.856219
+-0.284894 0.142121 0.371795 0 0 1
+0.265114 0.294872 -0.107965 0 1 0
+0.376204 -0.0625591 0.347373 0.977143 -0.212582 0
+-0.11415 -0.294872 -0.0855763 0 1 0
+0.239617 0.294872 -0.364888 0.159332 0.968044 -0.193662
+0.226005 -0.115634 -0.333333 0 0 1
+0.141026 0.342936 0.305082 1 0 0
+-0.199959 0.371795 -0.254261 0 1 0
+-0.23949 0.291981 -0.371795 0 0 1
+0.5 -0.133312 -0.0479565 1 0 0
+-0.475556 0.371795 0.0616432 0 1 0
+0.448718 -0.299716 -0.171399 0.730584 -0.68231 0.0264575
+0.108087 0.30331 -0.371795 0 0 1
+-0.16371 -0.123417 0.357692 0.813441 0.58162 0.00568183
+0.202202 0.294872 -0.224246 0 1 0
+0.5 0.108856 0.119466 1 0 0
+-0.5 -0.157174 0.0892427 1 0 0
+-0.223246 -0.0495843 -0.333333 0.0414098 -0.25577 0.96585
+-0.194061 0.371795 0.289593 0 1 0
+-0.28238 -0.00502631 0.371795 0 0 1
+-0.061093 0.371795 0.238333 0 1 0
+-0.288333 -0.359902 -0.371795 0 0 1
+-0.0810136 0.325918 -0.371795 0 0 1
+0.138935 0.151075 0.360707 0.728262 0.684854 -0.0246816
+0.340281 -0.371795 0.273627 0 1 0
+-0.411363 -0.0325857 -0.371795 0 0 1
+-0.5 0.342511 0.0778932 1 0 0
+0.448718 -0.322194 0.120017 1 0 0
+-0.453029 0.32405 0.320513 0 0 1
+-0.372302 0.371795 -0.113086 0 1 0
+0.246202 -0.371795 -0.0373669 0 1 0
+0.0202512 -0.294872 0.079061 0 1 0
+0.214621 0.0532116 0.371795 0 0 1
+-0.0264027 0.102566 0.320513 0 0 1
+0.303427 -0.371795 0.153737 0 1 0
+-0.338898 0.371795 0.0482399 0 1 0
+-0.0688004 -0.256282 0.327864 -0.0630538 0.99095 -0.1185
+-0.141154 -0.362081 0.142283 0.994255 -0.104737 0.0220735
+-0.301622 0.371795 -0.0909169 0 1 0
+-0.175986 -0.371795 -0.0829626 0 1 0
+-0.451468 0.371795 -0.325698 0 1 0
+0.219778 0.294872 -0.341509 0 1 0
+-0.427817 0.339926 -0.371795 0 0 1
+-0.5 -0.259559 -0.32618 1 0 0
+-0.374539 0.371795 0.129916 0 1 0
+-0.465738 -0.294872 0.178295 0 1 0
+-0.317213 0.175286 -0.357232 0.959262 -0.282446 -0.00633477
+0.147666 -0.291139 -0.371795 0.0811936 0.0503832 0.995424
+0.5 0.0101935 0.048149 1 0 0
+-0.5 0.231272 -0.155057 1 0 0
+0.0399819 0.371795 -0.334706 0 1 0
+-0.0105336 -0.28484 0.320513 0.0287425 -0.136411 0.990235
+-0.149302 -0.236832 0.371795 0 0 1
+-0.38246 -0.0283533 0.334136 0.995847 0.0897213 -0.0154872
+0.201814 -0.0226479 0.000968824 -0.543383 -0.393053 0.741785
+-0.5 0.259015 -0.365339 0.979125 0.0795115 0.187059
+0.215134 0.109658 0.371795 0 0 1
+0.254216 -0.371795 -0.138401 0 1 0
+0.353412 -0.19227 0.320513 0 0 1
+0.0758975 -0.294872 -0.0682494 0 1 0
+0.228402 0.0382544 -0.071738 -0.109782 0.993943 0.00496811
+-0.29763 0.371795 0.302103 0 1 0
+0.364005 0.0474153 0.371795 0 0 1
+-0.5 -0.0021102 0.04873 1 0 0
+-0.5 0.336713 0.180839 1 0 0
+-0.320348 -0.371795 -0.369531 0.00856341 0.940534 0.339592
+-0.236325 -0.0431037 -0.25777 0.082051 0.996552 -0.0123331
+-0.185573 -0.371795 -0.178103 0 1 0
+-0.131835 0.30777 -0.371795 0 0 1
+-0.5 -0.0223016 -0.252855 1 0 0
+0.102307 -0.177223 0.356524 -0.475935 0.87948 0
+0.321729 -0.371795 -0.330885 0 1 0
+0.24165 0.21596 0.371795 0 0 1
+-0.5 0.325168 -0.129276 1 0 0
+-0.5 -0.0610209 0.238777 1 0 0
+-0.0715193 0.101025 -0.333333 0 0 1
+-0.5 -0.0919699 0.154914 1 0 0
+0.210986 0.259992 0.320513 0 0 1
+0.287907 0.199769 0.358255 0.599971 0.800022 0
+0.106447 -0.294872 -0.345798 0 1 0
+0.141109 -0.311203 -0.290589 1 0 0
+-0.0228615 0.371795 0.305689 0 1 0
+-0.124915 0.272461 -0.371795 0 0 1
+0.438204 -0.0362217 0.320513 0 0 1
+0.263192 -0.248109 0.320513 0 0 1
+0.0831515 -0.128082 0.320513 0 0 1
+0.051069 -0.136027 0.320513 0 0 1
+-0.0250174 0.0486787 -0.333333 0 0 1
+0.141109 -0.342129 0.0819475 1 0 0
+-0.0719374 -0.191577 0.365628 0.356687 0.856754 0.372488
+-0.199067 -0.0471719 0.359683 0.969403 0.245475 0
+-0.261618 -0.371795 -0.239704 0 1 0
+0.5 0.255325 -0.057719 1 0 0
+-0.0568563 0.341684 0.320513 0 0 1
+-0.336088 -0.195323 -0.371795 0 0 1
+-0.5 0.0697696 0.227638 1 0 0
+0.448718 -0.354785 -0.220699 1 0 0
+-0.448718 -0.34704 0.205513 1 0 0
+-0.338763 -0.278304 0.320513 0 0 1
+0.316527 -0.149827 -0.333333 0.353726 -0.0442105 0.934304
+0.295227 0.294872 -0.0172447 0 1 0
+0.125835 -0.168344 0.371795 -0.352774 0.50316 0.788911
+0.5 -0.267975 0.0959876 1 0 0
+-0.275482 0.37142 -0.371795 0.0644881 -0.666883 0.742367
+0.35672 -0.371795 -0.208789 0 1 0
+0.5 0.182702 0.0504543 1 0 0
+0.347316 -0.132123 0.338816 0.874135 -0.485684 0
+-0.20585 0.371795 0.168035 0 1 0
+0.246543 0.160765 0.371795 0 0 1
+-0.286462 -0.371795 -0.128026 0 1 0
+0.443378 0.240966 -0.371795 0 0 1
+0.5 0.112151 -0.234959 1 0 0
+0.409983 0.151451 -0.371795 0 0 1
+0.141195 0.0225413 -0.333333 0 0 1
+-0.5 0.145223 -0.255929 1 0 0
+-0.5 0.107622 0.0926986 1 0 0
+0.0750505 0.371795 0.283885 0 1 0
+-0.5 -0.0438308 0.1394 1 0 0
+-0.0957892 -0.294872 0.129906 0 1 0
+0.448718 -0.362321 0.136237 0.987464 -0.154077 -0.0342916
+-0.392925 -0.222375 -0.371795 0 0 1
+0.5 -0.130969 -0.249891 1 0 0
+-0.0356912 0.230897 -0.340836 0.0154616 0.998687 0.0488379
+0.246271 -0.0350478 -0.21876 -0.404889 0.914182 0.0183453
+-0.464272 -0.294872 -0.0729313 0 1 0
+0.143038 0.294872 0.143557 0.289934 0.957042 -0.00291984
+0.0443993 -0.294872 -0.235921 0 1 0
+-0.0585751 0.371795 -0.211589 0 1 0
+-0.0165297 -0.294872 0.234069 0 1 0
+0.490858 -0.294872 0.106311 -0.210723 0.977546 0
+-0.20725 -0.371795 0.294088 0 1 0
+-0.5 0.28991 -0.350099 1 0 0
+-0.5 0.356157 -0.0748838 1 0 0
+0.3761 0.159461 0.320513 0 0 1
+-0.453471 0.0251762 0.320513 0 0 1
+0.193458 -0.00879083 -0.0339345 0.974924 0.222171 -0.0128046
+-0.414162 -0.101404 -0.371795 0 0 1
+0.396481 0.0376175 -0.371795 0 0 1
+-0.219699 -0.371795 0.0805112 0 1 0
+0.104365 -0.294872 -0.203459 0 1 0
+0.5 -0.0582616 -0.066265 1 0 0
+0.338159 -0.187547 -0.371795 0 0 1
+-0.323566 0.371795 0.161413 0 1 0
+-0.293523 -0.308213 -0.371795 0 0 1
+-0.37212 -0.371795 -0.26843 0 1 0
+0.423765 0.294872 -0.3032 0 1 0
+-0.165995 0.156769 -0.333333 0 0 1
+-0.340249 0.143304 0.351636 0.802677 -0.596411 -0.00194978
+-0.141154 -0.335507 -0.206986 1 0 0
+-0.0136995 0.371511 -0.371795 0.117071 0.803029 -0.584327
+0.448718 -0.353526 0.0669567 1 0 0
+-0.339489 -0.371795 -0.351305 0 1 0
+-0.196029 0.0260926 -0.236118 0.802691 0.596079 -0.0194032
+-0.448718 -0.306048 -0.18175 1 0 0
+0.5 0.0601356 0.160326 1 0 0
+0.373005 0.294872 -0.0676069 0 1 0
+-0.197275 0.371795 -0.200564 0 1 0
+0.374025 0.294872 -0.01552 0 1 0
+-0.458704 -0.294872 -0.140321 0 1 0
+0.425797 0.294193 -0.371795 -0.0156752 -0.694983 0.718855
+-0.242803 0.15281 0.371795 0 0 1
+-0.0161102 -0.22551 0.371795 0 0 1
+0.0229823 -0.294872 -0.279004 0 1 0
+-0.0266792 0.371795 -0.048681 0 1 0
+0.141026 0.318078 -0.192756 1 0 0
+-0.246856 -0.200242 0.371795 0 0 1
+0.43809 -0.371795 -0.0595225 -0.019818 0.99978 -0.00692975
+-0.339585 0.371795 -0.12405 0 1 0
+0.2189 0.0364862 -0.272153 -0.286507 0.958074 -0.00272268
+-0.359922 0.292532 -0.371795 0 0 1
+0.231491 -0.371795 -0.100451 0 1 0
+0.5 0.240924 -0.308732 1 0 0
+0.0609644 0.371795 -0.029967 0 1 0
+-0.0877408 -0.284576 0.320513 -0.043808 -0.103097 0.993706
+0.357627 0.218975 -0.371795 0 0 1
+-0.141154 -0.328611 0.0394078 1 0 0
+-0.496168 0.0172117 -0.371795 0.41709 0.0128717 0.908774
+-0.212619 -0.371795 -0.340527 0 1 0
+-0.0442016 -0.0724402 0.320513 0 0 1
+0.419167 -0.371795 -0.292235 0 1 0
+0.5 0.24352 0.137015 1 0 0
+-0.121264 -0.294872 -0.233982 0 1 0
+0.381269 -0.371795 0.191729 0 1 0
+0.169272 -0.0724379 -0.333333 0 0 1
+-0.246956 0.199172 0.371795 0 0 1
+0.176422 -0.371795 0.0920694 0 1 0
+0.136902 -0.0647307 0.320513 0 0 1
+-0.0863061 -0.167244 -0.333333 0 0 1
+-0.5 0.0500143 0.111332 1 0 0
+-0.448718 -0.309189 0.0705787 1 0 0
+0.271241 0.294872 0.113657 0 1 0
+0.5 -0.189371 -0.363675 0.991334 -0.0215061 -0.129594
+0.276825 -0.371795 -0.316429 0 1 0
+-0.0360977 0.371795 -0.293682 0 1 0
+0.5 -0.126879 -0.0490304 1 0 0
+-0.0557238 0.371795 0.204055 0 1 0
+0.196548 -0.229902 -0.333333 0.0217332 -0.616015 0.787435
+0.233262 0.0382434 -0.193006 0.011994 0.999915 0.00502248
+0.335354 0.225905 0.320513 0 0 1
+0.5 0.0332892 0.0134924 1 0 0
+-0.103535 0.176558 0.353296 -0.475904 0.879497 0
+0.0389429 0.0406934 0.320513 0 0 1
+0.5 -0.0918412 0.153111 1 0 0
+-0.267509 0.108723 -0.333333 0 0 1
+-0.5 -0.105262 -0.20789 1 0 0
+0.19315 -0.00764127 -0.105432 0.972148 0.23412 0.0107491
+0.5 -0.2076 -0.305237 1 0 0
+-0.15903 -0.0227923 -0.333333 0 0 1
+-0.163342 0.161713 -0.333333 0 0 1
+0.213422 -0.371795 -0.231195 0 1 0
+0.203053 0.0265852 0.336401 0.995365 0.0961278 0.00292751
+0.27738 0.208078 -0.333333 0 0 1
+0.225823 0.294872 -0.19639 0 1 0
+-0.5 -0.19742 -0.194818 1 0 0
+-0.5 0.193229 0.107662 1 0 0
+-0.498685 0.371795 -0.117715 -0.485457 0.872057 0.0620288
+0.5 0.0957298 0.200228 1 0 0
+-0.228919 -0.0855122 0.371795 0 0 1
+-0.193748 -0.00163765 -0.0313955 0.496886 -0.034306 0.867137
+0.0453363 0.117281 0.320513 0 0 1
+0.236804 -0.371795 -0.090227 0 1 0
+0.0513466 -0.223115 -0.333333 -0.0182083 -0.0850643 0.996209
+0.114083 -0.294872 -0.338439 0 1 0
+-0.448718 -0.365466 0.129038 0.995923 0.0901992 -0.00101097
+0.197272 -0.0542591 0.354541 0.969401 -0.245483 0
+0.5 0.208815 -0.148679 1 0 0
+0.5 -0.15797 0.203263 1 0 0
+-0.5 -0.278567 0.305827 1 0 0
+0.308759 -0.18096 0.327227 -0.635942 0.737062 -0.228731
+-0.02065 -0.294872 0.259756 0 1 0
+-0.254858 -0.0361438 -0.085632 0.567994 0.822738 -0.0220302
+0.147865 0.294872 -0.350598 0.145122 0.989116 0.0242885
+-0.0637497 -0.194388 0.350368 0.324734 0.945806 0
+0.20095 -0.0242143 -0.121038 0.780088 0.625172 -0.0249427
+-0.253477 -0.0975065 -0.333333 0 0 1
+0.435319 0.294872 0.305291 0 1 0
+0.407009 0.255321 0.320513 0 0 1
+0.21208 -0.318951 -0.371795 0 0 1
+-0.218812 0.314778 -0.371795 0 0 1
+-0.266515 0.317646 -0.371795 0 0 1
+0.470935 0.294872 0.0309526 0 1 0
+0.193163 -0.00768915 -0.181538 0.977362 0.211539 -0.00392278
+-0.5 -0.0485475 0.0197788 1 0 0
+0.5 0.166124 -0.118145 1 0 0
+-0.5 0.118747 0.236314 1 0 0
+0.30723 0.294872 -0.141588 0 1 0
+-0.5 -0.243778 -0.297585 1 0 0
+-0.5 0.347918 -0.19911 1 0 0
+-0.405865 0.371795 -0.0498719 0 1 0
+-0.429569 0.348873 0.320513 0 0 1
+0.449534 -0.294872 -0.0168439 -0.481934 0.874111 -0.0605797
+-0.5 -0.232228 0.0168564 1 0 0
+0.42435 -0.0392564 -0.371795 0 0 1
+-0.320513 -0.0419945 -0.335714 0.833778 -0.146014 -0.532441
+-0.273563 -0.00806852 -0.107081 0.985104 0.171919 -0.00375935
+0.5 0.274164 -0.00874976 1 0 0
+0.47749 -0.294872 -0.0647338 0 1 0
+-0.413134 -0.305426 0.320513 0 0 1
+-0.450756 0.371795 0.257729 0 1 0
+-0.5 -0.0221358 -0.217263 1 0 0
+-0.339086 -0.180725 -0.371795 0 0 1
+-0.357141 0.151671 -0.371795 0 0 1
+0.101866 -0.294872 0.220219 0 1 0
+0.373389 -0.371795 -0.258771 0 1 0
+0.284264 -0.282426 0.320513 0 0 1
+0.5 0.0232943 -0.0855187 1 0 0
+0.283063 0.294872 -0.220533 0 1 0
+0.5 0.111502 0.203127 1 0 0
+0.0315613 -0.294872 -0.153869 0 1 0
+0.429691 0.165367 0.320513 0 0 1
+0.246655 -0.371795 0.0424674 0 1 0
+-0.127052 -0.294872 -0.360315 0.0474729 0.997047 0.0603649
+-0.0697094 -0.278752 -0.371795 0 0 1
+-0.0599722 0.0321176 -0.333333 0 0 1
+-0.5 0.145042 -0.247859 1 0 0
+0.0900961 0.256282 0.339959 0 1 0
+-0.408171 0.371795 -0.362928 0.00201779 0.98891 -0.148502
+0.308365 0.294872 0.129165 0 1 0
+-0.127684 -0.294872 0.069913 0 1 0
+-0.304587 -0.208432 0.320513 0 0 1
+0.5 0.0446857 -0.230531 1 0 0
+0.043605 0.0191771 -0.333333 0 0 1
+-0.498278 0.371795 0.0358087 0.891616 -0.451126 0.0388047
+-0.5 -0.290135 -0.129856 0.949705 0.312635 -0.0178803
+-0.400216 -0.276865 -0.371795 0 0 1
+-0.230383 -0.0107969 -0.0155727 0.0367375 -0.457622 0.888388
+0.260841 -0.0238532 -0.0219359 0.766758 -0.641861 0.0098911
+0.130735 -0.294872 -0.127776 0.0188777 0.999758 0.0113259
+0.134578 0.26115 -0.371795 0 0 1
+0.448718 -0.368437 -0.0650965 0.806129 -0.57672 0.132477
+-0.34007 -0.216229 -0.371795 0 0 1
+0.5 0.218283 -0.0182171 1 0 0
+0.39606 -0.196814 0.320513 0 0 1
+0.141109 -0.328284 -0.122889 1 0 0
+-0.5 0.0448917 0.122433 1 0 0
+0.194834 -0.371795 0.0310352 0 1 0
+0.160294 0.0701789 0.320513 0 0 1
+-0.325762 -0.371795 0.106374 0 1 0
+0.350735 0.199233 -0.371795 0 0 1
+-0.186368 0.1623 -0.333333 0 0 1
+0.5 -0.17816 -0.17628 1 0 0
+-0.340174 0.0275663 0.371795 0 0 1
+-0.5 0.324068 -0.23616 1 0 0
+-0.132608 -0.255967 0.328163 0.0391774 0.993057 -0.11092
+0.448718 -0.304949 0.200497 0.996491 -0.0747534 0.037638
+-0.0583296 0.371795 0.124641 0 1 0
+-0.198606 0.0292474 -0.196849 0.749421 0.662087 -0.00291711
+0.197327 -0.0189445 -0.0971757 0.847821 0.530257 0.00511473
+-0.260533 -0.277788 0.320513 0 0 1
+-0.158446 -0.371795 -0.0248758 0 1 0
+-0.0100711 -0.294872 0.160117 0 1 0
+-0.127355 0.371795 0.281397 0 1 0
+0.486351 -0.294872 0.153706 0 1 0
+0.250546 -0.371795 -0.100782 0 1 0
+0.258582 0.0263731 -0.267451 0.732292 0.680991 0
+0.494055 -0.22644 0.320513 0.43446 0.0665604 0.898228
+-0.0514593 -0.198608 0.371322 -0.0564955 0.767749 0.638255
+-0.418435 -0.0201975 -0.371795 0 0 1
+0.437448 -0.12562 0.320513 0 0 1
+0.251171 -0.371795 -0.257729 0 1 0
+-0.197362 -0.158053 0.371795 0 0 1
+0.0122271 -0.176064 -0.333333 0 0 1
+0.340372 -0.0886555 -0.371795 0 0 1
+-0.5 0.368039 -0.303059 0.915465 -0.401815 0.0216406
+0.101968 0.371795 0.0427567 0 1 0
+-0.377648 0.0559228 0.348843 0.977143 -0.212585 0
+-0.0466746 -0.294872 -0.173476 0 1 0
+0.138678 -0.0389632 -0.333333 0 0 1
+0.17738 0.0742632 -0.333333 0 0 1
+0.5 0.251045 -0.267764 1 0 0
+0.409697 -0.371795 0.229304 0 1 0
+-0.5 -0.037577 -0.358528 1 0 0
+-0.153469 0.135312 0.322703 0.704623 -0.508535 0.494873
+0.107804 -0.154556 -0.333333 0 0 1
+-0.491651 -0.294872 -0.160359 0 1 0
+0.5 0.12545 -0.2363 1 0 0
+0.5 -0.271928 0.100159 1 0 0
+-0.5 -0.156336 -0.103305 1 0 0
+-0.105364 -0.294872 0.307562 0 1 0
+-0.154543 0.128124 -0.333333 0 0 1
+-0.177597 -0.371795 0.141949 0 1 0
+-0.0599363 0.318247 -0.371795 0 0 1
+-0.492937 0.371795 0.195527 -0.224022 0.971187 0.0813046
+0.320513 0.107485 -0.357918 1 0 0
+0.252077 0.294872 -0.113909 0 1 0
+-0.398513 0.371795 0.0386048 0 1 0
+0.412348 -0.371795 -0.0914449 0 1 0
+-0.356455 0.176991 -0.371795 0 0 1
+0.413146 0.244298 0.320513 0 0 1
+-0.313046 0.371795 0.194648 0 1 0
+-0.5 0.327108 -0.0758085 1 0 0
+-0.306602 -0.371795 -0.0120919 0 1 0
+0.298269 -0.371795 0.127599 0 1 0
+-0.5 0.329549 -0.0815597 1 0 0
+0.5 -0.251404 0.253913 1 0 0
+-0.211795 0.0390653 -0.221828 0.433113 0.901329 -0.00434035
+-0.2691 0.371795 0.0809528 0 1 0
+-0.5 -0.264835 -0.265143 1 0 0
+-0.363518 -0.318628 0.320513 0 0 1
+-0.5 0.0547348 -0.154996 1 0 0
+0.374623 0.294872 0.00909272 0 1 0
+-0.5 -0.128103 0.0480947 1 0 0
+-0.0278211 -0.212956 -0.333333 0 0 1
+0.0850972 -0.294872 -0.351285 0 1 0
+0.448718 -0.300731 -0.207604 0.937585 -0.278221 0.208632
+0.340542 -0.142913 0.371388 0.400141 -0.245592 0.882933
+-0.5 -0.265424 -0.35024 1 0 0
+0.277099 -0.193038 0.371795 0 0 1
+-0.5 0.113876 -0.207536 1 0 0
+0.11465 -0.294872 0.0768618 0 1 0
+0.145071 -0.0767907 -0.333333 0 0 1
+0.448718 -0.30936 0.295877 1 0 0
+-0.108282 0.371795 0.164787 0 1 0
+0.5 -0.0942663 0.0409298 1 0 0
+0.081587 0.0650855 0.320513 0 0 1
+-0.192742 0.0212009 -0.145076 0.861234 0.508016 0.0140066
+0.186935 0.267834 0.320513 0 0 1
+-0.5 -0.231597 -0.115548 1 0 0
+-0.454276 0.331032 -0.371795 0 0 1
+0.45251 -0.294872 0.185095 -0.378051 0.925721 -0.0108914
+0.0649729 -0.294872 -0.293989 0 1 0
+-0.425187 0.371795 0.117948 0 1 0
+0.5 0.100829 -0.0208015 1 0 0
+-0.422782 -0.353433 0.320513 0 0 1
+0.205949 -0.243834 0.3629 -0.269244 0.931713 -0.243758
+0.5 0.267425 -0.361668 0.999193 -0.0239222 -0.0322608
+-0.110708 -0.294872 0.0978495 0 1 0
+0.233305 -0.371795 -0.265423 0 1 0
+-0.5 0.353121 0.00146827 1 0 0
+-0.342535 -0.371795 -0.136364 0 1 0
+0.5 0.0151652 0.288323 1 0 0
+0.130527 -0.294872 0.117274 0.0414678 0.999115 -0.00710563
+-0.436465 -0.371795 0.0861107 0 1 0
+0.411839 -0.371795 0.0783301 0 1 0
+0.5 -0.147111 0.075396 1 0 0
+0.270203 0.294872 -0.314439 0 1 0
+0.028724 0.35598 -0.371795 0 0 1
+0.487462 0.294872 0.162565 0 1 0
+-0.5 -0.210162 -0.264001 1 0 0
+-0.0536344 0.371795 -0.0406615 0 1 0
+0.5 -0.196057 0.00515552 1 0 0
+-0.5 -0.251896 0.229449 1 0 0
+-0.202246 -0.0346159 0.338852 0.983598 0.180163 0.00868475
+-0.283665 -0.202944 0.351044 0.599293 0.80053 0
+0.475357 0.284319 0.320513 0.014056 0.0386374 0.999154
+0.231239 0.0808294 -0.333333 0 0 1
+0.298863 0.294872 -0.242677 0 1 0
+0.5 0.0112653 0.109265 1 0 0
+-0.354568 0.371795 -0.154389 0 1 0
+-0.116901 -0.294872 -0.0458421 0 1 0
+-0.5 0.124496 0.24893 1 0 0
+0.312111 -0.371795 0.102235 0 1 0
+-0.187213 0.000386419 -0.288464 0.999953 -0.00940972 -0.00233361
+-0.0352246 0.0360307 0.320513 0 0 1
+0.484888 -0.142273 -0.371795 0 0 1
+0.482721 -0.216831 0.320513 0 0 1
+-0.395999 -0.318033 -0.371795 0 0 1
+-0.434769 0.371795 -0.275538 0 1 0
+0.458979 0.294872 -0.115974 0 1 0
+-0.448718 -0.361248 0.223364 0.997484 0.0663773 0.0249039
+0.412303 -0.371795 -0.0231505 0 1 0
+-0.136559 0.152924 0.355759 -0.65508 0.755447 0.0130345
+0.5 0.15938 0.192203 1 0 0
+-0.141154 -0.3602 0.268156 0.999827 -0.0185549 -0.00144935
+-0.020282 -0.224414 0.371795 0 0 1
+0.0891592 0.371795 0.0399227 0 1 0
+-0.167208 0.371795 0.0539433 0 1 0
+-0.49313 -0.0820136 0.320513 -0.380492 0.209174 0.900818
+-0.177465 0.218283 0.371795 0 0 1
+0.5 0.0401653 0.159718 1 0 0
+-0.5 0.174106 0.196366 1 0 0
+-0.242815 -0.347803 -0.371795 0 0 1
+0.244085 0.197617 -0.333333 0 0 1
+-0.5 0.348891 0.116085 1 0 0
+-0.382271 0.0469841 0.320513 -0.411319 -0.00100134 0.911491
+0.496472 0.294872 0.171219 0.414054 0.886741 0.205547
+0.141109 -0.295733 0.144789 0.816157 0.577539 0.0183596
+0.5 0.27268 -0.144889 1 0 0
+0.382412 0.0290198 0.352501 0.997369 0.0724878 0
+0.202275 0.0345045 0.334864 0.984775 0.173249 0.014249
+0.5 0.276309 -0.214529 1 0 0
+-0.252314 -0.0378663 -0.160966 0.52549 0.85074 -0.0100844
+0.330983 0.294872 -0.017689 0 1 0
+0.5 0.140459 -0.0308663 1 0 0
+0.119284 -0.113684 -0.333333 0 0 1
+0.5 -0.163755 0.26924 1 0 0
+-0.5 0.262245 -0.150246 1 0 0
+-0.166171 -0.371795 -0.245863 0 1 0
+-0.190959 0.017378 -0.15732 0.910148 0.413941 0.0168185
+0.397278 0.294872 -0.0910378 0 1 0
+0.385357 -0.159216 -0.371795 0 0 1
+0.5 -0.0565599 -0.312588 1 0 0
+-0.0435034 -0.12723 0.320513 0 0 1
+0.37525 -0.0784118 0.320513 0.552336 -0.117883 0.825244
+-0.117489 0.296779 0.320513 0 0 1
+0.207972 -0.179785 0.371795 0 0 1
+-0.5 -0.0394884 0.0011543 1 0 0
+0.325853 0.294872 0.155285 0 1 0
+-0.409873 0.100848 -0.371795 0 0 1
+0.469221 0.218356 -0.371795 0 0 1
+-0.262104 0.0300761 -0.0901149 0.718853 -0.695162 0
+-0.0967237 -0.294872 0.270257 0 1 0
+-0.5 -0.179428 -0.0906775 1 0 0
+0.5 -0.160615 0.042811 1 0 0
+0.37929 0.0483752 0.321901 0.766084 0.0954464 0.635614
+-0.5 -0.221164 0.00694138 1 0 0
+-0.227617 0.043314 -0.13701 0.0806432 0.996639 0.0143644
+-0.108008 -0.262888 0.320513 0.118814 -0.311076 0.942929
+-0.5 0.110107 0.219994 1 0 0
+0.209728 -0.371795 0.127255 0 1 0
+-0.435974 -0.218418 0.320513 0 0 1
+0.5 0.200009 -0.352528 1 0 0
+-0.20637 0.188829 0.371795 0 0 1
+-0.357785 -0.0146558 0.371795 0 0 1
+0.253846 0.294872 0.218044 0 1 0
+0.5 -0.135595 0.0577611 1 0 0
+0.177061 0.0255712 0.320513 0 0 1
+0.143717 0.0596072 0.320513 0 0 1
+-0.119227 -0.294872 0.128414 0 1 0
+-0.0529568 0.216144 0.371795 0 0 1
+-0.10991 -0.0416317 0.320513 0 0 1
+0.5 -0.145016 -0.129693 1 0 0
+0.488281 0.15356 -0.371795 0 0 1
+0.00381714 0.242932 -0.371795 -0.00666835 0.0357355 0.999339
+0.374283 0.0713912 0.33646 0.964897 0.262613 0.00299898
+-0.100586 0.0355877 -0.333333 0 0 1
+-0.18356 0.371795 0.253314 0 1 0
+-0.141154 -0.366651 -0.0396272 0.797676 -0.582041 -0.157925
+0.397099 -0.300332 -0.371795 0 0 1
+-0.448718 -0.313708 0.243975 1 0 0
+0.0075327 -0.294872 0.0416946 0 1 0
+0.0354582 0.272315 0.320513 0 0 1
+0.448718 -0.295793 -0.0022012 -0.0544831 0.998368 -0.0171248
+0.5 -0.154348 0.267485 1 0 0
+0.200182 0.294872 0.308272 0 1 0
+-0.261455 0.371795 -0.190971 0 1 0
+0.264893 0.179431 0.371795 0 0 1
+0.448718 -0.306938 0.120516 1 0 0
+0.167678 -0.0925351 -0.333333 0 0 1
+0.5 -0.213569 -0.0355813 1 0 0
+0.448718 -0.359255 -0.351038 1 0 0
+-0.448718 -0.365158 0.29415 0.983709 0.176577 -0.0337081
+-0.141154 -0.346753 -0.0441859 1 0 0
+-0.106617 -0.27561 0.320513 0 0 1
+-0.0841218 -0.294872 -0.223953 0 1 0
+0.5 0.0961439 -0.300357 1 0 0
+0.459607 0.294872 0.207639 0 1 0
+0.141026 0.307786 0.0641765 1 0 0
+0.448718 -0.324452 -0.0768975 1 0 0
+0.415004 0.294872 0.0552136 0 1 0
+-0.360868 -0.371795 -0.335146 0 1 0
+-0.263852 -0.371795 0.130297 0 1 0
+-0.320513 -0.0568515 -0.341608 0.993989 0.0236761 -0.106892
+0.0899131 -0.153902 0.320513 0 0 1
+0.387933 -0.327824 0.320513 0 0 1
+-0.5 0.200897 0.176416 1 0 0
+-0.161319 -0.354633 -0.371795 0 0 1
+-0.5 0.207523 -0.283137 1 0 0
+-0.447869 -0.114881 0.320513 0 0 1
+0.180173 -0.371795 -0.253545 0 1 0
+-0.00389472 0.202417 0.320513 0.275103 -0.610609 0.742614
+0.5 -0.257133 0.161342 1 0 0
+-0.487457 0.371795 -0.025741 0 1 0
+-0.222905 0.337132 -0.371795 0 0 1
+0.141109 -0.341831 -0.263688 1 0 0
+-0.0321052 -0.0710553 -0.333333 0 0 1
+-0.468747 -0.294872 -0.0467246 0 1 0
+-0.133098 -0.0244165 0.320513 0 0 1
+0.141109 -0.324036 -0.206449 1 0 0
+0.0473548 -0.294872 0.0866798 0 1 0
+0.263604 -0.136103 -0.333333 0 0 1
+-0.337737 0.371795 -0.312374 0 1 0
+-0.38141 -0.242993 0.320513 0 0 1
+-0.109288 0.371795 -0.244075 0 1 0
+-0.319566 -0.206187 0.320513 0 0 1
+-0.262463 0.322352 0.320513 0 0 1
+0.250788 -0.347115 -0.371795 0 0 1
+-0.490014 0.347786 -0.371795 0 0 1
+0.448718 -0.321437 -0.0403437 1 0 0
+-0.102366 -0.256282 0.363241 0.00488764 0.999713 -0.0234635
+-0.186666 0.371795 -0.0811171 0 1 0
+-0.138255 -0.294872 0.233501 -0.399635 0.896414 0.191662
+0.0235301 0.192697 0.320513 -0.00379599 -0.0200484 0.999792
+0.177932 0.15518 0.371795 0 0 1
+-0.5 0.321024 0.222918 1 0 0
+0.0171828 -0.215358 0.371795 0 0 1
+-0.119053 0.0114912 0.320513 0 0 1
+-0.149585 -0.0210889 -0.333333 0 0 1
+0.5 -0.0673079 0.0972949 1 0 0
+-0.370317 -0.0823605 0.363103 0.93252 0.348841 -0.0933613
+0.164788 0.294872 0.140994 0 1 0
+0.249866 0.294872 -0.0927801 0 1 0
+-0.5 0.00588729 0.13244 1 0 0
+-0.188111 -0.00857224 -0.228411 0.959339 -0.282195 0.00579245
+-0.363963 0.060354 0.371795 0 0 1
+-0.416246 -0.371795 -0.252851 0 1 0
+-0.0391767 -0.294872 0.00078443 0 1 0
+0.404899 -0.371795 0.142963 0 1 0
+-0.141154 -0.318278 -0.0984356 1 0 0
+-0.5 0.0410693 0.221354 1 0 0
+-0.0390335 -0.142547 0.320513 0 0 1
+-0.18979 0.0148399 -0.0962719 0.956379 0.2921 -0.00417497
+-0.5 0.330287 0.0354713 1 0 0
+-0.483395 0.296148 0.320513 0 0 1
+0.148848 0.294872 -0.21987 0.203813 0.975337 -0.084723
+-0.376589 0.219406 -0.371795 0 0 1
+0.120371 0.21311 -0.333333 0 0 1
+-0.46974 0.371795 -0.342763 0 1 0
+0.201544 0.113926 -0.333333 0 0 1
+0.25761 0.294872 0.0131461 0 1 0
+-0.386638 -0.371795 0.217163 0 1 0
+-0.5 -0.188211 -0.210962 1 0 0
+0.5 -0.272742 0.0421558 1 0 0
+0.213692 0.034313 -0.288947 -0.387303 0.921951 -0.00161942
+-0.31597 -0.371795 -0.346828 0 1 0
+0.0524158 -0.129459 0.320513 0 0 1
+-0.301099 0.1206 0.371795 0 0 1
+0.5 -0.139077 0.136841 1 0 0
+0.182658 0.294872 -0.286963 0 1 0
+-0.033949 -0.182431 0.320513 0 0 1
+0.5 0.0370971 -0.0410246 1 0 0
+-0.0575542 0.371795 -0.048347 0 1 0
+0.5 -0.0664836 -0.143269 1 0 0
+0.264653 0.294872 0.0972151 0 1 0
+0.149555 0.294872 -0.319165 0.0511695 0.998474 0.020786
+0.242135 -0.371795 0.0288227 0 1 0
+-0.470226 0.371795 -0.138364 0 1 0
+-0.0951611 -0.256874 -0.371795 0 0 1
+0.00217434 0.371795 -0.0322025 0 1 0
+0.141109 -0.34576 -0.355134 1 0 0
+0.392633 0.156971 0.320513 0 0 1
+-0.102347 -0.180175 -0.333333 0 0 1
+-0.376685 0.00874414 0.371795 -0.209727 0.0110859 0.977697
+-0.413619 0.0785835 0.320513 0 0 1
+-0.426893 -0.371795 0.0491429 0 1 0
+-0.5 0.256572 -0.207057 1 0 0
+0.326807 -0.297601 -0.371795 0 0 1
+-0.5 -0.139761 0.277355 1 0 0
+0.427387 -0.371795 -0.354798 0 1 0
+-0.5 0.340741 0.107359 1 0 0
+-0.5 -0.285947 -0.0379712 1 0 0
+-0.120592 -0.294872 -0.346351 0 1 0
+-0.101087 -0.294872 0.0630081 0 1 0
+-0.257295 -0.339184 0.320513 0 0 1
+-0.187961 0.300046 0.320513 0 0 1
+0.454959 -0.294872 -0.14277 -0.298965 0.952586 0.0565723
+0.178426 -0.371795 -0.138539 0 1 0
+0.166811 -0.371795 -0.162602 0 1 0
+0.28113 -0.371795 -0.272376 0 1 0
+-0.324067 -0.371795 -0.279844 0 1 0
+0.0959632 -0.294872 -0.150345 0 1 0
+-0.252137 -0.371795 0.318843 0.0800577 -0.667905 0.739928
+-0.0618685 0.371795 -0.0893252 0 1 0
+0.318075 0.256202 0.320513 0 0 1
+-0.5 0.27897 -0.108157 1 0 0
+0.155459 -0.0134576 -0.333333 0 0 1
+0.165402 -0.371795 0.076466 0 1 0
+-0.297978 -0.212333 0.320513 0 0 1
+-0.0287663 0.0232874 -0.333333 0 0 1
+0.212348 -0.0336864 -0.021867 0.505208 0.862479 0.0299233
+0.141109 -0.327435 -0.0642118 1 0 0
+0.31413 -0.371795 -0.227066 0 1 0
+-0.290467 -0.108936 0.371795 0 0 1
+0.141026 0.315716 -0.275193 1 0 0
+-0.5 0.266853 -0.0842426 1 0 0
+0.5 0.0889775 -0.177504 1 0 0
+-0.249059 -0.0393844 -0.199622 0.451826 0.891028 -0.0438379
+-0.289925 0.178354 0.371795 0 0 1
+-0.5 -0.1031 -0.00477996 1 0 0
+-0.412487 -0.371795 0.312749 -0.00693034 0.995936 -0.0897929
+-0.314172 0.371795 0.114284 0 1 0
+-0.205996 -0.0897072 -0.333333 0 0 1
+0.231138 -0.0384292 -0.247859 0.0390493 0.999205 -0.00804883
+-0.216724 0.0411921 -0.0923217 0.3416 0.939815 -0.00751054
+-0.5 0.337372 -0.367036 0.945803 -0.13779 0.294058
+0.234188 -0.371795 -0.348749 0 1 0
+0.299456 0.0464984 0.371795 0 0 1
+0.441018 -0.255975 0.320513 0 0 1
+0.5 -0.0287806 -0.125288 1 0 0
+0.19116 0.294872 -0.209906 0 1 0
+0.5 -0.141924 0.159093 1 0 0
+-0.317227 0.070913 -0.333333 -0.240622 -0.10334 0.965102
+0.5 0.172816 -0.0945732 1 0 0
+-0.191755 0.0190831 -0.0703631 0.910843 0.412667 0.0083982
+0.153248 -0.371795 0.121676 0 1 0
+-0.148386 -0.0685389 -0.333333 0 0 1
+0.0911022 -0.294872 0.25855 0 1 0
+0.102541 0.371795 0.191027 0 1 0
+0.24109 0.281663 0.320513 0 0 1
+0.0858967 -0.294872 0.310022 0.017821 0.997776 -0.0642286
+0.113366 -0.070539 0.320513 0 0 1
+0.455032 0.0575313 -0.371795 0 0 1
+-0.117559 0.371795 0.091668 0 1 0
+0.254665 -0.222203 0.340539 -0.479267 0.877669 0
+0.265661 -0.015836 -0.160718 0.915905 -0.401323 0.00756718
+-0.149098 0.371795 0.286194 0 1 0
+0.213023 -0.0340012 -0.0868812 0.480222 0.877089 0.0100767
+-0.376194 0.371795 0.0591712 0 1 0
+0.375869 0.0640997 0.330847 0.976345 0.21388 0.0317044
+-0.127361 0.353596 0.320513 0 0 1
+-0.297483 0.225673 -0.371795 0 0 1
+0.0989799 0.179023 0.371056 0.496458 0.732035 -0.466535
+-0.410042 0.371795 0.122708 0 1 0
+0.40115 -0.107076 0.320513 0 0 1
+-0.00683882 0.0704907 -0.333333 0 0 1
+-0.0290864 0.256282 0.339747 0 1 0
+0.211828 0.0334439 -0.183452 -0.502878 0.864185 0.0172626
+-0.204787 -0.00565975 0.329475 0.973213 0.0634118 0.220985
+0.163037 -0.371795 -0.118817 0 1 0
+0.185333 0.294872 0.289403 0 1 0
+-0.134308 -0.0554506 -0.333333 0 0 1
+-0.21183 -0.356941 0.320513 0 0 1
+-0.5 -0.00246295 -0.238472 1 0 0
+0.5 -0.144076 -0.198443 1 0 0
+0.140056 0.051242 -0.333333 0 0 1
+-0.5 -0.177941 -0.352339 1 0 0
+-0.0236291 -0.27093 -0.371795 0 0 1
+0.191033 0.294872 0.304175 0 1 0
+-0.334965 -0.0941838 -0.371795 0 0 1
+0.429513 -0.127404 -0.371795 0 0 1
+-0.149997 -0.139083 0.362294 0.73951 0.670569 0.0588364
+0.129502 -0.158418 0.368825 -0.44791 0.656978 0.606429
+0.0950255 -0.0288933 -0.333333 0 0 1
+0.475282 0.0482176 -0.371795 0 0 1
+0.259655 -0.15007 -0.333333 0 0 1
+0.297904 0.294872 -0.214747 0 1 0
+-0.202099 0.371795 -0.336012 0 1 0
+0.479436 -0.208216 -0.371795 0 0 1
+0.323904 0.294872 -0.289299 0 1 0
+-0.419308 0.371795 0.160625 0 1 0
+-0.339026 0.00526234 0.371795 0 0 1
+0.202158 0.151027 -0.333333 0 0 1
+0.231106 -0.22212 -0.333333 0.0629917 -0.166391 0.984046
+0.291415 -0.214035 -0.349811 -0.609471 0.792648 0.015902
+0.316749 -0.371795 0.23101 0 1 0
+0.249406 -0.311659 0.320513 0 0 1
+-0.3921 0.343316 0.320513 0 0 1
+-0.0557093 -0.294872 -0.266083 0 1 0
+0.5 -0.0310555 -0.0386999 1 0 0
+0.5 0.177305 0.23334 1 0 0
+0.5 -0.0904966 -0.330586 1 0 0
+-0.5 0.122765 -0.339204 1 0 0
+-0.462696 0.371795 0.253299 0 1 0
+0.249719 -0.00437699 0.371795 0 0 1
+-0.278106 0.371795 0.108432 0 1 0
+0.453234 -0.0665218 0.320513 0 0 1
+0.382376 -0.371795 0.209025 0 1 0
+0.31425 0.149698 0.371795 0 0 1
+-0.145237 -0.225556 0.371795 0 0 1
+0.0476358 0.371795 0.204386 0 1 0
+-0.5 0.368744 -0.34994 0.896945 -0.442041 -0.00947389
+-0.452347 0.149255 -0.371795 0 0 1
+0.254692 -0.371795 0.0466772 0 1 0
+-0.0256004 -0.294872 -0.0759518 0 1 0
+0.5 -0.222679 0.190116 1 0 0
+0.158608 0.217087 -0.333333 0 0 1
+-0.494074 0.114004 0.320513 -0.181611 -0.0655283 0.981185
+0.240122 0.230144 0.335926 0.472952 0.881082 -0.00315827
+-0.452227 0.239056 -0.371795 0 0 1
+-0.32026 0.363778 0.320513 -0.034715 0.132446 0.990582
+-0.209795 -0.371795 -0.111877 0 1 0
+0.365365 0.294872 0.0592078 0 1 0
+0.438247 0.272261 0.320513 0 0 1
+0.5 0.00904341 -0.186593 1 0 0
+0.21079 0.294872 0.130377 0 1 0
+0.141026 0.347763 0.0730199 1 0 0
+0.493496 0.294872 -0.22193 0.194029 0.980501 -0.0311601
+0.135056 0.0230508 -0.333333 0 0 1
+0.256415 0.0894879 0.371795 0 0 1
+0.227236 -0.371795 0.195243 0 1 0
+-0.267429 -0.371795 0.288636 0 1 0
+-0.154801 0.240669 -0.371795 -0.00167088 0.0544554 0.998515
+0.453353 0.0952551 0.320513 0 0 1
+-0.0706172 -0.280897 0.320513 0 0 1
+-0.5 -0.165923 0.0998049 1 0 0
+-0.150813 0.265261 -0.371795 0 0 1
+-0.5 -0.274681 0.221968 1 0 0
+0.48521 -0.294872 -0.368873 0.022142 0.833876 0.551507
+0.5 0.198427 0.306643 1 0 0
+0.410968 -0.154134 -0.371795 0 0 1
+-0.5 -0.0626791 0.0225221 1 0 0
+-0.5 0.148746 0.0307556 1 0 0
+-0.167636 0.371795 -0.219157 0 1 0
+0.0378477 0.0627313 -0.333333 0 0 1
+-0.5 0.24969 -0.0626104 1 0 0
+-0.313196 -0.371795 -0.173042 0 1 0
+-0.278601 -0.237691 -0.371795 0 0 1
+-0.0221445 -0.294872 -0.00887367 0 1 0
+0.320513 0.129677 -0.337578 0.93519 0.0604691 0.348946
+0.5 -0.130663 0.298116 1 0 0
+-0.5 -0.0990719 0.193421 1 0 0
+-0.0394986 -0.200793 0.363215 0.191568 0.979078 0.0686144
+0.462283 -0.294872 -0.064424 0 1 0
+0.0677958 0.199804 0.371795 -0.163426 -0.25145 0.953973
+-0.305545 -0.199093 -0.36703 0.832859 0.481481 -0.272986
+0.455926 -0.217432 -0.371795 0 0 1
+-0.382568 0.371795 -0.237996 0 1 0
+-0.5 0.0711317 -0.347396 1 0 0
+-0.141154 -0.313642 0.197473 1 0 0
+-0.173262 -0.337471 -0.371795 0 0 1
+0.132839 -0.200719 -0.333333 0 0 1
+-0.205222 0.000408978 0.349963 0.999583 0.0271451 -0.00987762
+-0.369528 0.286505 0.320513 0 0 1
+-0.453202 0.371795 -0.131604 0 1 0
+-0.5 -0.0159123 0.129541 1 0 0
+0.111072 -0.249873 -0.371795 0 0 1
+-0.00774993 0.371795 -0.313278 0 1 0
+-0.222499 -0.371795 0.281593 0 1 0
+-0.018795 0.371795 -0.144386 0 1 0
+-0.5 -0.0897541 -0.198345 1 0 0
+0.33397 0.0967146 0.371795 0 0 1
+0.19072 -0.371795 -0.0195009 0 1 0
+-0.293027 -0.204047 -0.333333 -0.177461 -0.279793 0.943517
+0.0565929 0.256282 0.347263 0 1 0
+0.0151985 -0.294872 -0.234842 0 1 0
+-0.5 -0.0593377 0.0625412 1 0 0
+-0.200496 0.0311377 -0.2221 0.671858 0.740488 -0.0168497
+0.0956502 0.371795 -0.330048 0 1 0
+0.5 0.0102232 0.268125 1 0 0
+0.451234 0.144627 0.320513 0 0 1
+-0.141412 -0.194604 -0.333333 0 0 1
+-0.5 0.349826 0.135485 1 0 0
+-0.5 0.207484 -0.00012436 1 0 0
+0.300658 -0.0919124 0.371795 0 0 1
+0.252072 -0.371795 0.243719 0 1 0
+-0.456547 0.371795 -0.173386 0 1 0
+0.453012 0.134029 0.320513 0 0 1
+0.483968 -0.294872 0.250663 0 1 0
+-0.474549 0.371795 -0.0951699 0 1 0
+-0.378093 0.0538763 0.327237 0.960835 -0.218004 -0.171088
+-0.237042 -0.144624 -0.333333 0 0 1
+-0.105848 -0.294872 0.0291382 0 1 0
+-0.429523 0.371795 -0.1445 0 1 0
+0.463843 0.294872 -0.345633 0 1 0
+0.314941 0.294872 -0.20054 0 1 0
+0.224418 0.294872 -0.269113 0 1 0
+-0.468116 -0.26958 0.320513 0 0 1
+-0.288679 0.371795 0.304747 0 1 0
+0.337995 0.0714883 0.371795 0 0 1
+-0.187313 0.00152695 -0.258665 0.999466 0.0272943 0.0179848
+0.129089 0.371795 -0.305181 0 1 0
+0.284731 0.294872 0.22925 0 1 0
+-0.212966 -0.371795 -0.30987 0 1 0
+0.0349815 0.334653 0.320513 0 0 1
+0.323023 -0.166315 0.370919 0.367945 -0.183996 0.911461
+-0.442222 0.212748 0.320513 0 0 1
+-0.5 -0.117721 0.0707069 1 0 0
+-0.476185 -0.294872 0.0908019 0 1 0
+0.295278 0.294872 0.182074 0 1 0
+-0.215426 -0.0407583 -0.267076 -0.349201 0.937007 -0.00874002
+0.174112 -0.272633 -0.371795 0 0 1
+-0.263871 0.0283094 -0.260118 0.761774 -0.647669 0.0149782
+-0.0711084 -0.230897 -0.355839 0 1 0
+0.205043 -0.0284596 -0.0714916 0.638926 0.769129 0.014625
+-0.310452 -0.371795 0.292474 0 1 0
+-0.5 -0.14712 -0.115496 1 0 0
+0.45735 0.294872 0.0193929 0 1 0
+0.144453 -0.371795 -0.066358 0.428374 0.892189 -0.143159
+0.038878 0.0522207 0.320513 0 0 1
+-0.428853 -0.0396896 0.320513 0 0 1
+-0.5 -0.0662085 -0.198441 1 0 0
+-0.5 0.354269 0.0748187 1 0 0
+0.261888 0.242023 0.320513 0 0 1
+-0.465238 -0.0771424 0.320513 0 0 1
+0.0268542 -0.195199 0.320513 -0.11253 0.251952 0.961175
+0.187156 0.0496849 -0.333333 0 0 1
+0.443686 -0.371795 0.202827 -0.229892 0.956829 0.177844
+0.317334 -0.0586852 -0.333333 0.323859 -0.0661156 0.943792
+-0.328905 -0.289241 0.320513 0 0 1
+-0.00657082 -0.294872 -0.136746 0 1 0
+0.370893 -0.296031 0.320513 0 0 1
+-0.278073 -0.276159 -0.371795 0 0 1
+0.334582 0.294872 -0.18359 0 1 0
+0.0505509 -0.00265615 0.320513 0 0 1
+0.318079 -0.371795 0.173478 0 1 0
+0.141026 0.360253 -0.1082 1 0 0
+0.364233 -0.371795 -0.193089 0 1 0
+0.5 0.0368812 -0.277347 1 0 0
+0.0878563 -0.294872 -0.315902 0 1 0
+0.476125 -0.0458967 0.320513 0 0 1
+0.5 -0.290366 -0.167564 0.837504 -0.545625 0.0296814
+0.5 0.146514 0.184342 1 0 0
+0.222304 -0.0373985 -0.225521 0.21262 0.977123 -0.00489829
+-0.240292 -0.154303 0.371795 0 0 1
+-0.5 -0.12862 -0.0996723 1 0 0
+-0.122369 -0.294872 0.0105358 0 1 0
+0.388799 -0.105318 0.320513 0 0 1
+-0.317551 0.347497 -0.371795 0 0 1
+-0.5 0.256749 -0.193798 1 0 0
+-0.223658 -0.202767 -0.333333 0 0 1
+0.5 0.0319812 -0.0310785 1 0 0
+-0.22221 -0.171786 0.371795 0 0 1
+-0.381105 0.371795 -0.0272847 0 1 0
+0.333979 -0.371795 0.148218 0 1 0
+0.364244 -0.0986434 0.355398 0.932909 -0.360057 0.00638869
+0.5 -0.0300969 -0.241842 1 0 0
+-0.200896 0.371795 0.155888 0 1 0
+0.5 -0.168193 0.116943 1 0 0
+0.5 0.0645625 -0.0650598 1 0 0
+-0.5 0.262315 -0.114765 1 0 0
+0.5 -0.17639 0.316364 0.950176 0.0359099 0.309638
+0.141109 -0.363631 -0.296311 0.9932 0.105392 0.0494691
+-0.269875 0.272177 0.320513 0 0 1
+-0.5 -0.0284273 0.0958451 1 0 0
+0.5 0.182117 0.217772 1 0 0
+0.118332 0.320309 0.320513 0 0 1
+-0.435823 -0.371795 -0.361853 0.00871076 0.999551 0.0286523
+0.237311 0.0378892 -0.299727 0.185523 0.982594 -0.00946422
+-0.237476 -0.043003 -0.142596 0.209706 0.977734 -0.00776601
+-0.448285 0.371795 -0.213964 0 1 0
+0.141026 0.344251 0.0590526 1 0 0
+0.268286 0.0080229 -0.193958 0.977194 0.212238 -0.0067838
+0.363588 -0.33406 -0.371795 0 0 1
+0.187828 0.294872 0.312512 0.00658527 0.997225 0.0741602
+-0.434228 -0.371795 -0.10514 0 1 0
+-0.141154 -0.310404 -0.0606489 1 0 0
+-0.212031 -0.371795 0.26079 0 1 0
+0.5 -0.271582 -0.11548 1 0 0
+0.14948 0.230897 -0.368533 -0.221301 0.822841 0.52341
+-0.338843 -0.0475539 0.371795 0 0 1
+-0.0778214 -0.294872 0.175025 0 1 0
+0.271158 0.0138548 0.371795 0 0 1
+-0.304081 0.332544 -0.371795 0 0 1
+0.31094 -0.0274997 -0.333333 0.100651 0.00406147 0.994914
+-0.0768802 0.371795 0.0533927 0 1 0
+-0.376999 0.371338 0.320513 -0.00394198 0.449792 0.893125
+-0.5 0.0972172 -0.227717 1 0 0
+-0.397131 -0.370774 -0.371795 -0.0229608 0.531842 0.846532
+0.5 -0.218091 0.179199 1 0 0
+0.0481526 0.371795 -0.0788824 0 1 0
+-0.141154 -0.335603 -0.32862 1 0 0
+-0.421762 0.371795 0.00281614 0 1 0
+0.0667412 -0.294872 -0.172996 0 1 0
+0.121279 0.371795 0.0493096 0 1 0
+-0.5 0.0478579 -0.139059 1 0 0
+-0.252228 0.0539178 -0.333333 0 0 1
+0.197013 -0.371795 0.233231 0 1 0
+-0.223452 0.371795 0.171945 0 1 0
+-0.466808 -0.259335 0.320513 0 0 1
+-0.0985855 0.371795 -0.315745 0 1 0
+-0.344397 -0.077095 -0.371795 0 0 1
+0.345693 0.0149722 -0.371795 0 0 1
+0.417951 0.0816099 -0.371795 0 0 1
+-0.180338 -0.356222 -0.371795 0 0 1
+-0.448718 -0.357364 0.0559606 1 0 0
+0.469643 -0.294872 0.232756 0 1 0
+0.5 0.0800745 0.107798 1 0 0
+-0.00579873 0.371795 -0.357399 0 1 0
+0.438189 -0.36087 0.320513 0.0160334 0.00812962 0.999838
+-0.5 0.0225118 0.307372 1 0 0
+-0.5 -0.189443 0.0576857 1 0 0
+-0.0867526 -0.10618 0.320513 0 0 1
+0.146253 -0.173843 -0.333333 0 0 1
+0.481427 -0.248658 -0.371795 0 0 1
+0.0243617 -0.294872 0.153244 0 1 0
+0.36221 -0.371795 -0.0520138 0 1 0
+-0.0892975 0.0358923 0.320513 0 0 1
+0.0662811 -0.294872 -0.330462 0 1 0
+-0.5 0.174147 0.106342 1 0 0
+0.388506 -0.0231483 -0.371795 0 0 1
+-0.374141 -0.0720444 0.327927 0.900576 0.389403 -0.193208
+0.00590019 0.231996 0.371795 0 0 1
+-0.427678 -0.371795 -0.00883505 0 1 0
+0.328759 0.294872 0.280653 0 1 0
+-0.201636 0.0370245 0.363224 0.976364 -0.0413337 0.212144
+0.396311 0.294872 0.311061 0.0255006 0.995061 0.0959386
+-0.472145 0.371795 0.231527 0 1 0
+0.5 -0.148907 -0.0473558 1 0 0
+-0.182355 0.371795 0.161996 0 1 0
+0.339296 0.294872 -0.0972136 0 1 0
+0.112138 -0.171903 0.364072 -0.558127 0.828555 0.0446288
+-0.305454 0.371795 0.107307 0 1 0
+-0.203733 -0.326492 0.320513 0 0 1
+0.39549 0.294872 0.00628877 0 1 0
+-0.0209186 0.371795 -0.0127874 0 1 0
+0.209536 0.0319068 -0.0243946 -0.533722 0.845245 0.0265059
+0.5 -0.160512 0.0717219 1 0 0
+-0.5 -0.141284 0.0664911 1 0 0
+-0.239207 -0.0426948 -0.0451195 0.177317 0.984143 -0.00456465
+-0.361111 0.289063 -0.371795 0 0 1
+-0.5 0.0925032 -0.248565 1 0 0
+-0.5 -0.140477 0.267064 1 0 0
+-0.00980487 -0.204555 0.370892 0.057279 0.634158 0.771079
+-0.341305 0.141894 0.322913 0.661674 -0.559797 -0.498814
+-0.0712857 -0.0953482 0.320513 0 0 1
+-0.212974 -0.292546 0.320513 0 0 1
+-0.141154 -0.323729 0.0875188 1 0 0
+-0.127806 0.371795 -0.145339 0 1 0
+0.421902 -0.144022 0.320513 0 0 1
+0.5 0.128775 0.313317 0.990008 0.0214895 0.139361
+-0.12193 0.287327 -0.371795 0 0 1
+-0.0920078 -0.294872 0.0764124 0 1 0
+0.0115221 -0.122373 0.320513 0 0 1
+-0.312943 -0.371795 0.240052 0 1 0
+-0.479788 0.371795 0.237591 0 1 0
+-0.5 -0.24038 0.310746 1 0 0
+0.5 -0.259467 0.148847 1 0 0
+0.371734 -0.371795 0.212841 0 1 0
+0.5 0.232546 0.151092 1 0 0
+-0.18783 -0.0810217 0.349101 0.915784 0.401671 0
+0.314841 0.280056 -0.371795 0 0 1
+0.44562 0.177479 -0.371795 0 0 1
+0.247692 -0.371795 0.308072 0 1 0
+-0.0576739 -0.294872 0.17281 0 1 0
+0.275011 0.176071 0.371795 0 0 1
+0.300247 0.100846 -0.333333 0 0 1
+0.165117 0.121264 0.332327 0.831509 0.555511 0
+0.21524 -0.353537 -0.371795 0 0 1
+0.15757 0.254181 0.338703 0.0746278 0.99721 -0.00153863
+0.159258 -0.371795 -0.210408 0 1 0
+-0.286927 -0.371795 0.220529 0 1 0
+-0.364814 0.100444 -0.371795 0 0 1
+0.451633 0.294872 0.201901 0 1 0
+-0.5 0.2163 -0.261958 1 0 0
+-0.379064 0.371795 -0.0381567 0 1 0
+-0.5 0.0825471 -0.334408 1 0 0
+0.179245 -0.371795 -0.0773502 0 1 0
+0.0269332 0.371795 -0.0805786 0 1 0
+-0.0304341 -0.256282 0.342303 0 1 0
+0.0461271 0.0545064 -0.333333 0 0 1
+0.325921 -0.246502 -0.371795 0 0 1
+-0.336657 0.371795 -0.345769 0 1 0
+0.414562 -0.371795 0.0175742 0 1 0
+0.5 0.187586 0.00780452 1 0 0
+-0.15863 0.371795 -0.000604666 0 1 0
+0.291023 -0.122491 -0.333333 0 0 1
+0.448718 -0.31436 0.00566411 1 0 0
+-0.223807 0.371795 -0.270944 0 1 0
+-0.5 0.0732872 0.12578 1 0 0
+0.5 0.0308987 -0.0587065 1 0 0
+0.174004 -0.172944 -0.333333 0 0 1
+0.448718 -0.353938 -0.354022 1 0 0
+-0.00605912 -0.294872 0.175105 0 1 0
+-0.176235 -0.242832 0.371795 -0.0576123 -0.0684269 0.995991
+-0.363736 -0.199529 0.320513 0 0 1
+-0.156243 -0.371795 -0.233512 0 1 0
+-0.417209 -0.371795 0.289637 0 1 0
+0.5 0.228658 0.306902 1 0 0
+0.407965 0.212423 0.320513 0 0 1
+0.137394 -0.230897 -0.366636 0.0280446 0.948934 -0.314225
+-0.286398 -0.371795 -0.305508 0 1 0
+0.450652 0.194188 -0.371795 0 0 1
+-0.5 0.0654614 -0.0590187 1 0 0
+0.0513803 -0.16387 0.320513 0 0 1
+-0.143837 -0.371795 0.288781 -0.485744 0.872061 0.0596868
+0.5 0.094848 0.222281 1 0 0
+-0.0590993 0.275752 -0.371795 0 0 1
+-0.197652 -0.246501 0.367464 0.231148 0.92706 -0.295179
+0.0698994 0.371795 -0.268678 0 1 0
+-0.472587 0.158819 0.320513 0 0 1
+0.141109 -0.299778 -0.106253 0.762271 0.641801 0.0838727
+0.108415 0.0809565 0.320513 0 0 1
+0.291093 -0.187368 -0.333333 0 0 1
+0.5 -0.151816 0.0638223 1 0 0
+-0.5 -0.211931 -0.264684 1 0 0
+0.230541 0.240127 0.320513 0.190583 0.344825 0.919116
+-0.0768758 -0.256282 0.342257 0 1 0
+-0.5 0.0611187 0.102457 1 0 0
+-0.32489 0.163821 0.366913 -0.70462 0.519754 0.48308
+0.260342 0.173155 0.371795 0 0 1
+-0.488192 0.331151 -0.371795 0.0794262 0.0187473 0.996664
+-0.319852 0.371795 -0.13649 0 1 0
+-0.0653581 0.371795 -0.247689 0 1 0
+0.35513 -0.371795 0.31654 -0.0151401 0.947557 -0.319228
+-0.5 -0.112271 -0.17156 1 0 0
+0.141109 -0.344494 0.313382 0.982228 -0.0337179 -0.184636
+0.5 -0.124147 -0.221401 1 0 0
+-0.477657 0.371795 -0.3204 0 1 0
+0.139306 0.152891 0.371795 -0.387588 -0.478017 0.78821
+0.440387 -0.206356 -0.371795 0 0 1
+-0.5 0.0569705 0.151387 1 0 0
+0.414997 -0.275442 -0.371795 0 0 1
+0.479626 -0.113757 0.320513 0 0 1
+-0.5 0.0968062 0.225339 1 0 0
+-0.268445 -0.214338 0.330536 0.529611 0.841802 -0.10431
+0.276254 -0.371795 -0.0155972 0 1 0
+-0.200352 0.229068 0.371795 0 0 1
+0.5 0.208568 0.0240232 1 0 0
+0.0237351 0.183348 0.320513 0 0 1
+-0.0902842 -0.294872 -0.189807 0 1 0
+0.332098 -0.0982918 0.371795 0 0 1
+-0.423236 -0.371795 -0.169396 0 1 0
+-0.5 0.0260678 -0.321914 1 0 0
+-0.27377 -0.210352 0.347882 0.599287 0.800534 0
+0.0983954 0.0581691 0.320513 0 0 1
+-0.5 0.0353345 -0.0311893 1 0 0
+0.141026 0.350419 -0.231827 1 0 0
+0.490273 0.294872 -0.0503327 0 1 0
+0.0661708 0.371795 -0.17972 0 1 0
+-0.5 0.0243658 0.263878 1 0 0
+0.045185 -0.230897 -0.342993 0 1 0
+-0.391988 -0.371795 -0.0535017 0 1 0
+-0.190236 -0.371795 0.241097 0 1 0
+-0.498197 0.371795 0.247698 -0.494363 0.863465 -0.100167
+-0.110293 0.0849264 0.320513 0 0 1
+-0.5 0.110636 0.000640313 1 0 0
+-0.267655 -0.371795 -0.0129375 0 1 0
+-0.0769772 0.371795 0.315138 0.0253291 0.995993 0.0857638
+0.173681 0.294872 -0.162467 0 1 0
+0.400513 0.294872 -0.0639167 0 1 0
+-0.309054 0.36011 0.320513 0 0 1
+0.107961 -0.235445 -0.371795 0.018062 -0.292617 0.956059
+0.5 -0.287093 0.119126 0.987391 -0.156446 0.0241655
+0.096873 -0.256282 0.330866 0.0103259 0.996848 -0.0786656
+0.5 0.0304758 -0.100018 1 0 0
+0.406584 0.111025 0.320513 0 0 1
+0.5 -0.234563 -0.329313 1 0 0
+-0.478418 0.307019 -0.371795 0 0 1
+-0.229284 -0.230157 -0.333333 -0.144298 -0.622068 0.769551
+0.228545 -0.371795 0.266122 0 1 0
+0.249035 0.0337585 -0.0813557 0.516107 0.855941 0.0316053
+-0.463723 -0.294872 -0.0898608 0 1 0
+-0.409509 -0.111854 0.320513 0 0 1
+-0.5 0.0659937 0.039446 1 0 0
+0.255922 -0.229303 0.320513 0.0966645 -0.13006 0.986783
+-0.448718 -0.325552 0.279354 1 0 0
+-0.398833 0.0963543 -0.371795 0 0 1
+0.465923 0.161354 0.320513 0 0 1
+0.5 0.221304 0.259303 1 0 0
+-0.089435 -0.294872 -0.0762391 0 1 0
+-0.5 0.334947 0.315789 0.922844 0.0792369 -0.376936
+-0.5 -0.0450219 -0.175298 1 0 0
+0.23196 -0.124123 0.371795 0 0 1
+-0.5 0.0717866 0.242092 1 0 0
+-0.5 -0.153365 -0.237671 1 0 0
+-0.320513 -0.149905 -0.356618 0.999889 0.0144672 -0.00353575
+-0.104456 -0.216857 -0.333333 0 0 1
+0.130553 -0.131914 -0.333333 0 0 1
+0.10388 -0.294872 -0.187481 0 1 0
+-0.130605 -0.071602 -0.333333 0 0 1
+0.348316 -0.371795 -0.0926332 0 1 0
+-0.448718 -0.346623 -0.316809 1 0 0
+-0.456434 -0.294872 -0.0273513 0.184206 0.981599 -0.0503218
+0.195506 -0.0150398 -0.141362 0.912707 0.408575 0.00573797
+-0.043855 0.256282 0.345834 0 1 0
+-0.0927029 -0.294872 -0.054156 0 1 0
+-0.28035 0.0660593 -0.333333 0 0 1
+-0.462484 0.371795 0.0649679 0 1 0
+0.28222 0.204026 0.346549 0.599251 0.800561 0
+0.33159 -0.269344 0.320513 0 0 1
+-0.0436343 -0.0583329 0.320513 0 0 1
+-0.249116 0.0393579 -0.289923 -0.424132 0.905258 0.0248936
+0.5 0.129235 -0.262272 1 0 0
+-0.347729 -0.258713 -0.371795 0 0 1
+-0.201504 0.110455 0.371795 0 0 1
+-0.289751 -0.198389 0.322249 0.607659 0.71256 -0.350728
+0.392779 0.294872 -0.300872 0 1 0
+0.192669 0.00412702 -0.0149673 0.989595 -0.138894 0.0375421
+0.22325 -0.155343 -0.333333 0 0 1
+0.130526 -0.294872 -0.312623 0 1 0
+0.303531 0.294872 0.119097 0 1 0
+-0.126584 0.371795 -0.109897 0 1 0
+0.31596 -0.371795 0.0798456 0 1 0
+-0.4175 -0.34347 0.320513 0 0 1
+-0.402842 -0.371795 0.2801 0 1 0
+0.5 -0.284557 -0.0294591 0.999432 -0.0333145 0.00510566
+-0.0946989 0.130165 -0.333333 0 0 1
+-0.18584 -0.196866 -0.333333 0 0 1
+-0.5 0.0435897 0.0746532 1 0 0
+-0.315273 -0.0686872 -0.333333 -0.40585 0.0193488 0.913735
+0.3599 -0.371795 0.184478 0 1 0
+0.268702 -0.00604169 -0.000124117 0.819833 -0.17742 0.544422
+0.45392 0.294872 0.220279 0 1 0
+0.188766 0.294872 0.259866 0 1 0
+0.229628 0.228346 -0.333333 0.0182927 0.266438 0.963678
+0.184739 -0.195564 -0.333333 0 0 1
+-0.0428283 -0.294872 -0.273222 0 1 0
+-0.0489443 -0.0603455 -0.333333 0 0 1
+-0.274895 0.371795 -0.352907 0 1 0
+-0.368749 -0.371795 -0.0973915 0 1 0
+-0.254215 -0.371795 0.172836 0 1 0
+0.431884 -0.356421 0.320513 0 0 1
+-0.411363 -0.0461171 -0.371795 0 0 1
+0.351979 -0.153288 -0.371795 0 0 1
+-0.00249413 0.0725427 -0.333333 0 0 1
+0.280687 0.294872 -0.183218 0 1 0
+0.160914 -0.371795 0.252092 0 1 0
+0.313111 -0.371795 -0.339018 0 1 0
+-0.5 0.00442537 -0.363703 0.911737 -0.238175 0.334677
+0.5 -0.206161 -0.27223 1 0 0
+0.5 0.288768 -0.230673 0.970468 0.240916 0.0123132
+0.111975 -0.0445037 0.320513 0 0 1
+0.065891 0.371795 -0.220306 0 1 0
+0.0922075 -0.126986 0.320513 0 0 1
+0.5 0.0602743 -0.282968 1 0 0
+0.5 0.105198 0.117947 1 0 0
+0.483055 0.222471 0.320513 0 0 1
+0.418214 -0.0409435 -0.371795 0 0 1
+-0.207753 -0.10395 -0.333333 0 0 1
+0.0241874 0.371795 -0.284024 0 1 0
+0.455244 -0.294872 -0.0367687 -0.408525 0.903453 0.129924
+-0.27813 0.207088 0.332907 -0.599307 0.800519 0
+0.288199 -0.371795 -0.246567 0 1 0
+-0.183074 -0.371795 0.314571 -0.0531402 0.94855 -0.312136
+0.477118 0.0733528 -0.371795 0 0 1
+0.238897 -0.371795 -0.226901 0 1 0
+-0.5 -0.190373 -0.334293 1 0 0
+0.5 0.04714 -0.119218 1 0 0
+-0.490301 0.371795 -0.0891827 -0.050246 0.998554 -0.0191083
+-0.459678 0.099711 0.320513 0 0 1
+-0.353158 -0.321626 0.320513 0 0 1
+-0.253634 -0.371795 0.155464 0 1 0
+-0.198899 -0.156691 -0.333333 0 0 1
+-0.392796 -0.371795 0.294467 0 1 0
+-0.0550713 -0.294872 -0.176373 0 1 0
+-0.169856 -0.277083 -0.371795 0 0 1
+0.238659 0.294872 0.134405 0 1 0
+-0.396876 0.0430212 0.320513 0 0 1
+0.5 0.178007 0.0970119 1 0 0
+-0.294414 0.283789 -0.371795 0 0 1
+0.174133 -0.303013 0.320513 0 0 1
+0.313955 -0.371795 0.0276638 0 1 0
+-0.306677 0.371795 -0.0331482 0 1 0
+-0.193719 0.0227938 -0.300062 0.861403 0.50791 0.00364513
+0.5 -0.196218 0.258035 1 0 0
+0.046336 0.272008 0.320513 0 0 1
+0.5 0.233168 0.164086 1 0 0
+-0.434418 -0.371795 -0.0242646 0 1 0
+-0.416423 0.027261 -0.371795 0 0 1
+-0.5 0.10972 -0.188846 1 0 0
+0.0938118 -0.0545564 0.320513 0 0 1
+0.151062 0.294872 -0.308074 0 1 0
+0.302999 -0.232738 -0.371795 0 0 1
+-0.298946 0.371795 -0.0605153 0 1 0
+-0.062465 0.371795 -0.0355295 0 1 0
+-0.5 -0.120411 0.163116 1 0 0
+0.5 -0.106211 -0.17862 1 0 0
+0.0195646 -0.294872 0.050123 0 1 0
+0.0104275 0.180544 -0.333333 0 0 1
+0.437419 -0.213086 0.320513 0 0 1
+0.113805 0.230924 0.371795 0 0 1
+0.254051 -0.222539 0.323001 -0.296435 0.870057 -0.393862
+-0.317969 -0.234741 0.320513 0 0 1
+-0.045483 -0.147342 -0.333333 0 0 1
+-0.448718 -0.348324 0.120845 1 0 0
+0.0629693 0.371795 0.124728 0 1 0
+0.070631 0.371795 0.0696005 0 1 0
+0.17552 0.186143 -0.333333 0 0 1
+-0.132668 0.076454 0.320513 0 0 1
+0.241016 -0.229656 0.35833 -0.473636 0.880721 0
+-0.5 -0.137614 0.0798534 1 0 0
+-0.379788 -0.079146 -0.371795 0 0 1
+-0.196033 -0.0260988 -0.128793 0.778284 -0.6278 0.0119199
+-0.19474 0.0562577 -0.333333 0 0 1
+-0.119522 0.371795 -0.129708 0 1 0
+0.5 -0.0581442 0.120847 1 0 0
+-0.0060937 0.0254825 0.320513 0 0 1
+0.119396 -0.280797 0.320513 0 0 1
+0.0884131 0.289988 0.320513 0 0 1
+-0.0346692 0.34052 -0.371795 0 0 1
+-0.127896 -0.294872 -0.277527 0 1 0
+0.286684 0.294872 -0.0172698 0 1 0
+-0.393522 0.371795 0.0294282 0 1 0
+0.246501 0.294872 0.0259258 0 1 0
+-0.362789 -0.238323 -0.371795 0 0 1
+0.5 -0.0338202 -0.363783 0.976485 0.0909458 -0.195462
+0.273198 -0.0378441 0.371795 0 0 1
+-0.222273 -0.371795 -0.174947 0 1 0
+-0.284145 0.371795 0.200183 0 1 0
+-0.00706299 0.122359 0.320513 0 0 1
+-0.147057 -0.150649 0.371795 0.046957 0.138135 0.9893
+0.333797 0.125804 -0.371795 0 0 1
+0.0966978 0.170601 -0.333333 0 0 1
+-0.0529629 0.230897 -0.347374 0 1 0
+0.230034 -0.0170047 0.0128539 -0.0249832 -0.509802 0.859929
+0.5 -0.0553647 -0.21768 1 0 0
+-0.5 0.302028 0.240149 1 0 0
+0.475117 0.273193 0.320513 0 0 1
+0.448718 -0.351536 0.110287 1 0 0
+0.413145 0.294872 -0.267685 0 1 0
+0.125654 -0.294872 -0.279497 0 1 0
+0.5 -0.285673 0.0524755 0.973652 -0.200923 -0.107847
+-0.166907 -0.17606 0.371795 0 0 1
+0.374968 -0.371795 0.0844963 0 1 0
+-0.054491 -0.294872 -0.335071 0 1 0
+0.259792 -0.025163 -0.322352 0.720761 -0.687564 0.0880888
+0.0536105 0.273694 0.320513 0 0 1
+-0.107435 0.371795 -0.146632 0 1 0
+0.0941518 0.0198388 -0.333333 0 0 1
+0.485556 0.137161 0.320513 0 0 1
+-0.308885 -0.371795 -0.104035 0 1 0
+-0.00549864 -0.230897 -0.352362 0 1 0
+-0.5 0.157121 -0.214204 1 0 0
+0.5 0.283886 -0.146891 1 0 0
+-0.401256 0.215363 0.320513 0 0 1
+0.242003 -0.371795 -0.0371441 0 1 0
+0.5 0.261703 0.152694 1 0 0
+0.0637127 0.219948 -0.333333 0 0 1
+-0.5 0.232419 -0.14553 1 0 0
+-0.5 0.268844 0.312448 0.981613 -0.109587 -0.156291
+-0.228101 -0.134527 0.371795 0 0 1
+-0.200829 -0.160616 0.371795 0 0 1
+-0.141154 -0.355179 -0.320641 1 0 0
+-0.323416 0.11716 0.371795 0 0 1
+0.321352 -0.133426 0.371795 0 0 1
+0.424129 -0.0317535 0.320513 0 0 1
+0.206113 0.294872 0.0948665 0 1 0
+-0.0563501 -0.294872 -0.128044 0 1 0
+0.141026 0.348954 -0.333379 1 0 0
+0.0733529 -0.012554 0.320513 0 0 1
+-0.5 0.12243 0.0567994 1 0 0
+0.188426 -0.371795 -0.318472 0 1 0
+0.5 -0.0989175 0.297919 1 0 0
+-0.325678 0.371795 -0.0759258 0 1 0
+0.208652 -0.371795 -0.255479 0 1 0
+0.5 0.178958 0.141186 1 0 0
+-0.437448 0.371795 -0.18241 0 1 0
+0.163235 -0.139991 -0.333333 0 0 1
+0.147309 -0.254915 0.355294 -0.0713577 0.997451 0
+-0.00620545 0.371795 -0.167764 0 1 0
+0.376294 -0.280181 -0.371795 0 0 1
+0.498194 0.294872 -0.0837264 0.389426 0.919701 -0.049973
+0.0676425 0.371795 0.164432 0 1 0
+-0.141154 -0.338151 -0.319665 1 0 0
+-0.0350246 0.0844414 -0.333333 0 0 1
+-0.41004 -0.371795 -0.301731 0 1 0
+-0.413945 -0.371795 0.286113 0 1 0
+-0.5 -0.0319994 0.119278 1 0 0
+-0.368345 -0.371795 -0.0128565 0 1 0
+-0.448718 -0.336001 0.241372 1 0 0
+0.5 -0.285402 -0.324866 0.998818 -0.0483657 -0.00486333
+-0.5 0.124785 -0.103139 1 0 0
+0.5 -0.14566 0.206454 1 0 0
+-0.5 0.25177 -0.0619173 1 0 0
+-0.408133 -0.341546 -0.371795 0 0 1
+0.212154 -0.00396104 0.0116464 -0.492203 -0.145941 0.858159
+0.5 -0.164459 -0.183476 1 0 0
+0.374028 -0.102472 -0.371795 0 0 1
+0.269074 -0.371795 0.30813 0 1 0
+-0.0110979 0.371795 0.0604669 0 1 0
+0.287616 0.243532 0.320513 0 0 1
+-0.428444 -0.125417 0.320513 0 0 1
+0.167109 0.294872 -0.33656 0 1 0
+-0.102559 0.113411 0.320513 0 0 1
+-0.335611 0.371795 0.138203 0 1 0
+0.490643 0.294872 -0.220468 0.112886 0.993513 -0.0137702
+0.333072 -0.371795 0.0708898 0 1 0
+-0.5 -0.0546505 0.217845 1 0 0
+0.0332664 0.371795 0.201955 0 1 0
+0.5 -0.236891 -0.0643101 1 0 0
+0.124189 0.240561 -0.371795 -0.00369495 0.0443388 0.99901
+0.141109 -0.359277 -0.0346752 1 0 0
+-0.315409 -0.371795 0.0487433 0 1 0
+0.141026 0.323378 -0.00617312 1 0 0
+0.448718 -0.331695 -0.259777 1 0 0
+0.199107 0.294872 0.135544 0 1 0
+-0.38029 -0.371795 -0.297624 0 1 0
+-0.0433791 -0.275905 -0.371795 0 0 1
+-0.261444 -0.369655 0.320513 0.0142936 0.785323 -0.618922
+0.223585 0.205901 0.371795 0 0 1
+0.460152 -0.294872 -0.0150926 -0.0257576 0.999625 -0.00927118
+0.021263 -0.294872 0.0980625 0 1 0
+-0.304423 -0.371795 -0.301802 0 1 0
+0.316582 0.294872 0.0883312 0 1 0
+-0.469062 -0.294872 0.167708 0 1 0
+-0.326008 -0.162328 0.332728 0.789141 0.614207 -0.00235201
+0.5 0.0306003 0.109854 1 0 0
+0.5 0.0768512 -0.139961 1 0 0
+0.270725 -0.263408 0.320513 0 0 1
+-0.233961 -0.371795 0.107304 0 1 0
+-0.5 -0.255157 0.154414 1 0 0
+-0.19805 -0.272179 -0.371795 0 0 1
+0.5 -0.085322 0.26007 1 0 0
+0.450992 -0.294872 0.240904 -0.192836 0.98116 -0.0117663
+-0.0109977 0.135608 -0.333333 0 0 1
+-0.144068 0.209172 0.371795 0 0 1
+0.141026 0.353512 0.0321656 1 0 0
+0.376462 -0.206467 0.320513 0 0 1
+0.5 0.0761622 0.16944 1 0 0
+-0.0325954 0.322267 0.320513 0 0 1
+-0.342108 -0.140821 0.355713 0.83287 0.553419 0.00740491
+-0.063034 0.371795 -0.317908 0 1 0
+0.438377 -0.371795 -0.306237 -0.106055 0.994226 0.0163387
+0.448718 -0.29983 0.283075 0.923501 -0.378403 -0.0628968
+-0.365109 0.0319685 -0.371795 0 0 1
+0.5 -0.230341 0.0559069 1 0 0
+-0.431919 0.371795 0.183942 0 1 0
+-0.5 -0.129277 0.0892365 1 0 0
+-0.5 -0.0352344 -0.248553 1 0 0
+0.0530038 0.371795 0.248379 0 1 0
+0.102039 0.341967 -0.371795 0 0 1
+-0.176348 0.251134 0.358444 -0.212557 0.977149 0
+-0.5 -0.111625 -0.0720685 1 0 0
+0.167234 0.190055 -0.333333 0 0 1
+0.195804 0.0156785 -0.0274698 0.900715 -0.434389 -0.00429323
+0.400543 0.294872 0.166706 0 1 0
+0.470352 -0.23488 -0.371795 0 0 1
+0.203863 -0.0168168 0.341321 0.996585 -0.0825677 0
+0.141026 0.33155 -0.179273 1 0 0
+-0.5 0.302295 0.0145168 1 0 0
+0.102761 0.371795 -0.345422 0 1 0
+0.5 -0.209373 0.0607586 1 0 0
+-0.0148062 -0.294872 0.115858 0 1 0
+-0.32915 0.371795 -0.346593 0 1 0
+-0.015613 -0.127678 -0.333333 0 0 1
+-0.199448 0.0300894 -0.104767 0.726335 0.68733 -0.00385128
+0.393716 -0.160316 0.320513 0 0 1
+0.0497769 -0.119719 -0.333333 0 0 1
+0.0914406 0.0365566 -0.333333 0 0 1
+0.024138 0.371795 -0.126735 0 1 0
+0.474686 -0.0059635 -0.371795 0 0 1
+0.266057 0.294872 -0.362933 0.00385163 0.994483 -0.104824
+0.141109 -0.329892 0.211025 1 0 0
+-0.26017 0.085493 -0.333333 0 0 1
+-0.292287 -0.371795 -0.225822 0 1 0
+-0.426753 -0.0739514 -0.371795 0 0 1
+0.342416 0.11753 -0.371795 0 0 1
+-0.44554 -0.161766 -0.371795 0 0 1
+-0.202856 -0.0942893 0.371795 0 0 1
+0.5 -0.0951458 0.110268 1 0 0
+-0.5 -0.293446 0.24803 0.917611 0.396331 -0.030201
+-0.5 0.141494 -0.1656 1 0 0
+-0.331154 0.195061 0.320513 0 0 1
+-0.448718 -0.308878 0.16996 1 0 0
+0.5 0.234759 -0.350442 1 0 0
+-0.181364 0.250043 0.360682 -0.212563 0.977147 0
+-0.31538 -0.371795 0.154715 0 1 0
+0.212141 0.209806 0.371795 0 0 1
+-0.476098 -0.294872 -0.112356 0 1 0
+0.490871 0.130828 -0.371795 -0.112081 0.0546052 0.992198
+0.0313054 -0.245991 0.371795 0 0 1
+-0.188063 0.135375 -0.333333 0 0 1
+-0.448718 -0.355218 -0.345237 1 0 0
+-0.032795 0.21724 0.371795 0.00393449 -0.0298871 0.999546
+-0.155094 -0.371795 -0.326187 0 1 0
+-0.327203 0.280824 0.320513 0 0 1
+0.29767 -0.27624 -0.371795 0 0 1
+-0.497669 -0.294872 0.287026 0.666237 0.729695 0.153861
+-0.448718 -0.365109 0.279118 0.991186 0.132395 0.00478005
+0.490259 -0.278008 0.320513 0 0 1
+-0.5 0.0917119 0.298197 1 0 0
+0.5 0.24216 -0.255951 1 0 0
+0.278616 -0.206724 0.365117 -0.560189 0.800991 -0.21119
+0.380844 -0.156031 -0.371795 0 0 1
+-0.154519 0.371795 0.249879 0 1 0
+-0.0340357 -0.0828303 0.320513 0 0 1
+0.0976337 0.371795 0.089234 0 1 0
+-0.0768526 0.309453 -0.371795 0 0 1
+0.0816873 0.371795 0.161215 0 1 0
+-0.387381 -0.371795 -0.288881 0 1 0
+-0.5 -0.285844 0.0179026 0.999564 0.0272104 0.0114354
+-0.5 0.266402 -0.360399 1 0 0
+0.5 0.00104203 -0.337213 1 0 0
+-0.0300795 0.371795 0.0151498 0 1 0
+-0.3631 0.000846935 -0.371795 0 0 1
+-0.224799 -0.371795 -0.0989139 0 1 0
+0.372582 -0.371795 0.132519 0 1 0
+-0.5 -0.265439 -0.0516379 1 0 0
+0.5 0.238527 0.199621 1 0 0
+-0.392328 0.371795 -0.144761 0 1 0
+0.192515 -0.0023689 -0.320925 0.996762 0.0800359 -0.00776291
+0.320513 0.127405 -0.335605 0.836138 -0.0807551 0.542542
+0.0952803 -0.164633 -0.333333 0 0 1
+-0.469847 0.160792 -0.371795 0 0 1
+0.123991 0.0970092 -0.333333 0 0 1
+0.3897 0.240019 0.320513 0 0 1
+-0.308411 0.371795 0.311956 -0.00304534 0.99984 0.0176141
+0.058554 -0.294872 0.201349 0 1 0
+0.180345 0.294872 0.218769 0 1 0
+0.44823 0.294872 -0.283848 0 1 0
+0.118146 -0.217553 -0.333333 0 0 1
+0.390555 0.0523899 -0.371795 0 0 1
+-0.206663 0.371795 0.228223 0 1 0
+-0.5 -0.276719 0.0490476 1 0 0
+-0.0588254 0.371795 0.063938 0 1 0
+0.5 -0.199898 -0.00362422 1 0 0
+0.433563 0.294872 -0.187369 0 1 0
+0.00816092 -0.294872 0.228761 0 1 0
+-0.190357 -0.117757 0.371795 0 0 1
+-0.5 0.285355 -0.0423002 1 0 0
+0.112129 0.371795 0.271557 0 1 0
+0.269735 0.294872 0.108425 0 1 0
+-0.228782 -0.371795 -0.0474099 0 1 0
+0.326191 -0.0670528 -0.371795 0.239869 -0.0111406 0.970741
+0.253353 -0.371795 0.00301491 0 1 0
+-0.5 -0.190692 -0.226492 1 0 0
+-0.317678 -0.371795 0.0781297 0 1 0
+-0.133916 0.371795 -0.130928 0 1 0
+-0.368427 0.305093 -0.371795 0 0 1
+-0.5 0.257343 -0.105442 1 0 0
+0.472101 0.294872 -0.272608 0 1 0
+0.0240126 -0.294872 0.0726677 0 1 0
+-0.0181932 0.204348 0.339441 -0.0911667 0.995705 0.0161474
+0.5 0.136176 0.283159 1 0 0
+-0.148116 0.371795 0.169471 0 1 0
+0.188546 0.294872 0.165911 0 1 0
+-0.448718 -0.302876 0.10685 0.982313 0.181059 -0.0477473
+-0.119285 -0.294872 0.197088 0 1 0
+0.356714 -0.114913 0.336885 0.880201 -0.4746 0
+-0.5 -0.245233 0.257842 1 0 0
+-0.448718 -0.325083 -0.214687 1 0 0
+0.256297 0.294872 0.271599 0 1 0
+-0.215786 -0.130219 -0.333333 0 0 1
+-0.5 0.189117 0.0447863 1 0 0
+0.277461 0.294872 -0.0358407 0 1 0
+0.5 0.0648449 0.234945 1 0 0
+-0.5 0.266812 -0.128818 1 0 0
+-0.235261 -0.371795 0.300805 0 1 0
+0.385002 -0.0569641 -0.371795 0 0 1
+-0.269675 0.0193163 -0.166923 0.901257 -0.433188 -0.00918101
+0.0725194 -0.2603 -0.371795 0 0 1
+-0.219899 -0.0420432 -0.133326 -0.227441 0.973784 0.00385153
+-0.161516 0.317883 -0.371795 0 0 1
+0.317856 -0.000453342 -0.333333 0.665656 -0.0930395 0.740436
+0.0797824 -0.294872 -0.353551 0 1 0
+-0.268774 -0.0903362 0.371795 0 0 1
+-0.146715 0.371795 0.185659 0 1 0
+-0.179828 0.371795 0.242575 0 1 0
+0.260123 0.0248319 -0.232973 0.77852 0.62762 0
+0.234433 0.294872 -0.135123 0 1 0
+0.332621 -0.164091 -0.371795 0 0 1
+0.0378794 -0.0202404 -0.333333 0 0 1
+-0.320172 0.371795 -0.17879 0 1 0
+0.0601525 0.371795 -0.163591 0 1 0
+0.360674 -0.371795 0.0131295 0 1 0
+0.320468 -0.132314 0.371795 0 0 1
+-0.0289968 0.31089 0.320513 0 0 1
+-0.407797 0.371795 -0.304683 0 1 0
+-0.265338 0.371795 -0.0819268 0 1 0
+-0.5 -0.204581 -0.0058982 1 0 0
+0.212163 -0.236324 -0.371795 -0.0237187 -0.40565 0.913721
+0.224762 0.261075 -0.371795 0 0 1
+-0.0417895 -0.294872 -0.239551 0 1 0
+0.424032 0.0234245 0.320513 0 0 1
+0.141109 -0.306128 -0.329131 1 0 0
+0.216199 0.294872 -0.0765871 0 1 0
+-0.5 -0.273638 -0.353881 1 0 0
+0.101928 -0.0170416 0.320513 0 0 1
+0.293676 -0.371795 -0.258896 0 1 0
+-0.141154 -0.335052 0.301656 1 0 0
+0.5 -0.130718 0.0867524 1 0 0
+0.141026 0.341951 -0.0624504 1 0 0
+-0.307195 0.0241183 0.371795 0 0 1
+-0.448718 -0.360839 0.0184516 0.986487 0.157846 -0.0439113
+-0.390988 0.299442 -0.371795 0 0 1
+0.141109 -0.324997 -0.213209 1 0 0
+-0.172339 0.168825 0.371795 0 0 1
+-0.416768 0.30011 0.320513 0 0 1
+-0.392747 0.371795 -0.299207 0 1 0
+-0.0984154 -0.00838688 -0.333333 0 0 1
+-0.303909 0.306844 0.320513 0 0 1
+-0.320513 -0.105256 -0.369264 0.732829 0.128815 -0.668108
+0.364217 -0.134521 0.320513 0 0 1
+0.5 0.276938 0.281395 1 0 0
+-0.448342 0.238493 -0.371795 0 0 1
+0.12925 -0.294872 0.0962317 0 1 0
+-0.120579 0.229947 -0.333333 0.171663 0.358338 0.917674
+0.110413 -0.294872 0.237644 0 1 0
+0.188082 0.0804469 0.325866 0.822381 0.417117 -0.386916
+-0.442899 -0.371795 0.146616 0.262594 0.964872 0.00816021
+0.5 -0.1992 0.208369 1 0 0
+-0.5 0.202924 0.17219 1 0 0
+0.255643 0.0293125 -0.196857 0.664258 0.747441 0.00969129
+0.141026 0.356262 0.263554 1 0 0
+0.223005 0.0375862 -0.0283089 -0.176159 0.984358 0.00263138
+0.141109 -0.326593 0.297007 1 0 0
+-0.133224 0.247208 0.371795 -0.0395227 0.147234 0.988312
+-0.0364033 -0.294872 0.262006 0 1 0
+0.440185 -0.371795 -0.364086 -0.153433 0.983069 0.10017
+0.00730867 -0.239726 -0.371795 0.0323939 -0.216791 0.97568
+0.0136311 0.371795 0.0895158 0 1 0
+0.5 0.275475 -0.0271198 1 0 0
+-0.463874 0.371795 -0.204208 0 1 0
+-0.445722 0.371795 -0.166492 0 1 0
+-0.5 0.233395 -0.163096 1 0 0
+-0.195754 0.371795 -0.369662 0.00500468 0.876259 -0.481814
+0.272959 0.126249 -0.333333 0 0 1
+0.399199 -0.0958819 -0.371795 0 0 1
+-0.5 0.294249 0.208454 1 0 0
+0.5 0.056409 0.122056 1 0 0
+-0.20563 0.371795 0.298075 0 1 0
+-0.5 -0.0096374 0.119919 1 0 0
+-0.118247 -0.0813419 0.320513 0 0 1
+-0.125538 0.307675 -0.371795 0 0 1
+-0.359667 -0.371795 -0.137219 0 1 0
+-0.5 0.344957 0.0259709 1 0 0
+0.388441 -0.371795 0.204645 0 1 0
+0.141026 0.300381 0.054718 0.950644 0.280117 0.133458
+0.5 0.0909175 0.0754289 1 0 0
+-0.257623 -0.371795 -0.203114 0 1 0
+-0.5 0.109183 -0.0901741 1 0 0
+0.450832 -0.294872 0.167442 -0.258073 0.964322 -0.0590086
+-0.5 -0.272223 -0.0356848 1 0 0
+-0.432773 -0.038598 -0.371795 0 0 1
+-0.329151 0.119972 0.371795 0 0 1
+-0.376377 -0.0909221 -0.371795 0 0 1
+0.394125 0.294872 -0.0229393 0 1 0
+0.448718 -0.313133 0.149672 1 0 0
+-0.354056 -0.0906395 0.371795 -0.0104485 -0.00977845 0.999898
+0.117289 0.0792741 0.320513 0 0 1
+-0.268552 -0.0217248 -0.131623 0.896747 0.442533 -0.00322104
+-0.35937 0.371795 -0.0216615 0 1 0
+0.5 0.199739 0.0531602 1 0 0
+0.409855 0.294872 -0.276133 0 1 0
+0.373518 -0.337201 0.320513 0 0 1
+0.141109 -0.324039 0.15262 1 0 0
+0.319478 -0.1658 -0.342971 0.989677 -0.143282 0.00306437
+-0.23643 -0.232161 0.351609 0.43273 0.901494 0.00731475
+-0.421204 0.371795 0.150409 0 1 0
+-0.5 0.275611 0.170301 1 0 0
+0.268803 -0.00488259 -0.303245 0.995148 -0.0979596 0.00921715
+0.141109 -0.327559 -0.171901 1 0 0
+-0.369079 0.371795 -0.244434 0 1 0
+0.360247 -0.371795 -0.33965 0 1 0
+-0.0178356 -0.24768 0.371795 0.0220252 -0.245271 0.969204
+-0.5 0.0184507 -0.234723 1 0 0
+0.491398 0.207909 -0.371795 -0.0046152 0.0033203 0.999984
+0.271871 -0.371795 -0.311277 0 1 0
+-0.192598 0.286 0.320513 0 0 1
+0.269161 0.000800401 -0.131159 0.999895 -0.00571499 0.0132944
+0.14855 0.0370965 -0.333333 0 0 1
+0.5 0.199969 -0.14119 1 0 0
+-0.141154 -0.369243 -0.0126045 0.825436 -0.564169 0.0192047
+0.5 -0.199753 0.214687 1 0 0
+0.439601 -0.241615 -0.371795 0 0 1
+0.428633 -0.225425 0.320513 0 0 1
+0.407448 0.294872 -0.0595198 0 1 0
+-0.320956 0.371795 0.249129 0 1 0
+0.114882 -0.294872 -0.209771 0 1 0
+0.377363 -0.0572317 0.325939 0.923881 -0.223497 0.310632
+0.232808 0.294872 -0.29241 0 1 0
+-0.141154 -0.30894 -0.150804 1 0 0
+-0.253526 0.371795 -0.257355 0 1 0
+-0.5 -0.217769 0.219071 1 0 0
+0.5 -0.138214 -0.244876 1 0 0
+-0.0312373 -0.230897 -0.338562 0.0446411 0.955521 -0.291526
+0.350441 -0.00432761 -0.371795 0 0 1
+-0.203468 -0.126684 0.371795 0 0 1
+0.349687 0.294872 -0.0410908 0 1 0
+-0.0383932 -0.294872 -0.274147 0 1 0
+0.320513 0.00267867 -0.365509 0.984964 -0.0162711 0.17199
+0.235318 0.0472359 0.371795 0 0 1
+-0.188171 0.00879606 -0.249183 0.987292 0.158847 0.0047453
+-0.247377 -0.371795 -0.148172 0 1 0
+0.0517136 0.153032 0.320513 0 0 1
+-0.437918 -0.371795 -0.0415535 0 1 0
+-0.454946 0.371795 -0.0739448 0 1 0
+0.0082208 0.120951 0.320513 0 0 1
+-0.00561079 0.256282 0.327178 0.0377571 0.977187 0.208997
+0.263848 0.294872 0.203386 0 1 0
+-0.256167 0.0193793 0.371795 0 0 1
+-0.465319 -0.294872 0.203097 0 1 0
+0.452859 -0.294872 -0.176315 -0.22031 0.975171 0.0224503
+-0.142404 -0.282153 0.320513 0 0 1
+-0.216412 -0.371795 -0.0763608 0 1 0
+0.268798 -0.00493865 -0.021526 0.994378 -0.102899 0.024983
+0.5 -0.279486 0.180702 1 0 0
+0.121838 0.164383 0.361088 0.614225 0.789131 0
+0.109801 -0.294872 -0.350505 0 1 0
+-0.461912 0.0506014 0.320513 0 0 1
+0.320513 0.112299 -0.357011 1 0 0
+-0.0481679 0.371795 -0.228131 0 1 0
+-0.135933 -0.153412 0.347555 0.6378 0.770179 0.00598104
+-0.0292601 -0.275239 -0.371795 0 0 1
+0.172079 0.294872 0.245158 0 1 0
+0.242473 -0.371795 -0.274312 0 1 0
+-0.32618 -0.371795 -0.294354 0 1 0
+-0.141154 -0.367579 -0.0788047 0.917024 -0.37805 0.127064
+0.252219 -0.0228473 0.0042173 0.407726 -0.36205 0.83826
+-0.257204 0.371795 -0.195328 0 1 0
+0.0643403 0.371795 0.0234404 0 1 0
+-0.0115172 -0.202566 0.320513 0.0786532 0.460204 0.884322
+-0.259208 -0.0401082 0.371795 0 0 1
+0.143776 0.0233807 -0.333333 0 0 1
+0.5 0.0453764 -0.353226 1 0 0
+0.279633 0.147036 0.371795 0 0 1
+-0.367838 0.371795 -0.324109 0 1 0
+-0.177771 0.11096 0.371795 0.164702 -0.305551 0.937823
+-0.182341 0.290554 0.320513 0 0 1
+0.141026 0.343601 0.0693843 1 0 0
+0.448718 -0.343786 0.25659 1 0 0
+0.345022 0.174173 -0.371795 0 0 1
+-0.162847 0.371795 -0.0424288 0 1 0
+-0.426064 -0.371795 0.275453 0 1 0
+-0.448718 -0.359864 -0.317403 0.999926 0.0118214 -0.00286214
+-0.122953 0.246261 0.371795 -0.0196413 0.167164 0.985733
+-0.141154 -0.352836 0.0843068 1 0 0
+-0.5 0.0317895 -0.113891 1 0 0
+0.166548 0.151996 -0.333333 0 0 1
+0.5 -0.0878952 -0.366037 0.967153 0.0151488 -0.253742
+0.240274 -0.291082 0.320513 0 0 1
+0.109868 0.371795 0.141009 0 1 0
+-0.380969 0.135517 -0.371795 0 0 1
+0.0234862 -0.279712 -0.371795 0 0 1
+0.5 0.282286 -0.147981 1 0 0
+-0.364564 -0.0977858 0.37071 0.725657 0.24942 -0.641258
+-0.5 -0.271224 0.054406 1 0 0
+0.163753 -0.371795 0.0826907 0 1 0
+-0.325117 -0.371795 0.102438 0 1 0
+-0.5 0.20275 0.101729 1 0 0
+0.22942 0.0639066 0.371795 0 0 1
+-0.260962 0.332964 -0.371795 0 0 1
+-0.5 0.310212 0.136422 1 0 0
+-0.13471 0.0539682 -0.333333 0 0 1
+-0.344483 0.371795 -0.310338 0 1 0
+0.053486 -0.294872 -0.126665 0 1 0
+-0.5 0.0343925 -0.168435 1 0 0
+0.5 0.159456 -0.348019 1 0 0
+-0.147333 -0.0728936 -0.333333 0 0 1
+-0.5 0.120503 0.191749 1 0 0
+0.350146 -0.371795 0.210138 0 1 0
+0.259346 -0.032816 -0.333333 0.124704 -0.122336 0.984623
+-0.5 -0.130971 0.207715 1 0 0
+-0.155604 -0.34131 -0.371795 0 0 1
+-0.255472 -0.0732271 0.371795 0 0 1
+-0.292416 0.32522 -0.371795 0 0 1
+0.5 0.083878 -0.0886691 1 0 0
+0.5 0.182052 0.142964 1 0 0
+-0.467262 0.371795 -0.0996608 0 1 0
+-0.262857 0.371795 -0.331293 0 1 0
+-0.227101 -0.371795 0.268958 0 1 0
+-0.0422799 0.371795 -0.0446068 0 1 0
+-0.5 0.227059 0.270959 1 0 0
+-0.5 -0.136723 -0.0414228 1 0 0
+0.0940174 0.371795 -0.172188 0 1 0
+-0.5 -0.272828 0.0176138 1 0 0
+-0.17541 0.310514 -0.371795 0 0 1
+0.0388107 0.114615 -0.333333 0 0 1
+-0.196134 0.230897 -0.34192 -0.0176036 0.987424 0.157109
+-0.5 0.0163763 -0.336688 1 0 0
+-0.0597994 0.371795 -0.194129 0 1 0
+0.234148 0.294872 -0.196212 0 1 0
+0.177854 0.294872 0.207317 0 1 0
+0.5 0.0508444 -0.274971 1 0 0
+-0.448718 -0.316455 -0.0981723 1 0 0
+-0.203324 0.023318 0.322069 0.69226 -0.109792 0.713247
+-0.21775 -0.011421 -0.0194885 0.400706 -0.311033 0.861797
+0.441875 0.294872 0.0432327 0 1 0
+0.221069 -0.371795 0.197997 0 1 0
+-0.0945136 -0.294872 0.0971963 0 1 0
+0.234626 -0.371795 0.0525554 0 1 0
+-0.39712 -0.0429694 0.320513 0 0 1
+-0.174587 -0.371795 0.0560974 0 1 0
+-0.302704 0.11797 -0.333333 0 0 1
+-0.5 -0.108068 0.274736 1 0 0
+0.123485 -0.0811993 0.320513 0 0 1
+0.141026 0.341139 -0.191225 1 0 0
+-0.403065 -0.371795 -0.317431 0 1 0
+0.346518 -0.371795 0.12935 0 1 0
+0.27598 0.294872 0.281089 0 1 0
+0.314349 -0.240452 0.320513 0 0 1
+-0.189546 -0.0139297 -0.038126 0.868431 -0.344425 0.35665
+0.5 -0.0502787 0.218919 1 0 0
+0.222996 0.0375838 -0.217739 -0.193252 0.981136 0.00502835
+0.448718 -0.335562 -0.275103 1 0 0
+-0.248976 0.371795 -0.246009 0 1 0
+0.5 0.158412 0.131917 1 0 0
+-0.150593 -0.254681 0.36184 0.0715235 0.997439 -0.000159972
+0.10106 -0.256282 0.370334 0.0199057 0.915832 -0.401069
+-0.316167 0.191894 -0.371795 -0.262148 0.16947 0.950031
+0.5 -0.0732252 -0.330172 1 0 0
+0.0166719 0.371795 0.203605 0 1 0
+0.5 -0.198179 -0.119843 1 0 0
+-0.214707 0.0404228 -0.155653 0.324863 0.945737 -0.00672964
+-0.5 -0.0909765 -0.0830007 1 0 0
+-0.5 0.05824 0.0486288 1 0 0
+0.463894 -0.137518 -0.371795 0 0 1
+-0.190483 -0.371795 -0.0817475 0 1 0
+0.27252 0.294872 0.0389074 0 1 0
+0.492573 0.110391 0.320513 0.185241 0.021294 0.982462
+-0.5 0.0329841 0.104159 1 0 0
+0.336494 0.294872 0.191202 0 1 0
+0.343318 -0.239707 0.320513 0 0 1
+-0.0319458 0.35889 0.320513 0 0 1
+0.179668 0.0404852 -0.333333 0 0 1
+-0.0304735 0.256282 0.332096 0 1 0
+-0.436775 0.371795 -0.0526151 0 1 0
+-0.354356 0.371795 -0.175836 0 1 0
+0.330386 0.010946 0.371795 0 0 1
+-0.319499 0.165557 -0.342974 0.979634 -0.0700817 -0.188166
+0.0192221 0.371795 -0.138364 0 1 0
+0.5 -0.0831907 0.253713 1 0 0
+0.195636 -0.0607201 0.364089 0.940884 -0.276114 -0.19621
+-0.388173 0.361936 0.320513 0 0 1
+0.212178 0.294872 -0.25279 0 1 0
+0.141026 0.371726 -0.222327 0.509763 0.853539 0.107759
+-0.0602944 -0.195575 0.360722 0.318949 0.947608 0.0176236
+-0.5 -0.28983 0.160367 0.976485 0.213556 -0.0295097
+0.141026 0.303616 -0.257626 0.970777 0.239272 -0.0184668
+0.046872 0.371795 -0.273699 0 1 0
+0.461173 -0.294872 -0.0304969 0 1 0
+0.0527591 0.198162 0.330752 0.284633 0.956539 -0.0633754
+-0.102019 -0.294872 0.0418876 0 1 0
+-0.5 0.159898 -0.257898 1 0 0
+-0.18254 0.271223 -0.371795 0 0 1
+0.00811183 0.145183 0.320513 0 0 1
+0.369048 -0.371795 -0.143585 0 1 0
+-0.394523 0.371795 0.304166 0 1 0
+0.232213 -0.286581 0.320513 0 0 1
+0.320396 -0.155312 -0.354625 0.998604 -0.0521436 -0.00841621
+0.5 -0.214939 0.018932 1 0 0
+-0.143505 -0.0914084 -0.333333 0 0 1
+-0.0242794 0.309322 -0.371795 0 0 1
+0.418967 0.294872 0.0546042 0 1 0
+-0.0885777 0.230897 -0.336253 0.0760096 0.758096 0.647698
+-0.0452251 -0.156685 -0.333333 0 0 1
+0.448718 -0.350745 0.0965492 1 0 0
+0.16752 0.294872 -0.0184636 0 1 0
+0.20431 0.027726 -0.0356174 -0.66797 0.744188 0
+0.5 0.0729266 -0.126241 1 0 0
+0.402717 0.294872 0.0360017 0 1 0
+0.5 -0.123429 0.12409 1 0 0
+0.451372 -0.182964 0.320513 0 0 1
+0.5 -0.141694 -0.0931344 1 0 0
+-0.245575 0.0409885 -0.169364 -0.386922 0.9221 0.00477354
+0.200569 0.252054 -0.371795 0 0 1
+0.5 0.2534 0.1603 1 0 0
+0.141026 0.31596 0.196193 1 0 0
+-0.184247 0.371795 0.0813625 0 1 0
+-0.368801 0.371795 -0.117025 0 1 0
+0.0862414 0.337088 0.320513 0 0 1
+-0.493108 0.371795 -0.340074 -0.327609 0.941355 0.0807672
+-0.255201 -0.0359033 -0.181533 0.583633 0.812004 0.00467942
+-0.0210085 -0.294872 0.299675 0 1 0
+0.401477 -0.174437 0.320513 0 0 1
+0.172555 -0.2037 0.371795 0 0 1
+-0.5 0.213436 0.210364 1 0 0
+0.212191 0.033613 -0.288394 -0.488939 0.872215 -0.0134362
+-0.5 -0.106166 0.287436 1 0 0
+0.5 -0.169646 0.163978 1 0 0
+-0.247671 0.0400316 -0.184947 -0.383873 0.923386 0
+0.296238 -0.267885 -0.371795 0 0 1
+-0.5 0.0253001 -0.252504 1 0 0
+0.28764 -0.371795 -0.14779 0 1 0
+0.329926 0.276374 0.320513 0 0 1
+0.381816 0.0433876 -0.371795 0 0 1
+-0.320513 -0.0946011 -0.34198 0.984254 0.0140666 -0.176198
+0.246452 0.294872 -0.212681 0 1 0
+-0.161251 0.371795 -0.101733 0 1 0
+0.267301 -0.0116977 -0.0537241 0.941303 -0.337452 0.00862083
+0.426465 -0.371795 -0.215141 0 1 0
+0.5 0.0449414 0.108803 1 0 0
+0.190486 -0.371795 -0.123961 0 1 0
+-0.0673389 -0.294872 -0.209605 0 1 0
+0.469082 -0.287697 0.320513 -0.0595105 -0.226125 0.972279
+0.2455 0.294872 0.0909413 0 1 0
+0.0539571 0.227681 0.371795 0 0 1
+0.415669 0.294872 0.21851 0 1 0
+0.5 0.232706 -0.202876 1 0 0
+-0.414465 -0.259387 -0.371795 0 0 1
+0.270707 -0.210355 -0.333333 0 0 1
+-0.263869 -0.244678 0.320513 0 0 1
+-0.00500709 -0.294872 -0.045865 0 1 0
+-0.402637 0.371795 0.302973 0 1 0
+0.14934 -0.230754 -0.333333 -0.158194 0.749429 -0.642908
+0.391779 0.294872 0.146831 0 1 0
+0.203929 -0.0273454 -0.235649 0.695942 0.71804 -0.00914555
+-0.5 -0.243133 -0.127795 1 0 0
+0.5 -0.257711 -0.331209 1 0 0
+0.0686892 0.371795 -0.280881 0 1 0
+0.0575228 -0.246882 -0.371795 0 0 1
+0.223956 -0.0298193 0.00467349 -0.075888 -0.521927 0.849608
+0.445791 -0.371795 0.114644 -0.554864 0.831884 -0.00973603
+-0.5 0.0673026 -0.302901 1 0 0
+0.48193 -0.277271 -0.371795 0 0 1
+-0.439462 0.371795 0.127999 0 1 0
+0.141109 -0.347256 0.295046 1 0 0
+0.272925 0.294872 0.0905273 0 1 0
+-0.260171 0.195449 -0.333333 0 0 1
+0.382856 0.0228147 0.3375 0.997443 0.0714707 0.000125253
+0.0796184 -0.294872 0.0411625 0 1 0
+0.100265 0.313919 0.320513 0 0 1
+0.0162836 -0.256282 0.340969 0 1 0
+0.421873 -0.142878 0.320513 0 0 1
+0.316947 0.17628 -0.363766 0.95882 0.277458 0.0606785
+0.5 0.212357 0.032235 1 0 0
+-0.100168 0.371795 -0.278506 0 1 0
+-0.141154 -0.35325 -0.0950589 1 0 0
+-0.271536 -0.0153248 -0.112925 0.943725 0.330714 0.0034379
+0.431817 -0.0268874 0.320513 0 0 1
+-0.5 0.325435 -0.123768 1 0 0
+0.0336794 0.112382 0.320513 0 0 1
+0.141026 0.333546 -0.234054 1 0 0
+0.141109 -0.355773 -0.328438 1 0 0
+-0.5 -0.0237972 -0.0015979 1 0 0
+0.263222 -0.0204528 -0.0390555 0.84686 -0.531815 0.00115086
+-0.171743 0.0439612 -0.333333 0 0 1
+-0.427525 0.371795 0.149313 0 1 0
+0.5 -0.151713 -0.354666 1 0 0
+0.5 -0.0352597 0.29839 1 0 0
+-0.274286 -0.371795 -0.138676 0 1 0
+-0.141345 0.371795 -0.208281 0 1 0
+0.197482 -0.053429 0.366187 0.955352 -0.256776 -0.146183
+0.5 0.0941768 -0.0155458 1 0 0
+0.141109 -0.306254 -0.0336677 0.999502 0.0309874 -0.00592585
+-0.5 -0.0434898 0.253346 1 0 0
+-0.472015 -0.284812 -0.371795 0.0151128 0.030559 0.999419
+0.206294 -0.0296362 -0.116678 0.64384 0.76516 0
+-0.162136 0.246683 0.371795 0.00317723 0.117387 0.993081
+0.370578 -0.329603 0.320513 0 0 1
+0.242433 -0.371795 -0.0892451 0 1 0
+-0.320513 0.0538155 -0.349719 1 0 0
+0.460158 -0.0099866 -0.371795 0 0 1
+0.147888 -0.150214 -0.333333 0 0 1
+0.281297 -0.048505 -0.333333 0 0 1
+0.236842 0.294872 -0.0324191 0 1 0
+0.239732 0.16416 0.371795 0 0 1
+0.456088 0.153344 0.320513 0 0 1
+-0.482759 -0.294872 0.240159 0 1 0
+0.320513 0.00351363 -0.339831 0.961739 0.0479241 0.269743
+-0.0417252 0.371795 0.125096 0 1 0
+-0.141154 -0.303641 0.249794 0.998997 -0.0429637 0.0126365
+-0.5 -0.280264 0.188716 1 0 0
+0.424787 0.294872 0.00388321 0 1 0
+-0.474884 -0.294872 -0.147259 0 1 0
+0.396451 0.294872 0.0375421 0 1 0
+-0.5 0.0149662 0.30606 1 0 0
+0.5 -0.263359 -0.334118 1 0 0
+0.0624194 0.194845 0.353672 0.324724 0.945809 0
+-0.344944 0.0436642 0.371795 0 0 1
+0.0677854 0.109221 -0.333333 0 0 1
+0.148969 0.294872 -0.353965 0.117651 0.992216 -0.0408037
+-0.479326 -0.294872 -0.303688 0 1 0
+-0.170586 0.371795 0.018634 0 1 0
+0.5 -0.0913886 0.0630247 1 0 0
+-0.5 -0.0813834 0.306769 1 0 0
+0.154385 -0.371795 -0.342283 0 1 0
+0.402365 0.294872 -0.084521 0 1 0
+0.169727 0.257405 0.320513 0.129838 0.243118 0.961268
+-0.448718 -0.367347 -0.0878566 0.883949 0.467058 0.0221682
+0.0517863 -0.294872 -0.286817 0 1 0
+-0.5 0.076781 -0.348116 1 0 0
+0.285055 0.201904 0.334757 0.599284 0.800536 0
+-0.5 -0.0164826 -0.102148 1 0 0
+0.0239873 -0.294872 0.111221 0 1 0
+0.222091 -0.207005 -0.333333 0 0 1
+-0.392752 0.14193 -0.371795 0 0 1
+0.0642828 -0.227045 0.371795 0 0 1
+0.160894 -0.296149 -0.371795 0 0 1
+-0.43555 -0.0696801 -0.371795 0 0 1
+0.0197032 0.0457058 -0.333333 0 0 1
+0.0373685 -0.159348 -0.333333 0 0 1
+0.5 0.222146 0.206493 1 0 0
+0.368425 -0.130814 0.320513 0 0 1
+0.496401 -0.260046 0.320513 0.450576 0.0196765 0.892521
+0.309729 -0.237326 0.320513 0 0 1
+-0.307324 -0.371795 -0.14726 0 1 0
+-0.448718 -0.316081 0.104596 1 0 0
+-0.437209 -0.371795 -0.245104 0.00373873 0.99999 -0.00255883
+-0.419069 -0.371795 -0.0189255 0 1 0
+0.5 0.0423228 0.227129 1 0 0
+0.469247 -0.294872 -0.280654 0 1 0
+-0.5 -0.0644417 -0.359807 0.999959 -0.000674824 0.00902369
+0.448718 -0.304979 -0.312784 0.996065 -0.0769601 -0.0439574
+-0.5 -0.0966652 -0.302038 1 0 0
+0.233413 -0.316152 0.320513 0 0 1
+-0.5 -0.0207829 -0.278552 1 0 0
+-0.191021 -0.01751 -0.151748 0.910062 -0.414433 0.00574628
+-0.5 0.171323 -0.31009 1 0 0
+0.078627 0.371795 0.232465 0 1 0
+0.0401308 0.371795 0.136758 0 1 0
+0.174421 0.294872 0.18609 0 1 0
+-0.5 0.0164931 -0.136294 1 0 0
+-0.5 -0.252499 -0.0118711 1 0 0
+-0.234685 0.371795 -0.308096 0 1 0
+0.5 0.2764 -0.108194 1 0 0
+0.177834 0.286878 -0.371795 -0.0318902 -0.14377 0.989097
+0.225297 0.0379827 -0.12756 -0.154274 0.987996 0.00796968
+-0.5 0.106565 -0.146481 1 0 0
+0.281354 0.130694 0.371795 0 0 1
+-0.249452 -0.218487 -0.333333 0 0 1
+-0.447807 0.188018 0.320513 0 0 1
+-0.490568 0.132474 0.320513 -0.158654 -0.0327717 0.98679
+0.0601014 0.371795 -0.0527466 0 1 0
+-0.30498 -0.095546 -0.333333 0 0 1
+-0.292365 0.371795 -0.19441 0 1 0
+0.238751 -0.371795 0.315568 0.128612 0.909336 -0.395685
+-0.173791 -0.0720541 0.320513 0 0 1
+-0.42758 0.211402 0.320513 0 0 1
+-0.5 -0.269686 0.149726 1 0 0
+0.0939059 -0.256282 0.366458 0.136199 0.947217 -0.290223
+0.199503 0.163739 0.371795 0 0 1
+-0.131886 -0.230897 -0.334949 0.0593289 -0.582048 0.810988
+0.160488 0.294872 -0.314146 0 1 0
+0.043112 -0.294872 0.286555 0 1 0
+0.5 0.213629 -0.217479 1 0 0
+0.141109 -0.307179 0.0502172 1 0 0
+0.5 -0.0388105 -0.104478 1 0 0
+0.190382 -0.371795 0.0798926 0 1 0
+0.320513 0.0891327 -0.333765 0.728329 -0.0101271 0.685153
+0.082277 0.371795 0.0765122 0 1 0
+0.5 -0.220829 -0.0417844 1 0 0
+-0.5 -0.0939829 0.183704 1 0 0
+0.160101 -0.371795 0.102592 0 1 0
+-0.296559 -0.371795 -0.176861 0 1 0
+-0.305957 0.268941 -0.371795 0 0 1
+-0.183546 -0.371795 0.0755098 0 1 0
+-0.00365999 0.193814 -0.333333 0 0 1
+-0.174814 -0.371795 -0.300779 0 1 0
+-0.5 -0.233642 0.00419426 1 0 0
+-0.5 0.149015 0.241975 1 0 0
+-0.5 0.231687 -0.281488 1 0 0
+-0.111509 -0.294872 0.281215 0 1 0
+-0.5 0.00415353 0.0880248 1 0 0
+-0.0567986 -0.294872 0.00445236 0 1 0
+-0.38016 -0.371795 0.089047 0 1 0
+0.198188 -0.246051 0.371795 0.0495899 -0.48449 0.87339
+0.0302394 0.371795 0.020321 0 1 0
+0.5 0.24689 -0.203503 1 0 0
+-0.314748 -0.182699 -0.358526 0.928031 0.372502 0.00081786
+-0.400903 0.176248 0.320513 0 0 1
+0.5 0.228365 -0.0629198 1 0 0
+0.195065 0.294872 -0.0492675 0 1 0
+-0.5 0.208997 0.225961 1 0 0
+0.28655 -0.200257 0.371795 -0.611882 0.413593 -0.674197
+-0.5 -0.196649 -0.191683 1 0 0
+-0.5 0.260633 0.0738084 1 0 0
+0.19284 0.00608843 -0.0660909 0.98858 -0.150588 0.00574112
+0.0285905 0.230897 -0.335724 0.0197945 0.934147 0.35634
+0.330917 0.281568 0.320513 0 0 1
+0.08098 -0.230897 -0.343447 0 1 0
+0.148415 -0.350274 -0.371795 0.125201 -0.00392541 0.992124
+0.0546812 0.371795 -0.341326 0 1 0
+0.113968 -0.173984 -0.333333 0 0 1
+-0.5 -0.0300754 0.203605 1 0 0
+-0.290788 -0.371795 -0.291535 0 1 0
+-0.445294 -0.156263 0.320513 0 0 1
+-0.5 -0.240883 -0.128225 1 0 0
+-0.5 0.0919682 -0.157205 1 0 0
+-0.393856 -0.165171 -0.371795 0 0 1
+-0.163771 -0.123324 0.358887 0.81323 0.581933 0.00339521
+-0.17995 0.0819726 -0.333333 0 0 1
+0.321702 -0.371795 -0.245993 0 1 0
+-0.320226 -0.371795 0.0884516 0 1 0
+-0.5 -0.0295066 0.199835 1 0 0
+-0.377187 -0.0439501 -0.371795 0 0 1
+0.486125 -0.294872 -0.027885 0 1 0
+-0.0358555 0.371795 -0.255643 0 1 0
+0.388826 -0.371795 0.124655 0 1 0
+-0.292169 0.371795 0.211264 0 1 0
+0.235101 -0.116925 -0.333333 0 0 1
+0.257041 0.0757411 0.371795 0 0 1
+0.219945 0.0367663 -0.0725025 -0.246824 0.969038 0.00652529
+-0.5 -0.227012 -0.345309 1 0 0
+0.263199 -0.0204855 -0.177198 0.870671 -0.491865 0
+-0.239427 -0.103747 -0.333333 0 0 1
+0.5 -0.20664 0.250596 1 0 0
+0.5 -0.0352852 0.0916802 1 0 0
+-0.5 0.0588081 -0.157453 1 0 0
+-0.338417 0.0147027 -0.371795 0 0 1
+-0.315722 0.075184 0.371795 0 0 1
+-0.5 0.130129 0.121006 1 0 0
+-0.312682 0.351652 -0.371795 0 0 1
+-0.15356 0.371795 -0.0979661 0 1 0
+-0.382347 0.371795 -0.0546355 0 1 0
+-0.5 -0.0999231 0.27546 1 0 0
+-0.5 -0.0955383 0.280964 1 0 0
+-0.44426 -0.371795 -0.298138 0.387298 0.895 -0.221305
+-0.5 0.158395 -0.0947512 1 0 0
+0.00220019 -0.160947 0.320513 0 0 1
+0.427197 0.294872 -0.144172 0 1 0
+-0.5 0.274478 -0.0792931 1 0 0
+0.454551 -0.294872 -0.113192 -0.274374 0.953047 0.12814
+-0.00857692 0.355556 0.320513 0 0 1
+-0.444969 -0.371795 0.214586 0.597942 0.801507 0.00722012
+-0.104795 0.084793 -0.333333 0 0 1
+0.337784 0.157537 0.320513 0.199778 0.245521 0.948582
+0.5 0.208451 -0.0753631 1 0 0
+-0.202659 0.371795 -0.0248118 0 1 0
+-0.5 0.305331 0.257392 1 0 0
+-0.452095 -0.294872 0.090281 0.3862 0.917587 0.094255
+0.333845 -0.284549 -0.371795 0 0 1
+-0.5 0.230413 -0.200579 1 0 0
+0.448718 -0.356028 0.162558 1 0 0
+0.0922804 0.157726 -0.333333 0 0 1
+-0.5 0.190602 0.269153 1 0 0
+-0.0600806 0.371795 -0.302571 0 1 0
+0.431119 -0.299489 0.320513 0 0 1
+0.5 -0.118343 -0.297211 1 0 0
+-0.5 -0.151741 0.154097 1 0 0
+-0.291864 -0.0796076 0.371795 0 0 1
+-0.5 0.322529 -0.161669 1 0 0
+-0.241063 -0.287313 0.320513 0 0 1
+0.5 -0.00222306 -0.269218 1 0 0
+-0.5 -0.104742 -0.3061 1 0 0
+0.290121 -0.371795 0.203001 0 1 0
+-0.269487 -0.371795 0.141567 0 1 0
+-0.176047 -0.371795 -0.0306694 0 1 0
+-0.267187 -0.0236975 -0.313386 0.845078 0.534644 0
+0.448718 -0.360601 0.253229 1 0 0
+-0.415487 0.371795 0.286875 0 1 0
+0.407839 0.294872 0.155455 0 1 0
+0.247191 0.294872 -0.135764 0 1 0
+0.193732 -0.0098144 -0.177345 0.97822 0.207467 0.00656782
+-0.285888 -0.371795 0.271678 0 1 0
+0.106393 -0.272069 -0.371795 0 0 1
+0.5 -0.29004 0.134951 0.969199 -0.23494 -0.0738636
+0.273762 -0.277662 -0.371795 0 0 1
+0.424969 0.294872 0.199492 0 1 0
+0.141109 -0.31046 0.00675928 1 0 0
+-0.212351 -0.00970003 -0.0216058 0.442542 -0.250487 0.861053
+0.413255 -0.039377 -0.371795 0 0 1
+-0.0704682 -0.0138284 0.320513 0 0 1
+-0.5 -0.228394 -0.355792 1 0 0
+0.443211 -0.262766 0.320513 0 0 1
+-0.288053 -0.371795 -0.332757 0 1 0
+-0.5 -0.125845 -0.274972 1 0 0
+0.483252 0.20041 -0.371795 0 0 1
+-0.141154 -0.313104 0.223018 1 0 0
+-0.441697 0.0832988 -0.371795 0 0 1
+0.175287 -0.371795 0.222098 0 1 0
+-0.198431 0.0290726 -0.175667 0.768103 0.640292 0.0066645
+-0.0922029 0.130248 -0.333333 0 0 1
+-0.0822531 0.0471531 0.320513 0 0 1
+0.141109 -0.340135 -0.0799317 1 0 0
+0.314876 -0.0955235 0.371795 0 0 1
+0.5 -0.2666 0.152164 1 0 0
+-0.321056 0.371795 -0.211189 0 1 0
+0.386963 -0.285118 0.320513 0 0 1
+-0.426583 0.371795 -0.0641331 0 1 0
+-0.149761 0.371795 -0.206618 0 1 0
+-0.5 -0.177714 0.129201 1 0 0
+-0.141154 -0.365189 0.070933 0.953935 -0.300013 0
+0.5 -0.0823166 -0.065837 1 0 0
+0.164652 -0.253675 0.360178 -0.150306 0.988623 -0.00576361
+0.383317 0.143942 -0.371795 0 0 1
+0.318668 -0.110793 0.371795 0 0 1
+0.5 -0.280201 0.21599 1 0 0
+-0.5 0.0745808 0.096197 1 0 0
+-0.5 -0.183235 -0.336779 1 0 0
+0.278877 0.237827 0.320513 0 0 1
+0.124595 0.371795 0.0410939 0 1 0
+-0.215963 0.151634 0.371795 0 0 1
+0.332731 -0.371795 -0.216879 0 1 0
+-0.340213 0.00745055 -0.371795 0 0 1
+-0.187636 -0.00522015 -0.189265 0.991014 -0.133126 0.0129724
+0.5 0.0398178 0.135721 1 0 0
+-0.0406036 0.371795 0.272137 0 1 0
+-0.5 -0.121126 -0.0506914 1 0 0
+-0.403123 0.371795 -0.158341 0 1 0
+0.286523 -0.0208193 -0.333333 0 0 1
+-0.141154 -0.336744 0.144182 1 0 0
+0.016369 0.304416 -0.371795 0 0 1
+0.170811 -0.199731 0.371795 0 0 1
+-0.5 0.0841417 0.235634 1 0 0
+0.0516192 0.371795 -0.355051 0 1 0
+0.319091 -0.371795 -0.0330979 0 1 0
+0.207918 0.0877629 0.371795 0 0 1
+-0.0208685 -0.14121 0.320513 0 0 1
+0.5 0.0256825 -0.0582642 1 0 0
+-0.351295 -0.371795 -0.326657 0 1 0
+0.365543 0.294872 0.181247 0 1 0
+0.131598 0.371795 -0.0971126 0.0672176 0.997279 -0.0302864
+0.282393 -0.371795 0.0425008 0 1 0
+0.367964 -0.272112 -0.371795 0 0 1
+-0.5 -0.223118 -0.2353 1 0 0
+-0.337672 -0.134532 0.371795 -0.074199 -0.0976262 0.992453
+-0.205063 0.182281 0.371795 0 0 1
+-0.155758 -0.190404 -0.333333 0 0 1
+-0.0988116 -0.0494046 0.320513 0 0 1
+-0.00187167 0.371795 -0.146294 0 1 0
+-0.387077 -0.371795 -0.340277 0 1 0
+-0.239936 -0.169714 -0.333333 0 0 1
+0.141026 0.313591 0.135956 1 0 0
+0.158441 -0.277281 -0.371795 0 0 1
+-0.5 0.21245 0.280095 1 0 0
+0.340569 -0.371795 0.0333108 0 1 0
+-0.5 0.262764 0.218456 1 0 0
+-0.399226 0.371795 -0.287371 0 1 0
+0.337643 0.124666 -0.371795 0 0 1
+-0.5 0.277809 0.00995037 1 0 0
+0.382268 -0.0310263 0.347588 0.996203 -0.0868942 0.00546067
+0.170783 0.294872 -0.123606 0 1 0
+-0.484232 0.371795 -0.138421 0 1 0
+0.0103496 0.371795 0.303656 0 1 0
+-0.193747 -0.371795 0.320221 0.0583072 -0.541954 0.838383
+0.407719 -0.298 0.320513 0 0 1
+0.145655 0.0508615 0.320513 0 0 1
+-0.385459 0.371795 0.190371 0 1 0
+-0.5 0.156783 -0.0585262 1 0 0
+-0.0253372 0.256282 0.369772 0.164058 0.755078 0.634777
+-0.0559641 -0.0397259 0.320513 0 0 1
+-0.390473 -0.371795 0.0955234 0 1 0
+-0.5 0.0783041 -0.0665814 1 0 0
+-0.169466 0.0668111 0.320513 0 0 1
+0.173886 -0.371795 -0.0958797 0 1 0
+0.282066 0.294872 -0.192753 0 1 0
+-0.5 0.204992 -0.267731 1 0 0
+-0.228925 -0.369402 -0.371795 0.103945 0.282238 0.953696
+0.07643 0.256282 0.334264 0 1 0
+-0.453323 0.371795 -0.162387 0 1 0
+-0.0294257 -0.294872 0.123772 0 1 0
+-0.330468 0.371795 0.230611 0 1 0
+0.0410328 0.371795 0.000417297 0 1 0
+0.427062 -0.266981 -0.371795 0 0 1
+0.114937 -0.169754 0.347053 -0.565545 0.824517 0.0182051
+0.101305 -0.0197379 0.320513 0 0 1
+0.141026 0.352473 0.0536615 1 0 0
+0.5 -0.248829 -0.104883 1 0 0
+0.083563 0.256282 0.371623 -0.0343663 0.416876 0.908314
+0.5 -0.281585 -0.368309 0.879324 0.117396 -0.461527
+0.0525505 -0.294872 -0.317049 0 1 0
+-0.419499 -0.114913 0.320513 0 0 1
+0.320513 0.0638999 -0.361062 0.994136 -0.0257163 0.105033
+0.253591 -0.371795 -0.253785 0 1 0
+0.0489355 -0.0245867 -0.333333 0 0 1
+0.336045 -0.309399 0.320513 0 0 1
+-0.5 0.329862 -0.131842 1 0 0
+-0.5 -0.229742 -0.271603 1 0 0
+-0.320513 -0.0955584 -0.345003 1 0 0
+0.25952 -0.0286737 0.371795 0 0 1
+-0.5 -0.213662 -0.246635 1 0 0
+0.116779 0.371795 -0.225445 0 1 0
+0.323839 0.276191 0.320513 0 0 1
+0.0760751 0.371795 0.251493 0 1 0
+0.0607354 -0.294872 -0.218878 0 1 0
+-0.220196 -0.265641 0.320513 0 0 1
+0.322373 -0.371795 -0.294779 0 1 0
+-0.0911702 -0.294872 0.145059 0 1 0
+-0.5 -0.0784529 0.257434 1 0 0
+0.117976 0.211719 0.371795 0 0 1
+0.5 0.207015 -0.191775 1 0 0
+0.413497 -0.371795 -0.120123 0 1 0
+-0.129578 0.298707 -0.371795 0 0 1
+-0.438455 0.289562 0.320513 0 0 1
+-0.117306 -0.294872 -0.229949 0 1 0
+0.442666 -0.00429862 0.320513 0 0 1
+0.5 0.186676 0.271487 1 0 0
+-0.320051 -0.159249 -0.346461 0.995564 0.0940599 -0.00220309
+-0.5 0.363294 0.0660605 0.994556 -0.100912 -0.0259965
+0.414898 -0.298135 -0.371795 0 0 1
+0.281399 -0.371795 -0.229164 0 1 0
+0.120668 -0.24187 0.371795 0 0 1
+-0.325304 0.236173 0.320513 0 0 1
+0.5 -0.135081 -0.00816132 1 0 0
+-0.162774 0.12485 0.352612 0.809488 -0.587129 -0.00291677
+-0.364022 -0.3042 -0.371795 0 0 1
+0.5 -0.093527 -0.239845 1 0 0
+-0.5 -0.0372752 -0.00232788 1 0 0
+-0.46598 -0.294872 -0.258204 0 1 0
+-0.436264 -0.119671 -0.371795 0 0 1
+0.5 0.0863434 0.253163 1 0 0
+-0.0100283 0.183839 0.320513 0 0 1
+-0.393901 -0.273637 0.320513 0 0 1
+0.218208 -0.036301 -0.145214 0.303641 0.952703 -0.0126248
+-0.0900512 -0.271417 -0.371795 0 0 1
+0.5 -0.284016 0.257576 0.99457 -0.102026 0.0205104
+-0.357924 -0.371795 0.00751533 0 1 0
+-0.188371 0.371795 0.148082 0 1 0
+-0.200088 0.371795 0.0448812 0 1 0
+-0.448743 -0.0968291 -0.371795 0 0 1
+0.255133 -0.371795 0.171387 0 1 0
+0.266125 -0.0417709 -0.333333 0 0 1
+-0.448718 -0.37094 0.275213 0.917049 0.377139 0.129565
+-0.469055 -0.0818854 0.320513 0 0 1
+0.5 -0.081377 0.154946 1 0 0
+-0.0695027 0.371795 -0.103396 0 1 0
+-0.0661856 -0.179393 -0.333333 0 0 1
+-0.028796 0.278487 0.320513 0 0 1
+-0.415777 -0.371795 0.291681 0 1 0
+0.456115 -0.15667 0.320513 0 0 1
+-0.488787 0.357955 0.320513 0 0 1
+0.476993 -0.00149563 0.320513 0 0 1
+0.0976327 0.295433 0.320513 0 0 1
+0.333288 -0.0536531 0.371795 0 0 1
+0.5 0.0804436 -0.212753 1 0 0
+0.383783 -0.192636 -0.371795 0 0 1
+0.245443 -0.371795 -0.327353 0 1 0
+-0.0632597 -0.294872 0.200546 0 1 0
+-0.5 0.28071 0.122964 1 0 0
+-0.248883 0.173228 0.371795 0 0 1
+-0.437168 0.264316 -0.371795 0 0 1
+0.40817 -0.132137 0.320513 0 0 1
+0.474425 0.294872 -0.185073 0 1 0
+-0.128074 -0.294872 0.140704 0 1 0
+0.141026 0.329989 -0.268378 1 0 0
+-0.448718 -0.300867 0.203798 0.970535 0.187778 -0.151001
+0.311929 -0.371795 0.17379 0 1 0
+0.319593 0.294872 -0.081362 0 1 0
+0.180909 -0.0968009 0.33625 0.883513 -0.468119 0.0164058
+-0.12389 0.223631 -0.333333 0.00782457 0.0729877 0.997302
+0.192412 -0.001187 -0.139847 0.99944 0.0234248 -0.0238956
+0.491795 -0.294872 0.163147 -0.0571145 0.997469 -0.0423448
+0.141026 0.336308 -0.240357 1 0 0
+-0.141154 -0.301081 0.125114 0.985263 -0.17098 -0.00480786
+-0.5 -0.0468056 0.268204 1 0 0
+-0.5 -0.110138 -0.127572 1 0 0
+-0.490278 0.371795 -0.309634 -0.182383 0.98218 -0.0453825
+0.304843 0.0948464 -0.333333 0 0 1
+0.100466 0.0876955 0.320513 0 0 1
+-0.258431 0.371795 -0.155351 0 1 0
+-0.360702 0.363811 0.320513 0 0 1
+0.0763851 -0.0724702 0.320513 0 0 1
+-0.5 0.0811516 0.0687988 1 0 0
+-0.368299 0.371795 0.0777804 0 1 0
+-0.204614 0.0346969 -0.329601 0.485018 0.787928 0.379377
+-0.5 -0.0259764 -0.352629 1 0 0
+0.180935 -0.352754 0.320513 0 0 1
+-0.0688246 0.0304049 -0.333333 0 0 1
+-0.209551 0.0396563 -0.333333 0.176999 0.440663 0.88005
+-0.0404416 0.0381427 0.320513 0 0 1
+0.217747 -0.371795 0.186226 0 1 0
+-0.334994 0.371795 0.284566 0 1 0
+0.155746 0.132839 0.32764 0.715107 0.69428 -0.0812263
+0.40227 0.204113 0.320513 0 0 1
+0.204876 -0.00459025 0.358652 0.999072 -0.0430518 -0.00150002
+-0.388941 0.371795 0.314016 0.0104519 0.996232 0.086101
+-0.5 0.0178051 -0.15954 1 0 0
+-0.00211146 0.0123612 0.320513 0 0 1
+0.462021 0.294872 -0.322988 0 1 0
+0.222185 0.294872 0.231181 0 1 0
+0.357619 0.294872 0.0205654 0 1 0
+-0.00822587 0.371795 0.178044 0 1 0
+0.0779203 -0.294872 -0.0440458 0 1 0
+-0.288026 0.2471 -0.371795 0 0 1
+-0.0160709 0.265079 0.320513 -0.0255684 0.0313645 0.999181
+0.206098 -0.0284391 0.00045868 0.596029 0.705857 -0.382774
+-0.141154 -0.333926 0.261882 1 0 0
+-0.366559 0.371795 0.152983 0 1 0
+-0.301427 0.363362 -0.371795 -0.0216664 -0.0652084 0.997636
+-0.247517 0.0401034 -0.277314 -0.351768 0.936087 0
+0.186243 -0.0286027 0.320513 0 0 1
+0.141026 0.30904 0.114199 1 0 0
+0.240435 -0.229974 0.333752 -0.468733 0.883324 0.00528315
+-0.156083 -0.371795 -0.0357602 0 1 0
+0.00564555 -0.211225 -0.333333 0 0 1
+0.085543 -0.294872 0.0113563 0 1 0
+-0.0942573 -0.294872 0.229643 0 1 0
+0.0311165 -0.108111 -0.333333 0 0 1
+-0.5 -0.00617983 -0.0871769 1 0 0
+-0.5 0.130605 -0.327885 1 0 0
+-0.141745 -0.22295 0.371795 0 0 1
+0.193458 -0.078913 0.371795 -0.383333 0.0974265 0.918458
+0.141026 0.298078 -0.185444 0.773464 0.633782 0.00858997
+-0.0642944 -0.100508 -0.333333 0 0 1
+0.416288 -0.371795 0.286623 0 1 0
+0.270976 -0.0984437 0.371795 0 0 1
+-0.0475875 0.371795 0.0836369 0 1 0
+0.5 -0.0802979 0.0262512 1 0 0
+0.423365 0.221673 0.320513 0 0 1
+-0.0316306 -0.294872 -0.131358 0 1 0
+0.471266 -0.244149 -0.371795 0 0 1
+0.233384 0.0794766 0.371795 0 0 1
+0.325562 -0.222619 -0.371795 0 0 1
+-0.5 0.34518 0.160566 1 0 0
+0.124884 -0.294872 0.293608 0 1 0
+0.5 0.287409 0.0977488 0.951139 0.30779 0.0245065
+0.419995 -0.0455435 -0.371795 0 0 1
+-0.426557 -0.0848626 -0.371795 0 0 1
+-0.141154 -0.370644 -0.195203 -0.493656 0.861496 -0.118862
+0.253414 0.222887 0.339282 0.479244 0.877682 0
+0.320513 -0.00396656 -0.335522 0.706063 -0.087391 0.702736
+0.367287 0.294872 -0.0594007 0 1 0
+-0.120131 0.256282 0.339245 0 1 0
+-0.331622 -0.371795 -0.00140945 0 1 0
+-0.348106 0.371795 -0.0509142 0 1 0
+0.0550598 -0.182279 0.320513 0 0 1
+-0.5 0.0874844 0.0881693 1 0 0
+0.34762 -0.141504 0.320513 0.227995 -0.00384269 0.973655
+-0.178146 0.113024 0.371795 0.0076844 -0.00291574 0.999966
+-0.257002 0.371795 0.0268634 0 1 0
+-0.4067 0.203408 0.320513 0 0 1
+0.5 0.214936 -0.274104 1 0 0
+-0.5 0.360502 -0.33507 1 0 0
+0.5 0.109431 -0.168861 1 0 0
+0.258985 0.103204 -0.333333 0 0 1
+0.5 0.143528 0.0865514 1 0 0
+0.194743 0.064247 0.325532 0.940608 0.216556 -0.261458
+-0.359682 0.313798 -0.371795 0 0 1
+-0.126129 0.371795 0.0404923 0 1 0
+-0.203986 0.0153334 0.344505 0.996583 -0.0825956 0
+-0.0829796 -0.280887 0.320513 0 0 1
+0.288369 -0.0233704 0.371795 0 0 1
+0.09721 0.371795 0.309744 0.00363735 0.998082 0.0618033
+0.395321 0.164129 -0.371795 0 0 1
+-0.0175975 -0.294872 -0.131868 0 1 0
+-0.5 0.136912 0.277391 1 0 0
+-0.109845 0.371795 -0.150502 0 1 0
+-0.5 -0.0472194 -0.149898 1 0 0
+-0.36344 -0.0734118 0.371795 -0.0156923 -0.000172276 0.999877
+0.184084 0.274402 -0.371795 0 0 1
+0.190354 -0.371795 -0.368324 -0.0507065 0.866154 0.497198
+-0.262374 -0.0108769 -0.0291763 -0.495121 -0.157612 0.854408
+-0.5 0.10603 -0.266706 1 0 0
+-0.5 -0.0326467 -0.198229 1 0 0
+-0.457404 -0.294872 -0.340166 0.182989 0.98203 0.0461801
+0.0572838 -0.294872 -0.159188 0 1 0
+0.0116489 0.371795 -0.017674 0 1 0
+-0.370609 0.0815777 0.365524 0.835553 -0.524288 -0.164237
+0.111624 0.0841872 0.320513 0 0 1
+0.144583 -0.371795 -0.182972 0.505709 0.861409 -0.0472527
+-0.5 -0.218839 0.319261 -0.515187 0.00244269 0.857074
+-0.378289 -0.371795 0.171959 0 1 0
+-0.38321 0.0178529 0.340587 0.997445 -0.0714361 -3.59729e-005
+0.367824 0.142477 0.320513 0 0 1
+-0.159102 -0.371795 -0.0939307 0 1 0
+0.100037 0.371795 0.175047 0 1 0
+0.0332905 -0.294872 0.127281 0 1 0
+0.25437 -0.0302487 -0.0681849 -0.637938 0.770069 0.00539544
+-0.5 0.243141 0.199273 1 0 0
+0.420667 -0.361318 0.320513 0 0 1
+0.11939 0.371795 0.0566892 0 1 0
+-0.282006 0.220613 -0.335176 -0.298372 0.792967 0.531203
+0.5 0.0808478 -0.00601848 1 0 0
+-0.19612 0.0588086 0.325051 0.864044 -0.186576 0.467565
+0.262359 0.097186 -0.333333 0 0 1
+-0.141154 -0.359648 -0.22977 1 0 0
+0.228895 -0.025582 0.371795 0 0 1
+-0.231789 -0.0435005 -0.330495 -0.0640853 0.888839 -0.453716
+0.0880616 -0.294872 0.317793 0.00243904 0.929745 -0.368196
+0.448718 -0.361891 0.278609 0.992642 -0.117771 -0.0281332
+0.411747 -0.1138 0.320513 0 0 1
+-0.200287 0.334581 0.320513 0 0 1
+-0.471594 0.371795 0.314812 -0.137221 0.983945 0.114121
+0.315967 0.173752 0.331457 0.71134 0.702846 0.00167445
+0.439312 0.194295 0.320513 0 0 1
+0.450436 -0.294872 -0.259433 -0.521576 0.848183 -0.0924356
+-0.0882162 0.371795 -0.218676 0 1 0
+0.5 0.115919 -0.275371 1 0 0
+-0.5 -0.0110515 -0.0616646 1 0 0
+0.5 -0.17007 0.0583169 1 0 0
+0.329316 0.294872 0.283492 0 1 0
+0.286812 -0.371795 0.212931 0 1 0
+-0.0409988 0.272426 -0.371795 0 0 1
+-0.486451 -0.294872 -0.267201 0 1 0
+-0.141154 -0.306486 0.10186 0.999722 -0.0229028 0.00561506
+0.176004 0.1046 0.337259 0.841358 0.540446 -0.00588494
+0.152712 -0.371795 0.132599 0 1 0
+0.270415 0.294872 -0.107962 0 1 0
+0.497577 -0.294872 -0.273695 -0.153204 0.988194 -0.00138723
+-0.5 -0.0321244 0.194157 1 0 0
+-0.435851 0.371795 -0.203347 0 1 0
+-0.0144605 -0.294872 -0.247461 0 1 0
+0.448718 -0.362656 -0.157958 0.991898 -0.123274 -0.0306784
+-0.5 -0.0571214 -0.175532 1 0 0
+0.141026 0.366213 0.0765103 0.98012 0.196452 0.0277877
+0.5 -0.0478441 0.0270344 1 0 0
+0.166597 -0.290298 -0.371795 0 0 1
+0.0213929 -0.256282 0.368963 -0.0974619 0.950602 -0.294717
+-0.413945 0.371795 0.131994 0 1 0
+-0.171067 0.371795 -0.0526739 0 1 0
+0.212118 -0.230897 -0.367157 0.020065 0.776454 -0.629855
+-0.158353 0.371795 -0.200172 0 1 0
+0.5 -0.00766539 -0.369845 0.844533 0.134012 -0.518464
+-0.398929 0.337152 -0.371795 0 0 1
+-0.418001 -0.307663 -0.371795 0 0 1
+0.380868 -0.162057 -0.371795 0 0 1
+-0.5 0.108396 0.0970335 1 0 0
+-0.0416185 0.0301582 0.320513 0 0 1
+0.5 0.106895 0.134658 1 0 0
+-0.297497 -0.371795 -0.119291 0 1 0
+-0.5 0.276931 -0.190681 1 0 0
+-0.348268 -0.371795 -0.256443 0 1 0
+-0.347903 0.142317 -0.371795 0 0 1
+0.198251 0.230897 -0.359516 0 1 0
+0.141026 0.34406 0.207326 1 0 0
+-0.225286 -0.0431101 -0.136886 -0.109918 0.992459 0.0542565
+-0.34464 0.137023 0.357362 0.853701 -0.520622 0.0121103
+0.5 0.208128 -0.140392 1 0 0
+-0.382208 -0.246274 -0.371795 0 0 1
+-0.252143 -0.0450891 0.371795 0 0 1
+-0.5 -0.0101547 0.275656 1 0 0
+0.0558307 0.259176 -0.371795 0 0 1
+-0.5 -0.00436099 0.177617 1 0 0
+0.0160462 0.371795 -0.185175 0 1 0
+-0.254457 -0.371795 0.278556 0 1 0
+-0.378408 0.0524297 0.356036 0.977146 -0.212567 0
+0.00461599 -0.0402428 -0.333333 0 0 1
+-0.303814 0.216348 0.320513 0 0 1
+-0.304785 -0.371795 -0.184616 0 1 0
+-0.390119 0.371795 0.0398468 0 1 0
+0.104906 0.32207 0.320513 0 0 1
+0.5 0.253677 0.0394442 1 0 0
+-0.0402993 -0.294872 0.275165 0 1 0
+0.231536 0.188361 0.371795 0 0 1
+-0.199055 0.371795 0.173478 0 1 0
+0.485486 0.235355 -0.371795 0 0 1
+-0.367873 -0.371795 0.298918 0 1 0
+-0.5 -0.0531814 0.215662 1 0 0
+0.448718 -0.316743 -0.0768512 1 0 0
+0.342119 -0.213327 -0.371795 0 0 1
+0.348285 0.294872 -0.124703 0 1 0
+-0.0726236 -0.294872 0.255562 0 1 0
+0.414954 -0.183187 0.320513 0 0 1
+0.11058 -0.241686 0.371795 0 0 1
+0.408527 0.226329 0.320513 0 0 1
+-0.102587 -0.171372 -0.333333 0 0 1
+0.320513 -0.0776219 -0.339861 0.956383 0.126185 0.263454
+-0.270828 -0.371795 -0.00300347 0 1 0
+0.0248431 0.288674 -0.371795 0 0 1
+-0.208745 0.302354 -0.371795 0 0 1
+-0.39537 -0.0187227 -0.371795 0 0 1
+0.362877 -0.371795 0.317003 -0.00488709 0.85131 -0.52464
+-0.181608 -0.0626321 -0.333333 0 0 1
+0.141109 -0.315265 0.135359 1 0 0
+0.111107 0.371795 -0.287211 0 1 0
+-0.212789 -0.371795 0.105713 0 1 0
+-0.113678 0.256282 0.370236 0.0250067 0.909054 0.415927
+-0.0953104 -0.294872 -0.195199 0 1 0
+0.360968 0.294872 0.0128312 0 1 0
+0.5 0.200391 -0.118106 1 0 0
+0.213453 0.218203 0.371795 0 0 1
+0.5 -0.0369416 0.0056359 1 0 0
+0.441419 -0.0524597 -0.371795 0 0 1
+0.226379 0.0380774 -0.295912 -0.0531285 0.998493 -0.013721
+0.316859 -0.35161 0.320513 0 0 1
+0.448718 -0.312527 -0.26707 1 0 0
+-0.474664 -0.0165271 -0.371795 0 0 1
+0.141026 0.369246 -0.00329063 0.655036 0.75555 0.00848908
+0.258361 0.294872 -0.2401 0 1 0
+-0.181569 0.371795 -0.152411 0 1 0
+0.223153 0.0376259 -0.209867 -0.18467 0.982673 0.0158446
+0.211719 -0.371795 -0.0344635 0 1 0
+0.455996 -0.13386 0.320513 0 0 1
+0.258613 -0.170439 -0.333333 0 0 1
+0.5 -0.238053 -0.0915953 1 0 0
+-0.236753 0.322045 0.320513 0 0 1
+-0.00614388 0.371795 0.26395 0 1 0
+-0.5 0.106815 -0.289857 1 0 0
+0.5 0.191874 0.0832444 1 0 0
+0.259655 -0.0113168 0.00443469 0.484801 -0.18242 0.855389
+-0.268167 0.204234 0.371795 -0.0858238 0.097265 0.991551
+0.141109 -0.349816 -0.161629 1 0 0
+-0.0823628 -0.294872 -0.343716 0 1 0
+-0.279601 0.371795 0.0416169 0 1 0
+0.35875 -0.0599936 0.371795 0 0 1
+0.192791 0.294872 -0.0539174 0 1 0
+-0.5 -0.0282545 0.0683699 1 0 0
+-0.193441 0.371795 -0.126225 0 1 0
+-0.399855 -0.371795 -0.110409 0 1 0
+-0.5 -0.0902375 -0.295587 1 0 0
+-0.310424 -0.371795 -0.367008 -0.0904649 0.87173 0.481563
+-0.127936 0.243074 -0.371795 -0.0165818 0.0529907 0.998457
+0.355835 -0.371795 -0.300485 0 1 0
+-0.269715 0.371795 0.156089 0 1 0
+-0.0182105 0.230897 -0.366448 -0.0189845 0.885909 0.46347
+0.455094 -0.278237 0.320513 0 0 1
+-0.14578 0.371795 0.20778 0 1 0
+-0.1975 0.0533583 0.350983 0.969391 -0.245521 0
+0.209916 -0.371795 0.252346 0 1 0
+-0.175382 -0.371795 -0.0756041 0 1 0
+-0.328782 0.158622 0.330078 0.805456 -0.592078 -0.0261437
+0.265472 -0.0162419 -0.173329 0.905026 -0.425289 0.00749134
+-0.448718 -0.312219 -0.338004 1 0 0
+-0.321504 -0.371795 -0.072837 0 1 0
+-0.5 0.238174 -0.352377 1 0 0
+-0.5 -0.238997 0.199281 1 0 0
+0.20256 0.0259766 -0.204549 0.751212 -0.659549 -0.0259735
+-0.156428 -0.254263 0.35849 0.0750907 0.997176 0.00113595
+0.425299 0.294872 0.162479 0 1 0
+-0.5 0.0150609 -0.0492358 1 0 0
+-0.398878 -0.371795 -0.066866 0 1 0
+0.114872 -0.124023 -0.333333 0 0 1
+0.448718 -0.320062 -0.0610754 1 0 0
+-0.314211 -0.371795 -0.118701 0 1 0
+0.176022 -0.371795 -0.105324 0 1 0
+-0.141154 -0.361296 -0.226769 1 0 0
+-0.5 -0.261908 0.159264 1 0 0
+-0.5 0.215093 -0.361022 0.99607 0.00903447 0.0881092
+-0.5 -0.113882 0.123733 1 0 0
+-0.334744 0.371795 0.186877 0 1 0
+0.5 0.036602 -0.238213 1 0 0
+0.5 -0.000147601 0.156118 1 0 0
+-0.155328 -0.0868381 0.320513 0 0 1
+0.0558631 0.203275 0.371795 0.0635016 -0.567469 0.820942
+0.141026 0.330648 -0.348748 1 0 0
+-0.383214 -0.0875109 -0.371795 0 0 1
+-0.141154 -0.302168 0.0243355 0.974588 -0.205323 -0.0895535
+-0.457339 -0.242373 0.320513 0 0 1
+-0.141154 -0.354437 0.0379771 1 0 0
+-0.290836 -0.371795 -0.0419544 0 1 0
+-0.5 -0.18714 0.218844 1 0 0
+0.4252 -0.199591 0.320513 0 0 1
+-0.0727315 -0.0145746 -0.333333 0 0 1
+-0.157045 0.371795 0.257196 0 1 0
+0.12517 0.273001 -0.371795 0 0 1
+0.315912 -0.180141 -0.33609 0.796268 -0.114892 0.593933
+0.383267 -0.279656 0.320513 0 0 1
+0.464819 -0.276363 -0.371795 0 0 1
+0.193542 -0.371795 -0.238577 0 1 0
+-0.026158 0.30318 -0.371795 0 0 1
+-0.0355803 0.287391 0.320513 0 0 1
+0.31282 0.294872 -0.034468 0 1 0
+-0.122162 0.371795 -0.330087 0 1 0
+0.217523 0.294872 -0.0626291 0 1 0
+-0.5 -0.0814248 0.103266 1 0 0
+-0.258887 0.0332926 -0.190665 -0.668245 0.743942 0
+-0.5 -0.19566 0.260928 1 0 0
+-0.192354 -0.133629 -0.333333 0 0 1
+0.304155 0.0939904 -0.333333 0 0 1
+0.448718 -0.357752 0.157841 1 0 0
+-0.434517 0.371795 0.0766919 0 1 0
+0.5 0.194708 0.117009 1 0 0
+0.376048 -0.371795 -0.1832 0 1 0
+0.5 0.105667 0.145081 1 0 0
+-0.478484 0.0236292 0.320513 0 0 1
+0.199072 0.248362 -0.371795 0 0 1
+0.5 0.0351059 0.14292 1 0 0
+0.481263 -0.040651 0.320513 0 0 1
+0.136171 -0.294872 0.24233 0.110145 0.993914 0.00153329
+0.155701 -0.371795 0.249402 0 1 0
+0.5 -0.258631 -0.0337788 1 0 0
+-0.5 0.324788 0.108081 1 0 0
+-0.435926 -0.371795 -0.161316 0.00514596 0.999986 0.00125317
+-0.425839 -0.226776 0.320513 0 0 1
+0.398368 0.294872 -0.196295 0 1 0
+-0.234075 -0.371795 0.0419509 0 1 0
+0.125481 0.219045 -0.333333 0 0 1
+-0.0513434 0.305564 0.320513 0 0 1
+-0.267274 -0.226961 -0.361501 0.348722 0.929969 -0.116403
+0.352975 0.294872 -0.0446701 0 1 0
+0.5 0.0104911 -0.211611 1 0 0
+-0.0121382 -0.294872 -0.135483 0 1 0
+-0.18418 0.371795 0.140085 0 1 0
+-0.239818 0.320137 -0.371795 0 0 1
+-0.205441 0.371795 -0.289293 0 1 0
+0.135819 0.291362 0.320513 0.0878339 0.114106 0.989578
+-0.5 0.0866131 -0.236165 1 0 0
+-0.5 -0.123587 -0.138921 1 0 0
+0.488362 0.294872 0.242733 0.0307511 0.99949 -0.00864608
+-0.5 0.129889 0.0795612 1 0 0
+-0.464095 0.029869 0.320513 0 0 1
+0.294164 -0.351065 -0.371795 0 0 1
+0.211284 0.0331311 -0.124412 -0.480477 0.876835 0.0173775
+0.488922 0.113553 -0.371795 0 0 1
+-0.5 0.107154 -0.195952 1 0 0
+0.00145739 -0.00811705 -0.333333 0 0 1
+0.5 0.0830186 0.302422 1 0 0
+0.5 0.263843 -0.116617 1 0 0
+0.425977 -0.0142093 0.320513 0 0 1
+-0.170464 -0.371795 0.283575 0 1 0
+0.109557 -0.0013068 -0.333333 0 0 1
+-0.368517 -0.0353742 0.371795 0 0 1
+0.5 -0.0528232 0.0690368 1 0 0
+0.446616 -0.371795 -0.0278049 -0.547089 0.834263 -0.0685493
+0.133305 0.255917 0.331927 0.0652346 0.99787 0
+0.468652 0.294872 -0.202374 0 1 0
+0.0833552 0.371795 0.275065 0 1 0
+-0.245238 -0.0410788 -0.19376 0.266724 0.963606 0.0179115
+-0.5 -0.0290701 -0.0777614 1 0 0
+-0.489399 0.371795 0.183101 0 1 0
+-0.5 -0.0719852 0.150057 1 0 0
+-0.0682891 -0.294872 -0.0521688 0 1 0
+-0.380597 -0.371795 -0.105138 0 1 0
+-0.0871226 -0.294872 -0.352501 0 1 0
+-0.32743 0.0852223 -0.371795 -0.177068 0.0220185 0.983952
+-0.375622 -0.371795 0.0773416 0 1 0
+-0.5 0.203011 0.032382 1 0 0
+0.465944 0.0730774 0.320513 0 0 1
+-0.267962 -0.32324 0.320513 0 0 1
+0.491377 -0.294872 0.0462138 0 1 0
+-0.24129 -0.371795 -0.181907 0 1 0
+0.5 0.0483495 0.319728 0.656827 0.0642092 0.751303
+-0.5 -0.136865 0.22554 1 0 0
+-0.0171273 -0.294872 0.23027 0 1 0
+0.5 -0.161053 0.0563358 1 0 0
+-0.5 0.0162565 -0.260865 1 0 0
+-0.133121 -0.237289 -0.371795 -0.0451702 -0.543934 0.837911
+0.307263 0.294872 -0.117838 0 1 0
+0.5 0.191426 0.262189 1 0 0
+0.192311 3.43339e-005 -0.156408 0.999787 -0.0194927 0.00685
+0.164612 0.294872 -0.290016 0 1 0
+0.132778 -0.255955 0.363811 -0.105369 0.989672 -0.0971953
+-0.193119 -0.199134 0.371795 0 0 1
+-0.5 0.308632 -0.303676 1 0 0
+-0.5 -0.127225 0.229099 1 0 0
+0.496633 0.294872 0.12296 0.286884 0.957964 -0.00122859
+0.5 0.251781 0.0350481 1 0 0
+0.5 -0.27553 0.271567 1 0 0
+0.101526 -0.0490892 0.320513 0 0 1
+-0.0525456 0.371795 0.0482125 0 1 0
+0.0341702 -0.215462 0.371795 0 0 1
+0.381548 0.166504 -0.371795 0 0 1
+0.249044 -0.170119 0.371795 0 0 1
+-0.47402 0.371795 -0.345762 0 1 0
+-0.220352 -0.371795 -0.264195 0 1 0
+-0.5 0.00995906 -0.0384281 1 0 0
+0.141026 0.349604 -0.312457 1 0 0
+-0.141154 -0.332943 0.213508 1 0 0
+-0.220577 0.0422248 -0.273001 0.249172 0.968435 -0.00689969
+0.292109 -0.342485 -0.371795 0 0 1
+-0.391887 0.371795 0.260897 0 1 0
+0.191263 0.181283 0.371795 0 0 1
+-0.5 -0.0492973 -0.178454 1 0 0
+0.141026 0.322153 0.10992 1 0 0
+-0.278663 -0.371795 0.0544031 0 1 0
+0.5 -0.0198363 -0.280656 1 0 0
+0.127819 0.252034 -0.371795 0 0 1
+0.104486 0.371795 -0.165733 0 1 0
+-0.454521 -0.294872 0.146976 0.286237 0.947055 -0.14545
+0.106212 0.322486 -0.371795 0 0 1
+-0.0963558 0.371795 -0.228254 0 1 0
+0.0730079 -0.0707211 -0.333333 0 0 1
+-0.248497 0.159657 0.371795 0 0 1
+0.21219 0.0336126 -0.157338 -0.449073 0.892872 -0.0333567
+0.5 -0.0222579 -0.24131 1 0 0
+-0.36038 -0.371795 -0.258228 0 1 0
+0.331382 0.0781909 -0.371795 0.0472935 -0.00177444 0.998879
+-0.35225 0.371795 0.0898158 0 1 0
+-0.5 -0.289401 -0.193309 0.953562 0.301188 0.00231093
+0.447329 -0.371795 0.0411755 -0.620695 0.784046 0.0032003
+0.367613 0.138191 0.320513 0 0 1
+-0.355575 0.371795 0.0792486 0 1 0
+0.013814 -0.263179 -0.371795 0 0 1
+0.093374 -0.294872 -0.0930664 0 1 0
+0.00488391 0.256282 0.356687 0 1 0
+-0.315731 0.11525 0.371795 0 0 1
+-0.147672 -0.371795 0.218872 -0.231995 0.955844 0.180392
+0.217289 0.112126 0.371795 0 0 1
+0.0731735 0.371795 0.067562 0 1 0
+0.254984 0.294872 -0.111815 0 1 0
+0.212835 0.0339133 -0.206509 -0.44847 0.893503 -0.0229605
+-0.0733427 0.0788897 -0.333333 0 0 1
+-0.349432 -0.371795 -0.138274 0 1 0
+-0.289711 0.0928079 -0.333333 0 0 1
+-0.388525 -0.371795 -0.314697 0 1 0
+-0.5 0.280937 -0.0162341 1 0 0
+-0.066601 -0.00401586 0.320513 0 0 1
+0.231587 0.219809 -0.333333 0 0 1
+0.164946 0.294872 -0.216595 0 1 0
+-0.101105 -0.294872 -0.159545 0 1 0
+0.343337 -0.371795 -0.0181507 0 1 0
+0.475806 -0.120199 -0.371795 0 0 1
+0.5 -0.0875924 0.0551094 1 0 0
+-0.5 0.0610565 0.320126 0.724691 -0.0146141 -0.688919
+-0.233442 -0.21437 0.371795 0 0 1
+0.297808 0.142692 -0.333333 0 0 1
+-0.386924 -0.354124 -0.371795 0 0 1
+-0.141811 0.371795 -0.0535638 0 1 0
+0.117401 0.371795 -0.0920461 0 1 0
+-0.281934 0.371795 0.267049 0 1 0
+0.5 0.0890495 -0.282428 1 0 0
+0.464646 -0.0604575 -0.371795 0 0 1
+0.415443 0.294872 -0.118283 0 1 0
+0.5 0.106043 0.0392362 1 0 0
+0.207981 -0.0308174 -0.291144 0.578332 0.815793 0.0037773
+0.141109 -0.353607 -0.30613 1 0 0
+0.191573 0.284722 -0.371795 0 0 1
+0.157047 0.294872 0.0948701 0 1 0
+-0.139341 0.231164 -0.371795 -0.0700966 0.820971 0.566651
+0.486228 0.294872 -0.168812 0 1 0
+0.154921 0.143072 -0.333333 0 0 1
+-0.5 0.0338832 -0.0315663 1 0 0
+-0.0726269 -0.294872 0.0864746 0 1 0
+0.409924 -0.303161 -0.371795 0 0 1
+0.176291 0.294872 -0.230163 0 1 0
+0.0943107 -0.153303 -0.333333 0 0 1
+-0.257899 -0.236323 -0.371795 -0.0563849 -0.120813 0.991073
+-0.00380021 0.371795 -0.307129 0 1 0
+-0.5 -0.0922556 -0.246741 1 0 0
+0.302474 -0.218341 -0.371795 0 0 1
+0.229253 0.294872 -0.0740416 0 1 0
+0.0612634 -0.0407522 -0.333333 0 0 1
+-0.290667 0.0506798 0.371795 0 0 1
+0.165687 0.294872 0.199659 0 1 0
+0.377014 -0.282648 0.320513 0 0 1
+-0.188966 -0.0117635 -0.0990244 0.95114 -0.30815 0.0194189
+-0.5 -0.0501447 -0.0413604 1 0 0
+-0.0872632 0.311975 -0.371795 0 0 1
+-0.188705 -0.0107914 -0.286269 0.966969 -0.254652 -0.0110731
+-0.365471 0.29346 -0.371795 0 0 1
+0.0815602 -0.256282 0.344592 0 1 0
+-0.448718 -0.349483 -0.230206 1 0 0
+0.310758 0.294872 -0.0686372 0 1 0
+-0.406084 0.328205 -0.371795 0 0 1
+0.0699088 -0.153898 0.320513 0 0 1
+0.333159 0.223187 0.320513 0 0 1
+0.0727288 -0.0813729 0.320513 0 0 1
+0.113312 -0.269932 0.320513 0 0 1
+0.0444182 -0.294872 -0.248529 0 1 0
+0.491476 -0.144307 0.320513 0.105927 -0.0658694 0.99219
+-0.0476511 -0.256963 0.320513 -0.0775054 -0.563478 0.822487
+0.146763 -0.109452 -0.333333 0 0 1
+-0.197297 -0.295733 -0.371795 0 0 1
+0.0345814 0.371795 -0.142171 0 1 0
+0.5 -0.288878 0.178704 0.993431 -0.10836 0.0367921
+-0.448718 -0.302989 0.308907 0.997654 0.066774 0.0151075
+0.298207 0.294872 -0.0428238 0 1 0
+0.454808 0.174501 -0.371795 0 0 1
+0.238698 -0.371795 0.195897 0 1 0
+0.5 0.121841 0.0879067 1 0 0
+-0.458056 -0.294872 -0.244707 0.0855748 0.994081 -0.0669323
+0.273428 0.0468731 -0.333333 0 0 1
+0.243706 0.0362003 -0.0653512 0.377011 0.926207 0.00195512
+-0.451121 -0.282137 -0.371795 0 0 1
+0.122043 -0.294872 0.0227591 0 1 0
+-0.301907 -0.349077 -0.371795 0 0 1
+-0.136005 0.346766 -0.371795 0 0 1
+-0.0098 0.371795 0.242584 0 1 0
+0.0309837 -0.294872 -0.230743 0 1 0
+0.0884364 0.3678 0.320513 0.0691753 0.386582 0.919657
+0.439704 0.198978 -0.371795 0 0 1
+-0.382208 -0.125095 0.320513 0 0 1
+0.195778 0.0156229 -0.311538 0.903618 -0.427879 0.0198313
+-0.352785 0.371795 0.116635 0 1 0
+0.235766 -0.371795 -0.362783 0.00954089 0.994649 0.102873
+-0.189974 0.015265 -0.063543 0.942914 0.332897 -0.00958151
+0.194059 -0.0110336 -0.0249685 0.922111 0.386818 0.00907357
+-0.155601 -0.371795 0.20304 0 1 0
+0.199808 0.294872 0.257174 0 1 0
+-0.029078 -0.134579 0.320513 0 0 1
+0.250396 0.230302 -0.3549 0.0861995 0.996278 0.000643782
+0.141109 -0.319675 -0.0328573 1 0 0
+-0.0492432 -0.0991611 -0.333333 0 0 1
+0.141026 0.300193 -0.230828 0.938916 0.341626 -0.0415688
+-0.5 -0.00537511 0.140562 1 0 0
+0.5 0.0329492 -0.156678 1 0 0
+0.480409 -0.294872 0.253811 0 1 0
+-0.320467 0.371795 -0.363267 0.0164557 0.990782 -0.134465
+0.135926 -0.0922992 0.320513 0 0 1
+0.351504 -0.0392262 -0.371795 0 0 1
+-0.323754 0.0475488 -0.371795 0.714257 0.157985 -0.681819
+-0.300067 -0.371795 -0.339774 0 1 0
+0.5 0.00285532 -0.264527 1 0 0
+0.470522 0.294872 0.0605997 0 1 0
+-0.312023 0.371795 0.0534883 0 1 0
+-0.197054 -0.027557 -0.0966539 0.787023 -0.616841 -0.010125
+-0.130345 0.0482742 0.320513 0 0 1
+-0.309029 0.371795 0.0238449 0 1 0
+-0.5 0.234472 -0.179747 1 0 0
+0.391663 0.294872 -0.221441 0 1 0
+0.5 0.0255372 -0.130967 1 0 0
+0.309368 -0.371795 0.2119 0 1 0
+-0.2276 0.0433125 -0.222715 0.129333 0.991474 0.0159102
+0.5 -0.192637 -0.19105 1 0 0
+-0.436446 -0.371795 -0.177448 0 1 0
+-0.5 0.101397 0.209425 1 0 0
+0.405585 -0.371795 -0.110369 0 1 0
+-0.12054 -0.294872 -0.340457 0 1 0
+-0.395743 -0.0116178 0.320513 0 0 1
+-0.15694 -0.127823 -0.333333 0 0 1
+-0.141154 -0.328701 0.0713364 1 0 0
+-0.203603 -0.0339892 -0.0791076 -0.637952 0.770002 0.0106892
+-0.117897 -0.294872 -0.240152 0 1 0
+-0.076655 0.371795 -0.314312 0 1 0
+-0.49682 0.127238 -0.371795 0.34445 -0.139374 0.928401
+0.318661 0.169882 -0.362133 0.984442 0.175516 -0.00826606
+0.141026 0.362541 0.101013 0.99347 0.110054 -0.0300939
+0.314166 -0.371795 0.269056 0 1 0
+-0.0693939 0.231054 -0.371795 0.148977 0.428406 0.891221
+-0.225194 -0.371795 -0.0612847 0 1 0
+0.141109 -0.321519 0.0593959 1 0 0
+-0.5 0.324762 -0.313998 1 0 0
+-0.256191 0.00923652 0.371795 0 0 1
+-0.448718 -0.35683 -0.295943 1 0 0
+-0.325431 0.326535 -0.371795 0 0 1
+0.5 -0.292188 0.230826 0.949277 -0.310934 -0.0468338
+-0.5 0.273039 -0.162832 1 0 0
+0.179682 0.0477826 0.320513 0 0 1
+0.5 0.20325 -0.246546 1 0 0
+-0.310658 0.366105 -0.371795 -0.0139885 -0.315907 0.948687
+0.347717 0.0750562 0.371795 0 0 1
+0.5 0.0160556 0.0856894 1 0 0
+-0.201204 0.0318456 -0.201164 0.697918 0.716123 -0.00890401
+-0.392755 0.242588 0.320513 0 0 1
+0.287993 -0.0857946 0.371795 0 0 1
+-0.236883 -0.371795 0.120602 0 1 0
+0.21739 -0.0360371 -0.289464 0.338958 0.940789 0.00476517
+0.0765303 0.0259304 -0.333333 0 0 1
+-0.141154 -0.367792 0.213266 0.93568 -0.350435 -0.0412173
+0.0637426 -0.294872 -0.308009 0 1 0
+0.5 -0.245303 -0.213015 1 0 0
+0.5 0.287895 0.00222453 0.956026 0.286946 0.0606356
+0.5 -0.278944 -0.263804 1 0 0
+0.5 -0.0997186 0.27817 1 0 0
+0.334212 -0.216689 -0.371795 0 0 1
+-0.5 -0.184328 -0.284047 1 0 0
+-0.5 -0.255804 -0.159978 1 0 0
+-0.5 -0.103913 0.0630542 1 0 0
+0.221863 -0.371795 0.0882146 0 1 0
+0.108171 0.371795 0.0746814 0 1 0
+0.0682293 0.256282 0.326537 -0.0617433 0.983003 0.172897
+-0.5 -0.0601215 -0.183578 1 0 0
+0.140427 0.122287 -0.333333 0 0 1
+-0.322532 0.12892 -0.371795 -0.589582 0.0725186 0.804447
+0.240819 0.294872 -0.27688 0 1 0
+0.5 0.194698 -0.207055 1 0 0
+-0.493928 0.245209 0.320513 -0.339018 -0.0743641 0.937836
+-0.106413 -0.0154592 0.320513 0 0 1
+-0.141154 -0.29855 0.121104 0.919815 -0.363674 -0.14725
+0.5 0.187306 0.313677 0.984433 -0.0279385 0.173527
+-0.0305611 -0.202284 0.368074 0.0954644 0.818807 0.566075
+-0.5 -0.0450868 -0.13778 1 0 0
+-0.465731 -0.294872 -0.180272 0 1 0
+0.212022 0.279085 -0.371795 0 0 1
+-0.0528801 0.320623 -0.371795 0 0 1
+0.398517 -0.371795 -0.19651 0 1 0
+0.5 0.069551 -0.207403 1 0 0
+0.476654 -0.196627 -0.371795 0 0 1
+0.448718 -0.333348 0.266344 1 0 0
+-0.120768 0.371795 0.227674 0 1 0
+-0.5 -0.290803 0.298305 0.906363 0.362644 -0.216784
+0.417779 0.294872 -0.200571 0 1 0
+0.141026 0.332903 -0.335652 1 0 0
+0.0428275 -0.00363042 0.320513 0 0 1
+-0.117728 0.256282 0.364614 -0.0543876 0.997731 0.0396951
+0.5 0.0145569 0.247736 1 0 0
+-0.183295 0.230897 -0.351434 0 1 0
+-0.5 0.0712275 0.172909 1 0 0
+-0.5 0.356604 -0.163699 1 0 0
+0.0414049 0.371795 0.274491 0 1 0
+0.141026 0.363497 -0.0936826 0.996487 0.0833831 0.0078187
+0.5 0.154774 -0.341545 1 0 0
+-0.488007 -0.294872 0.00798984 0 1 0
+-0.490777 0.344572 -0.371795 0.0526443 0.0180698 0.99845
+0.343884 0.286665 0.320513 0.0427329 0.32912 0.943321
+0.192527 0.00250135 -0.249371 0.997001 -0.0763088 -0.012908
+-0.272977 -0.0102547 -0.312427 0.96523 0.261398 -0.00140942
+0.0183441 -0.294872 0.0120034 0 1 0
+-0.251195 -0.293401 0.320513 0 0 1
+-0.157275 -0.371795 0.0933224 0 1 0
+-0.141154 -0.371134 0.0718019 0.875312 -0.483537 -0.00452073
+0.0595304 0.371795 -0.0423553 0 1 0
+-0.424938 -0.371795 0.0445774 0 1 0
+-0.165283 -0.053156 0.320513 0 0 1
+0.300138 0.189581 0.333371 0.706993 0.707221 0
+0.493996 0.268324 -0.371795 -0.175106 -0.027563 0.984164
+0.320513 -0.0843548 -0.334048 0.714656 -0.00410018 0.699464
+0.0504645 0.101564 0.320513 0 0 1
+0.141109 -0.330118 0.193026 1 0 0
+0.5 0.293454 -0.258617 0.823561 0.564894 -0.0514004
+-0.5 -0.248027 -0.157673 1 0 0
+0.141026 0.348854 -0.12941 1 0 0
+-0.149321 0.254772 0.324467 -0.191471 0.922797 0.334341
+0.5 0.208062 -0.0899037 1 0 0
+-0.291054 0.0909576 -0.333333 0 0 1
+-0.0130882 0.302663 -0.371795 0 0 1
+-0.5 0.327165 -0.141692 1 0 0
+0.275573 -0.371795 -0.232404 0 1 0
+-0.168366 -0.371795 -0.279652 0 1 0
+0.136202 0.371795 0.0759687 0.331129 0.942474 -0.0457827
+-0.00653029 -0.294872 0.313237 0.0106833 0.993092 -0.116855
+0.5 -0.0746613 -0.182131 1 0 0
+0.037605 -0.151413 -0.333333 0 0 1
+-0.208755 -0.371795 -0.31887 0 1 0
+0.480111 -0.178033 0.320513 0 0 1
+0.266439 -0.0141673 -0.19991 0.931937 -0.3625 -0.00934126
+0.140905 0.176447 0.371795 0 0 1
+-0.197893 0.230897 -0.339492 0.0901288 0.949529 0.300451
+-0.0876004 0.371795 -0.332512 0 1 0
+-0.5 -0.251686 0.256288 1 0 0
+0.465607 -0.294872 0.228585 0 1 0
+0.5 0.24882 -0.102369 1 0 0
+0.5 -0.116009 0.0498977 1 0 0
+0.11843 0.371795 0.275265 0 1 0
+-0.278289 0.145736 -0.333333 0 0 1
+-0.340521 0.371795 -0.0129198 0 1 0
+-0.405587 -0.371795 -0.274766 0 1 0
+0.0926015 -0.146844 -0.333333 0 0 1
+0.0598343 -0.294872 0.0359654 0 1 0
+-0.5 0.0359928 0.31978 0.749029 0.0240868 -0.6621
+-0.136116 0.266375 -0.371795 0 0 1
+-0.242327 -0.0841484 -0.333333 0 0 1
+-0.286098 0.371795 -0.180078 0 1 0
+-0.274556 -0.371795 -0.00523162 0 1 0
+0.0549166 0.230897 -0.333399 -0.00741107 0.727072 0.686521
+0.0280452 0.210836 0.371795 -0.0509798 -0.165654 0.984865
+0.5 -0.237598 -0.0805609 1 0 0
+-0.0636107 0.371795 0.18751 0 1 0
+-0.051431 -0.294872 -0.248864 0 1 0
+-0.443892 0.0364597 -0.371795 0 0 1
+-0.5 0.00188053 0.0309848 1 0 0
+-0.382132 -0.371795 -0.123422 0 1 0
+-0.175563 -0.371795 -0.301532 0 1 0
+-0.361044 0.0123663 -0.371795 0 0 1
+-0.173262 0.189774 -0.333333 0 0 1
+0.24185 -0.030945 0.00335164 0.19839 -0.516578 0.83294
+0.269107 -0.371795 0.282624 0 1 0
+0.0267303 0.371795 -0.268915 0 1 0
+0.38044 -0.371795 -0.34425 0 1 0
+0.0210002 0.327071 -0.371795 0 0 1
+-0.011862 -0.294872 -0.190654 0 1 0
+0.316155 0.294872 0.293605 0 1 0
+-0.5 -0.271079 -0.262959 1 0 0
+-0.0482508 0.371795 -0.222791 0 1 0
+0.379893 0.294872 0.197448 0 1 0
+-0.5 -0.19493 -0.296936 1 0 0
+-0.23458 -0.371795 -0.126892 0 1 0
+0.176669 0.103583 0.338485 0.842043 0.539393 -0.00437768
+0.141026 0.371089 -0.219548 0.503463 0.857515 0.105801
+0.0328493 0.136104 0.320513 0 0 1
+-0.44584 -0.151094 -0.371795 0 0 1
+-0.123636 -0.294872 -0.340289 0 1 0
+-0.5 -0.213924 -0.0852812 1 0 0
+-0.141154 -0.354032 -0.318713 1 0 0
+0.307894 0.0111007 -0.333333 0.0724978 -0.0306357 0.996898
+0.0194208 0.371795 -0.318892 0 1 0
+0.350584 0.294872 -0.0469951 0 1 0
+0.5 0.10447 0.276593 1 0 0
+-0.218187 -0.267936 0.320513 0 0 1
+-0.5 -0.0414247 0.300332 1 0 0
+0.0799129 -0.294872 0.0938877 0 1 0
+0.348459 -0.146618 -0.371795 0 0 1
+-0.438164 -0.330984 0.320513 0 0 1
+-0.5 0.0886935 -0.331496 1 0 0
+0.155486 0.0477071 0.320513 0 0 1
+0.498625 -0.272637 -0.371795 -0.314994 0.15391 0.936531
+-0.302081 -0.362165 -0.371795 0.000320424 0.00375889 0.999993
+-0.448718 -0.324061 0.247102 1 0 0
+0.433328 -0.371795 0.306818 0 1 0
+0.0299121 -0.294872 -0.222135 0 1 0
+0.20397 -0.297331 -0.371795 0 0 1
+0.0653831 0.371795 0.255449 0 1 0
+-0.125716 -0.246948 0.371795 -0.0198068 -0.0420511 0.998919
+0.11311 0.168072 0.320513 0.480039 0.584571 -0.654094
+-0.0129803 -0.055984 0.320513 0 0 1
+0.45734 0.158719 0.320513 0 0 1
+0.274591 -0.371795 -0.0222615 0 1 0
+0.228324 -0.0382476 -0.162611 0.096128 0.995367 0.00171077
+0.203607 -0.371795 -0.296093 0 1 0
+-0.5 -0.198857 0.305886 1 0 0
+0.199934 0.0437486 0.35649 0.969402 0.245479 0
+0.474328 -0.252626 -0.371795 0 0 1
+-0.181934 -0.0944623 0.334716 0.897779 0.440446 0
+-0.436315 0.245156 -0.371795 0 0 1
+0.5 0.266819 0.079696 1 0 0
+0.5 0.211634 0.203438 1 0 0
+0.5 0.215506 0.135814 1 0 0
+0.477772 0.15013 0.320513 0 0 1
+-0.29637 0.319897 -0.371795 0 0 1
+0.5 0.182744 -0.257209 1 0 0
+-0.273707 -0.371795 0.0803868 0 1 0
+-0.438959 0.00995625 -0.371795 0 0 1
+-0.0855313 -0.294872 -0.274136 0 1 0
+0.0349402 -0.294872 0.187144 0 1 0
+0.362695 0.294872 -0.1894 0 1 0
+0.0336363 0.371795 0.260755 0 1 0
+-0.389834 -0.257524 0.320513 0 0 1
+-0.5 -0.135246 0.0808281 1 0 0
+0.5 -0.0814953 0.0669026 1 0 0
+0.448718 -0.35336 0.270228 1 0 0
+-0.5 -0.20401 -0.152583 1 0 0
+-0.486151 -0.294872 0.28624 0 1 0
+0.201119 0.0244557 -0.236368 0.716841 -0.697189 0.00817635
+0.375303 -0.0667014 0.33122 0.975764 -0.218786 -0.00408011
+0.439116 0.294872 -0.114538 0 1 0
+-0.199213 -0.0349596 -0.333333 0.61046 -0.484437 0.626626
+-0.416817 0.328102 0.320513 0 0 1
+0.267612 0.294872 0.0199275 0 1 0
+-0.216415 -0.0411095 -0.184507 -0.312343 0.949903 0.0112144
+-0.375104 0.191316 0.320513 0 0 1
+0.312332 0.0807753 -0.333333 0.164854 -0.00129838 0.986317
+0.146903 -0.371795 -0.353732 0.255048 0.965687 -0.0489797
+0.317035 0.294872 0.268729 0 1 0
+0.250358 0.0330578 -0.000905056 0.491241 0.76071 0.424268
+-0.190496 -0.371795 0.156949 0 1 0
+-0.487566 0.371795 -0.179972 0 1 0
+0.196155 -0.0164309 -0.000288784 0.7934 0.383177 -0.47296
+-0.381179 0.0658007 -0.371795 0 0 1
+0.360285 -0.371795 -0.0692057 0 1 0
+-0.306008 -0.121974 -0.333333 0 0 1
+0.5 -0.235637 -0.0744706 1 0 0
+-0.448718 -0.364828 0.200931 0.981057 0.184441 -0.0592394
+-0.0317859 0.163217 0.320513 0 0 1
+0.0689256 0.192611 0.320854 0.148712 0.714952 -0.683175
+0.234344 -0.371795 -0.237478 0 1 0
+-0.141154 -0.307171 0.130022 1 0 0
+-0.16304 0.371795 -0.00919356 0 1 0
+-0.371316 0.184217 0.320513 0 0 1
+0.271833 -0.316915 -0.371795 0 0 1
+-0.5 0.0408371 0.178463 1 0 0
+0.5 -0.0308834 0.131847 1 0 0
+-0.15875 -0.371795 -0.123004 0 1 0
+-0.5 -0.235048 0.0602267 1 0 0
+-0.310614 -0.268704 -0.371795 0 0 1
+0.320513 -0.0273653 -0.350323 1 0 0
+-0.205748 -0.0354909 -0.256275 -0.53791 0.843 0.0019897
+0.306823 -0.371795 -0.0407829 0 1 0
+0.229687 0.23498 0.355528 0.367463 0.930033 -0.00310943
+0.193794 -0.0100437 -0.169273 0.956677 0.291153 0
+0.5 0.0926414 -0.0955708 1 0 0
+-0.448718 -0.335654 0.124692 1 0 0
+0.226324 -0.141648 0.371795 0 0 1
+-0.5 0.1948 -0.157582 1 0 0
+-0.226017 -0.241939 0.320513 -0.0725383 -0.127922 0.989128
+-0.448718 -0.364561 0.295892 0.963325 0.229939 -0.138326
+0.104035 0.371795 -0.133843 0 1 0
+0.02918 -0.0621231 0.320513 0 0 1
+0.376985 0.0978021 0.320513 0.0679328 0.0473099 0.996568
+-0.5 0.291642 0.0820319 1 0 0
+-0.0207105 0.371795 -0.122819 0 1 0
+0.268743 -0.00557296 -0.16924 0.98209 -0.187132 0.0219528
+-0.164211 -0.18573 0.371795 0 0 1
+-0.172622 -0.371795 -0.126301 0 1 0
+-0.15714 -0.371795 0.185201 0 1 0
+0.379516 0.0473355 0.366699 0.964028 0.200559 0.174429
+-0.5 0.15424 0.0270223 1 0 0
+0.298096 -0.0716741 -0.333333 0 0 1
+-0.459708 0.371795 -0.080154 0 1 0
+-0.234893 0.335878 -0.371795 0 0 1
+0.000267682 0.136364 -0.333333 0 0 1
+0.194314 -0.363088 -0.371795 0.0331215 0.0932198 0.995094
+0.284147 -0.371795 0.0438226 0 1 0
+-0.340229 0.18943 -0.371795 0 0 1
+-0.267348 0.0234676 -0.100422 0.852624 -0.522524 0
+-0.314104 -0.181617 -0.333333 0.813792 0.405285 -0.416517
+-0.236961 0.371795 0.03465 0 1 0
+-0.5 -0.133349 0.133348 1 0 0
+0.5 0.131018 -0.0572552 1 0 0
+0.141026 0.337833 0.296756 1 0 0
+0.5 -0.19636 0.147831 1 0 0
+0.184526 0.109894 0.371795 -0.0232665 -0.00543113 0.999714
+-0.455797 0.191052 -0.371795 0 0 1
+-0.48379 0.371795 -0.140259 0 1 0
+0.5 0.145146 -0.304759 1 0 0
+0.367388 0.186544 -0.371795 0 0 1
+0.47502 0.294872 -0.187863 0 1 0
+0.0849135 0.371795 0.237874 0 1 0
+0.197553 -0.0531479 0.333915 0.969403 -0.245476 0
+0.130419 -0.294872 -0.313578 0 1 0
+0.20783 0.294872 0.0707075 0 1 0
+0.214714 -0.135513 0.371795 0 0 1
+0.258689 -0.291771 0.320513 0 0 1
+0.388494 0.280578 -0.371795 0 0 1
+-0.0114607 -0.294872 0.244341 0 1 0
+-0.012167 -0.208129 -0.333333 0 0 1
+0.437057 -0.371795 -0.132099 -0.0485296 0.998804 0.00589247
+0.5 -0.100809 0.0861263 1 0 0
+0.297243 -0.371795 -0.301473 0 1 0
+0.5 -0.14053 0.0470678 1 0 0
+-0.365279 0.371795 0.182923 0 1 0
+0.306503 -0.0158677 -0.333333 0 0 1
+-0.155571 0.371795 0.0623487 0 1 0
+-0.0108593 -0.195546 -0.333333 0 0 1
+-0.426693 0.284975 0.320513 0 0 1
+-0.313602 0.371795 0.0291762 0 1 0
+-0.483021 0.0130508 -0.371795 0 0 1
+0.0100566 -0.230262 -0.333333 -0.178176 -0.612252 0.770325
+0.138761 0.211996 0.371795 0 0 1
+-0.0614521 0.168607 -0.333333 0 0 1
+0.104823 -0.294872 -0.0843533 0 1 0
+0.5 -0.116837 0.07187 1 0 0
+-0.0922814 -0.0636546 0.320513 0 0 1
+0.23648 -0.371795 0.298536 0 1 0
+-0.225114 -0.043095 -0.328211 -0.0662086 0.971244 -0.228696
+-0.5 0.265075 -0.0974929 1 0 0
+0.5 0.201838 0.22559 1 0 0
+0.384709 -0.353257 0.320513 0 0 1
+0.478657 0.0391488 0.320513 0 0 1
+-0.174123 0.371795 0.0716466 0 1 0
+-0.0681637 0.0638187 0.320513 0 0 1
+0.137728 0.316614 0.320513 0.136822 -0.102866 0.98524
+-0.0152368 -0.294872 0.124971 0 1 0
+-0.472388 -0.281877 -0.371795 0 0 1
+-0.209223 -0.0378662 -0.250963 -0.500131 0.86594 -0.00410248
+-0.289259 0.371795 0.103068 0 1 0
+-0.5 0.22123 -0.252445 1 0 0
+0.257525 0.0274303 -0.13817 0.705336 0.708873 0
+0.378336 0.0527591 0.331758 0.977144 0.212578 0
+0.400877 -0.371795 -0.327999 0 1 0
+-0.18001 -0.371795 -0.247358 0 1 0
+0.223967 -0.134686 -0.333333 0 0 1
+0.172103 0.0860832 0.320513 0 0 1
+0.376959 0.0590903 0.366679 0.892728 0.292661 0.342618
+0.260129 -0.0248252 -0.285208 0.751009 -0.659934 0.0217233
+-0.221886 -0.371795 -0.0685418 0 1 0
+0.5 0.0963053 0.22533 1 0 0
+-0.492664 0.371795 0.0844824 -0.270832 0.962131 0.0308959
+-0.0105599 0.371795 -0.351833 0 1 0
+-0.5 0.0963691 -0.0493217 1 0 0
+-0.393276 -0.371795 0.212088 0 1 0
+0.0554484 -0.294872 -0.31815 0 1 0
+0.448718 -0.32852 0.101533 1 0 0
+-0.5 0.121547 -0.0330905 1 0 0
+0.488256 -0.26023 0.320513 0.0262774 0.00330106 0.999649
+0.256724 0.294872 -0.161276 0 1 0
+-0.141154 -0.368097 -0.142275 0.89235 -0.451344 0
+-0.351203 -0.163784 -0.371795 0 0 1
+0.225223 0.162762 -0.333333 0 0 1
+-0.0672992 0.0834011 0.320513 0 0 1
+0.5 0.189794 0.306647 0.999999 -6.91282e-005 0.00124869
+0.244413 -0.371795 -0.0712273 0 1 0
+0.196731 -0.371795 -0.265353 0 1 0
+-0.160966 -0.329798 0.320513 0 0 1
+-0.372436 -0.0766812 0.361777 0.949306 0.314343 -0.00245437
+0.016937 -0.294872 0.31536 0.0845908 0.848976 -0.521618
+0.2021 0.230897 -0.364137 0 1 0
+0.115193 -0.294872 0.188802 0 1 0
+-0.325708 -0.162728 0.367244 0.743403 0.655508 -0.132896
+0.5 0.259186 0.0886679 1 0 0
+-0.36922 -0.371795 -0.267124 0 1 0
+-0.393763 0.371795 0.131698 0 1 0
+0.5 -0.0175708 -0.138371 1 0 0
+-0.249268 0.371795 0.233181 0 1 0
+-0.480273 -0.111559 -0.371795 0 0 1
+-0.5 0.346973 -0.0972114 1 0 0
+-0.0842808 -0.294872 -0.0327408 0 1 0
+-0.375922 0.371795 0.0624103 0 1 0
+0.330166 0.294872 -0.302254 0 1 0
+-0.5 0.0036382 -0.135016 1 0 0
+0.499211 0.209395 -0.371795 -0.456406 0.0893578 0.885273
+-0.5 -0.0868059 -0.00629 1 0 0
+-0.201793 -0.371795 -0.363244 0.0124753 0.983832 0.17866
+0.165527 -0.371795 0.205595 0 1 0
+0.201529 -0.242227 0.371795 0.184651 -0.627618 0.756306
+0.5 -0.21902 -0.181393 1 0 0
+-0.5 -0.261992 -0.0705719 1 0 0
+-0.471398 0.167155 -0.371795 0 0 1
+-0.00910326 0.1933 -0.333333 0 0 1
+-0.5 -0.18242 0.016244 1 0 0
+-0.311667 0.371795 0.0790541 0 1 0
+0.146952 -0.264693 0.320513 0.00331644 -0.00678379 0.999972
+-0.406748 -0.371795 0.3034 0 1 0
+-0.221167 -0.230897 -0.33334 0.0481249 -0.428395 0.902309
+-0.320513 -0.0600571 -0.346585 1 0 0
+0.0191707 -0.159318 0.320513 0 0 1
+-0.5 -0.161509 -0.37008 0.843657 0.0312161 0.535975
+-0.279744 0.315017 0.320513 0 0 1
+0.447137 0.233755 0.320513 0 0 1
+-0.287134 0.371795 -0.131183 0 1 0
+0.0178295 0.0793145 -0.333333 0 0 1
+0.5 0.0447437 -0.334407 1 0 0
+-0.202755 -0.371795 0.0303192 0 1 0
+0.5 -0.0644417 -0.0585265 1 0 0
+-0.0543911 0.371795 -0.0630672 0 1 0
+-0.233151 0.233688 0.360564 -0.387656 0.910237 0.145576
+0.342375 0.294872 -0.0886587 0 1 0
+0.0156527 0.371795 -0.0418454 0 1 0
+-0.15991 0.128315 0.364183 0.764638 -0.643654 0.0322361
+0.365506 -0.371795 -0.203263 0 1 0
+-0.164284 0.365158 -0.371795 0.0383257 -0.166785 0.985248
+0.5 -0.0767555 0.312357 0.993061 0.0149407 0.116647
+0.401278 -0.07637 -0.371795 0 0 1
+-0.153072 0.125954 -0.333333 0 0 1
+0.163311 -0.371795 -0.0742483 0 1 0
+-0.141154 -0.348164 0.268238 1 0 0
+-0.361677 0.105524 0.364261 0.918635 -0.375015 -0.12439
+0.115849 0.371795 0.121901 0 1 0
+-0.5 -0.15035 -0.34888 1 0 0
+-0.0471982 0.371795 0.131385 0 1 0
+0.5 0.155057 -0.0235034 1 0 0
+-0.448718 -0.340332 0.0204975 1 0 0
+0.31861 0.294872 -0.10841 0 1 0
+0.456146 0.233263 0.320513 0 0 1
+-0.300718 -0.189001 0.329257 0.704511 0.700429 -0.114299
+-0.244513 -0.0233277 -0.0253456 -0.237572 -0.448718 0.861517
+0.5 -0.0239042 -0.30742 1 0 0
+0.268993 0.294872 -0.104885 0 1 0
+0.5 0.0320826 0.0343654 1 0 0
+-0.328903 0.371795 -0.291711 0 1 0
+0.449519 -0.0265184 0.320513 0 0 1
+0.144547 0.134796 -0.333333 0 0 1
+-0.136782 0.371795 -0.252829 0 1 0
+0.5 -0.219487 0.292707 1 0 0
+-0.324228 0.371795 -0.285742 0 1 0
+-0.141588 -0.371795 -0.0049638 -0.489644 0.871706 -0.0194113
+0.313006 0.294872 0.234637 0 1 0
+-0.5 0.255524 0.220115 1 0 0
+-0.0518228 0.371795 0.314244 -0.00990016 0.948482 0.316677
+-0.434958 -0.248722 -0.371795 0 0 1
+0.295957 0.273682 -0.371795 0 0 1
+-0.145444 0.371795 0.202342 0 1 0
+-0.226709 0.371795 -0.155014 0 1 0
+0.22579 0.154415 0.371795 0 0 1
+-0.114628 -0.294872 -0.226038 0 1 0
+-0.128121 -0.294872 -0.332279 0 1 0
+-0.244396 0.214968 0.371795 -0.0198045 0.0653803 0.997664
+-0.191204 0.073329 0.335797 0.920993 -0.389579 0
+-0.5 0.123474 -0.0475944 1 0 0
+-0.5 0.31307 0.291968 1 0 0
+0.388264 -0.29378 -0.371795 0 0 1
+0.5 -0.160387 0.070656 1 0 0
+0.5 -0.120455 0.0663264 1 0 0
+0.141109 -0.298098 -0.338192 0.936129 0.351403 0.0133777
+-0.380637 -0.371795 0.300748 0 1 0
+-0.230036 0.0786317 0.371795 0 0 1
+-0.46163 -0.157838 -0.371795 0 0 1
+0.323704 0.0176213 0.371795 0 0 1
+0.141109 -0.340258 0.102986 1 0 0
+-0.266781 -0.0878551 0.371795 0 0 1
+-0.155354 0.138034 0.371795 0.463388 -0.203574 0.862456
+-0.19908 -0.282673 0.320513 0 0 1
+-0.22758 0.371795 -0.246894 0 1 0
+0.5 -0.283129 0.301211 0.997817 -0.062967 -0.0199357
+-0.259044 -0.0331353 -0.202697 0.606999 0.794066 -0.0318104
+0.5 -0.249899 -0.292706 1 0 0
+0.155338 -0.301694 0.320513 0 0 1
+-0.260844 0.0313357 -0.283891 -0.675601 0.737241 -0.00626985
+-0.325789 -0.0614532 -0.371795 -0.344845 0.151495 0.926354
+-0.320645 0.350558 0.320513 0 0 1
+0.5 0.258588 0.106374 1 0 0
+0.0158462 -0.294872 0.258254 0 1 0
+0.349806 -0.371795 -0.0777675 0 1 0
+-0.103994 0.0549621 -0.333333 0 0 1
+-0.197745 -0.371795 -0.286143 0 1 0
+0.0571304 -0.196661 0.34307 -0.308935 0.951066 0.00567879
+-0.376076 0.351755 -0.371795 0 0 1
+-0.209828 -0.216173 -0.333333 0 0 1
+-0.5 -0.0459976 0.140773 1 0 0
+0.264129 0.294872 0.187645 0 1 0
+0.5 0.085212 -0.333351 1 0 0
+-0.172111 -0.110559 0.322765 0.842005 0.462758 0.277277
+-0.5 0.363213 -0.307684 0.993112 -0.112873 -0.0314341
+-0.5 -0.125617 0.319948 -0.192764 -0.0437447 0.980269
+-0.32345 0.371795 0.0397973 0 1 0
+-0.5 -0.0165048 -0.277209 1 0 0
+-0.0384747 0.122937 -0.333333 0 0 1
+0.310945 0.294872 -0.101459 0 1 0
+-0.5 0.225801 -0.0303344 1 0 0
+-0.146246 0.178 -0.333333 0 0 1
+0.5 -0.150568 -0.224189 1 0 0
+0.448718 -0.367496 -0.240194 0.985945 -0.156397 -0.0587562
+0.213008 0.294872 0.162548 0 1 0
+0.31151 0.0546224 0.371795 0 0 1
+0.222686 -0.0375008 -0.0712583 0.247834 0.968706 -0.0136509
+-0.451219 -0.294872 -0.283461 0.447156 0.893389 0.0436731
+0.193222 -0.0079109 -0.218207 0.986954 0.160516 0.0125269
+0.486255 -0.279622 -0.371795 0 0 1
+0.177856 0.100502 -0.333333 0 0 1
+-0.150102 -0.230897 -0.35925 0 1 0
+-0.5 -0.254944 -0.192085 1 0 0
+-0.2827 0.371795 -0.00752599 0 1 0
+0.448718 -0.362651 -0.00266498 0.993022 -0.108432 -0.0463637
+0.0797462 -0.294872 0.00539086 0 1 0
+-0.060546 -0.294872 0.00351748 0 1 0
+-0.339619 -0.332884 -0.371795 0 0 1
+-0.226404 0.330654 0.320513 0 0 1
+0.365614 -0.371795 -0.0633829 0 1 0
+-0.5 -0.200916 -0.127972 1 0 0
+-0.458757 -0.294872 0.0318695 0 1 0
+-0.125384 -0.294872 0.0343272 0 1 0
+0.5 0.248686 -0.287352 1 0 0
+0.170522 0.279372 -0.371795 0 0 1
+-0.308449 -0.371795 -0.371195 0.00156021 0.727805 0.685782
+0.152423 0.136448 0.339997 0.735705 0.677302 0
+-0.249278 -0.1439 -0.333333 0 0 1
+-0.104567 0.176 0.363782 -0.484432 0.871553 -0.0756402
+-0.249538 -0.0391612 -0.0821031 0.404898 0.914351 0.0044396
+0.00910159 -0.294872 0.121152 0 1 0
+-0.5 0.0672712 0.267655 1 0 0
+0.00224547 0.371795 0.139391 0 1 0
+0.5 -0.16672 -0.225015 1 0 0
+0.137088 -0.294872 -0.366522 0.373428 0.804399 0.462053
+0.0946317 -0.154364 0.320513 0 0 1
+0.141026 0.362723 -0.147863 0.994233 0.107059 0.00624973
+-0.448718 -0.312162 -0.0713054 1 0 0
+-0.111468 0.212418 -0.333333 0 0 1
+0.443088 -0.233202 0.320513 0 0 1
+0.5 -0.0140166 -0.349488 1 0 0
+0.141026 0.330586 0.0653502 1 0 0
+-0.372035 0.0777562 0.369681 0.845388 -0.282052 -0.453614
+-0.186902 0.371795 0.0129096 0 1 0
+-0.320513 0.0731251 -0.362809 0.996174 -0.0362098 -0.0795373
+-0.078539 0.0292859 -0.333333 0 0 1
+-0.195325 0.371795 0.0304191 0 1 0
+0.253605 0.0307844 -0.170636 0.56273 0.825864 0.0358256
+0.245196 0.294872 -0.0221192 0 1 0
+-0.217511 -0.371795 -0.177873 0 1 0
+0.472473 0.136259 -0.371795 0 0 1
+0.439908 0.294872 -0.185186 0 1 0
+-0.180748 -0.0971678 0.356854 0.880575 0.473869 0.0059731
+0.0617467 -0.206376 -0.333333 0 0 1
+-0.343576 0.371795 -0.0465602 0 1 0
+-0.0107853 -0.237795 -0.371795 -0.00499796 -0.209012 0.9779
+-0.247354 -0.262797 0.320513 0 0 1
+-0.5 -0.292687 -0.0715149 0.731015 0.664522 -0.155007
+-0.283827 -0.371795 0.295922 0 1 0
+0.0490051 -0.148175 0.320513 0 0 1
+0.5 -0.00710953 -0.231112 1 0 0
+-0.141154 -0.366773 -0.342625 0.907335 -0.41458 0.0697656
+-0.432931 -0.371795 0.0837796 0 1 0
+-0.256781 -0.371795 0.302388 0 1 0
+0.5 -0.214446 0.0264147 1 0 0
+-0.0908048 0.128323 0.320513 0 0 1
+-0.476357 0.0556321 0.320513 0 0 1
+0.268653 -0.00659739 -0.0913601 0.98732 -0.158553 -0.00778155
+-0.0833073 -0.198746 -0.333333 0 0 1
+-0.135341 -0.294872 0.0242526 -0.423755 0.899224 0.108758
+-0.5 0.0525412 0.0752425 1 0 0
+0.369348 -0.209315 -0.371795 0 0 1
+-0.5 0.271874 0.144364 1 0 0
+0.5 -0.11613 0.313604 0.981054 -0.0554283 0.185637
+0.380729 -0.371795 -0.361286 -0.00127932 0.99951 0.0312641
+0.244535 -0.371795 -0.190963 0 1 0
+-0.384237 0.329545 0.320513 0 0 1
+0.470764 0.294872 0.0951217 0 1 0
+-0.403952 0.142666 -0.371795 0 0 1
+0.481916 0.294872 0.112901 0 1 0
+-0.456456 -0.266711 -0.371795 0 0 1
+0.1933 -0.230508 -0.333333 -0.00124786 0.723447 -0.690379
+0.5 -0.0208218 0.0920216 1 0 0
+-0.173587 -0.0838361 -0.333333 0 0 1
+0.202637 0.0260539 -0.222502 0.730796 -0.682322 -0.0193442
+0.350711 -0.125907 0.321217 0.546718 -0.413617 0.728025
+0.0849331 0.0436417 0.320513 0 0 1
+-0.343418 -0.349507 0.320513 0 0 1
+-0.384118 -0.139065 -0.371795 0 0 1
+-0.108628 -0.0295162 0.320513 0 0 1
+0.141109 -0.346743 -0.132657 1 0 0
+0.106241 -0.0370421 -0.333333 0 0 1
+-0.138012 0.371795 0.220282 0 1 0
+-0.249798 -0.365489 -0.371795 0.0198907 0.259702 0.965484
+0.448718 -0.35336 0.174328 1 0 0
+-0.190937 0.0486185 -0.333333 0 0 1
+0.410572 -0.371795 0.0443439 0 1 0
+-0.16112 0.296306 -0.371795 0 0 1
+0.448718 -0.344189 0.285295 1 0 0
+0.5 0.137369 0.317453 0.948124 0.0293904 0.316539
+-0.211883 0.250408 0.320513 0 0 1
+-0.098889 0.236019 -0.371795 -0.0470285 0.467012 0.882999
+0.454753 -0.0801685 -0.371795 0 0 1
+0.5 -0.249311 0.116055 1 0 0
+0.479107 0.0918991 -0.371795 0 0 1
+0.113435 0.205378 -0.333333 0 0 1
+0.196358 -0.0421644 0.320513 -0.289035 -0.0815461 0.953839
+-0.284681 -0.306126 -0.371795 0 0 1
+0.0256796 -0.294872 0.166482 0 1 0
+-0.011412 -0.0664569 -0.333333 0 0 1
+0.5 0.109247 -0.266597 1 0 0
+0.5 0.206136 -0.271166 1 0 0
+0.0194984 -0.294872 0.0482603 0 1 0
+-0.329659 0.371795 -0.119588 0 1 0
+0.448718 -0.295691 -0.150271 -0.419734 0.902219 0.099116
+-0.5 0.15917 0.163599 1 0 0
+0.412882 0.294872 -0.289714 0 1 0
+-0.415311 -0.371795 0.0510587 0 1 0
+0.0586452 -0.294872 0.0277076 0 1 0
+0.172244 -0.371287 -0.371795 0.089596 0.904249 0.417501
+-0.132091 0.371795 -0.113129 0 1 0
+0.0210706 -0.110457 -0.333333 0 0 1
+0.358643 -0.31148 0.320513 0 0 1
+0.0804012 0.371795 0.179986 0 1 0
+0.210269 -0.196767 -0.333333 0 0 1
+0.235592 0.151926 -0.333333 0 0 1
+0.38774 0.294872 0.130259 0 1 0
+0.229672 -0.371795 -0.199405 0 1 0
+0.0402379 -0.00778166 -0.333333 0 0 1
+0.0128922 -0.294872 0.291574 0 1 0
+-0.391406 0.0697236 0.320513 0 0 1
+0.0365144 -0.201291 0.340616 -0.164587 0.986363 0
+-0.203475 0.0214926 0.339542 0.996574 -0.0827071 3.64742e-005
+-0.235983 -0.371795 -0.154899 0 1 0
+-0.0191298 -0.0915749 0.320513 0 0 1
+-0.356954 0.371795 0.0551422 0 1 0
+-0.195292 0.315607 -0.371795 0 0 1
+-0.313964 0.269419 0.320513 0 0 1
+-0.197635 0.0524626 -0.333333 0 0 1
+-0.5 0.0243222 -0.296763 1 0 0
+-0.0318493 -0.0126956 0.320513 0 0 1
+-0.5 -0.205309 0.30288 1 0 0
+-0.5 -0.277404 0.160329 1 0 0
+0.5 -0.0956359 -0.0076164 1 0 0
+0.45406 -0.294872 -0.253074 -0.235407 0.971456 0.029256
+-0.384084 -0.00563724 0.353753 0.998205 0.059669 -0.00520672
+0.141026 0.319521 0.0970219 1 0 0
+0.400465 -0.371795 0.289251 0 1 0
+-0.172547 -0.109892 0.322361 0.847917 0.41534 0.329439
+0.0242457 -0.294872 0.095543 0 1 0
+0.239855 0.294872 0.289335 0 1 0
+0.0120889 -0.0106837 -0.333333 0 0 1
+0.241212 0.294872 -0.228523 0 1 0
+0.0135722 -0.294872 -0.11567 0 1 0
+-0.463991 0.334539 -0.371795 0 0 1
+0.448718 -0.349871 0.128776 1 0 0
+-0.177243 -0.139941 -0.333333 0 0 1
+-0.5 0.0811516 -0.352558 1 0 0
+0.320825 -0.371795 0.144353 0 1 0
+-0.257557 0.352284 0.320513 0 0 1
+-0.337344 -0.19939 -0.371795 0 0 1
+0.5 0.082868 -0.194907 1 0 0
+-0.104804 0.0933736 0.320513 0 0 1
+0.109906 -0.294872 -0.138812 0 1 0
+-0.241219 0.325155 -0.371795 0 0 1
+-0.5 0.183395 0.134708 1 0 0
+-0.363009 -0.318674 0.320513 0 0 1
+0.456571 0.294872 0.0699039 0 1 0
+0.333534 -0.0972661 -0.371795 0 0 1
+-0.131348 0.296151 -0.371795 0 0 1
+-0.1832 0.371795 0.137947 0 1 0
+0.499391 0.294872 -0.252886 0.797638 0.603078 0.00838994
+0.303719 -0.327456 -0.371795 0 0 1
+-0.213755 0.371795 -0.0911833 0 1 0
+-0.00288251 -0.294872 0.058292 0 1 0
+-0.325385 -0.35009 0.320513 0 0 1
+-0.141154 -0.332906 -0.0411481 1 0 0
+-0.191195 0.371795 -0.0690675 0 1 0
+0.240538 0.294872 0.0974939 0 1 0
+0.0369426 0.111943 0.320513 0 0 1
+0.5 0.145629 -0.100625 1 0 0
+0.103046 -0.176823 0.358787 -0.475946 0.879475 0
+-0.147073 0.0800754 0.320513 0 0 1
+-0.26906 -0.0206351 -0.279437 0.885952 0.463711 -0.00783581
+-0.352402 -0.371795 0.161014 0 1 0
+0.141109 -0.333192 -0.115467 1 0 0
+-0.443418 0.371795 0.0999388 0 1 0
+-0.221071 0.0567212 0.371795 0 0 1
+-0.212579 0.290819 0.320513 0 0 1
+-0.324116 0.371795 -0.335472 0 1 0
+0.261036 -0.0235752 -0.0522042 0.778836 -0.627166 -0.00874485
+0.239947 0.294872 -0.303978 0 1 0
+0.0351877 0.371795 -0.329457 0 1 0
+0.122029 0.371795 -0.331367 0 1 0
+-0.26927 -0.232114 -0.371795 -0.184105 -0.130902 0.974151
+-0.166243 -0.371795 -0.0709814 0 1 0
+0.114081 -0.294872 -0.317113 0 1 0
+-0.303943 -0.371795 0.121026 0 1 0
+0.5 0.107746 -0.35539 1 0 0
+0.472377 0.0937484 -0.371795 0 0 1
+-0.0231786 -0.294872 -0.34498 0 1 0
+-0.232814 0.230897 -0.356194 0 1 0
+-0.422738 -0.371795 0.183147 0 1 0
+-0.5 -0.0708019 -0.301145 1 0 0
+-0.270466 0.0176191 -0.318106 0.918119 -0.395459 0.0258822
+-0.371087 -0.23865 -0.371795 0 0 1
+-0.490027 -0.294872 -0.111986 0.0916192 0.995625 -0.018325
+0.216209 0.294872 0.0493103 0 1 0
+-0.411768 -0.0524652 -0.371795 0 0 1
+-0.330195 0.122859 -0.371795 -0.164121 0.0313636 0.985942
+-0.213789 0.263014 0.320513 0 0 1
+0.444499 -0.0251367 0.320513 0 0 1
+-0.219194 0.208777 0.371795 0 0 1
+0.161591 0.282748 -0.371795 0 0 1
+0.427291 0.108538 0.320513 0 0 1
+0.5 -0.116788 -0.163502 1 0 0
+0.282323 -0.371795 -0.275906 0 1 0
+-0.226601 0.371795 -0.36814 -0.0564285 0.912726 -0.404657
+0.5 0.0778877 -0.213676 1 0 0
+-0.215032 -0.240447 0.332758 0.349478 0.936944 0
+0.141109 -0.32841 -0.153901 1 0 0
+0.222031 0.0373253 -0.298051 -0.215077 0.976098 0.0312352
+-0.330799 -0.371795 0.0265112 0 1 0
+0.5 0.250534 0.141786 1 0 0
+0.239933 0.294872 0.0628216 0 1 0
+-0.227395 0.371795 0.0244544 0 1 0
+0.35555 -0.178355 0.320513 0 0 1
+0.448718 -0.306643 0.141838 1 0 0
+-0.5 0.2809 0.304822 1 0 0
+-0.184138 -0.0728041 0.320513 0.206066 0.0656631 0.976332
+0.0929551 -0.294872 -0.0804403 0 1 0
+0.24951 -0.235266 0.320513 0.0470483 -0.107802 0.993059
+0.0401262 -0.294872 0.0381273 0 1 0
+-0.301628 0.371795 -0.0214614 0 1 0
+-0.5 0.0260745 0.17489 1 0 0
+-0.495351 0.203672 -0.371795 0.200427 0.0164741 0.97957
+0.5 0.150938 0.181907 1 0 0
+0.182589 0.294872 -0.297914 0 1 0
+0.183824 0.294872 0.0677754 0 1 0
+0.5 -0.178794 -0.154767 1 0 0
+0.5 0.0589411 0.0444471 1 0 0
+0.243188 0.294872 -0.297973 0 1 0
+-0.258985 -0.204617 -0.333333 0 0 1
+-0.5 0.0496687 -0.282932 1 0 0
+0.1404 0.371795 -0.350787 0.771004 0.620584 0.142927
+0.160073 -0.310996 -0.371795 0 0 1
+0.277463 0.211943 -0.333333 0.0639003 0.147071 0.98706
+0.272138 0.294872 -0.319089 0 1 0
+-0.352144 -0.371795 -0.261457 0 1 0
+-0.5 -0.0673911 -0.262905 1 0 0
+-0.30518 0.371795 0.1807 0 1 0
+-0.120825 -0.294872 0.230608 0 1 0
+-0.38718 -0.371795 0.0421378 0 1 0
+0.24247 -0.0365316 -0.275562 -0.285075 0.958135 0.0266522
+-0.476877 -0.294872 0.127668 0 1 0
+-0.416978 0.371795 0.00406498 0 1 0
+-0.454481 0.34887 -0.371795 0 0 1
+-0.201744 -0.371795 -0.273149 0 1 0
+0.318021 -0.227729 0.320513 0 0 1
+0.217649 -0.371795 -0.129631 0 1 0
+-0.5 0.0515804 0.238998 1 0 0
+0.493635 -0.294872 -0.348735 -0.322722 0.945995 -0.0307211
+0.448718 -0.310216 0.15939 1 0 0
+-0.123305 -0.294872 -0.212915 0 1 0
+-0.153377 0.198709 0.371795 0 0 1
+-0.18382 0.371795 0.268652 0 1 0
+0.190667 -0.122114 0.371795 0 0 1
+0.287296 -0.318231 0.320513 0 0 1
+-0.5 0.170376 -0.000490404 1 0 0
+-0.312164 -0.188239 -0.356924 0.899269 0.437359 -0.00567011
+-0.402106 -0.369393 -0.371795 -0.0472287 0.615517 0.786707
+-0.5 -0.234351 0.185438 1 0 0
+0.305216 -0.350996 0.320513 0 0 1
+-0.169747 -0.371795 0.275393 0 1 0
+-0.5 -0.220418 0.278149 1 0 0
+-0.395779 -0.371795 -0.0468858 0 1 0
+0.274181 0.279794 -0.371795 0 0 1
+-0.232681 -0.371795 -0.113636 0 1 0
+-0.141154 -0.342869 -0.368022 0.830019 0.127676 -0.542925
+-0.32471 0.277703 0.320513 0 0 1
+-0.279635 0.1842 -0.333333 0 0 1
+0.36224 0.294872 -0.101339 0 1 0
+-0.5 -0.0338649 0.0332393 1 0 0
+0.5 -0.0759998 0.260293 1 0 0
+0.141026 0.307506 -0.369286 0.858537 0.122987 -0.497783
+0.0331219 0.230897 -0.343292 -0.00151877 0.999834 0.0181826
+0.110417 0.332471 -0.371795 0 0 1
+0.037073 0.152125 -0.333333 0 0 1
+0.164968 0.294872 -0.0319595 0 1 0
+0.144165 0.294872 0.12367 0.464157 0.883217 -0.066978
+-0.364957 -0.270808 0.320513 0 0 1
+0.141026 0.368087 -0.210423 0.741123 0.669178 0.054199
+0.361117 -0.0221354 -0.371795 0 0 1
+0.492062 0.0238678 0.320513 0.314759 -0.126825 0.94066
+-0.5 0.233513 0.253943 1 0 0
+0.340388 0.208117 -0.371795 0 0 1
+-0.296585 -0.193134 0.353288 0.647421 0.762126 0.00296758
+0.162482 -0.371795 0.251779 0 1 0
+0.148733 -0.371795 -0.279494 0.0401968 0.999137 -0.0104934
+-0.5 -0.157848 -0.137111 1 0 0
+-0.19925 0.0464476 0.360223 0.969396 -0.245503 0
+0.411771 0.229773 -0.371795 0 0 1
+0.141109 -0.295814 -0.0509931 0.840816 0.51312 0.172441
+-0.351282 0.371795 0.0032923 0 1 0
+-0.107748 -0.232673 0.371795 0 0 1
+-0.40616 0.286837 0.320513 0 0 1
+-0.0555218 0.371795 0.228198 0 1 0
+-0.439914 0.371795 -0.330885 0 1 0
+0.156523 -0.371795 -0.351149 0 1 0
+0.407138 0.118884 -0.371795 0 0 1
+-0.233714 0.168181 0.371795 0 0 1
+-0.433506 0.315767 -0.371795 0 0 1
+-0.361697 -0.140545 0.320513 0 0 1
+0.5 -0.19783 0.0814519 1 0 0
+-0.5 0.00172917 -0.211776 1 0 0
+-0.40885 -0.333104 -0.371795 0 0 1
+0.5 0.240343 -0.16053 1 0 0
+0.5 0.252743 0.314294 0.998469 -0.000159089 0.0553066
+-0.461021 0.371795 0.287333 0 1 0
+-0.489493 0.0214522 -0.371795 0.0537897 -0.000386925 0.998552
+-0.5 0.321083 0.125488 1 0 0
+0.448718 -0.317847 0.133892 1 0 0
+-0.429052 -0.142705 -0.371795 0 0 1
+-0.211976 0.371795 -0.231641 0 1 0
+0.262265 0.294872 -0.348568 0 1 0
+-0.5 0.171091 -0.105451 1 0 0
+0.483623 -0.102885 -0.371795 0 0 1
+0.5 -0.03142 -0.0716826 1 0 0
+0.0287661 -0.294872 0.0134164 0 1 0
+-0.5 -0.227573 -0.0596507 1 0 0
+-0.0670348 0.371795 -0.21904 0 1 0
+-0.0283252 0.371795 0.183908 0 1 0
+-0.5 -0.032797 -0.116976 1 0 0
+-0.214922 -0.371795 -0.339109 0 1 0
+0.141109 -0.305259 -0.148397 0.976189 0.208805 -0.0587824
+0.200944 0.0242053 -0.279538 0.782163 -0.622682 -0.0220961
+-0.5 0.251961 -0.192675 1 0 0
+0.0565643 -0.294872 0.228772 0 1 0
+-0.5 -0.171579 0.158369 1 0 0
+0.274106 -0.187219 -0.333333 0 0 1
+-0.0883151 -0.294872 0.193733 0 1 0
+-0.5 -0.0449882 -0.370103 0.672379 0.14392 0.726081
+-0.0785273 0.371795 -0.3061 0 1 0
+0.149689 0.294872 -0.0382611 0.0265462 0.999571 0.0123455
+-0.47354 0.371795 0.233305 0 1 0
+0.433987 -0.19412 0.320513 0 0 1
+0.191106 0.294872 0.180568 0 1 0
+0.232224 0.230897 -0.334584 0.037341 0.377493 0.925259
+-0.382965 -0.371795 0.0645454 0 1 0
+0.5 -0.0437357 0.0614814 1 0 0
+0.0342167 0.335664 0.320513 0 0 1
+-0.373277 -0.0853624 0.320513 -0.411224 -0.144186 0.900059
+0.224355 0.143554 -0.333333 0 0 1
+0.276716 0.294872 -0.0186724 0 1 0
+0.364453 0.294872 -0.319013 0 1 0
+0.142291 0.294872 0.261649 0.419468 0.9041 -0.081545
+0.5 0.247961 0.25181 1 0 0
+0.221351 -0.037143 -0.308445 0.215412 0.975899 0.0349268
+-0.107618 -0.249817 -0.371795 0 0 1
+0.387297 -0.0625407 -0.371795 0 0 1
+-0.115354 -0.294872 -0.260423 0 1 0
+0.389793 0.232709 0.320513 0 0 1
+-0.342427 0.371795 -0.268019 0 1 0
+-0.245242 -0.15749 -0.333333 0 0 1
+0.26728 0.294872 0.0593352 0 1 0
+0.0163217 -0.0886959 -0.333333 0 0 1
+-0.4367 -0.371795 -0.0220266 0 1 0
+0.057536 0.0490548 -0.333333 0 0 1
+-0.0640322 0.371795 0.239182 0 1 0
+-0.448718 -0.325832 0.164805 1 0 0
+-0.189676 0.248236 0.369362 -0.192794 0.756996 0.624329
+0.337282 -0.371795 -0.160285 0 1 0
+0.5 0.253247 0.153115 1 0 0
+-0.5 0.359462 -0.093035 1 0 0
+-0.5 0.26441 -0.0629812 1 0 0
+-0.13681 -0.294872 0.0103473 -0.261357 0.960737 0.0931567
+-0.461459 0.371795 0.131239 0 1 0
+0.411528 0.294872 -0.108699 0 1 0
+0.218254 -0.0363134 -0.0771293 0.308919 0.951084 -0.00294152
+-0.497766 0.371795 -0.125205 -0.630129 0.764865 -0.133864
+0.205873 0.294872 0.317297 -0.0346349 0.891442 0.451809
+-0.5 -0.107843 -0.077965 1 0 0
+0.229979 -0.211784 -0.333333 0 0 1
+0.443672 -0.32562 0.320513 0.108535 -0.00286829 0.994088
+0.120858 0.165146 0.340956 0.614239 0.78912 0
+0.299366 0.229816 -0.371795 0 0 1
+0.396399 0.294872 -0.295593 0 1 0
+-0.5 -0.227035 -0.17677 1 0 0
+0.382271 0.294872 -0.340412 0 1 0
+-0.448718 -0.35746 0.115584 1 0 0
+-0.422542 0.130122 0.320513 0 0 1
+-0.5 0.219591 -0.0334412 1 0 0
+-0.47898 0.371795 0.234961 0 1 0
+-0.204144 -0.371795 0.130017 0 1 0
+-0.104153 -0.291822 -0.371795 -0.0228306 0.834267 0.550888
+0.320513 -0.0799693 -0.350615 1 0 0
+-0.141154 -0.353843 -0.00759548 1 0 0
+0.116288 0.18116 0.371795 0 0 1
+-0.0238455 0.371795 0.096775 0 1 0
+0.431618 -0.274013 -0.371795 0 0 1
+0.448718 -0.344188 -0.187739 1 0 0
+0.31657 -0.177686 -0.346375 0.950896 -0.309499 0.00253269
+0.41687 -0.371795 0.237417 0 1 0
+-0.5 0.0984769 0.20153 1 0 0
+-0.333186 -0.0174737 -0.371795 0 0 1
+-0.267587 -0.00243583 -0.0313152 -0.540316 -0.0457027 0.84022
+0.5 0.0768129 -0.223237 1 0 0
+-0.5 -0.173446 0.307929 1 0 0
+0.337796 0.294872 0.176756 0 1 0
+-0.2397 0.371795 -0.271656 0 1 0
+0.5 -0.130674 -0.091177 1 0 0
+0.448718 -0.301256 -0.301679 0.930801 -0.360531 0.0602275
+0.5 0.0911975 0.230626 1 0 0
+0.366155 0.184499 0.320513 0 0 1
+-0.446411 0.310613 0.320513 0 0 1
+-0.5 -0.0933923 0.0173928 1 0 0
+0.302746 -0.045335 0.371795 0 0 1
+0.0285803 -0.294872 -0.35628 0 1 0
+0.308898 0.167873 0.371795 0.187914 0.0557751 0.980601
+-0.0504518 -0.294872 -0.0746711 0 1 0
+0.141109 -0.301152 0.0239077 0.962006 0.271345 0.0302729
+0.291801 0.294872 -0.328717 0 1 0
+-0.463246 -0.0860886 0.320513 0 0 1
+0.447246 -0.371795 0.0487769 0.809852 -0.586066 0.0257914
+-0.5 -0.00425379 -0.0135109 1 0 0
+0.124117 0.371795 0.11398 0 1 0
+0.0667813 0.249587 -0.371795 0 0 1
+0.364371 -0.371795 0.245022 0 1 0
+0.422955 -0.295268 0.320513 0 0 1
+0.141109 -0.320708 -0.233444 1 0 0
+0.5 0.111428 -0.0476181 1 0 0
+-0.465523 0.298468 0.320513 0 0 1
+0.0231054 -0.294872 0.0380131 0 1 0
+0.300631 0.294872 -0.227222 0 1 0
+-0.196225 -0.155599 -0.333333 0 0 1
+0.141109 -0.357206 -0.347505 1 0 0
+-0.218841 0.371795 -0.282035 0 1 0
+-0.5 0.0901115 0.00741499 1 0 0
+0.360932 -0.371795 -0.30969 0 1 0
+-0.0499809 0.175608 -0.333333 0 0 1
+-0.35919 0.371795 -0.0499936 0 1 0
+0.220989 0.294872 0.152043 0 1 0
+-0.462095 -0.0848572 0.320513 0 0 1
+0.407527 -0.371795 -0.0638854 0 1 0
+0.0928965 -0.231298 0.371795 0 0 1
+-0.322009 0.237114 0.320513 0 0 1
+0.208088 0.042164 0.371795 -0.0967098 0.051143 0.993998
+-0.5 -0.288349 -0.0966042 0.914062 0.351767 -0.201866
+0.472353 0.0838354 -0.371795 0 0 1
+0.317441 -0.252246 -0.371795 0 0 1
+-0.468691 -0.0537739 -0.371795 0 0 1
+-0.5 0.220007 0.0127305 1 0 0
+0.346498 0.133622 0.326972 0.855732 0.471904 0.212202
+0.107095 -0.282692 -0.371795 0 0 1
+-0.438557 0.371795 -0.353942 0 1 0
+0.5 0.0871092 -0.117924 1 0 0
+-0.104484 -0.294872 -0.0192632 0 1 0
+-0.481856 0.17365 0.320513 0 0 1
+-0.07466 -0.0800239 -0.333333 0 0 1
+-0.5 0.298209 -0.00649876 1 0 0
+-0.00974839 0.371795 -0.221108 0 1 0
+-0.125262 -0.294872 -0.212013 0 1 0
+0.249318 -0.371795 -0.309147 0 1 0
+0.00678308 -0.243265 -0.371795 0 0 1
+0.00728431 -0.294872 -0.289221 0 1 0
+-0.433086 0.0819088 -0.371795 0 0 1
+0.5 0.0253209 0.111446 1 0 0
+0.5 0.00517479 -0.280061 1 0 0
+0.5 -0.0445742 -0.0229206 1 0 0
+-0.201647 0.0322888 -0.0407867 0.657172 0.732666 0.17699
+-0.0599843 -0.294872 0.177197 0 1 0
+-0.482933 0.371795 -0.267152 0 1 0
+-0.372885 -0.371795 -0.332992 0 1 0
+-0.0370443 0.0109673 0.320513 0 0 1
+0.231789 0.234196 0.358119 0.390927 0.920383 0.00846926
+0.214196 -0.0345479 -0.156275 0.410551 0.911736 -0.0136152
+-0.314455 -0.325732 0.320513 0 0 1
+0.287929 0.112797 0.371795 0 0 1
+-0.27146 -0.371795 0.13885 0 1 0
+0.5 -0.0423513 0.197719 1 0 0
+0.407121 -0.250468 -0.371795 0 0 1
+-0.185446 -0.296592 0.320513 0 0 1
+-0.221907 0.042581 -0.109208 0.213198 0.976852 -0.0175302
+-0.162124 0.371795 -0.282279 0 1 0
+-0.190834 -0.0171079 -0.107413 0.914239 -0.405176 0
+-0.116692 0.0301228 0.320513 0 0 1
+-0.396054 0.371795 0.313235 0 0.975318 0.220803
+0.483062 0.19638 -0.371795 0 0 1
+0.284904 -0.371795 0.201433 0 1 0
+-0.141154 -0.355037 -0.319924 1 0 0
+-0.125066 -0.222164 -0.333333 0.0158528 -0.0963437 0.995222
+0.14717 0.240408 0.371795 0 0 1
+0.5 -0.202635 0.243587 1 0 0
+0.5 -0.164839 -0.0665102 1 0 0
+-0.5 0.371482 0.100356 0.935521 -0.349691 0.0501734
+0.155682 0.294872 -0.17735 0 1 0
+-0.262502 -0.339151 -0.371795 0 0 1
+-0.320487 0.139709 0.371795 0 0 1
+0.355975 -0.357675 -0.371795 0 0 1
+-0.5 -0.223557 0.0367629 1 0 0
+0.5 0.138066 0.189368 1 0 0
+-0.5 0.225957 0.230335 1 0 0
+-0.38047 0.0587721 -0.371795 0 0 1
+0.10474 0.371795 0.0389677 0 1 0
+0.0784788 -0.276552 -0.371795 0 0 1
+-0.395813 0.0256403 -0.371795 0 0 1
+0.234658 0.0381213 -0.304289 0.140691 0.989894 -0.0177625
+0.495584 -0.294872 -0.18836 -0.236259 0.969688 -0.0623467
+-0.128301 0.371795 0.195263 0 1 0
+-0.438449 -0.371795 0.200651 0.0590777 0.998061 -0.0195799
+0.448718 -0.334058 -0.257253 1 0 0
+-0.266756 0.371795 0.218281 0 1 0
+-0.357857 0.112158 0.371795 0.818728 -0.196051 -0.539674
+-0.5 0.135792 -0.288806 1 0 0
+-0.5 -0.0155804 -0.0158014 1 0 0
+-0.424545 -0.371795 -0.180195 0 1 0
+0.448718 -0.350596 0.240935 1 0 0
+-0.5 -0.0686888 0.248762 1 0 0
+-0.448718 -0.304844 -0.109467 0.999674 0.0251116 0.00465598
+0.31956 -0.164861 -0.353013 0.991104 -0.130613 -0.0255418
+-0.5 0.122693 0.299939 1 0 0
+0.11856 0.136336 -0.333333 0 0 1
+-0.136276 -0.230897 -0.353404 0 1 0
+0.141026 0.351515 0.108916 1 0 0
+0.0246317 -0.294872 0.0471304 0 1 0
+0.5 0.282058 -0.227263 1 0 0
+0.48673 -0.294872 0.265725 0 1 0
+-0.0239526 0.256282 0.350054 0 1 0
+0.141026 0.304887 0.221074 1 0 0
+0.5 -0.238859 -0.34009 1 0 0
+-0.175981 -0.10131 0.320513 0.615086 0.167554 0.770451
+-0.393358 -0.371795 0.266253 0 1 0
+0.5 -0.104492 -0.266775 1 0 0
+0.5 0.126187 -0.361635 0.999065 0.028182 -0.032779
+0.396497 -0.371795 0.219255 0 1 0
+-0.28883 0.371795 -0.319431 0 1 0
+0.259892 0.0250627 -0.145965 0.753209 0.657716 0.00930853
+-0.282431 -0.371795 0.140458 0 1 0
+-0.146157 0.371795 0.147729 0 1 0
+-0.372498 0.0499211 -0.371795 0 0 1
+-0.118974 -0.256282 0.357569 0 1 0
+-0.5 0.326097 0.0442009 1 0 0
+-0.5 -0.284808 0.288044 1 0 0
+0.302829 0.238639 -0.371795 0 0 1
+-0.414391 0.351621 0.320513 0 0 1
+-0.189066 -0.0121402 -0.208338 0.961883 -0.273459 0.000776825
+0.0290523 0.202536 0.368668 -0.122072 -0.65063 0.74952
+0.320513 0.147954 -0.346535 0.99995 0.00986503 -0.00159373
+-0.203735 0.0183619 0.321328 0.725411 -0.0520221 0.686347
+-0.25984 -0.209879 -0.333333 0 0 1
+-0.229942 -0.371795 -0.220995 0 1 0
+0.141026 0.371713 0.213088 0.612686 0.783468 0.103893
+-0.425336 0.371795 0.267437 0 1 0
+0.5 -0.274137 -0.216459 1 0 0
+-0.5 -0.0696123 0.184296 1 0 0
+0.299928 0.294872 0.263783 0 1 0
+-0.374494 0.371795 0.263455 0 1 0
+-0.259467 0.371795 0.0855524 0 1 0
+-0.5 -0.191284 0.24749 1 0 0
+0.0239693 0.371795 0.108631 0 1 0
+-0.5 0.0616735 -0.199646 1 0 0
+0.215778 -0.287914 0.320513 0 0 1
+-0.5 0.0599833 -0.234741 1 0 0
+0.169115 -0.371795 -0.132442 0 1 0
+-0.167831 -0.371795 -0.081574 0 1 0
+-0.5 0.255178 -0.234105 1 0 0
+-0.5 0.33811 -0.19362 1 0 0
+-0.5 -0.117788 0.305438 1 0 0
+-0.0347131 -0.294872 0.274161 0 1 0
+0.181175 0.188454 -0.333333 0 0 1
+0.5 0.104668 0.01961 1 0 0
+-0.448718 -0.298704 0.199975 0.907852 0.416303 0.0499616
+0.387223 0.294872 0.223576 0 1 0
+-0.0381965 0.20101 0.36129 -0.164993 0.986295 0.000421653
+-0.167107 0.230897 -0.338304 0.0230686 0.856452 0.51571
+0.128095 -0.294872 0.24692 0 1 0
+-0.5 0.186131 -0.304802 1 0 0
+0.36216 -0.371795 -0.0662691 0 1 0
+-0.0888021 0.231025 -0.371795 -0.00413587 0.548704 0.836006
+-0.297415 0.219424 0.320513 0 0 1
+0.5 -0.132021 0.239235 1 0 0
+0.448718 -0.311283 -0.0706596 1 0 0
+-0.233005 0.354677 -0.371795 0 0 1
+-0.0908837 0.33672 -0.371795 0 0 1
+-0.433437 -0.10133 -0.371795 0 0 1
+0.448718 -0.338597 0.250077 1 0 0
+-0.0850134 0.36451 0.320513 -0.0494605 0.38065 0.923395
+-0.220798 -0.371795 -0.162574 0 1 0
+-0.499592 0.193996 -0.371795 0.556961 0.025238 0.830155
+0.32988 0.294872 -0.180466 0 1 0
+-0.0365671 0.371795 0.0523679 0 1 0
+-0.201582 0.278845 0.320513 0 0 1
+0.0895604 -0.0649541 0.320513 0 0 1
+0.256195 0.0287599 -0.216513 0.663993 0.747064 -0.031775
+-0.384772 -0.371795 -0.266765 0 1 0
+-0.250101 -0.371795 -0.185413 0 1 0
+-0.5 -0.142083 0.0849569 1 0 0
+0.141109 -0.304754 0.200848 0.982996 0.177992 0.0451449
+0.5 -0.0484097 -0.0122596 1 0 0
+0.126078 -0.294872 -0.0878594 0 1 0
+-0.245776 -0.371795 -0.117182 0 1 0
+0.477065 0.294872 0.0512419 0 1 0
+0.285127 -0.0647505 0.371795 0 0 1
+-0.128733 -0.294872 0.0643715 0 1 0
+-0.5 0.235079 0.30836 1 0 0
+-0.182339 -0.371795 -0.19665 0 1 0
+-0.263672 0.04229 -0.333333 -0.0384801 0.0629788 0.997273
+0.257142 -0.0278133 -0.259494 -0.654629 0.75515 0.0347795
+0.0503064 -0.159884 0.320513 0 0 1
+-2.3131e-005 0.167133 -0.333333 0 0 1
+-0.487659 0.146532 0.320513 -0.00924085 0.000348752 0.999957
+-0.0556271 0.303899 -0.371795 0 0 1
+0.447645 -0.2945 -0.371795 -0.245852 0.24415 0.938055
+-0.141154 -0.353598 -0.0885409 1 0 0
+-0.315607 0.371795 0.29357 0 1 0
+0.141026 0.35608 -0.277643 1 0 0
+-0.351991 0.371795 0.0664666 0 1 0
+0.5 0.0633725 -0.317896 1 0 0
+0.5 0.247301 0.0709173 1 0 0
+0.141109 -0.316035 0.0884291 1 0 0
+0.0464022 -0.2404 -0.371795 0.00465209 -0.163313 0.986563
+-0.492137 -0.231502 0.320513 -0.135347 -0.0635979 0.988755
+-0.24315 -0.371795 0.194385 0 1 0
+-0.0328282 0.28777 -0.371795 0 0 1
+0.376481 0.294872 0.0665565 0 1 0
+0.299208 0.136992 -0.333333 0 0 1
+0.266052 0.294872 -0.184886 0 1 0
+-0.285909 -0.371795 0.0187883 0 1 0
+-0.331979 0.252997 0.320513 0 0 1
+-0.5 0.272452 0.0326579 1 0 0
+0.16532 0.0641346 -0.333333 0 0 1
+0.5 0.257836 -0.0481777 1 0 0
+0.5 -0.231768 0.0423575 1 0 0
+0.331187 0.294872 0.302875 0 1 0
+-0.397584 0.371795 -0.0992566 0 1 0
+0.0678271 -0.184384 0.320513 -0.0306728 0.324785 0.94529
+-0.5 -0.29329 -0.221975 0.714567 0.677982 0.172436
+0.5 -0.278059 0.172565 1 0 0
+-0.18251 0.371795 -0.256025 0 1 0
+-0.127025 -0.117181 0.320513 0 0 1
+-0.287077 -0.371795 -0.26952 0 1 0
+-0.0299855 -0.294872 -0.143586 0 1 0
+0.176461 -0.371795 -0.0967949 0 1 0
+0.338839 -0.212633 -0.371795 0 0 1
+0.141026 0.325486 0.0533402 1 0 0
+-0.0159247 -0.294872 0.160419 0 1 0
+-0.331831 -0.0827742 0.371795 0 0 1
+-0.320802 0.371795 0.296071 0 1 0
+0.5 0.139207 -0.099448 1 0 0
+0.239631 -0.0372924 -0.0652666 -0.166897 0.985872 0.0141766
+0.5 0.137485 0.308044 1 0 0
+-0.414129 -0.311121 0.320513 0 0 1
+0.14471 0.252008 0.371795 0.0882455 0.445723 0.890811
+0.199458 0.0456265 0.348088 0.969402 0.245478 -2.37501e-005
+0.0448154 0.371795 0.0678767 0 1 0
+0.5 -0.228098 -0.19035 1 0 0
+0.141109 -0.318648 -0.165279 1 0 0
+0.427997 -0.106482 0.320513 0 0 1
+-0.174994 -0.371795 0.0952033 0 1 0
+-0.204376 0.010623 0.357115 0.99658 -0.0826357 3.50288e-005
+-0.455908 -0.248231 -0.371795 0 0 1
+0.0459454 -0.152955 -0.333333 0 0 1
+0.5 0.108534 -0.236708 1 0 0
+0.300035 0.277194 0.320513 0 0 1
+-0.486837 0.18907 0.320513 0 0 1
+-0.182899 0.249709 0.37036 0.0677037 0.881106 0.468048
+0.187786 -0.248647 0.344857 -0.212557 0.977149 0
+0.141109 -0.298252 0.0924889 0.96597 0.25828 -0.0139324
+-0.241239 -0.371795 0.239139 0 1 0
+-0.421359 -0.0403484 0.320513 0 0 1
+-0.476506 0.209233 0.320513 0 0 1
+-0.5 0.274382 0.125596 1 0 0
+-0.270698 -0.255192 0.320513 0 0 1
+0.348403 -0.0459256 -0.371795 0 0 1
+-0.482373 0.034474 -0.371795 0 0 1
+-0.332832 -0.371795 -0.367521 0.0237832 0.96164 0.273283
+0.145022 -0.253167 0.371795 -0.0945902 0.812578 -0.575126
+-0.5 0.198522 -0.210987 1 0 0
+0.5 0.152378 0.0669412 1 0 0
+0.5 -0.159824 -0.0194675 1 0 0
+0.5 0.25752 0.022292 1 0 0
+0.362039 0.294872 -0.117306 0 1 0
+0.496992 -0.294872 -0.00829539 -0.273733 0.958486 0.0798373
+0.300284 -0.164603 -0.333333 0 0 1
+0.5 -0.0348665 0.089392 1 0 0
+0.126175 -0.294872 -0.100406 0 1 0
+0.141026 0.333488 -0.0327758 1 0 0
+-0.219492 0.371795 0.0308599 0 1 0
+0.5 0.0937217 0.16159 1 0 0
+-0.291458 -0.232133 0.320513 0 0 1
+-0.5 -0.00138887 -0.119816 1 0 0
+0.298687 0.234752 0.320513 0 0 1
+-0.5 -0.290437 -0.31259 0.958842 0.276669 -0.0638523
+0.0638526 -0.112612 0.320513 0 0 1
+-0.5 0.191576 -0.134903 1 0 0
+-0.5 -0.0361194 0.21817 1 0 0
+0.5 0.222771 0.193143 1 0 0
+0.444976 -0.156773 0.320513 0 0 1
+-0.5 0.0495904 -0.13193 1 0 0
+-0.38717 0.371795 -0.304296 0 1 0
+0.30618 -0.371795 0.15064 0 1 0
+0.5 0.120765 -0.0609227 1 0 0
+-0.345331 -0.371795 0.162391 0 1 0
+0.096278 -0.294872 -0.317458 0 1 0
+-0.00972416 0.371795 -0.335012 0 1 0
+-0.237868 -0.190859 0.371795 0 0 1
+0.260056 -0.00645047 0.00504041 0.507242 -0.112631 0.854412
+0.0134699 0.371795 0.116636 0 1 0
+-0.497675 0.170231 -0.371795 0.424867 -0.0180645 0.905075
+0.5 0.179035 0.235722 1 0 0
+0.0362067 0.319126 0.320513 0 0 1
+0.255917 -0.0290381 -0.212277 -0.67649 0.736451 -0.00138542
+-0.0254617 0.371795 -0.074041 0 1 0
+-0.203564 0.0339615 -0.318546 0.64084 0.767468 0.0177966
+-0.405499 -0.371795 -0.324796 0 1 0
+-0.0515813 0.371795 -0.188562 0 1 0
+0.022609 0.126693 0.320513 0 0 1
+-0.187234 0.000629568 -0.149479 0.99957 0.0285356 -0.00676107
+-0.270697 0.371795 0.178474 0 1 0
+-0.5 -0.190787 0.0198343 1 0 0
+-0.20504 -0.134112 0.371795 0 0 1
+0.283519 -0.0153495 0.371795 0 0 1
+0.141109 -0.307487 0.235971 1 0 0
+0.27764 0.294872 0.0575381 0 1 0
+-0.5 -0.0264306 0.0363268 1 0 0
+-0.487197 -0.136797 0.320513 0 0 1
+-0.00267978 0.0861539 -0.333333 0 0 1
+0.201211 -0.371795 -0.367257 0.0618225 0.947598 0.313427
+0.109482 -0.011616 -0.333333 0 0 1
+0.499431 0.0878494 0.320513 0.984025 0.0291905 0.175619
+0.215105 -0.371795 -0.227422 0 1 0
+-0.289349 -0.371795 -0.289867 0 1 0
+-0.10486 -0.202437 0.371795 0 0 1
+-0.278982 0.371795 0.246058 0 1 0
+-0.5 -0.0263037 -0.177669 1 0 0
+-0.272234 0.0751216 0.371795 0 0 1
+0.0106825 -0.294872 0.0566958 0 1 0
+0.141026 0.304859 0.173514 0.99816 0.0484239 0.0364855
+-0.0539034 -0.248185 0.371795 0.00850202 -0.305171 0.95226
+0.5 -0.143839 0.065218 1 0 0
+0.197424 0.294872 0.0597503 0 1 0
+-0.0113172 0.230897 -0.351059 0 1 0
+-0.162088 0.0616358 -0.333333 0 0 1
+0.0146044 0.00659281 0.320513 0 0 1
+-0.156471 0.371795 0.0129306 0 1 0
+-0.417601 0.371795 0.309101 -0.0217307 0.995083 0.096628
+0.5 -0.186262 0.156101 1 0 0
+0.38864 0.294872 0.254776 0 1 0
+0.0154548 -0.224347 -0.333333 -0.00988308 -0.0451595 0.998931
+-0.269143 -0.371795 -0.18338 0 1 0
+0.5 -0.125731 -0.212107 1 0 0
+-0.0123708 0.371795 -0.307604 0 1 0
+0.300199 -0.371795 -0.222336 0 1 0
+-0.385699 -0.0646139 0.320513 -0.0963898 -0.0363572 0.994679
+-0.0357275 0.34823 0.320513 0 0 1
+0.141026 0.319521 0.0819095 1 0 0
+-0.0995229 0.151211 -0.333333 0 0 1
+-0.5 0.317528 -0.326252 1 0 0
+0.438806 -0.371795 0.028937 -0.0448126 0.998766 0.0214268
+-0.373584 -0.371795 -0.354012 0 1 0
+0.0859779 0.371795 -0.094328 0 1 0
+-0.42582 -0.186006 0.320513 0 0 1
+0.262657 0.0396976 -0.333333 0 0 1
+0.455722 0.227968 0.320513 0 0 1
+-0.5 -0.0632986 0.0557286 1 0 0
+-0.0736471 -0.0301339 0.320513 0 0 1
+0.5 0.124199 -0.200817 1 0 0
+-0.341209 -0.168999 -0.371795 0 0 1
+-0.5 0.0528872 -0.145542 1 0 0
+0.141026 0.363935 -0.284249 0.984104 0.174988 0.0303044
+0.288702 0.294872 -0.0989012 0 1 0
+-0.178016 -0.250772 0.321385 0.27321 0.766245 -0.581571
+-0.5 -0.131806 0.220666 1 0 0
+-0.211959 0.207487 -0.333333 0 0 1
+-0.141154 -0.300337 0.284688 0.945923 -0.317037 -0.0686796
+0.0943094 -0.294872 0.136115 0 1 0
+0.5 -0.146847 0.119001 1 0 0
+-0.455901 0.315382 -0.371795 0 0 1
+-0.5 -0.106307 0.297066 1 0 0
+-0.435322 0.371795 0.054825 0 1 0
+-0.229368 -0.278091 0.320513 0 0 1
+0.448718 -0.309454 -0.254695 1 0 0
+0.430125 -0.318688 0.320513 0 0 1
+-0.5 -0.0650096 0.275051 1 0 0
+-0.213808 -0.371795 0.316846 0.0252448 0.940445 -0.339006
+-0.0350173 -0.294872 -0.0887728 0 1 0
+0.5 0.227409 -0.0700201 1 0 0
+-0.160427 0.371795 0.157883 0 1 0
+0.0683905 -0.294872 0.0994654 0 1 0
+-0.5 -0.00729986 0.144323 1 0 0
+0.450392 -0.294872 0.0305891 0.92466 -0.380686 0.00908647
+0.5 -0.129169 -0.223202 1 0 0
+0.411746 0.294872 0.076916 0 1 0
+0.0487682 -0.294872 0.160304 0 1 0
+0.499165 0.0895093 -0.371795 -0.539969 0.0509683 0.84014
+-0.5 0.116577 -0.0204247 1 0 0
+-0.368958 -0.371795 0.119968 0 1 0
+-0.5 0.319854 0.196928 1 0 0
+0.122861 -0.294872 -0.0194952 0 1 0
+0.0267288 -0.294872 -0.370996 0.0379059 0.821213 0.569361
+0.264091 -0.0262798 0.371795 0 0 1
+-0.5 0.236511 -0.0920235 1 0 0
+0.187227 0.294872 -0.20758 0 1 0
+0.311532 0.170756 -0.333333 0.32536 0.109463 0.939233
+0.282307 0.294872 -0.149479 0 1 0
+-0.47413 -0.251919 -0.371795 0 0 1
+-0.323475 0.0491474 -0.371795 0.715188 0.20254 -0.668942
+0.448718 -0.313488 0.167216 1 0 0
+-0.220492 0.371795 0.134892 0 1 0
+-0.141154 -0.329965 -0.273914 1 0 0
+0.309046 0.294872 -0.105467 0 1 0
+0.258281 -0.0266743 -0.299068 0.739898 -0.67266 0.00892824
+0.152998 0.230772 -0.333333 0.0548414 0.942243 0.33041
+0.285567 0.294872 -0.0393398 0 1 0
+-0.164196 0.371795 0.153363 0 1 0
+0.0250683 -0.2032 0.359339 -0.154759 0.987952 0
+0.249587 -0.216041 0.371795 0.0847281 -0.193358 0.977463
+-0.131437 0.345662 0.320513 0 0 1
+0.266378 0.0142978 -0.0927397 0.936252 0.350812 -0.0190575
+-0.466873 0.371795 0.0151037 0 1 0
+-0.5 0.160675 -0.140937 1 0 0
+-0.5 -0.201528 -0.211365 1 0 0
+0.5 0.0154407 0.0886804 1 0 0
+-0.172702 0.218416 -0.333333 0 0 1
+0.272484 -0.371795 -0.34753 0 1 0
+-0.141154 -0.316179 0.0289461 1 0 0
+-0.477656 -0.294872 -0.0531439 0 1 0
+0.233434 -0.371795 -0.111279 0 1 0
+-0.265369 0.371795 -0.0244875 0 1 0
+-0.0541889 -0.294872 -0.153055 0 1 0
+0.5 0.130861 -0.00493652 1 0 0
+-0.30993 -0.371795 0.151178 0 1 0
+0.411842 -0.0776571 0.320513 0 0 1
+-0.189828 -0.34731 -0.371795 0 0 1
+-0.141154 -0.341172 -0.369248 0.755205 0.131988 -0.642063
+0.141109 -0.362209 0.26355 0.993249 0.11597 -0.00284382
+-0.303007 0.235785 0.320513 0 0 1
+-0.141154 -0.306047 -0.0328268 1 0 0
+0.192845 0.00613978 -0.302168 0.98762 -0.156268 0.0137016
+-0.448718 -0.300438 -0.230283 0.963746 0.26103 0.0552813
+0.5 -0.124984 -0.3495 1 0 0
+-0.082296 0.371795 -0.291437 0 1 0
+0.434723 -0.0125262 0.320513 0 0 1
+-0.164943 -0.275175 0.320513 0 0 1
+-0.5 0.368637 0.147625 0.878828 -0.473297 -0.0604253
+0.268681 0.294872 0.282076 0 1 0
+-0.0186688 0.29418 -0.371795 0 0 1
+0.350612 -0.371795 -0.161382 0 1 0
+-0.250787 -0.11011 0.371795 0 0 1
+0.470151 -0.294872 -0.300369 0 1 0
+-0.297269 -0.208667 -0.339998 0.690258 0.693722 -0.205653
+-0.104398 -0.199177 0.371795 0 0 1
+0.362435 -0.371795 -0.327634 0 1 0
+0.329206 0.191091 0.320513 0 0 1
+-0.141154 -0.295803 0.297911 0.848263 -0.513809 -0.128257
+0.275562 -0.371795 -0.225201 0 1 0
+-0.0484286 -0.0648481 0.320513 0 0 1
+-0.390039 -0.371795 -0.015526 0 1 0
+-0.5 -0.0528013 0.199475 1 0 0
+0.5 0.109551 -0.2712 1 0 0
+-0.0803323 -0.0153445 -0.333333 0 0 1
+-0.141154 -0.324893 -0.201437 1 0 0
+-0.37328 -0.371795 -0.277982 0 1 0
+0.141109 -0.334908 0.178639 1 0 0
+0.381092 0.294872 0.215026 0 1 0
+0.395296 0.294872 0.237921 0 1 0
+-0.397634 -0.371795 -0.315581 0 1 0
+-0.5 0.231588 0.0821986 1 0 0
+-0.5 0.340708 0.214713 1 0 0
+-0.443256 -0.36297 -0.371795 0.270791 -0.0023483 0.962635
+-0.221981 0.371795 0.103272 0 1 0
+0.156572 -0.0125822 0.320513 0 0 1
+-0.5 0.0706232 -0.00614719 1 0 0
+-0.228117 -0.321802 0.320513 0 0 1
+0.144991 -0.371795 -0.167152 0.255434 0.962868 0.0873983
+-0.349548 -0.232714 -0.371795 0 0 1
+-0.5 -0.121748 0.174504 1 0 0
+-0.187892 -0.230897 -0.341754 -0.00497803 0.99269 -0.120587
+-0.229285 -0.286148 0.320513 0 0 1
+0.5 0.291648 0.22184 0.844285 0.535227 0.0267243
+-0.311994 -0.371795 0.226395 0 1 0
+0.202294 -0.0388148 0.371795 0.746054 -0.208929 -0.632259
+0.45713 -0.222432 -0.371795 0 0 1
+0.5 0.121036 0.252085 1 0 0
+0.468898 -0.0960683 -0.371795 0 0 1
+0.141026 0.34447 -0.151714 1 0 0
+0.373855 -0.108337 0.320513 0 0 1
+-0.061311 -0.294872 -0.279519 0 1 0
+-0.365999 0.371795 -0.30166 0 1 0
+0.34301 -0.206285 -0.371795 0 0 1
+0.5 -0.0548469 -0.236645 1 0 0
+-0.324532 0.237395 -0.371795 0 0 1
+0.100076 0.371795 0.2087 0 1 0
+-0.189251 -0.0128308 -0.239073 0.941901 -0.335887 0.00135977
+0.193931 0.0671107 0.356421 0.944841 0.327468 -0.00629995
+0.215146 0.294872 0.00779891 0 1 0
+-0.497423 0.247809 -0.371795 0.385251 -0.0576661 0.921009
+0.327958 -0.112654 0.371795 0 0 1
+-0.369156 0.371795 -0.281928 0 1 0
+0.0105344 0.020127 -0.333333 0 0 1
+-0.330739 -0.00877549 0.371795 0 0 1
+0.369586 0.0785267 -0.371795 0 0 1
+-0.5 -0.274055 -0.0833015 1 0 0
+-0.5 -0.244799 -0.2588 1 0 0
+-0.285683 0.218049 -0.347212 -0.546853 0.837228 0
+0.0995724 0.178703 0.34942 0.475934 0.879481 0
+-0.301866 0.371795 0.301523 0 1 0
+0.317871 0.294872 -0.368145 0.0389841 0.924135 -0.380071
+-0.5 -0.201696 -0.147995 1 0 0
+-0.5 -0.26804 0.0661382 1 0 0
+-0.270814 0.371795 -0.137571 0 1 0
+-0.479115 -0.248872 0.320513 0 0 1
+-0.116807 0.22454 -0.333333 0.158998 0.28922 0.943966
+0.5 -0.28673 -0.21364 0.993469 -0.113411 0.0125168
+-0.285056 -0.371795 -0.321367 0 1 0
+-0.5 0.286546 0.0367555 1 0 0
+-0.289472 -0.198597 0.342327 0.608809 0.793305 -0.00417595
+-0.107773 -0.294872 -0.08637 0 1 0
+0.233229 0.230897 -0.361633 0 1 0
+0.5 0.0552082 -0.320057 1 0 0
+0.20276 -0.133236 -0.333333 0 0 1
+0.4252 -0.22111 0.320513 0 0 1
+0.215587 -0.371795 -0.298048 0 1 0
+0.185496 0.0668286 -0.333333 0 0 1
+-0.5 -0.285851 0.29989 0.999905 0.0129508 -0.00463498
+0.156024 -0.168041 0.371795 0 0 1
+0.5 -0.00929774 -0.21747 1 0 0
+0.212558 -0.241369 0.345266 -0.349475 0.936946 0
+0.0676514 0.371795 0.063869 0 1 0
+0.33834 0.294872 -0.344987 0 1 0
+0.5 -0.156661 -0.317149 1 0 0
+0.463811 -0.161222 -0.371795 0 0 1
+0.383708 -0.364163 -0.371795 0.0195991 0.113288 0.993369
+0.258579 0.294872 -0.317843 0 1 0
+-0.343965 -0.371795 0.101319 0 1 0
+0.149202 0.294872 0.303918 0.1179 0.992913 0.0149707
+-0.370968 0.371795 0.196722 0 1 0
+-0.5 0.296679 -0.259093 1 0 0
+-0.5 0.171056 0.160987 1 0 0
+0.0199778 0.256282 0.359486 0 1 0
+-0.380597 -0.191954 0.320513 0 0 1
+-0.487612 -0.294872 -0.176635 0 1 0
+-0.250133 -0.371795 0.266826 0 1 0
+0.5 0.137306 0.313984 0.962044 0.0512465 0.268039
+0.259348 0.170166 -0.333333 0 0 1
+0.403573 0.294872 -0.298775 0 1 0
+0.5 -0.243505 0.213169 1 0 0
+0.00118275 -0.294872 -0.290089 0 1 0
+0.247318 -0.371795 -0.0818992 0 1 0
+0.141026 0.342179 0.206427 1 0 0
+-0.5 0.248117 0.293463 1 0 0
+0.426927 0.163012 0.320513 0 0 1
+0.141109 -0.34753 -0.332325 1 0 0
+-0.427639 -0.00237651 0.320513 0 0 1
+0.141109 -0.303995 -0.139872 0.9888 0.149072 0.00715874
+-0.448718 -0.326525 0.0226818 1 0 0
+-0.423215 0.0451813 -0.371795 0 0 1
+-0.141154 -0.31883 -0.273319 1 0 0
+-0.16715 -0.371795 -0.224151 0 1 0
+-0.133716 0.255888 0.325951 0.0263477 0.968382 0.248075
+0.5 -0.18448 0.320414 0.716065 0.0661077 0.694896
+-0.263238 0.371795 -0.361679 -0.00776142 0.953227 -0.302155
+-0.396859 0.00321627 -0.371795 0 0 1
+0.213587 0.130542 0.371795 0 0 1
+0.360056 -0.141156 0.320513 0 0 1
+-0.141154 -0.345508 -0.208761 1 0 0
+-0.281879 0.281932 -0.371795 0 0 1
+0.303641 -0.326761 0.320513 0 0 1
+-0.305203 0.0134599 -0.333333 0 0 1
+-0.159664 0.0403976 -0.333333 0 0 1
+-0.449909 -0.294872 -0.0497843 0.673037 0.73922 0.0239581
+-0.499211 -0.161008 -0.371795 0.731679 -0.07669 0.677321
+-0.4359 -0.301451 -0.371795 0 0 1
+0.0241013 -0.294872 -0.240459 0 1 0
+0.5 -0.0484285 0.0238231 1 0 0
+-0.327545 0.371795 -0.341816 0 1 0
+-0.348857 -0.141864 0.320513 -0.161625 -0.114791 0.980153
+-0.182008 0.371795 -0.30322 0 1 0
+0.329583 -0.371795 -0.170315 0 1 0
+0.30112 -0.157083 0.371795 0 0 1
+0.5 -0.10524 -0.12288 1 0 0
+0.470251 0.294872 0.127945 0 1 0
+0.0499997 -0.294872 0.22974 0 1 0
+0.5 0.00375572 0.121385 1 0 0
+0.185028 -0.371795 0.305782 0 1 0
+0.5 0.215671 0.104901 1 0 0
+-0.263544 0.0286357 -0.295226 0.786825 -0.617167 0.00334179
+0.0796056 0.371795 -0.342063 0 1 0
+0.5 0.00953825 -0.190972 1 0 0
+0.005085 0.371795 0.0797971 0 1 0
+-0.293236 -0.371795 -0.205719 0 1 0
+0.141026 0.361585 0.257034 1 0 0
+0.260671 -0.0240954 -0.098193 0.784216 -0.620455 0.00649806
+0.0898994 0.371795 0.0707408 0 1 0
+0.5 0.0958052 -0.315692 1 0 0
+-0.0654349 0.0296133 0.320513 0 0 1
+-0.0588238 0.319204 -0.371795 0 0 1
+-0.5 -0.266166 0.298743 1 0 0
+-0.0923196 -0.294872 0.16181 0 1 0
+0.152408 0.184956 -0.333333 0 0 1
+-0.362805 -0.147142 0.320513 0 0 1
+0.215526 0.0351677 -0.0293694 -0.400592 0.916116 0.0160359
+0.2091 -0.371795 -0.0731598 0 1 0
+-0.0694007 0.371795 0.302952 0 1 0
+0.5 -0.100189 -0.0343154 1 0 0
+-0.29065 -0.130862 -0.333333 0 0 1
+-0.5 0.0307458 -0.262963 1 0 0
+0.327147 -0.169652 -0.371795 0.0136599 -0.00471683 0.999896
+0.320513 -0.039875 -0.353205 1 0 0
+0.468893 -0.294872 -0.238922 0 1 0
+0.5 0.195555 -0.0719418 1 0 0
+-0.375213 -0.371795 0.172838 0 1 0
+0.452212 -0.294872 0.268203 -0.388264 0.921389 -0.017148
+0.196178 0.0610529 0.371795 0.749899 0.209738 -0.627424
+0.0800979 -0.172327 -0.333333 0 0 1
+0.414938 0.0341882 0.320513 0 0 1
+-0.196496 -0.371795 0.187504 0 1 0
+-0.0368764 -0.294872 -0.364438 -0.042378 0.978673 0.201004
+-0.194088 0.369795 -0.371795 -0.189429 -0.236571 0.95297
+0.442786 -0.371795 -0.291642 -0.29492 0.950927 -0.0935941
+0.5 0.267631 0.0512879 1 0 0
+-0.223106 -0.371795 0.244967 0 1 0
+0.199303 0.246141 0.36195 0.262985 0.96247 0.0670008
+0.317081 0.294872 0.265306 0 1 0
+0.344882 0.0231374 -0.371795 0 0 1
+0.134426 0.339201 -0.371795 -0.113126 0.0396389 0.99279
+-0.5 -0.111479 -0.123244 1 0 0
+-0.468276 0.117545 0.320513 0 0 1
+0.5 0.133991 0.00821609 1 0 0
+0.40522 -0.242058 0.320513 0 0 1
+0.454813 -0.195865 0.320513 0 0 1
+0.203564 -0.0204182 0.365999 0.989385 -0.0923564 -0.112193
+0.0897243 -0.294872 0.148629 0 1 0
+0.402483 0.180115 0.320513 0 0 1
+-0.5 -0.029954 0.228069 1 0 0
+-0.364411 -0.321196 -0.371795 0 0 1
+0.481957 0.294872 0.276368 0 1 0
+0.0709866 -0.294735 0.320513 0.0406122 -0.434692 0.899663
+-0.249197 0.0682918 0.371795 0 0 1
+-0.5 0.281904 -0.317404 1 0 0
+0.375346 0.199645 0.320513 0 0 1
+-0.336096 0.371795 -0.139558 0 1 0
+0.5 0.15942 0.0836017 1 0 0
+-0.5 0.157078 -0.323485 1 0 0
+-0.198319 0.0771601 0.371795 0.149029 0.00950757 0.988787
+0.385391 0.294872 0.157353 0 1 0
+0.348898 0.16185 -0.371795 0 0 1
+0.144639 -0.322723 -0.371795 0.238535 0.0230002 0.970861
+0.5 -0.279459 0.112836 1 0 0
+0.118648 0.371795 0.144094 0 1 0
+-0.3365 -0.223134 -0.371795 0 0 1
+-0.229292 -0.247316 0.320513 0 0 1
+-0.419539 0.371795 -0.248298 0 1 0
+-0.5 0.325342 0.127068 1 0 0
+-0.141154 -0.296017 0.0700252 0.784224 -0.616547 0.0697349
+-0.296705 -0.366321 -0.371795 0.00173224 0.217714 0.976011
+-0.320462 0.371795 0.0832132 0 1 0
+0.0599982 0.322756 -0.371795 0 0 1
+0.5 0.19154 0.0473082 1 0 0
+0.141026 0.339029 -0.17908 1 0 0
+-0.203586 0.371795 -0.0165214 0 1 0
+0.382676 -0.173932 0.320513 0 0 1
+-0.346598 -0.181846 0.320513 0 0 1
+-0.5 0.0287748 -0.0589721 1 0 0
+-0.0696135 -0.294872 -0.172849 0 1 0
+-0.437572 -0.040757 0.320513 0 0 1
+-0.359028 0.116936 0.320513 -0.380072 0.196249 0.903898
+-0.221479 0.0424664 -0.139188 0.212064 0.977235 0.00632478
+0.5 -0.274859 -0.26608 1 0 0
+-0.3347 0.371795 -0.329408 0 1 0
+0.196988 -0.371795 -0.170878 0 1 0
+0.481253 0.294872 0.241372 0 1 0
+-0.443609 0.243419 -0.371795 0 0 1
+-0.215791 0.371795 0.217609 0 1 0
+-0.448718 -0.354047 -0.187126 1 0 0
+-0.146602 -0.371795 0.223864 -0.290127 0.93854 -0.187003
+-0.151457 -0.0364859 0.320513 0 0 1
+0.240642 -0.22986 0.368723 -0.321739 0.910142 -0.26101
+-0.5 -0.199951 0.155847 1 0 0
+0.5 0.189314 -0.183285 1 0 0
+0.367557 -0.371795 0.00365732 0 1 0
+0.0566903 -0.294872 0.220954 0 1 0
+0.5 -0.165225 -0.282199 1 0 0
+-0.108529 0.211619 -0.333333 0 0 1
+-0.192386 -0.371795 0.278279 0 1 0
+0.5 0.119413 0.126124 1 0 0
+0.0471172 -0.0633511 0.320513 0 0 1
+0.5 -0.286297 -0.108929 0.972147 -0.234348 0.00331509
+0.453726 -0.294872 0.158409 -0.368582 0.911716 -0.181443
+0.231577 0.0383908 -0.0388819 0.0086944 0.999741 -0.0210152
+0.5 -0.239911 0.176726 1 0 0
+0.0662769 -0.0658791 -0.333333 0 0 1
+-0.0636696 0.194416 0.353837 -0.324705 0.945815 0
+0.259297 0.294872 0.241409 0 1 0
+-0.5 -0.178643 -0.307433 1 0 0
+0.171917 -0.371795 -0.0697506 0 1 0
+0.5 0.113052 -0.127855 1 0 0
+-0.356588 -0.371795 -0.359815 0 1 0
+-0.5 -0.287517 -0.105712 0.980708 0.190741 0.0427838
+0.368214 0.0115887 0.371795 0 0 1
+-0.336117 0.371795 0.0909703 0 1 0
+-0.5 -0.150148 -0.138654 1 0 0
+0.365382 -0.210056 0.320513 0 0 1
+-0.3369 -0.354715 0.320513 0 0 1
+-0.164418 0.371795 0.110149 0 1 0
+-0.477916 -0.294872 0.295383 0 1 0
+0.320703 0.294872 -0.360768 0.000212486 0.994324 -0.106398
+-0.0574774 -0.226437 0.371795 0 0 1
+-0.320513 0.103561 -0.356501 1 0 0
+0.197641 0.0194873 -0.174204 0.862141 -0.506614 -0.00742653
+-0.360845 -0.107346 0.323432 0.828917 0.518224 -0.210575
+-0.233634 -0.371795 -0.26696 0 1 0
+-0.448718 -0.30075 0.234245 0.968791 0.232728 -0.0853311
+0.214713 -0.251352 -0.371795 0 0 1
+0.211292 0.0331362 -0.0296695 -0.520923 0.853356 -0.0205777
+-0.5 0.103863 0.286664 1 0 0
+-0.478224 -0.105667 0.320513 0 0 1
+-0.422296 -0.102681 -0.371795 0 0 1
+0.351892 -0.371795 -0.112146 0 1 0
+-0.5 -0.198303 -0.152906 1 0 0
+0.416027 0.116749 -0.371795 0 0 1
+-0.5 0.268768 -0.15818 1 0 0
+-0.000120386 0.371795 0.20616 0 1 0
+-0.0667415 0.121977 -0.333333 0 0 1
+-0.406563 -0.209161 -0.371795 0 0 1
+0.0945144 0.371795 -0.103516 0 1 0
+0.5 -0.291823 -0.186544 0.925293 -0.378973 -0.0145646
+-0.0560271 0.371795 0.122562 0 1 0
+-0.409079 0.200941 -0.371795 0 0 1
+-0.431593 0.371795 -0.0761114 0 1 0
+-0.176976 0.311757 0.320513 0 0 1
+-0.234583 -0.233154 0.351264 0.427223 0.904125 0.00618397
+-0.176407 -0.371795 -0.329018 0 1 0
+0.138006 -0.294872 -0.203233 0.504625 0.856162 0.111088
+-0.244509 -0.0412742 -0.328269 0.274741 0.930327 -0.242919
+0.0351441 -0.294872 -0.0178633 0 1 0
+-0.5 -0.150929 0.230527 1 0 0
+-0.283846 0.371795 0.316932 0.172429 0.823796 0.540027
+-0.371445 -0.210572 -0.371795 0 0 1
+0.0169443 -0.204555 0.359724 -0.0828455 0.996562 -0.000562453
+-0.5 0.274437 0.070075 1 0 0
+0.193005 -0.00710039 -0.0967451 0.978134 0.203148 -0.0445505
+-0.5 0.0602337 -0.344164 1 0 0
+-0.267954 0.371795 0.0133525 0 1 0
+0.5 -0.246475 -0.245095 1 0 0
+0.5 -0.253349 -0.0573821 1 0 0
+-0.5 0.158812 -0.27766 1 0 0
+-0.394686 -0.292526 -0.371795 0 0 1
+0.31885 -0.170869 0.34614 0.726692 -0.686957 -0.00277889
+-0.5 0.065671 -0.0115247 1 0 0
+-0.448718 -0.365987 0.155206 0.964779 0.247139 -0.090129
+-0.5 -0.198533 -0.0370303 1 0 0
+0.380936 0.278729 0.320513 0 0 1
+-0.0329273 -0.0445495 -0.333333 0 0 1
+0.299915 -0.257424 0.320513 0 0 1
+-0.0787576 0.371795 0.164076 0 1 0
+-0.393012 0.371795 -0.274547 0 1 0
+-0.376536 0.0610319 0.327634 0.968136 -0.216763 -0.125403
+-0.145225 0.371795 -0.197114 0 1 0
+-0.439829 -0.0272277 0.320513 0 0 1
+0.0483112 -0.230897 -0.367554 0.0322516 0.874988 -0.483069
+0.0197543 0.125087 -0.333333 0 0 1
+-0.5 -0.289166 -0.364975 0.911777 0.403476 0.0766098
+-0.240531 -0.151871 0.371795 0 0 1
+0.446859 0.294872 -0.312238 0 1 0
+0.141026 0.30206 -0.176406 0.983354 0.180545 0.0204609
+-0.5 0.104119 0.214408 1 0 0
+0.448718 -0.346298 0.296431 1 0 0
+0.213498 -0.330671 -0.371795 0 0 1
+-0.183211 0.371795 0.262175 0 1 0
+0.348322 -0.371795 0.190888 0 1 0
+-0.441297 -0.371795 -0.205234 0.114896 0.991427 0.0622229
+-0.291866 -0.371795 -0.00239713 0 1 0
+0.5 0.0534596 0.271491 1 0 0
+0.5 0.283512 -0.309479 1 0 0
+-0.25474 0.371795 0.223253 0 1 0
+-0.229847 0.371795 -0.291855 0 1 0
+0.435998 -0.274197 -0.371795 0 0 1
+-0.27172 -0.371795 -0.197948 0 1 0
+-0.196773 -0.371795 -0.320354 0 1 0
+-0.286696 0.371795 0.305712 0 1 0
+0.0987222 -0.0346536 -0.333333 0 0 1
+-0.140157 -0.294872 -0.0971906 -0.651792 0.757127 0.0438836
+-0.5 -0.0124297 -0.360591 0.999933 0.0013626 0.0114624
+0.00754469 0.371795 0.197144 0 1 0
+0.310617 0.294872 -0.230517 0 1 0
+0.216669 -0.235414 0.371795 -0.0349 -0.499458 0.865635
+0.180541 0.114521 -0.333333 0 0 1
+0.0138985 0.371795 0.178878 0 1 0
+-0.224897 0.257977 -0.371795 0 0 1
+-0.331548 0.0742467 0.371795 0 0 1
+0.141106 -0.230897 -0.336832 -0.0415183 0.936667 -0.347752
+-0.251172 0.0383989 -0.141737 -0.458914 0.888349 -0.0153252
+0.0872657 0.256282 0.359054 0 1 0
+-0.124875 0.142381 -0.333333 0 0 1
+-0.247252 0.371795 0.158404 0 1 0
+-0.236501 0.0430883 -0.10317 -0.174408 0.984629 -0.00939693
+-0.212676 -0.371795 -0.145054 0 1 0
+0.384254 -0.371795 -0.31627 0 1 0
+-0.448718 -0.326836 -0.116438 1 0 0
+-0.5 -0.059409 -0.147138 1 0 0
+-0.0379408 -0.156383 0.320513 0 0 1
+-0.405334 -0.218148 -0.371795 0 0 1
+-0.0161005 -0.204555 0.367411 0.186221 0.948045 0.257939
+0.5 0.161992 0.0923975 1 0 0
+-0.163989 0.122991 0.347059 0.823942 -0.566632 -0.00689084
+0.5 -0.154604 -0.031835 1 0 0
+0.422803 -0.371795 0.254524 0 1 0
+0.438198 0.294872 -0.211879 0 1 0
+-0.5 0.0881402 -0.265499 1 0 0
+-0.294002 0.211934 -0.341381 -0.626741 0.757759 0.181653
+0.482173 -0.0443526 -0.371795 0 0 1
+0.0664746 0.362477 -0.371795 0.0336207 -0.207242 0.977712
+0.141779 0.148011 0.353035 0.721605 0.692099 -0.0168529
+0.082513 0.371795 -0.335236 0 1 0
+0.426933 -0.371795 0.152302 0 1 0
+-0.5 0.0677969 0.262035 1 0 0
+0.425479 -0.371795 -0.149436 0 1 0
+-0.5 0.170943 0.148406 1 0 0
+0.5 0.0889283 0.00578943 1 0 0
+0.27193 0.0901417 -0.333333 0 0 1
+-0.0128775 0.146067 0.320513 0 0 1
+0.122443 -0.294872 0.304331 0 1 0
+-0.202968 -0.0335445 -0.294343 -0.643975 0.765046 0
+0.153736 -0.371795 0.0852882 0 1 0
+0.381267 -0.344315 0.320513 0 0 1
+-0.29164 0.245943 0.320513 0 0 1
+0.5 -0.274315 -0.00270872 1 0 0
+-0.232745 0.371795 0.0114078 0 1 0
+-0.202536 -0.230897 -0.37166 0.117268 0.753849 -0.646498
+-0.159786 0.350161 -0.371795 0 0 1
+0.19089 -0.295808 -0.371795 0 0 1
+0.191858 -0.0718373 0.361756 0.919298 -0.393396 -0.0114291
+0.240111 0.0371635 -0.151791 0.235049 0.971927 0.0104549
+-0.431537 -0.148209 -0.371795 0 0 1
+-0.141154 -0.342663 -0.213985 1 0 0
+0.335095 0.294872 -0.201781 0 1 0
+0.0118763 0.371795 0.000717808 0 1 0
+-0.5 0.221387 0.246315 1 0 0
+-0.204058 0.274991 -0.371795 0 0 1
+0.0717008 0.371795 0.0200548 0 1 0
+0.321264 0.0199621 0.371795 0 0 1
+-0.302535 -0.371795 -0.0102033 0 1 0
+0.240288 0.294872 0.250598 0 1 0
+0.224874 -0.0379457 -0.156193 0.112922 0.993603 0.00110274
+-0.216147 -0.0410377 -0.263828 -0.359793 0.932856 -0.0181444
+0.20215 0.0255661 -0.188897 0.74968 -0.660754 0.0372002
+-0.246117 -0.371795 0.22847 0 1 0
+0.22895 0.0935562 -0.333333 0 0 1
+-0.5 -0.193036 -0.101767 1 0 0
+-0.171289 0.371795 0.037056 0 1 0
+0.249313 -0.371795 -0.284709 0 1 0
+-0.456755 -0.294872 0.260662 0.101557 0.992581 -0.0668473
+-0.0990339 0.162384 -0.333333 0 0 1
+0.298803 -0.135419 0.371795 0 0 1
+0.00632259 0.0520554 0.320513 0 0 1
+-0.186627 0.371795 -0.346018 0 1 0
+-0.340578 0.142866 0.367635 0.787464 -0.511613 -0.343734
+0.5 0.139208 -0.264464 1 0 0
+0.284436 0.287184 0.320513 -0.0389618 0.180638 0.982778
+-0.0892936 -0.294872 -0.29396 0 1 0
+-0.3555 -0.17967 0.320513 0 0 1
+0.185111 0.294872 0.280954 0 1 0
+-0.080532 0.364621 -0.371795 0.0509249 -0.0922456 0.994433
+-0.254171 0.360957 0.320513 0 0 1
+-0.199241 0.016823 0.320513 0.405116 0.011471 0.914193
+0.057682 0.371795 -0.185169 0 1 0
+-0.313614 0.1448 0.371795 0 0 1
+0.0745313 0.000615601 -0.333333 0 0 1
+-0.114479 -0.230897 -0.334774 0.0971994 0.682814 -0.724098
+-0.0506238 0.00549882 0.320513 0 0 1
+0.5 0.03927 -0.228017 1 0 0
+0.313511 0.176208 0.327552 0.690232 0.676977 0.255503
+0.5 0.238573 -0.044454 1 0 0
+0.360144 -0.371795 0.212919 0 1 0
+-0.10612 0.155175 -0.333333 0 0 1
+0.111064 -0.133876 -0.333333 0 0 1
+0.5 -0.112411 0.0215482 1 0 0
+0.47523 0.294872 0.0546134 0 1 0
+0.320513 -0.138147 -0.366865 0.916959 0.134632 0.375581
+-0.457075 0.258653 0.320513 0 0 1
+0.5 -0.0943591 -0.329593 1 0 0
+0.052234 0.139178 0.320513 0 0 1
+-0.102848 -0.294872 0.116138 0 1 0
+-0.0144183 -0.0526552 -0.333333 0 0 1
+-0.0182207 -0.294872 -0.221269 0 1 0
+-0.128042 -0.294872 -0.189207 -0.0115275 0.999931 -0.00241337
+0.451523 0.191049 0.320513 0 0 1
+-0.37736 -0.322882 -0.371795 0 0 1
+-0.151778 0.060771 -0.333333 0 0 1
+0.118778 -0.294872 -0.301703 0 1 0
+-0.235001 -0.294989 -0.371795 0 0 1
+0.21942 0.230897 -0.366255 0.0213266 0.966666 0.255151
+0.141026 0.304813 0.279389 1 0 0
+-0.5 0.0224992 -0.288673 1 0 0
+-0.232156 0.371795 -0.0751007 0 1 0
+0.309777 -0.223806 0.320513 0 0 1
+-0.280306 -0.205459 0.340845 0.599285 0.800536 0
+-0.169619 -0.107639 0.320513 0.328142 0.19856 0.923524
+0.189798 -0.0765342 0.345118 0.915782 -0.401676 0
+0.451109 0.149656 0.320513 0 0 1
+0.342969 -0.371795 0.283131 0 1 0
+-0.324997 0.371795 -0.148575 0 1 0
+-0.10992 0.0962846 0.320513 0 0 1
+0.0171186 -0.294872 -0.245949 0 1 0
+-0.362599 0.103052 0.349371 0.921107 -0.389216 -0.00847222
+0.21302 0.294872 -0.103428 0 1 0
+-0.38334 0.0160447 0.364077 0.935428 -0.0226711 -0.352789
+0.167708 0.222967 0.371795 0 0 1
+0.207219 -0.0302837 -0.0924607 0.575663 0.817622 0.0103672
+-0.141154 -0.368739 0.116275 0.863126 -0.504804 0.0136602
+-0.284494 -0.371795 -0.0817238 0 1 0
+-0.5 -0.152953 -0.231864 1 0 0
+0.0693607 0.13838 0.320513 0 0 1
+0.264814 -0.325794 -0.371795 0 0 1
+0.5 0.0878002 0.156037 1 0 0
+0.00399179 0.371795 0.305284 0 1 0
+-0.5 0.0750047 0.199137 1 0 0
+0.5 0.207857 -0.19371 1 0 0
+0.121176 0.371795 -0.18666 0 1 0
+-0.00424782 0.312858 0.320513 0 0 1
+-0.022295 -0.294872 0.169248 0 1 0
+-0.5 0.103458 0.302053 1 0 0
+0.5 -0.18041 -0.111022 1 0 0
+0.346752 0.294872 -0.349381 0 1 0
+0.0732222 -0.156588 0.320513 0 0 1
+-0.448718 -0.349481 -0.118348 1 0 0
+-0.0270855 0.371795 0.274797 0 1 0
+-0.5 -0.272823 -0.0588891 1 0 0
+-0.5 0.223435 -0.266424 1 0 0
+0.187422 -0.081952 0.369673 0.820528 -0.368578 -0.436902
+0.157925 0.0711719 -0.333333 0 0 1
+0.5 0.197012 0.293308 1 0 0
+-0.269986 -0.0186491 -0.0734642 0.904264 0.426355 -0.0229811
+0.0327206 -0.294872 -0.191498 0 1 0
+-0.5 0.365321 -0.191065 0.955199 -0.291047 0.0537265
+-0.0238686 0.203401 0.364932 -0.0663872 0.991326 -0.113425
+0.5 0.0492922 -0.0761284 1 0 0
+0.14551 0.023104 0.320513 0 0 1
+-0.354659 -0.118674 0.321034 0.833779 0.453069 -0.315503
+0.271403 0.294872 0.114092 0 1 0
+0.136951 -0.294872 -0.084856 0.280014 0.955152 0.0963113
+0.495252 0.133333 0.320513 0.445757 0.166972 0.879443
+0.0230486 -0.294872 -0.0939403 0 1 0
+-0.156604 -0.359519 0.320513 0 0 1
+-0.366417 0.163843 -0.371795 0 0 1
+-0.29805 -0.191669 0.361808 0.681465 0.73185 0
+-0.397496 -0.320162 0.320513 0 0 1
+0.5 0.070274 -0.238853 1 0 0
+-0.448718 -0.366341 0.25041 0.948269 0.316624 0.0231426
+-0.356571 -0.371795 0.00798583 0 1 0
+-0.188953 -0.0774006 0.320513 0.575482 0.147528 0.804398
+-0.5 0.296742 0.126379 1 0 0
+0.480593 -0.294872 0.160862 0 1 0
+0.328717 0.21922 0.320513 0 0 1
+-0.184694 0.0211186 -0.333333 0.227526 0.191364 0.954784
+-0.455296 0.284889 -0.371795 0 0 1
+-0.258832 -0.0333478 -0.219281 0.648647 0.761089 0
+-0.339123 -0.16322 -0.371795 0 0 1
+0.380912 -0.371795 -0.365959 -0.103154 0.973019 0.206382
+-0.446528 0.0888895 0.320513 0 0 1
+0.5 -0.0617298 -0.096993 1 0 0
+-0.260158 0.0320213 -0.0693578 -0.682233 0.731107 -0.00639537
+-0.102665 -0.294872 0.236148 0 1 0
+0.249784 -0.371795 -0.139115 0 1 0
+-0.0172091 -0.241778 0.371795 0 0 1
+-0.448718 -0.310055 0.314187 0.992867 -0.0157622 -0.118183
+0.182959 -0.126585 -0.333333 0 0 1
+0.206198 -0.029569 -0.280487 0.618703 0.785601 -0.00608843
+0.242672 0.0364774 -0.0551566 0.301608 0.953399 -0.00790163
+-0.5 0.225755 0.0546603 1 0 0
+-0.388169 -0.226793 -0.371795 0 0 1
+0.5 -0.10294 0.113202 1 0 0
+0.5 0.263996 -0.286266 1 0 0
+0.147509 0.00905041 -0.333333 0 0 1
+-0.233207 -0.104198 -0.333333 0 0 1
+0.488454 -0.092401 0.320513 0.00827946 -0.00117357 0.999965
+0.357293 -0.371795 0.211927 0 1 0
+-0.320551 -0.371795 0.0122286 0 1 0
+-0.424595 -0.371795 -0.0238109 0 1 0
+-0.205178 0.000944996 0.324578 0.887639 0.0810512 0.453351
+0.465589 0.294872 0.0512185 0 1 0
+0.5 0.0240898 0.0568227 1 0 0
+0.284976 -0.306676 0.320513 0 0 1
+-0.484814 -0.294872 -0.255587 0 1 0
+-0.229787 0.371795 0.0814704 0 1 0
+0.374185 0.294872 -0.136655 0 1 0
+0.5 0.241159 0.122171 1 0 0
+-0.0764784 -0.190018 0.330049 0.351734 0.932734 0.079308
+-0.101007 -0.294872 0.214007 0 1 0
+0.420239 0.294872 -0.136265 0 1 0
+-0.490197 0.371795 -0.332303 -0.036113 0.999263 -0.0129761
+0.365445 -0.371795 -0.171676 0 1 0
+0.466161 0.143468 -0.371795 0 0 1
+-0.5 0.144803 -0.0652752 1 0 0
+0.5 -0.0787719 -0.136072 1 0 0
+0.141109 -0.300327 -0.0252871 0.952582 0.30418 -0.00787685
+0.240376 -0.206709 -0.333333 0 0 1
+0.264191 -0.371795 0.189757 0 1 0
+-0.365561 0.297122 0.320513 0 0 1
+-0.5 -0.21804 0.143522 1 0 0
+-0.471889 0.352958 0.320513 0 0 1
+-0.00686966 -0.0304349 -0.333333 0 0 1
+0.380673 -0.371795 -0.0933405 0 1 0
+-0.5 0.282021 -0.252585 1 0 0
+0.190207 0.230897 -0.346579 0 1 0
+-0.140063 -0.294872 -0.263593 -0.687456 0.725995 -0.0182941
+0.351533 0.263909 0.320513 0 0 1
+-0.325703 -0.371795 0.135617 0 1 0
+0.5 0.0888511 0.134988 1 0 0
+-0.5 -0.244355 -0.0272913 1 0 0
+0.29072 0.294872 0.230469 0 1 0
+-0.130709 -0.167736 0.371795 0.138255 0.10034 0.985301
+0.5 0.0821618 -0.119547 1 0 0
+0.290737 0.21451 -0.36477 0.695002 0.628673 0.348916
+-0.203107 0.0259328 0.350106 0.996584 -0.0825904 0
+0.121918 0.371795 0.0501935 0 1 0
+-0.5 0.145759 0.283744 1 0 0
+0.458611 -0.278822 -0.371795 0 0 1
+0.427305 -0.247214 -0.371795 0 0 1
+0.457724 0.294872 -0.0778836 0 1 0
+-0.5 0.331744 -0.182319 1 0 0
+-0.0406668 0.341577 0.320513 0 0 1
+-0.148453 -0.371795 0.0504509 -0.172252 0.982634 0.0689938
+0.387266 0.294872 0.120104 0 1 0
+-0.318912 -0.117711 0.371795 0 0 1
+-0.106401 -0.230897 -0.349068 0 1 0
+0.178255 0.248352 0.371795 0.222556 0.674688 0.703751
+0.0679589 -0.256282 0.324843 0.0685 0.928784 -0.364235
+0.375591 0.294872 -0.0646965 0 1 0
+0.178259 -0.307074 0.320513 0 0 1
+0.5 -0.140178 -0.107155 1 0 0
+0.247722 -0.0343709 -0.0807501 -0.446754 0.894626 0.0074257
+0.219876 -0.0367479 -0.0517975 0.287131 0.957864 -0.00717627
+0.5 0.180075 0.162703 1 0 0
+0.368766 0.294872 -0.149942 0 1 0
+-0.301042 0.188677 0.360531 -0.707104 0.70711 0
+-0.301725 0.277739 0.320513 0 0 1
+0.5 -0.213955 -0.086915 1 0 0
+0.185161 -0.04713 -0.333333 0 0 1
+-0.336897 0.371795 -0.349679 0 1 0
+0.186802 0.155837 0.371795 0 0 1
+-0.0542979 -0.294872 -0.368783 0.131952 0.95285 0.273251
+0.5 -0.294623 -0.334466 0.847465 -0.508623 0.152007
+0.134579 0.371795 -0.30817 0.182688 0.9816 0.0555659
+-0.0815595 0.371795 -0.35881 -0.000220464 0.999996 -0.00273521
+-0.0778757 -0.1279 0.320513 0 0 1
+0.141026 0.301267 0.0866917 0.966368 0.251846 -0.052029
+-0.259325 0.0328548 -0.317309 -0.641561 0.767072 0
+0.055206 -0.294872 -0.0184968 0 1 0
+-0.141154 -0.356127 -0.32181 1 0 0
+-0.105034 -0.294872 -0.297582 0 1 0
+-0.12274 0.0084632 0.320513 0 0 1
+0.205113 0.294872 -0.0656345 0 1 0
+-0.381045 0.371795 0.231671 0 1 0
+0.141109 -0.326432 0.287957 1 0 0
+0.236666 0.196131 -0.333333 0 0 1
+-0.5 -0.200874 0.278291 1 0 0
+0.455822 0.294872 -0.102866 0 1 0
+0.141109 -0.345948 -0.277084 1 0 0
+-0.223312 -0.371795 -0.114815 0 1 0
+0.141109 -0.306213 -0.330149 1 0 0
+-0.5 0.176275 -0.0636168 1 0 0
+-0.455393 0.17159 -0.371795 0 0 1
+0.384126 0.00504676 0.345917 0.998219 0.0594682 0.00465617
+0.426602 -0.193448 -0.371795 0 0 1
+0.23174 -0.0453367 -0.333333 0.0188841 -0.330032 0.943781
+-0.5 -0.217779 -0.250188 1 0 0
+-0.444305 0.371795 -0.332993 0 1 0
+-0.227902 -0.371795 -0.197565 0 1 0
+0.180315 -0.250272 0.342971 -0.21254 0.977152 0
+0.368702 0.0789576 -0.371795 0 0 1
+0.0983716 0.0828337 0.320513 0 0 1
+-0.394007 -0.270321 -0.371795 0 0 1
+-0.0174429 0.204473 0.371283 0.0678228 -0.517498 0.852993
+-0.0526854 0.230897 -0.363129 0.00278641 0.999149 0.0411547
+0.5 -0.0838887 0.194242 1 0 0
+0.216617 0.0357071 0.371795 0 0 1
+-0.347677 0.371795 0.00122638 0 1 0
+0.449938 -0.294872 0.0933125 -0.472952 0.863369 0.175811
+-0.118784 -0.294872 -0.328543 0 1 0
+0.439816 0.294872 -0.188202 0 1 0
+0.134583 -0.294872 0.0788109 0.222996 0.973921 -0.0418332
+0.0342318 0.371795 -0.262516 0 1 0
+0.109291 0.165281 -0.333333 0 0 1
+-0.0578808 -0.294872 -0.317086 0 1 0
+-0.265977 0.0254254 -0.0720089 0.808599 -0.588282 0.00959801
+-0.114566 0.230897 -0.338785 0.0690824 0.926984 0.368685
+-0.422374 0.371795 -0.176223 0 1 0
+0.0674459 -0.294872 -0.000344884 0 1 0
+0.265499 0.0161822 -0.175574 0.902529 0.43055 0.00821501
+0.367074 -0.371795 0.0199671 0 1 0
+0.483415 -0.0461214 0.320513 0 0 1
+-0.361838 0.220623 0.320513 0 0 1
+0.229865 -0.371795 -0.235028 0 1 0
+0.5 -0.206724 0.109965 1 0 0
+0.241576 0.128827 -0.333333 0 0 1
+0.5 0.0458776 -0.226115 1 0 0
+-0.275299 -0.371795 -0.0682351 0 1 0
+0.271508 0.250724 0.320513 0 0 1
+-0.289462 -0.314887 0.320513 0 0 1
+-0.5 0.23295 -0.130777 1 0 0
+0.5 -0.177674 -0.321666 1 0 0
+-0.328244 -0.371795 0.266431 0 1 0
+-0.492134 0.371795 -0.10621 -0.108245 0.994006 -0.0153345
+-0.120411 0.371795 -0.288111 0 1 0
+0.5 0.220029 0.224259 1 0 0
+-0.5 -0.257222 0.228432 1 0 0
+-0.446709 0.0471282 0.320513 0 0 1
+-0.444858 -0.371795 -0.20868 0.527117 0.84953 -0.0211526
+-0.135926 -0.229662 -0.333333 0.0334572 -0.371335 0.927896
+-0.448718 -0.33245 -0.0648591 1 0 0
+-0.5 0.10725 -0.0914498 1 0 0
+-0.141154 -0.368005 -0.271293 0.917737 -0.360787 0.166105
+0.410513 -0.250654 -0.371795 0 0 1
+0.414131 -0.178042 0.320513 0 0 1
+-0.317479 0.371795 0.225621 0 1 0
+0.448718 -0.330566 -0.345867 1 0 0
+0.141109 -0.352978 0.0427098 1 0 0
+0.5 -0.199328 -0.0764386 1 0 0
+0.412244 -0.371795 0.187865 0 1 0
+-0.452809 0.103455 0.320513 0 0 1
+0.141109 -0.351787 0.271397 1 0 0
+0.483692 -0.112161 0.320513 0 0 1
+0.244651 0.294872 -0.239757 0 1 0
+-0.099861 -0.212062 -0.333333 0 0 1
+-0.5 -0.208423 -0.049635 1 0 0
+0.5 -0.170343 -0.299695 1 0 0
+-0.493804 -0.294872 0.172476 0.247396 0.968732 0.0188252
+-0.334719 0.371795 0.127008 0 1 0
+0.5 0.0860504 0.095577 1 0 0
+-0.5 0.15777 0.148852 1 0 0
+0.226521 -0.371795 0.311674 0.0871593 0.903041 -0.420619
+0.418597 0.136867 -0.371795 0 0 1
+0.0335567 -0.294872 0.0377179 0 1 0
+-0.384601 -0.121031 -0.371795 0 0 1
+-0.220061 -0.230897 -0.341607 -0.0274063 0.998956 -0.0365499
+-0.5 0.367314 0.0677413 0.940939 -0.338554 -0.0037927
+0.209564 -0.371795 0.139577 0 1 0
+0.113613 0.371795 0.211635 0 1 0
+0.362563 -0.103151 0.324418 0.801846 -0.159719 0.575788
+0.453189 0.21099 -0.371795 0 0 1
+0.255559 0.294872 -0.0572208 0 1 0
+0.320513 0.0838576 -0.338664 0.983773 -0.0966786 0.15114
+0.266203 0.0194336 0.371795 0 0 1
+0.486637 0.294872 0.217212 0 1 0
+-0.108869 0.158072 0.320513 0 0 1
+0.5 -0.106396 -0.148595 1 0 0
+0.5 -0.183122 -0.232976 1 0 0
+0.357641 -0.113215 0.366626 0.794434 -0.575104 0.195269
+-0.410561 0.371795 0.141163 0 1 0
+-0.270021 -0.018574 -0.27399 0.906318 0.422586 0.00290293
+0.24376 -0.316216 -0.371795 0 0 1
+-0.184097 -0.292982 0.320513 0 0 1
+-0.495835 -0.294872 -0.293352 0.431832 0.897122 -0.0932388
+-0.318847 0.169188 -0.3431 0.961292 -0.236814 -0.140842
+-0.367358 -0.371795 -0.108389 0 1 0
+0.5 0.153792 0.0665603 1 0 0
+0.354974 0.294872 -0.126228 0 1 0
+-0.141154 -0.350221 -0.326471 1 0 0
+0.378424 0.294872 0.290159 0 1 0
+0.350899 -0.371795 -0.0846037 0 1 0
+-0.223037 -0.365386 -0.371795 -0.0552065 0.0947553 0.993969
+-0.5 0.147529 -0.0165658 1 0 0
+-0.5 0.216546 -0.0311871 1 0 0
+-0.351247 -0.371795 -0.142677 0 1 0
+0.056878 -0.00185294 -0.333333 0 0 1
+-0.189609 0.371795 0.184155 0 1 0
+0.0613102 0.371795 0.154826 0 1 0
+0.5 0.18709 0.0377145 1 0 0
+0.103223 0.371795 0.202222 0 1 0
+0.0951343 0.371795 0.2513 0 1 0
+-0.34311 -0.0514492 0.371795 0 0 1
+-0.5 0.318592 0.0523513 1 0 0
+-0.139563 -0.294872 0.248245 -0.566433 0.823891 -0.0188969
+-0.42882 0.242133 -0.371795 0 0 1
+-0.5 0.275604 -0.0813668 1 0 0
+-0.0606343 0.0926178 0.320513 0 0 1
+-0.0590835 -0.294872 0.012051 0 1 0
+-0.5 0.0683473 0.275569 1 0 0
+-0.191188 -0.167212 -0.333333 0 0 1
+-0.5 -0.0455061 0.0468322 1 0 0
+0.5 -0.107525 0.267341 1 0 0
+-0.389403 0.289209 -0.371795 0 0 1
+0.227136 -0.273499 0.320513 0 0 1
+-0.428615 -0.204692 -0.371795 0 0 1
+0.180673 -0.0973384 0.338061 0.87753 -0.479509 -0.00346853
+-0.412164 0.371795 0.034656 0 1 0
+-0.402621 -0.371795 -0.108835 0 1 0
+0.204652 0.0280684 -0.115117 -0.691918 0.721917 0.00926328
+-0.350302 -0.13052 -0.371795 0 0 1
+0.320513 0.0678384 -0.360787 0.992975 0.00710951 0.11811
+0.152499 -0.371795 -0.0743464 0 1 0
+-0.159918 -0.319352 -0.371795 0 0 1
+0.5 -0.247808 -0.0690421 1 0 0
+-0.428332 -0.371795 0.30215 0 1 0
+0.5 0.28363 -0.248995 1 0 0
+0.232525 0.0383079 -0.294397 0.0419795 0.999071 0.00972923
+0.115098 0.371795 0.232443 0 1 0
+-0.5 0.32373 0.256669 1 0 0
+0.241436 -0.371795 0.17706 0 1 0
+0.379009 0.0496669 0.361045 0.977147 0.212566 0
+-0.157415 -0.371795 -0.317288 0 1 0
+-0.273759 -0.00686252 -0.116676 0.988832 0.148961 -0.00474293
+0.427351 -0.371795 -0.00574708 0 1 0
+0.141109 -0.360952 0.115425 0.999701 0.0241043 0.00405472
+-0.357736 -0.371795 0.265131 0 1 0
+0.170188 0.0937664 0.320513 0 0 1
+-0.304975 0.305601 0.320513 0 0 1
+0.448718 -0.295519 -0.1709 -0.502318 0.864067 0.032648
+-0.213274 0.371795 -0.351554 0 1 0
+-0.110538 -0.294872 -0.178051 0 1 0
+0.318639 -0.371795 -0.100887 0 1 0
+0.226762 -0.132279 0.371795 0 0 1
+-0.430303 0.351621 0.320513 0 0 1
+0.293105 0.162752 0.371795 0 0 1
+-0.0674027 -0.294872 -0.344185 0 1 0
+0.28379 0.177826 0.371795 0 0 1
+0.141026 0.318005 0.258512 1 0 0
+-0.351269 -0.149107 0.320513 0 0 1
+-0.0770463 0.371795 -0.0108612 0 1 0
+0.257969 -0.0677104 0.371795 0 0 1
+-0.5 -0.148062 0.297553 1 0 0
+0.0859326 0.0742314 0.320513 0 0 1
+0.5 -0.0672604 -0.280442 1 0 0
+0.176344 0.294872 -0.248351 0 1 0
+0.0599334 -0.171756 0.320513 0 0 1
+-0.103411 0.0344496 0.320513 0 0 1
+-0.189016 0.0450896 0.320513 0.00339931 -0.000642065 0.999994
+0.5 0.149553 0.307125 1 0 0
+0.44333 0.294872 -0.139635 0 1 0
+0.471873 0.249869 0.320513 0 0 1
+-0.141154 -0.316721 -0.0342428 1 0 0
+-0.18866 0.0106245 -0.089968 0.968323 0.249529 0.00921564
+-0.264289 0.371795 -0.0369039 0 1 0
+-0.0707057 0.371795 0.18692 0 1 0
+-0.448718 -0.35449 0.233422 1 0 0
+-0.5 -0.237443 -0.146767 1 0 0
+-0.5 0.136876 -0.137407 1 0 0
+0.231805 0.0383708 -0.179354 -0.0415833 0.999065 0.0118206
+0.0839713 0.125118 -0.333333 0 0 1
+0.5 -0.218194 -0.194035 1 0 0
+-0.19386 0.371795 -0.183667 0 1 0
+-0.256285 0.297345 -0.371795 0 0 1
+0.5 0.0119161 0.0742972 1 0 0
+-0.0275346 -0.103007 -0.333333 0 0 1
+-0.125077 0.371795 -0.331837 0 1 0
+0.488282 -0.294872 0.199839 -0.0232899 0.999697 -0.00798389
+0.474113 0.294872 0.207203 0 1 0
+-0.5 -0.268221 -0.0673418 1 0 0
+0.250756 -0.224338 0.340636 -0.479261 0.877673 0
+-0.440192 -0.0286518 0.320513 0 0 1
+0.412124 -0.371795 0.173308 0 1 0
+-0.320513 -0.105579 -0.347377 1 0 0
+0.141026 0.360499 -0.0708225 1 0 0
+0.5 -0.191938 -0.353714 1 0 0
+-0.379175 0.371795 -0.295816 0 1 0
+-0.0132026 -0.294872 -0.0171172 0 1 0
+0.5 0.0239093 0.0116501 1 0 0
+-0.5 0.180247 0.1816 1 0 0
+-0.247192 -0.118123 0.371795 0 0 1
+-0.126466 0.371795 -0.302706 0 1 0
+0.386297 -0.132431 -0.371795 0 0 1
+0.450589 -0.191184 0.320513 0 0 1
+0.246585 -0.0349013 -0.176007 -0.417186 0.908812 0.00416033
+-0.284467 -0.371795 0.304441 0 1 0
+-0.5 -0.225767 -0.296202 1 0 0
+0.0870481 -0.155902 -0.333333 0 0 1
+0.278298 0.294872 -0.144231 0 1 0
+-0.273098 -0.00980525 -0.243556 0.973664 0.227377 -0.016659
+0.141026 0.296674 0.0373564 0.695485 0.718475 -0.00970548
+0.479806 -0.182008 0.320513 0 0 1
+-0.375716 -0.371795 0.194671 0 1 0
+-0.140822 -0.120439 -0.333333 0 0 1
+-0.474447 -0.294872 0.173779 0 1 0
+0.5 0.147933 0.122865 1 0 0
+-0.5 0.150822 -0.0646797 1 0 0
+-0.348724 0.268801 -0.371795 0 0 1
+-0.209575 0.0380301 -0.0890952 0.499798 0.866092 0.00927047
+0.448063 0.294872 0.192191 0 1 0
+-0.398896 -0.152344 -0.371795 0 0 1
+-0.448718 -0.345651 0.306707 0.999929 -0.00350804 -0.0114057
+0.189165 0.294872 -0.280607 0 1 0
+0.390236 -0.371795 0.127883 0 1 0
+0.5 -0.124041 0.226392 1 0 0
+-0.491634 0.371795 -0.13907 -0.137889 0.989963 0.0309669
+0.364127 -0.0989582 0.36745 0.873048 -0.22569 0.432262
+0.240001 -0.165023 -0.333333 0 0 1
+-0.176328 0.000692645 0.320513 0 0 1
+0.0815048 0.100199 0.320513 0 0 1
+0.106204 0.371795 0.311363 -0.0268783 0.992219 0.12157
+0.213933 0.0344255 -0.0282955 -0.428034 0.903665 0.0133067
+-0.104495 0.371795 -0.197657 0 1 0
+0.141026 0.35823 0.16115 1 0 0
+-0.5 0.140959 -0.196929 1 0 0
+-0.5 0.222484 0.102539 1 0 0
+-0.0306926 0.371795 -0.340706 0 1 0
+0.280081 -0.371795 0.216153 0 1 0
+-0.299015 -0.304829 -0.371795 0 0 1
+0.456881 -0.110545 0.320513 0 0 1
+-0.34045 -0.371795 -0.203335 0 1 0
+-0.448718 -0.297786 -0.232525 0.8818 0.425114 0.204223
+0.352379 -0.00651891 -0.371795 0 0 1
+-0.170434 -0.371795 0.210367 0 1 0
+-0.00413086 0.0640846 0.320513 0 0 1
+0.00956093 -0.294872 0.0355146 0 1 0
+0.141026 0.319586 -0.156127 1 0 0
+-0.182294 0.218637 0.371795 0 0 1
+0.0727001 -0.256282 0.3681 0.0462512 0.964697 -0.259268
+0.161212 -0.128329 -0.333333 0 0 1
+-0.396023 0.371795 -0.356163 0 1 0
+0.448718 -0.303179 0.296451 0.982717 -0.180521 -0.040993
+0.238315 -0.205853 -0.333333 0 0 1
+-0.0115866 -0.294872 -0.0725713 0 1 0
+-0.129286 -0.210852 0.371795 0 0 1
+-0.203642 -0.019483 0.333442 0.996585 0.0825701 0
+0.5 0.148729 -0.364891 0.965229 0.114161 -0.23516
+-0.234408 0.371795 0.203089 0 1 0
+-0.136569 0.169946 -0.333333 0 0 1
+-0.448718 -0.322127 -0.294855 1 0 0
+-0.145042 0.371795 -0.0380682 0 1 0
+0.5 0.0248851 -0.343975 1 0 0
+0.180313 0.0980052 0.370648 0.632515 0.314855 -0.707666
+0.430496 0.236515 -0.371795 0 0 1
+0.456329 0.00616744 0.320513 0 0 1
+-0.5 -0.0119296 0.199629 1 0 0
+-0.0587527 0.371795 0.252921 0 1 0
+0.415148 -0.0209879 -0.371795 0 0 1
+0.5 -0.250314 -0.0186211 1 0 0
+-0.107703 -0.2126 0.371795 0 0 1
+-0.5 0.336194 -0.06501 1 0 0
+0.416638 0.208582 0.320513 0 0 1
+-0.5 0.0454185 -0.338354 1 0 0
+0.232854 0.154861 -0.333333 0 0 1
+0.5 -0.285387 -0.330126 0.997157 -0.0747629 0.00937479
+-0.163234 -0.371795 0.188278 0 1 0
+0.433031 0.066265 -0.371795 0 0 1
+-0.157573 -0.371795 -0.0700532 0 1 0
+0.0453298 0.323158 0.320513 0 0 1
+0.306054 0.294872 0.112524 0 1 0
+0.5 -0.0423479 0.272054 1 0 0
+-0.5 -0.0592551 0.159217 1 0 0
+-0.0730197 0.371795 -0.298363 0 1 0
+-0.115821 0.155289 -0.333333 0 0 1
+-0.5 0.00985891 0.238158 1 0 0
+-0.5 0.363471 -0.110105 0.973114 -0.230294 -0.00371417
+0.121612 0.292921 -0.371795 0 0 1
+-0.128958 0.0692041 0.320513 0 0 1
+-0.5 -0.177792 0.281228 1 0 0
+-0.191706 -0.247794 0.336846 0.217052 0.97616 0
+0.22973 0.294872 -0.285193 0 1 0
+-0.294229 -0.371795 0.306343 0 1 0
+-0.364426 0.371795 -0.240972 0 1 0
+0.410974 0.294872 -0.0509615 0 1 0
+-0.30819 -0.229908 0.320513 0 0 1
+-0.5 -0.12898 -0.222264 1 0 0
+-0.246102 -0.371795 0.0383197 0 1 0
+-0.221656 0.0425139 -0.0387341 0.30943 0.932672 0.185409
+-0.150143 0.220078 -0.333333 0 0 1
+-0.322548 0.0385437 0.371795 0 0 1
+0.15627 -0.371795 0.17738 0 1 0
+0.376054 -0.116925 0.320513 0 0 1
+-0.268533 -0.0217648 -0.26672 0.880337 0.473759 0.0236392
+0.141026 0.326641 0.241013 1 0 0
+0.5 -0.258594 0.176814 1 0 0
+-0.324421 0.371795 0.283361 0 1 0
+0.5 0.0533389 -0.00203102 1 0 0
+-0.367584 -0.107155 0.320513 -0.153084 -0.103591 0.982769
+0.5 0.230104 0.111618 1 0 0
+-0.180048 0.25033 0.361926 -0.212571 0.977146 0
+0.5 -0.265769 -0.269189 1 0 0
+0.448718 -0.338099 0.077463 1 0 0
+0.0881132 0.371795 0.130829 0 1 0
+0.146699 -0.371795 0.22133 0.24461 0.966294 -0.0802638
+0.0961841 0.371795 -0.336381 0 1 0
+-0.37291 -0.371795 -0.318638 0 1 0
+-0.2874 0.371795 0.103098 0 1 0
+0.402273 -0.109993 -0.371795 0 0 1
+0.205854 0.294872 -0.346829 0 1 0
+-0.057635 -0.0527429 -0.333333 0 0 1
+-0.5 -0.273552 0.0446139 1 0 0
+-0.0655412 -0.294872 -0.202345 0 1 0
+-0.0904519 0.371795 0.0500747 0 1 0
+-0.135543 -0.219388 -0.333333 0 0 1
+-0.141154 -0.307077 -0.303361 1 0 0
+-0.487262 -0.294872 -0.00341084 0 1 0
+-0.141326 -0.227442 0.371795 0 0 1
+0.5 -0.0411415 -0.0719124 1 0 0
+0.5 -0.223524 0.218809 1 0 0
+0.278737 0.294872 -0.126912 0 1 0
+0.413987 -0.0522413 0.320513 0 0 1
+-0.5 -0.155166 -0.324283 1 0 0
+-0.0195969 -0.265426 0.320513 0.0242196 -0.15483 0.987644
+0.132597 0.150772 -0.333333 0 0 1
+-0.191906 0.0194074 -0.223437 0.895747 0.444563 0
+0.5 0.183393 -0.109665 1 0 0
+0.287234 -0.120339 -0.333333 0 0 1
+-0.45643 -0.279393 0.320513 0 0 1
+-0.310822 0.187517 -0.333333 -0.401909 0.347817 0.84705
+-0.5 0.00840164 0.303624 1 0 0
+0.0527984 -0.294872 0.268353 0 1 0
+-0.472949 0.371795 -0.0797576 0 1 0
+0.46805 -0.294872 -0.117609 0 1 0
+-0.469983 -0.201315 -0.371795 0 0 1
+0.0194512 -0.294872 -0.0285735 0 1 0
+-0.5 -0.146922 -0.113891 1 0 0
+-0.5 0.297303 0.308494 1 0 0
+0.5 -0.287343 -0.292967 0.973366 -0.219865 0.0649455
+0.459314 -0.294872 -0.216405 -0.0282783 0.999547 -0.0103276
+-0.5 0.364816 -0.138196 0.963253 -0.239638 -0.121311
+0.0871328 0.334072 0.320513 0 0 1
+0.5 -0.246008 0.300204 1 0 0
+-0.37835 0.34418 -0.371795 0 0 1
+0.5 0.0960596 -0.0419058 1 0 0
+0.148819 0.294872 -0.130312 0.135993 0.986189 0.0945338
+0.436999 0.294872 0.20251 0 1 0
+0.141026 0.37035 0.304688 0.887711 0.459247 0.0325745
+-0.168605 0.371795 -0.138866 0 1 0
+0.5 0.177449 -0.13375 1 0 0
+0.354927 -0.371795 0.0341138 0 1 0
+-0.333498 -0.371795 -0.190278 0 1 0
+-0.384094 0.371795 0.142973 0 1 0
+-0.197155 -0.0277008 -0.274047 0.769027 -0.639198 -0.00496593
+0.5 -0.279331 -0.318398 1 0 0
+0.323271 0.294872 -0.0189705 0 1 0
+-0.5 0.266377 0.138766 1 0 0
+-0.459739 -0.0555569 0.320513 0 0 1
+-0.385768 -0.371795 0.0597924 0 1 0
+0.446057 0.294872 0.318708 0.0265289 0.789097 0.613695
+0.5 -0.0394101 0.26723 1 0 0
+0.5 -0.29117 -0.356463 0.91317 -0.405717 -0.0389042
+-0.210517 0.371795 -0.0483819 0 1 0
+0.253717 -0.371795 -0.249918 0 1 0
+0.498565 0.294872 -0.306346 0.71732 0.696743 0.000900158
+0.147453 0.294872 0.0515826 0.225318 0.973893 -0.0276348
+-0.459861 0.371795 0.149742 0 1 0
+0.318146 -0.371795 0.114024 0 1 0
+-0.5 -0.127839 -0.0154418 1 0 0
+0.212026 -0.371795 -0.227763 0 1 0
+-0.143798 0.371795 -0.218665 0 1 0
+0.5 -0.0299728 -0.363869 0.982889 0.0439435 -0.178882
+-0.144783 0.00981567 -0.333333 0 0 1
+0.211661 0.294872 -0.366476 0.112157 0.956873 -0.267984
+0.141109 -0.356176 -0.0766261 1 0 0
+0.346672 -0.371795 0.20019 0 1 0
+-0.258645 0.371795 -0.369585 0.0123636 0.833804 -0.551922
+-0.5 0.192312 -0.224076 1 0 0
+0.369606 0.0991158 0.320513 0.385444 0.0831204 0.91898
+-0.495633 -0.294872 0.0554541 0.343253 0.939198 -0.00921577
+0.5 -0.230519 -0.0868421 1 0 0
+-0.23562 -0.371795 0.0808972 0 1 0
+0.374389 -0.371795 -0.250704 0 1 0
+0.144768 0.294872 -0.261212 0.565767 0.813373 -0.135393
+-0.5 0.157415 -0.358106 1 0 0
+0.222112 -0.236811 -0.371795 0.00292832 -0.281297 0.959616
+0.141026 0.363991 0.00504567 0.989899 0.138213 0.0315745
+0.251343 0.294872 0.105702 0 1 0
+0.00812719 0.252209 -0.371795 0 0 1
+-0.0785875 0.0885204 -0.333333 0 0 1
+0.185581 -0.371795 0.0972548 0 1 0
+0.252679 0.271427 0.320513 0 0 1
+0.319602 0.294872 -0.22095 0 1 0
+-0.066324 0.232742 -0.371795 0.0717758 0.568962 0.819225
+-0.417807 -0.142885 0.320513 0 0 1
+-0.0598817 0.122583 -0.333333 0 0 1
+0.090656 -0.234976 -0.371795 0.0183944 -0.391895 0.919826
+-0.430172 0.340986 -0.371795 0 0 1
+0.5 -0.127451 0.257443 1 0 0
+-0.5 -0.0935975 -0.23669 1 0 0
+-0.5 -0.178836 0.190519 1 0 0
+-0.0729869 -0.0557453 -0.333333 0 0 1
+-0.259914 -0.371795 -0.249077 0 1 0
+-0.202398 -0.371795 -0.0716269 0 1 0
+0.421889 -0.270548 0.320513 0 0 1
+0.173038 0.294872 -0.00595758 0 1 0
+-0.112338 0.371795 -0.245166 0 1 0
+0.339122 -0.371795 -0.314029 0 1 0
+-0.5 0.249987 -0.0687295 1 0 0
+0.0472193 0.371795 -0.0765948 0 1 0
+-0.5 -0.0989008 -0.27617 1 0 0
+-0.448718 -0.297817 0.185519 0.730618 0.670215 -0.130415
+0.306171 0.133549 -0.333333 0 0 1
+0.185636 0.294872 -0.0165729 0 1 0
+-0.243791 0.0414665 -0.213013 -0.306056 0.951988 0.00702253
+0.26855 -0.18401 -0.333333 0 0 1
+-0.229919 -0.371795 -0.129448 0 1 0
+-0.215566 -0.0638226 -0.333333 0 0 1
+-0.220628 -0.116991 -0.333333 0 0 1
+-0.138153 -0.0441361 0.320513 0 0 1
+-0.308925 -0.188426 0.320513 -0.111503 -0.0666405 0.991527
+-0.117202 -0.294872 0.0915442 0 1 0
+0.14245 0.294872 -0.106906 0.467732 0.882969 -0.0399122
+-0.104606 -0.287685 0.320513 0.0262143 -0.138555 0.990008
+-0.0451734 -0.191531 0.320513 0.00470344 0.0308248 0.999514
+0.358317 -0.371795 0.189203 0 1 0
+-0.268205 0.0222434 -0.0996624 0.863447 -0.50439 0.00705242
+0.384108 -0.359052 0.320513 0 0 1
+-0.5 0.323408 0.312116 0.987938 -0.028357 -0.152229
+0.0814767 0.371795 0.107356 0 1 0
+0.0503205 0.306385 0.320513 0 0 1
+-0.0205146 -0.228431 -0.333333 -0.0053662 -0.334552 0.942362
+0.141109 -0.351707 -0.356135 1 0 0
+-0.452877 -0.179225 0.320513 0 0 1
+-0.5 0.198087 0.227686 1 0 0
+0.5 -0.0530706 -0.201435 1 0 0
+-0.237612 -0.0429911 -0.235643 0.124311 0.992237 -0.00355838
+0.5 0.186254 -0.188572 1 0 0
+-0.24673 0.117048 -0.333333 0 0 1
+0.376136 -0.0628726 0.328789 0.976541 -0.209034 0.0517002
+-0.228581 -0.371795 0.307989 0 1 0
+0.252557 -0.292429 -0.371795 0 0 1
+0.0158201 -0.294872 -0.298531 0 1 0
+0.321976 0.294872 -0.0401969 0 1 0
+-0.19653 -0.278192 -0.371795 0 0 1
+0.5 -0.267958 -0.192667 1 0 0
+0.253502 -0.36267 0.320513 -0.0508481 -0.105348 0.993135
+-0.409811 0.371795 0.250616 0 1 0
+-0.333234 -0.0216895 0.371795 0 0 1
+0.455256 0.294872 0.0801551 0 1 0
+0.353172 0.294872 -0.288635 0 1 0
+-0.41593 0.371795 -0.263355 0 1 0
+0.5 -0.0188749 0.081577 1 0 0
+-0.5 -0.0609265 0.301268 1 0 0
+-0.468471 0.371795 0.177343 0 1 0
+-0.5 0.260819 0.0202626 1 0 0
+0.0686907 -0.294872 -0.369398 0.0393662 0.943082 0.330222
+-0.131966 0.371795 -0.35486 0 1 0
+-0.5 0.0239412 0.0322456 1 0 0
+0.5 -0.00435966 0.0153687 1 0 0
+0.49903 0.0700567 0.320513 0.606587 -0.390925 0.692264
+-0.141154 -0.368336 0.226192 0.655089 -0.732579 0.184894
+0.5 0.0371019 -0.0408264 1 0 0
+0.225658 -0.117688 -0.333333 0 0 1
+0.250498 0.0162553 0.00773865 0.40564 0.333301 0.851097
+0.323435 -0.371795 -0.0104614 0 1 0
+0.0457005 0.371795 -0.189342 0 1 0
+-0.348584 0.131457 0.320513 -0.485136 0.222123 0.845757
+-0.448718 -0.3617 0.222904 0.975606 0.217413 0.0303947
+-0.270227 -0.260869 0.320513 0 0 1
+0.238012 0.037726 -0.100411 0.179283 0.983797 0.000989225
+0.5 0.00325823 0.123456 1 0 0
+0.391203 -0.371795 -0.0858671 0 1 0
+-0.108234 -0.294872 0.0443486 0 1 0
+0.171304 -0.278255 0.320513 0 0 1
+-0.312343 0.371795 -0.139336 0 1 0
+0.213207 -0.371795 -0.260889 0 1 0
+-0.236415 -0.27409 -0.371795 0 0 1
+0.448024 0.294872 -0.24724 0 1 0
+0.458644 0.294872 0.18417 0 1 0
+-0.0923389 -0.294872 0.0332114 0 1 0
+0.311913 -0.371795 0.27826 0 1 0
+-0.0179448 0.371795 -0.234561 0 1 0
+0.255847 0.294872 -0.0476009 0 1 0
+0.141109 -0.357049 0.25554 1 0 0
+-0.328519 0.192163 0.320513 0 0 1
+0.126335 0.00141864 0.320513 0 0 1
+0.103266 0.371795 0.265008 0 1 0
+0.488419 0.294872 0.208624 0.047828 0.998842 -0.0052648
+-0.5 0.232067 0.231083 1 0 0
+0.5 -0.0563156 0.208653 1 0 0
+0.477849 0.0390488 0.320513 0 0 1
+0.137076 -0.152522 0.332015 -0.660047 0.751224 0
+-0.448718 -0.311911 0.0771987 1 0 0
+-0.0458912 0.371795 0.283167 0 1 0
+-0.277864 -0.371795 -0.321006 0 1 0
+0.442519 0.294872 -0.0951317 0 1 0
+0.307179 -0.18254 0.341822 -0.707107 0.707107 0
+-0.00171754 -0.294872 -0.256359 0 1 0
+0.00175161 -0.294872 -0.117417 0 1 0
+-0.288025 0.19688 -0.333333 0 0 1
+-0.221991 0.0834339 0.371795 0 0 1
+-0.5 0.123574 0.244975 1 0 0
+-0.0167788 0.123146 0.320513 0 0 1
+-0.0919794 -0.199423 -0.333333 0 0 1
+-0.5 0.126909 -0.325402 1 0 0
+-0.257515 -0.034283 -0.230765 0.619107 0.785307 0
+0.00714627 -0.203191 -0.333333 0 0 1
+0.268559 -0.00700374 -0.0684688 0.97266 -0.232224 -0.00225566
+0.5 0.0880213 -0.241777 1 0 0
+0.406458 -0.00287765 0.320513 0 0 1
+0.21994 0.0367649 -0.0153816 -0.256401 0.966571 0
+-0.5 0.279485 0.109224 1 0 0
+-0.1581 0.371795 -0.175777 0 1 0
+-0.5 -0.0538226 -0.18378 1 0 0
+-0.279645 0.310966 -0.371795 0 0 1
+0.448718 -0.313926 0.0760555 1 0 0
+0.268399 0.0075997 -0.309656 0.979528 0.201309 -0.000566848
+-0.406838 0.157612 0.320513 0 0 1
+-0.0757055 0.371795 -0.0423608 0 1 0
+-0.17074 -0.371795 -0.0960229 0 1 0
+0.320513 -0.0578804 -0.346868 1 0 0
+-0.240775 0.117085 -0.333333 0 0 1
+0.176247 0.294872 -0.129372 0 1 0
+0.183325 -0.371795 -0.0178375 0 1 0
+0.00525332 0.295666 0.320513 0 0 1
+-0.336548 0.165996 -0.371795 0 0 1
+-0.117946 0.367005 0.320513 -0.139752 0.557526 0.818311
+0.39516 -0.269818 -0.371795 0 0 1
+-0.115718 0.330917 -0.371795 0 0 1
+-0.420299 -0.371795 0.274636 0 1 0
+0.350253 -0.19313 -0.371795 0 0 1
+-0.0300685 -0.294872 0.180007 0 1 0
+-0.496614 0.100131 0.320513 -0.325811 0.0044058 0.945425
+-0.181143 -0.309838 -0.371795 0 0 1
+0.376519 -0.139511 -0.371795 0 0 1
+-0.147467 -0.0254607 -0.333333 0 0 1
+-0.127954 0.371795 0.0657436 0 1 0
+0.307671 -0.171359 -0.333333 0.0608553 -0.0210412 0.997925
+0.395444 0.294872 -0.174148 0 1 0
+0.5 -0.281725 0.225293 1 0 0
+-0.5 0.247573 0.290192 1 0 0
+0.0880091 0.332098 0.320513 0 0 1
+-0.376275 0.219122 -0.371795 0 0 1
+0.5 -0.120382 0.0270699 1 0 0
+-0.323885 0.371795 -0.101183 0 1 0
+0.0425923 -0.278177 -0.371795 0 0 1
+0.5 0.251955 -0.296611 1 0 0
+-0.217347 0.131464 -0.333333 0 0 1
+-0.0146175 -0.112851 -0.333333 0 0 1
+-0.5 -0.205392 -0.207181 1 0 0
+-0.0666409 0.371795 0.246799 0 1 0
+-0.5 -0.0940062 0.0219804 1 0 0
+0.155659 0.122779 0.320513 -0.172005 -0.118748 0.977913
+-0.249208 0.360174 -0.371795 0 0 1
+-0.411547 0.371795 0.222491 0 1 0
+-0.479069 -0.0882156 -0.371795 0 0 1
+0.5 0.116001 0.253608 1 0 0
+0.0977717 -0.230897 -0.337376 0.0640626 0.961711 -0.266473
+0.329608 -0.157596 -0.371795 0 0 1
+-0.0245387 0.371795 0.0102155 0 1 0
+-0.143995 -0.371795 0.0831543 -0.594833 0.803505 -0.0235229
+0.262393 -0.086912 0.371795 0 0 1
+-0.104904 0.256282 0.368172 -0.131164 0.835374 0.533803
+0.494134 -0.294872 0.107838 -0.267074 0.959108 -0.0937161
+0.181323 -0.371795 -0.0652387 0 1 0
+-0.141154 -0.350849 -0.284752 1 0 0
+-0.286502 0.371795 0.235661 0 1 0
+-0.359805 -0.142496 -0.371795 0 0 1
+0.21948 0.294872 -0.0862804 0 1 0
+-0.148244 -0.153599 0.371795 0.0126291 0.0139724 0.999823
+0.194145 0.0666079 0.35741 0.950178 0.311688 0.00362393
+-0.0230674 -0.294872 0.19922 0 1 0
+0.0903177 0.371795 -0.148799 0 1 0
+-0.0593022 0.371795 -0.281703 0 1 0
+0.448718 -0.349691 -0.163715 1 0 0
+0.14355 0.294872 0.148558 0.464658 0.884488 0.0421224
+-0.5 -0.250011 -0.26892 1 0 0
+0.183933 0.294872 0.242992 0 1 0
+0.39486 0.294872 -0.00550616 0 1 0
+-0.0511079 -0.294872 0.244911 0 1 0
+-0.275095 -0.371795 -0.273915 0 1 0
+-0.419816 0.320523 0.320513 0 0 1
+-0.5 0.352741 0.225618 1 0 0
+0.120946 -0.230897 -0.339244 -0.0284378 0.995669 -0.0885141
+-0.0120073 -0.294872 -0.0899403 0 1 0
+-0.5 -0.182451 -0.344018 1 0 0
+0.326984 -0.172628 -0.371795 0.0158522 0.0036937 0.999867
+0.432761 0.237726 -0.371795 0 0 1
+-0.448718 -0.306977 0.0688505 1 0 0
+-0.31516 -0.371795 -0.351392 0 1 0
+0.141026 0.360546 0.108755 1 0 0
+0.114415 0.076115 0.320513 0 0 1
+-0.327366 -0.249754 0.320513 0 0 1
+0.5 -0.0863654 -0.114512 1 0 0
+0.453637 -0.294872 0.144095 -0.382759 0.907249 0.174341
+0.217379 -0.33716 -0.371795 0 0 1
+-0.5 -0.0839473 -0.188787 1 0 0
+0.448718 -0.30726 -0.0780191 1 0 0
+0.354219 -0.273036 -0.371795 0 0 1
+0.32025 -0.156981 -0.352329 0.997335 -0.0728942 -0.00315289
+0.0693686 -0.0685667 -0.333333 0 0 1
+-0.287933 0.371795 0.0736594 0 1 0
+0.119438 0.142611 0.320513 0 0 1
+0.448718 -0.367559 -0.286876 0.925421 -0.373391 0.064611
+0.369387 -0.126949 -0.371795 0 0 1
+-0.222861 0.371795 0.0816154 0 1 0
+-0.176637 -0.371795 0.27882 0 1 0
+-0.156886 0.371795 -0.0126825 0 1 0
+-0.195718 -0.0256484 -0.148026 0.806194 -0.591578 0.00934997
+0.5 0.0484927 0.143237 1 0 0
+-0.369754 0.181745 0.320513 0 0 1
+0.33892 0.248289 0.320513 0 0 1
+-0.32577 -0.211505 -0.371795 0 0 1
+-0.189666 0.371795 -0.0569912 0 1 0
+-0.298261 -0.371795 -0.0915025 0 1 0
+0.5 -0.0635751 0.172894 1 0 0
+0.115136 0.186506 0.371795 0 0 1
+0.5 0.292578 -0.0890094 0.787348 0.610974 -0.0824231
+0.477713 -0.294872 -0.100755 0 1 0
+0.259998 0.246489 0.320513 0 0 1
+-0.203744 -0.0894162 -0.333333 0 0 1
+0.5 -0.264272 0.0634929 1 0 0
+-0.5 0.164991 0.13441 1 0 0
+-0.238194 0.0137692 0.371795 0 0 1
+-0.293698 0.365958 -0.371795 -0.137448 -0.416205 0.898822
+0.5 -0.165322 -0.126788 1 0 0
+0.141026 0.364494 -0.351065 0.981333 0.182209 0.061523
+0.141026 0.319881 0.117711 1 0 0
+0.10502 -0.294872 -0.291508 0 1 0
+-0.5 0.147728 0.231838 1 0 0
+-0.5 0.0035857 0.0832922 1 0 0
+0.0738824 -0.294872 0.0890195 0 1 0
+0.228337 -0.158198 0.371795 0 0 1
+0.0343028 -0.294872 0.109347 0 1 0
+0.0651164 -0.294872 0.182671 0 1 0
+0.197261 0.018801 -0.21511 0.871084 -0.49113 0.00184719
+-0.5 0.35484 0.166866 1 0 0
+0.5 0.0153691 -0.0413444 1 0 0
+0.152418 -0.075744 -0.333333 0 0 1
+0.113269 0.107214 -0.333333 0 0 1
+0.0994315 0.297103 -0.371795 0 0 1
+0.169228 -0.0849038 0.320513 0 0 1
+-0.475961 -0.198216 0.320513 0 0 1
+-0.448718 -0.323416 -0.315746 1 0 0
+0.451553 0.0304802 -0.371795 0 0 1
+0.083077 -0.17559 -0.333333 0 0 1
+0.280182 0.294872 0.033754 0 1 0
+-0.5 0.264289 0.0501007 1 0 0
+0.13877 0.255526 0.342994 0.0710682 0.997471 0
+-0.5 -0.115049 -0.281573 1 0 0
+-0.499738 0.371795 0.000918687 -0.461137 0.886166 0.0454164
+-0.5 -0.21503 -0.305468 1 0 0
+0.5 -0.0773688 -0.115768 1 0 0
+-0.173616 -0.0879095 0.320513 0 0 1
+0.0368973 0.193362 -0.333333 0 0 1
+0.20006 -0.342319 -0.371795 0 0 1
+-0.311409 -0.371795 0.256168 0 1 0
+-0.5 -0.0718368 0.319033 -0.690499 -0.0688489 0.720049
+0.285466 0.294872 -0.273551 0 1 0
+0.155389 0.279743 0.320513 0 0 1
+0.4213 0.0234454 0.320513 0 0 1
+-0.5 -0.143616 -0.312322 1 0 0
+-0.395445 0.187973 0.320513 0 0 1
+-0.109728 -0.294872 0.174267 0 1 0
+-0.482283 -0.294872 0.0107142 0 1 0
+0.5 0.272662 0.267879 1 0 0
+-0.5 -0.0448655 0.127487 1 0 0
+0.367531 0.0360838 -0.371795 0 0 1
+-0.0487304 0.339869 0.320513 0 0 1
+-0.212534 -0.0394098 -0.177188 -0.40392 0.914791 0.00235321
+0.5 0.202725 -0.35585 1 0 0
+-0.5 -0.183518 0.0994522 1 0 0
+0.12167 0.371795 -0.0222348 0 1 0
+0.5 0.0588058 0.198316 1 0 0
+0.25811 -0.371795 0.107883 0 1 0
+-0.179002 -0.0349132 -0.333333 0 0 1
+-0.5 -0.201404 -0.181505 1 0 0
+0.147645 0.294872 -0.238349 0.191749 0.981225 0.020715
+-0.5 0.246271 -0.369931 0.82263 -0.362056 0.438401
+0.162847 -0.317519 0.320513 0 0 1
+0.140497 0.0602695 0.320513 0 0 1
+-0.0701431 0.140893 0.320513 0 0 1
+0.141026 0.344827 -0.187173 1 0 0
+0.278178 0.294872 0.0628749 0 1 0
+-0.201035 0.0600255 -0.333333 0 0 1
+0.0783199 -0.273735 0.320513 0 0 1
+-0.0111944 0.0230759 0.320513 0 0 1
+-0.5 0.275518 -0.115244 1 0 0
+0.185846 0.294872 0.230503 0 1 0
+0.165834 0.253422 0.331299 0.171406 0.985188 -0.00501519
+0.141109 -0.327347 0.07412 1 0 0
+-0.0325734 -0.294872 -0.146529 0 1 0
+-0.141154 -0.337502 -0.15673 1 0 0
+0.373078 -0.371795 -0.0774893 0 1 0
+0.152343 0.294872 -0.0966853 0 1 0
+-0.048195 -0.294872 -0.2012 0 1 0
+-0.0955421 0.371795 0.127321 0 1 0
+-0.39507 0.371795 -0.129198 0 1 0
+0.196428 0.294872 -0.271372 0 1 0
+-0.343046 -0.227107 -0.371795 0 0 1
+0.5 -0.16057 0.199432 1 0 0
+-0.169706 0.222984 0.371795 0 0 1
+0.11117 -0.294872 -0.320505 0 1 0
+0.374161 -0.0747473 -0.371795 0 0 1
+-0.388149 0.371795 -0.36374 -0.0607202 0.940863 -0.333302
+0.307121 -0.18594 -0.333333 0.304526 -0.149445 0.940707
+-0.5 -0.132527 -0.20965 1 0 0
+0.289088 -0.152025 -0.333333 0 0 1
+0.141109 -0.359983 -0.239232 1 0 0
+0.139445 -0.0426961 -0.333333 0 0 1
+-0.0363188 -0.294872 -0.183068 0 1 0
+-0.5 0.116865 -0.094678 1 0 0
+-0.5 0.146172 -0.29988 1 0 0
+-0.334846 0.371795 -0.246101 0 1 0
+-0.375467 0.0857786 0.320513 -0.210985 -0.0316121 0.976978
+0.5 0.205072 -0.189669 1 0 0
+-0.5 -0.18855 0.160957 1 0 0
+-0.472396 -0.128333 -0.371795 0 0 1
+0.405752 0.11762 -0.371795 0 0 1
+0.442175 -0.371795 -0.147646 -0.223469 0.970719 -0.0881279
+0.5 0.0526044 0.163303 1 0 0
+-0.141154 -0.324163 0.237301 1 0 0
+-0.026467 0.371795 0.0581612 0 1 0
+-0.381995 0.221379 0.320513 0 0 1
+-0.0239448 -0.294872 -0.20267 0 1 0
+-0.279911 0.371795 0.15821 0 1 0
+-0.448718 -0.3697 0.0341749 0.71458 0.663431 0.221888
+-0.157867 -0.182223 0.371795 0 0 1
+-0.287018 -0.288752 -0.371795 0 0 1
+-0.299316 -0.371795 -0.0709161 0 1 0
+-0.237342 -0.231663 0.342188 0.455986 0.88993 0.0100508
+0.173242 -0.0999926 -0.333333 0 0 1
+0.141026 0.309211 0.149663 1 0 0
+-0.43299 -0.155092 -0.371795 0 0 1
+0.5 -0.230131 -0.361428 0.993735 -0.0163453 -0.110565
+-0.106752 -0.0449106 0.320513 0 0 1
+0.269179 -0.357357 -0.371795 0 0 1
+0.370445 -0.146237 0.320513 0 0 1
+-0.157969 0.0835163 -0.333333 0 0 1
+-0.5 -0.117198 -0.0606391 1 0 0
+-0.0487625 0.201274 0.371795 0.214664 -0.326687 0.920432
+-0.140689 -0.294872 -0.0263233 -0.585278 0.804721 0.0993642
+0.5 -0.0528245 0.0397104 1 0 0
+-0.448718 -0.352816 -0.350495 1 0 0
+0.5 0.133713 0.0685503 1 0 0
+-0.309564 0.217377 0.320513 0 0 1
+0.368667 0.294872 -0.234421 0 1 0
+0.268301 -0.260691 0.320513 0 0 1
+-0.434187 0.264111 -0.371795 0 0 1
+-0.447835 -0.0613659 0.320513 0 0 1
+0.408506 0.158776 0.320513 0 0 1
+-0.301257 0.204679 -0.368486 0.715547 -0.499592 -0.488262
+0.374818 0.25075 -0.371795 0 0 1
+-0.5 -0.135921 -0.308033 1 0 0
+0.0211975 -0.0246773 -0.333333 0 0 1
+-0.161323 0.371795 -0.17449 0 1 0
+-0.448718 -0.310319 0.0739588 1 0 0
+-0.323811 0.371795 -0.0123686 0 1 0
+0.141109 -0.307251 0.316857 0.853386 0.0696275 -0.516609
+0.142962 0.238947 -0.371795 0.00254212 0.0808866 0.99672
+-0.448718 -0.298678 -0.295773 0.928884 0.367431 0.0465727
+-0.5 -0.172416 0.228694 1 0 0
+-0.187427 0.00282912 -0.0736567 0.998459 0.0534188 -0.0150315
+-0.5 0.0538458 0.0151629 1 0 0
+0.0683208 0.371795 -0.0185812 0 1 0
+-0.448718 -0.301007 0.312514 0.950027 0.238879 -0.200964
+-0.358906 0.0177074 -0.371795 0 0 1
+0.136536 0.371795 -0.296665 0.366531 0.930011 0.0271167
+0.0266599 0.0250401 -0.333333 0 0 1
+-0.389345 0.371795 -0.266449 0 1 0
+0.141109 -0.326149 -0.043942 1 0 0
+-0.5 0.150637 -0.0464514 1 0 0
+0.485469 -0.205749 -0.371795 0 0 1
+0.119925 -0.294872 0.0856374 0 1 0
+0.29056 0.194014 -0.333333 0 0 1
+0.162977 -0.230897 -0.335747 0.254591 0.849513 -0.462072
+-0.21129 0.0388296 -0.142962 0.439083 0.898439 -0.00357043
+-0.192056 0.0197297 -0.330363 0.634482 0.443398 0.633112
+-0.242344 0.371795 -0.115414 0 1 0
+-0.169817 0.371795 0.139159 0 1 0
+-0.17889 0.371795 0.157644 0 1 0
+0.204395 -0.0278112 -0.0169675 0.741367 0.670721 0.0225399
+0.0903379 -0.294872 0.226409 0 1 0
+0.5 -0.116898 0.0186575 1 0 0
+-0.181257 0.109479 0.371795 0.187616 -0.181156 0.965393
+-0.0472098 -0.23395 0.371795 0 0 1
+0.0255678 -0.294872 0.227349 0 1 0
+0.5 -0.115455 -0.173669 1 0 0
+-0.0137778 0.126474 -0.333333 0 0 1
+-0.5 -0.116375 0.126937 1 0 0
+0.5 -0.257019 0.1363 1 0 0
+-0.448718 -0.304219 0.279804 1 0 0
+-0.219873 0.371795 0.303479 0 1 0
+-0.448718 -0.340001 -0.359326 1 0 0
+-0.5 -0.178221 0.166589 1 0 0
+-0.0663264 -0.294872 -0.190747 0 1 0
+0.141109 -0.297904 0.281888 0.830389 0.555208 -0.0468864
+-0.205476 0.371795 0.0587808 0 1 0
+0.00169037 -0.294872 0.0857599 0 1 0
+-0.228754 0.307526 0.320513 0 0 1
+0.5 0.1403 -0.261782 1 0 0
+-0.258184 0.0338147 -0.250835 -0.656627 0.754209 0.00302135
+-0.0203918 0.371795 -0.155293 0 1 0
+0.147246 -0.048229 -0.333333 0 0 1
+0.192379 -0.000811484 -0.212951 0.99835 0.0570893 0.00615442
+0.00234036 0.371795 -0.301938 0 1 0
+0.408772 0.265772 -0.371795 0 0 1
+0.448718 -0.29637 -0.220667 0.786137 -0.609814 -0.100578
+-0.37763 0.233783 -0.371795 0 0 1
+-0.5 0.288787 -0.0964614 1 0 0
+-0.290805 0.149982 -0.333333 0 0 1
+0.18967 -0.371795 -0.242647 0 1 0
+-0.218492 -0.371795 -0.245239 0 1 0
+0.0766823 -0.294872 0.128808 0 1 0
+-0.301576 0.371795 0.28732 0 1 0
+0.141109 -0.349369 -0.265144 1 0 0
+-0.5 0.297181 0.15229 1 0 0
+-0.5 0.302268 -0.00932585 1 0 0
+-0.308157 0.371795 0.0734082 0 1 0
+-0.215732 0.371795 0.216918 0 1 0
+0.295823 0.136611 0.371795 0 0 1
+0.5 0.0739985 -0.3288 1 0 0
+0.302428 -0.371795 -0.0653755 0 1 0
+0.5 0.176516 -0.268955 1 0 0
+0.5 -0.106357 0.267806 1 0 0
+0.115226 0.134557 -0.333333 0 0 1
+0.176068 -0.230897 -0.350909 0 1 0
+0.254379 0.294872 -0.219438 0 1 0
+0.11427 -0.154089 0.320513 0 0 1
+-0.120347 0.171291 0.371795 0.0825775 -0.4191 0.904177
+-0.177385 -0.0795695 -0.333333 0 0 1
+0.141026 0.340755 0.0525132 1 0 0
+0.141026 0.312193 -0.192881 1 0 0
+0.0439165 0.23771 0.371795 0 0 1
+0.384788 -0.314258 0.320513 0 0 1
+0.106302 -0.108136 0.320513 0 0 1
+0.0971149 0.294492 -0.371795 0 0 1
+0.5 0.122613 -0.155684 1 0 0
+0.5 -0.191225 -0.159196 1 0 0
+0.272496 0.0510271 -0.333333 0 0 1
+0.233652 0.294872 -0.253781 0 1 0
+0.5 -0.00132648 -0.0514959 1 0 0
+-0.194948 -0.371795 -0.370218 0.067136 0.852611 0.518215
+0.272723 -0.138781 0.371795 0 0 1
+0.269801 -0.120749 -0.333333 0 0 1
+0.360167 0.0851946 -0.371795 0 0 1
+0.042197 0.35862 -0.371795 0 0 1
+-0.301988 0.224852 0.320513 0 0 1
+0.0627355 -0.294872 -0.276481 0 1 0
+0.479463 -0.220183 -0.371795 0 0 1
+0.116758 0.362938 0.320513 0.0206654 0.0387183 0.999036
+-0.202975 -0.371795 -0.104879 0 1 0
+0.193641 -0.00947413 -0.264459 0.96338 0.26811 0.00397748
+0.472161 0.0408941 -0.371795 0 0 1
+-0.366777 0.371795 -0.225787 0 1 0
+0.5 -0.120522 0.00709426 1 0 0
+-0.5 -0.263045 -0.00090887 1 0 0
+-0.243612 0.188927 0.371795 0 0 1
+-0.5 -0.0314826 0.298704 1 0 0
+0.227886 0.133354 -0.333333 0 0 1
+0.5 -0.10247 -0.166606 1 0 0
+0.159018 0.134343 -0.333333 0 0 1
+0.174805 0.294872 0.189888 0 1 0
+0.141026 0.345413 0.251966 1 0 0
+-0.0989694 0.371795 0.227989 0 1 0
+-0.5 0.11327 -0.293024 1 0 0
+-0.0124236 0.371795 0.311266 0 1 0
+-0.418397 0.0684219 -0.371795 0 0 1
+-0.382183 -0.371795 0.295269 0 1 0
+0.5 -0.0230678 -0.112252 1 0 0
+0.5 0.144269 0.146671 1 0 0
+0.253827 0.0306291 -0.0297982 0.597219 0.802062 0.00497344
+-0.181994 0.306382 -0.371795 0 0 1
+0.433752 -0.371795 0.04839 0 1 0
+0.357765 -0.371795 0.0273144 0 1 0
+-0.448718 -0.338894 0.296557 1 0 0
+-0.320513 0.119886 -0.34889 1 0 0
+0.474611 0.294872 0.0239921 0 1 0
+0.306034 0.198395 -0.33395 0.808009 0.39951 0.433028
+-0.301981 -0.203955 -0.358732 0.744206 0.667858 0.0111091
+0.5 0.0471505 -0.341638 1 0 0
+-0.5 -0.254079 -0.0628455 1 0 0
+0.0746916 -0.294872 -0.0544143 0 1 0
+0.5 -0.0751639 0.254279 1 0 0
+-0.352212 -0.371795 -0.163612 0 1 0
+0.323165 0.0966077 0.371795 0 0 1
+0.00805964 0.0172036 -0.333333 0 0 1
+-0.5 -0.120283 0.050408 1 0 0
+0.366136 0.286468 -0.371795 0.104579 -0.20385 0.9734
+-0.233738 -0.337133 0.320513 0 0 1
+0.3376 -0.0649828 -0.371795 0 0 1
+0.30936 0.294872 -0.00305101 0 1 0
+-0.0623941 0.371795 0.245079 0 1 0
+0.141109 -0.300837 0.205672 0.949489 0.306982 -0.0650575
+-0.5 -0.221168 0.174284 1 0 0
+0.104548 0.370028 0.320513 -0.00544953 0.725975 0.6877
+-0.141154 -0.356645 0.129669 1 0 0
+0.448718 -0.360856 -0.0562923 0.987609 -0.155908 0.0179409
+0.310607 -0.371795 0.0998046 0 1 0
+-0.39476 -0.371795 -0.144656 0 1 0
+0.000276599 0.206706 0.371795 -0.0535591 0.816236 -0.575231
+0.211673 0.211921 -0.333333 0 0 1
+-0.5 0.297538 -0.190091 1 0 0
+0.259412 -0.0245391 0.000427926 -0.556655 0.534481 -0.635976
+0.252896 0.031281 -0.321756 0.594057 0.804292 -0.0145208
+0.477649 -0.294872 0.0179943 0 1 0
+-0.0622857 0.371795 -0.164669 0 1 0
+-0.242583 0.0417902 -0.226279 -0.336195 0.941647 0.0165722
+-0.0351365 -0.230897 -0.358837 0 1 0
+0.0898157 0.201623 -0.333333 0 0 1
+-0.261377 0.144353 -0.333333 0 0 1
+-0.459309 0.354962 0.320513 0 0 1
+0.477501 0.129114 -0.371795 0 0 1
+-0.182285 -0.284007 -0.371795 0 0 1
+-0.5 -0.171008 -0.22019 1 0 0
+-0.5 -0.215516 -0.308861 1 0 0
+-0.0787541 0.290215 -0.371795 0 0 1
+0.363544 -0.371795 0.0551086 0 1 0
+0.448718 -0.330113 0.00859325 1 0 0
+-0.274241 0.371795 -0.0544472 0 1 0
+-0.5 0.0859655 0.189887 1 0 0
+0.304741 -0.371795 -0.321456 0 1 0
+-0.115145 0.371795 -0.0664787 0 1 0
+-0.11894 0.371795 -0.285044 0 1 0
+0.461801 -0.236868 0.320513 0 0 1
+-0.0589632 0.100967 0.320513 0 0 1
+-0.428586 0.184342 0.320513 0 0 1
+0.448718 -0.30365 0.0836094 0.999403 -0.0342529 -0.0044469
+0.448718 -0.330707 0.176067 1 0 0
+0.428945 -0.371795 0.253137 0 1 0
+-0.314714 0.371795 0.13026 0 1 0
+-0.14129 -0.371795 0.163521 -0.53178 0.845497 0.0484212
+-0.5 0.0813102 -0.0745837 1 0 0
+-0.169253 -0.310509 -0.371795 0 0 1
+0.0635686 0.371795 0.176198 0 1 0
+-0.34017 -0.329518 0.320513 0 0 1
+0.113254 -0.171064 0.320717 -0.342172 0.651403 0.677194
+0.288014 -0.32291 0.320513 0 0 1
+-0.5 -0.119338 -0.178121 1 0 0
+-0.5 0.296168 -0.190996 1 0 0
+0.236455 -0.0379641 -0.319745 -0.110494 0.993765 -0.0148982
+-0.441986 -0.371795 -0.133225 0.422338 0.901305 -0.0963377
+-0.205701 0.371795 0.245359 0 1 0
+0.228079 -0.371795 -0.316142 0 1 0
+-0.206813 0.182992 0.371795 0 0 1
+0.00610744 -0.0950442 0.320513 0 0 1
+-0.5 -0.236241 -0.323407 1 0 0
+0.448718 -0.35243 0.090908 1 0 0
+0.242267 -0.0365861 -0.116021 -0.328421 0.943869 0.0353726
+-0.00252944 0.230775 0.371795 0 0 1
+-0.388472 -0.371795 0.222158 0 1 0
+-0.5 0.0464539 0.316479 0.957601 0.00288945 -0.288083
+-0.278429 0.222281 -0.359651 -0.465947 0.88305 0.0558269
+0.5 -0.126392 0.229705 1 0 0
+0.5 -0.0673218 -0.115563 1 0 0
+0.5 -0.168946 -0.360309 0.99999 -0.000184612 -0.00436777
+-0.190009 -0.371795 -0.347425 0 1 0
+0.5 -0.159127 0.238268 1 0 0
+-0.180367 -0.0979226 0.367123 0.846051 0.470988 0.249736
+0.5 -0.218394 0.0376375 1 0 0
+0.20737 0.0303899 -0.245342 -0.598778 0.800629 -0.0213788
+0.136528 0.0259237 -0.333333 0 0 1
+0.151693 0.294872 -0.110051 0 1 0
+-0.0109476 -0.201761 -0.333333 0 0 1
+0.247951 0.294872 -0.171896 0 1 0
+-0.5 0.244872 0.01861 1 0 0
+-0.5 0.311403 -0.0765015 1 0 0
+-0.5 -0.20376 -0.362847 0.997443 0.0137645 0.0701318
+0.448718 -0.346282 -0.229641 1 0 0
+0.0928283 0.169314 0.320513 0 0 1
+0.5 -0.184 -0.128161 1 0 0
+-0.157301 0.371795 -0.315807 0 1 0
+-0.448718 -0.353034 0.0834154 1 0 0
+0.231397 0.294872 -0.129617 0 1 0
+-0.5 0.251902 -0.121056 1 0 0
+0.5 0.131915 -0.0153109 1 0 0
+0.225329 0.294872 0.178294 0 1 0
+0.323271 0.294872 -0.100481 0 1 0
+-0.448718 -0.3111 -0.242639 1 0 0
+-0.0747403 -0.294872 -0.158401 0 1 0
+-0.349127 0.128806 0.358162 0.8771 -0.480308 0
+0.288645 -0.371795 0.118802 0 1 0
+0.31597 0.110493 -0.333333 0.417371 -0.00971322 0.908684
+-0.434301 -0.371795 0.232126 0 1 0
+0.5 -0.174275 -0.294613 1 0 0
+-0.5 -0.00735961 0.16763 1 0 0
+-0.226277 -0.353192 0.320513 0 0 1
+0.469239 0.294872 0.0758072 0 1 0
+-0.5 0.159822 -0.0515604 1 0 0
+-0.180583 -0.371795 0.106597 0 1 0
+0.0862729 0.206243 -0.333333 0 0 1
+-0.265534 0.026058 -0.243983 0.828865 -0.559425 -0.00513766
+-0.368052 0.232405 0.320513 0 0 1
+-0.5 -0.0777616 -0.00583188 1 0 0
+-0.257374 0.300789 -0.371795 0 0 1
+0.241974 -0.371795 -0.121821 0 1 0
+-0.0101755 -0.20742 0.371795 0.108652 0.521035 0.846591
+-0.5 0.313666 -0.164652 1 0 0
+-0.209038 0.06587 -0.333333 0 0 1
+-0.45028 0.371795 0.00482458 0 1 0
+0.347561 0.294872 0.209617 0 1 0
+0.5 -0.158756 0.0404483 1 0 0
+0.296112 0.294872 0.250934 0 1 0
+-0.5 0.154638 0.163139 1 0 0
+-0.398745 -0.245733 -0.371795 0 0 1
+0.5 0.167915 0.245169 1 0 0
+0.337224 -0.0575352 0.371795 0 0 1
+0.131489 0.371795 -0.165751 0 1 0
+-0.0767631 -0.204139 0.371795 0 0 1
+0.36752 0.294872 0.263954 0 1 0
+0.114712 0.371795 -0.275734 0 1 0
+-0.334065 0.371795 -0.139582 0 1 0
+0.5 0.1738 -0.0859908 1 0 0
+-0.244737 -0.0412131 -0.278307 0.29833 0.954461 0.00186616
+-0.105349 0.371795 -0.336153 0 1 0
+0.0515686 -0.294872 0.15649 0 1 0
+-0.243195 0.371795 -0.0351545 0 1 0
+0.345575 0.294872 -0.176616 0 1 0
+-0.384758 -0.371795 -0.339125 0 1 0
+-0.244682 0.176756 -0.333333 0 0 1
+-0.5 0.0451207 0.126686 1 0 0
+0.169817 0.269847 -0.371795 0 0 1
+0.104287 0.371795 0.106029 0 1 0
+-0.419254 -0.140668 -0.371795 0 0 1
+-0.0512221 -0.230897 -0.342017 0.0360334 0.974438 -0.221749
+-0.5 -0.212976 -0.0822669 1 0 0
+-0.0268616 0.371795 0.177553 0 1 0
+-0.0635492 -0.294872 0.115989 0 1 0
+-0.5 0.0790937 -0.051674 1 0 0
+0.0913139 0.234042 0.371795 0 0 1
+0.5 -0.20899 -0.00710891 1 0 0
+-0.27353 -0.00819158 -0.286286 0.969333 0.245684 -0.00579174
+-0.305143 -0.371795 0.203322 0 1 0
+0.153604 0.160589 0.371795 0 0 1
+0.295282 0.238808 -0.371795 0 0 1
+0.145261 -0.371795 0.181434 0.278732 0.960132 0.0213208
+-0.5 0.29377 -0.251226 1 0 0
+0.194265 0.0118047 -0.26597 0.959411 -0.281923 0.00705922
+0.5 0.212955 -0.0221167 1 0 0
+0.291229 0.25025 0.320513 0 0 1
+-0.000338401 -0.294872 0.251407 0 1 0
+-0.28645 -0.206216 0.320513 -0.01794 -0.128631 0.99153
+-0.129628 -0.21243 -0.333333 0 0 1
+0.230216 0.294872 -0.34846 0 1 0
+-0.5 -0.285275 -0.166535 0.997978 0.0561363 -0.0297968
+-0.13448 0.371795 -0.125486 0 1 0
+0.165344 0.120915 0.326577 0.842235 0.495218 -0.213072
+-0.136943 -0.127039 -0.333333 0 0 1
+0.392243 -0.256341 0.320513 0 0 1
+0.0677235 0.371795 0.208178 0 1 0
+0.303507 -0.371795 -0.189777 0 1 0
+-0.209248 0.230411 0.371795 0 0 1
+0.0493088 -0.199156 0.352968 -0.236644 0.971572 0.00688509
+0.423752 -0.362589 -0.371795 -0.0600759 0.183455 0.981191
+0.5 0.176515 0.0702179 1 0 0
+0.37833 0.294872 0.212551 0 1 0
+-0.453269 -0.294872 0.0839232 0.323152 0.941174 -0.0988189
+0.256685 -0.371795 0.0619358 0 1 0
+0.448718 -0.345415 0.17153 1 0 0
+-0.5 0.362136 -0.365452 0.975601 -0.0791377 0.204793
+0.453923 0.108667 0.320513 0 0 1
+-0.247431 -0.371795 -0.0179341 0 1 0
+0.5 0.28469 -0.00571952 0.998307 0.0575516 0.0084062
+-0.5 -0.280228 -0.305897 1 0 0
+0.253066 -0.371795 -0.299048 0 1 0
+0.447972 -0.371795 0.232688 -0.622998 0.776405 0.0952287
+0.176519 -0.00360739 0.320513 0 0 1
+-0.114633 -0.294872 0.0023716 0 1 0
+0.383537 -0.195427 -0.371795 0 0 1
+0.137707 -0.230897 -0.359794 0 1 0
+0.5 0.282389 -0.177247 1 0 0
+-0.479994 0.371795 -0.0369597 0 1 0
+-0.488603 0.371795 -0.189326 0 1 0
+0.448718 -0.330595 0.155857 1 0 0
+-0.117021 0.371795 0.0630557 0 1 0
+0.141026 0.315819 -0.359418 0.999811 -0.00424157 -0.018988
+-0.284299 0.0788276 -0.333333 0 0 1
+0.0760645 0.371795 -0.293098 0 1 0
+0.228666 0.209863 -0.333333 0 0 1
+0.154527 0.139753 -0.333333 0 0 1
+-0.5 -0.241858 0.158371 1 0 0
+0.152809 0.294872 0.270134 0 1 0
+0.425106 -0.369606 -0.371795 -0.00634063 0.61491 0.788572
+0.448718 -0.368806 -0.336153 0.934898 -0.352553 0.0408846
+-0.5 -0.163489 0.153723 1 0 0
+-0.466742 -0.0849824 0.320513 0 0 1
+-0.5 0.0484897 -0.214516 1 0 0
+0.393978 0.0466581 0.320513 0 0 1
+0.448718 -0.300667 -0.202958 0.990742 -0.125254 0.0523548
+-0.5 -0.209339 0.190035 1 0 0
+0.5 0.141564 -0.124718 1 0 0
+-0.5 0.28472 0.256383 1 0 0
+-0.288047 0.274669 -0.371795 0 0 1
+-0.129207 -0.294872 -0.127326 0 1 0
+0.328796 0.158604 0.341149 0.800527 0.599297 0
+-0.5 -0.0685214 -0.221042 1 0 0
+0.0206648 -0.294872 0.106053 0 1 0
+0.293411 0.294872 0.0404052 0 1 0
+0.141026 0.350741 0.202426 1 0 0
+-0.5 -0.256609 -0.300586 1 0 0
+-0.5 -0.0545503 -0.148077 1 0 0
+0.0990489 -0.023797 0.320513 0 0 1
+0.104889 0.245682 -0.371795 0 0 1
+0.0476934 -0.294872 -0.0477339 0 1 0
+-0.141154 -0.339418 0.0532384 1 0 0
+-0.0374925 -0.0662289 -0.333333 0 0 1
+-0.0793663 0.371795 0.124832 0 1 0
+-0.23215 0.371795 -0.0884128 0 1 0
+-0.385695 -0.0277092 0.320513 -0.371795 -0.140132 0.917677
+0.113811 -0.256282 0.347389 0 1 0
+0.363428 -0.100832 0.350531 0.929725 -0.368248 0.00244169
+0.5 0.0125709 -0.327091 1 0 0
+0.377674 0.0558032 0.339871 0.977141 0.212592 0
+0.5 -0.162882 0.284784 1 0 0
+-0.320513 -0.151975 -0.352914 0.999485 0.0320234 -0.00185436
+-0.146454 -0.371795 -0.0177046 -0.339836 0.940286 0.0193328
+-0.5 0.0266535 0.313732 0.936642 0.0755277 -0.342047
+-0.226862 0.371795 0.271521 0 1 0
+0.365822 -0.213522 0.320513 0 0 1
+-0.414079 -0.371795 -0.352763 0 1 0
+-0.00089714 0.371795 0.144431 0 1 0
+0.19627 -0.18422 0.371795 0 0 1
+-0.5 0.142012 0.260051 1 0 0
+-0.401097 0.371795 -0.251167 0 1 0
+-0.227526 0.0433061 -0.205473 0.111356 0.99378 -0.00129093
+0.5 -0.268119 0.170191 1 0 0
+0.371287 0.119303 0.320513 0 0 1
+-0.252292 -0.371795 0.133164 0 1 0
+0.0419221 -0.195185 -0.333333 0 0 1
+0.448718 -0.342188 -0.355737 1 0 0
+-0.5 0.263026 -0.0229058 1 0 0
+0.5 0.186463 0.134394 1 0 0
+-0.5 0.256215 0.285041 1 0 0
+-0.182311 0.371795 -0.326916 0 1 0
+-0.195204 -0.297462 0.320513 0 0 1
+0.139117 -0.294872 -0.0544632 0.396908 0.887872 0.232695
+-0.14873 -0.371795 -0.297725 -0.250051 0.964806 -0.0813895
+0.120467 0.301163 -0.371795 0 0 1
+-0.5 0.166099 0.169352 1 0 0
+-0.142809 0.371795 -0.362344 -0.0242186 0.9976 -0.0648617
+-0.422683 -0.283556 0.320513 0 0 1
+-0.253 0.371795 -0.20541 0 1 0
+0.387243 -0.371795 0.129749 0 1 0
+0.190677 -0.0804296 -0.333333 0 0 1
+-0.17581 -0.371795 0.0649801 0 1 0
+0.5 -0.209061 0.280825 1 0 0
+0.130505 0.157637 0.353954 0.614223 0.789132 0
+-0.445652 -0.371795 0.15116 0.597556 0.798396 -0.0740934
+-0.292891 0.0641756 -0.333333 0 0 1
+-0.5 -0.226519 -0.00215618 1 0 0
+-0.5 0.13359 -0.355347 1 0 0
+-0.0848659 0.256251 -0.371795 0 0 1
+-0.0282764 0.213231 -0.333333 0 0 1
+-0.3115 -0.362876 0.320513 0.0614411 -0.172388 0.983111
+-0.5 -0.177397 -0.230636 1 0 0
+0.417158 0.000332177 0.320513 0 0 1
+0.5 0.254304 -0.00240513 1 0 0
+-0.442262 0.371795 -0.289881 0 1 0
+0.5 -0.176855 -0.341325 1 0 0
+0.0937228 0.371795 -0.022037 0 1 0
+-0.214024 -0.279743 -0.371795 0 0 1
+0.422459 0.294872 0.0252404 0 1 0
+-0.168715 0.371795 -0.131304 0 1 0
+0.141026 0.364874 -0.0700081 0.978647 0.197748 -0.0560887
+-0.5 0.185841 -0.121198 1 0 0
+-0.174899 0.31505 0.320513 0 0 1
+-0.374466 -0.071406 0.320513 0.840347 0.289467 -0.458285
+0.273229 0.245749 0.320513 0 0 1
+-0.0765938 -0.143489 0.320513 0 0 1
+0.317538 -0.0967962 -0.333333 0.277765 0.076812 0.957573
+0.244543 -0.0842044 -0.333333 0 0 1
+-0.5 -0.189986 -0.186616 1 0 0
+0.111623 -0.115184 -0.333333 0 0 1
+0.141026 0.296182 0.135532 0.899247 0.390526 0.197088
+0.5 -0.193775 -0.276677 1 0 0
+-0.396898 0.213181 -0.371795 0 0 1
+-0.5 0.147018 0.139076 1 0 0
+0.415297 -0.371795 0.153572 0 1 0
+-0.448718 -0.297615 -0.085381 0.92189 0.329781 -0.203379
+0.331422 0.125843 0.371795 0 0 1
+-0.0105883 -0.294872 -0.282404 0 1 0
+-0.141154 -0.299888 0.132047 0.958417 -0.266466 0.102144
+0.285823 0.217951 -0.338752 0.460282 0.82742 0.32174
+-0.135493 -0.00566138 0.320513 0 0 1
+0.5 -0.253222 0.0257087 1 0 0
+0.430106 0.136817 -0.371795 0 0 1
+-0.323234 0.371795 -0.0274986 0 1 0
+0.289274 0.294872 0.169705 0 1 0
+-0.414363 -0.235191 -0.371795 0 0 1
+-0.310264 0.343443 0.320513 0 0 1
+0.141026 0.309414 -0.314575 1 0 0
+0.5 0.0484993 -0.137061 1 0 0
+-0.189471 0.0772793 0.362606 0.877111 -0.473372 0.0812114
+-0.0434111 -0.294872 -0.255899 0 1 0
+-0.5 -0.225403 0.273291 1 0 0
+-0.5 -0.0308084 -0.346107 1 0 0
+-0.0571823 -0.294872 -0.123658 0 1 0
+0.141026 0.318504 0.227848 1 0 0
+-0.351878 -0.113424 -0.371795 0 0 1
+0.309508 -0.370171 0.320513 0.0139839 0.782834 -0.622074
+0.358486 -0.22801 -0.371795 0 0 1
+0.493815 -0.0317546 0.320513 0.536405 0.188537 0.822632
+0.184121 0.294872 0.12072 0 1 0
+-0.0616524 0.371795 0.230535 0 1 0
+-0.5 -0.0299825 0.0431249 1 0 0
+-0.5 0.368324 0.212586 -0.68121 0.713415 -0.164293
+0.192805 0.00568681 -0.155231 0.99141 -0.130311 -0.0111615
+0.109462 -0.235544 0.371795 0 0 1
+0.141026 0.3407 -0.0145187 1 0 0
+0.462803 -0.294872 -0.156253 0 1 0
+0.223604 -0.0377467 -0.155051 0.18456 0.982769 0.0101588
+0.12633 0.365381 0.320513 -0.0170617 0.0380967 0.999128
+-0.214238 -0.315012 -0.371795 0 0 1
+-0.5 -0.0161703 0.250442 1 0 0
+0.381035 -0.0302929 -0.371795 0 0 1
+0.191539 0.294872 -0.0397989 0 1 0
+0.5 -0.0532411 0.303223 1 0 0
+0.110608 0.160421 -0.333333 0 0 1
+0.148959 -0.277968 -0.371795 0 0 1
+-0.202494 0.24643 -0.371795 0 0 1
+-0.5 0.191044 -0.311421 1 0 0
+-0.330551 -0.330261 0.320513 0 0 1
+-0.311842 -0.18893 -0.341102 0.767495 0.578134 -0.27697
+0.5 -0.123662 -0.252944 1 0 0
+-0.248347 -0.371795 0.239192 0 1 0
+-0.5 0.0649303 -0.027994 1 0 0
+-0.133249 0.371795 -0.117436 0 1 0
+0.0305099 -0.202293 0.351138 -0.164582 0.986363 0
+0.0221819 0.371795 0.212851 0 1 0
+0.218681 0.294872 -0.133767 0 1 0
+-0.132718 0.255959 0.338461 -0.0557214 0.998429 -0.00583088
+0.381111 0.0155125 -0.371795 0 0 1
+-0.275816 0.371795 0.186069 0 1 0
+0.0254312 -0.294872 0.130086 0 1 0
+-0.349926 0.0957856 0.371795 0 0 1
+-0.464715 0.371795 0.160507 0 1 0
+-0.200905 -0.371795 0.27726 0 1 0
+-0.300752 -0.249819 -0.371795 0 0 1
+0.5 -0.0428855 -0.306302 1 0 0
+-0.28059 0.371795 -0.339222 0 1 0
+0.358251 -0.371795 0.021397 0 1 0
+-0.139761 0.371795 -0.129162 0 1 0
+0.5 -0.02105 -0.302708 1 0 0
+0.5 -0.290937 -0.291378 0.878172 -0.475424 0.0527919
+-0.5 -0.158763 0.00320861 1 0 0
+-0.5 -0.0235119 -0.280094 1 0 0
+0.5 0.104659 -0.147965 1 0 0
+-0.477274 -0.294872 -0.0855288 0 1 0
+-0.0251998 0.203179 0.352614 -0.149432 0.988754 0.00601287
+0.188159 0.294872 -0.203682 0 1 0
+0.273058 0.0698756 0.371795 0 0 1
+0.376613 -0.284781 0.320513 0 0 1
+-0.170077 -0.371795 -0.369642 0.0055191 0.910948 0.412484
+0.399766 0.0840505 -0.371795 0 0 1
+-0.0553282 0.159753 0.320513 0 0 1
+0.182337 -0.0690201 -0.333333 0 0 1
+0.0535741 0.371795 -0.240981 0 1 0
+0.467506 -0.294872 -0.00576356 0 1 0
+0.5 -0.0507414 0.0860283 1 0 0
+-0.0198085 0.306299 0.320513 0 0 1
+-0.381982 0.0350359 0.362825 0.992723 -0.119943 -0.0107044
+0.0981551 -0.2696 -0.371795 0 0 1
+0.141109 -0.335746 0.0788979 1 0 0
+0.20325 -0.371795 -0.181568 0 1 0
+0.122083 -0.00412997 0.320513 0 0 1
+-0.141154 -0.339043 -0.274551 1 0 0
+0.409093 -0.253218 0.320513 0 0 1
+0.151732 -0.340007 -0.371795 0.0418142 0.0189538 0.998946
+0.5 0.281794 -0.0254442 1 0 0
+0.323917 -0.371387 -0.371795 0 0.699696 0.71444
+-0.217024 0.0412725 -0.201399 0.271679 0.96237 0.00592607
+0.5 -0.0979524 -0.199207 1 0 0
+-0.5 -0.210507 -0.0648463 1 0 0
+0.5 0.114558 -0.342304 1 0 0
+0.5 -0.00523729 0.271802 1 0 0
+-0.493802 -0.294872 0.241987 0.403985 0.905661 0.12874
+0.49267 -0.275445 0.320513 0.0438099 0.0243701 0.998743
+-0.252272 -0.0343266 0.371795 0 0 1
+0.192955 -0.371795 -0.261367 0 1 0
+-0.466364 0.371795 -0.196578 0 1 0
+-0.0589526 -0.294872 0.278902 0 1 0
+-0.295174 0.371795 -0.0997814 0 1 0
+0.128713 -0.294872 -0.145255 0 1 0
+-0.5 0.137307 0.297275 1 0 0
+0.154204 0.294872 0.279789 0 1 0
+-0.5 0.0371904 0.182873 1 0 0
+-0.5 0.228822 0.0498945 1 0 0
+-0.441649 0.0719313 0.320513 0 0 1
+0.0693972 0.297698 -0.371795 0 0 1
+0.0456313 -0.294872 -0.241077 0 1 0
+0.5 0.022426 -0.25532 1 0 0
+-0.236218 -0.371795 -0.0747183 0 1 0
+-0.230299 -0.225644 -0.333333 0.00281574 -0.306752 0.951786
+-0.126919 -0.294872 0.192858 0 1 0
+-0.2938 0.157501 0.371795 0 0 1
+0.15628 -0.26585 -0.371795 0 0 1
+-0.183536 0.09081 0.328332 0.887776 -0.370741 0.272773
+-0.0140152 0.230897 -0.333515 0.214007 0.854151 0.473949
+-0.434698 -0.371795 -0.0660788 0 1 0
+0.5 -0.231433 -0.226541 1 0 0
+-0.5 -0.0299675 -0.200046 1 0 0
+0.0349855 0.371795 -0.221609 0 1 0
+-0.122982 0.371795 -0.100949 0 1 0
+0.5 0.118449 0.158094 1 0 0
+0.231639 -0.187361 0.371795 0 0 1
+0.17022 -0.227704 0.371795 0 0 1
+-0.121966 0.256282 0.333462 -0.00800957 0.999968 0.000599646
+0.498957 -0.219993 0.320513 0.694601 0.114041 0.710299
+0.446312 -0.299435 -0.371795 -0.575088 0.0214929 0.817809
+0.203565 -0.299091 -0.371795 0 0 1
+-0.0453618 -0.294872 0.182736 0 1 0
+-0.5 0.359778 0.150507 1 0 0
+0.5 0.279385 0.100469 1 0 0
+0.251795 0.0547397 0.371795 0 0 1
+0.323664 0.294872 0.0163232 0 1 0
+0.448718 -0.3297 -0.302243 1 0 0
+0.366011 -0.208392 0.320513 0 0 1
+-0.00670519 0.371795 0.0326708 0 1 0
+-0.5 0.227514 0.0227875 1 0 0
+-0.5 0.0625446 0.248655 1 0 0
+-0.5 0.03013 -0.098013 1 0 0
+0.5 -0.224559 0.110218 1 0 0
+0.131778 -0.143804 0.320513 -0.0607046 0.0647822 0.996051
+0.0565874 0.0379406 0.320513 0 0 1
+-0.074966 0.230897 -0.350396 0 1 0
+0.5 0.147577 -0.336849 1 0 0
+-0.495981 -0.294872 0.313072 0.700787 0.685572 0.197203
+0.5 0.0957623 -0.32978 1 0 0
+-0.5 0.103562 -0.308916 1 0 0
+-0.193062 -0.330199 -0.371795 0 0 1
+-0.0381387 -0.294872 0.232045 0 1 0
+0.436717 0.294872 -0.221919 0 1 0
+-0.164133 0.345422 0.320513 0 0 1
+-0.5 -0.205921 0.0313694 1 0 0
+0.182103 0.294872 0.164753 0 1 0
+0.220547 0.0369276 -0.0775769 -0.241857 0.970303 0.00426442
+0.159107 0.294872 0.133292 0 1 0
+0.0806484 -0.172202 0.320513 0 0 1
+0.407413 0.117165 0.320513 0 0 1
+-0.225568 -0.00556174 -0.0136553 0.26133 -0.223543 0.939008
+-0.341798 -0.371795 -0.243866 0 1 0
+0.134392 -0.255839 0.324287 -0.0639681 0.957844 -0.280076
+0.083091 -0.294872 0.139623 0 1 0
+0.0606633 -0.201709 -0.333333 0 0 1
+0.141026 0.369239 0.105154 0.736147 0.6716 0.0839099
+0.10332 -0.191201 0.371795 0 0 1
+0.0239278 0.259392 0.320513 -0.181407 0.575052 0.797751
+0.0236061 -0.0920101 -0.333333 0 0 1
+-0.323235 -0.117834 -0.371795 -0.299311 0.263833 0.916954
+-0.246203 -0.0407162 -0.325246 0.31241 0.931642 -0.185591
+0.5 -0.0976549 -0.0578447 1 0 0
+-0.21032 0.141957 0.371795 0 0 1
+-0.487669 -0.294872 -0.160793 0 1 0
+0.0491974 0.371795 0.288629 0 1 0
+-0.474695 0.371795 0.0760134 0 1 0
+-0.5 0.27447 -0.244343 1 0 0
+-0.448667 0.340708 0.320513 0 0 1
+-0.13188 0.371795 0.254301 0 1 0
+-0.448718 -0.363558 0.26873 0.994511 0.0920016 0.0498258
+-0.360749 -0.146923 -0.371795 0 0 1
+0.286269 -0.371795 -0.324229 0 1 0
+-0.5 -0.10512 0.193797 1 0 0
+-0.418034 0.371795 0.277535 0 1 0
+0.397923 -0.371795 -0.320782 0 1 0
+0.479001 0.0856731 0.320513 0 0 1
+-0.5 0.0899134 0.0347576 1 0 0
+0.5 -0.0740365 0.201735 1 0 0
+0.0552825 0.371795 0.284026 0 1 0
+-0.5 0.0227346 -0.294892 1 0 0
+-0.5 0.358852 -0.323234 1 0 0
+0.192968 -0.180738 0.371795 0 0 1
+0.5 0.00173089 -0.133475 1 0 0
+-0.386631 -0.188685 0.320513 0 0 1
+0.278068 -0.371795 -0.2403 0 1 0
+0.237278 -0.371795 -0.0710539 0 1 0
+0.377109 0.204779 -0.371795 0 0 1
+-0.0680722 -0.192904 0.320638 0.0163931 0.505765 0.862516
+-0.0488783 0.371795 -0.325841 0 1 0
+-0.0460975 0.102778 0.320513 0 0 1
+-0.5 0.0469803 0.153302 1 0 0
+-0.295718 -0.371795 -0.356252 0 1 0
+-0.382699 0.371795 -0.0383046 0 1 0
+-0.5 -0.0879446 0.283426 1 0 0
+-0.128881 -0.128424 0.320513 0 0 1
+-0.388485 0.371795 0.100823 0 1 0
+0.246053 -0.141452 -0.333333 0 0 1
+0.0224151 -0.294872 0.154824 0 1 0
+-0.160072 -0.371795 -0.217947 0 1 0
+0.5 -0.0293125 0.146637 1 0 0
+0.313529 -0.0115542 -0.333333 0.364825 0.0462401 0.929927
+0.277454 -0.097505 0.371795 0 0 1
+0.293569 -0.0873811 -0.333333 0 0 1
+-0.360322 -0.371795 -0.0258409 0 1 0
+0.141109 -0.357781 0.120553 1 0 0
+-0.306882 0.371795 -0.254779 0 1 0
+-0.5 -0.092757 -0.0409843 1 0 0
+0.404675 0.294872 -0.205488 0 1 0
+-0.109711 -0.173216 0.342344 0.528353 0.849019 -0.00322306
+0.191189 -0.0309118 -0.333333 0 0 1
+-0.5 -0.121062 0.038471 1 0 0
+0.117215 0.26626 -0.371795 0 0 1
+-0.303043 -0.11463 -0.333333 0 0 1
+0.412426 -0.371795 0.274522 0 1 0
+-0.30899 0.180729 0.357103 0.707107 -0.707107 0
+-0.492222 -0.294872 -0.0387151 0.209746 0.97602 -0.0582346
+0.5 0.0615534 0.0839778 1 0 0
+-0.312576 -0.215237 0.320513 0 0 1
+0.147488 -0.371795 -0.159522 0.134249 0.990947 -0.00115449
+-0.0290405 -0.294872 -0.261384 0 1 0
+-0.306942 -0.371795 -0.0820113 0 1 0
+-0.141828 -0.249029 -0.371795 0 0 1
+-0.0822542 0.274579 -0.371795 0 0 1
+-0.110151 -0.230897 -0.364383 0.0341887 0.996903 -0.0708211
+-0.101465 -0.294872 -0.265921 0 1 0
+-0.188661 0.356748 0.320513 0 0 1
+0.5 -0.0408716 0.294244 1 0 0
+-0.32183 -0.286927 0.320513 0 0 1
+0.141026 0.32223 0.0806308 1 0 0
+-0.14493 0.0225462 -0.333333 0 0 1
+0.0486036 -0.144978 -0.333333 0 0 1
+0.306062 -0.0746846 0.371795 0 0 1
+0.5 -0.252526 0.191226 1 0 0
+0.0755922 0.358894 -0.371795 0 0 1
+-0.242782 0.0417368 -0.327682 -0.319723 0.927669 0.192892
+0.333295 -0.340677 0.320513 0 0 1
+-0.392462 -0.371795 0.117564 0 1 0
+-0.163759 0.371795 0.24271 0 1 0
+-0.141497 -0.0194647 -0.333333 0 0 1
+-0.409896 -0.371795 -0.322038 0 1 0
+-0.141154 -0.302644 -0.11413 0.982329 -0.181478 -0.045773
+-0.0833657 0.345351 0.320513 0 0 1
+-0.0113631 0.371795 -0.207694 0 1 0
+-0.385529 0.371795 -0.343244 0 1 0
+0.255639 -0.371795 -0.343904 0 1 0
+0.137783 0.367612 0.320513 0.307529 0.518483 0.797873
+-0.5 0.219552 0.0870356 1 0 0
+0.448718 -0.318364 -0.0951757 1 0 0
+-0.448718 -0.300047 -0.0979056 0.919607 0.376407 -0.112431
+0.263877 -0.32501 -0.371795 0 0 1
+-0.247572 -0.371795 0.256101 0 1 0
+-0.146837 -0.113957 -0.333333 0 0 1
+0.332255 0.294872 -0.309054 0 1 0
+0.255873 0.294872 -0.275427 0 1 0
+0.015395 -0.294872 -0.10726 0 1 0
+0.5 -0.167842 0.156623 1 0 0
+-0.0864946 0.371795 -0.214776 0 1 0
+-0.484835 0.139189 -0.371795 0 0 1
+-0.141154 -0.305716 0.187622 1 0 0
+-0.295193 0.26407 -0.371795 0 0 1
+-0.338938 0.241853 -0.371795 0 0 1
+-0.5 -0.183648 0.288078 1 0 0
+0.104355 -0.294872 0.249847 0 1 0
+0.447595 -0.371795 0.176274 0.785762 -0.618308 -0.0165256
+-0.5 0.362187 -0.16086 0.999146 -0.0412893 -0.00151412
+0.244914 0.294872 -0.157704 0 1 0
+-0.0742418 0.364159 -0.371795 0.00803825 -0.0190049 0.999787
+0.5 -0.0618972 0.320352 0.759656 0.117213 0.639675
+-0.355932 -0.116343 0.362107 0.87532 0.464563 -0.134147
+-0.5 0.277564 -0.347822 1 0 0
+0.5 0.148683 -0.0454327 1 0 0
+0.141026 0.316277 -0.238963 1 0 0
+-0.141154 -0.348896 -0.0155688 1 0 0
+0.422571 0.294872 -0.0662162 0 1 0
+-0.414486 0.254512 -0.371795 0 0 1
+0.5 0.00277651 0.18555 1 0 0
+0.479547 0.294872 -0.22944 0 1 0
+-0.245844 -0.17735 -0.333333 0 0 1
+-0.152053 0.371795 -0.270178 0 1 0
+-0.387755 0.00819617 0.320513 -0.294857 0.00446848 0.955531
+0.175692 -0.371795 -0.327363 0 1 0
+0.275068 -0.215293 0.320513 0.0824716 -0.298094 0.950967
+0.4849 0.294872 -0.22204 0 1 0
+-0.415039 0.336953 0.320513 0 0 1
+0.255283 -0.273655 -0.371795 0 0 1
+0.5 0.106638 -0.31156 1 0 0
+-0.400409 -0.192978 0.320513 0 0 1
+-0.495002 0.142543 0.320513 -0.156561 0.0163213 0.987533
+-0.5 0.284421 -0.178854 1 0 0
+-0.5 -0.0835337 0.033299 1 0 0
+0.316631 0.26726 0.320513 0 0 1
+0.283578 -0.371795 0.0735847 0 1 0
+0.5 -0.169613 -0.186939 1 0 0
+-0.201394 -0.245533 0.33954 0.287672 0.95772 0.00423225
+-0.187579 -0.371795 -0.168316 0 1 0
+0.0704535 -0.159194 0.320513 0 0 1
+-0.254089 0.371795 0.0885751 0 1 0
+0.221933 0.294872 -0.247026 0 1 0
+-0.2783 -0.371795 -0.132839 0 1 0
+0.0566897 0.371795 -0.176571 0 1 0
+0.454915 -0.149074 -0.371795 0 0 1
+0.48967 0.0864884 -0.371795 -0.0389843 -0.0128403 0.999157
+-0.381246 -0.0393824 0.355189 0.9836 0.180144 0.00887658
+0.421751 -0.371795 -0.30529 0 1 0
+0.424287 -0.183412 -0.371795 0 0 1
+0.448718 -0.358452 -0.0238014 1 0 0
+0.299805 -0.359728 0.320513 0 0 1
+-0.310408 -0.371795 -0.174037 0 1 0
+-0.159734 -0.342349 -0.371795 0 0 1
+0.207594 0.205868 0.371795 0 0 1
+0.0904433 0.256282 0.338722 0 1 0
+-0.180854 0.0969264 0.369169 0.856389 -0.302643 0.418337
+-0.323936 -0.371795 -0.0110598 0 1 0
+0.135405 -0.0451171 0.320513 0 0 1
+-0.197109 -0.0028729 0.320513 0.215522 0.0218638 0.976254
+0.207031 0.0301523 -0.0986936 -0.608831 0.792325 0.0393124
+0.070227 -0.294872 -0.107734 0 1 0
+-0.313648 0.136329 -0.333333 -0.305888 0.0736304 0.949216
+0.0665883 -0.0291364 0.320513 0 0 1
+0.0926118 0.281725 0.320513 0 0 1
+-0.111194 0.0973645 0.320513 0 0 1
+-0.14061 0.230897 -0.350894 0 1 0
+0.0286469 -0.0108823 -0.333333 0 0 1
+0.163142 -0.371795 0.186775 0 1 0
+0.371927 0.124898 -0.371795 0 0 1
+0.0517791 -0.294872 -0.189497 0 1 0
+-0.5 0.259713 -0.266005 1 0 0
+0.138917 -0.0980638 0.320513 0 0 1
+0.0581511 0.371795 0.297828 0 1 0
+-0.26968 0.275003 -0.371795 0 0 1
+-0.188429 -0.00293118 0.320513 0 0 1
+-0.141154 -0.335253 -0.160102 1 0 0
+0.192329 0.294872 0.303975 0 1 0
+0.261757 -0.0225449 -0.143906 0.784739 -0.619698 0.01264
+-0.0876301 -0.0317506 -0.333333 0 0 1
+-0.0889343 0.184459 0.348135 -0.463511 0.886069 -0.00628304
+0.313387 -0.212869 -0.371795 0 0 1
+-0.156515 -0.371795 -0.0492177 0 1 0
+-0.317913 -0.172675 -0.368775 0.874398 0.0873499 -0.477283
+0.427223 0.294872 0.118854 0 1 0
+0.0237979 -0.229674 -0.333333 0.16854 0.724428 -0.66843
+-0.164222 -0.122633 0.34164 0.826351 0.563151 0.00218412
+-0.5 -0.00370518 -0.321308 1 0 0
+0.5 0.0274883 0.255307 1 0 0
+0.362279 0.294872 0.245835 0 1 0
+0.448718 -0.305959 -0.233249 1 0 0
+0.338194 -0.0865891 0.371795 0 0 1
+0.025204 0.116595 0.320513 0 0 1
+-0.273076 -0.00988469 -0.184917 0.98121 0.191728 -0.0216135
+-0.5 0.176929 -0.0565048 1 0 0
+-0.5 -0.0890074 0.294535 1 0 0
+0.409382 -0.371795 -0.214966 0 1 0
+-0.486578 -0.294872 0.189724 0 1 0
+-0.271801 0.371795 -0.342395 0 1 0
+-0.229461 -0.10062 0.371795 0 0 1
+-0.255389 0.221808 0.338426 -0.479244 0.877682 0
+-0.448718 -0.355949 0.0711585 1 0 0
+0.238201 0.294872 -0.0811922 0 1 0
+-0.164435 -0.371795 -0.0103258 0 1 0
+-0.397406 0.31346 0.320513 0 0 1
+0.141109 -0.301299 -0.00129636 0.990521 0.136415 -0.016103
+-0.0115747 0.371795 -0.278691 0 1 0
+-0.141154 -0.312145 0.0971568 1 0 0
+-0.5 0.156579 0.0502725 1 0 0
+-0.161159 0.371795 0.206126 0 1 0
+-0.296878 0.209058 -0.365133 -0.658987 0.675438 0.330937
+-0.141154 -0.298744 0.156048 0.928204 -0.369529 0.0434175
+0.430816 -0.15808 -0.371795 0 0 1
+0.467863 0.294872 0.131648 0 1 0
+-0.320513 0.0204848 -0.359527 1 0 0
+-0.5 0.233784 -0.347848 1 0 0
+-0.30066 0.0824037 -0.333333 0 0 1
+0.308642 0.287848 0.320513 0.0277076 0.078568 0.996524
+0.141026 0.321289 -0.330584 1 0 0
+-0.477831 -0.294872 0.169379 0 1 0
+0.5 0.268145 0.00379333 1 0 0
+0.112807 0.0802643 -0.333333 0 0 1
+-0.207701 0.371795 -0.322933 0 1 0
+0.458017 0.209922 0.320513 0 0 1
+0.5 0.227054 0.309363 1 0 0
+-0.412199 -0.15077 -0.371795 0 0 1
+0.298486 -0.013588 -0.333333 0 0 1
+-0.00253966 0.371795 0.253568 0 1 0
+0.0681666 0.179687 0.320513 -0.0289323 -0.0755837 0.99672
+0.276802 0.235197 0.320513 0 0 1
+-0.451813 0.371795 0.219726 0 1 0
+0.5 -0.124822 -0.281154 1 0 0
+-0.298572 0.283702 -0.371795 0 0 1
+-0.438954 0.371795 0.0106179 0 1 0
+0.392631 -0.371795 -0.339131 0 1 0
+-0.251966 -0.13589 -0.333333 0 0 1
+0.13889 -0.294872 -0.0913195 0.454047 0.889323 0.0542873
+0.17012 0.294872 0.113706 0 1 0
+-0.254172 0.308668 -0.371795 0 0 1
+-0.5 0.188186 0.0257124 1 0 0
+-0.108215 0.256282 0.363731 0.00151073 0.996589 0.0825103
+-0.171412 0.371795 -0.334469 0 1 0
+0.359523 -0.371795 -0.319501 0 1 0
+0.448718 -0.317952 0.100081 1 0 0
+0.5 -0.23101 -0.241346 1 0 0
+0.325175 0.294872 -0.261881 0 1 0
+-0.0152181 0.371795 0.057095 0 1 0
+-0.141154 -0.316531 -0.102364 1 0 0
+0.164966 0.294872 0.233646 0 1 0
+0.370771 0.294872 0.19427 0 1 0
+0.45151 -0.294872 0.0479627 -0.369389 0.921281 0.12163
+-0.0762261 0.371795 -0.128798 0 1 0
+0.0961663 0.230897 -0.336865 -0.085983 0.911781 0.401574
+0.329783 -0.371795 -0.0464347 0 1 0
+0.120324 -0.294872 -0.0904142 0 1 0
+0.262553 0.0285586 -0.333333 0.301684 0.304006 0.903641
+0.141109 -0.337701 0.0582086 1 0 0
+-0.147494 -0.371795 -0.357761 -0.195284 0.978837 0.0611735
+-0.5 0.347324 -0.326598 1 0 0
+-0.5 0.208472 0.12911 1 0 0
+-0.292215 -0.371795 -0.139677 0 1 0
+0.141026 0.354645 -0.355896 1 0 0
+-0.357964 -0.0542679 0.371795 0 0 1
+-0.5 0.361626 0.0402801 0.999403 -0.0301292 0.0169016
+-0.5 0.294393 -0.361651 0.999984 0.00107986 0.00547557
+0.364884 -0.130897 0.320513 0 0 1
+0.299162 -0.371795 0.0969513 0 1 0
+-0.106496 -0.294872 -0.00602223 0 1 0
+-0.339097 0.168958 -0.371795 0 0 1
+-0.0643992 0.121279 -0.333333 0 0 1
+0.00922779 0.230897 -0.358883 0 1 0
+-0.0813009 0.0733969 0.320513 0 0 1
+0.448718 -0.3451 -0.261629 1 0 0
+-0.264389 0.0276928 -0.247182 0.785308 -0.619076 -0.00606761
+0.112891 0.371795 0.240996 0 1 0
+-0.30389 -0.276431 0.320513 0 0 1
+-0.345013 -0.110383 -0.371795 0 0 1
+-0.5 0.319514 -0.0749252 1 0 0
+0.427148 -0.371795 0.16015 0 1 0
+-0.00131868 -0.256282 0.329056 -0.0522612 0.988595 -0.141241
+-0.384017 0.00657078 0.3232 0.852239 -0.126334 -0.50767
+-0.291155 -0.0547677 0.371795 0 0 1
+0.065591 -0.294872 0.308046 0 1 0
+-0.5 0.229821 -0.199197 1 0 0
+-0.275962 0.371795 -0.136362 0 1 0
+0.214381 0.07196 -0.333333 0 0 1
+-0.5 0.295417 0.261484 1 0 0
+-0.5 -0.182493 -0.349026 1 0 0
+0.5 -0.102297 -0.0599765 1 0 0
+-0.5 0.137322 -0.251197 1 0 0
+0.182414 -0.258672 0.320513 -0.00483401 -0.0430059 0.999063
+0.140589 0.371795 0.0543503 0.557153 0.808252 0.190551
+0.0864189 -0.294872 0.123108 0 1 0
+-0.171484 -0.111519 0.336707 0.837147 0.546978 0
+-0.000792417 0.357688 -0.371795 0 0 1
+0.129708 -0.0157996 -0.333333 0 0 1
+0.5 0.0148617 -0.317205 1 0 0
+-0.228613 0.371795 -0.256885 0 1 0
+0.0951263 0.371795 0.0188287 0 1 0
+-0.15054 0.371795 -0.336245 0 1 0
+0.416787 -0.0100328 -0.371795 0 0 1
+0.472059 0.183687 0.320513 0 0 1
+0.483058 -0.294872 -0.0127579 0 1 0
+-0.45583 0.193643 0.320513 0 0 1
+0.269111 0.00136844 -0.254063 0.999516 0.0307707 -0.00451913
+-0.212369 -0.0393328 -0.141897 -0.420382 0.907343 -0.00282851
+-0.5 0.0690486 0.00339595 1 0 0
+-0.159646 -0.371795 0.196233 0 1 0
+0.201798 0.0252147 -0.0415105 0.773476 -0.633107 -0.0301671
+0.5 -0.217918 0.171107 1 0 0
+-0.430535 -0.268923 -0.371795 0 0 1
+-0.00175795 -0.294872 -0.17179 0 1 0
+-0.482151 -0.229143 -0.371795 0 0 1
+0.5 -0.0280642 -0.323187 1 0 0
+0.279373 -0.0697144 -0.333333 0 0 1
+-0.476532 -0.196007 0.320513 0 0 1
+-0.262026 -0.0301536 -0.240749 0.758879 0.6508 -0.023723
+-0.202702 0.1348 -0.333333 0 0 1
+-0.398976 0.371795 0.10322 0 1 0
+0.302891 -0.371795 0.0190108 0 1 0
+-0.291227 -0.371795 0.0226276 0 1 0
+0.5 0.252092 0.191149 1 0 0
+0.0424378 0.371795 -0.0671965 0 1 0
+0.440742 0.294872 -0.0549387 0 1 0
+0.208611 -0.200516 -0.333333 0 0 1
+-0.256542 0.221178 0.356294 -0.479245 0.877681 0
+0.337683 0.234205 -0.371795 0 0 1
+0.141026 0.341118 0.0163875 1 0 0
+-0.246976 0.230601 -0.341823 -0.0758789 0.997117 0
+-0.5 -0.292584 0.155909 0.965772 0.257593 0.0305104
+-0.5 -0.0674974 0.081758 1 0 0
+-0.0229002 0.371795 0.145827 0 1 0
+-0.5 0.30089 0.311851 0.978021 -0.0556486 -0.200942
+-0.448718 -0.355964 -0.0134025 1 0 0
+0.5 0.260929 -0.237434 1 0 0
+0.5 -0.150656 -0.164788 1 0 0
+0.190728 0.121723 0.371795 0 0 1
+0.448718 -0.307183 0.0415531 1 0 0
+-0.0282465 -0.294872 -0.225642 0 1 0
+-0.492558 0.289425 0.320513 -0.28105 -0.116957 0.95254
+-0.294317 0.371795 0.0124395 0 1 0
+0.440423 -0.371795 -0.0407534 -0.0671485 0.997392 0.0264787
+-0.134756 0.00907897 -0.333333 0 0 1
+-0.19805 -0.371795 0.266837 0 1 0
+0.170344 -0.321005 -0.371795 0 0 1
+0.323118 0.294872 0.0775383 0 1 0
+0.5 0.280949 -0.365268 0.924015 -0.230553 -0.305028
+0.414691 0.170129 0.320513 0 0 1
+-0.0320438 -0.285169 0.320513 0 0 1
+-0.5 -0.147777 -0.282383 1 0 0
+0.216896 -0.371795 -0.180469 0 1 0
+-0.0434545 -0.294872 -0.0701924 0 1 0
+0.145916 0.294872 0.0224708 0.33688 0.941504 -0.00904061
+-0.276075 -0.371795 -0.232403 0 1 0
+0.378162 0.294872 -0.0996303 0 1 0
+-0.0479784 -0.199378 0.329019 0.143696 0.970923 0.19147
+-0.215102 -0.307489 -0.371795 0 0 1
+-0.0388847 -0.294872 -0.211699 0 1 0
+-0.5 0.330409 -0.257447 1 0 0
+0.141109 -0.316511 -0.0498814 1 0 0
+0.463857 0.133302 0.320513 0 0 1
+0.253003 0.241517 0.320513 0 0 1
+-0.5 -0.0296438 0.166714 1 0 0
+0.061697 -0.00182225 -0.333333 0 0 1
+0.398821 -0.371795 -0.119498 0 1 0
+0.474016 0.137747 -0.371795 0 0 1
+-0.5 0.354061 -0.261275 1 0 0
+-0.5 -0.122816 0.0425533 1 0 0
+0.231217 0.294872 0.282896 0 1 0
+-0.5 -0.175454 0.257396 1 0 0
+-0.5 -0.0508284 0.151226 1 0 0
+-0.320513 0.0459794 -0.33784 0.963811 0 -0.266585
+0.155309 0.294872 0.230435 0 1 0
+0.140073 0.365542 0.320513 0.580193 0.225275 0.782705
+0.5 -0.198273 -0.00548839 1 0 0
+0.5 -0.2347 -0.339336 1 0 0
+0.5 0.260228 0.120488 1 0 0
+-0.393938 0.371795 -0.366723 -0.0090728 0.903877 -0.427696
+0.5 0.132794 -0.286603 1 0 0
+0.431566 -0.371795 -0.277467 0 1 0
+-0.5 -0.000167289 -0.0725585 1 0 0
+0.4563 -0.294872 -0.227269 -0.361797 0.915373 0.176621
+-0.448948 0.371795 0.0517105 0 1 0
+-0.0779515 0.371795 0.161349 0 1 0
+-0.392655 0.371795 0.189565 0 1 0
+0.261978 0.294872 -0.0203236 0 1 0
+-0.0341635 0.109866 0.320513 0 0 1
+0.197246 -0.0802944 -0.333333 0 0 1
+0.325585 -0.0463524 -0.371795 0.441923 -0.00501444 0.897039
+0.5 -0.00925486 0.0216966 1 0 0
+0.292373 0.196426 0.345652 0.604678 0.796459 -0.00414505
+0.441117 -0.371795 0.236468 -0.069433 0.997574 -0.00503161
+-0.000785293 0.371795 0.22642 0 1 0
+0.290121 0.223365 0.320513 0 0 1
+0.233607 -0.371795 -0.187554 0 1 0
+-0.5 0.107321 -0.046704 1 0 0
+0.0536551 0.323361 0.320513 0 0 1
+0.448718 -0.355076 -0.284367 1 0 0
+-0.141154 -0.357607 -0.245444 1 0 0
+-0.189074 -0.0121683 -0.0852404 0.95475 -0.297301 -0.00797594
+-0.102221 -0.0928219 -0.333333 0 0 1
+0.134979 0.112742 -0.333333 0 0 1
+0.269205 0.000294109 -0.0629422 0.99894 -0.0444129 0.0120938
+0.0425472 0.371795 -0.246633 0 1 0
+0.290537 0.294872 0.216276 0 1 0
+-0.194845 0.34042 -0.371795 0 0 1
+0.362888 0.294872 -0.31059 0 1 0
+0.5 0.0315778 0.036668 1 0 0
+-0.421845 -0.0848395 0.320513 0 0 1
+-0.320513 -0.122125 -0.365056 0.980567 0.0232677 -0.194801
+-0.428576 0.371795 0.0300562 0 1 0
+0.275685 0.294872 0.232349 0 1 0
+-0.448718 -0.359895 -0.219586 1 0 0
+0.476564 0.294271 -0.371795 0.184291 0.825152 -0.534005
+-0.5 0.0931406 0.005116 1 0 0
+0.175929 -0.371795 -0.282628 0 1 0
+0.187405 -0.0341681 0.320513 0 0 1
+-0.302012 0.371795 0.307434 0 1 0
+0.382357 -0.371795 0.206816 0 1 0
+0.5 -0.193644 -0.144554 1 0 0
+-0.0781652 0.371795 -0.258048 0 1 0
+-0.242465 0.0418219 -0.198093 -0.266279 0.963833 -0.0110087
+-0.0193835 -0.230897 -0.336659 0.0649703 0.898497 -0.434145
+0.188359 0.294872 -0.0457395 0 1 0
+0.235354 -0.371795 -0.366738 -0.0100582 0.979567 0.200867
+-0.187981 -0.0080892 -0.134669 0.98797 -0.154277 0.0106799
+-0.214251 -0.0402103 -0.11573 -0.418054 0.908107 0.0239109
+-0.331582 -0.310669 0.320513 0 0 1
+0.0760485 0.230897 -0.336061 0.0438276 0.967376 0.249525
+0.5 0.284426 -0.318545 0.999401 0.0328305 0.0109836
+-0.197679 -0.0170946 0.320513 0.303676 -0.204053 0.930668
+0.0667117 -0.294872 -0.106577 0 1 0
+0.204741 -0.0281575 -0.0256942 0.683441 0.729953 -0.00871093
+0.448718 -0.356077 -0.0864422 1 0 0
+-0.343954 0.276497 -0.371795 0 0 1
+0.184083 0.294872 0.108926 0 1 0
+-0.5 0.170382 0.180712 1 0 0
+0.292127 0.169048 -0.333333 0 0 1
+-0.325748 -0.371795 -0.316134 0 1 0
+0.493958 0.138517 -0.371795 -0.205621 0.0558957 0.977034
+-0.141154 -0.321517 0.319737 0.771322 0.0467431 0.634726
+-0.0442504 -0.294872 -0.111891 0 1 0
+0.436918 -0.165005 0.320513 0 0 1
+0.380175 0.0443067 0.33667 0.980429 0.196859 -0.00255888
+0.377595 0.294872 0.140543 0 1 0
+-0.125315 -0.193705 -0.333333 0 0 1
+-0.5 -0.0869573 0.0480552 1 0 0
+0.378997 -0.22891 -0.371795 0 0 1
+0.354105 -0.146693 -0.371795 0 0 1
+0.5 0.147488 0.00961971 1 0 0
+0.5 -0.204361 -0.171361 1 0 0
+0.0728107 0.371795 -0.0687319 0 1 0
+-0.257624 0.371795 -0.240405 0 1 0
+-0.35441 -0.0803842 0.371795 0 0 1
+-0.15047 0.371795 0.310948 0 1 0
+-0.271011 -0.0164509 -0.230579 0.940984 0.338426 -0.00399285
+0.130173 -0.294872 0.243419 0 1 0
+0.338239 0.294872 -0.0589089 0 1 0
+-0.324763 0.371795 0.212173 0 1 0
+-0.128734 0.0268222 -0.333333 0 0 1
+0.257327 -0.0276276 -0.2456 -0.674109 0.738619 0.00438966
+0.0177984 -0.232859 0.371795 0 0 1
+0.5 -0.212625 0.141494 1 0 0
+0.5 -0.175583 0.174171 1 0 0
+0.481037 0.112153 -0.371795 0 0 1
+0.120349 0.371795 0.191353 0 1 0
+0.0904223 -0.123949 -0.333333 0 0 1
+-0.25797 0.203939 0.371795 0 0 1
+-0.490672 -0.294872 0.181725 0.0372716 0.999246 0.0108921
+0.293036 -0.249546 -0.371795 0 0 1
+0.0630405 -0.206879 0.371795 0 0 1
+0.120208 0.371795 -0.250515 0 1 0
+0.448718 -0.32801 -0.0234189 1 0 0
+0.192371 -0.000725418 -0.276296 0.997566 0.0694172 0.00651773
+-0.5 0.28591 -0.110857 1 0 0
+0.482446 -0.294872 -0.348864 0 1 0
+0.362562 -0.228538 0.320513 0 0 1
+-0.412404 -0.3317 -0.371795 0 0 1
+0.5 -0.216154 -0.208561 1 0 0
+0.5 0.106703 -0.369652 -0.403921 -0.0106445 0.914732
+-0.18771 0.000502485 -0.0349636 0.85005 0.00835855 0.526635
+0.5 -0.026117 -0.158108 1 0 0
+-0.0152489 0.258139 0.320513 -0.120047 0.295598 0.94774
+-0.5 0.0357626 -0.195875 1 0 0
+0.5 0.0784381 -0.272496 1 0 0
+0.428809 -0.300408 -0.371795 0 0 1
+0.112221 -0.115535 -0.333333 0 0 1
+-0.027915 -0.202725 0.344411 0.164557 0.986368 0
+-0.5 -0.079096 -0.0471508 1 0 0
+-0.142732 0.217499 -0.333333 0 0 1
+0.5 0.0845916 -0.118251 1 0 0
+0.141109 -0.311078 0.160692 1 0 0
+0.0632903 -0.256282 0.356504 0 1 0
+-0.5 -0.108574 -0.205104 1 0 0
+0.5 -0.0577222 -0.0594111 1 0 0
+-0.187314 0.00153818 -0.286118 0.999631 0.0265633 0.00565473
+0.111352 -0.294872 0.0796998 0 1 0
+0.5 -0.160056 0.174318 1 0 0
+0.5 -0.119439 0.203314 1 0 0
+-0.214913 0.371795 -0.0995839 0 1 0
+-0.5 -0.15797 0.214313 1 0 0
+0.5 -0.0915705 -0.0229109 1 0 0
+-0.392617 -0.371795 -0.200031 0 1 0
+0.0306173 -0.294872 -0.0854263 0 1 0
+-0.0962685 -0.165657 -0.333333 0 0 1
+0.0333589 -0.294872 -0.0221291 0 1 0
+0.409869 -0.371795 0.101649 0 1 0
+-0.189586 -0.0770181 0.355256 0.916453 0.400143 0
+-0.496087 -0.158275 -0.371795 0.358102 -0.156257 0.920514
+0.205097 -0.0285131 -0.155049 0.678654 0.734206 0.0192397
+0.448718 -0.301811 -0.183837 0.972142 -0.232676 0.0283248
+0.383389 0.294872 0.145 0 1 0
+0.484124 0.294872 0.303218 0 1 0
+0.364092 -0.0453731 0.371795 0 0 1
+-0.0505607 0.0668617 0.320513 0 0 1
+0.3269 -0.371795 0.251622 0 1 0
+-0.204248 -0.109959 0.371795 0 0 1
+-0.126229 -0.256282 0.342985 0.0152893 0.999883 0.000291404
+-0.274327 0.00036383 -0.324213 0.993677 -0.0132211 -0.111498
+-0.48845 0.371795 0.238215 0 1 0
+0.145045 0.144463 0.331603 0.732762 0.680467 -0.0049526
+-0.496014 0.371795 -0.0165241 -0.505967 0.861816 -0.0356344
+0.5 -0.1515 -0.167842 1 0 0
+0.246408 0.226712 0.323325 0.542724 0.595183 0.592628
+-0.5 0.00372684 -0.0435963 1 0 0
+0.0297231 0.371795 -0.313057 0 1 0
+-0.5 0.294389 0.251263 1 0 0
+0.5 0.0766798 -0.0915707 1 0 0
+0.5 -0.224192 0.217142 1 0 0
+-0.289441 -0.371795 0.0703754 0 1 0
+0.250111 -0.303081 0.320513 0 0 1
+-0.0768953 0.371795 0.0157028 0 1 0
+0.366351 0.294872 -0.144358 0 1 0
+-0.5 -0.16956 0.114885 1 0 0
+0.280839 0.294872 0.185605 0 1 0
+-0.5 -0.0501641 -0.35084 1 0 0
+0.5 0.102073 0.223078 1 0 0
+0.403084 -0.173595 -0.371795 0 0 1
+0.179854 -0.234202 -0.371795 0.022713 -0.280843 0.959485
+0.5 0.173323 0.129075 1 0 0
+0.448718 -0.329039 0.087514 1 0 0
+0.139734 -0.294872 0.257956 0.609151 0.792988 -0.0102715
+0.0569938 0.149086 -0.333333 0 0 1
+-0.5 0.0392612 0.0909745 1 0 0
+-0.0344359 0.0276191 -0.333333 0 0 1
+-0.310043 -0.175752 0.371795 -0.251975 -0.302273 0.919315
+0.096882 -0.228273 -0.333333 0.14097 -0.597251 0.789569
+-0.0604285 -0.294872 0.131195 0 1 0
+-0.373033 -0.371795 -0.0255167 0 1 0
+0.5 -0.209395 0.0419337 1 0 0
+-0.5 0.0206133 -0.0230557 1 0 0
+0.450799 0.294872 -0.0332706 0 1 0
+-0.0726983 -0.294872 0.252701 0 1 0
+-0.214786 0.175736 -0.333333 0 0 1
+-0.5 0.0541183 -0.289713 1 0 0
+-0.198774 0.209464 -0.333333 0 0 1
+0.5 0.22301 -0.105277 1 0 0
+-0.235075 0.0432131 -0.0887239 -0.0835959 0.996459 0.00899014
+-0.0120624 0.256282 0.343237 0 1 0
+-0.5 -0.241794 -0.270405 1 0 0
+-0.300514 -0.0964914 0.371795 0 0 1
+-0.402111 0.371795 -0.240937 0 1 0
+-0.0426276 -0.148842 -0.333333 0 0 1
+-0.37105 0.164813 0.320513 0 0 1
+0.0676827 -0.294872 -0.088373 0 1 0
+-0.212717 -0.371795 0.26532 0 1 0
+-0.448718 -0.319662 0.189519 1 0 0
+-0.381864 -0.192797 0.320513 0 0 1
+0.172483 0.294872 0.22608 0 1 0
+-0.124253 0.162503 0.335669 -0.614222 0.789133 0
+0.141109 -0.360473 0.140276 1 0 0
+-0.5 -0.177477 -0.162925 1 0 0
+-0.381935 -0.308779 0.320513 0 0 1
+0.268705 0.294872 -0.0919938 0 1 0
+0.5 0.155903 0.129606 1 0 0
+0.278024 -0.22247 -0.35213 -0.459205 0.888315 -0.00522657
+0.3246 0.294872 0.0890448 0 1 0
+0.5 -0.198482 0.286951 1 0 0
+0.5 -0.126481 0.2284 1 0 0
+-0.5 -0.190004 0.232038 1 0 0
+-0.471482 0.371795 -0.0158507 0 1 0
+-0.443606 -0.316549 -0.371795 0.26287 -0.0862546 0.960968
+0.231627 0.212283 -0.333333 0 0 1
+0.239812 -0.256326 0.320513 0 0 1
+0.396689 -0.06797 -0.371795 0 0 1
+-0.5 0.342811 0.213472 1 0 0
+0.479708 -0.147461 0.320513 0 0 1
+-0.142471 -0.0360079 0.320513 0 0 1
+0.0170178 0.371795 0.297339 0 1 0
+-0.45222 0.103837 -0.371795 0 0 1
+0.141026 0.310056 -0.163593 1 0 0
+-0.286626 0.21387 0.320513 -0.0224186 0.0236342 0.999469
+0.141109 -0.308329 0.129175 1 0 0
+-0.274127 -0.00265666 -0.298524 0.994022 0.106476 -0.0241269
+-0.0914892 -0.0723781 -0.333333 0 0 1
+-0.491303 0.181755 0.320513 -0.0999517 0.0218761 0.994752
+-0.431244 -0.105335 0.320513 0 0 1
+0.16184 0.294872 -0.151976 0 1 0
+-0.466315 0.355226 0.320513 0 0 1
+-0.320513 0.0326847 -0.370905 -0.668464 0.00254063 0.74374
+-0.161714 0.296232 -0.371795 0 0 1
+0.403198 0.0858838 0.320513 0 0 1
+-0.251498 -0.038247 -0.216782 0.476601 0.879036 -0.0121258
+0.0327434 -0.294872 -0.195034 0 1 0
+-0.302269 0.359499 0.320513 0 0 1
+0.427173 -0.371795 -0.0816028 0 1 0
+-0.166806 0.162714 0.371795 0 0 1
+0.196691 0.0175793 -0.207991 0.887821 -0.460088 -0.00964965
+0.0731125 -0.0413361 -0.333333 0 0 1
+-0.025536 -0.0464905 -0.333333 0 0 1
+-0.448718 -0.350608 0.302878 1 0 0
+-0.21318 0.371795 -0.251529 0 1 0
+-0.34912 -0.371795 -0.343774 0 1 0
+0.0233329 -0.259634 -0.371795 0 0 1
+0.338238 -0.371795 0.141961 0 1 0
+-0.0677805 -0.17058 -0.333333 0 0 1
+0.5 0.259956 -0.0802742 1 0 0
+0.5 -0.252877 0.205634 1 0 0
+-0.199913 -0.0305546 -0.218193 -0.698516 0.715545 0.00837694
+-0.0918548 -0.160382 -0.333333 0 0 1
+0.00795299 -0.294872 -0.0695624 0 1 0
+0.5 0.0929506 0.0949901 1 0 0
+0.200947 0.0397475 0.329462 0.97155 0.212966 -0.103618
+0.141026 0.369946 0.104216 0.736147 0.6716 0.0839099
+-0.5 -0.1964 -0.0185106 1 0 0
+0.5 -0.194964 -0.326066 1 0 0
+0.055887 -0.247036 -0.371795 0 0 1
+0.244192 -0.0360173 -0.168482 -0.308037 0.951348 -0.00709785
+-0.5 0.21443 0.25169 1 0 0
+0.235091 0.050347 0.371795 0 0 1
+-0.373794 -0.011707 0.371795 -0.130418 0.0164754 0.991322
+0.481261 0.2455 0.320513 0 0 1
+-0.201827 0.0324689 -0.216559 0.669209 0.743011 0.00971919
+0.198469 -0.0206703 -0.204848 0.849602 0.527415 -0.00296838
+0.345322 0.26972 0.320513 0 0 1
+-0.5 -0.0479023 0.314868 0.938522 -0.0617153 -0.339657
+0.467027 -0.294872 0.158893 0 1 0
+-0.5 -0.151549 -0.311439 1 0 0
+0.148781 0.294872 -0.00615371 0.140062 0.989891 -0.0223443
+-0.427706 -0.363144 0.320513 0.0468209 -0.137219 0.989434
+-0.154454 0.0496453 0.320513 0 0 1
+0.300071 -0.189648 0.362255 -0.690745 0.723082 0.00489809
+0.219325 0.0248862 0.371795 0 0 1
+0.31635 -0.138926 -0.333333 0.533489 0.069642 0.842935
+-0.448718 -0.32014 -0.000109025 1 0 0
+0.483226 -0.173204 0.320513 0 0 1
+-0.335871 0.371795 -0.272542 0 1 0
+-0.5 -0.280113 0.0375689 1 0 0
+0.261131 0.285639 0.320513 0.0167068 0.0803464 0.996627
+-0.185484 -0.371795 0.215641 0 1 0
+-0.0787492 -0.294872 -0.135334 0 1 0
+-0.183795 -0.324712 0.320513 0 0 1
+0.0645616 -0.0534227 -0.333333 0 0 1
+-0.0964677 -0.294872 -0.10582 0 1 0
+-0.167402 0.0416537 0.320513 0 0 1
+-0.141154 -0.343272 -0.0176419 1 0 0
+0.13258 -0.205176 0.371795 0 0 1
+-0.5 -0.227258 -0.0173377 1 0 0
+-0.0989754 0.362325 -0.371795 -0.0163722 -0.0381728 0.999137
+-0.467347 0.310435 -0.371795 0 0 1
+-0.0870849 0.339606 0.320513 0 0 1
+-0.36813 0.371795 0.0664269 0 1 0
+-0.5 0.152106 -0.0939531 1 0 0
+0.5 -0.294322 -0.347212 -0.577904 0.816099 -0.00301891
+-0.202238 -0.0179376 -0.0293671 0.446458 -0.253401 0.858174
+-0.5 -0.0662034 -0.310059 1 0 0
+0.5 0.140568 -0.0463473 1 0 0
+0.5 -0.221119 -0.355474 1 0 0
+-0.189715 -0.110856 0.371795 0 0 1
+0.347289 -0.371795 0.0945111 0 1 0
+0.5 -0.136221 0.103263 1 0 0
+0.258815 0.203138 -0.333333 0 0 1
+0.5 0.201866 -0.274558 1 0 0
+0.342424 0.294872 0.0216446 0 1 0
+0.065281 0.371795 0.0994283 0 1 0
+-0.047101 -0.097291 0.320513 0 0 1
+0.447938 -0.371795 -0.272422 -0.612011 0.790248 -0.0308435
+0.261929 0.294872 -0.139743 0 1 0
+0.0712424 0.0244403 0.320513 0 0 1
+-0.5 -0.144112 -0.169059 1 0 0
+0.320513 0.0790455 -0.362158 0.99821 0.000426897 0.0598065
+0.248979 0.0337847 -0.308471 0.425562 0.90482 -0.0140743
+-0.5 -0.132849 0.0863073 1 0 0
+-0.5 -0.017912 -0.221888 1 0 0
+-0.5 0.0209357 0.103322 1 0 0
+-0.214533 0.230897 -0.369441 -0.00704533 0.985169 0.171444
+0.29239 -0.227711 -0.371795 0 0 1
+-0.202836 -0.0292084 0.350513 0.99226 0.124031 -0.00609577
+0.448718 -0.327649 -0.35473 1 0 0
+0.392799 -0.371795 0.246431 0 1 0
+0.00480701 -0.294872 0.247611 0 1 0
+-0.5 -0.255379 0.279383 1 0 0
+0.5 0.177968 -0.249669 1 0 0
+-0.261841 0.121841 -0.333333 0 0 1
+-0.31665 0.19033 -0.371795 -0.286521 0.217468 0.933067
+-0.257724 0.0341366 -0.141443 -0.584947 0.810998 -0.0109404
+-0.0289121 0.297988 -0.371795 0 0 1
+0.5 0.288918 0.0147592 0.977792 0.207639 -0.0284488
+-0.125662 0.29701 -0.371795 0 0 1
+-0.0733098 -0.294872 -0.15134 0 1 0
+0.5 -0.035919 -0.249315 1 0 0
+-0.0784898 0.371795 -0.299798 0 1 0
+-0.39235 0.371795 0.18913 0 1 0
+0.5 -0.197689 -0.0462998 1 0 0
+-0.472882 -0.294872 -0.235501 0 1 0
+0.355089 -0.23945 0.320513 0 0 1
+-0.5 -0.0647271 0.316054 0.949867 0.170355 -0.262166
+0.141026 0.314105 0.0226789 1 0 0
+0.485464 0.294872 -0.164242 0 1 0
+-0.5 0.103874 0.238261 1 0 0
+0.091755 0.371795 -0.309019 0 1 0
+0.248098 0.294872 0.114937 0 1 0
+-0.5 0.289103 -0.14696 1 0 0
+-0.38737 0.0889278 0.320513 0 0 1
+0.172046 -0.16284 0.371795 0 0 1
+-0.0228947 0.268024 -0.371795 0 0 1
+0.493984 -0.294872 -0.0118596 -0.199471 0.973829 0.108943
+0.397625 -0.371795 0.00627456 0 1 0
+-0.5 -0.261351 0.0881194 1 0 0
+-0.320513 0.1065 -0.354327 1 0 0
+-0.20536 0.315594 -0.371795 0 0 1
+-0.105153 -0.0734128 -0.333333 0 0 1
+-0.0458529 0.230897 -0.363064 0.0054344 0.999588 0.0282008
+0.369346 0.294872 0.0910478 0 1 0
+0.04734 -0.26964 -0.371795 0 0 1
+0.5 -0.134528 -0.139957 1 0 0
+-0.492491 -0.294872 0.178119 0.0443759 0.999002 -0.0050772
+0.5 0.20035 0.0125305 1 0 0
+0.244489 0.230818 -0.346915 0.0574515 0.998324 -0.00697029
+0.183977 -0.371795 -0.00528504 0 1 0
+0.223477 0.114039 -0.333333 0 0 1
+-0.330967 -0.371795 -0.255392 0 1 0
+0.0500101 -0.294872 0.0773853 0 1 0
+0.293464 0.0771861 0.371795 0 0 1
+0.263676 -0.0198042 -0.312898 0.853934 -0.520262 -0.0111495
+-0.36552 -0.371795 -0.146588 0 1 0
+0.00644992 -0.0954994 0.320513 0 0 1
+-0.443855 0.371795 0.0937585 0 1 0
+-0.5 0.17239 0.0580951 1 0 0
+0.252605 0.294872 -0.338642 0 1 0
+0.5 0.280418 -0.0529521 1 0 0
+0.5 -0.276514 -0.272825 1 0 0
+-0.285861 0.261246 -0.371795 0 0 1
+0.474575 -0.294872 -0.106033 0 1 0
+0.5 -0.155788 -0.0159341 1 0 0
+-0.257295 0.0344368 -0.216713 -0.642462 0.765999 -0.0220916
+-0.5 -0.212308 0.043659 1 0 0
+0.442758 -0.371795 -0.024204 -0.638436 0.759122 -0.127018
+-0.5 0.328633 -0.320841 1 0 0
+-0.5 0.32784 -0.257624 1 0 0
+0.124294 -0.294872 -0.0838659 0 1 0
+-0.426102 -0.10486 0.320513 0 0 1
+-0.5 0.239216 -0.305233 1 0 0
+0.320513 0.0983031 -0.341733 0.993724 -0.0120225 0.111214
+0.5 0.035662 -0.333681 1 0 0
+-0.126063 -0.0808514 -0.333333 0 0 1
+-0.216103 -0.157153 -0.333333 0 0 1
+0.356866 -0.146733 0.320513 0 0 1
+-0.390333 -0.371795 -0.0839696 0 1 0
+-0.369717 -0.066643 0.371795 -0.230651 -0.071606 0.970398
+0.28265 0.294872 -0.216367 0 1 0
+-0.491272 0.181964 -0.371795 0.0381119 -0.0115778 0.999206
+-0.5 0.0930429 -0.0868109 1 0 0
+0.149715 -0.254743 0.335982 -0.071334 0.997452 0
+0.0126169 0.371795 0.258062 0 1 0
+0.5 -0.200188 0.0667256 1 0 0
+-0.5 -0.0232177 -0.311756 1 0 0
+-0.112944 -0.294872 -0.34847 0 1 0
+-0.312595 0.0834741 -0.333333 -0.232225 -0.00204772 0.97266
+0.311601 0.183117 0.320513 0.254142 0.184358 0.949433
+-0.243655 0.230891 -0.340056 -0.0880706 0.970226 0.225621
+-0.255137 0.371795 0.18726 0 1 0
+-0.196757 0.371795 0.210484 0 1 0
+0.494008 -0.294872 0.177693 -0.214993 0.975417 0.0483661
+-0.5 0.100077 0.124326 1 0 0
+0.166051 0.294872 -0.342598 0 1 0
+0.141026 0.304514 -0.0895815 1 0 0
+-0.194589 0.157111 0.371795 0 0 1
+-0.5 0.0493749 0.191402 1 0 0
+-0.397778 -0.371795 -0.00823451 0 1 0
+0.5 0.28016 0.26301 1 0 0
+0.5 -0.180175 -0.20125 1 0 0
+0.141109 -0.368528 -0.237095 0.907893 0.418188 0.0291379
+-0.5 -0.232536 -0.02893 1 0 0
+-0.0889282 -0.0393448 0.320513 0 0 1
+0.5 -0.0136527 0.21926 1 0 0
+-0.121615 -0.294872 0.0493026 0 1 0
+0.0173013 0.371795 0.142842 0 1 0
+-0.190643 0.0194557 0.320513 0 0 1
+0.5 -0.0482365 -0.280523 1 0 0
+0.224847 0.217906 -0.333333 0 0 1
+-0.5 0.0219302 -0.245802 1 0 0
+0.0570885 -0.294872 -0.316922 0 1 0
+0.448718 -0.340861 0.048032 1 0 0
+-0.364664 0.371795 -0.28032 0 1 0
+-0.5 -0.081935 -0.126236 1 0 0
+0.192357 -0.00055862 -0.206465 0.999887 -0.015011 -0.00113575
+0.401178 0.240663 -0.371795 0 0 1
+-0.487154 0.252478 -0.371795 0 0 1
+-0.429727 -0.237652 -0.371795 0 0 1
+-0.146678 0.360222 0.320513 0.00165805 0.127879 0.991788
+0.5 0.223239 -0.00811989 1 0 0
+0.160582 -0.371795 0.036662 0 1 0
+-0.449131 -0.294872 0.082851 0.387093 0.918194 -0.0841412
+0.228084 -0.147259 -0.333333 0 0 1
+0.063782 0.371795 0.238979 0 1 0
+-0.132584 0.183331 -0.333333 0 0 1
+-0.195823 -0.0257993 -0.0746441 0.815232 -0.579115 -0.00479102
+0.420047 -0.211712 -0.371795 0 0 1
+-0.219825 0.230897 -0.340776 -0.0234802 0.987183 0.157853
+0.238645 -0.371795 -0.10376 0 1 0
+-0.49719 0.371795 0.195052 -0.470635 0.876539 0.100913
+-0.0623598 0.352973 -0.371795 0 0 1
+-0.141154 -0.33715 0.27035 1 0 0
+0.133815 -0.14247 0.320513 -0.0347065 0.0454253 0.998365
+-0.288002 -0.371795 0.0371042 0 1 0
+0.0135236 0.14109 0.320513 0 0 1
+-0.128563 0.371795 -0.212533 0 1 0
+0.326571 -0.371795 0.258813 0 1 0
+0.331771 0.239728 -0.371795 0 0 1
+0.320513 0.119259 -0.34079 0.964876 -0.0725076 0.252502
+0.5 0.128569 0.126089 1 0 0
+-0.0865253 -0.294872 0.0790495 0 1 0
+0.0253651 -0.294872 -0.12957 0 1 0
+0.337046 -0.34276 0.320513 0 0 1
+0.114056 0.371795 0.194958 0 1 0
+0.5 0.226865 -0.0623624 1 0 0
+0.139156 -0.294872 0.255325 0.797001 0.603971 0.00290341
+0.5 -0.114444 -0.33114 1 0 0
+-0.5 -0.225588 -9.95882e-005 1 0 0
+0.5 -0.0343719 -0.221682 1 0 0
+-0.448718 -0.302842 -0.211461 0.99552 0.0939823 0.0103403
+-0.5 -0.275544 -0.332079 1 0 0
+0.5 -0.0847786 0.0589353 1 0 0
+0.448718 -0.340659 0.0267844 1 0 0
+0.5 0.0121934 -0.0595305 1 0 0
+-0.119234 0.226871 0.371795 0 0 1
+-0.353395 0.371795 -0.029628 0 1 0
+-0.252745 -0.285824 -0.371795 0 0 1
+0.102909 0.230897 -0.350301 0 1 0
+0.206294 -0.29174 0.320513 0 0 1
+0.5 -0.114561 0.260722 1 0 0
+-0.0431563 0.337194 -0.371795 0 0 1
+-0.354156 -0.371795 0.189001 0 1 0
+0.208528 -0.0312008 -0.319419 0.63381 0.773335 0.0154017
+-0.134607 -0.294872 -0.0515436 -0.310247 0.948192 -0.0684059
+-0.00324546 0.300025 0.320513 0 0 1
+-0.5 0.342298 -0.0931701 1 0 0
+0.0147989 0.128686 0.320513 0 0 1
+-0.496449 0.364582 -0.371795 0.42491 0.00869037 0.905194
+0.5 -0.222961 -0.361733 0.998598 -0.000221005 -0.0529354
+-0.5 -0.250361 -0.308813 1 0 0
+0.233028 -0.0382638 -0.275723 -0.0967111 0.995282 -0.00775952
+0.5 0.10686 -0.0553684 1 0 0
+0.17874 0.294872 0.10849 0 1 0
+-0.34892 0.371795 0.188975 0 1 0
+-0.209459 -0.248119 0.320513 -0.229796 -0.330703 0.91533
+-0.448718 -0.337099 0.15801 1 0 0
+-0.228504 -0.00618159 0.371795 0 0 1
+-0.431138 -0.371795 -0.142773 0 1 0
+-0.120302 -0.0914407 0.320513 0 0 1
+0.194336 -0.0120688 -0.00668524 0.937174 0.348511 -0.0156219
+-0.0645305 0.371795 0.100529 0 1 0
+-0.187071 0.269597 0.320513 0 0 1
+-0.159665 -0.371795 0.1779 0 1 0
+-0.485062 0.0973775 0.320513 0 0 1
+-0.30009 0.371795 0.218123 0 1 0
+-0.247003 -0.0403431 -0.332468 -0.21091 -0.627226 0.749737
+0.295407 -0.371795 -0.340502 0 1 0
+0.343889 0.294872 -0.245582 0 1 0
+-0.0857043 -0.294872 -0.356353 0 1 0
+0.141026 0.33935 0.274983 1 0 0
+-0.270204 0.0181813 -0.198318 0.914921 -0.403629 -0.00192832
+-0.453888 0.152459 -0.371795 0 0 1
+-0.5 -0.00427691 -0.0140658 1 0 0
+-0.495115 -0.294872 0.268618 0.287144 0.951866 -0.107235
+0.101981 -0.294872 0.224861 0 1 0
+0.0488312 0.371795 -0.17162 0 1 0
+-0.346425 -0.174107 -0.371795 0 0 1
+-0.252121 0.279769 -0.371795 0 0 1
+-0.253792 0.371795 0.127288 0 1 0
+0.313643 0.0623205 0.371795 0 0 1
+-0.0787043 0.371795 0.185223 0 1 0
+-0.5 -0.0599826 -0.266782 1 0 0
+0.0123654 -0.294872 -0.159781 0 1 0
+-0.157041 -0.203365 -0.333333 0 0 1
+-0.21585 -0.0409559 -0.202757 -0.350608 0.936495 0.00710471
+-0.139824 -0.259406 -0.371795 0 0 1
+0.256631 -0.0283244 -0.252561 -0.667936 0.744176 -0.00800514
+-0.43662 -0.242031 0.320513 0 0 1
+-0.245069 0.371795 -0.192924 0 1 0
+0.5 -0.163744 -0.286435 1 0 0
+0.00566958 -0.252374 -0.371795 0 0 1
+-0.5 0.229622 0.0322318 1 0 0
+0.0611526 -0.0555024 0.320513 0 0 1
+-0.477631 0.325155 0.320513 0 0 1
+0.239392 -0.0185482 0.0107726 0.209807 -0.442043 0.872112
+-0.387452 0.371795 0.0185912 0 1 0
+-0.5 -0.134406 -0.325686 1 0 0
+0.0756957 0.190287 0.363777 0.302755 0.860703 -0.409303
+-0.156742 -0.229738 0.371795 0 0 1
+0.141109 -0.314705 -0.196475 1 0 0
+0.0646389 0.371795 -0.311265 0 1 0
+0.0111064 0.0763865 0.320513 0 0 1
+0.119403 -0.294872 -0.166243 0 1 0
+-0.322368 0.371795 0.148545 0 1 0
+0.265919 0.294872 -0.0942803 0 1 0
+0.465884 -0.294872 -0.100981 0 1 0
+0.141109 -0.301926 -0.204877 0.980372 0.197135 0.00307254
+0.5 -0.0881287 -0.0560749 1 0 0
+0.5 -0.155184 -0.147271 1 0 0
+0.195168 0.216258 -0.333333 0 0 1
+-0.5 -0.0411394 0.197504 1 0 0
+0.0215746 0.371795 -0.311673 0 1 0
+0.5 -0.172965 0.0380589 1 0 0
+-0.46247 0.371795 0.102717 0 1 0
+-0.0297712 -0.0430716 -0.333333 0 0 1
+-0.141154 -0.315813 0.0807232 1 0 0
+0.375884 -0.0375532 0.371795 0.450436 -0.00682262 0.892783
+0.0346793 -0.201597 0.341281 -0.164583 0.986363 0
+0.203076 -0.371795 -0.0821744 0 1 0
+0.00999454 0.336723 -0.371795 0 0 1
+-0.5 -0.26432 -0.0794471 1 0 0
+-0.5 -0.152102 0.310491 0.999052 -1.76097e-006 -0.0435442
+0.439418 0.245789 0.320513 0 0 1
+0.169012 -0.331098 0.320513 0 0 1
+0.186098 -0.364408 0.320513 0.00750425 -0.157378 0.98751
+0.137113 -0.221741 0.371795 0 0 1
+0.5 0.140221 0.00587064 1 0 0
+-0.37683 -0.0140917 -0.371795 0 0 1
+-0.375827 0.251005 0.320513 0 0 1
+0.5 0.264068 0.0967083 1 0 0
+0.0641562 0.194249 0.35434 0.324723 0.945809 0
+0.136766 -0.0887499 -0.333333 0 0 1
+-0.166575 -0.371795 0.0543817 0 1 0
+-0.5 -0.175942 -0.208743 1 0 0
+0.081297 -0.131014 -0.333333 0 0 1
+0.288095 -0.0212205 0.371795 0 0 1
+0.10033 0.370593 0.320513 -0.0270051 0.947746 0.31788
+0.5 -0.0673746 0.277158 1 0 0
+0.10983 0.170579 0.320513 -0.502424 -0.501925 0.704018
+-0.5 -0.266407 -0.243407 1 0 0
+0.268853 -0.00431975 -0.030685 0.992105 -0.125288 0.00559625
+0.5 0.114463 0.260215 1 0 0
+-0.156869 -0.371795 -0.158715 0 1 0
+0.436799 0.294872 0.00730407 0 1 0
+-0.10415 -0.294872 0.113284 0 1 0
+0.144866 -0.371795 0.0940852 0.462456 0.869689 0.172556
+-0.5 -0.0647554 0.177636 1 0 0
+-0.351728 -0.226647 0.320513 0 0 1
+0.000921538 -0.294872 0.122367 0 1 0
+-0.5 0.192899 0.304052 1 0 0
+0.5 -0.000242594 0.179484 1 0 0
+0.5 -0.0136541 -0.140515 1 0 0
+-0.5 0.282367 -0.225068 1 0 0
+-0.448718 -0.340239 -0.251691 1 0 0
+-0.5 0.0128734 0.0780256 1 0 0
+-0.313897 0.0537155 0.371795 0 0 1
+-0.5 0.369522 -0.0376154 0.705135 -0.679977 0.201036
+-0.5 0.01562 -0.269646 1 0 0
+0.20555 0.294872 0.269309 0 1 0
+0.361138 0.0631195 -0.371795 0 0 1
+-0.0731488 -0.142585 0.320513 0 0 1
+-0.5 0.333911 0.0296626 1 0 0
+-0.5 0.0946342 0.298991 1 0 0
+0.439495 0.0950001 -0.371795 0 0 1
+0.5 0.150575 -0.230427 1 0 0
+0.262477 0.197302 0.371795 0 0 1
+-0.450578 0.371795 -0.164521 0 1 0
+0.12146 -0.063047 0.320513 0 0 1
+-0.302188 -0.371795 0.218871 0 1 0
+0.152206 0.294872 -0.0790747 0.113928 0.993383 -0.0144999
+0.5 0.286367 0.181114 0.981684 0.189907 0.0152244
+-0.5 0.290622 -0.0738481 1 0 0
+-0.410006 0.371795 0.244844 0 1 0
+0.263459 0.258015 -0.371795 0 0 1
+-0.494159 0.197488 -0.371795 0.421407 0.0790808 0.903417
+-0.408806 -0.371795 -0.279537 0 1 0
+-0.472111 0.371795 -0.095937 0 1 0
+0.28642 -0.289087 -0.371795 0 0 1
+-0.5 0.367616 -0.140403 0.825073 -0.506277 -0.250874
+-0.5 -0.227053 0.00795037 1 0 0
+-0.498351 -0.294872 0.21194 0.622277 0.782578 0.0185423
+-0.423541 -0.371795 -0.198932 0 1 0
+-0.412514 -0.371795 -0.27099 0 1 0
+-0.5 -0.0862944 -0.168369 1 0 0
+0.5 0.00446287 -0.250259 1 0 0
+-0.365296 -0.371795 -0.0368912 0 1 0
+0.385764 0.289822 -0.371795 -0.0836074 -0.280352 0.956249
+-0.448718 -0.34194 0.233531 1 0 0
+0.404359 -0.371795 0.0809343 0 1 0
+0.346323 0.294872 0.092518 0 1 0
+0.5 0.238432 -0.347594 1 0 0
+0.431605 0.294872 -0.334945 0 1 0
+0.29532 0.294872 0.264024 0 1 0
+0.424701 0.089979 -0.371795 0 0 1
+-0.393619 -0.371795 -0.0325724 0 1 0
+-0.357275 0.113885 0.357087 0.879208 -0.476439 0
+0.166515 0.0429828 -0.333333 0 0 1
+0.141109 -0.365763 0.275311 0.967553 0.251166 -0.0275196
+0.351906 0.10399 0.371795 0.183495 0.0191031 0.982835
+0.5 -0.18148 -0.00288842 1 0 0
+-0.5 0.0174925 -0.0870754 1 0 0
+-0.118004 0.181574 0.371795 0.0100379 -0.0157802 0.999825
+0.307377 0.294872 0.0805118 0 1 0
+0.382356 0.0298064 0.355297 0.997377 0.0723803 -0.000502179
+-0.448718 -0.302222 0.225952 0.992479 0.113089 -0.0468571
+-0.5 -0.281603 -0.361484 0.977085 -0.0524414 0.206289
+-0.136654 -0.129832 -0.333333 0 0 1
+-0.303753 0.22472 -0.371795 0 0 1
+-0.359513 -0.371795 0.188332 0 1 0
+0.211354 0.294872 -0.224233 0 1 0
+-0.415125 0.371795 0.255591 0 1 0
+-0.0824107 0.316322 0.320513 0 0 1
+0.246776 -0.371795 0.12076 0 1 0
+0.104479 0.293293 -0.371795 0 0 1
+0.0777526 -0.189581 0.320875 -0.239526 0.777234 0.581837
+-0.195393 0.0251848 -0.22861 0.8058 0.591684 0.0244048
+-0.213097 -0.371795 0.0864602 0 1 0
+0.147414 -0.371795 0.0421953 0.237662 0.971238 0.0146116
+0.5 -0.0531799 -0.225252 1 0 0
+0.5 0.253049 0.129387 1 0 0
+-0.429558 0.251529 -0.371795 0 0 1
+-0.448718 -0.346391 -0.147114 1 0 0
+0.208641 0.294872 -0.167812 0 1 0
+0.0662509 0.148543 0.320513 0 0 1
+0.378204 -0.0533638 0.351777 0.977148 -0.21256 0
+-0.00799688 -0.294872 -0.258454 0 1 0
+-0.436781 -0.0774276 0.320513 0 0 1
+0.12681 0.101688 0.320513 0 0 1
+-0.249934 -0.371795 0.0750371 0 1 0
+-0.0384719 -0.294872 -0.19707 0 1 0
+-0.5 0.136631 0.0389956 1 0 0
+0.5 0.287856 0.106123 0.912398 0.408995 -0.0159303
+0.224989 0.233018 -0.371795 0 0.52692 0.849915
+0.5 0.252178 -0.350592 1 0 0
+0.186508 0.294872 0.240681 0 1 0
+-0.5 0.282385 0.0186335 1 0 0
+-0.252198 0.371795 -0.277817 0 1 0
+-0.0948198 0.0474537 0.320513 0 0 1
+-0.346288 -0.134005 0.35184 0.861676 0.507442 -0.00413062
+-0.356562 0.371795 0.220584 0 1 0
+0.194402 -0.00251945 0.320513 0 0 1
+-0.335316 0.371795 -0.167441 0 1 0
+0.329315 0.294872 0.310742 -0.0163959 0.998721 0.0478297
+-0.300414 -0.295064 -0.371795 0 0 1
+-0.5 0.256325 0.144237 1 0 0
+-0.0267695 -0.278041 0.320513 0 0 1
+0.366822 0.0657797 0.371795 0.117126 -0.0139657 0.993019
+0.5 -0.0288918 0.30386 1 0 0
+0.382438 -0.0161668 0.371795 0.852071 0.135445 0.505598
+-0.14501 0.144501 0.366972 -0.393908 0.781841 -0.483281
+0.5 0.147238 0.0501281 1 0 0
+0.141026 0.318034 -0.0208167 1 0 0
+-0.182261 -0.371795 -0.0759864 0 1 0
+-0.107124 0.174616 0.329673 -0.499455 0.865665 -0.0341822
+0.5 -0.0787987 0.201338 1 0 0
+0.0824486 -0.241006 0.371795 0 0 1
+0.5 0.122763 0.0984821 1 0 0
+-0.448718 -0.354339 -0.313935 1 0 0
+0.141026 0.337556 -0.150334 1 0 0
+0.406536 -0.371795 -0.318254 0 1 0
+0.5 0.0874377 -0.189269 1 0 0
+0.455433 -0.194824 0.320513 0 0 1
+0.161904 0.100315 0.320513 0 0 1
+-0.142082 0.371795 0.260943 0 1 0
+-0.247551 -0.371795 -0.0209809 0 1 0
+0.467179 -0.167494 -0.371795 0 0 1
+-0.264603 -0.0273875 -0.0557311 0.775163 0.631747 0.0042532
+0.141109 -0.345819 -0.127407 1 0 0
+-0.14298 -0.00676407 -0.333333 0 0 1
+-0.00144067 -0.204555 0.34832 0 1 0
+-0.448718 -0.352577 -0.272517 1 0 0
+-0.226037 0.284658 -0.371795 0 0 1
+-0.261803 -0.0379864 0.371795 0 0 1
+0.5 -0.0476534 0.0409783 1 0 0
+0.322665 0.0763924 0.371795 0 0 1
+0.141026 0.365649 0.0873446 0.988225 0.147771 -0.039682
+-0.209751 -0.371795 0.291736 0 1 0
+-0.330214 0.0567285 -0.371795 -0.077874 -0.027205 0.996592
+-0.423916 0.073263 -0.371795 0 0 1
+-0.5 -0.0629856 -0.0457721 1 0 0
+-0.156888 0.291007 -0.371795 0 0 1
+0.105269 -0.294872 0.147152 0 1 0
+0.342098 0.236982 0.320513 0 0 1
+0.273655 0.0335209 0.371795 0 0 1
+0.448718 -0.343353 -0.0797634 1 0 0
+-0.0127426 -0.12299 0.320513 0 0 1
+-0.347604 -0.371795 0.0292616 0 1 0
+0.0182501 0.292708 0.320513 0 0 1
+0.5 -0.208401 -0.321947 1 0 0
+0.187178 0.294872 0.309334 0 1 0
+0.41223 0.294872 0.305671 0 1 0
+0.0627342 -0.294872 0.268799 0 1 0
+0.5 -0.198374 -0.0428206 1 0 0
+-0.141154 -0.327851 -0.0512057 1 0 0
+0.17167 0.294872 0.039991 0 1 0
+0.0559032 -0.287778 0.320513 -0.00374728 -0.0630886 0.998001
+-0.138597 -0.151338 0.346545 0.659902 0.751329 0.00585737
+-0.288588 0.371795 -0.066979 0 1 0
+0.5 -0.229761 -0.241155 1 0 0
+-0.253799 0.0975993 -0.333333 0 0 1
+0.5 0.22215 0.251895 1 0 0
+0.132391 0.0720009 -0.333333 0 0 1
+-0.499189 -0.0991706 0.320513 0.953427 -0.117054 -0.277985
+-0.190088 -0.0155096 -0.266127 0.940056 -0.340995 -0.00401373
+0.346045 -0.371795 0.32019 0.0550518 -0.622243 0.780886
+0.0926893 0.328695 -0.371795 0 0 1
+0.5 -0.147495 0.220019 1 0 0
+-0.368807 -0.371795 0.0750438 0 1 0
+-0.374627 0.371795 -0.142345 0 1 0
+0.270986 -0.371795 -0.179609 0 1 0
+0.41776 -0.371795 0.249233 0 1 0
+-0.140173 -0.294872 -0.288097 0.883037 -0.398141 -0.248455
+0.5 -0.109828 -0.221916 1 0 0
+-0.411363 -0.371795 -0.0336381 0 1 0
+-0.216867 -0.13292 -0.333333 0 0 1
+-0.5 -0.175178 0.238725 1 0 0
+0.320513 0.141839 -0.361007 1 0 0
+0.0344696 -0.294872 0.0545576 0 1 0
+-0.392783 0.371795 0.156356 0 1 0
+0.5 -0.0578077 -0.187491 1 0 0
+-0.260597 -0.371795 -0.313668 0 1 0
+-0.296221 -0.168585 -0.333333 0 0 1
+-0.145436 0.144038 0.35864 0.734801 -0.678283 0
+-0.332286 0.199563 -0.371795 0 0 1
+0.147549 -0.0151365 0.320513 0 0 1
+-0.381532 -0.0439447 0.320513 0.714991 -0.141532 -0.684658
+-0.347808 -0.301383 -0.371795 0 0 1
+-0.399108 -0.297603 0.320513 0 0 1
+0.352856 0.294872 0.295346 0 1 0
+-0.170105 -0.371795 -0.0979901 0 1 0
+0.0953579 0.371795 0.305301 0 1 0
+0.5 -0.176434 -0.2818 1 0 0
+0.5 0.191216 -0.0499636 1 0 0
+0.256855 -0.371795 -0.311375 0 1 0
+0.291331 -0.371795 0.138647 0 1 0
+0.0024893 0.371795 0.300958 0 1 0
+-0.373174 0.0612205 0.371795 -0.355857 -0.0300051 0.934059
+0.158282 -0.28356 0.320513 0 0 1
+0.392325 -0.357368 0.320513 0 0 1
+0.370856 0.294872 -0.111034 0 1 0
+-0.5 0.312572 0.236599 1 0 0
+-0.20921 0.371795 0.289886 0 1 0
+-0.401955 0.155725 -0.371795 0 0 1
+0.127311 0.371795 -0.333494 0 1 0
+-0.5 -0.155812 -0.344613 1 0 0
+-0.5 0.0571488 0.113115 1 0 0
+-0.314999 0.309018 -0.371795 0 0 1
+0.406569 -0.19372 -0.371795 0 0 1
+-0.5 0.137151 0.153908 1 0 0
+-0.258068 0.248198 0.320513 0 0 1
+-0.427132 -0.371795 0.0968395 0 1 0
+-0.48327 -0.294872 0.177762 0 1 0
+0.246113 0.270336 -0.371795 0 0 1
+0.141109 -0.315109 0.0580444 1 0 0
+-0.5 0.318065 -0.126119 1 0 0
+-0.0341604 0.119306 0.320513 0 0 1
+-0.0838777 0.371795 -0.215096 0 1 0
+0.194055 0.0110207 -0.206156 0.957941 -0.286703 0.012297
+0.141109 -0.324791 -0.162813 1 0 0
+0.490709 0.285158 -0.371795 0 0 1
+0.439405 -0.371795 -0.0847351 -0.0916995 0.995646 0.0167393
+0.311665 -0.371795 0.262824 0 1 0
+0.141026 0.315343 -0.328694 1 0 0
+-0.057076 -0.0277573 -0.333333 0 0 1
+0.0167238 -0.294872 -0.201111 0 1 0
+-0.141154 -0.359716 0.166861 1 0 0
+0.197286 -0.0188563 -0.118151 0.863543 0.504247 -0.0053691
+-0.216544 0.228764 0.371795 -0.0352351 0.238304 0.970551
+-0.33605 0.371795 -0.150907 0 1 0
+0.015062 -0.294872 -0.0420104 0 1 0
+0.386786 -0.371795 -0.0401757 0 1 0
+0.334786 0.294872 0.138702 0 1 0
+0.5 0.0947536 -0.313232 1 0 0
+-0.27064 0.0172466 -0.104171 0.923133 -0.38383 0.0223725
+0.464993 0.185066 0.320513 0 0 1
+0.152427 0.294872 0.221693 0 1 0
+0.0282845 0.371795 -0.150075 0 1 0
+-0.420376 -0.371795 0.225715 0 1 0
+0.478909 -0.0523801 0.320513 0 0 1
+0.251697 -0.0321207 -0.226356 -0.552123 0.833561 0.0183272
+-0.142743 -0.262847 0.320513 0.0451687 -0.114011 0.992452
+-0.5 0.0782154 -0.163151 1 0 0
+-0.397551 0.24045 0.320513 0 0 1
+-0.494188 0.371795 0.0535206 -0.266021 0.963443 0.0317814
+0.0720817 -0.0602584 0.320513 0 0 1
+-0.220739 0.371795 0.178012 0 1 0
+0.5 0.274647 -0.0798874 1 0 0
+0.0593684 -0.294872 -0.0604345 0 1 0
+0.5 0.12951 0.0610451 1 0 0
+-0.0753126 0.359685 -0.371795 0 0 1
+-0.5 -0.0359341 0.286545 1 0 0
+-0.5 0.0193758 -0.0161307 1 0 0
+0.333334 0.294872 0.220201 0 1 0
+0.284248 0.0745864 -0.333333 0 0 1
+-0.38291 0.0220597 0.323762 0.905182 0.0459154 -0.422536
+-0.279694 0.207007 -0.333333 0 0 1
+-0.38752 0.0102903 -0.371795 0 0 1
+-0.412103 -0.227745 -0.371795 0 0 1
+0.402488 0.115305 -0.371795 0 0 1
+0.198857 -0.106437 0.371795 0 0 1
+0.161675 -0.371795 0.152323 0 1 0
+0.5 0.0239075 -0.199853 1 0 0
+-0.144584 -0.0222833 0.320513 0 0 1
+-0.459974 -0.294872 0.0759351 0 1 0
+0.382425 0.294872 0.317383 0.033147 0.848187 0.528658
+0.5 -0.0534657 -0.104926 1 0 0
+0.396897 0.294872 0.171378 0 1 0
+0.192564 0.294872 -0.268443 0 1 0
+0.00858629 0.371795 -0.290898 0 1 0
+0.191133 -0.371795 -0.00672163 0 1 0
+0.261474 0.0229496 -0.120565 0.790686 0.612174 -0.00762484
+0.316026 -0.327125 -0.371795 0 0 1
+-0.405252 -0.371795 0.178181 0 1 0
+-0.5 -0.154044 0.279192 1 0 0
+0.319827 0.294872 -0.238934 0 1 0
+-0.306226 -0.127634 0.371795 0 0 1
+-0.175255 0.00363527 -0.333333 0.00762835 -0.00277707 0.999967
+0.225923 0.0380375 -0.220273 -0.14398 0.988527 0.0456449
+0.136817 0.371795 -0.255138 0.473663 0.877564 0.0743308
+0.141109 -0.297323 0.0933554 0.949487 0.313628 0.0105487
+-0.5 -0.217251 -0.246449 1 0 0
+-0.0933181 -0.251913 0.371795 -0.0889355 -0.295298 0.951257
+0.0355471 0.237367 0.371795 0 0 1
+-0.080359 -0.294872 0.223563 0 1 0
+-0.5 0.0983715 0.226476 1 0 0
+0.1784 0.294872 -0.182199 0 1 0
+0.141109 -0.352054 -0.072928 1 0 0
+0.0414303 0.20047 0.337835 0.180709 0.983537 0
+-0.279829 0.371795 -0.17846 0 1 0
+0.5 -0.0521669 -0.00497403 1 0 0
+-0.249891 -0.0229122 -0.0270009 -0.344091 -0.365219 0.864995
+-0.30894 -0.371795 0.316174 0.132514 0.842472 -0.522189
+-0.158479 -0.0439042 -0.333333 0 0 1
+0.5 -0.0353238 -0.0223713 1 0 0
+-0.0139687 0.371795 0.147656 0 1 0
+0.20501 0.0750023 -0.333333 0 0 1
+-0.364349 -0.371795 -0.0285 0 1 0
+-0.496795 -0.283498 0.320513 -0.276962 0.0463804 0.959761
+-0.389344 0.0363673 -0.371795 0 0 1
+0.453821 -0.294872 0.0204363 -0.228898 0.943472 0.239721
+0.210724 -0.230897 -0.369644 -0.190048 -0.488868 0.851405
+0.432751 -0.346753 0.320513 0 0 1
+0.5 -0.249444 -0.320959 1 0 0
+0.288229 -0.211949 -0.333333 0.371568 -0.460649 0.806064
+0.0415827 0.0371903 0.320513 0 0 1
+0.378825 -0.184287 0.320513 0 0 1
+0.477392 0.294872 0.0216357 0 1 0
+0.26836 -0.0077447 -0.108461 0.975136 -0.221606 0
+-0.241826 -0.149388 -0.333333 0 0 1
+0.326732 -0.161361 0.354304 0.800443 -0.599409 0
+-0.0877592 -0.0395367 0.320513 0 0 1
+0.448718 -0.34308 -0.0978431 1 0 0
+0.114369 -0.294872 0.261464 0 1 0
+-0.448718 -0.351397 -0.348642 1 0 0
+-0.440139 -0.371795 0.00300837 0.0893786 0.995997 0.00126248
+-0.400523 -0.371795 0.167774 0 1 0
+0.0974925 -0.294872 -0.175798 0 1 0
+0.153668 0.294872 -0.321479 0 1 0
+-0.5 0.184947 -0.0329956 1 0 0
+0.5 0.205621 0.311179 0.955148 0.0168849 0.295647
+0.187769 -0.371795 -0.217567 0 1 0
+-0.142641 0.00131613 0.320513 0 0 1
+-0.5 -0.280488 -0.350997 1 0 0
+-0.5 0.363215 0.158747 0.999698 -0.0245525 0.000875096
+0.241205 0.294872 -0.0722781 0 1 0
+-0.5 0.231312 0.310319 0.999985 0.00131248 -0.00540145
+-0.0513484 -0.294872 -0.0755942 0 1 0
+-0.141154 -0.302227 0.241031 0.994056 -0.0982599 0.0468885
+0.172332 0.294872 -0.062763 0 1 0
+0.5 -0.0323986 -0.132664 1 0 0
+-0.335588 -0.371795 -0.0689456 0 1 0
+0.406612 -0.371795 0.1626 0 1 0
+-0.017054 -0.294872 0.169742 0 1 0
+-0.5 0.0211451 0.202305 1 0 0
+-0.458152 0.0625153 -0.371795 0 0 1
+0.212754 -0.0311916 0.00146676 0.350816 0.724535 -0.593276
+0.5 -0.202365 0.0722523 1 0 0
+-0.25888 0.371795 -0.209716 0 1 0
+-0.273194 0.00944582 -0.126049 0.982835 -0.184481 -0.00152835
+0.5 0.0431308 0.317233 0.918862 0.082235 0.385914
+0.128619 0.0796953 -0.333333 0 0 1
+-0.201063 0.0317041 -0.141859 0.676999 0.735951 -0.00694396
+-0.5 0.275009 -0.185491 1 0 0
+-0.152364 -0.371795 0.131591 0 1 0
+0.0439638 -0.231234 0.371795 0 0 1
+-0.0606917 0.371795 0.0480679 0 1 0
+-0.49902 0.0677695 -0.371795 0.527923 0 0.849292
+0.089116 -0.294872 -0.366465 0.00513853 0.974884 0.222655
+0.351007 -0.371795 0.312114 0 1 0
+-0.311444 0.259499 -0.371795 0 0 1
+-0.106369 0.371795 0.0485098 0 1 0
+-0.302022 -0.371795 -0.216708 0 1 0
+0.0403428 -0.256282 0.350968 0 1 0
+-0.5 0.230682 -0.113057 1 0 0
+-0.115099 0.371795 -0.370693 -0.0664769 0.819896 -0.568639
+0.413095 -0.0582905 0.320513 0 0 1
+-0.326855 -0.161197 0.349592 0.79956 0.600586 0
+-0.265534 0.0260576 -0.164223 0.805071 -0.593111 0.00889507
+0.5 -0.101695 0.260032 1 0 0
+0.5 -0.262895 0.0753886 1 0 0
+-0.45242 0.104644 0.320513 0 0 1
+0.5 0.0248489 -0.0513495 1 0 0
+0.5 0.222547 0.200789 1 0 0
+0.20402 0.0274368 -0.281543 0.709468 -0.704738 0
+0.139539 -0.294872 -0.0905424 0.718947 0.694814 0.0186921
+-0.5 0.0671221 0.0298155 1 0 0
+-0.0606478 -0.165381 0.320513 0 0 1
+0.5 -0.129015 -0.179171 1 0 0
+0.320657 0.191524 -0.371795 0.0850873 0.0263228 0.996026
+0.5 -0.253079 0.272248 1 0 0
+-0.0298787 -0.294872 -0.0665887 0 1 0
+0.104973 -0.021481 -0.333333 0 0 1
+0.0358924 0.371795 0.0636036 0 1 0
+-0.0469148 -0.128958 0.320513 0 0 1
+0.243637 -0.371795 -0.190603 0 1 0
+0.358674 0.294872 0.289224 0 1 0
+0.5 0.23182 -0.36516 0.993834 0.0341966 -0.105477
+0.128434 -0.24808 -0.371795 0 0 1
+0.5 -0.0332531 -0.349525 1 0 0
+-0.164191 -0.224909 -0.333333 0.013427 -0.279146 0.960155
+0.272546 0.28834 0.320513 -0.0712022 0.267209 0.961004
+0.5 0.0613333 0.142113 1 0 0
+0.448718 -0.306653 0.104971 1 0 0
+0.149987 -0.371795 0.0961264 0 1 0
+0.448718 -0.360943 0.201739 1 0 0
+0.141026 0.314407 0.104328 1 0 0
+-0.463107 -0.240362 -0.371795 0 0 1
+0.204491 -0.0279077 -0.0387036 0.660462 0.750788 0.0103354
+-0.387542 0.371795 0.178109 0 1 0
+-0.5 -0.149908 0.106157 1 0 0
+0.5 0.0128685 -0.340793 1 0 0
+0.078535 -0.241049 -0.371795 0 0 1
+0.254433 0.294872 0.157972 0 1 0
+-0.345102 0.202203 -0.371795 0 0 1
+0.231851 0.294872 -0.00567309 0 1 0
+-0.137618 0.195862 0.371795 0 0 1
+0.141109 -0.32778 0.0428589 1 0 0
+-0.141154 -0.303462 0.00110019 0.992964 -0.113706 -0.0330612
+0.115563 -0.0492915 -0.333333 0 0 1
+-0.474105 0.371795 0.115271 0 1 0
+0.5 0.264038 0.0842837 1 0 0
+0.135644 -0.294872 -0.0458064 0.333535 0.941447 0.0493095
+0.272365 -0.371795 -0.230733 0 1 0
+-0.47225 0.0721805 -0.371795 0 0 1
+-0.5 0.165215 -0.263689 1 0 0
+-0.448718 -0.29989 -0.368253 0.9105 0.203358 0.36005
+-0.5 0.284193 -0.134596 1 0 0
+-0.326109 0.371795 0.0342643 0 1 0
+-0.446061 0.0309271 0.320513 0 0 1
+-0.28505 0.371795 -0.337977 0 1 0
+0.164323 -0.371795 -0.255755 0 1 0
+0.5 0.0360696 0.201084 1 0 0
+-0.417846 -0.371795 0.295605 0 1 0
+0.424153 0.0281574 0.320513 0 0 1
+0.290054 -0.371795 -0.00500975 0 1 0
+-0.204839 0.371795 -0.331641 0 1 0
+0.141109 -0.355307 0.107721 1 0 0
+0.450661 -0.294872 -0.103747 -0.386736 0.912999 -0.129876
+-0.253993 0.224784 -0.333333 -0.0158077 0.570821 0.820923
+-0.498114 0.371795 -0.0333613 -0.563135 0.779734 -0.273666
+-0.206637 0.371795 0.263381 0 1 0
+0.5 0.0916284 0.0303815 1 0 0
+-0.237256 0.371795 -0.184649 0 1 0
+0.266245 0.294872 0.227774 0 1 0
+0.5 -0.0126695 0.291615 1 0 0
+0.5 -0.0921924 0.0910192 1 0 0
+-0.0881492 0.00343549 -0.333333 0 0 1
+-0.00682409 0.371795 -0.225607 0 1 0
+0.106767 -0.294872 -0.045368 0 1 0
+0.0934646 -0.0842971 -0.333333 0 0 1
+-0.357095 0.00532752 -0.371795 0 0 1
+-0.0472442 0.371795 -0.326664 0 1 0
+0.5 0.0454246 0.150801 1 0 0
+0.5 -0.00862686 -0.0799337 1 0 0
+0.028689 -0.120449 -0.333333 0 0 1
+-0.490485 0.0497776 0.320513 -0.030898 0.0103867 0.999469
+0.141026 0.345532 0.0369476 1 0 0
+0.5 0.112428 0.172378 1 0 0
+0.448718 -0.332192 -0.275136 1 0 0
+0.168693 -0.371795 -0.301735 0 1 0
+-0.0131019 0.193547 -0.333333 0 0 1
+0.00520405 -0.294872 -0.254322 0 1 0
+-0.283713 -0.0615643 -0.333333 0 0 1
+-0.441071 0.202284 0.320513 0 0 1
+-0.0534176 0.231432 0.371795 0 0 1
+-0.187816 -0.0072686 -0.045592 0.981688 -0.168546 0.0887702
+-0.443721 -0.371795 0.193689 0.253526 0.965895 0.0526443
+0.389241 -0.0604285 -0.371795 0 0 1
+0.194067 0.25826 -0.371795 0 0 1
+0.245886 0.294872 -0.201473 0 1 0
+0.250162 -0.218337 -0.333333 0 0 1
+-0.5 -0.229008 -0.0320289 1 0 0
+-0.196022 0.0260823 -0.14058 0.802009 0.596938 0.0211337
+0.5 0.100507 -0.119748 1 0 0
+0.311495 -0.241729 0.320513 0 0 1
+0.123386 -0.183725 0.371795 0 0 1
+-0.5 0.164961 -0.0565834 1 0 0
+-0.0499559 -0.0705018 0.320513 0 0 1
+-0.141401 0.371795 0.242368 0 1 0
+-0.294136 -0.365054 0.320513 0.0682383 -0.135149 0.988473
+0.0358285 -0.230897 -0.366661 0.0936908 0.902592 -0.420177
+-0.223912 -0.237134 0.368381 0.135764 0.695556 -0.705528
+-0.0273627 0.0907978 0.320513 0 0 1
+-0.102214 -0.294872 -0.0347024 0 1 0
+0.316903 0.176442 -0.347605 0.959192 0.282745 -0.00230031
+0.135633 -0.294872 -0.24606 0.278361 0.959556 0.0420328
+-0.204403 0.371795 0.169129 0 1 0
+-0.129538 0.185537 -0.333333 0 0 1
+-0.327886 0.15982 0.36084 0.800536 -0.599284 0
+0.00805844 0.204555 0.355816 0.00699449 0.999976 -7.83998e-005
+-0.299346 -0.190373 0.340874 0.688487 0.725213 0.00721245
+-0.5 0.124166 -0.303013 1 0 0
+-0.293927 0.0131079 -0.333333 0 0 1
+0.174064 -0.371795 -0.12958 0 1 0
+-0.5 -0.249233 -0.198755 1 0 0
+0.300097 -0.115822 0.371795 0 0 1
+0.0736906 -0.11714 -0.333333 0 0 1
+0.0935032 -0.0389352 -0.333333 0 0 1
+-0.142909 -0.371795 0.175575 -0.658059 0.752228 -0.0333225
+0.182687 -0.132582 -0.333333 0 0 1
+0.141109 -0.3391 -0.0528194 1 0 0
+0.402744 0.294872 -0.310123 0 1 0
+0.00750978 -0.204555 0.360609 -0.0104383 0.999789 0.0176888
+0.421719 0.294872 -0.334169 0 1 0
+-0.261892 0.000908434 -0.0278135 -0.515627 -0.00562598 0.856795
+0.5 -0.18546 -0.313951 1 0 0
+-0.152819 0.263013 0.320513 0.0174072 0.130267 0.991326
+-0.141154 -0.36924 0.217072 0.749323 -0.661732 0.0250287
+0.5 0.0201508 0.0911486 1 0 0
+-0.5 0.323615 -0.355467 1 0 0
+-0.0161157 0.256643 0.320513 -0.0920022 0.334046 0.938056
+-0.186324 0.150714 -0.333333 0 0 1
+0.21398 0.294872 0.0856955 0 1 0
+-0.5 -0.071814 0.229891 1 0 0
+0.250058 -0.267687 -0.371795 0 0 1
+0.5 -0.280331 0.090465 1 0 0
+0.180681 -0.358705 -0.371795 0.0209356 0.0799036 0.996583
+-0.5 0.181036 -0.332521 1 0 0
+0.5 0.17366 -0.0732507 1 0 0
+0.20216 0.294872 -0.194735 0 1 0
+0.0966576 0.0198992 0.320513 0 0 1
+0.5 0.111518 0.215754 1 0 0
+-0.0388298 -0.294872 -0.169536 0 1 0
+0.365269 -0.371795 0.265278 0 1 0
+0.5 0.213074 0.173484 1 0 0
+-0.358304 0.279203 0.320513 0 0 1
+-0.448718 -0.331461 0.320389 -0.420185 0.113572 0.900303
+0.425985 -0.12778 -0.371795 0 0 1
+-0.5 0.261485 -0.274965 1 0 0
+0.174076 -0.371795 -0.37158 0.116649 0.911742 0.393852
+0.5 -0.256593 -0.286211 1 0 0
+-0.33785 0.0319949 0.371795 0 0 1
+-0.19868 -0.371795 -0.0858228 0 1 0
+0.475427 0.294872 0.0772611 0 1 0
+-0.5 0.0789301 0.170971 1 0 0
+0.25554 0.294872 0.237125 0 1 0
+-0.341947 -0.371795 -0.163593 0 1 0
+-0.0560329 -0.0132303 0.320513 0 0 1
+0.487543 -0.294872 0.00912813 -0.0135075 0.999908 0.00131843
+0.242724 -0.228723 0.333196 -0.479249 0.877679 0
+0.345075 0.294872 0.229155 0 1 0
+-0.0618608 0.371795 -0.055312 0 1 0
+-0.200878 0.371795 0.220029 0 1 0
+0.448718 -0.363379 0.229504 0.99187 -0.125358 -0.021908
+-0.491991 0.371795 -0.0389921 -0.233341 0.971888 0.0314108
+-0.0891206 0.197652 0.371795 0 0 1
+-0.153033 -0.333339 0.320513 0 0 1
+0.00101143 0.285375 0.320513 0 0 1
+-0.479251 -0.294872 0.0174159 0 1 0
+-0.201807 -0.230897 -0.353361 0 1 0
+-0.356586 -0.00715077 -0.371795 0 0 1
+-0.329216 0.371795 -0.123525 0 1 0
+-0.230443 0.371795 0.213243 0 1 0
+-0.273817 0.00619345 -0.145161 0.984696 -0.17037 0.0367115
+-0.15542 0.133192 0.349616 0.738127 -0.674662 0
+0.0154691 0.371795 -0.0437547 0 1 0
+-0.0802766 0.371795 0.0148913 0 1 0
+0.136298 0.111911 -0.333333 0 0 1
+0.138519 0.21183 -0.333333 0 0 1
+-0.402365 -0.371795 0.0108075 0 1 0
+0.389661 0.294872 -0.070899 0 1 0
+-0.475785 0.371795 0.0750621 0 1 0
+-0.16301 0.124489 0.335902 0.806705 -0.590897 -0.00831451
+-0.197014 -0.0274997 -0.160699 0.765279 -0.643687 0.00388504
+-0.227289 0.371795 -0.0878863 0 1 0
+0.5 0.0693809 -0.134682 1 0 0
+0.384402 -0.299477 0.320513 0 0 1
+-0.5 0.0399597 -0.207403 1 0 0
+-0.5 -0.090464 -0.297856 1 0 0
+0.220675 -0.298198 0.320513 0 0 1
+-0.383723 -0.270938 -0.371795 0 0 1
+-0.198202 -0.289867 0.320513 0 0 1
+0.5 -0.13523 -0.336961 1 0 0
+0.207296 -0.174231 -0.333333 0 0 1
+0.232775 -0.232825 0.371795 0.286852 -0.571082 0.769143
+-0.135602 -0.294872 -0.278559 -0.0532506 0.998206 0.0273853
+-0.215709 0.24506 -0.371795 0 0 1
+-0.489754 0.103271 0.320513 -0.0329491 0.00873207 0.999419
+0.141109 -0.320428 -0.182661 1 0 0
+-0.485064 -0.0782301 0.320513 0 0 1
+0.101019 0.371795 -0.0489669 0 1 0
+-0.21542 0.0407553 -0.265526 0.371438 0.928446 0.00467607
+-0.238819 -0.0427988 -0.141573 0.245018 0.969473 -0.00944324
+-0.326116 0.162184 0.33228 0.795107 -0.606469 0
+-0.320535 -0.371795 0.301055 0 1 0
+-0.069968 0.371795 0.200648 0 1 0
+-0.5 -0.00791991 0.111214 1 0 0
+0.269019 -0.0024221 -0.129173 0.998528 -0.0542006 -0.00199451
+0.5 0.149328 0.300723 1 0 0
+-0.243233 -0.185764 -0.333333 0 0 1
+0.435893 0.294872 -0.316423 0 1 0
+-0.0855373 0.00511558 -0.333333 0 0 1
+-0.302055 -0.371795 0.225539 0 1 0
+0.470741 0.294872 -0.0146409 0 1 0
+0.5 -0.0583227 0.232722 1 0 0
+0.268151 -0.00852612 -0.176312 0.963223 -0.267668 -0.0235592
+-0.24577 0.371795 -0.0742256 0 1 0
+-0.41118 0.335313 -0.371795 0 0 1
+-0.286921 -0.371795 -0.047022 0 1 0
+-0.274262 -0.00110714 -0.242332 0.999971 -0.00183455 0.00733813
+-0.141154 -0.330612 -0.246829 1 0 0
+0.464749 0.294872 -0.0479166 0 1 0
+0.386332 0.127994 0.320513 0 0 1
+0.260181 0.0247733 -0.31114 0.738017 0.674768 0.00430805
+-0.344979 -0.0603109 0.371795 0 0 1
+0.322087 -0.12127 -0.371795 0.529117 -0.0522006 0.846942
+-0.221928 0.0425867 -0.227591 0.2037 0.979026 -0.00385114
+-0.367277 -0.371795 0.0998748 0 1 0
+0.141026 0.296523 0.0604622 0.866367 0.49392 -0.0738294
+-0.418051 -0.371795 0.156817 0 1 0
+-0.5 -0.0644255 0.067858 1 0 0
+0.141026 0.304734 0.0242787 1 0 0
+-0.000231963 0.371795 0.0646598 0 1 0
+-0.460711 -0.0792104 -0.371795 0 0 1
+0.472317 -0.25563 0.320513 0 0 1
+0.198276 0.294872 0.147426 0 1 0
+-0.141154 -0.323395 0.283499 1 0 0
+-0.5 0.167298 0.124767 1 0 0
+-0.466112 0.100799 0.320513 0 0 1
+0.141026 0.351871 -0.028784 1 0 0
+0.5 -0.0115087 -0.366415 0.951225 0.106828 -0.289411
+-0.5 -0.0153604 0.0631551 1 0 0
+-0.362471 0.371795 0.0367935 0 1 0
+0.0593991 -0.294872 0.00541904 0 1 0
+-0.285659 0.371795 -0.0554576 0 1 0
+0.468893 0.294872 -0.033624 0 1 0
+-0.3504 0.371795 -0.149579 0 1 0
+-0.0943236 -0.294872 -0.29507 0 1 0
+-0.0348852 -0.294872 0.126725 0 1 0
+-0.404123 -0.371795 0.249728 0 1 0
+0.174822 -0.371795 -0.200678 0 1 0
+-0.265203 -0.371795 -0.200311 0 1 0
+-0.0303654 -0.207596 0.371795 -0.00355631 0.303683 0.952767
+-0.423915 -0.0887241 -0.371795 0 0 1
+0.0809805 0.0041917 -0.333333 0 0 1
+-0.360721 -0.371795 -0.210996 0 1 0
+0.31133 0.294872 0.023139 0 1 0
+0.5 0.00903521 -0.156005 1 0 0
+-0.289303 -0.371795 -0.260878 0 1 0
+-0.269764 0.371795 -0.235131 0 1 0
+0.5 -0.237364 0.247737 1 0 0
+0.107783 0.0156645 0.320513 0 0 1
+-0.019237 0.371795 0.156133 0 1 0
+-0.306371 0.371795 0.157561 0 1 0
+0.5 -0.176117 -0.295742 1 0 0
+-0.446392 -0.203217 -0.371795 0 0 1
+0.237035 0.0379133 -0.199998 0.118623 0.992933 -0.00357269
+-0.241167 -0.371795 -0.175998 0 1 0
+0.075754 -0.190267 0.350104 -0.342534 0.939485 -0.00614377
+-0.45169 -0.236078 0.320513 0 0 1
+0.0766344 -0.0784059 0.320513 0 0 1
+0.5 -0.0496556 0.16724 1 0 0
+0.452585 0.294872 -0.318278 0 1 0
+-0.431389 0.00154258 -0.371795 0 0 1
+0.113911 0.371795 0.13044 0 1 0
+0.383652 -0.350773 0.320513 0 0 1
+-0.0254662 0.337853 -0.371795 0 0 1
+-0.193651 0.0226977 -0.151978 0.837011 0.547111 -0.00908877
+-0.5 -0.106676 0.16136 1 0 0
+-0.00148187 -0.0853438 -0.333333 0 0 1
+-0.337574 -0.0138578 0.371795 0 0 1
+-0.316098 0.179448 -0.366432 0.917143 -0.29202 -0.271244
+0.141109 -0.351496 -0.336093 1 0 0
+0.236594 -0.371795 0.179534 0 1 0
+0.20257 -0.0324208 0.36538 0.921243 -0.232903 -0.311556
+0.5 -0.20494 0.230418 1 0 0
+0.35096 -0.371795 0.0951233 0 1 0
+0.5 0.272855 -0.0711107 1 0 0
+-0.5 0.286744 -0.22037 1 0 0
+-0.0149626 -0.0341079 -0.333333 0 0 1
+-0.5 -0.0659182 -0.230281 1 0 0
+0.463906 -0.294872 0.210888 0 1 0
+-0.409483 0.334378 -0.371795 0 0 1
+0.196812 0.0178402 -0.161302 0.888161 -0.459417 0.0102402
+-0.0147923 -0.168197 -0.333333 0 0 1
+-0.271786 0.014699 -0.0444705 0.94601 -0.324114 0.00382242
+0.5 -0.149415 -0.0867802 1 0 0
+-0.0799183 -0.256282 0.321948 -0.0362751 -0.572048 0.819418
+-0.266855 -0.024171 -0.181692 0.833457 0.551617 -0.0326894
+-0.396412 -0.306351 0.320513 0 0 1
+0.326426 0.294872 -0.154897 0 1 0
+0.5 -0.178236 0.280945 1 0 0
+0.5 -0.205423 0.00818696 1 0 0
+-0.205843 0.235734 -0.371795 -0.131039 0.318874 0.938695
+0.103853 -0.164699 0.320513 -0.0155765 0.0838041 0.996361
+0.5 0.0553898 -0.126698 1 0 0
+-0.203305 -0.371795 -0.0727576 0 1 0
+0.380687 -0.249474 0.320513 0 0 1
+-0.459593 0.0839223 -0.371795 0 0 1
+-0.35257 -0.371795 -0.214588 0 1 0
+-0.5 -0.290731 0.20953 0.820684 0.567908 0.0629124
+-0.5 0.295477 0.292442 1 0 0
+-0.0952767 -0.294872 0.213901 0 1 0
+-0.385294 0.371795 0.206516 0 1 0
+-0.5 0.143191 -0.210593 1 0 0
+-0.5 0.347177 -0.216861 1 0 0
+-0.24039 0.0775677 -0.333333 0 0 1
+0.141109 -0.307227 -0.224211 1 0 0
+0.0669515 -0.256282 0.370665 0.133568 0.859096 -0.494079
+0.364769 -0.371795 0.226205 0 1 0
+-0.18664 -0.371795 0.160265 0 1 0
+-0.147542 -0.0401747 -0.333333 0 0 1
+0.165033 0.294872 0.185543 0 1 0
+0.254707 0.294872 -0.0488413 0 1 0
+0.262725 0.22818 -0.369537 0.352291 0.729539 0.586229
+-0.5 -0.227378 0.0642912 1 0 0
+-0.363899 -0.371795 0.12627 0 1 0
+-0.467477 0.0500924 -0.371795 0 0 1
+-0.132821 -0.276819 0.320513 0 0 1
+0.189947 -0.0761938 0.34871 0.915783 -0.401674 0
+0.274098 0.2243 -0.369876 0.296894 0.755903 0.583493
+0.320379 -0.155506 -0.345816 0.997182 -0.0750111 0.0011638
+-0.201413 -0.0320548 -0.136943 -0.686338 0.727252 0.00665581
+0.5 -0.236778 -0.295149 1 0 0
+-0.22478 -0.217787 -0.333333 0 0 1
+0.273605 -0.0745814 -0.333333 0 0 1
+0.296635 -0.22072 0.320513 0 0 1
+-0.0658147 0.371795 -0.0839064 0 1 0
+0.5 0.126579 -0.00710705 1 0 0
+0.42707 -0.218365 0.320513 0 0 1
+-0.0572218 0.371795 -0.106336 0 1 0
+0.225753 -0.371795 -0.363738 0.00745555 0.996281 0.0858454
+-0.0085984 0.310448 -0.371795 0 0 1
+-0.403598 -0.365047 -0.371795 0.0451493 0.109725 0.992936
+-0.208743 -0.371795 0.123987 0 1 0
+-0.160005 -0.299448 0.320513 0 0 1
+-0.368786 -0.0565044 0.371795 -0.0539152 -0.0524386 0.997168
+0.0304558 -0.294872 -0.170659 0 1 0
+-0.477289 0.204592 -0.371795 0 0 1
+0.278434 0.079803 0.371795 0 0 1
+0.0636653 0.371795 -0.140934 0 1 0
+0.322239 0.294872 0.164213 0 1 0
+-0.186016 -0.371795 -0.200853 0 1 0
+-0.283304 -0.228666 -0.371795 -0.053145 -0.151704 0.986996
+-0.488501 -0.294872 -0.346595 0.0840666 0.995979 0.0309465
+-0.0138401 0.371795 0.10009 0 1 0
+0.257163 -0.371795 -0.236806 0 1 0
+0.166827 0.24815 0.371795 0.0518453 0.392436 0.918317
+-0.5 -0.126136 -0.272973 1 0 0
+-0.448718 -0.296898 0.0072864 0.803188 0.590379 0.0796296
+0.0647217 -0.00841581 -0.333333 0 0 1
+-0.5 -0.010451 -0.00446271 1 0 0
+-0.00081347 -0.204555 0.355294 0 1 0
+-0.0289312 0.371795 -0.081817 0 1 0
+-0.0185157 0.247055 0.371795 -0.0243373 0.119025 0.992593
+-0.5 -0.0612393 -0.0237398 1 0 0
+-0.36287 -0.371795 -0.0323617 0 1 0
+-0.5 -0.0622512 -0.205777 1 0 0
+-0.0556347 -0.294872 0.0261787 0 1 0
+0.5 -0.103048 0.236227 1 0 0
+0.5 -0.19556 -0.103156 1 0 0
+0.057592 -0.139305 0.320513 0 0 1
+-0.0741702 -0.115207 -0.333333 0 0 1
+-0.0759248 0.191568 -0.333333 0 0 1
+-0.5 0.128318 0.160222 1 0 0
+0.141109 -0.312033 -0.237046 1 0 0
+-0.5 -0.132157 0.271143 1 0 0
+-0.220641 -0.110132 -0.333333 0 0 1
+-0.412582 -0.0167192 -0.371795 0 0 1
+0.366824 -0.371795 -0.20027 0 1 0
+-0.5 0.0118696 0.059857 1 0 0
+0.319104 0.149457 0.371795 0 0 1
+-0.307855 0.227979 -0.371795 0 0 1
+0.303224 -0.371795 -0.104753 0 1 0
+0.474288 0.294872 0.283838 0 1 0
+-0.19209 -0.0198021 -0.274752 0.895157 -0.445702 -0.00654348
+-0.2501 -0.371795 -0.129261 0 1 0
+-0.5 -0.139051 0.216787 1 0 0
+0.5 0.00296109 0.290878 1 0 0
+0.162384 0.196898 -0.333333 0 0 1
+-0.392995 0.188702 -0.371795 0 0 1
+0.179055 0.0991404 0.320513 -0.573354 -0.244973 0.781827
+-0.0760373 -0.294872 -0.209735 0 1 0
+0.141109 -0.364902 -0.259981 0.994096 0.103633 -0.0321568
+-0.5 0.253913 -0.193566 1 0 0
+0.140065 -0.294872 0.265532 0.544499 0.835637 0.0723333
+0.46847 -0.112447 -0.371795 0 0 1
+0.442324 0.215672 -0.371795 0 0 1
+-0.5 0.317893 -0.30775 1 0 0
+-0.5 -0.224179 0.123467 1 0 0
+0.471826 0.294872 0.180832 0 1 0
+0.0892212 0.371795 -0.285033 0 1 0
+-0.15424 -0.348879 -0.371795 0 0 1
+0.156938 0.294872 0.0693213 0 1 0
+0.363902 0.172666 -0.371795 0 0 1
+-0.270706 0.0171037 -0.316221 0.920949 -0.389599 0.00810281
+-0.154436 0.226764 -0.333333 -0.125614 0.353121 0.927107
+-0.330771 0.371795 0.300992 0 1 0
+0.5 0.0893191 0.168854 1 0 0
+0.0661982 -0.269526 -0.371795 0 0 1
+0.314561 -0.163594 0.371795 0 0 1
+0.264729 -0.371795 -0.0615848 0 1 0
+-0.289342 -0.371795 0.135747 0 1 0
+0.44249 0.269558 -0.371795 0 0 1
+0.203696 -0.371795 -0.209211 0 1 0
+-0.431133 0.371795 -0.214299 0 1 0
+-0.5 -0.120725 -0.36496 0.968339 0.0381458 0.246708
+-0.5 -0.2239 -0.019814 1 0 0
+-0.0150643 -0.198082 0.320513 0.147116 0.21164 0.966212
+-0.0946635 -0.256282 0.364677 -0.00457561 0.983712 -0.179691
+0.407547 0.256308 -0.371795 0 0 1
+-0.0840529 -0.294872 -0.16884 0 1 0
+0.327667 -0.371795 0.262357 0 1 0
+0.306715 -0.301926 -0.371795 0 0 1
+-0.0431798 0.00490592 -0.333333 0 0 1
+0.276612 -0.371795 0.039177 0 1 0
+0.253726 0.0545019 -0.333333 0 0 1
+-0.0233093 0.371795 0.18077 0 1 0
+-0.261616 -0.270265 0.320513 0 0 1
+-0.435962 -0.371795 -0.291105 0.078937 0.994878 -0.0631374
+-0.375787 0.371795 0.204662 0 1 0
+-0.377466 -0.27605 -0.371795 0 0 1
+-0.0452768 0.371795 0.239515 0 1 0
+0.108488 0.371795 -0.241706 0 1 0
+0.5 0.264799 0.318118 0.920279 -0.0159385 0.390938
+0.448718 -0.344956 -0.101912 1 0 0
+0.5 0.211467 -0.0674981 1 0 0
+0.418036 -0.136489 -0.371795 0 0 1
+-0.301817 0.371795 0.0442053 0 1 0
+0.383741 0.294872 0.134351 0 1 0
+0.382576 -0.309313 0.320513 0 0 1
+-0.5 -0.0703542 -0.244056 1 0 0
+-0.435525 0.281008 0.320513 0 0 1
+0.184121 0.294872 -0.170371 0 1 0
+-0.00609626 -0.132395 0.320513 0 0 1
+0.13477 -0.230897 -0.356446 0 1 0
+-0.5 -0.0730058 0.252699 1 0 0
+0.0485291 -0.084215 -0.333333 0 0 1
+-0.157668 0.371795 -0.0455025 0 1 0
+-0.409851 -0.371795 0.303003 0 1 0
+0.489468 0.294872 -0.0374643 0 1 0
+0.141026 0.303614 -0.336673 0.999883 0.0151096 0.00245456
+0.332798 0.237442 0.320513 0 0 1
+0.254305 -0.371795 0.259346 0 1 0
+-0.496249 0.0655819 0.320513 -0.463996 0.301737 0.832864
+0.5 0.0398152 -0.203745 1 0 0
+-0.448534 0.0245006 -0.371795 0 0 1
+-0.5 0.129672 -0.127015 1 0 0
+0.427771 0.294872 -0.0930147 0 1 0
+-0.315226 -0.371795 -0.190296 0 1 0
+-0.0592629 0.0141504 0.320513 0 0 1
+-0.184131 -0.188119 -0.333333 0 0 1
+0.141026 0.339645 0.120802 1 0 0
+-0.5 0.121194 -0.085447 1 0 0
+0.187927 -0.154347 0.371795 0 0 1
+0.5 0.170612 0.262617 1 0 0
+-0.454561 -0.294872 0.284489 0.11854 0.99264 0.0247628
+-0.163674 -0.191287 -0.333333 0 0 1
+0.141109 -0.368112 -0.260741 0.925748 0.374171 0.0546411
+-0.337454 0.201178 0.320513 0 0 1
+0.462439 -0.294872 -0.286852 0 1 0
+-0.5 0.117317 -0.216601 1 0 0
+0.0571689 -0.256282 0.356923 0 1 0
+-0.368203 -0.264259 -0.371795 0 0 1
+-0.0929839 0.371795 0.0978341 0 1 0
+0.278608 0.294872 0.265757 0 1 0
+-0.141154 -0.317428 -0.077956 1 0 0
+0.141109 -0.366231 -0.362981 0.975067 0.154953 0.158849
+0.274935 0.294872 0.246049 0 1 0
+0.250506 0.294872 -0.0606502 0 1 0
+-0.175829 -0.27254 -0.371795 0 0 1
+0.5 -0.126334 0.0244912 1 0 0
+-0.5 -0.122999 -0.104079 1 0 0
+-0.215281 0.114958 0.371795 0 0 1
+-0.5 0.30088 -0.340829 1 0 0
+-0.5 0.199332 -0.311281 1 0 0
+-0.209285 -0.371795 -0.09157 0 1 0
+0.0562346 -0.230897 -0.358298 0 1 0
+-0.0439954 0.371795 0.011285 0 1 0
+-0.0678873 0.138049 0.320513 0 0 1
+-0.46673 -0.294872 0.294508 0 1 0
+0.390765 -0.0475552 0.320513 0 0 1
+0.5 0.149195 0.195465 1 0 0
+0.182778 -0.371795 0.0851581 0 1 0
+0.263416 -0.217425 0.338958 -0.507254 0.861781 -0.00522369
+0.5 -0.25577 0.316172 0.792025 -0.00811388 0.610435
+0.313554 -0.148943 0.371795 0 0 1
+-0.5 0.211452 -0.156217 1 0 0
+-0.015652 -0.127395 -0.333333 0 0 1
+0.38305 0.0200915 0.346322 0.99745 0.0713641 -2.19251e-005
+0.130404 0.256125 0.371549 0.0927816 0.717179 0.690685
+0.194231 0.294872 0.143625 0 1 0
+0.5 -0.162079 0.0249064 1 0 0
+0.249477 0.294872 0.161668 0 1 0
+-0.261694 -0.371795 -0.181339 0 1 0
+-0.0154084 0.371795 -0.359062 0 1 0
+-0.0358556 0.0242732 -0.333333 0 0 1
+0.424843 -0.371795 -0.175259 0 1 0
+0.182648 0.216527 0.371795 0 0 1
+-0.484721 -0.294872 0.280883 0 1 0
+-0.448718 -0.348873 0.0567859 1 0 0
+0.351291 0.294872 -0.0610815 0 1 0
+-0.193124 0.212373 -0.333333 0 0 1
+0.27275 0.246835 -0.371795 0 0 1
+0.295602 0.294872 -0.132146 0 1 0
+-0.5 0.259622 -0.121135 1 0 0
+0.5 -0.074904 -0.33837 1 0 0
+-0.496011 -0.294872 -0.340361 0.525654 0.81317 0.249884
+0.0638654 -0.294872 0.275921 0 1 0
+-0.476053 0.0987504 -0.371795 0 0 1
+0.187507 -0.332882 -0.371795 0 0 1
+0.153068 -0.197798 0.371795 0 0 1
+-0.5 0.191506 0.197924 1 0 0
+-0.101425 -0.294872 0.150704 0 1 0
+-0.228667 0.199557 -0.333333 0 0 1
+0.0681834 0.337968 -0.371795 0 0 1
+-0.0303108 -0.219034 -0.333333 0 0 1
+0.29259 0.151726 0.371795 0 0 1
+0.141026 0.365742 0.296469 0.956537 0.282641 -0.0717639
+-0.283001 -0.263042 0.320513 0 0 1
+0.426101 0.294872 0.0240921 0 1 0
+0.5 0.261416 -0.0507763 1 0 0
+0.0288946 0.232839 0.371795 0 0 1
+-0.0865349 -0.185758 0.346262 0.452876 0.891559 0.00501805
+0.0499619 0.300532 0.320513 0 0 1
+0.417421 -0.177152 0.320513 0 0 1
+0.5 -0.149865 0.0766648 1 0 0
+-0.5 0.18906 0.115312 1 0 0
+0.141109 -0.306147 0.169509 1 0 0
+0.5 -0.00629923 -0.17322 1 0 0
+0.319131 -0.0895251 0.371795 0 0 1
+-0.5 0.142939 0.0430506 1 0 0
+-0.135608 0.371795 -0.259665 0 1 0
+0.377645 0.124511 -0.371795 0 0 1
+0.148753 0.230897 -0.335227 -0.174885 0.933313 0.313596
+-0.255811 0.229828 -0.340153 -0.162564 0.957247 0.239272
+0.5 0.234147 0.108921 1 0 0
+0.141026 0.332061 0.131511 1 0 0
+0.5 -0.257928 0.0194099 1 0 0
+-0.141154 -0.367515 -0.325441 0.891099 -0.442022 -0.102752
+0.364125 -0.371795 0.0937766 0 1 0
+-0.108892 -0.294872 0.20881 0 1 0
+-0.382913 0.371795 0.263891 0 1 0
+-0.337575 0.190456 0.320513 0 0 1
+-0.148275 -0.371795 -0.305839 -0.275413 0.955977 0.101271
+0.5 0.0642434 -0.26559 1 0 0
+0.243661 0.0362125 -0.187071 0.340242 0.940287 0.00984227
+-0.5 -0.185178 0.0536229 1 0 0
+0.253216 0.183062 0.371795 0 0 1
+-0.192037 0.273081 -0.371795 0 0 1
+0.5 0.270023 -0.209892 1 0 0
+0.146615 -0.371795 -0.325618 0.123257 0.990238 -0.0650811
+0.141109 -0.310228 0.281657 1 0 0
+0.326731 0.287729 0.320513 0.0658788 0.144661 0.987286
+0.115549 0.371795 -0.295211 0 1 0
+0.287869 0.213483 -0.333333 0.356222 0.746035 0.562616
+0.371318 -0.371795 -0.0637779 0 1 0
+0.5 0.144184 -0.266377 1 0 0
+-0.295932 0.350124 -0.371795 0 0 1
+-0.491778 -0.294872 -0.216888 0.0527805 0.998263 -0.0261684
+-0.245047 0.04113 -0.156985 -0.32886 0.944283 -0.013466
+0.0685619 -0.221678 0.371795 0 0 1
+-0.180979 0.306562 -0.371795 0 0 1
+-0.5 -0.22798 0.293878 1 0 0
+-0.27812 -0.371795 0.217065 0 1 0
+-0.458223 0.371795 0.0252702 0 1 0
+0.0358582 0.2014 0.365345 0.131743 0.964818 -0.227529
+-0.141154 -0.313545 0.0768097 1 0 0
+0.126256 0.371795 -0.249318 0 1 0
+-0.265884 0.305857 0.320513 0 0 1
+0.5 -0.0277878 0.255668 1 0 0
+0.141026 0.327865 0.101715 1 0 0
+-0.0801146 0.371795 -0.361046 0.0268847 0.994758 -0.0986568
+-0.13731 -0.255631 0.329522 0.0684623 0.985209 -0.157089
+0.0266145 0.0153977 0.320513 0 0 1
+-0.5 0.150494 -0.352463 1 0 0
+-0.0402496 -0.0898195 -0.333333 0 0 1
+0.176977 -0.100991 -0.333333 0 0 1
+-0.5 -0.234595 0.296912 1 0 0
+-0.320513 -0.0976324 -0.359875 1 0 0
+-0.178538 -0.371795 0.158716 0 1 0
+0.28667 0.0718787 -0.333333 0 0 1
+0.125361 0.304299 -0.371795 0 0 1
+-0.5 0.360873 0.0505591 1 0 0
+-0.0948123 0.123099 0.320513 0 0 1
+0.42917 0.00156567 0.320513 0 0 1
+-0.5 0.339095 -0.368953 0.905351 -0.197263 0.376068
+0.17028 -0.371795 0.0529716 0 1 0
+0.347093 0.262666 -0.371795 0 0 1
+0.5 -0.120362 0.194809 1 0 0
+-0.362116 -0.371795 0.00130498 0 1 0
+-0.5 0.370082 0.132808 -0.631833 0.772504 0.063435
+-0.427015 -0.371795 0.197514 0 1 0
+0.467721 -0.294872 0.310506 0 1 0
+-0.0194696 0.371795 0.0374711 0 1 0
+-0.141154 -0.323292 0.190662 1 0 0
+0.473485 -0.27899 -0.371795 0 0 1
+-0.5 0.0610782 0.0533725 1 0 0
+-0.5 -0.164918 -0.364253 0.993264 0.0624782 0.0975817
+-0.5 -0.182276 -0.297561 1 0 0
+-0.26301 -0.02917 -0.272299 0.744592 0.667517 -0.00179622
+0.21513 0.294872 0.11642 0 1 0
+-0.5 -0.104451 -0.0305293 1 0 0
+0.5 -0.193876 -0.0883411 1 0 0
+-0.250882 0.367289 0.320513 -0.017267 0.324591 0.945697
+-0.32208 -0.0533401 -0.371795 -0.553356 -0.0945339 0.827563
+0.298925 -0.0786398 -0.333333 0 0 1
+0.459982 0.294872 0.158804 0 1 0
+0.5 -0.0758421 0.111299 1 0 0
+-0.312474 0.371795 0.00371926 0 1 0
+-0.5 0.116937 -0.291372 1 0 0
+-0.5 -0.191311 -0.208079 1 0 0
+0.00598601 0.230897 -0.363584 -0.0883295 0.981658 0.168954
+0.461747 0.0149393 -0.371795 0 0 1
+0.454931 -0.294872 0.214451 -0.274093 0.954806 -0.114967
+-0.218793 0.0395565 -0.0339804 0.170189 0.611919 0.772393
+0.186579 0.211585 0.371795 0 0 1
+0.5 -0.0850727 0.00976701 1 0 0
+0.489495 0.294872 0.0835243 0.0390333 0.999193 -0.00947288
+0.368408 0.267062 0.320513 0 0 1
+-0.5 -0.0347599 0.247032 1 0 0
+0.492129 0.294872 -0.0718011 0.15257 0.988076 -0.0207004
+0.5 -0.0553506 0.108848 1 0 0
+-0.40322 0.195873 0.320513 0 0 1
+0.5 -0.279792 -0.348755 1 0 0
+0.137497 0.371795 0.27452 0.499199 0.850874 -0.163746
+0.152361 -0.371795 0.0823992 0 1 0
+-0.479094 -0.246459 0.320513 0 0 1
+-0.419406 -0.341736 0.320513 0 0 1
+0.354381 0.294872 0.0193547 0 1 0
+-0.5 0.243607 0.224425 1 0 0
+-0.5 -0.199502 0.0882797 1 0 0
+0.0636148 -0.294872 0.232193 0 1 0
+0.5 -0.0983112 -0.333228 1 0 0
+-0.141154 -0.363279 -0.0863046 0.997873 -0.0590422 -0.0276455
+0.5 0.0201618 0.0106243 1 0 0
+-0.0127224 0.371795 -0.0504003 0 1 0
+-0.0461167 0.199689 0.328616 -0.196669 0.977572 -0.0753287
+-0.0575908 0.371795 0.0576671 0 1 0
+0.207151 -0.371795 0.227896 0 1 0
+0.5 -0.130716 -0.180037 1 0 0
+0.0308722 0.371795 -0.283626 0 1 0
+-0.5 0.356403 0.225447 1 0 0
+0.141026 0.329569 0.192937 1 0 0
+-0.239987 0.131205 -0.333333 0 0 1
+0.109158 0.216973 0.371795 0 0 1
+-0.318398 0.371795 -0.213326 0 1 0
+-0.5 0.323533 -0.0115685 1 0 0
+-0.468872 -0.294872 0.0363941 0 1 0
+-0.20487 0.316597 -0.371795 0 0 1
+0.114292 -0.104467 -0.333333 0 0 1
+0.5 0.139815 0.152661 1 0 0
+0.141026 0.366049 -0.213981 0.833818 0.551347 0.027636
+-0.16934 0.371795 -0.0833497 0 1 0
+0.0445806 0.269923 0.320513 0 0 1
+0.5 0.148235 0.080202 1 0 0
+0.343598 -0.132552 0.371795 0.605416 0.00334144 0.795902
+0.431451 -0.371795 -0.113239 0 1 0
+-0.44051 -0.235929 -0.371795 0 0 1
+-0.0596311 -0.256282 0.368971 -0.0967092 0.738481 -0.667303
+-0.448718 -0.340301 0.0341351 1 0 0
+0.5 0.219226 -0.137077 1 0 0
+-0.448718 -0.305202 -0.317621 1 0 0
+0.448718 -0.321038 -0.0476787 1 0 0
+-0.219102 -0.0418295 -0.179148 -0.294904 0.955478 -0.00961181
+-0.133927 -0.294872 0.315387 -0.103933 0.927634 -0.358739
+0.0509505 -0.276477 0.320513 0 0 1
+-0.0648721 -0.0483551 0.320513 0 0 1
+-0.497499 -0.294872 0.282573 0.42479 0.894842 0.137156
+-0.203713 -0.371795 -0.0667712 0 1 0
+-0.206645 -0.287939 0.320513 0 0 1
+0.266903 -0.0131715 -0.264412 0.96039 -0.278623 0.00442473
+0.5 -0.00431366 0.255353 1 0 0
+0.0431847 0.123053 -0.333333 0 0 1
+-0.0336979 0.371795 -0.190139 0 1 0
+0.36102 -0.237253 0.320513 0 0 1
+0.5 -0.25238 -0.0236505 1 0 0
+0.5 0.0623469 0.231692 1 0 0
+0.136049 0.371795 0.222276 0.401916 0.913149 0.0679934
+-0.5 0.270554 -0.200934 1 0 0
+0.204516 0.294872 -0.234972 0 1 0
+-0.5 0.0942074 0.107158 1 0 0
+-0.5 0.0700175 -0.367359 0.92459 -0.0597849 0.376243
+-0.5 0.156774 -0.158839 1 0 0
+0.336355 -0.371795 0.0345574 0 1 0
+0.5 0.189529 0.0652304 1 0 0
+-0.226017 -0.371795 0.151497 0 1 0
+-0.5 -0.0768285 -0.291217 1 0 0
+-0.288029 0.216406 -0.355608 -0.598635 0.801015 0.00331168
+0.0025255 -0.221322 -0.333333 0.0401377 -0.135494 0.989965
+-0.172397 -0.0225974 -0.333333 0 0 1
+-0.5 0.167882 -0.206548 1 0 0
+-0.343679 -0.371795 0.173971 0 1 0
+-0.440456 -0.371795 0.0693315 0.19932 0.979819 0.0150619
+-0.181112 -0.099805 -0.333333 0 0 1
+0.287643 -0.363082 0.320513 0.0194501 -0.0853505 0.996161
+0.399161 -0.263722 -0.371795 0 0 1
+-0.5 -0.118156 -0.0671231 1 0 0
+0.298577 0.294872 0.0336227 0 1 0
+-0.375734 0.342253 0.320513 0 0 1
+-0.0688287 -0.294872 0.103519 0 1 0
+0.5 0.033249 -0.358012 1 0 0
+0.391562 -0.371795 0.261436 0 1 0
+0.068627 0.371795 -0.157781 0 1 0
+0.5 -0.29081 -0.319094 0.864211 -0.490932 -0.110116
+-0.367677 -0.295729 0.320513 0 0 1
+0.0361198 0.371795 -0.173092 0 1 0
+0.325363 -0.141288 -0.371795 0.329294 -0.0370048 0.943502
+0.0629024 -0.294872 0.253553 0 1 0
+0.492435 0.294872 0.0651894 0.116755 0.992781 0.0274602
+0.0472166 -0.0606489 0.320513 0 0 1
+-0.00240631 0.256282 0.361644 -0.00249368 0.999759 0.0217906
+0.109274 -0.203412 0.371795 0 0 1
+-0.316629 0.371795 0.0989458 0 1 0
+0.493438 -0.294872 0.129229 -0.227074 0.973845 -0.00791707
+-0.295797 0.210139 -0.363014 -0.665244 0.745061 0.0483163
+-0.5 0.302686 -0.162078 1 0 0
+-0.365143 -0.254445 -0.371795 0 0 1
+-0.303399 0.371795 -0.248515 0 1 0
+0.5 0.0209055 0.180511 1 0 0
+0.0875814 -0.230897 -0.346235 0 1 0
+0.015321 -0.15717 0.320513 0 0 1
+-0.103264 -0.256282 0.357617 0 1 0
+0.324584 0.136778 -0.371795 0.33343 0.0382702 0.941998
+-0.5 -0.268234 0.2878 1 0 0
+-0.42405 0.105553 -0.371795 0 0 1
+-0.215235 0.0406692 -0.308368 0.361349 0.932353 0.0120005
+-0.5 0.277589 0.0506635 1 0 0
+-0.368665 -0.171097 -0.371795 0 0 1
+0.5 -0.247107 -0.245815 1 0 0
+0.449102 0.294872 0.288842 0 1 0
+-0.206466 0.0359938 -0.0363879 0.537296 0.755194 0.375493
+-0.260161 0.356698 -0.371795 0 0 1
+0.267788 -0.371795 0.017793 0 1 0
+-0.0698496 0.371795 -0.0398971 0 1 0
+-0.5 -0.225102 -0.370562 0.642596 -0.0451833 0.764872
+-0.120802 -0.0422764 -0.333333 0 0 1
+-0.173801 -0.186793 -0.333333 0 0 1
+0.5 0.108623 0.0766694 1 0 0
+0.5 -0.196231 0.120473 1 0 0
+-0.32542 -0.371795 -0.152046 0 1 0
+0.141026 0.325753 -0.136688 1 0 0
+0.100991 0.218396 -0.333333 0 0 1
+0.377607 0.294872 0.0565542 0 1 0
+-0.0622335 -0.294872 0.246088 0 1 0
+-0.5 0.172845 -0.295921 1 0 0
+-0.117386 -0.294872 0.11267 0 1 0
+0.5 -0.0538757 -0.303403 1 0 0
+0.0912208 -0.275447 0.320513 0 0 1
+-0.311217 -0.371795 0.154502 0 1 0
+0.357156 -0.0620923 -0.371795 0 0 1
+-0.244903 0.371795 -0.104146 0 1 0
+-0.218171 0.371795 0.192566 0 1 0
+-0.0616207 0.215795 0.371795 0 0 1
+-0.280973 -0.371795 0.0127448 0 1 0
+0.3787 -0.154583 0.320513 0 0 1
+-0.138443 -0.128818 -0.333333 0 0 1
+-0.333492 0.130448 0.371795 0 0 1
+-0.0879477 0.371795 -0.287025 0 1 0
+0.353794 -0.162106 -0.371795 0 0 1
+0.264211 -0.211227 0.371795 0.0697497 -0.109105 0.99158
+-0.348215 0.371795 0.00246742 0 1 0
+0.23326 -0.238355 -0.371795 0.0541989 -0.248896 0.967013
+0.266022 0.227297 -0.340517 0.282395 0.952892 0.110683
+0.469961 0.119169 -0.371795 0 0 1
+0.5 -0.205409 -0.0842955 1 0 0
+0.124695 0.371795 0.100733 0 1 0
+0.5 0.116455 -0.24526 1 0 0
+0.377604 0.0561216 0.341443 0.977142 0.21259 0
+-0.00461789 -0.294872 -0.0771843 0 1 0
+-0.115545 -0.13059 -0.333333 0 0 1
+-0.5 0.141112 0.184139 1 0 0
+0.323982 -0.178598 -0.371795 0.0167685 -0.00547345 0.999844
+-0.314083 -0.175636 0.360132 0.727996 0.680456 -0.083674
+-0.36907 0.176497 0.320513 0 0 1
+-0.486937 0.229061 -0.371795 0 0 1
+0.0712663 0.371795 0.0243567 0 1 0
+-0.456048 -0.294872 -0.100744 0.275056 0.95805 0.0805227
+0.169131 0.294872 0.171417 0 1 0
+0.16813 -0.344145 -0.371795 0 0 1
+0.246074 0.294872 -0.23437 0 1 0
+-0.226264 -0.371795 0.258513 0 1 0
+-0.285597 0.3442 -0.371795 0 0 1
+-0.448718 -0.307375 0.242397 1 0 0
+0.481611 0.151448 -0.371795 0 0 1
+-0.0537918 0.154018 -0.333333 0 0 1
+-0.5 -0.0895364 -0.0704146 1 0 0
+-0.0430979 -0.113313 -0.333333 0 0 1
+-0.5 0.369407 0.259907 0.930405 -0.365807 -0.0230671
+-0.332455 0.240169 0.320513 0 0 1
+0.203485 0.0269013 -0.206873 0.728302 -0.684809 -0.0247686
+-0.5 0.214518 0.0956857 1 0 0
+0.5 -0.131589 0.0664802 1 0 0
+-0.264639 0.0544454 -0.333333 0 0 1
+0.270644 0.048662 -0.333333 0 0 1
+0.0898027 0.183989 0.353657 0.475929 0.879484 0
+-0.325215 0.23861 -0.371795 0 0 1
+0.0255894 0.371795 -0.330045 0 1 0
+0.0580017 0.256282 0.371717 -0.0608855 0.586755 0.807472
+-0.035909 0.296738 0.320513 0 0 1
+0.5 0.0323639 -0.28013 1 0 0
+0.141109 -0.346584 -0.286194 1 0 0
+0.448718 -0.295214 -0.317146 0.898049 -0.438964 -0.0285948
+-0.416552 -0.229003 0.320513 0 0 1
+0.185937 0.159193 0.371795 0 0 1
+-0.0663103 0.371795 -0.0559161 0 1 0
+-0.206456 0.309675 0.320513 0 0 1
+0.5 -0.0269032 -0.346582 1 0 0
+0.5 0.240787 0.0750919 1 0 0
+-0.320513 -0.0782381 -0.360859 0.998981 -0.0129024 -0.0432447
+0.5 -0.169145 -0.252531 1 0 0
+0.235534 -0.371795 0.153987 0 1 0
+0.161034 0.294872 0.237357 0 1 0
+-0.5 0.127878 0.262163 1 0 0
+-0.0946437 -0.156454 -0.333333 0 0 1
+0.216102 -0.342793 0.320513 0 0 1
+0.17168 -0.25215 0.320832 -0.222358 0.768712 -0.599699
+-0.371393 0.371795 0.284417 0 1 0
+0.263596 0.135288 -0.333333 0 0 1
+-0.24633 -0.0207289 0.371795 0 0 1
+-0.204508 -0.371795 -0.200345 0 1 0
+0.131863 0.0915899 -0.333333 0 0 1
+0.209421 0.0318263 -0.0237442 -0.567227 0.823544 0.00530708
+0.104521 0.36747 0.320513 -0.059829 0.195443 0.978888
+-0.266121 -0.0252203 -0.278608 0.82053 0.571476 -0.012053
+-0.398644 0.371795 -0.117219 0 1 0
+-0.272187 0.194774 -0.333333 0 0 1
+-0.5 -0.274879 -0.0282927 1 0 0
+-0.391627 0.306227 -0.371795 0 0 1
+-0.148112 0.371795 0.127574 0 1 0
+-0.0845215 0.371795 -0.108476 0 1 0
+-0.356603 0.371795 -0.12774 0 1 0
+0.0108403 0.326625 -0.371795 0 0 1
+0.349022 -0.371795 0.271278 0 1 0
+0.135263 0.371795 -0.367335 0.143957 0.945007 -0.293662
+-0.19925 -0.0463199 0.320513 0.828344 0.164767 0.535443
+-0.239034 -0.0427411 -0.0416253 0.149914 0.986043 -0.0724202
+-0.235241 -0.371795 -0.0755984 0 1 0
+0.5 0.281133 0.31537 0.863137 0.174011 0.474042
+-0.5 0.114774 0.186892 1 0 0
+0.372222 -0.371795 -0.0333528 0 1 0
+-0.129437 0.0600244 -0.333333 0 0 1
+-0.330809 -0.114618 0.371795 0 0 1
+-0.153867 -0.332521 -0.371795 0 0 1
+-0.5 0.0340149 -0.109175 1 0 0
+-0.244852 0.230787 -0.336641 -0.143812 0.849974 0.506815
+-0.114428 -0.190679 0.371795 0 0 1
+-0.497999 0.371795 -0.0647784 -0.50738 0.857711 -0.0830491
+0.224925 0.236756 0.365671 0.418388 0.874307 0.246046
+0.47734 0.236945 -0.371795 0 0 1
+-0.156071 0.371795 -0.227293 0 1 0
+-0.5 0.310004 0.187368 1 0 0
+-0.370292 0.0430494 0.371795 -0.0522377 0.0222844 0.998386
+0.103074 0.371795 0.179064 0 1 0
+0.141109 -0.324765 -0.123299 1 0 0
+-0.197556 0.371795 0.101484 0 1 0
+0.188102 0.29124 0.320513 -0.0897201 0.332928 0.938674
+0.0848025 -0.141295 0.320513 0 0 1
+0.368824 0.294872 -0.118789 0 1 0
+-0.377921 0.197219 0.320513 0 0 1
+-0.448718 -0.322395 -0.322835 1 0 0
+0.295592 -0.210344 -0.341517 -0.660416 0.73613 -0.1482
+0.5 -0.268975 0.0743744 1 0 0
+0.141109 -0.363432 0.156979 0.997114 0.0645974 0.039896
+0.22486 -0.371795 0.226237 0 1 0
+0.5 0.271627 -0.227893 1 0 0
+0.5 0.0541655 0.213598 1 0 0
+-0.451466 -0.294872 0.112959 0.73515 0.671595 -0.0922785
+0.493269 -0.294872 -0.368968 -0.217302 0.799469 0.560026
+-0.5 0.165664 0.116805 1 0 0
+0.227575 -0.038182 -0.081487 0.102342 0.99472 0.00766479
+0.5 0.249945 -0.304285 1 0 0
+0.448718 -0.336792 0.0337028 1 0 0
+0.5 0.279565 0.119531 1 0 0
+0.5 -0.0445551 -0.0832114 1 0 0
+0.437543 -0.371795 0.201149 0 1 0
+-0.433556 -0.371795 -0.161922 0 1 0
+-0.141154 -0.336238 0.17988 1 0 0
+-0.5 0.162767 -0.125112 1 0 0
+-0.189581 0.0140613 -0.282177 0.944717 0.327739 -0.00981959
+-0.121284 0.371795 -0.370995 -0.0231154 0.860395 -0.509103
+-0.343228 -0.293654 0.320513 0 0 1
+0.141026 0.348295 0.273974 1 0 0
+-0.430038 0.212016 0.320513 0 0 1
+0.304986 -0.371795 0.0881313 0 1 0
+0.5 -0.103501 -0.224375 1 0 0
+0.0409792 0.371795 -0.310599 0 1 0
+-0.459966 0.371795 0.268066 0 1 0
+0.5 0.135129 0.236099 1 0 0
+-0.448718 -0.352796 -0.244901 1 0 0
+0.441296 0.294872 -0.141207 0 1 0
+0.43261 -0.267683 0.320513 0 0 1
+-0.5 -0.157157 -0.152978 1 0 0
+-0.253336 -0.0372092 -0.085474 0.51905 0.854508 -0.0200775
+-0.494397 -0.294872 -0.175107 0.210584 0.977561 0.0054099
+-0.440628 -0.371795 -0.0498722 0.241223 0.970235 -0.0213275
+0.133651 0.237005 0.371795 0 0 1
+-0.448718 -0.356927 -0.134271 1 0 0
+0.428921 -0.371795 0.0655694 0 1 0
+-0.0318114 0.371795 -0.0976266 0 1 0
+-0.5 0.148726 0.243859 1 0 0
+-0.443774 0.210935 0.320513 0 0 1
+-0.0319324 0.202055 0.348111 -0.164568 0.986366 0
+0.472258 -0.294872 -0.096131 0 1 0
+-0.442203 0.0549782 0.320513 0 0 1
+0.5 -0.245455 -0.0870994 1 0 0
+0.188562 0.294872 -0.308329 0 1 0
+0.141109 -0.304648 -0.246304 0.995792 0.0818926 0.0411283
+-0.5 -0.163973 -0.128821 1 0 0
+0.177743 0.230897 -0.345337 0 1 0
+0.258983 0.0259718 -0.111116 0.741868 0.670539 0.00306807
+-0.204829 0.00515852 0.350648 0.998137 -0.0608419 0.00449924
+-0.187231 -0.000590773 -0.10131 0.999998 -0.00190203 0.00076618
+0.276744 -0.0201584 -0.333333 0.107218 -0.0356469 0.993596
+-0.448718 -0.298236 -0.269929 0.863888 0.500773 -0.0540721
+-0.373902 -0.371795 0.316068 -0.150118 0.947254 -0.283149
+0.24489 0.0356916 -0.314129 0.368294 0.929708 -0.00181326
+-0.112879 0.256282 0.362242 0 1 0
+-0.5 0.258701 -0.0507952 1 0 0
+-0.5 0.238542 0.177572 1 0 0
+-0.424734 -0.020861 -0.371795 0 0 1
+0.5 0.260312 0.132391 1 0 0
+0.0450019 0.212762 -0.333333 0 0 1
+0.0454847 -0.294872 -0.0665991 0 1 0
+0.186902 -0.371795 -0.0303988 0 1 0
+-0.264137 -0.371795 0.0152046 0 1 0
+0.264853 0.294872 -0.0028413 0 1 0
+0.20349 -0.0213206 0.322397 -0.40429 -0.00712418 0.914603
+0.260729 -0.0240134 -0.247841 0.772584 -0.634615 0.0194601
+-0.349908 -0.369541 0.320513 -0.00563305 -0.462949 0.886367
+-0.188248 0.00908587 -0.174303 0.985352 0.169853 -0.0152071
+-0.383542 0.126031 -0.371795 0 0 1
+0.5 0.272684 0.290697 1 0 0
+-0.5 0.0109748 -0.0901504 1 0 0
+-0.5 0.290985 0.0906031 1 0 0
+-0.141154 -0.310855 -0.0179654 1 0 0
+-0.272893 0.371795 -0.146251 0 1 0
+-0.480406 0.00492976 -0.371795 0 0 1
+-0.15951 0.111523 0.320513 0.182161 -0.141217 0.973075
+-0.5 -0.097288 0.278096 1 0 0
+0.349511 -0.371795 0.12013 0 1 0
+-0.0454435 -0.294872 -0.165329 0 1 0
+0.0617013 0.371795 -0.167233 0 1 0
+-0.444666 0.371795 0.300812 0 1 0
+-0.354523 0.270685 -0.371795 0 0 1
+-0.212415 0.0393545 -0.0612603 0.423689 0.905774 -0.00784793
+-0.105593 0.343037 -0.371795 0 0 1
+-0.5 0.301994 0.161177 1 0 0
+-0.5 0.154531 0.263081 1 0 0
+-0.223207 -0.371795 -0.0114798 0 1 0
+-0.225398 -0.202202 0.371795 0 0 1
+-0.161268 0.211743 -0.333333 0 0 1
+-0.5 0.329627 0.0936404 1 0 0
+0.5 0.284874 -0.250901 0.999438 0.0321262 -0.00958381
+0.214698 -0.00351873 0.371795 -0.0345802 -0.00219111 0.9994
+0.5 -0.0369681 0.261713 1 0 0
+-0.5 -0.0732049 -0.200425 1 0 0
+0.223094 0.230897 -0.349735 0 1 0
+0.449379 0.294872 -0.0384697 0 1 0
+0.5 -0.194931 0.043827 1 0 0
+0.282601 -0.371795 0.105096 0 1 0
+-0.378506 0.371795 -0.244294 0 1 0
+-0.292005 0.371795 0.0321246 0 1 0
+0.0548124 -0.294872 0.166644 0 1 0
+0.309265 0.294872 0.24428 0 1 0
+0.142839 0.294872 0.0687777 0.61615 0.784521 0.0698941
+0.5 -0.183349 0.233423 1 0 0
+0.47706 -0.294872 0.0548082 0 1 0
+-0.0833483 0.371795 0.211656 0 1 0
+0.5 0.0715013 0.109832 1 0 0
+-0.367556 -0.371795 -0.258804 0 1 0
+0.448718 -0.298161 -0.0222327 0.81651 -0.561787 0.133067
+-0.44311 0.371795 -0.035483 0 1 0
+-0.0209383 0.371795 -0.359545 0 1 0
+-0.326225 0.371795 0.209243 0 1 0
+-0.474065 -0.201851 -0.371795 0 0 1
+-0.288808 -0.0602707 0.371795 0 0 1
+-0.274006 -0.371795 -0.277809 0 1 0
+-0.127623 -0.00275584 0.320513 0 0 1
+-0.011397 0.371795 0.14709 0 1 0
+0.382646 -0.0873291 -0.371795 0 0 1
+0.35499 0.294872 -0.189066 0 1 0
+-0.177075 0.111125 0.371795 0.226335 -0.407342 0.884786
+0.0518945 -0.294872 0.0125266 0 1 0
+0.285688 -0.371795 -0.277036 0 1 0
+0.438774 -0.0481943 0.320513 0 0 1
+0.166304 0.230897 -0.357365 0 1 0
+-0.252973 0.105923 0.371795 0 0 1
+0.5 0.0216366 0.014456 1 0 0
+0.018159 -0.27243 -0.371795 0 0 1
+0.339759 0.294872 -0.0514781 0 1 0
+0.216381 0.294872 -0.0388937 0 1 0
+-0.24545 -0.371795 -0.207926 0 1 0
+0.147783 -0.298242 -0.371795 0.152511 -0.0147535 0.988192
+-0.5 -0.0546653 -0.0794716 1 0 0
+0.5 -0.166101 0.0698026 1 0 0
+0.314018 0.116176 -0.333333 0.332619 -0.0315982 0.942532
+0.5 0.243669 0.0490528 1 0 0
+0.252719 0.118174 -0.333333 0 0 1
+0.375013 0.0680322 0.362616 0.94899 0.293014 0.116448
+-0.10595 0.332351 -0.371795 0 0 1
+-0.5 -0.198464 -0.284709 1 0 0
+0.353651 -0.114169 -0.371795 0 0 1
+0.110308 0.354535 -0.371795 0 0 1
+0.448718 -0.328028 -0.189272 1 0 0
+0.5 -0.0078444 -0.134326 1 0 0
+0.0948679 -0.28502 0.320513 -0.010718 -0.0387921 0.99919
+0.141109 -0.335027 -0.115983 1 0 0
+0.308162 0.294872 -0.124054 0 1 0
+0.46703 -0.294872 0.0310826 0 1 0
+-0.27381 0.00628189 -0.0593809 0.984044 -0.177924 -0.000586554
+-0.5 -0.00970432 -0.000948567 1 0 0
+-0.0948803 -0.256282 0.324414 -0.10491 0.953387 -0.282925
+-0.116275 -0.147994 0.320513 0 0 1
+-0.227519 -0.149633 -0.333333 0 0 1
+0.454062 -0.294872 0.134386 -0.302406 0.952257 -0.0419148
+0.420942 -0.260961 -0.371795 0 0 1
+-0.0795355 -0.256282 0.360271 0 1 0
+0.457891 -0.294872 -0.18076 0 1 0
+0.106149 -0.10976 0.320513 0 0 1
+-0.160998 -0.352979 -0.371795 0 0 1
+-0.420362 0.371795 -0.0214674 0 1 0
+-0.254598 0.359799 -0.371795 0 0 1
+-0.21498 0.201606 0.371795 0 0 1
+0.0304274 -0.0709041 0.320513 0 0 1
+-0.18111 -0.00114694 -0.333333 0.1835 -0.00229024 0.983017
+-0.269638 -0.371795 0.155668 0 1 0
+-0.21326 -0.371795 0.0987665 0 1 0
+0.0763989 0.371795 0.293287 0 1 0
+0.351752 0.251381 0.320513 0 0 1
+-0.219348 -0.371795 -0.271717 0 1 0
+-0.352662 -0.0356102 -0.371795 0 0 1
+-0.141154 -0.34094 0.123447 1 0 0
+0.5 -0.0662161 -0.230802 1 0 0
+-0.326591 -0.371795 -0.187529 0 1 0
+-0.186926 0.11544 -0.333333 0 0 1
+-0.0104249 -0.175231 -0.333333 0 0 1
+-0.200708 0.275234 0.320513 0 0 1
+0.470528 -0.000571871 0.320513 0 0 1
+-0.237284 0.0430198 -0.145433 -0.169521 0.985461 -0.0113553
+-0.397319 0.142629 0.320513 0 0 1
+-0.448718 -0.295923 0.212641 0.763508 0.644263 0.044508
+0.374077 0.294872 0.28604 0 1 0
+0.00779278 -0.0211985 0.320513 0 0 1
+0.416589 0.294872 -0.14579 0 1 0
+-0.382319 0.371795 0.181822 0 1 0
+-0.0887393 -0.294872 -0.0807784 0 1 0
+0.5 0.273366 0.22169 1 0 0
+-0.5 -0.285067 0.144039 0.988831 0.147102 -0.023972
+0.141026 0.339689 0.0776432 1 0 0
+0.5 0.132472 0.217149 1 0 0
+0.309646 0.294872 0.2476 0 1 0
+-0.5 -0.273918 -0.303705 1 0 0
+-0.355413 0.352909 0.320513 0 0 1
+-0.178848 0.371795 -0.210861 0 1 0
+0.141109 -0.359969 -0.31165 0.999643 0.026519 0.00312428
+0.5 -0.106377 0.242397 1 0 0
+-0.264582 -0.0694946 0.371795 0 0 1
+0.196111 -0.371795 -0.0621048 0 1 0
+-0.212851 0.0395577 -0.262236 0.419509 0.90774 -0.00458761
+-0.5 -0.226751 -0.339582 1 0 0
+0.448718 -0.32481 -0.0972882 1 0 0
+-0.390563 -0.371795 0.0445008 0 1 0
+0.41024 0.0688991 0.320513 0 0 1
+0.5 -0.188731 -0.0678351 1 0 0
+0.340204 0.294872 0.290177 0 1 0
+-0.394394 0.200072 0.320513 0 0 1
+-0.5 -0.0404259 -0.351902 1 0 0
+-0.236091 0.0364988 0.371795 0 0 1
+0.11133 0.371795 -0.144705 0 1 0
+0.5 0.132868 -0.024209 1 0 0
+-0.0265892 -0.27841 0.320513 0 0 1
+-0.5 -0.117715 -0.220617 1 0 0
+-0.244377 0.230828 -0.347131 -0.0508864 0.998652 -0.0101876
+0.5 -0.200465 -0.312929 1 0 0
+-0.345042 0.371795 0.0592062 0 1 0
+0.218986 -0.0365096 -0.174721 0.323351 0.945737 0.032027
+-0.5 0.0774808 -0.188737 1 0 0
+0.182859 -0.0923538 0.364462 0.885565 -0.433616 -0.166591
+0.225093 0.294872 0.211683 0 1 0
+-0.291911 -0.350294 -0.371795 0 0 1
+0.45469 0.144002 -0.371795 0 0 1
+0.411001 -0.137699 -0.371795 0 0 1
+0.215729 0.0352624 -0.16387 -0.413904 0.910318 0.00221666
+-0.141154 -0.332957 0.171435 1 0 0
+-0.5 0.0837606 0.254422 1 0 0
+0.1931 -0.218867 0.371795 0 0 1
+0.26665 -0.371795 -0.123395 0 1 0
+0.427683 0.294872 0.0757892 0 1 0
+-0.201025 0.211095 0.371795 0 0 1
+-0.5 -0.1454 -0.197016 1 0 0
+0.387263 -0.301785 0.320513 0 0 1
+0.206864 -0.116858 0.371795 0 0 1
+-0.5 0.000177743 0.184355 1 0 0
+-0.124493 -0.162316 0.3713 0.565852 0.724993 0.39268
+-0.125374 0.019249 -0.333333 0 0 1
+-0.5 -0.292244 -0.245727 0.646155 0.743999 -0.170147
+0.126817 0.371795 -0.0509675 0 1 0
+0.0534709 0.0934713 0.320513 0 0 1
+-0.452545 0.27318 0.320513 0 0 1
+0.310884 0.178835 0.362936 0.700939 0.706136 0.100282
+0.141026 0.314243 0.288602 1 0 0
+-0.5 -0.168554 0.0309106 1 0 0
+0.488654 0.27607 0.320513 0.0304494 -0.000249905 0.999536
+0.135995 -0.294872 0.0904819 0.298336 0.944829 -0.135256
+-0.448718 -0.359882 -0.365911 0.975561 0.0231209 0.218508
+0.0764772 -0.294872 -0.205679 0 1 0
+0.0739696 -0.294872 0.280835 0 1 0
+-0.233054 -0.371795 0.21196 0 1 0
+-0.284762 0.218694 -0.342005 -0.552354 0.83361 0
+-0.0677408 0.371795 -0.257257 0 1 0
+-0.0263448 -0.221278 0.371795 0 0 1
+-0.396517 0.260751 -0.371795 0 0 1
+-0.470008 -0.130126 0.320513 0 0 1
+-0.199184 -0.0298248 -0.0707365 0.70849 -0.705698 0.00568226
+-0.351669 0.0388889 0.371795 0 0 1
+-0.233856 -0.0961684 0.371795 0 0 1
+-0.481569 0.371795 0.0860006 0 1 0
+0.5 0.128064 -0.175978 1 0 0
+-0.38462 -0.371795 -0.10128 0 1 0
+-0.222218 0.223529 -0.333333 0.00409897 0.192424 0.981303
+0.426204 0.294872 -0.229738 0 1 0
+-0.470124 -0.294872 0.0021518 0 1 0
+-0.0354614 0.297965 0.320513 0 0 1
+-0.000790676 -0.294872 0.153531 0 1 0
+-0.461234 0.172845 -0.371795 0 0 1
+-0.473193 -0.191461 -0.371795 0 0 1
+0.5 0.21417 -0.325735 1 0 0
+0.0884106 -0.294872 0.292756 0 1 0
+-0.5 -0.0901767 0.309947 0.99932 -0.000431287 -0.0368765
+0.393179 0.294872 -0.25526 0 1 0
+0.142728 -0.103437 0.320513 0 0 1
+0.250224 -0.250227 -0.371795 0 0 1
+0.138317 -0.239925 0.371795 0 0 1
+-0.476763 -0.294872 0.263778 0 1 0
+-0.0688107 0.0756179 -0.333333 0 0 1
+-0.0622863 -0.294872 -0.0922007 0 1 0
+-0.5 0.100868 -0.369816 0.398489 0.0063633 0.917151
+0.5 -0.122148 0.223368 1 0 0
+0.0668152 -0.0122842 0.320513 0 0 1
+0.5 0.0563734 -0.0518634 1 0 0
+-0.236846 -0.371795 0.152628 0 1 0
+-0.417968 0.371795 0.219113 0 1 0
+0.465623 -0.22446 0.320513 0 0 1
+-0.5 0.277255 0.188419 1 0 0
+0.333835 0.0418942 0.371795 0 0 1
+0.265424 0.294872 0.236417 0 1 0
+0.403515 -0.145803 0.320513 0 0 1
+-0.448718 -0.340177 0.0133753 1 0 0
+-0.207419 -0.371795 -0.157529 0 1 0
+0.149671 -0.371795 -0.312059 0.218745 0.975768 0.00515093
+-0.5 0.163348 0.191368 1 0 0
+0.344507 0.294872 -0.0715169 0 1 0
+-0.431499 -0.371795 0.231365 0 1 0
+0.20826 -0.371795 -0.291273 0 1 0
+-0.382188 0.371795 -0.148314 0 1 0
+0.448718 -0.325771 0.26636 1 0 0
+0.0848389 0.256282 0.369945 -0.0362836 0.566265 0.823425
+0.5 -0.113459 -0.12664 1 0 0
+0.5 0.161579 -0.286462 1 0 0
+-0.00760069 -0.294872 0.256867 0 1 0
+-0.321155 -0.371795 0.0769671 0 1 0
+-0.5 0.0296828 -0.0279762 1 0 0
+0.5 -0.119408 -0.0153764 1 0 0
+0.201982 -0.0253982 -0.0559351 0.763851 0.645266 0.0128129
+0.5 0.0630531 0.0857447 1 0 0
+-0.0103124 -0.292151 0.320513 0.0102702 -0.558875 0.829188
+-0.398659 -0.289984 -0.371795 0 0 1
+0.275579 -0.371795 0.227417 0 1 0
+0.268409 -0.371795 -0.0938987 0 1 0
+0.265864 0.294872 -0.223338 0 1 0
+0.5 0.0604411 0.2203 1 0 0
+-0.274264 -0.00108052 -0.222343 0.998359 0.0570777 0.00456404
+-0.255556 0.371795 -0.142683 0 1 0
+-0.259775 0.0186174 -0.0298371 -0.443697 0.28253 0.850476
+0.142122 -0.147638 0.349368 0.708063 -0.70614 0.00369932
+-0.143476 0.371795 -0.294515 0 1 0
+-0.13285 0.278073 -0.371795 0 0 1
+0.123947 0.371795 -0.278983 0 1 0
+0.35548 -0.371795 0.25285 0 1 0
+0.386565 -0.371795 -0.0180132 0 1 0
+0.435973 -0.371795 0.200205 0 1 0
+0.487258 -0.179055 0.320513 0 0 1
+0.361927 -0.371795 -0.301961 0 1 0
+0.204745 0.248671 -0.371795 0 0 1
+-0.448718 -0.361242 0.257932 1 0 0
+0.467262 -0.0665404 -0.371795 0 0 1
+-0.414861 -0.371795 -0.00287266 0 1 0
+-0.452668 -0.294872 -0.321728 0.56035 0.825063 -0.0726612
+-0.177498 -0.371795 -0.165698 0 1 0
+-0.365015 0.010533 -0.371795 0 0 1
+0.432343 -0.213869 -0.371795 0 0 1
+0.0469812 0.253651 0.371795 0.119805 0.531553 0.83851
+0.5 0.0121436 -0.34713 1 0 0
+0.5 -0.118523 -0.182577 1 0 0
+-0.49582 -0.294872 -0.106869 0.529426 0.846389 0.0577482
+0.5 0.0734651 -0.26007 1 0 0
+-0.194405 -0.371795 -0.209307 0 1 0
+-0.0537255 -0.125656 -0.333333 0 0 1
+-0.127616 0.371795 0.0888844 0 1 0
+-0.110433 -0.120276 -0.333333 0 0 1
+-0.44177 0.371795 0.291308 0 1 0
+0.5 0.017752 -0.336301 1 0 0
+0.204917 0.294872 0.319919 0.0135517 0.676552 0.73627
+-0.0483515 -0.294872 -0.268187 0 1 0
+-0.371293 -0.0279374 0.371795 0 0 1
+0.5 0.163974 -0.0163002 1 0 0
+-0.5 0.13197 0.216363 1 0 0
+-0.495265 -0.067721 0.320513 -0.340385 0.00911149 0.940242
+-0.141154 -0.302784 -0.168641 0.995435 -0.0887111 -0.0352036
+0.184482 -0.371795 -0.135594 0 1 0
+-0.292506 0.0204784 -0.333333 0 0 1
+-0.00219561 -0.169733 0.320513 0 0 1
+-0.0381574 -0.227184 0.371795 0 0 1
+0.396639 -0.371795 -0.0322795 0 1 0
+-0.424891 -0.05743 0.320513 0 0 1
+-0.231269 0.371795 -0.101995 0 1 0
+0.0443195 -0.171898 -0.333333 0 0 1
+0.350715 -0.0879396 -0.371795 0 0 1
+0.489768 -0.294872 -0.146032 -0.0877917 0.996122 0.00580501
+0.224032 -0.104935 0.371795 0 0 1
+0.305957 -0.0902607 -0.333333 0 0 1
+0.152251 0.222273 0.371795 0 0 1
+0.0939779 0.251442 0.371795 0.0328387 0.234589 0.97154
+-0.5 -0.0268686 0.301368 1 0 0
+0.312582 -0.371795 0.065592 0 1 0
+0.295878 0.210058 -0.364746 0.628835 0.750843 0.201992
+0.147328 -0.286152 -0.371795 0 0 1
+-0.16648 0.0372169 0.320513 0 0 1
+0.0647123 0.194058 0.338379 0.324726 0.945808 0
+-0.210114 -0.371795 -0.0684984 0 1 0
+-0.326827 -0.161234 0.328576 0.746295 0.633868 -0.203113
+0.423693 0.0640871 0.320513 0 0 1
+-0.0169582 0.371795 -0.284555 0 1 0
+-0.192319 -0.231437 0.371795 0 0 1
+0.141109 -0.350759 0.0874114 1 0 0
+0.216029 -0.186066 -0.333333 0 0 1
+-0.221546 -0.371795 0.199182 0 1 0
+-0.5 0.0882845 0.310931 0.999494 -0.00469776 -0.0314613
+-0.0168369 -0.27331 0.320513 0 0 1
+0.269368 -0.371795 0.0900271 0 1 0
+-0.211673 -0.0327732 -0.0318636 0.306483 -0.542273 0.782309
+0.175975 -0.195087 0.371795 0 0 1
+-0.424842 -0.371795 -0.232789 0 1 0
+-0.5 -0.0632804 0.27741 1 0 0
+0.244693 -0.268058 0.320513 0 0 1
+-0.202413 0.0339571 0.33988 0.98569 -0.166745 -0.0247456
+-0.171037 0.230897 -0.35816 0 1 0
+-0.429701 0.371795 -0.0518624 0 1 0
+-0.241515 -0.371795 -0.35595 0 1 0
+-0.247075 -0.371795 -0.118497 0 1 0
+-0.307899 -0.28777 0.320513 0 0 1
+0.475395 -0.265591 0.320513 0 0 1
+-0.5 0.270338 -0.367521 0.995811 0.0366584 0.0837633
+-0.0648102 0.371795 -0.24468 0 1 0
+-0.132532 -0.230897 -0.369247 -0.0691488 0.947968 -0.310767
+-0.290623 0.197736 0.361595 -0.613176 0.789379 0.0299458
+0.205998 -0.371795 0.176847 0 1 0
+-0.427252 -0.371795 -0.160403 0 1 0
+-0.489775 -0.294872 0.0295657 0.0571712 0.99814 0.0211852
+-0.5 -0.275488 0.0689225 1 0 0
+-0.215615 -0.371795 -0.262122 0 1 0
+0.368115 0.0882654 0.356941 0.936951 0.349461 0
+-0.0107637 -0.134382 0.320513 0 0 1
+-0.337524 0.371795 -0.0629497 0 1 0
+-0.341638 -0.362582 0.320513 -0.00672817 -0.010681 0.99992
+0.141026 0.327996 0.230949 1 0 0
+0.141109 -0.308638 0.276419 1 0 0
+0.5 -0.19346 0.0100894 1 0 0
+-0.0669733 0.371795 0.192283 0 1 0
+-0.5 0.36537 0.294147 0.939609 -0.280881 -0.195552
+0.303545 -0.371795 0.11344 0 1 0
+0.305092 0.176748 0.371795 0.461219 0.461274 0.75796
+-0.188018 -0.00822679 -0.0619953 0.980886 -0.191296 -0.0356049
+-0.261937 0.371795 -0.0767697 0 1 0
+-0.118273 0.371795 0.0166411 0 1 0
+0.303795 -0.371795 -0.240022 0 1 0
+0.5 -0.0601468 -0.347183 1 0 0
+0.0123485 -0.256282 0.36756 0.225154 0.917241 -0.328595
+-0.5 0.342793 -0.282506 1 0 0
+0.324231 -0.371795 0.272478 0 1 0
+-0.251387 0.371795 0.276763 0 1 0
+-0.5 -0.0769831 0.0654814 1 0 0
+-0.142672 -0.100204 0.320513 0 0 1
+0.145238 0.294872 -0.342847 0.23228 0.971161 0.0537779
+0.455361 -0.243923 -0.371795 0 0 1
+0.141109 -0.332195 0.11522 1 0 0
+0.5 0.0298184 -0.275513 1 0 0
+-0.448718 -0.300744 0.0699662 0.966187 0.257833 -0.00224239
+0.344111 -0.0934423 0.371795 0 0 1
+-0.5 -0.0493946 0.24799 1 0 0
+-0.487771 0.24725 0.320513 0 0 1
+-0.5 -0.0210326 -0.0603591 1 0 0
+-0.188082 -0.136611 -0.333333 0 0 1
+-0.246384 0.371795 -0.23128 0 1 0
+0.278423 0.294872 -0.105929 0 1 0
+-0.215211 0.371795 0.308876 0.000565441 0.999988 0.00477548
+0.307338 0.22381 0.320513 0 0 1
+-0.406215 -0.00766334 -0.371795 0 0 1
+-0.076485 0.252619 0.371795 -0.1501 0.627229 0.764234
+0.0850482 0.371795 -0.305718 0 1 0
+-0.217224 0.041326 -0.131132 0.273617 0.961834 -0.00287697
+0.398537 0.244989 0.320513 0 0 1
+-0.41428 0.371795 -0.0351396 0 1 0
+0.5 0.0902545 0.18386 1 0 0
+-0.350128 -0.149615 -0.371795 0 0 1
+-0.0695258 -0.294872 -0.345532 0 1 0
+0.342463 0.0708677 -0.371795 0 0 1
+0.5 -0.279008 0.0659999 1 0 0
+-0.459969 -0.294872 0.286259 0 1 0
+0.479411 -0.0469203 -0.371795 0 0 1
+0.264567 0.0181819 -0.155419 0.869514 0.493624 0.0167345
+0.141109 -0.367517 0.0167918 0.951766 0.303827 -0.0427736
+0.0578045 0.371795 0.110693 0 1 0
+-0.5 0.227513 0.180357 1 0 0
+0.176793 -0.080668 0.320513 0 0 1
+-0.33624 -0.371795 -0.336224 0 1 0
+-0.0292515 0.371795 -0.226958 0 1 0
+0.346042 0.294872 0.170313 0 1 0
+0.036637 0.169899 -0.333333 0 0 1
+0.195301 -0.247012 0.347324 -0.239497 0.970885 -0.0048114
+-0.125901 -0.0308402 -0.333333 0 0 1
+0.175862 0.294872 -0.115756 0 1 0
+0.141026 0.331709 0.190183 1 0 0
+-0.448043 0.371795 0.0502022 0 1 0
+-0.229788 -0.316489 0.320513 0 0 1
+-0.28238 -0.126112 0.371795 0 0 1
+-0.317944 0.371795 0.198118 0 1 0
+-0.0873493 -0.174914 -0.333333 0 0 1
+0.389746 0.248884 0.320513 0 0 1
+-0.109761 0.253646 0.371795 -0.0610351 0.577161 0.814346
+-0.496126 0.371795 0.0840827 -0.405325 0.909929 0.0879861
+0.5 0.0464238 -0.147592 1 0 0
+-0.141178 -0.371795 0.264179 0.812201 -0.575839 0.0934803
+0.326394 -0.371795 0.00661506 0 1 0
+0.449853 0.294872 -0.270936 0 1 0
+-0.0408653 -0.207328 -0.333333 0 0 1
+0.5 -0.262868 0.301033 1 0 0
+0.163854 0.123196 0.351732 0.808861 0.587968 0.00603297
+-0.197162 -0.371795 -0.0686853 0 1 0
+0.242226 0.291332 -0.371795 -0.0688749 -0.669518 0.739596
+-0.5 -0.207009 -0.0843721 1 0 0
+-0.204126 0.0136348 0.328149 0.990255 -0.0994917 0.0974539
+-0.448718 -0.311098 -0.0992936 1 0 0
+-0.5 -0.169926 0.0259663 1 0 0
+-0.271948 -0.371795 0.184314 0 1 0
+0.11143 0.371795 -0.134821 0 1 0
+-0.433591 -0.371795 -0.255862 0 1 0
+-0.499088 0.164598 0.320513 -0.646001 -0.0538648 0.761434
+-0.250432 -0.371795 0.184221 0 1 0
+-0.0883886 -0.294872 -0.225394 0 1 0
+-0.5 0.360134 -0.363097 0.985657 -0.0260848 0.166731
+-0.280885 -0.221136 -0.338163 0.539269 0.706732 -0.45795
+-0.5 -0.244502 -0.226797 1 0 0
+-0.5 0.228008 -0.0194668 1 0 0
+-0.381032 0.371795 0.156163 0 1 0
+0.448718 -0.370978 0.263031 0.879927 -0.472005 0.0542276
+0.197244 0.0187663 -0.0495767 0.871464 -0.48919 0.0352756
+-0.340677 0.371795 -0.230731 0 1 0
+-0.141154 -0.335553 -0.253584 1 0 0
+0.5 -0.0859187 0.140724 1 0 0
+-0.320513 -0.119071 -0.354561 1 0 0
+0.0132884 -0.122014 -0.333333 0 0 1
+-0.493266 0.253695 -0.371795 0.0767512 -0.0315429 0.996551
+0.16654 0.294872 -0.0612572 0 1 0
+0.442575 0.294872 -0.324831 0 1 0
+-0.5 0.309294 0.0501517 1 0 0
+-0.349385 -0.285862 -0.371795 0 0 1
+0.141109 -0.37061 -0.202736 0.72319 0.686528 0.075331
+0.485966 0.160298 -0.371795 0 0 1
+0.0527327 0.31892 0.320513 0 0 1
+0.141109 -0.303127 0.100241 0.998237 0.0593061 0.00233682
+0.141109 -0.364829 0.183009 0.984373 0.171596 0.0395576
+-0.5 -0.0406034 -0.351225 1 0 0
+0.255301 -0.371795 0.172344 0 1 0
+-0.136489 -0.294872 -0.0532387 -0.549561 0.807074 -0.215903
+0.38259 0.0265331 0.368522 0.785745 0.0455981 0.616867
+-0.208106 0.371795 -0.22012 0 1 0
+0.5 0.195436 -0.274154 1 0 0
+-0.312052 -0.371795 0.164715 0 1 0
+-0.161151 0.176071 -0.333333 0 0 1
+0.386557 0.129811 0.320513 0 0 1
+0.5 0.0892788 0.159269 1 0 0
+0.5 -0.283801 -0.190023 0.999731 -0.0231881 0.00101589
+0.0233168 0.180408 -0.333333 0 0 1
+0.266144 -0.0148 -0.263745 0.944957 -0.32714 0.00597447
+-0.15033 0.298979 0.320513 0 0 1
+-0.5 0.159014 0.155746 1 0 0
+0.0574981 -0.240526 0.371795 0 0 1
+0.379317 -0.0482482 0.330294 0.961454 -0.256002 0.100342
+-0.375346 0.365742 0.320513 -0.0510871 0.162941 0.985312
+-0.00966946 -0.256282 0.342549 0 1 0
+-0.24447 -0.0325894 0.371795 0 0 1
+0.5 -0.103213 0.0661012 1 0 0
+0.282186 -0.371795 -0.21618 0 1 0
+-0.377565 -0.371795 -0.236775 0 1 0
+0.435722 -0.371795 0.124431 0 1 0
+-0.0458795 0.134778 0.320513 0 0 1
+-0.0687172 -0.0353387 0.320513 0 0 1
+0.5 -0.206131 0.0673997 1 0 0
+0.5 0.101108 0.0706131 1 0 0
+-0.0227005 0.371795 0.141779 0 1 0
+-0.378288 0.293891 -0.371795 0 0 1
+-0.125533 0.371795 0.254312 0 1 0
+0.397212 -0.371795 0.0714842 0 1 0
+-0.370933 -0.371795 0.239367 0 1 0
+0.46754 0.293234 -0.371795 -0.0196146 0.777694 -0.628337
+0.38249 0.0637153 -0.371795 0 0 1
+0.0743375 -0.127827 -0.333333 0 0 1
+-0.373833 0.0144981 -0.371795 0 0 1
+-0.0103495 -0.228849 -0.333333 0.0135274 -0.257641 0.966146
+-0.434137 0.371795 -0.171181 0 1 0
+-0.5 -0.208453 -0.110099 1 0 0
+0.190102 -0.371795 0.294311 0 1 0
+-0.172703 0.0689681 -0.333333 0 0 1
+-0.5 0.282385 -0.351243 1 0 0
+-0.0523393 0.0710418 -0.333333 0 0 1
+0.5 -0.242691 0.110921 1 0 0
+0.288043 -0.0361846 -0.333333 0 0 1
+0.0753727 0.251169 0.371795 -0.0253296 0.117667 0.99273
+-0.471546 0.371795 -0.0435311 0 1 0
+-0.175713 0.371795 0.283783 0 1 0
+-0.448718 -0.298167 -0.25216 0.850204 0.526169 -0.0172871
+-0.488029 0.297088 0.320513 -0.00877998 -0.000269559 0.999961
+0.492742 0.294872 0.130788 0.217398 0.972715 0.0810103
+0.141109 -0.302903 -0.0466283 0.923928 0.278206 0.2626
+-0.470618 -0.294872 0.201304 0 1 0
+0.412832 0.294872 0.305085 0 1 0
+-0.5 0.147236 0.205701 1 0 0
+0.102022 0.371795 -0.0688059 0 1 0
+0.373893 0.243904 -0.371795 0 0 1
+0.162015 0.294872 0.12253 0 1 0
+-0.459823 -0.163007 -0.371795 0 0 1
+-0.381861 0.288132 -0.371795 0 0 1
+-0.0615536 0.371795 -0.287644 0 1 0
+-0.398826 -0.371795 0.0707706 0 1 0
+0.0533563 0.371795 -0.126328 0 1 0
+0.367437 -0.371795 0.314583 0.00602435 0.918727 -0.394848
+-0.425678 0.371795 0.174576 0 1 0
+-0.308893 -0.00214555 0.371795 0 0 1
+-0.5 0.10393 0.289284 1 0 0
+-0.5 0.221784 -0.160121 1 0 0
+-0.255835 0.0354594 -0.214421 -0.572245 0.820039 -0.00848374
+0.282715 0.294872 -0.201808 0 1 0
+-0.0645599 -0.118433 -0.333333 0 0 1
+0.143844 -0.255163 0.365623 -0.0549139 0.990388 -0.12695
+0.311921 -0.371795 0.0606787 0 1 0
+-0.5 -0.174792 -0.130635 1 0 0
+0.152871 -0.180358 0.371795 0 0 1
+0.117935 -0.294872 -0.0573351 0 1 0
+-0.5 0.0237946 -0.353628 1 0 0
+-0.5 -0.0696874 0.13056 1 0 0
+-0.5 0.305715 0.246479 1 0 0
+-0.5 0.0387118 -0.362663 0.987945 -0.0206055 0.153427
+-0.168765 -0.0799159 -0.333333 0 0 1
+-0.180416 0.230897 -0.364846 0.0115356 0.998164 0.0594612
+-0.451756 -0.294872 0.0261809 0.254972 0.966855 0.0134353
+0.235951 -0.371795 0.146419 0 1 0
+0.5 0.091228 -0.143996 1 0 0
+-0.177075 -0.16911 -0.333333 0 0 1
+-0.272189 0.22519 -0.345708 -0.370433 0.928741 -0.0148219
+0.400331 0.267231 0.320513 0 0 1
+0.296921 0.148411 -0.333333 0 0 1
+0.0202469 0.371795 -0.0208856 0 1 0
+0.28707 -0.371795 -0.0556864 0 1 0
+-0.5 -0.259656 0.0057015 1 0 0
+-0.000734026 -0.155777 0.320513 0 0 1
+-0.5 0.311377 -0.133223 1 0 0
+-0.436333 -0.0918964 -0.371795 0 0 1
+-0.00931152 -0.156301 -0.333333 0 0 1
+-0.0886677 -0.194804 0.371795 0.14736 0.102406 0.983767
+-0.5 0.129241 -0.192128 1 0 0
+0.00411498 0.370484 0.320513 0.0568903 0.766276 0.639988
+-0.216162 -0.0410416 -0.159074 -0.355369 0.934687 0.0085112
+-0.22601 0.371795 -0.340076 0 1 0
+-0.260926 -0.0541419 0.371795 0 0 1
+0.201946 0.294872 0.0661562 0 1 0
+-0.164275 -0.330442 -0.371795 0 0 1
+0.499075 -0.294872 -0.00959486 -0.251126 0.96751 0.0293176
+-0.00896858 -0.294872 0.108557 0 1 0
+-0.5 -0.00603051 -0.0337925 1 0 0
+-0.0471481 -0.294872 -0.227593 0 1 0
+-0.201415 -0.371795 0.235146 0 1 0
+0.5 0.0230811 -0.11642 1 0 0
+0.443234 -0.159863 -0.371795 0 0 1
+0.200555 -0.123372 -0.333333 0 0 1
+-0.5 0.00731191 -0.0766085 1 0 0
+-0.429569 0.335106 -0.371795 0 0 1
+0.276729 -0.208137 0.346046 -0.599295 0.800529 0
+0.5 0.185506 -0.208883 1 0 0
+-0.258873 0.0333062 -0.257142 -0.658291 0.752682 0.0110831
+0.384319 0.00235063 0.347391 0.999657 0.0261666 0.00112878
+-0.360645 -0.371795 -0.229546 0 1 0
+0.048023 -0.294872 0.318438 0.0775369 0.895626 -0.437998
+-0.0868609 -0.294872 -0.161056 0 1 0
+0.064665 -0.294872 -0.0807907 0 1 0
+0.117399 -0.294872 0.201197 0 1 0
+0.141026 0.325873 -0.352769 1 0 0
+0.211772 0.0334179 -0.113116 -0.494505 0.868973 -0.0187148
+0.447641 0.00232722 -0.371795 0 0 1
+-0.0836327 0.256282 0.364914 -0.0618434 0.949674 0.307075
+-0.0549723 -0.294872 -0.0747489 0 1 0
+-0.0211086 0.371795 -0.170673 0 1 0
+0.20217 -0.230897 -0.341731 -0.0212176 0.978152 -0.206804
+0.141109 -0.332944 0.193982 1 0 0
+-0.266946 0.371795 0.181345 0 1 0
+-0.344876 0.136591 0.340495 0.857111 -0.514789 -0.0187732
+-0.292613 0.371795 -0.366194 0.0732504 0.918737 -0.388017
+0.0202542 -0.0561251 0.320513 0 0 1
+-0.5 -0.278435 -0.181035 1 0 0
+-0.21026 -0.371795 -0.218552 0 1 0
+-0.0747914 -0.00946968 -0.333333 0 0 1
+0.256759 -0.350927 0.320513 0 0 1
+-0.171826 -0.371795 0.184635 0 1 0
+0.184316 0.294872 -0.155273 0 1 0
+-0.230846 -0.043583 -0.116538 0.014413 0.999891 0.003062
+0.361864 -0.371795 -0.0769365 0 1 0
+0.250373 -0.207669 0.371795 0 0 1
+0.5 -0.122143 -0.338736 1 0 0
+-0.291182 -0.0836485 -0.333333 0 0 1
+0.00419941 -0.137998 0.320513 0 0 1
+-0.410066 -0.371795 -0.347337 0 1 0
+-0.197886 0.371795 -0.295235 0 1 0
+-0.348728 -0.062422 0.371795 0 0 1
+0.0125404 -0.131546 -0.333333 0 0 1
+0.167205 0.198721 -0.333333 0 0 1
+-0.5 0.0308862 0.255277 1 0 0
+-0.221318 -0.314811 -0.371795 0 0 1
+0.137904 -0.107736 -0.333333 0 0 1
+0.353938 -0.371795 0.0959913 0 1 0
+-0.456158 0.371795 -0.009659 0 1 0
+0.5 0.266962 -0.318545 1 0 0
+0.5 -0.150864 -0.329147 1 0 0
+-0.434487 0.371795 0.0222061 0 1 0
+0.448718 -0.367541 -0.325512 0.937301 -0.348521 0.000446543
+-0.116862 0.226336 -0.333333 0.0949147 0.339118 0.935944
+0.285874 -0.371795 0.0231707 0 1 0
+-0.320513 -0.138249 -0.356632 1 0 0
+0.445523 0.294872 0.129588 0 1 0
+-0.5 -0.242981 -0.124976 1 0 0
+0.229958 0.294872 0.310492 0.0354735 0.997106 0.0672338
+-0.282475 -0.335894 0.320513 0 0 1
+-0.0491812 -0.294872 -0.150753 0 1 0
+0.222166 -0.371795 0.211613 0 1 0
+0.141026 0.301351 -0.330696 0.995726 0.0876056 -0.0292355
+0.310235 -0.371795 -0.20592 0 1 0
+-0.270931 -0.0166212 -0.325513 0.823848 0.427814 -0.371818
+-0.5 -0.0311654 0.226576 1 0 0
+0.233943 -0.0381838 -0.291799 -0.0971757 0.995065 -0.0200621
+0.415672 0.179759 -0.371795 0 0 1
+0.333976 -0.371795 -0.272204 0 1 0
+0.29489 -0.371795 0.224165 0 1 0
+-0.168732 -0.371795 -0.131481 0 1 0
+-0.0545322 -0.148527 -0.333333 0 0 1
+0.448718 -0.31167 0.00704475 1 0 0
+-0.222386 -0.0902236 -0.333333 0 0 1
+0.340025 -0.0887525 -0.371795 0 0 1
+0.5 -0.272194 -0.242562 1 0 0
+0.5 0.151752 -0.246004 1 0 0
+0.0723918 -0.294872 -0.317851 0 1 0
+-0.454543 -0.247438 0.320513 0 0 1
+0.177626 0.26979 0.320513 0 0 1
+0.324025 -0.371795 -0.105794 0 1 0
+0.5 0.22287 -0.0224059 1 0 0
+0.401426 0.237836 0.320513 0 0 1
+0.336023 0.294872 -0.268278 0 1 0
+0.350252 0.294872 -0.039522 0 1 0
+-0.141107 -0.294872 -0.0323577 0.764797 -0.643506 0.0313953
+0.5 0.0489354 -0.0149492 1 0 0
+-0.5 -0.19415 -0.247619 1 0 0
+0.448718 -0.30486 -0.0389487 0.986858 -0.15716 -0.0375656
+-0.108878 0.230897 -0.36647 -0.0119751 0.927033 0.374788
+-0.371507 0.254563 0.320513 0 0 1
+-0.5 0.0285714 -0.267067 1 0 0
+-0.088048 0.371795 0.10258 0 1 0
+0.352582 -0.080037 0.371795 0 0 1
+0.141026 0.337604 0.186669 1 0 0
+0.5 -0.169457 0.241386 1 0 0
+-0.0646539 -0.234575 -0.371795 -0.00657694 -0.432282 0.901715
+0.141026 0.304554 -0.121832 0.97212 0.226305 0.061394
+-0.276647 0.120699 -0.333333 0 0 1
+0.420692 -0.165907 0.320513 0 0 1
+-0.218751 -0.0417354 -0.138863 -0.335707 0.941951 0.00547838
+-0.0909061 0.256282 0.367081 0.19421 0.82609 0.529016
+-0.5 -0.120749 0.253762 1 0 0
+-0.448718 -0.323846 -0.187227 1 0 0
+0.448718 -0.304268 -0.235221 0.995819 -0.0721613 -0.0560044
+0.129432 -0.294872 -0.166198 0 1 0
+0.15729 0.0753454 -0.333333 0 0 1
+-0.0803723 0.371795 -0.18312 0 1 0
+0.5 0.0931226 0.0762688 1 0 0
+-0.448718 -0.319338 0.0338961 1 0 0
+-0.044341 0.371795 0.284859 0 1 0
+0.5 0.00119449 -0.136615 1 0 0
+-0.419967 -0.350451 0.320513 0 0 1
+-0.08897 -0.228621 -0.333333 -0.106515 -0.613509 0.782471
+0.226365 0.0380762 -0.0277994 -0.136745 0.990597 -0.00437234
+-0.216714 0.0411896 -0.206097 0.307625 0.951471 -0.00836215
+0.29452 -0.371795 -0.264126 0 1 0
+0.5 0.0319993 0.312246 0.916097 -0.063482 0.3959
+-0.261055 -0.0311252 -0.155409 0.679832 0.73329 0.010672
+-0.459486 -0.294872 -0.131552 0.0161706 0.999862 -0.00387351
+-0.144078 0.371795 0.30812 0 1 0
+0.323194 -0.371795 -0.189908 0 1 0
+0.26186 0.0223981 -0.0805075 0.82914 0.559041 0
+0.270665 -0.157985 -0.333333 0 0 1
+0.0817539 0.32418 -0.371795 0 0 1
+-0.0266457 0.371795 -0.30599 0 1 0
+0.415513 0.284722 0.320513 0 0 1
+-0.102018 -0.294872 -0.104729 0 1 0
+-0.356637 -0.181978 0.320513 0 0 1
+0.419953 -0.347933 -0.371795 0 0 1
+-0.224029 -0.371795 0.153926 0 1 0
+-0.48673 0.371795 0.150703 0 1 0
+-0.06518 -0.294872 0.0310836 0 1 0
+0.192729 -0.371795 -0.231772 0 1 0
+0.043992 0.256282 0.338453 0 1 0
+-0.255768 0.0266668 -0.0311003 -0.402964 0.406034 0.820217
+-0.400461 0.189104 -0.371795 0 0 1
+-0.165441 -0.371795 -0.04724 0 1 0
+-0.101225 0.302629 -0.371795 0 0 1
+0.5 0.19205 -0.223719 1 0 0
+0.0582852 -0.294872 -0.222153 0 1 0
+0.448718 -0.314607 -0.151468 1 0 0
+-0.231754 0.371795 0.166995 0 1 0
+0.13591 -0.294872 -0.143136 0.124947 0.992017 -0.0170664
+0.141026 0.326723 -0.283333 1 0 0
+0.333804 -0.016286 0.371795 0 0 1
+0.352888 0.282076 -0.371795 0 0 1
+-0.5 -0.028069 0.293024 1 0 0
+-0.5 0.186065 0.0770322 1 0 0
+0.0189344 0.0341328 -0.333333 0 0 1
+0.224836 0.23679 0.348752 0.349867 0.936799 0
+0.0807212 -0.294872 -0.368459 0.136404 0.921994 0.362382
+-0.0513326 -0.134744 0.320513 0 0 1
+-0.5 -0.176295 -0.301263 1 0 0
+0.112398 0.0864255 -0.333333 0 0 1
+0.448718 -0.31126 -0.310041 1 0 0
+-0.124656 0.0225656 -0.333333 0 0 1
+0.081283 -0.242591 -0.371795 0 0 1
+0.020247 -0.294872 -0.280734 0 1 0
+0.448718 -0.351344 0.139644 1 0 0
+0.352932 -0.320427 -0.371795 0 0 1
+0.411886 0.294872 -0.271249 0 1 0
+0.207138 -0.371795 0.0929503 0 1 0
+0.265955 0.0152043 -0.162632 0.930566 0.366053 0.00725406
+0.0292097 -0.294872 0.257727 0 1 0
+0.141026 0.355136 -0.371462 0.822948 0.0568467 -0.565266
+0.362518 -0.371795 -0.0635018 0 1 0
+-0.448718 -0.346629 -0.179882 1 0 0
+0.277216 -0.371795 0.0405772 0 1 0
+-0.281347 -0.104073 0.371795 0 0 1
+-0.256955 -0.320925 0.320513 0 0 1
+-0.438683 -0.239787 -0.371795 0 0 1
+-0.0990012 0.371795 -0.230074 0 1 0
+-0.0862543 0.0741999 0.320513 0 0 1
+0.419996 0.294872 -0.342286 0 1 0
+-0.167066 -0.371795 -0.0553565 0 1 0
+-0.236875 -0.0430556 -0.0441716 0.123912 0.992187 -0.0145074
+0.141109 -0.327444 0.1499 1 0 0
+0.136546 0.35782 -0.371795 -0.0564818 0.0122285 0.998329
+-0.125512 0.075958 0.320513 0 0 1
+0.215595 0.294872 0.0400383 0 1 0
+-0.399788 0.0175581 -0.371795 0 0 1
+-0.192347 -0.0709901 0.371795 0.641119 0.169396 0.748513
+-0.360478 0.371795 0.286918 0 1 0
+-0.311044 0.332492 -0.371795 0 0 1
+0.358646 0.03151 0.371795 0 0 1
+0.469622 -0.294872 -0.17942 0 1 0
+0.5 -0.0554332 0.0638709 1 0 0
+-0.456789 0.371795 -0.132681 0 1 0
+0.331338 -0.231262 0.320513 0 0 1
+-0.391973 0.371795 -0.218595 0 1 0
+0.0192418 -0.162022 -0.333333 0 0 1
+-0.5 -0.0441534 0.29681 1 0 0
+-0.251824 0.371795 0.262994 0 1 0
+0.364201 -0.0987593 0.353943 0.933309 -0.359073 0
+0.196378 -0.371795 -0.340439 0 1 0
+0.177154 0.111897 -0.333333 0 0 1
+0.109729 0.256282 0.335794 0 1 0
+0.5 -0.192328 -0.295577 1 0 0
+0.391736 -0.227024 -0.371795 0 0 1
+-0.204019 0.0342804 -0.111794 0.580305 0.814357 -0.00834297
+0.5 -0.189129 0.214004 1 0 0
+-0.147841 0.0571513 -0.333333 0 0 1
+0.5 -0.122118 -0.349588 1 0 0
+-0.38999 0.371795 0.0815232 0 1 0
+-0.212215 0.371795 -0.323987 0 1 0
+-0.404538 -0.371795 -0.195092 0 1 0
+-0.048001 -0.294872 0.209156 0 1 0
+-0.199344 0.0299848 -0.234511 0.720086 0.693786 -0.0117416
+0.213 -0.248531 -0.371795 0 0 1
+0.185963 0.15547 -0.333333 0 0 1
+-0.5 0.209205 -0.0781687 1 0 0
+0.225476 -0.0379984 -0.186741 0.142213 0.989769 0.0115547
+-0.316661 0.371795 -0.303646 0 1 0
+0.141109 -0.328397 -0.0312335 1 0 0
+-0.284303 -0.219015 -0.343157 0.539264 0.842127 -0.00399705
+0.335168 -0.371795 -0.0341883 0 1 0
+-0.207781 0.0369149 -0.263189 0.515859 0.856354 0.0233914
+0.277732 0.294872 -0.0923465 0 1 0
+0.227084 -0.038139 -0.0613487 0.126377 0.991982 0.00118935
+-0.448718 -0.325311 0.310698 0.99702 0.0289946 -0.0714854
+-0.392124 -0.371795 -0.0372752 0 1 0
+0.263953 0.149927 0.371795 0 0 1
+0.141026 0.330762 0.26759 1 0 0
+-0.141154 -0.296843 0.291165 0.822672 -0.563418 0.0759727
+0.202613 -0.353231 0.320513 0 0 1
+-0.237769 0.230897 -0.359686 -0.00533597 0.999982 -0.00262608
+0.244307 0.183738 0.371795 0 0 1
+0.00620262 0.265438 -0.371795 0 0 1
+-0.5 0.141411 -0.361236 1 0 0
+-0.253866 0.364358 0.320513 0.0510415 0.310577 0.949177
+0.5 -0.156891 0.214087 1 0 0
+-0.5 0.322278 -0.0296242 1 0 0
+0.458494 -0.278978 -0.371795 0 0 1
+0.334805 -0.371795 -0.241903 0 1 0
+0.355977 0.294872 -0.0870018 0 1 0
+0.5 -0.142808 -0.284036 1 0 0
+-0.111566 0.371795 0.187227 0 1 0
+0.495402 -0.294872 0.13655 -0.494992 0.86737 -0.0514889
+-0.196563 0.0268548 -0.290745 0.810817 0.585291 0.00314315
+-0.0627241 0.345228 -0.371795 0 0 1
+-0.203158 0.0336775 -0.238881 0.637853 0.770052 -0.0127757
+0.5 -0.223441 -0.343637 1 0 0
+-0.5 -0.268776 0.173482 1 0 0
+0.5 -0.105111 0.230598 1 0 0
+0.141026 0.338612 -0.158887 1 0 0
+0.5 -0.0422955 0.0333282 1 0 0
+-0.370702 0.371795 -0.0683906 0 1 0
+0.447291 -0.244828 0.320513 0 0 1
+0.37487 -0.223318 0.320513 0 0 1
+0.469956 -0.294872 -0.105696 0 1 0
+0.310638 -0.0924444 0.371795 0 0 1
+0.117595 0.248588 -0.371795 0 0 1
+-0.141154 -0.354338 0.142974 1 0 0
+0.411867 0.294872 0.107037 0 1 0
+0.238733 -0.371795 -0.0863633 0 1 0
+0.478356 -0.0560676 -0.371795 0 0 1
+-0.361427 0.371795 0.307201 0 1 0
+-0.225841 -0.371795 0.183326 0 1 0
+-0.24635 -0.284521 -0.371795 0 0 1
+-0.42349 0.371795 0.185433 0 1 0
+-0.17914 -0.099801 0.334788 0.86409 0.503311 -0.00508255
+-0.334338 0.371795 0.215633 0 1 0
+0.172829 -0.225457 0.371795 0 0 1
+0.173296 0.294872 0.126414 0 1 0
+-0.5 0.0477775 0.101795 1 0 0
+-0.5 -0.174886 -0.209115 1 0 0
+0.305819 -0.371795 -0.0269874 0 1 0
+-0.389588 0.118163 -0.371795 0 0 1
+0.273736 -0.371795 -0.296755 0 1 0
+0.282252 0.194194 0.371795 0.00306725 0.00551995 0.99998
+0.5 -0.253103 -0.0691112 1 0 0
+-0.284952 0.239186 -0.371795 0 0 1
+-0.5 0.0155093 0.0201305 1 0 0
+-0.21076 -0.215535 0.371795 0 0 1
+-0.352405 -0.371795 -0.30215 0 1 0
+0.311271 -0.371795 0.188761 0 1 0
+-0.252723 0.371795 0.242248 0 1 0
+-0.405133 -0.167932 0.320513 0 0 1
+-0.346709 -0.133235 0.351531 0.865667 0.500617 -0.0017399
+-0.0232953 0.324159 0.320513 0 0 1
+-0.422358 0.137493 0.320513 0 0 1
+0.141109 -0.337221 0.0265122 1 0 0
+0.5 0.00127044 0.0700906 1 0 0
+0.0172515 -0.294872 0.0226362 0 1 0
+-0.399778 -0.220561 0.320513 0 0 1
+-0.310221 0.0359445 -0.333333 -0.0482621 -0.00453291 0.998824
+-0.415743 -0.304596 0.320513 0 0 1
+0.268624 0.00676256 -0.318308 0.986592 0.162935 0.00939842
+-0.448718 -0.326183 -0.260053 1 0 0
+0.315996 0.179828 -0.366763 0.949484 0.250433 0.189113
+-0.201641 0.245441 0.362347 -0.291344 0.952652 0.0870261
+-0.220509 0.371795 -0.197927 0 1 0
+0.405342 -0.169035 -0.371795 0 0 1
+-0.23728 0.0430202 -0.038105 -0.187166 0.928816 0.319796
+-0.196527 -0.0427908 0.320513 0.136581 0.0629174 0.988629
+-0.0516814 0.0687754 -0.333333 0 0 1
+-0.0986027 0.350368 0.320513 0 0 1
+0.350667 0.214642 0.320513 0 0 1
+0.216763 0.0357448 -0.177802 -0.415494 0.909533 0.0106728
+0.463908 -0.294872 0.187216 0 1 0
+-0.308039 -0.371795 0.280225 0 1 0
+-0.141154 -0.308034 0.12624 1 0 0
+-0.18216 -0.0939479 0.361658 0.949807 0.3088 0.0500945
+-0.124793 -0.294872 -0.245428 0 1 0
+0.0301281 -0.294872 -0.159654 0 1 0
+-0.213468 0.371795 0.236811 0 1 0
+0.183688 -0.0904637 0.334774 0.913911 -0.405901 -0.00330569
+-0.303175 0.202479 -0.350999 0.770695 -0.636258 0.0347107
+-0.457212 -0.219781 0.320513 0 0 1
+0.353884 0.120095 0.324773 0.889681 0.398735 0.222436
+-0.212198 0.182064 0.371795 0 0 1
+0.129826 0.371795 0.268436 0.0427436 0.999041 -0.0094918
+-0.233307 0.157059 0.371795 0 0 1
+-0.0247752 -0.0632616 -0.333333 0 0 1
+0.447757 -0.152569 -0.371795 0 0 1
+0.351704 0.294872 0.0417533 0 1 0
+-0.414943 -0.309768 -0.371795 0 0 1
+0.0739633 -0.294872 0.31159 -0.0130798 0.998276 -0.0572258
+-0.448422 -0.238919 0.320513 0 0 1
+0.0594476 0.371795 0.307765 0 1 0
+0.5 -0.0877264 0.229967 1 0 0
+0.496291 -0.117734 -0.371795 -0.357784 -0.0812345 0.930264
+0.5 0.0200168 -0.0671935 1 0 0
+-0.448718 -0.326718 0.313221 0.984832 0.104503 -0.138508
+0.225587 -0.0709161 -0.333333 0 0 1
+0.438567 0.0386081 -0.371795 0 0 1
+-0.0780175 0.230897 -0.361022 0 1 0
+-0.5 0.156003 -0.189504 1 0 0
+-0.257225 -0.371795 -0.0635256 0 1 0
+0.5 0.0638223 -0.252853 1 0 0
+-0.284538 -0.218851 -0.368764 0.383087 0.627912 -0.677474
+0.141026 0.350228 -0.22727 1 0 0
+0.203731 0.0184037 0.357079 0.996587 0.0825511 0
+0.312341 -0.210255 0.320513 0 0 1
+0.146737 -0.108363 0.320513 0 0 1
+-0.5 0.15077 -0.296089 1 0 0
+-0.241817 0.220109 -0.333333 0.000987817 0.0347559 0.999395
+0.492284 -0.294872 -0.213574 -0.28227 0.955577 0.0848309
+0.165268 0.230897 -0.338227 -0.0214405 0.997825 0.0623376
+-0.118556 0.371795 -0.351052 0 1 0
+-0.5 0.2812 0.292407 1 0 0
+-0.104755 0.201219 -0.333333 0 0 1
+0.252469 0.166234 -0.333333 0 0 1
+0.215329 0.143896 0.371795 0 0 1
+0.446725 -0.213526 -0.371795 0 0 1
+0.448718 -0.340295 -0.357873 1 0 0
+-0.369192 0.371795 -0.22769 0 1 0
+-0.0652828 0.371795 0.00732341 0 1 0
+0.455358 0.294872 -0.131733 0 1 0
+-0.141154 -0.355357 -0.251825 1 0 0
+0.119517 0.269962 0.320513 0 0 1
+0.494145 0.109684 0.320513 0.258907 0.0466822 0.964774
+0.141026 0.336652 -0.203801 1 0 0
+-0.191351 -0.371795 -0.205457 0 1 0
+-0.458393 0.0413492 -0.371795 0 0 1
+-0.319488 -0.267461 -0.371795 0 0 1
+-0.0978599 0.371795 -0.247094 0 1 0
+0.448718 -0.308543 -0.0137402 1 0 0
+-0.00604961 0.292311 0.320513 0 0 1
+0.0420653 -0.294872 0.0945536 0 1 0
+-0.484106 0.371795 0.227293 0 1 0
+-0.490897 -0.294872 0.105263 0.0443655 0.998924 0.013495
+0.120117 -0.294872 -0.261416 0 1 0
+0.479324 -0.270358 0.320513 0 0 1
+0.24366 -0.317851 -0.371795 0 0 1
+0.338392 0.145785 0.363409 0.800529 0.599294 0
+0.5 -0.243863 0.0161603 1 0 0
+-0.5 0.103266 0.146334 1 0 0
+0.5 0.11339 0.160064 1 0 0
+-0.161056 -0.206114 -0.333333 0 0 1
+0.095307 0.0510537 -0.333333 0 0 1
+0.277664 -0.231752 0.320513 0 0 1
+-0.0093454 -0.190953 -0.333333 0 0 1
+0.252577 -0.213578 -0.333333 0 0 1
+-0.0906873 0.0534091 -0.333333 0 0 1
+-0.482104 0.271773 -0.371795 0 0 1
+0.0681083 0.371795 0.313258 -0.00926185 0.996613 0.0817137
+-0.280978 -0.371795 0.284368 0 1 0
+-0.343711 -0.233457 0.320513 0 0 1
+0.180689 -0.0490693 0.320513 0 0 1
+-0.421253 0.371795 0.0917982 0 1 0
+-0.19092 0.304561 0.320513 0 0 1
+-0.0241135 -0.294872 -0.221926 0 1 0
+-0.405079 -0.0886022 -0.371795 0 0 1
+0.356241 -0.0374359 -0.371795 0 0 1
+-0.5 0.28724 -0.294793 1 0 0
+-0.166007 -0.31503 0.320513 0 0 1
+-0.190139 -0.0156182 -0.0751911 0.938245 -0.345961 -0.00274332
+-0.306736 -0.371795 0.209193 0 1 0
+0.0211275 -0.104213 -0.333333 0 0 1
+0.430452 0.0179876 0.320513 0 0 1
+0.439556 -0.255504 0.320513 0 0 1
+-0.479693 0.371795 0.198755 0 1 0
+-0.5 0.207485 0.0674765 1 0 0
+0.164093 0.294872 -0.0912147 0 1 0
+-0.0612127 0.371795 -0.0132547 0 1 0
+-0.377225 0.370432 -0.371795 -0.118028 -0.235015 0.964799
+-0.176332 -0.371795 0.251975 0 1 0
+0.144178 0.00256384 -0.333333 0 0 1
+0.5 0.224159 -0.274851 1 0 0
+-0.371708 -0.371795 -0.143122 0 1 0
+0.3571 -0.114206 0.358156 0.877666 -0.479272 0
+-0.0180055 -0.294872 0.00980531 0 1 0
+-0.390539 0.229162 0.320513 0 0 1
+-0.0177989 0.0722951 0.320513 0 0 1
+-0.5 0.068242 -0.258908 1 0 0
+0.5 -0.26216 0.245872 1 0 0
+-0.368124 0.0886321 -0.371795 0 0 1
+-0.342141 -0.140777 0.331727 0.827113 0.562036 0
+0.5 -0.0520846 -0.286333 1 0 0
+0.5 0.174589 -0.0827776 1 0 0
+0.411126 -0.371795 -0.188933 0 1 0
+0.00602475 0.371795 -0.339597 0 1 0
+-0.358454 0.0756789 -0.371795 0 0 1
+0.314008 -0.301954 0.320513 0 0 1
+0.188821 0.078761 0.342586 0.915772 0.401699 0
+-0.180402 0.371795 -0.000594587 0 1 0
+0.145833 0.294872 -0.267279 0.226385 0.972364 0.0570733
+0.230519 0.294872 0.0266561 0 1 0
+0.5 -0.0434799 0.0621478 1 0 0
+0.0246705 -0.294872 -0.314377 0 1 0
+-0.0206246 0.256282 0.359388 0 1 0
+-0.000218503 -0.294872 -0.291361 0 1 0
+0.392817 0.294872 -0.362715 0 1 0
+-0.175468 0.371795 -0.257735 0 1 0
+-0.5 0.114013 0.189929 1 0 0
+0.182685 -0.0927508 0.363334 0.872858 -0.463654 -0.152129
+-0.153383 -0.371795 -0.249894 0 1 0
+-0.0924659 -0.294872 -0.0343146 0 1 0
+0.0306962 -0.24949 -0.371795 0 0 1
+-0.278866 -0.222077 -0.33481 0.435681 0.685613 -0.583195
+0.491939 0.0602758 0.320513 0 0 1
+0.5 0.088187 0.117193 1 0 0
+0.5 0.0468058 -0.154471 1 0 0
+0.49358 -0.294872 -0.277056 -0.021745 0.999743 0.00643822
+-0.0796311 0.256282 0.352966 0 1 0
+-0.489076 -0.294872 -0.352468 0.039608 0.9992 0.00550747
+-0.491057 -0.294872 -0.0451391 0.121063 0.992026 -0.0350508
+-0.363354 0.371795 0.141845 0 1 0
+-0.234559 -0.371795 0.248861 0 1 0
+-0.299641 0.371795 0.0849862 0 1 0
+-0.332371 -0.371795 -0.134961 0 1 0
+-0.330084 -0.122951 -0.371795 0 0 1
+-0.408476 -0.187692 0.320513 0 0 1
+0.191678 0.254723 0.320513 0 0 1
+0.168588 0.202906 -0.333333 0 0 1
+0.00763664 -0.207146 -0.333333 0 0 1
+-0.5 -0.276643 -0.205523 1 0 0
+0.5 0.0806222 -0.137902 1 0 0
+0.386326 -0.371795 0.0359155 0 1 0
+-0.466199 -0.129625 -0.371795 0 0 1
+0.255224 -0.327631 0.320513 0 0 1
+0.10001 -0.291624 -0.371795 0.0560685 0.562543 0.824865
+0.204295 -0.371795 0.289991 0 1 0
+-0.5 0.174441 0.144744 1 0 0
+0.5 -0.0178398 -0.214121 1 0 0
+0.141026 0.367185 -0.159293 0.919713 0.371133 0.128017
+0.251572 -0.371795 0.218498 0 1 0
+-0.5 -0.0380252 -0.298928 1 0 0
+-0.0248161 -0.294872 0.0287359 0 1 0
+0.392676 0.294872 -0.132326 0 1 0
+-0.5 0.191047 0.157885 1 0 0
+-0.5 -0.217899 0.186417 1 0 0
+0.5 -0.174259 -0.191214 1 0 0
+0.141026 0.304201 -0.256625 0.976124 0.216443 0.0182804
+-0.141154 -0.34154 -0.277708 1 0 0
+0.5 -0.100932 0.286502 1 0 0
+-0.0374372 0.371795 -0.176634 0 1 0
+-0.295789 0.0219879 0.371795 0 0 1
+0.430353 0.294872 -0.142731 0 1 0
+-0.5 -0.265822 0.218128 1 0 0
+-0.394615 -0.371795 0.254157 0 1 0
+0.5 0.222854 -0.359972 0.999549 0.00941627 -0.0285154
+0.141109 -0.365889 0.139213 0.998602 0.0528093 0.00208975
+0.471844 0.158572 -0.371795 0 0 1
+-0.5 0.168485 0.163825 1 0 0
+0.348534 -0.132843 0.320513 0.515547 -0.350122 0.782065
+-0.218378 0.215045 0.371795 0 0 1
+-0.141154 -0.30154 0.119329 0.983022 -0.174165 -0.0577481
+-0.372578 -0.0763003 0.348377 0.948411 0.317004 0.00495202
+-0.0323976 0.371795 0.129054 0 1 0
+-0.299474 -0.263134 0.320513 0 0 1
+0.141109 -0.352794 -0.0015271 1 0 0
+-0.0214191 0.371795 0.271566 0 1 0
+-0.0139359 -0.230897 -0.360247 0 1 0
+0.0786842 0.180489 0.320513 -0.0216493 -0.0650928 0.997644
+0.370944 0.294872 0.278835 0 1 0
+0.33287 0.153162 0.351041 0.800547 0.59927 0
+-0.245398 0.285635 -0.371795 0 0 1
+-0.318994 -0.0775944 0.371795 0 0 1
+0.411219 0.100869 0.320513 0 0 1
+-0.5 -0.148765 -0.354889 1 0 0
+0.320513 0.12576 -0.356806 1 0 0
+-0.240153 -0.0424413 -0.323392 0.222751 0.974774 0.0140718
+0.429609 -0.371795 -0.285231 0 1 0
+-0.5 0.280128 0.113658 1 0 0
+0.448718 -0.359286 -0.285039 1 0 0
+0.462913 -0.249469 0.320513 0 0 1
+-0.0501066 -0.199023 0.350332 0.247371 0.968897 0.00677704
+0.174108 0.230897 -0.335373 0.07747 0.944502 0.319241
+0.444438 -0.371795 -0.249198 -0.231596 0.972631 -0.0187852
+-0.450237 0.371795 -0.331295 0 1 0
+0.318189 -0.371795 -0.115078 0 1 0
+-0.426276 -0.131291 0.320513 0 0 1
+0.395358 0.294872 -0.0018335 0 1 0
+0.433393 0.294872 0.244974 0 1 0
+-0.5 -0.029197 0.316348 0.840283 -0.0401969 -0.540656
+-0.5 0.271799 0.0526892 1 0 0
+0.372099 0.143661 0.320513 0 0 1
+0.087587 -0.294872 0.297909 0 1 0
+0.328904 0.267503 0.320513 0 0 1
+-0.0835295 0.371795 0.141744 0 1 0
+0.202046 0.0354054 0.358408 0.982001 0.188864 0.00206697
+0.5 0.187019 -0.120572 1 0 0
+-0.272529 -0.371795 0.0573767 0 1 0
+-0.458472 0.118061 -0.371795 0 0 1
+0.119847 -0.152011 0.320513 -0.00055579 0.000147279 1
+-0.304775 -0.371795 -0.331848 0 1 0
+-0.246075 -0.371795 -0.0679058 0 1 0
+-0.295048 -0.371795 -0.153967 0 1 0
+0.5 0.0509546 0.305056 1 0 0
+0.106626 -0.282522 -0.371795 0 0 1
+0.5 0.289447 -0.00455911 0.90133 0.432869 -0.0151202
+0.421856 -0.345373 -0.371795 0 0 1
+0.5 0.0167954 0.0662341 1 0 0
+0.5 -0.142834 0.223736 1 0 0
+0.431633 -0.177727 -0.371795 0 0 1
+-0.5 -0.0385111 -0.046037 1 0 0
+-0.320513 -0.0654173 -0.369528 0.950797 0.0278277 -0.308563
+-0.452479 -0.202533 0.320513 0 0 1
+-0.168926 0.195153 -0.333333 0 0 1
+-0.5 0.134679 -0.3442 1 0 0
+-0.390817 0.0733979 0.320513 0 0 1
+-0.141154 -0.336241 0.0946597 1 0 0
+-0.0635103 -0.269218 0.320513 -0.0011573 -0.0119933 0.999927
+-0.0772479 0.371795 0.229623 0 1 0
+-0.497726 0.371795 0.249309 -0.494363 0.863465 -0.100167
+-0.0449443 -0.294872 0.155366 0 1 0
+-0.5 -0.106773 -0.293794 1 0 0
+-0.5 -0.0679464 0.036764 1 0 0
+0.138566 -0.210791 -0.333333 0 0 1
+-0.300431 0.371795 -0.3644 -0.0235258 0.992425 -0.120581
+-0.0475291 -0.223904 0.371795 0 0 1
+0.213554 -0.151352 0.371795 0 0 1
+0.19714 -0.0185419 -0.265581 0.887315 0.461 -0.0122962
+-0.0939492 0.0591642 -0.333333 0 0 1
+-0.336629 0.371795 -0.34796 0 1 0
+-0.108742 0.245013 -0.371795 0 0 1
+-0.320436 -0.160065 -0.371795 0.822094 -0.0248499 -0.56881
+0.299436 -0.150781 0.371795 0 0 1
+0.5 0.0840711 0.290438 1 0 0
+-0.181868 -0.371795 -0.361641 -0.0275934 0.99583 0.0869594
+-0.0432647 0.371795 0.232083 0 1 0
+-0.371664 0.0818221 -0.371795 0 0 1
+-0.446741 -0.371795 -0.0800072 0.521986 0.845365 -0.113527
+-0.304924 0.371795 0.165818 0 1 0
+0.5 0.0268537 0.0977744 1 0 0
+0.327798 0.294872 -0.223752 0 1 0
+0.070812 0.13405 0.320513 0 0 1
+0.328288 0.272047 0.320513 0 0 1
+0.195961 0.0160144 -0.172565 0.907014 -0.420471 -0.0230042
+-0.161828 0.349947 0.320513 0 0 1
+-0.0435617 0.371795 0.0892161 0 1 0
+-0.029681 -0.294872 0.0367017 0 1 0
+-0.470619 -0.115611 -0.371795 0 0 1
+0.383863 -0.00872792 0.351537 0.997656 -0.0684338 -0.000335653
+0.149575 0.294872 -0.0714333 0.199399 0.979911 -0.0039071
+-0.0111249 -0.294872 -0.12226 0 1 0
+0.233954 -0.370987 -0.371795 -0.050084 0.729022 0.682655
+-0.242779 -0.371795 0.043912 0 1 0
+0.5 0.270743 0.051648 1 0 0
+0.444276 -0.353824 -0.371795 -0.509136 0.284532 0.812294
+-0.5 -0.0582206 -0.134695 1 0 0
+0.146868 -0.303933 -0.371795 0.40523 -0.0400993 0.913335
+-0.219584 -0.327669 0.320513 0 0 1
+0.5 -0.147344 0.0922379 1 0 0
+-0.423429 0.301835 -0.371795 0 0 1
+-0.0862737 0.285714 0.320513 0 0 1
+0.061679 0.371795 -0.367789 -0.0245317 0.915365 -0.401877
+-0.5 -0.202998 0.0987651 1 0 0
+0.448718 -0.297944 0.197962 0.920241 -0.389087 0.0420438
+-0.234548 0.371795 -0.0686945 0 1 0
+0.5 0.262375 -0.274248 1 0 0
+-0.245339 -0.191139 0.371795 0 0 1
+0.497187 -0.260657 -0.371795 -0.30604 0 0.952019
+0.0837217 -0.294872 0.0597233 0 1 0
+0.0856365 -0.190586 0.371795 -0.0885717 0.41093 0.907354
+-0.5 -0.208786 0.273951 1 0 0
+-0.16197 0.126078 0.322484 0.683956 -0.583994 0.437213
+-0.0246218 -0.221248 0.371795 0 0 1
+-0.488511 -0.294872 0.187885 0 1 0
+-0.478179 -0.0773069 -0.371795 0 0 1
+0.260767 0.052357 0.371795 0 0 1
+-0.404026 0.371795 0.174909 0 1 0
+-0.243496 0.371795 -0.10451 0 1 0
+-0.448718 -0.353808 0.270985 1 0 0
+0.497193 -0.294872 -0.335703 -0.37118 0.921575 -0.11369
+-0.20741 -0.175394 -0.333333 0 0 1
+0.355823 0.197251 -0.371795 0 0 1
+-0.396529 -0.371795 -0.2038 0 1 0
+-0.47159 0.371795 0.149549 0 1 0
+0.141026 0.360239 -0.0926345 1 0 0
+-0.373337 0.269098 -0.371795 0 0 1
+0.454298 0.294872 -0.00187049 0 1 0
+0.161112 0.294872 -0.249794 0 1 0
+-0.145228 0.371795 -0.239657 0 1 0
+0.141109 -0.301591 -0.0265799 0.989385 0.142419 -0.0288619
+-0.395758 -0.358337 -0.371795 0 0 1
+-0.0505837 0.371795 -0.0160431 0 1 0
+0.295521 -0.371795 -0.0892073 0 1 0
+-0.410578 0.0960602 0.320513 0 0 1
+-0.128085 0.371795 -0.0250128 0 1 0
+-0.465068 -0.119189 -0.371795 0 0 1
+-0.5 -0.100413 0.270471 1 0 0
+-0.397686 -0.202634 0.320513 0 0 1
+0.496279 -0.294872 0.190932 -0.312918 0.949779 -0.00134652
+-0.348252 -0.371795 0.235236 0 1 0
+-0.341509 -0.371795 -0.21671 0 1 0
+-0.5 -0.0592909 -0.0888398 1 0 0
+0.308716 0.294872 -0.146213 0 1 0
+0.5 -0.0355587 0.304261 1 0 0
+0.472906 0.294872 -0.0511728 0 1 0
+-0.5 -0.170783 -0.158582 1 0 0
+-0.12649 0.371795 -0.0827494 0 1 0
+0.173642 -0.371795 0.0697891 0 1 0
+-0.060552 0.00300569 -0.333333 0 0 1
+-0.5 -0.293515 0.205717 0.654018 0.708006 0.266437
+0.315259 0.0712548 -0.333333 0.450981 0.0654401 0.890131
+-0.232743 0.0434171 -0.0754705 -0.0277043 0.999434 0.0190717
+-0.5 -0.127761 -0.297469 1 0 0
+-0.468796 -0.186961 0.320513 0 0 1
+-0.5 0.18025 0.278688 1 0 0
+0.246998 -0.0347084 -0.0414861 -0.443374 0.896121 0.0196685
+0.5 0.0817205 -0.0319071 1 0 0
+0.465927 -0.294872 0.252797 0 1 0
+0.294809 -0.371795 -0.193085 0 1 0
+0.0193309 0.114401 0.320513 0 0 1
+0.199043 0.230897 -0.359485 0 1 0
+-0.470912 -0.294872 0.123239 0 1 0
+-0.445189 -0.371795 -0.0908882 0.470311 0.852035 0.22988
+0.0618807 -0.294872 0.0793953 0 1 0
+-0.334186 0.371795 -0.0271874 0 1 0
+-0.0661768 0.256282 0.35962 0.0283605 0.997164 0.0697121
+0.448718 -0.36521 0.132137 0.952832 -0.301366 0.0359103
+-0.5 -0.137709 -0.0443959 1 0 0
+0.319133 0.294872 0.0425937 0 1 0
+0.115964 0.371795 0.273878 0 1 0
+0.485173 0.294872 -0.201411 0 1 0
+-0.244234 0.0413478 -0.143203 -0.303134 0.952944 -0.00283622
+-0.309703 -0.371795 0.130142 0 1 0
+-0.341386 0.371795 0.174691 0 1 0
+0.441925 0.193133 0.320513 0 0 1
+-0.5 0.14319 0.101793 1 0 0
+0.260399 -0.371795 -0.321763 0 1 0
+0.0273136 -0.050978 0.320513 0 0 1
+-0.0862129 0.143208 0.320513 0 0 1
+0.0455531 -0.294872 -0.213916 0 1 0
+0.446318 0.220006 0.320513 0 0 1
+0.105124 -0.283361 0.320513 0 0 1
+0.238763 -0.198679 -0.333333 0 0 1
+-0.5 0.351686 -0.0160483 1 0 0
+0.190637 0.294872 -0.202888 0 1 0
+-0.5 0.254142 -0.0100188 1 0 0
+0.320513 0.00870246 -0.371408 0.606325 0.0241278 0.794851
+-0.244309 -0.0845987 0.371795 0 0 1
+-0.292064 -0.36832 0.320513 0.0718314 -0.341189 0.937246
+0.141026 0.311882 0.184817 1 0 0
+-0.438747 -0.371795 -0.328126 0 1 0
+-0.134292 -0.18468 0.371795 0 0 1
+-0.44154 0.341878 -0.371795 0 0 1
+-0.281783 0.276831 0.320513 0 0 1
+0.0982842 0.371795 0.163229 0 1 0
+-0.5 -0.273836 0.0230332 1 0 0
+-0.5 -0.0791239 -0.276288 1 0 0
+0.483403 -0.294872 -0.244833 0 1 0
+-0.33423 -0.371795 -0.346556 0 1 0
+-0.305365 -0.371795 0.0520791 0 1 0
+0.159936 -0.00310029 0.320513 0 0 1
+-0.448734 0.371795 -0.274344 0 1 0
+0.0317323 -0.182129 0.320513 0 0 1
+0.223388 0.294872 -0.126291 0 1 0
+0.0310389 -0.228856 0.371795 0 0 1
+-0.262257 0.215043 -0.333333 0 0 1
+0.0957623 0.371795 0.011044 0 1 0
+-0.24736 0.371795 0.287638 0 1 0
+0.0401907 -0.294872 0.0688852 0 1 0
+0.192623 0.294872 0.0682273 0 1 0
+0.442423 0.154172 0.320513 0 0 1
+-0.249093 -0.0393685 -0.278855 0.427794 0.903759 -0.0145395
+0.0678299 -0.0605207 -0.333333 0 0 1
+0.176078 -0.371795 -0.0260873 0 1 0
+-0.116901 0.266267 -0.371795 0 0 1
+-0.438105 0.371795 0.0833656 0 1 0
+0.136775 -0.255669 0.338116 -0.0687621 0.997632 -0.00149293
+0.280213 -0.117097 -0.333333 0 0 1
+-0.262308 0.265024 0.320513 0 0 1
+-0.451161 -0.0532973 -0.371795 0 0 1
+0.410891 0.00366553 0.320513 0 0 1
+0.312885 -0.371795 0.237641 0 1 0
+-0.222249 0.193362 0.371795 0 0 1
+-0.130492 -0.294872 0.235793 0 1 0
+-0.381818 0.199763 0.320513 0 0 1
+0.0306932 -0.294872 0.133691 0 1 0
+0.448718 -0.337898 0.24501 1 0 0
+0.129056 0.371795 -0.0379231 0 1 0
+-0.29356 -0.0335998 -0.333333 0 0 1
+0.364685 0.166716 0.320513 0 0 1
+-0.199177 -0.0298184 -0.126026 0.726224 -0.687376 0.0105616
+0.31093 -0.214962 -0.371795 0 0 1
+-0.5 0.256413 -0.203585 1 0 0
+-0.0783327 0.181663 -0.333333 0 0 1
+-0.318817 0.19998 -0.371795 -0.00462948 0.00126746 0.999988
+0.214775 -0.371795 -0.277145 0 1 0
+0.38041 0.294872 0.155213 0 1 0
+-0.398068 -0.371795 0.244516 0 1 0
+0.241258 0.293018 0.320513 0.0316312 0.471038 0.881546
+-0.22576 0.196682 -0.333333 0 0 1
+0.141026 0.338085 -0.302315 1 0 0
+-0.196989 0.0274633 -0.319089 0.779325 0.626523 0.0110169
+-0.170852 -0.371795 -0.300057 0 1 0
+-0.0937905 0.371795 0.176481 0 1 0
+0.365764 0.242139 0.320513 0 0 1
+-0.263654 -0.371795 0.0813251 0 1 0
+0.082913 0.371795 0.106879 0 1 0
+0.388518 -0.371795 0.0599472 0 1 0
+-0.400637 -0.371795 0.0448411 0 1 0
+-0.5 0.156299 -0.344997 1 0 0
+-0.0680085 0.177429 -0.333333 0 0 1
+-0.5 0.358123 -0.2443 1 0 0
+-0.20146 -0.316514 0.320513 0 0 1
+-0.5 -0.185633 -0.162339 1 0 0
+-0.129137 0.371795 -0.257344 0 1 0
+0.00706201 0.00398304 -0.333333 0 0 1
+0.00685193 0.297188 0.320513 0 0 1
+-0.5 0.191122 0.0874613 1 0 0
+-0.406065 0.370313 -0.371795 -0.0544562 -0.665463 0.744442
+0.281407 -0.371795 -0.169502 0 1 0
+0.00262859 -0.294872 0.145134 0 1 0
+0.0530349 -0.294872 -0.307752 0 1 0
+-0.5 0.0846975 -0.169096 1 0 0
+0.5 0.248105 -0.147851 1 0 0
+-0.448669 0.371795 -0.205808 0 1 0
+-0.5 -0.156277 0.0667449 1 0 0
+0.221905 -0.0372915 -0.0946639 0.181965 0.983265 0.00884631
+-0.00489332 0.371795 0.00382532 0 1 0
+0.457727 -0.294872 0.0811757 -0.0534957 0.998564 -0.00291391
+0.211162 -0.371795 -0.305359 0 1 0
+0.209505 -0.371795 0.0745891 0 1 0
+-0.5 -0.10381 -0.0937037 1 0 0
+0.435525 -0.337637 0.320513 0 0 1
+0.227168 -0.371795 -0.146613 0 1 0
+0.402052 0.294872 -0.143389 0 1 0
+0.0795103 0.0794165 -0.333333 0 0 1
+-0.447254 0.168974 -0.371795 0 0 1
+-0.232946 -0.312766 0.320513 0 0 1
+-0.200666 -0.371795 0.113517 0 1 0
+0.242086 0.294872 -0.296305 0 1 0
+0.242146 0.294872 0.294876 0 1 0
+0.295356 -0.0725606 -0.333333 0 0 1
+0.133795 0.371795 -0.316745 0.188386 0.978294 -0.0863256
+-0.5 0.152477 -0.0177764 1 0 0
+0.391533 0.0463972 0.320513 0 0 1
+-0.292503 -0.172371 0.371795 0 0 1
+-0.165037 -0.127346 -0.333333 0 0 1
+-0.448718 -0.327791 0.0903856 1 0 0
+-0.5 -0.291283 -0.0486432 0.947268 0.31142 0.0755043
+-0.5 -0.0834365 0.102577 1 0 0
+0.0689141 -0.294872 0.155788 0 1 0
+-0.129869 -0.294872 0.216381 -0.0170186 0.999833 -0.00671602
+0.423295 0.294872 -0.161834 0 1 0
+0.00274691 0.371795 0.149861 0 1 0
+-0.43586 0.371795 -0.0651877 0 1 0
+0.5 0.272647 0.0960415 1 0 0
+0.30935 0.280936 -0.371795 -0.00260311 -0.0168027 0.999855
+-0.440558 0.371795 -0.243465 0 1 0
+0.429978 0.152556 -0.371795 0 0 1
+0.120297 0.371795 -0.185156 0 1 0
+-0.304959 0.371795 -0.169323 0 1 0
+-0.20398 0.371795 -0.181596 0 1 0
+-0.162923 -0.228833 0.371795 0 0 1
+0.5 0.282321 -0.337471 1 0 0
+-0.412443 -0.0242587 0.320513 0 0 1
+0.132996 0.125214 -0.333333 0 0 1
+0.141109 -0.363258 -0.115668 0.99422 0.107358 0.000833983
+-0.339427 0.0270997 0.371795 0 0 1
+0.5 0.0671109 -0.226349 1 0 0
+0.328128 -0.260144 0.320513 0 0 1
+-0.446902 0.371795 0.15169 0 1 0
+0.493299 0.294872 0.167631 0.17242 0.984882 -0.0166712
+-0.36075 0.371795 0.169553 0 1 0
+0.244555 0.294872 0.283166 0 1 0
+0.2157 -0.240197 0.342379 -0.349463 0.93695 0
+0.350938 -0.305349 0.320513 0 0 1
+0.5 -0.0369712 0.103759 1 0 0
+0.222493 -0.267542 -0.371795 0 0 1
+0.347752 0.097264 0.371795 0 0 1
+-0.227711 -0.255804 0.320513 0 0 1
+0.394331 0.294872 -0.0834219 0 1 0
+-0.0681226 -0.247009 0.371795 0.099081 -0.116644 0.988219
+0.320513 0.07987 -0.353559 1 0 0
+0.261824 0.294872 -0.223124 0 1 0
+0.0134518 0.371795 -0.362643 0.00336013 0.999947 -0.00975941
+-0.293383 0.371795 -0.142614 0 1 0
+0.00977087 -0.294872 -0.27555 0 1 0
+-0.323722 -0.371795 0.2283 0 1 0
+-0.5 -0.218621 0.0113602 1 0 0
+0.427784 0.294872 0.135464 0 1 0
+0.5 0.199895 0.0229012 1 0 0
+-0.247213 -0.371795 -0.20801 0 1 0
+0.5 0.224621 0.147394 1 0 0
+0.219278 0.0365875 -0.252437 -0.308459 0.951232 -0.00336068
+-0.484504 0.192162 0.320513 0 0 1
+0.219486 0.160195 0.371795 0 0 1
+-0.0372212 0.371795 0.29165 0 1 0
+-0.389422 -0.371795 0.177903 0 1 0
+0.21731 -0.319456 -0.371795 0 0 1
+-0.450883 0.371795 0.0630385 0 1 0
+0.15297 -0.371795 -0.298861 0 1 0
+0.233553 -0.313448 -0.371795 0 0 1
+-0.5 0.125055 0.157681 1 0 0
+-0.5 0.0298861 0.0103206 1 0 0
+0.375564 0.293008 -0.371795 0.0607529 -0.435983 0.897902
+0.497727 -0.294872 0.158949 -0.606693 0.786168 -0.117747
+-0.319407 0.371795 -0.0922633 0 1 0
+-0.141154 -0.345387 -0.0659932 1 0 0
+0.484793 -0.0518503 0.320513 0 0 1
+0.39447 0.294872 0.257809 0 1 0
+-0.5 -0.164996 -0.323858 1 0 0
+-0.119546 -0.162244 0.320513 0.272937 0.19619 0.941815
+-0.304007 -0.371795 -0.187236 0 1 0
+0.194176 -0.371795 -0.0799271 0 1 0
+0.5 -0.172246 -0.117594 1 0 0
+-0.31455 -0.263439 -0.371795 0 0 1
+0.346174 -0.371795 -0.267938 0 1 0
+0.434836 0.294872 -0.1639 0 1 0
+-0.31778 -0.213353 0.320513 0 0 1
+0.5 0.203605 0.182912 1 0 0
+0.0203279 -0.294872 -0.245157 0 1 0
+0.448718 -0.367741 0.114337 0.985137 -0.167951 -0.036008
+0.0235353 0.162676 -0.333333 0 0 1
+-0.292396 0.371795 0.0736815 0 1 0
+-0.5 -0.282886 0.288214 1 0 0
+-0.106908 -0.294872 -0.283853 0 1 0
+0.026001 0.256282 0.359168 0 1 0
+0.141026 0.362107 -0.357545 0.996813 0.0563509 0.0564636
+0.415937 -0.161968 -0.371795 0 0 1
+0.188926 -0.371795 -0.249912 0 1 0
+0.250588 0.0328971 -0.0030233 0.499438 0.817325 0.287303
+-0.185423 -0.371795 -0.231801 0 1 0
+0.30033 -0.371795 -0.169128 0 1 0
+0.141109 -0.350604 -0.0074411 1 0 0
+-0.5 0.337025 -0.241835 1 0 0
+-0.336112 0.263844 0.320513 0 0 1
+0.5 -0.169303 -0.305062 1 0 0
+-0.179749 0.22366 0.371795 0 0 1
+0.168053 -0.0290029 0.320513 0 0 1
+0.00658882 0.111792 -0.333333 0 0 1
+-0.307971 0.371795 0.148672 0 1 0
+-0.30058 0.0871966 0.371795 0 0 1
+0.139265 -0.00833613 -0.333333 0 0 1
+0.34169 -0.176998 -0.371795 0 0 1
+-0.232656 -0.288927 -0.371795 0 0 1
+-0.5 0.117863 0.126876 1 0 0
+0.5 0.0318182 -0.259538 1 0 0
+-0.263247 0.00882791 0.371795 0 0 1
+0.169095 0.115176 0.333752 0.837167 0.546948 0
+-0.5 0.0392451 0.135606 1 0 0
+-0.141154 -0.322586 -0.288957 1 0 0
+-0.0875643 0.185201 0.357129 -0.46504 0.88529 0
+0.447899 -0.1425 0.320513 0 0 1
+-0.141154 -0.30013 -0.328146 0.889362 -0.45207 0.068317
+-0.0370592 -0.294872 -0.0546533 0 1 0
+-0.0163586 0.339703 0.320513 0 0 1
+0.461081 -0.294872 -0.329 0 1 0
+-0.469943 -0.0399908 0.320513 0 0 1
+0.0372758 -0.294872 -0.326828 0 1 0
+-0.317487 -0.131347 0.371795 0 0 1
+-0.347018 -0.371795 -0.0727328 0 1 0
+0.247827 0.258666 0.320513 0 0 1
+-0.1115 0.239457 0.371795 0 0 1
+0.178782 -0.371795 0.319821 -0.128214 0.864912 -0.485271
+-0.480738 0.3717 -0.371795 0.215668 -0.651042 0.727758
+-0.14652 0.371795 -0.227466 0 1 0
+-0.5 0.182182 -0.100681 1 0 0
+-0.251821 -0.206139 0.371795 0 0 1
+0.5 0.0549318 -0.289155 1 0 0
+0.401437 0.294872 0.186433 0 1 0
+-0.0640355 0.371795 0.227566 0 1 0
+-0.420658 -0.34808 -0.371795 0 0 1
+0.448718 -0.362419 0.0348261 0.999472 -0.0325009 4.56025e-005
+-0.448718 -0.326729 0.151289 1 0 0
+-0.141154 -0.303531 0.101253 0.998928 -0.0462748 -0.00117198
+0.36474 0.294872 -0.266862 0 1 0
+0.141026 0.313432 -0.323019 1 0 0
+-0.5 0.224559 0.119771 1 0 0
+-0.469006 0.371795 0.244337 0 1 0
+-0.0859937 0.35504 0.320513 0 0 1
+-0.274504 -0.371795 -0.287931 0 1 0
+-0.144272 -0.371795 -0.302086 0.829624 -0.554659 -0.0638535
+0.5 0.114223 0.0315341 1 0 0
+0.375786 -0.0644827 0.3443 0.977143 -0.212582 -6.48559e-006
+0.247082 -0.0346693 -0.273622 -0.409323 0.91239 0
+0.10414 0.305174 -0.371795 0 0 1
+-0.353986 -0.348672 -0.371795 0 0 1
+-0.443352 -0.371795 0.0786324 0.12625 0.990221 0.0593655
+-0.448718 -0.301193 -0.216343 0.938425 0.321799 -0.125716
+-0.5 -0.18312 0.0315278 1 0 0
+0.351851 -0.123819 0.357692 0.877679 -0.47925 0
+0.141109 -0.321897 0.0113755 1 0 0
+0.0466879 0.371795 0.134825 0 1 0
+-0.00458452 -0.149883 0.320513 0 0 1
+-0.451514 0.324104 0.320513 0 0 1
+-0.184683 -0.371795 -0.0201911 0 1 0
+-0.103812 -0.294872 0.255655 0 1 0
+0.5 -0.213949 -0.00708398 1 0 0
+0.0854483 -0.0806358 0.320513 0 0 1
+-0.0606585 0.0184531 0.320513 0 0 1
+-0.100897 -0.294872 0.0274028 0 1 0
+0.37205 0.189277 -0.371795 0 0 1
+0.5 0.251867 0.302307 1 0 0
+-0.5 0.177723 0.131831 1 0 0
+0.5 0.0292177 -0.0515153 1 0 0
+0.204143 0.294872 -0.187227 0 1 0
+-0.448718 -0.299798 0.033066 0.948351 0.317198 -0.00402647
+-0.0856499 -0.290024 0.320513 -0.0388173 -0.152521 0.987538
+0.5 0.103672 -0.00657943 1 0 0
+0.0317972 0.371795 0.0153727 0 1 0
+-0.405236 -0.20044 -0.371795 0 0 1
+0.389143 -0.371795 -0.125642 0 1 0
+0.26165 0.294872 -0.243973 0 1 0
+0.5 0.112786 -0.102231 1 0 0
+-0.19224 0.255605 0.320513 0.00712141 0.0355735 0.999342
+-0.5 0.115237 -0.179952 1 0 0
+0.331272 -0.139145 0.371795 0.0247466 -0.0121627 0.99962
+-0.181356 0.371795 -0.252337 0 1 0
+0.263213 -0.217536 0.339666 -0.506448 0.862246 -0.00656162
+-0.5 -0.0881573 0.0306895 1 0 0
+0.0591815 -0.294872 -0.124974 0 1 0
+0.00270274 0.271537 -0.371795 0 0 1
+-0.112949 0.371795 -0.358714 0 1 0
+-0.466616 -0.116225 0.320513 0 0 1
+-0.109193 0.0327954 -0.333333 0 0 1
+-0.0970912 0.114856 -0.333333 0 0 1
+0.448718 -0.326987 0.283106 1 0 0
+0.0260235 -0.293128 -0.371795 0.02716 0.778744 0.626753
+0.5 -0.232055 -0.288086 1 0 0
+0.5 -0.225885 0.108334 1 0 0
+-0.14369 0.129102 -0.333333 0 0 1
+-0.5 0.352362 -0.232969 1 0 0
+-0.364834 -0.317538 0.320513 0 0 1
+-0.0808574 0.163912 -0.333333 0 0 1
+0.135192 0.20097 -0.333333 0 0 1
+0.5 -0.269063 -0.0370754 1 0 0
+-0.278292 0.371795 0.21973 0 1 0
+-0.33061 -0.15618 0.366291 0.786584 0.554435 -0.27182
+-0.12675 0.371795 -0.164557 0 1 0
+-0.5 0.078609 -0.245653 1 0 0
+0.0971635 0.371795 -0.297147 0 1 0
+-0.366534 0.241583 0.320513 0 0 1
+0.5 -0.101363 -0.303791 1 0 0
+-0.480187 -0.086637 -0.371795 0 0 1
+-0.5 0.312379 0.312646 0.974626 -0.0509182 -0.217971
+0.153612 0.294872 -0.072664 0 1 0
+0.391818 -0.371795 -0.371153 -0.0604779 0.249534 0.966476
+0.141109 -0.339828 0.262147 1 0 0
+-0.0591387 0.371795 -0.0714855 0 1 0
+0.478045 0.294872 0.0928143 0 1 0
+0.5 -0.110514 0.100516 1 0 0
+-0.188515 -0.0100815 -0.236388 0.974516 -0.224265 -0.00484456
+-0.371063 0.0128337 -0.371795 0 0 1
+0.5 -0.14179 -0.295239 1 0 0
+-0.0988344 0.264164 -0.371795 0 0 1
+0.178706 -0.371795 -0.125306 0 1 0
+-0.399975 -0.00559784 -0.371795 0 0 1
+-0.242709 0.0270081 -0.0268722 -0.214069 0.461992 0.860661
+0.276978 0.253324 0.320513 0 0 1
+0.141026 0.361335 -0.117739 0.993696 0.111623 0.0104561
+-0.207437 -0.371795 -0.161638 0 1 0
+-0.392975 -0.210512 -0.371795 0 0 1
+0.488623 -0.294872 -0.239516 0 1 0
+0.0563863 -0.232263 -0.371795 0.00578097 -0.632075 0.774886
+0.302169 -0.111526 0.371795 0 0 1
+0.392525 0.156956 -0.371795 0 0 1
+0.193802 0.0100754 -0.0537058 0.976565 -0.214799 -0.0134746
+0.5 -0.154163 -0.16872 1 0 0
+0.141109 -0.346233 0.288259 1 0 0
+-0.0140846 0.369789 -0.371795 -0.00568458 -0.489044 0.872241
+0.33006 -0.0941751 -0.371795 0.0790384 -0.0190141 0.99669
+-0.21912 -0.371795 0.017035 0 1 0
+-0.0493903 0.218516 -0.333333 0 0 1
+0.367507 -0.0898962 0.358489 0.936954 -0.349452 0
+-0.272083 0.0135916 -0.169029 0.941957 -0.334389 0.0300213
+0.252439 0.223419 0.322844 0.498935 0.698954 0.512375
+-0.407211 0.0841876 -0.371795 0 0 1
+-0.0768094 -0.256282 0.35056 0 1 0
+0.479544 -0.223933 0.320513 0 0 1
+-0.462199 0.11542 0.320513 0 0 1
+0.19685 -0.0628637 -0.333333 0 0 1
+-0.420358 -0.371795 -0.0771514 0 1 0
+0.174035 -0.371795 -0.351153 0 1 0
+0.398463 -0.221561 -0.371795 0 0 1
+-0.5 0.286447 0.240191 1 0 0
+-0.37403 0.0643806 -0.371795 0 0 1
+-0.359841 0.109185 0.324639 0.887648 -0.419468 -0.190071
+-0.486935 0.371795 -0.0387309 0 1 0
+0.184365 0.157989 0.371795 0 0 1
+-0.0157408 -0.204555 0.370898 0.0609549 0.633411 0.771411
+-0.433544 0.0982364 -0.371795 0 0 1
+-0.5 0.228807 0.150192 1 0 0
+0.123125 -0.163381 0.349625 -0.614237 0.789122 0
+-0.197739 -0.371795 0.216745 0 1 0
+-0.201062 -0.371795 -0.0866272 0 1 0
+-0.362653 -0.371795 0.272861 0 1 0
+-0.418615 0.371795 -0.0564698 0 1 0
+0.179811 0.266495 -0.371795 0 0 1
+0.448718 -0.332165 -0.329924 1 0 0
+0.448718 -0.340431 0.0780876 1 0 0
+-0.416267 0.371795 0.169936 0 1 0
+0.5 0.250921 0.320503 0.720971 0.222252 0.656357
+0.0399972 0.237872 -0.371795 -0.00580247 0.128993 0.991629
+0.499909 -0.294872 0.270834 0.71176 -0.635801 0.298588
+0.0821856 -0.140528 0.320513 0 0 1
+0.5 0.0393519 -0.264227 1 0 0
+-0.432914 -0.371795 -0.209107 0 1 0
+0.5 0.0144091 -0.333976 1 0 0
+-0.5 -0.0684689 -0.370188 0.524304 0.0934324 0.84639
+0.338413 -0.371795 -0.272847 0 1 0
+-0.5 -0.0600466 0.0607366 1 0 0
+-0.5 -0.0984244 -0.0347884 1 0 0
+0.169582 0.126897 -0.333333 0 0 1
+0.5 -0.213238 -0.0386567 1 0 0
+-0.298374 -0.371795 -0.191916 0 1 0
+-0.249507 0.371795 0.176674 0 1 0
+0.5 -0.220669 -0.279349 1 0 0
+0.095543 0.371795 -0.0414839 0 1 0
+-0.141154 -0.36379 0.0804651 0.993043 -0.11768 0.00401831
+0.5 -0.0830573 0.132133 1 0 0
+-0.5 -0.0591632 -0.327476 1 0 0
+-0.330903 0.371795 0.230622 0 1 0
+-0.258368 0.371795 0.163331 0 1 0
+-0.448718 -0.349429 0.212905 1 0 0
+0.141109 -0.32468 -0.0239151 1 0 0
+-0.0194027 0.371795 0.252281 0 1 0
+0.293091 -0.02682 -0.333333 0 0 1
+0.141026 0.370601 -0.142291 0.847891 0.516382 -0.120128
+0.310363 -0.371795 -0.0474706 0 1 0
+-0.327303 -0.371795 -0.092611 0 1 0
+-0.5 0.164676 0.245753 1 0 0
+0.141026 0.347384 0.105194 1 0 0
+-0.107583 0.371795 0.00390693 0 1 0
+-0.5 -0.235159 0.115623 1 0 0
+-0.377345 -0.371795 -0.238968 0 1 0
+0.410419 -0.371795 0.304239 0 1 0
+-0.262637 0.371795 -0.0130902 0 1 0
+-0.279917 -0.231037 0.320513 0 0 1
+-0.210736 -0.0385715 -0.0420225 -0.462023 0.87547 -0.141727
+-0.351995 0.371795 -0.104938 0 1 0
+-0.459489 -0.294872 0.0909288 0 1 0
+-0.310939 0.371795 0.202173 0 1 0
+-0.5 0.117567 0.0761859 1 0 0
+0.380504 -0.215812 -0.371795 0 0 1
+-0.347132 -0.132459 0.335932 0.872722 0.48821 -0.0025603
+-0.448718 -0.309497 -0.24028 1 0 0
+-0.5 -0.0239426 0.0992811 1 0 0
+-0.5 -0.192737 0.1106 1 0 0
+-0.5 -0.262011 0.0123176 1 0 0
+0.33737 -0.0955262 -0.371795 0 0 1
+-0.347546 0.293565 -0.371795 0 0 1
+-0.494967 -0.0887346 0.320513 -0.636275 0.13201 0.760084
+-0.130282 0.316529 -0.371795 0 0 1
+0.141026 0.323567 0.202356 1 0 0
+0.384071 0.245755 -0.371795 0 0 1
+0.175757 0.294872 -0.141967 0 1 0
+-0.0691659 -0.0381846 -0.333333 0 0 1
+-0.5 0.162423 -0.0340193 1 0 0
+0.27195 -0.371795 -0.0606653 0 1 0
+-0.473504 -0.228136 -0.371795 0 0 1
+0.40191 -0.371795 -0.166341 0 1 0
+-0.107154 -0.0395921 0.320513 0 0 1
+0.276031 -0.0303223 -0.333333 0 0 1
+0.141026 0.337015 -0.348689 1 0 0
+0.5 0.191737 0.0780903 1 0 0
+-0.448718 -0.35914 -0.1535 1 0 0
+-0.5 -0.278972 0.293764 1 0 0
+-0.297765 -0.208171 -0.348421 0.695088 0.718858 0.00975995
+0.0855317 0.371795 0.0361554 0 1 0
+0.478184 0.0568028 0.320513 0 0 1
+0.5 0.203352 0.0420945 1 0 0
+-0.462162 0.371795 0.205662 0 1 0
+0.5 -0.224371 0.149393 1 0 0
+-0.322026 0.371795 0.0436143 0 1 0
+-0.5 0.356199 0.218658 1 0 0
+0.235551 -0.308505 -0.371795 0 0 1
+-0.269584 0.0195103 -0.16923 0.897834 -0.440281 -0.00685916
+0.458273 0.261339 -0.371795 0 0 1
+-0.471623 0.371795 -0.304343 0 1 0
+0.194385 -0.0656609 0.366287 0.891963 -0.355692 -0.27908
+-0.0640579 -0.230897 -0.357541 0 1 0
+-0.127086 0.371795 -0.0587332 0 1 0
+-0.328915 0.208528 -0.371795 0 0 1
+0.473302 0.102856 -0.371795 0 0 1
+0.129706 -0.294872 0.195958 0 1 0
+-0.438877 0.360924 0.320513 -0.00457525 0.0742266 0.997231
+-0.0131994 -0.170467 -0.333333 0 0 1
+-0.19311 -0.293884 0.320513 0 0 1
+0.473399 0.294872 -0.109757 0 1 0
+-0.5 0.351643 0.046316 1 0 0
+-0.309753 -0.300671 0.320513 0 0 1
+0.0389907 0.281553 -0.371795 0 0 1
+0.141109 -0.36848 -0.114384 0.777111 0.614661 0.135245
+-0.356843 -0.371795 -0.152961 0 1 0
+0.5 -0.0501928 -0.191727 1 0 0
+0.192668 -0.00411923 -0.210598 0.99318 0.115949 0.012186
+-0.5 -0.212082 -0.166291 1 0 0
+0.320513 -0.00592518 -0.340213 0.981796 0.00394794 0.189899
+-0.5 -0.145591 0.220495 1 0 0
+0.270977 0.0997695 0.371795 0 0 1
+0.427919 -0.371795 -0.0745128 0 1 0
+0.319311 -0.123234 -0.333333 0.397775 -0.0514773 0.916038
+-0.183006 0.371795 -0.171935 0 1 0
+0.237968 0.294872 0.145444 0 1 0
+0.327948 0.294872 0.0861524 0 1 0
+0.0169747 -0.294872 -0.157767 0 1 0
+-0.370172 -0.371795 -0.123786 0 1 0
+0.00739817 0.348312 0.320513 0 0 1
+0.463926 -0.294872 0.239135 0 1 0
+-0.282921 -0.203501 0.368876 0.551785 0.812915 -0.186284
+-0.196226 0.371795 0.137251 0 1 0
+-0.5 0.280532 -0.093725 1 0 0
+0.143345 -0.0821201 -0.333333 0 0 1
+-0.164877 0.230897 -0.353708 0 1 0
+-0.378577 0.158901 -0.371795 0 0 1
+-0.5 0.193688 0.108644 1 0 0
+-0.120817 -0.294872 0.0273325 0 1 0
+0.190162 -0.0757048 0.343712 0.915782 -0.401676 0
+-0.5 -0.123904 -0.292966 1 0 0
+-0.465286 -0.294872 0.101933 0 1 0
+-0.0151039 -0.206628 0.371795 0.0609549 0.633411 0.771411
+0.497373 -0.0704792 -0.371795 -0.588048 0.154622 0.793909
+0.00270702 -0.294872 -0.24784 0 1 0
+0.35264 -0.122373 0.34698 0.877659 -0.479286 0
+-0.11608 0.371795 0.0457261 0 1 0
+-0.269191 0.371795 0.0640619 0 1 0
+-0.413283 0.371795 -0.0767864 0 1 0
+0.113023 -0.148678 0.320513 0 0 1
+0.491412 -0.262935 0.320513 0.123121 -0.0514197 0.991059
+-0.468926 -0.27852 0.320513 0 0 1
+-0.126566 -0.294872 -0.19675 0 1 0
+-0.448718 -0.322426 0.0407196 1 0 0
+0.318626 0.10839 0.371795 0 0 1
+-0.182046 0.205012 -0.333333 0 0 1
+0.300275 -0.143377 -0.333333 0 0 1
+0.5 -0.268707 0.126815 1 0 0
+0.346535 -0.371795 -0.0700378 0 1 0
+-0.262711 -0.371795 0.241017 0 1 0
+0.491906 0.268756 0.320513 0.0212682 -0.0111353 0.999712
+-0.5 0.347909 0.0136902 1 0 0
+0.108901 0.0573319 -0.333333 0 0 1
+0.5 -0.224715 -0.310964 1 0 0
+0.118351 -0.294872 -0.204857 0 1 0
+-0.0921057 -0.288749 -0.371795 -0.0550111 0.19126 0.979997
+0.5 -0.21731 -0.240984 1 0 0
+-0.5 -0.0549431 0.304096 1 0 0
+-0.153351 -0.0382173 0.320513 0 0 1
+-0.397538 0.371795 -0.121124 0 1 0
+-0.404321 -0.371795 -0.174883 0 1 0
+-0.157541 0.371795 -0.208531 0 1 0
+-0.0446325 -0.294872 0.26114 0 1 0
+-0.5 0.191786 -0.010918 1 0 0
+0.130768 0.371795 -0.164131 0 1 0
+-0.5 0.307443 0.165325 1 0 0
+-0.0326621 0.371795 -0.278564 0 1 0
+-0.5 0.0492241 -0.100564 1 0 0
+0.5 -0.238441 0.201651 1 0 0
+-0.182466 -0.0453205 -0.333333 0 0 1
+0.5 0.179675 -0.33468 1 0 0
+-0.152418 -0.25455 0.338981 0.0713693 0.99745 0
+0.196492 -0.0171541 -0.245929 0.88916 0.456877 0.025664
+-0.5 0.197998 -0.0611278 1 0 0
+0.392133 -0.371795 -0.201781 0 1 0
+0.5 0.197493 -0.315313 1 0 0
+-0.0713112 -0.230897 -0.351638 0 1 0
+0.244775 0.222579 0.371795 0.342289 0.209794 0.915874
+0.0168356 0.204555 0.328576 0.0606816 0.975658 -0.210737
+-0.33597 -0.371795 -0.3141 0 1 0
+0.204207 0.230897 -0.354393 0 1 0
+-0.0381273 0.371795 -0.0369659 0 1 0
+0.0804989 0.319309 -0.371795 0 0 1
+0.167244 -0.344521 -0.371795 0 0 1
+-0.438303 -0.371795 -0.36039 0 1 0
+0.39078 -0.0863137 0.320513 0 0 1
+-0.0188668 0.00789601 -0.333333 0 0 1
+-0.5 -0.254581 0.184112 1 0 0
+-0.143445 -0.0161298 0.320513 0 0 1
+-0.335508 -0.371795 -0.0850117 0 1 0
+-0.188535 0.0101553 -0.0995709 0.970035 0.242966 0
+-0.438751 -0.349022 0.320513 -0.0331016 -0.00580851 0.999435
+0.5 0.28497 0.0857908 0.986259 0.162775 0.0282356
+0.5 -0.195383 0.0626083 1 0 0
+-0.331131 -0.295181 -0.371795 0 0 1
+0.211517 -0.156305 -0.333333 0 0 1
+0.321092 0.25491 -0.371795 0 0 1
+0.492495 0.153361 -0.371795 -0.184213 -0.0853887 0.97917
+0.237239 0.0358757 0.00119875 0.0820492 0.771905 0.630421
+-0.5 -0.0614799 0.110852 1 0 0
+-0.377277 0.225257 0.320513 0 0 1
+-0.355886 -0.116428 0.334325 0.877683 0.479241 0
+0.484042 0.288442 -0.371795 -0.0324712 -0.29614 0.954592
+0.5 -0.0133276 -0.176422 1 0 0
+-0.175555 -0.136139 0.371795 0 0 1
+-0.0961518 -0.294872 -0.289573 0 1 0
+-0.5 -0.0470838 -0.0556581 1 0 0
+0.5 0.0300174 -0.337987 1 0 0
+-0.5 -0.266981 0.2795 1 0 0
+0.0706388 0.371795 0.165638 0 1 0
+-0.237716 0.371795 -0.00574489 0 1 0
+-0.5 -0.137745 0.175055 1 0 0
+0.146998 -0.371795 -0.275868 0.143578 0.989541 0.0139219
+-0.5 0.293705 -0.354835 1 0 0
+0.0815681 -0.235097 -0.371795 0.125646 -0.43876 0.889777
+0.0152839 0.371795 0.215499 0 1 0
+-0.369287 -0.184311 0.320513 0 0 1
+0.260609 -0.0241837 -0.150307 0.750283 -0.660524 -0.0279854
+0.460388 -0.294872 0.0519837 0 1 0
+-0.0424172 0.310496 -0.371795 0 0 1
+-0.311481 0.276243 -0.371795 0 0 1
+-0.5 -0.0382334 0.206422 1 0 0
+-0.364027 0.099225 0.329053 0.935264 -0.353952 0
+-0.207938 0.0519109 0.371795 0 0 1
+0.414007 -0.371795 0.00732089 0 1 0
+-0.485523 -0.294872 0.178246 0 1 0
+-0.347456 0.371795 -0.115098 0 1 0
+0.0444245 0.149063 -0.333333 0 0 1
+-0.5 0.15739 -0.236547 1 0 0
+-0.22361 0.371795 0.140215 0 1 0
+-0.281138 -0.371795 -0.120898 0 1 0
+-0.5 0.0266695 -0.158167 1 0 0
+0.078601 -0.218804 -0.333333 0 0 1
+-0.202353 -0.320171 -0.371795 0 0 1
+0.141109 -0.35786 0.15231 1 0 0
+-0.5 0.0628594 -0.194115 1 0 0
+-0.0559674 0.371795 -0.230404 0 1 0
+0.444256 0.294872 0.159779 0 1 0
+0.5 0.0992802 0.0397425 1 0 0
+-0.315307 -0.366898 -0.371795 0.0383007 0.172122 0.984331
+-0.448718 -0.330232 0.148422 1 0 0
+0.107412 -0.0457935 -0.333333 0 0 1
+-0.376039 -0.045677 0.371795 -0.661706 -0.119659 0.740153
+-0.337012 -0.371795 -0.165782 0 1 0
+0.464877 0.0566807 0.320513 0 0 1
+0.434387 0.245473 0.320513 0 0 1
+0.124248 -0.230897 -0.341727 -0.00471301 0.995333 -0.0963856
+-0.448718 -0.300243 0.202698 0.96896 0.241369 -0.053462
+-0.457643 0.371795 -0.138374 0 1 0
+0.5 -0.0328297 0.320444 0.641923 0.161406 0.749589
+0.160558 -0.237613 0.371795 0 0 1
+-0.19178 0.371795 -0.163914 0 1 0
+-0.362861 -0.181 -0.371795 0 0 1
+-0.141154 -0.370479 -0.0265566 0.91234 -0.407526 -0.0394769
+-0.273199 -0.0094285 -0.321842 0.97596 0.216993 0.0203937
+-0.0948558 -0.259004 -0.371795 0 0 1
+0.325726 0.0320106 0.371795 0 0 1
+0.166863 -0.371795 -0.161547 0 1 0
+-0.41083 -0.371795 -0.0567162 0 1 0
+-0.5 -0.0284458 -0.333711 1 0 0
+0.0125703 -0.232859 -0.371795 0.0443692 -0.618087 0.784857
+0.131766 0.371795 0.0439612 0.0204106 0.999791 0.000690692
+0.221995 0.294872 0.150642 0 1 0
+-0.0646693 -0.294872 0.199367 0 1 0
+-0.0543352 -0.197621 0.326758 0.287668 0.957604 0.0155653
+0.5 -0.150136 -0.26311 1 0 0
+-0.227063 0.371795 -0.0592027 0 1 0
+0.101092 -0.294872 -0.0637388 0 1 0
+-0.0344087 -0.294872 -0.290919 0 1 0
+0.303984 0.294872 -0.326176 0 1 0
+0.5 0.202521 0.0859014 1 0 0
+-0.314387 0.371795 0.133914 0 1 0
+-0.379186 0.371795 -0.207842 0 1 0
+-0.21505 -0.22979 -0.333333 0.194893 -0.645304 0.738647
+0.266134 0.294872 0.300637 0 1 0
+0.5 0.0741157 0.180647 1 0 0
+-0.434305 -0.223946 -0.371795 0 0 1
+-0.49164 0.371795 0.0453511 -0.27202 0.959779 0.0694918
+-0.203357 0.0229228 0.371063 0.641852 -0.184819 0.744223
+-0.46937 0.251404 0.320513 0 0 1
+-0.054755 0.371795 -0.303684 0 1 0
+-0.193734 -0.371795 -0.261178 0 1 0
+0.446396 -0.0957539 0.320513 0 0 1
+-0.329954 0.157057 0.354412 0.800535 -0.599286 0
+-0.5 -0.277508 -0.165169 1 0 0
+0.40185 0.294872 0.0978179 0 1 0
+0.5 0.263758 -0.332349 1 0 0
+0.5 -0.0973264 0.254405 1 0 0
+-0.141154 -0.344903 0.00277467 1 0 0
+-0.48053 -0.174879 0.320513 0 0 1
+0.490133 0.195988 -0.371795 -0.167059 -0.0131661 0.985859
+0.24634 -0.371795 -0.094174 0 1 0
+-0.0552529 0.371795 -0.105198 0 1 0
+0.205456 -0.0288725 -0.232269 0.652179 0.758056 0.00366965
+-0.253671 -0.371795 0.261101 0 1 0
+0.5 -0.0430488 -0.0639228 1 0 0
+0.400341 -0.131183 -0.371795 0 0 1
+-0.273338 -0.00890845 -0.229433 0.974576 0.224032 -0.0034194
+-0.5 0.00449566 -0.243315 1 0 0
+0.127409 0.371795 0.235621 0 1 0
+0.141026 0.355968 -0.170098 1 0 0
+0.448718 -0.310209 -0.155478 1 0 0
+0.0729356 0.371795 0.00752058 0 1 0
+0.454735 -0.120184 -0.371795 0 0 1
+0.385489 -0.124379 -0.371795 0 0 1
+-0.314574 -0.0246671 0.371795 0 0 1
+-0.5 0.0789606 -0.137096 1 0 0
+0.448718 -0.308688 0.016029 1 0 0
+0.5 -0.107254 0.23837 1 0 0
+-0.138997 0.22126 -0.333333 0 0 1
+0.0450006 -0.0414851 -0.333333 0 0 1
+0.313328 0.294872 -0.280758 0 1 0
+0.185699 0.294872 0.192748 0 1 0
+-0.102799 -0.294872 0.236495 0 1 0
+0.331369 -0.0603805 -0.371795 0.0255922 -0.0087035 0.999635
+0.127829 -0.294872 0.130024 0 1 0
+-0.205517 -0.199701 -0.333333 0 0 1
+0.5 0.14031 0.273333 1 0 0
+-0.38375 -0.0103009 0.366603 0.913661 0.123375 -0.387302
+0.349879 0.237898 -0.371795 0 0 1
+-0.463575 -0.187407 -0.371795 0 0 1
+-0.242984 0.126964 -0.333333 0 0 1
+-0.149697 -0.139409 0.332399 0.735728 0.677277 0
+-0.417432 0.338738 -0.371795 0 0 1
+-0.369897 -0.371795 -0.275173 0 1 0
+-0.0357124 0.252631 -0.371795 0 0 1
+-0.5 -0.277268 0.0614662 1 0 0
+-0.491397 0.059508 -0.371795 0.156321 -0.00930919 0.987662
+0.29432 0.294872 0.288366 0 1 0
+0.5 -0.222244 0.119261 1 0 0
+-0.0927667 0.371795 -0.371542 -0.0865956 -0.55538 0.827076
+0.0859712 0.342032 0.320513 0 0 1
+0.195846 -0.0157681 -0.0700149 0.898257 0.439083 0.0184471
+0.5 0.0432151 0.219538 1 0 0
+-0.338921 -0.305147 0.320513 0 0 1
+-0.344293 -0.371795 -0.0368924 0 1 0
+0.5 0.193477 -0.15392 1 0 0
+0.344965 0.294872 -0.011608 0 1 0
+-0.493774 0.248818 -0.371795 0.0982821 0.0154878 0.995038
+0.00132267 -0.294872 -0.159645 0 1 0
+0.448718 -0.326747 0.0419895 1 0 0
+0.5 -0.280797 -0.031154 1 0 0
+0.0578772 -0.294872 0.0891732 0 1 0
+0.326386 -0.161824 0.323471 0.768153 -0.465841 0.439242
+0.452491 -0.117512 -0.371795 0 0 1
+0.109117 -0.0689206 0.320513 0 0 1
+0.5 -0.275751 -0.0226014 1 0 0
+0.246792 -0.0348049 -0.185036 -0.414811 0.909889 -0.00584341
+-0.167814 -0.371795 -0.0247045 0 1 0
+0.141109 -0.327024 0.282921 1 0 0
+0.5 0.136052 0.0057523 1 0 0
+-0.0400664 -0.294872 0.175817 0 1 0
+-0.5 -0.198848 0.0936801 1 0 0
+0.448718 -0.335006 0.314306 0.87485 0.0909763 0.475773
+0.141026 0.344947 -0.101249 1 0 0
+-0.138113 0.344911 -0.371795 0 0 1
+-0.38957 0.23887 0.320513 0 0 1
+-0.448718 -0.316256 -0.360622 0.999559 0.012082 0.0271159
+0.200382 -0.295779 0.320513 0 0 1
+-0.37232 0.223511 0.320513 0 0 1
+0.0731199 -0.275188 -0.371795 0 0 1
+-0.396971 -0.328698 -0.371795 0 0 1
+0.237279 0.294872 0.278801 0 1 0
+0.0892666 0.150031 0.320513 0 0 1
+-0.448718 -0.31978 0.233472 1 0 0
+0.150397 0.294872 0.204313 0.0638384 0.997954 0.00343882
+0.141109 -0.325249 0.215803 1 0 0
+-0.0596405 -0.0300568 0.320513 0 0 1
+0.5 0.218948 -0.221874 1 0 0
+-0.5 -0.190165 0.118694 1 0 0
+0.49793 0.138555 -0.371795 -0.265906 0.0742885 0.961132
+-0.259111 -0.182714 0.371795 0 0 1
+0.0971206 0.0586859 -0.333333 0 0 1
+0.181475 -0.0353772 0.320513 0 0 1
+0.154583 -0.371795 -0.317231 0 1 0
+-0.165703 0.25345 0.338818 -0.150168 0.988574 0.0130669
+0.5 0.260874 -0.320256 1 0 0
+-0.141154 -0.35151 -0.286201 1 0 0
+-0.320513 -0.0369619 -0.369723 0.894598 0.191687 -0.403672
+-0.0976072 -0.294872 0.267639 0 1 0
+0.176919 -0.015353 -0.333333 0 0 1
+0.0422242 -0.294872 -0.250717 0 1 0
+0.426765 0.294872 -0.198418 0 1 0
+0.0937515 0.0810575 0.320513 0 0 1
+0.016157 0.371795 0.246609 0 1 0
+-0.221188 0.371795 0.00228882 0 1 0
+0.405829 -0.269491 -0.371795 0 0 1
+-0.428786 -0.371795 0.191287 0 1 0
+-0.5 0.268412 0.153137 1 0 0
+0.422394 -0.179242 -0.371795 0 0 1
+-0.351435 -0.248701 -0.371795 0 0 1
+-0.225295 0.230897 -0.346996 0 1 0
+-0.5 -0.126726 -0.0844676 1 0 0
+-0.5 0.107246 -0.0363439 1 0 0
+0.5 0.293163 0.193116 0.821611 0.567396 -0.0549357
+-0.470635 0.371795 0.0163354 0 1 0
+-0.327635 0.371795 0.116185 0 1 0
+-0.138746 0.275771 0.320513 0 0 1
+0.5 -0.0490587 0.278758 1 0 0
+0.00586189 0.371795 0.151893 0 1 0
+-0.105202 0.175656 0.353703 -0.483015 0.875612 0
+0.5 0.0960431 -0.133286 1 0 0
+0.149795 -0.328616 0.320513 -0.136076 -0.0181352 0.990532
+0.3057 0.294872 0.0852324 0 1 0
+0.243693 0.294872 -0.30239 0 1 0
+-0.5 0.236577 0.204117 1 0 0
+0.357561 0.108459 0.371795 0.596553 0.353943 0.720311
+0.0710993 0.120577 -0.333333 0 0 1
+-0.262017 0.371795 0.175324 0 1 0
+-0.121914 0.164323 0.354785 -0.614229 0.789128 0
+0.383536 -0.0132949 0.367531 0.965369 0.00260906 0.260874
+0.299454 -0.214888 -0.371795 0.211997 -0.176169 0.96126
+0.5 -0.023581 0.236004 1 0 0
+-0.0800464 0.371795 -0.28157 0 1 0
+0.263752 -0.371795 -0.162809 0 1 0
+0.182805 -0.371795 -0.199013 0 1 0
+-0.180727 0.364262 0.320513 -0.0273988 0.0968894 0.994918
+0.141026 0.352722 0.284599 1 0 0
+0.0722198 0.371795 0.0104328 0 1 0
+-0.448718 -0.356013 -0.0563172 1 0 0
+0.170148 -0.0102709 0.320513 0 0 1
+0.5 -0.286585 -0.258484 0.968824 -0.203865 0.140778
+0.5 -0.0837717 -0.115453 1 0 0
+-0.495024 0.371795 -0.324766 -0.463634 0.885091 -0.0407209
+-0.118189 0.32087 0.320513 0 0 1
+-0.122566 -0.232342 -0.371795 -0.0702338 0.834935 -0.545848
+0.309065 0.294872 0.31382 -0.00948651 0.963235 0.268491
+0.0324417 0.10632 -0.333333 0 0 1
+-0.489885 0.157686 -0.371795 0.12416 -0.0489679 0.991053
+-0.480432 -0.294872 0.274865 0 1 0
+0.094426 0.371795 0.266037 0 1 0
+0.0499075 -0.294872 -0.246468 0 1 0
+0.489945 0.166851 0.320513 0.0657526 0.0289798 0.997415
+-0.062995 -0.294872 -0.286903 0 1 0
+0.141026 0.307348 0.20535 1 0 0
+0.111789 -0.258479 -0.371795 0 0 1
+0.489842 -0.294872 -0.066503 -0.00742543 0.999972 -0.000529121
+0.448718 -0.33852 -0.0572947 1 0 0
+-0.261379 0.247298 0.320513 0 0 1
+0.399969 0.17835 0.320513 0 0 1
+0.141109 -0.311374 -0.229227 1 0 0
+-0.499264 0.371795 -0.30051 -0.555374 0.79593 -0.240946
+-0.176501 0.371795 -0.353113 0 1 0
+0.5 0.2165 -0.268202 1 0 0
+-0.5 -0.22468 0.320052 -0.499226 0.00149595 0.866471
+-0.325082 0.371795 0.0150034 0 1 0
+0.5 -0.128816 0.173578 1 0 0
+-0.5 0.0608377 -0.364453 0.996267 0.0437138 0.074434
+0.487682 0.294872 0.153047 0 1 0
+-0.382285 0.030796 0.354105 0.99565 -0.0929085 0.00694111
+-0.357819 -0.371795 -0.0897984 0 1 0
+0.481511 -0.294872 0.239989 0 1 0
+-0.270119 0.234121 -0.371795 -0.215782 0.519732 0.82663
+-0.445367 0.264264 0.320513 0 0 1
+0.30333 0.128449 -0.333333 0 0 1
+-0.326237 -0.371795 -0.101661 0 1 0
+0.266328 -0.0144044 -0.0754704 0.929941 -0.367699 0.00265622
+-0.417431 -0.371795 -0.050474 0 1 0
+0.159774 -0.371795 0.0611265 0 1 0
+0.363532 -0.371795 0.0111231 0 1 0
+-0.448718 -0.345161 -0.23471 1 0 0
+0.382495 0.259843 -0.371795 0 0 1
+-0.5 0.0174394 -0.144785 1 0 0
+-0.0449198 0.371795 0.229175 0 1 0
+-0.380361 -0.354997 0.320513 0 0 1
+0.141026 0.315149 0.264124 1 0 0
+-0.418333 -0.323128 -0.371795 0 0 1
+-0.0651974 -0.277845 0.320513 0 0 1
+-0.314262 0.371795 0.136357 0 1 0
+0.0870917 -0.294872 0.0630939 0 1 0
+-0.281033 -0.371795 -0.201279 0 1 0
+-0.5 -0.26666 -0.190639 1 0 0
+0.403921 -0.371795 0.0542352 0 1 0
+0.328203 0.204377 0.320513 0 0 1
+0.00360224 -0.059251 -0.333333 0 0 1
+-0.5 0.0141943 0.118052 1 0 0
+0.378634 0.0513908 0.344344 0.977144 0.212581 0
+0.259685 -0.371795 -0.176483 0 1 0
+-0.433766 -0.157496 0.320513 0 0 1
+0.0372799 0.371795 -0.202897 0 1 0
+0.272247 0.294872 0.271527 0 1 0
+-0.361438 0.118049 0.320513 -0.223927 0.0864226 0.970767
+-0.5 0.21758 -0.191616 1 0 0
+0.188155 0.294872 0.200576 0 1 0
+-0.440797 -0.371795 -0.343278 0.201778 0.979414 -0.0058176
+-0.149297 0.0406603 -0.333333 0 0 1
+-0.5 0.309865 0.0338593 1 0 0
+-0.5 0.241437 -0.32421 1 0 0
+-0.5 -0.0298071 -0.282914 1 0 0
+0.150478 0.0929342 -0.333333 0 0 1
+0.5 -0.146581 0.114217 1 0 0
+0.0949251 0.256282 0.371693 0.0868969 0.549742 0.830803
+0.151918 0.294872 0.082044 0 1 0
+0.448663 -0.351306 -0.371795 0.840591 -0.161769 -0.51695
+-0.391162 -0.124041 -0.371795 0 0 1
+0.149417 -0.24634 0.371795 0.037297 -0.289231 0.956532
+0.5 0.0917723 -0.133722 1 0 0
+0.396221 0.266123 0.320513 0 0 1
+0.185846 -0.0915686 0.371795 -0.580152 0.130106 0.80405
+-0.5 0.334884 0.0715542 1 0 0
+-0.453607 0.371795 0.125852 0 1 0
+-0.227739 -0.0433247 -0.104516 -0.108511 0.992745 -0.0517945
+-0.157758 -0.190715 0.371795 0 0 1
+-0.237315 -0.371795 0.0102369 0 1 0
+0.458067 0.0291207 0.320513 0 0 1
+-0.123438 0.320597 0.320513 0 0 1
+0.458504 0.134544 0.320513 0 0 1
+-0.309388 -0.371795 -0.243087 0 1 0
+-0.195612 0.0608136 0.337361 0.96206 -0.272715 -0.00823417
+-0.448718 -0.324572 -0.0682283 1 0 0
+0.22047 0.0369068 -0.113837 -0.271524 0.9624 -0.0078469
+-0.173847 -0.0591511 0.320513 0 0 1
+-0.5 0.272089 0.0401004 1 0 0
+-0.5 0.103895 -0.0185481 1 0 0
+-0.229961 -0.371795 0.301223 0 1 0
+0.141109 -0.316283 0.113632 1 0 0
+0.448718 -0.331741 0.107048 1 0 0
+-0.448718 -0.318674 0.0984432 1 0 0
+0.272824 0.144956 0.371795 0 0 1
+0.14979 -0.0557767 0.320513 0 0 1
+-0.5 -0.121761 0.118912 1 0 0
+0.498978 0.294872 0.062501 0.399376 0.910175 -0.109906
+0.0313959 -0.294872 0.298616 0 1 0
+0.5 0.107244 -0.223912 1 0 0
+0.383907 -0.00682757 -0.371795 0 0 1
+-0.108336 -0.134596 -0.333333 0 0 1
+-0.116804 0.371795 0.191531 0 1 0
+0.448718 -0.326447 -0.310598 1 0 0
+0.0318182 -0.294872 0.0772838 0 1 0
+0.488952 0.294872 0.241715 0.0702132 0.997532 0.000387709
+0.19929 0.0218434 -0.232867 0.834767 -0.550543 0.00810226
+0.234877 0.0969188 -0.333333 0 0 1
+-0.330159 -0.275063 0.320513 0 0 1
+-0.0960413 -0.210203 0.371795 0 0 1
+-0.029559 -0.207171 0.371795 0.0386339 0.349305 0.936212
+0.141109 -0.315618 -0.359893 1 0 0
+0.149715 -0.319308 0.320513 -0.10442 0.0437732 0.993569
+-0.5 -0.01105 -0.36747 0.933558 0.112263 0.340392
+-0.150099 0.371795 0.0340846 0 1 0
+-0.277374 0.218695 -0.333333 -0.200642 0.554175 0.807857
+0.0274 0.200731 -0.333333 0 0 1
+-0.34794 0.371795 0.161789 0 1 0
+-0.0799686 -0.158608 0.320513 0 0 1
+-0.448718 -0.346907 -0.103281 1 0 0
+0.15301 0.118613 0.320513 -0.0389337 -0.0576765 0.997576
+-0.20653 0.371795 -0.194844 0 1 0
+-0.190348 0.371795 0.14741 0 1 0
+-0.147192 -0.371795 0.266968 -0.157913 0.987288 0.0180333
+0.138636 -0.270728 0.320513 0 0 1
+-0.290947 0.371795 0.129483 0 1 0
+-0.5 -0.0213591 -0.139265 1 0 0
+-0.401055 -0.371795 -0.0823916 0 1 0
+-0.5 0.140773 0.274018 1 0 0
+-0.5 0.158883 -0.337646 1 0 0
+0.248573 -0.230461 -0.341874 -0.0782777 0.995553 -0.0524031
+0.472884 0.19207 -0.371795 0 0 1
+-0.141154 -0.348603 0.0259853 1 0 0
+-0.015865 -0.181082 -0.333333 0 0 1
+-0.0532945 -0.294872 0.139519 0 1 0
+-0.274436 -0.310508 0.320513 0 0 1
+-0.196729 -0.13325 -0.333333 0 0 1
+0.32725 0.294872 0.0180293 0 1 0
+0.412559 -0.371795 0.168775 0 1 0
+-0.0284455 -0.294872 -0.0784798 0 1 0
+0.18537 -0.229547 0.371795 0 0 1
+0.296149 -0.371795 0.242447 0 1 0
+-0.444516 -0.284465 0.320513 0 0 1
+-0.275025 0.207865 -0.333333 0 0 1
+-0.5 -0.133206 0.0962056 1 0 0
+0.448718 -0.320969 0.186295 1 0 0
+-0.218079 -0.371795 0.0146478 0 1 0
+-0.5 -0.0416785 -0.28969 1 0 0
+0.0336719 0.00829243 -0.333333 0 0 1
+0.0314905 -0.244005 -0.371795 0 0 1
+-0.0946029 0.205671 0.371795 0 0 1
+0.5 0.108294 0.146679 1 0 0
+-0.5 -0.00758473 0.0474441 1 0 0
+0.267734 -0.0441464 0.371795 0 0 1
+-0.382985 -0.0210113 0.332242 0.994343 0.0805035 -0.0692862
+-0.335894 -0.256216 -0.371795 0 0 1
+0.5 -0.199538 -0.210678 1 0 0
+-0.0835098 -0.00970967 0.320513 0 0 1
+-0.34984 0.371795 -0.247165 0 1 0
+-0.229771 0.0435025 -0.239384 0.0272838 0.999625 -0.00221455
+-0.111753 0.127103 0.320513 0 0 1
+0.0608011 0.0171513 0.320513 0 0 1
+0.343427 0.294872 -0.342769 0 1 0
+0.0615064 -0.294872 0.121616 0 1 0
+-0.5 0.12701 0.274057 1 0 0
+0.032697 0.371795 -0.0600358 0 1 0
+0.448718 -0.323712 0.14129 1 0 0
+-0.206683 0.156414 -0.333333 0 0 1
+-0.5 -0.0294173 -0.232141 1 0 0
+-0.253709 0.115394 0.371795 0 0 1
+-0.269751 -0.0191522 -0.237494 0.892801 0.450248 0.013569
+0.117504 0.280271 0.320513 0 0 1
+-0.278205 -0.175805 -0.333333 0 0 1
+0.218393 0.157135 -0.333333 0 0 1
+-0.160712 0.218648 0.371795 0 0 1
+-0.299205 0.371795 -0.322316 0 1 0
+0.465756 0.294872 -0.0221428 0 1 0
+-0.448718 -0.305673 0.228893 0.999864 0.0164745 -0.00101528
+0.459298 0.0270661 -0.371795 0 0 1
+0.127144 -0.256282 0.360848 -0.0230284 0.999404 -0.0257187
+0.192362 0.000621114 -0.207185 0.999883 -0.0103226 -0.011282
+-0.215602 0.371795 -0.213189 0 1 0
+-0.413171 0.336551 0.320513 0 0 1
+-0.5 0.273662 0.0489218 1 0 0
+0.0836301 -0.294872 -0.370918 -0.0174795 0.901729 0.431949
+0.349852 -0.371795 -0.0989244 0 1 0
+-0.124411 -0.294872 -0.124289 0 1 0
+0.176502 -0.327956 -0.371795 0 0 1
+-0.339057 -0.371795 -0.0527808 0 1 0
+-0.423449 -0.139119 -0.371795 0 0 1
+-0.338912 -0.371795 0.170045 0 1 0
+0.062987 0.371795 -0.0573009 0 1 0
+-0.296759 -0.0543354 -0.333333 0 0 1
+0.448718 -0.341618 -0.10436 1 0 0
+-0.5 -0.182558 0.0625689 1 0 0
+-0.300778 -0.0955124 0.371795 0 0 1
+-0.238993 -0.145426 -0.333333 0 0 1
+0.220239 0.170017 -0.333333 0 0 1
+-0.328338 -0.256157 0.320513 0 0 1
+0.00153538 -0.294872 -0.327365 0 1 0
+-0.136448 -0.267788 0.320513 0 0 1
+-0.448718 -0.358453 0.0385381 1 0 0
+-0.0888945 0.371795 -0.0697773 0 1 0
+0.268945 0.294872 -0.370923 -0.14267 0.890532 -0.43197
+0.0464969 -0.127061 -0.333333 0 0 1
+-0.5 -0.200039 -0.102194 1 0 0
+0.0873469 -0.136797 -0.333333 0 0 1
+0.223064 0.0376019 -0.254792 -0.226041 0.974116 -0.00195631
+0.297584 -0.371795 0.085885 0 1 0
+-0.453518 -0.173696 0.320513 0 0 1
+-0.0854491 0.0669425 0.320513 0 0 1
+0.264457 -0.335551 0.320513 0 0 1
+-0.5 -0.0732588 -0.0500614 1 0 0
+0.102001 -0.294872 -0.0453672 0 1 0
+0.5 -0.262338 0.0341856 1 0 0
+-0.473321 -0.294872 -0.207531 0 1 0
+-0.5 -0.241036 -0.115932 1 0 0
+0.488004 0.00295154 -0.371795 -0.0755023 0.00542376 0.997131
+0.448564 -0.371795 0.070373 0.73762 -0.663282 0.126386
+0.455922 -0.219104 0.320513 0 0 1
+0.283764 0.294872 0.0367147 0 1 0
+-0.309342 -0.371795 0.175562 0 1 0
+0.319356 0.170363 0.339166 0.743527 0.668706 0
+-0.5 0.00510157 0.272023 1 0 0
+0.275973 -0.371795 0.0287003 0 1 0
+0.141109 -0.362964 0.0274671 0.981161 0.181445 -0.0663325
+-0.363401 0.304078 -0.371795 0 0 1
+0.283539 0.294872 -0.192761 0 1 0
+0.5 -0.137048 -0.196777 1 0 0
+0.141109 -0.332251 -0.191563 1 0 0
+0.353216 0.294872 -0.271534 0 1 0
+0.0270698 0.371795 -0.256944 0 1 0
+-0.132991 0.371795 0.0718377 0 1 0
+-0.261997 -0.371795 -0.0405157 0 1 0
+0.5 -0.294698 -0.293954 0.708121 -0.706064 -0.00623611
+0.253275 0.235744 -0.371795 0.0601037 0.0571766 0.996553
+-0.059634 -0.0528523 0.320513 0 0 1
+-0.398239 -0.371795 -0.00829442 0 1 0
+-0.242944 -0.244451 -0.371795 0 0 1
+0.470562 -0.294872 -0.055517 0 1 0
+0.403848 -0.267083 -0.371795 0 0 1
+0.152502 0.294872 -0.0357698 0 1 0
+0.5 -0.0739971 0.185128 1 0 0
+0.5 0.228109 -0.154753 1 0 0
+-0.5 -0.0858958 -0.0365567 1 0 0
+0.370287 -0.371795 -0.0788753 0 1 0
+-0.219746 0.371795 0.251481 0 1 0
+0.5 -0.219783 -0.0891131 1 0 0
+-0.4194 0.294969 -0.371795 0 0 1
+0.5 0.130037 -0.336583 1 0 0
+-0.240786 0.371795 -0.285346 0 1 0
+0.25105 -0.366958 0.320513 -0.0388415 -0.257796 0.965418
+0.5 -0.0576876 0.307482 1 0 0
+-0.100619 -0.124588 -0.333333 0 0 1
+-0.144392 -0.371795 -0.22868 -0.500253 0.865073 -0.0373571
+-0.275338 -0.222622 0.320513 -0.0122484 -0.0202216 0.999721
+0.00549905 0.230897 -0.36415 -0.0808561 0.967099 0.24121
+-0.344821 0.371795 -0.358534 0 1 0
+0.181469 0.294872 -0.366839 0.0130513 0.997745 -0.0658443
+-0.295104 0.371795 -0.288269 0 1 0
+-0.166102 -0.289359 0.320513 0 0 1
+-0.278479 0.150132 0.371795 0 0 1
+0.278188 -0.207045 0.325861 0.599749 -0.701836 0.384354
+-0.265132 0.371795 -0.165924 0 1 0
+-0.5 -0.0320197 0.016194 1 0 0
+0.5 0.0630769 0.31308 0.965066 -0.0204517 0.261206
+0.324903 0.0310093 0.371795 0 0 1
+-0.0491955 -0.199442 0.371795 0.0395514 0.717693 0.695236
+0.141109 -0.324693 0.0755904 1 0 0
+-0.141154 -0.332971 0.105942 1 0 0
+0.283431 -0.371795 0.117603 0 1 0
+-0.17181 -0.337818 -0.371795 0 0 1
+-0.448718 -0.363928 0.140546 0.994927 0.100501 0.00454084
+0.5 0.127485 -0.0965668 1 0 0
+-0.309398 0.346213 0.320513 0 0 1
+0.329091 0.21918 -0.371795 0 0 1
+-0.129031 0.371795 0.315093 0.0194597 0.968319 0.248956
+0.209218 -0.338086 0.320513 0 0 1
+0.141109 -0.358034 -0.0497437 1 0 0
+-0.5 -0.158388 0.0997095 1 0 0
+0.5 0.0543018 0.138833 1 0 0
+-0.23054 0.280833 -0.371795 0 0 1
+-0.186122 0.249008 0.340529 -0.212535 0.977153 0
+-0.237475 0.272341 0.320513 0 0 1
+-0.468911 -0.236615 0.320513 0 0 1
+-0.044257 -0.279641 -0.371795 0 0 1
+0.5 -0.219237 -0.345387 1 0 0
+0.259357 0.232528 -0.371795 -0.0768422 0.359933 0.929808
+0.445115 0.294872 -0.206721 0 1 0
+0.179852 -0.0840302 -0.333333 0 0 1
+-0.0319128 0.129028 -0.333333 0 0 1
+0.416578 -0.371795 0.206506 0 1 0
+-0.00390349 0.371795 0.0252843 0 1 0
+-0.5 -0.176568 -0.057224 1 0 0
+-0.0226535 -0.256282 0.332858 -0.00300264 0.999921 -0.012167
+0.26876 0.0053751 -0.291457 0.990572 0.136982 -0.00152842
+-0.0598574 0.371795 -0.22065 0 1 0
+-0.0367281 -0.294872 -0.101001 0 1 0
+0.5 0.0480476 0.00342508 1 0 0
+0.390433 -0.362458 -0.371795 0.00639152 0.0179978 0.999818
+0.5 -0.266524 0.125643 1 0 0
+-0.5 -0.28982 -0.0107025 0.971238 0.231739 0.0547119
+-0.156413 -0.371795 -0.116415 0 1 0
+-0.0101703 0.132457 -0.333333 0 0 1
+0.200507 -0.369728 0.320513 -0.104103 -0.26737 0.957954
+0.5 -0.158651 -0.202735 1 0 0
+-0.5 0.0767313 0.0435658 1 0 0
+0.360076 0.294872 0.0399522 0 1 0
+-0.320513 -0.0947372 -0.341225 0.98483 0.00696424 -0.173382
+-0.163759 0.0382931 -0.333333 0 0 1
+-0.328231 0.159359 0.325804 0.806344 -0.530966 -0.260545
+-0.471477 0.0163559 -0.371795 0 0 1
+0.5 0.184044 0.318532 0.64016 0.0557255 0.766218
+-0.0267246 0.157083 0.320513 0 0 1
+-0.320513 -0.0217813 -0.369431 0.816308 -0.0980634 -0.569232
+-0.139448 -0.2913 -0.371795 0.0104901 0.102181 0.994711
+-0.363906 -0.371795 -0.26845 0 1 0
+-0.0225818 -0.294872 0.220256 0 1 0
+0.385853 -0.100944 -0.371795 0 0 1
+0.215213 -0.187805 -0.333333 0 0 1
+-0.219796 0.371795 0.280361 0 1 0
+-0.332349 -0.181415 0.320513 0 0 1
+0.5 0.145001 -0.333897 1 0 0
+-0.390788 0.023154 0.320513 -0.23168 -0.0295887 0.972342
+-0.493142 0.157316 -0.371795 0.114478 -0.0556739 0.991865
+0.156309 -0.237731 0.371795 0 0 1
+0.5 -0.274559 0.0797318 1 0 0
+0.199443 -0.371795 -0.287984 0 1 0
+0.483866 -0.20218 0.320513 0 0 1
+0.139159 0.366855 0.320513 0.40239 0.371683 0.836621
+-0.291112 -0.371795 -0.236498 0 1 0
+0.0960431 -0.00062089 -0.333333 0 0 1
+-0.499561 0.371795 -0.028973 -0.281907 0.927236 -0.246498
+-0.249543 -0.371795 -0.000517356 0 1 0
+-0.294416 0.371795 0.277466 0 1 0
+0.420722 -0.144076 0.320513 0 0 1
+0.5 0.206164 0.163539 1 0 0
+0.5 0.212512 -0.358433 1 0 0
+-0.216147 0.0410375 -0.146899 0.358326 0.93359 -0.00364927
+0.141026 0.367293 -0.201246 0.953711 0.300294 -0.0160723
+-0.21324 0.0397387 -0.227105 0.387757 0.921708 0.00997947
+-0.00279015 -0.294872 -0.245401 0 1 0
+-0.188503 -0.0100387 -0.297073 0.971412 -0.2374 -0.000740757
+-0.0824242 0.371795 0.214122 0 1 0
+-0.0371809 0.371795 0.210443 0 1 0
+-0.35122 -0.286931 0.320513 0 0 1
+-0.5 -0.214551 -0.343763 1 0 0
+0.233328 -0.371795 0.266299 0 1 0
+0.0509101 -0.0924685 0.320513 0 0 1
+0.448718 -0.328667 -0.10919 1 0 0
+0.272841 0.294731 0.320513 0.123338 0.654611 0.745837
+-0.5 -0.212883 0.139784 1 0 0
+-0.141154 -0.312724 0.188657 1 0 0
+0.0214448 0.230897 -0.35076 0 1 0
+-0.5 -0.00357345 0.101668 1 0 0
+-0.463299 -0.294872 -0.120258 0 1 0
+0.177339 0.294872 -0.347432 0 1 0
+-0.0352371 0.371795 -0.158508 0 1 0
+-0.100466 -0.188927 -0.333333 0 0 1
+0.111843 -0.172062 0.36812 -0.591326 0.76606 0.251964
+-0.0242261 -0.294872 -0.19023 0 1 0
+0.5 -0.0731472 0.178545 1 0 0
+-0.483168 0.0264424 0.320513 0 0 1
+-0.335292 -0.149926 0.332509 0.800539 0.59928 0
+-0.112423 -0.230897 -0.344886 0 1 0
+-0.351114 -0.371795 -0.357633 0 1 0
+0.141026 0.308164 0.133713 1 0 0
+0.0408851 0.371795 -0.255351 0 1 0
+-0.340284 -0.332664 -0.371795 0 0 1
+0.00262717 -0.294872 0.0176021 0 1 0
+0.47658 -0.134203 -0.371795 0 0 1
+-0.377841 0.294852 -0.371795 0 0 1
+-0.5 0.038259 -0.174403 1 0 0
+-0.5 0.312501 0.087333 1 0 0
+0.320513 0.143735 -0.344302 0.999461 -0.00751164 0.0319626
+0.5 0.178571 0.201798 1 0 0
+0.0411422 0.371795 0.11378 0 1 0
+0.151887 0.294872 0.20728 0.019511 0.999796 -0.00522758
+0.5 0.0339795 -0.0158833 1 0 0
+-0.143992 0.22544 -0.333333 0.0568377 0.218409 0.974201
+0.0956177 0.371795 0.121285 0 1 0
+-0.200161 -0.0428493 0.371196 0.876987 0.169465 0.449639
+0.365305 -0.0957996 0.368808 0.904257 -0.2924 0.311162
+-0.312613 -0.371795 -0.00270593 0 1 0
+0.373283 -0.371795 0.192381 0 1 0
+-0.453888 0.371795 -0.268278 0 1 0
+-0.232527 -0.0434359 -0.227653 0.0526835 0.998606 0.00313563
+-0.0329771 0.0187012 -0.333333 0 0 1
+0.172941 -0.371795 -0.0350899 0 1 0
+-0.322048 -0.371795 0.281681 0 1 0
+-0.5 0.22169 0.1779 1 0 0
+-0.260207 0.0626064 -0.333333 0 0 1
+0.381156 0.294872 0.304445 0 1 0
+-0.433248 0.371795 -0.136537 0 1 0
+0.5 0.10229 -0.361259 0.999983 -0.0023284 -0.00532208
+-0.192805 -0.204838 0.371795 0 0 1
+-0.348797 0.176831 0.320513 0 0 1
+-0.5 -0.0408575 -0.28821 1 0 0
+-0.482981 0.128549 -0.371795 0 0 1
+-0.441405 -0.371795 0.110526 0.145528 0.981159 0.127077
+-0.188314 -0.0196631 0.320513 0 0 1
+-0.26583 0.0256348 -0.0359866 0.670823 -0.443308 -0.594536
+-0.184623 -0.371795 -0.0421387 0 1 0
+-0.144885 -0.371795 0.259346 -0.287096 0.946097 0.149918
+-0.5 -0.0823159 0.221521 1 0 0
+0.0461707 0.371795 0.0182296 0 1 0
+-0.344508 0.0138873 -0.371795 0 0 1
+0.185893 0.249058 0.330201 0.169735 0.981984 0.0830477
+-0.223239 -0.200533 -0.333333 0 0 1
+-0.275892 -0.371795 0.0237645 0 1 0
+0.45517 -0.294872 -0.00828924 -0.0503956 0.99865 -0.0125563
+0.299372 0.294872 0.276017 0 1 0
+0.5 0.0295164 0.0187913 1 0 0
+-0.5 -0.219139 -0.196756 1 0 0
+0.141026 0.324405 -0.181153 1 0 0
+0.054679 0.371795 -0.065972 0 1 0
+-0.268948 -0.371795 -0.097081 0 1 0
+-0.448718 -0.366757 -0.331041 0.930645 0.357361 -0.0786909
+0.320702 0.128875 0.371795 0 0 1
+-0.120804 -0.266817 0.320513 0.00741082 -0.119853 0.992764
+-0.5 0.368904 -0.244542 0.758063 -0.652179 -0.00181916
+-0.0281159 -0.288217 -0.371795 -0.0253079 0.3064 0.951566
+-0.5 -0.089758 -0.0405221 1 0 0
+-0.5 -0.200407 0.165283 1 0 0
+0.5 0.245659 -0.0798268 1 0 0
+-0.354406 -0.371795 0.0525712 0 1 0
+0.21007 -0.322648 -0.371795 0 0 1
+-0.224996 -0.0430847 -0.0591315 -0.150481 0.988598 -0.0054425
+-0.074168 -0.294872 0.0288975 0 1 0
+0.182037 -0.371795 0.0530314 0 1 0
+0.260714 -0.193392 0.371795 0 0 1
+0.485571 -0.294872 -0.133354 0 1 0
+-0.489773 0.371795 0.115327 -0.0667805 0.997285 -0.0310363
+-0.00598719 0.21906 -0.333333 -0.0398318 0.161228 0.986113
+-0.2286 -0.0434 -0.202162 -0.0777371 0.996872 -0.0142376
+-0.44353 -0.339313 0.320513 -0.0215828 -0.00372004 0.99976
+-0.165732 -0.0537116 0.320513 0 0 1
+0.446712 -0.307534 -0.371795 -0.508039 -0.057894 0.859387
+-0.277752 0.150646 -0.333333 0 0 1
+0.167346 -0.371795 -0.0695221 0 1 0
+-0.5 0.227696 0.177362 1 0 0
+0.160253 -0.0745896 0.320513 0 0 1
+-0.5 0.167596 0.267577 1 0 0
+-0.0733852 0.00842414 -0.333333 0 0 1
+0.0104712 0.204555 0.349824 0.0151527 0.999884 0.00153327
+0.139107 0.371795 -0.34415 0.608051 0.77767 0.159697
+-0.18269 0.371795 -0.25827 0 1 0
+0.0349835 0.368837 -0.371795 -0.0589826 -0.37659 0.924501
+0.319499 0.139444 0.371795 0 0 1
+0.5 -0.285083 -0.359115 0.999582 -0.0284437 0.00517392
+-0.276675 0.371795 -0.212803 0 1 0
+0.0774816 0.371795 -0.261602 0 1 0
+0.5 0.134681 -0.0955208 1 0 0
+0.5 -0.103047 0.305158 1 0 0
+0.140803 -0.18658 0.371795 0 0 1
+0.0032519 -0.294872 -0.0391516 0 1 0
+0.0803297 0.244139 0.371795 0 0 1
+0.0287859 -0.294872 -0.258809 0 1 0
+-0.448718 -0.3282 0.0735278 1 0 0
+-0.0401703 0.151196 -0.333333 0 0 1
+0.0279671 0.256282 0.347672 0 1 0
+-0.267882 -0.371795 -0.230332 0 1 0
+-0.273014 -0.0101193 -0.230154 0.963418 0.267821 0.00987982
+0.281942 -0.197782 0.371795 0.167409 -0.176818 0.969902
+-0.291171 -0.213306 0.320513 0 0 1
+-0.448165 -0.0930386 -0.371795 0 0 1
+-0.5 -0.248424 -0.15615 1 0 0
+-0.242187 -0.0849601 -0.333333 0 0 1
+-0.320513 0.143433 -0.364208 0.986695 0.0362791 -0.158482
+-0.0535081 0.197905 0.342464 -0.283802 0.958809 0.0118821
+0.5 0.0912511 0.0570249 1 0 0
+-0.44508 -0.371795 -0.0274861 0.645189 0.763694 0.0224141
+-0.467023 0.371795 -0.203548 0 1 0
+0.307032 0.294872 0.0458754 0 1 0
+0.5 0.2881 -0.169147 0.990652 0.135128 0.0186956
+-0.0162967 -0.00672801 0.320513 0 0 1
+-0.038969 -0.0961238 -0.333333 0 0 1
+-0.338789 0.0888592 0.371795 0 0 1
+-0.158183 -0.371795 0.0307096 0 1 0
+-0.476499 0.306233 -0.371795 0 0 1
+0.105338 0.210612 -0.333333 0 0 1
+0.5 -0.238543 -0.055687 1 0 0
+-0.5 0.0256107 0.109117 1 0 0
+-0.170145 -0.116489 0.371795 0.406521 0.226212 0.885194
+-0.139762 0.371795 0.030851 0 1 0
+-0.409746 -0.371795 0.0898615 0 1 0
+-0.5 -0.23409 -0.320609 1 0 0
+0.113842 0.371795 0.117033 0 1 0
+-0.451073 0.371795 -0.275476 0 1 0
+-0.488048 0.371795 -0.0113772 -0.0153513 0.999871 0.00469986
+-0.49011 -0.260801 -0.371795 0.212776 -0.0550979 0.975546
+-0.448718 -0.331273 -0.157294 1 0 0
+0.150375 0.174043 0.371795 0 0 1
+0.5 -0.0908651 -0.177803 1 0 0
+0.376712 -0.371795 -0.15697 0 1 0
+0.471379 0.294872 0.0785659 0 1 0
+-0.5 0.0413458 -0.155936 1 0 0
+0.32462 -0.185218 0.320513 0 0 1
+-0.254458 0.0364237 -0.0492467 -0.565891 0.824402 -0.0112983
+-0.5 -0.148092 0.218399 1 0 0
+-0.119611 0.166117 0.353888 -0.604403 0.796679 0
+-0.5 0.325911 -0.0262168 1 0 0
+0.398256 -0.150446 0.320513 0 0 1
+0.5 -0.207908 0.304486 1 0 0
+0.5 0.142109 0.136225 1 0 0
+-0.234523 -0.0708152 0.371795 0 0 1
+-0.299093 0.364649 0.320513 0.0318382 0.189264 0.98141
+0.270906 0.160329 0.371795 0 0 1
+0.449791 -0.294872 0.203725 -0.490063 0.871486 0.018723
+-0.5 0.211147 -0.100944 1 0 0
+-0.298907 0.371795 -0.00312953 0 1 0
+-0.440848 -0.221185 -0.371795 0 0 1
+0.444536 -0.262502 0.320513 0 0 1
+0.132501 -0.156083 0.360959 -0.616164 0.787618 0
+0.31504 -0.371795 0.282494 0 1 0
+-0.161047 -0.0604868 -0.333333 0 0 1
+0.237122 -0.0379057 -0.00702839 -0.163918 0.985036 -0.0532504
+0.150889 -0.371795 0.00137388 0.103528 0.994479 -0.0171563
+0.5 -0.0594574 0.275396 1 0 0
+0.259015 0.229175 -0.365261 0.222271 0.973319 0.0569696
+-0.192121 0.371795 -0.244129 0 1 0
+-0.00434671 0.371795 -0.332776 0 1 0
+0.5 -0.165565 0.251164 1 0 0
+-0.5 -0.101829 -0.217289 1 0 0
+-0.5 0.271841 -0.120717 1 0 0
+-0.153417 -0.245139 0.371795 0.0330981 -0.167387 0.985336
+-0.437683 -0.371795 -0.253597 0.0377439 0.999275 0.00498009
+0.0758138 -0.165521 -0.333333 0 0 1
+0.5 0.222888 0.0360374 1 0 0
+-0.448718 -0.314108 0.0462568 1 0 0
+-0.380716 0.371795 -0.17249 0 1 0
+-0.141154 -0.322061 0.184764 1 0 0
+0.5 0.191929 0.1945 1 0 0
+-0.146894 0.0267485 0.320513 0 0 1
+-0.5 0.0941525 0.25988 1 0 0
+0.348869 0.129279 0.34101 0.877672 0.479261 0
+-0.5 0.0610027 0.132613 1 0 0
+-0.0944423 -0.110585 -0.333333 0 0 1
+-0.295824 0.371795 0.0148357 0 1 0
+-0.5 0.279547 -0.102027 1 0 0
+-0.435226 0.371795 0.0987572 0 1 0
+-0.41007 0.302951 -0.371795 0 0 1
+0.310332 -0.371795 -0.0866152 0 1 0
+-0.0288745 -0.202565 0.350307 0.164551 0.986369 0
+0.141026 0.333444 -0.111501 1 0 0
+0.5 0.199666 0.157068 1 0 0
+0.388727 -0.371795 0.30015 0 1 0
+-0.101859 0.177465 0.364606 -0.49507 0.846735 -0.194795
+0.497858 0.281971 -0.371795 -0.386292 0.152007 0.909765
+-0.137162 -0.152455 0.368779 0.724692 0.522738 0.448961
+0.5 -0.213949 -0.141518 1 0 0
+-0.362785 -0.102555 0.366753 0.824931 0.325235 -0.462288
+0.323274 -0.0150226 -0.371795 0.384216 0.0907833 0.918769
+0.5 -0.101077 0.0702635 1 0 0
+0.5 0.0839548 -0.311171 1 0 0
+-0.210143 -0.145699 -0.333333 0 0 1
+-0.364432 0.0454042 -0.371795 0 0 1
+-0.046388 -0.294872 0.283992 0 1 0
+0.230033 0.294872 -0.123415 0 1 0
+-0.5 -0.218496 -0.153188 1 0 0
+0.141109 -0.35331 -0.011546 1 0 0
+0.0330152 0.326081 0.320513 0 0 1
+0.266407 -0.371795 -0.0220467 0 1 0
+0.275148 -0.323805 -0.371795 0 0 1
+-0.047548 -0.142641 -0.333333 0 0 1
+0.380891 0.170352 -0.371795 0 0 1
+-0.24109 0.301263 -0.371795 0 0 1
+-0.36662 0.371795 0.293583 0 1 0
+0.5 -0.000257028 -0.36054 1 0 0
+-0.5 -0.0100639 -0.354331 1 0 0
+0.202948 0.0263648 -0.0573812 -0.690296 0.723161 0.0230108
+0.5 0.240973 0.132817 1 0 0
+-0.192457 0.207983 -0.333333 0 0 1
+-0.0462388 0.256282 0.350679 0 1 0
+0.359331 -0.371795 0.199256 0 1 0
+-0.161455 0.295024 0.320513 0 0 1
+-0.331977 -0.23755 0.320513 0 0 1
+-0.0591032 0.230897 -0.357027 0 1 0
+0.5 0.222613 -0.350193 1 0 0
+0.266672 -0.135229 0.371795 0 0 1
+0.0255942 0.346506 -0.371795 0 0 1
+-0.470542 0.311792 -0.371795 0 0 1
+-0.141154 -0.328328 -0.112546 1 0 0
+0.471102 -0.224541 0.320513 0 0 1
+0.321634 -0.133651 -0.371795 0.838395 0.0614318 0.54159
+-0.236538 0.371795 -0.175166 0 1 0
+-0.5 0.0538689 0.109065 1 0 0
+0.266916 -0.0879325 -0.333333 0 0 1
+0.156616 -0.371795 0.248048 0 1 0
+-0.5 -0.266248 0.0693996 1 0 0
+-0.5 0.318588 -0.31461 1 0 0
+0.221381 0.294872 0.136261 0 1 0
+-0.5 -0.116818 0.177499 1 0 0
+-0.381227 -0.371795 -0.222187 0 1 0
+0.297446 -0.371795 -0.278074 0 1 0
+-0.00709745 -0.294872 -0.14681 0 1 0
+0.402726 0.288151 -0.371795 0.0549174 -0.27594 0.959605
+0.250084 0.224705 0.353579 0.479246 0.87768 0
+-0.26608 -0.321478 0.320513 0 0 1
+-0.0765974 -0.128065 -0.333333 0 0 1
+0.131646 0.371795 -0.241308 0.102247 0.994679 -0.0126467
+0.412611 0.294872 0.315707 0.0589247 0.961054 0.270006
+-0.237116 -0.0430345 -0.205307 0.104957 0.99447 0.00372217
+0.379781 0.294872 0.107928 0 1 0
+0.375313 -0.371795 0.315717 -0.0936519 0.941408 -0.324006
+0.5 -0.222928 -0.193825 1 0 0
+-0.5 0.169561 -0.142986 1 0 0
+0.5 0.178131 -0.0553678 1 0 0
+0.5 -0.111388 -0.268413 1 0 0
+0.325679 -0.26481 0.320513 0 0 1
+0.5 0.130535 0.0990266 1 0 0
+-0.5 0.0813919 -0.187865 1 0 0
+-0.394175 0.371795 -0.0769756 0 1 0
+-0.296821 -0.303908 0.320513 0 0 1
+0.448718 -0.369976 0.220474 0.770418 -0.637434 0.0115847
+-0.0417281 -0.256282 0.345232 0 1 0
+0.214829 -0.371795 -0.0628849 0 1 0
+0.216007 0.294872 0.224417 0 1 0
+-0.47043 -0.0291088 -0.371795 0 0 1
+0.39574 -0.0454946 0.320513 0 0 1
+0.098198 -0.0401112 0.320513 0 0 1
+-0.405608 0.237978 -0.371795 0 0 1
+0.268547 -0.00704743 -0.225384 0.983391 -0.178959 -0.0302614
+-0.360674 -0.371795 -0.147694 0 1 0
+0.34699 -0.371795 -0.242167 0 1 0
+-0.325367 -0.178271 -0.371795 -0.293279 0.143123 0.945253
+-0.383878 -0.00852101 0.32892 0.981911 0.130707 -0.136991
+0.441674 -0.2841 0.320513 0 0 1
+0.15021 -0.214425 0.371795 0 0 1
+0.353125 -0.121486 0.361268 0.87768 -0.479248 0
+0.141026 0.367341 -0.0184421 0.993662 0.0904373 0.0667617
+0.5 0.212047 0.276983 1 0 0
+0.230242 0.230897 -0.368397 -0.062744 0.901396 0.428426
+-0.203172 -0.371795 -0.200786 0 1 0
+-0.5 0.0900951 -0.297471 1 0 0
+0.141109 -0.364386 -0.357787 0.987553 0.155447 0.0239786
+0.5 -0.0312297 0.00121094 1 0 0
+-0.5 0.321972 -0.124464 1 0 0
+-0.304492 0.371795 -0.225878 0 1 0
+0.141109 -0.32853 -0.240152 1 0 0
+0.141026 0.319724 -0.240658 1 0 0
+-0.00260006 0.251795 0.371795 -0.198412 0.770938 0.605217
+0.0619388 -0.256282 0.354117 0 1 0
+0.320513 -0.047267 -0.335615 0.726249 -0.047706 0.685774
+0.103316 0.194191 -0.333333 0 0 1
+-0.144789 0.166208 0.371795 0 0 1
+-0.406633 0.371795 -0.258635 0 1 0
+-0.17656 0.371795 0.257272 0 1 0
+-0.23672 0.288986 -0.371795 0 0 1
+0.132372 0.0822918 0.320513 0 0 1
+-0.324606 -0.371795 0.284592 0 1 0
+0.25404 -0.348083 0.320513 0 0 1
+0.0432458 0.371795 0.0359767 0 1 0
+0.141671 0.294872 -0.336859 0.744528 0.665364 0.0544815
+0.292962 0.294872 -0.282238 0 1 0
+-0.373606 -0.371795 -0.027514 0 1 0
+0.141026 0.320776 -0.102489 1 0 0
+-0.0767333 -0.159098 0.320513 0 0 1
+-0.225375 -0.146215 0.371795 0 0 1
+-0.473932 -0.294872 0.0442345 0 1 0
+0.142282 0.294872 0.219375 0.485803 0.871746 0.0636715
+0.0307149 0.371795 -0.118585 0 1 0
+0.5 0.268067 0.160677 1 0 0
+0.493312 -0.180555 -0.371795 -0.245868 0.00629503 0.969283
+0.448718 -0.325842 0.0707049 1 0 0
+-0.245433 -0.371795 0.142692 0 1 0
+0.373203 -0.371795 0.304946 0 1 0
+-0.000727829 -0.113342 -0.333333 0 0 1
+0.463574 -0.102399 0.320513 0 0 1
+-0.5 -0.142435 -0.305933 1 0 0
+-0.270086 -0.226171 -0.337441 0.407697 0.788969 -0.459685
+0.376625 0.122928 0.320513 0 0 1
+0.369404 -0.371795 -0.135497 0 1 0
+0.141026 0.371633 -0.0198361 0.722887 0.682439 -0.108217
+0.0476875 0.144647 -0.333333 0 0 1
+-0.5 -0.0861843 0.163752 1 0 0
+0.114994 -0.294872 -0.181163 0 1 0
+-0.441361 0.354152 0.320513 0 0 1
+0.5 0.142064 -0.0155318 1 0 0
+0.197656 0.0195098 -0.294895 0.859731 -0.510747 0
+-0.247913 0.371795 0.24088 0 1 0
+0.5 0.133506 -0.239118 1 0 0
+0.407373 0.0599016 0.320513 0 0 1
+-0.349275 0.371795 0.165198 0 1 0
+0.298792 -0.371795 -0.187637 0 1 0
+0.5 0.119419 0.192328 1 0 0
+-0.378481 -0.238346 0.320513 0 0 1
+-0.5 0.0492763 -0.323403 1 0 0
+-0.311739 0.17798 0.367786 0.671383 -0.590561 -0.447753
+0.123593 -0.294872 0.182534 0 1 0
+0.23518 0.0380757 -0.242644 0.129299 0.99149 0.0151119
+0.181477 0.294872 0.186551 0 1 0
+-0.297722 0.00110788 -0.333333 0 0 1
+-0.00440595 -0.256282 0.369955 -0.0877064 0.8237 -0.560202
+0.133411 0.371795 -0.183643 0.192852 0.980967 -0.022608
+0.164438 -0.371795 -0.261354 0 1 0
+0.357846 0.294872 0.0590792 0 1 0
+0.5 0.231219 0.0370887 1 0 0
+0.201501 -0.371795 0.0462301 0 1 0
+-0.029156 0.33845 -0.371795 0 0 1
+-0.5 -0.225995 -0.0681842 1 0 0
+-0.485292 -0.294872 0.196289 0 1 0
+-0.00148886 0.0114978 0.320513 0 0 1
+-0.5 -0.125189 0.00186924 1 0 0
+0.5 -0.142297 -0.353448 1 0 0
+-0.0903413 -0.142943 -0.333333 0 0 1
+0.0646244 0.230897 -0.340051 0.00270881 0.999936 0.0110316
+-0.0812771 -0.0540857 -0.333333 0 0 1
+-0.367972 -0.371795 -0.17133 0 1 0
+-0.23584 -0.0431461 -0.272494 0.0839998 0.996465 0.00143342
+0.141026 0.30236 -0.214884 0.996714 0.0807652 0.00621884
+-0.5 0.328644 0.219903 1 0 0
+-0.356184 0.221387 0.320513 0 0 1
+0.5 -0.158329 0.274118 1 0 0
+0.5 0.276195 -0.106325 1 0 0
+-0.499817 0.277875 -0.371795 0.758668 0.0537271 0.649258
+-0.5 0.237397 -0.168051 1 0 0
+-0.111861 0.197454 -0.333333 0 0 1
+0.100411 -0.184158 0.371795 -0.148515 0.245978 0.95783
+-0.138981 0.107671 -0.333333 0 0 1
+-0.5 0.140954 -0.240472 1 0 0
+-0.157153 0.371795 0.0342199 0 1 0
+-0.415645 -0.263674 0.320513 0 0 1
+-0.425 0.171356 -0.371795 0 0 1
+-0.442568 -0.201874 -0.371795 0 0 1
+-0.141154 -0.310721 0.247764 1 0 0
+0.5 -0.283565 -0.0163251 0.999501 -0.0285895 0.0134321
+-0.5 -0.14824 -0.364012 0.996619 -0.0109401 0.0814312
+0.300197 0.294872 -0.202424 0 1 0
+-0.5 -0.0132826 -0.347462 1 0 0
+-0.320513 0.0406931 -0.334544 -0.605156 -0.091466 0.790835
+-0.5 0.0256966 0.21366 1 0 0
+-0.5 -0.0505685 -0.00886509 1 0 0
+0.394183 0.132003 0.320513 0 0 1
+0.0640565 0.371795 -0.344426 0 1 0
+-0.413082 0.30153 0.320513 0 0 1
+-0.135744 0.201458 0.371795 0 0 1
+-0.338334 0.170442 -0.371795 0 0 1
+-0.5 0.312794 0.235999 1 0 0
+0.016905 0.210336 0.371795 0.0427467 -0.235186 0.97101
+0.483027 -0.294872 -0.0564191 0 1 0
+0.233288 -0.371795 -0.333194 0 1 0
+-0.221365 -0.042436 -0.154349 -0.21079 0.97727 0.022586
+0.1005 -0.0905361 0.320513 0 0 1
+0.297128 -0.371795 -0.202467 0 1 0
+0.5 -0.254329 -0.0234644 1 0 0
+0.125113 0.371795 -0.0268187 0 1 0
+0.480507 -0.294872 -0.0312777 0 1 0
+0.0623769 0.230897 -0.352232 0 1 0
+-0.180012 -0.0968153 -0.333333 0 0 1
+-0.5 0.125842 0.158482 1 0 0
+-0.0738604 -0.294872 0.21635 0 1 0
+0.255916 0.294872 -0.189879 0 1 0
+-0.0948954 -0.294872 0.00515973 0 1 0
+-0.5 0.0913111 -0.353895 1 0 0
+-0.5 0.0520531 -0.329246 1 0 0
+-0.378616 0.144977 0.320513 0 0 1
+0.289322 0.294872 0.162604 0 1 0
+-0.0512282 -0.294872 0.158647 0 1 0
+-0.346111 0.246905 0.320513 0 0 1
+0.283005 -0.244896 -0.371795 0 0 1
+0.5 0.190044 0.300519 1 0 0
+0.366171 -0.371795 -0.0584504 0 1 0
+0.118082 -0.294872 -0.148743 0 1 0
+0.5 -0.130563 -0.294286 1 0 0
+-0.5 -0.208766 -0.212808 1 0 0
+0.199042 0.294872 -0.258593 0 1 0
+-0.5 -0.232097 0.00298533 1 0 0
+-0.197947 -0.371795 0.151476 0 1 0
+0.5 0.0240542 -0.190804 1 0 0
+0.5 -0.0948088 0.134082 1 0 0
+0.141026 0.33265 -0.108596 1 0 0
+0.286525 -0.371795 -0.14709 0 1 0
+0.442977 0.294872 -0.0823782 0 1 0
+-0.11807 -0.192735 -0.333333 0 0 1
+0.5 -0.192929 -0.0418165 1 0 0
+-0.30917 -0.371795 0.0666415 0 1 0
+0.446383 -0.174179 -0.371795 0 0 1
+0.0200179 0.371795 -0.178328 0 1 0
+-0.424445 -0.0353028 -0.371795 0 0 1
+0.0905541 -0.176826 -0.333333 0 0 1
+0.348976 -0.164497 0.320513 0 0 1
+-0.216029 -0.240075 0.34306 0.349465 0.936949 0
+-0.141154 -0.312224 0.0784091 1 0 0
+-0.15483 0.371795 -0.204078 0 1 0
+0.324012 0.00280799 -0.371795 0.557556 0.0844413 0.825834
+0.5 0.0660427 -0.0689683 1 0 0
+0.343377 -0.1188 0.371795 0.0603961 -0.0339208 0.997598
+-0.120306 -0.258387 -0.371795 0 0 1
+0.275918 -0.371795 0.0401132 0 1 0
+-0.45897 -0.294872 -0.276798 0.0519148 0.998651 -0.000523576
+0.448718 -0.369476 -0.0635023 0.727814 -0.645655 0.23112
+0.448718 -0.297523 -0.286451 0.862042 -0.498165 0.093362
+-0.0499484 0.194855 -0.333333 0 0 1
+0.0878074 0.371795 -0.331403 0 1 0
+-0.5 0.191446 -0.235672 1 0 0
+0.5 0.141229 0.294957 1 0 0
+0.5 -0.240789 0.207044 1 0 0
+-0.215518 0.281512 -0.371795 0 0 1
+-0.44452 -0.153929 -0.371795 0 0 1
+0.0490671 0.371795 -0.15998 0 1 0
+-0.421693 0.371795 0.0469402 0 1 0
+0.0362308 0.371795 -0.330474 0 1 0
+0.5 0.253793 -0.26744 1 0 0
+-0.141154 -0.346622 -0.16718 1 0 0
+0.5 0.214921 0.310457 1 0 0
+0.5 0.0198773 0.212447 1 0 0
+-0.383115 0.371795 0.139418 0 1 0
+-0.5 0.0127941 -0.308673 1 0 0
+-0.5 -0.239216 0.263109 1 0 0
+0.0318417 0.0691275 0.320513 0 0 1
+0.196807 0.294872 -0.286263 0 1 0
+0.5 0.222014 -0.340139 1 0 0
+-0.146595 -0.314833 0.320513 0.423549 -0.151347 0.893141
+0.440099 0.294872 0.0392835 0 1 0
+-0.121359 0.164755 0.336894 -0.614219 0.789135 0
+0.187811 -0.193349 -0.333333 0 0 1
+0.110242 0.0058443 0.320513 0 0 1
+-0.174903 -0.371795 0.310066 0.00278651 0.999885 -0.0148808
+-0.0171046 0.371795 0.178991 0 1 0
+-0.18517 0.069686 0.320513 0.294585 -0.122648 0.947722
+0.00464202 0.371795 0.310362 0 1 0
+0.141026 0.299299 0.187164 0.868405 0.424959 -0.255504
+0.268689 -0.00618689 -0.270943 0.990323 -0.137401 0.0195114
+0.141109 -0.305916 0.252202 0.998905 0.0467016 -0.00263383
+-0.178718 0.371795 -0.00768508 0 1 0
+0.5 0.0990617 0.290076 1 0 0
+-0.387519 0.257417 0.320513 0 0 1
+-0.0398838 0.371795 -0.0372901 0 1 0
+0.379485 -0.02128 -0.371795 0 0 1
+0.395673 -0.0715364 0.320513 0 0 1
+-0.111079 -0.212366 0.371795 0 0 1
+-0.219981 0.158261 0.371795 0 0 1
+-0.448718 -0.326106 -0.216485 1 0 0
+0.369863 -0.371795 0.123191 0 1 0
+-0.193305 -0.0669074 0.320513 0.549593 0.314011 0.774174
+-0.448718 -0.363731 0.153899 0.970683 0.220367 -0.0959841
+-0.351359 -0.371795 -0.267609 0 1 0
+-0.094521 0.125831 -0.333333 0 0 1
+0.484256 0.272429 -0.371795 0 0 1
+-0.0674234 -0.013382 0.320513 0 0 1
+0.0986458 0.202838 -0.333333 0 0 1
+-0.186649 -0.248894 0.350414 0.212557 0.977149 0
+-0.468437 0.0793969 0.320513 0 0 1
+-0.416789 -0.184245 0.320513 0 0 1
+-0.0794023 0.336291 0.320513 0 0 1
+-0.300879 0.371795 0.030668 0 1 0
+-0.5 0.16845 0.0305437 1 0 0
+-0.172782 0.371795 -0.359021 0 1 0
+-0.205501 -0.371795 -0.177998 0 1 0
+-0.321407 -0.371795 0.149267 0 1 0
+-0.484127 0.371795 0.187666 0 1 0
+-0.277424 0.261266 0.320513 0 0 1
+-0.5 -0.0183322 0.143952 1 0 0
+-0.0911892 0.361108 0.320513 -0.0262455 0.160322 0.986716
+-0.24971 -0.371795 -0.131431 0 1 0
+-0.416041 0.371795 0.306351 0 1 0
+-0.5 -0.198293 0.307135 1 0 0
+-0.196515 -0.371795 -0.277658 0 1 0
+0.338873 -0.334695 -0.371795 0 0 1
+-0.41269 0.371795 -0.199401 0 1 0
+-0.0481318 -0.245971 0.371795 0.0422931 -0.097703 0.994317
+0.46732 0.128468 -0.371795 0 0 1
+-0.496638 -0.294872 0.066511 0.443297 0.893481 0.0719688
+-0.406729 0.272248 0.320513 0 0 1
+0.141017 -0.294872 0.0900438 0.932221 0.359658 0.0401287
+-0.180772 0.371795 -0.192541 0 1 0
+-0.411907 0.0253392 0.320513 0 0 1
+-0.5 -0.165333 0.0755562 1 0 0
+-0.5 0.155965 -0.0220112 1 0 0
+-0.10469 0.371795 0.218051 0 1 0
+-0.199777 0.0304179 -0.165283 0.731486 0.681782 -0.0100807
+-0.397508 0.182288 -0.371795 0 0 1
+0.299109 0.0262091 0.371795 0 0 1
+-0.448718 -0.350118 -0.0693287 1 0 0
+0.217274 0.25727 -0.371795 0 0 1
+0.468734 -0.294872 -0.224949 0 1 0
+0.5 0.123105 0.00387528 1 0 0
+0.5 -0.220293 -0.164225 1 0 0
+-0.5 0.257308 -0.249296 1 0 0
+0.5 0.248567 -0.341929 1 0 0
+-0.281549 -0.343946 0.320513 0 0 1
+0.0803764 0.292686 0.320513 0 0 1
+-0.493349 -0.294872 0.20806 0.143725 0.989615 -0.00229351
+0.452447 -0.294872 0.0586804 -0.472645 0.878956 -0.0635851
+0.5 0.143143 0.238445 1 0 0
+-0.00120908 -0.294872 0.0567771 0 1 0
+0.0915916 -0.294872 0.14033 0 1 0
+-0.5 -0.148664 -0.192765 1 0 0
+0.0441985 -0.283842 -0.371795 0 0 1
+0.0630002 0.321529 0.320513 0 0 1
+-0.5 -0.124236 0.258129 1 0 0
+-0.383685 -0.00350018 0.371795 -0.675966 0.00127095 0.736932
+-0.118128 0.166259 0.320513 0.370512 -0.481004 0.794579
+-0.0179162 -0.247412 0.371795 0.00891006 -0.18221 0.983219
+0.5 0.167046 -0.212195 1 0 0
+-0.141154 -0.354877 -0.189108 1 0 0
+0.275034 -0.350311 0.320513 0 0 1
+0.295333 -0.371795 -0.15053 0 1 0
+-0.302088 0.310176 0.320513 0 0 1
+0.21519 0.0350114 -0.287396 -0.382156 0.924087 -0.00450394
+0.0105046 -0.294872 -0.015591 0 1 0
+0.0953771 0.00201701 -0.333333 0 0 1
+-0.5 0.264873 -0.319675 1 0 0
+-0.328635 0.371795 -0.284393 0 1 0
+-0.5 0.153268 -0.319252 1 0 0
+0.448718 -0.361674 0.0230208 1 0 0
+0.0753784 -0.230897 -0.335829 -0.024404 0.798938 -0.600918
+-0.141154 -0.361011 -0.307558 1 0 0
+0.385848 -0.371795 0.0167874 0 1 0
+0.121285 -0.190887 -0.333333 0 0 1
+-0.5 0.0716671 -0.358454 1 0 0
+0.248197 0.294872 0.16283 0 1 0
+0.141109 -0.35756 -0.0311755 1 0 0
+-0.5 -0.229882 -0.168894 1 0 0
+0.387687 -0.23715 -0.371795 0 0 1
+-0.141154 -0.361279 -0.00883647 0.999661 -0.0234592 0.0113241
+-0.208828 -0.230897 -0.341345 -0.0422012 0.99085 -0.128203
+0.0384901 -0.294872 0.172833 0 1 0
+-0.195061 -0.371795 -0.106581 0 1 0
+-0.159259 0.371795 -0.274864 0 1 0
+0.0314203 0.00519554 0.320513 0 0 1
+-0.329352 0.264378 0.320513 0 0 1
+0.0696794 0.371795 -0.154591 0 1 0
+0.486141 0.294872 -0.204573 0 1 0
+-0.176966 0.0540329 0.320513 0 0 1
+0.497896 0.294872 -0.335181 0.915858 0.393842 -0.0780614
+-0.1087 -0.294872 0.0884961 0 1 0
+-0.473836 -0.294872 0.137664 0 1 0
+-0.475944 -0.294872 -0.113163 0 1 0
+-0.322231 0.371795 -0.117331 0 1 0
+-0.291513 0.298383 0.320513 0 0 1
+-0.5 -0.213916 0.0272728 1 0 0
+-0.093695 0.371795 0.290454 0 1 0
+0.107427 -0.294872 0.158255 0 1 0
+-0.499166 -0.115273 0.320513 0.92423 0.0811012 -0.373125
+0.448718 -0.371026 0.135825 0.813852 -0.581069 -0.00170613
+-0.421719 -0.371795 -0.122358 0 1 0
+-0.237924 0.0429639 -0.0429587 -0.215818 0.960627 0.174983
+0.141026 0.327522 0.155098 1 0 0
+0.0495417 -0.294872 0.056839 0 1 0
+-0.181913 -0.284494 0.320513 0 0 1
+-0.252376 -0.371795 -0.139268 0 1 0
+-0.21832 0.15428 0.371795 0 0 1
+0.287905 0.19977 0.33036 0.548979 0.833499 0.062467
+-0.451435 0.371795 0.226334 0 1 0
+0.5 -0.18252 0.298955 1 0 0
+0.0951449 -0.0871193 0.320513 0 0 1
+0.5 0.0891786 -0.313227 1 0 0
+0.425167 -0.153504 0.320513 0 0 1
+-0.22296 -0.172275 0.371795 0 0 1
+-0.5 0.292128 -0.25404 1 0 0
+0.5 -0.12617 -0.0697949 1 0 0
+0.222993 0.294872 0.185433 0 1 0
+-0.301024 -0.188695 0.366624 0.701694 0.712479 0
+-0.104112 0.371795 -0.172264 0 1 0
+0.366307 -0.280433 -0.371795 0 0 1
+-0.158175 0.254138 0.32516 -0.0813905 0.98941 0.120181
+-0.309138 0.193962 -0.371468 0.596356 -0.310772 -0.740122
+0.0207879 0.158794 -0.333333 0 0 1
+-0.362015 0.104619 0.351477 0.920256 -0.391289 0.00466116
+0.33252 -0.371795 0.17539 0 1 0
+-0.191001 -0.371795 -0.00686012 0 1 0
+0.263157 0.0891156 -0.333333 0 0 1
+0.5 0.277563 -0.35378 1 0 0
+0.355912 0.294872 0.15402 0 1 0
+0.225818 -0.371795 0.279363 0 1 0
+-0.0252905 -0.104284 -0.333333 0 0 1
+0.114274 0.371795 0.300608 0 1 0
+0.5 -0.118623 0.288397 1 0 0
+0.0728085 -0.294872 -0.360703 0.00066481 0.999782 0.0208905
+0.264397 -0.0185476 -0.100272 0.86359 -0.504167 -0.00526959
+-0.142227 -0.147524 0.350577 0.704278 0.709861 0.00945915
+-0.448718 -0.362762 -0.00255599 0.985589 0.167582 0.0230455
+0.5 -0.0970515 -0.100024 1 0 0
+0.450787 -0.225279 -0.371795 0 0 1
+0.35474 -0.142896 -0.371795 0 0 1
+0.388832 0.103963 -0.371795 0 0 1
+-0.5 -0.207538 0.0756883 1 0 0
+-0.413182 0.371795 0.19767 0 1 0
+0.141026 0.341021 0.121798 1 0 0
+-0.5 0.110159 0.177982 1 0 0
+0.266838 -0.0133123 -0.259156 0.917521 -0.397588 0.00890752
+-0.441574 0.371795 -0.347311 0 1 0
+-0.297296 0.371795 0.185434 0 1 0
+0.479031 0.294872 -0.307919 0 1 0
+-0.5 -0.0803787 0.268688 1 0 0
+-0.0235752 0.087551 0.320513 0 0 1
+-0.448718 -0.29761 0.239955 0.791083 0.611559 -0.0135082
+-0.0506575 0.24847 0.371795 0.0397667 0.0823754 0.995808
+-0.5 0.149928 0.0287264 1 0 0
+0.377748 0.0617299 0.320513 0.859433 0.112957 0.498613
+-0.5 0.366425 -0.202494 0.895002 -0.433622 -0.104613
+-0.0708103 -0.0319918 -0.333333 0 0 1
+-0.185299 -0.31233 -0.371795 0 0 1
+0.33384 -0.371795 -0.16204 0 1 0
+-0.0801069 0.371795 -0.00694574 0 1 0
+0.28034 -0.371795 0.143814 0 1 0
+-0.477693 -0.0264598 -0.371795 0 0 1
+0.158454 0.294872 -0.111443 0 1 0
+-0.5 0.172266 -0.15816 1 0 0
+-0.270543 0.371795 0.132809 0 1 0
+0.377064 0.0586061 0.365848 0.962663 0.213184 0.166829
+-0.5 0.191288 0.0912373 1 0 0
+-0.256072 -0.192978 -0.333333 0 0 1
+-0.0274565 0.360777 0.320513 0 0 1
+0.448718 -0.334567 0.00887794 1 0 0
+0.448718 -0.366709 -0.0883285 0.962991 -0.244782 0.112827
+0.448718 -0.365007 0.280448 0.985144 -0.171356 0.0113359
+0.37177 -0.371795 0.250716 0 1 0
+0.403019 -0.371795 -0.235941 0 1 0
+0.257936 -0.371795 -0.3456 0 1 0
+0.0464471 0.371795 0.149656 0 1 0
+-0.485325 0.371795 -0.160835 0 1 0
+-0.141154 -0.362914 -0.103374 0.993669 -0.0932067 0.0627254
+-0.5 0.0169123 0.0404162 1 0 0
+-0.385198 -0.371795 -0.221088 0 1 0
+-0.5 -0.0506845 -0.201636 1 0 0
+0.5 0.110018 0.135744 1 0 0
+-0.116777 0.371795 0.244501 0 1 0
+-0.225749 0.0431506 -0.245315 0.102778 0.994691 -0.00517768
+0.5 0.0781827 0.0647836 1 0 0
+-0.256937 0.0346877 -0.28675 -0.599376 0.800429 0.00790771
+0.5 0.0674829 -0.26736 1 0 0
+0.0737653 -0.27285 0.320513 0 0 1
+0.35258 -0.00950715 0.371795 0 0 1
+-0.223354 0.0429411 -0.100971 0.173909 0.984758 0.00283458
+0.0503784 -0.0217785 0.320513 0 0 1
+-0.5 0.0563387 -0.137048 1 0 0
+-0.5 0.215224 -0.285331 1 0 0
+0.329015 -0.158311 0.370646 0.554126 -0.351334 0.754658
+-0.220179 0.271625 -0.371795 0 0 1
+-0.336626 0.371795 0.0890296 0 1 0
+0.5 -0.0370064 -0.0509155 1 0 0
+-0.119331 0.371795 0.264262 0 1 0
+0.354932 0.20858 -0.371795 0 0 1
+-0.382346 -0.0299366 0.339244 0.99474 0.102415 0.00164671
+0.5 -0.176804 -0.34017 1 0 0
+0.379744 -0.371795 -0.187881 0 1 0
+-0.379135 -0.371795 0.0260733 0 1 0
+0.195073 0.0141118 -0.0816384 0.902529 -0.429982 0.0236048
+-0.102495 0.371795 0.244826 0 1 0
+0.186978 0.294872 -0.25146 0 1 0
+0.476491 0.294872 0.117609 0 1 0
+0.5 0.15461 -0.307251 1 0 0
+-0.5 0.115686 0.100388 1 0 0
+0.384931 -0.371795 0.0978616 0 1 0
+-0.129293 0.0979464 -0.333333 0 0 1
+0.0818641 0.0831247 -0.333333 0 0 1
+-0.5 0.217607 0.217288 1 0 0
+-0.40886 -0.371795 0.116417 0 1 0
+0.0557252 -0.294872 0.296804 0 1 0
+0.141026 0.296578 0.0648418 0.765394 0.64279 -0.0315124
+0.5 0.186056 -0.273074 1 0 0
+0.388783 0.270389 -0.371795 0 0 1
+-0.273487 -0.371795 -0.367699 0.0368796 0.951898 0.304188
+-0.424009 -0.338858 -0.371795 0 0 1
+0.489906 0.294872 0.00789064 0.0994966 0.994647 0.0278897
+0.363189 -0.337636 0.320513 0 0 1
+-0.189881 0.371795 -0.299961 0 1 0
+0.308848 0.294872 0.242331 0 1 0
+0.329271 -0.371795 0.0753132 0 1 0
+-0.0261039 -0.294872 0.212602 0 1 0
+-0.293667 -0.371795 -0.00610212 0 1 0
+-0.368388 -0.371795 0.144421 0 1 0
+0.0514435 0.371795 0.275702 0 1 0
+-0.445531 -0.117915 -0.371795 0 0 1
+-0.311305 -0.371795 0.08933 0 1 0
+-0.5 0.167081 0.0737234 1 0 0
+-0.49877 0.260999 0.320513 -0.68876 -0.0121943 0.724887
+0.308723 0.0874025 -0.333333 0 0 1
+-0.5 -0.20597 -0.318049 1 0 0
+0.388805 0.294872 0.29064 0 1 0
+0.431475 -0.371795 -0.308866 0 1 0
+0.210598 0.294872 -0.0595391 0 1 0
+-0.5 0.0557732 -0.120242 1 0 0
+0.157969 0.231528 0.371795 0 0 1
+-0.5 0.115827 -0.240572 1 0 0
+-0.369362 0.278409 0.320513 0 0 1
+-0.5 0.0962917 -0.173579 1 0 0
+-0.468859 0.371795 -0.325253 0 1 0
+0.198147 -0.286737 -0.371795 0 0 1
+-0.5 -0.0429295 -0.222473 1 0 0
+-0.110143 -0.291614 -0.371795 -0.0208888 0.233145 0.972217
+0.261502 -0.371795 -0.187027 0 1 0
+0.41782 0.17206 0.320513 0 0 1
+-0.0580503 0.371795 -0.191211 0 1 0
+0.170909 0.294872 -0.029721 0 1 0
+0.131401 -0.247772 0.371795 -0.0717114 -0.102326 0.992163
+0.425369 0.134701 0.320513 0 0 1
+-0.0386982 -0.294872 -0.212525 0 1 0
+0.5 0.109037 -0.0942401 1 0 0
+0.212984 -0.0873636 0.371795 0 0 1
+0.186145 -0.173559 0.371795 0 0 1
+-0.216547 -0.0900128 0.371795 0 0 1
+0.0521029 -0.294872 0.107186 0 1 0
+0.448415 -0.00577111 -0.371795 0 0 1
+-0.0109094 0.166481 -0.333333 0 0 1
+0.5 0.144019 -0.277987 1 0 0
+-0.207675 0.0368401 -0.0628329 0.544795 0.838416 -0.0160588
+-0.5 -0.170539 -0.17213 1 0 0
+0.5 -0.197096 0.303541 1 0 0
+-0.141154 -0.369254 0.036358 0.808583 -0.568821 -0.150456
+0.0964466 -0.0340477 0.320513 0 0 1
+0.129421 0.196411 -0.333333 0 0 1
+-0.0568755 -0.294872 0.239158 0 1 0
+-0.107657 -0.294872 -0.269796 0 1 0
+-0.249868 -0.0908131 0.371795 0 0 1
+-0.141154 -0.348389 -0.00522859 1 0 0
+0.0480804 0.0835644 -0.333333 0 0 1
+-0.0826149 0.371795 -0.0100051 0 1 0
+-0.0830401 0.0104109 0.320513 0 0 1
+0.205665 -0.371795 0.120639 0 1 0
+0.0140619 0.371795 -0.084149 0 1 0
+-0.448718 -0.369831 -0.179544 0.686088 0.722996 0.0809913
+-0.164028 -0.371795 -0.218019 0 1 0
+0.5 -0.177687 -0.00684241 1 0 0
+-0.00627916 0.371795 -0.0706304 0 1 0
+0.214484 -0.240651 0.325522 -0.432328 0.853861 -0.289851
+-0.448718 -0.313429 -0.321672 1 0 0
+0.144842 0.17807 -0.333333 0 0 1
+0.5 -0.275808 -0.365807 0.981026 0.00463443 -0.193819
+-0.388621 0.371795 -0.172344 0 1 0
+-0.5 -0.200159 0.028582 1 0 0
+0.0154721 0.100296 0.320513 0 0 1
+0.362994 0.294872 -0.330787 0 1 0
+-0.27988 -0.146819 0.371795 0 0 1
+-0.12076 0.371795 0.0302665 0 1 0
+0.44191 0.2843 0.320513 -0.0102698 0.078289 0.996878
+-0.444109 -0.371795 -0.308397 0.223419 0.966049 -0.129738
+-0.360438 -0.371795 0.20146 0 1 0
+0.466642 -0.294872 0.115577 0 1 0
+0.0959014 -0.00363057 0.320513 0 0 1
+-0.108714 0.137517 0.320513 0 0 1
+-0.5 0.051375 -0.271941 1 0 0
+0.14501 -0.368833 0.320513 -0.33506 -0.66371 0.668748
+0.292114 -0.371795 0.15411 0 1 0
+-0.194753 -0.350488 -0.371795 0 0 1
+0.443204 -0.0885405 -0.371795 0 0 1
+0.385686 -0.371795 0.195869 0 1 0
+0.5 0.274834 -0.0977692 1 0 0
+0.5 -0.234146 -0.0498791 1 0 0
+-0.448718 -0.336514 -0.0338014 1 0 0
+-0.0147119 -0.0156003 -0.333333 0 0 1
+0.0924025 0.165357 -0.333333 0 0 1
+-0.470675 -0.13122 0.320513 0 0 1
+-0.007533 -0.179284 0.320513 0 0 1
+-0.282197 0.371795 0.10959 0 1 0
+-0.0705341 -0.230897 -0.359159 0 1 0
+-0.223712 -0.0429723 -0.194139 -0.159069 0.987267 0.00117273
+-0.48719 -0.17337 0.320513 0 0 1
+-0.188763 0.0110072 -0.170094 0.972198 0.23369 0.0148004
+0.172856 -0.371795 0.0727264 0 1 0
+0.495598 -0.199729 -0.371795 -0.455866 0.0859009 0.885893
+0.266482 0.154738 0.371795 0 0 1
+0.0177176 -0.294872 -0.246114 0 1 0
+-0.114328 0.371795 0.108295 0 1 0
+0.216183 -0.240065 0.320513 0.150664 -0.489405 0.858943
+-0.141154 -0.320214 -0.269266 1 0 0
+-0.5 -0.124335 -0.370462 0.910811 0 0.412824
+-0.324768 -0.371795 0.0486428 0 1 0
+-0.469029 -0.0321404 -0.371795 0 0 1
+-0.5 0.282704 0.260629 1 0 0
+-0.5 -0.205913 0.0870973 1 0 0
+-0.474761 0.371795 -0.0396218 0 1 0
+0.0268104 -0.026566 0.320513 0 0 1
+0.270796 -0.212578 0.32451 -0.520464 0.789582 -0.325083
+0.268423 -0.115166 0.371795 0 0 1
+-0.149123 -0.214481 -0.333333 0 0 1
+-0.5 -0.10348 0.156442 1 0 0
+-0.305604 0.184115 0.323762 -0.643766 0.662237 0.383415
+0.5 0.0926859 0.0980641 1 0 0
+0.448718 -0.331295 -0.332305 1 0 0
+-0.204374 0.0546224 -0.333333 0 0 1
+-0.121877 0.371795 -0.00540161 0 1 0
+0.459243 -0.294872 0.204114 -0.0249722 0.999668 -0.0063113
+0.0453476 0.0302611 -0.333333 0 0 1
+0.206305 -0.0296438 -0.0205456 0.616244 0.787 -0.0295638
+-0.5 -0.0548683 -0.166053 1 0 0
+0.0467646 -0.0572622 -0.333333 0 0 1
+0.0625641 -0.294872 -0.0351117 0 1 0
+0.354527 0.0943362 0.371795 0.029277 0.0109395 0.999511
+0.477253 -0.294872 -0.264692 0 1 0
+0.5 -0.189795 -0.288862 1 0 0
+-0.135847 -0.294872 -0.105054 -0.292913 0.95381 0.0666913
+-0.383261 -0.227517 0.320513 0 0 1
+0.283879 -0.216262 -0.333333 0.214246 -0.404085 0.889277
+-0.196847 -0.161938 0.371795 0 0 1
+-0.0130784 -0.294872 -0.234798 0 1 0
+-0.5 0.275234 -0.171305 1 0 0
+-0.414696 0.342295 0.320513 0 0 1
+-0.5 -0.089055 0.263483 1 0 0
+-0.371899 -0.371795 -0.24659 0 1 0
+-0.28326 0.325534 0.320513 0 0 1
+0.101254 -0.294872 0.0689339 0 1 0
+0.0175172 0.314854 0.320513 0 0 1
+0.5 -0.149942 -0.176135 1 0 0
+0.189998 0.278791 0.320513 0 0 1
+0.309799 0.178884 -0.333333 0.31377 0.247561 0.916658
+-0.180437 0.229132 0.371795 0 0 1
+0.107888 -0.294872 0.0453165 0 1 0
+0.104097 0.256282 0.35524 0 1 0
+0.162231 0.0862396 -0.333333 0 0 1
+-0.5 0.0714387 0.244702 1 0 0
+0.195594 0.015228 -0.0528319 0.907549 -0.419851 -0.0088963
+-0.168475 0.146865 0.371795 0 0 1
+0.100094 0.226303 -0.333333 0.103861 0.24396 0.964208
+-0.0273609 0.230897 -0.369015 0.0564076 0.691301 0.720362
+0.105925 -0.294872 0.232831 0 1 0
+-0.189215 0.233606 -0.371795 0.0533433 0.623174 0.780262
+-0.24644 0.0406058 -0.284101 -0.370587 0.928798 0
+-0.141154 -0.315596 0.2662 1 0 0
+-0.140954 -0.010218 0.320513 0 0 1
+-0.250922 -0.0616378 -0.333333 0 0 1
+0.0953648 0.371795 0.00102079 0 1 0
+0.0431648 0.230897 -0.371178 -0.089293 0.628722 0.772486
+-0.0905234 -0.255543 -0.371795 0 0 1
+-0.5 -0.0385864 -0.299968 1 0 0
+0.290675 -0.0620428 -0.333333 0 0 1
+-0.0905973 0.371795 0.244823 0 1 0
+0.450556 0.157387 -0.371795 0 0 1
+-0.0532884 0.371795 0.00588496 0 1 0
+0.302492 0.294872 -0.0914982 0 1 0
+0.193102 0.0690029 0.322627 0.730303 0.1508 -0.666271
+-0.410912 0.345439 0.320513 0 0 1
+0.310663 -0.224469 0.320513 0 0 1
+-0.0879356 -0.294872 -0.152442 0 1 0
+-0.442465 0.371795 -0.0600442 0 1 0
+0.105675 0.312032 -0.371795 0 0 1
+0.137303 0.348521 0.320513 0.358866 0.110786 0.926791
+0.5 -0.201649 0.201694 1 0 0
+-0.492438 0.161427 0.320513 -0.278135 0.0263588 0.96018
+0.289443 0.222827 0.320513 0 0 1
+0.26836 0.00774698 -0.320089 0.97408 0.224981 0.0234997
+0.257043 -0.0129135 0.00545585 0.445221 -0.215192 0.869178
+-0.240975 -0.301121 -0.371795 0 0 1
+0.269874 -0.371795 0.187682 0 1 0
+0.358843 -0.327637 -0.371795 0 0 1
+0.0219895 0.371795 -0.33931 0 1 0
+0.125704 -0.294872 -0.354524 0 1 0
+-0.0209983 0.371795 -0.15814 0 1 0
+0.0892108 0.321918 0.320513 0 0 1
+-0.435769 0.371795 0.281973 0 1 0
+-0.443912 -0.371795 0.287259 0.367959 0.929678 -0.0174363
+0.170324 0.0342155 -0.333333 0 0 1
+-0.406162 0.371795 -0.196014 0 1 0
+0.5 0.0389429 -0.148133 1 0 0
+-0.161753 0.239834 0.371795 0 0 1
+-0.0142296 -0.11338 -0.333333 0 0 1
+-0.258417 0.34297 0.320513 0 0 1
+0.0188322 -0.0972783 0.320513 0 0 1
+0.17449 -0.270934 0.320513 0 0 1
+0.163653 -0.253746 0.360233 -0.132819 0.99114 0
+0.467746 0.294872 0.187227 0 1 0
+-0.189813 0.0149184 -0.182076 0.941197 0.337644 0.0120804
+-0.272814 0.224899 -0.335827 -0.350499 0.802769 0.482404
+-0.5 0.116859 -0.2007 1 0 0
+0.214386 0.0346364 -0.228032 -0.410924 0.911149 0.0308127
+0.179645 0.294872 0.234251 0 1 0
+-0.5 0.278093 0.239999 1 0 0
+-0.33712 -0.371795 -0.011349 0 1 0
+-0.5 -0.020956 -0.108451 1 0 0
+0.023249 0.354601 0.320513 0 0 1
+-0.100068 -0.203755 0.371795 0 0 1
+0.372917 -0.371795 0.0564865 0 1 0
+-0.5 -0.165598 0.286863 1 0 0
+0.238759 -0.371795 0.173608 0 1 0
+0.141109 -0.360212 0.0198578 1 0 0
+0.141109 -0.34193 0.0819563 1 0 0
+-0.36537 0.0837318 0.371795 -0.198187 0.00196837 0.980162
+0.5 -0.229621 0.286064 1 0 0
+0.025495 -0.0214812 0.320513 0 0 1
+0.254093 -0.030443 -0.206682 -0.652278 0.757934 -0.00835776
+0.5 -0.141013 0.104637 1 0 0
+-0.236611 0.230897 -0.367226 -0.0658169 0.877479 0.475077
+-0.47265 0.118823 -0.371795 0 0 1
+-0.262577 0.0296028 -0.289939 0.720302 -0.693661 0
+-0.259809 0.173811 -0.333333 0 0 1
+0.5 0.0226611 -0.0525102 1 0 0
+0.445927 0.203922 -0.371795 0 0 1
+0.141026 0.344279 0.0297655 1 0 0
+0.465999 -0.294872 0.11724 0 1 0
+0.5 0.138322 0.294445 1 0 0
+-0.123871 0.371795 0.226004 0 1 0
+-0.382996 -0.371795 -0.363094 -0.0259938 0.973112 0.22886
+0.301213 0.265322 -0.371795 0 0 1
+0.0551093 0.194023 -0.333333 0 0 1
+0.481565 0.092499 -0.371795 0 0 1
+-0.208478 -0.178216 -0.333333 0 0 1
+0.5 -0.0758464 -0.110379 1 0 0
+-0.193595 -0.0226173 -0.0563725 0.857264 -0.514859 0.00424607
+-0.5 0.342757 0.103418 1 0 0
+0.0555442 0.137688 0.320513 0 0 1
+0.360497 0.107985 0.358554 0.899651 0.436457 0.0115438
+-0.496851 -0.294872 0.00245537 0.46462 0.830135 0.308229
+-0.259834 0.119632 -0.333333 0 0 1
+0.5 -0.236526 -0.237223 1 0 0
+0.5 -0.101849 -0.0114871 1 0 0
+0.112076 0.371795 -0.109856 0 1 0
+-0.141154 -0.3256 -0.256723 1 0 0
+-0.40683 -0.371795 -0.0757724 0 1 0
+-0.5 -0.108135 0.126914 1 0 0
+0.0487606 -0.230897 -0.335056 -0.142854 0.755059 -0.639906
+-0.5 -0.218948 0.247153 1 0 0
+0.24623 0.0350664 -0.13136 0.385648 0.922272 0.026255
+-0.5 0.154839 -0.33889 1 0 0
+-0.5 -0.266038 -0.00740196 1 0 0
+-0.0387442 0.371795 -0.0838197 0 1 0
+0.5 -0.212331 -0.0688588 1 0 0
+-0.222143 -0.0426444 -0.178293 -0.215054 0.976596 0.00337708
+0.5 -0.0323345 -0.213445 1 0 0
+0.409394 0.294872 0.106886 0 1 0
+-0.5 -0.169624 0.0438552 1 0 0
+0.141109 -0.354907 -0.0357512 1 0 0
+-0.365892 0.371795 0.252372 0 1 0
+-0.5 -0.068408 0.0442551 1 0 0
+-0.397103 -0.371795 0.137766 0 1 0
+-0.330985 0.371795 0.286322 0 1 0
+0.443007 -0.0173905 -0.371795 0 0 1
+-0.135473 0.371795 -0.114192 0 1 0
+0.141026 0.337169 -0.0207304 1 0 0
+-0.29595 -0.371795 -0.0634382 0 1 0
+-0.362989 0.102006 0.356972 0.933133 -0.359528 0.00135022
+0.325835 -0.328404 0.320513 0 0 1
+-0.223434 0.371795 -0.0589486 0 1 0
+0.391195 0.294872 -0.236333 0 1 0
+-0.5 -0.17552 -0.247175 1 0 0
+0.5 0.20521 0.160287 1 0 0
+-0.5 -0.131973 0.0787779 1 0 0
+0.123447 0.190475 0.371795 0 0 1
+-0.279405 0.0523686 0.371795 0 0 1
+0.246305 0.294872 -0.0548479 0 1 0
+0.12611 -0.294872 -0.158445 0 1 0
+0.154718 0.121772 -0.333333 0 0 1
+-0.0823363 0.268412 -0.371795 0 0 1
+-0.269295 -0.371795 -0.0944985 0 1 0
+-0.5 0.303425 -0.0569504 1 0 0
+0.360261 0.294872 -0.0214292 0 1 0
+-0.282035 0.371795 8.55696e-005 0 1 0
+-0.0725235 0.348135 0.320513 0 0 1
+0.5 -0.283245 0.248602 1 0 0
+-0.218055 0.371795 0.201594 0 1 0
+-0.0205414 -0.294872 -0.269641 0 1 0
+-0.5 0.0473762 0.0295678 1 0 0
+0.0123215 -0.294872 -0.0522675 0 1 0
+0.5 0.0202632 -0.36261 0.996663 0.038646 -0.0718923
+0.206167 0.294872 -0.247497 0 1 0
+0.111986 0.256282 0.359862 -0.0260049 0.998888 0.0393182
+0.5 0.255456 -0.288443 1 0 0
+0.296025 -0.371795 0.17503 0 1 0
+-0.336672 0.212652 0.320513 0 0 1
+-0.410431 0.218217 0.320513 0 0 1
+0.150154 0.294872 -0.19538 0.0141876 0.999893 0.00364267
+-0.271005 0.144009 0.371795 0 0 1
+-0.5 0.079238 0.0285723 1 0 0
+0.363548 -0.224104 -0.371795 0 0 1
+0.152106 0.294872 -0.164697 0.0635739 0.997837 0.0167457
+0.0508768 0.371795 0.19704 0 1 0
+0.0987146 0.371795 -0.120539 0 1 0
+-0.5 0.299223 0.277276 1 0 0
+-0.389807 0.00261226 -0.371795 0 0 1
+-0.039598 -0.137821 0.320513 0 0 1
+-0.30343 0.0452534 -0.333333 0 0 1
+0.236558 0.294872 0.210443 0 1 0
+-0.5 0.371061 -0.150589 0.858765 -0.509618 0.0530239
+-0.0537864 -0.127103 0.320513 0 0 1
+-0.106212 0.0642614 -0.333333 0 0 1
+0.261074 -0.206084 0.371795 0 0 1
+-0.176482 -0.371795 0.261458 0 1 0
+0.5 0.0715802 -0.259929 1 0 0
+0.0177194 0.371795 -0.184231 0 1 0
+0.384208 -0.345769 0.320513 0 0 1
+0.105894 -0.294872 0.303633 0 1 0
+0.0546562 0.371795 0.245108 0 1 0
+-0.5 0.0602985 0.141767 1 0 0
+0.482849 0.00962882 0.320513 0 0 1
+0.413625 -0.371795 0.143425 0 1 0
+-0.5 0.216621 0.236951 1 0 0
+0.243337 -0.0362993 -0.213803 -0.314014 0.949409 -0.00413022
+0.439162 -0.371795 0.297026 -0.0690282 0.997462 0.0174672
+-0.373123 0.371795 -0.221973 0 1 0
+-0.0920878 0.119244 -0.333333 0 0 1
+0.5 -0.00785794 0.175106 1 0 0
+-0.360684 0.371795 0.0374742 0 1 0
+0.247544 -0.268176 0.320513 0 0 1
+0.141109 -0.350765 0.25763 1 0 0
+0.5 -0.114714 -0.333104 1 0 0
+0.141109 -0.347214 0.0479293 1 0 0
+0.396715 -0.0249448 0.320513 0 0 1
+0.17312 0.230897 -0.370623 -0.0726118 0.788757 0.610401
+0.0411671 -0.177538 -0.333333 0 0 1
+0.300101 -0.0890791 0.371795 0 0 1
+0.5 0.00214473 -0.221916 1 0 0
+-0.268878 -0.371795 0.0927144 0 1 0
+0.259593 0.289493 0.320513 0.0774352 0.242789 0.966984
+-0.324021 0.371795 -0.0385186 0 1 0
+0.0685901 0.371795 -0.133835 0 1 0
+0.301009 -0.204927 -0.358985 0.764649 -0.644447 0
+-0.499419 0.303078 -0.371795 0.562763 0.0976231 0.820833
+-0.145316 0.371795 -0.166194 0 1 0
+-0.448718 -0.335655 0.26407 1 0 0
+-0.116422 -0.153434 -0.333333 0 0 1
+-0.290596 -0.371795 -0.173652 0 1 0
+-0.328444 -0.281677 0.320513 0 0 1
+0.246108 -0.161748 0.371795 0 0 1
+0.402594 -0.371795 -0.204898 0 1 0
+-0.448718 -0.323955 -0.33954 1 0 0
+-0.5 -0.183141 -0.333816 1 0 0
+-0.102096 -0.112412 -0.333333 0 0 1
+-0.0941056 0.348582 -0.371795 0 0 1
+-0.317534 0.318601 0.320513 0 0 1
+0.0251605 0.263047 0.320513 -0.0494867 0.24343 0.968655
+0.190303 0.0245427 -0.333333 -0.153403 0.0201996 0.987957
+0.141109 -0.343865 -0.36962 0.828882 0.0816058 0.553439
+-0.293659 0.0277186 0.371795 0 0 1
+-0.320513 0.0137524 -0.364808 0.997458 0.0319942 -0.063675
+-0.5 -0.259698 -0.336582 1 0 0
+-0.141154 -0.308832 0.288003 1 0 0
+-0.398908 0.237607 0.320513 0 0 1
+0.120987 -0.294872 0.179069 0 1 0
+0.34401 -0.371795 0.146643 0 1 0
+-0.0891881 -0.294872 0.0100098 0 1 0
+0.437139 0.160027 0.320513 0 0 1
+-0.036213 0.139495 0.320513 0 0 1
+-0.266534 -0.160656 -0.333333 0 0 1
+0.0640579 0.371795 0.0776247 0 1 0
+0.432305 -0.0659594 -0.371795 0 0 1
+-0.5 0.219765 -0.0393343 1 0 0
+0.454566 0.294872 -0.129554 0 1 0
+-0.36038 -0.281762 -0.371795 0 0 1
+-0.419275 -0.371795 -0.189184 0 1 0
+-0.141154 -0.299708 -0.0646126 0.949216 -0.30366 0.0823364
+-0.15865 -0.371795 -0.137785 0 1 0
+0.318239 0.294872 0.0859348 0 1 0
+-0.423532 0.362263 -0.371795 -0.0638254 -0.144027 0.987513
+-0.168739 -0.205197 -0.333333 0 0 1
+0.5 -0.00142908 0.266598 1 0 0
+-0.453842 0.349346 0.320513 0 0 1
+-0.122192 0.371795 -0.322963 0 1 0
+-0.5 0.329926 -0.151736 1 0 0
+-0.0649262 -0.0372252 -0.333333 0 0 1
+-0.0944726 -0.181462 0.324742 0.535206 0.819846 0.203489
+-0.5 0.306779 -0.315646 1 0 0
+-0.141154 -0.360323 0.0557582 0.993503 -0.113132 0.012395
+0.270476 -0.371795 0.0790406 0 1 0
+-0.241656 0.371795 0.0225513 0 1 0
+0.161657 -0.299459 -0.371795 0 0 1
+0.219433 0.107561 -0.333333 0 0 1
+0.382414 -0.0431661 0.320513 0.257438 -0.0557878 0.964683
+0.174412 -0.371795 0.168363 0 1 0
+-0.5 0.137114 0.30816 1 0 0
+0.0157487 -0.287447 0.320513 0.0188858 -0.163621 0.986343
+0.465021 0.0786048 0.320513 0 0 1
+-0.420624 0.371795 0.0847067 0 1 0
+-0.0944292 -0.180339 -0.333333 0 0 1
+-0.109911 -0.294872 -0.340811 0 1 0
+-0.5 0.150956 -0.117795 1 0 0
+-0.347315 -0.371795 -0.225947 0 1 0
+-0.0474072 -0.294872 0.169288 0 1 0
+0.5 0.244406 -0.099476 1 0 0
+0.251444 0.23021 -0.344262 0.11445 0.993427 0.00191262
+-0.437026 0.371795 -0.285328 0 1 0
+-0.108598 -0.294872 -0.265384 0 1 0
+-0.141154 -0.319667 -0.0933144 1 0 0
+-0.349521 0.371795 -0.244573 0 1 0
+-0.0854047 0.230897 -0.365323 -0.165321 0.86084 0.481273
+-0.334891 0.185963 -0.371795 0 0 1
+0.295227 0.294872 0.0753265 0 1 0
+-0.448718 -0.330223 -0.0915584 1 0 0
+0.0573248 -0.294872 0.276989 0 1 0
+0.320513 0.128599 -0.350392 1 0 0
+0.245006 -0.0356373 -0.132597 -0.366534 0.930346 -0.0104214
+-0.139721 0.371795 -0.278905 0 1 0
+-0.448718 -0.308897 -0.263862 1 0 0
+-0.5 -0.0424229 -0.266862 1 0 0
+-0.377402 0.0878681 -0.371795 0 0 1
+0.5 0.103624 -0.369918 -0.41503 0.210821 0.885045
+-0.325971 -0.0390775 0.371795 0 0 1
+0.141109 -0.298698 -0.214637 0.844922 0.534258 0.0259615
+-0.453152 0.371795 0.304238 0 1 0
+0.5 0.147135 0.0499931 1 0 0
+0.148022 -0.100499 0.320513 0 0 1
+0.430395 -0.0581508 -0.371795 0 0 1
+-0.0683348 -0.245486 0.371795 0.0468691 -0.0812051 0.995595
+-0.5 0.127988 -0.260498 1 0 0
+0.297175 0.294872 -0.260852 0 1 0
+-0.5 -0.266242 -0.0434569 1 0 0
+-0.153332 0.13546 0.337575 0.735741 -0.677263 0
+0.244855 -0.248288 -0.371795 0 0 1
+-0.277101 0.012918 0.371795 0 0 1
+0.132721 -0.033794 0.320513 0 0 1
+0.334148 -0.371795 -0.228943 0 1 0
+-0.18771 0.00605963 -0.187244 0.993455 0.112243 -0.0211746
+-0.141154 -0.327666 0.166956 1 0 0
+-0.5 0.326046 0.0221779 1 0 0
+0.344321 -0.23975 0.320513 0 0 1
+-0.5 0.186327 -0.0636815 1 0 0
+-0.154521 0.371795 0.102925 0 1 0
+0.5 -0.1934 -0.303962 1 0 0
+-0.288063 0.234514 -0.371795 0 0 1
+0.128471 0.371795 0.158255 0 1 0
+-0.5 0.242449 0.110851 1 0 0
+0.410655 -0.295646 0.320513 0 0 1
+-0.221694 -0.0425239 -0.294556 -0.204097 0.978889 -0.0109795
+0.5 0.116315 -0.0429003 1 0 0
+-0.5 0.0566067 0.119396 1 0 0
+-0.2197 0.0378382 -0.0328378 0.161383 0.593242 0.788683
+-0.5 0.00538282 -0.0858962 1 0 0
+0.150597 0.294872 -0.0111952 0.00403487 0.999992 0.000503128
+0.0695706 -0.185258 0.320513 -0.0340759 0.361656 0.931689
+0.302518 -0.0705241 0.371795 0 0 1
+0.211902 0.0334786 -0.0511078 -0.456315 0.889651 0.0172568
+-0.429851 -0.371795 -0.0378661 0 1 0
+-0.355193 -0.371795 0.0542187 0 1 0
+-0.444183 0.0115416 0.320513 0 0 1
+-0.266145 0.192098 -0.333333 0 0 1
+-0.299605 0.371795 0.120944 0 1 0
+-0.0569209 -0.294494 0.320513 -0.0100831 0.811284 -0.584565
+0.177229 -0.371795 -0.160009 0 1 0
+-0.141154 -0.330106 -0.226873 1 0 0
+-0.5 0.121477 -0.0428081 1 0 0
+0.344814 -0.371795 0.227624 0 1 0
+0.0668755 0.371795 0.144243 0 1 0
+-0.447891 0.240668 -0.371795 0 0 1
+-0.141154 -0.358593 -0.00744108 1 0 0
+0.5 -0.141655 -0.0665892 1 0 0
+-0.44117 -0.371795 -0.230869 0.267348 0.953086 0.141956
+-0.216569 -0.371795 -0.165246 0 1 0
+-0.290202 0.0215797 0.371795 0 0 1
+-0.143615 -0.371795 -0.13917 -0.663629 0.744339 -0.0745326
+-0.432001 0.264424 0.320513 0 0 1
+-0.13748 -0.260783 0.320513 -0.0448179 -0.164137 0.985419
+-0.5 -0.0111868 -0.315588 1 0 0
+-0.5 -0.054332 0.139303 1 0 0
+0.5 0.131154 0.286546 1 0 0
+-0.0862065 0.371795 -0.206984 0 1 0
+0.405132 0.132332 -0.371795 0 0 1
+0.325829 -0.0387735 -0.371795 0.290559 -0.0608728 0.954919
+0.191828 -0.371795 0.0514234 0 1 0
+-0.265696 -0.125187 0.371795 0 0 1
+0.5 -0.268993 -0.111676 1 0 0
+0.328294 -0.371795 0.266322 0 1 0
+-0.297027 0.371795 -0.0960436 0 1 0
+0.305695 -0.371795 0.0354079 0 1 0
+-0.0330375 -0.108504 0.320513 0 0 1
+-0.464582 0.371795 0.241603 0 1 0
+0.5 -0.278741 0.133475 1 0 0
+0.33028 -0.371795 -0.214859 0 1 0
+0.0154574 0.0652942 -0.333333 0 0 1
+-0.5 -0.0267102 -0.16528 1 0 0
+-0.195763 -0.0311383 -0.333333 0.322319 -0.194172 0.926503
+0.5 0.282506 -0.172699 1 0 0
+-0.5 -0.113401 -0.078065 1 0 0
+-0.167414 -0.371795 0.0816798 0 1 0
+-0.5 0.276128 -0.362433 0.999421 0.0160868 0.029975
+0.106332 0.371795 -0.108887 0 1 0
+0.457917 0.294872 0.0230533 0 1 0
+-0.470128 -0.294872 0.31401 -0.0410536 0.934549 -0.353459
+-0.0802893 0.371795 -0.041075 0 1 0
+-0.164932 0.253618 0.359331 -0.152898 0.988226 0.00560537
+0.198243 -0.11135 -0.333333 0 0 1
+0.117515 -0.294872 -0.0679714 0 1 0
+0.232903 -0.371795 -0.368575 0.0071032 0.965511 0.260267
+0.336795 -0.371795 0.111402 0 1 0
+-0.0515168 0.185649 -0.333333 0 0 1
+-0.280484 0.0218838 -0.333333 0 0 1
+0.498514 -0.294872 -0.0021419 -0.506789 0.845909 -0.166138
+0.5 0.117607 -0.368235 0.934617 0.0667714 -0.349332
+-0.0182453 -0.0208004 0.320513 0 0 1
+0.141109 -0.349478 -0.346457 1 0 0
+0.5 0.105563 -0.289719 1 0 0
+0.212584 0.294872 -0.295408 0 1 0
+-0.5 0.264579 -0.142731 1 0 0
+0.483231 -0.259959 0.320513 0 0 1
+-0.455385 0.236062 -0.371795 0 0 1
+-0.202502 -0.0332376 0.333283 0.986114 0.166032 0.00366854
+-0.253831 0.371795 0.18749 0 1 0
+0.427126 -0.0717412 0.320513 0 0 1
+0.193071 -0.00734644 -0.136649 0.973195 0.227864 -0.0311292
+0.5 -0.204459 0.0579267 1 0 0
+-0.141154 -0.356791 0.1288 1 0 0
+-0.5 -0.161444 -0.100651 1 0 0
+0.0657343 -0.294872 -0.0573182 0 1 0
+-0.157743 0.205377 0.371795 0 0 1
+0.250903 0.0326767 -0.0896211 0.539575 0.841657 -0.0217305
+-0.5 0.330993 0.20212 1 0 0
+0.0879352 -0.0996436 -0.333333 0 0 1
+-0.199708 -0.371795 -0.212479 0 1 0
+-0.0586558 -0.294872 0.114093 0 1 0
+0.5 -0.0343043 -0.0220652 1 0 0
+0.126989 -0.256282 0.329854 -0.0374915 0.998654 -0.0358315
+0.5 -0.132936 0.225141 1 0 0
+-0.5 -0.204801 0.0560831 1 0 0
+-0.14545 0.371795 -0.0613036 0 1 0
+0.5 -0.159632 -0.0456737 1 0 0
+0.193659 -0.0095407 -0.00894642 0.9679 0.250683 0.0180666
+0.5 0.0533579 -0.15294 1 0 0
+-0.5 0.332717 0.113601 1 0 0
+0.448718 -0.337508 0.0435349 1 0 0
+0.450546 -0.294872 -0.284343 0.800475 -0.599366 0
+0.109234 -0.0348358 -0.333333 0 0 1
+0.188867 -0.230897 -0.348387 0 1 0
+0.421221 -0.0681378 -0.371795 0 0 1
+-0.5 -0.175503 0.240569 1 0 0
+0.5 -0.0580307 -0.0745654 1 0 0
+0.5 0.0344632 0.242706 1 0 0
+0.00336463 -0.294872 0.164067 0 1 0
+0.2887 0.294872 -0.307711 0 1 0
+0.5 0.180266 0.0157413 1 0 0
+0.150099 0.294872 -0.015051 0.00351072 0.999994 -0.000166874
+0.144168 -0.0423162 -0.333333 0 0 1
+0.239102 -0.105876 -0.333333 0 0 1
+-0.116465 0.371795 -0.04084 0 1 0
+0.0220874 0.353032 -0.371795 0 0 1
+-0.471123 0.340633 0.320513 0 0 1
+-0.470369 -0.294872 0.120157 0 1 0
+-0.447689 0.371795 0.149945 0 1 0
+-0.141154 -0.343304 0.0523603 1 0 0
+-0.5 0.117275 -0.153079 1 0 0
+-0.249413 0.371795 -0.188631 0 1 0
+0.198641 -0.371795 0.318105 -0.0628414 0.866057 -0.49598
+-0.5 -0.103395 -0.164799 1 0 0
+0.211236 0.294872 -0.0935059 0 1 0
+-0.162483 -0.00767496 -0.333333 0 0 1
+0.261886 0.294872 -0.137218 0 1 0
+0.5 0.210789 0.300373 1 0 0
+-0.5 0.221792 0.142217 1 0 0
+-0.203885 -0.0165443 0.357624 0.996562 0.0828461 0.000286415
+0.19577 -0.0481404 -0.333333 0 0 1
+0.14779 0.141481 0.327771 0.764872 0.637139 -0.0949963
+-0.5 0.334592 -0.127893 1 0 0
+0.279148 -0.371795 0.00491714 0 1 0
+-0.448718 -0.326664 0.214205 1 0 0
+-0.5 0.13092 0.219683 1 0 0
+0.204183 -0.278082 -0.371795 0 0 1
+-0.5 -0.0488965 0.10656 1 0 0
+0.141026 0.320848 -0.235195 1 0 0
+0.296645 -0.175012 -0.333333 0 0 1
+0.141026 0.335792 0.168693 1 0 0
+0.335235 -0.272829 -0.371795 0 0 1
+-0.383603 -0.371795 0.314259 0.019238 0.992255 -0.122721
+-0.380824 -0.0347112 -0.371795 0 0 1
+-0.23072 0.371795 0.216326 0 1 0
+0.141109 -0.356653 0.246842 1 0 0
+-0.00819137 -0.294872 -0.0168393 0 1 0
+-0.304959 0.343773 0.320513 0 0 1
+-0.189313 -0.0130615 -0.0779473 0.954109 -0.298013 0.029414
+-0.0339145 -0.122302 -0.333333 0 0 1
+-0.152551 -0.285088 -0.371795 0 0 1
+-0.5 -0.0499999 -0.33712 1 0 0
+-0.5 -0.259419 -0.368138 0.906327 -0.0676651 0.417125
+0.455821 0.195791 0.320513 0 0 1
+-0.0095539 -0.204555 0.335586 0.00807014 0.999967 -0.000323618
+0.229802 0.0383769 -0.258511 -0.0194424 0.99958 0.021494
+-0.167199 0.222325 -0.333333 0.00593842 0.20164 0.979442
+-0.336434 0.0822194 -0.371795 0 0 1
+0.5 -0.0147685 -0.117511 1 0 0
+0.305827 0.198692 -0.337647 0.782347 0.54046 0.309574
+0.5 -0.0485117 0.0320689 1 0 0
+-0.245147 0.221774 -0.333333 0.0134172 0.0866826 0.996146
+0.5 -0.176551 -0.302845 1 0 0
+0.226678 -0.0381035 -0.242654 0.110069 0.993916 -0.00405901
+0.378942 0.294872 0.203821 0 1 0
+0.0299474 -0.294872 0.173364 0 1 0
+0.5 0.0612153 0.30928 1 0 0
+-0.416859 0.124244 0.320513 0 0 1
+0.374868 0.0764202 -0.371795 0 0 1
+-0.5 0.242882 -0.352287 1 0 0
+0.0723791 0.371795 0.25667 0 1 0
+-0.296762 -0.371795 0.148259 0 1 0
+0.379868 0.0248082 0.371795 0.772211 0.0994057 0.627541
+-0.188109 0.00856527 -0.164256 0.979211 0.202599 0.00999258
+-0.5 0.0240474 -0.296509 1 0 0
+0.196811 -0.017838 -0.327107 0.757358 0.445579 -0.477355
+-0.0290303 -0.0665954 -0.333333 0 0 1
+0.433837 0.156223 0.320513 0 0 1
+0.0640429 0.256282 0.368587 0.00535619 0.796731 0.60431
+0.0881427 0.371795 -0.293934 0 1 0
+0.290293 -0.344948 -0.371795 0 0 1
+-0.36462 0.325735 0.320513 0 0 1
+0.00889508 -0.294872 0.255902 0 1 0
+0.5 0.187478 0.273613 1 0 0
+0.320513 0.0376829 -0.338329 0.939872 0.0473487 0.338229
+-0.106881 -0.294872 0.27922 0 1 0
+-0.46975 0.371795 0.289385 0 1 0
+0.5 0.14314 0.0125878 1 0 0
+0.5 -0.240964 0.295039 1 0 0
+-0.382765 -0.0352702 0.320513 -0.648127 0.00567416 0.761512
+-0.304879 -0.371795 0.143059 0 1 0
+-0.448718 -0.350204 0.303428 1 0 0
+0.229532 -0.371795 -0.327931 0 1 0
+0.25184 -0.0320206 -0.113496 -0.568725 0.822196 0.0233497
+-0.0242537 -0.0282911 0.320513 0 0 1
+0.25205 -0.371795 -0.324898 0 1 0
+-0.205706 0.371795 0.117169 0 1 0
+-0.425594 0.0358777 -0.371795 0 0 1
+-0.0908387 0.114336 0.320513 0 0 1
+-0.0231478 0.371795 0.133032 0 1 0
+0.349508 -0.245998 0.320513 0 0 1
+-0.371781 -0.371795 -0.0115826 0 1 0
+0.132096 -0.294872 -0.146658 0.0676441 0.997579 -0.0161075
+0.141026 0.32053 -0.0886959 1 0 0
+0.433971 0.294872 -0.370425 0.108189 -0.474607 0.873523
+0.38301 0.106887 0.320513 0 0 1
+-0.5 0.346162 0.14143 1 0 0
+0.04842 0.173683 -0.333333 0 0 1
+0.5 -0.0100326 -0.0128069 1 0 0
+0.198864 -0.0212347 -0.0553563 0.824916 0.565255 0.000737342
+-0.0797069 -0.180288 -0.333333 0 0 1
+0.0538725 -0.294872 -0.149345 0 1 0
+0.307252 -0.224608 0.320513 0 0 1
+-0.431856 0.361784 -0.371795 0 0 1
+-0.191538 -0.371795 0.192488 0 1 0
+0.141026 0.32747 0.140129 1 0 0
+-0.141154 -0.357308 -0.339326 1 0 0
+-0.193091 -0.371795 -0.110705 0 1 0
+0.5 -0.203454 -0.284869 1 0 0
+-0.169025 0.192692 -0.333333 0 0 1
+0.5 -0.236008 0.212478 1 0 0
+0.015583 0.0296744 0.320513 0 0 1
+0.0622875 0.151753 -0.333333 0 0 1
+-0.5 0.0680709 0.173029 1 0 0
+-0.303756 0.371795 0.0431891 0 1 0
+0.291386 0.294872 0.252418 0 1 0
+-0.0191209 0.0990135 -0.333333 0 0 1
+0.240473 0.0963403 -0.333333 0 0 1
+0.377579 -0.371795 0.260012 0 1 0
+-0.5 -0.026198 0.0708143 1 0 0
+-0.491068 -0.294872 -0.365074 0.145484 0.904995 0.399772
+-0.222855 -0.141902 -0.333333 0 0 1
+0.0562659 -0.256282 0.334246 0 1 0
+-0.307071 0.371795 -0.190703 0 1 0
+0.338325 0.180956 -0.371795 0 0 1
+0.417432 -0.341445 -0.371795 0 0 1
+-0.151207 -0.371795 0.260469 0 1 0
+-0.496984 0.219189 0.320513 -0.419745 -0.0421235 0.906664
+0.171252 -0.0747823 0.320513 0 0 1
+0.347524 0.294872 0.0496478 0 1 0
+0.387212 0.294872 0.202456 0 1 0
+-0.405704 -0.338097 -0.371795 0 0 1
+0.320513 0.144187 -0.341418 0.985668 0.0144533 0.168074
+-0.324717 0.164052 0.338651 0.777646 -0.628694 0.00338091
+-0.5 0.157826 0.155688 1 0 0
+-0.446651 0.371795 0.318344 -0.0189703 0.903472 0.428227
+-0.5 0.314578 0.0578162 1 0 0
+0.404584 -0.026855 0.320513 0 0 1
+0.166345 -0.371795 -0.346352 0 1 0
+0.495095 -0.294872 0.104713 -0.309369 0.939033 -0.150026
+0.5 0.194249 -0.29205 1 0 0
+0.131722 -0.230897 -0.350192 0 1 0
+0.244783 -0.371795 -0.233775 0 1 0
+-0.281811 0.371795 -0.340432 0 1 0
+0.0575439 -0.256282 0.346279 0 1 0
+0.331675 -0.257586 -0.371795 0 0 1
+0.0852572 0.16539 -0.333333 0 0 1
+-0.21818 0.371795 -0.024553 0 1 0
+-0.147132 0.371795 0.20122 0 1 0
+0.219522 0.0631081 0.371795 0 0 1
+-0.359013 -0.00551831 0.371795 0 0 1
+-0.158649 -0.371795 -0.118032 0 1 0
+-0.5 0.163316 0.111768 1 0 0
+0.232004 -0.0303165 0.371795 0 0 1
+0.186476 0.294872 0.176982 0 1 0
+0.0904389 -0.294872 -0.288948 0 1 0
+0.5 0.281399 0.17448 1 0 0
+-0.5 0.360346 -0.205924 0.971203 -0.238167 -0.00648957
+0.104059 -0.294872 0.0412794 0 1 0
+0.376485 -0.0156 0.371795 0.295895 0.0508991 0.953863
+-0.0578663 0.256663 -0.371795 0 0 1
+-0.5 -0.109307 -0.047645 1 0 0
+-0.5 0.0047195 -0.00957786 1 0 0
+0.288784 0.103799 -0.333333 0 0 1
+-0.5 -0.270277 0.0657357 1 0 0
+0.5 0.0199697 -0.221717 1 0 0
+-0.182222 -0.371795 0.28306 0 1 0
+-0.311792 0.371795 -0.336873 0 1 0
+-0.5 0.203321 0.224647 1 0 0
+-0.25079 0.0385772 -0.235089 -0.426194 0.904615 0.0055851
+0.344507 -0.00694401 0.371795 0 0 1
+-0.19106 -0.371795 0.19115 0 1 0
+0.413605 -0.371795 -0.2197 0 1 0
+-0.204371 0.0106782 0.359635 0.996586 -0.0825644 0
+-0.175548 0.371795 -0.115611 0 1 0
+0.116564 -0.195802 0.371795 0 0 1
+-0.24177 -0.042008 -0.266744 0.258387 0.965808 -0.0212157
+-0.224171 -0.301141 0.320513 0 0 1
+-0.448718 -0.297577 -0.208593 0.926668 0.375879 0.00115016
+-0.0477818 -0.294872 -0.227122 0 1 0
+0.232999 0.219376 0.371795 0 0 1
+0.485416 0.294872 -0.0736582 0 1 0
+-0.306422 -0.197842 -0.344404 0.827305 0.561747 0.00256243
+-0.141154 -0.329433 0.13926 1 0 0
+-0.232312 0.238975 -0.371795 0.0403224 0.173903 0.983937
+0.410183 -0.371795 0.122157 0 1 0
+-0.0867567 -0.294872 -0.27851 0 1 0
+0.482694 0.0630629 0.320513 0 0 1
+0.388718 0.27764 -0.371795 0 0 1
+-0.360121 -0.367865 0.320513 0.0657886 -0.284673 0.956364
+-0.5 -0.266111 -0.281812 1 0 0
+0.5 0.249926 0.276542 1 0 0
+0.154478 -0.0439252 -0.333333 0 0 1
+0.337917 -0.371795 -0.172612 0 1 0
+0.0161424 0.371795 0.282339 0 1 0
+-0.5 0.11238 0.210882 1 0 0
+0.5 -0.0864784 -0.0312445 1 0 0
+-0.308772 0.371795 -0.0777248 0 1 0
+0.5 0.147061 0.269499 1 0 0
+-0.0228498 0.000905161 0.320513 0 0 1
+-0.141869 -0.371795 -0.242551 -0.479483 0.877537 0.0049284
+0.0449398 0.0129921 -0.333333 0 0 1
+-0.104927 -0.249655 0.371795 -0.00374991 -0.170405 0.985367
+0.174605 -0.371795 -0.0487749 0 1 0
+0.5 0.165322 0.286307 1 0 0
+0.188421 0.0796736 0.3251 0.845073 0.328507 -0.421824
+0.396862 0.294872 0.106726 0 1 0
+-0.13055 -0.294872 -0.232184 0 1 0
+-0.410297 0.371795 0.0775271 0 1 0
+0.5 -0.113154 -0.363346 0.946903 0.087263 -0.309451
+-0.315342 0.371795 -0.216475 0 1 0
+0.0544797 0.253822 -0.371795 0 0 1
+0.141026 0.3062 -0.36614 0.978743 0 -0.20509
+-0.5 -0.284826 -0.263909 0.999306 0.0372281 -0.00110469
+0.262896 -0.0134965 0.371795 0 0 1
+0.257527 0.0274277 -0.21615 0.705122 0.708631 -0.0254004
+-0.0872162 -0.294872 -0.253023 0 1 0
+-0.0953326 -0.294872 0.197038 0 1 0
+0.180539 0.114436 -0.333333 0 0 1
+-0.445015 -0.0991396 0.320513 0 0 1
+-0.106873 0.371795 -0.12065 0 1 0
+-0.369228 0.371795 -0.236151 0 1 0
+-0.189953 0.0152205 -0.10962 0.947496 0.31976 0.00210932
+0.171984 -0.371795 -0.30749 0 1 0
+0.5 0.0221923 0.0414377 1 0 0
+0.5 -0.288312 -0.106544 0.943372 -0.331734 -0.0014483
+-0.448718 -0.339305 -0.316591 1 0 0
+-0.299849 0.371795 -0.166871 0 1 0
+0.192089 0.168025 -0.333333 0 0 1
+-0.286005 -0.188798 -0.333333 0 0 1
+0.276231 0.160372 -0.333333 0 0 1
+0.321025 0.0884997 0.371795 0 0 1
+0.384175 -0.186805 -0.371795 0 0 1
+-0.263839 0.371795 0.251985 0 1 0
+0.37758 -0.0754836 0.320513 0.194282 -0.174045 0.965382
+-0.362734 -0.100339 -0.371795 0 0 1
+0.372384 0.294872 0.0891008 0 1 0
+0.276306 -0.231222 -0.371795 0.110686 -0.1228 0.98624
+-0.210289 -0.371795 0.073942 0 1 0
+-0.5 -0.195366 0.266577 1 0 0
+0.431224 0.294872 -0.197135 0 1 0
+-0.5 0.337227 0.0674281 1 0 0
+0.141026 0.307999 -0.371304 -0.652994 -0.0176406 0.757158
+-0.150506 -0.13853 0.340019 0.735729 0.677276 0
+-0.5 0.369008 -0.258469 0.91501 -0.402222 -0.0312277
+0.185478 0.294872 0.218785 0 1 0
+-0.5 -0.278187 0.0371016 1 0 0
+0.314206 -0.371795 0.312235 0.0321308 0.938358 -0.34417
+-0.00269565 0.182779 0.320513 0 0 1
+-0.208606 -0.0184639 0.371795 0.286998 0.0258073 0.957583
+0.0854527 0.371795 0.0379235 0 1 0
+-0.283652 0.331062 -0.371795 0 0 1
+0.269142 -0.0010193 -0.125156 0.999494 -0.0297994 0.0111019
+-0.112228 -0.185958 -0.333333 0 0 1
+-0.448718 -0.366918 -0.0829825 0.8838 0.465144 -0.0503745
+-0.5 0.0642539 0.202699 1 0 0
+0.238273 0.270011 -0.371795 0 0 1
+0.0167447 0.371795 -0.360754 0 1 0
+-0.5 0.0624816 0.130378 1 0 0
+0.5 0.250266 0.159447 1 0 0
+-0.470111 0.00999233 -0.371795 0 0 1
+0.5 -0.105002 -0.262721 1 0 0
+0.292208 -0.110083 -0.333333 0 0 1
+-0.448718 -0.321528 -0.204322 1 0 0
+-0.5 0.0727514 0.0883042 1 0 0
+-0.451727 0.361597 -0.371795 0 0 1
+-0.436945 -0.0402092 0.320513 0 0 1
+-0.220104 0.371795 -0.0829538 0 1 0
+0.102764 0.230897 -0.362567 0 1 0
+0.268217 -0.0082792 -0.114476 0.982745 -0.182999 0.0269159
+-0.21328 -0.0397577 -0.139934 -0.414993 0.909689 -0.0156847
+-0.151223 -0.0810937 0.320513 0 0 1
+0.491036 0.186387 0.320513 0.0654972 0.00581018 0.997836
+-0.415711 0.004733 -0.371795 0 0 1
+-0.5 0.334825 0.045878 1 0 0
+-0.5 0.116022 -0.180258 1 0 0
+-0.217548 -0.231331 -0.371795 0.0477558 0.751579 -0.657913
+0.393863 0.110631 0.320513 0 0 1
+0.113325 0.371795 -0.0248491 0 1 0
+0.118817 -0.00213153 -0.333333 0 0 1
+-0.376029 0.0137016 0.371795 -0.376504 -0.0101388 0.926359
+-0.279277 0.221886 -0.340497 -0.380528 0.904021 0.194796
+-0.197818 0.264553 0.320513 0 0 1
+-0.338853 0.371795 -0.132524 0 1 0
+-0.227033 0.134471 -0.333333 0 0 1
+0.362218 -0.371795 0.217366 0 1 0
+0.219172 -0.223219 0.371795 0 0 1
+0.223688 -0.237218 0.334698 -0.352183 0.935931 0
+-0.5 -0.230034 -0.328368 1 0 0
+0.152781 0.0514916 -0.333333 0 0 1
+0.308361 -0.254288 0.320513 0 0 1
+0.00392501 0.25657 0.320513 -0.045896 0.351329 0.935127
+-0.290416 0.371795 -0.00410066 0 1 0
+-0.5 -0.227043 0.207668 1 0 0
+-0.337418 -0.371795 -0.201404 0 1 0
+0.5 -0.0453656 -0.0103924 1 0 0
+-0.448718 -0.365945 0.271193 0.949875 0.270047 0.157522
+-0.194835 0.371795 0.238698 0 1 0
+-0.5 0.100397 -0.014527 1 0 0
+0.147279 -0.332813 -0.371795 0.281745 -0.00616634 0.959469
+0.36316 0.294872 0.0128413 0 1 0
+0.448718 -0.326967 -0.354922 1 0 0
+0.141109 -0.362543 -0.0859202 0.997467 0.0710334 -0.00363976
+-0.422203 -0.371795 -0.217724 0 1 0
+-0.29329 0.371795 -0.0491145 0 1 0
+-0.489891 -0.135605 -0.371795 0.254421 -0.134261 0.957729
+0.086581 -0.163267 -0.333333 0 0 1
+0.141026 0.316563 -0.348971 1 0 0
+0.017932 0.12659 0.320513 0 0 1
+0.5 -0.285544 -0.0548787 0.997492 -0.0685895 -0.0174535
+-0.113549 -0.170835 0.338684 0.557575 0.830127 0
+0.207963 -0.0308052 -0.264123 0.556312 0.830964 -0.00393105
+-0.155749 -0.153576 0.371795 0 0 1
+0.247104 0.294872 -0.250243 0 1 0
+-0.5 -0.190398 -0.260782 1 0 0
+0.0346207 0.23136 0.371795 0 0 1
+0.5 0.148476 0.25137 1 0 0
+0.382429 0.0287839 0.328125 0.945624 0.00491282 0.325224
+-0.273119 0.00972727 -0.172297 0.971524 -0.23678 0.00871292
+0.245055 0.294872 0.223528 0 1 0
+-0.5 0.11255 0.237906 1 0 0
+0.449304 -0.0290539 0.320513 0 0 1
+-0.0311883 -0.0263759 0.320513 0 0 1
+-0.141154 -0.328567 -0.207795 1 0 0
+-0.114963 -0.181933 -0.333333 0 0 1
+-0.375619 -0.174651 0.320513 0 0 1
+0.453587 -0.294872 0.0929977 -0.407703 0.908795 0.0887085
+-0.407278 -0.0913792 -0.371795 0 0 1
+0.0118482 0.115313 0.320513 0 0 1
+0.5 -0.128324 0.301719 1 0 0
+0.5 -0.197274 0.315115 0.978257 -0.0132762 0.20697
+0.0637134 0.230897 -0.37088 0.0889404 0.850153 0.51897
+-0.5 -0.288076 -0.184637 0.983465 0.174747 -0.0475404
+0.0557838 -0.294872 -0.213004 0 1 0
+0.5 0.0602223 -0.25967 1 0 0
+0.253814 -0.0306382 -0.128781 -0.59911 0.800662 -0.0027388
+0.171068 0.294872 -0.159458 0 1 0
+0.483461 -0.294872 -0.259112 0 1 0
+-0.442758 -0.371795 0.306063 0.308032 0.949666 -0.0570242
+0.301422 -0.077694 0.371795 0 0 1
+-0.34045 -0.00605878 -0.371795 0 0 1
+-0.399579 0.344657 0.320513 0 0 1
+-0.181649 -0.244845 -0.371795 0 0 1
+-0.5 0.0162462 -0.277259 1 0 0
+0.361518 -0.371795 -0.124152 0 1 0
+-0.448718 -0.333326 -0.0781605 1 0 0
+-0.44042 -0.334103 0.320513 0 0 1
+-0.450447 0.233255 -0.371795 0 0 1
+0.348414 -0.209683 -0.371795 0 0 1
+0.141026 0.321789 -0.051245 1 0 0
+0.121712 -0.294872 0.123855 0 1 0
+-0.328027 0.315026 -0.371795 0 0 1
+-0.127288 0.371795 -0.0858817 0 1 0
+-0.274442 -0.371795 0.277856 0 1 0
+-0.153552 -0.135222 0.341524 0.735724 0.677282 0
+0.5 0.0780101 -0.0949778 1 0 0
+-0.5 0.0083855 -0.0963521 1 0 0
+0.5 0.166287 0.171377 1 0 0
+0.413688 -0.294385 0.320513 0 0 1
+-0.463028 0.371795 0.0912027 0 1 0
+-0.106063 0.256282 0.355778 0 1 0
+0.339113 0.294872 -0.0736584 0 1 0
+0.347242 -0.324228 0.320513 0 0 1
+0.18302 0.169569 0.371795 0 0 1
+0.5 -0.196315 0.104213 1 0 0
+0.5 -0.021965 -0.216341 1 0 0
+0.0245744 0.367642 -0.371795 0.0295953 -0.230174 0.972699
+0.422107 0.294872 0.248749 0 1 0
+-0.310457 -0.1919 -0.369916 0.851039 0.474064 -0.225822
+-0.431366 -0.186182 -0.371795 0 0 1
+0.0980318 -0.294872 -0.0180052 0 1 0
+0.463516 -0.294872 0.107948 0 1 0
+-0.247643 -0.371795 -0.265681 0 1 0
+-0.5 0.0368524 -0.0178446 1 0 0
+0.328681 0.115814 -0.371795 0.218751 0.0125573 0.9757
+-0.16482 0.371795 0.266482 0 1 0
+0.259494 0.0842998 0.371795 0 0 1
+0.264428 0.0184807 -0.188887 0.892671 0.450707 0.00121339
+-0.0170702 -0.0742433 -0.333333 0 0 1
+-0.0194543 -0.0222607 -0.333333 0 0 1
+-0.25435 0.371795 0.00643176 0 1 0
+0.417334 -0.210172 0.320513 0 0 1
+0.012585 0.371795 -0.119486 0 1 0
+0.202603 -0.208786 0.371795 0 0 1
+-0.30337 -0.371795 0.247896 0 1 0
+0.320513 -0.0496301 -0.348826 1 0 0
+-0.5 -0.00871535 -0.103543 1 0 0
+-0.242331 0.35402 0.320513 0 0 1
+0.0625854 -0.0909685 0.320513 0 0 1
+-0.0661621 0.179667 0.320513 0 0 1
+-0.31921 0.371795 -0.0281029 0 1 0
+-0.141154 -0.3336 -0.3038 1 0 0
+-0.433456 0.251877 -0.371795 0 0 1
+-0.190479 -0.371795 0.276302 0 1 0
+0.231985 0.142967 0.371795 0 0 1
+0.165416 -0.371795 0.0763937 0 1 0
+-0.248537 -0.371795 -0.0725616 0 1 0
+0.5 0.141802 0.206526 1 0 0
+-0.288979 0.371795 -0.294724 0 1 0
+0.141109 -0.321557 -0.169365 1 0 0
+0.408464 0.272604 0.320513 0 0 1
+-0.209366 0.0835371 0.371795 0 0 1
+-0.332253 0.266585 -0.371795 0 0 1
+0.385732 -0.0982364 -0.371795 0 0 1
+0.200624 -0.251719 0.320513 0.0447016 -0.0937137 0.994595
+-0.143908 0.286303 -0.371795 0 0 1
+-0.461297 0.334218 -0.371795 0 0 1
+-0.0997254 0.371795 -0.224459 0 1 0
+0.0637878 -0.294872 -0.0525514 0 1 0
+0.363066 -0.101804 0.328482 0.946355 -0.293334 0.135526
+-0.354058 0.194397 0.320513 0 0 1
+-0.239716 -0.136486 -0.333333 0 0 1
+-0.448718 -0.299101 0.0842965 0.930097 0.366972 0.015833
+-0.374379 -0.0709465 0.371729 0.66945 0.249353 -0.699757
+0.212455 0.294872 -0.193341 0 1 0
+-0.326991 0.0152717 0.371795 0 0 1
+0.0935472 0.371795 -0.19446 0 1 0
+-0.313753 -0.371795 0.189961 0 1 0
+-0.141154 -0.333515 -0.0819914 1 0 0
+-0.5 0.0935656 -0.260666 1 0 0
+0.5 0.037115 -0.329305 1 0 0
+-0.242121 -0.0344563 0.371795 0 0 1
+0.230189 0.294872 -0.0107858 0 1 0
+-0.480017 0.0455159 0.320513 0 0 1
+0.5 0.138655 -0.324617 1 0 0
+0.325416 -0.163119 0.35872 0.79766 -0.603107 0
+0.5 -0.279008 0.137001 1 0 0
+-0.5 0.338979 -0.214838 1 0 0
+-0.3733 0.371795 0.273416 0 1 0
+-0.366458 -0.371795 -0.0897293 0 1 0
+-0.14019 -0.294872 0.159888 -0.319589 0.944271 0.0788373
+0.128981 -0.290424 -0.371795 0.11563 0.679376 0.724623
+0.5 -0.00789615 0.30354 1 0 0
+-0.14094 -0.294872 -0.0481644 -0.689503 0.724269 0.00440272
+0.14023 0.041812 -0.333333 0 0 1
+0.337081 -0.371795 -0.230823 0 1 0
+0.397255 -0.137391 0.320513 0 0 1
+0.0126016 -0.294872 0.23692 0 1 0
+0.448718 -0.360864 -0.10692 1 0 0
+0.45062 0.0241767 0.320513 0 0 1
+0.237311 -0.230897 -0.359497 -0.0124694 0.998896 -0.0452836
+-0.320513 -0.0150023 -0.36651 0.977038 0.0668387 -0.202311
+-0.5 0.0401094 -0.331651 1 0 0
+0.5 0.0459917 0.170944 1 0 0
+-0.227136 -0.235932 0.36184 0.354603 0.93329 -0.0568006
+0.16849 -0.0729275 -0.333333 0 0 1
+-0.141154 -0.324174 0.100635 1 0 0
+0.0804591 -0.294872 -0.20967 0 1 0
+-0.374679 0.0695698 0.328343 0.974921 -0.21672 -0.050607
+0.5 0.247952 -0.110752 1 0 0
+-0.164974 0.346994 0.320513 0 0 1
+-0.126194 0.371795 0.293143 0 1 0
+-0.255361 0.371795 0.0766449 0 1 0
+0.237182 -0.350505 -0.371795 0 0 1
+-0.5 0.193543 -0.047412 1 0 0
+0.5 0.274595 -0.0150473 1 0 0
+-0.0127238 -0.294872 0.00597558 0 1 0
+0.141109 -0.296952 -0.188136 0.703041 0.685402 -0.189624
+0.386563 -0.218837 0.320513 0 0 1
+0.0899769 0.0708492 0.320513 0 0 1
+-0.441694 -0.118014 0.320513 0 0 1
+0.0643732 0.308017 -0.371795 0 0 1
+0.319602 -0.164381 -0.340135 0.992121 -0.120194 0.0353558
+-0.5 -0.278009 -0.148198 1 0 0
+0.5 0.147498 0.186695 1 0 0
+-0.448718 -0.343741 -0.0960704 1 0 0
+0.5 -0.154389 -0.022273 1 0 0
+-0.334071 -0.040601 -0.371795 0 0 1
+0.5 0.192334 -0.0154066 1 0 0
+-0.435011 -0.286334 -0.371795 0 0 1
+0.5 0.217964 -0.210191 1 0 0
+0.193009 0.0392692 -0.333333 0 0 1
+-0.368942 0.0860481 0.358693 0.936945 -0.349476 0
+0.183744 -0.371795 0.146946 0 1 0
+0.0521564 -0.294872 0.22865 0 1 0
+-0.5 -0.12345 0.00367391 1 0 0
+0.447166 -0.371795 -0.0367638 -0.226377 0.973284 -0.0383613
+0.22109 0.0370731 -0.321819 -0.26645 0.963849 0
+-0.5 0.240546 -0.191845 1 0 0
+0.367007 0.294872 0.0549313 0 1 0
+0.116958 0.371795 -0.0142659 0 1 0
+0.5 0.243401 0.191088 1 0 0
+0.0445277 0.371795 0.0262776 0 1 0
+0.0425524 0.257679 0.320513 0.0429167 0.382375 0.92301
+-0.243464 0.371795 -0.116865 0 1 0
+-0.187224 -0.371795 -0.336659 0 1 0
+0.448718 -0.337382 0.125332 1 0 0
+-0.31258 0.371795 0.093523 0 1 0
+0.195966 0.0594172 0.370743 0.842087 0.380677 -0.382067
+-0.146164 0.270343 -0.371795 0 0 1
+0.141026 0.327908 -0.301392 1 0 0
+0.429654 0.0222849 0.320513 0 0 1
+-0.223532 -0.0429567 -0.316378 -0.169717 0.985416 -0.0123485
+0.16296 -0.371795 -0.0394061 0 1 0
+-0.0829102 0.371795 0.00256479 0 1 0
+0.5 -0.153272 -0.245162 1 0 0
+0.0125349 0.230937 0.371795 0 0 1
+-0.183069 -0.371795 -0.221628 0 1 0
+-0.0158992 0.101346 -0.333333 0 0 1
+0.5 0.102152 0.194899 1 0 0
+-0.478921 0.318178 0.320513 0 0 1
+-0.448718 -0.302226 -0.302125 0.994687 0.0994867 -0.0264637
+-0.0439636 -0.265725 -0.371795 0 0 1
+-0.0760324 -0.294872 0.0702225 0 1 0
+0.0750583 -0.294872 0.0599443 0 1 0
+-0.334309 0.371795 0.222734 0 1 0
+-0.474429 -0.294872 -0.132129 0 1 0
+0.299292 -0.371795 0.207747 0 1 0
+-0.107703 0.0945566 -0.333333 0 0 1
+0.272651 0.188725 0.371795 0 0 1
+0.113662 0.371795 -0.12332 0 1 0
+-0.5 0.0702302 0.2563 1 0 0
+0.5 -0.011171 -0.185051 1 0 0
+-0.233138 0.0433825 -0.10404 -0.040163 0.999042 0.0173772
+-0.0221262 0.371795 -0.107029 0 1 0
+0.470742 0.0187538 0.320513 0 0 1
+-0.145022 0.320139 0.320513 0 0 1
+-0.367816 0.371795 0.180922 0 1 0
+-0.0342018 -0.118236 -0.333333 0 0 1
+0.5 0.151737 -0.296222 1 0 0
+0.0915242 0.173959 0.320513 -0.0401909 -0.176993 0.983391
+0.0330774 0.229885 -0.333333 0.129228 0.789615 0.59984
+-0.209667 0.22534 0.371795 0 0 1
+-0.0446178 -0.256282 0.360169 0 1 0
+-0.382372 0.371795 -0.125197 0 1 0
+-0.158643 0.214769 -0.333333 0 0 1
+-0.5 -0.113776 0.229266 1 0 0
+-0.5 0.35375 0.210386 1 0 0
+-0.204952 0.349134 0.320513 0 0 1
+0.5 0.14433 0.274964 1 0 0
+-0.434337 -0.315796 0.320513 0 0 1
+0.5 0.0709556 -0.18785 1 0 0
+-0.233531 -0.371795 0.182592 0 1 0
+0.0849423 -0.294872 0.142351 0 1 0
+0.141109 -0.366511 -0.177046 0.953397 0.296844 0.0540195
+0.000353478 0.317021 0.320513 0 0 1
+0.5 0.0585385 -0.324731 1 0 0
+0.493549 0.0829173 0.320513 0.219818 0.144701 0.964749
+0.446272 0.294872 0.185308 0 1 0
+0.5 0.154932 0.273722 1 0 0
+-0.0320201 0.245315 0.371795 0.000320729 0.000408886 1
+-0.5 0.232144 0.02998 1 0 0
+0.5 -0.141183 0.21844 1 0 0
+-0.0527463 0.371795 0.237143 0 1 0
+0.240073 -0.371795 0.0190933 0 1 0
+0.5 -0.163831 -0.238136 1 0 0
+0.101684 -0.17756 0.344559 -0.475932 0.879482 0
+-0.438286 0.361374 -0.371795 0 0 1
+-0.291372 -0.371795 0.133801 0 1 0
+-0.5 0.369556 -0.362714 0.960133 -0.25764 0.108474
+0.5 -0.0734963 -0.145399 1 0 0
+-0.358293 -0.371795 -0.26485 0 1 0
+0.222209 0.037373 -0.326329 -0.309912 0.914156 0.26129
+0.188614 0.294872 -0.0780586 0 1 0
+-0.275561 0.194797 0.371795 0 0 1
+-0.268876 -0.273348 -0.371795 0 0 1
+0.314601 0.294872 0.204072 0 1 0
+-0.423296 -0.332015 -0.371795 0 0 1
+0.286162 -0.371795 -0.182449 0 1 0
+0.5 0.250942 -0.153242 1 0 0
+-0.487654 0.371795 0.191162 0 1 0
+-0.0800569 -0.294872 0.226979 0 1 0
+0.233561 -0.371795 -0.311461 0 1 0
+0.5 0.111468 0.0724264 1 0 0
+-0.211233 -0.371795 0.0614122 0 1 0
+-0.143116 0.371795 0.0650518 0 1 0
+0.182114 -0.173849 -0.333333 0 0 1
+-0.413036 0.367215 0.320513 -0.144861 0.312629 0.938764
+-0.430982 0.115147 0.320513 0 0 1
+-0.5 0.288206 0.135291 1 0 0
+-0.5 0.304968 0.0878081 1 0 0
+0.28446 0.215892 0.320513 0 0 1
+0.5 -0.0325053 -0.0673399 1 0 0
+-0.443441 0.301516 0.320513 0 0 1
+0.5 -0.262455 -0.125508 1 0 0
+-0.475239 0.371795 0.182264 0 1 0
+0.327145 -0.27338 0.320513 0 0 1
+0.397658 -0.371795 0.222064 0 1 0
+0.352276 -0.145614 0.320513 0.0256461 -0.0264185 0.999322
+-0.375481 0.371795 0.145494 0 1 0
+-0.5 -0.176857 0.252352 1 0 0
+-0.370755 0.345904 0.320513 0 0 1
+0.131277 0.207532 -0.333333 0 0 1
+0.423408 0.294872 -0.332284 0 1 0
+-0.5 -0.0190084 0.297454 1 0 0
+-0.120625 0.371795 0.0108045 0 1 0
+-0.0556165 0.031279 -0.333333 0 0 1
+0.0520243 0.371795 -0.095928 0 1 0
+-0.461507 -0.0120677 -0.371795 0 0 1
+-0.0103534 0.280304 0.320513 0 0 1
+-0.5 0.0470816 -0.210713 1 0 0
+0.5 0.189806 0.100184 1 0 0
+-0.0277275 -0.294872 -0.139515 0 1 0
+0.192753 0.00508767 -0.133896 0.986664 -0.162054 -0.0152391
+0.222618 0.0374824 -0.107181 -0.216892 0.976014 -0.0188038
+-0.0389154 0.371795 0.107552 0 1 0
+0.204506 0.0279223 -0.257213 -0.691618 0.722257 0.00310417
+-0.131196 -0.291814 -0.371795 -0.024524 0.438294 0.898497
+0.00873245 0.213713 -0.333333 0 0 1
+0.34143 0.294872 -0.00335805 0 1 0
+0.448718 -0.360952 -0.317847 1 0 0
+-0.5 0.0183725 -0.284453 1 0 0
+0.332223 -0.371795 0.168118 0 1 0
+0.053843 0.00382524 0.320513 0 0 1
+0.0483993 -0.0989688 -0.333333 0 0 1
+0.472682 -0.293834 0.320513 -0.0164568 -0.555434 0.831398
+0.355536 -0.371795 -0.345409 0 1 0
+0.5 0.175875 0.0859458 1 0 0
+0.439775 -0.147146 0.320513 0 0 1
+-0.268319 0.214432 0.334738 -0.562158 0.827017 -0.00459565
+0.451644 0.294872 0.229855 0 1 0
+-0.335043 0.228234 -0.371795 0 0 1
+-0.00252679 -0.265202 0.320513 -0.0030432 -0.009011 0.999955
+0.381633 -0.371795 0.145835 0 1 0
+0.303113 0.294872 -0.0791889 0 1 0
+0.141109 -0.358852 -0.288008 1 0 0
+-0.5 0.186194 0.212643 1 0 0
+-0.141154 -0.313838 -0.357203 1 0 0
+-0.436473 0.371795 -0.0402466 0 1 0
+-0.330511 0.104489 0.371795 0 0 1
+-0.00821679 -0.294872 -0.115645 0 1 0
+-0.0216504 -0.0535983 0.320513 0 0 1
+0.141026 0.305522 -0.338863 1 0 0
+0.0197432 -0.111598 -0.333333 0 0 1
+-0.5 0.0468451 0.000144093 1 0 0
+-0.28452 0.239372 -0.371795 0 0 1
+-0.153763 -0.0646667 -0.333333 0 0 1
+0.219671 -0.371795 -0.363371 -0.00364452 0.991624 0.129105
+0.141026 0.364515 0.115992 0.953964 0.299888 -0.00438096
+0.256139 0.151989 0.371795 0 0 1
+0.118538 0.0406054 0.320513 0 0 1
+-0.00971941 -0.0691977 -0.333333 0 0 1
+-0.079562 -0.256282 0.340271 0 1 0
+-0.187863 0.0496005 0.320513 0.0367615 -0.0236685 0.999044
+-0.467542 -0.0904431 -0.371795 0 0 1
+-0.198525 -0.0190891 -0.0316 0.589535 -0.291692 0.753236
+0.279215 0.104298 0.371795 0 0 1
+0.225931 -0.371795 0.114726 0 1 0
+0.141026 0.298449 0.268757 0.908701 0.416236 0.0317633
+0.0309168 0.371795 0.148353 0 1 0
+-0.196425 -0.0266583 -0.0412983 0.803485 -0.569863 0.172243
+-0.310902 0.0228773 -0.333333 -0.0183507 0.00108385 0.999831
+0.5 -0.285643 -0.0675019 1 0 0
+-0.255932 0.149839 0.371795 0 0 1
+-0.429097 0.371795 -0.11468 0 1 0
+-0.0955197 -0.274 0.320513 0 0 1
+0.448038 0.294872 -0.021884 0 1 0
+-0.320513 -0.151577 -0.368607 0.758013 0.219681 -0.614131
+0.0137907 -0.230285 -0.333333 0.0664752 -0.562531 0.8241
+-0.0707136 0.159489 0.320513 0 0 1
+0.226981 -0.0834046 -0.333333 0 0 1
+-0.5 -0.24141 0.101638 1 0 0
+0.24629 0.294872 0.315906 0.0540588 0.739347 0.671151
+-0.20067 0.371795 0.126488 0 1 0
+-0.316622 0.371795 0.296274 0 1 0
+-0.5 0.0588239 -0.0341758 1 0 0
+-0.245335 0.363648 -0.371795 0.003364 -0.342832 0.939391
+-0.404897 -0.371795 0.315668 -0.0188188 0.985828 -0.166702
+0.5 -0.0959258 0.299843 1 0 0
+0.5 -0.123979 -0.0362579 1 0 0
+0.5 -0.193899 -0.0557309 1 0 0
+0.424463 -0.371795 -0.134113 0 1 0
+-0.131703 -0.294872 0.112339 -0.166087 0.984841 0.0500275
+-0.390438 -0.208811 -0.371795 0 0 1
+0.153309 -0.258132 0.320513 0.0940239 -0.516212 0.851284
+-0.139232 -0.294872 -0.143645 0.763545 -0.643535 0.0534856
+-0.473456 -0.294872 0.105032 0 1 0
+-0.272417 -0.371795 0.0170222 0 1 0
+0.5 0.268105 -0.31395 1 0 0
+-0.180481 -0.063928 0.320513 0 0 1
+0.236979 -0.23186 0.348531 -0.452378 0.891826 0
+-0.5 0.0225763 -0.0378338 1 0 0
+0.192693 -0.00440275 -0.205732 0.990051 0.138593 -0.0242951
+0.425583 0.294872 0.0405445 0 1 0
+-0.5 0.279921 0.0887838 1 0 0
+0.5 -0.273655 0.103081 1 0 0
+0.467381 -0.282928 0.320513 -0.0652817 -0.189939 0.979623
+-0.38374 0.0104495 0.366093 0.905117 0.0654349 -0.420097
+0.371065 -0.0803553 0.369591 0.768818 -0.35858 0.52947
+-0.489917 0.371795 -0.253668 -0.0187898 0.999823 -0.000604256
+0.394893 -0.0747817 -0.371795 0 0 1
+-0.267544 0.12081 0.371795 0 0 1
+-0.271015 0.0164425 -0.305269 0.923993 -0.38241 0
+0.434254 0.235343 -0.371795 0 0 1
+-0.231166 0.371795 0.0703395 0 1 0
+0.229859 -0.203139 -0.333333 0 0 1
+-0.408194 -0.371795 -0.152465 0 1 0
+-0.0656925 -0.294872 -0.325104 0 1 0
+-0.5 -0.0861278 -0.157666 1 0 0
+-0.490257 0.371795 -0.205273 0 1 0
+0.5 -0.107783 -0.347584 1 0 0
+-0.404022 0.242283 -0.371795 0 0 1
+-0.237473 0.0676465 -0.333333 0 0 1
+-0.353267 -0.371795 0.0398187 0 1 0
+-0.464961 -0.154665 0.320513 0 0 1
+-0.448718 -0.349947 -0.213159 1 0 0
+0.380574 -0.0403429 -0.371795 0 0 1
+-0.0190207 0.204209 0.320704 0.0249366 -0.604639 0.796109
+-0.5 -0.261432 -0.315454 1 0 0
+-0.373636 0.165272 0.320513 0 0 1
+0.00892972 -0.00501734 0.320513 0 0 1
+0.233525 0.0382204 -0.31563 0.0553617 0.997806 -0.0363017
+-0.448718 -0.304555 -0.110643 0.99969 0.0233238 0.0086657
+0.141026 0.359677 -0.160601 1 0 0
+-0.450279 0.297513 0.320513 0 0 1
+-0.448718 -0.335412 -0.0231837 1 0 0
+0.5 0.181439 0.233036 1 0 0
+0.5 -0.224374 -0.0118265 1 0 0
+-0.213922 -0.164979 -0.333333 0 0 1
+-0.5 -0.0138671 -0.319787 1 0 0
+-0.448718 -0.324428 -0.201994 1 0 0
+0.498872 -0.294872 0.0915536 0.747151 -0.647495 -0.15005
+0.470261 0.294872 0.246337 0 1 0
+-0.412279 0.371795 -0.0577234 0 1 0
+-0.370776 0.0343786 0.371795 0 0 1
+0.329584 0.294872 0.233502 0 1 0
+0.5 0.291811 0.274578 0.957715 0.286516 0.0262731
+-0.167977 0.371795 -0.211936 0 1 0
+0.174117 0.100426 0.320513 -0.0551808 -0.082369 0.995073
+0.141109 -0.365243 -0.122726 0.784144 0.620215 0.0212633
+-0.056351 -0.196929 0.32447 0.287706 0.915297 0.281881
+0.5 -0.213232 -0.261605 1 0 0
+0.376871 -0.260738 -0.371795 0 0 1
+-0.251035 -0.294606 0.320513 0 0 1
+-0.5 -0.271082 0.26392 1 0 0
+0.5 -0.0414437 0.302619 1 0 0
+-0.17371 -0.371795 -0.156932 0 1 0
+-0.160283 0.371795 -0.0186752 0 1 0
+-0.254862 -0.0361411 -0.321783 0.545989 0.837756 0.0077764
+-0.185855 -0.240213 0.371795 -0.0193601 -0.122048 0.992335
+-0.207613 -0.274156 0.320513 0 0 1
+0.5 -0.123766 0.256092 1 0 0
+0.5 0.236399 0.216613 1 0 0
+0.0526346 -0.294872 -0.0660541 0 1 0
+-0.433865 0.336033 -0.371795 0 0 1
+-0.30164 0.371795 0.312187 0 1 0
+0.320513 0.0439754 -0.339369 0.968317 -0.0631299 0.241611
+-0.25853 0.371795 0.0922999 0 1 0
+-0.214322 0.0402434 -0.299394 0.357236 0.934009 0.00306838
+0.141026 0.348 0.052671 1 0 0
+0.5 0.110562 -0.038666 1 0 0
+-0.5 0.201885 -0.0876617 1 0 0
+0.328554 0.294872 -0.183325 0 1 0
+0.5 -0.0842348 0.183692 1 0 0
+-0.494869 0.371795 0.0593864 -0.282258 0.958454 -0.0411809
+-0.0748132 0.292948 -0.371795 0 0 1
+-0.444855 0.00997132 0.320513 0 0 1
+-0.206103 -0.371795 0.217855 0 1 0
+0.448718 -0.300759 0.123714 0.94585 -0.324601 0.00118208
+-0.0600031 -0.294872 0.120031 0 1 0
+-0.343179 0.371795 -0.1632 0 1 0
+0.0587216 -0.256282 0.320921 -0.103963 -0.612701 0.783447
+0.5 0.230359 0.0426555 1 0 0
+0.141026 0.319207 0.111368 1 0 0
+-0.481739 -0.108533 0.320513 0 0 1
+-0.5 0.311354 -0.269037 1 0 0
+0.385595 -0.0804479 0.320513 0 0 1
+-0.423599 0.0515119 -0.371795 0 0 1
+0.112385 0.36822 0.320513 0.0478356 0.225728 0.973015
+0.422506 -0.303029 -0.371795 0 0 1
+0.243301 -0.036309 -0.281808 -0.361844 0.932236 0.00214733
+0.5 0.0954699 -0.113076 1 0 0
+-0.0351923 0.371795 0.196358 0 1 0
+0.319397 0.294872 0.301734 0 1 0
+-0.179073 -0.156738 -0.333333 0 0 1
+0.0480543 0.371795 0.0120596 0 1 0
+0.351526 0.0182485 -0.371795 0 0 1
+-0.5 -0.151742 -0.282215 1 0 0
+0.5 -0.291043 0.0960795 0.967641 -0.249006 -0.0408402
+-0.184726 0.371795 0.16085 0 1 0
+0.340717 0.23188 0.320513 0 0 1
+-0.19411 0.371795 -0.167089 0 1 0
+-0.5 0.272201 0.122227 1 0 0
+0.40292 0.294872 -0.178414 0 1 0
+-0.231827 -0.371795 0.170912 0 1 0
+0.0694986 0.12334 0.320513 0 0 1
+-0.211174 -0.371795 -0.287759 0 1 0
+0.03336 -0.218914 0.371795 0 0 1
+-0.141154 -0.349803 -0.315899 1 0 0
+-0.412137 -0.243797 0.320513 0 0 1
+0.5 -0.214618 -0.199827 1 0 0
+0.460113 0.133499 0.320513 0 0 1
+0.206191 0.0686471 -0.333333 0 0 1
+0.320513 -0.0434924 -0.353222 1 0 0
+-0.5 0.18489 0.23571 1 0 0
+0.141109 -0.332359 0.0101464 1 0 0
+0.5 -0.273444 -0.327378 1 0 0
+0.429678 -0.250221 -0.371795 0 0 1
+0.5 0.0193343 0.23074 1 0 0
+0.151122 -0.0386824 -0.333333 0 0 1
+0.158729 -0.254099 0.32413 -0.0138129 0.903545 -0.42827
+-0.365206 0.079441 0.371795 -0.215488 0.0820543 0.973053
+-0.491284 0.350268 -0.371795 0.141863 -0.0448076 0.988872
+-0.384254 0.371795 -0.0158447 0 1 0
+-0.040498 -0.294872 0.0701922 0 1 0
+0.251646 0.00206944 0.0104574 0.508943 0.0784181 0.857221
+-0.0231171 -0.110239 0.320513 0 0 1
+0.48622 0.294872 -0.0768461 0 1 0
+0.416105 0.294872 -0.350051 0 1 0
+0.346417 -0.371795 0.0561979 0 1 0
+0.411571 -0.292564 0.320513 0 0 1
+0.189456 -0.248283 0.345838 -0.212556 0.977149 0
+0.40848 0.294872 -0.145856 0 1 0
+-0.326426 -0.161769 0.358843 0.800536 0.599284 0
+-0.416125 -0.371795 -0.252654 0 1 0
+0.101202 0.0856173 -0.333333 0 0 1
+-0.452492 0.371795 0.317579 0.144568 0.704296 0.69503
+-0.5 0.354098 -0.100985 1 0 0
+0.148715 -0.371795 -0.287504 0.0828113 0.996565 0.00105652
+-0.5 -0.0948467 -0.125589 1 0 0
+-0.5 0.357988 0.219007 1 0 0
+-0.168919 -0.0987489 0.320513 0 0 1
+0.43941 -0.371795 -0.213891 -0.103924 0.994349 -0.0216778
+0.5 0.0165219 0.0796936 1 0 0
+-0.367572 0.371795 -0.0243103 0 1 0
+0.36425 0.294872 -0.151953 0 1 0
+-0.355205 0.313674 -0.371795 0 0 1
+0.232209 -0.138958 0.371795 0 0 1
+0.453449 -0.294872 -0.30629 -0.411965 0.911169 -0.00752466
+-0.227817 0.124747 -0.333333 0 0 1
+0.5 0.0618403 -0.27383 1 0 0
+0.5 -0.142808 0.264285 1 0 0
+0.5 0.140605 -0.231743 1 0 0
+0.00982464 0.175093 0.320513 0 0 1
+-0.5 0.344263 0.0695796 1 0 0
+-0.316881 0.260616 -0.371795 0 0 1
+-0.303195 -0.186524 0.332973 0.704105 0.710096 0
+0.0612192 0.371795 0.0291279 0 1 0
+-0.194181 -0.0664643 0.324775 0.613922 0.288922 0.734591
+0.124164 -0.294872 0.0883144 0 1 0
+-0.0281691 -0.294872 -0.144953 0 1 0
+0.5 -0.262318 0.280664 1 0 0
+0.141026 0.308681 0.0258372 1 0 0
+0.413292 0.189293 -0.371795 0 0 1
+-0.489151 -0.294872 -0.218767 0 1 0
+-0.319234 -0.167742 -0.344747 0.983131 0.182358 0.0140783
+0.49165 -0.0148868 0.320513 0.193137 -0.0543647 0.979665
+-0.385621 -0.371795 -0.118439 0 1 0
+0.408578 0.294872 -0.162941 0 1 0
+-0.0203329 0.0660791 0.320513 0 0 1
+-0.14544 0.322715 0.320513 0 0 1
+0.5 0.20694 0.186149 1 0 0
+-0.249554 -0.079379 0.371795 0 0 1
+0.5 -0.0744135 0.166011 1 0 0
+0.264579 0.027649 0.371795 0 0 1
+-0.177696 -0.371795 -0.205827 0 1 0
+0.0793593 -0.294872 -0.216596 0 1 0
+-0.382872 0.0639795 -0.371795 0 0 1
+0.267955 0.00925815 -0.187268 0.964571 0.263343 0.015899
+-0.437197 -0.256615 0.320513 0 0 1
+-0.141154 -0.364786 -0.163193 0.998345 -0.0573997 -0.00357963
+-0.448718 -0.298535 -0.0328668 0.694486 0.719314 -0.0166527
+0.322325 -0.187205 -0.371795 0.196214 0.0218685 0.980317
+0.00126732 0.371795 -0.0617675 0 1 0
+0.0113049 -0.294872 0.140162 0 1 0
+0.0733504 0.371795 -0.0911115 0 1 0
+0.0104084 0.371795 0.066012 0 1 0
+0.5 0.150635 0.220502 1 0 0
+0.288518 -0.371795 0.0547787 0 1 0
+-0.319011 0.170708 0.339637 0.739505 -0.673128 -0.00560532
+-0.328902 -0.216104 0.320513 0 0 1
+-0.446054 0.236182 0.320513 0 0 1
+0.111182 0.176466 -0.333333 0 0 1
+0.239082 0.230712 0.338982 0.466472 0.884526 0.00414632
+0.222855 -0.249204 0.320513 0 0 1
+0.5 0.257866 0.0200302 1 0 0
+0.448718 -0.364088 -0.147117 0.98288 -0.176693 -0.0522241
+0.0954464 0.170054 0.320513 -0.00763235 -0.0132403 0.999883
+0.0728611 0.371795 0.31637 0.0734204 0.956896 0.280997
+-0.201135 0.0317761 -0.294482 0.680247 0.732726 0.0194171
+-0.475058 0.282878 0.320513 0 0 1
+-0.429838 0.320644 0.320513 0 0 1
+0.0869282 -0.0987866 0.320513 0 0 1
+-0.200162 0.346356 0.320513 0 0 1
+0.315516 -0.339368 -0.371795 0 0 1
+0.316284 -0.192252 0.320513 0 0 1
+-0.134084 -0.0253724 -0.333333 0 0 1
+-0.0390518 -0.294872 -0.158541 0 1 0
+0.335531 -0.371795 0.309514 -0.00421694 0.999872 -0.0154291
+0.162564 0.125172 0.340104 0.79781 0.602889 0.00485255
+-0.121171 -0.118096 -0.333333 0 0 1
+-0.310628 -0.371795 0.0270445 0 1 0
+0.419911 0.294872 0.0465245 0 1 0
+0.309521 0.258699 -0.371795 0 0 1
+-0.5 0.00222949 -0.0949329 1 0 0
+-0.309882 -0.371795 -0.184266 0 1 0
+-0.302467 -0.371795 -0.268751 0 1 0
+-0.204599 -0.0079328 0.352111 0.996716 0.0809754 -0.000733762
+0.377403 -0.327327 0.320513 0 0 1
+-0.5 -0.0437434 0.103414 1 0 0
+-0.157775 -0.371795 0.187947 0 1 0
+-0.408739 0.342064 -0.371795 0 0 1
+-0.255494 -0.371795 -0.119446 0 1 0
+0.189099 -0.0781283 0.371557 0.875841 -0.35522 -0.326682
+0.000556041 0.371795 -0.153068 0 1 0
+-0.167597 0.168971 -0.333333 0 0 1
+-0.320077 0.218462 0.320513 0 0 1
+-0.425793 -0.371795 -0.228747 0 1 0
+0.5 -0.0165581 0.14814 1 0 0
+0.369133 -0.00137029 -0.371795 0 0 1
+0.101561 0.300379 -0.371795 0 0 1
+-0.082169 -0.294872 -0.207706 0 1 0
+-0.203992 -0.222199 -0.333333 0.0391537 -0.136626 0.989849
+-0.5 0.273225 -0.293161 1 0 0
+0.135163 -0.230897 -0.352987 0 1 0
+-0.206532 -0.03604 -0.106833 -0.549849 0.835223 -0.00830488
+0.255455 0.0294891 -0.190617 0.663957 0.747747 -0.00586155
+-0.335934 0.36154 0.320513 0.0245322 0.0863065 0.995966
+0.201029 -0.371795 -0.155361 0 1 0
+0.5 0.217708 -0.316302 1 0 0
+-0.297299 -0.310074 -0.371795 0 0 1
+-0.199547 -0.33523 -0.371795 0 0 1
+-0.0163269 0.371795 0.216619 0 1 0
+-0.336071 -0.371795 0.255434 0 1 0
+0.0139005 -0.131733 -0.333333 0 0 1
+-0.141154 -0.336583 0.116298 1 0 0
+-0.472147 -0.253929 0.320513 0 0 1
+0.259957 -0.240626 0.320513 0 0 1
+0.0116101 -0.294872 0.311433 0.00875583 0.936442 -0.350712
+0.0171224 0.371795 0.103708 0 1 0
+-0.412782 -0.371795 -0.370684 -0.084996 0.508192 0.857039
+-0.180518 0.371795 -0.022585 0 1 0
+-0.482211 -0.0203567 -0.371795 0 0 1
+-0.418795 -0.151261 -0.371795 0 0 1
+-0.132541 0.286388 0.320513 0 0 1
+0.124397 0.371795 -0.0589388 0 1 0
+-0.18357 -0.371795 -0.316255 0 1 0
+0.5 -0.261507 -0.0380252 1 0 0
+-0.474764 -0.197693 0.320513 0 0 1
+0.0731832 0.230897 -0.356242 0 1 0
+0.201489 0.294872 0.00955023 0 1 0
+-0.448718 -0.298236 0.202352 0.799726 0.563363 0.20751
+-0.0377094 0.171284 -0.333333 0 0 1
+0.267195 0.294872 -0.18157 0 1 0
+0.380861 0.106969 -0.371795 0 0 1
+0.31853 -0.33596 -0.371795 0 0 1
+0.367876 0.294872 -0.195762 0 1 0
+-0.246975 0.306779 -0.371795 0 0 1
+0.39338 -0.0580856 0.320513 0 0 1
+0.159785 0.294872 -0.19003 0 1 0
+0.261751 -0.218334 0.361801 -0.481448 0.876475 0
+0.298414 0.0204328 0.371795 0 0 1
+-0.418729 -0.223106 -0.371795 0 0 1
+-0.141154 -0.358152 0.275322 1 0 0
+0.443456 0.0930354 0.320513 0 0 1
+0.121991 -0.285407 -0.371795 0.0556719 0.205836 0.977002
+0.5 -0.226786 -0.0949628 1 0 0
+0.0747406 0.141002 0.320513 0 0 1
+-0.12614 -0.101781 -0.333333 0 0 1
+-0.306523 0.371795 -0.353085 0 1 0
+-0.129965 0.238984 -0.371795 -0.0477384 0.178197 0.982836
+0.0268333 -0.284563 -0.371795 -0.00307383 0.0109645 0.999935
+0.141026 0.315055 0.233066 1 0 0
+0.281651 -0.371795 -0.261624 0 1 0
+-0.5 -0.136635 -0.175707 1 0 0
+0.0747592 0.371795 -0.0169579 0 1 0
+0.435183 0.161141 0.320513 0 0 1
+0.453343 0.294872 0.0789145 0 1 0
+0.5 -0.209003 -0.231579 1 0 0
+-0.412567 0.371795 -0.0220647 0 1 0
+0.0253062 0.371795 0.269712 0 1 0
+-0.336343 -0.166821 0.320513 -0.032175 -0.0288568 0.999066
+-0.250374 -0.371795 0.181944 0 1 0
+0.193159 0.00767684 -0.0887447 0.980502 -0.196366 0.00749985
+-0.41286 0.0142653 -0.371795 0 0 1
+-0.5 0.00250205 -0.0985995 1 0 0
+0.365761 -0.280037 -0.371795 0 0 1
+0.5 -0.0756893 0.0960736 1 0 0
+-0.0787899 -0.294872 0.23653 0 1 0
+0.41644 0.260179 0.320513 0 0 1
+0.5 0.105332 -0.131676 1 0 0
+-0.195765 0.254109 0.320513 0.0100324 0.0716355 0.99738
+-0.336375 0.371795 0.0536261 0 1 0
+-0.5 0.0779538 0.0129229 1 0 0
+0.192667 -0.0041062 -0.239764 0.998556 0.0536609 0.00266643
+0.0438927 0.348374 0.320513 0 0 1
+-0.470114 0.185422 0.320513 0 0 1
+0.31553 0.174189 0.368249 0.499541 0.759446 0.416773
+-0.141154 -0.312549 -0.320812 1 0 0
+0.5 0.0233346 0.104515 1 0 0
+0.5 -0.211093 0.269722 1 0 0
+0.5 0.0836579 0.1264 1 0 0
+0.163381 0.294872 -0.362711 -0.0121225 0.997704 -0.0666354
+-0.199795 -0.030436 -0.276708 -0.687646 0.725981 -0.00970678
+-0.5 0.270646 0.0852731 1 0 0
+0.444953 0.294872 -0.0534468 0 1 0
+0.00945702 -0.282086 0.320513 0 0 1
+0.5 -0.197862 0.138043 1 0 0
+0.159548 0.230264 0.371795 0 0 1
+-0.178944 -0.371795 0.285713 0 1 0
+-0.00680594 -0.230897 -0.36917 0.115362 -0.695474 0.70923
+0.125007 -0.00969051 -0.333333 0 0 1
+-0.297819 0.278312 0.320513 0 0 1
+-0.380601 -0.371795 -0.121391 0 1 0
+-0.406869 -0.371795 -0.271292 0 1 0
+0.460169 0.294872 -0.303697 0 1 0
+0.258589 -0.191426 0.371795 0 0 1
+0.00319431 0.371795 -0.0246234 0 1 0
+-0.167902 0.137344 -0.333333 0 0 1
+-0.276115 0.371795 0.266087 0 1 0
+-0.431814 -0.261442 -0.371795 0 0 1
+0.161474 0.294872 -0.0150303 0 1 0
+-0.14048 -0.260847 -0.371795 0 0 1
+0.00887049 -0.294872 0.131762 0 1 0
+-0.111994 -0.294872 0.179732 0 1 0
+0.219886 -0.371795 -0.0283967 0 1 0
+-0.304574 -0.371795 0.106624 0 1 0
+0.221607 -0.371795 0.137562 0 1 0
+-0.326609 -0.371795 -0.0556201 0 1 0
+-0.141154 -0.365897 -0.0204978 0.977298 -0.206117 0.0490423
+-0.249444 0.0392049 -0.318247 -0.464374 0.885583 0.00995946
+-0.0971184 0.161976 0.320513 0 0 1
+-0.43392 0.371795 0.0984066 0 1 0
+0.324723 -0.250689 -0.371795 0 0 1
+-0.139345 -0.150655 0.331011 0.678608 0.693618 0.241632
+-0.108927 0.360497 -0.371795 0.00148708 -0.0258227 0.999665
+-0.258042 0.371795 -0.306054 0 1 0
+-0.0806583 0.188583 0.343091 -0.390253 0.920686 -0.00622202
+0.422856 0.294872 0.102356 0 1 0
+0.152238 0.236068 -0.371795 -0.04116 0.253487 0.966463
+0.5 -0.219146 0.164838 1 0 0
+-0.245802 0.19451 -0.333333 0 0 1
+0.0659248 -0.294173 -0.371795 -0.0230651 0.842055 0.538898
+0.5 -0.0814386 0.110661 1 0 0
+0.260614 0.0341833 -0.333333 0.0411344 0.0205116 0.998943
+0.5 -0.23495 0.242888 1 0 0
+0.0769645 -0.294872 -0.113759 0 1 0
+0.5 0.0194149 -0.299418 1 0 0
+0.318292 0.171258 -0.336261 0.852007 0.0473006 0.521389
+-0.388367 0.246905 0.320513 0 0 1
+-0.098351 -0.294872 0.226504 0 1 0
+-0.379012 -0.371795 -0.366559 0.152522 0.942958 0.295917
+0.496713 -0.294872 0.130995 -0.654681 0.754869 0.0395755
+-0.335634 -0.371795 -0.240967 0 1 0
+-0.5 0.238497 0.0658882 1 0 0
+0.218939 -0.371795 0.210548 0 1 0
+0.019704 0.212919 -0.333333 0 0 1
+0.360507 -0.107967 0.350332 0.904951 -0.42532 0.0129326
+0.263134 0.0205794 -0.220559 0.837103 0.546793 -0.0165923
+0.5 -0.240027 0.317293 0.879395 -0.0700779 0.470908
+-0.170169 0.220701 0.371795 0 0 1
+-0.422003 0.104011 -0.371795 0 0 1
+-0.22772 -0.371795 0.292601 0 1 0
+0.240028 0.0371858 -0.283429 0.238127 0.971234 0
+-0.5 0.202801 -0.15791 1 0 0
+0.5 0.0117108 0.0757283 1 0 0
+0.180839 -0.0466313 -0.333333 0 0 1
+-0.370853 0.341477 -0.371795 0 0 1
+0.345327 -0.371795 -0.075437 0 1 0
+-0.140051 -0.0279802 -0.333333 0 0 1
+-0.439839 -0.371795 0.299645 0.0955132 0.995267 0.0179194
+-0.5 0.34684 0.113025 1 0 0
+0.343075 -0.371795 -0.326915 0 1 0
+0.391427 0.294872 0.208232 0 1 0
+-0.368921 -0.086105 0.350455 0.936947 0.349471 0
+-0.0421562 -0.294872 0.187211 0 1 0
+0.113362 -0.17098 0.343854 -0.549337 0.8356 0.00147252
+-0.0763515 -0.103527 -0.333333 0 0 1
+-0.285645 -0.371795 -0.289699 0 1 0
+0.225479 -0.0953889 0.371795 0 0 1
+-0.235913 -0.371795 0.183041 0 1 0
+0.0482641 0.18184 -0.333333 0 0 1
+0.458209 -0.294872 -0.272653 -0.126067 0.992015 0.00351994
+-0.301969 -0.0275974 0.371795 0 0 1
+0.0809326 0.371795 -0.0928635 0 1 0
+0.0103843 -0.294872 0.24517 0 1 0
+0.0466664 -0.294872 0.144578 0 1 0
+-0.27287 -0.299345 -0.371795 0 0 1
+-0.438051 0.223992 0.320513 0 0 1
+-0.46577 -0.294872 0.298784 0 1 0
+-0.387465 -0.371795 0.210801 0 1 0
+-0.227478 -0.371795 0.221305 0 1 0
+0.370552 -0.0817331 0.326807 0.908652 -0.381608 0.16949
+-0.455224 0.371795 -0.305865 0 1 0
+0.0542812 -0.294872 0.0142725 0 1 0
+-0.257148 0.371795 -0.194195 0 1 0
+0.277998 0.294872 -0.258975 0 1 0
+-0.421203 -0.371795 0.204943 0 1 0
+0.141026 0.321087 0.00441045 1 0 0
+-0.205904 0.0356004 -0.131044 0.566415 0.823899 -0.0190743
+-0.5 -0.183318 -0.0740306 1 0 0
+-0.0188718 -0.0761891 -0.333333 0 0 1
+-0.256929 0.371795 -0.0292291 0 1 0
+0.270839 -0.371795 -0.0304854 0 1 0
+-0.175024 -0.0118423 -0.333333 0 0 1
+-0.165816 -0.371795 -0.0900695 0 1 0
+0.425255 -0.371795 0.292469 0 1 0
+0.0346042 -0.0767824 0.320513 0 0 1
+0.204441 -0.0278572 -0.253523 0.681614 0.73167 0.0078421
+-0.5 0.020253 -0.318736 1 0 0
+-0.263534 -0.0305963 -0.333333 -0.361949 -0.312072 0.87841
+-0.0460066 0.279704 0.320513 0 0 1
+-0.00495484 0.230897 -0.339244 0.0293507 0.961023 0.274908
+-0.279503 -0.34966 -0.371795 0 0 1
+0.0191441 -0.294872 -0.304751 0 1 0
+-0.189139 0.371795 0.126372 0 1 0
+0.367725 -0.0893127 0.350463 0.936955 -0.349449 0
+0.2282 0.294872 -0.254684 0 1 0
+-0.0961737 0.371795 0.133194 0 1 0
+-0.297338 0.371795 0.0648293 0 1 0
+0.374281 -0.371795 -0.136771 0 1 0
+0.448718 -0.317435 -0.065549 1 0 0
+-0.380135 -0.0444907 0.365381 0.967656 0.205789 -0.145924
+0.5 0.224056 -0.137544 1 0 0
+0.5 -0.0414687 0.299605 1 0 0
+0.107948 -0.230897 -0.351723 0 1 0
+-0.429753 0.371795 -0.301013 0 1 0
+-0.110393 -0.294872 0.203277 0 1 0
+-0.320513 -0.146394 -0.336033 -0.657726 0.0464302 0.751825
+0.375601 -0.371795 0.199528 0 1 0
+-0.385465 0.0668005 0.320513 -0.013425 0.00268428 0.999906
+-0.10843 0.171898 0.320513 0.181339 -0.491805 0.851613
+-0.5 0.0302311 0.0269177 1 0 0
+-0.36383 -0.371795 -0.117449 0 1 0
+0.156012 0.254293 0.367422 0.0217588 0.991182 0.130707
+-0.212057 -0.0391876 -0.321 -0.392334 0.919803 0.00604819
+-0.5 -0.234146 -0.29346 1 0 0
+0.371119 0.106961 0.320513 0.0256327 0.0145909 0.999565
+-0.193764 0.0228584 -0.319552 0.86691 0.498451 -0.003566
+-0.341347 -0.287471 -0.371795 0 0 1
+0.214886 -0.281761 0.320513 0 0 1
+0.384548 0.294872 -0.25095 0 1 0
+-0.5 0.0389453 -0.318272 1 0 0
+0.408045 -0.338148 0.320513 0 0 1
+-0.431502 -0.113857 -0.371795 0 0 1
+-0.5 0.166077 0.317216 0.904414 0.0549767 -0.4231
+0.328523 0.294872 -0.115239 0 1 0
+-0.5 -0.196254 -0.273897 1 0 0
+0.451319 0.159796 0.320513 0 0 1
+0.4056 0.294872 -0.229582 0 1 0
+-0.197054 0.235746 0.371795 0 0 1
+0.141109 -0.303672 -0.0572128 0.996365 0.0827321 0.0202834
+-0.5 -0.20588 -0.107946 1 0 0
+0.46454 0.294872 0.0633066 0 1 0
+-0.5 -0.236328 -0.25674 1 0 0
+0.00764766 -0.0921476 -0.333333 0 0 1
+-0.15244 0.151041 -0.333333 0 0 1
+-0.5 0.363635 0.209451 0.983988 -0.176977 0.0211561
+-0.0575187 -0.294872 0.126747 0 1 0
+-0.267417 0.0233695 -0.0620744 0.823659 -0.56707 -0.00418582
+0.307786 0.294872 0.137088 0 1 0
+0.192915 -0.00676632 -0.31181 0.989206 0.14531 0.0188793
+0.336336 0.189156 -0.371795 0 0 1
+-0.0750568 -0.294872 -0.198978 0 1 0
+0.106128 0.371795 0.274083 0 1 0
+-0.366161 0.371795 0.306404 0 1 0
+-0.190856 -0.0171551 -0.272097 0.919707 -0.392606 0
+-0.272764 0.0110509 -0.264468 0.957769 -0.287438 0.00764016
+0.294712 0.211224 -0.340626 0.631408 0.761063 0.148682
+-0.5 0.240586 -0.258397 1 0 0
+0.198233 -0.0504649 0.320561 -0.434772 0.0968047 0.895322
+-0.5 0.180862 0.0266047 1 0 0
+0.141026 0.361453 0.0340745 0.982229 0.168091 -0.0835009
+-0.253599 -0.166787 0.371795 0 0 1
+-0.196087 0.026176 -0.303672 0.82701 0.562176 0.00370129
+0.304564 0.263452 0.320513 0 0 1
+-0.165222 -0.322908 0.320513 0 0 1
+0.0504179 -0.294872 0.308338 0 1 0
+-0.095204 0.371795 0.108788 0 1 0
+-0.182261 0.110433 0.371795 0.104261 -0.114328 0.987957
+-0.0153086 -0.134899 0.320513 0 0 1
+0.448718 -0.352279 -0.0971672 1 0 0
+0.5 -0.200649 -0.343266 1 0 0
+-0.370149 -0.222198 -0.371795 0 0 1
+-0.100221 0.371795 -0.280408 0 1 0
+0.129844 0.00514159 0.320513 0 0 1
+-0.00670663 -0.294872 -0.27889 0 1 0
+0.0274732 0.0622116 0.320513 0 0 1
+-0.359448 -0.371795 -0.218631 0 1 0
+0.5 -0.120373 0.20007 1 0 0
+-0.140226 0.238583 0.371795 0 0 1
+0.282282 -0.299301 0.320513 0 0 1
+-0.134887 -0.154226 0.356004 0.628869 0.777508 0.00230738
+-0.198405 -0.371795 0.0766294 0 1 0
+-0.437105 -0.371795 0.0734279 0 1 0
+-0.025411 0.231588 -0.371795 0.0674842 0.657139 0.750742
+-0.11245 0.194554 -0.333333 0 0 1
+-0.138465 -0.294872 0.0109001 -0.428464 0.896885 0.109614
+-0.362594 0.371795 0.0136614 0 1 0
+0.364424 0.294872 -0.17888 0 1 0
+0.491658 -0.294872 0.102178 -0.0805023 0.996562 -0.0195633
+-0.344916 0.136519 0.331811 0.844458 -0.53561 0.00342285
+0.487446 0.153858 0.320513 0.0554256 -0.0403578 0.997647
+-0.448718 -0.343332 0.257625 1 0 0
+0.355351 0.0667144 -0.371795 0 0 1
+-0.138833 0.371795 0.224019 0 1 0
+-0.17222 0.371795 -0.354783 0 1 0
+-0.429909 -0.371795 0.227728 0 1 0
+0.5 0.103394 -0.132081 1 0 0
+0.487087 -0.294872 0.248994 0 1 0
+0.147252 -0.371795 -0.102792 0.220043 0.971739 0.0854646
+0.203005 -0.371795 0.0451637 0 1 0
+0.5 0.182397 0.255315 1 0 0
+0.436945 0.181445 -0.371795 0 0 1
+0.315645 -0.23811 -0.371795 0 0 1
+0.5 0.258938 0.221871 1 0 0
+0.268711 0.00594188 -0.249687 0.986301 0.163476 0.0220389
+0.368401 0.0874984 0.321611 0.898208 0.328361 0.292235
+0.5 -0.220235 0.289385 1 0 0
+0.131234 -0.294872 0.107066 0.15795 0.987158 0.0239138
+-0.0314765 0.371795 -0.153177 0 1 0
+0.5 -0.249382 0.00823374 1 0 0
+-0.0149204 0.0654566 -0.333333 0 0 1
+0.357606 -0.371795 -0.139701 0 1 0
+0.0307966 0.249301 0.371795 -0.0419853 0.20503 0.977855
+-0.442342 0.371795 0.0444528 0 1 0
+0.5 -0.284119 0.162691 1 0 0
+0.124107 0.232525 0.371795 0 0 1
+-0.5 0.0483937 0.188191 1 0 0
+-0.167563 -0.253045 0.370001 -0.080137 -0.673713 0.734635
+-0.480678 0.371795 -0.0856921 0 1 0
+0.5 -0.0909761 0.010953 1 0 0
+0.37907 0.294872 -0.207144 0 1 0
+0.350126 -0.026851 0.371795 0 0 1
+0.439551 0.294872 -0.130071 0 1 0
+-0.5 0.191696 0.289761 1 0 0
+0.5 0.123421 0.247526 1 0 0
+-0.194091 0.0233262 -0.0892458 0.855942 0.516029 -0.032823
+0.0565079 -0.294872 0.168322 0 1 0
+-0.5 0.354459 0.320305 -0.658421 0.047189 0.751169
+0.327972 -0.159705 0.363483 0.783087 -0.610771 0.11719
+-0.19496 0.371795 -0.0586218 0 1 0
+0.448187 0.24355 0.320513 0 0 1
+-0.496291 -0.148817 -0.371795 0.428842 0.0182062 0.903196
+-0.5 -0.149317 -0.0483172 1 0 0
+0.314219 0.265582 -0.371795 0 0 1
+-0.5 0.00317421 -0.351713 1 0 0
+0.20872 -0.0821623 -0.333333 0 0 1
+-0.141154 -0.345299 -0.0329731 1 0 0
+-0.5 -0.286066 -0.00836801 0.999832 0.0179025 0.00404003
+0.332014 -0.371795 0.148735 0 1 0
+-0.117182 0.371795 0.222522 0 1 0
+-0.0771995 0.230897 -0.345571 0 1 0
+0.0288717 0.371795 -0.160273 0 1 0
+-0.328475 0.0846515 -0.371795 -0.0323517 0.0256593 0.999147
+0.336746 0.294872 0.118105 0 1 0
+0.495157 -0.294872 -0.161046 -0.470048 0.882165 0.0289854
+0.359358 0.0704686 -0.371795 0 0 1
+0.27536 0.0583534 0.371795 0 0 1
+0.5 0.28306 0.200941 1 0 0
+-0.30231 -0.359172 0.320513 0 0 1
+-0.119679 -0.136741 0.320513 0 0 1
+0.362957 0.180226 -0.371795 0 0 1
+-0.481348 -0.294872 0.0332171 0 1 0
+-0.449173 0.352134 0.320513 0 0 1
+0.268956 -0.00313932 -0.247622 0.998643 -0.0479032 -0.0204316
+0.286668 -0.130183 -0.333333 0 0 1
+-0.083739 -0.261139 0.320513 0.0424724 -0.216703 0.975313
+0.152352 -0.371795 -0.236716 0 1 0
+0.203491 -0.0609437 0.371795 -0.125582 -0.000474174 0.992083
+0.117092 -0.256282 0.333311 0 1 0
+-0.0304621 0.228093 -0.333333 -0.121487 0.556404 0.821982
+0.195785 0.294872 0.25684 0 1 0
+0.141109 -0.329727 0.0787959 1 0 0
+-0.211375 0.24181 0.359876 -0.349472 0.936947 0
+-0.0750638 0.371795 0.256189 0 1 0
+0.202168 0.108443 0.371795 0 0 1
+-0.290234 0.150282 -0.333333 0 0 1
+0.5 -0.110159 -0.284939 1 0 0
+-0.5 -0.195121 -0.365759 0.961424 -0.005191 0.275022
+-0.203123 0.0411507 -0.333333 0.0373459 0.19921 0.979245
+0.271567 -0.371419 0.320513 0.0105983 -0.32953 0.944086
+-0.380965 0.371795 0.00828542 0 1 0
+0.170275 -0.269702 -0.371795 0 0 1
+-0.5 0.0598284 0.208393 1 0 0
+0.109726 0.371234 0.320513 0.046892 0.682953 0.728956
+0.191829 -0.0183614 -0.333333 -0.453894 -0.153621 0.877713
+0.0798981 -0.280898 0.320513 0 0 1
+0.0693553 0.256282 0.327277 -0.0569541 0.983391 0.172331
+0.142149 -0.3419 -0.371795 0.560959 -0.0166204 0.827677
+0.101104 0.22004 0.371795 0 0 1
+0.0856141 0.286428 0.320513 0 0 1
+0.5 -0.139994 0.169439 1 0 0
+-0.146708 -0.259445 0.320513 -0.00947183 -0.40633 0.913677
+-0.5 0.241027 -0.326819 1 0 0
+-0.5 -0.19912 -0.365343 0.945993 -0.0220948 0.323432
+-0.081702 0.371795 0.206868 0 1 0
+-0.340471 -0.143008 0.320553 -0.582509 -0.501596 0.639597
+0.470836 -0.0206705 -0.371795 0 0 1
+0.235382 0.0498285 0.371795 0 0 1
+-0.246522 0.0405675 -0.107449 -0.341051 0.940011 -0.00802344
+-0.0532412 0.365709 -0.371795 0 -0.430045 0.902807
+0.32112 0.294872 -0.326602 0 1 0
+0.402929 -0.371795 -0.335581 0 1 0
+-0.198088 -0.371795 -0.00789236 0 1 0
+0.122809 -0.294872 -0.0845564 0 1 0
+-0.5 -0.29094 0.127536 0.928567 0.341711 -0.144905
+0.0962091 0.13284 -0.333333 0 0 1
+-0.26732 0.371795 0.111428 0 1 0
+0.30446 -0.186571 -0.333333 0.193007 -0.165128 0.967203
+-0.5 0.103823 -0.123289 1 0 0
+0.0309219 0.328684 -0.371795 0 0 1
+0.5 0.149165 -0.360062 0.999226 -0.00893731 -0.0383136
+-0.112353 0.0492426 -0.333333 0 0 1
+0.138233 0.0868042 -0.333333 0 0 1
+0.203782 0.21711 -0.333333 0 0 1
+0.299567 -0.163592 -0.333333 0 0 1
+-0.328367 -0.371795 -0.254374 0 1 0
+-0.392106 -0.371795 -0.193683 0 1 0
+-0.5 0.154959 -0.218284 1 0 0
+0.0379731 -0.0589778 -0.333333 0 0 1
+-0.0526903 -0.294872 -0.110223 0 1 0
+0.0383607 0.201166 -0.333333 0 0 1
+0.388189 -0.371795 0.161289 0 1 0
+0.108338 0.0967829 -0.333333 0 0 1
+0.295337 -0.056606 -0.333333 0 0 1
+0.448718 -0.328742 -0.179775 1 0 0
+0.5 -0.175832 -0.117465 1 0 0
+0.164725 0.271344 -0.371795 0 0 1
+0.198712 -0.0210174 -0.118183 0.832832 0.553525 0
+-0.188853 0.0113437 -0.0601226 0.976452 0.215688 0.00441608
+-0.143928 0.371795 0.282953 0 1 0
+-0.141154 -0.30558 0.210748 0.998333 -0.0566247 -0.011193
+-0.422349 -0.274867 -0.371795 0 0 1
+-0.5 -0.0188026 -0.173888 1 0 0
+-0.187343 0.0046262 0.320513 0 0 1
+0.5 -0.239225 -0.0671038 1 0 0
+0.155477 -0.371795 -0.205955 0 1 0
+-0.499253 0.00779506 0.320513 0.784102 0.128097 -0.607269
+-0.296454 0.0212105 0.371795 0 0 1
+0.448718 -0.300501 -0.0141186 0.99372 -0.0694003 -0.0877773
+-0.210172 -0.371795 -0.0401403 0 1 0
+-0.460707 0.371795 -0.145048 0 1 0
+0.354089 -0.176664 0.320513 0 0 1
+-0.0592136 0.371795 -0.315766 0 1 0
+0.5 0.107931 0.283057 1 0 0
+0.429323 0.0228691 0.320513 0 0 1
+-0.46161 -0.146608 0.320513 0 0 1
+0.00860133 0.303851 -0.371795 0 0 1
+-0.237695 0.371795 0.141532 0 1 0
+-0.5 0.266899 -0.298378 1 0 0
+-0.5 -0.278447 -0.12277 1 0 0
+-0.5 0.188093 -0.180554 1 0 0
+-0.203336 0.0231773 0.365831 0.977935 -0.119718 0.171206
+-0.301374 -0.371795 0.122083 0 1 0
+0.095855 -0.294872 0.234711 0 1 0
+0.0792136 0.230897 -0.334006 0.115325 0.913048 0.391207
+-0.180109 -0.250316 0.357723 0.21255 0.97715 0
+0.247648 -0.00822413 0.371795 0 0 1
+-0.5 -0.0381715 -0.0940682 1 0 0
+0.5 0.103725 -0.00452391 1 0 0
+-0.498364 0.371795 -0.219821 -0.195259 0.980688 0.0111822
+0.363168 -0.371448 0.320513 0.0171935 0.757246 -0.652903
+-0.375655 0.371795 -0.0911863 0 1 0
+-0.5 -0.016601 0.025101 1 0 0
+-0.450003 -0.123036 -0.371795 0 0 1
+0.206221 0.294872 -0.290209 0 1 0
+-0.223986 0.371795 -0.0460657 0 1 0
+0.0311424 -0.294872 -0.269907 0 1 0
+-0.305747 -0.183972 0.349295 0.707109 0.707105 0
+-0.181651 -0.0723584 -0.333333 0 0 1
+-0.5 -0.197502 -0.052228 1 0 0
+0.0109696 -0.294872 -0.339239 0 1 0
+-0.216763 0.371795 0.115074 0 1 0
+0.448718 -0.342687 -0.0596134 1 0 0
+-0.121057 0.0699255 0.320513 0 0 1
+0.0678445 0.371795 -0.319873 0 1 0
+-0.162192 -0.164608 -0.333333 0 0 1
+-0.5 -0.166293 0.137678 1 0 0
+-0.5 0.071821 -0.265142 1 0 0
+-0.0837557 -0.230897 -0.334283 -0.086388 0.790547 -0.606278
+-0.326057 -0.00935357 0.371795 0 0 1
+-0.184826 -0.0661661 0.320513 0 0 1
+0.0368546 0.0700991 0.320513 0 0 1
+0.248362 -0.199992 -0.333333 0 0 1
+0.356207 0.122317 -0.371795 0 0 1
+0.5 -0.109751 -0.365595 0.894408 0.216261 -0.391491
+-0.434756 0.371795 -0.0755981 0 1 0
+0.5 -0.19104 -0.27235 1 0 0
+-0.123048 0.371795 0.126133 0 1 0
+0.104714 -0.256282 0.329617 -0.0360433 0.985345 -0.16672
+-0.490536 0.0368391 0.320513 -0.0804945 -0.0133528 0.996666
+-0.0440436 0.0395718 0.320513 0 0 1
+0.5 -0.176039 -0.131652 1 0 0
+-0.236979 -0.0430465 -0.0544865 0.10931 0.993887 0.0155029
+0.0248222 -0.0804409 0.320513 0 0 1
+0.5 -0.186565 0.0552914 1 0 0
+0.5 0.11987 -0.126783 1 0 0
+-0.359297 -0.371795 0.209405 0 1 0
+0.5 0.162491 -0.366491 0.983939 -0.0293509 -0.176074
+0.0690606 -0.294872 0.313327 0.0294926 0.997671 -0.0614979
+-0.0826463 0.371795 -0.252492 0 1 0
+0.292077 0.270281 0.320513 0 0 1
+0.305044 0.294872 0.0034417 0 1 0
+-0.10763 -0.294872 0.152954 0 1 0
+0.216158 0.294872 -0.214434 0 1 0
+-0.5 0.278924 0.0194077 1 0 0
+-0.5 0.262284 -0.25062 1 0 0
+-0.192008 0.371795 -0.14278 0 1 0
+-0.367474 0.371795 -0.339628 0 1 0
+0.31692 -0.371795 0.252057 0 1 0
+0.5 -0.0731606 -0.360177 1 -0.000154818 -0.000483264
+-0.0661558 0.371795 -0.286957 0 1 0
+0.5 -0.164333 -0.0648397 1 0 0
+-0.233876 0.0792753 0.371795 0 0 1
+0.217225 0.197907 0.371795 0 0 1
+-0.239937 -0.0156484 0.371795 0 0 1
+0.268591 0.294872 0.0674766 0 1 0
+0.141109 -0.336914 0.0668603 1 0 0
+0.0860726 -0.186008 0.356923 -0.439473 0.898212 0.00885336
+0.131739 0.371795 -0.328472 0 1 0
+-0.141154 -0.346339 -0.368226 0.951012 0.00554666 -0.309105
+0.201137 -0.0244806 -0.100321 0.766811 0.641811 -0.00893723
+0.484733 -0.142117 -0.371795 0 0 1
+0.104505 -0.172953 -0.333333 0 0 1
+0.270084 0.294872 0.110335 0 1 0
+-0.273857 0.00573513 -0.214445 0.990734 -0.135768 0.00365212
+-0.5 0.0383567 0.194121 1 0 0
+-0.448718 -0.357425 -0.049013 1 0 0
+-0.208906 -0.251848 0.320513 -0.0562207 -0.243536 0.968261
+0.314911 -0.371795 -0.126073 0 1 0
+-0.5 0.0129478 0.0828958 1 0 0
+-0.5 -0.220678 -0.265748 1 0 0
+-0.410776 0.371795 0.248497 0 1 0
+0.0460302 -0.256282 0.323699 0.0243987 -0.677485 0.735132
+0.223934 0.0623025 -0.333333 0 0 1
+-0.5 0.124054 0.0761158 1 0 0
+-0.351029 0.371795 0.10975 0 1 0
+0.298598 -0.371795 -0.319879 0 1 0
+-0.32694 -0.371795 0.0421509 0 1 0
+-0.5 -0.252826 0.0959164 1 0 0
+0.5 0.0956886 -0.279392 1 0 0
+-0.256019 -0.268566 0.320513 0 0 1
+-0.5 -0.000238497 -0.231348 1 0 0
+-0.5 0.159359 -0.162272 1 0 0
+-0.188099 0.359288 0.320513 0 0 1
+0.466572 -0.0449662 -0.371795 0 0 1
+0.486982 -0.294872 -0.249753 0 1 0
+-0.256865 -0.221002 0.348653 0.482361 0.875973 0
+-0.238476 0.219992 -0.333333 0 0 1
+0.351666 0.0108655 -0.371795 0 0 1
+-0.156381 0.371795 -0.278406 0 1 0
+-0.114412 -0.294872 -0.17043 0 1 0
+-0.5 -0.00192585 0.216987 1 0 0
+0.277875 0.234232 0.320513 0 0 1
+-0.5 0.235365 0.094784 1 0 0
+0.12671 0.301285 -0.371795 0 0 1
+-0.149575 0.371795 -0.1263 0 1 0
+-0.0886226 -0.294872 -0.183072 0 1 0
+0.5 0.1225 -0.0401633 1 0 0
+0.254815 -0.371795 0.299595 0 1 0
+-0.5 -0.00504367 0.226849 1 0 0
+0.226752 0.03811 -0.119381 -0.10664 0.994099 0.0198641
+0.0433911 -0.180587 0.320513 0 0 1
+-0.5 0.191941 -0.0552518 1 0 0
+-0.5 -0.215891 -0.102104 1 0 0
+-0.211763 -0.143873 0.371795 0 0 1
+0.0988669 -0.294872 0.0101641 0 1 0
+0.229055 -0.371795 -0.0423407 0 1 0
+-0.216467 -0.0411234 -0.176539 -0.321399 0.94678 -0.0176077
+0.448718 -0.356361 -0.16351 1 0 0
+0.308869 0.0316326 0.371795 0 0 1
+-0.5 -0.0367805 -0.254074 1 0 0
+0.129538 0.0905374 0.320513 0 0 1
+0.141109 -0.363872 0.21183 0.990423 0.136416 0.0212969
+-0.5 0.215185 0.150662 1 0 0
+0.399126 0.294872 -0.0353585 0 1 0
+-0.284761 -0.298997 0.320513 0 0 1
+0.5 0.160456 -0.295273 1 0 0
+-0.286607 0.371795 -0.093544 0 1 0
+-0.5 -0.0103935 -0.085924 1 0 0
+0.5 0.0432149 -0.0650995 1 0 0
+-0.197882 -0.335732 0.320513 0 0 1
+0.354253 -0.185617 -0.371795 0 0 1
+0.341986 0.294872 0.242678 0 1 0
+-0.141845 -0.233082 0.371795 0 0 1
+-0.431525 0.312756 0.320513 0 0 1
+0.184576 -0.0677977 0.320513 -0.0875896 0.0416269 0.995287
+0.5 -0.0860417 -0.257922 1 0 0
+0.00257817 -0.294872 -0.143527 0 1 0
+0.493208 0.280202 -0.371795 -0.0724355 -0.0132491 0.997285
+0.5 -0.0368542 -0.153089 1 0 0
+-0.448718 -0.307306 -0.198311 1 0 0
+0.223833 -0.371795 -0.342005 0 1 0
+-0.141154 -0.322781 0.0742193 1 0 0
+0.5 -0.236879 -0.17306 1 0 0
+0.442672 -0.371795 0.103567 -0.555462 0.824724 0.10626
+0.141026 0.3015 -0.135076 0.957024 0.263984 -0.120072
+-0.5 -0.265657 -0.267998 1 0 0
+0.263738 0.294872 -0.337836 0 1 0
+0.216557 -0.22415 -0.333333 0.0424161 -0.310243 0.949711
+0.447001 -0.371795 -0.0430314 -0.213428 0.975596 -0.0515734
+-0.203729 -0.371795 -0.227072 0 1 0
+0.302326 0.294872 0.234655 0 1 0
+-0.166549 -0.286877 -0.371795 0 0 1
+0.222141 0.294872 -0.00720649 0 1 0
+-0.5 0.113431 -0.275808 1 0 0
+-0.21794 0.371795 0.0821637 0 1 0
+0.448718 -0.353852 0.0714159 1 0 0
+-0.0907756 0.246609 0.371795 -0.00736465 0.120152 0.992728
+0.100667 0.325795 -0.371795 0 0 1
+-0.472215 0.371795 -0.296355 0 1 0
+0.404717 0.294872 -0.00210798 0 1 0
+0.423101 0.103306 0.320513 0 0 1
+-0.488204 -0.294872 -0.227785 0 1 0
+-0.105575 0.371795 -0.14406 0 1 0
+-0.448506 -0.302673 -0.371795 0.597094 0.303247 0.742644
+0.222233 -0.332005 -0.371795 0 0 1
+-0.404593 0.371795 0.123689 0 1 0
+-0.141154 -0.365221 0.210538 0.984024 -0.171321 -0.0484252
+-0.288681 -0.371795 -0.287927 0 1 0
+-0.191636 -0.0188299 -0.321682 0.930717 -0.357887 0.0753863
+-0.0582721 0.371795 0.112834 0 1 0
+-0.5 0.173261 0.112387 1 0 0
+-0.265445 0.0951732 -0.333333 0 0 1
+0.250266 -0.371795 0.267876 0 1 0
+-0.5 0.250061 -0.0772459 1 0 0
+0.280652 -0.148629 -0.333333 0 0 1
+-0.448718 -0.301407 0.0454906 0.97985 0.199735 0
+0.258229 -0.0267262 -0.304795 0.727663 -0.68592 0.00454745
+-0.46845 -0.294872 -0.164471 0 1 0
+0.174352 -0.318826 -0.371795 0 0 1
+-0.438634 0.334498 0.320513 0 0 1
+0.5 0.0808651 -0.369868 0.775463 0.0127628 -0.631264
+0.0160235 0.357988 -0.371795 0 0 1
+-0.0833385 -0.294872 0.0664764 0 1 0
+-0.341697 -0.0109485 0.371795 0 0 1
+-0.5 0.110203 0.0240388 1 0 0
+-0.116326 -0.294872 0.278878 0 1 0
+-0.5 -0.214626 -0.337374 1 0 0
+-0.441357 0.371795 0.240726 0 1 0
+-0.171536 -0.111439 0.361113 0.836828 0.546868 0.0255699
+0.261713 -0.371795 -0.00167953 0 1 0
+-0.5 0.364299 0.090604 0.995835 -0.0786173 0.0461672
+-0.41287 0.371795 -0.144786 0 1 0
+0.438622 0.196224 -0.371795 0 0 1
+-0.478328 0.371795 -0.0622063 0 1 0
+0.5 -0.0898415 0.158972 1 0 0
+-0.249639 0.039114 -0.310628 -0.442007 0.897011 0.00145887
+0.178057 -0.250763 0.352998 -0.212563 0.977147 0
+-0.251716 -0.371795 -0.0778446 0 1 0
+-0.141154 -0.318856 -0.141862 1 0 0
+0.5 -0.250014 0.317912 0.674493 0.102202 0.731173
+0.121832 0.371795 -0.345279 0 1 0
+-0.5 -0.152446 -0.220995 1 0 0
+0.5 -0.135663 -0.0857008 1 0 0
+-0.5 0.17211 -0.130095 1 0 0
+0.313091 -0.371795 0.00212364 0 1 0
+0.316294 0.22025 0.320513 0 0 1
+0.5 -0.288106 -0.18074 0.994695 -0.100403 0.0223755
+-0.286118 0.371795 -0.0344097 0 1 0
+0.141109 -0.322136 0.210141 1 0 0
+0.5 0.265953 0.109898 1 0 0
+0.10241 0.177167 0.348618 0.475927 0.879485 0
+0.117245 0.167958 0.340568 0.607463 0.794348 0
+-0.47388 0.371795 -0.337251 0 1 0
+-0.205729 -0.035478 -0.306265 -0.594416 0.804118 0.00801429
+-0.0810236 -0.258502 0.320513 -0.035236 -0.36317 0.931056
+-0.141154 -0.342813 0.0859654 1 0 0
+0.223294 0.0267979 0.00633039 -0.13135 0.486514 0.863742
+-0.373047 -0.313894 0.320513 0 0 1
+0.5 -0.0469669 0.129063 1 0 0
+-0.42649 -0.247878 -0.371795 0 0 1
+-0.375924 0.349545 0.320513 0 0 1
+0.0306013 0.371795 -0.335829 0 1 0
+0.437681 -0.371795 0.0369968 -0.00301364 0.999995 -0.000198951
+-0.5 -0.164987 -0.272428 1 0 0
+-0.5 0.322736 0.312171 0.991119 -0.0175142 -0.131818
+-0.0574925 -0.294872 -0.0481335 0 1 0
+0.0599272 0.371795 0.23992 0 1 0
+0.326255 0.161998 0.357924 0.794872 0.606778 0
+0.5 0.18084 -0.221521 1 0 0
+0.270642 -0.371795 -0.0205021 0 1 0
+-0.195587 -0.301268 0.320513 0 0 1
+0.141109 -0.341716 -0.300707 1 0 0
+0.5 0.0208854 0.101285 1 0 0
+0.460157 0.294872 -0.0818248 0 1 0
+0.5 -0.217975 -0.0646949 1 0 0
+0.0555803 0.371795 -0.128259 0 1 0
+0.218169 -0.230897 -0.349773 0 1 0
+0.121941 -0.00521581 -0.333333 0 0 1
+0.0406418 -0.294872 0.281425 0 1 0
+-0.1974 -0.371795 -0.303689 0 1 0
+-0.255677 -0.248826 0.320513 0 0 1
+-0.5 0.125339 -0.361583 1 0 0
+0.197688 0.0195546 -0.207738 0.860712 -0.508117 -0.0315117
+0.421685 0.294872 0.245571 0 1 0
+-0.141154 -0.350536 0.251861 1 0 0
+-0.187286 0.00122583 -0.149821 0.99957 0.0285356 -0.00676108
+-0.24502 -0.0411372 -0.0768385 0.281333 0.95961 0
+0.0626487 -0.294872 -0.284295 0 1 0
+0.5 0.130058 -0.359506 0.998816 0.0259998 -0.0411249
+-0.5 -0.0609768 -0.247196 1 0 0
+0.5 -0.261688 -0.370818 0.82058 0.0395777 -0.570159
+-0.202528 0.371795 0.279119 0 1 0
+-0.320353 0.371795 -0.370715 -0.0613264 0.710811 -0.700705
+0.448718 -0.307908 0.132604 0.999823 -0.0187986 -0.00115379
+-0.189952 -0.0869025 0.371795 0.144067 0.0813815 0.986216
+0.345128 0.294872 0.0391137 0 1 0
+-0.255252 -0.0358676 -0.184902 0.602608 0.79802 0.00536493
+0.141026 0.303364 0.139892 0.992495 0.121286 0.0156065
+0.0538087 0.346507 0.320513 0 0 1
+-0.197127 -0.371795 0.255033 0 1 0
+-0.372683 -0.369344 -0.371795 0 0.621704 0.783252
+-0.280817 -0.371795 0.0952755 0 1 0
+-0.11801 -0.158665 -0.333333 0 0 1
+-0.218693 -0.371795 -0.296677 0 1 0
+-0.141154 -0.33687 0.309369 0.999574 -0.00028177 0.0291865
+-0.328415 -0.371795 0.267181 0 1 0
+0.174727 -0.371795 -0.358626 0 1 0
+0.22664 0.184087 0.371795 0 0 1
+0.412019 -0.0722222 0.320513 0 0 1
+0.0413225 0.104087 -0.333333 0 0 1
+-0.488077 -0.289068 0.320513 -0.138354 -0.348265 0.92713
+-0.5 -0.154073 -0.199146 1 0 0
+-0.21538 -0.240317 0.346898 0.349458 0.936952 0
+0.5 0.110763 -0.142741 1 0 0
+-0.228223 -0.043367 -0.086367 -0.100135 0.993795 0.0484145
+-0.377919 0.371795 -0.0518611 0 1 0
+0.417847 0.104881 -0.371795 0 0 1
+0.5 0.063332 -0.243361 1 0 0
+-0.242826 -0.333594 0.320513 0 0 1
+-0.5 0.338551 -0.19764 1 0 0
+-0.448718 -0.345092 -0.0839201 1 0 0
+0.146147 -0.371795 -0.27515 0.150397 0.987722 0.0422676
+-0.445563 -0.371795 -0.188328 0.0661231 0.997714 -0.0139602
+0.0672351 0.346329 -0.371795 0 0 1
+0.5 -0.145459 -0.0588158 1 0 0
+0.448718 0.290111 0.320513 -0.0373718 0.318561 0.947165
+-0.5 -0.113913 -0.304831 1 0 0
+0.429867 0.268442 -0.371795 0 0 1
+-0.0769196 0.0362099 -0.333333 0 0 1
+0.441689 -0.371795 -0.217453 -0.155042 0.987723 -0.0190948
+-0.312851 -0.371795 -0.30669 0 1 0
+0.136286 -0.294872 -0.114313 0.287304 0.907656 -0.305968
+-0.320513 0.15274 -0.3701 0.821879 -0.0634569 -0.566117
+-0.0529662 -0.0627959 0.320513 0 0 1
+-0.0651085 0.371795 -0.153055 0 1 0
+0.5 -0.237925 0.121646 1 0 0
+0.288274 -0.199494 0.336282 -0.602967 0.797766 0
+0.0685979 0.371795 -0.042111 0 1 0
+-0.250456 0.200976 -0.333333 0 0 1
+-0.5 -0.164816 0.0381061 1 0 0
+-0.387078 -0.371795 0.272643 0 1 0
+-0.283356 -0.371795 -0.218948 0 1 0
+0.176341 0.104085 0.364438 0.831609 0.54037 -0.128165
+0.5 -0.0448242 0.0173846 1 0 0
+-0.42893 -0.371795 0.168661 0 1 0
+-0.292655 -0.0642312 -0.333333 0 0 1
+0.5 -0.0284228 0.303268 1 0 0
+-0.163566 -0.223054 0.371795 0 0 1
+-0.0937654 0.371795 -0.00390312 0 1 0
+0.162323 -0.0243614 -0.333333 0 0 1
+-0.402007 0.371795 -0.166124 0 1 0
+-0.322095 -0.371795 0.00564868 0 1 0
+0.5 -0.0201145 -0.0152554 1 0 0
+-0.359647 -0.285423 -0.371795 0 0 1
+-0.5 0.0950156 -0.246769 1 0 0
+-0.200592 0.371795 -0.118217 0 1 0
+-0.384024 -0.366472 0.320513 0.106081 -0.36311 0.925688
+0.194557 -0.0128936 -0.0353766 0.939129 0.343238 0.0149833
+0.377196 0.220783 0.320513 0 0 1
+0.5 0.204136 -0.0173247 1 0 0
+0.35624 0.118997 0.320513 0.333429 0.31627 0.888143
+0.5 0.00178742 -0.32186 1 0 0
+-0.300912 -0.310359 -0.371795 0 0 1
+0.0814303 -0.294872 -0.115602 0 1 0
+0.0334125 -0.294872 0.0418538 0 1 0
+-0.131279 0.371795 -0.244654 0 1 0
+0.352049 -0.055504 -0.371795 0 0 1
+-0.0721786 -0.294872 0.0950715 0 1 0
+0.5 0.205474 0.186779 1 0 0
+-0.102949 -0.111893 -0.333333 0 0 1
+-0.061012 0.245288 0.371795 0 0 1
+0.156739 -0.224195 -0.333333 -0.128752 -0.216498 0.967756
+-0.5 0.0198954 -0.0738465 1 0 0
+0.5 0.163078 0.251257 1 0 0
+0.448718 -0.331824 -0.264417 1 0 0
+-0.39453 -0.0470602 0.320513 0 0 1
+0.118049 -0.17874 -0.333333 0 0 1
+-0.269228 -0.207504 0.371795 -0.0939352 -0.107156 0.989795
+0.5 0.150182 -0.176923 1 0 0
+0.141109 -0.306829 -0.225703 1 0 0
+0.194683 -0.0579392 0.320513 -0.622506 0.258887 0.738555
+0.171996 -0.371795 0.295579 0 1 0
+-0.473808 -0.294872 -0.226331 0 1 0
+0.5 -0.168026 0.299686 1 0 0
+-0.216623 -0.0411653 -0.184132 -0.312343 0.949903 0.0112144
+0.249318 -0.230396 -0.355538 -0.0849874 0.996358 0.00695349
+0.301943 0.133554 -0.333333 0 0 1
+0.325772 -0.128283 0.371795 0 0 1
+0.414767 -0.371795 -0.189511 0 1 0
+0.0509757 0.182838 0.320513 0 0 1
+0.0755226 -0.131057 0.320513 0 0 1
+0.257215 -0.347358 0.320513 0 0 1
+-0.0910859 0.371795 -0.209303 0 1 0
+-0.0568891 0.371795 -0.037976 0 1 0
+-0.5 0.327372 0.199276 1 0 0
+-0.240806 0.371795 -0.270862 0 1 0
+0.141026 0.34741 0.00803894 1 0 0
+-0.394053 0.371795 -0.143141 0 1 0
+-0.314498 0.33746 -0.371795 0 0 1
+0.289467 0.294872 -0.312955 0 1 0
+-0.16762 -0.0705822 -0.333333 0 0 1
+-0.391632 -0.239755 0.320513 0 0 1
+0.204313 0.0277289 -0.202788 -0.694191 0.719623 0.0155436
+-0.350874 -0.338856 -0.371795 0 0 1
+0.226326 -0.220575 -0.333333 -0.000709749 -0.0495374 0.998772
+0.0107962 -0.294872 0.0787173 0 1 0
+0.0293116 0.0102325 -0.333333 0 0 1
+0.37232 -0.237078 -0.371795 0 0 1
+-0.448718 -0.312876 0.298271 1 0 0
+0.141109 -0.295886 -0.204374 0.779932 0.608229 0.147524
+-0.161534 0.371795 -0.217402 0 1 0
+0.480334 0.0318927 0.320513 0 0 1
+0.5 0.125887 0.187091 1 0 0
+0.443293 -0.371795 0.206855 -0.218741 0.975775 -0.00395174
+0.36604 -0.322032 0.320513 0 0 1
+-0.337279 -0.371795 0.185708 0 1 0
+0.337737 0.294872 -0.232343 0 1 0
+0.0551565 0.371795 -0.342805 0 1 0
+0.106515 -0.29091 0.320513 0.00930611 -0.243799 0.969781
+0.162876 -0.371795 -0.0339661 0 1 0
+0.038052 -0.0101575 0.320513 0 0 1
+-0.0269371 -0.294872 -0.282115 0 1 0
+0.448718 -0.358283 -0.0169649 1 0 0
+0.0372441 0.371795 -0.369185 -0.0361656 -0.679562 0.732726
+0.208939 0.0622531 0.371795 0 0 1
+0.183204 0.294872 -0.270229 0 1 0
+0.454015 0.294872 0.279436 0 1 0
+-0.372396 -0.0767887 0.320647 0.896025 0.378493 -0.232127
+0.0806846 -0.294872 -0.0451071 0 1 0
+-0.10687 0.120387 0.320513 0 0 1
+-0.141154 -0.311668 -0.288954 1 0 0
+0.5 0.291153 -0.136437 0.811093 0.466959 -0.352246
+0.259629 0.0253253 -0.0456945 0.757543 0.652785 -0.00104686
+-0.466253 0.371795 -0.153378 0 1 0
+-0.300352 0.0100963 -0.333333 0 0 1
+0.451855 -0.0782562 -0.371795 0 0 1
+0.499974 -0.294872 0.123297 0.777748 -0.628472 0.0114141
+-0.0167948 -0.235472 0.371795 0 0 1
+-0.211165 0.371795 -0.298159 0 1 0
+-0.448718 -0.30136 -0.119865 0.993054 0.114973 -0.0249999
+0.5 0.00652152 -0.307006 1 0 0
+0.0903159 0.371795 -0.200478 0 1 0
+-0.5 0.0699394 -0.287414 1 0 0
+-0.5 0.290724 -0.30877 1 0 0
+0.5 0.0790967 0.105737 1 0 0
+-0.150834 -0.371795 0.312465 -0.0354977 0.973053 -0.227833
+-0.474252 0.280913 0.320513 0 0 1
+0.5 -0.131278 -0.195518 1 0 0
+-0.225905 0.236391 0.367357 -0.43519 0.830369 0.347989
+0.141026 0.338148 -0.0375635 1 0 0
+-0.241802 -0.371795 0.247693 0 1 0
+-0.5 -0.293264 0.252367 0.950612 0.307435 -0.0426733
+-0.239952 -0.311846 0.320513 0 0 1
+0.5 0.0157978 -0.240259 1 0 0
+-0.247535 -0.371795 0.0322226 0 1 0
+0.464729 -0.2619 0.320513 0 0 1
+-0.0950556 -0.0387384 -0.333333 0 0 1
+-0.213327 -0.0393075 -0.0349984 -0.393982 0.812069 -0.430491
+0.373502 -0.346936 -0.371795 0 0 1
+-0.448718 -0.352494 -0.231318 1 0 0
+0.390575 -0.0830652 0.320513 0 0 1
+-0.0184561 0.227691 0.371795 0 0 1
+0.192375 -0.000771332 -0.154865 0.99943 0.0307262 0.0140162
+0.453508 0.248553 -0.371795 0 0 1
+-0.245381 -0.322593 -0.371795 0 0 1
+0.038022 0.371795 -0.28645 0 1 0
+-0.334689 0.313298 -0.371795 0 0 1
+0.243086 0.0363664 -0.163103 0.295609 0.955179 -0.0157665
+-0.0461177 0.371795 0.0967484 0 1 0
+0.5 0.257344 -0.330156 1 0 0
+0.231278 0.294872 -0.0182798 0 1 0
+0.335325 0.130581 0.371795 0 0 1
+0.340449 -0.0211065 -0.371795 0 0 1
+-0.183376 0.371795 0.298518 0 1 0
+0.0865979 -0.256282 0.344838 0 1 0
+-0.0554204 -0.0536135 -0.333333 0 0 1
+0.5 0.0276719 0.233479 1 0 0
+-0.374521 -0.0702961 0.343832 0.962697 0.270331 0.0116492
+0.026454 -0.294872 0.0594344 0 1 0
+-0.392656 0.250546 -0.371795 0 0 1
+0.5 -0.0843867 0.319056 0.611739 -0.137183 0.779074
+0.203464 -0.127254 -0.333333 0 0 1
+-0.463229 -0.0836655 0.320513 0 0 1
+-0.5 -0.0594596 -0.323502 1 0 0
+0.110184 -0.294872 -0.0291838 0 1 0
+0.163121 0.0466198 0.320513 0 0 1
+0.0952782 0.125585 0.320513 0 0 1
+-0.138032 -0.0484904 0.320513 0 0 1
+0.327023 0.172029 0.320513 0.135068 0.401474 0.905856
+0.233478 -0.0382245 -0.13868 -0.0659909 0.997535 -0.0238715
+-0.5 -0.249922 0.042587 1 0 0
+0.410391 -0.0932337 -0.371795 0 0 1
+-0.403691 -0.371795 0.0146557 0 1 0
+0.345124 -0.371795 0.000953167 0 1 0
+-0.5 0.14391 0.291814 1 0 0
+0.443444 -0.371795 0.238202 -0.264738 0.963953 0.0266115
+-0.340955 -0.0438959 -0.371795 0 0 1
+0.181259 0.142973 0.371795 0 0 1
+0.5 0.0323967 -0.369892 0.859261 -0.0314064 -0.510573
+0.122737 0.371795 -0.290922 0 1 0
+-0.410503 -0.371795 -0.0292734 0 1 0
+-0.074533 -0.199087 -0.333333 0 0 1
+-0.497867 0.371795 -0.347041 -0.701572 0.709292 -0.0685722
+0.141109 -0.340103 0.137626 1 0 0
+-0.0213083 -0.294872 -0.204956 0 1 0
+0.5 0.100137 0.214767 1 0 0
+-0.244969 -0.371795 0.119499 0 1 0
+0.0868406 0.371795 -0.0646044 0 1 0
+-0.5 0.0175401 0.303857 1 0 0
+0.141109 -0.35653 0.222677 1 0 0
+-0.439641 -0.174144 -0.371795 0 0 1
+-0.416009 -0.235934 0.320513 0 0 1
+0.141109 -0.315394 -0.234392 1 0 0
+0.0495765 -0.184325 0.320513 0 0 1
+-0.448718 -0.309636 0.103154 1 0 0
+0.141109 -0.316541 -0.0224413 1 0 0
+-0.295349 0.371795 0.241694 0 1 0
+0.216653 -0.0356936 -0.241125 0.330266 0.943708 0.0184611
+0.384283 -0.371795 -0.186068 0 1 0
+-0.162649 0.136547 -0.333333 0 0 1
+0.258389 0.294872 -0.305751 0 1 0
+0.0549151 -0.294872 -0.225632 0 1 0
+-0.5 -0.0431183 -0.233169 1 0 0
+0.259238 -0.025717 -0.145124 0.755413 -0.655249 0
+-0.272482 0.371795 0.145328 0 1 0
+0.41271 0.294872 0.204107 0 1 0
+0.141026 0.324112 -0.13416 1 0 0
+-0.481046 -0.234145 -0.371795 0 0 1
+0.382268 -0.0258417 0.371795 0.737591 -0.166752 0.654334
+0.448718 -0.321288 0.202708 1 0 0
+0.028828 -0.243238 0.371795 0 0 1
+0.49646 0.177249 0.320513 0.230946 -0.0419287 0.972063
+-0.383475 -0.371795 -0.305189 0 1 0
+0.443216 0.052111 0.320513 0 0 1
+-0.130164 -0.194485 -0.333333 0 0 1
+-0.5 -0.0886114 -0.0462144 1 0 0
+-0.221667 -0.106463 -0.333333 0 0 1
+0.00551477 0.371795 -0.0795118 0 1 0
+0.141026 0.321042 -0.257418 1 0 0
+0.173375 0.294872 0.31639 -0.159206 0.929954 0.331419
+0.486514 -0.0344692 -0.371795 0 0 1
+0.0938985 -0.294872 -0.35483 0 1 0
+0.0177472 -0.294872 0.14495 0 1 0
+-0.279699 -0.174406 0.371795 0 0 1
+0.141026 0.360455 0.21381 0.996607 0.0821349 0.0052986
+0.0165452 0.371795 -0.121434 0 1 0
+0.375205 -0.0671531 0.357912 0.972902 -0.231202 -0.00274182
+0.365484 -0.371795 0.249561 0 1 0
+0.448718 -0.297122 0.255175 0.916947 -0.398452 -0.021068
+0.5 -0.20755 -0.115727 1 0 0
+0.5 0.135752 0.0402083 1 0 0
+0.446341 0.206684 -0.371795 0 0 1
+0.359898 -0.238904 -0.371795 0 0 1
+0.201462 -0.371795 -0.0633597 0 1 0
+0.186414 0.214743 -0.333333 0 0 1
+0.5 -0.0673195 0.0262505 1 0 0
+-0.5 -0.0418627 0.213691 1 0 0
+-0.174837 0.303316 -0.371795 0 0 1
+-0.371047 -0.0659193 -0.371795 0 0 1
+-0.5 -0.238332 -0.105006 1 0 0
+-0.5 -0.0232388 0.183768 1 0 0
+0.35081 -0.371795 0.304697 0 1 0
+-0.449946 0.00734185 -0.371795 0 0 1
+-0.5 -0.110391 -0.171859 1 0 0
+-0.5 0.0200528 -0.370297 0.810901 -0.0899057 0.578235
+0.167088 -0.371795 -0.114728 0 1 0
+0.279426 -0.371795 -0.357897 0 1 0
+0.291517 -0.281315 -0.371795 0 0 1
+0.332167 0.193249 0.320513 0 0 1
+-0.320513 0.0661337 -0.370152 0.799899 -0.175627 -0.573862
+0.0492261 -0.294872 -0.1826 0 1 0
+0.118704 -0.166822 0.358441 -0.614219 0.789136 0
+-0.45074 0.371795 -0.357859 0 1 0
+-0.475351 -0.294872 -0.0589874 0 1 0
+-0.301444 0.355421 0.320513 0 0 1
+0.269098 0.294872 -0.10073 0 1 0
+0.173251 0.0104531 0.320513 0 0 1
+-0.491216 0.119031 0.320513 -0.0752835 0.0230086 0.996897
+-0.489009 -0.161185 -0.371795 0 0 1
+0.469634 0.294872 0.289449 0 1 0
+-0.324683 0.371795 0.126582 0 1 0
+-0.5 -0.148633 -0.333286 1 0 0
+0.497939 0.294872 0.132711 0.581199 0.802917 0.132407
+-0.5 0.237006 0.210043 1 0 0
+0.0655254 -0.294872 0.0799316 0 1 0
+-0.448718 -0.347125 -0.361513 0.999626 0.00229442 0.0272477
+0.5 -0.0375012 0.148849 1 0 0
+0.141026 0.31681 -0.235567 1 0 0
+-0.345388 -0.0846198 -0.371795 0 0 1
+-0.15376 0.371795 -0.273479 0 1 0
+0.493235 -0.264401 0.320513 0.13954 -0.0143461 0.990113
+-0.00937965 -0.0891175 -0.333333 0 0 1
+-0.0939674 0.059224 0.320513 0 0 1
+0.395523 0.134772 -0.371795 0 0 1
+-0.325953 -0.292621 -0.371795 0 0 1
+-0.5 0.190746 0.209485 1 0 0
+-0.0738172 0.15759 -0.333333 0 0 1
+0.355022 -0.371795 -0.108689 0 1 0
+-0.5 0.348866 -0.162626 1 0 0
+-0.312293 -0.0597388 0.371795 0 0 1
+0.203564 0.27311 0.320513 0 0 1
+0.448718 -0.332664 0.0999463 1 0 0
+0.18898 0.0784001 0.346223 0.915775 0.401691 0
+0.5 -0.170092 -0.201576 1 0 0
+0.24271 0.138745 -0.333333 0 0 1
+-0.368949 0.371795 -0.261491 0 1 0
+0.234105 -0.371795 0.147408 0 1 0
+-0.5 0.280308 0.177751 1 0 0
+-0.0693632 0.0752036 0.320513 0 0 1
+-0.141154 -0.357683 0.186738 1 0 0
+0.334428 0.294872 -0.28047 0 1 0
+-0.484217 0.371795 -0.28867 0 1 0
+-0.249623 0.223845 -0.333333 -0.10546 0.35464 0.929036
+0.0863997 0.299411 -0.371795 0 0 1
+-0.324047 -0.371795 -0.10071 0 1 0
+-0.46168 0.371795 -0.0355509 0 1 0
+-0.278372 -0.162224 0.371795 0 0 1
+0.141109 -0.339273 -0.250667 1 0 0
+0.5 -0.267501 -0.0130508 1 0 0
+-0.0371455 -0.294872 -0.0305008 0 1 0
+0.233721 0.0382033 -0.0275274 0.113541 0.993516 0.00588954
+0.448718 -0.299241 -0.115612 0.721847 -0.691826 -0.0177082
+-0.425436 0.371795 -0.173278 0 1 0
+0.5 0.122483 -0.133992 1 0 0
+0.113014 0.149418 0.320513 0 0 1
+-0.202771 -0.371795 0.223882 0 1 0
+-0.0489436 -0.0626079 -0.333333 0 0 1
+0.311715 -0.122969 -0.333333 0.0793769 0.0202117 0.99664
+-0.407743 0.215484 0.320513 0 0 1
+0.228229 -0.371795 0.261328 0 1 0
+-0.0764966 0.256282 0.363209 -0.0315631 0.974823 0.220733
+-0.435467 0.371795 0.124609 0 1 0
+0.448718 -0.344422 -0.101232 1 0 0
+-0.5 0.240612 -0.283806 1 0 0
+0.211235 0.230897 -0.366792 -0.0119365 0.961005 0.276273
+-0.330766 -0.219308 -0.371795 0 0 1
+-0.338208 0.371795 0.00351166 0 1 0
+0.141026 0.306602 0.211769 1 0 0
+-0.210949 0.0362745 0.371795 0.0323384 0.00614471 0.999458
+0.491873 -0.248725 0.320513 0.22455 0.0651567 0.972282
+0.252448 -0.19175 -0.333333 0 0 1
+0.5 -0.211143 -0.176933 1 0 0
+0.164056 -0.371795 -0.146655 0 1 0
+-0.134359 0.234184 0.371795 0 0 1
+-0.18607 -0.371795 -0.0538144 0 1 0
+-0.5 -0.257794 -0.206589 1 0 0
+-0.119057 0.230897 -0.344635 0 1 0
+0.171727 0.294872 0.136803 0 1 0
+-0.0675838 -0.0221526 -0.333333 0 0 1
+-0.5 0.173428 -0.146807 1 0 0
+-0.5 -0.23673 0.170067 1 0 0
+0.141026 0.33627 0.267808 1 0 0
+0.288478 0.294872 -0.369729 -0.0200641 0.839482 -0.543017
+0.5 -0.14171 0.0100114 1 0 0
+0.422741 -0.234836 -0.371795 0 0 1
+0.0436701 -0.268468 0.320513 0 0 1
+0.5 -0.122045 0.29128 1 0 0
+0.0581268 -0.294872 -0.281943 0 1 0
+0.120253 0.371795 0.0422 0 1 0
+0.196622 0.0146903 0.320513 -0.154474 -0.00904256 0.987955
+-0.0517999 -0.294872 -0.00946982 0 1 0
+-0.421097 0.130348 -0.371795 0 0 1
+-0.126278 -0.294872 -0.0139357 0 1 0
+0.5 -0.0487945 0.0748202 1 0 0
+-0.448718 -0.345076 0.0262969 1 0 0
+0.1528 -0.134714 -0.333333 0 0 1
+0.254682 0.225387 -0.333333 0.261251 0.481497 0.836606
+0.141109 -0.295651 -0.259906 0.676284 0.731023 0.0908028
+-0.0808421 0.371795 -0.127773 0 1 0
+0.248094 -0.200281 0.371795 0 0 1
+-0.478406 -0.263225 0.320513 0 0 1
+-0.0785102 0.371795 0.189681 0 1 0
+0.138635 -0.0663823 0.320513 0 0 1
+-0.5 0.302641 -0.0261701 1 0 0
+-0.378955 -0.371795 0.254719 0 1 0
+-0.448718 -0.325649 -0.00404301 1 0 0
+0.192327 0.000212937 -0.270112 0.99992 -0.0126559 0.000346635
+-0.335043 -0.371795 -0.352287 0 1 0
+-0.0122973 0.371795 -0.103199 0 1 0
+0.5 0.0719958 -0.149297 1 0 0
+0.353398 0.294872 -0.125734 0 1 0
+0.032117 0.202024 0.328783 0.1646 0.962898 -0.213856
+-0.344015 -0.256642 -0.371795 0 0 1
+0.154293 0.294872 -0.0689642 0 1 0
+0.199954 0.0227918 -0.26512 0.795717 -0.605405 -0.0178656
+-0.207819 -0.371795 -0.222701 0 1 0
+0.0357787 0.286469 -0.371795 0 0 1
+-0.177473 -0.371795 0.239679 0 1 0
+0.5 -0.252826 0.0674333 1 0 0
+0.5 -0.134891 0.0723187 1 0 0
+0.5 0.248707 0.201083 1 0 0
+-0.382145 -0.371795 -0.15372 0 1 0
+0.5 -0.0307922 0.304599 1 0 0
+-0.491669 0.156091 -0.371795 0.187124 0.0186344 0.982159
+-0.5 0.0977957 0.302244 1 0 0
+0.141109 -0.328178 0.289346 1 0 0
+-0.204123 -0.312919 0.320513 0 0 1
+-0.110359 0.0934176 -0.333333 0 0 1
+-0.5 0.279309 -0.161016 1 0 0
+-0.118504 0.166978 0.325028 -0.545664 0.731928 -0.408084
+0.485249 0.294872 0.104473 0 1 0
+-0.5 0.330434 0.260439 1 0 0
+-0.0554577 -0.294872 -0.121802 0 1 0
+-0.213168 0.371795 -0.301941 0 1 0
+0.5 -0.23031 -0.00493933 1 0 0
+0.416098 -0.371795 0.303561 0 1 0
+-0.5 -0.00901918 -0.19226 1 0 0
+0.141026 0.310957 0.306276 1 0 0
+-0.276767 -0.101452 -0.333333 0 0 1
+0.432432 -0.371795 0.0784405 0 1 0
+0.5 -0.218795 -0.277373 1 0 0
+-0.141154 -0.322646 0.0204754 1 0 0
+0.190411 -0.042357 -0.333333 0 0 1
+-0.417416 0.371795 -0.33067 0 1 0
+-0.131746 0.371795 -0.218067 0 1 0
+-0.273181 -0.183404 0.371795 0 0 1
+0.428515 -0.371795 -0.289758 0 1 0
+0.261467 -0.0229596 -0.116836 0.725135 -0.688593 0.00441726
+0.305691 0.266372 -0.371795 0 0 1
+-0.0233466 -0.175745 0.320513 0 0 1
+0.146256 0.294872 -0.308925 0.268512 0.962281 -0.0437727
+0.332235 0.074957 -0.371795 0 0 1
+-0.25591 0.0354069 -0.167328 -0.562514 0.826669 0.0140281
+-0.333091 -0.271943 -0.371795 0 0 1
+0.407704 0.188363 0.320513 0 0 1
+0.5 -0.248536 -0.311717 1 0 0
+-0.5 -0.0653663 -0.319164 1 0 0
+0.150959 0.294872 0.0343742 0.0552109 0.998475 -0.00035653
+0.5 0.0746971 -0.261793 1 0 0
+0.5 -0.280384 0.0567838 1 0 0
+-0.141154 -0.328748 0.0139706 1 0 0
+0.253544 -0.273618 0.320513 0 0 1
+-0.114869 -0.256282 0.329794 0.0211385 0.997467 -0.0679221
+0.371786 -0.371795 0.316072 -0.0114326 0.909995 -0.414461
+0.141109 -0.34691 -0.125874 1 0 0
+0.214484 0.230897 -0.37014 -0.00464051 0.869274 0.494308
+-0.194523 -0.0694002 0.371795 0.54713 0.192911 0.814515
+0.5 0.253346 -0.0250263 1 0 0
+0.0114654 -0.107512 0.320513 0 0 1
+0.320513 0.0854783 -0.334722 0.927936 -0.0619401 0.367558
+0.034474 -0.294872 -0.0447976 0 1 0
+-0.451349 0.371795 -0.043186 0 1 0
+-0.0985727 0.363998 0.320513 0.108963 0.181759 0.977287
+-0.459243 0.371795 0.0495268 0 1 0
+-0.5 -0.288715 -0.204418 0.993114 0.110221 -0.0396997
+-0.0763204 -0.294872 0.298311 0 1 0
+0.5 -0.0602368 0.0406349 1 0 0
+0.448718 -0.359698 -0.0869663 1 0 0
+-0.450075 0.0600469 0.320513 0 0 1
+0.5 0.0735671 0.139786 1 0 0
+-0.24699 0.149243 -0.333333 0 0 1
+-0.0686612 -0.137865 -0.333333 0 0 1
+0.0115118 -0.294872 -0.0947927 0 1 0
+0.115966 0.371795 -0.0295912 0 1 0
+-0.416164 0.371795 0.130289 0 1 0
+-0.448718 -0.306298 -0.0130961 1 0 0
+-0.141154 -0.306692 -0.370386 -0.635907 -0.105162 0.764567
+0.374626 0.069811 0.356995 0.972571 0.232607 0
+-0.5 0.316114 -0.117015 1 0 0
+0.457752 0.294872 0.121588 0 1 0
+0.0247807 0.371795 0.157523 0 1 0
+0.241792 -0.371795 0.243692 0 1 0
+0.406201 0.260017 0.320513 0 0 1
+0.183667 0.163625 0.371795 0 0 1
+0.484112 0.253703 -0.371795 0 0 1
+0.150428 0.0110763 0.320513 0 0 1
+-0.221873 -0.371795 -0.0333895 0 1 0
+-0.366547 -0.239465 0.320513 0 0 1
+0.273204 -0.210776 0.323523 -0.449205 0.657397 -0.605016
+-0.270303 -0.371795 0.139043 0 1 0
+-0.5 0.035749 0.016405 1 0 0
+0.5 0.0424833 0.0651294 1 0 0
+-0.5 -0.284307 -0.33532 1 0 0
+0.44625 0.294872 0.289269 0 1 0
+0.310556 -0.371795 -0.0883758 0 1 0
+0.397985 0.294872 -0.233067 0 1 0
+-0.0422481 0.371795 0.108533 0 1 0
+-0.38785 -0.142939 0.320513 0 0 1
+0.170271 0.294872 -0.324891 0 1 0
+-0.0153264 -0.294872 -0.211581 0 1 0
+-0.443935 0.371795 -0.154445 0 1 0
+-0.371088 -0.371795 -0.0087186 0 1 0
+-0.5 -0.229699 0.039837 1 0 0
+-0.46969 -0.294872 0.284732 0 1 0
+-0.228435 -0.0433856 -0.13138 -0.0718915 0.996792 0.0351653
+-0.270678 -0.210314 0.371795 -0.195753 -0.392201 0.89881
+0.0295977 -0.277756 -0.371795 0 0 1
+-0.0618146 0.230897 -0.364632 0.113672 0.972812 0.20178
+-0.21292 -0.188537 -0.333333 0 0 1
+0.5 0.199964 -0.100387 1 0 0
+-0.214077 0.0401293 -0.194529 0.347738 0.937592 0
+-0.437123 0.185238 0.320513 0 0 1
+-0.5 0.289769 0.197163 1 0 0
+0.0315686 0.371795 0.197512 0 1 0
+0.31623 0.294872 0.00608597 0 1 0
+-0.316837 0.257197 0.320513 0 0 1
+-0.205188 0.0313942 -0.0334261 0.57576 0.549499 0.605434
+0.314557 -0.371795 -0.10206 0 1 0
+-0.260113 -0.342981 -0.371795 0 0 1
+-0.346897 0.241842 0.320513 0 0 1
+0.403752 -0.197744 0.320513 0 0 1
+-0.413097 -0.290333 0.320513 0 0 1
+-0.5 -0.196693 -0.228313 1 0 0
+0.5 -0.190484 -0.0856049 1 0 0
+0.262868 0.0209591 -0.0884931 0.849032 0.528322 0.0045059
+-0.35013 -0.12697 0.330127 0.875647 0.482468 -0.0216204
+-0.29383 -0.371795 0.211705 0 1 0
+-0.215765 -0.228373 0.371795 -0.0299222 -0.105531 0.993966
+-0.141154 -0.340299 0.237367 1 0 0
+-0.110518 0.344022 -0.371795 0 0 1
+-0.5 -0.0627398 -0.00765205 1 0 0
+-0.2223 -0.343315 -0.371795 0 0 1
+0.312837 0.294872 0.174278 0 1 0
+-0.256988 -0.219971 0.371795 -0.152148 -0.578346 0.801478
+-0.109729 -0.224667 0.371795 0 0 1
+-0.338203 0.348028 -0.371795 0 0 1
+-0.141154 -0.364184 0.083488 0.966965 -0.248712 -0.0558562
+0.0766629 0.371795 0.291506 0 1 0
+-0.34055 -0.0106469 -0.371795 0 0 1
+-0.489064 0.371795 -0.172109 0 1 0
+0.231228 -0.31021 0.320513 0 0 1
+0.5 0.0737915 0.317902 0.93939 -0.148309 0.309113
+0.256638 -0.0283172 -0.0386773 0.714323 -0.699795 0.00549222
+0.262967 -0.371795 -0.125014 0 1 0
+-0.5 0.265085 0.15953 1 0 0
+0.445198 0.232271 -0.371795 0 0 1
+0.236615 0.232059 0.35175 0.429157 0.903216 -0.00498792
+0.5 0.292663 0.26322 0.708941 0.69945 0.0904029
+0.18478 0.0807905 -0.333333 0 0 1
+0.0657838 0.0640867 0.320513 0 0 1
+0.169093 0.294872 0.301181 0 1 0
+0.0551927 0.371795 -0.196042 0 1 0
+0.5 -0.0803925 0.00129965 1 0 0
+0.229019 0.294872 -0.218097 0 1 0
+-0.5 -0.115658 -0.170308 1 0 0
+0.141109 -0.302183 0.0942995 0.99496 0.0888693 0.0464328
+-0.193796 0.0525493 0.320513 0.370086 -0.134758 0.919172
+0.5 -0.28522 -0.301191 0.996307 -0.0844866 -0.0153231
+0.5 -0.154575 0.26119 1 0 0
+0.5 0.0928787 0.148139 1 0 0
+0.47565 0.294872 -0.179457 0 1 0
+0.187882 -0.371795 0.0914909 0 1 0
+-0.190516 0.0164273 -0.230983 0.920641 0.39041 0
+-0.5 -0.0256689 0.213393 1 0 0
+0.23286 0.0143182 0.0143968 0.109482 0.499746 0.859225
+-0.5 -0.120006 0.128905 1 0 0
+-0.5 -0.208594 -0.194164 1 0 0
+-0.461071 -0.294872 -0.0440634 0 1 0
+0.323181 0.00658016 0.371795 0 0 1
+0.5 0.257254 0.140755 1 0 0
+0.5 0.0402114 -0.224682 1 0 0
+0.141109 -0.323377 0.174193 1 0 0
+-0.0415886 0.231807 0.371795 0 0 1
+0.218969 -0.0365048 -0.212783 0.307852 0.951086 0.0257301
+0.299169 -0.371795 -0.056863 0 1 0
+-0.27339 0.00871427 -0.242815 0.977788 -0.209587 0.00199912
+-0.5 0.0637745 -0.347804 1 0 0
+-0.389694 -0.30639 0.320513 0 0 1
+-0.0883574 0.256282 0.366641 0.16791 0.888133 0.427814
+-0.458498 0.371795 0.30841 0 1 0
+0.5 0.0375155 -0.370056 0.859888 -0.0518428 -0.507844
+-0.419138 0.0499608 0.320513 0 0 1
+-0.121199 0.0250252 -0.333333 0 0 1
+0.5 0.0365831 -0.179323 1 0 0
+0.294459 -0.219012 -0.371795 0.092546 -0.272164 0.95779
+-0.419393 0.0964698 0.320513 0 0 1
+-0.0248358 -0.0521188 -0.333333 0 0 1
+-0.385688 0.141738 0.320513 0 0 1
+0.445269 0.0505374 0.320513 0 0 1
+-0.5 0.0930606 -0.195403 1 0 0
+-0.5 -0.187035 0.102665 1 0 0
+0.141109 -0.337224 0.00204395 1 0 0
+0.471932 -0.251243 -0.371795 0 0 1
+0.399812 -0.13346 -0.371795 0 0 1
+0.0918433 0.147234 -0.333333 0 0 1
+-0.234014 0.371795 -0.312785 0 1 0
+-0.163473 -0.123779 0.348891 0.819707 0.572755 0.00561059
+0.448718 -0.367998 0.0287787 0.946082 -0.27281 0.174653
+0.0573298 -0.294872 0.20174 0 1 0
+0.431876 -0.200005 -0.371795 0 0 1
+0.314525 0.0354613 -0.333333 0.311859 0.0198159 0.949922
+0.276677 -0.371795 0.205382 0 1 0
+0.402618 0.045873 -0.371795 0 0 1
+0.156384 0.132145 0.323394 0.701176 0.581262 -0.4129
+0.051571 -0.19857 0.366429 -0.189716 0.928637 0.318811
+-0.5 0.0673934 -0.246128 1 0 0
+0.384202 0.294872 -0.10636 0 1 0
+-0.0160302 0.371795 0.302477 0 1 0
+0.183931 -0.0449466 -0.333333 0 0 1
+0.357031 -0.371795 -0.148746 0 1 0
+0.253769 -0.00791241 0.371795 0 0 1
+-0.5 0.0650713 -0.215376 1 0 0
+0.119645 -0.240423 0.371795 0 0 1
+0.226763 -0.371795 0.0287098 0 1 0
+-0.0883968 0.371795 0.250934 0 1 0
+0.390043 0.294872 0.14065 0 1 0
+-0.5 -0.117934 -0.0645885 1 0 0
+-0.274051 0.0358228 -0.333333 0 0 1
+0.5 0.27876 0.0608013 1 0 0
+0.5 0.0700238 -0.330965 1 0 0
+0.447976 -0.0629224 0.320513 0 0 1
+0.309594 -0.193311 -0.353387 0.850855 -0.525212 -0.0140534
+0.141026 0.310819 0.200766 1 0 0
+0.5 0.282086 -0.336352 1 0 0
+-0.238141 0.0429449 -0.278222 -0.169944 0.985277 0.0186501
+0.5 0.0612432 -0.235113 1 0 0
+0.49757 -0.294872 -0.177802 -0.670485 0.729782 -0.133675
+0.374485 0.0521044 0.371795 0.586745 0.00803153 0.809732
+-0.143439 -0.334602 -0.371795 -0.488863 0.0666346 0.869812
+0.135745 0.216878 0.371795 0 0 1
+0.31066 0.0193405 0.371795 0 0 1
+0.141934 -0.106859 0.320513 0 0 1
+-0.205481 0.371795 -0.0605669 0 1 0
+0.455678 0.294872 0.070176 0 1 0
+0.5 -0.142992 -0.0399071 1 0 0
+0.0709741 0.0430291 0.320513 0 0 1
+0.0453125 0.199823 0.355104 0.193771 0.981047 0.000498479
+-0.141154 -0.348357 0.160483 1 0 0
+-0.208561 0.147817 -0.333333 0 0 1
+0.5 -0.0554139 0.222372 1 0 0
+0.141109 -0.315671 0.0142582 1 0 0
+0.0522032 0.371795 -0.3698 0.0876316 -0.673732 0.733762
+0.0646758 0.371795 -0.0318121 0 1 0
+-0.444599 -0.371795 0.274247 0.244726 0.969018 0.0333687
+0.343093 -0.371795 0.0436126 0 1 0
+0.38072 -0.371795 -0.0412365 0 1 0
+0.5 0.113845 -0.359269 1 0 0
+0.386315 0.294872 0.171541 0 1 0
+-0.0526961 -0.294872 -0.361974 0 1 0
+0.219959 0.294872 -0.135878 0 1 0
+0.223274 0.294872 -0.299981 0 1 0
+0.248357 0.0512975 -0.333333 0 0 1
+0.224385 0.24796 -0.371795 0 0 1
+-0.161402 0.371795 -0.173973 0 1 0
+-0.371641 -0.146177 0.320513 0 0 1
+0.198724 -0.0210343 -0.136187 0.858921 0.512097 -0.00328378
+-0.184638 0.0882977 0.36524 0.865627 -0.407537 0.290867
+0.125084 0.371795 -0.0507048 0 1 0
+-0.240663 -0.365192 0.320513 -0.138645 -0.471677 0.870803
+-0.5 -0.286232 -0.149126 0.99987 0.0160877 0.000635557
+0.350806 0.294872 -0.0451971 0 1 0
+0.12722 -0.294872 0.14606 0 1 0
+0.340894 -0.371795 0.201391 0 1 0
+0.5 0.0105453 0.109338 1 0 0
+-0.280011 -0.367951 -0.371795 -0.059547 0.287302 0.955987
+-0.0552334 -0.294872 -0.215603 0 1 0
+0.0652729 -0.294872 0.178047 0 1 0
+-0.5 -0.26006 0.307906 1 0 0
+-0.26086 -0.371795 0.0574722 0 1 0
+-0.290958 -0.358511 -0.371795 0 0 1
+0.0163436 0.140183 0.320513 0 0 1
+0.306515 -0.0798505 -0.333333 0 0 1
+-0.5 -0.286288 -0.0467953 1 0 0
+-0.30958 -0.327802 -0.371795 0 0 1
+0.403743 0.294872 -0.0615121 0 1 0
+-0.5 0.318445 -0.289904 1 0 0
+0.265548 0.294872 -0.227527 0 1 0
+0.448718 -0.307073 0.0977971 1 0 0
+0.232472 0.294872 0.119581 0 1 0
+0.141026 0.297184 -0.36447 0.983753 0.0967186 -0.151249
+-0.163115 -0.371795 -0.291798 0 1 0
+0.01095 0.371795 0.0700945 0 1 0
+0.23462 0.184612 0.371795 0 0 1
+-0.179632 0.203433 0.371795 0 0 1
+0.5 -0.0580198 -0.34538 1 0 0
+0.294027 -0.173366 -0.333333 0 0 1
+0.123719 -0.294872 0.22236 0 1 0
+0.498429 -0.127656 -0.371795 -0.492952 0.019714 0.869833
+0.5 -0.117513 0.249375 1 0 0
+0.5 -0.170886 0.0280065 1 0 0
+0.312513 -0.322693 0.320513 0 0 1
+0.0351574 0.22139 0.371795 0 0 1
+-0.271863 0.306137 0.320513 0 0 1
+0.348967 0.294872 -0.301612 0 1 0
+-0.5 -0.196685 -0.0797694 1 0 0
+-0.251843 0.371795 0.159294 0 1 0
+0.448718 -0.302225 -0.106203 0.983953 -0.177635 0.0167802
+0.134089 0.134751 -0.333333 0 0 1
+-0.362325 0.369017 -0.371795 0.163098 -0.439274 0.883424
+-0.5 0.276663 -0.279351 1 0 0
+-0.342626 -0.371795 -0.0824546 0 1 0
+0.258547 0.0264075 -0.164342 0.764548 0.644272 -0.0194639
+0.488778 -0.294872 -0.0599047 0 1 0
+-0.345686 0.0779463 -0.371795 0 0 1
+-0.17136 0.360474 -0.371795 0 0 1
+-0.5 -0.0399973 0.0986202 1 0 0
+0.082599 0.191143 0.371795 -0.271145 -0.597212 0.754863
+0.5 -0.0243575 -0.275521 1 0 0
+-0.263095 -0.371795 0.142053 0 1 0
+-0.179586 0.0524876 -0.333333 0 0 1
+0.340228 -0.371795 -0.042433 0 1 0
+0.363091 -0.371795 -0.233814 0 1 0
+0.25935 -0.371795 -0.261957 0 1 0
+-0.5 0.212356 0.316584 0.883391 -0.010822 -0.468511
+-0.455111 -0.294872 0.0763098 0.206221 0.978436 -0.0116347
+-0.5 -0.0156322 -0.303354 1 0 0
+0.5 0.185064 -0.117511 1 0 0
+-0.0618748 -0.294872 0.0610991 0 1 0
+-0.5 -0.280493 -0.236231 1 0 0
+-0.5 0.0219011 0.0207569 1 0 0
+0.0742008 -0.294872 0.232099 0 1 0
+0.434312 0.294872 -0.0324883 0 1 0
+0.255103 -0.201279 0.371795 0 0 1
+0.175475 -0.230897 -0.353926 0 1 0
+-0.5 0.367041 -0.0551733 0.962376 -0.236138 -0.134427
+0.141109 -0.331346 -0.133192 1 0 0
+0.340614 -0.171295 -0.371795 0 0 1
+0.448718 -0.299461 -0.334064 0.937044 -0.348792 -0.0170808
+-0.297731 -0.329001 -0.371795 0 0 1
+0.5 -0.127056 0.15078 1 0 0
+-0.129135 -0.294872 -0.0560836 -0.032641 0.999447 0.00626467
+-0.5 0.183626 -0.165862 1 0 0
+-0.311161 0.108144 0.371795 0 0 1
+0.184075 0.294872 -0.0210304 0 1 0
+0.264948 0.0173646 -0.221957 0.87889 0.475903 -0.032682
+0.489866 -0.164793 -0.371795 -0.0470827 0.0100413 0.998841
+0.141026 0.337839 -0.126133 1 0 0
+0.144873 0.294872 0.310062 0.411497 0.905221 0.106039
+-0.0500334 0.371795 -0.246772 0 1 0
+0.393538 -0.175215 -0.371795 0 0 1
+0.490683 0.294872 0.208136 0.106931 0.994264 0.00238233
+0.5 0.275696 0.253684 1 0 0
+-0.5 0.0148822 0.150016 1 0 0
+0.157927 -0.262984 0.320513 -0.0208376 -0.112839 0.993395
+0.276173 0.294872 0.154544 0 1 0
+-0.28965 -0.215271 -0.350674 0.623579 0.781747 -0.004473
+-0.5 0.158116 -0.094306 1 0 0
+0.264465 0.26377 -0.371795 0 0 1
+0.448718 -0.3207 -0.235584 1 0 0
+0.5 -0.170763 -0.15231 1 0 0
+-0.0517122 -0.256282 0.332987 -0.00572108 0.999653 -0.0257054
+-0.486342 0.371795 -0.278407 0 1 0
+-0.262095 -0.0300853 -0.107867 0.734922 0.677967 0.0158347
+-0.29406 -0.371795 -0.116747 0 1 0
+0.349272 0.0722696 0.371795 0 0 1
+-0.475875 -0.294872 -0.286981 0 1 0
+-0.5 0.142362 0.254494 1 0 0
+0.5 -0.160549 -0.0485953 1 0 0
+0.5 -0.270569 -0.0668775 1 0 0
+-0.0363747 -0.294872 0.17018 0 1 0
+-0.421217 0.2406 0.320513 0 0 1
+0.5 0.0418572 0.221458 1 0 0
+0.369428 0.0847466 0.323072 0.914002 0.332332 0.232716
+0.5 -0.212213 -0.140282 1 0 0
+0.382257 0.294872 0.0256835 0 1 0
+-0.231273 -0.26523 0.320513 0 0 1
+0.0917353 0.371795 -0.225485 0 1 0
+-0.307918 -0.371795 0.120623 0 1 0
+-0.488981 0.371795 0.276178 -0.120005 0.992382 0.0278733
+-0.5 0.138784 0.0304986 1 0 0
+-0.448718 -0.345672 0.309097 0.998127 -0.0211062 -0.0574151
+-0.496288 -0.260851 0.320513 -0.346729 0.0037323 0.937958
+0.18902 -0.371795 -0.17172 0 1 0
+0.448718 -0.344322 -0.0888778 1 0 0
+-0.338057 0.371795 -0.261223 0 1 0
+0.208429 -0.0311317 -0.182011 0.555425 0.831509 -0.00980529
+0.448023 -0.287984 -0.371795 0.0133532 0.127684 0.991725
+-0.498558 0.371795 -0.35301 -0.49579 0.866481 0.0583282
+-0.0496369 -0.294872 -0.0961426 0 1 0
+0.42527 -0.206915 0.320513 0 0 1
+-0.141154 -0.311682 0.288627 1 0 0
+0.423839 -0.371795 0.134272 0 1 0
+0.15557 -0.213383 -0.333333 0 0 1
+-0.128239 0.371795 0.162111 0 1 0
+-0.474329 0.145967 0.320513 0 0 1
+0.5 -0.135115 -0.278344 1 0 0
+-0.194943 0.0245419 -0.121 0.84017 0.54231 -0.00375864
+0.5 -0.241276 0.139061 1 0 0
+0.0812713 0.371795 0.204948 0 1 0
+-0.5 -0.0446742 0.0668752 1 0 0
+-0.5 0.0469882 0.0494833 1 0 0
+0.5 -0.00517198 0.199039 1 0 0
+-0.192391 -0.0706231 0.371103 0.641119 0.169396 0.748513
+-0.221684 0.26318 0.320513 0 0 1
+-0.0812639 0.371795 -0.341098 0 1 0
+-0.229176 -0.371795 0.0136393 0 1 0
+-0.0750299 -0.294872 0.155796 0 1 0
+-0.5 0.118543 0.0828099 1 0 0
+-0.5 -0.103012 0.309753 1 0 0
+-0.00802413 0.36428 -0.371795 -0.0312691 -0.0461466 0.998445
+-0.00665566 0.0287912 -0.333333 0 0 1
+0.337403 0.124026 -0.371795 0 0 1
+-0.5 0.324049 0.299681 1 0 0
+0.0853953 0.371795 0.031621 0 1 0
+0.467752 0.294872 -0.320306 0 1 0
+0.167737 -0.155316 0.371795 0 0 1
+-0.0451245 -0.199854 0.348823 0.173284 0.984872 0
+-0.239449 -0.0426299 -0.215601 0.223519 0.974347 -0.0261964
+-0.5 0.174447 -0.012866 1 0 0
+0.181015 0.216048 -0.333333 0 0 1
+-0.264526 0.371795 -0.310012 0 1 0
+0.199416 0.294872 -0.0186069 0 1 0
+0.5 -0.245199 -0.158193 1 0 0
+0.101234 0.177803 0.364566 0.566894 0.798713 -0.201716
+-0.168881 0.194821 0.371795 0 0 1
+0.0881066 0.371795 0.269141 0 1 0
+0.270203 0.226116 -0.345036 0.315304 0.948941 -0.00974726
+0.0528522 0.371795 -0.298188 0 1 0
+-0.0309553 -0.256282 0.339176 0 1 0
+-0.441056 0.371795 -0.348578 0 1 0
+-0.5 -0.162356 -0.305361 1 0 0
+-0.324819 0.0557712 0.371795 0 0 1
+0.5 0.207421 -0.094615 1 0 0
+0.278876 0.294872 0.0605633 0 1 0
+-0.5 -0.158899 0.159211 1 0 0
+0.5 -0.259289 -0.0160993 1 0 0
+0.5 -0.192718 0.216532 1 0 0
+-0.447572 0.371795 -0.0764561 0 1 0
+0.5 0.0758161 0.108951 1 0 0
+-0.201301 -0.371795 -0.0491286 0 1 0
+-0.5 0.204793 0.200777 1 0 0
+-0.231447 -0.284958 -0.371795 0 0 1
+-0.5 0.302255 0.0578244 1 0 0
+-0.456591 0.354008 -0.371795 0 0 1
+-0.317629 0.192866 -0.371795 -0.227472 0.0750445 0.970889
+-0.448718 -0.304711 -0.126593 0.993767 0.103197 -0.0421572
+-0.5 -0.277605 0.255305 1 0 0
+-0.0111195 0.0243109 -0.333333 0 0 1
+0.5 -0.139481 0.277562 1 0 0
+0.457623 -0.0569389 -0.371795 0 0 1
+0.302273 -0.231747 -0.371795 0 0 1
+0.0295889 0.371795 0.188002 0 1 0
+-0.184502 -0.371795 -0.229631 0 1 0
+0.5 0.247309 0.0814173 1 0 0
+0.061482 -0.195167 0.322494 -0.400557 0.822618 0.403551
+-0.5 0.33026 -0.346076 1 0 0
+-0.122911 0.295431 0.320513 0 0 1
+-0.189717 -0.0767185 0.321829 0.605682 0.34518 0.716938
+-0.5 0.0261803 0.227322 1 0 0
+-0.164821 -0.230897 -0.366855 -0.07927 0.879792 -0.468704
+-0.0244275 0.334286 0.320513 0 0 1
+0.336361 -0.371795 0.258486 0 1 0
+-0.258539 -0.255421 0.320513 0 0 1
+-0.420951 -0.371795 -0.100274 0 1 0
+-0.133877 -0.289521 -0.371795 -0.01119 0.0724646 0.997308
+0.11239 0.0648853 -0.333333 0 0 1
+-0.448718 -0.305418 -0.285613 0.998048 0.058633 0.0214883
+0.273384 -0.164456 -0.333333 0 0 1
+0.272973 0.132957 -0.333333 0 0 1
+0.141109 -0.351272 -0.238665 1 0 0
+0.398537 0.288595 0.320513 -0.0264218 0.243489 0.969544
+-0.5 0.366593 -0.184427 0.980154 -0.197871 -0.012033
+-0.121336 0.102498 -0.333333 0 0 1
+-0.0974821 0.371795 -0.315746 0 1 0
+-0.258891 0.219896 0.357186 -0.482587 0.875848 0
+0.196096 0.0163044 -0.191909 0.904522 -0.426311 -0.00999307
+0.324714 0.237848 0.320513 0 0 1
+0.188781 -0.0788538 0.358677 0.915786 -0.401666 0
+0.356193 -0.146602 0.320513 0 0 1
+-0.5 0.00868937 -0.0268607 1 0 0
+0.442473 -0.371795 -0.0455463 -0.100545 0.994926 0.0036262
+0.142088 0.294872 -0.0319481 0.405562 0.906411 0.118061
+0.246367 -0.371795 -0.332499 0 1 0
+0.0605113 -0.190886 -0.333333 0 0 1
+-0.161132 0.371795 0.27696 0 1 0
+0.141109 -0.305698 0.0539543 1 0 0
+0.336482 0.294872 -0.30967 0 1 0
+0.5 -0.179827 0.0493328 1 0 0
+0.469857 0.294872 0.0901072 0 1 0
+-0.26043 0.0317502 -0.166414 -0.692367 0.721539 -0.00317521
+0.258524 0.0264311 -0.0765945 0.731925 0.681365 -0.00534239
+-0.412247 0.280938 0.320513 0 0 1
+0.221746 0.294872 -0.0941367 0 1 0
+0.233339 -0.371795 0.188242 0 1 0
+-0.368319 -0.371795 -0.0298897 0 1 0
+0.268046 -0.00891669 -0.286716 0.973671 -0.226052 -0.0294314
+-0.302496 -0.371795 -0.0565797 0 1 0
+-0.210433 -0.215677 -0.333333 0 0 1
+0.129081 0.111838 -0.333333 0 0 1
+0.328889 -0.0057837 0.371795 0 0 1
+-0.493908 0.371795 0.151637 -0.170454 0.98306 0.0673647
+0.242907 -0.198578 0.371795 0 0 1
+0.305652 -0.371795 -0.273393 0 1 0
+0.5 -0.217324 0.316485 0.922999 0 0.384802
+-0.19625 -0.371795 -0.214555 0 1 0
+-0.482703 0.0266416 -0.371795 0 0 1
+-0.243613 0.371795 -0.321908 0 1 0
+-0.5 -0.217839 -0.0149729 1 0 0
+0.0508171 -0.256068 -0.371795 0 0 1
+0.5 0.162963 0.0346531 1 0 0
+0.5 -0.119707 0.183565 1 0 0
+0.454712 0.0658037 0.320513 0 0 1
+0.219306 -0.314414 0.320513 0 0 1
+-0.0124434 0.204555 0.351991 0 1 0
+-0.498919 0.371795 0.240033 0.751062 -0.658374 -0.0494948
+0.31455 -0.22123 0.320513 0 0 1
+0.448718 -0.324749 -0.247242 1 0 0
+-0.255895 0.371795 0.199731 0 1 0
+-0.00775825 -0.242495 0.371795 0 0 1
+-0.21944 0.371795 -0.0692446 0 1 0
+-0.1285 -0.294872 -0.0215123 0 1 0
+-0.5 0.171876 -0.111206 1 0 0
+0.382868 -0.0226439 0.371216 0.858737 -0.198773 0.472292
+0.405758 -0.210412 0.320513 0 0 1
+0.464029 0.0474333 0.320513 0 0 1
+-0.0131416 0.371795 -0.330928 0 1 0
+0.5 0.185916 0.0458367 1 0 0
+-0.328463 -0.289612 0.320513 0 0 1
+-0.467566 -0.294872 0.0398791 0 1 0
+-0.187262 0.000943206 -0.121637 0.998993 0.040058 0.020202
+0.194573 0.0649182 0.330185 0.956728 0.282892 -0.0681417
+0.296593 -0.193126 0.32928 -0.609401 0.781345 -0.13465
+-0.062636 -0.144273 -0.333333 0 0 1
+-0.320124 0.233377 -0.371795 0 0 1
+0.347769 0.294872 -0.309045 0 1 0
+-0.0590066 0.0297933 0.320513 0 0 1
+-0.5 -0.257484 0.239948 1 0 0
+0.223867 -0.371795 -0.13032 0 1 0
+0.448718 -0.354804 -0.325244 1 0 0
+0.188791 -0.371795 -0.238083 0 1 0
+-0.0418059 0.371795 -0.157879 0 1 0
+0.448718 -0.357673 -0.359594 1 0 0
+0.5 0.174376 -0.231211 1 0 0
+-0.434332 0.371795 0.114206 0 1 0
+-0.5 -0.26818 0.311244 1 0 0
+0.393495 0.294872 0.0334006 0 1 0
+-0.355949 -0.0266915 -0.371795 0 0 1
+-0.141154 -0.368627 0.0305665 -0.696412 0.712375 0.0867865
+-0.369758 -0.257779 -0.371795 0 0 1
+-0.167423 -0.371795 -0.302355 0 1 0
+0.229731 -0.211928 0.371795 0 0 1
+0.235576 -0.371795 0.274958 0 1 0
+-0.174103 -0.333129 -0.371795 0 0 1
+0.290994 -0.371795 -0.0851511 0 1 0
+0.5 -0.116191 -0.0830923 1 0 0
+-0.440993 -0.371795 -0.0842055 0.133025 0.990964 0.0171567
+-0.5 -0.211104 -0.205521 1 0 0
+0.106478 0.0488149 -0.333333 0 0 1
+-0.472285 0.226652 0.320513 0 0 1
+-0.448718 -0.326687 0.251561 1 0 0
+0.259539 0.0254161 -0.312735 0.70725 0.70682 -0.0142107
+0.357311 -0.165285 0.320513 0 0 1
+0.417075 -0.371795 -0.0829748 0 1 0
+0.257625 -0.371795 0.126121 0 1 0
+-0.115875 -0.294872 0.144711 0 1 0
+0.464179 -0.294872 0.288669 0 1 0
+-0.141154 -0.364849 0.290126 0.988405 -0.151756 -0.00500635
+0.174257 0.0903712 0.320513 -0.069121 -0.0125095 0.99753
+0.251662 0.294872 0.130729 0 1 0
+-0.235162 0.371795 -0.266898 0 1 0
+-0.5 0.0248375 0.0669107 1 0 0
+0.5 0.253661 0.191493 1 0 0
+0.0265985 -0.265725 -0.371795 0 0 1
+0.242095 0.0131502 0.0126711 0.323088 0.37923 0.867063
+-0.239898 -0.0425097 -0.10064 0.218894 0.975653 0.0136621
+-0.448718 -0.30754 0.29177 1 0 0
+-0.254551 -0.344879 -0.371795 0 0 1
+0.5 0.0203681 -0.349739 1 0 0
+0.0802641 0.188719 0.331975 0.379561 0.925137 0.00741373
+-0.410683 -0.371795 -0.265863 0 1 0
+0.179574 0.250433 0.334088 0.212555 0.977149 0
+0.115991 0.371795 -0.218332 0 1 0
+-0.448718 -0.370974 0.233586 0.821543 0.556686 0.123162
+0.171717 0.294872 0.0643592 0 1 0
+-0.371336 0.371795 -0.352422 0 1 0
+0.141026 0.320571 -0.289341 1 0 0
+-0.177228 0.371795 -0.269925 0 1 0
+-0.126168 0.11276 -0.333333 0 0 1
+0.288605 0.199247 0.364809 0.587248 0.799183 0.12824
+0.461637 0.294872 -0.202336 0 1 0
+0.380736 -0.303726 0.320513 0 0 1
+0.429637 0.180662 -0.371795 0 0 1
+-0.376488 -0.371795 -0.27112 0 1 0
+0.171499 0.294872 -0.350379 0 1 0
+-0.328212 0.371795 0.0872514 0 1 0
+0.093921 -0.294872 -0.216581 0 1 0
+-0.5 0.208646 0.299428 1 0 0
+-0.311001 0.371795 -0.0942301 0 1 0
+0.388701 -0.371795 0.130524 0 1 0
+-0.5 0.218166 -0.0739145 1 0 0
+-0.339554 0.0684177 0.371795 0 0 1
+0.328624 -0.371795 0.122978 0 1 0
+-0.5 -0.0555267 -0.0407292 1 0 0
+-0.414481 -0.371795 -0.0918344 0 1 0
+-0.469126 -0.294872 0.287707 0 1 0
+0.5 -0.158904 0.156084 1 0 0
+-0.234203 0.371795 0.0288975 0 1 0
+0.448718 -0.365977 0.0913497 0.941893 -0.333814 0.0374976
+0.409951 0.122921 -0.371795 0 0 1
+0.131189 0.157105 0.367073 0.605671 0.725928 -0.325869
+0.26303 -0.0262383 -0.333333 0.525699 -0.330726 0.783748
+-0.5 -0.0588895 -0.211238 1 0 0
+-0.5 -0.135127 0.0726043 1 0 0
+0.434322 -0.0286381 -0.371795 0 0 1
+-0.459441 -0.0496421 0.320513 0 0 1
+-0.411231 0.356358 0.320513 0 0 1
+0.0170987 -0.256282 0.362659 -0.000315705 0.998938 -0.0460826
+-0.400935 -0.371795 -0.214556 0 1 0
+0.198909 0.251327 0.320513 -0.135956 0.209414 0.968329
+0.448718 -0.34475 -0.0584345 1 0 0
+0.448718 -0.357639 0.154711 1 0 0
+0.189774 0.0885885 0.371795 -0.246152 -0.120931 0.961657
+0.222122 0.247455 0.320513 0.0473809 0.120334 0.991602
+-0.5 -0.199359 0.255042 1 0 0
+0.5 0.0800721 0.111099 1 0 0
+0.227176 -0.295597 0.320513 0 0 1
+-0.5 0.252548 -0.113282 1 0 0
+0.351938 -0.198743 0.320513 0 0 1
+-0.255207 -0.201016 -0.333333 0 0 1
+0.141026 0.30355 0.160717 0.973603 0.227485 -0.0186461
+0.471411 0.294872 0.175346 0 1 0
+-0.173217 -0.371795 -0.0841055 0 1 0
+-0.192595 -0.371795 -0.305325 0 1 0
+-0.12075 -0.294872 0.125624 0 1 0
+0.0833348 0.371795 -0.1284 0 1 0
+-0.181692 -0.108172 -0.333333 0 0 1
+-0.086752 -0.294872 -0.0837767 0 1 0
+-0.329151 0.0505875 0.371795 0 0 1
+0.201093 -0.371795 0.174944 0 1 0
+-0.5 0.213813 0.24952 1 0 0
+0.0590896 -0.294872 -0.203075 0 1 0
+-0.448718 -0.348671 -0.129465 1 0 0
+0.5 -0.071744 -0.0658218 1 0 0
+0.137713 0.371795 -0.0413141 0.533314 0.842158 0.0796662
+-0.358871 -0.371795 -0.326372 0 1 0
+0.0933618 0.371795 0.216579 0 1 0
+0.253487 0.222846 0.351732 0.479263 0.877672 0
+-0.311981 0.305447 -0.371795 0 0 1
+0.341428 0.294872 0.00210616 0 1 0
+0.33595 0.294872 0.169367 0 1 0
+0.262265 -0.056064 0.371795 0 0 1
+-0.0176166 -0.272514 -0.371795 0 0 1
+-0.0681199 -0.294872 -0.295128 0 1 0
+-0.30779 0.371795 -0.158638 0 1 0
+-0.5 -0.0843463 0.267135 1 0 0
+-0.198093 0.0287338 -0.237655 0.759885 0.650045 0.0040995
+-0.443347 -0.320531 -0.371795 0.27775 -0.0102763 0.960598
+-0.5 0.360935 0.11392 1 0 0
+-0.128016 0.371795 -0.112215 0 1 0
+-0.225342 -0.280045 0.320513 0 0 1
+0.160631 -0.0588832 -0.333333 0 0 1
+-0.141154 -0.333517 0.134317 1 0 0
+-0.201103 0.371795 -0.101909 0 1 0
+0.172664 -0.371795 0.132952 0 1 0
+0.167013 0.0808126 -0.333333 0 0 1
+-0.5 -0.0793064 0.0619401 1 0 0
+0.331143 0.294872 -0.16926 0 1 0
+-0.47504 -0.294872 0.0557757 0 1 0
+-0.5 0.309032 0.187037 1 0 0
+0.190649 0.294872 -0.19182 0 1 0
+-0.463449 -0.0407983 0.320513 0 0 1
+-0.236517 0.0511511 -0.333333 -0.0789478 0.135747 0.987593
+0.141026 0.344427 -0.0548354 1 0 0
+0.375336 0.294872 -0.335023 0 1 0
+0.141109 -0.327627 0.312858 0.904111 -0.0495291 -0.424416
+-0.5 -0.0873626 0.0239044 1 0 0
+0.367392 -0.371795 0.0910579 0 1 0
+0.381953 0.294872 -0.0074116 0 1 0
+-0.00792847 0.371795 0.232615 0 1 0
+-0.294364 -0.208482 0.320513 0 0 1
+0.0614318 0.371795 -0.301054 0 1 0
+0.16859 0.294872 0.201355 0 1 0
+-0.125142 0.0340334 0.320513 0 0 1
+-0.416911 0.371795 0.0698171 0 1 0
+0.0916857 0.181986 -0.333333 0 0 1
+-0.104981 -0.294872 0.229319 0 1 0
+-0.448718 -0.322285 0.0668849 1 0 0
+0.5 -0.0939769 -0.239486 1 0 0
+0.0328258 -0.0725112 -0.333333 0 0 1
+0.263684 0.294872 0.0264585 0 1 0
+0.146441 0.0951208 -0.333333 0 0 1
+-0.352375 -0.235713 0.320513 0 0 1
+-0.437163 -0.362987 0.320513 -0.0183649 -0.0813477 0.996517
+0.0768562 -0.294872 -0.282121 0 1 0
+-0.484577 0.168797 0.320513 0 0 1
+-0.270585 -0.226486 -0.371795 0.477269 0.784224 -0.396493
+-0.383234 0.371795 -0.168693 0 1 0
+-0.431004 -0.371795 0.0156836 0 1 0
+0.210528 0.0326017 -0.150957 -0.527489 0.849527 0.00774004
+0.169914 0.113922 0.320543 0.785498 0.44213 -0.433029
+0.5 -0.12577 -0.355417 1 0 0
+-0.401854 0.18096 0.320513 0 0 1
+-0.138816 -0.294872 -0.349781 -0.544709 0.827922 0.133553
+-0.5 0.260015 0.00509648 1 0 0
+-0.5 0.0868786 0.0827952 1 0 0
+-0.5 0.00206034 0.244468 1 0 0
+-0.0177879 -0.00907876 0.320513 0 0 1
+0.213139 0.0340551 -0.157469 -0.449073 0.892872 -0.0333567
+-0.187377 0.371795 -0.211584 0 1 0
+0.232165 -0.0383393 -0.166463 -0.000304689 0.999769 0.0214743
+-0.113851 -0.0736589 0.320513 0 0 1
+0.0542309 0.148008 -0.333333 0 0 1
+-0.5 0.122587 -0.340744 1 0 0
+0.249136 -0.0925297 -0.333333 0 0 1
+-0.141154 -0.30045 -0.188145 0.976553 -0.207671 -0.0567145
+-0.254075 0.23732 0.320513 0 0 1
+-0.413466 0.296652 0.320513 0 0 1
+-0.274053 0.00349637 -0.0403007 0.968821 -0.113206 -0.220385
+0.356801 0.114754 0.351686 0.877671 0.479264 0
+0.5 -0.109333 0.300592 1 0 0
+-0.204205 -0.371795 -0.221884 0 1 0
+-0.498668 0.371795 -0.118098 -0.485457 0.872057 0.0620288
+0.284502 -0.155487 -0.333333 0 0 1
+-0.256088 -0.035282 -0.248723 0.592043 0.805674 0.0193428
+-0.203566 0.0203972 0.356702 0.996584 -0.0825858 0
+0.5 0.0450394 0.0997958 1 0 0
+0.274298 0.229812 0.320513 0 0 1
+-0.5 -0.134515 -0.309582 1 0 0
+0.206158 -0.215736 -0.333333 0 0 1
+-0.0810488 0.371795 0.0880625 0 1 0
+-0.5 0.295241 -0.212932 1 0 0
+0.230741 -0.371795 0.233039 0 1 0
+-0.246607 -0.240027 0.320513 0 0 1
+-0.169667 -0.371795 -0.174913 0 1 0
+0.398792 0.294872 -0.132241 0 1 0
+0.5 0.0855372 0.0285461 1 0 0
+-0.361337 0.106435 0.323076 0.76548 -0.423142 -0.484759
+-0.426358 0.371795 0.0967618 0 1 0
+-0.426607 0.347069 -0.371795 0 0 1
+-0.244509 0.371795 0.250774 0 1 0
+0.100929 0.161086 -0.333333 0 0 1
+0.418087 -0.371795 0.169338 0 1 0
+0.368798 0.157225 -0.371795 0 0 1
+-0.211051 -0.00200478 -0.0210184 0.505871 -0.053972 0.860919
+0.262867 -0.0293124 0.371795 0 0 1
+0.367318 -0.0767021 -0.371795 0 0 1
+-0.251717 0.352263 -0.371795 0 0 1
+-0.258922 0.371795 -0.0797861 0 1 0
+-0.168398 0.371795 -0.156507 0 1 0
+-0.423312 0.0557688 -0.371795 0 0 1
+-0.5 -0.20565 0.0316839 1 0 0
+-0.047756 0.199415 0.35368 -0.227281 0.973769 0.0108192
+-0.16592 0.11762 -0.333333 0 0 1
+0.246804 -0.0347989 -0.149437 -0.419278 0.906807 -0.0436644
+-0.5 0.0732134 -0.352593 1 0 0
+-0.0104047 0.319911 0.320513 0 0 1
+0.262195 0.0219197 -0.0103154 0.804121 0.594435 0.00610121
+-0.186927 -0.099652 -0.333333 0 0 1
+-0.24736 0.0269527 0.371795 0 0 1
+-0.5 0.337099 0.175588 1 0 0
+0.355459 -0.371795 0.0406809 0 1 0
+0.346297 -0.0364343 0.371795 0 0 1
+0.5 0.238583 -0.357306 1 0 0
+-0.393582 0.289097 -0.371795 0 0 1
+-0.442097 -0.113985 -0.371795 0 0 1
+-0.311829 0.371795 0.210823 0 1 0
+-0.336456 0.371795 0.269755 0 1 0
+0.109472 -0.235159 0.371795 0 0 1
+-0.0538004 -0.084575 -0.333333 0 0 1
+-0.0418682 -0.115094 0.320513 0 0 1
+0.108792 0.371795 0.317874 -0.0600591 0.888693 0.454552
+-0.384897 0.124299 0.320513 0 0 1
+0.339283 -0.371795 -0.100334 0 1 0
+0.021644 -0.0450006 0.320513 0 0 1
+-0.160065 -0.371795 -0.21232 0 1 0
+-0.5 -0.0217026 0.0624376 1 0 0
+0.198595 0.294872 0.200166 0 1 0
+-0.372873 -0.371795 -0.0890037 0 1 0
+-0.338953 0.371795 -0.081433 0 1 0
+-0.199648 0.371795 -0.184022 0 1 0
+0.5 0.217883 -0.306464 1 0 0
+-0.5 -0.245271 0.285769 1 0 0
+-0.392369 -0.371795 0.209439 0 1 0
+0.101445 0.371795 -0.344345 0 1 0
+-0.0194123 -0.0372564 -0.333333 0 0 1
+-0.5 0.334912 0.216679 1 0 0
+0.40801 0.294872 -0.0482934 0 1 0
+-0.5 -0.144197 -0.363021 0.998121 0.0236258 0.0565386
+0.417075 0.294872 0.198819 0 1 0
+-0.155582 0.371795 0.124403 0 1 0
+0.21742 -0.324216 -0.371795 0 0 1
+-0.5 -0.0340028 -0.25846 1 0 0
+0.262255 -0.25519 -0.371795 0 0 1
+0.0831429 0.371795 -0.145146 0 1 0
+0.115763 0.138835 0.320513 0 0 1
+0.316497 0.165254 -0.333333 0.753344 0.221288 0.619277
+-0.188868 -0.219098 -0.333333 0.0192037 -0.0470762 0.998707
+-0.25749 -0.31826 0.320513 0 0 1
+0.193014 -0.0791687 0.371795 -0.383333 0.0974265 0.918458
+-0.302434 -0.187285 0.363219 0.705382 0.708828 0
+0.141109 -0.336884 -0.340646 1 0 0
+0.165433 -0.371795 0.306399 0 1 0
+-0.409442 -0.371795 0.0701278 0 1 0
+-0.428827 0.181954 -0.371795 0 0 1
+0.295693 -0.371795 -0.304227 0 1 0
+-0.010048 -0.210419 0.371795 -0.0876324 0.0866463 0.992377
+-0.5 0.151101 0.150086 1 0 0
+0.471077 -0.294872 0.100982 0 1 0
+0.114692 0.303108 -0.371795 0 0 1
+-0.291181 -0.197318 0.326773 0.54972 0.825399 -0.128549
+0.0490709 -0.294872 0.170623 0 1 0
+-0.391943 -0.106885 0.320513 0 0 1
+0.5 0.204752 0.00962351 1 0 0
+-0.129779 0.371795 0.260366 0 1 0
+-0.5 0.143695 -0.114417 1 0 0
+-0.135165 0.15401 0.365934 -0.581269 0.773082 -0.253911
+-0.372467 -0.371795 0.0313167 0 1 0
+-0.238504 -0.371795 0.222821 0 1 0
+0.148877 -0.253274 0.371795 -0.161836 0.705489 -0.689996
+0.448718 -0.333279 -0.111734 1 0 0
+-0.5 -0.13473 0.145007 1 0 0
+-0.218684 -0.0965078 0.371795 0 0 1
+0.43899 -0.208349 -0.371795 0 0 1
+0.448718 -0.297559 -0.346451 0.825309 -0.562203 0.0528475
+0.5 -0.00197738 0.133099 1 0 0
+-0.373211 0.030463 0.371795 -0.0275449 0.0372533 0.998926
+-0.181141 -0.371795 -0.109186 0 1 0
+-0.240445 0.0423631 -0.0608838 -0.242828 0.970011 -0.0106249
+0.0115572 0.371795 0.270217 0 1 0
+-0.456172 0.0205249 -0.371795 0 0 1
+0.141026 0.309131 -0.228373 1 0 0
+-0.218695 0.0417203 -0.220159 0.258628 0.965829 0.0169315
+0.5 -0.0718414 0.210133 1 0 0
+-0.187869 0.371795 -0.269063 0 1 0
+-0.5 -0.156919 -0.201617 1 0 0
+0.273898 0.294872 -0.0711684 0 1 0
+0.0898745 0.332295 0.320513 0 0 1
+0.106367 -0.294872 0.078292 0 1 0
+-0.108204 -0.135291 0.320513 0 0 1
+0.448718 -0.324573 0.220749 1 0 0
+-0.310009 -0.371795 0.160557 0 1 0
+0.0826826 0.239541 0.371795 0 0 1
+0.351437 0.0567084 -0.371795 0 0 1
+-0.470579 0.0728215 -0.371795 0 0 1
+0.151249 0.185177 -0.333333 0 0 1
+0.327998 0.294872 0.0222509 0 1 0
+0.0145341 -0.128865 -0.333333 0 0 1
+0.0743477 -0.233797 0.371795 0 0 1
+-0.359256 -0.371795 0.119175 0 1 0
+0.195951 0.0159944 -0.186961 0.90652 -0.42216 -0.00161132
+-0.176756 0.371795 -0.369291 -0.0661123 0.940433 -0.33349
+0.250832 -0.0327264 -0.287587 -0.499074 0.866397 0.0167489
+-0.5 -0.266151 0.0858678 1 0 0
+-0.29055 0.0315508 -0.333333 0 0 1
+-0.275715 -0.371795 0.0332713 0 1 0
+-0.5 -0.00441496 0.0474721 1 0 0
+-0.448021 -0.371795 -0.0347491 0.680333 0.711195 -0.177057
+0.221488 -0.0371797 -0.0977091 0.242003 0.970001 0.0230748
+0.238799 0.0375152 -0.12748 0.196035 0.980508 -0.0132043
+0.00987698 0.17887 0.320513 0 0 1
+-0.5 0.0454577 -0.260067 1 0 0
+-0.5 0.190594 -0.228508 1 0 0
+-0.3252 0.371795 -0.368326 -0.0979791 0.75551 -0.647769
+-0.314122 0.235418 0.320513 0 0 1
+0.173113 0.230897 -0.344754 0 1 0
+-0.5 0.140562 -0.0328177 1 0 0
+0.296901 0.294872 -0.330403 0 1 0
+-0.232795 0.177032 0.371795 0 0 1
+-0.5 0.107171 0.0450476 1 0 0
+0.158508 -0.371795 -0.287537 0 1 0
+-0.141154 -0.321005 -0.252101 1 0 0
+-0.0153087 -0.294872 0.171552 0 1 0
+-0.490875 0.320916 0.320513 -0.0284597 0.00990562 0.999546
+-0.443197 -0.244105 0.320513 0 0 1
+-0.129806 -0.294872 -0.267162 -0.0608408 0.99812 -0.00734589
+0.340577 -0.0262876 0.371795 0 0 1
+0.282692 0.294872 0.200278 0 1 0
+-0.402507 -0.122678 0.320513 0 0 1
+-0.448718 -0.295952 0.224747 0.668749 0.742925 0.0289198
+0.434931 -0.0741802 0.320513 0 0 1
+-0.416691 -0.371795 0.0779931 0 1 0
+0.349549 -0.371795 0.048134 0 1 0
+0.199842 0.0441086 0.346352 0.969398 0.245496 -1.68229e-005
+0.141109 -0.318149 -0.291623 1 0 0
+-0.248126 0.354146 0.320513 0 0 1
+0.5 -0.226782 -0.328004 1 0 0
+-0.160108 -0.189842 -0.333333 0 0 1
+-0.0379641 -0.294872 -0.242363 0 1 0
+-0.418181 -0.223583 0.320513 0 0 1
+0.468547 -0.294872 -0.327837 0 1 0
+-0.5 -0.149543 -0.320653 1 0 0
+0.143035 -0.338022 0.320513 -0.421684 0.00863281 0.906702
+-0.0228062 -0.0276748 0.320513 0 0 1
+0.443869 0.0355408 -0.371795 0 0 1
+-0.0792449 0.371795 0.151931 0 1 0
+0.304539 -0.371795 0.215289 0 1 0
+-0.5 -0.105527 0.187129 1 0 0
+0.498134 -0.177852 -0.371795 -0.430265 0.126087 0.893854
+0.0686434 -0.0197406 -0.333333 0 0 1
+-0.0819887 -0.0216764 -0.333333 0 0 1
+0.5 0.11044 -0.0233919 1 0 0
+0.43686 -0.213229 -0.371795 0 0 1
+0.272093 0.258257 -0.371795 0 0 1
+0.0812666 -0.159874 0.320513 0 0 1
+-0.172222 -0.371795 -0.148704 0 1 0
+0.141109 -0.348195 -0.209773 1 0 0
+-0.5 0.258313 -0.0452374 1 0 0
+0.141026 0.299419 -0.36557 0.98825 0.0752065 -0.133067
+-0.448718 -0.349498 -0.0360013 1 0 0
+-0.417919 0.371795 -0.10919 0 1 0
+0.464554 0.278096 0.320513 0 0 1
+-0.448718 -0.315302 0.17965 1 0 0
+0.119407 -0.294872 0.133955 0 1 0
+0.447163 -0.371795 -0.173788 0.830304 -0.5499 -0.0905794
+-0.492364 -0.136198 -0.371795 0.431034 -0.312593 0.84646
+-0.189654 -0.371795 -0.245146 0 1 0
+-0.5 -0.233972 0.109981 1 0 0
+-0.409343 0.336814 -0.371795 0 0 1
+-0.451699 -0.0736813 -0.371795 0 0 1
+0.141026 0.306963 0.306531 1 0 0
+-0.464047 -0.279697 0.320513 0 0 1
+0.300262 -0.221396 0.320513 0 0 1
+-0.0777831 0.371795 0.170785 0 1 0
+0.5 -0.154357 -0.239811 1 0 0
+-0.273825 0.00610789 -0.269979 0.990589 -0.136756 -0.00558848
+0.412858 0.294872 -0.0804498 0 1 0
+0.0123092 -0.294872 -0.129226 0 1 0
+-0.494853 0.371795 -0.334137 -0.393215 0.918584 0.0398274
+0.0943642 0.371795 0.000672667 0 1 0
+0.00283536 0.0168551 -0.333333 0 0 1
+0.282934 -0.328866 0.320513 0 0 1
+0.493661 0.0482864 0.320513 0.0977961 -0.0684777 0.992848
+-0.242073 0.0419267 -0.258334 -0.249542 0.968332 -0.00787323
+0.463659 0.294872 0.0548379 0 1 0
+-0.443539 0.038356 -0.371795 0 0 1
+-0.361284 0.371795 -0.124706 0 1 0
+0.309331 -0.204326 0.320513 0 0 1
+0.5 0.0272888 0.0997 1 0 0
+-0.5 0.354774 0.160392 1 0 0
+0.390451 0.128339 -0.371795 0 0 1
+-0.5 -0.11396 0.0136967 1 0 0
+0.5 0.0590961 -0.357173 1 0 0
+-0.5 -0.254975 0.0440361 1 0 0
+-0.303333 -0.186386 0.359514 0.706344 0.707868 0
+0.220688 0.294872 0.00542293 0 1 0
+0.413728 -0.371795 -0.310285 0 1 0
+-0.025943 0.371795 0.186893 0 1 0
+-0.320513 -0.00388354 -0.35133 1 0 0
+-0.0707669 0.187449 -0.333333 0 0 1
+-0.0277439 -0.294872 0.126964 0 1 0
+0.263709 0.0197582 -0.147185 0.845085 0.534628 0.00230841
+-0.253891 0.371795 -0.0538552 0 1 0
+-0.00870492 -0.294872 -0.192849 0 1 0
+0.5 -0.144773 0.103125 1 0 0
+-0.5 -0.0258021 0.0519288 1 0 0
+0.433681 -0.371795 0.212488 0 1 0
+-0.292293 -0.365316 -0.371795 0.0012426 0.162285 0.986743
+0.0838335 0.0321106 -0.333333 0 0 1
+0.32457 -0.371795 0.044184 0 1 0
+-0.307257 -0.371795 -0.354629 0 1 0
+0.227895 -0.371795 -0.343027 0 1 0
+0.230147 -0.371795 -0.340207 0 1 0
+0.0599515 0.371795 -0.206489 0 1 0
+-0.484457 0.371795 -0.101427 0 1 0
+0.197756 -0.0196519 -0.169154 0.863214 0.503431 0.0376564
+-0.304511 -0.371795 0.0202811 0 1 0
+-0.250676 -0.142248 -0.333333 0 0 1
+-0.149641 -0.0253101 -0.333333 0 0 1
+0.141109 -0.365422 -0.342044 0.968373 0.249376 -0.00810271
+-0.149848 -0.371795 -0.183536 -0.0580216 0.998166 -0.0172443
+0.141109 -0.346246 0.102438 1 0 0
+0.311646 -0.281048 0.320513 0 0 1
+0.092964 -0.0247328 -0.333333 0 0 1
+0.101643 0.371795 0.320455 -0.0270051 0.947746 0.31788
+-0.5 -0.169033 0.0231523 1 0 0
+-0.5 0.207245 -0.226971 1 0 0
+-0.0724397 0.371795 0.00280554 0 1 0
+0.5 -0.240831 0.206396 1 0 0
+0.303477 -0.371795 -0.240826 0 1 0
+-0.448718 -0.3703 0.310772 0.636506 0.758918 -0.137486
+0.268183 0.214535 0.367824 0.628015 0.73566 0.253774
+-0.101482 -0.294872 -0.291549 0 1 0
+0.00225721 0.00559064 0.320513 0 0 1
+-0.271099 0.0162617 -0.194677 0.934 -0.357237 -0.00509365
+0.320418 0.155059 -0.354788 0.998489 0.0548653 -0.00297965
+-0.172226 0.371795 -0.31627 0 1 0
+0.5 -0.2465 0.196013 1 0 0
+0.5 -0.273596 -0.0372699 1 0 0
+0.5 -0.193834 -0.230291 1 0 0
+-0.241674 0.0627785 -0.333333 0 0 1
+-0.376814 0.0624529 -0.371795 0 0 1
+-0.188066 -0.371795 -0.093801 0 1 0
+0.5 0.0346833 -0.336006 1 0 0
+-0.303718 -0.290634 -0.371795 0 0 1
+0.0561894 0.371795 0.268032 0 1 0
+-0.229268 -0.230897 -0.341684 -0.0111559 0.98735 -0.158161
+-0.5 0.297375 0.12317 1 0 0
+-0.399885 -0.283916 -0.371795 0 0 1
+0.5 -0.251086 -0.267169 1 0 0
+0.5 -0.0179687 -0.318527 1 0 0
+-0.231282 0.228653 0.371795 0.0286269 0.212242 0.976798
+0.418771 0.294872 -0.131987 0 1 0
+0.089622 -0.230897 -0.344535 0 1 0
+-0.5 -0.0517719 -0.144012 1 0 0
+0.5 -0.207293 0.0763123 1 0 0
+0.179023 0.294872 -0.240445 0 1 0
+0.253446 -0.0308958 -0.175371 -0.626343 0.779397 -0.0153574
+0.214806 0.294872 0.190621 0 1 0
+0.278228 -0.371795 -0.160478 0 1 0
+0.0355648 -0.00864038 0.320513 0 0 1
+-0.382326 0.371795 -0.352938 0 1 0
+0.0360831 -0.0167851 -0.333333 0 0 1
+-0.5 -0.168764 0.0450935 1 0 0
+0.5 -0.174828 0.217337 1 0 0
+-0.5 0.0984469 -0.0758117 1 0 0
+-0.194055 -0.371795 -0.167142 0 1 0
+0.157616 0.294872 0.157026 0 1 0
+0.25423 0.0407275 -0.333333 0 0 1
+-0.181711 -0.237704 0.371795 0 0 1
+-0.324332 0.371795 0.185165 0 1 0
+0.5 0.0608744 0.033526 1 0 0
+0.464656 -0.294872 0.15077 0 1 0
+-0.173921 0.251662 0.343525 -0.212538 0.977153 0
+-0.5 -0.11049 0.148083 1 0 0
+-0.437615 0.257313 0.320513 0 0 1
+0.0383868 0.0852123 0.320513 0 0 1
+0.5 0.159675 0.0259149 1 0 0
+-0.5 0.282034 0.303237 1 0 0
+-0.167909 -0.371795 -0.0277498 0 1 0
+0.0717676 0.371795 -0.0720985 0 1 0
+-0.483748 -0.139598 0.320513 0 0 1
+-0.0943158 0.197125 -0.333333 0 0 1
+-0.00868248 -0.188004 -0.333333 0 0 1
+-0.213528 0.039873 -0.183419 0.415662 0.909517 0.00183098
+-0.382873 0.371795 -0.204607 0 1 0
+-0.479378 -0.294872 -0.217696 0 1 0
+0.354931 0.294872 -0.0472109 0 1 0
+0.5 0.111668 0.275641 1 0 0
+0.205754 0.294872 0.0479456 0 1 0
+0.227814 0.038203 -0.226833 -0.0957359 0.995369 0.00871068
+-0.5 0.0492116 -0.209809 1 0 0
+0.437764 0.203742 0.320513 0 0 1
+0.265937 -0.371795 -0.0514028 0 1 0
+-0.0124893 -0.294872 -0.224107 0 1 0
+-0.213488 0.371795 -0.0811139 0 1 0
+0.211221 0.156741 0.371795 0 0 1
+-0.368816 -0.371795 0.146204 0 1 0
+-0.378205 -0.0336017 0.371795 -0.327735 0.129033 0.935917
+0.250498 0.230293 -0.358597 0.114568 0.993373 -0.00918676
+0.5 0.119167 -0.0231918 1 0 0
+-0.0530177 -0.294872 0.226691 0 1 0
+-0.486429 0.371795 -0.197141 0 1 0
+-0.218858 -0.05021 0.371795 0 0 1
+-0.0760328 -0.294872 -0.366634 0.0392979 0.98564 0.164226
+0.352479 0.294872 0.287319 0 1 0
+0.11481 -0.228065 0.371795 0 0 1
+0.453614 0.294872 0.201445 0 1 0
+0.211794 -0.325375 0.320513 0 0 1
+-0.390353 0.0913184 -0.371795 0 0 1
+-0.0395822 0.371795 0.0943046 0 1 0
+-0.142987 -0.164643 -0.333333 0 0 1
+-0.0127078 -0.294872 -0.0284089 0 1 0
+0.5 -0.055384 0.315503 0.910605 0.128642 0.392746
+0.327863 -0.371795 0.0457284 0 1 0
+0.336497 0.148316 0.365191 0.800531 0.599291 0
+0.138385 -0.0216025 0.320513 0 0 1
+-0.133928 -0.294872 0.286886 -0.397991 0.912708 -0.0925585
+-0.299094 0.324106 0.320513 0 0 1
+-0.270123 -0.182837 0.371795 0 0 1
+0.5 -0.0477217 -0.209848 1 0 0
+-0.5 -0.258939 0.204307 1 0 0
+0.31277 -0.371795 -0.363362 0.0104713 0.990118 0.139845
+0.0193697 -0.294872 -0.23581 0 1 0
+-0.0619286 -0.250476 -0.371795 0 0 1
+-0.5 -0.158387 -0.0149068 1 0 0
+-0.5 -0.251691 -0.122841 1 0 0
+-0.356774 0.189378 -0.371795 0 0 1
+0.0940895 0.242873 0.371795 0 0 1
+0.414058 -0.303435 -0.371795 0 0 1
+0.5 -0.0773428 -0.217559 1 0 0
+0.232738 0.294872 -0.101647 0 1 0
+-0.198358 -0.371795 -0.264997 0 1 0
+-0.396409 -0.00344348 0.320513 0 0 1
+0.5 0.281234 -0.0941627 1 0 0
+0.0360868 0.301799 -0.371795 0 0 1
+-0.399322 -0.0681296 0.320513 0 0 1
+0.291324 0.294872 0.0249827 0 1 0
+0.5 -0.071189 -0.363683 0.996069 0.0238491 -0.0853047
+-0.384356 0.001827 0.331317 0.999991 -0.00262791 -0.00323863
+0.149974 0.294872 -0.330172 0.0601045 0.998192 0
+0.111851 0.371795 0.0271525 0 1 0
+-0.5 -0.0706172 -0.193095 1 0 0
+0.5 -0.0257516 0.291093 1 0 0
+-0.347308 0.371795 -0.0532466 0 1 0
+-0.204919 0.0349106 -0.134795 0.583516 0.811861 -0.0197601
+0.5 0.11249 -0.306195 1 0 0
+0.292695 0.294872 -0.184988 0 1 0
+-0.266584 0.024558 -0.305072 0.832673 -0.553559 -0.0150998
+0.141109 -0.34669 0.1994 1 0 0
+0.369256 -0.085208 0.34519 0.93696 -0.349436 0
+0.200549 -0.166393 0.371795 0 0 1
+-0.105228 -0.294872 -0.0932721 0 1 0
+-0.326092 -0.371795 0.180559 0 1 0
+-0.423914 0.371795 -0.342626 0 1 0
+-0.143845 -0.143788 -0.333333 0 0 1
+-0.443586 0.371795 -0.00981917 0 1 0
+0.0449559 -0.294872 -0.0879546 0 1 0
+0.5 -0.0726064 -0.344497 1 0 0
+-0.318549 0.371795 0.00847305 0 1 0
+0.5 0.240481 -0.190634 1 0 0
+0.141109 -0.310757 -0.316143 1 0 0
+0.0382394 0.371795 -0.162804 0 1 0
+-0.5 -0.147562 0.316718 0.948134 0.0495005 -0.313993
+0.121567 0.256282 0.332081 0.0149217 0.998634 0.0500721
+-0.105793 -0.0958753 -0.333333 0 0 1
+0.238529 -0.371795 -0.105384 0 1 0
+0.0325468 -0.294872 0.000413896 0 1 0
+-0.215803 0.040934 -0.242296 0.3409 0.940086 -0.00497652
+-0.457163 -0.294872 0.301364 0.252482 0.965911 0.0571829
+-0.487691 0.360226 -0.371795 0 0 1
+-0.141154 -0.3108 0.23507 1 0 0
+-0.5 0.234727 0.126577 1 0 0
+0.5 0.00485385 -0.179412 1 0 0
+-0.295935 0.296379 0.320513 0 0 1
+-0.5 -0.228559 0.144353 1 0 0
+-0.5 -0.100712 0.0295121 1 0 0
+0.0711575 -0.0896739 -0.333333 0 0 1
+0.209538 -0.0319082 -0.0743098 0.540842 0.840868 0.0207556
+-0.023713 -0.294872 0.298133 0 1 0
+-0.480468 -0.294872 -0.216369 0 1 0
+-0.235723 0.330197 -0.371795 0 0 1
+-0.5 0.166383 0.232829 1 0 0
+-0.135546 0.0182808 -0.333333 0 0 1
+0.140019 0.371795 0.0470367 0.359811 0.93153 -0.0527975
+-0.407387 -0.181304 -0.371795 0 0 1
+-0.5 -0.179066 -0.159173 1 0 0
+0.321256 -0.371795 -0.0393967 0 1 0
+0.410379 0.294872 -0.202937 0 1 0
+0.5 0.151091 -0.0423865 1 0 0
+0.022027 -0.294872 -0.241565 0 1 0
+-0.5 -0.221462 0.29241 1 0 0
+-0.141154 -0.322529 -0.108772 1 0 0
+0.269302 -0.371795 0.302126 0 1 0
+-0.5 -0.040884 0.215757 1 0 0
+-0.5 0.351851 -0.0554389 1 0 0
+0.123495 0.371795 0.086055 0 1 0
+-0.480256 0.234518 -0.371795 0 0 1
+0.5 0.124159 0.208807 1 0 0
+-0.0137661 0.371795 -0.31609 0 1 0
+0.275527 -0.236111 -0.371795 0 0 1
+-0.25437 0.341179 -0.371795 0 0 1
+-0.494031 0.371795 0.0157531 -0.46904 0.883133 -0.00879511
+-0.5 -0.0949904 0.273026 1 0 0
+0.141026 0.296906 -0.0477576 0.874574 0.481741 -0.055183
+-0.448718 -0.297319 0.10321 0.813934 0.58068 0.017965
+0.285133 0.166833 0.371795 0 0 1
+-0.11339 0.371795 0.182322 0 1 0
+-0.0545552 0.348795 0.320513 0 0 1
+-0.426303 0.371795 0.23419 0 1 0
+0.265432 -0.0163261 -0.0685979 0.900448 -0.434964 0
+0.200434 0.0234771 -0.250131 0.798709 -0.601586 0.0125816
+-0.416431 0.371795 0.101901 0 1 0
+0.13606 -0.294872 -0.0512295 0.390038 0.915665 0.097094
+-0.5 -0.0173441 -0.14842 1 0 0
+0.320513 -0.091309 -0.366702 0.902673 -0.131321 0.409801
+0.00113934 0.371795 -0.324089 0 1 0
+0.182421 0.0933528 0.352279 0.908968 0.416865 0
+0.256209 -0.105584 0.371795 0 0 1
+0.5 -0.24246 0.0378935 1 0 0
+0.452224 -0.146502 0.320513 0 0 1
+-0.5 0.040723 -0.319272 1 0 0
+-0.190741 -0.371795 0.21165 0 1 0
+0.174666 -0.312059 -0.371795 0 0 1
+0.273197 0.294872 0.163862 0 1 0
+-0.5 0.232193 0.278363 1 0 0
+-0.445634 0.371795 0.314942 0.0392969 0.948969 0.312911
+0.247137 0.294872 0.0515085 0 1 0
+0.5 0.187387 0.308041 0.999996 0.000677577 0.0028531
+0.395824 -0.371795 -0.0231722 0 1 0
+0.5 0.112164 -0.071484 1 0 0
+0.406576 -0.122541 -0.371795 0 0 1
+-0.421606 -0.371795 -0.0545522 0 1 0
+0.448718 -0.329091 0.264552 1 0 0
+-0.5 -0.283104 0.0926164 1 0 0
+0.5 0.118929 0.204475 1 0 0
+0.242607 0.272988 0.320513 0 0 1
+0.112426 0.371795 0.251079 0 1 0
+-0.279979 -0.371795 0.240446 0 1 0
+-0.038205 -0.256282 0.362225 -0.00404921 0.999977 -0.00539312
+0.296474 0.209462 -0.336537 0.6955 0.688158 0.206685
+0.488649 -0.294872 0.109056 0 1 0
+0.0387938 0.252987 -0.371795 0 0 1
+0.452677 -0.0833736 0.320513 0 0 1
+-0.370818 0.371795 0.232348 0 1 0
+0.0200243 0.371795 -0.0326354 0 1 0
+0.225679 0.294872 0.315258 0.0313923 0.848845 0.527709
+0.363363 0.277595 -0.371795 0 0 1
+0.268215 0.294392 0.320513 0 0.672089 0.740471
+-0.422527 -0.371795 -0.0383788 0 1 0
+-0.5 -0.0521221 0.247699 1 0 0
+-0.448718 -0.318196 -0.226242 1 0 0
+0.0213995 0.150675 0.320513 0 0 1
+-0.5 -0.0142909 -0.139727 1 0 0
+-0.160757 0.257065 -0.371795 0 0 1
+0.280988 0.294872 -0.245617 0 1 0
+-0.156315 0.0598611 -0.333333 0 0 1
+0.5 -0.16484 -0.331502 1 0 0
+-0.5 0.129522 0.0245432 1 0 0
+-0.43511 -0.21284 0.320513 0 0 1
+-0.493358 0.000655129 -0.371795 0.182872 0.077861 0.980049
+-0.0735606 -0.294872 0.30038 0 1 0
+-0.5 -0.209383 -0.186406 1 0 0
+0.141026 0.335078 0.121111 1 0 0
+0.396181 0.178098 -0.371795 0 0 1
+0.291535 0.294872 0.220829 0 1 0
+-0.272985 0.371795 -0.305677 0 1 0
+-0.164091 -0.100133 -0.333333 0 0 1
+-0.12723 0.371795 -0.0360179 0 1 0
+-0.193056 0.174667 0.371795 0 0 1
+0.393844 0.262298 0.320513 0 0 1
+0.194033 0.0668792 0.323369 0.757499 0.246818 -0.604381
+-0.5 -0.080933 0.0182394 1 0 0
+-0.170096 0.113643 0.36621 0.793314 -0.49576 0.353377
+0.088169 0.371795 -0.0812678 0 1 0
+-0.406292 0.371795 0.173166 0 1 0
+-0.5 -0.284149 0.0354474 0.999403 0.034553 -0.000440275
+-0.419013 -0.371795 -0.242362 0 1 0
+-0.337976 -0.371795 -0.149915 0 1 0
+-0.380138 -0.371795 -0.150939 0 1 0
+0.211705 0.230897 -0.344594 -0.046003 0.995605 0.0815689
+0.1312 -0.294872 0.30975 0.00756392 0.99997 0.00177955
+0.363528 -0.329391 -0.371795 0 0 1
+0.319591 0.294872 -0.258786 0 1 0
+0.5 -0.0503651 0.14156 1 0 0
+-0.207656 0.0368268 -0.226784 0.519761 0.854291 0.00596326
+0.5 0.202495 0.197516 1 0 0
+0.315308 -0.371795 -0.189168 0 1 0
+0.267869 0.00957887 -0.210637 0.96331 0.268124 -0.0119611
+0.292024 0.294872 -0.0953648 0 1 0
+-0.439914 -0.371795 -0.184509 0 1 0
+0.0502467 -0.212502 -0.333333 0 0 1
+0.381744 0.294872 0.125579 0 1 0
+0.5 0.262828 0.298969 1 0 0
+0.5 0.259182 0.120138 1 0 0
+0.125445 -0.294872 0.0768533 0 1 0
+-0.5 0.138823 -0.28588 1 0 0
+0.18841 0.294872 -0.209589 0 1 0
+-0.19528 0.367665 0.320513 0.0196745 0.493697 0.869411
+-0.077309 0.0861419 -0.333333 0 0 1
+-0.202177 0.371795 0.116454 0 1 0
+-0.492692 -0.294872 -0.0198026 0.205877 0.97802 -0.0330411
+0.112982 0.247316 0.371795 -0.0157232 0.0468261 0.998779
+0.484155 0.294872 0.0287001 0 1 0
+-0.183962 -0.127526 -0.333333 0 0 1
+-0.111629 0.371795 -0.325705 0 1 0
+0.5 -0.187388 -0.302106 1 0 0
+-0.5 0.110543 0.121088 1 0 0
+0.230398 0.294872 0.186729 0 1 0
+-0.110035 0.256282 0.337629 0 1 0
+0.255995 -0.371795 0.146687 0 1 0
+0.354863 0.294872 0.136209 0 1 0
+0.461315 -0.294872 -0.246915 0 1 0
+-0.43464 -0.314692 -0.371795 0 0 1
+0.406431 -0.371795 -0.270223 0 1 0
+0.5 0.291217 -0.0661547 0.964517 0.261462 -0.0366826
+0.312766 0.294872 0.0637188 0 1 0
+-0.5 0.181194 -0.012058 1 0 0
+0.5 -0.191381 -0.0904193 1 0 0
+-0.24139 -0.371795 -0.34192 0 1 0
+-0.107055 -0.174654 0.364347 0.490469 0.869174 0.0630597
+0.192722 -0.058114 0.320513 -0.429401 0.0418994 0.902141
+-0.412673 -0.0189542 0.320513 0 0 1
+0.280147 0.22148 -0.360369 0.452335 0.890072 0.0562547
+-0.284226 0.0295877 -0.333333 0 0 1
+0.5 0.111657 -0.189891 1 0 0
+-0.5 0.0766402 -0.279213 1 0 0
+-0.5 -0.0170793 0.0653693 1 0 0
+-0.109524 0.20295 0.371795 0 0 1
+-0.456063 -0.294872 0.26134 0.101557 0.992581 -0.0668473
+-0.347957 0.359829 0.320513 0 0 1
+0.33359 0.0421904 0.371795 0 0 1
+0.212502 -0.371795 0.20502 0 1 0
+-0.144105 -0.186026 -0.333333 0 0 1
+0.0773305 -0.294872 -0.318188 0 1 0
+0.5 0.213714 -0.342439 1 0 0
+0.408325 -0.0329527 -0.371795 0 0 1
+-0.141154 -0.334108 0.0178173 1 0 0
+0.141026 0.314078 0.149781 1 0 0
+-0.489213 0.371795 -0.285312 -0.0589772 0.998017 0.0220116
+0.141109 -0.344001 0.0445227 1 0 0
+0.233913 -0.371795 0.0812203 0 1 0
+-0.151867 0.254589 0.358744 -0.0713375 0.997452 0
+0.168615 -0.371795 -0.322354 0 1 0
+0.141109 -0.30148 -0.0781424 0.997945 0.060561 -0.0209529
+-0.495898 -0.132263 0.320513 -0.149698 0.061774 0.9868
+-0.0301098 0.371795 -0.0500544 0 1 0
+-0.5 0.293504 0.293497 1 0 0
+-0.5 0.338688 -0.34474 1 0 0
+0.134764 0.371795 -0.171279 0.0678171 0.99762 0.0124895
+-0.5 -0.0354714 -0.24275 1 0 0
+-0.295309 0.371795 -0.17107 0 1 0
+0.488042 0.294872 0.122162 0 1 0
+-0.141154 -0.342397 -0.338416 1 0 0
+-0.103106 0.371795 0.0800189 0 1 0
+-0.22709 -0.0827573 -0.333333 0 0 1
+0.101697 -0.203655 0.371795 0 0 1
+0.171815 -0.371795 -0.27784 0 1 0
+-0.5 0.158632 -0.0192202 1 0 0
+-0.212488 -0.371795 0.312457 -0.00542115 0.999057 -0.0430819
+-0.5 0.0375931 0.0626836 1 0 0
+0.143431 0.146216 0.323806 0.577212 0.52989 -0.621323
+-0.461126 -0.0915165 -0.371795 0 0 1
+-0.155103 0.25841 -0.371795 0 0 1
+0.0276796 -0.230897 -0.34915 0 1 0
+-0.263041 -0.0434486 -0.333333 -0.0205768 -0.0283896 0.999385
+0.156839 0.055591 -0.333333 0 0 1
+-0.200079 0.324514 0.320513 0 0 1
+0.0914849 0.183079 0.340041 0.464051 0.885809 0
+-0.404084 0.371795 0.180495 0 1 0
+0.169383 0.203748 -0.333333 0 0 1
+-0.00618912 0.371795 0.13051 0 1 0
+0.155386 -0.0926637 -0.333333 0 0 1
+0.444753 0.294872 -0.333172 0 1 0
+-0.5 -0.0258916 -0.242248 1 0 0
+0.5 -0.0629714 -0.361628 1 0 0
+-0.161866 -0.371795 -0.00851514 0 1 0
+-0.358105 0.371795 -0.191877 0 1 0
+0.448718 -0.309243 -0.111709 1 0 0
+0.24549 -0.223827 -0.333333 -0.0762359 -0.351766 0.932979
+-0.285439 0.371795 -0.0256115 0 1 0
+-0.317737 -0.371795 0.140395 0 1 0
+-0.5 0.196454 0.0750725 1 0 0
+-0.290733 0.121036 0.371795 0 0 1
+-0.5 0.343637 -0.26643 1 0 0
+-0.333085 -0.371795 0.0347962 0 1 0
+0.5 -0.0563642 -0.0204375 1 0 0
+0.5 0.0420734 -0.0755008 1 0 0
+0.247914 0.0503388 -0.333333 0 0 1
+-0.5 0.294848 0.227027 1 0 0
+0.000811062 -0.0992397 -0.333333 0 0 1
+0.141109 -0.297783 -0.0756333 0.968703 0.241347 0.0580274
+-0.124785 -0.0829585 0.320513 0 0 1
+0.0305198 0.087484 -0.333333 0 0 1
+0.281481 0.0833856 0.371795 0 0 1
+-0.0342336 0.371795 -0.279058 0 1 0
+-0.320513 -0.0180169 -0.334848 -0.488385 0.0846856 0.868509
+-0.5 0.0224179 -0.198638 1 0 0
+-0.159073 -0.371795 -0.022834 0 1 0
+-0.210918 0.0386564 -0.058253 0.48886 0.872359 0.00250601
+0.195043 -0.371795 -0.322256 0 1 0
+0.0501282 0.371795 0.260636 0 1 0
+-0.245256 0.371795 0.0903038 0 1 0
+0.0115538 -0.260916 0.320513 -0.0879005 -0.448225 0.889588
+0.000879717 0.371795 -0.331344 0 1 0
+-0.0504782 -0.294872 -0.35425 0 1 0
+0.414905 -0.185153 0.320513 0 0 1
+-0.468389 0.0200629 -0.371795 0 0 1
+0.5 -0.0197096 0.234827 1 0 0
+0.334788 0.081142 0.371795 0 0 1
+-0.121366 0.371795 0.212736 0 1 0
+0.286604 0.0603915 -0.333333 0 0 1
+-0.499094 -0.0335589 0.320513 -0.548088 -0.0049979 0.836406
+0.2841 -0.371795 0.0514314 0 1 0
+0.0547799 -0.0312869 -0.333333 0 0 1
+0.25546 0.294872 -0.196234 0 1 0
+-0.0676001 0.230897 -0.342671 0.0122775 0.997841 0.0645155
+0.269596 -0.371795 0.0320904 0 1 0
+0.5 0.0786298 0.0330547 1 0 0
+-0.471137 0.158866 -0.371795 0 0 1
+-0.255572 -0.0356433 -0.185978 0.59791 0.801544 0.00559849
+-0.5 0.305911 0.240303 1 0 0
+0.195803 -0.371795 0.040979 0 1 0
+-0.0539331 0.371795 -0.0928882 0 1 0
+-0.5 -0.12793 0.318532 -0.590834 0.0445242 0.805564
+-0.345411 0.0242714 0.371795 0 0 1
+0.209171 0.0316507 -0.144802 -0.566524 0.823799 -0.0201455
+0.0196708 -0.294872 -0.346892 0 1 0
+-0.246852 0.371795 0.310102 -0.00342826 0.99994 0.0103912
+-0.288892 -0.371795 0.0834958 0 1 0
+0.114274 0.234786 -0.371795 -0.0450248 0.292606 0.955172
+-0.348885 -0.371795 -0.365741 0.00549071 0.986867 0.161439
+-0.379589 0.0234452 -0.371795 0 0 1
+0.5 0.224249 -0.176535 1 0 0
+-0.5 -0.0190739 -0.334326 1 0 0
+0.187926 -0.371795 -0.0576073 0 1 0
+0.441984 0.202777 -0.371795 0 0 1
+0.155992 -0.245997 0.371795 0.0808289 -0.102154 0.991479
+0.354453 -0.371795 -0.00274218 0 1 0
+0.20433 0.244438 0.329583 0.319687 0.922004 0.218423
+-0.343105 0.0660591 0.371795 0 0 1
+0.238794 0.294872 -0.362261 0.0435651 0.998231 -0.0404698
+-0.12731 -0.156652 -0.333333 0 0 1
+0.39089 0.12067 0.320513 0 0 1
+-0.405134 -0.123124 0.320513 0 0 1
+-0.489096 0.371795 -0.268137 0 1 0
+0.0725973 0.022429 -0.333333 0 0 1
+-0.5 0.121865 -0.0913751 1 0 0
+-0.133973 -0.00431546 -0.333333 0 0 1
+-0.0823021 0.371795 -0.232142 0 1 0
+-0.281978 0.204207 0.34921 -0.599288 0.800534 0
+0.328451 0.0295281 -0.371795 0.129621 0.00389464 0.991556
+0.0386797 -0.294872 0.305906 0 1 0
+-0.445507 -0.371795 0.268866 0.276282 0.941506 0.192965
+0.080012 0.0927056 0.320513 0 0 1
+-0.384438 0.239295 -0.371795 0 0 1
+0.190482 0.294872 0.123434 0 1 0
+-0.0616506 0.140535 0.320513 0 0 1
+-0.448718 -0.338884 0.173079 1 0 0
+0.5 0.0372395 -0.342233 1 0 0
+-0.249346 -0.371795 0.248529 0 1 0
+0.0254684 0.139602 0.320513 0 0 1
+0.320206 0.294872 0.201837 0 1 0
+-0.167662 0.371795 0.110031 0 1 0
+-0.00429674 -0.256282 0.341666 0 1 0
+-0.5 0.196631 -0.34921 1 0 0
+-0.411692 -0.371795 -0.292924 0 1 0
+0.5 0.175659 -0.237538 1 0 0
+0.5 0.157665 -0.0434257 1 0 0
+-0.0945767 0.371795 0.258517 0 1 0
+-0.5 -0.0656176 -0.339598 1 0 0
+0.454202 0.294872 0.265447 0 1 0
+0.311716 0.294872 -0.219312 0 1 0
+0.22205 -0.230015 -0.333333 0.0178847 -0.612385 0.790357
+0.00447186 -0.294872 -0.237368 0 1 0
+-0.5 -0.268536 -0.360436 1 0 0
+-0.5 0.191084 -0.290484 1 0 0
+0.325157 0.193312 -0.371795 0 0 1
+-0.5 0.294255 -0.0886011 1 0 0
+0.0652514 0.254777 -0.371795 0 0 1
+0.314876 -0.371795 -0.186688 0 1 0
+0.5 0.249554 0.274916 1 0 0
+0.269562 0.28251 0.320513 0.0100766 0.0224857 0.999696
+-0.261094 -0.371795 0.286909 0 1 0
+-0.149041 -0.371795 0.0768565 -0.161257 0.98539 -0.0548016
+-0.5 -0.197368 -0.213413 1 0 0
+0.0458273 -0.167134 -0.333333 0 0 1
+0.265932 -0.0263724 0.371795 0 0 1
+0.198505 -0.0207222 -0.23346 0.807144 0.590075 -0.0181721
+-0.446439 -0.371795 -0.36706 0.570392 0.772264 0.279752
+0.5 -0.076696 0.0457842 1 0 0
+-0.5 -0.290952 -0.329077 0.950193 0.309976 0.0323885
+0.0720928 0.00643799 0.320513 0 0 1
+-0.0473931 -0.294872 0.0464159 0 1 0
+-0.392322 0.371795 0.00442056 0 1 0
+0.0934484 0.105991 -0.333333 0 0 1
+-0.5 -0.13293 -0.028686 1 0 0
+0.5 -0.20911 -0.322666 1 0 0
+-0.5 0.134692 -0.369939 0.848735 -0.194809 0.491629
+0.471654 0.294872 0.267449 0 1 0
+-0.402025 -0.102977 0.320513 0 0 1
+-0.00781017 -0.0286533 0.320513 0 0 1
+0.358711 0.294872 0.306956 0 1 0
+0.5 0.137345 0.0648831 1 0 0
+0.5 -0.0305099 -0.17694 1 0 0
+0.448899 0.294872 -0.337855 0 1 0
+0.215318 -0.371795 0.0290001 0 1 0
+-0.5 -0.131459 0.138793 1 0 0
+0.398126 0.294872 0.260698 0 1 0
+-0.5 0.255231 0.217779 1 0 0
+-0.0782186 -0.0960897 -0.333333 0 0 1
+-0.410708 0.371795 -0.0179815 0 1 0
+-0.484832 0.176913 0.320513 0 0 1
+0.5 -0.0174264 0.107118 1 0 0
+0.413305 0.294872 0.103285 0 1 0
+-0.5 -0.147096 0.152397 1 0 0
+-0.270964 -0.318337 0.320513 0 0 1
+0.164939 -0.168603 -0.333333 0 0 1
+0.5 0.164734 -0.0482836 1 0 0
+0.357681 0.0803832 -0.371795 0 0 1
+0.348493 0.294872 0.00546893 0 1 0
+-0.482056 0.326973 -0.371795 0 0 1
+0.377207 -0.209138 -0.371795 0 0 1
+-0.179558 0.239424 0.371795 -0.0137351 0.064129 0.997847
+0.290398 0.294872 0.11091 0 1 0
+0.453098 -0.294872 0.312538 -0.355691 0.916856 0.181272
+-0.456013 0.00295273 -0.371795 0 0 1
+-0.5 0.324284 0.220739 1 0 0
+-0.345981 0.134568 0.338318 0.866259 -0.499524 -0.00850556
+-0.369366 -0.371795 -0.363222 0.0385543 0.997286 0.0627191
+-0.11301 0.371795 0.151122 0 1 0
+0.0117382 -0.19957 -0.333333 0 0 1
+-0.0283892 0.153135 -0.333333 0 0 1
+-0.295631 -0.126175 -0.333333 0 0 1
+0.391728 0.265583 0.320513 0 0 1
+-0.25599 0.0353512 -0.179438 -0.569971 0.820914 0.0351186
+-0.27163 0.371795 -0.257825 0 1 0
+0.5 -0.100439 -0.181492 1 0 0
+0.0309743 0.371795 0.175438 0 1 0
+-0.0346614 0.371795 0.0809502 0 1 0
+0.278608 -0.20673 0.353079 -0.599291 0.800532 0
+0.294856 0.00660486 0.371795 0 0 1
+-0.230137 -0.371795 0.268973 0 1 0
+0.0769451 0.0834078 -0.333333 0 0 1
+0.326816 0.294872 -0.193052 0 1 0
+0.5 0.0533835 0.182907 1 0 0
+0.5 0.201373 -0.134087 1 0 0
+-0.5 0.316108 -0.121242 1 0 0
+-0.141154 -0.346862 -0.244768 1 0 0
+-0.5 -0.0298541 -0.0580435 1 0 0
+-0.219726 -0.358023 0.320513 0 0 1
+-0.210606 -0.371795 -0.023876 0 1 0
+-0.457322 0.347736 -0.371795 0 0 1
+0.5 0.117663 0.104166 1 0 0
+-0.371956 -0.0309371 -0.371795 0 0 1
+-0.00517873 0.0214585 -0.333333 0 0 1
+0.5 -0.0822233 -0.320542 1 0 0
+0.147016 0.165867 0.371795 0 0 1
+-0.426164 0.255668 0.320513 0 0 1
+-0.150254 0.230897 -0.36701 -0.074425 0.810415 0.581109
+-0.396398 -0.371795 -0.0202639 0 1 0
+0.5 -0.245226 0.00799742 1 0 0
+0.470509 0.294872 0.24306 0 1 0
+-0.5 0.121723 -0.305441 1 0 0
+0.225335 -0.371795 -0.00286806 0 1 0
+0.5 0.034602 -0.36786 0.95853 -0.0303401 -0.283373
+-0.218735 -0.371795 -0.367695 -0.0432492 0.81086 0.58364
+-0.5 0.225257 0.200741 1 0 0
+-0.5 0.252565 -0.106699 1 0 0
+-0.159178 -0.371795 0.232834 0 1 0
+-0.492278 0.371795 0.0606976 -0.0905325 0.995799 -0.013734
+0.0654199 0.371795 -0.155517 0 1 0
+0.0960356 0.114932 0.320513 0 0 1
+0.5 0.0538088 -0.113968 1 0 0
+-0.045012 -0.199873 0.343228 0.172125 0.98507 -0.0031247
+0.114403 -0.294872 0.228251 0 1 0
+-0.472857 0.371795 -0.0494622 0 1 0
+-0.416218 0.371795 -0.180205 0 1 0
+0.125747 0.0562684 0.320513 0 0 1
+-0.229429 0.269323 -0.371795 0 0 1
+0.448718 -0.301997 0.313708 0.966043 -0.145336 0.213631
+-0.25002 -0.371795 0.00884406 0 1 0
+0.5 -0.239969 0.134164 1 0 0
+0.272407 0.262468 -0.371795 0 0 1
+0.5 0.18325 0.197269 1 0 0
+-0.407207 -0.185574 0.320513 0 0 1
+-0.5 -0.0116172 -0.0386101 1 0 0
+0.5 -0.143986 -0.292228 1 0 0
+-0.5 -0.174569 0.105841 1 0 0
+-0.0927081 0.324845 0.320513 0 0 1
+-0.5 0.237753 0.208771 1 0 0
+0.165736 -0.371795 0.0867179 0 1 0
+-0.5 0.206504 -0.146681 1 0 0
+-0.299541 -0.371795 0.0186825 0 1 0
+0.140521 -0.149377 0.356058 -0.701924 0.712216 -0.00713652
+-0.339293 -0.325181 0.320513 0 0 1
+0.192841 -0.00609217 -0.0828006 0.984403 0.175662 0.00969089
+-0.127442 -0.294872 -0.28277 0 1 0
+0.181799 -0.249949 0.349763 -0.212548 0.977151 0
+-0.414805 -0.371795 -0.166324 0 1 0
+-0.448718 -0.315181 0.18516 1 0 0
+0.362793 0.294872 0.275451 0 1 0
+0.0443685 0.0714946 -0.333333 0 0 1
+-0.43546 -0.371795 0.293028 0 1 0
+-0.18344 0.36261 0.320513 0 0 1
+-0.141154 -0.355142 0.231782 1 0 0
+-0.5 0.220372 -0.255241 1 0 0
+-0.489055 0.0893782 0.320513 0 0 1
+-0.486594 -0.260316 -0.371795 0 0 1
+0.125633 -0.294872 -0.186643 0 1 0
+-0.423947 -0.371795 0.276343 0 1 0
+0.143372 0.100236 -0.333333 0 0 1
+-0.330026 0.371795 0.0311655 0 1 0
+-0.329586 0.371795 0.259758 0 1 0
+0.5 0.172978 -0.146614 1 0 0
+0.473313 -0.294872 0.158064 0 1 0
+0.5 0.19907 0.0649673 1 0 0
+0.199453 -0.215248 0.371795 0 0 1
+-0.5 -0.156174 -0.367185 0.847122 -0.160438 0.5066
+0.281321 -0.344095 0.320513 0 0 1
+0.5 -0.0496603 0.0865451 1 0 0
+0.131591 0.371795 0.0636117 0.105868 0.992483 -0.0613922
+0.118006 -0.167366 0.347673 -0.614224 0.789132 0
+-0.353525 0.371795 0.0713178 0 1 0
+0.141026 0.336186 0.266935 1 0 0
+0.141109 -0.316564 0.279013 1 0 0
+-0.5 0.268247 -0.274769 1 0 0
+0.259554 0.235715 0.320513 0 0 1
+-0.182767 0.289093 -0.371795 0 0 1
+-0.169952 -0.0651031 -0.333333 0 0 1
+0.448718 -0.31564 -0.0812932 1 0 0
+0.5 0.164009 0.270499 1 0 0
+-0.5 0.286021 0.215941 1 0 0
+0.448718 -0.340721 -0.3366 1 0 0
+0.5 0.0293903 0.138551 1 0 0
+-0.213278 0.371795 -0.192756 0 1 0
+0.5 0.254186 -0.346272 1 0 0
+-0.0843329 -0.294872 0.0884845 0 1 0
+-0.0540743 -0.0713528 -0.333333 0 0 1
+0.453164 -0.294872 0.0469656 -0.299748 0.947451 0.111748
+0.348186 -0.130567 -0.371795 0 0 1
+-0.407748 -0.0672053 0.320513 0 0 1
+-0.0479401 0.371795 -0.193175 0 1 0
+0.320513 0.0742053 -0.334498 0.744347 0.0958647 0.660876
+0.35076 -0.123477 -0.371795 0 0 1
+-0.5 0.0728591 0.0700372 1 0 0
+0.0371397 -0.209459 0.371795 -0.0198283 0.0389371 0.999045
+0.320513 -0.132149 -0.341488 0.996555 0.0676872 0.047921
+0.201014 -0.245675 0.334315 -0.287456 0.957779 -0.00538218
+0.477517 0.0111196 0.320513 0 0 1
+0.233849 0.26839 0.320513 0 0 1
+0.112205 -0.294872 0.0889394 0 1 0
+-0.5 0.0138405 -0.108491 1 0 0
+0.5 -0.1163 0.030975 1 0 0
+-0.5 0.157661 -0.0176078 1 0 0
+-0.308511 -0.278034 -0.371795 0 0 1
+0.371776 0.294872 -0.32058 0 1 0
+0.5 -0.029735 -0.330798 1 0 0
+-0.204505 -0.00906777 0.344027 0.996647 0.0818246 -0.000278322
+0.165441 -0.320015 -0.371795 0 0 1
+0.5 0.159796 -0.141233 1 0 0
+0.385241 0.294872 0.0935377 0 1 0
+-0.408094 -0.0385553 -0.371795 0 0 1
+-0.5 -0.063322 0.0337567 1 0 0
+0.267167 -0.0121997 -0.149093 0.947788 -0.317788 -0.0266118
+0.5 -0.020364 -0.266166 1 0 0
+0.452334 -0.13103 0.320513 0 0 1
+-0.141895 -0.043413 -0.333333 0 0 1
+-0.377653 0.371795 -0.0493251 0 1 0
+0.281677 -0.371795 0.215933 0 1 0
+0.375479 -0.257115 0.320513 0 0 1
+0.160704 -0.31351 -0.371795 0 0 1
+-0.276051 0.29449 0.320513 0 0 1
+-0.347248 -0.0399045 -0.371795 0 0 1
+0.0591217 -0.294872 -0.327872 0 1 0
+0.329662 -0.329992 -0.371795 0 0 1
+0.141026 0.328875 -0.25916 1 0 0
+-0.5 0.310682 0.301236 1 0 0
+-0.068157 0.371795 0.13655 0 1 0
+-0.243695 0.195328 -0.333333 0 0 1
+-0.448718 -0.314488 -0.0681794 1 0 0
+0.383187 0.13417 -0.371795 0 0 1
+-0.5 -0.16408 -0.217702 1 0 0
+-0.138582 -0.0723041 -0.333333 0 0 1
+-0.5 -0.233636 0.00572814 1 0 0
+0.0498429 -0.256282 0.360812 0 1 0
+-0.141154 -0.364045 0.0233009 0.948623 -0.284663 -0.138136
+-0.475409 0.371795 -0.21697 0 1 0
+0.306292 0.183427 0.327333 0.664681 0.737658 0.118575
+0.141109 -0.328996 -0.105948 1 0 0
+0.141026 0.342342 0.306425 1 0 0
+0.141026 0.321833 -0.067736 1 0 0
+0.262468 0.294872 -0.315443 0 1 0
+-0.106649 0.353387 -0.371795 0 0 1
+-0.140692 0.371795 -0.0405287 0 1 0
+-0.138378 0.255554 0.334567 -0.0693423 0.997593 0.000376817
+-0.126759 0.026572 -0.333333 0 0 1
+-0.5 0.0215379 0.0486965 1 0 0
+0.349159 -0.279394 -0.371795 0 0 1
+-0.285859 -0.371795 0.0250479 0 1 0
+-0.0368817 0.371675 0.320513 0.067298 0.737108 0.672415
+0.286353 -0.371795 -0.234962 0 1 0
+-0.448718 -0.326858 -0.0595933 1 0 0
+-0.394614 0.367402 -0.371795 0.132501 -0.507666 0.851304
+-0.471954 -0.294872 -0.168347 0 1 0
+-0.276707 -0.215174 -0.333333 -0.0735176 -0.289482 0.954356
+-0.360648 -0.371795 0.130289 0 1 0
+0.328035 0.294872 -0.18184 0 1 0
+0.0876948 0.172941 -0.333333 0 0 1
+0.322756 0.294872 -0.236455 0 1 0
+0.40721 0.294872 0.30247 0 1 0
+0.5 0.178548 -0.351178 1 0 0
+0.176795 -0.371795 0.275061 0 1 0
+-0.162786 0.00812441 -0.333333 0 0 1
+-0.5 0.220266 0.140887 1 0 0
+-0.194575 -0.371795 0.0914788 0 1 0
+0.167592 -0.252865 0.371795 -0.0485044 0.879043 -0.474269
+0.102432 -0.188114 -0.333333 0 0 1
+0.181607 0.294872 0.198634 0 1 0
+-0.493608 0.371795 0.166828 -0.202784 0.979134 0.0132729
+-0.0817259 -0.126538 -0.333333 0 0 1
+0.0516461 0.371795 0.190917 0 1 0
+-0.187699 -0.00593537 -0.318716 0.992176 -0.124846 0
+-0.5 0.0857265 0.303029 1 0 0
+-0.0970343 0.180076 0.342886 -0.475939 0.879478 0
+0.188638 0.0238487 -0.333333 -0.0017936 0.000722295 0.999998
+0.302484 -0.247301 -0.371795 0 0 1
+0.0029382 0.371795 -0.305443 0 1 0
+-0.468417 -0.251229 -0.371795 0 0 1
+-0.382835 -0.0374178 0.320513 -0.440235 -0.0433136 0.896837
+0.168632 0.294872 -0.0607283 0 1 0
+-0.5 0.106404 -0.10751 1 0 0
+-0.253973 0.371795 -0.00905097 0 1 0
+0.5 0.0762539 -0.216701 1 0 0
+-0.229864 0.0435106 -0.0362009 -0.0526936 0.904177 0.423896
+0.0284447 0.00287147 0.320513 0 0 1
+-0.161203 -0.0877749 0.320513 0 0 1
+-0.384377 -0.371795 -0.223378 0 1 0
+0.5 0.0869444 0.298244 1 0 0
+-0.388762 0.329327 0.320513 0 0 1
+-0.5 0.136034 -0.0438259 1 0 0
+0.182486 0.230897 -0.344941 0 1 0
+0.00274341 -0.230897 -0.358468 0 1 0
+0.276588 -0.371795 -0.319769 0 1 0
+0.5 -0.273896 -0.0598495 1 0 0
+0.141026 0.357189 -0.0296879 1 0 0
+0.5 -0.0358088 -0.36367 0.976485 0.0909458 -0.195462
+-0.274376 -0.371795 -0.195287 0 1 0
+-0.463882 0.355766 0.320513 0 0 1
+-0.484224 0.00148779 -0.371795 0 0 1
+0.48353 -0.294872 0.282456 0 1 0
+-0.0659827 -0.141373 0.320513 0 0 1
+0.404396 -0.143934 -0.371795 0 0 1
+0.5 -0.0152118 -0.0348041 1 0 0
+0.032579 0.217279 0.371795 0 0 1
+0.457337 -0.270052 -0.371795 0 0 1
+0.00477597 0.0679524 0.320513 0 0 1
+-0.5 0.0111438 -0.216717 1 0 0
+0.149169 -0.232149 -0.371795 -0.182983 -0.561209 0.807194
+-0.5 -0.210764 0.289928 1 0 0
+-0.266979 -0.371795 0.275181 0 1 0
+-0.171647 -0.371795 0.098542 0 1 0
+-0.463785 0.106997 0.320513 0 0 1
+-0.5 0.0854816 0.319032 0.772801 -0.0121872 -0.634531
+-0.348933 -0.371795 0.208392 0 1 0
+0.473179 0.0161867 -0.371795 0 0 1
+-0.448718 -0.351268 0.243022 1 0 0
+-0.402278 0.137756 -0.371795 0 0 1
+0.5 0.261376 -0.090378 1 0 0
+0.236695 -0.281201 0.320513 0 0 1
+0.196903 0.294872 0.182624 0 1 0
+-0.448718 -0.321199 0.319797 0.980821 0.00674411 -0.194795
+-0.114393 -0.288821 0.320513 -0.029439 -0.311413 0.949819
+-0.343212 -0.371795 0.189125 0 1 0
+-0.0789559 -0.294872 -0.0457912 0 1 0
+0.5 -0.14543 -0.322586 1 0 0
+0.339574 -0.278635 -0.371795 0 0 1
+0.141109 -0.328495 0.126612 1 0 0
+0.0411866 -0.294872 0.0762178 0 1 0
+-0.448718 -0.361665 0.299374 0.99433 0.102609 -0.02791
+-0.112334 -0.162198 -0.333333 0 0 1
+0.5 0.163307 -0.27816 1 0 0
+-0.111762 0.249195 -0.371795 0 0 1
+0.349786 0.0661973 -0.371795 0 0 1
+-0.389825 -0.371795 -0.23295 0 1 0
+0.5 0.136474 0.123843 1 0 0
+-0.3441 -0.371795 0.308929 -0.00264603 0.999761 -0.0216978
+-0.00673286 0.20062 0.320513 0.236069 -0.434262 0.869303
+0.331227 0.294872 -0.0921484 0 1 0
+-0.021386 -0.294872 -0.126206 0 1 0
+-0.5 0.249201 -0.0198177 1 0 0
+0.141026 0.302131 0.186124 0.999462 0.032733 -0.00211026
+-0.42595 -0.371795 -0.18244 0 1 0
+0.139373 -0.10113 -0.333333 0 0 1
+0.0867743 0.371795 0.0977738 0 1 0
+-0.26295 0.189781 -0.333333 0 0 1
+0.310534 0.294872 0.267647 0 1 0
+-0.5 -0.275553 -0.362962 0.966427 0.053553 0.251297
+-0.0258826 0.156426 0.320513 0 0 1
+0.406838 -0.371795 -0.30725 0 1 0
+-0.472418 -0.294872 -0.323171 0 1 0
+-0.217684 0.0475005 -0.333333 0.124937 0.261512 0.95708
+0.213208 -0.0340872 -0.210117 0.484895 0.87454 -0.00749764
+-0.397866 -0.315327 -0.371795 0 0 1
+0.0601686 -0.294872 -0.134096 0 1 0
+-0.5 -0.242334 -0.0052184 1 0 0
+0.346504 0.294872 0.0415082 0 1 0
+-0.00315618 -0.154905 -0.333333 0 0 1
+-0.333474 0.371795 0.318557 0.0409767 0.900531 0.432857
+0.193849 -0.0102514 -0.223715 0.970284 0.240171 -0.0294401
+0.22141 0.294872 0.129248 0 1 0
+0.0332944 -0.294872 0.100213 0 1 0
+0.415548 -0.371795 -0.343278 0 1 0
+0.0729848 -0.294872 -0.298434 0 1 0
+-0.5 -0.153037 -0.0322345 1 0 0
+0.0800914 0.371795 -0.194478 0 1 0
+-0.481561 0.172645 -0.371795 0 0 1
+-0.5 0.106004 0.148306 1 0 0
+0.0541338 0.371795 -0.101411 0 1 0
+0.193359 -0.0684149 0.331631 0.935255 -0.353858 -0.00904935
+-0.347533 0.323772 0.320513 0 0 1
+-0.187521 0.0201747 0.320513 0 0 1
+-0.199121 -0.294592 -0.371795 0 0 1
+0.444593 -0.0610596 0.320513 0 0 1
+-0.141154 -0.312109 0.200262 1 0 0
+-0.298702 -0.152891 0.371795 0 0 1
+0.0332951 0.256437 -0.371795 0 0 1
+0.48181 0.294872 0.237745 0 1 0
+-0.43177 -0.371795 0.0443984 0 1 0
+0.5 0.260341 -0.0644886 1 0 0
+0.137408 0.371795 0.0399579 0.278802 0.958864 -0.0533782
+0.307142 -0.371795 0.231796 0 1 0
+0.251674 0.294872 -0.267935 0 1 0
+0.220801 -0.23901 0.320513 0.114742 -0.264878 0.957431
+-0.464767 0.371795 -0.140114 0 1 0
+-0.5 0.0801527 -0.149813 1 0 0
+-0.461796 0.127691 0.320513 0 0 1
+-0.196378 0.057791 0.362809 0.959116 -0.263508 0.103245
+-0.07748 -0.262786 -0.371795 0 0 1
+-0.349055 -0.182462 -0.371795 0 0 1
+0.0182385 -0.294872 -0.136595 0 1 0
+-0.5 -0.122529 0.28072 1 0 0
+-0.5 -0.278274 -0.0851126 1 0 0
+0.338427 -0.0541641 -0.371795 0 0 1
+-0.0744836 -0.294872 0.231227 0 1 0
+0.141109 -0.321716 0.0669352 1 0 0
+0.416863 0.294872 0.111895 0 1 0
+0.247046 0.287976 0.320513 0.040239 0.135153 0.990007
+-0.0357128 -0.0710365 -0.333333 0 0 1
+0.271387 0.294872 -0.00586233 0 1 0
+0.00977532 -0.294872 0.0215509 0 1 0
+-0.5 0.15788 -0.285501 1 0 0
+0.153672 0.294872 0.282119 0 1 0
+-0.247869 0.0399392 -0.0483063 -0.407585 0.913123 -0.00899578
+0.0317624 0.230897 -0.365164 0.0877536 0.952723 0.290891
+0.141026 0.34365 -0.304898 1 0 0
+0.46604 0.294872 0.27012 0 1 0
+0.5 -0.079413 -0.0535404 1 0 0
+-0.317588 0.326692 -0.371795 0 0 1
+0.137501 -0.148717 0.320513 -0.245282 0.270068 0.931075
+0.5 0.0967605 0.137164 1 0 0
+-0.5 -0.06158 0.216548 1 0 0
+-0.448718 -0.322055 -0.232669 1 0 0
+0.141109 -0.317028 -0.187156 1 0 0
+-0.359925 0.371795 -0.224861 0 1 0
+-0.0359666 -0.294872 0.0226629 0 1 0
+-0.5 0.117899 -0.361099 1 0 0
+0.469394 -0.294872 -0.183855 0 1 0
+0.388385 0.294872 -0.178573 0 1 0
+-0.448718 -0.302712 0.163303 0.970219 0.227619 -0.0828524
+-0.0729646 -0.135844 0.320513 0 0 1
+-0.416257 -0.371795 -0.0860969 0 1 0
+0.350666 -0.196375 -0.371795 0 0 1
+-0.489709 0.157311 0.320513 -0.128682 -0.00985712 0.991637
+-0.391705 -0.371795 -0.0249488 0 1 0
+0.46004 -0.294872 -0.071662 0 1 0
+0.418287 -0.185478 0.320513 0 0 1
+0.120041 -0.29397 0.320513 -0.0658381 -0.654837 0.752897
+0.231246 0.178398 -0.333333 0 0 1
+-0.314307 -0.19907 -0.371795 -0.131118 -0.115643 0.984599
+0.0838478 0.371795 0.239367 0 1 0
+-0.194099 0.023337 -0.202693 0.857726 0.514009 -0.0100331
+-0.034212 -0.294872 0.045631 0 1 0
+-0.141154 -0.338817 0.205338 1 0 0
+0.0420414 0.371795 0.256025 0 1 0
+-0.448718 -0.367816 0.297384 0.942125 0.305435 -0.138241
+0.395986 0.294872 0.181484 0 1 0
+-0.166811 -0.371795 -0.23228 0 1 0
+0.41429 0.294872 -0.19567 0 1 0
+0.202621 0.0260379 -0.208786 0.760616 -0.649179 0.00543547
+-0.155318 -0.245836 0.371795 0.0582338 -0.198165 0.978437
+0.360717 -0.14161 0.320513 0 0 1
+-0.269225 -0.0908669 0.371795 0 0 1
+-0.065931 0.371795 0.144756 0 1 0
+0.5 -0.178373 0.305443 1 0 0
+-0.131529 -0.294872 0.0848166 0 1 0
+0.491724 -0.106334 -0.371795 0 0 1
+-0.5 0.179743 0.15122 1 0 0
+-0.0527981 0.371795 0.10507 0 1 0
+0.105151 0.371795 -0.272966 0 1 0
+-0.00806639 0.371795 0.174528 0 1 0
+-0.407166 -0.371795 0.274898 0 1 0
+-0.5 -0.175071 -0.283836 1 0 0
+-0.235439 -0.00808547 -0.0146753 -0.21095 -0.4106 0.887078
+0.448718 -0.320812 0.102092 1 0 0
+-0.441962 0.371795 -0.357385 0 1 0
+-0.5 0.0345206 -0.172203 1 0 0
+-0.120991 -0.194439 -0.333333 0 0 1
+-0.35945 0.218956 -0.371795 0 0 1
+0.448718 -0.30405 -0.101384 0.985928 -0.160106 -0.0480892
+-0.476409 -0.294872 -0.12371 0 1 0
+0.150936 0.091057 -0.333333 0 0 1
+0.301882 -0.371795 -0.0734363 0 1 0
+0.439718 0.294872 -0.237661 0 1 0
+0.0720357 -0.254024 -0.371795 0 0 1
+-0.5 0.211355 -0.0565526 1 0 0
+-0.221495 -0.0424708 -0.279788 -0.213349 0.976947 -0.00751366
+0.202915 0.294872 0.231214 0 1 0
+0.0796144 0.0856559 -0.333333 0 0 1
+-0.00249594 -0.294872 0.294517 0 1 0
+0.181727 -0.371795 0.169167 0 1 0
+-0.5 -0.119774 0.156244 1 0 0
+-0.234473 0.371795 0.107225 0 1 0
+0.5 0.193465 -0.0549987 1 0 0
+-0.168952 -0.371795 0.179374 0 1 0
+0.338924 0.294872 0.284792 0 1 0
+0.0829943 0.230897 -0.364739 -0.147549 0.947518 0.283616
+-0.14946 -0.371795 -0.040098 -0.13294 0.991057 0.0115682
+0.141026 0.348271 -0.271412 1 0 0
+0.320513 -0.11136 -0.343821 0.990791 0.00202898 0.135382
+0.446713 0.139461 -0.371795 0 0 1
+-0.5 0.107732 -0.114938 1 0 0
+-0.46633 0.371795 -0.146948 0 1 0
+0.377576 -0.231635 -0.371795 0 0 1
+0.0896514 -0.184071 0.322153 -0.369958 0.663033 0.650783
+0.261712 -0.371795 -0.273916 0 1 0
+-0.320513 0.126782 -0.365736 0.977577 -0.0132087 -0.210165
+-0.0111029 -0.204555 0.34443 0.0247076 0.999693 -0.00205231
+-0.5 -0.211428 0.0327789 1 0 0
+0.308765 0.294872 0.273688 0 1 0
+-0.416201 0.371795 -0.0349027 0 1 0
+-0.111083 -0.294872 -0.186045 0 1 0
+0.5 -0.123186 0.309644 1 0 0
+-0.23896 0.371795 0.18438 0 1 0
+-0.363529 -0.371795 1.674e-005 0 1 0
+0.326534 0.294872 -0.185323 0 1 0
+0.00257859 0.256282 0.336872 0 1 0
+0.254388 0.294872 -0.0159981 0 1 0
+-0.25682 -0.187881 -0.333333 0 0 1
+0.222668 0.161788 0.371795 0 0 1
+-0.238352 -0.185085 0.371795 0 0 1
+0.141026 0.320569 -0.364124 0.985588 -0.056832 -0.159328
+-0.5 0.135615 -0.131985 1 0 0
+0.251596 -0.0302324 0.000967659 -0.466084 0.724546 -0.507739
+0.141109 -0.335654 0.099152 1 0 0
+-0.244573 0.041257 -0.209557 -0.332832 0.942966 -0.00624622
+-0.162459 -0.171429 -0.333333 0 0 1
+-0.176407 -0.0515548 0.320513 0 0 1
+-0.27963 -0.371795 -0.236447 0 1 0
+0.347964 -0.371795 -0.353807 0 1 0
+0.210732 0.282921 -0.371795 0 0 1
+0.34292 -0.223605 -0.371795 0 0 1
+0.5 0.155197 -0.198743 1 0 0
+0.5 -0.161729 -0.309136 1 0 0
+-0.314183 -0.371795 -0.197873 0 1 0
+0.141109 -0.316388 -0.0939826 1 0 0
+-0.5 -0.150107 -0.0722594 1 0 0
+0.170351 -0.371795 -0.324272 0 1 0
+0.435403 -0.0538513 0.320513 0 0 1
+-0.379075 0.310158 0.320513 0 0 1
+-0.5 0.115999 -0.17178 1 0 0
+-0.223733 0.371795 -0.0987575 0 1 0
+-0.307387 -0.371795 0.232335 0 1 0
+0.5 -0.0758189 0.146845 1 0 0
+-0.434769 -0.0485584 0.320513 0 0 1
+-0.261075 -0.228623 -0.344987 0.206537 0.978419 -0.00620576
+0.221646 0.246242 -0.371795 0 0 1
+-0.245452 0.275251 -0.371795 0 0 1
+0.240029 0.294872 0.091244 0 1 0
+-0.136125 -0.294872 -0.282294 -0.00494176 0.999984 -0.0028917
+0.5 -0.281472 0.181986 1 0 0
+0.476474 -0.013215 0.320513 0 0 1
+0.314938 0.294872 0.0259252 0 1 0
+-0.476615 -0.294872 -0.240822 0 1 0
+0.299483 -0.371795 -0.0442217 0 1 0
+0.5 -0.231304 0.284806 1 0 0
+-0.5 0.242255 -0.0804641 1 0 0
+-0.401642 -0.371795 0.100575 0 1 0
+-0.201206 0.0318474 -0.318264 0.696254 0.717795 0
+0.052282 0.371795 -0.102231 0 1 0
+-0.197491 0.0067668 -0.0295097 0.513678 0.0855216 0.85371
+-0.459463 0.337745 -0.371795 0 0 1
+0.241243 -0.371795 0.311365 0.0508061 0.955649 -0.290093
+0.0867641 0.371795 -0.116839 0 1 0
+-0.190444 -0.371795 -0.143034 0 1 0
+-0.327765 -0.352567 0.320513 0 0 1
+0.394103 -0.214307 -0.371795 0 0 1
+-0.48473 0.371795 0.24607 0 1 0
+0.5 0.142807 0.111012 1 0 0
+-0.204797 -0.20942 0.371795 0 0 1
+0.476964 0.266515 0.320513 0 0 1
+-0.5 -0.283992 0.0167872 1 0 0
+-0.219178 -0.0761644 -0.333333 0 0 1
+0.47664 -0.294872 -0.256919 0 1 0
+-0.347307 0.0139516 0.371795 0 0 1
+-0.5 0.245368 0.240016 1 0 0
+-0.419768 0.292828 0.320513 0 0 1
+0.5 -0.0861541 0.0793903 1 0 0
+-0.473246 0.271995 0.320513 0 0 1
+-0.263312 0.0557132 -0.333333 0 0 1
+0.334449 -0.371795 0.141858 0 1 0
+0.31294 0.294872 0.287102 0 1 0
+0.141109 -0.338327 0.132626 1 0 0
+-0.361182 -0.107098 -0.371795 0 0 1
+-0.0180396 0.256282 0.352566 0 1 0
+-0.221762 -0.0425422 -0.325959 -0.239445 0.96221 -0.129687
+-0.46474 0.239829 -0.371795 0 0 1
+-0.366046 -0.093812 0.350977 0.936915 0.349558 -0.000196574
+0.141026 0.33702 0.123549 1 0 0
+0.115735 -0.294872 0.190543 0 1 0
+0.150117 -0.0257378 -0.333333 0 0 1
+0.448197 0.294872 0.267066 0 1 0
+-0.0236945 -0.0318688 -0.333333 0 0 1
+-0.5 -0.094165 -0.1833 1 0 0
+0.151869 0.0448385 -0.333333 0 0 1
+-0.26564 0.0228886 -0.0342125 0.633025 -0.366543 -0.681854
+0.5 -0.119639 -0.00937153 1 0 0
+0.219854 -0.352948 0.320513 0 0 1
+-0.307535 -0.371795 -0.0625165 0 1 0
+-0.316831 -0.371795 -0.0670912 0 1 0
+-0.320513 -0.0951917 -0.364125 0.998043 -0.0163421 -0.0603512
+0.213616 0.294872 -0.0521796 0 1 0
+-0.0493718 0.256282 0.327821 0.033101 0.972819 0.22919
+-0.5 0.0854932 -0.220289 1 0 0
+-0.0188542 -0.294872 -0.143587 0 1 0
+-0.5 -0.181406 -0.296701 1 0 0
+-0.375181 -0.371795 0.0563623 0 1 0
+0.0564302 -0.294872 -0.0868301 0 1 0
+0.141026 0.368222 0.278609 0.90572 0.41606 0.0810312
+0.154126 0.224296 0.371795 0 0 1
+0.0147638 0.371795 -0.0278818 0 1 0
+0.311974 -0.218452 0.320513 0 0 1
+0.266873 -0.371795 0.111949 0 1 0
+0.5 0.0581484 0.0472298 1 0 0
+0.5 0.0624007 0.281218 1 0 0
+0.5 -0.0979272 -0.0721769 1 0 0
+0.482068 -0.294872 0.21889 0 1 0
+-0.5 -0.183395 -0.316639 1 0 0
+-0.134577 0.211513 0.371795 0 0 1
+0.5 0.226017 0.212262 1 0 0
+-0.0861438 -0.254437 -0.371795 0 0 1
+0.268033 0.0977343 0.371795 0 0 1
+0.294515 0.294872 -0.354116 0 1 0
+-0.00973615 0.332358 0.320513 0 0 1
+0.311757 -0.362199 -0.371795 0.00121885 0.074196 0.997243
+-0.141154 -0.331347 -0.21583 1 0 0
+0.272323 -0.0511774 0.371795 0 0 1
+-0.403041 -0.371795 -0.0297564 0 1 0
+-0.448718 -0.360139 -0.347245 1 0 0
+0.408399 0.294872 -0.269047 0 1 0
+-0.5 -0.103248 0.127451 1 0 0
+-0.106319 -0.102862 -0.333333 0 0 1
+0.161816 -0.259214 0.320513 -0.0837686 -0.257073 0.962754
+0.288035 -0.302392 -0.371795 0 0 1
+0.034246 0.132118 0.320513 0 0 1
+0.307231 -0.371795 -0.19281 0 1 0
+-0.5 0.368474 0.188478 0.904622 -0.423737 0.045899
+-0.489313 -0.13409 -0.371795 0.205367 -0.0894443 0.974589
+-0.478319 0.368154 0.320513 -0.0290903 0.395789 0.917881
+0.167529 0.0832629 0.320513 0 0 1
+0.196378 -0.371795 0.196195 0 1 0
+0.250796 0.242612 -0.371795 0 0 1
+0.218371 -0.371795 -0.344261 0 1 0
+0.100018 0.212173 -0.333333 0 0 1
+-0.14909 -0.371795 -0.338132 -0.180634 0.982858 0.0368865
+0.0215592 -0.203786 0.3501 -0.135122 0.990782 0.00959292
+-0.340085 -0.089729 0.371795 0 0 1
+-0.334102 -0.371795 -0.163116 0 1 0
+-0.390716 -0.371795 -0.0658104 0 1 0
+-0.402548 -0.371795 -0.32888 0 1 0
+-0.387679 -0.0613546 0.320513 -0.0513589 -0.0093655 0.998636
+-0.0445608 0.168142 0.320513 0 0 1
+0.226399 -0.304881 -0.371795 0 0 1
+0.152437 0.2812 -0.371795 0 0 1
+-0.5 0.36385 0.248928 0.984636 -0.117582 -0.129095
+-0.497387 -0.138651 0.320513 -0.200701 -0.060877 0.977759
+-0.192625 0.0744432 0.371795 0.331844 -0.0403216 0.942472
+-0.381351 -0.256505 0.320513 0 0 1
+-0.173094 0.275605 0.320513 0 0 1
+-0.178543 0.371795 0.291438 0 1 0
+0.299403 0.173742 -0.333333 0 0 1
+-0.116883 -0.219617 0.371795 0 0 1
+-0.5 -0.221716 -0.073565 1 0 0
+0.208606 -0.0312554 -0.269646 0.560157 0.828163 0.0192473
+-0.5 0.0871907 0.316196 0.919474 -0.0607442 -0.388429
+-0.141154 -0.318383 0.0505842 1 0 0
+0.352701 -0.0945869 0.371795 0 0 1
+-0.368589 -0.371795 -0.220424 0 1 0
+-0.265522 -0.227431 -0.371125 0.429155 0.808924 -0.40183
+-0.348681 -0.0455915 0.371795 0 0 1
+0.211288 -0.371795 0.115001 0 1 0
+0.5 0.116987 -0.244382 1 0 0
+-0.313744 0.371795 -0.22686 0 1 0
+0.244421 -0.371795 -0.137117 0 1 0
+-0.5 0.208879 0.0781289 1 0 0
+0.132378 0.105704 -0.333333 0 0 1
+0.00838817 0.371795 0.239412 0 1 0
+-0.195272 0.371795 -0.309678 0 1 0
+0.494603 -0.294872 -0.280608 -0.193865 0.97948 0.0550908
+-0.0609823 -0.0463695 -0.333333 0 0 1
+-0.141154 -0.357016 -0.342302 1 0 0
+-0.5 0.301605 0.00492671 1 0 0
+0.5 -0.22942 -0.114968 1 0 0
+0.448718 -0.301452 0.262967 0.995047 -0.0934874 -0.033784
+-0.5 -0.25334 -0.124811 1 0 0
+-0.448718 -0.335526 0.129021 1 0 0
+-0.282576 -0.202512 0.371795 -0.46532 -0.495238 0.733632
+-0.135152 0.230897 -0.370949 -0.0607461 0.958071 0.280018
+0.144808 0.0277569 0.320513 0 0 1
+-0.484241 -0.257785 -0.371795 0 0 1
+-0.470626 0.153214 -0.371795 0 0 1
+-0.0744056 0.230897 -0.357383 0 1 0
+-0.138849 -0.294872 -0.217201 -0.525511 0.848779 0.0584134
+0.5 0.0625085 -0.219259 1 0 0
+0.355926 0.0972106 0.371795 0.168476 0.0339075 0.985122
+0.254704 -0.343938 -0.371795 0 0 1
+-0.199252 -0.0464405 0.363925 0.974595 0.200788 0.0992419
+0.474906 -0.294872 -0.0188596 0 1 0
+0.480541 -0.294872 -0.288205 0 1 0
+-0.423369 0.284444 0.320513 0 0 1
+-0.203261 -0.345996 -0.371795 0 0 1
+0.1747 0.0771729 0.320513 0 0 1
+-0.5 -0.0458801 0.291118 1 0 0
+-0.278871 0.371795 0.285503 0 1 0
+0.445109 -0.158309 0.320513 0 0 1
+-0.413328 0.00380072 0.320513 0 0 1
+-0.304628 -0.260529 -0.371795 0 0 1
+-0.154018 0.208163 0.371795 0 0 1
+-0.5 -0.0742996 0.125494 1 0 0
+0.389423 -0.252937 -0.371795 0 0 1
+-0.5 -0.0665542 -0.0585245 1 0 0
+0.190069 -0.371795 0.302765 0 1 0
+-0.211272 0.10117 -0.333333 0 0 1
+0.256619 0.0283356 -0.223111 0.654405 0.755965 -0.0164633
+0.448718 -0.357221 0.0783791 1 0 0
+-0.141154 -0.320709 -0.209275 1 0 0
+0.5 -0.235443 -0.323523 1 0 0
+-0.5 0.254117 -0.196323 1 0 0
+0.455773 -0.294872 -0.160736 -0.141602 0.988084 -0.0603161
+-0.5 -0.0670808 -0.32309 1 0 0
+0.141702 0.272813 -0.371795 0 0 1
+0.436777 0.0201071 0.320513 0 0 1
+-0.5 0.17881 0.0973412 1 0 0
+-0.480686 -0.294872 -0.185163 0 1 0
+-0.0546684 -0.0600143 0.320513 0 0 1
+-0.337132 0.371795 -0.162083 0 1 0
+0.40952 -0.267983 0.320513 0 0 1
+0.5 0.057778 -0.0706477 1 0 0
+-0.156239 0.272322 -0.371795 0 0 1
+0.318795 0.294872 -0.257826 0 1 0
+0.5 0.0970235 0.140671 1 0 0
+0.221884 -0.0185307 0.371795 0 0 1
+-0.0587471 -0.167674 -0.333333 0 0 1
+-0.5 -0.0107995 0.0704016 1 0 0
+-0.5 0.338353 -0.270503 1 0 0
+-0.123277 -0.203412 0.371795 0 0 1
+-0.0833676 -0.294872 0.300136 0 1 0
+-0.425305 0.0750082 -0.371795 0 0 1
+-0.345054 -0.108562 -0.371795 0 0 1
+-0.0212562 0.169887 0.320513 0 0 1
+-0.13129 -0.294872 0.274483 0 1 0
+0.30215 -0.371795 -0.20527 0 1 0
+0.476936 -0.10239 0.320513 0 0 1
+-0.204879 0.371795 -0.0557234 0 1 0
+0.258791 0.294872 -0.324414 0 1 0
+-0.217684 -0.371795 0.088976 0 1 0
+0.16535 0.120907 0.351638 0.812012 0.583607 0.0062389
+0.163785 0.294872 0.100891 0 1 0
+-0.205815 -0.371795 -0.290026 0 1 0
+0.5 0.0746566 0.240414 1 0 0
+-0.242449 -0.0418261 -0.280667 0.282183 0.959259 -0.0139814
+-0.5 -0.134182 0.19123 1 0 0
+0.320513 -0.117888 -0.354475 1 0 0
+-0.0878498 -0.294872 -0.326325 0 1 0
+0.0991364 0.10984 -0.333333 0 0 1
+0.168308 0.0664279 0.320513 0 0 1
+0.00592687 -0.294872 -0.327643 0 1 0
+-0.0356266 0.371795 -0.301819 0 1 0
+-0.421328 0.371795 -0.338813 0 1 0
+-0.159107 0.371795 -0.0518592 0 1 0
+0.0514769 -0.294872 0.186054 0 1 0
+-0.127007 0.16036 0.338026 -0.614211 0.789142 0
+0.0485403 -0.294872 -0.0485958 0 1 0
+0.273942 -0.145036 0.371795 0 0 1
+0.323787 0.286476 0.320513 -0.00562228 0.121997 0.992514
+0.448718 -0.306348 -0.250049 1 0 0
+0.491534 -0.0935043 0.320513 0.161233 -0.0491587 0.985691
+0.381304 -0.371795 -0.0545566 0 1 0
+0.250092 0.225153 -0.333333 -0.0189432 0.0913594 0.995638
+0.0933735 -0.294872 -0.287492 0 1 0
+0.5 -0.0532422 -0.157143 1 0 0
+0.457331 -0.0629294 -0.371795 0 0 1
+-0.15913 -0.371795 -0.125048 0 1 0
+0.5 0.0209979 -0.309658 1 0 0
+0.0763934 0.252188 0.371795 0.0157845 0.179883 0.983561
+0.359241 -0.219303 -0.371795 0 0 1
+-0.171251 -0.10989 -0.333333 0 0 1
+-0.5 0.0652764 0.253283 1 0 0
+-0.320513 -0.128882 -0.368882 0.844838 0.171979 -0.506628
+-0.293468 -0.371795 0.0484669 0 1 0
+-0.5 -0.250808 -0.228622 1 0 0
+-0.491481 -0.294872 0.0769575 0.0854447 0.996201 0.0167991
+0.141109 -0.371394 0.0262459 0.798456 0.596965 0.0781062
+0.448718 -0.33849 -0.322086 1 0 0
+-0.0992028 -0.147788 -0.333333 0 0 1
+-0.150059 -0.146335 -0.333333 0 0 1
+-0.485202 0.115018 -0.371795 0 0 1
+-0.448718 -0.329581 -0.225602 1 0 0
+-0.0486329 -0.194918 -0.333333 0 0 1
+0.114039 0.275619 -0.371795 0 0 1
+-0.448718 -0.346329 0.0819257 1 0 0
+0.20124 0.294872 -0.00811622 0 1 0
+-0.5 0.239302 0.26729 1 0 0
+-0.49942 -0.294872 0.00162066 0.515971 0.818388 0.253013
+-0.144759 0.330651 0.320513 0 0 1
+0.113551 -0.294872 -0.170315 0 1 0
+-0.141154 -0.309254 0.00469414 1 0 0
+-0.5 -0.0222709 -0.225917 1 0 0
+0.0253488 0.371795 -0.0287982 0 1 0
+0.195755 0.235818 -0.371795 -0.0203664 0.343834 0.93881
+-0.161023 0.253636 -0.371795 0 0 1
+-0.5 0.205247 -0.0683626 1 0 0
+0.254461 0.0301853 -0.2 0.63201 0.774907 0.00907409
+-0.367189 0.371795 -0.204795 0 1 0
+0.273172 -0.171492 0.371795 0 0 1
+0.448718 -0.32091 -0.278649 1 0 0
+-0.5 0.310401 -0.0257688 1 0 0
+-0.481255 0.371795 0.241829 0 1 0
+-0.428319 0.371795 -0.218782 0 1 0
+-0.141154 -0.298905 0.0377122 0.74229 -0.664749 0.0843499
+-0.32596 -0.371795 -0.092817 0 1 0
+-0.238778 -0.358353 -0.371795 0 0 1
+-0.5 0.138782 -0.123561 1 0 0
+0.117634 -0.0570425 0.320513 0 0 1
+0.427535 -0.216974 -0.371795 0 0 1
+-0.141154 -0.368229 0.315899 0.86032 -0.452291 0.235124
+0.5 -0.200801 0.114231 1 0 0
+0.5 0.247098 0.183855 1 0 0
+-0.4959 0.371795 0.147003 -0.359277 0.931422 0.058086
+0.5 0.0716011 0.176156 1 0 0
+-0.5 0.371056 -0.149996 0.823512 -0.552586 0.128362
+-0.30108 -0.371795 0.0256493 0 1 0
+0.5 -0.283223 0.203857 1 0 0
+0.431965 -0.182795 0.320513 0 0 1
+0.17785 -0.371795 -0.267758 0 1 0
+-0.5 0.184617 -0.0985159 1 0 0
+0.5 0.0513735 0.152105 1 0 0
+-0.0241684 0.256282 0.338398 0 1 0
+-0.230224 -0.371795 0.0373915 0 1 0
+0.5 -0.0709658 -0.26263 1 0 0
+0.288668 0.118257 0.371795 0 0 1
+0.460501 0.294872 -0.251847 0 1 0
+0.0447856 0.371795 0.180942 0 1 0
+0.266219 0.0146398 -0.0831512 0.919893 0.391386 -0.0247912
+0.0091058 -0.294872 -0.354214 0 1 0
+0.183507 -0.371795 -0.312619 0 1 0
+-0.437623 -0.0332731 -0.371795 0 0 1
+-0.0143499 0.371795 -0.223616 0 1 0
+0.0761319 -0.294872 0.24407 0 1 0
+0.447634 -0.371795 -0.344418 -0.618506 0.784376 0.0469531
+0.0992957 0.371795 -0.235697 0 1 0
+0.5 0.124307 0.0121483 1 0 0
+0.320483 0.198977 -0.371795 0 0 1
+-0.0970557 0.31571 -0.371795 0 0 1
+0.5 0.149533 -0.0214027 1 0 0
+-0.217584 -0.0414228 -0.12851 -0.28155 0.959507 0.00873999
+0.202133 -0.0350618 0.3521 0.983735 -0.179606 -0.00261093
+-0.445186 -0.135844 -0.371795 0 0 1
+-0.228731 0.222184 -0.333333 -0.0308727 0.159461 0.986721
+0.448718 -0.348151 -0.36659 0.972801 -0.0513791 -0.225874
+-0.256132 -0.371795 -0.300305 0 1 0
+0.448718 -0.369024 -0.103729 0.949555 -0.31354 -0.00622245
+0.28578 -0.371795 0.288705 0 1 0
+0.310633 0.223697 -0.371795 0 0 1
+-0.5 -0.121422 0.114488 1 0 0
+-0.5 0.315094 0.0124661 1 0 0
+0.5 -0.156682 -0.156606 1 0 0
+0.141026 0.347289 -0.0168512 1 0 0
+0.5 -0.258406 -0.272019 1 0 0
+-0.465679 0.371795 0.074978 0 1 0
+0.5 -0.235721 0.130293 1 0 0
+-0.400288 -0.21698 -0.371795 0 0 1
+0.2116 -0.283132 -0.371795 0 0 1
+-0.141154 -0.319447 -0.370254 0.891969 -0.0317057 -0.450983
+-0.18969 -0.28536 0.320513 0 0 1
+0.5 -0.132883 -0.192689 1 0 0
+-0.5 0.0040615 0.279169 1 0 0
+0.5 -0.195337 -0.00089255 1 0 0
+0.328957 -0.371795 -0.146324 0 1 0
+-0.219906 0.371795 0.0493043 0 1 0
+0.42854 -0.371795 0.303012 0 1 0
+0.364324 0.294872 0.299939 0 1 0
+0.0143467 -0.204555 0.350421 -0.0539759 0.998512 0.00772984
+0.209112 -0.247238 0.320513 0.0872303 -0.296508 0.951038
+0.0140687 -0.294872 0.105648 0 1 0
+-0.0873583 -0.0376965 0.320513 0 0 1
+0.0802698 0.0952745 0.320513 0 0 1
+-0.5 -0.0255522 0.245921 1 0 0
+0.172248 -0.192469 -0.333333 0 0 1
+0.448718 -0.333655 0.0592389 1 0 0
+-0.5 0.206463 0.0160335 1 0 0
+-0.141154 -0.369881 -0.229198 0.966657 -0.22059 0.130054
+-0.362246 -0.371795 0.0351758 0 1 0
+0.454028 -0.114236 0.320513 0 0 1
+0.188539 -0.371795 -0.143393 0 1 0
+0.5 -0.0706377 0.298351 1 0 0
+-0.263755 -0.371795 0.0306612 0 1 0
+0.5 -0.183391 0.10392 1 0 0
+-0.5 -0.200565 0.30529 1 0 0
+0.458777 -0.105347 -0.371795 0 0 1
+-0.265467 0.188306 0.371795 0 0 1
+0.327565 0.220107 -0.371795 0 0 1
+0.206959 -0.0301016 -0.181049 0.568524 0.822653 0.00471513
+0.141026 0.326692 0.145376 1 0 0
+0.083788 -0.0542232 0.320513 0 0 1
+-0.320513 0.0491984 -0.335707 0.853104 -0.142712 -0.501843
+0.197291 0.128364 0.371795 0 0 1
+0.5 -0.20331 -0.0635407 1 0 0
+0.466029 -0.202271 0.320513 0 0 1
+-0.0161638 0.371795 -0.0366307 0 1 0
+0.5 -0.0559528 -0.258298 1 0 0
+0.133049 -0.294872 0.0625827 0.0630261 0.997975 -0.00863704
+-0.192122 -0.371795 0.297127 0 1 0
+0.0707032 0.371795 -0.344433 0 1 0
+0.445131 0.294872 0.0639257 0 1 0
+0.204381 0.027797 -0.250227 -0.678726 0.734318 0.0104091
+-0.0228851 -0.294872 -0.153469 0 1 0
+0.170947 -0.343708 0.320513 0 0 1
+0.104717 -0.0784923 0.320513 0 0 1
+0.287454 0.270941 -0.371795 0 0 1
+0.093519 0.371795 -0.101123 0 1 0
+0.448718 -0.357555 0.25491 1 0 0
+0.388726 -0.371795 -0.235205 0 1 0
+0.244405 0.227806 0.329543 0.458191 0.877375 0.142385
+0.00598024 0.371795 0.282972 0 1 0
+0.474428 0.294872 0.0383194 0 1 0
+-0.448029 -0.371795 0.144906 0.861079 0.504387 -0.0643184
+0.346023 -0.371795 0.260564 0 1 0
+0.264133 -0.217033 0.342861 -0.506994 0.861942 -0.00345899
+-0.376749 -0.157941 -0.371795 0 0 1
+-0.0490493 0.00690166 -0.333333 0 0 1
+0.196972 -0.371795 0.0377048 0 1 0
+0.141109 -0.347607 0.0120754 1 0 0
+-0.183269 0.371795 0.10962 0 1 0
+0.410697 -0.371795 -0.238919 0 1 0
+0.141026 0.327792 -0.0791587 1 0 0
+-0.243924 0.15963 -0.333333 0 0 1
+-0.320459 0.122967 0.371795 0 0 1
+-0.5 -0.206864 -0.133026 1 0 0
+-0.5 -0.239272 -0.160603 1 0 0
+0.290465 -0.229942 -0.371795 0 0 1
+-0.383959 -0.371795 -0.143194 0 1 0
+-0.0397611 0.221645 0.371795 0 0 1
+-0.5 -0.0615003 0.316925 0.954628 0.0843746 -0.285599
+-0.193125 -0.259575 0.320513 0 0 1
+-0.5 0.336682 -0.328952 1 0 0
+0.0758174 0.197344 0.371795 -0.0682385 -0.120197 0.990402
+-0.402324 -0.371795 -0.348468 0 1 0
+0.402327 -0.371795 0.143767 0 1 0
+0.389383 0.210112 0.320513 0 0 1
+0.0299622 -0.0650085 0.320513 0 0 1
+-0.5 0.233369 0.135144 1 0 0
+-0.255139 0.330658 -0.371795 0 0 1
+-0.0315816 0.299583 -0.371795 0 0 1
+0.5 0.21913 0.263856 1 0 0
+-0.221125 -0.0531415 0.371795 0 0 1
+-0.5 -0.283468 -0.20519 1 0 0
+-0.333678 -0.222002 -0.371795 0 0 1
+0.448718 -0.332731 -0.218371 1 0 0
+0.240237 0.268391 0.320513 0 0 1
+-0.15318 -0.0948336 -0.333333 0 0 1
+-0.448718 -0.308527 -0.173296 1 0 0
+0.409573 -0.220231 0.320513 0 0 1
+0.289419 0.294872 0.0948739 0 1 0
+0.5 0.079986 0.0803654 1 0 0
+-0.170746 0.151371 0.371795 0 0 1
+-0.197701 0.371795 -0.173362 0 1 0
+0.376797 0.203022 -0.371795 0 0 1
+0.0660243 0.371795 -0.328436 0 1 0
+0.5 -0.0508083 -0.365665 0.899524 0.156494 -0.407879
+0.394206 -0.0843237 -0.371795 0 0 1
+0.5 -0.0266881 -0.362857 1 0 0
+-0.0761825 0.371795 0.0543596 0 1 0
+0.176281 -0.25711 0.320513 0.0818814 -0.199218 0.976528
+0.362814 0.0387565 0.371795 0 0 1
+0.298948 -0.334298 -0.371795 0 0 1
+0.0872012 0.203173 0.371795 0 0 1
+-0.438266 0.371795 -0.350753 0 1 0
+0.245436 -0.0940139 0.371795 0 0 1
+-0.5 0.0585103 -0.0714868 1 0 0
+0.5 -0.289936 0.246166 0.901071 -0.433549 -0.010307
+0.5 0.0267692 0.201755 1 0 0
+0.421285 -0.371795 0.0301528 0 1 0
+-0.11164 0.285179 0.320513 0 0 1
+0.490204 -0.294872 0.0248155 -0.0913932 0.995694 -0.0154991
+-0.0894836 0.371795 0.168942 0 1 0
+-0.0996271 -0.294872 0.158227 0 1 0
+-0.0664437 0.371795 -0.106441 0 1 0
+0.5 0.109501 -0.219364 1 0 0
+-0.145817 0.143624 0.345676 0.735716 -0.67729 0
+0.5 -0.165495 0.287865 1 0 0
+0.247028 -0.198048 -0.333333 0 0 1
+-0.427937 -0.307715 -0.371795 0 0 1
+-0.0904028 0.371795 -0.339687 0 1 0
+-0.102318 -0.219691 0.371795 0 0 1
+-0.236588 -0.326481 0.320513 0 0 1
+-0.5 -0.0298822 0.0121798 1 0 0
+0.141026 0.358292 -0.115723 1 0 0
+-0.348704 -0.371795 -0.0225982 0 1 0
+0.388361 -0.129931 -0.371795 0 0 1
+-0.5 0.0366916 0.202828 1 0 0
+0.172013 -0.306429 -0.371795 0 0 1
+-0.378806 0.371795 -0.0200647 0 1 0
+0.178388 -0.371795 0.170131 0 1 0
+-0.37583 -0.371795 -0.233342 0 1 0
+-0.353748 -0.371795 0.279703 0 1 0
+0.5 -0.0694398 -0.278839 1 0 0
+0.127533 0.237129 -0.371795 -0.00295791 0.204392 0.978885
+-0.295859 -0.371795 -0.265957 0 1 0
+-0.5 -0.00741776 -0.22788 1 0 0
+0.5 0.271928 -0.0639633 1 0 0
+0.141109 -0.331418 -0.204302 1 0 0
+-0.072065 -0.0108684 0.320513 0 0 1
+-0.0284838 0.298876 -0.371795 0 0 1
+0.5 -0.0480015 -0.244035 1 0 0
+-0.216701 -0.371795 -0.0982456 0 1 0
+-0.5 -0.221821 0.113703 1 0 0
+-0.276592 -0.322852 0.320513 0 0 1
+0.315304 0.159279 -0.333333 0.861709 0.178894 0.47482
+-0.074244 0.0866474 0.320513 0 0 1
+0.5 0.186504 0.219327 1 0 0
+0.380726 -0.371795 -0.332955 0 1 0
+-0.104407 -0.294872 -0.0151365 0 1 0
+-0.428081 0.179075 -0.371795 0 0 1
+0.214415 0.240677 0.360629 0.349467 0.936949 0
+-0.264382 0.027704 -0.254458 0.759896 -0.650002 0.00748095
+-0.415863 -0.371795 -0.289814 0 1 0
+-0.284671 -0.371795 0.0650841 0 1 0
+-0.0682784 0.230897 -0.365265 -0.007365 0.975734 0.218836
+-0.132475 0.218449 -0.333333 0 0 1
+0.358839 -0.371795 0.126314 0 1 0
+0.5 0.175188 -0.018066 1 0 0
+-0.5 -0.220215 0.232442 1 0 0
+-0.0510123 0.0431879 0.320513 0 0 1
+-0.49091 -0.294872 -0.153258 0.171272 0.982902 -0.067599
+-0.319925 -0.371795 -0.282339 0 1 0
+-0.260016 0.228907 -0.369407 -0.0163931 0.769169 0.638835
+0.492706 -0.240719 0.320513 0.185528 -0.0627817 0.980631
+0.5 -0.162361 0.246289 1 0 0
+0.240272 0.294872 0.193212 0 1 0
+-0.0517132 0.130933 0.320513 0 0 1
+0.496201 -0.294872 -0.257991 -0.472268 0.858469 -0.199985
+0.167326 -0.371795 0.149105 0 1 0
+0.5 -0.240473 -0.147048 1 0 0
+-0.5 -0.0876708 0.172759 1 0 0
+-0.5 -0.25552 -0.0546976 1 0 0
+-0.290299 0.371795 -0.364111 0.0726609 0.951847 -0.297839
+-0.5 0.268719 -0.228848 1 0 0
+0.197065 -0.371795 -0.277755 0 1 0
+0.238543 -0.050183 -0.333333 0 0 1
+0.137997 0.371795 0.0160251 0.375979 0.926237 -0.0269316
+-0.0925976 0.319218 0.320513 0 0 1
+0.302315 -0.280236 -0.371795 0 0 1
+-0.144545 -0.255113 0.350988 0.0715773 0.997435 0.000180944
+-0.4411 0.371795 0.271709 0 1 0
+-0.5 -0.0185276 -0.166341 1 0 0
+0.5 -0.238857 -0.138678 1 0 0
+0.0861474 0.00530997 0.320513 0 0 1
+-0.145953 0.196 0.371795 0 0 1
+-0.199007 -0.0296482 -0.19717 0.758889 -0.65122 -0.000937741
+-0.330608 -0.371795 -0.128853 0 1 0
+0.141109 -0.322984 -0.069597 1 0 0
+-0.2695 0.0196921 -0.0549492 0.896831 -0.442321 0.00677924
+0.0646269 0.350454 0.320513 0 0 1
+-0.430093 0.337848 0.320513 0 0 1
+-0.5 -0.057154 0.00891487 1 0 0
+-0.5 -0.263222 0.0525812 1 0 0
+-0.165415 -0.371795 -0.0205781 0 1 0
+-0.375533 -0.00793751 0.371795 -0.127258 -0.0826108 0.988423
+0.193728 -0.00979905 -0.0391346 0.967811 0.251585 0.00691523
+0.5 -0.230434 0.0652282 1 0 0
+-0.409383 0.296961 -0.371795 0 0 1
+0.5 -0.0871031 -0.315145 1 0 0
+0.301249 0.244421 -0.371795 0 0 1
+0.5 0.187508 -0.240483 1 0 0
+-0.5 0.16723 -0.301199 1 0 0
+-0.5 -0.223967 -0.291898 1 0 0
+0.5 0.138132 0.186058 1 0 0
+-0.412191 0.371795 0.176327 0 1 0
+0.299127 0.294872 0.111325 0 1 0
+-0.458941 -0.107855 -0.371795 0 0 1
+0.5 0.241525 0.0489405 1 0 0
+-0.123928 0.162756 0.340553 -0.614226 0.78913 0
+0.141109 -0.33947 -0.356764 1 0 0
+-0.243409 0.099295 0.371795 0 0 1
+0.113758 -0.23722 -0.371795 0.0398271 -0.151916 0.987591
+0.470717 0.294872 0.228368 0 1 0
+-0.202234 -0.371795 -0.051052 0 1 0
+-0.263935 0.217142 0.343843 -0.526887 0.849899 0.00789029
+-0.291059 -0.28838 -0.371795 0 0 1
+-0.414034 -0.371795 -0.103822 0 1 0
+-0.5 -0.271593 0.168448 1 0 0
+-0.268762 -0.0212742 -0.21357 0.86389 0.50368 0
+-0.5 -0.218284 -0.179156 1 0 0
+-0.0797864 0.371795 -0.217395 0 1 0
+0.0130766 0.256282 0.339706 0 1 0
+0.5 0.212919 0.0596616 1 0 0
+0.5 0.25893 -0.0645468 1 0 0
+0.5 -0.135067 -0.0600864 1 0 0
+0.375138 -0.189336 0.320513 0 0 1
+0.5 -0.0451883 -0.236218 1 0 0
+-0.136363 0.0334897 0.320513 0 0 1
+-0.137885 0.199054 -0.333333 0 0 1
+0.320513 -0.152717 -0.352831 0.999259 -0.0383423 -0.00347198
+-0.132397 0.366027 0.320513 0.128896 0.225448 0.965691
+0.0294975 -0.294872 0.0536139 0 1 0
+0.377629 -0.371795 0.267808 0 1 0
+0.178448 -0.157712 0.371795 0 0 1
+-0.222199 -0.170865 0.371795 0 0 1
+0.188687 0.294872 -0.109395 0 1 0
+-0.447333 0.255936 -0.371795 0 0 1
+-0.212415 0.241801 0.320513 -0.214808 0.461553 0.860713
+-0.421534 0.338814 -0.371795 0 0 1
+-0.24127 -0.0304703 0.371795 0 0 1
+-0.5 0.360821 0.0398961 1 0 0
+-0.15586 -0.371795 -0.265778 0 1 0
+0.132791 -0.222928 -0.333333 0.00355245 -0.141984 0.989863
+-0.5 -0.106501 -0.129455 1 0 0
+0.5 0.156027 -0.095931 1 0 0
+0.383645 0.294872 -0.0252356 0 1 0
+0.145949 -0.0260896 -0.333333 0 0 1
+-0.145281 0.211671 0.371795 0 0 1
+-0.323464 -0.371795 0.124512 0 1 0
+0.420417 -0.371795 0.189559 0 1 0
+-0.0986534 0.371795 -0.202386 0 1 0
+0.483713 0.294872 0.168109 0 1 0
+-0.219724 -0.371795 -0.348311 0 1 0
+-0.264685 0.02727 -0.324134 0.752013 -0.656445 -0.0596379
+0.459564 0.219688 0.320513 0 0 1
+0.185309 0.0867678 0.321435 0.656488 0.326332 -0.680096
+0.0461987 0.169066 0.320513 0 0 1
+-0.141154 -0.296925 0.200087 0.840753 -0.5411 -0.0185614
+0.450599 -0.294872 -0.120208 -0.355524 0.93409 0.0328519
+-0.433609 -0.22178 0.320513 0 0 1
+-0.5 0.14005 -0.330973 1 0 0
+0.5 -0.241839 0.230528 1 0 0
+-0.0504018 0.242839 -0.371795 0 0 1
+-0.5 -0.168983 -0.163701 1 0 0
+-0.141154 -0.315149 0.169803 1 0 0
+-0.406781 -0.307165 -0.371795 0 0 1
+-0.5 0.0253434 -0.0792652 1 0 0
+-0.425526 0.14695 0.320513 0 0 1
+0.469085 -0.0591178 0.320513 0 0 1
+0.5 0.287711 -0.370964 -0.437718 -0.113905 0.891868
+0.14535 -0.350655 0.320513 0.694646 -0.214167 -0.686731
+-0.208313 0.127608 0.371795 0 0 1
+-0.27246 0.371795 0.201339 0 1 0
+0.22783 0.0382044 -0.0425777 -0.116044 0.993135 -0.0146915
+-0.147081 0.371795 -0.333587 0 1 0
+-0.0687084 -0.294872 0.168755 0 1 0
+-0.345705 -0.328897 -0.371795 0 0 1
+0.5 0.0923535 0.0306992 1 0 0
+0.5 -0.220917 0.177331 1 0 0
+-0.5 -0.108662 0.269244 1 0 0
+0.100722 0.0522155 0.320513 0 0 1
+0.383877 -0.0221775 -0.371795 0 0 1
+-0.319919 -0.350701 -0.371795 0 0 1
+-0.5 0.328016 -0.248732 1 0 0
+0.331803 -0.288308 0.320513 0 0 1
+0.141026 0.300134 0.316733 0.920479 0.316399 0.229368
+-0.284941 0.371795 -0.155087 0 1 0
+0.199598 0.294872 -0.0634004 0 1 0
+0.177477 0.102346 0.360447 0.855765 0.517332 0.00572776
+0.5 0.04769 -0.216877 1 0 0
+0.304038 0.294872 0.233047 0 1 0
+-0.323968 -0.371795 -0.261459 0 1 0
+-0.412231 -0.371795 -0.342582 0 1 0
+0.119344 -0.294872 -0.0998875 0 1 0
+-0.365773 0.0945446 0.339792 0.936942 -0.349485 0
+0.492546 0.294872 -0.277399 0.291921 0.956262 -0.0186031
+0.00954156 -0.294872 -0.145718 0 1 0
+0.127967 -0.294872 -0.0160137 0 1 0
+0.431951 -0.219616 -0.371795 0 0 1
+0.112284 -0.188501 0.371795 0 0 1
+-0.278778 0.371795 -0.0121039 0 1 0
+-0.5 0.336699 -0.146609 1 0 0
+0.448718 -0.304833 -0.128576 0.986145 -0.162392 0.0338651
+-0.490113 -0.294872 0.193756 0 1 0
+0.27105 0.212388 0.349447 0.585446 0.810646 -0.01031
+-0.380447 -0.0430551 0.323959 0.889735 0.0302567 -0.455474
+-0.430012 0.248375 0.320513 0 0 1
+0.474574 -0.294872 -0.177122 0 1 0
+-0.464011 0.371795 0.157382 0 1 0
+0.491045 -0.0192259 -0.371795 -0.208483 0.0405595 0.977185
+0.0670846 -0.294872 0.164935 0 1 0
+0.5 0.159421 -0.325023 1 0 0
+-0.183522 -0.371795 0.206208 0 1 0
+-0.0898035 0.0304776 -0.333333 0 0 1
+0.141109 -0.351259 0.28088 1 0 0
+-0.488913 0.198506 0.320513 0 0 1
+-0.193395 -0.298054 0.320513 0 0 1
+-0.420806 -0.371795 0.0986079 0 1 0
+0.139395 0.255482 0.360039 0.0714931 0.997441 -6.96024e-005
+-0.218564 0.371795 -0.278088 0 1 0
+-0.135388 0.371795 0.257076 0 1 0
+0.183978 -0.371795 -0.186421 0 1 0
+0.219818 -0.200756 0.371795 0 0 1
+0.465777 -0.253723 -0.371795 0 0 1
+-0.5 0.34736 -0.166189 1 0 0
+0.286951 -0.371795 0.108541 0 1 0
+0.111899 0.371795 -0.300439 0 1 0
+0.5 -0.0601727 0.0720416 1 0 0
+0.263711 0.217264 0.33583 0.500255 0.865871 0.00357673
+-0.409932 -0.371795 -0.251419 0 1 0
+0.0702407 0.227208 0.371795 0 0 1
+-0.096023 0.0496713 0.320513 0 0 1
+0.141109 -0.364614 -0.229531 0.988914 0.132365 -0.0673
+0.448718 -0.350496 0.0991788 1 0 0
+-0.378265 -0.061467 0.320513 -0.336611 -0.253401 0.906908
+0.157793 0.224277 -0.333333 0.0722661 0.171378 0.982551
+-0.190599 -0.0166053 -0.184542 0.933674 -0.357436 -0.0222174
+0.448718 -0.309375 -0.2364 1 0 0
+0.343998 0.138199 0.368675 0.654555 0.437611 0.616486
+0.195203 0.0143896 -0.226858 0.910767 -0.411283 0.0367441
+0.177338 -0.371795 0.104028 0 1 0
+0.448718 -0.344399 0.0603085 1 0 0
+0.145344 0.243704 0.371795 0 0 1
+0.5 -0.239833 -0.0609032 1 0 0
+0.422126 0.16524 0.320513 0 0 1
+0.290881 0.00584185 -0.333333 0 0 1
+0.5 -0.138612 -0.370729 -0.67398 0.0618023 0.73616
+-0.303161 -0.202498 -0.334557 -0.512307 -0.392534 0.763844
+0.433933 -0.366312 0.320513 -0.0405083 -0.175415 0.983661
+-0.242595 0.0417868 -0.195896 -0.253569 0.967288 -0.00755767
+-0.00711602 -0.256282 0.348431 0 1 0
+-0.360176 0.174811 0.320513 0 0 1
+0.141114 -0.371795 0.175706 0.770953 0.621302 0.140053
+-0.5 0.195813 -0.356184 1 0 0
+0.357855 -0.112824 0.364596 0.877614 -0.478419 0.0301365
+-0.483332 -0.294872 0.197715 0 1 0
+0.448718 -0.307485 -0.0229363 1 0 0
+-0.105371 -0.254684 -0.371795 0 0 1
+-0.5 -0.224518 0.179721 1 0 0
+0.383175 -0.277505 0.320513 0 0 1
+-0.079819 0.306621 0.320513 0 0 1
+-0.130634 -0.252246 0.371795 0.129299 0.784296 -0.606763
+-0.365784 -0.371795 -0.0876423 0 1 0
+-0.320513 -0.0374448 -0.335307 0.837717 -0.081713 -0.539957
+0.5 0.24817 0.242616 1 0 0
+-0.467513 0.371795 0.199111 0 1 0
+-0.0468637 -0.294872 0.0156962 0 1 0
+-0.370777 0.305755 -0.371795 0 0 1
+0.5 0.228096 -0.277618 1 0 0
+0.263147 -0.371795 -0.110764 0 1 0
+-0.141154 -0.297365 -0.0377149 0.792604 -0.609526 0.0160237
+-0.5 0.0226724 -0.238752 1 0 0
+-0.5 0.237412 -0.356357 1 0 0
+-0.23749 -0.371795 0.0317036 0 1 0
+0.325926 0.293489 -0.371795 -0.145316 0.793249 -0.591303
+-0.492126 0.249114 -0.371795 0.000669558 0.000151981 1
+-0.330104 -0.0363738 0.371795 0 0 1
+-0.448718 -0.304501 -0.177879 1 0 0
+-0.268896 -0.371795 0.177905 0 1 0
+0.413205 0.294872 0.0299935 0 1 0
+-0.238456 -0.128186 0.371795 0 0 1
+0.5 0.199591 -0.350002 1 0 0
+0.5 -0.120897 -0.258608 1 0 0
+0.124577 -0.294872 0.203284 0 1 0
+0.455214 0.294872 -0.269321 0 1 0
+-0.128877 -0.252126 -0.371795 0 0 1
+0.219785 -0.143045 0.371795 0 0 1
+-0.226396 -0.0432072 -0.21012 -0.0869265 0.996203 0.00473714
+-0.345994 -0.371795 -0.317881 0 1 0
+0.237905 0.275866 0.320513 0 0 1
+-0.437465 0.283186 0.320513 0 0 1
+0.023767 0.371795 0.278041 0 1 0
+0.231433 0.0384035 -0.0353684 -0.00965165 0.999871 -0.0128139
+-0.484746 -0.294872 0.0835373 0 1 0
+-0.387353 0.317972 -0.371795 0 0 1
+-0.257417 -0.371795 -0.104296 0 1 0
+-0.398245 -0.291049 -0.371795 0 0 1
+0.144484 0.294872 0.108292 0.34276 0.939318 0.0140527
+0.44148 -0.32034 -0.371795 -0.247072 0.170815 0.953823
+0.5 0.0050628 0.292717 1 0 0
+-0.167546 -0.293113 -0.371795 0 0 1
+0.5 -0.16203 -0.169553 1 0 0
+0.448718 -0.320411 -0.341134 1 0 0
+0.255738 -0.222861 0.320513 -0.388006 0.767604 -0.510132
+0.195566 0.294872 -0.333216 0 1 0
+-0.5 -0.240964 0.0868783 1 0 0
+0.0533601 -0.265783 -0.371795 0 0 1
+0.5 0.257887 0.0713222 1 0 0
+0.115984 -0.17551 -0.333333 0 0 1
+0.426836 0.15933 0.320513 0 0 1
+-0.5 0.299545 0.0725699 1 0 0
+-0.450768 -0.294872 -0.0496808 0.673038 0.73922 0.0239581
+0.0350503 -0.134063 -0.333333 0 0 1
+-0.0311306 -0.100903 0.320513 0 0 1
+0.446657 -0.291459 -0.371795 -0.166647 0.234256 0.957785
+0.430023 -0.371795 0.0914641 0 1 0
+-0.125865 -0.107376 0.320513 0 0 1
+-0.5 -0.187568 -0.367595 0.890507 0.141693 0.432344
+0.186953 -0.0770876 -0.333333 0 0 1
+0.374538 -0.152219 0.320513 0 0 1
+-0.179646 -0.371795 -0.331263 0 1 0
+0.391492 0.283341 -0.371795 0 0 1
+-0.10728 -0.294872 0.0129902 0 1 0
+0.210351 -0.294531 -0.371795 0 0 1
+0.200341 -0.023345 -0.301648 0.791967 0.61055 -0.00418602
+0.167107 0.224159 0.371795 0 0 1
+0.235928 -0.371795 -0.031763 0 1 0
+0.0796684 -0.224682 0.371795 0 0 1
+-0.462643 0.170084 0.320513 0 0 1
+0.5 -0.24149 -0.306403 1 0 0
+-0.5 0.281549 0.290956 1 0 0
+0.150615 -0.0967603 0.320513 0 0 1
+-0.5 -0.0284131 0.16992 1 0 0
+0.247527 -0.267775 0.320513 0 0 1
+0.448718 -0.305398 -0.126351 0.987534 -0.154715 0.0289777
+-0.183406 -0.153083 0.371795 0 0 1
+0.5 0.286602 0.0113459 0.971123 0.230702 0.0607946
+0.495274 0.276943 -0.371795 -0.377633 0.0266108 0.925573
+-0.0824252 -0.294872 0.288128 0 1 0
+0.233888 -0.371795 -0.316447 0 1 0
+0.448718 -0.320254 -0.115999 1 0 0
+-0.171947 -0.147887 -0.333333 0 0 1
+-0.12184 0.371795 -0.0541398 0 1 0
+-0.395173 0.171784 -0.371795 0 0 1
+0.0938432 -0.252731 -0.371795 0 0 1
+0.0335838 -0.294872 0.0884149 0 1 0
+0.160391 0.184007 -0.333333 0 0 1
+-0.162439 -0.249891 -0.371795 0 0 1
+0.224356 -0.371795 0.101763 0 1 0
+0.102345 0.0993347 0.320513 0 0 1
+0.141026 0.344643 0.203945 1 0 0
+0.486552 -0.294872 -0.327954 0 1 0
+-0.212651 -0.0394644 -0.235603 -0.411134 0.9113 0.0223645
+-0.174287 -0.371795 0.287465 0 1 0
+-0.5 -0.0844325 -0.0380331 1 0 0
+-0.388275 -0.371795 0.0936256 0 1 0
+0.141026 0.316353 -0.212557 1 0 0
+0.0409286 -0.294872 0.220422 0 1 0
+-0.5 -0.154672 -0.337537 1 0 0
+0.0576118 0.194778 0.320513 -0.226269 -0.484854 0.844819
+-0.354101 0.371795 -0.297706 0 1 0
+-0.5 0.339873 0.0266916 1 0 0
+-0.5 0.282203 0.155661 1 0 0
+-0.245471 0.371795 -0.333185 0 1 0
+0.5 0.0871603 -0.203718 1 0 0
+-0.428949 0.371795 -0.332637 0 1 0
+-0.445951 -0.371795 -0.14509 0.545155 0.838174 -0.0164318
+-0.207316 -0.0994118 0.371795 0 0 1
+-0.218699 0.278702 -0.371795 0 0 1
+-0.247643 -0.371795 -0.137785 0 1 0
+0.216895 -0.371795 0.242472 0 1 0
+0.393695 0.294872 0.250834 0 1 0
+-0.231091 -0.371795 -0.353189 0 1 0
+0.102062 0.243631 0.371795 0 0 1
+0.141109 -0.323608 -0.241745 1 0 0
+-0.48717 -0.284967 0.320513 0.0185072 -0.0537609 0.998382
+0.5 0.105123 0.0436184 1 0 0
+0.5 0.126939 -0.331703 1 0 0
+0.448718 -0.331952 0.0770071 1 0 0
+-0.262076 -0.371795 -0.0297251 0 1 0
+0.22319 0.294872 0.294948 0 1 0
+-0.180942 0.371795 0.269514 0 1 0
+0.118672 -0.294872 0.261762 0 1 0
+-0.417935 0.157053 0.320513 0 0 1
+-0.5 0.194666 -0.136026 1 0 0
+0.5 0.0633314 0.188692 1 0 0
+0.291924 -0.0687825 -0.333333 0 0 1
+-0.141154 -0.309238 0.17555 1 0 0
+-0.5 0.228897 0.235541 1 0 0
+0.22517 0.294872 -0.237962 0 1 0
+-0.18971 -0.371795 0.100501 0 1 0
+0.122782 -0.163648 0.358965 -0.614217 0.789137 0
+-0.250029 0.371795 0.0427908 0 1 0
+0.496215 0.294872 -0.142261 0.51149 0.8588 -0.0289787
+-0.5 -0.0452566 -0.185504 1 0 0
+-0.48079 -0.294872 -0.257286 0 1 0
+-0.228145 0.235555 0.328483 -0.343568 0.935889 0.0779246
+0.362209 0.294872 0.000154802 0 1 0
+0.0325678 -0.284597 0.320513 0 0 1
+0.165516 -0.114449 0.320513 -0.325197 0.211389 0.921717
+-0.380393 0.100319 0.320513 0 0 1
+-0.141154 -0.324032 -0.33304 1 0 0
+-0.349914 -0.127365 0.330155 0.875647 0.482468 -0.0216204
+0.141109 -0.344057 0.179936 1 0 0
+0.281561 0.12735 0.371795 0 0 1
+0.459378 0.16489 0.320513 0 0 1
+0.120798 -0.294872 0.280505 0 1 0
+0.0855908 -0.256282 0.355697 0 1 0
+-0.258212 -0.25423 -0.371795 0 0 1
+-0.125796 0.371795 0.22416 0 1 0
+-0.178233 0.029463 -0.333333 0 0 1
+0.166986 0.0958085 0.320513 0 0 1
+-0.436962 0.371795 0.226974 0 1 0
+0.5 0.213261 0.0716977 1 0 0
+0.0172967 0.177475 0.320513 0 0 1
+-0.176935 -0.371795 0.26708 0 1 0
+0.460381 -0.294872 0.119019 0 1 0
+-0.0421465 0.0921398 0.320513 0 0 1
+-0.337308 -0.100419 0.371795 0 0 1
+0.185942 0.294872 -0.198401 0 1 0
+0.211696 0.294872 -0.299576 0 1 0
+-0.151936 -0.0507297 -0.333333 0 0 1
+-0.0208506 0.130633 -0.333333 0 0 1
+0.250327 -0.0330796 -0.0802635 -0.503379 0.863998 -0.0108262
+-0.384203 0.0039664 0.321958 0.78317 0.0273724 -0.621205
+-0.284253 0.175071 0.371795 0 0 1
+0.189333 -0.0775947 0.360956 0.915785 -0.40167 0
+-0.00581526 0.0910479 -0.333333 0 0 1
+-0.285372 -0.371795 0.0728727 0 1 0
+-0.141154 -0.336219 -0.171321 1 0 0
+0.304716 0.294872 -0.00216948 0 1 0
+0.193005 -0.00709884 -0.025329 0.985027 0.17156 -0.017019
+0.114099 0.239433 -0.371795 0 0 1
+-0.17657 -0.230897 -0.366882 0.00788953 0.953148 -0.302401
+0.241459 0.229414 0.365986 0.458966 0.839346 0.291289
+-0.372399 -0.330357 -0.371795 0 0 1
+0.468671 -0.294872 0.00109932 0 1 0
+-0.263312 0.187503 -0.333333 0 0 1
+-0.5 -0.122719 0.206871 1 0 0
+0.0212492 -0.0410157 -0.333333 0 0 1
+-0.286091 -0.371795 0.305368 0 1 0
+-0.430494 0.0951663 0.320513 0 0 1
+0.255714 0.294872 0.245168 0 1 0
+-0.437028 -0.344799 -0.371795 0.0467909 0.00157556 0.998903
+0.477514 -0.294872 -0.216481 0 1 0
+-0.41138 0.251899 0.320513 0 0 1
+0.114341 0.371795 0.0621727 0 1 0
+-0.447115 0.371795 0.0983279 0 1 0
+0.424153 0.294872 0.153579 0 1 0
+-0.3151 0.0755753 0.371795 0 0 1
+-0.0756688 -0.140447 0.320513 0 0 1
+-0.372696 0.0759835 0.341231 0.948197 -0.317675 0.00235924
+-0.5 -0.0474085 -0.107349 1 0 0
+-0.5 0.0792909 0.213135 1 0 0
+0.141026 0.332665 0.187457 1 0 0
+0.336029 0.294872 0.113658 0 1 0
+0.353036 -0.146865 0.320513 0 0 1
+-0.163736 0.371795 0.242608 0 1 0
+0.142167 -0.21935 -0.333333 0 0 1
+-0.245179 -0.371795 0.0515959 0 1 0
+-0.428473 0.371795 -0.303973 0 1 0
+0.0133713 0.371795 -0.162602 0 1 0
+-0.305926 0.371795 -0.00777054 0 1 0
+-0.5 0.228562 -0.101691 1 0 0
+-0.5 0.0965569 -0.0842653 1 0 0
+0.12835 -0.294872 -0.326971 0 1 0
+-0.5 -0.0462263 -0.223124 1 0 0
+-0.291446 -0.371795 0.103553 0 1 0
+-0.417611 0.0208312 0.320513 0 0 1
+-0.193493 -0.331349 -0.371795 0 0 1
+-0.5 0.0396442 0.0892698 1 0 0
+0.5 0.0824642 0.30258 1 0 0
+-0.0654534 -0.294872 0.111141 0 1 0
+-0.394263 0.371795 -0.299582 0 1 0
+0.5 0.154682 0.101259 1 0 0
+-0.5 0.369513 0.236014 0.897489 -0.440556 0.0205684
+0.3545 0.294872 0.134391 0 1 0
+0.448718 -0.308439 -0.346362 1 0 0
+0.5 0.161539 -0.0220558 1 0 0
+0.0363885 0.371795 -0.143557 0 1 0
+-0.358206 -0.371795 -0.174712 0 1 0
+0.221051 -0.371795 -0.310884 0 1 0
+0.0846351 0.00242285 0.320513 0 0 1
+0.5 -0.254177 -0.182686 1 0 0
+-0.279097 -0.371795 -0.308678 0 1 0
+0.115749 0.371795 -0.193122 0 1 0
+0.355045 -0.117969 0.359705 0.877666 -0.479272 0
+-0.299763 0.142211 0.371795 0 0 1
+-0.0725225 0.371795 -0.0388408 0 1 0
+0.347359 0.0656505 0.371795 0 0 1
+0.260787 -0.0239304 -0.124268 0.746999 -0.66379 -0.0370948
+-0.0823927 0.371795 0.0961188 0 1 0
+-0.314178 0.371795 0.0200842 0 1 0
+0.288501 -0.371795 0.0634456 0 1 0
+-0.0783824 0.371795 0.262134 0 1 0
+0.448718 -0.325065 -0.173796 1 0 0
+-0.107219 0.216168 0.371795 0 0 1
+-0.289837 -0.198324 0.361133 0.606592 0.79501 0.00217048
+0.391181 0.0204783 0.320513 0.13031 -0.000841864 0.991473
+-0.042857 -0.0745528 -0.333333 0 0 1
+-0.413842 0.21686 0.320513 0 0 1
+0.5 -0.0188095 -0.0919937 1 0 0
+-0.477338 -0.294872 -0.276583 0 1 0
+-0.104762 0.156764 0.320513 0 0 1
+0.145595 -0.371795 0.22488 0.192642 0.981257 0.00493543
+0.2905 0.294872 0.162407 0 1 0
+0.17928 0.294872 -0.199852 0 1 0
+0.457681 0.294872 -0.365937 0.0402243 0.975302 -0.217184
+0.429386 -0.371795 -0.194082 0 1 0
+-0.267531 -0.252686 -0.371795 0 0 1
+0.37382 0.294872 0.284389 0 1 0
+-0.5 0.0223799 -0.352628 1 0 0
+0.206035 0.229194 -0.333333 0.260901 0.455158 0.85133
+-0.5 0.347284 0.26604 1 0 0
+0.433813 -0.188271 0.320513 0 0 1
+0.227285 0.283999 0.320513 0.0280875 0.0727216 0.996957
+0.0183382 -0.0625043 0.320513 0 0 1
+0.412557 0.0183893 -0.371795 0 0 1
+0.141026 0.326266 -0.109378 1 0 0
+0.302308 0.294872 0.229185 0 1 0
+-0.5 -0.250209 -0.275449 1 0 0
+0.293697 -0.371795 0.309071 -0.00749331 0.999115 -0.0413862
+-0.27415 0.00238604 -0.18771 0.999888 -0.0128992 0.00763929
+-0.5 -0.150593 0.265068 1 0 0
+-0.5 -0.244193 -0.087874 1 0 0
+0.5 -0.272586 0.0640276 1 0 0
+-0.422873 -0.218953 0.320513 0 0 1
+0.5 -0.255365 -0.220322 1 0 0
+-0.320513 -0.052643 -0.364067 0.99795 0.0157592 -0.0620327
+-0.0555641 -0.0250266 0.320513 0 0 1
+-0.5 0.294686 -0.148097 1 0 0
+0.384191 -0.0410227 0.320513 0.311994 -0.0999571 0.944811
+0.116168 0.108241 0.320513 0 0 1
+0.5 -0.140565 -0.00715854 1 0 0
+-0.248857 -0.338513 0.320513 0 0 1
+0.494149 -0.294872 -0.309594 -0.316069 0.948024 0.036764
+-0.141154 -0.367215 -0.155477 0.978915 -0.204196 -0.00536092
+0.5 -0.00382868 0.085149 1 0 0
+-0.143771 0.134682 -0.333333 0 0 1
+0.200678 -0.371795 -0.300313 0 1 0
+0.0226863 0.288547 0.320513 0 0 1
+-0.5 -0.00885123 -0.0555939 1 0 0
+-0.29393 0.371795 -0.0489688 0 1 0
+0.5 0.100005 0.0997955 1 0 0
+-0.371726 -0.371795 0.136439 0 1 0
+-0.5 0.025372 -0.260945 1 0 0
+-0.0757821 0.371795 0.286252 0 1 0
+0.330662 -0.371795 0.00428929 0 1 0
+-0.404265 -0.371795 0.120403 0 1 0
+0.0649743 -0.294872 -0.0520353 0 1 0
+-0.141565 -0.371795 0.184475 -0.707881 0.67976 -0.191914
+0.5 -0.143895 -0.13829 1 0 0
+-0.148563 -0.096622 -0.333333 0 0 1
+-0.5 0.352301 -0.144726 1 0 0
+-0.318918 0.371795 -0.0415685 0 1 0
+0.293384 0.213172 -0.371795 0.500575 0.569812 0.65172
+0.5 -0.0978683 0.0570206 1 0 0
+0.374085 0.274105 -0.371795 0 0 1
+0.193041 0.00723621 -0.125075 0.98167 -0.190006 0.0148613
+0.5 -0.110984 -0.367597 0.809772 0.162124 -0.563902
+-0.5 0.0881064 0.227202 1 0 0
+-0.438863 0.28406 0.320513 0 0 1
+0.141109 -0.321749 0.139421 1 0 0
+-0.436316 0.351931 0.320513 0 0 1
+0.388802 0.294872 -0.357817 0 1 0
+0.100478 0.371795 -0.358044 0 1 0
+0.5 0.227926 0.250667 1 0 0
+0.448718 -0.367329 0.0268449 0.968503 -0.179601 0.172467
+0.5 0.271163 -0.367603 0.831149 0.0933555 -0.548156
+0.316031 0.294872 0.0285515 0 1 0
+0.210398 0.17022 -0.333333 0 0 1
+0.0275329 0.285815 0.320513 0 0 1
+0.5 -0.121671 0.0421334 1 0 0
+0.211369 0.0331903 -0.0851711 -0.509818 0.860164 0.0142492
+0.445435 0.167498 -0.371795 0 0 1
+0.447256 -0.108188 -0.371795 0 0 1
+-0.0871312 -0.294872 -0.058046 0 1 0
+0.394277 -0.207217 0.320513 0 0 1
+0.0880291 0.0299679 -0.333333 0 0 1
+0.145112 -0.00808757 0.320513 0 0 1
+-0.00481945 -0.0259065 -0.333333 0 0 1
+0.5 -0.0970402 0.100114 1 0 0
+-0.356323 0.0998516 0.371795 -0.227438 0.0527997 0.97236
+0.217441 -0.371795 -0.062373 0 1 0
+0.435638 -0.0484551 -0.371795 0 0 1
+-0.201351 -0.245549 0.333145 0.291767 0.956389 0.0138721
+0.141109 -0.298446 0.0184982 0.557823 0.825494 0.0859794
+-0.320513 0.0125868 -0.367558 0.995424 0.0178551 -0.0938782
+-0.268725 0.362981 0.320513 -0.0857598 0.235173 0.968162
+-0.229364 0.371795 -0.362203 0 1 0
+-0.328138 -0.101542 -0.371795 -0.145665 -0.0174119 0.989181
+-0.5 0.312983 -0.293326 1 0 0
+0.115168 0.062503 0.320513 0 0 1
+0.215544 -0.371795 0.120233 0 1 0
+-0.293711 0.371795 -0.00118246 0 1 0
+-0.0120502 -0.0665051 -0.333333 0 0 1
+-0.0898651 0.175682 0.320513 0.216872 -0.172598 0.960821
+0.265766 -0.0266866 -0.333333 0.239388 -0.241029 0.940531
+0.5 0.172888 -0.0461007 1 0 0
+-0.437422 -0.371795 -0.00740168 0 1 0
+-0.492844 -0.0500493 -0.371795 0.319712 0.0480204 0.946297
+0.082071 -0.0594136 -0.333333 0 0 1
+-0.245627 -0.145987 -0.333333 0 0 1
+-0.5 0.00495112 0.0344869 1 0 0
+-0.5 -0.0318214 -0.328407 1 0 0
+-0.5 0.112499 0.0214664 1 0 0
+-0.474272 0.371795 -0.252639 0 1 0
+0.284568 -0.371795 0.253294 0 1 0
+-0.300586 -0.371795 -0.0408421 0 1 0
+0.0967961 0.113441 0.320513 0 0 1
+0.412981 -0.371795 0.289671 0 1 0
+-0.341109 -0.371795 0.112756 0 1 0
+-0.158403 0.371795 0.155662 0 1 0
+0.5 0.291995 -0.186278 0.939362 0.324453 0.111034
+-0.343987 0.10024 -0.371795 0 0 1
+0.148887 -0.120019 0.320513 0 0 1
+-0.233386 -0.371795 0.0653811 0 1 0
+0.329355 0.294872 -0.306009 0 1 0
+-0.193238 0.371795 0.105678 0 1 0
+0.132158 0.0233732 -0.333333 0 0 1
+0.269793 0.059048 -0.333333 0 0 1
+-0.286607 0.302679 0.320513 0 0 1
+0.279503 0.0158515 0.371795 0 0 1
+-0.345704 -0.135075 0.328639 0.872167 0.47457 -0.118774
+0.366344 0.294872 0.108627 0 1 0
+0.385034 0.294872 -0.0232845 0 1 0
+0.0775785 -0.184631 -0.333333 0 0 1
+-0.360528 -0.337876 0.320513 0 0 1
+0.5 0.153014 -0.21324 1 0 0
+-0.20576 0.230897 -0.343854 -0.00753813 0.994797 0.101598
+0.5 0.0211312 -0.125318 1 0 0
+-0.16481 0.160383 -0.333333 0 0 1
+0.40673 -0.0171785 -0.371795 0 0 1
+-0.281656 0.371795 0.220097 0 1 0
+0.394681 0.0366928 0.320513 0 0 1
+-0.5 0.216473 0.195246 1 0 0
+-0.142921 -0.36782 -0.371795 0.857438 -0.222239 -0.464123
+-0.148901 0.371795 0.123954 0 1 0
+0.0570131 0.371795 -0.123519 0 1 0
+-0.468777 0.371795 -0.157173 0 1 0
+0.181426 -0.00528708 0.320513 0 0 1
+-0.320513 0.144229 -0.369024 0.880619 -0.134269 -0.454402
+0.141026 0.299069 0.0244967 0.944113 0.300814 0.134768
+0.5 -0.0477084 -0.0713057 1 0 0
+-0.151683 -0.204618 -0.333333 0 0 1
+-0.5 -0.0770362 0.16738 1 0 0
+-0.276553 -0.371795 0.194994 0 1 0
+-0.247968 0.371795 0.252702 0 1 0
+0.0305563 0.371795 -0.0973679 0 1 0
+-0.294321 -0.310741 0.320513 0 0 1
+0.159342 -0.371795 0.00812824 0 1 0
+-0.448718 -0.34514 0.0144739 1 0 0
+-0.157127 -0.254213 0.33279 0.0875373 0.996161 -0.000735918
+-0.421059 0.371795 0.242944 0 1 0
+-0.267984 -0.371795 -0.353385 0 1 0
+-0.325153 -0.371795 0.161915 0 1 0
+-0.141154 -0.331757 0.206157 1 0 0
+0.465197 0.263861 0.320513 0 0 1
+0.317244 -0.286223 0.320513 0 0 1
+-0.5 0.214808 -0.120139 1 0 0
+0.202647 -0.371795 -0.343099 0 1 0
+-0.299555 -0.179114 -0.333333 0 0 1
+0.318646 0.169936 -0.350214 0.974977 0.222252 -0.00483006
+-0.5 -0.0172529 -0.116206 1 0 0
+0.5 0.174601 -0.262626 1 0 0
+0.182966 -0.371795 -0.294164 0 1 0
+0.126587 0.164394 0.371795 -0.396575 -0.494147 0.773659
+0.373998 -0.371795 0.14149 0 1 0
+0.5 -0.124375 0.298072 1 0 0
+0.139632 -0.029 -0.333333 0 0 1
+-0.5 -0.148439 -0.16853 1 0 0
+0.107264 -0.294872 0.273808 0 1 0
+-0.0665977 0.256282 0.320971 0.0365589 0.639959 0.767539
+-0.5 -0.243804 -0.0380814 1 0 0
+0.193926 0.0105366 -0.146821 0.962732 -0.270426 0.00398217
+-0.363569 -0.210888 -0.371795 0 0 1
+0.5 -0.0484436 0.202265 1 0 0
+0.346791 0.247566 -0.371795 0 0 1
+0.5 0.00928158 -0.00869325 1 0 0
+0.111807 -0.178381 0.371795 -0.449857 0.481116 0.752434
+0.141109 -0.367066 0.196608 0.97904 0.20345 0.00938736
+0.329997 -0.277876 0.320513 0 0 1
+0.0338917 0.201728 0.331595 0.152464 0.986623 -0.0576988
+0.5 -0.291585 0.320047 0.787542 -0.355208 0.503592
+0.0584457 -0.0654083 -0.333333 0 0 1
+-0.5 0.237957 0.0220942 1 0 0
+0.362544 0.280634 -0.371795 0 0 1
+0.155565 -0.133035 0.323029 0.802037 -0.430544 -0.413967
+-0.141154 -0.307969 0.141838 1 0 0
+0.413909 0.294872 -0.201405 0 1 0
+-0.440473 -0.371795 -0.0165866 0.140115 0.989819 -0.0250329
+-0.387894 0.166592 0.320513 0 0 1
+0.227804 0.00865369 0.0176054 -0.147059 0.461358 0.874942
+-0.476617 -0.294872 0.173916 0 1 0
+-0.0776709 -0.294872 -0.187985 0 1 0
+0.496199 -0.294872 -0.00589762 -0.11052 0.977889 -0.177532
+0.5 -0.12664 -0.0658886 1 0 0
+0.110361 0.125458 0.320513 0 0 1
+0.268922 -0.00353264 -0.152728 0.995492 -0.0941392 0.0115332
+0.0120527 0.111242 -0.333333 0 0 1
+0.5 0.163423 0.0563692 1 0 0
+-0.5 0.354722 0.301876 1 0 0
+0.13051 -0.112237 -0.333333 0 0 1
+0.459681 0.0574327 -0.371795 0 0 1
+-0.464561 -0.0707805 -0.371795 0 0 1
+-0.5 -0.000989476 0.160276 1 0 0
+0.376261 -0.0622984 0.341597 0.977145 -0.212575 0
+-0.473897 0.163683 -0.371795 0 0 1
+-0.0256951 0.160818 0.320513 0 0 1
+0.319795 0.178645 0.320513 0.237438 0.125184 0.963303
+-0.313635 0.371795 -0.0797914 0 1 0
+0.377361 -0.190018 -0.371795 0 0 1
+-0.297127 0.371795 0.116151 0 1 0
+-0.16195 -0.21445 -0.333333 0 0 1
+-0.488858 0.371795 0.00629451 -0.0857803 0.995622 -0.0371321
+0.186329 0.121351 -0.333333 0 0 1
+-0.5 0.204716 -0.168797 1 0 0
+0.285109 0.294872 -0.0407747 0 1 0
+-0.31288 -0.371795 0.221298 0 1 0
+-0.5 0.22961 0.11971 1 0 0
+0.411197 0.294872 -0.0619317 0 1 0
+0.5 0.156439 0.146353 1 0 0
+-0.273557 0.00809185 -0.0462441 0.98241 -0.186459 -0.0101806
+-0.417733 -0.371795 0.0644405 0 1 0
+0.243017 0.201374 -0.333333 0 0 1
+-0.5 -0.114148 -0.304448 1 0 0
+0.373127 -0.214708 -0.371795 0 0 1
+0.5 0.0239607 -0.241014 1 0 0
+-0.300113 0.304096 -0.371795 0 0 1
+-0.244578 -0.371795 -0.0570986 0 1 0
+-0.152615 0.371795 0.101687 0 1 0
+0.196534 0.0571731 0.371317 -0.619719 -0.274558 0.735232
+-0.5 -0.0748972 0.104526 1 0 0
+0.498536 0.294872 -0.326267 0.878193 0.478304 -0.00116622
+0.166653 -0.371795 0.22772 0 1 0
+-0.448718 -0.303098 -0.186031 0.995992 0.0894384 0.00111608
+-0.118987 0.108062 0.320513 0 0 1
+-0.5 0.261642 -0.148605 1 0 0
+0.269777 -0.369486 -0.371795 0.0647988 0.354055 0.932977
+-0.265952 -0.227316 -0.335188 0.153848 0.687647 -0.709558
+0.441869 0.222252 0.320513 0 0 1
+-0.5 0.0361368 -0.0330049 1 0 0
+-0.5 0.330296 0.0327809 1 0 0
+0.401116 0.294872 -0.106698 0 1 0
+-0.475523 0.371795 0.252822 0 1 0
+-0.328875 0.371795 -0.302649 0 1 0
+0.5 -0.105423 -0.24847 1 0 0
+-0.0696684 -0.140773 -0.333333 0 0 1
+0.109756 -0.165098 -0.333333 0 0 1
+0.0945166 -0.294872 -0.270088 0 1 0
+0.453076 0.0281619 -0.371795 0 0 1
+-0.199004 -0.0296449 -0.0932069 0.743327 -0.668638 0.0197175
+-0.228091 0.371795 0.240458 0 1 0
+-0.107017 -0.294872 0.0841688 0 1 0
+0.235389 0.294872 -0.00834061 0 1 0
+-0.130573 -0.0476682 0.320513 0 0 1
+0.353817 0.229237 -0.371795 0 0 1
+-0.380819 0.371795 -0.0348822 0 1 0
+0.448718 -0.308753 -0.350365 1 0 0
+0.0588812 -0.223911 0.371795 0 0 1
+0.0761455 0.339591 0.320513 0 0 1
+0.5 -0.244488 -0.0422805 1 0 0
+0.20037 -0.371795 -0.05997 0 1 0
+0.117705 0.106451 -0.333333 0 0 1
+-0.185396 0.10824 0.371795 0 0 1
+0.263227 -0.0949687 0.371795 0 0 1
+-0.313939 -0.0669869 -0.333333 -0.265742 0.00594123 0.964026
+-0.356339 -0.367893 -0.371795 0.0699556 0.366585 0.927751
+0.0295042 0.104614 0.320513 0 0 1
+-0.372626 0.371795 -0.151147 0 1 0
+0.486329 0.294872 -0.31384 0 1 0
+-0.225086 -0.371795 0.0270203 0 1 0
+0.494724 -0.0429262 0.320513 0.0717482 -0.023283 0.997151
+0.0790347 -0.130997 0.320513 0 0 1
+0.495901 0.294872 0.155851 0.531397 0.846999 0.0144664
+-0.14808 0.152543 -0.333333 0 0 1
+-0.401099 -0.371795 -0.155556 0 1 0
+-0.392522 0.371795 0.266179 0 1 0
+-0.257107 -0.171653 0.371795 0 0 1
+0.196645 -0.0174819 -0.113315 0.901985 0.431768 0
+0.419028 -0.293215 0.320513 0 0 1
+-0.197995 0.278686 0.320513 0 0 1
+-0.234968 -0.321279 -0.371795 0 0 1
+0.0948451 0.371795 0.194887 0 1 0
+0.0996994 0.176114 0.320513 0.0369317 -0.477997 0.877585
+-0.432393 -0.0765209 0.320513 0 0 1
+-0.202525 0.371795 0.279522 0 1 0
+0.141237 0.275386 -0.371795 0 0 1
+0.499844 -0.294872 -0.0385832 -0.661941 0.737934 0.13148
+0.264224 -0.114174 0.371795 0 0 1
+0.0121178 0.337506 0.320513 0 0 1
+0.0875771 -0.294872 -0.362087 0 1 0
+0.441902 -0.371795 -0.153244 -0.272706 0.962081 -0.00566588
+-0.5 -0.272023 -0.263396 1 0 0
+0.5 0.239467 -0.197225 1 0 0
+0.497878 -0.0158932 -0.371795 -0.452225 0.0227285 0.891614
+0.269117 0.213835 0.351859 0.557973 0.829846 0.00459539
+-0.0623108 0.230504 -0.333333 -0.029353 0.612285 0.790092
+0.446499 0.294872 -0.367009 -0.183591 0.827393 -0.530768
+-0.394061 0.371795 -0.112794 0 1 0
+-0.253267 0.354042 0.320513 0 0 1
+-0.462545 -0.00160185 0.320513 0 0 1
+-0.361327 -0.309066 0.320513 0 0 1
+-0.373697 -0.326487 0.320513 0 0 1
+0.00227703 0.315473 -0.371795 0 0 1
+0.5 0.0358822 -0.226216 1 0 0
+-0.5 -0.0321101 0.175234 1 0 0
+0.141109 -0.335732 -0.173121 1 0 0
+-0.342305 -0.371795 -0.260722 0 1 0
+0.19279 0.294872 0.254824 0 1 0
+0.293076 -0.356014 0.320513 0 0 1
+-0.213523 -0.286645 -0.371795 0 0 1
+0.0781615 0.371795 -0.0650268 0 1 0
+-0.437828 -0.129999 0.320513 0 0 1
+0.5 0.293224 -0.13567 0.683664 0.63251 -0.364054
+-0.102222 -0.294872 0.0636772 0 1 0
+0.141026 0.31795 0.186023 1 0 0
+-0.392856 -0.00664025 0.320513 -0.0425812 -0.00854745 0.999057
+0.177889 0.294872 -0.115954 0 1 0
+-0.319149 0.116856 0.371795 0 0 1
+-0.5 0.232959 -0.306546 1 0 0
+0.141026 0.35957 -0.142507 1 0 0
+-0.0223241 0.371795 -0.349062 0 1 0
+0.463577 0.294872 0.139363 0 1 0
+0.177436 -0.0219481 0.320513 0 0 1
+0.273789 0.150456 -0.333333 0 0 1
+0.5 -0.284433 -0.305915 0.992105 -0.121364 -0.0316086
+0.0816703 0.239587 0.371795 0 0 1
+-0.292457 0.0158503 -0.333333 0 0 1
+0.290765 0.294872 0.103309 0 1 0
+0.466724 0.101336 -0.371795 0 0 1
+0.319358 0.294872 -0.135762 0 1 0
+-0.5 0.220901 0.175517 1 0 0
+-0.212274 0.371795 0.0515789 0 1 0
+-0.15605 0.29313 0.320513 0 0 1
+-0.185896 -0.371795 -0.0058143 0 1 0
+-0.255175 0.229761 0.320513 -0.242062 0.199455 0.949539
+0.5 0.171675 0.0450558 1 0 0
+-0.150271 0.371795 -0.319494 0 1 0
+-0.0912381 -0.0230263 0.320513 0 0 1
+-0.5 0.362164 0.104215 0.999842 -0.0174987 0.00302899
+0.200436 0.223551 0.371795 0 0 1
+0.119343 0.172952 0.371795 -0.259973 -0.264599 0.928656
+0.173222 0.294872 0.076308 0 1 0
+-0.323317 0.261958 0.320513 0 0 1
+0.391662 0.294872 -0.367127 -0.0608917 0.991557 -0.114482
+-0.329757 0.0839345 -0.371795 -0.033942 0.0209753 0.999204
+0.00658259 0.150761 0.320513 0 0 1
+-0.18586 -0.247427 -0.371795 0 0 1
+0.0348034 -0.185931 0.320513 0 0 1
+0.14035 0.125368 -0.333333 0 0 1
+0.5 0.221385 -0.359256 1 0 0
+-0.0438179 0.000783865 0.320513 0 0 1
+-0.245882 0.0408659 -0.137968 -0.340674 0.939812 0.0263326
+-0.5 -0.0632713 -0.0818409 1 0 0
+0.187488 0.294872 -0.23723 0 1 0
+-0.176251 -0.251156 0.330888 0.212551 0.97715 0
+-0.262337 0.371795 -0.0590266 0 1 0
+-0.374552 -0.371795 0.192276 0 1 0
+0.257638 -0.371795 -0.153896 0 1 0
+-0.5 -0.167247 -0.349543 1 0 0
+0.216991 0.0358509 -0.140565 -0.359731 0.932891 0.0175306
+0.5 -0.265826 0.0954644 1 0 0
+0.0865185 -0.294872 0.181814 0 1 0
+-0.0106833 0.230897 -0.343207 0 1 0
+-0.473662 -0.261749 0.320513 0 0 1
+-0.0999576 0.178494 0.342049 -0.47593 0.879483 0
+0.5 -0.0388598 0.128436 1 0 0
+0.5 -0.247015 0.0347647 1 0 0
+-0.141154 -0.311457 -0.00731189 1 0 0
+0.0151602 -0.0862258 -0.333333 0 0 1
+-0.457903 -0.294872 -0.334279 0.194656 0.977969 0.0754058
+0.295522 -0.371795 -0.0215584 0 1 0
+0.465944 -0.245552 0.320513 0 0 1
+0.46554 0.01003 -0.371795 0 0 1
+0.247612 -0.053494 -0.333333 0 0 1
+0.5 0.0682754 0.230816 1 0 0
+-0.0267362 0.371795 -0.142332 0 1 0
+-0.232784 0.209694 -0.333333 0 0 1
+0.44117 -0.371795 -0.058664 -0.0458046 0.998888 0.0111928
+-0.449818 -0.0823195 -0.371795 0 0 1
+-0.5 -0.0566287 0.173941 1 0 0
+0.14967 -0.230897 -0.356424 0 1 0
+0.0740602 -0.00420091 0.320513 0 0 1
+0.176642 0.294872 0.00589445 0 1 0
+0.400811 0.0200633 -0.371795 0 0 1
+0.205304 -0.0984475 0.371795 0 0 1
+-0.448718 -0.31764 0.196942 1 0 0
+-0.333888 -0.371795 -0.129954 0 1 0
+0.378597 -0.309964 0.320513 0 0 1
+-0.5 0.293832 -0.111328 1 0 0
+0.320513 0.103687 -0.349456 1 0 0
+0.368023 -0.0467491 -0.371795 0 0 1
+0.200556 0.294872 0.149896 0 1 0
+0.485132 -0.294872 0.0406662 0 1 0
+-0.325178 -0.299578 -0.371795 0 0 1
+0.189708 0.122463 -0.333333 0 0 1
+0.5 0.0178446 0.00564592 1 0 0
+0.43975 0.0795409 0.320513 0 0 1
+0.141109 -0.303576 0.163238 1 0 0
+-0.5 0.251049 0.0777297 1 0 0
+0.318888 -0.362747 -0.371795 0.00158633 0.0436604 0.999045
+0.448718 -0.341491 0.07244 1 0 0
+0.490882 0.294872 0.223367 0 1 0
+-0.0823768 0.0579516 -0.333333 0 0 1
+0.285648 -0.371795 -0.00558644 0 1 0
+0.119463 -0.294872 0.295273 0 1 0
+-0.281112 0.371795 -0.227268 0 1 0
+-0.15601 -0.371795 -0.196334 0 1 0
+0.36268 -0.0764338 0.371795 0.171645 0.00448303 0.985149
+0.318366 0.294872 0.18581 0 1 0
+0.483803 0.294872 -0.299311 0 1 0
+-0.491257 0.265965 0.320513 -0.0918941 0.00738756 0.995741
+0.203338 0.0231557 0.361452 0.996509 0.0834899 -0.000106595
+-0.218535 -0.371795 0.178255 0 1 0
+-0.204068 -0.0491265 0.371795 0.63083 0.111423 0.767879
+0.230016 0.0189978 0.0116554 -0.0425692 0.532813 0.845161
+-0.5 0.124698 -0.0214789 1 0 0
+0.112072 0.335212 -0.371795 0 0 1
+0.45801 0.187753 0.320513 0 0 1
+0.5 0.192502 0.250493 1 0 0
+0.141109 -0.33813 -0.332193 1 0 0
+-0.5 -0.0920894 0.0712994 1 0 0
+-0.135864 0.371795 -0.175545 0 1 0
+-0.239658 -0.371795 -0.166707 0 1 0
+-0.053946 0.256993 0.320513 -0.103499 0.672595 0.732738
+0.141109 -0.351344 0.0340985 1 0 0
+0.288171 0.294872 0.0405043 0 1 0
+-0.5 0.00685227 0.165184 1 0 0
+0.00575791 -0.148462 0.320513 0 0 1
+0.127446 -0.205053 -0.333333 0 0 1
+0.312214 0.0779642 -0.333333 0.148217 -0.00230424 0.988952
+-0.5 0.365194 -0.200221 0.894279 -0.447145 -0.0180964
+-0.164801 0.159919 0.371795 0 0 1
+0.5 -0.147147 0.0701317 1 0 0
+-0.0893488 0.371795 -0.0863534 0 1 0
+0.0940897 0.00662223 0.320513 0 0 1
+-0.137169 -0.293691 -0.371795 -0.0349951 0.149185 0.98819
+-0.304078 0.20119 -0.369282 0.639854 -0.467294 -0.610101
+-0.478796 -0.203219 0.320513 0 0 1
+-0.372915 0.0753968 0.351273 0.948503 -0.316761 0.0022508
+-0.448718 -0.309411 0.205049 1 0 0
+-0.5 0.364277 -0.267583 0.968279 -0.232293 0.0920602
+0.103823 0.0675467 0.320513 0 0 1
+0.464157 -0.294872 -0.210492 0 1 0
+-0.5 -0.191746 0.224513 1 0 0
+-0.177486 -0.371795 0.152077 0 1 0
+0.231235 0.294872 0.283995 0 1 0
+0.128236 0.371795 -0.276714 0 1 0
+0.388176 0.294872 -0.0692434 0 1 0
+-0.113729 -0.0366908 -0.333333 0 0 1
+-0.361034 -0.371795 0.292176 0 1 0
+0.170657 0.294872 0.0827878 0 1 0
+0.32938 -0.371795 -0.0347216 0 1 0
+-0.5 0.182244 0.0955435 1 0 0
+-0.5 -0.199836 -0.0603562 1 0 0
+0.5 0.149955 0.30132 1 0 0
+0.0601522 -0.0107358 -0.333333 0 0 1
+-0.471868 -0.17129 -0.371795 0 0 1
+0.132476 0.371795 0.216527 0.0220764 0.999721 -0.00837863
+-0.141154 -0.35225 -0.218311 1 0 0
+0.215285 0.294872 -0.161955 0 1 0
+-0.446653 0.371795 -0.0698626 0 1 0
+0.251879 0.223725 0.337195 0.479237 0.877686 0
+0.400727 0.0668311 0.320513 0 0 1
+-0.0840279 -0.150194 0.320513 0 0 1
+0.215165 -0.0349997 -0.177657 0.418726 0.908059 -0.00987342
+-0.320513 0.133143 -0.347697 1 0 0
+0.141026 0.317551 -0.296683 1 0 0
+0.5 0.27376 -0.330083 1 0 0
+-0.122847 -0.294872 0.0605277 0 1 0
+-0.212883 -0.0395725 -0.204934 -0.39745 0.917624 0
+-0.0167997 -0.283451 -0.371795 0 0 1
+0.0580396 -0.294872 0.17616 0 1 0
+-0.0950845 -0.0452007 0.320513 0 0 1
+0.141109 -0.311664 0.0993061 1 0 0
+-0.253491 0.100791 -0.333333 0 0 1
+-0.122008 0.371795 0.153148 0 1 0
+0.204589 0.293087 -0.371795 -0.0150438 -0.417973 0.908335
+-0.4623 0.371795 -0.208662 0 1 0
+-0.358992 0.371795 -0.136661 0 1 0
+-0.434193 -0.127675 -0.371795 0 0 1
+-0.0725864 0.371795 0.264995 0 1 0
+0.0197138 -0.294872 -0.348209 0 1 0
+-0.02173 0.371795 -0.330942 0 1 0
+-0.0760542 0.0321765 -0.333333 0 0 1
+0.420956 -0.371795 0.00108591 0 1 0
+-0.432835 -0.371795 -0.0744696 0 1 0
+0.0240015 0.205933 -0.333333 0 0 1
+-0.382169 0.0324127 0.363718 0.99151 -0.061552 -0.114538
+-0.452187 0.371795 0.0201066 0 1 0
+0.39916 0.294872 -0.0381436 0 1 0
+-0.161052 0.0373785 -0.333333 0 0 1
+0.345742 0.294872 0.158456 0 1 0
+0.117725 0.371795 -0.0343999 0 1 0
+-0.160685 -0.0557044 0.320513 0 0 1
+-0.220279 -0.0845955 0.371795 0 0 1
+-0.280967 0.353032 -0.371795 0 0 1
+0.46289 -0.0783811 0.320513 0 0 1
+0.101263 0.371795 0.138945 0 1 0
+0.048381 -0.294872 -0.131544 0 1 0
+0.410817 -0.209203 -0.371795 0 0 1
+0.5 -0.0412733 0.0942645 1 0 0
+0.261769 0.294872 0.286411 0 1 0
+-0.025829 0.371795 0.145494 0 1 0
+0.00884218 -0.290812 -0.371795 0.129496 0.440757 0.888237
+0.102223 -0.197914 0.371795 0 0 1
+0.153282 -0.371795 -0.105114 0 1 0
+-0.5 -0.274241 0.0863392 1 0 0
+-0.42899 -0.154915 -0.371795 0 0 1
+-0.0635274 0.103742 0.320513 0 0 1
+0.448718 -0.362363 -0.341694 0.999829 -0.0177768 -0.00509323
+0.123172 -0.167855 0.371795 -0.429962 0.625149 0.6514
+-0.5 0.116901 0.124448 1 0 0
+-0.5 -0.0643136 -0.212752 1 0 0
+-0.5 0.259611 0.200991 1 0 0
+-0.5 -0.15489 -0.290932 1 0 0
+0.141109 -0.332952 -0.17857 1 0 0
+-0.282298 0.362774 0.320513 0.00396323 0.12765 0.991811
+0.5 -0.240809 -0.110783 1 0 0
+-0.5 0.0101088 -0.0474715 1 0 0
+-0.363648 -0.371795 0.158712 0 1 0
+0.5 0.228597 0.262362 1 0 0
+-0.27067 -0.0171826 -0.167676 0.927146 0.374683 -0.00349556
+0.5 -0.277765 0.00662688 1 0 0
+0.221976 -0.371795 0.089664 0 1 0
+-0.362113 0.0567213 0.371795 0 0 1
+-0.0649452 -0.284389 -0.371795 0 0 1
+-0.0149392 0.371795 0.148599 0 1 0
+-0.376626 -0.324353 0.320513 0 0 1
+0.12785 -0.261216 -0.371795 0 0 1
+-0.00397796 0.371795 -0.293063 0 1 0
+0.5 -0.233075 -0.152965 1 0 0
+0.450345 0.294872 0.249807 0 1 0
+-0.227736 0.371795 -0.0772666 0 1 0
+-0.495842 0.222209 0.320513 -0.538961 0.0153675 0.842191
+0.370674 0.294872 -0.314509 0 1 0
+-0.152339 0.371795 -0.102261 0 1 0
+-0.305459 -0.18426 0.33247 0.707107 0.707107 0
+-0.5 -0.249857 -0.193646 1 0 0
+-0.15222 0.371795 -0.0399313 0 1 0
+0.448718 -0.367709 -0.308102 -0.623482 0.77956 0.0596362
+-0.5 0.0672318 0.194037 1 0 0
+0.420955 0.294872 0.0243364 0 1 0
+-0.5 0.0835536 -0.0811247 1 0 0
+-0.5 0.280762 0.163602 1 0 0
+0.5 -0.250592 -0.18882 1 0 0
+-0.162912 -0.371795 0.303834 0 1 0
+-0.26765 0.214933 0.354817 -0.538579 0.84257 -0.0029923
+-0.083647 -0.294872 0.303228 0 1 0
+0.141109 -0.36529 -0.289896 0.988222 0.15122 0.023467
+-0.30109 -0.263705 0.320513 0 0 1
+0.203823 0.0272393 -0.0676215 -0.693589 0.720303 -0.00989363
+-0.374468 0.371795 0.0558218 0 1 0
+-0.156973 -0.254224 0.359988 0.0713683 0.99745 0
+0.343738 -0.173049 -0.371795 0 0 1
+-0.5 -0.239456 -0.184928 1 0 0
+0.469903 -0.294872 0.20525 0 1 0
+-0.241459 0.11261 0.371795 0 0 1
+-0.0017949 -0.294872 -0.125533 0 1 0
+0.00253428 -0.136939 0.320513 0 0 1
+0.5 0.251823 -0.00714302 1 0 0
+-0.297049 -0.371795 -0.125029 0 1 0
+-0.5 -0.195808 0.316787 0.983653 0.0445691 -0.174471
+-0.5 0.23836 0.147542 1 0 0
+0.311286 0.26608 -0.371795 0 0 1
+-0.194579 0.371795 -0.0978412 0 1 0
+0.389066 0.294872 0.111729 0 1 0
+0.266613 -0.0596284 0.371795 0 0 1
+0.096896 0.371795 0.0583294 0 1 0
+-0.5 0.157808 0.126806 1 0 0
+0.149256 0.0317813 0.320513 0 0 1
+0.205602 -0.27226 0.320513 0 0 1
+-0.5 -0.210447 0.272107 1 0 0
+0.227897 -0.0853501 0.371795 0 0 1
+-0.0656402 -0.018804 0.320513 0 0 1
+-0.104021 0.0598261 0.320513 0 0 1
+-0.00864549 -0.294872 -0.247346 0 1 0
+-0.5 -0.294343 -0.192749 0.855644 0.515022 0.0512487
+-0.223295 0.309271 -0.371795 0 0 1
+-0.058156 -0.196309 0.334425 0.313721 0.949509 -0.00350595
+0.154065 -0.230897 -0.343578 0 1 0
+-0.5 -0.150204 0.27369 1 0 0
+0.0401616 0.371795 0.279032 0 1 0
+-0.170494 -0.371795 0.0168563 0 1 0
+0.0461807 -0.294872 0.280494 0 1 0
+-0.0973074 0.232962 0.371795 0 0 1
+-0.189967 0.01525 -0.0902095 0.938279 0.345626 0.0132339
+0.224423 0.0379063 -0.32357 -0.154882 0.987842 0.0134208
+-0.141154 -0.311546 0.149268 1 0 0
+0.211744 0.0429076 0.371795 0 0 1
+0.328109 -0.0580546 0.371795 0 0 1
+-0.0306199 -0.0403969 -0.333333 0 0 1
+0.397394 0.217757 -0.371795 0 0 1
+-0.5 -4.95498e-005 -0.225892 1 0 0
+0.250841 -0.329536 0.320513 0 0 1
+0.210242 -0.0640373 -0.333333 0 0 1
+-0.395502 -0.371795 -0.089734 0 1 0
+0.5 0.172707 -0.358281 1 0 0
+0.5 -0.21991 -0.0359663 1 0 0
+-0.320513 0.0961176 -0.334335 -0.592348 0.183694 0.784462
+-0.0618039 -0.294872 0.253193 0 1 0
+0.140378 0.255411 0.347947 0.0713285 0.997453 0
+0.0213035 -0.294872 -0.335366 0 1 0
+0.141109 -0.308144 -0.198735 1 0 0
+0.435701 -0.371795 -0.118112 0 1 0
+0.139738 -0.294872 0.146149 0.541967 0.839559 -0.0375712
+0.0105554 -0.294872 0.104801 0 1 0
+0.273097 0.0120607 -0.333333 0.278078 0.0719766 0.957858
+0.5 0.105798 -0.310567 1 0 0
+-0.333673 0.165074 -0.371795 0 0 1
+-0.115336 -0.294872 -0.343699 0 1 0
+0.141109 -0.308598 0.135169 1 0 0
+-0.448718 -0.324301 -0.225802 1 0 0
+0.142914 -0.0410777 0.320513 0 0 1
+0.5 0.209734 0.0484283 1 0 0
+0.324529 0.18971 -0.371795 0 0 1
+-0.258223 0.23553 0.320513 0 0 1
+0.367005 0.294872 0.279868 0 1 0
+0.5 0.0671781 -0.0200737 1 0 0
+0.194872 0.0136808 -0.0358933 0.949013 -0.315199 0.00495457
+-0.5 0.276721 -0.176642 1 0 0
+0.257032 0.220911 0.363204 0.501469 0.863229 0.0580122
+-0.5 0.0103433 0.277694 1 0 0
+0.5 -0.0860413 -0.032911 1 0 0
+-0.5 0.206689 0.0780852 1 0 0
+0.23858 -0.371795 0.066648 0 1 0
+-0.313431 -0.371795 0.109427 0 1 0
+0.141109 -0.366536 -0.352568 0.970602 0.236105 -0.0467624
+-0.5 0.362226 -0.131911 0.999209 -0.033555 -0.0213594
+-0.16436 -0.110658 -0.333333 0 0 1
+0.247831 -0.0343202 -0.14954 -0.428841 0.90308 -0.0232585
+-0.4711 0.371795 -0.253135 0 1 0
+0.173643 -0.108214 0.323127 0.745336 -0.405924 -0.528867
+0.0272088 -0.294872 -0.147575 0 1 0
+-0.469728 0.371795 0.213214 0 1 0
+-0.405713 -0.371795 -0.103658 0 1 0
+0.193768 -0.00994964 -0.0584933 0.963076 0.269094 -0.00852187
+0.22095 -0.323816 0.320513 0 0 1
+-0.0688366 -0.294872 0.272144 0 1 0
+0.035695 -0.0252122 0.320513 0 0 1
+0.228372 0.235471 0.323053 0.28699 0.857962 0.426072
+-0.429899 -0.253052 -0.371795 0 0 1
+0.310522 -0.371795 -0.21525 0 1 0
+-0.299114 -0.371795 0.301046 0 1 0
+-0.448718 -0.311286 -0.169221 1 0 0
+0.371798 0.0677437 -0.371795 0 0 1
+-0.443975 -0.371795 0.0875041 0.288986 0.957129 0.019748
+-0.400572 -0.371795 0.213147 0 1 0
+0.240108 -0.150902 0.371795 0 0 1
+0.0826097 0.0345272 -0.333333 0 0 1
+-0.112737 0.23527 0.371795 0 0 1
+0.141026 0.353873 0.0760017 1 0 0
+0.483118 0.294872 -0.252953 0 1 0
+0.5 0.0476668 -0.215699 1 0 0
+-0.213355 -0.371795 -0.284799 0 1 0
+0.128498 0.2915 0.320513 0 0 1
+0.181205 -0.371795 -0.364223 0.00895616 0.99915 0.0402268
+-0.5 0.243377 -0.167619 1 0 0
+-0.171489 0.163686 0.371795 0 0 1
+0.397011 0.294872 -0.295321 0 1 0
+0.0992883 -0.230897 -0.345636 0 1 0
+-0.247335 0.371795 0.121438 0 1 0
+0.320513 -0.0112774 -0.340989 0.978822 0.00886056 0.20452
+0.246082 -0.0351356 -0.252724 -0.449209 0.893342 0.0123097
+0.141109 -0.30639 0.146941 1 0 0
+0.141109 -0.322841 -0.36973 0.949605 -0.0547967 0.308623
+0.117327 0.371795 0.16849 0 1 0
+0.202079 0.294872 0.102347 0 1 0
+-0.352841 0.116921 0.371795 -0.277678 0.15674 0.947801
+0.0522089 -0.294872 0.179551 0 1 0
+0.319267 0.221831 0.320513 0 0 1
+0.091013 0.371795 -0.329079 0 1 0
+-0.0685252 -0.294872 -0.0749199 0 1 0
+-0.157235 -0.371795 -0.342974 0 1 0
+0.147268 -0.371795 0.213141 0.143427 0.9896 0.0109469
+0.152647 0.111384 -0.333333 0 0 1
+0.5 -0.079823 0.289812 1 0 0
+-0.337293 -0.242195 0.320513 0 0 1
+-0.5 -0.238523 -0.0730358 1 0 0
+0.141026 0.312625 -0.182588 1 0 0
+0.0195262 0.256282 0.332793 0 1 0
+0.293055 0.0331643 -0.333333 0 0 1
+0.5 -0.162095 -0.142327 1 0 0
+-0.368314 0.371795 0.152819 0 1 0
+0.171839 -0.123013 0.371795 -0.0914581 0.0835021 0.992302
+-0.178792 0.100333 0.355224 0.86569 -0.500449 0.0114584
+0.15521 0.0182158 0.320513 0 0 1
+-0.354407 -0.371795 0.0313147 0 1 0
+0.434011 0.294872 -0.311795 0 1 0
+0.241016 0.294872 -0.252743 0 1 0
+-0.272056 0.166873 -0.333333 0 0 1
+-0.225333 0.371795 0.0224296 0 1 0
+0.42881 0.294872 -0.243147 0 1 0
+0.5 0.120594 0.275183 1 0 0
+0.343584 -0.371795 0.101973 0 1 0
+0.141026 0.295962 0.113535 0.779995 0.624074 -0.0462655
+-0.5 0.0185253 0.306049 1 0 0
+0.1621 -0.371795 -0.15605 0 1 0
+-0.5 0.0547631 -0.21362 1 0 0
+0.153499 0.16305 -0.333333 0 0 1
+0.1213 0.30722 0.320513 0 0 1
+-0.0732905 0.371795 0.144119 0 1 0
+-0.316818 0.371795 -0.12537 0 1 0
+-0.100043 -0.289991 0.320513 -0.0392714 -0.535215 0.843803
+-0.5 0.0950292 0.320115 -0.464715 -0.0540496 0.883809
+0.5 0.112185 -0.219267 1 0 0
+-0.204578 0.294732 -0.371795 0 0 1
+-0.214425 0.371795 -0.0656574 0 1 0
+0.337052 -0.371795 -0.273921 0 1 0
+-0.5 0.106326 -0.13172 1 0 0
+0.311095 -0.371795 0.0976669 0 1 0
+-0.0370297 0.186871 0.320513 0 0 1
+-0.320513 0.0782287 -0.343961 0.994767 0.0180983 -0.100549
+0.229755 -0.209924 -0.333333 0 0 1
+0.353589 -0.223572 0.320513 0 0 1
+-0.5 0.0396458 -0.276461 1 0 0
+0.5 0.291845 -0.199363 0.929411 0.368362 0.022451
+0.467173 0.00772717 -0.371795 0 0 1
+-0.5 -0.160237 0.303203 1 0 0
+-0.22226 -0.371795 -0.0237717 0 1 0
+-0.5 -0.132417 0.230281 1 0 0
+-0.0345314 0.371795 -0.322071 0 1 0
+0.0432445 -0.0620248 -0.333333 0 0 1
+0.068432 -0.294872 -0.0897185 0 1 0
+-0.5 0.252436 0.0688275 1 0 0
+0.148076 0.294872 -0.00373276 0.259656 0.964199 -0.0538376
+0.0383449 0.371795 -0.200972 0 1 0
+0.15411 -0.134616 0.35964 0.73588 -0.677087 -0.00591596
+0.374248 0.0193393 -0.371795 0 0 1
+0.178296 -0.0495202 0.320513 0 0 1
+-0.448718 -0.365135 -0.0740171 0.973574 0.224471 -0.0420299
+-0.448718 -0.368748 -0.303583 0.948279 0.315152 -0.0380311
+-0.251332 -0.0383244 -0.0960226 0.434032 0.900883 -0.00510286
+-0.319241 -0.106537 0.371795 0 0 1
+0.324827 0.115958 -0.371795 0.310507 0.0145508 0.95046
+0.363502 0.100634 0.322208 0.811134 0.0708262 0.580556
+0.363741 0.0999939 0.357258 0.934096 0.357021 0
+0.382848 0.0229223 0.353817 0.997454 0.071306 0
+0.5 -0.272555 -0.11712 1 0 0
+0.141026 0.354861 0.297594 1 0 0
+0.141109 -0.358237 0.075703 1 0 0
+0.178905 0.294872 0.112631 0 1 0
+-0.192679 0.371795 0.0811465 0 1 0
+0.43344 0.212805 0.320513 0 0 1
+-0.444354 -0.371795 -0.159488 0.293424 0.953171 0.0732565
+-0.5 0.0800314 -0.237787 1 0 0
+0.278949 -0.0405149 0.371795 0 0 1
+0.0780025 0.371795 -0.200793 0 1 0
+-0.112029 -0.294872 -0.328513 0 1 0
+-0.5 0.292434 -0.0626567 1 0 0
+-0.448718 -0.315728 -0.190751 1 0 0
+0.0802467 0.189516 0.371795 0.143884 0.719036 -0.679915
+-0.127853 -0.160578 -0.333333 0 0 1
+-0.5 0.101463 -0.257464 1 0 0
+0.5 0.128359 -0.282307 1 0 0
+0.291199 0.294872 0.121398 0 1 0
+0.5 -0.126549 0.131554 1 0 0
+-0.5 0.161443 -0.162637 1 0 0
+-0.423276 -0.208074 0.320513 0 0 1
+-0.151134 -0.371795 -0.0957662 -0.0179997 0.999825 0.0051165
+0.243902 -0.371795 -0.263333 0 1 0
+-0.141154 -0.29723 -0.211277 -0.571504 0.819251 -0.0470323
+0.210617 0.294872 -0.0675545 0 1 0
+0.5 0.0111159 -0.269669 1 0 0
+-0.402127 0.371795 -0.251823 0 1 0
+-0.445411 0.12071 -0.371795 0 0 1
+-0.5 0.236898 0.0152691 1 0 0
+-0.191728 0.0190255 -0.117057 0.892016 0.451521 -0.0208555
+-0.394325 -0.316819 0.320513 0 0 1
+-0.5 -0.266252 0.165982 1 0 0
+0.173982 -0.23103 0.371795 0 0 1
+-0.5 -0.263261 -0.335384 1 0 0
+-0.269472 -0.0709835 0.371795 0 0 1
+-0.448718 -0.312943 -0.313985 1 0 0
+-0.297262 -0.371795 -0.0858988 0 1 0
+-0.5 0.249516 0.102855 1 0 0
+0.174297 0.107212 0.345632 0.838213 0.545343 0
+-0.193299 -0.371795 0.0317392 0 1 0
+-0.235399 -0.292632 0.320513 0 0 1
+0.34061 -0.371795 0.00268681 0 1 0
+-0.234954 -0.0561657 0.371795 0 0 1
+-0.246237 0.312648 -0.371795 0 0 1
+-0.00598297 0.371795 -0.359493 0 1 0
+-0.5 0.353638 0.0881588 1 0 0
+-0.316773 -0.220354 -0.371795 0 0 1
+0.320513 0.0158399 -0.343747 1 0 0
+0.5 0.106604 -0.233689 1 0 0
+0.161927 -0.334706 -0.371795 0 0 1
+0.274952 0.138221 -0.333333 0 0 1
+0.313391 -0.176328 0.36877 -0.351993 0.816871 -0.456972
+-0.5 -0.0980643 0.14735 1 0 0
+0.448718 -0.303433 -0.311282 0.992571 -0.114582 -0.0409149
+-0.317469 0.301258 -0.371795 0 0 1
+0.11931 -0.294872 0.0325815 0 1 0
+-0.5 -0.0119638 -0.0147317 1 0 0
+0.26872 0.294872 0.297304 0 1 0
+-0.193991 -0.023183 -0.0492065 0.837246 -0.546821 0.00224418
+0.5 -0.246282 0.221966 1 0 0
+0.5 -0.280806 0.276542 1 0 0
+-0.261481 0.238778 -0.371795 -0.0056409 0.0339933 0.999406
+0.0420216 -0.199412 0.320513 -0.197992 0.855994 0.47757
+-0.5 0.368447 -0.313557 -0.580142 0.810421 0.0815619
+-0.199685 -0.371795 -0.289407 0 1 0
+-0.368191 0.371795 0.10384 0 1 0
+-0.5 -0.292256 -0.149458 0.827815 0.560361 -0.0267739
+0.323841 -0.371795 -0.113796 0 1 0
+-0.5 -0.259043 -0.217242 1 0 0
+0.250934 0.0235093 0.371795 0 0 1
+0.0317033 0.198693 -0.333333 0 0 1
+0.225239 0.294872 -0.195475 0 1 0
+0.180425 0.15961 -0.333333 0 0 1
+0.5 0.149739 -0.020598 1 0 0
+-0.462384 -0.271227 -0.371795 0 0 1
+0.427857 0.0656113 0.320513 0 0 1
+-0.322084 -0.371795 0.257236 0 1 0
+0.141026 0.339535 0.0592982 1 0 0
+0.206297 0.294872 -0.160635 0 1 0
+-0.147714 0.371795 -0.070753 0 1 0
+0.5 0.244038 0.227388 1 0 0
+0.21184 0.0908083 0.371795 0 0 1
+-0.447258 -0.371795 -0.316316 0.254895 0.959957 0.11624
+-0.5 -0.130362 -0.0168104 1 0 0
+-0.114948 0.127397 0.320513 0 0 1
+-0.142373 -0.147366 0.321417 0.472027 0.721281 0.506896
+0.314965 0.182234 -0.351821 0.928488 0.371066 0.0148581
+-0.267247 0.023612 -0.187855 0.876545 -0.481103 -0.0144463
+0.299453 0.190266 0.361528 0.69342 0.720528 -0.00284302
+0.227226 0.294872 -0.109763 0 1 0
+-0.22914 -0.371795 0.264532 0 1 0
+-0.448718 -0.297317 0.208638 0.88777 0.459956 0.0174736
+-0.435963 -0.251304 0.320513 0 0 1
+-0.240173 0.371795 -0.100102 0 1 0
+-0.351871 -0.230543 0.320513 0 0 1
+-0.5 -0.0501665 -0.100406 1 0 0
+-0.5 0.365736 0.0638173 0.901376 -0.43078 -0.0441558
+-0.5 0.0166053 -0.233604 1 0 0
+-0.260969 0.031211 -0.246852 -0.697951 0.716143 -0.00191189
+-0.0309902 -0.148341 -0.333333 0 0 1
+0.5 0.223902 0.0179644 1 0 0
+-0.5 -0.268347 0.0354759 1 0 0
+-0.295616 -0.371795 -0.239012 0 1 0
+0.125978 -0.256282 0.333699 -0.0156774 0.999877 0.000798838
+-0.5 -0.103202 0.265904 1 0 0
+0.180352 -0.0405248 -0.333333 0 0 1
+0.141109 -0.334828 0.272381 1 0 0
+0.215027 0.294872 0.0389427 0 1 0
+0.361486 -0.10604 0.345219 0.92068 -0.390319 0
+0.243034 0.151111 -0.333333 0 0 1
+0.5 -0.21731 0.179404 1 0 0
+-0.454867 0.371795 -0.0323886 0 1 0
+0.246687 0.294872 -0.114657 0 1 0
+0.391752 -0.371795 -0.0459417 0 1 0
+0.178671 -0.336859 0.320513 0 0 1
+-0.0377745 0.0509747 -0.333333 0 0 1
+-0.417473 -0.0965332 0.320513 0 0 1
+-0.0509252 -0.294872 -0.340667 0 1 0
+0.234058 -0.371795 -0.327528 0 1 0
+0.383629 0.0119943 0.343928 0.99745 0.0713654 -5.45952e-006
+-0.270522 0.0174998 -0.21724 0.906833 -0.421459 -0.00505301
+0.350914 -0.371795 -0.200593 0 1 0
+-0.0829424 -0.294872 -0.271426 0 1 0
+0.5 0.255403 0.020198 1 0 0
+0.0459918 -0.294872 0.0526935 0 1 0
+0.447615 -0.0388919 -0.371795 0 0 1
+0.250958 0.0928981 0.371795 0 0 1
+-0.242755 -0.371795 0.00302444 0 1 0
+-0.400603 0.371795 0.287404 0 1 0
+-0.364263 -0.0985919 0.359332 0.936942 0.349485 0
+0.0481405 -0.0494424 0.320513 0 0 1
+-0.264506 -0.371795 0.271132 0 1 0
+-0.17836 -0.371795 0.00813092 0 1 0
+-0.358408 0.111809 0.367527 0.883694 -0.451802 -0.122314
+0.141026 0.354156 -0.286749 1 0 0
+-0.374064 -0.371795 -0.200825 0 1 0
+0.377116 0.0583664 0.365152 0.985992 0.151534 0.0696869
+-0.307802 0.289868 -0.371795 0 0 1
+0.27963 -0.046244 0.371795 0 0 1
+-0.306497 0.0395255 0.371795 0 0 1
+0.156724 -0.077099 0.320513 0 0 1
+-0.5 -0.0559982 -0.339195 1 0 0
+0.249353 0.294872 0.195568 0 1 0
+-0.5 0.143763 0.166056 1 0 0
+-0.233465 0.371795 -0.367602 -0.0115404 0.915618 -0.401883
+0.5 8.06199e-005 -0.162039 1 0 0
+0.379708 -0.0464515 0.365727 0.947623 -0.179382 0.26426
+-0.0410328 0.012561 -0.333333 0 0 1
+0.212123 0.294872 -0.266841 0 1 0
+0.262045 -0.0221337 -0.0292828 0.822277 -0.569003 -0.00981263
+-0.111701 -0.00514246 -0.333333 0 0 1
+-0.141154 -0.326166 -0.245525 1 0 0
+-0.0226027 -0.294872 0.217958 0 1 0
+0.107353 0.00843555 0.320513 0 0 1
+-0.5 -0.13822 -0.265614 1 0 0
+-0.377984 -0.0730409 -0.371795 0 0 1
+0.448718 -0.333649 -0.221711 1 0 0
+0.335198 -0.371795 0.118156 0 1 0
+0.448718 -0.342452 -0.223294 1 0 0
+0.444045 0.219465 0.320513 0 0 1
+0.448718 -0.326861 -0.364181 0.998281 0.0116987 -0.057421
+-0.141154 -0.333292 0.0697152 1 0 0
+-0.0203466 -0.294872 -0.317944 0 1 0
+0.5 -0.099045 -0.248703 1 0 0
+0.5 -0.199913 -0.337576 1 0 0
+-0.5 0.345242 0.157393 1 0 0
+0.219668 0.0366919 -0.0319583 -0.32087 0.946555 0.0328012
+0.101125 0.165698 0.320513 0 0 1
+0.186832 -0.371795 -0.108381 0 1 0
+-0.0683405 0.371795 -0.115523 0 1 0
+-0.381535 -0.0380539 0.341392 0.990074 0.140544 0
+-0.219801 -0.371795 -0.268094 0 1 0
+-0.437121 0.0616103 0.320513 0 0 1
+-0.5 -0.147329 -0.299779 1 0 0
+-0.5 0.354398 0.306071 1 0 0
+-0.2152 -0.0406527 -0.268562 -0.37993 0.925011 0.0027589
+0.448718 -0.327395 -0.201957 1 0 0
+0.483518 -0.271812 0.320513 0 0 1
+-0.0320197 -0.172358 -0.333333 0 0 1
+0.237764 0.294872 -0.251823 0 1 0
+0.5 -0.129433 0.137069 1 0 0
+-0.0909374 -0.0821827 0.320513 0 0 1
+0.493843 -0.261427 -0.371795 -0.257137 -0.0845871 0.962666
+0.141026 0.367587 -0.0876899 0.959661 0.280986 0.00985966
+0.461099 -0.0422105 -0.371795 0 0 1
+-0.49332 0.371795 0.293186 -0.239339 0.970936 0
+0.095552 -0.104723 0.320513 0 0 1
+-0.352873 0.209734 -0.371795 0 0 1
+0.5 -0.0347921 0.0957437 1 0 0
+-0.5 0.330424 0.0950316 1 0 0
+-0.219445 0.371795 0.221321 0 1 0
+0.223529 -0.0110394 0.015151 -0.280263 -0.425967 0.860235
+-0.15682 -0.371795 0.0296041 0 1 0
+-0.204323 0.0121942 -0.0266301 0.46958 0.211652 0.857145
+0.5 0.183512 -0.169011 1 0 0
+-0.195425 -0.0252297 -0.122631 0.803454 -0.595248 0.0118756
+-0.278832 0.0426114 -0.333333 0 0 1
+-0.439654 0.0716024 0.320513 0 0 1
+0.14578 -0.221629 0.371795 0 0 1
+-0.110626 0.197651 -0.333333 0 0 1
+0.231292 -0.160296 0.371795 0 0 1
+-0.33359 0.1522 0.327219 0.785565 -0.588152 -0.192261
+-0.204562 -0.371795 -0.197189 0 1 0
+-0.387762 0.283297 0.320513 0 0 1
+0.5 0.277549 -0.365219 0.94635 0.0337059 -0.321381
+0.286383 -0.34013 0.320513 0 0 1
+0.5 0.049646 0.0579421 1 0 0
+0.0685213 -0.156473 -0.333333 0 0 1
+-0.122771 0.371795 -0.0993708 0 1 0
+-0.5 0.174135 0.0957015 1 0 0
+0.5 0.281039 0.260944 1 0 0
+0.405458 0.0389443 -0.371795 0 0 1
+-0.448606 -0.00983033 0.320513 0 0 1
+-0.210037 0.0382456 -0.251409 0.489488 0.871998 -0.00453692
+-0.237352 0.371795 -0.162976 0 1 0
+-0.0840267 0.371795 -0.112245 0 1 0
+0.177281 0.0709625 0.320513 0 0 1
+-0.0350941 0.371795 -0.0821737 0 1 0
+0.0619085 0.0146269 0.320513 0 0 1
+-0.199919 -0.0438069 0.333179 0.970123 0.242612 0
+0.220889 -0.293007 0.320513 0 0 1
+-0.470845 -0.276782 -0.371795 0 0 1
+0.223988 0.294872 0.0698512 0 1 0
+0.0668081 0.371795 -0.367774 -0.023774 0.870926 -0.490839
+-0.127393 0.242486 0.371795 0 0 1
+0.125099 -0.138036 0.320513 0 0 1
+-0.342362 -0.371795 -0.365185 0.0014119 0.999592 0.0285192
+-0.266318 -0.371795 0.26651 0 1 0
+0.281877 0.294872 -0.251589 0 1 0
+-0.296911 -0.371795 -0.113309 0 1 0
+-0.164093 -0.149982 -0.333333 0 0 1
+-0.465604 0.371795 0.0369687 0 1 0
+-0.5 0.349392 -0.044185 1 0 0
+0.096457 0.371795 -0.115041 0 1 0
+-0.413614 -0.015709 0.320513 0 0 1
+-0.167807 0.117146 0.324907 0.78763 -0.322388 0.525077
+-0.419454 0.371795 0.250388 0 1 0
+-0.347092 0.203032 0.320513 0 0 1
+-0.00110342 -0.294872 -0.167577 0 1 0
+-0.461062 0.371795 -0.308796 0 1 0
+-0.5 0.123442 -0.15959 1 0 0
+-0.475078 -0.235552 -0.371795 0 0 1
+0.302365 -0.371795 -0.116519 0 1 0
+-0.425761 -0.371795 -0.0398543 0 1 0
+-0.0381645 0.251461 0.371795 -0.00263646 0.247048 0.969
+0.164191 -0.371795 -0.0813087 0 1 0
+0.448718 -0.333801 0.0818875 1 0 0
+-0.421117 -0.371795 -0.227932 0 1 0
+-0.171742 -0.172951 -0.333333 0 0 1
+-0.0330765 0.010475 0.320513 0 0 1
+0.22938 0.266854 0.320513 0 0 1
+0.5 -0.162477 0.290176 1 0 0
+-0.5 0.306922 -0.302512 1 0 0
+0.5 -0.0467167 0.16416 1 0 0
+0.183475 0.294872 -0.0380309 0 1 0
+-0.121736 0.164462 0.360398 -0.617855 0.780434 -0.095795
+-0.476978 0.371795 -0.0945461 0 1 0
+-0.348817 0.129375 0.344133 0.876972 -0.480541 0
+-0.249982 -0.0995853 -0.333333 0 0 1
+-0.0420223 -0.294872 0.113727 0 1 0
+0.0523909 -0.283955 0.320513 0 0 1
+0.5 0.00802435 -0.0773682 1 0 0
+-0.448082 -0.0545242 -0.371795 0 0 1
+0.081812 -0.292947 0.320513 0.0882104 -0.665667 0.741017
+-0.164676 -0.121939 0.359783 0.835124 0.550056 -0.00265682
+0.432749 0.294872 -0.0852249 0 1 0
+-0.126407 -0.157491 0.320513 0.144303 0.304551 0.941501
+0.5 0.293777 0.12125 0.852159 0.470677 0.228667
+0.5 0.116405 -0.0269042 1 0 0
+0.5 -0.217344 -0.126523 1 0 0
+-0.5 -0.184491 0.227183 1 0 0
+-0.03778 -0.0581211 0.320513 0 0 1
+0.5 0.199232 0.318066 0.808709 0.211394 0.54891
+0.0814592 -0.157733 0.320513 0 0 1
+0.141109 -0.308998 -0.0472388 1 0 0
+-0.307038 -0.371795 -0.35397 0 1 0
+0.121562 0.371795 -0.315244 0 1 0
+0.487013 -0.294872 0.0800768 0 1 0
+-0.364172 -0.071421 0.371795 -0.0159211 -0.0043745 0.999864
+0.0130338 0.0677923 0.320513 0 0 1
+-0.113585 -0.207098 0.371795 0 0 1
+0.00783433 0.222197 0.371795 0 0 1
+-0.0303372 -0.202321 0.355451 0.164559 0.986367 0
+0.0600515 -0.294872 -0.063078 0 1 0
+-0.5 0.0771222 0.262988 1 0 0
+-0.213093 0.371795 0.0127122 0 1 0
+-0.351731 -0.371795 0.25255 0 1 0
+-0.5 0.250949 -0.206278 1 0 0
+-0.233607 -0.371795 -0.361855 -0.00199275 0.997637 0.0686768
+0.5 0.184426 0.0366 1 0 0
+0.187017 0.294872 -0.177415 0 1 0
+0.0745701 0.295782 -0.371795 0 0 1
+0.219933 0.0367631 -0.0711505 -0.271453 0.962427 0.00688973
+-0.47282 0.0361612 0.320513 0 0 1
+-0.346998 0.371795 0.047594 0 1 0
+0.238257 0.0376605 -0.0903346 0.23312 0.97224 0.0200888
+0.188075 -0.371795 -0.0241329 0 1 0
+0.160246 -0.371795 -0.0311422 0 1 0
+-0.100534 -0.294872 -0.328487 0 1 0
+-0.316398 -0.173321 0.352942 0.722954 0.69089 0.00286779
+0.0610384 -0.230897 -0.348382 0 1 0
+-0.460877 0.0406798 0.320513 0 0 1
+-0.272437 -0.310347 -0.371795 0 0 1
+0.130528 0.279685 0.320513 0 0 1
+-0.371952 0.261731 -0.371795 0 0 1
+0.115544 0.354336 0.320513 0 0 1
+-0.0969352 0.083154 0.320513 0 0 1
+-0.223215 -0.320978 -0.371795 0 0 1
+-0.339003 -0.144969 0.345659 0.80459 0.59383 0
+0.31346 -0.366921 0.320513 0.0627422 0.784914 -0.61642
+0.110915 -0.172565 0.337175 -0.537331 0.843324 0.00899225
+-0.208616 -0.0374994 -0.295149 -0.530269 0.847734 0.0127195
+-0.366916 -0.0914805 0.354434 0.936934 0.349505 0
+0.244731 -0.371795 -0.290526 0 1 0
+0.302815 -0.371795 -0.103147 0 1 0
+-0.151323 0.177874 -0.333333 0 0 1
+0.5 0.174179 -0.169964 1 0 0
+0.372836 -0.371795 0.0175559 0 1 0
+0.281844 0.294872 0.17245 0 1 0
+0.141109 -0.359752 0.0985495 1 0 0
+-0.481827 0.306648 -0.371795 0 0 1
+-0.134613 0.371795 -0.21546 0 1 0
+0.320513 0.0702048 -0.338296 0.918742 0.0128156 0.394651
+0.0921812 -0.280169 -0.371795 0 0 1
+0.347183 0.132368 0.339602 0.876602 0.481216 0
+-0.127861 -0.294872 0.0375301 0 1 0
+0.141109 -0.297171 -0.268926 0.76471 0.628523 -0.142048
+-0.246754 -0.33624 0.320513 0 0 1
+-0.104861 0.371795 0.0129476 0 1 0
+0.232659 -0.371795 -0.300591 0 1 0
+-0.198853 0.371795 0.0821198 0 1 0
+0.267057 -0.0126082 -0.142461 0.921547 -0.388241 0.00459496
+0.5 0.0605948 -0.0449241 1 0 0
+-0.196138 -0.371795 0.107671 0 1 0
+0.0933394 -0.103657 -0.333333 0 0 1
+-0.5 -0.0560295 0.094243 1 0 0
+0.236217 0.0379849 -0.140472 0.121413 0.992516 0.0130451
+-0.5 0.169665 -0.104149 1 0 0
+-0.5 -0.167269 -0.0743516 1 0 0
+0.0437769 -0.234187 -0.371795 -0.115423 -0.429369 0.895723
+-0.17162 0.371795 -0.300797 0 1 0
+-0.5 -0.246146 -0.0730197 1 0 0
+0.0721898 -0.197911 -0.333333 0 0 1
+0.141109 -0.3223 0.13403 1 0 0
+0.5 -0.117788 -0.0830546 1 0 0
+-0.5 0.0176915 0.130443 1 0 0
+-0.215595 0.040837 -0.151931 0.330013 0.943846 -0.0156768
+-0.392186 0.056093 -0.371795 0 0 1
+0.38927 -0.371795 0.0664901 0 1 0
+0.150068 0.294872 0.299934 0.0778317 0.996962 -0.00307844
+-0.5 0.27631 0.0272557 1 0 0
+0.5 -0.134169 -0.131746 1 0 0
+-0.384141 -0.371795 -0.131045 0 1 0
+-0.5 0.251402 -0.359816 1 0 0
+0.0790762 -0.294872 -0.196692 0 1 0
+-0.256541 0.371795 0.0148897 0 1 0
+-0.273323 0.210686 0.360403 -0.607005 0.79352 0.0432625
+-0.5 0.148325 0.0798647 1 0 0
+0.5 -0.0237758 -0.0744977 1 0 0
+-0.5 0.0977824 0.0532013 1 0 0
+0.5 -0.0747978 0.280409 1 0 0
+0.5 0.115855 0.13696 1 0 0
+-0.0325224 0.371795 0.223062 0 1 0
+-0.163411 0.253764 0.369294 -0.213705 0.767337 0.604586
+0.397478 -0.371795 0.286278 0 1 0
+-0.317601 -0.173839 -0.366395 0.936423 0.163487 -0.310458
+-0.22134 -0.371795 -0.165032 0 1 0
+-0.0652512 0.371795 0.228629 0 1 0
+0.285943 0.294872 0.312812 -0.0371785 0.960587 0.275482
+-0.5 0.235199 -0.0416743 1 0 0
+0.178688 -0.371795 -0.29071 0 1 0
+-0.0196211 0.371795 -0.229597 0 1 0
+-0.5 0.0941308 0.0511248 1 0 0
+-0.186093 -0.0849814 0.338067 0.915776 0.401689 0
+0.230741 0.0384591 -0.0672347 -0.0893632 0.995959 0.00896697
+-0.448718 -0.314046 -0.249612 1 0 0
+-0.398855 0.100119 -0.371795 0 0 1
+-0.0991396 -0.178937 0.353489 0.475933 0.879482 0
+-0.390644 -0.371795 -0.235287 0 1 0
+-0.114238 0.00536631 0.320513 0 0 1
+0.268563 0.294872 -0.0858676 0 1 0
+-0.201393 -0.0784822 0.371795 0 0 1
+0.14729 -0.27275 -0.371795 0 0 1
+0.5 0.200982 0.120608 1 0 0
+0.0638633 0.133974 0.320513 0 0 1
+0.0811011 -0.294872 0.0733809 0 1 0
+0.180961 0.294872 -0.134481 0 1 0
+0.45937 0.0353548 0.320513 0 0 1
+-0.185168 -0.235968 0.371795 0 0 1
+0.189808 -0.371795 -0.205955 0 1 0
+-0.347684 0.371795 -0.0175494 0 1 0
+-0.297051 0.0868835 0.371795 0 0 1
+-0.396721 0.333805 0.320513 0 0 1
+0.00736676 0.371795 -0.322138 0 1 0
+-0.236935 -0.313302 -0.371795 0 0 1
+0.099235 0.371795 -0.127563 0 1 0
+-0.029239 -0.261033 -0.371795 0 0 1
+0.489135 0.264181 -0.371795 0 0 1
+-0.00348802 0.204555 0.346298 0 1 0
+-0.0414371 -0.294872 -0.324659 0 1 0
+0.460132 -0.17647 -0.371795 0 0 1
+0.0112433 0.316073 0.320513 0 0 1
+-0.194315 0.371795 -0.271354 0 1 0
+-0.493171 -0.294872 0.0597041 0.12856 0.991463 0.0217811
+0.259688 -0.0252662 -0.144225 0.755413 -0.655249 0
+0.417899 -0.371795 0.200449 0 1 0
+-0.5 0.199625 -0.217115 1 0 0
+0.263504 -0.0200511 -0.294103 0.851989 -0.523193 0.0195841
+-0.254797 0.0709746 0.371795 0 0 1
+0.15906 0.294872 0.0339967 0 1 0
+0.19753 0.215464 -0.333333 0 0 1
+-0.00560374 0.276565 0.320513 0 0 1
+0.5 0.0469548 0.110376 1 0 0
+0.0632735 0.258744 -0.371795 0 0 1
+-0.189381 0.0133162 -0.121124 0.954822 0.297178 0
+0.311443 0.294872 0.140383 0 1 0
+0.0888504 0.371795 -0.192272 0 1 0
+0.5 -0.230533 0.123777 1 0 0
+0.00355902 0.310012 0.320513 0 0 1
+0.448718 -0.338284 0.290784 1 0 0
+-0.245348 0.371795 -0.0893343 0 1 0
+0.5 0.292209 0.181982 0.902998 0.416716 0.104605
+-0.204758 0.00601648 0.327459 0.993103 -0.096568 0.0664944
+-0.5 -0.227052 0.226489 1 0 0
+-0.0827733 -0.230897 -0.345879 0 1 0
+0.0326732 -0.294872 -0.080759 0 1 0
+0.393855 0.165934 0.320513 0 0 1
+0.319296 0.0423305 -0.333333 0.692646 -0.00363654 0.721269
+0.0139522 0.204555 0.336831 0.048553 0.998811 -0.0043857
+-0.0708093 -0.257192 -0.371795 0 0 1
+0.292039 -0.371795 -0.197975 0 1 0
+0.5 -0.0525153 -0.333371 1 0 0
+0.0506664 -0.294872 0.143949 0 1 0
+0.141109 -0.318868 0.038806 1 0 0
+0.5 -0.151598 0.0133166 1 0 0
+-0.176385 0.228788 0.371795 0 0 1
+-0.25792 -0.371795 0.204075 0 1 0
+0.182643 0.294872 -0.36449 0.0189298 0.998666 -0.0480314
+-0.321903 0.371795 0.190518 0 1 0
+0.0892962 -0.294872 -0.242972 0 1 0
+0.411124 -0.319623 0.320513 0 0 1
+0.317391 -0.0621173 -0.333333 0.34467 -0.132348 0.929348
+0.170525 0.0928832 -0.333333 0 0 1
+-0.482148 0.361886 -0.371795 0 0 1
+0.141109 -0.349461 0.0306131 1 0 0
+0.5 0.250154 -0.243693 1 0 0
+0.0497987 -0.148335 -0.333333 0 0 1
+-0.5 -0.088368 -0.17331 1 0 0
+-0.44727 -0.371795 0.281775 0.91369 0.405037 0.0334125
+0.144265 0.294872 -0.30889 0.613561 0.789091 -0.0296443
+-0.269756 0.181577 0.371795 0 0 1
+0.4073 0.294872 0.0806686 0 1 0
+-0.0468751 0.158253 -0.333333 0 0 1
+0.26535 -0.0394355 0.371795 0 0 1
+-0.237013 -0.0430435 -0.325138 0.125051 0.978667 -0.163014
+0.444628 0.16586 -0.371795 0 0 1
+0.365819 -0.0644194 0.371795 0.0972654 -0.0359981 0.994607
+-0.170052 -0.371795 -0.00201134 0 1 0
+-0.442302 -0.371795 0.157436 0.29065 0.944288 0.15441
+0.141026 0.313582 0.120864 1 0 0
+0.292534 0.216599 0.320513 0 0 1
+-0.5 0.0974427 0.146712 1 0 0
+-0.250245 0.24782 0.320513 0 0 1
+0.5 0.159608 -0.217747 1 0 0
+-0.46664 -0.036262 -0.371795 0 0 1
+-0.424289 0.371795 -0.279774 0 1 0
+0.5 0.262123 0.295995 1 0 0
+-0.5 0.186744 -0.3109 1 0 0
+0.409942 0.294872 0.0262279 0 1 0
+-0.154584 -0.0509231 0.320513 0 0 1
+-0.5 -0.120106 -0.255504 1 0 0
+-0.157222 0.371795 -0.0476601 0 1 0
+0.0401865 0.367443 -0.371795 -0.0616897 -0.219161 0.973737
+0.5 -0.177961 -0.101236 1 0 0
+-0.186078 -0.139986 0.371795 0 0 1
+0.20336 -0.347037 -0.371795 0 0 1
+-0.141154 -0.348262 0.30048 1 0 0
+0.141109 -0.347131 0.0423218 1 0 0
+-0.320513 0.047408 -0.364092 0.981556 0.0339498 -0.188138
+-0.285499 0.371795 0.0467777 0 1 0
+0.448718 -0.349244 0.265834 1 0 0
+-0.0667602 -0.147202 0.320513 0 0 1
+-0.174565 0.365252 -0.371795 0.013547 -0.028763 0.999494
+0.0292187 0.138879 -0.333333 0 0 1
+0.465282 0.294872 -0.159904 0 1 0
+-0.113079 -0.058057 -0.333333 0 0 1
+-0.172363 0.137002 0.371795 0 0 1
+-0.5 0.00926366 0.297649 1 0 0
+-0.26112 0.26203 -0.371795 0 0 1
+-0.306034 0.34986 -0.371795 0 0 1
+0.401808 -0.371795 -0.281217 0 1 0
+0.271214 -0.314757 0.320513 0 0 1
+0.461606 0.294872 -0.264951 0 1 0
+-0.320513 0.108166 -0.367174 -0.696772 0.0541857 0.715243
+0.5 0.108114 0.0816302 1 0 0
+0.317498 0.294872 -0.247705 0 1 0
+0.319091 -0.371795 0.281447 0 1 0
+-0.249068 -0.371795 -0.361343 0 1 0
+-0.0576263 0.371795 0.123708 0 1 0
+0.5 -0.0389339 0.15357 1 0 0
+-0.173998 0.371795 0.0689074 0 1 0
+-0.164069 -0.119203 0.320513 0.50577 0.478551 0.717765
+-0.454679 -0.188655 0.320513 0 0 1
+0.365088 -0.371795 -0.0838359 0 1 0
+-0.5 -0.171662 -0.33189 1 0 0
+-0.20173 0.0187092 -0.0298849 0.43209 0.264335 0.862221
+-0.0561118 0.371795 -0.196886 0 1 0
+0.448718 -0.340793 -0.33026 1 0 0
+0.5 0.122007 0.203349 1 0 0
+0.5 0.156352 -0.315818 1 0 0
+0.00648951 0.371795 0.0603662 0 1 0
+-0.334084 0.15154 0.365955 0.755353 -0.592038 -0.280951
+-0.5 0.183454 0.0560236 1 0 0
+0.244205 -0.325908 -0.371795 0 0 1
+-0.416983 0.371795 0.241235 0 1 0
+-0.5 -0.241765 -0.0849163 1 0 0
+0.5 0.253724 0.185304 1 0 0
+0.166794 -0.253213 0.361387 -0.169857 0.98546 0.00411277
+0.5 -0.148007 -0.148638 1 0 0
+0.121405 -0.294872 -0.352975 0 1 0
+0.463689 -0.294872 0.141129 0 1 0
+-0.5 0.320161 -0.286117 1 0 0
+0.258588 -0.0263672 -0.17305 0.753399 -0.655325 -0.0542197
+0.378825 0.0114714 0.371795 0.366014 0.112494 0.923785
+-0.0449106 0.255784 -0.371795 0 0 1
+-0.108602 -0.230897 -0.363403 0.000932409 0.999809 -0.019514
+-0.145076 0.371795 0.0761136 0 1 0
+-0.455573 0.132995 -0.371795 0 0 1
+-0.46771 0.371795 0.174275 0 1 0
+0.181591 0.249994 0.344132 0.212534 0.977154 0
+0.0266822 0.371795 -0.127559 0 1 0
+0.295991 0.294872 0.0714933 0 1 0
+0.289217 0.294872 0.137288 0 1 0
+0.387875 -0.371795 -0.316447 0 1 0
+0.195558 0.01515 -0.195857 0.941636 -0.336624 -0.00258001
+0.279887 -0.221601 -0.350192 -0.480615 0.87691 -0.00619568
+0.5 -0.0670763 0.235745 1 0 0
+0.305142 0.224171 -0.371795 0 0 1
+-0.122055 0.256282 0.370998 0.0974546 0.709618 0.697815
+-0.141154 -0.295116 0.133259 0.876998 -0.447999 0.173698
+-0.437925 -0.371795 0.0517556 0.0726924 0.99694 0.0287557
+-0.0822064 0.333039 0.320513 0 0 1
+0.473506 0.20852 -0.371795 0 0 1
+-0.433811 -0.27585 0.320513 0 0 1
+0.5 -0.201133 -0.0628355 1 0 0
+-0.141154 -0.325407 -0.110247 1 0 0
+0.310063 -0.219483 0.320513 0 0 1
+-0.180739 -0.273359 0.320513 0 0 1
+-0.120993 0.371795 -0.1321 0 1 0
+-0.5 -0.0390182 0.132816 1 0 0
+-0.422595 0.371795 0.234149 0 1 0
+0.5 -0.153999 -0.209404 1 0 0
+-0.323118 0.151554 0.371795 -0.131401 0.0713356 0.988759
+-0.310425 -0.371795 0.20722 0 1 0
+-0.476941 0.371795 -0.0769839 0 1 0
+-0.261078 0.371795 0.133809 0 1 0
+0.474159 0.26971 -0.371795 0 0 1
+0.21351 0.294872 -0.264308 0 1 0
+-0.418034 0.265346 0.320513 0 0 1
+0.209857 0.0902468 -0.333333 0 0 1
+0.5 0.00456867 -0.124208 1 0 0
+-0.141154 -0.353862 -0.229515 1 0 0
+-0.418536 -0.0746829 -0.371795 0 0 1
+0.109739 0.292306 0.320513 0 0 1
+-0.465924 0.340126 0.320513 0 0 1
+0.5 -0.00241343 0.258011 1 0 0
+-0.5 0.353031 0.120344 1 0 0
+0.471682 -0.294872 -0.333962 0 1 0
+-0.271593 -0.371795 0.018752 0 1 0
+0.5 0.255695 0.097856 1 0 0
+0.233136 0.294872 -0.193548 0 1 0
+-0.321383 0.120536 0.371795 0 0 1
+0.345052 -0.371795 0.0923918 0 1 0
+-0.191477 -0.371795 0.0788084 0 1 0
+-0.206465 -0.0359934 -0.298901 -0.570844 0.820785 0.0212035
+-0.0839111 0.256282 0.354299 0 1 0
+-0.48055 0.0875863 0.320513 0 0 1
+0.141026 0.368782 0.125441 0.842828 0.53817 -0.00373742
+0.371781 0.294872 -0.317474 0 1 0
+-0.360291 -0.371795 -0.223107 0 1 0
+0.0384704 0.349786 -0.371795 0 0 1
+-0.271668 -0.0150418 -0.0635242 0.939481 0.342602 0
+0.234734 0.0609006 0.371795 0 0 1
+-0.0384362 -0.294872 -0.230113 0 1 0
+-0.494228 0.348788 0.320513 -0.371093 0.143638 0.917419
+-0.239978 -0.129248 0.371795 0 0 1
+-0.29329 -0.195739 0.340404 0.64881 0.760935 -0.00492998
+0.268073 0.0169388 -0.333333 0.500738 0.0861561 0.8613
+0.274164 -0.210057 0.349712 -0.596076 0.802928 0
+0.5 -0.150623 0.303746 1 0 0
+-0.26402 0.187739 -0.333333 0 0 1
+0.215979 -0.240203 -0.371795 0 0 1
+-0.195514 0.371795 0.244252 0 1 0
+0.11602 -0.294872 0.265711 0 1 0
+0.0916967 0.182964 0.359921 0.47593 0.879483 0
+0.142152 -0.371795 0.203382 0.804929 0.590541 -0.0578833
+-0.162991 -0.00101947 0.320513 0 0 1
+0.0148191 0.057826 -0.333333 0 0 1
+0.0473483 -0.294872 0.0330139 0 1 0
+-0.257568 0.371795 -0.328495 0 1 0
+-0.227949 0.192693 -0.333333 0 0 1
+0.221039 0.237751 -0.371795 -0.014068 0.197819 0.980138
+-0.0623873 0.130578 0.320513 0 0 1
+0.12134 -0.256282 0.356387 -0.00629825 0.999978 -0.00196142
+-0.374712 0.048919 -0.371795 0 0 1
+-0.471697 0.0940293 0.320513 0 0 1
+-0.5 0.131922 -0.0767783 1 0 0
+0.345217 0.294872 0.235676 0 1 0
+0.320509 -0.264434 0.320513 0 0 1
+0.5 -0.0569392 0.0189837 1 0 0
+0.206805 0.294872 -0.35143 0 1 0
+0.498095 0.294872 -0.124072 0.357171 0.933902 -0.0160099
+-0.382146 0.271848 0.320513 0 0 1
+0.5 -0.160964 -0.0491747 1 0 0
+0.5 -0.0558791 0.240208 1 0 0
+0.5 -0.0306908 -0.279202 1 0 0
+0.5 0.10474 0.0376539 1 0 0
+0.5 0.048554 -0.296081 1 0 0
+-0.404531 0.371795 -0.333368 0 1 0
+0.459282 -0.239918 0.320513 0 0 1
+-0.0711029 0.230897 -0.366149 -0.0235568 0.941957 0.334906
+0.0322554 -0.294872 0.112153 0 1 0
+0.162041 -0.253862 0.361139 -0.0774707 0.996994 -0.000928537
+-0.193002 -0.0217587 -0.150129 0.854676 -0.519112 -0.00721628
+-0.49951 -0.294872 0.301508 0.833728 0.552166 0.00322755
+-0.0580115 -0.0707045 0.320513 0 0 1
+-0.5 0.366143 0.0146891 0.955888 -0.293108 -0.0191365
+-0.0416022 -0.253247 -0.371795 0 0 1
+-0.190358 0.0160871 -0.214172 0.933092 0.359505 0.00973439
+0.131083 0.371795 -0.297971 0.052012 0.99825 0.0281448
+-0.148392 0.0996974 0.320513 0 0 1
+-0.5 0.357054 -0.135507 1 0 0
+-0.444558 -0.371795 -0.103127 0.23523 0.967313 -0.0947208
+-0.5 0.188982 -0.0610444 1 0 0
+0.19349 -0.164788 -0.333333 0 0 1
+0.5 0.0264702 -0.0812168 1 0 0
+-0.326635 0.371795 0.113661 0 1 0
+0.320513 0.00748218 -0.360107 0.999098 -0.0141041 0.0400453
+0.141026 0.340031 0.112342 1 0 0
+-0.5 -0.258161 -0.331794 1 0 0
+0.194072 0.294872 -0.0489805 0 1 0
+-0.37879 0.336494 -0.371795 0 0 1
+0.5 -0.153771 -0.362663 0.95297 0.136372 -0.270648
+-0.318746 -0.371795 0.06346 0 1 0
+0.162968 0.294872 -0.279895 0 1 0
+-0.495689 0.239757 0.320513 -0.385312 -0.120517 0.914882
+-0.261046 0.156006 0.371795 0 0 1
+-0.111651 -0.280238 0.320513 0 0 1
+0.5 0.0830859 -0.16549 1 0 0
+-0.31311 0.367974 -0.371795 -0.029821 -0.458286 0.888304
+-0.310466 0.00991921 0.371795 0 0 1
+-0.5 0.338753 0.154366 1 0 0
+0.5 0.00295079 -0.188909 1 0 0
+0.366589 0.126783 0.320513 0 0 1
+0.311133 -0.0708442 0.371795 0 0 1
+0.16884 -0.371795 -0.123747 0 1 0
+-0.35319 0.0583049 -0.371795 0 0 1
+-0.5 -0.233895 0.31137 0.985163 -0.0031095 -0.171593
+0.380076 0.283089 -0.371795 0 0 1
+0.273492 0.294872 -0.120699 0 1 0
+0.5 0.18359 0.0824043 1 0 0
+0.171138 0.257081 -0.371795 0 0 1
+0.0238954 -0.230897 -0.361865 0.0149959 0.996933 -0.0768086
+0.226709 0.189994 -0.333333 0 0 1
+0.198386 -0.139567 -0.333333 0 0 1
+0.258275 0.0266803 -0.152592 0.740003 0.671896 -0.0308475
+0.39397 -0.371795 0.0690952 0 1 0
+0.141026 0.314562 -0.17295 1 0 0
+-0.372369 -0.197139 -0.371795 0 0 1
+-0.221082 -0.371795 -0.304547 0 1 0
+-0.00972095 0.371795 -0.336271 0 1 0
+0.41675 -0.299444 -0.371795 0 0 1
+-0.172132 -0.215591 -0.333333 0 0 1
+0.198395 -0.0205646 -0.0601803 0.81999 0.57235 0.00561355
+0.184722 -0.207047 0.371795 0 0 1
+0.165954 -0.0967138 0.320513 0 0 1
+0.5 -0.202796 -0.163369 1 0 0
+-0.179208 0.371795 -0.187128 0 1 0
+-0.0812023 -0.294872 0.190781 0 1 0
+-0.0795828 0.0837803 -0.333333 0 0 1
+-0.5 0.32987 0.273255 1 0 0
+-0.369023 0.371795 0.153524 0 1 0
+-0.0645851 -0.294872 0.177151 0 1 0
+-0.448718 -0.359202 -0.231591 1 0 0
+-0.141154 -0.363375 -0.348221 0.990601 -0.136507 0.00869556
+-0.254802 0.371795 -0.179922 0 1 0
+0.195314 -0.371795 0.178937 0 1 0
+0.5 0.0848121 -0.306943 1 0 0
+-0.109643 -0.173253 0.325909 0.52673 0.779396 0.33926
+0.260925 0.294872 0.319478 0.156009 0.58404 0.796592
+-0.152166 -0.0159942 -0.333333 0 0 1
+-0.100553 -0.294872 0.0750064 0 1 0
+-0.226639 -0.00978389 0.371795 0 0 1
+0.280232 -0.371795 0.150041 0 1 0
+-0.429126 0.341277 0.320513 0 0 1
+-0.258053 0.316419 -0.371795 0 0 1
+0.312372 -0.055207 0.371795 0 0 1
+-0.0108593 0.256282 0.347564 0 1 0
+0.5 0.236946 -0.133465 1 0 0
+-0.456904 0.26272 0.320513 0 0 1
+-0.171993 0.371795 -0.168928 0 1 0
+-0.305208 0.184511 0.322613 -0.582652 0.667079 0.464243
+0.448718 -0.357104 0.313639 0.987493 -0.0181332 0.15662
+-0.5 -0.270726 -0.0481076 1 0 0
+-0.329212 0.371795 -0.264019 0 1 0
+0.187493 0.242933 0.371795 0.00177958 0.312345 0.949967
+0.173245 -0.178423 -0.333333 0 0 1
+0.349031 0.294872 0.157409 0 1 0
+0.208023 -0.0308473 -0.282147 0.556362 0.830934 -0.00329053
+-0.376982 0.371795 -0.198654 0 1 0
+0.239857 0.294872 -0.323566 0 1 0
+-0.25977 -0.0324099 -0.133761 0.665835 0.746091 0.00341873
+-0.394441 0.231584 -0.371795 0 0 1
+0.141026 0.369944 -0.0429865 0.835282 0.542455 -0.0897027
+0.295545 -0.0473251 0.371795 0 0 1
+0.5 0.027059 -0.228441 1 0 0
+0.0507262 0.164862 -0.333333 0 0 1
+0.111653 0.357994 0.320513 0 0 1
+0.141096 0.294872 0.232589 0.815036 0.549619 -0.1834
+-0.411382 -0.371795 -0.312022 0 1 0
+-0.309009 -0.0137405 -0.333333 -0.0451674 -0.00354447 0.998973
+0.5 -0.0447307 -0.15937 1 0 0
+0.348571 0.129825 0.352899 0.877679 0.479249 0
+0.257485 -0.371795 -0.239326 0 1 0
+0.5 0.13275 -0.109942 1 0 0
+0.5 -0.0658482 -0.281474 1 0 0
+0.43 0.200218 0.320513 0 0 1
+-0.174419 0.0627881 -0.333333 0 0 1
+0.440893 -0.371795 0.108467 -0.218527 0.973205 -0.0715456
+-0.429023 -0.371795 -0.24353 0 1 0
+0.5 -0.125431 -0.245508 1 0 0
+0.5 0.0776189 0.223394 1 0 0
+-0.5 0.0440528 -0.332951 1 0 0
+-0.5 0.087526 -0.242621 1 0 0
+0.0939097 0.371795 0.265581 0 1 0
+0.5 0.230072 -0.297789 1 0 0
+0.368944 0.0913718 0.320513 0.665434 0.261833 0.699029
+-0.228938 0.0434296 -0.136313 0.0277355 0.999529 0.0130971
+0.143996 0.294872 0.13995 0.271413 0.962451 0.00486771
+0.5 0.247838 -0.219636 1 0 0
+0.0809169 0.188495 0.332588 0.38214 0.924087 0.00563828
+-0.334972 -0.227579 -0.371795 0 0 1
+0.5 -0.190893 0.0649027 1 0 0
+0.217447 0.0360637 -0.105684 -0.373775 0.927441 -0.0120263
+0.27872 -0.371795 -0.344633 0 1 0
+0.448718 -0.365434 0.167449 0.965962 -0.256605 -0.0327262
+0.201574 -0.0249901 -0.260612 0.742624 0.669043 0.0298687
+0.5 0.217807 -0.186319 1 0 0
+-0.5 0.168432 0.112579 1 0 0
+0.248787 0.195274 -0.333333 0 0 1
+0.285386 -0.334641 -0.371795 0 0 1
+-0.055703 0.371795 -0.00794002 0 1 0
+0.5 -0.163833 0.302965 1 0 0
+0.141109 -0.338209 -0.225676 1 0 0
+0.448718 -0.323514 -0.314069 1 0 0
+-0.5 0.133972 0.0343686 1 0 0
+0.270492 0.294872 -0.235346 0 1 0
+-0.5 -0.250933 0.0193899 1 0 0
+0.429243 -0.371795 -0.0105401 0 1 0
+0.5 0.0718696 -0.259133 1 0 0
+-0.0342669 0.0996882 0.320513 0 0 1
+-0.0482982 0.371795 0.26531 0 1 0
+0.208427 0.266499 0.320513 0 0 1
+0.0991405 0.371795 -0.0706531 0 1 0
+-0.274003 0.0040661 -0.272277 0.997615 -0.0689762 -0.00242532
+0.0412032 -0.294872 0.0732105 0 1 0
+-0.299183 0.371795 -0.131598 0 1 0
+-0.0965929 0.371795 -0.0183686 0 1 0
+0.383132 0.294872 0.239682 0 1 0
+0.334229 0.220006 -0.371795 0 0 1
+-0.445274 -0.0758164 0.320513 0 0 1
+-0.141154 -0.35979 -0.230522 1 0 0
+-0.147198 -0.371795 -0.208406 -0.0914568 0.994456 0.0518962
+-0.182647 -0.326302 -0.371795 0 0 1
+-0.164795 -0.371795 0.175884 0 1 0
+0.0973166 0.369308 -0.371795 -0.158085 0.774126 -0.612975
+0.289606 0.140971 -0.333333 0 0 1
+-0.0633913 -0.294872 -0.239967 0 1 0
+0.45281 0.186801 -0.371795 0 0 1
+0.228781 -0.272445 -0.371795 0 0 1
+-0.147251 0.371795 0.305803 0 1 0
+-0.177023 0.371795 -0.354415 0 1 0
+0.5 0.227851 -0.212977 1 0 0
+0.436727 -0.253003 -0.371795 0 0 1
+0.5 0.216272 -0.0741391 1 0 0
+-0.17819 -0.371795 -0.0909937 0 1 0
+0.5 -0.274127 -0.17437 1 0 0
+0.0388679 -0.294872 -0.00476156 0 1 0
+-0.098056 -0.294872 -0.12757 0 1 0
+0.5 -0.15749 0.190666 1 0 0
+0.292214 0.261779 -0.371795 0 0 1
+-0.291275 0.0508 0.371795 0 0 1
+0.234935 -0.371795 0.0544033 0 1 0
+-0.278867 -0.0611439 0.371795 0 0 1
+-0.0252606 -0.203168 0.356403 0.160598 0.98702 0
+-0.320513 0.020002 -0.342677 0.98623 -0.0844315 -0.142203
+0.141109 -0.329989 0.293557 1 0 0
+0.5 -0.272095 0.229169 1 0 0
+0.0672278 0.256282 0.322515 -0.121426 0.918793 0.375599
+0.130992 -0.223034 -0.333333 0.0896797 -0.117081 0.989065
+0.5 -0.23839 -0.292918 1 0 0
+-0.300287 0.371795 -0.217868 0 1 0
+-0.353907 -0.046531 -0.371795 0 0 1
+-0.0950553 -0.294872 -0.0559177 0 1 0
+0.186098 -0.0293439 -0.333333 0 0 1
+0.5 -0.191975 0.00283743 1 0 0
+-0.426366 -0.289458 -0.371795 0 0 1
+-0.5 -0.149876 0.194143 1 0 0
+-0.429393 0.175369 0.320513 0 0 1
+-0.202999 -0.371795 -0.0570248 0 1 0
+-0.141154 -0.309808 -0.125329 1 0 0
+0.437715 -0.122344 0.320513 0 0 1
+-0.343656 0.371795 -0.31712 0 1 0
+-0.5 -0.260749 -0.323202 1 0 0
+0.164555 0.157361 0.371795 0 0 1
+0.168075 0.294872 -0.0016388 0 1 0
+-0.448718 -0.314857 -0.171285 1 0 0
+0.285989 -0.371795 -0.219365 0 1 0
+-0.193088 -0.339819 0.320513 0 0 1
+-0.5 0.106568 0.0543628 1 0 0
+0.219011 -0.0365161 -0.0659343 0.26129 0.96512 -0.0164864
+0.5 -0.271103 0.133432 1 0 0
+0.148303 -0.371795 -0.295325 0.141071 0.988723 0.0502579
+0.141026 0.317339 0.127416 1 0 0
+0.00687393 0.290435 0.320513 0 0 1
+-0.202204 0.0728999 0.371795 0.0859995 -0.0196616 0.996101
+-0.5 -0.235204 0.0101231 1 0 0
+0.5 -0.290741 -0.296043 0.808206 -0.570793 -0.144909
+-0.43998 0.371795 0.0361453 0 1 0
+-0.5 0.343004 -0.142847 1 0 0
+-0.20559 -0.0353801 -0.281882 -0.618266 0.785961 0.00363361
+0.5 -0.137194 0.0936242 1 0 0
+0.5 -0.0504076 -0.337709 1 0 0
+0.5 0.149047 0.118866 1 0 0
+-0.296603 -0.371795 -0.249483 0 1 0
+-0.266975 -0.164547 0.371795 0 0 1
+0.0505568 0.350276 -0.371795 0 0 1
+-0.5 0.106366 -0.0433432 1 0 0
+-0.5 0.285891 -0.110152 1 0 0
+-0.120213 -0.294872 0.298192 0 1 0
+-0.141154 -0.36761 0.226374 0.76366 -0.600804 0.236343
+-0.382072 0.371795 0.303157 0 1 0
+0.272921 -0.371795 0.151111 0 1 0
+0.200094 -0.0229921 -0.0485371 0.7903 0.61267 -0.00777643
+-0.374353 -0.0710692 0.355609 0.96099 0.276584 0
+0.5 -0.117677 -0.210253 1 0 0
+0.333773 0.294872 -0.229603 0 1 0
+-0.344928 -0.170806 0.320513 0 0 1
+0.172525 0.294872 -0.0205496 0 1 0
+-0.5 -0.148732 -0.126351 1 0 0
+0.11794 0.371795 0.0919536 0 1 0
+-0.374556 -0.281127 0.320513 0 0 1
+-0.408677 -0.0578502 0.320513 0 0 1
+-0.285638 -0.0701228 0.371795 0 0 1
+-0.342113 0.371795 -0.0585458 0 1 0
+-0.275368 0.371795 0.0318461 0 1 0
+0.497185 0.294872 0.232814 0.426919 0.901146 0.075339
+-0.20499 -0.00320994 0.341167 0.999709 0.0229124 -0.00747944
+-0.320513 0.00438673 -0.339312 0.944064 0.0511895 -0.325766
+-0.17567 -0.371795 0.182089 0 1 0
+-0.188221 0.371795 -0.183671 0 1 0
+0.175499 -0.371795 -0.063675 0 1 0
+-0.141154 -0.368994 -0.134208 0.769264 -0.638727 0.0161534
+-0.361489 0.142559 0.320513 0 0 1
+0.5 -0.00653898 0.277397 1 0 0
+-0.243818 -0.14068 -0.333333 0 0 1
+0.325782 -0.168975 0.320513 0.237324 -0.262201 0.935376
+0.0122924 0.371795 -0.133459 0 1 0
+-0.307713 -0.241562 0.320513 0 0 1
+-0.5 -0.194501 0.115848 1 0 0
+0.198077 -0.292578 -0.371795 0 0 1
+0.000380964 -0.0121443 0.320513 0 0 1
+0.29598 -0.371795 0.121978 0 1 0
+-0.5 0.284264 0.247916 1 0 0
+-0.147403 -0.13928 -0.333333 0 0 1
+0.308535 -0.356944 -0.371795 0 0 1
+0.5 0.268356 0.0596596 1 0 0
+-0.141154 -0.36286 0.0314595 0.997656 -0.0671562 -0.0131545
+0.129085 -0.294872 -0.314922 0 1 0
+0.5 -0.0171962 -0.343568 1 0 0
+-0.415316 -0.371795 -0.25012 0 1 0
+-0.5 0.00604459 0.22374 1 0 0
+0.5 0.163378 -0.0862599 1 0 0
+-0.5 -0.0767378 -0.250172 1 0 0
+0.415858 0.294872 0.119139 0 1 0
+0.00785106 -0.158214 -0.333333 0 0 1
+-0.203467 0.24476 0.359927 -0.323419 0.946223 -0.00794118
+-0.477618 0.371795 -0.000308325 0 1 0
+-0.066575 -0.294872 0.166291 0 1 0
+-0.0473315 0.371795 -0.0906881 0 1 0
+-0.184753 0.120735 -0.333333 0 0 1
+-0.153896 -0.371795 -0.32008 0 1 0
+0.5 0.193738 0.17411 1 0 0
+-0.36013 0.371795 0.312319 -0.00124578 0.987827 0.155551
+-0.0204797 0.141854 -0.333333 0 0 1
+0.5 0.135127 -0.0477088 1 0 0
+-0.14886 0.140318 0.356821 0.735725 -0.67728 0
+-0.5 -0.126219 -0.186928 1 0 0
+-0.123121 -0.163384 0.345357 0.614222 0.789134 0
+-0.340264 0.123364 0.371795 -0.0811566 0.0576647 0.995032
+0.319341 -0.371795 -0.0479725 0 1 0
+0.0430272 -0.21502 -0.333333 0 0 1
+-0.448718 -0.329627 -0.268391 1 0 0
+0.5 -0.10982 -0.310129 1 0 0
+0.5 0.178064 0.256178 1 0 0
+0.467028 -0.157027 -0.371795 0 0 1
+0.352864 0.13719 -0.371795 0 0 1
+-0.303358 -0.371795 -0.130843 0 1 0
+-0.37841 0.34768 0.320513 0 0 1
+-0.433885 0.031461 0.320513 0 0 1
+0.483027 0.294872 -0.277924 0 1 0
+-0.201811 0.0324524 -0.0473259 0.632029 0.774581 0.0237503
+-0.240057 0.371795 -0.328453 0 1 0
+0.0991159 0.315826 -0.371795 0 0 1
+0.0944795 -0.294872 0.313135 -0.138212 0.951777 -0.273895
+0.5 -0.138164 -0.309673 1 0 0
+0.5 -0.144197 -0.121955 1 0 0
+0.0599003 0.19571 0.339009 0.322568 0.946546 0
+-0.115742 -0.294872 -0.0583215 0 1 0
+-0.343564 0.371795 0.233778 0 1 0
+0.5 -0.0879598 -0.257553 1 0 0
+0.0347427 0.25883 0.320513 0.0751775 0.376091 0.923528
+0.5 0.129241 -0.150592 1 0 0
+-0.170902 0.276603 0.320513 0 0 1
+0.5 0.0871209 0.0310802 1 0 0
+0.361237 -0.0377655 -0.371795 0 0 1
+0.451352 0.294872 0.0973518 0 1 0
+-0.210589 0.371795 -0.0942786 0 1 0
+0.428719 -0.371795 0.0314227 0 1 0
+0.141109 -0.355693 0.295616 1 0 0
+0.106494 0.371795 -0.303609 0 1 0
+-0.329302 -0.107034 -0.371795 0 0 1
+0.0994449 -0.112133 -0.333333 0 0 1
+0.129812 0.332911 0.320513 0.0621594 -0.000299028 0.998066
+0.229432 -0.0106394 0.0166469 -0.0747266 -0.46807 0.880526
+-0.0874556 -0.294872 0.266483 0 1 0
+-0.163584 0.371795 0.282459 0 1 0
+-0.236579 -0.371795 0.300076 0 1 0
+-0.5 0.0826784 0.317923 0.685292 -0.100944 -0.721239
+-0.342784 -0.139919 0.359572 0.835632 0.549275 0.00412897
+0.5 0.218113 0.231262 1 0 0
+-0.362315 0.371795 -0.13821 0 1 0
+-0.304103 -0.349591 0.320513 0 0 1
+-0.345584 -0.371795 -0.287782 0 1 0
+0.232445 -0.0106258 0.0166372 -0.017242 -0.467837 0.883647
+0.483595 0.254879 0.320513 0 0 1
+-0.5 0.133018 0.310825 0.994485 -0.0414274 -0.0963532
+0.467369 0.268666 -0.371795 0 0 1
+0.5 0.000902532 0.0582168 1 0 0
+-0.141154 -0.352326 -0.122122 1 0 0
+0.5 0.211779 0.195055 1 0 0
+0.0734974 0.230897 -0.365811 0.107473 0.967207 0.230129
+0.5 0.158513 -0.31997 1 0 0
+-0.146158 0.371795 0.0811189 0 1 0
+-0.36297 -0.371795 -0.0527907 0 1 0
+-0.104917 -0.294872 -0.047974 0 1 0
+-0.0236976 0.371795 -0.312713 0 1 0
+-0.283797 0.371795 0.173296 0 1 0
+-0.5 0.0433288 -0.0491837 1 0 0
+-0.430158 0.117312 -0.371795 0 0 1
+0.238608 -0.371795 -0.0432853 0 1 0
+-0.433284 0.166872 0.320513 0 0 1
+-0.402441 -0.0874658 0.320513 0 0 1
+-0.5 0.108148 0.268348 1 0 0
+-0.498511 0.371795 0.318564 -0.192581 0.959741 0.204476
+-0.448718 -0.332122 0.23083 1 0 0
+-0.0172942 -0.223846 0.371795 0 0 1
+0.477935 0.179306 -0.371795 0 0 1
+0.374852 0.0687733 0.331572 0.97101 0.211812 0.11079
+-0.426408 0.282127 -0.371795 0 0 1
+0.5 -0.148584 0.102646 1 0 0
+0.121002 -0.256282 0.330817 -0.00634145 0.998298 -0.0579775
+0.384726 -0.371795 0.0568574 0 1 0
+0.0232476 0.371795 0.132981 0 1 0
+-0.150189 0.371795 -0.229273 0 1 0
+-0.24358 0.371795 -0.106503 0 1 0
+-0.5 0.0401733 0.173927 1 0 0
+-0.5 -0.209902 -0.026608 1 0 0
+-0.5 0.344421 -0.274404 1 0 0
+0.0661284 0.292283 0.320513 0 0 1
+-0.131076 0.371795 -0.346631 0 1 0
+0.468921 -0.135355 0.320513 0 0 1
+0.141026 0.359008 -0.0177835 1 0 0
+-0.149414 0.371795 0.0452296 0 1 0
+0.448718 -0.300343 -0.137413 0.9589 -0.276798 0.0624039
+0.0314083 0.371795 -0.0869359 0 1 0
+0.242153 -0.229035 0.364027 -0.410771 0.904814 -0.112159
+0.448718 -0.356101 -0.299443 1 0 0
+0.199149 0.294872 -0.330996 0 1 0
+-0.427672 0.0146599 -0.371795 0 0 1
+0.48329 0.263408 -0.371795 0 0 1
+-0.49954 -0.119948 0.320513 -0.383605 0.0237548 0.923192
+-0.5 -0.208274 -0.226765 1 0 0
+0.0479457 0.371795 -0.250959 0 1 0
+-0.0152546 0.371795 0.100481 0 1 0
+0.367314 0.294872 -0.353878 0 1 0
+0.103519 0.315929 -0.371795 0 0 1
+-0.456485 0.233735 0.320513 0 0 1
+-0.30937 0.370787 0.320513 -0.231819 0.614048 0.754457
+-0.5 -0.149932 -0.307039 1 0 0
+0.264317 -0.371795 -0.274268 0 1 0
+-0.344981 0.371795 -0.269977 0 1 0
+0.0663337 0.214546 0.371795 0 0 1
+-0.5 -0.148581 -0.0370175 1 0 0
+-0.5 -0.212508 -0.00144698 1 0 0
+-0.265015 0.107618 -0.333333 0 0 1
+0.5 -0.261519 0.279797 1 0 0
+0.0342338 0.371795 0.305347 0 1 0
+0.400298 -0.31287 -0.371795 0 0 1
+0.241389 -0.306317 -0.371795 0 0 1
+-0.127639 0.371795 -0.305101 0 1 0
+-0.0633609 0.233796 -0.371795 -0.0933405 0.290833 0.95221
+0.5 0.125771 0.278425 1 0 0
+-0.438881 -0.0234484 0.320513 0 0 1
+0.16779 0.294872 -0.281232 0 1 0
+0.5 0.0981346 0.19504 1 0 0
+0.277935 -0.216163 0.320513 0.10148 -0.21565 0.971183
+-0.158699 -0.230897 -0.348826 0 1 0
+0.5 0.257007 0.118621 1 0 0
+-0.219512 -0.0809587 -0.333333 0 0 1
+-0.00372093 -0.213267 0.371795 0 0 1
+-0.00309508 0.0148015 0.320513 0 0 1
+-0.00465254 0.371795 0.0543266 0 1 0
+-0.290745 -0.00260836 0.371795 0 0 1
+-0.5 0.0520167 0.302547 1 0 0
+0.360639 -0.104854 -0.371795 0 0 1
+-0.336883 0.0259998 0.371795 0 0 1
+-0.29649 0.209183 -0.333333 -0.378774 0.323232 0.867209
+-0.448718 -0.365314 0.0449413 0.983905 0.172032 0.048322
+0.418818 0.155796 -0.371795 0 0 1
+-0.5 0.0371994 -0.167135 1 0 0
+-0.351563 0.371795 0.13992 0 1 0
+-0.444395 0.371795 -0.221805 0 1 0
+-0.0114313 -0.294872 -0.0676948 0 1 0
+0.102239 0.228495 -0.333333 0.0366817 0.443795 0.895377
+0.5 0.104288 -0.0449906 1 0 0
+-0.355032 -0.0111276 -0.371795 0 0 1
+-0.5 0.357375 0.0281226 1 0 0
+0.5 0.27685 0.0115993 1 0 0
+-0.141154 -0.339847 0.0399246 1 0 0
+0.38755 0.294872 0.156396 0 1 0
+0.324839 -0.346854 0.320513 0 0 1
+-0.138404 -0.290721 -0.371795 0.0345685 0.11117 0.9932
+0.263758 0.16836 0.371795 0 0 1
+-0.229133 -0.0434466 -0.314621 -0.0455315 0.998701 0.0228658
+0.000574082 0.331046 -0.371795 0 0 1
+0.091303 0.154141 0.320513 0 0 1
+0.5 0.139021 0.0219194 1 0 0
+-0.5 0.0610649 0.123132 1 0 0
+0.5 0.00572465 0.0988612 1 0 0
+-0.266003 0.371795 0.0360983 0 1 0
+0.207287 0.294872 -0.0340256 0 1 0
+0.141026 0.360637 -0.100717 1 0 0
+-0.145715 0.371795 -0.0934348 0 1 0
+0.452766 -0.294872 0.0188189 -0.347469 0.935497 0.0641119
+0.416352 0.209466 0.320513 0 0 1
+-0.280369 -0.0827735 -0.333333 0 0 1
+0.5 -0.164171 -0.0208498 1 0 0
+0.5 -0.270153 0.0851934 1 0 0
+0.34294 -0.371795 -0.012236 0 1 0
+-0.252405 0.371795 -0.179209 0 1 0
+0.141109 -0.335542 0.0477631 1 0 0
+-0.181944 -0.0944403 0.350467 0.882507 0.470157 0.0115718
+-0.334839 0.371795 -0.185421 0 1 0
+0.269628 -0.124953 -0.333333 0 0 1
+-0.260227 0.0183329 -0.029962 -0.443697 0.28253 0.850476
+-0.352309 0.0925875 -0.371795 0 0 1
+-0.141864 -0.371795 -0.0833297 -0.594076 0.798569 0.0967525
+0.42408 -0.371795 -0.0250639 0 1 0
+-0.038773 -0.294872 0.211159 0 1 0
+-0.26337 0.21745 0.323269 -0.331761 0.727965 0.600001
+0.480975 0.294872 -0.0649857 0 1 0
+-0.274933 -0.24573 0.320513 0 0 1
+0.0351941 0.371795 -0.104692 0 1 0
+-0.182904 0.156012 -0.333333 0 0 1
+0.5 0.147591 0.069672 1 0 0
+-0.0675651 -0.0359772 0.320513 0 0 1
+-0.0500678 -0.294872 0.281363 0 1 0
+-0.188491 0.00999348 -0.26994 0.974675 0.218368 0.0482078
+0.169836 0.170983 0.371795 0 0 1
+-0.391191 0.0342327 0.320513 -0.145079 0.0881319 0.985487
+0.5 0.267795 0.31981 0.846049 -0.0815696 0.526828
+0.448718 -0.32241 -0.0905357 1 0 0
+0.47596 0.140239 0.320513 0 0 1
+-0.366012 0.0939029 0.37158 -0.564094 0.218405 0.796302
+-0.105929 0.371795 -0.114959 0 1 0
+0.5 -0.110524 0.0610779 1 0 0
+0.0928817 -0.294872 0.105066 0 1 0
+-0.5 0.0186996 0.123108 1 0 0
+-0.188889 0.0786074 0.34385 0.915794 -0.401647 0
+-0.0779635 -0.294872 0.149419 0 1 0
+0.279742 -0.371795 -0.271333 0 1 0
+-0.0647165 -0.294872 -0.220442 0 1 0
+0.0852372 0.371795 0.312371 0.0290732 0.993222 0.112541
+-0.0441828 -0.0852484 0.320513 0 0 1
+-0.407864 -0.289159 -0.371795 0 0 1
+-0.5 0.0424133 -0.129736 1 0 0
+0.404585 0.175397 0.320513 0 0 1
+-0.0668871 -0.174759 -0.333333 0 0 1
+0.0632424 -0.123825 -0.333333 0 0 1
+-0.17269 0.371795 0.240393 0 1 0
+0.262827 -0.240751 0.320513 0 0 1
+0.5 0.0806378 -0.348956 1 0 0
+0.219527 -0.371795 -0.310081 0 1 0
+-0.363464 0.371795 -0.0448177 0 1 0
+-0.293954 -0.195242 0.332204 0.652536 0.757719 0.00761914
+0.355353 0.294872 0.173995 0 1 0
+-0.266762 -0.371795 0.166558 0 1 0
+0.00496598 0.224449 0.371795 0 0 1
+0.000260394 0.371795 -0.102088 0 1 0
+-0.393911 -0.202457 0.320513 0 0 1
+0.125425 0.371795 0.173805 0 1 0
+0.5 0.147271 0.0185227 1 0 0
+0.5 0.0104478 -0.207927 1 0 0
+-0.5 -0.1876 0.280891 1 0 0
+-0.174264 -0.371795 -0.069329 0 1 0
+0.0680388 -0.294872 -0.214149 0 1 0
+0.119053 0.371795 -0.0232743 0 1 0
+-0.5 -0.219216 -0.253264 1 0 0
+-0.240487 -0.0423517 -0.153375 0.263398 0.964553 0.016126
+0.5 0.19484 -0.174163 1 0 0
+-0.404304 -0.371795 -0.357364 0 1 0
+0.0753897 -0.294872 0.118472 0 1 0
+-0.160343 -0.121264 0.320513 0.334482 0.174877 0.926035
+-0.11388 0.0846595 -0.333333 0 0 1
+0.0903992 0.371795 -0.308741 0 1 0
+-0.369616 -0.371795 -0.0201511 0 1 0
+0.082374 0.233876 -0.371795 -0.096998 0.508859 0.855368
+-0.5 -0.249823 0.0803745 1 0 0
+0.0797028 0.292669 0.320513 0 0 1
+0.0586146 -0.256282 0.34598 0 1 0
+0.365044 -0.0350628 -0.371795 0 0 1
+-0.5 0.0978416 0.228429 1 0 0
+-0.0131552 0.204555 0.356468 0 1 0
+-0.213101 -0.371795 -0.300033 0 1 0
+-0.33437 -0.371795 -0.0871655 0 1 0
+-0.457718 -0.294872 -0.206638 0 1 0
+0.5 -0.241886 0.137039 1 0 0
+-0.210945 -0.291108 -0.371795 0 0 1
+-0.319132 0.362953 0.320513 -0.0327512 0.0879936 0.995582
+0.5 0.0615131 0.261431 1 0 0
+-0.465548 0.225613 0.320513 0 0 1
+0.147718 0.294872 -0.327223 0.268829 0.9629 0.0235418
+0.0684339 -0.294872 -0.0699594 0 1 0
+-0.5 -0.280334 -0.268195 1 0 0
+0.299648 -0.0567444 0.371795 0 0 1
+-0.187812 -0.0072217 -0.113722 0.97418 -0.224981 0.0189019
+-0.481999 0.179057 -0.371795 0 0 1
+-0.345494 0.371795 -0.368052 0.11454 0.874714 -0.47091
+-0.5 -0.14124 -0.0693523 1 0 0
+-0.144139 0.00139361 -0.333333 0 0 1
+0.22828 -0.371795 -0.172824 0 1 0
+-0.373202 0.0312728 0.371795 -0.0283961 0.0174205 0.999445
+0.362122 -0.0274614 -0.371795 0 0 1
+0.187548 0.294872 -0.135099 0 1 0
+0.188095 0.230897 -0.369254 0.0523718 0.867353 0.49493
+0.5 0.0616294 0.249579 1 0 0
+0.482381 -0.294872 0.24159 0 1 0
+0.169462 -0.371795 -0.294594 0 1 0
+0.236758 0.103876 -0.333333 0 0 1
+-0.2273 -0.112743 0.371795 0 0 1
+-0.126981 -0.294872 -0.311475 0 1 0
+-0.064759 0.371795 -0.364341 -0.010675 0.973218 -0.229636
+0.0168201 0.28408 -0.371795 0 0 1
+0.418739 -0.371795 0.202046 0 1 0
+-0.279257 -0.0884636 0.371795 0 0 1
+0.0462933 -0.294872 -0.307001 0 1 0
+0.220319 0.0368664 -0.138973 -0.294038 0.955642 0.0170333
+0.141109 -0.363546 0.217373 0.996041 0.0823892 0.033396
+-0.0661556 -0.294872 -0.151321 0 1 0
+0.278165 -0.371795 0.00890831 0 1 0
+0.141026 0.307263 -0.266099 1 0 0
+0.5 0.268024 -0.0786836 1 0 0
+0.424301 0.294872 0.112587 0 1 0
+-0.0557541 0.371795 -0.299286 0 1 0
+0.0256858 -0.0485964 0.320513 0 0 1
+0.5 0.123509 0.231053 1 0 0
+-0.202173 -0.371795 -0.0958949 0 1 0
+-0.448718 -0.35503 0.00747617 1 0 0
+-0.354233 0.339491 0.320513 0 0 1
+-0.262636 0.265832 0.320513 0 0 1
+-0.5 -0.280149 0.206317 1 0 0
+0.107494 -0.0758842 0.320513 0 0 1
+-0.5 0.305763 -0.10088 1 0 0
+-0.5 0.363183 0.0814827 0.993269 -0.11511 0.0128723
+-0.448991 0.106 0.320513 0 0 1
+-0.0795223 0.249904 0.371795 0.0340435 0.130517 0.990861
+0.389367 0.145185 0.320513 0 0 1
+-0.236592 0.0430803 -0.138306 -0.137827 0.990453 0.00264318
+0.5 -0.0464318 0.156583 1 0 0
+-0.5 0.0211452 -0.258586 1 0 0
+0.5 -0.080552 0.0539311 1 0 0
+0.268592 -0.00687948 -0.246758 0.989275 -0.145274 -0.0152121
+0.05554 -0.294872 0.114144 0 1 0
+0.5 -0.154882 -0.1607 1 0 0
+0.141026 0.342293 0.124375 1 0 0
+0.232434 -0.230897 -0.350197 -0.000398728 1 -0.00025488
+-0.5 -0.0120586 0.107304 1 0 0
+0.42385 -0.360645 -0.371795 0.00138792 0.050006 0.998748
+-0.00390217 -0.294872 -0.16011 0 1 0
+-0.0319743 0.244073 0.371795 0 0 1
+0.5 -0.135437 0.301227 1 0 0
+0.318128 0.272845 -0.371795 0 0 1
+-0.19188 0.0193521 -0.239764 0.879458 0.475892 -0.00901767
+0.222226 0.294872 -0.326257 0 1 0
+-0.197786 -0.028427 -0.0729076 0.749006 -0.662327 -0.0176824
+0.5 0.0569025 0.120042 1 0 0
+0.141109 -0.331918 0.0746028 1 0 0
+0.30646 -0.371795 -0.146935 0 1 0
+0.260376 -0.371795 -0.323353 0 1 0
+0.5 -0.0294167 -0.250825 1 0 0
+0.448718 -0.363244 0.176882 0.992237 -0.121592 -0.0260915
+0.0240543 -0.176287 0.320513 0 0 1
+-0.320513 -0.153977 -0.358106 0.998502 0.0546981 0.00140856
+-0.5 0.165823 -0.162043 1 0 0
+-0.168585 0.371795 -0.0392292 0 1 0
+0.141109 -0.313149 0.169128 1 0 0
+0.5 0.0239996 -0.29164 1 0 0
+0.5 0.00299245 -0.271655 1 0 0
+0.448718 -0.35862 -0.226545 1 0 0
+0.5 -0.24819 0.111281 1 0 0
+-0.0385098 0.204736 -0.333333 0 0 1
+-0.338998 -0.371795 0.116877 0 1 0
+0.119541 0.371795 -0.322237 0 1 0
+0.407151 -0.321182 -0.371795 0 0 1
+-0.5 0.236271 -0.178102 1 0 0
+0.317982 -0.371795 -0.19551 0 1 0
+-0.339029 -0.371795 0.0650284 0 1 0
+-0.248574 -0.371795 -0.320745 0 1 0
+0.0719493 0.371795 0.171446 0 1 0
+0.141109 -0.365258 -0.238523 0.967371 0.252094 0.0253546
+-0.449809 -0.235075 0.320513 0 0 1
+0.448718 -0.303224 0.0301819 0.999612 -0.027495 -0.00450579
+0.5 -0.176163 -0.295254 1 0 0
+0.17331 -0.0430737 0.320513 0 0 1
+-0.085565 -0.294872 0.159231 0 1 0
+0.5 -0.18224 -0.0220778 1 0 0
+-0.0926705 -0.294872 -0.245311 0 1 0
+0.5 -0.144923 0.00690601 1 0 0
+0.150674 0.294872 0.0984755 0 1 0
+0.448718 -0.335786 -0.0416728 1 0 0
+-0.439462 0.18595 -0.371795 0 0 1
+-0.316226 0.371795 0.127458 0 1 0
+-0.5 0.0675956 -0.233254 1 0 0
+0.5 0.00978679 -0.258664 1 0 0
+0.0521732 0.371795 -0.36728 -0.0424886 0.823558 -0.565638
+0.129411 0.0280451 0.320513 0 0 1
+0.5 0.239045 -0.307641 1 0 0
+-0.250313 0.371795 -0.232626 0 1 0
+-0.378815 -0.278091 -0.371795 0 0 1
+0.114433 0.371795 0.0269176 0 1 0
+-0.339104 -0.371795 -0.071235 0 1 0
+0.5 -0.213227 -0.2965 1 0 0
+0.361367 0.294872 -0.320428 0 1 0
+-0.0962482 -0.294872 0.125284 0 1 0
+0.464837 0.168729 0.320513 0 0 1
+0.415178 -0.371795 0.109522 0 1 0
+-0.29407 0.371795 -0.359751 0.00271099 0.997666 -0.0682242
+-0.263526 0.0144458 0.371795 0 0 1
+-0.5 -0.232466 -0.331226 1 0 0
+0.364866 0.195402 -0.371795 0 0 1
+-0.5 -0.0815879 -0.29073 1 0 0
+-0.376763 -0.371795 -0.209623 0 1 0
+0.151923 0.294872 -0.0489002 0 1 0
+-0.5 -0.182692 0.122101 1 0 0
+0.1834 0.294872 0.250233 0 1 0
+-0.265033 -0.239167 -0.371795 0 0 1
+0.318066 -0.172101 -0.359169 0.974901 -0.22254 0.00665569
+-0.226124 0.171838 -0.333333 0 0 1
+-0.5 -0.12223 0.0236914 1 0 0
+-0.5 0.0103575 -0.000558367 1 0 0
+0.0707419 -0.294872 -0.1003 0 1 0
+-0.110082 0.371795 0.0376842 0 1 0
+0.0567053 0.0972681 0.320513 0 0 1
+0.393355 -0.371795 -0.176043 0 1 0
+-0.141154 -0.309648 -0.288035 1 0 0
+-0.38518 0.371795 -0.201679 0 1 0
+-0.0828843 -0.294872 -0.0436134 0 1 0
+-0.5 -0.16178 0.301034 1 0 0
+0.141026 0.316013 0.190681 1 0 0
+-0.214058 0.0401204 -0.0495945 0.391902 0.919956 -0.00971619
+-0.0803653 -0.294872 -0.0182947 0 1 0
+-0.5 0.169113 0.183063 1 0 0
+0.168777 -0.371795 -0.35148 0 1 0
+-0.16305 0.356245 0.320513 0 0 1
+0.209055 -0.0315701 -0.0471767 0.569684 0.821854 0.00400833
+0.29279 0.294872 -0.336499 0 1 0
+0.141109 -0.295063 0.309742 0.592955 0.78925 -0.159653
+0.1067 0.0934225 0.320513 0 0 1
+-0.5 -0.199385 -0.192847 1 0 0
+0.5 -0.0315344 -0.281483 1 0 0
+0.40162 -0.371795 -0.333853 0 1 0
+-0.360457 0.0902771 -0.371795 0 0 1
+0.218442 -0.371795 -0.165729 0 1 0
+-0.5 0.349522 -0.144544 1 0 0
+-0.151389 0.0636895 0.320513 0 0 1
+0.170087 0.0264805 -0.333333 0 0 1
+-0.492779 0.371795 0.120485 -0.0881504 0.996101 -0.00351071
+0.226084 -0.371795 -0.361758 0 1 0
+0.141109 -0.310923 -0.196129 1 0 0
+0.106016 0.0190015 0.320513 0 0 1
+-0.209436 -0.126446 0.371795 0 0 1
+0.328189 -0.371795 -0.113762 0 1 0
+0.371931 0.294872 -0.212923 0 1 0
+-0.252085 -0.0379731 -0.297989 0.526268 0.850239 -0.0116109
+0.116739 -0.168352 0.350417 -0.61092 0.791692 0
+-0.251634 0.120666 0.371795 0 0 1
+0.141109 -0.356531 -0.0678619 1 0 0
+0.0541796 -0.294872 -0.185945 0 1 0
+-0.237218 0.151597 -0.333333 0 0 1
+-0.19058 0.371795 0.145305 0 1 0
+-0.142801 -0.351494 0.320513 0.558702 0.0192544 0.829145
+-0.5 0.210126 -0.140333 1 0 0
+-0.120601 -0.294872 0.276239 0 1 0
+-0.417275 0.371795 -0.28714 0 1 0
+0.0884911 0.371795 0.121433 0 1 0
+-0.141154 -0.30707 -0.0301937 1 0 0
+-0.193273 0.173525 -0.333333 0 0 1
+0.163237 0.0143675 0.320513 0 0 1
+0.5 0.146055 0.101931 1 0 0
+0.283444 0.149199 -0.333333 0 0 1
+-0.303963 0.371795 0.0352531 0 1 0
+-0.5 -0.217562 -0.340988 1 0 0
+-0.206286 0.338744 -0.371795 0 0 1
+-0.137549 0.179516 0.371795 0 0 1
+-0.00202791 -0.294872 -0.264394 0 1 0
+-0.0869805 0.295761 0.320513 0 0 1
+0.141026 0.365808 -0.0157408 0.991048 0.122218 0.0537299
+-0.37703 -0.0533406 -0.371795 0 0 1
+-0.448718 -0.337118 0.0591298 1 0 0
+-0.141154 -0.338836 -0.33453 1 0 0
+0.373392 0.294872 -0.215481 0 1 0
+0.141109 -0.319274 -0.325854 1 0 0
+0.16703 0.294872 -0.322081 0 1 0
+0.263383 0.294872 0.151535 0 1 0
+0.233907 0.163693 0.371795 0 0 1
+-0.442767 0.371795 0.101496 0 1 0
+-0.453036 0.371795 0.0679764 0 1 0
+0.5 0.248649 0.315243 0.996792 0.0257383 0.0757886
+0.5 0.021338 0.196049 1 0 0
+0.155693 -0.192638 0.371795 0 0 1
+-0.00633803 0.275762 -0.371795 0 0 1
+0.5 0.0482866 -0.181866 1 0 0
+0.252309 -0.031692 -0.247357 -0.57301 0.81949 -0.00980768
+0.5 -0.241234 -0.354758 1 0 0
+0.00475304 -0.143322 -0.333333 0 0 1
+0.20031 0.294872 -0.0905094 0 1 0
+0.403744 0.184136 0.320513 0 0 1
+0.5 -0.025414 -0.356031 1 0 0
+-0.101246 0.112345 0.320513 0 0 1
+-0.455459 0.0843282 0.320513 0 0 1
+-0.448718 -0.365756 0.316933 0.852733 0.126176 -0.506879
+-0.141154 -0.361607 0.280981 0.998648 -0.0519079 0.00273365
+0.458125 -0.0916262 -0.371795 0 0 1
+-0.0332811 0.371795 0.160303 0 1 0
+0.0442376 -0.222918 0.371795 0 0 1
+-0.206384 -0.0359366 -0.154991 -0.545015 0.838299 -0.0146165
+0.187827 -0.16499 0.371795 0 0 1
+0.0053176 0.346696 -0.371795 0 0 1
+0.141109 -0.322126 0.132086 1 0 0
+-0.331659 0.154779 0.323296 0.789073 -0.534446 -0.302871
+0.5 0.245715 -0.359825 1 0 0
+-0.141154 -0.342781 -0.321357 1 0 0
+-0.297876 0.00848006 -0.333333 0 0 1
+-0.417782 0.222977 0.320513 0 0 1
+0.404198 -0.0651543 -0.371795 0 0 1
+-0.37716 -0.0581638 0.361881 0.975734 0.212181 -0.0540588
+-0.5 -0.0330258 0.173772 1 0 0
+-0.142861 0.371795 0.248465 0 1 0
+-0.5 0.0855898 -0.28845 1 0 0
+-0.254099 -0.0594682 -0.333333 0 0 1
+-0.00251457 -0.164792 -0.333333 0 0 1
+0.141109 -0.315567 0.128238 1 0 0
+0.448718 -0.307435 0.204965 1 0 0
+0.5 -0.0291824 0.230886 1 0 0
+0.5 -0.0612185 -0.0465501 1 0 0
+0.268209 -0.0083114 -0.226779 0.9789 -0.2018 -0.0321195
+-0.213968 0.350499 0.320513 0 0 1
+-0.172379 0.371795 -0.366889 0.0184961 0.989462 -0.143608
+0.122304 -0.0152544 0.320513 0 0 1
+-0.329502 0.03258 -0.371795 -0.085414 -0.0284599 0.995939
+0.0906472 0.0975708 -0.333333 0 0 1
+0.307545 0.294872 -0.019599 0 1 0
+0.221391 -0.304281 0.320513 0 0 1
+0.5 -0.141385 0.255094 1 0 0
+-0.0341261 0.158854 0.320513 0 0 1
+0.448632 0.294872 0.110566 0 1 0
+0.204666 -0.313099 0.320513 0 0 1
+-0.324207 0.224102 -0.371795 0 0 1
+-0.5 -0.21102 -0.189666 1 0 0
+-0.0944229 0.371795 -0.329128 0 1 0
+-0.248438 0.195333 -0.333333 0 0 1
+-0.232414 -0.0492108 -0.333333 0.0233607 -0.348658 0.936959
+-0.217354 0.302769 0.320513 0 0 1
+0.415276 0.294872 0.0710888 0 1 0
+0.5 -0.10336 -0.13519 1 0 0
+-0.264763 0.371795 -0.218815 0 1 0
+-0.5 -0.162721 0.206293 1 0 0
+0.0642986 -0.294872 -0.307149 0 1 0
+0.165351 0.294872 0.105149 0 1 0
+-0.319906 0.169813 0.335385 0.739529 -0.673099 0.00591584
+0.352227 0.0243332 0.371795 0 0 1
+-0.192099 -0.0198214 -0.20214 0.893834 -0.448397 0
+-0.5 -0.0650197 0.159409 1 0 0
+0.5 -0.025109 0.0714909 1 0 0
+-0.5 -0.0664779 -0.132125 1 0 0
+-0.250511 -0.224472 0.327121 0.420627 0.871413 -0.252413
+0.0227445 0.371795 -0.151584 0 1 0
+-0.28629 0.371795 -0.163893 0 1 0
+0.411608 -0.371795 0.098884 0 1 0
+-0.475606 -0.294872 -0.151999 0 1 0
+0.294476 -0.193796 -0.333333 0 0 1
+-0.215 0.0405596 -0.165699 0.350966 0.936347 0.00882789
+0.118039 0.371795 0.0159333 0 1 0
+0.191649 -0.371795 0.0091581 0 1 0
+0.5 -0.184008 0.163774 1 0 0
+-0.440971 0.371795 0.107806 0 1 0
+-0.318893 -0.260982 0.320513 0 0 1
+-0.190528 -0.016453 -0.037486 0.801531 -0.395079 0.448844
+0.141109 -0.315224 0.273571 1 0 0
+0.5 -0.203525 -0.000222926 1 0 0
+0.356159 0.294872 0.194572 0 1 0
+-0.297603 0.0960404 0.371795 0 0 1
+-0.25352 0.371795 0.0751809 0 1 0
+-0.0561231 0.318121 -0.371795 0 0 1
+0.448718 -0.341287 -0.131946 1 0 0
+0.5 0.171159 -0.11126 1 0 0
+-0.320513 0.0940081 -0.350712 1 0 0
+-0.457918 0.224335 -0.371795 0 0 1
+0.126057 -0.294872 0.0115532 0 1 0
+0.388263 -0.109176 0.320513 0 0 1
+-0.339394 0.371795 0.279258 0 1 0
+-0.384025 -0.00646384 0.321944 0.726879 0 -0.686766
+-0.456117 -0.294872 0.0387928 0.158195 0.987405 0.0025316
+-0.5 0.246149 -0.201469 1 0 0
+-0.5 0.0789991 0.126819 1 0 0
+0.5 -0.133067 -0.177607 1 0 0
+-0.0699783 -0.294872 -0.305061 0 1 0
+-0.5 0.0981174 -0.202326 1 0 0
+0.465791 0.286783 0.320513 -0.0443172 0.14903 0.987839
+0.243223 0.228451 0.320923 0.433482 0.559608 0.706351
+-0.5 0.332239 -0.174571 1 0 0
+0.32078 0.012918 -0.371795 0.377935 0.102325 0.92016
+0.270828 0.126489 -0.333333 0 0 1
+-0.0996999 -0.153962 -0.333333 0 0 1
+0.172348 -0.216978 0.371795 0 0 1
+-0.149332 0.165952 -0.333333 0 0 1
+0.00795299 0.195002 -0.333333 0 0 1
+-0.5 -0.171068 -0.164167 1 0 0
+-0.141154 -0.32216 -0.25469 1 0 0
+-0.405098 -0.175624 0.320513 0 0 1
+-0.00852075 -0.294872 0.0971582 0 1 0
+0.40242 -0.371795 0.000284012 0 1 0
+0.0457362 0.371795 -0.0816554 0 1 0
+0.252637 -0.153891 0.371795 0 0 1
+0.068206 -0.0840992 -0.333333 0 0 1
+0.5 -0.284386 -0.239459 0.999767 -0.0213238 0.00341665
+-0.172562 -0.227252 -0.333333 0.0544864 -0.431879 0.900284
+-0.5 0.129947 -0.112606 1 0 0
+0.336538 -0.184786 0.320513 0 0 1
+0.5 0.00785214 -0.33365 1 0 0
+-0.5 0.0632985 -0.174925 1 0 0
+-0.288022 -0.343688 0.320513 0 0 1
+-0.5 -0.228494 0.10166 1 0 0
+0.5 -0.0707191 0.0147895 1 0 0
+0.0138939 -0.294872 -0.110522 0 1 0
+0.00432088 0.204555 0.370821 0.140494 0.731769 -0.666915
+0.141109 -0.29773 0.0810628 0.91424 0.402188 -0.0490979
+0.5 -0.196034 -0.0291433 1 0 0
+0.146902 0.294872 0.241043 0.533765 0.836521 0.123805
+-0.204636 -0.0624235 0.371795 0.105254 -0.0104133 0.994391
+-0.00822188 -0.0935856 0.320513 0 0 1
+-0.420672 0.371795 0.285107 0 1 0
+0.0790936 -0.294872 0.252667 0 1 0
+0.5 -0.266725 -0.169611 1 0 0
+0.286231 -0.371795 -0.101324 0 1 0
+-0.222418 0.371795 0.00822009 0 1 0
+-0.427631 -0.371795 0.0375088 0 1 0
+-0.216752 -0.371795 0.13304 0 1 0
+0.169743 0.0591995 0.320513 0 0 1
+-0.5 0.327182 -0.140178 1 0 0
+-0.489171 -0.0536708 -0.371795 0.115552 0.00220584 0.993299
+-0.425265 0.166425 -0.371795 0 0 1
+0.0777295 -0.294872 -0.303821 0 1 0
+-0.207224 -0.371795 -0.21091 0 1 0
+0.289951 -0.371795 -0.11274 0 1 0
+-0.0938983 -0.200004 -0.333333 0 0 1
+0.333501 -0.371795 0.0873363 0 1 0
+0.484484 0.28618 -0.371795 -0.00927212 -0.104272 0.994506
+0.479074 0.0295008 -0.371795 0 0 1
+0.324853 -0.215076 -0.371795 0 0 1
+-0.448718 -0.309924 -0.0831064 1 0 0
+0.5 0.225552 0.143405 1 0 0
+-0.466689 0.371795 0.0388717 0 1 0
+0.5 0.173858 -0.0793385 1 0 0
+-0.364242 0.371795 -0.0700905 0 1 0
+0.214262 -0.371795 0.204983 0 1 0
+-0.0541377 0.197688 0.343595 -0.299115 0.954204 0.00487536
+0.214104 0.193903 -0.333333 0 0 1
+0.413982 -0.371795 0.284831 0 1 0
+0.441948 -0.315381 -0.371795 -0.202362 0.118746 0.972085
+0.448718 -0.333861 -0.316824 1 0 0
+0.378632 -0.172899 0.320513 0 0 1
+0.146072 0.0567093 0.320513 0 0 1
+-0.176108 -0.371795 0.0630117 0 1 0
+0.153476 -0.159841 -0.333333 0 0 1
+-0.374561 0.154896 -0.371795 0 0 1
+-0.293165 -0.0926477 -0.333333 0 0 1
+0.0282437 0.313888 0.320513 0 0 1
+-0.16778 -0.273642 0.320513 0 0 1
+0.218731 0.294872 0.179919 0 1 0
+0.5 0.264318 0.140685 1 0 0
+0.349809 0.251306 -0.371795 0 0 1
+-0.141154 -0.33919 -0.265226 1 0 0
+0.368585 0.294872 -0.351624 0 1 0
+0.394892 -0.352363 -0.371795 0 0 1
+0.240179 -0.0371456 -0.13026 -0.2 0.979773 0.00669963
+0.141026 0.339544 0.109434 1 0 0
+0.202644 0.195122 0.371795 0 0 1
+0.235994 0.0380044 -0.24373 0.129299 0.99149 0.0151118
+-0.18245 0.249807 0.367105 -0.226288 0.973694 0.0267172
+0.0435515 -0.294872 -0.332394 0 1 0
+-0.5 -0.0492672 -0.000134808 1 0 0
+-0.381058 0.371795 -0.165107 0 1 0
+-0.5 0.0806925 -0.256559 1 0 0
+-0.5 -0.174358 0.132467 1 0 0
+-0.177943 -0.0986225 0.320513 0.483212 0.320295 0.814811
+-0.320513 0.123984 -0.370052 -0.603149 -0.0457374 0.796316
+0.475179 0.294872 0.276365 0 1 0
+-0.366976 -0.371795 0.196822 0 1 0
+-0.235189 0.324629 -0.371795 0 0 1
+0.00289598 0.262299 -0.371795 0 0 1
+-0.106999 -0.236692 0.371795 0 0 1
+0.288994 0.0379694 -0.333333 0 0 1
+0.350791 0.294872 0.133936 0 1 0
+0.141109 -0.296158 0.195366 0.732178 0.67356 0.101156
+-0.117967 0.371795 0.0254238 0 1 0
+-0.141154 -0.30171 0.190773 0.994761 -0.0948737 -0.0380612
+-0.312563 -0.171622 0.371795 -0.147163 -0.369294 0.917586
+-0.414072 0.348204 0.320513 0 0 1
+0.152263 -0.371795 -0.278397 0 1 0
+-0.440108 -0.371795 0.0539235 0.297469 0.953235 -0.0534436
+0.318015 0.188563 -0.371795 0.266987 0.00810703 0.963666
+0.107592 -0.166272 -0.333333 0 0 1
+0.5 -0.184728 0.169263 1 0 0
+0.5 0.16185 -0.371276 0.835653 -0.0168438 -0.549
+0.141109 -0.362998 -0.0775355 0.995985 0.089051 -0.0091184
+-0.285929 -0.15413 -0.333333 0 0 1
+-0.297668 0.371795 -0.321575 0 1 0
+0.246628 -0.147981 -0.333333 0 0 1
+0.258021 0.294872 -0.0330302 0 1 0
+0.5 -0.172792 -0.0892417 1 0 0
+0.486151 0.294872 -0.11462 0 1 0
+0.5 -0.259388 -0.0484798 1 0 0
+0.343491 0.197602 -0.371795 0 0 1
+0.054743 0.029862 0.320513 0 0 1
+-0.5 0.275003 -0.308492 1 0 0
+-0.397529 -0.0937736 0.320513 0 0 1
+-0.180943 -0.371795 -0.315188 0 1 0
+-0.339512 0.371795 -0.339351 0 1 0
+-0.096182 -0.190648 -0.333333 0 0 1
+-0.192325 -0.0892091 -0.333333 0 0 1
+0.191313 0.073799 -0.333333 0 0 1
+-0.161 0.135468 -0.333333 0 0 1
+0.5 0.13667 0.228661 1 0 0
+0.411888 -0.205244 0.320513 0 0 1
+-0.215606 -0.0945649 0.371795 0 0 1
+-0.5 -0.257256 -0.341608 1 0 0
+0.0901676 0.371795 0.208696 0 1 0
+0.332963 -0.121626 0.371795 0 0 1
+-0.348408 -0.371795 -0.224734 0 1 0
+-0.1214 -0.294872 -0.164502 0 1 0
+-0.5 -0.182015 0.252205 1 0 0
+0.156832 -0.201201 -0.333333 0 0 1
+0.0704296 0.178835 -0.333333 0 0 1
+0.141109 -0.357096 0.0853819 1 0 0
+0.3165 0.072563 0.371795 0 0 1
+-0.5 0.194263 -0.172439 1 0 0
+0.420356 -0.0737001 0.320513 0 0 1
+0.5 0.198468 -0.0445549 1 0 0
+0.0670418 -0.294872 0.0877472 0 1 0
+-0.00627008 -0.294872 -0.0547574 0 1 0
+-0.358917 -0.371795 -0.168601 0 1 0
+-0.302167 0.0708941 -0.333333 0 0 1
+-0.5 0.100432 -0.332402 1 0 0
+-0.394851 -0.217084 0.320513 0 0 1
+-0.00539083 -0.068741 0.320513 0 0 1
+0.5 -0.0807031 -0.190527 1 0 0
+-0.332334 -0.371795 -0.116422 0 1 0
+-0.448718 -0.307313 -0.283415 1 0 0
+-0.5 -0.223527 -0.192703 1 0 0
+0.145533 0.294872 -0.30053 0.316867 0.945669 -0.0728371
+0.5 -0.0397803 -0.238525 1 0 0
+0.365403 0.153801 -0.371795 0 0 1
+-0.16179 0.126273 0.348786 0.783645 -0.620998 0.0161948
+-0.274026 -0.00381182 -0.0367112 0.873908 0.0420002 -0.484273
+-0.391323 0.00753986 0.320513 -0.211422 -0.0611263 0.975482
+-0.389167 -0.371795 -0.339697 0 1 0
+-0.229342 0.371795 -0.280431 0 1 0
+0.350235 -0.136023 -0.371795 0 0 1
+-0.0321465 0.371795 0.178194 0 1 0
+-0.100262 0.297568 -0.371795 0 0 1
+-0.5 -0.061829 -0.322174 1 0 0
+0.136941 -0.166876 -0.333333 0 0 1
+0.407564 0.294872 0.300771 0 1 0
+0.196222 -0.371795 0.287603 0 1 0
+0.203502 0.0211691 0.324221 0.869905 0.24925 -0.425605
+0.457556 -0.294872 -0.0483853 -0.209743 0.976898 0.0409625
+0.0148237 -0.213445 0.371795 0.00167461 0.0529365 0.998596
+0.448718 -0.316844 0.0108922 1 0 0
+-0.5 0.361303 0.261921 0.999222 -0.0393594 0.00232011
+-0.487279 -0.199132 0.320513 0 0 1
+-0.219489 0.277785 -0.371795 0 0 1
+0.31419 -0.226791 -0.371795 0 0 1
+0.270156 0.148015 -0.333333 0 0 1
+0.222188 -0.371795 -0.268661 0 1 0
+-0.240627 -0.0854175 -0.333333 0 0 1
+-0.314147 -0.165883 -0.333333 -0.427389 -0.0414567 0.903117
+0.467031 0.082231 -0.371795 0 0 1
+-0.320001 -0.159828 -0.352303 0.996245 0.0865123 0.00344829
+0.0935924 0.196757 0.371795 0 0 1
+0.141109 -0.350251 -0.174427 1 0 0
+-0.120045 0.321565 0.320513 0 0 1
+-0.264441 0.0276196 -0.229996 0.792248 -0.610199 0
+-0.0692319 -0.189591 -0.333333 0 0 1
+-0.5 0.0379306 0.278837 1 0 0
+0.27169 0.0814789 -0.333333 0 0 1
+-0.5 -0.253307 -0.345117 1 0 0
+0.5 -0.190555 0.019694 1 0 0
+-0.039901 -0.294872 -0.0240129 0 1 0
+0.141109 -0.309893 -0.315103 1 0 0
+-0.164494 -0.371795 -0.224878 0 1 0
+-0.253437 -0.371795 -0.258953 0 1 0
+0.173032 -0.371795 -0.135144 0 1 0
+0.295964 0.294872 0.0869555 0 1 0
+0.141026 0.369178 -0.269833 0.769975 0.632984 -0.0804318
+-0.197315 -0.371795 -0.275365 0 1 0
+0.188422 -0.369376 0.320513 -0.0596184 -0.382088 0.922201
+-0.5 -0.223887 0.130932 1 0 0
+-0.479891 0.00660782 -0.371795 0 0 1
+-0.5 -0.235634 0.256562 1 0 0
+0.247696 0.294872 -0.209366 0 1 0
+-0.443617 0.364771 -0.371795 0.00489184 -0.0587535 0.99826
+-0.122346 0.371795 -0.300151 0 1 0
+0.5 0.168318 0.0223265 1 0 0
+-0.382169 -0.371795 0.085849 0 1 0
+0.484068 0.24988 -0.371795 0 0 1
+-0.5 0.269214 -0.265752 1 0 0
+-0.038767 -0.230897 -0.369455 -0.00959085 -0.619409 0.78501
+0.438334 -0.343126 -0.371795 -0.0666803 -0.0295214 0.997338
+0.294382 -0.0547005 -0.333333 0 0 1
+0.167193 0.112886 -0.333333 0 0 1
+-0.141154 -0.342344 -0.204119 1 0 0
+-0.29441 0.0406382 -0.333333 0 0 1
+0.155105 0.294872 -0.207887 0 1 0
+0.448718 -0.314167 0.296786 1 0 0
+-0.377156 -0.371795 -0.337825 0 1 0
+-0.244036 -0.371795 -0.0489456 0 1 0
+0.256215 -0.21326 0.371795 0.00820767 -0.13473 0.990848
+0.142487 -0.176042 0.371795 0 0 1
+-0.141154 -0.353083 0.0454219 1 0 0
+0.5 -0.266542 -0.283809 1 0 0
+-0.192129 0.0198873 -0.275282 0.900988 0.433677 -0.01198
+0.5 -0.248894 -0.366517 0.962309 -0.0652328 -0.264018
+-0.5 -0.284876 -0.133892 0.999798 0.0200955 0.000257639
+0.5 -0.131246 0.275158 1 0 0
+-0.320513 -0.00923962 -0.343561 0.994445 -0.0357555 -0.0989992
+0.5 -0.103876 -0.355822 1 0 0
+0.320513 0.146315 -0.36024 0.999992 0.00273561 0.00280838
+-0.409155 -0.0239434 0.320513 0 0 1
+-0.190541 0.0164798 -0.293883 0.913846 0.40547 0.0218862
+-0.078702 -0.09151 -0.333333 0 0 1
+-0.5 -0.145716 -0.190121 1 0 0
+0.462138 -0.294872 0.0352801 0 1 0
+0.0260335 0.371795 0.21965 0 1 0
+0.0639111 0.17499 0.320513 0 0 1
+-0.169691 0.178679 -0.333333 0 0 1
+-0.306585 0.297753 -0.371795 0 0 1
+-0.326128 0.162815 0.320513 -0.661507 0.480436 0.575839
+-0.5 -0.0798417 -0.307525 1 0 0
+-0.185045 -0.371795 -0.136232 0 1 0
+-0.330594 0.299156 -0.371795 0 0 1
+0.0332469 0.286152 0.320513 0 0 1
+0.5 -0.0567448 -0.199423 1 0 0
+0.106768 -0.294872 0.0325477 0 1 0
+0.320388 0.255682 -0.371795 0 0 1
+0.215177 -0.0350055 -0.104288 0.378773 0.92517 -0.0243418
+-0.141154 -0.366278 -0.151804 0.968315 -0.249563 0.00916495
+-0.179038 0.371795 -0.317609 0 1 0
+0.5 0.147776 -0.323088 1 0 0
+-0.25725 0.371795 -0.0582974 0 1 0
+0.0601447 0.371795 0.256438 0 1 0
+0.351783 0.294872 -0.244683 0 1 0
+0.458795 0.12353 -0.371795 0 0 1
+-0.5 -0.218526 -0.231908 1 0 0
+0.189772 -0.264761 -0.371795 0 0 1
+0.0186738 0.0908438 -0.333333 0 0 1
+0.370682 -0.371795 -0.242242 0 1 0
+0.5 -0.178193 -0.226421 1 0 0
+-0.0759124 -0.294872 0.159022 0 1 0
+0.48835 0.139847 -0.371795 0 0 1
+-0.0228719 -0.197097 0.320513 0.0385796 0.250087 0.967455
+0.5 0.0563749 -0.158711 1 0 0
+-0.155193 -0.261522 0.320513 -0.0492495 -0.185586 0.981393
+-0.141154 -0.369809 -0.053228 0.714688 -0.69937 -0.0101505
+0.207659 0.197719 -0.333333 0 0 1
+-0.144182 -0.236037 -0.371795 -0.03605 -0.491555 0.8701
+-0.104541 0.173949 -0.333333 0 0 1
+0.222481 -0.371795 0.182959 0 1 0
+-0.487011 -0.294872 -0.0370093 0 1 0
+-0.366489 -0.371795 -0.0305619 0 1 0
+-0.26444 -0.371795 0.196048 0 1 0
+-0.45 -0.294872 0.157811 0.55621 0.83104 -0.00151912
+-0.0382659 0.0199936 -0.333333 0 0 1
+0.357523 0.20638 0.320513 0 0 1
+-0.5 0.14664 0.181259 1 0 0
+0.448718 -0.299281 -0.172948 0.817132 -0.571948 0.0719135
+-0.384571 0.260404 -0.371795 0 0 1
+0.5 -0.0335862 0.311439 0.99593 -0.0137249 0.089074
+0.5 -0.0404862 0.0169436 1 0 0
+-0.186709 0.248881 0.354076 -0.212549 0.97715 0
+-0.24719 0.371795 -0.314189 0 1 0
+0.468745 0.294872 0.141681 0 1 0
+-0.5 -0.175543 0.0815506 1 0 0
+0.141109 -0.300844 -0.30583 0.979457 0.193472 -0.0568617
+-0.427266 0.371795 -0.0628528 0 1 0
+-0.115137 0.371795 -0.214316 0 1 0
+0.347204 0.271658 -0.371795 0 0 1
+-0.221754 0.371795 -0.358757 0 1 0
+0.271499 -0.340857 -0.371795 0 0 1
+0.0827201 -0.294872 -0.0330278 0 1 0
+0.352043 0.123468 0.36411 0.838195 0.418285 0.349952
+0.0145149 -0.191866 -0.333333 0 0 1
+-0.230481 -0.0435645 -0.0446573 0.00349607 0.999941 0.0103294
+0.159568 -0.371795 -0.131711 0 1 0
+-0.181386 -0.371795 0.0978254 0 1 0
+-0.229969 -0.371795 -0.218369 0 1 0
+0.349681 0.106658 0.371795 0.117655 0.00571529 0.993038
+0.0647443 -0.294778 0.320513 -0.138579 -0.579366 0.8032
+-0.141154 -0.302582 0.318528 0.862722 -0.058077 0.502333
+0.49381 0.294872 -0.248189 0.123682 0.984933 0.120874
+-0.320222 -0.157305 -0.361551 0.99772 0.0673797 0.00391599
+0.121957 0.371795 -0.162067 0 1 0
+-0.243098 -0.0590678 -0.333333 0 0 1
+-0.216506 -0.044355 -0.333333 0.0718464 -0.377854 0.923073
+-0.137098 0.371795 -0.288658 0 1 0
+0.305828 0.207152 -0.371795 0.372962 0.217429 0.902011
+-0.350915 0.0181767 -0.371795 0 0 1
+-0.5 0.283749 -0.0690368 1 0 0
+0.443371 -0.371795 0.0532326 -0.411985 0.904111 0.113363
+0.451626 0.294872 0.255512 0 1 0
+-0.0119512 0.0181794 0.320513 0 0 1
+0.0180516 -0.294872 -0.299656 0 1 0
+-0.0440664 0.168662 -0.333333 0 0 1
+0.5 0.127509 0.167622 1 0 0
+0.5 0.155773 -0.0623736 1 0 0
+0.341213 0.272671 -0.371795 0 0 1
+0.141109 -0.335004 0.0319325 1 0 0
+-0.5 0.238945 -0.135863 1 0 0
+0.5 0.0686637 -0.00704201 1 0 0
+-0.117182 -0.256282 0.323787 0.0643575 0.893879 -0.443664
+0.39929 0.0479948 0.320513 0 0 1
+0.179168 0.250521 0.342335 0.212552 0.97715 0
+0.219642 -0.371795 -0.0379471 0 1 0
+-0.427769 -0.371795 0.0781927 0 1 0
+0.5 0.248052 0.192496 1 0 0
+0.408794 -0.371795 0.121809 0 1 0
+0.141026 0.306832 0.270117 1 0 0
+0.474886 0.165439 0.320513 0 0 1
+0.5 0.122107 0.251808 1 0 0
+-0.413343 -0.371795 0.177172 0 1 0
+-0.28877 0.371795 -0.219315 0 1 0
+-0.206991 0.259674 -0.371795 0 0 1
+-0.5 -0.197584 0.137114 1 0 0
+-0.00332212 -0.294872 0.186581 0 1 0
+0.362931 -0.371795 -0.230183 0 1 0
+0.108928 -0.294872 0.114981 0 1 0
+0.5 0.165458 0.278278 1 0 0
+0.141109 -0.365468 -0.169107 0.976465 0.20679 0.0612623
+0.023583 -0.294872 -0.0489911 0 1 0
+0.377794 -0.371795 0.0111648 0 1 0
+0.197451 0.0192101 -0.31449 0.848221 -0.52963 0.00376298
+0.5 0.159905 -0.199447 1 0 0
+-0.217857 -0.00535732 0.371795 0.00122569 -0.000458001 0.999999
+0.39372 0.294872 -0.205123 0 1 0
+-0.337361 -0.371795 0.00677277 0 1 0
+-0.193334 -0.371795 -0.0524622 0 1 0
+-0.284495 -0.371795 0.287168 0 1 0
+-0.243532 -0.0415361 -0.0872602 0.314839 0.949135 0.00446299
+-0.5 0.151892 -0.296155 1 0 0
+-0.220137 0.0421068 -0.146444 0.250267 0.967936 0.0215863
+-0.5 0.275552 0.171702 1 0 0
+-0.424247 0.322904 0.320513 0 0 1
+-0.448718 -0.350568 -0.236408 1 0 0
+0.275121 0.0616139 0.371795 0 0 1
+0.254221 0.0592509 0.371795 0 0 1
+0.403051 -0.281188 0.320513 0 0 1
+0.197758 -0.371795 0.186155 0 1 0
+0.5 -0.0978124 -0.0873478 1 0 0
+0.274289 0.0530793 -0.333333 0 0 1
+-0.16531 -0.371795 0.23763 0 1 0
+-0.5 -0.0720229 -0.310638 1 0 0
+0.326562 -0.371795 0.0342032 0 1 0
+-0.055153 -0.294872 -0.187254 0 1 0
+0.141026 0.325615 -0.12317 1 0 0
+0.00377865 -0.231324 -0.371795 -0.0976811 -0.617265 0.780668
+-0.346741 0.319982 0.320513 0 0 1
+0.27402 0.00639732 0.371795 0 0 1
+-0.5 0.312909 0.304129 1 0 0
+0.454939 0.132323 0.320513 0 0 1
+0.490021 -0.183695 -0.371795 -0.0588459 0.00372576 0.99826
+0.186075 -0.359415 -0.371795 0.0251344 0.0779164 0.996643
+-0.288567 -0.371795 -0.173911 0 1 0
+-0.325448 -0.0987324 0.371795 0 0 1
+-0.434048 -0.371795 0.128756 0 1 0
+0.144306 -0.371795 -0.236928 0.467212 0.878511 -0.0996526
+-0.0519981 -0.252638 -0.371795 0 0 1
+-0.0300842 0.300323 0.320513 0 0 1
+0.0524802 0.337114 -0.371795 0 0 1
+0.12477 -0.256282 0.320716 0.00421048 0.913598 -0.406596
+0.0840824 0.371795 0.182752 0 1 0
+-0.5 0.282039 0.0776137 1 0 0
+-0.035547 0.371795 0.239677 0 1 0
+0.141109 -0.295782 0.0650026 0.82285 0.567795 0.0229514
+-0.00396173 -0.294872 -0.0430293 0 1 0
+0.229864 -0.165424 0.371795 0 0 1
+-0.0947544 0.198119 -0.333333 0 0 1
+-0.232042 0.371795 0.0592383 0 1 0
+-0.139142 -0.294872 -0.0268544 -0.387909 0.921569 0.0153877
+0.254765 0.209199 0.371795 0 0 1
+-0.298746 -0.371795 0.266224 0 1 0
+0.5 -0.0966952 -0.362404 0.999909 -0.00450774 -0.012719
+0.49368 0.294872 -0.330835 0.243523 0.969839 0.010477
+-0.398104 -0.291781 0.320513 0 0 1
+-0.243101 -0.371795 -0.0756253 0 1 0
+0.141109 -0.345854 -0.0944087 1 0 0
+-0.5 -0.25691 -0.225206 1 0 0
+-0.29595 -0.371795 -0.203897 0 1 0
+0.0245053 -0.233416 -0.371795 -0.100227 0.764988 -0.636198
+-0.5 -0.0152949 -0.333468 1 0 0
+-0.134754 0.15433 0.363224 -0.569228 0.817064 -0.0915737
+0.0754458 -0.294872 0.0824871 0 1 0
+0.175967 0.286913 0.320513 -0.0104773 0.145836 0.989253
+0.118794 0.371795 0.172925 0 1 0
+-0.190478 -0.0163446 -0.21731 0.924258 -0.38128 0.0192933
+0.416274 0.294872 -0.288813 0 1 0
+0.147759 0.254883 0.350521 0.0714722 0.997443 -6.35244e-005
+-0.282574 -0.0742077 -0.333333 0 0 1
+0.286233 0.294872 -0.366059 -0.139914 0.959014 -0.246408
+-0.17012 0.113606 0.337534 0.837159 -0.54696 0
+0.5 -0.292348 -0.336428 0.929788 -0.368039 -0.0065055
+0.0612129 -0.294872 -0.155714 0 1 0
+-0.5 0.305886 0.0395682 1 0 0
+-0.471688 0.371795 -0.354231 0 1 0
+0.301328 -0.195019 0.320513 0.157656 -0.0521638 0.986115
+0.5 -0.046799 0.264643 1 0 0
+-0.100477 -0.0256902 -0.333333 0 0 1
+0.00688866 -0.294872 0.285721 0 1 0
+-0.5 -0.173634 -0.123198 1 0 0
+-0.278358 0.371795 -0.0732456 0 1 0
+-0.185005 -0.249251 0.368807 0.107407 0.885673 -0.451715
+0.19559 -0.246949 0.364725 -0.230096 0.922873 -0.308804
+0.33662 0.294872 0.218075 0 1 0
+-0.199905 -0.371795 -0.31636 0 1 0
+-0.5 -0.255536 -0.184723 1 0 0
+-0.227269 -0.371795 0.235594 0 1 0
+-0.5 0.0913817 -0.315101 1 0 0
+0.482553 0.191963 0.320513 0 0 1
+-0.362133 -0.183434 -0.371795 0 0 1
+-0.103474 0.316915 -0.371795 0 0 1
+0.441464 -0.244267 -0.371795 0 0 1
+-0.119066 0.284007 0.320513 0 0 1
+-0.410968 -0.0701112 -0.371795 0 0 1
+-0.1683 0.183294 -0.333333 0 0 1
+0.00177633 0.371795 0.178847 0 1 0
+-0.0351774 0.042253 -0.333333 0 0 1
+-0.5 -0.0546303 -0.208704 1 0 0
+-0.14873 0.0529723 0.320513 0 0 1
+-0.5 0.271506 0.253106 1 0 0
+-0.242659 0.201078 0.371795 0 0 1
+-0.401738 0.371795 0.307599 0 1 0
+0.278766 -0.012336 -0.333333 0 0 1
+0.317411 -0.250227 0.320513 0 0 1
+-0.5 0.306625 -0.181488 1 0 0
+0.232752 -0.068461 0.371795 0 0 1
+-0.353252 0.121252 0.349567 0.877691 -0.479227 0
+-0.448718 -0.338006 -0.0374974 1 0 0
+0.141109 -0.30909 0.0481069 1 0 0
+-0.0864534 0.0745768 0.320513 0 0 1
+0.11803 0.371795 0.000983326 0 1 0
+0.102876 -0.294872 0.282739 0 1 0
+-0.1004 0.371795 -0.357323 0 1 0
+0.0091339 0.371795 0.113195 0 1 0
+0.5 -0.155754 -0.28158 1 0 0
+0.370909 -0.371795 -0.362734 -0.0401069 0.984233 0.172272
+0.201245 0.294872 -0.0638287 0 1 0
+-0.349744 -0.371795 -0.325761 0 1 0
+-0.448718 -0.305869 0.23209 1 0 0
+-0.17944 -0.188416 0.371795 0 0 1
+0.43545 -0.371795 0.304959 0 1 0
+0.5 -0.212066 -0.318491 1 0 0
+0.0572595 0.321951 -0.371795 0 0 1
+-0.141154 -0.368737 -0.108758 0.793968 -0.590107 -0.146248
+-0.053672 -0.124525 -0.333333 0 0 1
+-0.391788 -0.0119285 0.320513 -0.0771751 -0.0130377 0.996932
+-0.448718 -0.296037 -0.0135128 0.942345 0.320684 -0.0956483
+0.16302 0.294872 0.0634491 0 1 0
+-0.229769 -0.0435022 -0.160013 0.00371202 0.999985 -0.00414664
+0.0911699 -0.18325 0.362705 -0.416307 0.880836 0.225424
+0.320623 -0.244827 0.320513 0 0 1
+0.441129 -0.371795 0.0363882 -0.0598015 0.997954 -0.0226332
+0.5 0.275015 0.208529 1 0 0
+0.125106 0.0472389 0.320513 0 0 1
+0.412049 0.294872 -0.00477179 0 1 0
+-0.191609 0.371795 0.253929 0 1 0
+-0.318753 -0.298147 0.320513 0 0 1
+0.095904 -0.294872 -0.249243 0 1 0
+-0.262513 0.371795 -0.27382 0 1 0
+0.35463 -0.337113 -0.371795 0 0 1
+0.127992 -0.294872 -0.279535 0 1 0
+0.0278393 -0.273391 0.320513 0 0 1
+0.308644 0.0635086 0.371795 0 0 1
+-0.5 -0.188193 -0.290698 1 0 0
+-0.00631603 0.204555 0.36074 0 1 0
+-0.5 0.221719 0.0883662 1 0 0
+0.288516 0.199313 0.34045 0.599293 0.80053 0
+-0.495891 0.371795 -0.221334 -0.114099 0.992755 -0.0376606
+0.442233 0.293896 0.320513 -0.0390904 0.542066 0.839426
+-0.04199 0.371795 -0.14543 0 1 0
+0.258874 0.0260806 -0.10235 0.73974 0.672848 0.00779297
+0.349149 -0.371795 -0.0116685 0 1 0
+-0.5 -0.0333166 0.245874 1 0 0
+0.204548 0.294872 0.317847 -0.0433507 0.881642 0.469924
+-0.375651 -0.228367 -0.371795 0 0 1
+-0.253585 0.371795 -0.233689 0 1 0
+0.018895 -0.294872 0.110325 0 1 0
+-0.186318 0.230191 -0.333333 -0.00888617 0.78411 0.620558
+-0.211995 0.103985 -0.333333 0 0 1
+0.220077 -0.0368016 -0.148691 0.271159 0.962448 -0.0129161
+-0.377898 -0.371795 0.222181 0 1 0
+0.5 0.0838536 0.136915 1 0 0
+0.415398 -0.177371 0.320513 0 0 1
+-0.5 -0.098196 -0.311815 1 0 0
+-0.5 -0.225279 -0.245856 1 0 0
+0.0665365 -0.294872 -0.0750841 0 1 0
+-0.141154 -0.296662 -0.132795 0.73538 -0.677271 -0.0228079
+-0.0958301 -0.033864 0.320513 0 0 1
+0.5 0.163114 -0.052837 1 0 0
+-0.141154 -0.315847 -0.0322327 1 0 0
+-0.305197 -0.212201 0.320513 0 0 1
+0.43547 0.294872 -0.150981 0 1 0
+0.5 0.241012 -0.0699529 1 0 0
+-0.458717 0.371795 -0.246222 0 1 0
+-0.447523 -0.0524822 -0.371795 0 0 1
+0.5 -0.153454 0.175783 1 0 0
+-0.5 0.053712 -0.164595 1 0 0
+0.5 -0.148655 -0.278282 1 0 0
+-0.41978 -0.371795 -0.0596824 0 1 0
+-0.194 0.0231956 -0.319545 0.838767 0.544338 0.0128428
+0.259371 0.219634 0.352485 0.479239 0.877685 0
+0.366952 0.0913846 0.352246 0.936955 0.349449 0
+0.5 0.289305 -0.0481655 0.953345 0.293931 -0.0688278
+0.448718 -0.368348 -0.362574 0.945105 -0.318665 -0.0723187
+0.5 0.230565 -0.286678 1 0 0
+-0.198489 -0.0291301 -0.21573 0.726025 -0.687567 -0.0117748
+0.304172 -0.270755 0.320513 0 0 1
+-0.199552 -0.371795 -0.19221 0 1 0
+0.5 -0.242314 -0.153603 1 0 0
+0.329898 0.294872 0.219082 0 1 0
+0.5 -0.0679738 -0.31872 1 0 0
+0.265247 0.0167241 -0.00554717 0.90304 0.410378 0.126918
+-0.5 0.000980419 -0.315821 1 0 0
+-0.5 0.368696 -0.145641 0.984469 -0.169128 -0.0470834
+0.5 0.137684 -0.122269 1 0 0
+0.5 -0.117885 0.111119 1 0 0
+-0.48778 0.371795 0.190131 0 1 0
+0.119089 -0.294872 -0.145029 0 1 0
+-0.0761476 -0.294872 -0.118706 0 1 0
+0.343979 -0.371795 0.0339822 0 1 0
+-0.134044 -0.294872 0.308102 -0.12057 0.992136 -0.0335897
+0.5 -0.193076 -0.159526 1 0 0
+0.195873 0.015827 -0.0165761 0.884828 -0.465916 0.00113517
+-0.218506 -0.13707 0.371795 0 0 1
+0.18459 0.0361331 -0.333333 0 0 1
+0.5 0.269114 -0.152516 1 0 0
+-0.000756597 0.174288 0.320513 0 0 1
+0.448718 -0.326166 -0.0922773 1 0 0
+0.116739 0.101048 -0.333333 0 0 1
+-0.204663 -0.0347316 -0.215062 -0.587965 0.808886 0
+0.417104 -0.00372478 0.320513 0 0 1
+0.320513 -0.142118 -0.335432 0.900875 0.0076515 0.434012
+-0.241414 -0.371795 0.204203 0 1 0
+0.5 0.148835 -0.0454033 1 0 0
+0.305833 -0.341372 0.320513 0 0 1
+-0.141154 -0.351331 -0.146703 1 0 0
+-0.477268 0.371795 -0.225174 0 1 0
+0.447296 0.294872 -0.3457 0 1 0
+-0.0498767 0.371795 -0.109243 0 1 0
+0.5 0.200043 0.0230925 1 0 0
+0.396825 0.294872 0.0382887 0 1 0
+0.2967 0.130979 0.371795 0 0 1
+0.109876 -0.0762601 -0.333333 0 0 1
+0.0730611 0.371795 0.215392 0 1 0
+0.448718 -0.311122 -0.151894 1 0 0
+-0.103618 0.203529 -0.333333 0 0 1
+-0.403463 -0.226436 -0.371795 0 0 1
+0.0301125 0.352643 0.320513 0 0 1
+0.468312 0.294872 -0.30908 0 1 0
+-0.206035 -0.0356921 -0.225185 -0.555836 0.831202 -0.0122541
+0.26176 0.0225412 -0.233839 0.814134 0.580673 0.00208608
+0.123527 -0.230897 -0.355228 0 1 0
+-0.0754114 -0.256282 0.324013 0.0660665 0.918083 -0.390843
+0.41375 -0.0793571 0.320513 0 0 1
+-0.39558 -0.371795 0.200087 0 1 0
+0.200125 0.294872 -0.291913 0 1 0
+-0.201482 -0.325117 -0.371795 0 0 1
+-0.364766 -0.371795 0.179745 0 1 0
+0.170587 0.260566 -0.371795 0 0 1
+0.5 -0.291537 -0.133167 0.793691 -0.584797 -0.167529
+-0.341554 -0.218942 -0.371795 0 0 1
+-0.40209 0.115213 0.320513 0 0 1
+0.152305 0.294872 0.23331 0 1 0
+-0.5 -0.181854 -0.22861 1 0 0
+-0.393044 0.195496 -0.371795 0 0 1
+-0.456369 -0.294872 0.276402 0.120073 0.991958 -0.0400121
+-0.0359705 -0.184049 -0.333333 0 0 1
+-0.167886 -0.371795 0.252214 0 1 0
+-0.5 0.123925 -0.368725 0.948472 -0.0586978 0.311376
+-0.431511 -0.322874 0.320513 0 0 1
+0.43741 0.0175923 -0.371795 0 0 1
+-0.198821 0.0481417 0.348226 0.969393 -0.245514 0
+-0.219228 0.371795 -0.299183 0 1 0
+0.0476033 0.314867 -0.371795 0 0 1
+0.269506 0.11465 -0.333333 0 0 1
+-0.320585 0.367057 0.320513 0.0255979 0.348845 0.936831
+-0.367304 -0.371795 -0.0641832 0 1 0
+0.0451391 -0.294872 -0.193528 0 1 0
+-0.141154 -0.305398 0.191544 1 0 0
+0.258326 0.0459636 -0.333333 0 0 1
+0.311749 0.18913 -0.342817 0.845031 0.487798 0.219034
+0.411973 0.0729378 0.320513 0 0 1
+-0.254245 0.0365727 -0.17811 -0.529114 0.848467 0.0119539
+-0.5 0.350606 0.257843 1 0 0
+-0.197578 -0.0282189 -0.0526128 0.783841 -0.620781 0.0150085
+-0.185538 -0.371795 0.294123 0 1 0
+-0.370836 -0.371795 0.200718 0 1 0
+-0.440677 -0.14295 -0.371795 0 0 1
+0.27314 -0.264975 0.320513 0 0 1
+0.409931 -0.0728298 0.320513 0 0 1
+-0.47539 -0.294872 0.134215 0 1 0
+-0.5 0.245802 -0.247949 1 0 0
+0.0987517 0.164883 -0.333333 0 0 1
+-0.448718 -0.322633 0.194909 1 0 0
+-0.0277848 -0.294872 -0.044234 0 1 0
+0.350287 0.294872 0.23695 0 1 0
+0.203959 0.0156571 0.345347 0.996569 0.082769 -0.000112085
+-0.116971 -0.294872 -0.182825 0 1 0
+0.222915 0.294872 0.245576 0 1 0
+-0.476457 -0.294872 0.264283 0 1 0
+-0.150984 -0.0517231 0.320513 0 0 1
+-0.0185796 0.371795 0.240146 0 1 0
+0.284386 -0.371795 0.139253 0 1 0
+-0.5 0.195247 -0.00366804 1 0 0
+-0.108485 -0.294872 -0.352828 0 1 0
+-0.0529282 -0.138029 -0.333333 0 0 1
+0.5 -0.290281 -0.216442 0.893849 -0.447268 -0.0313907
+0.309278 -0.0802923 0.371795 0 0 1
+0.5 -0.278044 -0.182964 1 0 0
+0.187794 0.248645 0.35786 0.212572 0.977145 0
+-0.13508 0.371795 0.0686188 0 1 0
+-0.123763 -0.230897 -0.362124 0.0150574 0.999112 -0.0393513
+0.0846863 -0.0626336 0.320513 0 0 1
+-0.107652 -0.294872 0.117807 0 1 0
+0.141026 0.339413 -0.144188 1 0 0
+0.5 0.140782 0.148714 1 0 0
+-0.443304 -0.280241 0.320513 0 0 1
+-0.382934 -0.114212 -0.371795 0 0 1
+-0.5 0.115156 -0.288438 1 0 0
+-0.000665252 -0.294872 -0.0892571 0 1 0
+0.5 0.0828023 0.1259 1 0 0
+-0.191647 0.0659198 -0.333333 0 0 1
+0.5 -0.182929 -0.0336829 1 0 0
+-0.5 0.143713 -0.277488 1 0 0
+0.308642 -0.371795 0.0127539 0 1 0
+0.424315 -0.0662987 0.320513 0 0 1
+-0.0496555 0.371795 0.317437 -0.0746842 0.790592 0.607772
+-0.5 -0.0361894 -0.116676 1 0 0
+-0.5 0.000842136 0.236326 1 0 0
+0.5 0.104649 -0.180069 1 0 0
+0.141026 0.351013 -0.124471 1 0 0
+0.277626 -0.136138 -0.333333 0 0 1
+-0.145842 -0.371795 0.27406 -0.479131 0.856525 -0.191829
+-0.127598 0.371795 -0.0140777 0 1 0
+-0.332172 0.200622 -0.371795 0 0 1
+-0.5 0.0951295 0.22656 1 0 0
+0.147458 -0.371795 0.0549862 0.112711 0.993145 0.0309712
+-0.378833 -0.271367 -0.371795 0 0 1
+0.327924 -0.151179 0.371795 0.179571 -0.0305565 0.98327
+-0.5 -0.027362 -0.21314 1 0 0
+-0.5 -0.263458 -0.353329 1 0 0
+0.0452428 0.345272 0.320513 0 0 1
+0.0639384 0.371795 -0.0872712 0 1 0
+0.299586 0.0821216 -0.333333 0 0 1
+0.149916 -0.35644 -0.371795 0.0102095 0.0059202 0.99993
+-0.155315 0.371795 -0.225633 0 1 0
+0.5 -0.122589 -0.0409179 1 0 0
+-0.159591 -0.230897 -0.361331 0.000612339 0.997751 -0.0670256
+0.386779 -0.371795 -0.311363 0 1 0
+0.141109 -0.336005 0.225344 1 0 0
+0.201599 0.0250158 -0.219569 0.750513 -0.660843 -0.00408715
+-0.242977 -0.371795 -0.0639229 0 1 0
+0.168079 -0.0140266 0.320513 0 0 1
+-0.214046 0.0401145 -0.232406 0.41288 0.910766 0.0059104
+-0.299282 -0.371795 0.17684 0 1 0
+-0.247938 -0.371795 0.272476 0 1 0
+0.141026 0.361342 -0.316931 1 0 0
+0.448718 -0.308083 -0.206706 1 0 0
+0.0318946 0.371795 -0.315693 0 1 0
+0.141109 -0.302759 0.0568258 0.997944 0.0601471 -0.022135
+-0.0792619 0.256282 0.32724 -0.0447795 0.993116 0.108234
+0.43319 -0.371795 -0.0675662 0 1 0
+-0.275413 -0.371795 0.123893 0 1 0
+0.270692 -0.184906 -0.333333 0 0 1
+0.5 -0.201493 -0.0228223 1 0 0
+0.141026 0.301822 -0.0553505 0.996262 0.0795702 -0.0336163
+0.00849004 -0.214752 -0.333333 0 0 1
+-0.5 -0.0145362 -0.0722445 1 0 0
+-0.385052 0.185994 -0.371795 0 0 1
+-0.202858 0.0289382 0.361949 0.990805 -0.118839 0.0646767
+0.5 0.29407 0.248464 0.593239 0.803134 -0.0551707
+0.153439 -0.371795 -0.093934 0 1 0
+0.5 0.181819 -0.358877 1 0 0
+-0.5 -0.0119604 -0.103644 1 0 0
+0.442932 0.173226 0.320513 0 0 1
+0.466019 0.294872 -0.0517578 0 1 0
+0.5 0.157743 0.0864749 1 0 0
+-0.404315 -0.0535406 -0.371795 0 0 1
+0.467191 0.294872 -0.127621 0 1 0
+-0.5 0.194969 0.105506 1 0 0
+0.448718 -0.362437 0.0727157 0.999552 -0.026199 -0.0144684
+0.340346 -0.0994386 -0.371795 0 0 1
+0.141026 0.310922 0.230716 1 0 0
+-0.433676 -0.371795 -0.320033 0 1 0
+0.297585 -0.371795 0.0269499 0 1 0
+0.186914 -0.371795 -0.193985 0 1 0
+-0.329551 0.132482 0.371795 0 0 1
+-0.419995 0.371795 0.284678 0 1 0
+0.287162 0.0588215 -0.333333 0 0 1
+0.320513 -0.14572 -0.363045 0.994547 0.00835032 0.103951
+0.405235 0.294872 0.263178 0 1 0
+-0.472269 0.217198 0.320513 0 0 1
+0.409227 -0.371795 -0.0573966 0 1 0
+-0.119378 0.125891 -0.333333 0 0 1
+0.5 -0.176915 -0.0516639 1 0 0
+0.181314 0.0105722 -0.333333 0 0 1
+-0.19403 0.276871 -0.371795 0 0 1
+-0.5 0.352429 -0.28884 1 0 0
+-0.0216373 0.116996 0.320513 0 0 1
+-0.134318 -0.294872 -0.0883997 -0.4902 0.835613 0.247901
+0.130467 0.371795 -0.00285496 0.0145813 0.999893 0.00121997
+-0.422163 -0.371795 -0.309543 0 1 0
+0.5 -0.246357 0.0682815 1 0 0
+-0.256691 0.371795 -0.276919 0 1 0
+-0.5 -0.143289 0.162362 1 0 0
+-0.5 -0.233642 -0.208228 1 0 0
+0.307512 -0.371795 0.178761 0 1 0
+-0.249622 -0.371795 0.179062 0 1 0
+-0.239689 -0.0740775 -0.333333 0 0 1
+-0.073774 -0.294872 -0.131577 0 1 0
+0.22626 -0.00682211 0.371795 0 0 1
+-0.272911 -0.110854 0.371795 0 0 1
+-0.5 0.0352645 0.264041 1 0 0
+-0.217589 -0.119023 -0.333333 0 0 1
+0.129872 0.371795 -0.238284 0 1 0
+-0.499172 0.339831 0.320513 0.772893 -0.220822 -0.594873
+0.281989 -0.0773019 -0.333333 0 0 1
+0.175405 -0.371795 0.152013 0 1 0
+-0.437778 0.371795 -0.0838298 0 1 0
+-0.5 -0.118689 -0.0511375 1 0 0
+-0.5 -0.116882 0.128669 1 0 0
+-0.247264 0.303587 0.320513 0 0 1
+-0.183027 -0.371795 -0.284792 0 1 0
+0.437209 -0.371795 -0.122253 0 1 0
+-0.362192 0.291864 -0.371795 0 0 1
+-0.195449 -0.116538 0.371795 0 0 1
+-0.5 0.361644 0.0868042 0.99822 -0.0584038 0.0120485
+0.0671152 0.371795 0.193339 0 1 0
+0.374261 -0.371795 0.00583417 0 1 0
+-0.451675 -0.229807 0.320513 0 0 1
+-0.5 -0.0149929 -0.192947 1 0 0
+0.193627 -0.371795 0.0737131 0 1 0
+0.420549 -0.349046 0.320513 0 0 1
+0.420828 -0.256014 -0.371795 0 0 1
+-0.5 -0.176928 0.148273 1 0 0
+-0.110067 -0.16293 0.320513 0.0658491 0.0616996 0.99592
+-0.5 -0.0236383 -0.319101 1 0 0
+0.455202 -0.198519 -0.371795 0 0 1
+-0.5 0.080908 0.084675 1 0 0
+-0.104867 0.1502 0.320513 0 0 1
+-0.488916 -0.256101 0.320513 -0.0308707 -0.0132238 0.999436
+0.0914725 -0.294872 0.265883 0 1 0
+-0.5 0.267254 -0.208821 1 0 0
+-0.448718 -0.328507 -0.347642 1 0 0
+0.389385 0.294872 0.0546375 0 1 0
+0.0812443 -0.188382 0.368929 -0.143113 0.7096 0.689918
+0.199113 -0.0215904 -0.144585 0.837501 0.545995 0.0219611
+-0.222726 0.371795 0.0531299 0 1 0
+0.186072 0.294872 0.188798 0 1 0
+0.141026 0.322124 0.146436 1 0 0
+0.267899 -0.0946585 0.371795 0 0 1
+-0.340967 0.142345 0.320954 -0.382617 0.304905 0.872145
+0.187556 -0.0872529 0.371795 -0.531943 0.140242 0.835086
+0.285661 -0.184943 -0.333333 0 0 1
+-0.0927724 0.356747 0.320513 0 0 1
+0.0394617 0.0160223 0.320513 0 0 1
+0.5 0.0275448 0.255712 1 0 0
+0.0861799 -0.135144 0.320513 0 0 1
+-0.389674 -0.371795 -0.328883 0 1 0
+0.115438 0.26342 0.320513 0.00449774 0.0367282 0.999315
+0.405044 -0.371795 0.167119 0 1 0
+0.5 -0.123757 0.134991 1 0 0
+0.214127 0.294872 0.0018335 0 1 0
+0.202442 -0.371795 -0.271893 0 1 0
+-0.5 0.144718 -0.0126277 1 0 0
+0.0343316 0.175351 -0.333333 0 0 1
+-0.448718 -0.304073 0.228636 0.999904 0.0138231 -0.000246055
+0.232905 -0.0912409 0.371795 0 0 1
+-0.0936645 -0.096038 0.320513 0 0 1
+-0.116045 0.0288688 -0.333333 0 0 1
+0.357303 -0.371795 -0.102626 0 1 0
+0.0747644 0.062848 0.320513 0 0 1
+-0.448718 -0.342383 0.235309 1 0 0
+-0.30391 -0.201429 -0.339812 0.735319 0.665298 -0.129172
+0.192349 -0.000464694 -0.161414 0.999399 -0.0131856 0.0320497
+0.0195888 0.104037 -0.333333 0 0 1
+-0.5 -0.0372312 -0.243433 1 0 0
+0.00918256 0.371795 0.00404088 0 1 0
+0.448718 -0.340277 -0.272427 1 0 0
+0.146942 0.294872 -0.258373 0.233102 0.972114 -0.0256718
+0.2039 0.0163696 0.321545 -0.611937 -0.152991 0.775969
+-0.5 0.278552 0.141907 1 0 0
+-0.141154 -0.354867 -0.0448137 1 0 0
+0.184755 -0.371795 -0.247178 0 1 0
+-0.258339 0.266418 0.320513 0 0 1
+-0.5 0.314219 0.0723602 1 0 0
+0.177055 0.294872 0.0467711 0 1 0
+-0.43101 -0.371795 -0.157065 0 1 0
+-0.17258 0.371795 0.174193 0 1 0
+-0.27048 -0.371795 0.158248 0 1 0
+0.5 0.0400812 0.0859305 1 0 0
+0.028677 0.210837 -0.333333 0 0 1
+-0.141154 -0.342933 -0.0468479 1 0 0
+0.385924 -0.371795 0.0274626 0 1 0
+0.429512 0.120724 0.320513 0 0 1
+-0.316897 0.371795 0.0074529 0 1 0
+0.141109 -0.30832 -0.184361 1 0 0
+-0.0430663 -0.0880813 0.320513 0 0 1
+-0.196725 -0.297207 -0.371795 0 0 1
+0.471696 0.294872 0.236006 0 1 0
+0.464578 -0.175149 -0.371795 0 0 1
+0.095369 -0.294872 0.111752 0 1 0
+0.226551 -0.371795 -0.249383 0 1 0
+0.5 0.226096 -0.19765 1 0 0
+-0.384342 0.00202349 0.366142 0.949389 -0.08382 -0.302712
+0.5 -0.155443 0.165242 1 0 0
+-0.5 0.273109 0.0859548 1 0 0
+-0.476226 -0.294872 0.128646 0 1 0
+-0.448718 -0.307275 0.222523 1 0 0
+0.5 0.232614 0.0512839 1 0 0
+-0.408117 -0.0512089 0.320513 0 0 1
+-0.237281 -0.04302 -0.301963 0.174764 0.984587 -0.00670374
+0.0393341 -0.195682 0.320513 -0.183959 0.610719 0.770183
+-0.5 0.191418 -0.305186 1 0 0
+-0.320513 0.0673138 -0.351802 1 0 0
+-0.113522 0.112025 -0.333333 0 0 1
+-0.215311 0.0627604 0.371795 0 0 1
+0.043375 0.200146 0.324378 0.135571 0.927703 -0.347833
+0.475423 0.247817 -0.371795 0 0 1
+-0.118056 -0.274309 -0.371795 0 0 1
+0.152805 -0.371795 -0.222838 0.0467469 0.998876 0.00779594
+-0.258874 0.201557 0.371795 0 0 1
+-0.164636 0.371795 0.192859 0 1 0
+-0.370668 -0.0814209 0.370067 0.723559 0.201835 -0.660095
+0.141109 -0.304336 0.247069 0.995675 0.0926672 0.00666513
+-0.0320884 0.216323 -0.333333 0 0 1
+0.200591 0.023702 -0.325918 -0.646534 0.707677 0.284933
+-0.112583 0.320148 -0.371795 0 0 1
+0.218459 -0.328611 -0.371795 0 0 1
+0.317332 -0.174841 -0.354397 0.959662 -0.281157 0
+0.217038 -0.371795 -0.0620839 0 1 0
+-0.221727 0.33768 -0.371795 0 0 1
+-0.314438 0.371795 -0.333913 0 1 0
+0.217886 -0.371795 0.0860631 0 1 0
+0.147217 -0.23052 0.371795 0 0 1
+0.438897 0.294872 0.161189 0 1 0
+-0.5 0.00684802 0.185433 1 0 0
+-0.238193 -0.370785 -0.371795 -0.00831809 0.499903 0.866042
+-0.5 0.309963 -0.275207 1 0 0
+-0.437929 -0.371795 -0.188155 0 1 0
+-0.141154 -0.324491 -0.242189 1 0 0
+-0.150794 -0.00650813 -0.333333 0 0 1
+-0.398972 0.162599 0.320513 0 0 1
+0.160071 0.177123 -0.333333 0 0 1
+0.30147 0.294872 -0.0693699 0 1 0
+-0.170506 0.230897 -0.334891 0.255655 0.541291 0.801027
+0.09646 -0.142669 -0.333333 0 0 1
+0.128783 0.213927 0.371795 0 0 1
+0.0190949 -0.256282 0.32116 0.112707 0.754745 -0.646264
+-0.0881377 0.00847938 -0.333333 0 0 1
+-0.5 0.157709 -0.0117641 1 0 0
+-0.5 -0.0733842 0.231653 1 0 0
+0.232512 0.294872 0.292487 0 1 0
+-0.368163 0.179911 -0.371795 0 0 1
+0.208248 0.0310049 -0.105168 -0.569355 0.822082 -0.00396938
+0.0948419 -0.294872 0.220054 0 1 0
+-0.264102 0.0280783 -0.0364565 -0.567434 0.630554 0.529547
+0.0884368 0.371795 0.293534 0 1 0
+0.246738 0.226532 0.362725 0.478785 0.87688 0.042957
+0.207904 0.0863624 0.371795 0 0 1
+0.5 0.26749 0.225404 1 0 0
+-0.416533 0.171004 0.320513 0 0 1
+-0.206992 -0.371795 0.259307 0 1 0
+-0.385938 -0.371795 0.274729 0 1 0
+0.5 0.236612 -0.245486 1 0 0
+-0.46603 -0.294872 -0.0839744 0 1 0
+-0.485734 -0.294872 0.0995365 0 1 0
+-0.253473 -0.344498 -0.371795 0 0 1
+0.5 -0.275338 0.075433 1 0 0
+-0.228825 0.0058947 0.371795 0 0 1
+0.493516 -0.294872 -0.35588 -0.279256 0.960019 -0.0194852
+-0.159278 0.371795 -0.0598298 0 1 0
+-0.0802801 0.371795 0.0880353 0 1 0
+0.162009 0.294872 0.117066 0 1 0
+0.030769 0.200771 -0.333333 0 0 1
+0.34634 -0.310732 0.320513 0 0 1
+-0.232018 0.371795 -0.294127 0 1 0
+0.173761 0.294872 0.200359 0 1 0
+0.241926 -0.371795 -0.0591427 0 1 0
+0.5 0.271727 -0.0813712 1 0 0
+0.328868 -0.0989668 -0.371795 0.242294 0.0891725 0.966096
+-0.107757 0.371795 0.0639031 0 1 0
+-0.0412799 0.128484 -0.333333 0 0 1
+-0.248537 0.0625165 0.371795 0 0 1
+-0.22 0.371795 0.0801531 0 1 0
+0.428978 0.294872 0.0235403 0 1 0
+-0.5 -0.0144837 -0.173291 1 0 0
+0.339129 0.294872 0.274942 0 1 0
+0.220765 -0.371795 -0.199301 0 1 0
+0.147519 0.155898 0.371795 -0.00965305 -0.0213065 0.999726
+-0.112698 -0.0999704 0.320513 0 0 1
+-0.304151 -0.0299231 0.371795 0 0 1
+-0.5 0.358091 -0.217855 0.999871 -0.015984 0.00177235
+0.0160546 -0.104507 -0.333333 0 0 1
+-0.137272 0.343904 0.320513 0 0 1
+0.0716059 0.100818 0.320513 0 0 1
+0.111692 -0.294872 0.278438 0 1 0
+0.489066 -0.169326 -0.371795 0 0 1
+-0.0948993 0.371795 0.225394 0 1 0
+0.376276 -0.251439 -0.371795 0 0 1
+-0.273549 -0.14528 0.371795 0 0 1
+-0.222295 -0.371795 0.0474279 0 1 0
+-0.364065 0.099123 0.329654 0.935527 -0.353255 0
+0.241544 -0.30777 0.320513 0 0 1
+0.5 0.270337 0.0617833 1 0 0
+-0.5 -0.0805431 -0.0209157 1 0 0
+0.0824276 -0.294872 0.251324 0 1 0
+-0.432257 0.371795 -0.367834 0.101584 0.788152 -0.60704
+0.49489 0.00467548 -0.371795 -0.321783 -0.0313936 0.946293
+0.141026 0.35577 0.0578893 1 0 0
+-0.194964 -0.21686 -0.333333 0 0 1
+0.5 0.0206682 -0.288636 1 0 0
+-0.5 0.331725 -0.353159 1 0 0
+-0.319391 -0.371795 -0.306445 0 1 0
+-0.257179 0.161318 -0.333333 0 0 1
+0.5 -0.173223 0.0208777 1 0 0
+0.122735 0.371795 -0.0333153 0 1 0
+0.0321281 0.0622091 0.320513 0 0 1
+0.378033 0.294872 0.10731 0 1 0
+0.316456 0.23028 -0.371795 0 0 1
+0.0343806 0.355774 -0.371795 0 0 1
+-0.394253 -0.371795 0.00869183 0 1 0
+-0.0242726 0.371795 0.236067 0 1 0
+-0.215813 0.154505 0.371795 0 0 1
+0.0617706 0.163405 0.320513 0 0 1
+-0.273959 -0.00457156 -0.129234 0.995527 0.094371 0.00438779
+-0.291366 0.153286 0.371795 0 0 1
+-0.0857975 -0.256282 0.362175 -0.0293179 0.995638 -0.0885721
+0.5 -0.0280021 0.135297 1 0 0
+-0.187953 -0.00798532 -0.199704 0.979195 -0.201122 0.0269752
+0.0143505 -0.113236 -0.333333 0 0 1
+-0.487768 -0.294872 0.0556855 0 1 0
+0.200491 -0.0235586 -0.093857 0.770706 0.637192 0
+-0.157238 -0.162433 -0.333333 0 0 1
+0.5 0.1186 -0.303813 1 0 0
+-0.499218 0.127001 -0.371795 0.704363 0.0806209 0.705247
+0.461872 0.0700549 -0.371795 0 0 1
+-0.269664 0.0193388 -0.227946 0.884403 -0.46651 0.0141085
+0.122315 0.302835 0.320513 0 0 1
+0.277242 -0.287768 -0.371795 0 0 1
+-0.129102 -0.217277 0.371795 0 0 1
+0.216238 0.294872 -0.278644 0 1 0
+0.378405 0.294872 0.306515 0 1 0
+0.461933 0.115708 -0.371795 0 0 1
+-0.279282 0.371795 0.175422 0 1 0
+0.0292172 -0.18699 -0.333333 0 0 1
+0.193078 -0.179737 -0.333333 0 0 1
+0.5 0.194927 0.106274 1 0 0
+0.5 -0.0743456 -0.221097 1 0 0
+-0.203898 -0.12575 0.371795 0 0 1
+0.371185 0.194355 -0.371795 0 0 1
+-0.23143 -0.371795 -0.297437 0 1 0
+0.426584 0.116143 0.320513 0 0 1
+-0.396387 -0.26838 0.320513 0 0 1
+0.5 0.138338 -0.0478194 1 0 0
+0.190987 -0.371795 0.169969 0 1 0
+0.5 0.270493 0.289744 1 0 0
+-0.467267 0.371795 -0.0898524 0 1 0
+-0.0212 -0.165813 0.320513 0 0 1
+-0.200692 0.181475 0.371795 0 0 1
+-0.315502 -0.371795 0.0724075 0 1 0
+-0.156923 -0.371795 -0.0516912 0 1 0
+0.5 -0.0708012 0.0373771 1 0 0
+-0.5 -0.268772 -0.186818 1 0 0
+0.462932 -0.194178 -0.371795 0 0 1
+0.131218 -0.157081 0.339805 -0.614233 0.789125 0
+-0.35241 0.371795 -0.0477547 0 1 0
+0.156562 0.230477 -0.333333 0.0235466 0.931081 0.364051
+0.5 0.0142536 -0.243553 1 0 0
+-0.120212 0.371795 -0.0914744 0 1 0
+0.220282 -0.371795 0.0223555 0 1 0
+0.0359113 0.230897 -0.356907 0 1 0
+0.320513 -0.0547674 -0.3485 1 0 0
+-0.117766 -0.294872 -0.315578 0 1 0
+-0.398243 -0.371795 0.245697 0 1 0
+0.115348 0.371795 -0.039972 0 1 0
+-0.0111121 -0.197238 -0.333333 0 0 1
+0.275342 -0.283947 -0.371795 0 0 1
+0.5 -0.107224 0.289229 1 0 0
+0.440854 0.294872 -0.349813 0 1 0
+-0.5 0.0339133 -0.31716 1 0 0
+0.463877 -0.294872 -0.167653 0 1 0
+0.428718 0.222486 0.320513 0 0 1
+0.383044 0.184456 0.320513 0 0 1
+-0.2156 0.371795 -0.349705 0 1 0
+-0.0301793 0.0598929 -0.333333 0 0 1
+0.295168 0.255995 0.320513 0 0 1
+-0.483847 -0.167743 -0.371795 0 0 1
+0.399042 0.294872 0.261245 0 1 0
+0.00979944 0.199433 0.320513 -0.105563 -0.352941 0.929672
+-0.5 0.255071 0.270521 1 0 0
+-0.448718 -0.344658 -0.289752 1 0 0
+0.105761 0.230897 -0.354509 0 1 0
+-0.472333 -0.294872 0.275234 0 1 0
+-0.199863 -0.371795 -0.0969088 0 1 0
+0.5 0.2908 0.113894 0.98843 0.146405 -0.0396384
+-0.169143 -0.252702 0.336462 0.183619 0.982998 0
+0.374062 0.294872 0.233605 0 1 0
+-0.196124 -0.371795 -0.196706 0 1 0
+-0.5 -0.186486 -0.0231502 1 0 0
+0.141109 -0.312874 0.132263 1 0 0
+-0.5 0.10916 0.27375 1 0 0
+0.5 0.258943 -0.0202215 1 0 0
+-0.5 -0.228637 -0.198403 1 0 0
+0.31273 0.294872 -0.322207 0 1 0
+0.255417 0.294872 -0.33248 0 1 0
+-0.412227 0.371795 0.000774815 0 1 0
+0.0457766 -0.159559 -0.333333 0 0 1
+0.0075479 0.265543 0.320513 -0.0470992 0.116558 0.992067
+-0.297298 0.169486 -0.333333 0 0 1
+0.5 0.285285 -0.245666 1 0 0
+0.5 -0.0113746 -0.112043 1 0 0
+-0.201031 0.0394163 0.365507 0.923317 0 0.38404
+0.325421 -0.371795 0.31468 0.0108855 0.992756 -0.119655
+0.0870024 -0.294872 -0.338719 0 1 0
+-0.431261 0.264343 0.320513 0 0 1
+-0.360866 -0.0717846 0.371795 0 0 1
+-0.5 0.221635 -0.0135596 1 0 0
+-0.129744 -0.294872 0.063337 0 1 0
+-0.5 0.0946912 0.113402 1 0 0
+0.39817 0.0253728 0.320513 0 0 1
+0.5 0.12526 -0.100599 1 0 0
+0.5 0.0832945 0.0204719 1 0 0
+0.0776488 0.254938 0.371795 0.0209713 0.39649 0.917799
+0.237414 -0.371795 0.0674106 0 1 0
+-0.448718 -0.360038 0.142438 1 0 0
+0.212003 -0.0781707 -0.333333 0 0 1
+-0.0810721 0.357433 0.320513 0 0 1
+-0.5 0.294507 0.128956 1 0 0
+-0.271102 -0.145504 -0.333333 0 0 1
+-0.5 0.0950412 0.000284053 1 0 0
+0.281285 -0.220949 -0.344612 -0.488152 0.872599 -0.0167251
+0.141026 0.322036 -0.122687 1 0 0
+0.0203556 -0.294872 -0.0839615 0 1 0
+-0.0932015 -0.0639859 -0.333333 0 0 1
+0.105779 0.371795 0.198346 0 1 0
+-0.247765 -0.34311 0.320513 0 0 1
+-0.0690777 -0.294872 -0.20959 0 1 0
+0.095717 0.371795 0.237817 0 1 0
+0.195359 0.246999 0.342403 0.235322 0.971913 -0.00284063
+-0.466029 -0.142941 -0.371795 0 0 1
+-0.177893 -0.00390834 -0.333333 0.0728271 -0.0124534 0.997267
+-0.359399 -0.371795 -0.205989 0 1 0
+0.5 -0.180707 -0.0230445 1 0 0
+0.462885 0.294872 -0.0562584 0 1 0
+-0.409563 -0.280355 -0.371795 0 0 1
+0.179934 0.294872 0.208979 0 1 0
+0.2614 0.294872 0.253717 0 1 0
+0.5 0.241101 0.122219 1 0 0
+-0.403752 0.0996828 -0.371795 0 0 1
+0.0736883 -0.294872 0.0386964 0 1 0
+-0.447477 -0.295736 -0.371795 0.392068 0.15357 0.907028
+-0.235392 0.164451 0.371795 0 0 1
+-0.0593434 0.371795 -0.0615717 0 1 0
+0.342489 0.294872 -0.291094 0 1 0
+0.5 -0.19487 -0.154061 1 0 0
+0.267571 -0.0106928 -0.0437729 0.945025 -0.326965 0.00468558
+0.306547 0.0357819 0.371795 0 0 1
+0.0143904 0.318378 0.320513 0 0 1
+-0.0449085 -0.294872 -0.0412104 0 1 0
+-0.0151585 0.150165 -0.333333 0 0 1
+-0.0684819 -0.0228344 -0.333333 0 0 1
+0.233974 0.294872 -0.334475 0 1 0
+0.254092 0.294872 0.0113737 0 1 0
+-0.5 0.146887 -0.357145 1 0 0
+0.5 -0.02565 0.0433214 1 0 0
+0.251052 0.0155449 0.00771096 0.40564 0.333301 0.851097
+-0.267469 0.283592 0.320513 0 0 1
+0.30567 0.0623638 0.371795 0 0 1
+0.0685486 -0.294872 -0.0188688 0 1 0
+0.170139 -0.371795 0.0629364 0 1 0
+0.172033 -0.371795 0.249062 0 1 0
+-0.5 -0.0680341 0.215241 1 0 0
+-0.215317 0.352771 -0.371795 0 0 1
+0.348248 -0.371795 -0.225821 0 1 0
+-0.141154 -0.331807 -0.0507247 1 0 0
+-0.362034 0.371795 -0.356128 0 1 0
+-0.0362653 -0.294872 0.0571666 0 1 0
+0.5 -0.014593 0.138459 1 0 0
+-0.360787 -0.107453 0.368915 0.583148 0.430442 -0.688955
+0.22162 0.294872 -0.0956945 0 1 0
+-0.5 -0.239803 -0.250732 1 0 0
+-0.278415 0.277804 -0.371795 0 0 1
+-0.00913014 0.0358532 0.320513 0 0 1
+0.38279 0.0237264 0.327781 0.969456 0.084289 0.230328
+0.5 -0.0600726 0.0977565 1 0 0
+-0.5 0.0868748 -0.0724215 1 0 0
+-0.299518 -0.206418 -0.333856 -0.338088 -0.450174 0.826462
+0.345808 0.294872 -0.305148 0 1 0
+0.0283427 0.0489425 -0.333333 0 0 1
+0.339298 0.182289 0.320513 0 0 1
+0.380984 0.0763074 -0.371795 0 0 1
+-0.5 0.045825 -0.0160722 1 0 0
+0.407547 -0.371795 0.0787438 0 1 0
+0.456334 0.0572706 -0.371795 0 0 1
+-0.224648 0.0430543 -0.196001 0.152527 0.988299 0
+-0.473498 0.113622 -0.371795 0 0 1
+-0.246032 -0.189846 -0.333333 0 0 1
+0.484169 0.0622822 -0.371795 0 0 1
+-0.266191 -0.0251192 -0.0656032 0.826343 0.563158 -0.00314193
+0.5 0.18402 0.0779395 1 0 0
+0.00709498 0.178526 0.320513 0 0 1
+-0.31456 -0.371795 -0.319357 0 1 0
+-0.448718 -0.318603 0.0522232 1 0 0
+-0.437314 0.340067 0.320513 0 0 1
+-0.418672 0.352125 -0.371795 0 0 1
+0.017639 0.230897 -0.367394 0.072312 0.927531 0.366683
+0.5 0.214041 0.200473 1 0 0
+-0.448718 -0.356104 -0.0718363 1 0 0
+0.233509 0.294872 0.313309 0.027737 0.983592 0.178264
+0.169389 0.294872 -0.0322463 0 1 0
+-0.5 0.28151 -0.341274 1 0 0
+0.0530446 0.159461 -0.333333 0 0 1
+-0.488067 -0.294872 -0.0154908 0 1 0
+0.450893 0.294872 -0.135021 0 1 0
+0.398388 0.294872 -0.0146993 0 1 0
+0.239201 0.0647316 0.371795 0 0 1
+0.330382 0.294872 0.190954 0 1 0
+0.5 -0.267922 -0.292914 1 0 0
+-0.0532294 0.371795 -0.170274 0 1 0
+0.474828 0.0123045 0.320513 0 0 1
+-0.153475 -0.371795 0.0696954 -0.0738349 0.997147 0.0156633
+-0.273389 -0.371795 -0.210291 0 1 0
+0.5 0.163935 -0.0912224 1 0 0
+0.10199 -0.294872 -0.105321 0 1 0
+0.225861 -0.0500857 0.371795 0 0 1
+-0.497799 0.121222 -0.371795 0.258583 0.209237 0.943056
+0.5 -0.272859 -0.0427955 1 0 0
+-0.154377 0.371795 -0.224294 0 1 0
+-0.5 0.0231614 0.278261 1 0 0
+0.409918 0.195918 0.320513 0 0 1
+-0.5 0.0624367 0.0193816 1 0 0
+-0.077012 0.343507 0.320513 0 0 1
+0.392924 -0.205242 0.320513 0 0 1
+0.418531 -0.371795 0.207951 0 1 0
+0.354611 -0.297142 0.320513 0 0 1
+0.0544772 0.371795 -0.065456 0 1 0
+0.0506723 -0.183925 -0.333333 0 0 1
+0.282533 -0.361498 0.320513 0.00270449 -0.107851 0.994163
+0.5 0.111793 -0.224381 1 0 0
+0.454783 0.294872 -0.0760811 0 1 0
+-0.220841 -0.196879 -0.333333 0 0 1
+0.310595 0.28035 0.320513 0 0 1
+0.5 0.0669247 -0.0992083 1 0 0
+0.207041 0.294872 0.268081 0 1 0
+0.254755 -0.140228 0.371795 0 0 1
+-0.309683 -0.0678612 -0.333333 0 0 1
+-0.471615 0.371795 0.0781658 0 1 0
+-0.5 -0.290014 -0.122841 0.978924 0.18708 -0.0819115
+0.364111 -0.371795 -0.267951 0 1 0
+0.5 0.0732479 -0.361913 0.998841 -0.0249323 -0.0411677
+-0.164825 -0.332567 -0.371795 0 0 1
+-0.198926 -0.371795 -0.114878 0 1 0
+-0.5 0.119871 -0.30142 1 0 0
+-0.0889945 0.371795 0.00906231 0 1 0
+-0.448718 -0.347683 -0.0737041 1 0 0
+0.206343 -0.0296704 -0.0891273 0.664489 0.747298 0
+0.141026 0.368095 -0.205844 0.682589 0.729547 0.0428246
+0.398879 0.294872 -0.052015 0 1 0
+-0.5 -0.206183 -0.303924 1 0 0
+-0.449947 0.371795 -0.319055 0 1 0
+0.141026 0.330921 -0.341604 1 0 0
+0.0464676 -0.256282 0.321124 0.0243987 -0.677485 0.735132
+-0.268079 -0.022424 -0.0837788 0.853284 0.521244 0.0145611
+-0.15269 0.131723 -0.333333 0 0 1
+-0.349401 -0.371795 0.301395 0 1 0
+-0.0176106 -0.116987 -0.333333 0 0 1
+0.332021 0.294872 0.0099056 0 1 0
+0.073717 0.371795 -0.143211 0 1 0
+0.28088 0.294872 -0.0413098 0 1 0
+-0.0908864 0.178534 0.320513 0.258073 -0.206533 0.943792
+-0.0716741 0.371795 0.317242 -0.168664 0.90332 0.394418
+-0.371317 0.371795 -0.149133 0 1 0
+0.216388 -0.371795 -0.320218 0 1 0
+0.0682893 0.371795 -0.303547 0 1 0
+-0.106451 0.230897 -0.344129 0.00232502 0.999578 0.0289401
+-0.164121 0.230897 -0.359574 0 1 0
+0.448718 -0.336563 0.204719 1 0 0
+-0.318283 0.0937933 0.371795 0 0 1
+0.257968 0.294872 -0.118718 0 1 0
+-0.5 -0.278239 -0.286467 1 0 0
+0.141026 0.297313 -0.221842 0.775504 0.625138 -0.0882979
+0.141109 -0.330032 -0.0834725 1 0 0
+0.237389 -0.371795 0.0493444 0 1 0
+-0.274406 -0.371795 -0.239352 0 1 0
+-0.292068 0.152068 0.371795 0 0 1
+-0.109488 0.148872 -0.333333 0 0 1
+0.146592 -0.371795 -0.0507439 0.266455 0.960914 -0.0751433
+0.475457 0.294872 0.0861957 0 1 0
+-0.00737385 -0.294872 -0.0492867 0 1 0
+-0.5 -0.160693 0.244127 1 0 0
+-0.0852789 0.12275 -0.333333 0 0 1
+-0.215893 -0.230897 -0.358775 0 1 0
+0.233485 -0.0382239 -0.143474 -0.0707765 0.997492 0
+-0.0259684 -0.143934 0.320513 0 0 1
+0.0232628 0.371795 0.00457604 0 1 0
+-0.5 -0.153443 -0.129172 1 0 0
+-0.481473 -0.0542756 0.320513 0 0 1
+0.143132 -0.146541 0.326607 0.722736 -0.657393 -0.213276
+-0.103054 -0.256282 0.358846 0 1 0
+0.330347 -0.197447 -0.371795 0 0 1
+-0.210944 -0.356406 0.320513 0 0 1
+0.0574013 0.371795 -0.193341 0 1 0
+0.146622 -0.254965 0.341015 -0.0713409 0.997452 0
+-0.156195 -0.157481 -0.333333 0 0 1
+0.443749 -0.371795 -0.2264 -0.362187 0.931213 0.0407697
+0.141109 -0.334492 -0.158672 1 0 0
+-0.0739809 -0.294872 -0.281225 0 1 0
+0.0726767 0.204192 0.371795 0 0 1
+0.00134149 -0.294872 0.27528 0 1 0
+-0.5 0.00449915 -0.307853 1 0 0
+0.0843825 0.0587139 0.320513 0 0 1
+0.471506 -0.260645 -0.371795 0 0 1
+0.5 0.18731 -0.214747 1 0 0
+-0.5 0.263358 -0.242311 1 0 0
+0.224389 -0.307949 0.320513 0 0 1
+0.5 -0.288358 0.102358 0.984662 -0.173664 -0.0167577
+0.192321 -0.000151543 -0.270266 0.999875 0.0143691 -0.00656506
+-0.431291 -0.133148 0.320513 0 0 1
+-0.109417 0.230897 -0.344714 0.00282605 0.999706 0.0240703
+0.5 0.200588 0.0546826 1 0 0
+-0.5 0.338526 -0.0986094 1 0 0
+0.470156 0.294872 -0.0475016 0 1 0
+-0.274082 0.00316951 -0.0457501 0.996086 -0.0808468 -0.0357227
+0.141109 -0.295996 0.181622 0.782686 0.600586 0.163401
+0.410856 -0.0627041 0.320513 0 0 1
+-0.152457 -0.287115 -0.371795 0 0 1
+0.0792218 0.160727 -0.333333 0 0 1
+-0.185531 -0.371795 0.0946336 0 1 0
+-0.047693 -0.247571 0.371795 0.11753 -0.305349 0.944959
+0.5 0.0678295 -0.0992594 1 0 0
+-0.0840933 0.371795 -0.146493 0 1 0
+0.5 0.211503 0.0445473 1 0 0
+-0.43322 0.371795 0.169088 0 1 0
+0.0255864 0.371795 0.225721 0 1 0
+-0.150191 0.17284 0.371795 0 0 1
+-0.5 0.05098 -0.354363 1 0 0
+0.118703 0.263654 0.320513 0.00575866 0.140946 0.990001
+0.104433 0.176072 0.357984 0.475923 0.879487 0
+0.5 0.0666943 0.105322 1 0 0
+-0.488581 -0.213901 -0.371795 0 0 1
+-0.287349 -0.299919 -0.371795 0 0 1
+-0.229621 0.371795 0.25384 0 1 0
+-0.348064 0.227251 0.320513 0 0 1
+0.448718 -0.295284 0.0103071 0.870636 -0.483072 0.0929144
+0.123684 -0.294872 0.0958515 0 1 0
+-0.166397 -0.119305 0.3545 0.837155 0.546966 0
+0.218876 0.106369 0.371795 0 0 1
+0.448718 -0.308166 -0.236699 1 0 0
+-0.340963 -0.371795 0.297748 0 1 0
+0.320393 -0.155348 -0.351679 0.998155 -0.06072 -0.000240518
+0.192679 0.0699669 0.364983 0.939728 0.304103 -0.15631
+-0.141154 -0.306865 0.312244 0.99525 -0.0101019 0.096823
+-0.301849 -0.18787 0.336031 0.703304 0.710889 0
+0.477695 0.294872 -0.00391909 0 1 0
+0.5 -0.0353456 -0.355348 1 0 0
+-0.469144 0.0879524 -0.371795 0 0 1
+0.141109 -0.309252 0.093331 1 0 0
+0.141026 0.317405 0.132329 1 0 0
+0.40004 -0.295373 -0.371795 0 0 1
+-0.141157 0.0893077 0.320513 0 0 1
+0.486174 -0.294872 0.120987 0 1 0
+-0.5 0.185878 -0.31625 1 0 0
+-0.144789 -0.371795 -0.225276 -0.575352 0.815687 0.060208
+-0.297218 -0.371795 -0.148954 0 1 0
+-0.378254 -0.120703 0.320513 0 0 1
+0.5 -0.266704 -0.0993076 1 0 0
+-0.5 0.314587 0.0364647 1 0 0
+0.199577 0.0451557 0.369257 0.908359 0.235146 -0.34582
+0.106571 -0.294872 -0.194948 0 1 0
+0.17018 -0.0985762 -0.333333 0 0 1
+0.134283 -0.294872 -0.275394 0.118343 0.992653 -0.025215
+0.258037 -0.371795 0.232509 0 1 0
+-0.186508 0.371795 -0.299936 0 1 0
+-0.304597 -0.371795 -0.0759223 0 1 0
+-0.151632 -0.371795 0.126702 -0.0486858 0.998769 0.00951695
+0.396928 -0.371795 0.237342 0 1 0
+-0.173851 -0.371795 -0.0859954 0 1 0
+0.26212 0.228777 0.320513 0.0491416 0.0927562 0.994475
+-0.179051 0.371795 0.129645 0 1 0
+-0.5 -0.210087 -0.119321 1 0 0
+0.0869626 0.371459 0.320513 0.107108 0.528106 0.842397
+0.19248 -0.18681 0.371795 0 0 1
+-0.0953368 -0.0276479 0.320513 0 0 1
+-0.189701 0.371795 0.102635 0 1 0
+-0.5 0.148943 0.103804 1 0 0
+0.5 0.232266 0.149253 1 0 0
+-0.122818 -0.16362 0.33518 0.61423 0.789127 0
+-0.141154 -0.318184 -0.221269 1 0 0
+0.320513 -0.0452056 -0.364487 0.957034 0.0849092 0.277264
+-0.128519 -0.0554625 0.320513 0 0 1
+-0.311014 0.248351 -0.371795 0 0 1
+-0.153623 0.181527 -0.333333 0 0 1
+-0.198823 -0.0481338 0.357556 0.969404 0.245473 0
+0.152505 -0.352653 -0.371795 0 0 1
+-0.0016691 -0.294872 -0.226272 0 1 0
+-0.320513 -0.135072 -0.361013 1 0 0
+0.263028 -0.371795 -0.0735619 0 1 0
+-0.351496 -0.371795 0.0362207 0 1 0
+-0.0270118 0.228098 -0.333333 -0.133652 0.626958 0.767503
+0.18077 -0.371795 -0.207173 0 1 0
+-0.5 -0.0643235 -0.0537185 1 0 0
+0.0772635 0.105881 0.320513 0 0 1
+0.144596 0.240579 0.371795 0 0 1
+-0.5 -0.131659 0.0388962 1 0 0
+0.0697498 0.0892419 -0.333333 0 0 1
+0.15133 0.259262 0.320513 -0.00325965 0.339147 0.940728
+-0.414074 0.0828028 -0.371795 0 0 1
+0.258462 0.202189 -0.333333 0 0 1
+0.242962 0.294872 -0.257785 0 1 0
+-0.0874526 0.218329 -0.333333 0 0 1
+0.284565 -0.0226923 0.371795 0 0 1
+-0.0580762 -0.250696 -0.371795 0 0 1
+0.203533 0.0208018 0.332169 0.99658 0.0826302 2.75932e-005
+0.269015 0.00246372 -0.0576957 0.999048 0.0412952 -0.0140731
+0.354167 -0.371795 0.308705 0 1 0
+-0.378422 -0.371795 0.221461 0 1 0
+0.078429 -0.0610505 -0.333333 0 0 1
+-0.429364 -0.371795 0.0199764 0 1 0
+-0.103354 0.235341 0.371795 0 0 1
+-0.380234 -0.371795 -0.161571 0 1 0
+0.423915 -0.14688 0.320513 0 0 1
+0.5 -0.0408959 0.154117 1 0 0
+-0.298211 -0.191508 0.34314 0.667497 0.744542 0.010257
+-0.5 -0.227264 -0.324311 1 0 0
+-0.14867 -0.371795 0.273853 -0.0277642 0.99961 -0.00287101
+0.198493 -0.0494378 0.34447 0.969402 -0.245477 0
+0.141026 0.338201 0.134259 1 0 0
+0.112486 0.369704 -0.371795 -0.0333763 -0.591225 0.805816
+-0.187493 -0.00358149 -0.266499 0.99839 -0.0566781 -0.00225789
+0.344629 -0.137044 0.355903 0.857627 -0.514258 0.00394166
+0.464721 0.157526 0.320513 0 0 1
+-0.31248 0.0517219 -0.333333 -0.340306 -0.101012 0.934874
+-0.5 -0.0448891 0.293295 1 0 0
+-0.274584 -0.101889 -0.333333 0 0 1
+0.404746 0.294872 -0.192025 0 1 0
+-0.387678 -0.15394 -0.371795 0 0 1
+-0.274156 0.00232055 -0.211714 0.99953 -0.0299791 -0.00643398
+0.0194678 0.0663259 -0.333333 0 0 1
+0.448718 -0.313515 -0.182787 1 0 0
+0.201168 0.0167202 0.320513 -0.328989 -0.153755 0.931733
+-0.158569 -0.371795 -0.0686658 0 1 0
+0.5 0.0176052 0.025817 1 0 0
+-0.5 0.22755 -0.3067 1 0 0
+-0.440331 0.371795 0.199557 0 1 0
+-0.448718 -0.356688 0.206907 1 0 0
+0.441322 -0.187524 0.320513 0 0 1
+0.449027 0.294872 -0.116793 0 1 0
+-0.340601 0.371795 0.0394539 0 1 0
+-0.194134 -0.371795 0.299289 0 1 0
+-0.326442 0.0950695 -0.371795 -0.464001 0.0474033 0.884565
+-0.150136 -0.0845331 0.320513 0 0 1
+0.113653 -0.294872 -0.356838 0 1 0
+0.5 0.259976 0.27327 1 0 0
+-0.396738 0.371795 -0.181565 0 1 0
+0.5 -0.0708537 -0.0906658 1 0 0
+-0.5 -0.200607 -0.290753 1 0 0
+-0.5 0.0598984 0.0776134 1 0 0
+-0.5 0.355027 0.03938 1 0 0
+0.141026 0.340355 -0.072884 1 0 0
+0.5 0.15754 -0.305455 1 0 0
+0.5 0.115421 0.0833311 1 0 0
+-0.225185 -0.371795 -0.218982 0 1 0
+-0.24633 -0.226755 0.352751 0.479253 0.877677 0
+-0.393527 0.371795 -0.270598 0 1 0
+0.5 0.231785 0.112871 1 0 0
+-0.18452 0.371795 -0.22761 0 1 0
+0.0535341 0.215942 -0.333333 0 0 1
+0.183669 -0.249542 0.361586 -0.212566 0.977147 0
+0.5 0.00622572 0.256268 1 0 0
+-0.283268 0.228896 -0.371795 -0.157312 0.0920447 0.98325
+0.0788471 -0.294872 -0.253402 0 1 0
+-0.5 -0.00672725 -0.0672488 1 0 0
+0.0315839 -0.0614393 0.320513 0 0 1
+-0.5 0.361141 -0.329931 1 0 0
+0.141026 0.311284 0.216317 1 0 0
+0.353626 -0.120567 0.358935 0.87768 -0.479248 0
+0.0477202 -0.148571 -0.333333 0 0 1
+0.5 -0.167349 0.278091 1 0 0
+0.5 0.268618 0.315236 0.988621 0.0518773 0.1412
+-0.369063 -0.371795 -0.231025 0 1 0
+0.0196573 0.371795 -0.096392 0 1 0
+0.410387 0.294872 -0.131237 0 1 0
+0.141109 -0.318451 -0.0411088 1 0 0
+-0.190214 0.371795 -0.248076 0 1 0
+0.0789065 -0.294872 -0.0916742 0 1 0
+-0.5 0.180772 -0.103454 1 0 0
+-0.00951916 -0.237755 0.371795 0 0 1
+-0.249705 -0.371795 -0.0412915 0 1 0
+0.241213 -0.353927 0.320513 0 0 1
+-0.403083 -0.371795 0.181619 0 1 0
+-0.33118 -0.111071 -0.371795 0 0 1
+-0.0374017 0.371795 -0.139998 0 1 0
+0.192664 0.0040753 -0.0126924 0.994411 -0.105574 0
+0.145686 -0.275219 -0.371795 0 0 1
+0.5 0.140963 -0.370954 -0.36342 0.0238583 0.93132
+0.0324867 -0.294872 0.137465 0 1 0
+-0.448718 -0.307979 0.302353 1 0 0
+-0.0321791 -0.294872 0.305037 0 1 0
+-0.5 0.0334513 0.240079 1 0 0
+-0.5 -0.0104754 0.176127 1 0 0
+-0.370213 -0.371795 0.124063 0 1 0
+0.5 0.0715064 -0.125046 1 0 0
+0.5 -0.178519 0.129545 1 0 0
+0.101504 -0.256282 0.33515 0 1 0
+0.0147811 -0.294872 0.147322 0 1 0
+0.431665 -0.061037 -0.371795 0 0 1
+-0.5 -0.178918 -0.131714 1 0 0
+0.5 -0.0228324 0.0854451 1 0 0
+0.00178593 0.371795 -0.35581 0 1 0
+-0.5 0.195478 0.0560218 1 0 0
+0.448718 -0.307088 -0.330681 1 0 0
+0.424268 -0.189729 0.320513 0 0 1
+-0.129045 -0.294872 -0.272545 0 1 0
+0.236205 0.294872 0.160903 0 1 0
+-0.5 -0.0930479 -0.218789 1 0 0
+0.116904 0.212848 -0.333333 0 0 1
+0.244775 -0.371795 0.26913 0 1 0
+0.0893005 0.371795 -0.104237 0 1 0
+0.235492 -0.371795 -0.100829 0 1 0
+0.470119 0.116359 0.320513 0 0 1
+-0.5 -0.208277 0.0255582 1 0 0
+0.141109 -0.342889 -0.176081 1 0 0
+0.112081 -0.294872 0.202737 0 1 0
+0.14303 -0.371795 -0.178278 0.480394 0.877024 0.00708434
+-0.191409 -0.0820026 0.371795 0.0380057 0.0545318 0.997788
+-0.171985 -0.371795 -0.0230907 0 1 0
+0.5 -0.227186 -0.0946863 1 0 0
+-0.5 -0.231017 0.186599 1 0 0
+-0.0360467 0.286283 -0.371795 0 0 1
+-0.258165 -0.371795 -0.00677066 0 1 0
+0.148006 -0.371795 -0.218278 0.1776 0.983148 -0.0433366
+-0.187802 -0.00711068 -0.280816 0.987886 -0.155174 -0.00127482
+-0.135875 0.0949562 -0.333333 0 0 1
+0.101104 0.371795 -0.162963 0 1 0
+-0.0470172 0.371795 -0.291499 0 1 0
+-0.167908 -0.307705 0.320513 0 0 1
+-0.148591 -0.371795 -0.235507 -0.143114 0.989273 -0.0292898
+0.373585 -0.0736004 0.322579 0.814558 -0.30978 0.49044
+-0.0571077 -0.294872 -0.371119 0.080761 0.951629 0.296444
+0.0849681 0.186606 0.364157 0.391242 0.884359 -0.254635
+0.5 -0.228482 -0.30438 1 0 0
+0.314113 -0.0761803 0.371795 0 0 1
+-0.284609 0.239107 0.320513 0 0 1
+0.25 0.294872 0.022798 0 1 0
+-0.248985 -0.215401 0.371795 -0.000804795 -0.0596537 0.998219
+0.153805 0.294872 0.212545 0 1 0
+-0.5 0.112043 0.168029 1 0 0
+-0.0899727 0.256282 0.333033 0 1 0
+-0.5 0.201574 -0.220372 1 0 0
+-0.228121 -0.340885 0.320513 0 0 1
+-0.155818 0.336031 -0.371795 0 0 1
+-0.216631 0.23985 0.36576 -0.390256 0.913215 0.117213
+0.278852 0.294872 0.0290296 0 1 0
+-0.5 -0.103208 -0.19121 1 0 0
+0.101279 0.092145 -0.333333 0 0 1
+0.499638 -0.294872 0.0767372 -0.647018 0.760014 0.0612123
+0.5 -0.0561789 -0.217493 1 0 0
+0.12902 -0.294872 0.219025 0 1 0
+0.243341 -0.371795 -0.0990697 0 1 0
+0.141109 -0.353143 -0.195437 1 0 0
+0.5 0.134383 -0.183097 1 0 0
+-0.141778 0.371795 -0.314076 0 1 0
+0.183503 -0.142955 -0.333333 0 0 1
+-0.420029 0.125182 -0.371795 0 0 1
+-0.311153 -0.0263074 0.371795 0 0 1
+0.5 0.181246 -0.190862 1 0 0
+0.0883795 0.371795 -0.000620594 0 1 0
+0.5 0.270636 0.260007 1 0 0
+-0.277511 -0.0522601 0.371795 0 0 1
+0.349257 -0.194751 0.320513 0 0 1
+0.325676 0.148203 0.371795 0.0155725 -0.00234667 0.999876
+0.00476976 0.371795 -0.0833771 0 1 0
+0.306116 -0.275534 -0.371795 0 0 1
+0.139356 0.371795 -0.242 0.658121 0.750745 -0.0570901
+0.155042 -0.181471 -0.333333 0 0 1
+0.00383388 0.230897 -0.360772 0 1 0
+-0.417707 0.371795 0.21591 0 1 0
+-0.254671 -0.0892126 0.371795 0 0 1
+0.5 -0.112722 -0.243046 1 0 0
+0.141109 -0.319929 -0.371171 0.53343 -0.00762382 0.84581
+0.267804 -0.00982277 -0.171747 0.956843 -0.290466 -0.00899671
+0.378183 0.0727412 0.320513 0.815223 0 0.579147
+-0.181122 0.242795 -0.371795 0.00122172 0.0201693 0.999796
+0.0797754 -0.294872 0.243431 0 1 0
+-0.00841882 0.371795 0.150224 0 1 0
+0.13585 -0.294872 -0.279837 0.408884 0.898409 0.160232
+-0.338504 0.125324 -0.371795 0 0 1
+-0.42272 0.371795 0.18059 0 1 0
+-0.5 -0.199393 -0.205865 1 0 0
+0.251115 0.294872 0.0110592 0 1 0
+-0.0947846 0.100368 -0.333333 0 0 1
+0.5 -0.223433 -0.0805225 1 0 0
+0.448718 -0.352009 -0.1806 1 0 0
+-0.332872 -0.371795 -0.0708381 0 1 0
+-0.141154 -0.299478 -0.00793793 0.928434 -0.369231 -0.0409787
+0.5 -0.248065 -0.0826253 1 0 0
+0.0537247 -0.163205 0.320513 0 0 1
+-0.5 0.360948 0.108233 1 0 0
+0.30855 0.294872 -0.0807918 0 1 0
+0.5 -0.09909 -0.185797 1 0 0
+-0.5 -0.0396363 -0.0705783 1 0 0
+-0.314016 -0.134157 0.371795 0 0 1
+0.28255 -0.371795 0.176998 0 1 0
+-0.4527 -0.0563505 0.320513 0 0 1
+0.403514 -0.371795 0.0473897 0 1 0
+0.194884 0.0137065 -0.210822 0.914109 -0.405392 0.00785169
+0.16807 0.294872 -0.298983 0 1 0
+0.5 -0.153813 0.00925518 1 0 0
+0.5 -0.108408 -0.28935 1 0 0
+-0.5 0.223603 0.0488558 1 0 0
+-0.00444743 0.371795 -0.0973511 0 1 0
+0.309274 0.177168 0.371795 0.416297 0.568571 0.709524
+0.0342471 0.371795 0.0183707 0 1 0
+-0.23931 -0.371795 -0.0132199 0 1 0
+-0.281897 -0.371795 -0.0992968 0 1 0
+-0.436293 0.327094 -0.371795 0 0 1
+-0.448718 -0.326898 -0.0418503 1 0 0
+-0.191988 0.230897 -0.353121 0 1 0
+-0.000149338 -0.294872 0.133122 0 1 0
+-0.394962 0.328474 -0.371795 0 0 1
+0.345762 -0.371795 0.105021 0 1 0
+0.448718 -0.325013 -0.340595 1 0 0
+0.463372 -0.257792 0.320513 0 0 1
+-0.195114 -0.00143828 -0.0305643 0.493546 -0.0271862 0.869295
+0.00273507 -0.0748983 0.320513 0 0 1
+0.0486635 0.371795 0.269418 0 1 0
+-0.28047 0.242775 -0.371795 0 0 1
+0.20356 -0.281937 -0.371795 0 0 1
+0.291086 -0.371795 -0.109511 0 1 0
+0.328554 -0.371795 0.221751 0 1 0
+0.140889 -0.0394625 0.320513 0 0 1
+-0.462186 0.371795 -0.3607 0.00130372 0.994676 -0.10304
+0.102818 -0.176946 0.344199 -0.479327 0.877637 0
+-0.266275 0.371795 0.220649 0 1 0
+-0.364768 0.371795 -0.035523 0 1 0
+0.5 -0.257569 0.0676937 1 0 0
+-0.167615 -0.0952089 0.320513 0 0 1
+0.5 0.150276 -0.21907 1 0 0
+0.28902 0.284575 -0.371795 -0.000423965 -0.0941217 0.995561
+-0.488648 0.0981453 -0.371795 0.0881044 -0.0239782 0.995823
+0.346374 -0.371795 -0.363055 0.00394489 0.999947 0.00951265
+0.394583 0.171183 -0.371795 0 0 1
+-0.0494196 0.00836259 -0.333333 0 0 1
+0.199588 0.294872 -0.145695 0 1 0
+-0.21498 0.0405501 -0.31566 0.313019 0.949739 -0.00390247
+0.197382 -0.0190604 -0.0475862 0.84813 0.52976 -0.00549009
+0.286753 0.0947298 0.371795 0 0 1
+0.00676232 0.256282 0.353657 0 1 0
+0.269023 0.00237729 -0.239696 0.999944 -0.00716631 0.00775486
+0.5 0.275818 -0.243075 1 0 0
+-0.5 -0.0463567 0.105351 1 0 0
+0.227492 -0.026566 0.00697529 -0.0351287 -0.507042 0.861205
+-0.390379 -0.371795 -0.323984 0 1 0
+-0.261239 0.226445 -0.333333 -0.0643937 0.580621 0.811624
+0.141109 -0.344626 -0.337812 1 0 0
+-0.279669 -0.370922 -0.371795 -0.0453089 0.704445 0.708311
+-0.5 -0.144091 -0.254887 1 0 0
+0.476922 -0.294872 0.109919 0 1 0
+0.5 -0.221655 0.208696 1 0 0
+-0.378497 -0.0574205 0.320513 -0.439904 -0.307736 0.843672
+-0.5 -0.215866 0.16451 1 0 0
+-0.123567 0.230897 -0.334632 -0.182737 0.720099 0.669377
+-0.5 -0.216172 -0.0617939 1 0 0
+0.5 0.0367648 -0.0332882 1 0 0
+-0.187562 0.0043698 -0.244168 0.990662 0.136258 -0.00469816
+0.403586 -0.0122554 0.320513 0 0 1
+0.160489 0.294872 0.316545 0.0823034 0.850659 0.519236
+-0.12175 0.371795 -0.182752 0 1 0
+-0.195453 -0.134169 0.371795 0 0 1
+0.196373 0.294872 0.225977 0 1 0
+0.0338977 0.222074 -0.333333 0.0248872 0.137051 0.990251
+-0.5 0.290227 0.275158 1 0 0
+-0.24128 0.0556938 -0.333333 0 0 1
+-0.240223 0.342186 0.320513 0 0 1
+0.5 0.134236 -0.00696559 1 0 0
+0.5 -0.23485 0.0252392 1 0 0
+-0.5 0.179696 0.239326 1 0 0
+-0.014398 -0.294872 -0.235004 0 1 0
+-0.133588 -0.0152296 -0.333333 0 0 1
+-0.484546 -0.294872 0.199704 0 1 0
+-0.361066 0.106941 0.324047 0.733903 -0.536064 -0.41716
+0.088263 -0.265316 -0.371795 0 0 1
+0.0676132 -0.294872 0.136543 0 1 0
+-0.5 0.121212 -0.0755384 1 0 0
+-0.0124191 -0.00948207 -0.333333 0 0 1
+0.396052 0.294872 -0.0344369 0 1 0
+0.407697 -0.371795 0.0713047 0 1 0
+0.0215739 0.371795 -0.122374 0 1 0
+0.5 0.158878 -0.300381 1 0 0
+0.13628 -0.169045 -0.333333 0 0 1
+-0.5 0.205222 -0.1088 1 0 0
+-0.5 0.325164 -0.276266 1 0 0
+-0.5 -0.0463486 0.031245 1 0 0
+0.00924569 0.371795 -0.325342 0 1 0
+0.178031 -0.371795 -0.108186 0 1 0
+-0.155166 0.326736 0.320513 0 0 1
+0.236253 -0.345851 0.320513 0 0 1
+-0.483539 -0.294872 0.258488 0 1 0
+0.5 -0.138673 0.216543 1 0 0
+0.322916 0.0961563 -0.371795 0.571131 0.0786236 0.817085
+-0.203397 -0.0224434 0.366201 0.969833 0.0825471 0.22937
+0.5 -0.0817186 -0.182634 1 0 0
+-0.311437 0.301868 -0.371795 0 0 1
+0.42189 -0.0627811 -0.371795 0 0 1
+0.5 0.0693851 -0.229879 1 0 0
+0.5 0.109198 -0.142984 1 0 0
+0.293329 -0.265002 -0.371795 0 0 1
+-0.5 0.286951 0.0830889 1 0 0
+-0.5 -0.0745629 0.174512 1 0 0
+-0.37117 0.371795 0.0947479 0 1 0
+-0.0645739 0.217347 -0.333333 0 0 1
+-0.276881 -0.182477 -0.333333 0 0 1
+-0.110949 0.0779095 0.320513 0 0 1
+0.21909 -0.157457 0.371795 0 0 1
+0.39871 -0.286674 -0.371795 0 0 1
+0.0494985 0.371795 -0.272771 0 1 0
+-0.372924 0.371795 -0.198821 0 1 0
+0.000728497 -0.294872 0.213457 0 1 0
+-0.299142 0.371795 0.21725 0 1 0
+-0.0874754 0.370712 -0.371795 -0.0915831 -0.455722 0.885398
+0.0733345 0.365509 -0.371795 0.0362987 -0.352415 0.93514
+0.228133 -0.371795 -0.25453 0 1 0
+0.5 -0.2554 -0.0824945 1 0 0
+0.407636 0.074862 0.320513 0 0 1
+0.0375994 0.067646 -0.333333 0 0 1
+-0.26213 -0.0300497 -0.0964442 0.701734 0.712384 0.0088444
+-0.373182 0.371795 0.25308 0 1 0
+0.339362 0.00444032 -0.371795 0 0 1
+-0.377903 -0.217571 0.320513 0 0 1
+0.5 0.00413313 -0.212817 1 0 0
+-0.5 0.314959 0.0192706 1 0 0
+0.42999 0.294872 0.253155 0 1 0
+0.308163 0.294872 0.00992763 0 1 0
+0.223846 0.294872 -0.143031 0 1 0
+0.5 -0.104721 -0.169903 1 0 0
+-0.335901 0.371795 -0.292052 0 1 0
+0.297429 0.294872 -0.345135 0 1 0
+0.133984 -0.230897 -0.358242 0 1 0
+-0.0881345 -0.294872 0.246416 0 1 0
+0.477285 -0.294872 0.0215163 0 1 0
+0.265674 -0.342054 -0.371795 0 0 1
+0.166325 -0.371795 -0.1616 0 1 0
+0.405912 0.294872 -0.333544 0 1 0
+0.195835 -0.00190799 0.320513 -0.0487972 -0.0130908 0.998723
+-0.392075 -0.0816961 0.320513 0 0 1
+0.42094 -0.323404 -0.371795 0 0 1
+-0.424191 0.0985808 -0.371795 0 0 1
+0.195499 0.0150232 -0.257683 0.919561 -0.392238 0.0235917
+-0.5 -0.182391 -0.197423 1 0 0
+0.0496931 -0.294872 0.140045 0 1 0
+0.415618 0.274018 0.320513 0 0 1
+0.0702755 -0.140666 -0.333333 0 0 1
+0.141026 0.346065 -0.271697 1 0 0
+-0.316713 0.173006 0.357792 0.714161 -0.699969 0.00423639
+-0.5 -0.154043 0.019671 1 0 0
+-0.190514 0.0164228 -0.212567 0.935535 0.35323 0.00169159
+-0.5 -0.176822 0.172039 1 0 0
+-0.5 0.0719938 -0.0745015 1 0 0
+-0.429027 0.371795 0.125553 0 1 0
+-0.313365 0.218274 0.320513 0 0 1
+0.385005 0.197503 -0.371795 0 0 1
+-0.03689 0.282422 -0.371795 0 0 1
+0.428283 -0.348973 0.320513 0 0 1
+-0.270076 -0.371795 -0.0867749 0 1 0
+0.383525 0.294872 -0.354376 0 1 0
+-0.5 -0.132662 -0.237713 1 0 0
+-0.346635 -0.347345 0.320513 0 0 1
+-0.5 -0.0382249 0.0487084 1 0 0
+-0.0547328 -0.294872 0.200744 0 1 0
+-0.354413 -0.371795 -0.363151 0 1 0
+0.15818 0.294872 0.280604 0 1 0
+0.225327 -0.0327607 0.371795 0 0 1
+-0.444351 0.371795 -0.169568 0 1 0
+-0.316414 0.371795 -0.248584 0 1 0
+-0.282366 0.203917 0.364342 -0.588914 0.798734 0.123305
+0.5 -0.152227 0.308735 0.995943 -0.00682911 0.0897304
+0.5 0.286753 -0.175023 0.99025 0.134136 0.0375957
+0.440782 0.076877 -0.371795 0 0 1
+-0.5 -0.0642259 -0.183376 1 0 0
+-0.141154 -0.315281 -0.26838 1 0 0
+0.448718 -0.341684 0.0297338 1 0 0
+0.161562 0.19505 0.371795 0 0 1
+-0.5 0.345247 -0.335416 1 0 0
+0.263954 0.0194079 -0.207127 0.858589 0.512563 -0.010236
+0.315346 -0.102102 -0.333333 0.116053 -0.0725322 0.990591
+0.338513 -0.212383 -0.371795 0 0 1
+-0.0189857 -0.179268 0.320513 0 0 1
+-0.494265 -0.294872 0.313574 0.204697 0.929984 -0.305335
+-0.5 -0.124923 -0.190517 1 0 0
+-0.340142 -0.316242 0.320513 0 0 1
+0.0347793 0.371795 0.285143 0 1 0
+-0.181566 -0.25 0.340812 0.212541 0.977152 0
+0.257196 0.027759 -0.256458 0.674473 0.738181 0.0132283
+0.361332 -0.371795 -0.285315 0 1 0
+-0.284812 -0.0814798 0.371795 0 0 1
+-0.5 -0.273617 0.0318499 1 0 0
+0.0730383 -0.294872 0.267734 0 1 0
+-0.5 0.261821 -0.135847 1 0 0
+0.5 0.292307 -0.17691 0.858016 0.511175 0.0500885
+0.224406 -0.0135209 0.014097 -0.165711 -0.478869 0.862104
+-0.201691 0.216096 -0.333333 0 0 1
+0.143493 0.0431523 -0.333333 0 0 1
+0.0207604 0.230897 -0.339546 -0.0696665 0.980739 0.182477
+-0.033779 0.0985784 0.320513 0 0 1
+-0.137108 0.201611 0.371795 0 0 1
+0.30781 0.19586 -0.359463 0.830977 0.556284 -0.00500893
+-0.141154 -0.305213 -0.18858 1 0 0
+0.259768 -0.371795 0.0247515 0 1 0
+-0.155451 0.371795 -0.280587 0 1 0
+0.5 0.193223 0.100153 1 0 0
+-0.235358 -0.0461212 -0.333333 -0.0664853 0.731799 -0.678269
+-0.159704 -0.361349 0.320513 0 0 1
+-0.338894 0.371795 0.187327 0 1 0
+0.5 -0.135153 -0.114197 1 0 0
+0.0714508 0.371795 -0.344729 0 1 0
+-0.302175 -0.33725 -0.371795 0 0 1
+-0.243241 0.262603 0.320513 0 0 1
+0.5 -0.0272193 -0.307407 1 0 0
+-0.0838745 -0.294872 -0.205732 0 1 0
+0.448718 -0.350513 0.251996 1 0 0
+-0.337172 0.371795 -0.0196751 0 1 0
+-0.240813 0.0422644 -0.141367 -0.230075 0.973127 0.00942146
+0.331966 -0.371795 0.217555 0 1 0
+0.448718 -0.336999 -0.0592984 1 0 0
+-0.337484 -0.371795 0.17921 0 1 0
+0.5 -0.182944 0.0995621 1 0 0
+0.375237 -0.345666 0.320513 0 0 1
+0.484608 -0.294872 -0.342803 0 1 0
+-0.5 0.262433 -0.021188 1 0 0
+0.416723 0.294872 -0.140321 0 1 0
+0.132568 -0.294872 -0.310631 0.140495 0.987814 -0.0669647
+-0.183548 -0.234991 0.371795 0 0 1
+0.277127 -0.371795 -0.0861196 0 1 0
+-0.150792 -0.371795 0.155773 -0.1921 0.97996 -0.0526812
+0.448718 -0.334299 -0.313882 1 0 0
+-0.474728 -0.294872 0.00199618 0 1 0
+-0.5 -0.148624 -0.125391 1 0 0
+-0.5 -0.217629 -0.132134 1 0 0
+-0.18667 -0.371795 -0.183754 0 1 0
+0.429053 0.258348 0.320513 0 0 1
+0.445692 -0.371795 0.189351 0.73325 -0.678594 0.0430635
+0.377727 -0.371795 0.00782086 0 1 0
+0.410232 -0.188989 -0.371795 0 0 1
+0.448718 -0.361036 -0.281467 0.997158 -0.0749693 -0.00751321
+0.342518 -0.265563 -0.371795 0 0 1
+0.152731 0.129852 -0.333333 0 0 1
+-0.0875185 -0.294872 -0.330426 0 1 0
+-0.320513 0.123703 -0.365167 0.952659 -0.10422 -0.285619
+0.44102 -0.371795 -0.149051 -0.21878 0.968932 -0.11535
+-0.187266 0.230897 -0.340601 0.030462 0.984744 0.171324
+-0.369158 -0.0130648 0.371795 0 0 1
+0.220167 0.0368257 -0.0204329 -0.261788 0.965115 0.00448421
+-0.303893 0.0603265 -0.333333 0 0 1
+0.328556 0.294872 0.0130619 0 1 0
+0.5 -0.149494 0.0920714 1 0 0
+-0.173316 -0.030131 0.320513 0 0 1
+-0.18782 0.00732255 -0.280846 0.989221 0.146426 0.000627686
+-0.0950171 -0.0308752 -0.333333 0 0 1
+-0.5 0.232666 -0.147765 1 0 0
+0.301581 -0.113905 -0.333333 0 0 1
+-0.329056 0.371795 -0.35069 0 1 0
+0.371839 0.294872 -0.138959 0 1 0
+-0.162153 0.244462 0.371795 -0.00987152 0.0489498 0.998752
+0.391241 -0.254356 -0.371795 0 0 1
+0.24364 -0.0362181 -0.0760585 -0.37789 0.925843 0.00361947
+-0.327437 0.113493 0.371795 0 0 1
+0.0347802 -0.256282 0.357683 0 1 0
+0.336883 0.251684 0.320513 0 0 1
+-0.159025 -0.371795 -0.269163 0 1 0
+0.21861 -0.371795 7.71833e-005 0 1 0
+0.387286 0.136316 0.320513 0 0 1
+-0.5 -0.0304575 -0.254664 1 0 0
+-0.451256 -0.294872 -0.0248368 0.635014 0.771141 -0.0458095
+0.106692 -0.230897 -0.354179 0 1 0
+-0.5 0.26505 0.30119 1 0 0
+0.323327 -0.148584 0.371795 0 0 1
+-0.0386214 0.256282 0.355613 0 1 0
+0.5 0.261342 0.0496243 1 0 0
+0.215422 0.294872 -0.104121 0 1 0
+0.208179 0.294872 0.0762152 0 1 0
+0.278092 0.294872 -0.297512 0 1 0
+-0.0335201 -0.260616 0.320513 0.179178 -0.54897 0.816411
+-0.136451 -0.294872 -0.00776093 -0.646132 0.763054 0.0161636
+-0.5 -0.212865 -0.346897 1 0 0
+-0.0485407 -0.294872 0.0366137 0 1 0
+0.5 -0.226115 0.255983 1 0 0
+0.5 -0.192835 -0.331197 1 0 0
+-0.213856 -0.371795 0.0420096 0 1 0
+-0.380901 -0.34617 -0.371795 0 0 1
+0.425839 0.0825395 0.320513 0 0 1
+-0.21845 -0.371795 -0.289821 0 1 0
+-0.080447 -0.182587 0.320513 -0.00736817 0.233393 0.972355
+-0.418515 -0.371795 0.284435 0 1 0
+-0.5 -0.0444161 -0.29201 1 0 0
+0.244289 0.294872 -0.235982 0 1 0
+-0.388361 0.371795 -0.280315 0 1 0
+-0.215568 0.061798 0.371795 0 0 1
+-0.243142 -0.228495 0.348082 0.475086 0.879939 0
+0.5 -0.117958 -0.201554 1 0 0
+0.327068 -0.172075 0.320513 0.19945 -0.290362 0.935901
+0.5 -0.16603 -0.101619 1 0 0
+0.421886 -0.371795 -0.232092 0 1 0
+0.5 -0.0298151 0.285077 1 0 0
+0.5 0.166376 -0.0966282 1 0 0
+0.5 -0.0652429 0.232451 1 0 0
+0.141109 -0.342884 -0.290067 1 0 0
+0.338533 -0.12748 -0.371795 0 0 1
+0.097806 0.13141 -0.333333 0 0 1
+-0.258647 0.0334906 -0.0932926 -0.644324 0.764622 0.0141181
+-0.0617835 -0.256282 0.367362 0.00604683 0.956837 -0.290563
+0.0411713 -0.226414 -0.333333 0.0222776 -0.274415 0.961353
+-0.27905 -0.290072 0.320513 0 0 1
+0.214631 0.294872 -0.239735 0 1 0
+-0.5 -0.193381 0.29874 1 0 0
+0.5 -0.0985171 0.254353 1 0 0
+0.237217 0.262308 0.320513 0 0 1
+-0.5 -0.13609 -0.153765 1 0 0
+-0.0269447 -0.294872 0.302613 0 1 0
+-0.0767861 0.058564 -0.333333 0 0 1
+-0.00627816 0.371795 -0.235783 0 1 0
+-0.374895 -0.23271 0.320513 0 0 1
+0.5 -0.204726 0.122731 1 0 0
+0.5 0.125128 0.153039 1 0 0
+-0.315312 -0.248696 0.320513 0 0 1
+-0.0471592 0.129086 -0.333333 0 0 1
+0.260253 -0.371795 0.0309135 0 1 0
+0.5 0.00585139 0.0347435 1 0 0
+0.5 -0.29169 0.237734 0.834808 -0.492257 0.246535
+-0.00489808 -0.277481 -0.371795 0 0 1
+0.21095 -0.371795 -0.277437 0 1 0
+0.365231 -0.371795 -0.132349 0 1 0
+-0.282081 0.0914825 -0.333333 0 0 1
+0.5 -0.264994 0.314566 0.560927 0.0728384 0.824655
+-0.5 0.138006 -0.241475 1 0 0
+-0.5 0.0521125 0.260206 1 0 0
+-0.238711 -0.198055 -0.333333 0 0 1
+0.48758 -0.294872 -0.189445 -0.0335246 0.999384 -0.0103513
+-0.448718 -0.345386 -0.0718278 1 0 0
+0.239599 -0.371795 0.0802128 0 1 0
+0.164149 0.294872 0.0196757 0 1 0
+0.487027 0.268496 0.320513 0 0 1
+0.0520327 -0.294872 -0.307534 0 1 0
+0.448718 -0.332273 0.118914 1 0 0
+-0.332154 0.108444 -0.371795 -0.0700738 0.0188533 0.997364
+-0.5 -0.248092 -0.346084 1 0 0
+-0.272662 -0.371795 0.196214 0 1 0
+0.00792491 0.371795 0.127981 0 1 0
+-0.0666666 -0.294872 0.0841353 0 1 0
+-0.0247237 0.230967 0.371795 0 0 1
+-0.5 -0.120523 0.054506 1 0 0
+0.5 0.209805 0.279994 1 0 0
+-0.266841 -0.0241908 -0.260959 0.829038 0.559192 0
+-0.000381344 -0.294872 -0.0263586 0 1 0
+0.0297529 0.354625 0.320513 0 0 1
+-0.121124 -0.144129 0.320513 0 0 1
+-0.28824 0.371795 -0.145487 0 1 0
+0.17755 0.294872 -0.279821 0 1 0
+0.213532 0.294872 0.0671639 0 1 0
+0.5 0.0219126 -0.0285193 1 0 0
+0.5 0.145729 -0.197589 1 0 0
+-0.0539642 0.197748 0.335515 -0.288981 0.957321 -0.00507157
+0.5 -0.274427 0.201117 1 0 0
+-0.5 0.000644725 -0.172508 1 0 0
+0.261716 0.0226037 -0.0143572 0.805837 0.591878 0.0175333
+0.00496149 0.0673175 -0.333333 0 0 1
+-0.450696 -0.294872 0.166674 0.472301 0.880628 0.0377682
+-0.5 -0.293204 0.21454 0.910205 0.408504 0.0681934
+0.5 0.191996 0.169686 1 0 0
+0.5 0.0215225 0.296333 1 0 0
+0.340256 -0.371795 0.0966766 0 1 0
+-0.103133 0.371795 -0.159334 0 1 0
+-0.5 -0.243705 -0.239656 1 0 0
+0.364599 0.294872 -0.23506 0 1 0
+-0.417937 0.371795 0.227579 0 1 0
+0.5 -0.159611 0.219242 1 0 0
+-0.5 -0.256548 0.0786047 1 0 0
+-0.0852039 -0.0946255 -0.333333 0 0 1
+-0.156477 -0.371795 0.0214325 0 1 0
+-0.5 -0.048084 0.231948 1 0 0
+0.327822 0.294872 0.156091 0 1 0
+0.5 -0.0429521 0.318597 0.899137 -0.172708 0.402149
+-0.176286 -0.251148 0.339251 0.212534 0.977154 0
+0.5 0.182522 0.158838 1 0 0
+0.470582 -0.294872 -0.33593 0 1 0
+0.5 -0.200945 0.223234 1 0 0
+-0.5 -0.290478 0.107455 0.78792 0.615494 0.0187044
+0.232372 -0.371795 0.258473 0 1 0
+-0.5 0.0896395 -0.101644 1 0 0
+-0.173815 -0.371795 0.21497 0 1 0
+-0.0532247 -0.164516 0.320513 0 0 1
+-0.208557 0.110129 0.371795 0 0 1
+0.487635 0.130943 0.320513 0.0554689 -0.0204148 0.998252
+0.5 0.17171 -0.00235896 1 0 0
+-0.378749 0.371795 0.133389 0 1 0
+-0.31957 0.371795 -0.0642325 0 1 0
+0.5 -0.252327 -0.170764 1 0 0
+0.347072 0.294872 -0.0543124 0 1 0
+-0.0211924 0.223873 0.371795 0 0 1
+-0.394617 0.371795 0.0774759 0 1 0
+0.26657 0.0138866 -0.291891 0.930736 0.365371 0.015305
+-0.5 -0.0410197 -0.329084 1 0 0
+-0.141154 -0.322476 0.0178426 1 0 0
+0.0110989 -0.0325165 0.320513 0 0 1
+0.206668 0.294872 -0.27807 0 1 0
+-0.240666 -0.0423038 -0.252846 0.213514 0.976939 0.00136098
+-0.0824029 -0.294872 -0.120023 0 1 0
+-0.5 0.0423115 -0.367165 0.905998 0.0496749 0.420358
+0.153178 -0.278848 -0.371795 0 0 1
+-0.5 -0.124235 -0.329392 1 0 0
+-0.00966313 -0.294872 0.113332 0 1 0
+-0.347412 0.048242 0.371795 0 0 1
+-0.147332 -0.276974 -0.371795 0 0 1
+0.189016 0.280966 0.320513 0 0 1
+0.464597 -0.294872 -0.292531 0 1 0
+0.378845 0.130895 -0.371795 0 0 1
+0.148211 0.294872 -0.0722732 0.223814 0.974617 -0.00541658
+-0.5 0.0397368 0.268379 1 0 0
+-0.334239 -0.188952 0.320513 0 0 1
+0.414613 -0.371795 -0.0143346 0 1 0
+-0.133463 -0.117872 0.320513 0 0 1
+-0.0604638 -0.195517 0.322447 0.337838 0.929032 0.150879
+-0.06841 0.0683326 -0.333333 0 0 1
+-0.451101 0.371795 0.165581 0 1 0
+-0.326181 -0.162098 0.356637 0.799506 0.600658 0
+-0.0502124 0.0816693 0.320513 0 0 1
+-0.141154 -0.314536 -0.0982317 1 0 0
+-0.481384 -0.164764 0.320513 0 0 1
+0.166364 0.0937493 -0.333333 0 0 1
+-0.127265 -0.294872 -0.133708 0 1 0
+0.134637 -0.294872 -0.261635 0.260561 0.964062 0.0518825
+-0.5 -0.163814 -0.229507 1 0 0
+0.235657 -0.0186757 0.371795 0 0 1
+-0.452934 -0.215041 -0.371795 0 0 1
+0.179342 0.0994917 0.355358 0.869336 0.494222 0
+0.436357 -0.179939 -0.371795 0 0 1
+-0.5 -0.125901 0.0565041 1 0 0
+-0.207635 -0.22878 0.371795 0 0 1
+-0.275612 -0.371795 0.182064 0 1 0
+-0.5 -0.18824 -0.324646 1 0 0
+0.468618 0.294872 -0.0543016 0 1 0
+-0.5 0.217787 -0.237776 1 0 0
+0.259439 0.294872 0.214731 0 1 0
+0.471358 0.294872 -0.0660822 0 1 0
+-0.459833 -0.014578 0.320513 0 0 1
+0.168765 0.294872 -0.20326 0 1 0
+0.285337 0.0134984 -0.333333 0 0 1
+-0.382886 -0.084465 0.320513 -0.0609875 -0.0245672 0.997836
+-0.24389 -0.371795 -0.124154 0 1 0
+0.448718 -0.368346 -0.329129 0.837549 -0.522806 0.158699
+0.0943312 0.371795 0.202546 0 1 0
+-0.345407 -0.135619 0.365935 0.797367 0.477688 -0.368809
+0.378111 0.294872 -0.00192296 0 1 0
+-0.132576 -0.0176897 0.320513 0 0 1
+0.466585 -0.294872 0.0930719 0 1 0
+-0.499278 0.371795 -0.0730953 -0.685708 0.695023 -0.216214
+-0.183391 0.345464 -0.371795 0 0 1
+-0.2274 -0.235833 0.321138 -0.142118 -0.392473 0.908718
+-0.121561 0.371795 -0.174975 0 1 0
+-0.274727 0.371795 -0.271883 0 1 0
+-0.5 -0.172191 0.0744684 1 0 0
+-0.387333 0.371795 -0.243219 0 1 0
+0.309925 0.294872 -0.0813507 0 1 0
+0.0590397 -0.201837 -0.333333 0 0 1
+0.114783 0.230897 -0.335803 0.0641661 0.943233 0.325875
+0.230735 -0.371795 0.220564 0 1 0
+0.175461 0.294872 -0.363359 -0.00697503 0.999723 -0.0224695
+0.141026 0.338039 -0.305441 1 0 0
+0.147221 0.195291 -0.333333 0 0 1
+0.39007 0.282706 0.320513 0 0 1
+0.141026 0.337136 0.11067 1 0 0
+0.28794 0.294872 -0.112284 0 1 0
+-0.36367 0.371795 0.241259 0 1 0
+0.245151 -0.203578 -0.333333 0 0 1
+0.216628 -0.371795 -0.137801 0 1 0
+-0.5 -0.0658005 0.202257 1 0 0
+0.0459005 0.335631 -0.371795 0 0 1
+-0.367276 -0.235671 0.320513 0 0 1
+0.5 -0.0218613 0.136291 1 0 0
+-0.355785 0.0909692 0.371795 -0.140173 0.0146545 0.990019
+0.269171 -0.371795 -0.235262 0 1 0
+-0.273102 -0.00978998 -0.128658 0.972775 0.23174 -0.00245067
+-0.402125 0.172738 -0.371795 0 0 1
+-0.5 0.299134 -0.164702 1 0 0
+0.40277 -0.195306 -0.371795 0 0 1
+0.141109 -0.327347 0.168388 1 0 0
+-0.0884107 0.296394 -0.371795 0 0 1
+0.373862 0.0266228 0.371795 0.225701 0.0508338 0.972869
+0.291637 0.255557 0.320513 0 0 1
+0.0497605 0.225855 -0.333333 0.0084638 0.333598 0.942677
+-0.214391 0.0402756 -0.205963 0.393013 0.919257 -0.0225047
+0.0652367 0.202982 -0.333333 0 0 1
+0.5 0.066932 -0.0719797 1 0 0
+-0.278853 -0.324171 0.320513 0 0 1
+-0.421149 -0.371795 0.104965 0 1 0
+-0.5 0.0751161 0.156437 1 0 0
+-0.0962422 -0.0320288 0.320513 0 0 1
+0.141026 0.344972 -0.285208 1 0 0
+-0.484797 -0.294872 0.319582 -0.0985853 -0.630493 0.769909
+-0.496955 -0.131612 0.320513 -0.155637 0.0585962 0.986075
+0.0788953 0.113292 0.320513 0 0 1
+-0.5 -0.0933738 -0.179594 1 0 0
+0.5 0.114756 0.0569929 1 0 0
+-0.386278 -0.248386 0.320513 0 0 1
+-0.199261 -0.371795 -0.0224691 0 1 0
+0.300105 -0.300707 0.320513 0 0 1
+-0.5 0.314288 0.138866 1 0 0
+0.5 -0.0487738 -0.208185 1 0 0
+0.5 -0.147224 -0.0337042 1 0 0
+-0.5 -0.00152611 -0.15938 1 0 0
+-0.293049 0.371795 0.0249567 0 1 0
+0.154835 -0.280389 -0.371795 0 0 1
+0.193143 0.100237 0.371795 0 0 1
+-0.5 -0.0310456 -0.237485 1 0 0
+-0.272975 -0.0731427 0.371795 0 0 1
+0.5 0.130932 -0.199212 1 0 0
+0.141026 0.351617 -0.0849805 1 0 0
+0.0152989 0.254855 0.371795 0.0883301 0.537338 0.838728
+0.267951 0.208467 0.371795 0.114734 0.137316 0.98386
+-0.0773672 0.276406 0.320513 0 0 1
+0.251584 -0.162092 -0.333333 0 0 1
+-0.408878 -0.111347 -0.371795 0 0 1
+-0.5 -0.0490923 0.199773 1 0 0
+-0.5 0.26981 0.0649645 1 0 0
+-0.0370342 0.371795 0.102815 0 1 0
+-0.5 -0.201747 -0.0195975 1 0 0
+0.327598 -0.223505 0.320513 0 0 1
+-0.43521 -0.141624 -0.371795 0 0 1
+-0.298967 0.296609 0.320513 0 0 1
+-0.20928 0.371795 0.263311 0 1 0
+-0.220344 0.371795 -0.156984 0 1 0
+-0.0909219 -0.294872 -0.235191 0 1 0
+-0.5 0.0752206 -0.0953423 1 0 0
+-0.360008 -0.285339 0.320513 0 0 1
+-0.0766723 -0.115279 -0.333333 0 0 1
+0.231315 -0.143539 -0.333333 0 0 1
+0.226065 -0.34495 0.320513 0 0 1
+0.103472 0.112619 0.320513 0 0 1
+0.32952 0.252686 0.320513 0 0 1
+-0.174786 0.369202 -0.371795 -0.213232 -0.694768 0.686899
+0.5 -0.0946888 0.101937 1 0 0
+-0.283314 -0.371795 0.0364164 0 1 0
+0.0746494 -0.294872 -0.119579 0 1 0
+-0.137621 0.371795 -0.0562051 0 1 0
+-0.5 -0.0574111 -0.306532 1 0 0
+0.222951 0.294872 -0.234088 0 1 0
+0.2193 -0.258206 -0.371795 0 0 1
+0.395395 -0.302382 0.320513 0 0 1
+-0.124017 -0.00119038 -0.333333 0 0 1
+0.5 -0.139306 0.119062 1 0 0
+-0.320513 0.0234079 -0.338598 0.883426 -0.233038 -0.406511
+-0.10116 0.30253 -0.371795 0 0 1
+0.318477 0.207983 -0.371795 0 0 1
+-0.5 0.0945891 -0.175442 1 0 0
+0.176008 -0.126387 -0.333333 0 0 1
+-0.357949 -0.371795 -0.327211 0 1 0
+-0.163942 -0.371795 0.172821 0 1 0
+-0.0808037 -0.294872 -0.174297 0 1 0
+-0.124663 -0.0709805 0.320513 0 0 1
+0.141109 -0.363981 0.045184 0.961918 0.272543 -0.0208387
+-0.043696 -0.294872 0.110041 0 1 0
+0.0409655 0.193341 -0.333333 0 0 1
+-0.160298 0.371795 -0.0256426 0 1 0
+-0.5 0.274973 0.0472749 1 0 0
+0.092299 0.371795 -0.260228 0 1 0
+-0.5 0.134185 0.247404 1 0 0
+-0.141154 -0.313716 -0.232245 1 0 0
+-0.375752 0.371795 0.195486 0 1 0
+0.420453 0.293671 0.320513 0.0736549 0.575005 0.814828
+-0.124185 0.359683 -0.371795 0 0 1
+0.5 -0.153865 -0.102009 1 0 0
+0.0317468 -0.294872 -0.150523 0 1 0
+0.0952166 0.371795 0.0602689 0 1 0
+-0.43245 -0.0750946 0.320513 0 0 1
+0.441643 0.276499 -0.371795 0 0 1
+0.408895 0.294872 -0.215206 0 1 0
+-0.320513 -0.0680126 -0.367958 0.985583 0.000899611 -0.169189
+-0.176299 -0.104149 0.347734 0.843654 0.536884 -0.00205882
+-0.141154 -0.30981 0.203524 1 0 0
+0.5 -0.132314 -0.308871 1 0 0
+0.193981 -0.0669972 0.349084 0.944284 -0.32911 -0.00383648
+-0.4331 -0.2389 0.320513 0 0 1
+0.5 -0.261718 -0.100795 1 0 0
+-0.431619 0.359551 0.320513 0 0 1
+-0.167705 0.0951201 -0.333333 0 0 1
+0.5 0.117858 0.247728 1 0 0
+-0.228296 -0.128979 0.371795 0 0 1
+0.280711 0.237732 0.320513 0 0 1
+-0.5 0.222107 -0.126914 1 0 0
+0.0754704 -0.294872 -0.192501 0 1 0
+0.141926 -0.297011 -0.371795 0.267682 0.188462 0.944896
+0.00708085 -0.256282 0.342123 0 1 0
+-0.0725015 -0.294872 -0.356674 0 1 0
+-0.448718 -0.302164 -0.21101 0.990144 0.139985 0.00439529
+0.5 0.0215535 0.295002 1 0 0
+0.0305367 -0.256282 0.352627 0 1 0
+0.0889446 -0.294872 -0.0612163 0 1 0
+-0.0824144 0.371795 -0.126443 0 1 0
+-0.0436515 0.371795 -0.358917 0 1 0
+0.250811 -0.178125 -0.333333 0 0 1
+0.0383105 0.292041 -0.371795 0 0 1
+-0.274195 -0.00187781 -0.29694 0.997618 0.068566 -0.00753375
+0.140473 0.319476 0.320513 0.568805 0.00481461 0.822458
+-0.303932 -0.201398 -0.349422 0.782514 0.622588 -0.00755473
+-0.456027 -0.109141 0.320513 0 0 1
+0.21541 0.109383 -0.333333 0 0 1
+-0.379753 0.371795 -0.300827 0 1 0
+0.0860161 -0.15609 -0.333333 0 0 1
+0.401683 0.294872 -0.118912 0 1 0
+-0.0278862 0.371795 0.0444925 0 1 0
+0.5 -0.280598 -0.0327862 1 0 0
+0.5 -0.154002 0.0685536 1 0 0
+0.5 0.260671 -0.154509 1 0 0
+-0.0734988 0.0249759 0.320513 0 0 1
+0.309187 -0.371795 0.130094 0 1 0
+-0.0292693 0.230897 -0.364992 0.0770147 0.955724 0.284008
+0.141026 0.306048 -0.296885 0.998591 0.0527799 -0.00548895
+0.5 -0.227352 -0.113891 1 0 0
+-0.417966 0.371795 0.255234 0 1 0
+0.0230569 0.287229 0.320513 0 0 1
+-0.187259 -0.0368666 0.320513 0 0 1
+0.488942 -0.0538562 0.320513 0.0227525 -0.00242898 0.999738
+-0.267316 -0.0235132 -0.0513344 0.83611 0.548548 -0.00388796
+0.323605 -0.371795 -0.0779223 0 1 0
+-0.212478 -0.0771652 -0.333333 0 0 1
+-0.302014 -0.187705 0.368502 0.634209 0.591644 -0.497732
+-0.5 -0.0358846 0.223774 1 0 0
+0.33204 0.0807381 0.371795 0 0 1
+0.5 0.114782 0.0771227 1 0 0
+0.5 -0.0789656 -0.0896318 1 0 0
+-0.5 0.364855 -0.0377185 0.934699 -0.341042 0.100142
+-0.414102 -0.313443 -0.371795 0 0 1
+-0.342949 0.371795 -0.0918048 0 1 0
+-0.32305 -0.126849 0.371795 0 0 1
+-0.141154 -0.362909 0.302861 0.995202 -0.0929265 0.0306286
+-0.0816069 0.138862 -0.333333 0 0 1
+-0.5 -0.128875 -0.083888 1 0 0
+-0.4818 0.371795 -0.269269 0 1 0
+-0.5 0.105812 -0.104233 1 0 0
+0.157169 0.294872 0.196652 0 1 0
+0.218498 0.131046 -0.333333 0 0 1
+-0.5 0.245158 0.0158947 1 0 0
+0.46749 -0.294872 0.248994 0 1 0
+0.408352 0.294872 0.160403 0 1 0
+-0.390796 -0.371795 0.174959 0 1 0
+0.12458 -0.284633 0.320513 0.00499601 -0.0131974 0.9999
+-0.188403 -0.00966529 -0.0481627 0.962986 -0.269149 0.0146983
+0.0884525 0.371795 0.00220617 0 1 0
+0.141026 0.307613 0.0898881 1 0 0
+0.5 -0.0635025 0.210361 1 0 0
+-0.346601 -0.178614 0.320513 0 0 1
+-0.141154 -0.369257 0.16679 0.965228 -0.251266 0.0721145
+-0.263548 -0.371795 -0.351427 0 1 0
+-0.5 -0.00350062 0.0914433 1 0 0
+-0.5 -0.0502434 0.139122 1 0 0
+0.422956 0.257435 0.320513 0 0 1
+-0.192066 0.100303 -0.333333 0 0 1
+0.246603 -0.28221 0.320513 0 0 1
+0.5 0.109527 0.169031 1 0 0
+-0.5 0.306425 0.0495997 1 0 0
+-0.0719319 -0.138158 0.320513 0 0 1
+-0.5 0.0949966 0.264786 1 0 0
+-0.453646 -0.0427147 -0.371795 0 0 1
+-0.18707 0.371795 0.279812 0 1 0
+0.448718 -0.357989 -0.197722 1 0 0
+0.5 0.277517 0.0692896 1 0 0
+-0.5 -0.15786 -0.122115 1 0 0
+-0.194167 -0.0234334 -0.295903 0.845114 -0.534584 -0.00133447
+-0.23271 -0.0703643 0.371795 0 0 1
+0.21627 -0.321853 0.320513 0 0 1
+0.141109 -0.346706 0.0254078 1 0 0
+0.491124 0.294872 0.0545273 0.151016 0.988429 0.0142056
+0.0441025 -0.294872 0.246279 0 1 0
+-0.124167 0.371795 0.225169 0 1 0
+-0.5 0.197425 -0.195107 1 0 0
+-0.189583 0.371795 0.0298874 0 1 0
+-0.0854297 0.192357 0.371795 0.0643823 -0.355091 0.932612
+0.496459 -0.273379 0.320513 0.35776 0.0162358 0.933672
+-0.168426 -0.208721 0.371795 0 0 1
+-0.223778 0.298616 -0.371795 0 0 1
+-0.448718 -0.307476 0.0476455 1 0 0
+0.331043 -0.371795 -0.278822 0 1 0
+0.0704774 -0.294872 -0.128737 0 1 0
+0.0182027 -0.12644 0.320513 0 0 1
+0.451764 -0.294872 0.235324 -0.380708 0.918634 -0.105701
+0.153756 -0.371795 0.0896156 0 1 0
+0.458338 -0.294872 -0.0177302 -0.154249 0.987737 -0.0241405
+0.29621 0.294872 -0.247437 0 1 0
+0.0696954 -0.176689 0.320513 0 0 1
+-0.40287 0.361331 0.320513 -0.0360434 0.0685903 0.996994
+-0.156814 0.254236 0.337423 -0.0831836 0.996531 0.00270623
+-0.28842 -0.18091 -0.333333 0 0 1
+-0.5 -0.246551 0.123885 1 0 0
+-0.235966 -0.371795 -0.234411 0 1 0
+-0.144248 0.371795 -0.104026 0 1 0
+0.308429 -0.345101 0.320513 0 0 1
+-0.5 0.120319 0.15174 1 0 0
+0.141026 0.329107 -0.0522791 1 0 0
+-0.172056 -0.136726 -0.333333 0 0 1
+-0.248196 -0.371795 -0.189648 0 1 0
+0.5 0.133197 -0.245735 1 0 0
+0.0831513 0.187589 0.35111 0.431803 0.901955 0.00482329
+0.188832 0.294872 0.0486773 0 1 0
+0.351781 -0.371795 -0.0897259 0 1 0
+-0.0564211 -0.294872 0.103556 0 1 0
+0.0829125 -0.227897 0.371795 0 0 1
+0.383933 0.00774999 0.355 0.998102 0.0612755 0.00605529
+-0.0597258 -0.294872 0.135798 0 1 0
+-0.5 -0.00264895 -0.189536 1 0 0
+0.380136 0.294872 0.0827016 0 1 0
+0.229193 -0.0987373 -0.333333 0 0 1
+0.34638 -0.30508 -0.371795 0 0 1
+-0.212797 0.246145 -0.371795 0 0 1
+0.0431849 -0.294872 -0.0978191 0 1 0
+-0.5 0.154296 -0.269891 1 0 0
+0.00462929 0.357588 0.320513 0 0 1
+-0.0736029 -0.294872 0.0445458 0 1 0
+0.268744 0.00556382 -0.160909 0.988148 0.152208 -0.0198931
+-0.100417 -0.0245323 -0.333333 0 0 1
+-0.141154 -0.330683 0.246502 1 0 0
+-0.383287 0.371795 -0.0783503 0 1 0
+-0.339084 -0.371795 0.101106 0 1 0
+-0.5 0.175807 0.142916 1 0 0
+0.5 -0.0356613 0.0471323 1 0 0
+0.151014 0.294872 -0.313516 0 1 0
+0.157166 0.014078 -0.333333 0 0 1
+0.492226 -0.294872 0.105334 -0.160935 0.986096 -0.0414181
+-0.244635 -0.371795 -0.172321 0 1 0
+0.403747 -0.0216694 0.320513 0 0 1
+0.5 0.0472099 0.063836 1 0 0
+-0.420688 -0.371795 0.102128 0 1 0
+0.438768 0.294872 -0.216173 0 1 0
+0.5 -0.118903 0.226571 1 0 0
+0.499907 0.185516 -0.371795 -0.482875 -0.0713905 0.872774
+-0.374004 0.0336384 -0.371795 0 0 1
+0.183615 -0.371795 -0.256508 0 1 0
+0.5 -0.0898789 0.183943 1 0 0
+0.211732 -0.104673 -0.333333 0 0 1
+-0.319711 -0.371795 -0.164593 0 1 0
+0.386555 -0.371795 0.0414812 0 1 0
+0.297688 0.24971 -0.371795 0 0 1
+-0.0875062 0.371795 -0.0971274 0 1 0
+-0.5 -0.0426559 0.0530184 1 0 0
+-0.103399 0.215731 -0.333333 0 0 1
+0.326931 0.294872 -0.247091 0 1 0
+0.150373 -0.138675 0.352641 0.735719 -0.677287 0
+-0.163473 0.371795 -0.124599 0 1 0
+0.218559 0.0363949 -0.138815 -0.321573 0.946753 0.0158016
+0.269624 0.213456 0.355458 0.568407 0.822668 0.0114488
+0.198693 -0.0209898 -0.290666 0.853844 0.520466 -0.00814729
+-0.298576 -0.292172 -0.371795 0 0 1
+-0.296395 0.371795 -0.242354 0 1 0
+0.309903 -0.00288799 -0.333333 0.0909438 0.0420833 0.994966
+0.0420463 -0.294872 0.0506973 0 1 0
+-0.5 0.0701071 0.0731043 1 0 0
+0.189662 0.00872519 0.320513 0 0 1
+-0.489118 -0.0172043 0.320513 -0.0146271 0.0037306 0.999886
+0.388841 0.294872 -0.224055 0 1 0
+0.388558 0.235848 -0.371795 0 0 1
+0.293852 0.188887 0.371795 0.168438 0.273877 0.9469
+0.298029 0.291138 -0.371795 0.0659437 -0.285784 0.956022
+-0.5 -0.221548 -0.0966569 1 0 0
+-0.223467 0.334385 0.320513 0 0 1
+0.152929 0.294872 0.25563 0.00282595 0.999996 -3.70715e-005
+0.00250851 0.371795 -0.235955 0 1 0
+0.373144 0.14184 -0.371795 0 0 1
+-0.337444 0.0703952 -0.371795 0 0 1
+0.141109 -0.369364 0.157462 0.785051 0.61432 0.0794077
+0.491163 -0.294872 0.16103 0 1 0
+-0.5 0.329029 0.0069694 1 0 0
+-0.237207 0.371795 0.251277 0 1 0
+-0.5 -0.0803031 0.249537 1 0 0
+0.198129 -0.371795 0.0624086 0 1 0
+-0.228789 -0.0434165 -0.198458 -0.0610231 0.998116 -0.00642847
+0.413983 -0.371795 0.189592 0 1 0
+-0.0703254 -0.294872 0.273221 0 1 0
+0.0854476 0.274605 -0.371795 0 0 1
+-0.0419792 0.133734 -0.333333 0 0 1
+0.0583149 -0.294872 0.121758 0 1 0
+-0.480296 0.0277876 -0.371795 0 0 1
+-0.474519 0.371795 -0.185995 0 1 0
+-0.228936 0.0380035 -0.0319962 0.0316958 0.633968 0.772709
+0.5 -0.0200472 0.204651 1 0 0
+-0.320513 0.105476 -0.368739 0.757208 -0.114405 -0.643077
+0.29958 0.294872 -0.0373097 0 1 0
+0.44304 -0.371795 0.227877 -0.19478 0.980008 -0.0405581
+-0.0295826 0.168116 -0.333333 0 0 1
+0.0980879 -0.294872 0.168597 0 1 0
+-0.26991 -0.23363 0.320513 0 0 1
+0.410537 0.199473 -0.371795 0 0 1
+0.5 0.171644 -0.253372 1 0 0
+-0.470272 0.371795 -0.222666 0 1 0
+0.5 -0.149307 -0.219142 1 0 0
+0.157203 0.294872 0.263019 0 1 0
+-0.441625 0.371795 0.271654 0 1 0
+-0.141154 -0.320302 -0.109159 1 0 0
+0.380579 0.0424476 0.369301 0.640075 0.382516 0.666323
+-0.323758 -0.35333 0.320513 0 0 1
+0.203608 0.294872 -0.155235 0 1 0
+-0.381054 0.371795 0.010086 0 1 0
+0.454459 -0.134201 0.320513 0 0 1
+-0.0444033 -0.294872 0.0960007 0 1 0
+0.0563251 -0.294872 0.107325 0 1 0
+-0.311778 -0.122691 0.371795 0 0 1
+0.210335 -0.0248855 0.00374526 -0.41847 -0.411408 0.809708
+0.105724 0.12737 0.320513 0 0 1
+-0.492449 0.336809 0.320513 -0.1642 -0.0765855 0.98345
+0.206112 -0.0335468 0.371795 -0.354516 0.289529 0.889096
+0.5 0.164029 0.126858 1 0 0
+0.5 -0.0969843 0.102775 1 0 0
+0.284745 0.109624 -0.333333 0 0 1
+0.448718 -0.352244 0.0616209 1 0 0
+0.5 -0.234393 0.152023 1 0 0
+0.120788 0.132351 -0.333333 0 0 1
+0.0571085 0.0863799 0.320513 0 0 1
+0.344105 0.294872 0.0542786 0 1 0
+-0.5 0.205647 0.285075 1 0 0
+0.5 -0.183829 -0.0110163 1 0 0
+0.464096 -0.294872 0.236422 0 1 0
+-0.481375 0.0741506 0.320513 0 0 1
+0.320513 -0.0723552 -0.357285 1 0 0
+-0.374815 -0.371795 0.221269 0 1 0
+0.141109 -0.342859 -0.196948 1 0 0
+-0.25885 -0.0278082 -0.0329015 0.538056 0.513345 -0.66856
+-0.45712 0.182905 -0.371795 0 0 1
+-0.5 -0.196559 0.0375689 1 0 0
+-0.420906 -0.371795 -0.33304 0 1 0
+0.343833 0.291116 -0.371795 -0.149587 -0.349639 0.924866
+0.245343 0.294872 -0.0262102 0 1 0
+0.5 -0.121627 -0.32683 1 0 0
+0.5 0.0935664 0.0320458 1 0 0
+0.16311 0.294872 -0.175956 0 1 0
+0.298521 -0.371795 0.27261 0 1 0
+0.5 0.205055 0.0215886 1 0 0
+0.443967 0.249754 0.320513 0 0 1
+0.5 -0.0261335 0.0796272 1 0 0
+-0.472133 0.132772 -0.371795 0 0 1
+-0.281414 0.331816 -0.371795 0 0 1
+0.292331 -0.371795 0.176211 0 1 0
+-0.389012 -0.0525578 0.320513 -0.0979318 -0.0381826 0.99446
+0.5 0.255906 -0.251377 1 0 0
+0.174687 -0.251496 0.355878 -0.212554 0.977149 0
+-0.141154 -0.337895 0.29718 1 0 0
+-0.5 -0.237523 0.21419 1 0 0
+0.306372 -0.371795 0.12328 0 1 0
+-0.188489 0.00998572 -0.317643 0.974533 0.224216 0.00363218
+-0.265244 -0.371795 0.220042 0 1 0
+-0.141154 -0.328183 0.293445 1 0 0
+-0.233667 0.0433362 -0.131512 -0.0473019 0.998811 -0.0118092
+-0.5 0.31236 -0.279085 1 0 0
+-0.5 -0.0686603 0.109312 1 0 0
+-0.448718 -0.321352 -0.100576 1 0 0
+0.5 0.219182 -0.235884 1 0 0
+0.141026 0.342878 0.00421432 1 0 0
+0.485271 0.294872 0.259878 0 1 0
+0.5 0.0408442 0.267103 1 0 0
+0.232662 0.294872 -0.03986 0 1 0
+-0.383246 0.0173551 0.368235 0.80795 0.140538 -0.572246
+0.445441 -0.185158 0.320513 0 0 1
+-0.195888 0.328615 0.320513 0 0 1
+-0.270052 -0.0185066 -0.0381712 0.847593 0.405377 -0.342426
+-0.00500149 0.121124 0.320513 0 0 1
+-0.338306 0.238827 -0.371795 0 0 1
+0.275369 0.242552 -0.371795 0 0 1
+-0.220337 -0.0776219 -0.333333 0 0 1
+0.241 -0.243158 0.320513 0 0 1
+-0.387323 0.371795 0.0198459 0 1 0
+-0.228533 -0.371795 -0.32316 0 1 0
+0.100304 0.371795 -0.278682 0 1 0
+0.5 -0.04859 0.258041 1 0 0
+0.320513 -0.0379618 -0.33846 0.968999 0.0733335 0.235931
+-0.448718 -0.306082 -0.0954049 1 0 0
+-0.141154 -0.331534 0.0211289 1 0 0
+-0.491085 -0.24882 0.320513 -0.146039 0.0338 0.988701
+-0.205552 0.371795 -0.240652 0 1 0
+0.261243 0.023279 -0.149174 0.799725 0.600267 0.0109798
+0.00445907 -0.179152 0.320513 0 0 1
+0.0962431 -0.294872 -0.223852 0 1 0
+-0.394504 0.371795 -0.0723122 0 1 0
+0.348813 0.106729 0.371795 0 0 1
+-0.468337 -0.0297528 -0.371795 0 0 1
+-0.174695 -0.371795 0.111275 0 1 0
+0.160409 -0.235483 -0.371795 -0.00312559 -0.468603 0.883403
+-0.141154 -0.344126 0.0561996 1 0 0
+0.5 0.179471 -0.337582 1 0 0
+0.0290932 -0.294872 0.142799 0 1 0
+-0.234768 0.04324 -0.0760223 -0.0574603 0.99824 0.0146405
+-0.5 -0.260451 -0.0842527 1 0 0
+0.130195 0.13109 -0.333333 0 0 1
+-0.5 0.24065 0.0959454 1 0 0
+-0.5 -0.100553 0.191332 1 0 0
+0.280686 0.294872 -0.0165846 0 1 0
+-0.125296 0.371795 -0.171797 0 1 0
+-0.261088 0.0310922 -0.206086 -0.653729 0.756684 0.00820418
+0.330372 0.294872 0.158123 0 1 0
+-0.364665 0.185165 -0.371795 0 0 1
+0.5 0.179936 -0.0521213 1 0 0
+-0.215254 -0.371795 -0.04504 0 1 0
+-0.0181986 0.371795 0.0409537 0 1 0
+-0.270874 -0.0167438 -0.173924 0.935314 0.353748 -0.00713079
+0.361514 -0.371795 0.184637 0 1 0
+-0.363675 0.371795 -0.36889 -0.0956131 0.800263 -0.591978
+-0.350649 -0.193438 0.320513 0 0 1
+-0.0255985 0.371795 -0.089142 0 1 0
+-0.430944 0.371795 0.174285 0 1 0
+-0.5 -0.131369 -0.261663 1 0 0
+0.476678 0.103864 -0.371795 0 0 1
+-0.0405946 -0.20061 0.363387 0.202248 0.976249 0.0776768
+0.5 -0.100305 0.0592226 1 0 0
+0.0890693 0.346154 -0.371795 0 0 1
+0.5 0.056328 -0.314811 1 0 0
+0.448718 -0.299448 -0.0938117 0.934191 -0.35431 0.0418573
+-0.432117 0.00855199 0.320513 0 0 1
+-0.184956 0.171387 0.371795 0 0 1
+-0.229784 -0.261574 -0.371795 0 0 1
+-0.448718 -0.340436 0.105748 1 0 0
+0.141026 0.301268 -0.327549 0.983233 0.181392 -0.0186915
+0.249004 0.294872 0.19489 0 1 0
+-0.270014 0.0185878 -0.256395 0.901159 -0.433043 -0.0196439
+0.5 0.0699461 0.102065 1 0 0
+-0.468369 -0.294872 -0.0337472 0 1 0
+-0.0326236 0.371795 -0.206074 0 1 0
+-0.5 0.0143935 -0.355684 1 0 0
+-0.163764 0.119289 -0.333333 0 0 1
+-0.47687 -0.294872 -0.00887396 0 1 0
+-0.0152139 -0.294872 0.0224743 0 1 0
+0.5 -0.0258047 0.0236589 1 0 0
+-0.193667 -0.371795 0.303347 0 1 0
+0.5 -0.243582 -0.302304 1 0 0
+0.320513 0.009328 -0.368461 0.900182 -0.0730334 0.429347
+-0.455714 0.371795 -0.0303556 0 1 0
+0.5 -0.0976582 -0.356353 1 0 0
+0.346898 -0.343241 -0.371795 0 0 1
+0.00184697 -0.294872 0.0255981 0 1 0
+0.207829 0.0307113 -0.109874 -0.573569 0.818947 -0.0185613
+0.111787 -0.294872 0.0925452 0 1 0
+0.0628599 -0.294872 -0.294359 0 1 0
+-0.353542 0.12072 0.331161 0.889269 -0.455081 -0.0458433
+-0.192838 0.0214073 -0.0572103 0.898686 0.438532 -0.00735821
+0.383706 -0.275363 0.320513 0 0 1
+-0.5 -0.0164462 -0.126871 1 0 0
+0.5 0.220684 0.295442 1 0 0
+-0.184975 -0.371795 -0.312143 0 1 0
+0.5 0.154806 0.0690779 1 0 0
+-0.00651675 0.371795 -0.155954 0 1 0
+0.365807 0.294872 -0.0851608 0 1 0
+0.5 -0.268129 0.0387205 1 0 0
+0.0535198 0.0333034 -0.333333 0 0 1
+0.48406 -0.294872 0.295821 0 1 0
+-0.134072 0.279455 0.320513 0 0 1
+-0.5 0.128676 0.00429169 1 0 0
+-0.248841 -0.170069 -0.333333 0 0 1
+-0.5 0.125036 0.194019 1 0 0
+0.380852 -0.112272 0.320513 0 0 1
+-0.5 0.323762 0.0616941 1 0 0
+0.483615 0.294872 0.16374 0 1 0
+0.448532 -0.0385387 0.320513 0 0 1
+0.14022 -0.149704 0.368151 -0.605776 0.670133 0.428902
+-0.226364 -0.371795 0.265307 0 1 0
+0.107913 0.371795 -0.0506654 0 1 0
+-0.230036 -0.371795 -0.175313 0 1 0
+-0.261057 0.371795 -0.00355935 0 1 0
+-0.250633 -0.371795 -0.0558468 0 1 0
+-0.277024 -0.371795 0.194339 0 1 0
+0.5 -0.176442 -0.259524 1 0 0
+0.0921375 -0.213651 -0.333333 0 0 1
+-0.437829 -0.371795 -0.0207525 0.0219749 0.999739 -0.00621205
+0.141109 -0.296022 0.214716 0.677375 0.735632 0.00283395
+-0.111341 -0.256282 0.363149 0.00846419 0.997914 -0.0639957
+-0.311417 -0.121798 0.371795 0 0 1
+-0.19966 -0.371795 0.277609 0 1 0
+0.040579 -0.0601033 0.320513 0 0 1
+0.0909317 0.187437 0.371795 -0.33136 -0.456304 0.825825
+0.218389 0.294872 -0.0684881 0 1 0
+-0.187534 -0.371795 0.247077 0 1 0
+-0.448718 -0.304275 0.113792 0.998664 0.0497863 0.0138605
+-0.274749 0.196714 -0.333333 0 0 1
+-0.448718 -0.347084 0.270508 1 0 0
+-0.26812 -0.214582 0.331032 0.529611 0.841802 -0.10431
+-0.373988 0.371795 -0.330899 0 1 0
+0.213921 -0.371795 -0.23745 0 1 0
+0.422218 0.294872 -0.138965 0 1 0
+0.140168 -0.294872 0.00884451 0.576521 0.811098 0.0987126
+-0.5 0.220612 0.242005 1 0 0
+0.0948537 -0.0539061 0.320513 0 0 1
+0.326312 0.109715 0.371795 0 0 1
+-0.229162 -0.185755 0.371795 0 0 1
+0.0117644 -0.256282 0.343685 0 1 0
+0.320513 -0.142593 -0.363831 0.989171 -0.00912188 0.146486
+-0.15274 0.136104 0.356273 0.73572 -0.677286 0
+0.094601 0.371795 0.172843 0 1 0
+0.5 -0.146614 0.138957 1 0 0
+-0.0346451 0.067525 0.320513 0 0 1
+0.448718 -0.33098 -0.057838 1 0 0
+0.0927319 -0.294872 0.0441147 0 1 0
+0.218813 -0.0693445 0.371795 0 0 1
+-0.422001 -0.0417951 0.320513 0 0 1
+-0.281169 0.0772541 -0.333333 0 0 1
+-0.398535 -0.371795 0.211886 0 1 0
+-0.0503096 0.23975 -0.371795 -0.0294913 0.092805 0.995247
+-0.123868 0.108456 -0.333333 0 0 1
+-0.45956 0.145145 -0.371795 0 0 1
+-0.448718 -0.338225 0.278631 1 0 0
+0.138057 0.371795 0.0332236 0.335005 0.940759 -0.052387
+0.015043 -0.273038 0.320513 0 0 1
+0.141109 -0.324403 0.104615 1 0 0
+0.22922 -0.140074 0.371795 0 0 1
+-0.5 0.347662 0.246069 1 0 0
+0.260679 0.294872 0.295829 0 1 0
+-0.28385 -0.129776 0.371795 0 0 1
+0.221472 0.286966 0.320513 -0.016384 0.202381 0.97917
+0.5 -0.0481783 0.23832 1 0 0
+0.113754 -0.0637515 0.320513 0 0 1
+0.283437 -0.197506 0.371795 0.365507 -0.211117 0.906551
+0.0831141 0.172671 0.320513 0 0 1
+0.141026 0.350268 0.240633 1 0 0
+-0.244932 -0.363385 0.320513 -0.0645651 -0.195072 0.978661
+0.0645622 -0.293419 0.320513 -0.28481 -0.541004 0.791327
+0.103233 -0.26613 -0.371795 0 0 1
+-0.439804 -0.371795 0.0880191 0.0560285 0.998422 0.00374849
+0.448718 -0.35566 -0.078383 1 0 0
+-0.407626 0.0534706 -0.371795 0 0 1
+0.361605 -0.371795 0.196407 0 1 0
+-0.390692 -0.20593 -0.371795 0 0 1
+0.279656 -0.257891 0.320513 0 0 1
+-0.484235 -0.294872 0.190949 0 1 0
+0.396502 0.121612 0.320513 0 0 1
+0.275406 -0.0462651 -0.333333 0 0 1
+-0.5 0.116392 0.0770899 1 0 0
+0.376368 -0.0618071 0.35522 0.977146 -0.212568 0
+-0.390735 0.371795 -0.0344317 0 1 0
+-0.5 0.114645 -0.101076 1 0 0
+-0.235386 -0.371795 0.132057 0 1 0
+-0.0137724 0.371795 -0.333577 0 1 0
+0.0932045 0.371795 0.046832 0 1 0
+0.187702 -0.371795 -0.115463 0 1 0
+0.5 -0.209752 -0.257085 1 0 0
+0.5 0.161675 0.239788 1 0 0
+-0.433343 -0.371795 -0.305795 0 1 0
+0.395541 -0.371795 -0.185339 0 1 0
+0.376326 -0.371795 0.0528235 0 1 0
+-0.30502 0.0156411 0.371795 0 0 1
+0.110252 -0.00272553 0.320513 0 0 1
+-0.354682 0.251234 0.320513 0 0 1
+0.194356 0.0121422 -0.170002 0.940975 -0.338334 -0.00980591
+0.149247 0.294872 0.146128 0.0772914 0.996616 0.0279756
+-0.5 -0.198886 0.206725 1 0 0
+-0.148289 0.371795 0.317725 -0.0996707 0.98398 0.147816
+0.349 -0.371795 0.315853 -0.051119 0.981617 -0.183887
+0.5 -0.0932704 0.290937 1 0 0
+-0.5 0.0440026 -0.0586254 1 0 0
+-0.164084 0.122844 0.360655 0.821639 -0.570008 0
+0.181907 -0.165684 0.371795 0 0 1
+-0.428082 0.104715 0.320513 0 0 1
+-0.0630661 0.163392 0.320513 0 0 1
+-0.16583 -0.203918 0.371795 0 0 1
+-0.5 -0.294328 -0.169341 0.512593 0.858596 -0.00783721
+0.488137 -0.294872 0.0662887 -0.0263552 0.999589 0.0112679
+0.267605 -0.010566 -0.200249 0.966748 -0.255731 0
+-0.362961 0.359249 -0.371795 0 0 1
+-0.199399 -0.0300404 -0.0965846 0.784018 -0.620723 -0.00426983
+-0.320513 0.00265128 -0.359994 1 0 0
+0.5 0.159281 -0.120358 1 0 0
+-0.218069 -0.0831302 -0.333333 0 0 1
+0.5 0.218066 0.16442 1 0 0
+-0.192838 -0.0696033 0.32175 0.537253 0.128133 0.833631
+0.5 -0.0661144 0.247768 1 0 0
+0.433195 0.294872 -0.289239 0 1 0
+-0.0510181 -0.00207954 0.320513 0 0 1
+-0.482143 -0.121984 -0.371795 0 0 1
+-0.5 0.190918 -0.0775178 1 0 0
+0.388172 -0.371795 -0.225613 0 1 0
+0.23671 0.294872 0.299447 0 1 0
+-0.251992 0.0306019 -0.0315271 -0.322797 0.529406 0.784558
+-0.171765 -0.0400115 0.320513 0 0 1
+0.0836271 -0.0988958 -0.333333 0 0 1
+-0.371297 0.0472401 -0.371795 0 0 1
+0.144108 0.125907 0.320513 0 0 1
+0.360894 0.00388359 0.371795 0 0 1
+-0.401031 0.371795 0.160439 0 1 0
+0.363342 -0.0631345 0.371795 0 0 1
+-0.428886 -0.257089 -0.371795 0 0 1
+0.5 -0.0466837 -0.335763 1 0 0
+0.5 -0.141208 -0.10176 1 0 0
+0.189694 0.294872 0.263593 0 1 0
+0.01738 0.151779 -0.333333 0 0 1
+0.185506 0.224609 -0.333333 -0.137347 0.284422 0.94881
+0.12957 -0.132839 0.320513 0 0 1
+-0.0523764 0.223185 -0.333333 0.0779521 0.348678 0.933995
+-0.169407 0.371795 -0.084819 0 1 0
+-0.424809 0.371795 -0.204785 0 1 0
+0.277107 -0.371795 -0.156267 0 1 0
+-0.135831 0.0185304 0.320513 0 0 1
+-0.095881 -0.294872 0.27628 0 1 0
+0.4967 0.135417 -0.371795 -0.255975 -0.00584127 0.966666
+0.189194 0.294872 0.15279 0 1 0
+-0.226122 -0.371795 0.288385 0 1 0
+-0.207112 0.371795 0.0116379 0 1 0
+-0.0837956 0.0729891 0.320513 0 0 1
+0.0275743 -0.0193018 0.320513 0 0 1
+0.358475 0.294872 -0.0216153 0 1 0
+-0.143145 -0.216127 0.371795 0 0 1
+0.5 0.00915274 0.209777 1 0 0
+-0.16321 -0.253778 0.347584 0.121501 0.992572 0.00619018
+0.210286 -0.371795 0.279958 0 1 0
+-0.448718 -0.333351 -0.032248 1 0 0
+0.244141 0.0360408 -0.0700962 0.412819 0.910801 -0.00463919
+-0.463567 0.0567695 0.320513 0 0 1
+0.13958 -0.294872 0.196815 0.665165 0.746344 -0.0229375
+0.0665547 0.126608 0.320513 0 0 1
+-0.5 -0.091148 0.211821 1 0 0
+0.141109 -0.303387 -0.118907 0.99682 0.071089 0.0360176
+-0.249117 0.371795 0.297036 0 1 0
+-0.190704 -0.265988 -0.371795 0 0 1
+0.395818 -0.371795 -0.001456 0 1 0
+0.5 -0.0918024 0.0475525 1 0 0
+0.379968 -0.045255 0.364115 0.982646 -0.148144 0.111624
+0.102291 0.130365 -0.333333 0 0 1
+-0.0879957 0.371795 -0.246901 0 1 0
+0.448718 -0.35146 0.194472 1 0 0
+-0.0475369 -0.294872 0.239492 0 1 0
+0.5 -0.133429 0.239402 1 0 0
+0.105691 -0.0887914 0.320513 0 0 1
+0.201865 0.0361224 0.371795 0.653426 0.274964 -0.705287
+-0.448718 -0.301356 0.0611628 0.97321 0.229347 -0.0161812
+-0.0270035 0.0557995 0.320513 0 0 1
+-0.495789 -0.0480401 0.320513 -0.485791 -0.0139874 0.873963
+0.277216 -0.213112 0.320513 0.105255 -0.438489 0.892552
+-0.448718 -0.366261 -0.329073 0.927762 0.372602 -0.020615
+-0.5 -0.0887761 -0.0630285 1 0 0
+0.448718 -0.354671 -0.194217 1 0 0
+-0.222695 -0.256992 -0.371795 0 0 1
+-0.5 0.231127 -0.0903787 1 0 0
+-0.122388 -0.163955 0.33049 0.614207 0.789145 0
+-0.463975 0.371795 -0.165621 0 1 0
+-0.10696 0.371795 -0.0486363 0 1 0
+0.271048 -0.283224 0.320513 0 0 1
+-0.268895 0.0209878 -0.0948382 0.876584 -0.48117 -0.00874202
+0.472356 -0.294872 0.0376589 0 1 0
+-0.260931 -0.154982 -0.333333 0 0 1
+-0.148186 -0.299534 0.320513 0.162158 0.056927 0.985121
+-0.0107358 -0.294872 -0.36455 0.0457388 0.978403 0.201584
+-0.118896 -0.0453099 -0.333333 0 0 1
+0.0823644 -0.294872 0.164506 0 1 0
+-0.5 0.225495 -0.0277819 1 0 0
+-0.0495764 -0.124138 -0.333333 0 0 1
+0.261685 -0.228459 -0.339649 -0.287334 0.941976 -0.173551
+0.5 0.216751 0.171699 1 0 0
+-0.0878076 -0.129944 0.320513 0 0 1
+-0.275197 -0.28937 -0.371795 0 0 1
+0.5 -0.199689 -0.349273 1 0 0
+0.253673 -0.371795 -0.35772 0 1 0
+-0.320513 -0.0626351 -0.370838 0.932376 -0.0169222 -0.361093
+0.192729 0.00481573 -0.162234 0.991646 -0.127961 0.0162637
+-0.5 -0.214789 0.236306 1 0 0
+0.0573568 0.239418 -0.371795 0.0816593 0.15771 0.984103
+-0.465747 0.371795 0.0834433 0 1 0
+-0.16958 0.200602 -0.333333 0 0 1
+-0.187869 0.00767078 -0.129473 0.986226 0.164524 0.0170277
+0.429594 0.294872 -0.0170737 0 1 0
+-0.262686 0.0294942 -0.201369 0.732771 -0.68006 -0.0237532
+-0.15786 -0.0450125 -0.333333 0 0 1
+0.179534 -0.0991973 0.32868 0.877968 -0.463735 -0.118833
+0.5 0.0661927 0.272852 1 0 0
+-0.336648 -0.237436 0.320513 0 0 1
+0.388819 0.294872 -0.081569 0 1 0
+0.5 -0.211302 -0.207672 1 0 0
+-0.129349 0.158536 0.369829 0.37721 -0.600527 0.705039
+0.431875 0.294872 -0.298632 0 1 0
+-0.5 0.286681 -0.200906 1 0 0
+-0.227579 -0.371795 -0.0237664 0 1 0
+0.178355 0.294872 -0.261776 0 1 0
+0.0720049 -0.175468 0.320513 0 0 1
+0.5 -0.286394 -0.222824 0.999976 -0.0064793 -0.00249595
+-0.5 -0.239484 0.08053 1 0 0
+-0.322801 0.0439913 -0.371795 0.906869 0.0837419 -0.413009
+-0.5 -0.28786 0.0213746 0.979569 0.175164 0.0987984
+-0.262454 -0.123678 -0.333333 0 0 1
+0.154843 0.130883 -0.333333 0 0 1
+-0.412333 0.371795 -0.00494539 0 1 0
+0.145719 -0.0245635 0.320513 0 0 1
+-0.131017 -0.294872 0.0237607 -0.108436 0.993242 -0.0413861
+-0.5 -0.253662 0.0710019 1 0 0
+-0.5 -0.225011 0.0167978 1 0 0
+-0.426166 -0.146663 -0.371795 0 0 1
+-0.231805 -0.250447 0.320513 0 0 1
+0.139206 -0.0102196 -0.333333 0 0 1
+-0.245602 0.0898525 0.371795 0 0 1
+-0.310504 0.108844 -0.333333 -0.115356 0.0174878 0.99317
+0.141109 -0.337665 -0.055348 1 0 0
+0.099092 0.371795 -0.157947 0 1 0
+0.486067 -0.294872 -0.0963429 0 1 0
+-0.455027 -0.294872 -0.0508301 0.0848482 0.995759 0.0355671
+0.363624 -0.208577 -0.371795 0 0 1
+0.5 0.261731 -0.208416 1 0 0
+0.214631 0.0641593 -0.333333 0 0 1
+0.141109 -0.36736 -0.0937143 0.906823 0.420966 0.0214464
+-0.0285698 0.371795 -0.0661333 0 1 0
+-0.40459 0.349866 0.320513 0 0 1
+-0.389417 -0.161989 -0.371795 0 0 1
+0.5 0.0837714 -0.00334172 1 0 0
+-0.5 -0.258042 0.269234 1 0 0
+-0.0274057 0.371795 0.057695 0 1 0
+-0.0568034 0.0661909 0.320513 0 0 1
+0.0399185 0.335312 0.320513 0 0 1
+-0.5 0.0918357 0.0341548 1 0 0
+-0.5 -0.223885 -0.0656646 1 0 0
+0.33406 -0.371795 0.097901 0 1 0
+-0.347641 -0.371795 0.319605 -0.00218703 0.808294 -0.588776
+0.370484 0.0819147 0.342203 0.937416 0.348212 0
+0.5 -0.177393 0.191265 1 0 0
+0.107979 0.256282 0.368985 0.0308165 0.785951 0.61752
+0.446947 0.0205881 -0.371795 0 0 1
+0.301944 -0.0187081 -0.333333 0 0 1
+-0.15429 -0.189884 0.371795 0 0 1
+0.141026 0.350535 -0.241574 1 0 0
+-0.5 0.150449 -0.107274 1 0 0
+-0.5 -0.267759 -0.109414 1 0 0
+-0.313691 0.371795 -0.0952365 0 1 0
+-0.0402898 -0.158096 -0.333333 0 0 1
+0.5 0.194806 -0.182819 1 0 0
+0.250852 -0.0327119 -0.246657 -0.550337 0.834846 0.0127104
+0.284375 0.202413 0.32665 0.540781 0.787638 0.295267
+-0.231719 0.314489 0.320513 0 0 1
+-0.5 0.0518558 -0.10759 1 0 0
+0.141026 0.353628 0.180857 1 0 0
+0.420853 0.294872 0.0896324 0 1 0
+0.379818 0.0459449 0.358395 0.977147 0.212567 0
+0.5 0.109381 -0.208848 1 0 0
+0.402048 0.148714 -0.371795 0 0 1
+0.495963 -0.294872 0.229066 -0.166985 0.985959 0.00119274
+-0.027107 0.161175 0.320513 0 0 1
+-0.208817 -0.085344 -0.333333 0 0 1
+-0.0875038 0.371795 -0.00587876 0 1 0
+0.5 0.126983 -0.0688595 1 0 0
+0.5 0.0715942 0.313274 0.98553 -0.0890812 0.144203
+-0.214025 -0.371795 -0.35364 0 1 0
+0.406526 -0.0312271 0.320513 0 0 1
+0.176215 0.0812831 0.320513 -0.0135793 -0.00889175 0.999868
+-0.217253 0.33535 -0.371795 0 0 1
+0.5 -0.233531 0.0616523 1 0 0
+-0.296205 -0.34712 0.320513 0 0 1
+-0.0353039 0.314642 0.320513 0 0 1
+-0.5 0.332096 0.233583 1 0 0
+-0.5 -0.0502673 0.0820857 1 0 0
+0.0441211 -0.294872 0.0535355 0 1 0
+-0.0995953 0.371795 0.0928811 0 1 0
+0.5 0.173763 0.138532 1 0 0
+-0.451125 0.371795 -0.0242537 0 1 0
+-0.0479294 0.0944226 -0.333333 0 0 1
+-0.477522 -0.294872 -0.268377 0 1 0
+-0.414266 -0.371795 0.17687 0 1 0
+-0.5 -0.111392 0.082707 1 0 0
+-0.5 0.304897 0.274238 1 0 0
+0.0722988 -0.256617 -0.371795 0 0 1
+-0.0403158 -0.280891 0.320513 0 0 1
+0.5 0.187695 0.0241753 1 0 0
+0.5 -0.144358 -0.0932761 1 0 0
+0.5 -0.110918 -0.275261 1 0 0
+-0.0437203 0.0136408 0.320513 0 0 1
+0.5 -0.118264 -0.068474 1 0 0
+0.028405 0.297606 -0.371795 0 0 1
+0.383962 0.294872 -0.0323044 0 1 0
+0.5 0.266091 0.253292 1 0 0
+-0.5 0.36167 0.0922181 1 0 0
+-0.5 0.0709879 0.267665 1 0 0
+-0.388994 -0.0297589 -0.371795 0 0 1
+-0.0379956 0.00851153 -0.333333 0 0 1
+0.448718 -0.369617 0.0873239 0.853717 -0.520323 -0.0207605
+-0.33804 0.0968479 0.371795 0 0 1
+0.3765 0.0611977 0.362307 0.977144 0.212578 0
+-0.112877 0.371795 0.236354 0 1 0
+0.265304 -0.0650501 -0.333333 0 0 1
+0.0946156 0.371795 -0.371274 0.00753074 0.923412 -0.383737
+0.421704 -0.371795 0.300588 0 1 0
+-0.5 0.241955 -0.339439 1 0 0
+-0.424945 0.0491087 -0.371795 0 0 1
+0.103737 0.371795 0.0634686 0 1 0
+0.192715 -0.0655359 0.320513 0.646105 -0.279567 -0.710205
+-0.5 0.0409283 0.0183112 1 0 0
+-0.354612 -0.132693 0.320513 -0.350366 -0.127752 0.927859
+-0.0546944 -0.294872 -0.218669 0 1 0
+0.335464 0.0162555 -0.371795 0 0 1
+-0.0472672 0.371795 0.266984 0 1 0
+-0.371697 -0.0281089 0.371795 0 0 1
+-0.237845 0.11773 0.371795 0 0 1
+0.5 -0.219406 0.278291 1 0 0
+-0.250473 -0.230295 -0.364051 0.117854 0.986018 -0.117807
+-0.448718 -0.336869 0.0875815 1 0 0
+0.5 0.285827 0.153199 0.958458 0.278551 0.0613848
+-0.247043 0.371795 0.289545 0 1 0
+-0.00443863 0.179493 -0.333333 0 0 1
+0.317449 0.112167 0.371795 0 0 1
+0.5 0.0579035 0.132137 1 0 0
+-0.0689962 0.360118 0.320513 -0.0037146 0.0160259 0.999865
+0.5 -0.0809388 0.260747 1 0 0
+0.157149 -0.288163 -0.371795 0 0 1
+0.456326 0.294872 -0.26941 0 1 0
+0.5 0.272177 -0.00922333 1 0 0
+-0.436466 0.371795 0.0442621 0 1 0
+-0.22421 -0.25112 -0.371795 0 0 1
+-0.0581228 -0.294872 0.0905135 0 1 0
+0.29712 -0.371795 0.189575 0 1 0
+0.22859 0.294872 -0.125224 0 1 0
+-0.400662 -0.280344 -0.371795 0 0 1
+0.5 0.162803 -0.317911 1 0 0
+0.122143 -0.230897 -0.341435 -0.00608848 0.99405 -0.108758
+0.0842895 0.371795 -0.368995 -0.0867506 0.945344 -0.314323
+0.5 0.150106 -0.00218913 1 0 0
+-0.115629 -0.294872 -0.178547 0 1 0
+0.455444 0.294872 0.267199 0 1 0
+-0.437161 -0.165256 -0.371795 0 0 1
+-0.448323 -0.371795 0.198507 0.625984 0.741741 -0.240757
+0.0124792 0.371795 -0.157984 0 1 0
+-0.347955 0.130953 0.33997 0.876946 -0.48059 0
+0.5 -0.0528004 0.0349075 1 0 0
+0.187407 0.183792 0.371795 0 0 1
+0.244142 0.205789 0.371795 0 0 1
+0.5 -0.224445 0.156463 1 0 0
+0.425357 0.294872 -0.129015 0 1 0
+0.0638427 -0.294872 0.207785 0 1 0
+-0.117661 0.371795 -0.151499 0 1 0
+0.5 -0.0590646 -0.162478 1 0 0
+-0.448718 -0.301229 -0.270348 0.9655 0.25875 -0.0293007
+0.376468 -0.061345 0.350695 0.977148 -0.212559 0
+0.473592 -0.0952928 -0.371795 0 0 1
+-0.448718 -0.347946 -0.125836 1 0 0
+0.310327 0.260456 0.320513 0 0 1
+0.042899 0.371795 -0.215616 0 1 0
+0.2581 0.026855 -0.273307 0.698933 0.715142 -0.00809886
+0.5 0.133655 -0.0351911 1 0 0
+0.5 0.149997 -0.125264 1 0 0
+-0.23987 -0.327554 0.320513 0 0 1
+0.0474722 -0.294872 -0.298933 0 1 0
+0.5 -0.258444 0.320273 0.562945 0.013803 0.826379
+-0.154476 -0.371795 -0.167894 -0.0131815 0.999911 -0.00219485
+0.44813 -0.371795 -0.00503295 -0.630632 0.776052 -0.00681834
+0.345138 0.294872 0.14997 0 1 0
+0.16775 0.090632 0.320513 0 0 1
+0.481024 -0.191529 -0.371795 0 0 1
+-0.320513 -0.0822934 -0.367534 0.922632 -0.128738 -0.36356
+-0.231601 0.313477 -0.371795 0 0 1
+0.197258 0.0187946 -0.29673 0.887536 -0.460574 -0.0123437
+0.141118 -0.371795 0.132746 0.665934 0.744967 -0.0394489
+0.309479 0.18024 0.322766 0.587715 0.656593 0.472733
+0.426202 -0.371795 -0.126585 0 1 0
+-0.387002 0.0705294 0.320513 0 0 1
+0.5 0.269852 -0.188756 1 0 0
+0.34202 -0.371795 -0.286768 0 1 0
+-0.442634 0.0672565 0.320513 0 0 1
+-0.187813 0.00723794 -0.0388445 0.949782 0.225953 0.216469
+0.375841 0.294872 0.087993 0 1 0
+0.185276 -0.320435 0.320513 0 0 1
+-0.47182 -0.294872 -0.254688 0 1 0
+-0.5 -0.100237 -0.0178877 1 0 0
+0.5 0.251856 0.06931 1 0 0
+-0.151462 -0.254618 0.344844 0.0715263 0.997439 0.000141492
+0.239134 0.230684 0.363494 0.424525 0.890102 0.165823
+-0.36889 0.342582 -0.371795 0 0 1
+0.00273475 0.371795 -0.122048 0 1 0
+-0.5 0.105055 0.0655047 1 0 0
+-0.392845 -0.370331 0.320513 0.0206957 0.765089 -0.643591
+0.305013 0.199854 -0.350867 0.806726 0.59082 -0.0111688
+0.0111175 0.0494848 0.320513 0 0 1
+0.5 -0.0122205 -0.315747 1 0 0
+0.321299 -0.371795 0.27341 0 1 0
+-0.164094 -0.371795 -0.284465 0 1 0
+-0.234771 -0.371795 0.218936 0 1 0
+0.285777 -0.201363 0.333531 -0.599273 0.800544 0
+0.26921 -0.282915 0.320513 0 0 1
+0.212871 -0.03393 -0.315539 0.479644 0.877463 0
+-0.5 0.177473 -0.186723 1 0 0
+0.5 0.0145396 0.0262058 1 0 0
+0.255372 0.203461 -0.333333 0 0 1
+0.141109 -0.325265 -0.289892 1 0 0
+-0.212172 0.371795 -0.343161 0 1 0
+-0.052631 0.371795 -0.27552 0 1 0
+-0.0726434 -0.294872 0.320266 0.126903 0.927816 -0.350789
+-0.414133 0.371795 0.125292 0 1 0
+-0.177944 -0.371795 -0.348441 0 1 0
+0.31136 -0.247007 -0.371795 0 0 1
+0.396151 -0.154195 -0.371795 0 0 1
+-0.5 0.0229236 0.217193 1 0 0
+-0.210872 -0.0748298 0.371795 0 0 1
+0.435432 -0.371795 0.113178 0 1 0
+-0.166833 0.0249843 0.320513 0 0 1
+0.305727 0.212081 -0.371795 0.219452 0.0627135 0.973606
+0.133718 -0.294872 -0.358361 0.171067 0.985259 0
+0.349739 0.117883 -0.371795 0 0 1
+0.5 -0.237543 0.149369 1 0 0
+-0.222664 0.042784 -0.0352973 0.0693537 0.737597 0.67167
+-0.0954684 0.371795 0.18734 0 1 0
+0.271351 0.294872 -0.131197 0 1 0
+-0.5 0.198919 0.042906 1 0 0
+0.5 0.147953 -0.248343 1 0 0
+-0.30318 -0.371795 -0.318443 0 1 0
+0.157026 0.294872 0.0230707 0 1 0
+-0.260296 -0.371795 0.283329 0 1 0
+0.5 -0.175792 -0.257909 1 0 0
+-0.5 0.285471 0.308707 1 0 0
+0.446727 -0.312571 -0.371795 -0.568821 0.153521 0.808006
+0.5 -0.0608125 -0.145616 1 0 0
+0.5 4.77731e-005 0.267562 1 0 0
+0.231388 -0.253549 0.320513 0 0 1
+0.0540303 -0.294872 -0.0592162 0 1 0
+-0.0151413 0.371795 0.299332 0 1 0
+0.260229 -0.371795 0.0120139 0 1 0
+-0.320626 -0.0590873 0.371795 0 0 1
+-0.141154 -0.34962 -0.0544883 1 0 0
+-0.402636 0.0136285 -0.371795 0 0 1
+0.5 0.156929 -0.305012 1 0 0
+-0.058973 0.371795 0.306111 0 1 0
+-0.328282 0.371795 0.0132112 0 1 0
+-0.106677 0.188555 -0.333333 0 0 1
+0.0145372 -0.294872 -0.210533 0 1 0
+0.130267 -0.194839 0.371795 0 0 1
+-0.271641 0.0150994 -0.210515 0.937332 -0.348343 0.00807865
+-0.5 -0.164079 -0.359004 1 0 0
+0.5 -0.0757212 -0.19155 1 0 0
+-0.154825 0.0345771 0.320513 0 0 1
+0.141026 0.341517 0.0880215 1 0 0
+0.217029 -0.0358687 -0.098253 0.363873 0.931378 -0.011427
+-0.278226 -0.371795 -0.108542 0 1 0
+-0.5 0.101996 -0.318641 1 0 0
+-0.5 -0.202982 -0.184534 1 0 0
+0.5 -0.272373 -0.333334 1 0 0
+-0.5 0.156962 -0.0496613 1 0 0
+0.141026 0.362253 -0.183697 0.999987 0.00504514 -0.000504221
+-0.260117 0.371795 0.219649 0 1 0
+-0.474484 0.371795 -0.25512 0 1 0
+0.5 0.083165 0.311389 0.999966 0.00370095 0.00739638
+0.0884784 -0.143438 0.320513 0 0 1
+0.0792223 0.0742871 0.320513 0 0 1
+0.230196 0.294872 -0.0843701 0 1 0
+0.141109 -0.339029 0.24414 1 0 0
+0.5 0.293955 -0.130351 0.604464 0.796024 -0.0311147
+-0.015018 -0.204973 -0.333333 0 0 1
+-0.5 -0.104718 0.134224 1 0 0
+0.141026 0.325793 -0.179207 1 0 0
+-0.263405 0.371795 -0.347709 0 1 0
+0.220984 -0.371795 -0.365985 -0.0168329 0.977315 0.21112
+0.217404 -0.371795 -0.133791 0 1 0
+0.141026 0.369708 -0.129283 0.751003 0.659527 -0.0319193
+0.5 -0.0399807 -0.308065 1 0 0
+-0.223671 -0.0429688 -0.279631 -0.185799 0.982579 -0.00425488
+0.355712 0.00779262 -0.371795 0 0 1
+-0.2579 -0.071308 -0.333333 0 0 1
+-0.141154 -0.359308 0.0796196 1 0 0
+0.5 0.00261594 0.296348 1 0 0
+0.5 0.0823565 0.0536651 1 0 0
+0.0930616 -0.294872 -0.23084 0 1 0
+-0.284049 -0.189747 0.371795 -0.0153793 -0.0174591 0.999729
+0.132697 0.371795 0.204982 0.196147 0.979553 -0.0447354
+-0.400417 0.0781865 0.320513 0 0 1
+-0.457537 -0.294872 -0.178918 0.131941 0.990337 -0.0427032
+-0.28838 0.371795 -0.18844 0 1 0
+0.491345 -0.294872 -0.349958 -0.145104 0.989416 0
+0.146376 -0.163151 0.371795 0 0 1
+0.0120672 0.371795 0.134642 0 1 0
+0.101533 0.371795 -0.342844 0 1 0
+-0.186014 -0.205108 -0.333333 0 0 1
+0.340314 0.100651 0.371795 0 0 1
+-0.353076 0.371795 -0.243898 0 1 0
+-0.448718 -0.324835 -0.0658448 1 0 0
+-0.0785635 -0.294872 -0.0541838 0 1 0
+0.0483482 0.0232105 0.320513 0 0 1
+0.279482 0.188853 0.371795 0 0 1
+-0.156062 0.371795 0.220907 0 1 0
+-0.5 -0.102505 0.0285308 1 0 0
+-0.5 -0.0202293 0.314397 0.919517 -0.0175206 -0.392658
+0.226535 0.294872 0.0559454 0 1 0
+0.44384 0.0489908 -0.371795 0 0 1
+0.175889 -0.371795 0.024353 0 1 0
+-0.448718 -0.340503 -0.243716 1 0 0
+-0.196132 -0.371795 -0.301271 0 1 0
+0.5 -0.0360037 0.195204 1 0 0
+0.5 -0.0935663 -0.337663 1 0 0
+0.25249 0.294872 0.15026 0 1 0
+-0.446411 0.371795 -0.0924394 0 1 0
+0.161714 0.213962 0.371795 0 0 1
+0.365215 0.294872 0.0027242 0 1 0
+-0.5 -0.213314 -0.296614 1 0 0
+-0.261624 0.0305562 -0.203406 -0.700228 0.713881 0.00732522
+0.141109 -0.322634 -0.226721 1 0 0
+-0.5 -0.130583 -0.0610753 1 0 0
+0.21252 0.281162 -0.371795 0 0 1
+0.5 0.154902 -0.287129 1 0 0
+-0.28569 -0.06376 0.371795 0 0 1
+-0.448718 -0.367871 -0.0162589 0.909033 0.405427 -0.0963778
+-0.141154 -0.310071 0.0727123 1 0 0
+-0.448718 -0.304959 -0.277194 1 0 0
+0.419786 -0.228113 0.320513 0 0 1
+0.114289 -0.294872 -0.370155 -0.113785 0.792114 0.599674
+-0.146651 -0.0110673 0.320513 0 0 1
+-0.225947 0.371795 -0.218848 0 1 0
+-0.0129105 -0.249241 -0.371795 0 0 1
+0.095904 0.371795 0.23703 0 1 0
+-0.0251349 -0.0280234 -0.333333 0 0 1
+-0.461102 0.371795 -0.0260836 0 1 0
+-0.330017 -0.0472188 -0.371795 -0.0549333 -0.021422 0.99826
+0.101551 -0.294872 -0.193685 0 1 0
+0.00345979 -0.0244472 -0.333333 0 0 1
+0.5 -0.187355 0.145322 1 0 0
+0.330267 0.156639 0.327579 0.691306 0.633697 0.347166
+-0.141154 -0.33784 -0.238917 1 0 0
+0.311454 0.294872 0.109549 0 1 0
+-0.443579 0.371795 0.183476 0 1 0
+-0.246695 0.0374162 0.371795 0 0 1
+0.0308827 -0.294872 0.166808 0 1 0
+-0.162631 0.315408 -0.371795 0 0 1
+0.140984 -0.294872 -0.289229 0.651113 0.75761 0.0455929
+0.433693 0.0466132 0.320513 0 0 1
+0.43393 -0.286849 -0.371795 0 0 1
+0.0632039 -0.0448516 -0.333333 0 0 1
+-0.121442 0.256282 0.360773 -0.000200314 0.999902 0.0140324
+0.425182 0.151674 -0.371795 0 0 1
+0.368628 -0.371795 0.106898 0 1 0
+-0.374716 0.371795 -0.0436557 0 1 0
+0.295531 -0.305426 -0.371795 0 0 1
+-0.5 -0.10896 0.302607 1 0 0
+-0.0443926 -0.294872 0.0503641 0 1 0
+-0.0449531 -0.195661 0.320513 -0.126168 0.40134 0.907198
+-0.272172 -0.0132611 -0.323888 0.943953 0.315264 -0.0977867
+0.256547 -0.371795 -0.180988 0 1 0
+-0.308393 0.023167 0.371795 0 0 1
+-0.0738459 0.183832 0.320513 0.00113525 -0.087902 0.996128
+0.177646 0.250852 0.347104 0.212554 0.977149 0
+-0.131861 0.157983 -0.333333 0 0 1
+0.122463 0.274766 0.320513 0 0 1
+0.0143323 0.171989 -0.333333 0 0 1
+0.0533195 -0.242551 -0.371795 0 0 1
+-0.0577704 0.371795 0.278199 0 1 0
+-0.5 0.344259 -0.35629 1 0 0
+-0.174921 0.277041 -0.371795 0 0 1
+-0.18231 0.371795 -0.309747 0 1 0
+-0.289341 -0.371795 0.280594 0 1 0
+-0.5 -0.0244991 0.313665 0.953308 0.0145271 -0.301652
+-0.175883 0.371795 -0.0770864 0 1 0
+0.397055 0.294872 -0.354552 0 1 0
+0.101041 0.177573 0.320513 -0.188162 -0.549189 0.81424
+-0.165613 -0.120505 0.353775 0.837155 0.546966 0
+-0.218521 -0.371795 -0.0138537 0 1 0
+0.413227 0.294872 -0.0097309 0 1 0
+-0.215868 -0.371795 -0.13068 0 1 0
+0.5 -0.0292566 -0.142002 1 0 0
+0.24591 0.00707185 0.0130307 0.479734 0.199796 0.854363
+0.5 -0.231131 0.165645 1 0 0
+-0.194618 -0.290942 -0.371795 0 0 1
+0.448718 -0.311394 -0.169429 1 0 0
+0.0769538 0.371795 -0.248471 0 1 0
+-0.116743 0.371795 -0.0834495 0 1 0
+-0.475148 0.120212 -0.371795 0 0 1
+-0.124153 0.371795 -0.290835 0 1 0
+0.441753 -0.359641 -0.371795 -0.251925 -0.0862165 0.963899
+0.127397 0.371795 0.159154 0 1 0
+0.448718 -0.340326 -0.359716 1 0 0
+-0.5 0.34732 -0.00189841 1 0 0
+-0.374334 0.0711536 0.337159 0.963778 -0.266576 -0.00836121
+0.10521 -0.230897 -0.339539 0.0229406 0.993121 -0.114822
+-0.220107 -0.370931 -0.371795 -0.137221 0.246496 0.95938
+0.254181 0.294872 0.243536 0 1 0
+0.450476 -0.213769 0.320513 0 0 1
+0.18006 0.294872 0.0235345 0 1 0
+0.321594 0.0208247 -0.371795 0.480286 -0.0839292 0.873087
+0.194232 0.177392 0.371795 0 0 1
+0.5 -0.0698723 0.135934 1 0 0
+-0.5 -0.123827 -0.29663 1 0 0
+-0.276208 -0.242938 -0.371795 0 0 1
+-0.141323 0.371795 0.264499 0 1 0
+0.146259 -0.315271 0.320513 -0.409509 0.0351096 0.91163
+-0.268827 0.00434161 -0.0321608 -0.624486 0.0412428 0.779946
+-0.5 -0.0389498 -0.285005 1 0 0
+-0.251238 0.144994 -0.333333 0 0 1
+-0.252834 0.154663 -0.333333 0 0 1
+-0.461465 -0.173225 -0.371795 0 0 1
+0.5 0.294371 0.236424 0.596022 0.802537 -0.0263188
+-0.5 0.33256 0.268478 1 0 0
+0.106562 -0.21041 0.371795 0 0 1
+-0.108601 0.100791 -0.333333 0 0 1
+0.458637 -0.294872 -0.25552 0 1 0
+-0.5 -0.252454 0.162268 1 0 0
+-0.273332 -0.0089298 -0.181445 0.981568 0.190552 -0.0146265
+0.5 0.0573148 0.28916 1 0 0
+0.0359788 0.243035 -0.371795 0 0 1
+0.0316993 -0.0923874 -0.333333 0 0 1
+-0.315011 0.371795 -0.232063 0 1 0
+0.5 0.173002 -0.105965 1 0 0
+0.28694 -0.371795 -0.34577 0 1 0
+0.474039 0.294872 0.134725 0 1 0
+0.0422103 -0.0432944 0.320513 0 0 1
+0.141109 -0.33556 0.305894 1 0 0
+-0.412748 -0.176092 0.320513 0 0 1
+0.435662 0.294872 -0.0173929 0 1 0
+0.308507 0.0127541 0.371795 0 0 1
+0.256822 -0.371795 -0.0323757 0 1 0
+0.175443 0.294872 -0.306677 0 1 0
+-0.388587 0.371795 -0.052353 0 1 0
+-0.5 -0.208515 -0.206254 1 0 0
+-0.141154 -0.359811 -0.343492 1 0 0
+-0.10829 -0.294872 0.0943937 0 1 0
+-0.448718 -0.354114 0.124927 1 0 0
+0.0907269 0.371795 -0.0854327 0 1 0
+0.381264 -0.0392976 0.370207 0.882741 -0.0661358 0.465182
+-0.315448 -0.371795 -0.370748 0.0508522 0.76961 0.636486
+0.444245 -0.355941 -0.371795 -0.462059 0.138882 0.875907
+0.313633 -0.0316926 -0.333333 0.135402 0.110942 0.98456
+0.407666 0.118194 -0.371795 0 0 1
+-0.5 0.130681 -0.36647 0.990337 -0.00134434 0.138678
+0.5 0.252495 0.151411 1 0 0
+-0.0448322 -0.294872 -0.151912 0 1 0
+0.5 -0.116192 -0.0136878 1 0 0
+0.23703 -0.144123 0.371795 0 0 1
+0.213434 0.294872 -0.261533 0 1 0
+-0.215517 0.0408006 -0.279537 0.328491 0.944506 -0.00162888
+0.327458 -0.371795 -0.018354 0 1 0
+0.240363 -0.333248 -0.371795 0 0 1
+-0.291382 0.338831 -0.371795 0 0 1
+0.5 -0.0313212 -0.0697052 1 0 0
+-0.397035 -0.00212635 -0.371795 0 0 1
+0.0679468 -0.294872 0.0414622 0 1 0
+0.0849488 -0.294872 -0.20448 0 1 0
+-0.213434 -0.176126 0.371795 0 0 1
+-0.246038 0.0407928 -0.167075 -0.393276 0.919415 0.0032632
+0.280756 -0.371795 -0.168832 0 1 0
+-0.331208 0.371795 0.0225813 0 1 0
+-0.193058 -0.0218502 -0.202914 0.8658 -0.500391 0
+-0.0759997 -0.294872 -0.254209 0 1 0
+0.0699937 -0.187795 -0.333333 0 0 1
+0.186509 -0.371795 -0.264505 0 1 0
+0.448718 -0.36838 -0.08974 0.923466 -0.383336 -0.0162195
+-0.350849 -0.371795 -0.292982 0 1 0
+0.5 0.245942 -0.0354126 1 0 0
+-0.156507 -0.371795 0.132789 0 1 0
+-0.182743 -0.0836915 -0.333333 0 0 1
+-0.5 0.188378 -0.237744 1 0 0
+0.0450878 -0.294872 0.00864269 0 1 0
+0.141109 -0.368415 0.0282522 0.80817 0.58389 0.0770352
+-0.139826 -0.294872 -0.0333063 -0.500554 0.865085 -0.0327544
+-0.30949 -0.371795 -0.189517 0 1 0
+0.141026 0.30082 -0.0941432 0.936324 0.350502 0.0211159
+-0.405866 0.319158 -0.371795 0 0 1
+-0.5 0.0131593 -0.0179699 1 0 0
+-0.0208976 0.328082 0.320513 0 0 1
+0.5 -0.251347 -0.2942 1 0 0
+-0.12885 -0.294872 0.0836041 0 1 0
+-0.422687 -0.371795 0.200962 0 1 0
+-0.339163 0.144755 0.322929 0.694987 -0.559536 -0.451566
+-0.107774 0.371795 -0.120366 0 1 0
+0.24305 -0.217376 -0.333333 0 0 1
+-0.00215574 -0.294872 -0.095043 0 1 0
+-0.403537 -0.283021 -0.371795 0 0 1
+-0.23653 0.371795 -0.000609618 0 1 0
+-0.391492 -0.371795 0.0412338 0 1 0
+0.448718 -0.328295 -0.0629079 1 0 0
+0.330455 -0.155786 0.371795 0.507425 -0.259113 0.821815
+-0.0704271 0.371372 -0.371795 -0.0394532 -0.647581 0.760974
+0.400255 -0.371795 0.210616 0 1 0
+-0.5 0.172584 -0.203672 1 0 0
+-0.289302 0.355209 0.320513 0 0 1
+0.268912 -0.00363689 -0.0852892 0.993403 -0.114661 -0.00169633
+0.00337178 0.371795 0.0627751 0 1 0
+0.295116 0.0152305 -0.333333 0 0 1
+0.394004 -0.371795 0.292334 0 1 0
+0.233112 -0.371795 0.0903824 0 1 0
+-0.5 0.262536 -0.31858 1 0 0
+0.0538489 -0.294872 -0.204516 0 1 0
+0.448718 -0.365927 0.232646 0.965927 -0.257717 -0.023795
+0.0968862 -0.221606 0.371795 0 0 1
+0.279214 -0.0858865 -0.333333 0 0 1
+0.448718 -0.347603 0.154195 1 0 0
+-0.141154 -0.362079 -0.103544 0.999744 -0.016563 0.0154174
+-0.371496 0.371795 0.111328 0 1 0
+0.129161 0.158683 0.338226 0.614234 0.789124 0
+0.348083 0.244686 0.320513 0 0 1
+-0.0854406 -0.294872 -0.362204 0 1 0
+-0.208185 -0.153641 0.371795 0 0 1
+0.0727676 0.371795 -0.0100424 0 1 0
+-0.21101 0.371795 -0.225148 0 1 0
+-0.065647 0.238472 -0.371795 -0.00360827 0.0100191 0.999943
+0.407001 0.115976 -0.371795 0 0 1
+0.215889 -0.0353375 -0.275884 0.39634 0.918031 -0.0115595
+0.462002 0.294872 -0.206264 0 1 0
+-0.167454 -0.117686 0.361091 0.837163 0.546953 0
+0.0759356 0.371795 0.119007 0 1 0
+0.124794 0.162082 0.34475 0.614235 0.789123 0
+0.448718 -0.365677 -0.191998 0.953127 -0.301935 0.0196035
+0.5 0.0117244 -0.0268278 1 0 0
+-0.0986493 -0.256282 0.335308 0 1 0
+0.265249 -0.159905 -0.333333 0 0 1
+0.5 -0.289607 -0.139957 0.937869 -0.34699 0
+-0.373378 0.0864591 0.320513 -0.442709 0.20631 0.872608
+-0.430642 0.0272833 -0.371795 0 0 1
+0.5 0.263859 0.205716 1 0 0
+-0.183717 0.194441 0.371795 0 0 1
+0.331956 -0.154383 0.357933 0.800543 -0.599276 0
+0.324651 0.106496 -0.371795 0.760924 -0.0910247 0.642424
+0.448967 0.140685 0.320513 0 0 1
+-0.203895 0.016433 0.347312 0.996583 -0.0825942 0
+0.0201774 -0.0136068 -0.333333 0 0 1
+-0.5 -0.195149 -0.020576 1 0 0
+0.384615 0.181821 -0.371795 0 0 1
+0.490723 -0.294872 0.223219 -0.0404527 0.999152 -0.0077256
+-0.194004 0.0232021 -0.0736958 0.864621 0.502401 -0.00489054
+0.5 0.075765 0.146003 1 0 0
+0.492938 -0.212771 0.320513 0.139566 -0.0711588 0.987653
+0.5 0.0874576 -0.108632 1 0 0
+-0.203956 -0.371795 0.154047 0 1 0
+0.382416 -0.0289644 0.360476 0.996348 -0.0853732 -0.0012996
+-0.404747 -0.0721674 -0.371795 0 0 1
+0.0352157 0.199295 0.320513 0.00145723 0.800487 -0.599349
+0.396483 -0.371795 0.0921028 0 1 0
+-0.299605 0.371795 0.0702644 0 1 0
+0.12448 0.162327 0.320975 0.521722 0.658004 -0.542989
+0.149766 -0.230897 -0.351104 0 1 0
+0.0960299 -0.0297128 0.320513 0 0 1
+0.108743 0.191939 -0.333333 0 0 1
+0.211003 -0.0329343 -0.284152 0.521983 0.852648 0.0229204
+0.0891156 0.208373 -0.333333 0 0 1
+-0.103581 -0.294872 0.112057 0 1 0
+0.0164484 0.104616 -0.333333 0 0 1
+0.5 -0.243043 0.113808 1 0 0
+0.5 0.0972199 0.10844 1 0 0
+-0.269346 -0.371795 0.231674 0 1 0
+0.434561 0.294872 -0.0350076 0 1 0
+0.5 0.188471 -0.201272 1 0 0
+-0.271512 0.108412 -0.333333 0 0 1
+0.141109 -0.348041 -0.0795651 1 0 0
+0.0198376 -0.256282 0.361381 -0.00173966 0.999888 -0.0148468
+-0.5 0.248377 -0.36489 0.986935 -0.0800395 0.139832
+-0.219561 -0.0419525 -0.107772 -0.190843 0.981407 -0.0204742
+-0.5 0.352261 0.186232 1 0 0
+-0.5 -0.14653 0.156662 1 0 0
+-0.5 -0.238893 0.170743 1 0 0
+0.41461 -0.0225235 0.320513 0 0 1
+0.5 0.069468 0.0235031 1 0 0
+0.234432 0.294872 0.268137 0 1 0
+0.0864866 0.371795 -0.182053 0 1 0
+-0.196347 0.371795 -0.0165444 0 1 0
+0.00941551 0.371795 0.250191 0 1 0
+-0.5 0.0496863 0.242328 1 0 0
+-0.171652 -0.283861 -0.371795 0 0 1
+-0.480764 -0.0111228 -0.371795 0 0 1
+-0.251513 0.164038 -0.333333 0 0 1
+-0.5 0.12866 0.091406 1 0 0
+-0.475941 -0.294872 0.319302 0.0149887 0.719308 -0.694529
+0.433574 0.294872 -0.107781 0 1 0
+0.224604 0.294872 -0.0380855 0 1 0
+0.124528 0.0267 0.320513 0 0 1
+0.0488669 -0.294872 0.0673194 0 1 0
+0.5 0.187868 -0.263087 1 0 0
+-0.168103 -0.115849 0.320513 0.711993 0.444149 0.543873
+-0.5 0.00533999 0.255069 1 0 0
+-0.5 -0.289104 0.149254 0.973485 0.228041 -0.0180231
+-0.408496 0.0212828 -0.371795 0 0 1
+0.141109 -0.307991 0.0826977 1 0 0
+-0.248709 -0.371795 -0.132294 0 1 0
+0.275306 0.294872 -0.278748 0 1 0
+0.175825 -0.371795 -0.310205 0 1 0
+0.314745 -0.0137559 0.371795 0 0 1
+0.359542 0.214653 0.320513 0 0 1
+0.374391 -0.371795 0.148523 0 1 0
+0.220658 -0.371795 -0.120568 0 1 0
+-0.5 0.103202 -0.340885 1 0 0
+-0.426111 -0.106418 -0.371795 0 0 1
+-0.272989 -0.0102116 -0.1776 0.961606 0.274435 0
+0.5 0.148764 -0.299609 1 0 0
+-0.308803 -0.371795 -0.128955 0 1 0
+0.211803 0.0334324 -0.230994 -0.492134 0.870516 0.00246404
+0.14801 0.294872 0.0114125 0.400582 0.907312 0.127743
+-0.320513 -0.10896 -0.352228 1 0 0
+-0.5 -0.276147 0.00285663 1 0 0
+-0.183812 0.371795 0.269317 0 1 0
+0.0160255 -0.0515162 -0.333333 0 0 1
+-0.0564527 0.256282 0.338396 0 1 0
+0.312691 -0.345834 0.320513 0 0 1
+-0.5 -0.286264 0.0261365 1 0 0
+-0.308332 -0.371795 -0.294163 0 1 0
+-0.0244916 0.371795 0.213092 0 1 0
+0.245383 0.0354615 -0.238728 0.365096 0.930965 0.00295865
+-0.0971285 0.180025 0.327283 -0.410342 0.811527 -0.415984
+-0.425829 0.371795 0.277532 0 1 0
+0.181171 0.294872 -0.361689 0 1 0
+-0.4784 -0.294872 0.0947746 0 1 0
+0.115677 0.0988122 0.320513 0 0 1
+0.101342 0.371795 -0.322127 0 1 0
+-0.333855 0.371795 0.279172 0 1 0
+-0.382901 -0.371795 -0.0269109 0 1 0
+0.443848 0.294872 -0.00904832 0 1 0
+-0.0159034 0.150587 -0.333333 0 0 1
+-0.419751 0.371795 0.0668183 0 1 0
+-0.183193 -0.371795 0.0310155 0 1 0
+0.00122641 0.295383 0.320513 0 0 1
+-0.252597 -0.371795 -0.151708 0 1 0
+-0.18575 -0.230897 -0.363067 0.000291085 0.999997 -0.00226884
+-0.0263008 0.371795 0.212808 0 1 0
+-0.189766 0.371795 -0.343985 0 1 0
+0.279101 0.170729 0.371795 0 0 1
+-0.382823 0.085807 0.320513 0 0 1
+-0.0823424 -0.294872 0.00200092 0 1 0
+0.38854 -0.261446 0.320513 0 0 1
+-0.331688 -0.371795 0.165784 0 1 0
+-0.263105 -0.0290749 -0.0646789 0.735934 0.677048 0.00266704
+0.156791 0.131704 0.333434 0.744224 0.667908 0.00550181
+-0.187328 -0.00170382 -0.168401 0.999519 0.0307886 0.00360275
+0.0190022 -0.294872 0.236094 0 1 0
+0.0311885 0.371795 0.0528601 0 1 0
+0.5 0.282142 0.0632444 1 0 0
+0.442437 0.292698 0.320513 -0.0390904 0.542066 0.839426
+0.175485 -0.0688542 -0.333333 0 0 1
+-0.228152 0.0433608 -0.167245 0.0954407 0.995187 -0.0222438
+-0.5 0.188454 0.284461 1 0 0
+0.00484291 -0.235833 0.371795 0 0 1
+-0.5 -0.293482 -0.27226 0.777199 0.626954 -0.0537658
+0.141026 0.31176 0.181455 1 0 0
+-0.214499 0.0403259 -0.182067 0.350406 0.936551 -0.00933989
+0.237692 -0.164139 0.371795 0 0 1
+0.237976 0.0377358 -0.114959 0.189563 0.981836 0.00796714
+0.284709 0.294872 -0.0205089 0 1 0
+0.0514428 0.371795 0.312676 0.0248021 0.963377 0.267
+0.00814388 0.204555 0.324214 0.0644123 0.876847 -0.476435
+-0.5 0.0933828 -0.0502562 1 0 0
+0.158046 0.0472628 -0.333333 0 0 1
+-0.448718 -0.332105 -0.31395 1 0 0
+-0.14713 -0.203645 -0.333333 0 0 1
+0.133029 -0.056653 -0.333333 0 0 1
+0.0862599 -0.221856 0.371795 0 0 1
+-0.277567 -0.371795 -0.114361 0 1 0
+-0.00513202 -0.294872 0.278634 0 1 0
+-0.219849 0.371795 0.257805 0 1 0
+0.5 -0.181769 -0.00366218 1 0 0
+-0.224767 -0.247293 0.320513 0 0 1
+0.5 -0.0493098 -0.172731 1 0 0
+-0.0475654 0.371795 0.126322 0 1 0
+-0.0964537 -0.294872 0.010292 0 1 0
+-0.373926 -0.371795 0.286666 0 1 0
+0.391084 0.294872 -0.251468 0 1 0
+-0.305504 -0.213702 0.320513 0 0 1
+-0.109523 -0.294872 -0.0236589 0 1 0
+0.0990554 0.175263 -0.333333 0 0 1
+0.260969 -0.0178787 0.371795 0 0 1
+0.5 -0.131011 0.241195 1 0 0
+0.275637 -0.208954 0.333738 -0.599032 0.800725 0
+0.390027 0.294872 0.165838 0 1 0
+0.211322 0.294872 -0.178988 0 1 0
+0.376366 -0.371795 -0.284456 0 1 0
+0.141026 0.295181 -0.164652 0.753639 0.657207 -0.0103649
+-0.5 0.229982 0.295373 1 0 0
+-0.0114121 0.318613 0.320513 0 0 1
+0.270655 -0.118877 0.371795 0 0 1
+0.143062 -0.000361296 0.320513 0 0 1
+0.364506 0.294872 -0.207793 0 1 0
+0.00454237 -0.12534 0.320513 0 0 1
+-0.231687 0.230897 -0.342101 -0.0400925 0.980195 0.193932
+0.22036 -0.0368776 -0.0523107 0.26748 0.963563 -0.000874689
+0.5 -0.183213 0.0779937 1 0 0
+0.104679 -0.294872 -0.100882 0 1 0
+-0.448331 -0.371795 -0.280678 0.588626 0.80814 0.0207164
+0.5 0.0456335 0.194741 1 0 0
+-0.5 0.0315993 0.0553224 1 0 0
+-0.5 0.110292 0.266454 1 0 0
+-0.0667131 -0.162226 -0.333333 0 0 1
+-0.5 -0.0996847 0.263319 1 0 0
+0.02813 -0.294872 0.0915431 0 1 0
+-0.0506753 -0.294872 0.130091 0 1 0
+0.5 0.0214904 -0.0972624 1 0 0
+0.116296 0.168697 0.370387 -0.25336 -0.356346 0.899348
+-0.00519563 0.237127 0.371795 0 0 1
+-0.274564 0.371795 -0.0905994 0 1 0
+-0.0890311 -0.0128237 -0.333333 0 0 1
+0.348434 -0.241863 -0.371795 0 0 1
+-0.0475512 -0.294872 -0.337991 0 1 0
+-0.0597912 0.371795 -0.0129595 0 1 0
+-0.277242 0.188651 -0.333333 0 0 1
+0.311597 0.259926 0.320513 0 0 1
+0.190399 -0.371795 0.114947 0 1 0
+0.311486 -0.0599311 0.371795 0 0 1
+-0.314172 -0.371795 -0.000263787 0 1 0
+0.135213 -0.294872 0.301332 0.086834 0.996209 -0.00527997
+0.0735427 -0.282271 0.320513 0 0 1
+-0.5 0.199584 0.315818 0.851474 -0.0451947 -0.522445
+0.484904 0.294872 0.0893069 0 1 0
+-0.5 -0.228059 -0.21668 1 0 0
+-0.125856 0.161255 0.340609 -0.614218 0.789137 0
+0.5 0.182756 0.0497205 1 0 0
+0.116251 -0.11605 -0.333333 0 0 1
+-0.465085 -0.294872 -0.15375 0 1 0
+-0.5 0.344492 -0.0486201 1 0 0
+-0.5 0.0789613 0.237483 1 0 0
+0.448718 -0.295353 -0.331452 -0.654203 0.755918 0.0246262
+-0.290308 0.371795 -0.25955 0 1 0
+0.5 -0.0707387 -0.0105954 1 0 0
+0.146507 0.143023 0.371795 -0.422454 -0.52694 0.737474
+0.141026 0.321493 -0.110251 1 0 0
+-0.189667 -0.361955 0.320513 0.0357921 -0.238985 0.970363
+0.420633 -0.333556 0.320513 0 0 1
+-0.451416 -0.294872 0.0725924 0.428185 0.891117 -0.150227
+-0.107826 0.0196583 -0.333333 0 0 1
+-0.5 0.212001 -0.000548794 1 0 0
+-0.430098 0.371795 -0.337602 0 1 0
+-0.150817 -0.0194915 0.320513 0 0 1
+-0.34179 -0.371795 -0.350371 0 1 0
+-0.104905 -0.223733 0.371795 0 0 1
+0.141026 0.329453 0.149863 1 0 0
+0.316421 0.178243 -0.33425 0.745114 0.256833 0.615502
+0.398086 0.19556 -0.371795 0 0 1
+0.0158656 -0.294872 0.0511436 0 1 0
+0.269606 -0.273885 0.320513 0 0 1
+-0.421044 -0.34082 0.320513 0 0 1
+0.180008 0.0868615 -0.333333 0 0 1
+0.314299 0.260915 0.320513 0 0 1
+0.0407495 0.371795 -0.313028 0 1 0
+0.197254 0.0187879 -0.274922 0.880166 -0.474133 -0.0225075
+0.441089 0.294872 -0.163345 0 1 0
+0.5 -0.278518 -0.244639 1 0 0
+-0.254273 -0.371795 -0.110574 0 1 0
+0.411522 -0.371795 -0.322718 0 1 0
+-0.279381 -0.371795 -0.153902 0 1 0
+0.5 0.279895 0.2665 1 0 0
+-0.266438 -0.214803 0.371795 -0.174409 -0.285632 0.942335
+0.245256 -0.371795 0.201485 0 1 0
+0.123139 0.371795 -0.32386 0 1 0
+0.437896 -0.0166104 -0.371795 0 0 1
+0.262485 0.294872 0.191661 0 1 0
+0.268739 -0.00562211 -0.148524 0.990985 -0.132257 0.0213956
+-0.14012 -0.294872 -0.128361 -0.480271 0.876294 0.0380503
+0.0831201 0.371795 0.261683 0 1 0
+0.133773 -0.294872 0.298044 0.124612 0.990767 -0.0534149
+-0.0509266 0.116406 0.320513 0 0 1
+-0.5 0.081934 0.108544 1 0 0
+0.322133 0.182431 -0.371795 0.241007 0.0644322 0.968382
+0.304448 0.0472506 -0.333333 0 0 1
+0.431203 0.294872 0.265057 0 1 0
+0.379138 0.294872 -0.05384 0 1 0
+0.135969 -0.153384 0.355364 -0.64241 0.766361 0
+0.0892883 -0.151177 -0.333333 0 0 1
+-0.429791 -0.227969 0.320513 0 0 1
+0.16037 0.0156618 -0.333333 0 0 1
+0.198197 -0.0202814 -0.00221985 0.837385 0.472774 -0.274358
+0.5 -0.13671 0.0723822 1 0 0
+0.0662145 -0.193542 0.332306 -0.324708 0.945814 0
+-0.395403 0.0356214 -0.371795 0 0 1
+0.5 -0.165929 -0.365245 0.908112 0.205903 -0.364604
+-0.405275 -0.371795 -0.259487 0 1 0
+-0.185369 -0.371795 -0.361931 0.0219784 0.990609 0.13495
+-0.400189 0.00880874 0.320513 0 0 1
+0.5 0.118448 0.308543 1 0 0
+-0.252114 0.371795 -0.292414 0 1 0
+-0.299767 -0.371795 0.248166 0 1 0
+0.194719 -0.0133519 -0.00983356 0.923947 0.382515 -0.00193857
+-0.254048 0.371795 -0.19904 0 1 0
+0.397737 -0.371795 0.0130443 0 1 0
+0.476355 0.294872 -0.156144 0 1 0
+-0.5 0.35526 0.00636574 1 0 0
+0.107333 -0.0808311 0.320513 0 0 1
+-0.5 0.0153327 -0.271462 1 0 0
+-0.104094 -0.216036 0.371795 0 0 1
+-0.11738 -0.249954 0.371795 0.00464927 -0.461626 0.887063
+0.434322 -0.0216825 0.320513 0 0 1
+0.26606 -0.371795 0.282109 0 1 0
+0.144612 -0.371795 0.0522901 0.308065 0.950918 0.0291538
+0.38169 0.22148 0.320513 0 0 1
+-0.044328 -0.12336 -0.333333 0 0 1
+0.5 0.263669 0.0914064 1 0 0
+0.5 0.174185 -0.0578475 1 0 0
+-0.141154 -0.332718 0.301504 1 0 0
+0.5 -0.271956 0.0138026 1 0 0
+0.259821 -0.13865 0.371795 0 0 1
+0.268966 -0.00303053 -0.0807687 0.992732 -0.106404 0.0562331
+-0.5 0.335311 0.211901 1 0 0
+0.302526 0.294872 0.102622 0 1 0
+-0.475496 -0.294872 -0.0534508 0 1 0
+-0.457846 -0.0482075 -0.371795 0 0 1
+0.448718 -0.342534 0.116366 1 0 0
+-0.5 0.107044 0.220443 1 0 0
+0.431838 -0.321507 -0.371795 0 0 1
+0.0953303 0.0882608 -0.333333 0 0 1
+0.387591 0.294872 -0.36078 0 1 0
+0.5 -0.0100638 -0.34637 1 0 0
+0.0806615 0.371795 0.272168 0 1 0
+-0.208387 -0.371795 -0.352666 0 1 0
+0.199614 0.0223053 -0.050855 0.808474 -0.588531 0
+0.32062 -0.371795 0.193295 0 1 0
+0.451467 -0.231247 0.320513 0 0 1
+0.414541 0.294872 -0.135779 0 1 0
+0.0383325 0.353338 0.320513 0 0 1
+-0.224414 0.371795 0.18704 0 1 0
+0.483108 0.294872 -0.304888 0 1 0
+0.268548 -0.371795 -0.0428701 0 1 0
+-0.189304 -0.0130252 -0.199383 0.953949 -0.29826 0.0319627
+-0.151618 -0.371795 -0.351844 -0.0693578 0.997573 -0.00613253
+-0.162557 0.038943 0.320513 0 0 1
+-0.0164491 0.171999 0.320513 0 0 1
+0.32516 0.294872 0.128592 0 1 0
+0.07471 -0.236979 -0.371795 -0.0832832 -0.250728 0.964468
+0.141109 -0.321746 -0.359327 1 0 0
+0.5 0.143474 -0.252966 1 0 0
+-0.356602 0.142183 -0.371795 0 0 1
+-0.448718 -0.322941 -0.323145 1 0 0
+0.168125 -0.159266 -0.333333 0 0 1
+-0.0944318 0.0282077 -0.333333 0 0 1
+0.448718 -0.321996 0.173986 1 0 0
+-0.5 0.13981 -0.134946 1 0 0
+0.44138 0.294872 -0.292183 0 1 0
+0.0875087 -0.143962 0.320513 0 0 1
+-0.32491 -0.371795 0.247802 0 1 0
+-0.292737 -0.371795 -0.357053 0 1 0
+0.424588 -0.121298 0.320513 0 0 1
+0.136899 0.348251 0.320513 0.3809 0.0783959 0.921287
+-0.0377388 -0.13097 0.320513 0 0 1
+0.3621 0.147822 0.320513 0 0 1
+-0.479076 -0.294872 -0.0073987 0 1 0
+-0.230296 -0.247188 -0.371795 0 0 1
+0.0413414 -0.115881 -0.333333 0 0 1
+-0.23942 -0.371795 0.162806 0 1 0
+0.192688 0.00435115 -0.325465 0.982765 0.152413 -0.104614
+0.5 0.167915 0.303852 1 0 0
+0.0851743 -0.294872 0.0519947 0 1 0
+0.256254 -0.371795 0.0626997 0 1 0
+-0.129648 -0.294872 0.0932111 0 1 0
+0.10132 0.34386 -0.371795 0 0 1
+-0.0392636 -0.294872 0.162383 0 1 0
+-0.5 0.0566017 -0.0945228 1 0 0
+0.0185252 0.0769182 0.320513 0 0 1
+-0.5 0.323373 0.0820978 1 0 0
+0.155394 0.294872 0.0263872 0 1 0
+-0.141154 -0.303138 -0.0552077 0.999818 -0.0190173 0.00131315
+-0.312779 0.156752 0.371795 0 0 1
+-0.328755 0.331156 0.320513 0 0 1
+0.201412 0.0248286 -0.0848425 0.755205 -0.655378 -0.01206
+0.209691 -0.226013 -0.333333 0.114096 -0.504992 0.85555
+-0.5 0.307764 -0.0682444 1 0 0
+-0.215712 0.232478 -0.371795 0.0278862 0.388148 0.921175
+0.157026 -0.371795 0.308309 0 1 0
+0.448718 -0.362784 -0.241596 1 0 0
+-0.294199 0.110419 -0.333333 0 0 1
+0.261244 -0.371795 -0.199179 0 1 0
+-0.429451 0.371795 0.272657 0 1 0
+-0.203843 -0.371795 -0.0519233 0 1 0
+0.172738 -0.0570283 -0.333333 0 0 1
+-0.0359437 -0.233595 0.371795 0 0 1
+-0.5 -0.109196 0.0440766 1 0 0
+-0.0186046 -0.206424 -0.333333 0 0 1
+-0.108871 0.164671 -0.333333 0 0 1
+-0.5 -0.0921529 0.152622 1 0 0
+0.377429 0.294872 0.0566545 0 1 0
+-0.5 0.225886 0.133573 1 0 0
+-0.5 0.066958 0.239868 1 0 0
+0.177839 -0.371795 0.197033 0 1 0
+0.0936648 0.371795 -0.0891771 0 1 0
+-0.201793 -0.230195 -0.333333 -0.025104 -0.701916 0.711817
+0.448718 -0.360644 0.0070915 1 0 0
+0.320513 0.0585312 -0.345739 0.990965 0.0468458 0.125677
+-0.190336 0.348154 -0.371795 0 0 1
+-0.444326 -0.371795 -0.367907 0.402031 0.874311 0.271939
+-0.5 -0.28194 -0.286704 1 0 0
+-0.476471 -0.0547004 -0.371795 0 0 1
+0.42574 0.0472909 0.320513 0 0 1
+-0.399718 -0.371795 0.0345435 0 1 0
+-0.5 0.0192153 -0.0615755 1 0 0
+-0.5 -0.0306364 0.0477112 1 0 0
+-0.337842 0.31431 0.320513 0 0 1
+-0.411665 0.111914 0.320513 0 0 1
+-0.112075 -0.294872 -0.144103 0 1 0
+-0.18829 -0.00924275 -0.269734 0.977414 -0.209869 0.0248332
+0.222571 0.230897 -0.35762 0 1 0
+0.292403 0.294872 -0.292633 0 1 0
+0.332517 -0.153633 0.322124 0.780223 -0.424303 0.459586
+-0.46912 0.0407274 -0.371795 0 0 1
+-0.448718 -0.314407 -0.0282721 1 0 0
+0.448718 -0.304129 0.262883 1 0 0
+0.187566 -0.137409 0.371795 0 0 1
+0.413031 -0.236907 0.320513 0 0 1
+-0.478982 0.340576 -0.371795 0 0 1
+0.397253 0.294872 -0.313645 0 1 0
+0.304025 0.0045962 -0.333333 0 0 1
+0.129652 -0.256178 0.334308 -0.0453388 0.998972 0
+0.129042 0.275456 -0.371795 0 0 1
+0.0377287 0.256282 0.363941 0.0479489 0.966874 0.250708
+0.5 0.196079 -0.0563835 1 0 0
+-0.5 0.357224 -0.0644087 1 0 0
+-0.190815 0.371795 -0.0157456 0 1 0
+-0.0917948 -0.294872 -0.285502 0 1 0
+-0.0884881 0.190409 -0.333333 0 0 1
+-0.292656 0.209552 -0.333333 -0.417792 0.306019 0.855454
+0.211432 -0.205031 -0.333333 0 0 1
+0.5 0.13694 -0.228055 1 0 0
+0.267035 -0.0043691 0.371795 0 0 1
+-0.200225 0.332985 -0.371795 0 0 1
+0.487907 0.294872 0.2874 0 1 0
+0.464282 0.294872 0.0144087 0 1 0
+-0.201883 0.0985067 -0.333333 0 0 1
+0.5 -0.0274266 -0.320069 1 0 0
+0.361085 -0.371795 -0.186439 0 1 0
+0.303695 -0.371795 0.235433 0 1 0
+0.5 0.0351553 -0.100593 1 0 0
+-0.364262 0.138883 0.320513 0 0 1
+0.141109 -0.362627 0.296743 0.996225 0.086448 -0.00789461
+0.399476 -0.371795 0.307758 -0.00269584 0.999969 -0.00742648
+0.461313 0.294872 0.162513 0 1 0
+-0.196294 0.0264717 -0.190735 0.78991 0.613223 0
+-0.198898 -0.0295388 -0.331201 -0.6114 0.528647 -0.588832
+-0.448718 -0.303563 -0.186559 0.998682 0.0430276 0.0279892
+-0.360399 0.168937 -0.371795 0 0 1
+-0.293356 -0.371795 -0.127474 0 1 0
+-0.282469 -0.0315635 0.371795 0 0 1
+0.0422963 0.00609669 0.320513 0 0 1
+-0.448718 -0.363826 -0.211152 0.978721 0.200544 0.0434504
+0.0438273 0.371795 -0.242039 0 1 0
+0.5 0.0145549 0.151236 1 0 0
+-0.5 0.313755 -0.196842 1 0 0
+0.112644 -0.294872 0.209441 0 1 0
+0.386434 -0.371795 -0.170829 0 1 0
+-0.193366 -0.371795 -0.0605396 0 1 0
+0.318666 -0.371795 0.197144 0 1 0
+0.5 -0.102812 -0.161669 1 0 0
+0.177916 0.294872 -0.338728 0 1 0
+-0.5 0.107016 -0.0640202 1 0 0
+-0.0170706 0.204535 0.370929 -0.00413029 -0.490951 0.871178
+-0.5 -0.0299502 0.123219 1 0 0
+0.143505 0.294872 0.0192501 0.6964 0.714219 0.0701291
+0.5 0.0663799 -0.0704856 1 0 0
+-0.237419 -0.043008 -0.194805 0.148704 0.988769 0.0149611
+-0.0581621 0.05466 0.320513 0 0 1
+-0.266477 -0.371795 -0.0962754 0 1 0
+0.203899 -0.163006 0.371795 0 0 1
+0.409529 -0.3546 0.320513 0 0 1
+0.420834 -0.371795 -0.317058 0 1 0
+0.0613937 -0.161771 0.320513 0 0 1
+-0.0132152 -0.0420011 -0.333333 0 0 1
+0.0293391 -0.0225311 0.320513 0 0 1
+-0.0524209 -0.198278 0.367326 0.156612 0.901787 0.402806
+0.198273 -0.0203907 -0.160863 0.868201 0.495502 -0.0265371
+0.193548 0.00912711 -0.16757 0.958928 -0.28365 0
+0.440263 -0.246269 -0.371795 0 0 1
+-0.435425 0.178242 -0.371795 0 0 1
+-0.5 -0.186085 0.258755 1 0 0
+-0.395476 0.371795 0.0899022 0 1 0
+-0.23754 -0.0429974 -0.322457 0.189896 0.98175 0.0103392
+0.186647 -0.0433673 0.320513 0 0 1
+-0.141154 -0.333875 0.051793 1 0 0
+-0.141154 -0.326953 -0.245434 1 0 0
+0.237249 -0.0816397 0.371795 0 0 1
+-0.0953039 -0.294872 -0.0876905 0 1 0
+-0.5 0.347712 0.110134 1 0 0
+0.0755472 0.366019 0.320513 -0.00229 0.179428 0.983768
+-0.123169 -0.294872 -0.0154763 0 1 0
+-0.140391 0.167889 -0.333333 0 0 1
+-0.474385 -0.294872 -0.0415209 0 1 0
+-0.0945948 -0.294872 -0.0748062 0 1 0
+0.128918 -0.294872 0.00148925 0 1 0
+-0.0641196 -0.294872 0.301173 0 1 0
+-0.0249795 0.371795 -0.346644 0 1 0
+-0.4596 -0.294872 -0.185518 0 1 0
+-0.187151 0.371795 -0.238281 0 1 0
+0.5 0.128383 -0.317698 1 0 0
+-0.141154 -0.341066 0.294629 1 0 0
+-0.139725 -0.294872 0.00110954 -0.658843 0.752139 0.0146099
+0.111969 0.179014 -0.333333 0 0 1
+0.5 -0.25258 -0.305832 1 0 0
+0.26663 -0.371795 0.250963 0 1 0
+0.11075 0.0632733 -0.333333 0 0 1
+-0.5 0.152328 0.000897041 1 0 0
+-0.265968 -0.371795 -0.260434 0 1 0
+0.192092 -0.221921 0.371795 0 0 1
+-0.141154 -0.358013 -0.157005 1 0 0
+0.5 0.08559 -0.34808 1 0 0
+0.37694 0.294872 0.157884 0 1 0
+-0.5 -0.190731 -0.320998 1 0 0
+0.5 -0.248717 -0.29324 1 0 0
+0.476375 0.294872 0.210931 0 1 0
+-0.0423159 -0.264742 -0.371795 0 0 1
+0.0968672 0.0114859 -0.333333 0 0 1
+-0.448718 -0.309565 -0.317103 1 0 0
+-0.479189 -0.294872 0.0498282 0 1 0
+0.408628 -0.371795 0.00621558 0 1 0
+-0.5 -0.265677 -0.279061 1 0 0
+0.36462 0.294872 -0.341948 0 1 0
+-0.204969 0.371795 0.218438 0 1 0
+-0.32665 -0.371795 0.279756 0 1 0
+0.423501 -0.371795 0.0121178 0 1 0
+0.0516339 -0.0681196 0.320513 0 0 1
+-0.203568 0.259199 -0.371795 0 0 1
+-0.5 0.150609 -0.318207 1 0 0
+-0.5 0.131028 0.115641 1 0 0
+0.29752 0.294872 0.2103 0 1 0
+-0.5 -0.0458961 -0.184981 1 0 0
+0.259886 -0.0250683 -0.120953 0.727549 -0.68605 0.00287611
+-0.221359 0.0424341 -0.206089 0.207549 0.977985 -0.0216388
+-0.164432 -0.223769 -0.333333 0.0109269 -0.072286 0.997324
+-0.5 -0.0857915 -0.0812662 1 0 0
+-0.219035 0.239358 0.320513 -0.18782 0.633618 0.750501
+-0.332718 0.153365 0.330758 0.80054 -0.599279 0
+0.0842083 -0.164401 0.320513 0 0 1
+0.382904 0.0221384 0.32426 0.902884 0.018698 0.429478
+0.446152 0.294872 0.0928054 0 1 0
+-0.0432149 0.371795 -0.256272 0 1 0
+-0.5 -0.09807 -0.252609 1 0 0
+0.141109 -0.307141 -0.0203244 0.999937 0.0111041 -0.00139584
+0.0355393 0.108707 -0.333333 0 0 1
+0.112738 -0.294872 0.286513 0 1 0
+0.175558 0.228426 -0.333333 0.0926391 0.375443 0.922204
+0.096309 -0.294872 -0.131825 0 1 0
+-0.5 0.216195 -0.342088 1 0 0
+0.0875456 0.371795 0.314281 -0.00222415 0.990617 0.136648
+-0.00667991 0.256282 0.33849 0 1 0
+-0.251939 0.223692 0.338593 -0.479244 0.877682 0
+-0.5 -0.290532 -0.0074658 0.955803 0.286546 0.0658209
+0.193651 0.277159 0.320513 0 0 1
+-0.242313 -0.0418627 -0.115135 0.237861 0.971294 0.00324984
+-0.448718 -0.343025 0.19184 1 0 0
+0.19867 -0.331134 0.320513 0 0 1
+0.5 0.0370078 -0.164527 1 0 0
+0.346391 0.128704 -0.371795 0 0 1
+0.422133 -0.00712366 -0.371795 0 0 1
+0.460076 0.204923 -0.371795 0 0 1
+0.464334 -0.294872 0.24272 0 1 0
+-0.489086 0.371795 -0.307689 0 1 0
+-0.5 -0.210343 -0.219212 1 0 0
+0.227058 -0.220966 -0.333333 -0.00161979 -0.0534569 0.998569
+0.169309 -0.371795 -0.0370198 0 1 0
+0.141026 0.348077 -0.0777834 1 0 0
+-0.5 -0.132053 0.239716 1 0 0
+-0.023839 0.310716 0.320513 0 0 1
+0.311984 -0.158299 0.371795 0 0 1
+-0.5 -0.234098 0.145946 1 0 0
+0.5 -0.0812447 0.162163 1 0 0
+0.485974 0.294872 -0.283812 0 1 0
+-0.0033311 -0.106471 0.320513 0 0 1
+-0.17469 -0.230897 -0.355989 0 1 0
+0.0270797 0.371795 0.0831469 0 1 0
+0.5 0.103305 -0.0794138 1 0 0
+-0.141154 -0.345238 0.20725 1 0 0
+-0.159017 -0.371795 -0.184304 0 1 0
+-0.332886 0.16626 0.320513 -0.057607 0.134178 0.989281
+0.236236 0.294872 -0.119506 0 1 0
+-0.5 0.187203 0.21487 1 0 0
+0.320513 0.113181 -0.354147 1 0 0
+0.48079 -0.179551 -0.371795 0 0 1
+0.283905 0.294872 -0.129402 0 1 0
+0.5 -0.173788 0.140959 1 0 0
+0.448718 -0.323512 0.265886 1 0 0
+-0.360281 0.0871159 -0.371795 0 0 1
+-0.0762381 -0.238321 -0.371795 0.0742046 -0.105378 0.99166
+0.278041 0.207154 0.350172 0.599273 0.800545 0
+-0.382273 -0.0309696 0.359607 0.995216 0.0976432 -0.00341202
+0.448718 -0.299906 0.149593 0.917119 -0.398612 0.000904378
+-0.415946 -0.371795 0.146483 0 1 0
+0.0810752 -0.294872 -0.244713 0 1 0
+-0.213211 0.371795 0.0603752 0 1 0
+0.141026 0.366409 -0.221486 0.959789 0.238371 -0.14827
+-0.0276834 0.371795 -0.230462 0 1 0
+0.257571 -0.0273839 -0.0198263 0.721201 -0.692721 0.00259631
+0.0926933 -0.294872 -0.183122 0 1 0
+-0.0461304 -0.0154061 0.320513 0 0 1
+-0.5 0.256463 0.232969 1 0 0
+0.141026 0.360057 0.074517 1 0 0
+0.5 0.110395 -0.264787 1 0 0
+0.333288 -0.371356 0.320513 0.120495 -0.619719 0.775519
+0.5 -0.0556162 -0.322276 1 0 0
+0.228999 0.235237 0.361659 0.37481 0.927046 0.0101397
+-0.20987 0.0381678 -0.167956 0.433782 0.901005 -0.00484898
+-0.0376357 0.00727624 0.320513 0 0 1
+0.238261 0.294872 0.0935247 0 1 0
+-0.0947355 -0.280762 -0.371795 0 0 1
+-0.424819 -0.371795 -0.0592706 0 1 0
+-0.287305 0.371795 -0.326889 0 1 0
+-0.5 0.129475 -0.288483 1 0 0
+0.5 -0.0369002 -0.300062 1 0 0
+0.284845 -0.371795 -0.165175 0 1 0
+-0.448718 -0.297469 0.0530697 0.694393 0.718057 -0.0470411
+-0.297434 -0.371795 0.0686616 0 1 0
+0.20484 0.244248 0.324207 0.160116 0.898644 0.408413
+0.0216579 -0.00618187 -0.333333 0 0 1
+-0.5 0.33333 -0.142627 1 0 0
+0.26331 0.0820265 -0.333333 0 0 1
+-0.452075 0.371795 -0.115084 0 1 0
+0.5 -0.129595 0.253092 1 0 0
+0.449094 0.00675322 0.320513 0 0 1
+0.303823 -0.0403157 -0.333333 0 0 1
+0.0379637 -0.294872 0.00700204 0 1 0
+0.0450941 -0.294872 -0.229601 0 1 0
+-0.222258 0.371795 0.0169856 0 1 0
+-0.190704 0.016831 -0.265271 0.924143 0.381427 0.0217473
+0.5 -0.122213 -0.314376 1 0 0
+0.425574 -0.361989 0.320513 -0.0118603 -0.111542 0.993689
+-0.5 -0.0532308 -0.27026 1 0 0
+-0.0712908 0.371795 0.261542 0 1 0
+-0.160922 0.0565758 0.320513 0 0 1
+-0.321551 -0.213935 0.320513 0 0 1
+0.448718 -0.336002 -0.0453131 1 0 0
+-0.358819 0.371582 -0.371795 0.0228913 -0.608015 0.793595
+-0.251289 0.113613 0.371795 0 0 1
+0.278091 -0.371795 -0.0600049 0 1 0
+0.5 0.260353 -0.200936 1 0 0
+0.433495 -0.371795 -0.236419 0 1 0
+-0.448718 -0.301514 -0.208115 0.986944 0.158008 0.0312209
+-0.132121 0.27775 -0.371795 0 0 1
+-0.269072 -0.0638284 -0.333333 0 0 1
+0.300037 -0.371795 -0.0825616 0 1 0
+-0.320513 0.0988645 -0.366141 0.950753 -0.114466 -0.28804
+-0.330074 -0.115441 -0.371795 0 0 1
+0.131417 0.371795 -0.0178712 0 1 0
+-0.339071 -0.1273 0.371795 0 0 1
+0.5 -0.140455 0.18544 1 0 0
+0.5 -0.0561977 0.145616 1 0 0
+-0.335799 0.084113 0.371795 0 0 1
+0.332749 -0.163301 0.320513 0.186106 -0.153658 0.97044
+0.5 0.231872 0.312907 0.997427 -0.0237728 0.067633
+0.142335 0.294872 0.111177 0.573579 0.806819 -0.141599
+0.113924 0.323976 -0.371795 0 0 1
+0.380871 0.294872 -0.220066 0 1 0
+0.443179 -0.371795 -0.0849143 -0.181545 0.97763 0.106212
+-0.0574963 -0.193387 -0.333333 0 0 1
+-0.341339 -0.371795 0.200451 0 1 0
+-0.0757964 0.371795 -0.0196943 0 1 0
+0.018684 0.000654136 -0.333333 0 0 1
+0.273798 -0.119302 0.371795 0 0 1
+0.141026 0.337476 -0.231145 1 0 0
+-0.178118 -0.371795 0.209907 0 1 0
+-0.5 0.359269 -0.0942464 1 0 0
+-0.103386 0.151775 0.320513 0 0 1
+-0.475539 -0.0494219 -0.371795 0 0 1
+-0.394237 0.371795 0.133504 0 1 0
+-0.195319 -0.319859 0.320513 0 0 1
+0.168556 0.294872 0.258017 0 1 0
+0.110084 -0.156781 0.320513 0 0 1
+0.0318869 0.170443 0.320513 0 0 1
+0.2329 -0.371795 0.272306 0 1 0
+-0.199436 0.371795 -0.237988 0 1 0
+0.291635 0.196978 0.361064 0.610985 0.791635 -0.00343865
+-0.5 -0.276256 0.102438 1 0 0
+0.245573 -0.143862 -0.333333 0 0 1
+0.0887673 -0.294872 -0.168408 0 1 0
+0.5 -0.109228 -0.123136 1 0 0
+-0.321829 -0.371795 -0.0218803 0 1 0
+-0.44585 0.170156 -0.371795 0 0 1
+-0.18409 -0.369429 0.320513 0.0557867 -0.559296 0.827088
+-0.321511 0.195564 0.320513 0 0 1
+-0.344942 -0.285836 -0.371795 0 0 1
+-0.436569 0.371795 -0.220157 0 1 0
+-0.41689 -0.371795 0.0651319 0 1 0
+0.141109 -0.309225 -0.0573002 1 0 0
+0.435914 0.294872 -0.241852 0 1 0
+-0.0867678 -0.00250415 -0.333333 0 0 1
+-0.411491 -0.220624 0.320513 0 0 1
+-0.115805 0.169078 0.347738 -0.592727 0.805401 0.0018298
+-0.230112 -0.371795 -0.318015 0 1 0
+-0.448718 -0.303279 0.00244901 0.993264 0.115875 -0.00055911
+-0.14449 -0.371795 -0.0748189 -0.303673 0.950664 0.0634098
+0.455464 -0.0238966 0.320513 0 0 1
+-0.462355 0.371795 0.240961 0 1 0
+-0.347458 0.131863 0.363345 0.891908 -0.449217 -0.0519922
+-0.16787 0.371795 0.0919908 0 1 0
+-0.447543 -0.371795 -0.0217439 0.591232 0.806323 -0.0169743
+0.5 -0.162203 0.283603 1 0 0
+-0.128418 0.321226 0.320513 0 0 1
+0.387869 -0.371795 0.198884 0 1 0
+-0.122653 0.195626 0.371795 0 0 1
+0.0972845 0.256282 0.352919 0 1 0
+-0.5 -0.0406993 0.196238 1 0 0
+-0.388965 0.0378393 -0.371795 0 0 1
+-0.33585 -0.371795 0.201703 0 1 0
+-0.377029 0.068116 -0.371795 0 0 1
+0.5 0.224111 -0.310283 1 0 0
+0.403625 0.294872 -0.099109 0 1 0
+0.5 0.222466 0.123895 1 0 0
+-0.0845322 -0.0646116 0.320513 0 0 1
+0.5 0.0564199 0.245535 1 0 0
+-0.5 0.356618 -0.232018 1 0 0
+0.0977795 0.125686 -0.333333 0 0 1
+0.448718 -0.298766 0.163399 0.842064 -0.539095 0.0174668
+0.424629 -0.125694 0.320513 0 0 1
+-0.320513 -0.133586 -0.370101 0.773917 0.125044 -0.62082
+-0.0890199 -0.0843308 0.320513 0 0 1
+0.5 -0.267349 0.0897831 1 0 0
+0.5 0.280245 -0.152397 1 0 0
+-0.270828 -0.0185588 -0.333333 0.764982 0.147361 -0.626967
+0.207568 0.294872 0.284493 0 1 0
+-0.368288 -0.371795 0.0317617 0 1 0
+-0.193056 -0.371795 0.00526818 0 1 0
+0.0828204 -0.294872 -0.137866 0 1 0
+0.5 0.207713 0.0728911 1 0 0
+0.141109 -0.329053 -0.0680964 1 0 0
+0.5 -0.239655 -0.228715 1 0 0
+0.0267117 0.202926 0.341467 0.161553 0.986864 0
+0.438522 0.294872 0.114081 0 1 0
+-0.226087 0.371795 -0.0182701 0 1 0
+-0.00401723 0.347888 0.320513 0 0 1
+0.0832329 0.0116286 -0.333333 0 0 1
+0.374633 -0.371795 0.192888 0 1 0
+-0.150212 -0.371795 -0.202068 0 1 0
+0.5 -0.171844 -0.342051 1 0 0
+0.116049 -0.0997523 0.320513 0 0 1
+0.212873 0.294872 0.313615 0.0161386 0.967371 0.25285
+0.5 -0.205373 0.0470705 1 0 0
+-0.5 -0.0119254 0.0470912 1 0 0
+0.200183 0.230897 -0.336246 0.0158198 0.894054 0.44768
+0.495875 -0.0798885 0.320513 0.266541 0.0759672 0.960825
+0.351792 0.294872 -0.235812 0 1 0
+-0.0245345 0.3204 -0.371795 0 0 1
+-0.453275 0.371795 0.0848135 0 1 0
+0.302108 0.294872 0.19495 0 1 0
+-0.29931 -0.344705 0.320513 0 0 1
+-0.5 0.229619 0.147155 1 0 0
+0.448718 -0.35877 0.19057 1 0 0
+0.172164 -0.300227 -0.371795 0 0 1
+0.5 0.0579672 0.300535 1 0 0
+-0.5 0.0649798 -0.220275 1 0 0
+-0.226096 0.230897 -0.348254 0 1 0
+0.115715 0.371795 -0.18861 0 1 0
+-0.260098 0.0320819 -0.0702503 -0.685681 0.727868 0.00705927
+-0.5 0.0567717 -0.155678 1 0 0
+0.31668 -0.213272 -0.371795 0 0 1
+-0.434713 -0.371795 0.271987 0 1 0
+-0.0862969 -0.294872 0.181474 0 1 0
+-0.419374 0.324987 0.320513 0 0 1
+-0.5 -0.235701 -0.0999886 1 0 0
+0.371237 -0.0798945 0.347155 0.94002 -0.341115 0.0014195
+-0.416205 -0.0723651 0.320513 0 0 1
+-0.202564 -0.032489 0.337178 0.991381 0.131006 0.00109356
+-0.5 -0.175527 -0.36642 0.88731 -0.25281 0.385705
+-0.385306 0.371795 -0.14805 0 1 0
+0.325994 0.143241 0.371795 0.010272 0.00540093 0.999933
+0.5 -0.26554 0.227369 1 0 0
+-0.153637 0.371795 -0.23575 0 1 0
+-0.464799 -0.127372 -0.371795 0 0 1
+0.0536784 0.202846 0.371795 0.0860664 0.829646 -0.551616
+0.136657 0.371795 -0.277147 0.431138 0.895234 -0.11259
+0.5 0.122473 -0.154692 1 0 0
+0.273018 0.245187 0.320513 0 0 1
+-0.39642 0.371795 -0.199659 0 1 0
+0.406105 -0.196036 -0.371795 0 0 1
+0.266347 0.294872 0.203776 0 1 0
+-0.0436554 -0.294872 -0.235691 0 1 0
+-0.0788679 -0.294872 0.280103 0 1 0
+0.286705 0.122436 0.371795 0 0 1
+0.298071 0.203574 0.320513 0.055505 0.0405854 0.997633
+-0.26719 0.371795 -0.154074 0 1 0
+0.261199 0.218636 0.342613 0.487257 0.873259 0
+-0.5 0.0137807 -0.0561339 1 0 0
+0.141109 -0.306596 0.169241 1 0 0
+-0.5 0.253319 -0.280888 1 0 0
+-0.00960525 0.371795 -0.294235 0 1 0
+0.00308515 0.371795 -0.0866761 0 1 0
+0.326702 -0.219811 0.320513 0 0 1
+-0.30815 -0.262165 0.320513 0 0 1
+0.163676 -0.123469 0.347785 0.808993 -0.587668 0.0132861
+-0.154395 -0.371795 0.317481 -0.0934524 0.895759 -0.434607
+0.125493 -0.122371 0.320513 0 0 1
+0.141026 0.33349 -0.30971 1 0 0
+0.141026 0.309616 0.0667268 1 0 0
+-0.132682 -0.294872 -0.248848 -0.041007 0.99903 0.0160717
+-0.5 0.143658 -0.0796865 1 0 0
+0.334213 -0.371795 0.0298222 0 1 0
+-0.403175 0.163522 0.320513 0 0 1
+-0.242021 -0.371795 -0.221949 0 1 0
+0.5 -0.106382 -0.318774 1 0 0
+-0.29685 0.371795 -0.306482 0 1 0
+-0.253517 0.371795 0.312292 0.0185692 0.996201 0.0850837
+0.0762386 -0.294872 -0.213699 0 1 0
+-0.5 -0.0177215 0.18154 1 0 0
+-0.0562694 0.371795 0.164318 0 1 0
+-0.115907 -0.294872 0.147141 0 1 0
+0.430225 0.0924874 0.320513 0 0 1
+-0.5 0.152638 0.167459 1 0 0
+0.165359 0.207794 0.371795 0 0 1
+0.5 -0.215121 0.0432667 1 0 0
+0.0788876 -0.0723686 -0.333333 0 0 1
+-0.318854 0.371795 0.0929171 0 1 0
+-0.201308 0.371795 -0.34138 0 1 0
+-0.5 -0.0805781 -0.24674 1 0 0
+-0.230923 -0.215187 0.371795 0 0 1
+0.438841 -0.321916 0.320513 0.0256596 0.0233849 0.999397
+-0.196133 0.371795 0.249472 0 1 0
+-0.5 0.162427 0.155646 1 0 0
+-0.5 0.253462 -0.10819 1 0 0
+-0.111946 -0.195802 0.371795 0 0 1
+-0.223727 0.371795 0.0668033 0 1 0
+0.5 -0.288006 -0.173857 0.923994 -0.366198 0.110154
+-0.214874 -0.0331876 -0.0312587 0.217516 -0.490622 0.843787
+-0.233712 0.0653608 0.371795 0 0 1
+-0.317421 -0.371795 -0.0370776 0 1 0
+-0.428158 0.0471212 -0.371795 0 0 1
+0.441614 -0.371795 0.211865 -0.146955 0.988995 0.017121
+-0.315327 -0.371795 0.188289 0 1 0
+-0.5 0.169929 -0.272668 1 0 0
+0.306174 0.294872 0.26162 0 1 0
+-0.448718 -0.349043 0.276222 1 0 0
+-0.122371 -0.230897 -0.340123 0.0167458 0.986879 -0.160593
+-0.5 -0.0668569 0.122723 1 0 0
+0.5 0.294546 -0.338634 0.91729 0.393235 -0.0628023
+-0.0990127 0.179005 0.331848 -0.475939 0.879478 0
+-0.431369 0.0947561 -0.371795 0 0 1
+-0.225789 0.0645915 -0.333333 0 0 1
+-0.0511393 0.371795 -0.367615 -0.0403542 0.963348 -0.265202
+0.5 -0.292816 0.0645183 0.934894 -0.343824 0.0880766
+0.223803 -0.0377999 -0.238793 0.22419 0.974487 -0.0106476
+0.448718 -0.331815 -0.210023 1 0 0
+-0.135824 0.371795 0.0445309 0 1 0
+0.194308 -0.137346 -0.333333 0 0 1
+0.202009 0.0254259 -0.00138561 0.654096 -0.672206 -0.346839
+0.0140573 0.371795 -0.0835871 0 1 0
+0.146803 -0.334773 0.320513 -0.279474 0.0809485 0.956735
+0.0389564 0.318063 -0.371795 0 0 1
+-0.5 0.013051 0.208003 1 0 0
+-0.5 -0.251906 -0.131428 1 0 0
+-0.5 0.33863 -0.28789 1 0 0
+-0.5 0.118867 -0.263754 1 0 0
+-0.5 0.245659 0.100384 1 0 0
+0.32628 0.244175 -0.371795 0 0 1
+-0.439856 -0.339764 0.320513 0 0 1
+-0.126523 -0.294872 -0.219067 0 1 0
+0.5 -0.189793 0.191336 1 0 0
+0.063792 -0.294872 -0.125928 0 1 0
+-0.144173 -0.244442 -0.371795 0.00321372 -0.00730808 0.999968
+0.290105 0.294872 -0.0611679 0 1 0
+-0.5 -0.0557491 -0.198989 1 0 0
+0.237249 0.210859 -0.333333 0 0 1
+-0.49263 0.371795 -0.314589 -0.276837 0.957764 0.0777726
+-0.391776 -0.371795 0.12971 0 1 0
+0.369992 -0.371795 -0.286196 0 1 0
+0.386875 -0.0873718 -0.371795 0 0 1
+-0.141154 -0.362849 -0.330462 0.999697 -0.024587 0.000820222
+-0.363217 0.312626 -0.371795 0 0 1
+0.295094 0.294872 0.255951 0 1 0
+-0.5 0.320238 0.0841219 1 0 0
+-0.28063 0.371795 -0.284161 0 1 0
+0.318077 0.116148 -0.333333 0.496419 0.0112641 0.86801
+-0.5 -0.171328 -0.0878746 1 0 0
+-0.5 0.219244 0.0600631 1 0 0
+-0.5 0.251645 0.192472 1 0 0
+-0.0301269 0.202356 0.357906 -0.164576 0.986364 0
+0.14365 -0.0685506 0.320513 0 0 1
+0.335328 -0.251416 0.320513 0 0 1
+0.18561 -0.164216 0.371795 0 0 1
+0.391074 -0.371795 -0.166478 0 1 0
+-0.230355 0.371795 0.261693 0 1 0
+-0.425236 0.371795 0.0569358 0 1 0
+0.439871 0.19886 -0.371795 0 0 1
+0.366584 -0.371795 -0.178891 0 1 0
+0.0595347 -0.197423 0.371795 -0.15898 0.446945 0.880321
+-0.473767 -0.294872 -0.236016 0 1 0
+0.383203 0.294872 -0.107011 0 1 0
+0.392538 -0.371795 -0.104785 0 1 0
+0.366782 -0.0918388 0.356366 0.936952 -0.349459 0
+-0.212802 0.371795 0.00228121 0 1 0
+-0.204704 -0.371795 -0.136319 0 1 0
+-0.5 -0.214504 -0.204052 1 0 0
+0.176735 -0.371795 -0.135567 0 1 0
+0.413893 -0.293852 -0.371795 0 0 1
+0.416154 -0.3614 0.320513 0 0 1
+-0.228842 -0.221065 -0.333333 0 0 1
+0.5 -0.1649 0.297566 1 0 0
+0.0620898 -0.102172 -0.333333 0 0 1
+-0.189989 0.230897 -0.362571 0.00428066 0.998907 0.046555
+-0.5 0.089325 -0.307 1 0 0
+-0.222104 0.185129 0.371795 0 0 1
+-0.190557 0.29894 -0.371795 0 0 1
+0.5 0.2382 -0.245763 1 0 0
+0.353666 -0.371795 0.214087 0 1 0
+-0.463507 0.371795 -0.0964884 0 1 0
+-0.372145 0.371795 -0.0226457 0 1 0
+-0.368408 0.371795 -0.307376 0 1 0
+0.5 -0.105462 -0.160292 1 0 0
+-0.00308795 0.204555 0.366248 0.0111064 0.969093 -0.246447
+-0.5 -0.0555366 0.0915687 1 0 0
+-0.205707 -0.0354625 -0.312059 -0.567275 0.823492 -0.00779517
+-0.159208 -0.254064 0.33409 0.102453 0.99472 -0.00591363
+0.381365 0.044711 0.320513 0.578268 0.0329058 0.815183
+-0.283848 0.371795 -0.267324 0 1 0
+0.5 -0.185642 0.0889371 1 0 0
+-0.497794 -0.294872 0.139451 0.635121 0.772413 0
+0.074793 -0.294872 -0.00923261 0 1 0
+-0.14384 0.371795 -0.105954 0 1 0
+-0.478589 0.358757 -0.371795 0 0 1
+-0.0156798 0.371795 0.278403 0 1 0
+0.5 -0.0276622 -0.206147 1 0 0
+0.0647096 -0.294872 0.0252474 0 1 0
+-0.274127 0.112355 0.371795 0 0 1
+-0.5 -0.0256026 0.121985 1 0 0
+0.5 0.213239 -0.0185737 1 0 0
+0.468538 -0.294872 -0.135164 0 1 0
+0.5 0.00462449 0.149759 1 0 0
+0.141026 0.3622 0.262382 1 0 0
+0.375474 -0.371795 0.13719 0 1 0
+-0.389147 0.279434 0.320513 0 0 1
+0.312833 -0.0748266 0.371795 0 0 1
+0.175478 -0.371795 0.227212 0 1 0
+-0.448631 -0.00452564 0.320513 0 0 1
+0.416325 0.294872 0.293698 0 1 0
+0.0424933 0.0449307 0.320513 0 0 1
+0.160361 0.294872 -0.190762 0 1 0
+-0.273221 -0.210763 0.322502 0.589487 0.613049 -0.525999
+0.10922 0.296393 -0.371795 0 0 1
+0.461823 -0.294872 0.304352 0 1 0
+-0.5 -0.266825 0.10221 1 0 0
+-0.268587 -0.322035 0.320513 0 0 1
+-0.0515811 -0.294872 0.260137 0 1 0
+-0.237711 0.297375 0.320513 0 0 1
+-0.5 0.275647 -0.333689 1 0 0
+0.5 -0.020563 -0.357525 1 0 0
+-0.397459 0.00551551 0.320513 0 0 1
+-0.472491 -0.189053 0.320513 0 0 1
+-0.0183233 -0.236952 -0.371795 -0.0417241 -0.197469 0.979421
+-0.252744 -0.0376237 -0.140379 0.500312 0.865824 0.00609912
+0.408761 0.0475256 0.320513 0 0 1
+0.448718 -0.324303 -0.290252 1 0 0
+0.389903 0.294872 0.0240695 0 1 0
+0.421412 -0.192 0.320513 0 0 1
+0.301669 -0.282946 0.320513 0 0 1
+-0.302245 -0.203691 -0.349529 0.765947 0.642859 -0.00762578
+-0.5 -0.150189 0.140362 1 0 0
+0.5 -0.16195 -0.311152 1 0 0
+-0.5 0.357276 0.0051802 1 0 0
+0.448718 -0.304948 0.247489 0.99875 -0.0494566 -0.00723345
+0.28968 0.294872 -0.292096 0 1 0
+0.253004 0.294872 0.242974 0 1 0
+-0.158145 -0.371795 0.0245092 0 1 0
+0.137528 -0.294872 -0.10049 0.409848 0.911027 -0.0453234
+-0.220078 0.0420908 -0.131615 0.225152 0.974267 -0.0104995
+-0.2738 -0.00639521 -0.248383 0.994053 0.108397 -0.0104175
+0.5 -0.0831007 -0.114582 1 0 0
+0.383217 -0.371795 0.0442556 0 1 0
+0.351751 -0.174061 -0.371795 0 0 1
+-0.311946 0.177773 0.368048 0.623838 -0.501688 -0.599279
+0.406652 -0.371795 0.285408 0 1 0
+0.435109 0.294872 -0.237566 0 1 0
+-0.4772 -0.294872 -0.366908 -0.0920814 0.890172 0.446224
+0.5 -0.0443774 0.163473 1 0 0
+-0.00905012 -0.180508 -0.333333 0 0 1
+0.0864542 0.129946 -0.333333 0 0 1
+0.141109 -0.305233 0.255832 0.995716 0.0919759 -0.00946896
+0.347543 -0.371795 0.14163 0 1 0
+-0.128447 0.371795 -0.0263978 0 1 0
+-0.448718 -0.296771 0.238612 0.741768 0.669534 -0.0387865
+0.5 0.0985126 0.105242 1 0 0
+0.424699 -0.103505 0.320513 0 0 1
+-0.448718 -0.316827 -0.219905 1 0 0
+0.368024 0.294872 -0.0110669 0 1 0
+0.5 -0.232166 -0.154848 1 0 0
+0.499694 -0.267675 -0.371795 0.933058 0.0400528 -0.35749
+0.244991 -0.328267 0.320513 0 0 1
+-0.5 -0.233947 -0.191125 1 0 0
+-0.5 0.0436224 0.243259 1 0 0
+-0.491903 0.371795 -0.322602 -0.20692 0.978292 -0.0113615
+-0.253648 0.232695 -0.371795 -0.0436108 0.398466 0.916146
+0.108868 -0.123534 0.320513 0 0 1
+0.206487 0.129066 0.371795 0 0 1
+-0.321237 -0.371795 0.0864168 0 1 0
+0.5 -0.151838 0.242452 1 0 0
+-0.495437 -0.294872 -0.154459 0.398922 0.916946 0.0084183
+0.0404462 0.226247 0.371795 0 0 1
+0.193952 -0.371795 -0.0389709 0 1 0
+0.428635 -0.217711 -0.371795 0 0 1
+-0.5 0.0649605 -0.312319 1 0 0
+-0.0852744 0.18644 0.349906 -0.43326 0.901263 -0.00336303
+0.448718 -0.307191 0.0562405 0.999303 -0.0372846 0.00192037
+-0.5 -0.253748 -0.219235 1 0 0
+-0.43629 -0.371795 -0.206782 0 1 0
+-0.364267 0.371795 -0.359601 0 1 0
+0.5 -0.190066 0.0235068 1 0 0
+-0.229224 -0.371795 -0.334282 0 1 0
+0.448718 -0.371162 -0.113375 0.746593 -0.662275 0.0631741
+-0.355822 -0.371795 0.30581 0 1 0
+-0.27014 0.371795 0.0728713 0 1 0
+-0.304007 -0.17136 0.371795 0 0 1
+0.196574 -0.371795 0.245094 0 1 0
+-0.398917 0.269097 -0.371795 0 0 1
+-0.215891 0.040969 -0.331983 0.229459 0.330978 0.915315
+0.441153 -0.371795 0.200891 -0.195945 0.967144 0.161978
+-0.459737 -0.294872 0.0263012 0 1 0
+-0.248981 0.158088 -0.333333 0 0 1
+0.389035 -0.03545 -0.371795 0 0 1
+-0.387175 0.332816 0.320513 0 0 1
+-0.14098 0.371795 -0.338938 0 1 0
+0.0533198 -0.294872 0.00753935 0 1 0
+-0.406667 0.371795 -0.0109223 0 1 0
+-0.188288 0.00923563 -0.186806 0.970091 0.242595 0.0083766
+0.056532 0.371795 0.0201447 0 1 0
+0.15879 -0.371795 -0.160756 0 1 0
+0.0244301 0.371795 -0.271279 0 1 0
+-0.464653 -0.294872 -0.25146 0 1 0
+-0.5 0.241537 0.202166 1 0 0
+0.371516 -0.315732 0.320513 0 0 1
+0.5 0.211962 -0.237938 1 0 0
+-0.168918 0.358792 -0.371795 0 0 1
+0.232335 0.152302 -0.333333 0 0 1
+-0.445689 -0.371795 -0.313525 0.196868 0.978284 0.064841
+0.5 0.0682188 -0.0225302 1 0 0
+-0.136133 -0.294872 -0.348148 -0.237938 0.97023 0.0451624
+-0.486931 -0.294872 -0.122079 0 1 0
+-0.294301 0.0962892 -0.333333 0 0 1
+0.141109 -0.309339 0.181432 1 0 0
+-0.315513 0.371795 0.309809 0.0323062 0.986939 0.157825
+0.280751 0.162271 0.371795 0 0 1
+-0.0026965 0.371795 0.104758 0 1 0
+0.5 0.168962 -0.179517 1 0 0
+0.100806 -0.294872 0.204093 0 1 0
+0.151349 0.248923 -0.371795 0 0 1
+0.243635 -0.0757059 0.371795 0 0 1
+-0.0512043 -0.294872 0.205409 0 1 0
+-0.5 -0.195729 -0.291086 1 0 0
+0.264554 0.0182104 -0.243176 0.8755 0.483192 0.00495146
+-0.255716 -0.151684 0.371795 0 0 1
+0.5 0.149275 0.112549 1 0 0
+-0.360795 0.105217 -0.371795 0 0 1
+0.5 0.0840313 -0.105306 1 0 0
+-0.5 0.273805 0.31479 0.936158 -0.0261187 -0.350608
+-0.336892 0.147789 0.322909 -0.682773 0.627287 0.37461
+0.161724 0.294872 -0.25455 0 1 0
+0.257382 0.294872 0.301253 0 1 0
+0.5 -0.0259534 0.0229515 1 0 0
+-0.112767 0.131033 0.320513 0 0 1
+0.0431702 0.179204 0.320513 0 0 1
+0.299968 -0.1299 -0.333333 0 0 1
+-0.447403 -0.371795 -0.150017 0.879785 0.470037 0.0710176
+0.0601223 -0.294872 -0.20806 0 1 0
+-0.1228 0.371795 0.132098 0 1 0
+0.0241888 -0.294872 -0.066583 0 1 0
+0.092697 -0.0674979 -0.333333 0 0 1
+0.0806027 -0.267989 -0.371795 0 0 1
+-0.0813961 0.322932 0.320513 0 0 1
+-0.5 -0.0866417 -0.30883 1 0 0
+0.141109 -0.349426 0.0995668 1 0 0
+0.116174 0.00718772 -0.333333 0 0 1
+-0.315133 0.257555 -0.371795 0 0 1
+0.145641 0.151634 -0.333333 0 0 1
+0.231699 0.0292333 0.00549598 -0.0101725 0.51051 0.859812
+-0.0795879 0.213227 0.371795 0 0 1
+0.299347 0.203104 0.320513 0.00700387 0.0238522 0.999691
+-0.162176 -0.264925 -0.371795 0 0 1
+0.5 0.270722 -0.125765 1 0 0
+-0.141154 -0.325074 -0.33067 1 0 0
+-0.261105 0.0310746 -0.146685 0.717369 -0.696543 0.0144606
+0.5 -0.25549 0.294087 1 0 0
+0.141026 0.342494 0.276407 1 0 0
+0.092321 -0.191364 0.371795 -0.0322804 0.0600058 0.997676
+-0.5 0.00252883 -0.0754228 1 0 0
+0.194932 0.294872 0.255385 0 1 0
+0.32842 0.156554 0.371795 0.549633 0.468026 0.691994
+-0.192103 -0.0198303 -0.118343 0.909047 -0.416248 -0.0192718
+-0.260116 -0.0320638 -0.114671 0.690022 0.723535 0.0191202
+-0.5 -0.291086 0.0022715 0.833958 0.528603 0.158405
+-0.0644477 0.371795 0.173866 0 1 0
+-0.00769661 0.371795 -0.0978833 0 1 0
+0.136044 0.371795 0.0350598 0.161002 0.982658 0.0919816
+-0.5 -0.0919466 0.175097 1 0 0
+-0.5 0.241793 -0.115289 1 0 0
+0.308672 -0.171733 0.371795 0.0796023 -0.0716869 0.994246
+0.182207 -0.371795 -0.24416 0 1 0
+-0.107299 0.371795 -0.155668 0 1 0
+-0.319244 0.226472 -0.371795 0 0 1
+-0.27399 -0.00421964 -0.31172 0.997356 0.0726689 -0.0007401
+-0.5 0.3154 -0.145809 1 0 0
+-0.5 0.324867 0.0934194 1 0 0
+-0.5 -0.257712 -0.0468227 1 0 0
+0.174039 -0.107607 0.343184 0.837149 -0.546974 0
+-0.176122 -0.251184 0.35591 0.212537 0.977153 0
+-0.5 -0.211331 -0.0221724 1 0 0
+-0.130775 0.204462 0.371795 0 0 1
+-0.5 0.286053 -0.017923 1 0 0
+-0.320582 -0.21179 -0.371795 0 0 1
+-0.183848 -0.116318 -0.333333 0 0 1
+-0.5 0.147453 0.290379 1 0 0
+-0.389337 -0.162654 -0.371795 0 0 1
+-0.16839 -0.371795 0.0583537 0 1 0
+-0.5 0.295156 0.229889 1 0 0
+-0.5 -0.127943 -0.197439 1 0 0
+0.138278 0.371795 0.257547 0.235584 0.945687 0.224001
+-0.016587 0.371795 -0.189913 0 1 0
+-0.223264 -0.00911279 0.371795 0 0 1
+-0.172308 0.371795 -0.292549 0 1 0
+0.5 0.0906727 0.184537 1 0 0
+0.0135309 0.0618666 0.320513 0 0 1
+0.445675 -0.228329 -0.371795 0 0 1
+-0.185025 -0.371795 0.0956876 0 1 0
+0.364916 -0.0968426 0.347915 0.936953 -0.349456 0
+-0.187731 -0.00630176 -0.0379725 0.922539 -0.161704 0.350391
+-0.290828 0.254886 -0.371795 0 0 1
+0.116259 0.0042565 0.320513 0 0 1
+0.0698421 0.330573 -0.371795 0 0 1
+-0.106968 -0.294872 -0.195048 0 1 0
+0.141109 -0.324773 0.211718 1 0 0
+0.468696 -0.179881 0.320513 0 0 1
+-0.0105847 0.371795 -0.0188876 0 1 0
+0.201856 0.294872 -0.26811 0 1 0
+-0.351852 0.0738371 0.371795 0 0 1
+0.5 0.223477 0.0602315 1 0 0
+0.407889 -0.0297863 0.320513 0 0 1
+0.5 0.0939103 -0.187711 1 0 0
+-0.485814 -0.294872 -0.014677 0 1 0
+-0.453527 0.179994 -0.371795 0 0 1
+-0.0484062 0.0297728 0.320513 0 0 1
+-0.5 0.287812 0.142838 1 0 0
+-0.5 0.356739 -0.0874956 1 0 0
+-0.251975 0.371795 0.0847494 0 1 0
+0.0176021 0.371795 0.223543 0 1 0
+0.063626 -0.294872 -0.239026 0 1 0
+0.320513 0.00726887 -0.338958 0.902141 0.130368 0.411273
+-0.290697 -0.205237 -0.333333 -0.182561 -0.228331 0.956314
+-0.178599 -0.139499 0.371795 0 0 1
+0.5 -0.187723 0.0504949 1 0 0
+0.228015 -0.245553 0.320513 0.0193084 -0.0351046 0.999197
+0.182133 0.294872 0.00800085 0 1 0
+0.0816215 -0.294872 -0.129855 0 1 0
+0.44162 0.294872 0.0305535 0 1 0
+-0.5 0.0416117 0.0691663 1 0 0
+-0.188424 -0.0534357 0.320513 0.035742 -0.00283328 0.999357
+-0.5 0.261983 0.0178019 1 0 0
+-0.279686 0.0645331 -0.333333 0 0 1
+0.184954 -0.371795 0.015331 0 1 0
+-0.393688 -0.134035 -0.371795 0 0 1
+-0.448718 -0.317933 -0.363542 0.983335 0.0811343 0.162696
+-0.225888 -0.349117 -0.371795 0 0 1
+-0.449173 0.11188 0.320513 0 0 1
+0.261564 -0.371795 -0.354766 0 1 0
+-0.342962 0.0459165 0.371795 0 0 1
+-0.00761565 -0.221367 -0.333333 0.0246084 -0.162221 0.986448
+0.448718 -0.302699 -0.0178849 0.996889 -0.078436 0.00778449
+-0.274661 -0.371795 -0.0513513 0 1 0
+0.377734 0.0555266 0.329469 0.970728 0.188678 0.14862
+-0.339714 -0.371795 -0.0512089 0 1 0
+-0.213223 0.039731 -0.253163 0.416859 0.908956 -0.00522134
+-0.373279 -0.074419 0.328379 0.936736 0.347689 -0.0404664
+-0.289812 0.345359 -0.371795 0 0 1
+-0.0164952 -0.294872 -0.0285757 0 1 0
+-0.163457 0.23271 0.371795 0 0 1
+-0.0201099 -0.294872 -0.210847 0 1 0
+-0.448718 -0.350796 -0.147415 1 0 0
+-0.0075343 0.371795 -0.0400749 0 1 0
+0.473406 0.294872 -0.00496577 0 1 0
+-0.336467 0.371795 -0.362488 0 1 0
+0.273561 -0.288325 -0.371795 0 0 1
+-0.0176789 -0.0550214 0.320513 0 0 1
+-0.5 -0.226342 0.0239782 1 0 0
+0.282119 0.220544 -0.358646 0.511817 0.858687 -0.0264634
+0.0802622 0.113549 -0.333333 0 0 1
+-0.0018064 0.367434 -0.371795 -0.034038 -0.330319 0.943255
+-0.5 0.162319 -0.234251 1 0 0
+-0.209903 -0.0381831 -0.203796 -0.495232 0.8687 -0.0102687
+-0.5 -0.228917 -0.0287321 1 0 0
+0.0293635 0.371795 0.0435717 0 1 0
+-0.169561 -0.0643112 0.320513 0 0 1
+0.21309 -0.269292 0.320513 0 0 1
+-0.395893 0.371795 -0.136892 0 1 0
+0.382628 0.0259972 0.364092 0.9878 0.0201074 0.154425
+0.192474 0.00190018 -0.15848 0.997719 -0.0674401 0.00292349
+-0.227923 0.0433408 -0.13202 0.0515572 0.998476 -0.01967
+0.0968629 -0.238363 0.371795 0 0 1
+-0.489592 0.0967435 0.320513 0 0 1
+0.375505 -0.371795 0.23639 0 1 0
+0.0351821 0.366552 -0.371795 -0.0403173 -0.209535 0.97697
+-0.379526 -0.215875 -0.371795 0 0 1
+-0.262838 -0.371795 -0.24225 0 1 0
+0.0340719 0.255066 -0.371795 0 0 1
+0.43944 0.243715 0.320513 0 0 1
+-0.238814 0.357904 -0.371795 0 0 1
+0.5 -0.285186 0.0734131 0.99804 -0.0625048 -0.00318946
+-0.141154 -0.341289 -0.244042 1 0 0
+0.5 0.216692 -0.24962 1 0 0
+-0.109826 0.371795 -0.0029419 0 1 0
+0.387416 0.268363 0.320513 0 0 1
+-0.448718 -0.369241 -0.218819 0.934657 0.342125 0.0967815
+-0.338451 0.251486 -0.371795 0 0 1
+-0.448718 -0.298316 0.0383907 0.892699 0.435826 0.114645
+0.267452 0.0111363 -0.266363 0.959828 0.28056 -0.00401954
+0.381055 0.177124 -0.371795 0 0 1
+0.491699 0.294872 0.0381907 0.199066 0.979401 -0.0338452
+-0.114992 0.169711 0.335859 -0.58106 0.813785 -0.0110497
+0.5 -0.0056738 0.265416 1 0 0
+0.263149 0.126739 0.371795 0 0 1
+-0.5 -0.0237842 -0.205859 1 0 0
+-0.229011 0.0683771 -0.333333 0 0 1
+0.213004 -0.36082 -0.371795 0.005094 0.0438047 0.999027
+0.250297 0.23859 0.320513 0 0 1
+-0.446621 -0.371795 -0.175199 0.310717 0.938915 -0.147963
+0.137486 0.371795 -0.279621 0.532457 0.834504 -0.141746
+0.0418577 -0.202118 -0.333333 0 0 1
+-0.5 -0.110673 -0.0244934 1 0 0
+0.381252 -0.371795 0.199124 0 1 0
+-0.5 0.166828 -0.180149 1 0 0
+-0.5 0.0308947 0.0558172 1 0 0
+0.180583 0.0601451 -0.333333 0 0 1
+0.0726625 0.371795 0.224217 0 1 0
+0.0686226 -0.294872 -0.24244 0 1 0
+-0.243254 0.371795 0.316563 0.0920034 0.911484 0.400914
+0.315805 -0.371795 -0.208312 0 1 0
+-0.235823 0.224291 0.371795 -0.060381 0.0967553 0.993475
+0.278646 0.294872 0.170243 0 1 0
+-0.5 0.234896 -0.182595 1 0 0
+-0.181484 -0.0954881 0.33214 0.899581 0.43551 0.0329417
+-0.495167 -0.294872 0.248036 0.360839 0.930143 0.0680434
+-0.242562 0.371795 -0.171178 0 1 0
+0.5 -0.0498483 -0.105992 1 0 0
+-0.444477 0.371795 0.283651 0 1 0
+-0.5 -0.208872 0.140017 1 0 0
+-0.000302916 0.371795 0.136849 0 1 0
+-0.0291173 0.149752 -0.333333 0 0 1
+-0.5 0.0476975 -0.355637 1 0 0
+-0.188072 0.371795 -0.164697 0 1 0
+0.463076 0.294872 -0.291072 0 1 0
+0.464339 -0.294872 0.219576 0 1 0
+-0.0437206 0.371795 -0.334346 0 1 0
+0.237372 -0.231646 0.344371 -0.451093 0.892474 0.00221559
+0.284117 -0.371795 0.11355 0 1 0
+0.236149 0.229428 -0.333333 0.0242523 0.301562 0.953138
+-0.5 0.0233105 0.0838069 1 0 0
+-0.210878 -0.371795 0.300019 0 1 0
+-0.189662 0.152496 0.371795 0 0 1
+0.03853 -0.114359 0.320513 0 0 1
+0.5 -0.289452 -0.367411 0.848032 -0.459264 -0.264421
+0.5 0.101771 0.0386308 1 0 0
+-0.0887244 0.256282 0.347039 0 1 0
+0.203902 -0.0163371 0.342256 0.996585 -0.0825716 0
+0.358473 -0.371795 -0.230268 0 1 0
+-0.5 0.334176 -0.169667 1 0 0
+0.105475 0.345529 0.320513 0 0 1
+-0.43931 0.371795 -0.279403 0 1 0
+-0.260882 -0.371795 -0.0796667 0 1 0
+0.353893 -0.104803 0.371795 0.137111 -0.068428 0.988189
+0.282609 -0.371795 -0.154173 0 1 0
+0.326258 0.294872 0.178081 0 1 0
+-0.0582946 0.371795 -0.346256 0 1 0
+0.391848 -0.332847 -0.371795 0 0 1
+0.141109 -0.299305 0.226879 0.899859 0.419803 0.1184
+0.251155 0.0324996 -0.0622919 0.511057 0.859547 0.00084018
+-0.298119 -0.371795 0.262828 0 1 0
+-0.5 -0.123068 -0.342422 1 0 0
+0.5 0.16405 -0.0284243 1 0 0
+0.166241 -0.371795 -0.225265 0 1 0
+0.350454 -0.235669 0.320513 0 0 1
+-0.5 0.0622623 -0.214604 1 0 0
+0.448718 -0.309623 0.0444945 1 0 0
+0.0155668 -0.0813763 0.320513 0 0 1
+0.152429 -0.334253 0.320513 0 0 1
+0.0332927 -0.294872 -0.280648 0 1 0
+0.190718 0.294872 -0.00124014 0 1 0
+0.141026 0.310938 -0.0715518 1 0 0
+-0.184026 0.321765 -0.371795 0 0 1
+-0.5 -0.212135 0.0363004 1 0 0
+-0.0515755 -0.294872 -0.217477 0 1 0
+-0.448205 -0.188421 0.320513 0 0 1
+0.224112 -0.31375 -0.371795 0 0 1
+-0.21092 0.371795 -0.0677766 0 1 0
+0.141109 -0.340814 0.209914 1 0 0
+0.5 -0.246332 0.0890842 1 0 0
+0.404045 -0.364079 0.320513 -0.0422869 -0.165716 0.985266
+0.5 -0.134329 -0.259759 1 0 0
+0.141109 -0.363498 -0.238653 0.985338 0.167738 0.0312086
+-0.5 0.0877895 -0.132652 1 0 0
+0.141026 0.310948 0.26814 1 0 0
+0.264843 -0.135173 -0.333333 0 0 1
+-0.112701 0.371795 0.0575986 0 1 0
+0.428354 -0.128539 0.320513 0 0 1
+0.18029 -0.102548 -0.333333 0 0 1
+-0.394751 0.0767481 -0.371795 0 0 1
+0.384333 -0.00215007 0.325576 0.840556 -0.14012 0.523289
+0.44363 0.294872 0.212787 0 1 0
+0.193362 0.00843269 -0.197466 0.977995 -0.207153 -0.0247822
+0.345959 -0.371795 -0.15731 0 1 0
+0.0826857 -0.0776022 -0.333333 0 0 1
+-0.477516 -0.292262 -0.371795 0.0647335 0.391353 0.917961
+0.448718 -0.334441 0.0140768 1 0 0
+-0.345127 0.287614 0.320513 0 0 1
+0.448718 -0.358436 0.110409 1 0 0
+0.0661147 0.108859 0.320513 0 0 1
+0.192366 0.000658309 -0.277117 0.999005 0.0422173 0.0143539
+0.25505 -0.029773 -0.219348 -0.631534 0.775344 -0.00246975
+0.141109 -0.303202 -0.272448 0.972195 0.189817 -0.137139
+0.294313 0.294872 0.181761 0 1 0
+0.5 -0.210126 0.301562 1 0 0
+-0.0298564 -0.258796 -0.371795 0 0 1
+0.364197 0.244869 -0.371795 0 0 1
+-0.101481 -0.294872 0.100763 0 1 0
+-0.0454369 -0.165653 -0.333333 0 0 1
+0.344528 -0.241648 -0.371795 0 0 1
+0.5 -0.263434 0.0158541 1 0 0
+0.0893978 0.371795 -0.0765764 0 1 0
+0.265965 0.213601 -0.333333 0 0 1
+-0.0998818 0.126703 -0.333333 0 0 1
+0.222902 -0.0283041 0.0053918 -0.124036 -0.498104 0.8582
+-0.19006 0.01545 -0.161987 0.933546 0.35821 -0.0133421
+0.435481 -0.371795 -0.292429 0 1 0
+-0.185121 -0.371795 0.293425 0 1 0
+0.232098 -0.367382 -0.371795 0.0048397 0.315542 0.948899
+0.311984 -0.371795 0.0880848 0 1 0
+0.365047 -0.33039 -0.371795 0 0 1
+0.228349 0.0382497 -0.0643366 -0.111318 0.993739 0.00955461
+-0.5 -0.105372 0.0844573 1 0 0
+0.188218 -0.141434 -0.333333 0 0 1
+-0.0154396 0.371795 -0.344635 0 1 0
+-0.5 -0.185717 -0.239324 1 0 0
+-0.410033 -0.371795 -0.32906 0 1 0
+-0.5 -0.242945 -0.325239 1 0 0
+0.152276 0.0627891 0.320513 0 0 1
+0.222359 0.0621325 -0.333333 0 0 1
+-0.257686 0.0341631 -0.215761 -0.613312 0.789687 -0.015547
+0.0924916 0.338776 0.320513 0 0 1
+-0.477872 -0.126495 -0.371795 0 0 1
+0.281967 0.0351137 0.371795 0 0 1
+-0.330657 0.371795 -0.322858 0 1 0
+0.141026 0.310662 0.068708 1 0 0
+0.0447523 0.256282 0.338209 0 1 0
+-0.291025 -0.283003 -0.371795 0 0 1
+0.11017 0.087755 0.320513 0 0 1
+-0.5 0.156734 0.0503223 1 0 0
+-0.320513 0.0958723 -0.34724 1 0 0
+0.300112 0.294872 0.0932991 0 1 0
+-0.448718 -0.295551 0.106801 0.903517 0.415572 -0.104676
+-0.5 0.290631 -0.193096 1 0 0
+0.140951 -0.294872 -0.251779 0.639199 0.768084 -0.0383671
+-0.5 0.285915 -0.115409 1 0 0
+0.320513 0.0238677 -0.35824 1 0 0
+0.250247 -0.0331361 -0.244069 -0.500266 0.86587 -0.0018722
+0.0115652 -0.294872 -0.191213 0 1 0
+0.0595566 -0.294872 -0.0931414 0 1 0
+0.141109 -0.359727 -0.21409 1 0 0
+-0.415713 -0.371795 -0.37128 0.0735914 0.729468 0.680045
+-0.251173 0.0383984 -0.256877 -0.490714 0.871316 0.00283388
+-0.180078 -0.250323 0.352459 0.212544 0.977152 0
+0.279142 0.109135 0.371795 0 0 1
+-0.5 -0.0835486 -0.206115 1 0 0
+0.237739 0.294872 -0.310562 0 1 0
+0.449671 0.294872 -0.247725 0 1 0
+-0.255155 -0.09572 0.371795 0 0 1
+0.5 0.159719 0.0278129 1 0 0
+-0.152815 0.254522 0.33388 -0.0715155 0.99744 8.67934e-005
+-0.23126 -0.371795 -0.277283 0 1 0
+0.141026 0.351387 0.0426567 1 0 0
+0.12004 -0.294872 0.126358 0 1 0
+-0.448718 -0.341088 0.00835742 1 0 0
+0.258599 -0.0100199 0.371795 0 0 1
+0.0676717 0.371795 -0.268675 0 1 0
+0.337897 0.294872 0.109577 0 1 0
+0.390044 0.106001 0.320513 0 0 1
+0.321775 0.0783671 0.371795 0 0 1
+-0.422543 -0.371795 0.139784 0 1 0
+-0.290459 0.214705 -0.369183 -0.434451 0.766575 0.472879
+0.471326 -0.175973 -0.371795 0 0 1
+-0.195951 0.0259819 -0.252819 0.774227 0.632636 -0.0185598
+-0.322669 -0.198459 -0.371795 0 0 1
+0.394554 0.294872 0.248736 0 1 0
+0.269623 0.294872 -0.065311 0 1 0
+0.5 0.25044 -0.328584 1 0 0
+-0.154253 0.293688 -0.371795 0 0 1
+0.28851 0.216069 -0.359425 0.591915 0.805862 0.0149359
+-0.026944 0.200149 0.320513 -0.117852 -0.502646 0.856422
+0.5 0.114309 0.125065 1 0 0
+-0.324056 0.371795 0.0574724 0 1 0
+-0.448718 -0.35445 0.131481 1 0 0
+0.5 0.223796 0.217347 1 0 0
+0.448718 -0.352835 0.064684 1 0 0
+0.5 -0.02943 0.169364 1 0 0
+0.5 -0.0464908 0.246601 1 0 0
+-0.5 0.0288255 0.0377588 1 0 0
+-0.129522 0.371795 -0.116423 0 1 0
+0.288075 -0.371795 0.182118 0 1 0
+0.5 -0.0775884 -0.128291 1 0 0
+-0.257565 -0.188848 0.371795 0 0 1
+-0.363858 -0.371795 0.242529 0 1 0
+-0.440538 -0.125038 0.320513 0 0 1
+-0.304719 -0.297982 0.320513 0 0 1
+-0.195982 0.278642 0.320513 0 0 1
+-0.127551 0.0580635 -0.333333 0 0 1
+0.359701 -0.047938 0.371795 0 0 1
+-0.236562 -0.232089 0.352965 0.442637 0.896677 0.0064689
+0.5 -0.167988 -0.348707 1 0 0
+-0.195741 0.0256815 -0.193305 0.800147 0.599797 0.00289865
+-0.013123 0.371795 -0.0827871 0 1 0
+-0.378343 0.052727 0.345665 0.977144 -0.21258 0
+-0.0315942 -0.157157 0.320513 0 0 1
+-0.405804 0.092219 -0.371795 0 0 1
+0.00199123 0.299397 -0.371795 0 0 1
+0.0145977 0.371795 -0.0565107 0 1 0
+0.218342 0.294872 0.264979 0 1 0
+0.141026 0.304934 -0.085294 1 0 0
+-0.036858 0.252138 -0.371795 0 0 1
+-0.102018 -0.294872 -0.0387669 0 1 0
+-0.5 0.176104 0.175444 1 0 0
+0.384285 -0.371795 0.144111 0 1 0
+0.452208 0.294872 -0.122359 0 1 0
+-0.376542 -0.371795 0.2833 0 1 0
+-0.197795 0.0675346 -0.333333 0 0 1
+-0.267041 0.0239057 -0.186167 0.875422 -0.483337 -0.0046134
+0.244363 -0.0359373 -0.0252081 -0.388261 0.92147 0.0121181
+-0.365748 0.115732 -0.371795 0 0 1
+0.0519893 0.371795 -0.131649 0 1 0
+-0.5 0.30767 -0.192933 1 0 0
+0.17194 0.294872 -0.167877 0 1 0
+-0.5 -0.203103 0.124303 1 0 0
+0.173959 -0.371795 -0.314411 0 1 0
+-0.5 -0.0569263 -0.0860888 1 0 0
+-0.0876353 -0.294872 0.238635 0 1 0
+-0.335746 -0.237002 0.320513 0 0 1
+0.5 0.25991 -0.0541625 1 0 0
+-0.338584 0.0075556 0.371795 0 0 1
+0.264331 0.0186886 -0.0879407 0.876724 0.480993 0.00122502
+-0.5 0.239455 -0.139409 1 0 0
+-0.299862 0.306 -0.371795 0 0 1
+0.267316 0.294872 0.0573376 0 1 0
+-0.41841 0.371795 -0.339637 0 1 0
+-0.5 0.340101 0.141442 1 0 0
+-0.116298 0.168695 0.365761 -0.512285 0.835626 -0.198227
+0.5 -0.183875 -0.00804915 1 0 0
+-0.5 -0.00554594 -0.200552 1 0 0
+-0.347602 0.10312 0.371795 0 0 1
+-0.0755357 -0.294872 -0.109753 0 1 0
+0.21806 -0.371795 -0.115154 0 1 0
+0.380229 0.294872 0.0628036 0 1 0
+-0.299689 0.202334 0.320513 -0.0701283 0.187327 0.979791
+0.371372 -0.0795326 0.348755 0.939758 -0.341838 -0.00142073
+0.5 -0.012895 0.299234 1 0 0
+0.387769 -0.371795 0.277332 0 1 0
+-0.255987 -0.356733 0.320513 0 0 1
+-0.361653 -0.208394 0.320513 0 0 1
+0.5 -0.291313 -0.171496 0.890981 -0.446299 0.083481
+-0.306264 0.213262 -0.371795 -0.0844574 0.191599 0.977833
+0.343511 -0.201646 0.320513 0 0 1
+-0.0737293 0.371795 0.118373 0 1 0
+0.264122 -0.120192 -0.333333 0 0 1
+-0.0259283 -0.294872 -0.135028 0 1 0
+-0.5 0.204949 0.219057 1 0 0
+0.0336299 0.371795 0.271014 0 1 0
+0.172912 0.294872 -0.330195 0 1 0
+0.413036 -0.371795 0.142493 0 1 0
+0.18089 -0.371795 0.162245 0 1 0
+0.348949 -0.206238 0.320513 0 0 1
+-0.171622 0.371795 -0.0770113 0 1 0
+-0.347478 0.371795 0.0359985 0 1 0
+0.0216985 4.22241e-005 0.320513 0 0 1
+-0.141154 -0.364524 -0.224115 0.98488 -0.172853 0.0115374
+0.175408 0.227694 0.371795 0 0 1
+-0.0846981 0.351881 -0.371795 0 0 1
+0.0233707 0.371795 -0.171868 0 1 0
+-0.25061 -0.371795 -0.197338 0 1 0
+-0.21505 -0.316563 0.320513 0 0 1
+0.480011 -0.294872 0.0846208 0 1 0
+-0.5 -0.152597 -0.231988 1 0 0
+0.141109 -0.321035 -0.0353552 1 0 0
+0.5 0.041632 0.104574 1 0 0
+-0.448718 -0.298099 0.0213345 0.774581 0.62757 -0.0786156
+0.257695 0.137957 0.371795 0 0 1
+-0.140958 -0.110405 -0.333333 0 0 1
+0.5 0.204669 0.120282 1 0 0
+-0.5 0.319075 -0.213185 1 0 0
+-0.454205 -0.294872 0.00929193 0.209223 0.97786 -0.00402006
+-0.280028 -0.162523 0.371795 0 0 1
+-0.209896 -0.063573 0.371795 0 0 1
+-0.315954 0.141717 0.371795 0 0 1
+0.268714 -0.00589783 -0.0398971 0.983485 -0.178588 -0.0293976
+-0.305065 0.103149 0.371795 0 0 1
+-0.0908293 0.0505357 -0.333333 0 0 1
+0.380464 0.294872 -0.0325417 0 1 0
+0.117548 -0.292153 -0.371795 -0.140715 0.542791 0.827996
+-0.5 -0.273274 0.00392493 1 0 0
+0.5 -0.236472 0.302161 1 0 0
+0.0262708 0.249561 0.371795 -0.133088 0.309273 0.941615
+-0.136648 0.371564 0.320513 0.103377 0.743985 0.660151
+0.0571594 0.371795 0.0532955 0 1 0
+-0.230169 0.188272 0.371795 0 0 1
+-0.497437 0.371795 0.163411 -0.408129 0.909009 0.0844526
+-0.0885736 0.0405713 -0.333333 0 0 1
+0.230686 -0.371795 0.0281714 0 1 0
+0.141026 0.320237 -0.233861 1 0 0
+0.28749 -0.371795 -0.201926 0 1 0
+-0.0351808 0.230897 -0.334262 -0.189587 0.6625 0.724673
+0.314446 -0.371795 0.188001 0 1 0
+-0.341001 -0.371795 -0.0521572 0 1 0
+0.032505 0.139991 -0.333333 0 0 1
+0.429139 0.291073 0.320513 -0.0300393 0.585852 0.809861
+-0.193016 0.0691969 0.335364 0.932353 -0.361524 0.0042684
+0.440794 -0.104186 -0.371795 0 0 1
+-0.228138 0.0433597 -0.27807 0.0650457 0.997882 -0.00104189
+-0.0676251 -0.294872 0.124065 0 1 0
+-0.5 -0.191046 -0.209231 1 0 0
+-0.443208 -0.371795 0.233478 0.323864 0.943725 0.0670423
+0.338973 -0.000331618 0.371795 0 0 1
+-0.401011 0.371795 -0.246484 0 1 0
+-0.262231 0.371795 0.0576541 0 1 0
+0.5 -0.171568 0.167201 1 0 0
+0.185522 0.294872 -0.236342 0 1 0
+-0.201694 0.371795 -0.345772 0 1 0
+-0.0525795 0.371795 0.196686 0 1 0
+-0.5 -0.256495 -0.0966795 1 0 0
+-0.44571 0.150306 0.320513 0 0 1
+0.380162 -0.371795 -0.320945 0 1 0
+-0.131851 0.156589 0.36001 -0.614261 0.7889 -0.0178999
+0.0605203 -0.216174 0.371795 0 0 1
+0.5 0.0958895 -0.198092 1 0 0
+0.254623 -0.371795 -0.227109 0 1 0
+-0.357423 0.371795 -0.122828 0 1 0
+0.157601 0.0403901 -0.333333 0 0 1
+-0.5 0.279453 0.0389137 1 0 0
+0.310835 0.294872 -0.0601983 0 1 0
+0.205483 -0.299218 -0.371795 0 0 1
+-0.347595 -0.371795 -0.329514 0 1 0
+-0.5 0.216428 -0.277582 1 0 0
+0.366517 -0.229724 0.320513 0 0 1
+0.0941575 0.371795 -0.363445 0.0235397 0.982439 -0.185092
+0.259299 -0.0256555 -0.288249 -0.688063 0.725616 -0.00710643
+0.195932 -0.285966 0.320513 0 0 1
+0.251622 -0.0321726 -0.159424 -0.514449 0.857471 0.00931415
+-0.19766 -0.371795 0.0780572 0 1 0
+0.376797 -0.215511 -0.371795 0 0 1
+-0.212458 -0.0258615 0.371795 0.0427911 -0.00618564 0.999065
+-0.469941 -0.294872 0.124217 0 1 0
+-0.149974 -0.351089 0.320513 0.115924 0.0133248 0.993169
+-0.5 0.0537074 -0.18483 1 0 0
+-0.204136 0.0135228 0.338318 0.996585 -0.0825784 0
+0.33949 0.294872 0.0357903 0 1 0
+0.0864702 -0.294872 0.0800051 0 1 0
+-0.141154 -0.351797 0.0114628 1 0 0
+-0.141154 -0.315498 0.266438 1 0 0
+-0.0496657 -0.294872 -0.169273 0 1 0
+-0.0703688 -0.294872 0.312051 0.0914088 0.958975 -0.268348
+0.0321307 -0.17114 0.320513 0 0 1
+0.456631 0.294872 -0.349351 0 1 0
+-0.202119 -0.0327602 -0.1118 -0.685547 0.727599 -0.0249924
+0.22205 -0.16081 0.371795 0 0 1
+-0.271035 0.360264 -0.371795 0.00863109 -0.0622068 0.998026
+0.5 -0.0176148 -0.0571186 1 0 0
+-0.470939 0.254369 -0.371795 0 0 1
+0.448692 -0.371795 -0.0866699 -0.239613 0.969392 0.0535149
+-0.424549 -0.306223 -0.371795 0 0 1
+-0.370837 -0.0809682 0.328955 0.936944 0.34948 0
+-0.5 -0.0935237 -0.327826 1 0 0
+0.5 0.0276408 -0.0797337 1 0 0
+0.295542 -0.371795 -0.250599 0 1 0
+-0.249224 -0.371795 0.00830044 0 1 0
+-0.172579 0.279232 -0.371795 0 0 1
+0.5 0.216383 -0.120656 1 0 0
+-0.338737 -0.107099 0.371795 0 0 1
+0.141109 -0.323152 0.102579 1 0 0
+-0.0198037 0.371795 0.190869 0 1 0
+0.26003 0.00252833 0.371795 0 0 1
+0.149188 -0.371795 -0.0159723 0.133996 0.990689 -0.0241138
+0.414349 -0.371795 0.0903509 0 1 0
+-0.429082 0.371795 0.20957 0 1 0
+0.166707 0.294872 0.230324 0 1 0
+-0.201362 0.0381072 0.371194 0.668001 -0.0385136 0.743163
+0.401715 -0.371795 0.294926 0 1 0
+0.320513 -0.0546275 -0.342308 0.980721 -0.0722951 0.181551
+0.433052 0.294872 -0.277845 0 1 0
+0.141109 -0.370443 -0.133286 0.576023 0.811667 -0.0969214
+0.279227 0.206267 0.355676 0.599273 0.800545 0
+0.0766154 0.371795 0.116405 0 1 0
+0.277547 0.236841 -0.371795 0 0 1
+0.133272 0.371795 -0.0203594 0.124911 0.990958 0.048984
+0.194429 0.0124169 -0.0509052 0.92428 -0.381651 -0.0070531
+-0.468866 0.371795 -0.163468 0 1 0
+0.32099 0.294872 -0.295432 0 1 0
+0.342602 -0.0619907 0.371795 0 0 1
+-0.0147493 -0.00165564 0.320513 0 0 1
+-0.433559 -0.0879017 0.320513 0 0 1
+0.209585 0.294872 -0.30946 0 1 0
+0.289075 0.215674 -0.342447 0.519897 0.844154 0.13081
+0.5 -0.0262972 -0.304307 1 0 0
+-0.331747 -0.371795 -0.264872 0 1 0
+-0.5 0.242717 0.297438 1 0 0
+-0.29179 0.371795 0.0397099 0 1 0
+0.46553 -0.0815974 -0.371795 0 0 1
+-0.33996 0.127946 0.371795 -0.126257 0.0752019 0.989143
+0.256564 -0.0283912 -0.217992 -0.677911 0.73501 -0.0140254
+0.5 0.0155854 0.0494418 1 0 0
+-0.496198 0.340676 -0.371795 0.45768 -0.111587 0.882087
+0.428983 0.294872 0.212538 0 1 0
+0.368184 -0.371795 0.0264049 0 1 0
+0.5 -0.167989 -0.0804238 1 0 0
+0.302359 0.294872 0.305527 0 1 0
+0.141109 -0.306866 -0.251394 1 0 0
+-0.0880318 0.289714 -0.371795 0 0 1
+0.179765 -0.013309 -0.333333 0 0 1
+-0.348277 -0.371795 -0.248186 0 1 0
+-0.210093 0.242289 0.360551 -0.349473 0.936946 0
+-0.179215 0.116865 -0.333333 0 0 1
+-0.5 -0.0211415 -0.0450253 1 0 0
+0.233708 -0.0343888 0.00229265 0.0276187 -0.641912 0.766281
+-0.262721 0.371795 0.266431 0 1 0
+-0.448718 -0.317162 0.143674 1 0 0
+-0.5 -0.176816 -0.143962 1 0 0
+-0.468708 -0.294872 -0.313009 0 1 0
+-0.44639 0.0574221 -0.371795 0 0 1
+0.192987 -0.247515 0.329556 -0.20433 0.970362 -0.129022
+0.465178 -0.246728 0.320513 0 0 1
+0.320513 0.0820151 -0.35607 1 0 0
+-0.333 -0.371795 -0.122232 0 1 0
+-0.364845 -0.371795 -0.186758 0 1 0
+0.5 -0.0337672 -0.248995 1 0 0
+-0.365702 0.0435943 -0.371795 0 0 1
+0.309073 -0.247388 -0.371795 0 0 1
+-0.0890087 0.254796 -0.371795 0 0 1
+0.5 0.00663287 0.142392 1 0 0
+0.450483 0.0634087 -0.371795 0 0 1
+-0.0352943 0.371795 -0.295619 0 1 0
+-0.186516 0.371795 0.23416 0 1 0
+0.141109 -0.362341 0.0268098 0.990924 0.12948 -0.0361254
+-0.147604 -0.141683 0.348109 0.735723 0.677283 0
+-0.113168 -0.163467 -0.333333 0 0 1
+0.1796 0.294872 -0.195644 0 1 0
+-0.410205 0.371795 -0.225409 0 1 0
+-0.259917 -0.0478823 -0.333333 0 0 1
+0.13464 -0.23841 0.371795 0 0 1
+0.320513 0.029194 -0.346704 1 0 0
+-0.179936 -0.0776983 -0.333333 0 0 1
+0.5 0.105309 -0.0596061 1 0 0
+0.141109 -0.338196 -0.149676 1 0 0
+-0.262386 0.371795 -0.24313 0 1 0
+0.5 -0.0708682 -0.0692537 1 0 0
+-0.0947443 0.371795 0.17728 0 1 0
+0.451055 0.294872 -0.364766 -0.0842515 0.986048 -0.143563
+0.466553 0.294872 -0.0793199 0 1 0
+-0.0190054 0.0310137 0.320513 0 0 1
+-0.265705 0.371795 0.159163 0 1 0
+0.153154 0.198219 -0.333333 0 0 1
+-0.320513 0.133965 -0.334474 0.847755 -0.0889034 -0.522884
+0.293074 -0.332347 0.320513 0 0 1
+0.5 -0.222814 0.299577 1 0 0
+0.113064 0.171212 0.367299 -0.355018 -0.473636 0.805997
+0.475297 -0.114998 -0.371795 0 0 1
+-0.0998477 0.230897 -0.364222 -0.00152624 0.963319 0.268353
+0.212429 -0.0337239 -0.253761 0.506071 0.862371 -0.0144419
+-0.378648 -0.371795 -0.12553 0 1 0
+0.5 0.048458 0.245121 1 0 0
+-0.469138 -0.14971 0.320513 0 0 1
+-0.195242 -0.228792 0.371795 0 0 1
+0.453582 -0.294872 -0.332549 -0.316062 0.948484 0.0219612
+0.416087 0.101812 0.320513 0 0 1
+-0.5 0.172813 0.279029 1 0 0
+-0.134421 0.0809559 -0.333333 0 0 1
+0.126861 0.00479927 0.320513 0 0 1
+0.5 -0.137876 0.0268387 1 0 0
+0.109624 0.31438 0.320513 0 0 1
+0.139345 -0.189671 0.371795 0 0 1
+-0.0679705 0.270269 0.320513 0 0 1
+-0.473901 0.371795 -0.254532 0 1 0
+-0.426459 -0.371795 -0.308397 0 1 0
+-0.320513 -0.138686 -0.357857 1 0 0
+0.252769 0.093012 0.371795 0 0 1
+0.448718 -0.295465 -0.195121 -0.629073 0.776997 -0.0232839
+0.141109 -0.330499 -0.00123879 1 0 0
+-0.397378 0.0613586 0.320513 0 0 1
+-0.320513 -0.142777 -0.356835 1 0 0
+0.302712 0.294872 0.0970602 0 1 0
+0.28569 0.294872 0.126899 0 1 0
+-0.399053 0.371795 0.29791 0 1 0
+-0.5 -0.243879 -0.348095 1 0 0
+-0.5 -0.225321 -0.205963 1 0 0
+0.0434929 -0.200126 0.323684 -0.181926 0.94666 0.265964
+-0.293565 0.245728 -0.371795 0 0 1
+-0.327419 0.160443 0.333478 0.798116 -0.602504 0
+0.303118 0.294872 -0.259952 0 1 0
+0.489349 0.294872 -0.0609024 0.0103704 0.999921 -0.00705107
+-0.0305725 0.371795 0.187292 0 1 0
+-0.0138822 0.371795 -0.269963 0 1 0
+0.246397 -0.34196 0.320513 0 0 1
+-0.448718 -0.365566 0.207723 0.957232 0.288805 0.0172895
+0.5 0.239438 0.0573784 1 0 0
+-0.292693 -0.371795 0.230568 0 1 0
+0.19348 -0.139494 0.371795 0 0 1
+0.449827 -0.00512917 -0.371795 0 0 1
+-0.5 0.346351 -0.265562 1 0 0
+-0.135367 0.00218932 0.320513 0 0 1
+0.0354307 0.352132 -0.371795 0 0 1
+-0.263692 -0.371795 -0.108669 0 1 0
+0.355826 0.173565 -0.371795 0 0 1
+-0.1902 0.290084 0.320513 0 0 1
+-0.5 0.039814 -0.0094812 1 0 0
+-0.5 0.318662 0.188941 1 0 0
+-0.0902714 0.371795 0.157991 0 1 0
+0.385138 -0.371795 0.260458 0 1 0
+0.0905572 -0.294872 -0.0216856 0 1 0
+0.5 -0.251573 -0.176801 1 0 0
+0.202993 0.294872 -0.0751782 0 1 0
+-0.0204152 -0.294872 -0.324848 0 1 0
+-0.18437 0.10383 0.371795 0.123234 -0.165684 0.978449
+0.0995501 0.371795 -0.344732 0 1 0
+-0.5 -0.214226 0.18201 1 0 0
+-0.35526 -0.272036 -0.371795 0 0 1
+-0.120192 -0.0671104 0.320513 0 0 1
+0.0665949 -0.248917 -0.371795 0 0 1
+-0.5 -0.0362458 -0.234784 1 0 0
+-0.270282 -0.226079 -0.3693 0.501688 0.79767 -0.334713
+-0.236813 0.230897 -0.352433 -0.00229121 0.999997 0.000114289
+0.0573253 0.244186 0.371795 0.0102041 0.130864 0.991348
+0.141026 0.344989 -0.00231138 1 0 0
+0.141026 0.348538 -0.220129 1 0 0
+-0.5 0.243084 -0.0551974 1 0 0
+0.5 0.0669488 -0.247579 1 0 0
+-0.0910187 0.187636 -0.333333 0 0 1
+-0.5 -0.0948995 -0.189449 1 0 0
+-0.5 -0.0551806 0.0415066 1 0 0
+0.237124 -0.0877758 -0.333333 0 0 1
+-0.448718 -0.346847 0.210233 1 0 0
+0.184046 0.0262449 0.320513 0 0 1
+-0.141154 -0.361245 -0.00771781 0.999661 -0.0234592 0.0113241
+0.429293 0.15435 -0.371795 0 0 1
+0.343739 -0.0920104 -0.371795 0 0 1
+0.000829535 0.371795 -0.140915 0 1 0
+0.0470355 0.371795 0.128203 0 1 0
+-0.201164 -0.192932 0.371795 0 0 1
+-0.271638 -0.222548 -0.333333 -0.173676 -0.390437 0.904099
+0.0979977 -0.227055 -0.333333 0.0355856 -0.533219 0.845229
+0.175417 -0.371795 -0.247757 0 1 0
+0.105475 -0.0404457 0.320513 0 0 1
+0.427734 0.0992318 0.320513 0 0 1
+-0.213971 -0.0400799 -0.0966617 -0.441882 0.897068 0.00318488
+-0.456602 0.371795 0.189451 0 1 0
+-0.5 0.0634971 -0.032697 1 0 0
+0.5 0.126636 0.277936 1 0 0
+0.250777 -0.0977897 0.371795 0 0 1
+0.454202 -0.294872 0.313599 -0.326043 0.944851 -0.030875
+0.151619 -0.158489 0.371795 0 0 1
+-0.5 0.13067 -0.0308439 1 0 0
+-0.228573 0.371795 0.0871799 0 1 0
+0.292515 -0.0080167 0.371795 0 0 1
+0.141026 0.307869 0.309097 1 0 0
+-0.5 0.121665 0.23776 1 0 0
+0.5 0.258419 -0.329379 1 0 0
+-0.309656 -0.198653 -0.371795 -0.416704 -0.246156 0.87508
+0.113739 0.371795 -0.210385 0 1 0
+0.243903 0.0361475 -0.0491273 0.352422 0.935765 -0.0119034
+-0.229556 0.235029 0.364626 -0.389543 0.885643 0.252771
+0.5 0.109427 0.118641 1 0 0
+0.248142 0.0436288 0.371795 0 0 1
+0.304807 0.294872 0.0124158 0 1 0
+0.193081 -0.153038 -0.333333 0 0 1
+0.5 0.00495392 0.114897 1 0 0
+0.033072 -0.201865 0.328765 -0.153927 0.987726 0.0265285
+0.229786 0.294872 0.162977 0 1 0
+-0.352336 0.371795 -0.264428 0 1 0
+-0.370383 -0.371795 0.130711 0 1 0
+-0.5 0.0168975 -0.151563 1 0 0
+-0.0578634 -0.226505 0.371795 0 0 1
+0.196037 0.294872 -0.0233636 0 1 0
+-0.181762 0.0948554 0.336037 0.878781 -0.477187 0.00609282
+-0.24154 0.371795 -0.314299 0 1 0
+0.326253 0.0603613 0.371795 0 0 1
+0.490309 -0.257231 -0.371795 -0.0902816 0.00678488 0.995893
+0.00278239 0.204555 0.359846 0 1 0
+-0.0487561 0.371795 -0.284684 0 1 0
+0.0873489 -0.185317 0.337463 -0.454019 0.890984 -0.00370249
+0.5 0.2224 -0.342188 1 0 0
+-0.188652 -0.371795 -0.098553 0 1 0
+-0.235935 0.0806734 -0.333333 0 0 1
+0.130762 0.371795 -0.220662 0.0126684 0.999906 -0.00525595
+-0.5 0.182549 -0.122223 1 0 0
+0.5 0.0179043 -0.249218 1 0 0
+-0.411565 0.204767 -0.371795 0 0 1
+-0.0869229 0.0744592 0.320513 0 0 1
+0.5 -0.000806902 -0.301004 1 0 0
+0.227889 -0.371795 -0.0411584 0 1 0
+-0.5 0.0501648 -0.208848 1 0 0
+-0.5 0.0848198 0.120654 1 0 0
+-0.141154 -0.320833 0.0329848 1 0 0
+0.023608 0.0755379 0.320513 0 0 1
+-0.306274 0.371795 0.121825 0 1 0
+-0.152216 -0.371795 0.186978 0 1 0
+-0.204831 0.0348491 -0.0540049 0.56185 0.827209 -0.00700899
+-0.0316705 0.371795 0.171742 0 1 0
+0.5 0.242534 0.0377352 1 0 0
+0.481894 0.294872 -0.106947 0 1 0
+0.298031 0.136224 0.371795 0 0 1
+0.5 0.288348 -0.0951562 0.944703 0.323326 -0.0547446
+-0.401251 -0.371795 -0.295811 0 1 0
+-0.331672 0.371795 -0.0389897 0 1 0
+0.18916 -0.179409 0.371795 0 0 1
+-0.46994 0.371795 -0.0638672 0 1 0
+0.5 0.0619897 -0.110966 1 0 0
+-0.5 -0.0727864 0.123552 1 0 0
+0.5 -0.258816 0.0951773 1 0 0
+-0.135561 -0.294872 0.315679 -0.448126 0.766162 -0.460628
+0.430859 -0.371795 0.123021 0 1 0
+-0.5 -0.262318 -0.228871 1 0 0
+-0.141154 -0.343376 -0.24437 1 0 0
+-0.0980904 0.263557 -0.371795 0 0 1
+-0.322301 0.371795 -0.152156 0 1 0
+-0.141154 -0.33516 -0.00945448 1 0 0
+0.5 -0.215909 -0.332195 1 0 0
+-0.0632614 0.209791 -0.333333 0 0 1
+-0.0275944 0.347658 0.320513 0 0 1
+0.5 -0.251891 -0.36825 0.929255 0.0698129 -0.362782
+-0.263142 0.371795 0.0364281 0 1 0
+0.122492 0.0761887 0.320513 0 0 1
+0.5 -0.262005 -0.350179 1 0 0
+-0.448718 -0.323771 0.173617 1 0 0
+0.322009 0.00754911 0.371795 0 0 1
+-0.5 -0.266386 0.11048 1 0 0
+-0.5 0.306411 -0.156332 1 0 0
+0.5 -0.280584 -0.0278813 1 0 0
+-0.120375 0.321596 -0.371795 0 0 1
+-0.437528 0.104853 -0.371795 0 0 1
+-0.448718 -0.318991 0.313707 0.997903 -0.0188297 -0.0619285
+-0.396133 -0.371795 0.00157539 0 1 0
+0.25233 0.0316772 -0.117072 0.59299 0.805198 -0.00431701
+-0.5 -0.0168592 -0.328722 1 0 0
+-0.45607 0.371795 0.130178 0 1 0
+0.5 -0.0275708 -0.341783 1 0 0
+-0.3185 0.371795 0.00566622 0 1 0
+0.448718 -0.338459 -0.319348 1 0 0
+-0.00935884 0.164393 0.320513 0 0 1
+0.318388 0.269006 0.320513 0 0 1
+0.304691 0.294872 -0.335758 0 1 0
+-0.264902 -0.371795 -0.231243 0 1 0
+-0.18809 0.0084951 -0.288475 0.977424 0.211139 -0.00795636
+-0.0332844 -0.0489572 0.320513 0 0 1
+-0.428793 0.371795 0.16317 0 1 0
+0.208415 0.102822 -0.333333 0 0 1
+-0.291595 0.371795 -0.214854 0 1 0
+-0.5 0.315485 0.105671 1 0 0
+0.330341 -0.242927 0.320513 0 0 1
+0.353455 0.294872 -0.158662 0 1 0
+-0.182662 0.371795 -0.0225098 0 1 0
+0.0131287 -0.0419226 -0.333333 0 0 1
+0.294044 -0.306019 -0.371795 0 0 1
+-0.149209 -0.212784 -0.333333 0 0 1
+0.0966093 0.319627 0.320513 0 0 1
+-0.448718 -0.324702 -0.0108813 1 0 0
+0.340694 0.294872 -0.13654 0 1 0
+-0.34755 0.227126 -0.371795 0 0 1
+0.141026 0.36954 0.310452 0.875672 0.478872 0.0622857
+0.141026 0.327887 0.171822 1 0 0
+0.194627 -0.032783 -0.333333 -0.00880468 -0.00744321 0.999934
+-0.448718 -0.340974 0.0367065 1 0 0
+0.212665 -0.371795 -0.255114 0 1 0
+0.17538 -0.341588 -0.371795 0 0 1
+-0.431473 -0.371795 0.284792 0 1 0
+-0.0718582 0.334119 0.320513 0 0 1
+-0.448718 -0.301756 0.0931689 0.995812 0.0891317 0.0203266
+-0.180104 0.130941 -0.333333 0 0 1
+-0.122548 0.108138 0.320513 0 0 1
+-0.251283 0.22405 0.329894 -0.473985 0.879931 0.0325479
+-0.114487 -0.212113 -0.333333 0 0 1
+0.23727 -0.178523 -0.333333 0 0 1
+0.5 0.183744 -0.288171 1 0 0
+0.245643 -0.371795 -0.0622757 0 1 0
+0.5 -0.260568 -0.307069 1 0 0
+-0.448718 -0.368829 -0.0919315 0.782898 0.617504 0.0758863
+0.5 -0.0428055 0.243983 1 0 0
+0.5 0.201467 -0.184197 1 0 0
+-0.332402 -0.371795 -0.256429 0 1 0
+0.151349 0.294872 -0.244334 0 1 0
+-0.0167626 -0.294872 0.0352232 0 1 0
+0.307437 -0.358195 0.320513 0 0 1
+0.5 -0.121076 0.014572 1 0 0
+0.155861 -0.371795 0.0688117 0 1 0
+0.5 -0.144693 -0.231759 1 0 0
+-0.131116 0.341487 -0.371795 0 0 1
+0.0660356 -0.294872 0.0322936 0 1 0
+-0.322798 -0.371795 0.303428 0 1 0
+0.0141258 0.371795 0.265567 0 1 0
+-0.050064 -0.230897 -0.361272 0.0147146 0.997979 -0.0618134
+-0.197182 0.371795 -0.0197117 0 1 0
+0.28872 0.28698 -0.371795 0.116192 -0.325896 0.938238
+0.0010987 0.0186214 -0.333333 0 0 1
+-0.5 -0.0415975 0.0326946 1 0 0
+-0.22802 -0.265672 -0.371795 0 0 1
+-0.431484 0.304015 -0.371795 0 0 1
+-0.249644 0.0391116 -0.0437585 -0.410803 0.910094 0.0544936
+-0.141154 -0.36909 -0.0441327 -0.625677 0.773885 -0.0981368
+0.221116 0.294872 0.147382 0 1 0
+-0.0529322 0.352925 -0.371795 0 0 1
+-0.447719 0.111766 0.320513 0 0 1
+-0.5 0.353395 0.0186103 1 0 0
+-0.0661107 0.371795 -0.206477 0 1 0
+0.121114 -0.294872 0.170703 0 1 0
+-0.446266 -0.00210948 -0.371795 0 0 1
+-0.363762 0.136276 -0.371795 0 0 1
+-0.270604 -0.371795 0.261531 0 1 0
+0.5 -0.220187 -0.0385769 1 0 0
+0.15442 -0.230033 0.371795 0 0 1
+-0.343802 0.136571 -0.371795 0 0 1
+0.129814 0.154817 0.320513 -0.165561 -0.232724 0.958347
+-0.5 -0.131333 -0.36488 1 0 0
+0.463463 -0.294872 -0.169977 0 1 0
+-0.370119 0.371795 0.257768 0 1 0
+-0.5 -0.0778765 0.304818 1 0 0
+-0.5 0.232432 -0.0623238 1 0 0
+-0.260484 0.371795 -0.130551 0 1 0
+-0.11687 -0.23025 0.371795 0 0 1
+0.424489 0.190428 -0.371795 0 0 1
+0.0913112 -0.256282 0.343269 0 1 0
+-0.0575333 0.371795 -0.0409755 0 1 0
+-0.181172 -0.371795 -0.333172 0 1 0
+-0.5 0.153167 -0.362472 0.999884 -0.00384607 0.0147176
+0.30728 0.235243 -0.371795 0 0 1
+0.287324 0.294872 -0.239008 0 1 0
+-0.5 -0.252335 -0.0306611 1 0 0
+-0.306625 -0.371795 -0.233163 0 1 0
+-0.261531 0.275296 0.320513 0 0 1
+-0.488817 0.261539 -0.371795 0 0 1
+0.135408 0.30281 -0.371795 -0.176642 -0.0284503 0.983864
+0.356808 -0.371795 -0.293721 0 1 0
+0.312992 -0.371795 -0.159546 0 1 0
+-0.5 0.163804 -0.159105 1 0 0
+0.163707 -0.253742 0.368517 -0.180157 0.922705 -0.34082
+0.298408 -0.371795 -0.0142856 0 1 0
+-0.023253 -0.294872 -0.275031 0 1 0
+0.289445 -0.334043 0.320513 0 0 1
+-0.0361856 -0.294872 -0.0967794 0 1 0
+-0.5 0.132364 0.248401 1 0 0
+-0.383675 0.0113575 0.358134 0.997454 -0.0713186 0
+-0.284908 -0.209216 0.320513 0.0132392 -0.153169 0.988111
+-0.126395 -0.0683827 0.320513 0 0 1
+0.116058 0.308334 0.320513 0 0 1
+-0.5 0.15385 0.159954 1 0 0
+-0.5 0.284439 -0.144917 1 0 0
+0.355881 -0.116439 0.352356 0.877668 -0.479269 0
+0.40429 0.166371 -0.371795 0 0 1
+0.0390783 0.371795 0.291619 0 1 0
+0.381777 0.130786 0.320513 0 0 1
+-0.293326 -0.371795 0.231393 0 1 0
+0.0599154 -0.294872 0.0780454 0 1 0
+0.5 0.00810298 -0.309842 1 0 0
+-0.5 -0.0588491 0.280982 1 0 0
+0.382855 -0.141945 0.320513 0 0 1
+-0.428634 -0.08555 -0.371795 0 0 1
+-0.176221 -0.371795 -0.113156 0 1 0
+-0.0613135 0.371795 0.288857 0 1 0
+0.194484 -0.0126214 -0.191746 0.950169 0.311693 -0.00511083
+0.0935863 0.371795 -0.0492539 0 1 0
+0.5 0.0108676 -0.173004 1 0 0
+-0.461543 -0.294872 -0.07547 0 1 0
+0.320513 0.0895436 -0.334658 0.85435 0.107061 0.508551
+0.196148 -0.0586989 0.351146 0.96784 -0.251537 -0.00379085
+-0.263061 0.371795 0.315445 0.0940671 0.923915 0.370854
+0.283188 -0.203302 0.320815 -0.373217 0.610963 -0.698165
+-0.366631 -0.0961132 -0.371795 0 0 1
+-0.17727 -0.147927 -0.333333 0 0 1
+-0.139956 0.169931 -0.333333 0 0 1
+0.320513 -0.102614 -0.349637 1 0 0
+-0.5 0.204713 0.170596 1 0 0
+-0.334049 -0.259926 0.320513 0 0 1
+-0.5 -0.139081 0.0793361 1 0 0
+0.0143583 -0.0107038 -0.333333 0 0 1
+0.381456 -0.371795 -0.219676 0 1 0
+-0.5 0.254063 0.0643193 1 0 0
+-0.153179 -0.147552 -0.333333 0 0 1
+0.19972 0.0583947 -0.333333 0 0 1
+0.5 -0.146189 0.286 1 0 0
+0.141026 0.365831 -0.0804261 0.92002 0.380629 0.0931917
+0.271895 -0.203403 -0.333333 0 0 1
+-0.5 -0.173441 -0.0599331 1 0 0
+0.448718 -0.35873 -0.215304 1 0 0
+0.5 -0.0186794 -0.0974382 1 0 0
+0.5 0.084819 0.0425201 1 0 0
+-0.193257 -0.068648 0.34148 0.936833 0.349464 0.0148171
+0.307727 -0.318529 -0.371795 0 0 1
+0.024537 0.203239 -0.333333 0 0 1
+0.218268 -0.304306 -0.371795 0 0 1
+-0.0863625 0.185851 0.351589 -0.434914 0.900427 -0.00897691
+-0.439602 -0.371795 -0.27212 0.201257 0.979538 0.00125638
+0.216675 -0.371795 -0.247362 0 1 0
+0.0416057 -0.294872 -0.127909 0 1 0
+-0.127423 -0.294872 0.182101 0 1 0
+-0.5 -0.124904 0.27858 1 0 0
+-0.319486 -0.0242124 0.371795 0 0 1
+0.5 0.0584846 -0.276352 1 0 0
+-0.5 0.101351 0.213783 1 0 0
+-0.370511 0.371795 -0.225018 0 1 0
+0.12538 0.371795 -0.369597 0.0558915 0.881898 -0.468116
+-0.343077 0.287156 0.320513 0 0 1
+0.0729311 0.0928754 0.320513 0 0 1
+0.192469 -0.00184593 -0.223813 0.997706 0.0657205 0.0162319
+-0.323458 0.371795 -0.271597 0 1 0
+0.196453 -0.371795 -0.301069 0 1 0
+0.255733 0.229835 -0.348105 0.14019 0.990115 0.00445888
+-0.282199 0.0110593 0.371795 0 0 1
+0.5 0.205333 -0.13646 1 0 0
+-0.231036 0.0435664 -0.120333 0.00676002 0.999976 0.00115204
+0.107868 0.371795 0.249191 0 1 0
+-0.496438 0.371795 0.0102195 -0.546381 0.801968 -0.241485
+0.5 0.231018 0.245015 1 0 0
+-0.0188906 -0.230475 -0.333333 -0.0117727 -0.668688 0.743449
+-0.5 -0.0756227 -0.116561 1 0 0
+0.141026 0.3153 0.106278 1 0 0
+-0.10325 -0.176713 0.347494 0.475937 0.879479 0
+-0.49334 -0.294872 0.050411 0.0841282 0.996398 0.0106886
+0.5 -0.101739 -0.358448 1 0 0
+0.0904929 -0.294872 0.271617 0 1 0
+0.363651 -0.152549 0.320513 0 0 1
+0.042903 -0.294872 -0.256524 0 1 0
+-0.138713 0.00498912 -0.333333 0 0 1
+0.5 -0.225357 0.000503933 1 0 0
+-0.5 0.3457 0.23641 1 0 0
+0.448718 -0.332955 0.276324 1 0 0
+0.5 0.279351 -0.315349 1 0 0
+-0.168517 -0.371795 -0.0448274 0 1 0
+0.5 -0.286981 -0.123917 0.998266 -0.056893 -0.0150983
+-0.5 -0.0479817 -0.294169 1 0 0
+0.0834579 0.246266 0.371795 0 0 1
+0.469665 -0.294872 -0.235664 0 1 0
+0.2084 0.189722 -0.333333 0 0 1
+0.5 0.0416433 0.0776115 1 0 0
+-0.3041 -0.201158 -0.36474 0.810896 0.55913 -0.172687
+-0.448718 -0.343108 0.0744498 1 0 0
+0.025608 -0.294872 0.104827 0 1 0
+0.40721 0.107873 -0.371795 0 0 1
+-0.5 0.247803 -0.324598 1 0 0
+0.375013 -0.205195 -0.371795 0 0 1
+-0.14899 -0.371795 0.00341832 -0.289569 0.955927 0.0485121
+0.5 0.178838 -0.149791 1 0 0
+-0.279337 -0.211354 0.320513 -0.268757 -0.297747 0.916033
+0.5 0.222465 0.146755 1 0 0
+-0.334057 -0.371795 -0.169007 0 1 0
+-0.465698 0.371795 -0.184314 0 1 0
+0.448718 -0.365233 0.0141963 0.984965 -0.150562 -0.0847019
+-0.448718 -0.370027 -0.139535 0.809355 0.584729 -0.0551016
+0.466756 0.294872 0.124812 0 1 0
+0.282037 0.294872 -0.0905038 0 1 0
+0.165528 0.0135451 0.320513 0 0 1
+0.343584 -0.347502 -0.371795 0 0 1
+0.279202 -0.371795 0.0350208 0 1 0
+-0.399467 0.371795 -0.150658 0 1 0
+-0.114454 -0.128277 0.320513 0 0 1
+-0.252442 0.301736 -0.371795 0 0 1
+-0.5 -0.261458 -0.286521 1 0 0
+0.5 0.293339 0.168851 0.83677 0.545791 -0.0439101
+-0.5 -0.226231 -0.188556 1 0 0
+0.3299 0.114443 -0.371795 0.111985 -0.01121 0.993647
+-0.5 0.042025 -0.0700979 1 0 0
+-0.320513 0.0593279 -0.346999 1 0 0
+0.141109 -0.316574 -0.191095 1 0 0
+-0.2215 0.042472 -0.242331 0.224521 0.974079 -0.0275893
+-0.0785067 0.371795 -0.285464 0 1 0
+0.251434 0.224263 0.320513 0.0589557 0.289377 0.955398
+-0.254608 0.371795 -0.087024 0 1 0
+0.171915 -0.079136 0.320513 0 0 1
+0.097267 0.369611 0.320513 -0.0220611 0.791905 0.610246
+0.341689 0.212354 -0.371795 0 0 1
+-0.00417792 -0.24394 0.371795 0 0 1
+-0.5 -0.202021 -0.0825863 1 0 0
+-0.5 0.260295 0.311864 0.965884 0.0530662 -0.253481
+-0.380694 -0.122545 -0.371795 0 0 1
+0.0743084 0.265437 -0.371795 0 0 1
+0.189776 0.294872 0.247743 0 1 0
+0.0485913 0.371795 -0.00838877 0 1 0
+-0.418082 0.354257 -0.371795 0 0 1
+0.059118 0.371795 -0.12329 0 1 0
+-0.190512 0.0164192 -0.0924002 0.938905 0.344044 0.00951542
+-0.293947 -0.292296 0.320513 0 0 1
+0.5 0.240104 -0.0946542 1 0 0
+-0.5 0.14618 -0.299172 1 0 0
+-0.188894 -0.225126 -0.333333 -0.108926 -0.314306 0.943052
+0.152054 -0.242019 -0.371795 0 0 1
+0.17736 0.294872 0.248225 0 1 0
+-0.107338 0.371795 0.272664 0 1 0
+0.141026 0.311064 -0.0515844 1 0 0
+-0.470829 0.371795 -0.0964226 0 1 0
+0.14381 0.269369 0.320513 0 0 1
+-0.403031 0.349781 0.320513 0 0 1
+0.414061 0.143029 -0.371795 0 0 1
+-0.142872 0.371795 -0.207327 0 1 0
+-0.0214427 -0.294872 -0.128018 0 1 0
+-0.00990365 -0.294872 0.0287439 0 1 0
+-0.160746 0.371795 0.00960337 0 1 0
+-0.0999773 0.0569863 0.320513 0 0 1
+0.183101 -0.130842 0.371795 0 0 1
+0.207979 -0.323661 0.320513 0 0 1
+-0.380409 -0.371795 -0.0196425 0 1 0
+-0.448718 -0.328778 -0.263542 1 0 0
+0.357133 0.294872 0.028112 0 1 0
+-0.255035 0.371795 -0.260131 0 1 0
+0.131635 -0.294872 -0.271949 0.019772 0.9998 0.00290329
+-0.5 -0.262441 -0.161176 1 0 0
+-0.176518 0.201069 -0.333333 0 0 1
+0.272652 0.294872 0.0662377 0 1 0
+0.021164 -0.13563 0.320513 0 0 1
+-0.40213 -0.0947681 -0.371795 0 0 1
+-0.0195095 -0.294872 -0.0079092 0 1 0
+-0.398874 -0.371795 -0.267074 0 1 0
+-0.219042 -0.313707 -0.371795 0 0 1
+0.360713 -0.10759 0.37021 0.514973 -0.390784 0.762949
+0.5 -0.258307 0.0868195 1 0 0
+0.266941 0.0130412 -0.284509 0.943106 0.332135 -0.0154217
+0.142867 0.294872 -0.352752 0.679787 0.727146 -0.0956488
+0.00695674 0.371795 -0.132619 0 1 0
+-0.199356 -0.0299977 -0.149477 0.731168 -0.682133 0.00936127
+-0.441403 -0.371795 -0.327455 0.224834 0.972003 0.0682687
+0.1918 0.0172604 -0.333333 -0.00225379 0.000518045 0.999997
+0.014751 -0.17946 -0.333333 0 0 1
+-0.5 -0.0643628 0.0139656 1 0 0
+0.265311 0.0165856 -0.0824318 0.917899 0.396096 -0.0238863
+-0.111304 0.172354 0.328391 -0.535308 0.83504 -0.127101
+-0.0800964 -0.294872 -0.347345 0 1 0
+0.0750264 -0.0318364 -0.333333 0 0 1
+0.0376313 -0.294872 0.29781 0 1 0
+0.339356 -0.286893 -0.371795 0 0 1
+0.304807 -0.371795 0.0501721 0 1 0
+0.0515199 0.0286815 0.320513 0 0 1
+0.489301 -0.18022 0.320513 0 0 1
+0.338054 0.238103 0.320513 0 0 1
+-0.00772752 0.371795 -0.0029391 0 1 0
+0.0919997 0.184509 0.371795 -0.45328 -0.561598 0.692203
+-0.5 -0.188455 0.0286574 1 0 0
+0.209553 0.0319185 -0.190159 -0.574639 0.818407 0
+0.354168 -0.371795 0.304252 0 1 0
+0.171216 0.111929 0.335099 0.837159 0.546959 0
+0.5 -0.1187 0.0683913 1 0 0
+-0.239016 -0.218396 -0.333333 0 0 1
+0.184584 -0.329862 0.320513 0 0 1
+0.141109 -0.336964 -0.209486 1 0 0
+0.448718 -0.356186 -0.203968 1 0 0
+0.224111 0.294872 -0.00535284 0 1 0
+0.274389 0.294872 0.116556 0 1 0
+0.379969 0.294872 -0.248032 0 1 0
+-0.301208 0.188511 0.365648 0.696806 -0.666072 -0.2661
+-0.0405756 0.300674 0.320513 0 0 1
+0.5 0.0277211 0.20979 1 0 0
+0.195378 0.00105848 0.00178934 0.792659 -0.0424218 -0.608188
+-0.0253814 -0.294872 -0.362202 0 1 0
+-0.5 -0.174608 -0.158274 1 0 0
+0.0394003 -0.294872 0.154085 0 1 0
+0.102959 -0.294872 0.147724 0 1 0
+0.401185 -0.0762969 0.320513 0 0 1
+-0.410759 0.371795 0.101046 0 1 0
+-0.5 -0.142197 0.159531 1 0 0
+0.207055 -0.15673 0.371795 0 0 1
+-0.380348 0.371795 -0.264883 0 1 0
+-0.258776 0.0334001 -0.185668 -0.656074 0.754355 0.0226923
+-0.431361 -0.371795 -0.271392 0 1 0
+0.242896 -0.292951 -0.371795 0 0 1
+-0.5 -0.156364 -0.325384 1 0 0
+-0.5 -0.0724114 0.118564 1 0 0
+-0.130339 0.371795 0.150054 0 1 0
+-0.431485 0.371795 -0.252091 0 1 0
+-0.349679 0.321498 -0.371795 0 0 1
+0.162996 0.294872 -0.0402846 0 1 0
+0.183359 -0.135095 0.371795 0 0 1
+-0.392839 0.371795 -0.109516 0 1 0
+-0.263504 -0.371795 0.237463 0 1 0
+0.5 0.239611 -0.107199 1 0 0
+-0.237974 0.371795 0.140965 0 1 0
+-0.5 0.0324049 -0.315341 1 0 0
+-0.250013 0.28805 0.320513 0 0 1
+-0.5 -0.232593 -0.238414 1 0 0
+-0.0668548 -0.294872 -0.0980454 0 1 0
+0.155275 -0.0719384 0.320513 0 0 1
+0.349711 0.294872 -0.102912 0 1 0
+0.248099 -0.0341951 -0.00471639 -0.451279 0.877251 -0.16364
+-0.311055 -0.178664 0.350701 0.707104 0.70711 0
+-0.199051 0.0225482 -0.0325367 0.512081 0.363824 0.778078
+0.157933 0.0516074 0.320513 0 0 1
+-0.141154 -0.308363 0.188428 1 0 0
+-0.204237 -0.282936 0.320513 0 0 1
+0.150215 0.214251 0.371795 0 0 1
+0.448718 -0.357225 0.285032 1 0 0
+0.336702 0.294872 0.0874496 0 1 0
+0.448718 -0.368253 -0.295144 0.789626 -0.596309 0.144588
+-0.5 -0.0799958 0.246304 1 0 0
+0.141026 0.334231 -0.326623 1 0 0
+-0.5 -0.0138479 -0.0224553 1 0 0
+0.174431 0.294872 0.201237 0 1 0
+0.5 0.136857 -0.320786 1 0 0
+-0.229651 0.043492 -0.328836 -0.0384845 0.88965 0.455019
+0.25305 -0.136881 -0.333333 0 0 1
+0.138758 0.194002 0.371795 0 0 1
+0.0596529 -0.294872 0.0463553 0 1 0
+0.408666 0.164271 -0.371795 0 0 1
+0.237386 -0.177435 0.371795 0 0 1
+-0.0553342 0.371795 0.256108 0 1 0
+0.230095 0.294872 -0.225986 0 1 0
+-0.235146 -0.0246906 0.371795 0 0 1
+-0.423431 -0.307155 -0.371795 0 0 1
+0.4683 0.182855 0.320513 0 0 1
+-0.0507487 -0.294872 0.273493 0 1 0
+-0.249551 0.0942211 -0.333333 0 0 1
+-0.105497 -0.294872 -0.169875 0 1 0
+0.237817 -0.371795 -0.23549 0 1 0
+-0.270952 0.319 0.320513 0 0 1
+-0.5 0.0765 0.196888 1 0 0
+0.0323525 0.371795 -0.271651 0 1 0
+0.448718 -0.322254 0.228512 1 0 0
+0.254274 -0.0303159 -0.236492 -0.599114 0.800664 0
+0.447389 -0.152399 -0.371795 0 0 1
+-0.387903 0.371795 0.0544679 0 1 0
+-0.0998521 -0.230897 -0.370307 0.0438384 0.918451 -0.393098
+0.136429 -0.119875 -0.333333 0 0 1
+-0.5 0.352953 0.157238 1 0 0
+0.00910903 -0.17355 -0.333333 0 0 1
+0.447739 -0.371795 -0.0353783 -0.37945 0.922179 -0.0748599
+-0.311549 0.17817 0.365666 0.711686 -0.666235 -0.222787
+-0.298451 0.0945091 -0.333333 0 0 1
+-0.5 -0.0807404 0.0443192 1 0 0
+0.0901804 -0.084702 0.320513 0 0 1
+-0.237205 0.0530178 0.371795 0 0 1
+-0.289089 0.371795 0.125479 0 1 0
+-0.159669 -0.371795 -0.00914255 0 1 0
+-0.125585 -0.0659842 -0.333333 0 0 1
+-0.0392733 0.371795 0.129248 0 1 0
+-0.383042 -0.0202031 0.326661 0.931717 0.0722109 -0.355935
+-0.5 0.0059344 0.261196 1 0 0
+0.231405 -0.234339 0.330164 -0.386582 0.921177 -0.0445817
+-0.194562 -0.0239981 -0.0788568 0.843311 -0.537107 0.0184968
+0.0655896 -0.0883614 -0.333333 0 0 1
+0.265878 -0.0153712 -0.297459 0.913711 -0.406319 -0.0060347
+-0.5 0.0793104 0.299946 1 0 0
+-0.5 -0.121175 0.255559 1 0 0
+-0.0157521 -0.294872 -0.228636 0 1 0
+-0.197653 -0.00403872 0.320513 0.215522 0.0218638 0.976254
+-0.334545 -0.150924 0.360023 0.800526 0.599298 0
+-0.115263 -0.294872 -0.292626 0 1 0
+0.107183 -0.294872 0.0174616 0 1 0
+0.5 -0.174258 0.072552 1 0 0
+0.465028 -0.294872 -0.0838395 0 1 0
+0.117557 0.371795 0.211631 0 1 0
+-0.388807 -0.371795 0.131131 0 1 0
+-0.444981 0.0374518 -0.371795 0 0 1
+0.223806 -0.371795 -0.282977 0 1 0
+0.141109 -0.341178 0.221503 1 0 0
+0.33015 -0.371795 -0.24821 0 1 0
+0.429175 0.294872 0.146579 0 1 0
+0.261992 0.0468257 -0.333333 0 0 1
+-0.5 -0.14136 0.162439 1 0 0
+0.5 -0.012311 0.119942 1 0 0
+-0.5 -0.140533 0.0890653 1 0 0
+-0.141154 -0.309008 -0.289101 1 0 0
+0.264627 0.0316245 -0.333333 0.0707898 0.055459 0.995948
+-0.11878 -0.192216 0.371795 0 0 1
+-0.0415381 -0.294872 -0.29844 0 1 0
+0.0889296 -0.193012 0.371795 -0.143663 0.166627 0.975498
+-0.47801 0.371795 0.186731 0 1 0
+-0.5 -0.239427 0.161795 1 0 0
+0.332559 0.294872 -0.270604 0 1 0
+-0.5 -0.0638628 0.0867801 1 0 0
+-0.231042 -0.234475 0.348974 0.378088 0.92577 0
+-0.5 0.337475 -0.27403 1 0 0
+0.5 -0.112545 -0.152611 1 0 0
+-0.5 -0.220551 -0.350259 1 0 0
+-0.182724 0.371795 0.179732 0 1 0
+0.334623 -0.19732 0.320513 0 0 1
+0.225786 -0.0415901 -0.333333 -0.112312 -0.355193 0.928021
+-0.212061 0.371795 0.307044 0 1 0
+-0.474914 -0.270375 -0.371795 0 0 1
+-0.5 0.00498977 -0.0461247 1 0 0
+0.438254 0.294872 0.0713701 0 1 0
+0.5 -0.236481 -0.00895917 1 0 0
+0.0645079 -0.294872 0.00648202 0 1 0
+0.5 -0.0495645 0.157574 1 0 0
+-0.448718 -0.369118 0.171802 0.988969 0.145626 0.0270709
+-0.43334 0.371795 -0.000975807 0 1 0
+0.0867113 0.185662 0.351971 0.45461 0.890691 0
+0.350487 -0.371795 0.0174698 0 1 0
+0.210858 -0.242003 0.334052 -0.349475 0.936946 0
+0.0280091 0.320806 -0.371795 0 0 1
+-0.329528 0.165869 0.320513 -0.0759412 0.435155 0.897147
+0.320513 -0.100646 -0.36606 0.968556 -0.0316186 0.246778
+-0.36021 -0.371795 -0.133772 0 1 0
+0.456052 0.0937839 0.320513 0 0 1
+0.0973784 -0.294872 -0.240499 0 1 0
+0.403689 -0.371795 0.190673 0 1 0
+-0.475994 -0.294872 0.127817 0 1 0
+0.0879104 0.0517461 0.320513 0 0 1
+-0.20989 0.371795 -0.297272 0 1 0
+0.0122842 -0.294872 0.26092 0 1 0
+0.267094 0.294872 -0.19596 0 1 0
+0.102781 0.371795 -0.124544 0 1 0
+0.0390712 -0.239599 0.371795 0 0 1
+0.448484 0.294872 -0.287229 0 1 0
+0.0391272 -0.294872 -0.294141 0 1 0
+-0.5 0.312311 -0.268772 1 0 0
+0.206754 -0.243534 0.3671 -0.272159 0.907678 -0.319453
+0.5 -0.18475 -0.169337 1 0 0
+-0.5 0.266922 0.0311478 1 0 0
+-0.392493 -0.371795 0.239695 0 1 0
+0.5 0.207262 -0.145794 1 0 0
+0.5 -0.0525541 0.27349 1 0 0
+-0.223042 0.371795 -0.357628 0 1 0
+-0.263001 -0.371795 -0.207952 0 1 0
+-0.152607 -0.371795 -0.336347 0 1 0
+-0.5 -0.249143 -0.14225 1 0 0
+0.259303 0.294872 -0.0366187 0 1 0
+0.193892 0.294872 0.0308069 0 1 0
+-0.448718 -0.347414 -0.216626 1 0 0
+0.0932398 0.371795 -0.118713 0 1 0
+-0.273896 -0.00529702 -0.21201 0.99223 0.124175 -0.0077522
+0.5 -0.00625865 0.131385 1 0 0
+-0.320513 0.148721 -0.370292 0.708271 -0.0736247 -0.702091
+0.5 -0.261567 -0.111229 1 0 0
+0.0942638 -0.294872 -0.131353 0 1 0
+-0.204475 0.250641 -0.371795 0 0 1
+0.353621 -0.371795 -0.102782 0 1 0
+0.0787092 0.371795 0.293326 0 1 0
+0.0145076 -0.294872 0.120018 0 1 0
+-0.5 -0.161386 -0.196721 1 0 0
+0.18837 0.294872 -0.136396 0 1 0
+0.44851 -0.371795 -0.063358 -0.349008 0.935299 0.0583918
+0.267399 -0.326359 -0.371795 0 0 1
+0.239101 -0.371795 -0.262128 0 1 0
+-0.309751 -0.371795 0.0386277 0 1 0
+-0.340635 -0.371795 0.214547 0 1 0
+0.329123 -0.194618 -0.371795 0 0 1
+-0.443602 -0.106322 -0.371795 0 0 1
+0.141026 0.352779 -0.213801 1 0 0
+-0.372239 0.371795 -0.198965 0 1 0
+-0.5 0.119475 0.112166 1 0 0
+0.202218 -0.0175497 0.002932 -0.535302 -0.357981 0.76505
+-0.5 0.322817 -0.0646748 1 0 0
+0.5 -0.142488 0.0112555 1 0 0
+0.37084 0.161891 -0.371795 0 0 1
+-0.0685048 0.371795 -0.268431 0 1 0
+-0.0734058 -0.294872 0.0650386 0 1 0
+-0.289584 -0.371795 -0.2981 0 1 0
+0.266856 0.0132717 -0.0244748 0.927476 0.373883 0
+0.41544 -0.262615 0.320513 0 0 1
+-0.282376 0.371795 0.253193 0 1 0
+-0.194818 0.0639498 0.334206 0.946639 -0.322297 0
+0.5 -0.185921 0.0970975 1 0 0
+-0.110243 0.371795 -0.121785 0 1 0
+0.257872 -0.300653 -0.371795 0 0 1
+-0.052932 0.371795 0.0607188 0 1 0
+-0.141154 -0.332491 -0.306729 1 0 0
+-0.0933348 -0.0275518 -0.333333 0 0 1
+-0.16242 -0.371795 -0.102243 0 1 0
+-0.252958 -0.190937 0.371795 0 0 1
+-0.5 -0.292422 -0.228209 0.877616 0.47686 -0.0489303
+-0.0238377 -0.294872 0.0797191 0 1 0
+0.226319 0.294872 0.213967 0 1 0
+-0.5 0.019944 -0.309636 1 0 0
+-0.491238 0.371795 -0.177689 -0.172103 0.982951 -0.0647078
+0.102988 -0.294872 -0.000940231 0 1 0
+0.157685 0.179609 0.371795 0 0 1
+0.5 0.23772 -0.255094 1 0 0
+0.13278 0.155866 0.344302 0.614227 0.78913 0
+-0.026767 0.371795 -0.206033 0 1 0
+-0.5 0.0145781 -0.203896 1 0 0
+-0.280262 0.207674 0.320513 -0.354629 0.370802 0.858338
+0.5 0.175431 0.271421 1 0 0
+-0.458612 -0.0899925 -0.371795 0 0 1
+0.247518 -0.257981 0.320513 0 0 1
+0.372602 -0.371795 0.0386922 0 1 0
+-0.5 0.191596 -0.110377 1 0 0
+0.116098 -0.294872 -0.215254 0 1 0
+0.259272 0.294872 -0.0130253 0 1 0
+-0.5 0.116675 -0.0366037 1 0 0
+0.5 0.13013 -0.240016 1 0 0
+0.281058 0.200292 -0.333333 0 0 1
+0.0801729 -0.294872 0.0768307 0 1 0
+0.472335 -0.294872 -0.148624 0 1 0
+0.184074 -0.371795 0.184029 0 1 0
+-0.173256 0.343774 -0.371795 0 0 1
+0.0567286 -0.294872 -0.0558745 0 1 0
+0.355444 -0.371795 -0.143523 0 1 0
+0.325641 -0.371795 0.136359 0 1 0
+-0.5 -0.0936238 0.0201119 1 0 0
+-0.164589 -0.122072 0.36607 0.857087 0.493131 0.149076
+-0.5 -0.269739 -0.223995 1 0 0
+0.443128 0.294872 0.119316 0 1 0
+-0.180281 0.371795 -0.363331 -0.0200869 0.992572 -0.11999
+0.260406 -0.371795 -0.0564888 0 1 0
+0.471869 -0.294872 0.129665 0 1 0
+-0.24206 -0.118374 -0.333333 0 0 1
+0.221809 -0.371795 -0.336988 0 1 0
+-0.5 -0.185109 -0.0248022 1 0 0
+0.5 -0.135951 0.231665 1 0 0
+-0.21614 -0.364762 0.320513 0.0494623 -0.322968 0.945116
+0.335397 0.280406 0.320513 0 0 1
+0.124264 0.0459007 -0.333333 0 0 1
+-0.5 0.0953338 0.049493 1 0 0
+-0.375133 0.359128 -0.371795 0 0 1
+-0.0795092 0.240316 0.371795 0 0 1
+-0.5 -0.134668 0.308983 1 0 0
+-0.287891 -0.296434 -0.371795 0 0 1
+-0.306058 -0.351386 -0.371795 0 0 1
+0.0233502 -0.203487 0.356048 -0.155477 0.987836 0.00259412
+0.384975 -0.371795 -0.317843 0 1 0
+-0.364035 -0.0806284 -0.371795 0 0 1
+0.172085 -0.0620523 0.320513 0 0 1
+0.144247 -0.371795 -0.228181 0.469576 0.865541 0.174177
+0.269198 -0.000375209 -0.300175 0.999953 0.00948823 0.00204083
+0.140761 -0.294872 -0.0604884 0.876784 0.480571 -0.0173773
+-0.5 0.191227 0.224475 1 0 0
+0.5 0.0169605 -0.168322 1 0 0
+0.163232 -0.347134 -0.371795 0 0 1
+-0.444402 -0.371795 -0.0245269 0.404077 0.903809 -0.140894
+-0.0921615 -0.189437 -0.333333 0 0 1
+-0.456732 -0.193638 0.320513 0 0 1
+0.141026 0.310989 -0.168034 1 0 0
+0.5 0.258162 -0.198975 1 0 0
+0.5 0.0638054 -0.118658 1 0 0
+-0.454874 0.114783 -0.371795 0 0 1
+-0.425948 0.340208 0.320513 0 0 1
+-0.0781703 0.343022 0.320513 0 0 1
+-0.380754 0.371795 0.293653 0 1 0
+0.25955 0.152928 -0.333333 0 0 1
+0.5 -0.0668563 -0.302502 1 0 0
+0.321707 -0.371795 -0.362594 -0.00241111 0.999972 0.0070392
+0.448718 -0.29847 -0.126465 0.912418 -0.408177 0.0297643
+0.195024 0.0530924 -0.333333 0 0 1
+0.192608 0.00342922 -0.316473 0.998668 -0.0469642 -0.021377
+-0.5 0.259428 0.227811 1 0 0
+-0.107772 -0.118189 -0.333333 0 0 1
+0.361145 0.294872 0.246798 0 1 0
+-0.200396 -0.0128232 -0.028937 0.480192 -0.19744 0.854654
+-0.034237 -0.111789 0.320513 0 0 1
+0.448718 -0.328193 0.0251413 1 0 0
+0.141026 0.305012 0.0891066 0.986103 0.164581 -0.022656
+-0.483516 0.182483 0.320513 0 0 1
+0.224557 -0.371795 0.0836511 0 1 0
+0.0576348 -0.294872 0.235104 0 1 0
+-0.018894 0.204463 -0.333333 0 0 1
+-0.427386 -0.336139 -0.371795 0 0 1
+-0.251469 0.227407 -0.333333 -0.105695 0.594407 0.797188
+0.141026 0.329707 0.173297 1 0 0
+-0.0495781 0.371795 0.161423 0 1 0
+-0.5 -0.211255 -0.356025 1 0 0
+-0.491382 0.371795 0.077536 -0.0778819 0.996588 -0.0273296
+-0.232846 0.371795 -0.293183 0 1 0
+0.156117 -0.371795 -0.082744 0 1 0
+0.0665157 -0.294872 0.0416799 0 1 0
+0.243739 -0.371795 -0.195753 0 1 0
+0.307064 0.196925 -0.366503 0.815693 0.524144 0.24478
+0.191021 -0.153256 0.371795 0 0 1
+0.141109 -0.350335 -0.00957418 1 0 0
+0.22474 0.294872 0.24762 0 1 0
+-0.422376 -0.371795 0.111387 0 1 0
+0.282359 0.294872 -0.0329224 0 1 0
+-0.453004 0.319229 0.320513 0 0 1
+-0.5 0.26298 -0.0254061 1 0 0
+0.403162 -0.0499189 -0.371795 0 0 1
+0.25291 0.294872 -0.0371784 0 1 0
+-0.5 -0.0122314 -0.127582 1 0 0
+0.457031 0.294872 0.221745 0 1 0
+0.224905 -0.371795 -0.328821 0 1 0
+0.251284 -0.133201 -0.333333 0 0 1
+-0.29983 -0.127102 -0.333333 0 0 1
+0.5 -0.283922 -0.277431 1 0 0
+-0.448718 -0.370661 -0.122532 0.948917 0.314045 0.0305421
+0.310945 0.148292 -0.333333 0.0336834 0.0294166 0.999
+0.141026 0.359678 -0.0241774 1 0 0
+0.315164 0.119374 -0.333333 0.503125 -0.152089 0.850725
+-0.217149 -0.0858029 -0.333333 0 0 1
+0.129443 0.262059 0.320513 -0.0338881 0.261096 0.964718
+0.411053 0.167865 -0.371795 0 0 1
+0.448718 -0.330142 -0.0809345 1 0 0
+-0.0631469 0.0688409 0.320513 0 0 1
+-0.5 0.0846274 0.181199 1 0 0
+0.000717852 0.371795 -0.30746 0 1 0
+-0.25233 -0.0394742 0.371795 0 0 1
+0.337393 0.294872 -0.0664209 0 1 0
+0.448718 -0.364278 0.241216 0.994173 -0.0953021 -0.0503814
+-0.169294 -0.371795 -0.297809 0 1 0
+0.437597 -0.190301 0.320513 0 0 1
+0.231467 -0.343069 -0.371795 0 0 1
+-0.314534 -0.284773 -0.371795 0 0 1
+0.387157 -0.371795 0.234028 0 1 0
+-0.141154 -0.357961 -0.180357 1 0 0
+-0.0540539 0.371795 -0.131001 0 1 0
+-0.33948 0.139945 -0.371795 0 0 1
+-0.5 0.129592 0.245618 1 0 0
+0.445439 0.158869 0.320513 0 0 1
+0.210825 0.204078 0.371795 0 0 1
+-0.5 -0.09442 -7.79833e-005 1 0 0
+-0.345117 -0.317842 0.320513 0 0 1
+-0.284412 -0.371795 -0.260339 0 1 0
+0.425479 -0.371795 0.317195 0.0362703 0.958178 -0.283864
+-0.5 0.0342365 -0.00308704 1 0 0
+-0.209105 0.246025 0.320513 -0.234255 0.273048 0.933043
+-0.189084 0.0122066 -0.121782 0.966987 0.254558 0.0116364
+-0.128515 0.022908 -0.333333 0 0 1
+-0.214575 0.0678391 -0.333333 0 0 1
+0.5 -0.0746477 -0.082366 1 0 0
+0.5 -0.161471 -0.153929 1 0 0
+-0.201753 0.267729 0.320513 0 0 1
+0.257661 -0.331868 -0.371795 0 0 1
+0.5 -0.172088 -0.292835 1 0 0
+-0.0369992 -0.294872 -0.237014 0 1 0
+-0.448718 -0.342656 0.213412 1 0 0
+-0.130208 -0.294872 0.249471 -0.0919161 0.995762 -0.00294846
+-0.148486 0.206875 -0.333333 0 0 1
+0.0384031 0.216184 -0.333333 0 0 1
+-0.360416 0.371795 0.0353136 0 1 0
+0.0137512 -0.294872 -0.200582 0 1 0
+0.5 0.247538 0.022433 1 0 0
+-0.316065 0.191132 0.320513 0 0 1
+0.448718 -0.356272 0.0997765 1 0 0
+-0.227565 -0.298922 -0.371795 0 0 1
+-0.5 0.155846 0.142301 1 0 0
+0.0843806 0.150043 -0.333333 0 0 1
+0.05849 0.371795 -0.0697122 0 1 0
+-0.0799457 -0.294872 -0.116451 0 1 0
+0.419153 0.212696 0.320513 0 0 1
+0.141109 -0.320007 0.204622 1 0 0
+0.138315 0.300619 0.320513 0.604264 0.295023 0.740153
+0.268861 -0.00422698 -0.218543 0.988681 -0.147207 0.0289916
+-0.0709375 -0.294872 -0.367631 0.00180361 0.934825 0.355104
+-0.0660406 0.254418 0.371795 -0.0314658 0.429981 0.902289
+0.489878 0.072144 0.320513 0 0 1
+-0.189452 0.0135785 -0.243906 0.94989 0.312577 0.00206077
+-0.151051 0.371795 0.316867 -0.0166949 0.987868 0.154398
+-0.112452 0.371795 0.0101716 0 1 0
+-0.5 0.298319 -0.00604334 1 0 0
+0.5 -0.10227 0.0654994 1 0 0
+-0.387261 -0.00946046 -0.371795 0 0 1
+0.141109 -0.303327 -0.277418 0.967204 0.238647 -0.0869679
+0.348583 -0.185996 0.320513 0 0 1
+-0.0660064 0.0432181 0.320513 0 0 1
+-0.488828 -0.187628 -0.371795 0.108022 0.0248352 0.993838
+-0.478998 0.249397 -0.371795 0 0 1
+-0.231681 0.04351 -0.196088 -0.0335821 0.999427 -0.0043144
+0.298776 0.294872 -0.068366 0 1 0
+-0.268812 -0.25047 0.320513 0 0 1
+-0.274154 0.210065 0.326663 -0.618473 0.719324 0.31633
+0.16024 -0.302719 -0.371795 0 0 1
+0.402559 0.294872 0.00654846 0 1 0
+0.180942 0.192813 0.371795 0 0 1
+-0.154174 -0.342156 -0.371795 0 0 1
+0.5 -0.21399 0.00682935 1 0 0
+0.141109 -0.3715 -0.0869116 0.6392 0.768909 0.0142312
+-0.0154936 0.371795 -0.326027 0 1 0
+0.130378 0.353857 0.320513 0 0 1
+-0.0754915 0.371795 0.239067 0 1 0
+0.0143237 0.241015 -0.371795 0.0139198 0.107016 0.99416
+0.5 0.162472 -0.126413 1 0 0
+0.173106 -0.371795 0.193405 0 1 0
+-0.066491 -0.256282 0.323883 0.00272939 0.953057 -0.302779
+-0.0529354 0.371795 0.12777 0 1 0
+-0.253875 -0.366712 -0.371795 -0.0630501 0.378234 0.92356
+0.269518 0.213535 0.328001 0.540638 0.833846 0.111408
+-0.0757818 0.371795 -0.0287438 0 1 0
+-0.344523 -0.00836693 -0.371795 0 0 1
+0.5 -0.0969459 -0.243888 1 0 0
+0.0222059 0.256282 0.367634 0.157064 0.84357 0.513537
+0.108195 0.170642 -0.333333 0 0 1
+-0.141154 -0.343726 0.137138 1 0 0
+0.5 -0.0236255 0.0866664 1 0 0
+0.497352 -0.294872 -0.20589 -0.480923 0.874679 0.060408
+-0.448718 -0.332524 -0.133314 1 0 0
+-0.444811 0.325997 0.320513 0 0 1
+-0.5 -0.100769 -0.243391 1 0 0
+-0.0955559 0.371795 -0.353233 0 1 0
+-0.0631783 -0.145041 0.320513 0 0 1
+-0.486318 0.268955 0.320513 0 0 1
+-0.220767 -0.0422756 -0.264375 -0.225661 0.974066 0.0165388
+0.0492098 -0.230897 -0.366806 0.0234213 0.933869 -0.356847
+0.298721 -0.117245 0.371795 0 0 1
+0.350102 0.0804408 -0.371795 0 0 1
+0.5 0.065571 -0.353269 1 0 0
+-0.5 0.125793 -0.347256 1 0 0
+0.15166 0.0667787 0.320513 0 0 1
+-0.5 0.053167 -0.225633 1 0 0
+0.100312 -0.0238313 0.320513 0 0 1
+0.108669 -0.22003 -0.333333 -0.0324431 -0.0428702 0.998554
+0.0867498 0.369985 0.320513 0.107108 0.528106 0.842397
+-0.5 0.357099 0.0729175 1 0 0
+0.283742 -0.0314105 0.371795 0 0 1
+-0.0315133 0.371795 -0.340486 0 1 0
+-0.127616 -0.294872 -0.326204 0 1 0
+-0.283672 0.371795 0.160386 0 1 0
+-0.5 0.32956 -0.300012 1 0 0
+-0.5 -0.0967788 -0.036513 1 0 0
+-0.418297 -0.17311 -0.371795 0 0 1
+0.3144 -0.371795 -0.299617 0 1 0
+-0.120634 0.366601 0.320513 -0.116559 0.518595 0.847038
+0.300743 0.294872 -0.0140794 0 1 0
+0.428273 -0.371795 -0.320085 0 1 0
+-0.5 -0.291652 0.0623218 0.829873 0.55019 0.0927442
+0.5 -0.110554 -0.178165 1 0 0
+0.447623 -0.134285 0.320513 0 0 1
+0.190866 0.294872 0.275671 0 1 0
+0.308642 -0.371795 0.196376 0 1 0
+-0.434542 -0.10257 0.320513 0 0 1
+0.5 -0.0147198 -0.217226 1 0 0
+-0.5 0.350499 -0.233236 1 0 0
+-0.430757 -0.371795 -0.0639933 0 1 0
+-0.345981 -0.371795 0.24903 0 1 0
+-0.5 0.199647 -0.26742 1 0 0
+0.5 0.148256 0.0179642 1 0 0
+-0.221916 0.371795 -0.32639 0 1 0
+-0.5 0.0570093 -0.25476 1 0 0
+0.17457 0.294872 -0.305446 0 1 0
+-0.5 0.301501 0.267574 1 0 0
+0.273072 0.294872 0.0961633 0 1 0
+0.164558 0.294872 -0.16404 0 1 0
+0.0187592 0.01336 -0.333333 0 0 1
+-0.142452 -0.0541702 0.320513 0 0 1
+-0.5 0.254925 0.175056 1 0 0
+0.140642 -0.27198 -0.371795 0 0 1
+-0.141154 -0.364402 -0.369416 0.946852 -0.0202651 -0.321029
+-0.157671 -0.0173965 -0.333333 0 0 1
+0.10767 -0.294872 -0.129984 0 1 0
+0.30838 -0.0998205 -0.333333 0 0 1
+0.259023 -0.371795 0.00198874 0 1 0
+0.5 0.280099 -0.00135919 1 0 0
+0.141026 0.362383 -0.216085 0.993368 0.0947845 0.0650786
+0.138488 -0.259524 -0.371795 0 0 1
+-0.407551 -0.0505095 -0.371795 0 0 1
+0.5 0.0923654 0.276594 1 0 0
+-0.127799 0.371795 0.00818853 0 1 0
+0.375325 0.294872 -0.165975 0 1 0
+0.244967 0.294872 -0.311515 0 1 0
+0.409521 -0.371795 -0.142326 0 1 0
+-0.5 0.0262329 -0.142081 1 0 0
+0.180651 -0.138255 -0.333333 0 0 1
+0.5 -0.118736 0.121999 1 0 0
+-0.5 0.0191872 -0.0501521 1 0 0
+0.116162 0.371795 -0.224609 0 1 0
+-0.359682 -0.371795 -0.0289517 0 1 0
+-0.127206 0.0693297 0.320513 0 0 1
+0.467604 -0.294872 0.0586901 0 1 0
+0.00130072 0.371795 0.138734 0 1 0
+0.324637 -0.371795 -0.306159 0 1 0
+-0.170387 0.257838 0.320513 -0.0389226 0.1971 0.979611
+-0.165358 -0.32515 -0.371795 0 0 1
+0.00316293 -0.0238767 -0.333333 0 0 1
+0.357561 -0.134479 -0.371795 0 0 1
+0.0692329 -0.192506 0.326806 -0.304982 0.915468 0.262496
+-0.468291 0.342522 -0.371795 0 0 1
+0.287995 0.294872 0.0833137 0 1 0
+0.378708 0.19544 -0.371795 0 0 1
+-0.228778 -0.371795 0.219037 0 1 0
+0.188307 0.294872 0.260513 0 1 0
+-0.5 -0.1641 0.265746 1 0 0
+0.458066 0.0456933 0.320513 0 0 1
+0.5 0.0651229 0.0585129 1 0 0
+-0.389668 -0.131592 0.320513 0 0 1
+-0.5 0.31199 0.148846 1 0 0
+-0.043429 0.121198 0.320513 0 0 1
+-0.5 0.0400226 -0.180775 1 0 0
+-0.383053 0.345396 -0.371795 0 0 1
+0.06187 0.256282 0.339427 0 1 0
+-0.118145 -0.167257 0.337161 0.613709 0.789533 0
+-0.047808 -0.294872 -0.217264 0 1 0
+-0.18754 0.371795 0.232708 0 1 0
+0.435821 0.294872 0.274271 0 1 0
+-0.377357 -0.371795 -0.181931 0 1 0
+0.0116218 0.371795 -0.176638 0 1 0
+0.5 0.0458469 0.256757 1 0 0
+0.0843361 0.282362 0.320513 0 0 1
+-0.421774 0.0527171 -0.371795 0 0 1
+-0.5 0.00749386 -0.298097 1 0 0
+-0.5 -0.0777713 0.286812 1 0 0
+0.433521 0.186037 -0.371795 0 0 1
+-0.289072 -0.371795 0.143465 0 1 0
+-0.0205984 0.371795 -0.353185 0 1 0
+-0.154518 -0.371795 0.200225 0 1 0
+0.5 -0.0435399 -0.00199481 1 0 0
+0.281771 -0.266043 0.320513 0 0 1
+0.0132387 -0.294872 -0.0546379 0 1 0
+-0.140325 -0.0747063 0.320513 0 0 1
+0.182838 -0.00340024 0.320513 0 0 1
+-0.111199 -0.148526 0.320513 0 0 1
+0.5 0.0274705 -0.0826793 1 0 0
+-0.5 -0.205047 0.162252 1 0 0
+0.023446 0.210412 0.371795 -0.0294289 -0.208053 0.977675
+-0.0963602 -0.294872 0.245911 0 1 0
+-0.101163 0.371795 -0.168308 0 1 0
+0.423121 0.26133 0.320513 0 0 1
+0.351763 0.246525 0.320513 0 0 1
+-0.5 -0.116888 -0.168472 1 0 0
+-0.5 0.351959 0.140115 1 0 0
+0.488678 -0.12853 0.320513 0.0536362 0.0109845 0.9985
+-0.5 0.263408 -0.149179 1 0 0
+0.168019 0.148758 -0.333333 0 0 1
+-0.19521 0.371795 -0.0903073 0 1 0
+-0.423852 0.190984 -0.371795 0 0 1
+0.268305 -0.0678529 -0.333333 0 0 1
+-0.465286 0.026592 0.320513 0 0 1
+0.5 -0.270072 -0.181683 1 0 0
+-0.374558 0.371795 0.197824 0 1 0
+0.269419 0.261042 -0.371795 0 0 1
+-0.464077 -0.180927 -0.371795 0 0 1
+-0.5 -0.221581 0.263321 1 0 0
+-0.5 -0.0779418 -0.318197 1 0 0
+0.5 0.188685 0.0851954 1 0 0
+-0.373503 0.0284661 0.371795 -0.0443866 -0.0226213 0.998758
+0.317041 0.278257 -0.371795 0 0 1
+-0.251808 0.371795 0.168472 0 1 0
+0.399908 -0.371795 0.139829 0 1 0
+0.489009 -0.0311543 0.320513 0.0129186 -0.0026694 0.999913
+-0.064311 0.371795 -0.284155 0 1 0
+0.0370486 0.371795 -0.199789 0 1 0
+-0.272207 -0.213625 -0.333333 0.00182754 -0.00822929 0.999964
+-0.5 0.347997 0.0206825 1 0 0
+0.0638626 -0.154618 -0.333333 0 0 1
+-0.00625703 0.371795 -0.136261 0 1 0
+-0.5 0.317157 0.0436166 1 0 0
+0.0385867 0.230897 -0.339706 0.122497 0.97626 0.178636
+0.5 -0.149742 0.175003 1 0 0
+0.261175 0.294872 -0.325338 0 1 0
+0.211751 -0.121547 -0.333333 0 0 1
+0.392842 0.294872 0.300963 0 1 0
+-0.216684 -0.0720451 -0.333333 0 0 1
+0.349234 -0.371795 0.0154536 0 1 0
+-0.141154 -0.370014 0.185658 0.836061 -0.513722 0.192592
+0.141109 -0.349604 -0.048206 1 0 0
+-0.356533 0.24327 -0.371795 0 0 1
+-0.40223 -0.371795 -0.0500186 0 1 0
+0.308143 0.294872 0.0935625 0 1 0
+-0.100451 -0.0418362 0.320513 0 0 1
+0.5 -0.0799425 -0.0963128 1 0 0
+-0.5 -0.0931272 0.0367867 1 0 0
+0.176592 -0.371795 0.165897 0 1 0
+0.5 0.0174137 0.0196293 1 0 0
+0.5 0.204646 0.00614064 1 0 0
+-0.106174 0.371795 -0.338083 0 1 0
+0.229005 0.23913 0.320513 0.17248 0.444859 0.878835
+-0.469515 -0.294872 -0.318122 0 1 0
+0.270386 0.294872 0.0347491 0 1 0
+0.448663 -0.371795 -0.249034 0.86151 -0.494065 -0.117047
+0.5 -0.28615 0.301526 0.995609 -0.0931068 -0.00966864
+0.141026 0.339145 -0.192522 1 0 0
+0.428489 0.253372 -0.371795 0 0 1
+-0.470481 0.371795 0.175855 0 1 0
+0.175174 0.294872 -0.237035 0 1 0
+-0.5 -0.239228 0.297007 1 0 0
+0.321029 -0.371795 -0.301584 0 1 0
+0.15646 0.227744 0.371795 0 0 1
+0.206822 -0.0692358 -0.333333 0 0 1
+0.5 0.199339 0.026143 1 0 0
+0.448718 -0.31954 -0.0903552 1 0 0
+0.141026 0.318337 -0.0702548 1 0 0
+0.5 0.0121876 0.269549 1 0 0
+0.0455366 0.371795 -0.175201 0 1 0
+-0.444167 -0.33119 0.320513 -0.0689713 0.0739013 0.994878
+0.0711353 0.371795 -0.258174 0 1 0
+0.400477 -0.371795 0.193746 0 1 0
+-0.487176 0.317224 0.320513 0 0 1
+0.5 0.278352 0.238976 1 0 0
+-0.5 0.0124634 -0.080982 1 0 0
+0.257052 0.0112053 0.371795 0 0 1
+-0.256257 -0.371795 0.177418 0 1 0
+0.5 -0.0450296 -0.251173 1 0 0
+-0.5 0.261149 0.176871 1 0 0
+0.15465 0.294872 -0.177704 0 1 0
+0.5 0.179303 -0.13701 1 0 0
+0.353652 0.294872 0.0175393 0 1 0
+-0.220556 0.042219 -0.120243 0.196817 0.979983 0.0299421
+-0.141154 -0.299343 -0.308388 0.92288 -0.384562 0.0201429
+0.43165 -0.338453 -0.371795 0 0 1
+-0.151123 -0.226022 -0.333333 0.135658 -0.372672 0.917994
+0.432985 -0.371795 -0.300203 0 1 0
+-0.412698 0.371795 0.234968 0 1 0
+0.391643 0.294872 -0.0880664 0 1 0
+-0.207366 0.371795 -0.346984 0 1 0
+0.152842 -0.371795 -0.274333 0 1 0
+-0.0503886 -0.198976 0.369196 -0.0511366 0.948544 0.312491
+0.141109 -0.29878 0.215805 0.75889 0.649842 0.042319
+-0.5 0.0784629 0.137338 1 0 0
+0.477988 0.255762 -0.371795 0 0 1
+0.227052 0.0124547 0.371795 0 0 1
+0.5 -0.0490973 -0.00807887 1 0 0
+-0.0255038 0.371795 0.029269 0 1 0
+0.190974 -0.248835 -0.371795 0 0 1
+0.490419 -0.294872 0.0219061 -0.240158 0.970545 -0.0191552
+0.259946 -0.371795 -0.0157384 0 1 0
+0.357239 -0.112852 0.371795 0.576978 -0.337336 0.743842
+-0.107006 0.371795 0.244116 0 1 0
+0.250745 0.172489 -0.333333 0 0 1
+0.5 -0.000750133 -0.293667 1 0 0
+0.146031 -0.371795 -0.0247535 0.607762 0.793811 0.0221191
+0.170688 -0.371795 -0.180793 0 1 0
+-0.426561 0.371795 -0.286632 0 1 0
+-0.5 -0.08261 0.0554763 1 0 0
+0.0366598 0.254964 -0.371795 0 0 1
+0.5 -0.16136 -0.289396 1 0 0
+-0.141154 -0.329115 -0.0918798 1 0 0
+0.0657535 -0.291898 0.320513 -0.0511497 -0.344076 0.937548
+-0.202802 0.371795 0.232315 0 1 0
+0.5 -0.279234 0.0230757 1 0 0
+-0.155708 0.178795 -0.333333 0 0 1
+-0.141154 -0.360756 0.013312 1 0 0
+0.171899 -0.371795 0.21189 0 1 0
+0.245295 0.0355025 -0.305125 0.360636 0.932625 -0.0123163
+0.396774 0.294872 0.301072 0 1 0
+-0.5 0.285296 0.285262 1 0 0
+0.0865244 -0.185763 0.328346 -0.420611 0.900706 0.1087
+-0.203771 0.0179251 0.353295 0.996583 -0.0825914 0
+0.281165 0.294872 0.147779 0 1 0
+-0.196756 -0.282072 0.320513 0 0 1
+-0.176634 -0.311189 -0.371795 0 0 1
+0.465122 0.294872 0.253474 0 1 0
+-0.133537 -0.240312 0.371795 0 0 1
+-0.342307 -0.0675778 -0.371795 0 0 1
+0.5 0.260589 -0.199152 1 0 0
+0.0941614 -0.294872 0.0653644 0 1 0
+-0.406041 -0.295546 -0.371795 0 0 1
+0.149019 -0.159441 0.371795 0 0 1
+-0.14394 -0.145663 0.327837 0.716104 0.682029 0.148431
+-0.485253 0.371169 0.320513 -0.0328101 0.753992 0.656063
+-0.173005 -0.195138 0.371795 0 0 1
+0.213563 -0.334252 -0.371795 0 0 1
+-0.280027 -0.371795 0.0832333 0 1 0
+0.5 0.0730967 0.179643 1 0 0
+-0.216153 0.0410392 -0.223362 0.294405 0.955618 0.0109811
+-0.5 0.203262 0.186736 1 0 0
+0.217789 0.0361884 -0.172241 -0.385644 0.922645 0.00211863
+0.457535 -0.294872 -0.356485 -0.0964417 0.995284 -0.0104489
+0.222899 -0.371795 0.0872657 0 1 0
+0.199791 -0.371795 -0.249492 0 1 0
+0.144173 -0.371795 -0.142035 0.246484 0.968916 0.0211536
+0.149841 0.0364727 0.320513 0 0 1
+-0.481498 0.073994 0.320513 0 0 1
+-0.378325 -0.371795 -0.164407 0 1 0
+0.5 0.284775 0.224428 0.998422 0.0552922 -0.00985497
+-0.28039 -0.371795 0.0923517 0 1 0
+-0.0879585 -0.294872 -0.169071 0 1 0
+0.5 0.144874 -0.0965326 1 0 0
+-0.0918148 -0.190575 -0.333333 0 0 1
+-0.464326 0.183048 -0.371795 0 0 1
+0.5 -0.0125503 -0.228996 1 0 0
+0.24152 -0.245935 0.320513 0 0 1
+-0.0544473 0.371795 0.153127 0 1 0
+0.397685 0.294872 -0.169661 0 1 0
+0.190416 -0.371795 -0.25841 0 1 0
+-0.5 -0.00957769 -0.0395229 1 0 0
+0.5 0.186088 0.0276265 1 0 0
+-0.5 0.317753 0.127955 1 0 0
+0.421053 -0.371795 -0.235839 0 1 0
+-0.448718 -0.355568 0.206847 1 0 0
+-0.488646 -0.294872 0.229216 0 1 0
+0.0571183 -0.183153 -0.333333 0 0 1
+0.5 0.0201483 -0.120584 1 0 0
+-0.203375 -0.371795 0.204781 0 1 0
+0.164209 -0.371795 -0.243362 0 1 0
+-0.5 -0.00396013 -0.171974 1 0 0
+-0.5 0.167815 0.00837273 1 0 0
+-0.34119 0.371795 0.228279 0 1 0
+0.0328709 0.0574911 -0.333333 0 0 1
+-0.141154 -0.355875 -0.08473 1 0 0
+-0.0798609 -0.0496774 -0.333333 0 0 1
+0.164583 -0.0544569 0.320513 0 0 1
+0.0950859 0.371795 0.0663218 0 1 0
+-0.498866 0.0783325 0.320513 -0.482985 -0.0667055 0.873084
+0.103406 0.371795 -0.234055 0 1 0
+-0.5 -0.176299 0.240112 1 0 0
+-0.258101 -0.220327 0.329296 0.493388 0.864573 -0.0953045
+0.12038 -0.256282 0.353992 -0.00293905 0.999996 0.000404408
+-0.287657 -0.216667 -0.351163 0.548678 0.836017 0.00527282
+0.394624 0.108698 -0.371795 0 0 1
+-0.103386 -0.294872 0.202648 0 1 0
+0.257611 -0.155506 0.371795 0 0 1
+0.36405 -0.371795 0.162786 0 1 0
+-0.5 0.0232643 -0.112861 1 0 0
+-0.5 0.00975331 0.0840647 1 0 0
+0.202378 -0.025794 -0.127563 0.725369 0.688299 0.00917608
+0.0356334 0.371795 -0.00219633 0 1 0
+0.5 0.10389 -0.115057 1 0 0
+-0.479139 -0.294872 -0.110875 0 1 0
+-0.0152544 0.241799 -0.371795 0.0279465 0.160108 0.986704
+-0.5 -0.0559528 -0.353797 1 0 0
+-0.285145 0.0818232 0.371795 0 0 1
+-0.5 0.0690383 -0.112945 1 0 0
+-0.5 0.190551 0.30018 1 0 0
+-0.463832 0.371795 0.0890883 0 1 0
+-0.061336 0.123984 0.320513 0 0 1
+0.5 -0.134421 0.161939 1 0 0
+-0.00337775 -0.158282 -0.333333 0 0 1
+0.0906238 0.371795 -0.170594 0 1 0
+0.346478 0.294872 -0.287073 0 1 0
+0.5 0.285256 -0.331812 0.992944 0.112041 -0.0388407
+0.0166951 -0.294872 -0.0967294 0 1 0
+0.265762 -0.0156181 -0.220852 0.892775 -0.450503 0
+-0.5 0.0819765 0.270458 1 0 0
+0.5 0.0562159 -0.337673 1 0 0
+0.5 -0.248651 -0.228828 1 0 0
+-0.5 -0.218975 -0.344328 1 0 0
+0.5 0.145134 -0.0752729 1 0 0
+0.0371486 -0.269012 0.320513 0 0 1
+0.260178 -0.0223197 0.371795 0 0 1
+-0.189387 -0.155518 -0.333333 0 0 1
+0.491017 0.262494 -0.371795 -0.0727939 -0.038812 0.996592
+0.0306155 -0.200906 0.320513 0.0403688 0.817484 0.574534
+-0.220536 -0.371795 -0.0317501 0 1 0
+-0.172471 0.230897 -0.368742 -0.0287063 0.924176 0.380887
+-0.336846 -0.371795 0.00224112 0 1 0
+-0.5 -0.0191448 0.0168973 1 0 0
+-0.5 0.0448893 -0.0621143 1 0 0
+-0.5 0.316756 0.259557 1 0 0
+0.449537 -0.294872 -0.205018 0.805449 -0.555196 0.207389
+0.163991 -0.230296 -0.333333 0.224327 0.890387 -0.396091
+-0.0927424 -0.19219 0.371795 0.0798882 0.0807303 0.993529
+-0.0385616 -0.294872 -0.0464054 0 1 0
+-0.5 0.23689 0.0274578 1 0 0
+-0.257704 0.371795 0.0419554 0 1 0
+-0.156905 0.371795 -0.0235289 0 1 0
+-0.405815 0.371795 -0.132557 0 1 0
+0.482704 0.294872 0.0175591 0 1 0
+0.247622 -0.371795 0.113762 0 1 0
+-0.140085 0.371795 -0.221381 0 1 0
+-0.0844097 0.371795 0.0965281 0 1 0
+-0.377124 0.100103 -0.371795 0 0 1
+-0.245062 0.041126 -0.240277 -0.323478 0.946096 -0.0162752
+0.15431 -0.118225 0.320513 0 0 1
+-0.27419 -0.0019294 -0.199736 0.99968 0.0240568 0.00784402
+-0.156032 -0.371795 -0.049775 0 1 0
+0.219184 0.0365624 -0.0665469 -0.311491 0.950063 0.0188314
+-0.253509 -0.357592 -0.371795 0 0 1
+-0.0913091 -0.256282 0.34794 0 1 0
+-0.339538 -0.257311 -0.371795 0 0 1
+0.0742434 -0.106761 0.320513 0 0 1
+0.5 0.0242303 0.0760893 1 0 0
+-0.488745 0.0339258 -0.371795 0 0 1
+0.493522 -0.294872 0.313888 -0.143177 0.977393 -0.155573
+-0.14015 -0.294872 0.263317 -0.394174 0.909638 -0.131095
+-0.5 -0.148259 -0.0607663 1 0 0
+-0.276612 -0.226304 -0.371795 -0.048752 -0.367702 0.928665
+-0.5 0.34086 -0.199286 1 0 0
+-0.00655619 -0.283754 -0.371795 -0.0146008 0.0647295 0.997796
+0.464109 0.294872 0.0718443 0 1 0
+0.5 -0.197091 -0.267053 1 0 0
+-0.480452 -0.294872 -0.00416119 0 1 0
+-0.407161 0.241301 -0.371795 0 0 1
+0.210995 -0.371795 0.279487 0 1 0
+0.493249 -0.115965 -0.371795 -0.126277 0.0292324 0.991564
+0.423491 -0.158856 -0.371795 0 0 1
+0.23524 -0.371795 0.153605 0 1 0
+0.0739643 0.141432 -0.333333 0 0 1
+0.300288 0.164919 0.371795 0 0 1
+-0.0926309 0.152966 0.320513 0 0 1
+0.496522 -0.132465 0.320513 0.425101 0.159112 0.891051
+0.141026 0.330214 -0.263069 1 0 0
+-0.141154 -0.355605 0.216726 1 0 0
+0.282577 -0.371795 -0.0711036 0 1 0
+-0.448718 -0.303247 -0.204193 0.995451 0.0810792 0.0500302
+-0.5 0.0923084 -0.312098 1 0 0
+0.475375 -0.0491504 -0.371795 0 0 1
+-0.235004 -0.371795 -0.34266 0 1 0
+-0.102064 0.261806 0.320513 0.0544171 0.441126 0.895794
+0.0389693 -0.131372 0.320513 0 0 1
+0.192674 -0.0041853 -0.285627 0.995726 0.0899278 0.0210295
+-0.332364 -0.371795 0.312283 -0.0952364 0.933323 -0.346177
+-0.448718 -0.351636 0.0231947 1 0 0
+-0.471021 0.140576 0.320513 0 0 1
+0.38351 -0.0136673 0.336195 0.997454 -0.0713132 0
+-0.118374 -0.294872 -0.020536 0 1 0
+-0.201705 0.123026 0.371795 0 0 1
+-0.060163 -0.204915 0.371795 -0.00775661 0.128734 0.991649
+0.0877985 -0.294872 -0.353761 0 1 0
+-0.0879726 -0.256282 0.35952 0 1 0
+-0.0715203 0.371795 0.265678 0 1 0
+-0.14772 -0.371795 -0.0447815 -0.11752 0.990325 -0.0737951
+-0.0290312 0.256282 0.346572 0 1 0
+0.5 -0.00711993 -0.07694 1 0 0
+-0.476885 -0.294872 -0.220926 0 1 0
+-0.5 0.280191 -0.290394 1 0 0
+0.5 -0.127449 0.314453 0.96008 -0.0268072 0.278438
+-0.5 0.243203 -0.197986 1 0 0
+-0.5 0.177671 -0.203555 1 0 0
+-0.185856 -0.371795 -0.326512 0 1 0
+-0.307853 0.371795 -0.049856 0 1 0
+0.224098 -0.344288 0.320513 0 0 1
+-0.438404 -0.365058 -0.371795 0.00841528 0.369199 0.929312
+0.5 -0.267446 0.134614 1 0 0
+0.5 0.0647321 0.299779 1 0 0
+0.179348 -0.0754333 0.320513 0 0 1
+-0.5 -0.134471 0.167551 1 0 0
+-0.5 0.352262 0.0445268 1 0 0
+-0.0869509 0.12895 0.320513 0 0 1
+0.417194 -0.342191 0.320513 0 0 1
+0.448718 -0.347938 0.174988 1 0 0
+0.5 0.232229 -0.368192 0.939713 0.0174157 -0.34152
+-0.188699 -0.371795 -0.322097 0 1 0
+0.114532 0.269781 0.320513 0 0 1
+-0.0254758 0.111951 0.320513 0 0 1
+0.267982 0.294872 -0.280186 0 1 0
+0.16502 0.294872 0.0401261 0 1 0
+0.158659 0.294872 0.3013 0 1 0
+0.174634 -0.371795 0.249641 0 1 0
+0.178827 -0.371795 0.263766 0 1 0
+-0.364515 -0.371795 -0.361742 0 1 0
+0.128582 -0.294872 -0.0804093 0 1 0
+-0.448718 -0.340731 0.0457559 1 0 0
+0.0919937 -0.294872 0.308735 0 1 0
+0.5 0.26095 -0.297119 1 0 0
+-0.239064 0.138426 0.371795 0 0 1
+-0.5 -0.120822 -0.137342 1 0 0
+0.110867 0.296852 0.320513 0 0 1
+0.448718 -0.338246 -0.367759 0.991104 0.0123439 -0.132517
+0.329431 0.157755 0.342628 0.800527 0.599296 0
+0.5 0.0410519 0.0110089 1 0 0
+0.416544 0.284588 0.320513 0 0 1
+-0.245915 -0.371795 -0.0534153 0 1 0
+-0.112728 -0.294872 -0.357537 0 1 0
+0.0896655 0.117139 -0.333333 0 0 1
+-0.488654 -0.0846176 -0.371795 0 0 1
+-0.378736 0.371795 0.258425 0 1 0
+-0.385276 0.293466 0.320513 0 0 1
+-0.482292 0.371795 -0.0908505 0 1 0
+-0.0634625 0.371795 0.314989 0.098965 0.973527 0.206037
+-0.136233 -0.294872 -0.207066 -0.243815 0.969801 -0.00630272
+0.15423 -0.371795 0.236614 0 1 0
+-0.113106 0.371795 0.170945 0 1 0
+-0.332815 0.312973 0.320513 0 0 1
+0.0691243 -0.294872 0.0786819 0 1 0
+0.408834 -0.371795 -0.175738 0 1 0
+-0.267249 0.371795 0.212276 0 1 0
+0.494993 0.192795 -0.371795 -0.400563 -0.0531033 0.914729
+-0.484329 0.371795 -0.150777 0 1 0
+0.5 0.129767 -0.153796 1 0 0
+-0.259432 -0.225952 -0.333333 -0.198382 -0.421222 0.884995
+0.5 -0.283848 0.210683 1 0 0
+-0.295799 0.371795 -0.141161 0 1 0
+-0.366063 0.371795 -0.0426684 0 1 0
+0.5 -0.173634 0.13035 1 0 0
+0.143636 -0.0898009 -0.333333 0 0 1
+0.222534 0.280294 -0.371795 0 0 1
+-0.5 0.29973 -0.0515751 1 0 0
+0.394736 -0.221977 0.320513 0 0 1
+0.473736 -0.294872 -0.18157 0 1 0
+0.5 -0.294108 0.189354 0.811906 -0.583732 0.00814904
+0.0788816 -0.294872 0.0218587 0 1 0
+0.150725 -0.232658 -0.371795 -0.0259748 -0.393266 0.919058
+-0.141154 -0.358903 0.0864712 1 0 0
+-0.0869012 0.0537673 0.320513 0 0 1
+-0.0765008 -0.177635 0.320513 -0.014674 0.0329484 0.999349
+0.100139 0.0520657 -0.333333 0 0 1
+0.172953 -0.115776 0.371795 -0.571388 0.222554 0.789928
+-0.0369028 -0.0799006 0.320513 0 0 1
+-0.0659529 -0.294872 0.309374 0.0100822 0.997748 -0.0663133
+-0.443301 -0.196838 0.320513 0 0 1
+-0.5 0.196846 0.29413 1 0 0
+0.468161 -0.294872 0.204341 0 1 0
+0.498253 -0.214994 -0.371795 -0.465995 0.0992064 0.879208
+0.5 -0.167046 0.305223 1 0 0
+-0.0861783 0.0337145 0.320513 0 0 1
+-0.290988 -0.371795 -0.307211 0 1 0
+0.448718 -0.37126 0.295083 -0.715532 0.694143 0.0786088
+-0.121478 -0.00875834 -0.333333 0 0 1
+-0.5 0.313785 -0.0543813 1 0 0
+-0.0390989 0.371795 0.0601978 0 1 0
+0.188719 -0.371795 0.243028 0 1 0
+0.258525 -0.201108 0.371795 0 0 1
+-0.127002 -0.294872 -0.122366 0 1 0
+0.141139 0.294872 -0.204199 0.68641 0.727063 -0.014829
+0.394609 -0.371795 -0.366683 0.0401376 0.942062 0.333029
+0.5 -0.164998 0.161439 1 0 0
+0.5 -0.195171 -0.338238 1 0 0
+0.376089 -0.371795 -0.0766735 0 1 0
+0.167256 -0.253112 0.347297 -0.1639 0.986428 -0.00980912
+0.0190813 0.130108 0.320513 0 0 1
+0.5 0.262965 -0.292148 1 0 0
+0.378371 0.294872 -0.340662 0 1 0
+0.41061 0.294872 0.201275 0 1 0
+-0.10717 0.371795 0.177489 0 1 0
+-0.266574 0.0157868 -0.0326619 -0.623402 0.260077 0.73738
+0.437065 0.144271 0.320513 0 0 1
+0.482785 -0.189199 0.320513 0 0 1
+-0.26145 -0.121741 -0.333333 0 0 1
+0.165919 -0.229761 -0.333333 0.21978 0.9145 -0.339687
+-0.40335 0.0447319 -0.371795 0 0 1
+-0.5 0.0174555 -0.304165 1 0 0
+0.165996 -0.371795 0.134815 0 1 0
+-0.5 0.295535 -0.212613 1 0 0
+0.449078 -0.207511 0.320513 0 0 1
+0.5 -0.181299 0.136886 1 0 0
+-0.5 0.305203 0.123706 1 0 0
+-0.0841826 -0.102042 -0.333333 0 0 1
+0.472732 -0.290502 -0.371795 0.00702338 0.488254 0.872673
+-0.5 -0.114398 0.297454 1 0 0
+-0.141154 -0.356227 0.098041 1 0 0
+0.145738 -0.371795 -0.247461 0.64725 0.76085 0.0466425
+-0.383533 0.371795 -0.116075 0 1 0
+0.271501 -0.371795 -0.331541 0 1 0
+-0.0491701 -0.255878 -0.371795 0 0 1
+0.192599 -0.00332782 -0.165745 0.997926 0.063849 0.00812789
+-0.319584 0.144237 0.371795 0 0 1
+-0.0010348 0.0915112 0.320513 0 0 1
+-0.0953983 -0.294872 0.250921 0 1 0
+-0.433575 0.371795 -0.192458 0 1 0
+0.238819 0.0375099 -0.18563 0.243648 0.9698 -0.0111636
+-0.17013 -0.0657467 -0.333333 0 0 1
+-0.0626819 -0.0687418 0.320513 0 0 1
+0.0116681 -0.23351 -0.371795 -0.0709615 -0.576805 0.813794
+-0.0675014 -0.1931 0.334791 0.324726 0.945808 0
+-0.448718 -0.309927 0.0597763 1 0 0
+0.110177 0.371795 0.224069 0 1 0
+0.103312 0.371795 -0.193604 0 1 0
+-0.463948 -0.294872 0.180348 0 1 0
+-0.16514 0.371795 0.304711 0 1 0
+-0.493289 0.198554 -0.371795 0.308067 0.0651659 0.94913
+-0.42661 0.371795 -0.14532 0 1 0
+-0.102301 -0.294872 0.114635 0 1 0
+0.443064 0.0640926 -0.371795 0 0 1
+-0.00640892 -0.294872 -0.229323 0 1 0
+0.139589 -0.294872 -0.0756768 0.739193 0.672173 -0.0421603
+0.402906 -0.171807 -0.371795 0 0 1
+-0.340339 0.148379 -0.371795 0 0 1
+-0.271295 0.0158406 -0.321669 0.927797 -0.371656 0.0326142
+-0.291788 -0.246489 -0.371795 0 0 1
+0.123773 0.283168 0.320513 0 0 1
+0.450207 -0.294872 0.220661 -0.679527 0.724287 -0.116842
+-0.0621462 -0.129265 0.320513 0 0 1
+-0.5 0.0391102 0.0172841 1 0 0
+0.10711 0.371795 -0.105657 0 1 0
+0.409377 0.294872 0.165899 0 1 0
+-0.5 0.147856 -0.191025 1 0 0
+-0.5 0.33722 -0.151892 1 0 0
+0.0139835 -0.294872 0.183519 0 1 0
+0.0556447 -0.294872 0.0901444 0 1 0
+-0.215279 0.0406895 -0.131777 0.345012 0.938374 0.0205014
+0.141026 0.323067 0.262126 1 0 0
+-0.497974 0.293005 0.320513 -0.292981 -0.137405 0.946194
+-0.0333972 0.256282 0.350854 0 1 0
+-0.390374 0.371795 -0.158347 0 1 0
+-0.5 -0.0271375 -0.124315 1 0 0
+0.185102 0.294872 -0.177412 0 1 0
+-0.454169 -0.00568756 0.320513 0 0 1
+-0.275349 0.0362121 -0.333333 0 0 1
+0.49884 0.294872 -0.370017 -0.238883 -0.621689 0.745948
+-0.372755 0.297306 -0.371795 0 0 1
+-0.5 -0.23776 0.290801 1 0 0
+0.448718 -0.295744 0.0371362 0.817325 -0.571406 0.0739923
+-0.382669 -0.371795 -0.236835 0 1 0
+-0.227713 -0.0433224 -0.332756 -0.0606881 0.890947 -0.450034
+0.5 -0.0381083 0.249158 1 0 0
+-0.0191424 0.371795 0.188052 0 1 0
+-0.391098 -0.246586 0.320513 0 0 1
+-0.00348939 -0.294872 0.261944 0 1 0
+0.451723 -0.294872 0.222188 -0.584905 0.811042 0.00985048
+0.210022 -0.371795 -0.063634 0 1 0
+-0.311936 -0.371795 0.0294089 0 1 0
+0.5 -0.00878136 0.00689625 1 0 0
+0.286648 0.294872 -0.180023 0 1 0
+-0.448718 -0.347098 0.0222112 1 0 0
+0.251942 -0.0319489 -0.14889 -0.527156 0.849768 0
+0.41053 0.294872 0.0503175 0 1 0
+0.210674 0.18129 -0.333333 0 0 1
+-0.489958 0.0739865 0.320513 0 0 1
+0.407246 0.15327 -0.371795 0 0 1
+-0.5 -0.22621 -0.14815 1 0 0
+-0.336432 -0.292838 -0.371795 0 0 1
+-0.263475 -0.0527839 -0.333333 0 0 1
+-0.308516 0.299268 0.320513 0 0 1
+-0.433299 -0.371795 -0.295008 0 1 0
+0.136273 -0.294872 0.146255 0.354136 0.920579 -0.164689
+0.219349 0.0188122 0.00986443 -0.273856 0.424405 0.863066
+-0.0735616 0.254203 -0.371795 0 0 1
+0.369059 -0.371795 -0.0606088 0 1 0
+0.5 0.23849 0.238128 1 0 0
+0.5 -0.244584 0.292577 1 0 0
+0.141109 -0.307114 0.148257 1 0 0
+-0.104087 -0.176259 0.369683 0.413431 0.821785 0.392102
+0.155461 -0.371795 0.111656 0 1 0
+0.292144 -0.371795 0.134297 0 1 0
+0.394258 -0.0735756 0.320513 0 0 1
+0.175162 0.143828 -0.333333 0 0 1
+0.396753 -0.371795 0.165914 0 1 0
+-0.378867 -0.313031 0.320513 0 0 1
+-0.272982 0.010237 -0.192407 0.972774 -0.231562 -0.00950905
+0.048343 0.216249 -0.333333 0 0 1
+0.203284 -0.0490991 -0.333333 0 0 1
+0.141026 0.347882 -0.347146 1 0 0
+0.400495 -0.371795 -0.280721 0 1 0
+0.18941 -0.371795 -0.349936 0 1 0
+0.5 -0.106241 0.000755586 1 0 0
+0.141109 -0.359746 0.101358 1 0 0
+-0.154446 -0.371795 -0.293931 0 1 0
+0.464653 0.294872 0.153979 0 1 0
+0.0252023 -0.294872 -0.177146 0 1 0
+-0.123898 -0.294872 0.269693 0 1 0
+0.5 -0.0497619 0.150829 1 0 0
+-0.18723 0.26661 0.320513 0 0 1
+-0.365667 -0.371795 -0.3632 0.00290964 0.999788 0.0203942
+-0.0580363 0.256282 0.356709 0 1 0
+-0.1609 0.0045314 -0.333333 0 0 1
+-0.269145 0.306362 -0.371795 0 0 1
+0.307723 -0.371795 0.258856 0 1 0
+-0.5 0.209852 -0.178435 1 0 0
+-0.132852 0.175579 -0.333333 0 0 1
+0.143839 -0.315473 -0.371795 0.267348 -0.0796293 0.960304
+0.255743 -0.0292119 -0.144067 -0.664463 0.747278 0.00805574
+0.5 -0.049308 -0.285825 1 0 0
+-0.459496 0.231994 -0.371795 0 0 1
+0.311285 -0.371795 0.0408438 0 1 0
+0.5 0.135301 -0.163492 1 0 0
+0.144362 -0.371795 0.0478481 0.491467 0.870489 -0.0266392
+-0.20792 -0.0370117 -0.322203 -0.531458 0.847085 0
+0.153888 0.294872 0.00533328 0 1 0
+0.5 -0.197463 0.132112 1 0 0
+-0.094239 0.371795 -0.231119 0 1 0
+-0.190152 0.230897 -0.356196 0 1 0
+0.5 0.243315 -0.0140682 1 0 0
+0.141109 -0.350298 -0.106677 1 0 0
+0.141026 0.332652 0.188377 1 0 0
+-0.274274 0.000974997 -0.120252 0.9998 -0.0198652 -0.00250464
+0.247265 0.180748 -0.333333 0 0 1
+-0.5 0.00405586 0.10911 1 0 0
+0.177747 0.294872 0.27537 0 1 0
+0.103741 -0.294872 -0.184971 0 1 0
+0.141026 0.340601 0.134756 1 0 0
+-0.0981573 0.293289 0.320513 0 0 1
+0.488147 0.249665 0.320513 0 0 1
+0.108875 0.230897 -0.354725 0 1 0
+0.308795 -0.180924 0.342831 0.707107 -0.707107 0
+-0.293032 0.371795 0.0731414 0 1 0
+0.143486 -0.371795 0.0433087 0.544804 0.837858 -0.0343983
+-0.430242 -0.348856 -0.371795 0 0 1
+-0.374885 0.212472 -0.371795 0 0 1
+0.275695 -0.185141 -0.333333 0 0 1
+-0.5 0.21646 -0.357265 1 0 0
+-0.5 0.130535 -0.346991 1 0 0
+-0.101062 -0.126748 -0.333333 0 0 1
+0.239218 0.230897 -0.344538 0.0490444 0.9947 0.090367
+0.0997917 -0.265883 -0.371795 0 0 1
+-0.0356831 0.256282 0.349874 0 1 0
+-0.5 0.0547904 -0.111052 1 0 0
+0.440786 -0.371795 -0.235018 -0.253517 0.967322 0.00419475
+-0.141154 -0.312435 -0.181272 1 0 0
+0.5 0.12337 0.032977 1 0 0
+0.244911 -0.22753 0.370636 0.26416 -0.680013 0.683961
+-0.374917 0.0684768 0.329961 0.973136 -0.230231 0
+0.226427 -0.351995 0.320513 0 0 1
+0.215887 0.159898 0.371795 0 0 1
+-0.5 -0.186479 -0.34168 1 0 0
+0.161125 0.294872 0.165581 0 1 0
+-0.439367 0.371795 0.293789 0 1 0
+-0.156653 -0.371795 -0.358477 0 1 0
+-0.5 0.357713 0.245883 1 0 0
+-0.443346 -0.0765373 0.320513 0 0 1
+-0.5 0.166909 -0.318153 1 0 0
+-0.399215 -0.371795 0.0695673 0 1 0
+0.435403 -0.0299559 0.320513 0 0 1
+0.344217 -0.339822 -0.371795 0 0 1
+-0.5 -0.2103 0.0933754 1 0 0
+-0.0277501 0.202753 0.359225 -0.164567 0.986366 0
+0.279098 0.294872 -0.229156 0 1 0
+0.5 0.0773318 -0.272428 1 0 0
+0.0849554 0.13803 -0.333333 0 0 1
+-0.396379 -0.361614 0.320513 0.0028064 -0.0494648 0.998772
+-0.5 0.00290923 0.268146 1 0 0
+-0.5 -0.113258 -0.343649 1 0 0
+-0.5 0.245721 -0.0385378 1 0 0
+-0.014909 -0.18042 0.320513 0 0 1
+-0.380568 -0.314098 -0.371795 0 0 1
+0.33059 -0.309334 0.320513 0 0 1
+-0.00243837 0.371795 0.18666 0 1 0
+-0.0202777 0.317756 -0.371795 0 0 1
+-0.175624 -0.251292 0.339677 0.212533 0.977154 0
+0.180788 -0.371795 -0.133899 0 1 0
+-0.0605949 0.371795 0.0886259 0 1 0
+-0.320513 -0.101823 -0.369902 0.792219 0.0777365 -0.605266
+0.409679 -0.371795 0.164428 0 1 0
+0.311274 -0.371795 -0.140773 0 1 0
+-0.482437 -0.0735586 -0.371795 0 0 1
+-0.383621 -0.0367738 0.320513 -0.311715 -0.0649838 0.947951
+0.109642 -0.256282 0.340855 0 1 0
+0.5 -0.264708 -0.187967 1 0 0
+-0.5 0.216167 0.165404 1 0 0
+-0.310665 -0.283914 0.320513 0 0 1
+-0.378021 0.371795 -0.2804 0 1 0
+0.311961 0.294872 0.197773 0 1 0
+-0.141154 -0.313464 -0.356805 1 0 0
+0.0156792 -0.204555 0.357678 -0.0752175 0.997104 -0.0112368
+-0.5 -0.154148 -0.350517 1 0 0
+0.0656053 0.101519 0.320513 0 0 1
+-0.39201 0.0526999 -0.371795 0 0 1
+0.0277056 0.371795 0.168361 0 1 0
+0.5 -0.092467 -0.288794 1 0 0
+0.5 0.248495 -0.245167 1 0 0
+-0.442516 -0.371795 0.21 0.408887 0.911198 0.0502993
+-0.5 -0.174322 -0.340736 1 0 0
+-0.0815839 0.371795 0.294414 0 1 0
+-0.289866 0.0509628 -0.333333 0 0 1
+0.5 0.065605 -0.0576227 1 0 0
+0.5 0.157758 0.278516 1 0 0
+-0.238525 0.0242602 -0.0244098 -0.132511 0.475204 0.86984
+-0.217128 -0.0413005 -0.265808 -0.315104 0.949045 -0.0047878
+0.365752 -0.371795 -0.0212848 0 1 0
+0.28991 0.0364642 -0.333333 0 0 1
+-0.5 -0.137409 -0.281091 1 0 0
+-0.398262 -0.0960246 0.320513 0 0 1
+0.344159 0.294872 0.0191858 0 1 0
+-0.5 -0.0788061 0.110805 1 0 0
+0.247856 -0.371795 0.0232239 0 1 0
+0.238565 0.0375778 -0.281712 0.153022 0.988127 0.0137788
+-0.0848869 -0.294872 -0.165331 0 1 0
+0.450683 -0.209516 0.320513 0 0 1
+-0.120643 -0.246032 -0.371795 0 0 1
+0.448718 -0.307338 -0.20562 1 0 0
+-0.5 0.0555025 -0.277846 1 0 0
+-0.343893 0.016005 0.371795 0 0 1
+-0.494682 0.144197 0.320513 -0.39497 0.0671094 0.91624
+-0.15325 0.26893 0.320513 0.000717043 0.00163003 0.999998
+-0.5 0.0771194 0.233398 1 0 0
+0.375235 -0.366508 0.320513 -0.0635101 -0.359925 0.930817
+0.459166 0.294872 0.28711 0 1 0
+-0.121434 -0.121248 0.320513 0 0 1
+0.5 0.167992 -0.121804 1 0 0
+0.0483827 -0.137882 0.320513 0 0 1
+-0.366734 0.371795 -0.191571 0 1 0
+-0.183763 0.371795 -0.151638 0 1 0
+0.0253035 -0.0712841 -0.333333 0 0 1
+0.0706052 0.196872 -0.333333 0 0 1
+-0.272374 -0.275438 0.320513 0 0 1
+0.328493 0.209605 0.320513 0 0 1
+-0.171069 0.102724 0.320513 0.0459886 -0.0274283 0.998565
+0.141109 -0.367398 0.0317709 0.800367 0.595029 0.0731635
+0.203217 0.142647 0.371795 0 0 1
+0.082934 -0.016041 -0.333333 0 0 1
+0.332864 0.0393359 0.371795 0 0 1
+0.5 -0.0119046 -0.0378677 1 0 0
+-0.325198 -0.371795 -0.368907 0.0639646 0.93422 0.350915
+0.126456 -0.294872 -0.0137775 0 1 0
+0.0956552 0.342609 -0.371795 0 0 1
+-0.244823 -0.371795 -0.257235 0 1 0
+0.453171 0.294872 0.203881 0 1 0
+0.448718 -0.364941 0.0280602 0.996951 -0.0686963 0.0370183
+-0.156283 -0.0337497 -0.333333 0 0 1
+-0.5 -0.1276 -0.0186063 1 0 0
+0.434407 -0.371795 -0.192865 0 1 0
+-0.5 0.247064 0.16303 1 0 0
+0.148436 0.294872 -0.0108243 0.357871 0.933246 0.0313073
+-0.338049 -0.107674 -0.371795 0 0 1
+0.208186 0.243 0.368073 0.369333 0.887492 0.275592
+0.5 0.258297 -0.0282875 1 0 0
+-0.420297 0.184895 -0.371795 0 0 1
+-0.0404474 0.371795 -0.19352 0 1 0
+-0.39903 0.371795 -0.0765492 0 1 0
+0.494138 -0.140776 0.320513 0.335747 -0.0223988 0.941686
+0.275516 -0.0160248 -0.333333 0.171201 -0.0339494 0.984651
+0.273005 -0.371795 -0.289998 0 1 0
+-0.5 -0.191103 -0.255594 1 0 0
+-0.203003 0.0335686 -0.0612453 0.623021 0.782173 -0.00713912
+-0.5 -0.208719 -0.128943 1 0 0
+-0.5 -0.0685904 -0.15036 1 0 0
+-0.5 0.0109411 -0.164827 1 0 0
+0.26665 0.0137143 -0.166671 0.939068 0.343715 0.00341757
+-0.452057 0.371795 0.0914348 0 1 0
+-0.273765 0.00678698 -0.261884 0.985792 -0.167922 -0.00395751
+0.12757 -0.109389 0.320513 0 0 1
+0.5 -0.0747609 -0.296009 1 0 0
+0.5 -0.261658 -0.12042 1 0 0
+-0.5 0.0491326 -0.1837 1 0 0
+-0.165747 0.0457976 0.320513 0 0 1
+0.201316 0.294872 -0.315904 0 1 0
+-0.229706 -0.335158 0.320513 0 0 1
+-0.223943 0.124784 -0.333333 0 0 1
+-0.273981 0.00432007 -0.24481 0.997337 -0.0727865 0.00461628
+0.389337 -0.371795 0.318901 0.0109262 0.82482 -0.565289
+0.100491 -0.256282 0.360843 0 1 0
+0.141109 -0.354027 -0.231289 1 0 0
+0.320513 0.105395 -0.349349 1 0 0
+-0.5 0.275647 -0.260557 1 0 0
+0.268801 -0.00490836 -0.0908004 0.991403 -0.130511 -0.00929226
+-0.1381 -0.294872 -0.368355 -0.445374 0.879778 0.166228
+-0.5 0.312082 -0.0538904 1 0 0
+0.448718 -0.33601 0.27866 1 0 0
+-0.369623 -0.352977 0.320513 0 0 1
+0.120181 0.165673 0.330866 0.614229 0.789128 0
+-0.158214 -0.371795 0.0729187 0 1 0
+-0.0685395 0.371795 0.180769 0 1 0
+-0.285901 0.123218 -0.333333 0 0 1
+-0.423078 0.106524 -0.371795 0 0 1
+-0.189583 0.0140704 -0.191939 0.947755 0.318996 0.00134238
+-0.235372 0.371795 0.0587865 0 1 0
+0.0846175 -0.279515 -0.371795 0 0 1
+-0.5 -0.02876 0.0629122 1 0 0
+-0.267936 0.0226271 -0.160505 0.885819 -0.463926 -0.00992885
+0.439239 0.294872 0.162489 0 1 0
+-0.198701 0.346581 -0.371795 0 0 1
+-0.0678287 -0.294872 -0.143 0 1 0
+-0.01166 -0.175791 -0.333333 0 0 1
+-0.232028 0.0434796 -0.314449 -0.0231282 0.999689 -0.00933735
+-0.259567 0.284964 0.320513 0 0 1
+0.113124 0.371795 0.265815 0 1 0
+-0.302712 -0.0759553 -0.333333 0 0 1
+-0.170901 0.371795 0.304433 0 1 0
+-0.290999 -0.214327 -0.344967 0.62172 0.783188 0.00900764
+-0.0656658 -0.294872 0.262218 0 1 0
+-0.273507 0.249377 0.320513 0 0 1
+-0.156602 -0.124452 -0.333333 0 0 1
+-0.198831 -0.371795 -0.0733417 0 1 0
+0.343815 0.192669 0.320513 0 0 1
+0.5 0.120395 -0.367128 0.945306 -0.0898068 -0.313579
+0.404643 -0.123076 -0.371795 0 0 1
+-0.352265 -0.371795 -0.161571 0 1 0
+-0.27131 -0.308571 -0.371795 0 0 1
+-0.5 -0.190519 0.0949981 1 0 0
+-0.0183472 -0.294872 -0.0791515 0 1 0
+-0.448718 -0.315392 -0.361968 0.995361 0.0323687 0.0906035
+-0.5 0.0204268 -0.215758 1 0 0
+0.0537938 0.0986221 0.320513 0 0 1
+-0.254098 0.0366758 -0.211145 -0.559511 0.828819 0.00239951
+-0.326999 -0.134251 -0.371795 -0.140587 -0.00652799 0.990047
+0.141109 -0.333905 0.0563133 1 0 0
+-0.29966 -0.371795 -0.120802 0 1 0
+0.320513 0.149163 -0.365784 0.995119 0.0150134 0.0975357
+-0.475723 0.207228 0.320513 0 0 1
+-0.5 -0.119633 0.0304762 1 0 0
+-0.395852 -0.371795 0.310348 -0.0368808 0.997276 -0.0638706
+0.178826 -0.371795 -0.209602 0 1 0
+0.198278 -0.0203981 -0.0850542 0.854368 0.519058 -0.0251994
+-0.5 0.162072 -0.135892 1 0 0
+-0.160477 0.371795 -0.0321042 0 1 0
+-0.159192 -0.367809 -0.371795 0.047212 0.363267 0.930488
+-0.5 0.247883 -0.113216 1 0 0
+0.0201757 0.261937 -0.371795 0 0 1
+0.247663 -0.371795 -0.00677817 0 1 0
+0.327273 -0.371795 0.0151201 0 1 0
+-0.0348879 0.199037 0.320513 0.0733193 -0.312042 0.947235
+0.5 0.206607 0.0586792 1 0 0
+-0.174516 -0.245727 -0.371795 0 0 1
+-0.19193 0.0194586 -0.0479315 0.909873 0.410444 0.0605503
+0.25715 -0.105133 -0.333333 0 0 1
+0.031409 -0.294872 0.038959 0 1 0
+-0.5 -0.129 -0.0329172 1 0 0
+-0.5 -0.0673956 -0.274887 1 0 0
+0.363613 0.294872 -0.369172 0.0462289 0.839362 -0.541604
+0.5 -0.0591101 0.275192 1 0 0
+0.5 0.202788 -0.0643264 1 0 0
+0.112157 0.311166 -0.371795 0 0 1
+-0.351717 0.371795 -0.0308475 0 1 0
+0.141026 0.347075 -0.342537 1 0 0
+0.469818 -0.294872 0.111036 0 1 0
+-0.258485 0.371795 -0.339668 0 1 0
+0.5 0.0284128 0.138144 1 0 0
+-0.5 0.178997 0.181546 1 0 0
+-0.323418 -0.354928 0.320513 0 0 1
+-0.5 -0.200221 -0.0962813 1 0 0
+-0.5 0.00528119 0.156758 1 0 0
+0.134315 -0.294872 -0.216016 0.524698 0.851242 0.00893949
+0.0714714 -0.294872 -0.281209 0 1 0
+-0.345614 -0.168206 -0.371795 0 0 1
+-0.5 0.108199 0.0799731 1 0 0
+-0.447405 0.120219 0.320513 0 0 1
+0.174579 0.185462 0.371795 0 0 1
+-0.5 -0.133465 -0.360292 1 0 0
+0.0270694 0.228603 -0.333333 0.036739 0.685222 0.727407
+0.264931 0.0523196 -0.333333 0 0 1
+0.119855 -0.294872 0.0373652 0 1 0
+0.462419 0.140171 0.320513 0 0 1
+-0.242259 0.328811 -0.371795 0 0 1
+-0.475854 0.0523032 0.320513 0 0 1
+-0.299296 -0.00402607 0.371795 0 0 1
+-0.5 0.021704 -0.17007 1 0 0
+-0.141154 -0.331352 0.0411475 1 0 0
+-0.308887 -0.371795 -0.190786 0 1 0
+-0.264599 0.371795 0.289695 0 1 0
+0.425509 -0.245962 0.320513 0 0 1
+-0.0712904 -0.230897 -0.337629 0.0203346 0.850976 -0.524811
+-0.448718 -0.367812 -0.244476 0.985133 0.170425 0.0216417
+0.459746 0.294872 0.184414 0 1 0
+-0.256452 0.354532 -0.371795 0 0 1
+-0.0548127 -0.255656 0.371795 0.00587192 -0.707892 0.706296
+-0.222105 -0.371795 0.313644 0.0301806 0.992192 -0.121015
+0.141026 0.311776 -0.272331 1 0 0
+0.324299 -0.371795 -0.315697 0 1 0
+0.303142 0.180456 0.371795 0.372506 0.335004 0.865455
+-0.21232 -0.371795 0.0489969 0 1 0
+-0.5 0.367722 -0.242193 0.780626 -0.621985 -0.0612914
+-0.0944993 0.0635117 -0.333333 0 0 1
+0.5 -0.128656 -0.285889 1 0 0
+-0.153652 -0.290278 0.320513 0 0 1
+-0.141154 -0.321999 -0.10075 1 0 0
+-0.0770692 0.312669 -0.371795 0 0 1
+0.181928 0.294872 0.264687 0 1 0
+0.331642 0.0591218 0.371795 0 0 1
+0.106642 -0.294872 -0.144063 0 1 0
+-0.44629 0.231409 0.320513 0 0 1
+-0.409852 0.287558 0.320513 0 0 1
+0.0125503 -0.204555 0.350111 -0.0236871 0.999701 0.00603012
+-0.5 0.0634967 -0.313619 1 0 0
+-0.448718 -0.358949 -0.318658 1 0 0
+-0.5 -0.154877 0.196329 1 0 0
+-0.294367 -0.211569 -0.366551 0.625343 0.709953 -0.323903
+0.176981 0.246792 0.371795 0.190464 0.376572 0.906596
+0.220609 -0.371795 -0.30706 0 1 0
+0.141109 -0.302717 -0.16099 0.96897 0.237306 0.069164
+-0.46414 0.318918 -0.371795 0 0 1
+0.291368 0.294872 -0.264409 0 1 0
+-0.366631 -0.371795 0.27845 0 1 0
+0.180055 0.294872 -0.218329 0 1 0
+0.113571 -0.170818 0.35925 -0.575857 0.817546 0.00269956
+-0.216512 -0.0411356 -0.134734 -0.336886 0.941528 -0.0057178
+-0.418528 -0.371795 -0.162536 0 1 0
+0.0471264 -0.0463253 0.320513 0 0 1
+-0.5 0.153202 -0.116475 1 0 0
+0.155483 -0.310908 0.320513 0 0 1
+0.464134 0.294872 -0.127352 0 1 0
+-0.175378 0.371795 -0.155764 0 1 0
+-0.141154 -0.349678 0.0239135 1 0 0
+-0.383015 0.371795 -0.29404 0 1 0
+0.123969 0.256282 0.34776 0.0159431 0.999872 0.00128645
+0.0883512 -0.294872 -0.0303432 0 1 0
+-0.0335633 0.152079 -0.333333 0 0 1
+-0.269195 -0.020346 -0.252111 0.867802 0.496589 -0.0178699
+0.272957 0.260271 -0.371795 0 0 1
+-0.148255 -0.00917192 -0.333333 0 0 1
+0.426494 -0.095213 0.320513 0 0 1
+-0.5 0.142821 0.0351398 1 0 0
+0.113101 0.28651 0.320513 0 0 1
+0.0959929 -0.294872 -0.265112 0 1 0
+0.190864 -0.170179 -0.333333 0 0 1
+0.101997 0.371795 -0.148565 0 1 0
+0.5 0.181434 -0.26917 1 0 0
+-0.0400563 -0.230897 -0.362841 0.0210114 0.994312 -0.104416
+-0.477607 -0.0797472 0.320513 0 0 1
+-0.5 -0.0437271 0.142854 1 0 0
+-0.5 0.244961 0.163273 1 0 0
+0.235114 0.0380814 -0.318097 0.0942564 0.994919 -0.0353855
+-0.403055 -0.0383903 0.320513 0 0 1
+0.222828 -0.371795 -0.153386 0 1 0
+0.269024 0.00236645 -0.301902 0.998884 0.047228 -0.000426492
+0.483899 0.20098 -0.371795 0 0 1
+-0.33017 0.371795 -0.212484 0 1 0
+-0.0950881 -0.274279 0.320513 0 0 1
+0.5 0.127443 -0.00234637 1 0 0
+0.427352 0.294872 -0.0798674 0 1 0
+0.052652 -0.198199 0.352286 -0.254567 0.96703 0.00695335
+0.376954 0.294872 -0.105471 0 1 0
+0.201353 -0.0247696 -0.218975 0.741037 0.671331 -0.0133718
+0.139218 0.371795 0.0763077 0.55063 0.833334 -0.048589
+0.32218 -0.34255 0.320513 0 0 1
+-0.142072 0.0584046 -0.333333 0 0 1
+0.225828 0.294872 -0.0884917 0 1 0
+-0.478219 -0.294872 -0.284141 0 1 0
+0.294516 -0.00748387 0.371795 0 0 1
+-0.5 0.0685613 -0.115874 1 0 0
+0.266938 -0.295681 0.320513 0 0 1
+-0.266778 -0.371795 -0.215034 0 1 0
+-0.177412 0.207016 0.371795 0 0 1
+-0.0615151 -0.294872 0.119756 0 1 0
+-0.431683 0.367838 0.320513 -0.0534948 0.247778 0.967339
+0.209161 0.294872 0.118866 0 1 0
+0.101412 -0.294872 0.248058 0 1 0
+-0.435717 -0.278512 -0.371795 0 0 1
+0.5 -0.0583999 -0.109662 1 0 0
+-0.43057 0.371795 0.135339 0 1 0
+0.5 -0.040437 0.220373 1 0 0
+0.128742 0.371795 -0.362612 -0.0994183 0.981835 -0.161604
+-0.154527 -0.134163 0.328201 0.682464 0.707379 0.184006
+-0.230026 0.230897 -0.361366 0.000351797 0.996353 0.0853234
+0.5 -0.231392 0.183012 1 0 0
+0.224833 -0.371795 0.0400182 0 1 0
+0.266389 0.0142733 -0.266889 0.921852 0.387355 0.0120667
+-0.426368 -0.371795 -0.105264 0 1 0
+0.448718 -0.34372 -0.307917 1 0 0
+-0.5 0.00606426 0.0340971 1 0 0
+-0.5 -0.172168 -0.162699 1 0 0
+-0.335855 -0.0771712 -0.371795 0 0 1
+0.433844 -0.356195 -0.371795 0 0 1
+0.265248 -0.122265 0.371795 0 0 1
+0.287861 0.294872 0.160861 0 1 0
+0.411992 0.130704 -0.371795 0 0 1
+0.5 0.0891213 0.0701312 1 0 0
+-0.359313 0.277747 0.320513 0 0 1
+-0.141154 -0.306322 0.0526023 1 0 0
+0.0467652 -0.294872 -0.218602 0 1 0
+-0.20238 -0.0330221 -0.323674 -0.638467 0.764961 -0.0848153
+0.250262 0.0331255 -0.0943533 0.52059 0.853563 -0.0204187
+-0.5 -0.269139 -0.0292365 1 0 0
+-0.308268 -0.181451 0.331457 0.707263 0.706773 -0.015841
+0.0884216 -0.294872 -0.242724 0 1 0
+-0.5 -0.221931 0.144391 1 0 0
+-0.00296648 -0.294872 0.149336 0 1 0
+0.105575 -0.0828083 -0.333333 0 0 1
+0.101522 -0.288919 -0.371795 -0.0359861 0.29392 0.955152
+-0.45592 -0.225659 0.320513 0 0 1
+-0.413666 0.371795 -0.367293 0.0730774 0.954538 -0.288993
+0.211699 0.00745616 0.010785 -0.506395 0.170701 0.845237
+0.448718 -0.347471 -0.165378 1 0 0
+-0.5 -0.186037 -0.344251 1 0 0
+-0.343257 -0.371795 0.277975 0 1 0
+-0.305466 -0.371795 0.108531 0 1 0
+-0.141154 -0.354736 -0.131912 1 0 0
+0.296269 -0.343434 0.320513 0 0 1
+0.244716 0.294872 -0.159297 0 1 0
+-0.427944 0.371795 0.0776466 0 1 0
+0.448718 -0.347933 0.182195 1 0 0
+-0.305615 0.371795 0.0911451 0 1 0
+0.0502202 -0.243576 0.371795 0 0 1
+0.5 0.206826 -0.268135 1 0 0
+0.351194 -0.371795 0.285067 0 1 0
+0.5 0.184611 -0.0435669 1 0 0
+0.0719703 0.0577169 0.320513 0 0 1
+-0.417312 -0.183978 0.320513 0 0 1
+-0.373848 0.0728952 0.329036 0.960138 -0.260387 -0.101658
+0.339267 0.241532 0.320513 0 0 1
+-0.355692 -0.371795 -0.111841 0 1 0
+0.246872 0.201959 0.371795 0 0 1
+-0.5 -0.28821 0.190944 0.947559 0.319349 0.0121482
+-0.260442 0.371795 0.289166 0 1 0
+0.165458 -0.253503 0.342265 -0.159434 0.987142 -0.0114673
+-0.0880079 -0.00663966 0.320513 0 0 1
+-0.41794 0.371795 0.00413772 0 1 0
+-0.497827 -0.294872 0.0340392 0.426467 0.897285 0.11404
+0.298716 -0.11522 0.371795 0 0 1
+0.097532 0.206761 -0.333333 0 0 1
+-0.177137 -0.371795 0.146934 0 1 0
+0.136366 0.230897 -0.370553 0.104584 0.54864 0.829492
+-0.269169 -0.0204011 -0.288109 0.874916 0.48416 0.0105196
+0.5 -0.0158913 0.300322 1 0 0
+-0.103885 0.181057 0.371795 0.191407 -0.430262 0.882178
+-0.448718 -0.369769 -0.315674 0.871797 0.477313 -0.110193
+-0.5 0.320934 0.166209 1 0 0
+-0.345572 -0.371795 -0.249903 0 1 0
+-0.0383421 -0.0665821 -0.333333 0 0 1
+0.141109 -0.347979 -0.331185 1 0 0
+0.329431 0.294872 -0.105958 0 1 0
+0.207256 0.0303102 -0.266312 -0.605653 0.79563 0.0125634
+-0.5 0.169464 0.271313 1 0 0
+0.5 0.177275 0.268829 1 0 0
+-0.479442 0.371795 0.0630042 0 1 0
+0.5 0.0181041 0.190203 1 0 0
+-0.464605 0.371795 0.194466 0 1 0
+0.0947625 -0.294872 0.211268 0 1 0
+0.448718 -0.344221 -0.270755 1 0 0
+-0.180098 0.00203179 0.320513 0 0 1
+0.23272 -0.0382908 -0.0619228 -0.099381 0.995008 0.00906944
+0.148478 0.120191 0.320513 0 0 1
+-0.179067 -0.0912743 -0.333333 0 0 1
+-0.446021 -0.371795 0.271158 0.374333 0.916373 0.141897
+0.5 -0.268247 -0.0812877 1 0 0
+-0.188806 0.227062 0.371795 0 0 1
+-0.5 0.184909 -0.168589 1 0 0
+0.425841 -0.371795 0.202551 0 1 0
+-0.422721 0.371795 0.274435 0 1 0
+-0.0724556 -0.0637918 -0.333333 0 0 1
+-0.149004 0.0495156 0.320513 0 0 1
+-0.31436 -0.158808 -0.333333 -0.26263 0.0340623 0.964295
+0.141219 -0.371795 0.114703 0.759311 0.643896 0.0940466
+-0.402828 -0.36182 -0.371795 0 0 1
+0.0887028 0.207077 0.371795 0 0 1
+-0.21517 -0.371795 -0.182333 0 1 0
+-0.0137969 -0.294872 0.235746 0 1 0
+0.448718 -0.321409 -0.27882 1 0 0
+0.321782 0.294872 0.0752545 0 1 0
+0.496548 -0.192044 0.320513 0.658027 -0.0711689 0.749624
+0.5 -0.121336 -0.249909 1 0 0
+0.321852 -0.279235 0.320513 0 0 1
+-0.19026 -0.0158783 -0.266121 0.921811 -0.387566 0.0075791
+0.423494 -0.0738766 0.320513 0 0 1
+0.0600702 0.371795 0.167762 0 1 0
+-0.480555 0.371795 -0.165641 0 1 0
+-0.126032 -0.202308 0.371795 0 0 1
+-0.325729 0.273363 0.320513 0 0 1
+0.116547 0.371795 -0.360444 0.0083969 0.998441 -0.055176
+-0.199015 0.0473748 0.350433 0.969396 -0.245501 0
+-0.0188783 -0.294872 -0.234769 0 1 0
+-0.183069 0.118098 -0.333333 0 0 1
+0.383457 0.294872 -0.274543 0 1 0
+0.0582359 -0.202228 -0.333333 0 0 1
+0.286713 -0.0363463 0.371795 0 0 1
+-0.320513 -0.00812761 -0.361821 0.996233 -0.0300268 -0.0813481
+0.349359 0.294872 0.0215473 0 1 0
+-0.104901 0.28197 0.320513 0 0 1
+0.333584 -0.29303 -0.371795 0 0 1
+0.204414 0.294872 -0.0267299 0 1 0
+0.227176 -0.00482261 0.0194842 -0.17896 -0.297454 0.937814
+-0.369493 -0.371795 -0.138681 0 1 0
+0.381422 -0.0385732 0.356953 0.988117 -0.153683 -0.00256565
+0.5 0.266138 -0.349877 1 0 0
+0.246692 -0.261411 0.320513 0 0 1
+-0.193002 0.371795 0.110697 0 1 0
+-0.390241 -0.202465 -0.371795 0 0 1
+0.409823 -0.371795 -0.101928 0 1 0
+0.27864 0.294872 -0.226098 0 1 0
+-0.125759 -0.0509321 0.320513 0 0 1
+-0.5 -0.249085 -0.110643 1 0 0
+0.167013 -0.343064 -0.371795 0 0 1
+-0.261633 0.338256 0.320513 0 0 1
+-0.141338 0.185473 0.371795 0 0 1
+-0.339038 0.267587 -0.371795 0 0 1
+0.5 -0.10972 -0.0182232 1 0 0
+-0.295972 -0.251558 -0.371795 0 0 1
+-0.204488 0.371795 -0.00225369 0 1 0
+-0.22206 0.371795 -0.0568202 0 1 0
+0.114622 0.371795 0.0589437 0 1 0
+0.363566 -0.0639081 0.371795 0 0 1
+0.20408 0.131983 0.371795 0 0 1
+0.5 -0.142482 0.243086 1 0 0
+-0.308187 -0.100841 -0.333333 0 0 1
+-0.141154 -0.358014 -0.0699032 1 0 0
+0.435657 0.21051 -0.371795 0 0 1
+-0.25295 -0.34241 -0.371795 0 0 1
+-0.5 -0.0463733 0.216493 1 0 0
+-0.114819 -0.294872 -0.327992 0 1 0
+0.5 0.0241191 -0.168686 1 0 0
+0.5 -0.258463 0.044091 1 0 0
+0.0648968 -0.294872 -0.0619894 0 1 0
+-0.318125 -0.081485 0.371795 0 0 1
+0.0635222 0.371795 -0.193214 0 1 0
+0.5 -0.0570828 -0.00915507 1 0 0
+-0.5 0.0549314 -0.312172 1 0 0
+0.0272285 0.371795 0.0113316 0 1 0
+0.193962 -0.371795 0.157872 0 1 0
+0.5 0.162053 -0.271748 1 0 0
+-0.5 -0.0852158 -0.355046 1 0 0
+-0.0801199 -0.188768 0.361851 0.360304 0.932739 0.0133606
+0.3677 -0.371795 -0.149125 0 1 0
+-0.5 0.285807 0.296518 1 0 0
+0.0682134 -0.294872 0.318634 -0.0951854 0.83586 -0.540628
+0.135307 -0.294872 0.265819 0.506641 0.858789 0.0761316
+-0.482673 -0.147664 0.320513 0 0 1
+0.318552 -0.23407 -0.371795 0 0 1
+-0.454185 -0.20897 0.320513 0 0 1
+-0.114939 -0.136116 -0.333333 0 0 1
+0.130671 -0.0457428 -0.333333 0 0 1
+-0.279902 0.29728 0.320513 0 0 1
+-0.5 -0.264315 0.0494835 1 0 0
+0.448246 0.294872 0.0626729 0 1 0
+0.41055 0.0676718 0.320513 0 0 1
+0.403661 -0.371795 -0.158425 0 1 0
+-0.5 0.342426 -0.0491207 1 0 0
+-0.407464 0.0387001 -0.371795 0 0 1
+0.5 0.125133 -0.0918623 1 0 0
+-0.189583 -0.371795 0.258059 0 1 0
+-0.5 0.0303515 0.249842 1 0 0
+0.296547 0.294872 -0.0025947 0 1 0
+-0.5 0.0161557 0.11063 1 0 0
+0.5 0.143805 -0.182449 1 0 0
+0.330208 -0.371795 -0.0739257 0 1 0
+-0.0313819 -0.139703 -0.333333 0 0 1
+0.390426 -0.0672944 0.320513 0 0 1
+0.473274 0.294872 -0.0293438 0 1 0
+0.5 0.0601938 0.098976 1 0 0
+-0.3765 -0.0011213 0.371795 -0.0270529 -0.026766 0.999276
+-0.00652815 -0.251214 0.371795 -0.174294 -0.388524 0.904804
+0.363096 -0.371795 0.239483 0 1 0
+0.420287 0.294872 -0.199875 0 1 0
+0.233467 -0.371795 0.123079 0 1 0
+0.3258 0.294872 0.0264082 0 1 0
+-0.27694 0.16398 0.371795 0 0 1
+0.484378 -0.294872 0.273423 0 1 0
+-0.0573087 -0.252104 -0.371795 0 0 1
+0.320513 -0.13134 -0.359271 1 0 0
+-0.285866 -0.371795 -0.361699 0.0113144 0.997299 0.0725756
+0.141026 0.310654 -0.125039 1 0 0
+-0.5 0.251929 -0.102138 1 0 0
+-0.471667 -0.294872 0.0117196 0 1 0
+-0.5 -0.187084 -0.0483615 1 0 0
+0.292596 0.286319 -0.371795 0.0818048 -0.171223 0.98183
+-0.5 0.00817067 -0.0228449 1 0 0
+0.418011 0.12884 -0.371795 0 0 1
+0.283352 -0.166606 -0.333333 0 0 1
+0.5 -0.0854756 0.26347 1 0 0
+0.141109 -0.360637 0.305898 0.99657 0.082169 -0.00980138
+-0.165517 -0.0968461 0.320513 0 0 1
+0.5 -0.251059 0.281416 1 0 0
+0.175865 0.294872 -0.302837 0 1 0
+0.141026 0.299618 -0.189381 0.911858 0.410489 -0.00372449
+0.230876 -0.371795 -0.165538 0 1 0
+0.0556493 -0.294872 0.265363 0 1 0
+0.340242 0.294872 0.0678493 0 1 0
+0.485267 0.294872 -0.0251409 0 1 0
+-0.00458735 -0.0167531 -0.333333 0 0 1
+-0.245789 0.371795 0.135211 0 1 0
+-0.5 0.022556 -0.111612 1 0 0
+0.141026 0.31628 0.0746969 1 0 0
+0.311755 0.0460997 0.371795 0 0 1
+-0.243652 -0.371795 0.26722 0 1 0
+0.5 0.0142246 0.0333064 1 0 0
+0.5 0.0968755 0.159439 1 0 0
+-0.358186 -0.269877 0.320513 0 0 1
+0.5 0.261025 0.161935 1 0 0
+0.5 0.141631 -0.166009 1 0 0
+-0.267183 -0.0469835 0.371795 0 0 1
+0.222071 -0.371795 0.0665886 0 1 0
+-0.0658963 -0.123454 0.320513 0 0 1
+0.1968 0.24003 -0.371795 0.00559456 0.0877474 0.996127
+-0.295828 -0.371795 -0.21802 0 1 0
+0.208149 0.0314768 -0.333333 -0.308693 0.520237 0.79628
+-0.389048 0.371795 -0.191325 0 1 0
+0.255549 -0.230557 -0.371795 0.104518 -0.602909 0.790934
+0.238398 -0.133042 0.371795 0 0 1
+-0.211623 -0.371795 0.15943 0 1 0
+-0.448718 -0.319284 -0.230759 1 0 0
+0.448718 -0.364676 0.239006 0.959838 -0.225442 -0.166994
+-0.5 -0.102762 0.0494235 1 0 0
+-0.21077 0.0562753 -0.333333 0 0 1
+0.158964 -0.277941 -0.371795 0 0 1
+-0.5 -0.0569325 -0.207296 1 0 0
+-0.5 -0.187302 -0.237674 1 0 0
+0.5 0.0867843 0.0432357 1 0 0
+-0.141154 -0.313844 0.238233 1 0 0
+-0.347026 0.151502 0.320513 -0.0734491 0.014194 0.997198
+0.248865 -0.154508 0.371795 0 0 1
+0.0107277 -0.294872 0.124772 0 1 0
+0.217653 0.294872 0.0963346 0 1 0
+0.338675 0.108409 -0.371795 0 0 1
+-0.440077 0.116254 -0.371795 0 0 1
+-0.169976 -0.371795 0.112581 0 1 0
+-0.467356 0.206426 -0.371795 0 0 1
+-0.496615 -0.294872 0.101601 0.317604 0.936931 0.145901
+0.193471 -0.0692039 0.371795 0.734222 -0.267594 -0.623949
+-0.0819801 -0.0375674 0.320513 0 0 1
+0.083688 -0.0370384 -0.333333 0 0 1
+-0.130722 0.280081 0.320513 0 0 1
+-0.5 -0.21124 0.193589 1 0 0
+-0.408473 0.131238 0.320513 0 0 1
+-0.336128 0.371795 0.00432297 0 1 0
+0.5 -0.207533 0.00457633 1 0 0
+0.5 -0.145107 0.134146 1 0 0
+0.5 -0.0592414 0.235055 1 0 0
+0.198838 0.021197 -0.0867897 0.83512 -0.549877 0.0144935
+0.171265 -0.201665 0.371795 0 0 1
+0.196199 0.0165252 -0.150192 0.903113 -0.428862 -0.0215564
+0.0398348 0.371795 0.141035 0 1 0
+0.329273 0.294872 -0.0744808 0 1 0
+-0.313873 0.108542 -0.333333 -0.252733 -0.0782668 0.964365
+0.231786 0.0383726 -0.079565 0.00501195 0.999967 0.00635218
+0.0945436 0.371795 0.294414 0 1 0
+0.322694 0.294872 -0.328271 0 1 0
+0.130934 -0.294872 -0.293831 0.167743 0.983201 -0.0719579
+0.448718 -0.357554 0.24141 1 0 0
+0.448718 -0.314387 -0.0760399 1 0 0
+-0.457682 0.371795 0.0890193 0 1 0
+0.5 0.235699 0.180903 1 0 0
+0.357359 -0.115394 -0.371795 0 0 1
+-0.40962 -0.371795 -0.0841299 0 1 0
+0.208396 0.294872 -0.281632 0 1 0
+-0.354795 0.302529 -0.371795 0 0 1
+0.457226 0.263267 -0.371795 0 0 1
+-0.409771 0.211889 0.320513 0 0 1
+-0.217749 -0.0414669 -0.043068 -0.303159 0.951282 -0.056181
+-0.169547 -0.371795 0.319611 0.069047 0.748747 -0.65925
+-0.5 -0.275334 0.166889 1 0 0
+-0.29841 0.371795 -0.00893441 0 1 0
+-0.104171 -0.0628586 0.320513 0 0 1
+0.5 -0.228143 -0.00710568 1 0 0
+-0.259166 -0.256333 0.320513 0 0 1
+0.141109 -0.305226 -0.0644686 0.999932 0.0113891 0.00248553
+-0.315977 -0.179901 -0.35088 0.943329 0.331549 -0.0143296
+0.5 -0.166816 0.266312 1 0 0
+0.0818521 0.309247 -0.371795 0 0 1
+-0.238482 0.253355 -0.371795 0 0 1
+0.0601247 0.234348 -0.371795 0.0217367 0.712996 0.700831
+0.156571 0.256344 0.320513 -0.00752055 0.379431 0.925189
+0.5 0.0858759 0.0454455 1 0 0
+-0.411771 0.0970161 -0.371795 0 0 1
+-0.5 -0.100039 0.225016 1 0 0
+-0.437976 -0.371795 -0.319212 0 1 0
+0.0644077 0.351073 -0.371795 0 0 1
+0.179976 -0.017328 -0.333333 0 0 1
+0.108157 -0.294872 0.0588994 0 1 0
+0.442893 -0.371795 -0.246568 -0.172737 0.983823 -0.0474672
+-0.0114059 0.371795 -0.177986 0 1 0
+-0.449587 -0.24096 -0.371795 0 0 1
+-0.25932 -0.315317 0.320513 0 0 1
+0.433344 -0.371795 -0.242497 0 1 0
+0.273156 -0.371795 0.205095 0 1 0
+0.460773 -0.116081 -0.371795 0 0 1
+-0.0750344 -0.294872 -0.170403 0 1 0
+0.428792 0.294872 0.112956 0 1 0
+0.0247545 0.371795 0.210581 0 1 0
+0.475661 -0.219303 0.320513 0 0 1
+0.180281 -0.148172 0.371795 0 0 1
+-0.177895 0.371795 -0.342132 0 1 0
+0.338213 0.0197004 -0.371795 0 0 1
+-0.306223 -0.306599 0.320513 0 0 1
+-0.340221 -0.371795 -0.135399 0 1 0
+0.141109 -0.350226 0.289899 1 0 0
+-0.330069 -0.371795 0.012026 0 1 0
+0.183465 -0.349418 0.320513 0 0 1
+0.00456371 0.257832 0.320513 -0.045896 0.351329 0.935127
+-0.195962 0.0110678 0.320513 0.281491 0.109377 0.95331
+-0.381347 -0.371795 -0.259581 0 1 0
+-0.5 -0.0181815 0.208645 1 0 0
+0.34141 -0.244104 -0.371795 0 0 1
+0.194417 -0.0123701 -0.291418 0.943782 0.330375 0.0113132
+0.29134 -0.180759 -0.333333 0 0 1
+0.5 0.282491 0.119356 0.999987 0.00512781 -0.000828408
+-0.325991 0.0918917 -0.371795 -0.627937 0.0923478 0.772766
+-0.469603 -0.0314787 0.320513 0 0 1
+0.337467 -0.196594 0.320513 0 0 1
+-0.244616 0.320038 -0.371795 0 0 1
+0.389457 0.294872 0.112627 0 1 0
+0.247972 0.0218449 0.371795 0 0 1
+0.5 0.153086 -0.151854 1 0 0
+0.275895 -0.231808 0.320513 0 0 1
+-0.5 0.118649 -0.292187 1 0 0
+-0.5 0.332311 -0.328651 1 0 0
+-0.0967903 0.063497 0.320513 0 0 1
+-0.315434 0.371795 0.273154 0 1 0
+-0.480349 -0.294872 -0.00270855 0 1 0
+0.482833 -0.089144 -0.371795 0 0 1
+-0.189015 0.184703 0.371795 0 0 1
+-0.5 -0.116074 -0.192413 1 0 0
+0.0848451 0.371795 0.115621 0 1 0
+0.0164198 0.297763 0.320513 0 0 1
+-0.5 -0.233552 0.0142838 1 0 0
+0.5 -0.0977178 -0.366584 0.944859 -0.157045 -0.287364
+0.141109 -0.301301 0.167922 0.97639 0.215507 -0.0148202
+-0.448718 -0.365884 -0.363095 0.98217 0.181979 0.0471741
+-0.208654 -0.0375257 -0.036731 -0.431967 0.816047 -0.384021
+-0.17405 0.117714 0.371795 0.226229 0.00781279 0.974043
+-0.459793 -0.294872 0.303515 0.0577653 0.998301 0.00765579
+-0.420122 -0.371795 -0.334404 0 1 0
+-0.5 0.00338122 -0.21054 1 0 0
+-0.5 -0.0351152 -0.12117 1 0 0
+0.274693 -0.139506 -0.333333 0 0 1
+0.166939 -0.203584 0.371795 0 0 1
+-0.164179 -0.253709 0.348836 0.123705 0.992284 0.0083803
+0.457173 0.294872 0.0468478 0 1 0
+-0.201243 -0.0318844 -0.221421 -0.674357 0.738009 0.0242133
+0.183369 0.246812 0.371795 0.142112 0.703118 0.696728
+-0.212805 0.371795 -0.136028 0 1 0
+-0.5 0.250078 0.167322 1 0 0
+0.5 -0.0647167 -0.149189 1 0 0
+-0.5 -0.269102 -0.088269 1 0 0
+0.448718 -0.305997 -0.0314835 0.995516 -0.092637 0.0191523
+0.360231 -0.357628 -0.371795 0 0 1
+0.448718 -0.295579 -0.0829207 0.926596 -0.374233 -0.0370029
+0.141026 0.346542 0.284011 1 0 0
+-0.5 -0.0289352 0.236825 1 0 0
+0.148322 -0.0579624 0.320513 0 0 1
+-0.382946 0.0907734 -0.371795 0 0 1
+0.460426 -0.124809 -0.371795 0 0 1
+0.0295863 0.135472 0.320513 0 0 1
+-0.141154 -0.369784 0.181984 0.872286 -0.4538 0.182161
+0.19645 0.263517 0.320513 0 0 1
+0.141026 0.349573 -0.289126 1 0 0
+-0.355355 0.192151 0.320513 0 0 1
+-0.5 0.17813 0.211585 1 0 0
+0.320513 0.123475 -0.351429 1 0 0
+0.5 0.278052 -0.312455 1 0 0
+-0.246837 -0.342635 0.320513 0 0 1
+0.208926 -0.122542 -0.333333 0 0 1
+0.229783 -0.0182797 0.0120746 -0.0215577 -0.518406 0.854863
+-0.0175865 -0.204449 0.35456 0.0920178 0.995757 0.000896416
+0.381032 0.294872 -0.344384 0 1 0
+-0.5 0.0734345 0.0279508 1 0 0
+0.333072 0.284466 0.320513 -0.00196207 0.067486 0.997718
+-0.173284 0.288359 -0.371795 0 0 1
+0.5 -0.0911042 -0.142173 1 0 0
+0.5 0.281151 -0.214377 1 0 0
+0.0287195 -0.134938 -0.333333 0 0 1
+0.0630533 0.194628 0.359179 0.324709 0.945814 0
+-0.473292 -0.294872 0.177727 0 1 0
+0.305696 0.294872 -0.268358 0 1 0
+0.263025 0.294872 0.0873656 0 1 0
+-0.261481 0.371795 0.153953 0 1 0
+-0.0314667 0.101865 0.320513 0 0 1
+-0.241454 0.371795 0.00719958 0 1 0
+0.141109 -0.35657 -0.029417 1 0 0
+-0.41461 -0.371795 -0.118207 0 1 0
+-0.5 -0.0280005 0.00335044 1 0 0
+-0.141154 -0.294885 0.0358287 -0.679191 0.733936 0.00618875
+0.5 -0.0399793 0.182913 1 0 0
+-0.2966 0.0206668 -0.333333 0 0 1
+-0.40181 0.371795 0.0855514 0 1 0
+-0.362288 0.371795 -0.29021 0 1 0
+-0.5 -0.156389 -0.0472318 1 0 0
+0.220744 -0.124319 -0.333333 0 0 1
+0.0726521 -0.294872 0.126417 0 1 0
+-0.5 -0.238926 -0.141462 1 0 0
+0.0401789 0.136416 -0.333333 0 0 1
+0.194015 -0.0108686 -0.0499657 0.950641 0.310276 0.00319724
+0.0146375 -0.294872 0.0498947 0 1 0
+0.468069 0.294872 -0.28345 0 1 0
+-0.147911 -0.282135 0.320513 0 0 1
+-0.297698 0.371795 -0.129256 0 1 0
+-0.494033 0.0687235 0.320513 -0.285142 0.158326 0.945318
+-0.0877085 -0.236781 0.371795 0 0 1
+-0.5 -0.0902975 -0.323129 1 0 0
+-0.480808 -0.294872 -0.18221 0 1 0
+-0.45401 0.371795 -0.297224 0 1 0
+-0.276532 -0.371795 0.0681124 0 1 0
+0.273417 -0.34242 -0.371795 0 0 1
+0.16027 -0.371795 -0.104598 0 1 0
+0.0468694 -0.294872 0.13212 0 1 0
+0.5 -0.183748 -0.0894024 1 0 0
+-0.151425 0.215735 0.371795 0 0 1
+-0.485206 -0.215498 -0.371795 0 0 1
+0.5 0.082234 0.195134 1 0 0
+0.5 0.154941 -0.170389 1 0 0
+-0.254775 -0.0111774 -0.0250367 -0.461069 -0.227129 0.857804
+-0.5 0.154175 0.296799 1 0 0
+-0.5 -0.130713 0.0256552 1 0 0
+-0.5 0.310833 0.186876 1 0 0
+-0.37097 -0.195137 0.320513 0 0 1
+0.30451 -0.131882 0.371795 0 0 1
+-0.264766 0.216688 0.325145 -0.593285 0.769693 0.235766
+0.423672 0.294872 0.193605 0 1 0
+0.0388412 0.0434263 -0.333333 0 0 1
+-0.438491 -0.229119 0.320513 0 0 1
+-0.274969 -0.371795 -0.266659 0 1 0
+0.36409 -0.0913777 0.371795 0.749421 -0.0844254 0.656689
+-0.5 0.0888841 0.0908093 1 0 0
+-0.5 0.225202 -0.286344 1 0 0
+0.5 0.230222 0.304232 1 0 0
+0.163288 0.294872 0.249168 0 1 0
+0.183543 -0.371795 -0.264769 0 1 0
+0.219545 -0.0366593 -0.0573637 0.272998 0.962014 0
+-0.0613751 -0.294872 0.0643856 0 1 0
+-0.417322 -0.273279 -0.371795 0 0 1
+0.448718 -0.358547 0.151085 1 0 0
+-0.132213 0.314652 -0.371795 0 0 1
+-0.384593 -0.066584 -0.371795 0 0 1
+-0.5 0.176953 0.0433164 1 0 0
+0.193176 -0.00774055 -0.162552 0.975964 0.217843 -0.00614899
+-0.5 -0.249125 -0.0012838 1 0 0
+0.5 -0.0118924 -0.306062 1 0 0
+-0.0691523 0.103617 0.320513 0 0 1
+0.255577 -0.0293785 -0.179612 -0.672477 0.740057 0.00953268
+-0.378297 0.275647 0.320513 0 0 1
+-0.0683398 -0.218099 0.371795 0 0 1
+0.0484503 0.241731 -0.371795 0 0 1
+0.5 0.19028 -0.196334 1 0 0
+0.380473 -0.371795 -0.20438 0 1 0
+-0.170477 0.113059 0.340683 0.837163 -0.546954 0
+0.365887 0.294872 -0.315777 0 1 0
+-0.119004 0.371795 0.270972 0 1 0
+0.356248 -0.371795 0.315061 0.103979 0.932822 -0.345008
+-0.40723 -0.371795 0.000313686 0 1 0
+-0.5 -0.181185 0.282415 1 0 0
+0.151546 -0.328015 -0.371795 0.0530498 -0.00753254 0.998563
+0.257597 0.195333 -0.333333 0 0 1
+-0.0354053 0.0143126 0.320513 0 0 1
+0.208102 -0.371795 -0.327005 0 1 0
+0.0407886 0.298987 0.320513 0 0 1
+0.476903 -0.151744 -0.371795 0 0 1
+0.351795 -0.371795 -0.308156 0 1 0
+0.5 -0.0710006 0.277188 1 0 0
+0.380359 -0.371795 -0.134704 0 1 0
+-0.5 -0.22157 -0.147575 1 0 0
+-0.272901 0.0105403 -0.278957 0.962311 -0.271953 0
+-0.5 -0.135683 0.147657 1 0 0
+-0.159307 -0.12897 0.360371 0.763945 0.645281 0
+0.141109 -0.343195 -0.156518 1 0 0
+-0.5 -0.265216 -0.102998 1 0 0
+0.5 -0.213326 0.0539137 1 0 0
+-0.115894 -0.294872 -0.104925 0 1 0
+-0.332878 0.212209 0.320513 0 0 1
+-0.400627 -0.141536 -0.371795 0 0 1
+0.00509864 -0.286863 0.320513 -0.0710906 -0.307646 0.948841
+0.0936139 0.256282 0.363281 0.0548217 0.990876 0.123126
+0.345121 0.207171 0.320513 0 0 1
+0.28385 0.294872 0.0062549 0 1 0
+0.141026 0.328938 -0.0306513 1 0 0
+-0.226898 -0.371795 -0.098835 0 1 0
+-0.297197 0.164589 0.371795 0 0 1
+0.213533 -0.371795 -0.335774 0 1 0
+0.0907035 0.371795 0.153176 0 1 0
+-0.5 0.363238 0.23985 0.999712 -0.023706 -0.00363906
+0.12175 0.178758 0.371795 0 0 1
+0.0920658 0.371795 -0.326725 0 1 0
+-0.257575 0.371795 0.038764 0 1 0
+-0.405152 -0.371795 0.291195 0 1 0
+-0.345236 -0.371795 -0.227946 0 1 0
+-0.0545052 0.00899106 0.320513 0 0 1
+-0.5 0.015712 0.0159686 1 0 0
+0.448718 -0.325816 -0.0698779 1 0 0
+-0.286985 -0.371795 -0.0518103 0 1 0
+-0.433173 0.121722 -0.371795 0 0 1
+-0.141154 -0.305989 -0.235967 0.999787 -0.0187385 -0.00869901
+0.203895 0.294872 -0.0441963 0 1 0
+0.5 -0.166653 0.307642 1 0 0
+-0.0233831 0.371795 0.251323 0 1 0
+-0.29772 0.371795 -0.371057 -0.0458208 -0.635673 0.770597
+-0.156452 -0.371795 -0.0341205 0 1 0
+0.182377 -0.371795 -0.273318 0 1 0
+-0.0669096 -0.191552 0.320513 0.0163932 0.505765 0.862516
+-0.431542 -0.312825 -0.371795 0 0 1
+-0.141154 -0.309214 0.208613 1 0 0
+0.5 0.245414 -0.124114 1 0 0
+0.192871 0.00643686 -0.0084748 0.987405 -0.148799 -0.0537563
+-0.497795 0.248631 0.320513 -0.342917 0.110331 0.932864
+-0.141154 -0.295407 0.302613 0.674806 -0.66134 -0.327517
+-0.165552 0.371795 0.0414174 0 1 0
+0.208954 -0.256913 0.320513 0 0 1
+0.117508 0.00726781 -0.333333 0 0 1
+0.5 0.188504 -0.188545 1 0 0
+0.306802 0.044279 0.371795 0 0 1
+0.378676 0.294872 0.230227 0 1 0
+0.122466 -0.294872 -0.032504 0 1 0
+0.5 0.0546104 0.13735 1 0 0
+0.423506 0.294872 0.195467 0 1 0
+-0.429277 0.371795 -0.0116054 0 1 0
+-0.141154 -0.342805 -0.13499 1 0 0
+0.00292028 0.226713 0.371795 0 0 1
+0.261921 -0.0223114 -0.161475 0.842822 -0.537953 0.0160688
+-0.00399726 0.371795 0.0266798 0 1 0
+0.107566 0.371795 0.158614 0 1 0
+-0.190968 0.129458 0.371795 0 0 1
+-0.307245 -0.371795 0.266413 0 1 0
+-0.5 0.0495294 -0.102133 1 0 0
+-0.313247 0.0939516 -0.333333 -0.217136 0.0330752 0.975581
+0.223964 0.294872 -0.292052 0 1 0
+0.332271 0.294872 -0.0869372 0 1 0
+-0.5 0.0878027 -0.109265 1 0 0
+0.136882 -0.294872 -0.35158 0.242604 0.950177 -0.195723
+-0.133983 -0.255869 0.336939 0.0660324 0.997814 -0.00271732
+0.141026 0.34768 0.0693737 1 0 0
+-0.415684 -0.371795 -0.0764994 0 1 0
+-0.43099 -0.197692 0.320513 0 0 1
+0.0617001 -0.131155 0.320513 0 0 1
+0.111575 0.0873766 0.320513 0 0 1
+-0.5 -0.0350781 0.0242629 1 0 0
+-0.215799 -0.0641755 0.371795 0 0 1
+0.0433079 -0.294872 -0.304373 0 1 0
+-0.130888 0.269007 0.320513 0.000635559 0.0143897 0.999896
+0.27548 -0.249586 -0.371795 0 0 1
+0.433477 -0.371795 0.00379127 0 1 0
+-0.0274711 0.371795 -0.273522 0 1 0
+-0.312694 0.371795 -0.00899627 0 1 0
+-0.347142 0.246741 0.320513 0 0 1
+0.5 0.166837 -0.0993566 1 0 0
+0.356268 -0.287729 -0.371795 0 0 1
+0.210633 -0.371795 -0.00872264 0 1 0
+-0.177302 0.371795 0.285627 0 1 0
+0.5 0.222626 0.0438956 1 0 0
+-0.0571304 0.371795 0.0342406 0 1 0
+-0.219093 -0.371795 -0.0477716 0 1 0
+0.0563602 0.371795 0.0724811 0 1 0
+0.305222 0.216533 -0.371795 0.0522045 0.0389062 0.997878
+-0.448718 -0.367925 -0.349525 0.960604 0.220832 0.168741
+-0.0431681 -0.294872 -0.00773089 0 1 0
+-0.190881 0.0366886 0.320513 0.0766471 -0.0542387 0.995582
+-0.10432 -0.176134 0.351903 0.483752 0.875205 0
+0.381511 0.232154 -0.371795 0 0 1
+0.186418 -0.371795 -0.325399 0 1 0
+0.5 0.175034 0.0416495 1 0 0
+-0.36317 0.181085 -0.371795 0 0 1
+-0.187694 0.184056 -0.333333 0 0 1
+-0.109702 0.253318 -0.371795 0 0 1
+-0.026948 0.256282 0.369632 0.137005 0.76332 0.631326
+0.378702 0.0619347 0.320513 0.805572 0.130458 0.577957
+0.23315 0.289717 0.320513 -0.137002 0.496243 0.857306
+0.13822 0.296048 -0.371795 -0.224492 -0.104883 0.968815
+-0.427702 -0.0917228 0.320513 0 0 1
+-0.5 -0.24887 0.15417 1 0 0
+0.313914 -0.371795 -0.0343123 0 1 0
+0.322043 0.290883 -0.371795 0.279257 -0.296014 0.91345
+0.00360264 -0.294872 0.279715 0 1 0
+0.333988 0.151668 0.362186 0.800542 0.599277 0
+0.347352 0.223245 0.320513 0 0 1
+-0.141154 -0.35772 -0.124064 1 0 0
+0.192224 -0.0710031 0.340467 0.917958 -0.396676 -0.00102221
+-0.0434103 0.371795 0.247911 0 1 0
+-0.411048 0.371795 0.222196 0 1 0
+-0.210884 0.0973119 -0.333333 0 0 1
+0.317199 -0.203283 -0.371795 0.0347402 -0.0771078 0.996417
+0.0974291 0.371795 0.0839669 0 1 0
+-0.263272 0.332193 0.320513 0 0 1
+0.206759 0.294872 0.256233 0 1 0
+0.205891 0.0269485 0.371795 -0.480548 -0.189814 0.85618
+-0.5 0.000164391 0.273269 1 0 0
+-0.0521808 0.230897 -0.354234 0 1 0
+-0.5 0.202669 0.195967 1 0 0
+-0.199551 -0.230897 -0.349065 0 1 0
+-0.146509 -0.0281249 -0.333333 0 0 1
+-0.293945 -0.371795 0.311484 -0.0335802 0.992678 -0.116029
+-0.48898 -0.294872 0.268996 0 1 0
+-0.057501 0.371795 -0.0081264 0 1 0
+0.5 -0.0265304 0.0688235 1 0 0
+0.141026 0.355509 -0.0446391 1 0 0
+-0.481102 -0.214701 -0.371795 0 0 1
+-0.149879 -0.371795 -0.199878 0 1 0
+0.182809 0.294872 -0.0277005 0 1 0
+-0.5 0.365114 -0.367546 0.960047 -0.144306 0.239759
+0.125691 -0.217112 -0.333333 0 0 1
+-0.321599 0.341737 -0.371795 0 0 1
+0.241269 -0.164708 -0.333333 0 0 1
+-0.5 0.325057 -0.217943 1 0 0
+-0.17144 -0.111585 0.32912 0.848874 0.52075 0.0907369
+0.5 -0.0574107 -0.019264 1 0 0
+0.141109 -0.366329 0.0389609 0.853796 0.518636 -0.0452709
+-0.244081 -0.369289 0.320513 -0.128097 -0.459913 0.878676
+0.266499 0.294872 0.286532 0 1 0
+0.5 0.0979124 -0.163132 1 0 0
+0.065014 0.371795 -0.328429 0 1 0
+0.0417152 0.371795 0.144736 0 1 0
+-0.168037 0.19419 0.371795 0 0 1
+0.217967 -0.304859 -0.371795 0 0 1
+0.5 0.193425 0.0445495 1 0 0
+-0.21685 -0.371795 -0.271428 0 1 0
+-0.448718 -0.344734 0.0823863 1 0 0
+0.0598671 0.371795 -0.322376 0 1 0
+-0.263989 -0.0785772 -0.333333 0 0 1
+0.42461 0.0444735 0.320513 0 0 1
+0.19065 0.0745909 0.325027 0.748542 0.491772 -0.444799
+0.339729 -0.301466 0.320513 0 0 1
+-0.5 0.154109 -0.0520767 1 0 0
+0.332547 0.294872 0.260288 0 1 0
+0.448718 -0.32372 -0.276694 1 0 0
+0.135763 0.371795 -0.283603 0.521116 0.832172 -0.189548
+-0.213785 -0.371795 0.281603 0 1 0
+0.196895 -0.0457613 -0.333333 0 0 1
+-0.319612 -0.0475987 -0.333333 -0.525238 -0.0423412 0.849901
+-0.305394 0.371795 0.11325 0 1 0
+0.197253 -0.018784 -0.057728 0.893911 0.448198 -0.00647194
+-0.141154 -0.354681 0.261841 1 0 0
+-0.320513 0.0534209 -0.360391 1 0 0
+0.141026 0.330909 -0.191242 1 0 0
+-0.355575 0.137156 -0.371795 0 0 1
+-0.5 -0.157449 -0.0302019 1 0 0
+0.22457 0.294872 0.288887 0 1 0
+-0.440269 0.308955 -0.371795 0 0 1
+0.250243 -0.0331388 -0.0582169 -0.504833 0.863019 0.0184827
+-0.481706 0.371795 -0.0079041 0 1 0
+-0.495209 -0.294872 -0.336647 0.489471 0.859786 0.145555
+-0.385155 -0.281601 -0.371795 0 0 1
+0.448718 -0.300088 0.100874 0.9271 -0.352462 -0.127502
+0.010686 -0.294872 -0.345415 0 1 0
+-0.442462 -0.0832036 -0.371795 0 0 1
+0.0619618 0.180512 0.320513 -0.00152818 -0.00377827 0.999992
+-0.169905 -0.267642 0.320513 0 0 1
+-0.230697 -0.0224733 -0.0225721 -0.0124852 -0.508995 0.860679
+0.139607 0.371795 0.231063 0.568402 0.803366 -0.177548
+-0.0561119 -0.294872 0.0768655 0 1 0
+0.446397 0.294872 0.14424 0 1 0
+-0.199043 -0.371795 0.0427566 0 1 0
+-0.5 -0.0264971 -0.315786 1 0 0
+-0.5 -0.0360003 0.0191087 1 0 0
+0.141109 -0.350099 -0.118628 1 0 0
+0.5 -0.0399003 -0.310836 1 0 0
+0.302968 -0.268014 -0.371795 0 0 1
+0.0639524 -0.0582672 -0.333333 0 0 1
+0.201199 -0.371795 0.157518 0 1 0
+0.195661 0.015371 -0.0695596 0.914501 -0.404038 -0.0209938
+0.320513 -0.0266699 -0.363369 1 0 0
+-0.15538 -0.0857682 -0.333333 0 0 1
+0.448718 -0.333028 -0.0855158 1 0 0
+-0.5 -0.28257 -0.331964 1 0 0
+0.46708 -0.27886 0.320513 0 0 1
+0.314679 -0.076682 -0.333333 0.23941 0.0338217 0.970329
+-0.358485 0.0232605 0.371795 0 0 1
+0.122938 0.371795 -0.0353532 0 1 0
+-0.141154 -0.367298 -0.280139 0.947774 -0.31894 0.00126846
+-0.422494 0.371795 0.224567 0 1 0
+-0.475933 -0.113188 -0.371795 0 0 1
+-0.412878 0.371795 0.0050614 0 1 0
+0.5 0.269215 -0.227357 1 0 0
+-0.187876 0.00769441 -0.300981 0.975238 0.219963 -0.0229747
+0.468886 -0.294872 -0.310109 0 1 0
+-0.141154 -0.334125 -0.0860709 1 0 0
+0.130936 -0.294872 0.263388 0.0364247 0.999214 -0.0156675
+0.204631 -0.371795 0.183246 0 1 0
+0.222511 -0.371795 -0.22945 0 1 0
+0.344403 -0.0800837 -0.371795 0 0 1
+-0.183917 0.371795 -0.0936956 0 1 0
+0.5 0.26956 -0.174564 1 0 0
+-0.134733 -0.294872 -0.00923886 -0.267568 0.963528 -0.0045925
+0.214212 -0.371795 -0.142822 0 1 0
+0.5 -0.00350763 0.108351 1 0 0
+0.2672 -0.371795 0.112648 0 1 0
+-0.141154 -0.345465 -0.350891 1 0 0
+0.22922 -0.038326 -0.110522 0.0500292 0.998746 -0.00186753
+-0.0182871 0.371795 -0.112612 0 1 0
+0.207956 -0.0308004 -0.13699 0.61199 0.790815 -0.00900149
+0.5 0.0333359 -0.292672 1 0 0
+0.389511 0.0308262 0.320513 0.311859 0.0338601 0.949525
+0.455166 -0.294872 -0.172116 -0.0201624 0.999657 0.0167276
+-0.16771 -0.253013 0.355003 0.168673 0.985554 -0.0152767
+0.226289 -0.0380695 -0.0683574 0.157953 0.986824 -0.0350518
+-0.116181 0.247364 0.371795 0.00583566 0.0251191 0.999667
+-0.334376 -0.246109 0.320513 0 0 1
+0.227139 -0.320883 0.320513 0 0 1
+-0.012035 -0.294872 -0.187428 0 1 0
+-0.166816 -0.371795 0.275348 0 1 0
+0.0481665 0.371795 -0.037403 0 1 0
+-0.448718 -0.326129 -0.14701 1 0 0
+0.464419 0.294872 0.0842648 0 1 0
+0.216875 -0.035797 -0.288298 0.349711 0.936743 0.0146593
+0.0438275 -0.0784187 -0.333333 0 0 1
+-0.303419 -0.371795 -0.0983469 0 1 0
+-0.5 0.0146093 0.223205 1 0 0
+-0.448718 -0.353092 0.0753767 1 0 0
+0.0814611 -0.145906 -0.333333 0 0 1
+-0.349036 -0.371795 0.0131683 0 1 0
+0.141109 -0.311408 -0.345275 1 0 0
+0.0735701 0.319986 -0.371795 0 0 1
+-0.38905 -0.0971947 -0.371795 0 0 1
+0.431167 -0.32273 -0.371795 0 0 1
+-0.49303 0.0952239 0.320513 -0.131042 -0.0155186 0.991255
+-0.289524 0.371795 0.219449 0 1 0
+0.451836 0.248791 -0.371795 0 0 1
+-0.326009 -0.371795 -0.209473 0 1 0
+0.192644 -0.00384702 -0.0392419 0.995867 0.0908234 -0.000458274
+0.342915 0.00454361 0.371795 0 0 1
+0.323435 -0.290537 0.320513 0 0 1
+0.235516 0.294872 0.02918 0 1 0
+0.0590346 0.371795 0.204423 0 1 0
+-0.5 -0.0923056 0.209011 1 0 0
+0.37979 -0.200901 0.320513 0 0 1
+0.143809 0.294872 -0.265722 0.252621 0.966617 0.0428241
+0.238835 0.294872 -0.322437 0 1 0
+0.5 0.214765 0.0289535 1 0 0
+0.347513 -0.371795 -0.0860529 0 1 0
+-0.276955 -0.0499352 0.371795 0 0 1
+0.308696 -0.177226 -0.333333 0.25695 -0.0245433 0.966113
+0.459361 0.294872 0.073203 0 1 0
+-0.377162 0.371795 -0.248459 0 1 0
+-0.0583886 -0.196229 0.347531 0.308061 0.951365 0.00164037
+-0.0536412 0.184 -0.333333 0 0 1
+-0.5 -0.000267692 0.200417 1 0 0
+0.30478 -0.371795 -0.0339974 0 1 0
+-0.0539053 -0.294872 0.296999 0 1 0
+0.393209 0.294872 -0.273062 0 1 0
+0.0737128 -0.294872 0.0884935 0 1 0
+-0.5 -0.286043 -0.326675 0.999895 0.0140365 -0.00368023
+0.356156 -0.371795 0.255437 0 1 0
+-0.119786 -0.230897 -0.356073 0 1 0
+-0.5 0.0144032 -0.203211 1 0 0
+0.23954 0.294872 0.144361 0 1 0
+-0.120061 0.371795 0.181281 0 1 0
+0.316567 0.177848 -0.371795 0.82074 0.222002 0.526403
+-0.0935575 0.371795 0.069301 0 1 0
+0.5 -0.134339 0.0862279 1 0 0
+0.345943 0.0837013 -0.371795 0 0 1
+0.213802 -0.0343642 -0.333087 0.164855 0.792747 -0.586834
+0.265278 -0.0166575 -0.129347 0.921442 -0.387669 0.0256501
+0.215648 0.294872 -0.0223487 0 1 0
+-0.122235 -0.0743836 0.320513 0 0 1
+0.5 -0.231227 -0.235849 1 0 0
+-0.178491 0.26937 0.320513 0 0 1
+-0.0831303 -0.294872 -0.112544 0 1 0
+-0.356054 0.371795 0.131257 0 1 0
+-0.00388569 0.204555 0.355192 0 1 0
+-0.166132 0.253357 0.360024 -0.159665 0.987154 -0.00581668
+-0.421663 -0.371795 0.119509 0 1 0
+-0.5 0.298643 -0.138881 1 0 0
+-0.341897 0.371795 0.0640218 0 1 0
+0.351659 0.208131 0.320513 0 0 1
+-0.424206 0.203112 -0.371795 0 0 1
+-0.141154 -0.314364 0.116007 1 0 0
+0.329251 0.00638709 0.371795 0 0 1
+0.141109 -0.295479 -0.228366 0.836228 0.538622 -0.103002
+-0.199003 0.0296444 -0.0606721 0.705414 0.708794 -0.00150382
+0.5 0.0100605 -0.353123 1 0 0
+-0.359465 -0.371795 0.180891 0 1 0
+0.061043 -0.139175 0.320513 0 0 1
+-0.5 -0.0514502 0.136715 1 0 0
+0.5 -0.287376 0.022777 0.989903 -0.131362 0.0532576
+0.128708 0.370592 -0.371795 -0.0919325 -0.653213 0.751572
+0.5 0.217908 -0.15424 1 0 0
+-0.141154 -0.358985 0.231068 1 0 0
+-0.0674006 0.344295 -0.371795 0 0 1
+0.5 -0.0991832 0.0311801 1 0 0
+0.168174 0.294872 0.0317529 0 1 0
+-0.5 -0.0765415 -0.177099 1 0 0
+-0.141154 -0.326294 -0.0327806 1 0 0
+0.16901 -0.371795 -0.108163 0 1 0
+-0.334823 0.0501783 0.371795 0 0 1
+0.141078 0.294872 0.268628 0.572229 0.81933 0.0353859
+0.155151 0.145728 -0.333333 0 0 1
+-0.160258 -0.371795 -0.36672 -0.111341 0.890471 0.441207
+-0.414112 0.253213 0.320513 0 0 1
+0.432676 -0.371795 -0.234382 0 1 0
+0.367886 -0.371795 -0.281532 0 1 0
+0.0941213 -0.294872 -0.342915 0 1 0
+0.059907 0.296254 -0.371795 0 0 1
+0.5 0.175692 -0.357673 1 0 0
+-0.460575 -0.224591 -0.371795 0 0 1
+-0.377456 -0.112526 0.320513 0 0 1
+0.278586 0.294872 -0.108099 0 1 0
+-0.0984124 0.371795 -0.120046 0 1 0
+-0.151739 -0.107881 -0.333333 0 0 1
+-0.229077 0.26121 0.320513 0 0 1
+-0.5 -0.2703 -0.242117 1 0 0
+0.226569 0.038094 -0.283068 -0.113745 0.992907 -0.0346071
+-0.5 0.21448 -0.282492 1 0 0
+-0.137731 0.227315 0.371795 0 0 1
+-0.194247 0.0662053 0.357163 0.939155 -0.34343 -0.00666722
+-0.154766 0.371795 -0.244423 0 1 0
+-0.146634 0.345601 0.320513 0 0 1
+-0.12005 -0.294872 0.0717751 0 1 0
+0.5 0.148906 -0.0463987 1 0 0
+-0.5 0.269819 -0.279536 1 0 0
+-0.252404 0.11605 -0.333333 0 0 1
+0.298783 0.294872 -0.272494 0 1 0
+-0.0308173 -0.230897 -0.341257 0.0665907 0.983678 -0.167163
+0.112068 0.371795 0.240477 0 1 0
+-0.24839 0.123885 -0.333333 0 0 1
+-0.0423105 -0.160113 -0.333333 0 0 1
+0.23879 0.230897 -0.334945 0.0833831 0.945147 0.315824
+-0.307501 0.182218 0.356328 -0.707107 0.707107 0
+0.0094103 -0.10041 -0.333333 0 0 1
+0.5 -0.244414 -0.229782 1 0 0
+0.045607 0.199774 0.348051 0.189033 0.981971 0
+-0.269331 -0.0200532 -0.0772828 0.897479 0.441024 -0.00537919
+-0.5 0.275521 -0.327933 1 0 0
+-0.320513 0.0563559 -0.356331 1 0 0
+-0.5 -0.0940336 0.127402 1 0 0
+-0.00909135 -0.256282 0.339152 0 1 0
+-0.141154 -0.330632 0.232089 1 0 0
+-0.5 0.15866 -0.082665 1 0 0
+-0.0600146 0.330124 0.320513 0 0 1
+-0.284393 0.124157 0.371795 0 0 1
+-0.295159 0.332972 -0.371795 0 0 1
+-0.242619 0.371795 0.213429 0 1 0
+0.141026 0.322013 0.0367541 1 0 0
+0.146972 -0.0899711 -0.333333 0 0 1
+0.141109 -0.328576 0.213112 1 0 0
+-0.181381 0.0998388 0.371795 0.744828 -0.233246 0.625162
+0.46387 0.294872 -0.0219685 0 1 0
+0.414824 0.0176276 0.320513 0 0 1
+-0.46034 0.251469 -0.371795 0 0 1
+-0.389986 0.371795 0.0967133 0 1 0
+0.205328 0.294872 0.053926 0 1 0
+-0.40829 -0.371795 -0.256016 0 1 0
+-0.5 -0.245411 0.122075 1 0 0
+-0.189281 0.248321 0.33377 -0.214689 0.976682 0
+-0.420326 0.294905 0.320513 0 0 1
+0.495022 -0.109375 -0.371795 -0.206046 -0.0559929 0.976939
+-0.165953 0.371795 0.127452 0 1 0
+-0.141009 -0.0218971 0.320513 0 0 1
+0.00710209 0.208486 0.371795 0.0405525 -0.250655 0.967227
+-0.364747 0.0688889 -0.371795 0 0 1
+0.38268 -0.353885 0.320513 0 0 1
+-0.5 0.316638 0.304089 1 0 0
+0.5 -0.245764 0.315212 0.956613 -0.0565638 0.28582
+0.5 0.146577 -0.355683 1 0 0
+0.0849028 0.0928684 -0.333333 0 0 1
+-0.269812 -0.0190214 -0.250754 0.88956 0.456763 -0.00709079
+-0.409015 -0.371795 0.156262 0 1 0
+-0.0113849 -0.256282 0.364065 -0.042418 0.963514 -0.264275
+-0.442808 -0.306467 -0.371795 0.425487 -0.00178194 0.904963
+-0.5 0.0562065 -0.00918059 1 0 0
+-0.375128 0.371795 0.208731 0 1 0
+0.24018 -0.0371452 -0.18358 -0.240905 0.970546 0.00241183
+0.141109 -0.326203 -0.198737 1 0 0
+-0.333506 0.371795 0.184007 0 1 0
+0.345384 0.0631237 0.371795 0 0 1
+-0.141154 -0.327109 0.0647439 1 0 0
+0.48376 -0.294872 -0.127694 0 1 0
+-0.448718 -0.33771 -0.0670012 1 0 0
+0.182827 0.0275375 0.320513 0 0 1
+-0.0677399 0.115776 -0.333333 0 0 1
+0.0545934 0.230897 -0.34843 0 1 0
+-0.5 0.237198 -0.146874 1 0 0
+-0.5 0.117849 0.237401 1 0 0
+0.21491 0.0348806 -0.200803 -0.406678 0.913514 0.0102151
+0.5 -0.0504519 -0.278248 1 0 0
+0.5 -0.166936 0.129595 1 0 0
+-0.451452 0.371795 -0.202972 0 1 0
+-0.139 0.371795 -0.176599 0 1 0
+0.448718 -0.350828 -0.198682 1 0 0
+0.395059 0.294872 0.041306 0 1 0
+-0.140089 -0.125902 -0.333333 0 0 1
+-0.5 0.201721 0.219021 1 0 0
+0.0125295 0.371795 0.232926 0 1 0
+-0.317883 0.371795 0.219808 0 1 0
+0.0219315 0.0434665 -0.333333 0 0 1
+-0.394688 -0.371795 0.133638 0 1 0
+-0.5 0.0633351 -0.249371 1 0 0
+-0.0750187 -0.285578 -0.371795 0.00596736 0.0380146 0.999259
+-0.5 0.286836 0.254825 1 0 0
+0.390972 0.294872 0.124035 0 1 0
+-0.251039 0.224183 0.351103 -0.479242 0.877683 0
+-0.115735 0.371795 -0.178593 0 1 0
+-0.427071 -0.268156 -0.371795 0 0 1
+-0.312589 0.307311 0.320513 0 0 1
+0.0308406 0.371795 0.0344403 0 1 0
+0.141109 -0.31364 -0.214478 1 0 0
+0.286802 -0.200596 0.370754 -0.611882 0.413593 -0.674197
+0.335383 0.294872 0.0906591 0 1 0
+-0.419651 0.371795 -0.187974 0 1 0
+0.460567 0.294872 -0.135574 0 1 0
+-0.141154 -0.33959 0.0412206 1 0 0
+0.330416 -0.17114 0.320513 0.180688 -0.15002 0.972032
+-0.0925483 0.371795 -0.234628 0 1 0
+0.252085 0.274471 0.320513 0 0 1
+-0.5 0.0612306 -0.0120999 1 0 0
+0.141026 0.339571 -0.326371 1 0 0
+0.154858 -0.269179 -0.371795 0 0 1
+-0.18216 0.0939468 0.328956 0.903334 -0.400491 0.153606
+-0.277892 0.371795 -0.0532526 0 1 0
+0.172546 0.109893 0.339841 0.837163 0.546954 0
+-0.5 0.115894 -0.0842205 1 0 0
+0.0354022 0.371795 -0.0963343 0 1 0
+0.166714 -0.267984 -0.371795 0 0 1
+-0.413783 0.371795 -0.0506639 0 1 0
+0.5 -0.0158445 0.247922 1 0 0
+-0.0825499 0.371795 -0.184068 0 1 0
+-0.5 0.289226 -0.173631 1 0 0
+0.19871 0.0210142 -0.212484 0.82751 -0.561392 -0.00814897
+-0.5 -0.0425719 -0.34621 1 0 0
+-0.475359 -0.0920579 -0.371795 0 0 1
+-0.477476 -0.294872 -0.237104 0 1 0
+0.406658 -0.291214 0.320513 0 0 1
+-0.185455 -0.0864354 0.334679 0.915774 0.401693 0
+0.214601 0.0347365 -0.0695783 -0.446638 0.894449 -0.0218091
+0.424971 -0.341657 -0.371795 0 0 1
+-0.109147 -0.294872 -0.124092 0 1 0
+-0.5 -0.152871 0.269916 1 0 0
+-0.400351 0.0399878 -0.371795 0 0 1
+-0.5 -0.14342 -0.176951 1 0 0
+-0.5 -0.138801 -0.0410033 1 0 0
+-0.141154 -0.30752 0.296569 1 0 0
+0.127798 0.305126 -0.371795 0 0 1
+-0.185265 0.371795 -0.101365 0 1 0
+0.313866 0.294872 -0.096911 0 1 0
+0.5 -0.234385 -0.256063 1 0 0
+0.448718 -0.33776 -0.258284 1 0 0
+0.0360649 -0.230897 -0.33476 0.0242501 0.907294 -0.419798
+-0.46643 0.232114 0.320513 0 0 1
+-0.188452 0.0796041 0.341175 0.915787 -0.401665 0
+-0.191001 -0.371795 -0.35099 0 1 0
+-0.144151 0.26555 0.320513 -0.00812741 0.0966525 0.995285
+-0.295915 -0.193774 0.361688 0.654714 0.755863 -0.00447813
+-0.499326 0.371795 0.222029 0.746796 -0.65441 -0.118502
+0.405445 -0.000891072 0.320513 0 0 1
+-0.33317 -0.177429 -0.371795 0 0 1
+-0.110826 -0.294872 -0.271005 0 1 0
+-0.404449 -0.371795 -0.0327874 0 1 0
+-0.5 -0.114734 0.115855 1 0 0
+-0.5 0.0171092 -0.150016 1 0 0
+-0.499184 0.371795 -0.0544271 -0.432517 0.900781 0.0390296
+0.157595 -0.371795 -0.346239 0 1 0
+0.5 -0.243545 0.245525 1 0 0
+-0.297781 -0.208155 -0.351169 0.694483 0.719482 0.00615766
+-0.12773 -0.256282 0.371777 0.0199411 0.820207 -0.57172
+0.0579101 0.266957 0.320513 0.0151249 0.0465996 0.998799
+-0.5 -0.26226 -0.0108704 1 0 0
+-0.424952 0.371795 -0.243915 0 1 0
+-0.251269 -0.371795 -0.175592 0 1 0
+-0.308803 -0.371795 -0.010712 0 1 0
+0.141109 -0.323134 -0.347946 1 0 0
+-0.5 0.083231 -0.198074 1 0 0
+-0.42588 0.0649737 0.320513 0 0 1
+-0.383453 0.283188 0.320513 0 0 1
+-0.101284 -0.294872 -0.30283 0 1 0
+-0.492472 -0.131338 0.320513 -0.0536315 0.0245623 0.998259
+-0.0872099 0.24225 -0.371795 0 0 1
+-0.448718 -0.361594 -0.23929 1 0 0
+0.0915601 -0.294872 -0.0414331 0 1 0
+0.16247 0.294872 -0.365506 0.0496806 0.974386 -0.219324
+-0.183627 -0.250811 0.320513 -0.252541 -0.578789 0.775388
+0.5 -0.0176459 0.301287 1 0 0
+0.5 -0.151021 0.0289893 1 0 0
+-0.5 0.316927 -0.158589 1 0 0
+0.185928 0.153358 -0.333333 0 0 1
+0.314847 -0.174872 0.36416 0.621217 -0.734821 0.272263
+0.348681 0.294872 -0.240353 0 1 0
+0.141026 0.336756 -0.211868 1 0 0
+-0.194684 -0.016758 -0.0330625 0.563706 -0.234803 0.791898
+-0.5 -0.275708 -0.361943 0.975755 0.0219294 0.217765
+0.141026 0.334313 -0.140983 1 0 0
+-0.197071 -0.0275806 -0.234852 0.762613 -0.646328 0.0260964
+-0.370276 -0.149284 -0.371795 0 0 1
+-0.5 -0.117858 -0.302964 1 0 0
+-0.456943 -0.294872 -0.108384 0.146586 0.988021 -0.0482452
+-0.5 0.171948 0.283718 1 0 0
+0.33514 -0.371795 -0.264326 0 1 0
+0.448718 -0.338574 0.0956693 1 0 0
+-0.5 0.0274976 0.00125521 1 0 0
+-0.458125 0.200553 0.320513 0 0 1
+0.141026 0.328396 -0.106392 1 0 0
+-0.17557 0.34546 0.320513 0 0 1
+-0.262152 0.371795 -0.217369 0 1 0
+0.384617 0.294872 0.0725925 0 1 0
+-0.5 -0.105643 -0.28787 1 0 0
+0.5 0.175852 -0.179076 1 0 0
+0.287262 -0.150137 -0.333333 0 0 1
+-0.156372 -0.371795 -0.106821 0 1 0
+-0.148587 0.183007 0.371795 0 0 1
+-0.381123 -0.371795 0.172729 0 1 0
+0.325415 -0.244101 0.320513 0 0 1
+-0.277435 0.371795 0.221727 0 1 0
+0.371573 -0.304147 -0.371795 0 0 1
+0.469509 -0.294872 -0.156251 0 1 0
+0.1913 -0.047528 0.320513 -0.100412 0.0537949 0.993491
+-0.379511 -0.0473595 0.349111 0.977147 0.212563 0
+0.178524 -0.371795 0.00680229 0 1 0
+0.492695 0.0484465 0.320513 0.0977961 -0.0684777 0.992848
+-0.398664 -0.371795 0.152996 0 1 0
+0.0493305 0.230897 -0.369431 -0.210113 0.794658 0.569536
+0.10554 -0.0596032 -0.333333 0 0 1
+0.5 -0.0947877 0.246028 1 0 0
+0.18531 0.224817 0.371795 0 0 1
+0.141026 0.329215 -0.305211 1 0 0
+0.5 0.280259 -0.331543 1 0 0
+-0.42715 -0.371795 0.185783 0 1 0
+0.0458051 -0.10923 0.320513 0 0 1
+-0.341417 -0.371795 -0.0825911 0 1 0
+-0.392618 -0.371795 0.284768 0 1 0
+-0.128372 -0.188649 0.371795 0 0 1
+0.384098 0.294872 -0.33068 0 1 0
+0.444865 -0.371795 -0.0959873 -0.386052 0.913214 0.130396
+-0.382288 -0.371795 0.110519 0 1 0
+0.250379 -0.371795 0.124667 0 1 0
+-0.265201 -0.371795 0.0614951 0 1 0
+0.00181487 0.151244 -0.333333 0 0 1
+0.109797 -0.256282 0.343402 0 1 0
+-0.214779 0.075057 0.371795 0 0 1
+-0.0203996 -0.294872 -0.167027 0 1 0
+0.448718 -0.36218 0.0986169 1 0 0
+0.280235 0.294872 -0.0120191 0 1 0
+-0.5 -0.137693 -0.0386051 1 0 0
+-0.0259927 0.371795 -0.0754746 0 1 0
+-0.238274 -0.0789388 -0.333333 0 0 1
+0.448718 -0.319517 -0.0615856 1 0 0
+0.141109 -0.359274 -0.150541 0.999763 0.0211855 0.004943
+0.093171 0.371795 0.0638524 0 1 0
+-0.179771 -0.234106 0.371795 0 0 1
+-0.5 -0.0130996 0.183081 1 0 0
+0.279402 0.294872 -0.304446 0 1 0
+0.429473 -0.194563 0.320513 0 0 1
+0.235844 -0.0993965 0.371795 0 0 1
+0.439709 -0.1002 -0.371795 0 0 1
+0.5 0.194627 0.124899 1 0 0
+0.410209 0.0361723 -0.371795 0 0 1
+-0.5 -0.130162 -0.142311 1 0 0
+0.5 -0.292222 0.0371028 -0.413916 0.910314 -0.00153425
+-0.448718 -0.308437 0.16829 1 0 0
+-0.5 -0.272139 0.236384 1 0 0
+-0.49602 0.137821 0.320513 -0.440692 -0.118941 0.889744
+-0.5 0.22583 0.0532566 1 0 0
+0.35713 0.114151 0.332659 0.877668 0.479269 0
+-0.349063 -0.371795 0.293032 0 1 0
+0.390956 0.0824773 -0.371795 0 0 1
+-0.0312145 0.35341 0.320513 0 0 1
+0.448718 -0.349807 0.223629 1 0 0
+0.328162 0.294872 0.0376869 0 1 0
+-0.0859357 0.170668 0.320513 0 0 1
+0.297594 -0.371795 0.0991713 0 1 0
+0.348137 -0.13062 0.362528 0.874145 -0.480485 0.0707444
+0.459094 -0.140843 0.320513 0 0 1
+0.0879583 -0.294872 0.232905 0 1 0
+0.0280307 0.288466 0.320513 0 0 1
+-0.371731 -0.297758 -0.371795 0 0 1
+-0.285437 -0.34481 -0.371795 0 0 1
+-0.282212 -0.171463 0.371795 0 0 1
+0.161047 0.127081 0.323092 0.769757 0.446149 -0.456537
+-0.5 -0.174001 -0.135247 1 0 0
+0.305554 -0.190266 -0.333333 0.307728 -0.270997 0.912066
+0.5 -0.0105766 0.200931 1 0 0
+0.474362 -0.0221613 -0.371795 0 0 1
+0.448718 -0.332695 -0.368684 0.981578 0.0338621 -0.188037
+0.17459 0.294872 -0.149633 0 1 0
+-0.0905488 0.371795 0.210373 0 1 0
+-0.477746 -0.294872 -0.00428873 0 1 0
+0.229864 0.294872 -0.196776 0 1 0
+-0.395395 -0.371795 -0.0543971 0 1 0
+0.448718 -0.331248 0.320475 0.692575 -0.106947 0.713374
+-0.5 -0.0118187 0.0475574 1 0 0
+0.448166 -0.371795 0.229655 -0.631006 0.770821 -0.0875589
+0.018892 -0.196833 0.320513 0.0311388 0.244443 0.969164
+0.0288797 -0.294872 -0.138367 0 1 0
+0.446413 0.294872 0.00503812 0 1 0
+0.160854 -0.371795 0.16464 0 1 0
+0.5 -0.027478 0.289595 1 0 0
+-0.468837 0.20432 0.320513 0 0 1
+0.215191 0.294872 -0.0767993 0 1 0
+0.113112 0.171175 0.329686 0.563513 0.816302 -0.126901
+0.450321 0.294872 0.249778 0 1 0
+0.448718 -0.314385 0.192089 1 0 0
+-0.436819 0.371795 0.17624 0 1 0
+-0.407838 0.371795 -0.0390801 0 1 0
+0.375001 0.294872 0.255661 0 1 0
+-0.5 0.236466 -0.246912 1 0 0
+0.141026 0.302742 0.154344 0.976394 0.17255 0.129931
+-0.227711 0.230897 -0.357595 0 1 0
+0.175113 -0.320621 -0.371795 0 0 1
+0.286408 -0.371795 0.300515 0 1 0
+-0.0983183 0.371795 -0.150627 0 1 0
+0.288288 -0.199484 0.366567 -0.485834 0.799949 -0.352202
+-0.343736 -0.0917951 0.371795 0 0 1
+0.410008 -0.371795 -0.151518 0 1 0
+0.107592 -0.294872 0.0543144 0 1 0
+0.195637 -0.350724 -0.371795 0 0 1
+0.271234 0.21225 0.34948 0.585446 0.810646 -0.0103099
+0.497163 0.294872 0.162699 0.468353 0.878294 -0.0961501
+0.5 0.240466 -0.277376 1 0 0
+0.251605 -0.371795 -0.272098 0 1 0
+-0.221762 0.225675 0.371795 -0.00336551 0.0136443 0.999901
+0.217102 -0.0359031 -0.114941 0.362027 0.931807 0.025944
+0.367026 0.225643 -0.371795 0 0 1
+-0.5 -0.193197 0.223428 1 0 0
+-0.0566161 -0.152294 0.320513 0 0 1
+0.5 0.1449 0.0104088 1 0 0
+0.265331 -0.371795 0.0670056 0 1 0
+-0.151171 0.371795 -0.358506 0 1 0
+-0.138331 0.371795 -0.124457 0 1 0
+0.172765 0.251914 0.332585 0.210249 0.977648 0
+0.5 0.0552612 -0.282315 1 0 0
+0.224616 -0.371795 -0.114408 0 1 0
+-0.201449 0.0846899 -0.333333 0 0 1
+-0.141154 -0.297861 -0.333307 -0.638099 0.743358 -0.200622
+-0.493526 -0.257808 0.320513 -0.210795 0.0391675 0.976745
+0.019478 -0.294872 -0.0752892 0 1 0
+-0.168211 0.12873 -0.333333 0 0 1
+-0.461794 0.0231167 0.320513 0 0 1
+0.5 -0.0365131 0.012816 1 0 0
+0.383421 0.0149057 0.36756 0.925367 0.06065 0.374188
+0.109999 0.254338 0.371795 0.0602331 0.451958 0.890004
+-0.398269 -0.0201022 -0.371795 0 0 1
+-0.5 -0.141665 -0.238008 1 0 0
+-0.247251 -0.371795 -0.178938 0 1 0
+0.182758 -0.136372 0.371795 0 0 1
+0.141109 -0.354359 0.0486698 1 0 0
+0.392636 0.0563034 0.320513 0 0 1
+0.141026 0.349 -0.187652 1 0 0
+0.5 -0.0608814 -0.346397 1 0 0
+-0.5 -0.000362474 0.262082 1 0 0
+-0.3389 -0.371795 -0.171025 0 1 0
+0.320513 -0.130042 -0.353262 1 0 0
+0.225416 -0.0379931 -0.244959 0.152513 0.988276 0.00714261
+-0.141154 -0.315106 0.271503 1 0 0
+-0.377195 -0.371795 -0.229123 0 1 0
+0.0423423 0.371795 -0.0301446 0 1 0
+0.390107 0.294872 -0.237095 0 1 0
+0.4481 -0.102922 -0.371795 0 0 1
+0.5 0.0834375 -0.0913983 1 0 0
+-0.5 0.342133 0.0301789 1 0 0
+-0.418822 -0.208473 0.320513 0 0 1
+-0.135502 0.153747 0.348773 -0.636704 0.771087 -0.00568833
+0.117633 -0.294872 -0.169102 0 1 0
+0.34595 -0.289572 -0.371795 0 0 1
+-0.5 0.282005 0.254481 1 0 0
+0.472172 -0.0309324 -0.371795 0 0 1
+-0.0212777 0.371795 0.0509005 0 1 0
+0.490059 0.027729 -0.371795 -0.0159272 0.000661798 0.999873
+-0.5 -0.115652 -0.267382 1 0 0
+0.494571 -0.26256 -0.371795 -0.268662 -0.0856356 0.95942
+-0.345317 0.233684 -0.371795 0 0 1
+-0.169571 -0.371795 0.163472 0 1 0
+-0.5 0.260858 0.115687 1 0 0
+-0.457505 -0.294872 0.238417 0.148408 0.988787 -0.0166136
+0.448718 -0.363617 -0.116348 0.997138 -0.07357 0.0173972
+-0.289695 0.371795 0.310327 0 1 0
+-0.217137 -0.00144895 -0.017332 0.4613 -0.0770233 0.883895
+0.201536 -0.371795 -0.0726116 0 1 0
+-0.468461 -0.294872 -0.0794621 0 1 0
+-0.5 0.130992 -0.133238 1 0 0
+-0.490203 0.371165 0.320513 0.0812546 0.742698 0.664678
+-0.0554298 -0.294872 0.140828 0 1 0
+0.141109 -0.344319 -0.245114 1 0 0
+0.233115 0.294872 -0.257215 0 1 0
+0.25651 0.222771 -0.333333 0.0254791 0.0695907 0.99725
+-0.319601 0.371795 0.0374408 0 1 0
+0.5 -0.0712136 0.00450454 1 0 0
+-0.328051 0.316674 -0.371795 0 0 1
+0.141109 -0.327077 -0.220939 1 0 0
+-0.5 0.300738 -0.0840104 1 0 0
+-0.446214 -0.371795 -0.0343817 0.460247 0.880284 -0.115209
+-0.195965 -0.0260016 -0.165292 0.771513 -0.636205 0.00335561
+0.004859 -0.294872 -0.260413 0 1 0
+0.228728 -0.371795 -0.259317 0 1 0
+0.299493 -0.330172 -0.371795 0 0 1
+-0.024246 0.371795 0.23555 0 1 0
+-0.201408 0.0379268 0.361771 0.981467 -0.165711 0.0962406
+0.180083 -0.371795 -0.267944 0 1 0
+-0.5 -0.143995 0.285422 1 0 0
+-0.368714 -0.340273 -0.371795 0 0 1
+0.459329 0.268288 0.320513 0 0 1
+0.324564 0.294872 -0.316945 0 1 0
+0.377973 0.294872 0.105513 0 1 0
+-0.183248 0.0385409 -0.333333 0 0 1
+-0.370461 -0.371795 -0.243206 0 1 0
+0.28898 -0.333638 0.320513 0 0 1
+0.194275 -0.247235 0.355151 -0.216934 0.976185 0.0017082
+0.5 0.187728 0.228502 1 0 0
+-0.5 0.299989 0.0972209 1 0 0
+-0.10525 0.0581585 0.320513 0 0 1
+0.0901234 0.17225 -0.333333 0 0 1
+-0.228542 -0.0433949 -0.309839 -0.0807448 0.996694 -0.0089737
+0.5 0.0816259 -0.21099 1 0 0
+-0.204847 -0.218816 0.371795 0 0 1
+-0.249011 -0.107031 -0.333333 0 0 1
+-0.5 -0.223641 -0.342117 1 0 0
+-0.428087 0.153531 -0.371795 0 0 1
+-0.184709 0.117213 0.371795 0 0 1
+0.317076 -0.172643 0.330702 0.718078 -0.695962 0
+0.00602294 -0.0421608 -0.333333 0 0 1
+0.469042 0.0488477 0.320513 0 0 1
+-0.217086 -0.28491 -0.371795 0 0 1
+0.5 0.262978 -0.169789 1 0 0
+0.101126 0.0417749 -0.333333 0 0 1
+0.363986 0.134718 -0.371795 0 0 1
+-0.341356 -0.33002 0.320513 0 0 1
+0.477651 0.206496 -0.371795 0 0 1
+0.5 0.199272 -0.157248 1 0 0
+0.5 -0.188346 0.0663457 1 0 0
+0.5 -0.0199998 0.168118 1 0 0
+-0.266329 0.215834 0.357401 -0.525755 0.850586 -0.00926897
+0.360306 -0.0726098 -0.371795 0 0 1
+-0.141154 -0.330129 0.174435 1 0 0
+0.134618 0.371795 0.260348 0.276098 0.95201 0.132087
+0.0308049 -0.294872 -0.239204 0 1 0
+-0.5 0.169826 -0.300277 1 0 0
+-0.393219 -0.371795 0.230094 0 1 0
+0.017182 0.371795 -0.0912533 0 1 0
+-0.239614 -0.125919 0.371795 0 0 1
+0.208643 -0.371795 -0.0336219 0 1 0
+0.5 0.26988 -0.0249846 1 0 0
+0.310217 -0.371795 -0.139483 0 1 0
+0.457439 -0.196516 -0.371795 0 0 1
+0.235771 0.294872 -0.287893 0 1 0
+0.359109 -0.305643 0.320513 0 0 1
+0.336595 -0.148186 0.366765 -0.675625 0.585343 -0.448223
+-0.106393 -0.294872 -0.166858 0 1 0
+0.02936 -0.294872 0.114628 0 1 0
+0.499426 -0.179621 0.320513 0.38984 0.0483246 0.919614
+0.353844 0.149145 -0.371795 0 0 1
+-0.353013 0.0629248 0.371795 0 0 1
+0.16968 -0.371795 0.0220508 0 1 0
+0.5 -0.0607967 0.08164 1 0 0
+-0.453838 -0.294872 -0.058245 0.320352 0.945434 0.059399
+0.1763 -0.305833 -0.371795 0 0 1
+0.00876181 0.371795 -0.0871137 0 1 0
+0.293634 -0.195482 0.326868 -0.609686 0.735636 -0.295165
+0.5 -0.0710844 -0.28546 1 0 0
+0.448718 -0.359658 -0.164629 1 0 0
+0.5 0.0735531 0.317882 0.93939 -0.148309 0.309113
+-0.5 -0.0762926 -0.0652673 1 0 0
+0.44469 0.0985161 -0.371795 0 0 1
+-0.469408 0.328223 -0.371795 0 0 1
+0.180842 0.146163 0.371795 0 0 1
+-0.5 -0.0853985 0.0555871 1 0 0
+0.381264 -0.371795 0.312522 -0.0284787 0.99395 -0.106076
+-0.285098 -0.0419424 -0.333333 0 0 1
+-0.115317 -0.294872 -0.232045 0 1 0
+0.239709 0.294872 -0.346004 0 1 0
+0.3161 -0.371795 0.143623 0 1 0
+-0.0378478 0.253205 -0.371795 0 0 1
+0.137138 -0.133936 0.320513 0 0 1
+-0.188957 -0.0117312 -0.0802795 0.962349 -0.270911 0.0221895
+0.175033 0.0281177 -0.333333 0 0 1
+-0.212096 -0.111288 0.371795 0 0 1
+-0.5 -0.0484257 0.0463209 1 0 0
+0.250302 -0.193163 -0.333333 0 0 1
+-0.390032 -0.371795 -0.178819 0 1 0
+0.5 -0.0578558 -0.218487 1 0 0
+-0.162434 0.371795 -0.242511 0 1 0
+0.141026 0.324829 0.297261 1 0 0
+0.141026 0.308289 0.272719 1 0 0
+-0.47769 -0.294872 -0.162797 0 1 0
+0.284818 0.294872 -0.256536 0 1 0
+-0.148147 -0.141093 0.347919 0.735716 0.67729 0
+-0.237341 -0.302172 0.320513 0 0 1
+-0.0519772 0.115132 0.320513 0 0 1
+0.310277 0.294872 0.246638 0 1 0
+0.348816 -0.371795 0.000564674 0 1 0
+-0.5 0.28278 0.146102 1 0 0
+-0.476358 -0.294872 -0.219482 0 1 0
+0.146989 0.294872 -0.22645 0.196531 0.979771 0.0377426
+-0.5 0.194966 0.0341046 1 0 0
+-0.334628 0.0313431 0.371795 0 0 1
+0.328391 0.294872 -0.148851 0 1 0
+-0.186092 -0.371795 -0.233771 0 1 0
+-0.5 -0.0073568 -0.179231 1 0 0
+0.199109 0.294872 0.0161278 0 1 0
+-0.044542 0.187629 -0.333333 0 0 1
+-0.327405 0.371795 0.0915137 0 1 0
+0.264265 0.114626 0.371795 0 0 1
+0.5 -0.195741 -0.368054 0.874587 0.00294078 -0.48486
+0.5 -0.188696 0.1464 1 0 0
+0.37455 0.294872 -0.00180818 0 1 0
+0.0661708 0.371795 -0.0490349 0 1 0
+-0.150936 0.205899 -0.333333 0 0 1
+-0.0813589 0.371795 -0.199679 0 1 0
+0.5 0.0546566 -0.189904 1 0 0
+0.177479 -0.277296 0.320513 0 0 1
+0.5 0.253742 -0.0854742 1 0 0
+0.273299 -0.298073 -0.371795 0 0 1
+-0.5 -0.0752845 0.245832 1 0 0
+-0.225236 0.371795 0.234079 0 1 0
+0.207844 -0.0307215 -0.176306 0.566685 0.822237 -0.0528547
+-0.141154 -0.297109 -0.242006 0.91052 -0.407705 -0.0687694
+-0.5 0.088545 0.306446 1 0 0
+0.320513 0.105161 -0.348947 1 0 0
+-0.218997 -0.0779632 -0.333333 0 0 1
+-0.5 -0.057902 -0.370204 0.557305 -0.14979 0.816685
+-0.5 -0.066735 0.294464 1 0 0
+0.141026 0.317967 0.137099 1 0 0
+0.100208 0.371795 0.247602 0 1 0
+-0.148182 0.254853 0.359235 -0.0713347 0.997452 0
+-0.410818 -0.371795 -0.00324338 0 1 0
+0.141026 0.334477 -0.26827 1 0 0
+-0.5 -0.222234 0.198856 1 0 0
+0.460935 -0.154864 0.320513 0 0 1
+-0.00155578 -0.294872 0.215757 0 1 0
+0.194361 -0.0121607 -0.00755665 0.943219 0.332137 -0.00485139
+0.107278 -0.294872 0.207094 0 1 0
+0.499845 -0.294872 0.040305 -0.114248 0.991318 0.0650786
+0.230719 -0.352165 -0.371795 0 0 1
+0.391841 0.0980021 -0.371795 0 0 1
+0.200407 -0.371795 -0.260539 0 1 0
+0.388632 -0.0177869 -0.371795 0 0 1
+-0.408397 -0.260126 0.320513 0 0 1
+-0.352598 -0.122449 0.336391 0.877684 0.479241 0
+-0.5 0.236892 -0.331474 1 0 0
+0.5 0.148531 -0.227806 1 0 0
+-0.5 0.256094 0.179503 1 0 0
+-0.5 0.191032 -0.0755617 1 0 0
+0.154845 -0.339592 0.320513 0 0 1
+-0.403331 0.371795 -0.202987 0 1 0
+-0.355231 0.117628 0.351591 0.877688 -0.479233 0
+0.491258 -0.163659 -0.371795 -0.144388 0.0899172 0.985427
+-0.466182 0.371795 -0.366405 0.2876 0.84473 -0.451351
+0.5 0.0456759 0.14618 1 0 0
+-0.028676 -0.294872 -0.0954365 0 1 0
+0.485628 -0.294872 -0.273888 0 1 0
+-0.0879614 0.360696 0.320513 0.0275376 0.135202 0.990435
+-0.0560373 -0.175651 0.320513 0 0 1
+0.5 -0.139913 0.0682646 1 0 0
+-0.5 -0.272466 0.0883643 1 0 0
+0.347945 0.080276 0.371795 0 0 1
+-0.152772 0.237601 0.371795 0 0 1
+-0.5 0.0655916 -0.0345865 1 0 0
+0.5 0.217758 -0.0162334 1 0 0
+-0.123811 0.226273 -0.333333 0.00366533 0.086655 0.996232
+0.158867 0.184761 -0.333333 0 0 1
+-0.46625 -0.0414972 0.320513 0 0 1
+-0.216633 -0.334491 0.320513 0 0 1
+-0.5 0.339005 0.283633 1 0 0
+0.271256 0.154094 -0.333333 0 0 1
+-0.5 0.10441 -0.0790479 1 0 0
+0.141026 0.318359 0.30513 1 0 0
+0.5 -0.293065 0.224728 -0.513388 0.858141 0.00511342
+0.5 0.101655 0.169253 1 0 0
+0.146657 -0.254962 0.353946 -0.0714418 0.997445 3.05188e-005
+-0.43413 -0.371795 -0.276466 0 1 0
+0.5 -0.0804402 -0.0905098 1 0 0
+0.5 -0.221321 0.152452 1 0 0
+0.5 0.00873107 0.0839691 1 0 0
+0.178907 0.262309 0.320513 0 0 1
+0.244058 -0.190052 0.371795 0 0 1
+-0.00949664 -0.29217 0.320513 0.0554105 -0.42011 0.90578
+-0.5 -0.215843 -0.124723 1 0 0
+0.183762 0.28414 0.320513 0 0 1
+0.306366 -0.371795 -0.149753 0 1 0
+-0.320513 0.0135355 -0.334023 0.796629 0.212067 -0.566047
+0.310541 0.294872 0.134166 0 1 0
+0.221422 0.294872 0.303832 0 1 0
+0.5 -0.180755 -0.109969 1 0 0
+-0.326305 -0.371795 0.0149555 0 1 0
+-0.5 -0.000650564 0.19537 1 0 0
+0.5 -0.0723838 -0.0340536 1 0 0
+-0.114571 -0.294872 0.192259 0 1 0
+0.238012 -0.0186735 0.371795 0 0 1
+-0.396377 0.371795 0.152496 0 1 0
+0.387538 -0.0945097 -0.371795 0 0 1
+-0.016236 0.371795 0.27674 0 1 0
+0.0689331 -0.143827 0.320513 0 0 1
+0.339415 0.0470884 0.371795 0 0 1
+-0.0326628 -0.294872 0.256972 0 1 0
+-0.450291 0.26868 -0.371795 0 0 1
+-0.5 0.0244083 0.0283507 1 0 0
+0.0881653 0.178973 0.320513 -0.0848636 -0.121805 0.988919
+-0.496763 -0.294872 -0.141263 0.424469 0.905383 0.0103405
+-0.154943 0.371795 -0.256472 0 1 0
+0.403731 0.294872 0.0515948 0 1 0
+0.145633 -0.150014 0.371795 -0.182021 0.365538 0.912825
+0.440202 -0.303806 -0.371795 -0.0576021 -0.042785 0.997422
+0.213501 0.00104687 0.0126794 -0.494734 0.0276223 0.868605
+0.179556 0.294872 -0.285739 0 1 0
+-0.5 -0.217025 0.261274 1 0 0
+0.447607 0.294872 0.182157 0 1 0
+-0.491642 -0.26739 -0.371795 0.183183 -0.110235 0.976879
+-0.140868 0.341658 -0.371795 0 0 1
+0.5 -0.156246 0.138638 1 0 0
+-0.0185195 0.256282 0.36734 0.359363 0.709698 0.605959
+-0.123243 -0.281376 0.320513 0 0 1
+0.0809256 0.195241 -0.333333 0 0 1
+-0.5 -0.242657 -0.222586 1 0 0
+0.153087 -0.0413106 -0.333333 0 0 1
+0.5 -0.246101 -0.26362 1 0 0
+0.362727 -0.371795 -0.06375 0 1 0
+-0.253932 0.371795 0.132974 0 1 0
+-0.387111 -0.248845 0.320513 0 0 1
+-0.242528 0.061937 0.371795 0 0 1
+0.11477 0.194371 -0.333333 0 0 1
+-0.362279 -0.371795 0.071306 0 1 0
+-0.0957935 0.314893 -0.371795 0 0 1
+0.103355 -0.294872 0.0264832 0 1 0
+-0.319829 0.371795 0.256748 0 1 0
+0.185123 -0.235063 -0.371795 -0.00997318 -0.281366 0.959549
+0.365969 0.294872 0.282146 0 1 0
+-0.3846 -0.371795 -0.242132 0 1 0
+0.209902 0.166932 -0.333333 0 0 1
+0.427886 0.0620527 -0.371795 0 0 1
+0.5 0.289943 0.142875 0.872308 0.484927 -0.0626496
+-0.210792 0.201338 0.371795 0 0 1
+-0.5 0.127329 -0.168938 1 0 0
+-0.497498 -0.0690268 -0.371795 0.443613 0.0971793 0.890934
+0.448718 -0.338907 -0.276816 1 0 0
+0.5 0.0645689 0.194373 1 0 0
+0.5 0.0576046 -0.110052 1 0 0
+-0.0106329 0.371795 -0.108787 0 1 0
+-0.5 0.171551 0.0720892 1 0 0
+0.0837476 -0.0209102 0.320513 0 0 1
+0.5 -0.233516 -0.250191 1 0 0
+0.5 0.0830239 0.163135 1 0 0
+0.307719 0.294872 0.297358 0 1 0
+0.4027 -0.371795 -0.145736 0 1 0
+-0.358958 -0.371795 0.176367 0 1 0
+0.379369 0.294872 0.0733521 0 1 0
+0.5 0.152839 0.152715 1 0 0
+0.141026 0.298059 0.250456 0.900596 0.347657 0.260885
+-0.274183 -0.00201599 -0.329519 0.887978 -0.0657891 -0.455155
+-0.367149 -0.371795 0.279174 0 1 0
+-0.253957 -0.0367748 -0.31161 0.513334 0.858169 -0.00576058
+-0.202905 -0.0335005 -0.082866 -0.663949 0.747002 0.0340593
+-0.0781965 0.0485055 -0.333333 0 0 1
+-0.448718 -0.321052 0.095336 1 0 0
+0.141109 -0.363026 -0.307521 0.988069 0.152902 0.0184555
+0.136478 0.230897 -0.349344 0 1 0
+0.5 -0.237378 0.215146 1 0 0
+-0.5 -0.0059526 0.0838139 1 0 0
+-0.0685221 -0.294872 -0.225584 0 1 0
+0.141026 0.328743 -0.200008 1 0 0
+0.266786 -0.0134227 -0.184202 0.942733 -0.333487 0.00641934
+0.0716443 -0.294872 0.0519583 0 1 0
+0.211593 -0.359165 -0.371795 0 0 1
+0.0647071 -0.294872 0.0438652 0 1 0
+-0.0449463 0.199884 0.367451 -0.212204 0.901618 -0.376902
+0.5 0.0690396 -0.066181 1 0 0
+-0.410349 -0.371795 -0.137264 0 1 0
+0.261178 -0.0116347 0.371795 0 0 1
+0.0957195 0.371795 0.0876502 0 1 0
+0.5 -0.140862 -0.312241 1 0 0
+0.178649 0.294872 -0.0969728 0 1 0
+0.11348 -0.134578 -0.333333 0 0 1
+0.259665 0.203058 0.371795 0 0 1
+-0.399573 0.358406 0.320513 0 0 1
+0.221053 -0.371795 0.308623 0 1 0
+0.4279 0.294872 0.157977 0 1 0
+0.0699282 0.230897 -0.357027 0 1 0
+0.238932 -0.0374795 -0.133938 -0.227552 0.973597 0.0181195
+-0.180188 -0.255844 0.320513 -0.206524 -0.425161 0.881241
+-0.369995 -0.36436 0.320513 -0.120929 -0.15906 0.979835
+-0.0819782 0.371795 0.128695 0 1 0
+-0.224896 0.0393887 -0.0330409 0.016611 0.662686 0.748713
+0.47916 -0.0282828 0.320513 0 0 1
+0.353919 0.0625374 -0.371795 0 0 1
+0.198258 -0.371795 0.272488 0 1 0
+0.332102 0.0531691 -0.371795 0.00319904 0.000215585 0.999995
+-0.243334 -0.371795 -0.0563672 0 1 0
+-0.0175338 0.371795 0.164993 0 1 0
+-0.0446022 0.327181 -0.371795 0 0 1
+0.484353 0.294872 -0.153985 0 1 0
+-0.0114309 0.371795 -0.291328 0 1 0
+0.384423 0.000894732 0.350399 0.999913 0.0131818 0.000687628
+-0.257033 0.0346209 -0.0958531 -0.621734 0.78322 0.00363478
+-0.5 0.324738 -0.13358 1 0 0
+-0.353482 0.0139336 -0.371795 0 0 1
+0.309839 -0.192962 -0.334753 0.733962 -0.397047 0.551048
+0.38494 -0.178091 0.320513 0 0 1
+0.5 0.00444357 -0.00968254 1 0 0
+0.0529238 -0.294872 -0.153513 0 1 0
+0.200563 -0.371795 -0.244259 0 1 0
+0.272439 0.294872 -0.314675 0 1 0
+-0.448718 -0.304794 -0.0122636 1 0 0
+-0.5 -0.270608 0.162416 1 0 0
+0.483374 -0.169443 0.320513 0 0 1
+-0.010125 0.0328761 -0.333333 0 0 1
+0.199564 -0.371795 -0.314185 0 1 0
+0.141026 0.311835 -0.0918875 1 0 0
+-0.415601 -0.371795 0.140098 0 1 0
+0.141026 0.324438 0.177941 1 0 0
+-0.49672 0.371795 0.0168585 -0.532613 0.846294 -0.0104695
+0.0593465 -0.294872 -0.120695 0 1 0
+-0.00672014 0.169835 0.320513 0 0 1
+-0.329 -0.371795 0.234624 0 1 0
+0.5 0.217684 -0.0592691 1 0 0
+-0.095999 -0.230897 -0.370062 0.00983274 0.91422 -0.405099
+0.420109 -0.371795 -0.148943 0 1 0
+-0.134368 0.371795 -0.309125 0 1 0
+0.250465 -0.371795 -0.163725 0 1 0
+-0.340172 -0.37056 0.320513 -0.128613 0.766012 -0.629829
+0.17462 0.106718 0.366173 0.590682 0.519933 -0.617061
+0.448718 -0.298756 -0.0516374 0.884541 -0.464259 -0.0452977
+-0.139673 0.176512 -0.333333 0 0 1
+0.5 0.248247 0.183898 1 0 0
+-0.0793943 0.371795 0.06164 0 1 0
+0.141026 0.329888 0.26411 1 0 0
+-0.5 0.306756 -0.117027 1 0 0
+0.191981 -0.371795 -0.0316972 0 1 0
+-0.5 0.371127 0.288976 -0.594093 0.796354 0.113464
+-0.474336 0.371795 -0.0572509 0 1 0
+-0.215635 0.371795 -0.0651499 0 1 0
+-0.112413 0.371795 0.111232 0 1 0
+0.199221 -0.0217443 -0.121925 0.796871 0.603778 -0.0211913
+-0.5 0.202427 -0.252392 1 0 0
+-0.0643879 0.327024 -0.371795 0 0 1
+-0.0164455 0.0806097 0.320513 0 0 1
+-0.437655 0.371795 -0.277229 0 1 0
+-0.5 -0.255937 -0.139545 1 0 0
+0.0677043 0.0453721 -0.333333 0 0 1
+-0.243891 0.371795 -0.262597 0 1 0
+0.0368058 -0.230897 -0.343315 0 1 0
+0.5 -0.00826317 -0.157163 1 0 0
+0.5 -0.0422023 -0.253391 1 0 0
+-0.127662 -0.0590009 -0.333333 0 0 1
+0.5 0.0555893 -0.35611 1 0 0
+-0.069637 0.256282 0.34579 0 1 0
+-0.0451126 0.371795 -0.319237 0 1 0
+0.218774 -0.0297714 0.371795 0 0 1
+0.065721 0.349507 0.320513 0 0 1
+-0.00987826 0.366178 0.320513 0.0131648 0.333676 0.942596
+0.244689 0.294872 0.230823 0 1 0
+-0.193603 -0.067859 0.349051 0.94102 0.33831 -0.00535015
+-0.5 -0.163801 -0.0639446 1 0 0
+0.5 -0.104684 -0.214392 1 0 0
+0.192856 0.294872 0.0793364 0 1 0
+-0.47674 -0.294872 -0.148252 0 1 0
+-0.417093 -0.142138 0.320513 0 0 1
+0.238733 -0.304729 0.320513 0 0 1
+-0.111334 0.371795 -0.319968 0 1 0
+-0.198261 0.360101 -0.371795 0.00128634 -0.0116703 0.999931
+-0.363972 -0.249264 -0.371795 0 0 1
+-0.180845 0.0156603 0.320513 0 0 1
+-0.218091 0.27344 0.320513 0 0 1
+-0.395846 0.0175529 -0.371795 0 0 1
+-0.345042 -0.371795 -0.152051 0 1 0
+-0.274188 0.00196012 -0.191199 0.999109 -0.0420902 0.00320623
+-0.5 -0.0372281 -0.366982 0.880698 0.0162031 0.473402
+-0.5 -0.175918 -0.153821 1 0 0
+0.5 -0.268974 -0.318074 1 0 0
+0.5 0.123675 0.175664 1 0 0
+-0.5 -0.192168 0.22613 1 0 0
+-0.320513 0.132553 -0.370052 0.911519 0.0618895 -0.406573
+-0.245599 0.371795 0.205143 0 1 0
+0.161675 -0.371795 -0.0167478 0 1 0
+-0.445275 0.371795 0.183867 0 1 0
+-0.245909 -0.304249 -0.371795 0 0 1
+-0.205812 -0.321316 -0.371795 0 0 1
+-0.483381 0.0500254 0.320513 0 0 1
+-0.5 -0.128549 0.101278 1 0 0
+-0.133407 0.371795 0.225657 0 1 0
+-0.5 -0.202958 0.173224 1 0 0
+-0.110899 -0.172573 0.354444 0.533162 0.84579 0.0193959
+-0.5 0.337869 -0.0723551 1 0 0
+0.141109 -0.343519 -0.155322 1 0 0
+-0.424895 -0.371795 -0.190508 0 1 0
+-0.0496207 -0.294872 -0.157916 0 1 0
+0.262879 -0.124143 -0.333333 0 0 1
+0.307583 -0.320647 0.320513 0 0 1
+0.5 -0.0418811 -0.194888 1 0 0
+-0.406496 -0.371325 0.320513 -0.13255 0.892358 -0.431425
+-0.360131 0.371795 -0.11369 0 1 0
+0.141109 -0.322513 0.00469084 1 0 0
+-0.5 0.255103 -0.0363307 1 0 0
+-0.5 -0.173588 -0.00566847 1 0 0
+0.259324 0.294872 0.134553 0 1 0
+-0.141154 -0.312582 -0.0782102 1 0 0
+-0.179924 0.215155 -0.333333 0 0 1
+-0.0388229 0.27907 0.320513 0 0 1
+0.372017 -0.371795 -0.184074 0 1 0
+0.433752 0.26879 0.320513 0 0 1
+-0.0254446 -0.256282 0.334897 0 1 0
+0.287862 -0.357544 -0.371795 0 0 1
+-0.448718 -0.338963 -0.301249 1 0 0
+0.5 -0.238379 0.0939578 1 0 0
+-0.167811 0.254739 0.320513 -0.251742 0.524489 0.813349
+-0.175239 0.164348 0.371795 0 0 1
+0.373509 -0.371795 -0.297476 0 1 0
+-0.5 0.288998 -0.00799215 1 0 0
+0.5 0.164472 -0.271471 1 0 0
+0.461704 -0.294872 -0.0762553 0 1 0
+-0.0113987 -0.230897 -0.33628 -0.0530056 0.961719 -0.268864
+-0.260609 -0.0315712 -0.0400988 0.697566 0.687386 -0.202244
+0.245724 -0.0541182 -0.333333 0 0 1
+0.237376 -0.0378835 -0.0199811 -0.139171 0.990237 -0.00789757
+-0.0115199 -0.057485 0.320513 0 0 1
+-0.141154 -0.305356 0.188007 1 0 0
+0.146874 0.294872 0.223298 0.223839 0.968897 0.105525
+0.5 0.015812 -0.294906 1 0 0
+-0.321319 0.371795 -0.204007 0 1 0
+0.5 0.203008 0.280319 1 0 0
+-0.5 0.0608634 0.206065 1 0 0
+0.5 -0.0343787 0.0719703 1 0 0
+-0.5 0.238933 0.175454 1 0 0
+0.0399145 0.371795 -0.316473 0 1 0
+-0.0656594 0.371795 -0.328065 0 1 0
+-0.141154 -0.295448 0.0792609 -0.499238 0.866434 -0.007323
+-0.171065 -0.371795 0.0164992 0 1 0
+0.260204 -0.0247506 -0.169199 0.782616 -0.622423 -0.0100793
+0.38417 0.294872 -0.322332 0 1 0
+-0.152484 -0.118171 0.320513 0 0 1
+0.187537 0.194841 0.371795 0 0 1
+0.5 0.269973 0.198066 1 0 0
+0.5 -0.177867 -0.366049 0.90715 -0.187803 -0.376576
+0.5 -0.00766534 -0.0275709 1 0 0
+-0.363413 0.371795 -0.239327 0 1 0
+0.39229 -0.371795 0.302257 0 1 0
+0.26204 0.236298 -0.371795 0.00869817 0.148553 0.988866
+-0.494986 -0.294872 0.189364 0.292384 0.938462 -0.183852
+0.5 0.0226368 0.269453 1 0 0
+0.5 0.178728 0.0119345 1 0 0
+-0.5 -0.222566 -0.313781 1 0 0
+-0.248664 -0.0505974 0.371795 0 0 1
+-0.5 -0.248778 -0.018787 1 0 0
+0.287229 0.164359 0.371795 0 0 1
+0.0119884 -0.294872 0.123347 0 1 0
+0.437364 0.294872 0.0188375 0 1 0
+0.364154 0.294872 0.11624 0 1 0
+0.297086 -0.371795 -0.0892537 0 1 0
+-0.0333322 0.371795 -0.249337 0 1 0
+-0.336307 -0.371795 -0.137449 0 1 0
+0.270613 0.294872 -0.247802 0 1 0
+-0.141154 -0.356434 0.215736 1 0 0
+0.0331375 0.371795 -0.176745 0 1 0
+0.417543 -0.371795 -0.123981 0 1 0
+0.141026 0.34724 -0.0212717 1 0 0
+0.193532 -0.238156 0.371795 -0.00519321 -0.0950883 0.995455
+0.5 -0.146807 -0.192726 1 0 0
+0.141557 -0.371795 -0.272313 0.778333 0.627218 0.0281853
+0.0759058 0.0313631 0.320513 0 0 1
+-0.310786 -0.178933 0.332377 0.707107 0.707107 0
+0.303454 0.186265 0.332675 0.707107 0.707107 0
+-0.171268 -0.0970823 -0.333333 0 0 1
+0.34231 0.0845265 -0.371795 0 0 1
+0.073681 -0.161797 -0.333333 0 0 1
+0.2166 0.239861 0.363355 0.363213 0.905386 0.219891
+0.159282 -0.371795 -0.303311 0 1 0
+-0.456568 -0.237965 -0.371795 0 0 1
+-0.11783 0.256282 0.368031 0.104049 0.930796 0.350417
+0.311 -0.0185082 0.371795 0 0 1
+0.0280149 -0.294872 0.286095 0 1 0
+-0.278973 0.371795 -0.117833 0 1 0
+0.355411 -0.371795 -0.0810592 0 1 0
+-0.5 0.16504 -0.152481 1 0 0
+-0.0795199 -0.0170939 -0.333333 0 0 1
+-0.141154 -0.350313 0.21466 1 0 0
+-0.5 0.0172177 0.0815923 1 0 0
+-0.112713 0.371795 -0.0316264 0 1 0
+-0.182428 0.371795 -0.234381 0 1 0
+0.0314067 0.371795 -0.334568 0 1 0
+0.439389 0.294872 -0.0519171 0 1 0
+0.5 0.225901 0.188579 1 0 0
+0.5 -0.280823 -0.112598 1 0 0
+-0.5 0.0936997 -0.143198 1 0 0
+-0.0361644 -0.196001 -0.333333 0 0 1
+0.438076 0.0712402 0.320513 0 0 1
+0.23132 0.0384133 -0.0731611 0.036958 0.99925 -0.0115508
+-0.27186 -0.0144229 -0.285933 0.939215 0.343318 0.0029136
+0.223667 -0.351904 -0.371795 0 0 1
+0.357669 -0.154919 -0.371795 0 0 1
+-0.5 -0.05352 -0.0843868 1 0 0
+0.147742 0.294872 0.308611 0.222675 0.97477 0.0154548
+-0.35343 -0.23578 0.320513 0 0 1
+-0.0766353 0.085809 0.320513 0 0 1
+0.5 -0.148497 0.178963 1 0 0
+-0.368975 0.128052 -0.371795 0 0 1
+-0.398953 -0.221179 0.320513 0 0 1
+0.20142 0.179184 -0.333333 0 0 1
+0.206912 -0.0300693 -0.255071 0.623084 0.782027 -0.014139
+0.5 0.212936 0.204777 1 0 0
+-0.090916 0.371795 -0.161116 0 1 0
+-0.279633 -0.371795 -0.210266 0 1 0
+0.336065 0.294872 0.31912 0.0249633 0.591134 0.806187
+0.0718443 0.371795 -0.0574393 0 1 0
+-0.5 -0.0589577 -0.187434 1 0 0
+0.326852 0.294872 -0.0705029 0 1 0
+-0.122276 -0.294872 0.166149 0 1 0
+-0.5 0.29293 -0.0117004 1 0 0
+0.114269 -0.294872 0.274117 0 1 0
+0.141026 0.360932 0.300718 1 0 0
+-0.020694 -0.230897 -0.3376 0.132039 0.964903 -0.226997
+-0.000517373 -0.230897 -0.344039 0 1 0
+-0.39608 0.371795 -0.315994 0 1 0
+0.367282 -0.297822 -0.371795 0 0 1
+-0.172723 0.00674075 0.320513 0 0 1
+0.280052 -0.100398 0.371795 0 0 1
+0.365648 -0.371795 -0.327177 0 1 0
+-0.255177 -0.371795 -0.246023 0 1 0
+0.412434 0.294872 -0.216205 0 1 0
+-0.431112 0.369858 -0.371795 -0.0337147 -0.533315 0.845245
+0.213247 -0.0341054 -0.01692 0.454733 0.890583 0.00894498
+0.0783743 -0.212817 0.371795 0 0 1
+0.272025 -0.294978 0.320513 0 0 1
+0.301682 0.100181 0.371795 0 0 1
+0.301536 0.213169 0.320513 0 0 1
+-0.444382 0.278125 0.320513 0 0 1
+0.5 -0.181302 -0.0716968 1 0 0
+0.367003 -0.287386 -0.371795 0 0 1
+-0.17194 -0.371795 0.155604 0 1 0
+-0.5 0.309194 0.114775 1 0 0
+-0.25947 -0.371795 0.282285 0 1 0
+-0.16304 -0.371795 -0.17608 0 1 0
+-0.147655 0.32765 -0.371795 0 0 1
+-0.5 -0.262292 -0.33729 1 0 0
+-0.267129 0.234494 -0.371795 -0.120549 0.533222 0.837343
+-0.476228 -0.294872 -0.110312 0 1 0
+0.0102023 0.371795 -0.0442127 0 1 0
+-0.262697 0.217817 0.334802 -0.517788 0.855509 0
+0.455456 -0.294872 -0.175865 -0.0494748 0.99858 -0.0197689
+-0.5 -0.204842 0.260392 1 0 0
+0.448718 -0.353337 0.304181 1 0 0
+-0.493657 0.371795 0.0627721 -0.249924 0.965274 0.0760473
+0.227741 -0.187687 0.371795 0 0 1
+0.141026 0.348194 0.290385 1 0 0
+-0.118187 -0.294872 -0.0923931 0 1 0
+0.0279237 -0.230897 -0.363749 -0.0116556 0.996648 -0.0809749
+-0.390696 -0.276898 0.320513 0 0 1
+0.5 -0.184216 -0.105919 1 0 0
+-0.227218 0.371795 -0.0289267 0 1 0
+0.167279 0.117954 0.326337 0.749898 0.631644 -0.196669
+-0.181895 -0.371795 -0.00216596 0 1 0
+-0.5 -0.236904 0.140286 1 0 0
+0.310221 0.294872 0.0308142 0 1 0
+-0.141154 -0.311799 -0.0413777 1 0 0
+-0.5 0.122464 -0.321178 1 0 0
+0.192525 -0.0024862 -0.0561483 0.999247 0.0388008 -0.000352674
+0.5 0.0176452 0.262269 1 0 0
+0.320513 -0.0308844 -0.363426 0.990876 0.0193344 0.133385
+0.120304 0.371795 -0.160577 0 1 0
+0.351136 -0.371795 0.170512 0 1 0
+0.5 -0.152459 -0.0624431 1 0 0
+-0.260553 0.164626 -0.333333 0 0 1
+0.5 -0.1966 0.206745 1 0 0
+0.208847 0.294872 0.175002 0 1 0
+-0.319186 -0.371795 0.197553 0 1 0
+-0.0233056 -0.294872 -0.135784 0 1 0
+-0.5 0.0874979 0.129873 1 0 0
+-0.136153 -0.211587 -0.333333 0 0 1
+0.5 -0.239326 -0.151819 1 0 0
+0.0117348 0.208421 -0.333333 0 0 1
+-0.031896 0.371795 -0.225618 0 1 0
+-0.200292 0.0423321 0.333382 0.971024 -0.238981 0
+-0.5 0.157876 0.272496 1 0 0
+0.5 -0.20899 0.0135515 1 0 0
+0.24669 -0.371795 -0.0351868 0 1 0
+0.245699 -0.371795 -0.206185 0 1 0
+-0.303708 0.318922 0.320513 0 0 1
+0.448718 -0.320198 0.069498 1 0 0
+0.0824651 0.371795 -0.331306 0 1 0
+0.26151 -0.371795 -0.0506123 0 1 0
+-0.448718 -0.332837 0.297642 1 0 0
+-0.486056 -0.244076 0.320513 0 0 1
+-0.354103 -0.0123835 0.371795 0 0 1
+0.16734 -0.24628 -0.371795 0 0 1
+0.0434764 -0.294872 0.102068 0 1 0
+-0.120335 -0.256282 0.342061 0 1 0
+-0.363401 0.36468 -0.371795 0.00788719 -0.151062 0.988493
+-0.148293 -0.371795 0.229712 -0.246689 0.968937 -0.0174868
+-0.226807 0.0431116 0.371795 0 0 1
+-0.5 0.272591 0.0399161 1 0 0
+-0.5 -0.271038 -0.248408 1 0 0
+0.0685963 -0.294872 0.223941 0 1 0
+0.42068 -0.309086 0.320513 0 0 1
+0.0147172 0.10332 0.320513 0 0 1
+0.141109 -0.345595 0.224402 1 0 0
+0.5 -0.199419 -0.142268 1 0 0
+-0.485325 0.285716 -0.371795 0 0 1
+0.5 0.247358 0.132498 1 0 0
+0.5 0.238624 0.255066 1 0 0
+-0.390077 0.371795 -0.0497044 0 1 0
+0.227515 0.0381768 -0.133904 -0.0874505 0.996089 -0.0125848
+0.5 0.25584 -0.358617 1 0 0
+0.155379 -0.254338 0.328985 -0.0855611 0.995024 -0.0510463
+-0.448718 -0.306249 -0.252528 1 0 0
+0.319382 0.166902 -0.344171 0.987128 0.159726 0.00814104
+0.249721 0.144989 -0.333333 0 0 1
+0.188446 0.253004 0.320513 0.108695 0.17139 0.979189
+-0.195369 -0.371795 0.279352 0 1 0
+0.141026 0.338466 0.22439 1 0 0
+0.251944 -0.371795 -0.367238 -0.0352641 0.991509 0.125166
+-0.5 -0.179565 -0.320358 1 0 0
+0.380466 0.294872 -0.347784 0 1 0
+0.281029 0.294872 -0.202284 0 1 0
+0.141109 -0.350827 -0.107321 1 0 0
+-0.168308 0.0910658 -0.333333 0 0 1
+0.5 -0.0676403 0.0814761 1 0 0
+-0.5 0.16689 0.0995462 1 0 0
+-0.000598002 -0.256282 0.321122 0.0114555 -0.502712 0.864378
+-0.5 0.351411 -0.356578 1 0 0
+0.5 -0.0508678 0.029848 1 0 0
+-0.144632 0.0465564 0.320513 0 0 1
+-0.172712 -0.371795 -0.223153 0 1 0
+0.422877 -0.371795 -0.0218253 0 1 0
+0.0136537 -0.10663 -0.333333 0 0 1
+0.5 0.263401 -0.318857 1 0 0
+-0.5 -0.253188 -0.152696 1 0 0
+0.0150849 0.0698222 0.320513 0 0 1
+-0.0938389 0.230897 -0.336477 -0.0488363 0.776298 0.628472
+-0.309959 0.371795 0.00537815 0 1 0
+0.5 -0.203203 0.31153 0.990582 -0.00406504 0.136858
+0.0646919 0.371795 -0.15644 0 1 0
+0.5 0.0197072 -0.315348 1 0 0
+-0.129314 -0.230897 -0.358602 0 1 0
+0.157376 0.21422 -0.333333 0 0 1
+0.0170603 0.371795 0.295161 0 1 0
+0.238295 0.294872 0.18764 0 1 0
+0.0903307 -0.294872 0.298862 0 1 0
+0.22835 -0.117311 0.371795 0 0 1
+-0.5 -0.245832 -0.36973 0.839058 0.196148 0.507452
+0.0807878 0.0760672 0.320513 0 0 1
+-0.5 0.0122103 -0.141299 1 0 0
+0.103032 -0.0770145 0.320513 0 0 1
+0.133245 -0.230897 -0.362797 -0.00204085 0.998899 -0.0468665
+0.169811 0.193114 -0.333333 0 0 1
+0.0693667 -0.294872 0.021995 0 1 0
+-0.5 0.269111 -0.216623 1 0 0
+0.16218 -0.312318 0.320513 0 0 1
+0.290447 -0.090442 -0.333333 0 0 1
+0.389216 -0.371795 -0.298448 0 1 0
+0.249426 0.187916 0.371795 0 0 1
+0.163604 -0.36803 -0.371795 0.0182863 0.659281 0.751674
+0.449228 0.147341 -0.371795 0 0 1
+-0.448718 -0.345649 -0.0355356 1 0 0
+-0.42348 -0.335831 -0.371795 0 0 1
+0.215719 0.294872 0.289271 0 1 0
+0.5 -0.265774 0.244322 1 0 0
+-0.207633 -0.304162 -0.371795 0 0 1
+-0.156128 -0.371795 -0.189971 0 1 0
+0.119407 -0.294872 0.0503312 0 1 0
+-0.5 0.0364027 -0.0593495 1 0 0
+-0.0235276 0.0456043 0.320513 0 0 1
+-0.273574 0.187785 -0.333333 0 0 1
+0.160995 -0.371795 0.0559929 0 1 0
+-0.38441 0.371795 -0.0713343 0 1 0
+-0.107849 0.371795 0.268792 0 1 0
+0.302365 -0.371795 -0.283111 0 1 0
+0.296018 -0.177434 -0.333333 0 0 1
+-0.481355 0.0881157 0.320513 0 0 1
+-0.5 -0.248905 -0.289641 1 0 0
+0.391172 -0.371795 0.0276639 0 1 0
+-0.108164 0.147299 -0.333333 0 0 1
+0.258313 -0.220212 0.353489 -0.479229 0.87769 0
+-0.201394 -0.14751 0.371795 0 0 1
+-0.141154 -0.310086 0.0677691 1 0 0
+-0.467407 -0.230416 0.320513 0 0 1
+0.5 0.15615 -0.128098 1 0 0
+0.299812 -0.00537992 0.371795 0 0 1
+-0.5 -0.258693 0.167229 1 0 0
+0.168863 0.294872 -0.23674 0 1 0
+0.154016 -0.230897 -0.341095 -0.0377322 0.985811 -0.163561
+-0.386109 -0.371795 -0.298327 0 1 0
+0.276189 0.031951 0.371795 0 0 1
+0.154914 0.133742 0.336822 0.735723 0.677282 0
+0.256239 0.294872 -0.204042 0 1 0
+-0.5 0.0303313 0.0684892 1 0 0
+-0.141154 -0.332142 -0.0228135 1 0 0
+-0.396118 0.371795 -0.0104466 0 1 0
+0.435013 0.186316 0.320513 0 0 1
+0.5 -0.0694206 -0.278438 1 0 0
+-0.0680962 -0.294872 0.200524 0 1 0
+0.141026 0.304361 -0.166165 0.999957 0.00792606 -0.00473534
+0.5 0.248929 0.118123 1 0 0
+-0.232263 0.273653 -0.371795 0 0 1
+-0.0750627 0.371795 0.192472 0 1 0
+-0.211412 -0.109772 0.371795 0 0 1
+0.487052 0.0278627 -0.371795 0 0 1
+0.216788 -0.118556 -0.333333 0 0 1
+-0.256715 -0.128775 0.371795 0 0 1
+0.106168 0.371795 0.160582 0 1 0
+0.170369 0.294872 0.219183 0 1 0
+0.5 0.000652165 -0.232036 1 0 0
+-0.254952 -0.340009 0.320513 0 0 1
+-0.5 -0.179593 -0.245554 1 0 0
+0.0810765 -0.27097 0.320513 0 0 1
+-0.5 -0.0538527 -0.203712 1 0 0
+0.181165 -0.204675 0.371795 0 0 1
+-0.272211 -0.0131143 -0.230512 0.953646 0.30082 -0.00817646
+-0.5 0.00017067 0.203612 1 0 0
+-0.356758 -0.371795 -0.248375 0 1 0
+-0.332987 -0.371795 0.150561 0 1 0
+-0.5 0.0307012 -0.0581513 1 0 0
+0.0670006 0.0415216 0.320513 0 0 1
+0.5 0.149455 -0.246877 1 0 0
+-0.383177 0.0761212 -0.371795 0 0 1
+0.0819235 0.371795 -0.048867 0 1 0
+-0.286047 0.363847 0.320513 0.139453 0.240832 0.960496
+-0.103886 0.148786 0.320513 0 0 1
+0.0597899 -0.294872 -0.143741 0 1 0
+-0.0447613 0.371795 -0.086603 0 1 0
+0.407854 0.098626 -0.371795 0 0 1
+-0.252559 0.028004 -0.0304393 -0.310073 0.440309 0.842605
+-0.5 -0.145844 -0.135521 1 0 0
+0.0108556 -0.294872 0.0437865 0 1 0
+0.440396 0.276319 -0.371795 0 0 1
+-0.269706 -0.0192494 -0.0598505 0.894812 0.446444 0
+-0.335158 0.371795 0.0317774 0 1 0
+-0.5 0.30597 -0.270972 1 0 0
+0.0117152 -0.294872 -0.263965 0 1 0
+0.152641 0.294872 0.239577 0 1 0
+-0.487477 0.0710512 -0.371795 0 0 1
+-0.141154 -0.307742 -0.346686 0.999337 -0.0350904 0.00967703
+0.141026 0.302129 0.0767459 0.998827 0.0450444 -0.0177405
+0.397307 0.294872 -0.23756 0 1 0
+-0.146429 0.371795 0.0364 0 1 0
+-0.218444 0.109595 0.371795 0 0 1
+-0.108307 0.371795 0.0822928 0 1 0
+0.435117 -0.262723 0.320513 0 0 1
+-0.25869 0.282349 0.320513 0 0 1
+-0.42171 -0.00713897 0.320513 0 0 1
+0.448718 -0.318376 -0.339619 1 0 0
+-0.302318 0.371795 -0.235604 0 1 0
+0.202617 -0.0364504 -0.333333 -0.00618261 -0.0120215 0.999909
+-0.33646 0.371795 0.150753 0 1 0
+-0.448718 -0.339998 -0.348609 1 0 0
+0.128089 0.371795 0.210397 0 1 0
+-0.120087 0.0834132 -0.333333 0 0 1
+0.247729 -0.371795 -0.253531 0 1 0
+0.017429 -0.294872 -0.065782 0 1 0
+0.385974 -0.371795 0.173803 0 1 0
+-0.5 -0.136012 0.0405468 1 0 0
+0.5 0.188682 0.278245 1 0 0
+0.141109 -0.369207 -0.352343 0.760911 0.648665 0.0157438
+0.426313 -0.078766 -0.371795 0 0 1
+0.431836 0.133134 0.320513 0 0 1
+0.26378 0.0608584 -0.333333 0 0 1
+-0.313795 -0.253504 -0.371795 0 0 1
+-0.141154 -0.344921 -0.0949674 1 0 0
+-0.422889 -0.330957 0.320513 0 0 1
+-0.114495 0.371795 -0.00822158 0 1 0
+-0.5 0.148435 -0.0557184 1 0 0
+0.172271 -0.371795 0.0630766 0 1 0
+-0.5 0.0933927 0.254971 1 0 0
+-0.5 0.170274 -0.266986 1 0 0
+-0.242761 -0.371795 -0.356393 0 1 0
+0.230386 -0.212968 -0.333333 0 0 1
+-0.446279 -0.371795 -0.0372551 0.336474 0.941693 0
+-0.252429 0.182553 -0.333333 0 0 1
+-0.0836889 0.371795 -0.261184 0 1 0
+-0.5 -0.213738 -0.234878 1 0 0
+0.0967636 0.317817 -0.371795 0 0 1
+-0.5 0.350789 -0.044583 1 0 0
+0.237418 0.0378798 -0.178045 0.207396 0.978215 0.00901824
+0.5 -0.214955 -0.026689 1 0 0
+-0.288593 0.0155249 -0.333333 0 0 1
+-0.262461 0.0866875 0.371795 0 0 1
+-0.320513 -0.134573 -0.367966 0.991405 -0.0172962 -0.129677
+-0.5 -0.248769 -0.141239 1 0 0
+-0.448718 -0.33177 0.301166 1 0 0
+0.254769 -0.0318803 0.371795 0 0 1
+-0.25335 0.371795 0.142152 0 1 0
+0.255944 -0.195745 -0.333333 0 0 1
+0.00749906 0.317001 -0.371795 0 0 1
+-0.5 0.16205 -0.285102 1 0 0
+-0.364873 -0.303418 0.320513 0 0 1
+-0.5 0.276291 0.149792 1 0 0
+-0.5 -0.0435109 -0.0818636 1 0 0
+-0.443849 0.371795 -0.0294097 0 1 0
+-0.289886 -0.333828 -0.371795 0 0 1
+0.5 0.0415296 -0.106099 1 0 0
+-0.281136 0.371795 -0.0785998 0 1 0
+0.118304 0.371795 0.294838 0 1 0
+-0.184079 0.17523 -0.333333 0 0 1
+0.398914 0.166798 -0.371795 0 0 1
+0.459213 0.197324 -0.371795 0 0 1
+0.320513 -0.0522661 -0.354017 1 0 0
+-0.0833167 0.204011 0.371795 0 0 1
+-0.144784 -0.371795 -0.295162 -0.496136 0.847621 -0.188115
+0.5 -0.121692 0.0540948 1 0 0
+0.487491 -0.294872 0.229936 0 1 0
+-0.019259 -0.00136857 -0.333333 0 0 1
+0.480486 0.273298 -0.371795 0 0 1
+-0.327514 -0.160317 0.36287 0.780725 0.623299 -0.0443466
+-0.126099 0.209463 -0.333333 0 0 1
+-0.351067 0.0252175 0.371795 0 0 1
+-0.22267 0.159015 -0.333333 0 0 1
+-0.0563662 0.366608 0.320513 -0.0738483 0.273747 0.958963
+0.050392 0.284777 0.320513 0 0 1
+-0.272439 -0.328813 0.320513 0 0 1
+-0.391607 -0.371795 0.0252779 0 1 0
+-0.448718 -0.296592 -0.00611178 0.841839 0.526418 0.119128
+-0.5 -0.289225 -0.0553594 0.987312 0.132226 0.0879291
+-0.5 0.314308 -0.280055 1 0 0
+-0.411393 0.371795 0.0654272 0 1 0
+-0.027875 0.371795 0.0493446 0 1 0
+0.455575 -0.231199 -0.371795 0 0 1
+0.108834 -0.294872 -0.280105 0 1 0
+-0.0691819 0.0054054 -0.333333 0 0 1
+0.5 0.0931605 0.163195 1 0 0
+-0.5 -0.0995579 0.252482 1 0 0
+-0.251545 -0.0382249 -0.144505 0.507547 0.861551 0.0112312
+-0.471276 0.371795 -0.077143 0 1 0
+-0.5 0.359917 -0.0131457 0.999787 -0.0201396 0.00454967
+0.478089 -0.221453 -0.371795 0 0 1
+-0.419823 -0.371795 -0.201875 0 1 0
+-0.413473 -0.371795 -0.2003 0 1 0
+0.5 0.178423 -0.244347 1 0 0
+0.311496 0.0593731 -0.333333 0.0311041 -0.0379629 0.998795
+-0.468745 0.223504 0.320513 0 0 1
+0.5 -0.0118003 -0.0407245 1 0 0
+0.0386039 -0.294872 -0.276389 0 1 0
+-0.5 0.00167847 0.241851 1 0 0
+0.120426 -0.294872 0.292974 0 1 0
+0.351163 -0.0126305 -0.371795 0 0 1
+0.0383149 0.256282 0.332596 -0.0145311 0.993976 0.108629
+-0.156106 0.0474179 -0.333333 0 0 1
+0.258013 -0.169852 0.371795 0 0 1
+-0.0164657 0.204555 0.335604 -0.0681255 0.997677 0
+-0.4156 0.0989934 0.320513 0 0 1
+0.200732 -0.371795 -0.34908 0 1 0
+-0.0508635 0.143773 -0.333333 0 0 1
+-0.5 0.269055 0.0900564 1 0 0
+-0.00340576 -0.0770359 0.320513 0 0 1
+-0.448443 -0.371795 -0.245952 0.698069 0.696781 -0.164913
+-0.018325 0.258701 0.320513 -0.00612585 0.213351 0.976956
+0.124399 0.371795 -0.0610034 0 1 0
+-0.5 -0.0558492 -0.212342 1 0 0
+-0.198756 0.0483974 0.359797 0.969395 -0.245508 0
+0.430706 -0.371795 0.0904867 0 1 0
+0.123576 -0.294872 0.0364656 0 1 0
+0.5 0.0131734 0.151967 1 0 0
+-0.448718 -0.369681 -0.341646 0.81999 0.570068 0.051371
+-0.400021 -0.371795 0.0844808 0 1 0
+0.494197 0.294872 -0.0309988 0.30734 0.950843 -0.0379517
+-0.428313 -0.371795 0.0197856 0 1 0
+0.0306455 0.312636 0.320513 0 0 1
+0.192251 0.294872 0.114635 0 1 0
+-0.215261 0.0406813 -0.314226 0.313363 0.949513 -0.0151435
+-0.5 0.123967 0.206824 1 0 0
+-0.5 0.0832155 0.2077 1 0 0
+0.5 -0.157351 0.258146 1 0 0
+0.141109 -0.298738 0.10947 0.956467 0.291667 -0.0100842
+0.141109 -0.369728 -0.331848 0.877162 0.478307 -0.0425292
+0.294332 0.294872 -0.154271 0 1 0
+0.5 -0.2292 -0.0861978 1 0 0
+-0.370511 -0.271187 -0.371795 0 0 1
+-0.227878 -0.371795 0.0274177 0 1 0
+-0.5 -0.0254679 0.140854 1 0 0
+0.102599 -0.220087 -0.333333 0.0115772 -0.142745 0.989692
+-0.385497 0.371795 -0.296743 0 1 0
+-0.412692 -0.371795 0.0597235 0 1 0
+0.205952 -0.371795 -0.327297 0 1 0
+0.496345 -0.294872 -0.0731391 -0.118171 0.992974 0.00620715
+-0.41807 0.336214 -0.371795 0 0 1
+0.409206 0.00143163 0.320513 0 0 1
+-0.361778 -0.257934 0.320513 0 0 1
+-0.107203 0.371795 0.133222 0 1 0
+0.448718 -0.327038 -0.0289979 1 0 0
+0.5 -0.263049 -0.295968 1 0 0
+0.5 0.246964 -0.116779 1 0 0
+-0.256682 0.371795 -0.179011 0 1 0
+0.0666541 0.371795 0.208571 0 1 0
+-0.443673 0.371795 0.317575 0.0745473 0.909152 0.409738
+-0.43092 0.371795 0.221152 0 1 0
+-0.141154 -0.345352 -0.324765 1 0 0
+0.104355 -0.148393 -0.333333 0 0 1
+0.141109 -0.312259 0.0310257 1 0 0
+-0.337101 -0.287674 -0.371795 0 0 1
+-0.193067 0.0690814 0.3282 0.912271 -0.385992 0.13701
+0.250217 0.184943 0.371795 0 0 1
+0.0230925 -0.294872 0.163024 0 1 0
+-0.279993 -0.371795 -0.0900512 0 1 0
+0.12839 0.371795 -0.299278 0 1 0
+-0.5 -0.260053 0.0297359 1 0 0
+-0.5 -0.177074 -0.309937 1 0 0
+-0.328506 -0.158991 0.331442 0.800549 0.599267 0
+-0.5 -0.100204 -0.220318 1 0 0
+-0.293263 -0.16861 0.371795 0 0 1
+0.348626 -0.156789 0.320513 0 0 1
+0.0845209 0.371795 0.253642 0 1 0
+-0.0357136 -0.294872 -0.0712742 0 1 0
+-0.484993 0.371795 0.00508232 0 1 0
+0.254108 0.294872 0.109776 0 1 0
+0.310831 0.178888 0.365609 0.589555 0.743416 0.315844
+0.141109 -0.33059 0.137833 1 0 0
+-0.45647 0.0617902 -0.371795 0 0 1
+0.127225 -0.160189 0.339 -0.614237 0.789122 0
+-0.0503568 -0.294872 0.319867 0.0929402 -0.709328 0.698724
+-0.438932 -0.213812 -0.371795 0 0 1
+0.5 -0.0662666 0.161714 1 0 0
+-0.141154 -0.360704 -0.0370177 1 0 0
+-0.468084 -0.0443472 0.320513 0 0 1
+0.210298 0.250638 0.320513 0.040466 0.179013 0.983014
+-0.31206 -0.291949 0.320513 0 0 1
+0.281976 0.294872 -0.103563 0 1 0
+0.370515 -0.371795 0.0357612 0 1 0
+-0.350409 0.0735342 -0.371795 0 0 1
+0.0635453 0.15808 -0.333333 0 0 1
+0.484303 -0.294872 0.180189 0 1 0
+-0.488557 0.371795 -0.304252 0 1 0
+-0.5 -0.07333 -0.246871 1 0 0
+0.19069 0.294872 -0.123984 0 1 0
+-0.5 0.270291 -0.164734 1 0 0
+-0.141154 -0.345576 0.154086 1 0 0
+-0.423286 0.371795 0.128902 0 1 0
+-0.5 -0.100402 -0.0773968 1 0 0
+0.5 -0.0303564 -0.222059 1 0 0
+-0.0474826 0.263042 0.320513 0.00162548 0.261179 0.965289
+-0.5 -0.13187 -0.0149717 1 0 0
+0.411251 0.290363 0.320513 0.040323 0.205833 0.977756
+0.287469 -0.249621 -0.371795 0 0 1
+0.5 0.108373 -0.292863 1 0 0
+-0.448718 -0.366777 0.0465532 0.954135 0.291578 0.0678948
+0.403746 -0.371795 -0.0840977 0 1 0
+-0.362791 0.00469585 -0.371795 0 0 1
+-0.448718 -0.319929 0.0260959 1 0 0
+0.10479 0.230897 -0.344942 0 1 0
+-0.0199849 -0.294872 0.0879996 0 1 0
+0.448718 -0.343865 0.0307633 1 0 0
+0.26093 -0.371795 -0.307793 0 1 0
+-0.097451 -0.294872 -0.303298 0 1 0
+0.198555 -0.0491924 0.325517 0.935491 -0.21815 -0.277971
+0.061113 -0.1561 0.320513 0 0 1
+-0.217208 -0.130914 0.371795 0 0 1
+-0.321999 -0.162452 0.371795 -0.467238 -0.117186 0.876331
+-0.229009 0.0434358 -0.286086 0.0422764 0.999101 0.00313279
+0.436312 -0.371795 0.221933 0 1 0
+0.141026 0.306419 -0.245867 1 0 0
+0.084018 -0.294872 -0.252916 0 1 0
+-0.5 0.327595 -0.164062 1 0 0
+0.5 -0.292882 -0.0836968 0.836042 -0.546456 0.0491838
+0.494057 0.294872 -0.288153 0.272375 0.96083 -0.0511566
+-0.398735 0.254142 0.320513 0 0 1
+0.479858 -0.294872 -0.176121 0 1 0
+0.5 0.214582 0.0434861 1 0 0
+0.5 -0.1945 0.0310756 1 0 0
+-0.0682979 0.025634 -0.333333 0 0 1
+0.169626 0.270174 -0.371795 0 0 1
+0.389703 -0.371795 -0.319219 0 1 0
+0.273482 -0.125336 0.371795 0 0 1
+-0.379268 -0.273963 -0.371795 0 0 1
+0.46249 -0.237003 0.320513 0 0 1
+0.468934 -0.294872 0.0288856 0 1 0
+-0.5 0.189759 -0.318156 1 0 0
+0.5 0.182617 0.148028 1 0 0
+-0.5 0.0947077 0.315318 0.975748 -0.0208651 -0.217899
+0.177327 0.294872 0.148088 0 1 0
+0.448718 -0.296438 0.0797673 -0.612757 0.787816 0.0622411
+-0.5 0.229511 -0.269475 1 0 0
+0.1386 0.00685704 -0.333333 0 0 1
+0.124692 -0.294872 -0.0298143 0 1 0
+0.5 -0.228253 0.160979 1 0 0
+0.359151 0.294872 0.172922 0 1 0
+-0.5 0.24979 0.160166 1 0 0
+-0.218411 -0.371795 -0.299354 0 1 0
+-0.5 0.0182461 -0.00321186 1 0 0
+-0.5 0.287842 0.100724 1 0 0
+0.0306686 -0.294872 -0.108292 0 1 0
+-0.5 -0.165711 -0.0313937 1 0 0
+-0.43721 -0.0304603 -0.371795 0 0 1
+-0.436252 -0.371795 0.297246 0 1 0
+-0.5 -0.0718434 0.174262 1 0 0
+0.152549 0.294872 -0.232702 0 1 0
+-0.339971 0.371795 0.0991314 0 1 0
+-0.0677513 0.371795 -0.217641 0 1 0
+-0.273351 0.00886005 -0.253298 0.965892 -0.258942 -0.00160241
+0.267595 0.0106028 -0.125208 0.962179 0.272418 0
+-0.5 -0.0185099 -0.0928699 1 0 0
+-0.448718 -0.3532 -0.328307 1 0 0
+0.5 -0.0622579 -0.201426 1 0 0
+0.357595 0.294872 -0.0684168 0 1 0
+-0.12823 -0.294872 0.101481 0 1 0
+0.498065 0.0532491 0.320513 0.373959 0.0361548 0.92674
+0.0624919 0.054329 0.320513 0 0 1
+0.448718 -0.318295 -0.37157 0.789793 -0.2463 -0.561751
+-0.5 0.0593638 0.00580301 1 0 0
+0.429421 0.294872 -0.125267 0 1 0
+-0.0254392 0.0329454 -0.333333 0 0 1
+0.39967 -0.371795 -0.268527 0 1 0
+-0.167469 -0.371795 0.214041 0 1 0
+0.5 -0.0315634 0.0489883 1 0 0
+-0.349905 0.133231 -0.371795 0 0 1
+0.228664 0.294872 0.129319 0 1 0
+0.253726 0.0306999 -0.00848261 0.591315 0.805991 0.0269156
+0.221731 0.213325 -0.333333 0 0 1
+-0.314289 -0.356393 0.320513 0 0 1
+0.307927 -0.371795 -0.33231 0 1 0
+0.198862 0.294872 -0.134222 0 1 0
+-0.197762 0.230897 -0.361887 -0.0158282 0.998346 0.0552628
+-0.5 0.207809 -0.0554974 1 0 0
+0.5 -0.185058 0.158741 1 0 0
+-0.5 0.0813244 0.29749 1 0 0
+0.141109 -0.301119 -0.307239 0.968834 0.2355 -0.0768122
+-0.388646 -0.0201572 0.320513 -0.391792 -0.0514978 0.918611
+-0.246795 0.04044 -0.14508 -0.357666 0.933672 -0.0182294
+0.388222 -0.204724 0.320513 0 0 1
+0.5 0.0978788 0.309907 0.999491 0.00794683 0.0309047
+0.160509 0.0732669 0.320513 0 0 1
+-0.070079 -0.294872 -0.326708 0 1 0
+-0.467518 0.371795 0.0204265 0 1 0
+0.354657 0.0879707 -0.371795 0 0 1
+-0.0229075 0.371795 -0.28923 0 1 0
+-0.448718 -0.301152 -0.313092 0.999261 0.0327493 -0.0201241
+-0.413314 0.371795 -0.214037 0 1 0
+0.193149 0.00763951 -0.317392 0.971249 -0.238067 0
+-0.423117 0.308132 0.320513 0 0 1
+-0.447803 -0.29246 -0.371795 0.177358 0.324012 0.92928
+0.0868577 -0.0641596 0.320513 0 0 1
+-0.448718 -0.341716 -0.15656 1 0 0
+0.147941 -0.371795 0.0212007 0.17072 0.984085 0.0493092
+0.496008 -0.197549 -0.371795 -0.305345 0.0427928 0.95128
+0.141026 0.368986 -0.100654 0.937135 0.348799 -0.0108589
+-0.086716 -0.256282 0.350513 0 1 0
+0.5 0.253837 -0.0692821 1 0 0
+-0.5 0.275591 0.229119 1 0 0
+0.108909 0.371795 0.0964367 0 1 0
+0.21349 -0.0342188 -0.261352 0.470554 0.88231 -0.0103841
+0.167048 0.118309 0.352041 0.829122 0.559062 -0.00260194
+-0.0367649 0.371795 -0.0108047 0 1 0
+-0.320513 -0.132783 -0.35037 1 0 0
+-0.461967 0.00569773 -0.371795 0 0 1
+-0.5 0.313584 0.295308 1 0 0
+0.433213 0.028805 0.320513 0 0 1
+0.0236653 -0.294872 0.23632 0 1 0
+-0.404389 -0.371795 -0.0503933 0 1 0
+-0.128375 -0.221637 0.371795 0 0 1
+-0.5 -0.0103111 0.177959 1 0 0
+0.324684 -0.220795 0.320513 0 0 1
+0.162877 0.207644 -0.333333 0 0 1
+0.0614374 0.350888 0.320513 0 0 1
+-0.335437 -0.365889 0.320513 0.129192 -0.429922 0.893575
+-0.266122 -0.0915661 0.371795 0 0 1
+-0.162522 -0.371795 -0.209148 0 1 0
+0.266155 0.227261 -0.368255 0.204543 0.885651 0.416874
+0.193333 -0.0928199 -0.333333 0 0 1
+0.221579 -0.371795 0.00797011 0 1 0
+-0.5 0.351565 0.136603 1 0 0
+0.5 -0.267711 0.128597 1 0 0
+0.432188 0.294872 -0.172369 0 1 0
+-0.272151 -0.013337 -0.260393 0.948559 0.315097 -0.0308282
+-0.084177 -0.187034 0.354644 0.400586 0.916257 -0.00175486
+0.5 0.269126 -0.309669 1 0 0
+0.5 -0.00962834 -0.287439 1 0 0
+-0.282132 0.371795 0.0764172 0 1 0
+0.321677 -0.060296 0.371795 0 0 1
+0.5 0.0280299 0.102247 1 0 0
+-0.430766 -0.323337 -0.371795 0 0 1
+-0.251423 -0.231588 -0.371795 0.0895665 0.859633 -0.503001
+0.158831 -0.0868022 -0.333333 0 0 1
+-0.5 0.218866 -0.127469 1 0 0
+0.141026 0.369556 -0.321443 0.810955 0.582383 0.0564038
+0.0536353 -0.158956 0.320513 0 0 1
+0.430191 -0.201685 0.320513 0 0 1
+0.43736 -0.355889 0.320513 0 0 1
+0.314018 -0.339234 -0.371795 0 0 1
+0.0510987 -0.126054 -0.333333 0 0 1
+0.5 0.0141773 -0.193704 1 0 0
+0.0780911 0.310474 -0.371795 0 0 1
+-0.494402 -0.22926 -0.371795 0.0836968 0.130179 0.987952
+0.5 0.225487 0.215487 1 0 0
+-0.5 -0.167418 -0.0679552 1 0 0
+0.141026 0.333853 -0.076196 1 0 0
+0.335873 -0.371795 -0.30782 0 1 0
+0.33773 -0.283413 -0.371795 0 0 1
+-0.22562 0.017374 -0.0199909 0.151335 0.508969 0.847377
+-0.0725619 0.371795 0.212172 0 1 0
+-0.5 -0.255413 -0.27041 1 0 0
+0.362411 -0.371795 -0.319457 0 1 0
+-0.144928 0.236417 0.371795 0 0 1
+0.103114 -0.294872 0.294857 0 1 0
+-0.448718 -0.323434 -0.0240917 1 0 0
+-0.313559 0.095093 -0.333333 -0.333167 0.0559172 0.941208
+-0.172867 0.109401 0.362362 0.823337 -0.554497 0.121037
+-0.264908 -0.0269528 -0.262367 0.810534 0.585589 0.0109365
+-0.284681 0.371795 0.0703753 0 1 0
+-0.31531 -0.161648 -0.333333 -0.583333 0.0525987 0.810528
+0.320513 -0.0779188 -0.335554 0.682863 0.064708 0.727675
+-0.467271 -0.294872 -0.190111 0 1 0
+-0.5 0.338595 -0.226219 1 0 0
+0.196211 -0.0260446 -0.333333 -0.299514 -0.13926 0.943874
+0.448718 -0.324139 -0.230596 1 0 0
+0.202433 -0.121452 0.371795 0 0 1
+-0.5 0.0875712 -0.299211 1 0 0
+0.5 -0.227136 0.189243 1 0 0
+0.198569 -0.0491356 0.367804 0.892167 -0.375701 -0.250771
+-0.150873 0.227165 0.371795 0 0 1
+-0.5 0.215147 0.0427231 1 0 0
+0.141026 0.352231 0.156644 1 0 0
+-0.5 0.0552722 -0.205253 1 0 0
+0.141026 0.297762 0.253648 0.946352 0.28844 0.145675
+0.5 0.1914 -0.107981 1 0 0
+-0.433136 0.100234 -0.371795 0 0 1
+0.141026 0.32238 -0.34626 1 0 0
+0.252999 0.23035 -0.371795 -0.0583415 0.439638 0.896278
+0.5 -0.187932 0.093374 1 0 0
+0.432342 0.153911 -0.371795 0 0 1
+-0.317169 0.322492 0.320513 0 0 1
+0.237602 -0.0378361 -0.0855554 -0.199201 0.9799 0.0107113
+-0.5 -0.244173 -0.0284344 1 0 0
+-0.0365542 -0.230897 -0.354367 0 1 0
+-0.109802 0.0416469 0.320513 0 0 1
+-0.448718 -0.370144 0.235921 0.872251 0.486902 0.0458697
+-0.150622 0.187876 0.371795 0 0 1
+0.5 0.176219 0.29918 1 0 0
+0.457405 -0.0101271 0.320513 0 0 1
+0.466676 0.121631 -0.371795 0 0 1
+-0.157354 0.371795 0.264281 0 1 0
+0.344758 -0.371795 0.198623 0 1 0
+-0.190776 0.247996 0.343239 -0.212551 0.97715 0
+-0.5 0.072145 -0.0974258 1 0 0
+0.0357104 0.0754218 0.320513 0 0 1
+0.256192 -0.183868 0.371795 0 0 1
+0.5 0.263742 -0.36156 1 0 0
+-0.356344 -0.115588 0.366348 0.788999 0.535201 -0.301729
+0.5 0.0244862 -0.20978 1 0 0
+0.276606 0.294872 -0.0558433 0 1 0
+0.460498 -0.294872 0.142237 -0.0132636 0.999912 2.42202e-005
+-0.246466 0.371795 -0.341123 0 1 0
+0.0301439 -0.294872 0.233664 0 1 0
+-0.262738 0.371795 -0.257807 0 1 0
+0.0927827 -0.0505463 -0.333333 0 0 1
+0.00314155 0.202448 -0.333333 0 0 1
+0.49035 0.294872 0.174848 0.116082 0.99286 0.0274759
+-0.309719 0.184448 -0.333333 -0.265079 0.206313 0.941896
+0.290622 -0.371795 0.219003 0 1 0
+0.0321552 -0.294872 -0.173502 0 1 0
+0.360688 -0.152182 0.320513 0 0 1
+-0.469773 0.024181 0.320513 0 0 1
+-0.40482 0.000759494 0.320513 0 0 1
+-0.338263 -0.371795 -0.151458 0 1 0
+0.328851 0.268168 0.320513 0 0 1
+0.409086 0.0994027 0.320513 0 0 1
+0.445026 -0.138985 -0.371795 0 0 1
+-0.5 0.140385 0.260879 1 0 0
+0.282206 -0.260555 0.320513 0 0 1
+-0.5 -0.12618 0.316239 0.869432 -0.0492816 -0.491589
+-0.0735884 0.145952 -0.333333 0 0 1
+0.451915 -0.294872 0.136937 -0.557442 0.824519 0.0970917
+0.409533 -0.371795 -0.366659 -0.0758518 0.94209 0.326669
+0.288973 -0.198971 0.36042 -0.599283 0.800537 0
+-0.241094 -0.371795 -0.0309725 0 1 0
+0.141109 -0.340205 0.0923777 1 0 0
+-0.448718 -0.357691 -0.254893 1 0 0
+0.448718 -0.320114 0.172387 1 0 0
+-0.340097 0.282957 0.320513 0 0 1
+0.0280497 0.202703 0.342723 0.164569 0.986366 0
+0.266154 -0.130864 -0.333333 0 0 1
+-0.319558 0.162484 0.371795 -0.288284 0.236252 0.927943
+0.184711 -0.230897 -0.354605 0 1 0
+0.448718 -0.324421 -0.122511 1 0 0
+0.237787 -0.0377864 -0.320433 -0.124008 0.992245 -0.00845042
+-0.37434 0.0711261 0.328063 0.96342 -0.263593 -0.0483881
+-0.452294 0.353729 -0.371795 0 0 1
+-0.0909316 -0.0532948 -0.333333 0 0 1
+-0.5 0.214625 -0.0996501 1 0 0
+-0.100078 0.256282 0.344487 0 1 0
+0.142626 0.294872 -0.324735 0.522486 0.849202 0.0765755
+0.387008 -0.234516 -0.371795 0 0 1
+-0.0551596 -0.294872 0.168562 0 1 0
+-0.0279428 0.178502 0.320513 0 0 1
+-0.5 0.338364 -0.342841 1 0 0
+-0.0808972 0.371795 0.222901 0 1 0
+0.5 0.0542994 0.156522 1 0 0
+0.492945 -0.294872 -0.167103 -0.211111 0.977314 0.0170324
+0.489881 0.03045 -0.371795 -0.0369789 -0.0147169 0.999208
+-0.4938 -0.00547978 0.320513 -0.174062 -0.00983931 0.984686
+-0.5 -0.266156 -0.272766 1 0 0
+-0.219729 -0.195845 -0.333333 0 0 1
+-0.375403 0.345779 0.320513 0 0 1
+-0.0137678 0.0675058 -0.333333 0 0 1
+0.484002 0.294872 0.280647 0 1 0
+0.5 -0.290162 -0.31142 0.936718 -0.325654 0.128488
+0.5 -0.269706 -0.0451393 1 0 0
+-0.470955 0.371795 -0.0741444 0 1 0
+0.0308199 0.371795 0.141165 0 1 0
+0.0184579 0.157234 -0.333333 0 0 1
+-0.225773 0.371795 0.244952 0 1 0
+0.407553 -0.0455733 0.320513 0 0 1
+-0.213761 0.310139 -0.371795 0 0 1
+0.0749621 -0.294872 -0.178744 0 1 0
+0.043066 -0.0598162 -0.333333 0 0 1
+-0.378646 0.0908533 -0.371795 0 0 1
+-0.0359983 0.371795 0.275232 0 1 0
+0.141109 -0.327684 -0.303493 1 0 0
+0.375445 -0.221741 0.320513 0 0 1
+-0.275175 -0.367434 -0.371795 -0.0870994 0.555698 0.826809
+0.270377 -0.371795 -0.158435 0 1 0
+-0.209912 0.201029 -0.333333 0 0 1
+-0.440614 0.191678 0.320513 0 0 1
+-0.5 -0.167447 -0.301998 1 0 0
+0.5 0.232676 0.256131 1 0 0
+-0.483393 0.371795 -0.119519 0 1 0
+0.275333 -0.119195 0.371795 0 0 1
+-0.121846 -0.294872 0.143325 0 1 0
+0.0115991 0.371795 0.08629 0 1 0
+0.381819 0.294872 -0.259072 0 1 0
+-0.5 0.0358555 0.205184 1 0 0
+-0.340715 -0.371795 -0.0304628 0 1 0
+0.256683 -0.0282716 -0.20506 -0.70454 0.709653 0.00400952
+-0.421151 0.371795 0.103621 0 1 0
+0.208334 0.294872 0.239607 0 1 0
+0.460375 0.294872 -0.294499 0 1 0
+0.158379 -0.129978 0.335656 0.761433 -0.648208 -0.00672152
+0.5 0.241123 -0.0734678 1 0 0
+0.101357 -0.256282 0.334677 0 1 0
+0.246729 0.0723081 -0.333333 0 0 1
+-0.5 -0.0145619 0.0496984 1 0 0
+-0.0834802 -0.294872 -0.353797 0 1 0
+0.0937119 -0.294872 -0.242412 0 1 0
+-0.174853 -0.0961291 -0.333333 0 0 1
+0.341111 -0.0944504 0.371795 0 0 1
+0.202162 0.0349503 0.370456 -0.647009 -0.2389 0.72409
+-0.141154 -0.325472 -0.365223 0.996433 -0.025671 -0.0803922
+0.257903 -0.371795 0.254839 0 1 0
+0.5 -0.186592 -0.271096 1 0 0
+0.125657 -0.18466 0.371795 0 0 1
+-0.231139 0.154774 -0.333333 0 0 1
+0.269185 0.000522048 -0.222883 0.999413 -0.0324317 -0.0110835
+-0.5 0.0229678 0.00868851 1 0 0
+-0.5 0.360202 -0.148199 1 0 0
+-0.0246203 0.371795 -0.0724621 0 1 0
+0.034779 0.371795 -0.341313 0 1 0
+0.381832 0.26928 0.320513 0 0 1
+-0.371299 0.0170494 0.371795 0 0 1
+0.21131 -0.190531 -0.333333 0 0 1
+0.133367 0.371795 -0.03842 0.190218 0.98168 0.0110168
+-0.5 0.145548 0.0608958 1 0 0
+0.232468 -0.0915247 -0.333333 0 0 1
+0.426417 -0.371795 -0.209688 0 1 0
+-0.5 0.00524235 -0.317811 1 0 0
+0.167029 0.294872 -0.0644761 0 1 0
+-0.260513 0.371795 -0.0608962 0 1 0
+-0.305008 0.371795 0.0326898 0 1 0
+0.387656 -0.371795 -0.330122 0 1 0
+0.240973 -0.0369327 -0.310288 -0.2276 0.973736 -0.00598628
+-0.5 0.216336 -0.239795 1 0 0
+-0.5 -0.19539 -0.101105 1 0 0
+0.295117 0.294872 -5.37402e-005 0 1 0
+-0.156353 -0.0887753 -0.333333 0 0 1
+0.426552 0.0275497 -0.371795 0 0 1
+-0.225458 -0.371795 -0.260019 0 1 0
+0.141026 0.344248 0.179604 1 0 0
+-0.5 0.0319938 0.0586768 1 0 0
+0.119831 -0.273141 0.320513 0 0 1
+0.141026 0.340653 0.209956 1 0 0
+-0.0754879 -0.294872 -0.0757295 0 1 0
+0.5 0.0846342 -0.189061 1 0 0
+0.5 -0.110938 0.286633 1 0 0
+0.141109 -0.34572 -0.308122 1 0 0
+0.374307 0.104218 -0.371795 0 0 1
+-0.107515 0.371795 -0.324233 0 1 0
+0.202795 0.245011 0.345556 0.30123 0.953523 0.00733243
+0.0967234 -0.294872 -0.251958 0 1 0
+0.5 0.182019 0.266183 1 0 0
+-0.11084 -0.00489396 0.320513 0 0 1
+-0.147723 -0.371795 0.0314773 -0.247996 0.967618 -0.047045
+0.166177 0.230897 -0.357372 0 1 0
+-0.0565245 -0.294872 0.0433851 0 1 0
+0.306342 0.294872 -0.31328 0 1 0
+-0.00960978 0.351626 -0.371795 0 0 1
+-0.5 0.168902 -0.0507319 1 0 0
+-0.241267 -0.0421427 -0.060817 0.179761 0.983699 -0.0047349
+-0.141154 -0.327807 0.211995 1 0 0
+-0.5 0.359929 0.13711 1 0 0
+-0.101698 0.0820549 -0.333333 0 0 1
+-0.422727 -0.130575 -0.371795 0 0 1
+-0.5 -0.272428 -0.151047 1 0 0
+0.231782 -0.0383729 -0.099788 -0.0244328 0.999337 -0.0270067
+-0.375851 0.0641824 0.365377 0.986092 -0.107073 -0.127117
+0.5 0.186329 -0.0281436 1 0 0
+0.390638 -0.351991 -0.371795 0 0 1
+-0.5 0.211724 -0.2591 1 0 0
+-0.0174553 -0.0325609 0.320513 0 0 1
+0.119683 0.371795 0.101236 0 1 0
+-0.26309 0.371795 0.127035 0 1 0
+0.170537 -0.371795 0.00133045 0 1 0
+0.211582 0.294872 -0.0690194 0 1 0
+-0.330343 0.371795 -0.35126 0 1 0
+-0.5 0.20561 -0.150443 1 0 0
+-0.31243 0.187669 -0.356149 0.903282 -0.429017 -0.00504636
+-0.488496 -0.216711 -0.371795 0 0 1
+0.021917 -0.294872 0.17738 0 1 0
+0.426712 -0.288201 0.320513 0 0 1
+0.420101 0.180475 -0.371795 0 0 1
+0.367692 -0.133014 0.320513 0 0 1
+0.141026 0.325148 0.0282945 1 0 0
+-0.438308 -0.355887 0.320513 -0.0433825 0.00262606 0.999055
+0.273357 -0.371795 -0.371619 -0.0382046 0.415964 0.908578
+-0.210089 0.0415685 -0.333333 0.0689623 0.253251 0.964939
+0.480561 -0.294872 -0.245751 0 1 0
+-0.221688 -0.371795 -0.0875924 0 1 0
+-0.416629 -0.263657 -0.371795 0 0 1
+-0.358842 0.371795 -0.207238 0 1 0
+-0.141154 -0.306591 -0.111112 1 0 0
+0.28013 0.196806 0.371795 0.0644816 0.162884 0.984536
+-0.426975 0.371795 -0.0626182 0 1 0
+0.369994 0.294872 -0.112633 0 1 0
+-0.141154 -0.358352 -0.0655926 1 0 0
+0.305922 0.294872 -0.15734 0 1 0
+0.430008 0.294872 0.182657 0 1 0
+0.252808 0.294872 0.25554 0 1 0
+0.321241 -0.168478 0.326049 0.747103 -0.56089 0.356706
+0.5 0.290478 -0.199535 0.929411 0.368362 0.022451
+-0.202189 -0.0758109 -0.333333 0 0 1
+-0.5 0.128418 -0.17697 1 0 0
+0.141026 0.338093 0.268939 1 0 0
+0.0470462 -0.175299 -0.333333 0 0 1
+0.141109 -0.334554 0.215334 1 0 0
+-0.5 0.246969 -0.323014 1 0 0
+0.274829 -0.011085 0.371795 0 0 1
+-0.191107 -0.189002 0.371795 0 0 1
+0.322761 0.294872 -0.254045 0 1 0
+-0.098344 0.371795 0.0638434 0 1 0
+-0.150296 -0.144897 0.371795 0.088639 0.0978569 0.991245
+-0.5 -0.0795046 0.151875 1 0 0
+0.239039 -0.231644 0.320513 0.207083 -0.252737 0.945114
+-0.411906 0.168688 0.320513 0 0 1
+0.176769 0.116109 -0.333333 0 0 1
+0.5 0.272463 0.126567 1 0 0
+-0.493752 -0.175325 -0.371795 0.401245 -0.11635 0.908551
+-0.5 -0.187653 -0.0404125 1 0 0
+-0.342906 -0.0792287 -0.371795 0 0 1
+0.321575 -0.168144 0.369533 0.515541 -0.381868 0.767069
+-0.0487868 0.371795 0.212967 0 1 0
+0.5 -0.0403481 -0.230157 1 0 0
+0.0435106 0.371795 -0.301885 0 1 0
+-0.176708 0.135597 0.371795 0 0 1
+0.369003 0.294872 -0.0184105 0 1 0
+-0.5 0.202458 0.0519773 1 0 0
+-0.141154 -0.339913 -0.286596 1 0 0
+-0.5 0.266848 0.247403 1 0 0
+-0.296532 0.031558 0.371795 0 0 1
+-0.0757361 -0.145002 0.320513 0 0 1
+0.131609 0.0639294 -0.333333 0 0 1
+0.5 -0.250358 -0.177225 1 0 0
+0.141026 0.324054 0.0853726 1 0 0
+0.5 0.0354919 0.224912 1 0 0
+-0.5 0.361796 -0.178162 0.999594 -0.0261659 -0.0112619
+0.5 0.176396 -0.220065 1 0 0
+0.197172 -0.371795 0.237252 0 1 0
+-0.5 -0.0145963 0.249808 1 0 0
+0.203711 0.018653 0.3342 0.996584 0.0825843 0
+-0.318143 0.0533191 -0.333333 -0.597003 -0.0337767 0.801527
+-0.143574 -0.371795 0.307689 -0.619584 0.757451 -0.205874
+-0.203063 0.0336109 -0.056143 0.578498 0.815591 -0.0122763
+-0.151315 -0.371795 -0.315961 -0.0114379 0.999934 0.00125972
+0.304296 0.200877 -0.359301 0.782492 0.622655 -0.00258535
+0.258979 -0.0600904 -0.333333 0 0 1
+0.439802 0.177923 0.320513 0 0 1
+0.141026 0.321862 -0.179368 1 0 0
+0.442248 0.294872 -0.270615 0 1 0
+0.346983 -0.371795 -0.00400658 0 1 0
+-0.47972 -0.234488 -0.371795 0 0 1
+0.483277 -0.0878989 -0.371795 0 0 1
+0.139468 0.371795 -0.304745 0.639142 0.769074 0.00489811
+-0.24473 0.338237 0.320513 0 0 1
+-0.219655 0.105097 -0.333333 0 0 1
+-0.18697 0.314278 -0.371795 0 0 1
+0.0751291 0.0178047 0.320513 0 0 1
+0.433431 -0.371795 0.120199 0 1 0
+-0.5 -0.176452 -0.165887 1 0 0
+-0.188589 -0.0103561 -0.135805 0.976702 -0.214128 0.0142392
+-0.5 0.249572 -0.00447893 1 0 0
+-0.140004 0.250762 -0.371795 0 0 1
+-0.0596119 0.371795 -0.117471 0 1 0
+-0.4267 0.371795 -0.246507 0 1 0
+-0.5 0.201083 0.311293 0.981345 -0.0130795 -0.19181
+0.200864 0.274774 0.320513 0 0 1
+0.242016 0.0733833 -0.333333 0 0 1
+0.5 -0.039615 -0.294842 1 0 0
+-0.141154 -0.300836 0.0567415 0.968384 -0.245447 -0.0445882
+0.105559 -0.177331 -0.333333 0 0 1
+0.0468573 0.0664818 0.320513 0 0 1
+0.0293356 0.371795 0.0102116 0 1 0
+-0.463021 0.371795 -0.217013 0 1 0
+0.0682168 -0.294872 0.260823 0 1 0
+0.141109 -0.322163 0.289786 1 0 0
+0.437508 0.294872 0.287411 0 1 0
+0.273894 -0.371795 -0.324212 0 1 0
+0.320513 -0.0408329 -0.352417 1 0 0
+0.382856 -0.287407 0.320513 0 0 1
+0.448718 -0.363181 0.0971621 0.993298 -0.114429 -0.0162949
+-0.126731 -0.294872 0.276776 0 1 0
+0.06745 0.371795 -0.111939 0 1 0
+0.0742465 -0.166702 -0.333333 0 0 1
+0.324144 -0.371795 0.00224053 0 1 0
+-0.295719 0.246176 0.320513 0 0 1
+0.466712 -0.294872 -0.288307 0 1 0
+0.5 -0.0961553 -0.155773 1 0 0
+0.5 0.0742117 -0.182875 1 0 0
+0.0450163 0.371795 -0.168013 0 1 0
+0.365094 0.294872 0.148015 0 1 0
+0.241298 0.0806466 0.371795 0 0 1
+-0.00564187 -0.267262 -0.371795 0 0 1
+0.217432 -0.120692 0.371795 0 0 1
+-0.218349 -0.371795 -0.236889 0 1 0
+0.19628 -0.168238 0.371795 0 0 1
+0.5 -0.0920924 -0.0579017 1 0 0
+-0.192087 -0.000101643 -0.0323125 0.621713 0.0433913 0.782042
+-0.141154 -0.359271 0.289515 0.999243 -0.0388326 -0.00230453
+0.190475 0.248062 0.344546 0.218805 0.975767 -0.00160629
+0.302535 0.294872 0.208717 0 1 0
+0.5 0.108967 -0.146219 1 0 0
+0.156582 0.0664749 -0.333333 0 0 1
+-0.5 -0.103814 -0.300883 1 0 0
+-0.28332 0.371795 -0.17932 0 1 0
+-0.406457 -0.371795 0.105106 0 1 0
+-0.5 0.262893 0.221542 1 0 0
+0.351129 -0.233245 0.320513 0 0 1
+-0.342848 0.139833 0.357479 0.830785 -0.55652 -0.00901358
+-0.34376 0.371795 -0.218838 0 1 0
+-0.5 0.234937 0.220896 1 0 0
+0.121393 -0.230897 -0.334942 -0.064786 0.933465 -0.35277
+-0.376599 0.356746 -0.371795 0 0 1
+-0.336216 -0.371795 -0.363428 0.00115664 0.999673 0.0255518
+0.155155 0.294872 0.264787 0 1 0
+0.132997 0.251612 0.371795 0.028424 0.522139 0.852387
+0.431201 -0.371795 -0.0155729 0 1 0
+-0.122381 -0.294872 0.308274 0 1 0
+-0.35518 -0.193857 0.320513 0 0 1
+0.320513 -0.0584068 -0.338672 0.984547 0.0815493 0.154974
+0.018339 0.331447 0.320513 0 0 1
+-0.401667 0.371795 0.15296 0 1 0
+-0.321581 0.168138 0.342019 0.765141 -0.643846 -0.00458599
+0.142196 -0.255281 0.358072 -0.0714886 0.997441 -0.000103372
+-0.174552 -0.0614753 -0.333333 0 0 1
+0.415622 -0.371795 0.134321 0 1 0
+-0.229694 0.371795 -0.235043 0 1 0
+-0.458078 0.107898 -0.371795 0 0 1
+-0.150594 -0.371795 0.161148 -0.083268 0.996134 0.0279819
+0.5 -0.0486759 -0.186412 1 0 0
+-0.0409534 -0.294872 0.00986771 0 1 0
+-0.212625 0.0394522 -0.0523925 0.417083 0.908859 0.00421561
+-0.5 0.365356 0.240275 0.991934 -0.126667 -0.00472042
+-0.5 0.0280531 -0.0345382 1 0 0
+0.5 0.060892 -0.0905545 1 0 0
+-0.5 -0.149347 -0.264945 1 0 0
+0.5 0.0552622 -0.124225 1 0 0
+-0.0722277 0.371795 0.0742153 0 1 0
+-0.430517 -0.253397 -0.371795 0 0 1
+0.5 0.237694 0.200724 1 0 0
+-0.271713 0.0149442 -0.21866 0.937364 -0.348238 0.00889142
+0.153497 0.294872 -0.299546 0 1 0
+0.170371 -0.101366 0.320513 -0.128702 0.110706 0.985485
+0.118108 -0.294872 -0.111356 0 1 0
+-0.448718 -0.369991 -0.247523 0.942296 0.332466 0.0392996
+0.5 -0.205296 0.25028 1 0 0
+0.382441 -0.0286118 0.325525 0.983221 -0.0457736 0.176583
+-0.344923 0.288036 -0.371795 0 0 1
+0.425261 0.294872 -0.0217711 0 1 0
+-0.263101 0.371795 -0.255059 0 1 0
+0.43758 -0.099589 0.320513 0 0 1
+-0.263921 -0.306145 -0.371795 0 0 1
+0.0441514 -0.247219 -0.371795 0 0 1
+-0.411431 0.147191 -0.371795 0 0 1
+-0.218976 -0.230897 -0.369152 0.101604 0.918845 -0.381313
+0.356083 -0.223785 0.320513 0 0 1
+0.323117 -0.16619 0.346118 0.773424 -0.633878 0.0036928
+-0.0795084 -0.215925 0.371795 0 0 1
+0.421581 -0.371795 0.201296 0 1 0
+-0.415769 -0.111778 0.320513 0 0 1
+-0.106096 -0.192964 0.371795 0 0 1
+-0.5 -0.0566763 -0.319871 1 0 0
+-0.034067 -0.247589 -0.371795 0 0 1
+-0.297067 -0.109252 -0.333333 0 0 1
+0.5 0.0823808 -0.027588 1 0 0
+-0.35288 -0.371795 0.0400539 0 1 0
+-0.322262 -0.0731564 0.371795 0 0 1
+-0.270208 0.138402 0.371795 0 0 1
+-0.5 -0.0838493 -0.200983 1 0 0
+-0.5 -0.179442 -0.257816 1 0 0
+0.141109 -0.352854 -0.351855 1 0 0
+-0.422421 -0.0444802 0.320513 0 0 1
+-0.460666 0.211036 -0.371795 0 0 1
+-0.477232 -0.294872 -0.150605 0 1 0
+0.131769 0.221648 0.371795 0 0 1
+0.448079 0.0715092 0.320513 0 0 1
+-0.5 -0.230345 -0.290606 1 0 0
+0.359709 -0.371795 -0.185154 0 1 0
+-0.0624102 0.371795 -0.152621 0 1 0
+0.053445 0.371795 -0.158674 0 1 0
+0.195628 0.191514 0.371795 0 0 1
+-0.175876 -0.230026 -0.333333 0.0775498 -0.723445 0.686012
+0.176886 -0.371795 0.023776 0 1 0
+0.484079 -0.294872 -0.235379 0 1 0
+0.208697 0.204067 0.371795 0 0 1
+0.5 -0.18999 -0.0151849 1 0 0
+-0.394618 0.371795 0.101741 0 1 0
+-0.5 0.174551 0.198693 1 0 0
+0.319411 0.127643 -0.333333 0.660045 0.0767242 0.747298
+0.0517457 -0.294872 0.112064 0 1 0
+0.349633 -0.371795 0.174707 0 1 0
+0.412301 0.294872 -0.110665 0 1 0
+-0.297049 -0.371795 -0.105702 0 1 0
+-0.5 -0.0184879 0.220661 1 0 0
+-0.16862 0.371795 -0.269833 0 1 0
+0.5 -0.283451 0.214627 0.99922 -0.0365229 0.0150448
+0.5 0.115053 -0.0249702 1 0 0
+0.44055 0.11612 -0.371795 0 0 1
+-0.0752468 -0.205659 -0.333333 0 0 1
+0.269013 0.00248404 -0.259435 0.992756 0.118672 -0.0187691
+-0.284305 0.289712 0.320513 0 0 1
+-0.399706 -0.211343 -0.371795 0 0 1
+-0.5 0.197957 0.102284 1 0 0
+-0.5 0.0984895 -0.300807 1 0 0
+-0.5 0.0778886 0.00600047 1 0 0
+-0.5 0.255719 0.164473 1 0 0
+-0.189346 0.136525 0.371795 0 0 1
+-0.5 -0.125317 -0.357225 1 0 0
+-0.5 0.0940373 -0.316957 1 0 0
+0.215814 -0.371795 -0.05767 0 1 0
+-0.00636332 -0.294872 -0.0522994 0 1 0
+-0.225893 -0.266077 0.320513 0 0 1
+0.5 0.0294525 -0.102403 1 0 0
+-0.452445 0.0854728 0.320513 0 0 1
+-0.5 -0.0271596 0.139077 1 0 0
+0.116034 0.371795 0.0298469 0 1 0
+0.247779 -0.371795 0.243968 0 1 0
+-0.478426 0.371795 -0.10961 0 1 0
+0.5 0.109416 -0.155547 1 0 0
+0.141026 0.347554 0.23307 1 0 0
+0.141109 -0.349979 0.0684613 1 0 0
+0.333221 0.294872 0.0137123 0 1 0
+-0.200795 -0.371795 -0.0156712 0 1 0
+-0.402873 -0.267515 -0.371795 0 0 1
+0.5 0.173381 0.0947061 1 0 0
+-0.5 -0.279225 0.291712 1 0 0
+0.5 -0.284493 0.0663115 1 0 0
+-0.401208 -0.371795 0.19436 0 1 0
+-0.5 0.185954 0.238239 1 0 0
+0.5 -0.0754854 -0.0270296 1 0 0
+-0.426329 -0.371795 -0.0796802 0 1 0
+-0.295444 -0.0332149 0.371795 0 0 1
+-0.41103 -0.371795 -0.175022 0 1 0
+0.5 0.252195 -0.223774 1 0 0
+-0.000214912 0.211185 0.371795 -0.138417 -0.30854 0.941087
+-0.177981 0.371795 0.224963 0 1 0
+0.323604 0.294872 0.169544 0 1 0
+0.193738 -0.164941 -0.333333 0 0 1
+-0.5 -0.0142844 -0.290854 1 0 0
+0.5 -0.015755 0.135767 1 0 0
+0.122738 0.371795 0.164396 0 1 0
+-0.435408 0.371795 -0.220939 0 1 0
+0.205993 -0.029409 -0.194472 0.663746 0.747958 0
+-0.5 -0.15193 0.0283196 1 0 0
+-0.5 0.359431 0.0408245 1 0 0
+0.5 -0.0536012 -0.228189 1 0 0
+-0.5 0.137008 -0.197665 1 0 0
+-0.141154 -0.310652 -0.30493 1 0 0
+-0.0645805 -0.294872 -0.138442 0 1 0
+-0.5 0.142544 -0.361759 1 0 0
+0.5 -0.191776 -0.319831 1 0 0
+-0.27895 -0.371795 -0.119689 0 1 0
+-0.5 -0.0455598 0.0460443 1 0 0
+0.385455 0.294872 -0.237617 0 1 0
+0.5 -0.194108 0.30528 1 0 0
+0.141026 0.351619 -0.23041 1 0 0
+-0.0472963 -0.294872 -0.00746551 0 1 0
+0.176518 0.219696 0.371795 0 0 1
+-0.104583 0.318657 -0.371795 0 0 1
+0.5 0.0693625 -0.250822 1 0 0
+-0.5 0.320679 0.0743497 1 0 0
+-0.0523009 0.230897 -0.362672 0.00278641 0.999149 0.0411547
+0.248501 0.0340078 -0.307325 0.409384 0.911907 -0.0288064
+-0.224514 -0.371795 0.0557391 0 1 0
+0.452261 -0.294872 -0.361125 -0.225942 0.972945 0.0482535
+0.198059 0.294872 -0.0508289 0 1 0
+-0.463235 -0.294872 0.118137 0 1 0
+-0.448718 -0.322677 -0.105677 1 0 0
+0.0510349 -0.294872 0.116805 0 1 0
+-0.224109 -0.371795 0.102736 0 1 0
+-0.175352 -0.224879 -0.333333 0.000520025 -0.192844 0.981229
+-0.425041 0.371795 -0.1814 0 1 0
+-0.185507 -0.206451 0.371795 0 0 1
+0.425009 0.210159 0.320513 0 0 1
+-0.174927 -0.369665 -0.371795 0.0577009 0.423012 0.904285
+0.164222 0.253706 0.351578 0.135925 0.990717 0.00204511
+-0.5 -0.08587 0.214505 1 0 0
+0.0439099 0.371795 0.294149 0 1 0
+-0.5 -0.266345 0.298527 1 0 0
+0.179571 -0.371795 -0.0909664 0 1 0
+-0.457 0.371795 -0.0394099 0 1 0
+0.444945 -0.371795 0.0366374 -0.266177 0.955808 -0.124823
+0.339965 0.143684 0.363946 0.804426 0.594053 0
+-0.122612 -0.2367 -0.371795 0.103083 -0.197602 0.974847
+-0.47188 -0.290693 0.320513 -0.022672 -0.439347 0.898031
+0.22774 0.0381965 -0.160441 -0.0665214 0.997476 -0.0248222
+-0.18047 0.371795 -0.133649 0 1 0
+0.5 -0.0182501 0.221623 1 0 0
+0.0644322 -0.167287 -0.333333 0 0 1
+0.357885 -0.240927 0.320513 0 0 1
+0.149373 0.294872 -0.256715 0.020684 0.999781 -0.00328384
+-0.40957 0.371795 -0.318756 0 1 0
+-0.134332 0.0802298 -0.333333 0 0 1
+-0.286974 0.0102206 -0.333333 0 0 1
+-0.207615 -0.249492 -0.371795 0 0 1
+0.422121 -0.193723 -0.371795 0 0 1
+-0.448718 -0.295527 0.0832916 0.745497 0.665036 0.0442945
+0.141109 -0.366556 -0.090012 0.829037 0.54753 0.113614
+-0.296643 0.331632 0.320513 0 0 1
+-0.0868511 0.0616597 0.320513 0 0 1
+0.104754 -0.294872 -0.285792 0 1 0
+-0.203982 -0.0153758 0.340835 0.996568 0.0827798 -0.000170716
+-0.435254 -0.371795 0.153803 0 1 0
+0.5 -0.00650707 -0.350198 1 0 0
+0.5 -0.0582742 -0.344552 1 0 0
+-0.190865 0.202931 -0.333333 0 0 1
+-0.424403 -0.371795 0.176892 0 1 0
+-0.5 0.148454 0.242992 1 0 0
+-0.0142805 0.297722 -0.371795 0 0 1
+-0.5 0.019417 -0.0274008 1 0 0
+0.376251 -0.0623431 0.329884 0.97714 -0.212595 0
+-0.0899502 0.371795 -0.0108946 0 1 0
+-0.396823 0.184687 -0.371795 0 0 1
+-0.390818 -0.371795 0.228391 0 1 0
+-0.319061 -0.371795 0.158918 0 1 0
+-0.391362 0.371795 -0.311986 0 1 0
+-0.0131123 0.371795 0.198786 0 1 0
+-0.381878 -0.371795 -0.21052 0 1 0
+-0.457662 -0.290144 -0.371795 -0.0593592 0.184603 0.981019
+0.228168 -0.371795 -0.0443684 0 1 0
+0.104623 0.371795 0.124485 0 1 0
+-0.238312 -0.0429299 -0.268967 0.153451 0.988016 -0.0166271
+-0.492493 0.371795 -0.2289 -0.135421 0.990756 -0.00794779
+0.225679 -0.0380161 -0.0537723 0.142791 0.989745 0.00390963
+-0.329323 0.1579 0.358605 0.800537 -0.599284 0
+-0.248839 -0.039487 -0.2095 0.4281 0.903731 0
+0.0628961 0.00739595 -0.333333 0 0 1
+-0.386002 -0.371795 -0.162548 0 1 0
+0.5 0.220822 -0.133854 1 0 0
+0.419406 0.28573 -0.371795 0.00562572 -0.0360985 0.999332
+0.255798 -0.0291569 -0.135976 -0.694755 0.719246 0
+-0.0191677 -0.230897 -0.368701 -0.0367502 0.896351 -0.441819
+-0.326718 -0.272942 -0.371795 0 0 1
+0.153923 -0.0572205 -0.333333 0 0 1
+0.371322 -0.153347 -0.371795 0 0 1
+0.100333 0.371795 -0.295003 0 1 0
+0.411432 0.294872 -0.104603 0 1 0
+-0.105459 0.208855 0.371795 0 0 1
+-0.246166 0.371795 0.24927 0 1 0
+0.00362593 -0.16006 -0.333333 0 0 1
+-0.191783 0.0191448 -0.182771 0.901802 0.431611 0.021571
+-0.461205 -0.226543 0.320513 0 0 1
+-0.5 0.312009 0.283331 1 0 0
+-0.351505 0.371795 -0.143324 0 1 0
+-0.37263 -0.122478 -0.371795 0 0 1
+-0.188761 0.0788984 0.345201 0.915781 -0.401677 0
+0.5 0.109886 0.290279 1 0 0
+0.326879 0.0505429 -0.371795 0.255799 0.00388193 0.966722
+0.5 -0.063258 0.275546 1 0 0
+-0.433398 -0.371795 -0.22847 0 1 0
+-0.30214 -0.371795 0.0741221 0 1 0
+-0.47317 0.0397296 -0.371795 0 0 1
+-0.259159 0.371795 -0.16281 0 1 0
+0.11759 0.371795 0.0176261 0 1 0
+0.425253 -0.371795 0.0336153 0 1 0
+-0.345077 -0.371795 -0.287095 0 1 0
+-0.5 0.271388 -0.0334253 1 0 0
+0.448718 -0.33365 -0.115239 1 0 0
+-0.457171 -0.294872 0.026313 0.0902196 0.995345 -0.0338799
+0.285743 -0.203815 -0.333333 0.0103852 -0.0254101 0.999623
+0.320985 -0.186088 0.320513 0 0 1
+-0.391677 -0.165814 -0.371795 0 0 1
+0.187464 0.294872 -0.221608 0 1 0
+0.18122 -0.294417 -0.371795 0 0 1
+-0.5 -0.0532218 -0.152157 1 0 0
+0.277321 -0.289007 -0.371795 0 0 1
+0.335867 -0.371795 -0.292254 0 1 0
+-0.5 0.150551 -0.0429973 1 0 0
+0.5 -0.286642 0.015713 0.996809 -0.0772489 0.0200979
+-0.383898 0.116283 0.320513 0 0 1
+-0.5 0.262677 -0.216499 1 0 0
+0.0559944 -0.238904 -0.371795 0.0275165 -0.0958786 0.995013
+-0.5 0.297213 0.0163738 1 0 0
+0.377647 -0.371795 0.00348484 0 1 0
+0.299125 -0.371795 0.240491 0 1 0
+-0.349902 0.371795 0.20596 0 1 0
+-0.215294 0.263394 0.320513 0 0 1
+0.141026 0.319528 0.268196 1 0 0
+0.5 -0.244439 0.0435373 1 0 0
+-0.5 0.187233 -0.168667 1 0 0
+0.34702 0.1109 0.371795 0 0 1
+-0.402792 -0.371795 -0.0407994 0 1 0
+-0.141154 -0.367298 -0.291234 0.973946 -0.223198 -0.040148
+0.0513941 0.345018 0.320513 0 0 1
+0.407178 0.294872 -0.177608 0 1 0
+0.5 -0.100008 -0.264648 1 0 0
+0.0278253 0.157045 -0.333333 0 0 1
+0.465782 0.294872 0.215949 0 1 0
+0.452976 -0.294872 0.175273 -0.246467 0.969097 0.010234
+0.171463 0.294872 -0.126849 0 1 0
+-0.34512 0.371795 0.047977 0 1 0
+-0.248852 -0.0394807 -0.207931 0.41105 0.911609 0.00266851
+-0.0566388 -0.129025 0.320513 0 0 1
+0.250386 0.22454 0.371781 0.479361 0.792848 0.376304
+-0.199043 -0.029684 -0.203348 0.719037 -0.694606 -0.0225502
+-0.351849 -0.371795 -0.124643 0 1 0
+-0.199936 -0.371795 -0.350652 0 1 0
+0.495007 0.133893 0.320513 0.445757 0.166972 0.879444
+0.116118 0.371795 0.315933 0.268338 0.800935 0.535255
+0.434488 0.100325 -0.371795 0 0 1
+0.174994 0.294872 -0.220486 0 1 0
+0.139162 0.230897 -0.337403 0.0611726 0.970352 0.233825
+0.28588 0.294872 0.319734 0.0373666 0.850351 0.524887
+-0.20586 -0.371795 -0.230637 0 1 0
+0.5 0.242817 -0.264291 1 0 0
+0.5 -0.287286 0.0704564 0.995861 -0.0899623 -0.012955
+-0.346546 0.307756 -0.371795 0 0 1
+0.194077 -0.0111033 -0.0541225 0.947654 0.318457 -0.0231619
+-0.457715 0.149454 -0.371795 0 0 1
+-0.402035 0.371795 -0.249807 0 1 0
+0.41237 0.101764 0.320513 0 0 1
+0.0646963 -0.294872 -0.306696 0 1 0
+-0.0158769 0.234807 0.371795 0 0 1
+-0.290423 0.371795 0.314304 -0.00595029 0.991654 0.12879
+0.5 -0.0587675 0.292607 1 0 0
+0.141026 0.351455 0.271014 1 0 0
+0.273338 -0.0623802 -0.333333 0 0 1
+-0.5 -0.267992 -0.195488 1 0 0
+0.180681 -0.371795 0.127284 0 1 0
+-0.150207 -0.0828263 0.320513 0 0 1
+0.0973109 -0.0973253 -0.333333 0 0 1
+-0.246232 0.230666 -0.367431 -0.198136 0.812276 0.548589
+0.407114 0.125566 -0.371795 0 0 1
+0.5 -0.0122264 0.109427 1 0 0
+0.0710895 0.370495 -0.371795 -0.130578 -0.540551 0.831116
+-0.5 0.142583 -0.0105097 1 0 0
+-0.0733976 -0.294872 -0.196418 0 1 0
+0.26381 -0.371795 0.180001 0 1 0
+-0.448718 -0.364776 0.237339 0.973513 0.203465 -0.10428
+0.198238 -0.0504426 0.369575 0.922053 -0.267902 -0.279368
+0.442305 -0.0220775 0.320513 0 0 1
+-0.280662 -0.371795 -0.299701 0 1 0
+-0.113594 -0.294872 -0.343839 0 1 0
+-0.5 0.0920191 0.250573 1 0 0
+-0.499998 0.371795 0.230481 -0.652253 0.758 0.00123846
+-0.5 0.233167 -0.24016 1 0 0
+-0.146994 -0.22346 0.371795 0 0 1
+-0.0910728 0.230897 -0.341979 0.1071 0.980655 0.163846
+-0.0256297 -0.241196 -0.371795 -0.000181541 -0.00319202 0.999995
+0.0492057 -0.294872 0.0940883 0 1 0
+-0.362981 -0.011879 0.371795 0 0 1
+-0.5 0.270174 -0.00246647 1 0 0
+0.5 -0.0775895 -0.260353 1 0 0
+-0.141154 -0.36313 -0.154825 0.999797 -0.0196246 -0.00467696
+-0.464928 -0.294872 -0.22964 0 1 0
+-0.18912 -0.0780792 0.330753 0.916494 0.40001 0.00552551
+0.379087 -0.121677 0.320513 0 0 1
+0.270797 0.245238 0.320513 0 0 1
+0.117092 0.0940483 -0.333333 0 0 1
+0.404344 -0.221863 0.320513 0 0 1
+-0.0994585 -0.294872 0.0190845 0 1 0
+-0.5 0.338441 0.238746 1 0 0
+-0.216918 0.371795 -0.206761 0 1 0
+-0.123319 -0.294872 -0.344639 0 1 0
+0.5 0.0998556 -0.126309 1 0 0
+0.0787946 -0.294872 -0.317082 0 1 0
+0.5 0.28161 -0.197158 1 0 0
+-0.235603 -0.341495 0.320513 0 0 1
+0.352943 0.231975 0.320513 0 0 1
+0.323934 0.294872 0.242514 0 1 0
+0.0027961 -0.063445 -0.333333 0 0 1
+0.5 -0.20095 -0.30223 1 0 0
+-0.273748 0.00698815 -0.0800928 0.994413 -0.104717 0.013332
+0.5 -0.192413 0.0339922 1 0 0
+-0.493027 -0.294872 -0.314265 0.104211 0.994391 -0.018075
+-0.5 -0.277565 -0.214312 1 0 0
+-0.0228905 -0.294872 0.15875 0 1 0
+-0.34575 -0.371795 -0.0226416 0 1 0
+-0.149502 0.371795 0.206862 0 1 0
+0.0514194 0.353928 0.320513 0 0 1
+0.448718 -0.368607 0.25858 0.938301 -0.313508 -0.145959
+-0.299828 -0.0457261 0.371795 0 0 1
+0.118584 0.0557505 -0.333333 0 0 1
+0.0821444 -0.230897 -0.347235 0 1 0
+-0.354146 -0.155822 0.320513 0 0 1
+0.479306 -0.0505049 -0.371795 0 0 1
+0.120456 -0.163275 -0.333333 0 0 1
+-0.287247 -0.371795 0.146905 0 1 0
+-0.222519 -0.309243 0.320513 0 0 1
+-0.5 0.201898 0.261824 1 0 0
+0.5 0.00592781 -0.341411 1 0 0
+0.171337 0.294872 -0.149251 0 1 0
+-0.497353 0.371795 -0.343702 -0.689687 0.722692 0.04525
+-0.447619 -0.0927125 -0.371795 0 0 1
+0.5 -0.0733062 0.0944706 1 0 0
+-0.424751 -0.371795 0.199301 0 1 0
+0.106414 -0.175 0.329911 -0.483127 0.866534 0.125329
+-0.157215 -0.0491651 -0.333333 0 0 1
+-0.472091 -0.294872 -0.302662 0 1 0
+0.431239 -0.177051 -0.371795 0 0 1
+0.5 0.194382 -0.283958 1 0 0
+-0.5 0.198204 -0.0886315 1 0 0
+-0.5 -0.0608786 -0.270379 1 0 0
+0.294948 0.294872 0.126709 0 1 0
+-0.448718 -0.308257 0.260061 1 0 0
+0.191708 0.294872 -0.112441 0 1 0
+-0.5 0.135654 -0.114531 1 0 0
+0.185339 0.287163 -0.371795 -0.0202032 -0.132224 0.991014
+0.491422 -0.294872 -0.361596 -0.133902 0.990513 0.0308958
+-0.5 0.178543 0.152885 1 0 0
+0.199338 -0.021912 -0.172481 0.830425 0.554321 0.0558722
+-0.0880811 0.371795 -0.112128 0 1 0
+0.376881 0.294872 0.00727117 0 1 0
+-0.106568 0.0821954 -0.333333 0 0 1
+-0.232085 0.271855 -0.371795 0 0 1
+-0.142556 -0.214943 0.371795 0 0 1
+0.31466 -0.182887 -0.343834 0.925432 -0.377158 0.0364276
+0.197413 0.0137479 0.320513 -0.216716 0.014808 0.976122
+-0.132315 -0.278943 -0.371795 0 0 1
+-0.495951 0.371795 -0.246483 -0.492406 0.868804 0.0521095
+-0.0378941 0.371795 -0.273612 0 1 0
+-0.403726 -0.209638 -0.371795 0 0 1
+-0.201549 -0.371795 0.244437 0 1 0
+0.141109 -0.313179 -0.240304 1 0 0
+-0.5 0.115531 -0.21843 1 0 0
+-0.5 -0.265221 0.127835 1 0 0
+-0.259604 0.109955 0.371795 0 0 1
+0.102566 -0.294872 -0.315238 0 1 0
+-0.3407 -0.236515 0.320513 0 0 1
+0.315905 -0.173814 0.338267 0.707107 -0.707107 0
+-0.0316377 -0.213776 -0.333333 0 0 1
+-0.499954 -0.288769 -0.371795 0.642334 0.310803 0.700577
+0.5 0.172582 0.142312 1 0 0
+0.409929 -0.371795 -0.247704 0 1 0
+-0.462534 0.371795 -0.23793 0 1 0
+-0.4309 0.334874 0.320513 0 0 1
+0.395742 -0.371795 -0.0245125 0 1 0
+-0.0353997 -0.294872 0.072427 0 1 0
+-0.400296 0.371795 0.0744379 0 1 0
+0.186227 -0.0281144 0.320513 0 0 1
+0.00108098 -0.163654 -0.333333 0 0 1
+0.413458 0.294872 -0.335596 0 1 0
+0.5 0.0799044 -0.118853 1 0 0
+-0.367489 0.11307 -0.371795 0 0 1
+0.042631 0.194329 0.320513 0.0042821 -0.349399 0.936964
+0.450529 0.245461 0.320513 0 0 1
+-0.5 0.14704 -0.0394821 1 0 0
+-0.0726775 0.230897 -0.353734 0 1 0
+0.314557 -0.371795 -0.277138 0 1 0
+0.141109 -0.34631 -0.227942 1 0 0
+0.364208 -0.0987421 0.321265 0.693301 -0.0976188 0.714006
+0.262003 -0.0221939 -0.00162335 0.72938 -0.56786 0.381496
+0.2049 0.0679179 -0.333333 0 0 1
+-0.36529 -0.371795 -0.255544 0 1 0
+-0.5 0.076288 0.15673 1 0 0
+0.185951 0.294872 0.259147 0 1 0
+0.026482 -0.165322 -0.333333 0 0 1
+0.216245 -0.353322 0.320513 0 0 1
+-0.5 0.224798 -0.363756 0.979731 0.0564615 0.192193
+-0.414482 0.18542 0.320513 0 0 1
+-0.349206 0.35886 0.320513 0 0 1
+0.5 -0.167536 0.235597 1 0 0
+0.5 0.144125 0.0342898 1 0 0
+-0.410655 -0.371795 -0.138489 0 1 0
+0.5 0.168034 0.205406 1 0 0
+0.0100513 0.107379 -0.333333 0 0 1
+0.118161 0.371795 0.239204 0 1 0
+0.20217 0.190961 0.371795 0 0 1
+0.5 0.276451 0.273769 1 0 0
+0.126196 0.371795 0.146363 0 1 0
+-0.5 0.264677 -0.273788 1 0 0
+0.5 0.293434 -0.219863 0.679555 0.726838 0.099556
+-0.5 0.107318 0.232303 1 0 0
+-0.5 0.115456 -0.0338905 1 0 0
+-0.301833 -0.0842288 -0.333333 0 0 1
+-0.223415 0.371795 0.150903 0 1 0
+0.5 -0.192502 0.207494 1 0 0
+0.0610556 -0.0557129 0.320513 0 0 1
+-0.5 0.031566 -0.355007 1 0 0
+-0.5 0.326303 0.222321 1 0 0
+0.433684 0.294872 0.039436 0 1 0
+0.494207 0.294872 -0.0897298 0.452261 0.886776 0.0953324
+-0.5 0.328156 0.279843 1 0 0
+-0.141154 -0.35572 -0.2114 1 0 0
+-0.0538351 -0.248766 0.371795 -0.0267865 -0.441224 0.896997
+0.357944 0.294872 -0.146066 0 1 0
+-0.365689 0.371795 0.253272 0 1 0
+0.171886 -0.214633 -0.333333 0 0 1
+-0.031313 -0.294872 -0.0373674 0 1 0
+-0.5 -0.200027 -0.178251 1 0 0
+-0.5 -0.036525 0.211316 1 0 0
+0.141026 0.356119 -0.223786 1 0 0
+-0.5 0.320273 0.296906 1 0 0
+-0.00829635 -0.294872 0.222974 0 1 0
+0.339875 -0.371795 0.301468 0 1 0
+-0.164366 0.109493 -0.333333 0 0 1
+-0.392933 -0.13263 0.320513 0 0 1
+0.141109 -0.32485 -0.322161 1 0 0
+0.5 -0.0713048 -0.32506 1 0 0
+-0.139773 -0.294872 -0.0249453 -0.578129 0.814832 0.0426064
+-0.11158 -0.0912854 -0.333333 0 0 1
+0.132362 -0.294872 0.060478 0.0948705 0.995467 -0.00676054
+-0.0769711 0.371795 -0.289001 0 1 0
+0.204773 -0.371795 0.311012 0.0181744 0.995928 -0.0883064
+0.5 -0.0523331 -0.357662 1 0 0
+0.431951 -0.371795 0.0855534 0 1 0
+0.217275 0.294872 0.0210428 0 1 0
+0.261041 0.0754441 -0.333333 0 0 1
+-0.141154 -0.340599 0.277419 1 0 0
+0.141026 0.369872 -0.0927118 0.80246 0.59628 -0.0225566
+0.0834578 0.0790813 0.320513 0 0 1
+0.00774209 -0.181165 -0.333333 0 0 1
+-0.5 0.243108 -0.178717 1 0 0
+-0.247379 -0.371795 -0.240115 0 1 0
+0.5 0.0996531 0.144868 1 0 0
+-0.174494 -0.371795 -0.178216 0 1 0
+-0.5 -0.167785 -0.137528 1 0 0
+0.5 0.164181 -0.299711 1 0 0
+0.141109 -0.365853 -0.122571 0.784144 0.620215 0.0212633
+-0.394595 -0.0392638 0.320513 0 0 1
+0.137072 0.0128677 0.320513 0 0 1
+-0.5 0.0679012 0.214492 1 0 0
+-0.288391 -0.371795 -0.232335 0 1 0
+0.185812 0.294872 0.09077 0 1 0
+0.271662 0.257869 0.320513 0 0 1
+-0.262606 -0.371795 0.105098 0 1 0
+0.448718 -0.316576 -0.113921 1 0 0
+-0.5 -0.26204 -0.345076 1 0 0
+-0.461337 0.371795 0.189779 0 1 0
+-0.34516 -0.186124 0.320513 0 0 1
+-0.379507 0.371795 0.089889 0 1 0
+-0.128818 -0.294872 0.226973 0 1 0
+0.035543 -0.256282 0.344705 0 1 0
+0.176953 0.294872 0.127291 0 1 0
+0.5 0.0112162 -0.332838 1 0 0
+-0.5 0.181853 0.14049 1 0 0
+-0.069746 -0.294872 0.195111 0 1 0
+0.467775 -0.274969 -0.371795 0 0 1
+0.154312 -0.371795 -0.0756211 0 1 0
+-0.258567 0.371795 -0.324639 0 1 0
+0.409362 -0.371795 -0.0503853 0 1 0
+-0.48906 0.10138 -0.371795 0.0583065 0.0061832 0.99828
+0.141415 0.0170448 -0.333333 0 0 1
+-0.127636 -0.294872 -0.168607 0 1 0
+0.0542552 0.111593 -0.333333 0 0 1
+0.362134 0.247656 -0.371795 0 0 1
+-0.148126 -0.371795 -0.0635065 -0.248969 0.96813 -0.0271658
+-0.0760235 -0.294872 -0.0210995 0 1 0
+-0.5 0.307249 -0.369489 0.906276 0.00283497 0.422678
+0.352707 -0.164663 0.320513 0 0 1
+-0.247369 -0.0469161 0.371795 0 0 1
+-0.0161696 -0.256282 0.366056 -0.0537878 0.882038 -0.468098
+-0.0533203 0.197969 0.336479 -0.288981 0.957321 -0.00507156
+-0.358829 0.231996 -0.371795 0 0 1
+-0.496589 -0.294872 0.0369385 0.50083 0.865128 -0.0268936
+0.31025 -0.0628079 -0.333333 0.00800122 0.000682058 0.999968
+0.32579 0.272904 0.320513 0 0 1
+0.293875 0.241369 -0.371795 0 0 1
+-0.18638 0.248952 0.367687 -0.304441 0.950527 0.0617628
+-0.5 -0.175251 0.223452 1 0 0
+0.5 0.0060076 -0.126031 1 0 0
+-0.386619 0.371795 -0.266749 0 1 0
+0.141109 -0.331016 -0.334852 1 0 0
+-0.39525 -0.371795 0.244133 0 1 0
+0.141109 -0.297519 -0.337612 0.936129 0.351403 0.0133777
+0.5 0.256204 -0.104549 1 0 0
+0.191202 -0.0651945 -0.333333 0 0 1
+-0.341361 -0.371795 -0.198309 0 1 0
+0.229326 -0.280832 0.320513 0 0 1
+-0.411002 -0.0499415 -0.371795 0 0 1
+0.200485 0.230897 -0.367504 0.103885 0.97177 0.211829
+0.228944 0.294872 -0.189762 0 1 0
+0.5 -0.00658548 -0.11053 1 0 0
+0.40172 0.241015 -0.371795 0 0 1
+0.141109 -0.314223 -0.246036 1 0 0
+-0.5 0.0945578 0.123623 1 0 0
+-0.5 0.269665 0.274218 1 0 0
+0.263469 -0.0422122 -0.333333 0 0 1
+0.316427 0.294872 -0.11366 0 1 0
+-0.482608 -0.168827 -0.371795 0 0 1
+0.374478 0.236075 -0.371795 0 0 1
+0.5 0.238829 0.315252 0.997099 -0.0283157 0.0706465
+0.257969 -0.00293826 0.00661186 0.524378 -0.0841462 0.847317
+0.5 0.00221096 -0.137222 1 0 0
+-0.467255 0.371795 -0.301474 0 1 0
+-0.134622 -0.150187 -0.333333 0 0 1
+0.0754335 -0.256282 0.368127 -0.0334644 0.94838 -0.315366
+-0.0184752 0.371795 0.0778382 0 1 0
+0.0861528 0.338795 0.320513 0 0 1
+-0.5 -0.101496 0.0791586 1 0 0
+0.083802 -0.28606 0.320513 0.0256962 -0.0431498 0.998738
+0.120563 0.356462 -0.371795 0 0 1
+0.120097 -0.294872 0.222338 0 1 0
+-0.170731 0.169706 0.371795 0 0 1
+0.141109 -0.295229 -0.266528 0.679251 0.733339 -0.0288381
+0.472926 -0.294872 0.217357 0 1 0
+0.189581 0.290715 -0.371795 0.03374 -0.146912 0.988574
+0.141026 0.323379 -0.326257 1 0 0
+0.228544 0.294872 0.300362 0 1 0
+-0.5 0.169641 0.288051 1 0 0
+0.5 -0.185748 -0.225335 1 0 0
+-0.0336952 -0.294872 -0.233343 0 1 0
+-0.247763 -0.275118 0.320513 0 0 1
+-0.453042 -0.14348 0.320513 0 0 1
+0.5 -0.117366 0.162684 1 0 0
+0.5 0.142267 -0.195873 1 0 0
+0.409597 -0.0688449 0.320513 0 0 1
+0.182935 0.294872 -0.156744 0 1 0
+-0.276465 0.371795 0.0844812 0 1 0
+0.114483 0.224951 0.371795 0 0 1
+-0.309945 -0.0188745 0.371795 0 0 1
+-0.0881918 0.274729 0.320513 0 0 1
+-0.5 0.0102574 0.0250933 1 0 0
+0.489075 -0.00562638 0.320513 0.0868789 0.0358754 0.995573
+0.385071 0.294872 -0.145311 0 1 0
+0.29089 -0.301173 -0.371795 0 0 1
+0.5 -0.257568 0.141475 1 0 0
+-0.131293 -0.125688 0.320513 0 0 1
+-0.172567 -0.364025 0.320513 0.0115358 -0.180913 0.983431
+0.448718 -0.366743 0.109888 0.958532 -0.281802 0.0424808
+0.5 -0.130125 -0.134244 1 0 0
+0.412614 0.294872 0.256582 0 1 0
+0.195092 -0.014152 -0.140406 0.934966 0.354639 -0.00841206
+-0.25879 -0.0333899 -0.239047 0.647778 0.761822 0.00320112
+-0.20223 -0.0328716 -0.184016 -0.65627 0.754263 -0.0199067
+-0.394324 0.371795 0.164654 0 1 0
+-0.113152 -0.172092 0.371795 0.428433 0.368798 0.824884
+0.00872673 -0.294872 -0.0501944 0 1 0
+-0.225334 0.236652 0.320513 -0.182979 0.823479 0.53703
+0.441058 0.229413 0.320513 0 0 1
+-0.5 0.279353 0.280138 1 0 0
+-0.00721419 -0.281084 0.320513 0 0 1
+0.5 -0.0272886 0.179838 1 0 0
+-0.298471 -0.371795 -0.199614 0 1 0
+-0.457837 -0.277442 0.320513 0 0 1
+0.5 -0.215471 -0.142611 1 0 0
+-0.225761 0.371795 0.0177535 0 1 0
+0.128315 -0.294872 -0.311241 0 1 0
+-0.0818921 -0.256282 0.363464 0.00737266 0.992967 -0.118163
+0.0103295 0.371795 0.0646911 0 1 0
+-0.183933 -0.249485 0.351772 0.212562 0.977148 0
+0.0896809 -0.294872 0.130555 0 1 0
+-0.141063 0.371795 0.198149 0 1 0
+0.212466 0.0192561 0.00709104 -0.331009 0.377378 0.864881
+0.188643 0.294872 0.00265905 0 1 0
+-0.5 0.224293 0.234217 1 0 0
+-0.320751 0.371795 -0.0810443 0 1 0
+-0.167524 -0.145529 0.371795 0 0 1
+0.00518106 0.371795 0.0228961 0 1 0
+0.136448 0.153011 0.341582 0.635446 0.772133 -0.00444855
+0.00500448 -0.294872 0.158222 0 1 0
+-0.5 0.349927 -0.303633 1 0 0
+0.376651 -0.0806469 0.320513 0.38151 0.0880496 0.920162
+0.382635 -0.0259044 0.358725 0.997454 -0.0713074 0
+-0.224694 0.371795 0.175113 0 1 0
+-0.483969 -0.250017 -0.371795 0 0 1
+-0.0940199 0.111512 -0.333333 0 0 1
+0.141109 -0.350803 -0.155119 1 0 0
+-0.33529 0.234112 0.320513 0 0 1
+0.250843 0.294872 0.0809247 0 1 0
+-0.0162818 -0.294872 0.0569599 0 1 0
+0.232999 0.294872 0.299276 0 1 0
+0.5 0.189551 0.235087 1 0 0
+-0.5 0.172528 -0.103395 1 0 0
+0.352855 -0.29163 0.320513 0 0 1
+0.5 0.0508835 0.295054 1 0 0
+0.127164 0.139202 -0.333333 0 0 1
+0.302336 0.294872 -0.0218891 0 1 0
+0.207019 0.0742701 -0.333333 0 0 1
+-0.36006 -0.371795 -0.322333 0 1 0
+0.141026 0.365804 -0.0283278 0.944601 0.272551 -0.182878
+0.5 -0.0643043 0.172457 1 0 0
+-0.5 -0.0987172 -0.0656865 1 0 0
+0.417283 -0.371795 -0.086053 0 1 0
+-0.096679 -0.269976 0.320513 -0.0276266 -0.0757547 0.996744
+-0.2481 -0.371795 -0.133639 0 1 0
+-0.00128577 -0.0682465 -0.333333 0 0 1
+-0.390742 0.371795 0.0806159 0 1 0
+-0.449646 0.371795 0.118529 0 1 0
+0.0202554 0.201882 -0.333333 0 0 1
+-0.366874 -0.371795 -0.290496 0 1 0
+-0.5 0.305008 -0.00974875 1 0 0
+-0.490843 -0.127654 0.320513 -0.0544597 0.0164828 0.99838
+-0.375471 -0.0659297 0.35342 0.972175 0.234198 -0.00512334
+-0.0748117 0.313464 -0.371795 0 0 1
+0.188898 -0.371795 -0.152781 0 1 0
+-0.418173 0.371795 -0.290618 0 1 0
+-0.339424 -0.371795 0.0499082 0 1 0
+-0.207525 0.144601 -0.333333 0 0 1
+0.355412 -0.371795 -0.358056 0 1 0
+-0.280041 -0.371795 -0.26956 0 1 0
+0.325056 -0.342227 0.320513 0 0 1
+0.0539763 0.371795 -0.0581132 0 1 0
+-0.0553224 0.371795 0.196651 0 1 0
+0.0868156 0.0277774 0.320513 0 0 1
+-0.106792 -0.234438 -0.371795 -0.0746563 0.801624 -0.593149
+0.202886 0.179067 -0.333333 0 0 1
+-0.0248993 0.371795 -0.346082 0 1 0
+-0.0334364 0.011114 0.320513 0 0 1
+0.141026 0.312909 0.256562 1 0 0
+-0.419791 -0.0710891 0.320513 0 0 1
+-0.210385 0.038408 -0.192006 0.4871 0.873216 -0.0150711
+-0.22607 0.371795 -0.00340848 0 1 0
+-0.00647443 -0.294872 -0.220569 0 1 0
+0.466172 0.294872 -0.139322 0 1 0
+-0.0861974 0.256282 0.327964 -0.0327004 0.998709 0.0388614
+-0.5 -0.171338 0.202949 1 0 0
+0.141109 -0.351988 0.0438541 1 0 0
+0.209282 -0.307073 -0.371795 0 0 1
+0.207667 0.294872 -0.188341 0 1 0
+0.219773 -0.157502 -0.333333 0 0 1
+0.120671 0.371795 -0.31408 0 1 0
+0.00809187 0.371795 0.189638 0 1 0
+-0.0538967 0.371795 -0.121062 0 1 0
+0.48364 -0.294872 0.155073 0 1 0
+-0.5 0.303611 0.200964 1 0 0
+-0.356371 0.00480464 0.371795 0 0 1
+0.25502 0.0297935 -0.250812 0.637856 0.770142 0.00457605
+-0.23341 0.062509 0.371795 0 0 1
+-0.162257 -0.227003 -0.333333 0.0208632 -0.669882 0.742174
+-0.144278 -0.371795 -0.0866725 -0.51786 0.848578 0.10833
+0.0808269 -0.0326946 -0.333333 0 0 1
+-0.498358 0.371795 -0.296274 0.716516 -0.69723 -0.0218148
+0.5 -0.0486457 -0.304666 1 0 0
+0.190688 -0.0893038 0.371795 -0.231697 0.0520541 0.971394
+-0.190553 -0.13412 -0.333333 0 0 1
+0.5 0.115077 -0.0537973 1 0 0
+0.0161388 0.294742 0.320513 0 0 1
+0.0510713 0.256282 0.355326 0 1 0
+0.458672 0.230379 0.320513 0 0 1
+0.137573 0.371795 -0.314101 0.301071 0.949135 -0.0921888
+0.097931 -0.248395 -0.371795 0 0 1
+-0.336925 0.176001 0.320513 0 0 1
+-0.5 -0.145592 0.0598415 1 0 0
+0.0850431 0.263318 -0.371795 0 0 1
+-0.265471 -0.371795 0.270173 0 1 0
+-0.0188413 -0.294872 0.029685 0 1 0
+-0.5 -0.201677 -0.19383 1 0 0
+0.358671 0.111329 0.346873 0.886272 0.463156 -0.00298358
+-0.47029 0.054791 0.320513 0 0 1
+0.5 -0.229266 -0.176641 1 0 0
+0.051421 -0.294872 -0.285581 0 1 0
+-0.03108 -0.294872 -0.13457 0 1 0
+-0.0149566 0.371795 -0.287202 0 1 0
+-0.457337 -0.294872 -0.224095 0.0390191 0.99922 0.00611949
+0.319997 -0.159872 -0.341835 0.995149 -0.0938645 0.0294512
+-0.5 -0.282239 -0.054031 1 0 0
+0.0560632 0.371795 0.111661 0 1 0
+-0.330182 0.371795 -0.142228 0 1 0
+-0.131412 0.137269 0.320513 0 0 1
+0.264777 0.294872 -0.26847 0 1 0
+0.259386 -0.0255689 -0.145619 0.755413 -0.655249 0
+0.263865 -0.0195347 -0.172603 0.85635 -0.516209 -0.0138719
+0.223035 0.0453936 0.371795 0 0 1
+0.0816292 -0.256282 0.365521 -0.0766466 0.976265 -0.202565
+0.178747 -0.0130403 0.320513 0 0 1
+-0.5 -0.257008 -0.322645 1 0 0
+0.0101687 0.371795 -0.00812308 0 1 0
+-0.188043 -0.00831991 -0.220064 0.981913 -0.189331 0.000642969
+0.139771 0.241165 -0.371795 0.0125445 0.046248 0.998851
+-0.439222 0.0186482 -0.371795 0 0 1
+0.445928 0.0107374 0.320513 0 0 1
+0.320513 0.131143 -0.365161 0.963121 0.0550329 0.263381
+-0.2827 -0.256132 0.320513 0 0 1
+0.250055 -0.0332699 -0.215169 -0.524938 0.851128 0.00449847
+-0.140765 -0.294872 -0.220136 -0.656608 0.752512 -0.050919
+0.5 0.235814 -0.243775 1 0 0
+-0.33814 0.0661854 -0.371795 0 0 1
+-0.344182 -0.371795 -0.245048 0 1 0
+-0.189929 0.244326 0.371795 -0.0829927 0.372204 0.924433
+-0.326531 -0.363553 -0.371795 0.0448127 0.232907 0.971466
+0.124809 -0.294872 -0.0517592 0 1 0
+-0.216786 -0.132774 0.371795 0 0 1
+0.19604 -0.371795 0.243409 0 1 0
+-0.369076 -0.214853 0.320513 0 0 1
+0.5 0.22854 0.110712 1 0 0
+0.5 0.26567 0.0283056 1 0 0
+-0.5 0.126407 -0.168634 1 0 0
+0.199167 0.0749764 0.371795 -0.180899 -0.1388 0.973658
+-0.483802 -0.224613 -0.371795 0 0 1
+0.329241 -0.371795 -0.352693 0 1 0
+0.389293 -0.371795 0.0238284 0 1 0
+-0.267211 -0.0236632 -0.0599123 0.833796 0.551799 -0.0173947
+-0.378926 -0.371795 -0.349114 0 1 0
+0.131871 0.0374253 0.320513 0 0 1
+-0.344947 0.371795 -0.335173 0 1 0
+-0.194865 0.0637632 0.370426 0.561977 -0.232055 0.793935
+0.0930751 0.288821 -0.371795 0 0 1
+0.451147 -0.255832 -0.371795 0 0 1
+0.159709 0.128533 0.366552 0.751292 0.634794 -0.180546
+0.264089 -0.0195048 0.371795 0 0 1
+-0.5 0.224371 0.261977 1 0 0
+0.10019 -0.00504246 0.320513 0 0 1
+-0.448718 -0.324619 -0.0360437 1 0 0
+0.141109 -0.321875 0.251615 1 0 0
+-0.5 0.325069 -0.275428 1 0 0
+0.35288 -0.371795 -0.342661 0 1 0
+0.5 0.21639 0.1041 1 0 0
+0.110877 -0.294872 -0.291223 0 1 0
+0.336737 -0.114178 0.371795 0 0 1
+-0.5 -0.163842 0.0427978 1 0 0
+-0.034452 -0.294872 0.151579 0 1 0
+-0.383125 0.0190469 0.370004 0.759678 0.184009 -0.623723
+0.5 0.271201 -0.122404 1 0 0
+0.305581 0.294872 0.143031 0 1 0
+0.5 0.0125488 0.0765382 1 0 0
+-0.419794 0.225659 -0.371795 0 0 1
+0.478795 0.238237 -0.371795 0 0 1
+-0.09298 0.371795 -0.202387 0 1 0
+-0.398951 -0.111615 -0.371795 0 0 1
+0.0390231 0.323828 -0.371795 0 0 1
+-0.141154 -0.350281 0.206805 1 0 0
+-0.42113 0.215912 0.320513 0 0 1
+-0.409398 0.371795 0.0720173 0 1 0
+-0.231751 -0.371795 -0.0537863 0 1 0
+0.282196 -0.0742082 -0.333333 0 0 1
+0.166533 -0.371795 -0.0313313 0 1 0
+-0.141154 -0.301839 -0.179974 0.987813 -0.155332 0.00986093
+0.487102 0.294872 -0.170476 0 1 0
+-0.5 -0.272191 -0.302029 1 0 0
+-0.404892 0.191401 0.320513 0 0 1
+-0.489303 0.263728 -0.371795 0 0 1
+0.141109 -0.311086 -0.261935 1 0 0
+0.0583733 -0.294872 0.0483986 0 1 0
+-0.5 0.193671 0.202812 1 0 0
+0.141109 -0.351653 0.237642 1 0 0
+-0.5 -0.274333 0.267901 1 0 0
+0.0035391 -0.256282 0.356751 0 1 0
+-0.383728 -0.0106101 0.347622 0.997443 0.0714602 0.00010386
+-0.453733 -0.177778 0.320513 0 0 1
+-0.5 0.220494 0.289476 1 0 0
+0.126015 0.256282 0.347941 0.027168 0.999603 0.00743481
+0.448718 -0.352814 0.142514 1 0 0
+-0.379146 0.371795 -0.0105408 0 1 0
+-0.5 0.0170885 -0.053316 1 0 0
+-0.391307 0.371795 -0.078022 0 1 0
+0.208224 -0.371795 0.0769772 0 1 0
+0.218692 0.0364306 -0.264214 -0.282944 0.958916 0.0205439
+0.153016 -0.371795 0.303117 0.0361685 0.999209 -0.0165504
+-0.0476562 -0.294872 -0.165476 0 1 0
+-0.249932 -0.0389775 -0.23536 0.436158 0.899435 0.0279723
+0.108817 -0.129033 -0.333333 0 0 1
+0.297418 0.12117 -0.333333 0 0 1
+-0.5 0.125606 -0.332596 1 0 0
+0.5 0.189435 -0.035789 1 0 0
+0.4009 0.25631 -0.371795 0 0 1
+0.267104 -0.371795 0.152553 0 1 0
+0.142938 0.255228 0.355633 0.0713499 0.997451 0
+-0.379613 0.125509 -0.371795 0 0 1
+-0.5 0.29925 -0.206553 1 0 0
+0.200162 -0.365749 -0.371795 -0.01349 0.24563 0.96927
+-0.322273 0.167318 0.369829 0.549176 -0.594042 -0.587809
+-0.368754 -0.0865504 0.365297 0.89779 0.38298 -0.217487
+0.107553 -0.22193 0.371795 0 0 1
+-0.229511 0.0434797 -0.181279 0.0407518 0.99913 -0.00889526
+0.186561 -0.0718833 -0.333333 0 0 1
+0.20831 0.294872 -0.1466 0 1 0
+-0.124913 0.096756 0.320513 0 0 1
+-0.283028 -0.0278919 -0.333333 0 0 1
+0.379589 -0.317066 0.320513 0 0 1
+0.5 -0.129912 -0.223643 1 0 0
+0.271526 0.212032 0.358772 0.577462 0.816406 0.00440436
+-0.430191 0.167418 -0.371795 0 0 1
+0.5 -0.272452 0.272759 1 0 0
+0.141109 -0.37001 -0.0470804 0.530393 0.842275 -0.0962076
+-0.393237 -0.371795 -0.0154505 0 1 0
+-0.0270414 0.371795 0.302706 0 1 0
+0.116146 0.119587 -0.333333 0 0 1
+0.320513 -0.0632652 -0.371287 0.484068 0.00360046 0.875023
+0.141109 -0.356933 0.178832 1 0 0
+-0.426539 0.312631 0.320513 0 0 1
+-0.240955 0.371795 -0.190825 0 1 0
+-0.465552 -0.294872 0.0852079 0 1 0
+-0.138428 0.0529873 0.320513 0 0 1
+-0.203815 0.24463 0.326719 -0.255731 0.931452 0.258842
+0.386651 0.294872 0.0997651 0 1 0
+0.426894 -0.1527 0.320513 0 0 1
+0.158595 -0.0612777 0.320513 0 0 1
+0.252862 -0.223188 0.342015 -0.479258 0.877674 0
+-0.239992 -0.30312 0.320513 0 0 1
+0.5 0.11879 -0.0848167 1 0 0
+0.238696 0.174132 0.371795 0 0 1
+0.0604877 -0.294872 -0.134328 0 1 0
+-0.169985 0.371795 -0.251124 0 1 0
+0.232023 -0.371795 0.247354 0 1 0
+-0.5 0.308621 0.237666 1 0 0
+0.5 0.064413 0.180759 1 0 0
+0.448718 -0.308056 0.00617714 1 0 0
+0.104482 -0.256282 0.36489 -0.00987759 0.995992 -0.0888969
+0.43557 0.0895079 -0.371795 0 0 1
+-0.295874 0.0252963 -0.333333 0 0 1
+-0.141154 -0.306278 -0.0632152 1 0 0
+-0.5 -0.0736549 -0.315864 1 0 0
+0.291122 -0.371795 0.0918973 0 1 0
+0.16399 0.294872 0.196029 0 1 0
+0.339747 -0.371795 -0.119073 0 1 0
+0.141026 0.311232 -0.0637023 1 0 0
+-0.0763593 -0.283031 0.320513 0 0 1
+-0.299921 0.371795 0.0537879 0 1 0
+0.117957 0.371795 0.282052 0 1 0
+-0.158443 0.371795 -0.255173 0 1 0
+-0.5 -0.030135 -0.00762744 1 0 0
+-0.448718 -0.36804 -0.171985 0.927598 0.373528 -0.00624634
+0.275552 -0.371795 0.12982 0 1 0
+-0.190105 -0.0155462 -0.148591 0.930185 -0.366716 0.0166057
+-0.448718 -0.295784 -0.269818 0.863888 0.500773 -0.0540721
+0.269095 -0.00154943 -0.236368 0.996367 -0.0851351 0.00232318
+-0.5 0.152342 -0.106777 1 0 0
+0.156102 0.148685 -0.333333 0 0 1
+0.141026 0.319597 -0.219193 1 0 0
+-0.295713 -0.193926 0.348421 0.636617 0.771122 0.00945765
+0.429595 0.294872 0.292295 0 1 0
+0.320513 -0.0252143 -0.336581 0.987095 -0.00163847 0.160128
+0.24959 -0.357616 0.320513 0 0 1
+-0.187597 0.00477537 -0.333228 0.806344 0.0464219 0.589622
+-0.477844 0.371795 0.233457 0 1 0
+-0.0733671 -0.294872 -0.319713 0 1 0
+0.497754 0.294872 0.209127 0.306721 0.949245 0.0696919
+0.224409 0.037905 -0.296746 -0.156813 0.987516 -0.0148955
+-0.371913 0.163062 0.320513 0 0 1
+0.496809 0.276574 0.320513 0.374805 0.0582643 0.925271
+-0.197779 0.0284201 -0.180537 0.789895 0.613236 0.0028524
+0.216 0.274838 -0.371795 0 0 1
+-0.150562 0.00105026 0.320513 0 0 1
+-0.0285539 0.317521 0.320513 0 0 1
+0.270292 0.294872 -0.317843 0 1 0
+0.224321 0.0378974 -0.151781 -0.184908 0.982756 0
+0.0431243 -0.0833357 0.320513 0 0 1
+-0.19636 -0.246782 0.325591 0.162543 0.854667 -0.493077
+0.0345301 -0.168056 0.320513 0 0 1
+0.206087 -0.371795 0.300844 0 1 0
+0.486073 0.294872 0.0984393 0 1 0
+0.454378 0.294872 0.201253 0 1 0
+-0.0419212 0.200389 0.358375 -0.164576 0.986364 0
+-0.0460303 0.0789467 -0.333333 0 0 1
+-0.5 -0.230728 -0.0323796 1 0 0
+-0.315438 0.371795 0.0799472 0 1 0
+-0.397515 0.123945 -0.371795 0 0 1
+0.0658107 0.371795 0.0142021 0 1 0
+-0.243993 0.346468 0.320513 0 0 1
+-0.188964 -0.371795 -0.231495 0 1 0
+-0.342352 -0.112654 0.371795 0 0 1
+0.0764492 -0.294872 -0.194276 0 1 0
+-0.0535904 0.371795 -0.232493 0 1 0
+0.358704 0.0225908 -0.371795 0 0 1
+-0.5 -0.191091 0.240561 1 0 0
+0.450878 -0.244217 0.320513 0 0 1
+0.5 0.135885 0.105806 1 0 0
+0.074507 -0.241157 -0.371795 0 0 1
+0.0898048 0.230897 -0.367663 -0.0968255 0.769593 0.631151
+-0.141154 -0.355714 0.0167859 1 0 0
+-0.405866 0.243342 0.320513 0 0 1
+-0.195918 -0.230897 -0.338845 -0.0444816 0.894061 -0.445731
+-0.211966 -0.202617 0.371795 0 0 1
+-0.5 0.111567 -0.316772 1 0 0
+0.5 0.108285 0.110672 1 0 0
+-0.448718 -0.350886 0.119644 1 0 0
+0.387077 -0.371795 0.00582575 0 1 0
+-0.12975 0.132524 -0.333333 0 0 1
+-0.5 -0.213798 -0.281669 1 0 0
+0.448718 -0.312478 -0.13179 1 0 0
+-0.370835 0.371795 -0.293352 0 1 0
+0.474673 -0.294872 -0.192075 0 1 0
+0.5 -0.124714 0.0596929 1 0 0
+0.0766917 -0.153898 -0.333333 0 0 1
+0.00654277 -0.294872 -0.326344 0 1 0
+-0.437542 0.120506 -0.371795 0 0 1
+-0.485409 0.274117 -0.371795 0 0 1
+-0.5 -0.0782145 0.315488 0.937789 0.0503744 -0.343533
+-0.448718 -0.296993 0.178201 0.864639 0.502354 0.00631069
+-0.114474 -0.294872 -0.0136232 0 1 0
+-0.485043 0.371795 0.0715581 0 1 0
+0.448718 -0.335663 -0.0744611 1 0 0
+-0.286227 0.371795 -0.26963 0 1 0
+0.340868 -0.371795 -0.121073 0 1 0
+0.0897484 -0.126526 -0.333333 0 0 1
+0.5 0.228038 -0.190283 1 0 0
+-0.5 0.227124 -0.0815954 1 0 0
+0.155666 -0.0300277 -0.333333 0 0 1
+-0.0501294 -0.294872 -0.130318 0 1 0
+0.418136 -0.160577 0.320513 0 0 1
+0.5 -0.0937734 0.300875 1 0 0
+0.0755398 0.371795 -0.10131 0 1 0
+0.5 0.0768449 0.306554 1 0 0
+0.0710104 -0.051517 0.320513 0 0 1
+0.199875 0.0226786 -0.214396 0.800074 -0.599818 -0.00993467
+-0.5 0.0374808 0.122602 1 0 0
+-0.5 -0.137096 0.0927633 1 0 0
+-0.0996648 -0.294872 -0.227689 0 1 0
+0.0622533 0.15762 -0.333333 0 0 1
+0.468233 0.201671 -0.371795 0 0 1
+0.468857 -0.294872 -0.314639 0 1 0
+0.250855 0.224284 0.35091 0.479249 0.877679 0
+0.207263 0.230897 -0.353257 0 1 0
+0.21093 -0.317466 -0.371795 0 0 1
+-0.105412 0.0912674 0.320513 0 0 1
+-0.0786546 0.371795 -0.0577428 0 1 0
+0.183343 -0.225861 -0.333333 0.0195153 -0.308386 0.951061
+-0.5 0.0107068 0.232005 1 0 0
+-0.220776 0.371795 -0.365943 -0.0265097 0.993985 -0.106257
+-0.347317 -0.0898505 -0.371795 0 0 1
+-0.200006 0.139044 -0.333333 0 0 1
+0.127153 0.371795 -0.350654 0 1 0
+-0.5 0.290683 0.215959 1 0 0
+-0.482443 -0.01087 -0.371795 0 0 1
+-0.442235 0.371795 0.0805452 0 1 0
+0.394116 -0.334985 -0.371795 0 0 1
+-0.433814 0.212454 -0.371795 0 0 1
+0.5 0.268008 -0.168172 1 0 0
+-0.366586 -0.371795 -0.0564899 0 1 0
+0.0237136 0.172123 -0.333333 0 0 1
+0.0032812 -0.014229 0.320513 0 0 1
+0.262373 -0.0843719 0.371795 0 0 1
+0.5 0.0458026 0.0915697 1 0 0
+0.320513 0.0861897 -0.333771 0.854919 -0.114889 0.505879
+0.055496 0.371795 0.0946828 0 1 0
+0.024067 -0.112123 -0.333333 0 0 1
+0.111418 -0.155278 0.320513 0 0 1
+-0.0854275 0.271775 -0.371795 0 0 1
+0.248755 0.294872 -0.118052 0 1 0
+-0.5 0.34565 -0.251352 1 0 0
+-0.254234 0.371795 -0.312788 0 1 0
+0.303907 -0.123811 0.371795 0 0 1
+-0.471356 -0.294872 0.247841 0 1 0
+0.255555 -0.221717 0.332139 -0.479262 0.877672 0
+0.310656 0.0439807 -0.333333 0.127238 0.000202815 0.991872
+0.5 0.0402557 0.085123 1 0 0
+0.154863 0.294872 -0.0972573 0 1 0
+0.5 0.14254 -0.0877255 1 0 0
+0.5 0.179625 -0.339477 1 0 0
+0.152103 -0.0521697 0.320513 0 0 1
+0.0454137 0.199806 0.365078 0.258871 0.937306 -0.233332
+0.427121 -0.173807 0.320513 0 0 1
+-0.0227072 -0.256282 0.344717 0 1 0
+0.358654 0.294872 0.0217335 0 1 0
+-0.5 0.140538 -0.0368943 1 0 0
+-0.184352 0.18986 -0.333333 0 0 1
+-0.0306776 0.159031 0.320513 0 0 1
+0.482988 0.294872 0.015905 0 1 0
+-0.103034 -0.0300514 0.320513 0 0 1
+-0.458509 -0.294872 0.233311 0 1 0
+-0.5 -0.133478 0.0613388 1 0 0
+0.105028 -0.294872 0.227022 0 1 0
+0.0431765 0.261355 0.320513 0.0463793 0.0993796 0.993968
+0.5 0.0915563 0.127532 1 0 0
+-0.211253 -0.371795 -0.0452851 0 1 0
+0.366155 -0.371795 -0.080919 0 1 0
+0.0917136 0.371795 0.0114737 0 1 0
+0.5 -0.217177 -0.198148 1 0 0
+-0.0566999 0.230897 -0.370043 -0.10823 0.895038 0.432659
+-0.5 -0.191679 -0.250099 1 0 0
+0.388779 -0.371795 -0.176215 0 1 0
+-0.0367345 -0.0331661 -0.333333 0 0 1
+-0.5 0.259653 0.0787829 1 0 0
+-0.277314 -0.371795 -0.188246 0 1 0
+0.177234 -0.093569 -0.333333 0 0 1
+0.401656 -0.371795 0.310062 -0.0201813 0.998021 -0.0595636
+-0.259715 0.032465 -0.303604 -0.673362 0.739313 0
+-0.483574 -0.104923 0.320513 0 0 1
+0.5 -0.118842 -0.0546834 1 0 0
+0.267596 -0.010597 -0.0260439 0.967494 -0.251543 0.0261153
+-0.16361 -0.137284 0.371795 0.0447167 0.0219916 0.998758
+0.5 0.0406547 -0.00413458 1 0 0
+-0.178931 -0.19576 0.371795 0 0 1
+-0.5 0.370708 0.270871 0.962398 -0.270545 0.0243888
+-0.195172 0.371795 -0.237666 0 1 0
+-0.131402 -0.186928 0.371795 0 0 1
+0.148085 -0.186774 0.371795 0 0 1
+0.297284 -0.0285885 0.371795 0 0 1
+0.251129 -0.230238 -0.342639 -0.127509 0.983278 -0.130024
+0.141026 0.328287 -0.144992 1 0 0
+0.5 0.258249 0.183327 1 0 0
+0.0763864 0.371795 0.186397 0 1 0
+-0.5 -0.149643 -0.248842 1 0 0
+-0.302501 0.371795 0.205668 0 1 0
+0.384155 -0.333524 -0.371795 0 0 1
+-0.443455 -0.371795 0.057713 0.21746 0.975971 -0.0138677
+-0.5 -0.253594 0.00334875 1 0 0
+-0.5 0.0326181 -0.252642 1 0 0
+-0.400802 -0.13552 -0.371795 0 0 1
+-0.00151976 0.371795 0.291384 0 1 0
+-0.167431 0.117722 0.339183 0.837155 -0.546966 0
+0.141026 0.346129 -0.357687 1 0 0
+0.0841626 0.358584 0.320513 0 0 1
+-0.495519 -0.294872 -0.323161 0.827493 0.558965 -0.0530323
+0.5 -0.234694 0.145384 1 0 0
+-0.413145 -0.371795 0.0155319 0 1 0
+0.324367 -0.052273 -0.371795 0.529923 -0.0355368 0.847301
+0.153489 0.294872 -0.309528 0 1 0
+0.20928 -0.371795 0.163962 0 1 0
+-0.307112 -0.371795 0.15422 0 1 0
+-0.142473 0.00179236 -0.333333 0 0 1
+0.231998 -0.371795 -0.00463373 0 1 0
+-0.427593 0.190689 -0.371795 0 0 1
+0.164577 0.100997 0.320513 0 0 1
+0.394318 -0.371795 -0.267726 0 1 0
+-0.5 0.334202 -0.00576887 1 0 0
+-0.168689 -0.230897 -0.346235 0 1 0
+-0.212809 -0.164836 0.371795 0 0 1
+-0.303734 0.371795 0.318028 0.121163 0.885345 0.44887
+0.441238 -0.371795 -0.124056 -0.0650423 0.997845 -0.00868667
+-0.241055 -0.230897 -0.343592 0.0191597 0.99641 -0.0824596
+-0.5 -0.265337 -0.236469 1 0 0
+0.192053 0.174427 0.371795 0 0 1
+0.427004 -0.371795 0.274796 0 1 0
+-0.0792274 0.371795 0.04923 0 1 0
+-0.242085 -0.0419236 -0.0377493 0.287763 0.888945 -0.356329
+-0.5 0.350725 0.21103 1 0 0
+0.219044 0.0365249 -0.30649 -0.331211 0.943555 0.00188178
+-0.227648 0.0433168 -0.292716 0.0459772 0.998929 0.00524
+0.165872 -0.142426 -0.333333 0 0 1
+0.211032 -0.264372 0.320513 0 0 1
+-0.320725 -0.371795 0.216107 0 1 0
+-0.186681 0.371795 -0.0162237 0 1 0
+0.436079 -0.371795 0.0463072 -0.0390484 0.999148 -0.0133368
+-0.469428 -0.1818 0.320513 0 0 1
+0.282553 -0.0952492 0.371795 0 0 1
+-0.0847125 0.0392426 -0.333333 0 0 1
+-0.297469 0.190084 -0.333333 0 0 1
+-0.459102 -0.271295 0.320513 0 0 1
+0.295836 -0.371795 -0.0113347 0 1 0
+0.25595 -0.371795 0.122255 0 1 0
+0.207422 -0.371795 0.281037 0 1 0
+-0.000811397 0.371795 -0.0565603 0 1 0
+-0.0878225 0.371795 0.0228304 0 1 0
+-0.5 -0.208238 0.221806 1 0 0
+0.0717595 0.371795 0.176078 0 1 0
+-0.5 -0.201385 -0.249741 1 0 0
+0.261407 0.228534 -0.361952 0.238343 0.971099 0.0126066
+-0.5 -0.189687 -0.248038 1 0 0
+-0.345549 -0.00514803 -0.371795 0 0 1
+-0.141154 -0.327022 0.305943 1 0 0
+0.467131 -0.0299178 0.320513 0 0 1
+-0.272995 0.0101868 -0.110347 0.978196 -0.207466 -0.00953849
+-0.185667 0.249107 0.367367 -0.300499 0.952639 0.0466759
+0.468824 0.268235 -0.371795 0 0 1
+-0.0922354 -0.184687 -0.333333 0 0 1
+0.141109 -0.319474 -0.0379219 1 0 0
+-0.342291 -0.300962 0.320513 0 0 1
+0.325837 0.288024 -0.371795 -0.0132956 -0.122123 0.992426
+0.280321 0.294872 0.110055 0 1 0
+-0.48334 0.31816 0.320513 0 0 1
+-0.259672 -0.165396 0.371795 0 0 1
+0.418998 -0.371795 0.137461 0 1 0
+0.434711 -0.371795 -0.0644519 0 1 0
+0.196659 -0.371795 -0.141916 0 1 0
+0.440237 -0.371795 0.188258 -0.149745 0.983714 -0.0994119
+0.5 0.14868 -0.294606 1 0 0
+0.0405979 -0.294872 0.0731116 0 1 0
+-0.202294 -0.0329352 -0.0460605 -0.632949 0.774194 0
+-0.167265 -0.371795 0.0625729 0 1 0
+0.248947 -0.0337996 -0.302999 -0.484252 0.874928 0
+0.306831 0.197258 -0.350732 0.822767 0.568379 0
+0.189676 -0.371795 -0.12424 0 1 0
+-0.25547 -0.00281244 0.371795 0 0 1
+-0.320513 0.144443 -0.371275 0.763838 -0.131082 -0.631957
+0.0335723 -0.0373443 0.320513 0 0 1
+-0.5 0.134168 -0.0281493 1 0 0
+-0.352021 0.104757 0.371795 -0.0369068 0.0855328 0.995652
+0.327076 0.294872 -0.0681809 0 1 0
+-0.210597 -0.328036 -0.371795 0 0 1
+0.246369 0.035002 -0.0663562 0.467865 0.883593 -0.0191354
+-0.334536 -0.371795 0.306974 0 1 0
+0.350283 -0.214603 -0.371795 0 0 1
+-0.49237 0.369144 0.320513 0.0812546 0.742698 0.664678
+-0.133275 -0.0733284 -0.333333 0 0 1
+-0.203618 0.371795 -0.284583 0 1 0
+-0.448718 -0.307917 -0.343933 0.999775 0.0196572 0.0080006
+0.147325 -0.038808 -0.333333 0 0 1
+-0.0687031 0.371795 0.310999 0 1 0
+0.135591 0.371795 0.100648 0.382782 0.923839 0
+0.141026 0.350855 0.177741 1 0 0
+0.491053 -0.22676 -0.371795 -0.197928 0.0284571 0.979803
+0.195636 0.294872 -0.335243 0 1 0
+0.0906886 0.13808 -0.333333 0 0 1
+-0.196981 0.17468 0.371795 0 0 1
+-0.345445 0.155208 -0.371795 0 0 1
+-0.122522 -0.294872 -0.0812103 0 1 0
+-0.260715 -0.212629 0.371795 -0.0168282 -0.129653 0.991417
+-0.0593587 0.173544 -0.333333 0 0 1
+0.0610181 0.371795 0.0823508 0 1 0
+-0.110852 0.226939 0.371795 0 0 1
+0.119794 0.366263 -0.371795 -0.0263473 -0.213858 0.976509
+-0.5 0.234291 -0.30296 1 0 0
+-0.22609 -0.109719 -0.333333 0 0 1
+0.41886 -0.0340141 -0.371795 0 0 1
+0.486528 0.294872 0.236745 0 1 0
+-0.472079 -0.294872 0.241158 0 1 0
+-0.5 -0.197362 0.177246 1 0 0
+0.189168 0.0773769 0.320513 0.703519 0.387213 -0.595926
+-0.383666 0.371795 0.262957 0 1 0
+-0.234191 0.18256 0.371795 0 0 1
+0.146498 -0.371795 -0.189714 0.144771 0.980768 0.1309
+0.286306 -0.371795 -0.13638 0 1 0
+-0.141154 -0.331684 -0.173027 1 0 0
+0.320513 0.0592454 -0.365263 0.977396 -0.0323116 0.208933
+-0.00241884 -0.294872 -0.104914 0 1 0
+0.148997 0.0839073 -0.333333 0 0 1
+0.459168 -0.294872 -0.144937 -0.0687228 0.997636 -4.12495e-005
+0.4378 0.15628 0.320513 0 0 1
+0.400913 -0.326353 0.320513 0 0 1
+0.185337 -0.0902986 -0.333333 0 0 1
+0.295342 0.294872 0.294048 0 1 0
+0.251794 0.0815371 0.371795 0 0 1
+-0.123237 0.371795 0.00384028 0 1 0
+0.217351 0.294872 -0.105717 0 1 0
+0.0361793 0.371795 -0.286156 0 1 0
+-0.370048 0.27284 0.320513 0 0 1
+-0.224787 0.053157 -0.333333 0.0422874 0.0723637 0.996481
+-0.161895 0.0518476 -0.333333 0 0 1
+0.447631 0.152009 0.320513 0 0 1
+0.322871 0.294872 -0.147957 0 1 0
+0.139537 -0.294872 -0.226452 0.546443 0.833492 -0.0817995
+-0.5 0.343334 -0.00628026 1 0 0
+0.141109 -0.355804 0.115318 1 0 0
+-0.230901 -0.0435782 -0.166926 -0.0571603 0.998074 -0.0240881
+0.409327 -0.371795 -0.32399 0 1 0
+-0.354738 0.217925 -0.371795 0 0 1
+0.206687 0.127923 -0.333333 0 0 1
+0.5 -0.254366 0.0489894 1 0 0
+-0.225036 -0.371795 -0.354246 0 1 0
+-0.259581 -0.371795 0.152311 0 1 0
+0.5 0.0488342 -0.100654 1 0 0
+-0.249759 -0.039058 -0.156887 0.435849 0.899939 -0.0120438
+0.486814 -0.294872 -0.294372 0 1 0
+-0.135703 0.32884 -0.371795 0 0 1
+0.448718 -0.36085 0.0536779 0.999635 -0.0269088 -0.00224638
+0.5 0.112623 -0.191017 1 0 0
+0.349858 0.0488271 -0.371795 0 0 1
+-0.294581 0.371795 0.0897979 0 1 0
+-0.5 -0.230236 0.133449 1 0 0
+0.5 -0.182111 0.0823357 1 0 0
+-0.5 -0.256963 -0.258335 1 0 0
+0.404026 0.0216709 -0.371795 0 0 1
+0.181641 0.294872 -0.37062 0.176727 0.810678 -0.558183
+-0.36445 -0.35523 0.320513 0 0 1
+0.141026 0.319849 0.0653899 1 0 0
+0.5 0.279381 -0.207503 1 0 0
+-0.434978 -0.371795 0.258647 0 1 0
+-0.170366 -0.371795 0.0804569 0 1 0
+0.213216 -0.371795 0.0144179 0 1 0
+0.281982 0.234507 0.320513 0 0 1
+0.5 -0.131699 0.239477 1 0 0
+-0.202657 0.291462 0.320513 0 0 1
+0.141026 0.313245 0.0630197 1 0 0
+0.5 0.0245428 -0.0733239 1 0 0
+0.364604 0.187864 -0.371795 0 0 1
+-0.13434 0.273125 0.320513 0 0 1
+-0.5 0.0822545 -0.29673 1 0 0
+-0.5 -0.0839198 -0.193882 1 0 0
+0.5 0.0817534 0.0953963 1 0 0
+-0.5 0.142142 -0.360441 1 0 0
+0.5 -0.0795163 0.29673 1 0 0
+-0.0224247 -0.228616 -0.333333 -0.0228906 -0.343157 0.938999
+0.0480329 0.199369 0.362815 0.214239 0.976772 -0.00415969
+-0.295313 -0.0703165 -0.333333 0 0 1
+0.438683 -0.187938 -0.371795 0 0 1
+-0.165328 0.120941 0.367338 0.817301 -0.574392 0.0457458
+-0.432054 -0.371795 -0.19302 0 1 0
+0.141026 0.302537 0.281009 0.951461 0.306504 0.0278714
+0.141026 0.302441 -0.0657734 0.997924 0.0623279 -0.0162239
+-0.305935 -0.189661 -0.333333 -0.253063 -0.248035 0.935114
+0.0903768 0.371795 0.235238 0 1 0
+-0.496048 -0.0860695 -0.371795 0.474462 0.106763 0.873778
+-0.187068 0.230897 -0.354533 0 1 0
+0.469768 0.294872 -0.0190947 0 1 0
+0.368236 0.186061 -0.371795 0 0 1
+-0.32722 -0.258601 0.320513 0 0 1
+-0.5 0.161164 0.141488 1 0 0
+0.0251133 -0.294872 0.276059 0 1 0
+-0.340395 0.371795 -0.229053 0 1 0
+-0.101719 0.230897 -0.358562 0 1 0
+0.5 -0.291447 0.090071 0.853249 -0.515022 -0.0819633
+0.141109 -0.343754 0.234789 1 0 0
+0.5 -0.241196 0.0670071 1 0 0
+-0.191543 -0.153995 0.371795 0 0 1
+-0.0332897 0.371795 0.250609 0 1 0
+0.103296 -0.012903 0.320513 0 0 1
+0.218481 0.294872 0.0210615 0 1 0
+0.329446 -0.371795 -0.364084 -0.0870554 0.960482 0.264376
+-0.320513 -0.131768 -0.358002 1 0 0
+0.16151 0.28685 -0.371795 0.0211455 -0.0652937 0.997642
+0.286896 -0.371795 0.0643554 0 1 0
+-0.5 0.17133 -0.154688 1 0 0
+-0.247566 0.0400806 -0.10546 -0.358703 0.933342 0.0142903
+0.0261424 -0.267487 0.320513 0 0 1
+0.471515 -0.0730916 -0.371795 0 0 1
+-0.137317 -0.0444303 -0.333333 0 0 1
+0.0422534 -0.294872 0.297793 0 1 0
+0.5 -0.262453 -0.213203 1 0 0
+0.0683164 0.371795 0.247935 0 1 0
+0.109192 0.333832 0.320513 0 0 1
+-0.15119 -0.328755 0.320513 0.0306925 0.00404674 0.999521
+-0.426375 -0.00174174 0.320513 0 0 1
+0.352193 -0.371795 0.103063 0 1 0
+0.5 -0.19623 -0.144409 1 0 0
+0.302874 -0.210855 0.320513 0 0 1
+-0.389449 0.172909 -0.371795 0 0 1
+-0.094911 -0.294872 0.307881 0 1 0
+-0.0933219 -0.294872 -0.200114 0 1 0
+-0.5 -0.128331 -0.118245 1 0 0
+0.197952 0.113942 0.371795 0 0 1
+-0.273092 0.144494 0.371795 0 0 1
+-0.5 0.23675 0.226869 1 0 0
+0.0857881 0.189356 -0.333333 0 0 1
+-0.5 0.169684 -0.208541 1 0 0
+0.362639 -0.0535294 -0.371795 0 0 1
+-0.115048 0.323141 -0.371795 0 0 1
+-0.319217 0.371795 -0.347788 0 1 0
+0.10146 0.125222 -0.333333 0 0 1
+0.382149 -0.371795 0.0181647 0 1 0
+0.234947 0.294872 -0.0104848 0 1 0
+-0.274558 -0.371795 0.228033 0 1 0
+0.141026 0.309247 -0.0800597 1 0 0
+-0.141154 -0.323149 0.118309 1 0 0
+0.445808 -0.211075 0.320513 0 0 1
+0.4445 -0.371795 -0.359846 -0.379564 0.922149 -0.0746494
+0.425816 0.265727 0.320513 0 0 1
+-0.15329 0.0861438 0.320513 0 0 1
+-0.28657 -0.371795 -0.270848 0 1 0
+0.203391 -0.0268069 -0.280276 0.724228 0.68953 0.00649452
+-0.249502 -0.270459 -0.371795 0 0 1
+-0.439257 0.371795 0.0126228 0 1 0
+-0.277782 -0.074957 -0.333333 0 0 1
+0.337049 0.294872 0.193578 0 1 0
+-0.5 0.197135 0.298181 1 0 0
+0.327135 0.294872 -0.360896 -0.033923 0.995131 -0.0925421
+-0.461545 -0.294872 -0.338711 0 1 0
+0.5 -0.00755198 -0.30253 1 0 0
+0.455988 0.294872 -0.316047 0 1 0
+-0.30279 0.197086 0.320513 -0.144 0.187115 0.971726
+-0.0657744 -0.0486983 0.320513 0 0 1
+-0.282375 -0.371795 0.202767 0 1 0
+-0.433092 -0.371795 -0.17687 0 1 0
+-0.238104 0.185564 0.371795 0 0 1
+-0.5 0.00369507 -0.298767 1 0 0
+0.293978 -0.370871 -0.371795 -0.0377606 0.44154 0.896447
+-0.293639 -0.371795 -0.219058 0 1 0
+0.130125 -0.130339 -0.333333 0 0 1
+0.110362 0.172864 0.335935 0.527658 0.849448 0.00397295
+-0.469327 -0.0788989 -0.371795 0 0 1
+0.5 -0.0204183 0.192121 1 0 0
+-0.339533 -0.129945 0.371795 0 0 1
+0.266941 0.0130443 -0.228056 0.947751 0.318407 -0.019628
+-0.0378694 -0.163298 -0.333333 0 0 1
+-0.5 0.254751 -0.0142555 1 0 0
+-0.269633 -0.258987 -0.371795 0 0 1
+0.208647 0.0312837 -0.0377034 -0.552568 0.83324 -0.019505
+0.165219 0.121108 0.365785 0.793028 0.602534 -0.0897673
+0.154098 -0.371795 0.00408332 0 1 0
+-0.5 0.284978 0.190904 1 0 0
+0.340137 -0.280604 -0.371795 0 0 1
+-0.5 -0.100346 -0.0396295 1 0 0
+-0.5 0.358734 0.268539 1 0 0
+-0.430957 -0.214876 0.320513 0 0 1
+0.0653469 0.371795 0.254788 0 1 0
+0.344348 -0.170651 0.320513 0 0 1
+0.0361143 -0.0376146 -0.333333 0 0 1
+-0.189571 0.371795 0.191923 0 1 0
+-0.273977 -0.206625 0.371795 -0.483338 -0.358864 0.798499
+0.5 -0.120917 -0.058013 1 0 0
+-0.102586 -0.294872 -0.279458 0 1 0
+-0.0886964 -0.0309251 -0.333333 0 0 1
+-0.276291 -0.371795 -0.281202 0 1 0
+0.0702137 -0.110854 0.320513 0 0 1
+-0.5 0.103476 0.268464 1 0 0
+-0.255551 0.0356584 -0.0875015 -0.57714 0.816636 0.003889
+0.5 -0.0445602 0.209178 1 0 0
+-0.314539 0.367693 0.320513 -0.0850099 0.293382 0.952208
+0.35903 0.200623 -0.371795 0 0 1
+-0.141154 -0.307714 0.136742 1 0 0
+-0.253712 0.25269 0.320513 0 0 1
+0.0670657 -0.0918392 -0.333333 0 0 1
+-0.480848 -0.294872 0.0447573 0 1 0
+0.33391 0.294872 -0.158668 0 1 0
+0.5 -0.0521548 -0.290938 1 0 0
+-0.369421 0.371795 -0.10545 0 1 0
+-0.5 0.0749678 0.0980259 1 0 0
+-0.0396639 0.371795 0.262383 0 1 0
+0.0967856 -0.294872 0.141403 0 1 0
+-0.5 0.00254934 -0.0863886 1 0 0
+0.0896547 -0.294872 -0.213624 0 1 0
+0.5 -0.0392392 -0.130645 1 0 0
+-0.5 0.174065 0.223152 1 0 0
+-0.294033 -0.163586 -0.333333 0 0 1
+0.374369 0.294872 -0.179388 0 1 0
+0.5 0.2644 0.0445543 1 0 0
+0.164761 0.245699 0.371795 0.120512 0.243716 0.96233
+-0.269334 0.281181 -0.371795 0 0 1
+0.5 -0.172588 0.198939 1 0 0
+-0.5 -0.0365924 0.169319 1 0 0
+0.5 0.0166009 0.265266 1 0 0
+-0.5 0.362539 -0.252636 1 0 0
+0.474606 -0.294872 0.237015 0 1 0
+0.5 -0.0827802 -0.0358133 1 0 0
+-0.5 0.319679 0.283745 1 0 0
+0.484335 0.149899 0.320513 0 0 1
+0.147625 0.294872 -0.0343275 0.0238478 0.999706 -0.00442736
+-0.241141 0.371795 -0.227128 0 1 0
+-0.491994 -0.231018 -0.371795 0.0654086 0.147584 0.986884
+0.448718 -0.29833 0.239165 0.971145 -0.238487 0.00113083
+-0.5 -0.0451075 0.217141 1 0 0
+-0.0366046 0.230897 -0.335606 -0.0473657 0.921127 0.386369
+-0.5 0.0118952 -0.355738 1 0 0
+-0.141154 -0.37116 -0.283462 0.702915 -0.69437 0.154143
+-0.5 0.256398 0.0240462 1 0 0
+0.415975 0.0504469 -0.371795 0 0 1
+0.352622 0.0548372 0.371795 0 0 1
+-0.0811131 0.0807773 -0.333333 0 0 1
+0.156532 -0.327197 -0.371795 0 0 1
+-0.203597 -0.371795 -0.251631 0 1 0
+0.206231 0.294872 0.200028 0 1 0
+0.375064 0.104368 0.320513 0 0 1
+-0.141154 -0.311565 0.0773365 1 0 0
+0.0934379 0.341563 -0.371795 0 0 1
+-0.287597 -0.371795 0.114158 0 1 0
+-0.480787 -0.175481 -0.371795 0 0 1
+0.224488 -0.316067 0.320513 0 0 1
+0.141026 0.354762 -0.16828 1 0 0
+0.369177 -0.301838 -0.371795 0 0 1
+-0.0181752 0.319301 0.320513 0 0 1
+0.305792 0.294872 0.0197321 0 1 0
+0.323681 0.294872 0.0293118 0 1 0
+-0.334587 -0.0481552 0.371795 0 0 1
+0.5 -0.198804 0.122043 1 0 0
+0.154909 -0.371795 -0.0454815 0 1 0
+0.448718 -0.341312 -0.0156228 1 0 0
+0.14113 -0.371795 -0.227686 0.847161 0.530459 0.0305105
+0.222189 0.0373675 -0.0499165 -0.254415 0.967046 -0.00977723
+-0.45616 0.0438063 0.320513 0 0 1
+-0.23196 0.371795 -0.188224 0 1 0
+0.409565 0.189294 -0.371795 0 0 1
+-0.5 -0.156952 0.0147214 1 0 0
+0.177138 -0.371795 0.138626 0 1 0
+0.0679441 0.371795 -0.233208 0 1 0
+-0.5 -0.230455 0.265502 1 0 0
+-0.44734 -0.345737 -0.371795 0.521072 -0.00200489 0.85351
+-0.11715 0.318501 0.320513 0 0 1
+0.0182392 -0.20434 0.35974 -0.102898 0.994685 -0.00377641
+0.0382792 0.176621 0.320513 0 0 1
+0.23343 0.035638 0.371795 0 0 1
+-0.231632 0.344256 -0.371795 0 0 1
+-0.250613 -0.371795 -0.0130501 0 1 0
+0.0115554 0.146429 -0.333333 0 0 1
+0.141109 -0.366227 -0.0765786 0.996204 0.0862619 0.0117008
+-0.143324 0.371795 -0.270678 0 1 0
+-0.487352 -0.031579 -0.371795 0.0395602 -0.00203371 0.999215
+-0.252715 0.371795 -0.295598 0 1 0
+0.495618 -0.287714 -0.371795 -0.282632 0.127704 0.95069
+0.350777 0.159302 -0.371795 0 0 1
+0.448718 -0.352065 -0.0613582 1 0 0
+0.201775 -0.0251912 -0.292746 0.753835 0.656922 -0.0136541
+0.379999 0.294872 -0.226378 0 1 0
+0.5 -0.0493597 -0.214052 1 0 0
+0.446465 0.0959222 -0.371795 0 0 1
+-0.340184 -0.331486 0.320513 0 0 1
+0.370124 -0.0316306 0.371795 0 0 1
+-0.5 -0.0759874 -0.366986 0.943373 -0.0350434 0.329877
+0.155513 0.294872 -0.0195392 0 1 0
+0.169961 0.294872 -0.148442 0 1 0
+0.5 0.113309 0.0910056 1 0 0
+-0.146951 -0.371795 0.189261 -0.101176 0.994632 -0.021693
+0.121914 0.0263104 -0.333333 0 0 1
+-0.13769 0.371795 -0.263266 0 1 0
+0.5 0.165855 0.210239 1 0 0
+0.305094 0.294872 0.171576 0 1 0
+-0.466541 -0.294872 0.0426629 0 1 0
+-0.386745 -0.10888 0.320513 0 0 1
+0.124989 -0.230897 -0.354184 0 1 0
+0.0207986 0.129735 0.320513 0 0 1
+-0.5 -0.077891 0.0262487 1 0 0
+-0.21906 0.110189 0.371795 0 0 1
+0.207893 0.294872 0.294193 0 1 0
+0.402226 0.294872 -0.364064 0.0844768 0.968801 -0.232997
+0.114687 -0.294872 0.0865779 0 1 0
+0.131854 -0.124008 -0.333333 0 0 1
+0.141026 0.345653 -0.0216663 1 0 0
+0.5 0.14646 -0.255045 1 0 0
+-0.32991 -0.0596422 0.371795 0 0 1
+-0.5 0.103469 -0.274725 1 0 0
+-0.416836 0.236913 0.320513 0 0 1
+-0.143551 -0.371795 -0.0313811 -0.668114 0.744057 -0.00163192
+0.152489 0.254545 0.361931 0.0714806 0.997442 0.000132828
+-0.380947 -0.243414 -0.371795 0 0 1
+-0.184034 -0.0508448 0.320513 0 0 1
+-0.315648 0.234426 0.320513 0 0 1
+-0.168825 -0.0885417 0.320513 0 0 1
+0.294364 -0.059417 0.371795 0 0 1
+0.5 0.0963013 0.0532884 1 0 0
+0.118306 0.371795 0.181977 0 1 0
+0.40939 0.163258 0.320513 0 0 1
+0.5 -0.205032 -0.0944985 1 0 0
+-0.0456579 0.371795 -0.284733 0 1 0
+0.278262 0.169928 0.371795 0 0 1
+0.5 0.0231964 0.0256745 1 0 0
+0.5 -0.249114 -0.237571 1 0 0
+-0.5 0.312082 -0.242179 1 0 0
+-0.0878939 0.230897 -0.370571 0.012459 0.562693 0.826572
+-0.5 0.0760294 -0.0732756 1 0 0
+-0.42718 -0.371795 -0.0928446 0 1 0
+-0.141154 -0.339671 -0.260444 1 0 0
+-0.276789 0.371795 -0.282859 0 1 0
+0.269037 0.00221189 -0.245864 0.999995 0.00149735 -0.00271733
+0.257037 -0.371795 0.124156 0 1 0
+0.493479 0.294872 -0.0420548 0.176332 0.983602 -0.0378579
+-0.5 0.126389 0.308103 1 0 0
+-0.334125 0.303784 -0.371795 0 0 1
+-0.05332 -0.294872 -0.308733 0 1 0
+0.214376 -0.371795 -0.316533 0 1 0
+-0.101385 0.371795 0.196736 0 1 0
+-0.217185 -0.0219304 0.371795 0 0 1
+-0.190828 0.0170955 -0.180874 0.932185 0.361599 0.0166397
+-0.5 0.275131 -0.240186 1 0 0
+0.5 -0.26165 -0.279812 1 0 0
+-0.331916 -0.273653 0.320513 0 0 1
+0.371615 -0.0858462 0.320513 0.499049 -0.126073 0.857354
+-0.135821 -0.089274 0.320513 0 0 1
+0.317576 -0.0811458 0.371795 0 0 1
+-0.5 0.284924 -0.0297775 1 0 0
+0.465713 0.294872 0.208685 0 1 0
+0.249874 0.0333676 -0.0196574 0.520812 0.853666 0.00303484
+0.478713 -0.294872 -0.270182 0 1 0
+-0.167604 -0.371795 -0.267894 0 1 0
+0.5 0.18543 -0.128068 1 0 0
+0.129389 0.371795 -0.0794972 0.042027 0.999092 -0.00693683
+0.13183 -0.294872 -0.104825 0.0010774 0.999999 -0.000208361
+0.347901 -0.371795 -0.2879 0 1 0
+-0.196637 0.071674 -0.333333 0 0 1
+0.197879 -0.133757 0.371795 0 0 1
+-0.5 -0.0166565 0.0973698 1 0 0
+0.245601 0.294872 0.171574 0 1 0
+0.240042 -0.328209 -0.371795 0 0 1
+0.5 0.098823 -0.238139 1 0 0
+0.493471 -0.294872 -0.311774 -0.251447 0.966729 -0.0470016
+0.31525 0.294872 -0.360164 0 1 0
+-0.289068 -0.212177 0.320513 -0.00420622 -0.011174 0.999929
+-0.364808 0.371795 0.202168 0 1 0
+-0.297096 0.0859294 0.371795 0 0 1
+-0.0275543 0.230897 -0.353385 0 1 0
+0.137474 -0.254419 0.371795 -0.102474 -0.679528 0.726457
+-0.0176062 -0.00734572 0.320513 0 0 1
+-0.5 0.102006 0.151862 1 0 0
+0.5 0.293583 0.29171 0.711825 0.701365 0.0373028
+0.5 0.105659 0.0601078 1 0 0
+0.5 0.0927464 -0.14705 1 0 0
+0.0471288 -0.162243 -0.333333 0 0 1
+-0.274794 -0.371795 0.0895179 0 1 0
+-0.5 0.0445543 -0.338808 1 0 0
+0.119624 0.371795 -0.245408 0 1 0
+-0.464423 0.221146 -0.371795 0 0 1
+0.5 -0.289111 0.231844 0.967054 -0.253516 -0.023148
+-0.339417 0.371795 -0.240503 0 1 0
+-0.494143 -0.0221997 -0.371795 0.293189 0.120918 0.948377
+0.174528 -0.230897 -0.346025 0 1 0
+-0.308812 0.371795 -0.0332523 0 1 0
+0.188973 -0.171843 0.371795 0 0 1
+0.141109 -0.364249 -0.0338632 0.986327 0.152402 -0.0627173
+0.0623296 0.159209 0.320513 0 0 1
+0.0286627 0.252013 -0.371795 0 0 1
+-0.5 0.235914 -0.324818 1 0 0
+-0.448718 -0.300115 0.238342 0.960166 0.27862 -0.0212514
+0.052856 0.175967 0.320513 0 0 1
+0.141026 0.346949 0.173565 1 0 0
+-0.369534 -0.371795 -0.212486 0 1 0
+-0.0942742 -0.294872 0.107787 0 1 0
+0.277492 0.207566 0.320874 0.514811 0.426618 0.743618
+0.155572 0.175564 -0.333333 0 0 1
+0.17207 0.230897 -0.33514 0.131326 0.938406 0.319604
+0.350032 -0.0304093 -0.371795 0 0 1
+-0.372009 0.371795 0.0527612 0 1 0
+-0.00430281 0.371795 0.206445 0 1 0
+0.405568 0.0790349 -0.371795 0 0 1
+-0.264422 -0.199329 -0.333333 0 0 1
+0.5 0.168055 -0.180144 1 0 0
+-0.422923 -0.307139 0.320513 0 0 1
+0.0525373 -0.294872 0.261369 0 1 0
+-0.171649 -0.371795 -0.356011 0 1 0
+-0.448718 -0.317075 -0.332492 1 0 0
+-0.0489332 0.371795 -0.0818402 0 1 0
+-0.136545 0.152935 0.342069 -0.651935 0.758119 -0.0153837
+0.381341 -0.0389438 0.360754 0.98682 -0.161794 0.00307245
+-0.342959 -0.371795 0.251352 0 1 0
+0.246746 0.294872 0.313511 0.189443 0.867055 0.460789
+0.0908176 -0.294872 0.297854 0 1 0
+0.472954 0.294872 0.0335683 0 1 0
+0.120608 -0.294872 -0.261224 0 1 0
+-0.119764 -0.294872 -0.101377 0 1 0
+-0.018683 -0.230897 -0.364719 0.000123549 0.999625 -0.0273698
+0.5 0.275924 -0.0939083 1 0 0
+0.141026 0.342332 -0.0189945 1 0 0
+0.249939 -0.371795 -0.048759 0 1 0
+0.5 -0.145535 -0.0263086 1 0 0
+-0.074969 0.371795 0.0844552 0 1 0
+-0.5 -0.2048 0.29563 1 0 0
+0.438765 -0.0987565 -0.371795 0 0 1
+-0.202292 -0.371795 0.0117593 0 1 0
+-0.5 0.205167 -0.0456352 1 0 0
+0.248959 0.294872 0.104853 0 1 0
+-0.150344 0.00894554 0.320513 0 0 1
+-0.5 -0.238972 0.0945343 1 0 0
+-0.5 -0.144012 0.208507 1 0 0
+0.141109 -0.359286 0.0673578 1 0 0
+-0.256512 -0.371795 0.0950033 0 1 0
+0.5 -0.148897 0.278393 1 0 0
+-0.5 0.0220563 -0.138776 1 0 0
+0.200419 -0.371795 0.224374 0 1 0
+-0.0369174 -0.02445 -0.333333 0 0 1
+0.204665 0.196556 0.371795 0 0 1
+0.367778 0.294872 0.173771 0 1 0
+0.0151711 0.227453 -0.333333 0.034615 0.432671 0.900887
+0.211665 0.0725571 -0.333333 0 0 1
+-0.0232525 0.371795 0.302375 0 1 0
+-0.252597 -0.236716 0.320513 0 0 1
+-0.320513 0.000488696 -0.356359 1 0 0
+-0.0774569 -0.294872 -0.329225 0 1 0
+0.5 0.00628649 0.0375171 1 0 0
+-0.158131 0.371795 0.196108 0 1 0
+0.202905 0.199698 -0.333333 0 0 1
+0.351069 0.051215 0.371795 0 0 1
+0.290991 -0.371795 -0.19036 0 1 0
+0.0371579 -0.269688 0.320513 0 0 1
+0.5 -0.0708433 -0.118264 1 0 0
+-0.5 0.279888 -0.311249 1 0 0
+-0.12264 -0.294872 -0.345057 0 1 0
+-0.268949 0.0208722 -0.220683 0.875608 -0.48259 0.0204388
+0.480341 0.294872 0.162299 0 1 0
+-0.232043 -0.371795 -0.219661 0 1 0
+-0.129752 -0.294872 -0.338876 0 1 0
+-0.31183 0.371795 -0.29907 0 1 0
+0.0800549 -0.294872 0.226088 0 1 0
+0.458189 0.294872 0.141054 0 1 0
+-0.429094 0.371795 0.178745 0 1 0
+-0.5 0.331624 -0.142918 1 0 0
+-0.5 -0.174951 0.220123 1 0 0
+-0.5 -0.182147 -0.302689 1 0 0
+0.371781 0.111799 0.320513 0 0 1
+-0.5 -0.0273717 -0.155034 1 0 0
+0.0668142 -0.294872 0.263455 0 1 0
+-0.286713 -0.371795 -0.104996 0 1 0
+0.137443 -0.294872 0.205592 0.635835 0.770894 -0.0378999
+0.300802 0.254223 0.320513 0 0 1
+0.262809 -0.371795 -0.173236 0 1 0
+0.276497 -0.252534 -0.371795 0 0 1
+0.20992 0.294872 0.191225 0 1 0
+-0.213433 -0.0398289 -0.16881 -0.396384 0.917866 -0.0200424
+-0.466381 0.371795 -0.157211 0 1 0
+0.397215 -0.0011592 -0.371795 0 0 1
+0.249357 -0.333156 0.320513 0 0 1
+-0.46009 0.371795 0.180548 0 1 0
+-0.296487 0.371795 -0.219016 0 1 0
+0.5 0.169279 -0.146188 1 0 0
+-0.254863 -0.222095 0.360451 0.482176 0.870201 -0.101275
+0.216187 0.0041108 0.371795 -0.0163103 -0.0102732 0.999814
+0.328226 -0.2329 0.320513 0 0 1
+0.202629 0.0317098 0.323789 0.96743 0.0932766 -0.235327
+0.480543 -0.0314938 0.320513 0 0 1
+0.0178577 -0.256282 0.370855 -0.0962368 -0.678039 0.728699
+-0.30784 -0.350333 0.320513 0 0 1
+0.41935 -0.20439 0.320513 0 0 1
+-0.5 -0.252259 0.287755 1 0 0
+-0.405947 -0.237617 -0.371795 0 0 1
+0.336247 -0.0234484 -0.371795 0 0 1
+0.261509 -0.0228996 -0.18779 0.802806 -0.595804 0.0227911
+-0.313859 0.371795 -0.154935 0 1 0
+0.13364 0.371795 0.0697774 0.326143 0.94449 -0.0396107
+0.363189 0.294872 -0.27668 0 1 0
+0.330537 0.294872 0.253083 0 1 0
+0.363324 0.0590398 0.371795 0 0 1
+-0.298679 0.371795 -0.327401 0 1 0
+-0.407193 0.0810163 -0.371795 0 0 1
+-0.336026 -0.148946 0.346899 0.800537 0.599283 0
+-0.236113 -0.0338744 -0.0296998 -0.0721417 -0.514681 0.854341
+-0.5 0.132951 -0.0371118 1 0 0
+0.145325 0.230897 -0.341794 -0.0323752 0.996758 0.0736542
+0.195028 0.221769 0.371795 0 0 1
+0.320513 -0.0283981 -0.340111 0.995901 -0.0224408 0.087626
+0.0563387 -0.282123 0.320513 0 0 1
+-0.5 0.155276 -0.0972829 1 0 0
+-0.091331 0.371795 -0.114213 0 1 0
+0.26884 0.00446018 -0.250617 0.993091 0.115728 0.0194144
+0.0456388 -0.0616333 -0.333333 0 0 1
+-0.0778396 0.126731 0.320513 0 0 1
+-0.196146 0.0262598 -0.329246 0.781148 0.412177 0.468954
+-0.0535737 0.116561 -0.333333 0 0 1
+-0.5 0.0242926 0.244037 1 0 0
+-0.348144 0.371795 0.133236 0 1 0
+-0.227186 0.152657 -0.333333 0 0 1
+0.034436 0.371795 0.234099 0 1 0
+-0.5 -0.23884 0.204804 1 0 0
+0.5 0.130662 0.242069 1 0 0
+0.481735 0.105524 0.320513 0 0 1
+-0.0677919 -0.294872 0.0504493 0 1 0
+0.153338 -0.371795 -0.191088 0 1 0
+0.448009 -0.10783 -0.371795 0 0 1
+-0.310088 -0.371795 -0.17151 0 1 0
+0.288436 -0.0514201 0.371795 0 0 1
+-0.5 -0.0220926 0.130679 1 0 0
+0.0786863 -0.04527 -0.333333 0 0 1
+0.310232 -0.371795 0.182446 0 1 0
+-0.5 -0.282399 0.172741 1 0 0
+-0.320513 -0.142506 -0.364639 0.997447 0.0286521 -0.0654051
+-0.181491 0.0750917 -0.333333 0 0 1
+0.15065 0.294872 -0.170317 0.103697 0.993651 0.0436365
+0.475851 0.294872 -0.297231 0 1 0
+-0.481741 0.371795 -0.129407 0 1 0
+0.5 -0.260468 0.198079 1 0 0
+-0.000718669 -0.294872 -0.273525 0 1 0
+-0.5 -0.0145789 -0.261731 1 0 0
+-0.39107 -0.371795 0.118762 0 1 0
+-0.41461 0.255404 0.320513 0 0 1
+-0.5 0.339351 0.195666 1 0 0
+0.34939 0.128325 0.355655 0.87768 0.479247 0
+0.100162 -0.174925 0.320513 -0.417132 0.484486 0.768943
+-0.155523 0.254328 0.330649 -0.0778115 0.996967 -0.00163212
+-0.237718 0.256905 -0.371795 0 0 1
+-0.109855 0.171025 -0.333333 0 0 1
+0.5 -0.222194 -0.260475 1 0 0
+-0.271646 0.127603 0.371795 0 0 1
+0.416328 0.281366 0.320513 0 0 1
+-0.5 -0.232653 0.319553 0.806596 0.00643168 -0.591068
+0.0362628 0.286959 0.320513 0 0 1
+0.0335581 0.371795 -0.00896907 0 1 0
+-0.192328 0.0203137 -0.265997 0.883864 0.467708 0.00581493
+-0.323639 0.220509 -0.371795 0 0 1
+0.5 0.234454 -0.330307 1 0 0
+-0.158704 0.371795 -0.223991 0 1 0
+-0.0774852 -0.294872 -0.222237 0 1 0
+0.0872159 0.0735279 0.320513 0 0 1
+-0.141154 -0.348543 0.303482 1 0 0
+0.318443 -0.371795 0.256742 0 1 0
+-0.426038 0.0988014 -0.371795 0 0 1
+0.20302 0.294872 -0.184716 0 1 0
+0.448718 -0.313813 -0.158775 1 0 0
+0.308628 -0.371795 0.177282 0 1 0
+0.5 -0.252277 0.204818 1 0 0
+-0.158972 0.371795 0.286052 0 1 0
+0.376214 0.294872 -0.177978 0 1 0
+0.5 -0.11172 -0.022786 1 0 0
+-0.423575 -0.135797 -0.371795 0 0 1
+-0.5 0.295577 -0.142633 1 0 0
+0.253267 -0.371795 -0.129984 0 1 0
+-0.188867 0.319912 0.320513 0 0 1
+-0.450741 0.371795 0.195518 0 1 0
+-0.489619 0.371795 -0.170399 0 1 0
+-0.477635 -0.294872 -0.341947 0 1 0
+-0.151932 -0.136982 0.36375 0.741315 0.669418 0.0483016
+0.362934 0.108351 0.320513 0.393046 -0.04917 0.918203
+0.169796 0.150722 -0.333333 0 0 1
+0.5 -0.0754116 0.282969 1 0 0
+-0.189813 0.371795 0.158114 0 1 0
+-0.5 0.0303528 -0.130666 1 0 0
+0.211413 0.0332214 -0.034523 -0.506779 0.861562 -0.0297638
+0.435139 0.0429189 0.320513 0 0 1
+0.310756 0.294872 0.266488 0 1 0
+0.0821113 0.371795 0.279468 0 1 0
+-0.344528 -0.371795 0.151408 0 1 0
+0.5 -0.116959 -0.342965 1 0 0
+0.5 -0.127044 0.214565 1 0 0
+-0.358118 -0.371795 0.066535 0 1 0
+0.260169 0.294872 0.0974717 0 1 0
+0.267972 0.00919272 -0.124062 0.974506 0.224203 0.00847287
+0.145213 -0.0538078 -0.333333 0 0 1
+-0.448718 -0.351237 -0.193656 1 0 0
+-0.428865 -0.371795 -0.321807 0 1 0
+-0.0497328 0.140842 0.320513 0 0 1
+0.266914 -0.0933761 -0.333333 0 0 1
+-0.5 0.348351 -0.26247 1 0 0
+-0.377731 0.143002 -0.371795 0 0 1
+-0.448718 -0.300774 0.207911 0.991055 0.128866 0.0346793
+0.5 -0.267007 0.085367 1 0 0
+0.448718 -0.361665 -0.290897 1 0 0
+0.5 -0.171021 -0.216375 1 0 0
+-0.5 0.102883 -0.0748672 1 0 0
+0.316604 -0.217857 -0.371795 0 0 1
+-0.232947 0.371795 0.0793073 0 1 0
+-0.250101 -0.20968 0.371795 0 0 1
+-0.259524 -0.348417 0.320513 0 0 1
+0.344268 -0.371795 -0.283502 0 1 0
+0.5 -0.267164 -0.182557 1 0 0
+0.204982 -0.0283982 -0.298947 0.67837 0.734299 0.0248582
+0.337373 -0.371795 0.189198 0 1 0
+0.267173 0.294872 0.293477 0 1 0
+0.444154 -0.187349 0.320513 0 0 1
+-0.443846 0.371795 -0.337204 0 1 0
+-0.496028 -0.0912646 0.320513 0.769301 -0.0922571 -0.63219
+0.0641952 -0.194235 0.371044 -0.274914 0.810786 0.516767
+0.5 -0.0284909 -0.214501 1 0 0
+-0.256401 0.0658902 0.371795 0 0 1
+-0.481088 0.371795 0.0735421 0 1 0
+-0.5 -0.222483 0.188584 1 0 0
+0.0503657 0.285666 -0.371795 0 0 1
+0.0204351 0.0769469 -0.333333 0 0 1
+-0.386451 0.371795 0.141998 0 1 0
+0.173718 0.294872 0.0468292 0 1 0
+0.17931 0.294872 0.255703 0 1 0
+0.439978 0.0212359 -0.371795 0 0 1
+-0.0146967 -0.238542 -0.371795 -0.00674268 -0.0669589 0.997733
+-0.5 0.156202 -0.230406 1 0 0
+0.141109 -0.330703 0.167886 1 0 0
+0.494443 0.196315 0.320513 0.341251 0.0756751 0.936921
+-0.5 -0.189753 -0.0648396 1 0 0
+-0.235915 -0.068785 -0.333333 0 0 1
+0.445848 0.294872 0.0906724 0 1 0
+0.113724 0.230897 -0.33934 0.00339131 0.997797 0.066261
+0.5 0.0909319 0.121847 1 0 0
+-0.0756084 -0.289058 -0.371795 -0.0285108 0.190767 0.981221
+-0.5 -0.107479 0.228984 1 0 0
+-0.0154115 -0.294872 -0.249208 0 1 0
+-0.232587 -0.371795 -0.330665 0 1 0
+-0.230174 -0.202382 -0.333333 0 0 1
+0.162268 -0.26844 0.320513 0 0 1
+-0.303732 -0.371795 0.0182061 0 1 0
+0.27213 -0.371795 -0.15213 0 1 0
+-0.384204 0.0282533 -0.371795 0 0 1
+0.5 0.0867122 0.00516155 1 0 0
+0.215004 -0.371795 0.0235951 0 1 0
+-0.115141 0.230897 -0.367024 -0.0386443 0.955261 0.293227
+0.5 -0.212676 -0.0911338 1 0 0
+-0.314023 -0.371795 -0.0132449 0 1 0
+-0.154638 0.230897 -0.34077 0.0789448 0.966546 0.244041
+0.14277 -0.0766036 0.320513 0 0 1
+-0.141154 -0.360391 -0.251899 1 0 0
+0.442326 -0.371795 -0.252219 -0.124361 0.990844 0.0525636
+0.407968 -0.371795 0.266187 0 1 0
+0.320513 0.149835 -0.369706 0.87617 -0.155635 0.456184
+0.296089 0.294872 -0.166494 0 1 0
+-0.29303 -0.131924 -0.333333 0 0 1
+-0.367019 -0.359013 -0.371795 0 0 1
+-0.2617 0.0304801 -0.0444158 -0.682882 0.73024 0.0205258
+-0.169402 -0.371795 -0.268584 0 1 0
+0.00564451 0.353299 -0.371795 0 0 1
+-0.26509 0.0266918 -0.0771892 0.771498 -0.635698 0.0260474
+0.0287329 0.283228 -0.371795 0 0 1
+0.448718 -0.300704 0.277506 0.981315 -0.191569 -0.0179296
+0.26891 0.00366194 -0.0751958 0.994365 0.105812 -0.0064337
+0.0769032 0.329219 -0.371795 0 0 1
+-0.335137 0.371795 -0.143424 0 1 0
+0.112041 -0.181807 0.371795 -0.115968 0.142221 0.983018
+-0.147132 0.142195 0.32165 0.679493 -0.590114 0.435953
+-0.15693 -0.371795 -0.200459 0 1 0
+-0.5 0.310002 0.0294047 1 0 0
+-0.314992 -0.371795 -0.134207 0 1 0
+-0.141154 -0.322201 -0.130716 1 0 0
+-0.292693 -0.196186 0.331187 0.626204 0.7789 -0.0344101
+0.448718 -0.34495 -0.245368 1 0 0
+0.0886765 0.371795 -0.147043 0 1 0
+0.448973 0.0472487 0.320513 0 0 1
+0.340272 -0.143274 0.346222 0.815975 -0.578087 0
+0.30567 0.0892088 -0.333333 0 0 1
+0.320513 0.0415342 -0.348302 1 0 0
+0.312058 -0.371795 -0.155433 0 1 0
+-0.146517 0.371795 0.0892017 0 1 0
+-0.3759 -0.32662 0.320513 0 0 1
+-0.0763005 0.0128279 -0.333333 0 0 1
+-0.180565 -0.371795 -0.355747 0 1 0
+-0.292668 -0.371795 -0.0540865 0 1 0
+-0.5 -0.178868 -0.276572 1 0 0
+-0.0906777 0.287906 0.320513 0 0 1
+-0.199857 -0.0304982 -0.204724 -0.700525 0.713513 -0.0127624
+-0.0309677 -0.258781 0.320513 0.119332 -0.612429 0.781467
+-0.338797 0.145244 0.332007 0.805297 -0.592866 -0.00251655
+0.210349 0.00840283 0.371795 -0.108268 0.120931 0.986739
+0.5 0.156907 -0.134961 1 0 0
+-0.105931 0.0314925 -0.333333 0 0 1
+0.203862 -0.371795 0.103 0 1 0
+0.200446 -0.29834 -0.371795 0 0 1
+0.5 -0.217444 0.224825 1 0 0
+0.5 0.148408 0.311744 0.999786 0.00260321 0.0205226
+0.270114 -0.371795 -0.272725 0 1 0
+-0.450722 0.0956966 -0.371795 0 0 1
+-0.5 0.234664 -0.107989 1 0 0
+-0.129841 -0.158154 0.346231 0.614225 0.789131 0
+0.320513 0.0465447 -0.369285 0.944928 0.0677013 0.320198
+-0.369039 0.0857863 0.325372 0.865563 -0.365393 -0.342474
+-0.218266 0.371795 0.133528 0 1 0
+-0.153685 -0.371795 -0.094807 0 1 0
+-0.155995 0.0899215 0.320513 0 0 1
+-0.174433 -0.120596 -0.333333 0 0 1
+0.258982 -0.371795 0.0964822 0 1 0
+-0.140448 0.0702831 0.320513 0 0 1
+0.166758 -0.28614 0.320513 0 0 1
+0.106063 -0.291443 -0.371795 0.0138423 0.271162 0.962434
+-0.192832 -0.222961 -0.333333 -0.00170855 -0.230521 0.973066
+0.141109 -0.306244 -0.36526 0.976627 -0.0264674 0.213304
+0.0805328 -0.294872 -0.0415966 0 1 0
+0.324048 -0.371795 -0.0319619 0 1 0
+0.130389 -0.294872 0.0540483 0.0426369 0.999091 0
+0.494842 -0.294872 -0.257358 -0.29343 0.946503 -0.13428
+-0.223718 0.187484 -0.333333 0 0 1
+-0.282643 0.203709 0.364152 -0.587811 0.800538 0.116691
+-0.400297 -0.371795 0.306379 0 1 0
+0.141109 -0.318748 -0.29716 1 0 0
+-0.5 -0.0623117 -0.164716 1 0 0
+0.448718 -0.359452 -0.326105 1 0 0
+0.5 0.244494 -0.0372519 1 0 0
+0.432065 0.2642 0.320513 0 0 1
+-0.24682 -0.168634 0.371795 0 0 1
+-0.5 0.177275 0.175358 1 0 0
+0.5 -0.00240394 -0.286394 1 0 0
+-0.457722 0.371795 -0.076578 0 1 0
+-0.5 0.117222 0.320037 0.806611 -0.0189301 -0.59078
+-0.385212 -0.371795 0.0209624 0 1 0
+-0.232636 0.371795 -0.0369425 0 1 0
+0.320513 -0.0891994 -0.346094 1 0 0
+0.197857 -0.0519502 0.33996 0.969402 -0.245477 0
+-0.220565 -0.371795 -0.0193431 0 1 0
+0.499792 -0.294872 0.208834 -0.407734 0.903041 -0.135162
+0.5 0.246968 -0.163964 1 0 0
+0.486768 -0.294872 -0.331811 0 1 0
+-0.198076 -0.0287167 -0.242452 0.722667 -0.69096 0.0181115
+-0.38713 -0.0530909 -0.371795 0 0 1
+-0.360823 -0.371795 -0.356407 0 1 0
+-0.5 -0.105185 -0.199323 1 0 0
+0.5 0.133825 -0.142288 1 0 0
+0.37787 -0.0549004 0.361136 0.977149 -0.212554 0
+0.141026 0.316161 -0.191306 1 0 0
+0.141026 0.295769 -0.00528785 0.650605 0.759077 0.0227196
+0.443124 0.0135043 -0.371795 0 0 1
+0.0720683 0.0196772 0.320513 0 0 1
+0.5 -0.0946166 0.218456 1 0 0
+-0.284331 -0.189474 0.371795 -0.0153793 -0.0174591 0.999729
+0.255865 -0.323983 -0.371795 0 0 1
+0.115778 -0.133293 -0.333333 0 0 1
+0.319012 -0.371795 -0.144313 0 1 0
+-0.5 0.029285 -0.106394 1 0 0
+0.45696 0.15849 -0.371795 0 0 1
+0.33288 0.156031 -0.371795 0 0 1
+-0.0575017 -0.294872 -0.0595301 0 1 0
+0.5 0.0920964 -0.34739 1 0 0
+0.0666107 0.371795 0.0757596 0 1 0
+-0.433192 -0.0474038 -0.371795 0 0 1
+0.5 0.0320196 -0.151512 1 0 0
+-0.230516 -0.371795 -0.207439 0 1 0
+0.5 0.0855745 0.179274 1 0 0
+0.462716 -0.294872 -0.212238 0 1 0
+0.163759 -0.123342 0.330915 0.805366 -0.591193 -0.0433215
+0.5 0.201565 0.259821 1 0 0
+-0.352281 -0.179404 0.320513 0 0 1
+-0.141154 -0.366879 0.285703 0.920377 -0.389358 -0.0361331
+-0.5 0.299764 -0.166437 1 0 0
+-0.155211 -0.371795 -0.013369 0 1 0
+0.5 0.266537 -0.323882 1 0 0
+0.0642774 0.0423252 0.320513 0 0 1
+-0.048083 -0.294872 0.0771267 0 1 0
+-0.0565412 -0.294872 0.179798 0 1 0
+0.141109 -0.313566 -0.0457098 1 0 0
+0.205696 0.0291121 -0.0139614 -0.65287 0.757285 -0.0167312
+-0.0909926 -0.294872 -0.163683 0 1 0
+-0.291754 0.371795 0.190034 0 1 0
+-0.5 -0.0938193 -0.121137 1 0 0
+-0.5 0.293554 -0.32069 1 0 0
+0.477004 -0.294872 -0.16764 0 1 0
+0.234612 -0.371795 -0.0440724 0 1 0
+-0.254412 0.11946 -0.333333 0 0 1
+0.408062 -0.0194019 -0.371795 0 0 1
+-0.21998 0.199042 0.371795 0 0 1
+0.262265 0.294872 -0.296954 0 1 0
+-0.249308 -0.225128 0.326365 0.469246 0.801763 -0.370114
+0.142995 -0.371795 0.187082 0.662394 0.726621 0.182362
+0.181236 -0.136425 0.371795 0 0 1
+0.183871 -0.152895 -0.333333 0 0 1
+-0.122063 -0.154853 -0.333333 0 0 1
+-0.112808 0.371795 0.0750837 0 1 0
+-0.5 -0.0453648 0.0343883 1 0 0
+-0.290003 0.292575 -0.371795 0 0 1
+-0.5 -0.243897 -0.238008 1 0 0
+-0.396255 0.371795 0.144492 0 1 0
+0.5 0.212654 -0.248539 1 0 0
+-0.2984 0.371795 0.194054 0 1 0
+-0.268937 -0.371795 -0.209114 0 1 0
+0.23688 0.294872 0.224202 0 1 0
+-0.171485 -0.114967 -0.333333 0 0 1
+0.471987 0.0929183 0.320513 0 0 1
+-0.252237 -0.371795 -0.0735165 0 1 0
+0.380072 0.294872 -0.0947567 0 1 0
+0.240186 0.276533 -0.371795 0 0 1
+-0.448718 -0.328512 -0.34406 1 0 0
+0.256571 0.0283838 -0.00571025 0.695713 0.701887 0.152771
+-0.226519 0.239051 0.320513 -0.13248 0.622571 0.771268
+0.069465 0.371795 -0.301451 0 1 0
+0.45398 0.01475 0.320513 0 0 1
+0.201269 0.0384758 0.322501 0.926882 0.275883 -0.254514
+0.430716 0.185335 0.320513 0 0 1
+-0.432927 0.223455 0.320513 0 0 1
+0.141109 -0.347681 -0.0864862 1 0 0
+0.0784414 0.237306 0.371795 0 0 1
+-0.189322 0.371795 -0.317921 0 1 0
+-0.0921679 -0.294872 0.158123 0 1 0
+-0.212347 0.326682 -0.371795 0 0 1
+0.185971 0.294872 -0.0989441 0 1 0
+0.446808 0.294872 -0.0994581 0 1 0
+-0.5 -0.0179813 -0.066138 1 0 0
+0.5 0.257974 -0.205122 1 0 0
+0.5 0.241138 -0.135885 1 0 0
+-0.279242 0.221902 -0.342545 -0.461705 0.886996 -0.00819469
+0.451469 0.000949354 0.320513 0 0 1
+-0.5 -0.118729 -0.14163 1 0 0
+0.381921 -0.0358835 0.348931 0.991983 -0.126322 0.00349245
+-0.204748 -0.0786427 0.371795 0 0 1
+-0.259335 0.371795 -0.0708313 0 1 0
+0.448718 -0.296251 0.0136691 0.717627 -0.696137 0.0200891
+-0.5 0.339928 0.312455 0.999828 -0.00684701 -0.0172209
+-0.23733 -0.178574 0.371795 0 0 1
+-0.141154 -0.355883 0.145168 1 0 0
+0.126904 0.371795 -0.0436135 0 1 0
+-0.230069 -0.114988 0.371795 0 0 1
+-0.5 0.279812 0.0190159 1 0 0
+0.40301 0.294872 -0.122686 0 1 0
+0.143971 -0.16857 -0.333333 0 0 1
+-0.310286 0.0215459 -0.333333 0 0 1
+0.399089 -0.371795 -0.15175 0 1 0
+0.149961 0.270492 -0.371795 0 0 1
+0.145691 -0.371795 0.164664 0.244521 0.967088 0.0703594
+0.5 -0.0775869 0.216926 1 0 0
+-0.374079 0.297824 -0.371795 0 0 1
+-0.477186 0.112412 0.320513 0 0 1
+-0.452879 0.371795 0.0358299 0 1 0
+0.0152519 0.371795 -0.262555 0 1 0
+-0.5 0.186239 -0.111803 1 0 0
+0.0600001 -0.294872 0.0553406 0 1 0
+0.365481 -0.371795 -0.203188 0 1 0
+0.4316 -0.371795 0.0384351 0 1 0
+0.141109 -0.304457 -0.168996 0.992858 0.108184 -0.0502821
+-0.344669 0.289446 0.320513 0 0 1
+0.5 0.0553633 -0.0659059 1 0 0
+0.5 0.0356178 -0.17756 1 0 0
+0.5 0.154967 -0.197419 1 0 0
+-0.221259 0.371795 0.121779 0 1 0
+-0.221503 -0.232018 -0.371795 0.00456172 0.822568 -0.568649
+-0.390238 -0.371795 -0.107834 0 1 0
+0.138514 -0.0652201 0.320513 0 0 1
+0.100822 0.371795 0.0810063 0 1 0
+-0.323735 -0.038849 0.371795 0 0 1
+-0.0351796 -0.294872 -0.133873 0 1 0
+-0.5 0.101345 -0.0241017 1 0 0
+0.192412 0.0011949 -0.328867 0.951417 0.113136 -0.286366
+-0.5 0.0494784 0.0147697 1 0 0
+-0.5 0.0714928 0.0283643 1 0 0
+-0.0192377 -0.294872 0.271273 0 1 0
+-0.5 -0.118881 -0.195002 1 0 0
+-0.350735 0.371795 0.0421127 0 1 0
+0.5 0.28568 0.241499 0.999961 0.00879523 0.000301356
+-0.175085 0.352972 -0.371795 0 0 1
+-0.131174 -0.193812 -0.333333 0 0 1
+0.0667889 0.371795 -0.277818 0 1 0
+-0.134504 -0.185761 0.371795 0 0 1
+-0.5 -0.0320252 0.111472 1 0 0
+-0.091718 -0.294872 -0.352753 0 1 0
+-0.325138 0.0453746 -0.371795 -0.610176 -0.110779 0.784483
+-0.144645 -0.371795 -0.316131 -0.366008 0.914178 0.174116
+-0.447013 -0.371795 0.319347 0.436511 0.809103 -0.39346
+-0.326336 -0.371795 0.123334 0 1 0
+-0.197473 0.371795 -0.143156 0 1 0
+-0.306523 0.371795 0.0880272 0 1 0
+-0.190489 0.371795 -0.213841 0 1 0
+0.440869 -0.371795 -0.134366 -0.147039 0.987644 0.0542141
+-0.0413778 -0.294872 -0.0651117 0 1 0
+-0.0241475 0.371795 0.227959 0 1 0
+0.5 0.0989381 -0.202897 1 0 0
+0.0586532 0.0303399 -0.333333 0 0 1
+0.194844 -0.313833 -0.371795 0 0 1
+-0.226288 0.371795 -0.0994043 0 1 0
+0.320513 0.112902 -0.369243 0.913711 0.0950402 0.395095
+-0.188388 0.00960653 -0.27557 0.983934 0.178514 -0.00244497
+-0.5 0.117718 0.250207 1 0 0
+-0.22174 0.0321916 -0.0292295 0.147743 0.494112 0.856753
+0.109604 0.113379 -0.333333 0 0 1
+-0.471667 0.371795 -0.295697 0 1 0
+0.0202632 0.189025 0.320513 0 0 1
+0.00731692 -0.294872 0.0621429 0 1 0
+-0.325906 -0.371795 -0.271827 0 1 0
+-0.371796 0.109027 -0.371795 0 0 1
+0.190657 -0.371795 -0.25584 0 1 0
+-0.5 0.247804 0.271136 1 0 0
+-0.325669 -0.371795 0.194652 0 1 0
+-0.199095 -0.270403 0.320513 0 0 1
+0.1828 -0.249731 0.35129 -0.212551 0.97715 0
+0.159639 0.294872 -0.0428605 0 1 0
+-0.16078 0.371795 -0.186553 0 1 0
+0.5 -0.179047 -0.127958 1 0 0
+-0.362573 0.371795 0.249002 0 1 0
+-0.400608 -0.105517 -0.371795 0 0 1
+-0.32975 0.371795 -0.157713 0 1 0
+-0.055226 -0.294872 -0.0642859 0 1 0
+0.188831 0.153108 -0.333333 0 0 1
+0.218145 0.0362839 -0.00560098 -0.311616 0.909131 0.276363
+0.5 -0.183789 -0.0818397 1 0 0
+-0.141083 -0.0393 0.320513 0 0 1
+-0.5 0.232532 -0.139036 1 0 0
+0.326436 -0.371795 -0.0411973 0 1 0
+-0.429349 -0.236284 0.320513 0 0 1
+0.0514874 -0.294872 0.0359978 0 1 0
+-0.218727 -0.192192 0.371795 0 0 1
+0.317571 0.294872 -0.113628 0 1 0
+0.0737034 -0.282272 0.320513 0 0 1
+0.5 -0.00588488 -0.263517 1 0 0
+-0.101497 0.162617 -0.333333 0 0 1
+-0.5 0.0578088 0.259757 1 0 0
+0.224206 -0.371795 -0.127927 0 1 0
+-0.427677 0.220152 0.320513 0 0 1
+0.0261399 0.161842 -0.333333 0 0 1
+0.154605 -0.254393 0.353408 -0.0713593 0.997451 1.46477e-005
+-0.169135 0.264358 0.320513 0 0 1
+-0.287767 0.371795 -0.16896 0 1 0
+0.5 0.202275 -0.176807 1 0 0
+-0.5 0.0383002 -0.107004 1 0 0
+0.0482688 0.128333 -0.333333 0 0 1
+-0.5 -0.0835941 -0.301622 1 0 0
+0.448718 -0.36053 -0.324035 0.999515 -0.0309925 0.00303368
+-0.5 -0.0544514 -0.232839 1 0 0
+-0.483562 0.0297281 0.320513 0 0 1
+-0.435682 -0.371795 -0.0152194 0 1 0
+0.5 -0.045404 -0.148127 1 0 0
+0.363062 0.00402394 0.371795 0 0 1
+-0.0673245 0.12529 0.320513 0 0 1
+-0.323313 -0.371795 -0.144969 0 1 0
+0.448718 -0.311493 0.257722 1 0 0
+-0.5 -0.0504922 -0.086848 1 0 0
+-0.448718 -0.334911 0.293848 1 0 0
+-0.471619 -0.00178993 0.320513 0 0 1
+0.078594 0.371795 0.0867477 0 1 0
+0.250383 -0.371795 0.216394 0 1 0
+0.213183 0.0340756 -0.237735 -0.453023 0.891328 -0.0174515
+-0.202717 -0.0374465 -0.333333 0.387411 -0.320218 0.864507
+-0.477305 0.371795 -0.0362968 0 1 0
+-0.170918 0.158864 0.371795 0 0 1
+0.156793 0.0767535 0.320513 0 0 1
+0.375788 0.162014 0.320513 0 0 1
+0.292725 0.294872 -0.354974 0 1 0
+0.203001 0.294872 0.110174 0 1 0
+0.5 0.0228554 -0.124683 1 0 0
+0.5 -0.0722539 -0.148317 1 0 0
+-0.439177 0.129652 -0.371795 0 0 1
+-0.239926 -0.371795 0.296674 0 1 0
+-0.5 0.146577 -0.148434 1 0 0
+0.406672 0.294872 0.123595 0 1 0
+0.411011 -0.371795 -0.00570687 0 1 0
+0.315951 0.179995 -0.349134 0.955012 0.296526 0.00485441
+-0.359144 -0.371795 0.168539 0 1 0
+0.203371 -0.0372931 -0.333333 -0.00428737 -0.00287379 0.999987
+-0.231344 0.234362 0.341324 -0.370954 0.928645 -0.00336308
+0.0237387 0.371795 -0.30571 0 1 0
+0.04243 -0.294872 -0.0533131 0 1 0
+-0.310176 -0.0502539 -0.333333 0 0 1
+-0.296194 -0.371795 -0.283472 0 1 0
+0.437704 -0.371795 0.13737 -0.0142358 0.999891 0.00388623
+0.279251 -0.185926 0.371795 0 0 1
+-0.187663 -0.264566 0.320513 0 0 1
+0.156292 -0.371795 0.310761 0 1 0
+-0.428976 0.371795 -0.0391863 0 1 0
+-0.141154 -0.36377 -0.266073 0.996719 -0.0808766 -0.00318356
+-0.34605 -0.371795 -0.0395494 0 1 0
+-0.448718 -0.340059 0.142977 1 0 0
+0.5 0.189329 0.0468838 1 0 0
+-0.344155 -0.165148 0.320513 0 0 1
+-0.5 0.220436 -0.311015 1 0 0
+0.231167 -0.172216 0.371795 0 0 1
+-0.376267 -0.0622699 0.337691 0.977145 0.212575 0
+-0.5 0.0716239 -0.273045 1 0 0
+-0.0871873 0.371795 0.0664048 0 1 0
+-0.320513 0.00812951 -0.351308 1 0 0
+-0.448718 -0.308912 0.250773 1 0 0
+-0.340622 -0.301527 -0.371795 0 0 1
+0.320371 0.0650222 -0.333333 0.543895 0.0299751 0.838617
+0.276144 -0.123765 -0.333333 0 0 1
+0.178666 -0.371795 -0.0902259 0 1 0
+-0.5 -0.201128 0.211359 1 0 0
+0.5 0.0354915 -0.0204791 1 0 0
+0.32872 0.294872 -0.0846507 0 1 0
+-0.18083 0.0902772 -0.333333 0 0 1
+-0.238797 0.0428045 -0.240819 -0.157556 0.987504 -0.0035214
+0.0212234 -0.294872 0.0473436 0 1 0
+-0.5 -0.20585 -0.298334 1 0 0
+-0.38291 0.169956 0.320513 0 0 1
+-0.0845248 0.105566 -0.333333 0 0 1
+-0.132144 0.0202265 -0.333333 0 0 1
+0.421809 -0.314207 0.320513 0 0 1
+-0.18841 0.207474 -0.333333 0 0 1
+0.43288 -0.371795 0.287222 0 1 0
+0.20158 -0.0249969 -0.129206 0.737502 0.675192 0.0143607
+-0.191389 -0.131205 0.371795 0 0 1
+-0.0827337 0.371795 0.269991 0 1 0
+-0.393259 0.371795 0.127127 0 1 0
+0.314116 0.0659274 0.371795 0 0 1
+-0.417061 0.371795 0.0847773 0 1 0
+-0.45891 0.247695 -0.371795 0 0 1
+-0.141154 -0.367757 -0.354615 0.838759 -0.517829 0.168333
+-0.224639 0.371795 -0.306444 0 1 0
+0.0297619 0.12509 0.320513 0 0 1
+-0.298719 0.371795 -0.157996 0 1 0
+-0.393867 -0.0522939 -0.371795 0 0 1
+0.089721 0.199873 -0.333333 0 0 1
+0.5 0.267828 -0.270459 1 0 0
+-0.141154 -0.359991 -0.352483 1 0 0
+-0.280341 0.371795 -0.122481 0 1 0
+-0.06936 0.371795 -0.00935775 0 1 0
+0.432134 -0.21792 0.320513 0 0 1
+-0.113988 0.371795 0.119807 0 1 0
+-0.5 0.0306111 0.142939 1 0 0
+0.0133328 -0.254063 0.371795 -0.105537 -0.484598 0.868347
+0.216522 0.230897 -0.352003 0 1 0
+-0.5 -0.109378 -0.256873 1 0 0
+0.0264273 -0.294872 -0.211785 0 1 0
+-0.153901 -0.0691946 -0.333333 0 0 1
+-0.280816 0.371795 0.155097 0 1 0
+-0.32182 0.371795 0.0681352 0 1 0
+-0.00189825 0.256282 0.337455 0 1 0
+-0.206318 0.03589 -0.222114 0.574524 0.81827 -0.0188799
+0.240725 -0.36342 0.320513 0.0128043 -0.146719 0.989095
+-0.128259 -0.159385 0.356819 0.614219 0.789135 0
+0.489748 0.294872 0.191779 0.319562 0.947457 -0.0143462
+-0.5 -0.215959 -0.118709 1 0 0
+0.233291 -0.371795 0.0414915 0 1 0
+0.181614 -0.371795 0.163328 0 1 0
+-0.189718 0.0145715 -0.0639862 0.953127 0.302242 -0.0140782
+-0.5 0.165811 0.109506 1 0 0
+0.0473252 0.371795 -0.105681 0 1 0
+-0.448718 -0.300424 -0.147198 0.957629 0.283742 0.0493728
+0.133238 -0.294872 0.00686426 0.0873738 0.994644 -0.0552147
+-0.378006 -0.248528 0.320513 0 0 1
+0.352065 -0.27934 0.320513 0 0 1
+-0.169204 0.0594058 0.320513 0 0 1
+0.5 -0.268542 0.239039 1 0 0
+0.103478 -0.294872 -0.020176 0 1 0
+-0.301246 0.371795 0.0928898 0 1 0
+0.192858 0.00628974 -0.0084807 0.987405 -0.148799 -0.0537563
+0.285987 0.294872 -0.34492 0 1 0
+0.5 0.0141358 0.198806 1 0 0
+-0.170965 0.230897 -0.339879 -0.0151909 0.912531 0.408726
+-0.323243 -0.0120236 -0.371795 -0.426782 -0.0699215 0.901647
+-0.230662 -0.327612 -0.371795 0 0 1
+-0.448718 -0.370914 0.252642 0.766089 0.6266 -0.143107
+-0.0299246 0.148907 0.320513 0 0 1
+0.00606188 -0.294872 0.171703 0 1 0
+-0.379517 -0.0450737 -0.371795 0 0 1
+0.291104 0.294872 -0.306839 0 1 0
+0.5 0.036128 -0.371537 0.832556 0.0663618 -0.549951
+0.243835 -0.371795 -0.233382 0 1 0
+0.36811 0.294872 0.0502942 0 1 0
+0.370409 0.0616601 0.371795 0.296504 -0.126356 0.946636
+0.43589 -0.03114 -0.371795 0 0 1
+-0.204147 -0.0133853 0.327119 0.914048 0.0419623 0.40343
+-0.302393 -0.1226 -0.333333 0 0 1
+0.321719 -0.371795 0.0326852 0 1 0
+0.249804 -0.13196 0.371795 0 0 1
+-0.314313 0.047693 0.371795 0 0 1
+-0.11566 -0.202947 0.371795 0 0 1
+-0.296261 0.267222 -0.371795 0 0 1
+-0.480281 0.371795 0.320335 0.0401667 0.679792 0.732304
+0.5 -0.106862 0.224155 1 0 0
+0.0878721 0.348479 0.320513 0 0 1
+0.0957715 0.164493 -0.333333 0 0 1
+0.158887 0.254087 0.356954 0.076528 0.997066 0.00153481
+-0.5 0.25225 -0.135519 1 0 0
+0.254488 0.294872 0.0183189 0 1 0
+0.15327 -0.371795 0.00656542 0 1 0
+0.476061 0.28744 -0.371795 0.0185551 -0.212968 0.976883
+0.407951 -0.361919 0.320513 0.0141965 -0.077611 0.996883
+-0.5 -0.0370515 0.209237 1 0 0
+0.0639681 -0.294872 -0.245534 0 1 0
+-0.0893489 0.157656 -0.333333 0 0 1
+0.00781448 -0.011413 0.320513 0 0 1
+-0.468501 0.371795 -0.0842543 0 1 0
+0.367757 0.0892247 0.329892 0.941662 0.335632 0.0249695
+0.0964898 0.103939 -0.333333 0 0 1
+0.5 -0.11853 -0.179721 1 0 0
+0.297289 0.168805 0.371795 0 0 1
+-0.075176 -0.256282 0.322193 0.0619594 0.865203 -0.497579
+-0.191942 -0.0194849 -0.26386 0.879579 -0.475271 0.021427
+0.18516 0.294872 0.278019 0 1 0
+-0.5 -0.0913428 -0.0183733 1 0 0
+0.491085 0.237085 -0.371795 -0.137696 0.0294031 0.990038
+-0.5 -0.286462 0.169434 0.980639 0.195791 0.00369782
+0.5 -0.235972 -0.12099 1 0 0
+-0.291168 0.371795 0.240127 0 1 0
+-0.5 0.287813 -0.2122 1 0 0
+0.106309 -0.294872 0.255674 0 1 0
+-0.246755 -0.371795 -0.00260673 0 1 0
+-0.215998 -0.371795 -0.200661 0 1 0
+-0.448718 -0.361377 -0.301901 1 0 0
+0.5 -0.231143 0.213678 1 0 0
+-0.361536 -0.371795 -0.323982 0 1 0
+-0.5 -0.0444662 0.30231 1 0 0
+0.5 -0.0764694 -0.195335 1 0 0
+-0.5 0.145115 0.0319949 1 0 0
+-0.333663 -0.371795 -0.223885 0 1 0
+-0.00272334 0.0672041 -0.333333 0 0 1
+0.123789 -0.0433968 0.320513 0 0 1
+0.480606 -0.294872 0.309812 -0.128748 0.976296 -0.173985
+0.176404 -0.251122 0.336007 -0.212561 0.977148 0
+-0.5 -0.0273844 -0.0588799 1 0 0
+-0.145197 0.369864 0.320513 -0.201872 0.58539 0.785217
+0.5 0.0968745 0.225327 1 0 0
+-0.196824 -0.0272274 -0.0935793 0.784169 -0.620495 -0.00805553
+-0.5 0.098818 -0.209423 1 0 0
+0.333643 0.259182 -0.371795 0 0 1
+0.163743 -0.322251 0.320513 0 0 1
+-0.0352889 -0.294872 -0.333489 0 1 0
+0.23919 0.294872 -0.280555 0 1 0
+-0.190217 0.371795 -0.221559 0 1 0
+0.235231 0.294872 -0.183124 0 1 0
+0.391077 0.294872 -0.0827713 0 1 0
+0.32007 0.269991 -0.371795 0 0 1
+-0.2027 -0.0333415 -0.0945602 -0.635417 0.772011 0.0156252
+0.376006 0.294872 0.299648 0 1 0
+-0.253072 -0.0693746 -0.333333 0 0 1
+0.352604 -0.371795 -0.036157 0 1 0
+0.141109 -0.31729 -0.163122 1 0 0
+-0.250502 -0.371795 0.253435 0 1 0
+-0.5 0.108553 -0.0719007 1 0 0
+-0.0598037 0.371795 -0.212729 0 1 0
+-0.133252 -0.189511 -0.333333 0 0 1
+0.387544 -0.371795 -0.298669 0 1 0
+0.130814 -0.294872 0.0499785 0.0988488 0.994595 -0.0317619
+-0.5 -0.251542 -0.00904337 1 0 0
+-0.356472 -0.115355 0.323013 0.851239 0.367898 -0.374223
+-0.376371 0.371795 0.026925 0 1 0
+0.0227961 -0.106828 0.320513 0 0 1
+-0.208243 -0.371795 -0.229484 0 1 0
+-0.381111 0.0976114 0.320513 0 0 1
+-0.0464988 0.371795 -0.251336 0 1 0
+-0.106713 -0.294872 -0.113417 0 1 0
+-0.135156 0.286734 0.320513 0 0 1
+0.5 -0.130003 -0.0870688 1 0 0
+0.5 -0.16185 -0.353636 1 0 0
+0.291527 0.162 0.371795 0 0 1
+0.320898 -0.371795 -0.0833101 0 1 0
+-0.441479 -0.371795 0.117799 0.158151 0.986627 0.0394332
+-0.339589 0.338783 0.320513 0 0 1
+0.320513 -0.0924102 -0.343679 0.987033 -0.080488 0.138879
+-0.104436 -0.294872 -0.153299 0 1 0
+0.133552 0.116229 0.320513 0 0 1
+0.0911427 0.363866 0.320513 -0.0488775 0.150193 0.987448
+0.437257 0.294872 -0.326453 0 1 0
+-0.275187 -0.371795 -0.0859477 0 1 0
+0.300571 -0.371795 -0.265339 0 1 0
+-0.144294 0.371795 0.24084 0 1 0
+0.252273 -0.371795 0.0428463 0 1 0
+0.194893 0.0137252 -0.123801 0.921395 -0.388142 -0.0193917
+-0.254914 0.0361041 -0.267109 -0.565861 0.82449 -0.00419957
+0.103898 0.371795 -0.188755 0 1 0
+-0.288996 0.371795 0.259032 0 1 0
+0.36798 0.109894 -0.371795 0 0 1
+0.264973 -0.371795 -0.0407342 0 1 0
+-0.5 -0.126762 0.0311194 1 0 0
+0.5 -0.0558979 -0.286928 1 0 0
+0.113569 -0.294872 0.194495 0 1 0
+-0.042495 -0.125887 0.320513 0 0 1
+-0.5 -0.255838 0.254591 1 0 0
+-0.0785859 -0.256282 0.335015 0 1 0
+-0.0477825 0.371795 0.016542 0 1 0
+-0.0171854 -0.0842511 -0.333333 0 0 1
+-0.316846 -0.0184777 -0.333333 -0.421695 0.0803061 0.903175
+-0.192457 0.061973 -0.333333 0 0 1
+-0.213125 -0.323005 -0.371795 0 0 1
+-0.5 -0.166201 0.200692 1 0 0
+-0.141154 -0.32042 0.208979 1 0 0
+0.240124 -0.305337 -0.371795 0 0 1
+-0.123063 -0.0219997 0.320513 0 0 1
+0.322425 -0.166175 -0.371795 0.225796 -0.0494748 0.972917
+-0.196614 -0.00769939 -0.0301658 0.504 -0.120597 0.855243
+0.0699375 -0.294872 -0.154432 0 1 0
+-0.166248 -0.174443 0.371795 0 0 1
+0.244814 -0.035727 -0.200672 -0.386489 0.922071 0.0202624
+-0.126965 0.193583 0.371795 0 0 1
+-0.0516572 -0.0594527 0.320513 0 0 1
+0.0930018 0.0869384 -0.333333 0 0 1
+0.141461 -0.371795 0.00574347 0.40452 0.91436 -0.0175828
+0.0391133 -0.200857 0.33077 -0.164576 0.986364 0
+0.5 0.0684578 0.287378 1 0 0
+0.177982 0.250779 0.361451 0.183879 0.97617 0.115238
+0.484844 0.0466104 -0.371795 0 0 1
+0.271265 -0.212227 0.334315 -0.580939 0.813917 -0.00698233
+0.421862 -0.371795 -0.00240971 0 1 0
+-0.474183 -0.294872 0.316307 0.0508503 0.863877 -0.50113
+-0.190803 0.0248043 0.320513 0.019319 0.00524818 0.9998
+0.299156 -0.371795 -0.248515 0 1 0
+0.490603 0.294872 -0.230304 0.146362 0.98496 -0.0918245
+0.5 -0.0340298 -0.0842865 1 0 0
+-0.0423578 0.200316 0.362831 -0.152551 0.978988 -0.135318
+0.140839 0.371795 0.0948874 0.591819 0.790283 -0.158754
+-0.368687 0.0867305 0.328225 0.90573 -0.379809 -0.188144
+0.00628817 -0.294872 -0.319054 0 1 0
+-0.242722 -0.0673065 -0.333333 0 0 1
+0.353645 0.284276 0.320513 0.00286547 0.121901 0.992538
+-0.289311 -0.0948499 -0.333333 0 0 1
+-0.5 -0.00760313 -0.271118 1 0 0
+0.157833 -0.371795 0.221724 0 1 0
+0.160919 0.294872 0.281663 0 1 0
+0.34016 0.294872 -0.348574 0 1 0
+0.192153 0.294872 -0.0335914 0 1 0
+-0.195767 0.129393 0.371795 0 0 1
+0.5 0.209136 0.205537 1 0 0
+0.193589 0.0177239 -0.333333 -0.221532 -0.00753477 0.975124
+-0.5 0.208589 -0.0499345 1 0 0
+-0.489679 -0.276223 0.320513 -0.15396 0.0384287 0.987329
+0.5 0.269533 0.274714 1 0 0
+-0.272661 0.111852 0.371795 0 0 1
+0.120259 0.371795 0.147347 0 1 0
+-0.154644 -0.230897 -0.355305 0 1 0
+-0.5 -0.194691 0.283123 1 0 0
+0.5 -0.0989822 -0.0657178 1 0 0
+-0.436697 0.21651 0.320513 0 0 1
+0.254378 -0.321454 0.320513 0 0 1
+0.141026 0.311922 -0.0643312 1 0 0
+0.0465936 -0.294872 0.317342 0.121891 0.915112 -0.384334
+0.478889 -0.294872 -0.0351973 0 1 0
+0.487943 0.294872 0.265517 0 1 0
+0.482807 0.294872 -0.134074 0 1 0
+0.5 0.14758 -0.268957 1 0 0
+-0.0967425 -0.230897 -0.336656 0.0525076 0.758168 -0.649941
+-0.265885 -0.371795 0.160017 0 1 0
+0.393287 -0.371795 0.229691 0 1 0
+-0.366157 0.371795 -0.35551 0 1 0
+-0.193568 -0.0225781 -0.169977 0.832061 -0.554636 -0.00732176
+0.5 -0.0136 -0.223583 1 0 0
+0.00463496 -0.230897 -0.334656 0.15262 0.840695 -0.519556
+-0.23378 0.371795 -0.180952 0 1 0
+-0.38159 0.371795 -0.264931 0 1 0
+0.138241 0.371795 -0.306172 0.565302 0.822387 -0.0641345
+0.0776123 -0.0563942 -0.333333 0 0 1
+-0.5 0.156571 -0.119112 1 0 0
+0.30289 -0.0979728 0.371795 0 0 1
+0.322193 0.237444 0.320513 0 0 1
+-0.320513 -0.0431343 -0.362834 0.999734 0.00130043 -0.0230444
+0.0910896 0.331507 0.320513 0 0 1
+0.115524 -0.294872 -0.0301755 0 1 0
+-0.189861 0.015023 -0.135405 0.939666 0.342086 0.00201924
+-0.33569 -0.323396 0.320513 0 0 1
+0.315597 0.294872 -0.351301 0 1 0
+-0.11779 -0.294872 -0.106348 0 1 0
+0.456994 0.294872 0.160157 0 1 0
+0.332503 -0.371795 -0.0891807 0 1 0
+-0.328408 0.152229 -0.371795 -0.107021 0.0403504 0.993438
+0.0748232 -0.190587 0.341394 -0.326982 0.945031 0
+0.0915674 -0.0664953 -0.333333 0 0 1
+-0.189856 0.0150114 -0.165845 0.937908 0.346626 -0.0133934
+-0.5 -0.080307 0.227406 1 0 0
+-0.130707 0.297877 0.320513 0 0 1
+-0.0624152 -0.247447 -0.371795 0 0 1
+0.141109 -0.35474 -0.171424 1 0 0
+-0.325378 0.371795 -0.0261075 0 1 0
+-0.383998 -0.371795 0.16583 0 1 0
+-0.293424 0.371795 -0.0267619 0 1 0
+-0.179646 -0.165021 0.371795 0 0 1
+-0.010941 -0.0308816 0.320513 0 0 1
+0.5 -0.0269089 -0.12192 1 0 0
+0.00824841 0.371795 0.187663 0 1 0
+0.264015 -0.354882 -0.371795 0 0 1
+0.0519821 0.371795 -0.124111 0 1 0
+0.141026 0.301743 -0.188172 0.945214 0.326203 0.0127357
+-0.399159 -0.00853147 -0.371795 0 0 1
+0.0834445 -0.294872 0.190123 0 1 0
+-0.190896 0.371795 -0.116814 0 1 0
+-0.182827 -0.371795 0.249469 0 1 0
+-0.426837 0.371795 -0.306773 0 1 0
+-0.424284 -0.371795 -0.314153 0 1 0
+0.325716 0.162719 0.324475 0.728043 0.555794 0.401306
+-0.173134 -0.203124 0.371795 0 0 1
+0.5 -0.126518 -0.269284 1 0 0
+0.253615 0.222777 0.355158 0.479262 0.877672 0
+-0.255684 0.371795 0.262192 0 1 0
+0.0217021 0.371795 0.130495 0 1 0
+0.0948733 -0.294872 -0.0753136 0 1 0
+0.164999 -0.156456 0.371795 0 0 1
+-0.448718 -0.348542 -0.279936 1 0 0
+0.131962 0.330417 0.320513 0.095711 0.0108269 0.99535
+-0.5 -0.163714 -0.0543618 1 0 0
+0.5 -0.238733 0.135166 1 0 0
+-0.274005 0.0481229 -0.333333 0 0 1
+0.172501 0.109961 0.347292 0.837162 0.546955 0
+0.1852 0.0039005 -0.333333 -0.183728 0.0564803 0.981353
+-0.4288 -0.371795 0.0180566 0 1 0
+0.141109 -0.319973 0.0370143 1 0 0
+-0.152546 -0.371795 -0.242681 0 1 0
+-0.160649 -0.371795 -0.124503 0 1 0
+-0.5 -0.078583 0.160779 1 0 0
+-0.0223283 0.371795 0.30957 0 1 0
+0.248035 -0.246194 -0.371795 0 0 1
+-0.0576077 -0.0930285 0.320513 0 0 1
+0.5 -0.288301 0.213979 0.987754 -0.115739 0.104625
+-0.0338413 0.371795 -0.0681097 0 1 0
+0.199921 -0.257247 0.320513 0 0 1
+0.349069 -0.371795 0.249104 0 1 0
+0.142531 -0.371795 -0.0776868 0.573371 0.809733 0.12481
+0.0298359 -0.294872 0.311185 -0.0194947 0.985583 -0.168063
+0.215631 0.0352168 -0.17105 -0.441149 0.897384 0.00945047
+-0.44591 -0.00663516 0.320513 0 0 1
+0.141026 0.318098 -0.136786 1 0 0
+0.413843 -0.0956271 0.320513 0 0 1
+-0.47591 -0.205631 0.320513 0 0 1
+0.207016 0.294872 0.225103 0 1 0
+0.448718 -0.316822 0.211015 1 0 0
+0.141109 -0.338321 -0.0203288 1 0 0
+0.209627 0.294872 0.115019 0 1 0
+-0.365712 -0.371795 -0.137945 0 1 0
+-0.0922084 0.33255 -0.371795 0 0 1
+0.320513 -0.0310764 -0.364542 0.990876 0.0193344 0.133385
+7.10509e-005 0.351358 0.320513 0 0 1
+0.240446 0.294872 -0.084126 0 1 0
+0.151456 -0.371795 0.125357 0.0679877 0.997666 0.00632559
+0.443977 -0.371795 0.0901808 -0.409418 0.911306 -0.0435811
+0.0526686 -0.294872 0.229399 0 1 0
+0.450524 -0.0275176 0.320513 0 0 1
+0.5 0.0221231 -0.337389 1 0 0
+0.0107106 -0.251281 -0.371795 0 0 1
+0.5 0.114083 -0.0791205 1 0 0
+0.442306 -0.0448988 0.320513 0 0 1
+0.102252 0.371795 -0.0706436 0 1 0
+0.323512 0.294872 0.204422 0 1 0
+0.141026 0.317002 0.308506 0.999971 0.000537986 0.00753585
+0.203297 0.178143 -0.333333 0 0 1
+0.378421 0.294872 -0.0379554 0 1 0
+0.5 0.0638149 0.297607 1 0 0
+0.141109 -0.299553 -0.100791 0.840207 0.540411 0.0448109
+-0.448718 -0.329305 0.0917899 1 0 0
+0.5 -0.195327 -0.230096 1 0 0
+-0.475792 -0.294872 0.0233774 0 1 0
+0.209526 0.000461181 0.371795 -0.296744 -0.0248002 0.954635
+0.5 0.0965464 0.134974 1 0 0
+-0.348399 -0.0906087 0.371795 0 0 1
+-0.289264 0.300858 -0.371795 0 0 1
+-0.30357 -0.201915 -0.357679 0.774885 0.632081 0.00518007
+-0.428849 0.371795 0.0269104 0 1 0
+0.284184 0.202556 0.37154 0.478165 0.663954 0.574912
+0.330099 -0.156863 0.324519 0.838001 -0.463761 0.287542
+-0.150603 0.371795 -0.261541 0 1 0
+-0.259092 0.0898863 0.371795 0 0 1
+-0.5 0.102418 -0.229883 1 0 0
+-0.45434 -0.228949 -0.371795 0 0 1
+-0.5 -0.146442 0.233253 1 0 0
+0.0487208 0.32681 -0.371795 0 0 1
+0.385067 0.294872 -0.257255 0 1 0
+-0.379394 0.371795 -0.358639 -0.0183553 0.998359 -0.0542378
+-0.5 -0.21919 0.286235 1 0 0
+0.5 0.287708 0.17001 0.998438 0.0554559 0.00686699
+0.30711 -0.371795 0.1684 0 1 0
+0.332857 -0.371795 0.191359 0 1 0
+-0.5 -0.272769 0.315453 0.983309 -0.0983792 -0.15305
+-0.107277 0.371795 -0.327002 0 1 0
+-0.268019 0.371795 0.282363 0 1 0
+-0.0663896 0.371795 0.102127 0 1 0
+-0.0805749 -0.234597 -0.371795 0.147753 -0.433764 0.88883
+-0.493001 0.0285209 0.320513 -0.25449 -0.123662 0.959136
+0.5 -0.155708 0.12062 1 0 0
+-0.294524 0.224773 0.320513 0 0 1
+-0.494841 0.106217 0.320513 -0.317795 0.00742098 0.94813
+-0.271388 -0.371795 -0.290187 0 1 0
+0.448718 -0.294917 -0.021941 -0.604037 0.783888 -0.14373
+-0.130181 -0.0539222 -0.333333 0 0 1
+-0.5 0.182616 0.303136 1 0 0
+-0.0164306 -0.294872 -0.116041 0 1 0
+-0.145004 -0.329993 0.320513 0.355287 0.0716155 0.93201
+-0.5 0.340422 0.310411 0.999865 -0.00509529 -0.0156332
+-0.379294 0.283149 0.320513 0 0 1
+-0.5 0.233765 -0.242955 1 0 0
+0.371234 -0.371795 -0.0907155 0 1 0
+-0.25214 -0.313087 0.320513 0 0 1
+0.5 -0.0989825 -0.00343013 1 0 0
+0.279127 -0.371795 0.250848 0 1 0
+-0.5 -0.153289 0.087448 1 0 0
+-0.476795 0.371795 -0.0293202 0 1 0
+0.184266 -0.371795 -0.294054 0 1 0
+0.372902 0.294872 -0.0737063 0 1 0
+0.303883 -0.371795 0.311278 0.0525902 0.985277 -0.162675
+-0.5 0.245492 0.248316 1 0 0
+-0.5 0.32304 0.312667 0.965403 -0.016226 -0.260259
+0.304251 -0.371795 0.0517171 0 1 0
+0.5 0.0743465 0.086681 1 0 0
+-0.0440786 0.197249 0.320513 0.0825255 -0.1786 0.980455
+-0.5 0.0275296 -0.0947502 1 0 0
+-0.344721 -0.371795 0.194578 0 1 0
+0.141026 0.322434 0.0843676 1 0 0
+-0.333369 0.371795 0.263174 0 1 0
+0.5 0.186217 0.06291 1 0 0
+0.25864 -0.371795 -0.207293 0 1 0
+-0.395974 0.342606 -0.371795 0 0 1
+-0.347233 0.371795 -0.267293 0 1 0
+0.5 0.191841 0.0786191 1 0 0
+0.45211 0.0784434 0.320513 0 0 1
+0.0564321 0.148591 -0.333333 0 0 1
+-0.176839 0.230897 -0.367945 -0.0756576 0.965457 0.249336
+0.4381 -0.371795 0.155921 0 1 0
+0.254334 -0.0302743 -0.0323073 -0.629324 0.776948 0.0174302
+-0.277355 -0.371795 -0.0590201 0 1 0
+0.0137966 0.371795 -0.217656 0 1 0
+-0.0702662 -0.0880468 -0.333333 0 0 1
+0.383927 0.00782651 0.344103 0.997582 0.0694923 0
+-0.196332 0.266138 -0.371795 0 0 1
+0.266661 -0.0136915 -0.163512 0.925668 -0.378249 -0.00821956
+-0.5 -0.139495 0.0476015 1 0 0
+0.437765 0.294872 0.237845 0 1 0
+0.151252 0.294872 0.038855 0.0733811 0.997034 0.0231913
+-0.341444 -0.0105216 0.371795 0 0 1
+0.155329 -0.371795 -0.182465 0 1 0
+0.0676958 0.256282 0.329661 0.000428158 0.999466 0.032685
+-0.392586 -0.364592 0.320513 0.0398422 -0.242603 0.969307
+0.126703 0.371795 -0.00545671 0 1 0
+-0.5 -0.0512179 0.283195 1 0 0
+-0.440024 0.371795 0.105447 0 1 0
+-0.0565463 0.325672 -0.371795 0 0 1
+-0.33708 0.258868 -0.371795 0 0 1
+0.490718 -0.294872 -0.1072 -0.11842 0.99291 0.0103374
+0.5 0.182285 -0.279972 1 0 0
+0.194076 0.247278 0.356718 0.213202 0.977008 0
+0.00607781 -0.249145 0.371795 0.00747359 -0.184562 0.982792
+-0.480543 -0.183533 0.320513 0 0 1
+-0.5 -0.0573389 0.194602 1 0 0
+-0.04696 -0.294872 -0.0103515 0 1 0
+0.155291 -0.133333 0.34155 0.737606 -0.675231 0
+-0.491326 0.369423 -0.371795 -0.00292754 -0.601426 0.798923
+0.0358764 -0.294872 -0.261051 0 1 0
+0.448718 -0.341086 -0.25265 1 0 0
+0.267129 -0.371795 -0.315386 0 1 0
+0.00735112 -0.294872 -0.0310288 0 1 0
+0.197864 0.0198063 -0.191164 0.873818 -0.486252 -0.00126926
+0.372039 -0.371795 -0.338829 0 1 0
+0.394358 -0.371795 0.11993 0 1 0
+-0.377572 -0.353675 -0.371795 0 0 1
+-0.177911 0.250795 0.366805 -0.0224075 0.986702 0.160989
+0.5 -0.144084 -0.0871588 1 0 0
+0.165064 -0.199836 -0.333333 0 0 1
+-0.196961 -0.0274239 -0.151019 0.792515 -0.608703 0.037408
+-0.356618 -0.181685 0.320513 0 0 1
+0.0831726 -0.294872 0.162125 0 1 0
+-0.335577 0.371795 0.205503 0 1 0
+0.24566 0.259824 0.320513 0 0 1
+-0.41245 -0.371795 -0.0458745 0 1 0
+0.300467 -0.371795 0.307283 0 1 0
+-0.462174 -0.109941 -0.371795 0 0 1
+0.107683 -0.118345 -0.333333 0 0 1
+-0.107466 0.174431 0.323098 -0.32534 0.797516 -0.508057
+0.184497 -0.0417764 0.320513 0 0 1
+0.122102 -0.265616 0.320513 -0.00132923 -0.00226858 0.999997
+0.243981 -0.230863 -0.366674 0.0142511 0.904036 -0.427218
+-0.0169666 0.371795 0.10661 0 1 0
+-0.5 -0.0998583 0.0934131 1 0 0
+-0.461951 -0.0606997 0.320513 0 0 1
+-0.027114 -0.0785968 -0.333333 0 0 1
+-0.265099 0.0266799 -0.088077 0.768927 -0.63931 -0.00583188
+0.335636 -0.161012 -0.371795 0 0 1
+-0.5 0.073027 -0.0645784 1 0 0
+-0.236669 0.0430736 -0.239929 -0.154228 0.988027 0.00398876
+-0.5 -0.162353 -0.157766 1 0 0
+-0.0369575 -0.294872 -0.155516 0 1 0
+-0.21237 0.0209223 0.371795 0.0330419 0.0105607 0.999398
+0.175318 0.230897 -0.338084 0.081316 0.980484 0.178994
+-0.280076 0.371795 -0.0921584 0 1 0
+-0.448718 -0.359897 0.07512 1 0 0
+-0.301852 -0.0323087 -0.333333 0 0 1
+-0.0601794 -0.191602 0.320513 0.207517 0.602719 0.770497
+-0.117239 0.371795 0.306045 0 1 0
+0.5 -0.0899652 0.0797323 1 0 0
+0.165406 0.0842337 -0.333333 0 0 1
+-0.412456 0.371795 -0.327836 0 1 0
+0.5 0.157544 0.249657 1 0 0
+-0.448718 -0.343469 -0.150396 1 0 0
+0.0674048 0.0380351 0.320513 0 0 1
+-0.173478 0.371795 0.130162 0 1 0
+0.463186 -0.294872 0.261548 0 1 0
+0.5 -0.013736 -0.0874679 1 0 0
+-0.141154 -0.313315 -0.147674 1 0 0
+-0.274645 0.0102761 -0.333333 0.88779 -0.109729 -0.446977
+0.5 0.158742 0.31333 0.986194 0.017241 0.164694
+-0.365144 -0.0158216 0.371795 0 0 1
+0.5 0.228134 0.109444 1 0 0
+0.144396 0.148136 -0.333333 0 0 1
+0.5 -0.130217 -0.0625711 1 0 0
+0.5 -0.116656 -0.310506 1 0 0
+-0.161655 0.371795 -0.159329 0 1 0
+-0.217328 0.183028 0.371795 0 0 1
+-0.36003 -0.371795 0.105521 0 1 0
+-0.220377 -0.160536 -0.333333 0 0 1
+-0.5 -0.165796 0.0871811 1 0 0
+-0.147712 -0.371795 0.0210109 -0.159503 0.98719 -0.00385326
+0.0147357 -0.294872 0.109149 0 1 0
+0.303025 0.294872 0.0592279 0 1 0
+-0.5 0.25825 0.00498811 1 0 0
+0.298227 -0.348628 -0.371795 0 0 1
+0.436116 0.294872 -0.0343246 0 1 0
+-0.0315178 0.109696 -0.333333 0 0 1
+0.5 -0.215918 0.15813 1 0 0
+0.230669 0.294872 -0.0724486 0 1 0
+-0.127432 0.371795 -0.322243 0 1 0
+0.450505 0.284069 -0.371795 0 0 1
+0.5 -0.0107809 -0.0965995 1 0 0
+-0.390262 0.0466114 0.320513 -0.0213823 0.00737065 0.999744
+-0.176472 -0.165954 -0.333333 0 0 1
+0.141109 -0.3619 0.0575964 0.999861 0.0165482 -0.00187427
+0.157979 0.294872 -0.130691 0 1 0
+0.36932 0.294872 -0.0265308 0 1 0
+0.204379 0.230897 -0.364719 0.0174652 0.997403 0.0698701
+0.434373 0.294872 -0.308203 0 1 0
+0.294014 -0.371795 0.169735 0 1 0
+0.5 -0.228543 -0.244525 1 0 0
+0.0989119 0.251389 0.371795 -0.0599188 0.243133 0.968141
+0.435209 0.294872 0.0623835 0 1 0
+-0.185928 0.371795 -0.286844 0 1 0
+-0.299658 0.0439562 -0.333333 0 0 1
+0.334774 0.294872 0.242257 0 1 0
+-0.0623595 -0.130384 0.320513 0 0 1
+-0.5 -0.0371542 0.230787 1 0 0
+-0.0852015 0.371795 -0.169047 0 1 0
+-0.346196 -0.239201 -0.371795 0 0 1
+-0.5 -0.0819242 -0.366373 0.959813 0.0638343 0.273285
+0.184879 0.0877492 0.335251 0.915778 0.401684 0
+0.263843 0.262839 0.320513 0 0 1
+0.234796 -0.371795 0.204599 0 1 0
+-0.217051 -0.0286459 0.371795 0 0 1
+-0.0865115 0.371795 0.0639521 0 1 0
+-0.448718 -0.320548 -0.348243 1 0 0
+-0.5 -0.156183 0.261586 1 0 0
+0.448718 -0.339918 0.134054 1 0 0
+-0.325048 0.371795 0.213519 0 1 0
+0.5 0.121256 -0.269787 1 0 0
+0.291526 -0.371795 0.241325 0 1 0
+0.279122 -0.295549 -0.371795 0 0 1
+0.142951 -0.371795 -0.003398 0.335369 0.941999 -0.0128409
+-0.272248 -0.371795 -0.358136 0 1 0
+0.117536 -0.294872 -0.181505 0 1 0
+-0.0398722 -0.288667 -0.371795 -0.0487222 0.342431 0.938279
+0.406668 -0.371795 0.128935 0 1 0
+0.215544 0.226924 0.371795 0 0 1
+-0.0409607 0.371795 -0.0999355 0 1 0
+0.395114 -0.0446485 0.320513 0 0 1
+0.293285 -0.347464 -0.371795 0 0 1
+0.398399 0.080756 -0.371795 0 0 1
+-0.184524 0.371795 0.0928311 0 1 0
+-0.0702526 -0.192156 0.3407 0.324723 0.945809 0
+-0.108359 0.371795 -0.369963 -0.0649577 0.739525 -0.669988
+-0.251738 0.230184 -0.350118 -0.121573 0.992582 -0.00102033
+0.165999 0.294872 -0.340937 0 1 0
+0.5 0.290912 0.26592 0.887575 0.369238 0.275452
+-0.155956 0.371795 -0.146014 0 1 0
+0.0782948 0.285609 0.320513 0 0 1
+0.5 -0.0348398 -0.232663 1 0 0
+-0.455397 -0.294872 0.0699856 0.338969 0.93818 -0.0701261
+-0.373573 -0.187322 0.320513 0 0 1
+-0.343073 -0.270666 0.320513 0 0 1
+-0.044344 -0.110756 0.320513 0 0 1
+-0.5 0.0957343 -0.356105 1 0 0
+-0.183228 -0.163216 -0.333333 0 0 1
+-0.322722 0.0255618 0.371795 0 0 1
+-0.379955 0.0973198 -0.371795 0 0 1
+-0.5 -0.0811158 0.0959182 1 0 0
+-0.163991 0.12917 -0.333333 0 0 1
+-0.5 -0.0986836 0.137052 1 0 0
+0.5 0.174638 0.0846641 1 0 0
+0.486915 0.0173632 -0.371795 0 0 1
+0.250019 -0.0560842 -0.333333 0 0 1
+-0.5 -0.214928 -0.120389 1 0 0
+-0.325681 0.0874213 0.371795 0 0 1
+-0.332887 -0.186634 0.320513 0 0 1
+-0.5 0.0513151 -0.279997 1 0 0
+0.320513 0.11018 -0.358862 1 0 0
+0.210743 0.294872 -0.333895 0 1 0
+-0.280813 -0.0926644 -0.333333 0 0 1
+-0.141154 -0.303787 0.01399 0.992652 -0.113082 0.0430612
+-0.120497 0.371795 -0.0238189 0 1 0
+-0.305465 -0.371795 -0.0565333 0 1 0
+-0.317105 -0.17569 -0.336041 0.963523 0.221436 -0.150296
+-0.265034 -0.00260026 -0.0297898 -0.52024 -0.0582854 0.852029
+-0.5 -0.272678 -0.352061 1 0 0
+0.467273 0.294872 -0.323256 0 1 0
+-0.230038 0.371795 -0.341907 0 1 0
+0.5 0.24106 -0.273393 1 0 0
+0.482321 0.237038 -0.371795 0 0 1
+0.5 0.0544342 0.110966 1 0 0
+-0.141154 -0.354771 -0.00118415 1 0 0
+-0.228816 0.0374535 0.371795 0 0 1
+0.477095 -0.0901241 0.320513 0 0 1
+0.132331 0.255987 0.364585 0.0294126 0.95474 0.295983
+-0.230606 -0.371795 0.0855812 0 1 0
+0.430953 0.292013 0.320513 -0.0777075 0.491619 0.867336
+0.5 0.0482617 -0.188739 1 0 0
+-0.183707 0.312373 0.320513 0 0 1
+0.456976 -0.294872 0.0739825 -0.0280254 0.999316 0.0241231
+0.116753 -0.294872 -0.140659 0 1 0
+-0.25413 0.0156522 -0.0260218 -0.415768 0.30139 0.85808
+0.00906512 0.371795 -0.111936 0 1 0
+0.395948 -0.175704 -0.371795 0 0 1
+0.310592 -0.371795 -0.0346453 0 1 0
+-0.264917 0.0269389 -0.172893 0.801862 -0.597406 -0.0111603
+-0.5 0.16329 0.0633807 1 0 0
+-0.144479 0.371795 0.144881 0 1 0
+0.100293 -0.228017 0.371795 0 0 1
+0.0682105 -0.294872 -0.184747 0 1 0
+0.262024 0.294872 -0.21008 0 1 0
+-0.167809 -0.233711 -0.371795 0.0141894 -0.512265 0.85871
+-0.346467 0.190994 0.320513 0 0 1
+-0.387632 -0.371795 -0.284014 0 1 0
+0.5 -0.267502 0.298683 1 0 0
+-0.198067 -0.230897 -0.364733 0.082221 0.960484 -0.265913
+-0.0567572 -0.294872 -0.0161574 0 1 0
+-0.113805 0.371795 0.232133 0 1 0
+0.141026 0.336014 -0.317772 1 0 0
+0.416202 -0.1511 0.320513 0 0 1
+0.5 -0.0973568 -0.190955 1 0 0
+-0.300862 -0.281356 0.320513 0 0 1
+0.5 0.026463 0.265959 1 0 0
+-0.0302752 0.371795 -0.245762 0 1 0
+-0.466692 0.371795 0.206785 0 1 0
+-0.121436 0.371795 -0.16617 0 1 0
+0.188634 -0.371795 0.1593 0 1 0
+0.114865 -0.182263 -0.333333 0 0 1
+-0.225419 -0.371795 -0.304125 0 1 0
+0.083485 0.0559103 -0.333333 0 0 1
+0.122325 -0.164003 0.330552 -0.614225 0.789131 0
+0.25063 0.0932667 0.371795 0 0 1
+-0.168689 -0.230897 -0.336939 -0.0312278 0.872645 -0.487355
+-0.141154 -0.304718 0.0559406 0.988872 -0.136288 -0.0596541
+0.316858 0.172861 0.366102 0.642762 0.743383 0.185034
+-0.00344586 0.184224 -0.333333 0 0 1
+-0.231107 0.371795 0.0222616 0 1 0
+-0.209033 -0.146695 0.371795 0 0 1
+0.26511 -0.0170163 -0.224946 0.899513 -0.43687 -0.00462183
+0.184253 -0.371795 -0.297049 0 1 0
+0.202718 -0.0569262 -0.333333 0 0 1
+-0.37155 -0.263489 0.320513 0 0 1
+0.489155 0.294872 -0.153166 0.0699179 0.997473 -0.0125938
+-0.5 0.35085 -0.13881 1 0 0
+0.178317 -0.27521 0.320513 0 0 1
+-0.353973 0.371795 -0.302732 0 1 0
+-0.421436 -0.0116781 -0.371795 0 0 1
+-0.117575 -0.100187 -0.333333 0 0 1
+0.5 -0.214065 -0.206779 1 0 0
+0.5 0.250256 0.269294 1 0 0
+0.0105785 -0.0285553 -0.333333 0 0 1
+0.269038 0.0022055 -0.0981346 0.99993 0.00345973 0.0112794
+-0.141154 -0.318984 0.165654 1 0 0
+-0.225942 -0.371795 0.158963 0 1 0
+0.142611 0.288692 -0.371795 -0.0332948 -0.139512 0.98966
+-0.109926 0.025744 -0.333333 0 0 1
+-0.286549 -0.295239 0.320513 0 0 1
+0.370604 -0.371795 0.285723 0 1 0
+0.268951 -0.371795 -0.0734367 0 1 0
+0.327326 0.0665434 0.371795 0 0 1
+-0.5 0.10976 -0.134035 1 0 0
+-0.0837408 -0.0686736 -0.333333 0 0 1
+-0.160767 -0.371795 -0.317126 0 1 0
+0.305366 -0.0918931 0.371795 0 0 1
+0.0237129 0.358388 -0.371795 0 0 1
+0.26704 -0.371795 -0.355377 0 1 0
+0.00131199 -0.294872 -0.158875 0 1 0
+-0.244113 -0.371795 -0.228769 0 1 0
+0.143057 -0.364454 0.320513 -0.572426 -0.077137 0.81632
+-0.0127234 -0.220768 -0.333333 0.013826 -0.147918 0.988903
+-0.0424267 0.230897 -0.349865 0 1 0
+-0.5 0.00465236 0.0846201 1 0 0
+-0.141154 -0.295994 -0.205135 -0.506311 0.860167 0.0613408
+0.418591 0.139169 -0.371795 0 0 1
+0.0275295 -0.182734 0.320513 0 0 1
+0.381881 0.0364435 0.350208 0.989826 0.142166 -0.00573462
+0.0386413 0.362181 -0.371795 0 0 1
+-0.189427 0.0729056 -0.333333 0 0 1
+-0.242462 0.371795 0.146827 0 1 0
+-0.035334 -0.294872 0.128762 0 1 0
+0.333922 -0.371795 0.232737 0 1 0
+0.5 -0.204285 -0.0766766 1 0 0
+-0.192919 -0.371795 0.172314 0 1 0
+0.0983784 -0.294872 -0.313881 0 1 0
+-0.459506 -0.0023715 -0.371795 0 0 1
+0.0518395 -0.294872 0.0125738 0 1 0
+-0.141154 -0.30671 0.186388 1 0 0
+-0.0373992 0.277488 -0.371795 0 0 1
+-0.24191 -0.172937 0.371795 0 0 1
+-0.5 -0.0352837 -0.259182 1 0 0
+-0.195108 0.208876 -0.333333 0 0 1
+0.170362 -0.113235 0.333281 0.837156 -0.546964 0
+0.0305086 -0.294872 0.198243 0 1 0
+-0.208842 0.0815784 0.371795 0 0 1
+0.417457 0.294872 0.00587244 0 1 0
+0.448718 -0.364952 0.120467 0.997781 -0.0569308 -0.0345149
+0.5 0.0106911 -0.232754 1 0 0
+0.5 -0.0032391 -0.300672 1 0 0
+-0.5 -0.0613507 0.00296519 1 0 0
+0.0423878 -0.200311 0.368464 -0.232814 0.852672 0.467705
+-0.448718 -0.366271 -0.240058 0.985489 0.163708 -0.0448487
+-0.166735 0.371795 0.00273332 0 1 0
+0.141109 -0.324531 -0.176911 1 0 0
+-0.220112 0.0421 -0.311791 0.264717 0.964324 -0.00189202
+0.448718 -0.312543 0.146369 1 0 0
+-0.448718 -0.324442 0.157418 1 0 0
+-0.0302076 0.371795 -0.252395 0 1 0
+0.313539 -0.371795 0.128358 0 1 0
+-0.374898 0.371795 0.189392 0 1 0
+0.167357 -0.371795 -0.0876275 0 1 0
+0.00721492 0.371795 0.127503 0 1 0
+-0.356297 -0.371795 0.250422 0 1 0
+0.228831 -0.0382919 -0.00284986 0.115989 0.952502 -0.28158
+0.34811 -0.371795 0.177722 0 1 0
+-0.5 -0.276991 0.166384 1 0 0
+0.10189 0.371795 -0.16641 0 1 0
+-0.5 -0.243268 0.0511303 1 0 0
+-0.488929 -0.294872 0.215976 0 1 0
+0.372149 -0.124821 0.320513 0 0 1
+-0.5 -0.239646 -0.0304177 1 0 0
+-0.117789 -0.294872 -0.356371 0 1 0
+-0.226063 -0.133942 -0.333333 0 0 1
+0.267749 0.11181 0.371795 0 0 1
+0.141109 -0.345446 -0.326195 1 0 0
+-0.12412 -0.294872 -0.309421 0 1 0
+0.340218 -0.371795 -0.278681 0 1 0
+-0.21842 -0.371795 -0.261423 0 1 0
+-0.5 0.367431 -0.26029 0.970755 -0.236178 0.0430703
+-0.5 -0.238547 -0.221448 1 0 0
+0.5 0.15903 0.275285 1 0 0
+-0.380947 -0.201923 -0.371795 0 0 1
+0.141109 -0.297041 0.00966762 0.581459 0.812128 0.0485256
+-0.0825152 0.371795 0.160737 0 1 0
+0.402415 -0.371795 -0.18743 0 1 0
+-0.472643 0.371795 -0.0868234 0 1 0
+-0.480341 0.294285 0.320513 0 0 1
+-0.282819 -0.15689 0.371795 0 0 1
+-0.142868 0.257818 -0.371795 0 0 1
+-0.426679 0.341621 -0.371795 0 0 1
+-0.308509 -0.371795 -0.248625 0 1 0
+-0.5 0.119569 -0.369693 0.661936 0.291363 0.690615
+-0.5 -0.0628313 0.157186 1 0 0
+-0.373389 0.340433 -0.371795 0 0 1
+-0.0645403 -0.093607 -0.333333 0 0 1
+0.103138 0.371795 -0.0635313 0 1 0
+0.5 0.193228 0.238725 1 0 0
+0.5 0.189316 -0.164038 1 0 0
+-0.0346714 0.371795 0.16417 0 1 0
+0.377562 -0.371795 0.210356 0 1 0
+-0.395179 0.268544 -0.371795 0 0 1
+-0.195965 -0.213593 0.371795 0 0 1
+0.228011 -0.241108 -0.371795 0.0241381 -0.0981273 0.994881
+-0.19198 0.371795 0.312935 0.0648468 0.959971 0.27249
+0.376997 -0.0589143 0.351805 0.97715 -0.212551 0
+-0.400235 0.100614 -0.371795 0 0 1
+0.5 0.168699 0.0856221 1 0 0
+-0.402246 0.183041 -0.371795 0 0 1
+0.141109 -0.368608 0.307674 0.85632 0.506776 0.0994713
+0.496512 0.294872 -0.341184 0.408218 0.90431 -0.124827
+-0.448489 -0.0784123 -0.371795 0 0 1
+-0.422246 0.126716 0.320513 0 0 1
+-0.327148 -0.000304507 -0.371795 -0.303399 0.0765654 0.949783
+-0.417011 -0.371795 -0.214546 0 1 0
+0.5 0.20331 -0.0800121 1 0 0
+0.36865 -0.371795 0.310345 0 1 0
+0.136482 -0.0407395 0.320513 0 0 1
+-0.5 0.19635 0.122782 1 0 0
+0.00333908 0.371795 0.298796 0 1 0
+-0.496783 0.133221 0.320513 -0.588145 0.0962848 0.803003
+0.448718 -0.344711 -0.077913 1 0 0
+-0.5 -0.113294 0.180061 1 0 0
+-0.141154 -0.302298 -0.0909382 0.9902 -0.124207 -0.0638494
+-0.5 0.112146 -0.175355 1 0 0
+-0.5 -0.00252329 -0.0959831 1 0 0
+0.358912 -0.371795 -0.0183326 0 1 0
+-0.448718 -0.33756 -0.0431837 1 0 0
+0.369043 0.0970685 -0.371795 0 0 1
+0.5 0.294491 0.201246 0.690505 0.716356 -0.100184
+0.400736 0.294872 -0.268331 0 1 0
+-0.320513 0.11921 -0.352045 1 0 0
+-0.5 -0.0916007 0.0299388 1 0 0
+-0.191639 0.218642 0.371795 0 0 1
+-0.446903 0.301162 0.320513 0 0 1
+-0.186026 -0.371795 -0.0122459 0 1 0
+-0.245721 0.148471 -0.333333 0 0 1
+-0.37473 -0.371795 -0.253541 0 1 0
+-0.26481 -0.0270921 -0.308986 0.807402 0.589998 -0.00216701
+-0.479841 0.120097 -0.371795 0 0 1
+-0.448718 -0.308303 0.131837 1 0 0
+0.388395 -0.371795 0.270042 0 1 0
+-0.148287 0.371795 0.214165 0 1 0
+-0.436781 -0.371795 -0.191286 0 1 0
+0.0676223 -0.294872 -0.345414 0 1 0
+0.0987321 0.371795 -0.110255 0 1 0
+0.141026 0.315709 -0.00893846 1 0 0
+0.27331 -0.371795 0.247644 0 1 0
+-0.0438632 0.371795 0.304023 0 1 0
+0.5 -0.0149631 0.268316 1 0 0
+-0.5 0.182607 0.0577912 1 0 0
+0.0523669 0.371795 -0.254166 0 1 0
+-0.112184 0.171878 0.37051 -0.503693 0.785531 -0.359492
+-0.5 0.0139634 0.217562 1 0 0
+0.150611 -0.0574972 -0.333333 0 0 1
+0.0463244 -0.258729 0.320513 0.0277676 -0.545852 0.837421
+-0.0215792 -0.294872 0.0706738 0 1 0
+-0.287785 -0.371795 -0.334538 0 1 0
+-0.20098 0.371795 -0.0871004 0 1 0
+0.496904 -0.294872 -0.0719087 -0.247901 0.966968 -0.0593107
+-0.465013 0.175272 -0.371795 0 0 1
+-0.0183804 0.371795 -0.352486 0 1 0
+0.109116 -0.294872 -0.0320873 0 1 0
+0.5 -0.0724052 0.00104316 1 0 0
+-0.207254 -0.0365452 -0.190712 -0.562346 0.826655 -0.0202268
+0.148734 0.282128 -0.371795 0 0 1
+0.5 -0.27675 0.0035943 1 0 0
+-0.248585 -0.00653836 -0.0204705 -0.466522 -0.21288 0.85851
+-0.5 -0.00723587 -0.0674048 1 0 0
+0.5 0.265323 0.0403094 1 0 0
+-0.480938 -0.294872 -0.0184261 0 1 0
+0.202169 0.294872 -0.0178176 0 1 0
+-0.147078 -0.11929 -0.333333 0 0 1
+0.154555 -0.371795 -0.122564 0 1 0
+0.341028 -0.371795 -0.25788 0 1 0
+0.5 0.192224 0.181426 1 0 0
+-0.431022 -0.257974 -0.371795 0 0 1
+0.219657 -0.0366893 -0.0372529 0.29726 0.954741 -0.010294
+-0.141154 -0.350968 -0.18079 1 0 0
+-0.482233 -0.294872 0.0222084 0 1 0
+0.444074 -0.371795 0.142219 -0.216578 0.975346 -0.042356
+0.121056 0.371795 0.0389461 0 1 0
+0.0877116 -0.256282 0.322862 -0.0148233 0.837807 -0.545765
+0.5 -0.252127 -0.0135585 1 0 0
+-0.450633 0.250785 -0.371795 0 0 1
+0.494808 -0.294872 0.0486112 -0.231442 0.956209 -0.179163
+0.454601 -0.125747 -0.371795 0 0 1
+0.325822 -0.190801 -0.371795 0 0 1
+-0.31943 0.371795 0.260431 0 1 0
+0.5 0.0214073 0.129558 1 0 0
+-0.146584 -0.142791 0.367861 0.742147 0.546401 0.388155
+-0.324524 -0.254416 0.320513 0 0 1
+-0.153458 -0.371795 0.275894 0 1 0
+-0.247226 -0.112973 -0.333333 0 0 1
+-0.0283875 0.371795 0.312796 -0.00459362 0.999912 0.0124128
+0.228085 -0.194289 -0.333333 0 0 1
+-0.0613742 -0.0226808 -0.333333 0 0 1
+-0.104108 -0.136519 0.320513 0 0 1
+0.399702 -0.14752 -0.371795 0 0 1
+-0.5 -0.228148 0.281513 1 0 0
+-0.46246 0.371795 0.11289 0 1 0
+0.5 -0.23725 -0.240136 1 0 0
+0.372156 0.139378 -0.371795 0 0 1
+-0.197367 -0.0280034 -0.193865 0.769748 -0.638332 0.00442592
+0.245486 -0.0668641 0.371795 0 0 1
+-0.141154 -0.343708 -0.0594675 1 0 0
+-0.5 0.369907 -0.10484 0.762651 -0.646435 0.0220461
+-0.368698 0.371795 0.170682 0 1 0
+0.231935 -0.371795 -0.293354 0 1 0
+0.5 -0.184697 0.317949 0.758647 0.0458358 0.649888
+-0.190965 0.177812 -0.333333 0 0 1
+0.16909 0.294872 -0.140891 0 1 0
+-0.378724 0.358024 -0.371795 0 0 1
+-0.318772 0.371795 -0.261553 0 1 0
+0.5 0.117712 -0.24363 1 0 0
+-0.487203 -0.294872 -0.00665493 0 1 0
+0.026584 -0.294872 -0.212479 0 1 0
+-0.154665 0.278372 -0.371795 0 0 1
+0.5 0.010296 0.0666398 1 0 0
+-0.415798 0.178298 -0.371795 0 0 1
+-0.477643 -0.104561 -0.371795 0 0 1
+-0.403229 -0.249355 -0.371795 0 0 1
+0.157664 0.294872 -0.186426 0 1 0
+0.012707 0.371795 0.303203 0 1 0
+0.0962242 0.180514 0.354216 0.475914 0.879492 0
+0.143423 -0.192117 0.371795 0 0 1
+0.221508 0.294872 -0.364265 -0.0228362 0.999288 -0.0300239
+-0.0760347 0.371795 -0.112043 0 1 0
+0.19919 -0.258333 0.320513 0 0 1
+0.209288 0.0317329 -0.185803 -0.552489 0.833467 0.0094182
+0.43728 -0.00352211 0.320513 0 0 1
+0.445648 0.0237062 -0.371795 0 0 1
+-0.5 0.349223 -0.087573 1 0 0
+0.317622 -0.0524833 0.371795 0 0 1
+-0.319776 0.371795 -0.290569 0 1 0
+0.0109309 -0.294872 -0.0397171 0 1 0
+-0.0709679 -0.08737 -0.333333 0 0 1
+-0.0637179 -0.256282 0.321307 -0.0946015 0.943351 -0.318024
+0.195577 0.0609505 0.329513 0.975157 0.215537 -0.051115
+-0.5 -0.0500505 0.168885 1 0 0
+0.0516606 -0.256282 0.340427 0 1 0
+0.448718 -0.311834 -0.128651 1 0 0
+0.423041 -0.371795 0.1421 0 1 0
+-0.37372 0.0732389 0.349015 0.958641 -0.284386 0.0114965
+0.114968 -0.294872 -0.29395 0 1 0
+-0.0668079 0.151986 0.320513 0 0 1
+0.274585 0.0547059 0.371795 0 0 1
+-0.404501 0.1604 0.320513 0 0 1
+0.232417 -0.182223 0.371795 0 0 1
+-0.369622 -0.0842233 0.329793 0.936945 0.349478 0
+-0.5 -0.1224 -0.184392 1 0 0
+-0.448718 -0.333031 0.155416 1 0 0
+0.186201 -0.371795 -0.317867 0 1 0
+-0.232265 -0.371795 0.186715 0 1 0
+0.141026 0.365911 0.114157 0.967504 0.215868 0.131669
+-0.194444 0.371795 -0.206139 0 1 0
+-0.351581 -0.371795 -0.026386 0 1 0
+0.4463 -0.266868 -0.371795 0 0 1
+0.258366 0.220183 0.32173 0.00879596 0.682302 0.731017
+-0.130894 0.0349755 -0.333333 0 0 1
+0.129596 0.371795 -0.361755 -0.0287101 0.99716 -0.0696288
+-0.372377 -0.312623 -0.371795 0 0 1
+-0.363376 -0.0501413 -0.371795 0 0 1
+0.5 -0.00363192 0.300985 1 0 0
+0.448718 -0.335514 0.0892118 1 0 0
+-0.226369 0.016066 -0.019112 0.124486 0.501396 0.856216
+0.345728 0.294872 -0.0335927 0 1 0
+-0.441832 -0.08258 -0.371795 0 0 1
+0.5 0.285712 -0.144764 0.991398 0.130209 -0.0132557
+-0.256474 -0.181246 0.371795 0 0 1
+0.395378 -0.221262 0.320513 0 0 1
+-0.312458 -0.371795 0.22705 0 1 0
+0.492045 -0.206255 0.320513 0.0315912 0.0111478 0.999439
+-0.277999 0.371795 0.0377458 0 1 0
+-0.215057 -0.0172314 -0.0231154 0.329012 -0.386705 0.861516
+-0.141154 -0.322121 -0.162405 1 0 0
+0.381162 -0.278399 -0.371795 0 0 1
+0.127301 -0.214115 0.371795 0 0 1
+0.5 0.00786803 0.092463 1 0 0
+0.108684 0.119073 0.320513 0 0 1
+-0.0303279 0.124178 -0.333333 0 0 1
+0.322019 -0.167657 0.36963 0.515541 -0.381868 0.767068
+0.351398 -0.371795 0.311586 0 1 0
+-0.5 0.181867 -0.350488 1 0 0
+0.141109 -0.302974 -0.203977 0.991942 0.126667 0.0025547
+0.301066 -0.27521 -0.371795 0 0 1
+0.5 0.246599 0.0406061 1 0 0
+-0.5 -0.0195391 -0.269423 1 0 0
+0.162879 -0.13304 0.371795 -0.0773191 0.037135 0.996315
+0.155297 -0.269318 -0.371795 0 0 1
+0.350114 -0.0996832 -0.371795 0 0 1
+0.102568 -0.0773291 0.320513 0 0 1
+-0.40599 -0.371795 -0.0594796 0 1 0
+0.394655 -0.300406 0.320513 0 0 1
+-0.162485 -0.230897 -0.343679 0 1 0
+0.0148879 -0.23843 -0.371795 -0.00970501 -0.144189 0.989503
+0.4248 -0.371795 0.318113 0.0499158 0.828893 -0.557176
+0.448718 -0.350174 0.0734756 1 0 0
+0.456582 -0.294872 0.286506 -0.154881 0.987665 -0.0230017
+-0.2763 -0.371795 -0.189043 0 1 0
+-0.417587 0.357002 0.320513 0 0 1
+-0.204848 -0.214995 -0.333333 0 0 1
+-0.202255 -0.371795 0.0912327 0 1 0
+-0.00691236 0.371795 0.0536045 0 1 0
+-0.5 -0.229117 0.289484 1 0 0
+-0.412253 0.303146 0.320513 0 0 1
+-0.5 -0.00396655 -0.00650806 1 0 0
+-0.128546 0.133836 -0.333333 0 0 1
+-0.5 0.245678 -0.156281 1 0 0
+-0.171725 0.371795 0.00920095 0 1 0
+0.224445 0.294872 0.135112 0 1 0
+0.5 -0.185766 -0.28178 1 0 0
+-0.140318 0.371795 0.0719178 0 1 0
+-0.448718 -0.328098 0.311843 0.984832 0.104503 -0.138508
+0.5 0.142382 -0.286055 1 0 0
+0.408101 -0.371795 -0.154996 0 1 0
+0.5 -0.152117 0.151696 1 0 0
+-0.5 -0.0936037 -0.00256062 1 0 0
+0.5 -0.0613832 0.0587173 1 0 0
+-0.5 0.124879 0.251355 1 0 0
+-0.211965 0.0783402 -0.333333 0 0 1
+0.0262352 0.0823482 -0.333333 0 0 1
+0.0829862 0.371795 -0.299308 0 1 0
+-0.330839 -0.371795 0.244358 0 1 0
+-0.227113 0.0432699 -0.156333 0.12545 0.991854 0.0220669
+0.01283 -0.294872 -0.296211 0 1 0
+-0.484485 -0.0516399 0.320513 0 0 1
+-0.332765 0.153302 0.36209 0.774901 -0.618472 -0.130467
+0.402246 0.294872 0.311252 -0.00154592 0.999937 0.0111568
+0.413586 0.294872 -0.0967049 0 1 0
+0.432994 -0.0226755 -0.371795 0 0 1
+-0.474941 0.371795 -0.234875 0 1 0
+0.0922436 0.371795 -0.15842 0 1 0
+-0.00719686 -0.294872 -0.305126 0 1 0
+0.280555 -0.371795 -0.230751 0 1 0
+0.0539762 0.371795 0.132454 0 1 0
+-0.207033 0.0363907 -0.303359 0.559703 0.828599 -0.0124889
+0.382082 -0.371795 0.0122742 0 1 0
+0.0393569 -0.217027 -0.333333 0 0 1
+-0.5 -0.0744658 0.223375 1 0 0
+0.1717 -0.10456 0.320513 -0.295643 0.132452 0.946072
+-0.00320397 -0.225326 -0.333333 0.0675131 -0.259832 0.963291
+-0.448718 -0.318543 0.143888 1 0 0
+-0.219475 0.371795 0.0335086 0 1 0
+0.198902 0.0286206 0.320513 -0.593385 0.140217 0.792612
+-0.5 0.183629 -0.255823 1 0 0
+0.5 0.173762 0.024346 1 0 0
+0.312494 0.0814699 0.371795 0 0 1
+-0.358131 0.339462 -0.371795 0 0 1
+-0.5 0.105931 0.131912 1 0 0
+-0.5 -0.0800259 0.28999 1 0 0
+-0.483737 0.371795 -0.357725 0 1 0
+-0.100702 -0.269186 -0.371795 0 0 1
+-0.114705 -0.294872 -0.14276 0 1 0
+0.365904 -0.268146 0.320513 0 0 1
+-0.124168 -0.178965 -0.333333 0 0 1
+0.267827 -0.00973644 -0.0994238 0.961977 -0.273113 -0.00305935
+0.386104 -0.371795 -0.0489312 0 1 0
+0.5 -0.0208324 0.190891 1 0 0
+0.259282 -0.219682 0.34378 -0.480321 0.877093 0
+-0.367899 0.371795 -0.364329 -0.0189537 0.988745 -0.148407
+0.12398 -0.117333 0.320513 0 0 1
+-0.202778 0.245017 0.367193 -0.196696 0.873484 0.44535
+-0.149622 -0.371795 0.24819 -0.095917 0.99505 0.0259958
+-0.280118 -0.211551 -0.333333 -0.120495 -0.0829327 0.989244
+0.194632 -0.0131657 -0.22419 0.950611 0.310185 -0.0111604
+-0.26557 0.0260071 -0.132572 0.797886 -0.602533 0.0182134
+0.308345 -0.198108 0.320513 0 0 1
+0.17126 -0.371795 0.0452736 0 1 0
+0.0140275 0.319844 -0.371795 0 0 1
+0.477367 -0.194706 -0.371795 0 0 1
+-0.363044 -0.371795 0.163126 0 1 0
+0.250392 -0.137631 -0.333333 0 0 1
+0.306891 -0.0875979 0.371795 0 0 1
+-0.213652 0.371795 -0.300172 0 1 0
+-0.5 0.251546 -0.173076 1 0 0
+0.5 0.281801 -0.0714526 1 0 0
+0.141109 -0.338978 -0.318152 1 0 0
+0.5 0.0189368 -0.026972 1 0 0
+0.127915 -0.294872 -0.150209 0 1 0
+-0.466574 0.371795 0.214088 0 1 0
+-0.373431 0.0495857 -0.371795 0 0 1
+0.5 -0.103726 0.301667 1 0 0
+-0.0485965 0.0562323 0.320513 0 0 1
+0.474782 0.14871 0.320513 0 0 1
+-0.5 -0.135934 -0.323782 1 0 0
+-0.403477 -0.0295509 -0.371795 0 0 1
+-0.118374 0.323568 -0.371795 0 0 1
+-0.3214 0.371795 -0.19516 0 1 0
+0.0975407 -0.294872 0.0847494 0 1 0
+-0.5 -0.154829 0.262679 1 0 0
+0.5 0.113001 0.130612 1 0 0
+-0.389416 -0.259374 -0.371795 0 0 1
+0.5 -0.117475 0.114017 1 0 0
+-0.5 0.0359937 0.183283 1 0 0
+0.137228 0.371795 -0.00307478 0.301132 0.940905 0.154978
+0.407508 -0.371795 -0.21274 0 1 0
+-0.295613 0.0259758 -0.333333 0 0 1
+-0.271617 0.371795 0.208837 0 1 0
+0.30405 -0.371795 0.252726 0 1 0
+0.448718 -0.335106 0.0487683 1 0 0
+0.192744 0.0049889 -0.247725 0.994256 -0.107028 0
+0.5 0.0879276 0.00677615 1 0 0
+-0.22113 0.154776 -0.333333 0 0 1
+-0.21454 0.0403449 -0.251686 0.370002 0.928997 0.00792602
+0.0854773 -0.294872 -0.0322699 0 1 0
+0.266908 0.186972 -0.333333 0 0 1
+0.164035 0.294872 -0.354575 0 1 0
+-0.140934 0.162304 0.371795 0 0 1
+0.498645 0.294872 0.0482272 0.338252 0.940827 0.0207211
+0.5 0.120471 -0.0465828 1 0 0
+0.268724 0.00578741 -0.254206 0.983641 0.180012 0.00679144
+0.0168221 -0.108083 -0.333333 0 0 1
+0.5 -0.023761 0.162316 1 0 0
+0.265903 -0.115667 0.371795 0 0 1
+-0.5 0.149721 -0.306304 1 0 0
+-0.368117 -0.371795 -0.0517359 0 1 0
+0.448718 -0.354324 -0.189177 1 0 0
+-0.5 0.197975 0.0867079 1 0 0
+-0.388319 0.371795 -0.0413729 0 1 0
+0.5 0.0965107 -0.32316 1 0 0
+0.155347 -0.371795 -0.296731 0 1 0
+-0.0596577 -0.13657 -0.333333 0 0 1
+0.349107 -0.317441 -0.371795 0 0 1
+-0.389796 -0.302117 -0.371795 0 0 1
+0.13701 -0.294872 -0.0942607 0.19504 0.978463 0.0675935
+-0.386139 -0.371795 -0.0660719 0 1 0
+-0.5 0.0426429 0.0622781 1 0 0
+-0.5 -0.190891 0.0551388 1 0 0
+0.0225014 0.277334 -0.371795 0 0 1
+0.206565 -0.30487 -0.371795 0 0 1
+0.5 0.114452 0.165507 1 0 0
+-0.297166 0.371795 -0.122238 0 1 0
+-0.245268 0.0410707 -0.205804 -0.350885 0.936279 0.0161492
+-0.339829 0.371795 0.110187 0 1 0
+0.5 -0.229653 0.157044 1 0 0
+-0.5 0.0357942 0.196733 1 0 0
+0.327928 -0.371795 0.139519 0 1 0
+-0.377591 -0.084322 -0.371795 0 0 1
+-0.196864 -0.247381 0.320513 0.0221648 -0.563762 0.82564
+0.236141 0.0379915 -0.33038 0.104536 0.854522 0.508788
+-0.141154 -0.369787 -0.0323556 0.728123 -0.685369 -0.0102846
+0.447263 -0.230581 -0.371795 0 0 1
+0.268837 -0.00449967 -0.273085 0.990512 -0.137155 0.00867253
+0.0275437 -0.27528 -0.371795 0 0 1
+0.175642 0.0108674 -0.333333 0 0 1
+0.0668888 0.371795 -0.254003 0 1 0
+-0.0460937 -0.294872 0.0755683 0 1 0
+0.5 0.0445488 -0.31398 1 0 0
+0.210244 0.242232 0.360451 0.349473 0.936947 0
+0.497791 -0.201993 -0.371795 -0.550017 0.020875 0.834893
+0.0700377 -0.166091 0.320513 0 0 1
+0.461808 -0.294872 0.263828 0 1 0
+-0.141154 -0.349851 0.0837658 1 0 0
+-0.5 0.302935 -0.0163022 1 0 0
+-0.0388615 -0.294872 0.129345 0 1 0
+0.21916 -0.246391 -0.371795 0 0 1
+0.5 -0.038685 0.218344 1 0 0
+-0.148289 0.371795 -0.336843 0 1 0
+-0.5 0.0369099 -0.116126 1 0 0
+-0.380695 0.0419138 0.322047 0.76077 -0.200896 -0.617146
+0.5 0.0127365 0.0281899 1 0 0
+0.320513 -0.0945218 -0.360886 1 0 0
+0.141109 -0.313193 0.164023 1 0 0
+-0.223871 -0.371795 0.19971 0 1 0
+0.414251 -0.255924 -0.371795 0 0 1
+-0.5 -0.05969 0.260377 1 0 0
+-0.232214 -0.073181 0.371795 0 0 1
+-0.231312 -0.371795 -0.065785 0 1 0
+-0.448718 -0.332217 -0.0460131 1 0 0
+-0.0939224 -0.0964153 0.320513 0 0 1
+0.186673 -0.0410937 0.320513 0 0 1
+0.5 0.0956309 0.0577307 1 0 0
+-0.384936 0.289707 -0.371795 0 0 1
+0.298064 -0.093051 0.371795 0 0 1
+-0.253102 -0.371795 0.0997061 0 1 0
+0.387725 -0.0797836 0.320513 0 0 1
+0.193351 -0.24329 -0.371795 0 0 1
+-0.257849 -0.371795 0.0261153 0 1 0
+0.0586102 -0.256282 0.358256 0 1 0
+-0.131478 0.371795 -0.101853 0 1 0
+0.0198111 0.130922 0.320513 0 0 1
+0.311362 0.0964652 -0.333333 0.122325 -0.0522051 0.991116
+-0.00924362 0.0714409 0.320513 0 0 1
+-0.3019 0.204036 -0.350035 0.75513 -0.655507 0.00947514
+0.393897 0.0171564 -0.371795 0 0 1
+0.355119 0.294872 0.193035 0 1 0
+-0.5 0.0524151 0.293962 1 0 0
+-0.379393 0.02825 0.371795 -0.504191 0.0403977 0.862647
+-0.4375 -0.337496 0.320513 0 0 1
+-0.380276 -0.371795 0.0563186 0 1 0
+0.390501 -0.371795 0.0860647 0 1 0
+-0.00226452 0.371795 0.23727 0 1 0
+0.5 0.00409561 -0.133182 1 0 0
+-0.0302333 0.0125594 -0.333333 0 0 1
+-0.1679 0.371795 -0.0244114 0 1 0
+0.5 -0.249241 0.0520257 1 0 0
+0.0801379 0.188762 0.322224 0.525579 0.669331 -0.525132
+0.393819 0.294872 0.283239 0 1 0
+0.126484 0.371795 -0.159057 0 1 0
+0.292756 -0.371795 -0.0155584 0 1 0
+-0.040444 0.371795 -0.218498 0 1 0
+0.490038 -0.100809 -0.371795 0 0 1
+0.136887 -0.294872 -0.169075 0.13128 0.987031 0.0923922
+-0.265108 0.026666 -0.226946 0.799553 -0.600584 -0.00366135
+0.0848508 0.226471 -0.333333 0.143408 0.71049 0.68894
+-0.23991 -0.23026 0.370542 0.476115 0.589283 -0.652733
+0.249531 0.0335274 -0.180664 0.512601 0.858627 0
+0.257472 0.204784 0.371795 0 0 1
+-0.182763 0.05776 -0.333333 0 0 1
+-0.214858 0.062912 0.371795 0 0 1
+-0.5 -0.238663 -0.231922 1 0 0
+-0.5 -0.168525 0.0166321 1 0 0
+-0.5 -0.00973975 -0.0523016 1 0 0
+-0.301149 0.371795 0.176147 0 1 0
+-0.5 0.248481 0.219198 1 0 0
+-0.347276 0.371795 -0.0201179 0 1 0
+-0.29893 0.371795 0.0329038 0 1 0
+-0.38058 0.371795 0.0724549 0 1 0
+-0.304901 -0.371795 0.0177077 0 1 0
+0.5 0.00942995 -0.288155 1 0 0
+-0.34978 0.371795 0.0595952 0 1 0
+0.278436 0.294872 -0.371417 -0.0218685 -0.613899 0.789082
+-0.186484 0.371795 0.313371 -0.0141766 0.94497 0.326848
+0.141109 -0.363715 0.137668 0.999999 0.0010222 0.000845701
+-0.0100122 0.241902 -0.371795 -0.00360039 0.163929 0.986466
+0.5 0.265737 -0.0291103 1 0 0
+-0.5 0.0217834 0.211801 1 0 0
+0.5 0.168644 -0.180647 1 0 0
+-0.164761 -0.290583 -0.371795 0 0 1
+-0.141154 -0.356547 -0.137993 1 0 0
+0.218397 0.294872 0.0655405 0 1 0
+-0.0975555 -0.294872 -0.00100547 0 1 0
+0.351779 0.206461 0.320513 0 0 1
+-0.0612099 -0.0180055 -0.333333 0 0 1
+-0.352583 -0.351384 0.320513 0 0 1
+-0.448718 -0.305685 0.228503 1 0 0
+0.483426 -0.116677 0.320513 0 0 1
+0.469018 -0.294872 -0.0817319 0 1 0
+0.144543 -0.0953688 0.320513 0 0 1
+0.339817 -0.143882 0.325607 0.739046 -0.660827 0.130838
+0.5 0.286963 0.060027 0.988249 0.139587 -0.0622918
+0.448718 -0.333354 -0.328774 1 0 0
+0.5 -0.0669089 0.0104505 1 0 0
+-0.00418988 0.144241 0.320513 0 0 1
+-0.322965 -0.315987 -0.371795 0 0 1
+-0.333892 0.251553 0.320513 0 0 1
+-0.382044 0.0341664 0.34187 0.992662 -0.120826 0.00473429
+0.428848 -0.371795 -0.346112 0 1 0
+-0.448682 0.371795 0.311784 -0.00631893 0.999933 0.00966775
+0.0129992 0.371795 0.105842 0 1 0
+-0.0597183 0.371795 0.233026 0 1 0
+0.5 0.163895 -0.294133 1 0 0
+-0.38637 0.11027 -0.371795 0 0 1
+0.448718 -0.351476 0.0255133 1 0 0
+-0.404539 0.371795 0.127982 0 1 0
+0.5 -0.216959 -0.300608 1 0 0
+-0.123969 0.323307 -0.371795 0 0 1
+0.365612 -0.371795 -0.203845 0 1 0
+-0.448718 -0.31881 -0.145038 1 0 0
+-0.5 0.282274 0.144174 1 0 0
+0.174001 -0.371795 -0.118618 0 1 0
+0.5 -0.203121 -0.131286 1 0 0
+0.424146 -0.371795 0.274705 0 1 0
+0.141026 0.297536 -0.109378 0.764176 0.630971 0.133832
+-0.394466 0.371795 -0.0499632 0 1 0
+0.453363 -0.294872 0.00524683 -0.122535 0.991042 0.0531048
+-0.276666 0.223103 -0.355962 -0.458311 0.888771 -0.00611517
+0.5 -0.0751464 -0.19678 1 0 0
+-0.336045 0.371795 -0.111209 0 1 0
+-0.459207 0.0100786 0.320513 0 0 1
+-0.486645 -0.294872 0.00529103 0 1 0
+-0.168273 0.371795 0.125899 0 1 0
+-0.408916 -0.371795 -0.127325 0 1 0
+-0.5 -0.161739 -0.0948145 1 0 0
+0.192642 -0.00381726 -0.21273 0.99835 0.0570893 0.00615442
+-0.0925268 -0.294872 0.227247 0 1 0
+0.5 0.222551 -0.311196 1 0 0
+-0.254155 0.0366358 -0.273539 -0.544457 0.838771 0.00554673
+0.00285069 -0.0216196 -0.333333 0 0 1
+-0.437554 0.371795 -0.00266147 0 1 0
+0.100062 0.371795 0.30956 0.000177277 0.999655 0.0262721
+0.268401 -0.371795 0.122471 0 1 0
+-0.0407217 0.371795 0.176253 0 1 0
+-0.177329 0.176732 0.371795 0 0 1
+0.325415 -0.0996672 -0.371795 0.441149 0.206027 0.873464
+-0.37552 0.213717 -0.371795 0 0 1
+-0.296954 -0.0191524 0.371795 0 0 1
+0.361011 0.294872 0.169151 0 1 0
+0.448718 -0.361508 0.0273076 1 0 0
+-0.340403 -0.0197027 -0.371795 0 0 1
+-0.242849 -0.371795 0.171053 0 1 0
+0.44816 0.294872 0.09387 0 1 0
+0.259139 -0.0258155 -0.0117909 0.734859 -0.678212 0.00319054
+0.141026 0.342474 -0.266441 1 0 0
+-0.5 0.273226 -0.167453 1 0 0
+-0.377835 0.371795 -0.136152 0 1 0
+-0.130893 -0.224689 0.371795 0 0 1
+-0.114996 -0.182263 0.371795 0.0392319 0.0275656 0.99885
+-0.459844 -0.294872 -0.162875 0 1 0
+0.5 0.00545776 -0.160076 1 0 0
+-0.5 0.151357 0.186303 1 0 0
+-0.5 0.0327571 0.22397 1 0 0
+-0.0844371 -0.294872 0.0202695 0 1 0
+-0.448718 -0.368431 -0.0226452 0.889114 0.439229 0.128663
+0.270642 0.0240323 -0.333333 0.0195723 0.018822 0.999631
+0.22421 0.294872 -0.0444161 0 1 0
+0.38337 0.0618776 -0.371795 0 0 1
+0.5 -0.0558741 -0.0781309 1 0 0
+-0.433689 -0.360191 -0.371795 0.000889203 0.003409 0.999994
+-0.0676925 0.075585 -0.333333 0 0 1
+-0.431876 -0.371795 0.318579 0.0112611 -0.675738 0.737056
+-0.168157 -0.371795 -0.302525 0 1 0
+0.169386 0.294872 -0.143837 0 1 0
+0.161278 -0.235727 -0.371795 0.0252123 -0.489312 0.871744
+0.5 -0.0403868 0.128057 1 0 0
+0.127029 0.371795 -0.015678 0 1 0
+0.119463 -0.294872 0.0748538 0 1 0
+0.141109 -0.335236 0.0839849 1 0 0
+-0.0494457 0.310639 0.320513 0 0 1
+-0.177402 0.371795 -0.00309084 0 1 0
+-0.249454 -0.371795 0.0329185 0 1 0
+-0.117395 -0.110627 0.320513 0 0 1
+-0.389921 -0.371795 -0.0987823 0 1 0
+-0.0854087 -0.18921 -0.333333 0 0 1
+0.329859 0.00729281 0.371795 0 0 1
+-0.314314 -0.371795 0.319491 0.158658 -0.356004 0.920917
+-0.5 -0.125539 0.0925937 1 0 0
+-0.0496375 -0.07477 0.320513 0 0 1
+0.0371561 -0.201184 0.328181 -0.139073 0.984124 0.110268
+0.192415 -0.00122532 -0.100029 0.999438 0.0335187 0.000168789
+-0.320513 -0.0787761 -0.355262 1 0 0
+0.5 -0.00118362 0.22128 1 0 0
+-0.275605 -0.266174 -0.371795 0 0 1
+-0.5 -0.112561 -0.193351 1 0 0
+0.0674971 -0.0716031 -0.333333 0 0 1
+-0.421578 0.371795 -0.137855 0 1 0
+0.0457448 0.0614437 0.320513 0 0 1
+0.130101 -0.27114 -0.371795 0 0 1
+0.5 0.158645 0.102501 1 0 0
+-0.337492 0.371795 0.292136 0 1 0
+-0.346901 -0.371795 0.255255 0 1 0
+-0.171231 0.371795 -0.131006 0 1 0
+0.0590783 -0.22451 -0.333333 0.031046 -0.155083 0.987413
+-0.461475 0.371795 0.287866 0 1 0
+0.5 -0.108724 -0.13196 1 0 0
+0.346405 -0.371795 -0.185918 0 1 0
+0.128416 -0.0485079 0.320513 0 0 1
+-0.5 -0.0797736 -0.234927 1 0 0
+-0.0533328 -0.204257 0.371795 0.105511 0.19099 0.975905
+-0.151516 -0.137474 0.371795 0.608528 0.648288 0.45762
+-0.213384 0.302993 -0.371795 0 0 1
+-0.212452 0.371795 0.192669 0 1 0
+-0.266558 0.147708 -0.333333 0 0 1
+0.5 0.0289601 -0.220964 1 0 0
+0.148324 -0.0647104 0.320513 0 0 1
+-0.0742395 0.334949 0.320513 0 0 1
+-0.414671 0.371795 -0.215131 0 1 0
+0.28859 0.13022 -0.333333 0 0 1
+-0.0103683 0.21808 -0.333333 0.0209155 0.114356 0.99322
+-0.28788 -0.371795 0.284214 0 1 0
+-0.206444 0.0359781 -0.271088 0.526312 0.850132 0.0164872
+0.5 0.132258 -0.0386986 1 0 0
+0.408415 -0.32018 -0.371795 0 0 1
+0.5 0.259131 -0.0201212 1 0 0
+-0.182776 0.115084 0.371795 0 0 1
+0.5 0.154514 0.268594 1 0 0
+0.141109 -0.296631 0.186008 0.746894 0.663759 0.0396781
+-0.184299 0.229307 0.371795 0 0 1
+0.183257 -0.118367 0.371795 0 0 1
+0.00689569 0.371795 -0.282961 0 1 0
+0.453781 -0.294872 -0.359746 -0.247735 0.963377 -0.102623
+-0.43029 0.131694 -0.371795 0 0 1
+-0.448718 -0.347905 0.0465138 1 0 0
+0.125123 -0.294872 0.154154 0 1 0
+-0.133644 -0.294872 0.0916059 -0.10041 0.992974 -0.0626209
+-0.313246 0.371795 0.178888 0 1 0
+0.201503 0.294872 0.0910866 0 1 0
+0.5 0.247546 0.143505 1 0 0
+0.194306 0.0984848 0.371795 0 0 1
+0.109108 -0.282968 -0.371795 0 0 1
+-0.125081 0.371795 0.0925242 0 1 0
+-0.160278 0.371795 -0.152767 0 1 0
+0.5 -0.144246 -0.215172 1 0 0
+-0.394714 0.371795 -0.343836 0 1 0
+-0.203421 0.371795 0.187622 0 1 0
+-0.227383 0.0432935 -0.213949 0.10454 0.994509 -0.00479756
+-0.373294 -0.371795 -0.0541886 0 1 0
+0.5 -0.0825426 -0.107651 1 0 0
+0.189312 0.294872 0.129751 0 1 0
+-0.266008 0.371795 -0.117093 0 1 0
+0.343478 0.151328 -0.371795 0 0 1
+0.466168 -0.294872 -0.205881 0 1 0
+0.141109 -0.321265 -0.170304 1 0 0
+-0.457359 -0.263967 0.320513 0 0 1
+0.219785 0.294872 0.217547 0 1 0
+-0.123755 0.223917 -0.333333 0.00782457 0.0729877 0.997302
+-0.5 0.322212 -0.054898 1 0 0
+0.12956 0.371795 0.167429 0 1 0
+-0.5 -0.153226 0.112767 1 0 0
+0.126972 0.318889 0.320513 0 0 1
+0.440997 0.294872 -0.0920762 0 1 0
+-0.363784 -0.371795 -0.223674 0 1 0
+-0.5 -0.0955101 0.174534 1 0 0
+0.320859 0.294872 0.294263 0 1 0
+0.0837759 0.123754 -0.333333 0 0 1
+0.5 -0.269127 0.266021 1 0 0
+-0.249672 -0.0995737 0.371795 0 0 1
+0.261918 -0.0223149 -0.23042 0.817039 -0.57644 -0.0127936
+0.00785972 0.0661158 -0.333333 0 0 1
+0.267258 0.0869321 0.371795 0 0 1
+0.141184 -0.0407809 -0.333333 0 0 1
+-0.5 -0.0754103 0.000960383 1 0 0
+-0.5 0.285446 0.0738427 1 0 0
+-0.21736 -0.155444 -0.333333 0 0 1
+-0.0301042 -0.230897 -0.342673 0.0134279 0.99667 -0.0804233
+0.262953 0.294872 0.160611 0 1 0
+-0.5 -0.217292 0.0532099 1 0 0
+-0.322705 0.220701 -0.371795 0 0 1
+0.00921013 -0.122507 -0.333333 0 0 1
+0.309578 0.0285232 0.371795 0 0 1
+-0.224991 0.371795 -0.208794 0 1 0
+-0.262404 0.029776 -0.0975367 0.74663 -0.665201 0.00713018
+-0.5 -0.196045 -0.165979 1 0 0
+-0.197579 0.180934 -0.333333 0 0 1
+-0.405493 -0.371795 -0.0074554 0 1 0
+0.5 0.0490019 0.0753935 1 0 0
+0.28206 0.143043 0.371795 0 0 1
+-0.383854 0.0851257 -0.371795 0 0 1
+-0.5 -0.228809 -0.00610918 1 0 0
+-0.49745 -0.294872 -0.201434 0.63461 0.772698 -0.0144427
+-0.415619 0.220441 0.320513 0 0 1
+0.207384 0.0303998 -0.146531 -0.629516 0.776743 -0.0194775
+-0.448718 -0.325708 -0.0416965 1 0 0
+-0.0715488 -0.191711 0.321161 0.31487 0.789206 0.527267
+-0.396657 0.0116953 -0.371795 0 0 1
+-0.5 0.170666 0.295106 1 0 0
+0.158124 -0.371795 -0.0870985 0 1 0
+0.0335942 -0.153543 -0.333333 0 0 1
+-0.207184 -0.371795 -0.339107 0 1 0
+0.35467 0.091704 -0.371795 0 0 1
+-0.127714 -0.294872 0.146627 0 1 0
+0.299981 0.294872 0.0474832 0 1 0
+0.461081 -0.234844 -0.371795 0 0 1
+0.418988 0.294872 -0.230899 0 1 0
+-0.0402889 0.282148 0.320513 0 0 1
+0.266275 -0.0145191 -0.00654675 0.915774 -0.391471 0.0900471
+0.141026 0.315185 0.00202658 1 0 0
+0.351257 -0.371795 0.215468 0 1 0
+-0.230063 0.0271687 0.371795 0 0 1
+-0.485733 0.371795 -0.213214 0 1 0
+-0.432407 -0.371795 0.221809 0 1 0
+-0.250917 0.0385181 -0.207672 -0.475049 0.879753 -0.0190365
+0.5 -0.124209 0.0219818 1 0 0
+0.5 0.112864 0.184583 1 0 0
+0.489634 0.294872 0.157831 0 1 0
+-0.330895 -0.371795 -0.0382072 0 1 0
+0.438903 0.283738 -0.371795 0 0 1
+-0.0166928 0.0595261 0.320513 0 0 1
+0.0231893 -0.294872 -0.0194751 0 1 0
+-0.105721 -0.294872 0.00406232 0 1 0
+-0.00949609 0.371795 -0.172395 0 1 0
+0.5 -0.171222 0.245011 1 0 0
+-0.080141 -0.265422 0.320513 0.0278199 -0.0776228 0.996595
+-0.5 0.242055 -0.166724 1 0 0
+-0.216162 -0.371795 0.157771 0 1 0
+0.197347 -0.0189869 -0.0538812 0.872595 0.488289 0.0123606
+0.475351 0.272612 -0.371795 0 0 1
+-0.208488 0.211842 0.371795 0 0 1
+-0.262413 -0.228264 -0.356575 0.241935 0.970267 0.00709186
+0.362697 0.294872 -0.104189 0 1 0
+-0.5 0.0778538 -0.353144 1 0 0
+0.117263 -0.109178 -0.333333 0 0 1
+-0.5 -0.234695 0.201629 1 0 0
+-0.424744 0.34592 -0.371795 0 0 1
+0.5 -0.270575 -0.0148237 1 0 0
+-0.390422 -0.0379652 -0.371795 0 0 1
+-0.287139 0.284692 -0.371795 0 0 1
+0.47151 0.294872 -0.27742 0 1 0
+-0.5 0.0279658 0.0610052 1 0 0
+-0.38637 -0.371795 -0.05448 0 1 0
+0.424368 0.294872 0.205558 0 1 0
+-0.236506 0.337023 -0.371795 0 0 1
+-0.5 0.191681 -0.278346 1 0 0
+0.5 0.0288899 0.272835 1 0 0
+0.141109 -0.294888 -0.0366931 0.665062 0.740532 -0.0964595
+-0.359808 0.109246 0.354966 0.89625 -0.443537 0.00326416
+-0.217584 0.0414226 -0.237078 0.307501 0.951442 -0.0141666
+-0.424459 0.0773497 -0.371795 0 0 1
+0.5 0.246986 0.0325413 1 0 0
+0.416569 -0.371795 0.301427 0 1 0
+-0.5 0.285219 -0.0426139 1 0 0
+0.0198617 -0.294872 -0.0477455 0 1 0
+0.483695 -0.115664 -0.371795 0 0 1
+-0.141154 -0.317584 0.0258326 1 0 0
+0.311663 -0.371795 -0.201909 0 1 0
+0.467114 -0.253318 0.320513 0 0 1
+-0.5 -0.237428 -0.339665 1 0 0
+0.313201 0.176518 0.359 0.707107 0.707107 0
+-0.0267948 -0.294872 -0.354475 0 1 0
+-0.481702 -0.294872 0.168204 0 1 0
+0.192638 0.00376849 -0.0373292 0.993441 -0.110039 -0.0310773
+-0.5 0.308563 -0.356001 1 0 0
+-0.5 -0.135037 0.0347432 1 0 0
+-0.119118 0.0581628 -0.333333 0 0 1
+-0.5 0.169466 -0.354841 1 0 0
+-0.255866 0.0271066 0.371795 0 0 1
+-0.5 0.322667 0.220634 1 0 0
+-0.234555 0.0432585 -0.177388 -0.158905 0.986941 0.0263891
+-0.131996 -0.19666 0.371795 0 0 1
+-0.5 -0.168025 0.178647 1 0 0
+0.5 0.0458845 -0.0390819 1 0 0
+-0.26952 -0.371795 0.151716 0 1 0
+0.331422 0.161307 0.320513 0.461416 0.158517 0.872907
+-0.5 0.0699345 -0.0685397 1 0 0
+-0.289595 0.371795 -0.308306 0 1 0
+0.25954 0.294872 0.078859 0 1 0
+0.277941 -0.371795 -0.0326787 0 1 0
+-0.5 0.201782 -0.287979 1 0 0
+-0.195216 0.0249314 -0.256853 0.80781 0.588384 -0.0353225
+0.352466 -0.371795 0.312592 -0.0148452 0.99959 -0.0244918
+0.190784 0.294872 0.193922 0 1 0
+-0.139966 -0.222278 -0.333333 0.014573 -0.0275005 0.999516
+-0.19065 -0.0167144 -0.210822 0.927772 -0.37286 -0.0146576
+0.126173 -0.256282 0.333838 -0.0156774 0.999877 0.000798838
+0.141026 0.338351 -0.102184 1 0 0
+0.256851 0.0281045 -0.0721893 0.693813 0.720114 0.00766436
+-0.274522 -0.224103 -0.355906 0.394828 0.918743 0.00469718
+-0.5 0.180747 0.113143 1 0 0
+-0.0167258 -0.207033 -0.333333 0 0 1
+-0.123798 -0.0484138 -0.333333 0 0 1
+-0.258278 -0.0337486 -0.108587 0.61917 0.785238 0.00546107
+0.20273 0.294872 -0.276072 0 1 0
+-0.203189 0.170421 0.371795 0 0 1
+0.397798 -0.310899 -0.371795 0 0 1
+0.0767527 -0.294872 0.243293 0 1 0
+0.0393839 -0.293848 0.320513 0.26826 0.74638 -0.609059
+-0.202177 -0.11251 0.371795 0 0 1
+-0.478685 -0.294872 -0.31793 0 1 0
+-0.5 0.157283 -0.0565866 1 0 0
+0.216194 -0.371795 -0.0961243 0 1 0
+0.416159 0.00112264 -0.371795 0 0 1
+0.0389224 0.371795 -0.297127 0 1 0
+0.141109 -0.33347 -0.0234286 1 0 0
+0.334427 0.135507 0.371795 0.0694327 0.0679253 0.995271
+0.257945 -0.090078 -0.333333 0 0 1
+0.403447 0.294872 0.108553 0 1 0
+-0.00530172 -0.204555 0.347366 0 1 0
+0.242352 0.251986 0.320513 0 0 1
+0.0848228 0.107073 0.320513 0 0 1
+-0.24709 -0.371795 -0.151226 0 1 0
+0.35381 -0.371795 -0.367912 -0.0459108 0.936145 0.348604
+-0.154759 -0.371795 -0.0903612 0 1 0
+-0.413972 -0.371795 0.152561 0 1 0
+-0.14978 0.236389 0.371795 0 0 1
+-0.475574 -0.294872 -0.10564 0 1 0
+0.5 0.105534 -0.102832 1 0 0
+0.461384 0.294872 0.250964 0 1 0
+-0.5 0.131787 0.0465056 1 0 0
+-0.5 -0.285924 0.0793801 0.98649 0.151652 -0.0619537
+-0.5 0.210925 -0.145373 1 0 0
+-0.489585 0.371795 -0.0960501 -0.0344039 0.999273 0.0164268
+-0.307542 0.371795 -0.367233 -0.068799 0.900248 -0.429908
+0.259368 -0.371795 0.207076 0 1 0
+-0.123164 -0.277085 -0.371795 0 0 1
+-0.394282 0.343843 -0.371795 0 0 1
+0.282933 0.271245 -0.371795 0 0 1
+0.444987 0.294872 -0.329284 0 1 0
+0.0687736 -0.22709 0.371795 0 0 1
+-0.0769934 0.371795 -0.114593 0 1 0
+0.296627 -0.193092 0.367913 -0.581703 0.765586 -0.274771
+-0.182947 0.13262 0.371795 0 0 1
+0.0578602 0.371795 -0.0141176 0 1 0
+0.287971 -0.303108 -0.371795 0 0 1
+-0.5 0.0243205 -0.0469661 1 0 0
+0.19285 -0.00619897 -0.25771 0.991511 0.122533 0.0434965
+-0.331368 -0.371795 0.0297449 0 1 0
+0.5 0.0253387 -0.164282 1 0 0
+-0.171424 -0.371795 -0.369827 -0.0661789 0.77686 0.626186
+0.291778 -0.371795 -0.285505 0 1 0
+0.3209 -0.371795 -0.138771 0 1 0
+-0.181928 0.292563 -0.371795 0 0 1
+0.141109 -0.297053 -0.118531 0.953453 0.264086 0.145555
+0.20475 0.23326 -0.371795 -0.0157356 0.594191 0.80417
+-0.5 0.100293 0.138787 1 0 0
+-0.440422 0.179906 -0.371795 0 0 1
+0.5 0.290913 0.144665 0.865557 0.497461 -0.0578264
+0.5 -0.0322019 -0.134037 1 0 0
+-0.320513 -0.134546 -0.336011 0.902859 -0.0382434 -0.428233
+-0.5 0.0949936 -0.249502 1 0 0
+0.448718 -0.346764 0.143774 1 0 0
+-0.5 -0.144258 0.0462955 1 0 0
+0.141109 -0.345237 -0.115009 1 0 0
+0.5 0.0120971 0.131459 1 0 0
+-0.5 -0.148878 -0.0882009 1 0 0
+-0.154094 -0.178292 0.371795 0 0 1
+0.141026 0.308995 -0.248445 1 0 0
+-0.25177 -0.274498 -0.371795 0 0 1
+-0.395342 -0.26694 -0.371795 0 0 1
+-0.234495 0.371795 -0.00872458 0 1 0
+0.453009 -0.294872 0.300851 -0.353539 0.922575 -0.154487
+-0.5 0.0137503 -0.360564 1 0 0
+0.185494 0.17842 0.371795 0 0 1
+-0.159513 -0.0530153 0.320513 0 0 1
+-0.39934 0.371795 -0.348536 0 1 0
+-0.379673 0.046614 0.354849 0.977147 -0.212565 0
+-0.470471 -0.294872 0.247481 0 1 0
+-0.5 -0.0856986 -0.150581 1 0 0
+0.228043 -0.371795 -0.170926 0 1 0
+0.30147 -0.371795 -0.0128006 0 1 0
+-0.00215379 0.064847 -0.333333 0 0 1
+0.157915 -0.118658 0.320513 -0.107689 0.0555573 0.992631
+-0.369672 0.215402 -0.371795 0 0 1
+-0.448718 -0.335392 0.0269494 1 0 0
+-0.0295114 -0.256282 0.344097 0 1 0
+0.17691 -0.177155 0.371795 0 0 1
+0.216038 0.294872 -0.230459 0 1 0
+0.5 0.261714 -0.2167 1 0 0
+-0.0879484 -0.209879 -0.333333 0 0 1
+0.128935 0.012709 0.320513 0 0 1
+-0.22857 0.339648 -0.371795 0 0 1
+-0.224951 -0.0430808 -0.181549 -0.15677 0.987568 0.0115012
+-0.215117 -0.305145 -0.371795 0 0 1
+-0.230508 0.238433 0.320513 -0.198274 0.43332 0.879159
+0.291253 0.294872 0.275035 0 1 0
+-0.371732 -0.371795 -0.0977705 0 1 0
+0.124741 0.301671 0.320513 0 0 1
+0.406245 -0.371795 -0.131662 0 1 0
+-0.130542 0.371795 0.05999 0 1 0
+0.291259 -0.371795 0.211079 0 1 0
+-0.320513 -0.0706687 -0.360513 0.996593 -0.0210056 -0.0797612
+-0.365175 0.24374 0.320513 0 0 1
+-0.5 0.216224 -0.0604179 1 0 0
+-0.15988 0.371795 -0.121848 0 1 0
+-0.228588 -0.371795 0.0383051 0 1 0
+0.190136 0.24059 0.371795 0.127103 0.183282 0.974809
+0.5 0.117715 -0.359822 1 0 0
+-0.5 -0.247311 -0.0210394 1 0 0
+-0.061414 -0.294872 -0.262314 0 1 0
+0.5 -0.17838 -0.194585 1 0 0
+-0.355932 -0.371795 -0.1788 0 1 0
+-0.334194 -0.343506 0.320513 0 0 1
+-0.394914 0.371795 0.223134 0 1 0
+-0.448718 -0.362237 -0.297777 0.991689 0.124207 -0.0335405
+0.427023 -0.0585229 -0.371795 0 0 1
+0.0455584 0.371795 -0.242459 0 1 0
+-0.179863 0.371795 0.169453 0 1 0
+0.202746 0.294872 -0.299943 0 1 0
+-0.356887 -0.177833 0.320513 0 0 1
+-0.5 -0.252374 0.157612 1 0 0
+-0.448718 -0.352106 0.213475 1 0 0
+-0.209508 -0.371795 0.0828468 0 1 0
+-0.150401 -0.371795 0.0872329 -0.131426 0.991285 0.00897393
+-0.5 0.350229 -0.239882 1 0 0
+0.361809 -0.192439 -0.371795 0 0 1
+0.206789 0.294872 0.250645 0 1 0
+0.5 0.164112 0.195416 1 0 0
+0.209587 -0.371795 -0.209328 0 1 0
+0.341359 -0.153979 -0.371795 0 0 1
+-0.0730889 -0.0734789 0.320513 0 0 1
+0.222756 0.0375196 -0.0631583 -0.248156 0.968711 -0.00413937
+-0.434544 0.371795 0.0715202 0 1 0
+0.154454 0.251222 0.371795 0.157545 0.544426 0.823881
+0.0111412 0.230897 -0.36786 0.0197927 0.8957 0.444218
+0.14463 -0.0256207 0.320513 0 0 1
+0.210209 -0.0900537 -0.333333 0 0 1
+-0.5 -0.069199 -0.175337 1 0 0
+0.320064 0.159102 -0.333526 0.940094 0.103482 0.32483
+-0.0677713 -0.193008 0.352516 0.324719 0.94581 0
+-0.392111 0.36778 -0.371795 0.06153 -0.439472 0.896146
+0.0648868 0.371795 -0.313619 0 1 0
+-0.264882 0.265532 -0.371795 0 0 1
+0.470827 0.134419 -0.371795 0 0 1
+0.16596 -0.191978 0.371795 0 0 1
+-0.5 0.0448736 -0.253974 1 0 0
+0.5 -0.0725375 0.0733998 1 0 0
+-0.123756 -0.23832 -0.371795 0.058593 -0.212203 0.975467
+-0.12567 0.287196 0.320513 0 0 1
+0.311116 0.171152 0.371795 0.474859 0.590006 0.652995
+-0.105459 0.371795 -0.102605 0 1 0
+-0.199547 -0.045274 0.340259 0.970059 0.24287 0
+0.312021 -0.350006 0.320513 0 0 1
+-0.448718 -0.319181 0.242417 1 0 0
+0.0916566 0.0505936 0.320513 0 0 1
+-0.0410956 -0.033283 0.320513 0 0 1
+0.289265 -0.078709 0.371795 0 0 1
+-0.142346 -0.371795 0.156239 -0.490467 0.869168 0.0631561
+-0.182823 -0.0217714 0.320513 0 0 1
+0.5 -0.0431133 -0.16977 1 0 0
+-0.196667 -0.230897 -0.338149 -0.0908918 0.799529 -0.59371
+0.0398813 0.101465 -0.333333 0 0 1
+-0.188239 -0.00904956 -0.134494 0.986831 -0.161329 0.0117551
+0.418907 -0.0598059 -0.371795 0 0 1
+0.195937 0.000654061 0.00214639 0.712526 -0.00406346 -0.701633
+-0.5 0.0450853 0.154975 1 0 0
+0.5 -0.251824 -0.0544492 1 0 0
+0.20296 0.0263766 -0.111563 0.748 -0.662013 -0.0472659
+-0.246908 0.371795 0.300786 0 1 0
+0.293411 -0.118688 -0.333333 0 0 1
+0.349095 0.109261 -0.371795 0 0 1
+0.140284 0.139211 0.320513 -0.192843 -0.150568 0.969608
+-0.415326 0.164181 0.320513 0 0 1
+-0.141154 -0.312343 -0.0486542 1 0 0
+-0.00978169 -0.294872 -0.0436553 0 1 0
+-0.5 0.156048 -0.205025 1 0 0
+0.229336 -0.0146594 0.371795 0 0 1
+-0.194021 0.0828294 -0.333333 0 0 1
+0.215138 0.294872 -0.288545 0 1 0
+-0.34498 0.371795 0.125701 0 1 0
+0.307082 -0.289922 -0.371795 0 0 1
+-0.239505 -0.230897 -0.352075 0.0098621 0.999951 0.000875118
+-0.5 -0.195624 -0.0294189 1 0 0
+-0.5 0.175677 -0.137873 1 0 0
+-0.5 -0.219994 -0.22454 1 0 0
+0.5 -0.234451 0.185327 1 0 0
+0.169402 0.115236 0.371795 -0.543024 -0.309423 0.780629
+-0.5 -0.225105 0.0296491 1 0 0
+0.296292 -0.271468 0.320513 0 0 1
+0.160114 -0.0369321 -0.333333 0 0 1
+0.448718 -0.325189 -0.339076 1 0 0
+-0.5 -0.147215 -0.346685 1 0 0
+0.448718 -0.346793 0.0794797 1 0 0
+0.487993 -0.294872 -0.27624 0 1 0
+0.0108662 -0.0385214 -0.333333 0 0 1
+0.5 -0.0143332 -0.153045 1 0 0
+-0.141154 -0.339239 0.0440411 1 0 0
+-0.241201 -0.371795 -0.371322 0.0696512 0.729364 0.680571
+-0.247722 0.0173705 0.371795 0 0 1
+0.411596 -0.371795 -0.311681 0 1 0
+-0.267917 0.371795 0.0700652 0 1 0
+-0.497779 0.316776 0.320513 -0.576207 0.102706 0.810825
+-0.5 0.335401 0.224992 1 0 0
+0.273376 -0.0698956 -0.333333 0 0 1
+-0.0646527 -0.210673 -0.333333 0 0 1
+-0.240684 0.143108 0.371795 0 0 1
+0.0642923 -0.209348 0.371795 0 0 1
+0.141109 -0.328912 -0.246266 1 0 0
+-0.5 0.148272 0.170583 1 0 0
+-0.0190242 -0.231947 -0.371795 0.130586 0.747521 -0.651276
+-0.5 0.212208 0.319069 -0.602071 -0.00029769 0.798442
+0.0383705 -0.294872 0.0455154 0 1 0
+-0.5 0.348503 -0.0313935 1 0 0
+0.141109 -0.36462 -0.314946 0.930036 0.36515 0.0412175
+0.0290508 0.202536 0.338876 0.164593 0.986362 0
+-0.323 -0.371795 0.0714588 0 1 0
+-0.324244 -0.371795 0.294441 0 1 0
+0.409732 -0.371795 0.0607998 0 1 0
+0.133465 -0.294872 -0.274425 0.0650886 0.997875 0.00301287
+-0.379329 0.0191582 -0.371795 0 0 1
+-0.402101 0.371795 -0.0624147 0 1 0
+-0.5 0.220621 -0.327252 1 0 0
+0.310894 0.294872 0.0416016 0 1 0
+0.242498 0.294872 -0.219938 0 1 0
+-0.0924156 -0.262377 -0.371795 0 0 1
+-0.307886 0.0111226 0.371795 0 0 1
+-0.5 0.233419 -0.343646 1 0 0
+-0.445338 -0.29767 -0.371795 0.477397 0.131798 0.868747
+0.366368 0.272899 -0.371795 0 0 1
+-0.13109 0.185128 0.371795 0 0 1
+0.294468 -0.369011 0.320513 0.0225906 -0.366702 0.930064
+-0.114238 -0.294872 0.303239 0 1 0
+0.122424 0.280005 0.320513 0 0 1
+0.276814 0.199527 -0.333333 0 0 1
+-0.5 0.160189 -0.0881269 1 0 0
+-0.322094 -0.371795 -0.269429 0 1 0
+-0.0897361 0.0484387 0.320513 0 0 1
+0.322352 -0.158784 -0.371795 0.288734 0.00382307 0.957402
+0.141109 -0.364351 0.0658048 0.990813 0.131673 0.0308598
+-0.5 0.136545 0.1665 1 0 0
+-0.382964 0.0844415 0.320513 0 0 1
+-0.5 0.155754 0.180797 1 0 0
+0.10743 0.368488 0.320513 -0.0219613 0.226428 0.97378
+-0.5 0.248837 -0.275689 1 0 0
+-0.187449 -0.00307952 -0.141409 0.997948 -0.0617575 0.0168808
+0.12655 -0.294872 -0.0724803 0 1 0
+-0.370829 -0.236028 -0.371795 0 0 1
+-0.5 0.146272 -0.229018 1 0 0
+0.490052 0.00976302 0.320513 0.16967 0.0677907 0.983167
+0.448718 -0.301927 0.0264135 0.967336 -0.237471 -0.088705
+0.147718 -0.230897 -0.361664 0.0077558 0.996534 -0.0828261
+-0.5 0.297079 -0.189533 1 0 0
+0.5 0.272414 -0.153588 1 0 0
+-0.117732 -0.147505 -0.333333 0 0 1
+0.455293 -0.294872 0.117275 -0.0712288 0.997351 0.0147177
+0.5 0.129187 0.25131 1 0 0
+-0.231953 0.232933 -0.371795 0.12456 0.449045 0.884784
+-0.427347 0.164237 -0.371795 0 0 1
+-0.371677 0.371795 0.107166 0 1 0
+-0.5 0.134342 0.105494 1 0 0
+-0.0992209 0.310593 -0.371795 0 0 1
+0.261943 0.218229 0.356023 0.500522 0.865724 0
+0.5 -0.183524 -0.2491 1 0 0
+-0.5 0.173589 -0.302724 1 0 0
+-0.18642 0.308565 -0.371795 0 0 1
+0.316642 0.294872 0.310879 -0.0153146 0.990436 0.137122
+-0.246471 0.307979 0.320513 0 0 1
+-0.104033 -0.294872 -0.331294 0 1 0
+-0.354676 -0.118644 0.369974 0.700678 0.470518 -0.536342
+0.0785874 -0.294872 -0.114033 0 1 0
+-0.5 0.00950343 0.311319 0.987924 0.0312775 -0.15175
+0.24173 -0.0136082 0.0125944 0.314678 -0.37138 0.87353
+0.448718 -0.36163 0.155423 0.997688 -0.0625293 0.026606
+-0.189797 0.0765376 0.350877 0.915778 -0.401684 0
+-0.5 -0.189198 -0.0816846 1 0 0
+-0.5 0.228526 -0.256809 1 0 0
+0.497186 0.294872 0.290432 0.503744 0.860637 -0.0744701
+-0.5 0.019422 -0.224756 1 0 0
+-0.162828 -0.285929 -0.371795 0 0 1
+-0.284662 -0.218764 -0.361078 0.526727 0.848908 -0.0437331
+-0.187552 -0.004258 -0.159051 0.993139 -0.115115 0.0205983
+-0.494223 -0.294872 -0.0145268 0.368127 0.929133 -0.0345646
+-0.173841 -0.0203132 0.320513 0 0 1
+0.448718 -0.371021 -0.0788636 -0.40238 0.911861 -0.0812377
+0.5 0.0521803 0.120672 1 0 0
+-0.220343 -0.204913 0.371795 0 0 1
+0.199835 0.294872 -0.156142 0 1 0
+0.261096 -0.218692 0.328466 -0.486196 0.872664 -0.0455123
+-0.238268 -0.371795 0.136516 0 1 0
+-0.141154 -0.300453 0.236323 0.876507 -0.479711 0.0401636
+-0.206918 -0.0363104 -0.159997 -0.536414 0.843937 -0.00546828
+0.38014 0.248291 0.320513 0 0 1
+-0.412 -0.371795 0.13841 0 1 0
+-0.314649 0.182912 -0.354598 0.927284 -0.374067 -0.0147854
+0.457895 -0.294872 -0.154652 -0.0592837 0.998114 0.0159394
+0.5 0.231293 -0.280492 1 0 0
+-0.0117106 -0.294872 -0.236304 0 1 0
+-0.21598 -0.371795 0.0800853 0 1 0
+-0.11196 0.00224524 0.320513 0 0 1
+0.482736 0.294872 -0.109636 0 1 0
+-0.230156 -0.371795 -0.347569 0 1 0
+-0.287092 0.0620015 -0.333333 0 0 1
+0.416896 0.0177861 -0.371795 0 0 1
+-0.364733 0.178735 -0.371795 0 0 1
+-0.200814 -0.371795 -0.143671 0 1 0
+-0.326257 -0.371795 0.241342 0 1 0
+0.0978545 0.371795 0.109055 0 1 0
+-0.5 0.132875 0.254208 1 0 0
+0.318395 -0.340912 -0.371795 0 0 1
+0.347897 -0.273505 -0.371795 0 0 1
+0.448718 -0.325242 -0.0386807 1 0 0
+0.057317 -0.294872 -0.0792902 0 1 0
+-0.187514 0.00381933 -0.32187 0.996043 0.0888113 -0.00332694
+0.298036 0.294872 -0.198015 0 1 0
+0.5 -0.263882 -0.083191 1 0 0
+0.396835 -0.295837 0.320513 0 0 1
+0.0773607 -0.294872 -0.0819864 0 1 0
+-0.5 -0.165901 -0.292797 1 0 0
+0.267443 -0.0111704 -0.122215 0.954321 -0.298759 -0.00372478
+-0.131099 0.371795 0.280556 0 1 0
+0.140393 0.371795 0.152487 0.751327 0.659686 0.0179182
+-0.430468 0.149047 -0.371795 0 0 1
+-0.0984333 0.0409319 -0.333333 0 0 1
+0.5 -0.278916 -0.209257 1 0 0
+-0.368603 -0.232368 0.320513 0 0 1
+0.5 -0.114343 -0.144568 1 0 0
+0.268504 -0.371795 0.182181 0 1 0
+-0.143878 0.371795 -0.183351 0 1 0
+-0.4789 0.146822 -0.371795 0 0 1
+-0.216926 -0.0305433 0.371795 0 0 1
+-0.319394 0.166756 -0.36721 0.885305 -0.182848 -0.427554
+-0.0312705 0.371795 -0.352822 0 1 0
+-0.11272 -0.17148 0.332067 0.559457 0.828855 0.00271331
+0.5 -0.169202 -0.0203329 1 0 0
+-0.128883 0.371795 0.251224 0 1 0
+-0.258413 -0.371795 0.0281471 0 1 0
+0.196346 0.0168393 -0.260909 0.890375 -0.455186 -0.00619582
+0.185833 -0.305002 0.320513 0 0 1
+0.074797 -0.189027 -0.333333 0 0 1
+0.249414 0.0335821 -0.258545 0.546388 0.837521 -0.00443826
+0.290426 0.294872 -0.339673 0 1 0
+0.320513 -0.0805012 -0.361423 1 0 0
+-0.5 -0.238432 -0.185791 1 0 0
+-0.0919459 -0.0788485 0.320513 0 0 1
+-0.5 -0.162949 -0.00458016 1 0 0
+-0.141154 -0.361623 -0.191732 0.998532 -0.0540992 -0.00254354
+0.0725891 0.371795 0.318608 0.108846 0.949108 0.295545
+0.196772 0.248398 0.320513 -0.0825409 0.303851 0.949137
+0.322899 0.166481 0.325426 0.60641 0.693875 0.388335
+0.491913 0.294872 0.127072 0.129674 0.986278 0.102178
+0.26364 0.294872 -0.163468 0 1 0
+0.48018 0.0974865 -0.371795 0 0 1
+-0.5 -0.175003 0.0593364 1 0 0
+-0.194486 0.371795 0.238756 0 1 0
+-0.5 -0.0817856 0.0830082 1 0 0
+-0.141154 -0.337924 -0.194487 1 0 0
+0.5 -0.0362137 -0.281394 1 0 0
+-0.0191497 -0.294872 -0.343631 0 1 0
+-0.456619 0.298883 -0.371795 0 0 1
+-0.448718 -0.361771 -0.158356 1 0 0
+-0.5 -0.241831 0.0492553 1 0 0
+-0.5 0.344339 0.188257 1 0 0
+-0.447342 -0.0538804 0.320513 0 0 1
+-0.0809621 0.371795 -0.146648 0 1 0
+-0.0592315 -0.237159 -0.371795 0.0175254 -0.275401 0.96117
+0.5 0.235543 -0.242679 1 0 0
+0.0325555 -0.230897 -0.354624 0 1 0
+0.203991 0.217647 -0.333333 0 0 1
+0.345161 0.136069 0.371324 0.60851 0.392606 0.68962
+0.5 0.0236309 0.0431677 1 0 0
+-0.30028 -0.0542129 0.371795 0 0 1
+0.465693 0.246283 0.320513 0 0 1
+-0.5 -0.0301645 -0.311268 1 0 0
+-0.5 0.165812 0.288316 1 0 0
+0.365017 -0.371795 0.303431 0 1 0
+-0.191524 0.00163586 -0.0327316 0.67822 0.122583 0.724563
+-0.5 -0.208258 0.135512 1 0 0
+-0.5 0.0379888 0.0381501 1 0 0
+0.234894 0.294872 0.224398 0 1 0
+0.141109 -0.351696 0.101914 1 0 0
+-0.5 -0.185329 0.233346 1 0 0
+0.141026 0.355274 -0.323364 1 0 0
+0.141109 -0.300691 -0.229986 0.957635 0.22606 -0.178417
+0.136243 -0.258005 0.320513 -0.0683657 -0.630586 0.773102
+-0.364004 0.0598084 -0.371795 0 0 1
+0.0890779 -0.294872 0.193958 0 1 0
+-0.263303 0.371795 0.292635 0 1 0
+-0.499972 -0.294872 0.276359 0.684775 0.724324 0.0802412
+-0.0871152 -0.294872 0.304741 0 1 0
+0.205921 -0.371795 -0.179597 0 1 0
+-0.5 0.24294 -0.0627436 1 0 0
+-0.5 0.0625648 -0.355427 1 0 0
+-0.314413 -0.231303 0.320513 0 0 1
+-0.226522 -0.119365 0.371795 0 0 1
+-0.35525 -0.371795 0.246038 0 1 0
+0.257288 -0.371795 -0.217962 0 1 0
+0.0706119 -0.294872 -0.363683 -0.00400828 0.989494 0.144518
+0.419052 -0.0633408 0.320513 0 0 1
+0.137363 -0.294872 -0.0720479 0.362833 0.928768 -0.0757798
+0.5 0.200998 -0.180782 1 0 0
+-0.200036 -0.169911 0.371795 0 0 1
+-0.5 0.0131568 0.127469 1 0 0
+-0.1467 0.254959 0.342249 -0.0713485 0.997451 0
+-0.299129 0.0992754 -0.333333 0 0 1
+-0.434239 -0.0047054 -0.371795 0 0 1
+-0.166739 -0.0391428 0.320513 0 0 1
+0.45835 0.24162 -0.371795 0 0 1
+-0.371977 0.0719369 -0.371795 0 0 1
+0.5 -0.158926 -0.13143 1 0 0
+-0.5 -0.0617516 -0.285903 1 0 0
+-0.265012 -0.371795 0.192404 0 1 0
+-0.273472 -0.371795 -0.290468 0 1 0
+0.5 0.106803 -0.106488 1 0 0
+-0.5 -0.114434 -0.299059 1 0 0
+-0.0526444 0.324426 -0.371795 0 0 1
+-0.344539 0.371795 0.0132624 0 1 0
+-0.258327 -0.222485 -0.333333 -0.0611342 -0.148405 0.987035
+-0.304054 0.371795 0.235619 0 1 0
+0.141026 0.323118 0.292819 1 0 0
+-0.206205 -0.222309 0.371795 0 0 1
+0.396848 0.294872 0.160431 0 1 0
+0.437434 -0.371795 0.151229 0 1 0
+-0.5 -0.0367762 0.269316 1 0 0
+-0.376113 -0.371795 0.251003 0 1 0
+-0.0477545 -0.248432 -0.371795 0 0 1
+0.233314 0.294872 -0.274465 0 1 0
+0.5 0.250758 0.306812 1 0 0
+0.0209484 -0.265409 0.320513 0.00701891 -0.100638 0.994898
+0.265722 0.294872 -0.0110324 0 1 0
+0.307411 0.0654643 0.371795 0 0 1
+0.313358 -0.284975 0.320513 0 0 1
+-0.36615 0.115198 0.320513 -0.159707 0.0986053 0.982227
+0.448718 -0.340414 -0.191362 1 0 0
+-0.5 -0.287055 -0.330931 0.999834 0.0116241 -0.0140383
+0.472594 0.114124 0.320513 0 0 1
+-0.5 0.0761011 -0.137699 1 0 0
+0.5 0.0155709 -0.162572 1 0 0
+-0.38228 0.0308609 0.362723 0.997777 -0.0504707 -0.0435122
+0.489083 0.294872 -0.0184568 0 1 0
+-0.00744382 0.188356 -0.333333 0 0 1
+-0.0344239 0.371795 0.246561 0 1 0
+-0.247591 -0.371795 -0.208187 0 1 0
+0.141026 0.354089 -0.343411 1 0 0
+0.141026 0.303334 0.31133 0.98059 0.127881 0.148627
+0.141109 -0.338063 -0.159879 1 0 0
+0.111026 0.0925116 -0.333333 0 0 1
+-0.400884 -0.329431 0.320513 0 0 1
+0.383632 0.0119539 0.343153 0.99745 0.0713696 -8.61368e-006
+-0.423741 -0.371795 -0.362117 -0.0445073 0.987693 0.149941
+0.383479 0.143864 -0.371795 0 0 1
+-0.24745 0.226143 0.322578 -0.280624 0.847475 0.450595
+-0.5 0.165772 -0.299023 1 0 0
+-0.427797 0.371795 -0.016094 0 1 0
+-0.0925609 -0.291787 0.320513 -0.0251735 -0.690533 0.722863
+-0.444855 -0.371795 -0.159396 0.293424 0.953171 0.0732565
+0.194007 0.230897 -0.353718 0 1 0
+-0.207589 -0.333751 -0.371795 0 0 1
+-0.190398 -0.016173 -0.316705 0.924238 -0.38179 -0.00454989
+-0.5 -0.228376 -0.337633 1 0 0
+0.5 -0.0618161 0.00552699 1 0 0
+-0.273727 -0.00722156 -0.180588 0.981568 0.190552 -0.0146265
+-0.364498 -0.156405 -0.371795 0 0 1
+-0.457524 -0.294872 -0.090354 0.168963 0.980424 0.101094
+0.487225 0.119362 0.320513 0 0 1
+-0.133481 0.301149 0.320513 0 0 1
+-0.132245 -0.294872 0.268851 -0.0817076 0.992209 -0.0940445
+0.478311 -0.294872 0.0700905 0 1 0
+-0.5 0.288232 0.186683 1 0 0
+0.134215 -0.294872 -0.0249283 0.261966 0.960663 -0.0921926
+-0.308005 0.371795 0.116414 0 1 0
+0.5 0.217175 0.015509 1 0 0
+-0.48832 -0.00911582 0.320513 0 0 1
+0.313191 0.176528 0.333061 0.707107 0.707107 0
+0.0796075 -0.135783 -0.333333 0 0 1
+-0.418698 -0.0999174 0.320513 0 0 1
+0.5 0.293096 0.245994 0.509163 0.858428 -0.0620789
+-0.0607803 -0.294872 0.230851 0 1 0
+-0.271656 -0.346011 -0.371795 0 0 1
+-0.468383 -0.294872 -0.164663 0 1 0
+-0.186877 -0.0399449 0.320513 0 0 1
+0.386761 -0.0162985 -0.371795 0 0 1
+-0.5 -0.0453358 -0.166198 1 0 0
+-0.5 -0.151437 -0.0699774 1 0 0
+0.0754563 0.371795 -0.157911 0 1 0
+-0.331714 -0.139141 -0.371795 -0.0276491 -0.00525705 0.999604
+-0.5 0.252754 -0.151015 1 0 0
+-0.389279 -0.290628 -0.371795 0 0 1
+0.421778 0.209561 0.320513 0 0 1
+0.469131 -0.0511437 -0.371795 0 0 1
+-0.0229538 -0.230897 -0.338388 0.065201 0.960345 -0.271085
+-0.1793 0.371795 0.0192615 0 1 0
+-0.00872769 0.371795 0.229604 0 1 0
+-0.325455 -0.035993 -0.371795 -0.195603 0.0112951 0.980618
+0.137953 0.233365 -0.371795 0.131573 0.274442 0.95256
+-0.20041 0.181595 -0.333333 0 0 1
+-0.448718 -0.368568 -0.35642 0.902576 0.416588 0.108674
+-0.363785 0.371795 0.12692 0 1 0
+-0.5 0.318587 -0.361522 0.989668 0.0315684 0.139861
+0.361898 -0.104936 0.355352 0.915676 -0.401605 0.015867
+0.141109 -0.29778 -0.0977709 0.878282 0.478142 0
+-0.272899 -0.0105462 -0.169163 0.962822 0.269969 -0.00954483
+-0.472988 0.371795 -0.27964 0 1 0
+-0.5 0.237415 0.222435 1 0 0
+-0.5 -0.221418 0.18425 1 0 0
+0.0500421 -0.146868 0.320513 0 0 1
+-0.5 0.305454 -0.195367 1 0 0
+-0.328793 -0.0250417 0.371795 0 0 1
+-0.141154 -0.354661 -0.0262066 1 0 0
+0.281579 -0.309998 -0.371795 0 0 1
+-0.275782 0.371795 -0.301078 0 1 0
+-0.00178826 -0.294872 0.255112 0 1 0
+0.437909 -0.107024 0.320513 0 0 1
+0.5 0.035949 -0.204865 1 0 0
+-0.5 0.261673 0.114059 1 0 0
+-0.489133 -0.294872 0.0164113 0 1 0
+0.132446 0.371795 0.0964572 0.0725046 0.996706 -0.0363419
+-0.439563 -0.132655 0.320513 0 0 1
+0.225424 -0.371795 -0.336347 0 1 0
+0.243216 -0.371795 -0.145456 0 1 0
+0.0696725 0.170625 -0.333333 0 0 1
+0.5 0.16013 0.00720238 1 0 0
+-0.5 0.326964 -0.157108 1 0 0
+-0.165397 -0.298209 0.320513 0 0 1
+0.0931778 0.371795 -0.239771 0 1 0
+-0.282145 -0.371795 0.169495 0 1 0
+0.0826047 -0.294872 0.0400833 0 1 0
+0.383389 -0.015349 0.322937 0.923374 -0.00206684 0.383897
+-0.5 0.200976 -0.184297 1 0 0
+-0.5 -0.0851723 0.255146 1 0 0
+0.192618 -0.00354013 -0.0719128 0.995046 0.0960241 -0.0257561
+-0.210414 0.262752 0.320513 0 0 1
+-0.175083 0.32028 -0.371795 0 0 1
+0.43967 0.161464 -0.371795 0 0 1
+0.0641057 -0.118263 0.320513 0 0 1
+-0.423099 0.153296 0.320513 0 0 1
+0.5 0.246995 -0.130597 1 0 0
+-0.318003 0.371795 -0.343634 0 1 0
+0.105755 0.371795 0.193853 0 1 0
+-0.125661 0.256282 0.33278 -0.0276062 0.999619 0.000412987
+-0.144292 0.0650556 0.320513 0 0 1
+-0.215393 0.371795 0.250749 0 1 0
+0.5 -0.0973539 -0.0286626 1 0 0
+0.324941 -0.154813 0.371795 0.0452463 -0.0346171 0.998376
+0.394275 -0.371795 -0.324732 0 1 0
+0.383229 0.0175903 0.369342 0.774816 0.0467388 0.630457
+0.324524 0.294872 0.235062 0 1 0
+-0.268749 -0.24825 -0.371795 0 0 1
+0.5 0.121336 0.301241 1 0 0
+0.446535 -0.371795 -0.114742 -0.521101 0.853289 0.0187496
+-0.5 0.0475823 0.0803529 1 0 0
+0.217966 -0.147788 0.371795 0 0 1
+0.5 -0.0761706 0.123437 1 0 0
+0.0955818 -0.290992 -0.371795 0.116511 0.303846 0.94557
+-0.210478 0.246148 0.320513 -0.165954 0.441981 0.88154
+0.2721 -0.371795 -0.304488 0 1 0
+0.18877 -0.0788785 0.356718 0.915786 -0.401666 0
+-0.209937 -0.0381991 -0.170484 -0.473768 0.880623 -0.00689941
+0.5 -0.269787 -0.0362851 1 0 0
+-0.174631 0.371711 -0.371795 0.0573022 0.866063 -0.496639
+-0.5 -0.113667 -0.249287 1 0 0
+0.5 0.117831 -0.0457348 1 0 0
+0.182923 0.230897 -0.364761 0.124144 0.926128 0.356195
+-0.141154 -0.358389 -0.145036 1 0 0
+0.374788 -0.0690663 0.36035 0.970172 -0.240711 0.0287017
+0.0408772 0.245261 0.371795 0 0 1
+-0.186931 -0.25115 -0.371795 0 0 1
+-0.417697 0.371795 -0.00121421 0 1 0
+-0.191481 0.0184961 -0.286736 0.903027 0.42955 -0.00529903
+0.141026 0.3558 0.27346 1 0 0
+-0.380643 -0.020797 0.371795 -0.498595 0.0250821 0.866472
+0.0855026 -0.110931 -0.333333 0 0 1
+0.453142 -0.294872 -0.29234 0.758995 -0.642168 0.107454
+0.496639 -0.154147 -0.371795 -0.490483 -0.149832 0.858474
+-0.5 0.272457 -0.191406 1 0 0
+-0.5 0.299906 0.198148 1 0 0
+-0.141154 -0.328387 0.021257 1 0 0
+0.5 0.0691633 0.0843955 1 0 0
+0.311053 0.107556 -0.333333 0.0939164 -0.00429695 0.995571
+-0.5 -0.252783 -0.112003 1 0 0
+0.0979771 -0.294872 0.258862 0 1 0
+0.342062 0.157986 -0.371795 0 0 1
+0.196211 -0.246814 0.341626 -0.225599 0.97422 0
+-0.0214594 -0.290417 0.320513 -0.0224836 -0.258381 0.965781
+-0.47613 -0.0811169 -0.371795 0 0 1
+0.448718 -0.342304 -0.34033 1 0 0
+0.227678 -0.0499539 -0.333333 0 0 1
+0.459074 0.294872 0.167433 0 1 0
+0.141026 0.357078 -0.202965 1 0 0
+-0.101333 0.356465 0.320513 0 0 1
+0.233764 0.0381995 -0.119088 0.126256 0.991998 0
+-0.248603 -0.0395968 -0.11377 0.409942 0.91211 0.00173596
+0.243902 -0.371795 0.0581529 0 1 0
+-0.279355 -0.371795 -0.049504 0 1 0
+0.319319 0.225702 0.320513 0 0 1
+-0.5 0.0889785 0.150028 1 0 0
+0.471545 0.294872 0.307812 0 1 0
+-0.414492 0.371795 -0.159346 0 1 0
+0.16105 -0.019893 0.320513 0 0 1
+-0.5 -0.107636 -0.0169874 1 0 0
+0.5 -0.162021 -0.23664 1 0 0
+-0.5 0.280736 -0.255203 1 0 0
+0.394693 0.0303173 -0.371795 0 0 1
+-0.0857589 -0.230897 -0.349713 0 1 0
+-0.0741824 0.255529 0.371795 -0.184913 0.714513 0.674743
+0.143369 0.206279 0.371795 0 0 1
+-0.141154 -0.340844 -0.23739 1 0 0
+0.268312 0.00792704 -0.190727 0.977155 0.212497 0.00353544
+0.0990409 -0.294872 0.295998 0 1 0
+0.448718 -0.359548 -0.203868 1 0 0
+0.272968 -0.371795 -0.133825 0 1 0
+-0.214317 -0.371795 -0.341956 0 1 0
+-0.30795 0.115287 -0.333333 0 0 1
+0.5 -0.0880453 -0.269107 1 0 0
+0.307872 -0.192285 0.320513 0.0149996 -0.0106372 0.999831
+-0.275117 0.371795 -0.0227926 0 1 0
+0.455788 0.294872 0.26668 0 1 0
+0.5 0.215802 -0.240636 1 0 0
+-0.0888162 -0.184523 0.333958 0.466003 0.88477 0.00484459
+0.269446 0.198911 0.371795 0 0 1
+0.5 0.0341333 -0.17371 1 0 0
+-0.391155 0.371795 0.0640595 0 1 0
+0.014803 -0.256282 0.358577 0 1 0
+-0.448718 -0.321637 -0.0250044 1 0 0
+0.5 -0.213346 0.284338 1 0 0
+0.233416 0.294872 -0.237067 0 1 0
+-0.5 0.198999 -0.119048 1 0 0
+-0.5 -0.14673 -0.296242 1 0 0
+-0.272209 -0.01312 -0.296601 0.9666 0.256282 -0.00223784
+-0.5 0.240363 -0.171119 1 0 0
+-0.400976 0.0444062 0.320513 0 0 1
+0.141109 -0.300221 0.0759896 0.955559 0.294754 -0.00513808
+0.335074 0.294872 0.145853 0 1 0
+0.281905 0.294872 0.260861 0 1 0
+0.5 -0.222433 -0.235241 1 0 0
+-0.120561 -0.294872 0.185503 0 1 0
+-0.357565 -0.371795 -0.131546 0 1 0
+0.161837 -0.371795 0.127014 0 1 0
+0.5 -0.156781 -0.120687 1 0 0
+0.037209 -0.294872 -0.00745094 0 1 0
+0.329778 0.294872 0.23331 0 1 0
+0.138396 0.371795 0.15891 0.55219 0.830902 0.0684685
+-0.437066 0.371795 0.229965 0 1 0
+-0.492976 -0.221568 -0.371795 0.155759 -0.0125955 0.987715
+0.5 -0.0961214 0.0587899 1 0 0
+0.0990023 0.306491 -0.371795 0 0 1
+0.5 -0.0255883 0.0402716 1 0 0
+0.251426 0.185464 0.371795 0 0 1
+0.307327 0.294872 -0.149595 0 1 0
+-0.134959 -0.294872 -0.15239 -0.261283 0.95898 0.109951
+-0.424503 0.371795 -0.013779 0 1 0
+-0.33641 -0.126637 0.371795 0 0 1
+0.200992 -0.371795 0.21656 0 1 0
+0.26834 0.0203921 0.371795 0 0 1
+-0.151429 -0.30445 0.320513 0 0 1
+-0.200125 -0.192624 0.371795 0 0 1
+0.5 -0.281494 -0.17093 1 0 0
+0.5 0.235583 -0.301451 1 0 0
+-0.0598967 -0.277963 0.320513 0 0 1
+-0.448057 -0.371795 0.26901 0.432149 0.877728 0.206981
+0.5 -0.250241 -0.29231 1 0 0
+-0.28785 0.371795 0.0628835 0 1 0
+-0.270908 -0.167258 -0.333333 0 0 1
+-0.161175 -0.262718 -0.371795 0 0 1
+-0.40228 0.371795 0.305056 0 1 0
+0.124732 -0.0285209 -0.333333 0 0 1
+-0.151314 -0.371795 0.101544 -0.0896843 0.995635 -0.0258327
+0.295707 0.0750022 0.371795 0 0 1
+-0.141154 -0.362653 0.294072 0.992323 -0.12367 0.00133828
+-0.0583509 0.371795 -0.227933 0 1 0
+-0.449364 0.371795 0.315095 0.0766487 0.914775 0.396626
+0.448718 -0.310619 -0.286468 1 0 0
+0.188733 0.294872 0.0787019 0 1 0
+0.363065 -0.371795 0.170361 0 1 0
+0.134171 0.0913259 0.320513 0 0 1
+-0.468911 0.371795 0.250523 0 1 0
+0.282006 -0.371795 0.218881 0 1 0
+-0.5 0.123674 -0.00594726 1 0 0
+0.0562991 0.371795 0.0265437 0 1 0
+-0.109024 0.139289 -0.333333 0 0 1
+0.267792 -0.371795 0.166431 0 1 0
+0.268687 0.294872 0.312971 0.0452913 0.991385 0.122898
+0.187829 0.133538 0.371795 0 0 1
+0.221181 -0.371795 -0.166202 0 1 0
+-0.253764 -0.140646 -0.333333 0 0 1
+-0.259011 0.0331689 -0.206506 -0.64304 0.765827 0.002895
+-0.280785 -0.371795 -0.0470573 0 1 0
+0.431467 -0.0901703 -0.371795 0 0 1
+0.267677 0.294872 -0.125492 0 1 0
+-0.174649 0.371795 0.062557 0 1 0
+-0.0913623 -0.256282 0.326074 -0.0549636 0.982731 -0.176691
+-0.5 -0.00520917 0.18644 1 0 0
+-0.175284 0.371795 0.265381 0 1 0
+0.5 -0.0957625 0.00994793 1 0 0
+0.242113 0.0366272 -0.100973 0.284852 0.958253 0.0247053
+-0.129866 0.293531 0.320513 0 0 1
+-0.5 -0.196543 0.264065 1 0 0
+0.141026 0.304268 -0.0739086 1 0 0
+-0.5 0.245989 -0.0423426 1 0 0
+0.5 0.0784769 0.258103 1 0 0
+0.471681 -0.0580661 -0.371795 0 0 1
+-0.26573 0.371795 0.057954 0 1 0
+-0.27789 0.212865 -0.333333 -0.0573845 0.144628 0.987821
+0.131213 0.371795 -0.333152 0.0732157 0.997281 0.00841456
+-0.5 0.184251 0.254139 1 0 0
+0.290862 0.164777 0.371795 0 0 1
+-0.00988936 0.0723026 -0.333333 0 0 1
+0.439929 0.294872 -0.0177673 0 1 0
+0.406677 0.0588635 -0.371795 0 0 1
+0.448718 -0.344631 0.13788 1 0 0
+-0.274053 -0.161307 -0.333333 0 0 1
+-0.487065 -0.294872 0.0152596 0 1 0
+-0.5 0.207371 0.260315 1 0 0
+-0.493022 -0.106207 -0.371795 0.312188 0.0516629 0.948615
+-0.326975 -0.371795 -0.345433 0 1 0
+-0.447471 -0.27432 0.320513 0 0 1
+0.254203 -0.371795 -0.0802342 0 1 0
+0.333917 -0.327488 0.320513 0 0 1
+0.417799 -0.0906575 -0.371795 0 0 1
+-0.272356 0.371795 -0.18032 0 1 0
+-0.5 0.216807 -0.0211698 1 0 0
+-0.0405269 -0.294872 0.291556 0 1 0
+0.5 0.294464 0.152516 0.827642 0.556626 0.0719491
+-0.368245 -0.0879153 0.342107 0.936944 0.349478 0
+0.206042 -0.0468007 -0.333333 0 0 1
+0.0440982 0.371795 0.0270684 0 1 0
+0.301997 -0.361342 0.320513 0 0 1
+-0.5 0.253073 -0.269985 1 0 0
+0.404564 0.276726 -0.371795 0 0 1
+-0.050043 -0.294872 0.273902 0 1 0
+-0.273709 -0.00743558 -0.13839 0.982852 0.184188 0.0088122
+0.5 0.224744 0.042659 1 0 0
+-0.239606 0.371795 -0.350934 0 1 0
+0.405017 0.294872 0.0891945 0 1 0
+-0.460687 -0.221801 -0.371795 0 0 1
+-0.5 0.302955 0.0019179 1 0 0
+-0.5 -0.244057 0.135647 1 0 0
+-0.177666 0.371795 0.246242 0 1 0
+-0.5 0.276725 -0.140453 1 0 0
+-0.130571 0.371795 0.231365 0 1 0
+-0.436551 -0.371795 -0.222982 0 1 0
+-0.451071 0.218512 0.320513 0 0 1
+-0.261724 -0.371795 0.319597 -0.0391923 0.883824 -0.466176
+0.0145293 0.189387 0.320513 0 0 1
+-0.273131 -0.371795 -0.360762 0 1 0
+-0.406125 0.164239 0.320513 0 0 1
+-0.0616939 0.371795 -0.276499 0 1 0
+-0.479794 0.371795 -0.257619 0 1 0
+0.431911 0.294872 -0.201138 0 1 0
+-0.190543 -0.236434 0.371795 -8.17885e-005 -0.0405298 0.999178
+-0.141703 0.230897 -0.354616 0 1 0
+-0.303351 -0.0969754 0.371795 0 0 1
+-0.5 0.290002 -0.23153 1 0 0
+0.34607 0.0832472 -0.371795 0 0 1
+0.5 0.0730014 -0.236376 1 0 0
+-0.199186 0.246167 0.366902 -0.287419 0.860659 0.420305
+0.198344 -0.177987 0.371795 0 0 1
+-0.160944 -0.241402 0.371795 0 0 1
+0.5 -0.146348 -0.253319 1 0 0
+-0.191855 0.0192975 -0.114048 0.898059 0.439709 -0.0120423
+-0.278835 0.142264 0.371795 0 0 1
+-0.291278 -0.368859 0.320513 0.0718315 -0.341189 0.937246
+-0.5 -0.190033 0.273833 1 0 0
+0.5 -0.202263 -0.347988 1 0 0
+0.396881 0.137342 0.320513 0 0 1
+-0.0220798 -0.281633 -0.371795 0 0 1
+-0.362654 0.263003 -0.371795 0 0 1
+0.5 -0.152227 -0.278269 1 0 0
+0.5 0.227033 -0.253016 1 0 0
+-0.198093 -0.246405 0.32396 0.281814 0.819677 -0.498709
+0.344529 0.0490428 0.371795 0 0 1
+0.141026 0.353647 0.0874222 1 0 0
+0.36886 0.279409 -0.371795 0 0 1
+-0.5 -0.231042 0.307337 1 0 0
+0.30791 0.294872 -0.317464 0 1 0
+-0.131415 0.371795 0.180735 0 1 0
+0.5 0.126793 0.20893 1 0 0
+0.438198 -0.371795 -0.153781 0 1 0
+0.384415 -0.26778 0.320513 0 0 1
+0.266164 0.294872 0.0802404 0 1 0
+0.36897 0.0305632 0.371795 0 0 1
+0.25436 0.0302555 -0.156457 0.642173 0.766497 -0.00981453
+-0.141154 -0.300984 0.191809 0.995285 -0.0969852 -0.00110501
+-0.5 -0.234068 -0.367819 0.84163 0.00964165 0.539969
+-0.226792 0.369825 -0.371795 0.0363873 -0.439491 0.897509
+0.5 0.0200229 0.0642467 1 0 0
+0.39452 0.203574 -0.371795 0 0 1
+0.28047 0.215348 -0.333333 0.0861237 0.178899 0.980091
+-0.480816 -0.160621 0.320513 0 0 1
+-0.209224 0.371795 -0.102892 0 1 0
+0.5 0.195262 0.172097 1 0 0
+-0.5 0.305839 0.111225 1 0 0
+0.123273 0.163266 0.367188 0.553612 0.788042 -0.269264
+-0.339691 0.253132 -0.371795 0 0 1
+0.5 -0.222579 -0.249735 1 0 0
+-0.386959 -0.371795 0.157329 0 1 0
+-0.5 -0.07454 -0.262119 1 0 0
+0.141026 0.351687 0.0024747 1 0 0
+0.5 -0.103318 0.16462 1 0 0
+-0.5 0.0390687 -0.228974 1 0 0
+-0.5 0.101495 -0.0589765 1 0 0
+-0.270845 -0.206598 0.371795 -0.242236 -0.106822 0.964319
+-0.0901744 0.371795 0.190554 0 1 0
+0.5 -0.0774124 0.0454502 1 0 0
+0.448718 -0.326073 -0.355768 1 0 0
+-0.5 -0.232648 -0.301484 1 0 0
+-0.5 -0.173513 0.186901 1 0 0
+0.448718 -0.300292 0.297807 0.981428 -0.185929 0.0472258
+0.366951 0.294872 0.048081 0 1 0
+0.5 0.1524 -0.25137 1 0 0
+-0.376331 -0.364982 0.320513 -0.0667134 -0.282786 0.95686
+0.149186 0.289629 0.320513 0.104523 0.345909 0.932428
+-0.24595 0.371795 -0.292935 0 1 0
+0.017689 0.371795 -0.0547234 0 1 0
+0.5 -0.153712 -0.218164 1 0 0
+-0.5 0.364588 -0.0162105 0.97333 -0.223391 0.0521928
+0.409389 -0.299979 -0.371795 0 0 1
+0.0393644 -0.294872 -0.130586 0 1 0
+0.330773 0.058606 -0.371795 0.0248164 -0.010552 0.999636
+-0.278522 0.14109 0.371795 0 0 1
+-0.0680676 -0.171568 -0.333333 0 0 1
+-0.346457 0.0479537 -0.371795 0 0 1
+0.469318 0.294872 0.20127 0 1 0
+-0.407471 -0.371795 0.101681 0 1 0
+0.132069 0.371795 0.163921 0.0507259 0.998689 0.00688421
+-0.202051 -0.205264 -0.333333 0 0 1
+-0.469331 0.259243 -0.371795 0 0 1
+-0.399799 0.111208 0.320513 0 0 1
+-0.181684 0.371795 -0.0116215 0 1 0
+-0.470369 -0.294872 -0.0926483 0 1 0
+-0.5 -0.272159 0.0576235 1 0 0
+-0.405126 -0.338815 -0.371795 0 0 1
+-0.5 -0.203696 -0.248577 1 0 0
+-0.34537 -0.292829 0.320513 0 0 1
+0.294158 -0.371795 -0.34654 0 1 0
+0.5 -0.0967236 0.294999 1 0 0
+-0.336378 -0.204492 -0.371795 0 0 1
+0.141109 -0.338714 0.21833 1 0 0
+-0.0591958 0.123566 -0.333333 0 0 1
+-0.5 0.245211 0.285527 1 0 0
+-0.206487 -0.371795 -0.289347 0 1 0
+-0.5 0.0691677 -0.251512 1 0 0
+0.217421 -0.371795 -0.252145 0 1 0
+0.396022 -0.239946 0.320513 0 0 1
+0.205991 0.230897 -0.364065 -0.0115245 0.991994 0.125758
+-0.376615 0.0498533 -0.371795 0 0 1
+0.320513 -0.0251197 -0.353675 1 0 0
+-0.5 -0.118573 -0.35322 1 0 0
+-0.381259 0.220126 -0.371795 0 0 1
+0.181751 -0.0873807 0.320513 -0.184519 0.103504 0.977364
+-0.47729 0.354948 -0.371795 0 0 1
+0.195728 0.0155153 -0.10353 0.921295 -0.38886 0.00190771
+-0.288487 -0.371795 -0.345505 0 1 0
+0.5 0.194838 0.0581451 1 0 0
+-0.0313224 0.371795 0.294841 0 1 0
+0.386825 0.0661841 -0.371795 0 0 1
+-0.5 0.238916 0.040509 1 0 0
+0.111303 -0.294872 0.253888 0 1 0
+-0.5 0.106305 0.252076 1 0 0
+-0.294076 -0.299913 -0.371795 0 0 1
+-0.356531 0.371795 0.115529 0 1 0
+0.286763 -0.120064 -0.333333 0 0 1
+-0.235567 0.113084 0.371795 0 0 1
+0.0745579 0.371795 0.0356299 0 1 0
+-0.5 0.314923 -0.323097 1 0 0
+-0.495732 0.371795 0.0197361 -0.565032 0.820546 0.0862751
+0.0198799 -0.294872 0.126549 0 1 0
+0.380784 -0.371795 -0.184899 0 1 0
+0.321186 -0.348121 -0.371795 0 0 1
+-0.185311 -0.215935 0.371795 0 0 1
+-0.0595295 0.371795 -0.357543 0 1 0
+0.228283 -0.371795 -0.318546 0 1 0
+0.0231251 -0.294872 0.211238 0 1 0
+-0.0432705 -0.194691 0.320513 -0.123007 0.27721 0.952903
+-0.228275 0.0433716 -0.123078 0.0487063 0.998804 -0.00423633
+-0.5 -0.274976 0.0424169 1 0 0
+0.197094 0.0184435 -0.0186945 0.884437 -0.46666 0
+0.141109 -0.345152 0.254441 1 0 0
+-0.135644 0.0571364 0.320513 0 0 1
+-0.183928 0.371795 -0.0323058 0 1 0
+-0.231025 -0.344423 0.320513 0 0 1
+-0.198256 -0.371795 -0.148583 0 1 0
+0.420906 0.0555716 0.320513 0 0 1
+-0.43429 0.371795 -0.303467 0 1 0
+-0.485703 0.0145983 0.320513 0 0 1
+0.456507 0.294872 0.31354 0.221946 0.890169 0.397918
+-0.466135 0.362194 0.320513 -0.0046332 0.0303166 0.99953
+0.189581 0.0350337 0.320513 0 0 1
+0.413604 0.255963 -0.371795 0 0 1
+-0.387889 -0.371795 0.0706264 0 1 0
+0.0542717 -0.230897 -0.342963 -0.00175706 0.993253 -0.115957
+-0.222453 0.179061 -0.333333 0 0 1
+-0.0707867 0.371795 -0.102594 0 1 0
+-0.167998 -0.187059 -0.333333 0 0 1
+-0.296916 0.371795 0.140344 0 1 0
+-0.188531 0.0101405 -0.250369 0.960353 0.278496 -0.0127546
+-0.5 0.0893547 0.304267 1 0 0
+-0.141154 -0.343475 -0.131 1 0 0
+0.141109 -0.29566 -0.0679653 0.597772 0.800852 -0.0361312
+-0.5 0.166392 -0.10526 1 0 0
+0.160318 -0.371795 0.151576 0 1 0
+0.453768 0.294872 -0.196332 0 1 0
+-0.0492776 -0.256282 0.32831 0.00392062 0.992542 -0.121837
+0.107632 -0.042843 -0.333333 0 0 1
+-0.427824 -0.328105 0.320513 0 0 1
+-0.397056 0.371795 0.187514 0 1 0
+-0.213495 -0.220696 0.371795 0 0 1
+0.356617 -0.371795 0.138453 0 1 0
+0.454676 0.294872 -0.0103448 0 1 0
+0.154272 0.294872 0.11674 0 1 0
+-0.254105 -0.00756165 -0.0238411 -0.486895 -0.171712 0.856416
+-0.161589 -0.371795 -0.203272 0 1 0
+-0.5 0.250667 0.301989 1 0 0
+-0.208417 -0.371795 -0.1353 0 1 0
+0.0774921 -0.294872 0.284344 0 1 0
+-0.5 -0.196843 0.314038 0.985307 0.054345 -0.161915
+0.12528 -0.294872 -0.361918 -0.0105259 0.994797 0.101336
+-0.0270073 -0.0911214 -0.333333 0 0 1
+0.422242 0.294872 -0.00102602 0 1 0
+0.0461579 -0.0644347 0.320513 0 0 1
+0.5 -0.291412 0.15554 0.89524 -0.444568 0.0300707
+-0.313483 -0.365665 0.320513 0.167931 -0.243677 0.955207
+-0.5 -0.102299 0.273539 1 0 0
+-0.5 -0.289484 0.0229478 0.932482 0.36028 0.0259987
+-0.291136 0.244228 0.320513 0 0 1
+-0.5 -0.118589 -0.259769 1 0 0
+0.369714 0.294872 -0.06179 0 1 0
+0.179334 -0.140993 0.371795 0 0 1
+-0.441186 0.204472 0.320513 0 0 1
+0.142486 -0.0494707 -0.333333 0 0 1
+0.268321 0.00789313 -0.297954 0.977044 0.211657 -0.024226
+-0.375531 0.0656544 0.340903 0.973053 -0.230561 -0.00307103
+-0.5 -0.183222 0.0273903 1 0 0
+0.13444 -0.294872 0.313421 0.0491383 0.984855 -0.166272
+-0.182049 -0.230897 -0.355279 0 1 0
+-0.341767 0.371795 -0.280655 0 1 0
+0.0181646 0.243982 0.371795 0 0 1
+-0.5 -0.217804 0.278324 1 0 0
+0.0408567 0.371795 -0.0488525 0 1 0
+-0.227566 -0.0433095 -0.329236 -0.0643544 0.930701 -0.360075
+-0.448718 -0.353729 0.14691 1 0 0
+-0.5 -0.190607 0.312105 0.986126 0.0138985 -0.165418
+-0.5 -0.139473 0.111379 1 0 0
+0.5 0.192912 -0.00300636 1 0 0
+0.0513772 0.371795 -0.270621 0 1 0
+0.5 0.13626 -0.289647 1 0 0
+-0.5 -0.290865 -0.275871 0.998715 0.0506322 -0.00235347
+-0.172803 -0.371795 -0.329262 0 1 0
+-0.141154 -0.360578 -0.0589004 1 0 0
+-0.429578 0.258039 0.320513 0 0 1
+0.490636 0.294872 -0.176678 0.0488185 0.998732 0.0123131
+-0.255716 0.162719 0.371795 0 0 1
+0.308723 -0.371795 0.286735 0 1 0
+-0.288563 0.166718 0.371795 0 0 1
+-0.453045 -0.181081 -0.371795 0 0 1
+-0.222564 0.0427572 -0.0539006 0.221701 0.975096 0.00602612
+0.5 -0.0619855 0.154938 1 0 0
+-0.5 0.335733 -0.281103 1 0 0
+0.257872 0.027083 -0.0742805 0.731154 0.682185 -0.00613749
+0.00735961 -0.204555 0.335075 -0.0021483 0.999997 0.00109621
+5.93944e-005 0.256282 0.35875 0 1 0
+-0.358061 -0.336319 0.320513 0 0 1
+-0.045527 0.371795 0.297255 0 1 0
+-0.496391 0.371795 0.0477009 -0.624297 0.781184 0.00206043
+0.299381 0.294872 -0.342362 0 1 0
+-0.319199 0.325042 0.320513 0 0 1
+0.163309 0.124031 0.336966 0.811356 0.584544 -0.00320121
+0.0151737 -0.294872 -0.106602 0 1 0
+0.0678465 0.371795 -0.0875208 0 1 0
+-0.343257 -0.187705 0.320513 0 0 1
+-0.494322 0.258152 0.320513 -0.343745 0.0483854 0.937816
+0.0913828 0.304399 -0.371795 0 0 1
+0.194529 -0.116449 0.371795 0 0 1
+0.413194 0.294872 -0.115256 0 1 0
+0.0414346 0.371795 -0.203861 0 1 0
+-0.5 0.126368 -0.0941631 1 0 0
+-0.0884355 -0.294872 -0.327713 0 1 0
+0.148886 -0.0204964 0.320513 0 0 1
+-0.448718 -0.330576 0.00885231 1 0 0
+0.0396521 0.0395659 -0.333333 0 0 1
+0.5 0.0746186 0.0130212 1 0 0
+0.5 0.224335 0.198705 1 0 0
+-0.298558 0.371795 0.215332 0 1 0
+-0.216922 0.371795 -0.31247 0 1 0
+-0.143387 -0.371795 -0.147516 -0.417988 0.904281 0.086963
+0.5 -0.223994 -0.341376 1 0 0
+0.311081 0.219554 -0.371795 0 0 1
+-0.0804402 -0.294872 -0.126963 0 1 0
+-0.5 -0.0336323 0.124552 1 0 0
+-0.00225025 0.168637 0.320513 0 0 1
+-0.5 0.183023 0.244491 1 0 0
+-0.464333 0.371795 0.28175 0 1 0
+0.5 -0.143579 0.272629 1 0 0
+0.0218289 -0.129899 -0.333333 0 0 1
+-0.5 0.0274434 0.0996757 1 0 0
+0.056776 -0.294872 -0.185344 0 1 0
+0.5 -0.241918 0.212854 1 0 0
+-0.257416 0.371795 0.111582 0 1 0
+0.5 0.0205026 0.0111594 1 0 0
+-0.188997 -0.0118796 -0.187466 0.961319 -0.275204 -0.0113794
+-0.466962 0.356194 -0.371795 0 0 1
+0.188966 -0.371795 0.139921 0 1 0
+-0.5 -0.170197 -0.204905 1 0 0
+0.448718 -0.330765 -0.130267 1 0 0
+-0.156932 -0.371795 -0.371085 -0.0108005 0.749154 0.662308
+0.236589 0.0379524 -0.0793557 0.142956 0.989711 0.00591955
+0.0999647 0.371795 -0.198156 0 1 0
+-0.5 0.00337476 -0.324596 1 0 0
+0.495146 0.294872 0.21334 0.300503 0.952135 -0.0560072
+-0.237893 -0.371795 0.104249 0 1 0
+-0.452037 0.371795 -0.271024 0 1 0
+0.342163 -0.371795 0.260739 0 1 0
+0.5 0.0797771 -0.215517 1 0 0
+0.202399 -0.0258155 -0.131508 0.73836 0.674402 0.00263232
+-0.496379 0.371795 -0.261785 -0.330738 0.9436 0.0152277
+0.5 -0.233383 0.216737 1 0 0
+0.200204 -0.371795 0.0972021 0 1 0
+0.141643 -0.249838 -0.371795 0 0 1
+-0.459139 -0.294872 0.0215249 0 1 0
+-0.0441987 0.32138 0.320513 0 0 1
+0.5 -0.00309438 0.274768 1 0 0
+-0.232024 -0.371795 -0.0204486 0 1 0
+0.0922113 -0.0740111 -0.333333 0 0 1
+-0.0953515 -0.227935 -0.333333 -0.0409743 -0.572098 0.819161
+0.250203 -0.371795 -0.283941 0 1 0
+0.124506 -0.294872 -0.301888 0 1 0
+-0.5 0.0845302 -0.337375 1 0 0
+-0.5 0.0601696 0.305185 1 0 0
+0.0542748 0.371795 -0.0834227 0 1 0
+0.352415 0.294872 0.15735 0 1 0
+0.479673 0.294872 -0.261394 0 1 0
+0.217078 0.294872 -0.257408 0 1 0
+-0.000910198 0.230897 -0.349322 0 1 0
+-0.0670229 0.322878 -0.371795 0 0 1
+-0.0742779 0.316452 -0.371795 0 0 1
+0.5 -0.00878791 -0.107708 1 0 0
+-0.0211386 -0.0325522 -0.333333 0 0 1
+0.146932 -0.0154764 0.320513 0 0 1
+-0.0353505 0.0717473 -0.333333 0 0 1
+0.210783 0.107869 -0.333333 0 0 1
+0.20693 -0.339891 -0.371795 0 0 1
+-0.2278 0.28864 -0.371795 0 0 1
+-0.0252575 -0.294872 -0.120843 0 1 0
+-0.5 0.188718 0.146546 1 0 0
+0.334032 -0.0299674 0.371795 0 0 1
+-0.315533 0.371795 0.193221 0 1 0
+0.318909 0.222929 -0.371795 0 0 1
+0.460225 -0.0552642 -0.371795 0 0 1
+0.5 -0.0403249 -0.364737 0.93897 -0.0105075 -0.343838
+-0.366873 0.371795 -0.0527355 0 1 0
+-0.102999 0.217098 -0.333333 0 0 1
+-0.168256 -0.0212207 -0.333333 0 0 1
+0.444996 0.139543 0.320513 0 0 1
+-0.448718 -0.307341 -0.220778 1 0 0
+0.5 0.0893583 -0.328532 1 0 0
+0.5 0.265252 0.1232 1 0 0
+0.0282477 -0.146209 0.320513 0 0 1
+0.0824127 0.371795 0.197867 0 1 0
+-0.5 -0.0585212 -0.358087 1 0 0
+-0.332094 -0.371795 0.261552 0 1 0
+-0.5 0.125031 -0.21287 1 0 0
+-0.41022 -0.371795 -0.307038 0 1 0
+-0.5 0.183741 0.255469 1 0 0
+-0.5 0.340687 -0.0799408 1 0 0
+0.5 -0.117668 0.160557 1 0 0
+-0.0610461 0.371795 0.27499 0 1 0
+-0.147425 0.371795 -0.0621677 0 1 0
+-0.390258 0.344924 -0.371795 0 0 1
+-0.0882994 -0.294872 -0.251866 0 1 0
+-0.5 0.271345 -0.00466184 1 0 0
+-0.5 0.220287 0.303434 1 0 0
+-0.266528 -0.329945 0.320513 0 0 1
+0.115453 -0.294872 -0.185621 0 1 0
+-0.5 -0.2136 -0.280383 1 0 0
+0.190215 -0.075584 0.365709 0.909043 -0.352644 -0.221998
+0.224629 0.0158817 0.0128632 -0.199692 0.485726 0.850995
+-0.172945 0.0683881 -0.333333 0 0 1
+0.212272 -0.0744545 0.371795 0 0 1
+0.5 0.124384 0.275689 1 0 0
+0.199257 0.230897 -0.341045 -0.0338343 0.980915 0.191473
+-0.5 0.183945 -0.233439 1 0 0
+-0.440223 0.371795 0.124153 0 1 0
+0.131044 -0.224316 0.371795 0 0 1
+-0.5 -0.0874847 -0.0714016 1 0 0
+-0.041074 0.315291 0.320513 0 0 1
+-0.339606 0.220779 -0.371795 0 0 1
+-0.415676 0.371795 -0.0647538 0 1 0
+0.11608 0.214267 -0.333333 0 0 1
+-0.5 0.107929 -0.160669 1 0 0
+-0.272127 -0.371795 0.110108 0 1 0
+-0.5 -0.238474 -0.248528 1 0 0
+-0.156131 0.371795 0.149302 0 1 0
+-0.0257709 0.170939 -0.333333 0 0 1
+-0.424027 -0.371795 0.164719 0 1 0
+0.401021 -0.167467 -0.371795 0 0 1
+0.5 -0.0165401 0.0838414 1 0 0
+-0.244032 0.0961531 -0.333333 0 0 1
+-0.345173 0.312302 -0.371795 0 0 1
+-0.346024 0.371795 0.0151007 0 1 0
+0.394054 0.112217 -0.371795 0 0 1
+0.445243 -0.0696925 -0.371795 0 0 1
+-0.262755 -0.0294253 -0.243 0.760946 0.648584 -0.0173366
+-0.5 0.100522 0.317757 0.8442 0.0212008 -0.535609
+0.0350873 -0.256282 0.324606 0.159431 -0.702217 0.693882
+-0.396143 -0.371795 0.259088 0 1 0
+-0.325985 -0.371795 -0.0794273 0 1 0
+-0.199544 -0.371795 0.224886 0 1 0
+-0.203617 0.371795 -0.187306 0 1 0
+-0.279337 -0.371795 -0.285048 0 1 0
+0.311946 -0.371795 -0.0247781 0 1 0
+-0.0190047 0.230897 -0.339927 -0.0332287 0.998576 0.0417349
+0.5 -0.18455 0.132891 1 0 0
+-0.416239 -0.0311037 -0.371795 0 0 1
+-0.310095 0.345269 -0.371795 0 0 1
+-0.0935498 -0.294872 -0.0391885 0 1 0
+-0.0151208 0.371795 -0.0663595 0 1 0
+0.130078 -0.236687 0.371795 0 0 1
+-0.481549 0.371795 0.0520401 0 1 0
+0.478672 0.136732 -0.371795 0 0 1
+-0.5 0.16721 -0.217485 1 0 0
+0.315615 -0.371795 -0.0507737 0 1 0
+0.141026 0.360436 -0.183578 1 0 0
+-0.0301017 0.371795 0.206815 0 1 0
+0.28848 -0.21609 -0.357133 -0.58436 0.811489 -0.00299626
+0.482045 -0.233618 0.320513 0 0 1
+0.409945 0.294872 -0.341354 0 1 0
+0.448718 -0.339173 -0.139017 1 0 0
+-0.122214 0.0764604 0.320513 0 0 1
+0.270404 -0.353198 0.320513 0 0 1
+-0.121428 0.371795 -0.322635 0 1 0
+-0.311475 -0.334213 -0.371795 0 0 1
+0.214552 -0.0444494 -0.333333 -0.0055929 -0.0510287 0.998682
+0.380749 0.294872 -0.214217 0 1 0
+-0.5 -0.0762288 -0.275676 1 0 0
+-0.358553 0.308831 -0.371795 0 0 1
+-0.5 0.0293681 0.308738 1 0 0
+-0.448718 -0.33353 0.223683 1 0 0
+0.5 -0.236006 -0.130285 1 0 0
+0.0705213 -0.294872 -0.300169 0 1 0
+-0.5 0.134361 -0.104565 1 0 0
+0.0422516 -0.26548 -0.371795 0 0 1
+0.5 0.0354576 -0.239038 1 0 0
+-0.307702 0.228453 0.320513 0 0 1
+-0.48393 -0.291174 -0.371795 -0.000793838 0.485656 0.87415
+-0.195765 -0.1089 -0.333333 0 0 1
+-0.388583 0.371795 0.0143381 0 1 0
+-0.474752 -0.294872 0.195015 0 1 0
+0.373391 0.0741212 0.34676 0.948131 0.317793 -0.00744259
+-0.160525 -0.341814 -0.371795 0 0 1
+-0.289714 0.1411 -0.333333 0 0 1
+0.336931 -0.371795 -0.0447642 0 1 0
+-0.198865 -0.176307 0.371795 0 0 1
+0.166664 0.294872 0.137766 0 1 0
+-0.199449 0.0456609 0.350134 0.969397 -0.2455 0
+-0.5 0.345303 -0.225826 1 0 0
+0.5 -0.159807 0.00963651 1 0 0
+-0.489001 -0.294872 0.281843 0 1 0
+0.132153 -0.138906 -0.333333 0 0 1
+0.287849 0.294872 -0.102815 0 1 0
+-0.5 -0.231453 -0.035478 1 0 0
+-0.221563 -0.042489 -0.23982 -0.238865 0.971041 -0.00484926
+0.183825 -0.371795 -0.106652 0 1 0
+-0.448718 -0.352098 0.199428 1 0 0
+0.440254 -0.371795 -0.0744592 -0.16245 0.986153 0.0333584
+0.0793763 0.106714 0.320513 0 0 1
+0.195332 -0.0146668 -0.0913092 0.91643 0.400003 0.0124186
+-0.5 0.256257 -0.291377 1 0 0
+-0.161701 0.289328 0.320513 0 0 1
+0.160561 0.294872 -0.36748 -0.0292962 0.909471 -0.414734
+0.5 -0.0397152 0.101317 1 0 0
+0.141109 -0.352239 0.142831 1 0 0
+-0.382189 0.371795 -0.100301 0 1 0
+0.35937 0.102804 -0.371795 0 0 1
+0.338115 -0.371795 -0.0100697 0 1 0
+0.000313159 -0.294872 -0.188917 0 1 0
+0.0905356 0.371795 0.0660222 0 1 0
+-0.390462 0.371795 0.0245558 0 1 0
+-0.0881965 0.371795 -0.296901 0 1 0
+-0.313435 0.146427 0.371795 0 0 1
+0.0036779 -0.294872 -0.287804 0 1 0
+0.193491 0.00891326 -0.113554 0.966927 -0.254142 -0.0215674
+-0.5 0.0151973 0.0116134 1 0 0
+-0.0559095 0.233316 -0.371795 -0.0573363 0.647819 0.759634
+-0.0525542 0.371795 0.296237 0 1 0
+0.5 -0.141707 -0.207498 1 0 0
+0.222285 -0.033089 0.371795 0 0 1
+-0.0375884 -0.230897 -0.35255 0 1 0
+-0.473379 -0.261956 0.320513 0 0 1
+0.461697 -0.294872 -0.00639186 0 1 0
+0.143962 -0.371795 -0.225381 0.534 0.842119 0.0753704
+-0.448718 -0.352619 -0.0508267 1 0 0
+-0.253301 0.248759 -0.371795 0 0 1
+-0.5 -0.226049 0.0202013 1 0 0
+0.5 0.137444 0.195634 1 0 0
+-0.191673 -0.0189076 -0.077681 0.902651 -0.43033 -0.00611192
+0.310261 -0.371795 0.0937192 0 1 0
+0.5 -0.0274272 -0.206561 1 0 0
+-0.194494 -0.324154 -0.371795 0 0 1
+0.5 -0.1915 -0.35706 1 0 0
+0.394161 0.123627 0.320513 0 0 1
+-0.191733 0.371795 -0.124973 0 1 0
+-0.18005 -0.371795 -0.102978 0 1 0
+0.5 0.0920452 -0.00268689 1 0 0
+0.228129 -0.371795 0.0774995 0 1 0
+0.462557 0.155157 0.320513 0 0 1
+0.5 -0.274669 -0.0648046 1 0 0
+-0.5 0.0396892 -0.124733 1 0 0
+0.305833 0.224177 0.320513 0 0 1
+-0.202792 -0.0297346 0.359764 0.992838 0.118684 0.01364
+-0.348842 -0.305451 0.320513 0 0 1
+-0.200101 0.0307419 -0.136701 0.714038 0.69996 0.0143539
+0.400212 -0.02029 0.320513 0 0 1
+0.331243 0.155335 0.347593 0.800535 0.599285 0
+-0.214089 0.040135 -0.304537 0.373707 0.927529 0.00584359
+-0.5 0.195864 -0.0163303 1 0 0
+0.372319 -0.066398 -0.371795 0 0 1
+0.418617 0.294872 -0.349491 0 1 0
+0.5 0.078941 -0.244863 1 0 0
+-0.283127 0.371795 -0.192329 0 1 0
+-0.5 -0.0412251 -0.309551 1 0 0
+-0.270175 0.0182435 -0.213091 0.906215 -0.422506 0.0162207
+0.258998 -0.371795 -0.151203 0 1 0
+-0.499631 0.371795 -0.026647 -0.648732 0.760481 -0.0285799
+0.5 0.106463 -0.276544 1 0 0
+0.5 0.282329 -0.287665 1 0 0
+-0.231505 0.0326917 0.371795 0 0 1
+0.199145 0.186509 0.371795 0 0 1
+-0.266508 0.201939 -0.333333 0 0 1
+0.0195235 0.371795 -0.369583 0.0354742 0.957878 -0.284975
+-0.498358 0.108441 -0.371795 0.387649 -0.0445182 0.920731
+0.5 -0.251442 -0.176201 1 0 0
+0.28591 -0.26421 -0.371795 0 0 1
+-0.170025 0.325085 -0.371795 0 0 1
+0.5 0.197167 -0.319289 1 0 0
+-0.328937 -0.371795 0.149777 0 1 0
+0.437352 -0.038376 -0.371795 0 0 1
+0.0915474 0.371795 0.246444 0 1 0
+0.299409 -0.371795 -0.141874 0 1 0
+-0.357842 -0.371795 -0.325164 0 1 0
+-0.265135 0.371795 -0.134485 0 1 0
+-0.249472 -0.0508713 -0.333333 0 0 1
+0.148755 -0.337119 0.320513 -0.0828636 0.0341227 0.995977
+-0.0785701 0.371795 0.185462 0 1 0
+0.5 0.180919 0.0175658 1 0 0
+0.0909452 0.065938 -0.333333 0 0 1
+-0.290097 0.0918413 0.371795 0 0 1
+0.182039 0.294872 -0.0369834 0 1 0
+-0.452627 -0.28775 -0.371795 0.0457881 0.166016 0.98506
+0.440005 -0.371795 -0.109248 -0.136304 0.990663 0.00285175
+0.0779036 0.0130336 -0.333333 0 0 1
+0.141109 -0.295765 0.0575511 0.575661 0.805772 -0.139091
+-0.257695 0.229529 -0.339695 -0.160008 0.951623 0.262319
+-0.200865 0.371795 -0.370645 -0.0716862 0.901119 -0.427604
+-0.422005 0.210838 -0.371795 0 0 1
+0.342159 -0.251444 0.320513 0 0 1
+-0.210099 0.0854123 -0.333333 0 0 1
+-0.141154 -0.331893 -0.179687 1 0 0
+-0.197398 0.0280386 -0.0389786 0.690671 0.564351 0.452196
+-0.5 -0.275696 -0.348693 1 0 0
+-0.0340284 0.371795 -0.00102918 0 1 0
+0.479453 -0.294872 0.252453 0 1 0
+0.49238 0.294872 -0.299632 0.146795 0.988758 0.0284399
+-0.141825 0.371795 -0.0535902 0 1 0
+0.482105 0.207142 0.320513 0 0 1
+-0.437441 -0.371795 -0.0452073 0.0281689 0.999584 0.00625591
+-0.0952913 0.230897 -0.355028 0 1 0
+-0.269869 -0.341433 -0.371795 0 0 1
+-0.495785 -0.268943 -0.371795 0.305067 -0.0481818 0.951111
+-0.0629024 0.371795 -0.0961001 0 1 0
+-0.300759 0.294054 -0.371795 0 0 1
+-0.447039 0.0855904 -0.371795 0 0 1
+-0.5 0.178604 -0.0236977 1 0 0
+-0.229921 0.177973 -0.333333 0 0 1
+0.45912 0.270156 0.320513 0 0 1
+-0.448718 -0.36507 0.0723391 0.976777 0.209382 0.045455
+0.437691 -0.154543 -0.371795 0 0 1
+0.190737 0.294872 0.244872 0 1 0
+0.470402 -0.294872 0.0036761 0 1 0
+0.5 -0.0440419 0.266753 1 0 0
+-0.5 -0.2582 0.036051 1 0 0
+-0.117637 0.329754 0.320513 0 0 1
+-0.5 0.268365 -0.351697 1 0 0
+-0.00441732 -0.141298 0.320513 0 0 1
+0.373237 -0.259571 0.320513 0 0 1
+0.02595 0.187137 -0.333333 0 0 1
+0.448718 -0.320098 -0.122502 1 0 0
+0.5 0.270267 -0.149855 1 0 0
+-0.362696 -0.332039 0.320513 0 0 1
+0.171885 -0.227828 -0.333333 -0.102912 0.722592 -0.683572
+0.100779 0.0250024 -0.333333 0 0 1
+0.198217 -0.371795 -0.113214 0 1 0
+0.363616 -0.342949 0.320513 0 0 1
+-0.162243 -0.371795 -0.0150409 0 1 0
+-0.082853 0.371795 0.15243 0 1 0
+-0.19114 0.230897 -0.341616 -0.0630801 0.98792 0.141544
+-0.326164 -0.371795 -0.00115592 0 1 0
+-0.0593901 -0.294872 -0.100815 0 1 0
+0.5 -0.0694426 -0.36836 0.953205 0.0543529 -0.2974
+0.00692454 0.338078 -0.371795 0 0 1
+0.5 -0.0768324 0.200597 1 0 0
+-0.267984 0.371795 -0.0844315 0 1 0
+-0.5 -0.102709 -0.0523427 1 0 0
+0.289998 -0.198204 0.331599 -0.630168 0.77495 -0.0483842
+-0.5 0.123147 0.194301 1 0 0
+0.113814 0.193066 0.371795 0 0 1
+-0.415016 0.0790432 0.320513 0 0 1
+0.141026 0.300444 -0.0122925 0.825628 0.562047 -0.0494161
+0.331277 0.271322 -0.371795 0 0 1
+-0.141154 -0.308012 0.230336 1 0 0
+-0.0301819 -0.294872 -0.181671 0 1 0
+-0.439563 0.371795 -0.0236693 0 1 0
+-0.5 0.140306 -0.312549 1 0 0
+-0.0580619 -0.294872 0.204687 0 1 0
+0.119831 -0.0512747 0.320513 0 0 1
+-0.5 -0.249632 0.051219 1 0 0
+-0.009176 0.230897 -0.345048 0 1 0
+-0.394203 -0.371795 0.270747 0 1 0
+0.5 0.117837 0.203096 1 0 0
+0.241622 0.00114618 0.0165287 0.460222 0.101959 0.88193
+0.206951 0.0246636 0.371795 -0.429351 -0.0904026 0.898602
+-0.268817 -0.0211554 -0.113134 0.859982 0.51031 -0.00371915
+0.15862 0.280578 0.320513 0 0 1
+-0.106327 0.371795 -0.161566 0 1 0
+0.213125 0.294872 -0.155332 0 1 0
+0.215384 0.158346 0.371795 0 0 1
+-0.0932682 -0.294872 0.255851 0 1 0
+0.445146 -0.0298999 0.320513 0 0 1
+-0.0745049 -0.294872 -0.301187 0 1 0
+0.406986 0.271868 0.320513 0 0 1
+-0.0413807 -0.179711 0.320513 0 0 1
+-0.5 -0.0471684 0.262519 1 0 0
+-0.5 0.132399 -0.189166 1 0 0
+-0.471402 -0.294872 -0.193951 0 1 0
+-0.291173 -0.25096 0.320513 0 0 1
+0.00808579 -0.260915 0.320513 -0.0148987 -0.461629 0.886948
+0.141026 0.339031 0.165836 1 0 0
+0.5 -0.158505 -0.0982985 1 0 0
+-0.5 0.16319 0.0207174 1 0 0
+-0.461289 -0.294872 -0.0597741 0 1 0
+0.5 0.260564 -0.208829 1 0 0
+0.441062 -0.371795 -0.276349 -0.195586 0.979071 -0.0562724
+0.5 0.0112274 -0.201758 1 0 0
+-0.0949171 -0.211771 -0.333333 0 0 1
+-0.5 0.0171431 0.0105493 1 0 0
+-0.5 0.182873 0.293983 1 0 0
+0.5 0.264773 -0.0273579 1 0 0
+-0.0533091 -0.0765525 -0.333333 0 0 1
+0.262133 0.171 -0.333333 0 0 1
+-0.413334 0.371795 -0.00559894 0 1 0
+-0.320749 -0.190165 0.320513 0 0 1
+0.28812 0.0828233 0.371795 0 0 1
+-0.142447 -0.0933908 -0.333333 0 0 1
+0.5 -0.164067 0.214954 1 0 0
+0.442841 0.0430602 -0.371795 0 0 1
+0.00482214 0.207482 0.371795 -0.0781041 -0.408369 0.909469
+-0.258262 0.371795 0.0762908 0 1 0
+0.178669 -0.371795 -0.215651 0 1 0
+0.5 -0.156047 0.318311 0.965652 -0.0438881 0.256106
+-0.241156 -0.103981 0.371795 0 0 1
+0.0330436 0.190706 0.320513 0 0 1
+-0.0462013 -0.215847 -0.333333 0 0 1
+-0.482434 0.371795 0.0547928 0 1 0
+0.41163 -0.371795 -0.189972 0 1 0
+-0.5 -0.0161327 -0.178589 1 0 0
+-0.18943 -0.371795 0.0417401 0 1 0
+0.384569 -0.0317433 -0.371795 0 0 1
+0.41446 -0.371795 0.052271 0 1 0
+0.258894 -0.02988 0.371795 0 0 1
+0.5 -0.017656 0.16682 1 0 0
+0.346797 -0.103522 -0.371795 0 0 1
+-0.448316 -0.371795 -0.132776 0.754619 0.651775 0.0757577
+0.103498 0.371795 0.164994 0 1 0
+-0.0183524 0.371795 -0.346313 0 1 0
+-0.5 0.0312117 0.0754577 1 0 0
+-0.171663 -0.106903 0.320513 0.742735 0.192012 0.641464
+-0.443329 0.371795 -0.131411 0 1 0
+0.0203122 0.371795 0.25587 0 1 0
+0.0750746 0.371795 0.280897 0 1 0
+0.183839 0.265483 0.320513 0 0 1
+0.256461 0.235012 -0.371795 -0.148839 0.191566 0.970129
+0.5 -0.200879 -0.247302 1 0 0
+-0.193668 -0.157872 0.371795 0 0 1
+-0.5 -0.078359 0.184842 1 0 0
+0.405958 0.123203 -0.371795 0 0 1
+-0.103146 -0.294872 -0.316504 0 1 0
+-0.134698 -0.0300383 0.320513 0 0 1
+0.383979 -0.371795 0.036753 0 1 0
+-0.448718 -0.303882 -0.138503 0.96408 0.265289 -0.0130649
+0.5 0.149313 -0.293877 1 0 0
+-0.343508 -0.138952 0.364529 0.870611 0.401524 -0.284281
+-0.469969 0.0138786 -0.371795 0 0 1
+0.5 -0.224909 0.292078 1 0 0
+0.272595 -0.371795 -0.142535 0 1 0
+-0.5 -0.111718 0.187883 1 0 0
+-0.5 -0.0253167 -0.36543 0.97133 0.0315419 0.235633
+-0.322989 0.371795 -0.158683 0 1 0
+-0.364395 -0.371795 -0.3327 0 1 0
+0.5 -0.14834 -0.32107 1 0 0
+-0.5 0.0797302 0.138447 1 0 0
+0.489273 0.187357 0.320513 0 0 1
+-0.473639 0.371795 0.00928766 0 1 0
+0.283757 -0.0887057 0.371795 0 0 1
+-0.148669 -0.124361 -0.333333 0 0 1
+-0.0102024 0.318157 -0.371795 0 0 1
+-0.5 -0.0744971 -0.232745 1 0 0
+0.207492 0.294872 0.12378 0 1 0
+0.5 -0.0325605 0.237744 1 0 0
+0.0892295 0.371795 0.307713 0 1 0
+-0.263529 -0.117995 0.371795 0 0 1
+0.5 -0.125829 -0.0366222 1 0 0
+0.5 -0.0744196 -0.253252 1 0 0
+0.5 -0.00821624 -0.299718 1 0 0
+-0.365781 -0.305233 -0.371795 0 0 1
+-0.110143 0.371795 0.199064 0 1 0
+-0.33687 -0.371795 0.294588 0 1 0
+-0.5 0.261133 -0.286473 1 0 0
+-0.393703 0.349551 0.320513 0 0 1
+-0.115555 -0.230897 -0.370228 0.0286678 0.882457 -0.469518
+0.102262 -0.294872 -0.330722 0 1 0
+0.105443 0.322198 -0.371795 0 0 1
+-0.280889 0.371795 0.209435 0 1 0
+-0.48277 -0.275149 0.320513 0 0 1
+-0.273548 0.00812478 -0.254458 0.96619 -0.25774 -0.00682049
+-0.240923 0.0285931 -0.0273086 -0.172841 0.485925 0.85674
+0.188347 0.294872 -0.28379 0 1 0
+-0.109779 0.302539 -0.371795 0 0 1
+0.479457 0.14765 0.320513 0 0 1
+0.346247 -0.134082 0.348615 0.867565 -0.497313 -0.00335037
+0.209633 0.294872 -0.000135981 0 1 0
+0.3074 0.286586 -0.371795 -0.0986211 -0.25793 0.961117
+0.121089 -0.282789 -0.371795 0 0 1
+0.0496131 -0.294872 0.23833 0 1 0
+0.295246 -0.371795 0.0172517 0 1 0
+0.22955 0.294872 0.293284 0 1 0
+-0.181464 0.289329 0.320513 0 0 1
+-0.195723 0.371795 0.075124 0 1 0
+-0.401442 0.212151 -0.371795 0 0 1
+-0.5 -0.0589649 -0.0121954 1 0 0
+-0.161367 0.334587 -0.371795 0 0 1
+0.332843 -0.019746 -0.371795 0 0 1
+-0.368991 0.342685 -0.371795 0 0 1
+0.459589 0.294872 -0.22138 0 1 0
+0.163206 0.294872 -0.195036 0 1 0
+-0.18407 -0.17495 -0.333333 0 0 1
+-0.473758 0.371795 -0.282147 0 1 0
+-0.115324 0.371795 0.0217024 0 1 0
+-0.226947 -0.244663 0.320513 -0.0952117 -0.126537 0.987382
+-0.288346 -0.371795 -0.186526 0 1 0
+-0.180105 0.371795 -0.181906 0 1 0
+0.298058 -0.133078 0.371795 0 0 1
+-0.0966225 -0.294872 -0.0434549 0 1 0
+-0.5 0.324122 -0.104896 1 0 0
+0.179595 0.18585 0.371795 0 0 1
+-0.5 -0.241726 0.236577 1 0 0
+-0.416364 -0.371795 0.159499 0 1 0
+0.236473 0.294872 -0.0193036 0 1 0
+0.104661 -0.256282 0.341073 0 1 0
+-0.135551 -0.294872 0.0500573 -0.409735 0.91115 -0.0438592
+0.47125 0.196001 -0.371795 0 0 1
+-0.282506 0.250022 -0.371795 0 0 1
+0.420247 0.294872 -0.198176 0 1 0
+0.252908 -0.371795 0.265917 0 1 0
+-0.473067 -0.174723 0.320513 0 0 1
+0.0679136 0.371795 -0.344271 0 1 0
+-0.225012 -0.30755 -0.371795 0 0 1
+0.141109 -0.298698 -0.33842 0.931988 0.354766 0.074432
+0.415278 0.163826 0.320513 0 0 1
+-0.466389 -0.0688289 -0.371795 0 0 1
+0.0639642 -0.294872 0.314774 0.05482 0.992603 -0.108326
+-0.0100586 -0.242988 0.371795 0 0 1
+0.279162 0.0833951 0.371795 0 0 1
+0.332405 -0.04328 0.371795 0 0 1
+-0.243778 0.18182 0.371795 0 0 1
+-0.0966963 0.0846818 0.320513 0 0 1
+0.177318 -0.277703 0.320513 0 0 1
+0.491788 -0.210651 -0.371795 -0.0887624 0.0293705 0.99562
+0.0337092 -0.257444 0.320513 0.0899697 -0.580047 0.809599
+-0.5 -0.142774 -0.141939 1 0 0
+-0.184766 0.0399329 0.320513 0 0 1
+0.5 -0.234984 0.0287665 1 0 0
+-0.042395 0.371795 0.203596 0 1 0
+-0.5 -0.101683 0.0709734 1 0 0
+0.490714 0.194606 -0.371795 -0.165675 -0.0304525 0.98571
+-0.454669 -0.294872 0.107967 0.307138 0.944252 0.11855
+-0.0580244 0.371795 -0.167248 0 1 0
+0.211974 -0.230897 -0.352892 0 1 0
+0.141109 -0.308527 -0.067283 1 0 0
+-0.199987 -0.371795 0.126214 0 1 0
+0.23907 -0.371795 -0.321178 0 1 0
+0.258596 -0.371795 -0.361465 -0.0165526 0.999193 0.0365957
+-0.5 -0.0484351 0.279109 1 0 0
+-0.143216 -0.206544 0.371795 0 0 1
+-0.323205 0.166073 0.361501 0.765368 -0.643583 0.00339749
+0.190534 -0.354347 0.320513 0 0 1
+-0.18604 -0.371795 0.317622 -0.104529 0.798224 -0.593221
+-0.320214 -0.371795 -0.285668 0 1 0
+-0.5 0.255908 0.0498796 1 0 0
+-0.267487 -0.28683 -0.371795 0 0 1
+-0.430965 0.371795 0.0155219 0 1 0
+-0.5 0.328005 0.187467 1 0 0
+-0.5 0.153518 0.316709 0.809012 0.0514326 -0.585537
+-0.355591 0.371795 -0.315528 0 1 0
+-0.5 -0.280962 -0.262654 1 0 0
+0.206323 -0.144687 0.371795 0 0 1
+0.320814 0.155297 -0.371795 0.668253 -0.14969 0.728719
+-0.00759996 -0.294872 -0.121547 0 1 0
+-0.141154 -0.331986 0.085588 1 0 0
+-0.0343898 0.308548 -0.371795 0 0 1
+-0.372758 0.371795 -0.0624258 0 1 0
+0.264098 -0.0191882 -0.170707 0.865813 -0.500083 -0.0168765
+-0.0579946 -0.294872 0.294413 0 1 0
+-0.5 -0.129845 0.0806291 1 0 0
+-0.5 -0.216825 -0.036108 1 0 0
+-0.0946934 -0.294872 0.218198 0 1 0
+0.127738 0.257035 0.320513 0.0402402 0.545288 0.837282
+0.141109 -0.323747 -0.0671604 1 0 0
+-0.296548 -0.371795 -0.225142 0 1 0
+0.255765 -0.229229 -0.333333 -0.0860765 0.851305 -0.517563
+-0.158825 -0.296483 -0.371795 0 0 1
+-0.454012 -0.294872 0.161197 0.365229 0.929723 0.0471373
+0.330132 -0.341984 -0.371795 0 0 1
+-0.181383 0.371795 0.0368362 0 1 0
+-0.0226769 0.0857724 0.320513 0 0 1
+0.310421 0.0618945 0.371795 0 0 1
+0.125522 0.29405 0.320513 0 0 1
+0.356964 0.294872 -0.100924 0 1 0
+-0.0045707 -0.139137 -0.333333 0 0 1
+-0.102624 0.371795 -0.201241 0 1 0
+0.5 0.0843331 -0.367355 0.687572 0.193022 -0.699991
+0.00171195 -0.230897 -0.369773 0.0694141 0.7413 -0.667575
+0.0979467 0.230897 -0.345973 0 1 0
+0.5 0.0234833 -0.361479 1 0 0
+-0.0939331 0.181754 0.349507 -0.475936 0.87948 0
+0.27676 -0.33523 0.320513 0 0 1
+-0.5 -0.115651 -0.228312 1 0 0
+0.174067 0.107564 0.336653 0.837173 0.546939 0
+-0.353105 -0.285587 -0.371795 0 0 1
+0.5 0.115133 0.143177 1 0 0
+-0.405345 -0.371795 0.280121 0 1 0
+0.5 0.0716067 -0.293365 1 0 0
+-0.5 0.296952 -0.158238 1 0 0
+0.0133881 -0.0258964 -0.333333 0 0 1
+-0.324126 -0.237876 0.320513 0 0 1
+-0.176633 0.279584 -0.371795 0 0 1
+0.5 0.0393839 0.212407 1 0 0
+-0.413248 0.371795 -0.261773 0 1 0
+-0.407405 0.356777 -0.371795 0 0 1
+0.0513494 0.371795 0.299871 0 1 0
+-0.364608 -0.168007 -0.371795 0 0 1
+0.324972 -0.294455 -0.371795 0 0 1
+-0.0407741 -0.294872 0.16269 0 1 0
+0.5 0.194849 -0.214953 1 0 0
+-0.195519 -0.0907348 0.371795 0.0044187 -0.000947931 0.99999
+-0.448718 -0.369604 0.305284 0.758994 0.63824 0.128756
+0.480043 -0.294872 0.0723256 0 1 0
+-0.204359 0.034518 -0.150141 0.619271 0.785095 0.0113769
+0.0678434 -0.294872 0.10229 0 1 0
+0.246483 0.0171517 0.371795 0 0 1
+0.358794 0.294872 -0.0540383 0 1 0
+-0.166008 -0.193582 0.371795 0 0 1
+-0.333042 -0.371795 0.288857 0 1 0
+0.5 0.224687 0.125278 1 0 0
+0.267492 0.294872 -0.0276889 0 1 0
+-0.208627 0.371795 -0.184564 0 1 0
+-0.0700982 -0.000985354 0.320513 0 0 1
+0.448718 -0.339826 -0.321895 1 0 0
+-0.0444535 0.186511 0.320513 0.00237204 -0.0174375 0.999845
+0.5 0.027496 0.118991 1 0 0
+-0.5 -0.248857 -0.272498 1 0 0
+-0.480404 0.371795 0.283021 0 1 0
+-0.0434463 -0.294872 0.251769 0 1 0
+0.448718 -0.319874 0.138802 1 0 0
+-0.5 0.25204 0.136411 1 0 0
+0.0625087 0.371795 0.1473 0 1 0
+0.249642 0.294872 0.142766 0 1 0
+0.336422 0.241284 0.320513 0 0 1
+-0.5 -0.0447567 -0.172213 1 0 0
+-0.5 -0.179096 -0.139754 1 0 0
+-0.286711 0.371795 0.18269 0 1 0
+-0.163053 0.371795 0.290132 0 1 0
+-0.195041 -0.0630695 0.328106 0.972445 0.139892 0.186494
+-0.325127 0.258528 -0.371795 0 0 1
+0.5 -0.248649 -0.0805451 1 0 0
+-0.264648 -0.371795 -0.365817 -0.0163472 0.972353 0.232943
+-0.443019 0.328096 0.320513 0 0 1
+-0.5 -0.204267 -0.169818 1 0 0
+-0.5 -0.0920662 -0.102139 1 0 0
+-0.204738 -0.00446777 -0.0249412 0.511181 -0.086853 0.855073
+-0.5 0.192433 -0.166762 1 0 0
+-0.188551 -0.0137098 0.320513 0 0 1
+0.132323 0.0750194 -0.333333 0 0 1
+0.354502 -0.104889 0.371795 0.137111 -0.068428 0.988189
+-0.5 0.354006 -0.122064 1 0 0
+-0.0819327 0.181337 0.320513 0.143177 -0.193798 0.970537
+-0.5 -0.00938742 -0.312553 1 0 0
+0.5 -0.142939 -0.258984 1 0 0
+-0.408717 0.200188 0.320513 0 0 1
+0.283744 -0.0647729 0.371795 0 0 1
+0.233573 -0.14 -0.333333 0 0 1
+-0.30827 0.231479 -0.371795 0 0 1
+0.5 -0.0896756 0.290404 1 0 0
+0.344426 -0.202943 0.320513 0 0 1
+-0.141154 -0.31281 -0.136841 1 0 0
+-0.180365 0.278225 -0.371795 0 0 1
+0.232151 0.209362 0.371795 0 0 1
+-0.279984 -0.335146 0.320513 0 0 1
+-0.294091 -0.371795 -0.0841042 0 1 0
+0.5 0.0579796 0.22704 1 0 0
+-0.00935936 0.256282 0.325933 -0.15751 0.705076 0.691418
+0.152014 -0.335668 -0.371795 0.0656781 -0.0249501 0.997529
+0.463564 -0.107751 -0.371795 0 0 1
+-0.368899 0.108178 0.320513 -0.217321 0.189514 0.957526
+-0.281589 -0.371795 0.0335626 0 1 0
+-0.298667 -0.371795 -0.171181 0 1 0
+-0.48546 -0.0907138 0.320513 0 0 1
+-0.407419 -0.371795 -0.129788 0 1 0
+-0.5 0.247724 0.0106135 1 0 0
+0.411802 -0.371795 0.0236843 0 1 0
+-0.0871458 -0.256282 0.349715 0 1 0
+-0.5 0.057111 -0.239142 1 0 0
+0.462326 -0.294872 -0.194274 0 1 0
+0.266959 0.0129759 -0.165801 0.939657 0.342117 0
+-0.168706 0.20058 -0.333333 0 0 1
+-0.133286 -0.155472 0.36234 0.618236 0.785992 0
+0.261476 0.0229462 -0.328269 0.812135 0.472707 0.342031
+-0.212641 0.371795 0.312659 -0.00480764 0.984891 0.173112
+0.355776 0.116631 0.331951 0.877668 0.479269 0
+0.372687 0.294872 -0.147507 0 1 0
+0.5 -0.157844 0.0827413 1 0 0
+0.0645145 0.371795 0.0835975 0 1 0
+-0.473422 0.371795 0.162605 0 1 0
+-0.5 -0.129366 -0.0268597 1 0 0
+0.141026 0.320733 0.112334 1 0 0
+-0.439479 0.371795 0.0962974 0 1 0
+0.11038 0.0471302 0.320513 0 0 1
+0.0636706 0.367783 -0.371795 0.0278819 -0.406776 0.913102
+-0.207215 -0.0365182 -0.239573 -0.511489 0.859288 -0.00158217
+-0.0579411 0.371795 0.216656 0 1 0
+-0.5 0.0501371 -0.335289 1 0 0
+0.141026 0.361248 -0.162026 1 0 0
+-0.263976 -0.252914 -0.371795 0 0 1
+-0.00465929 0.371795 -0.244421 0 1 0
+-0.243722 -0.152237 0.371795 0 0 1
+-0.314444 -0.0346914 -0.333333 -0.187587 -0.0725251 0.979567
+-0.5 0.0447012 0.171479 1 0 0
+-0.482989 0.059579 0.320513 0 0 1
+-0.5 0.138043 -0.259119 1 0 0
+-0.381699 -0.0373006 0.371545 0.904185 0.140041 -0.403531
+-0.152623 -0.371795 0.00500445 -0.0809982 0.996418 -0.0242778
+-0.312532 -0.0556504 -0.333333 -0.130886 -0.0477496 0.990247
+0.0838512 -0.0910215 -0.333333 0 0 1
+-0.5 0.317459 0.178588 1 0 0
+0.0799444 0.00051893 0.320513 0 0 1
+0.0744179 -0.231717 0.371795 0 0 1
+0.481238 0.266245 -0.371795 0 0 1
+-0.217004 -0.371795 0.00907512 0 1 0
+-0.5 0.035663 0.224968 1 0 0
+-0.0451609 -0.294872 -0.109256 0 1 0
+-0.5 -0.263495 -0.286304 1 0 0
+-0.398215 0.371795 0.177902 0 1 0
+0.5 0.276168 -0.140202 1 0 0
+-0.491551 -0.294872 0.297301 0.132335 0.990381 -0.0404036
+0.340337 0.129898 0.371795 0.052718 0.0703592 0.996128
+0.5 0.0657056 -0.31717 1 0 0
+-0.321221 0.325762 -0.371795 0 0 1
+0.310733 -0.313323 0.320513 0 0 1
+-0.144259 0.183636 -0.333333 0 0 1
+-0.0789283 -0.230897 -0.363792 0.000547693 0.997498 -0.0706872
+-0.33239 0.267497 0.320513 0 0 1
+0.231766 -0.0383742 -0.196698 -0.0360612 0.999071 -0.0236088
+0.217674 0.294872 -0.244091 0 1 0
+0.0517775 0.368891 0.320513 0.00303229 0.415935 0.909389
+0.3389 0.294872 -0.359782 0 1 0
+-0.0579839 -0.294872 -0.0228538 0 1 0
+0.210485 0.294872 0.214837 0 1 0
+-0.287572 -0.237367 0.320513 0 0 1
+-0.0945891 -0.294872 0.176419 0 1 0
+-0.239214 -0.258626 -0.371795 0 0 1
+0.5 -0.0368154 0.146877 1 0 0
+-0.401346 0.186775 -0.371795 0 0 1
+-0.5 0.216079 0.167001 1 0 0
+0.5 0.284456 -0.0586626 1 0 0
+-0.314861 0.371795 0.258319 0 1 0
+-0.470145 -0.277465 -0.371795 0 0 1
+-0.5 -0.235158 -0.25804 1 0 0
+0.0534167 -0.0216626 -0.333333 0 0 1
+0.5 -0.163052 0.159693 1 0 0
+-0.225578 -0.371795 0.265746 0 1 0
+-0.0660799 -0.294872 -0.233598 0 1 0
+0.0459877 -0.294872 -0.28801 0 1 0
+-0.393439 0.371795 -0.227151 0 1 0
+-0.36771 -0.212256 0.320513 0 0 1
+0.134031 -0.214511 -0.333333 0 0 1
+0.486263 0.171384 0.320513 0 0 1
+0.5 -0.156448 -0.0684637 1 0 0
+0.126297 -0.294872 0.220979 0 1 0
+0.320513 0.0572355 -0.354485 1 0 0
+-0.201109 0.0817925 0.371795 0 0 1
+-0.222581 -0.250833 0.320513 0 0 1
+0.0505766 -0.198911 0.364136 -0.137371 0.976434 0.16645
+-0.378599 -0.119918 -0.371795 0 0 1
+0.5 -0.144312 -0.29077 1 0 0
+-0.0589834 0.0690231 0.320513 0 0 1
+0.5 -0.0677664 -0.181432 1 0 0
+0.370566 -0.0816953 0.330766 0.936947 -0.34947 0
+-0.5 -0.0514049 -0.342821 1 0 0
+-0.47748 0.371795 0.251498 0 1 0
+-0.389186 0.276991 -0.371795 0 0 1
+0.148805 -0.0427512 -0.333333 0 0 1
+-0.25365 0.194549 -0.333333 0 0 1
+0.490664 0.210143 0.320513 0.0444728 0.0128004 0.998929
+0.466236 -0.294872 -0.0906863 0 1 0
+-0.452246 0.0321658 -0.371795 0 0 1
+0.5 -0.0971596 0.197367 1 0 0
+0.5 0.0792309 -0.251429 1 0 0
+-0.222134 -0.371795 -0.101613 0 1 0
+0.359014 -0.176848 0.320513 0 0 1
+-0.489855 -0.294872 0.0293244 0.0502486 0.998719 0.00598479
+0.05321 -0.294872 -0.184438 0 1 0
+-0.261461 0.371795 0.208732 0 1 0
+0.422124 0.107194 -0.371795 0 0 1
+0.377065 -0.371795 0.0191087 0 1 0
+0.5 0.205926 -0.135818 1 0 0
+0.5 -0.0616636 -0.13184 1 0 0
+-0.233407 -0.043359 -0.0635713 0.0836138 0.996462 -0.00851906
+-0.377685 -0.0225134 -0.371795 0 0 1
+-0.5 0.327758 -0.339397 1 0 0
+0.48705 -0.276812 0.320513 0 0 1
+-0.5 -0.020632 -0.282202 1 0 0
+-0.263 -0.0976454 -0.333333 0 0 1
+-0.448718 -0.362294 -0.139836 0.993638 0.111292 -0.0172368
+-0.464256 0.130659 -0.371795 0 0 1
+-0.347681 0.138776 -0.371795 0 0 1
+0.272641 0.108965 -0.333333 0 0 1
+0.136064 -0.153309 0.366497 -0.532616 0.792554 0.296949
+-0.213565 0.371795 0.131883 0 1 0
+0.065025 0.235232 0.371795 0 0 1
+0.5 -0.234064 -0.0965316 1 0 0
+-0.348913 0.371795 0.233558 0 1 0
+0.5 -0.00984171 -0.101326 1 0 0
+0.0898537 -0.294872 0.111864 0 1 0
+-0.5 0.303428 0.11011 1 0 0
+-0.420341 0.371795 0.257319 0 1 0
+-0.37175 0.113184 -0.371795 0 0 1
+0.141026 0.302698 -0.328115 0.997417 0.0717783 0.00254095
+0.415183 -0.229059 0.320513 0 0 1
+-0.0921621 0.371795 0.12045 0 1 0
+-0.0122878 0.13743 0.320513 0 0 1
+0.181946 -0.371795 0.301743 0 1 0
+-0.446068 0.371795 -0.0936878 0 1 0
+0.5 0.0631394 -0.212672 1 0 0
+-0.423248 -0.371795 -0.203731 0 1 0
+-0.0646009 0.338141 -0.371795 0 0 1
+0.173015 -0.109175 0.339336 0.837155 -0.546966 0
+0.428062 0.294872 -0.157399 0 1 0
+0.381347 -0.371795 0.141518 0 1 0
+0.0736827 -0.294872 -0.180474 0 1 0
+-0.486862 -0.294872 0.0269747 0 1 0
+-0.448718 -0.315496 -0.0720955 1 0 0
+0.0130798 0.306152 0.320513 0 0 1
+-0.41203 -0.292759 -0.371795 0 0 1
+-0.143006 0.318635 0.320513 0 0 1
+-0.0174894 -0.294872 0.281869 0 1 0
+0.5 0.21026 -0.229218 1 0 0
+0.448718 -0.350639 -0.013206 1 0 0
+-0.5 0.289764 -0.135765 1 0 0
+0.336384 -0.308653 0.320513 0 0 1
+0.198851 0.0212165 -0.011184 0.836958 -0.547029 -0.0161337
+-0.5 0.0954073 0.2521 1 0 0
+-0.5 -0.0309495 -0.071894 1 0 0
+-0.355241 0.117608 0.359826 0.877685 -0.479239 0
+-0.268282 -0.209351 0.371795 -0.195753 -0.392201 0.89881
+0.317566 -0.0471578 0.371795 0 0 1
+-0.210854 -0.0386263 -0.248188 -0.487138 0.873322 -0.00210832
+-0.345312 -0.271696 0.320513 0 0 1
+0.249433 -0.205887 -0.333333 0 0 1
+0.16695 0.294872 -0.258706 0 1 0
+-0.5 -0.242345 0.0642446 1 0 0
+-0.320513 0.0105536 -0.35111 1 0 0
+0.5 -0.0354776 -0.0152408 1 0 0
+-0.5 -0.200251 -0.0667449 1 0 0
+-0.5 -0.0139805 -0.110617 1 0 0
+-0.256783 -0.371795 0.0573969 0 1 0
+-0.448718 -0.355676 -0.0691945 1 0 0
+0.387373 -0.371795 -0.118267 0 1 0
+0.245515 -0.369931 -0.371795 -0.0353596 0.354635 0.934336
+-0.266648 -0.0244666 -0.0488999 0.819971 0.572375 0.00592397
+-0.5 -0.160754 0.0263194 1 0 0
+0.224814 0.294872 0.2968 0 1 0
+0.448718 -0.317442 0.177219 1 0 0
+0.5 -0.262593 -0.160971 1 0 0
+-0.5 0.138852 -0.0692256 1 0 0
+0.319532 -0.165179 -0.340146 0.989589 -0.138262 0.0399728
+0.38509 0.294872 -0.22065 0 1 0
+-0.355076 -0.371795 -0.179365 0 1 0
+0.5 -0.113173 0.19281 1 0 0
+0.131687 0.311528 -0.371795 -0.110119 -0.0141455 0.993818
+0.265488 -0.246028 -0.371795 0 0 1
+-0.43912 0.371795 -0.189039 0 1 0
+-0.0671253 -0.294872 0.210263 0 1 0
+0.5 -0.265732 0.292749 1 0 0
+-0.163793 0.12329 0.358124 0.815919 -0.578167 0
+-0.141154 -0.341626 0.303925 1 0 0
+-0.1418 0.198869 0.371795 0 0 1
+0.173911 -0.140658 0.371795 0 0 1
+-0.5 0.281451 -0.0125152 1 0 0
+0.218827 -0.329832 -0.371795 0 0 1
+0.193041 0.00723613 -0.241034 0.995568 -0.0937653 0.00722476
+0.5 -0.044712 0.141634 1 0 0
+0.304031 -0.232606 -0.371795 0 0 1
+0.0627488 0.371795 -0.156038 0 1 0
+0.325764 -0.371795 0.317171 -0.0588723 0.858174 -0.509971
+-0.5 -0.247401 -0.0688216 1 0 0
+0.12401 -0.294872 -0.139012 0 1 0
+-0.296943 -0.371795 0.281075 0 1 0
+-0.45215 -0.04748 0.320513 0 0 1
+-0.343294 0.139237 0.326972 0.819236 -0.544384 -0.180276
+0.406989 -0.351696 0.320513 0 0 1
+-0.141154 -0.368847 0.258621 0.911337 -0.404401 0.0769676
+0.486435 -0.0986402 0.320513 0 0 1
+-0.391307 0.371795 0.16841 0 1 0
+-0.34617 0.166124 -0.371795 0 0 1
+-0.5 -0.187497 -0.0442355 1 0 0
+-0.397737 -0.000551661 -0.371795 0 0 1
+-0.220309 0.325646 -0.371795 0 0 1
+0.243463 0.294872 0.154927 0 1 0
+-0.0677694 -0.280316 0.320513 0 0 1
+-0.429644 0.371795 -0.00188908 0 1 0
+0.5 0.22298 -0.0817123 1 0 0
+-0.360858 -0.0882345 0.371795 -0.237908 -0.0190489 0.971101
+-0.07123 0.371795 0.0684247 0 1 0
+0.452913 -0.0337606 0.320513 0 0 1
+0.5 -0.203275 0.23495 1 0 0
+-0.3789 0.371795 -0.300703 0 1 0
+0.056692 0.273876 0.320513 0 0 1
+0.448718 -0.354818 -0.0995704 1 0 0
+0.141109 -0.322456 0.295319 1 0 0
+0.429796 -0.0905119 -0.371795 0 0 1
+0.314135 0.109342 0.371795 0 0 1
+-0.281236 0.220972 -0.368673 -0.433099 0.703102 0.56398
+0.190431 -0.371795 0.0235532 0 1 0
+-0.5 0.174953 -0.283525 1 0 0
+0.408836 -0.371795 0.227318 0 1 0
+-0.257372 -0.0463764 0.371795 0 0 1
+-0.196694 0.0221104 0.320513 0.195439 -0.109886 0.97454
+0.206437 -0.196551 -0.333333 0 0 1
+-0.140895 -0.294872 0.295111 0.715538 -0.687412 0.124379
+0.0567226 -0.294872 -0.00775701 0 1 0
+0.497346 0.294872 -0.370299 -0.238883 -0.621689 0.745948
+-0.323571 0.247099 0.320513 0 0 1
+-0.224658 0.236856 0.343443 -0.349474 0.936946 0
+0.0723348 -0.191441 0.328261 -0.284285 0.947341 0.147402
+-0.5 -0.260151 0.263065 1 0 0
+0.00918106 0.371795 0.239974 0 1 0
+0.306363 -0.371795 -0.100347 0 1 0
+0.241476 -0.371795 -0.160282 0 1 0
+0.242632 -0.301223 -0.371795 0 0 1
+-0.347497 0.371795 0.128146 0 1 0
+-0.5 0.136086 -0.27949 1 0 0
+-0.14723 -0.173204 0.371795 0 0 1
+0.5 0.200599 -0.284812 1 0 0
+-0.43487 -0.371795 0.112405 0 1 0
+-0.374982 -0.0681775 0.343657 0.969525 0.244991 0
+-0.15795 -0.303456 -0.371795 0 0 1
+0.383033 -0.198054 0.320513 0 0 1
+-0.5 -0.0438336 -0.120256 1 0 0
+0.311773 0.179713 0.320513 0.527288 0.571762 0.628535
+0.328029 -0.278591 -0.371795 0 0 1
+-0.328358 -0.159188 0.329349 0.798688 0.589186 -0.1223
+-0.193768 0.0674837 0.327807 0.870897 -0.444546 0.209566
+0.185934 -0.130709 -0.333333 0 0 1
+-0.421319 0.176842 -0.371795 0 0 1
+0.448718 -0.296469 0.116282 0.707418 -0.70676 0.00713351
+0.0812579 -0.188377 0.330703 -0.398975 0.915824 0.0456591
+-0.194659 -0.371795 -0.168559 0 1 0
+-0.109069 -0.231285 0.371795 0 0 1
+0.374284 0.0139878 0.371795 0.329385 -0.0429804 0.943217
+-0.0547742 0.22613 0.371795 0 0 1
+0.161 0.230897 -0.35011 0 1 0
+-0.229768 0.180166 -0.333333 0 0 1
+-0.318014 0.263317 0.320513 0 0 1
+0.181569 -0.336576 0.320513 0 0 1
+-0.5 0.0298048 0.31784 0.824292 0.135277 -0.549765
+-0.303857 -0.187233 0.320513 0.540479 0.484038 -0.688179
+-0.204977 0.360189 -0.371795 0 0 1
+0.5 -0.0843039 0.0454916 1 0 0
+0.5 0.218967 0.192053 1 0 0
+0.467056 0.294872 0.144538 0 1 0
+-0.418757 0.10761 0.320513 0 0 1
+-0.485098 -0.294872 6.84035e-005 0 1 0
+0.5 0.015241 -0.335038 1 0 0
+-0.326375 0.161838 0.354147 0.800541 -0.599278 0
+0.244526 -0.145513 0.371795 0 0 1
+-0.5 -0.159151 0.0116602 1 0 0
+0.422008 -0.304444 0.320513 0 0 1
+0.20041 -0.041867 0.339295 0.96962 -0.244618 0
+-0.246955 -0.241093 0.320513 0 0 1
+-0.38706 -0.371795 -0.132034 0 1 0
+0.5 -0.188931 0.0256924 1 0 0
+-0.228492 0.183164 -0.333333 0 0 1
+0.5 0.192578 0.0155297 1 0 0
+0.448718 -0.327683 0.274 1 0 0
+-0.253746 0.371795 -0.045897 0 1 0
+0.269102 -0.00147108 -0.160663 0.998841 -0.0374471 -0.0302288
+0.5 -0.115268 0.210288 1 0 0
+0.0147049 -0.0741403 -0.333333 0 0 1
+-0.183346 0.233999 0.371795 0 0 1
+-0.226656 -0.0572324 0.371795 0 0 1
+-0.5 -0.206779 -0.356075 1 0 0
+-0.385045 -0.125122 0.320513 0 0 1
+-0.418634 -0.371795 0.0646225 0 1 0
+0.0790774 0.371795 -0.182424 0 1 0
+-0.5 -0.0583227 -0.196283 1 0 0
+0.5 0.0666716 -0.171711 1 0 0
+0.5 -0.214254 -0.0606672 1 0 0
+-0.0860595 -0.206216 0.371795 0 0 1
+0.254045 0.0199043 0.371795 0 0 1
+0.175162 0.294872 0.30043 0 1 0
+-0.142804 -0.140358 0.320513 0.159616 0.217301 0.962966
+-0.10043 -0.17814 0.320513 0.28461 0.614237 0.73601
+-0.242853 -0.371795 0.267038 0 1 0
+-0.0323666 0.0118131 0.320513 0 0 1
+-0.201971 0.0326122 -0.20122 0.697918 0.716123 -0.008904
+0.5 -0.25499 -0.223275 1 0 0
+0.338012 0.294872 0.0460152 0 1 0
+-0.221383 -0.122419 0.371795 0 0 1
+0.499805 -0.294872 0.219487 -0.434407 0.898246 0.0666733
+0.00624964 0.132707 -0.333333 0 0 1
+-0.0917215 -0.294872 0.0366169 0 1 0
+-0.27349 -0.265517 0.320513 0 0 1
+-0.24341 -0.371795 0.267138 0 1 0
+-0.373157 0.371795 -0.0277802 0 1 0
+-0.101363 0.331095 -0.371795 0 0 1
+0.420841 0.0436251 -0.371795 0 0 1
+0.116152 0.254725 -0.371795 0 0 1
+0.225462 0.294872 -0.34155 0 1 0
+-0.0795425 0.371795 -0.0899887 0 1 0
+0.201762 -0.371795 0.0292533 0 1 0
+0.255272 0.0506604 -0.333333 0 0 1
+-0.043909 0.371795 -0.00620727 0 1 0
+-0.147942 -0.0363541 -0.333333 0 0 1
+0.028565 0.256282 0.36249 -0.0557618 0.977632 0.202797
+-0.170188 -0.205862 -0.333333 0 0 1
+0.5 -0.269373 -0.147353 1 0 0
+-0.247007 -0.371795 0.316073 0.00122487 0.951083 -0.308933
+-0.203701 0.0340577 -0.0721772 0.575677 0.817559 0.0138662
+-0.103113 -0.0160196 0.320513 0 0 1
+0.208587 0.208127 -0.333333 0 0 1
+-0.171815 -0.111011 0.331071 0.837146 0.546979 0
+0.404689 0.294872 -0.193169 0 1 0
+0.128636 0.186142 -0.333333 0 0 1
+0.3456 0.294872 -0.262068 0 1 0
+0.153004 0.277107 -0.371795 0 0 1
+-0.0729985 -0.269264 -0.371795 0 0 1
+-0.271646 -0.281632 -0.371795 0 0 1
+0.5 0.244901 0.117359 1 0 0
+-0.5 0.0225314 -0.14217 1 0 0
+-0.145113 0.0679841 -0.333333 0 0 1
+0.273769 -0.371795 -0.0120876 0 1 0
+-0.202624 -0.0317729 0.348595 0.990621 0.135588 -0.0169346
+0.5 -0.151534 -0.0548847 1 0 0
+-0.465725 0.371795 0.157559 0 1 0
+0.0641557 0.371795 0.0852837 0 1 0
+-0.257151 0.0765883 -0.333333 0 0 1
+-0.225456 0.198278 0.371795 0 0 1
+-0.355557 0.0266678 -0.371795 0 0 1
+-0.411629 0.265898 -0.371795 0 0 1
+-0.090167 0.230897 -0.350362 0 1 0
+-0.363573 0.280883 0.320513 0 0 1
+0.141109 -0.305637 0.203834 0.987147 0.150118 0.054822
+-0.247859 0.0399437 -0.226981 -0.373227 0.927736 0.00293071
+-0.5 -0.0565856 0.201213 1 0 0
+0.227473 -0.371795 -0.22928 0 1 0
+-0.320513 -0.0171849 -0.342378 0.984495 0.0103608 -0.175106
+-0.459989 -0.294872 0.238717 0.00554516 0.999984 0.00108092
+0.292049 -0.371795 0.190212 0 1 0
+0.293896 0.0710881 -0.333333 0 0 1
+-0.5 0.101263 -0.130802 1 0 0
+0.5 0.288595 0.308593 0.988621 0.150351 0.00469786
+0.5 0.220936 0.225271 1 0 0
+-0.441176 0.330415 0.320513 0 0 1
+-0.141154 -0.323758 -0.159614 1 0 0
+-0.448718 -0.344259 0.0946518 1 0 0
+-0.371834 -0.0782955 0.338652 0.942208 0.335023 0.00191723
+0.0532341 -0.0505983 -0.333333 0 0 1
+-0.5 -0.252956 -0.214391 1 0 0
+0.287355 -0.0158151 0.371795 0 0 1
+0.043235 0.205348 0.371795 0.0293046 -0.453913 0.890564
+0.362649 -0.0064564 0.371795 0 0 1
+0.286583 0.0144714 -0.333333 0 0 1
+0.34817 -0.206217 -0.371795 0 0 1
+0.448718 -0.367269 0.0243054 0.985164 -0.152411 0.0788881
+0.5 -0.264306 0.195563 1 0 0
+0.44714 -0.234723 0.320513 0 0 1
+0.385908 0.294872 0.0344161 0 1 0
+0.373997 0.191452 0.320513 0 0 1
+0.409518 0.294872 0.156894 0 1 0
+-0.0355153 0.193632 -0.333333 0 0 1
+-0.418033 -0.211813 0.320513 0 0 1
+-0.448929 0.371795 0.195876 0 1 0
+0.141026 0.298135 -0.292142 0.693972 0.712929 0.100669
+0.25569 0.0276289 0.000697638 0.536914 0.52278 0.662136
+-0.284895 -0.0746284 0.371795 0 0 1
+-0.444903 0.220587 -0.371795 0 0 1
+-0.5 0.178064 -0.217454 1 0 0
+-0.0967379 0.371795 0.179189 0 1 0
+0.141109 -0.305797 0.0820528 1 0 0
+-0.257319 -0.371795 -0.100671 0 1 0
+0.193313 0.059893 0.320513 -0.259393 -0.140077 0.955559
+0.155314 0.254343 0.354896 0.0721155 0.997396 -0.000241048
+-0.325619 0.134399 0.371795 0 0 1
+0.218525 -0.268971 0.320513 0 0 1
+0.125213 -0.129998 -0.333333 0 0 1
+-0.222396 0.042712 -0.156344 0.189997 0.981708 -0.0122405
+-0.5 -0.22721 -0.208125 1 0 0
+-0.0587063 0.238295 0.371795 0 0 1
+-0.229028 -0.14786 -0.333333 0 0 1
+-0.452305 -0.0523074 -0.371795 0 0 1
+0.198602 -0.0490051 0.337544 0.969402 -0.245481 0
+0.381141 0.294872 0.0624446 0 1 0
+0.422759 -0.286872 0.320513 0 0 1
+-0.386601 0.371795 -0.00611376 0 1 0
+0.380237 0.294872 -0.184412 0 1 0
+-0.5 0.272923 -0.117083 1 0 0
+0.5 -0.0838498 -0.015822 1 0 0
+0.267125 -0.0123544 -0.0796003 0.959257 -0.28178 -0.020623
+-0.103117 -0.198535 -0.333333 0 0 1
+-0.5 -0.0100012 -0.309557 1 0 0
+-0.5 -0.170003 0.163835 1 0 0
+0.5 -0.0677911 -0.127974 1 0 0
+-0.5 -0.220244 0.0460851 1 0 0
+-0.5 -0.257825 0.0669856 1 0 0
+0.0382699 0.0790219 -0.333333 0 0 1
+-0.453971 0.371795 -0.183632 0 1 0
+0.46029 0.294872 -0.134463 0 1 0
+0.448849 -0.0579488 -0.371795 0 0 1
+-0.419844 -0.371795 0.0276559 0 1 0
+0.355512 0.294872 0.295201 0 1 0
+0.141026 0.315324 -0.0619382 1 0 0
+0.0891756 -0.109384 0.320513 0 0 1
+0.194304 -0.050781 -0.333333 0 0 1
+-0.119524 0.27449 -0.371795 0 0 1
+0.5 0.271756 -0.177319 1 0 0
+-0.350213 0.0284284 0.371795 0 0 1
+-0.420398 -0.0812436 -0.371795 0 0 1
+-0.468838 0.371795 -0.203436 0 1 0
+0.36955 0.294872 -0.0269028 0 1 0
+0.48645 -0.294872 0.255013 0 1 0
+-0.46886 0.131326 0.320513 0 0 1
+0.5 0.289811 0.293836 0.971859 0.230427 0.0489204
+-0.0297804 0.371795 -0.357993 0 1 0
+-0.420227 0.34369 -0.371795 0 0 1
+-0.315563 0.148363 0.371795 0 0 1
+-0.332851 -0.371795 0.0695368 0 1 0
+-0.5 0.0964498 0.112711 1 0 0
+0.5 -0.191513 -0.0782863 1 0 0
+-0.5 -0.115483 -0.0559792 1 0 0
+0.192318 -0.000112319 -0.0318653 0.9986 0.0492079 0.0194249
+-0.249037 -0.172107 0.371795 0 0 1
+-0.187392 -0.371795 0.313937 -0.0398228 0.984203 -0.172504
+-0.5 -0.0286634 0.171531 1 0 0
+-0.449848 -0.19635 -0.371795 0 0 1
+0.5 0.0192093 -0.245227 1 0 0
+-0.42445 0.371795 -0.0860796 0 1 0
+0.5 0.164151 0.0917755 1 0 0
+0.141109 -0.36066 0.0721926 1 0 0
+-0.248915 -0.371795 0.288969 0 1 0
+0.141109 -0.344264 -0.0621679 1 0 0
+0.5 -0.0013591 -0.0375392 1 0 0
+0.196709 -0.371795 -0.148386 0 1 0
+-0.412374 -0.0637749 -0.371795 0 0 1
+0.23174 -0.215465 -0.333333 0 0 1
+-0.5 0.308066 0.23104 1 0 0
+-0.480255 -0.294872 -0.1484 0 1 0
+-0.5 -0.0638937 -0.104739 1 0 0
+-0.5 0.298356 0.1257 1 0 0
+-0.269933 -0.371795 -0.304875 0 1 0
+0.141109 -0.34753 -0.0419254 1 0 0
+-0.378229 0.309951 0.320513 0 0 1
+-0.412517 0.322959 0.320513 0 0 1
+0.321238 0.294872 -0.0242286 0 1 0
+0.388478 0.294872 -0.0682929 0 1 0
+0.221665 0.0372272 -0.105416 -0.241166 0.970356 -0.0157406
+-0.218983 -0.269053 0.320513 0 0 1
+-0.5 -0.0732504 -0.369014 0.818446 0.0712112 0.570154
+-0.400217 -0.371795 -0.279806 0 1 0
+0.0489631 -0.294872 -0.151785 0 1 0
+-0.5 -0.0312684 -0.117954 1 0 0
+-0.231695 0.371795 -0.0350072 0 1 0
+0.5 -0.00872361 0.261059 1 0 0
+0.316964 -0.176217 -0.34108 0.954907 -0.182854 0.233918
+0.114654 -0.294872 0.164763 0 1 0
+0.265493 -0.371795 -0.196089 0 1 0
+-0.5 0.11766 -0.206792 1 0 0
+-0.2739 -0.00525265 -0.0634017 0.993072 0.117499 -0.00134211
+0.261378 -0.371795 -0.117245 0 1 0
+-0.469478 0.371795 -0.0437271 0 1 0
+-0.343512 -0.371795 -0.0449567 0 1 0
+0.00932552 -0.157824 -0.333333 0 0 1
+0.104529 0.192166 0.371795 0 0 1
+-0.140489 0.371795 -0.135394 0 1 0
+0.197337 0.0189658 -0.1495 0.871835 -0.489787 0.00352885
+-0.192687 0.0210828 -0.151287 0.868802 0.495027 -0.0114294
+0.141026 0.369308 -0.358403 0.720528 0.691392 -0.053076
+0.12189 -0.255683 -0.371795 0 0 1
+0.0120951 -0.269256 -0.371795 0 0 1
+0.128922 0.371795 -0.277662 0 1 0
+-0.0335693 0.280389 -0.371795 0 0 1
+-0.219038 -0.357884 -0.371795 0 0 1
+-0.0555131 -0.294872 -0.186824 0 1 0
+-0.5 -0.104191 -0.205854 1 0 0
+-0.5 -0.0479204 0.0819153 1 0 0
+0.169325 0.294872 -0.0185216 0 1 0
+0.433135 -0.019074 0.320513 0 0 1
+0.235802 0.00951838 0.0166238 0.211314 0.438231 0.87367
+0.124682 0.221258 -0.333333 -0.0125811 0.0803292 0.996689
+-0.444856 0.371795 -0.321236 0 1 0
+-0.336065 0.371795 -0.272448 0 1 0
+-0.337328 0.371795 0.158518 0 1 0
+-0.370994 -0.0421932 0.371795 0 0 1
+-0.221505 -0.254786 -0.371795 0 0 1
+0.262278 -0.0522983 0.371795 0 0 1
+0.448718 -0.324665 -0.182473 1 0 0
+-0.196438 -0.371795 0.277474 0 1 0
+-0.302337 0.371795 -0.242933 0 1 0
+0.5 0.116402 0.17379 1 0 0
+0.0815198 0.228617 -0.333333 0.0693945 0.694775 0.715872
+-0.35083 -0.371795 -0.157381 0 1 0
+0.5 -0.0877089 -0.222711 1 0 0
+0.5 0.159953 0.0654442 1 0 0
+0.292653 -0.0302218 -0.333333 0 0 1
+-0.381938 0.0356415 0.323621 0.731501 -0.214982 -0.647062
+-0.273719 -0.00731626 -0.188219 0.992304 0.123655 0.00648416
+0.0920666 0.371795 -0.267163 0 1 0
+-0.244631 -0.162665 -0.333333 0 0 1
+-0.364527 -0.371795 -0.0354499 0 1 0
+-0.423185 -0.160834 0.320513 0 0 1
+-0.5 0.352248 0.0688022 1 0 0
+-0.274274 0.000976272 -0.306084 0.9997 0.0189735 0.0154571
+0.276798 -0.371795 0.167152 0 1 0
+0.0818454 0.371795 -0.0513846 0 1 0
+-0.298259 0.371795 0.178742 0 1 0
+-0.159038 -0.230897 -0.349266 0 1 0
+0.300183 0.058219 0.371795 0 0 1
+0.376754 -0.169968 -0.371795 0 0 1
+-0.5 -0.293547 0.204073 0.735797 0.569581 0.366306
+0.0416626 0.371795 -0.132015 0 1 0
+-0.147905 0.230897 -0.368275 0.0977677 0.811782 0.575718
+0.344884 -0.371795 -0.230025 0 1 0
+0.32924 -0.371795 -0.122552 0 1 0
+-0.477639 0.288537 -0.371795 0 0 1
+-0.0293287 0.371795 0.229345 0 1 0
+0.429378 0.294872 -0.0955573 0 1 0
+0.240795 0.178222 0.371795 0 0 1
+0.5 0.0884951 -0.0655846 1 0 0
+0.198421 -0.0497223 0.35088 0.969408 -0.245456 0
+-0.245255 -0.0410745 -0.220831 0.303839 0.952717 -0.00355297
+-0.247506 -0.371795 0.025677 0 1 0
+-0.205413 0.371795 0.070508 0 1 0
+0.451202 0.107109 0.320513 0 0 1
+-0.142331 -0.371795 -0.100696 -0.623849 0.717907 -0.308905
+-0.191933 -0.203772 -0.333333 0 0 1
+-0.482988 -0.0357777 0.320513 0 0 1
+-0.350069 0.371795 -0.0831771 0 1 0
+-0.397142 0.184758 0.320513 0 0 1
+0.468095 -0.294872 -0.151119 0 1 0
+0.5 0.249729 0.107079 1 0 0
+0.5 -0.288824 -0.158939 0.958324 -0.248186 -0.141491
+0.294233 -0.371795 0.0957584 0 1 0
+0.327968 0.29358 0.320513 0.0450428 0.624738 0.779534
+-0.402101 -0.371795 0.125777 0 1 0
+-0.160864 -0.371795 -0.248374 0 1 0
+-0.187745 -0.371795 -0.285984 0 1 0
+-0.0178936 -0.131934 0.320513 0 0 1
+0.142788 -0.371795 -0.24328 0.75989 0.647775 -0.0543621
+0.433316 -0.0274923 0.320513 0 0 1
+-0.131073 0.215166 0.371795 0 0 1
+0.141109 -0.36809 -0.237777 0.931181 0.356062 0.0782417
+-0.5 0.161609 -0.306256 1 0 0
+0.5 -0.217545 0.0115054 1 0 0
+-0.25614 -0.371795 -0.332389 0 1 0
+-0.5 -0.293503 -0.268887 0.963046 0.250985 -0.0977199
+0.5 0.159169 -0.314994 1 0 0
+-0.0843164 0.0624249 -0.333333 0 0 1
+-0.196476 -0.0267311 -0.0959915 0.787023 -0.616841 -0.010125
+-0.263508 -0.371795 0.0167575 0 1 0
+-0.5 -0.224581 -0.0777258 1 0 0
+0.5 -0.208178 0.264686 1 0 0
+-0.5 0.0660147 0.240621 1 0 0
+0.438614 -0.371795 -0.103604 -0.0836328 0.9964 -0.0139137
+0.141026 0.365111 0.165454 0.961592 0.26054 0.0863699
+-0.0996428 0.0478861 0.320513 0 0 1
+-0.208816 0.124889 0.371795 0 0 1
+0.425259 0.156906 -0.371795 0 0 1
+0.371992 0.294872 -0.0406153 0 1 0
+-0.463851 0.371795 -0.129237 0 1 0
+0.439381 -0.371795 0.0255256 -0.15766 0.982151 0.102582
+0.325303 -0.261843 0.320513 0 0 1
+0.150566 -0.371795 -0.143166 0.0234916 0.9997 -0.00698685
+0.245243 0.183363 -0.333333 0 0 1
+0.5 -0.255971 -0.0161451 1 0 0
+0.332355 -0.371795 0.0239709 0 1 0
+-0.20388 0.0268349 0.371795 0.743895 -0.382406 0.548074
+-0.00868206 -0.187986 0.320513 0 0 1
+-0.141154 -0.295497 -0.066654 0.754758 -0.655602 -0.0229624
+-0.315525 -0.371795 -0.37124 0.0525481 0.680249 0.731095
+-0.269128 -0.371795 0.174074 0 1 0
+-0.041966 -0.169252 0.320513 0 0 1
+-0.105838 0.371795 -0.0125479 0 1 0
+0.00280715 0.371795 0.0857098 0 1 0
+0.108747 0.360907 0.320513 0 0 1
+-0.479748 -0.294872 0.166979 0 1 0
+-0.286023 0.371795 -0.0334163 0 1 0
+0.08818 -0.294872 -0.35479 0 1 0
+0.119332 -0.294872 0.301902 0 1 0
+-0.360096 -0.371795 0.100401 0 1 0
+0.442499 -0.265043 -0.371795 0 0 1
+0.340238 -0.371795 -0.0196866 0 1 0
+0.412318 -0.371795 0.1073 0 1 0
+-0.5 0.333679 -0.353663 1 0 0
+-0.5 -0.0832813 0.231392 1 0 0
+0.00657235 0.00404593 -0.333333 0 0 1
+0.5 -0.0309468 0.233464 1 0 0
+-0.5 -0.0413284 0.170897 1 0 0
+0.318587 -0.371795 -0.321743 0 1 0
+-0.448718 -0.335057 -0.0917775 1 0 0
+-0.0746687 -0.244434 0.371795 -0.00747201 -0.03083 0.999497
+-0.5 -0.213628 -0.0394705 1 0 0
+0.342129 0.294872 0.274535 0 1 0
+-0.323973 0.172837 -0.371795 -0.195328 0.0046009 0.980727
+0.5 -0.144926 -0.138895 1 0 0
+0.244334 0.00255903 0.0148076 0.527769 0.0873188 0.844888
+-0.330331 -0.0509272 -0.371795 -0.0583023 0.0215366 0.998067
+0.347214 -0.371795 0.115602 0 1 0
+-0.430612 -0.371795 -0.0425682 0 1 0
+-0.363477 -0.106146 -0.371795 0 0 1
+-0.385975 -0.142285 -0.371795 0 0 1
+-0.5 0.246231 -0.205675 1 0 0
+-0.0741305 0.36819 0.320513 0.0149551 0.396664 0.917842
+-0.127536 -0.294872 -0.10536 0 1 0
+-0.174227 0.371795 0.021556 0 1 0
+-0.0542552 -0.124035 0.320513 0 0 1
+0.290976 0.224411 0.320513 0 0 1
+-0.5 0.0745581 -0.105824 1 0 0
+0.183017 0.0940713 -0.333333 0 0 1
+-0.066086 0.266825 -0.371795 0 0 1
+-0.5 -0.0500844 0.0823339 1 0 0
+-0.0143375 -0.129548 -0.333333 0 0 1
+-0.434218 0.371795 -0.100877 0 1 0
+0.144294 0.175177 0.371795 0 0 1
+-0.375385 0.0663219 0.324547 0.960145 -0.247881 -0.12914
+0.362428 -0.19286 0.320513 0 0 1
+-0.5 -0.145597 0.160841 1 0 0
+0.231901 0.294872 -0.298778 0 1 0
+0.292021 0.294872 -0.0229437 0 1 0
+-0.5 0.0987898 -0.174439 1 0 0
+0.5 0.200494 0.0669805 1 0 0
+-0.418197 -0.0990239 -0.371795 0 0 1
+0.5 0.132017 -0.163197 1 0 0
+0.471804 0.274134 -0.371795 0 0 1
+-0.5 0.145835 -0.337688 1 0 0
+-0.5 -0.147303 -0.353992 1 0 0
+0.0806367 -0.294872 -0.356674 0 1 0
+-0.191985 -0.342794 -0.371795 0 0 1
+-0.493543 -0.294872 0.0849018 0.163103 0.986068 0.032654
+0.439103 0.0613397 0.320513 0 0 1
+0.247238 -0.281288 -0.371795 0 0 1
+0.259115 0.294872 -0.220171 0 1 0
+0.448718 -0.309638 0.300377 1 0 0
+-0.0278078 0.256282 0.371771 0.00276418 0.347549 0.937658
+-0.349031 -0.225026 0.320513 0 0 1
+0.232735 0.294872 0.264077 0 1 0
+-0.080098 0.188776 0.341293 -0.380245 0.924886 0
+0.300808 -0.349357 -0.371795 0 0 1
+-0.366905 -0.222188 -0.371795 0 0 1
+0.5 -0.100067 -0.311444 1 0 0
+0.256823 0.0281324 -0.0391302 0.675048 0.737655 -0.0132357
+0.22737 -0.371795 -0.0366106 0 1 0
+0.383072 -0.0197884 0.370545 0.885476 -0.202801 0.418095
+0.141109 -0.295291 -0.0726101 0.807115 0.590378 0.00425329
+-0.104375 -0.176104 0.320789 0.392044 0.693668 0.604257
+-0.268832 0.371795 0.256499 0 1 0
+-0.247874 0.0678649 -0.333333 0 0 1
+0.228562 0.230897 -0.33733 -0.00825702 0.907218 0.42058
+-0.0719285 -0.0862493 -0.333333 0 0 1
+0.163081 -0.371795 -0.142345 0 1 0
+-0.5 0.311837 -0.0133817 1 0 0
+-0.246036 0.00936504 -0.019848 -0.39379 0.262742 0.88085
+-0.00870932 -0.294872 -0.0783423 0 1 0
+0.269158 -0.000831653 -0.332546 0.418224 0.0829427 0.904549
+-0.478145 0.371795 -0.187509 0 1 0
+-0.344524 -0.349952 -0.371795 0 0 1
+0.30469 -0.0153409 0.371795 0 0 1
+-0.147043 -0.262142 -0.371795 0 0 1
+0.5 -0.0162954 -0.129678 1 0 0
+0.145445 -0.313893 -0.371795 0.26009 0.0258116 0.965239
+0.117892 -0.154484 0.320513 -0.00095019 0.0761831 0.997093
+0.332675 -0.371795 0.138485 0 1 0
+0.263244 0.0204218 -0.242421 0.873385 0.486866 0.0126385
+0.5 0.218152 0.316971 0.902969 -0.129127 0.409846
+0.050093 0.143497 0.320513 0 0 1
+0.5 0.156182 0.0842854 1 0 0
+0.5 -0.150746 -0.138367 1 0 0
+0.382627 -0.208751 -0.371795 0 0 1
+0.5 0.191998 -0.0507804 1 0 0
+-0.309077 -0.19405 -0.366584 0.833924 0.535916 -0.131773
+0.422621 0.294872 -0.0211921 0 1 0
+-0.0574579 0.178787 0.320513 0 0 1
+-0.185879 0.371795 -0.282006 0 1 0
+0.197319 -0.371795 -0.0620533 0 1 0
+-0.304774 -0.371795 0.164692 0 1 0
+-0.5 -0.0870266 -0.260118 1 0 0
+-0.124506 -0.230897 -0.368686 -0.00988325 0.854403 -0.519518
+0.264572 0.294872 0.244919 0 1 0
+-0.280823 -0.314043 0.320513 0 0 1
+0.322688 -0.371795 0.096691 0 1 0
+-0.128612 0.371795 -0.304813 0 1 0
+-0.481394 0.0823934 0.320513 0 0 1
+-0.105677 -0.125746 0.320513 0 0 1
+0.5 -0.117673 -0.0362856 1 0 0
+-0.282617 -0.371795 -0.153702 0 1 0
+-0.0114163 -0.208064 0.371795 0.119729 0.782166 0.611458
+0.114671 -0.256282 0.332879 0 1 0
+-0.164733 0.371795 0.189717 0 1 0
+0.5 -0.06288 -0.0201673 1 0 0
+-0.192262 -0.0201714 -0.102113 0.903197 -0.428761 0.0200079
+-0.5 -0.0891676 0.0195662 1 0 0
+-0.343939 0.371795 -0.238421 0 1 0
+-0.266442 0.111884 0.371795 0 0 1
+-0.144875 -0.371795 0.212044 -0.43572 0.895372 -0.0919679
+-0.448718 -0.362429 0.110437 0.964442 0.228874 0.132168
+0.382284 -0.0308035 0.323792 0.963995 0.0842696 0.252213
+-0.184501 -0.371795 -0.107977 0 1 0
+-0.455145 -0.294872 -0.0561001 0.179148 0.983821 -0.00139865
+0.368458 0.0873475 0.356597 0.936948 0.34947 0
+-0.456344 0.180034 -0.371795 0 0 1
+-0.272756 0.0110789 -0.265488 0.957769 -0.287438 0.00764016
+-0.135642 -0.153638 0.370163 0.489325 0.70962 0.506952
+-0.320513 -0.0485597 -0.342661 0.999111 0.00646981 -0.0416491
+-0.448718 -0.371186 0.11953 0.876952 0.479799 0.027355
+-0.0732132 0.305827 -0.371795 0 0 1
+-0.450167 0.223454 -0.371795 0 0 1
+0.5 -0.0668151 0.117592 1 0 0
+0.195721 0.230897 -0.366884 0.0169833 0.976473 0.214968
+-0.257278 -0.371795 -0.296775 0 1 0
+-0.117915 -0.243793 -0.371795 0 0 1
+0.272555 0.211261 0.35088 0.589944 0.807436 -0.00366607
+0.5 0.291471 0.214478 0.891612 0.427805 -0.148361
+-0.36421 -0.371795 -0.370797 0.0569742 0.912525 0.405032
+0.0821211 -0.294872 -0.0765462 0 1 0
+-0.136668 0.152839 0.34335 -0.653086 0.757183 -0.0123555
+0.160492 0.294872 0.223844 0 1 0
+-0.0363212 -0.0312904 0.320513 0 0 1
+0.390775 0.0224187 -0.371795 0 0 1
+0.17616 -0.225808 0.371795 0 0 1
+-0.306453 -0.371795 0.266842 0 1 0
+-0.324784 0.371795 0.0334501 0 1 0
+0.154449 0.00961784 -0.333333 0 0 1
+0.365554 -0.371795 -0.308273 0 1 0
+0.5 -0.175164 0.188425 1 0 0
+-0.5 0.18801 -0.0526587 1 0 0
+0.5 0.143591 0.148931 1 0 0
+0.5 -0.258932 -0.253421 1 0 0
+-0.00285103 0.0855558 0.320513 0 0 1
+-0.5 0.0976925 -0.0571196 1 0 0
+0.5 0.0182735 -0.311708 1 0 0
+-0.42367 -0.371795 -0.143486 0 1 0
+-0.248785 0.0187979 0.371795 0 0 1
+0.234588 0.0487171 -0.333333 0 0 1
+0.5 0.0143957 -0.3523 1 0 0
+0.0449109 -0.201646 -0.333333 0 0 1
+0.141026 0.325782 0.0514643 1 0 0
+0.5 0.0691686 -0.101472 1 0 0
+0.161162 -0.371795 -0.294522 0 1 0
+0.413575 0.294872 -0.110942 0 1 0
+0.117218 -0.294872 -0.32504 0 1 0
+-0.330671 -0.371795 0.0109736 0 1 0
+0.00823848 0.245851 -0.371795 0 0 1
+-0.268875 0.0210313 -0.125143 0.883258 -0.468861 -0.00492389
+-0.340966 0.345936 0.320513 0 0 1
+-0.0372027 0.29403 0.320513 0 0 1
+0.448718 -0.297763 -0.0166581 0.92551 -0.372241 0.0697756
+0.5 -0.0644324 0.0601984 1 0 0
+0.366816 -0.00199479 -0.371795 0 0 1
+-0.0344765 0.106887 0.320513 0 0 1
+-0.22636 0.371795 -0.0714298 0 1 0
+0.412055 0.294872 0.0138317 0 1 0
+0.477904 0.261059 -0.371795 0 0 1
+0.141026 0.344763 -0.0662957 1 0 0
+-0.5 -0.265551 -0.250704 1 0 0
+0.353913 0.294872 -0.0726652 0 1 0
+-0.0562071 0.249817 0.371795 0.0172116 0.167087 0.985792
+-0.36161 0.371795 0.246624 0 1 0
+0.0439793 0.200045 0.365205 0.158743 0.95591 -0.247058
+0.16015 -0.173485 -0.333333 0 0 1
+0.126193 -0.294872 0.319808 0.17858 -0.715675 0.675218
+0.405957 0.0308177 0.320513 0 0 1
+0.0951361 -0.294872 0.00720948 0 1 0
+-0.5 0.0676546 -0.214864 1 0 0
+-0.5 -0.163314 -0.1649 1 0 0
+-0.5 0.335201 0.14554 1 0 0
+0.472213 0.294872 0.293226 0 1 0
+0.278043 0.00129058 -0.333333 0.0829897 -0.0374968 0.995845
+0.158128 -0.371795 -0.267788 0 1 0
+0.5 0.238024 -0.197459 1 0 0
+0.0965979 0.179632 0.320513 -0.20947 -0.48278 0.850321
+0.320432 0.294872 -0.320581 0 1 0
+0.178669 0.294872 -0.220471 0 1 0
+0.5 -0.148397 0.0255974 1 0 0
+-0.5 -0.167662 0.152388 1 0 0
+-0.428173 -0.371795 0.178346 0 1 0
+0.490278 -0.294872 -0.132526 -0.0506278 0.998698 -0.00628546
+0.448718 -0.343518 -0.117102 1 0 0
+-0.288106 -0.123324 -0.333333 0 0 1
+-0.192806 0.0518146 -0.333333 0 0 1
+-0.20691 -0.361471 0.320513 -0.00275697 -0.167806 0.985816
+0.349148 0.0983649 -0.371795 0 0 1
+-0.5 -0.286685 0.146323 0.991525 0.129119 0.0143563
+0.397543 -0.371795 -0.0199324 0 1 0
+-0.448718 -0.366563 -0.318299 0.951195 0.282865 -0.123354
+0.28381 0.0183581 -0.333333 0 0 1
+0.277206 -0.282305 -0.371795 0 0 1
+0.398719 0.294872 -0.0552679 0 1 0
+0.0090816 -0.212771 -0.333333 0 0 1
+-0.26305 -0.0998154 -0.333333 0 0 1
+0.215168 -0.0350011 -0.269551 0.427736 0.903534 0.0258583
+-0.480309 -0.294872 -0.00478641 0 1 0
+-0.233662 0.371795 0.163424 0 1 0
+0.364896 0.294872 0.294084 0 1 0
+0.164504 -0.371795 0.161154 0 1 0
+0.105557 -0.256282 0.345084 0 1 0
+-0.447529 0.371795 0.140046 0 1 0
+-0.443003 -0.193138 -0.371795 0 0 1
+0.5 0.285501 -0.187532 0.999946 0.0101568 0.00200294
+-0.5 0.325868 0.231739 1 0 0
+0.5 0.091725 -0.279528 1 0 0
+-0.382807 0.371795 0.0959625 0 1 0
+0.193849 0.294872 -0.28973 0 1 0
+0.5 -0.0172156 -0.257403 1 0 0
+-0.429219 -0.279629 -0.371795 0 0 1
+-0.5 -0.0241128 -0.276263 1 0 0
+0.160348 -0.103463 0.320513 0 0 1
+-0.0147834 -0.0314472 0.320513 0 0 1
+0.0458709 0.371795 -0.0724968 0 1 0
+-0.334959 -0.146141 -0.371795 0 0 1
+0.5 0.15637 -0.145406 1 0 0
+-0.5 -0.157744 -0.02661 1 0 0
+0.5 -0.000964201 0.189013 1 0 0
+-0.343297 -0.371795 -0.227951 0 1 0
+-0.107236 -0.294872 -0.090023 0 1 0
+-0.103049 0.315779 0.320513 0 0 1
+0.33477 0.294872 0.125641 0 1 0
+0.421835 0.213797 -0.371795 0 0 1
+0.0350847 -0.294872 -0.266738 0 1 0
+0.141109 -0.336216 0.139219 1 0 0
+-0.0142842 0.256282 0.347342 0 1 0
+0.0483133 -0.145765 -0.333333 0 0 1
+0.5 -0.276255 0.0104372 1 0 0
+-0.394001 0.371795 0.189006 0 1 0
+-0.154972 -0.371795 0.138344 0 1 0
+0.5 -0.0398557 0.185071 1 0 0
+0.498728 -0.0704453 0.320513 0.680551 -0.0243721 0.732295
+-0.186754 -0.0451817 0.320513 0 0 1
+-0.27376 -0.371795 -0.197779 0 1 0
+-0.367682 0.275067 -0.371795 0 0 1
+-0.5 0.0429985 0.168301 1 0 0
+-0.27622 -0.371795 -0.0938613 0 1 0
+0.0241674 -0.161583 -0.333333 0 0 1
+-0.28933 -0.371795 -0.14823 0 1 0
+0.215534 -0.371795 -0.188935 0 1 0
+-0.141154 -0.352876 -0.289964 1 0 0
+-0.0839568 -0.276972 -0.371795 0 0 1
+0.448718 -0.314213 0.0401696 1 0 0
+0.0655331 0.371795 0.197292 0 1 0
+-0.5 -0.121146 -0.122168 1 0 0
+-0.147755 -0.302488 -0.371795 -0.152765 -0.0395795 0.98747
+-0.194412 -0.371795 -0.247626 0 1 0
+0.235717 0.294872 -0.242611 0 1 0
+-0.5 0.166904 0.203891 1 0 0
+-0.365811 0.371795 0.301324 0 1 0
+0.228035 -0.200746 0.371795 0 0 1
+-0.366368 0.355863 -0.371795 0 0 1
+0.335684 -0.371795 0.025574 0 1 0
+-0.5 0.181033 -0.0782666 1 0 0
+0.0469366 0.233444 0.371795 0 0 1
+-0.141154 -0.364212 -0.288881 0.999246 -0.0346956 -0.0174188
+-0.0461917 -0.294872 -0.12576 0 1 0
+0.100166 0.371795 -0.29489 0 1 0
+0.194562 0.294872 0.210663 0 1 0
+-0.366955 0.091464 -0.371795 0 0 1
+0.110545 -0.294872 0.219313 0 1 0
+0.482109 -0.294872 0.219698 0 1 0
+0.175912 -0.371795 -0.168843 0 1 0
+-0.257067 0.201599 -0.333333 0 0 1
+-0.352613 0.371795 0.300746 0 1 0
+-0.22358 -0.183186 0.371795 0 0 1
+-0.5 -0.0239691 -0.32821 1 0 0
+0.320513 -0.0379544 -0.362266 0.993996 0.0213455 0.107317
+0.018681 0.371795 0.0301425 0 1 0
+-0.25149 0.274244 -0.371795 0 0 1
+-0.326825 -0.180109 -0.371795 -0.0473057 -0.0180507 0.998717
+0.135866 0.371795 0.067275 0.366372 0.929186 -0.0488303
+0.0837388 -0.145828 0.320513 0 0 1
+-0.41442 0.371795 0.182924 0 1 0
+0.493276 -0.275906 -0.371795 -0.278655 0.181811 0.943025
+0.5 -0.167396 -0.319321 1 0 0
+-0.311961 -0.177758 0.331376 0.716569 0.692463 -0.0838039
+0.264288 -0.227762 -0.341704 -0.32348 0.936333 -0.136536
+-0.162776 -0.230897 -0.340267 -0.0135482 0.958161 -0.285908
+0.178522 -0.371795 0.212411 0 1 0
+0.5 -0.16884 0.16027 1 0 0
+0.5 -0.232576 0.238371 1 0 0
+0.5 0.168707 0.236621 1 0 0
+-0.272637 -0.011526 -0.317137 0.967177 0.254039 0.00577445
+-0.5 0.102062 0.0139431 1 0 0
+0.317581 -0.371795 0.0865086 0 1 0
+-0.448718 -0.367859 -0.285562 0.810423 0.578907 0.0898906
+-0.301497 -0.371795 -0.332026 0 1 0
+0.0558268 0.371795 -0.233457 0 1 0
+0.141109 -0.361677 -0.239182 1 0 0
+0.5 -0.133874 -0.0250153 1 0 0
+-0.232887 -0.0434044 -0.218376 0.0515097 0.998663 -0.00435362
+0.171526 0.26042 0.320513 0.115429 0.185482 0.975845
+-0.140834 0.371795 0.133253 0 1 0
+0.477295 0.294872 -0.309031 0 1 0
+-0.42724 -0.322925 0.320513 0 0 1
+-0.267011 -0.0239487 -0.122031 0.872022 0.48945 -0.00409324
+-0.0571924 -0.294872 0.0644935 0 1 0
+0.5 -0.288045 -0.0509304 0.962011 -0.270516 -0.0368189
+-0.238658 -0.371795 -0.24598 0 1 0
+0.5 0.15142 -0.297989 1 0 0
+0.141109 -0.320531 0.12999 1 0 0
+0.5 -0.0721057 0.160879 1 0 0
+0.137565 -0.164442 -0.333333 0 0 1
+-0.0746676 0.371795 -0.188478 0 1 0
+-0.198108 0.241912 -0.371795 0 0 1
+0.5 0.102474 0.2195 1 0 0
+0.5 0.136466 -0.00468426 1 0 0
+-0.5 0.164472 -0.0801522 1 0 0
+-0.202722 0.206271 0.371795 0 0 1
+0.5 0.141485 -0.287193 1 0 0
+-0.5 0.00162149 -0.337001 1 0 0
+0.0642183 -0.10393 -0.333333 0 0 1
+-0.263304 0.228025 -0.346336 -0.253038 0.967453 0.00259791
+0.320513 -0.0415267 -0.334235 0.292252 0.0105131 0.956283
+-0.280379 -0.316101 -0.371795 0 0 1
+0.213815 -0.28061 -0.371795 0 0 1
+0.276747 -0.371795 -0.208411 0 1 0
+-0.093333 0.182079 0.344278 -0.475935 0.879481 0
+0.5 -0.0531315 0.0778526 1 0 0
+-0.421659 -0.0780085 -0.371795 0 0 1
+0.0722418 0.371795 -0.159345 0 1 0
+0.395632 -0.371795 0.0987946 0 1 0
+-0.5 0.0601245 0.106574 1 0 0
+0.354502 0.138028 0.320513 0.00129862 0.0015724 0.999998
+-0.384399 -0.0868864 -0.371795 0 0 1
+0.266378 -0.371795 -0.170901 0 1 0
+-0.396279 -0.293331 0.320513 0 0 1
+0.497511 0.294872 -0.184967 0.569931 0.816956 -0.0881036
+-0.118284 0.230897 -0.359463 0 1 0
+-0.0100846 -0.00922482 0.320513 0 0 1
+0.5 -0.205911 -0.249247 1 0 0
+-0.5 0.3604 0.0662654 1 0 0
+0.378732 0.294872 0.253442 0 1 0
+-0.131336 0.0229952 0.320513 0 0 1
+0.319777 -0.35931 -0.371795 0 0 1
+-0.5 0.213059 -0.131292 1 0 0
+-0.5 0.359756 0.089677 1 0 0
+0.477156 -0.212595 -0.371795 0 0 1
+0.5 0.29276 -0.13362 0.635054 0.751236 -0.179865
+0.35994 0.294872 0.0474835 0 1 0
+0.358403 0.294872 0.25205 0 1 0
+-0.398992 -0.371795 -0.272107 0 1 0
+0.273847 -0.371795 -0.308651 0 1 0
+-0.21271 0.371795 0.129673 0 1 0
+-0.0344188 0.371795 0.300991 0 1 0
+0.135679 0.371795 0.211318 0.341471 0.939885 0.00363827
+0.412414 -0.371795 -0.283591 0 1 0
+-0.242367 -0.210862 0.371795 0 0 1
+0.372818 0.245668 0.320513 0 0 1
+0.5 0.0959496 -0.146446 1 0 0
+0.156666 0.0503405 -0.333333 0 0 1
+-0.256389 -0.0230295 0.371795 0 0 1
+0.00463083 0.107548 0.320513 0 0 1
+0.0471306 -0.0624335 -0.333333 0 0 1
+0.0577936 0.371795 -0.22542 0 1 0
+0.448718 -0.301197 -0.11082 0.934341 -0.356294 -0.00788566
+-0.482804 -0.120668 0.320513 0 0 1
+0.247633 0.139732 -0.333333 0 0 1
+-0.442278 0.371795 0.26368 0 1 0
+-0.153034 0.135784 0.329724 0.748901 -0.656307 0.0916984
+0.160961 -0.170209 0.371795 0 0 1
+-0.188349 -0.00946216 -0.293472 0.973593 -0.228277 -0.00240597
+-0.5 0.141445 0.235683 1 0 0
+-0.141154 -0.299363 0.0172058 0.941837 -0.33581 0.0132397
+-0.5 -0.0847784 -0.181961 1 0 0
+-0.329743 -0.0284266 -0.371795 -0.125099 0.0269506 0.991778
+0.5 -0.249934 0.285848 1 0 0
+-0.5 -0.0884634 0.129037 1 0 0
+-0.0325966 0.371795 0.223506 0 1 0
+0.458261 0.294872 0.0750105 0 1 0
+0.253311 -0.0386502 0.371795 0 0 1
+0.130927 0.371795 -0.267247 0.0999865 0.9946 0.0278062
+0.263026 -0.0207328 -0.0232907 0.843273 -0.537485 0
+0.258939 -0.0260159 -0.0441014 0.779098 -0.626902 0
+-0.352948 -0.356786 0.320513 0 0 1
+0.334304 -0.200858 0.320513 0 0 1
+-0.200699 -0.0313401 -0.18689 -0.669305 0.742747 -0.018923
+0.0484736 -0.294872 -0.177713 0 1 0
+-0.107884 0.371795 -0.350034 0 1 0
+0.0621152 0.23825 -0.371795 -0.0384062 0.144968 0.988691
+0.386419 0.294872 -0.356501 0 1 0
+-0.475981 0.158008 -0.371795 0 0 1
+0.5 0.0637125 -0.0476525 1 0 0
+0.139977 -0.294872 0.303166 0.813296 0.453571 -0.36445
+0.5 0.112848 -0.0737678 1 0 0
+0.0305284 -0.288043 0.320513 -0.0790469 -0.124965 0.989007
+0.18258 -0.349529 0.320513 0 0 1
+-0.0632688 0.371795 -0.183317 0 1 0
+-0.458654 0.371795 -0.231817 0 1 0
+-0.187722 0.00619862 -0.113574 0.982693 0.185009 -0.00930552
+0.143718 0.261707 -0.371795 0 0 1
+-0.0438551 -0.106584 -0.333333 0 0 1
+-0.141154 -0.313992 -0.266877 1 0 0
+-0.0953035 -0.166918 0.320513 0 0 1
+0.0353761 0.371795 0.109215 0 1 0
+0.381987 0.119426 0.320513 0 0 1
+-0.420003 0.371795 0.145005 0 1 0
+0.161217 -0.253921 0.355719 -0.0847122 0.996389 0.00577722
+-0.5 0.162726 -0.0941509 1 0 0
+-0.163022 -0.0546094 0.320513 0 0 1
+-0.5 0.0209003 -0.311008 1 0 0
+0.497196 -0.105024 -0.371795 -0.519181 -0.0532119 0.853006
+0.0321319 0.371795 0.214259 0 1 0
+-0.0387518 0.371795 0.156879 0 1 0
+-0.154213 -0.371795 0.289803 0 1 0
+0.24222 -0.121852 0.371795 0 0 1
+-0.0727819 0.230897 -0.337159 -0.135499 0.735187 0.664183
+0.3254 -0.371795 -0.26156 0 1 0
+0.384079 0.294872 -0.160423 0 1 0
+-0.5 0.341715 0.224592 1 0 0
+0.0467694 -0.113652 0.320513 0 0 1
+0.292598 -0.332034 -0.371795 0 0 1
+0.454345 0.294872 0.193611 0 1 0
+-0.153652 -0.371795 -0.332798 0 1 0
+0.161459 0.126633 0.360736 0.773738 0.633293 -0.0164144
+-0.141861 -0.371795 -0.129207 -0.585454 0.807416 -0.0729586
+0.5 0.0969129 -0.248147 1 0 0
+0.0574667 0.371795 -0.194936 0 1 0
+0.200393 -0.371795 0.319755 -0.0405753 0.911186 -0.409993
+0.450685 -0.271002 0.320513 0 0 1
+0.340719 0.0747241 0.371795 0 0 1
+-0.266423 -0.371795 0.011272 0 1 0
+0.434048 -0.168304 0.320513 0 0 1
+-0.448718 -0.319631 0.0537141 1 0 0
+-0.0494618 -0.294872 -0.312371 0 1 0
+0.00470417 -0.0874617 -0.333333 0 0 1
+0.141026 0.352365 -0.193271 1 0 0
+-0.360169 -0.371795 -0.152641 0 1 0
+-0.5 -0.0568712 0.145437 1 0 0
+-0.0693046 -0.0945683 -0.333333 0 0 1
+0.254536 -0.0301324 -0.197491 -0.590835 0.806724 0.0105129
+0.206939 -0.371795 0.296688 0 1 0
+-0.396469 0.364244 0.320513 0.0662033 0.318381 0.945648
+-0.397658 -0.371795 -0.186118 0 1 0
+-0.5 0.304042 -0.291207 1 0 0
+-0.00301128 -0.204555 0.365733 0.00882903 0.920714 0.390139
+-0.0773696 -0.294872 0.0979773 0 1 0
+-0.0015323 0.256282 0.340721 0 1 0
+-0.5 0.351236 -0.0245435 1 0 0
+-0.5 -0.125503 -0.169257 1 0 0
+0.140879 0.2016 -0.333333 0 0 1
+-0.220345 0.371795 0.0432662 0 1 0
+-0.113535 -0.294872 -0.0232561 0 1 0
+-0.169543 0.371795 -0.171743 0 1 0
+0.223501 0.037719 -0.102007 -0.209104 0.977835 -0.0106719
+-0.5 0.031175 -0.221882 1 0 0
+-0.202741 0.371795 0.0635854 0 1 0
+-0.5 -0.227565 -0.176159 1 0 0
+0.5 -0.133279 -0.227158 1 0 0
+-0.407105 -0.166367 -0.371795 0 0 1
+0.5 -0.246373 -0.197053 1 0 0
+0.365639 -0.371795 0.0129897 0 1 0
+-0.382792 0.0237037 0.326369 0.983492 -0.0657761 -0.168572
+0.117502 0.371795 -0.0579345 0 1 0
+-0.487096 -0.0660914 -0.371795 0 0 1
+0.0550029 0.200746 -0.333333 0 0 1
+-0.0610222 -0.294872 0.197174 0 1 0
+0.141026 0.307718 0.137465 1 0 0
+0.331551 -0.357505 0.320513 0 0 1
+-0.5 -0.148728 -0.273034 1 0 0
+0.101179 0.0877434 0.320513 0 0 1
+0.352084 -0.167185 -0.371795 0 0 1
+0.138648 0.371795 -0.125038 0.560756 0.827924 -0.00973938
+-0.103723 0.371795 -0.333196 0 1 0
+-0.257352 -0.371795 -0.319456 0 1 0
+0.154772 0.254382 0.334874 0.0713662 0.99745 0
+0.158645 -0.371795 0.264169 0 1 0
+0.5 0.232556 -0.325912 1 0 0
+-0.448718 -0.310216 0.00712143 1 0 0
+-0.22545 -0.296296 -0.371795 0 0 1
+-0.0192373 -0.294872 -0.278556 0 1 0
+-0.0728695 -0.294872 0.112598 0 1 0
+0.141026 0.351204 0.214303 1 0 0
+0.5 -0.0282285 -0.271643 1 0 0
+-0.398827 0.0110003 0.320513 0 0 1
+0.320364 0.131376 0.371795 0 0 1
+0.0449501 -0.123473 -0.333333 0 0 1
+0.466527 -0.195322 -0.371795 0 0 1
+0.0734324 0.354115 -0.371795 0 0 1
+0.141109 -0.360771 0.265137 0.997238 0.0742613 -0.00137498
+-0.400281 -0.371795 0.237297 0 1 0
+0.0298937 0.157343 -0.333333 0 0 1
+0.267052 -0.0126299 -0.0613913 0.942694 -0.333137 -0.0186738
+0.15229 0.294872 -0.18532 0 1 0
+-0.100056 0.371795 0.0770543 0 1 0
+-0.191511 -0.0849494 -0.333333 0 0 1
+-0.471933 -0.223431 0.320513 0 0 1
+0.339671 0.294872 0.124456 0 1 0
+0.324042 0.294872 -0.331787 0 1 0
+0.0914234 0.371795 -0.267774 0 1 0
+0.273554 -0.126395 0.371795 0 0 1
+-0.5 -0.119251 0.218927 1 0 0
+0.0925728 0.0563367 0.320513 0 0 1
+-0.175405 -0.346778 0.320513 0 0 1
+0.211074 -0.371795 -0.0438066 0 1 0
+-0.287975 0.0133621 0.371795 0 0 1
+-0.0269101 0.138785 0.320513 0 0 1
+-0.414513 -0.220623 -0.371795 0 0 1
+-0.428462 0.0585006 0.320513 0 0 1
+-0.0776976 0.371795 0.000404381 0 1 0
+-0.141154 -0.297368 -0.0324561 0.906455 -0.416731 0.0683676
+-0.332407 -0.153779 0.337403 0.800544 0.599275 0
+-0.0577011 -0.294872 -0.228235 0 1 0
+-0.379722 0.371795 -0.299472 0 1 0
+0.478661 -0.294872 0.261796 0 1 0
+0.0266699 -0.223758 0.371795 0 0 1
+0.5 0.0648295 0.18089 1 0 0
+0.393228 0.0116178 0.320513 0 0 1
+-0.248404 -0.371795 0.283752 0 1 0
+0.222182 -0.371795 -0.33114 0 1 0
+0.415408 -0.167366 0.320513 0 0 1
+-0.30093 -0.190965 0.320513 -0.418148 -0.466486 0.77945
+0.148217 0.0227152 0.320513 0 0 1
+0.214513 0.294872 0.145976 0 1 0
+0.5 0.22647 -0.287612 1 0 0
+0.270095 0.294872 -0.230122 0 1 0
+0.5 0.243453 0.0554282 1 0 0
+0.249297 -0.371795 -0.117364 0 1 0
+0.5 0.283242 -0.201126 1 0 0
+0.482475 0.294872 0.108097 0 1 0
+-0.24088 0.329877 0.320513 0 0 1
+-0.0148219 -0.204555 0.333598 0.0262767 0.99963 0.00698023
+-0.5 -0.0938486 -0.227499 1 0 0
+-0.353404 0.195099 0.320513 0 0 1
+-0.18781 0.00720179 -0.296115 0.976121 0.217225 0.0011456
+-0.378978 -0.0498088 0.328975 0.916982 0.284446 -0.279705
+-0.171698 0.371795 0.163834 0 1 0
+0.216702 0.294872 -0.259976 0 1 0
+-0.012337 0.353598 0.320513 0 0 1
+-0.305461 -0.0803698 0.371795 0 0 1
+-0.247991 0.0398824 -0.297724 -0.357115 0.934057 0.00236603
+0.141026 0.311493 0.0298815 1 0 0
+-0.419048 0.28477 -0.371795 0 0 1
+0.191182 -0.371795 -0.304702 0 1 0
+-0.355444 -0.371795 -0.357136 0 1 0
+-0.5 -0.124427 -0.204732 1 0 0
+0.0155648 -0.291597 -0.371795 -0.103131 0.305984 0.946434
+-0.199684 -0.371795 -0.0256725 0 1 0
+-0.5 0.34644 -0.0078482 1 0 0
+-0.5 -0.156211 0.0817324 1 0 0
+0.178629 0.078006 -0.333333 0 0 1
+-0.189529 -0.282485 -0.371795 0 0 1
+0.168366 0.294872 -0.240801 0 1 0
+-0.114528 0.371795 0.0261486 0 1 0
+-0.191992 0.281982 0.320513 0 0 1
+0.299557 -0.371795 -0.230034 0 1 0
+0.383782 0.0657637 0.320513 0.181767 0.127469 0.975045
+0.448718 -0.36907 -0.0682542 0.701987 -0.706028 -0.0934873
+-0.5 -0.0395038 0.0961095 1 0 0
+-0.205132 0.250282 -0.371795 0 0 1
+0.260152 -0.0248025 -0.0848702 0.770886 -0.636918 0.00834756
+0.182936 0.0236249 0.320513 0 0 1
+0.197619 0.0528895 0.337841 0.969399 0.245489 0
+0.482151 -0.294872 -0.281584 0 1 0
+0.240883 -0.371795 0.199671 0 1 0
+0.0437189 0.307793 0.320513 0 0 1
+-0.0177725 -0.294872 -0.255515 0 1 0
+0.242134 -0.29281 -0.371795 0 0 1
+-0.350833 -0.13123 -0.371795 0 0 1
+-0.173176 0.280953 -0.371795 0 0 1
+-0.331701 -0.154723 0.341316 0.800546 0.599271 0
+-0.490378 -0.294872 -0.119226 0.163478 0.974173 0.155759
+0.464332 0.0283676 -0.371795 0 0 1
+-0.0127642 0.261805 0.320513 -0.105392 0.178295 0.978317
+-0.5 0.324482 0.130502 1 0 0
+0.11544 -0.0279187 -0.333333 0 0 1
+0.185091 0.294872 0.250986 0 1 0
+0.485194 -0.294872 -0.150843 0 1 0
+-0.5 0.293628 -0.0432005 1 0 0
+0.186386 0.294872 0.192033 0 1 0
+-0.5 0.289239 0.304297 1 0 0
+0.498756 0.273532 0.320513 0.497414 -0.0154218 0.867376
+-0.0739674 0.371795 -0.156138 0 1 0
+-0.280793 -0.371795 0.18891 0 1 0
+-0.171594 0.371795 -0.13063 0 1 0
+0.317208 -0.119634 -0.333333 0.110796 -0.00461148 0.993832
+-0.476273 0.371795 -0.0816658 0 1 0
+-0.135462 -0.294872 -0.250275 -0.27881 0.959668 -0.0360998
+-0.471337 -0.294872 0.100105 0 1 0
+0.450149 -0.294872 -0.162283 -0.619549 0.784339 -0.0311715
+-0.198219 -0.371795 -0.295895 0 1 0
+0.141109 -0.341762 0.256055 1 0 0
+-0.0705324 0.371795 -0.318286 0 1 0
+0.269239 0.115151 0.371795 0 0 1
+-0.5 -0.225912 0.27727 1 0 0
+0.0441486 -0.0416747 0.320513 0 0 1
+0.448718 -0.345643 -0.0870104 1 0 0
+0.336168 0.294872 0.179501 0 1 0
+-0.425892 -0.237019 -0.371795 0 0 1
+0.262635 -0.371795 -0.214312 0 1 0
+0.141026 0.321204 -0.201743 1 0 0
+-0.5 -0.291416 -0.308361 0.795748 0.578325 0.179791
+0.307874 0.294872 -0.193736 0 1 0
+-0.237025 0.0594041 -0.333333 0 0 1
+-0.448718 -0.340251 -0.187522 1 0 0
+-0.0953742 -0.044723 0.320513 0 0 1
+0.0629383 0.109046 0.320513 0 0 1
+-0.060949 0.371795 0.0261967 0 1 0
+-0.5 0.126154 0.301801 1 0 0
+-0.5 -0.211092 -0.235424 1 0 0
+-0.5 -0.185184 -0.3262 1 0 0
+-0.171022 -0.334791 0.320513 0 0 1
+-0.448718 -0.361044 -0.349489 1 0 0
+0.5 0.0958586 0.154916 1 0 0
+0.00382389 0.271451 -0.371795 0 0 1
+-0.098219 0.371795 0.307424 0 1 0
+-0.307863 0.371795 0.0665261 0 1 0
+0.229686 -0.371795 0.0084832 0 1 0
+-0.316182 -0.250867 -0.371795 0 0 1
+-0.0643651 0.19914 -0.333333 0 0 1
+0.141026 0.35208 -0.123941 1 0 0
+0.369095 -0.231427 0.320513 0 0 1
+0.5 -0.225085 -0.228725 1 0 0
+-0.174219 0.143613 -0.333333 0 0 1
+-0.121863 0.371795 -0.330143 0 1 0
+0.152482 0.0398352 -0.333333 0 0 1
+0.276417 0.294872 0.0893027 0 1 0
+-0.293679 0.371795 -0.323682 0 1 0
+0.439199 0.294872 0.21609 0 1 0
+-0.275998 -0.371795 -0.305528 0 1 0
+0.134577 0.371795 0.0939421 0.264386 0.960301 -0.0890084
+-0.133862 -0.290107 -0.371795 -0.01119 0.0724646 0.997308
+0.372197 0.0773214 0.341646 0.9442 0.329358 -0.0031442
+0.248063 -0.371795 0.0762628 0 1 0
+-0.434218 -0.116958 -0.371795 0 0 1
+0.203898 -0.00418034 0.320513 -0.606712 0.0730106 0.791562
+0.492968 0.294872 -0.284307 0.297089 0.947191 -0.120692
+-0.440052 0.237776 0.320513 0 0 1
+0.0204117 -0.294872 -0.0495409 0 1 0
+0.472667 0.170595 0.320513 0 0 1
+0.0562157 0.337328 0.320513 0 0 1
+-0.0902208 -0.253125 0.371795 0.253595 -0.42217 0.870323
+-0.315013 -0.131786 0.371795 0 0 1
+-0.271673 -0.0150314 -0.275623 0.930363 0.366432 -0.012342
+-0.351912 -0.123706 0.365278 0.845854 0.469457 -0.253261
+-0.0880495 0.0358448 -0.333333 0 0 1
+-0.5 -0.00504303 -0.351942 1 0 0
+0.225455 -0.236559 0.35598 -0.349483 0.936943 0
+0.46406 0.137609 0.320513 0 0 1
+-0.16179 0.352555 -0.371795 0 0 1
+0.5 0.136802 -0.231013 1 0 0
+-0.218811 0.371795 -0.156234 0 1 0
+0.112887 -0.294872 0.139578 0 1 0
+0.269019 0.00241477 -0.0988656 0.999576 0.0288402 -0.00397908
+-0.141154 -0.363532 -0.285157 1 0 0
+0.0138762 0.0254579 -0.333333 0 0 1
+-0.153136 -0.180853 0.371795 0 0 1
+-0.300547 -0.173231 -0.333333 0 0 1
+-0.5 0.0790004 0.179707 1 0 0
+-0.246165 0.371795 0.0340737 0 1 0
+-0.393069 -0.181217 -0.371795 0 0 1
+-0.273618 -0.252333 0.320513 0 0 1
+0.484411 0.145371 -0.371795 0 0 1
+0.0922967 -0.294872 -0.221219 0 1 0
+-0.189123 0.0123496 -0.056563 0.973064 0.230519 -0.0026869
+0.421319 0.294872 -0.11274 0 1 0
+-0.5 0.351896 -0.367293 0.92369 0.126509 0.361653
+-0.210709 -0.038559 -0.0893879 -0.451167 0.892296 -0.0159789
+0.5 0.195058 0.264248 1 0 0
+0.5 -0.213554 -0.0541496 1 0 0
+0.0386128 -0.294872 -0.101899 0 1 0
+-0.0163223 0.325259 0.320513 0 0 1
+0.412401 -0.371795 0.0906987 0 1 0
+0.407392 -0.371795 0.151439 0 1 0
+0.405494 -0.371795 0.247093 0 1 0
+0.265379 -0.275184 -0.371795 0 0 1
+-0.274758 0.307623 0.320513 0 0 1
+0.486272 0.0839729 -0.371795 0 0 1
+0.448718 -0.297905 -0.318589 0.898049 -0.438964 -0.0285948
+-0.188972 -0.371795 -0.0320473 0 1 0
+0.422648 0.294872 -0.121989 0 1 0
+0.129632 0.0502743 0.320513 0 0 1
+0.5 -0.0886306 0.144932 1 0 0
+-0.456994 0.371795 -0.262285 0 1 0
+-0.040403 0.371795 0.224412 0 1 0
+0.0126487 -0.0815166 0.320513 0 0 1
+-0.5 -0.25324 -0.29579 1 0 0
+-0.254912 0.371795 -0.332691 0 1 0
+0.162017 0.294872 0.213014 0 1 0
+0.436351 0.294872 -0.296129 0 1 0
+-0.448718 -0.299311 -0.162792 0.689122 0.724645 0
+0.5 -0.219807 0.0265086 1 0 0
+0.155441 0.294872 -0.0800594 0 1 0
+-0.381407 -0.0503003 -0.371795 0 0 1
+-0.115877 0.000214389 -0.333333 0 0 1
+0.5 0.231004 0.296067 1 0 0
+0.316542 0.294872 0.219722 0 1 0
+0.0927504 0.371795 -0.195484 0 1 0
+0.5 -0.143661 -0.130292 1 0 0
+-0.5 -0.00534718 -0.148226 1 0 0
+-0.169568 -0.180718 -0.333333 0 0 1
+-0.5 0.118658 -0.13591 1 0 0
+0.206621 -0.371795 -0.143939 0 1 0
+-0.324655 -0.266231 0.320513 0 0 1
+0.16834 0.288906 0.320513 -0.101448 0.464531 0.879727
+0.5 0.0122512 -0.232194 1 0 0
+-0.44384 0.354216 -0.371795 0 0 1
+-0.204894 -0.0348927 -0.0690091 -0.61328 0.788071 -0.0532218
+-0.163606 0.371795 0.21516 0 1 0
+-0.452004 -0.172355 -0.371795 0 0 1
+-0.192328 -0.129858 -0.333333 0 0 1
+-0.107599 -0.294872 0.312367 0.0017818 0.999599 -0.0282524
+0.0408201 -0.294872 -0.257898 0 1 0
+0.0619395 0.0371756 0.320513 0 0 1
+-0.337115 0.147491 0.347614 0.800544 -0.599274 0
+0.487761 0.294872 -0.249744 0 1 0
+-0.437144 0.0888427 -0.371795 0 0 1
+-0.5 0.184543 0.0917305 1 0 0
+0.141109 -0.347345 -0.0422168 1 0 0
+0.5 0.0497515 -0.0938515 1 0 0
+0.160499 0.147814 0.371795 0 0 1
+0.0475497 -0.153952 -0.333333 0 0 1
+-0.0993802 -0.140641 0.320513 0 0 1
+-0.5 0.148673 0.226248 1 0 0
+0.208564 0.20889 0.371795 0 0 1
+0.105681 -0.222266 -0.333333 -0.0591891 -0.197853 0.978443
+-0.266545 -0.360408 -0.371795 0 0 1
+0.5 0.260471 -0.161229 1 0 0
+-0.262898 0.371795 -0.182888 0 1 0
+-0.144918 -0.255086 0.355896 0.071469 0.997443 8.964e-005
+-0.349133 0.240898 -0.371795 0 0 1
+0.43189 -0.371795 -0.0626081 0 1 0
+-0.0297232 -0.240717 -0.371795 0.00783955 -0.0399846 0.99917
+0.194586 0.0130014 -0.00555775 0.915617 -0.362982 -0.172889
+-0.113179 -0.203942 -0.333333 0 0 1
+0.448718 -0.330043 -0.202979 1 0 0
+-0.158349 0.321552 -0.371795 0 0 1
+0.166463 0.253285 0.330998 0.176925 0.984215 -0.0043214
+0.421206 -0.371795 0.163624 0 1 0
+0.395056 0.294872 0.236155 0 1 0
+-0.254229 -0.335652 -0.371795 0 0 1
+0.0804281 0.329466 -0.371795 0 0 1
+-0.5 0.355231 0.17933 1 0 0
+0.5 0.14045 -0.348465 1 0 0
+0.00213495 0.371795 -0.16279 0 1 0
+0.0969803 0.319549 0.320513 0 0 1
+-0.169474 0.371795 -0.136739 0 1 0
+0.106764 -0.174811 0.34775 -0.492347 0.870305 0.0127697
+0.17734 -0.115601 0.371795 -0.116761 0.07513 0.990314
+0.356916 0.294872 0.143632 0 1 0
+0.373825 -0.371795 -0.190219 0 1 0
+0.488068 -0.0670133 -0.371795 -0.0746089 -0.00142881 0.997212
+0.5 -0.0933898 0.229353 1 0 0
+-0.371795 0.0783986 0.356791 0.942913 -0.333029 -0.00254238
+0.28606 0.294872 -0.193951 0 1 0
+-0.413812 -0.153816 -0.371795 0 0 1
+0.31215 -0.371795 -0.304253 0 1 0
+0.263882 -0.17358 -0.333333 0 0 1
+-0.348737 0.371795 0.250276 0 1 0
+-0.120186 0.0909701 0.320513 0 0 1
+0.257362 0.294872 -0.269375 0 1 0
+0.141026 0.31312 0.228016 1 0 0
+-0.260819 0.371795 -0.333174 0 1 0
+0.205746 -0.158117 -0.333333 0 0 1
+-0.000294837 0.329092 -0.371795 0 0 1
+0.402138 0.294872 0.299856 0 1 0
+0.363438 0.100806 0.364272 0.929996 0.366574 0.0270242
+0.448718 -0.303817 0.131104 0.978126 -0.206126 0.0279493
+0.093473 0.371795 0.0641158 0 1 0
+-0.397168 0.093408 -0.371795 0 0 1
+0.386231 0.176038 0.320513 0 0 1
+0.154424 0.294872 -0.352835 0 1 0
+0.5 -0.169317 -0.052113 1 0 0
+0.254973 0.0298268 -0.315024 0.629837 0.776451 0.0207449
+0.246953 -0.0709065 0.371795 0 0 1
+-0.136023 0.371795 0.25983 0 1 0
+-0.444633 0.371795 -0.0111126 0 1 0
+0.0493307 0.371795 0.097494 0 1 0
+-0.181596 0.335917 0.320513 0 0 1
+0.145151 0.0981981 0.320513 0 0 1
+0.239829 -0.0767163 0.371795 0 0 1
+-0.5 -0.0790295 -0.12195 1 0 0
+-0.403758 0.223495 -0.371795 0 0 1
+0.5 0.199178 -0.147579 1 0 0
+0.0411505 -0.0263425 -0.333333 0 0 1
+-0.375528 -0.158387 -0.371795 0 0 1
+-0.324268 0.222287 0.320513 0 0 1
+-0.162879 -0.370233 0.320513 -0.0229213 -0.437689 0.898834
+-0.455318 -0.294872 0.0364211 0.215178 0.975936 -0.0353093
+-0.5 0.266639 -0.102818 1 0 0
+0.5 -0.118905 -0.160057 1 0 0
+0.0841459 -0.294872 -0.216165 0 1 0
+0.5 0.051806 -0.158579 1 0 0
+0.365279 -0.371795 -0.17431 0 1 0
+0.0665802 0.0179163 0.320513 0 0 1
+0.126497 0.371795 0.127773 0 1 0
+-0.428223 -0.290786 -0.371795 0 0 1
+-0.124595 -0.294872 0.231693 0 1 0
+0.380149 0.294872 0.0338363 0 1 0
+-0.179563 0.196707 -0.333333 0 0 1
+0.5 -0.0773442 0.0584416 1 0 0
+0.319751 -0.162684 -0.343845 0.995008 -0.0997879 0.00127335
+0.448718 -0.303124 -0.0957747 0.964078 -0.265262 0.0138006
+0.243906 0.0361468 -0.0752464 0.328318 0.94449 -0.0120714
+-0.205315 -0.108214 0.371795 0 0 1
+-0.5 0.269718 -0.266869 1 0 0
+-0.5 -0.0623408 -0.176357 1 0 0
+0.135715 0.0423724 -0.333333 0 0 1
+-0.5 -0.0611686 0.0665155 1 0 0
+-0.203748 0.201279 -0.333333 0 0 1
+-0.267284 -0.023559 -0.2799 0.847385 0.530709 -0.0169249
+0.200593 -0.0461715 0.371795 0.709878 -0.236602 -0.663395
+-0.5 0.191738 -0.211281 1 0 0
+-0.494467 -0.186284 0.320513 -0.287217 -0.0214193 0.957626
+-0.449389 -0.167792 0.320513 0 0 1
+0.135294 0.0798088 0.320513 0 0 1
+0.419372 0.292768 -0.371795 -0.039604 0.807231 -0.588906
+0.0443793 0.1071 -0.333333 0 0 1
+-0.490266 0.148352 0.320513 -0.186081 0.0198169 0.982335
+-0.314863 -0.371795 0.179273 0 1 0
+-0.5 -0.0058465 0.182846 1 0 0
+0.135572 -0.108506 0.320513 0 0 1
+0.146657 0.142712 0.321827 0.664227 0.609672 -0.432554
+0.141109 -0.368028 -0.344894 0.941826 0.30602 -0.138977
+0.370171 0.294872 0.0665146 0 1 0
+-0.258151 0.371795 -0.0541953 0 1 0
+0.5 -0.246364 0.246666 1 0 0
+-0.456711 -0.108519 -0.371795 0 0 1
+-0.315544 0.371795 -0.0894804 0 1 0
+0.123926 0.245435 -0.371795 0 0 1
+0.437604 0.294872 0.168272 0 1 0
+-0.197425 0.0757017 -0.333333 0 0 1
+0.5 0.288235 0.267994 0.988028 0.143645 0.0562705
+0.5 0.135942 0.169893 1 0 0
+0.376944 -0.371795 -0.360802 0 1 0
+0.5 -0.0778433 -0.125562 1 0 0
+0.279217 -0.0108112 -0.333333 0 0 1
+0.194323 0.247297 0.320513 0.253779 0.626114 0.737277
+-0.145337 0.02723 -0.333333 0 0 1
+0.442423 0.140374 -0.371795 0 0 1
+0.121715 -0.294872 -0.135102 0 1 0
+-0.145914 0.371795 0.182798 0 1 0
+0.412022 0.294872 0.292605 0 1 0
+-0.0238958 -0.135086 0.320513 0 0 1
+-0.274396 -0.187252 0.371795 0 0 1
+0.15314 0.294872 0.16759 0 1 0
+0.5 -0.0494134 0.245346 1 0 0
+0.0264025 0.0608606 0.320513 0 0 1
+-0.128565 -0.294872 -0.357413 0 1 0
+0.222759 0.294872 0.185491 0 1 0
+0.00452614 -0.101494 0.320513 0 0 1
+0.448718 -0.297132 0.0906934 0.887143 -0.438299 -0.14447
+0.0513536 0.278892 -0.371795 0 0 1
+0.5 0.198158 0.217855 1 0 0
+-0.345026 0.241956 0.320513 0 0 1
+0.141109 -0.306854 -0.00785192 0.9992 0.0388932 0.00930798
+0.23357 -0.0158869 0.0134169 0.0649542 -0.507972 0.858921
+0.224133 -0.0378809 -0.151289 0.145924 0.988839 -0.0300489
+0.00157087 -0.294872 -0.176052 0 1 0
+-0.0501139 0.371795 0.191578 0 1 0
+0.454229 0.174205 0.320513 0 0 1
+-0.367013 0.371795 -0.365718 -0.00629627 0.95623 -0.29255
+0.104681 0.371795 0.138575 0 1 0
+-0.19612 -0.371795 0.277067 0 1 0
+-0.5 0.33532 0.20968 1 0 0
+-0.141154 -0.320695 0.108886 1 0 0
+-0.210071 0.0382615 -0.182516 0.415915 0.909388 -0.00530775
+0.108271 0.371795 -0.21244 0 1 0
+0.150095 -0.371795 -0.258805 0.0884705 0.99566 0.0288887
+-0.247652 0.371795 0.139173 0 1 0
+-0.199322 0.371795 -0.371194 -0.0321071 0.82542 -0.563605
+-0.0549146 0.297921 0.320513 0 0 1
+-0.378211 -0.184137 -0.371795 0 0 1
+0.5 -0.198777 -0.0624139 1 0 0
+0.298543 0.294872 0.0414984 0 1 0
+0.326288 0.294872 0.203932 0 1 0
+0.188595 -0.371795 0.239816 0 1 0
+-0.5 -0.155418 -0.0932705 1 0 0
+-0.247203 -0.05537 -0.333333 0 0 1
+0.268789 0.00505128 -0.130696 0.995418 0.0955407 0.00378799
+0.5 0.143283 -0.257863 1 0 0
+-0.131706 -0.156701 0.345283 0.614226 0.78913 0
+0.5 0.162241 -0.206618 1 0 0
+-0.363593 0.211345 -0.371795 0 0 1
+-0.496422 -0.0361229 0.320513 -0.393467 0.00166774 0.919337
+0.5 0.0149079 0.0154861 1 0 0
+-0.326717 0.371795 -0.0148498 0 1 0
+0.336795 -0.371795 -0.175226 0 1 0
+-0.5 0.144113 0.215734 1 0 0
+-0.48821 -0.0339501 0.320513 0 0 1
+-0.456258 -0.294872 0.284778 0.107343 0.994219 0.00239762
+-0.282232 -0.258767 -0.371795 0 0 1
+-0.5 -0.173019 0.0955041 1 0 0
+0.0606255 0.33626 -0.371795 0 0 1
+0.15866 -0.371795 -0.113895 0 1 0
+-0.119993 0.128997 -0.333333 0 0 1
+0.0405823 0.371795 0.0589395 0 1 0
+-0.423103 0.371795 -0.101239 0 1 0
+0.5 0.0640781 -0.247409 1 0 0
+-0.266257 0.0250251 -0.284481 0.827777 -0.561028 -0.00567248
+0.5 -0.179973 -0.0449035 1 0 0
+-0.180732 0.371795 0.0217775 0 1 0
+0.496996 0.294872 0.181212 0.51318 0.834468 0.200771
+0.0340084 0.334494 0.320513 0 0 1
+0.459898 -0.0879047 -0.371795 0 0 1
+-0.205197 -0.00071137 0.332938 0.999831 -0.0182706 0.00196614
+-0.124645 -0.294872 -0.0682131 0 1 0
+-0.5 0.00322664 -0.221528 1 0 0
+-0.5 -0.128644 -0.0910997 1 0 0
+0.247519 -0.0381383 0.371795 0 0 1
+-0.48991 -0.182823 0.320513 -0.112939 0.00867049 0.993564
+-0.359413 0.371795 -0.0287407 0 1 0
+-0.157166 0.371795 0.0382094 0 1 0
+-0.5 0.0763297 0.00592813 1 0 0
+-0.213865 0.00195189 0.371795 0.177288 -0.030391 0.98369
+0.419909 -0.371795 0.232198 0 1 0
+-0.5 -0.18115 -0.19748 1 0 0
+0.320513 -0.0618179 -0.364706 0.982245 0.0198256 0.186553
+-0.5 0.233199 0.26102 1 0 0
+0.136614 0.371795 -0.102006 0.345575 0.931553 -0.11308
+-0.297228 -0.179839 -0.333333 0 0 1
+-0.237179 0.371795 0.00092799 0 1 0
+0.319984 0.160015 -0.338883 0.964519 0.152481 0.21553
+0.435136 -0.371795 0.0853588 0 1 0
+-0.390455 0.33266 0.320513 0 0 1
+0.257335 0.294872 0.0496116 0 1 0
+-0.5 0.255559 0.177313 1 0 0
+-0.5 -0.0523481 0.0125908 1 0 0
+-0.370572 0.13759 -0.371795 0 0 1
+0.209384 0.294872 -0.0327469 0 1 0
+-0.5 -0.125146 -0.0630567 1 0 0
+0.18944 0.134579 0.371795 0 0 1
+0.142056 -0.153845 -0.333333 0 0 1
+0.0291046 -0.294872 0.114112 0 1 0
+0.5 0.140815 -0.0325637 1 0 0
+0.221387 -0.127102 0.371795 0 0 1
+0.24499 -0.167678 0.371795 0 0 1
+-0.477636 -0.184019 -0.371795 0 0 1
+0.332853 -0.0786566 0.371795 0 0 1
+0.368971 -0.371795 -0.211073 0 1 0
+-0.399799 0.371795 0.208197 0 1 0
+-0.5 -0.140467 0.146582 1 0 0
+0.332303 -0.101252 0.371795 0 0 1
+0.5 -0.240566 0.12869 1 0 0
+0.488611 0.294872 0.274943 0 1 0
+0.5 0.156982 -0.303936 1 0 0
+-0.0521262 0.18723 -0.333333 0 0 1
+-0.187486 -0.00350211 -0.0789742 0.993157 -0.116041 0.0131593
+0.263825 0.0195917 -0.274766 0.855618 0.517577 -0.00570229
+0.234389 -0.176716 -0.333333 0 0 1
+0.388197 0.294872 0.239732 0 1 0
+0.22478 -0.0029762 0.371795 0 0 1
+0.141026 0.303563 0.0677329 0.996327 0.0837579 0.0178283
+0.107161 0.256282 0.349684 0 1 0
+0.474448 0.294872 -0.0966692 0 1 0
+-0.0795475 -0.210575 0.371795 0 0 1
+-0.5 -0.191239 -0.364673 0.964536 -0.00178888 0.263947
+0.141026 0.341638 -0.0233985 1 0 0
+0.346214 -0.371795 -0.0318865 0 1 0
+0.0706648 -0.294872 0.0582051 0 1 0
+-0.247012 -0.371795 0.0473693 0 1 0
+0.195431 -0.278225 -0.371795 0 0 1
+-0.357323 0.371795 -0.272826 0 1 0
+-0.5 0.0749978 0.295366 1 0 0
+0.425779 0.294872 0.0172329 0 1 0
+0.384003 -0.236155 -0.371795 0 0 1
+-0.236656 0.371795 0.21562 0 1 0
+-0.486551 -0.0118349 0.320513 0 0 1
+0.0673756 0.371795 -0.0720584 0 1 0
+-0.19786 -0.0519376 0.336778 0.969405 0.245466 0
+-0.495546 -0.066557 0.320513 -0.28112 0.0856775 0.95584
+-0.326538 0.371795 0.177806 0 1 0
+0.0681856 -0.294872 0.203371 0 1 0
+0.377084 -0.0585163 0.334513 0.977147 -0.212564 0
+-0.5 -0.160835 -0.171681 1 0 0
+-0.272406 -0.0123845 -0.174219 0.957043 0.289837 -0.00798771
+0.5 -0.144093 -0.125293 1 0 0
+0.149481 -0.371795 0.131205 0.135397 0.989776 0.0448468
+-0.492395 -0.156912 -0.371795 0.224006 0.0292325 0.974149
+0.141026 0.331474 -0.199699 1 0 0
+0.221017 0.294872 0.0445501 0 1 0
+-0.448718 -0.297664 -0.183156 0.824542 0.555369 0.108151
+-0.5 -0.178386 -0.0866584 1 0 0
+0.448718 -0.362769 0.110969 0.99684 -0.0724323 0.0326111
+-0.119997 0.371795 -0.241303 0 1 0
+-0.117887 0.371795 -0.256333 0 1 0
+-0.3992 -0.0181431 0.320513 0 0 1
+0.0661228 0.371795 0.143215 0 1 0
+-0.187658 0.00546665 -0.17254 0.992908 0.118747 0.00577763
+0.247535 0.0344582 -0.0105371 0.419342 0.907023 0.0382145
+0.499042 0.294872 -0.365443 0.803459 0.593239 -0.0502203
+0.29057 0.173293 0.371795 0 0 1
+0.5 -0.134592 -0.197426 1 0 0
+-0.269824 -0.371795 0.310091 0 1 0
+0.339375 0.294872 0.01836 0 1 0
+-0.5 0.0164479 -0.00326641 1 0 0
+-0.5 -0.247539 0.147604 1 0 0
+0.489362 -0.294872 0.0330757 0 1 0
+0.041973 0.00953326 -0.333333 0 0 1
+-0.0320815 0.371795 0.0301995 0 1 0
+0.00351929 0.051057 0.320513 0 0 1
+0.10048 -0.294872 0.229932 0 1 0
+0.331675 0.294872 -0.159716 0 1 0
+-0.307382 -0.182337 0.368527 0.6127 0.642334 -0.460442
+-0.367393 -0.371795 -0.0450159 0 1 0
+0.101612 0.333178 0.320513 0 0 1
+0.384196 -0.0865612 -0.371795 0 0 1
+0.106265 0.371795 -0.371337 -0.0401166 0.896524 -0.441174
+-0.5 0.131332 -0.196874 1 0 0
+0.2199 0.0841411 -0.333333 0 0 1
+0.5 -0.224926 -0.086046 1 0 0
+0.240859 0.0369632 -0.0533235 0.273189 0.961883 -0.0121751
+0.307577 0.10262 -0.333333 0 0 1
+-0.141154 -0.350643 -0.301346 1 0 0
+0.5 0.219668 -0.215188 1 0 0
+0.5 -0.169162 -0.136648 1 0 0
+0.5 0.256725 -0.203296 1 0 0
+0.139474 0.0615546 -0.333333 0 0 1
+0.5 0.269567 0.00841624 1 0 0
+-0.5 -0.116954 -0.254971 1 0 0
+-0.141154 -0.346288 -0.185036 1 0 0
+0.5 -0.203561 0.0719523 1 0 0
+0.0940673 -0.294872 -0.238349 0 1 0
+-0.402205 -0.138519 -0.371795 0 0 1
+0.090048 -0.294872 -0.316819 0 1 0
+-0.447112 0.371795 0.100857 0 1 0
+0.348201 -0.194723 -0.371795 0 0 1
+0.5 0.111576 -0.226086 1 0 0
+-0.5 0.0211009 0.0311878 1 0 0
+-0.5 0.180878 -0.0611219 1 0 0
+-0.213263 0.0397498 -0.159415 0.369009 0.929425 0.0013695
+0.5 0.157137 0.170922 1 0 0
+-0.5 -0.122096 0.266362 1 0 0
+0.468136 0.294872 0.160674 0 1 0
+0.327106 0.294872 -0.334123 0 1 0
+0.0769995 -0.189839 0.328876 -0.352061 0.932665 0.0786699
+-0.141154 -0.336196 -0.246858 1 0 0
+-0.5 -0.000779866 -0.208307 1 0 0
+0.213971 0.00573005 0.371795 -0.034663 0.00358551 0.999393
+0.119316 -0.03109 0.320513 0 0 1
+-0.00734028 -0.176701 0.320513 0 0 1
+-0.273906 -0.00518031 -0.114181 0.988474 0.15121 0.00739153
+-0.448718 -0.357388 0.117919 1 0 0
+0.439823 -0.371795 -0.200658 -0.0680636 0.997637 -0.00931764
+0.195149 -0.371795 -0.0661264 0 1 0
+0.0947174 -0.18133 0.357093 -0.475925 0.879486 0
+-0.274324 -0.000405153 -0.269288 0.999712 -0.0239831 -0.00113238
+-0.5 0.233605 0.185602 1 0 0
+0.448718 -0.307359 0.0422721 1 0 0
+0.172963 0.294872 -0.150671 0 1 0
+0.307257 0.139439 -0.333333 0 0 1
+0.450725 -0.255604 -0.371795 0 0 1
+0.0314651 -0.294872 -0.32104 0 1 0
+-0.349014 0.371795 -0.272715 0 1 0
+0.5 0.103428 0.224677 1 0 0
+0.207526 -0.14207 0.371795 0 0 1
+-0.482578 -0.294872 -0.355368 0 1 0
+0.46217 0.294872 -0.0604061 0 1 0
+-0.5 -0.0201389 -0.15113 1 0 0
+0.5 -0.00120151 0.083684 1 0 0
+-0.272697 -0.211155 0.361883 0.612727 0.787245 -0.069358
+-0.10009 -0.294872 0.286899 0 1 0
+-0.5 -0.0509599 -0.370721 0.675601 -0.025757 0.736818
+0.138837 -0.230897 -0.370601 0.17791 -0.510195 0.841456
+0.141109 -0.311631 0.210979 1 0 0
+0.5 -0.22997 -0.126585 1 0 0
+-0.5 0.145262 -0.0570119 1 0 0
+-0.14116 -0.371795 0.21664 0.780472 -0.622146 0.0616216
+0.141026 0.367832 0.248888 0.964667 0.258243 -0.0522252
+-0.373165 0.0747268 0.368746 0.909247 -0.282642 -0.305587
+-0.157432 -0.371795 -0.0327469 0 1 0
+0.419402 0.294872 0.313343 0.0296531 0.993214 0.112456
+0.0228621 -0.294872 -0.304693 0 1 0
+0.170705 -0.371795 -0.0743697 0 1 0
+0.445999 0.294872 0.172985 0 1 0
+0.5 0.0788455 -0.189264 1 0 0
+-0.5 -0.118928 0.161256 1 0 0
+0.38388 -0.00848913 0.327499 0.989366 -0.101047 0.104611
+0.277162 0.185684 0.371795 0 0 1
+-0.5 -0.227101 -0.278018 1 0 0
+0.354778 0.0668662 0.371795 0 0 1
+-0.262149 0.371795 0.310117 0 1 0
+0.141026 0.36157 -0.293699 1 0 0
+-0.272145 0.371795 0.0479048 0 1 0
+-0.211809 -0.241649 0.342238 0.349446 0.936957 0
+-0.00454538 -0.294872 -0.0684634 0 1 0
+0.222773 -0.371795 -0.168024 0 1 0
+-0.186811 -0.371795 -0.0518108 0 1 0
+0.5 0.0339924 0.226295 1 0 0
+0.417662 -0.371795 -0.24667 0 1 0
+0.5 -0.0394924 -0.0718651 1 0 0
+0.199433 0.0868857 -0.333333 0 0 1
+-0.480505 -0.202729 0.320513 0 0 1
+-0.168508 0.176727 0.371795 0 0 1
+0.5 0.256974 -0.162627 1 0 0
+0.5 0.18573 0.200766 1 0 0
+-0.5 -0.19549 0.120219 1 0 0
+0.5 0.214397 0.0449171 1 0 0
+-0.410652 0.264133 -0.371795 0 0 1
+0.109751 -0.294872 0.0685527 0 1 0
+-0.317495 -0.371795 -0.00862621 0 1 0
+-0.5 0.360153 0.267978 1 0 0
+0.408429 0.113532 0.320513 0 0 1
+-0.349562 0.0435489 -0.371795 0 0 1
+0.214425 -0.085417 -0.333333 0 0 1
+0.5 0.191874 0.0136835 1 0 0
+0.409109 -0.371795 -0.268045 0 1 0
+-0.293094 -0.363636 -0.371795 0.00927451 0.0416296 0.99909
+-0.182769 0.0317786 -0.333333 0 0 1
+-0.5 -0.0303897 0.303599 1 0 0
+0.141109 -0.350534 0.101595 1 0 0
+0.5 0.210909 0.297099 1 0 0
+0.0322648 0.0524252 0.320513 0 0 1
+-0.158324 -0.238588 0.371795 0 0 1
+0.480098 -0.294872 0.245641 0 1 0
+-0.379861 0.130888 -0.371795 0 0 1
+-0.499745 -0.173974 0.320513 -0.691174 0.0560269 0.720514
+-0.377612 -0.371795 0.164048 0 1 0
+0.25002 -0.268796 0.320513 0 0 1
+0.309851 0.179868 0.353508 0.707102 0.707111 0
+-0.35251 0.371626 0.320513 0.0819239 0.544969 0.834444
+0.5 0.223206 0.189685 1 0 0
+-0.179423 0.0639005 -0.333333 0 0 1
+0.22334 0.037676 -0.237679 -0.226204 0.973998 0.0126505
+-0.340992 -0.285678 -0.371795 0 0 1
+-0.441111 0.371795 0.113341 0 1 0
+0.254157 -0.371795 -0.0808296 0 1 0
+-0.113865 0.336097 -0.371795 0 0 1
+-0.0145972 -0.271139 0.320513 0 0 1
+0.475459 0.294872 0.214558 0 1 0
+0.00893343 0.237566 -0.371795 -0.0161162 0.356502 0.934155
+0.5 -0.10101 -0.048782 1 0 0
+-0.145165 0.371795 -0.21022 0 1 0
+-0.382407 0.371795 -0.292316 0 1 0
+0.383907 -0.00810682 0.362902 0.996081 -0.0140537 0.087324
+0.0105962 0.371795 -0.0711409 0 1 0
+0.251157 -0.0937822 -0.333333 0 0 1
+0.272466 0.165689 0.371795 0 0 1
+-0.5 0.230976 -0.00388794 1 0 0
+0.460208 0.105764 -0.371795 0 0 1
+-0.332143 0.371795 -0.181999 0 1 0
+0.5 0.0335033 -0.198359 1 0 0
+0.5 0.260496 0.0768781 1 0 0
+0.5 -0.102433 0.210466 1 0 0
+-0.0156162 0.371795 0.0709198 0 1 0
+0.00604907 0.371795 -0.347202 0 1 0
+-0.0207998 -0.240967 0.371795 0 0 1
+0.19474 0.0579302 -0.333333 0 0 1
+-0.304948 0.251996 0.320513 0 0 1
+-0.191329 -0.371795 -0.21378 0 1 0
+-0.141154 -0.343211 0.18243 1 0 0
+0.318909 0.0837951 -0.333333 0.728431 -0.0668441 0.681851
+-0.494564 0.183971 0.320513 -0.325101 0.0738117 0.942794
+0.448718 -0.300609 0.0980142 0.994737 -0.102447 0.00184094
+-0.0854115 -0.294872 0.172848 0 1 0
+-0.141154 -0.346505 0.250583 1 0 0
+0.264415 -0.0185086 -0.0146393 0.859976 -0.510309 0.0051067
+-0.239591 0.24383 0.320513 0 0 1
+-0.026381 -0.263771 0.320513 -0.0482817 -0.17619 0.983171
+-0.350558 -0.103694 0.371795 -0.0875018 -0.0210707 0.995942
+-0.0111788 -0.0707765 -0.333333 0 0 1
+-0.247318 -0.355594 -0.371795 0 0 1
+0.192728 0.00479857 -0.277383 0.992125 -0.123988 -0.0177304
+-0.5 -0.106082 -0.16242 1 0 0
+0.0566171 0.371795 -0.31557 0 1 0
+0.0922887 0.371795 -0.0952641 0 1 0
+-0.491099 0.00619432 0.320513 0 0 1
+-0.486271 0.371795 -0.354624 0 1 0
+0.382486 -0.0279781 0.350153 0.9971 -0.0760926 0.00149257
+-0.14789 0.371795 0.086947 0 1 0
+-0.36522 0.371795 -0.183377 0 1 0
+-0.384255 0.145837 -0.371795 0 0 1
+-0.475473 -0.294872 0.0198297 0 1 0
+-0.0135233 0.371795 -0.25584 0 1 0
+0.283487 -0.371795 -0.282377 0 1 0
+0.5 0.221655 0.171908 1 0 0
+0.355662 0.160518 -0.371795 0 0 1
+0.448718 -0.335957 0.217851 1 0 0
+-0.5 0.365815 -0.0989692 0.992199 -0.124647 0.00212427
+0.188442 -0.371795 0.0706046 0 1 0
+0.5 0.20347 -0.123777 1 0 0
+-0.5 -0.105602 -0.0682008 1 0 0
+0.231298 -0.0384152 -0.142589 -0.0383272 0.999247 0.00599174
+-0.255711 -0.371795 -0.273908 0 1 0
+0.5 -0.222172 -0.0918015 1 0 0
+-0.20531 -0.148318 -0.333333 0 0 1
+0.5 -0.220207 0.0120247 1 0 0
+0.5 0.248387 -0.163378 1 0 0
+-0.268306 0.0220993 -0.274657 0.841483 -0.540259 0.00512244
+-0.127084 -0.193875 -0.333333 0 0 1
+-0.213887 -0.0551462 -0.333333 0 0 1
+0.223318 -0.230897 -0.355624 0 1 0
+0.195307 -0.014612 -0.0141068 0.911188 0.411987 0.00172347
+-0.403455 -0.371795 0.170401 0 1 0
+-0.112533 -0.171626 0.338762 0.537434 0.843306 0
+0.5 -0.229205 -0.275109 1 0 0
+0.0207022 0.256282 0.321979 -0.03113 0.891694 0.451567
+-0.5 -0.0737957 -0.125809 1 0 0
+-0.140932 -0.148931 0.341299 0.699197 0.714913 0.0047343
+-0.5 0.051213 0.111609 1 0 0
+0.0823417 0.371795 -0.189471 0 1 0
+0.351686 0.294872 0.108141 0 1 0
+0.348937 -0.371795 -0.0330377 0 1 0
+-0.5 -0.0101876 -0.0338448 1 0 0
+0.0783539 -0.0633134 -0.333333 0 0 1
+0.199599 0.294872 -0.214631 0 1 0
+-0.32118 0.371795 -0.10082 0 1 0
+0.141026 0.338678 -0.157065 1 0 0
+-0.0218265 0.175591 -0.333333 0 0 1
+-0.321769 0.371795 -0.242912 0 1 0
+0.333633 -0.288397 0.320513 0 0 1
+0.392588 0.0827836 -0.371795 0 0 1
+0.228687 0.230897 -0.333873 -0.0315401 0.477006 0.878334
+-0.187659 -0.00547812 -0.288101 0.992644 -0.120958 -0.0052235
+0.388621 0.294872 0.221714 0 1 0
+0.5 -0.261333 -0.106901 1 0 0
+-0.302607 0.371795 0.0865385 0 1 0
+-0.493522 -0.0209995 0.320513 -0.31899 -0.0481156 0.946536
+0.333876 0.294872 -0.352339 0 1 0
+-0.5 -0.181407 0.214854 1 0 0
+-0.10747 0.027205 -0.333333 0 0 1
+-0.135456 0.0713094 -0.333333 0 0 1
+0.5 0.127262 0.0880321 1 0 0
+-0.217471 0.00379315 -0.0174046 0.462031 0.105241 0.880598
+-0.402875 -0.371795 -0.167109 0 1 0
+0.317187 -0.371795 0.316097 0.112184 0.910805 -0.397302
+-0.5 0.0298947 0.166117 1 0 0
+0.446722 -0.326225 0.320513 0.294939 -0.00250812 0.955513
+-0.230275 0.371795 0.0587282 0 1 0
+-0.5 -0.0822473 -0.0718053 1 0 0
+0.213502 -0.371795 0.262117 0 1 0
+0.181465 0.294872 0.289417 0 1 0
+0.158165 -0.210136 -0.333333 0 0 1
+-0.189372 0.0132802 -0.216689 0.962858 0.269044 -0.0228155
+0.255217 0.0296556 -0.145201 0.643743 0.765039 -0.0176163
+0.5 0.0550699 -0.0947597 1 0 0
+0.203878 0.0272944 -0.237289 -0.691462 0.722413 0
+0.190682 -0.371795 0.0810389 0 1 0
+-0.398738 0.371795 -0.340751 0 1 0
+0.417822 0.294872 0.0856456 0 1 0
+-0.28798 0.115182 -0.333333 0 0 1
+0.0242859 -0.294872 -0.152585 0 1 0
+-0.183713 0.132397 0.371795 0 0 1
+0.372198 -0.265855 0.320513 0 0 1
+0.194251 0.294872 -0.259841 0 1 0
+-0.258079 0.371795 -0.281124 0 1 0
+0.0647544 -0.0370815 0.320513 0 0 1
+0.152269 0.152747 -0.333333 0 0 1
+-0.23812 -0.0429467 -0.326111 0.114639 0.975006 -0.190316
+0.429998 0.183217 0.320513 0 0 1
+0.5 -0.0797828 -0.222023 1 0 0
+-0.196674 0.371795 -0.0472351 0 1 0
+0.250933 -0.371795 -0.201718 0 1 0
+-0.141154 -0.3454 0.115716 1 0 0
+0.219971 0.243228 0.320513 0.221299 0.651031 0.726075
+0.164186 0.294872 -0.0280566 0 1 0
+-0.090321 -0.294872 -0.162277 0 1 0
+0.5 -0.014497 0.0283581 1 0 0
+0.377991 -0.371795 -0.0870762 0 1 0
+0.0429293 0.134176 0.320513 0 0 1
+0.5 0.243067 -0.316453 1 0 0
+0.141026 0.333122 -0.228977 1 0 0
+-0.164262 0.197505 0.371795 0 0 1
+0.5 0.199781 0.244955 1 0 0
+0.434123 -0.250354 0.320513 0 0 1
+-0.274088 0.371795 -0.109604 0 1 0
+0.133146 -0.155581 0.366268 -0.602842 0.760846 0.240196
+0.357714 0.294872 0.223668 0 1 0
+-0.5 0.172318 -0.194668 1 0 0
+0.483564 0.212559 0.320513 0 0 1
+-0.297406 -0.371795 0.0846204 0 1 0
+0.0103708 0.371795 0.280767 0 1 0
+0.364917 0.1779 -0.371795 0 0 1
+0.5 0.019855 0.00543154 1 0 0
+-0.10888 0.173666 0.365252 -0.523287 0.842215 -0.129787
+0.499236 -0.294872 0.115629 -0.640202 0.768206 -0.000745309
+0.270549 -0.018934 0.371795 0 0 1
+-0.5 0.34178 -0.0210737 1 0 0
+-0.191841 0.371795 0.191782 0 1 0
+-0.5 0.29421 0.0506146 1 0 0
+-0.151612 0.371795 0.211557 0 1 0
+0.307393 0.196455 -0.355933 0.817351 0.576139 -0.00110609
+-0.122522 0.215319 0.371795 0 0 1
+0.5 0.200794 -0.364745 0.985681 -0.056173 -0.158988
+0.324923 0.294872 -0.180042 0 1 0
+-0.138129 0.224126 0.371795 0 0 1
+0.217436 0.294872 -0.249073 0 1 0
+0.324243 -0.371795 -0.187995 0 1 0
+0.277425 0.231948 -0.371795 0.0213078 0.0585975 0.998054
+-0.174102 0.268006 0.320513 0 0 1
+0.19789 -0.0198436 -0.085226 0.854368 0.519058 -0.0251994
+0.141026 0.358683 0.26203 1 0 0
+-0.231756 0.30615 -0.371795 0 0 1
+0.5 -0.0225657 0.0304504 1 0 0
+-0.126794 0.238906 0.371795 0 0 1
+0.405952 -0.309106 0.320513 0 0 1
+-0.0350771 0.371795 -0.32784 0 1 0
+0.434763 -0.193051 -0.371795 0 0 1
+-0.224919 0.352892 0.320513 0 0 1
+0.203296 0.0236546 0.365062 0.976292 0.0155406 -0.2159
+-0.102717 -0.214088 0.371795 0 0 1
+-0.0413491 0.279598 0.320513 0 0 1
+0.100623 -0.146659 0.320513 0 0 1
+0.488387 0.294872 -0.144529 0.0629447 0.99777 -0.0221891
+0.0538782 -0.142023 0.320513 0 0 1
+-0.5 -0.0630572 -0.213389 1 0 0
+0.141026 0.300309 -0.243401 0.909965 0.35485 0.21458
+-0.354552 -0.00299064 0.371795 0 0 1
+-0.412568 -0.371795 0.19348 0 1 0
+0.5 0.100096 -0.0596358 1 0 0
+-0.130488 -0.294872 -0.230279 0 1 0
+0.256369 0.088332 0.371795 0 0 1
+0.229 -0.0383068 -0.179997 0.0679658 0.997531 -0.0176589
+-0.5 0.148239 -0.241382 1 0 0
+-0.5 0.201384 -0.232746 1 0 0
+-0.190823 -0.0170844 -0.317766 0.925003 -0.379959 0
+0.452514 0.171249 -0.371795 0 0 1
+-0.0323559 0.371795 -0.163971 0 1 0
+0.157916 -0.130481 0.322526 0.626805 -0.424786 -0.653202
+0.0051046 -0.267791 0.320513 -0.000797044 -0.0133135 0.999911
+0.442965 -0.21568 0.320513 0 0 1
+0.0961774 -0.0596628 -0.333333 0 0 1
+0.332667 0.184951 0.320513 0 0 1
+-0.225742 -0.0564717 -0.333333 0 0 1
+-0.148676 0.371795 0.30882 0 1 0
+0.4891 -0.268512 -0.371795 0 0 1
+0.17997 -0.106301 0.371795 -0.302515 0.272122 0.913474
+0.240276 0.0244372 0.00732808 0.165062 0.48916 0.856432
+-0.5 -0.181678 0.0294199 1 0 0
+0.130156 -0.252017 -0.371795 0 0 1
+-0.360946 -0.326286 -0.371795 0 0 1
+-0.0251427 -0.156704 -0.333333 0 0 1
+-0.312302 0.304242 -0.371795 0 0 1
+-0.497799 -0.294872 0.257813 0.365237 0.930431 -0.0299898
+-0.00521905 0.141902 -0.333333 0 0 1
+0.138652 0.359618 -0.371795 -0.184244 -0.0564571 0.981258
+0.141026 0.306846 0.0605614 1 0 0
+-0.116314 0.371795 -0.0152498 0 1 0
+-0.435591 0.371795 0.143949 0 1 0
+-0.375447 0.346325 -0.371795 0 0 1
+0.316829 -0.371795 -0.311861 0 1 0
+-0.5 -0.0429797 0.191422 1 0 0
+0.164904 -0.0760168 0.320513 0 0 1
+0.127788 -0.159751 0.365974 0.611157 -0.676529 -0.410848
+-0.169663 0.371795 0.118203 0 1 0
+-0.296403 -0.311461 0.320513 0 0 1
+-0.5 -0.254263 -0.188547 1 0 0
+-0.310659 -0.232459 -0.371795 0 0 1
+-0.210049 0.127039 0.371795 0 0 1
+-0.5 0.273135 -0.288547 1 0 0
+-0.192857 0.371795 0.0630594 0 1 0
+0.129191 0.15866 0.328227 0.637912 0.763157 -0.103244
+0.33204 -0.149246 -0.371795 0 0 1
+-0.197102 -0.0276248 -0.0869695 0.786769 -0.617127 0.0122145
+-0.325882 -0.357205 0.320513 0 0 1
+0.470798 0.113551 -0.371795 0 0 1
+-0.0912665 -0.230897 -0.334622 -0.136281 -0.681713 0.718815
+-0.5 0.307443 -0.340123 1 0 0
+-0.225559 -0.182384 0.371795 0 0 1
+-0.297033 -0.371795 -0.0864665 0 1 0
+0.28609 0.201129 0.320633 0.340667 0.763647 0.548442
+0.5 -0.095306 -0.0211561 1 0 0
+-0.0711188 -0.294872 0.140262 0 1 0
+0.0930308 0.182242 0.323972 0.231773 0.83867 -0.492863
+0.27287 -0.371795 -0.0100176 0 1 0
+-0.141154 -0.365035 0.106615 0.976358 -0.200866 0.0798565
+-0.5 0.0286871 -0.10559 1 0 0
+0.170965 -0.0411551 0.320513 0 0 1
+0.185164 0.0586571 0.320513 0 0 1
+0.476512 0.265293 -0.371795 0 0 1
+-0.5 -0.272956 0.303682 1 0 0
+-0.364717 0.0668003 0.371795 0 0 1
+-0.4894 0.210012 0.320513 -0.0465658 0.00439017 0.998906
+0.214798 -0.371795 -0.0554757 0 1 0
+-0.313142 -0.186142 -0.368407 0.870773 0.464919 -0.160014
+-0.281633 -0.371795 -0.203777 0 1 0
+-0.0971496 0.371795 -0.168829 0 1 0
+0.141155 -0.0577768 -0.333333 0 0 1
+-0.0881487 -0.294872 -0.305224 0 1 0
+0.300828 0.135652 0.371795 0 0 1
+-0.184464 0.268133 0.320513 0 0 1
+-0.236922 -0.371795 -0.227225 0 1 0
+-0.5 0.184921 -0.192099 1 0 0
+0.46679 0.106122 0.320513 0 0 1
+0.5 -0.254732 -0.0989368 1 0 0
+0.267911 0.107322 -0.333333 0 0 1
+0.5 0.254788 0.0642201 1 0 0
+-0.0898815 -0.294872 0.265744 0 1 0
+-0.0672832 0.371795 -0.0540858 0 1 0
+0.141026 0.326652 0.206049 1 0 0
+-0.5 -0.260064 -0.231042 1 0 0
+0.17156 0.132073 -0.333333 0 0 1
+-0.438337 0.205136 -0.371795 0 0 1
+0.204271 -0.0138123 0.00510401 -0.460436 -0.263654 0.847635
+0.395881 -0.371795 0.0953902 0 1 0
+-0.158155 -0.371795 -0.312753 0 1 0
+0.5 -0.12129 -0.0204084 1 0 0
+-0.259737 0.304841 -0.371795 0 0 1
+-0.5 0.103092 0.046716 1 0 0
+0.222163 -0.0237903 0.00790626 -0.180082 -0.483503 0.856618
+0.196378 0.294872 -0.080023 0 1 0
+-0.169731 -0.371795 0.0244783 0 1 0
+-0.443215 0.371795 -0.129726 0 1 0
+0.250996 0.294872 0.280069 0 1 0
+-0.172489 -0.371795 0.123888 0 1 0
+0.5 -0.251528 0.17286 1 0 0
+-0.321045 -0.371795 -0.17957 0 1 0
+0.269126 0.294872 0.00112445 0 1 0
+-0.392266 -0.371795 0.0806213 0 1 0
+0.19997 -0.371795 -0.324052 0 1 0
+-0.114892 0.169789 0.342744 -0.585065 0.81098 -0.00320917
+0.264119 -0.371795 -0.137207 0 1 0
+0.226986 -0.371795 0.182795 0 1 0
+-0.226297 -0.0756851 0.371795 0 0 1
+-0.210916 -0.371795 -0.366749 -0.0715122 0.88811 0.454033
+0.224035 0.237088 0.328948 0.30881 0.937424 0.16085
+-0.141154 -0.322734 0.0976174 1 0 0
+0.5 -0.0992799 -0.333751 1 0 0
+0.198351 -0.0499971 0.358802 0.969395 -0.245507 0
+-0.0541679 0.371795 0.16984 0 1 0
+0.265512 0.034494 0.371795 0 0 1
+0.5 0.120629 0.160396 1 0 0
+-0.221779 -0.371795 -0.226146 0 1 0
+-0.172529 0.293745 -0.371795 0 0 1
+-0.320513 -0.0839842 -0.353209 1 0 0
+-0.467163 -0.0471239 0.320513 0 0 1
+0.334873 0.294872 0.0698324 0 1 0
+-0.0910818 0.170996 0.320513 0.043551 -0.0539836 0.997592
+0.5 0.114806 -0.211971 1 0 0
+0.105234 0.371795 0.0129666 0 1 0
+0.0370503 0.255209 0.371795 -0.00365644 0.525883 0.850549
+-0.283674 -0.371013 0.320513 0.115396 -0.699525 0.705229
+-0.273273 0.0411511 -0.333333 0 0 1
+-0.0725186 -0.279278 -0.371795 0 0 1
+0.49955 -0.0960733 -0.371795 0.822762 -0.0936493 -0.560618
+-0.0390447 -0.294872 -0.189727 0 1 0
+-0.0251719 0.0103804 0.320513 0 0 1
+0.143672 0.294872 0.0375018 0.338547 0.939885 0.0447433
+-0.5 -0.0183995 0.118459 1 0 0
+0.141109 -0.340285 0.0737405 1 0 0
+0.454371 0.294872 -0.0835938 0 1 0
+0.5 -0.259988 -0.142095 1 0 0
+0.447182 -0.312172 -0.371795 -0.746388 0.0402126 0.664295
+0.141109 -0.325938 0.0964433 1 0 0
+-0.5 0.318973 -0.190811 1 0 0
+-0.5 0.238568 -0.168546 1 0 0
+0.5 0.236513 0.0396128 1 0 0
+0.4322 -0.371795 0.11146 0 1 0
+0.129318 0.371795 0.178052 0 1 0
+0.411718 -0.0657464 0.320513 0 0 1
+0.299034 -0.140902 0.371795 0 0 1
+0.270471 0.294872 -0.197719 0 1 0
+-0.0661668 0.287162 0.320513 0 0 1
+-0.5 0.31392 -0.19556 1 0 0
+-0.340046 -0.087613 0.371795 0 0 1
+0.5 0.159113 0.06315 1 0 0
+-0.474588 0.247112 0.320513 0 0 1
+0.239663 -0.157854 -0.333333 0 0 1
+0.139969 0.371795 0.248128 0.696603 0.709526 -0.106382
+-0.168862 0.371795 0.29078 0 1 0
+-0.0371593 0.0324666 0.320513 0 0 1
+0.320513 0.0903837 -0.365029 0.987187 -0.0393936 0.154626
+-0.141154 -0.360618 -0.295408 1 0 0
+-0.5 0.319136 -0.236896 1 0 0
+0.252112 0.0318299 -0.229885 0.570006 0.82149 -0.0156988
+-0.432732 0.131276 0.320513 0 0 1
+-0.141154 -0.371549 -0.353876 -0.629149 0.714924 -0.305049
+-0.315534 -0.371795 0.13972 0 1 0
+-0.0979422 0.371795 -0.250438 0 1 0
+0.194861 0.0637784 0.360685 0.959995 0.279891 0.00844254
+-0.0683998 0.371795 -0.222761 0 1 0
+0.217461 0.294872 -0.112635 0 1 0
+0.5 0.258162 0.26527 1 0 0
+0.228724 -0.305867 0.320513 0 0 1
+-0.322514 -0.345185 0.320513 0 0 1
+0.448718 -0.295769 0.0616137 0.710312 -0.699565 0.0778771
+0.442888 0.00637725 0.320513 0 0 1
+-0.5 0.240661 -0.218282 1 0 0
+0.26258 0.229152 0.320513 0.0491415 0.0927562 0.994475
+-0.18956 -0.0609648 0.320513 0.134691 0.125028 0.982968
+-0.196829 -0.371795 -0.152423 0 1 0
+0.158236 -0.325694 0.320513 0 0 1
+-0.141154 -0.331499 -0.355262 1 0 0
+-0.13825 0.0996193 -0.333333 0 0 1
+0.427114 0.236054 -0.371795 0 0 1
+-0.470101 0.308142 -0.371795 0 0 1
+-0.378363 -0.371795 -0.304519 0 1 0
+-0.0218068 -0.294872 -0.0725732 0 1 0
+0.202848 0.026264 -0.144602 0.723161 -0.690622 -0.008833
+0.333299 -0.152589 0.331542 0.800534 -0.599287 0
+-0.18813 0.248572 0.371784 -0.0962045 0.686523 0.720715
+0.5 -0.227629 -0.102389 1 0 0
+0.0275048 0.371795 0.147092 0 1 0
+-0.5 -0.264806 -0.262081 1 0 0
+0.5 -0.293771 -0.302629 0.795235 -0.598087 -0.0994692
+0.198141 -0.0202013 -0.0253447 0.839533 0.543288 0.00476684
+0.160475 -0.230897 -0.347976 0 1 0
+0.29108 -0.278343 -0.371795 0 0 1
+-0.5 -0.237622 0.246194 1 0 0
+-0.273517 0.00823904 -0.0516873 0.981459 -0.191146 0.0142193
+0.341737 0.294872 0.0890943 0 1 0
+0.320513 -0.145092 -0.354539 0.999988 -0.00457064 0.00199056
+0.5 -0.109399 0.00175816 1 0 0
+-0.26749 -0.139576 -0.333333 0 0 1
+0.492334 0.197037 0.320513 0.159236 0.0417137 0.986359
+0.413427 -0.371795 -0.182946 0 1 0
+-0.248848 0.0394828 -0.172686 -0.449938 0.893047 -0.00468632
+-0.367136 0.371795 -0.239965 0 1 0
+0.0329397 -0.294872 0.0158245 0 1 0
+-0.414453 0.151647 -0.371795 0 0 1
+0.313822 0.294872 0.273436 0 1 0
+0.118531 0.166957 0.347665 0.61393 0.78936 0
+0.00421567 0.209112 0.371795 -0.068621 -0.323806 0.943632
+-0.5 0.104163 0.143062 1 0 0
+-0.38168 0.0373882 0.363014 0.986983 -0.160795 0.00304371
+0.202822 -0.371795 0.133187 0 1 0
+-0.207394 -0.15991 -0.333333 0 0 1
+0.227098 0.294872 -0.330983 0 1 0
+0.295951 -0.371795 -0.0812591 0 1 0
+-0.5 -0.250862 0.277 1 0 0
+0.309498 -0.268811 -0.371795 0 0 1
+-0.5 -0.249208 0.209913 1 0 0
+-0.218744 -0.105104 -0.333333 0 0 1
+-0.137301 -0.294872 -0.0655673 -0.647723 0.761824 -0.00891751
+-0.5 -0.179518 -0.0441605 1 0 0
+0.0973737 -0.277477 0.320513 0 0 1
+-0.186216 -0.231043 -0.371795 -0.0911497 -0.530535 0.842748
+-0.044875 0.296773 0.320513 0 0 1
+0.444661 -0.371795 -0.162711 -0.238099 0.969996 -0.0491604
+-0.316582 -0.10853 0.371795 0 0 1
+-0.327216 0.346079 -0.371795 0 0 1
+0.5 -0.217025 0.250816 1 0 0
+-0.3559 -0.0370182 0.371795 0 0 1
+0.5 0.0340621 0.0717816 1 0 0
+-0.474419 0.0926479 0.320513 0 0 1
+0.299667 0.190052 0.357311 0.680886 0.732294 -0.0117809
+-0.485086 -0.144584 0.320513 0 0 1
+-0.0941854 0.371795 -0.241108 0 1 0
+-0.0349371 -0.097854 0.320513 0 0 1
+0.5 0.189167 -0.307894 1 0 0
+-0.414043 0.371795 -0.275345 0 1 0
+0.432727 -0.218077 -0.371795 0 0 1
+-0.5 -0.24036 0.086368 1 0 0
+-0.482865 0.371795 0.0357291 0 1 0
+0.301961 -0.0802252 -0.333333 0 0 1
+0.113703 0.0492383 -0.333333 0 0 1
+0.43576 0.0413932 0.320513 0 0 1
+-0.5 0.0831795 0.219826 1 0 0
+-0.108628 0.371795 -0.318464 0 1 0
+-0.220607 0.371795 -0.210921 0 1 0
+-0.369236 0.275633 -0.371795 0 0 1
+0.204063 0.294872 -0.261662 0 1 0
+0.5 0.207404 -0.3468 1 0 0
+-0.330738 0.371795 -0.338873 0 1 0
+0.313338 0.294872 0.260025 0 1 0
+0.0876895 0.163223 -0.333333 0 0 1
+-0.5 -0.038506 -0.359092 1 0 0
+-0.362807 0.371795 -0.346913 0 1 0
+-0.397013 0.371795 0.0196261 0 1 0
+-0.5 0.139151 0.142988 1 0 0
+0.26386 0.123142 -0.333333 0 0 1
+-0.105515 0.371795 0.21424 0 1 0
+0.481831 -0.294872 -0.136209 0 1 0
+0.280746 -0.371795 0.226249 0 1 0
+-0.229076 -0.231152 -0.371795 0.15866 -0.581561 0.797881
+-0.257659 -0.0341824 -0.153435 0.606605 0.795003 0
+-0.0423913 -0.294872 -0.193151 0 1 0
+-0.5 0.238355 0.130615 1 0 0
+0.025362 -0.115209 0.320513 0 0 1
+-0.167741 -0.371795 -0.0322487 0 1 0
+0.187914 0.290664 -0.371795 0.0734548 -0.322396 0.94375
+0.328133 -0.086796 -0.371795 0.241077 -0.122858 0.962698
+0.5 -0.0942786 -0.162905 1 0 0
+-0.258513 -0.170428 -0.333333 0 0 1
+0.176224 0.0141464 -0.333333 0 0 1
+-0.0182469 -0.294872 -0.0766832 0 1 0
+-0.0532589 0.371795 -0.188972 0 1 0
+0.244682 0.251484 0.320513 0 0 1
+0.426453 0.247056 0.320513 0 0 1
+0.5 0.0808349 0.21511 1 0 0
+0.5 0.00313586 0.129033 1 0 0
+0.217802 -0.145452 -0.333333 0 0 1
+-0.0980681 -0.294872 0.237851 0 1 0
+0.348374 -0.0432999 -0.371795 0 0 1
+0.0878726 -0.294872 0.0400121 0 1 0
+-0.320397 -0.36151 -0.371795 0.0620195 0.116337 0.991272
+-0.129471 0.371795 0.246235 0 1 0
+0.110077 -0.294872 -0.224221 0 1 0
+-0.095946 -0.197784 0.371795 0 0 1
+0.235848 -0.371795 0.0413234 0 1 0
+0.0838591 -0.294872 0.290855 0 1 0
+0.0196352 -0.134242 -0.333333 0 0 1
+-0.116159 0.00623659 -0.333333 0 0 1
+-0.452759 0.28826 -0.371795 0 0 1
+0.0774889 -0.294872 0.125005 0 1 0
+0.314748 0.0902968 -0.333333 0.291516 0.00618606 0.956546
+-0.443494 0.252434 -0.371795 0 0 1
+0.467548 0.294872 -0.349477 0 1 0
+-0.402976 0.371795 0.171009 0 1 0
+0.181896 0.294872 0.30313 0 1 0
+-0.264336 -0.108191 -0.333333 0 0 1
+-0.240994 -0.0422159 -0.196389 0.230363 0.973069 0.00838787
+-0.0466143 -0.159941 0.320513 0 0 1
+0.139222 0.115654 0.320513 0 0 1
+-0.0891348 -0.294872 -0.181214 0 1 0
+-0.283523 0.236128 -0.371795 0 0 1
+-0.346105 -0.0126853 0.371795 0 0 1
+0.367895 -0.367497 -0.371795 0.0702128 0.41397 0.907578
+0.362147 -0.371795 0.00458122 0 1 0
+0.148939 -0.371795 -0.137886 0.0370457 0.999308 -0.00332138
+0.5 -0.0123702 -0.0398795 1 0 0
+0.354509 0.294872 -0.0317854 0 1 0
+0.375597 -0.0472963 -0.371795 0 0 1
+0.37392 -0.34659 -0.371795 0 0 1
+-0.5 -0.0642267 0.267672 1 0 0
+-0.301555 0.371795 -0.256678 0 1 0
+-0.448718 -0.340733 0.25499 1 0 0
+-0.00643502 -0.0070935 -0.333333 0 0 1
+0.450576 0.123872 0.320513 0 0 1
+0.134971 0.07722 0.320513 0 0 1
+0.141026 0.356437 -0.176537 1 0 0
+-0.199952 0.0305935 -0.144096 0.704394 0.709783 -0.00612405
+0.349894 -0.371795 0.157772 0 1 0
+0.141109 -0.338411 0.222219 1 0 0
+-0.430901 -0.371795 0.0796887 0 1 0
+-0.008742 0.371795 -0.298843 0 1 0
+-0.444847 -0.0976598 -0.371795 0 0 1
+0.5 -0.191244 0.181614 1 0 0
+0.154947 -0.0460682 -0.333333 0 0 1
+0.136373 0.371795 -0.141046 0.357759 0.931035 0.0719835
+0.118575 0.371795 -0.248405 0 1 0
+-0.5 -0.130452 0.28916 1 0 0
+-0.344762 -0.365989 0.320513 -0.0640884 -0.275353 0.959205
+0.258246 0.294872 -0.31774 0 1 0
+-0.487418 -0.294872 -0.213037 0.059043 0.994866 -0.0821906
+-0.11795 0.371795 0.197008 0 1 0
+0.0159254 -0.294872 0.224514 0 1 0
+0.5 0.207797 -0.180914 1 0 0
+-0.141154 -0.309136 0.144464 1 0 0
+0.294314 -0.371795 -0.14979 0 1 0
+0.136075 -0.294872 0.123711 0.165028 0.981069 -0.101335
+-0.018565 -0.281281 0.320513 0 0 1
+0.5 0.21323 -0.335301 1 0 0
+0.5 0.202896 -0.304422 1 0 0
+0.366696 0.294872 0.103584 0 1 0
+-0.365697 0.371795 -0.0730584 0 1 0
+-0.141154 -0.361889 -0.309535 0.996129 -0.0789783 0.0386035
+-0.233324 -0.218472 0.371795 0 0 1
+0.416259 0.294872 0.305651 0 1 0
+-0.282348 -0.371795 -0.181262 0 1 0
+0.423273 0.0299655 0.320513 0 0 1
+-0.5 -0.0667427 -0.0804182 1 0 0
+-0.5 -0.146662 -0.274588 1 0 0
+0.0274212 0.371795 0.100924 0 1 0
+0.141026 0.340362 0.0023614 1 0 0
+-0.339204 0.371795 -0.326966 0 1 0
+-0.5 -0.291977 0.117219 0.940603 0.304652 0.149847
+0.114246 0.371795 0.1455 0 1 0
+0.482712 0.15533 0.320513 0 0 1
+0.5 0.106064 0.309632 0.993665 -0.00740142 0.112138
+0.101432 -0.256102 -0.371795 0 0 1
+-0.5 -0.12753 -0.356305 1 0 0
+0.316643 -0.371795 0.191867 0 1 0
+0.320513 0.116418 -0.340256 0.900869 0.109774 0.419981
+-0.0610108 0.371795 -0.0466743 0 1 0
+-0.222645 -0.350346 -0.371795 0 0 1
+-0.5 0.0778743 -0.262064 1 0 0
+-0.223303 0.0979146 0.371795 0 0 1
+0.148869 -0.371795 -0.203489 0.182129 0.971981 -0.1486
+0.450809 0.294872 -0.259072 0 1 0
+-0.234693 0.141009 0.371795 0 0 1
+0.5 -0.043249 -0.263238 1 0 0
+-0.450652 0.371795 -0.151534 0 1 0
+-0.5 -0.233381 0.089235 1 0 0
+0.141026 0.367446 -0.321594 0.966932 0.221219 0.126901
+0.228323 -0.096232 -0.333333 0 0 1
+0.5 -0.248851 -0.0962824 1 0 0
+0.490781 -0.294872 0.00403138 -0.0810852 0.996691 -0.00574733
+0.141026 0.347192 0.298507 1 0 0
+0.5 -0.107633 -0.306808 1 0 0
+-0.155828 -0.275708 -0.371795 0 0 1
+-0.5 -0.056335 -0.0516558 1 0 0
+-0.170179 -0.212801 0.371795 0 0 1
+-0.407657 0.309872 -0.371795 0 0 1
+0.238421 0.294872 -0.329567 0 1 0
+-0.49216 -0.0689753 0.320513 -0.115044 0.0237997 0.993075
+0.0454663 0.371795 -0.315556 0 1 0
+-0.173244 0.232468 -0.371795 -0.0135498 0.704634 0.709441
+0.448718 -0.302706 0.0372194 0.998349 -0.0572583 0.00448419
+-0.5 0.135514 0.0246378 1 0 0
+-0.129462 0.333956 -0.371795 0 0 1
+0.00632511 -0.0823274 0.320513 0 0 1
+0.201069 0.294872 -0.0698326 0 1 0
+0.256309 0.18349 -0.333333 0 0 1
+0.5 -0.140307 0.275362 1 0 0
+-0.412411 0.191232 0.320513 0 0 1
+0.5 0.113045 -0.0706442 1 0 0
+0.5 -0.260711 -0.302219 1 0 0
+0.301938 -0.295982 0.320513 0 0 1
+0.195318 -0.371795 0.235357 0 1 0
+-0.188807 -0.0787947 0.341771 0.91578 0.40168 0
+0.486359 -0.182653 0.320513 0 0 1
+0.442971 0.185816 0.320513 0 0 1
+0.126631 0.371795 -0.115169 0 1 0
+-0.355633 -0.282519 -0.371795 0 0 1
+0.209012 0.206574 -0.333333 0 0 1
+0.0149341 0.2198 -0.333333 -0.00116416 0.0470086 0.998894
+-0.219234 0.0418648 -0.231761 0.273022 0.961901 -0.0143419
+0.120315 -0.294872 0.21835 0 1 0
+0.367517 0.0973388 -0.371795 0 0 1
+0.476174 0.294872 0.199322 0 1 0
+-0.177637 0.0400976 -0.333333 0 0 1
+-0.5 -0.133947 -0.0782436 1 0 0
+0.419475 -0.141408 -0.371795 0 0 1
+-0.383467 0.014259 0.362701 0.997449 -0.0713841 2.12681e-005
+0.264703 0.0178906 -0.227787 0.8751 0.48356 -0.0192251
+0.5 0.0866045 0.178482 1 0 0
+-0.190838 0.371795 0.0388995 0 1 0
+0.141026 0.308911 0.121715 1 0 0
+0.256172 0.294872 0.136898 0 1 0
+0.0487938 -0.294872 -0.247494 0 1 0
+-0.410706 0.185717 -0.371795 0 0 1
+0.448718 -0.315816 -0.233659 1 0 0
+0.148704 0.100455 -0.333333 0 0 1
+0.5 0.121864 0.237321 1 0 0
+-0.480478 0.371795 0.164726 0 1 0
+0.141109 -0.316106 -0.0475001 1 0 0
+-0.211589 -0.00427301 -0.0209067 0.481883 -0.118206 0.868226
+0.141109 -0.367591 0.1203 0.909525 0.401369 -0.10801
+0.320513 0.0385327 -0.341824 0.998546 -0.00476448 0.0536876
+0.175433 0.294872 -0.359702 0 1 0
+-0.0493104 0.371795 -0.259614 0 1 0
+0.354494 -0.371795 -0.181351 0 1 0
+0.260121 -0.371795 -0.0433947 0 1 0
+0.255477 0.294872 0.169242 0 1 0
+-0.34487 -0.037996 -0.371795 0 0 1
+0.0601567 0.371795 -0.0866965 0 1 0
+0.410786 0.294872 -0.210368 0 1 0
+0.383888 0.294872 0.141943 0 1 0
+0.5 -0.272822 0.244234 1 0 0
+-0.1879 0.196387 0.371795 0 0 1
+-0.371833 0.371795 0.0239909 0 1 0
+-0.349065 0.269715 -0.371795 0 0 1
+0.0399166 0.124724 -0.333333 0 0 1
+-0.265872 0.198283 -0.333333 0 0 1
+0.333504 -0.371795 0.00411962 0 1 0
+0.016046 0.371795 0.301988 0 1 0
+-0.26338 -0.371795 0.301009 0 1 0
+-0.5 0.160176 -0.309992 1 0 0
+-0.14136 -0.169319 0.371795 0 0 1
+-0.236207 0.161914 0.371795 0 0 1
+0.472329 0.294872 -0.335625 0 1 0
+0.448718 -0.364844 -0.358893 0.998319 -0.0577521 -0.00477625
+0.0100674 -0.294872 0.0752924 0 1 0
+0.0300983 -0.294872 0.192584 0 1 0
+0.365531 -0.371795 -0.0538927 0 1 0
+-0.5 0.0876384 -0.186218 1 0 0
+0.378685 0.129318 -0.371795 0 0 1
+0.125622 0.371795 -0.182448 0 1 0
+-0.00249276 0.371795 0.214389 0 1 0
+-0.176175 0.0204934 -0.333333 0 0 1
+-0.5 -0.230266 -0.305133 1 0 0
+0.5 -0.224012 -0.0111495 1 0 0
+0.320513 0.0853941 -0.341393 0.998894 -0.00138976 0.0470053
+-0.273919 -0.00503565 -0.130013 0.994057 0.10865 0.00684854
+0.0235827 -0.203448 0.329592 -0.140885 0.978823 0.148515
+0.257902 -0.324717 -0.371795 0 0 1
+0.224392 0.294872 -0.246575 0 1 0
+0.5 0.0795954 -0.366931 0.881763 -0.0708025 -0.466348
+-0.0562871 0.371795 0.202125 0 1 0
+-0.0241515 0.371795 -0.329226 0 1 0
+0.380607 0.294872 -0.156112 0 1 0
+-0.411123 0.112571 -0.371795 0 0 1
+0.141026 0.311818 -0.273253 1 0 0
+-0.0161151 0.204555 0.366913 -0.163098 0.975625 -0.146818
+-0.337957 0.371795 0.0435214 0 1 0
+-0.278847 -0.371795 -0.112895 0 1 0
+-0.210378 -0.196279 -0.333333 0 0 1
+0.5 0.206637 0.274902 1 0 0
+0.0157699 -0.0329778 0.320513 0 0 1
+-0.328428 0.212037 0.320513 0 0 1
+-0.141154 -0.361806 0.309174 0.996006 -0.0730702 0.0513163
+0.309323 0.180396 0.35889 0.707102 0.707112 0
+0.5 -0.104831 -0.237933 1 0 0
+0.33326 0.277041 -0.371795 0 0 1
+0.350049 -0.371795 -0.321798 0 1 0
+0.493112 0.238479 -0.371795 -0.146232 0.0512254 0.987923
+-0.211645 0.371795 -0.191708 0 1 0
+-0.175474 0.371795 -0.280423 0 1 0
+0.298007 0.212175 -0.371795 0.373396 0.460126 0.805518
+0.110823 0.371795 0.183853 0 1 0
+0.5 -0.00919422 -0.144849 1 0 0
+0.278273 -0.206981 0.369851 -0.362286 0.722966 -0.588276
+0.382659 -0.0255694 0.325285 0.979687 -0.0631586 0.190328
+0.349154 -0.128757 0.359951 0.877675 -0.479256 0
+0.135839 -0.0222158 0.320513 0 0 1
+0.0704795 0.371795 0.0205194 0 1 0
+0.424846 0.268552 -0.371795 0 0 1
+-0.426527 -0.0867366 -0.371795 0 0 1
+-0.295596 -0.357712 0.320513 0 0 1
+-0.5 0.152606 -0.346191 1 0 0
+-0.195879 0.0258791 -0.0803227 0.81762 0.575743 0.00410486
+-0.251485 -0.230385 -0.371795 0.104978 0.893087 -0.437464
+-0.5 0.263727 0.120219 1 0 0
+0.416642 -0.371795 -0.244567 0 1 0
+0.5 0.0744247 -0.20474 1 0 0
+-0.115277 -0.294872 -0.30941 0 1 0
+-0.5 -0.275489 0.244155 1 0 0
+0.0124482 0.371795 -0.233207 0 1 0
+0.248665 -0.113169 0.371795 0 0 1
+0.405538 -0.371795 0.27257 0 1 0
+-0.141154 -0.368532 0.122874 0.840315 -0.533977 -0.0934816
+-0.286781 -0.371795 0.112183 0 1 0
+-0.198529 0.371795 0.270165 0 1 0
+-0.225664 0.227854 0.371795 -0.0667019 0.173902 0.982501
+0.5 0.0327831 0.0352953 1 0 0
+-0.268448 -0.214336 0.370269 -0.347229 -0.532295 0.772071
+-0.5 -0.0569383 -0.311544 1 0 0
+0.244631 -0.0872173 0.371795 0 0 1
+0.499661 0.294872 0.118791 0.592089 0.804928 0.0390181
+0.414251 0.221865 0.320513 0 0 1
+0.245969 -0.188255 0.371795 0 0 1
+-0.179381 0.369851 0.320513 -0.0229377 0.431304 0.901915
+-0.5 -0.0791109 0.251722 1 0 0
+0.331373 0.294872 -0.0913427 0 1 0
+-0.5 0.149823 -0.0357065 1 0 0
+0.00899188 0.371795 -0.336023 0 1 0
+-0.5 -0.203067 0.0580509 1 0 0
+0.2244 -0.0379042 -0.150047 0.153177 0.987908 -0.0239673
+0.361612 0.137816 -0.371795 0 0 1
+0.208701 -0.371795 -0.0420237 0 1 0
+-0.325243 -0.173593 0.320513 -0.152053 -0.14836 0.977174
+-0.103777 -0.0704586 -0.333333 0 0 1
+-0.243908 0.371795 -0.339431 0 1 0
+-0.5 -0.165895 0.107486 1 0 0
+-0.0297875 0.371795 0.283858 0 1 0
+0.5 -0.082759 0.125058 1 0 0
+0.217212 0.294872 -0.0295908 0 1 0
+0.5 0.0436949 0.209109 1 0 0
+-0.367616 0.246352 0.320513 0 0 1
+-0.274928 0.218939 -0.333333 -0.0931055 0.471286 0.877052
+0.320513 -0.0863051 -0.362067 0.993263 -0.0567144 0.101053
+0.142721 0.294872 -0.328891 0.801869 0.593741 -0.0669167
+-0.114112 0.269828 0.320513 0 0 1
+0.0416223 -0.230897 -0.371712 -0.144048 -0.53382 0.833239
+0.392275 -0.0804503 0.320513 0 0 1
+-0.5 -0.276345 -0.0427466 1 0 0
+-0.331156 -0.371795 0.202671 0 1 0
+0.0688631 -0.294872 0.316629 -0.0816891 0.91104 -0.404144
+0.141109 -0.329079 0.221688 1 0 0
+0.239628 0.211488 0.371795 0 0 1
+-0.178334 -0.371795 -0.0560742 0 1 0
+0.5 -0.162105 -0.158121 1 0 0
+0.258754 -0.0262009 -0.0877574 0.730046 -0.68335 0.00807732
+-0.319658 -0.371795 -0.322968 0 1 0
+0.5 -0.237987 -0.0154046 1 0 0
+0.390425 -0.100685 0.320513 0 0 1
+0.327851 0.294872 -0.283568 0 1 0
+0.5 -0.0539276 -0.200348 1 0 0
+-0.0286223 -0.272529 0.320513 0 0 1
+0.141026 0.317324 -0.250969 1 0 0
+-0.440873 -0.335909 -0.371795 0.208486 0.0272668 0.977645
+-0.264117 -0.371795 -0.208582 0 1 0
+0.5 0.164221 0.0732523 1 0 0
+0.5 -0.196753 0.320273 0.832611 -0.022238 0.553411
+-0.0109461 -0.00584048 -0.333333 0 0 1
+0.151652 0.294872 0.0110796 0.14437 0.989438 0.0130106
+-0.291788 -0.213774 -0.341842 0.623112 0.782105 0.00662574
+0.0945074 -0.294872 -0.217236 0 1 0
+-0.0941161 0.371795 0.239718 0 1 0
+0.5 0.288497 -0.301905 0.974445 0.212579 -0.0725678
+0.312552 0.294872 -0.2309 0 1 0
+-0.448718 -0.310325 -0.118874 1 0 0
+0.253019 -0.314473 -0.371795 0 0 1
+0.482819 0.294872 -0.242382 0 1 0
+-0.371349 -0.104939 -0.371795 0 0 1
+0.422758 0.294872 -0.249395 0 1 0
+-0.5 -0.146005 -0.0695836 1 0 0
+-0.260644 0.218939 0.361296 -0.513588 0.856337 0.0539886
+0.5 0.25996 -0.237621 1 0 0
+0.107278 0.371795 -0.00172377 0 1 0
+0.174701 -0.371795 -0.368993 0.131101 0.931828 0.338391
+0.302176 -0.0153596 -0.333333 0 0 1
+-0.141154 -0.363811 -0.157935 0.995009 -0.0996164 0.00576626
+-0.0484345 -0.199302 0.358892 0.229084 0.9734 0.00364334
+-0.255741 0.371795 -0.354517 0 1 0
+0.422187 -0.371795 0.253972 0 1 0
+0.201324 0.294872 0.119275 0 1 0
+-0.187673 -0.00563473 -0.119856 0.985831 -0.166971 -0.0160534
+0.141109 -0.340227 -0.340565 1 0 0
+0.5 -0.119145 0.154235 1 0 0
+-0.398959 0.371795 0.053922 0 1 0
+0.0790434 -0.243938 -0.371795 0 0 1
+0.151137 -0.211302 0.371795 0 0 1
+-0.5 0.310444 -0.040206 1 0 0
+-0.5 0.240915 0.0931282 1 0 0
+0.320513 -0.0656307 -0.361074 0.99503 0.0462089 0.0882047
+0.0174699 -0.294872 -0.234968 0 1 0
+-0.151615 -0.371795 0.264538 0 1 0
+-0.336685 -0.371795 -0.0237552 0 1 0
+0.5 0.277676 -0.0304393 1 0 0
+-0.133877 0.195122 0.371795 0 0 1
+0.5 0.103291 0.188523 1 0 0
+-0.296234 -0.194077 0.320513 -0.409837 -0.514742 0.753043
+-0.0131075 -0.0139729 0.320513 0 0 1
+0.221756 -0.0372517 -0.226761 0.224788 0.97438 -0.00731731
+-0.240615 0.210869 0.371795 0 0 1
+-0.165242 0.371795 0.228676 0 1 0
+0.5 -0.116627 0.217363 1 0 0
+0.115773 0.213356 0.371795 0 0 1
+0.240563 0.0356904 0.371795 0 0 1
+-0.478747 0.279661 -0.371795 0 0 1
+-0.411211 -0.0112146 -0.371795 0 0 1
+-0.129959 0.371795 -0.202327 0 1 0
+-0.164373 0.0141704 0.320513 0 0 1
+0.132872 -0.294872 0.27686 0.172398 0.983063 0.062185
+-0.110459 0.371795 -0.0253321 0 1 0
+0.35275 0.110475 0.371795 0.222776 0.085463 0.971116
+-0.141154 -0.307713 -0.371597 -0.442051 -0.0294582 0.896506
+-0.0655794 0.371795 0.255706 0 1 0
+-0.0532986 0.27642 -0.371795 0 0 1
+0.146416 0.254979 0.3327 0.0713487 0.997451 0
+0.5 -0.173535 0.175028 1 0 0
+0.5 0.28097 0.202523 1 0 0
+-0.190369 0.371795 -0.244466 0 1 0
+0.5 -0.121957 0.170066 1 0 0
+0.174763 0.251479 0.349122 0.211651 0.977345 0
+0.259684 -0.371795 0.313747 0.041428 0.994071 -0.100535
+-0.312509 0.121578 0.371795 0 0 1
+0.00405552 0.371795 0.294338 0 1 0
+-0.0767001 0.256546 -0.371795 0 0 1
+0.243921 0.258301 0.320513 0 0 1
+0.247943 -0.359913 -0.371795 -0.00555039 0.00939737 0.99994
+-0.473437 0.162684 -0.371795 0 0 1
+-0.24273 -0.0581406 -0.333333 0 0 1
+-0.113341 -0.262873 0.320513 0.048584 -0.456307 0.888495
+0.5 0.18434 -0.0482261 1 0 0
+-0.306669 -0.371795 0.290865 0 1 0
+-0.141154 -0.317516 -0.225145 1 0 0
+0.202592 0.0280301 -0.333333 -0.387617 0.155632 0.908588
+0.00889467 0.371795 -0.361948 0 1 0
+0.415264 0.294872 0.0058786 0 1 0
+-0.448718 -0.323836 -0.319471 1 0 0
+0.227002 -0.0239858 0.00849983 -0.0595736 -0.506642 0.860096
+-0.268359 0.371795 0.148104 0 1 0
+0.141109 -0.327715 0.0157742 1 0 0
+0.250064 0.294872 0.047195 0 1 0
+-0.5 -0.282587 -0.348307 1 0 0
+-0.329662 -0.371795 0.0463139 0 1 0
+-0.143977 -0.371795 0.224663 -0.314216 0.941115 -0.12478
+0.5 0.0568395 -0.128124 1 0 0
+0.219008 -0.264826 0.320513 0 0 1
+0.445608 -0.0245699 0.320513 0 0 1
+0.193127 -0.371795 0.00213012 0 1 0
+0.426454 -0.371795 -0.243533 0 1 0
+0.147488 -0.371795 0.270882 0.243815 0.969149 -0.036102
+0.499412 0.294872 -0.200585 0.668899 0.738557 0.0843087
+0.5 0.0318723 -0.16112 1 0 0
+-0.5 0.145055 -0.256237 1 0 0
+-0.5 -0.284967 0.200662 1 0 0
+-0.144397 0.206243 0.371795 0 0 1
+-0.307536 0.371795 -0.0637479 0 1 0
+-0.5 0.204687 0.30993 0.996927 -0.0332993 -0.0709
+0.116069 0.371795 -0.349331 0 1 0
+0.193114 -0.00750668 -0.270312 0.976982 0.213102 -0.00964248
+0.448718 -0.315504 -0.303168 1 0 0
+0.273632 -0.286001 0.320513 0 0 1
+-0.5 -0.218154 0.256578 1 0 0
+-0.388104 -0.0855917 0.320513 0 0 1
+0.488175 0.167653 0.320513 0 0 1
+0.326828 -0.371795 0.0136965 0 1 0
+0.481718 0.294872 -0.0197098 0 1 0
+-0.5 -0.237837 0.158213 1 0 0
+0.399389 -0.371795 -0.0880748 0 1 0
+0.163869 -0.230897 -0.349521 0 1 0
+0.363553 -0.371795 0.295978 0 1 0
+-0.5 -0.171262 -0.341487 1 0 0
+0.312953 0.252044 -0.371795 0 0 1
+0.301296 -0.371795 0.251891 0 1 0
+0.46192 -0.294872 -0.142268 0 1 0
+-0.5 0.224251 -0.180344 1 0 0
+-0.5 0.171312 -0.0683445 1 0 0
+0.320044 0.159331 -0.360308 0.996696 0.0810862 -0.00462824
+0.492756 0.294872 0.0374904 0.316964 0.948249 0.0188885
+0.5 0.163745 -0.223911 1 0 0
+0.248773 0.294872 0.117485 0 1 0
+0.404532 0.294872 0.0695974 0 1 0
+0.5 0.0851872 0.266387 1 0 0
+0.0887965 0.273537 -0.371795 0 0 1
+-0.0306357 -0.275106 0.320513 0 0 1
+-0.5 0.28892 0.204416 1 0 0
+-0.298303 -0.01869 0.371795 0 0 1
+-0.420648 -0.371795 -0.241056 0 1 0
+-0.320513 -0.033731 -0.35929 0.999949 -0.00324165 -0.0095752
+0.5 -0.250165 0.229418 1 0 0
+-0.5 -0.0326497 0.0650662 1 0 0
+0.498869 0.151034 0.320513 0.461652 -0.316488 0.828682
+0.373607 0.294872 0.174679 0 1 0
+0.481588 -0.294872 -0.323219 0 1 0
+0.374315 -0.371795 -0.261854 0 1 0
+0.5 -0.203327 -0.253935 1 0 0
+0.0204039 0.0533507 -0.333333 0 0 1
+-0.194097 -0.0233346 -0.0893219 0.845635 -0.53369 0.00875816
+0.446667 0.294872 -0.0712839 0 1 0
+0.115404 0.255652 -0.371795 0 0 1
+-0.262303 0.371795 0.0574023 0 1 0
+0.448718 -0.325637 0.169836 1 0 0
+-0.5 0.106446 -0.0680158 1 0 0
+-0.5 -0.152648 -0.226686 1 0 0
+0.5 -0.202245 0.215177 1 0 0
+0.309245 0.294872 -0.3367 0 1 0
+-0.419365 0.227699 -0.371795 0 0 1
+-0.0147567 0.0364 -0.333333 0 0 1
+-0.141154 -0.338187 0.00866497 1 0 0
+-0.388725 0.371795 0.313874 0.0104519 0.996232 0.0861009
+-0.26261 0.0295704 -0.304748 0.74584 -0.665981 0.0138343
+-0.4004 0.310741 0.320513 0 0 1
+0.383671 -0.0114177 0.348568 0.997453 -0.0713249 0
+0.139882 -0.191341 -0.333333 0 0 1
+0.5 -0.0249823 0.192 1 0 0
+-0.0272042 0.257694 0.320513 0.0936249 0.550225 0.829751
+0.5 -0.0160475 -0.118255 1 0 0
+0.211255 -0.371795 -0.123851 0 1 0
+-0.367007 0.371795 0.0415825 0 1 0
+-0.160418 0.371795 -0.0778458 0 1 0
+-0.442697 -0.186818 0.320513 0 0 1
+0.126379 -0.0917976 -0.333333 0 0 1
+-0.382065 0.0338698 0.370273 0.895082 -0.128118 -0.427099
+0.078733 0.256282 0.323104 -0.00549436 0.976777 0.214187
+0.000821531 0.299802 0.320513 0 0 1
+-0.407032 -0.369535 0.320513 -0.122317 0.697743 -0.705828
+-0.259268 -0.371795 -0.284422 0 1 0
+-0.088477 0.30153 0.320513 0 0 1
+-0.5 -0.0783906 -0.0315401 1 0 0
+0.5 0.256472 0.260161 1 0 0
+0.0747972 -0.152423 0.320513 0 0 1
+0.0202795 0.371795 0.152306 0 1 0
+-0.265549 -0.371795 -0.221175 0 1 0
+-0.115658 -0.251006 0.371795 0.0107812 -0.479862 0.877278
+-0.155331 0.254342 0.35192 -0.0713377 0.997452 0
+0.496065 -0.294872 0.282981 -0.42342 0.899071 0.111298
+-0.182175 -0.371795 -0.0870201 0 1 0
+-0.199668 -0.371795 0.313975 0.0990817 0.961435 -0.256567
+0.257498 -0.0274571 -0.130031 0.738339 -0.674384 -0.0078823
+-0.308572 -0.356707 0.320513 0 0 1
+0.268425 -0.00750372 -0.203472 0.985164 -0.170613 0.018505
+-0.307551 0.371795 -0.166754 0 1 0
+0.457262 0.278725 0.320513 0 0 1
+0.195693 -0.0604959 0.368991 0.726432 -0.239705 -0.64408
+0.320513 -0.107443 -0.340863 0.974456 0 0.224577
+-0.197435 -0.371795 -0.15669 0 1 0
+0.5 -0.0537149 0.200432 1 0 0
+0.00278438 0.371795 -0.340893 0 1 0
+-0.106628 -0.294872 -0.0842259 0 1 0
+-0.163681 -0.204735 -0.333333 0 0 1
+-0.0972485 0.284854 0.320513 0 0 1
+0.188992 0.294872 -0.0241042 0 1 0
+0.448718 -0.350971 0.304637 1 0 0
+0.304093 0.238964 0.320513 0 0 1
+0.5 -0.124765 0.305129 1 0 0
+-0.320513 0.0951021 -0.335833 0.714711 -0.159247 -0.68105
+0.261561 -0.00295392 0.00445319 0.545659 -0.0525883 0.836355
+-0.5 -0.213001 0.224863 1 0 0
+0.335445 -0.371795 0.110529 0 1 0
+-0.441731 -0.36896 0.320513 -0.0947282 -0.499398 0.861179
+0.328044 0.294872 0.31896 0.0935545 0.843909 0.528265
+-0.00604522 0.218897 0.371795 0 0 1
+0.448857 -0.294872 -0.101435 0.832509 -0.534956 -0.144051
+0.448718 -0.313057 -0.205049 1 0 0
+0.5 0.163508 -0.227536 1 0 0
+0.0741632 -0.294872 -0.330221 0 1 0
+-0.40902 -0.0154011 -0.371795 0 0 1
+-0.278609 -0.371795 0.284873 0 1 0
+-0.264767 0.0271529 -0.222226 0.794119 -0.607752 -0.00352697
+-0.142616 -0.371795 -0.300133 0.838076 -0.528393 -0.135751
+-0.126375 -0.294872 0.0143465 0 1 0
+-0.5 -0.0467452 0.307818 1 0 0
+0.252824 0.294872 -0.306879 0 1 0
+-0.469145 -0.177463 -0.371795 0 0 1
+0.438875 -0.124575 0.320513 0 0 1
+-0.5 -0.200069 -0.126027 1 0 0
+-0.0764081 -0.294872 -0.214397 0 1 0
+0.5 0.0684681 0.0180071 1 0 0
+-0.372764 0.0757999 0.35178 0.948503 -0.316761 0.0022508
+0.5 0.20699 -0.0503782 1 0 0
+-0.0469467 -0.294872 -0.239498 0 1 0
+-0.0624374 0.256282 0.333074 -0.0262711 0.996272 0.0821753
+-0.0164751 -0.173904 -0.333333 0 0 1
+0.0323408 -0.294872 0.163032 0 1 0
+-0.448718 -0.310362 0.16745 1 0 0
+-0.5 -0.0678845 -0.274001 1 0 0
+-0.5 -0.0199998 0.0659049 1 0 0
+-0.454542 0.361318 -0.371795 0 0 1
+-0.5 0.278349 -0.138263 1 0 0
+0.399559 0.294872 -0.105364 0 1 0
+0.474077 0.17831 0.320513 0 0 1
+-0.5 0.275257 -0.199186 1 0 0
+-0.157123 0.19012 0.371795 0 0 1
+0.293459 -0.371795 0.179616 0 1 0
+-0.424941 -0.371795 -0.222656 0 1 0
+-0.00576393 0.371795 0.257713 0 1 0
+0.5 -0.264046 -0.0285246 1 0 0
+-0.226841 0.190351 -0.333333 0 0 1
+0.320703 -0.371795 -0.0544649 0 1 0
+-0.5 0.288587 -0.290316 1 0 0
+0.236302 -0.0259019 0.00715565 0.0953184 -0.490909 0.865981
+-0.185655 0.371795 -0.043518 0 1 0
+-0.5 -0.21628 0.224554 1 0 0
+-0.287899 0.128694 0.371795 0 0 1
+0.458067 -0.294872 0.175423 -0.0537404 0.998554 0.00138966
+0.5 0.281984 0.0486261 0.999886 0.0136319 -0.00643387
+-0.128651 0.293702 0.320513 0 0 1
+0.125816 -0.161287 0.342692 -0.614235 0.789123 0
+0.124617 0.371795 -0.172852 0 1 0
+-0.106888 -0.193114 -0.333333 0 0 1
+0.452175 0.00991533 -0.371795 0 0 1
+0.328108 -0.371795 0.309312 0 1 0
+0.24813 0.202763 0.371795 0 0 1
+0.463963 -0.217305 -0.371795 0 0 1
+-0.292406 0.371795 -0.0558459 0 1 0
+-0.387846 -0.371795 -0.134716 0 1 0
+-0.10726 0.340024 -0.371795 0 0 1
+0.191801 0.121673 0.371795 0 0 1
+0.108314 -0.294872 0.136473 0 1 0
+-0.476836 0.355473 0.320513 0 0 1
+-0.0107411 0.364539 0.320513 -0.00626109 0.20487 0.978769
+0.227031 0.0381345 -0.0604838 -0.0961443 0.995306 0.0110837
+-0.161804 0.371795 -0.0247481 0 1 0
+0.141026 0.358867 0.23366 1 0 0
+-0.141154 -0.315566 -0.283702 1 0 0
+-0.0102774 0.285573 0.320513 0 0 1
+0.193783 -0.0847655 -0.333333 0 0 1
+-0.5 0.182579 0.13686 1 0 0
+0.488218 -0.215517 0.320513 0 0 1
+0.5 -0.0757893 -0.234909 1 0 0
+0.141109 -0.352655 -0.264923 1 0 0
+-0.5 -0.227568 -0.175256 1 0 0
+0.141026 0.327407 0.218521 1 0 0
+-0.204795 -0.100449 -0.333333 0 0 1
+0.168912 -0.371795 0.114966 0 1 0
+0.411004 -0.371795 -0.114376 0 1 0
+-0.322614 -0.0982401 0.371795 0 0 1
+0.442866 -0.371795 -0.335562 -0.238637 0.969007 -0.0638559
+0.5 0.0598461 -0.0665948 1 0 0
+0.158414 0.221362 -0.333333 0.0286321 0.110852 0.993424
+0.5 0.133564 -0.0528826 1 0 0
+-0.330941 -0.19941 0.320513 0 0 1
+-0.5 -0.136458 -0.317538 1 0 0
+-0.5 0.069087 -0.207966 1 0 0
+0.178671 0.294872 0.100017 0 1 0
+0.299283 0.0365129 0.371795 0 0 1
+0.448718 -0.338417 -0.173193 1 0 0
+0.0193572 0.371795 -0.0552791 0 1 0
+-0.339737 0.0418124 0.371795 0 0 1
+-0.251275 -0.371795 0.248892 0 1 0
+0.328871 -0.0379982 0.371795 0 0 1
+0.206557 0.294872 0.231008 0 1 0
+-0.195081 -0.0247395 -0.0630607 0.832799 -0.553412 -0.0134835
+0.372459 -0.365042 0.320513 0.0115246 -0.174088 0.984663
+-0.178298 -0.371795 0.200984 0 1 0
+0.0210868 0.230897 -0.360442 0 1 0
+-0.5 0.329944 -0.0747596 1 0 0
+-0.5 0.230377 0.167204 1 0 0
+0.5 0.15707 0.0297231 1 0 0
+0.221473 0.183644 0.371795 0 0 1
+0.137382 -0.152284 0.355674 -0.64241 0.766361 0
+-0.237593 -0.147361 0.371795 0 0 1
+-0.107768 0.146776 0.320513 0 0 1
+-0.233121 0.371795 0.293893 0 1 0
+0.100595 0.371795 -0.324696 0 1 0
+0.448718 -0.334994 -0.0922934 1 0 0
+-0.0145617 0.371795 -0.279609 0 1 0
+0.5 0.0777319 -0.207413 1 0 0
+-0.22173 0.371795 0.242433 0 1 0
+-0.063208 0.371795 0.266998 0 1 0
+0.447965 -0.371795 -0.14665 -0.611424 0.789481 0.0536723
+-0.473981 -0.294872 -0.213309 0 1 0
+0.119225 -0.294872 -0.244256 0 1 0
+-0.0736975 0.371795 0.146096 0 1 0
+0.0742286 -0.294872 -0.124378 0 1 0
+0.13549 -0.176473 -0.333333 0 0 1
+-0.00733653 0.182098 -0.333333 0 0 1
+0.289888 0.215104 -0.346615 0.607144 0.794517 -0.0109293
+-0.5 -0.0861683 -0.0449676 1 0 0
+0.200574 0.0236777 -0.238324 0.733078 -0.680008 0.0136224
+0.5 -0.2271 -0.202893 1 0 0
+-0.449285 -0.294872 -0.269487 0.847802 0.524688 0.0770383
+-0.204042 0.340259 -0.371795 0 0 1
+-0.320513 -0.0105497 -0.354281 1 0 0
+-0.141154 -0.335365 -0.215376 1 0 0
+0.319545 -0.371795 0.200984 0 1 0
+-0.5 0.0255412 0.0357224 1 0 0
+0.141109 -0.329737 0.186375 1 0 0
+-0.5 -0.0196423 0.267578 1 0 0
+-0.34194 0.218169 -0.371795 0 0 1
+0.435381 0.294872 -0.287708 0 1 0
+0.0661707 0.159144 0.320513 0 0 1
+0.286041 0.223391 -0.371795 0.261806 0.433016 0.862528
+0.197743 0.0196336 -0.279157 0.855296 -0.518071 0.00842182
+0.175211 -0.371795 -0.289467 0 1 0
+0.320513 0.0825206 -0.355102 1 0 0
+-0.0899709 0.161241 -0.333333 0 0 1
+-0.368044 -0.104588 -0.371795 0 0 1
+-0.5 0.0477371 -0.103589 1 0 0
+-0.0712118 -0.164527 -0.333333 0 0 1
+0.5 -0.0709394 -0.342611 1 0 0
+-0.226183 0.114793 -0.333333 0 0 1
+0.168404 -0.371795 0.084996 0 1 0
+-0.078659 0.24041 0.371795 0 0 1
+0.192594 -0.00327518 -0.0814749 0.996352 0.0850446 -0.00708366
+-0.5 -0.153947 -0.0634683 1 0 0
+0.0589961 -0.19602 0.324352 -0.454907 0.817068 0.354202
+0.310801 -0.101247 0.371795 0 0 1
+0.198053 -0.0200767 -0.106151 0.861453 0.50773 -0.010409
+-0.0310822 0.230897 -0.340384 0.0410584 0.986745 0.156996
+0.5 -0.00888925 0.0941888 1 0 0
+0.474621 0.0243113 -0.371795 0 0 1
+-0.5 -0.08472 -0.365168 0.957106 0.0854227 0.276859
+-0.439021 0.365589 -0.371795 0.00392249 -0.0969124 0.995285
+-0.5 0.0792622 -0.196103 1 0 0
+-0.475531 0.0428816 0.320513 0 0 1
+0.112649 0.371795 -0.182796 0 1 0
+0.176913 -0.0197814 0.320513 0 0 1
+-0.34295 -0.274033 -0.371795 0 0 1
+0.476695 -0.0039224 0.320513 0 0 1
+-0.433687 -0.371795 -0.198009 0 1 0
+0.428546 0.294872 -0.0433776 0 1 0
+0.5 -0.152273 -0.256608 1 0 0
+-0.213412 -0.371795 0.137034 0 1 0
+-0.5 0.0924939 0.229044 1 0 0
+0.141109 -0.312417 -0.161992 1 0 0
+-0.5 -0.0527476 0.0784653 1 0 0
+0.319837 -0.036335 0.371795 0 0 1
+0.5 0.196225 -0.0901198 1 0 0
+-0.481232 -0.294872 0.317744 -0.0433512 -0.703927 0.708948
+0.468642 0.264442 0.320513 0 0 1
+0.464916 -0.294872 0.0201008 0 1 0
+0.34544 -0.0353617 0.371795 0 0 1
+-0.35769 -0.105181 -0.371795 0 0 1
+0.408204 -0.371795 0.0222099 0 1 0
+-0.455072 0.371795 -0.321821 0 1 0
+-0.480665 0.112647 -0.371795 0 0 1
+0.5 -0.231248 0.25731 1 0 0
+-0.298812 -0.0477418 -0.333333 0 0 1
+-0.5 -0.00268086 0.0356809 1 0 0
+0.230747 -0.123279 0.371795 0 0 1
+0.171338 0.173289 0.371795 0 0 1
+0.343197 0.199482 -0.371795 0 0 1
+0.49675 -0.294872 0.288929 -0.444758 0.895138 0.0303134
+0.422515 0.276052 -0.371795 0 0 1
+0.286945 0.200489 0.324022 0.458603 0.725924 0.51256
+-0.162089 -0.371795 -0.143036 0 1 0
+0.0978816 -0.0677107 -0.333333 0 0 1
+-0.212461 -0.0660276 0.371795 0 0 1
+0.112566 -0.294872 -0.359164 0 1 0
+0.453773 -0.294872 -0.116016 -0.354888 0.934228 -0.0356727
+0.5 -0.039144 -0.139887 1 0 0
+0.219673 0.294872 -0.135693 0 1 0
+0.326419 -0.240347 0.320513 0 0 1
+0.106484 0.295651 0.320513 0 0 1
+0.263652 0.0198392 -0.0291214 0.868417 0.495792 0.00655641
+-0.294298 0.371795 0.023341 0 1 0
+-0.286848 -0.03799 -0.333333 0 0 1
+0.257818 0.259805 0.320513 0 0 1
+0.0968205 0.371795 -0.359463 0 1 0
+-0.5 0.274997 0.263619 1 0 0
+-0.148982 0.302988 0.320513 0 0 1
+0.350263 0.294872 -0.0433737 0 1 0
+0.176205 -0.371795 0.197826 0 1 0
+-0.5 -0.101582 -0.268321 1 0 0
+0.5 -0.201229 0.158032 1 0 0
+-0.0164002 -0.294872 -0.308595 0 1 0
+-0.350909 0.314018 -0.371795 0 0 1
+0.168567 -0.371795 -0.306222 0 1 0
+0.0999227 0.319253 -0.371795 0 0 1
+0.5 -0.0959774 0.224153 1 0 0
+-0.216831 -0.189935 0.371795 0 0 1
+0.481459 -0.0403383 0.320513 0 0 1
+0.245725 0.0417701 -0.333333 0.0576395 0.226331 0.972344
+-0.0380268 -0.256282 0.357929 0 1 0
+0.200851 -0.00110089 0.0050756 -0.527182 -0.0374515 0.848927
+-0.448329 0.348104 -0.371795 0 0 1
+-0.448718 -0.311556 0.0390285 1 0 0
+-0.478934 -0.195526 -0.371795 0 0 1
+-0.283213 0.251448 0.320513 0 0 1
+0.5 -0.132968 -0.281068 1 0 0
+-0.171867 -0.136241 -0.333333 0 0 1
+0.00939712 0.0710188 0.320513 0 0 1
+0.233395 -0.371795 -0.329985 0 1 0
+-0.361672 0.371795 -0.0989419 0 1 0
+-0.5 0.271683 0.0524623 1 0 0
+-0.102455 0.116032 -0.333333 0 0 1
+0.141026 0.3523 -0.351426 1 0 0
+-0.5 0.191343 -0.329446 1 0 0
+-0.0231395 -0.294872 -0.0161669 0 1 0
+0.211573 0.0333251 -0.324041 -0.497725 0.866848 0.0290589
+0.334158 -0.371795 -0.128972 0 1 0
+-0.430528 0.371795 -0.203785 0 1 0
+-0.153538 0.371795 -0.326994 0 1 0
+-0.288322 -0.260995 0.320513 0 0 1
+-0.0386167 0.371795 -0.117651 0 1 0
+0.106736 0.371795 -0.143702 0 1 0
+-0.0721734 0.319497 0.320513 0 0 1
+-0.238576 -0.233852 0.320513 0.0335002 -0.503892 0.863117
+-0.242123 0.340064 -0.371795 0 0 1
+0.449916 0.232976 -0.371795 0 0 1
+0.409595 0.276832 0.320513 0 0 1
+0.219163 0.149291 0.371795 0 0 1
+0.202196 0.0343477 0.320513 0.876269 0.182721 -0.445831
+-0.387674 0.371795 -0.217538 0 1 0
+0.141026 0.297223 0.11465 0.87086 0.465009 -0.15928
+-0.219532 -0.371795 -0.316636 0 1 0
+0.5 0.250597 0.136963 1 0 0
+0.0972589 0.371795 -0.101995 0 1 0
+0.396688 0.112297 0.320513 0 0 1
+-0.334772 -0.323082 0.320513 0 0 1
+0.5 -0.0820197 0.00664985 1 0 0
+0.0281457 0.0381537 -0.333333 0 0 1
+0.5 -0.0424864 -0.0779824 1 0 0
+-0.069445 -0.294872 -0.127082 0 1 0
+0.5 0.0147644 -0.0255983 1 0 0
+0.141026 0.301629 0.0630063 0.981492 0.178696 -0.0688588
+0.417691 0.0643546 -0.371795 0 0 1
+-0.458344 -0.294872 -0.258535 0 1 0
+0.5 -0.288846 -0.35112 0.941472 -0.325711 0.086846
+-0.5 0.268098 0.189773 1 0 0
+0.15943 0.230897 -0.364966 0.00410772 0.994288 0.106654
+0.327237 -0.371795 0.159945 0 1 0
+0.206782 0.197559 0.371795 0 0 1
+-0.187049 -0.371795 0.0808441 0 1 0
+0.456709 0.294872 -0.086479 0 1 0
+-0.443872 -0.371795 0.302044 0.339068 0.940749 0.00490574
+-0.5 0.0331012 0.282358 1 0 0
+-0.220446 0.238427 0.358911 -0.349479 0.936944 0
+0.0427812 -0.294872 0.282077 0 1 0
+0.141026 0.303338 -0.083181 1 0 0
+0.079113 0.037414 0.320513 0 0 1
+0.230102 -0.227939 0.371795 -0.0425825 -0.064773 0.996991
+-0.377895 -0.371795 0.0584083 0 1 0
+0.101998 -0.116018 -0.333333 0 0 1
+-0.303804 0.371795 -0.129978 0 1 0
+-0.435735 -0.371795 0.0143339 0 1 0
+-0.159711 0.150559 -0.333333 0 0 1
+0.462606 0.294872 0.125244 0 1 0
+-0.459483 0.105196 0.320513 0 0 1
+0.320403 -0.155233 -0.355744 0.998358 -0.0568899 -0.00662245
+-0.467514 -0.203285 0.320513 0 0 1
+-0.5 0.262711 0.25288 1 0 0
+0.253002 -0.371795 -0.371405 -0.124674 0.863853 0.488072
+0.141026 0.356146 -0.331976 1 0 0
+0.427601 0.294872 -0.344853 0 1 0
+0.5 -0.13633 -0.272455 1 0 0
+-0.219191 0.0149419 -0.0204528 0.295863 0.407592 0.863906
+0.390807 -0.200212 -0.371795 0 0 1
+-0.446188 -0.371795 0.0369787 0.3229 0.945388 -0.0444687
+0.478882 0.294872 -0.249997 0 1 0
+-0.447004 0.184411 0.320513 0 0 1
+0.0296362 0.334723 0.320513 0 0 1
+-0.363041 -0.207385 0.320513 0 0 1
+0.5 -0.244151 -0.301452 1 0 0
+0.125216 0.367575 0.320513 0.0563396 0.213525 0.975312
+-0.252594 -0.0377292 -0.284766 0.477242 0.878715 -0.0100476
+-0.5 -0.132335 -0.0611515 1 0 0
+-0.0174961 -0.24527 -0.371795 0 0 1
+-0.25534 0.371795 0.226231 0 1 0
+-0.141154 -0.353086 0.315483 0.814139 0.00891719 0.580602
+0.5 0.269369 0.311914 0.9999 0.00491499 0.0132827
+0.5 -0.261925 -0.25805 1 0 0
+-0.038782 0.013584 -0.333333 0 0 1
+-0.0817041 0.371795 -0.301601 0 1 0
+-0.227489 0.218377 0.371795 0 0 1
+0.259 0.294872 -0.265885 0 1 0
+-0.0339803 0.0129507 -0.333333 0 0 1
+-0.0889232 0.209319 -0.333333 0 0 1
+-0.141154 -0.348526 -0.254493 1 0 0
+0.24726 -0.0345866 -0.258803 -0.477353 0.878705 -0.003409
+-0.0624524 0.241896 -0.371795 0 0 1
+-0.30276 0.186959 0.34922 0.707107 -0.707107 0
+0.5 0.111695 -0.0908514 1 0 0
+-0.146393 0.147736 0.371795 0.241238 -0.281821 0.928645
+-0.283437 -0.203115 0.345296 0.599294 0.800529 0
+-0.111865 -0.294872 0.105879 0 1 0
+0.5 0.105811 0.0497039 1 0 0
+-0.382631 -0.0259532 0.343473 0.997081 0.0763449 -0.000490324
+-0.1091 -0.173546 0.356831 0.499723 0.866152 0.00757739
+-0.400469 0.0455818 0.320513 0 0 1
+-0.5 -0.024004 -0.101806 1 0 0
+0.441549 -0.371795 0.165688 -0.21313 0.976977 0.00958459
+0.184731 -0.371795 -0.0715306 0 1 0
+-0.440794 -0.371795 0.253378 0.242111 0.96403 -0.109677
+-0.1525 0.371795 0.198188 0 1 0
+-0.274799 0.297643 0.320513 0 0 1
+-0.491168 0.371795 0.168709 -0.137971 0.99041 -0.0072623
+-0.0578739 -0.196406 0.332235 0.314141 0.949372 -0.00303248
+-0.0985662 -0.294872 -0.295028 0 1 0
+-0.379003 -0.0496911 0.362562 0.977866 0.202308 -0.0533752
+-0.234162 0.20568 -0.333333 0 0 1
+-0.305645 0.371795 -0.226194 0 1 0
+-0.127159 -0.294872 -0.351353 0 1 0
+0.5 -0.098867 -0.292229 1 0 0
+-0.484705 0.0299827 0.320513 0 0 1
+-0.200646 0.365488 0.320513 -0.0979831 0.410777 0.906455
+-0.273863 -0.157333 -0.333333 0 0 1
+0.317019 -0.371795 -0.0495018 0 1 0
+0.192869 -0.00641667 -0.0771324 0.988677 0.149725 0.0100482
+-0.0444437 0.371795 0.111007 0 1 0
+0.0184325 -0.0221122 0.320513 0 0 1
+0.5 0.279356 -0.182245 1 0 0
+0.5 -0.196986 -0.139751 1 0 0
+-0.178611 0.371795 0.271215 0 1 0
+0.457943 -0.294872 -0.187295 -0.0405666 0.999001 0.0187241
+-0.5 -0.0796179 -0.285855 1 0 0
+-0.274233 -0.00143518 -0.303952 0.996385 0.0848911 0.0032263
+-0.187754 0.362572 0.320513 -0.018074 0.0500775 0.998582
+0.331576 -0.0212213 -0.371795 0 0 1
+0.278895 -0.359816 0.320513 0 0 1
+0.0977741 0.244828 0.371795 0 0 1
+-0.453468 0.216257 0.320513 0 0 1
+0.31954 0.165098 -0.356673 0.991093 0.132884 -0.00873224
+0.389609 -0.371795 0.288189 0 1 0
+0.5 -0.0320194 0.0581315 1 0 0
+-0.400245 -0.371795 0.113772 0 1 0
+-0.334454 -0.322649 -0.371795 0 0 1
+-0.465942 0.250866 -0.371795 0 0 1
+-0.0527846 -0.113314 0.320513 0 0 1
+0.5 -0.122251 0.304541 1 0 0
+0.00336216 -0.230897 -0.338455 0.178462 0.927194 -0.329336
+0.5 -0.2392 0.154443 1 0 0
+0.448718 -0.338929 -0.00493016 1 0 0
+0.416629 0.294872 -0.331549 0 1 0
+-0.155182 -0.289127 -0.371795 0 0 1
+0.196107 -0.246837 0.336479 -0.24256 0.970136 0
+-0.5 0.206363 -0.296136 1 0 0
+-0.34942 0.12827 0.369441 0.847926 -0.38967 -0.359416
+0.270388 0.294872 -0.206752 0 1 0
+0.260937 0.0237165 -0.287491 0.801331 0.598058 -0.0139725
+0.128667 0.371795 0.0779363 0 1 0
+0.264601 0.294872 0.265874 0 1 0
+0.147982 -0.113245 0.320513 0 0 1
+0.361819 0.136202 0.320513 0 0 1
+-0.141154 -0.340616 -0.155742 1 0 0
+-0.126462 0.335369 -0.371795 0 0 1
+0.00911061 -0.294872 0.252722 0 1 0
+-0.365402 0.371795 0.129735 0 1 0
+-0.412145 0.331307 0.320513 0 0 1
+0.276829 -0.371795 -0.296046 0 1 0
+0.448718 -0.317037 0.0876674 1 0 0
+0.5 0.122984 -0.128673 1 0 0
+-0.141154 -0.350328 0.0268551 1 0 0
+-0.215884 -0.301696 -0.371795 0 0 1
+-0.25154 -0.0382273 -0.15762 0.503328 0.864077 -0.00564674
+-0.5 0.349291 0.00428879 1 0 0
+-0.105156 0.371795 -0.343684 0 1 0
+0.146837 0.294872 -0.339358 0.278894 0.95972 0.0339991
+-0.255595 0.229847 -0.355688 -0.160204 0.987042 0.00908261
+-0.248987 0.00571883 -0.0205716 -0.501817 0.153269 0.851286
+0.0954319 0.371795 -0.202708 0 1 0
+-0.312881 0.0402938 -0.333333 -0.217453 0.139645 0.96603
+0.294528 -0.119017 -0.333333 0 0 1
+0.233949 -0.371795 0.275583 0 1 0
+0.125125 0.230897 -0.346981 0 1 0
+-0.303 -0.371795 0.276226 0 1 0
+0.482986 -0.111599 -0.371795 0 0 1
+0.419317 -0.15567 -0.371795 0 0 1
+0.5 -0.00323815 -0.26744 1 0 0
+-0.470292 -0.288439 0.320513 -0.0757702 -0.355487 0.931605
+0.329279 -0.00341524 -0.371795 0.241584 0.0750472 0.967474
+-0.336368 0.213457 -0.371795 0 0 1
+-0.422631 -0.236042 -0.371795 0 0 1
+-0.112508 0.171645 0.371307 -0.372901 0.698813 -0.610414
+0.278795 -0.356855 -0.371795 0 0 1
+-0.0186438 -0.294872 -0.252062 0 1 0
+0.5 0.185459 0.0459464 1 0 0
+-0.0563325 0.201703 -0.333333 0 0 1
+0.414999 -0.371795 -0.359407 0 1 0
+-0.132045 0.0560181 0.320513 0 0 1
+-0.5 -0.248047 -0.331674 1 0 0
+-0.177487 0.371795 -0.21746 0 1 0
+-0.367069 -0.176714 -0.371795 0 0 1
+-0.448718 -0.350616 0.205627 1 0 0
+0.5 0.146935 0.192219 1 0 0
+-0.5 0.00574307 0.121398 1 0 0
+0.5 0.187647 0.257966 1 0 0
+0.11738 0.371795 0.0901324 0 1 0
+0.175007 -0.106126 0.338442 0.839102 -0.543973 0
+-0.0756041 -0.146047 -0.333333 0 0 1
+-0.5 -0.0238363 0.251227 1 0 0
+0.141026 0.344515 0.118016 1 0 0
+0.125755 0.256282 0.341573 0.0195083 0.999805 -0.00319905
+0.105391 -0.054421 -0.333333 0 0 1
+-0.0637772 0.160821 0.320513 0 0 1
+0.421322 0.0251648 0.320513 0 0 1
+-0.140733 0.0128244 0.320513 0 0 1
+-0.252103 0.0379647 -0.199764 -0.489304 0.871398 0.0353195
+0.324389 0.294872 0.124499 0 1 0
+0.325328 -0.371795 0.226349 0 1 0
+0.5 0.293042 0.304966 0.908139 0.401331 -0.119235
+0.409483 -0.00942249 -0.371795 0 0 1
+0.5 0.0204363 -0.126073 1 0 0
+0.30551 -0.27305 0.320513 0 0 1
+0.314842 0.294872 0.00151364 0 1 0
+0.312043 -0.371795 -0.0229347 0 1 0
+0.5 0.109961 -0.317647 1 0 0
+-0.082257 0.246652 0.371795 0 0 1
+0.472522 -0.294872 0.171473 0 1 0
+-0.470387 -0.294872 -0.0710342 0 1 0
+-0.448718 -0.320646 0.145657 1 0 0
+-0.485094 -0.294872 0.085032 0 1 0
+0.0051237 -0.230897 -0.363132 -0.0331009 0.973463 -0.226439
+-0.329372 -0.371795 0.101367 0 1 0
+-0.298353 0.113419 -0.333333 0 0 1
+-0.5 0.158688 0.0230543 1 0 0
+-0.0736778 0.371795 -0.129568 0 1 0
+-0.101941 0.371795 0.0655386 0 1 0
+-0.454959 0.347792 -0.371795 0 0 1
+-0.5 -0.130241 -0.31262 1 0 0
+0.5 -0.0903919 0.000278865 1 0 0
+-0.204992 0.00318244 0.348671 0.999455 -0.0320963 0.0077363
+0.5 -0.276431 -0.273276 1 0 0
+-0.167572 0.117506 0.341789 0.837157 -0.546963 0
+0.265823 -0.197489 0.371795 0 0 1
+0.332757 -0.371795 0.109157 0 1 0
+0.0468207 -0.224083 0.371795 0 0 1
+-0.394365 -0.183654 0.320513 0 0 1
+-0.141154 -0.333011 -0.234856 1 0 0
+0.5 0.245345 0.163175 1 0 0
+-0.5 -0.226345 -0.154166 1 0 0
+0.141109 -0.306034 0.0924867 1 0 0
+-0.265102 -0.371795 -0.120588 0 1 0
+0.207456 0.294872 0.158451 0 1 0
+-0.268406 -0.0219559 -0.0611105 0.860763 0.50897 0.00598803
+-0.114294 -0.00883113 0.320513 0 0 1
+0.103699 0.318332 -0.371795 0 0 1
+0.141026 0.358301 -0.173369 1 0 0
+-0.141154 -0.315621 -0.264277 1 0 0
+0.219863 -0.371795 0.160667 0 1 0
+-0.363542 -0.259839 -0.371795 0 0 1
+0.227279 -0.371795 0.270023 0 1 0
+-0.5 -0.135831 -0.320463 1 0 0
+-0.5 -0.230461 -0.10069 1 0 0
+0.144512 -0.0987161 -0.333333 0 0 1
+0.5 -0.190007 0.292897 1 0 0
+-0.472514 -0.294872 -0.202954 0 1 0
+0.203515 0.0210118 0.35695 0.996585 0.0825698 0
+-0.138071 0.371795 0.12542 0 1 0
+0.5 -0.130254 -0.0821677 1 0 0
+-0.367982 -0.371795 -0.298525 0 1 0
+-0.479767 0.371795 -0.218157 0 1 0
+0.5 0.121354 -0.10415 1 0 0
+0.229999 -0.371795 -0.314693 0 1 0
+-0.0744394 0.191665 -0.333333 0 0 1
+0.196237 -0.222702 0.371795 0 0 1
+0.226328 -0.371795 -0.0243961 0 1 0
+-0.344022 -0.220887 0.320513 0 0 1
+0.168189 -0.222529 0.371795 0 0 1
+0.141026 0.364413 -0.164363 0.992453 0.110739 -0.0526658
+-0.437551 -0.371795 -0.169415 0.0299638 0.999531 -0.00625281
+-0.0571445 0.255101 0.371795 0.0644095 0.426426 0.902226
+-0.5 0.1201 0.0675737 1 0 0
+0.100806 -0.0343123 0.320513 0 0 1
+-0.05263 0.230897 -0.334358 0.149114 0.554406 0.818779
+0.0133796 0.211194 0.371795 0.0191481 -0.149007 0.988651
+0.0754369 -0.294872 -0.254747 0 1 0
+0.189801 -0.147474 0.371795 0 0 1
+-0.5 -0.0370161 -0.0774296 1 0 0
+-0.5 0.353018 0.115349 1 0 0
+-0.109879 -0.294872 0.0153773 0 1 0
+0.325028 -0.371795 0.296562 0 1 0
+-0.45816 0.0115025 0.320513 0 0 1
+-0.469929 0.371795 0.131351 0 1 0
+-0.191095 0.371795 -0.0523401 0 1 0
+0.240925 -0.371795 0.167363 0 1 0
+0.5 0.124194 -0.205056 1 0 0
+-0.382655 -0.183678 -0.371795 0 0 1
+0.405751 0.258679 0.320513 0 0 1
+0.5 -0.19894 -0.168325 1 0 0
+0.348706 0.160174 0.320513 0 0 1
+0.461142 -0.0345362 -0.371795 0 0 1
+0.172722 -0.244753 -0.371795 0 0 1
+-0.319539 -0.371795 -0.349225 0 1 0
+-0.190115 -0.0155667 -0.158114 0.938801 -0.344437 -0.00402399
+-0.5 0.083893 -0.266723 1 0 0
+-0.412008 0.371795 -0.313889 0 1 0
+0.442647 0.174359 -0.371795 0 0 1
+0.5 0.082187 -0.225178 1 0 0
+0.5 -0.0638586 0.0702811 1 0 0
+-0.271825 0.371795 -0.268568 0 1 0
+0.19264 -0.00379325 -0.181793 0.996422 0.0845128 0.00121645
+0.5 -0.184372 -0.168512 1 0 0
+0.0182862 0.371795 -0.163062 0 1 0
+0.19959 0.0487755 -0.333333 0 0 1
+0.120453 -0.294872 0.259698 0 1 0
+-0.141154 -0.339575 -0.218674 1 0 0
+0.141109 -0.356361 0.122223 1 0 0
+0.5 -0.0526292 -0.363941 0.976197 0.0339167 -0.21422
+0.5 -0.207039 0.246981 1 0 0
+0.5 -0.0239937 0.140543 1 0 0
+0.297587 0.0847159 -0.333333 0 0 1
+-0.462105 -0.294872 -0.0558598 0 1 0
+-0.0550264 -0.294872 0.269484 0 1 0
+-0.363992 0.327123 0.320513 0 0 1
+0.0525532 0.371795 0.247941 0 1 0
+-0.5 0.128985 0.264932 1 0 0
+0.5 0.133213 -0.188755 1 0 0
+0.317859 -0.185267 -0.371795 0.20864 0.0252339 0.977667
+0.470657 0.294872 0.266232 0 1 0
+-0.48072 0.215911 -0.371795 0 0 1
+0.284755 0.294872 0.127879 0 1 0
+-0.5 -0.212554 -0.0383097 1 0 0
+0.141109 -0.363122 -0.193899 0.987196 0.157019 -0.0280788
+0.215448 -0.105554 0.371795 0 0 1
+-0.0395292 -0.294872 -0.36262 -0.0186378 0.993632 0.11112
+-0.0538688 0.371795 -0.0636574 0 1 0
+0.5 -0.157837 -0.109679 1 0 0
+0.263372 0.294872 0.231765 0 1 0
+0.45308 -0.294872 0.0914838 -0.609321 0.787086 -0.0960331
+0.420744 -0.371795 0.163571 0 1 0
+-0.0381013 -0.294872 0.252753 0 1 0
+-0.279529 0.162897 0.371795 0 0 1
+-0.24722 -0.0402419 -0.163379 0.39906 0.916924 0.00134933
+0.419834 -0.371795 0.20033 0 1 0
+0.48628 0.294872 -0.0645547 0 1 0
+-0.5 0.334531 0.0647473 1 0 0
+-0.5 -0.0712686 -0.17547 1 0 0
+0.0286352 -0.294872 0.213861 0 1 0
+0.284834 -0.371795 -0.330813 0 1 0
+-0.327415 -0.371795 -0.0461641 0 1 0
+0.5 0.0548136 -0.137587 1 0 0
+-0.5 0.0580078 -0.243797 1 0 0
+-0.146574 0.358657 -0.371795 0 0 1
+0.5 -0.278549 0.132207 1 0 0
+-0.346975 -0.132748 0.351784 0.865667 0.500617 -0.00173991
+0.183626 0.294872 0.111298 0 1 0
+0.253255 0.0812769 -0.333333 0 0 1
+0.141109 -0.315677 0.0464244 1 0 0
+0.5 0.0459638 0.261644 1 0 0
+0.333525 -0.217836 -0.371795 0 0 1
+0.0913714 -0.294872 0.138156 0 1 0
+0.5 0.102032 0.319273 0.803692 -0.0538396 0.592605
+-0.141154 -0.324358 -0.0214893 1 0 0
+-0.5 0.217294 -0.211192 1 0 0
+-0.345986 0.13456 0.371287 0.639804 -0.403991 -0.65379
+0.264977 0.0173036 -0.164278 0.892997 0.450063 0
+0.193052 0.12732 0.371795 0 0 1
+0.379573 0.294872 -0.293787 0 1 0
+0.5 0.193577 0.255113 1 0 0
+0.5 -0.0638871 -0.24029 1 0 0
+0.455905 0.294872 -0.0569167 0 1 0
+0.232966 -0.00417167 0.0202696 0.0802041 -0.271389 0.959122
+-0.0812043 -0.294872 -0.147033 0 1 0
+0.217138 0.294872 0.212056 0 1 0
+0.5 0.142117 0.102111 1 0 0
+0.141026 0.359139 0.231704 0.999684 0.0245468 -0.00540583
+-0.5 0.00272261 0.0694302 1 0 0
+-0.118249 0.0673331 0.320513 0 0 1
+0.141026 0.303806 -0.0220616 0.990989 0.120216 0.0590673
+-0.495312 -0.132432 0.320513 -0.0996865 0.0125805 0.994939
+0.295446 0.294872 0.303262 0 1 0
+-0.141154 -0.339795 0.0882932 1 0 0
+0.141026 0.304697 0.251459 1 0 0
+-0.0358851 -0.201396 0.331145 0.187896 0.973054 0.133647
+-0.253669 -0.371795 -0.163786 0 1 0
+0.126776 -0.264314 -0.371795 0 0 1
+-0.5 0.142536 -0.295226 1 0 0
+0.454643 -0.0506438 0.320513 0 0 1
+0.359147 0.294872 -0.31213 0 1 0
+0.5 0.15008 0.144144 1 0 0
+-0.5 -0.0676741 -0.00198452 1 0 0
+0.121874 -0.0750213 0.320513 0 0 1
+0.213893 0.0153128 0.00938151 -0.374939 0.355169 0.856315
+-0.5 -0.0849177 -0.242652 1 0 0
+0.496991 0.186919 0.320513 0.274235 0.0129829 0.961575
+0.322794 0.294872 -0.164698 0 1 0
+-0.362223 -0.371795 0.114498 0 1 0
+0.5 -0.166774 -0.325909 1 0 0
+-0.448718 -0.361889 -0.251729 0.999936 0.0112913 -0.000625994
+-0.105714 -0.294872 -0.0713303 0 1 0
+-0.448718 -0.343887 -0.322646 1 0 0
+-0.229396 -0.371795 -0.0550071 0 1 0
+-0.173749 0.2517 0.322484 -0.187572 0.867815 0.460123
+0.398767 -0.314898 0.320513 0 0 1
+-0.29106 -0.256797 -0.371795 0 0 1
+-0.21898 -0.0417969 -0.0549886 -0.257201 0.966253 -0.0142326
+-0.141154 -0.330134 -0.0374132 1 0 0
+-0.0449266 0.371795 -0.111083 0 1 0
+-0.226559 -0.344701 0.320513 0 0 1
+0.290514 0.294872 0.0466738 0 1 0
+0.5 -0.172981 -0.220359 1 0 0
+0.187941 0.294872 -0.282612 0 1 0
+0.232242 -0.371795 0.16235 0 1 0
+0.0672551 0.371795 -0.201466 0 1 0
+-0.128347 -0.294872 -0.0583913 0 1 0
+-0.10287 -0.123544 -0.333333 0 0 1
+-0.146174 -0.332391 0.320513 0.180199 -0.00911521 0.983588
+0.296477 0.294872 0.0187474 0 1 0
+0.448718 -0.34288 0.102695 1 0 0
+0.428586 -0.371795 0.220641 0 1 0
+-0.0462193 0.0884148 0.320513 0 0 1
+0.100548 -0.101571 0.320513 0 0 1
+-0.5 0.312291 0.0368115 1 0 0
+0.280739 -0.371795 -0.319135 0 1 0
+-0.160624 -0.0520148 0.320513 0 0 1
+-0.264949 0.371795 0.217297 0 1 0
+0.239628 0.185841 0.371795 0 0 1
+0.5 0.253649 -0.131137 1 0 0
+0.5 0.0593332 -0.357762 1 0 0
+-0.313023 0.0807993 -0.333333 -0.208262 0.0252939 0.977746
+0.0552247 0.278601 0.320513 0 0 1
+-0.156543 -0.0655634 0.320513 0 0 1
+0.320513 -0.0787802 -0.341754 0.977557 0.0590909 0.202215
+0.3865 -0.185296 -0.371795 0 0 1
+-0.295639 0.371795 0.0997354 0 1 0
+0.131413 0.364046 0.320513 0 0 1
+0.134956 0.273592 0.320513 0 0 1
+-0.190742 0.31201 0.320513 0 0 1
+0.11438 0.32914 -0.371795 0 0 1
+-0.341615 -0.371795 0.0793092 0 1 0
+-0.466435 0.00258472 0.320513 0 0 1
+-0.196899 0.371795 -0.172609 0 1 0
+0.0718444 -0.246482 -0.371795 0 0 1
+-0.391182 -0.0199385 0.320513 -0.0236877 -0.0116256 0.999652
+0.5 -0.100855 0.154923 1 0 0
+-0.187819 -0.00730452 -0.0466673 0.975204 -0.219586 0.0275575
+-0.216551 -0.31021 -0.371795 0 0 1
+0.118815 0.30496 0.320513 0 0 1
+-0.5 0.079803 -0.341973 1 0 0
+0.147247 0.294872 0.0448439 0.174693 0.984382 -0.0217682
+-0.48474 0.371795 0.272833 0 1 0
+0.232912 -0.215959 -0.333333 0 0 1
+-0.36608 0.371795 -0.354639 0 1 0
+-0.435838 -0.224977 -0.371795 0 0 1
+-0.181556 -0.0333526 -0.333333 0 0 1
+-0.364523 -0.0978937 0.353961 0.936943 0.349484 0
+0.282674 0.294872 0.0828771 0 1 0
+-0.21966 -0.252851 0.320513 0 0 1
+-0.284407 -0.257672 0.320513 0 0 1
+0.325978 -0.371795 0.0655508 0 1 0
+0.238187 -0.0376793 -0.171443 -0.171724 0.984549 -0.034278
+-0.0132122 0.371795 0.147106 0 1 0
+0.401927 -0.176798 0.320513 0 0 1
+0.5 0.0598699 0.0352828 1 0 0
+0.30095 -0.113888 0.371795 0 0 1
+-0.179976 0.250345 0.330759 -0.134746 0.982393 0.129414
+0.258036 0.018592 0.371795 0 0 1
+-0.5 0.0876815 0.0493341 1 0 0
+0.252851 -0.371795 0.233473 0 1 0
+-0.0893319 -0.07381 -0.333333 0 0 1
+0.470606 -0.294872 0.269877 0 1 0
+-0.437207 0.371795 -0.371235 0.0360265 -0.707735 0.705559
+-0.5 -0.0962211 0.294288 1 0 0
+-0.280169 0.17393 -0.333333 0 0 1
+-0.451623 -0.294872 0.233932 0.51977 0.85184 -0.0648694
+0.0260056 0.0711118 0.320513 0 0 1
+0.194769 -0.342307 -0.371795 0 0 1
+0.0924303 0.371795 -0.142275 0 1 0
+0.320513 0.0230194 -0.335831 0.959225 0.0118677 0.282393
+-0.335136 0.371795 -0.265452 0 1 0
+0.13156 0.371795 0.0879568 0.177564 0.984107 -0.0020519
+-0.369922 0.371795 -0.232478 0 1 0
+-0.0693723 -0.195447 0.371795 0.252525 0.571674 0.780653
+-0.40062 0.228515 0.320513 0 0 1
+0.223483 -0.251092 -0.371795 0 0 1
+-0.205182 0.258636 -0.371795 0 0 1
+-0.394405 -0.357362 -0.371795 0 0 1
+0.093276 -0.294872 -0.0407112 0 1 0
+0.347856 0.0353023 -0.371795 0 0 1
+-0.110192 0.371795 0.0915091 0 1 0
+-0.435255 -0.371795 0.269598 0 1 0
+-0.118285 -0.20261 0.371795 0 0 1
+0.108617 0.316868 -0.371795 0 0 1
+0.109325 0.371795 0.163758 0 1 0
+-0.5 0.000529518 0.175858 1 0 0
+-0.448718 -0.309984 -0.00776786 1 0 0
+0.337486 -0.01926 -0.371795 0 0 1
+-0.448718 -0.336037 0.260995 1 0 0
+0.5 -0.185994 -0.245456 1 0 0
+-0.5 0.00987742 0.134207 1 0 0
+-0.484867 0.371795 -0.305055 0 1 0
+-0.5 -0.000874229 -0.0883484 1 0 0
+-0.411008 0.371795 -0.236207 0 1 0
+-0.242889 -0.175474 0.371795 0 0 1
+0.0917724 0.302063 0.320513 0 0 1
+-0.126198 0.371795 0.179673 0 1 0
+-0.5 0.279217 0.221272 1 0 0
+0.458833 -0.294872 -0.15403 -0.0498694 0.998674 0.0127651
+-0.402787 0.371795 0.305721 0 1 0
+-0.268735 0.210191 -0.333333 0 0 1
+-0.118997 0.371795 -0.0629174 0 1 0
+0.37302 -0.371795 0.0739601 0 1 0
+0.5 -0.0896438 -0.281892 1 0 0
+-0.203784 0.170735 0.371795 0 0 1
+0.0843612 -0.119636 -0.333333 0 0 1
+0.5 -0.116013 0.152844 1 0 0
+-0.5 -0.273589 0.0860189 1 0 0
+0.287084 -0.371795 -0.0419959 0 1 0
+-0.0610602 -0.151368 0.320513 0 0 1
+0.320513 0.0282739 -0.351164 1 0 0
+-0.198035 -0.371795 0.160543 0 1 0
+-0.448718 -0.31804 -0.367058 0.937102 -0.0752535 0.340846
+0.320513 -0.134942 -0.342691 1 0 0
+-0.448718 -0.319801 -0.29255 1 0 0
+-0.290328 0.371795 0.148865 0 1 0
+0.232725 -0.371795 -0.181757 0 1 0
+-0.26048 0.371795 -0.28596 0 1 0
+0.476341 -0.294872 -0.213075 0 1 0
+-0.31382 0.103252 -0.333333 -0.340751 0.0691173 0.93761
+-0.0166465 -0.256706 0.320513 0.15672 -0.399021 0.90345
+-0.30597 0.371795 -0.250708 0 1 0
+-0.448718 -0.29648 0.289802 0.771229 0.628079 0.103551
+-0.204626 0.059505 -0.333333 0 0 1
+-0.47855 -0.294872 0.257201 0 1 0
+-0.303409 -0.128601 0.371795 0 0 1
+-0.31155 -0.371795 0.229491 0 1 0
+-0.5 0.0554428 0.0919592 1 0 0
+0.168941 0.115411 0.357763 0.837166 0.546948 0
+-0.299192 0.10827 0.371795 0 0 1
+0.0975468 0.341923 0.320513 0 0 1
+0.5 0.172837 -0.037303 1 0 0
+-0.0269461 -0.150036 0.320513 0 0 1
+0.248121 -0.321995 0.320513 0 0 1
+-0.0320142 0.333046 -0.371795 0 0 1
+0.5 0.0198254 0.3157 0.78289 0.0979584 0.6144
+0.49263 -0.0999057 -0.371795 -0.163713 -0.0991872 0.981509
+0.219162 0.294872 -0.122803 0 1 0
+0.5 -0.258153 -0.266497 1 0 0
+-0.0114106 0.152436 -0.333333 0 0 1
+0.303879 -0.371795 -0.273518 0 1 0
+-0.278522 0.184479 0.371795 0 0 1
+-0.386538 0.11796 0.320513 0 0 1
+-0.306118 -0.326156 0.320513 0 0 1
+-0.0300189 0.371795 -0.148378 0 1 0
+0.5 0.240358 -0.279006 1 0 0
+-0.5 0.129385 -0.330199 1 0 0
+-0.432986 -0.371795 -0.0162633 0 1 0
+0.327352 -0.147534 0.371795 0.0307245 -0.0270834 0.999161
+-0.0619916 -0.294872 0.126714 0 1 0
+-0.5 0.124455 -0.0299796 1 0 0
+-0.194075 -0.371795 -0.190814 0 1 0
+-0.046873 0.371795 -0.327302 0 1 0
+-0.5 0.283688 0.230948 1 0 0
+0.5 0.0474555 0.166487 1 0 0
+-0.387585 0.371795 0.305437 0 1 0
+-0.271233 0.371795 -0.119059 0 1 0
+0.379162 -0.32977 0.320513 0 0 1
+0.216594 -0.371795 -0.341736 0 1 0
+-0.428205 0.371795 -0.169166 0 1 0
+-0.125184 0.371795 -0.166344 0 1 0
+-0.497578 0.00784474 -0.371795 0.350512 -0.0210103 0.936323
+-0.5 0.335373 -0.26474 1 0 0
+-0.421135 0.0483905 -0.371795 0 0 1
+0.239917 0.21362 0.371795 0 0 1
+-0.0476367 0.371795 0.218048 0 1 0
+-0.432848 -0.371795 -0.271401 0 1 0
+-0.0332604 0.0548222 -0.333333 0 0 1
+0.278509 0.142784 -0.333333 0 0 1
+0.132688 0.132001 -0.333333 0 0 1
+-0.18952 -0.371795 -0.282519 0 1 0
+0.149095 0.183363 -0.333333 0 0 1
+0.310203 0.179516 0.345046 0.707107 0.707107 0
+0.42382 -0.371795 0.255528 0 1 0
+-0.141154 -0.357647 -0.0496668 1 0 0
+0.0791126 0.0614986 0.320513 0 0 1
+0.5 -0.100915 0.129926 1 0 0
+0.395054 -0.371795 0.0347934 0 1 0
+-0.5 0.201398 0.16146 1 0 0
+-0.470121 -0.294872 -0.175974 0 1 0
+-0.395454 -0.371795 0.127345 0 1 0
+-0.5 0.269381 0.175149 1 0 0
+-0.0962023 -0.249539 -0.371795 0 0 1
+-0.119574 0.269802 -0.371795 0 0 1
+0.5 0.136927 -0.197677 1 0 0
+-0.480543 -0.278678 0.320513 0 0 1
+-0.470051 -0.294872 0.217912 0 1 0
+0.0395218 -0.0756101 0.320513 0 0 1
+-0.174657 -0.361935 0.320513 -0.0221039 -0.0930447 0.995417
+-0.226015 0.0431739 -0.302248 0.04178 0.999044 -0.012858
+-0.5 0.255066 -0.24668 1 0 0
+-0.111959 0.371795 0.227152 0 1 0
+0.233944 0.233392 0.329194 0.372451 0.920971 0.114422
+0.141026 0.308733 0.00184936 1 0 0
+0.25084 0.294872 0.225389 0 1 0
+0.392809 0.271549 0.320513 0 0 1
+0.144916 -0.371795 -0.0649521 0.535829 0.814095 -0.223913
+-0.31617 0.0297707 -0.333333 -0.294169 0.04505 0.954691
+0.0409575 0.371795 -0.0198477 0 1 0
+0.320513 0.118953 -0.357202 1 0 0
+-0.481474 -0.294872 -0.367165 0.140635 0.778222 0.61204
+0.353921 -0.341325 0.320513 0 0 1
+-0.5 -0.0643217 -0.345407 1 0 0
+-0.5 -0.221993 0.179802 1 0 0
+-0.30122 0.362657 -0.371795 -0.0216664 -0.0652084 0.997636
+-0.5 0.155483 0.279665 1 0 0
+0.448718 -0.357376 -0.246909 1 0 0
+0.0421131 -0.256282 0.35847 0 1 0
+0.0972957 0.174642 -0.333333 0 0 1
+-0.431796 -0.371795 0.202762 0 1 0
+-0.282797 -0.203594 0.359233 0.599291 0.800532 0
+0.168599 0.196071 0.371795 0 0 1
+0.203788 -0.371795 0.190273 0 1 0
+-0.224152 0.0430109 -0.0353836 0.0582579 0.796245 0.602162
+-0.320513 -0.0888178 -0.357599 1 0 0
+-0.247587 0.371795 -0.285494 0 1 0
+0.143489 0.294872 0.0136862 0.652535 0.752905 0.0856271
+0.0363833 -0.0696646 0.320513 0 0 1
+0.227685 0.294872 0.100264 0 1 0
+-0.423923 -0.357514 0.320513 0 0 1
+0.21439 -0.371795 -0.136718 0 1 0
+0.24624 -0.371795 0.0337723 0 1 0
+-0.272169 0.0132703 -0.0594463 0.952308 -0.305032 0.00807346
+0.5 0.184862 0.151443 1 0 0
+-0.372505 0.0764951 0.361912 0.943637 -0.330968 0.00296255
+-0.337341 0.318954 0.320513 0 0 1
+0.368372 0.0875774 0.35439 0.936948 0.349469 0
+0.357184 -0.114052 0.364125 0.882053 -0.469774 0.0359905
+-0.5 -0.112604 0.237193 1 0 0
+-0.335431 0.19318 -0.371795 0 0 1
+0.280385 -0.122649 0.371795 0 0 1
+0.5 0.179904 0.234906 1 0 0
+0.302061 0.294872 0.174634 0 1 0
+-0.154753 -0.251736 -0.371795 0 0 1
+0.316088 0.294872 0.296046 0 1 0
+-0.364171 -0.187764 -0.371795 0 0 1
+0.220397 -0.290726 0.320513 0 0 1
+-0.5 0.268435 -0.301868 1 0 0
+-0.132852 -0.230897 -0.363377 -0.0123412 0.998769 -0.0480338
+-0.440298 0.371795 -0.344137 0 1 0
+-0.310727 0.371795 -0.152459 0 1 0
+-0.414268 -0.317642 0.320513 0 0 1
+-0.434573 0.371795 0.136577 0 1 0
+0.331964 0.294872 -0.115988 0 1 0
+-0.199531 0.17261 0.371795 0 0 1
+0.5 -0.19477 0.0874285 1 0 0
+-0.206179 -0.371795 -0.264354 0 1 0
+-0.408243 0.198141 -0.371795 0 0 1
+0.5 0.0399433 -0.289325 1 0 0
+-0.244957 -0.0311715 0.371795 0 0 1
+0.203052 -0.0504821 0.371795 -0.242106 0.0629863 0.968203
+-0.284426 0.242182 -0.371795 0 0 1
+-0.358853 0.172693 -0.371795 0 0 1
+0.27687 0.0525253 0.371795 0 0 1
+0.5 0.138538 0.0402268 1 0 0
+-0.266402 -0.371795 -0.353308 0 1 0
+-0.109006 0.311635 -0.371795 0 0 1
+0.448718 -0.320806 0.121627 1 0 0
+0.17683 -0.371795 -0.0991981 0 1 0
+-0.17413 -0.0569581 0.320513 0 0 1
+-0.418159 -0.217051 0.320513 0 0 1
+0.141026 0.334751 -0.316314 1 0 0
+0.141026 0.298614 0.25618 0.972111 0.218072 -0.0862824
+-0.0377448 -0.201085 0.325826 0.0841162 0.8936 0.440913
+-0.267587 0.179365 -0.333333 0 0 1
+0.5 -0.0144046 0.11466 1 0 0
+-0.235289 0.371795 -0.140915 0 1 0
+-0.329738 -0.0471776 0.371795 0 0 1
+-0.5 -0.255049 0.145547 1 0 0
+0.494971 0.294872 -0.35344 0.595304 0.801164 0.061231
+0.5 0.281238 -0.0447767 1 0 0
+0.0894264 -0.230897 -0.349036 0 1 0
+-0.092678 -0.0645101 0.320513 0 0 1
+-0.388636 0.018567 -0.371795 0 0 1
+0.5 -0.175938 -0.0768911 1 0 0
+-0.377836 -0.0963483 -0.371795 0 0 1
+-0.416782 0.371795 -0.231373 0 1 0
+-0.27402 -0.00387959 -0.111575 0.997713 0.0653932 -0.0170776
+-0.469997 -0.294872 0.00256649 0 1 0
+-0.181435 -0.0956001 0.324242 0.74129 0.528345 0.413932
+-0.301746 -0.371795 -0.0880882 0 1 0
+0.324508 0.294872 -0.0921004 0 1 0
+-0.117449 0.363843 -0.371795 0.0285469 -0.0999336 0.994585
+0.19415 -0.371795 0.302588 0 1 0
+0.250367 0.294872 0.292161 0 1 0
+0.408949 -0.274616 -0.371795 0 0 1
+0.149491 0.294872 0.303224 0.1179 0.992913 0.0149707
+0.5 0.155469 0.288969 1 0 0
+-0.5 0.363269 -0.135088 0.998177 -0.0602242 0.00395023
+-0.000426096 0.164167 0.320513 0 0 1
+-0.0807904 0.371795 0.125881 0 1 0
+0.057791 -0.256282 0.346687 0 1 0
+0.0797899 0.0633203 -0.333333 0 0 1
+-0.446092 0.371795 -0.18101 0 1 0
+-0.382653 0.0256483 0.334037 0.997455 -0.071296 0
+-0.5 -0.0269823 -0.24141 1 0 0
+0.5 0.0549473 -0.22855 1 0 0
+-0.19633 0.0994306 -0.333333 0 0 1
+-0.371979 -0.219416 -0.371795 0 0 1
+-0.244016 -0.371795 0.314154 0.0873337 0.970056 -0.226638
+0.340043 0.294872 0.0577312 0 1 0
+-0.0855529 -0.294872 0.0714783 0 1 0
+-0.445535 0.371795 -0.20205 0 1 0
+-0.0543243 -0.256282 0.349221 0 1 0
+-0.295633 -0.18874 -0.333333 0 0 1
+0.298618 0.0614196 0.371795 0 0 1
+-0.363827 -0.0997597 0.320596 -0.490905 -0.277476 0.825845
+0.5 -0.108777 0.074087 1 0 0
+-0.489241 0.318146 -0.371795 0.0380447 0.00106403 0.999276
+-0.5 -0.261702 0.0577005 1 0 0
+0.290965 0.294872 0.200771 0 1 0
+0.0906696 -0.294872 -0.336346 0 1 0
+0.0357844 -0.294872 0.0343161 0 1 0
+-0.278065 0.371795 0.246705 0 1 0
+-0.29203 0.27286 0.320513 0 0 1
+-0.0748092 -0.169737 -0.333333 0 0 1
+-0.468199 -0.00776812 0.320513 0 0 1
+-0.319996 -0.160395 -0.371795 0.885829 -0.0049783 -0.463986
+-0.253265 -0.0372592 -0.0501622 0.534727 0.845025 0
+-0.5 0.0291996 0.146946 1 0 0
+-0.0102562 0.371795 0.229781 0 1 0
+-0.5 0.186327 -0.0283858 1 0 0
+-0.5 0.0736353 0.11737 1 0 0
+-0.141154 -0.347195 -0.109593 1 0 0
+-0.256885 -0.054597 -0.333333 0 0 1
+0.5 0.212667 0.279448 1 0 0
+-0.164864 -0.148462 0.371795 0 0 1
+0.00493846 -0.294872 0.151528 0 1 0
+0.437096 -0.0619709 0.320513 0 0 1
+-0.450273 0.371795 0.19699 0 1 0
+-0.320513 -0.0337214 -0.369166 0.728919 0.166614 -0.664015
+0.397376 0.294872 -0.35031 0 1 0
+-0.0668167 -0.260045 0.320513 -0.00930624 -0.321147 0.946984
+0.446281 -0.232818 -0.371795 0 0 1
+-0.5 -0.0165642 0.0808162 1 0 0
+-0.439852 -0.371795 -0.119761 0.124367 0.992014 0.0210042
+0.22566 0.294872 0.0319662 0 1 0
+0.284249 -0.371795 0.148865 0 1 0
+0.5 0.0345573 0.232796 1 0 0
+-0.204996 0.349211 -0.371795 0 0 1
+0.0713306 0.278498 0.320513 0 0 1
+0.0229621 0.158978 -0.333333 0 0 1
+-0.5 -0.133068 -0.308916 1 0 0
+-0.273287 0.00909738 -0.13677 0.976591 -0.214929 -0.00864524
+-0.0604998 0.230897 -0.371732 0.0386483 0.88242 0.468872
+-0.5 0.347438 -0.198301 1 0 0
+0.0072908 0.371795 -0.290574 0 1 0
+0.495276 0.294872 0.251057 0.33971 0.939236 0.0493264
+0.5 0.0275403 0.00139882 1 0 0
+-0.0293566 0.170623 -0.333333 0 0 1
+0.141026 0.299786 -0.352686 0.974282 0.204624 -0.0943594
+-0.5 -0.0572626 -0.0307798 1 0 0
+-0.0868881 0.247212 0.371795 -0.0144829 0.0806658 0.996636
+-0.384001 0.00679612 0.344956 0.998549 -0.0538213 -0.00155272
+0.327742 -0.371795 -0.362443 -0.0781325 0.984078 0.159644
+-0.190776 0.0169844 -0.307238 0.909435 0.415834 0.00322221
+0.141026 0.353683 0.0550564 1 0 0
+0.5 -0.124724 0.177417 1 0 0
+0.370365 0.294872 -0.255474 0 1 0
+0.5 0.0868919 0.245931 1 0 0
+-0.141154 -0.309779 -0.145684 1 0 0
+0.5 0.244039 -0.357058 1 0 0
+0.5 -0.159253 -0.230346 1 0 0
+-0.183095 0.371795 -0.289718 0 1 0
+-0.0800129 0.371795 -0.301116 0 1 0
+0.280825 -0.371795 -0.122905 0 1 0
+0.382541 -0.32884 0.320513 0 0 1
+0.5 -0.135978 0.194709 1 0 0
+-0.472679 -0.159202 -0.371795 0 0 1
+-0.469097 -0.294872 0.256729 0 1 0
+-0.5 0.0306584 0.193254 1 0 0
+-0.199188 -0.371795 -0.360656 0.0204385 0.996568 0.0802206
+0.118665 0.166852 0.345659 0.61397 0.789329 0
+0.440038 0.294872 0.0563235 0 1 0
+-0.5 -0.00125166 0.215807 1 0 0
+0.404628 -0.218523 -0.371795 0 0 1
+0.149826 0.133743 -0.333333 0 0 1
+0.476191 0.294872 -0.0124396 0 1 0
+0.5 0.0567796 0.0478002 1 0 0
+-0.5 0.310133 0.318674 0.724913 -0.110255 -0.679959
+-0.337213 0.371795 0.286264 0 1 0
+0.356468 -0.371795 0.0518316 0 1 0
+-0.0129611 -0.294872 -0.138248 0 1 0
+-0.5 0.200844 -0.282773 1 0 0
+-0.5 0.0424471 -0.169728 1 0 0
+0.5 -0.0828588 0.110283 1 0 0
+0.189896 -0.325287 0.320513 0 0 1
+-0.387623 -0.371795 -0.262027 0 1 0
+-0.5 0.103864 -0.0961616 1 0 0
+-0.490124 -0.294872 0.0921518 0 1 0
+-0.068234 -0.00906958 -0.333333 0 0 1
+0.133984 0.371795 -0.00666621 0.0874142 0.995587 0.034125
+-0.170579 -0.0192867 -0.333333 0 0 1
+-0.0942729 0.371795 0.0150814 0 1 0
+0.141026 0.350585 0.179241 1 0 0
+0.217216 -0.371795 -0.0694618 0 1 0
+0.0404055 -0.145631 0.320513 0 0 1
+-0.421885 -0.371795 0.275869 0 1 0
+-0.039727 -0.294872 0.235012 0 1 0
+0.432154 0.294872 -0.140385 0 1 0
+-0.141154 -0.315771 -0.202206 1 0 0
+-0.28054 0.371795 0.029383 0 1 0
+-0.5 0.00989231 -0.145907 1 0 0
+-0.374238 -0.0592833 -0.371795 0 0 1
+-0.0951155 -0.110925 0.320513 0 0 1
+0.274179 -0.332565 0.320513 0 0 1
+0.305374 0.294872 0.278059 0 1 0
+-0.5 -0.0645179 0.108291 1 0 0
+0.330139 -0.328128 0.320513 0 0 1
+-0.456628 0.371795 -0.0802958 0 1 0
+-0.356838 0.114683 0.341617 0.879139 -0.476565 0
+-0.133246 0.371795 0.280956 0 1 0
+-0.5 -0.239175 -0.270238 1 0 0
+0.378705 -0.113596 0.320513 0 0 1
+0.201612 -0.371795 0.0806015 0 1 0
+-0.5 0.188782 0.0032859 1 0 0
+0.415303 -0.3679 -0.371795 0.102969 0.368788 0.923793
+-0.207644 0.371795 -0.102195 0 1 0
+0.216555 0.178005 -0.333333 0 0 1
+-0.335099 0.22612 -0.371795 0 0 1
+0.205762 -0.0291778 -0.18728 0.635558 0.771962 0.0118619
+0.5 0.116515 -0.275734 1 0 0
+0.222788 0.037528 -0.0517226 -0.237424 0.971369 -0.00846261
+0.5 0.0661411 -0.198443 1 0 0
+0.356585 0.160626 0.320513 0 0 1
+0.469073 -0.287126 -0.371795 0.0075301 0.0539409 0.998516
+-0.34188 0.371795 0.188263 0 1 0
+0.363267 0.294872 -0.309042 0 1 0
+0.345209 0.294872 0.101691 0 1 0
+0.375066 -0.371795 -0.343071 0 1 0
+0.5 -0.108269 -0.35369 1 0 0
+-0.341817 -0.0397493 -0.371795 0 0 1
+0.348672 0.116105 -0.371795 0 0 1
+-0.307813 -0.275887 -0.371795 0 0 1
+0.342396 0.294872 -0.071937 0 1 0
+-0.212891 0.285007 0.320513 0 0 1
+-0.370824 -0.371795 -0.255336 0 1 0
+0.0951508 -0.049076 -0.333333 0 0 1
+0.221926 0.294872 0.0203545 0 1 0
+0.491747 -0.0807938 -0.371795 -0.21893 0.0680853 0.973362
+0.5 0.0221584 0.20382 1 0 0
+-0.0276361 -0.294872 -0.0645233 0 1 0
+0.221842 0.0823553 -0.333333 0 0 1
+-0.364792 0.371795 0.0109993 0 1 0
+0.27865 0.206699 0.329112 0.585437 0.800817 0.126317
+-0.484002 0.339525 0.320513 0 0 1
+-0.5 0.000205638 -0.0307435 1 0 0
+-0.354216 0.371795 0.00366447 0 1 0
+-0.5 0.256072 -0.274043 1 0 0
+0.5 -0.220839 0.0692291 1 0 0
+-0.209963 0.371795 0.0400886 0 1 0
+-0.5 -0.189666 -0.180324 1 0 0
+-0.372888 0.371795 0.0218318 0 1 0
+0.427847 -0.275735 0.320513 0 0 1
+0.227827 0.162441 0.371795 0 0 1
+-0.0453752 0.199812 0.339245 -0.200428 0.979707 0.00167229
+0.0975086 -0.179819 0.33872 -0.475944 0.879476 0
+-0.116989 0.371795 -0.0329573 0 1 0
+0.5 0.108784 0.0705576 1 0 0
+-0.217562 0.0712823 0.371795 0 0 1
+0.359992 -0.117753 -0.371795 0 0 1
+0.0130386 -0.104141 -0.333333 0 0 1
+0.5 0.0567403 0.210314 1 0 0
+0.464972 -0.217101 -0.371795 0 0 1
+0.264477 -0.0183748 -0.085832 0.88338 -0.46782 0.0280197
+-0.5 0.215484 0.245801 1 0 0
+-0.5 -0.00902493 -0.0978059 1 0 0
+0.0906355 -0.294872 0.200145 0 1 0
+0.229252 -0.0383288 -0.290026 0.0677065 0.997703 -0.0022984
+0.142301 -0.371795 0.0722505 0.598781 0.800745 -0.0163769
+0.401987 0.294872 -0.26817 0 1 0
+-0.401493 0.371795 0.0760298 0 1 0
+-0.5 0.263804 -0.0218579 1 0 0
+-0.289994 0.371795 -0.128573 0 1 0
+-0.0977083 -0.294872 0.206263 0 1 0
+-0.327475 -0.371795 0.0748402 0 1 0
+0.298193 -0.371795 -0.0723887 0 1 0
+-0.123173 0.319089 0.320513 0 0 1
+-0.385288 0.253591 0.320513 0 0 1
+0.5 -0.00417426 -0.11769 1 0 0
+0.282062 -0.371795 0.0830685 0 1 0
+0.195569 -0.214088 -0.333333 0 0 1
+0.0935606 -0.00265803 -0.333333 0 0 1
+-0.5 -0.236646 -0.0603707 1 0 0
+0.273613 0.23045 -0.371795 0.115545 0.28251 0.95228
+-0.448718 -0.36549 -0.0751903 0.95822 0.285928 -0.0077393
+0.5 0.184679 -0.322773 1 0 0
+-0.199278 0.277441 -0.371795 0 0 1
+0.14369 -0.100618 0.320513 0 0 1
+0.448718 -0.356884 -0.0429722 1 0 0
+-0.0233159 -0.0462528 -0.333333 0 0 1
+-0.5 0.203198 0.139369 1 0 0
+0.358695 0.294872 -0.12857 0 1 0
+-0.115095 -0.230897 -0.334865 -0.0622245 0.783705 -0.618008
+0.5 0.0627374 0.0120718 1 0 0
+0.0053566 -0.294872 -0.0180423 0 1 0
+-0.430443 -0.371795 -0.0845222 0 1 0
+-0.336255 0.0465125 -0.371795 0 0 1
+-0.170909 0.00480605 -0.333333 0 0 1
+-0.385419 -0.371795 -0.131885 0 1 0
+0.448718 -0.333971 -0.10807 1 0 0
+-0.5 0.270688 0.0163814 1 0 0
+-0.0644696 -0.294872 -0.0350459 0 1 0
+-0.0210207 0.111293 -0.333333 0 0 1
+0.0662674 -0.294872 -0.057595 0 1 0
+-0.5 0.315995 0.303902 1 0 0
+-0.5 0.111709 -0.123475 1 0 0
+0.489966 0.273016 -0.371795 0 0 1
+0.210856 0.294872 0.239222 0 1 0
+-0.5 0.140917 -0.0980256 1 0 0
+0.381389 0.294872 0.0347522 0 1 0
+-0.246644 -0.371795 -0.35902 0 1 0
+0.0357612 -0.256282 0.345914 0 1 0
+-0.234209 -0.371795 -0.0465667 0 1 0
+-0.5 0.352433 0.143395 1 0 0
+-0.141154 -0.367389 -0.136301 0.965832 -0.248699 -0.072925
+-0.5 -0.129624 0.17141 1 0 0
+-0.388546 0.371795 0.246087 0 1 0
+-0.468014 -0.0602931 -0.371795 0 0 1
+0.141026 0.340064 0.0514888 1 0 0
+-0.5 0.076852 0.125221 1 0 0
+0.28416 -0.371795 -0.340585 0 1 0
+0.5 -0.062566 -0.365473 0.977344 -0.0349853 -0.208745
+-0.240029 0.230897 -0.343654 -0.0177141 0.999843 -0.00104746
+-0.0837742 -0.206459 0.371795 0 0 1
+0.392789 -0.223141 0.320513 0 0 1
+-0.332134 0.00439455 0.371795 0 0 1
+0.494122 0.217491 -0.371795 -0.173992 -0.0518892 0.983379
+0.0966382 -0.129646 0.320513 0 0 1
+-0.5 -0.158036 -0.241799 1 0 0
+-0.5 -0.277653 0.318383 0.909793 -0.0444158 -0.41268
+-0.141154 -0.370448 0.0478854 0.845292 -0.530273 0.0655111
+0.00267164 0.230897 -0.353613 0 1 0
+0.364596 -0.371795 0.19654 0 1 0
+0.362354 0.149114 -0.371795 0 0 1
+-0.064152 0.185933 -0.333333 0 0 1
+-0.448718 -0.306271 -0.0594573 0.98687 0.161059 -0.0121119
+-0.5 0.137217 0.00976245 1 0 0
+-0.496076 0.174068 0.320513 -0.417367 0.149759 0.896313
+0.128746 0.371795 -0.111316 0 1 0
+-0.5 -0.133668 0.148617 1 0 0
+-0.362411 -0.242744 0.320513 0 0 1
+0.0948996 0.371795 -0.0394394 0 1 0
+0.5 -0.0346811 -0.140689 1 0 0
+0.141109 -0.329996 -0.0555201 1 0 0
+-0.141154 -0.366925 0.0421886 0.996426 -0.0844291 -0.00248432
+0.0885785 0.184652 0.33187 0.446376 0.890234 -0.0907287
+0.5 0.0892502 0.0744916 1 0 0
+0.307939 0.232797 0.320513 0 0 1
+0.204858 -0.0282747 -0.083775 0.705922 0.708245 0.00794791
+0.0629118 -0.294872 -0.311623 0 1 0
+-0.142671 0.371795 -0.204711 0 1 0
+0.5 0.138028 0.233151 1 0 0
+0.368959 -0.0860017 0.361753 0.941898 -0.31906 0.105017
+-0.193936 -0.247309 0.365354 0.270071 0.90404 -0.331321
+0.460052 -0.113042 0.320513 0 0 1
+0.26166 -0.148785 -0.333333 0 0 1
+0.195643 -0.371795 -0.350696 0 1 0
+0.221417 -0.0371607 -0.179319 0.224895 0.974367 0.00549056
+-0.141154 -0.356991 0.0976283 1 0 0
+0.5 0.271893 0.144499 1 0 0
+0.115084 -0.294872 0.115519 0 1 0
+-0.5 0.31722 -0.197344 1 0 0
+0.5 0.0908532 -0.195653 1 0 0
+-0.268955 -0.0208609 -0.286342 0.871874 0.489708 0.00468232
+0.287856 -0.349364 0.320513 0 0 1
+-0.5 -0.129067 -0.222333 1 0 0
+-0.0432771 -0.294872 -0.144663 0 1 0
+0.5 -0.169814 -0.16798 1 0 0
+-0.223986 0.237106 0.350793 -0.349461 0.936951 0
+-0.448718 -0.325753 -0.237222 1 0 0
+-0.025791 0.0565435 -0.333333 0 0 1
+0.5 0.0219624 -0.0202139 1 0 0
+0.150695 0.217456 0.371795 0 0 1
+-0.5 -0.0686534 0.204607 1 0 0
+0.488733 0.202855 -0.371795 0 0 1
+-0.0365394 0.280845 0.320513 0 0 1
+-0.141154 -0.35307 0.246836 1 0 0
+-0.0986446 -0.0574731 -0.333333 0 0 1
+-0.5 0.144393 0.11936 1 0 0
+-0.5 -0.0121622 0.224553 1 0 0
+-0.269163 0.0204139 -0.155226 0.911431 -0.411447 0.00237436
+0.141109 -0.299059 -0.105028 0.795908 0.604607 0.0313234
+0.5 -0.17297 0.0896757 1 0 0
+0.144121 -0.0556341 -0.333333 0 0 1
+-0.5 -0.12126 0.160417 1 0 0
+0.365047 -0.371795 -0.11656 0 1 0
+0.218385 -0.163671 0.371795 0 0 1
+-0.5 0.216365 -0.303806 1 0 0
+-0.264906 0.227596 -0.34758 -0.275541 0.961265 0.00680948
+0.5 -0.136129 -0.0290252 1 0 0
+-0.192111 -0.0198482 -0.0829547 0.893086 -0.449637 -0.0149743
+-0.359377 -0.138731 0.320513 0 0 1
+-0.5 0.195476 0.161234 1 0 0
+0.0789908 -0.294872 -0.334258 0 1 0
+0.5 0.0133622 -0.226501 1 0 0
+0.0917032 0.371795 0.0116712 0 1 0
+-0.199953 0.0305939 -0.219577 0.692394 0.721503 0.00490542
+-0.344733 -0.188326 0.320513 0 0 1
+-0.150268 -0.297498 0.320513 0.0226789 0.00686863 0.999719
+-0.364791 0.371795 -0.153399 0 1 0
+0.5 0.161745 0.280077 1 0 0
+-0.5 -0.270745 0.103326 1 0 0
+0.0725621 0.371795 -0.268211 0 1 0
+0.5 -0.142075 0.263148 1 0 0
+0.5 -0.0789875 0.074135 1 0 0
+-0.5 0.290855 -0.354996 1 0 0
+-0.141154 -0.354007 -0.297228 1 0 0
+0.141109 -0.356341 0.244111 1 0 0
+-0.0552635 -0.294872 0.0487327 0 1 0
+0.374846 0.270023 -0.371795 0 0 1
+-0.5 0.0642127 0.139476 1 0 0
+0.227003 0.038132 -0.136307 -0.0919426 0.995366 -0.0281689
+0.141109 -0.332921 -0.236384 1 0 0
+-0.467935 0.0517773 0.320513 0 0 1
+0.5 0.0547611 -0.17954 1 0 0
+0.122 -0.294872 0.102159 0 1 0
+-0.2732 0.210779 0.339084 -0.599305 0.800521 0
+-0.5 -0.0658256 -0.035146 1 0 0
+0.0863313 0.185868 0.332163 0.450478 0.891791 -0.0421731
+-0.260349 0.371795 -0.30965 0 1 0
+0.260474 -0.371795 0.273078 0 1 0
+-0.464631 -0.169656 0.320513 0 0 1
+0.197776 0.294872 0.305534 0 1 0
+-0.232935 0.0434003 -0.137071 -0.0794907 0.996697 0.016627
+-0.141154 -0.354151 -0.103385 1 0 0
+0.319134 -0.371795 -0.0755122 0 1 0
+0.459807 -0.0320002 -0.371795 0 0 1
+-0.37627 0.371795 0.276593 0 1 0
+0.474479 -0.294872 -0.148077 0 1 0
+0.384195 0.0606131 0.320513 0.202945 0.0633982 0.977136
+-0.5 -0.287617 -0.136228 0.971313 0.227381 0.0696344
+-0.322102 -0.367604 -0.371795 0.150132 0.518 0.842102
+-0.448718 -0.299481 -0.158203 0.881367 0.296114 -0.368114
+0.5 -0.0869372 0.304412 1 0 0
+0.121496 -0.294872 0.0233477 0 1 0
+-0.5 -0.123744 -0.00636143 1 0 0
+-0.416654 -0.31966 -0.371795 0 0 1
+-0.017626 0.17953 -0.333333 0 0 1
+0.478969 -0.294872 -0.225507 0 1 0
+-0.5 -0.00794643 0.114794 1 0 0
+0.281528 0.294872 -0.214511 0 1 0
+-0.184016 0.171533 0.371795 0 0 1
+0.463531 -0.294872 -0.075909 0 1 0
+0.293548 0.212388 -0.362502 0.675206 0.734426 0.0686698
+0.0302116 -0.294872 -0.0827707 0 1 0
+0.140153 -0.294872 0.0722962 0.682676 0.726127 0.0818098
+-0.5 -0.230176 0.00421566 1 0 0
+0.00417825 -0.195828 -0.333333 0 0 1
+0.5 -0.126976 -0.0597725 1 0 0
+-0.105787 0.178394 0.371795 0.589747 -0.472156 0.655185
+-0.5 -0.215196 -0.226461 1 0 0
+-0.0215135 0.371795 -0.159927 0 1 0
+-0.135669 -0.131676 -0.333333 0 0 1
+0.448718 -0.325646 0.260104 1 0 0
+-0.5 -0.0558009 -0.0696386 1 0 0
+0.426229 0.294872 0.149542 0 1 0
+-0.23514 -0.371795 -0.261086 0 1 0
+0.5 -0.0563104 -0.364535 0.98735 0.0130164 -0.158021
+-0.020512 0.336159 0.320513 0 0 1
+0.0931812 0.230897 -0.362858 0.00854437 0.97605 0.217377
+-0.141154 -0.354558 -0.0590502 1 0 0
+0.0520965 -0.156867 -0.333333 0 0 1
+0.346459 0.294872 0.314841 -0.049615 0.911405 0.408508
+0.448718 -0.350611 -0.371168 0.929881 -0.0956237 -0.355216
+0.17435 -0.371795 0.119307 0 1 0
+-0.326044 -0.371795 -0.0353933 0 1 0
+-0.321598 0.361281 0.320513 -0.0184954 0.0748252 0.997025
+0.32068 0.201601 -0.371795 0 0 1
+-0.250564 0.149519 -0.333333 0 0 1
+-0.144605 -0.371795 0.0545302 -0.484716 0.825536 -0.289035
+-0.0859939 0.371795 0.210811 0 1 0
+-0.355279 0.0860167 0.371795 0 0 1
+0.0113504 0.230897 -0.348567 0 1 0
+-0.5 0.0578944 -0.362303 0.999276 0.0131192 0.0357098
+-0.427405 -0.371795 0.130403 0 1 0
+0.421957 0.241871 -0.371795 0 0 1
+0.294787 0.294872 0.180188 0 1 0
+-0.21435 -0.371795 -0.213092 0 1 0
+-0.259701 -0.371795 -0.175775 0 1 0
+-0.5 0.12832 0.22552 1 0 0
+-0.5 -0.163926 -0.0464266 1 0 0
+-0.430256 0.371795 0.158367 0 1 0
+0.271776 0.294872 -0.184732 0 1 0
+0.141026 0.30087 0.320045 0.695085 0.442228 0.566826
+-0.199811 -0.0442335 0.330394 0.962463 0.254479 0.0943698
+-0.104572 0.246712 -0.371795 0 0 1
+-0.298722 0.0363145 0.371795 0 0 1
+0.5 0.0848142 0.312131 0.99989 0.00584529 0.0136654
+-0.296069 -0.172866 -0.333333 0 0 1
+0.0381969 -0.294872 0.30573 0 1 0
+-0.182452 -0.190677 -0.333333 0 0 1
+0.218717 -0.371795 0.0158614 0 1 0
+0.5 0.0691886 -0.277626 1 0 0
+0.141026 0.331501 -0.314165 1 0 0
+-0.5 0.218264 0.0812215 1 0 0
+-0.070538 0.371795 0.0971717 0 1 0
+0.344928 0.136497 0.332559 0.853104 0.521709 0.0057761
+-0.282202 0.265485 0.320513 0 0 1
+0.0304782 -0.294872 0.185308 0 1 0
+0.402636 0.055816 0.320513 0 0 1
+0.281631 0.194981 -0.333333 0 0 1
+-0.0758263 0.206373 0.371795 0 0 1
+0.108584 0.236776 -0.371795 0.133755 0.260321 0.956213
+-0.366382 0.371795 -0.186148 0 1 0
+0.0879007 -0.0644663 -0.333333 0 0 1
+0.318313 0.294872 -0.0553357 0 1 0
+0.141109 -0.362938 0.197018 0.996554 0.0785196 -0.0267171
+-0.382613 -0.371795 -0.0709196 0 1 0
+0.5 -0.267216 -0.0225772 1 0 0
+0.15438 -0.371795 -0.369926 -0.0930682 0.703249 0.704826
+-0.271673 0.371795 0.0217282 0 1 0
+0.189794 -0.32452 -0.371795 0 0 1
+-0.191496 -0.0185278 -0.0795986 0.906968 -0.421111 -0.00867106
+-0.159536 -0.147628 0.371795 0 0 1
+0.141109 -0.36662 0.319535 0.880445 0.376481 -0.288234
+0.155939 0.294872 0.160958 0 1 0
+0.00764297 -0.138302 -0.333333 0 0 1
+0.27509 -0.371795 -0.00090625 0 1 0
+0.139694 0.102678 0.320513 0 0 1
+0.5 0.277218 -0.0592009 1 0 0
+-0.0443618 -0.294872 -0.309854 0 1 0
+-0.5 0.265485 0.00187506 1 0 0
+0.212523 0.0387484 0.371795 -0.0177762 -0.00754222 0.999813
+-0.0178615 -0.171041 -0.333333 0 0 1
+-0.187335 -0.231125 0.371795 0 0 1
+-0.0716008 0.161132 -0.333333 0 0 1
+-0.182785 -0.301679 -0.371795 0 0 1
+0.190031 0.195523 0.371795 0 0 1
+-0.0116789 0.371795 0.0513552 0 1 0
+-0.5 -0.0445598 -0.13219 1 0 0
+0.0883855 0.319085 0.320513 0 0 1
+-0.380747 0.107786 0.320513 0 0 1
+0.231424 -0.371795 -0.209244 0 1 0
+-0.5 -0.231109 0.317209 0.929108 0.081187 -0.360787
+-0.0612042 0.371795 -0.0811593 0 1 0
+-0.208272 0.304615 0.320513 0 0 1
+0.396445 -0.314921 -0.371795 0 0 1
+-0.5 0.365908 0.193779 0.978044 -0.192914 -0.07883
+-0.350302 0.00273078 -0.371795 0 0 1
+0.0425305 -0.215526 -0.333333 0 0 1
+0.480366 -0.0130193 0.320513 0 0 1
+-0.057304 0.371795 0.0638789 0 1 0
+-0.0469412 -0.142467 0.320513 0 0 1
+-0.346015 0.371795 0.182109 0 1 0
+0.182689 0.294872 -0.313607 0 1 0
+-0.5 -0.0843558 0.0470453 1 0 0
+-0.236309 -0.371795 -0.125085 0 1 0
+-0.421923 0.147456 0.320513 0 0 1
+0.195384 0.294872 0.214338 0 1 0
+0.5 0.0213735 -0.297492 1 0 0
+-0.5 0.252167 -0.0191342 1 0 0
+-0.0747451 -0.0109574 -0.333333 0 0 1
+0.257447 0.0275075 -0.133105 0.708497 0.705658 0.00881597
+-0.190367 0.0161076 -0.121582 0.908565 0.417483 -0.0147336
+0.357174 -0.371795 0.258067 0 1 0
+-0.237079 -0.295655 -0.371795 0 0 1
+-0.407052 -0.371795 -0.235255 0 1 0
+-0.41143 0.306658 -0.371795 0 0 1
+-0.5 -0.181502 -0.201274 1 0 0
+0.422749 0.263077 0.320513 0 0 1
+-0.347299 0.150376 0.320513 -0.0633305 0.050162 0.996731
+-0.257296 0.371795 0.235989 0 1 0
+-0.5 0.10689 -0.15894 1 0 0
+0.141026 0.348538 -0.111622 1 0 0
+0.340407 -0.371795 -0.0433364 0 1 0
+-0.139823 0.371795 0.241182 0 1 0
+-0.450237 -0.294872 0.169845 0.424363 0.90399 -0.05214
+-0.5 -0.267884 0.296025 1 0 0
+-0.5 0.108269 0.172861 1 0 0
+0.369389 0.0998157 -0.371795 0 0 1
+0.5 0.210021 -0.12661 1 0 0
+-0.313119 0.17734 -0.333333 -0.225449 0.138125 0.964414
+-0.5 0.233444 0.0671362 1 0 0
+-0.22482 -0.371795 0.171666 0 1 0
+0.311066 -0.190594 -0.344957 0.887309 -0.461072 0.00976548
+0.494489 -0.294872 0.0482971 -0.231442 0.956209 -0.179163
+0.5 -0.090091 -0.205966 1 0 0
+0.259589 -0.0253652 -0.247089 -0.702902 0.711287 0.000764922
+0.5 -0.209705 -0.215226 1 0 0
+0.219023 -0.371795 -0.26016 0 1 0
+-0.0949159 0.256282 0.35296 0 1 0
+-0.258743 -0.219977 0.335772 0.485879 0.874026 0
+0.258068 -0.0268873 -0.0566174 0.710368 -0.703829 0.00175802
+0.114685 0.371795 -0.0888728 0 1 0
+-0.109607 -0.173272 0.367656 0.378374 0.874107 0.304582
+0.191716 0.294872 -0.171632 0 1 0
+-0.253392 0.371795 -0.164048 0 1 0
+0.0675332 -0.294872 -0.291251 0 1 0
+0.162012 0.121466 0.320513 -0.47434 -0.50445 0.721479
+-0.0523717 0.371795 0.18329 0 1 0
+-0.5 0.0168951 0.122035 1 0 0
+-0.133284 -0.180758 -0.333333 0 0 1
+-0.5 -0.147884 0.150033 1 0 0
+-0.5 -0.141491 0.17613 1 0 0
+-0.147408 -0.230897 -0.371388 0.0429878 0.94943 -0.311022
+0.117782 -0.294872 -0.330879 0 1 0
+0.241999 0.0366578 -0.167898 0.340726 0.939934 -0.0207167
+-0.309546 -0.0945897 0.371795 0 0 1
+-0.28825 0.302261 0.320513 0 0 1
+-0.350406 -0.371795 0.181467 0 1 0
+-0.418467 0.371795 0.110574 0 1 0
+0.5 -0.0376626 -0.125468 1 0 0
+0.192891 0.294872 -0.215497 0 1 0
+-0.5 0.255016 -0.310637 1 0 0
+0.0161135 -0.294872 0.318401 -0.00154446 -0.702222 0.711956
+0.0660141 0.371795 0.00182657 0 1 0
+0.5 0.109811 0.253193 1 0 0
+-0.415228 0.371795 0.209685 0 1 0
+0.0184117 0.224722 -0.333333 -0.0120024 0.354364 0.93503
+-0.26454 -0.0274774 -0.307521 0.800193 0.599532 -0.0159018
+0.140337 0.255414 0.340801 0.0714782 0.997442 -0.00012753
+0.394685 -0.371795 0.277698 0 1 0
+0.402144 -0.371795 -0.27363 0 1 0
+0.349706 0.0751535 -0.371795 0 0 1
+-0.0960303 -0.294872 0.209986 0 1 0
+0.473968 0.0228155 0.320513 0 0 1
+-0.241048 -0.371795 -0.132495 0 1 0
+-0.0530711 -0.0509166 0.320513 0 0 1
+-0.135383 0.371795 -0.112006 0 1 0
+0.0856895 0.371795 -0.085988 0 1 0
+0.141026 0.33811 0.130749 1 0 0
+-0.400603 -0.371795 -0.24142 0 1 0
+-0.253005 -0.0420027 -0.333333 -0.176473 -0.458941 0.870764
+0.00174279 0.0913376 0.320513 0 0 1
+-0.381911 -0.371795 0.0294173 0 1 0
+0.175525 -0.105333 0.321692 -0.622064 0.409634 0.66726
+0.249344 -0.371795 0.312902 -0.0222222 0.995258 -0.0946969
+0.493211 -0.294872 0.243307 -0.190783 0.981172 0.0300461
+-0.133925 0.371795 0.283863 0 1 0
+0.49868 0.294872 0.276251 0.511693 0.845299 0.153752
+-0.141716 -0.324746 -0.371795 -0.664407 0.200343 0.720018
+0.202427 -0.0339031 0.371389 -0.500634 0.280532 0.818943
+0.5 0.203146 0.058175 1 0 0
+-0.265284 -0.0748361 -0.333333 0 0 1
+0.0702819 0.371795 -0.251104 0 1 0
+0.0691239 -0.256282 0.351259 0 1 0
+-0.0440723 0.0930777 0.320513 0 0 1
+0.168338 -0.103973 0.320513 -0.180934 0.0817957 0.980088
+-0.446155 0.371795 -0.329753 0 1 0
+-0.214162 0.0401688 -0.233144 0.412752 0.910783 0.0104831
+0.0633469 0.371795 0.1767 0 1 0
+-0.30639 -0.287937 0.320513 0 0 1
+0.141026 0.342069 0.0875748 1 0 0
+-0.128686 -0.162083 0.371795 0.267674 0.45911 0.847094
+-0.204047 0.0145923 0.345824 0.996555 -0.0829293 0.000254041
+-0.377596 -0.0561593 0.359661 0.977146 0.212567 0
+-0.221785 -0.362996 -0.371795 -0.027466 0.0852793 0.995978
+0.141109 -0.303604 0.201503 0.980618 0.192397 0.0370343
+0.436941 -0.371795 -0.206437 0 1 0
+-0.5 -0.0639488 0.261101 1 0 0
+-0.230965 0.371795 -0.319554 0 1 0
+0.223633 -0.230897 -0.339509 0.0764302 0.969403 -0.233274
+0.0945698 0.120312 0.320513 0 0 1
+-0.387064 -0.371795 -0.10031 0 1 0
+-0.329747 0.371795 0.312162 -0.00948779 0.987686 0.156159
+0.482502 0.144733 -0.371795 0 0 1
+-0.5 0.0822381 0.216586 1 0 0
+-0.5 -0.150158 -0.0680057 1 0 0
+0.5 -0.258431 -0.127703 1 0 0
+-0.0418922 -0.200393 0.364012 0.20434 0.975648 0.0797303
+0.5 -0.0145681 0.189755 1 0 0
+-0.5 -0.219835 -0.0911161 1 0 0
+-0.091121 -0.0374723 0.320513 0 0 1
+0.5 -0.257644 0.066074 1 0 0
+0.5 -0.178903 -0.360082 0.999815 0.00219004 -0.019094
+-0.361356 0.371795 -0.0710513 0 1 0
+-0.5 0.204743 0.270929 1 0 0
+0.25982 0.0251346 -0.0308425 0.752777 0.658257 0.00495981
+0.294593 -0.371795 0.158408 0 1 0
+0.135968 0.176685 0.371795 0 0 1
+-0.5 -0.103538 0.257742 1 0 0
+0.483351 0.199251 -0.371795 0 0 1
+-0.345265 0.28615 0.320513 0 0 1
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp
new file mode 100644
index 0000000..5bb3272
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp
@@ -0,0 +1,61 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+
+#include <CGAL/Shape_detection_3.h>
+
+#include <iostream>
+#include <fstream>
+
+// Type declarations
+typedef CGAL::Exact_predicates_inexact_constructions_kernel  Kernel;
+typedef std::pair<Kernel::Point_3, Kernel::Vector_3>         Point_with_normal;
+typedef std::vector<Point_with_normal>                       Pwn_vector;
+typedef CGAL::First_of_pair_property_map<Point_with_normal>  Point_map;
+typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
+
+// In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types
+// as well as iterator type and property maps, are defined.
+typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits
+  <Kernel, Pwn_vector, Point_map, Normal_map>                Traits;
+typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits>    Efficient_ransac;
+typedef CGAL::Shape_detection_3::Plane<Traits>               Plane;
+
+int main() 
+{
+  // Points with normals.
+  Pwn_vector points;
+
+  // Loads point set from a file. 
+  // read_xyz_points_and_normals takes an OutputIterator for storing the points
+  // and a property map to store the normal vector with each point.
+  std::ifstream stream("data/cube.pwn");
+
+  if (!stream || 
+    !CGAL::read_xyz_points_and_normals(stream,
+      std::back_inserter(points),
+      Point_map(),
+      Normal_map()))
+  {
+      std::cerr << "Error: cannot read file cube.pwn" << std::endl;
+      return EXIT_FAILURE;
+  }
+
+  // Instantiates shape detection engine.
+  Efficient_ransac ransac;
+
+  // Provides the input data.
+  ransac.set_input(points);
+
+  // Registers planar shapes via template method.
+  ransac.add_shape_factory<Plane>();
+
+  // Detects registered shapes with default parameters.
+  ransac.detect();
+
+  // Prints number of detected shapes.
+  std::cout << ransac.shapes().end() - ransac.shapes().begin() << " shapes detected." << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.cpp b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.cpp
new file mode 100644
index 0000000..d7c2dd0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.cpp
@@ -0,0 +1,62 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+
+#include <CGAL/Shape_detection_3.h>
+#include "efficient_RANSAC_custom_shape.h"
+
+#include <iostream>
+#include <fstream>
+
+// Type declarations
+typedef CGAL::Exact_predicates_inexact_constructions_kernel  Kernel;
+typedef std::pair<Kernel::Point_3, Kernel::Vector_3>         Point_with_normal;
+typedef std::vector<Point_with_normal>                       Pwn_vector;
+typedef CGAL::First_of_pair_property_map<Point_with_normal>  Point_map;
+typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
+
+// In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types
+// as well as iterator type and property maps, are defined.
+typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits
+  <Kernel, Pwn_vector, Point_map, Normal_map>   Traits;
+typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits>   Efficient_ransac;
+typedef My_Plane<Traits>              Plane;
+
+int main() 
+{
+  // Points with normals.
+  Pwn_vector points;
+
+  // Loads point set from a file. 
+  // read_xyz_points_and_normals takes an OutputIterator for storing the points
+  // and a property map to store the normal vector with each point.
+  std::ifstream stream("data/cube.pwn");
+
+  if (!stream || 
+    !CGAL::read_xyz_points_and_normals(stream,
+      std::back_inserter(points),
+      Point_map(),
+      Normal_map()))
+  {
+      std::cerr << "Error: cannot read file cube.pwn" << std::endl;
+      return EXIT_FAILURE;
+  }
+
+  // Instantiates shape detection engine.
+  Efficient_ransac ransac;
+
+  // Provides the input data.
+  ransac.set_input(points);
+
+  // Registers planar shapes via template method.
+  ransac.add_shape_factory<Plane>();
+
+  // Detects registered shapes with default parameters.
+  ransac.detect();
+
+  // Prints number of detected shapes.
+  std::cout << ransac.shapes().end() - ransac.shapes().begin() << " shapes detected." << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h
new file mode 100644
index 0000000..8c72265
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h
@@ -0,0 +1,94 @@
+#ifndef MY_PLANE_SHAPE_H
+#define MY_PLANE_SHAPE_H
+
+#include <CGAL/Shape_detection_3.h>
+#include <CGAL/number_utils.h>
+
+/*
+My_Plane derives from Shape_base. The plane is represented by
+its normal vector and distance to the origin.
+*/
+template <class Traits>
+class My_Plane : public CGAL::Shape_detection_3::Shape_base<Traits> {
+public:
+  typedef typename Traits::FT FT;///< number type.
+  typedef typename Traits::Point_3 Point;///< point type.
+  typedef typename Traits::Vector_3 Vector;///< point type.
+
+public:
+  My_Plane()
+    : CGAL::Shape_detection_3::Shape_base<Traits>()
+  {}
+
+  //  Computes squared Euclidean distance from query point to the shape.
+  virtual FT squared_distance(const Point &p) const {
+    const FT sd = (this->constr_vec(m_point_on_primitive, p)) * m_normal;
+    return sd * sd;
+  }
+
+  Vector plane_normal() const {
+    return m_normal;
+  }
+
+  FT d() const {
+    return m_d;
+  }
+
+  // Returns a string with shape parameters.
+  virtual std::string info() const {
+    std::stringstream sstr;
+    sstr << "Type: plane (" << this->get_x(m_normal) << ", " 
+      << this->get_y(m_normal) << ", " << this->get_z(m_normal) << ")x - " <<
+      m_d << " = 0" << " #Pts: " << this->m_indices.size();
+
+    return sstr.str();
+  }
+
+protected:
+  // Constructs shape based on minimal set of samples from the input data.    
+  virtual void create_shape(const std::vector<std::size_t> &indices) {
+    const Point p1 = this->point(indices[0]);
+    const Point p2 = this->point(indices[1]);
+    const Point p3 = this->point(indices[2]);
+
+    m_normal = this->cross_pdct(p1 - p2, p1 - p3);
+
+    m_normal = m_normal * (1.0 / sqrt(this->sqlen(m_normal)));
+    m_d = -(p1[0] * m_normal[0] + p1[1] * m_normal[1] + p1[2] * m_normal[2]);
+
+    m_point_on_primitive = p1;
+
+    this->m_is_valid = true;
+  }
+
+  // Computes squared Euclidean distance from a set of points.
+  virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                std::vector<FT> &dists) const {
+      for (std::size_t i = 0; i < indices.size(); i++) {
+        const FT sd = (this->point(indices[i])
+          - m_point_on_primitive) * m_normal;
+        dists[i] = sd * sd;
+      }
+  }
+
+  /*
+  Computes the normal deviation between shape and
+  a set of points with normals.
+  */
+  virtual void cos_to_normal(const std::vector<std::size_t> &indices,
+                             std::vector<FT> &angles) const {
+      for (std::size_t i = 0; i < indices.size(); i++)
+        angles[i] = CGAL::abs(this->normal(indices[i]) * m_normal);
+  }
+
+  // Returns the number of required samples for construction.
+  virtual std::size_t minimum_sample_size() const {
+    return 3;
+  }
+
+private:
+  Point m_point_on_primitive;
+  Vector m_normal;
+  FT m_d;
+};
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp
new file mode 100644
index 0000000..25cb49c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp
@@ -0,0 +1,108 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+
+#include <CGAL/Shape_detection_3.h>
+
+#include <iostream>
+#include <fstream>
+
+
+// Type declarations
+typedef CGAL::Exact_predicates_inexact_constructions_kernel  Kernel;
+typedef Kernel::FT                                           FT;
+typedef std::pair<Kernel::Point_3, Kernel::Vector_3>         Point_with_normal;
+typedef std::vector<Point_with_normal>                       Pwn_vector;
+typedef CGAL::First_of_pair_property_map<Point_with_normal>  Point_map;
+typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
+
+// In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types
+// as well as iterator type and property maps, are defined.
+typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits<Kernel,
+  Pwn_vector, Point_map, Normal_map>            Traits;
+typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits> Efficient_ransac;
+typedef CGAL::Shape_detection_3::Cone<Traits>             Cone;
+typedef CGAL::Shape_detection_3::Cylinder<Traits>         Cylinder;
+typedef CGAL::Shape_detection_3::Plane<Traits>            Plane;
+typedef CGAL::Shape_detection_3::Sphere<Traits>           Sphere;
+typedef CGAL::Shape_detection_3::Torus<Traits>            Torus;
+
+
+int main() 
+{
+  // Points with normals.
+  Pwn_vector points;
+
+  // Loads point set from a file. 
+  // read_xyz_points_and_normals takes an OutputIterator for storing the points
+  // and a property map to store the normal vector with each point.
+  std::ifstream stream("data/cube.pwn");
+
+  if (!stream ||
+    !CGAL::read_xyz_points_and_normals(stream,
+      std::back_inserter(points),
+      Point_map(),
+      Normal_map()))
+  {
+    std::cerr << "Error: cannot read file cube.pwn" << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  std::cout << points.size() << " points" << std::endl;
+
+  // Instantiates shape detection engine.
+  Efficient_ransac ransac;
+
+  // Provides the input data.
+  ransac.set_input(points);
+    
+  // Register shapes for detection
+  ransac.add_shape_factory<Plane>();
+  ransac.add_shape_factory<Sphere>();
+  ransac.add_shape_factory<Cylinder>();
+  ransac.add_shape_factory<Cone>();
+  ransac.add_shape_factory<Torus>();
+
+  // Sets parameters for shape detection.
+  Efficient_ransac::Parameters parameters;
+
+  // Sets probability to miss the largest primitive at each iteration.
+  parameters.probability = 0.05;
+ 
+  // Detect shapes with at least 500 points.
+  parameters.min_points = 200;
+
+  // Sets maximum Euclidean distance between a point and a shape.
+  parameters.epsilon = 0.002;
+ 
+  // Sets maximum Euclidean distance between points to be clustered.
+  parameters.cluster_epsilon = 0.01;
+ 
+  // Sets maximum normal deviation.
+  // 0.9 < dot(surface_normal, point_normal); 
+  parameters.normal_threshold = 0.9;   
+  
+  // Detects shapes
+  ransac.detect(parameters);
+
+  // Prints number of detected shapes and unassigned points.
+   std::cout << ransac.shapes().end() - ransac.shapes().begin() << " detected shapes, "
+     << ransac.number_of_unassigned_points()
+     << " unassigned points." << std::endl;
+  
+  // Efficient_ransac::shapes() provides
+  // an iterator range to the detected shapes.
+  Efficient_ransac::Shape_range shapes = ransac.shapes();
+  Efficient_ransac::Shape_range::iterator it = shapes.begin();
+
+  while (it != shapes.end()) {
+    // Prints the parameters of the detected shape.
+    std::cout << (*it)->info() << std::endl;
+
+    // Proceeds with next detected shape.
+    it++;
+  }
+
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp
new file mode 100644
index 0000000..126ad3f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp
@@ -0,0 +1,139 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+#include <CGAL/Timer.h>
+#include <CGAL/number_utils.h>
+
+#include <CGAL/Shape_detection_3.h>
+
+#include <iostream>
+#include <fstream>
+
+// Type declarations
+typedef CGAL::Exact_predicates_inexact_constructions_kernel  Kernel;
+typedef Kernel::FT                                           FT;
+typedef std::pair<Kernel::Point_3, Kernel::Vector_3>         Point_with_normal;
+typedef std::vector<Point_with_normal>                       Pwn_vector;
+typedef CGAL::First_of_pair_property_map<Point_with_normal>  Point_map;
+typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
+
+// In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types
+// as well as iterator type and property maps, are defined.
+typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits<Kernel,
+  Pwn_vector, Point_map, Normal_map>            Traits;
+typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits>   Efficient_ransac;
+typedef CGAL::Shape_detection_3::Plane<Traits>              Plane;
+
+
+int main()
+{
+  // Points with normals.
+  Pwn_vector points;
+
+  // Loads point set from a file. 
+  // read_xyz_points_and_normals takes an OutputIterator for storing the points
+  // and a property map to store the normal vector with each point.
+  std::ifstream stream("data/cube.pwn");
+
+  if (!stream ||
+    !CGAL::read_xyz_points_and_normals(stream,
+      std::back_inserter(points),
+      Point_map(),
+      Normal_map()))
+  {
+      std::cerr << "Error: cannot read file cube.pwn" << std::endl;
+      return EXIT_FAILURE;
+  }
+
+  // Instantiates shape detection engine.
+  Efficient_ransac ransac;
+
+  // Provides the input data.
+  ransac.set_input(points);
+
+  // Registers detection of planes
+  ransac.add_shape_factory<Plane>();
+
+  // Measures time before setting up the shape detection.
+  CGAL::Timer time;
+  time.start();
+
+  // Build internal data structures.
+  ransac.preprocess();
+
+  // Measures time after preprocessing.
+  time.stop();
+
+  std::cout << "preprocessing took: " << time.time() * 1000 << "ms" << std::endl;
+
+  // Perform detection several times and choose result with highest coverage.
+  Efficient_ransac::Shape_range shapes = ransac.shapes();
+  FT best_coverage = 0;
+
+  for (size_t i = 0;i<3;i++) {
+    // Reset timer.
+    time.reset();
+    time.start();
+
+    // Detects shapes.
+    ransac.detect();
+
+    // Measures time after detection.
+    time.stop();
+
+    // Compute coverage, i.e. ratio of the points assigned to a shape.
+    FT coverage = FT(points.size() - ransac.number_of_unassigned_points())
+                  / FT(points.size());
+
+    // Prints number of assigned shapes and unsassigned points.
+    std::cout << "time: " << time.time() * 1000 << "ms" << std::endl;
+    std::cout << ransac.shapes().end() - ransac.shapes().begin() << " primitives, "
+      << coverage << " coverage" << std::endl;
+    
+    // Choose result with highest coverage.
+    if (coverage > best_coverage) {
+      best_coverage = coverage;
+      // Efficient_ransac::shapes() provides
+      // an iterator range to the detected shapes. 
+      shapes = ransac.shapes();
+    }
+  }
+
+  Efficient_ransac::Shape_range::iterator it = shapes.begin();
+
+  while (it != shapes.end()) {
+    boost::shared_ptr<Efficient_ransac::Shape> shape = *it;
+    // Using Shape_base::info() for printing 
+    // the parameters of the detected shape.
+    std::cout << (*it)->info();
+
+    // Sums distances of points to detected shapes.
+    FT sum_distances = 0;
+
+    // Iterates through point indices assigned to each detected shape.
+    std::vector<std::size_t>::const_iterator
+      index_it = (*it)->indices_of_assigned_points().begin();
+
+    while (index_it != (*it)->indices_of_assigned_points().end()) {
+      
+      // Retrieves point
+      const Point_with_normal &p = *(points.begin() + (*index_it));
+
+      // Adds Euclidean distance between point and shape.
+      sum_distances += CGAL::sqrt((*it)->squared_distance(p.first));
+
+      // Proceeds with next point.
+      index_it++;
+    }
+
+    // Computes and prints average distance.
+    FT average_distance = sum_distances / shape->indices_of_assigned_points().size();
+    std::cout << " average distance: " << average_distance << std::endl;
+
+    // Proceeds with next detected shape.
+    it++;
+  }
+
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/CMakeLists.txt
new file mode 100644
index 0000000..2e05fc6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/CMakeLists.txt
@@ -0,0 +1,48 @@
+# This is the CMake script for compiling this folder.
+
+project( Poisson_surface_reconstruction_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+# Find CGAL
+find_package(CGAL QUIET)
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  # VisualC++ optimization for applications dealing with large data
+  if (MSVC)
+    # Allow Windows 32bit applications to use up to 3GB of RAM
+    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+
+    # Print new compilation options
+    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
+    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
+    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
+    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
+  endif()
+
+  # Find Eigen3 (requires 3.1.0 or greater)
+  find_package(Eigen3 3.1.0)
+  if (EIGEN3_FOUND)
+    include( ${EIGEN3_USE_FILE} )
+  endif()
+  
+  if (EIGEN3_FOUND)
+    # Executables that require Eigen 3
+    create_single_source_cgal_program( "poisson_reconstruction_example.cpp" )
+    create_single_source_cgal_program( "poisson_reconstruction.cpp" )
+  else()
+    message(STATUS "NOTICE: The examples need Eigen 3.1 (or greater) will not be compiled.")
+  endif()
+
+  
+else()
+
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/data/kitten.xyz b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/data/kitten.xyz
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/data/kitten.xyz
rename to 3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/data/kitten.xyz
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/data/sphere926.pwn b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/data/sphere926.pwn
rename to 3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn
diff --git a/3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd
rename to 3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp
new file mode 100644
index 0000000..6c379c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp
@@ -0,0 +1,393 @@
+// poisson_reconstruction.cpp
+
+//----------------------------------------------------------
+// Poisson Delaunay Reconstruction method.
+// Reads a point set or a mesh's set of vertices, reconstructs a surface using Poisson,
+// and saves the surface.
+// Output format is .off.
+//----------------------------------------------------------
+// poisson_reconstruction file_in file_out [options]
+
+// CGAL
+#include <CGAL/AABB_tree.h> // must be included before kernel
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Timer.h>
+#include <CGAL/trace.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Surface_mesh_default_triangulation_3.h>
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Poisson_implicit_surface_3.h>
+#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
+#include <CGAL/Poisson_reconstruction_function.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+#include <deque>
+#include <cstdlib>
+#include <fstream>
+#include <math.h>
+#include <boost/foreach.hpp>
+
+// ----------------------------------------------------------------------------
+// Types
+// ----------------------------------------------------------------------------
+
+// kernel
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+// Simple geometric types
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
+typedef Kernel::Sphere_3 Sphere;
+typedef std::deque<Point_with_normal> PointList;
+
+// polyhedron
+typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
+
+// Poisson implicit function
+typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
+
+// Surface mesher
+typedef CGAL::Surface_mesh_default_triangulation_3 STr;
+typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
+typedef CGAL::Poisson_implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
+
+// AABB tree
+typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
+typedef CGAL::AABB_traits<Kernel, Primitive> AABB_traits;
+typedef CGAL::AABB_tree<AABB_traits> AABB_tree;
+
+struct Counter {
+  std::size_t i, N;
+  Counter(std::size_t N)
+    : i(0), N(N)
+  {}
+
+  void operator()()
+  {
+    i++;
+    if(i == N){
+      std::cerr << "Counter reached " << N << std::endl;
+    }
+  }
+  
+};
+
+struct InsertVisitor {
+
+  Counter& c;
+  InsertVisitor(Counter& c)
+    : c(c)
+  {}
+
+  void before_insertion()
+  {
+    c();
+  }
+
+};
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "Poisson Delaunay Reconstruction method" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    // usage
+    if (argc-1 < 2)
+    {
+      std::cerr << "Reads a point set or a mesh's set of vertices, reconstructs a surface using Poisson,\n";
+      std::cerr << "and saves the surface.\n";
+      std::cerr << "\n";
+      std::cerr << "Usage: " << argv[0] << " file_in file_out [options]\n";
+      std::cerr << "Input file formats are .off (mesh) and .xyz or .pwn (point set).\n";
+      std::cerr << "Output file format is .off.\n";
+      std::cerr << "Options:\n";
+      std::cerr << "  -sm_radius <float>     Radius upper bound (default=100 * average spacing)\n";
+      std::cerr << "  -sm_distance <float>   Distance upper bound (default=0.25 * average spacing)\n";
+      
+      return EXIT_FAILURE;
+    }
+
+    // Poisson options
+    FT sm_angle = 20.0; // Min triangle angle (degrees).
+    FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
+    FT sm_distance = 0.25; // Approximation error w.r.t. point set average spacing.
+    std::string solver_name = "eigen"; // Sparse linear solver name.
+    double approximation_ratio = 0.02;
+    double average_spacing_ratio = 5;
+
+    // decode parameters
+    std::string input_filename  = argv[1];
+    std::string output_filename = argv[2];
+    for (int i=3; i+1<argc ; ++i)
+    {
+      if (std::string(argv[i])=="-sm_radius")
+        sm_radius = atof(argv[++i]);
+      else if (std::string(argv[i])=="-sm_distance")
+        sm_distance = atof(argv[++i]);
+      else if (std::string(argv[i])=="-solver")
+        solver_name = argv[++i];
+      else if (std::string(argv[i])=="-approx")
+        approximation_ratio = atof(argv[++i]);
+      else if (std::string(argv[i])=="-ratio")
+        average_spacing_ratio = atof(argv[++i]);
+      else {
+        std::cerr << "Error: invalid option " << argv[i] << "\n";
+        return EXIT_FAILURE;
+      }
+    }
+
+    CGAL::Timer task_timer; task_timer.start();
+
+    //***************************************
+    // Loads mesh/point set
+    //***************************************
+
+    PointList points;
+
+    // If OFF file format
+    std::cerr << "Open " << input_filename << " for reading..." << std::endl;
+    std::string extension = input_filename.substr(input_filename.find_last_of('.'));
+    if (extension == ".off" || extension == ".OFF")
+    {
+      // Reads the mesh file in a polyhedron
+      std::ifstream stream(input_filename.c_str());
+      Polyhedron input_mesh;
+      CGAL::scan_OFF(stream, input_mesh, true /* verbose */);
+      if(!stream || !input_mesh.is_valid() || input_mesh.empty())
+      {
+        std::cerr << "Error: cannot read file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+      }
+
+      // Converts Polyhedron vertices to point set.
+      // Computes vertices normal from connectivity.
+      BOOST_FOREACH(boost::graph_traits<Polyhedron>::vertex_descriptor v,
+                    vertices(input_mesh)){
+        const Point& p = v->point();
+        Vector n = CGAL::Polygon_mesh_processing::compute_vertex_normal(v,input_mesh);
+        points.push_back(Point_with_normal(p,n));
+      }
+    }
+    // If XYZ file format
+    else if (extension == ".xyz" || extension == ".XYZ" ||
+             extension == ".pwn" || extension == ".PWN")
+    {
+      // Reads the point set file in points[].
+      // Note: read_xyz_points_and_normals() requires an iterator over points
+      // + property maps to access each point's position and normal.
+      // The position property map can be omitted here as we use iterators over Point_3 elements.
+      std::ifstream stream(input_filename.c_str());
+      if (!stream ||
+          !CGAL::read_xyz_points_and_normals(
+                                stream,
+                                std::back_inserter(points),
+                                CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type())))
+      {
+        std::cerr << "Error: cannot read file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+      }
+    }
+    else
+    {
+      std::cerr << "Error: cannot read file " << input_filename << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Prints status
+    std::size_t nb_points = points.size();
+    std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
+                                                        << task_timer.time() << " seconds"
+                                                        << std::endl;
+    task_timer.reset();
+
+    //***************************************
+    // Checks requirements
+    //***************************************
+
+    if (nb_points == 0)
+    {
+      std::cerr << "Error: empty point set" << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    bool points_have_normals = (points.begin()->normal() != CGAL::NULL_VECTOR);
+    if ( ! points_have_normals )
+    {
+      std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    CGAL::Timer reconstruction_timer; reconstruction_timer.start();
+
+    
+    Counter counter(std::distance(points.begin(), points.end()));
+    InsertVisitor visitor(counter) ;
+    
+
+    //***************************************
+    // Computes implicit function
+    //***************************************
+
+    std::cerr << "Computes Poisson implicit function...\n";
+
+    // Creates implicit function from the read points.
+    // Note: this method requires an iterator over points
+    // + property maps to access each point's position and normal.
+    // The position property map can be omitted here as we use iterators over Point_3 elements.
+    Poisson_reconstruction_function function(
+                              points.begin(), points.end(),
+                              CGAL::make_identity_property_map(PointList::value_type()),
+                              CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()),
+                              visitor);
+
+    #ifdef CGAL_EIGEN3_ENABLED
+    {
+      if (solver_name == "eigen")
+      {
+        std::cerr << "Use Eigen 3\n";
+        CGAL::Eigen_solver_traits<Eigen::ConjugateGradient<CGAL::Eigen_sparse_symmetric_matrix<double>::EigenType> > solver;
+        if ( ! function.compute_implicit_function(solver, visitor, 
+                                                approximation_ratio,
+                                                average_spacing_ratio) )
+        {
+          std::cerr << "Error: cannot compute implicit function" << std::endl;
+          return EXIT_FAILURE;
+        }
+      }    
+      else
+      {
+        std::cerr << "Error: invalid solver " << solver_name << "\n";
+        return EXIT_FAILURE;
+      }
+    }
+    #else
+    {
+      std::cerr << "Error: invalid solver " << solver_name << "\n";
+      return EXIT_FAILURE;
+    }
+    #endif
+
+
+    // Prints status
+    std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
+    task_timer.reset();
+
+    //***************************************
+    // Surface mesh generation
+    //***************************************
+
+    std::cerr << "Surface meshing...\n";
+
+    // Computes average spacing
+    FT average_spacing = CGAL::compute_average_spacing<CGAL::Sequential_tag>(points.begin(), points.end(),
+                                                       6 /* knn = 1 ring */);
+
+    // Gets one point inside the implicit surface
+    Point inner_point = function.get_inner_point();
+    FT inner_point_value = function(inner_point);
+    if(inner_point_value >= 0.0)
+    {
+      std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Gets implicit function's radius
+    Sphere bsphere = function.bounding_sphere();
+    FT radius = std::sqrt(bsphere.squared_radius());
+
+    // Defines the implicit surface: requires defining a
+  	// conservative bounding sphere centered at inner point.
+    FT sm_sphere_radius = 5.0 * radius;
+    FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
+    Surface_3 surface(function,
+                      Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
+                      sm_dichotomy_error/sm_sphere_radius);
+
+    // Defines surface mesh generation criteria
+    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
+                                                        sm_radius*average_spacing,  // Max triangle size
+                                                        sm_distance*average_spacing); // Approximation error
+
+    CGAL_TRACE_STREAM << "  make_surface_mesh(sphere center=("<<inner_point << "),\n"
+                      << "                    sphere radius="<<sm_sphere_radius<<",\n"
+                      << "                    angle="<<sm_angle << " degrees,\n"
+                      << "                    triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
+                      << "                    distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
+                      << "                    dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
+                      << "                    Manifold_with_boundary_tag)\n";
+
+    // Generates surface mesh with manifold option
+    STr tr; // 3D Delaunay triangulation for surface mesh generation
+    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
+    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
+                            surface,                              // implicit surface
+                            criteria,                             // meshing criteria
+                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
+
+    // Prints status
+    std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
+                                     << tr.number_of_vertices() << " output vertices"
+                                     << std::endl;
+    task_timer.reset();
+
+    if(tr.number_of_vertices() == 0)
+      return EXIT_FAILURE;
+
+    // Converts to polyhedron
+    Polyhedron output_mesh;
+    CGAL::output_surface_facets_to_polyhedron(c2t3, output_mesh);
+
+    // Prints total reconstruction duration
+    std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";
+
+    //***************************************
+    // Computes reconstruction error
+    //***************************************
+
+    // Constructs AABB tree and computes internal KD-tree
+    // data structure to accelerate distance queries
+    AABB_tree tree(faces(output_mesh).first, faces(output_mesh).second, output_mesh);
+    tree.accelerate_distance_queries();
+
+    // Computes distance from each input point to reconstructed mesh
+    double max_distance = DBL_MIN;
+    double avg_distance = 0;
+    for (PointList::const_iterator p=points.begin(); p!=points.end(); p++)
+    {
+      double distance = std::sqrt(tree.squared_distance(*p));
+
+      max_distance = (std::max)(max_distance, distance);
+      avg_distance += distance;
+    }
+    avg_distance /= double(points.size());
+
+    std::cerr << "Reconstruction error:\n"
+              << "  max = " << max_distance << " = " << max_distance/average_spacing << " * average spacing\n"
+              << "  avg = " << avg_distance << " = " << avg_distance/average_spacing << " * average spacing\n";
+
+    //***************************************
+    // Saves reconstructed surface mesh
+    //***************************************
+
+    std::cerr << "Write file " << output_filename << std::endl << std::endl;
+    std::ofstream out(output_filename.c_str());
+    out << output_mesh;
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp
new file mode 100644
index 0000000..0453dda
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp
@@ -0,0 +1,108 @@
+#include <CGAL/trace.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Surface_mesh_default_triangulation_3.h>
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Implicit_surface_3.h>
+#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
+#include <CGAL/Poisson_reconstruction_function.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/compute_average_spacing.h>
+
+#include <vector>
+#include <fstream>
+
+// Types
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
+typedef Kernel::Sphere_3 Sphere;
+typedef std::vector<Point_with_normal> PointList;
+typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
+typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
+typedef CGAL::Surface_mesh_default_triangulation_3 STr;
+typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
+typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
+
+int main(void)
+{
+    // Poisson options
+    FT sm_angle = 20.0; // Min triangle angle in degrees.
+    FT sm_radius = 30; // Max triangle size w.r.t. point set average spacing.
+    FT sm_distance = 0.375; // Surface Approximation error w.r.t. point set average spacing.
+
+    // Reads the point set file in points[].
+    // Note: read_xyz_points_and_normals() requires an iterator over points
+    // + property maps to access each point's position and normal.
+    // The position property map can be omitted here as we use iterators over Point_3 elements.
+    PointList points;
+    std::ifstream stream("data/kitten.xyz");
+    if (!stream ||
+        !CGAL::read_xyz_points_and_normals(
+                              stream,
+                              std::back_inserter(points),
+                              CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type())))
+    {
+      std::cerr << "Error: cannot read file data/kitten.xyz" << std::endl;
+      return EXIT_FAILURE;
+    }
+
+    // Creates implicit function from the read points using the default solver.
+
+    // Note: this method requires an iterator over points
+    // + property maps to access each point's position and normal.
+    // The position property map can be omitted here as we use iterators over Point_3 elements.
+    Poisson_reconstruction_function function(points.begin(), points.end(),
+                                             CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()) );
+
+    // Computes the Poisson indicator function f()
+    // at each vertex of the triangulation.
+    if ( ! function.compute_implicit_function() ) 
+      return EXIT_FAILURE;
+
+    // Computes average spacing
+    FT average_spacing = CGAL::compute_average_spacing<CGAL::Sequential_tag>(points.begin(), points.end(),
+                                                       6 /* knn = 1 ring */);
+
+    // Gets one point inside the implicit surface
+    // and computes implicit function bounding sphere radius.
+    Point inner_point = function.get_inner_point();
+    Sphere bsphere = function.bounding_sphere();
+    FT radius = std::sqrt(bsphere.squared_radius());
+
+    // Defines the implicit surface: requires defining a
+    // conservative bounding sphere centered at inner point.
+    FT sm_sphere_radius = 5.0 * radius;
+    FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
+    Surface_3 surface(function,
+                      Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
+                      sm_dichotomy_error/sm_sphere_radius);
+
+    // Defines surface mesh generation criteria
+    CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
+                                                        sm_radius*average_spacing,  // Max triangle size
+                                                        sm_distance*average_spacing); // Approximation error
+
+    // Generates surface mesh with manifold option
+    STr tr; // 3D Delaunay triangulation for surface mesh generation
+    C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
+    CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
+                            surface,                              // implicit surface
+                            criteria,                             // meshing criteria
+                            CGAL::Manifold_with_boundary_tag());  // require manifold mesh
+
+    if(tr.number_of_vertices() == 0)
+      return EXIT_FAILURE;
+
+    // saves reconstructed surface mesh
+    std::ofstream out("kitten_poisson-20-30-0.375.off");
+    Polyhedron output_mesh;
+    CGAL::output_surface_facets_to_polyhedron(c2t3, output_mesh);
+    out << output_mesh;
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polygon/CMakeLists.txt
new file mode 100644
index 0000000..8c44552
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polygon_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Example.cpp" )
+  create_single_source_cgal_program( "Polygon.cpp" )
+  create_single_source_cgal_program( "polygon_algorithms.cpp" )
+  create_single_source_cgal_program( "projected_polygon.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polygon/Example.cpp b/3rdparty/CGAL-4.8/examples/Polygon/Example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polygon/Example.cpp
rename to 3rdparty/CGAL-4.8/examples/Polygon/Example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polygon/Polygon.cpp b/3rdparty/CGAL-4.8/examples/Polygon/Polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polygon/Polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Polygon/Polygon.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polygon/polygon_algorithms.cpp b/3rdparty/CGAL-4.8/examples/Polygon/polygon_algorithms.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polygon/polygon_algorithms.cpp
rename to 3rdparty/CGAL-4.8/examples/Polygon/polygon_algorithms.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polygon/projected_polygon.cpp b/3rdparty/CGAL-4.8/examples/Polygon/projected_polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polygon/projected_polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Polygon/projected_polygon.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/CMakeLists.txt
new file mode 100644
index 0000000..317a7f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/CMakeLists.txt
@@ -0,0 +1,116 @@
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( Polygon_mesh_processing )
+
+
+cmake_minimum_required(VERSION 2.6.2)
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
+  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
+    cmake_policy(VERSION 2.8.4)
+  else()
+    cmake_policy(VERSION 2.6)
+  endif()
+endif()
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )  
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost REQUIRED )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+
+find_package( OpenMesh QUIET )
+
+if ( OpenMesh_FOUND )
+include( UseOpenMesh )
+else()
+  message(STATUS "Examples that use OpenMesh will not be compiled.")
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+ 
+  if (EIGEN3_FOUND)
+    # Executables that require Eigen 3.1
+    include( ${EIGEN3_USE_FILE} )
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+create_single_source_cgal_program( "self_intersections_example.cpp" )
+create_single_source_cgal_program( "stitch_borders_example.cpp" )
+create_single_source_cgal_program( "compute_normals_example.cpp" )
+create_single_source_cgal_program( "point_inside_example.cpp")
+create_single_source_cgal_program( "triangulate_faces_example.cpp")
+create_single_source_cgal_program( "connected_components_example.cpp")
+create_single_source_cgal_program( "polygon_soup_example.cpp")
+create_single_source_cgal_program( "triangulate_polyline_example.cpp")
+create_single_source_cgal_program( "mesh_slicer_example.cpp")
+#create_single_source_cgal_program( "remove_degeneracies_example.cpp")
+create_single_source_cgal_program( "isotropic_remeshing_example.cpp")
+
+if(NOT (${EIGEN3_VERSION} VERSION_LESS 3.2.0))
+create_single_source_cgal_program( "hole_filling_example.cpp" )
+create_single_source_cgal_program( "hole_filling_example_SM.cpp" )
+create_single_source_cgal_program( "refine_fair_example.cpp")
+else()
+  message(STATUS "NOTICE: Some examples require Eigen 3.2 (or greater) and will not be compiled.")  
+endif()
+
+if(OpenMesh_FOUND)
+create_single_source_cgal_program( "compute_normals_example_OM.cpp" )
+target_link_libraries( compute_normals_example_OM ${OPENMESH_LIBRARIES} )
+
+create_single_source_cgal_program( "hole_filling_example_OM.cpp" )
+target_link_libraries( hole_filling_example_OM ${OPENMESH_LIBRARIES} )
+
+create_single_source_cgal_program( "point_inside_example_OM.cpp")
+target_link_libraries( point_inside_example_OM ${OPENMESH_LIBRARIES} )
+
+create_single_source_cgal_program( "stitch_borders_example_OM.cpp" )
+target_link_libraries( stitch_borders_example_OM ${OPENMESH_LIBRARIES} )
+
+#create_single_source_cgal_program( "remove_degeneracies_example_OM.cpp")
+#target_link_libraries( remove_degeneracies_example_OM ${OPENMESH_LIBRARIES} )
+
+create_single_source_cgal_program( "triangulate_faces_example_OM.cpp")
+target_link_libraries( triangulate_faces_example_OM ${OPENMESH_LIBRARIES} )
+endif(OpenMesh_FOUND)
+
+else(EIGEN3_FOUND)
+  message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.")  
+endif(EIGEN3_FOUND)
+
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example.cpp
new file mode 100644
index 0000000..1608ff0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example.cpp
@@ -0,0 +1,50 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+#include <iostream>
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_3 Point;
+typedef K::Vector_3 Vector;
+
+typedef CGAL::Surface_mesh<Point> Surface_mesh;
+typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Surface_mesh>::face_descriptor   face_descriptor;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/eight.off";
+  std::ifstream input(filename);
+
+  Surface_mesh mesh;
+  if (!input || !(input >> mesh) || mesh.is_empty()) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  Surface_mesh::Property_map<face_descriptor, Vector> fnormals =
+    mesh.add_property_map<face_descriptor, Vector>
+      ("f:normals", CGAL::NULL_VECTOR).first;
+  Surface_mesh::Property_map<vertex_descriptor, Vector> vnormals =
+    mesh.add_property_map<vertex_descriptor, Vector>
+      ("v:normals", CGAL::NULL_VECTOR).first;
+
+  CGAL::Polygon_mesh_processing::compute_normals(mesh,
+        vnormals,
+        fnormals,
+        CGAL::Polygon_mesh_processing::parameters::vertex_point_map(mesh.points()).
+        geom_traits(K()));
+
+  std::cout << "Face normals :" << std::endl;
+  BOOST_FOREACH(face_descriptor fd, faces(mesh)){
+    std::cout << fnormals[fd] << std::endl;
+  }
+  std::cout << "Vertex normals :" << std::endl;
+  BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){
+    std::cout << vnormals[vd] << std::endl;
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example_OM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example_OM.cpp
new file mode 100644
index 0000000..d5338b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/compute_normals_example_OM.cpp
@@ -0,0 +1,59 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+
+#include <iostream>
+#include <fstream>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_3 Point;
+typedef K::Vector_3 Vector;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
+
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+
+
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/eight.off";
+
+  Mesh mesh;
+  OpenMesh::IO::read_mesh(mesh, filename);
+
+  CGAL::OM_pmap<Mesh, face_descriptor, Vector> fnormals(mesh);
+  CGAL::OM_pmap<Mesh, vertex_descriptor, Vector> vnormals(mesh);
+  mesh.add_property(fnormals.handle());
+  mesh.add_property(vnormals.handle());
+
+  Vector v(0, 0, 0);
+  BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){
+      put(vnormals, vd, v); 
+    }
+  BOOST_FOREACH(face_descriptor fd, faces(mesh)){
+      put(fnormals, fd, v); 
+    }
+  CGAL::Polygon_mesh_processing::compute_normals
+    (mesh,
+     vnormals,
+     fnormals,
+     CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)).
+     geom_traits(K()));
+
+  std::cout << "Face normals :" << std::endl;
+  BOOST_FOREACH(face_descriptor fd, faces(mesh)){
+    std::cout << fnormals[fd] << std::endl;
+  }
+  std::cout << "Normals at vertices :" << std::endl;
+  BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){
+    std::cout << vnormals[vd] << std::endl;
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/connected_components_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/connected_components_example.cpp
new file mode 100644
index 0000000..70965a7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/connected_components_example.cpp
@@ -0,0 +1,131 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <boost/function_output_iterator.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/foreach.hpp>
+#include <iostream>
+#include <fstream>
+#include <map>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3                                     Point;
+typedef Kernel::Compare_dihedral_angle_3                    Compare_dihedral_angle_3;
+
+typedef CGAL::Surface_mesh<Point>                           Mesh;
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+template <typename G>
+struct Constraint : public boost::put_get_helper<bool,Constraint<G> >
+{
+  typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
+  typedef boost::readable_property_map_tag      category;
+  typedef bool                                  value_type;
+  typedef bool                                  reference;
+  typedef edge_descriptor                       key_type;
+
+  Constraint()
+    :g_(NULL)
+  {}
+
+  Constraint(G& g, double bound) 
+    : g_(&g), bound_(bound)
+  {}
+
+  bool operator[](edge_descriptor e) const
+  {
+    const G& g = *g_;
+    return compare_(g.point(source(e, g)),
+                    g.point(target(e, g)),
+                    g.point(target(next(halfedge(e, g), g), g)),
+                    g.point(target(next(opposite(halfedge(e, g), g), g), g)),
+                   bound_) == CGAL::SMALLER;
+  }
+
+  const G* g_;
+  Compare_dihedral_angle_3 compare_;
+  double bound_;
+};
+
+
+template <typename PM>
+struct Put_true
+{
+  Put_true(const PM pm)
+    :pm(pm)
+  {}
+
+  template <typename T>
+  void operator()(const T& t)
+  {
+    put(pm, t, true);
+  }
+
+  PM pm;
+};
+
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/blobby_3cc.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  if (!input || !(input >> mesh) || mesh.is_empty()) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+  const double bound = std::cos(0.75 * CGAL_PI);
+
+  std::vector<face_descriptor> cc;
+  face_descriptor fd = *faces(mesh).first;
+  PMP::connected_component(fd,
+      mesh,
+      std::back_inserter(cc));
+
+  std::cerr << "Connected components without edge constraints" << std::endl;
+  std::cerr << cc.size() << " faces in the CC of " << fd << std::endl;
+  
+  // Instead of writing the faces into a container, you can set a face property to true
+  typedef Mesh::Property_map<face_descriptor, bool> F_select_map;
+  F_select_map fselect_map =
+    mesh.add_property_map<face_descriptor, bool>("f:select", false).first;
+  PMP::connected_component(fd,
+      mesh,
+      boost::make_function_output_iterator(Put_true<F_select_map>(fselect_map)));
+
+
+  std::cerr << "\nConnected components with edge constraints (dihedral angle < 3/4 pi)" << std::endl;
+  Mesh::Property_map<face_descriptor, std::size_t> fccmap =
+    mesh.add_property_map<face_descriptor, std::size_t>("f:CC").first;
+  std::size_t num = PMP::connected_components(mesh,
+      fccmap,
+      PMP::parameters::edge_is_constrained_map(Constraint<Mesh>(mesh, bound)));
+
+  std::cerr << "- The graph has " << num << " connected components (face connectivity)" << std::endl;
+  typedef std::map<std::size_t/*index of CC*/, unsigned int/*nb*/> Components_size;
+  Components_size nb_per_cc;
+  BOOST_FOREACH(face_descriptor f , faces(mesh)){
+    nb_per_cc[ fccmap[f] ]++;
+  }
+  BOOST_FOREACH(const Components_size::value_type& cc, nb_per_cc){
+    std::cout << "\t CC #" << cc.first
+              << " is made of " << cc.second << " faces" << std::endl;
+  }
+
+  std::cerr << "- We keep only components which have at least 4 faces" << std::endl; 
+  PMP::keep_large_connected_components(mesh,
+      4,
+      PMP::parameters::edge_is_constrained_map(Constraint<Mesh>(mesh, bound)));
+
+  std::cerr << "- We keep the two largest components" << std::endl; 
+  PMP::keep_largest_connected_components(mesh,
+      2,
+      PMP::parameters::edge_is_constrained_map(Constraint<Mesh>(mesh, bound)));
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/P.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/P.off
new file mode 100644
index 0000000..157e282
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/P.off
@@ -0,0 +1,53 @@
+OFF
+26 25 102
+0 0 0
+1 0 0
+1 2 0
+2 2 0
+3 3 0
+3 4 0
+2 5 0
+0 5 0
+1 3 0
+1.5 3 0
+2 3.5 0
+1.5 4 0
+1 4 0
+0 0 1
+1 0 1
+1 2 1
+2 2 1
+3 3 1
+3 4 1
+2 5 1
+0 5 1
+1 3 1
+1.5 3 1
+2 3.5 1
+1.5 4 1
+1 4 1
+6 7 12 8 2 1 0
+4 8 9 3 2
+4 9 10 4 3
+3 10 5 4
+4 10 11 6 5
+4 7 6 11 12
+6 13 14 15 21 25 20
+4 15 16 22 21
+4 16 17 23 22
+3 17 18 23
+4 18 19 24 23
+4 25 24 19 20
+4 0 1 14 13
+4 1 2 15 14
+4 2 3 16 15
+4 3 4 17 16
+4 4 5 18 17
+4 5 6 19 18
+4 6 7 20 19
+4 7 0 13 20
+4 8 12 25 21
+4 12 11 24 25
+4 11 10 23 24
+4 10 9 22 23
+4 9 8 21 22
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby.off
new file mode 100644
index 0000000..f4fda2d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby.off
@@ -0,0 +1,6081 @@
+OFF
+2027 4050 0
+
+0.0958494 0.00115985 -0.166522
+-0.0890262 -0.0253551 -0.184829
+0.027537 -0.144185 0.125459
+-0.0957876 -0.130678 0.145836
+-0.2052 0.0911582 -0.0713736
+0.23334 0.157643 -0.0790664
+0.23333 0.183679 0.0314829
+0.0116254 0.0348884 0.195738
+0.0616047 0.162666 0.15098
+0.131725 0.211075 -0.0224619
+-0.15771 -0.0621695 -0.114255
+-0.325953 -0.116315 0.0363017
+-0.258277 -9.96328e-005 -0.066962
+0.134113 -0.042284 0.121878
+0.302143 0.124693 0.0295703
+0.133766 0.130061 -0.0945151
+0.183739 0.124065 0.130482
+-0.0399734 -0.0945666 -0.188625
+-0.394842 0.0627338 0.00536269
+-0.137998 0.173848 0.0967775
+-0.0386748 0.229049 0.0361862
+-0.0392952 -0.165982 -0.115822
+-0.171824 -0.176912 -0.00865227
+-0.150346 -0.0322864 0.1629
+-0.219923 -0.105035 -0.044157
+-0.172879 0.0784669 0.134243
+0.016567 0.217651 -0.0195546
+0.0794101 -0.0895981 -0.0472013
+-0.313698 0.0380774 0.094855
+0.318547 0.125087 -0.0198694
+0.23227 0.0225103 -0.0218715
+0.288602 0.0623503 -0.00286261
+0.232539 0.0337645 0.0884656
+-0.257774 -0.0579123 0.114719
+0.0563849 0.229622 0.0738682
+0.278436 0.167832 -0.00539504
+-0.314713 0.0915738 -0.0607805
+0.0853491 0.0667002 -0.136862
+0.0238762 -0.124001 -0.17752
+0.0259901 -0.039927 -0.194952
+-0.105554 0.0704281 -0.157699
+0.289374 0.136378 -0.0715411
+0.235568 0.0765716 -0.0823253
+-0.245592 -0.0554978 -0.0581248
+-0.391169 -0.0634443 -0.086141
+-0.319473 -0.0445621 -0.0706851
+-0.294197 -0.111617 -0.0494176
+-0.374549 0.0271624 -0.0883772
+-0.253729 -0.173014 -0.0128907
+-0.21636 -0.14897 0.0823854
+-0.066871 0.112543 0.163308
+-0.134132 -0.136482 -0.0757672
+-0.0682104 -0.196549 -0.0186103
+0.0280116 0.03795 -0.182732
+-0.217265 0.0367722 -0.0761751
+-0.162115 0.056706 -0.114965
+-0.259921 0.0739938 -0.0650284
+-0.263827 0.132437 0.0345987
+-0.244668 0.134276 -0.0327609
+-0.147003 0.169249 -0.0355379
+-0.200611 0.169171 0.0171526
+-0.204369 0.131258 0.0856347
+0.161721 0.0518293 -0.109485
+-0.303072 0.0361583 -0.0731545
+-0.179865 -0.0862429 -0.0728761
+0.226968 0.189503 -0.0282298
+0.173201 0.184456 -0.067608
+0.182543 0.205347 0.00852821
+0.175562 0.186628 0.0841909
+0.125387 0.218763 0.0470426
+0.111015 0.194442 0.111774
+-0.17503 -0.129411 -0.0459342
+0.171469 -0.0162885 0.0309691
+0.0620033 -0.1101 0.0438386
+0.000828558 -0.181486 0.0433994
+-0.091978 -0.221835 0.0852608
+-0.213686 -0.148588 -0.0242963
+-0.255516 -0.132659 -0.0348916
+-0.299158 -0.157094 -0.0280815
+-0.371903 -0.129233 -0.0453233
+-0.289351 -0.156961 0.0265973
+-0.271491 -0.114067 0.0733012
+-0.319216 -0.0636803 0.0818392
+-0.418849 -0.0484997 0.0253466
+-0.24013 -0.181604 0.0419435
+-0.168769 -0.211101 0.0641759
+-0.0313729 0.186201 -0.0797752
+0.0310134 0.152072 -0.11733
+-0.0477668 0.131896 -0.143761
+0.122424 0.139982 0.145627
+0.137703 0.0451028 0.167145
+0.0708263 0.0877104 0.177143
+-0.258701 0.0840235 0.0876754
+-0.245925 0.0201307 0.137908
+-0.31407 0.0875519 0.0473752
+-0.480337 -0.0353406 -0.045931
+-0.442794 0.0105823 -0.100726
+0.0754016 0.224229 0.00641394
+0.00534235 0.12164 0.175352
+-0.0349476 0.200792 0.131192
+0.072181 -0.109688 -0.12035
+0.119341 -0.0534773 0.0565959
+0.0867885 -0.090323 0.105552
+0.0632331 -0.04399 0.184927
+-0.0392556 -0.0539762 0.184882
+-0.361374 0.0477886 0.0558292
+-0.361193 -0.0107018 0.0908968
+-0.416327 0.0142746 0.0438039
+-0.455557 0.0276546 -0.0170243
+-0.0323993 -0.150381 -0.162142
+-0.0970416 -0.12747 -0.137748
+0.0150389 -0.155421 -0.130476
+0.0394782 -0.13985 -0.0691441
+0.278587 0.072168 0.0614076
+0.240141 0.0960435 0.10983
+0.196467 0.0560711 0.139083
+0.182764 -0.000831763 0.111317
+-0.21378 -0.185125 -0.000724208
+-0.182684 -0.206575 0.0223814
+-0.116864 -0.211741 0.0233662
+0.128798 -0.0476846 -0.0709653
+-0.151224 -0.159278 0.110503
+-0.186717 -0.0912332 0.126278
+-0.136046 0.197824 0.0292673
+-0.0799701 0.202495 -0.0219019
+-0.0908148 0.214911 0.0746841
+0.221852 0.150137 0.0928415
+0.268648 0.127162 0.0737685
+-0.100355 0.157268 -0.0946836
+-0.151142 0.117293 -0.0953014
+-0.0598251 -0.213443 0.0369284
+-0.0321557 -0.203064 0.0927271
+-0.0758939 -0.184077 0.128448
+-0.0311162 -0.14381 0.158087
+0.0178807 -0.0969897 0.176592
+0.0474164 -0.125379 -0.0118837
+0.137437 -0.0346598 0.0136343
+0.177953 -0.0103553 -0.035624
+0.139109 -0.0349729 -0.0347612
+0.158771 -0.024122 -0.0659726
+0.141486 -0.020496 -0.127385
+0.197282 0.0147799 -0.0836013
+0.0989259 -0.0612015 -0.152448
+0.146216 -0.0331176 -0.0962158
+0.115695 -0.0620378 -0.111119
+0.168295 -0.00144778 -0.105241
+0.143284 0.0207434 -0.129543
+0.123336 0.0565421 -0.124097
+0.107295 0.0970325 -0.111084
+0.0830278 0.144804 -0.105192
+0.116715 0.182192 -0.0775793
+0.0649378 0.108018 -0.128027
+0.00886149 0.108014 -0.155996
+-0.0439072 0.0766944 -0.178622
+0.0437013 0.0767872 -0.155644
+0.102639 0.0339353 -0.147441
+0.0664848 0.0308188 -0.168122
+0.0574185 -0.00862201 -0.187686
+0.0659222 -0.0512212 -0.179973
+0.0352888 -0.0823282 -0.186738
+-0.00514964 -0.0699335 -0.195786
+-0.0296251 -0.0133509 -0.196151
+-0.0434445 -0.0528929 -0.192773
+-0.0872762 -0.076468 -0.180079
+-0.129147 -0.0500857 -0.158465
+-0.129284 0.0124896 -0.155284
+0.0695584 -0.0898679 -0.162988
+0.147444 0.0903834 -0.0996231
+0.188674 0.125502 -0.0870381
+0.190514 0.0814446 -0.0929528
+0.0543565 0.190818 -0.0744677
+-0.0676336 0.0264182 -0.185549
+0.0183536 0.000577163 -0.197389
+-0.0166393 0.031641 -0.195381
+-0.001435 0.0694683 -0.181212
+0.248561 0.0317378 0.0328905
+-0.128762 -0.0922393 -0.136755
+-0.1478 -0.10176 -0.0985596
+-0.183769 0.000809428 -0.0981379
+-0.142413 -0.159393 -0.0379004
+-0.0934853 -0.171508 -0.0612999
+-0.039723 -0.182589 -0.0634592
+-0.0116406 -0.185728 -0.0129543
+-0.130894 -0.187892 -0.00872955
+-0.000937363 -0.169029 -0.0876581
+-0.366824 -0.0724282 0.0453077
+-0.394642 -0.0954812 -0.00194395
+-0.440674 -0.0692916 -0.0230396
+-0.458899 -0.0268371 0.000520617
+-0.449781 -0.0715781 -0.0816362
+-0.416087 -0.102536 -0.0556142
+-0.310063 0.120373 -0.00558273
+-0.359557 0.0973339 -0.0246998
+-0.408598 0.0712299 -0.0566547
+0.210226 0.0065473 0.0528917
+0.10443 -0.0645713 -0.0512281
+0.0928885 -0.0838549 -0.0852733
+0.0647924 -0.112421 -0.0731805
+-0.25816 -0.0952338 -0.0476423
+-0.29017 -0.0715026 -0.0590899
+-0.334066 -0.0900194 -0.0653012
+-0.0881154 0.18359 0.121824
+-0.116958 0.131991 0.135245
+-0.115528 0.0740867 0.158033
+-0.0562597 0.0460874 0.182682
+-0.154707 0.0281229 0.162592
+-0.101345 0.00172185 0.183998
+-0.200295 -0.00554548 0.159778
+-0.055075 0.159282 0.150294
+-0.00513261 0.168012 0.15663
+0.0256509 0.210455 0.123931
+-0.000484079 0.23337 0.0785256
+0.0243063 0.232033 0.0312676
+0.297468 0.0856477 -0.0518916
+0.264291 0.0516813 -0.0431796
+-0.000333759 -0.14362 -0.17393
+-0.00811779 -0.111725 -0.189145
+0.0233168 -0.144538 -0.156498
+0.0520569 -0.121215 -0.153498
+0.0403492 -0.139089 -0.132197
+0.0307313 -0.148756 -0.10091
+0.0520152 -0.129366 -0.0938706
+-0.0358469 -0.125283 -0.1814
+-0.0719963 -0.112037 -0.174525
+-0.0579005 -0.136109 -0.165268
+-0.053519 -0.152974 -0.139859
+-0.0826048 -0.155575 -0.104309
+-0.102837 -0.101678 -0.161026
+-0.0801971 -0.127893 -0.156609
+-0.0767072 -0.142872 -0.136199
+0.00103891 -0.155684 -0.151643
+-0.0126392 -0.163805 -0.12728
+-0.153213 -0.0200729 -0.132827
+-0.157003 0.0192245 -0.127469
+-0.11382 -0.0744379 -0.166512
+-0.106384 -0.047927 -0.177108
+-0.117555 -0.0169507 -0.168029
+-0.0991594 0.0131089 -0.174764
+-0.0913706 0.0448592 -0.172496
+-0.0756406 0.0736176 -0.170824
+-0.0873468 0.110478 -0.147509
+-0.0594532 0.101489 -0.163026
+-0.0244708 0.103135 -0.166028
+-0.127423 0.0986322 -0.129408
+-0.118816 0.0419869 -0.157553
+-0.133878 0.0664189 -0.13894
+-0.0153011 0.128439 -0.147224
+-0.0252286 0.160621 -0.116778
+0.00635037 0.1777 -0.0954873
+0.00400885 0.200533 -0.0580222
+-0.0317462 0.211172 -0.0259917
+-0.0811961 -0.0509828 -0.185782
+-0.0616152 -0.0307688 -0.191254
+-0.0704314 -0.00277796 -0.188487
+-0.0629541 -0.0698913 -0.187795
+-0.0455164 0.0102212 -0.193522
+-0.0430043 0.0373487 -0.190547
+-0.0241987 0.0567533 -0.188576
+-0.063225 0.0525651 -0.181777
+-0.0655626 0.155373 -0.115695
+-0.0687568 0.176717 -0.0835132
+-0.104738 0.179668 -0.054078
+-0.0566616 0.195811 -0.052082
+-0.0949674 0.135982 -0.123239
+-0.123404 0.134453 -0.104745
+-0.141589 0.148908 -0.070839
+-0.189965 0.138072 -0.0480893
+-0.139982 0.0339539 -0.142608
+-0.0698644 -0.0908595 -0.182455
+-0.0869951 -0.0980032 -0.173608
+-0.0888347 -0.113272 -0.163583
+-0.100216 -0.115422 -0.150258
+-0.116397 -0.113163 -0.131517
+-0.109588 -0.135899 -0.107769
+-0.113596 -0.103854 -0.146711
+-0.115309 -0.0895474 -0.15719
+-0.129883 -0.0730398 -0.149787
+-0.144897 -0.0545486 -0.136877
+-0.141243 -0.0752655 -0.131382
+-0.140529 -0.0929734 -0.117774
+-0.129819 -0.114322 -0.110492
+-0.154957 -0.0820572 -0.10525
+-0.17319 -0.0660304 -0.0911662
+-0.205716 -0.0543781 -0.0686289
+-0.174187 -0.0328375 -0.103341
+-0.163372 -0.0911572 -0.0868618
+-0.155341 -0.116364 -0.0743424
+-0.198099 -0.0244193 -0.0815967
+-0.209496 0.00564775 -0.0793296
+-0.104811 -0.153707 -0.0834025
+-0.193364 0.0274989 -0.0905073
+-0.195098 0.0613981 -0.0852378
+-0.174866 0.0906393 -0.0907104
+-0.183042 0.115353 -0.0707315
+-0.209624 0.117075 -0.0568091
+-0.23628 0.0972374 -0.0606186
+-0.27478 0.110265 -0.0497172
+-0.228367 0.0668769 -0.0698484
+-0.251112 0.040523 -0.068888
+-0.216608 0.137171 -0.0376511
+-0.227411 0.154531 -0.00555484
+-0.194777 0.158609 -0.0193378
+-0.164962 0.178815 -0.000179778
+-0.231456 0.152575 0.0323689
+-0.199826 0.160548 0.0572605
+-0.236965 0.128656 0.0633833
+-0.17123 0.182733 0.0404826
+-0.128564 0.190448 -0.00837419
+-0.0991129 0.20863 0.0142043
+-0.168524 0.169871 0.0755126
+-0.163588 0.136428 0.107596
+-0.141392 0.192471 0.0652526
+-0.0624533 0.217825 0.00842925
+-0.073927 0.221866 0.0429573
+-0.0492884 0.227715 0.0784747
+-0.262211 0.142443 -0.00109806
+-0.266844 0.107888 0.0613638
+-0.28881 0.0827382 0.0705891
+-0.282314 0.0571684 0.0961857
+-0.244984 0.0555902 0.115396
+-0.28409 0.0230004 0.120573
+-0.20539 0.04444 0.13869
+-0.216657 0.0913735 0.106246
+-0.321301 -0.0037008 0.113436
+-0.269434 -0.018038 0.132429
+-0.227907 -0.0342978 0.138796
+-0.316898 0.0628548 0.0711805
+-0.295857 -0.0407173 0.108514
+-0.339188 0.0416768 0.077048
+-0.366857 0.0205973 0.0768175
+-0.394153 -0.0072429 0.0688749
+-0.337377 0.0176792 0.0971164
+-0.372548 -0.0402007 0.0673096
+-0.388725 0.0294257 0.0537187
+-0.404944 0.0403335 0.0272473
+-0.426273 0.0449791 -0.00258157
+-0.436411 0.0526146 -0.0384857
+-0.471392 0.0283371 -0.0641431
+-0.434831 0.0477246 -0.0809856
+-0.441717 0.016121 0.0160487
+-0.378625 0.0566371 0.0313463
+-0.346799 0.0750443 0.0354924
+-0.367064 0.0785269 0.0104993
+-0.336435 0.0992608 0.009509
+-0.43494 -0.0160295 0.0332624
+-0.38249 0.0807931 -0.0150041
+-0.380719 0.0863079 -0.0474863
+-0.41036 0.065654 -0.0233953
+-0.377973 0.0638507 -0.078275
+-0.341264 0.0474669 -0.0785868
+-0.336052 -0.000329239 -0.0797136
+-0.348501 0.0926189 -0.0565738
+-0.328397 0.110798 -0.0340867
+-0.377367 -0.0192039 -0.089504
+-0.421433 -0.0305453 -0.0985605
+-0.114682 0.207742 0.0527045
+-0.116467 0.199227 0.0825376
+-0.0938153 0.201811 0.100205
+-0.0638427 0.205699 0.114819
+-0.0372253 0.220532 0.106709
+-0.00713486 0.21589 0.120472
+0.00412912 0.194028 0.140734
+0.0286461 0.172559 0.151816
+0.0369435 0.139115 0.166063
+0.0759809 0.12629 0.163777
+0.112766 0.0995206 0.164051
+0.0519201 0.191606 0.135347
+0.0585701 0.215447 0.107917
+0.0916601 0.217851 0.0867493
+0.0858377 0.181441 0.133122
+0.08665 0.226782 0.0485108
+0.0377801 0.104182 0.178026
+0.00202303 0.0782792 0.1876
+0.0395654 0.0658429 0.187567
+0.0855167 0.0342036 0.183976
+0.118664 -0.0089809 0.165937
+0.116016 0.168844 0.131562
+0.155925 0.155755 0.124628
+0.139187 0.180044 0.113112
+0.135622 0.205066 0.082699
+0.161426 0.206082 0.0537547
+0.199219 0.191721 0.0517405
+0.029606 0.22756 0.0947735
+0.150049 0.109534 0.149415
+-0.0301278 0.101389 0.177374
+-0.0279917 0.137845 0.166428
+0.180989 0.0895417 0.14411
+0.209834 0.100628 0.127196
+0.152129 0.0757484 0.158321
+0.223766 0.123301 0.109789
+0.200021 0.141994 0.112242
+0.196231 0.166697 0.0946543
+0.216873 0.17303 0.0709274
+0.247026 0.154665 0.0683708
+0.275262 0.149044 0.0426982
+0.249149 0.11998 0.094882
+0.265608 0.0907272 0.0873119
+0.247289 0.0635133 0.0993065
+0.223522 0.0693513 0.123084
+0.214216 0.0371396 0.116998
+0.187747 0.02422 0.133089
+0.154819 -0.00119342 0.143999
+0.168326 0.0434847 0.152936
+0.170987 0.169879 0.105953
+-0.174282 0.0232202 -0.10807
+-0.284597 -0.0732055 0.0931726
+-0.25108 -0.09202 0.097698
+-0.222464 -0.0753609 0.11957
+-0.214213 -0.113101 0.103683
+-0.302903 -0.0945116 0.0686402
+-0.195428 -0.0556839 0.139432
+-0.156829 -0.0700418 0.146298
+-0.0976748 -0.0658008 0.166048
+-0.144421 -0.115749 0.132619
+-0.29612 -0.123273 0.0514632
+-0.266231 -0.145856 0.0540206
+0.0488831 0.0294674 0.192113
+0.023936 -0.0145482 0.198863
+0.0717513 -0.00410704 0.187615
+-0.0287241 -0.00156414 0.194867
+-0.152398 -0.135765 -0.057189
+-0.100872 -0.0864911 -0.170917
+-0.0593818 0.184347 0.134966
+-0.035312 0.178094 0.146741
+-0.0776543 0.165473 0.138
+-0.105632 0.159255 0.127513
+-0.0766796 0.138244 0.150939
+-0.0968478 0.113293 0.151863
+-0.0853482 0.0853291 0.164915
+-0.0917353 0.0496009 0.172492
+-0.126566 0.10163 0.143708
+-0.133447 0.150712 0.116875
+-0.144857 0.120635 0.126973
+-0.173737 0.107421 0.118943
+-0.1614 -0.146542 -0.0390305
+-0.186603 -0.146865 -0.0282327
+-0.201541 -0.125228 -0.0379031
+-0.193134 -0.103124 -0.0539853
+-0.211049 -0.0803921 -0.0567836
+-0.159914 -0.163462 -0.0232774
+-0.227528 -0.128247 -0.0340061
+-0.238879 -0.149045 -0.0253663
+-0.226397 -0.167794 -0.0140136
+-0.201369 -0.167497 -0.0134536
+-0.262857 -0.15434 -0.0259797
+-0.280568 -0.171091 -0.0144786
+-0.281744 -0.138503 -0.0368599
+-0.309473 -0.135166 -0.0434532
+-0.340134 -0.141114 -0.00457478
+-0.269395 -0.179854 0.0148325
+-0.305326 -0.162726 0.00125739
+-0.315329 -0.141054 0.0209936
+-0.328044 -0.152371 -0.0287465
+-0.340488 -0.131656 -0.0493684
+-0.321044 -0.1131 -0.0550007
+-0.356693 -0.110151 -0.0633657
+-0.36424 -0.0799503 -0.0753809
+-0.387596 -0.110687 -0.0644618
+-0.362559 -0.0476361 -0.081757
+-0.396237 -0.113781 -0.0353861
+-0.371596 -0.120753 -0.0109802
+-0.364576 -0.10081 0.0203935
+-0.417619 -0.0918209 -0.0251753
+-0.418352 -0.0719487 0.00161618
+-0.393997 -0.0714926 0.0251311
+-0.394772 -0.0475977 0.0459488
+-0.402686 -0.0895353 -0.0784898
+-0.42084 -0.0681017 -0.0897032
+-0.4404 -0.0509827 0.00126062
+-0.459655 -0.0472284 -0.0203999
+-0.460671 -0.0638923 -0.050193
+-0.475196 -0.0484471 -0.0775462
+-0.489471 -0.00806259 -0.0776671
+-0.475138 -0.0247761 -0.0213132
+-0.486424 -0.00153525 -0.0440281
+-0.468403 0.00156711 -0.00678311
+-0.242074 -0.191329 0.00830808
+-0.429783 -0.0877853 -0.0735719
+-0.43628 -0.0850827 -0.0461373
+-0.191731 -0.183481 -0.00157165
+-0.201183 -0.19839 0.0124415
+-0.207449 -0.198571 0.0495067
+-0.173223 -0.193455 0.00663966
+-0.149821 -0.209649 0.0233901
+-0.134115 -0.223229 0.055024
+-0.136108 -0.199724 0.0945508
+-0.152801 -0.187823 -0.00205719
+-0.18838 -0.178751 0.0798359
+-0.0995335 -0.223011 0.0513334
+-0.114673 -0.175248 0.119217
+-0.440477 -0.0499869 -0.09565
+-0.451957 -0.0204046 -0.101857
+-0.0735325 0.215767 0.0934543
+-0.234693 0.0151621 -0.0705707
+-0.232313 -0.0142483 -0.068254
+-0.256967 -0.0290178 -0.0629623
+-0.292996 -0.0166728 -0.06866
+-0.201581 -0.207306 0.0313934
+-0.223725 -0.199636 0.0229592
+-0.183119 -0.212742 0.045317
+-0.188846 -0.19935 0.0634693
+-0.160028 -0.218047 0.0431693
+-0.204584 -0.184112 0.0658921
+-0.172989 -0.194432 0.0779813
+-0.166513 -0.17455 0.0946992
+-0.18471 -0.141617 0.103157
+-0.153237 -0.206081 0.080472
+-0.13192 -0.217895 0.078765
+-0.113273 -0.211482 0.0952368
+-0.0876939 -0.205117 0.110143
+-0.0617909 -0.215381 0.0941536
+-0.0467071 -0.213033 0.0660721
+-0.0272 -0.201713 0.0396055
+-0.0428995 -0.202112 0.00684775
+-0.0500405 -0.19896 0.118331
+-0.00923828 -0.174641 0.123557
+-0.0448164 -0.172256 0.141435
+0.0162634 -0.165534 0.0849788
+0.0489655 -0.130695 0.0849369
+0.0328257 -0.147003 0.0438674
+-0.0648791 -0.145555 0.150587
+-0.0537054 -0.100021 0.169641
+-0.0147565 -0.194348 0.0677628
+-0.00796641 -0.18555 0.0956339
+0.016581 -0.163544 0.00884718
+0.0177079 -0.160734 -0.0359242
+0.058778 -0.116217 0.123118
+0.0778076 -0.081498 0.154441
+0.0352324 -0.119032 0.151956
+0.00114088 -0.126919 0.163291
+-0.0183444 -0.100065 0.178246
+-0.00235339 -0.0663502 0.190792
+0.0341041 -0.066022 0.187462
+0.0492495 -0.089232 0.169327
+-0.0128114 -0.0329744 0.194855
+-0.115415 -0.225031 0.0662711
+-0.0730773 -0.220943 0.0605258
+-0.343357 -0.0395192 0.0853781
+-0.0113899 -0.18949 0.0169894
+-0.118843 -0.193531 0.107193
+-0.138023 -0.179018 0.106649
+-0.100643 -0.19026 0.116541
+-0.0947661 -0.172586 0.128428
+-0.111739 -0.149926 0.13206
+-0.0760933 -0.163142 0.139445
+-0.234903 -0.085372 -0.0497887
+-0.029894 0.2223 0.00506028
+-0.0077 0.230474 0.027082
+-0.0166405 0.233414 0.05448
+0.0101539 0.234325 0.0539289
+0.0372094 0.233262 0.0550673
+0.0555455 0.230342 0.0298477
+0.04283 0.224072 -0.000217558
+0.067148 0.21097 -0.0360407
+0.011472 0.226074 0.00687303
+-0.0558591 -0.10463 -0.182934
+-0.0565936 -0.121689 -0.17642
+0.121759 -0.0457408 -0.0178067
+-0.0530737 0.134352 0.160908
+0.123973 0.0718871 0.168299
+0.0221523 0.233586 0.0737068
+-0.00353417 -0.152521 0.145381
+-0.157503 -0.0407249 -0.123137
+-0.402744 0.0442574 -0.0877635
+-0.405641 0.00799179 -0.0966936
+-0.121506 -0.157661 -0.0590498
+-0.111905 -0.177728 -0.0341975
+-0.0778988 0.0229642 0.18259
+-0.0653335 -0.0142125 0.187109
+-0.049684 0.0182208 0.189225
+-0.0227026 0.0405432 0.191262
+-0.10136 -0.0715673 -0.175466
+-0.30971 0.108636 0.0239712
+0.284328 0.102013 0.0657535
+0.30034 0.0876156 0.0350277
+0.313093 0.101645 0.00557695
+0.281734 0.059859 0.0301131
+0.31369 0.0939172 -0.0255194
+0.313301 0.115146 -0.0514087
+0.305361 0.148098 -0.0427014
+0.266831 0.169885 -0.0514279
+0.28652 0.1262 0.0529506
+0.302138 0.149778 -0.0123269
+0.29091 0.14998 0.0162535
+0.26822 0.166638 0.0212854
+0.247534 0.182808 -0.00123423
+0.215545 0.195039 0.00400645
+0.253566 0.165453 0.0442228
+0.287285 0.162995 -0.0300387
+0.264833 0.175412 -0.0261528
+0.246183 0.18101 -0.0421722
+0.216699 0.181738 -0.0604516
+0.191444 0.197063 -0.0374138
+0.197618 0.159773 -0.0814181
+0.162626 0.151044 -0.0869195
+0.246413 0.171038 -0.0640185
+0.262152 0.14856 -0.0768471
+0.236906 0.117298 -0.0837704
+0.266508 0.119186 -0.0801675
+0.291373 0.107261 -0.070559
+0.268727 0.0804238 -0.0713972
+0.157844 0.20099 -0.0419927
+0.127221 0.199769 -0.0524808
+0.0921871 0.199144 -0.0582807
+0.160558 0.208675 -0.0124965
+0.136234 0.216589 0.0128056
+0.106226 0.209253 -0.0354265
+0.105789 0.21885 -0.00422888
+0.0987139 0.224454 0.0227998
+0.310132 0.1309 0.00482773
+0.264335 0.0486808 0.050986
+0.242897 0.0320616 0.0613799
+0.255315 0.0509231 0.0765592
+0.223445 0.0189006 0.0703454
+0.198446 0.00226779 0.0829469
+0.159642 -0.0264743 0.0770455
+0.184659 -0.00995121 0.0581628
+0.295808 0.0728961 -0.0273998
+0.304133 0.0814612 -0.00568077
+0.296666 0.0746018 0.0156567
+0.278322 0.0564608 -0.0240055
+0.262042 0.0406401 0.00220734
+0.259669 0.0411964 -0.0218671
+0.243852 0.034963 -0.0421001
+0.215266 0.0162635 -0.0527158
+0.245815 0.0518064 -0.0675671
+0.214942 0.046667 -0.0864707
+0.282632 0.0654666 -0.0447211
+0.268523 0.0633842 -0.0596897
+0.281296 0.0760982 -0.0592187
+0.283254 0.0910852 -0.0692596
+0.26702 0.0993994 -0.0774233
+0.252339 0.0866404 -0.080311
+0.235073 0.0969385 -0.0840247
+0.210826 0.109417 -0.0864937
+0.214308 0.0858398 -0.0880213
+0.214047 0.137226 -0.0844927
+0.25352 0.0685975 -0.0733756
+0.252369 0.108439 -0.0822663
+0.205928 0.0659372 -0.0916771
+0.188313 0.0431929 -0.0992933
+0.170591 0.0255543 -0.111447
+0.194227 -0.00344713 0.0344716
+0.186031 -0.00641741 -0.000610057
+0.221621 0.0132033 0.0205145
+0.158466 -0.0217212 -0.0111899
+0.203821 0.00534862 -0.0246978
+-0.0873673 -0.213787 0.0258875
+-0.0988088 -0.199309 -0.00314121
+-0.0250407 0.231884 0.077572
+-0.0132887 0.227702 0.0992761
+0.00907169 0.224567 0.10582
+-0.0381223 0.231393 0.0596562
+-0.0597913 0.227196 0.0590599
+-0.068062 0.222998 0.0762016
+-0.0768204 0.221895 0.0606255
+-0.0944706 0.215866 0.048674
+-0.107247 0.209847 0.0333512
+-0.119042 0.202294 0.0174804
+-0.110264 0.199934 -0.00206571
+-0.108772 0.189998 -0.0282832
+-0.0885764 0.215953 0.0295549
+-0.135337 0.194063 0.00985829
+-0.156117 0.187793 0.0203953
+-0.177021 0.179366 0.0189113
+-0.299224 0.119756 -0.0341043
+-0.285395 0.131717 -0.0127806
+-0.281551 0.130928 0.0140859
+-0.285947 0.115513 0.0369868
+-0.150405 -0.218482 0.06527
+0.0152028 -0.0430482 0.197139
+0.0402834 -0.0349374 0.194561
+-0.0851073 -0.18549 -0.0382905
+-0.0673308 -0.181154 -0.0594061
+-0.0570762 -0.172068 -0.0890807
+-0.0287352 -0.17445 -0.0907527
+-0.0159017 -0.177558 -0.069441
+-0.0204618 -0.184795 -0.0411489
+0.00873811 -0.167111 -0.0615609
+-0.0381433 -0.194183 -0.0204349
+-0.051034 -0.189416 -0.0417802
+-0.35122 -0.0598012 0.0662197
+-0.33698 -0.0880177 0.0525415
+-0.414438 -0.029614 0.0437536
+-0.396684 -0.0282297 0.0588966
+-0.410734 -0.0120685 0.0558495
+-0.40436 0.00706511 0.0586068
+-0.386161 0.0132369 0.0692927
+-0.377761 -0.00208539 0.0810993
+-0.373236 -0.0223653 0.0783082
+-0.357341 -0.0277509 0.0855502
+-0.337893 -0.0190526 0.100516
+-0.32019 -0.038641 0.0982197
+-0.310347 -0.0235748 0.112107
+-0.295255 -0.0032073 0.126315
+-0.290437 -0.0236301 0.120756
+-0.27395 -0.0406672 0.11799
+-0.25102 -0.0377029 0.128663
+-0.227421 -0.0666674 -0.0569025
+-0.226022 -0.0447003 -0.0636812
+-0.210588 -0.0356727 -0.0716031
+-0.214081 -0.0168631 -0.0739229
+-0.194807 -0.0430067 -0.0792776
+-0.188472 -0.062926 -0.0770752
+-0.221809 -0.00259957 -0.0725998
+-0.22142 0.0115402 -0.0742428
+-0.209966 0.0222645 -0.0797481
+-0.203742 0.0357387 -0.083051
+-0.208844 0.0522034 -0.0787474
+-0.190822 0.0450951 -0.0909107
+-0.177425 0.0611661 -0.0991239
+-0.209154 0.071997 -0.0756773
+-0.16361 0.0781189 -0.106493
+-0.192643 0.0804217 -0.0817311
+-0.188553 0.0983129 -0.0769631
+-0.158207 0.0981986 -0.101697
+-0.14589 0.0877094 -0.119136
+-0.14156 0.107293 -0.111634
+-0.123827 0.117911 -0.119323
+-0.108028 0.110926 -0.135713
+-0.112326 0.0896534 -0.145444
+-0.0919879 0.0895894 -0.157183
+-0.354407 -0.140129 -0.0276509
+0.0608099 -0.102747 0.147637
+0.0795974 -0.0939192 0.130946
+0.106273 -0.0662511 0.133449
+0.114315 -0.0633548 0.0946988
+0.0911756 -0.080818 0.0664564
+0.0945934 -0.0696213 0.0242046
+0.094466 -0.0495519 0.164901
+0.103223 -0.059939 -0.0150141
+0.107659 -0.0557411 0.00875241
+0.112343 -0.0548812 0.0329695
+0.13301 -0.0399767 0.0388538
+0.140194 -0.0391239 0.064311
+0.140474 -0.0411727 0.0934195
+0.15845 -0.0224544 0.11313
+0.0643705 -0.103524 -0.0168157
+0.0586643 -0.110442 0.0129414
+0.0751879 -0.0909703 0.026571
+0.0799955 -0.0839899 -0.0182911
+0.0805977 -0.0822607 0.00527421
+-0.199652 -0.0706452 -0.0659354
+-0.19524 -0.0870565 -0.0610569
+-0.363652 0.00674479 0.087702
+-0.348592 0.00177698 0.0991638
+-0.352099 0.0205518 0.0871438
+-0.333961 0.00443922 0.106489
+-0.315086 0.0187442 0.108631
+-0.00316359 0.0489169 -0.190227
+0.00828848 0.0264747 -0.194092
+-0.00891282 0.00524446 -0.198566
+-0.000837179 -0.0247146 -0.198369
+-0.024708 -0.191035 0.113136
+-0.028144 -0.180474 0.13121
+-0.0241438 -0.162896 0.145613
+-0.0451245 -0.186443 0.130327
+-0.0607705 -0.19034 0.127269
+-0.0688358 -0.203401 0.115117
+-0.062611 -0.17513 0.137084
+-0.0574099 -0.160773 0.145842
+-0.0476802 -0.14828 0.153745
+-0.04727 -0.124358 0.16362
+-0.0742399 -0.116376 0.158165
+-0.103323 -0.097917 0.154292
+-0.022878 -0.122805 0.168832
+0.027446 0.0183553 -0.190554
+0.0472879 0.0249841 -0.18012
+0.047031 0.0480852 -0.168168
+0.0245826 0.0638303 -0.173037
+0.0689779 0.0532592 -0.153469
+0.039009 0.000694828 -0.192586
+0.0399169 -0.0220207 -0.193298
+0.0592175 -0.0308582 -0.186299
+0.0881819 -0.0293513 -0.172655
+0.11654 -0.0237422 -0.15226
+0.0457321 -0.0484051 -0.189
+0.0283473 -0.0619206 -0.192344
+0.00884709 -0.0532585 -0.196777
+-0.0167742 -0.0459663 -0.196316
+0.0146735 -0.0790357 -0.193471
+0.0207706 -0.101966 -0.18762
+0.0449927 -0.105242 -0.174844
+0.0651623 0.0109671 -0.179127
+0.0781854 -0.00786363 -0.178011
+0.081928 0.0167058 -0.168007
+0.0839486 0.0345127 -0.157031
+0.0127453 0.0857324 -0.167693
+0.0293959 0.0958981 -0.153813
+0.030408 0.12443 -0.136266
+-0.00876124 0.0888046 -0.17281
+-0.0206715 0.0751227 -0.181354
+0.0533308 0.133749 -0.12095
+0.0571218 0.158463 -0.105692
+0.0821399 0.175144 -0.0882636
+0.0339587 0.172826 -0.0984761
+0.0250338 0.190467 -0.0767026
+0.0361198 0.205898 -0.0486562
+0.1337 0.159717 -0.0885808
+0.153192 0.173725 -0.0795409
+0.150357 0.191093 -0.0628394
+0.000183964 -0.174592 -0.0415267
+0.00626444 -0.172179 -0.0191669
+0.0228004 -0.155988 -0.0130102
+0.0351251 -0.141473 0.00863422
+0.0360237 -0.140713 -0.0316276
+0.00202874 -0.177272 0.00120065
+0.00544145 -0.176177 0.0227339
+0.017425 -0.164748 0.0398744
+0.0235388 -0.159186 0.0627028
+0.0538022 -0.119801 -0.0390143
+0.0025606 -0.0950454 -0.192557
+-0.0188238 -0.0933552 -0.192037
+-0.0309944 -0.0730462 -0.192797
+-0.0281068 -0.109252 -0.187754
+-0.075043 -0.21301 0.103434
+-0.0894248 -0.215145 0.0987529
+-0.101426 -0.217246 0.0934193
+-0.112609 -0.221304 0.0820512
+-0.102007 -0.206618 0.104586
+-0.333709 0.0734688 -0.0709339
+-0.3055 0.0652843 -0.0701277
+-0.357922 0.075518 -0.0710404
+-0.358936 0.057208 -0.0795117
+0.0591707 0.23129 0.0518182
+0.203248 0.0154733 0.105733
+-0.472546 0.0131591 -0.0288556
+-0.461471 0.0322821 -0.0411949
+-0.451311 0.0441704 -0.0615887
+-0.456508 0.0336736 -0.0849523
+-0.475353 0.013652 -0.0871544
+-0.48302 -0.0285378 -0.0911039
+-0.489181 -0.0301113 -0.0677967
+-0.463262 -0.0404697 -0.0963726
+-0.432771 0.0573181 -0.0604522
+-0.41555 0.0601452 -0.0761121
+-0.397075 0.0676922 -0.0728843
+-0.382154 0.0783063 -0.065485
+-0.366919 0.0871881 -0.0598129
+-0.364506 0.0945902 -0.0426634
+-0.346367 0.102863 -0.0390517
+-0.341911 0.1063 -0.0193301
+-0.352907 0.0953717 -0.00411107
+-0.330555 0.100814 -0.0516651
+-0.31083 0.108258 -0.0479398
+-0.292529 0.0971517 -0.0568892
+-0.376027 0.088421 -0.0301143
+-0.395431 0.078534 -0.0331188
+-0.271862 0.0913249 -0.0598455
+-0.283283 0.0717778 -0.0661175
+-0.422152 0.0632947 -0.0456245
+-0.333323 0.0882853 -0.0627279
+-0.437052 0.0306019 -0.0942911
+-0.420832 0.0396817 -0.0908281
+-0.420208 0.0209628 -0.0962905
+-0.424603 0.00147628 -0.100178
+-0.409238 -0.01306 -0.0971805
+-0.397117 -0.0349289 -0.0925506
+-0.402307 0.0263118 -0.0936004
+-0.387819 0.0136986 -0.0921055
+-0.364576 0.00324772 -0.0872997
+-0.391817 -0.00528513 -0.0934207
+-0.388899 0.0353587 -0.08989
+-0.373861 0.0459462 -0.0841546
+-0.356581 0.0354061 -0.0840319
+-0.335616 0.0239191 -0.079938
+-0.312686 0.0114246 -0.0749035
+-0.283821 0.014154 -0.0699887
+-0.388663 0.0501317 -0.0854246
+-0.400625 0.0570771 -0.0817872
+-0.277312 0.0395577 -0.0695801
+-0.263595 0.0224806 -0.0681152
+-0.411494 0.0521117 -0.0843958
+-0.423315 0.0520061 -0.0810506
+-0.4266 0.0583367 -0.0710367
+-0.420528 0.0643365 -0.0597794
+-0.437215 0.0529979 -0.0705989
+-0.447466 0.0442731 -0.0753282
+-0.459224 0.0370869 -0.071264
+-0.468361 0.0282442 -0.0784113
+-0.478009 0.0179968 -0.0729376
+-0.479951 0.0140616 -0.0538839
+-0.463083 0.0214952 -0.0907124
+-0.463457 0.0029889 -0.101217
+-0.485691 0.00647281 -0.0788714
+-0.490194 0.00123743 -0.0619417
+-0.489027 -0.0161994 -0.0553181
+-0.483623 -0.0188975 -0.0375911
+-0.478319 -0.00529318 -0.0240312
+-0.483932 -0.00270692 -0.0898923
+-0.481107 -0.0153955 -0.0935496
+-0.46911 -0.0252159 -0.0996541
+-0.488301 -0.019441 -0.0836338
+-0.490506 -0.0186274 -0.0716706
+-0.487468 -0.0311436 -0.0799346
+-0.479204 -0.0391906 -0.0852952
+-0.482273 -0.039567 -0.0722516
+-0.473588 -0.0502137 -0.05761
+-0.482362 -0.0375783 -0.0589935
+-0.467989 -0.0491582 -0.038458
+-0.464881 -0.0634395 -0.0695957
+-0.451164 -0.0752001 -0.062683
+-0.461144 -0.0570308 -0.0871617
+-0.47021 -0.0467699 -0.0885606
+-0.454868 -0.06127 -0.0324684
+-0.443099 0.03929 -0.0866065
+-0.473886 -0.0349722 -0.094979
+-0.487452 -0.028162 -0.0529376
+-0.46882 -0.0106219 -0.0998229
+-0.448274 0.0309025 -0.0923286
+-0.443498 0.0213393 -0.0966431
+-0.45456 0.0148388 -0.0976978
+-0.431899 0.0165694 -0.0983475
+-0.474696 0.000410854 -0.0972292
+-0.469485 0.00963021 -0.095246
+0.296955 0.106656 0.0472498
+0.291078 0.0883167 0.0527806
+0.288813 0.0737593 0.0408672
+0.277877 0.0614053 0.0473432
+0.270351 0.0591299 0.0606321
+0.266187 0.0697888 0.0793687
+0.305647 0.105588 0.0299097
+0.312126 0.116415 0.0165124
+0.317369 0.116749 0.00104001
+0.316163 0.104461 -0.011578
+0.318211 0.110014 -0.0273182
+0.313357 0.101027 -0.0413356
+0.318559 0.12438 -0.0374211
+0.311096 0.133216 -0.0514791
+0.303008 0.123002 -0.0663721
+0.313352 0.139423 -0.0292404
+0.305168 0.100598 -0.0568232
+0.300383 0.145261 -0.0600217
+0.280531 0.15626 -0.0639751
+0.291353 0.156796 -0.049708
+0.305426 0.0872955 -0.0378317
+0.311948 0.137809 -0.0138391
+0.307419 0.142673 -0.00177921
+0.295409 0.151976 0.00151047
+0.302664 0.141484 0.0124035
+0.29664 0.139673 0.0272525
+0.303353 0.1511 -0.0276759
+-0.0355418 -0.15595 0.151401
+0.245876 0.184257 -0.021774
+0.231974 0.189434 -0.00989912
+0.214634 0.19537 -0.0149903
+0.197855 0.201136 -0.00456193
+0.150815 0.022535 0.157779
+0.124646 0.0192251 0.170169
+0.0987978 0.00829006 0.179252
+0.0935369 -0.0207146 0.176347
+0.137567 0.00340953 0.158961
+0.135309 -0.0228522 0.146302
+0.124465 -0.0438634 -0.132424
+-0.336318 -0.127906 0.0165096
+-0.332396 -0.00896673 0.107708
+-0.324334 -0.0217195 0.106662
+-0.343027 -0.00837195 0.10223
+-0.349979 -0.0172219 0.0947275
+-0.351563 -0.0075692 0.0970012
+-0.357567 0.000498455 0.0937007
+-0.352358 0.0106962 0.0930097
+-0.365061 -0.00241845 0.0889268
+-0.371378 -0.0116853 0.084559
+-0.381501 -0.0133038 0.0778076
+-0.38504 -0.0253475 0.0687138
+-0.265221 0.135804 -0.0227982
+-0.248347 0.143818 -0.0155162
+-0.229624 0.145057 -0.023862
+0.0837147 0.203074 0.114313
+0.191547 0.000613976 -0.058867
+0.179572 -0.00455891 -0.081695
+-0.0179285 0.191125 0.141825
+0.074671 0.125449 -0.115605
+0.100378 0.123257 -0.105614
+0.109501 0.148191 -0.0967001
+0.0861875 0.104971 -0.118148
+0.120268 0.113011 -0.101312
+0.2304 0.033054 -0.0627787
+-0.0175023 0.205236 0.13064
+-0.0246945 0.215588 0.118203
+-0.0402513 0.210836 0.119478
+-0.0520517 0.199692 0.126629
+-0.0520467 0.215163 0.109544
+-0.0491364 0.223281 0.0948895
+-0.0330574 0.227876 0.0919853
+-0.00155887 0.205641 0.13137
+0.00942581 0.214006 0.121922
+0.0140483 0.203393 0.132712
+0.0230254 0.188966 0.14258
+0.0283783 0.199611 0.13371
+0.0443375 0.205985 0.125045
+0.0645793 0.202014 0.122581
+0.0382707 0.218421 0.110452
+0.0377545 0.189657 0.139859
+0.0495097 0.17628 0.146073
+0.0673532 0.180327 0.139283
+0.0802708 0.165958 0.14453
+0.0765894 0.146779 0.155161
+0.0990867 0.134004 0.155061
+0.0432616 0.161058 0.155485
+0.0556193 0.145405 0.160331
+0.053992 0.124489 0.168818
+0.0245753 0.154745 0.161164
+0.0478735 0.224578 0.0958366
+0.0684131 0.222118 0.0900175
+0.078493 0.225737 0.0698939
+0.100876 0.221763 0.065965
+0.113688 0.212274 0.0826634
+0.104011 0.15383 0.144328
+0.126494 0.214189 0.0668955
+-0.0665517 0.193981 0.124882
+-0.0804722 0.198127 0.113743
+-0.074614 0.181052 0.130455
+0.0202763 0.219591 0.113828
+0.122288 0.201537 0.097016
+0.140391 0.193084 0.0979898
+0.155928 0.19652 0.0827522
+0.103478 0.207222 0.0987704
+0.158633 0.184228 0.0986656
+0.14837 0.206869 0.0681355
+0.143772 0.213494 0.0504607
+0.157944 0.211701 0.0277668
+0.137828 0.216728 0.0322073
+0.119203 0.220974 0.0239402
+0.181201 0.203466 0.0367049
+0.203994 0.196614 0.0269394
+0.108119 0.223088 0.0395942
+0.169816 0.19757 0.0691349
+0.188327 0.189312 0.06867
+0.181082 0.198755 0.0545559
+0.0880282 0.211392 0.101128
+-0.0466273 -0.132423 -0.174157
+-0.0318814 -0.139512 -0.174361
+-0.0157739 -0.129794 -0.182809
+-0.0169605 -0.147684 -0.170043
+-0.0171565 -0.156499 -0.153941
+-0.0342955 -0.157638 -0.143482
+0.00392453 -0.126602 -0.183463
+-0.0425012 -0.142934 -0.1669
+-0.0454602 -0.150295 -0.15321
+-0.0603212 -0.144284 -0.151597
+-0.0561048 -0.208349 0.107134
+-0.0466283 -0.209963 0.094217
+-0.0395136 -0.209195 0.0798734
+-0.0300619 -0.204605 0.0643616
+-0.0542184 -0.215608 0.0800121
+-0.0723947 -0.220944 0.0794647
+-0.0398445 -0.202712 0.106677
+-0.026282 -0.201856 0.0787931
+-0.0191106 -0.195036 0.0906651
+-0.0602593 -0.21837 0.0670154
+-0.0547895 -0.214918 0.0522095
+-0.0431681 -0.209025 0.0404074
+-0.0492054 -0.207652 0.023149
+-0.0688374 -0.205485 0.0059795
+-0.0318623 -0.201338 0.021692
+-0.0250427 -0.195297 0.00476074
+-0.0783989 -0.219366 0.0917231
+-0.036841 -0.195334 0.117821
+-0.0855943 -0.223925 0.0704585
+-0.101036 -0.225034 0.0722946
+0.00797548 -0.111749 -0.188238
+0.198289 0.201344 0.0120569
+0.129707 -0.000104893 -0.143391
+0.122803 0.022642 -0.141595
+0.131204 0.0379353 -0.129884
+0.0652331 -0.0683161 0.174012
+0.169741 0.0223577 0.146053
+0.174405 0.0061381 0.13108
+0.168622 -0.00867675 0.12098
+0.153687 -0.0164829 0.131427
+0.171817 -0.0137639 0.103162
+0.160136 -0.0252577 0.0952122
+0.172869 -0.0168205 0.0851703
+0.185212 -0.00560576 0.0932736
+-0.266685 -0.165547 0.0366709
+0.275879 0.0838846 0.0745082
+-0.0937132 0.19223 0.111342
+-0.106997 0.176659 0.115898
+-0.11095 0.190463 0.10029
+-0.126606 0.187093 0.0915943
+-0.142085 0.184033 0.0817885
+-0.154062 0.170706 0.0875104
+-0.169139 0.15327 0.0921543
+-0.149253 0.156395 0.103116
+-0.186962 0.154848 0.0764578
+-0.122296 0.176425 0.105839
+-0.1187 0.164061 0.117324
+-0.205086 0.146206 0.0712823
+-0.220448 0.149222 0.0532732
+-0.211079 0.163023 0.0370243
+-0.219494 0.161558 0.018494
+-0.237511 0.153161 0.0125252
+-0.249528 0.144798 0.0267993
+-0.246387 0.136378 0.0460156
+-0.264557 0.139198 0.0171736
+-0.247159 0.148788 3.98313e-005
+-0.250069 0.147707 0.0134031
+0.0553132 0.17621 -0.0917443
+0.173324 0.167907 -0.0804984
+0.189782 0.175871 -0.073497
+0.190862 0.188891 -0.0568903
+0.207697 0.172638 -0.0733973
+0.224967 0.17092 -0.0713981
+0.215941 0.158803 -0.0801729
+-0.484824 -0.0268311 -0.0434494
+-0.477138 -0.0315994 -0.0330875
+-0.468515 -0.036879 -0.0234582
+-0.460896 -0.0360471 -0.0108418
+-0.450483 -0.0395823 -0.000216449
+-0.437022 -0.0355125 0.0184559
+-0.00684894 0.10379 -0.163319
+-0.186018 0.123881 0.102748
+0.0137157 -0.136103 -0.175143
+0.0264414 -0.134708 -0.167362
+0.0388561 -0.134535 -0.153306
+0.0395308 -0.121548 -0.167842
+0.0111569 -0.146653 -0.164895
+-0.000750878 -0.15146 -0.163697
+0.0111868 0.056744 -0.182724
+0.233115 0.173929 0.0533539
+-0.141639 -0.218195 0.0382904
+-0.122474 -0.219682 0.0400409
+-0.105452 -0.218012 0.0353912
+0.240064 0.0618588 -0.0784205
+0.230353 0.0462174 -0.0761554
+0.223175 0.063332 -0.085684
+0.218898 0.0326369 -0.0763137
+0.204732 0.0311913 -0.0883317
+0.189904 0.0246699 -0.0976091
+0.183997 0.00806982 -0.0937799
+0.207877 0.0225787 -0.0765582
+0.200938 0.0102395 -0.0682652
+-0.299431 0.0820184 -0.065027
+-0.313951 0.0776969 -0.0671838
+-0.320939 0.064638 -0.0719511
+-0.312324 0.0502342 -0.0734035
+-0.320949 0.0344246 -0.076761
+-0.295312 0.0513818 -0.0707959
+-0.173537 -0.106557 -0.064935
+-0.454017 -0.00539478 0.0124898
+0.211161 0.0175973 -0.0649929
+0.00655894 -0.169937 0.106317
+0.0243113 -0.154347 0.104277
+0.041125 -0.137241 0.106784
+0.0330204 -0.148498 0.0826849
+0.00773306 -0.159576 0.126719
+0.0138807 -0.145963 0.139351
+0.0049516 -0.139462 0.152362
+-0.0126907 -0.13936 0.15942
+0.0184802 -0.126785 0.155856
+0.0241502 -0.111242 0.16547
+0.0286893 -0.13331 0.141105
+0.0429057 -0.130217 0.126263
+0.0491251 -0.118004 0.139231
+0.0120257 0.0695559 -0.176558
+0.0834693 0.217201 -0.0170596
+0.0421476 0.21581 -0.0251167
+0.178941 0.01749 -0.103193
+0.169163 0.0113257 -0.111613
+0.153011 -0.00104932 -0.122574
+0.157342 0.0197994 -0.120215
+0.148636 0.0375252 -0.120607
+0.154906 -0.0180664 -0.109226
+0.162003 -0.0193091 -0.0878111
+0.176321 0.00628563 -0.10222
+0.174375 -0.00362072 -0.0937611
+0.16558 -0.012255 -0.0982933
+0.169898 -0.0118878 -0.0883476
+0.167427 -0.0161977 -0.074634
+0.172483 -0.0136953 -0.0550104
+0.158573 -0.0228562 -0.038755
+0.178268 -0.0090176 -0.06772
+0.143631 -0.0308124 -0.113389
+0.131029 -0.0471009 -0.104742
+0.11914 -0.0584212 -0.0887558
+-0.477443 0.00727968 -0.0926757
+0.200075 0.181902 -0.0654523
+0.205429 0.188398 -0.0529035
+0.220716 0.187539 -0.044447
+0.233543 0.180658 -0.0547301
+-0.0393246 -0.0266683 0.189718
+-0.274121 0.00556367 0.133906
+-0.25281 -0.00309231 0.143108
+-0.226366 0.00430057 0.152124
+-0.204148 0.0203161 0.151609
+-0.180106 0.036869 0.151163
+-0.155849 0.0570393 0.149975
+-0.129284 0.0463575 0.162585
+-0.127312 0.0167731 0.173798
+-0.126864 -0.0148933 0.175188
+-0.0962677 -0.0321701 0.176177
+-0.177678 0.0113344 0.163511
+-0.152021 0.000899388 0.173289
+-0.174367 -0.0169592 0.162846
+-0.24422 -0.0216099 0.139744
+-0.22626 -0.0160268 0.148336
+-0.203186 -0.0300506 0.148803
+0.312169 0.0910623 -0.0119132
+0.304722 0.0829976 -0.0216259
+0.310662 0.0902705 0.000616455
+0.306807 0.0903994 0.0183261
+0.303433 0.081803 0.00726197
+0.296626 0.0724205 0.000646811
+0.294731 0.0699752 -0.0133786
+0.288401 0.0639221 -0.022482
+0.258399 0.0760553 0.093872
+0.245932 0.0798803 0.10576
+0.253728 0.0939036 0.0994145
+0.260498 0.107331 0.0902369
+0.273431 0.103919 0.079149
+0.236537 0.0670613 0.112172
+0.234206 0.0477322 0.10414
+0.233527 0.0825384 0.115799
+0.225279 0.0977603 0.119174
+0.216992 0.0848531 0.127225
+0.199159 0.0862903 0.136279
+0.207765 0.0697112 0.133124
+0.190919 0.105206 0.134975
+0.17057 0.110355 0.141543
+0.156373 0.132508 0.137569
+0.211033 0.0519714 0.128015
+0.22651 0.0551342 0.116173
+0.188768 0.0725313 0.143551
+0.170666 0.0742871 0.151443
+0.161818 0.0927778 0.150652
+0.180456 0.0567016 0.14836
+0.183634 0.0390989 0.143398
+0.198485 0.0390369 0.1327
+0.161023 0.0597683 0.157114
+0.217859 0.111881 0.119231
+0.201322 0.116662 0.125298
+0.23116 0.109891 0.11167
+0.277718 0.11536 0.0697436
+0.286702 0.114003 0.0593743
+0.292923 0.11704 0.0501709
+0.293917 0.127809 0.0408313
+0.299874 0.11642 0.0392668
+0.284942 0.138435 0.0451881
+0.271506 0.139451 0.0590869
+0.262203 0.153376 0.0536744
+0.265562 0.158963 0.041355
+0.275182 0.15707 0.0302267
+-0.0745698 0.208428 0.105718
+-0.285535 0.0857761 -0.0627339
+-0.27473 0.0802749 -0.0641795
+-0.271141 0.0683627 -0.0662598
+-0.258023 0.0567015 -0.0678506
+-0.280992 0.0567367 -0.0686977
+-0.244837 0.0669674 -0.0668579
+-0.237033 0.0513323 -0.0702584
+-0.234541 0.0333375 -0.0709573
+-0.245976 0.0835589 -0.0633754
+-0.254841 0.0992484 -0.0576819
+-0.241877 0.116915 -0.048652
+-0.18667 0.140069 0.0904389
+0.295036 0.0935836 -0.0627684
+-0.00926267 0.0174249 0.196426
+-0.00327775 -0.00841017 0.198497
+0.0150689 0.00949618 0.198029
+0.0405031 0.00510915 0.19529
+0.0594433 0.0118965 0.19127
+-0.481953 -0.0263701 -0.036238
+-0.480202 -0.0205423 -0.0285568
+-0.476382 -0.0147766 -0.0212279
+-0.468767 -0.0190157 -0.00845524
+-0.472476 -0.00650871 -0.014068
+-0.472283 0.00563921 -0.0183851
+-0.462142 0.0149039 -0.0113607
+-0.449381 0.0227484 0.00012384
+-0.457305 0.00865369 0.0030441
+-0.481587 -0.0110502 -0.031619
+-0.482475 0.000430245 -0.0332655
+-0.480347 0.00948865 -0.041986
+-0.472473 0.0222522 -0.0436525
+-0.466776 0.0245091 -0.0320448
+-0.485126 0.00627116 -0.0502161
+-0.0370303 -0.109778 0.171268
+-0.0368659 -0.0892024 0.177455
+-0.0606401 -0.0718449 0.175116
+-0.0188292 -0.0791852 0.184518
+-0.066591 -0.0431507 0.180288
+0.00121365 -0.0861995 0.184132
+0.0158369 -0.0735019 0.187985
+0.000163277 -0.103552 0.176731
+0.0940848 -0.08384 -0.126867
+0.0912612 -0.0790954 0.139096
+0.0975527 -0.0787616 0.119196
+0.0915109 -0.0667976 0.154999
+0.106504 -0.0546283 0.14974
+0.112281 -0.0325408 0.160141
+0.120223 -0.0509425 0.134623
+0.120697 -0.057035 0.114118
+0.130314 -0.0372564 0.138035
+0.118329 -0.0419346 0.148167
+0.078692 -0.0689693 0.164835
+0.0765218 -0.0531401 0.175006
+0.0796376 -0.0342708 0.179856
+0.0640642 -0.0234706 0.18856
+0.0539097 -0.00800927 0.192643
+0.0685062 -0.0790748 0.165097
+0.0660068 -0.0910629 0.155978
+0.0750122 -0.091819 0.144585
+0.053982 -0.0979508 0.159145
+0.038619 -0.102088 0.165471
+0.0480016 -0.109575 0.151663
+0.0334277 -0.0895897 0.176126
+0.0439807 -0.0770085 0.179527
+0.0516381 -0.060695 0.184191
+0.0787845 -0.0183292 0.183534
+0.0876456 -0.00406453 0.181976
+0.0800526 0.0145518 0.185934
+-0.0308081 0.0885405 -0.174657
+0.155665 0.212315 0.00724246
+0.141239 0.21351 -0.00570578
+0.292693 0.1093 0.0546663
+0.29272 0.0988077 0.053019
+0.297462 0.0958888 0.0427528
+0.053781 -0.0859189 -0.176765
+0.0684574 -0.0710688 -0.172827
+0.0839519 -0.0559622 -0.167953
+0.0516696 -0.0668944 -0.183321
+0.0985799 -0.0431579 -0.161885
+0.111766 -0.0468476 -0.147448
+0.109403 -0.0636708 -0.132674
+-0.294316 0.110657 -0.0472239
+-0.283128 0.119926 -0.0388336
+-0.262748 0.12402 -0.0397682
+-0.288362 0.12687 -0.0266383
+-0.302183 0.124187 -0.0189976
+-0.318458 0.117372 -0.0209314
+-0.327255 0.11023 -0.00445948
+-0.316206 0.112645 0.00853129
+-0.298838 0.121181 0.0130465
+-0.314127 0.115203 -0.0350952
+-0.291031 0.128808 0.00166
+-0.277171 0.135902 -0.000114267
+-0.273248 0.136459 -0.0125396
+0.097695 -0.0737844 -0.140551
+0.0827347 -0.0895802 -0.145093
+0.0868385 -0.0748488 -0.155466
+0.0679703 -0.106364 -0.147753
+0.0603532 -0.120556 -0.134077
+0.0588304 -0.104422 -0.163233
+-0.322674 0.00868483 0.110672
+-0.307263 0.00676205 0.118571
+-0.308005 -0.00861718 0.119522
+-0.293581 0.0114665 0.12301
+-0.299329 0.0239726 0.112823
+-0.286154 0.0398423 0.107825
+-0.26321 0.0378974 0.119208
+-0.13457 0.121943 -0.106906
+-0.139297 0.134665 -0.0899912
+-0.160382 0.130812 -0.0746394
+-0.121714 0.150283 -0.0872128
+-0.163756 0.148893 -0.0525948
+-0.109282 0.166513 -0.0740295
+-0.128648 0.16718 -0.0552288
+-0.167255 0.113836 -0.0834247
+-0.394393 -0.0186811 0.0656127
+-0.227174 0.111419 0.0862083
+-0.296227 0.127846 -0.00917536
+-0.293367 0.128193 -0.0184368
+-0.238147 -0.00559741 0.148474
+-0.239063 0.00917146 0.145641
+-0.224146 0.0262704 0.141961
+-0.250836 0.00914945 0.141379
+-0.262479 0.0186069 0.132247
+-0.262323 0.00421726 0.138666
+-0.263219 -0.00847911 0.138113
+-0.256828 -0.0198991 0.136053
+-0.263054 -0.0300816 0.128267
+-0.276828 -0.027548 0.124217
+-0.275008 -0.00693954 0.134137
+-0.281459 -0.0163763 0.128391
+-0.259073 0.112394 -0.0498989
+-0.320782 0.109631 -0.0425131
+-0.330688 0.10691 -0.0433542
+-0.339343 0.102362 -0.0465497
+-0.348883 0.0986778 -0.0481839
+-0.358069 0.093759 -0.051441
+-0.136873 -0.0120468 -0.151363
+-0.141221 -0.0340507 -0.146516
+-0.128382 -0.0309686 -0.160513
+-0.115237 -0.0338872 -0.171647
+-0.10415 -0.0221273 -0.177401
+-0.0925264 -0.00544945 -0.180794
+-0.106711 -0.006873 -0.173788
+-0.119908 0.000277304 -0.164218
+-0.114456 0.0181659 -0.165215
+-0.0825173 0.0101783 -0.18266
+-0.118672 -0.048041 -0.168781
+-0.121553 -0.0618819 -0.163771
+-0.110894 -0.0624358 -0.172199
+-0.39573 0.0793655 -0.0497941
+-0.397364 0.075223 -0.0621397
+-0.389269 0.0806101 -0.0580425
+-0.379676 0.0841545 -0.0574472
+-0.372813 0.0884948 -0.0523992
+-0.373143 0.0902016 -0.0428662
+-0.405287 0.0698332 -0.0665904
+-0.0509752 -0.0107302 -0.193683
+0.0684379 0.0587582 0.184268
+0.0950817 0.0700393 0.176254
+0.111866 0.0484329 0.175538
+0.0135438 0.23103 0.0887354
+-0.148114 -0.221117 0.051071
+-0.159772 -0.21833 0.0562015
+-0.171141 -0.215827 0.049958
+-0.172124 -0.214009 0.0349009
+-0.183868 -0.211625 0.0333021
+-0.48067 0.00147563 -0.0941531
+-0.48325 0.00511008 -0.0871288
+-0.478886 -0.00670064 -0.0953813
+-0.488509 -0.000247977 -0.083197
+-0.490106 0.000173262 -0.0745092
+-0.486384 0.0077296 -0.0687938
+-0.490839 -0.00729847 -0.0675525
+-0.487573 -0.00769379 -0.0851859
+0.305413 0.115443 0.0310865
+0.303067 0.109776 0.0361991
+0.301528 0.100881 0.0364219
+0.304542 0.0950282 0.0278378
+0.308585 0.101812 0.0193478
+0.30202 0.0858542 0.0255498
+0.294651 0.0776239 0.0308248
+-0.13973 -0.120127 -0.0894371
+0.0774121 -0.101688 -0.13441
+0.08428 -0.0964758 -0.11861
+0.0757635 -0.104018 -0.0952178
+0.0953267 -0.0839993 -0.106017
+0.00293945 0.190013 -0.0774414
+-0.0158096 0.195067 -0.0665582
+-0.0158703 0.205666 -0.0441793
+0.0913039 -0.0749531 -0.0365181
+-0.243097 0.150078 0.0206614
+-0.23361 0.154351 0.0222242
+-0.0716637 -0.194344 0.123031
+-0.0862633 -0.191679 0.120669
+-0.079351 -0.199669 0.116734
+0.0905437 -0.0720831 -0.0082291
+-0.442375 -0.0805602 -0.0729391
+-0.434684 -0.074604 -0.0854765
+-0.437054 -0.0869675 -0.0607547
+-0.42771 -0.0945168 -0.0528257
+-0.418352 -0.0983054 -0.0400735
+-0.423279 -0.0966001 -0.0655131
+-0.408659 -0.101487 -0.0697238
+-0.416431 -0.0909254 -0.0763075
+-0.411779 -0.0788541 -0.0841388
+-0.40598 -0.0655492 -0.0884204
+-0.416055 -0.0491274 -0.0936407
+-0.400038 -0.0506823 -0.0905303
+-0.381421 -0.0453955 -0.0869276
+-0.402243 -0.110281 -0.0579508
+-0.390216 -0.11874 -0.0501108
+-0.383494 -0.123101 -0.0364651
+-0.386125 -0.115131 -0.0203428
+-0.369628 -0.130374 -0.0274223
+-0.401456 -0.102315 -0.0198679
+-0.394171 -0.100274 -0.0727645
+-0.374041 -0.0974336 -0.0718592
+-0.385665 -0.0860135 -0.0779307
+-0.359712 -0.131969 -0.0141493
+-0.355735 -0.121067 0.00589521
+-0.407755 -0.107591 -0.0445125
+-0.442105 -0.0634097 -0.0906833
+-0.422825 -0.0823939 -0.081556
+-0.45077 -0.0554598 -0.0929264
+-0.451195 -0.043705 -0.0972223
+-0.437782 -0.0340365 -0.100162
+-0.433036 -0.0155961 -0.100753
+-0.454922 -0.0324231 -0.100841
+-0.458814 -0.0492048 -0.0932669
+-0.44563 -0.00538073 -0.102567
+-0.445825 -0.028368 -0.102242
+0.187567 0.0115241 0.121869
+0.199923 0.0237015 0.120686
+0.209608 0.0257357 0.11161
+0.217483 0.0222293 0.0938709
+0.22097 0.0324773 0.104357
+0.150551 0.0108782 -0.126188
+0.141789 0.000110033 -0.133433
+0.159708 0.00816767 -0.119042
+0.161309 -0.00244862 -0.114514
+0.154667 -0.0107676 -0.117543
+0.147178 -0.0103624 -0.12647
+0.148617 -0.0204088 -0.118466
+0.138524 -0.011451 -0.134851
+0.128907 -0.0262587 -0.139176
+0.125896 -0.0139325 -0.146588
+0.113147 -0.000537483 -0.155555
+0.103133 0.0164001 -0.156394
+0.104298 -0.0149856 -0.16309
+0.12017 -0.0355985 -0.145343
+0.110453 -0.0355441 -0.154722
+-0.0440265 0.0567607 -0.185688
+0.279992 0.165929 -0.0437039
+-0.215359 -0.201377 0.036184
+-0.223693 -0.188967 0.0478234
+-0.22968 -0.165617 0.0632744
+-0.243184 -0.140528 0.0722798
+-0.228035 -0.194952 0.0356759
+-0.238496 -0.19363 0.0236924
+-0.254124 -0.186606 0.0200977
+-0.257716 -0.185407 0.00294716
+-0.272871 -0.179363 -0.00179042
+-0.287583 -0.170182 0.0102401
+-0.244128 -0.182217 -0.00440503
+-0.229531 -0.186515 -5.59474e-005
+-0.220475 -0.194692 0.00897812
+-0.262511 -0.176872 0.0277986
+-0.253263 -0.17311 0.0399939
+-0.242546 -0.168318 0.0523859
+-0.257115 -0.159426 0.0493283
+-0.275877 -0.169308 0.0245016
+-0.245871 -0.15378 0.0613383
+-0.251727 -0.181928 0.0313647
+-0.212684 -0.200277 0.0170569
+-0.203523 -0.203845 0.0214033
+-0.192659 -0.203121 0.0182344
+-0.188052 -0.194159 0.0076752
+-0.212268 -0.20365 0.0267033
+-0.231299 -0.195988 0.0142458
+-0.196414 -0.206554 0.0248662
+-0.19286 -0.209888 0.0326474
+-0.198432 -0.206747 0.0442575
+-0.285561 -0.174648 -0.00239336
+-0.297363 -0.168082 -0.0129349
+-0.315441 -0.160352 -0.0156542
+-0.322426 -0.150566 0.00154516
+-0.27946 -0.176559 0.00652693
+-0.329078 -0.152562 -0.0128228
+-0.341452 -0.147331 -0.0215596
+-0.339347 -0.143911 -0.0378978
+-0.325782 -0.137289 -0.0445101
+-0.316703 -0.146788 -0.0370359
+-0.315576 -0.155996 -0.0279132
+-0.352319 -0.13774 -0.042353
+-0.356277 -0.125511 -0.0545457
+-0.371876 -0.118612 -0.0595906
+-0.362453 -0.135739 -0.0357733
+-0.307601 -0.160835 -0.0228167
+-0.298673 -0.163768 -0.0213152
+-0.283795 -0.159885 -0.0252424
+-0.288901 -0.16657 -0.018883
+-0.271431 -0.163684 -0.0212057
+-0.267306 -0.173463 -0.0127247
+-0.271834 -0.180462 0.00664249
+-0.26405 -0.184059 0.0090717
+-0.256203 -0.187567 0.0114726
+-0.248391 -0.190551 0.0145387
+-0.190153 -0.206614 0.0534964
+-0.442555 0.000265523 0.0267302
+-0.430352 0.014091 0.0310689
+-0.424721 0.0323378 0.0173275
+-0.427036 -0.00112736 0.0417282
+-0.423392 -0.0164383 0.0442389
+-0.416537 0.00176833 0.051877
+0.280404 0.135093 0.054526
+0.278761 0.125803 0.0628293
+-0.3705 -0.131378 -0.0365069
+-0.0820636 -0.222416 0.0826194
+0.0171345 0.16532 -0.108665
+0.00250375 0.146528 -0.128943
+-0.00481984 0.165963 -0.110419
+-0.0228077 0.175077 -0.0985159
+-0.0463747 0.167896 -0.10472
+0.00785902 0.127897 -0.142484
+0.0187708 0.138019 -0.131449
+-0.0288613 0.144009 -0.134253
+-0.0449952 0.153536 -0.122945
+0.290283 0.121714 -0.0740144
+0.27745 0.12898 -0.0769404
+0.276832 0.144257 -0.0755745
+0.263655 0.133985 -0.0803847
+0.243962 0.140125 -0.0819406
+0.251818 0.124002 -0.0820614
+0.279041 0.112623 -0.0763696
+0.271158 0.153665 -0.0709006
+0.257921 0.162187 -0.0701532
+0.269864 0.163795 -0.0626536
+0.248208 0.153711 -0.0775922
+0.259474 0.169139 -0.0606852
+0.254806 0.17483 -0.0498519
+0.263115 0.174352 -0.0393777
+0.242498 0.163999 -0.0735165
+0.286047 0.147304 -0.0690663
+0.290117 0.152194 -0.0598459
+0.294561 0.14326 -0.0673603
+0.30189 0.134539 -0.0645447
+0.307831 0.128351 -0.0595143
+0.309435 0.118425 -0.0601117
+0.300896 0.111367 -0.0646074
+0.313574 0.124342 -0.0532657
+0.318389 0.120863 -0.046066
+0.317393 0.113308 -0.0379339
+0.320268 0.118282 -0.0307619
+0.320218 0.116784 -0.0221264
+0.319481 0.11809 -0.0104565
+0.31556 0.126648 -0.00415804
+0.316602 0.113926 -0.0450935
+0.311777 0.106867 -0.0480733
+0.308275 0.109186 -0.056207
+0.308505 0.0983412 -0.0486102
+0.303144 0.0925952 -0.0531051
+0.309601 0.0934764 -0.0417938
+0.313156 0.0959646 -0.0340974
+0.296983 0.117415 -0.0699211
+0.320685 0.122446 -0.0255896
+0.316942 0.130978 -0.0270583
+0.314854 0.133023 -0.0360942
+0.310847 0.141503 -0.0383109
+0.309318 0.141241 -0.0473689
+0.304008 0.147351 -0.0517981
+0.307045 0.147922 -0.034494
+0.298268 0.153813 -0.0368445
+0.309649 0.146194 -0.0271281
+0.305563 0.148274 -0.019965
+0.297494 0.154475 -0.0200693
+0.292877 0.15678 -0.00921317
+0.286071 0.16011 0.000622243
+0.275595 0.166073 0.0087612
+0.260224 0.174589 0.0077726
+0.250622 0.175429 0.0254095
+0.311613 0.140756 -0.0214101
+0.308518 0.145026 -0.0132653
+0.296427 0.156548 -0.0286188
+0.290888 0.159898 -0.0225221
+0.280072 0.168055 -0.0192366
+0.00514285 -0.0262337 0.19953
+0.000257161 -0.0403876 0.197028
+-0.014043 -0.051569 0.191857
+0.0198521 -0.0289458 0.199008
+-0.449915 0.00669424 0.0132997
+0.189521 0.183354 -0.0659039
+0.181083 0.188202 -0.0613191
+0.166139 0.19374 -0.0550867
+0.180401 0.19548 -0.0478811
+0.173792 0.202184 -0.0307436
+0.014203 -0.120681 -0.18353
+0.0238414 -0.113012 -0.183101
+0.0334543 -0.103091 -0.182186
+0.0330355 -0.116504 -0.176425
+0.0318734 -0.125101 -0.172367
+0.0356839 -0.130691 -0.164289
+0.0436843 -0.125824 -0.158725
+0.0488374 -0.116976 -0.16343
+-0.0735369 0.130882 -0.137882
+-0.0601936 0.143412 -0.130466
+-0.0624708 0.118584 -0.151005
+-0.041212 0.115328 -0.157398
+-0.0420797 0.100294 -0.167006
+0.186298 0.15686 0.109529
+-0.0106882 -0.179034 -0.053539
+-0.0257532 -0.183285 -0.05601
+-0.446546 -0.0201472 0.0199448
+-0.455322 -0.0183989 0.0101318
+-0.462739 -0.00927772 0.00133495
+-0.447924 -0.0304864 0.0103481
+-0.327773 -0.145984 -0.0378562
+-0.481411 0.0150496 -0.0638608
+0.320421 0.119931 -0.0165344
+0.317042 0.125637 -0.0119931
+0.318454 0.112192 -0.0157929
+0.0929399 0.159812 -0.0958943
+0.110625 0.166917 -0.0892709
+0.124473 0.171136 -0.0845853
+0.136186 0.183251 -0.0742106
+0.13866 0.171692 -0.0823798
+0.148566 0.160826 -0.0859647
+0.142872 0.144712 -0.0905597
+0.160795 0.122901 -0.0906349
+0.126088 0.145302 -0.0936953
+0.115879 0.130871 -0.0990572
+0.124327 0.191494 -0.0663769
+0.106391 0.192491 -0.0670656
+0.0883872 0.188262 -0.0745766
+0.0719507 0.196806 -0.0642255
+0.108844 0.201665 -0.051653
+0.0984999 0.177737 -0.0836605
+-0.12026 -0.223902 0.053195
+-0.109446 -0.224931 0.0565831
+-0.111541 -0.221619 0.0451678
+-0.242046 -0.187623 0.0325776
+-0.326234 0.0938195 0.0291499
+-0.0102421 -0.165045 0.13696
+-0.373588 0.0100989 0.0801669
+0.00996937 -0.0129898 0.200095
+-0.463877 -0.0324637 -0.100365
+-0.460224 -0.0241828 -0.10134
+-0.459739 -0.0142811 -0.101377
+0.133208 -0.0412449 -0.119383
+0.123352 -0.0526797 -0.120194
+0.132637 -0.0343741 -0.130094
+-0.164742 -0.122178 -0.0595052
+0.044515 -0.137297 -0.111748
+-0.0612791 -0.162566 -0.109688
+-0.0710129 -0.164834 -0.0958253
+-0.0735533 -0.172186 -0.0768106
+-0.0876452 -0.16161 -0.0867929
+-0.476659 -0.0271538 -0.0964533
+-0.474429 -0.0190092 -0.0973528
+0.0739718 -0.0242315 -0.180703
+0.162304 -0.00560673 0.133058
+-0.479103 -0.0320985 -0.0940027
+-0.481417 -0.0340858 -0.0884057
+-0.486127 -0.0306435 -0.0860583
+-0.486018 -0.0242883 -0.0872577
+-0.482104 -0.0219439 -0.0922364
+-0.483886 -0.0355832 -0.0827419
+-0.480962 -0.0402868 -0.0788522
+-0.488368 -0.0267363 -0.0830009
+-0.489744 -0.0252165 -0.0755797
+-0.49086 -0.0244246 -0.0695498
+-0.489653 -0.0247292 -0.0607899
+-0.490316 -0.0194905 -0.0649848
+-0.490364 -0.0284268 -0.0721027
+-0.486281 -0.0339622 -0.0727452
+-0.484931 -0.0357981 -0.0657032
+-0.480417 -0.0422452 -0.0650589
+-0.486623 -0.0314942 -0.0598312
+-0.47196 -0.030399 -0.0984255
+-0.0669025 0.00647931 0.189048
+-0.00259196 0.0546073 0.192242
+-0.0285477 0.0708007 0.184734
+-0.0057345 0.0374844 0.19471
+-0.0268013 0.159534 0.157979
+-0.0096283 0.148792 0.164972
+-0.0781263 -0.119784 -0.166335
+-0.0693606 -0.129505 -0.164109
+-0.0688752 -0.121624 -0.171204
+-0.301484 0.103619 -0.053148
+-0.293096 0.10467 -0.0530655
+-0.281535 0.101848 -0.0551465
+-0.285102 0.10937 -0.0500982
+-0.270178 0.101819 -0.0557902
+0.146413 0.215601 0.0217432
+-0.0558768 -0.200581 -0.0058347
+-0.121903 -0.222398 0.0753827
+-0.131484 -0.222972 0.0672943
+-0.366143 0.0142557 0.0832656
+-0.0113622 -0.139899 -0.177586
+-0.461084 -0.0182082 0.00293327
+-0.464563 -0.0224324 -0.00273456
+-0.465956 -0.0279422 -0.0104269
+-0.0796578 0.1856 -0.0608717
+-0.408982 -0.00209341 0.057713
+-0.402494 -0.00941199 0.0623365
+-0.403353 -0.0196112 0.058583
+-0.405762 -0.0286267 0.0515338
+-0.405618 -0.0398167 0.0440031
+-0.404736 -0.0529218 0.0334363
+-0.409831 -0.0636201 0.0189125
+-0.402566 -0.0785474 0.0097687
+-0.384311 -0.0886192 0.0159024
+-0.399923 0.000206371 0.0648148
+-0.395259 0.0101254 0.0639619
+-0.399409 0.0198184 0.0541902
+-0.401015 0.0317499 0.0417548
+-0.386013 0.0426196 0.0409759
+-0.390555 0.0202045 0.0613875
+-0.376091 0.028226 0.0648869
+-0.359969 0.0354058 0.0689777
+-0.390478 0.00307787 0.0712524
+-0.414992 0.0273589 0.0326168
+-0.0822249 -0.219415 0.0436093
+0.320548 0.121146 -0.0209076
+-0.0307118 0.209112 0.125044
+0.244694 0.0716962 -0.0789439
+-0.322786 -0.150478 -0.0340602
+-0.142918 -0.221898 0.0595833
+-0.141055 -0.219727 0.0695305
+-0.148384 -0.213823 0.0747687
+-0.140352 -0.208727 0.0848566
+-0.159369 -0.210758 0.0714338
+-0.12697 -0.210548 0.09034
+-0.123362 -0.217457 0.0840045
+0.291319 0.148647 -0.0653
+0.285923 0.152334 -0.064874
+0.280206 0.15113 -0.0687143
+-0.011495 -0.128161 0.165796
+-0.0104489 -0.114268 0.172787
+-0.456328 0.00238289 0.00911999
+-0.462716 0.00053365 0.00188537
+-0.452719 0.000801432 0.0144475
+-0.447711 -0.00566448 0.020379
+-0.447072 0.00296473 0.0202268
+-0.439977 0.00940057 0.0233511
+-0.441315 -0.0101266 0.0273906
+-0.434861 -0.0036457 0.0339979
+-0.435623 0.00541616 0.0309225
+-0.397014 -0.107359 -0.0661138
+-0.394501 -0.112676 -0.0601278
+-0.39739 -0.114494 -0.052232
+-0.386945 -0.116865 -0.0581355
+-0.379673 -0.123432 -0.0518067
+-0.379349 -0.114175 -0.0625035
+-0.368845 -0.10815 -0.0658517
+-0.359899 -0.0973536 -0.069139
+-0.379424 -0.105627 -0.0684125
+-0.345533 -0.0999729 -0.0649614
+-0.340448 -0.115776 -0.057915
+-0.348994 -0.0845838 -0.0704153
+-0.332742 -0.0656731 -0.0705226
+-0.350994 -0.0664547 -0.0754087
+-0.341818 -0.0470471 -0.0761957
+-0.351962 -0.0231594 -0.0823818
+-0.39552 -0.115847 -0.0438253
+-0.370874 -0.124971 -0.0532356
+-0.363364 -0.129762 -0.049668
+-0.33009 -0.123253 -0.052732
+-0.316778 -0.125001 -0.0493635
+-0.302639 -0.123107 -0.0473696
+-0.287039 -0.124882 -0.0436812
+-0.273759 -0.109 -0.046197
+-0.270469 -0.126021 -0.0397525
+-0.254738 -0.113942 -0.0416881
+-0.278345 -0.0886894 -0.0527072
+-0.266377 -0.0678443 -0.0560345
+-0.281535 -0.0441861 -0.0626876
+-0.300226 -0.0912717 -0.0564075
+-0.312467 -0.0733818 -0.0634877
+-0.263538 -0.0493458 -0.0593802
+-0.384834 -0.123009 -0.0449511
+-0.378696 -0.127011 -0.0416145
+-0.37682 -0.126976 -0.0335983
+-0.38166 -0.12148 -0.0267217
+-0.45038 -0.0749298 -0.0724473
+-0.45796 -0.0684169 -0.0757915
+-0.463668 -0.0613132 -0.0789114
+-0.470167 -0.0560323 -0.0735728
+-0.456908 -0.0647581 -0.0842542
+-0.468123 -0.0541536 -0.0821805
+-0.355365 0.0854034 -0.0639831
+-0.345495 0.0784018 -0.0686681
+-0.345566 0.0642705 -0.0754244
+-0.345752 0.0869151 -0.0639626
+-0.340409 0.0921156 -0.0595821
+-0.320658 -0.156155 -0.00735903
+0.0310287 -0.0498547 0.193641
+0.0198894 -0.141937 -0.165459
+-0.228047 -0.00611597 0.151539
+-0.21379 -0.0101939 0.154678
+-0.21124 0.00524665 0.156381
+-0.196797 0.0093087 0.159224
+-0.188163 0.0229398 0.155281
+-0.186748 -0.000713447 0.1644
+-0.171469 -0.00241387 0.168893
+-0.15893 -0.0134394 0.168193
+-0.219561 -0.00229464 0.154558
+-0.211896 -0.00271869 0.156825
+0.241886 0.140309 0.0860302
+-0.254378 -0.180608 -0.00572631
+-0.0256362 -0.192795 -0.0108483
+-0.0213145 -0.188013 -0.0254959
+-0.00679366 -0.180573 -0.0278423
+0.265879 0.0793336 0.0857758
+-0.178895 -0.21406 0.0388483
+-0.1723 -0.215898 0.0423547
+-0.244753 0.00128651 0.146437
+-0.237347 0.0022348 0.148985
+0.25157 0.0457267 -0.0527654
+-0.475261 -0.00121759 -0.0185581
+-0.477838 0.00416433 -0.0259061
+-0.490474 0.00258014 -0.0683864
+0.196069 0.0347717 -0.0957831
+0.201615 0.0491382 -0.0939952
+0.18803 0.0621831 -0.0972113
+0.167364 0.0756427 -0.0996243
+0.172397 0.0998559 -0.0921219
+0.187663 0.033633 -0.100368
+0.174757 0.0400994 -0.106834
+0.197053 0.0262793 -0.0913859
+0.202678 0.0226549 -0.0845706
+0.210031 0.0556486 -0.0907929
+0.192507 0.0527045 -0.097814
+0.180216 0.0529828 -0.102021
+0.175563 0.0652764 -0.100425
+0.162926 0.0640423 -0.104369
+0.142127 0.0624953 -0.113056
+0.151939 0.0756284 -0.103791
+0.132789 0.0797865 -0.10854
+-0.348441 -0.142527 -0.0348869
+-0.342301 -0.14637 -0.0301304
+0.148711 0.183289 -0.0726251
+0.161656 0.181236 -0.0729202
+0.163216 0.188442 -0.064501
+-0.238556 -0.0310506 -0.0635487
+-0.00291307 0.0352651 -0.19427
+0.0108075 0.0413253 -0.188804
+-0.00553357 0.0203276 -0.197456
+-0.0214647 0.0159016 -0.196991
+0.0071277 0.0113207 -0.197326
+0.0294013 -0.148697 -0.119916
+0.0138806 -0.159193 -0.109312
+0.0172829 -0.159017 -0.0887735
+0.0277653 -0.147799 -0.13545
+0.00273327 -0.1618 -0.121337
+-0.011111 -0.168484 -0.106465
+-0.0235051 -0.167364 -0.116293
+0.0242164 -0.154659 -0.0691485
+-0.0143519 -0.172252 -0.092658
+-0.010652 0.0604636 -0.187016
+0.100536 0.224554 0.0517985
+0.114136 0.219745 0.0578874
+0.091313 0.225287 0.0595263
+0.0797026 0.227767 0.0581816
+0.0723327 0.229027 0.0453777
+0.0829269 0.227441 0.030913
+0.0668447 0.229241 0.0632039
+0.114338 0.216906 0.0705535
+0.103966 0.217771 0.0772861
+0.27314 0.0904289 -0.0742729
+0.27865 0.100969 -0.0740164
+-0.0318201 -0.172097 0.140491
+-0.150995 0.191569 0.0449039
+-0.162861 0.18261 0.0597716
+-0.181673 0.17237 0.0564074
+-0.190646 0.173251 0.0363386
+-0.133419 0.199622 0.048713
+0.30869 0.146192 -0.039147
+0.310112 0.144647 -0.0351315
+0.312128 0.140484 -0.0337784
+0.312846 0.137243 -0.0372711
+0.313626 0.133 -0.043947
+0.311506 0.138025 -0.0426565
+0.314828 0.128729 -0.0486676
+-0.39891 0.0356498 -0.091534
+-0.410483 0.0346101 -0.0927351
+-0.394039 0.04254 -0.0886511
+-0.0878188 0.211246 0.0894536
+-0.102222 0.20704 0.0831881
+-0.105324 0.210562 0.066741
+-0.119615 0.203259 0.0673147
+-0.0114042 -0.153427 -0.162654
+-0.0216924 -0.152759 -0.162414
+-0.0276497 -0.155233 -0.154041
+-0.0229191 -0.159385 -0.144364
+-0.028222 -0.162884 -0.130294
+-0.00911545 -0.159755 -0.143127
+0.00381773 -0.158174 -0.138235
+0.0158629 -0.151971 -0.145374
+-0.043042 -0.159811 -0.131283
+-0.0578498 -0.157583 -0.12483
+-0.0730611 -0.153821 -0.118257
+-0.0918654 -0.142271 -0.119321
+-0.0865458 0.151799 -0.110721
+-0.0747559 0.164903 -0.0996003
+-0.0877131 0.169611 -0.0847258
+-0.104298 0.14448 -0.108615
+-0.111502 0.130777 -0.117599
+-0.290598 0.122665 -0.0344017
+-0.283048 0.125286 -0.0326538
+-0.2771 0.131561 -0.0234897
+-0.273262 0.124078 -0.0371466
+-0.27542 0.117855 -0.0440148
+-0.186493 0.17034 -0.00116882
+-0.17177 0.166823 -0.0203714
+-0.180684 0.153502 -0.0354437
+-0.205992 0.162616 -0.00205048
+-0.198324 0.14709 -0.0338166
+-0.00592029 0.100685 0.181441
+-0.0167332 0.118964 0.174829
+0.0159467 0.103079 0.18061
+0.0284124 0.0849417 0.184432
+-0.442518 -0.0709443 -0.0863691
+-0.448856 -0.0662201 -0.0874812
+-0.134667 0.000943154 0.177011
+-0.00310122 0.234913 0.0628362
+-0.46231 -0.0586249 -0.0404296
+0.227538 0.0369226 -0.0721269
+0.236821 0.0423656 -0.0668035
+0.240605 0.0371232 -0.0549899
+0.229841 0.0265624 -0.0470128
+-0.463607 0.0286461 -0.0857262
+-0.456726 0.027279 -0.0906909
+-0.469667 0.0222263 -0.0848045
+-0.450827 0.0237483 -0.0946958
+0.216321 0.138978 0.105626
+0.21636 0.176018 -0.068996
+0.224724 0.177449 -0.0640927
+0.23515 0.172803 -0.0661681
+0.260778 0.097572 0.0930733
+0.253697 0.103791 0.0969488
+0.000426256 0.00615835 0.198705
+-0.0143538 0.00308408 0.196759
+-0.0259448 0.0152079 0.193781
+0.00496704 0.0199039 0.19777
+-0.0130132 0.231981 0.0855148
+-0.000488198 0.230115 0.092734
+-0.486599 0.00442738 -0.0834039
+-0.483174 0.00834215 -0.0830378
+-0.481531 0.012535 -0.0769011
+-0.479231 0.00931576 -0.0872037
+-0.479136 0.0130796 -0.0824478
+-0.474567 0.0182278 -0.0820571
+-0.488599 0.00268956 -0.0794002
+-0.489312 -0.00209098 -0.0787543
+-0.487879 0.00455228 -0.0748952
+-0.484573 0.00890921 -0.0740255
+-0.481621 0.0133511 -0.0706356
+-0.486157 0.0013552 -0.0870001
+0.074114 -0.0959285 -0.152444
+0.0788079 -0.0848095 -0.156079
+0.0776661 -0.0751258 -0.164638
+0.307857 0.12345 -0.0629205
+0.305632 0.118432 -0.0643039
+0.306506 0.11278 -0.0612846
+0.303699 0.106552 -0.0605951
+0.296786 0.103863 -0.0648658
+0.290509 0.0987054 -0.0684109
+0.30475 0.128034 -0.0643101
+0.297851 0.128749 -0.0681357
+-0.339388 0.107776 -0.0308211
+-0.331422 0.111016 -0.0225385
+0.1951 0.198278 0.038898
+0.20821 0.19181 0.0401465
+0.215469 0.182876 0.0549909
+0.218888 0.190238 0.0280165
+0.230673 0.188298 0.0132706
+-0.467314 -0.059895 -0.0588218
+-0.459485 -0.0677804 -0.0607044
+0.307129 0.146219 -0.0474896
+-0.422251 0.0576286 -0.0767091
+-0.42861 0.0541642 -0.076605
+3  671 417 1634
+3  944 65 945
+3  835 2025 874
+3  369 997 1009
+3  1597 927 1598
+3  1357 128 1355
+3  294 1255 299
+3  294 299 266
+3  146 1162 1482
+3  611 612 32
+3  313 20 312
+3  67 1314 1022
+3  1147 1148 561
+3  1122 483 119
+3  1715 1714 1718
+3  1718 832 1715
+3  1648 1117 782
+3  991 992 367
+3  546 547 554
+3  31 619 576
+3  650 985 359
+3  359 980 650
+3  969 367 992
+3  673 1700 674
+3  181 673 674
+3  660 59 307
+3  854 855 912
+3  1630 1498 589
+3  246 88 1571
+3  349 1137 1138
+3  1136 1137 349
+3  1426 917 576
+3  37 154 151
+3  643 642 72
+3  1285 530 1783
+3  12 494 495
+3  496 12 495
+3  426 202 427
+3  380 1021 1020
+3  192 846 345
+3  1526 118 1411
+3  1811 79 1810
+3  1540 1811 1810
+3  427 202 430
+3  827 337 1275
+3  1685 84 1518
+3  132 759 544
+3  444 1547 1545
+3  1762 1758 687
+3  416 373 7
+3  1326 844 665
+3  1326 665 1953
+3  378 70 376
+3  1325 1339 142
+3  469 187 468
+3  332 681 537
+3  1231 389 1232
+3  240 1651 241
+3  44 456 1463
+3  1356 1358 265
+3  2003 1412 889
+3  625 637 628
+3  184 1900 1896
+3  501 1860 1410
+3  1362 1336 666
+3  1086 1089 1256
+3  1086 1256 1084
+3  1824 1821 495
+3  1406 651 382
+3  405 81 406
+3  1412 1413 1177
+3  369 376 70
+3  239 241 153
+3  601 800 602
+3  1638 800 601
+3  336 827 108
+3  273 110 1947
+3  1188 1189 203
+3  205 1189 1188
+3  871 867 870
+3  1028 380 1020
+3  1017 1028 1020
+3  151 973 976
+3  35 589 1624
+3  1624 589 585
+3  478 187 904
+3  462 187 478
+3  170 1678 794
+3  794 1099 170
+3  958 690 537
+3  788 789 151
+3  806 182 802
+3  1022 1023 1021
+3  802 524 806
+3  558 426 50
+3  1976 1978 879
+3  882 1978 1976
+3  161 751 752
+3  1726 570 1725
+3  1458 460 186
+3  1458 186 1460
+3  1852 1844 207
+3  1852 207 1845
+3  1467 1469 490
+3  1720 1719 896
+3  668 57 667
+3  1870 1871 169
+3  1022 1314 1738
+3  98 1964 1963
+3  780 160 778
+3  57 1096 667
+3  1094 1096 57
+3  377 378 376
+3  1321 158 774
+3  282 64 703
+3  703 64 742
+3  854 1930 858
+3  1767 536 1060
+3  181 676 1656
+3  354 856 857
+3  1015 1008 1018
+3  632 637 1770
+3  1770 42 632
+3  15 1674 1672
+3  1011 1013 422
+3  572 94 668
+3  824 550 34
+3  1244 1012 358
+3  289 51 273
+3  1253 1250 56
+3  297 1250 1253
+3  1636 1178 1101
+3  1102 1178 1636
+3  1097 1098 1093
+3  404 233 178
+3  1139 63 1137
+3  766 53 767
+3  385 1964 1729
+3  479 1522 480
+3  117 479 480
+3  527 1301 1302
+3  527 1302 1303
+3  962 744 688
+3  688 744 1688
+3  611 32 613
+3  737 27 740
+3  740 27 1435
+3  357 1080 1078
+3  1502 406 81
+3  82 327 692
+3  570 1988 1258
+3  570 1258 1727
+3  853 338 873
+3  928 1614 1927
+3  1927 1926 928
+3  121 489 543
+3  386 1220 1226
+3  505 487 504
+3  1218 115 1222
+3  983 1244 358
+3  492 1244 983
+3  49 505 408
+3  879 880 337
+3  181 674 675
+3  1283 530 1285
+3  1847 1186 1846
+3  1292 725 1293
+3  1290 725 1292
+3  147 155 37
+3  158 776 773
+3  1669 1668 150
+3  1086 309 1919
+3  410 1195 1198
+3  161 162 252
+3  981 1769 980
+3  1946 1947 229
+3  214 623 1863
+3  1863 623 1974
+3  1288 726 1293
+3  1288 1293 725
+3  250 312 546
+3  1016 1017 379
+3  619 1204 1203
+3  1217 1224 1218
+3  650 980 360
+3  105 340 1761
+3  307 662 659
+3  659 662 658
+3  1452 490 1471
+3  408 406 1502
+3  1494 0 1492
+3  966 1956 1955
+3  1955 1956 1954
+3  55 245 267
+3  554 26 546
+3  1676 1677 1680
+3  446 1817 77
+3  660 307 659
+3  2007 1595 1593
+3  1209 114 1208
+3  1208 114 1214
+3  365 364 91
+3  1629 588 1630
+3  89 377 376
+3  482 22 486
+3  137 970 646
+3  26 250 546
+3  1340 2004 2005
+3  164 276 277
+3  693 323 956
+3  108 1269 1270
+3  1676 150 1677
+3  1427 286 177
+3  139 138 120
+3  1352 129 1353
+3  64 282 285
+3  343 1333 1332
+3  595 1581 1587
+3  769 768 53
+3  1499 1503 498
+3  71 434 435
+3  822 348 837
+3  823 348 822
+3  637 632 600
+3  637 600 628
+3  486 439 183
+3  1674 798 1672
+3  1624 585 1625
+3  636 597 634
+3  1392 235 1394
+3  171 1391 238
+3  1988 419 1987
+3  1687 1916 754
+3  1687 754 515
+3  372 1965 1963
+3  1054 1053 130
+3  486 22 439
+3  451 80 414
+3  414 11 451
+3  278 277 276
+3  1030 380 1028
+3  332 684 465
+3  1582 580 1498
+3  881 337 1662
+3  1728 208 558
+3  385 1728 558
+3  1897 184 1896
+3  1384 1383 1382
+3  977 15 167
+3  25 430 432
+3  432 430 202
+3  2004 1342 1344
+3  1897 220 1902
+3  224 556 1032
+3  517 1144 1143
+3  1375 324 1374
+3  1330 191 1362
+3  1343 1342 1428
+3  1343 1428 100
+3  737 740 741
+3  1975 1974 623
+3  638 1578 598
+3  1672 594 1673
+3  1673 15 1672
+3  937 938 939
+3  939 609 937
+3  967 966 315
+3  58 966 967
+3  1503 1500 84
+3  1503 84 1685
+3  507 1740 1778
+3  907 1722 898
+3  327 696 695
+3  71 420 434
+3  1330 1362 1363
+3  796 797 170
+3  1098 315 1096
+3  1097 315 1098
+3  821 849 1139
+3  1139 849 1249
+3  869 868 563
+3  1105 5 636
+3  1104 5 1105
+3  1394 234 1393
+3  386 1219 1220
+3  1207 1208 397
+3  397 1208 1212
+3  674 21 675
+3  1620 941 1628
+3  1228 1227 402
+3  114 1215 1214
+3  1214 1215 1216
+3  1034 814 216
+3  1650 88 1649
+3  1211 1234 127
+3  765 133 1150
+3  765 1150 1782
+3  364 1002 91
+3  313 656 655
+3  313 655 653
+3  984 359 985
+3  1454 458 44
+3  1154 1153 2
+3  1155 1153 1154
+3  1525 1526 497
+3  497 1526 1527
+3  808 807 524
+3  998 8 1001
+3  730 195 557
+3  1028 1017 68
+3  409 81 405
+3  845 36 1733
+3  1134 36 845
+3  1559 1558 685
+3  204 570 1726
+3  505 121 413
+3  1894 750 766
+3  1453 1454 44
+3  377 403 378
+3  1654 403 377
+3  1296 1301 527
+3  1067 1301 1296
+3  321 25 322
+3  468 463 83
+3  83 463 1754
+3  174 1156 1120
+3  1934 125 656
+3  129 1354 1353
+3  1543 78 1544
+3  226 1947 1946
+3  1372 1373 696
+3  231 1941 1942
+3  450 1529 1528
+3  1528 1508 450
+3  1404 91 1403
+3  1408 85 1409
+3  1409 85 1553
+3  744 961 1742
+3  556 223 555
+3  973 974 976
+3  173 257 749
+3  331 1345 748
+3  129 715 1359
+3  1088 425 1079
+3  740 1435 1441
+3  1006 368 1007
+3  69 1906 1010
+3  1038 1743 1034
+3  1014 993 382
+3  109 1039 1033
+3  1188 203 430
+3  625 1974 1973
+3  1332 841 842
+3  842 343 1332
+3  505 413 122
+3  1012 1011 358
+3  435 76 436
+3  1949 1950 260
+3  1918 311 1917
+3  1918 1917 306
+3  1962 266 299
+3  1086 1919 304
+3  110 228 229
+3  682 681 185
+3  1457 1828 459
+3  459 1828 1458
+3  1966 372 373
+3  1334 191 1333
+3  1692 883 1475
+3  75 1563 1058
+3  1221 383 1220
+3  994 366 991
+3  999 364 365
+3  1031 1005 367
+3  1031 367 969
+3  1404 1403 374
+3  426 208 424
+3  270 227 269
+3  1258 1987 1986
+3  1693 953 1695
+3  934 1498 588
+3  1807 1805 1806
+3  195 120 138
+3  1180 591 1179
+3  644 643 646
+3  64 743 742
+3  742 743 438
+3  303 1436 1094
+3  4 713 711
+3  291 713 710
+3  409 405 82
+3  1154 526 1155
+3  693 327 695
+3  93 1367 1365
+3  1441 1435 730
+3  413 543 3
+3  1965 98 1963
+3  325 697 407
+3  1348 320 1349
+3  1936 1937 1035
+3  1036 1937 1936
+3  517 1143 523
+3  1812 1536 453
+3  1003 363 1000
+3  721 720 240
+3  240 720 719
+3  390 1654 16
+3  781 780 159
+3  52 672 680
+3  611 610 612
+3  828 336 834
+3  2018 381 2019
+3  1002 1001 363
+3  1000 8 995
+3  1774 1776 669
+3  371 363 98
+3  1826 79 1562
+3  1562 79 1542
+3  357 1078 1012
+3  174 791 790
+3  1863 625 628
+3  63 866 1138
+3  354 857 1452
+3  1495 1496 775
+3  1538 452 1771
+3  421 275 234
+3  19 1082 1083
+3  313 312 661
+3  222 814 1034
+3  970 1171 1173
+3  1899 1942 111
+3  757 759 132
+3  407 122 410
+3  1816 1817 1815
+3  566 179 565
+3  1128 1142 1132
+3  718 264 1952
+3  1240 393 127
+3  270 228 271
+3  1430 100 1429
+3  228 1730 1731
+3  1272 1264 1265
+3  110 273 272
+3  699 698 43
+3  283 698 699
+3  779 162 161
+3  24 545 438
+3  627 213 617
+3  617 213 935
+3  1208 1214 1212
+3  1212 1214 398
+3  1221 1220 16
+3  899 897 1971
+3  1219 16 1220
+3  1548 1854 1507
+3  398 1216 1218
+3  653 652 20
+3  86 1567 1568
+3  570 204 569
+3  117 442 443
+3  414 415 81
+3  1216 1217 1218
+3  788 151 154
+3  1904 257 791
+3  1166 145 1160
+3  1167 145 1166
+3  274 227 271
+3  368 1018 1913
+3  543 542 544
+3  847 345 846
+3  551 212 550
+3  421 227 275
+3  370 1027 1910
+3  494 493 704
+3  562 284 232
+3  20 652 548
+3  999 998 364
+3  431 1088 1087
+3  867 866 63
+3  255 171 256
+3  989 994 990
+3  571 251 163
+3  1273 888 1865
+3  1865 888 1864
+3  1904 791 174
+3  715 717 716
+3  307 59 302
+3  467 1451 1450
+3  124 250 262
+3  796 795 248
+3  1356 59 1358
+3  1615 2024 1614
+3  1291 950 729
+3  729 1290 1291
+3  1747 260 1950
+3  362 1003 1000
+3  366 995 996
+3  565 179 420
+3  565 420 51
+3  1317 915 1316
+3  1017 1016 1019
+3  1017 1019 68
+3  482 479 22
+3  755 133 942
+3  1150 133 755
+3  1945 225 1944
+3  1012 201 1011
+3  1067 1309 1308
+3  950 1298 729
+3  729 1298 1297
+3  1093 1098 1436
+3  1436 1098 1094
+3  1294 952 1295
+3  1102 1636 1637
+3  89 383 1221
+3  91 1966 373
+3  741 739 738
+3  737 741 738
+3  292 715 712
+3  1767 1060 488
+3  644 646 30
+3  16 1219 1232
+3  360 986 987
+3  1431 1430 1429
+3  195 27 196
+3  557 645 136
+3  557 138 645
+3  1170 1165 1169
+3  1393 276 164
+3  636 634 168
+3  509 815 1440
+3  789 1570 87
+3  547 212 554
+3  562 277 10
+3  676 1903 184
+3  1297 1067 1296
+3  546 312 20
+3  1100 1671 799
+3  799 1671 1670
+3  1033 1034 1743
+3  1343 218 1342
+3  1342 218 1344
+3  510 1043 1042
+3  250 1434 262
+3  1854 1506 1507
+3  95 1263 1106
+3  1106 1263 887
+3  402 90 947
+3  249 1432 1433
+3  1225 1224 386
+3  944 585 943
+3  1743 1038 215
+3  1741 1773 1772
+3  1741 1772 484
+3  120 1176 1175
+3  120 1175 143
+3  1358 660 261
+3  1884 1539 1535
+3  1535 1539 453
+3  1051 536 1052
+3  147 37 148
+3  637 625 1125
+3  1125 625 1126
+3  638 633 597
+3  620 214 627
+3  44 458 456
+3  1867 1130 1872
+3  1568 259 1949
+3  717 243 716
+3  61 1113 1256
+3  60 1092 1091
+3  1961 1092 60
+3  245 716 243
+3  1539 1542 1811
+3  1811 1542 79
+3  177 286 285
+3  1880 1882 1870
+3  1236 1235 1316
+3  718 243 717
+3  370 1907 1905
+3  1871 168 634
+3  1084 1256 310
+3  1937 1938 109
+3  421 163 269
+3  64 437 743
+3  386 1224 1217
+3  752 751 172
+3  227 270 271
+3  269 163 268
+3  1 252 251
+3  162 251 252
+3  1948 128 1949
+3  842 192 345
+3  345 342 842
+3  1868 1129 1867
+3  626 1129 1868
+3  168 1871 1673
+3  154 37 770
+3  1142 978 624
+3  1128 978 1142
+3  120 143 139
+3  1321 774 1323
+3  478 1446 462
+3  1892 1894 751
+3  862 858 1929
+3  245 40 244
+3  270 1730 228
+3  180 289 1701
+3  129 1352 717
+3  673 181 680
+3  598 1578 1576
+3  1798 1541 1797
+3  1798 1797 1796
+3  160 812 813
+3  1700 180 1701
+3  356 1935 311
+3  441 442 48
+3  48 444 441
+3  1729 1003 209
+3  2001 1994 884
+3  652 314 649
+3  957 691 955
+3  836 348 869
+3  702 283 700
+3  1521 1522 118
+3  1959 301 1958
+3  54 705 1252
+3  489 541 542
+3  220 1895 1697
+3  10 282 284
+3  1091 1090 304
+3  1950 128 1357
+3  1820 198 1819
+3  1551 476 1552
+3  607 608 1024
+3  172 771 772
+3  332 537 690
+3  553 1157 606
+3  464 185 465
+3  260 262 86
+3  1716 907 886
+3  1722 907 1716
+3  1013 424 422
+3  187 462 463
+3  1517 1501 1502
+3  1476 1470 1473
+3  1689 417 1260
+3  343 842 342
+3  1834 903 902
+3  1931 563 868
+3  816 1058 815
+3  816 815 509
+3  161 1893 751
+3  1441 728 741
+3  741 728 739
+3  817 818 75
+3  1043 131 1048
+3  907 1106 886
+3  489 542 543
+3  557 731 730
+3  1309 1841 532
+3  235 251 571
+3  426 424 425
+3  204 428 429
+3  151 789 792
+3  11 954 451
+3  461 954 11
+3  39 172 772
+3  772 773 776
+3  162 254 251
+3  254 163 251
+3  1478 1229 400
+3  1633 1281 531
+3  854 912 852
+3  1898 1895 111
+3  548 547 20
+3  407 33 406
+3  1809 1825 1457
+3  1457 1825 1826
+3  239 153 258
+3  601 9 604
+3  1278 530 1279
+3  1286 144 1431
+3  1119 1118 230
+3  1116 218 219
+3  219 218 1343
+3  375 1291 952
+3  837 348 836
+3  1925 1924 1612
+3  238 244 40
+3  331 961 745
+3  173 256 257
+3  541 1439 542
+3  783 156 785
+3  390 126 391
+3  202 431 432
+3  1385 236 1386
+3  1465 461 460
+3  768 156 767
+3  1172 138 139
+3  770 768 154
+3  44 1451 1453
+3  714 4 294
+3  293 714 294
+3  1659 1785 475
+3  1894 172 751
+3  515 1143 1147
+3  1047 1046 510
+3  789 87 792
+3  792 87 793
+3  406 408 407
+3  1518 84 1513
+3  455 1800 1802
+3  1808 458 353
+3  285 282 281
+3  1894 766 172
+3  1530 450 1840
+3  1895 219 1697
+3  763 764 3
+3  1187 321 1847
+3  1847 321 1186
+3  1316 1235 573
+3  1316 573 1317
+3  51 420 286
+3  1223 1212 398
+3  8 998 997
+3  568 206 1192
+3  1282 568 1192
+3  1881 62 1163
+3  1163 1066 1881
+3  423 99 422
+3  1127 1126 626
+3  1366 1185 1845
+3  1366 1845 1186
+3  317 94 326
+3  206 1190 1969
+3  797 1679 170
+3  796 249 797
+3  547 546 20
+3  290 178 288
+3  813 17 254
+3  1891 749 1120
+3  482 483 118
+3  362 1000 995
+3  161 752 779
+3  624 1975 30
+3  624 30 646
+3  1716 886 1717
+3  1745 1746 188
+3  1266 1746 1745
+3  1331 191 1330
+3  1901 231 1900
+3  1978 1997 879
+3  793 87 795
+3  855 1472 1475
+3  704 701 494
+3  505 504 121
+3  288 701 704
+3  577 924 1199
+3  1924 1618 930
+3  1923 1618 1924
+3  1194 1193 1849
+3  1194 1849 1850
+3  1534 722 1885
+3  434 439 435
+3  1156 787 769
+3  1427 177 280
+3  1279 1280 521
+3  1849 1195 1850
+3  862 863 47
+3  47 863 864
+3  1721 1720 896
+3  1115 1114 38
+3  38 1114 1641
+3  1056 512 1053
+3  1722 832 1720
+3  1143 1144 1147
+3  1144 1145 2
+3  1875 1132 141
+3  1826 1562 1827
+3  602 1680 606
+3  45 1805 1807
+3  1698 1945 21
+3  1044 131 1043
+3  1943 1118 217
+3  67 1063 946
+3  915 1317 1318
+3  1051 511 1046
+3  604 9 1315
+3  1474 1469 902
+3  253 171 255
+3  732 731 136
+3  99 423 972
+3  1430 196 197
+3  77 444 446
+3  958 691 957
+3  1814 454 46
+3  783 785 784
+3  784 785 0
+3  673 680 672
+3  115 1227 1228
+3  1623 1624 584
+3  21 1944 1940
+3  567 569 204
+3  1007 368 1913
+3  986 988 987
+3  316 57 668
+3  5 1587 1583
+3  5 1583 1577
+3  260 86 1568
+3  1432 248 1567
+3  827 336 828
+3  1733 36 844
+3  200 1823 1822
+3  913 1177 914
+3  112 221 197
+3  770 37 786
+3  1635 1784 1786
+3  1786 1788 1635
+3  221 100 1430
+3  766 767 771
+3  771 767 783
+3  531 1281 1283
+3  1114 215 1038
+3  1938 1036 1939
+3  186 460 461
+3  675 676 181
+3  1035 1937 109
+3  180 673 672
+3  273 1947 226
+3  226 289 273
+3  229 1041 225
+3  811 216 812
+3  1892 1890 750
+3  158 1704 774
+3  719 718 1952
+3  1699 226 1698
+3  807 806 524
+3  1037 225 1040
+3  511 1045 1044
+3  164 277 1383
+3  1245 1735 848
+3  848 1735 1737
+3  48 1509 1854
+3  270 223 1730
+3  277 278 10
+3  1502 81 415
+3  216 1038 1034
+3  1042 815 510
+3  510 815 1058
+3  1446 1460 462
+3  1806 458 1807
+3  237 1389 1390
+3  1538 78 1543
+3  1543 1530 1538
+3  847 846 346
+3  346 1395 847
+3  858 564 854
+3  1357 261 1950
+3  1540 1803 453
+3  176 278 276
+3  234 276 1393
+3  969 369 70
+3  992 369 969
+3  1386 235 1385
+3  342 18 340
+3  74 517 522
+3  52 680 679
+3  249 26 797
+3  21 1940 1901
+3  792 793 149
+3  792 149 973
+3  1323 1324 142
+3  1960 1959 59
+3  59 1356 1960
+3  1895 1896 111
+3  1049 1045 522
+3  568 1182 419
+3  621 620 31
+3  643 644 642
+3  1986 1987 1259
+3  1170 1173 1171
+3  957 955 747
+3  1319 1322 1320
+3  597 1577 1578
+3  227 421 269
+3  875 874 834
+3  274 272 176
+3  1520 480 1521
+3  1109 188 1746
+3  271 272 274
+3  229 225 1945
+3  392 391 126
+3  4 711 297
+3  230 1118 1943
+3  21 1901 675
+3  2022 900 2023
+3  678 184 1897
+3  743 437 438
+3  438 437 24
+3  1819 1816 46
+3  1030 1029 381
+3  201 1013 1011
+3  686 1559 1748
+3  107 1559 686
+3  1087 1079 1080
+3  1587 1581 1583
+3  268 163 254
+3  1325 1286 1339
+3  1112 246 152
+3  152 246 1569
+3  1397 1395 346
+3  1392 1384 1385
+3  1874 141 1130
+3  326 328 28
+3  1403 91 373
+3  268 555 223
+3  307 302 662
+3  243 719 720
+3  552 26 554
+3  893 892 1714
+3  491 1476 1473
+3  787 152 788
+3  1559 685 1748
+3  40 721 239
+3  1681 1677 150
+3  710 713 292
+3  712 710 292
+3  120 195 1176
+3  1638 1637 66
+3  1639 1637 1638
+3  1572 1568 247
+3  1347 694 1346
+3  1347 1346 323
+3  1484 1161 1482
+3  269 223 270
+3  981 980 359
+3  981 359 983
+3  171 258 256
+3  1 253 252
+3  1184 1371 1196
+3  1184 1196 1364
+3  754 753 515
+3  1059 753 754
+3  1356 266 1960
+3  1960 266 1962
+3  1174 1693 1695
+3  1174 1695 140
+3  1498 934 933
+3  1881 1882 1880
+3  16 1654 377
+3  171 238 258
+3  235 1392 1385
+3  1530 1840 1533
+3  62 1873 1163
+3  1878 1873 62
+3  496 350 866
+3  1247 849 1246
+3  259 1948 1949
+3  654 314 653
+3  296 1736 1957
+3  296 1957 1376
+3  1354 293 266
+3  266 293 294
+3  711 291 708
+3  711 708 297
+3  173 749 1890
+3  267 244 165
+3  724 526 102
+3  724 102 1288
+3  281 278 279
+3  271 228 110
+3  405 696 327
+3  1394 1393 1392
+3  463 462 186
+3  186 462 1460
+3  110 272 271
+3  1107 95 899
+3  227 274 275
+3  274 176 275
+3  278 176 279
+3  280 272 273
+3  668 94 317
+3  668 317 316
+3  276 275 176
+3  329 1763 687
+3  329 687 1688
+3  329 1688 1742
+3  1772 1773 669
+3  275 276 234
+3  1461 1462 1801
+3  458 1808 1807
+3  463 1755 1754
+3  280 176 272
+3  279 176 280
+3  565 180 566
+3  1631 1259 534
+3  1689 1259 1631
+3  549 550 212
+3  1537 1536 447
+3  703 283 702
+3  282 703 702
+3  177 279 280
+3  1818 1816 198
+3  1916 516 756
+3  1307 1308 532
+3  245 244 267
+3  189 1833 1968
+3  178 284 287
+3  1033 1032 222
+3  1039 1032 1033
+3  1340 1286 1428
+3  76 442 441
+3  1545 1546 1544
+3  1544 78 1545
+3  1225 388 1230
+3  314 985 649
+3  652 649 548
+3  284 178 232
+3  1556 1555 1766
+3  1507 445 1548
+3  1528 445 1507
+3  292 713 714
+3  92 318 319
+3  92 319 322
+3  870 298 871
+3  781 1642 1062
+3  1445 1444 1447
+3  405 33 696
+3  875 850 193
+3  1451 44 1450
+3  317 326 318
+3  1916 942 516
+3  710 712 55
+3  1568 1567 247
+3  299 58 968
+3  764 411 413
+3  265 1355 1353
+3  346 846 1400
+3  467 1452 1451
+3  300 1961 301
+3  301 1961 1958
+3  665 844 1335
+3  1335 844 1377
+3  716 245 55
+3  414 409 11
+3  612 919 920
+3  610 919 612
+3  872 869 563
+3  71 435 436
+3  294 4 295
+3  161 255 1893
+3  867 496 866
+3  291 709 708
+3  713 4 714
+3  1189 1190 429
+3  308 124 659
+3  988 990 210
+3  1751 1750 685
+3  417 1300 1261
+3  864 863 823
+3  250 124 312
+3  326 28 318
+3  308 312 124
+3  654 653 655
+3  872 853 873
+3  1948 1951 128
+3  1082 1081 356
+3  1275 1274 826
+3  1276 1275 826
+3  24 437 436
+3  24 436 440
+3  337 878 879
+3  1957 1736 1327
+3  552 551 97
+3  212 551 552
+3  1090 1089 304
+3  113 917 916
+3  916 917 574
+3  1197 1843 1364
+3  1844 1843 1197
+3  1080 1081 1087
+3  1087 1081 19
+3  407 410 325
+3  93 1368 1367
+3  326 341 105
+3  326 105 328
+3  208 423 422
+3  297 295 4
+3  1647 1117 1648
+3  979 360 980
+3  695 1347 693
+3  696 33 697
+3  1893 256 173
+3  1588 1779 1590
+3  1590 41 1588
+3  545 698 438
+3  1092 1437 303
+3  316 305 1095
+3  493 494 12
+3  483 486 183
+3  482 486 483
+3  483 183 119
+3  1572 88 1650
+3  489 539 541
+3  400 1068 1069
+3  1477 400 1069
+3  1042 1043 1048
+3  1048 514 1042
+3  531 1283 1284
+3  520 763 3
+3  108 827 1276
+3  94 341 326
+3  335 1556 334
+3  571 421 234
+3  924 925 1665
+3  1785 1659 1141
+3  868 862 1931
+3  885 1866 1418
+3  1389 165 1390
+3  859 858 862
+3  347 336 335
+3  1947 110 229
+3  1139 1249 870
+3  1444 477 1447
+3  1442 477 1444
+3  1931 862 1929
+3  1929 563 1931
+3  247 1571 1572
+3  448 1533 1531
+3  1531 1533 1840
+3  1499 481 1500
+3  1503 1499 1500
+3  861 564 859
+3  346 1400 1399
+3  1399 1400 839
+3  857 1454 1453
+3  1571 88 1572
+3  1860 1859 1410
+3  298 870 1248
+3  1174 1175 1693
+3  143 1175 1174
+3  824 551 550
+3  821 1135 1134
+3  684 1750 1751
+3  1332 1333 191
+3  1121 6 2019
+3  1890 1892 173
+3  1348 1346 694
+3  1183 1348 694
+3  334 1760 1761
+3  334 340 18
+3  861 353 857
+3  860 353 861
+3  790 242 1112
+3  857 856 861
+3  163 421 571
+3  1270 335 108
+3  653 314 652
+3  678 1897 1902
+3  1276 826 1269
+3  1276 1269 108
+3  564 861 856
+3  1111 83 683
+3  291 711 713
+3  709 710 404
+3  986 360 979
+3  450 1508 80
+3  1207 920 1858
+3  396 1207 1858
+3  1027 69 1024
+3  1032 556 222
+3  488 1683 1684
+3  1229 115 1228
+3  23 410 411
+3  210 990 991
+3  362 995 994
+3  989 988 361
+3  159 1319 1643
+3  386 1226 1225
+3  1225 1226 388
+3  1598 1599 925
+3  1965 1966 371
+3  1132 1142 1133
+3  1132 1133 141
+3  903 1834 471
+3  218 1116 1647
+3  1658 1657 1141
+3  1660 1657 1658
+3  1027 1906 69
+3  1311 949 1312
+3  749 257 1904
+3  990 994 991
+3  1909 551 824
+3  1726 384 428
+3  397 1212 1213
+3  1213 1212 1223
+3  127 1853 395
+3  115 1218 1224
+3  115 1224 1227
+3  877 829 878
+3  429 428 203
+3  429 203 1189
+3  126 393 392
+3  1739 679 513
+3  1853 393 126
+3  387 1232 1219
+3  457 1461 1801
+3  1801 1798 457
+3  1983 1104 1982
+3  1982 1181 1983
+3  1232 390 16
+3  194 644 175
+3  175 611 194
+3  55 267 233
+3  710 55 404
+3  1412 1414 889
+3  795 87 1564
+3  1421 1238 915
+3  729 1296 1289
+3  1297 1296 729
+3  1420 1238 1421
+3  1878 1869 1877
+3  640 1878 1877
+3  395 389 1233
+3  1109 1108 469
+3  388 559 90
+3  90 559 1405
+3  1222 1223 398
+3  1217 387 1219
+3  1219 386 1217
+3  612 397 1213
+3  1213 32 612
+3  948 949 375
+3  375 949 950
+3  1807 1808 45
+3  33 405 406
+3  451 1531 450
+3  1822 46 454
+3  183 439 179
+3  414 80 415
+3  504 506 485
+3  408 505 122
+3  408 122 407
+3  1550 1551 1505
+3  1775 1774 507
+3  1775 507 1777
+3  1183 1369 1368
+3  544 542 132
+3  705 288 704
+3  217 1842 1115
+3  993 367 1004
+3  528 1151 1153
+3  1153 1151 1148
+3  503 506 504
+3  122 413 411
+3  122 411 410
+3  1820 199 1821
+3  1534 1533 448
+3  1534 448 1464
+3  1545 445 1546
+3  465 185 332
+3  1513 1512 1518
+3  747 955 323
+3  409 414 81
+3  781 1062 811
+3  566 180 672
+3  1414 913 908
+3  1728 1729 209
+3  429 567 204
+3  1364 1196 1197
+3  208 422 424
+3  356 1081 1080
+3  1372 696 697
+3  322 25 433
+3  201 1078 1079
+3  1082 19 1081
+3  203 427 430
+3  426 425 202
+3  1192 206 1191
+3  1187 25 321
+3  205 1188 1187
+3  205 1193 1194
+3  205 1194 1190
+3  310 433 432
+3  432 431 310
+3  433 25 432
+3  425 431 202
+3  1861 1862 1365
+3  1861 1365 1367
+3  319 321 322
+3  43 698 545
+3  233 404 55
+3  420 179 434
+3  1160 1485 1484
+3  1873 640 1872
+3  853 872 563
+3  708 709 707
+3  1355 265 1358
+3  968 58 967
+3  1900 184 1903
+3  1341 142 1339
+3  1689 1986 1259
+3  268 17 555
+3  1107 899 1108
+3  440 441 77
+3  1107 473 1264
+3  1263 1107 1264
+3  1273 474 1272
+3  1265 473 1266
+3  1264 473 1265
+3  76 440 436
+3  1457 1827 1828
+3  1828 1827 1459
+3  443 442 76
+3  343 1686 1333
+3  1522 482 118
+3  444 77 441
+3  476 1510 1524
+3  1524 1510 1511
+3  434 179 439
+3  76 435 443
+3  435 439 22
+3  435 22 443
+3  443 22 479
+3  464 1753 1754
+3  1546 445 1529
+3  1529 445 1528
+3  281 282 10
+3  1818 1817 1816
+3  1504 476 1524
+3  1756 461 185
+3  464 1756 185
+3  1794 1793 457
+3  1552 476 1504
+3  451 450 80
+3  1469 1470 490
+3  1145 1154 2
+3  1407 1408 501
+3  1804 456 1806
+3  1544 1546 1529
+3  1818 77 1817
+3  1817 446 1815
+3  49 487 505
+3  199 1822 1823
+3  753 523 515
+3  515 523 1143
+3  44 466 1450
+3  461 1756 186
+3  1557 1558 1559
+3  107 1557 1559
+3  1515 1514 1517
+3  1754 1753 83
+3  828 834 876
+3  71 1140 1696
+3  747 331 745
+3  1808 350 45
+3  780 781 811
+3  165 1389 1382
+3  1805 1823 200
+3  454 1803 200
+3  200 1803 1802
+3  1826 1797 79
+3  1825 1797 1826
+3  1464 1465 460
+3  448 1465 1464
+3  190 1466 1446
+3  958 106 690
+3  245 243 720
+3  186 1756 1755
+3  1537 78 1538
+3  1472 491 1475
+3  468 187 463
+3  190 1445 1447
+3  1557 344 1558
+3  1749 1757 1748
+3  1748 1757 686
+3  909 905 852
+3  344 1111 683
+3  1930 853 563
+3  909 829 905
+3  989 990 988
+3  1724 567 206
+3  1520 1521 1525
+3  552 1157 1158
+3  890 1419 889
+3  95 907 898
+3  1589 1780 933
+3  1397 837 1396
+3  1396 1395 1397
+3  1463 1461 466
+3  1536 1812 1813
+3  1552 1504 1505
+3  1551 1552 1505
+3  1409 1553 499
+3  500 503 487
+3  480 1522 1521
+3  899 904 469
+3  1971 904 899
+3  1040 225 1041
+3  952 401 951
+3  1120 53 1891
+3  1501 49 1502
+3  119 183 648
+3  1822 1819 46
+3  779 813 162
+3  3 544 520
+3  354 1452 1471
+3  390 391 1654
+3  882 830 1978
+3  890 892 1419
+3  709 290 707
+3  1 235 1386
+3  1432 249 796
+3  1080 357 1933
+3  211 1991 1406
+3  1990 1991 211
+3  288 706 290
+3  863 348 823
+3  868 348 863
+3  290 404 178
+3  1255 294 295
+3  71 436 437
+3  954 461 1465
+3  1795 1809 1466
+3  1501 502 49
+3  49 502 487
+3  825 1478 1477
+3  209 423 1728
+3  487 503 504
+3  1365 1185 1366
+3  502 500 487
+3  49 408 1502
+3  1129 1128 1132
+3  1129 1132 1875
+3  806 807 538
+3  1057 1056 513
+3  449 1516 1532
+3  1532 1516 1508
+3  500 502 481
+3  1059 754 756
+3  540 504 485
+3  697 1371 1372
+3  1580 933 1781
+3  1774 506 1776
+3  267 165 233
+3  121 504 540
+3  1148 2 1153
+3  1540 455 1803
+3  603 1678 1679
+3  1677 1678 603
+3  811 160 780
+3  756 516 759
+3  756 759 757
+3  1439 1440 1438
+3  818 1061 75
+3  517 523 522
+3  540 539 489
+3  544 759 760
+3  759 516 760
+3  1903 675 1900
+3  771 157 772
+3  1763 329 1764
+3  512 74 522
+3  750 53 766
+3  1126 1128 626
+3  626 1128 1129
+3  104 1182 1282
+3  430 25 1188
+3  1188 25 1187
+3  521 764 763
+3  1198 1197 325
+3  325 410 1198
+3  135 738 804
+3  1674 15 1675
+3  1049 522 1050
+3  74 809 517
+3  1182 568 1282
+3  1431 144 1176
+3  1272 474 887
+3  1751 683 1752
+3  104 1280 1279
+3  526 518 102
+3  819 508 817
+3  1148 1147 2
+3  1308 1307 533
+3  1224 1225 1227
+3  1227 1225 1230
+3  1071 952 1294
+3  1294 13 1071
+3  121 540 489
+3  1124 1123 119
+3  508 1777 1778
+3  1117 1645 1644
+3  1644 1645 38
+3  540 485 539
+3  67 604 1314
+3  1390 165 244
+3  755 942 1916
+3  256 1497 257
+3  164 1392 1393
+3  258 238 239
+3  238 40 239
+3  268 223 269
+3  1388 1386 236
+3  1392 164 1384
+3  1390 244 238
+3  169 1871 634
+3  926 1597 925
+3  778 752 39
+3  399 1229 1478
+3  1478 1479 399
+3  251 235 1
+3  254 17 268
+3  131 1050 753
+3  162 813 254
+3  17 813 812
+3  1039 109 1040
+3  221 112 220
+3  228 1041 229
+3  1071 401 952
+3  375 950 1291
+3  1652 242 1653
+3  318 28 1350
+3  770 156 768
+3  1732 223 556
+3  708 54 1251
+3  708 1251 297
+3  745 961 960
+3  960 959 745
+3  1368 1369 1367
+3  559 1404 1405
+3  682 11 409
+3  461 11 682
+3  461 682 185
+3  681 682 82
+3  82 682 409
+3  413 121 543
+3  1026 2018 2020
+3  1255 58 299
+3  1328 58 1255
+3  745 957 747
+3  1843 1185 1862
+3  1851 1185 1843
+3  314 984 985
+3  549 212 547
+3  689 963 964
+3  964 963 688
+3  529 1782 1150
+3  1150 1149 529
+3  212 552 554
+3  1103 1101 1178
+3  1103 1178 1981
+3  797 1158 553
+3  896 1719 1712
+3  994 995 366
+3  97 607 1157
+3  752 172 39
+3  263 240 719
+3  674 1699 1698
+3  1902 220 112
+3  1841 1634 670
+3  671 1634 1841
+3  1067 533 1301
+3  767 53 768
+3  804 519 524
+3  777 39 776
+3  974 977 148
+3  1884 722 1542
+3  1539 1884 1542
+3  1565 1570 1569
+3  1865 1274 1273
+3  1904 174 1120
+3  749 1904 1120
+3  1600 1664 1601
+3  631 638 598
+3  1784 1271 1785
+3  1072 1074 1075
+3  1322 1319 159
+3  1412 913 1414
+3  1618 941 1619
+3  728 731 732
+3  1677 603 1680
+3  313 653 20
+3  906 1690 833
+3  1679 553 603
+3  922 921 1424
+3  939 938 583
+3  1935 1921 311
+3  1487 140 1489
+3  1487 1489 1483
+3  106 960 962
+3  963 106 962
+3  1431 1429 1286
+3  249 1434 26
+3  1433 1434 249
+3  1684 1682 1123
+3  1127 626 1876
+3  639 1127 1876
+3  1666 149 793
+3  1666 793 794
+3  1675 977 974
+3  1913 1008 1912
+3  1264 887 1263
+3  959 960 106
+3  1159 1130 1131
+3  1872 1130 1159
+3  139 1165 1170
+3  1133 970 971
+3  971 970 1173
+3  814 812 216
+3  969 1018 1031
+3  1830 189 1829
+3  115 1229 1222
+3  1404 374 1405
+3  1230 90 402
+3  975 149 1666
+3  1418 1866 1416
+3  632 42 633
+3  398 1218 1222
+3  549 560 550
+3  616 194 614
+3  914 1177 830
+3  644 194 642
+3  1287 1288 725
+3  1289 1287 725
+3  1513 1514 1515
+3  1515 1076 1513
+3  982 1011 422
+3  1443 1468 477
+3  1443 477 1442
+3  388 90 1230
+3  1226 1220 383
+3  141 1874 1875
+3  1233 389 1231
+3  1002 371 91
+3  1001 1002 364
+3  1028 68 1029
+3  9 601 602
+3  34 1004 1005
+3  1450 1449 1468
+3  175 644 621
+3  1697 219 1343
+3  68 1019 403
+3  584 1624 1625
+3  1008 1015 379
+3  1018 368 1031
+3  940 1243 394
+3  611 613 194
+3  996 997 369
+3  997 998 1009
+3  369 1009 376
+3  694 1374 1183
+3  95 1107 1263
+3  195 138 557
+3  1435 27 195
+3  1127 1125 1126
+3  1574 1575 41
+3  139 1171 1172
+3  1172 137 645
+3  1828 1459 460
+3  460 1459 1464
+3  1068 947 401
+3  401 947 951
+3  818 508 1778
+3  1781 933 1780
+3  1410 483 501
+3  1122 501 483
+3  1677 1681 1678
+3  1910 608 97
+3  97 551 1910
+3  1072 736 1073
+3  116 1069 1070
+3  1653 1313 153
+3  744 1742 1688
+3  761 762 520
+3  388 365 559
+3  29 1664 1663
+3  222 555 814
+3  556 555 222
+3  558 384 385
+3  641 1160 1162
+3  1098 1096 1094
+3  1150 755 561
+3  1150 561 1149
+3  1062 216 811
+3  847 347 345
+3  1165 143 1164
+3  1164 1168 1165
+3  1796 1456 1795
+3  544 760 520
+3  10 284 562
+3  1353 1354 265
+3  478 901 1444
+3  1445 478 1444
+3  1252 298 1251
+3  54 1252 1251
+3  236 1385 1384
+3  47 859 862
+3  875 834 850
+3  1075 825 116
+3  264 1352 1353
+3  206 567 429
+3  1374 324 1370
+3  1599 1598 1610
+3  1184 1364 1861
+3  183 179 566
+3  443 479 117
+3  565 51 289
+3  180 565 289
+3  470 901 478
+3  2023 901 470
+3  867 63 870
+3  1254 1737 1376
+3  1930 854 853
+3  1136 1135 821
+3  1335 1331 1330
+3  665 1335 1330
+3  2021 2020 6
+3  576 621 31
+3  32 1481 1480
+3  897 1721 1832
+3  897 1832 2022
+3  635 169 634
+3  583 1623 1243
+3  615 1073 735
+3  1287 724 1288
+3  1626 1611 930
+3  930 1611 1612
+3  636 5 1577
+3  1168 1169 1165
+3  31 1206 1205
+3  620 1206 31
+3  641 1872 1159
+3  156 786 785
+3  1622 1623 583
+3  576 610 175
+3  621 576 175
+3  1663 1665 1599
+3  1179 591 1178
+3  1159 1131 1166
+3  946 945 592
+3  1888 66 1887
+3  1888 1887 1886
+3  793 1099 794
+3  1646 1116 1115
+3  1115 1116 217
+3  1566 1564 1565
+3  616 642 194
+3  632 638 631
+3  157 783 784
+3  1207 396 1209
+3  1209 396 1984
+3  1175 1694 1693
+3  1066 146 1065
+3  633 635 634
+3  634 597 633
+3  1675 15 977
+3  1671 594 1672
+3  578 1593 1595
+3  760 516 942
+3  1103 1105 593
+3  1626 936 1611
+3  1868 1867 640
+3  1570 1565 87
+3  1669 1670 1668
+3  1713 894 1714
+3  533 1307 1305
+3  447 78 1537
+3  9 602 606
+3  1576 1578 1577
+3  1576 1577 596
+3  608 607 97
+3  1709 892 1710
+3  892 890 1710
+3  1069 401 1705
+3  103 1067 1297
+3  735 736 13
+3  1073 736 735
+3  394 1241 1240
+3  575 1424 1202
+3  918 919 610
+3  113 919 918
+3  1243 584 1242
+3  194 613 614
+3  1513 84 1514
+3  1514 84 1500
+3  604 1640 601
+3  947 90 948
+3  1495 1490 1695
+3  1695 1490 140
+3  733 136 72
+3  734 733 72
+3  101 733 734
+3  932 928 1591
+3  628 600 629
+3  629 600 630
+3  1205 1200 618
+3  1561 127 1234
+3  1240 127 1561
+3  1508 1528 1532
+3  1104 1105 1103
+3  1973 978 1972
+3  1974 978 1973
+3  589 943 585
+3  621 30 622
+3  1493 1065 1492
+3  1064 1483 1489
+3  1491 1064 1489
+3  1242 1241 394
+3  633 42 635
+3  644 30 621
+3  647 1055 130
+3  1172 1171 137
+3  642 616 72
+3  786 37 155
+3  628 629 627
+3  622 214 620
+3  724 1287 1303
+3  633 638 632
+3  628 627 214
+3  593 168 594
+3  636 168 593
+3  1867 1874 1130
+3  587 1242 584
+3  213 627 629
+3  1201 1202 1203
+3  575 1202 1201
+3  1610 927 1611
+3  1994 1993 884
+3  148 977 1883
+3  1010 1021 69
+3  944 943 65
+3  30 623 622
+3  617 1200 1205
+3  1579 598 1574
+3  1579 1574 1573
+3  1146 809 519
+3  829 1976 879
+3  62 1880 1878
+3  1055 1054 130
+3  74 538 807
+3  145 1167 1168
+3  645 643 72
+3  643 645 137
+3  1170 1171 139
+3  136 645 72
+3  197 27 810
+3  137 646 643
+3  1610 29 1768
+3  1610 1768 1599
+3  1902 112 805
+3  183 566 648
+3  946 604 67
+3  1999 1998 1415
+3  1415 1419 1999
+3  889 1419 1415
+3  650 360 651
+3  369 992 996
+3  362 994 989
+3  1951 1952 264
+3  654 655 125
+3  427 203 428
+3  242 1652 246
+3  265 1354 1356
+3  429 1190 206
+3  113 1077 920
+3  1082 311 1918
+3  660 659 124
+3  658 657 308
+3  661 312 308
+3  1572 1650 259
+3  1568 1572 259
+3  663 662 302
+3  657 661 308
+3  564 856 855
+3  26 1158 797
+3  664 60 1920
+3  306 664 1920
+3  311 1082 356
+3  1922 2024 579
+3  306 663 664
+3  579 2024 1615
+3  664 663 302
+3  1427 280 273
+3  1851 1844 1852
+3  1851 1852 1845
+3  28 1349 1350
+3  1574 41 1573
+3  1573 41 2014
+3  1658 188 1660
+3  1409 501 1408
+3  1048 753 1059
+3  1200 617 935
+3  1114 1842 1118
+3  648 672 52
+3  672 648 566
+3  1645 1115 38
+3  1517 415 1515
+3  1701 289 226
+3  538 74 512
+3  675 1903 676
+3  1730 1732 1731
+3  698 283 742
+3  742 283 703
+3  242 246 1112
+3  742 438 698
+3  496 1821 45
+3  82 537 681
+3  1898 219 1895
+3  860 1808 353
+3  185 681 332
+3  80 1516 1076
+3  693 1347 323
+3  683 83 1752
+3  332 690 689
+3  683 685 1558
+3  1751 685 683
+3  92 322 1361
+3  963 689 690
+3  82 405 327
+3  689 964 965
+3  1689 1631 1634
+3  695 694 1347
+3  959 958 957
+3  106 958 959
+3  691 537 692
+3  537 82 692
+3  959 957 745
+3  1373 1372 324
+3  1374 1370 1369
+3  1183 1374 1369
+3  1760 107 1759
+3  407 697 33
+3  706 288 705
+3  288 178 287
+3  288 287 701
+3  103 671 1309
+3  287 702 700
+3  284 702 287
+3  700 283 699
+3  284 282 702
+3  1456 1825 1809
+3  493 705 704
+3  1253 295 297
+3  291 710 709
+3  54 706 705
+3  712 716 55
+3  871 298 1252
+3  493 871 1252
+3  709 404 290
+3  107 686 1759
+3  1708 1707 1711
+3  830 1177 1995
+3  336 347 850
+3  1752 465 684
+3  1751 1752 684
+3  1255 295 1254
+3  1135 36 1134
+3  715 716 712
+3  1399 1381 838
+3  129 717 715
+3  40 720 721
+3  719 243 718
+3  245 720 40
+3  1235 1234 573
+3  1260 1261 416
+3  569 1988 570
+3  729 1289 1290
+3  1300 671 1299
+3  541 819 509
+3  181 1656 680
+3  810 112 197
+3  1287 1289 527
+3  375 952 951
+3  7 1725 1727
+3  7 1727 1989
+3  1037 1940 1944
+3  130 1053 1052
+3  1798 1796 457
+3  1900 1899 1896
+3  765 762 133
+3  538 512 1056
+3  1040 1041 224
+3  1922 1613 1614
+3  1432 796 248
+3  474 1277 885
+3  390 1980 126
+3  801 678 525
+3  1085 19 1083
+3  1939 1036 1941
+3  1698 1946 1945
+3  1289 1296 527
+3  1741 507 1773
+3  485 1777 539
+3  286 1696 1140
+3  1016 378 1019
+3  1696 420 71
+3  134 1307 1284
+3  1284 1307 532
+3  951 947 948
+3  375 951 948
+3  819 816 509
+3  1507 1506 1550
+3  1550 1506 1551
+3  209 361 972
+3  615 735 734
+3  1074 615 616
+3  518 727 102
+3  102 727 726
+3  1435 195 730
+3  1262 416 1261
+3  1260 417 1261
+3  72 616 615
+3  734 72 615
+3  727 732 101
+3  727 728 732
+3  557 136 731
+3  101 735 726
+3  732 136 733
+3  732 733 101
+3  101 726 727
+3  818 535 1061
+3  1740 535 818
+3  101 734 735
+3  1072 1075 116
+3  680 1656 677
+3  680 677 679
+3  1068 401 1069
+3  737 738 135
+3  739 728 727
+3  73 738 739
+3  73 739 727
+3  1442 1444 901
+3  1829 1442 901
+3  1433 1432 86
+3  1101 1103 593
+3  1100 1101 593
+3  1667 150 1668
+3  391 68 403
+3  873 2025 835
+3  1058 1047 510
+3  1548 48 1854
+3  1939 231 1940
+3  1044 1049 131
+3  1866 885 1417
+3  1798 1801 1799
+3  1799 1541 1798
+3  237 1387 1388
+3  1386 1388 1387
+3  419 534 1259
+3  903 906 833
+3  1773 507 1774
+3  329 1742 746
+3  1625 585 2021
+3  6 1625 2021
+3  1017 1020 379
+3  1663 1664 1600
+3  418 1312 1262
+3  1941 1036 230
+3  1898 1943 217
+3  1901 1940 231
+3  1499 497 1527
+3  1527 481 1499
+3  466 1449 1450
+3  885 1662 1417
+3  691 956 955
+3  330 964 1765
+3  425 201 1079
+3  328 746 331
+3  28 328 331
+3  960 744 962
+3  960 961 744
+3  1014 987 210
+3  331 748 28
+3  1120 769 53
+3  446 78 447
+3  1891 53 750
+3  1705 401 1071
+3  344 1557 1791
+3  1791 1790 344
+3  520 762 763
+3  1440 815 758
+3  752 778 779
+3  159 780 777
+3  1730 223 1732
+3  1917 123 663
+3  1043 510 1046
+3  1439 1438 132
+3  756 757 514
+3  514 757 758
+3  730 731 1441
+3  520 760 761
+3  371 98 1965
+3  1278 1279 521
+3  1175 144 1694
+3  133 762 761
+3  1193 205 1187
+3  412 411 764
+3  23 411 412
+3  764 413 3
+3  1642 781 1643
+3  1644 1642 1643
+3  771 172 766
+3  768 769 154
+3  258 153 1497
+3  773 772 157
+3  1322 776 158
+3  776 39 772
+3  1325 1324 953
+3  1916 756 754
+3  700 701 287
+3  778 160 779
+3  224 1039 1040
+3  1114 1118 215
+3  830 1995 1996
+3  157 771 783
+3  1583 1581 596
+3  1642 1641 1062
+3  784 0 1494
+3  1494 774 784
+3  767 156 783
+3  396 1211 1984
+3  869 348 868
+3  156 770 786
+3  769 787 154
+3  552 97 1157
+3  9 606 607
+3  607 606 1157
+3  1770 1125 42
+3  42 1125 1127
+3  788 152 789
+3  154 787 788
+3  95 1106 907
+3  1566 248 1564
+3  1564 248 795
+3  790 787 174
+3  859 564 858
+3  945 1180 592
+3  65 1180 945
+3  1158 26 552
+3  150 1676 1669
+3  507 1778 1777
+3  1565 1564 87
+3  1106 887 886
+3  1416 1999 472
+3  1868 1877 639
+3  1876 1868 639
+3  1003 362 209
+3  50 426 427
+3  1317 573 916
+3  423 209 972
+3  1423 1422 574
+3  574 1425 1423
+3  547 548 549
+3  45 1823 1805
+3  560 382 34
+3  1406 382 560
+3  1260 7 1989
+3  1934 656 355
+3  125 655 656
+3  428 384 50
+3  1176 144 1175
+3  656 313 661
+3  1126 1973 1972
+3  1935 355 1921
+3  1133 971 141
+3  1084 1083 309
+3  1926 1612 927
+3  123 658 662
+3  663 123 662
+3  1190 1189 205
+3  3 543 544
+3  1194 1850 1191
+3  1083 1082 309
+3  38 1641 1642
+3  714 1359 292
+3  1644 1643 782
+3  1117 1644 782
+3  602 1676 1680
+3  1086 1084 309
+3  1470 833 1473
+3  915 1238 1236
+3  1316 915 1236
+3  418 1311 1312
+3  302 59 1959
+3  317 318 92
+3  1350 1349 320
+3  677 1856 679
+3  723 1304 1306
+3  368 1006 1005
+3  339 1635 1789
+3  1768 29 1663
+3  1768 1663 1599
+3  1055 513 1054
+3  1438 757 132
+3  339 1270 1635
+3  1635 1270 1271
+3  1783 530 765
+3  473 1746 1266
+3  1517 1514 1501
+3  648 647 119
+3  1735 296 1737
+3  1736 296 1735
+3  1279 1281 104
+3  1779 1589 932
+3  1655 1656 676
+3  657 355 656
+3  140 1490 1489
+3  316 317 92
+3  1655 678 801
+3  1097 967 315
+3  1772 669 1407
+3  1368 93 1351
+3  676 184 678
+3  678 1655 676
+3  1122 484 1407
+3  1593 1604 2009
+3  327 693 692
+3  1704 784 774
+3  841 192 842
+3  14 1237 1238
+3  182 1856 1857
+3  1910 1909 370
+3  975 974 149
+3  1679 1678 170
+3  1162 1160 1484
+3  976 148 37
+3  182 538 1057
+3  1776 85 1408
+3  180 1700 673
+3  1946 1698 226
+3  1857 801 802
+3  1656 1655 677
+3  182 1857 802
+3  1311 418 1310
+3  1310 418 1299
+3  738 519 804
+3  73 519 738
+3  524 802 803
+3  73 518 519
+3  1736 1326 1327
+3  518 73 727
+3  112 810 805
+3  808 809 74
+3  541 509 1439
+3  1260 416 7
+3  1052 1053 511
+3  511 1053 1045
+3  1049 1050 131
+3  1280 1282 412
+3  412 1282 1192
+3  810 27 737
+3  519 518 1146
+3  809 1146 517
+3  104 1282 1280
+3  1989 1727 1258
+3  229 1945 1946
+3  340 105 341
+3  525 803 802
+3  834 874 876
+3  1349 28 748
+3  1271 1269 475
+3  1785 1271 475
+3  1846 1845 207
+3  1848 1846 207
+3  561 1687 1147
+3  519 809 808
+3  888 1273 1272
+3  802 801 525
+3  677 801 1857
+3  811 812 160
+3  936 1626 1627
+3  1627 1626 1619
+3  803 525 805
+3  803 804 524
+3  135 804 803
+3  135 803 805
+3  526 723 1155
+3  724 723 526
+3  1717 1715 1716
+3  807 808 74
+3  519 808 524
+3  805 810 135
+3  536 1051 1047
+3  345 347 18
+3  814 17 812
+3  514 1059 756
+3  1682 1741 484
+3  484 1122 1123
+3  1123 1124 1684
+3  488 1684 1124
+3  1910 1027 608
+3  1326 1953 1327
+3  1741 1740 507
+3  1740 1741 535
+3  1682 535 1741
+3  817 75 816
+3  819 817 816
+3  539 819 541
+3  34 550 560
+3  1249 849 1247
+3  468 83 1111
+3  893 472 892
+3  1476 1472 1471
+3  491 1472 1476
+3  848 56 1246
+3  714 293 1359
+3  715 292 1359
+3  839 1381 1399
+3  1214 1216 398
+3  1480 825 614
+3  614 825 1075
+3  71 437 1140
+3  12 496 867
+3  845 1733 1734
+3  1642 1644 38
+3  256 1893 255
+3  290 706 707
+3  1248 1250 1251
+3  1251 1250 297
+3  1481 32 1213
+3  381 2017 1030
+3  1030 2017 1025
+3  886 885 1418
+3  1969 1191 206
+3  886 887 474
+3  471 895 903
+3  338 2026 873
+3  873 2026 2025
+3  773 157 1704
+3  471 1832 1721
+3  1710 1702 831
+3  1275 337 881
+3  854 564 855
+3  2026 874 2025
+3  1121 587 6
+3  1885 452 1534
+3  721 240 241
+3  260 1568 1949
+3  239 721 241
+3  241 1653 153
+3  343 342 341
+3  301 1959 1960
+3  1580 1781 1575
+3  659 658 308
+3  665 1329 1953
+3  1875 1874 1129
+3  853 852 905
+3  467 1467 490
+3  1468 1443 467
+3  1450 1468 467
+3  1110 188 1109
+3  876 877 828
+3  1556 339 1555
+3  1270 339 1556
+3  1556 335 1270
+3  956 323 955
+3  1360 330 1749
+3  335 336 108
+3  338 905 877
+3  943 590 65
+3  1239 394 1560
+3  1560 581 1239
+3  1650 1649 1948
+3  1649 88 1651
+3  356 1933 1934
+3  1951 1355 128
+3  1137 63 1138
+3  1201 1199 924
+3  658 123 657
+3  302 1959 1958
+3  1739 513 1055
+3  338 877 876
+3  1381 839 1380
+3  828 337 827
+3  862 868 863
+3  1405 374 949
+3  949 374 1312
+3  1379 1380 840
+3  95 897 899
+3  1331 352 2016
+3  1335 352 1331
+3  1422 1423 921
+3  845 1734 1735
+3  1735 1734 1736
+3  1377 844 843
+3  843 1378 1377
+3  865 1138 866
+3  1709 1710 831
+3  1478 400 1477
+3  851 1135 820
+3  36 1135 851
+3  838 837 1398
+3  1397 1398 837
+3  56 1247 1246
+3  1245 849 1134
+3  1246 849 1245
+3  300 967 1097
+3  192 839 846
+3  36 851 843
+3  469 904 187
+3  338 876 2026
+3  834 336 850
+3  850 347 847
+3  847 193 850
+3  1396 193 1395
+3  860 861 859
+3  232 1383 562
+3  1778 1740 818
+3  1136 820 1135
+3  1781 1588 1575
+3  2019 392 1121
+3  253 1391 171
+3  1029 392 2019
+3  1831 1834 902
+3  902 1833 1831
+3  469 468 1110
+3  469 1110 1109
+3  1266 1267 1265
+3  914 883 913
+3  911 883 914
+3  1445 190 1446
+3  1836 822 1835
+3  1453 1451 1452
+3  1554 1790 1791
+3  1377 1378 352
+3  1335 1377 352
+3  864 860 47
+3  1706 1707 831
+3  831 1702 1706
+3  1479 1478 825
+3  852 853 854
+3  1992 884 1993
+3  1274 881 1277
+3  1277 474 1274
+3  865 866 350
+3  252 1402 161
+3  335 334 18
+3  330 1360 964
+3  1827 1562 1459
+3  47 860 859
+3  347 335 18
+3  252 253 1402
+3  1929 1930 563
+3  865 350 860
+3  864 865 860
+3  823 349 864
+3  864 349 865
+3  342 345 18
+3  233 232 178
+3  871 12 867
+3  493 12 871
+3  872 835 869
+3  286 1140 285
+3  1140 64 285
+3  1414 908 1703
+3  891 1691 1690
+3  872 873 835
+3  835 874 875
+3  253 255 1402
+3  878 337 828
+3  96 883 911
+3  878 828 877
+3  473 1107 1108
+3  1560 394 1240
+3  2000 2001 884
+3  905 829 877
+3  889 1414 890
+3  1994 1997 1996
+3  1996 1997 830
+3  1471 1470 1476
+3  913 883 908
+3  874 2026 876
+3  1704 157 784
+3  853 905 338
+3  1320 1321 2006
+3  1470 1474 833
+3  1020 1021 1010
+3  900 1830 2023
+3  1069 116 1477
+3  897 95 898
+3  855 856 1472
+3  491 1692 1475
+3  829 1977 1976
+3  898 1722 1720
+3  790 1112 787
+3  1108 899 469
+3  354 1471 1472
+3  1832 1834 1831
+3  1832 1831 900
+3  2023 1830 901
+3  2023 470 2022
+3  1462 1463 456
+3  722 1534 1464
+3  1455 1448 1793
+3  1794 1455 1793
+3  470 478 904
+3  895 906 903
+3  891 1702 1703
+3  1703 1710 890
+3  1703 908 891
+3  885 886 474
+3  855 96 912
+3  910 912 96
+3  1999 1419 472
+3  2001 1417 2002
+3  2000 1866 1417
+3  1416 1866 2000
+3  1747 262 260
+3  1418 1416 472
+3  827 1275 1276
+3  910 1979 909
+3  2002 1662 880
+3  1996 1993 1994
+3  1660 188 1110
+3  1996 1995 1993
+3  829 909 1977
+3  1954 1953 1329
+3  1327 1953 1954
+3  1272 1265 888
+3  286 420 1696
+3  879 878 829
+3  2003 1413 1412
+3  1413 1995 1177
+3  910 909 852
+3  911 910 96
+3  1997 880 879
+3  912 910 852
+3  914 830 882
+3  1983 1587 1104
+3  911 914 882
+3  851 1836 1838
+3  1838 1839 851
+3  835 836 869
+3  1839 1838 351
+3  351 1838 1835
+3  1331 2016 1332
+3  851 820 1836
+3  304 1919 1920
+3  697 1196 1371
+3  657 656 661
+3  1336 191 1334
+3  667 1336 1334
+3  1837 820 1136
+3  1136 349 1837
+3  1728 385 1729
+3  1799 1800 455
+3  1462 1800 1799
+3  1362 666 1363
+3  170 1099 796
+3  1088 1079 1087
+3  1210 395 1985
+3  1092 1961 300
+3  1131 1167 1166
+3  1944 225 1037
+3  2024 1922 1614
+3  1553 85 500
+3  1452 857 1453
+3  1601 609 923
+3  1508 1516 80
+3  1256 1089 61
+3  1077 1211 396
+3  858 1930 1929
+3  747 323 1345
+3  467 490 1452
+3  1449 466 1448
+3  1236 581 1235
+3  923 609 922
+3  922 575 923
+3  921 1421 1422
+3  257 1497 153
+3  257 153 791
+3  394 1243 1242
+3  1422 1318 574
+3  256 258 1497
+3  575 924 923
+3  14 609 939
+3  575 1201 924
+3  1241 1242 587
+3  932 1615 928
+3  1045 512 522
+3  2012 1915 599
+3  2012 599 2011
+3  1585 595 1181
+3  1181 590 1585
+3  1613 1924 1925
+3  410 23 1195
+3  1599 1665 925
+3  581 1237 1239
+3  1598 927 1610
+3  29 1610 1611
+3  1203 1204 618
+3  1202 1423 1425
+3  761 942 133
+3  1202 1424 1423
+3  1697 1343 100
+3  942 761 760
+3  922 609 14
+3  599 1594 2011
+3  599 1609 1594
+3  1573 1609 599
+3  1309 1067 103
+3  937 582 938
+3  939 583 940
+3  940 14 939
+3  935 213 1606
+3  1606 1607 935
+3  1928 1596 1595
+3  1595 1596 578
+3  1584 595 1585
+3  1619 1620 582
+3  941 1618 1616
+3  892 1709 1713
+3  1713 1714 892
+3  527 1303 1287
+3  589 590 943
+3  647 1124 119
+3  253 1387 1391
+3  946 586 945
+3  586 944 945
+3  1340 1339 1286
+3  1341 1339 1340
+3  1907 1007 1905
+3  1091 303 1090
+3  1092 303 1091
+3  1099 795 796
+3  204 1726 428
+3  1726 1725 372
+3  373 1725 7
+3  1353 1355 264
+3  1952 1951 263
+3  91 371 1966
+3  1920 1091 304
+3  1646 1645 1117
+3  1115 1645 1646
+3  1080 1079 1078
+3  1291 1290 1295
+3  1295 1292 1294
+3  1793 1448 1461
+3  442 117 1510
+3  447 1536 1813
+3  1547 445 1545
+3  1147 1144 2
+3  2004 166 2005
+3  1277 881 1662
+3  885 1277 1662
+3  1540 1810 1541
+3  1122 119 1123
+3  444 48 1547
+3  477 1449 1447
+3  1447 1449 1448
+3  1466 1455 1795
+3  190 1455 1466
+3  1685 1504 1503
+3  1255 1254 1376
+3  1042 758 815
+3  397 920 1207
+3  612 920 397
+3  814 555 17
+3  1738 1314 605
+3  511 1044 1046
+3  1531 1840 450
+3  1158 1157 553
+3  228 1731 1041
+3  224 1731 1732
+3  67 1025 1063
+3  1063 1025 1026
+3  941 1617 1628
+3  1600 923 924
+3  215 1118 1119
+3  1022 1025 67
+3  1402 255 161
+3  782 1643 1319
+3  224 1032 1039
+3  196 27 197
+3  453 1803 1812
+3  777 778 39
+3  777 780 778
+3  1320 158 1321
+3  1322 777 776
+3  151 792 973
+3  635 42 1127
+3  159 777 1322
+3  475 1268 1864
+3  1864 1267 475
+3  236 1382 1389
+3  43 545 1820
+3  1815 1814 46
+3  1463 1462 1461
+3  985 650 1990
+3  900 2022 1832
+3  556 224 1732
+3  1303 1302 723
+3  359 984 983
+3  134 1152 1305
+3  594 168 1673
+3  378 403 1019
+3  210 991 993
+3  1125 1770 637
+3  972 979 99
+3  1582 933 1580
+3  1256 1113 310
+3  1811 1540 1539
+3  1491 775 1492
+3  1941 230 1942
+3  261 660 1747
+3  1054 1056 1053
+3  1376 1328 1255
+3  741 740 1441
+3  1786 1787 1788
+3  160 813 779
+3  217 1116 1898
+3  525 1902 805
+3  220 1897 1896
+3  419 569 1724
+3  419 1724 568
+3  166 2004 1344
+3  665 1330 1329
+3  488 1060 1061
+3  538 182 806
+3  522 523 1050
+3  1060 75 1061
+3  817 508 818
+3  1731 224 1041
+3  514 758 1042
+3  1044 1043 1046
+3  1693 1694 953
+3  1810 79 1797
+3  691 958 537
+3  691 692 956
+3  1185 1365 1862
+3  693 956 692
+3  962 688 963
+3  319 1351 93
+3  331 746 961
+3  417 1689 1634
+3  92 1361 316
+3  332 965 684
+3  1766 107 1760
+3  963 690 106
+3  965 332 689
+3  328 1764 746
+3  1764 329 746
+3  966 1338 315
+3  315 1338 1337
+3  1354 266 1356
+3  300 968 967
+3  301 968 300
+3  1760 1759 333
+3  333 1759 1762
+3  686 1757 1758
+3  1758 1757 1765
+3  330 1765 1757
+3  964 688 1765
+3  965 1360 684
+3  1764 105 1763
+3  321 1366 1186
+3  1337 666 1336
+3  1350 320 1351
+3  318 1351 319
+3  1350 1351 318
+3  870 63 1139
+3  1820 545 198
+3  844 36 843
+3  1880 1879 1878
+3  357 1012 1244
+3  921 1420 1421
+3  822 837 838
+3  822 838 1835
+3  384 558 50
+3  1933 125 1934
+3  970 624 646
+3  1873 1872 641
+3  1511 117 480
+3  1519 1511 480
+3  1257 213 629
+3  1974 625 1863
+3  1887 1100 799
+3  973 149 974
+3  151 976 37
+3  974 148 976
+3  1979 1977 909
+3  1998 884 1992
+3  882 1976 1977
+3  1950 261 1747
+3  849 821 1134
+3  983 984 492
+3  982 422 99
+3  358 982 983
+3  983 982 981
+3  845 1245 1134
+3  1035 1743 215
+3  654 984 314
+3  986 361 988
+3  654 492 984
+3  986 979 972
+3  361 986 972
+3  360 987 651
+3  987 988 210
+3  1204 1205 618
+3  209 989 361
+3  209 362 989
+3  998 1001 364
+3  996 8 997
+3  991 367 993
+3  210 993 1014
+3  991 366 992
+3  1009 998 999
+3  8 996 995
+3  996 992 366
+3  1008 379 1010
+3  630 1915 2012
+3  1002 363 371
+3  383 89 365
+3  365 89 999
+3  1000 363 1001
+3  1000 1001 8
+3  98 363 1003
+3  558 208 426
+3  34 382 1004
+3  34 1005 1006
+3  1013 201 424
+3  424 201 425
+3  1015 378 1016
+3  1912 1008 1010
+3  358 1011 982
+3  89 1009 999
+3  70 378 1015
+3  376 1009 89
+3  651 987 1014
+3  382 651 1014
+3  382 993 1004
+3  1015 1016 379
+3  1029 391 392
+3  700 1889 701
+3  70 1015 1018
+3  70 1018 969
+3  1005 1031 368
+3  68 391 1029
+3  1913 1018 1008
+3  608 1027 1024
+3  2021 585 944
+3  380 1022 1021
+3  1958 664 302
+3  1025 1022 380
+3  1023 1024 69
+3  1908 1911 1006
+3  1006 1911 34
+3  1030 1028 1029
+3  392 393 1121
+3  1004 367 1005
+3  940 583 1243
+3  1207 1209 1208
+3  1037 1938 1939
+3  109 1033 1035
+3  222 1034 1033
+3  1841 670 1284
+3  2006 1341 2005
+3  387 1217 1216
+3  1213 1223 399
+3  231 1942 1899
+3  1211 127 1210
+3  916 573 1077
+3  1077 113 916
+3  919 113 920
+3  309 1082 1918
+3  1918 1919 309
+3  1841 1284 532
+3  542 1439 132
+3  1044 1045 1049
+3  131 753 1048
+3  509 1440 1439
+3  1440 758 1438
+3  1441 731 728
+3  1052 536 130
+3  511 1051 1052
+3  1051 1046 1047
+3  1616 1618 1923
+3  1613 1923 1924
+3  1053 512 1045
+3  513 1056 1054
+3  52 1055 648
+3  648 1055 647
+3  1855 1856 182
+3  1056 1057 538
+3  816 75 1058
+3  1048 1059 514
+3  536 1047 1060
+3  1062 1038 216
+3  508 819 539
+3  1063 586 946
+3  1026 586 1063
+3  1838 1836 1835
+3  232 1382 1383
+3  350 1808 860
+3  331 747 1345
+3  1458 1828 460
+3  1477 116 825
+3  1471 490 1470
+3  1466 1809 459
+3  459 1809 1457
+3  44 1463 466
+3  353 1454 857
+3  1793 1461 457
+3  189 1968 1967
+3  833 1474 903
+3  902 1469 1833
+3  1833 1469 1968
+3  908 883 1692
+3  1147 1687 515
+3  193 847 1395
+3  1114 1038 1641
+3  1123 1682 484
+3  1613 1922 1923
+3  1661 1535 1536
+3  1536 1537 1661
+3  1725 570 1727
+3  1858 920 1077
+3  396 1858 1077
+3  423 208 1728
+3  1643 781 159
+3  1641 1038 1062
+3  1880 1870 1879
+3  1536 1535 453
+3  1184 1861 1367
+3  1184 1367 1369
+3  561 755 1687
+3  1917 663 306
+3  953 1495 1695
+3  1064 1492 1065
+3  1064 1065 146
+3  1066 155 147
+3  1065 155 1066
+3  1563 1047 1058
+3  1298 103 1297
+3  402 947 1068
+3  1228 1068 400
+3  1228 400 1229
+3  1293 13 1292
+3  419 1988 569
+3  116 1070 1072
+3  1070 736 1072
+3  80 1076 415
+3  13 736 1071
+3  1295 1290 1292
+3  615 1074 1073
+3  1075 1074 616
+3  614 1075 616
+3  1074 1072 1073
+3  1515 415 1076
+3  1012 1078 201
+3  431 425 1088
+3  1245 845 1735
+3  310 1085 1084
+3  1035 215 1119
+3  1035 1119 1936
+3  1616 1922 579
+3  230 1036 1936
+3  1761 340 334
+3  306 1920 1919
+3  1089 1090 305
+3  431 1085 310
+3  1083 1084 1085
+3  431 19 1085
+3  1094 57 1095
+3  717 1352 718
+3  1918 306 1919
+3  60 1091 1920
+3  419 1182 534
+3  688 1688 1765
+3  1763 1761 333
+3  431 1087 19
+3  304 1089 1086
+3  1436 1437 1093
+3  303 1437 1436
+3  1090 1095 305
+3  1089 305 61
+3  1092 300 1093
+3  1092 1093 1437
+3  1321 142 1341
+3  303 1095 1090
+3  1099 793 795
+3  1100 593 594
+3  1093 300 1097
+3  1671 1672 798
+3  1095 57 316
+3  303 1094 1095
+3  1096 315 1337
+3  966 1328 1956
+3  1972 1128 1126
+3  1675 975 1674
+3  591 1180 1181
+3  590 1181 1180
+3  590 1180 65
+3  1587 5 1104
+3  636 593 1105
+3  1211 1210 1984
+3  1982 1104 1981
+3  1722 1716 832
+3  1112 152 787
+3  1609 929 2008
+3  2008 1594 1609
+3  1113 61 322
+3  433 1113 322
+3  2005 1341 1340
+3  310 1113 433
+3  1193 1187 1847
+3  218 1648 1344
+3  1649 240 263
+3  393 587 1121
+3  746 1742 961
+3  1776 1408 669
+3  669 1408 1407
+3  485 506 1775
+3  639 635 1127
+3  1131 971 1167
+3  141 971 1131
+3  630 2012 1257
+3  1163 641 1162
+3  1867 1129 1874
+3  1867 1872 640
+3  1167 1169 1168
+3  1171 970 137
+3  1523 1520 497
+3  1523 497 1499
+3  971 1169 1167
+3  1131 1130 141
+3  1482 1483 146
+3  971 1170 1169
+3  1165 139 143
+3  1882 167 1870
+3  970 1133 624
+3  1510 117 1511
+3  572 1686 94
+3  498 1523 1499
+3  1326 1733 844
+3  1331 1332 191
+3  1138 865 349
+3  437 64 1140
+3  821 1139 1137
+3  821 1137 1136
+3  1420 14 1238
+3  1248 56 1250
+3  56 1248 1247
+3  24 440 1818
+3  495 1821 496
+3  1747 124 262
+3  1964 384 1963
+3  1975 623 30
+3  1142 624 1133
+3  1145 518 526
+3  1144 1146 1145
+3  517 1146 1144
+3  1120 1156 769
+3  1783 765 1782
+3  174 787 1156
+3  1284 1283 134
+3  1151 1149 1148
+3  1148 1149 561
+3  1154 1145 526
+3  1151 529 1149
+3  1152 529 1151
+3  1155 528 1153
+3  1309 532 1308
+3  533 1067 1308
+3  1301 533 1302
+3  1719 1720 832
+3  1717 886 1418
+3  1660 1111 1657
+3  1747 660 124
+3  1719 894 1711
+3  1702 1723 906
+3  1706 1702 906
+3  1659 1658 1141
+3  1744 1658 1659
+3  261 1357 1358
+3  719 1952 263
+3  641 1159 1160
+3  1482 1161 1483
+3  146 1483 1064
+3  1066 1163 146
+3  1163 1162 146
+3  1164 143 1174
+3  1613 1925 1927
+3  1126 625 1973
+3  1485 1164 1486
+3  1159 1166 1160
+3  169 635 639
+3  1170 971 1173
+3  1172 645 138
+3  1325 953 1694
+3  196 1176 195
+3  1180 1179 592
+3  66 1101 1100
+3  1178 1102 1179
+3  592 1179 1102
+3  560 211 1406
+3  630 1257 629
+3  926 925 1608
+3  1647 1116 1646
+3  1647 1646 1117
+3  530 1283 1281
+3  23 1191 1850
+3  695 1373 1375
+3  1376 1737 296
+3  1345 323 1346
+3  762 521 763
+3  758 757 1438
+3  1279 530 1281
+3  1698 21 674
+3  1346 748 1345
+3  1348 1183 320
+3  1372 1371 324
+3  320 1368 1351
+3  1734 1733 1326
+3  1576 596 1575
+3  1575 596 1580
+3  1850 1195 23
+3  1186 1845 1846
+3  928 1592 1591
+3  1635 1271 1784
+3  1845 1185 1851
+3  325 1196 697
+3  1193 1846 1848
+3  1847 1846 1193
+3  1369 1370 1184
+3  1633 104 1281
+3  1843 1844 1851
+3  134 1285 1152
+3  1152 1285 529
+3  412 1192 23
+3  23 1192 1191
+3  427 428 50
+3  325 1197 1196
+3  1201 618 1199
+3  619 1426 576
+3  1200 1199 618
+3  1200 577 1199
+3  924 577 925
+3  1636 1101 66
+3  1636 66 1637
+3  921 922 1420
+3  1201 1203 618
+3  931 1604 1603
+3  494 1889 495
+3  937 936 1627
+3  1205 1204 31
+3  627 617 1206
+3  1206 620 627
+3  2016 2015 841
+3  1314 604 1315
+3  52 1739 1055
+3  1926 1927 1925
+3  1620 1619 941
+3  1422 1421 915
+3  381 2018 2017
+3  13 1293 735
+3  1480 1479 825
+3  387 1216 1215
+3  1228 402 1068
+3  1981 1104 1103
+3  1221 16 377
+3  89 1221 377
+3  399 1223 1222
+3  383 365 388
+3  383 388 1226
+3  1230 402 1227
+3  399 1222 1229
+3  1215 1231 387
+3  1215 1233 1231
+3  587 393 1241
+3  387 1231 1232
+3  1215 114 1233
+3  1241 393 1240
+3  113 918 917
+3  1211 573 1234
+3  1077 573 1211
+3  247 1566 1565
+3  1237 14 940
+3  940 394 1239
+3  1239 1237 940
+3  1626 930 1618
+3  576 918 610
+3  917 918 576
+3  31 1204 619
+3  43 1820 1824
+3  356 1934 1935
+3  1795 1456 1809
+3  1820 1821 1824
+3  1819 198 1816
+3  1819 199 1820
+3  965 964 1360
+3  1245 848 1246
+3  1252 705 493
+3  1247 1248 1249
+3  1249 1248 870
+3  298 1248 1251
+3  708 707 54
+3  707 706 54
+3  1253 56 1254
+3  1254 56 848
+3  295 1253 1254
+3  1338 1955 666
+3  1337 1338 666
+3  1665 1663 1600
+3  528 1152 1151
+3  1306 528 1155
+3  1307 134 1305
+3  533 1305 1304
+3  1285 134 1283
+3  765 530 1278
+3  83 1753 1752
+3  753 1050 523
+3  810 737 135
+3  1303 723 724
+3  1300 418 1262
+3  418 1300 1299
+3  374 416 1262
+3  153 1313 791
+3  374 1262 1312
+3  1109 1746 1108
+3  888 1265 1267
+3  1272 887 1264
+3  475 1269 1268
+3  1268 1269 826
+3  1271 1270 1269
+3  1273 1274 474
+3  1791 1557 1792
+3  1792 1554 1791
+3  826 1274 1865
+3  529 1783 1782
+3  1275 881 1274
+3  1416 1998 1999
+3  1789 1555 339
+3  765 1278 762
+3  762 1278 521
+3  764 1280 412
+3  521 1280 764
+3  1284 670 531
+3  529 1285 1783
+3  1911 824 34
+3  798 1667 1668
+3  1674 1667 798
+3  1906 1912 1010
+3  603 553 606
+3  1236 1237 581
+3  1679 797 553
+3  1639 601 1640
+3  1638 601 1639
+3  1102 1639 592
+3  1639 1102 1637
+3  1362 191 1336
+3  1668 1670 798
+3  1433 86 262
+3  1986 1689 1260
+3  1986 1260 1989
+3  1434 250 26
+3  1681 150 1667
+3  1682 1684 1683
+3  1750 684 1360
+3  333 1761 1760
+3  1914 600 632
+3  632 631 1914
+3  913 1412 1177
+3  263 1951 1948
+3  1344 1319 166
+3  197 221 1430
+3  1290 1289 725
+3  102 726 1288
+3  1070 1071 736
+3  13 1294 1292
+3  1300 417 671
+3  613 32 1480
+3  1291 1295 952
+3  726 735 1293
+3  1299 671 103
+3  1261 1300 1262
+3  403 1654 391
+3  1302 1304 723
+3  1607 1605 926
+3  935 577 1200
+3  1608 577 935
+3  1302 533 1304
+3  723 1306 1155
+3  1152 528 1305
+3  1306 1305 528
+3  1304 1305 1306
+3  1298 1299 103
+3  1310 1299 1298
+3  950 1310 1298
+3  950 949 1311
+3  950 1311 1310
+3  791 1313 790
+3  790 1313 242
+3  525 678 1902
+3  1314 1315 605
+3  607 1024 605
+3  605 1315 607
+3  981 982 99
+3  1237 1236 1238
+3  1935 1934 355
+3  985 1990 649
+3  1970 1990 211
+3  1989 1258 1986
+3  1781 1780 1588
+3  142 1324 1325
+3  574 1318 916
+3  1318 1317 916
+3  619 1203 1202
+3  1425 619 1202
+3  1320 166 1319
+3  1592 1595 2007
+3  1320 1322 158
+3  196 1431 1176
+3  1321 1323 142
+3  1428 1286 1429
+3  100 1428 1429
+3  1021 1023 69
+3  1326 1736 1734
+3  666 1329 1363
+3  1955 1329 666
+3  1254 848 1737
+3  1328 966 58
+3  2016 841 1332
+3  1328 1957 1956
+3  1738 1023 1022
+3  1334 1333 572
+3  1334 572 668
+3  667 1334 668
+3  1329 1330 1363
+3  667 1337 1336
+3  1096 1337 667
+3  2006 1321 1341
+3  1344 782 1319
+3  1391 237 238
+3  1861 1364 1862
+3  1364 1843 1862
+3  1349 1346 1348
+3  748 1346 1349
+3  1905 1007 1906
+3  718 1352 264
+3  1359 293 1354
+3  1357 1355 1358
+3  129 1359 1354
+3  686 1758 1759
+3  1759 1758 1762
+3  1358 59 660
+3  351 1381 1380
+3  305 316 1361
+3  1361 61 305
+3  322 61 1361
+3  1655 801 677
+3  1057 513 1855
+3  321 319 1366
+3  1366 319 93
+3  1855 679 1856
+3  93 1365 1366
+3  1373 324 1375
+3  320 1183 1368
+3  1370 324 1371
+3  1371 1184 1370
+3  1373 695 696
+3  1375 1374 694
+3  695 1375 694
+3  843 1379 1378
+3  1380 839 840
+3  2015 2016 352
+3  839 192 840
+3  1400 846 839
+3  1382 232 233
+3  233 165 1382
+3  236 1384 1382
+3  164 1383 1384
+3  1383 277 562
+3  1 1386 1387
+3  236 1389 1388
+3  1 1387 253
+3  1388 1389 237
+3  237 1390 238
+3  1387 237 1391
+3  571 234 1394
+3  1394 235 571
+3  836 835 1401
+3  836 1396 837
+3  1397 346 1398
+3  838 1398 1399
+3  1399 1398 346
+3  193 1401 875
+3  1396 1401 193
+3  836 1401 1396
+3  835 875 1401
+3  949 948 1405
+3  1403 373 416
+3  374 1403 416
+3  365 1404 559
+3  365 91 1404
+3  90 1405 948
+3  1894 1892 750
+3  1355 1951 264
+3  888 1267 1864
+3  1122 1407 501
+3  1409 499 1860
+3  1530 1543 1529
+3  1529 450 1530
+3  1804 1806 1805
+3  485 1775 1777
+3  1550 1549 1507
+3  483 1410 118
+3  1860 501 1409
+3  503 500 85
+3  1419 892 472
+3  1995 1413 1993
+3  922 14 1420
+3  1318 1422 915
+3  921 1423 1424
+3  922 1424 575
+3  1426 619 1425
+3  1426 1425 574
+3  917 1426 574
+3  1427 273 51
+3  286 1427 51
+3  144 1286 1325
+3  1430 1431 196
+3  1434 1433 262
+3  1746 473 1108
+3  1449 477 1468
+3  1446 478 1445
+3  467 1443 1467
+3  1448 190 1447
+3  855 1475 96
+3  1475 883 96
+3  458 1454 353
+3  1455 190 1448
+3  1474 1470 1469
+3  452 1538 1530
+3  370 1909 1908
+3  1460 459 1458
+3  1448 466 1461
+3  722 1464 1459
+3  1542 722 1459
+3  1539 1540 453
+3  1460 1466 459
+3  1460 1446 1466
+3  456 458 1806
+3  1797 1541 1810
+3  1472 856 354
+3  613 1480 614
+3  1707 1708 831
+3  1481 1479 1480
+3  1481 399 1479
+3  1213 399 1481
+3  2021 944 586
+3  1561 581 1560
+3  1561 1234 1235
+3  1603 1605 931
+3  701 1889 494
+3  1971 897 2022
+3  2022 470 1971
+3  1611 927 1612
+3  2020 586 1026
+3  587 1625 6
+3  389 395 1853
+3  981 99 1769
+3  35 1630 589
+3  1622 35 1623
+3  1640 604 946
+3  946 592 1640
+3  582 937 1627
+3  588 1498 1630
+3  1315 9 607
+3  589 1498 1586
+3  786 155 1493
+3  1492 1064 1491
+3  1493 155 1065
+3  1490 1495 775
+3  596 1581 1580
+3  1615 1589 934
+3  127 393 1853
+3  1795 1455 1794
+3  582 1620 1621
+3  1604 578 1603
+3  928 1926 1928
+3  1607 1606 1605
+3  933 1582 1498
+3  937 609 1601
+3  1601 936 937
+3  699 1889 700
+3  2011 1594 2010
+3  1605 1606 931
+3  590 1586 1585
+3  152 1569 789
+3  933 934 1589
+3  1501 1514 1500
+3  1495 1324 1496
+3  1160 145 1485
+3  2017 2018 1026
+3  1581 1582 1580
+3  1378 1379 2015
+3  1162 1484 1482
+3  1486 1164 1488
+3  1488 1487 1486
+3  1487 1488 140
+3  1486 1161 1485
+3  1623 35 1624
+3  2018 2019 2020
+3  2020 2019 6
+3  1602 578 1596
+3  582 1627 1619
+3  1210 127 395
+3  926 1603 1602
+3  1597 926 1602
+3  1030 1025 380
+3  220 1697 221
+3  1607 1608 935
+3  611 175 610
+3  925 577 1608
+3  622 623 214
+3  621 622 620
+3  1889 43 495
+3  587 584 1625
+3  1205 1206 617
+3  1209 1985 114
+3  1984 1985 1209
+3  1519 498 1511
+3  1561 1560 1240
+3  52 679 1739
+3  1906 1027 1905
+3  1164 1174 1488
+3  1915 630 1914
+3  1486 1487 1161
+3  1914 631 1915
+3  2013 2007 929
+3  1579 599 1915
+3  1484 1485 1161
+3  1168 1485 145
+3  1164 1485 1168
+3  1491 1489 1490
+3  144 1325 1694
+3  775 1496 1494
+3  1487 1483 1161
+3  1490 775 1491
+3  953 1324 1495
+3  1493 785 786
+3  1494 1323 774
+3  785 1493 0
+3  1493 1492 0
+3  1494 1492 775
+3  1323 1496 1324
+3  1494 1496 1323
+3  1504 498 1503
+3  502 1500 481
+3  502 1501 1500
+3  1686 341 94
+3  98 1003 1729
+3  1509 48 442
+3  1076 1512 1513
+3  1509 476 1506
+3  1506 476 1551
+3  1910 551 1909
+3  444 1545 446
+3  1532 1528 1507
+3  1507 1549 1532
+3  1553 500 481
+3  481 1527 1553
+3  1505 1518 1512
+3  449 1505 1512
+3  1519 480 1520
+3  1510 476 1509
+3  1525 1521 118
+3  1517 1502 415
+3  1516 1512 1076
+3  449 1512 1516
+3  441 440 76
+3  1510 1509 442
+3  1519 1520 1523
+3  498 1519 1523
+3  1525 118 1526
+3  1410 1411 118
+3  479 482 1522
+3  1524 1511 498
+3  1504 1524 498
+3  497 1520 1525
+3  1860 499 1859
+3  499 1527 1526
+3  1526 1411 499
+3  1686 572 1333
+3  1534 452 1533
+3  1533 452 1530
+3  954 1531 451
+3  448 1531 954
+3  1465 448 954
+3  1662 337 880
+3  1885 722 1884
+3  1543 1544 1529
+3  1146 518 1145
+3  1804 200 1802
+3  484 1772 1407
+3  75 1060 1563
+3  1801 1462 1799
+3  1047 1563 1060
+3  1532 1549 449
+3  446 1545 78
+3  1547 48 1548
+3  1547 1548 445
+3  449 1550 1505
+3  449 1549 1550
+3  499 1553 1527
+3  683 1558 344
+3  1749 330 1757
+3  1557 107 1555
+3  1561 1235 581
+3  1794 1796 1795
+3  1488 1174 140
+3  1562 1542 1459
+3  1829 189 1442
+3  1474 902 903
+3  1593 2009 2008
+3  471 1834 1832
+3  86 1432 1567
+3  594 1671 1100
+3  1567 248 1566
+3  1854 1509 1506
+3  932 1589 1615
+3  1615 1614 928
+3  1923 1922 1616
+3  1566 247 1567
+3  246 1565 1569
+3  1638 1888 800
+3  1603 578 1602
+3  934 579 1615
+3  1596 927 1597
+3  1926 1925 1612
+3  45 199 1823
+3  1571 247 1565
+3  1571 1565 246
+3  1595 1592 928
+3  1593 578 1604
+3  1574 1576 1575
+3  1586 580 1585
+3  1574 598 1576
+3  1581 595 1584
+3  597 1578 638
+3  597 636 1577
+3  631 598 1579
+3  1769 979 980
+3  1577 1583 596
+3  1498 580 1586
+3  1584 580 1582
+3  1581 1584 1582
+3  590 589 1586
+3  1769 99 979
+3  580 1584 1585
+3  1590 932 1591
+3  1591 41 1590
+3  1589 1779 1780
+3  344 1790 1657
+3  1575 1588 41
+3  1780 1779 1588
+3  2010 1604 931
+3  1613 1927 1614
+3  841 2015 192
+3  192 2015 840
+3  599 1579 1573
+3  1597 1598 925
+3  1606 213 1257
+3  582 1621 938
+3  1603 926 1605
+3  931 1606 1257
+3  1600 924 1665
+3  1601 923 1600
+3  1602 1596 1597
+3  931 2011 2010
+3  1257 2011 931
+3  2009 1594 2008
+3  1608 1607 926
+3  1664 936 1601
+3  1928 927 1596
+3  936 29 1611
+3  1926 927 1928
+3  1619 1626 1618
+3  352 1378 2015
+3  1379 840 2015
+3  588 1617 934
+3  1628 1629 1620
+3  1617 588 1628
+3  1628 588 1629
+3  941 1616 1617
+3  1617 1616 579
+3  1617 579 934
+3  1621 1629 1630
+3  1621 35 1622
+3  938 1621 1622
+3  1621 1630 35
+3  583 938 1622
+3  1620 1629 1621
+3  1623 584 1243
+3  534 1632 1631
+3  670 1634 1631
+3  1631 1632 670
+3  670 1632 531
+3  1118 1842 217
+3  1633 531 1632
+3  1632 534 1633
+3  1182 1633 534
+3  1182 104 1633
+3  1908 1909 1911
+3  1790 1787 1657
+3  1309 671 1841
+3  1638 66 1888
+3  1887 66 1100
+3  1888 1886 800
+3  1639 1640 592
+3  1657 1111 344
+3  1537 1771 1661
+3  452 1661 1771
+3  218 1647 1648
+3  1648 782 1344
+3  1652 1651 88
+3  241 1651 1652
+3  240 1649 1651
+3  88 246 1652
+3  1653 242 1313
+3  241 1652 1653
+3  1587 1983 595
+3  342 340 341
+3  1859 499 1411
+3  1676 602 800
+3  1859 1411 1410
+3  1855 513 679
+3  1659 1267 1266
+3  475 1267 1659
+3  1745 188 1744
+3  1744 188 1658
+3  468 1111 1660
+3  1110 468 1660
+3  1767 488 1124
+3  29 936 1664
+3  975 1666 1667
+3  1682 1683 535
+3  1569 1570 789
+3  1671 798 1670
+3  975 1667 1674
+3  167 15 1673
+3  452 1535 1661
+3  1676 800 1669
+3  974 975 1675
+3  1680 603 606
+3  1681 1667 1666
+3  1666 794 1681
+3  1681 794 1678
+3  488 1061 1683
+3  1683 1061 535
+3  1505 1685 1518
+3  1505 1504 1685
+3  343 341 1686
+3  1141 1787 1786
+3  1687 755 1916
+3  569 567 1724
+3  833 1690 1473
+3  1691 491 1473
+3  1690 1691 1473
+3  893 1714 1715
+3  1691 1692 491
+3  891 1692 1691
+3  891 908 1692
+3  158 773 1704
+3  1456 1796 1797
+3  1885 1535 452
+3  1535 1885 1884
+3  1007 1907 1006
+3  1906 1007 1912
+3  221 1697 100
+3  674 1700 1699
+3  1723 891 1690
+3  1700 1701 1699
+3  1699 1701 226
+3  1414 1703 890
+3  1711 1707 895
+3  906 1723 1690
+3  1070 1069 1705
+3  1705 1071 1070
+3  1706 906 1707
+3  1709 831 1708
+3  896 1712 471
+3  1710 1703 1702
+3  895 1707 906
+3  1712 1711 895
+3  1708 1711 894
+3  894 1719 1718
+3  891 1723 1702
+3  894 1713 1708
+3  1712 895 471
+3  1713 1709 1708
+3  1724 206 568
+3  1716 1715 832
+3  1714 894 1718
+3  1721 896 471
+3  893 1418 472
+3  1717 1418 893
+3  1715 1717 893
+3  1831 1833 1830
+3  1721 898 1720
+3  1712 1719 1711
+3  1718 1719 832
+3  898 1721 897
+3  1020 1010 379
+3  373 372 1725
+3  384 1964 385
+3  548 649 1970
+3  1023 605 1024
+3  1738 605 1023
+3  281 279 177
+3  281 177 285
+3  10 278 281
+3  105 1761 1763
+3  328 105 1764
+3  1743 1035 1033
+3  1924 930 1612
+3  1659 1266 1745
+3  1659 1745 1744
+3  1749 1748 685
+3  1750 1749 685
+3  1750 1360 1749
+3  1752 1753 465
+3  186 1755 463
+3  464 465 1753
+3  1555 107 1766
+3  1754 1755 464
+3  464 1755 1756
+3  1763 1762 687
+3  536 1767 130
+3  1688 687 1765
+3  334 1766 1760
+3  1556 1766 334
+3  333 1762 1763
+3  687 1758 1765
+3  1767 1124 647
+3  647 130 1767
+3  1982 591 1181
+3  1538 1771 1537
+3  1649 263 1948
+3  1775 506 1774
+3  1776 506 503
+3  85 1776 503
+3  669 1773 1774
+3  1777 508 539
+3  1590 1779 932
+3  1787 1141 1657
+3  1789 1635 1788
+3  1141 1786 1784
+3  1141 1784 1785
+3  1554 1788 1787
+3  1789 1788 1554
+3  1790 1554 1787
+3  1792 1557 1555
+3  1792 1555 1789
+3  1554 1792 1789
+3  1799 455 1541
+3  1541 455 1540
+3  1796 1794 457
+3  1462 456 1800
+3  1803 455 1802
+3  1813 1812 454
+3  1812 1803 454
+3  1802 1800 1804
+3  456 1804 1800
+3  1804 1805 200
+3  45 350 496
+3  1813 1814 447
+3  1816 1815 46
+3  1813 454 1814
+3  199 45 1821
+3  447 1815 446
+3  447 1814 1815
+3  198 545 1818
+3  1818 545 24
+3  1818 440 77
+3  200 1822 454
+3  199 1819 1822
+3  43 1824 495
+3  1825 1456 1797
+3  1826 1827 1457
+3  1967 1968 1467
+3  1830 1829 901
+3  1467 1968 1469
+3  900 1831 1830
+3  1833 189 1830
+3  1836 1837 822
+3  820 1837 1836
+3  822 1837 823
+3  349 823 1837
+3  838 1381 1835
+3  1381 351 1835
+3  843 1839 1379
+3  1380 1839 351
+3  1379 1839 1380
+3  843 851 1839
+3  1115 1842 1114
+3  1848 207 1195
+3  1848 1195 1849
+3  1193 1848 1849
+3  1863 628 214
+3  1198 1844 1197
+3  1198 207 1844
+3  1198 1195 207
+3  560 549 1970
+3  1970 211 560
+3  1970 549 548
+3  1987 1258 1988
+3  2009 1604 2010
+3  2010 1594 2009
+3  1856 677 1857
+3  1855 182 1057
+3  978 1974 1975
+3  1975 624 978
+3  826 1865 1268
+3  1268 1865 1864
+3  1673 1871 167
+3  1869 169 639
+3  1877 1869 639
+3  1870 167 1871
+3  1879 1870 169
+3  1876 626 1868
+3  1873 641 1163
+3  1877 1868 640
+3  1878 640 1873
+3  1869 1879 169
+3  1879 1869 1878
+3  1883 977 167
+3  147 1881 1066
+3  1881 1883 1882
+3  147 1883 1881
+3  62 1881 1880
+3  1883 147 148
+3  167 1882 1883
+3  1905 1027 370
+3  1886 799 1670
+3  1886 1670 1669
+3  800 1886 1669
+3  1886 1887 799
+3  699 43 1889
+3  1890 749 1891
+3  1890 1891 750
+3  1893 173 1892
+3  751 1893 1892
+3  111 1942 1943
+3  220 1896 1895
+3  219 1898 1116
+3  1900 231 1899
+3  1896 1899 111
+3  1901 1900 675
+3  370 1908 1907
+3  1908 1006 1907
+3  1909 824 1911
+3  1958 60 664
+3  1007 1913 1912
+3  630 600 1914
+3  2012 2011 1257
+3  1579 1915 631
+3  230 1936 1119
+3  1921 355 657
+3  123 1921 657
+3  1921 123 1917
+3  1921 1917 311
+3  928 1928 1595
+3  1932 492 654
+3  125 1932 654
+3  1244 1932 357
+3  492 1932 1244
+3  1080 1933 356
+3  1932 1933 357
+3  125 1933 1932
+3  1036 1938 1937
+3  1938 1037 1040
+3  1037 1939 1940
+3  1938 1040 109
+3  231 1939 1941
+3  111 1943 1898
+3  1942 230 1943
+3  1945 1944 21
+3  1650 1948 259
+3  1949 128 1950
+3  1956 1957 1327
+3  1338 966 1955
+3  1376 1957 1328
+3  1329 1955 1954
+3  1956 1327 1954
+3  1958 1961 60
+3  301 1960 1962
+3  301 1962 968
+3  1962 299 968
+3  1963 1726 372
+3  384 1726 1963
+3  1967 1443 1442
+3  1729 1964 98
+3  189 1967 1442
+3  372 1966 1965
+3  1194 1191 1969
+3  1190 1194 1969
+3  1443 1967 1467
+3  470 904 1971
+3  1972 978 1128
+3  1979 911 882
+3  1979 882 1977
+3  1979 910 911
+3  1232 389 1980
+3  390 1232 1980
+3  1853 126 1980
+3  1980 389 1853
+3  1981 1178 591
+3  595 1983 1181
+3  591 1982 1981
+3  1984 1210 1985
+3  395 1233 1985
+3  1985 1233 114
+3  1970 649 1990
+3  419 1259 1987
+3  1406 1991 651
+3  650 651 1991
+3  1990 650 1991
+3  1978 830 1997
+3  1413 1992 1993
+3  2000 1998 1416
+3  2002 880 1994
+3  2002 1994 2001
+3  1994 880 1997
+3  2002 1417 1662
+3  1415 2003 889
+3  2000 884 1998
+3  1998 1992 1415
+3  2000 1417 2001
+3  1992 1413 2003
+3  1415 1992 2003
+3  2004 1340 1428
+3  1342 2004 1428
+3  166 2006 2005
+3  166 1320 2006
+3  2007 1593 2008
+3  2007 2008 929
+3  1592 2013 1591
+3  1592 2007 2013
+3  41 1591 2014
+3  2014 1591 2013
+3  929 2014 2013
+3  2014 929 1609
+3  2014 1609 1573
+3  2017 1026 1025
+3  381 1029 2019
+3  2020 2021 586
+
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby_3cc.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby_3cc.off
new file mode 100644
index 0000000..7f3178f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/blobby_3cc.off
@@ -0,0 +1,5241 @@
+OFF
+1820 3417 0
+
+0.0958494 0.00115985 -0.166522
+-0.0890262 -0.0253551 -0.184829
+0.027537 -0.144185 0.125459
+-0.0957876 -0.130678 0.145836
+-0.2052 0.0911582 -0.0713736
+0.23334 0.157643 -0.0790664
+0.23333 0.183679 0.0314829
+0.0116254 0.0348884 0.195738
+0.0616047 0.162666 0.15098
+0.131725 0.211075 -0.0224619
+-0.15771 -0.0621695 -0.114255
+-0.258277 -9.96328e-005 -0.066962
+0.134113 -0.042284 0.121878
+0.302143 0.124693 0.0295703
+0.133766 0.130061 -0.0945151
+0.183739 0.124065 0.130482
+-0.0399734 -0.0945666 -0.188625
+-0.394842 0.0627338 0.00536269
+-0.137998 0.173848 0.0967775
+-0.0392952 -0.165982 -0.115822
+-0.171824 -0.176912 -0.00865227
+-0.150346 -0.0322864 0.1629
+-0.219923 -0.105035 -0.044157
+-0.172879 0.0784669 0.134243
+0.0794101 -0.0895981 -0.0472013
+-0.313698 0.0380774 0.094855
+0.318547 0.125087 -0.0198694
+0.23227 0.0225103 -0.0218715
+0.288602 0.0623503 -0.00286261
+0.232539 0.0337645 0.0884656
+-0.257774 -0.0579123 0.114719
+0.0563849 0.229622 0.0738682
+0.278436 0.167832 -0.00539504
+0.0853491 0.0667002 -0.136862
+0.0238762 -0.124001 -0.17752
+0.0259901 -0.039927 -0.194952
+-0.105554 0.0704281 -0.157699
+0.289374 0.136378 -0.0715411
+0.235568 0.0765716 -0.0823253
+-0.245592 -0.0554978 -0.0581248
+-0.391169 -0.0634443 -0.086141
+-0.294197 -0.111617 -0.0494176
+-0.374549 0.0271624 -0.0883772
+-0.253729 -0.173014 -0.0128907
+-0.21636 -0.14897 0.0823854
+-0.134132 -0.136482 -0.0757672
+-0.0682104 -0.196549 -0.0186103
+-0.217265 0.0367722 -0.0761751
+-0.162115 0.056706 -0.114965
+-0.259921 0.0739938 -0.0650284
+-0.263827 0.132437 0.0345987
+-0.244668 0.134276 -0.0327609
+-0.147003 0.169249 -0.0355379
+-0.200611 0.169171 0.0171526
+-0.204369 0.131258 0.0856347
+0.161721 0.0518293 -0.109485
+-0.303072 0.0361583 -0.0731545
+-0.179865 -0.0862429 -0.0728761
+0.226968 0.189503 -0.0282298
+0.173201 0.184456 -0.067608
+0.182543 0.205347 0.00852821
+0.175562 0.186628 0.0841909
+0.125387 0.218763 0.0470426
+0.111015 0.194442 0.111774
+-0.17503 -0.129411 -0.0459342
+0.171469 -0.0162885 0.0309691
+0.0620033 -0.1101 0.0438386
+-0.091978 -0.221835 0.0852608
+-0.213686 -0.148588 -0.0242963
+-0.255516 -0.132659 -0.0348916
+-0.299158 -0.157094 -0.0280815
+-0.371903 -0.129233 -0.0453233
+-0.289351 -0.156961 0.0265973
+-0.271491 -0.114067 0.0733012
+-0.319216 -0.0636803 0.0818392
+-0.418849 -0.0484997 0.0253466
+-0.24013 -0.181604 0.0419435
+-0.168769 -0.211101 0.0641759
+0.0310134 0.152072 -0.11733
+-0.0477668 0.131896 -0.143761
+0.122424 0.139982 0.145627
+0.137703 0.0451028 0.167145
+0.0708263 0.0877104 0.177143
+-0.258701 0.0840235 0.0876754
+-0.245925 0.0201307 0.137908
+-0.480337 -0.0353406 -0.045931
+-0.442794 0.0105823 -0.100726
+0.0754016 0.224229 0.00641394
+0.00534235 0.12164 0.175352
+0.072181 -0.109688 -0.12035
+0.119341 -0.0534773 0.0565959
+0.0867885 -0.090323 0.105552
+0.0632331 -0.04399 0.184927
+-0.416327 0.0142746 0.0438039
+-0.455557 0.0276546 -0.0170243
+-0.0323993 -0.150381 -0.162142
+-0.0970416 -0.12747 -0.137748
+0.0150389 -0.155421 -0.130476
+0.0394782 -0.13985 -0.0691441
+0.278587 0.072168 0.0614076
+0.240141 0.0960435 0.10983
+0.196467 0.0560711 0.139083
+0.182764 -0.000831763 0.111317
+-0.21378 -0.185125 -0.000724208
+-0.182684 -0.206575 0.0223814
+-0.116864 -0.211741 0.0233662
+0.128798 -0.0476846 -0.0709653
+-0.151224 -0.159278 0.110503
+-0.186717 -0.0912332 0.126278
+-0.136046 0.197824 0.0292673
+-0.0799701 0.202495 -0.0219019
+-0.0908148 0.214911 0.0746841
+0.221852 0.150137 0.0928415
+0.268648 0.127162 0.0737685
+-0.100355 0.157268 -0.0946836
+-0.151142 0.117293 -0.0953014
+-0.0598251 -0.213443 0.0369284
+-0.0758939 -0.184077 0.128448
+0.0178807 -0.0969897 0.176592
+0.0474164 -0.125379 -0.0118837
+0.137437 -0.0346598 0.0136343
+0.177953 -0.0103553 -0.035624
+0.139109 -0.0349729 -0.0347612
+0.158771 -0.024122 -0.0659726
+0.141486 -0.020496 -0.127385
+0.197282 0.0147799 -0.0836013
+0.0989259 -0.0612015 -0.152448
+0.146216 -0.0331176 -0.0962158
+0.115695 -0.0620378 -0.111119
+0.168295 -0.00144778 -0.105241
+0.143284 0.0207434 -0.129543
+0.123336 0.0565421 -0.124097
+0.107295 0.0970325 -0.111084
+0.0830278 0.144804 -0.105192
+0.116715 0.182192 -0.0775793
+0.0649378 0.108018 -0.128027
+-0.0439072 0.0766944 -0.178622
+0.0437013 0.0767872 -0.155644
+0.102639 0.0339353 -0.147441
+0.0664848 0.0308188 -0.168122
+0.0352888 -0.0823282 -0.186738
+-0.00514964 -0.0699335 -0.195786
+-0.0296251 -0.0133509 -0.196151
+-0.0434445 -0.0528929 -0.192773
+-0.0872762 -0.076468 -0.180079
+-0.129147 -0.0500857 -0.158465
+-0.129284 0.0124896 -0.155284
+0.147444 0.0903834 -0.0996231
+0.188674 0.125502 -0.0870381
+0.190514 0.0814446 -0.0929528
+0.0543565 0.190818 -0.0744677
+-0.0676336 0.0264182 -0.185549
+-0.0166393 0.031641 -0.195381
+-0.001435 0.0694683 -0.181212
+0.248561 0.0317378 0.0328905
+-0.128762 -0.0922393 -0.136755
+-0.1478 -0.10176 -0.0985596
+-0.183769 0.000809428 -0.0981379
+-0.142413 -0.159393 -0.0379004
+-0.0934853 -0.171508 -0.0612999
+-0.039723 -0.182589 -0.0634592
+-0.130894 -0.187892 -0.00872955
+-0.000937363 -0.169029 -0.0876581
+-0.394642 -0.0954812 -0.00194395
+-0.440674 -0.0692916 -0.0230396
+-0.458899 -0.0268371 0.000520617
+-0.449781 -0.0715781 -0.0816362
+-0.416087 -0.102536 -0.0556142
+-0.359557 0.0973339 -0.0246998
+-0.408598 0.0712299 -0.0566547
+0.210226 0.0065473 0.0528917
+0.10443 -0.0645713 -0.0512281
+0.0928885 -0.0838549 -0.0852733
+0.0647924 -0.112421 -0.0731805
+-0.25816 -0.0952338 -0.0476423
+-0.29017 -0.0715026 -0.0590899
+-0.0881154 0.18359 0.121824
+-0.116958 0.131991 0.135245
+-0.115528 0.0740867 0.158033
+-0.154707 0.0281229 0.162592
+-0.101345 0.00172185 0.183998
+-0.200295 -0.00554548 0.159778
+-0.00513261 0.168012 0.15663
+0.0256509 0.210455 0.123931
+-0.000484079 0.23337 0.0785256
+0.0243063 0.232033 0.0312676
+0.297468 0.0856477 -0.0518916
+0.264291 0.0516813 -0.0431796
+-0.000333759 -0.14362 -0.17393
+-0.00811779 -0.111725 -0.189145
+0.0233168 -0.144538 -0.156498
+0.0520152 -0.129366 -0.0938706
+-0.0358469 -0.125283 -0.1814
+-0.0719963 -0.112037 -0.174525
+-0.0579005 -0.136109 -0.165268
+-0.053519 -0.152974 -0.139859
+-0.0826048 -0.155575 -0.104309
+-0.102837 -0.101678 -0.161026
+-0.0801971 -0.127893 -0.156609
+-0.0767072 -0.142872 -0.136199
+0.00103891 -0.155684 -0.151643
+-0.0126392 -0.163805 -0.12728
+-0.153213 -0.0200729 -0.132827
+-0.157003 0.0192245 -0.127469
+-0.11382 -0.0744379 -0.166512
+-0.106384 -0.047927 -0.177108
+-0.117555 -0.0169507 -0.168029
+-0.0991594 0.0131089 -0.174764
+-0.0913706 0.0448592 -0.172496
+-0.0756406 0.0736176 -0.170824
+-0.0873468 0.110478 -0.147509
+-0.0594532 0.101489 -0.163026
+-0.0244708 0.103135 -0.166028
+-0.127423 0.0986322 -0.129408
+-0.118816 0.0419869 -0.157553
+-0.133878 0.0664189 -0.13894
+-0.0252286 0.160621 -0.116778
+-0.0811961 -0.0509828 -0.185782
+-0.0616152 -0.0307688 -0.191254
+-0.0704314 -0.00277796 -0.188487
+-0.0629541 -0.0698913 -0.187795
+-0.0455164 0.0102212 -0.193522
+-0.0430043 0.0373487 -0.190547
+-0.0241987 0.0567533 -0.188576
+-0.063225 0.0525651 -0.181777
+-0.0655626 0.155373 -0.115695
+-0.0687568 0.176717 -0.0835132
+-0.104738 0.179668 -0.054078
+-0.0949674 0.135982 -0.123239
+-0.123404 0.134453 -0.104745
+-0.141589 0.148908 -0.070839
+-0.189965 0.138072 -0.0480893
+-0.139982 0.0339539 -0.142608
+-0.0698644 -0.0908595 -0.182455
+-0.0869951 -0.0980032 -0.173608
+-0.0888347 -0.113272 -0.163583
+-0.100216 -0.115422 -0.150258
+-0.116397 -0.113163 -0.131517
+-0.109588 -0.135899 -0.107769
+-0.113596 -0.103854 -0.146711
+-0.115309 -0.0895474 -0.15719
+-0.129883 -0.0730398 -0.149787
+-0.144897 -0.0545486 -0.136877
+-0.141243 -0.0752655 -0.131382
+-0.140529 -0.0929734 -0.117774
+-0.129819 -0.114322 -0.110492
+-0.154957 -0.0820572 -0.10525
+-0.17319 -0.0660304 -0.0911662
+-0.205716 -0.0543781 -0.0686289
+-0.174187 -0.0328375 -0.103341
+-0.163372 -0.0911572 -0.0868618
+-0.155341 -0.116364 -0.0743424
+-0.198099 -0.0244193 -0.0815967
+-0.209496 0.00564775 -0.0793296
+-0.104811 -0.153707 -0.0834025
+-0.193364 0.0274989 -0.0905073
+-0.195098 0.0613981 -0.0852378
+-0.174866 0.0906393 -0.0907104
+-0.183042 0.115353 -0.0707315
+-0.209624 0.117075 -0.0568091
+-0.23628 0.0972374 -0.0606186
+-0.27478 0.110265 -0.0497172
+-0.228367 0.0668769 -0.0698484
+-0.251112 0.040523 -0.068888
+-0.216608 0.137171 -0.0376511
+-0.227411 0.154531 -0.00555484
+-0.194777 0.158609 -0.0193378
+-0.164962 0.178815 -0.000179778
+-0.231456 0.152575 0.0323689
+-0.199826 0.160548 0.0572605
+-0.236965 0.128656 0.0633833
+-0.17123 0.182733 0.0404826
+-0.128564 0.190448 -0.00837419
+-0.0991129 0.20863 0.0142043
+-0.168524 0.169871 0.0755126
+-0.163588 0.136428 0.107596
+-0.141392 0.192471 0.0652526
+-0.073927 0.221866 0.0429573
+-0.262211 0.142443 -0.00109806
+-0.266844 0.107888 0.0613638
+-0.28881 0.0827382 0.0705891
+-0.282314 0.0571684 0.0961857
+-0.244984 0.0555902 0.115396
+-0.28409 0.0230004 0.120573
+-0.20539 0.04444 0.13869
+-0.216657 0.0913735 0.106246
+-0.321301 -0.0037008 0.113436
+-0.269434 -0.018038 0.132429
+-0.227907 -0.0342978 0.138796
+-0.295857 -0.0407173 0.108514
+-0.394153 -0.0072429 0.0688749
+-0.337377 0.0176792 0.0971164
+-0.388725 0.0294257 0.0537187
+-0.404944 0.0403335 0.0272473
+-0.426273 0.0449791 -0.00258157
+-0.436411 0.0526146 -0.0384857
+-0.471392 0.0283371 -0.0641431
+-0.434831 0.0477246 -0.0809856
+-0.441717 0.016121 0.0160487
+-0.378625 0.0566371 0.0313463
+-0.367064 0.0785269 0.0104993
+-0.336435 0.0992608 0.009509
+-0.43494 -0.0160295 0.0332624
+-0.38249 0.0807931 -0.0150041
+-0.380719 0.0863079 -0.0474863
+-0.41036 0.065654 -0.0233953
+-0.377973 0.0638507 -0.078275
+-0.348501 0.0926189 -0.0565738
+-0.328397 0.110798 -0.0340867
+-0.377367 -0.0192039 -0.089504
+-0.421433 -0.0305453 -0.0985605
+-0.114682 0.207742 0.0527045
+-0.116467 0.199227 0.0825376
+-0.0938153 0.201811 0.100205
+-0.00713486 0.21589 0.120472
+0.00412912 0.194028 0.140734
+0.0286461 0.172559 0.151816
+0.0369435 0.139115 0.166063
+0.0759809 0.12629 0.163777
+0.112766 0.0995206 0.164051
+0.0519201 0.191606 0.135347
+0.0585701 0.215447 0.107917
+0.0916601 0.217851 0.0867493
+0.0858377 0.181441 0.133122
+0.08665 0.226782 0.0485108
+0.0377801 0.104182 0.178026
+0.00202303 0.0782792 0.1876
+0.0395654 0.0658429 0.187567
+0.0855167 0.0342036 0.183976
+0.118664 -0.0089809 0.165937
+0.116016 0.168844 0.131562
+0.155925 0.155755 0.124628
+0.139187 0.180044 0.113112
+0.135622 0.205066 0.082699
+0.161426 0.206082 0.0537547
+0.199219 0.191721 0.0517405
+0.029606 0.22756 0.0947735
+0.150049 0.109534 0.149415
+0.180989 0.0895417 0.14411
+0.209834 0.100628 0.127196
+0.152129 0.0757484 0.158321
+0.223766 0.123301 0.109789
+0.200021 0.141994 0.112242
+0.196231 0.166697 0.0946543
+0.216873 0.17303 0.0709274
+0.247026 0.154665 0.0683708
+0.275262 0.149044 0.0426982
+0.249149 0.11998 0.094882
+0.265608 0.0907272 0.0873119
+0.247289 0.0635133 0.0993065
+0.223522 0.0693513 0.123084
+0.214216 0.0371396 0.116998
+0.187747 0.02422 0.133089
+0.154819 -0.00119342 0.143999
+0.168326 0.0434847 0.152936
+0.170987 0.169879 0.105953
+-0.174282 0.0232202 -0.10807
+-0.284597 -0.0732055 0.0931726
+-0.25108 -0.09202 0.097698
+-0.222464 -0.0753609 0.11957
+-0.214213 -0.113101 0.103683
+-0.302903 -0.0945116 0.0686402
+-0.195428 -0.0556839 0.139432
+-0.156829 -0.0700418 0.146298
+-0.0976748 -0.0658008 0.166048
+-0.144421 -0.115749 0.132619
+-0.29612 -0.123273 0.0514632
+-0.266231 -0.145856 0.0540206
+0.0488831 0.0294674 0.192113
+0.023936 -0.0145482 0.198863
+0.0717513 -0.00410704 0.187615
+-0.152398 -0.135765 -0.057189
+-0.100872 -0.0864911 -0.170917
+-0.105632 0.159255 0.127513
+-0.0766796 0.138244 0.150939
+-0.0968478 0.113293 0.151863
+-0.0917353 0.0496009 0.172492
+-0.126566 0.10163 0.143708
+-0.133447 0.150712 0.116875
+-0.144857 0.120635 0.126973
+-0.173737 0.107421 0.118943
+-0.1614 -0.146542 -0.0390305
+-0.186603 -0.146865 -0.0282327
+-0.201541 -0.125228 -0.0379031
+-0.193134 -0.103124 -0.0539853
+-0.211049 -0.0803921 -0.0567836
+-0.159914 -0.163462 -0.0232774
+-0.227528 -0.128247 -0.0340061
+-0.238879 -0.149045 -0.0253663
+-0.226397 -0.167794 -0.0140136
+-0.201369 -0.167497 -0.0134536
+-0.262857 -0.15434 -0.0259797
+-0.280568 -0.171091 -0.0144786
+-0.281744 -0.138503 -0.0368599
+-0.309473 -0.135166 -0.0434532
+-0.269395 -0.179854 0.0148325
+-0.315329 -0.141054 0.0209936
+-0.356693 -0.110151 -0.0633657
+-0.36424 -0.0799503 -0.0753809
+-0.387596 -0.110687 -0.0644618
+-0.362559 -0.0476361 -0.081757
+-0.396237 -0.113781 -0.0353861
+-0.371596 -0.120753 -0.0109802
+-0.417619 -0.0918209 -0.0251753
+-0.418352 -0.0719487 0.00161618
+-0.393997 -0.0714926 0.0251311
+-0.394772 -0.0475977 0.0459488
+-0.402686 -0.0895353 -0.0784898
+-0.42084 -0.0681017 -0.0897032
+-0.4404 -0.0509827 0.00126062
+-0.459655 -0.0472284 -0.0203999
+-0.460671 -0.0638923 -0.050193
+-0.475196 -0.0484471 -0.0775462
+-0.489471 -0.00806259 -0.0776671
+-0.475138 -0.0247761 -0.0213132
+-0.486424 -0.00153525 -0.0440281
+-0.468403 0.00156711 -0.00678311
+-0.242074 -0.191329 0.00830808
+-0.429783 -0.0877853 -0.0735719
+-0.43628 -0.0850827 -0.0461373
+-0.191731 -0.183481 -0.00157165
+-0.201183 -0.19839 0.0124415
+-0.207449 -0.198571 0.0495067
+-0.173223 -0.193455 0.00663966
+-0.149821 -0.209649 0.0233901
+-0.134115 -0.223229 0.055024
+-0.136108 -0.199724 0.0945508
+-0.152801 -0.187823 -0.00205719
+-0.18838 -0.178751 0.0798359
+-0.0995335 -0.223011 0.0513334
+-0.114673 -0.175248 0.119217
+-0.440477 -0.0499869 -0.09565
+-0.451957 -0.0204046 -0.101857
+-0.234693 0.0151621 -0.0705707
+-0.232313 -0.0142483 -0.068254
+-0.256967 -0.0290178 -0.0629623
+-0.201581 -0.207306 0.0313934
+-0.223725 -0.199636 0.0229592
+-0.183119 -0.212742 0.045317
+-0.188846 -0.19935 0.0634693
+-0.160028 -0.218047 0.0431693
+-0.204584 -0.184112 0.0658921
+-0.172989 -0.194432 0.0779813
+-0.166513 -0.17455 0.0946992
+-0.18471 -0.141617 0.103157
+-0.153237 -0.206081 0.080472
+-0.13192 -0.217895 0.078765
+-0.113273 -0.211482 0.0952368
+-0.0876939 -0.205117 0.110143
+-0.0617909 -0.215381 0.0941536
+-0.0467071 -0.213033 0.0660721
+-0.0428995 -0.202112 0.00684775
+-0.0500405 -0.19896 0.118331
+-0.0448164 -0.172256 0.141435
+0.0489655 -0.130695 0.0849369
+0.0328257 -0.147003 0.0438674
+-0.0648791 -0.145555 0.150587
+0.016581 -0.163544 0.00884718
+0.058778 -0.116217 0.123118
+0.0778076 -0.081498 0.154441
+0.0352324 -0.119032 0.151956
+0.00114088 -0.126919 0.163291
+-0.0183444 -0.100065 0.178246
+-0.00235339 -0.0663502 0.190792
+0.0341041 -0.066022 0.187462
+0.0492495 -0.089232 0.169327
+-0.0128114 -0.0329744 0.194855
+-0.115415 -0.225031 0.0662711
+-0.0730773 -0.220943 0.0605258
+-0.118843 -0.193531 0.107193
+-0.138023 -0.179018 0.106649
+-0.100643 -0.19026 0.116541
+-0.0947661 -0.172586 0.128428
+-0.111739 -0.149926 0.13206
+-0.0760933 -0.163142 0.139445
+-0.234903 -0.085372 -0.0497887
+-0.0077 0.230474 0.027082
+-0.0166405 0.233414 0.05448
+0.0101539 0.234325 0.0539289
+0.0372094 0.233262 0.0550673
+0.0555455 0.230342 0.0298477
+0.04283 0.224072 -0.000217558
+0.067148 0.21097 -0.0360407
+0.011472 0.226074 0.00687303
+-0.0558591 -0.10463 -0.182934
+-0.0565936 -0.121689 -0.17642
+0.121759 -0.0457408 -0.0178067
+0.123973 0.0718871 0.168299
+0.0221523 0.233586 0.0737068
+-0.00353417 -0.152521 0.145381
+-0.157503 -0.0407249 -0.123137
+-0.402744 0.0442574 -0.0877635
+-0.405641 0.00799179 -0.0966936
+-0.121506 -0.157661 -0.0590498
+-0.111905 -0.177728 -0.0341975
+-0.0778988 0.0229642 0.18259
+-0.10136 -0.0715673 -0.175466
+0.284328 0.102013 0.0657535
+0.30034 0.0876156 0.0350277
+0.313093 0.101645 0.00557695
+0.281734 0.059859 0.0301131
+0.31369 0.0939172 -0.0255194
+0.313301 0.115146 -0.0514087
+0.305361 0.148098 -0.0427014
+0.266831 0.169885 -0.0514279
+0.28652 0.1262 0.0529506
+0.302138 0.149778 -0.0123269
+0.29091 0.14998 0.0162535
+0.26822 0.166638 0.0212854
+0.247534 0.182808 -0.00123423
+0.215545 0.195039 0.00400645
+0.253566 0.165453 0.0442228
+0.287285 0.162995 -0.0300387
+0.264833 0.175412 -0.0261528
+0.246183 0.18101 -0.0421722
+0.216699 0.181738 -0.0604516
+0.191444 0.197063 -0.0374138
+0.197618 0.159773 -0.0814181
+0.162626 0.151044 -0.0869195
+0.246413 0.171038 -0.0640185
+0.262152 0.14856 -0.0768471
+0.236906 0.117298 -0.0837704
+0.266508 0.119186 -0.0801675
+0.291373 0.107261 -0.070559
+0.268727 0.0804238 -0.0713972
+0.157844 0.20099 -0.0419927
+0.127221 0.199769 -0.0524808
+0.0921871 0.199144 -0.0582807
+0.160558 0.208675 -0.0124965
+0.136234 0.216589 0.0128056
+0.106226 0.209253 -0.0354265
+0.105789 0.21885 -0.00422888
+0.0987139 0.224454 0.0227998
+0.310132 0.1309 0.00482773
+0.264335 0.0486808 0.050986
+0.242897 0.0320616 0.0613799
+0.255315 0.0509231 0.0765592
+0.223445 0.0189006 0.0703454
+0.198446 0.00226779 0.0829469
+0.159642 -0.0264743 0.0770455
+0.184659 -0.00995121 0.0581628
+0.295808 0.0728961 -0.0273998
+0.304133 0.0814612 -0.00568077
+0.296666 0.0746018 0.0156567
+0.278322 0.0564608 -0.0240055
+0.262042 0.0406401 0.00220734
+0.259669 0.0411964 -0.0218671
+0.243852 0.034963 -0.0421001
+0.215266 0.0162635 -0.0527158
+0.245815 0.0518064 -0.0675671
+0.214942 0.046667 -0.0864707
+0.282632 0.0654666 -0.0447211
+0.268523 0.0633842 -0.0596897
+0.281296 0.0760982 -0.0592187
+0.283254 0.0910852 -0.0692596
+0.26702 0.0993994 -0.0774233
+0.252339 0.0866404 -0.080311
+0.235073 0.0969385 -0.0840247
+0.210826 0.109417 -0.0864937
+0.214308 0.0858398 -0.0880213
+0.214047 0.137226 -0.0844927
+0.25352 0.0685975 -0.0733756
+0.252369 0.108439 -0.0822663
+0.205928 0.0659372 -0.0916771
+0.188313 0.0431929 -0.0992933
+0.170591 0.0255543 -0.111447
+0.194227 -0.00344713 0.0344716
+0.186031 -0.00641741 -0.000610057
+0.221621 0.0132033 0.0205145
+0.158466 -0.0217212 -0.0111899
+0.203821 0.00534862 -0.0246978
+-0.0873673 -0.213787 0.0258875
+-0.0988088 -0.199309 -0.00314121
+-0.0250407 0.231884 0.077572
+-0.0132887 0.227702 0.0992761
+0.00907169 0.224567 0.10582
+-0.0768204 0.221895 0.0606255
+-0.0944706 0.215866 0.048674
+-0.107247 0.209847 0.0333512
+-0.119042 0.202294 0.0174804
+-0.110264 0.199934 -0.00206571
+-0.108772 0.189998 -0.0282832
+-0.0885764 0.215953 0.0295549
+-0.135337 0.194063 0.00985829
+-0.156117 0.187793 0.0203953
+-0.177021 0.179366 0.0189113
+-0.281551 0.130928 0.0140859
+-0.285947 0.115513 0.0369868
+-0.150405 -0.218482 0.06527
+0.0152028 -0.0430482 0.197139
+0.0402834 -0.0349374 0.194561
+-0.0851073 -0.18549 -0.0382905
+-0.0673308 -0.181154 -0.0594061
+-0.0570762 -0.172068 -0.0890807
+-0.0287352 -0.17445 -0.0907527
+-0.0159017 -0.177558 -0.069441
+-0.0204618 -0.184795 -0.0411489
+-0.0381433 -0.194183 -0.0204349
+-0.051034 -0.189416 -0.0417802
+-0.414438 -0.029614 0.0437536
+-0.396684 -0.0282297 0.0588966
+-0.410734 -0.0120685 0.0558495
+-0.40436 0.00706511 0.0586068
+-0.386161 0.0132369 0.0692927
+-0.337893 -0.0190526 0.100516
+-0.32019 -0.038641 0.0982197
+-0.310347 -0.0235748 0.112107
+-0.295255 -0.0032073 0.126315
+-0.290437 -0.0236301 0.120756
+-0.27395 -0.0406672 0.11799
+-0.25102 -0.0377029 0.128663
+-0.227421 -0.0666674 -0.0569025
+-0.226022 -0.0447003 -0.0636812
+-0.210588 -0.0356727 -0.0716031
+-0.214081 -0.0168631 -0.0739229
+-0.194807 -0.0430067 -0.0792776
+-0.188472 -0.062926 -0.0770752
+-0.221809 -0.00259957 -0.0725998
+-0.22142 0.0115402 -0.0742428
+-0.209966 0.0222645 -0.0797481
+-0.203742 0.0357387 -0.083051
+-0.208844 0.0522034 -0.0787474
+-0.190822 0.0450951 -0.0909107
+-0.177425 0.0611661 -0.0991239
+-0.209154 0.071997 -0.0756773
+-0.16361 0.0781189 -0.106493
+-0.192643 0.0804217 -0.0817311
+-0.188553 0.0983129 -0.0769631
+-0.158207 0.0981986 -0.101697
+-0.14589 0.0877094 -0.119136
+-0.14156 0.107293 -0.111634
+-0.123827 0.117911 -0.119323
+-0.108028 0.110926 -0.135713
+-0.112326 0.0896534 -0.145444
+-0.0919879 0.0895894 -0.157183
+-0.354407 -0.140129 -0.0276509
+0.0608099 -0.102747 0.147637
+0.0795974 -0.0939192 0.130946
+0.106273 -0.0662511 0.133449
+0.114315 -0.0633548 0.0946988
+0.0911756 -0.080818 0.0664564
+0.0945934 -0.0696213 0.0242046
+0.094466 -0.0495519 0.164901
+0.103223 -0.059939 -0.0150141
+0.107659 -0.0557411 0.00875241
+0.112343 -0.0548812 0.0329695
+0.13301 -0.0399767 0.0388538
+0.140194 -0.0391239 0.064311
+0.140474 -0.0411727 0.0934195
+0.15845 -0.0224544 0.11313
+0.0643705 -0.103524 -0.0168157
+0.0586643 -0.110442 0.0129414
+0.0751879 -0.0909703 0.026571
+0.0799955 -0.0839899 -0.0182911
+0.0805977 -0.0822607 0.00527421
+-0.199652 -0.0706452 -0.0659354
+-0.19524 -0.0870565 -0.0610569
+-0.348592 0.00177698 0.0991638
+-0.333961 0.00443922 0.106489
+-0.315086 0.0187442 0.108631
+-0.00316359 0.0489169 -0.190227
+-0.00891282 0.00524446 -0.198566
+-0.000837179 -0.0247146 -0.198369
+-0.0451245 -0.186443 0.130327
+-0.0607705 -0.19034 0.127269
+-0.0688358 -0.203401 0.115117
+-0.062611 -0.17513 0.137084
+-0.0574099 -0.160773 0.145842
+-0.0476802 -0.14828 0.153745
+-0.0742399 -0.116376 0.158165
+-0.103323 -0.097917 0.154292
+0.047031 0.0480852 -0.168168
+0.0689779 0.0532592 -0.153469
+0.0881819 -0.0293513 -0.172655
+0.11654 -0.0237422 -0.15226
+0.0283473 -0.0619206 -0.192344
+0.00884709 -0.0532585 -0.196777
+-0.0167742 -0.0459663 -0.196316
+0.0146735 -0.0790357 -0.193471
+0.0207706 -0.101966 -0.18762
+0.0449927 -0.105242 -0.174844
+0.0651623 0.0109671 -0.179127
+0.0781854 -0.00786363 -0.178011
+0.081928 0.0167058 -0.168007
+0.0839486 0.0345127 -0.157031
+0.030408 0.12443 -0.136266
+-0.00876124 0.0888046 -0.17281
+-0.0206715 0.0751227 -0.181354
+0.0533308 0.133749 -0.12095
+0.0571218 0.158463 -0.105692
+0.0821399 0.175144 -0.0882636
+0.0339587 0.172826 -0.0984761
+0.0250338 0.190467 -0.0767026
+0.0361198 0.205898 -0.0486562
+0.1337 0.159717 -0.0885808
+0.153192 0.173725 -0.0795409
+0.150357 0.191093 -0.0628394
+0.0228004 -0.155988 -0.0130102
+0.0351251 -0.141473 0.00863422
+0.0360237 -0.140713 -0.0316276
+0.017425 -0.164748 0.0398744
+0.0235388 -0.159186 0.0627028
+0.0538022 -0.119801 -0.0390143
+0.0025606 -0.0950454 -0.192557
+-0.0188238 -0.0933552 -0.192037
+-0.0309944 -0.0730462 -0.192797
+-0.0281068 -0.109252 -0.187754
+-0.075043 -0.21301 0.103434
+-0.0894248 -0.215145 0.0987529
+-0.101426 -0.217246 0.0934193
+-0.112609 -0.221304 0.0820512
+-0.102007 -0.206618 0.104586
+-0.357922 0.075518 -0.0710404
+-0.358936 0.057208 -0.0795117
+0.0591707 0.23129 0.0518182
+0.203248 0.0154733 0.105733
+-0.472546 0.0131591 -0.0288556
+-0.461471 0.0322821 -0.0411949
+-0.451311 0.0441704 -0.0615887
+-0.456508 0.0336736 -0.0849523
+-0.475353 0.013652 -0.0871544
+-0.48302 -0.0285378 -0.0911039
+-0.489181 -0.0301113 -0.0677967
+-0.463262 -0.0404697 -0.0963726
+-0.432771 0.0573181 -0.0604522
+-0.41555 0.0601452 -0.0761121
+-0.397075 0.0676922 -0.0728843
+-0.382154 0.0783063 -0.065485
+-0.366919 0.0871881 -0.0598129
+-0.364506 0.0945902 -0.0426634
+-0.346367 0.102863 -0.0390517
+-0.341911 0.1063 -0.0193301
+-0.352907 0.0953717 -0.00411107
+-0.292529 0.0971517 -0.0568892
+-0.376027 0.088421 -0.0301143
+-0.395431 0.078534 -0.0331188
+-0.271862 0.0913249 -0.0598455
+-0.283283 0.0717778 -0.0661175
+-0.422152 0.0632947 -0.0456245
+-0.437052 0.0306019 -0.0942911
+-0.420832 0.0396817 -0.0908281
+-0.420208 0.0209628 -0.0962905
+-0.424603 0.00147628 -0.100178
+-0.409238 -0.01306 -0.0971805
+-0.397117 -0.0349289 -0.0925506
+-0.402307 0.0263118 -0.0936004
+-0.387819 0.0136986 -0.0921055
+-0.364576 0.00324772 -0.0872997
+-0.391817 -0.00528513 -0.0934207
+-0.388899 0.0353587 -0.08989
+-0.373861 0.0459462 -0.0841546
+-0.356581 0.0354061 -0.0840319
+-0.283821 0.014154 -0.0699887
+-0.388663 0.0501317 -0.0854246
+-0.400625 0.0570771 -0.0817872
+-0.277312 0.0395577 -0.0695801
+-0.263595 0.0224806 -0.0681152
+-0.411494 0.0521117 -0.0843958
+-0.423315 0.0520061 -0.0810506
+-0.4266 0.0583367 -0.0710367
+-0.420528 0.0643365 -0.0597794
+-0.437215 0.0529979 -0.0705989
+-0.447466 0.0442731 -0.0753282
+-0.459224 0.0370869 -0.071264
+-0.468361 0.0282442 -0.0784113
+-0.478009 0.0179968 -0.0729376
+-0.479951 0.0140616 -0.0538839
+-0.463083 0.0214952 -0.0907124
+-0.463457 0.0029889 -0.101217
+-0.485691 0.00647281 -0.0788714
+-0.490194 0.00123743 -0.0619417
+-0.489027 -0.0161994 -0.0553181
+-0.483623 -0.0188975 -0.0375911
+-0.478319 -0.00529318 -0.0240312
+-0.483932 -0.00270692 -0.0898923
+-0.481107 -0.0153955 -0.0935496
+-0.46911 -0.0252159 -0.0996541
+-0.488301 -0.019441 -0.0836338
+-0.490506 -0.0186274 -0.0716706
+-0.487468 -0.0311436 -0.0799346
+-0.479204 -0.0391906 -0.0852952
+-0.482273 -0.039567 -0.0722516
+-0.473588 -0.0502137 -0.05761
+-0.482362 -0.0375783 -0.0589935
+-0.467989 -0.0491582 -0.038458
+-0.464881 -0.0634395 -0.0695957
+-0.451164 -0.0752001 -0.062683
+-0.461144 -0.0570308 -0.0871617
+-0.47021 -0.0467699 -0.0885606
+-0.454868 -0.06127 -0.0324684
+-0.443099 0.03929 -0.0866065
+-0.473886 -0.0349722 -0.094979
+-0.487452 -0.028162 -0.0529376
+-0.46882 -0.0106219 -0.0998229
+-0.448274 0.0309025 -0.0923286
+-0.443498 0.0213393 -0.0966431
+-0.45456 0.0148388 -0.0976978
+-0.431899 0.0165694 -0.0983475
+-0.474696 0.000410854 -0.0972292
+-0.469485 0.00963021 -0.095246
+0.296955 0.106656 0.0472498
+0.291078 0.0883167 0.0527806
+0.288813 0.0737593 0.0408672
+0.277877 0.0614053 0.0473432
+0.270351 0.0591299 0.0606321
+0.266187 0.0697888 0.0793687
+0.305647 0.105588 0.0299097
+0.312126 0.116415 0.0165124
+0.317369 0.116749 0.00104001
+0.316163 0.104461 -0.011578
+0.318211 0.110014 -0.0273182
+0.313357 0.101027 -0.0413356
+0.318559 0.12438 -0.0374211
+0.311096 0.133216 -0.0514791
+0.303008 0.123002 -0.0663721
+0.313352 0.139423 -0.0292404
+0.305168 0.100598 -0.0568232
+0.300383 0.145261 -0.0600217
+0.280531 0.15626 -0.0639751
+0.291353 0.156796 -0.049708
+0.305426 0.0872955 -0.0378317
+0.311948 0.137809 -0.0138391
+0.307419 0.142673 -0.00177921
+0.295409 0.151976 0.00151047
+0.302664 0.141484 0.0124035
+0.29664 0.139673 0.0272525
+0.303353 0.1511 -0.0276759
+0.245876 0.184257 -0.021774
+0.231974 0.189434 -0.00989912
+0.214634 0.19537 -0.0149903
+0.197855 0.201136 -0.00456193
+0.150815 0.022535 0.157779
+0.124646 0.0192251 0.170169
+0.0987978 0.00829006 0.179252
+0.0935369 -0.0207146 0.176347
+0.137567 0.00340953 0.158961
+0.135309 -0.0228522 0.146302
+0.124465 -0.0438634 -0.132424
+-0.332396 -0.00896673 0.107708
+-0.324334 -0.0217195 0.106662
+-0.343027 -0.00837195 0.10223
+-0.349979 -0.0172219 0.0947275
+-0.351563 -0.0075692 0.0970012
+-0.357567 0.000498455 0.0937007
+-0.381501 -0.0133038 0.0778076
+-0.38504 -0.0253475 0.0687138
+-0.265221 0.135804 -0.0227982
+-0.248347 0.143818 -0.0155162
+-0.229624 0.145057 -0.023862
+0.0837147 0.203074 0.114313
+0.191547 0.000613976 -0.058867
+0.179572 -0.00455891 -0.081695
+-0.0179285 0.191125 0.141825
+0.074671 0.125449 -0.115605
+0.100378 0.123257 -0.105614
+0.109501 0.148191 -0.0967001
+0.0861875 0.104971 -0.118148
+0.120268 0.113011 -0.101312
+0.2304 0.033054 -0.0627787
+-0.0175023 0.205236 0.13064
+-0.0246945 0.215588 0.118203
+-0.00155887 0.205641 0.13137
+0.00942581 0.214006 0.121922
+0.0140483 0.203393 0.132712
+0.0230254 0.188966 0.14258
+0.0283783 0.199611 0.13371
+0.0443375 0.205985 0.125045
+0.0645793 0.202014 0.122581
+0.0382707 0.218421 0.110452
+0.0377545 0.189657 0.139859
+0.0495097 0.17628 0.146073
+0.0673532 0.180327 0.139283
+0.0802708 0.165958 0.14453
+0.0765894 0.146779 0.155161
+0.0990867 0.134004 0.155061
+0.0432616 0.161058 0.155485
+0.0556193 0.145405 0.160331
+0.053992 0.124489 0.168818
+0.0245753 0.154745 0.161164
+0.0478735 0.224578 0.0958366
+0.0684131 0.222118 0.0900175
+0.078493 0.225737 0.0698939
+0.100876 0.221763 0.065965
+0.113688 0.212274 0.0826634
+0.104011 0.15383 0.144328
+0.126494 0.214189 0.0668955
+-0.0804722 0.198127 0.113743
+0.0202763 0.219591 0.113828
+0.122288 0.201537 0.097016
+0.140391 0.193084 0.0979898
+0.155928 0.19652 0.0827522
+0.103478 0.207222 0.0987704
+0.158633 0.184228 0.0986656
+0.14837 0.206869 0.0681355
+0.143772 0.213494 0.0504607
+0.157944 0.211701 0.0277668
+0.137828 0.216728 0.0322073
+0.119203 0.220974 0.0239402
+0.181201 0.203466 0.0367049
+0.203994 0.196614 0.0269394
+0.108119 0.223088 0.0395942
+0.169816 0.19757 0.0691349
+0.188327 0.189312 0.06867
+0.181082 0.198755 0.0545559
+0.0880282 0.211392 0.101128
+-0.0466273 -0.132423 -0.174157
+-0.0318814 -0.139512 -0.174361
+-0.0157739 -0.129794 -0.182809
+-0.0169605 -0.147684 -0.170043
+-0.0171565 -0.156499 -0.153941
+-0.0342955 -0.157638 -0.143482
+0.00392453 -0.126602 -0.183463
+-0.0425012 -0.142934 -0.1669
+-0.0454602 -0.150295 -0.15321
+-0.0603212 -0.144284 -0.151597
+-0.0561048 -0.208349 0.107134
+-0.0466283 -0.209963 0.094217
+-0.0395136 -0.209195 0.0798734
+-0.0300619 -0.204605 0.0643616
+-0.0542184 -0.215608 0.0800121
+-0.0723947 -0.220944 0.0794647
+-0.0398445 -0.202712 0.106677
+-0.026282 -0.201856 0.0787931
+-0.0602593 -0.21837 0.0670154
+-0.0547895 -0.214918 0.0522095
+-0.0431681 -0.209025 0.0404074
+-0.0492054 -0.207652 0.023149
+-0.0688374 -0.205485 0.0059795
+-0.0318623 -0.201338 0.021692
+-0.0250427 -0.195297 0.00476074
+-0.0783989 -0.219366 0.0917231
+-0.0855943 -0.223925 0.0704585
+-0.101036 -0.225034 0.0722946
+0.00797548 -0.111749 -0.188238
+0.198289 0.201344 0.0120569
+0.129707 -0.000104893 -0.143391
+0.122803 0.022642 -0.141595
+0.131204 0.0379353 -0.129884
+0.0652331 -0.0683161 0.174012
+0.169741 0.0223577 0.146053
+0.174405 0.0061381 0.13108
+0.168622 -0.00867675 0.12098
+0.153687 -0.0164829 0.131427
+0.171817 -0.0137639 0.103162
+0.160136 -0.0252577 0.0952122
+0.172869 -0.0168205 0.0851703
+0.185212 -0.00560576 0.0932736
+-0.266685 -0.165547 0.0366709
+0.275879 0.0838846 0.0745082
+-0.0937132 0.19223 0.111342
+-0.106997 0.176659 0.115898
+-0.11095 0.190463 0.10029
+-0.126606 0.187093 0.0915943
+-0.142085 0.184033 0.0817885
+-0.154062 0.170706 0.0875104
+-0.169139 0.15327 0.0921543
+-0.149253 0.156395 0.103116
+-0.186962 0.154848 0.0764578
+-0.122296 0.176425 0.105839
+-0.1187 0.164061 0.117324
+-0.205086 0.146206 0.0712823
+-0.220448 0.149222 0.0532732
+-0.211079 0.163023 0.0370243
+-0.219494 0.161558 0.018494
+-0.237511 0.153161 0.0125252
+-0.249528 0.144798 0.0267993
+-0.246387 0.136378 0.0460156
+-0.264557 0.139198 0.0171736
+-0.247159 0.148788 3.98313e-005
+-0.250069 0.147707 0.0134031
+0.0553132 0.17621 -0.0917443
+0.173324 0.167907 -0.0804984
+0.189782 0.175871 -0.073497
+0.190862 0.188891 -0.0568903
+0.207697 0.172638 -0.0733973
+0.224967 0.17092 -0.0713981
+0.215941 0.158803 -0.0801729
+-0.484824 -0.0268311 -0.0434494
+-0.477138 -0.0315994 -0.0330875
+-0.468515 -0.036879 -0.0234582
+-0.460896 -0.0360471 -0.0108418
+-0.450483 -0.0395823 -0.000216449
+-0.437022 -0.0355125 0.0184559
+-0.186018 0.123881 0.102748
+0.0137157 -0.136103 -0.175143
+0.0264414 -0.134708 -0.167362
+0.0395308 -0.121548 -0.167842
+0.0111569 -0.146653 -0.164895
+-0.000750878 -0.15146 -0.163697
+0.233115 0.173929 0.0533539
+-0.141639 -0.218195 0.0382904
+-0.122474 -0.219682 0.0400409
+-0.105452 -0.218012 0.0353912
+0.240064 0.0618588 -0.0784205
+0.230353 0.0462174 -0.0761554
+0.223175 0.063332 -0.085684
+0.218898 0.0326369 -0.0763137
+0.204732 0.0311913 -0.0883317
+0.189904 0.0246699 -0.0976091
+0.183997 0.00806982 -0.0937799
+0.207877 0.0225787 -0.0765582
+0.200938 0.0102395 -0.0682652
+-0.295312 0.0513818 -0.0707959
+-0.173537 -0.106557 -0.064935
+-0.454017 -0.00539478 0.0124898
+0.211161 0.0175973 -0.0649929
+0.00655894 -0.169937 0.106317
+0.0243113 -0.154347 0.104277
+0.041125 -0.137241 0.106784
+0.0330204 -0.148498 0.0826849
+0.00773306 -0.159576 0.126719
+0.0138807 -0.145963 0.139351
+0.0049516 -0.139462 0.152362
+0.0184802 -0.126785 0.155856
+0.0241502 -0.111242 0.16547
+0.0286893 -0.13331 0.141105
+0.0429057 -0.130217 0.126263
+0.0491251 -0.118004 0.139231
+0.0834693 0.217201 -0.0170596
+0.0421476 0.21581 -0.0251167
+0.178941 0.01749 -0.103193
+0.169163 0.0113257 -0.111613
+0.153011 -0.00104932 -0.122574
+0.157342 0.0197994 -0.120215
+0.148636 0.0375252 -0.120607
+0.154906 -0.0180664 -0.109226
+0.162003 -0.0193091 -0.0878111
+0.176321 0.00628563 -0.10222
+0.174375 -0.00362072 -0.0937611
+0.16558 -0.012255 -0.0982933
+0.169898 -0.0118878 -0.0883476
+0.167427 -0.0161977 -0.074634
+0.172483 -0.0136953 -0.0550104
+0.158573 -0.0228562 -0.038755
+0.178268 -0.0090176 -0.06772
+0.143631 -0.0308124 -0.113389
+0.131029 -0.0471009 -0.104742
+0.11914 -0.0584212 -0.0887558
+-0.477443 0.00727968 -0.0926757
+0.200075 0.181902 -0.0654523
+0.205429 0.188398 -0.0529035
+0.220716 0.187539 -0.044447
+0.233543 0.180658 -0.0547301
+-0.274121 0.00556367 0.133906
+-0.25281 -0.00309231 0.143108
+-0.226366 0.00430057 0.152124
+-0.204148 0.0203161 0.151609
+-0.180106 0.036869 0.151163
+-0.155849 0.0570393 0.149975
+-0.129284 0.0463575 0.162585
+-0.127312 0.0167731 0.173798
+-0.126864 -0.0148933 0.175188
+-0.0962677 -0.0321701 0.176177
+-0.177678 0.0113344 0.163511
+-0.152021 0.000899388 0.173289
+-0.174367 -0.0169592 0.162846
+-0.24422 -0.0216099 0.139744
+-0.22626 -0.0160268 0.148336
+-0.203186 -0.0300506 0.148803
+0.312169 0.0910623 -0.0119132
+0.304722 0.0829976 -0.0216259
+0.310662 0.0902705 0.000616455
+0.306807 0.0903994 0.0183261
+0.303433 0.081803 0.00726197
+0.296626 0.0724205 0.000646811
+0.294731 0.0699752 -0.0133786
+0.288401 0.0639221 -0.022482
+0.258399 0.0760553 0.093872
+0.245932 0.0798803 0.10576
+0.253728 0.0939036 0.0994145
+0.260498 0.107331 0.0902369
+0.273431 0.103919 0.079149
+0.236537 0.0670613 0.112172
+0.234206 0.0477322 0.10414
+0.233527 0.0825384 0.115799
+0.225279 0.0977603 0.119174
+0.216992 0.0848531 0.127225
+0.199159 0.0862903 0.136279
+0.207765 0.0697112 0.133124
+0.190919 0.105206 0.134975
+0.17057 0.110355 0.141543
+0.156373 0.132508 0.137569
+0.211033 0.0519714 0.128015
+0.22651 0.0551342 0.116173
+0.188768 0.0725313 0.143551
+0.170666 0.0742871 0.151443
+0.161818 0.0927778 0.150652
+0.180456 0.0567016 0.14836
+0.183634 0.0390989 0.143398
+0.198485 0.0390369 0.1327
+0.161023 0.0597683 0.157114
+0.217859 0.111881 0.119231
+0.201322 0.116662 0.125298
+0.23116 0.109891 0.11167
+0.277718 0.11536 0.0697436
+0.286702 0.114003 0.0593743
+0.292923 0.11704 0.0501709
+0.293917 0.127809 0.0408313
+0.299874 0.11642 0.0392668
+0.284942 0.138435 0.0451881
+0.271506 0.139451 0.0590869
+0.262203 0.153376 0.0536744
+0.265562 0.158963 0.041355
+0.275182 0.15707 0.0302267
+-0.0745698 0.208428 0.105718
+-0.285535 0.0857761 -0.0627339
+-0.27473 0.0802749 -0.0641795
+-0.271141 0.0683627 -0.0662598
+-0.258023 0.0567015 -0.0678506
+-0.280992 0.0567367 -0.0686977
+-0.244837 0.0669674 -0.0668579
+-0.237033 0.0513323 -0.0702584
+-0.234541 0.0333375 -0.0709573
+-0.245976 0.0835589 -0.0633754
+-0.254841 0.0992484 -0.0576819
+-0.241877 0.116915 -0.048652
+-0.18667 0.140069 0.0904389
+0.295036 0.0935836 -0.0627684
+-0.00926267 0.0174249 0.196426
+-0.00327775 -0.00841017 0.198497
+0.0150689 0.00949618 0.198029
+0.0405031 0.00510915 0.19529
+0.0594433 0.0118965 0.19127
+-0.481953 -0.0263701 -0.036238
+-0.480202 -0.0205423 -0.0285568
+-0.476382 -0.0147766 -0.0212279
+-0.468767 -0.0190157 -0.00845524
+-0.472476 -0.00650871 -0.014068
+-0.472283 0.00563921 -0.0183851
+-0.462142 0.0149039 -0.0113607
+-0.449381 0.0227484 0.00012384
+-0.457305 0.00865369 0.0030441
+-0.481587 -0.0110502 -0.031619
+-0.482475 0.000430245 -0.0332655
+-0.480347 0.00948865 -0.041986
+-0.472473 0.0222522 -0.0436525
+-0.466776 0.0245091 -0.0320448
+-0.485126 0.00627116 -0.0502161
+-0.0188292 -0.0791852 0.184518
+0.00121365 -0.0861995 0.184132
+0.0158369 -0.0735019 0.187985
+0.000163277 -0.103552 0.176731
+0.0940848 -0.08384 -0.126867
+0.0912612 -0.0790954 0.139096
+0.0975527 -0.0787616 0.119196
+0.0915109 -0.0667976 0.154999
+0.106504 -0.0546283 0.14974
+0.112281 -0.0325408 0.160141
+0.120223 -0.0509425 0.134623
+0.120697 -0.057035 0.114118
+0.130314 -0.0372564 0.138035
+0.118329 -0.0419346 0.148167
+0.078692 -0.0689693 0.164835
+0.0765218 -0.0531401 0.175006
+0.0796376 -0.0342708 0.179856
+0.0640642 -0.0234706 0.18856
+0.0539097 -0.00800927 0.192643
+0.0685062 -0.0790748 0.165097
+0.0660068 -0.0910629 0.155978
+0.0750122 -0.091819 0.144585
+0.053982 -0.0979508 0.159145
+0.038619 -0.102088 0.165471
+0.0480016 -0.109575 0.151663
+0.0334277 -0.0895897 0.176126
+0.0439807 -0.0770085 0.179527
+0.0516381 -0.060695 0.184191
+0.0787845 -0.0183292 0.183534
+0.0876456 -0.00406453 0.181976
+0.0800526 0.0145518 0.185934
+-0.0308081 0.0885405 -0.174657
+0.155665 0.212315 0.00724246
+0.141239 0.21351 -0.00570578
+0.292693 0.1093 0.0546663
+0.29272 0.0988077 0.053019
+0.297462 0.0958888 0.0427528
+0.0839519 -0.0559622 -0.167953
+0.0985799 -0.0431579 -0.161885
+0.111766 -0.0468476 -0.147448
+0.109403 -0.0636708 -0.132674
+-0.283128 0.119926 -0.0388336
+-0.262748 0.12402 -0.0397682
+-0.318458 0.117372 -0.0209314
+-0.327255 0.11023 -0.00445948
+-0.277171 0.135902 -0.000114267
+-0.273248 0.136459 -0.0125396
+0.097695 -0.0737844 -0.140551
+0.0827347 -0.0895802 -0.145093
+0.0868385 -0.0748488 -0.155466
+0.0603532 -0.120556 -0.134077
+-0.322674 0.00868483 0.110672
+-0.307263 0.00676205 0.118571
+-0.308005 -0.00861718 0.119522
+-0.293581 0.0114665 0.12301
+-0.299329 0.0239726 0.112823
+-0.286154 0.0398423 0.107825
+-0.26321 0.0378974 0.119208
+-0.13457 0.121943 -0.106906
+-0.139297 0.134665 -0.0899912
+-0.160382 0.130812 -0.0746394
+-0.121714 0.150283 -0.0872128
+-0.163756 0.148893 -0.0525948
+-0.109282 0.166513 -0.0740295
+-0.128648 0.16718 -0.0552288
+-0.167255 0.113836 -0.0834247
+-0.394393 -0.0186811 0.0656127
+-0.227174 0.111419 0.0862083
+-0.238147 -0.00559741 0.148474
+-0.239063 0.00917146 0.145641
+-0.224146 0.0262704 0.141961
+-0.250836 0.00914945 0.141379
+-0.262479 0.0186069 0.132247
+-0.262323 0.00421726 0.138666
+-0.263219 -0.00847911 0.138113
+-0.256828 -0.0198991 0.136053
+-0.263054 -0.0300816 0.128267
+-0.276828 -0.027548 0.124217
+-0.275008 -0.00693954 0.134137
+-0.281459 -0.0163763 0.128391
+-0.259073 0.112394 -0.0498989
+-0.320782 0.109631 -0.0425131
+-0.330688 0.10691 -0.0433542
+-0.339343 0.102362 -0.0465497
+-0.348883 0.0986778 -0.0481839
+-0.358069 0.093759 -0.051441
+-0.136873 -0.0120468 -0.151363
+-0.141221 -0.0340507 -0.146516
+-0.128382 -0.0309686 -0.160513
+-0.115237 -0.0338872 -0.171647
+-0.10415 -0.0221273 -0.177401
+-0.0925264 -0.00544945 -0.180794
+-0.106711 -0.006873 -0.173788
+-0.119908 0.000277304 -0.164218
+-0.114456 0.0181659 -0.165215
+-0.0825173 0.0101783 -0.18266
+-0.118672 -0.048041 -0.168781
+-0.121553 -0.0618819 -0.163771
+-0.110894 -0.0624358 -0.172199
+-0.39573 0.0793655 -0.0497941
+-0.397364 0.075223 -0.0621397
+-0.389269 0.0806101 -0.0580425
+-0.379676 0.0841545 -0.0574472
+-0.372813 0.0884948 -0.0523992
+-0.373143 0.0902016 -0.0428662
+-0.405287 0.0698332 -0.0665904
+-0.0509752 -0.0107302 -0.193683
+0.0684379 0.0587582 0.184268
+0.0950817 0.0700393 0.176254
+0.111866 0.0484329 0.175538
+0.0135438 0.23103 0.0887354
+-0.148114 -0.221117 0.051071
+-0.159772 -0.21833 0.0562015
+-0.171141 -0.215827 0.049958
+-0.172124 -0.214009 0.0349009
+-0.183868 -0.211625 0.0333021
+-0.48067 0.00147563 -0.0941531
+-0.48325 0.00511008 -0.0871288
+-0.478886 -0.00670064 -0.0953813
+-0.488509 -0.000247977 -0.083197
+-0.490106 0.000173262 -0.0745092
+-0.486384 0.0077296 -0.0687938
+-0.490839 -0.00729847 -0.0675525
+-0.487573 -0.00769379 -0.0851859
+0.305413 0.115443 0.0310865
+0.303067 0.109776 0.0361991
+0.301528 0.100881 0.0364219
+0.304542 0.0950282 0.0278378
+0.308585 0.101812 0.0193478
+0.30202 0.0858542 0.0255498
+0.294651 0.0776239 0.0308248
+-0.13973 -0.120127 -0.0894371
+0.0774121 -0.101688 -0.13441
+0.08428 -0.0964758 -0.11861
+0.0757635 -0.104018 -0.0952178
+0.0953267 -0.0839993 -0.106017
+0.0913039 -0.0749531 -0.0365181
+-0.243097 0.150078 0.0206614
+-0.23361 0.154351 0.0222242
+-0.0716637 -0.194344 0.123031
+-0.0862633 -0.191679 0.120669
+-0.079351 -0.199669 0.116734
+0.0905437 -0.0720831 -0.0082291
+-0.442375 -0.0805602 -0.0729391
+-0.434684 -0.074604 -0.0854765
+-0.437054 -0.0869675 -0.0607547
+-0.42771 -0.0945168 -0.0528257
+-0.418352 -0.0983054 -0.0400735
+-0.423279 -0.0966001 -0.0655131
+-0.408659 -0.101487 -0.0697238
+-0.416431 -0.0909254 -0.0763075
+-0.411779 -0.0788541 -0.0841388
+-0.40598 -0.0655492 -0.0884204
+-0.416055 -0.0491274 -0.0936407
+-0.400038 -0.0506823 -0.0905303
+-0.381421 -0.0453955 -0.0869276
+-0.402243 -0.110281 -0.0579508
+-0.390216 -0.11874 -0.0501108
+-0.383494 -0.123101 -0.0364651
+-0.386125 -0.115131 -0.0203428
+-0.369628 -0.130374 -0.0274223
+-0.401456 -0.102315 -0.0198679
+-0.394171 -0.100274 -0.0727645
+-0.374041 -0.0974336 -0.0718592
+-0.385665 -0.0860135 -0.0779307
+-0.359712 -0.131969 -0.0141493
+-0.407755 -0.107591 -0.0445125
+-0.442105 -0.0634097 -0.0906833
+-0.422825 -0.0823939 -0.081556
+-0.45077 -0.0554598 -0.0929264
+-0.451195 -0.043705 -0.0972223
+-0.437782 -0.0340365 -0.100162
+-0.433036 -0.0155961 -0.100753
+-0.454922 -0.0324231 -0.100841
+-0.458814 -0.0492048 -0.0932669
+-0.44563 -0.00538073 -0.102567
+-0.445825 -0.028368 -0.102242
+0.187567 0.0115241 0.121869
+0.199923 0.0237015 0.120686
+0.209608 0.0257357 0.11161
+0.217483 0.0222293 0.0938709
+0.22097 0.0324773 0.104357
+0.150551 0.0108782 -0.126188
+0.141789 0.000110033 -0.133433
+0.159708 0.00816767 -0.119042
+0.161309 -0.00244862 -0.114514
+0.154667 -0.0107676 -0.117543
+0.147178 -0.0103624 -0.12647
+0.148617 -0.0204088 -0.118466
+0.138524 -0.011451 -0.134851
+0.128907 -0.0262587 -0.139176
+0.125896 -0.0139325 -0.146588
+0.113147 -0.000537483 -0.155555
+0.103133 0.0164001 -0.156394
+0.104298 -0.0149856 -0.16309
+0.12017 -0.0355985 -0.145343
+0.110453 -0.0355441 -0.154722
+-0.0440265 0.0567607 -0.185688
+0.279992 0.165929 -0.0437039
+-0.215359 -0.201377 0.036184
+-0.223693 -0.188967 0.0478234
+-0.22968 -0.165617 0.0632744
+-0.243184 -0.140528 0.0722798
+-0.228035 -0.194952 0.0356759
+-0.238496 -0.19363 0.0236924
+-0.254124 -0.186606 0.0200977
+-0.257716 -0.185407 0.00294716
+-0.272871 -0.179363 -0.00179042
+-0.287583 -0.170182 0.0102401
+-0.244128 -0.182217 -0.00440503
+-0.229531 -0.186515 -5.59474e-005
+-0.220475 -0.194692 0.00897812
+-0.262511 -0.176872 0.0277986
+-0.253263 -0.17311 0.0399939
+-0.242546 -0.168318 0.0523859
+-0.257115 -0.159426 0.0493283
+-0.275877 -0.169308 0.0245016
+-0.245871 -0.15378 0.0613383
+-0.251727 -0.181928 0.0313647
+-0.212684 -0.200277 0.0170569
+-0.203523 -0.203845 0.0214033
+-0.192659 -0.203121 0.0182344
+-0.188052 -0.194159 0.0076752
+-0.212268 -0.20365 0.0267033
+-0.231299 -0.195988 0.0142458
+-0.196414 -0.206554 0.0248662
+-0.19286 -0.209888 0.0326474
+-0.198432 -0.206747 0.0442575
+-0.285561 -0.174648 -0.00239336
+-0.297363 -0.168082 -0.0129349
+-0.27946 -0.176559 0.00652693
+-0.316703 -0.146788 -0.0370359
+-0.315576 -0.155996 -0.0279132
+-0.352319 -0.13774 -0.042353
+-0.356277 -0.125511 -0.0545457
+-0.371876 -0.118612 -0.0595906
+-0.362453 -0.135739 -0.0357733
+-0.307601 -0.160835 -0.0228167
+-0.298673 -0.163768 -0.0213152
+-0.283795 -0.159885 -0.0252424
+-0.288901 -0.16657 -0.018883
+-0.271431 -0.163684 -0.0212057
+-0.267306 -0.173463 -0.0127247
+-0.271834 -0.180462 0.00664249
+-0.26405 -0.184059 0.0090717
+-0.256203 -0.187567 0.0114726
+-0.248391 -0.190551 0.0145387
+-0.190153 -0.206614 0.0534964
+-0.442555 0.000265523 0.0267302
+-0.430352 0.014091 0.0310689
+-0.424721 0.0323378 0.0173275
+-0.427036 -0.00112736 0.0417282
+-0.423392 -0.0164383 0.0442389
+-0.416537 0.00176833 0.051877
+0.280404 0.135093 0.054526
+0.278761 0.125803 0.0628293
+-0.3705 -0.131378 -0.0365069
+-0.0820636 -0.222416 0.0826194
+-0.0463747 0.167896 -0.10472
+-0.0288613 0.144009 -0.134253
+-0.0449952 0.153536 -0.122945
+0.290283 0.121714 -0.0740144
+0.27745 0.12898 -0.0769404
+0.276832 0.144257 -0.0755745
+0.263655 0.133985 -0.0803847
+0.243962 0.140125 -0.0819406
+0.251818 0.124002 -0.0820614
+0.279041 0.112623 -0.0763696
+0.271158 0.153665 -0.0709006
+0.257921 0.162187 -0.0701532
+0.269864 0.163795 -0.0626536
+0.248208 0.153711 -0.0775922
+0.259474 0.169139 -0.0606852
+0.254806 0.17483 -0.0498519
+0.263115 0.174352 -0.0393777
+0.242498 0.163999 -0.0735165
+0.286047 0.147304 -0.0690663
+0.290117 0.152194 -0.0598459
+0.294561 0.14326 -0.0673603
+0.30189 0.134539 -0.0645447
+0.307831 0.128351 -0.0595143
+0.309435 0.118425 -0.0601117
+0.300896 0.111367 -0.0646074
+0.313574 0.124342 -0.0532657
+0.318389 0.120863 -0.046066
+0.317393 0.113308 -0.0379339
+0.320268 0.118282 -0.0307619
+0.320218 0.116784 -0.0221264
+0.319481 0.11809 -0.0104565
+0.31556 0.126648 -0.00415804
+0.316602 0.113926 -0.0450935
+0.311777 0.106867 -0.0480733
+0.308275 0.109186 -0.056207
+0.308505 0.0983412 -0.0486102
+0.303144 0.0925952 -0.0531051
+0.309601 0.0934764 -0.0417938
+0.313156 0.0959646 -0.0340974
+0.296983 0.117415 -0.0699211
+0.320685 0.122446 -0.0255896
+0.316942 0.130978 -0.0270583
+0.314854 0.133023 -0.0360942
+0.310847 0.141503 -0.0383109
+0.309318 0.141241 -0.0473689
+0.304008 0.147351 -0.0517981
+0.307045 0.147922 -0.034494
+0.298268 0.153813 -0.0368445
+0.309649 0.146194 -0.0271281
+0.305563 0.148274 -0.019965
+0.297494 0.154475 -0.0200693
+0.292877 0.15678 -0.00921317
+0.286071 0.16011 0.000622243
+0.275595 0.166073 0.0087612
+0.260224 0.174589 0.0077726
+0.250622 0.175429 0.0254095
+0.311613 0.140756 -0.0214101
+0.308518 0.145026 -0.0132653
+0.296427 0.156548 -0.0286188
+0.290888 0.159898 -0.0225221
+0.280072 0.168055 -0.0192366
+0.00514285 -0.0262337 0.19953
+0.000257161 -0.0403876 0.197028
+-0.014043 -0.051569 0.191857
+0.0198521 -0.0289458 0.199008
+-0.449915 0.00669424 0.0132997
+0.189521 0.183354 -0.0659039
+0.181083 0.188202 -0.0613191
+0.166139 0.19374 -0.0550867
+0.180401 0.19548 -0.0478811
+0.173792 0.202184 -0.0307436
+0.014203 -0.120681 -0.18353
+0.0238414 -0.113012 -0.183101
+0.0334543 -0.103091 -0.182186
+0.0330355 -0.116504 -0.176425
+0.0318734 -0.125101 -0.172367
+0.0356839 -0.130691 -0.164289
+-0.0735369 0.130882 -0.137882
+-0.0601936 0.143412 -0.130466
+-0.0624708 0.118584 -0.151005
+-0.041212 0.115328 -0.157398
+-0.0420797 0.100294 -0.167006
+0.186298 0.15686 0.109529
+-0.0106882 -0.179034 -0.053539
+-0.0257532 -0.183285 -0.05601
+-0.446546 -0.0201472 0.0199448
+-0.455322 -0.0183989 0.0101318
+-0.462739 -0.00927772 0.00133495
+-0.447924 -0.0304864 0.0103481
+-0.481411 0.0150496 -0.0638608
+0.320421 0.119931 -0.0165344
+0.317042 0.125637 -0.0119931
+0.318454 0.112192 -0.0157929
+0.0929399 0.159812 -0.0958943
+0.110625 0.166917 -0.0892709
+0.124473 0.171136 -0.0845853
+0.136186 0.183251 -0.0742106
+0.13866 0.171692 -0.0823798
+0.148566 0.160826 -0.0859647
+0.142872 0.144712 -0.0905597
+0.160795 0.122901 -0.0906349
+0.126088 0.145302 -0.0936953
+0.115879 0.130871 -0.0990572
+0.124327 0.191494 -0.0663769
+0.106391 0.192491 -0.0670656
+0.0883872 0.188262 -0.0745766
+0.0719507 0.196806 -0.0642255
+0.108844 0.201665 -0.051653
+0.0984999 0.177737 -0.0836605
+-0.12026 -0.223902 0.053195
+-0.109446 -0.224931 0.0565831
+-0.111541 -0.221619 0.0451678
+-0.242046 -0.187623 0.0325776
+0.00996937 -0.0129898 0.200095
+-0.463877 -0.0324637 -0.100365
+-0.460224 -0.0241828 -0.10134
+-0.459739 -0.0142811 -0.101377
+0.133208 -0.0412449 -0.119383
+0.123352 -0.0526797 -0.120194
+0.132637 -0.0343741 -0.130094
+-0.164742 -0.122178 -0.0595052
+-0.0612791 -0.162566 -0.109688
+-0.0710129 -0.164834 -0.0958253
+-0.0735533 -0.172186 -0.0768106
+-0.0876452 -0.16161 -0.0867929
+-0.476659 -0.0271538 -0.0964533
+-0.474429 -0.0190092 -0.0973528
+0.0739718 -0.0242315 -0.180703
+0.162304 -0.00560673 0.133058
+-0.479103 -0.0320985 -0.0940027
+-0.481417 -0.0340858 -0.0884057
+-0.486127 -0.0306435 -0.0860583
+-0.486018 -0.0242883 -0.0872577
+-0.482104 -0.0219439 -0.0922364
+-0.483886 -0.0355832 -0.0827419
+-0.480962 -0.0402868 -0.0788522
+-0.488368 -0.0267363 -0.0830009
+-0.489744 -0.0252165 -0.0755797
+-0.49086 -0.0244246 -0.0695498
+-0.489653 -0.0247292 -0.0607899
+-0.490316 -0.0194905 -0.0649848
+-0.490364 -0.0284268 -0.0721027
+-0.486281 -0.0339622 -0.0727452
+-0.484931 -0.0357981 -0.0657032
+-0.480417 -0.0422452 -0.0650589
+-0.486623 -0.0314942 -0.0598312
+-0.47196 -0.030399 -0.0984255
+-0.00259196 0.0546073 0.192242
+-0.0057345 0.0374844 0.19471
+-0.0096283 0.148792 0.164972
+-0.0781263 -0.119784 -0.166335
+-0.0693606 -0.129505 -0.164109
+-0.0688752 -0.121624 -0.171204
+-0.293096 0.10467 -0.0530655
+-0.281535 0.101848 -0.0551465
+-0.285102 0.10937 -0.0500982
+-0.270178 0.101819 -0.0557902
+0.146413 0.215601 0.0217432
+-0.0558768 -0.200581 -0.0058347
+-0.121903 -0.222398 0.0753827
+-0.131484 -0.222972 0.0672943
+-0.0113622 -0.139899 -0.177586
+-0.461084 -0.0182082 0.00293327
+-0.464563 -0.0224324 -0.00273456
+-0.465956 -0.0279422 -0.0104269
+-0.0796578 0.1856 -0.0608717
+-0.408982 -0.00209341 0.057713
+-0.402494 -0.00941199 0.0623365
+-0.403353 -0.0196112 0.058583
+-0.405762 -0.0286267 0.0515338
+-0.405618 -0.0398167 0.0440031
+-0.404736 -0.0529218 0.0334363
+-0.409831 -0.0636201 0.0189125
+-0.402566 -0.0785474 0.0097687
+-0.384311 -0.0886192 0.0159024
+-0.399923 0.000206371 0.0648148
+-0.395259 0.0101254 0.0639619
+-0.399409 0.0198184 0.0541902
+-0.401015 0.0317499 0.0417548
+-0.386013 0.0426196 0.0409759
+-0.390555 0.0202045 0.0613875
+-0.376091 0.028226 0.0648869
+-0.390478 0.00307787 0.0712524
+-0.414992 0.0273589 0.0326168
+-0.0822249 -0.219415 0.0436093
+0.320548 0.121146 -0.0209076
+-0.0307118 0.209112 0.125044
+0.244694 0.0716962 -0.0789439
+-0.142918 -0.221898 0.0595833
+-0.141055 -0.219727 0.0695305
+-0.148384 -0.213823 0.0747687
+-0.140352 -0.208727 0.0848566
+-0.159369 -0.210758 0.0714338
+-0.12697 -0.210548 0.09034
+-0.123362 -0.217457 0.0840045
+0.291319 0.148647 -0.0653
+0.285923 0.152334 -0.064874
+0.280206 0.15113 -0.0687143
+-0.011495 -0.128161 0.165796
+-0.0104489 -0.114268 0.172787
+-0.456328 0.00238289 0.00911999
+-0.462716 0.00053365 0.00188537
+-0.452719 0.000801432 0.0144475
+-0.447711 -0.00566448 0.020379
+-0.447072 0.00296473 0.0202268
+-0.439977 0.00940057 0.0233511
+-0.441315 -0.0101266 0.0273906
+-0.434861 -0.0036457 0.0339979
+-0.435623 0.00541616 0.0309225
+-0.397014 -0.107359 -0.0661138
+-0.394501 -0.112676 -0.0601278
+-0.39739 -0.114494 -0.052232
+-0.386945 -0.116865 -0.0581355
+-0.379673 -0.123432 -0.0518067
+-0.379349 -0.114175 -0.0625035
+-0.368845 -0.10815 -0.0658517
+-0.359899 -0.0973536 -0.069139
+-0.379424 -0.105627 -0.0684125
+-0.345533 -0.0999729 -0.0649614
+-0.39552 -0.115847 -0.0438253
+-0.370874 -0.124971 -0.0532356
+-0.363364 -0.129762 -0.049668
+-0.316778 -0.125001 -0.0493635
+-0.302639 -0.123107 -0.0473696
+-0.287039 -0.124882 -0.0436812
+-0.273759 -0.109 -0.046197
+-0.270469 -0.126021 -0.0397525
+-0.254738 -0.113942 -0.0416881
+-0.278345 -0.0886894 -0.0527072
+-0.266377 -0.0678443 -0.0560345
+-0.281535 -0.0441861 -0.0626876
+-0.263538 -0.0493458 -0.0593802
+-0.384834 -0.123009 -0.0449511
+-0.378696 -0.127011 -0.0416145
+-0.37682 -0.126976 -0.0335983
+-0.38166 -0.12148 -0.0267217
+-0.45038 -0.0749298 -0.0724473
+-0.45796 -0.0684169 -0.0757915
+-0.463668 -0.0613132 -0.0789114
+-0.470167 -0.0560323 -0.0735728
+-0.456908 -0.0647581 -0.0842542
+-0.468123 -0.0541536 -0.0821805
+-0.355365 0.0854034 -0.0639831
+-0.345495 0.0784018 -0.0686681
+-0.345566 0.0642705 -0.0754244
+-0.345752 0.0869151 -0.0639626
+-0.340409 0.0921156 -0.0595821
+0.0310287 -0.0498547 0.193641
+0.0198894 -0.141937 -0.165459
+-0.228047 -0.00611597 0.151539
+-0.21379 -0.0101939 0.154678
+-0.21124 0.00524665 0.156381
+-0.196797 0.0093087 0.159224
+-0.188163 0.0229398 0.155281
+-0.186748 -0.000713447 0.1644
+-0.171469 -0.00241387 0.168893
+-0.15893 -0.0134394 0.168193
+-0.219561 -0.00229464 0.154558
+-0.211896 -0.00271869 0.156825
+0.241886 0.140309 0.0860302
+-0.254378 -0.180608 -0.00572631
+-0.0256362 -0.192795 -0.0108483
+-0.0213145 -0.188013 -0.0254959
+0.265879 0.0793336 0.0857758
+-0.178895 -0.21406 0.0388483
+-0.1723 -0.215898 0.0423547
+-0.244753 0.00128651 0.146437
+-0.237347 0.0022348 0.148985
+0.25157 0.0457267 -0.0527654
+-0.475261 -0.00121759 -0.0185581
+-0.477838 0.00416433 -0.0259061
+-0.490474 0.00258014 -0.0683864
+0.196069 0.0347717 -0.0957831
+0.201615 0.0491382 -0.0939952
+0.18803 0.0621831 -0.0972113
+0.167364 0.0756427 -0.0996243
+0.172397 0.0998559 -0.0921219
+0.187663 0.033633 -0.100368
+0.174757 0.0400994 -0.106834
+0.197053 0.0262793 -0.0913859
+0.202678 0.0226549 -0.0845706
+0.210031 0.0556486 -0.0907929
+0.192507 0.0527045 -0.097814
+0.180216 0.0529828 -0.102021
+0.175563 0.0652764 -0.100425
+0.162926 0.0640423 -0.104369
+0.142127 0.0624953 -0.113056
+0.151939 0.0756284 -0.103791
+0.132789 0.0797865 -0.10854
+-0.348441 -0.142527 -0.0348869
+-0.342301 -0.14637 -0.0301304
+0.148711 0.183289 -0.0726251
+0.161656 0.181236 -0.0729202
+0.163216 0.188442 -0.064501
+-0.238556 -0.0310506 -0.0635487
+-0.00291307 0.0352651 -0.19427
+-0.00553357 0.0203276 -0.197456
+-0.0214647 0.0159016 -0.196991
+0.0071277 0.0113207 -0.197326
+0.00273327 -0.1618 -0.121337
+-0.011111 -0.168484 -0.106465
+-0.0235051 -0.167364 -0.116293
+-0.0143519 -0.172252 -0.092658
+-0.010652 0.0604636 -0.187016
+0.100536 0.224554 0.0517985
+0.114136 0.219745 0.0578874
+0.091313 0.225287 0.0595263
+0.0797026 0.227767 0.0581816
+0.0723327 0.229027 0.0453777
+0.0829269 0.227441 0.030913
+0.0668447 0.229241 0.0632039
+0.114338 0.216906 0.0705535
+0.103966 0.217771 0.0772861
+0.27314 0.0904289 -0.0742729
+0.27865 0.100969 -0.0740164
+-0.150995 0.191569 0.0449039
+-0.162861 0.18261 0.0597716
+-0.181673 0.17237 0.0564074
+-0.190646 0.173251 0.0363386
+-0.133419 0.199622 0.048713
+0.30869 0.146192 -0.039147
+0.310112 0.144647 -0.0351315
+0.312128 0.140484 -0.0337784
+0.312846 0.137243 -0.0372711
+0.313626 0.133 -0.043947
+0.311506 0.138025 -0.0426565
+0.314828 0.128729 -0.0486676
+-0.39891 0.0356498 -0.091534
+-0.410483 0.0346101 -0.0927351
+-0.394039 0.04254 -0.0886511
+-0.0878188 0.211246 0.0894536
+-0.102222 0.20704 0.0831881
+-0.105324 0.210562 0.066741
+-0.119615 0.203259 0.0673147
+-0.0114042 -0.153427 -0.162654
+-0.0216924 -0.152759 -0.162414
+-0.0276497 -0.155233 -0.154041
+-0.0229191 -0.159385 -0.144364
+-0.028222 -0.162884 -0.130294
+-0.00911545 -0.159755 -0.143127
+0.00381773 -0.158174 -0.138235
+0.0158629 -0.151971 -0.145374
+-0.043042 -0.159811 -0.131283
+-0.0578498 -0.157583 -0.12483
+-0.0730611 -0.153821 -0.118257
+-0.0918654 -0.142271 -0.119321
+-0.0865458 0.151799 -0.110721
+-0.0747559 0.164903 -0.0996003
+-0.0877131 0.169611 -0.0847258
+-0.104298 0.14448 -0.108615
+-0.111502 0.130777 -0.117599
+-0.290598 0.122665 -0.0344017
+-0.283048 0.125286 -0.0326538
+-0.2771 0.131561 -0.0234897
+-0.273262 0.124078 -0.0371466
+-0.27542 0.117855 -0.0440148
+-0.186493 0.17034 -0.00116882
+-0.17177 0.166823 -0.0203714
+-0.180684 0.153502 -0.0354437
+-0.205992 0.162616 -0.00205048
+-0.198324 0.14709 -0.0338166
+-0.00592029 0.100685 0.181441
+-0.0167332 0.118964 0.174829
+0.0159467 0.103079 0.18061
+0.0284124 0.0849417 0.184432
+-0.442518 -0.0709443 -0.0863691
+-0.448856 -0.0662201 -0.0874812
+-0.134667 0.000943154 0.177011
+-0.00310122 0.234913 0.0628362
+-0.46231 -0.0586249 -0.0404296
+0.227538 0.0369226 -0.0721269
+0.236821 0.0423656 -0.0668035
+0.240605 0.0371232 -0.0549899
+0.229841 0.0265624 -0.0470128
+-0.463607 0.0286461 -0.0857262
+-0.456726 0.027279 -0.0906909
+-0.469667 0.0222263 -0.0848045
+-0.450827 0.0237483 -0.0946958
+0.216321 0.138978 0.105626
+0.21636 0.176018 -0.068996
+0.224724 0.177449 -0.0640927
+0.23515 0.172803 -0.0661681
+0.260778 0.097572 0.0930733
+0.253697 0.103791 0.0969488
+0.000426256 0.00615835 0.198705
+-0.0143538 0.00308408 0.196759
+0.00496704 0.0199039 0.19777
+-0.0130132 0.231981 0.0855148
+-0.000488198 0.230115 0.092734
+-0.486599 0.00442738 -0.0834039
+-0.483174 0.00834215 -0.0830378
+-0.481531 0.012535 -0.0769011
+-0.479231 0.00931576 -0.0872037
+-0.479136 0.0130796 -0.0824478
+-0.474567 0.0182278 -0.0820571
+-0.488599 0.00268956 -0.0794002
+-0.489312 -0.00209098 -0.0787543
+-0.487879 0.00455228 -0.0748952
+-0.484573 0.00890921 -0.0740255
+-0.481621 0.0133511 -0.0706356
+-0.486157 0.0013552 -0.0870001
+0.074114 -0.0959285 -0.152444
+0.0788079 -0.0848095 -0.156079
+0.0776661 -0.0751258 -0.164638
+0.307857 0.12345 -0.0629205
+0.305632 0.118432 -0.0643039
+0.306506 0.11278 -0.0612846
+0.303699 0.106552 -0.0605951
+0.296786 0.103863 -0.0648658
+0.290509 0.0987054 -0.0684109
+0.30475 0.128034 -0.0643101
+0.297851 0.128749 -0.0681357
+-0.339388 0.107776 -0.0308211
+-0.331422 0.111016 -0.0225385
+0.1951 0.198278 0.038898
+0.20821 0.19181 0.0401465
+0.215469 0.182876 0.0549909
+0.218888 0.190238 0.0280165
+0.230673 0.188298 0.0132706
+-0.467314 -0.059895 -0.0588218
+-0.459485 -0.0677804 -0.0607044
+0.307129 0.146219 -0.0474896
+-0.422251 0.0576286 -0.0767091
+-0.42861 0.0541642 -0.076605
+3  590 369 1460
+3  828 58 829
+3  725 1818 759
+3  323 872 884
+3  1423 812 1424
+3  1201 114 1199
+3  259 1115 264
+3  259 264 231
+3  130 1023 1320
+3  535 536 29
+3  60 1170 895
+3  1010 1011 489
+3  990 424 105
+3  1534 1533 1537
+3  1537 722 1534
+3  866 867 321
+3  28 543 500
+3  849 321 867
+3  592 1519 593
+3  160 592 593
+3  581 52 272
+3  741 742 797
+3  1456 1336 513
+3  1268 802 500
+3  33 137 135
+3  567 566 65
+3  1141 462 1595
+3  11 434 435
+3  374 177 375
+3  334 894 893
+3  168 734 303
+3  1364 104 1253
+3  1617 71 1616
+3  1372 1617 1616
+3  375 177 377
+3  717 296 1135
+3  1508 76 1356
+3  117 666 474
+3  391 1379 1377
+3  1576 1572 603
+3  368 327 7
+3  332 63 330
+3  1178 1185 126
+3  410 164 409
+3  1091 341 1092
+3  210 1475 211
+3  40 398 1302
+3  1200 1202 230
+3  1796 1254 774
+3  549 561 552
+3  440 1661 1252
+3  957 960 1116
+3  957 1116 955
+3  1627 1626 435
+3  1248 575 336
+3  357 73 358
+3  1254 1255 1038
+3  323 330 63
+3  209 211 136
+3  525 696 526
+3  1464 696 525
+3  295 717 94
+3  238 96 1741
+3  1048 1049 178
+3  179 1049 1048
+3  756 752 755
+3  901 334 893
+3  890 901 893
+3  135 853 856
+3  32 513 1450
+3  1450 513 509
+3  419 164 789
+3  403 164 419
+3  150 1501 690
+3  690 970 150
+3  895 896 894
+3  1770 1772 764
+3  767 1772 1770
+3  142 661 662
+3  1297 402 163
+3  1297 163 1299
+3  1654 1646 181
+3  1654 181 1647
+3  1305 1307 431
+3  1539 1538 781
+3  587 50 586
+3  1671 1672 149
+3  895 1170 1553
+3  88 1758 1757
+3  678 141 676
+3  50 967 586
+3  965 967 50
+3  331 332 330
+3  247 57 616
+3  616 57 655
+3  741 1724 745
+3  1580 468 931
+3  160 595 1480
+3  310 743 744
+3  888 883 891
+3  556 561 1583
+3  1583 38 556
+3  14 1497 1495
+3  714 479 31
+3  254 45 238
+3  1113 1110 49
+3  262 1110 1113
+3  1462 1039 972
+3  973 1039 1462
+3  968 969 964
+3  356 203 157
+3  420 1360 421
+3  103 420 421
+3  459 1157 1158
+3  459 1158 1159
+3  535 29 537
+3  650 24 653
+3  653 24 1274
+3  313 951 949
+3  1340 358 73
+3  74 289 605
+3  740 297 758
+3  813 1440 1721
+3  1721 1720 813
+3  107 430 473
+3  338 1080 1086
+3  444 428 443
+3  1078 101 1082
+3  44 444 360
+3  764 765 296
+3  160 593 594
+3  1139 462 1141
+3  1649 1046 1648
+3  1148 638 1149
+3  1146 638 1148
+3  131 138 33
+3  1492 1491 134
+3  957 274 1713
+3  362 1055 1058
+3  142 143 218
+3  1740 1741 199
+3  187 547 1664
+3  1664 547 1768
+3  1144 639 1149
+3  1144 1149 638
+3  889 890 333
+3  543 1064 1063
+3  1077 1084 1078
+3  574 860 314
+3  272 583 580
+3  580 583 579
+3  1291 431 1309
+3  360 358 1340
+3  1332 0 1330
+3  846 1750 1749
+3  1749 1750 1748
+3  48 215 232
+3  1499 1500 1503
+3  393 1622 69
+3  581 272 580
+3  1800 1421 1419
+3  1069 100 1068
+3  1068 100 1074
+3  319 318 82
+3  1455 512 1456
+3  80 331 330
+3  423 20 427
+3  121 850 570
+3  1186 1797 1798
+3  145 241 242
+3  606 286 839
+3  94 1129 1130
+3  1499 134 1500
+3  1269 251 156
+3  123 122 106
+3  1196 115 1197
+3  57 247 250
+3  519 1407 1413
+3  1337 1341 437
+3  64 381 382
+3  712 306 727
+3  713 306 712
+3  561 556 524
+3  561 524 552
+3  427 386 161
+3  1497 694 1495
+3  1450 509 1451
+3  560 521 558
+3  1234 205 1236
+3  151 1233 208
+3  326 1759 1757
+3  926 925 116
+3  427 20 386
+3  396 72 366
+3  243 242 241
+3  903 334 901
+3  1408 504 1336
+3  766 296 1485
+3  1226 1225 1224
+3  857 14 147
+3  23 377 379
+3  379 377 177
+3  194 485 905
+3  1217 287 1216
+3  1188 1270 89
+3  650 653 654
+3  1769 1768 547
+3  562 1404 522
+3  1495 518 1496
+3  1496 14 1495
+3  822 823 824
+3  824 533 822
+3  847 846 278
+3  51 846 847
+3  1341 1338 76
+3  1341 76 1508
+3  446 1555 1590
+3  792 1541 783
+3  289 609 608
+3  64 371 381
+3  692 693 150
+3  969 278 967
+3  968 278 969
+3  1002 737 1109
+3  754 753 491
+3  976 5 560
+3  975 5 976
+3  1236 204 1235
+3  338 1079 1080
+3  1067 1068 349
+3  349 1068 1072
+3  593 19 594
+3  1446 826 1454
+3  1088 1087 354
+3  100 1075 1074
+3  1074 1075 1076
+3  907 706 189
+3  1474 79 1473
+3  1071 1094 113
+3  318 877 82
+3  277 577 576
+3  1293 400 40
+3  1016 1015 2
+3  1017 1015 1016
+3  1363 1364 436
+3  436 1364 1365
+3  873 8 876
+3  643 171 486
+3  901 890 61
+3  361 73 357
+3  1391 1390 601
+3  444 107 365
+3  1292 1293 40
+3  331 355 332
+3  1478 355 331
+3  1152 1157 459
+3  938 1157 1152
+3  284 23 285
+3  409 404 75
+3  75 404 1568
+3  1728 111 577
+3  115 1198 1197
+3  1375 70 1376
+3  196 1741 1740
+3  1214 1215 609
+3  201 1735 1736
+3  1246 82 1245
+3  1250 77 1251
+3  1251 77 1385
+3  485 193 484
+3  853 854 856
+3  152 223 660
+3  291 1189 659
+3  115 628 1203
+3  959 373 950
+3  653 1274 1280
+3  881 322 882
+3  62 1701 885
+3  911 1557 907
+3  887 868 336
+3  95 912 906
+3  1048 178 377
+3  549 1768 1767
+3  1182 731 732
+3  732 301 1182
+3  444 365 108
+3  382 68 383
+3  1743 1744 226
+3  1712 276 1711
+3  1712 1711 271
+3  1756 231 264
+3  957 1713 269
+3  96 198 199
+3  1296 1631 401
+3  401 1631 1297
+3  1760 326 327
+3  1512 768 1313
+3  67 1395 930
+3  1081 337 1080
+3  869 320 866
+3  874 318 319
+3  904 880 321
+3  904 321 849
+3  1246 1245 328
+3  235 197 234
+3  1118 1781 1780
+3  1513 837 1515
+3  819 1336 512
+3  171 106 122
+3  1041 515 1040
+3  568 567 570
+3  57 656 655
+3  655 656 385
+3  268 1275 965
+3  4 626 624
+3  256 626 623
+3  361 357 74
+3  1016 458 1017
+3  606 289 608
+3  84 1209 1207
+3  1280 1274 643
+3  365 473 3
+3  1759 88 1757
+3  288 610 359
+3  1192 283 1193
+3  1730 1731 908
+3  909 1731 1730
+3  878 317 875
+3  634 633 210
+3  210 633 632
+3  342 1478 15
+3  679 678 140
+3  46 591 598
+3  535 534 536
+3  718 295 724
+3  1811 335 1812
+3  877 876 317
+3  875 8 870
+3  1586 1588 588
+3  325 317 88
+3  1629 71 1394
+3  1394 71 1374
+3  313 949 886
+3  153 687 686
+3  1664 549 552
+3  310 744 1291
+3  1333 1334 674
+3  372 240 204
+3  18 953 954
+3  192 706 907
+3  850 1032 1034
+3  1695 1736 97
+3  664 666 117
+3  359 108 362
+3  1621 1622 1620
+3  494 158 493
+3  996 1005 1000
+3  631 229 1746
+3  1100 345 113
+3  235 198 236
+3  1272 89 1271
+3  198 1546 1547
+3  1132 1124 1125
+3  96 238 237
+3  612 611 39
+3  248 611 612
+3  677 143 142
+3  22 475 385
+3  551 186 541
+3  541 186 820
+3  1068 1074 1072
+3  1072 1074 350
+3  1081 1080 15
+3  784 782 1765
+3  1079 15 1080
+3  1380 1656 1345
+3  350 1076 1078
+3  103 389 390
+3  366 367 73
+3  1076 1077 1078
+3  1699 223 687
+3  1027 129 1021
+3  1028 129 1027
+3  239 197 236
+3  322 891 1708
+3  473 472 474
+3  735 303 734
+3  480 185 479
+3  372 197 240
+3  324 900 1705
+3  434 433 617
+3  490 249 202
+3  874 873 318
+3  378 959 958
+3  221 151 222
+3  864 869 865
+3  496 217 144
+3  1133 773 1666
+3  1666 773 1665
+3  1699 687 153
+3  628 630 629
+3  272 52 267
+3  408 1290 1289
+3  1200 52 1202
+3  1441 1817 1440
+3  1147 834 642
+3  642 1146 1147
+3  1561 226 1744
+3  316 878 875
+3  320 870 871
+3  493 158 371
+3  493 371 45
+3  1173 800 1172
+3  890 889 892
+3  890 892 61
+3  423 420 20
+3  1739 195 1738
+3  938 1165 1164
+3  834 1154 642
+3  642 1154 1153
+3  964 969 1275
+3  1275 969 965
+3  1150 836 1151
+3  973 1462 1463
+3  80 337 1081
+3  82 1760 327
+3  654 652 651
+3  650 654 651
+3  257 628 625
+3  1580 931 429
+3  568 570 27
+3  15 1079 1092
+3  314 861 862
+3  1273 1272 1271
+3  171 24 172
+3  486 569 120
+3  486 122 569
+3  1031 1026 1030
+3  1235 241 145
+3  560 558 148
+3  448 707 1279
+3  476 185 483
+3  490 242 10
+3  595 1698 162
+3  1153 938 1152
+3  971 1494 695
+3  695 1494 1493
+3  906 907 1557
+3  449 916 915
+3  1656 1344 1345
+3  85 1123 977
+3  977 1123 772
+3  354 81 831
+3  1085 1084 338
+3  828 509 827
+3  1557 911 188
+3  1556 1585 1584
+3  1556 1584 425
+3  106 1037 1036
+3  106 1036 127
+3  1202 581 227
+3  923 468 924
+3  131 33 132
+3  561 549 993
+3  993 549 994
+3  562 557 521
+3  544 187 551
+3  40 400 398
+3  1668 998 1673
+3  1396 225 1743
+3  630 213 629
+3  54 983 1116
+3  53 963 962
+3  1755 963 53
+3  215 629 213
+3  1371 1374 1617
+3  1617 1374 71
+3  156 251 250
+3  1681 1683 1671
+3  1096 1095 1172
+3  631 213 630
+3  324 1702 1700
+3  1672 148 558
+3  955 1116 275
+3  1731 1732 95
+3  372 144 234
+3  57 384 656
+3  338 1084 1077
+3  197 235 236
+3  234 144 233
+3  1 218 217
+3  143 217 218
+3  1742 114 1743
+3  732 168 303
+3  303 300 732
+3  1669 997 1668
+3  550 997 1669
+3  148 1672 1496
+3  137 33 672
+3  1005 858 548
+3  996 858 1005
+3  106 127 123
+3  1175 673 1176
+3  419 1285 403
+3  1692 1694 661
+3  749 745 1723
+3  215 36 214
+3  235 1546 198
+3  159 254 1520
+3  115 1196 630
+3  592 160 598
+3  522 1404 1402
+3  1610 1373 1609
+3  1610 1609 1608
+3  141 704 705
+3  1519 159 1520
+3  312 1729 276
+3  388 389 43
+3  43 391 388
+3  1545 878 182
+3  1794 1787 769
+3  840 604 838
+3  726 306 754
+3  615 248 613
+3  1359 1360 104
+3  1753 266 1752
+3  47 618 1112
+3  430 471 472
+3  10 247 249
+3  962 961 269
+3  1744 114 1201
+3  1625 174 1624
+3  1383 417 1384
+3  531 532 897
+3  482 1018 530
+3  1535 792 771
+3  1541 792 1535
+3  164 403 404
+3  1355 1339 1340
+3  1314 1308 1311
+3  1509 369 1120
+3  301 732 300
+3  1637 788 787
+3  1725 491 753
+3  708 930 707
+3  708 707 448
+3  142 1693 661
+3  1280 641 654
+3  654 641 652
+3  709 710 67
+3  792 977 771
+3  430 472 473
+3  486 644 643
+3  1165 1643 464
+3  205 217 496
+3  135 685 688
+3  143 220 217
+3  220 144 217
+3  1316 1089 352
+3  1459 1138 463
+3  741 797 739
+3  359 30 358
+3  1615 1628 1296
+3  1296 1628 1629
+3  209 136 224
+3  525 9 528
+3  1142 128 1273
+3  988 987 200
+3  329 1147 836
+3  727 306 726
+3  1719 1718 1438
+3  208 214 36
+3  152 222 223
+3  471 1278 472
+3  681 139 683
+3  342 112 343
+3  177 378 379
+3  1227 206 1228
+3  1033 122 123
+3  672 671 137
+3  40 1290 1292
+3  627 4 259
+3  258 627 259
+3  1483 1597 416
+3  920 919 449
+3  685 78 688
+3  688 78 689
+3  358 360 359
+3  1356 76 1351
+3  397 1612 1614
+3  250 247 246
+3  669 670 3
+3  1047 284 1649
+3  1649 284 1046
+3  1172 1095 497
+3  1172 497 1173
+3  45 371 251
+3  1083 1072 350
+3  8 873 872
+3  1682 55 1024
+3  1024 937 1682
+3  995 994 550
+3  1208 1045 1647
+3  1208 1647 1046
+3  180 1050 1763
+3  693 1502 150
+3  255 157 253
+3  705 16 220
+3  423 424 104
+3  316 875 870
+3  142 662 677
+3  548 1769 27
+3  548 27 570
+3  1535 771 1536
+3  1559 1560 165
+3  1126 1560 1559
+3  1697 201 1696
+3  1772 1790 764
+3  689 78 691
+3  742 1310 1313
+3  617 614 434
+3  444 443 107
+3  253 614 617
+3  501 809 1059
+3  1718 1444 815
+3  1717 1444 1718
+3  1054 1053 1651
+3  1054 1651 1652
+3  381 386 382
+3  1269 156 245
+3  1651 1055 1652
+3  749 750 42
+3  42 750 751
+3  1540 1539 781
+3  985 984 34
+3  34 984 1467
+3  1541 722 1539
+3  1006 1007 1010
+3  1007 1008 2
+3  1676 1000 125
+3  1629 1394 1630
+3  526 1503 530
+3  1517 1739 19
+3  1737 987 190
+3  60 934 830
+3  800 1173 1174
+3  923 450 919
+3  528 9 1171
+3  1312 1307 787
+3  219 151 221
+3  645 644 120
+3  1272 172 173
+3  69 391 393
+3  841 604 840
+3  681 683 682
+3  682 683 0
+3  592 598 591
+3  101 1087 1088
+3  1449 1450 508
+3  19 1738 1734
+3  882 322 1708
+3  861 863 862
+3  279 50 587
+3  5 1413 1409
+3  5 1409 1403
+3  717 295 718
+3  798 1038 799
+3  98 191 173
+3  672 33 684
+3  1461 1596 1598
+3  1598 1600 1461
+3  191 89 1272
+3  463 1138 1139
+3  984 188 911
+3  1732 909 1733
+3  594 595 160
+3  908 1731 95
+3  159 592 591
+3  238 1741 196
+3  196 254 238
+3  199 914 195
+3  703 189 704
+3  632 631 1746
+3  1518 196 1517
+3  910 195 913
+3  450 918 917
+3  145 242 1225
+3  1105 1550 736
+3  736 1550 1552
+3  43 1347 1656
+3  235 193 1546
+3  242 243 10
+3  1340 73 367
+3  189 911 907
+3  915 707 449
+3  449 707 930
+3  1285 1299 403
+3  207 1231 1232
+3  1370 70 1375
+3  735 734 304
+3  304 1237 735
+3  745 492 741
+3  1201 227 1744
+3  155 243 241
+3  204 241 1235
+3  849 323 63
+3  867 323 849
+3  1228 205 1227
+3  300 17 299
+3  46 598 597
+3  19 1734 1697
+3  688 689 133
+3  688 133 853
+3  1176 1177 126
+3  1754 1753 52
+3  52 1200 1754
+3  545 544 28
+3  567 568 566
+3  1780 1781 1119
+3  1031 1034 1032
+3  840 838 658
+3  521 1403 1404
+3  197 372 234
+3  760 759 724
+3  239 237 155
+3  1358 421 1359
+3  980 165 1560
+3  236 237 239
+3  199 195 1739
+3  344 343 112
+3  4 624 262
+3  200 987 1737
+3  19 1697 594
+3  1815 785 1816
+3  656 384 385
+3  385 384 22
+3  1624 1621 41
+3  903 902 335
+3  602 1391 1562
+3  93 1391 602
+3  958 950 951
+3  1413 1407 1409
+3  233 144 220
+3  1178 1142 1185
+3  1239 1237 304
+3  1234 1226 1227
+3  1675 125 998
+3  1245 82 327
+3  233 484 193
+3  272 267 583
+3  213 632 633
+3  778 777 1533
+3  432 1314 1311
+3  1391 601 1562
+3  36 634 209
+3  1504 1500 134
+3  623 626 257
+3  625 623 257
+3  106 171 1037
+3  1464 1463 59
+3  1465 1463 1464
+3  1398 1396 216
+3  1191 607 1190
+3  1191 1190 286
+3  1322 1022 1320
+3  234 193 235
+3  151 224 222
+3  1 219 218
+3  1044 1213 1056
+3  1044 1056 1206
+3  1200 231 1754
+3  1754 231 1756
+3  1035 1513 1515
+3  1035 1515 124
+3  1336 819 818
+3  1682 1683 1681
+3  15 1478 331
+3  151 208 224
+3  205 1234 1227
+3  55 1674 1024
+3  1679 1674 55
+3  1107 737 1106
+3  225 1742 1743
+3  261 1551 1751
+3  261 1751 1218
+3  1198 258 231
+3  231 258 259
+3  624 256 621
+3  624 621 262
+3  152 660 1691
+3  232 214 146
+3  637 458 91
+3  637 91 1144
+3  246 243 244
+3  236 198 96
+3  357 609 289
+3  1236 1235 1234
+3  404 403 163
+3  163 403 1299
+3  96 237 236
+3  978 85 784
+3  197 239 240
+3  239 155 240
+3  243 155 244
+3  245 237 238
+3  587 280 279
+3  241 240 155
+3  1584 1585 588
+3  240 241 204
+3  1300 1301 1613
+3  404 1569 1568
+3  245 155 237
+3  244 155 245
+3  493 159 494
+3  1457 1119 466
+3  1509 1119 1457
+3  478 479 185
+3  616 248 615
+3  247 616 615
+3  156 244 245
+3  1623 1621 174
+3  1163 1164 464
+3  215 214 232
+3  166 1636 1762
+3  157 249 252
+3  906 905 192
+3  912 905 906
+3  1186 1142 1270
+3  68 389 388
+3  1377 1378 1376
+3  1376 70 1377
+3  1085 340 1090
+3  249 157 202
+3  1388 1387 1579
+3  1345 392 1380
+3  1366 392 1345
+3  257 626 627
+3  83 281 282
+3  83 282 285
+3  755 263 756
+3  679 1468 933
+3  1284 1283 1286
+3  357 30 609
+3  760 738 169
+3  1290 40 1289
+3  623 625 48
+3  264 51 848
+3  670 363 365
+3  230 1199 1197
+3  304 734 1242
+3  408 1291 1290
+3  265 1755 266
+3  266 1755 1752
+3  629 215 48
+3  536 804 805
+3  534 804 536
+3  757 754 491
+3  64 382 383
+3  259 4 260
+3  142 221 1693
+3  256 622 621
+3  626 4 627
+3  1049 1050 376
+3  273 110 580
+3  863 865 183
+3  1565 1564 601
+3  369 1156 1121
+3  751 750 713
+3  757 740 758
+3  1742 1745 114
+3  953 952 312
+3  1135 1134 716
+3  1136 1135 716
+3  22 384 383
+3  22 383 387
+3  296 763 764
+3  1751 1551 1179
+3  481 480 87
+3  185 480 481
+3  961 960 269
+3  99 802 801
+3  801 802 498
+3  1057 1645 1206
+3  1646 1645 1057
+3  951 952 958
+3  958 952 18
+3  359 362 288
+3  84 1210 1209
+3  262 260 4
+3  859 314 860
+3  608 1191 606
+3  609 30 610
+3  1693 222 152
+3  1414 1591 1416
+3  1416 37 1414
+3  475 611 385
+3  963 1276 268
+3  279 270 966
+3  433 434 11
+3  424 427 161
+3  423 427 424
+3  424 161 105
+3  1398 79 1474
+3  430 469 471
+3  352 939 940
+3  1315 352 940
+3  915 916 921
+3  921 452 915
+3  463 1139 1140
+3  456 669 3
+3  94 717 1136
+3  294 1388 293
+3  496 372 204
+3  809 810 1488
+3  1597 1483 1004
+3  753 749 1725
+3  770 1667 1260
+3  1231 146 1232
+3  746 745 749
+3  305 295 294
+3  1741 96 199
+3  1002 1109 755
+3  1283 418 1286
+3  1281 418 1283
+3  1725 749 1723
+3  1723 491 1725
+3  216 1397 1398
+3  1337 422 1338
+3  1341 1337 1338
+3  748 492 746
+3  304 1242 1241
+3  1241 1242 729
+3  744 1293 1292
+3  1397 79 1398
+3  1661 1660 1252
+3  263 755 1108
+3  1035 1036 1513
+3  127 1036 1035
+3  714 480 479
+3  600 1564 1565
+3  989 6 1812
+3  1691 1692 152
+3  1192 1190 607
+3  1043 1192 607
+3  293 1574 1575
+3  293 299 17
+3  748 309 744
+3  747 309 748
+3  744 743 748
+3  144 372 496
+3  1130 294 94
+3  1136 716 1129
+3  1136 1129 94
+3  492 748 743
+3  982 75 599
+3  256 624 626
+3  622 623 356
+3  861 314 859
+3  1067 805 1659
+3  348 1067 1659
+3  900 62 897
+3  905 485 192
+3  429 1506 1507
+3  1089 101 1088
+3  21 362 363
+3  183 865 866
+3  316 870 869
+3  864 863 315
+3  338 1086 1085
+3  1085 1086 340
+3  1424 1425 810
+3  1759 1760 325
+3  1000 1005 1001
+3  1000 1001 125
+3  788 1637 412
+3  1482 1481 1004
+3  1484 1481 1482
+3  900 1701 62
+3  1167 833 1168
+3  660 223 1699
+3  865 869 866
+3  1704 480 714
+3  349 1072 1073
+3  1073 1072 1083
+3  113 1655 347
+3  101 1078 1084
+3  101 1084 1087
+3  762 719 763
+3  376 178 1049
+3  112 345 344
+3  1554 597 451
+3  1655 345 112
+3  339 1092 1079
+3  399 1300 1613
+3  1613 1610 399
+3  1777 975 1776
+3  1776 1042 1777
+3  1092 342 15
+3  170 568 154
+3  154 535 170
+3  48 232 203
+3  623 48 356
+3  1254 1256 774
+3  1263 1098 800
+3  642 1152 1145
+3  1153 1152 642
+3  1262 1098 1263
+3  1679 1670 1678
+3  564 1679 1678
+3  347 341 1093
+3  980 979 410
+3  340 487 81
+3  81 487 1247
+3  1082 1083 350
+3  1077 339 1079
+3  1079 338 1077
+3  536 349 1073
+3  1073 29 536
+3  832 833 329
+3  329 833 834
+3  30 357 358
+3  161 386 158
+3  366 72 367
+3  443 445 426
+3  360 444 108
+3  360 108 359
+3  1382 1383 1343
+3  1587 1586 446
+3  1587 446 1589
+3  1043 1211 1210
+3  474 472 117
+3  618 253 617
+3  190 1644 985
+3  868 321 879
+3  460 1013 1015
+3  1015 1013 1011
+3  442 445 443
+3  108 365 363
+3  108 363 362
+3  1625 175 1626
+3  1377 392 1378
+3  1351 1350 1356
+3  658 838 286
+3  361 366 73
+3  679 933 703
+3  494 159 591
+3  1256 798 793
+3  1206 1056 1057
+3  312 952 951
+3  1214 609 610
+3  285 23 380
+3  176 949 950
+3  953 18 952
+3  178 375 377
+3  374 373 177
+3  1052 180 1051
+3  1047 23 284
+3  179 1048 1047
+3  179 1053 1054
+3  179 1054 1050
+3  275 380 379
+3  379 378 275
+3  380 23 379
+3  373 378 177
+3  1662 1663 1207
+3  1662 1207 1209
+3  282 284 285
+3  39 611 475
+3  203 356 48
+3  371 158 381
+3  1021 1323 1322
+3  1674 564 1673
+3  740 757 491
+3  621 622 620
+3  1199 230 1202
+3  848 51 847
+3  1696 162 1698
+3  1187 126 1185
+3  1509 1780 1119
+3  233 16 484
+3  978 784 979
+3  387 388 69
+3  978 414 1124
+3  1123 978 1124
+3  1133 415 1132
+3  1125 414 1126
+3  1124 414 1125
+3  68 387 383
+3  1296 1630 1631
+3  1631 1630 1298
+3  390 389 68
+3  1360 423 104
+3  391 69 388
+3  417 1348 1362
+3  1362 1348 1349
+3  381 158 386
+3  68 382 390
+3  382 386 20
+3  382 20 390
+3  390 20 420
+3  405 1567 1568
+3  1378 392 1367
+3  1367 392 1366
+3  246 247 10
+3  1623 1622 1621
+3  1342 417 1362
+3  1606 1605 399
+3  1384 417 1342
+3  1307 1308 431
+3  1008 1016 2
+3  1249 1250 440
+3  1376 1378 1367
+3  1623 69 1622
+3  1622 393 1620
+3  44 428 444
+3  40 407 1289
+3  1389 1390 1391
+3  93 1389 1391
+3  1353 1352 1355
+3  1568 1567 75
+3  718 724 761
+3  64 1003 1516
+3  658 291 657
+3  678 679 703
+3  146 1231 1224
+3  1629 1609 71
+3  1628 1609 1629
+3  167 1304 1285
+3  215 213 633
+3  163 1570 1569
+3  1369 70 1370
+3  1310 432 1313
+3  409 164 404
+3  167 1284 1286
+3  1389 302 1390
+3  1563 1571 1562
+3  1562 1571 602
+3  794 790 739
+3  302 982 599
+3  1724 740 491
+3  794 719 790
+3  864 865 863
+3  1358 1359 1363
+3  481 1018 1019
+3  775 1261 774
+3  85 792 783
+3  1415 1592 818
+3  1239 727 1238
+3  1238 1237 1239
+3  1302 1300 407
+3  1384 1342 1343
+3  1383 1384 1343
+3  1251 1385 438
+3  439 442 428
+3  421 1360 1359
+3  784 789 410
+3  1765 789 784
+3  913 195 914
+3  836 353 835
+3  1339 44 1340
+3  105 161 572
+3  677 705 143
+3  3 474 456
+3  310 1291 1309
+3  342 343 1478
+3  767 720 1772
+3  775 777 1261
+3  622 255 620
+3  1 205 1228
+3  951 313 1727
+3  184 1784 1248
+3  1783 1784 184
+3  253 619 255
+3  750 306 713
+3  753 306 750
+3  255 356 157
+3  1115 259 260
+3  64 383 384
+3  1607 1615 1304
+3  1339 441 44
+3  44 441 428
+3  715 1316 1315
+3  428 442 443
+3  1207 1045 1208
+3  441 439 428
+3  44 360 1340
+3  997 996 1000
+3  997 1000 1676
+3  929 928 451
+3  395 1354 1368
+3  1368 1354 1346
+3  439 441 422
+3  470 443 426
+3  610 1213 1214
+3  1406 818 1593
+3  1586 445 1588
+3  232 146 203
+3  107 443 470
+3  1011 2 1015
+3  527 1501 1502
+3  1500 1501 527
+3  703 141 678
+3  663 453 666
+3  663 666 664
+3  1278 1279 1277
+3  710 932 67
+3  470 469 430
+3  474 666 667
+3  666 453 667
+3  1698 594 1696
+3  994 996 550
+3  550 996 997
+3  377 23 1048
+3  1048 23 1047
+3  1058 1057 288
+3  288 362 1058
+3  119 651 698
+3  1497 14 1498
+3  1273 128 1037
+3  1132 415 772
+3  1565 599 1566
+3  458 454 91
+3  711 447 709
+3  1011 1010 2
+3  1164 1163 465
+3  1084 1085 1087
+3  1087 1085 1090
+3  942 836 1150
+3  1150 12 942
+3  107 470 430
+3  992 991 105
+3  447 1589 1590
+3  986 1471 1470
+3  1470 1471 34
+3  470 426 469
+3  60 528 1170
+3  1232 146 214
+3  222 1335 223
+3  145 1234 1235
+3  224 208 209
+3  208 36 209
+3  233 193 234
+3  1230 1228 206
+3  1234 145 1226
+3  1232 214 208
+3  149 1672 558
+3  811 1423 810
+3  676 662 35
+3  351 1089 1316
+3  1316 1317 351
+3  217 205 1
+3  220 16 233
+3  143 705 220
+3  16 705 704
+3  912 95 913
+3  198 914 199
+3  942 353 836
+3  329 834 1147
+3  1476 212 1477
+3  281 25 1194
+3  672 139 671
+3  1548 193 485
+3  621 47 1111
+3  621 1111 262
+3  843 842 657
+3  1210 1211 1209
+3  487 1246 1247
+3  365 107 473
+3  899 1811 1813
+3  1115 51 264
+3  1180 51 1115
+3  657 840 658
+3  1645 1045 1663
+3  1653 1045 1645
+3  478 185 476
+3  185 481 483
+3  974 972 1039
+3  974 1039 1775
+3  693 1019 482
+3  781 1538 1531
+3  869 870 320
+3  87 531 1018
+3  228 210 632
+3  593 1518 1517
+3  1643 1460 589
+3  590 1460 1643
+3  938 465 1157
+3  698 455 457
+3  854 857 132
+3  1685 635 1374
+3  1371 1685 1374
+3  1666 1134 1133
+3  1426 1487 1427
+3  555 562 522
+3  1596 1131 1597
+3  943 945 946
+3  1254 798 1256
+3  1444 826 1445
+3  641 644 645
+3  1500 527 1503
+3  791 1510 723
+3  1502 482 527
+3  807 806 1266
+3  824 823 507
+3  1729 1715 276
+3  1325 124 1327
+3  1325 1327 1321
+3  1273 1271 1142
+3  1507 1505 991
+3  995 550 1677
+3  563 995 1677
+3  1489 133 689
+3  1489 689 690
+3  1498 857 854
+3  1708 883 1707
+3  1124 772 1123
+3  1020 998 999
+3  1673 998 1020
+3  123 1026 1031
+3  1001 850 851
+3  851 850 1034
+3  706 704 189
+3  849 891 904
+3  1633 166 1632
+3  101 1089 1082
+3  1246 328 1247
+3  1090 81 354
+3  855 133 1489
+3  1260 1667 1258
+3  556 38 557
+3  350 1078 1082
+3  478 488 479
+3  540 170 538
+3  799 1038 720
+3  568 170 566
+3  1143 1144 638
+3  1145 1143 638
+3  1351 1352 1353
+3  1353 947 1351
+3  1282 1306 418
+3  1282 418 1281
+3  340 81 1090
+3  1086 1080 337
+3  125 1675 1676
+3  1093 341 1091
+3  877 325 82
+3  876 877 318
+3  901 61 902
+3  9 525 526
+3  31 879 880
+3  1289 1288 1306
+3  154 568 545
+3  61 892 355
+3  508 1450 1451
+3  883 888 333
+3  891 322 904
+3  825 1103 346
+3  535 537 170
+3  871 872 323
+3  872 873 884
+3  323 884 330
+3  607 1216 1043
+3  85 978 1123
+3  171 122 486
+3  1274 24 171
+3  995 993 994
+3  1400 1401 37
+3  123 1032 1033
+3  1033 121 569
+3  1631 1298 402
+3  402 1298 1303
+3  939 831 353
+3  353 831 835
+3  710 447 1590
+3  1593 818 1592
+3  1252 424 440
+3  990 440 424
+3  1500 1504 1501
+3  1705 532 87
+3  87 480 1705
+3  943 649 944
+3  102 940 941
+3  1477 1169 136
+3  340 319 487
+3  26 1487 1486
+3  192 484 706
+3  485 484 192
+3  565 1021 1023
+3  969 967 965
+3  933 189 703
+3  735 305 303
+3  1026 127 1025
+3  1025 1029 1026
+3  1608 1295 1607
+3  474 667 456
+3  10 249 490
+3  1197 1198 230
+3  419 786 1283
+3  1284 419 1283
+3  1112 263 1111
+3  47 1112 1111
+3  206 1227 1226
+3  42 746 749
+3  760 724 738
+3  946 715 102
+3  229 1196 1197
+3  180 495 376
+3  1216 287 1212
+3  1425 1424 1436
+3  1044 1206 1662
+3  161 158 494
+3  390 420 103
+3  493 45 254
+3  159 493 254
+3  411 786 419
+3  1816 786 411
+3  752 56 755
+3  1114 1552 1218
+3  1724 741 740
+3  1814 1813 6
+3  500 545 28
+3  29 1319 1318
+3  782 1540 1635
+3  782 1635 1815
+3  559 149 558
+3  507 1449 1103
+3  539 944 648
+3  1143 637 1144
+3  1452 1437 815
+3  815 1437 1438
+3  560 5 1403
+3  1029 1030 1026
+3  28 1066 1065
+3  544 1066 28
+3  565 1673 1020
+3  139 684 683
+3  1448 1449 507
+3  500 534 154
+3  545 500 154
+3  1486 1488 1425
+3  1040 515 1039
+3  1020 999 1027
+3  830 829 516
+3  1689 59 1688
+3  1689 1688 1687
+3  689 970 690
+3  540 566 170
+3  556 562 555
+3  1067 348 1069
+3  1069 348 1778
+3  1036 1514 1513
+3  937 130 936
+3  557 559 558
+3  558 521 557
+3  1498 14 857
+3  1494 518 1495
+3  502 1419 1421
+3  974 976 517
+3  1452 821 1437
+3  1669 1668 564
+3  1492 1493 1491
+3  1532 779 1533
+3  465 1163 1161
+3  394 70 1369
+3  9 526 530
+3  1402 1404 1403
+3  1402 1403 520
+3  532 531 87
+3  1528 777 1529
+3  777 775 1529
+3  940 353 1524
+3  92 938 1153
+3  648 649 12
+3  944 649 648
+3  346 1101 1100
+3  499 1266 1062
+3  803 804 534
+3  99 804 803
+3  1103 508 1102
+3  170 537 538
+3  1351 76 1352
+3  1352 76 1338
+3  528 1466 525
+3  831 81 832
+3  1333 1328 1515
+3  1515 1328 124
+3  646 120 65
+3  647 646 65
+3  90 646 647
+3  817 813 1417
+3  552 524 553
+3  553 524 554
+3  1065 1060 542
+3  1393 113 1094
+3  1100 113 1393
+3  1346 1366 1368
+3  975 976 974
+3  1767 858 1766
+3  1768 858 1767
+3  513 827 509
+3  545 27 546
+3  1331 936 1330
+3  935 1321 1327
+3  1329 935 1327
+3  1102 1101 346
+3  557 38 559
+3  568 27 545
+3  571 927 116
+3  1033 1032 121
+3  566 540 65
+3  684 33 138
+3  552 553 551
+3  546 187 544
+3  637 1143 1159
+3  557 562 556
+3  552 551 187
+3  517 148 518
+3  560 148 517
+3  1668 1675 998
+3  511 1102 508
+3  186 551 553
+3  1061 1062 1063
+3  499 1062 1061
+3  1436 812 1437
+3  1787 1786 769
+3  132 857 1684
+3  885 894 62
+3  828 827 58
+3  27 547 546
+3  541 1060 1065
+3  1405 522 1400
+3  1405 1400 1399
+3  1009 701 455
+3  719 1770 764
+3  55 1681 1679
+3  927 926 116
+3  129 1028 1029
+3  569 567 65
+3  567 569 121
+3  1031 1032 123
+3  120 569 65
+3  173 24 702
+3  121 570 567
+3  1436 26 1581
+3  1436 1581 1425
+3  161 494 572
+3  830 528 60
+3  1792 1791 1257
+3  1257 1261 1792
+3  774 1261 1257
+3  574 314 575
+3  323 867 871
+3  316 869 864
+3  1745 1746 229
+3  230 1198 1200
+3  376 1050 180
+3  99 948 805
+3  953 276 1712
+3  581 580 110
+3  579 578 273
+3  1398 1474 225
+3  1396 1398 225
+3  584 583 267
+3  578 582 273
+3  492 743 742
+3  585 53 1714
+3  271 585 1714
+3  276 953 312
+3  1716 1817 503
+3  271 584 585
+3  503 1817 1441
+3  585 584 267
+3  1269 245 238
+3  1653 1646 1654
+3  1653 1654 1647
+3  25 1193 1194
+3  1400 37 1399
+3  1399 37 1807
+3  1482 165 1484
+3  1251 440 1250
+3  1060 541 820
+3  984 1644 987
+3  572 591 46
+3  591 572 494
+3  1471 985 34
+3  1355 367 1353
+3  1520 254 196
+3  594 1698 595
+3  1546 1548 1547
+3  611 248 655
+3  655 248 616
+3  655 385 611
+3  72 1354 947
+3  606 1191 286
+3  599 75 1566
+3  599 601 1390
+3  1565 601 599
+3  83 285 1205
+3  74 357 289
+3  1509 1457 1460
+3  608 607 1191
+3  842 841 840
+3  842 840 657
+3  1215 1214 287
+3  1216 1212 1211
+3  1043 1216 1211
+3  1574 93 1573
+3  359 610 30
+3  619 253 618
+3  253 157 252
+3  253 252 614
+3  92 590 1165
+3  252 615 613
+3  249 615 252
+3  613 248 612
+3  249 247 615
+3  1295 1628 1615
+3  433 618 617
+3  1113 260 262
+3  256 623 622
+3  47 619 618
+3  625 629 48
+3  756 263 1112
+3  433 756 1112
+3  622 356 255
+3  93 602 1573
+3  1527 1526 1530
+3  720 1038 1788
+3  295 305 738
+3  1566 406 600
+3  1565 1566 600
+3  1115 260 1114
+3  628 629 625
+3  1241 1223 728
+3  115 630 628
+3  36 633 634
+3  632 213 631
+3  215 633 36
+3  1095 1094 497
+3  1120 1121 368
+3  642 1145 1146
+3  1156 590 1155
+3  471 711 448
+3  160 1480 598
+3  702 98 173
+3  1143 1145 459
+3  329 836 835
+3  7 1543 1544
+3  7 1544 1782
+3  910 1734 1738
+3  116 925 924
+3  1610 1608 399
+3  913 914 194
+3  1716 1439 1440
+3  415 1137 770
+3  342 1774 112
+3  956 18 954
+3  1733 909 1735
+3  1517 1740 1739
+3  1145 1152 459
+3  1556 446 1585
+3  426 1589 469
+3  251 1516 1003
+3  889 332 892
+3  1516 371 64
+3  118 1163 1140
+3  1140 1163 464
+3  835 831 832
+3  329 835 832
+3  711 708 448
+3  1345 1344 1382
+3  1382 1344 1383
+3  182 315 852
+3  539 648 647
+3  945 539 540
+3  454 640 91
+3  91 640 639
+3  1274 171 643
+3  1122 368 1121
+3  1120 369 1121
+3  65 540 539
+3  647 65 539
+3  640 645 90
+3  640 641 645
+3  486 120 644
+3  90 648 639
+3  645 120 646
+3  645 646 90
+3  90 639 640
+3  710 467 932
+3  1555 467 710
+3  90 647 648
+3  943 946 102
+3  598 1480 596
+3  598 596 597
+3  939 353 940
+3  650 651 119
+3  652 641 640
+3  66 651 652
+3  66 652 640
+3  1281 1283 786
+3  1632 1281 786
+3  972 974 517
+3  971 972 517
+3  1490 134 1491
+3  343 61 355
+3  758 1818 725
+3  930 920 449
+3  1380 43 1656
+3  1733 201 1734
+3  1667 770 1259
+3  1610 1613 1611
+3  1611 1373 1610
+3  207 1229 1230
+3  1228 1230 1229
+3  788 791 723
+3  1585 446 1586
+3  1451 509 1814
+3  6 1451 1814
+3  890 893 333
+3  1486 1487 1426
+3  370 1168 1122
+3  1735 909 200
+3  1697 1734 201
+3  1337 436 1365
+3  1365 422 1337
+3  407 1288 1289
+3  770 1485 1259
+3  604 839 838
+3  290 844 1578
+3  373 176 950
+3  887 862 183
+3  291 659 25
+3  393 70 394
+3  1524 353 942
+3  302 1389 1603
+3  1603 1602 302
+3  1279 707 665
+3  662 676 677
+3  140 678 675
+3  1546 193 1548
+3  1711 109 584
+3  916 449 919
+3  1278 1277 117
+3  663 664 452
+3  452 664 665
+3  643 644 1280
+3  456 667 668
+3  325 88 1759
+3  1036 128 1514
+3  1053 179 1047
+3  364 363 670
+3  21 363 364
+3  670 365 3
+3  1468 679 1469
+3  1470 1468 1469
+3  224 136 1335
+3  1178 1177 837
+3  613 614 252
+3  676 141 677
+3  194 912 913
+3  984 987 188
+3  720 1788 1789
+3  1409 1407 520
+3  1468 1467 933
+3  682 0 1332
+3  1332 673 682
+3  348 1071 1778
+3  754 306 753
+3  139 672 684
+3  481 87 1018
+3  9 530 531
+3  531 530 1018
+3  1583 993 38
+3  38 993 995
+3  85 977 792
+3  746 492 745
+3  829 1041 516
+3  58 1041 829
+3  134 1499 1492
+3  446 1590 1589
+3  977 772 771
+3  1258 1792 413
+3  1669 1678 563
+3  1677 1669 563
+3  878 316 182
+3  1173 497 801
+3  1265 1264 498
+3  498 1267 1265
+3  476 477 478
+3  488 336 31
+3  1248 336 488
+3  1120 7 1782
+3  1728 577 311
+3  111 576 577
+3  1037 128 1036
+3  577 277 582
+3  994 1767 1766
+3  1729 311 1715
+3  1001 851 125
+3  955 954 274
+3  1720 1438 812
+3  109 579 583
+3  584 109 583
+3  1050 1049 179
+3  3 473 474
+3  1054 1652 1051
+3  954 953 274
+3  34 1467 1468
+3  627 1203 257
+3  1470 1469 680
+3  986 1470 680
+3  526 1499 1503
+3  957 955 274
+3  1308 723 1311
+3  800 1098 1096
+3  1172 800 1096
+3  370 1167 1168
+3  267 52 1753
+3  280 281 83
+3  1194 1193 283
+3  596 1658 597
+3  636 1160 1162
+3  322 881 880
+3  298 1461 1601
+3  1581 26 1486
+3  1581 1486 1425
+3  927 451 926
+3  1277 664 117
+3  298 1130 1461
+3  1461 1130 1131
+3  414 1560 1126
+3  1355 1352 1339
+3  572 571 105
+3  1550 261 1552
+3  1551 261 1550
+3  1591 1415 817
+3  1479 1480 595
+3  578 311 577
+3  124 1328 1327
+3  279 280 83
+3  968 847 278
+3  1584 588 1249
+3  1210 84 1195
+3  990 425 1249
+3  1419 1430 1802
+3  289 606 605
+3  1523 682 673
+3  731 168 732
+3  13 1097 1098
+3  1705 1704 324
+3  855 854 133
+3  1502 1501 150
+3  1023 1021 1322
+3  856 132 33
+3  1588 77 1250
+3  159 1519 592
+3  1740 1517 196
+3  1480 1479 596
+3  1167 370 1166
+3  1166 370 1155
+3  651 455 698
+3  66 455 651
+3  66 454 455
+3  454 66 640
+3  98 702 699
+3  471 448 1278
+3  1120 368 7
+3  924 925 450
+3  450 925 918
+3  702 24 650
+3  455 454 1009
+3  1782 1544 1118
+3  199 1739 1740
+3  724 759 761
+3  1193 25 659
+3  1131 1129 416
+3  1597 1131 416
+3  1648 1647 181
+3  1650 1648 181
+3  455 701 700
+3  773 1133 1132
+3  703 704 141
+3  821 1452 1453
+3  1453 1452 1445
+3  697 698 457
+3  119 698 697
+3  119 697 699
+3  458 636 1017
+3  637 636 458
+3  1536 1534 1535
+3  455 700 457
+3  699 702 119
+3  468 923 920
+3  303 305 17
+3  706 16 704
+3  1505 1556 425
+3  425 990 991
+3  991 992 1507
+3  429 1507 992
+3  1705 900 532
+3  1556 1555 446
+3  1555 1556 467
+3  1505 467 1556
+3  709 67 708
+3  711 709 708
+3  469 711 471
+3  31 479 488
+3  1109 737 1107
+3  409 75 982
+3  778 413 777
+3  1314 1310 1309
+3  432 1310 1314
+3  736 49 1106
+3  627 258 1203
+3  628 257 1203
+3  729 1223 1241
+3  1074 1076 350
+3  1318 715 538
+3  538 715 946
+3  64 384 1003
+3  1468 1470 34
+3  222 1693 221
+3  255 619 620
+3  1108 1110 1111
+3  1111 1110 262
+3  1319 29 1073
+3  335 1810 903
+3  903 1810 898
+3  771 770 1260
+3  1763 1051 180
+3  771 772 415
+3  412 780 788
+3  297 1819 758
+3  758 1819 1818
+3  412 1635 1540
+3  1529 1521 721
+3  1135 296 766
+3  741 492 742
+3  1819 759 1818
+3  989 511 6
+3  634 210 211
+3  226 1396 1743
+3  209 634 211
+3  211 1477 136
+3  266 1753 1754
+3  1406 1593 1401
+3  580 579 273
+3  1676 1675 997
+3  740 739 790
+3  408 1305 431
+3  1306 1282 408
+3  1289 1306 408
+3  981 165 980
+3  761 762 718
+3  1388 298 1387
+3  1130 298 1388
+3  1388 294 1130
+3  839 286 838
+3  1204 290 1563
+3  294 295 94
+3  297 790 762
+3  827 514 58
+3  1099 346 1392
+3  1392 505 1099
+3  1474 1473 1742
+3  1473 79 1475
+3  312 1727 1728
+3  1745 1199 114
+3  1061 1059 809
+3  579 109 578
+3  267 1753 1752
+3  1554 451 927
+3  297 762 761
+3  1223 729 1222
+3  718 296 717
+3  749 753 750
+3  1247 328 833
+3  833 328 1168
+3  1221 1222 730
+3  85 782 784
+3  1181 308 1809
+3  1264 1265 806
+3  733 1549 1550
+3  1550 1549 1551
+3  1528 1529 721
+3  1316 352 1315
+3  728 727 1240
+3  1239 1240 727
+3  49 1107 1106
+3  1106 737 1105
+3  265 847 968
+3  168 729 734
+3  410 789 164
+3  297 761 1819
+3  724 295 738
+3  738 305 735
+3  735 169 738
+3  1238 169 1237
+3  747 748 746
+3  202 1225 490
+3  1590 1555 710
+3  1593 1414 1401
+3  1812 344 989
+3  219 1233 151
+3  902 344 1812
+3  1634 1637 787
+3  787 1636 1634
+3  410 409 981
+3  410 981 980
+3  1126 1127 1125
+3  799 768 798
+3  796 768 799
+3  1284 167 1285
+3  1639 712 1638
+3  1292 1290 1291
+3  1386 1602 1603
+3  1219 1220 308
+3  751 747 42
+3  1525 1526 721
+3  721 1521 1525
+3  1317 1316 715
+3  739 740 741
+3  1785 769 1786
+3  1134 766 1137
+3  1137 415 1134
+3  218 1244 142
+3  294 293 17
+3  290 1204 844
+3  1630 1394 1298
+3  42 747 746
+3  305 294 17
+3  218 219 1244
+3  1723 1724 491
+3  300 303 17
+3  203 202 157
+3  756 11 752
+3  433 11 756
+3  757 725 754
+3  251 1003 250
+3  1003 57 250
+3  1256 793 1522
+3  776 1511 1510
+3  757 758 725
+3  725 759 760
+3  219 221 1244
+3  763 296 718
+3  86 768 796
+3  763 718 762
+3  414 978 979
+3  1392 346 1100
+3  1793 1794 769
+3  790 719 762
+3  774 1256 775
+3  1787 1790 1789
+3  1789 1790 720
+3  1309 1308 1314
+3  798 768 793
+3  759 1819 761
+3  740 790 297
+3  1308 1312 723
+3  893 894 885
+3  785 1633 1816
+3  940 102 1315
+3  782 85 783
+3  742 743 1310
+3  432 1512 1313
+3  719 1771 1770
+3  783 1541 1539
+3  979 784 410
+3  310 1309 1310
+3  1635 1637 1634
+3  1635 1634 785
+3  1816 1633 786
+3  1816 411 1815
+3  1301 1302 398
+3  1294 1287 1605
+3  1606 1294 1605
+3  411 419 789
+3  780 791 788
+3  776 1521 1522
+3  1522 1529 775
+3  1522 793 776
+3  770 771 415
+3  742 86 797
+3  795 797 86
+3  1792 1261 413
+3  1794 1259 1795
+3  1793 1667 1259
+3  1258 1667 1793
+3  1260 1258 413
+3  717 1135 1136
+3  795 1773 794
+3  1795 1485 765
+3  1789 1786 1787
+3  1484 165 981
+3  1789 1788 1786
+3  719 794 1771
+3  1179 1747 1748
+3  1132 1125 773
+3  251 371 1516
+3  764 763 719
+3  1796 1255 1254
+3  1255 1788 1038
+3  795 794 739
+3  796 795 86
+3  1790 765 764
+3  797 795 739
+3  799 720 767
+3  1777 1413 975
+3  796 799 767
+3  725 726 754
+3  1642 1641 307
+3  307 1641 1638
+3  1181 1809 1182
+3  269 1713 1714
+3  610 1056 1213
+3  578 577 582
+3  1611 1612 397
+3  1301 1612 1611
+3  150 970 692
+3  959 950 958
+3  1070 347 1779
+3  963 1755 265
+3  999 1028 1027
+3  1738 195 910
+3  1817 1716 1440
+3  1385 77 439
+3  1291 744 1292
+3  1427 533 808
+3  1346 1354 72
+3  1116 960 54
+3  948 1071 348
+3  745 1724 1723
+3  658 286 1189
+3  408 431 1291
+3  1288 407 1287
+3  1096 505 1095
+3  808 533 807
+3  807 499 808
+3  806 1263 1264
+3  223 1335 136
+3  223 136 687
+3  346 1103 1102
+3  1264 1174 498
+3  222 224 1335
+3  499 809 808
+3  13 533 824
+3  499 1061 809
+3  1101 1102 511
+3  817 1441 813
+3  1805 1710 523
+3  1805 523 1804
+3  1411 519 1042
+3  1042 514 1411
+3  1439 1718 1719
+3  362 21 1055
+3  1425 1488 810
+3  505 1097 1099
+3  1424 812 1436
+3  26 1436 1437
+3  1063 1064 542
+3  1062 1265 1267
+3  1062 1266 1265
+3  807 533 13
+3  523 1420 1804
+3  523 1435 1420
+3  1399 1435 523
+3  1165 938 92
+3  822 506 823
+3  824 507 825
+3  825 13 824
+3  820 186 1432
+3  1432 1433 820
+3  1722 1422 1421
+3  1421 1422 502
+3  1410 519 1411
+3  1445 1446 506
+3  826 1444 1442
+3  777 1528 1532
+3  1532 1533 777
+3  459 1159 1143
+3  513 514 827
+3  571 992 105
+3  219 1229 1233
+3  830 510 829
+3  510 828 829
+3  1186 1185 1142
+3  1187 1185 1186
+3  1702 882 1700
+3  962 268 961
+3  963 268 962
+3  970 691 692
+3  327 1543 7
+3  1197 1199 229
+3  1746 1745 228
+3  82 325 1760
+3  1714 962 269
+3  1472 1471 986
+3  985 1471 1472
+3  951 950 949
+3  1147 1146 1151
+3  1151 1148 1150
+3  1605 1287 1300
+3  389 103 1348
+3  1379 392 1377
+3  1010 1007 2
+3  1137 766 1485
+3  770 1137 1485
+3  1372 1616 1373
+3  990 105 991
+3  391 43 1379
+3  418 1288 1286
+3  1286 1288 1287
+3  1304 1294 1607
+3  167 1294 1304
+3  1508 1342 1341
+3  1115 1114 1218
+3  915 665 707
+3  349 805 1067
+3  536 805 349
+3  706 484 16
+3  1553 1170 529
+3  450 917 919
+3  1019 1018 482
+3  198 1547 914
+3  194 1547 1548
+3  60 898 934
+3  934 898 899
+3  826 1443 1454
+3  1426 808 809
+3  188 987 988
+3  895 898 60
+3  1244 221 142
+3  194 905 912
+3  172 24 173
+3  675 676 35
+3  675 678 676
+3  135 688 853
+3  559 38 995
+3  416 1128 1665
+3  1665 1127 416
+3  206 1224 1231
+3  39 475 1625
+3  1620 1619 41
+3  1302 1301 1300
+3  785 1815 1635
+3  485 194 1548
+3  1159 1158 636
+3  118 1014 1161
+3  518 148 1496
+3  332 355 892
+3  183 866 868
+3  993 1583 561
+3  1408 818 1406
+3  1116 983 275
+3  1617 1372 1371
+3  1329 674 1330
+3  1735 200 1736
+3  227 581 1561
+3  926 928 925
+3  1218 1180 1115
+3  654 653 1280
+3  1598 1599 1600
+3  141 705 677
+3  429 931 932
+3  931 67 932
+3  709 447 710
+3  1547 194 914
+3  452 665 915
+3  917 916 919
+3  1513 1514 837
+3  1616 71 1609
+3  604 605 839
+3  1045 1207 1663
+3  606 839 605
+3  282 1195 84
+3  369 1509 1460
+3  83 1205 279
+3  1579 93 1574
+3  846 1184 278
+3  278 1184 1183
+3  1198 231 1200
+3  265 848 847
+3  266 848 265
+3  1574 1573 292
+3  292 1573 1576
+3  602 1571 1572
+3  1572 1571 1578
+3  290 1578 1571
+3  845 1204 600
+3  284 1208 1046
+3  1194 283 1195
+3  281 1195 282
+3  1194 1195 281
+3  755 56 1002
+3  1625 475 174
+3  1681 1680 1679
+3  313 886 1104
+3  806 1262 1263
+3  712 727 728
+3  712 728 1638
+3  1727 111 1728
+3  850 548 570
+3  1674 1673 565
+3  1349 103 421
+3  1357 1349 421
+3  1117 186 553
+3  1768 549 1664
+3  1688 971 695
+3  853 133 854
+3  135 856 33
+3  854 132 856
+3  1773 1771 794
+3  1791 769 1785
+3  767 1770 1771
+3  1744 227 1561
+3  908 1557 188
+3  861 315 863
+3  861 859 852
+3  315 861 852
+3  314 862 575
+3  862 863 183
+3  1064 1065 542
+3  182 864 315
+3  182 316 864
+3  873 876 318
+3  871 8 872
+3  866 321 868
+3  183 868 887
+3  866 320 867
+3  884 873 874
+3  8 871 870
+3  871 867 320
+3  883 333 885
+3  554 1710 1805
+3  877 317 325
+3  337 80 319
+3  319 80 874
+3  875 317 876
+3  875 876 8
+3  88 317 878
+3  31 336 879
+3  31 880 881
+3  888 332 889
+3  1707 883 885
+3  80 884 874
+3  63 332 888
+3  330 884 80
+3  575 862 887
+3  336 575 887
+3  336 868 879
+3  888 889 333
+3  902 343 344
+3  613 1690 614
+3  63 888 891
+3  63 891 849
+3  880 904 322
+3  61 343 902
+3  1708 891 883
+3  532 900 897
+3  1814 509 828
+3  334 895 894
+3  1752 585 267
+3  898 895 334
+3  896 897 62
+3  1703 1706 881
+3  881 1706 31
+3  903 901 902
+3  344 345 989
+3  879 321 880
+3  825 507 1103
+3  1067 1069 1068
+3  910 1732 1733
+3  95 906 908
+3  192 907 906
+3  1643 589 1140
+3  1799 1187 1798
+3  339 1077 1076
+3  1073 1083 351
+3  201 1736 1695
+3  1071 113 1070
+3  801 497 948
+3  948 99 801
+3  804 99 805
+3  274 953 1712
+3  1712 1713 274
+3  1643 1140 464
+3  472 1278 117
+3  917 918 922
+3  448 1279 1278
+3  1279 665 1277
+3  1280 644 641
+3  924 468 116
+3  450 923 924
+3  923 919 920
+3  1442 1444 1717
+3  1439 1717 1718
+3  451 928 926
+3  46 927 572
+3  572 927 571
+3  708 67 930
+3  468 920 931
+3  933 911 189
+3  447 711 469
+3  934 510 830
+3  899 510 934
+3  1641 1639 1638
+3  202 1224 1225
+3  291 658 1189
+3  1297 1631 402
+3  1315 102 715
+3  1309 431 1308
+3  1304 1615 401
+3  401 1615 1296
+3  40 1302 407
+3  309 1293 744
+3  1605 1300 399
+3  166 1762 1761
+3  723 1312 788
+3  787 1307 1636
+3  1636 1307 1762
+3  793 768 1512
+3  169 735 1237
+3  984 911 1467
+3  991 1505 425
+3  1439 1716 1717
+3  1659 805 948
+3  348 1659 948
+3  1469 679 140
+3  1467 911 933
+3  1681 1671 1680
+3  1044 1662 1209
+3  1044 1209 1211
+3  1711 584 271
+3  837 1333 1515
+3  935 1330 936
+3  935 936 130
+3  937 138 131
+3  936 138 937
+3  1395 920 930
+3  1154 92 1153
+3  354 831 939
+3  1088 939 352
+3  1088 352 1089
+3  1149 12 1148
+3  102 941 943
+3  941 649 943
+3  72 947 367
+3  12 649 942
+3  1151 1146 1148
+3  539 945 944
+3  946 945 540
+3  538 946 540
+3  945 943 944
+3  1353 367 947
+3  886 949 176
+3  378 373 959
+3  1105 733 1550
+3  275 956 955
+3  908 188 988
+3  908 988 1730
+3  1442 1716 503
+3  200 909 1730
+3  1575 299 293
+3  271 1714 1713
+3  960 961 270
+3  378 956 275
+3  954 955 956
+3  378 18 956
+3  965 50 966
+3  630 1196 631
+3  1712 271 1713
+3  53 962 1714
+3  1577 1575 292
+3  378 958 18
+3  269 960 957
+3  1275 1276 964
+3  268 1276 1275
+3  961 966 270
+3  960 270 54
+3  963 265 964
+3  963 964 1276
+3  1175 126 1187
+3  268 966 961
+3  970 689 691
+3  971 517 518
+3  964 265 968
+3  1494 1495 694
+3  966 50 279
+3  268 965 966
+3  967 278 1183
+3  846 1180 1750
+3  1766 996 994
+3  1498 855 1497
+3  515 1041 1042
+3  514 1042 1041
+3  514 1041 58
+3  1413 5 975
+3  560 517 976
+3  1071 1070 1778
+3  1776 975 1775
+3  1541 1535 722
+3  1435 814 1801
+3  1801 1420 1435
+3  983 54 285
+3  380 983 285
+3  1798 1187 1186
+3  275 983 380
+3  1053 1047 1649
+3  1473 210 228
+3  345 511 989
+3  1588 1250 588
+3  588 1250 1249
+3  426 445 1587
+3  563 559 995
+3  999 851 1028
+3  125 851 999
+3  554 1805 1117
+3  1024 565 1023
+3  1668 997 1675
+3  1668 1673 564
+3  1028 1030 1029
+3  1032 850 121
+3  1361 1358 436
+3  1361 436 1337
+3  851 1030 1028
+3  999 998 125
+3  1320 1321 130
+3  851 1031 1030
+3  1026 123 127
+3  1683 147 1671
+3  850 1001 548
+3  1348 103 1349
+3  437 1361 1337
+3  384 57 1003
+3  1262 13 1098
+3  1108 49 1110
+3  49 1108 1107
+3  22 387 1623
+3  1769 547 27
+3  1005 548 1001
+3  1008 454 458
+3  1007 1009 1008
+3  1140 1139 118
+3  1013 1012 1011
+3  1011 1012 489
+3  1016 1008 458
+3  1013 461 1012
+3  1014 461 1013
+3  1017 460 1015
+3  1165 464 1164
+3  465 938 1164
+3  1157 465 1158
+3  1538 1539 722
+3  1536 771 1260
+3  1484 982 1481
+3  1561 581 110
+3  1538 779 1530
+3  1521 1542 791
+3  1525 1521 791
+3  1483 1482 1004
+3  1558 1482 1483
+3  227 1201 1202
+3  632 1746 228
+3  565 1020 1021
+3  1320 1022 1321
+3  130 1321 935
+3  937 1024 130
+3  1024 1023 130
+3  1025 127 1035
+3  1439 1719 1721
+3  994 549 1767
+3  1323 1025 1324
+3  1020 1027 1021
+3  149 559 563
+3  1031 851 1034
+3  1033 569 122
+3  1178 837 1514
+3  172 1037 171
+3  1041 1040 516
+3  59 972 971
+3  1039 973 1040
+3  516 1040 973
+3  488 184 1248
+3  554 1117 553
+3  811 810 1434
+3  462 1139 1138
+3  21 1051 1652
+3  608 1215 1217
+3  1218 1552 261
+3  1189 286 1190
+3  665 664 1277
+3  1517 19 593
+3  1190 659 1189
+3  1192 1043 283
+3  1214 1213 287
+3  283 1210 1195
+3  1402 520 1401
+3  1401 520 1406
+3  1652 1055 21
+3  1046 1647 1648
+3  813 1418 1417
+3  1461 1131 1596
+3  1647 1045 1653
+3  288 1056 610
+3  1053 1648 1650
+3  1649 1648 1053
+3  1211 1212 1044
+3  1645 1646 1653
+3  118 1141 1014
+3  1014 1141 461
+3  364 1052 21
+3  21 1052 1051
+3  288 1057 1056
+3  1061 542 1059
+3  543 1268 500
+3  1060 1059 542
+3  1060 501 1059
+3  809 501 810
+3  1462 972 59
+3  1462 59 1463
+3  806 807 1262
+3  1061 1063 542
+3  816 1430 1429
+3  434 1690 435
+3  822 821 1453
+3  1065 1064 28
+3  551 541 1066
+3  1066 544 551
+3  1809 1808 731
+3  1170 528 1171
+3  46 1554 927
+3  1720 1721 1719
+3  1446 1445 826
+3  1264 1263 800
+3  335 1811 1810
+3  12 1149 648
+3  1318 1317 715
+3  339 1076 1075
+3  1088 354 939
+3  1775 975 974
+3  1081 15 331
+3  80 1081 331
+3  351 1083 1082
+3  337 319 340
+3  337 340 1086
+3  1090 354 1087
+3  351 1082 1089
+3  1075 1091 339
+3  1075 1093 1091
+3  511 345 1101
+3  339 1091 1092
+3  1075 100 1093
+3  1101 345 1100
+3  99 803 802
+3  1071 497 1094
+3  948 497 1071
+3  1097 13 825
+3  825 346 1099
+3  1099 1097 825
+3  1452 815 1444
+3  500 803 534
+3  802 803 500
+3  28 1064 543
+3  39 1625 1627
+3  312 1728 1729
+3  1607 1295 1615
+3  1625 1626 1627
+3  1624 174 1621
+3  1624 175 1625
+3  845 844 1204
+3  1105 736 1106
+3  1112 618 433
+3  1107 1108 1109
+3  1109 1108 755
+3  263 1108 1111
+3  621 620 47
+3  620 619 47
+3  1113 49 1114
+3  1114 49 736
+3  260 1113 1114
+3  1488 1486 1426
+3  460 1014 1013
+3  1162 460 1017
+3  1163 118 1161
+3  465 1161 1160
+3  1141 118 1139
+3  75 1567 1566
+3  702 650 119
+3  1159 636 637
+3  1156 370 1122
+3  370 1156 1155
+3  328 368 1122
+3  136 1169 687
+3  328 1122 1168
+3  980 1560 979
+3  773 1125 1127
+3  1132 772 1124
+3  416 1129 1128
+3  1128 1129 716
+3  1131 1130 1129
+3  1133 1134 415
+3  1603 1389 1604
+3  1604 1386 1603
+3  716 1134 1666
+3  461 1595 1594
+3  1135 766 1134
+3  1258 1791 1792
+3  1601 1387 298
+3  1140 589 463
+3  461 1141 1595
+3  1706 714 31
+3  694 1490 1491
+3  1497 1490 694
+3  1701 1707 885
+3  527 482 530
+3  1096 1097 505
+3  1502 693 482
+3  1465 525 1466
+3  1464 525 1465
+3  973 1465 516
+3  1465 973 1463
+3  1491 1493 694
+3  1780 1509 1120
+3  1780 1120 1782
+3  1504 134 1490
+3  1505 1507 1506
+3  1564 600 1204
+3  292 1575 1574
+3  1709 524 556
+3  556 555 1709
+3  798 1254 1038
+3  228 1745 1742
+3  173 191 1272
+3  1146 1145 638
+3  91 639 1144
+3  941 942 649
+3  12 1150 1148
+3  1156 369 590
+3  537 29 1318
+3  1147 1151 836
+3  639 648 1149
+3  1155 590 92
+3  1121 1156 1122
+3  355 1478 343
+3  1158 1160 636
+3  1433 1431 811
+3  820 501 1060
+3  1434 501 820
+3  1158 465 1160
+3  636 1162 1017
+3  1014 460 1161
+3  1162 1161 460
+3  1160 1161 1162
+3  1154 1155 92
+3  1166 1155 1154
+3  834 1166 1154
+3  834 833 1167
+3  834 1167 1166
+3  687 1169 686
+3  686 1169 212
+3  1170 1171 529
+3  531 897 529
+3  529 1171 531
+3  1097 1096 1098
+3  1729 1728 311
+3  1764 1783 184
+3  1782 1118 1780
+3  1593 1592 1414
+3  126 1177 1178
+3  498 1174 801
+3  1174 1173 801
+3  543 1063 1062
+3  1267 543 1062
+3  1418 1421 1800
+3  172 1273 1037
+3  1175 1176 126
+3  1270 1142 1271
+3  89 1270 1271
+3  894 896 62
+3  1114 736 1552
+3  1180 846 51
+3  1809 731 1182
+3  1180 1751 1750
+3  1553 896 895
+3  967 1183 586
+3  1799 1175 1187
+3  1233 207 208
+3  1662 1206 1663
+3  1206 1645 1663
+3  1193 1190 1192
+3  659 1190 1193
+3  1700 882 1701
+3  631 1196 229
+3  1203 258 1198
+3  1201 1199 1202
+3  115 1203 1198
+3  602 1572 1573
+3  1573 1572 1576
+3  1202 52 581
+3  307 1223 1222
+3  270 279 1205
+3  1205 54 270
+3  285 54 1205
+3  929 451 1657
+3  284 282 1208
+3  1208 282 84
+3  1657 597 1658
+3  84 1207 1208
+3  1215 287 1217
+3  283 1043 1210
+3  1212 287 1213
+3  1213 1044 1212
+3  1215 608 609
+3  1217 1216 607
+3  608 1217 607
+3  1222 729 730
+3  1808 1809 308
+3  729 168 730
+3  1242 734 729
+3  1224 202 203
+3  203 146 1224
+3  206 1226 1224
+3  145 1225 1226
+3  1225 242 490
+3  1 1228 1229
+3  206 1231 1230
+3  1 1229 219
+3  1230 1231 207
+3  207 1232 208
+3  1229 207 1233
+3  496 204 1236
+3  1236 205 496
+3  726 725 1243
+3  726 1238 727
+3  1239 304 1240
+3  728 1240 1241
+3  1241 1240 304
+3  169 1243 760
+3  1238 1243 169
+3  726 1243 1238
+3  725 760 1243
+3  833 832 1247
+3  1245 327 368
+3  328 1245 368
+3  319 1246 487
+3  319 82 1246
+3  81 1247 832
+3  1199 1745 229
+3  773 1127 1665
+3  990 1249 440
+3  1251 438 1661
+3  426 1587 1589
+3  1382 1381 1345
+3  424 1252 104
+3  1661 440 1251
+3  442 439 77
+3  1261 777 413
+3  1788 1255 1786
+3  807 13 1262
+3  1174 1264 800
+3  806 1265 1266
+3  807 1266 499
+3  1268 543 1267
+3  1268 1267 498
+3  802 1268 498
+3  1269 238 45
+3  251 1269 45
+3  128 1142 1178
+3  1272 1273 172
+3  1560 414 979
+3  1288 418 1306
+3  1285 419 1284
+3  408 1282 1305
+3  1287 167 1286
+3  742 1313 86
+3  1313 768 86
+3  400 1293 309
+3  1294 167 1287
+3  1312 1308 1307
+3  324 1704 1703
+3  1299 401 1297
+3  1287 407 1300
+3  635 1303 1298
+3  1374 635 1298
+3  1299 1304 401
+3  1299 1285 1304
+3  1609 1373 1616
+3  1310 743 310
+3  537 1318 538
+3  1526 1527 721
+3  1319 1317 1318
+3  1319 351 1317
+3  1073 351 1319
+3  1814 828 510
+3  1393 505 1392
+3  1393 1094 1095
+3  1429 1431 816
+3  614 1690 434
+3  1765 782 1815
+3  1815 411 1765
+3  1437 812 1438
+3  1813 510 899
+3  511 1451 6
+3  341 347 1655
+3  32 1456 513
+3  1448 32 1449
+3  1466 528 830
+3  830 516 1466
+3  506 822 1453
+3  512 1336 1456
+3  1171 9 531
+3  513 1336 1412
+3  684 138 1331
+3  1330 935 1329
+3  1331 138 936
+3  1328 1333 674
+3  520 1407 1406
+3  1441 1415 819
+3  113 345 1655
+3  1607 1294 1606
+3  506 1446 1447
+3  1430 502 1429
+3  813 1720 1722
+3  1433 1432 1431
+3  818 1408 1336
+3  822 533 1427
+3  1427 821 822
+3  612 1690 613
+3  1804 1420 1803
+3  1431 1432 816
+3  514 1412 1411
+3  818 819 1415
+3  1339 1352 1338
+3  1333 1177 1334
+3  1021 129 1323
+3  1810 1811 899
+3  1407 1408 1406
+3  1220 1221 1808
+3  1023 1322 1320
+3  1324 1025 1326
+3  1326 1325 1324
+3  1325 1326 124
+3  1324 1022 1323
+3  1449 32 1450
+3  1811 1812 1813
+3  1813 1812 6
+3  1428 502 1422
+3  506 1453 1445
+3  1070 113 347
+3  811 1429 1428
+3  1423 811 1428
+3  903 898 334
+3  1433 1434 820
+3  535 154 534
+3  810 501 1434
+3  546 547 187
+3  545 546 544
+3  1690 39 435
+3  511 508 1451
+3  1065 1066 541
+3  1069 1779 100
+3  1778 1779 1069
+3  1357 437 1349
+3  1393 1392 1100
+3  46 597 1554
+3  1701 900 1700
+3  1025 1035 1326
+3  1710 554 1709
+3  1324 1325 1022
+3  1709 555 1710
+3  1806 1800 814
+3  1405 523 1710
+3  1322 1323 1022
+3  1029 1323 129
+3  1025 1323 1029
+3  1329 1327 1328
+3  128 1178 1514
+3  674 1334 1332
+3  1325 1321 1022
+3  1328 674 1329
+3  837 1177 1333
+3  1331 683 684
+3  1332 1176 673
+3  683 1331 0
+3  1331 1330 0
+3  1332 1330 674
+3  1176 1334 1177
+3  1332 1334 1176
+3  1342 437 1341
+3  441 1338 422
+3  441 1339 1338
+3  88 878 1545
+3  1347 43 389
+3  947 1350 1351
+3  1347 417 1344
+3  1344 417 1383
+3  1705 480 1704
+3  391 1377 393
+3  1368 1366 1345
+3  1345 1381 1368
+3  1385 439 422
+3  422 1365 1385
+3  1343 1356 1350
+3  395 1343 1350
+3  1357 421 1358
+3  1348 417 1347
+3  1363 1359 104
+3  1355 1340 367
+3  1354 1350 947
+3  395 1350 1354
+3  388 387 68
+3  1348 1347 389
+3  1357 1358 1361
+3  437 1357 1361
+3  1363 104 1364
+3  1252 1253 104
+3  420 423 1360
+3  1362 1349 437
+3  1342 1362 437
+3  436 1358 1363
+3  1661 438 1660
+3  438 1365 1364
+3  1364 1253 438
+3  1485 296 765
+3  1686 635 1685
+3  1375 1376 1367
+3  1009 454 1008
+3  425 1584 1249
+3  67 931 1395
+3  1613 1301 1611
+3  920 1395 931
+3  1368 1381 395
+3  393 1377 70
+3  1379 43 1380
+3  1379 1380 392
+3  395 1382 1343
+3  395 1381 1382
+3  438 1385 1365
+3  599 1390 302
+3  1563 290 1571
+3  1389 93 1387
+3  1393 1095 505
+3  1606 1608 1607
+3  1326 1035 124
+3  1394 1374 1298
+3  1632 166 1281
+3  1312 787 788
+3  1419 1802 1801
+3  412 1637 1635
+3  518 1494 971
+3  1656 1347 1344
+3  817 1415 1441
+3  1441 1440 813
+3  1717 1716 1442
+3  1464 1689 696
+3  1429 502 1428
+3  819 503 1441
+3  1422 812 1423
+3  1720 1719 1438
+3  1421 1418 813
+3  1419 502 1430
+3  1400 1402 1401
+3  1412 504 1411
+3  1400 522 1402
+3  1407 519 1410
+3  521 1404 562
+3  521 560 1403
+3  555 522 1405
+3  1582 859 860
+3  1403 1409 520
+3  1336 504 1412
+3  1410 504 1408
+3  1407 1410 1408
+3  514 513 1412
+3  504 1410 1411
+3  1416 817 1417
+3  1417 37 1416
+3  1415 1591 1592
+3  302 1602 1481
+3  1401 1414 37
+3  1592 1591 1414
+3  1803 1430 816
+3  1439 1721 1440
+3  731 1808 168
+3  168 1808 730
+3  523 1405 1399
+3  1423 1424 810
+3  1432 186 1117
+3  506 1447 823
+3  1429 811 1431
+3  816 1432 1117
+3  1426 809 1488
+3  1427 808 1426
+3  1428 1422 1423
+3  816 1804 1803
+3  1117 1804 816
+3  1802 1420 1801
+3  1434 1433 811
+3  1487 821 1427
+3  1722 812 1422
+3  821 26 1437
+3  1720 812 1722
+3  1445 1452 1444
+3  308 1220 1808
+3  1221 730 1808
+3  512 1443 819
+3  1454 1455 1446
+3  1443 512 1454
+3  1454 512 1455
+3  826 1442 1443
+3  1443 1442 503
+3  1443 503 819
+3  1447 1455 1456
+3  1447 32 1448
+3  823 1447 1448
+3  1447 1456 32
+3  507 823 1448
+3  1446 1455 1447
+3  1449 508 1103
+3  466 1458 1457
+3  589 1460 1457
+3  1457 1458 589
+3  589 1458 463
+3  987 1644 190
+3  1459 463 1458
+3  1458 466 1459
+3  1703 1704 1706
+3  1602 1599 1481
+3  1165 590 1643
+3  1464 59 1689
+3  1688 59 971
+3  1689 1687 696
+3  1465 1466 516
+3  1481 982 302
+3  1476 1475 79
+3  211 1475 1476
+3  210 1473 1475
+3  1477 212 1169
+3  211 1476 1477
+3  1413 1777 519
+3  1660 438 1253
+3  1499 526 696
+3  1660 1253 1252
+3  1657 451 597
+3  1483 1127 1126
+3  416 1127 1483
+3  1559 165 1558
+3  1558 165 1482
+3  409 982 1484
+3  981 409 1484
+3  1580 429 992
+3  26 821 1487
+3  855 1489 1490
+3  1505 1506 467
+3  1494 694 1493
+3  855 1490 1497
+3  147 14 1496
+3  1499 696 1492
+3  854 855 1498
+3  1503 527 530
+3  1504 1490 1489
+3  1489 690 1504
+3  1504 690 1501
+3  429 932 1506
+3  1506 932 467
+3  1343 1508 1356
+3  1343 1342 1508
+3  1004 1599 1598
+3  723 1510 1311
+3  1511 432 1311
+3  1510 1511 1311
+3  778 1533 1534
+3  1511 1512 432
+3  776 1512 1511
+3  776 793 1512
+3  1295 1608 1609
+3  882 1702 881
+3  1701 882 1707
+3  593 1519 1518
+3  1542 776 1510
+3  1519 1520 1518
+3  1518 1520 196
+3  1256 1522 775
+3  1530 1526 780
+3  791 1542 1510
+3  941 940 1524
+3  1524 942 941
+3  1525 791 1526
+3  1528 721 1527
+3  781 1531 412
+3  1529 1522 1521
+3  780 1526 791
+3  1531 1530 780
+3  1527 1530 779
+3  779 1538 1537
+3  776 1542 1521
+3  779 1532 1527
+3  1531 780 412
+3  1532 1528 1527
+3  1535 1534 722
+3  1533 779 1537
+3  1540 781 412
+3  778 1260 413
+3  1536 1260 778
+3  1534 1536 778
+3  1634 1636 1633
+3  1540 783 1539
+3  1531 1538 1530
+3  1537 1538 722
+3  783 1540 782
+3  893 885 333
+3  327 326 1543
+3  477 573 1764
+3  896 529 897
+3  1553 529 896
+3  246 244 156
+3  246 156 250
+3  10 243 246
+3  1557 908 906
+3  1718 815 1438
+3  1483 1126 1559
+3  1483 1559 1558
+3  1563 1562 601
+3  1564 1563 601
+3  1564 1204 1563
+3  1566 1567 406
+3  163 1569 404
+3  405 406 1567
+3  1387 93 1579
+3  1568 1569 405
+3  405 1569 1570
+3  1577 1576 603
+3  468 1580 116
+3  293 1579 1574
+3  1388 1579 293
+3  292 1576 1577
+3  603 1572 1578
+3  1580 992 571
+3  571 116 1580
+3  1776 515 1042
+3  1473 228 1742
+3  1587 445 1586
+3  1588 445 442
+3  77 1588 442
+3  588 1585 1586
+3  1589 447 469
+3  1416 1591 817
+3  1599 1004 1481
+3  1601 1461 1600
+3  1004 1598 1596
+3  1004 1596 1597
+3  1386 1600 1599
+3  1601 1600 1386
+3  1602 1386 1599
+3  1604 1389 1387
+3  1604 1387 1601
+3  1386 1604 1601
+3  1611 397 1373
+3  1373 397 1372
+3  1608 1606 399
+3  1301 398 1612
+3  1618 1619 394
+3  1621 1620 41
+3  394 1620 393
+3  394 1619 1620
+3  174 475 1623
+3  1623 475 22
+3  1623 387 69
+3  39 1627 435
+3  1628 1295 1609
+3  1629 1630 1296
+3  1761 1762 1305
+3  1633 1632 786
+3  1305 1762 1307
+3  785 1634 1633
+3  1636 166 1633
+3  1639 1640 712
+3  712 1640 713
+3  728 1223 1638
+3  1223 307 1638
+3  1222 1642 307
+3  1221 1642 1222
+3  985 1644 984
+3  1650 181 1055
+3  1650 1055 1651
+3  1053 1650 1651
+3  1664 552 187
+3  1058 1646 1057
+3  1058 181 1646
+3  1058 1055 181
+3  488 478 1764
+3  1764 184 488
+3  1764 478 477
+3  1802 1430 1803
+3  1803 1420 1802
+3  858 1768 1769
+3  1769 548 858
+3  716 1666 1128
+3  1128 1666 1665
+3  1496 1672 147
+3  1670 149 563
+3  1678 1670 563
+3  1671 147 1672
+3  1680 1671 149
+3  1677 550 1669
+3  1674 565 1024
+3  1678 1669 564
+3  1679 564 1674
+3  1670 1680 149
+3  1680 1670 1679
+3  1684 857 147
+3  131 1682 937
+3  1682 1684 1683
+3  131 1684 1682
+3  55 1682 1681
+3  1684 131 132
+3  147 1683 1684
+3  1700 900 324
+3  1687 695 1493
+3  1687 1493 1492
+3  696 1687 1492
+3  1687 1688 695
+3  612 39 1690
+3  1693 152 1692
+3  661 1693 1692
+3  97 1736 1737
+3  1696 201 1695
+3  1697 1696 594
+3  324 1703 1702
+3  1703 881 1702
+3  1704 714 1706
+3  1752 53 585
+3  882 1708 1707
+3  554 524 1709
+3  1805 1804 1117
+3  1405 1710 555
+3  200 1730 988
+3  1715 311 578
+3  109 1715 578
+3  1715 109 1711
+3  1715 1711 276
+3  813 1722 1421
+3  1104 1726 313
+3  951 1727 312
+3  1726 1727 313
+3  111 1727 1726
+3  909 1732 1731
+3  1732 910 913
+3  910 1733 1734
+3  1732 913 95
+3  201 1733 1735
+3  1736 200 1737
+3  1739 1738 19
+3  1474 1742 225
+3  1743 114 1744
+3  1750 1751 1179
+3  1184 846 1749
+3  1218 1751 1180
+3  1750 1179 1748
+3  1752 1755 53
+3  266 1754 1756
+3  266 1756 848
+3  1756 264 848
+3  1761 1282 1281
+3  1545 1758 88
+3  166 1761 1281
+3  326 1760 1759
+3  1054 1051 1763
+3  1050 1054 1763
+3  1282 1761 1305
+3  411 789 1765
+3  1766 858 996
+3  1773 796 767
+3  1773 767 1771
+3  1773 795 796
+3  1092 341 1774
+3  342 1092 1774
+3  1655 112 1774
+3  1774 341 1655
+3  1775 1039 515
+3  519 1777 1042
+3  515 1776 1775
+3  1778 1070 1779
+3  347 1093 1779
+3  1779 1093 100
+3  1764 573 1783
+3  1248 1784 575
+3  574 575 1784
+3  1783 574 1784
+3  1772 720 1790
+3  1255 1785 1786
+3  1793 1791 1258
+3  1795 765 1787
+3  1795 1787 1794
+3  1787 765 1790
+3  1795 1259 1485
+3  1257 1796 774
+3  1793 769 1791
+3  1791 1785 1257
+3  1793 1259 1794
+3  1785 1255 1796
+3  1257 1785 1796
+3  1797 1186 1270
+3  1800 1419 1801
+3  1800 1801 814
+3  1418 1806 1417
+3  1418 1800 1806
+3  37 1417 1807
+3  1807 1417 1806
+3  814 1807 1806
+3  1807 814 1435
+3  1807 1435 1399
+3  1810 899 898
+3  335 902 1812
+3  1813 1814 510
+
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/cube_quad.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/cube_quad.off
new file mode 100644
index 0000000..4ba74c5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/cube_quad.off
@@ -0,0 +1,16 @@
+OFF
+8 6 0
+-1 -1 -1
+-1 1 -1
+1 1 -1
+1 -1 -1
+-1 -1 1
+-1 1 1
+1 1 1
+1 -1 1
+4  0 3 7 4
+4  3 2 6 7
+4  2 1 5 6
+4  1 0 4 5 
+4  4 7 6 5
+4  0 1 2 3
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/degtri_sliding.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/degtri_sliding.off
new file mode 100644
index 0000000..6bed804
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/degtri_sliding.off
@@ -0,0 +1,18 @@
+OFF
+8 8 0
+4 -2 0
+6 0 0
+4 0 0
+2 0 0
+1 0 0
+3 0 0
+5 0 0
+3 2 0
+3 0 1 2
+3 0 2 3
+3 3 2 4
+3 2 1 6
+3 2 6 4
+3 4 6 5
+3 5 6 7
+3 4 5 7
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/eight.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/eight.off
new file mode 100644
index 0000000..45eca33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/eight.off
@@ -0,0 +1,951 @@
+OFF
+315 634 0
+-0.142420 0.065177 0.260608
+-0.181989 0.076540 0.271445
+-0.123893 0.066093 0.329939
+-0.122979 0.064590 0.188283
+0.142420 0.065177 -0.260608
+0.181989 0.076540 -0.271445
+0.123893 0.066093 -0.329939
+0.122979 0.064590 -0.188283
+-0.072239 -0.014726 -0.341881
+-0.017838 -0.014627 -0.366416
+-0.039749 0.043670 -0.372418
+-0.099600 -0.066092 -0.359901
+-0.032912 -0.066020 -0.395573
+-0.138410 -0.065466 -0.296287
+-0.135170 -0.077707 -0.393831
+-0.049677 -0.077763 -0.440679
+0.068739 -0.068686 -0.390190
+0.072239 -0.014726 0.341881
+0.017838 -0.014627 0.366416
+0.039749 0.043670 0.372418
+0.099600 -0.066092 0.359901
+0.032912 -0.066020 0.395573
+0.138410 -0.065466 0.296287
+0.135170 -0.077707 0.393831
+0.049677 -0.077763 0.440679
+-0.068739 -0.068686 0.390190
+-0.045055 -0.055361 -0.476864
+-0.037186 -0.014824 -0.499314
+0.051296 -0.044322 -0.483565
+-0.126475 -0.014757 -0.465447
+0.150198 0.055570 -0.424934
+0.060284 0.068494 -0.459204
+0.135079 0.077725 -0.392823
+0.045055 -0.055361 0.476864
+0.037186 -0.014824 0.499314
+-0.051296 -0.044322 0.483565
+0.126475 -0.014757 0.465447
+-0.150198 0.055570 0.424934
+-0.060284 0.068494 0.459204
+-0.135079 0.077725 0.392823
+0.188724 0.013117 0.082286
+0.233576 0.010949 0.199004
+0.215392 -0.043248 0.185690
+0.156431 0.043450 0.020495
+0.171897 0.000092 0.002021
+0.162866 0.035579 -0.035095
+-0.188724 0.013117 -0.082286
+-0.233576 0.010949 -0.199004
+-0.215392 -0.043248 -0.185690
+-0.156431 0.043450 -0.020495
+-0.171897 0.000092 -0.002021
+-0.162866 0.035579 0.035095
+-0.067313 0.014873 0.490898
+0.021715 0.044742 0.489868
+-0.126516 0.014972 0.465443
+-0.214720 0.015203 0.374161
+-0.176897 0.015193 0.425242
+-0.236797 0.015313 0.316273
+-0.193127 0.066315 0.349240
+-0.208420 0.067939 0.286047
+-0.229263 0.043816 0.250443
+-0.214658 0.043635 0.184550
+-0.130377 0.078643 0.137373
+0.067313 0.014873 -0.490898
+-0.021715 0.044742 -0.489868
+0.126516 0.014972 -0.465443
+0.214720 0.015203 -0.374161
+0.176897 0.015193 -0.425242
+0.236797 0.015313 -0.316273
+0.193127 0.066315 -0.349240
+0.208420 0.067939 -0.286047
+0.229263 0.043816 -0.250443
+0.214658 0.043635 -0.184550
+0.181744 -0.076895 -0.225204
+0.141494 -0.076729 -0.390420
+0.212561 -0.067863 -0.284234
+0.199134 -0.043974 -0.379903
+0.224567 -0.043744 -0.324583
+0.233145 -0.014538 -0.201222
+0.242955 -0.014647 -0.261574
+0.156545 -0.043448 -0.017204
+0.163391 -0.035324 0.038619
+0.188528 0.001833 -0.078150
+0.194436 -0.025458 -0.109043
+-0.181744 -0.076895 0.225204
+-0.141494 -0.076729 0.390420
+-0.212561 -0.067863 0.284234
+-0.199134 -0.043974 0.379903
+-0.224567 -0.043744 0.324583
+-0.233145 -0.014538 0.201222
+-0.242955 -0.014647 0.261574
+-0.156545 -0.043448 0.017204
+-0.163391 -0.035324 -0.038619
+-0.188528 0.001833 0.078150
+-0.194436 -0.025458 0.109043
+-0.006718 -0.041711 -0.133416
+0.069747 -0.071193 -0.115051
+-0.039011 -0.076564 -0.103399
+0.192968 -0.066144 0.349289
+0.149444 -0.055219 0.425539
+0.068472 0.068833 0.390202
+0.091510 0.028661 0.330536
+0.106919 -0.017598 0.296052
+0.122356 -0.042525 0.244251
+0.109380 -0.041514 0.199886
+0.148483 -0.069250 0.225265
+0.111048 -0.071410 0.151511
+0.198237 0.068094 0.337988
+0.182439 0.044243 0.406197
+0.236321 0.014962 0.322550
+0.214756 -0.014995 0.374311
+0.176985 -0.015124 0.425130
+0.243695 0.014726 0.262496
+0.227091 -0.043871 0.308431
+0.229584 -0.043650 0.250875
+0.177985 -0.075834 0.246262
+0.201340 -0.070830 0.270330
+-0.198237 0.068094 -0.337988
+-0.182439 0.044243 -0.406197
+-0.236321 0.014962 -0.322550
+-0.243695 0.014726 -0.262496
+-0.215975 0.054756 -0.201749
+-0.216058 0.065555 -0.270604
+-0.130747 0.073971 -0.079098
+-0.154051 0.054750 -0.064135
+-0.068472 0.068833 -0.390202
+-0.091510 0.028661 -0.330536
+-0.106919 -0.017598 -0.296052
+-0.122356 -0.042525 -0.244251
+-0.109380 -0.041514 -0.199886
+-0.148483 -0.069250 -0.225265
+-0.117365 0.029066 -0.274731
+-0.112650 0.000764 -0.268704
+-0.112501 0.029427 -0.214335
+-0.104553 0.001720 -0.211251
+-0.119854 0.054039 -0.314476
+-0.139580 0.071459 -0.324689
+-0.137664 0.077821 -0.381521
+-0.134682 0.054062 -0.246484
+-0.157216 0.071046 -0.245232
+-0.072145 -0.052976 -0.145240
+-0.067260 -0.026653 -0.159535
+-0.016679 0.000263 -0.144728
+-0.069480 0.001467 -0.166527
+-0.078129 0.028679 -0.165774
+-0.055533 0.043972 -0.142594
+-0.114030 0.053191 -0.183583
+-0.132300 0.070511 -0.172194
+-0.066408 0.072769 -0.112665
+-0.182880 0.077035 -0.246568
+-0.198380 0.070615 -0.206609
+-0.109991 0.043758 -0.462619
+-0.086940 0.072150 -0.443723
+-0.192968 -0.066144 -0.349289
+-0.149444 -0.055219 -0.425539
+-0.214756 -0.014995 -0.374311
+-0.176985 -0.015124 -0.425130
+-0.227091 -0.043871 -0.308431
+-0.229584 -0.043650 -0.250875
+-0.177985 -0.075834 -0.246262
+-0.201340 -0.070830 -0.270330
+0.215975 0.054756 0.201749
+0.216058 0.065555 0.270604
+0.130747 0.073971 0.079098
+0.154051 0.054750 0.064135
+0.117365 0.029066 0.274731
+0.112650 0.000764 0.268704
+0.112501 0.029427 0.214335
+0.104553 0.001720 0.211251
+0.119854 0.054039 0.314476
+0.139580 0.071459 0.324689
+0.137664 0.077821 0.381521
+0.134682 0.054062 0.246484
+0.157216 0.071046 0.245232
+0.072145 -0.052976 0.145240
+0.067260 -0.026653 0.159535
+0.016679 0.000263 0.144728
+0.069480 0.001467 0.166527
+0.078129 0.028679 0.165774
+0.055533 0.043972 0.142594
+0.114030 0.053191 0.183583
+0.132300 0.070511 0.172194
+0.066408 0.072769 0.112665
+0.182880 0.077035 0.246568
+0.198380 0.070615 0.206609
+0.109991 0.043758 0.462619
+0.086940 0.072150 0.443723
+-0.143990 0.064253 0.061311
+-0.162481 0.072128 0.141000
+-0.070836 0.053288 0.144711
+-0.103935 0.027092 0.203309
+-0.064337 0.027059 0.158590
+-0.085285 0.072778 0.126957
+0.130377 0.078643 -0.137373
+0.143990 0.064253 -0.061311
+0.162481 0.072128 -0.141000
+0.033931 -0.102736 0.021128
+-0.013620 -0.092970 0.067033
+-0.017420 -0.103765 0.019514
+0.144430 -0.063958 0.063078
+0.164735 -0.071550 0.145631
+0.039842 -0.043515 -0.372455
+0.043745 0.000113 -0.358932
+0.098774 0.028764 -0.320716
+0.011679 0.044474 -0.377875
+0.056461 0.043910 -0.365659
+0.016926 0.077778 -0.437286
+0.051474 0.071274 -0.403438
+-0.144430 -0.063958 -0.063078
+-0.164735 -0.071550 -0.145631
+-0.039842 -0.043515 0.372455
+-0.043745 0.000113 0.358932
+-0.098774 0.028764 0.320716
+-0.011679 0.044474 0.377875
+-0.056461 0.043910 0.365659
+-0.016926 0.077778 0.437286
+-0.051474 0.071274 0.403438
+0.089422 0.084836 0.087783
+0.148983 0.077301 0.155338
+-0.089422 0.084836 -0.087783
+-0.148983 0.077301 -0.155338
+0.155013 -0.054050 -0.062498
+0.098521 -0.088093 0.058144
+0.109518 -0.080499 -0.003782
+0.135082 -0.071895 -0.082591
+-0.040608 -0.001091 0.151679
+-0.006474 0.027369 0.138989
+-0.117240 0.027902 0.263865
+-0.111172 -0.000862 0.238784
+-0.108034 -0.015290 0.286318
+-0.118081 -0.028990 0.243559
+-0.096603 -0.029218 0.187188
+-0.087620 -0.001514 0.185718
+-0.049084 -0.028336 0.148599
+0.006940 -0.053514 0.124233
+0.009912 -0.027355 0.139023
+-0.059559 -0.052588 0.136104
+-0.069747 -0.071193 0.115051
+0.010884 -0.076074 0.101284
+0.064208 -0.075195 0.115066
+0.131198 -0.078763 0.139298
+0.078259 -0.088505 0.085363
+-0.155013 -0.054050 0.062498
+-0.056726 -0.095471 -0.060074
+-0.131198 -0.078763 -0.139298
+-0.111048 -0.071410 -0.151511
+-0.098521 -0.088093 -0.058144
+-0.109518 -0.080499 0.003782
+-0.135082 -0.071895 0.082591
+0.103906 0.085665 -0.069889
+0.108709 0.081251 -0.005000
+0.034442 0.102371 0.021265
+0.075963 0.094600 0.013042
+0.013471 0.103828 -0.022416
+-0.027796 0.100485 0.037640
+-0.103906 0.085665 0.069889
+-0.108709 0.081251 0.005000
+-0.034442 0.102371 -0.021265
+-0.075963 0.094600 -0.013042
+0.040608 -0.001091 -0.151679
+0.006474 0.027369 -0.138989
+0.064337 0.027059 -0.158590
+0.117240 0.027902 -0.263865
+0.103935 0.027092 -0.203309
+0.111172 -0.000862 -0.238784
+0.108034 -0.015290 -0.286318
+0.118081 -0.028990 -0.243559
+0.096603 -0.029218 -0.187188
+0.087620 -0.001514 -0.185718
+0.159791 -0.044092 -0.427265
+0.110272 -0.043635 -0.462468
+0.061774 -0.071645 -0.450800
+0.078724 -0.077581 -0.420633
+0.091129 0.000205 -0.322400
+0.091584 -0.028435 -0.330507
+0.139783 -0.071270 -0.324585
+0.119941 -0.053753 -0.314439
+0.134093 -0.053827 -0.246057
+0.156632 -0.071069 -0.245245
+0.059559 -0.052588 -0.136104
+0.049084 -0.028336 -0.148599
+0.112106 -0.053467 -0.182295
+0.130580 -0.070469 -0.170441
+0.214980 -0.054727 -0.199625
+0.197084 -0.070768 -0.204512
+0.013620 -0.092970 -0.067033
+0.024285 -0.100338 -0.035804
+0.107539 -0.079004 -0.102761
+0.084682 -0.089243 -0.045045
+-0.159791 -0.044092 0.427265
+-0.110272 -0.043635 0.462468
+-0.061774 -0.071645 0.450800
+-0.078724 -0.077581 0.420633
+-0.091129 0.000205 0.322400
+-0.091584 -0.028435 0.330507
+-0.139783 -0.071270 0.324585
+-0.119941 -0.053753 0.314439
+-0.134093 -0.053827 0.246057
+-0.156632 -0.071069 0.245245
+-0.112106 -0.053467 0.182295
+-0.130580 -0.070469 0.170441
+-0.214980 -0.054727 0.199625
+-0.197084 -0.070768 0.204512
+-0.107539 -0.079004 0.102761
+-0.084682 -0.089243 0.045045
+-0.006757 0.053977 0.123829
+-0.020415 0.076271 0.101549
+-0.080278 0.085841 0.090316
+-0.000654 0.092672 0.070206
+0.070836 0.053288 -0.144711
+0.085285 0.072778 -0.126957
+0.006757 0.053977 -0.123829
+0.020415 0.076271 -0.101549
+0.000654 0.092672 -0.070206
+0.080278 0.085841 -0.090316
+3 0 1 2
+3 3 1 0
+3 4 5 6
+3 7 5 4
+3 8 9 10
+3 11 12 9
+3 11 9 8
+3 8 13 11
+3 14 15 11
+3 12 15 16
+3 15 12 11
+3 13 14 11
+3 17 18 19
+3 20 21 18
+3 20 18 17
+3 17 22 20
+3 23 24 20
+3 21 24 25
+3 24 21 20
+3 22 23 20
+3 26 27 28
+3 29 27 26
+3 30 31 32
+3 5 32 6
+3 33 34 35
+3 36 34 33
+3 37 38 39
+3 1 39 2
+3 40 41 42
+3 43 44 45
+3 40 44 43
+3 46 47 48
+3 49 50 51
+3 46 50 49
+3 34 52 35
+3 52 34 53
+3 52 53 38
+3 54 52 38
+3 37 54 38
+3 37 55 56
+3 37 56 54
+3 57 58 59
+3 58 1 59
+3 58 57 55
+3 58 55 37
+3 39 58 37
+3 39 1 58
+3 60 59 61
+3 60 57 59
+3 62 1 3
+3 27 63 28
+3 63 27 64
+3 63 64 31
+3 65 63 31
+3 30 65 31
+3 30 66 67
+3 30 67 65
+3 68 69 70
+3 69 5 70
+3 69 68 66
+3 69 66 30
+3 32 69 30
+3 32 5 69
+3 71 70 72
+3 71 68 70
+3 73 74 75
+3 75 76 77
+3 76 75 74
+3 76 66 77
+3 67 66 76
+3 66 68 77
+3 78 79 71
+3 72 78 71
+3 75 77 79
+3 77 68 79
+3 79 68 71
+3 80 44 81
+3 44 40 81
+3 81 40 42
+3 78 82 83
+3 82 78 72
+3 45 82 72
+3 44 82 45
+3 83 82 80
+3 82 44 80
+3 84 85 86
+3 86 87 88
+3 87 86 85
+3 87 55 88
+3 56 55 87
+3 55 57 88
+3 89 90 60
+3 61 89 60
+3 86 88 90
+3 88 57 90
+3 90 57 60
+3 91 50 92
+3 50 46 92
+3 92 46 48
+3 89 93 94
+3 93 89 61
+3 51 93 61
+3 50 93 51
+3 94 93 91
+3 93 50 91
+3 95 96 97
+3 23 98 99
+3 99 36 33
+3 99 33 24
+3 99 24 23
+3 19 100 101
+3 102 17 101
+3 101 17 19
+3 22 17 102
+3 103 104 105
+3 103 105 22
+3 103 22 102
+3 104 106 105
+3 107 108 109
+3 99 110 111
+3 99 111 36
+3 98 110 99
+3 111 110 108
+3 36 111 108
+3 108 110 109
+3 112 113 114
+3 112 109 113
+3 113 109 110
+3 98 113 110
+3 42 41 114
+3 41 112 114
+3 115 23 22
+3 115 22 105
+3 114 116 42
+3 114 113 116
+3 113 98 116
+3 23 115 116
+3 98 23 116
+3 117 118 119
+3 120 47 121
+3 121 47 46
+3 122 117 119
+3 122 120 121
+3 122 119 120
+3 123 121 124
+3 121 46 124
+3 124 46 49
+3 10 125 126
+3 127 8 126
+3 126 8 10
+3 13 8 127
+3 128 129 130
+3 128 130 13
+3 128 13 127
+3 131 132 126
+3 132 129 128
+3 127 132 128
+3 132 127 126
+3 133 134 131
+3 132 134 129
+3 134 132 131
+3 135 131 126
+3 135 125 136
+3 125 137 136
+3 135 126 125
+3 138 136 139
+3 138 133 131
+3 138 131 135
+3 138 135 136
+3 136 137 139
+3 140 141 95
+3 140 95 97
+3 140 129 141
+3 129 134 141
+3 142 143 144
+3 144 143 133
+3 143 142 95
+3 143 95 141
+3 134 143 141
+3 143 134 133
+3 145 142 144
+3 146 139 147
+3 145 146 147
+3 145 147 148
+3 145 144 146
+3 146 144 133
+3 146 133 138
+3 139 146 138
+3 139 149 147
+3 137 149 139
+3 149 137 117
+3 149 117 122
+3 150 149 122
+3 122 121 150
+3 121 123 150
+3 64 27 151
+3 27 29 151
+3 151 118 152
+3 29 118 151
+3 118 117 152
+3 117 137 152
+3 151 152 64
+3 64 152 31
+3 14 153 154
+3 154 29 26
+3 154 26 15
+3 154 15 14
+3 154 155 156
+3 154 156 29
+3 153 155 154
+3 156 155 118
+3 29 156 118
+3 118 155 119
+3 120 157 158
+3 48 47 158
+3 47 120 158
+3 120 119 157
+3 157 119 155
+3 153 157 155
+3 159 14 13
+3 159 13 130
+3 158 160 48
+3 158 157 160
+3 157 153 160
+3 14 159 160
+3 153 14 160
+3 112 41 161
+3 161 41 40
+3 162 107 109
+3 162 112 161
+3 162 109 112
+3 163 161 164
+3 161 40 164
+3 164 40 43
+3 165 166 101
+3 166 104 103
+3 102 166 103
+3 166 102 101
+3 167 168 165
+3 166 168 104
+3 168 166 165
+3 169 165 101
+3 169 100 170
+3 100 171 170
+3 169 101 100
+3 172 170 173
+3 172 167 165
+3 172 165 169
+3 172 169 170
+3 170 171 173
+3 174 104 175
+3 106 104 174
+3 104 168 175
+3 176 177 178
+3 178 177 167
+3 168 177 175
+3 177 168 167
+3 179 176 178
+3 180 173 181
+3 179 180 181
+3 179 181 182
+3 179 178 180
+3 180 178 167
+3 180 167 172
+3 173 180 172
+3 173 183 181
+3 171 183 173
+3 183 171 107
+3 183 107 162
+3 184 183 162
+3 162 161 184
+3 161 163 184
+3 53 34 185
+3 34 36 185
+3 185 108 186
+3 36 108 185
+3 108 107 186
+3 107 171 186
+3 185 186 53
+3 53 186 38
+3 187 49 51
+3 61 188 187
+3 51 61 187
+3 59 188 61
+3 1 188 59
+3 1 62 188
+3 189 190 191
+3 192 3 189
+3 3 190 189
+3 192 62 3
+3 193 5 7
+3 194 43 45
+3 72 195 194
+3 45 72 194
+3 70 195 72
+3 5 195 70
+3 5 193 195
+3 196 197 198
+3 199 80 81
+3 42 200 199
+3 81 42 199
+3 116 200 42
+3 115 200 116
+3 201 202 9
+3 12 201 9
+3 201 12 16
+3 6 203 4
+3 204 9 205
+3 10 9 204
+3 9 202 205
+3 202 203 205
+3 205 203 6
+3 32 206 207
+3 31 206 32
+3 152 206 31
+3 137 206 152
+3 207 206 125
+3 206 137 125
+3 10 207 125
+3 204 207 10
+3 207 204 205
+3 205 6 207
+3 6 32 207
+3 208 91 92
+3 48 209 208
+3 92 48 208
+3 160 209 48
+3 159 209 160
+3 210 211 18
+3 21 210 18
+3 210 21 25
+3 2 212 0
+3 213 18 214
+3 19 18 213
+3 18 211 214
+3 211 212 214
+3 214 212 2
+3 39 215 216
+3 38 215 39
+3 186 215 38
+3 171 215 186
+3 216 215 100
+3 215 171 100
+3 19 216 100
+3 213 216 19
+3 216 213 214
+3 214 2 216
+3 2 39 216
+3 217 218 163
+3 218 217 182
+3 181 218 182
+3 183 218 181
+3 218 183 184
+3 163 218 184
+3 219 220 123
+3 220 219 148
+3 147 220 148
+3 149 220 147
+3 220 149 150
+3 123 220 150
+3 221 83 80
+3 199 222 223
+3 224 221 223
+3 223 221 80
+3 199 223 80
+3 199 200 222
+3 225 226 191
+3 225 176 226
+3 226 176 179
+3 227 190 3
+3 0 227 3
+3 0 212 227
+3 228 190 227
+3 228 229 230
+3 229 228 227
+3 231 232 230
+3 225 232 231
+3 232 225 191
+3 190 232 191
+3 228 232 190
+3 232 228 230
+3 176 225 233
+3 225 231 233
+3 234 235 236
+3 237 234 236
+3 175 235 234
+3 174 175 234
+3 177 235 175
+3 177 176 235
+3 235 176 233
+3 236 235 233
+3 234 237 238
+3 238 197 239
+3 237 197 238
+3 174 238 239
+3 174 234 238
+3 239 106 174
+3 240 241 222
+3 200 240 222
+3 115 240 200
+3 240 115 105
+3 241 240 106
+3 106 240 105
+3 241 106 239
+3 197 241 239
+3 241 197 196
+3 222 241 196
+3 242 94 91
+3 243 244 245
+3 245 244 130
+3 159 244 209
+3 244 159 130
+3 129 245 130
+3 245 129 140
+3 97 245 140
+3 243 245 97
+3 208 246 247
+3 248 242 247
+3 247 242 91
+3 208 247 91
+3 208 209 246
+3 209 244 246
+3 244 243 246
+3 198 246 243
+3 194 249 250
+3 163 164 250
+3 250 164 43
+3 194 250 43
+3 194 195 249
+3 195 193 249
+3 251 217 252
+3 217 163 252
+3 252 163 250
+3 249 252 250
+3 252 253 251
+3 252 249 253
+3 251 253 254
+3 187 255 256
+3 123 124 256
+3 256 124 49
+3 187 256 49
+3 187 188 255
+3 188 62 255
+3 257 219 258
+3 258 254 257
+3 219 123 258
+3 258 123 256
+3 255 258 256
+3 258 255 254
+3 254 253 257
+3 259 260 261
+3 259 142 260
+3 260 142 145
+3 262 263 7
+3 4 262 7
+3 4 203 262
+3 264 263 262
+3 264 265 266
+3 265 264 262
+3 267 268 266
+3 259 268 267
+3 268 259 261
+3 263 268 261
+3 264 268 263
+3 268 264 266
+3 65 269 270
+3 28 63 270
+3 63 65 270
+3 65 67 269
+3 269 67 76
+3 270 269 74
+3 76 74 269
+3 271 26 28
+3 270 271 28
+3 74 272 271
+3 270 74 271
+3 271 272 15
+3 26 271 15
+3 15 272 16
+3 265 273 274
+3 273 265 262
+3 203 273 262
+3 202 273 203
+3 274 273 201
+3 201 16 274
+3 273 202 201
+3 272 74 275
+3 266 265 276
+3 276 265 274
+3 276 16 275
+3 16 272 275
+3 276 274 16
+3 277 275 278
+3 277 267 266
+3 277 266 276
+3 277 276 275
+3 275 74 278
+3 74 73 278
+3 279 95 280
+3 96 95 279
+3 95 142 280
+3 142 259 280
+3 259 267 280
+3 281 278 282
+3 278 73 282
+3 279 281 282
+3 279 282 96
+3 279 280 281
+3 280 267 281
+3 281 267 277
+3 278 281 277
+3 75 283 284
+3 284 73 75
+3 75 79 283
+3 79 78 283
+3 283 78 83
+3 283 224 284
+3 283 83 221
+3 224 283 221
+3 243 285 286
+3 198 286 196
+3 198 243 286
+3 285 243 97
+3 96 285 97
+3 287 224 288
+3 282 287 96
+3 73 287 282
+3 287 73 284
+3 224 287 284
+3 288 224 223
+3 222 288 223
+3 288 222 196
+3 286 288 196
+3 287 288 285
+3 287 285 96
+3 285 288 286
+3 54 289 290
+3 35 52 290
+3 52 54 290
+3 54 56 289
+3 289 56 87
+3 290 289 85
+3 87 85 289
+3 291 33 35
+3 290 291 35
+3 85 292 291
+3 290 85 291
+3 291 292 24
+3 33 291 24
+3 24 292 25
+3 229 293 294
+3 293 229 227
+3 212 293 227
+3 211 293 212
+3 294 293 210
+3 210 25 294
+3 293 211 210
+3 292 85 295
+3 230 229 296
+3 296 229 294
+3 296 25 295
+3 25 292 295
+3 296 294 25
+3 297 295 298
+3 297 231 230
+3 297 230 296
+3 297 296 295
+3 295 85 298
+3 85 84 298
+3 299 298 300
+3 298 84 300
+3 236 299 300
+3 236 300 237
+3 236 233 299
+3 233 231 299
+3 299 231 297
+3 298 299 297
+3 86 301 302
+3 302 84 86
+3 86 90 301
+3 90 89 301
+3 301 89 94
+3 301 248 302
+3 301 94 242
+3 248 301 242
+3 303 248 304
+3 303 304 197
+3 303 197 237
+3 300 303 237
+3 84 303 300
+3 303 84 302
+3 248 303 302
+3 304 248 247
+3 246 304 247
+3 304 246 198
+3 197 304 198
+3 305 182 306
+3 189 305 306
+3 189 306 192
+3 189 191 305
+3 191 226 305
+3 305 226 179
+3 182 305 179
+3 307 308 254
+3 308 307 306
+3 255 307 254
+3 62 307 255
+3 307 62 192
+3 306 307 192
+3 182 308 306
+3 217 308 182
+3 217 251 308
+3 308 251 254
+3 309 263 261
+3 310 7 309
+3 7 263 309
+3 310 193 7
+3 311 148 312
+3 309 311 312
+3 309 312 310
+3 309 261 311
+3 261 260 311
+3 311 260 145
+3 148 311 145
+3 313 314 312
+3 193 314 249
+3 314 193 310
+3 312 314 310
+3 148 313 312
+3 219 313 148
+3 219 257 313
+3 314 313 253
+3 249 314 253
+3 313 257 253
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/full_border_quads.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/full_border_quads.off
new file mode 100644
index 0000000..b2a89dc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/full_border_quads.off
@@ -0,0 +1,32 @@
+OFF
+20 8 0
+1 0 0
+0.75 0 0
+0.5 0 0
+0.25 0 0
+0 0 0
+0 1 0
+0.25 1 0
+0.5 1 0
+0.75 1 0
+1 1 0
+1 1 0
+0.75 1 0
+0.5 1 0
+0.25 1 0
+0 1 0
+0 2 0
+0.25 2 0
+0.5 2 0
+0.75 2 0
+1 2 0
+4  5 6 3 4
+4  3 6 7 2
+4  1 2 7 8
+4  1 8 9 0
+4  15 16 13 14
+4  13 16 17 12
+4  11 12 17 18
+4  11 18 19 10
+
+
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/mech-holes-shark.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/mech-holes-shark.off
new file mode 100644
index 0000000..6e151dc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/mech-holes-shark.off
@@ -0,0 +1,15440 @@
+OFF
+5246 10192 0
+-0.5000000000 -0.3339839876 -0.1679690033
+-0.4410839975 0.1388819963 -0.4243690073
+-0.4410839975 0.4102480114 -0.1956969947
+-0.2629489899 0.4102480114 -0.4243690073
+-0.5000000000 0.1679690033 0.3339839876
+0.4518559873 0.3339839876 -0.4719290137
+0.4518559873 0.4269529879 -0.2818360031
+0.4518559873 0.3339839876 0.4559549987
+0.5000000000 -0.2410160005 -0.4228529930
+0.5000000000 -0.2410160005 0.4559549987
+-0.3292810023 -0.2825889885 0.3641180098
+-0.5000000000 -0.3339839876 0.3339839876
+0.4518559873 0.4269529879 0.2346950024
+0.5000000000 0.0400771983 0.2787399888
+0.2822180092 0.1695690006 0.1429210007
+0.3062900007 0.5000000000 0.2787399888
+0.3062900007 0.5000000000 -0.3589819968
+0.2777419984 0.1627790034 -0.0728209987
+0.5000000000 0.0400771983 -0.1615269929
+0.0960702971 0.0486118011 0.3256829977
+0.3831790090 -0.3107909858 0.4182429910
+0.2222860008 -0.3803080022 -0.1034749970
+0.0599513017 0.0291712005 -0.0974541008
+-0.1730190068 -0.0343960002 -0.0256843008
+-0.2625919878 -0.4398239851 -0.0932361037
+-0.1982520074 0.1335870028 0.4320589900
+-0.4381079972 -0.0350511000 -0.3348959982
+-0.3298360109 0.2407770008 -0.4813149869
+-0.2333640009 -0.0479028001 -0.4614909887
+0.1313849986 0.0049091298 -0.4857540131
+0.0339009017 -0.3337860107 -0.4238969982
+0.2145580053 0.3386949897 -0.4660539925
+0.4940530062 0.0114842998 -0.4870019853
+-0.0168088004 0.0151613997 -0.0816366002
+0.0619724989 0.0202884004 0.0574750006
+-0.0889386013 0.0908771008 0.1500000060
+-0.4854420125 0.1636790037 -0.0819400996
+-0.5000000000 -0.0205077995 0.0205077995
+-0.3900769949 0.3905740082 0.0946315974
+-0.4854440093 0.2407770008 -0.2815609872
+-0.0495631993 0.1550910026 0.3904539943
+-0.2223719954 0.0352181010 0.2441650033
+-0.0917204991 0.4899449944 -0.1770800054
+0.0289508998 0.4842030108 -0.3679710031
+-0.3298360109 0.4778259993 -0.2815609872
+0.3609479964 0.4794920087 -0.4154559970
+-0.1288010031 0.4844009876 0.0792388022
+0.1251969934 0.4404880106 -0.0072943298
+-0.0903763026 0.4700520039 0.3088690042
+-0.0077837398 0.4075880051 0.4455600083
+0.3609479964 0.4794920087 0.3673479855
+0.1225050017 -0.1099580005 -0.0862507969
+0.0000215091 -0.1919080019 -0.1646250039
+0.2161419988 -0.1765269935 0.1453849971
+-0.3128769994 -0.3891310096 0.1451659948
+-0.1943709999 -0.2734040022 -0.0840096027
+-0.2772400081 -0.1825159937 0.1597409993
+0.5000000000 -0.1904689968 0.3673479855
+0.4959900081 -0.2052350044 0.1186869964
+0.4607770145 -0.0194346998 0.1622570008
+0.3569090068 -0.3769319952 0.2357909977
+0.2848379910 -0.1358360052 0.3897700012
+-0.3021959960 -0.0471591987 0.3930169940
+0.5000000000 -0.1904689968 -0.2737149894
+0.4760780036 -0.3865239918 -0.0355780981
+-0.0712838024 -0.4048810005 -0.2136240005
+-0.0250452999 -0.4655059874 -0.3059090078
+0.3121840060 -0.4603790045 -0.2396399975
+0.4255389869 -0.4540219903 0.1145439968
+0.4426729977 -0.3249610066 0.3947399855
+-0.3876630068 -0.4695020020 0.1056149974
+-0.5000000000 -0.4589839876 0.0205077995
+-0.2985660136 -0.4797559977 -0.1836919934
+-0.3987340033 -0.3286519945 0.3766109943
+-0.5000000000 -0.0205077995 0.4589839876
+-0.3884800076 -0.0485256985 0.4671869874
+-0.2527830005 0.2025579959 0.4757460058
+0.0231145993 0.2839539945 0.4832800031
+0.2132930011 0.1537249982 0.4721570015
+0.3963930011 -0.0505765006 0.4781390131
+0.4940530062 0.0114842998 0.4891180098
+0.2553260028 0.3462789953 0.1554159969
+0.3609479964 0.4909769893 0.2401359975
+0.3624350131 0.2912789881 0.2204580009
+0.4940530062 0.2685149908 0.2401359975
+0.3986839950 0.1238169968 0.1979490072
+0.2635970116 0.1413169950 0.0150680002
+0.2650839984 0.2905269861 -0.1505189985
+0.2220489979 0.2912789881 -0.0183905009
+0.4940530062 0.2685149908 -0.1926379949
+0.3589650095 0.2860150039 -0.1797669977
+0.3619390130 0.1333190054 -0.0548221990
+0.3609479964 0.4909769893 -0.3283160031
+0.3624350131 0.0733288005 0.0828889012
+-0.4444350004 -0.1670369953 -0.2862409949
+-0.3605329990 -0.0646215007 -0.4132759869
+-0.3230530024 -0.2129410058 -0.3772979975
+-0.3882319927 0.1687110066 -0.4670780003
+-0.3784080148 0.0667544007 -0.4383980036
+-0.4401189983 0.0669057965 -0.3713890016
+-0.1990689933 0.1646199971 -0.4740040004
+-0.2978659868 0.1081800014 -0.4702990055
+-0.2825300097 0.3297359943 -0.4670780003
+-0.0378797986 0.1945769936 -0.4736140072
+-0.0645271018 -0.0161160994 -0.4818390012
+0.2550840080 -0.3076989949 -0.4268420041
+0.0918817967 -0.1814499944 -0.4709460139
+0.3029679954 -0.1560509950 -0.4695889950
+-0.1219040006 -0.2049710006 -0.4470210075
+-0.2008610070 -0.3431789875 -0.3656469882
+0.0160805006 0.3551380038 -0.4522750080
+0.1661839932 0.1903910041 -0.4818089902
+0.4797509909 0.1839839965 -0.4870589972
+0.3437170088 0.1848260015 -0.4863600135
+0.3640489876 0.3342649937 -0.4712289870
+0.3258360028 0.0109700998 -0.4867790043
+0.4992919862 -0.1435160041 -0.4671399891
+-0.0938434005 0.0009102500 -0.0655464977
+-0.0663193017 0.0599555001 0.0170830991
+-0.1453309953 0.0489483997 0.0512201004
+0.0599481985 0.0227095000 -0.0499092005
+0.0075762500 0.0480002016 -0.0130037004
+0.0390352011 0.0224043000 -0.0898140967
+-0.0051162802 0.0904522985 0.2487789989
+-0.0094234198 0.0686834976 0.1108210012
+0.0711740032 0.0270943008 0.1937920004
+-0.4837859869 0.2058870047 0.1243039966
+-0.4922879934 0.0832801983 -0.0248939991
+-0.5000000000 0.1127929986 0.1850589961
+-0.4750429988 0.0507155992 -0.2176340073
+-0.4739199877 0.1239129975 -0.2721590102
+-0.5000000000 -0.1850589961 -0.1127929986
+-0.4806669950 -0.0518517010 -0.1737760007
+-0.4100309908 0.3307839930 0.2130900025
+-0.4616380036 0.2819359899 0.0315802991
+-0.4743539989 0.3297359943 -0.2208340019
+-0.4573140144 0.3196060061 -0.0845526978
+-0.3988940120 0.4085170031 -0.0392603986
+-0.4803290069 0.2162909955 -0.1683779955
+-0.4743539989 0.1687110066 -0.3565239906
+0.0265663993 0.1218919978 0.3669250011
+-0.0799670964 0.1168449968 0.2836360037
+-0.2160300016 0.0785195008 0.3595550060
+-0.1516360044 0.1078009978 0.3169800043
+-0.1298370063 0.1538980007 0.4116789997
+-0.1612250060 0.0774774030 0.1894710064
+-0.2115390003 0.0037886701 0.1063039973
+-0.2639980018 0.4722029865 -0.1479720026
+-0.2118069977 0.4883149862 -0.2359459996
+-0.3882319927 0.4609319866 -0.2208340019
+0.1487440020 0.4973019958 -0.3447259963
+-0.0334083997 0.4966039956 -0.2843509912
+0.0857425034 0.4903779924 -0.2424799949
+-0.2825300097 0.4609319866 -0.3565239906
+-0.1531729996 0.4867520034 -0.3216379881
+-0.0904086977 0.4525499940 -0.3984380066
+0.2771640122 0.4310170114 -0.4411590099
+0.4086669981 0.4301759899 -0.4463340044
+0.1079280004 0.4379140139 -0.4266850054
+0.3222909868 0.4975590110 -0.3845770061
+0.2057619989 0.4803330004 -0.4002920091
+-0.2835749984 0.4621059895 -0.0331390016
+-0.1292690039 0.4824909866 -0.0533883981
+0.1613010019 0.4574069977 0.1275800020
+0.0151418997 0.4769810140 0.0396191999
+0.0536930002 0.4899249971 0.1728039980
+0.0258779004 0.4767740071 -0.1012770012
+0.1624729931 0.4489209950 -0.1554239988
+-0.2740429938 0.4590300024 0.1021500006
+-0.2733849883 0.3842700124 0.3319059908
+-0.2697840035 0.4361299872 0.2265499979
+-0.1089169979 0.4852029979 0.2051350027
+0.0948830992 0.4965560138 0.2788549960
+-0.2324739993 0.3453919888 0.4142929912
+-0.0583992004 0.4429160058 0.3876489997
+0.4086669981 0.4301759899 0.4157969952
+0.1737740040 0.4585419893 0.4099200070
+0.2148389965 0.4033710063 0.4549959898
+0.1285910010 0.4873969853 0.3512719870
+0.3222909868 0.4975590110 0.3188979924
+0.1744939983 -0.2378029972 -0.0882819965
+0.0836004019 -0.1584330052 -0.1398999989
+0.1053700000 -0.2865050137 -0.1600040048
+0.0519763008 -0.0459679998 -0.1185029969
+0.0783694983 -0.0130532999 -0.0900887027
+-0.0977542996 -0.1026249975 -0.1194769964
+-0.0122007998 -0.0726161003 -0.1319220066
+0.1364039928 -0.0623622015 0.1099969968
+0.1619769931 -0.0589843988 0.2485039979
+0.1108170003 -0.0450524986 -0.0138275996
+0.2437909991 -0.2843689919 0.0293390006
+0.1765300035 -0.1569080055 0.0095024901
+-0.3235870004 -0.3449299932 0.2723509967
+-0.2901270092 -0.2999410033 0.1490689963
+-0.3063229918 -0.2518660128 0.2744390070
+-0.2227749974 -0.3756070137 -0.0923393965
+-0.2623400092 -0.3366459906 0.0203232002
+-0.2918609977 -0.4197289944 0.0124887004
+-0.2346590012 -0.1016020030 0.0526544005
+-0.2457229942 -0.2240889966 0.0288479999
+-0.1819970012 -0.1512999982 -0.0660538971
+0.5000000000 -0.0845711976 0.3188979924
+0.4862290025 -0.1054650024 0.2504900098
+0.4722819924 -0.0019786099 0.2350839972
+0.4973349869 -0.2732909918 0.2632420063
+0.4951069951 -0.1994439960 0.2664070129
+0.5000000000 -0.2513679862 0.4157969952
+0.4663339853 -0.0104649998 0.0434351005
+0.4852829874 -0.1074180007 0.1429470032
+0.4936909974 -0.0956941992 -0.0129883997
+0.3180460036 -0.3878000081 0.0784133971
+0.2904259861 -0.2917970121 0.1812189966
+0.3492229879 -0.2430510074 0.4075390100
+0.3209649920 -0.2745600045 0.3148500025
+0.3745599985 -0.3464969993 0.3554460108
+0.2486509979 -0.1668439955 0.2826899886
+0.1974640042 -0.0309228003 0.3668839931
+-0.2602210045 -0.0635681972 0.1903560013
+-0.2598089874 0.0610941984 0.4118320048
+-0.2687160075 -0.0142481998 0.3174369931
+-0.2942959964 -0.1296090037 0.2891289890
+-0.3221420050 -0.1743450016 0.3795109987
+0.5000000000 -0.2513679862 -0.3532350063
+0.4933699965 -0.3006840050 -0.1498470008
+0.4695329964 -0.3564940095 -0.2417249978
+0.4978280067 -0.2075099945 -0.0700446963
+0.5000000000 -0.0845711976 -0.2034309953
+0.4864380062 -0.3577150106 0.1886139959
+0.4941059947 -0.3027839959 0.0619949996
+-0.1029670015 -0.2253019959 -0.1476050019
+-0.1871650070 -0.4218870103 -0.1695179939
+-0.1300400048 -0.3382380009 -0.1641010046
+-0.0130519001 -0.3114979863 -0.1880529970
+0.0694511011 -0.3919050097 -0.2018270046
+0.1225740016 -0.4493179917 -0.2349739969
+0.1539870054 -0.4644570053 -0.2951549888
+0.2718319893 -0.4595299959 -0.1695570052
+-0.0117568998 -0.4284000099 -0.3605749905
+-0.2216710001 -0.4304670095 -0.3014769852
+0.3714289963 -0.3925249875 -0.3192070127
+0.1945600063 -0.4186849892 -0.3618780077
+0.4222339988 -0.4390279949 -0.1477410048
+0.4698539972 -0.3913890123 0.2593120039
+0.4522700012 -0.4386500120 0.0547013991
+0.3835889995 -0.4699639976 -0.0719951987
+0.3485620022 -0.4479509890 -0.0043408498
+0.4735090137 -0.3055369854 0.3997629881
+0.4423820078 -0.4079959989 0.2814159989
+0.4087939858 -0.3947289884 0.3114160001
+0.4088650048 -0.3234080076 0.4074690044
+0.3920330107 -0.4335019886 0.1681450009
+-0.3241670132 -0.4675799906 -0.0107046003
+-0.3582429886 -0.4874890149 -0.0527539998
+-0.2707529962 -0.4694109857 -0.1377190053
+-0.5000000000 -0.4277339876 0.1850589961
+-0.4357379973 -0.4760240018 0.0625154972
+-0.4460780025 -0.4288240075 0.2287160009
+-0.3614920080 -0.4487220049 -0.2112379968
+-0.4128539860 -0.4778549969 -0.0946744978
+-0.5000000000 -0.4277339876 -0.1127929986
+-0.1881179959 -0.4688679874 -0.2671720088
+-0.0358786993 -0.4530439973 -0.2566869855
+-0.1733299941 -0.4602620006 -0.2231159955
+-0.3473460078 -0.4424349964 0.1332689971
+-0.3573899865 -0.3141759932 0.3773140013
+-0.3553380072 -0.3941729963 0.2704130113
+-0.3973959982 -0.4188019931 0.2573029995
+-0.4475750029 -0.3333739936 0.3627809882
+-0.5000000000 0.1127929986 0.4277339876
+-0.4457809925 -0.0355981998 0.4656249881
+-0.4265530109 0.0991282016 0.4479179978
+-0.4476119876 -0.1903370023 0.4423460066
+-0.5000000000 -0.1850589961 0.4277339876
+-0.3555589914 -0.1931679994 0.4316959977
+-0.3983229995 -0.1959690005 0.4455929995
+-0.3380039930 -0.0542340018 0.4473020136
+-0.2153529972 0.1639139950 0.4650569856
+-0.2929300070 0.0716959015 0.4552820027
+-0.3465149999 0.0894111022 0.4682520032
+-0.3316709995 0.2227489948 0.4450449944
+-0.1131459996 0.2110700011 0.4655059874
+-0.1189699993 0.2694250047 0.4839119911
+0.0282649994 0.3531590104 0.4787999988
+0.2039099932 0.3275170028 0.4802730083
+-0.1599999964 0.3183909953 0.4674279988
+-0.0108653000 0.2138160020 0.4561699927
+0.1445049942 0.0914037004 0.4204129875
+0.0769928992 0.1744440049 0.4444360137
+0.1410640031 0.2462279946 0.4801709950
+0.3042899966 0.2322349995 0.4838739932
+0.2523570061 0.0158634000 0.4443140030
+0.3878220022 -0.2148710042 0.4496319890
+0.3354020119 -0.0933049992 0.4539270103
+0.3266699910 0.0760041028 0.4801070094
+0.4117000103 0.1390160024 0.4842300117
+0.4302789867 -0.1978490055 0.4551810026
+0.4992919862 -0.1435160041 0.4808279872
+0.4682469964 -0.1778029948 0.4588989913
+0.4519720078 -0.0169946998 0.4817509949
+0.4797509909 0.1839839965 0.4808279872
+0.2646160126 0.2534930110 0.1476580054
+0.3052900136 0.3133539855 0.1971610039
+0.3152279854 0.2196550071 0.1911589950
+0.3222909868 0.4989260137 0.2532199919
+0.3064230084 0.4110279977 0.2114489973
+0.2573649883 0.4324580133 0.1878390014
+0.4143489897 0.3700459898 0.2328280061
+0.3566820025 0.3904019892 0.2249830067
+0.4086669981 0.4692769945 0.2353429943
+0.4797509909 0.3589839935 0.2353429943
+0.4277659953 0.2801089883 0.2296019942
+0.4554840028 0.0940785035 0.2270749956
+0.4413590133 0.1885659993 0.2263029963
+0.4992919862 0.1605460048 0.2532199919
+0.3769840002 0.2030609995 0.2113499939
+0.3375299871 0.1431999952 0.1763679981
+0.2663289905 0.1454620063 0.0797882974
+0.2389139980 0.2055020034 0.0056416099
+0.2424899936 0.2191179991 0.0789280012
+0.2691940069 0.2084619999 -0.0991927013
+0.2480390072 0.2044010013 -0.0568221994
+0.2691060007 0.1496749967 -0.0393917002
+0.2304330021 0.3827219903 -0.1532039940
+0.2398709953 0.2891570032 -0.1002800018
+0.2719930112 0.3906260133 -0.2283100039
+0.1915580034 0.3763839900 -0.0309011992
+0.2003650069 0.3912079930 0.0871722028
+0.2230329961 0.3070159853 0.0743025020
+0.4992919862 0.1605460048 -0.1615719944
+0.4276770055 0.1897259951 -0.1246849969
+0.4279130101 0.1059819981 -0.0758372024
+0.4137890041 0.3691959977 -0.2419340014
+0.4229690135 0.2797060013 -0.1800860018
+0.4797509909 0.3589839935 -0.2382249981
+0.3078509867 0.1491989940 -0.0603294000
+0.3620449901 0.2021670043 -0.1155159995
+0.3076739907 0.2081940025 -0.1155010015
+0.3078120053 0.3902679980 -0.2463259995
+0.3222909868 0.4989260137 -0.3419960141
+0.3049089909 0.2906880081 -0.1735759974
+0.4086669981 0.4692769945 -0.3106830120
+0.3564159870 0.3831250072 -0.2479249984
+0.3610360026 0.0894201025 0.0079607200
+0.4227040112 0.0537804998 0.0040973602
+0.3051750064 0.1158799976 -0.0033807300
+0.3148739934 0.1096300036 0.1241289973
+0.3059000075 0.1023520008 0.0597762987
+0.3728069961 0.0848229975 0.1511330009
+0.4282970130 0.0528284013 0.1823839992
+0.4185259938 0.0388097987 0.1074630022
+-0.4579020143 -0.2442959994 -0.2441760004
+-0.3992730081 -0.2000209987 -0.3308559954
+-0.3901000023 -0.2759639919 -0.2987140119
+-0.4054299891 -0.0570841990 -0.3784529865
+-0.4017150104 -0.1257199943 -0.3586719930
+-0.4396780133 -0.0974858999 -0.3139539957
+-0.2722389996 -0.1373170018 -0.4292989969
+-0.3458600044 -0.1379410028 -0.3968240023
+-0.3029319942 -0.0603424013 -0.4408609867
+-0.4163909853 0.1469330043 -0.4492830038
+-0.4150649905 0.1072769985 -0.4267280102
+-0.4409570098 0.1065620035 -0.3944320083
+-0.3511840105 0.1462430060 -0.4667760134
+-0.3844470084 0.1215599999 -0.4508430064
+-0.3586879969 0.2010480016 -0.4777559936
+-0.4387759864 0.0197541993 -0.3527120054
+-0.4122569859 0.0601253994 -0.4095160067
+-0.4086590111 0.0053200400 -0.3946290016
+-0.2099599987 0.2830359936 -0.4585039914
+-0.2492170036 0.2509869933 -0.4687590003
+-0.2682340145 0.3726319969 -0.4492830038
+-0.2705900073 0.0320550017 -0.4664140046
+-0.2516469955 0.1365800053 -0.4749760032
+-0.2087730020 0.0535704009 -0.4753980041
+-0.3037570119 0.2847279906 -0.4777559936
+-0.2827230096 0.2142309994 -0.4752120078
+-0.3170709908 0.1781889945 -0.4746760130
+-0.3247959912 0.0142566999 -0.4501720071
+-0.3708609939 0.0042890999 -0.4265399873
+-0.3402949870 0.0837166011 -0.4582599998
+-0.1321800053 0.2947550118 -0.4560489953
+-0.1299619973 0.1859550029 -0.4720939994
+0.0315142982 -0.0034574801 -0.4848589897
+-0.0486216992 0.0894123986 -0.4816009998
+0.0473513007 0.0980048999 -0.4830729961
+-0.1348789930 0.0739499032 -0.4796940088
+-0.1535059959 -0.0318166018 -0.4746809900
+0.3675569892 -0.2842679918 -0.4212340117
+0.2841989994 -0.2337229997 -0.4524199963
+0.3953100145 -0.2142399997 -0.4499540031
+0.0642002001 -0.2637720108 -0.4512920082
+0.1739979982 -0.2506889999 -0.4543310106
+0.1455900073 -0.3230800033 -0.4298059940
+0.2159190029 -0.0808854997 -0.4813680053
+0.1978089958 -0.1686560065 -0.4714330137
+0.1140490025 -0.0905186012 -0.4819650054
+-0.2777430117 -0.2831000090 -0.3641610146
+-0.3310129941 -0.3416869938 -0.2978160083
+-0.1841360033 -0.1283389926 -0.4546639919
+-0.2256319970 -0.2122749984 -0.4187549949
+-0.0813855976 -0.3403710127 -0.4040069878
+-0.1611749977 -0.2809630036 -0.4109750092
+-0.0479836985 -0.2742899954 -0.4378199875
+-0.0888821036 -0.1155949980 -0.4707739949
+0.0113949003 -0.1023370028 -0.4792230129
+-0.0154732997 -0.1939170063 -0.4636290073
+-0.1048979983 0.3722159863 -0.4409480095
+-0.0196397994 0.2864499986 -0.4631240070
+0.1884060055 0.2710340023 -0.4752950072
+0.0898424014 0.2772200108 -0.4701989889
+0.1212060004 0.3451150060 -0.4604409933
+0.0655210987 0.1935479939 -0.4778279960
+0.1477099955 0.1002350003 -0.4853999913
+0.4677860141 0.2642970085 -0.4811030030
+0.4171020091 0.2643390000 -0.4810340106
+0.4187180102 0.3339979947 -0.4718590081
+0.4161750078 0.0981450006 -0.4891479909
+0.4172469974 0.1840540022 -0.4869889915
+0.4883179963 0.0980468988 -0.4892179966
+0.2953769863 0.3354560137 -0.4694809914
+0.3529750109 0.2648580074 -0.4804039896
+0.2765539885 0.2667500079 -0.4786559939
+0.4046210051 -0.1472990066 -0.4680869877
+0.4999290109 -0.2019529939 -0.4483389854
+0.2307980061 0.0092146397 -0.4863519967
+0.3155980110 -0.0749038979 -0.4806500077
+0.4975219965 -0.0707032010 -0.4798359871
+0.4100739956 -0.0718618035 -0.4801389873
+0.4139589965 0.0114463996 -0.4869770110
+0.2446859926 0.0999978036 -0.4873209894
+0.2596409917 0.1871449947 -0.4846700132
+0.3347829878 0.0989492983 -0.4885700047
+-0.1345639974 -0.0130589996 -0.0497745983
+-0.1239949986 0.0282051004 -0.0119931996
+-0.1624989957 0.0123212999 0.0086662900
+-0.0445239991 0.0396555997 -0.0385764986
+-0.0837642029 0.0366302989 -0.0269661006
+-0.0537424013 0.0096611399 -0.0754264966
+-0.1208489984 0.0751923025 0.0992425978
+-0.1064179987 0.0582267009 0.0326240994
+-0.0814447030 0.0767711997 0.0813430995
+0.0598899983 0.0259083994 -0.0831786990
+0.0451087989 0.0318719000 -0.0707793981
+0.0545137003 0.0258930996 -0.0937530026
+0.0314453989 0.0416681990 0.0234063007
+0.0372716002 0.0367591009 -0.0303076003
+0.0604643002 0.0206904002 -0.0018384201
+0.0147454003 0.0190882999 -0.0860700980
+0.0217956994 0.0362250991 -0.0592962988
+-0.0086540198 0.0391047001 -0.0488837995
+0.0442790017 0.0745771974 0.2913329899
+0.0335191004 0.0629189014 0.2248079926
+0.0809940025 0.0355402008 0.2626070082
+-0.0492331013 0.0837138966 0.1314380020
+-0.0104924999 0.0790548995 0.1801739931
+-0.0500330999 0.0959442034 0.2007559985
+0.0652237013 0.0222495999 0.1239909977
+0.0286100004 0.0540863983 0.1550409943
+0.0282732006 0.0472087003 0.0865427032
+-0.0413938016 0.0706871003 0.0638922006
+-0.0275820997 0.0560647994 0.0024178100
+-0.0030801599 0.0585824996 0.0450357012
+-0.4835549891 0.2072869986 0.2276819944
+-0.4944219887 0.1591330022 0.1585740000
+-0.5000000000 0.1530759931 0.2644039989
+-0.4890170097 0.1264459938 -0.0504857004
+-0.4918360114 0.1471109986 0.0529991984
+-0.4857990146 0.1877620071 0.0206039008
+-0.5000000000 0.0529785007 0.1018069983
+-0.4963389933 0.1022360027 0.0790612996
+-0.4956029952 0.0345112011 -0.0022781801
+-0.4604040086 0.0892874002 -0.3244540095
+-0.4604260027 0.1216680035 -0.3544690013
+-0.4603840113 0.0023574200 -0.2806259990
+-0.4601590037 0.0495700017 -0.3008460104
+-0.4819119871 0.1400849968 -0.1804109961
+-0.4743489921 0.0909823030 -0.2419369966
+-0.4834850132 0.1056289971 -0.1497240067
+-0.5000000000 -0.2644039989 -0.1530759931
+-0.4786280096 -0.1855019927 -0.2021609992
+-0.4927679896 -0.0391887985 -0.0794806033
+-0.4874109924 -0.1144699976 -0.1477629989
+-0.5000000000 -0.1018069983 -0.0529785007
+-0.4675340056 -0.1150349975 -0.2357019931
+-0.4625149965 -0.0524784997 -0.2600249946
+-0.4884760082 0.0157692004 -0.1021889970
+-0.4856120050 0.0639889017 -0.1245979965
+-0.4769670069 0.0030452500 -0.1959200054
+-0.4372450113 0.2731029987 0.2694329917
+-0.4590539932 0.2654550076 0.1796779931
+-0.4320079982 0.3392849863 0.0704646036
+-0.4412199855 0.3098810017 0.1269270033
+-0.3960970044 0.3673129976 0.1556729972
+-0.4708899856 0.2489749938 0.0811244026
+-0.4789969921 0.2226700038 -0.0201603007
+-0.4604910016 0.3726319969 -0.2024820000
+-0.4434219897 0.3715310097 -0.1266420037
+-0.4128339887 0.4101719856 -0.1132730022
+-0.4757159948 0.2790189981 -0.1826950014
+-0.4631980062 0.3267799914 -0.1501110047
+-0.4826720059 0.2847279906 -0.2480829954
+-0.3915359974 0.4031189978 0.0297622997
+-0.4332390130 0.3675979972 -0.0561935008
+-0.4292919934 0.3579829931 0.0093076397
+-0.4736390114 0.1496659964 -0.3104900122
+-0.4604910016 0.1469330043 -0.3926709890
+-0.4820399880 0.1938270032 -0.1214379966
+-0.4805909991 0.1673029959 -0.2191320062
+-0.4826720059 0.2010480016 -0.3185969889
+-0.4806129932 0.1873250008 -0.2654240131
+-0.4813480079 0.2314780056 -0.2219399959
+-0.4742490053 0.2494059950 -0.0682066977
+-0.4568969905 0.3051809967 -0.0238451995
+-0.4729239941 0.2678900063 -0.1226150021
+0.0619597994 0.0903265029 0.3499279916
+0.0076834299 0.1040450037 0.3121140003
+-0.0665604994 0.1335339993 0.3416729867
+-0.0291882008 0.1236129999 0.3280149996
+-0.0106322998 0.1433120072 0.3796769977
+-0.0429069996 0.1084740013 0.2674629986
+-0.0880039036 0.1033800021 0.2187110037
+-0.2081750035 0.1061400026 0.4025599957
+-0.1769730002 0.1177389994 0.3851380050
+-0.1677950025 0.1444550008 0.4227679968
+-0.1912489980 0.0747004002 0.2791349888
+-0.1854750067 0.0941846967 0.3368439972
+-0.2209569961 0.0546783991 0.3060219884
+-0.0896394029 0.1581790000 0.4008280039
+-0.1414660066 0.1286849976 0.3693569899
+-0.1041359976 0.1346369982 0.3550139964
+-0.1805510074 0.0304215997 0.0752054006
+-0.1966069937 -0.0127466004 0.0373971015
+-0.1263599992 0.0886550993 0.1685950011
+-0.1572649926 0.0643002987 0.1198500022
+-0.2196210027 0.0188769009 0.1765210032
+-0.1902869940 0.0448773988 0.1451530010
+-0.1933709979 0.0588724986 0.2143110037
+-0.1242690012 0.1014460027 0.2365320027
+-0.1162760034 0.1161219999 0.2995829880
+-0.1587820053 0.0912351012 0.2562179863
+-0.3504990041 0.4501299858 -0.1554989964
+-0.3277350068 0.4655669928 -0.1889850050
+-0.4163909853 0.4398140013 -0.2024820000
+-0.1521819979 0.4902580082 -0.2083739936
+-0.2398989946 0.4814800024 -0.1924840063
+-0.1781200022 0.4842369854 -0.1570419967
+-0.3586879969 0.4736030102 -0.2480829954
+-0.2998990119 0.4779999852 -0.2226819992
+-0.2706730068 0.4843960106 -0.2601700127
+0.2181569934 0.4985080063 -0.3418529928
+0.1205269992 0.4967269897 -0.3021070063
+0.1825519949 0.4903019965 -0.2875280082
+-0.0029510900 0.4936990142 -0.3294250071
+0.0570987016 0.4970839918 -0.3144429922
+0.0871981978 0.4928460121 -0.3547590077
+-0.0039615100 0.4913789928 -0.2063989937
+0.0266701002 0.4959430099 -0.2647500038
+-0.0634130985 0.4946169853 -0.2332630008
+-0.2682340145 0.4398140013 -0.3926709890
+-0.1898120046 0.4590489864 -0.3783209920
+-0.1620890051 0.4298279881 -0.4125469923
+-0.2420929968 0.4841949940 -0.2996099889
+-0.2147729993 0.4759350121 -0.3397980034
+-0.3037570119 0.4736030102 -0.3185969889
+-0.0291447006 0.4710299969 -0.3830929995
+-0.1231940016 0.4747250080 -0.3621470034
+-0.0625732020 0.4863280058 -0.3453690112
+-0.1825039983 0.4907329977 -0.2792980075
+-0.1231330037 0.4941410124 -0.2573300004
+-0.0932210982 0.4934819937 -0.3032340109
+0.3815599978 0.3889580071 -0.4594930112
+0.4316770136 0.3889159858 -0.4601219893
+0.2438440025 0.3913689852 -0.4543170035
+0.3185659945 0.3894770145 -0.4577440023
+0.3845239878 0.4597170055 -0.4312250018
+0.3478629887 0.4302459955 -0.4445860088
+0.3157790005 0.4598149955 -0.4277980030
+-0.0463737994 0.4146679938 -0.4283350110
+0.0652038977 0.4665859938 -0.4000380039
+0.0113906004 0.4443489909 -0.4145199955
+0.0614650995 0.4030280113 -0.4401549995
+0.1578810066 0.3957850039 -0.4486350119
+0.3106090128 0.4997560084 -0.3707889915
+0.2382320017 0.4975199997 -0.3689239919
+0.2864669859 0.4795899987 -0.4096699953
+0.2602550089 0.4915249944 -0.3900319934
+0.3396370113 0.4914549887 -0.3996860087
+0.1757310033 0.4919889867 -0.3752430081
+0.1193350032 0.4819459915 -0.3864870071
+0.2394240052 0.4607540071 -0.4220469892
+0.1969819963 0.4334700108 -0.4354420006
+0.1555210054 0.4630109966 -0.4129799902
+-0.3573389947 0.4413369894 -0.1033570021
+-0.2797630131 0.4648709893 -0.0960773975
+-0.1334560066 0.4824489951 0.0125748999
+-0.2077929974 0.4762380123 -0.0391623005
+-0.2087879926 0.4759710133 0.0263633002
+-0.1975709945 0.4789929986 -0.1007509977
+-0.1149159968 0.4852209985 -0.1169449985
+0.2108799964 0.4746350050 0.1961210072
+0.1199119985 0.4788129926 0.1527860016
+0.1631180048 0.4914489985 0.2194399983
+0.0755755976 0.4622699916 0.0155386999
+0.0890944004 0.4682990015 0.0843926966
+0.1342850029 0.4460070133 0.0611037984
+-0.0417695008 0.4885730147 0.1274069995
+0.0294850003 0.4825530052 0.1073559970
+-0.0541969016 0.4844230115 0.0613914989
+0.1340900064 0.4759419858 -0.2083359957
+0.2120719999 0.4651010036 -0.2416000068
+-0.0315072984 0.4860750139 -0.1416749954
+0.0509332009 0.4823000133 -0.1725129932
+0.1349429935 0.4414680004 -0.0791345015
+0.0977391005 0.4656629860 -0.1298380047
+0.0784650967 0.4613470137 -0.0560218990
+-0.0503691994 0.4825049937 -0.0747309029
+-0.0579323992 0.4819549918 -0.0065884902
+0.0136324000 0.4748550057 -0.0303160995
+-0.3495230079 0.4397740066 -0.0332156010
+-0.3369680047 0.4306659997 0.1038450003
+-0.3413310051 0.4375630021 0.0370935015
+-0.2794910073 0.4614830017 0.0349639989
+-0.2035560012 0.4764859974 0.0931589007
+-0.3713980019 0.3041760027 0.3351689875
+-0.3567999899 0.3523089886 0.2823059857
+-0.1868319958 0.4542709887 0.2734270096
+-0.2717570066 0.4135310054 0.2816829979
+-0.1816900074 0.4365000129 0.3226419985
+-0.3434999883 0.3908199966 0.2263139933
+-0.3375029862 0.4155879915 0.1671710014
+0.0778108984 0.4955480099 0.2315530032
+0.1933529973 0.4985339940 0.2701739967
+-0.1191869974 0.4862399995 0.1442340016
+-0.0263640005 0.4919269979 0.1894740015
+0.0013521400 0.4885939956 0.2933970094
+-0.0118969996 0.4921819866 0.2452169955
+-0.0996958986 0.4798069894 0.2602860034
+-0.1966319978 0.4743120074 0.1578390002
+-0.2703289986 0.4511260092 0.1664820015
+-0.1909649968 0.4671550095 0.2183409929
+-0.3509429991 0.2809849977 0.3844040036
+-0.2629890144 0.3588100076 0.3759019971
+-0.0340777002 0.4268249869 0.4192709923
+-0.1483689994 0.4014120102 0.4023840129
+-0.1198889986 0.3854520023 0.4334940016
+-0.1696320027 0.4181810021 0.3654560149
+-0.0773625001 0.4573149979 0.3509939909
+0.4316770136 0.3889159858 0.4374310076
+0.3131769896 0.4182150066 0.4367760122
+0.3278569877 0.3785580099 0.4559060037
+0.2670739889 0.4717450142 0.3886539936
+0.2908320129 0.4494929910 0.4140239954
+0.3845239878 0.4597170055 0.3920899928
+0.1036880016 0.4129590094 0.4521099925
+0.1968089938 0.4345580041 0.4345569909
+0.0814746022 0.4377459884 0.4293409884
+0.2077420056 0.4986099899 0.3035019934
+0.3106090128 0.4997560084 0.2972640097
+0.0161023997 0.4816719890 0.3343009949
+0.1103679985 0.4939369857 0.3172810078
+0.3396370113 0.4914549887 0.3426049948
+0.2239190042 0.4949429929 0.3330320120
+0.2441309988 0.4865469933 0.3615869880
+0.0344175994 0.4708630145 0.3701480031
+0.0568712018 0.4564679861 0.4018050134
+0.1500190049 0.4757240117 0.3820500076
+0.1983499974 -0.3066869974 -0.0922122002
+0.1492969990 -0.2670019865 -0.1284960061
+0.1591019928 -0.3322060108 -0.1397069991
+0.1095290035 -0.1365779936 -0.1160790026
+0.1306979954 -0.2002210021 -0.1217319965
+0.1487119943 -0.1715209931 -0.0866170004
+0.0525964014 -0.2395129949 -0.1682379991
+0.0979762971 -0.2224809974 -0.1493940055
+0.0462366007 -0.1763419956 -0.1566330045
+0.0586616993 0.0055280700 -0.1004929990
+0.0649013966 0.0165215991 -0.0937668011
+0.0160560999 -0.0138876997 -0.1086449996
+0.0419147983 -0.0046539898 -0.1054010019
+0.0982894003 -0.0561125986 -0.0875120983
+0.0706574991 -0.0305282008 -0.1058809981
+0.0883968994 -0.0788694993 -0.1109519973
+-0.1393380016 -0.0648263991 -0.0783990026
+-0.0974778011 -0.0465393998 -0.0963333026
+-0.0050749201 -0.1301849931 -0.1501709968
+-0.0535955988 -0.0862675011 -0.1299619973
+-0.0506604984 -0.1456409991 -0.1483580023
+-0.0558665991 -0.0332892016 -0.1058460027
+-0.0172211006 -0.0230170004 -0.1092630029
+0.0351166017 -0.1150690019 -0.1433479935
+0.0669575036 -0.0983674005 -0.1298200041
+0.0238128006 -0.0597064011 -0.1275479943
+0.1162599996 -0.0116272997 0.2247669995
+0.1296939999 -0.0023416800 0.2913190126
+0.0976148024 -0.0153265996 0.0864465982
+0.1059930027 -0.0156653002 0.1549720019
+0.1914210021 -0.1179459989 0.1993139982
+0.1486520022 -0.0636081994 0.1796240062
+0.1764770001 -0.1173669994 0.1290349960
+0.0742591023 0.0055738501 -0.0708205998
+0.1223099977 -0.0787627026 -0.0512870997
+0.0957672000 -0.0304518994 -0.0598456003
+0.0825005025 -0.0040436401 -0.0303761996
+0.0900688022 -0.0112174004 0.0233101994
+0.2420849949 -0.3319770098 -0.0318485983
+0.2119950056 -0.2668029964 -0.0377213992
+0.1977140009 -0.1704670042 0.0746140033
+0.2103819996 -0.2206500024 0.0187273994
+0.2341199964 -0.2325700074 0.0881803036
+0.1821980029 -0.2000530064 -0.0409055986
+0.1517509967 -0.1364410073 -0.0453055985
+0.1605589986 -0.1102619991 0.0606650002
+0.1240850016 -0.0559680015 0.0440194011
+0.1427879930 -0.0971466973 -0.0008094240
+-0.3265750110 -0.3154749870 0.3254320025
+-0.3131740093 -0.3043529987 0.2720719874
+-0.3183250129 -0.2738119960 0.3256590068
+-0.2998200059 -0.3491129875 0.1472579986
+-0.3075799942 -0.3287740052 0.2118470073
+-0.3192780018 -0.3693200052 0.2109999955
+-0.2929509878 -0.2203270048 0.2176910043
+-0.2991710007 -0.2783020139 0.2134259939
+-0.2830989957 -0.2433830053 0.1525920033
+-0.2428410053 -0.4136959910 -0.0940603986
+-0.2595970035 -0.3980810046 -0.0425918996
+-0.2774190009 -0.4313710034 -0.0470342003
+-0.2310750037 -0.3042719960 -0.0357993990
+-0.2435570061 -0.3553459942 -0.0394700989
+-0.2062480003 -0.3281919956 -0.0889773965
+-0.3038469851 -0.4056999981 0.0779585987
+-0.2757250071 -0.3826409876 0.0170866996
+-0.2892310023 -0.3665109873 0.0815225989
+-0.2064439952 -0.0647289008 0.0088234497
+-0.2121019959 -0.1236649975 -0.0105357999
+-0.1783969998 -0.0902678967 -0.0498365983
+-0.2638680041 -0.2033849955 0.0931299031
+-0.2404299974 -0.1624059975 0.0378683992
+-0.2580690086 -0.1418939978 0.1037819982
+-0.1866710037 -0.2134909928 -0.0768089965
+-0.2166309953 -0.1856209934 -0.0230448004
+-0.2224339992 -0.2468760014 -0.0308937002
+-0.2698830068 -0.2635169923 0.0871473998
+-0.2779720128 -0.3186999857 0.0839293003
+-0.2525419891 -0.2831630111 0.0236341003
+0.5000000000 -0.0229500998 0.2972640097
+0.4880610108 -0.0410641991 0.2729989886
+0.4840790033 0.0159205999 0.2596260011
+0.4943270087 -0.1501120031 0.3053399920
+0.4914770126 -0.0975020975 0.2885819972
+0.5000000000 -0.1415050030 0.3426049948
+0.4644669890 -0.0138352998 0.2033870071
+0.4798220098 -0.0535654984 0.2421309948
+0.4752820134 -0.0604538992 0.2026569992
+0.4977270067 -0.2785919905 0.3474549949
+0.4987140000 -0.2589769959 0.3477349877
+0.5000000000 -0.2567389905 0.4374310076
+0.4951330125 -0.2023759931 0.1986889988
+0.4972069860 -0.2386240065 0.2693110108
+0.4968689978 -0.2461899966 0.1885370016
+0.5000000000 -0.2281839997 0.3920899928
+0.4980610013 -0.2329079956 0.3368630111
+0.4965710044 -0.1958529949 0.3221209943
+0.4769990146 0.0064552599 -0.0407188982
+0.4841609895 -0.0470310003 0.0119712995
+0.4936330020 -0.0327377990 -0.0805231035
+0.4745970070 -0.0615184009 0.1522420049
+0.4774140120 -0.0572691001 0.0896172971
+0.4614230096 -0.0183738992 0.1094029993
+0.4949199855 -0.1537339985 0.0521096997
+0.4886460006 -0.1028319970 0.0713206008
+0.4924010038 -0.1557469964 0.1328610033
+0.4842999876 -0.1084700003 0.2024489939
+0.4914349914 -0.1546290070 0.2591210008
+0.4909819961 -0.1562200040 0.2019270062
+0.2823899984 -0.3853580058 -0.0087381098
+0.2788070142 -0.3419190049 0.0476493016
+0.3249239922 -0.3404090106 0.2056230009
+0.3058890104 -0.3441089988 0.1289959997
+0.3412159979 -0.3850910068 0.1606030017
+0.2700450122 -0.2918100059 0.1053109989
+0.2541050017 -0.2358320057 0.1617880017
+0.3709380031 -0.2861160040 0.4145720005
+0.3602289855 -0.3022100031 0.3809790015
+0.3799549937 -0.3269740045 0.3959510028
+0.3026579916 -0.2084359974 0.3539119959
+0.3344399929 -0.2597520053 0.3671480119
+0.3202350140 -0.1910939962 0.3990640044
+0.3673000038 -0.3639410138 0.3013420105
+0.3502730131 -0.3181749880 0.3338580132
+0.3391290009 -0.3314059973 0.2747730017
+0.1777539998 -0.0477779992 0.3120659888
+0.1477710009 0.0130409999 0.3499259949
+0.2326900065 -0.1749610007 0.2162940055
+0.2066240013 -0.1114569977 0.2669039965
+0.2435889989 -0.0813897997 0.3794629872
+0.2234999985 -0.0988679007 0.3278650045
+0.2654989958 -0.1534049958 0.3412210047
+0.2712129951 -0.2320519984 0.2331089973
+0.3068380058 -0.2856589854 0.2521460056
+0.2868840098 -0.2225169986 0.2980610132
+-0.2257409990 -0.0454269014 0.0753351003
+-0.2448599935 -0.0109395999 0.2143860012
+-0.2379920036 -0.0285583008 0.1452559978
+-0.2501569986 -0.0827085003 0.1210089996
+-0.2703410089 -0.1214860007 0.1721740067
+-0.2298420072 0.1028050035 0.4227760136
+-0.2410729975 0.0661285967 0.3851610124
+-0.2863970101 -0.0338972993 0.3563489914
+-0.2669659853 0.0197068993 0.3696630001
+-0.2842069864 0.0105507001 0.4016290009
+-0.2462490052 0.0352233984 0.3368819952
+-0.2475820035 0.0097131701 0.2791880071
+-0.3136970103 -0.2177589983 0.3305779994
+-0.3264220059 -0.2352679968 0.3726969957
+-0.2869479954 -0.1587409973 0.2261880040
+-0.3010270000 -0.1918389946 0.2802250087
+-0.3145239949 -0.1098520011 0.3859089911
+-0.3082840145 -0.1556649953 0.3372089863
+-0.2996230125 -0.0930157974 0.3455609977
+-0.2787519991 -0.0981661007 0.2391799986
+-0.2662810087 -0.0414549001 0.2568460107
+-0.2841689885 -0.0696208999 0.3014830053
+0.5000000000 -0.2567389905 -0.3904789984
+0.4892030060 -0.3044070005 -0.2958909869
+0.4732680023 -0.3149980009 -0.3356370032
+0.4978100061 -0.2479600012 -0.2109519988
+0.4949240088 -0.2828620076 -0.2532899976
+0.5000000000 -0.2281839997 -0.3135170043
+0.4720090032 -0.3790160120 -0.1414079964
+0.4856599867 -0.3335820138 -0.1955920011
+0.4860459864 -0.3473150134 -0.0908972993
+0.4978489876 -0.0896176025 -0.1062450036
+0.5000000000 -0.0229500998 -0.1777359992
+0.4969429970 -0.2077420056 0.0277392995
+0.4971599877 -0.1518069953 -0.0387201011
+0.5000000000 -0.1415050030 -0.2362219989
+0.4987879992 -0.1483819932 -0.1357620060
+0.4987510145 -0.2023130059 -0.1712539941
+0.4917710125 -0.3178659976 0.3089630008
+0.4942890108 -0.3113409877 0.2384440005
+0.4879359901 -0.3475419879 0.0173982009
+0.4908860028 -0.3357889950 0.1270889938
+0.4812169969 -0.3791989982 0.0749303028
+0.4956409931 -0.2907229960 0.1653870046
+0.4965049922 -0.2547099888 0.0958184004
+0.4932850003 -0.3067359924 -0.0440497994
+0.4968239963 -0.2578839958 -0.1072629988
+0.4964550138 -0.2594830096 -0.0040749600
+-0.1416890025 -0.1237720028 -0.0983259007
+-0.1514109969 -0.2470020056 -0.1215770021
+-0.1449130028 -0.1857369989 -0.1119880006
+-0.0985997990 -0.1635240018 -0.1358380020
+-0.0512855016 -0.2074649930 -0.1618839949
+-0.2310879976 -0.4316009879 -0.1325870007
+-0.2028619945 -0.3982830048 -0.1357620060
+-0.0987318978 -0.3725779951 -0.1914879978
+-0.1548489928 -0.3845160007 -0.1689790040
+-0.1333709955 -0.4127579927 -0.1976580024
+-0.1799699962 -0.3555189967 -0.1334030032
+-0.1627620012 -0.3044170141 -0.1286340058
+0.0975017026 -0.3444420099 -0.1760820001
+0.1434600055 -0.3858070076 -0.1685069948
+-0.0015799800 -0.2536410093 -0.1763419956
+0.0483021997 -0.2997939885 -0.1807219982
+-0.0027798901 -0.3980979919 -0.2155019939
+0.0302092005 -0.3534640074 -0.1964769959
+-0.0361353010 -0.3625499904 -0.2008419931
+-0.0582037009 -0.2679780126 -0.1726060063
+-0.1129069999 -0.2844989896 -0.1567039937
+-0.0736533999 -0.3238230050 -0.1824740022
+0.1777019948 -0.4227350056 -0.1780599952
+0.2003889978 -0.4516279995 -0.2062640041
+0.2503849864 -0.4328339994 -0.1362649947
+0.0650755987 -0.4649190009 -0.3066500127
+0.1389590055 -0.4638949931 -0.2638590038
+0.0551226996 -0.4635710120 -0.2782819867
+0.2911339998 -0.4682649970 -0.2037730068
+0.2189320028 -0.4658249915 -0.2386739999
+0.2375970036 -0.4634490013 -0.2724699974
+-0.2247309983 -0.3923150003 -0.3252199888
+-0.3406519890 -0.3928700089 -0.2611240149
+0.0070224698 -0.3886350095 -0.3920739889
+-0.1063100025 -0.3919279873 -0.3693149984
+-0.1178729981 -0.4543040097 -0.3142000139
+-0.1181560010 -0.4296579957 -0.3389889896
+-0.0215034001 -0.4537529945 -0.3319079876
+0.4182650149 -0.3310390115 -0.3653039932
+0.3246429861 -0.3538570106 -0.3831399977
+0.2600829899 -0.4443950057 -0.3080500066
+0.2879630029 -0.4080330133 -0.3447479904
+0.3382000029 -0.4350599945 -0.2779510021
+0.2225890011 -0.3710049987 -0.3953010142
+0.1174300015 -0.3819960058 -0.3999829888
+0.1716479957 -0.4496360123 -0.3278630078
+0.0764833987 -0.4523909986 -0.3361639977
+0.0936191976 -0.4249970019 -0.3676660061
+0.4342939854 -0.3745949864 -0.2845779955
+0.4554449916 -0.4171259999 -0.0923833027
+0.4448989928 -0.4034389853 -0.1922059953
+0.4006119967 -0.4217549860 -0.2388049960
+0.3744449914 -0.4529600143 -0.1976670027
+0.4848690033 -0.3309609890 0.3434650004
+0.4796720147 -0.3746840060 0.2352939993
+0.4395030141 -0.4509739876 0.0875054002
+0.4627380073 -0.4209989905 0.1589439958
+0.4509420097 -0.4317489862 0.1841280013
+0.4727419913 -0.4034430087 0.1229590029
+0.4645090103 -0.4171069860 0.0136850998
+0.3140560091 -0.4523510039 -0.0905300975
+0.2939650118 -0.4225980043 -0.0547234006
+0.3523600101 -0.4684689939 -0.1600140035
+0.3332979977 -0.4682660103 -0.1247029975
+0.3917610049 -0.4587860107 0.0517214984
+0.3664200008 -0.4651060104 -0.0382361002
+0.4077770114 -0.4652900100 0.0209842995
+0.4018929899 -0.4612689912 -0.1078009978
+0.4389599860 -0.4445129931 -0.0488170013
+0.4231590033 -0.4606069922 -0.0114414003
+0.4869529903 -0.2824929953 0.4154790044
+0.4732120037 -0.3523229957 0.3429310024
+0.4440990090 -0.3717829883 0.3455190063
+0.4594219923 -0.3662309945 0.3414579928
+0.4587369859 -0.3185519874 0.3942410052
+0.4571889937 -0.4035600126 0.2707040012
+0.4366289973 -0.4351019859 0.2032729983
+0.3941630125 -0.3498199880 0.3804199994
+0.3934650123 -0.3175910115 0.4145309925
+0.3852039874 -0.3961899877 0.2714160085
+0.3912540078 -0.3757529855 0.3321920037
+0.4258269966 -0.3263159990 0.3999759853
+0.4106090069 -0.3634589911 0.3659810126
+0.4276250005 -0.3709459901 0.3536249995
+0.3313249946 -0.4218949974 0.0334366001
+0.4093610048 -0.4479809999 0.1402949989
+0.3746120036 -0.4430910051 0.0837649032
+0.3575659990 -0.4188129902 0.1197099984
+0.3744539917 -0.4102959931 0.1998730004
+0.4202679992 -0.4303719997 0.2227050066
+0.4259909987 -0.4050970078 0.2945309877
+0.4029290080 -0.4176880121 0.2450709939
+-0.2917050123 -0.4552569985 -0.0585943013
+-0.3023619950 -0.4713999927 -0.0780730993
+-0.2651759982 -0.4554710090 -0.1142740026
+-0.3758850098 -0.4824999869 0.0250576008
+-0.3397170007 -0.4806410074 -0.0304092001
+-0.3565169871 -0.4730849862 0.0451462008
+-0.2811610103 -0.4784260094 -0.1616200060
+-0.3152489960 -0.4817700088 -0.1006330028
+-0.3332900107 -0.4856739938 -0.1235020012
+-0.5000000000 -0.3886719942 0.2644039989
+-0.4720920026 -0.4298050106 0.2079769969
+-0.4734140038 -0.3887729943 0.2851780057
+-0.4654209912 -0.4708530009 0.0400969014
+-0.4694269896 -0.4571650028 0.1243299991
+-0.5000000000 -0.4511719942 0.1018069983
+-0.4175390005 -0.4552699924 0.1678130031
+-0.4422500134 -0.4582830071 0.1471779943
+-0.4101809859 -0.4753690064 0.0851894990
+-0.4133799970 -0.4078510106 -0.2066829950
+-0.4386270046 -0.4363049865 -0.1641760021
+-0.5000000000 -0.3886719942 -0.1530759931
+-0.3587299883 -0.4807099998 -0.1439149976
+-0.3928050101 -0.4655460119 -0.1591269970
+-0.3249869943 -0.4707430005 -0.2011969984
+-0.5000000000 -0.4511719942 -0.0529785007
+-0.4512810111 -0.4592700005 -0.1088090017
+-0.4598610103 -0.4710659981 -0.0390808992
+-0.3822109997 -0.4868420064 -0.0750242993
+-0.3987109959 -0.4857130051 0.0026459999
+-0.4263930023 -0.4821490049 -0.0195799004
+-0.3069519997 -0.4354569912 -0.2563610077
+-0.1115500033 -0.4663859904 -0.2922889888
+-0.2043330073 -0.4565080106 -0.2853960097
+-0.2741999924 -0.4619880021 -0.2477290034
+-0.2507970035 -0.4735110104 -0.2311799973
+0.1005799994 -0.4243560135 -0.2129790038
+-0.0499680005 -0.4324359894 -0.2346259952
+0.0236086994 -0.4281359911 -0.2320829928
+0.0424026996 -0.4506120086 -0.2529450059
+-0.0283694007 -0.4647009969 -0.2805730104
+-0.2266599983 -0.4499680102 -0.1607699990
+-0.2350749969 -0.4737629890 -0.2104890049
+-0.2276359946 -0.4649859965 -0.1863510013
+-0.1771209985 -0.4435000122 -0.1975180060
+-0.1176780015 -0.4375370145 -0.2229160070
+-0.1771530062 -0.4694199860 -0.2462189943
+-0.1074230000 -0.4663999975 -0.2695800066
+-0.1089579985 -0.4561319947 -0.2465209961
+-0.3086580038 -0.4476610124 0.0038452500
+-0.3290979862 -0.4197210073 0.1408630013
+-0.3205800056 -0.4356740117 0.0713516027
+-0.3382740021 -0.4577319920 0.0606095009
+-0.3669039905 -0.4586949944 0.1216730028
+-0.3410199881 -0.3006879985 0.3724650145
+-0.3398410082 -0.3413940072 0.3282260001
+-0.3764869869 -0.3711299896 0.3273130059
+-0.3567309976 -0.3589180112 0.3292399943
+-0.3768750131 -0.3231880069 0.3786459863
+-0.3378410041 -0.3736439943 0.2724469900
+-0.3344869912 -0.3994159997 0.2088560015
+-0.4474219978 -0.3875159919 0.3016439974
+-0.4735719860 -0.3339250088 0.3504610062
+-0.3942930102 -0.4485050142 0.1841180027
+-0.4210929871 -0.4252890050 0.2451370060
+-0.4224669933 -0.3318049908 0.3713839948
+-0.4222890139 -0.3845379949 0.3139050007
+-0.3984870017 -0.3792909980 0.3223510087
+-0.3726589978 -0.4375439882 0.1961150020
+-0.3525860012 -0.4215849936 0.2041659951
+-0.3754059970 -0.4087589979 0.2655729949
+-0.5000000000 0.1530759931 0.3886719942
+-0.4669049978 0.1039410010 0.4349119961
+-0.4518800080 0.1532730013 0.4096780121
+-0.4733639956 -0.0276373997 0.4627439976
+-0.4714699984 0.0440508015 0.4550290108
+-0.5000000000 0.0529785007 0.4511719942
+-0.4068259895 0.0282412991 0.4652830064
+-0.4402740002 0.0354015008 0.4599939883
+-0.4171909988 -0.0428571999 0.4676269889
+-0.4735740125 -0.2650839984 0.4010410011
+-0.5000000000 -0.2644039989 0.3886719942
+-0.4225310087 -0.2665930092 0.4153110087
+-0.4475939870 -0.2659960091 0.4097900093
+-0.5000000000 -0.1018069983 0.4511719942
+-0.4735760093 -0.1872200072 0.4365809858
+-0.4735780060 -0.1061929986 0.4570829868
+-0.3408060074 -0.2480719984 0.3994889855
+-0.3575280011 -0.2579610050 0.4115520120
+-0.3956719935 -0.1222250015 0.4611540139
+-0.3758499920 -0.1961590052 0.4416449964
+-0.3715339899 -0.1245749965 0.4553149939
+-0.3769800067 -0.2636660039 0.4167389870
+-0.3988460004 -0.2661949992 0.4178189933
+-0.4213660061 -0.1178240031 0.4621730149
+-0.4474729896 -0.1120759994 0.4605560005
+-0.4224950075 -0.1937039942 0.4453859925
+-0.3375999928 -0.1859759986 0.4117589891
+-0.3185899854 -0.0531587005 0.4242280126
+-0.3306190073 -0.1194389984 0.4186919928
+-0.3495320082 -0.1238519996 0.4418280125
+-0.3614630103 -0.0523575991 0.4613130093
+-0.2056310028 0.1462209970 0.4496720135
+-0.2435989976 0.1102029979 0.4434869885
+-0.2779139876 0.1375820041 0.4702250063
+-0.2580670118 0.1230029985 0.4603070021
+-0.2300550044 0.1838120073 0.4746389985
+-0.2753790021 0.0639476031 0.4362539947
+-0.3004060090 0.0088168196 0.4297100008
+-0.3933570087 0.1602289975 0.4400550127
+-0.3949599862 0.2139980048 0.4067780077
+-0.3733479977 0.0224501994 0.4679209888
+-0.3837040067 0.0958456025 0.4616599977
+-0.2862699926 0.2165219933 0.4663310051
+-0.3437469900 0.1594129950 0.4615530074
+-0.3061830103 0.1504140049 0.4708330035
+-0.3438619971 0.0167640001 0.4637599885
+-0.3196380138 0.0117247002 0.4510219991
+-0.3162409961 0.0808843002 0.4662750065
+-0.1632959992 0.1699970067 0.4496949911
+-0.1657100022 0.1934899986 0.4673730135
+-0.0469296984 0.2831999958 0.4845330119
+-0.1125579998 0.2403029948 0.4786930084
+-0.0508093014 0.2501929998 0.4769929945
+-0.1736740023 0.2181760073 0.4779079854
+-0.1889819950 0.2425020039 0.4807659984
+0.2195910066 0.3670479953 0.4703240097
+0.3124710023 0.3347089887 0.4711279869
+0.0146351997 0.3829089999 0.4656040072
+0.1177949980 0.3826150000 0.4691660106
+0.1084429994 0.3103550076 0.4843409956
+0.1196549982 0.3479189873 0.4800109863
+0.0309119001 0.3196069896 0.4847680032
+-0.2974359989 0.2829590142 0.4271749854
+-0.2143049985 0.2631469965 0.4738869965
+-0.2496930063 0.2780230045 0.4569210112
+-0.1936679929 0.3348279893 0.4456920028
+-0.0901131034 0.3671459854 0.4579449892
+-0.1345919967 0.2960720062 0.4801709950
+-0.0514856018 0.3148919940 0.4837979972
+-0.0661559030 0.3433690071 0.4748339951
+-0.1194790006 0.1822070032 0.4435319901
+-0.0306442995 0.1822759956 0.4285320044
+-0.0747298971 0.1863040030 0.4360609949
+-0.0610270984 0.2174700052 0.4611659944
+0.0079724900 0.2481919974 0.4740960002
+0.1175730005 0.0673578978 0.3784939945
+0.0852821991 0.1117129996 0.3979130089
+0.1456519961 0.1702920049 0.4614979923
+0.1132170036 0.1384920031 0.4350470006
+0.1762980074 0.1202849969 0.4515649974
+0.0498812012 0.1454250067 0.4110850096
+0.0111453999 0.1687490046 0.4206460118
+0.2686209977 0.2897610068 0.4814769924
+0.3626120090 0.2773810029 0.4760029912
+0.0871431008 0.2718620002 0.4817659855
+0.1741330028 0.2863169909 0.4841549993
+0.2560630143 0.1913499981 0.4826250076
+0.2235759944 0.2466489971 0.4840379953
+0.1829410046 0.2067469954 0.4775719941
+0.0617893003 0.2344619930 0.4709790051
+0.0356974006 0.1995970011 0.4508889914
+0.1079190001 0.2084960043 0.4672360122
+0.1716829985 0.0336938016 0.3979060054
+0.2682940066 -0.0601070002 0.4202899933
+0.2224009931 -0.0095301401 0.4110029936
+0.2008190006 0.0589970015 0.4350369871
+0.2350659966 0.0885794014 0.4614839852
+0.3850579858 -0.2760320008 0.4318349957
+0.3671680093 -0.2271440029 0.4350779951
+0.3654560149 -0.0712196007 0.4702099860
+0.3655650020 -0.1542270035 0.4543769956
+0.3914299905 -0.1378709972 0.4660719931
+0.3413279951 -0.1724629998 0.4324969947
+0.3081650138 -0.1153339967 0.4273929894
+0.3698030114 0.1968429983 0.4830879867
+0.4240039885 0.2350659966 0.4759880006
+0.2748709917 0.1220770031 0.4775930047
+0.3192969859 0.1582829952 0.4845229983
+0.4032509923 0.0430373996 0.4844940007
+0.3685710132 0.1080380008 0.4851459861
+0.3670539856 0.0175042003 0.4805839956
+0.2874349952 0.0448140018 0.4670610130
+0.2976849973 -0.0356247984 0.4503279924
+0.3311089873 -0.0092595899 0.4699699879
+0.4019829929 -0.2728010118 0.4351040125
+0.4384180009 -0.2661249936 0.4306229949
+0.4201399982 -0.2703109980 0.4330889881
+0.4091880023 -0.2059459984 0.4544700086
+0.4168170094 -0.1242839992 0.4703690112
+0.4999290109 -0.2019529939 0.4704639912
+0.4865249991 -0.2293969989 0.4477039874
+0.4809029996 -0.0863256976 0.4783639908
+0.4846189916 -0.1634300053 0.4665389955
+0.4975219965 -0.0707032010 0.4870460033
+0.4718750119 -0.2475049943 0.4354310036
+0.4557659924 -0.2589229941 0.4306569993
+0.4498510063 0.1646360010 0.4815599918
+0.4677860141 0.2642970085 0.4704639912
+0.4256869853 -0.0326374993 0.4807299972
+0.4363349974 0.0647362024 0.4848110080
+0.4883179963 0.0980468988 0.4870460033
+0.4647569954 0.0827080980 0.4849230051
+0.4747140110 -0.0027008599 0.4840030074
+0.4406319857 -0.1118389964 0.4717780054
+0.4501450062 -0.1888169944 0.4557380080
+0.4620600045 -0.0995502025 0.4737040102
+0.2720960081 0.2093220055 0.1462309957
+0.2884809971 0.2340900004 0.1728789955
+0.2965770066 0.1913560033 0.1693609953
+0.2799069881 0.3284060061 0.1789329946
+0.2830190063 0.2804889977 0.1751690060
+0.2589330077 0.2998250127 0.1497759968
+0.3375349939 0.2535000145 0.2081539929
+0.3089460135 0.2650470138 0.1944469959
+0.3326410055 0.3009060025 0.2109089941
+0.3106090128 0.4998930097 0.2641659975
+0.2919729948 0.4630669951 0.2262870073
+0.2684830129 0.4691230059 0.2212210000
+0.3337189853 0.4499880075 0.2288459986
+0.3116399944 0.4569570124 0.2275560051
+0.3396370113 0.4962399900 0.2453819960
+0.2546370029 0.3910270035 0.1673599929
+0.2829290032 0.4213129878 0.2017250061
+0.2797749937 0.3759210110 0.1870130002
+0.4371510148 0.4046429992 0.2345000058
+0.4099729955 0.4181909859 0.2334769964
+0.4316770136 0.4511229992 0.2347600013
+0.3583239913 0.3398270011 0.2225019932
+0.3847540021 0.3799290061 0.2297510058
+0.3885470033 0.3308970034 0.2284609973
+0.3845239878 0.4822750092 0.2369620055
+0.3834140003 0.4309610128 0.2318679988
+0.3575800061 0.4413940012 0.2301899940
+0.3303189874 0.3505420089 0.2136970013
+0.3044100106 0.3625729978 0.2020490021
+0.3306779861 0.4008089900 0.2189590037
+0.4677860141 0.3960930109 0.2347600013
+0.4460810125 0.3631620109 0.2340539992
+0.4613740146 0.2753689885 0.2336540073
+0.4544970095 0.3206680119 0.2336000055
+0.4883179963 0.3162490129 0.2369620055
+0.4208630025 0.3248989880 0.2314829975
+0.3944320083 0.2847970128 0.2259660065
+0.4796850085 0.0708455965 0.2493260056
+0.4756579995 0.1246870011 0.2420540005
+0.4999290109 0.1015620008 0.2641659975
+0.4182209969 0.1534589976 0.2141699940
+0.4481390119 0.1414780021 0.2259210050
+0.4281769991 0.1111920029 0.2105280012
+0.4975219965 0.2164050043 0.2453819960
+0.4716309905 0.1771229953 0.2373629957
+0.4670380056 0.2275269926 0.2347359955
+0.3247419894 0.1790599972 0.1850869954
+0.3084180057 0.1542930007 0.1625140011
+0.3687799871 0.2458769977 0.2167000026
+0.3451460004 0.2100179940 0.2031569928
+0.3680680096 0.1338000000 0.1873250008
+0.3553240001 0.1701959968 0.1960410029
+0.3869050145 0.1623809934 0.2049269974
+0.4014939964 0.2402489930 0.2224069983
+0.4346249998 0.2347829938 0.2277020067
+0.4094240069 0.1965480000 0.2183019966
+0.2723039985 0.1545280069 0.1124579981
+0.2529479861 0.1792510003 0.0811443031
+0.2602640092 0.1912750006 0.1150029972
+0.2494000047 0.1694390029 0.0132146999
+0.2495470047 0.1723060012 0.0466262996
+0.2636550069 0.1414040029 0.0467648990
+0.2293300033 0.2525599897 0.0347022004
+0.2387569994 0.2102169991 0.0418414995
+0.2305800021 0.2469979972 -0.0058061001
+0.2736330032 0.1790499985 -0.0822904035
+0.2637859881 0.1755499989 -0.0664191991
+0.2736290097 0.1565379947 -0.0599877983
+0.2525860071 0.2450580001 -0.1019079983
+0.2568930089 0.2062609941 -0.0808978975
+0.2659859955 0.2464019954 -0.1218639985
+0.2655209899 0.1442359984 -0.0139213996
+0.2567380071 0.1719190031 -0.0443728007
+0.2518430054 0.1695940048 -0.0174825005
+0.2519449890 0.4355260134 -0.2389959991
+0.2544189990 0.3881529868 -0.2013220042
+0.2820500135 0.4438500106 -0.2811689973
+0.2298370004 0.2892889977 -0.0625054985
+0.2369630039 0.3363650143 -0.1272599995
+0.2221599966 0.3349260092 -0.0811206028
+0.2670159936 0.3391489983 -0.1859399974
+0.2519150078 0.3380590081 -0.1625510007
+0.2513549924 0.2897720039 -0.1296239942
+0.2355359942 0.2446729988 -0.0436309017
+0.2422199994 0.2039150000 -0.0278593991
+0.2428710014 0.2443130016 -0.0760163963
+0.2088920027 0.4220449924 -0.1658750027
+0.1637060046 0.4117859900 -0.0238017999
+0.1778240055 0.4135049880 -0.0923745036
+0.2062460035 0.3774180114 -0.0926880985
+0.2101790011 0.3354629874 -0.0283043999
+0.2198050022 0.4449799955 0.1641760021
+0.2296289951 0.3674210012 0.1252360046
+0.2239000052 0.4084900022 0.1399949938
+0.1842020005 0.4273889959 0.1039500013
+0.1658239961 0.4162440002 0.0420021005
+0.2508600056 0.2332040071 0.1149770021
+0.2188719958 0.2966899872 0.0282406006
+0.2328359932 0.2624689937 0.0757649988
+0.2427030057 0.2779380083 0.1148589998
+0.2355100065 0.3233309984 0.1173529997
+0.2063940018 0.3402700126 0.0254571997
+0.1893620044 0.3806940019 0.0296957996
+0.2128770053 0.3506360054 0.0773738027
+0.4999290109 0.1015620008 -0.1566410065
+0.4637059867 0.1283880025 -0.1214229986
+0.4629920125 0.0815304965 -0.1037700027
+0.4613640010 0.2276439965 -0.1596300006
+0.4631280005 0.1783310026 -0.1384020001
+0.4975219965 0.2164050043 -0.1742590070
+0.3939850032 0.1219720021 -0.0611764006
+0.4282380044 0.1459929943 -0.1001309976
+0.3941740096 0.1574680060 -0.0889903978
+0.4370880127 0.4045459926 -0.2666620016
+0.4454660118 0.3630880117 -0.2385080010
+0.4677860141 0.3960930109 -0.2613089979
+0.3898459971 0.2829959989 -0.1794710010
+0.4187499881 0.3242729902 -0.2105959952
+0.3868429959 0.3283120096 -0.2121050060
+0.4883179963 0.3162490129 -0.2146469951
+0.4527640045 0.3206160069 -0.2107899934
+0.4579559863 0.2753390074 -0.1839440018
+0.2884660065 0.1565140039 -0.0672340021
+0.3085190058 0.1754380018 -0.0879426971
+0.2884570062 0.1790360063 -0.0889888033
+0.3623310030 0.1653340012 -0.0847427994
+0.3334060013 0.1709000021 -0.0853113011
+0.3328570127 0.1417369992 -0.0552790016
+0.3319270015 0.2449920028 -0.1468300074
+0.3330970109 0.2056050003 -0.1158450022
+0.3608439863 0.2425410002 -0.1472650021
+0.3937399983 0.1971749961 -0.1176820025
+0.4259929955 0.2347030044 -0.1513260007
+0.3922980130 0.2393040061 -0.1478590071
+0.2966279984 0.4449329972 -0.2897219956
+0.3106090128 0.4998930097 -0.3496220112
+0.2842380106 0.3394350111 -0.1994729936
+0.2883810103 0.3911190033 -0.2405149937
+0.3396370113 0.4962399900 -0.3351970017
+0.3131540120 0.4440549910 -0.2906529903
+0.3338690102 0.4413790107 -0.2895259857
+0.2861459851 0.2094749957 -0.1107029989
+0.3304530084 0.2888660133 -0.1782349944
+0.3060680032 0.2467660010 -0.1433690041
+0.2838990092 0.2472359985 -0.1354150027
+0.2829459906 0.2911219895 -0.1647160053
+0.4316770136 0.4511229992 -0.2981149852
+0.4099240005 0.4172579944 -0.2747370005
+0.3575609922 0.4362089932 -0.2862800062
+0.3833799958 0.4283309877 -0.2815159857
+0.3845239878 0.4822750092 -0.3204480112
+0.3843410015 0.3767240047 -0.2456710041
+0.3571360111 0.3328689933 -0.2128130049
+0.3306779861 0.3877120018 -0.2484389991
+0.3052389920 0.3387770057 -0.2075330019
+0.3297280073 0.3365879953 -0.2116110027
+0.4262830019 0.0745709985 -0.0435835011
+0.4575060010 0.0471527986 -0.0582662001
+0.3614419997 0.1078990027 -0.0248623006
+0.3932670057 0.0938600972 -0.0303025991
+0.3912020028 0.0620012991 0.0489718989
+0.3921500146 0.0738700032 0.0065725702
+0.3611229956 0.0779042020 0.0444706008
+0.2861590087 0.1415130049 -0.0442361012
+0.2822340131 0.1232689992 0.0100231003
+0.2837660015 0.1307580024 -0.0185812991
+0.3064000010 0.1299249977 -0.0325261988
+0.3319709897 0.1192699969 -0.0253992993
+0.2965239882 0.1363400072 0.1356959939
+0.2885980010 0.1251479983 0.1052870005
+0.3332499862 0.0875386000 0.0730786026
+0.3090080023 0.1030389965 0.0926638991
+0.3369149864 0.0888836011 0.1071899980
+0.2840209901 0.1198949963 0.0730630979
+0.2821319997 0.1195800006 0.0407911018
+0.3317170143 0.0922006965 0.0381973013
+0.3314799964 0.1027780026 0.0052122301
+0.3048549891 0.1066709980 0.0272557996
+0.3241580129 0.1229770035 0.1523900032
+0.3835600019 0.1008829996 0.1773030013
+0.3536419868 0.1119529977 0.1653580070
+0.3434469998 0.0969806015 0.1384879947
+0.3660010099 0.0756383985 0.1192959994
+0.4637899995 0.0467293002 0.2301599979
+0.4447979927 0.0179133005 0.1727139950
+0.4521610141 0.0290852003 0.2052910030
+0.4396870136 0.0701098964 0.2077199966
+0.4126189947 0.0875860974 0.1907069981
+0.4486210048 0.0267572999 0.0129290000
+0.3915559947 0.0579778999 0.0927323997
+0.4192079902 0.0422681011 0.0582831018
+0.4429920018 0.0161274001 0.0777100995
+0.4418590069 0.0135492003 0.1302659959
+0.3947240114 0.0609721988 0.1319800019
+0.4015559852 0.0708416998 0.1647969931
+0.4213669896 0.0423815995 0.1490689963
+-0.4719620049 -0.2866370082 -0.2134030014
+-0.4331389964 -0.2644090056 -0.2671389878
+-0.4346849918 -0.3042879999 -0.2443850040
+-0.4255779982 -0.1861750036 -0.3085150123
+-0.4282149971 -0.2244949937 -0.2900500000
+-0.4500010014 -0.2047600001 -0.2672550082
+-0.3546859920 -0.2460059971 -0.3413529992
+-0.3964380026 -0.2381120026 -0.3147119880
+-0.3648720086 -0.2087309957 -0.3539319932
+-0.4232180119 -0.0480090007 -0.3579069972
+-0.4229040146 -0.0800601989 -0.3482069969
+-0.4386630058 -0.0653735995 -0.3249480128
+-0.3805460036 -0.0974783003 -0.3883219957
+-0.4035780132 -0.0906705037 -0.3692440093
+-0.3845680058 -0.0625203028 -0.3968339860
+-0.4413740039 -0.1313470006 -0.3013640046
+-0.4228149951 -0.1137380004 -0.3373019993
+-0.4234029949 -0.1490619928 -0.3244490027
+-0.2513009906 -0.0942988023 -0.4476540089
+-0.2889960110 -0.0987413004 -0.4352970123
+-0.2695490122 -0.0548759997 -0.4520750046
+-0.3361360133 -0.1755589992 -0.3870890141
+-0.3111360073 -0.1389719993 -0.4138279855
+-0.2959820032 -0.1768279970 -0.4061349928
+-0.3333030045 -0.0637534037 -0.4279269874
+-0.3232010007 -0.1010869965 -0.4212749898
+-0.3537490070 -0.1008189991 -0.4056290090
+-0.3714300096 -0.1710139960 -0.3666439950
+-0.4005250037 -0.1623139977 -0.3458009958
+-0.3762789965 -0.1337359995 -0.3782899976
+-0.4293000102 0.1409939975 -0.4377160072
+-0.4291430116 0.1239269972 -0.4237590134
+-0.4410839975 0.1236289963 -0.4084190130
+-0.4016700089 0.1355489939 -0.4487029910
+-0.4159179926 0.1280319989 -0.4371869862
+-0.4026150107 0.1563040018 -0.4590699971
+-0.4406369925 0.0876609981 -0.3821839988
+-0.4287309945 0.1050259992 -0.4116030037
+-0.4280309975 0.0842704028 -0.4009909928
+-0.3396350145 0.1918170005 -0.4756399989
+-0.3553799987 0.1746120006 -0.4717740119
+-0.3440450132 0.2201859951 -0.4804250002
+-0.3816590011 0.0951237008 -0.4443419874
+-0.3680160046 0.1327989995 -0.4598320127
+-0.3642170131 0.1044299975 -0.4544360042
+-0.3735029995 0.1837580055 -0.4733070135
+-0.3711409867 0.1592350006 -0.4659959972
+-0.3866569996 0.1460819989 -0.4583060145
+-0.4382449985 -0.0066817901 -0.3439530134
+-0.4247530103 0.0106827999 -0.3749589920
+-0.4237610102 -0.0176864993 -0.3667559922
+-0.4270659983 0.0616414994 -0.3916079998
+-0.4259240031 0.0371189006 -0.3830769956
+-0.4394600093 0.0442768000 -0.3617010117
+-0.3933719993 0.0335923992 -0.4184960127
+-0.4104749858 0.0336893983 -0.4020079970
+-0.3959510028 0.0619616993 -0.4251120090
+-0.4138259888 0.0846479982 -0.4176200032
+-0.4002169967 0.1129200011 -0.4398080111
+-0.3982819915 0.0883976966 -0.4320699871
+-0.2276359946 0.3447070122 -0.4447839856
+-0.2433799952 0.3294419944 -0.4526959956
+-0.2643350065 0.3922980130 -0.4377160072
+-0.2262919992 0.2086209953 -0.4710620046
+-0.2312030047 0.2681309879 -0.4637559950
+-0.2017910033 0.2232149988 -0.4679009914
+-0.2743850052 0.3516460061 -0.4590699971
+-0.2553269863 0.3110159934 -0.4607439935
+-0.2678030133 0.2914029956 -0.4673930109
+-0.2533479929 -0.0076256101 -0.4641680121
+-0.2408089936 0.0426338017 -0.4717090130
+-0.2193319947 0.0015020900 -0.4705320001
+-0.2752160132 0.1221200004 -0.4735200107
+-0.2593530118 0.0829553008 -0.4726470113
+-0.2853490114 0.0707620978 -0.4683960080
+-0.2017990053 0.1080180034 -0.4764930010
+-0.2317710072 0.0955872014 -0.4752109945
+-0.2266210020 0.1509799957 -0.4749689996
+-0.3163200021 0.2624219954 -0.4804250002
+-0.3089880049 0.2301270068 -0.4777449965
+-0.3241659999 0.2104540020 -0.4775930047
+-0.2805469930 0.2709969878 -0.4726450145
+-0.2943620086 0.2504400015 -0.4760960042
+-0.2924070060 0.3072980046 -0.4733070135
+-0.3083699942 0.1440539956 -0.4723210037
+-0.2998220026 0.1958999932 -0.4758560061
+-0.2886329889 0.1598429978 -0.4745210111
+-0.2660340071 0.2327859998 -0.4727450013
+-0.2481320053 0.1927060038 -0.4735890031
+-0.2686440051 0.1762329936 -0.4748759866
+-0.2852450013 -0.0158363003 -0.4558730125
+-0.3417800069 -0.0272511002 -0.4338789880
+-0.3147790134 -0.0225508008 -0.4457629919
+-0.2986550033 0.0224130992 -0.4592080116
+-0.3100290000 0.0595256984 -0.4622569978
+-0.4070479870 -0.0250023995 -0.3868489861
+-0.3748750091 0.0364319012 -0.4325399995
+-0.3907540143 0.0032699199 -0.4117229879
+-0.3878920078 -0.0288424008 -0.4045709968
+-0.3661569953 -0.0294803008 -0.4201849997
+-0.3342089951 0.1614950001 -0.4716739953
+-0.3196029961 0.0952161998 -0.4652110040
+-0.3275949955 0.1292600036 -0.4682759941
+-0.3462159932 0.1159199998 -0.4623520076
+-0.3598900139 0.0741074979 -0.4493719935
+-0.3332259953 0.0497639999 -0.4542709887
+-0.3488830030 0.0080731604 -0.4393070042
+-0.3548460007 0.0419340990 -0.4444020092
+-0.1883099973 0.3482129872 -0.4430370033
+-0.1788720042 0.2929379940 -0.4552989900
+-0.0864647031 0.1918980032 -0.4723480046
+-0.1308600008 0.2416500002 -0.4648729861
+-0.0837894976 0.2443699986 -0.4658490121
+-0.1703040004 0.2345169932 -0.4656389952
+-0.1673900038 0.1766760051 -0.4727869928
+0.0812188014 0.0012855100 -0.4854420125
+0.0396769010 0.0473871008 -0.4846520126
+0.0892527997 0.0508656017 -0.4852389991
+-0.0555257984 0.0361437984 -0.4829640090
+-0.0087417802 0.0424569994 -0.4839800000
+-0.0172146000 -0.0092954403 -0.4837430120
+0.0053023901 0.1459140033 -0.4792509973
+-0.0015616800 0.0946004987 -0.4822869897
+-0.0431789011 0.1427109987 -0.4782640040
+-0.1823949963 0.0109067997 -0.4753679931
+-0.1946579963 -0.0400324985 -0.4689530134
+-0.1681009978 0.1194839999 -0.4770979881
+-0.1734140068 0.0641637966 -0.4779840112
+-0.1100559980 -0.0237191003 -0.4788979888
+-0.1426459998 0.0200805999 -0.4788979888
+-0.1002710015 0.0286036003 -0.4813509881
+-0.1308619976 0.1295679957 -0.4772540033
+-0.0891114026 0.1373910010 -0.4775620103
+-0.0933879018 0.0825529024 -0.4807580113
+0.4282940030 -0.2671000063 -0.4198330045
+0.3853299916 -0.2477300018 -0.4374839962
+0.4447900057 -0.2335159928 -0.4370779991
+0.2707589865 -0.2714819908 -0.4406529963
+0.3269929886 -0.2608419955 -0.4387429953
+0.3109200001 -0.2970550060 -0.4241200089
+0.3485060036 -0.1875959933 -0.4608539939
+0.3395670056 -0.2241930068 -0.4509769976
+0.2948389947 -0.1951700002 -0.4619950056
+0.0490567014 -0.3005329967 -0.4384169877
+0.1049399972 -0.2948569953 -0.4419049919
+0.0902352035 -0.3289130032 -0.4283410013
+0.1327680051 -0.2175160050 -0.4637919962
+0.1193130016 -0.2575789988 -0.4538069963
+0.0786333010 -0.2239280045 -0.4621970057
+0.2003120035 -0.3161459863 -0.4290350080
+0.1601199955 -0.2883520126 -0.4429090023
+0.2151100039 -0.2807430029 -0.4422070086
+0.1735170037 -0.0390564017 -0.4844720066
+0.1651190072 -0.0853746980 -0.4818390012
+0.1231380031 -0.0430938005 -0.4845849872
+0.2505579889 -0.1621589959 -0.4705719948
+0.2074670047 -0.1252620071 -0.4771769941
+0.2589319944 -0.1201319993 -0.4764170051
+0.1036960036 -0.1368129998 -0.4775010049
+0.1556970030 -0.1309130043 -0.4777030051
+0.1449410021 -0.1751309931 -0.4717459977
+0.2407969981 -0.2030010074 -0.4631240070
+0.2289350033 -0.2426919937 -0.4536800086
+0.1867489964 -0.2105409950 -0.4638879895
+-0.3708460033 -0.3109390140 -0.2907229960
+-0.4053649902 -0.3388220072 -0.2460210025
+-0.3042989969 -0.2490569949 -0.3689709902
+-0.3352060020 -0.2812100053 -0.3335109949
+-0.2647370100 -0.3430390060 -0.3356510103
+-0.3051179945 -0.3136790097 -0.3316920102
+-0.2428880036 -0.3145520091 -0.3633899987
+-0.2103639990 -0.0883387998 -0.4582270086
+-0.2293740064 -0.1335240006 -0.4431590140
+-0.1740829945 -0.2091919929 -0.4346370101
+-0.2036300004 -0.1719889939 -0.4388000071
+-0.1546200067 -0.1673730016 -0.4509339929
+-0.2511380017 -0.1753389984 -0.4237399995
+-0.2758199871 -0.2137729973 -0.3993940055
+-0.0234248005 -0.3375639915 -0.4158119857
+-0.0650295988 -0.3091660142 -0.4216350019
+-0.0077101300 -0.3053840101 -0.4317409992
+-0.1817449927 -0.3137809932 -0.3888509870
+-0.1228530034 -0.3119620085 -0.4076929986
+-0.1402399987 -0.3422540128 -0.3877489865
+-0.0862286016 -0.2407249957 -0.4427559972
+-0.1043929979 -0.2781260014 -0.4263750017
+-0.1409000009 -0.2446970046 -0.4305770099
+-0.2192019969 -0.2827689946 -0.3902310133
+-0.2506650090 -0.2493080050 -0.3936629891
+-0.1958110034 -0.2476560026 -0.4143260121
+-0.1673450023 -0.0814569965 -0.4666369855
+-0.0755800009 -0.0668713972 -0.4778580070
+-0.1223559976 -0.0741612017 -0.4731040001
+-0.1372559965 -0.1222089976 -0.4637939930
+-0.1044069976 -0.1617870033 -0.4604809880
+0.0725243017 -0.0479184017 -0.4842430055
+0.0512440987 -0.1429619938 -0.4759329855
+0.0626358986 -0.0961809978 -0.4811800122
+0.0222274009 -0.0535498001 -0.4831799865
+-0.0272754002 -0.0599194989 -0.4811350107
+0.0083120996 -0.2694090009 -0.4460459948
+-0.0689603984 -0.1997539997 -0.4566070139
+-0.0312322993 -0.2357320040 -0.4519270062
+0.0238319002 -0.2300519943 -0.4583260119
+0.0382632986 -0.1877489984 -0.4683260024
+-0.0531747006 -0.1556500047 -0.4676710069
+-0.0392335989 -0.1088759974 -0.4758369923
+-0.0011808000 -0.1492930055 -0.4727399945
+-0.1753100008 0.3861219883 -0.4337129891
+-0.1257340014 0.3397170007 -0.4477010071
+-0.0038566100 0.3238329887 -0.4577539861
+-0.0625879019 0.3307200074 -0.4530389905
+-0.0425290987 0.3627989888 -0.4469949901
+-0.0763043016 0.2910810113 -0.4593339860
+-0.0307254009 0.2430640012 -0.4684549868
+0.2010360062 0.3066689968 -0.4710069895
+0.1542149931 0.3096779883 -0.4685600102
+0.1692889929 0.3415549994 -0.4635359943
+0.1278859973 0.2344850004 -0.4767889977
+0.1403920054 0.2738620043 -0.4729830027
+0.1767819971 0.2321390063 -0.4789020121
+0.0703103989 0.3494960070 -0.4567170143
+0.1047199965 0.3133009970 -0.4655869901
+0.0522908010 0.3178200126 -0.4620200098
+0.0976028964 0.0996010974 -0.4842210114
+0.1394349933 0.0529121011 -0.4860059917
+0.0135086998 0.1946939975 -0.4756050110
+0.0558548011 0.1469340026 -0.4807820022
+0.1565449983 0.1462509930 -0.4839870036
+0.1066469997 0.1468389928 -0.4824439883
+0.1166749969 0.1919810027 -0.4799529910
+0.0233465005 0.2403430045 -0.4713949859
+0.0362366997 0.2815470099 -0.4668560028
+0.0765948966 0.2372760028 -0.4742560089
+0.4603520036 0.3007810116 -0.4768820107
+0.4412080050 0.3007810116 -0.4768820107
+0.4390980005 0.3339839876 -0.4719290137
+0.4472489953 0.2251559943 -0.4845199883
+0.4443730116 0.2642970085 -0.4811030030
+0.4742290080 0.2251559943 -0.4845199883
+0.3932499886 0.3340680003 -0.4716489911
+0.4173859954 0.3008089960 -0.4768120050
+0.3894140124 0.3009209931 -0.4766030014
+0.4544279873 0.0545312017 -0.4886929989
+0.4534240067 0.0980468988 -0.4892179966
+0.4915040135 0.0545312017 -0.4886929989
+0.3818329871 0.1842930019 -0.4867790043
+0.4168719947 0.1414899975 -0.4885790050
+0.3792760074 0.1417710036 -0.4883689880
+0.4844239950 0.1414059997 -0.4886490107
+0.4519389868 0.1414059997 -0.4886490107
+0.4499050081 0.1839839965 -0.4870589972
+0.2564879954 0.3367320001 -0.4680120051
+0.2856340110 0.3027440012 -0.4744339883
+0.2449180037 0.3043139875 -0.4729659855
+0.3580549955 0.3012019992 -0.4761829972
+0.3233650029 0.3017629981 -0.4754840136
+0.3312880099 0.3346849978 -0.4705300033
+0.3094809949 0.2266979963 -0.4831210077
+0.3162299991 0.2655589879 -0.4797050059
+0.3482910097 0.2258570045 -0.4838199914
+0.3866179883 0.2644929886 -0.4808239937
+0.4172289968 0.2252119929 -0.4844500124
+0.3842250109 0.2254090011 -0.4842399955
+0.4491969943 -0.2064650059 -0.4491530061
+0.5000000000 -0.2242189944 -0.4364669919
+0.3545219898 -0.1510190070 -0.4687669873
+0.4008170068 -0.1816480011 -0.4599030018
+0.4997169971 -0.1748439968 -0.4585390091
+0.4512969851 -0.1774419993 -0.4591319859
+0.4529120028 -0.1448830068 -0.4675419927
+0.1814240068 0.0074768402 -0.4860660136
+0.2235870063 -0.0360796005 -0.4843980074
+0.3209120035 -0.0324845016 -0.4842900038
+0.2728540003 -0.0339507982 -0.4843429923
+0.2790560126 0.0103217000 -0.4865939915
+0.2662290037 -0.0774616003 -0.4809780121
+0.3097249866 -0.1160729975 -0.4757770002
+0.4960350096 -0.0304687992 -0.4840739965
+0.4550989866 -0.0306055006 -0.4841139913
+0.4550240040 0.0114842998 -0.4870019853
+0.4539729953 -0.1094139963 -0.4744560122
+0.4547249973 -0.0711133033 -0.4799560010
+0.4985840023 -0.1085940003 -0.4742150009
+0.3708649874 0.0113054998 -0.4869059920
+0.4122180045 -0.0309303999 -0.4841719866
+0.3674429953 -0.0315215997 -0.4842340052
+0.4075979888 -0.1107229963 -0.4748030007
+0.3594389856 -0.1128989980 -0.4752439857
+0.3636640012 -0.0730402023 -0.4803720117
+0.1890890002 0.0541468002 -0.4867039919
+0.2051119953 0.1453399956 -0.4853200018
+0.1968879998 0.1002999991 -0.4864400029
+0.2377199978 0.0547823012 -0.4873090088
+0.2849220037 0.0550042987 -0.4878079891
+0.2338850051 0.2686150074 -0.4771870077
+0.3029550016 0.1858070046 -0.4856599867
+0.2678520083 0.2281000018 -0.4820719957
+0.2235430032 0.2299579978 -0.4806660116
+0.2139600068 0.1887219995 -0.4833849967
+0.4152260125 0.0546434000 -0.4886229932
+0.3303779960 0.0549716018 -0.4881919920
+0.3738589883 0.0548162982 -0.4884609878
+0.3766260147 0.0984674022 -0.4889380038
+0.3392069936 0.1423880011 -0.4879499972
+0.2907420099 0.0994990021 -0.4880320132
+0.2519409955 0.1442909986 -0.4864290059
+0.2967160046 0.1432629973 -0.4873049855
+-0.1542679965 -0.0226651002 -0.0389290005
+-0.1497559994 0.0006453600 -0.0218391009
+-0.1685270071 -0.0097989403 -0.0097053200
+-0.1099689975 0.0154224997 -0.0402320996
+-0.1301089972 0.0089591797 -0.0319092982
+-0.1142989993 -0.0052919998 -0.0585438982
+-0.1548009962 0.0319171995 0.0290887002
+-0.1436460018 0.0213312991 -0.0025275699
+-0.1358200014 0.0393489003 0.0186639000
+-0.0313678011 0.0279746000 -0.0619233996
+-0.0500871986 0.0263398997 -0.0576850995
+-0.0347337015 0.0127017004 -0.0788595006
+-0.0759826005 0.0498559996 -0.0054542101
+-0.0638637021 0.0386964008 -0.0330544002
+-0.0562036000 0.0502869003 -0.0120764999
+-0.0735483021 0.0058107502 -0.0710792989
+-0.0696289986 0.0238611996 -0.0528359003
+-0.0896957964 0.0203041006 -0.0471107997
+-0.1058079973 0.0843608975 0.1244499981
+-0.1013899967 0.0770611018 0.0900994986
+-0.0862139016 0.0841118991 0.1153929979
+-0.1261949986 0.0546613000 0.0413933992
+-0.1147229970 0.0672394037 0.0653192028
+-0.1340239942 0.0633819997 0.0747186020
+-0.0747708976 0.0687519982 0.0483959988
+-0.0948591009 0.0689435974 0.0566417985
+-0.0863500014 0.0599074997 0.0246153995
+-0.1161200032 0.0446386002 0.0096318703
+-0.1039180011 0.0332171991 -0.0200404003
+-0.0960607976 0.0480552018 0.0016893500
+0.0599200986 0.0276727993 -0.0930280015
+0.0560096018 0.0286378991 -0.0889907032
+0.0585529990 0.0276727993 -0.0957624018
+0.0514811017 0.0296068005 -0.0603896007
+0.0536409989 0.0291607995 -0.0769428015
+0.0598881990 0.0242404006 -0.0686696023
+0.0479606986 0.0241487995 -0.0917837024
+0.0496356003 0.0291303005 -0.0847615004
+0.0409360006 0.0294541996 -0.0806837976
+0.0459593013 0.0328340009 0.0409234017
+0.0467378981 0.0316698998 0.0112554003
+0.0610525012 0.0202485994 0.0266533997
+0.0232116003 0.0427314006 -0.0213692002
+0.0340720005 0.0391791984 -0.0048774299
+0.0186045002 0.0467347987 0.0053081298
+0.0601206012 0.0215256996 -0.0275052991
+0.0479688011 0.0307812002 -0.0158209000
+0.0495719016 0.0301012006 -0.0398389995
+-0.0002335420 0.0172579009 -0.0840035006
+0.0025191100 0.0295336992 -0.0694942027
+-0.0137468996 0.0289887991 -0.0658027977
+0.0300641004 0.0296433996 -0.0767958984
+0.0171942003 0.0297130998 -0.0731147006
+0.0279028006 0.0207627993 -0.0879606977
+-0.0015337900 0.0454531014 -0.0311786998
+0.0073635499 0.0378974006 -0.0540108010
+0.0142791998 0.0423041992 -0.0378609002
+0.0344389006 0.0342107005 -0.0648790970
+0.0409709997 0.0343631990 -0.0524462014
+0.0285123009 0.0385905989 -0.0449309014
+0.0700268000 0.0628328994 0.3097040057
+0.0627064034 0.0561872981 0.2780880034
+0.0877799019 0.0414218009 0.2951779962
+0.0141931996 0.0778009966 0.2375849932
+0.0380792990 0.0683284029 0.2587769926
+0.0191388000 0.0837970972 0.2709099948
+0.0755186975 0.0308103003 0.2286089957
+0.0569580011 0.0506157018 0.2447330058
+0.0525946990 0.0459706001 0.2102629989
+-0.0692505017 0.0883843973 0.1408559978
+-0.0505879000 0.0898784995 0.1661490053
+-0.0703115985 0.0947368965 0.1755490005
+-0.0106854001 0.0737930015 0.1453129947
+-0.0306132007 0.0828291029 0.1561480016
+-0.0291949008 0.0770832971 0.1214980036
+-0.0282432009 0.0945098996 0.2252800018
+-0.0303492993 0.0886017010 0.1909299940
+-0.0086916704 0.0845685005 0.2148559988
+0.0633253977 0.0209414996 0.0900738984
+0.0461487994 0.0364107005 0.1059499979
+0.0457273014 0.0343833007 0.0726592988
+0.0494429991 0.0421242006 0.1752710044
+0.0473431014 0.0389674008 0.1403219998
+0.0677933991 0.0242739003 0.1587370038
+0.0098146005 0.0586793013 0.0992211998
+0.0279415008 0.0504456013 0.1203700006
+0.0089182798 0.0629481003 0.1334439963
+0.0304182004 0.0582110994 0.1900369972
+0.0109545002 0.0724096000 0.2031749934
+0.0092494804 0.0674948990 0.1682730019
+-0.0662121028 0.0816984028 0.1063859984
+-0.0547772013 0.0669104010 0.0403039008
+-0.0613432005 0.0745740011 0.0726891980
+-0.0461217016 0.0773511007 0.0971705019
+-0.0262406003 0.0712743998 0.0875146985
+-0.0260319002 0.0397367999 -0.0437911004
+-0.0094300304 0.0524819009 -0.0051166900
+-0.0187123995 0.0479208007 -0.0247529000
+-0.0370211005 0.0495826006 -0.0184425004
+-0.0466342010 0.0586109012 0.0097557697
+0.0294790007 0.0443143994 0.0540484004
+-0.0068460698 0.0636463016 0.0772180036
+0.0118057001 0.0546180010 0.0661095977
+0.0147713004 0.0506674014 0.0346342996
+0.0017607399 0.0533973984 0.0147930002
+-0.0218838006 0.0653017983 0.0547363013
+-0.0351760983 0.0636233017 0.0321349986
+-0.0162445996 0.0590685010 0.0236882996
+-0.4871380031 0.1961800009 0.2795439959
+-0.4939810038 0.1782000065 0.2478619963
+-0.5000000000 0.1640630066 0.3007810116
+-0.4897260070 0.1825170070 0.1425780058
+-0.4908689857 0.1837339997 0.1951290071
+-0.4833920002 0.2091190070 0.1762180030
+-0.5000000000 0.1357419938 0.2255859971
+-0.4963760078 0.1592819989 0.2114589959
+-0.4977470040 0.1359899938 0.1725780070
+-0.4872620106 0.1458629966 -0.0653097034
+-0.4884740114 0.1572889984 -0.0141030001
+-0.4860480130 0.1759590060 -0.0309600998
+-0.4926779866 0.1158879995 0.0143668000
+-0.4906849861 0.1372310072 0.0008910330
+-0.4906849861 0.1055610031 -0.0371313989
+-0.4848729968 0.1981820017 0.0724198967
+-0.4890019894 0.1680230051 0.0377614014
+-0.4891909957 0.1769479960 0.0900252983
+-0.5000000000 0.0175781008 0.0605469011
+-0.4980069995 0.0442583002 0.0493738018
+-0.4975740016 0.0078615202 0.0088867899
+-0.4980939925 0.1090549976 0.1319520026
+-0.4981800020 0.0782335028 0.0906397030
+-0.5000000000 0.0849609002 0.1435550004
+-0.4938920140 0.0596136004 -0.0134047000
+-0.4962309897 0.0694523007 0.0382229984
+-0.4944980145 0.0933019966 0.0266851000
+-0.4959270060 0.1321289986 0.1195039973
+-0.4929879904 0.1547539979 0.1056540012
+-0.4943239987 0.1250970066 0.0666700974
+-0.4514810145 0.1122829989 -0.3752160072
+-0.4514810145 0.1275359988 -0.3911660016
+-0.4511559904 0.0763143972 -0.3488590121
+-0.4513840079 0.0952156037 -0.3611980081
+-0.4678989947 0.1206810027 -0.3146730065
+-0.4604479969 0.1063850001 -0.3385100067
+-0.4679859877 0.1053059995 -0.2986899912
+-0.4503509998 -0.0180284008 -0.3090409935
+-0.4502409995 0.0084076803 -0.3184399903
+-0.4681969881 0.0482163988 -0.2606480122
+-0.4601309896 0.0269105006 -0.2905389965
+-0.4685389996 0.0254654009 -0.2500120103
+-0.4504669905 0.0329302996 -0.3278869987
+-0.4508210123 0.0555591993 -0.3378809988
+-0.4841429889 0.1513990015 -0.1318569928
+-0.4826709926 0.1237640008 -0.1641779989
+-0.4853560030 0.1344369948 -0.1154529974
+-0.4741370082 0.1083550006 -0.2561269999
+-0.4789890051 0.1147779971 -0.2111770064
+-0.4785549939 0.1306419969 -0.2272890061
+-0.4800190032 0.0775894001 -0.1840070039
+-0.4794479907 0.0971010029 -0.1968750060
+-0.4746119976 0.0717760026 -0.2292419970
+-0.4680370092 0.0881168991 -0.2845790088
+-0.4602890015 0.0703556985 -0.3120149970
+-0.4680779874 0.0690935999 -0.2720240057
+-0.5000000000 -0.3007810116 -0.1640630066
+-0.4826599956 -0.2575910091 -0.1976670027
+-0.4908010066 -0.1872529984 -0.1580239981
+-0.4874149859 -0.2237749994 -0.1802569926
+-0.5000000000 -0.2255859971 -0.1357419938
+-0.4707770050 -0.2170830071 -0.2242130041
+-0.4631049931 -0.1789940000 -0.2451040000
+-0.4968810081 -0.0302243996 -0.0300888997
+-0.4958570004 -0.0695111975 -0.0670002997
+-0.5000000000 -0.0605469011 -0.0175781008
+-0.4834809899 -0.0821741000 -0.1615709960
+-0.4904200137 -0.0769710988 -0.1150759980
+-0.4874230027 -0.0466485992 -0.1274639964
+-0.5000000000 -0.1435550004 -0.0849609002
+-0.4945020080 -0.1092659980 -0.1011150032
+-0.4928170145 -0.1487579942 -0.1316999942
+-0.4524779916 -0.0767202005 -0.2883270085
+-0.4510680139 -0.0463977009 -0.2991290092
+-0.4578149915 -0.1429380029 -0.2622529864
+-0.4545759857 -0.1088929996 -0.2762829959
+-0.4723829925 -0.0540456995 -0.2180919945
+-0.4645659924 -0.0828009024 -0.2485820055
+-0.4748919904 -0.0843681991 -0.2061920017
+-0.4721010029 -0.1492619962 -0.2204450071
+-0.4837389886 -0.1509519964 -0.1768089980
+-0.4785470068 -0.1166639999 -0.1926580071
+-0.4944550097 -0.0018550900 -0.0417098999
+-0.4908590019 0.0497749001 -0.0639690012
+-0.4925050139 0.0247641001 -0.0528668016
+-0.4903729856 -0.0108193997 -0.0910710990
+-0.4851189852 -0.0182792991 -0.1389629990
+-0.4866560102 0.1156610027 -0.1007990018
+-0.4808500111 0.0562237985 -0.1721349955
+-0.4844729900 0.0856596008 -0.1366430074
+-0.4879989922 0.0952342972 -0.0875661969
+-0.4893859923 0.0732584000 -0.0754097998
+-0.4611580074 -0.0241091009 -0.2705779970
+-0.4785470068 -0.0234823003 -0.1850920022
+-0.4705680013 -0.0256763995 -0.2291029990
+-0.4693149924 0.0008206950 -0.2396170050
+-0.4758209884 0.0277814995 -0.2066439986
+-0.4833349884 0.0082788402 -0.1499820054
+-0.4869250059 0.0406884998 -0.1132370010
+-0.4819410145 0.0331065990 -0.1609130055
+-0.4602069855 0.2309760004 0.2991150022
+-0.4673469961 0.2353119999 0.2532350123
+-0.4374940097 0.2977510095 0.1992149949
+-0.4501189888 0.2699860036 0.2261389941
+-0.4219770133 0.3046900034 0.2413479984
+-0.4705620110 0.2379969954 0.2043319941
+-0.4742839932 0.2349070013 0.1545290053
+-0.4125309885 0.3660219908 0.0844668001
+-0.4156750143 0.3541400135 0.1145360023
+-0.3922359943 0.3803110123 0.1256770045
+-0.4524160028 0.2968249917 0.0800274014
+-0.4357610047 0.3260979950 0.0992614999
+-0.4483900070 0.3110640049 0.0527682006
+-0.4018040001 0.3511379957 0.1847079992
+-0.4205229878 0.3393749893 0.1435140073
+-0.4274840057 0.3210060000 0.1716009974
+-0.4822500050 0.2061949968 0.0011901300
+-0.4834479988 0.1930799931 -0.0500086993
+-0.4771519899 0.2284400016 0.1036439985
+-0.4800350070 0.2183540016 0.0524935983
+-0.4717980027 0.2523599863 0.0071634101
+-0.4755330086 0.2365390062 0.0306694005
+-0.4656449854 0.2668409944 0.0570659004
+-0.4655860066 0.2586460114 0.1310199946
+-0.4490590096 0.2896330059 0.1537699997
+-0.4581519961 0.2794109881 0.1061140001
+-0.4514810145 0.3922980130 -0.1974769980
+-0.4392560124 0.3921859860 -0.1572629958
+-0.4237450063 0.4103809893 -0.1527229995
+-0.4604859948 0.3509730101 -0.1731130034
+-0.4508680105 0.3722960055 -0.1638150066
+-0.4681159854 0.3516460061 -0.2103790045
+-0.4050689936 0.4096170068 -0.0756943002
+-0.4299049973 0.3917889893 -0.1187580004
+-0.4229139984 0.3908709884 -0.0818381980
+-0.4816299975 0.2592819929 -0.2322320044
+-0.4786840081 0.2823730111 -0.2147150040
+-0.4847509861 0.2624219954 -0.2642099857
+-0.4595920146 0.3239060044 -0.1167009994
+-0.4703229964 0.3030779958 -0.1654119939
+-0.4676429927 0.2993269861 -0.1333270073
+-0.4792059958 0.3072980046 -0.2335129976
+-0.4741770029 0.3056159914 -0.1988009959
+-0.4681119919 0.3286150098 -0.1848219931
+-0.3899979889 0.3979859948 0.0626692995
+-0.4117900133 0.3817450106 0.0212113000
+-0.4112069905 0.3751870096 0.0533297993
+-0.4175939858 0.3891400099 -0.0462398008
+-0.4139449894 0.3862369955 -0.0119431000
+-0.3944849968 0.4064800143 -0.0041699498
+-0.4445889890 0.3393169940 -0.0368377008
+-0.4305019975 0.3637169898 -0.0228794999
+-0.4463700056 0.3442879915 -0.0690276027
+-0.4375520051 0.3700740039 -0.0907671005
+-0.4543389976 0.3497300148 -0.1371240020
+-0.4496330023 0.3476200104 -0.1024350002
+-0.4604049921 0.1351570040 -0.3725540042
+-0.4514810145 0.1409939975 -0.4092429876
+-0.4737040102 0.1376760006 -0.2903169990
+-0.4678120017 0.1342609972 -0.3327820003
+-0.4681159854 0.1563040018 -0.3749870062
+-0.4678559899 0.1460990012 -0.3529160023
+-0.4738340080 0.1599629968 -0.3325859904
+-0.4836220145 0.1797010005 -0.1006970033
+-0.4829289913 0.1665669978 -0.1503870040
+-0.4813260138 0.1912949979 -0.1933040023
+-0.4819329977 0.1798689961 -0.1709090024
+-0.4808920026 0.2060170025 -0.1440349966
+-0.4811539948 0.1546120048 -0.1987719983
+-0.4781219959 0.1447100043 -0.2455279976
+-0.4847509861 0.2201859951 -0.2998009920
+-0.4829300046 0.2151400000 -0.2707799971
+-0.4830169976 0.2367389947 -0.2510179877
+-0.4783389866 0.1763560027 -0.3118970096
+-0.4813709855 0.1948799938 -0.2911840081
+-0.4792059958 0.1837580055 -0.3376159966
+-0.4804590046 0.2247299999 -0.1943729967
+-0.4817599952 0.2087879926 -0.2433180064
+-0.4812400043 0.2008980066 -0.2174690068
+-0.4779059887 0.1674859971 -0.2879270017
+-0.4778620005 0.1569750011 -0.2657749951
+-0.4803740084 0.1781799942 -0.2413810045
+-0.4811080098 0.2082740068 -0.0710327029
+-0.4688430130 0.2659910023 -0.0180156007
+-0.4762650132 0.2370879948 -0.0433349013
+-0.4792439938 0.2214709967 -0.0938970968
+-0.4780310094 0.2326599956 -0.1184829995
+-0.4298160076 0.3498860002 0.0404485017
+-0.4564230144 0.3134320080 -0.0535799004
+-0.4443680048 0.3322280049 -0.0057588699
+-0.4456639886 0.3228470087 0.0241385996
+-0.4586719871 0.2947089970 0.0045730402
+-0.4793759882 0.2550010085 -0.2016250044
+-0.4775980115 0.2418929935 -0.1446879953
+-0.4780319929 0.2492820024 -0.1724250019
+-0.4737890065 0.2742800117 -0.1519789994
+-0.4661769867 0.2939470112 -0.1024829969
+-0.4730980098 0.2596470118 -0.0946651027
+-0.4668419957 0.2774209976 -0.0447487012
+-0.4659250081 0.2867029905 -0.0729333013
+0.0791193992 0.0707186982 0.3389280140
+0.0523118004 0.0818220973 0.3218379915
+0.0164746009 0.1123190001 0.3407500088
+0.0344953015 0.0983278006 0.3320460021
+0.0444701016 0.1073890030 0.3591279984
+0.0259783994 0.0905451998 0.3025270104
+0.0004137980 0.0968440026 0.2813349962
+-0.0583975986 0.1436250061 0.3673399985
+-0.0392794982 0.1393720061 0.3613579869
+-0.0299091004 0.1503559947 0.3851990104
+-0.0553083010 0.1213039979 0.3063380122
+-0.0478210002 0.1297439933 0.3349879980
+-0.0738248974 0.1246690005 0.3136810064
+0.0082021104 0.1338499933 0.3736720085
+-0.0204032995 0.1327939928 0.3550989926
+-0.0018155701 0.1237979978 0.3483240008
+-0.0692358017 0.1008649990 0.2099000067
+-0.0894654989 0.0971734002 0.1846069992
+-0.0241216999 0.1006819978 0.2586059868
+-0.0474020988 0.1020290032 0.2346799970
+-0.0847660974 0.1098359972 0.2518579960
+-0.0662337020 0.1071280017 0.2434290051
+-0.0615190007 0.1138459966 0.2757050097
+-0.0181984007 0.1074379981 0.2904720008
+-0.0106899003 0.1150619984 0.3204919994
+-0.0367630012 0.1155809984 0.2986969948
+-0.2033279985 0.1204980016 0.4193750024
+-0.1888429970 0.1252509952 0.4122610092
+-0.1846240014 0.1388089955 0.4279200137
+-0.1975640059 0.0985257998 0.3720659912
+-0.1933880001 0.1116370037 0.3936469853
+-0.2124699950 0.0919028968 0.3824639916
+-0.1492509991 0.1496730000 0.4172419906
+-0.1722860038 0.1308930069 0.4053530097
+-0.1543789953 0.1362150013 0.3984700143
+-0.2079010010 0.0557735004 0.2611260116
+-0.2065510005 0.0649043024 0.2920590043
+-0.2221429944 0.0444381014 0.2759819925
+-0.1688379943 0.1015010029 0.3265739977
+-0.1887619942 0.0839155018 0.3090330064
+-0.1724710017 0.0920355991 0.2978639901
+-0.2188909948 0.0660505965 0.3339779973
+-0.2043229938 0.0750724003 0.3210589886
+-0.2012970001 0.0863158032 0.3478260040
+-0.0694921985 0.1576579958 0.3956109881
+-0.0970721021 0.1457760036 0.3792169988
+-0.0776740983 0.1456779987 0.3732360005
+-0.1356910020 0.1407900006 0.3918319941
+-0.1164819971 0.1440729946 0.3854019940
+-0.1098430008 0.1568399966 0.4061830044
+-0.1288260072 0.1220040023 0.3361450136
+-0.1228979975 0.1324380040 0.3620119989
+-0.1468539983 0.1176749989 0.3443480134
+-0.1595740020 0.1236310005 0.3770540059
+-0.1814730018 0.1054729968 0.3622710109
+-0.1644819975 0.1120370030 0.3530440032
+-0.1801619977 0.0008894990 0.0219109003
+-0.1860190034 -0.0226651002 0.0048210700
+-0.1634539962 0.0408136994 0.0624139011
+-0.1726800054 0.0220637005 0.0412225015
+-0.2050350010 -0.0040915599 0.0714197010
+-0.1894370019 0.0099794399 0.0552758984
+-0.1965939999 0.0179897007 0.0897852033
+-0.1079680026 0.0909479037 0.1591430008
+-0.1246559992 0.0821880996 0.1338499933
+-0.1601399928 0.0709692985 0.1547939926
+-0.1427679956 0.0776782036 0.1438809931
+-0.1441159993 0.0841101035 0.1786279976
+-0.1394730061 0.0709014982 0.1090689972
+-0.1524010003 0.0571026988 0.0851434022
+-0.2215790004 0.0267597996 0.2108819932
+-0.2075330019 0.0398238003 0.1947319955
+-0.2083009928 0.0474946983 0.2285699993
+-0.2018609941 0.0253785998 0.1248740032
+-0.2054439932 0.0325440988 0.1600179970
+-0.2163340002 0.0113222003 0.1415060014
+-0.1776590049 0.0689747036 0.2013150007
+-0.1925680041 0.0517713018 0.1800689995
+-0.1767529994 0.0622523017 0.1667989939
+-0.1863480061 0.0378834009 0.1100310013
+-0.1698489934 0.0485395007 0.0968438983
+-0.1742130071 0.0555530004 0.1318140030
+-0.1080780029 0.0972198024 0.1936520040
+-0.1029900014 0.1102190018 0.2602509856
+-0.1063470021 0.1035360023 0.2274989933
+-0.1261599958 0.0949608982 0.2029750049
+-0.1437080055 0.0905347019 0.2128259987
+-0.0853416026 0.1350920051 0.3482849896
+-0.1340949982 0.1127829999 0.3080199957
+-0.1106119975 0.1248020008 0.3283930123
+-0.0922665000 0.1257719994 0.3209620118
+-0.0982234031 0.1175490022 0.2915189862
+-0.1928589940 0.0664277002 0.2474540025
+-0.1607010067 0.0841320977 0.2234160006
+-0.1771019995 0.0759973973 0.2349150032
+-0.1753000021 0.0836030021 0.2672120035
+-0.1556870043 0.0990497023 0.2875120044
+-0.1417569965 0.0972729996 0.2460419983
+-0.1209010035 0.1084119976 0.2688559890
+-0.1384789944 0.1046079993 0.2778869867
+-0.3945420086 0.4334779978 -0.1691540033
+-0.3844209909 0.4439049959 -0.1816059947
+-0.4293000102 0.4260869920 -0.1974769980
+-0.2962880135 0.4686549902 -0.1696009934
+-0.3401190042 0.4579139948 -0.1727160066
+-0.3072319925 0.4625949860 -0.1493909955
+-0.4026150107 0.4514290094 -0.2103790045
+-0.3718900084 0.4541999996 -0.1930270046
+-0.3583349884 0.4630439878 -0.2059759945
+-0.1220220029 0.4904389977 -0.1932100058
+-0.1657319963 0.4873630106 -0.1830859929
+-0.1350709945 0.4877069890 -0.1658630073
+-0.2261459976 0.4853760004 -0.2141630054
+-0.1961070001 0.4865539968 -0.1991730034
+-0.1821170002 0.4895290136 -0.2226050049
+-0.2210330069 0.4792200029 -0.1508660018
+-0.2092230022 0.4829860032 -0.1754149944
+-0.2526749969 0.4769240022 -0.1706420034
+-0.3440450132 0.4767700136 -0.2642099857
+-0.3146449924 0.4796740115 -0.2530559897
+-0.3001140058 0.4815219939 -0.2711809874
+-0.3440159857 0.4704349935 -0.2201199979
+-0.3293659985 0.4759779871 -0.2359240055
+-0.3735029995 0.4683229923 -0.2335129976
+-0.2412919998 0.4866220057 -0.2484479994
+-0.2853139937 0.4819900095 -0.2410439998
+-0.2558580041 0.4838620126 -0.2281010002
+-0.3141689897 0.4724270105 -0.2054180056
+-0.2837460041 0.4745819867 -0.1889449954
+-0.2701250017 0.4797829986 -0.2082889974
+0.2580789924 0.4986029863 -0.3457640111
+0.2042160034 0.4961329997 -0.3201400042
+0.2375700027 0.4924800098 -0.3166129887
+0.1353539973 0.4978210032 -0.3254840076
+0.1687970012 0.4973669946 -0.3218359947
+0.1823920012 0.4983020127 -0.3423190117
+0.1332290024 0.4901520014 -0.2640070021
+0.1524039954 0.4945690036 -0.2957020104
+0.1038369983 0.4941149950 -0.2742719948
+0.0126700001 0.4898610115 -0.3495300114
+0.0421699993 0.4933100045 -0.3424170017
+0.0579150990 0.4890759885 -0.3611130118
+0.0116603002 0.4969570041 -0.2991130054
+0.0268396996 0.4958769977 -0.3217369914
+-0.0182459000 0.4958809912 -0.3076820076
+0.1172680035 0.4955500066 -0.3491309881
+0.0720636025 0.4957230091 -0.3357520103
+0.1028940007 0.4971730113 -0.3298960030
+-0.0479304008 0.4911270142 -0.1908369958
+-0.0335128009 0.4935539961 -0.2203429937
+-0.0779440999 0.4924589992 -0.2057349980
+0.0567293018 0.4939459860 -0.2543550134
+0.0112378998 0.4939309955 -0.2365459949
+0.0403799005 0.4909839928 -0.2235279977
+-0.0484926999 0.4960959852 -0.2595109940
+-0.0186016001 0.4955349863 -0.2483139932
+-0.0034920101 0.4967609942 -0.2746089995
+0.0730504990 0.4962779880 -0.2828289866
+0.0884440020 0.4974350035 -0.3080399930
+0.0421096012 0.4971260130 -0.2908830047
+-0.2643350065 0.4260869920 -0.4092429876
+-0.2177249938 0.4362449944 -0.4029830098
+-0.2059680074 0.4182159901 -0.4188250005
+-0.2369489968 0.4606019855 -0.3674780130
+-0.2268999964 0.4496940076 -0.3857789934
+-0.2743850052 0.4514290094 -0.3749870062
+-0.1247069985 0.4417789876 -0.4057059884
+-0.1770019978 0.4464330077 -0.3961249888
+-0.1408720016 0.4562790096 -0.3887540102
+-0.2860310078 0.4815219939 -0.2899670005
+-0.2724129856 0.4794299901 -0.3093230128
+-0.3163200021 0.4767700136 -0.2998009920
+-0.1834930032 0.4818600118 -0.3308160007
+-0.2281849980 0.4811010063 -0.3197450042
+-0.1978420019 0.4859089851 -0.3102560043
+-0.2924070060 0.4683229923 -0.3376159966
+-0.2595210075 0.4752460122 -0.3289160132
+-0.2476119995 0.4689700007 -0.3484120071
+-0.0000133656 0.4782730043 -0.3753890097
+-0.0464010984 0.4798440039 -0.3649109900
+-0.0168302003 0.4853799939 -0.3570100069
+-0.1075230017 0.4651589990 -0.3809869885
+-0.0763930976 0.4730910063 -0.3729769886
+-0.0589766987 0.4624109864 -0.3908439875
+-0.1080660000 0.4868429899 -0.3334549963
+-0.0925460011 0.4810850024 -0.3537360132
+-0.1382749975 0.4818109870 -0.3422529995
+-0.1554159969 0.4673820138 -0.3703989983
+-0.2021179944 0.4686959982 -0.3594340086
+-0.1694130003 0.4757589996 -0.3509750068
+-0.2562380135 0.4852170050 -0.2797259986
+-0.1971839964 0.4901979864 -0.2576999962
+-0.2266869992 0.4880610108 -0.2689949870
+-0.2121980041 0.4879049957 -0.2896269858
+-0.1678519994 0.4896610081 -0.3006359935
+-0.1079579964 0.4929069877 -0.2198379934
+-0.0783841014 0.4957239926 -0.2703000009
+-0.0933135971 0.4947710037 -0.2455810010
+-0.1378600001 0.4926260114 -0.2331729978
+-0.1675989926 0.4917109907 -0.2457779944
+-0.0327420011 0.4905140102 -0.3372850120
+-0.1231369972 0.4905880094 -0.3124670088
+-0.0780687034 0.4908190072 -0.3248009980
+-0.0481523983 0.4938240051 -0.3162289858
+-0.0633250996 0.4954890013 -0.2938790023
+-0.1380230039 0.4925009906 -0.2908119857
+-0.1528490037 0.4927940071 -0.2685520053
+-0.1082239971 0.4945130050 -0.2807179987
+0.4231530130 0.3632810116 -0.4662440121
+0.4422270060 0.3632810116 -0.4663139880
+0.3717130125 0.3634209931 -0.4656150043
+0.3994730115 0.3633089960 -0.4660350084
+0.4204199910 0.4111329913 -0.4534339905
+0.4084779918 0.3889159858 -0.4599120021
+0.3938649893 0.4111329913 -0.4530149996
+0.2287749946 0.3668139875 -0.4604389966
+0.2689960003 0.3652440012 -0.4623979926
+0.2974559963 0.4118340015 -0.4497979879
+0.2825990021 0.3901779950 -0.4562749863
+0.2599210143 0.4126749933 -0.4478389919
+0.3063020110 0.3642629981 -0.4638659954
+0.3406380117 0.3637019992 -0.4649159908
+0.3725590110 0.4707030058 -0.4233820140
+0.3511170149 0.4597170055 -0.4297559857
+0.3374660015 0.4707030058 -0.4214229882
+0.3795289993 0.4301759899 -0.4456349909
+0.3652090132 0.4462890029 -0.4378539920
+0.3966310024 0.4462890029 -0.4389030039
+0.2957310081 0.4466539919 -0.4344269931
+0.3315570056 0.4463729858 -0.4363859892
+0.3137229979 0.4304839969 -0.4431169927
+0.3644829988 0.4111889899 -0.4523150027
+0.3515720069 0.3891119957 -0.4587930143
+0.3323279917 0.4113849998 -0.4512659907
+-0.1397590041 0.4061760008 -0.4273580015
+-0.0705548003 0.4361149967 -0.4141680002
+-0.1034620032 0.4218409956 -0.4209919870
+-0.0760746971 0.3955959976 -0.4347360134
+-0.0173260998 0.3876529932 -0.4410310090
+0.0463650003 0.4765909910 -0.3847489953
+0.0183384009 0.4687449932 -0.3920899928
+0.0605764017 0.4408299923 -0.4210569859
+0.0384772010 0.4563829899 -0.4072709978
+0.0856802985 0.4538030028 -0.4139809906
+-0.0099517703 0.4593270123 -0.3995819986
+-0.0392219014 0.4483729899 -0.4070039988
+0.1391890049 0.3723100126 -0.4547739923
+0.1854590029 0.3691689968 -0.4579220116
+0.0383184999 0.3811120093 -0.4464159906
+0.0902291015 0.3761970103 -0.4509620070
+0.1320029944 0.4186469913 -0.4382239878
+0.1109559983 0.3990100026 -0.4447709918
+0.0847306997 0.4217869937 -0.4335390031
+0.0088860299 0.4082809985 -0.4347000122
+-0.0169555005 0.4306190014 -0.4215810001
+0.0350163989 0.4257690012 -0.4280140102
+0.3074229956 0.5000000000 -0.3645969927
+0.2659269869 0.4994339943 -0.3586789966
+0.2809720039 0.4975590110 -0.3777410090
+0.2728280127 0.4989160001 -0.3684180081
+0.3156349957 0.4990229905 -0.3774769902
+0.2283660024 0.4986749887 -0.3567230105
+0.1940570027 0.4974299967 -0.3578850031
+0.3244679868 0.4794920087 -0.4129379988
+0.3121069968 0.4863280058 -0.4042440057
+0.3499029875 0.4863280058 -0.4075289965
+0.2322680056 0.4866369963 -0.3947109878
+0.2729009986 0.4864119887 -0.4000180066
+0.2468899935 0.4798569977 -0.4054949880
+0.3303619921 0.4951170087 -0.3920080066
+0.3005959988 0.4914549887 -0.3954249918
+0.2901470065 0.4951170087 -0.3865630031
+0.1028359979 0.4882909954 -0.3714390099
+0.0744784027 0.4830250144 -0.3778139949
+0.1620070040 0.4953770041 -0.3609769940
+0.1318310052 0.4923830032 -0.3657070100
+0.1631830037 0.4810340106 -0.3939740062
+0.1470550001 0.4875899851 -0.3804750144
+0.1902720034 0.4870289862 -0.3882200122
+0.2059810013 0.4952600002 -0.3712910116
+0.2487419993 0.4951730072 -0.3797959983
+0.2186370045 0.4917069972 -0.3833859861
+0.3007409871 0.4708150029 -0.4189049900
+0.2577869892 0.4472700059 -0.4319089949
+0.2785669863 0.4601370096 -0.4252800047
+0.2622919977 0.4711239934 -0.4156549871
+0.2221010029 0.4716849923 -0.4115320146
+0.2022369951 0.3932340145 -0.4517990053
+0.1534830034 0.4354470074 -0.4314740002
+0.1770920008 0.4160679877 -0.4421400130
+0.2197789997 0.4140770137 -0.4453209937
+0.2382429987 0.4319980145 -0.4386410117
+0.0921041965 0.4750210047 -0.3930589855
+0.1802320033 0.4725260139 -0.4064320028
+0.1368259937 0.4736469984 -0.4002859890
+0.1110439971 0.4646520019 -0.4070059955
+0.1314730048 0.4515599906 -0.4197809994
+0.1983750015 0.4617080092 -0.4179750085
+0.2177069932 0.4482800066 -0.4286929965
+0.1755550057 0.4497100115 -0.4246740043
+-0.3961850107 0.4276709855 -0.1448689997
+-0.3569239974 0.4441939890 -0.1333290040
+-0.2830930054 0.4629609883 -0.0658176020
+-0.3196069896 0.4543910027 -0.0981789008
+-0.3204840124 0.4525969923 -0.0668293014
+-0.3151899874 0.4577240050 -0.1257559955
+-0.2733049989 0.4680100083 -0.1234040037
+-0.1320479959 0.4832729995 0.0459529012
+-0.1713619977 0.4801580012 0.0201670006
+-0.1696379930 0.4807780087 0.0534440018
+-0.1686429977 0.4802680016 -0.0452494994
+-0.1711400002 0.4799300134 -0.0128162997
+-0.1326120049 0.4821450114 -0.0206170995
+-0.2465880066 0.4698159993 -0.0023214000
+-0.2093160003 0.4758639932 -0.0067392802
+-0.2463479936 0.4702070057 -0.0351894014
+-0.1466709971 0.4851070046 -0.1373320073
+-0.1042369977 0.4874309897 -0.1474770010
+-0.2310149968 0.4758499861 -0.1246559992
+-0.1888709962 0.4813750088 -0.1295769960
+-0.1233419999 0.4835309982 -0.0855474025
+-0.1563259959 0.4828999937 -0.1076560020
+-0.1637050062 0.4812569916 -0.0769193992
+-0.2388390005 0.4730490148 -0.0968710035
+-0.2439499944 0.4711680114 -0.0669919997
+-0.2039700001 0.4772230089 -0.0706710964
+0.2486509979 0.4858199954 0.2335879952
+0.1948820055 0.4851759970 0.2105789930
+0.2269829959 0.4938769937 0.2455700040
+0.1437280029 0.4693579972 0.1405860037
+0.1660100073 0.4766620100 0.1749659926
+0.1832990050 0.4653289914 0.1615570039
+0.1066420004 0.4905290008 0.1959089935
+0.1403419971 0.4850710034 0.1865250021
+0.0895773992 0.4856410027 0.1635210067
+0.1017889977 0.4522509873 0.0036683399
+0.1055520028 0.4545069933 0.0384272002
+0.1275510043 0.4424749911 0.0273266006
+0.0519649014 0.4729920030 0.0621169992
+0.0803134963 0.4646869898 0.0502124988
+0.0466317013 0.4705219865 0.0276906993
+0.1453499943 0.4509890079 0.0943453982
+0.1135270000 0.4581319988 0.0725174025
+0.1259659976 0.4630739987 0.1063570008
+-0.0861375034 0.4869689941 0.1038549989
+-0.0488157012 0.4864110053 0.0947066993
+-0.0911358967 0.4853579998 0.0708310977
+0.0408234000 0.4861919880 0.1405249983
+-0.0049985698 0.4865910113 0.1177970022
+0.0046014502 0.4894379973 0.1502140015
+-0.0186011996 0.4816229939 0.0509403013
+-0.0130005004 0.4838789999 0.0846268013
+0.0207447000 0.4793980122 0.0736960992
+0.0739772022 0.4808070064 0.1301050037
+0.1024739966 0.4730930030 0.1186079979
+0.0611719005 0.4764840007 0.0962247998
+0.2044160068 0.4813089967 -0.2713139951
+0.2494830042 0.4784080088 -0.2924950123
+0.1121720001 0.4846619964 -0.2276629955
+0.1571879983 0.4827530086 -0.2482510060
+0.1845670044 0.4559299946 -0.1973209977
+0.1743630022 0.4713450074 -0.2259899974
+0.1507270038 0.4639329910 -0.1840399951
+-0.0614192002 0.4885909855 -0.1599610001
+-0.0185630005 0.4886130095 -0.1744610071
+0.0368487015 0.4790869951 -0.1367969960
+0.0097978404 0.4846580029 -0.1564680040
+-0.0023166700 0.4821789861 -0.1221209988
+0.0242977999 0.4876999855 -0.1904889941
+0.0675842017 0.4862119853 -0.2080550045
+0.1278830022 0.4402190149 -0.0428464003
+0.1079640016 0.4522509873 -0.0682782978
+0.1025929973 0.4514989853 -0.0319567993
+0.1315149963 0.4581860006 -0.1436010003
+0.1175310016 0.4544259906 -0.1053289995
+0.1463010013 0.4442749918 -0.1164209992
+0.0528586991 0.4698149860 -0.0791992992
+0.0860923976 0.4628399909 -0.0925685018
+0.0623432994 0.4718149900 -0.1154659986
+0.1139210016 0.4700970054 -0.1685509980
+0.0925472975 0.4794389904 -0.1900669932
+0.0756698996 0.4750500023 -0.1524489969
+-0.0731761009 0.4862709939 -0.1283729970
+-0.0896743983 0.4832290113 -0.0632627979
+-0.0827047005 0.4844259918 -0.0961119980
+-0.0422471985 0.4839670062 -0.1084109992
+-0.0117543004 0.4803450108 -0.0875303000
+-0.0944022983 0.4839609861 0.0373294987
+-0.0215250999 0.4800119996 0.0166465994
+-0.0573735982 0.4828659892 0.0275337994
+-0.0954404026 0.4830400050 0.0036496699
+-0.0939195976 0.4827669859 -0.0299522001
+0.0749318972 0.4611420035 -0.0199366007
+0.0180565007 0.4753200114 -0.0657479987
+0.0469959006 0.4688900113 -0.0431591012
+0.0449201986 0.4691250026 -0.0074724299
+0.0126884999 0.4754230082 0.0048701302
+-0.0181843005 0.4793289900 -0.0527803004
+-0.0556252003 0.4818199873 -0.0407406017
+-0.0214412007 0.4792180061 -0.0179980006
+-0.3893499970 0.4264830053 -0.1089209989
+-0.3763810098 0.4253329933 -0.0352527983
+-0.3821110129 0.4260460138 -0.0716032982
+-0.3537999988 0.4403269887 -0.0687728971
+-0.3183740079 0.4519909918 -0.0325657986
+-0.3648490012 0.4121159911 0.1008760035
+-0.3657549918 0.4178889990 0.0683254972
+-0.3088400066 0.4491750002 0.0709360987
+-0.3386299908 0.4349290133 0.0709047988
+-0.3066160083 0.4462760091 0.1041060016
+-0.3679879904 0.4217079878 0.0348671004
+-0.3714709878 0.4240500033 0.0003940890
+-0.2066220045 0.4763419926 0.0598675013
+-0.1664659977 0.4815300107 0.0867154002
+-0.2820389867 0.4617780149 0.0007558560
+-0.2450010031 0.4698199928 0.0313555002
+-0.2395630032 0.4690490067 0.0983896032
+-0.2424570024 0.4697279930 0.0650826022
+-0.2766669989 0.4607290030 0.0688707978
+-0.3151940107 0.4515469968 0.0022740299
+-0.3451200128 0.4390160143 0.0022780099
+-0.3118140101 0.4507710040 0.0369313993
+-0.4274219871 0.2478380054 0.3346840143
+-0.4130989909 0.2821910083 0.3062829971
+-0.3186529875 0.3670920134 0.3094539940
+-0.3646019995 0.3289220035 0.3090229928
+-0.3216629922 0.3478659987 0.3343819976
+-0.3980740011 0.3145740032 0.2780480087
+-0.3870790005 0.3404819965 0.2501539886
+-0.1401139945 0.4625340104 0.2924950123
+-0.1846490055 0.4458560050 0.2987830043
+-0.1361760050 0.4552409947 0.3161630034
+-0.2704519928 0.4259150028 0.2546969950
+-0.2295179963 0.4360400140 0.2783469856
+-0.2301470041 0.4454509914 0.2514939904
+-0.2271659970 0.4132330120 0.3279620111
+-0.2288189977 0.4250749946 0.3038710058
+-0.2731379867 0.3993059993 0.3074800074
+-0.3680619895 0.3929949999 0.1632599980
+-0.3656069934 0.4038490057 0.1325719953
+-0.3781259954 0.3623130023 0.2217430025
+-0.3720979989 0.3793900013 0.1929180026
+-0.3055840135 0.4262410104 0.1984740049
+-0.3397710025 0.4045870006 0.1972489953
+-0.3072380126 0.4154739976 0.2276999950
+-0.3493629992 0.3732849956 0.2546760142
+-0.3143329918 0.3855719864 0.2832190096
+-0.3102329969 0.4019249976 0.2559329867
+0.1821610034 0.4963229895 0.2482080013
+0.2462799996 0.4987109900 0.2706820071
+0.0664988980 0.4932279885 0.2034649998
+0.1218079999 0.4944500029 0.2254150063
+0.1435150057 0.4980979860 0.2735610008
+0.1341100037 0.4970040023 0.2513509989
+0.0871289000 0.4966369867 0.2566449940
+-0.1242939979 0.4855290055 0.1121120006
+-0.0802104026 0.4884729981 0.1361649930
+-0.0676714033 0.4897669852 0.1974460036
+-0.0739244968 0.4894979894 0.1674479991
+-0.1139610037 0.4862079918 0.1753190011
+-0.0341253988 0.4905200005 0.1590909958
+0.0144686997 0.4919619858 0.1813150048
+-0.0445764996 0.4809570014 0.3012309968
+-0.0503493994 0.4846430123 0.2779200077
+-0.0952315032 0.4754169881 0.2854169905
+0.0403933004 0.4946390092 0.2629390061
+-0.0052612000 0.4908429980 0.2702670097
+0.0476928018 0.4935890138 0.2857399881
+-0.1041800007 0.4830850065 0.2335000038
+-0.0559380017 0.4873859882 0.2528110147
+-0.0616642013 0.4890939891 0.2259519994
+0.0328647010 0.4948090017 0.2380989939
+0.0242114998 0.4938859940 0.2108390033
+-0.0187879000 0.4925630093 0.2183240056
+-0.1624509990 0.4819250107 0.1195110008
+-0.2366629988 0.4673019946 0.1310950071
+-0.2000660002 0.4759179950 0.1259109974
+-0.1581649929 0.4815939963 0.1515190005
+-0.1539970040 0.4802570045 0.1824789941
+-0.3365510106 0.4242660105 0.1359940022
+-0.2696650028 0.4445500076 0.1971189976
+-0.3048639894 0.4349479973 0.1680559963
+-0.3052189946 0.4415960014 0.1365489960
+-0.2718290091 0.4559069872 0.1347649992
+-0.1434540004 0.4688209891 0.2672699988
+-0.1501629949 0.4777280092 0.2121859938
+-0.1466960013 0.4739159942 0.2404830009
+-0.1888010055 0.4614169896 0.2466060072
+-0.2309429944 0.4533289969 0.2232670039
+-0.1935569942 0.4714379907 0.1887090057
+-0.2341469973 0.4642080069 0.1629389971
+-0.2322289944 0.4595809877 0.1937139928
+-0.4170359969 0.2348130047 0.3633350134
+-0.3690969944 0.2860299945 0.3600499928
+-0.2499410063 0.3508050144 0.3958150148
+-0.3083519936 0.3218970001 0.3799560070
+-0.2910780013 0.3162719905 0.4007839859
+-0.3186300099 0.3323979974 0.3578250110
+-0.2706449926 0.3701510131 0.3546290100
+-0.0208563991 0.4177460074 0.4331290126
+-0.0779012963 0.4075999856 0.4267730117
+-0.0639189035 0.3985620141 0.4402700067
+-0.1037240028 0.4240959883 0.3954409957
+-0.0913690999 0.4160209894 0.4118019938
+-0.0467621014 0.4351400137 0.4040899873
+-0.1758379936 0.3679989874 0.4249829948
+-0.1347180009 0.3935090005 0.4186980128
+-0.1917330027 0.3749389946 0.4085600078
+-0.1307560056 0.4476209879 0.3381670117
+-0.0845409036 0.4639450014 0.3306710124
+-0.2230270058 0.4018940032 0.3503639996
+-0.1767469943 0.4272319973 0.3448249996
+-0.0686530992 0.4502919912 0.3699600101
+-0.1235790029 0.4398480058 0.3586559892
+-0.1145439968 0.4320079982 0.3777289987
+-0.2163020074 0.3911429942 0.3711769879
+-0.2057880014 0.3821890056 0.3905729949
+-0.1603319943 0.4093880057 0.3846130073
+0.4422270060 0.3632810116 0.4471459985
+0.3813680112 0.3834370077 0.4470779896
+0.3866859972 0.3594189882 0.4560199976
+0.3613089919 0.4244529903 0.4265289903
+0.3719539940 0.4053219855 0.4372259974
+0.4204199910 0.4111329913 0.4269379973
+0.2712030113 0.3929330111 0.4555990100
+0.3221629858 0.3993369937 0.4468460083
+0.2642410100 0.4112949967 0.4463259876
+0.3139030039 0.4761520028 0.3778760135
+0.3257319927 0.4666799903 0.3906590044
+0.3725590110 0.4707030058 0.3797839880
+0.2322359979 0.4553500116 0.4123559892
+0.2789730132 0.4616590142 0.4016009867
+0.2203640044 0.4659680128 0.3994149864
+0.3966310024 0.4462890029 0.4041379988
+0.3377169967 0.4550679922 0.4031159878
+0.3496469855 0.4410740137 0.4151149988
+0.0480903983 0.4122389853 0.4494140148
+0.0931968987 0.4261400104 0.4413839877
+0.0362748988 0.4239329994 0.4379180074
+0.2068579942 0.4197840095 0.4453659952
+0.1499789953 0.4247109890 0.4437879920
+0.1591639966 0.4099909961 0.4538969994
+0.1274089962 0.4492120147 0.4199559987
+0.1391440034 0.4378229976 0.4324310124
+0.1855749935 0.4474860132 0.4226990044
+0.2547909915 0.4279870093 0.4359410107
+0.3024390042 0.4350019991 0.4257920086
+0.2438730001 0.4427109957 0.4245750010
+0.2527379990 0.4995850027 0.2857620120
+0.3074229956 0.5000000000 0.2875489891
+0.1509159952 0.4979459941 0.2924250066
+0.2007430047 0.4990549982 0.2876850069
+0.3156349957 0.4990229905 0.3077569902
+0.2582150102 0.4993700087 0.2990019917
+0.2649149895 0.4984669983 0.3122020066
+-0.0381193012 0.4765149951 0.3227440119
+0.0083539104 0.4855729938 0.3145839870
+0.1190439984 0.4912320077 0.3346840143
+0.0630419999 0.4890489876 0.3256660104
+0.0718081966 0.4853380024 0.3437379897
+0.0550848991 0.4917539954 0.3064509928
+0.1024340019 0.4956749976 0.2988289893
+0.3499029875 0.4863280058 0.3549109995
+0.2916040123 0.4895069897 0.3517070115
+0.3024449944 0.4837299883 0.3648940027
+0.2726269960 0.4966309965 0.3252309859
+0.2815940082 0.4937259853 0.3384419978
+0.3303619921 0.4951170087 0.3305569887
+0.1861180067 0.4877949953 0.3571369946
+0.2335840017 0.4914479852 0.3474510014
+0.1759900004 0.4920380116 0.3418650031
+0.2153480053 0.4972749949 0.3184599876
+0.1585180014 0.4969500005 0.3097409904
+0.1667950004 0.4950270057 0.3261030018
+-0.0307337008 0.4711790085 0.3428150117
+-0.0122501003 0.4584349990 0.3791660070
+-0.0221442003 0.4651240110 0.3615880013
+0.0247275997 0.4767250121 0.3527809978
+0.0813992992 0.4804320037 0.3607789874
+0.0236479007 0.4340839982 0.4250389934
+0.1152570024 0.4589419961 0.4064930081
+0.0691376999 0.4477500021 0.4161129892
+0.0109818997 0.4430530071 0.4109059870
+-0.0011252100 0.4511089921 0.3956019878
+0.2553490102 0.4799950123 0.3753109872
+0.1389120072 0.4822140038 0.3670350015
+0.1969690025 0.4820530117 0.3717910051
+0.2084670067 0.4748080075 0.3858810067
+0.1617520005 0.4678800106 0.3963499963
+0.0919163004 0.4744139910 0.3768900037
+0.0451859012 0.4641270041 0.3864789903
+0.1032849997 0.4672810137 0.3921250105
+0.2096949965 -0.3420790136 -0.0960574001
+0.1827190071 -0.3219609857 -0.1170160025
+0.1878930032 -0.3550960124 -0.1244269982
+0.1643099934 -0.2536509931 -0.1093999967
+0.1741140038 -0.2876960039 -0.1125790030
+0.1867849976 -0.2721480131 -0.0899372995
+0.1321569979 -0.3096149862 -0.1512729973
+0.1558189988 -0.3001349866 -0.1330810040
+0.1294910014 -0.2778500021 -0.1454319954
+0.1176889986 -0.1238839999 -0.1018709987
+0.1296910048 -0.1546420008 -0.1033459976
+0.1355309933 -0.1399890035 -0.0862751976
+0.1074109972 -0.1796510071 -0.1326580048
+0.1202759966 -0.1678449959 -0.1188390031
+0.0981139988 -0.1480689943 -0.1287939996
+0.1617649943 -0.2042080015 -0.0872517973
+0.1416070014 -0.1867039949 -0.1050449982
+0.1531980038 -0.2197750062 -0.1070080027
+0.0262359008 -0.2156960070 -0.1679390073
+0.0503407009 -0.2079609931 -0.1625310034
+0.0240323003 -0.1842869967 -0.1618479937
+0.1029959992 -0.2548350096 -0.1543619931
+0.0766751990 -0.2315279990 -0.1600279957
+0.0789496005 -0.2631469965 -0.1656060070
+0.0662114024 -0.1677989960 -0.1492419988
+0.0721533969 -0.1995330006 -0.1546929926
+0.0912844017 -0.1901639998 -0.1446660012
+0.1237789989 -0.2450930029 -0.1406999975
+0.1405989975 -0.2334569991 -0.1248579994
+0.1161440015 -0.2121479958 -0.1365599930
+0.0597130992 0.0216750000 -0.0968519971
+0.0612369999 0.0252509005 -0.0957624018
+0.0486722998 0.0143176001 -0.0977737010
+0.0554790013 0.0179292001 -0.0974079967
+0.0706982985 0.0036424201 -0.0918660983
+0.0631700978 0.0109927999 -0.0974353999
+0.0686749965 -0.0037140001 -0.0979110003
+-0.0009078870 0.0011373000 -0.0972481966
+0.0144528002 0.0044068201 -0.0978633985
+0.0461799987 -0.0237360001 -0.1122049987
+0.0300249998 -0.0093410602 -0.1072850004
+0.0337878987 -0.0296771992 -0.1157459989
+0.0279757008 0.0076135299 -0.0980658978
+0.0394463986 0.0108740004 -0.0979873016
+0.1099980026 -0.0818646029 -0.0866952017
+0.0948669016 -0.0679086000 -0.0997859985
+0.1059259996 -0.0948216021 -0.1007089987
+0.0759693012 -0.0220293999 -0.0983992964
+0.0847899988 -0.0435294993 -0.0990272015
+0.0876559019 -0.0330669992 -0.0886472985
+0.0702937990 -0.0624708012 -0.1168999970
+0.0789444968 -0.0533358008 -0.1084389985
+0.0625983030 -0.0385018997 -0.1125890017
+0.0638078973 -0.0107722003 -0.1032669991
+0.0515218005 0.0002964590 -0.1031299978
+0.0562514998 -0.0174512994 -0.1080259979
+-0.1573339999 -0.0485487990 -0.0534554012
+-0.1374929994 -0.0378017984 -0.0652474016
+-0.0977962017 -0.0737325028 -0.1088239998
+-0.1185600013 -0.0549176000 -0.0885720029
+-0.1193730012 -0.0829430968 -0.1004310027
+-0.1170239970 -0.0288824998 -0.0746340007
+-0.0963072032 -0.0215109009 -0.0819313973
+-0.0019830100 -0.1607799977 -0.1578319967
+-0.0273697004 -0.1377419978 -0.1504829973
+-0.0256661996 -0.1684840024 -0.1580879986
+-0.0323855989 -0.0792308003 -0.1318639964
+-0.0297986008 -0.1078239977 -0.1417690068
+-0.0086615700 -0.1006340012 -0.1415610015
+-0.0747649968 -0.1236080006 -0.1354710013
+-0.0519463010 -0.1153960004 -0.1398359984
+-0.0755018964 -0.0939778015 -0.1259319931
+-0.0361782983 -0.0060526198 -0.0942573994
+-0.0178704001 -0.0022987199 -0.0961031020
+-0.0757045969 -0.0154184001 -0.0874428973
+-0.0555555001 -0.0103476001 -0.0914589986
+-0.0152009996 -0.0465961993 -0.1211799979
+-0.0360165015 -0.0279024001 -0.1081800014
+-0.0346136987 -0.0524388999 -0.1206919998
+-0.0764632970 -0.0394175984 -0.1019920036
+-0.0762403011 -0.0657553971 -0.1147980019
+-0.0550662987 -0.0587433986 -0.1186570004
+0.0203792993 -0.1531209946 -0.1551319957
+0.0593824983 -0.1367920041 -0.1434790045
+0.0409643985 -0.1452080011 -0.1502660066
+0.0158948991 -0.1227189973 -0.1477060020
+0.0111464001 -0.0935804024 -0.1394910067
+0.0987387970 -0.1067640036 -0.1134750023
+0.0590322986 -0.0709851980 -0.1243520007
+0.0790638998 -0.0890128985 -0.1209900007
+0.0884928033 -0.1176970005 -0.1249310002
+0.0753107965 -0.1276720017 -0.1349769980
+0.0002330190 -0.0184041001 -0.1093550026
+0.0066507501 -0.0661830008 -0.1304090023
+0.0028743499 -0.0409804992 -0.1203870028
+0.0192894004 -0.0353913009 -0.1185180023
+0.0389956012 -0.0530102998 -0.1235280037
+0.0292355996 -0.0864131972 -0.1358000040
+0.0522340983 -0.1070099995 -0.1373230070
+0.0452830009 -0.0789318979 -0.1306969970
+0.1053149998 0.0177401993 0.2780880034
+0.1129710004 0.0240829997 0.3097040057
+0.0935257003 0.0090371501 0.2102629989
+0.0988956019 0.0127739999 0.2447330058
+0.1460880041 -0.0301782005 0.2708280087
+0.1224929988 -0.0077068899 0.2587490082
+0.1391489953 -0.0344563015 0.2374480069
+0.0792772993 0.0041099698 0.0726592988
+0.0820474029 0.0040181801 0.1059499979
+0.1218580008 -0.0387060009 0.1331419945
+0.1016390026 -0.0160004999 0.1202879995
+0.1167360023 -0.0376240015 0.0988641977
+0.0852546990 0.0047585499 0.1403219998
+0.0890320018 0.0064016301 0.1752710044
+0.2045049965 -0.1474269927 0.1728570014
+0.1840009987 -0.1185159981 0.1642269939
+0.1964599937 -0.1466809958 0.1373959929
+0.1550980061 -0.0620868988 0.2144439965
+0.1701270044 -0.0902191028 0.1899680048
+0.1771630049 -0.0883599967 0.2245939970
+0.1563899964 -0.0890984982 0.1199870035
+0.1632560045 -0.0904290006 0.1549119949
+0.1424710006 -0.0636669025 0.1446260065
+0.1329119951 -0.0372214988 0.2029819936
+0.1108160019 -0.0142406002 0.1899819970
+0.1272010058 -0.0386018008 0.1680260003
+0.0637260973 0.0216750000 -0.0889907032
+0.0777136981 -0.0037140001 -0.0808210969
+0.0697401986 0.0109927999 -0.0847889036
+0.0660545006 0.0179597009 -0.0769428015
+0.0682561025 0.0144701004 -0.0603896007
+0.1239529997 -0.0948216021 -0.0692635030
+0.1107800007 -0.0679086000 -0.0714168027
+0.1035559997 -0.0381661989 -0.0385475010
+0.1085449979 -0.0532441996 -0.0552468002
+0.1178449988 -0.0620739982 -0.0326894000
+0.0985001028 -0.0435294993 -0.0740759969
+0.0873880014 -0.0220293999 -0.0772077963
+0.0745844021 0.0065430501 0.0112554003
+0.0768252984 0.0049825199 0.0409234017
+0.0703729987 0.0113316998 -0.0398389995
+0.0724603012 0.0086816400 -0.0158209000
+0.1014769971 -0.0279987007 0.0049510798
+0.0863336027 -0.0079677701 -0.0049598301
+0.0960704014 -0.0229730997 -0.0216713008
+0.0784960985 0.0005100830 -0.0525011010
+0.0842501000 -0.0107111996 -0.0650713965
+0.0903505981 -0.0171766002 -0.0451781005
+0.2354139984 -0.3550960124 -0.0647829026
+0.2208919972 -0.3219609857 -0.0657711998
+0.2285619974 -0.2770259976 -0.0059363302
+0.2267200053 -0.2999210060 -0.0354797989
+0.2444680035 -0.3087300062 -0.0010229800
+0.2075279951 -0.2876960039 -0.0652887970
+0.1940200031 -0.2536509931 -0.0652595013
+0.2072210014 -0.1744599938 0.1096249968
+0.2160370052 -0.2015520036 0.0812555030
+0.2260369956 -0.2050140053 0.1170340031
+0.1935279965 -0.1884849966 0.0141783999
+0.2052350044 -0.1960240006 0.0467540994
+0.1875180006 -0.1645949930 0.0410351008
+0.2401639968 -0.2590270042 0.0589734018
+0.2227589935 -0.2277130038 0.0525512993
+0.2270859927 -0.2528519928 0.0235498007
+0.1519239992 -0.1546420008 -0.0665291026
+0.1377419978 -0.1238839999 -0.0676911995
+0.1802610010 -0.2197750062 -0.0652107000
+0.1661770046 -0.1867039949 -0.0656893030
+0.1646430045 -0.1474889964 -0.0194374006
+0.1669809967 -0.1676920056 -0.0429419987
+0.1808129996 -0.1790100038 -0.0158911999
+0.1972039938 -0.2332739979 -0.0392987989
+0.2127770036 -0.2443300039 -0.0095410896
+0.1968850046 -0.2114460021 -0.0126770996
+0.1880439967 -0.1441480070 0.1021559983
+0.1493819952 -0.0863171965 0.0857293978
+0.1686969995 -0.1146010011 0.0942865014
+0.1791560054 -0.1398669928 0.0678552017
+0.1696919948 -0.1338929981 0.0351402983
+0.0937931985 -0.0137043996 0.0539386012
+0.1176230013 -0.0510266982 0.0138317002
+0.1066519991 -0.0321868993 0.0342224017
+0.1117020026 -0.0354263000 0.0656976029
+0.1303099990 -0.0597742982 0.0762566999
+0.1367879957 -0.1066420004 -0.0480207987
+0.1595479995 -0.1262989938 0.0045921998
+0.1486160010 -0.1171780005 -0.0232765004
+0.1329430044 -0.0885552019 -0.0276369005
+0.1264690012 -0.0699170008 -0.0069019701
+0.1519580036 -0.1044159979 0.0287841000
+0.1421300024 -0.0821406990 0.0527862012
+0.1345279962 -0.0766431019 0.0217381995
+-0.3279069960 -0.2990080118 0.3472949862
+-0.3217529953 -0.2969650030 0.3246920109
+-0.3240279853 -0.2800869942 0.3472949862
+-0.3178800046 -0.3262459934 0.2720220089
+-0.3198649883 -0.3122540116 0.2996239960
+-0.3251729906 -0.3309409916 0.3001379967
+-0.3124090135 -0.2642720044 0.3010089993
+-0.3156560063 -0.2899299860 0.2998329997
+-0.3093859851 -0.2794109881 0.2728219926
+-0.3059160113 -0.3703249991 0.1463740021
+-0.3097620010 -0.3608329892 0.1792600006
+-0.3163749874 -0.3797340095 0.1784300059
+-0.2991299927 -0.3155750036 0.1805579960
+-0.3040249944 -0.3393999934 0.1798850000
+-0.2945779860 -0.3255920112 0.1480720043
+-0.3216539919 -0.3577359915 0.2424640059
+-0.3129850030 -0.3503749967 0.2114659995
+-0.3156610131 -0.3388479948 0.2425529957
+-0.2854549885 -0.2019920051 0.1886409968
+-0.2883619964 -0.2323600054 0.1853329986
+-0.2801479995 -0.2132440060 0.1555960029
+-0.3028630018 -0.2658540010 0.2444639951
+-0.2958909869 -0.2500379980 0.2151129991
+-0.2998679876 -0.2370889932 0.2464639992
+-0.2863540053 -0.2724240124 0.1504949927
+-0.2914600074 -0.2617110014 0.1830399930
+-0.2949869931 -0.2895779908 0.1815280020
+-0.3063479960 -0.2927460074 0.2432309985
+-0.3105680048 -0.3171780109 0.2426750064
+-0.3030039966 -0.3046959937 0.2123930007
+-0.2532759905 -0.4285899997 -0.0940567032
+-0.2606250048 -0.4222880006 -0.0708651021
+-0.2697359920 -0.4361580014 -0.0726943985
+-0.2418289930 -0.3866879940 -0.0683225989
+-0.2510820031 -0.4058020115 -0.0696661025
+-0.2324550003 -0.3958970010 -0.0934510008
+-0.2849220037 -0.4258430004 -0.0182524994
+-0.2685250044 -0.4159660041 -0.0444860011
+-0.2762350142 -0.4092960060 -0.0155667998
+-0.2134680003 -0.2884269953 -0.0610787012
+-0.2189970016 -0.3158249855 -0.0633492023
+-0.1997230053 -0.3015849888 -0.0867187008
+-0.2533070147 -0.3458549976 -0.0102481004
+-0.2368150055 -0.3307330012 -0.0377365984
+-0.2473219931 -0.3205049932 -0.0085452003
+-0.2139649987 -0.3529529870 -0.0908436030
+-0.2256139964 -0.3415099978 -0.0652925968
+-0.2332790047 -0.3652180135 -0.0669490024
+-0.3087300062 -0.3977580070 0.1115669981
+-0.2961739898 -0.3872539997 0.0799921006
+-0.3013870120 -0.3790509999 0.1131950021
+-0.2835499942 -0.4023480117 0.0150976004
+-0.2902239859 -0.3950060010 0.0471373014
+-0.2982079983 -0.4130139947 0.0447615013
+-0.2762629986 -0.3521710038 0.0504576005
+-0.2828469872 -0.3746849895 0.0489518009
+-0.2686049938 -0.3606880009 0.0187619999
+-0.2679120004 -0.3904060125 -0.0135591999
+-0.2512010038 -0.3778469861 -0.0410219990
+-0.2602080107 -0.3692199886 -0.0118706003
+-0.1904020011 -0.0485487990 -0.0097053200
+-0.1935539991 -0.0765516981 -0.0216681994
+-0.1761430055 -0.0614150017 -0.0389290005
+-0.2243179977 -0.1120639965 0.0202354994
+-0.2095990032 -0.0935652032 -0.0018714500
+-0.2211810052 -0.0825434998 0.0296899006
+-0.1802199930 -0.1204020008 -0.0587694012
+-0.1959449947 -0.1061030030 -0.0314473994
+-0.1979870051 -0.1366689950 -0.0393872000
+-0.2710990012 -0.1931349933 0.1262869984
+-0.2610769868 -0.1725780070 0.0977471992
+-0.2681429982 -0.1623560041 0.1313290000
+-0.2429929972 -0.1933649927 0.0327700004
+-0.2527239919 -0.1828079969 0.0647995025
+-0.2554329932 -0.2136030048 0.0605566986
+-0.2469329983 -0.1215140000 0.0774499997
+-0.2499909997 -0.1519570053 0.0703393966
+-0.2377620041 -0.1316570044 0.0443993993
+-0.1900549978 -0.2439250052 -0.0807564035
+-0.2053000033 -0.2296209931 -0.0550849997
+-0.2089470029 -0.2595919967 -0.0584052987
+-0.2000360042 -0.1677470058 -0.0457968004
+-0.2023919970 -0.1988749951 -0.0509499013
+-0.1840569973 -0.1824789941 -0.0719818026
+-0.2347149998 -0.2351039946 -0.0017236500
+-0.2192579955 -0.2165459991 -0.0274369009
+-0.2318380028 -0.2045300007 0.0019349800
+-0.2143359929 -0.1545110047 -0.0174965002
+-0.2269109935 -0.1425620019 0.0126584005
+-0.2293179929 -0.1735389978 0.0066495100
+-0.2739480138 -0.2237509936 0.1225100011
+-0.2804250121 -0.2823840082 0.1178250015
+-0.2769779861 -0.2536570132 0.1197670028
+-0.2667160034 -0.2338670045 0.0896740034
+-0.2583610117 -0.2439109981 0.0573723987
+-0.2948960066 -0.3580619991 0.1143790036
+-0.2705850005 -0.3276570141 0.0518012010
+-0.2831679881 -0.3436270058 0.0827495977
+-0.2892720103 -0.3348490000 0.1153770015
+-0.2844780087 -0.3095490038 0.1164430007
+-0.2263190001 -0.2762320042 -0.0336005986
+-0.2488349974 -0.2541629970 0.0258817002
+-0.2381390035 -0.2648679912 -0.0045295199
+-0.2422959954 -0.2934350073 -0.0067219902
+-0.2570059896 -0.3107439876 0.0218633991
+-0.2617450058 -0.2732650042 0.0550120994
+-0.2735809982 -0.2919099927 0.0853129998
+-0.2657740116 -0.3012819886 0.0532363988
+0.5000000000 0.0085928300 0.2875489891
+0.4925659895 -0.0026865101 0.2774170041
+0.4915040135 0.0271864999 0.2697750032
+0.4944779873 -0.0625203997 0.2949549854
+0.4935570061 -0.0327255987 0.2858529985
+0.5000000000 -0.0541414991 0.3077569902
+0.4776799977 0.0062123402 0.2481279969
+0.4861409962 -0.0124351000 0.2659710050
+0.4806889892 -0.0207065996 0.2530300021
+0.4974510074 -0.1710550040 0.3354189992
+0.4968140125 -0.1463389993 0.3249529898
+0.5000000000 -0.1671880037 0.3549109995
+0.4884420037 -0.1021080017 0.2706379890
+0.4929729998 -0.1244909987 0.2968789935
+0.4906010032 -0.1280889958 0.2770420015
+0.5000000000 -0.1138290018 0.3305569887
+0.4961059988 -0.1197369993 0.3146339953
+0.4953269958 -0.0916609988 0.3045920134
+0.4620859921 -0.0174474008 0.1841650009
+0.4700869918 -0.0367931016 0.2029059976
+0.4685289860 -0.0391563997 0.1814800054
+0.4761930108 -0.0275279004 0.2383790016
+0.4726530015 -0.0328989998 0.2217649966
+0.4678739905 -0.0086656399 0.2202599943
+0.4811489880 -0.0827426985 0.2256830037
+0.4770779908 -0.0577281006 0.2236160040
+0.4831669927 -0.0796812028 0.2462110072
+0.4834859967 -0.0480064005 0.2585020065
+0.4898400009 -0.0695566013 0.2805790007
+0.4860700071 -0.0752767995 0.2644149959
+0.4982979894 -0.2683210075 0.3961479962
+0.4991149902 -0.2649030089 0.3960489929
+0.5000000000 -0.2517189980 0.4471459985
+0.4980669916 -0.2653079927 0.3075419962
+0.4985190034 -0.2689119875 0.3498120010
+0.4975309968 -0.2789900005 0.3040960133
+0.5000000000 -0.2564849854 0.4269379973
+0.4993189871 -0.2614459991 0.3907220066
+0.4993279874 -0.2544539869 0.3837069869
+0.4955059886 -0.2037999928 0.1601929963
+0.4963240027 -0.2244729996 0.1948110014
+0.4964750111 -0.2271389961 0.1531900018
+0.4963600039 -0.2198199928 0.2685849965
+0.4962550104 -0.2220470011 0.2332900017
+0.4949699938 -0.2009429932 0.2340950072
+0.4971449971 -0.2618899941 0.2250220031
+0.4970130026 -0.2421730012 0.2305610031
+0.4975729883 -0.2561770082 0.2678889930
+0.5000000000 -0.2109380066 0.3797839880
+0.4984889925 -0.2134380043 0.3561019897
+0.4980179965 -0.1934770048 0.3459019959
+0.4991439879 -0.2443359941 0.3751339912
+0.4988639951 -0.2305279970 0.3658890128
+0.5000000000 -0.2417970002 0.4041379988
+0.4956189990 -0.1977889985 0.2956990004
+0.4974119961 -0.2156399935 0.3298400044
+0.4967220128 -0.2177200019 0.3007310033
+0.4985199869 -0.2472469956 0.3430599868
+0.4980199933 -0.2511579990 0.3073500097
+0.4975390136 -0.2354840040 0.3047839999
+0.4857690036 0.0199110992 -0.0932663977
+0.4876810014 -0.0097763799 -0.0643775016
+0.4951150119 0.0012881100 -0.1174819991
+0.4762290120 -0.0272055995 0.0268424004
+0.4811140001 -0.0196860991 -0.0158233996
+0.4709540009 -0.0031870999 0.0036454899
+0.4934949875 -0.0646834970 -0.0463895015
+0.4886359870 -0.0402401984 -0.0324015990
+0.4899320006 -0.0699862987 -0.0010689300
+0.4680339992 -0.0399083011 0.1571349949
+0.4685289860 -0.0391563997 0.1297580004
+0.4605990052 -0.0197033007 0.1372900009
+0.4816319942 -0.0822689980 0.1156269982
+0.4755679965 -0.0600717999 0.1225629970
+0.4803699851 -0.0840805992 0.1475570053
+0.4632720053 -0.0153794996 0.0783369020
+0.4699630141 -0.0369273014 0.0992878973
+0.4724409878 -0.0330600999 0.0652675033
+0.4955059886 -0.1805180013 0.0850313976
+0.4935860038 -0.1548539996 0.0939325988
+0.4946169853 -0.1804209948 0.1265610009
+0.4910840094 -0.0993904993 0.0306307003
+0.4923770130 -0.1277209967 0.0620937012
+0.4942620099 -0.1253769994 0.0196074005
+0.4892959893 -0.1313609928 0.1381669939
+0.4906510115 -0.1298229992 0.1016680002
+0.4866679907 -0.1055750027 0.1087620035
+0.4865449965 -0.0750204995 0.0413052998
+0.4803229868 -0.0528549999 0.0527506992
+0.4837079942 -0.0792222023 0.0802585036
+0.4744760096 -0.0616757981 0.1789160073
+0.4848659933 -0.1075330004 0.2278359979
+0.4800519943 -0.0844077021 0.2025119960
+0.4798159897 -0.0848179013 0.1765069962
+0.4844639897 -0.1084019989 0.1741770059
+0.4955399930 -0.1739560068 0.3138360083
+0.4934720099 -0.1776620001 0.2630960047
+0.4942289889 -0.1760990024 0.2898170054
+0.4925479889 -0.1528110057 0.2834979892
+0.4890080094 -0.1305059940 0.2548370063
+0.4938690066 -0.1801079959 0.1652130038
+0.4883669913 -0.1322540045 0.1717370003
+0.4914999902 -0.1562090069 0.1688860059
+0.4933679998 -0.1795759946 0.2008679956
+0.4932079911 -0.1787849963 0.2334840000
+0.4879559875 -0.1324640065 0.2023359984
+0.4881460071 -0.1319169998 0.2299980074
+0.4909349978 -0.1557230055 0.2319809943
+0.2571449876 -0.3827959895 -0.0541872010
+0.2599839866 -0.3609209955 -0.0237057004
+0.2979870141 -0.3665739894 0.0614476018
+0.2809810042 -0.3644169867 0.0191396009
+0.3019680083 -0.3871650100 0.0351984017
+0.2617959976 -0.3380900025 0.0071227900
+0.2608050108 -0.3143120110 0.0370813012
+0.3412939906 -0.3605059981 0.2199829966
+0.3332369924 -0.3640869856 0.1827840060
+0.3497950137 -0.3816629946 0.1992219985
+0.2986850142 -0.3189530075 0.1550710052
+0.3161599934 -0.3429709971 0.1680749953
+0.3079339862 -0.3173010051 0.1927230060
+0.3308359981 -0.3871360123 0.1202580035
+0.3236930072 -0.3663040102 0.1437940001
+0.3121910095 -0.3671190143 0.1032890007
+0.2445659935 -0.2351749986 0.1249319986
+0.2353380024 -0.2063740045 0.1533749998
+0.2576789856 -0.2891600132 0.0668604001
+0.2521139979 -0.2628009915 0.0960815996
+0.2724699974 -0.2644659877 0.1709759980
+0.2628490031 -0.2645300031 0.1337060034
+0.2808960080 -0.2926230133 0.1436710060
+0.2753129900 -0.3176560104 0.0765276030
+0.2935020030 -0.3438239992 0.0886135995
+0.2879070044 -0.3191190064 0.1161480024
+0.3785820007 -0.3017530143 0.4170190096
+0.3746080101 -0.3091259897 0.4047589898
+0.3819560111 -0.3177250028 0.4100120068
+0.3542920053 -0.2743139863 0.3942779899
+0.3653869927 -0.2938860059 0.3996419907
+0.3610219955 -0.2661119998 0.4113340080
+0.3774569929 -0.3369210064 0.3775179982
+0.3708829880 -0.3175899982 0.3882800043
+0.3670150042 -0.3263390064 0.3679620028
+0.2936330140 -0.1727409959 0.3723810017
+0.3110989928 -0.2000599951 0.3779070079
+0.3032970130 -0.1635880023 0.3945130110
+0.3276669979 -0.2675240040 0.3424080014
+0.3192569911 -0.2348379940 0.3604460061
+0.3117989898 -0.2425000072 0.3346419930
+0.3355790079 -0.2177979946 0.4034210145
+0.3270969987 -0.2265120000 0.3834210038
+0.3415369987 -0.2514950037 0.3888989985
+0.3626239896 -0.3710600138 0.2698850036
+0.3537479937 -0.3497680128 0.2875440121
+0.3480669856 -0.3556819856 0.2550170124
+0.3630259931 -0.3348180056 0.3442789912
+0.3586559892 -0.3427529931 0.3173780143
+0.3712129891 -0.3556610048 0.3299500048
+0.3300890028 -0.3042879999 0.2948049903
+0.3449549973 -0.3252680004 0.3056910038
+0.3362520039 -0.2977679968 0.3240669966
+0.3552800119 -0.3104049861 0.3590100110
+0.3480989933 -0.2825300097 0.3739730120
+0.3421719968 -0.2904399931 0.3505200148
+0.1380569935 0.0046250899 0.3218379915
+0.1220640019 0.0319687985 0.3389280140
+0.1694689989 -0.0541631989 0.2811979949
+0.1539130062 -0.0242400002 0.3024989963
+0.1729719937 -0.0079950104 0.3591150045
+0.1628099978 -0.0167951006 0.3320420086
+0.1870200038 -0.0399810001 0.3407300115
+0.2245769948 -0.1766410023 0.1811459959
+0.2123380005 -0.1462790072 0.2079769969
+0.2280520052 -0.1389289945 0.2749730051
+0.2201279998 -0.1433950067 0.2421810031
+0.2406550050 -0.1716440022 0.2502950132
+0.1989050061 -0.1155410036 0.2337190062
+0.1845359951 -0.0847235024 0.2581939995
+0.2648940086 -0.1082980037 0.3847999871
+0.2545109987 -0.1175730005 0.3610740006
+0.2747519910 -0.1450629979 0.3668270111
+0.2104900032 -0.0646964982 0.3482629955
+0.2330420017 -0.0906656981 0.3549570143
+0.2210599929 -0.0554862991 0.3735710084
+0.2568669915 -0.1607140005 0.3131000102
+0.2450470030 -0.1258679926 0.3347229958
+0.2362949997 -0.1330370009 0.3059340119
+0.2010120004 -0.0727393031 0.3204089999
+0.1924249977 -0.0794653967 0.2902719975
+0.2147600055 -0.1058479995 0.2984130085
+0.2440380007 -0.2058819979 0.1894059926
+0.2812620103 -0.2627530098 0.2073190063
+0.2629300058 -0.2347390056 0.1980250031
+0.2523069978 -0.2036969960 0.2245540023
+0.2603200078 -0.1999740005 0.2583230138
+0.3325180113 -0.3365029991 0.2413160056
+0.3140900135 -0.2806540132 0.2846870124
+0.3234480023 -0.3098169863 0.2629710138
+0.3161270022 -0.3142049909 0.2288299948
+0.2990129888 -0.2894240022 0.2175299972
+0.2847149968 -0.1811019927 0.3475480080
+0.2682630122 -0.1948670000 0.2902930081
+0.2763279974 -0.1885260046 0.3201229870
+0.2946569920 -0.2159709930 0.3272469938
+0.3044750094 -0.2492710054 0.3062019944
+0.2791349888 -0.2279279977 0.2665809989
+0.2894029915 -0.2595480084 0.2422370017
+0.2970759869 -0.2550030053 0.2753120065
+-0.2021960020 -0.0377090015 0.0219109003
+-0.2194209993 -0.0198519994 0.0897852033
+-0.2117879987 -0.0283163004 0.0552758984
+-0.2170889974 -0.0545369983 0.0413658991
+-0.2307370007 -0.0727571025 0.0629602000
+-0.2346190065 0.0129830996 0.2285699993
+-0.2327409983 0.0042525898 0.1947319955
+-0.2496030033 -0.0459242985 0.1671810001
+-0.2420060039 -0.0200038999 0.1801570058
+-0.2533159852 -0.0364955999 0.2016409934
+-0.2296990007 -0.0039352700 0.1600179970
+-0.2253230065 -0.0118576000 0.1248740032
+-0.2647800148 -0.1318800002 0.1379079968
+-0.2740620077 -0.1517869979 0.1652520001
+-0.2431939989 -0.0919795036 0.0864405036
+-0.2545180023 -0.1118159965 0.1115259975
+-0.2658129930 -0.0919788033 0.1805350035
+-0.2607420087 -0.1021030024 0.1460630000
+-0.2557669878 -0.0733606964 0.1558160037
+-0.2385119945 -0.0636873022 0.0973351970
+-0.2326370031 -0.0369100012 0.1101469994
+-0.2447309941 -0.0548757017 0.1322499961
+-0.2136150002 0.1198880002 0.4279200137
+-0.2205320001 0.1028489992 0.4122610092
+-0.2511279881 0.0625671968 0.3985460103
+-0.2364300042 0.0837711021 0.4053680003
+-0.2454929948 0.0830816999 0.4172880054
+-0.2254679948 0.0868123993 0.3936469853
+-0.2293760031 0.0715825036 0.3720659912
+-0.2943960130 -0.0414292999 0.3751589954
+-0.2859579921 -0.0128161004 0.3802849948
+-0.2939909995 -0.0175377000 0.3971070051
+-0.2683860064 0.0018401101 0.3447290063
+-0.2775079906 -0.0062847999 0.3626979887
+-0.2779119909 -0.0247577000 0.3369840086
+-0.2727859914 0.0368425995 0.4065650105
+-0.2759020030 0.0142201995 0.3859359920
+-0.2642430067 0.0394258983 0.3920609951
+-0.2353229970 0.0329659991 0.2920590043
+-0.2354879975 0.0224728007 0.2611260116
+-0.2321809977 0.0575561002 0.3478260040
+-0.2341939956 0.0446477011 0.3210589886
+-0.2586419880 -0.0026497301 0.2980619967
+-0.2474009991 0.0217898991 0.3090789914
+-0.2583959997 0.0112993000 0.3267419934
+-0.2442100048 0.0499784015 0.3623009920
+-0.2548519969 0.0438341014 0.3771600127
+-0.2571710050 0.0267731994 0.3531810045
+-0.3218359947 -0.2555190027 0.3499850035
+-0.3279069960 -0.2617770135 0.3686580062
+-0.3098790050 -0.2358659953 0.3032419980
+-0.3159030080 -0.2470400035 0.3278599977
+-0.3245779872 -0.2056159973 0.3762809932
+-0.3199679852 -0.2275689989 0.3530650139
+-0.3178130090 -0.1973499954 0.3561199903
+-0.2824530005 -0.1711550057 0.1931940019
+-0.2900899947 -0.1896799952 0.2213920057
+-0.2979870141 -0.1606920063 0.2842800021
+-0.2942309976 -0.1760070026 0.2534080148
+-0.2908700109 -0.1449829936 0.2582969964
+-0.2971250117 -0.2069180012 0.2494640052
+-0.3036859930 -0.2224459946 0.2769350111
+-0.3090110123 -0.0780306980 0.3893190026
+-0.3070389926 -0.1023570001 0.3664430082
+-0.3013420105 -0.0713462010 0.3705439866
+-0.3151249886 -0.1659789979 0.3593479991
+-0.3115890026 -0.1340810061 0.3627479970
+-0.3188509941 -0.1421640068 0.3826789856
+-0.2972329855 -0.1123649999 0.3183259964
+-0.3044489920 -0.1241019964 0.3411220014
+-0.3014009893 -0.1434720010 0.3136320114
+-0.3112770021 -0.1870860010 0.3337030113
+-0.3074559867 -0.2058269978 0.3061189950
+-0.3047339916 -0.1748200059 0.3095819950
+-0.2790409923 -0.1404729933 0.1989919990
+-0.2699210048 -0.0811048001 0.2144590020
+-0.2749499977 -0.1103449985 0.2060730010
+-0.2832570076 -0.1281140000 0.2321069986
+-0.2868210077 -0.1144279987 0.2641870081
+-0.2467149943 -0.0011184399 0.2475160062
+-0.2679719925 -0.0286078993 0.2880460024
+-0.2578270137 -0.0151118999 0.2674399912
+-0.2560429871 -0.0263125002 0.2351859957
+-0.2637000084 -0.0530238003 0.2241629958
+-0.2936890125 -0.0628672987 0.3506349921
+-0.2897750139 -0.0991509035 0.2948580086
+-0.2920950055 -0.0820389986 0.3237760067
+-0.2857359946 -0.0527666993 0.3299950063
+-0.2772290111 -0.0412603989 0.3090119958
+-0.2818219960 -0.0846759006 0.2711029947
+-0.2731750011 -0.0691993013 0.2474240065
+-0.2756200135 -0.0559992008 0.2790549994
+0.5000000000 -0.2517189980 -0.4074240029
+0.4895389974 -0.2846780121 -0.3628270030
+0.4809370041 -0.2841210067 -0.3798519969
+0.4956339896 -0.2779690027 -0.3242149949
+0.4931780100 -0.2833499908 -0.3439919949
+0.5000000000 -0.2564849854 -0.3723160028
+0.4705309868 -0.3383060098 -0.2896310091
+0.4833639860 -0.3106789887 -0.3163889945
+0.4804250002 -0.3306989968 -0.2683370113
+0.4991120100 -0.2197269946 -0.2421189994
+0.4986459911 -0.2394150048 -0.2624500096
+0.5000000000 -0.2109380066 -0.2934759855
+0.4938359857 -0.2933599949 -0.2019239962
+0.4966360033 -0.2669439912 -0.2319319993
+0.4959309995 -0.2750009894 -0.1801840067
+0.5000000000 -0.2417970002 -0.3335359991
+0.4979110062 -0.2559579909 -0.2831090093
+0.4969069958 -0.2689459920 -0.3037970066
+0.4739710093 -0.3845709860 -0.0891572013
+0.4801769853 -0.3642680049 -0.1158910021
+0.4813430011 -0.3679299951 -0.0626536012
+0.4791629910 -0.3460789919 -0.2188010067
+0.4793320000 -0.3570660055 -0.1679590046
+0.4703449905 -0.3698000014 -0.1922869980
+0.4900740087 -0.3248440027 -0.1200330034
+0.4856039882 -0.3421880007 -0.1437499970
+0.4901669919 -0.3184959888 -0.1724890023
+0.4867689908 -0.3210699856 -0.2463549972
+0.4926750064 -0.2953029871 -0.2747280002
+0.4909340143 -0.3087309897 -0.2240930051
+0.4976390004 -0.0267392006 -0.1295630038
+0.5000000000 0.0085928300 -0.1682959944
+0.4960139990 -0.0924275964 -0.0589067005
+0.4964210093 -0.0603476018 -0.0933187976
+0.5000000000 -0.0541414991 -0.1895470023
+0.4985809922 -0.0569150001 -0.1411540061
+0.4991439879 -0.0871101990 -0.1544770002
+0.4964750111 -0.2066709995 0.0743290037
+0.4963240027 -0.1807229966 0.0407886989
+0.4977209866 -0.1801030040 -0.0535910986
+0.4970619977 -0.1806890070 -0.0055867401
+0.4973919988 -0.2081210017 -0.0205403008
+0.4961130023 -0.1528279930 0.0077113900
+0.4959349930 -0.1233550012 -0.0253162999
+0.5000000000 -0.1671880037 -0.2545300126
+0.4994109869 -0.1724230051 -0.2035010010
+0.4993090034 -0.1973049939 -0.2224159986
+0.4993279874 -0.1169150025 -0.1692329943
+0.4994179904 -0.1454890072 -0.1856739968
+0.5000000000 -0.1138290018 -0.2190890014
+0.4982709885 -0.2056500018 -0.1203859970
+0.4988650084 -0.1761970073 -0.1528590024
+0.4983130097 -0.1786870062 -0.1027980000
+0.4985199869 -0.1192779988 -0.1202619970
+0.4973970056 -0.1213440001 -0.0721736029
+0.4980689883 -0.1503770053 -0.0867196992
+0.4950410128 -0.2872950137 0.3753460050
+0.4957070053 -0.2934669852 0.3354200125
+0.4910449982 -0.3337500095 0.2164420038
+0.4932360053 -0.3161720037 0.2747429907
+0.4890849888 -0.3401370049 0.2480710000
+0.4959929883 -0.2956990004 0.2934710085
+0.4963200092 -0.2912650108 0.2539170086
+0.4828790128 -0.3679299951 -0.0082785897
+0.4847609997 -0.3645119965 0.0468849987
+0.4785799980 -0.3845709860 0.0193096008
+0.4926060140 -0.3207669854 0.0946448967
+0.4893339872 -0.3431299925 0.0721426010
+0.4915870130 -0.3257179856 0.0409455001
+0.4838449955 -0.3704099953 0.1312180012
+0.4867869914 -0.3579199910 0.1025160030
+0.4888710082 -0.3479099870 0.1588030010
+0.4966759980 -0.2506940067 0.1433189958
+0.4966000021 -0.2300489992 0.1085470021
+0.4965040088 -0.2822510004 0.2154069990
+0.4966439903 -0.2683350146 0.1787900031
+0.4956980050 -0.2790290117 0.0803166032
+0.4961369932 -0.2742919922 0.1303250045
+0.4948160052 -0.2977299988 0.1140929982
+0.4950500131 -0.3030520082 0.2016019970
+0.4925630093 -0.3250299990 0.1826799959
+0.4937869906 -0.3131299913 0.1482809931
+0.4868330061 -0.3490239978 -0.0370776989
+0.4932009876 -0.3050790131 -0.0971440971
+0.4903019965 -0.3280180097 -0.0667814016
+0.4908150136 -0.3282279968 -0.0130054001
+0.4935930073 -0.3058840036 0.0091258604
+0.4984459877 -0.2263190001 -0.1906490028
+0.4975540042 -0.2335110009 -0.0879196972
+0.4979420006 -0.2308550030 -0.1391849965
+0.4972200096 -0.2540630102 -0.1591710001
+0.4954980016 -0.2803719938 -0.1279820055
+0.4967750013 -0.2324710041 0.0615718998
+0.4954079986 -0.2822999954 0.0290168002
+0.4964329898 -0.2577500045 0.0465063006
+0.4969890118 -0.2340579927 0.0128463004
+0.4972450137 -0.2344979942 -0.0371263996
+0.4952670038 -0.2837939858 -0.0230708998
+0.4952889979 -0.2832329869 -0.0755200982
+0.4965789914 -0.2596150041 -0.0554605983
+-0.1594199985 -0.0765516981 -0.0654914975
+-0.1624689996 -0.1366689950 -0.0835767016
+-0.1609939933 -0.1061030030 -0.0754171982
+-0.1405899972 -0.0936674997 -0.0893044025
+-0.1199819967 -0.1124819964 -0.1102880016
+-0.1736630052 -0.2595919967 -0.1042060032
+-0.1695819944 -0.2296209931 -0.1003729999
+-0.1244160011 -0.2050060034 -0.1311160028
+-0.1476369947 -0.2166679949 -0.1171770021
+-0.1277659982 -0.2355989963 -0.1360560060
+-0.1664910018 -0.1988749951 -0.0957985967
+-0.1642010063 -0.1677470058 -0.0902791992
+-0.0503306985 -0.1764920056 -0.1556099951
+-0.0253061000 -0.1995300055 -0.1646679938
+-0.0978939980 -0.1327279955 -0.1283729970
+-0.0745970011 -0.1541460007 -0.1434980035
+-0.0773371011 -0.2159820050 -0.1562100053
+-0.0753543004 -0.1850920022 -0.1503189951
+-0.1001999974 -0.1945309937 -0.1421629936
+-0.1207960024 -0.1430000067 -0.1184879988
+-0.1430210024 -0.1546230018 -0.1057899967
+-0.1221750006 -0.1739960015 -0.1253390014
+-0.2487680018 -0.4361580014 -0.1123669967
+-0.2358810008 -0.4222880006 -0.1152009964
+-0.1943480074 -0.4101310074 -0.1536889970
+-0.2163649946 -0.4161820114 -0.1351969987
+-0.2104070038 -0.4267340004 -0.1520050019
+-0.2238180041 -0.4058020115 -0.1157599986
+-0.2124640048 -0.3866879940 -0.1153440028
+-0.0843753964 -0.3891539872 -0.2029670030
+-0.1148729995 -0.3938159943 -0.1950809956
+-0.1032589972 -0.4086549878 -0.2073300034
+-0.1414960027 -0.3624210060 -0.1669069976
+-0.1277190000 -0.3782930076 -0.1817609966
+-0.1140550002 -0.3554959893 -0.1786690056
+-0.1614120007 -0.4171890020 -0.1849139929
+-0.1435099989 -0.3988969922 -0.1839790046
+-0.1700749993 -0.4043650031 -0.1700219959
+-0.1853300035 -0.3158249855 -0.1101510003
+-0.1788669974 -0.2884269953 -0.1074649990
+-0.2022289932 -0.3652180135 -0.1140680015
+-0.1931309998 -0.3415099978 -0.1123389974
+-0.1463810056 -0.3211129904 -0.1474860013
+-0.1706150025 -0.3308930099 -0.1312910020
+-0.1558990031 -0.3465200067 -0.1501650065
+-0.1907269955 -0.3780350089 -0.1349920034
+-0.1799049973 -0.3911849856 -0.1535619944
+-0.1670829952 -0.3699409962 -0.1522520036
+0.1557420045 -0.3611649871 -0.1507080048
+0.1812639982 -0.3827959895 -0.1419560015
+0.1038289964 -0.3165999949 -0.1669169962
+0.1295450032 -0.3390359879 -0.1599369943
+0.1064649969 -0.3888849914 -0.1876969934
+0.1210270002 -0.3655599952 -0.1720779985
+0.0860065967 -0.3696030080 -0.1878280044
+0.0002954520 -0.2230370045 -0.1706369966
+0.0261630006 -0.2467110008 -0.1737619936
+0.0177538991 -0.3056530058 -0.1860930026
+0.0234351009 -0.2768400013 -0.1797229946
+-0.0059431400 -0.2832610011 -0.1820800006
+0.0520296991 -0.2702780068 -0.1741880029
+0.0778556988 -0.2935850024 -0.1719399989
+-0.0376482010 -0.4013850093 -0.2163459957
+-0.0187826995 -0.3808589876 -0.2083380073
+-0.0522232987 -0.3848859966 -0.2073860019
+0.0505571999 -0.3732770085 -0.1990769953
+0.0155694000 -0.3770099878 -0.2056979984
+0.0329947993 -0.3949570060 -0.2108349949
+-0.0230835993 -0.3380180001 -0.1943289936
+-0.0032580099 -0.3579339981 -0.2004690021
+0.0089019500 -0.3327859938 -0.1930080056
+0.0640415028 -0.3490779996 -0.1883479953
+0.0730952993 -0.3224129975 -0.1793020070
+0.0411560014 -0.3276660144 -0.1880419999
+-0.0265896004 -0.2304130048 -0.1704960018
+-0.0807899013 -0.2463849932 -0.1614080071
+-0.0537969992 -0.2381139994 -0.1674370021
+-0.0298954006 -0.2606410086 -0.1759790033
+-0.0355216004 -0.2897860110 -0.1813880056
+-0.1563930064 -0.2763629854 -0.1253730059
+-0.1205160022 -0.3121939898 -0.1606319994
+-0.1385709941 -0.2939870059 -0.1441729963
+-0.1324110031 -0.2653819919 -0.1403629929
+-0.1071169972 -0.2554239929 -0.1523839980
+-0.0680961981 -0.3673720062 -0.1978520006
+-0.0436857007 -0.3174799979 -0.1868599951
+-0.0545249991 -0.3434230089 -0.1923930049
+-0.0849706978 -0.3491980135 -0.1871729940
+-0.1025459990 -0.3306989968 -0.1748840064
+-0.0647633001 -0.2966589928 -0.1775960028
+-0.0860105976 -0.2758719921 -0.1661860049
+-0.0932170004 -0.3040780127 -0.1706770062
+0.2009180039 -0.4042899907 -0.1441289932
+0.2148959935 -0.4254029989 -0.1572510004
+0.2376340032 -0.4112530053 -0.1198609993
+0.1620340049 -0.4497649968 -0.2217109948
+0.1898919940 -0.4389260113 -0.1912319958
+0.1517020017 -0.4374699891 -0.2079779953
+0.2615430057 -0.4483889937 -0.1527999938
+0.2266680002 -0.4426119924 -0.1727959961
+0.2371509969 -0.4550069869 -0.1888719946
+0.0198959000 -0.4651879966 -0.3078739941
+0.0601948984 -0.4658780098 -0.2922730148
+0.0166704003 -0.4661209881 -0.2942749858
+0.1463889927 -0.4660660028 -0.2793439925
+0.1036129966 -0.4658699930 -0.2872529924
+0.1099470034 -0.4646939933 -0.3023659885
+0.0903996006 -0.4579730034 -0.2584249973
+0.0972665027 -0.4635230005 -0.2724939883
+0.1311910003 -0.4581759870 -0.2489199936
+0.3011980057 -0.4664109945 -0.2214429975
+0.2658709884 -0.4667699933 -0.2395969927
+0.2762359977 -0.4623000026 -0.2572579980
+0.2468370050 -0.4632799923 -0.2055130005
+0.2562350035 -0.4671089947 -0.2223860025
+0.2815150023 -0.4660240114 -0.1865140051
+0.1966959983 -0.4640960097 -0.2851459980
+0.2279949933 -0.4666790068 -0.2553850114
+0.1880130023 -0.4663810134 -0.2686780095
+0.2098979950 -0.4607309997 -0.2222259939
+0.1711860001 -0.4589839876 -0.2367389947
+0.1796769947 -0.4646289945 -0.2525059879
+-0.3454920053 -0.3676370084 -0.2718020082
+-0.4104149938 -0.3675509989 -0.2256350070
+-0.2160069942 -0.3691979945 -0.3436140120
+-0.2788929939 -0.3688069880 -0.3124290109
+-0.2794589996 -0.4133259952 -0.2847599983
+-0.2837609947 -0.3922049999 -0.2954159975
+-0.2262939960 -0.4127500057 -0.3113830090
+0.0196547005 -0.3631320000 -0.4082059860
+-0.0374649987 -0.3659699857 -0.3992959857
+-0.0584088005 -0.4117340147 -0.3669300079
+-0.0492435992 -0.3906689882 -0.3828429878
+-0.0035261600 -0.4103640020 -0.3760649860
+-0.0953020975 -0.3679350019 -0.3863790035
+-0.1544229984 -0.3690350056 -0.3683919907
+-0.0701280981 -0.4614849985 -0.3124639988
+-0.0702323988 -0.4540210068 -0.3247439861
+-0.0237262007 -0.4612730145 -0.3186889887
+-0.1709630042 -0.4299049973 -0.3219420016
+-0.1192319989 -0.4435810149 -0.3260200024
+-0.1682029963 -0.4440129995 -0.3108220100
+-0.0176707003 -0.4428299963 -0.3458350003
+-0.0686673000 -0.4433139861 -0.3378179967
+-0.0648439005 -0.4292519987 -0.3518730104
+-0.1705230027 -0.4126400054 -0.3345690072
+-0.1650490016 -0.3923810124 -0.3501009941
+-0.1141740009 -0.4124279916 -0.3532119989
+0.4510799944 -0.2914260030 -0.3915069997
+0.3998480141 -0.3067289889 -0.3973860145
+0.3509519994 -0.3741239905 -0.3536449969
+0.3731209934 -0.3430359960 -0.3749099970
+0.3930839896 -0.3640879989 -0.3416289985
+0.3455869853 -0.3207289875 -0.4023990035
+0.2923400104 -0.3318229914 -0.4074380100
+0.2877930105 -0.4534969926 -0.2754920125
+0.3006590009 -0.4402689934 -0.2941530049
+0.3245370090 -0.4498470128 -0.2584930062
+0.2421890050 -0.4139960110 -0.3544810116
+0.2732050121 -0.4283849895 -0.3262520134
+0.2289649993 -0.4328509867 -0.3369210064
+0.3535549939 -0.4160279930 -0.2981089950
+0.3149990141 -0.4227420092 -0.3132640123
+0.3314149976 -0.4008080065 -0.3329899907
+0.1311060041 -0.3544479907 -0.4153510034
+0.0760077983 -0.3593370020 -0.4135139883
+0.2385910004 -0.3411029875 -0.4114969969
+0.1851290017 -0.3484619856 -0.4144189954
+0.1571999937 -0.4017629921 -0.3828629851
+0.1705950052 -0.3771170080 -0.3989219964
+0.2078399956 -0.3969439864 -0.3786959946
+0.2740930021 -0.3632479906 -0.3899370134
+0.3051800132 -0.3831120133 -0.3637759984
+0.2572129965 -0.3907549977 -0.3721779883
+0.2482140064 -0.4560540020 -0.2900460064
+0.1622499973 -0.4590150118 -0.3112930059
+0.2062190026 -0.4578120112 -0.3020229936
+0.2169360071 -0.4474279881 -0.3193300068
+0.1824170053 -0.4362219870 -0.3448010087
+0.0232590996 -0.4609239995 -0.3215540051
+0.0334593989 -0.4419359863 -0.3504109979
+0.0275841001 -0.4532110095 -0.3356710076
+0.0702696964 -0.4604609907 -0.3211899996
+0.1167699993 -0.4598529935 -0.3177259862
+0.0627470016 -0.3857809901 -0.3977440000
+0.1448850036 -0.4222800136 -0.3663159907
+0.1047779992 -0.4054880142 -0.3838999867
+0.0510400012 -0.4083099961 -0.3816779852
+0.0412385017 -0.4269999862 -0.3657959998
+0.1340029985 -0.4387429953 -0.3497639894
+0.1246709973 -0.4512360096 -0.3335179985
+0.0841879025 -0.4406020045 -0.3516770005
+0.4532490075 -0.3208209872 -0.3524819911
+0.4551689923 -0.3656980097 -0.2639380097
+0.4533089995 -0.3460600078 -0.3093670011
+0.4275319874 -0.3546079993 -0.3268350065
+0.4062350094 -0.3835769892 -0.3030860126
+0.4671260118 -0.4029299915 -0.0638552979
+0.4638029933 -0.3992680013 -0.1162159964
+0.4331550002 -0.4228799939 -0.1693670005
+0.4503250122 -0.4120219946 -0.1431490034
+0.4405860007 -0.4291360080 -0.1205269992
+0.4603990018 -0.3920660019 -0.1670580059
+0.4572690129 -0.3810789883 -0.2163259983
+0.3576560020 -0.4452100098 -0.2392030060
+0.3450349867 -0.4573639929 -0.2197480053
+0.3874320090 -0.4085429907 -0.2806319892
+0.3715879917 -0.4289720058 -0.2594420016
+0.4002049863 -0.4469169974 -0.1735749990
+0.3868739903 -0.4393140078 -0.2177550048
+0.4120439887 -0.4319309890 -0.1943709999
+0.4164850116 -0.4000580013 -0.2610569894
+0.4397239983 -0.3909490108 -0.2394859940
+0.4251939952 -0.4132049978 -0.2163079977
+0.4919570088 -0.2915329933 0.3924370110
+0.4891720116 -0.3215529919 0.3338049948
+0.4751540124 -0.3831610084 0.2498970032
+0.4824810028 -0.3547390103 0.2905449867
+0.4777120054 -0.3635959923 0.3004130125
+0.4862619936 -0.3469139934 0.2731490135
+0.4834130108 -0.3663089871 0.2147029936
+0.4327450097 -0.4536559880 0.1014980003
+0.4458700120 -0.4425610006 0.1364690065
+0.4391970038 -0.4450789988 0.1486790031
+0.4578849971 -0.4313639998 0.1068520024
+0.4520550072 -0.4379900098 0.1226790026
+0.4459750056 -0.4459710121 0.0720335022
+0.4610539973 -0.4139469862 0.2208579928
+0.4571059942 -0.4272690117 0.1726430058
+0.4667519927 -0.4075970054 0.2102250010
+0.4738360047 -0.3992680013 0.0448385999
+0.4704180062 -0.4029299915 -0.0100076003
+0.4803600013 -0.3814460039 0.1567510068
+0.4771789908 -0.3921880126 0.1003620028
+0.4584450126 -0.4290229976 0.0352784991
+0.4687690139 -0.4119839966 0.0680110008
+0.4634459913 -0.4226900041 0.0886806026
+0.4764020145 -0.3909960091 0.1789709926
+0.4718770087 -0.3997179866 0.1967439950
+0.4679490030 -0.4129399955 0.1426489949
+0.2723549902 -0.4255110025 -0.0969320983
+0.2612929940 -0.4042899907 -0.0785524026
+0.2940270007 -0.4556519985 -0.1311600059
+0.2836630046 -0.4429340065 -0.1141059995
+0.3226639926 -0.4369229972 -0.0302467998
+0.3039839864 -0.4391120076 -0.0730922967
+0.3322350085 -0.4498620033 -0.0480634011
+0.3335599899 -0.4653080106 -0.2010540068
+0.3231990039 -0.4690249860 -0.1829659939
+0.3598330021 -0.4703460038 -0.0993314013
+0.3426370025 -0.4703019857 -0.1421390027
+0.3689439893 -0.4699940085 -0.1168610007
+0.3134909868 -0.4687199891 -0.1653620005
+0.3039419949 -0.4643540084 -0.1481280029
+0.4097360075 -0.4584639966 0.0822354034
+0.3999379873 -0.4633490145 0.0363883004
+0.4174729884 -0.4605399966 0.0680024028
+0.3575940132 -0.4578830004 -0.0214955006
+0.3800500035 -0.4623999894 0.0065954700
+0.3714610040 -0.4552389979 0.0229125004
+0.3964950144 -0.4684050083 -0.0258738995
+0.3883660138 -0.4668959975 -0.0095498702
+0.3750230074 -0.4692099988 -0.0549722016
+0.3416649997 -0.4600479901 -0.0652235001
+0.3238329887 -0.4622049928 -0.1075970009
+0.3508360088 -0.4669829905 -0.0821961015
+0.3629429936 -0.4626849890 -0.1784469932
+0.4117990136 -0.4518339932 -0.1271959990
+0.3890709877 -0.4582690001 -0.1537529975
+0.3786619902 -0.4659669995 -0.1349000037
+0.3925090134 -0.4673160017 -0.0894777030
+0.4601069987 -0.4188129902 -0.0399521999
+0.4459739923 -0.4430069923 0.0026194700
+0.4530330002 -0.4321820140 -0.0177452005
+0.4471330047 -0.4322189987 -0.0698430017
+0.4311130047 -0.4431959987 -0.0990900993
+0.4248059988 -0.4600360096 0.0534562990
+0.4047240019 -0.4667859972 -0.0426088013
+0.4154640138 -0.4643769860 0.0052183899
+0.4319179952 -0.4569450021 0.0379896984
+0.4389460087 -0.4512659907 0.0211461000
+0.4131900072 -0.4620389938 -0.0602109991
+0.4219749868 -0.4541710019 -0.0789863989
+0.4309720099 -0.4539819956 -0.0293764006
+0.4933629930 -0.2653219998 0.4300889969
+0.4864220023 -0.3061670065 0.3868480027
+0.4736700058 -0.3300249875 0.3746899962
+0.4802139997 -0.3196490109 0.3794459999
+0.4803960025 -0.2953960001 0.4063090086
+0.4793649912 -0.3423309922 0.3440580070
+0.4719800055 -0.3727990091 0.3041960001
+0.4437389970 -0.3498150110 0.3719410002
+0.4517210126 -0.3475930095 0.3704200089
+0.4508430064 -0.3224320114 0.3938859999
+0.4514069855 -0.3895600140 0.3113389909
+0.4519369900 -0.3698939979 0.3429239988
+0.4436790049 -0.3911080062 0.3153359890
+0.4662980139 -0.3130620122 0.3960219920
+0.4593870044 -0.3438090086 0.3700689971
+0.4667020142 -0.3381200135 0.3712620139
+0.4440880120 -0.4344410002 0.1939290017
+0.4318479896 -0.4455499947 0.1599140018
+0.4638299942 -0.3983480036 0.2656260133
+0.4546479881 -0.4187679887 0.2290980071
+0.4400810003 -0.4226160049 0.2439440042
+0.4476320148 -0.4217010140 0.2364919931
+0.4500170052 -0.4067789912 0.2757720053
+0.4656240046 -0.3803960085 0.3063539863
+0.4665359855 -0.3603709936 0.3416559994
+0.4587410092 -0.3860259950 0.3084329963
+0.3875519931 -0.3274419904 0.4046860039
+0.3872460127 -0.3140139878 0.4170190096
+0.3849860132 -0.3517690003 0.3675230145
+0.3866080046 -0.3398410082 0.3880609870
+0.4008690119 -0.3208839893 0.4112400115
+0.3943929970 -0.3345269859 0.3994149864
+0.4020810127 -0.3403179944 0.3938759863
+0.3716009855 -0.3889830112 0.2529659867
+0.3762130141 -0.3815549910 0.2860060036
+0.4000070095 -0.3863419890 0.3214260042
+0.3886969984 -0.3867520094 0.3032529950
+0.3976149857 -0.3981899917 0.2909780145
+0.3798359931 -0.3727239966 0.3162789941
+0.3827089965 -0.3626700044 0.3435469866
+0.4343279898 -0.3262400031 0.3968990147
+0.4271410108 -0.3500050008 0.3784399927
+0.4355210066 -0.3506540060 0.3745709956
+0.4102309942 -0.3446440101 0.3884269893
+0.4186620116 -0.3479489982 0.3831749856
+0.4172759950 -0.3253079951 0.4036110044
+0.4187679887 -0.3856610060 0.3324240148
+0.4191389978 -0.3680070043 0.3593969941
+0.4101350009 -0.3801240027 0.3402549922
+0.4022260010 -0.3574950099 0.3730449975
+0.3930709958 -0.3634729981 0.3579699993
+0.4015139937 -0.3727760017 0.3488459885
+0.2860319912 -0.4045149982 -0.0338131003
+0.3395450115 -0.4358969927 0.0137558999
+0.3141449988 -0.4221389890 -0.0106884995
+0.3072209954 -0.4055890143 0.0110830003
+0.3242129982 -0.4059289992 0.0550022982
+0.4176749885 -0.4520829916 0.1273259968
+0.4015089869 -0.4541299939 0.0965057984
+0.3843060136 -0.4390409887 0.1266909987
+0.3929820061 -0.4476439953 0.1112189963
+0.4007700086 -0.4417879879 0.1538120061
+0.3832609951 -0.4520100057 0.0673936978
+0.3627189994 -0.4459109902 0.0398700014
+0.3583239913 -0.3998090029 0.1794140041
+0.3656840026 -0.3950169981 0.2173459977
+0.3381960094 -0.4052639902 0.0980158970
+0.3493179977 -0.4032379985 0.1395460069
+0.3832420111 -0.4230520129 0.1834699959
+0.3669230044 -0.4152660072 0.1607030034
+0.3755950034 -0.4282839894 0.1431419998
+0.3457770050 -0.4209370017 0.0771206021
+0.3539760113 -0.4344500005 0.0577821992
+0.3659430146 -0.4320310056 0.1011030003
+0.4239020050 -0.4438489974 0.1710820049
+0.4320529997 -0.4216220081 0.2517209947
+0.4286319911 -0.4337219894 0.2127449960
+0.4155479968 -0.4400820136 0.1825869977
+0.4069370031 -0.4342829883 0.1947440058
+0.4359639883 -0.3721570075 0.3490279913
+0.4174610078 -0.4009099901 0.3024489880
+0.4272660017 -0.3892300129 0.3257020116
+0.4355950058 -0.3910099864 0.3200500011
+0.4343290031 -0.4074349999 0.2875790000
+0.3804979920 -0.4039810002 0.2368939966
+0.3981820047 -0.4264169931 0.2077759951
+0.3893570006 -0.4163759947 0.2218129933
+0.3941020072 -0.4081389904 0.2577379942
+0.4064249992 -0.4071820080 0.2796800137
+0.4116699994 -0.4250510037 0.2334209979
+0.4236989915 -0.4187549949 0.2601369917
+0.4151319861 -0.4139769971 0.2694129944
+-0.2762010098 -0.4475109875 -0.0781875029
+-0.2799679935 -0.4564970136 -0.0874178037
+-0.2636199892 -0.4475109875 -0.1032119989
+-0.3143689930 -0.4703060091 -0.0451076999
+-0.2969940007 -0.4640420079 -0.0677525029
+-0.3079049885 -0.4621460140 -0.0358305983
+-0.2674809992 -0.4629400074 -0.1258880049
+-0.2836009860 -0.4642249942 -0.0979344025
+-0.2879059911 -0.4709779918 -0.1091030017
+-0.3824560046 -0.4770190120 0.0652950034
+-0.3659169972 -0.4785130024 0.0355587006
+-0.3722670078 -0.4725430012 0.0749944001
+-0.3484350145 -0.4848859906 -0.0414214991
+-0.3580119908 -0.4826090038 -0.0034436900
+-0.3678640127 -0.4859549999 -0.0144806001
+-0.3404420018 -0.4713389874 0.0164413005
+-0.3489890099 -0.4777199924 0.0069763502
+-0.3317500055 -0.4748820066 -0.0200584996
+-0.2888379991 -0.4802330136 -0.1730650067
+-0.3075450063 -0.4827859998 -0.1440680027
+-0.3173429966 -0.4830009937 -0.1551029980
+-0.2931100130 -0.4764080048 -0.1207360029
+-0.2995660007 -0.4804669917 -0.1324950010
+-0.2752279937 -0.4746960104 -0.1497270018
+-0.3468100131 -0.4872980118 -0.0892487019
+-0.3234770000 -0.4846839905 -0.1121959984
+-0.3370040059 -0.4854960144 -0.0778350979
+-0.3083240092 -0.4772990048 -0.0891449973
+-0.3211230040 -0.4768719971 -0.0554230995
+-0.3285500109 -0.4819520116 -0.0664450005
+-0.5000000000 -0.3632810116 0.3007810116
+-0.4865919948 -0.3889159858 0.2752200067
+-0.4867599905 -0.3632810116 0.3107419908
+-0.4857529998 -0.4291990101 0.1966309994
+-0.4862569869 -0.4108889997 0.2369379997
+-0.5000000000 -0.4101560116 0.2255859971
+-0.4598749876 -0.4105759859 0.2577019930
+-0.4729200006 -0.4109979868 0.2477490008
+-0.4589079916 -0.4296509922 0.2187770009
+-0.4820629954 -0.4658200145 0.0297851004
+-0.4832369983 -0.4621579945 0.0708739981
+-0.5000000000 -0.4570310116 0.0605469011
+-0.4529879987 -0.4678350091 0.0933601037
+-0.4675920010 -0.4657180011 0.0819204003
+-0.4500080049 -0.4742150009 0.0511149988
+-0.5000000000 -0.4414060116 0.1435550004
+-0.4842439890 -0.4548340142 0.1128659993
+-0.4850820005 -0.4438480139 0.1550289989
+-0.4027639925 -0.4638159871 0.1366820037
+-0.4143629968 -0.4665409923 0.1268430054
+-0.3986220062 -0.4730589986 0.0958371013
+-0.4444989860 -0.4450190067 0.1887039989
+-0.4296570122 -0.4572570026 0.1579280049
+-0.4319750071 -0.4436669946 0.1986210048
+-0.4225040078 -0.4763799906 0.0739786997
+-0.4264999926 -0.4681609869 0.1161369979
+-0.4393289983 -0.4686180055 0.1048709974
+-0.4574379921 -0.4455530047 0.1779229939
+-0.4709270000 -0.4451940060 0.1665930003
+-0.4554649889 -0.4582810104 0.1358740032
+-0.4489890039 -0.3770850003 -0.1946530044
+-0.4609040022 -0.3962399960 -0.1788569987
+-0.5000000000 -0.3632810116 -0.1640630066
+-0.4019280076 -0.4420419931 -0.1884800047
+-0.4285970032 -0.4221670032 -0.1865340024
+-0.3854619861 -0.4309009910 -0.2110179961
+-0.5000000000 -0.4101560116 -0.1357419938
+-0.4667940140 -0.4152829945 -0.1613280028
+-0.4712339938 -0.4316410124 -0.1389160007
+-0.3292840123 -0.4807499945 -0.1652099937
+-0.3434830010 -0.4759399891 -0.1740729958
+-0.3106850088 -0.4766330123 -0.1930910051
+-0.4037829936 -0.4725860059 -0.1284720004
+-0.3745889962 -0.4745700061 -0.1523880064
+-0.3866460025 -0.4797370136 -0.1202659979
+-0.3416999876 -0.4616729915 -0.2075369954
+-0.3599529862 -0.4683040082 -0.1814209968
+-0.3791399896 -0.4572870135 -0.1865829974
+-0.5000000000 -0.4570310116 -0.0175781008
+-0.4789670110 -0.4624019861 -0.0469971001
+-0.4807209969 -0.4658200145 -0.0096680298
+-0.4742240012 -0.4453130066 -0.1123540029
+-0.4768010080 -0.4555659890 -0.0814697966
+-0.5000000000 -0.4414060116 -0.0849609002
+-0.4372630119 -0.4750080109 -0.0675067976
+-0.4559819996 -0.4666329920 -0.0754588023
+-0.4309319854 -0.4699710011 -0.1027150005
+-0.4457550049 -0.4489780068 -0.1384000033
+-0.4140430093 -0.4529379904 -0.1632570028
+-0.4233649969 -0.4624919891 -0.1347260028
+-0.3449989855 -0.4843769968 -0.1341799945
+-0.3694530129 -0.4881640077 -0.0640584975
+-0.3582650125 -0.4869930148 -0.1003340036
+-0.3715049922 -0.4845030010 -0.1107790023
+-0.3966430128 -0.4834389985 -0.0853360966
+-0.3933059871 -0.4801050127 0.0547237992
+-0.4176700115 -0.4819140136 0.0321871005
+-0.4049920142 -0.4817569852 0.0435849018
+-0.3867610097 -0.4849170148 0.0139845004
+-0.3788709939 -0.4875530005 -0.0257894993
+-0.4629150033 -0.4725700021 -0.0004081750
+-0.4202780128 -0.4811710119 -0.0582400002
+-0.4423579872 -0.4776040018 -0.0298324004
+-0.4465250075 -0.4774209857 0.0098709697
+-0.4314759970 -0.4804989994 0.0208432991
+-0.4049519897 -0.4852460027 -0.0479843989
+-0.3911879957 -0.4873420000 -0.0370616987
+-0.4118790030 -0.4848180115 -0.0086471997
+-0.3861150146 -0.3972170055 -0.2297119945
+-0.2678200006 -0.4320060015 -0.2790589929
+-0.3246319890 -0.4162310064 -0.2585999966
+-0.3600699902 -0.4220890105 -0.2340189964
+-0.3380410075 -0.4411329925 -0.2339390069
+-0.0691780970 -0.4658240080 -0.3006229997
+-0.1147840023 -0.4619410038 -0.3032599986
+-0.1955980062 -0.4643520117 -0.2767699957
+-0.1568329930 -0.4628500044 -0.2913100123
+-0.1513919979 -0.4673649967 -0.2811000049
+-0.1628289968 -0.4550749958 -0.3010199964
+-0.2135519981 -0.4451769888 -0.2933290005
+-0.2881639898 -0.4727610052 -0.2179940045
+-0.2764950097 -0.4765110016 -0.2089599967
+-0.3182730079 -0.4557729959 -0.2313580066
+-0.3019410074 -0.4660339952 -0.2256840020
+-0.2213259935 -0.4709280133 -0.2505449951
+-0.2614830136 -0.4693419933 -0.2401500046
+-0.2305849940 -0.4665159881 -0.2597160041
+-0.2896139920 -0.4507449865 -0.2530399859
+-0.2546029985 -0.4472129941 -0.2736969888
+-0.2417989969 -0.4587079883 -0.2674469948
+0.1626950055 -0.4047589898 -0.1696040034
+0.0862141997 -0.4089579880 -0.2061379999
+0.1242600009 -0.4067319930 -0.1906809956
+0.1392749995 -0.4230079949 -0.1974339932
+0.1125850007 -0.4379090071 -0.2226870060
+-0.0597505011 -0.4193969965 -0.2240850031
+-0.0247745998 -0.4165819883 -0.2255499959
+-0.0045736800 -0.4420230091 -0.2455749959
+-0.0137403002 -0.4302139878 -0.2352370024
+-0.0420195013 -0.4437359869 -0.2454490066
+0.0113783004 -0.4139429927 -0.2233490050
+0.0484325998 -0.4114210010 -0.2170950025
+0.0130740004 -0.4640429914 -0.2810919881
+-0.0264021996 -0.4665749967 -0.2931280136
+0.0824953020 -0.4497190118 -0.2456000000
+0.0493463986 -0.4584060013 -0.2651210129
+-0.0314102992 -0.4601129889 -0.2683979869
+0.0085887397 -0.4591780007 -0.2685129941
+0.0028059699 -0.4517590106 -0.2566590011
+0.0731450021 -0.4389919937 -0.2341389954
+0.0618541986 -0.4261449873 -0.2246450037
+0.0339375995 -0.4404219985 -0.2418359965
+-0.2474099994 -0.4446910024 -0.1260409951
+-0.2483820021 -0.4606850147 -0.1511439979
+-0.2473790050 -0.4530239999 -0.1386079937
+-0.2281980067 -0.4410060048 -0.1472080052
+-0.2061190009 -0.4370740056 -0.1667259932
+-0.2669210136 -0.4775510132 -0.1988530010
+-0.2596330047 -0.4761259854 -0.1876470000
+-0.2018159926 -0.4625869989 -0.2063020021
+-0.2304199934 -0.4703359902 -0.1987199932
+-0.2036850005 -0.4680820107 -0.2185460031
+-0.2543070018 -0.4725959897 -0.1757330000
+-0.2506470084 -0.4673259854 -0.1634609997
+-0.1247290000 -0.4257549942 -0.2105350047
+-0.0931721032 -0.4224550128 -0.2190800011
+-0.1814180017 -0.4331240058 -0.1839379966
+-0.1542149931 -0.4293220043 -0.1986999959
+-0.1445170045 -0.4501200020 -0.2244420052
+-0.1485379934 -0.4404160082 -0.2118179947
+-0.1743659973 -0.4526639879 -0.2105620056
+-0.2032079995 -0.4467279911 -0.1804350019
+-0.2264409959 -0.4580779970 -0.1737149954
+-0.2017299980 -0.4553500116 -0.1935690045
+-0.2419130057 -0.4749040008 -0.2212900072
+-0.1818519980 -0.4704790115 -0.2569609880
+-0.2135750055 -0.4724999964 -0.2406069934
+-0.2076310068 -0.4714699984 -0.2299489975
+-0.1742680073 -0.4659320116 -0.2349569947
+-0.0685598031 -0.4670630097 -0.2886289954
+-0.0702812001 -0.4611510038 -0.2648690045
+-0.0687913001 -0.4654290080 -0.2766709924
+-0.1089420021 -0.4677959979 -0.2810109854
+-0.1468700022 -0.4689109921 -0.2704289854
+-0.0847480968 -0.4348649979 -0.2305060029
+-0.1423649937 -0.4580760002 -0.2364829928
+-0.1123929992 -0.4477500021 -0.2348439991
+-0.0781240985 -0.4456210136 -0.2418459952
+-0.0733287036 -0.4544669986 -0.2532689869
+-0.1421120018 -0.4640260041 -0.2481089979
+-0.1436769962 -0.4677189887 -0.2594169974
+-0.1073469967 -0.4624319971 -0.2580800056
+-0.2853980064 -0.4444470108 -0.0514559001
+-0.3003650010 -0.4347740114 0.0088473698
+-0.2932479978 -0.4400579929 -0.0223912001
+-0.3009259999 -0.4521079957 -0.0282260999
+-0.3165700138 -0.4585489929 -0.0026760299
+-0.3206659853 -0.4055149853 0.1433710009
+-0.3167429864 -0.4140650034 0.1092400029
+-0.3341529965 -0.4403719902 0.1020290032
+-0.3252600133 -0.4282020032 0.1060959995
+-0.3380270004 -0.4319640100 0.1375270039
+-0.3120320141 -0.4217680097 0.0751158968
+-0.3065449893 -0.4286670089 0.0414647982
+-0.3623850048 -0.4667260051 0.0834835023
+-0.3771170080 -0.4647339880 0.1142209992
+-0.3319889903 -0.4633589983 0.0246191993
+-0.3473170102 -0.4661870003 0.0534850992
+-0.3569819927 -0.4512999952 0.1280059963
+-0.3527480066 -0.4594959915 0.0907884985
+-0.3433330059 -0.4507530034 0.0969512984
+-0.3236050010 -0.4536789954 0.0315520018
+-0.3151060045 -0.4421649873 0.0371427983
+-0.3293839991 -0.4476090074 0.0665689036
+-0.3343720138 -0.2920500040 0.3686580062
+-0.3336099982 -0.3119789958 0.3497410119
+-0.3483960032 -0.3308399916 0.3538010120
+-0.3405059874 -0.3222309947 0.3521130085
+-0.3487739861 -0.3081119955 0.3753769994
+-0.3326779902 -0.3297590017 0.3269189894
+-0.3316099942 -0.3459720016 0.3009769917
+-0.3874340057 -0.3523980081 0.3531129956
+-0.3767279983 -0.3485600054 0.3544799984
+-0.3875440061 -0.3262940049 0.3780390024
+-0.3561600149 -0.3776029944 0.3009589911
+-0.3662939966 -0.3656080067 0.3286550045
+-0.3658190072 -0.3849940002 0.2996200025
+-0.3667939901 -0.3191840053 0.3784059882
+-0.3665969968 -0.3437640071 0.3550580144
+-0.3571200073 -0.3378840089 0.3548310101
+-0.3264729977 -0.3855110109 0.2101919949
+-0.3238529861 -0.3960480094 0.1771360040
+-0.3302679956 -0.3605270088 0.2725819945
+-0.3285860121 -0.3737049997 0.2421550006
+-0.3449349999 -0.3988929987 0.2400490046
+-0.3363730013 -0.3872900009 0.2413990051
+-0.3462249935 -0.3847489953 0.2717599869
+-0.3389750123 -0.3584240079 0.3015320003
+-0.3478859961 -0.3509579897 0.3290620148
+-0.3471849859 -0.3688339889 0.3015739918
+-0.4735719860 -0.3631300032 0.3195309937
+-0.4867599905 -0.3339839876 0.3427729905
+-0.4469850063 -0.4097000062 0.2664819956
+-0.4603390098 -0.3883270025 0.2939650118
+-0.4604920149 -0.3337430060 0.3571110070
+-0.4604890049 -0.3627659976 0.3272149861
+-0.4475660026 -0.3621259928 0.3338559866
+-0.3915269971 -0.4600319862 0.1453489959
+-0.4057320058 -0.4523760080 0.1765259951
+-0.4090540111 -0.4224489927 0.2517279983
+-0.4077579975 -0.4386279881 0.2149949968
+-0.3961830139 -0.4348059893 0.2215559930
+-0.4197080135 -0.4415589869 0.2073670030
+-0.4334540069 -0.4273920059 0.2374829948
+-0.4103969932 -0.3304640055 0.3744019866
+-0.4103449881 -0.3578810096 0.3480350077
+-0.3986569941 -0.3554539979 0.3509890139
+-0.4348619878 -0.3611449897 0.3395079970
+-0.4224340022 -0.3597530127 0.3442200124
+-0.4348799884 -0.3327510059 0.3675230145
+-0.3981119990 -0.4003500044 0.2910139859
+-0.4101909995 -0.3822340071 0.3185839951
+-0.4098089933 -0.4037010074 0.2863720059
+-0.4347189963 -0.3862749934 0.3082740009
+-0.4343050122 -0.4083069861 0.2741509974
+-0.4218940139 -0.4063299894 0.2807649970
+-0.3807109892 -0.4551199973 0.1528930068
+-0.3601340055 -0.4415940046 0.1647319943
+-0.3702549934 -0.4490070045 0.1593399942
+-0.3832829893 -0.4435899854 0.1906370074
+-0.3850440085 -0.4300220013 0.2270909995
+-0.3321140110 -0.4101740122 0.1752319932
+-0.3541910052 -0.4087759852 0.2380400002
+-0.3432399929 -0.4113689959 0.2068839967
+-0.3409929872 -0.4223420024 0.1725970060
+-0.3503629863 -0.4327560067 0.1691260040
+-0.3872419894 -0.3756360114 0.3252390027
+-0.3861820102 -0.4142760038 0.2619020045
+-0.3868660033 -0.3962030113 0.2947280109
+-0.3760839999 -0.3911339939 0.2975719869
+-0.3651010096 -0.4021129906 0.2683840096
+-0.3743160069 -0.4241760075 0.2316419929
+-0.3624149859 -0.4302549958 0.2006029934
+-0.3640150130 -0.4171450138 0.2352679968
+-0.5000000000 0.1640630066 0.3632810116
+-0.4787609875 0.1511130035 0.3966070116
+-0.4700909853 0.1686619967 0.3792169988
+-0.4843190014 0.1079979986 0.4306150079
+-0.4821400046 0.1318459958 0.4149500132
+-0.5000000000 0.1357419938 0.4101560116
+-0.4384799898 0.1288000047 0.4315449893
+-0.4616160095 0.1294810027 0.4221119881
+-0.4475429952 0.1010140032 0.4408049881
+-0.4867599905 -0.0238476992 0.4610350132
+-0.4865159988 0.0136473998 0.4588130116
+-0.5000000000 0.0175781008 0.4570310116
+-0.4583710134 0.0050621699 0.4622560143
+-0.4726620018 0.0093981400 0.4605219960
+-0.4597170055 -0.0316248015 0.4642579854
+-0.5000000000 0.0849609002 0.4414060116
+-0.4860279858 0.0486083999 0.4530029893
+-0.4852949977 0.0803027004 0.4436039925
+-0.3975790143 -0.0099197105 0.4679690003
+-0.4131000042 -0.0067507098 0.4671140015
+-0.4027580023 -0.0459205993 0.4678710103
+-0.4349789917 0.0680430010 0.4542489946
+-0.4237389863 0.0316124000 0.4627360106
+-0.4163120091 0.0650326982 0.4588220119
+-0.4315789938 -0.0393861011 0.4667969942
+-0.4285089970 -0.0031434800 0.4656980038
+-0.4436360002 0.0008311770 0.4640139937
+-0.4530020058 0.0714512989 0.4498459995
+-0.4697909951 0.0755883008 0.4462650120
+-0.4562920034 0.0395177007 0.4573000073
+-0.4867599905 -0.3008739948 0.3709720075
+-0.5000000000 -0.3007810116 0.3632810116
+-0.4604960084 -0.3010909855 0.3833189905
+-0.4735729992 -0.3009989858 0.3776310086
+-0.5000000000 -0.2255859971 0.4101560116
+-0.4867599905 -0.2646830082 0.3953369856
+-0.4867599905 -0.2261430025 0.4158689976
+-0.4104489982 -0.2997899950 0.3973749876
+-0.4224990010 -0.3005079925 0.3950800002
+-0.4476029873 -0.2288350016 0.4278750122
+-0.4349170029 -0.2663699985 0.4129329920
+-0.4349359870 -0.2298460007 0.4303280115
+-0.4348990023 -0.3009159863 0.3919979930
+-0.4475849867 -0.3010860085 0.3880920112
+-0.5000000000 -0.0605469011 0.4570310116
+-0.4867599905 -0.1037549973 0.4544680119
+-0.4867599905 -0.0631444976 0.4596680105
+-0.4867599905 -0.1859859973 0.4325680137
+-0.4867599905 -0.1449459940 0.4454349875
+-0.5000000000 -0.1435550004 0.4414060116
+-0.4605109990 -0.1488550007 0.4512880147
+-0.4735769928 -0.1467359960 0.4487119913
+-0.4605070055 -0.1886940002 0.4398249984
+-0.4735749960 -0.2269140035 0.4206910133
+-0.4605000019 -0.2655439973 0.4058409929
+-0.4605030119 -0.2278340012 0.4246760011
+-0.3343720138 -0.2684909999 0.3814750016
+-0.3412640095 -0.2758460045 0.3884379864
+-0.3569299877 -0.2263900042 0.4232279956
+-0.3488050103 -0.2535479963 0.4066469967
+-0.3479799926 -0.2226690054 0.4165459871
+-0.3489879966 -0.2821919918 0.3930059969
+-0.3576020002 -0.2873829901 0.3962810040
+-0.3928300142 -0.0851735994 0.4651370049
+-0.3833679855 -0.1237189993 0.4589839876
+-0.3798539937 -0.0870535001 0.4628910124
+-0.3868319988 -0.1963859946 0.4442079961
+-0.3855740130 -0.1602970064 0.4528990090
+-0.3973929882 -0.1592980027 0.4547669888
+-0.3634369969 -0.1602180004 0.4447819889
+-0.3742460012 -0.1606550068 0.4496929944
+-0.3654200137 -0.1951410025 0.4376260042
+-0.3876410127 -0.2970460057 0.3995969892
+-0.3988119960 -0.2986870110 0.3989129961
+-0.3669460118 -0.2914969921 0.3982880116
+-0.3769919872 -0.2946920097 0.3993940055
+-0.3987360001 -0.2317710072 0.4333429933
+-0.3876500130 -0.2652699947 0.4177550077
+-0.3874419928 -0.2315389961 0.4325740039
+-0.3669250011 -0.2612800002 0.4147639871
+-0.3664979935 -0.2289980054 0.4277949929
+-0.3766779900 -0.2306620032 0.4307889938
+-0.4062280059 -0.0828151032 0.4660890102
+-0.4334279895 -0.0768250972 0.4655759931
+-0.4198170006 -0.0800087005 0.4661380053
+-0.4084050059 -0.1202429980 0.4621030092
+-0.4096480012 -0.1578020006 0.4554870129
+-0.4735789895 -0.0663233027 0.4616940022
+-0.4476220012 -0.1512330025 0.4532040060
+-0.4605140090 -0.1090499982 0.4590640068
+-0.4603309929 -0.0698108971 0.4633060098
+-0.4469499886 -0.0733752996 0.4645999968
+-0.4104999900 -0.2665919960 0.4169549942
+-0.4102579951 -0.1950449944 0.4459039867
+-0.4104799926 -0.2314859927 0.4331119955
+-0.4225639999 -0.2307939976 0.4320740104
+-0.4349539876 -0.1920779943 0.4441829920
+-0.4221679866 -0.1558780074 0.4553529918
+-0.4344159961 -0.1150569990 0.4616090059
+-0.4348430037 -0.1536380053 0.4545589983
+-0.3333649933 -0.2417889982 0.3884379864
+-0.3295840025 -0.1808360070 0.3971360028
+-0.3318009973 -0.2123540044 0.3932259977
+-0.3395900130 -0.2179770023 0.4066469967
+-0.3462589979 -0.1900620013 0.4232279956
+-0.3101390004 -0.0509359017 0.4095090032
+-0.3168950081 -0.0827815980 0.4064329863
+-0.3344810009 -0.0878961012 0.4344049990
+-0.3253110051 -0.0859675035 0.4215390086
+-0.3278200030 -0.0541656986 0.4368830025
+-0.3222939968 -0.1154339984 0.4034219980
+-0.3264679909 -0.1483519971 0.4003629982
+-0.3673279881 -0.0882987007 0.4589839876
+-0.3746159971 -0.0506619997 0.4651370049
+-0.3531520069 -0.1588129997 0.4376260042
+-0.3601880074 -0.1246299967 0.4496929944
+-0.3492229879 -0.0535795987 0.4554260075
+-0.3555029929 -0.0889066979 0.4530700147
+-0.3445340097 -0.0888139978 0.4449160099
+-0.3435479999 -0.1563789994 0.4279910028
+-0.3346639872 -0.1529529989 0.4155699909
+-0.3396750093 -0.1221460029 0.4315449893
+-0.2017699927 0.1390530020 0.4407379925
+-0.2198430002 0.1237230003 0.4375540018
+-0.2311089933 0.1367309988 0.4554730058
+-0.2252800018 0.1295849979 0.4469209909
+-0.2100670040 0.1546310037 0.4579710066
+-0.2369959950 0.1055729985 0.4333960116
+-0.2530600131 0.0848328993 0.4289659858
+-0.2668009996 0.1704290062 0.4740599990
+-0.2551319897 0.1621280015 0.4724630117
+-0.2402089983 0.1935729980 0.4764139950
+-0.2764959931 0.0985672027 0.4577400088
+-0.2671050131 0.1302960068 0.4663029909
+-0.2865090072 0.1045069993 0.4640240073
+-0.2218980044 0.1737750024 0.4707379937
+-0.2455569953 0.1534350067 0.4686059952
+-0.2376720011 0.1448280066 0.4628230035
+-0.2921639979 0.0088930205 0.4163450003
+-0.3019239902 -0.0202767998 0.4127559960
+-0.2676509917 0.0616916008 0.4245319963
+-0.2807349861 0.0363003016 0.4202870131
+-0.2974779904 0.0396365002 0.4438720047
+-0.2887710035 0.0373780988 0.4328449965
+-0.2836250067 0.0674318969 0.4466229975
+-0.2603119910 0.0882813036 0.4398539960
+-0.2504110038 0.1161559969 0.4525820017
+-0.2679289877 0.0930059031 0.4495669901
+-0.4315660000 0.1799750030 0.4030550122
+-0.4379299879 0.1993989944 0.3777050078
+-0.4133200049 0.1294710040 0.4425989985
+-0.4217239916 0.1576689929 0.4256959856
+-0.3611150086 0.2203679979 0.4281019866
+-0.3959639966 0.1882929951 0.4244909883
+-0.3659650087 0.1915840060 0.4409910142
+-0.3821769953 -0.0126200002 0.4678710103
+-0.3897340000 0.0253389999 0.4672940075
+-0.3641700149 0.0930769965 0.4660780132
+-0.3787190020 0.0597322993 0.4664990008
+-0.3615579903 0.0565315001 0.4679110050
+-0.3971720040 0.0624912009 0.4632740021
+-0.4047920108 0.0977109000 0.4553250074
+-0.2682279944 0.2102140039 0.4723440111
+-0.2977679968 0.1840910017 0.4695639908
+-0.2810020149 0.1778119951 0.4730939865
+-0.3394710124 0.1919009984 0.4541569948
+-0.3170860112 0.1890210062 0.4634029865
+-0.3071579933 0.2210080028 0.4574460089
+-0.3280610144 0.1208159998 0.4691959918
+-0.3237099946 0.1555889994 0.4675199986
+-0.3458620012 0.1251299977 0.4663609862
+-0.3670699894 0.1609620005 0.4522889853
+-0.3888149858 0.1294640005 0.4527359903
+-0.3661290109 0.1280920058 0.4608519971
+-0.3674960136 -0.0150760999 0.4662350118
+-0.3412010074 -0.0191852003 0.4570739865
+-0.3537859917 -0.0172857009 0.4627139866
+-0.3579899967 0.0195808001 0.4668399990
+-0.3457329869 0.0531257018 0.4674429893
+-0.3103410006 -0.0214729998 0.4268679917
+-0.3073520064 0.0426176004 0.4530200064
+-0.3094739914 0.0098734302 0.4413659871
+-0.3195599914 -0.0214949008 0.4390929937
+-0.3298040032 -0.0206501000 0.4492000043
+-0.2909120023 0.1443600059 0.4717549980
+-0.3305020034 0.0853156000 0.4683760107
+-0.3122099936 0.1158479974 0.4698100090
+-0.2983709872 0.1103499979 0.4680860043
+-0.3037439883 0.0762723982 0.4618909955
+-0.3313989937 0.0495782010 0.4648630023
+-0.3310739994 0.0140936002 0.4585059881
+-0.3186169863 0.0460137017 0.4600549936
+-0.1831540018 0.1504060030 0.4407379925
+-0.1847179979 0.1598560065 0.4508189857
+-0.1395449936 0.2037660033 0.4669289887
+-0.1638569981 0.1816059947 0.4594179988
+-0.1397809982 0.1905740052 0.4581049979
+-0.1874569952 0.1696249992 0.4593740106
+-0.1911620051 0.1801880002 0.4667049944
+-0.0114129996 0.2851870060 0.4840489924
+-0.0479561016 0.2667300105 0.4817610085
+-0.0152981998 0.2678970098 0.4808090031
+-0.1147660017 0.2549929917 0.4823299944
+-0.0812762976 0.2624390125 0.4823220074
+-0.0829479024 0.2779540122 0.4845280051
+-0.0834435970 0.2311179936 0.4718590081
+-0.0815159976 0.2467619926 0.4780910015
+-0.1120769978 0.2256200016 0.4731020033
+-0.2111719996 0.2136420012 0.4786219895
+-0.2219270021 0.2241400033 0.4783990085
+-0.1961760074 0.1912139952 0.4724290073
+-0.2027229965 0.2025080025 0.4765209854
+-0.1544869989 0.2576049864 0.4826450050
+-0.1802320033 0.2305860072 0.4804390073
+-0.1479219943 0.2443750054 0.4817019999
+-0.1689230055 0.2057220042 0.4735189974
+-0.1407189965 0.2171899974 0.4737429917
+-0.1434369981 0.2307920009 0.4786750078
+0.3260689974 0.3569279909 0.4639219940
+0.3749049902 0.3348529935 0.4645699859
+0.2195969969 0.3857089877 0.4633159935
+0.2728120089 0.3735220134 0.4636969864
+0.2566820085 0.3324230015 0.4762800038
+0.2680059969 0.3532890081 0.4706029892
+0.2142360061 0.3475959897 0.4759930074
+0.0042805299 0.3959450126 0.4564079940
+0.0583438016 0.3991180062 0.4593960047
+0.0718723983 0.3690469861 0.4745639861
+0.0664194971 0.3846769929 0.4677990079
+0.0227499008 0.3685980141 0.4730849862
+0.1120650023 0.3984119892 0.4613919854
+0.1656800061 0.3939630091 0.4626289904
+0.0645337999 0.2982139885 0.4844520092
+0.0706062987 0.3167450130 0.4846130013
+0.0281783007 0.3019210100 0.4849640131
+0.1632529944 0.3396930099 0.4801380038
+0.1155790016 0.3293899894 0.4830049872
+0.1547749937 0.3201589882 0.4829519987
+0.0309916995 0.3367620111 0.4827049971
+0.0739839002 0.3348819911 0.4830049872
+0.0744284019 0.3523870111 0.4796459973
+0.1683080047 0.3586069942 0.4757759869
+0.1690820009 0.3767589927 0.4699270129
+0.1205189973 0.3657149971 0.4753809869
+-0.3821899891 0.2430219948 0.3922429979
+-0.3183180094 0.2526189983 0.4356350005
+-0.3476049900 0.2503240108 0.4166530073
+-0.3241890073 0.2823539972 0.4075109959
+-0.2685079873 0.3141269982 0.4201529920
+-0.2354239970 0.2334759980 0.4755469859
+-0.2515609860 0.2414640039 0.4701060057
+-0.2054039985 0.3002350032 0.4625880122
+-0.2306700051 0.2715049982 0.4667569995
+-0.1891829967 0.2914919853 0.4711000025
+-0.2703250051 0.2478580028 0.4620049894
+-0.2922300100 0.2519600093 0.4507940114
+-0.1045690030 0.3769260049 0.4466649890
+-0.0501945987 0.3885470033 0.4521639943
+-0.2130150050 0.3405260146 0.4311040044
+-0.1587000042 0.3610970080 0.4397599995
+-0.1268759966 0.3436779976 0.4630230069
+-0.1420509964 0.3531529903 0.4524810016
+-0.1757940054 0.3275130093 0.4577929974
+-0.2456749976 0.3113610148 0.4371350110
+-0.2721509933 0.2817769945 0.4437339902
+-0.2243130058 0.3068929911 0.4513210058
+-0.2003459930 0.2534219921 0.4785709977
+-0.1255279928 0.2831940055 0.4831849933
+-0.1635359973 0.2700049877 0.4811710119
+-0.1751359999 0.2813630104 0.4773100019
+-0.1461459994 0.3078620136 0.4749050140
+-0.0094933100 0.3023110032 0.4852980077
+-0.0130153000 0.3350239992 0.4818679988
+-0.0099480404 0.3190029860 0.4845640063
+-0.0479983985 0.2993389964 0.4852069914
+-0.0868441015 0.2929719985 0.4845300019
+-0.0377116017 0.3770669997 0.4623329937
+-0.1134079993 0.3327769935 0.4715510011
+-0.0771320984 0.3559210002 0.4673550129
+-0.0270859003 0.3642280102 0.4707089961
+-0.0187624004 0.3501609862 0.4772369862
+-0.1020919979 0.3205820024 0.4780080020
+-0.0932030007 0.3072510064 0.4823470116
+-0.0575441010 0.3296360075 0.4803290069
+-0.1645089984 0.1577810049 0.4375540018
+-0.1243060008 0.1678649932 0.4288899899
+-0.1448860019 0.1634420007 0.4333800077
+-0.1416350007 0.1771380007 0.4469659925
+-0.1156750023 0.1966370046 0.4556970000
+-0.0402866006 0.1680420041 0.4108340144
+-0.0610592999 0.1709659994 0.4152770042
+-0.0439241007 0.2007779926 0.4467349946
+-0.0524814017 0.1854040027 0.4322929978
+-0.0207720995 0.1975979954 0.4436160028
+-0.0821466967 0.1717530042 0.4197529852
+-0.1033350006 0.1706240028 0.4243029952
+-0.0209254995 0.2506360114 0.4756020010
+0.0162148997 0.2659879923 0.4797100127
+-0.0869257972 0.2155610025 0.4634959996
+-0.0553108007 0.2337149978 0.4701760113
+-0.0011789500 0.2307419926 0.4662919939
+-0.0278315991 0.2335769981 0.4682750106
+-0.0356126018 0.2168969959 0.4586940110
+-0.0915589035 0.2002699971 0.4528659880
+-0.0971236005 0.1852290034 0.4398370087
+-0.0675840974 0.2016379982 0.4498339891
+0.1060720012 0.0572860986 0.3534539938
+0.0897649974 0.0800888017 0.3654170036
+0.1150339991 0.1029689983 0.4102190137
+0.1017789990 0.0908621997 0.3891769946
+0.1304170042 0.0787516981 0.4008089900
+0.0730018988 0.1003149971 0.3752839863
+0.0556803010 0.1179350019 0.3834750056
+0.1798979938 0.1637479961 0.4675819874
+0.1618199944 0.1467700005 0.4572100043
+0.1940879971 0.1364450008 0.4631649852
+0.0957316980 0.1578399986 0.4402379990
+0.1288439929 0.1537799984 0.4495950043
+0.1111750007 0.1737439930 0.4538030028
+0.1597930044 0.1052619964 0.4373239875
+0.1450410038 0.1309639961 0.4442119896
+0.1294600070 0.1163519993 0.4285559952
+-0.0001019180 0.1553149968 0.4015200138
+-0.0199379995 0.1628240049 0.4063049853
+0.0377350003 0.1329479963 0.3903659880
+0.0191379003 0.1453869939 0.3962860107
+0.0435369983 0.1726939976 0.4333769977
+0.0309209004 0.1583510041 0.4161809981
+0.0629623979 0.1592710018 0.4291000068
+0.0679984987 0.1298950016 0.4050979912
+0.0987016037 0.1244560033 0.4178279936
+0.0813537017 0.1432130039 0.4240120053
+0.3459219933 0.3099260032 0.4726899862
+0.3996030092 0.3028709888 0.4681969881
+0.2396939993 0.3110629916 0.4806680083
+0.2911840081 0.3120099902 0.4772149920
+0.3322150111 0.2543259859 0.4809980094
+0.3163909912 0.2859779894 0.4788450003
+0.2899720073 0.2634220123 0.4826390147
+0.0561751984 0.2795569897 0.4825110137
+0.0985706970 0.2910659909 0.4840039909
+0.1576460004 0.2660189867 0.4832330048
+0.1297399998 0.2803600132 0.4836170077
+0.1155460030 0.2607710063 0.4810149968
+0.1431089938 0.3002449870 0.4841989875
+0.1899479926 0.3069289923 0.4830929935
+0.2340960056 0.1721169949 0.4785810113
+0.2201289982 0.2009959966 0.4806649983
+0.1994290054 0.1818850040 0.4753650129
+0.2648220062 0.2416429967 0.4842959940
+0.2418179959 0.2209080011 0.4836240113
+0.2792679965 0.2113489956 0.4843870103
+0.1635330021 0.2282139957 0.4790889919
+0.2028519958 0.2263180017 0.4819560051
+0.1820459962 0.2480050027 0.4827359915
+0.2456919998 0.2678610086 0.4838269949
+0.2207040042 0.2896229923 0.4833689928
+0.2011950016 0.2685149908 0.4841220081
+0.0464100018 0.2610389888 0.4785990119
+0.0244538002 0.2251150012 0.4642719924
+0.0357015990 0.2428330034 0.4725649953
+0.0747380033 0.2529349923 0.4774729908
+0.1008030027 0.2416000068 0.4762719870
+-0.0093803098 0.1767310053 0.4246970117
+0.0570285991 0.1883819997 0.4479010105
+0.0231238008 0.1835750043 0.4370799959
+0.0016578700 0.1918769926 0.4404360056
+0.0130110001 0.2080679983 0.4535970092
+0.1637690067 0.1880100071 0.4707910120
+0.1243640035 0.2269939929 0.4748809934
+0.1453309953 0.2091179937 0.4731299877
+0.1277830005 0.1908999979 0.4647360146
+0.0920433998 0.1909170002 0.4571200013
+0.0859168023 0.2230229974 0.4692499936
+0.0486708991 0.2166219950 0.4621550143
+0.0712302998 0.2052219957 0.4598290026
+0.1327850074 0.0412462018 0.3654170036
+0.1845979989 0.0020111499 0.3834539950
+0.1590310037 0.0227556992 0.3752799928
+0.1449519992 0.0518339984 0.3891769946
+0.1584369987 0.0636627004 0.4102190137
+0.2764129937 -0.0981879979 0.4057919979
+0.2553539872 -0.0711861998 0.4012350142
+0.2367520034 0.0026882500 0.4289990067
+0.2460300028 -0.0340621993 0.4159969985
+0.2603450119 -0.0219528005 0.4331530035
+0.2329310030 -0.0452555008 0.3961429894
+0.2092909962 -0.0207512006 0.3903039992
+0.2063689977 0.1060720012 0.4572100043
+0.2249809951 0.1224000007 0.4675819874
+0.1731670052 0.0766742006 0.4285559952
+0.1891310066 0.0908221975 0.4442119896
+0.2440489978 0.0528787002 0.4537500143
+0.2172760069 0.0732693002 0.4495829940
+0.2272730023 0.0386281982 0.4401940107
+0.1856269985 0.0457917005 0.4178200066
+0.1975619942 0.0131537998 0.4050689936
+0.2117909938 0.0253749005 0.4239749908
+0.3839539886 -0.2979489863 0.4238550067
+0.3774830103 -0.2798289955 0.4254379869
+0.3772650063 -0.2204869986 0.4438639879
+0.3771930039 -0.2525720000 0.4345110059
+0.3863640130 -0.2478239983 0.4407449961
+0.3686830103 -0.2587299943 0.4247640073
+0.3577759862 -0.2347629964 0.4229890108
+0.3809680045 -0.0606229007 0.4750590026
+0.3794830143 -0.1041679978 0.4688450098
+0.3936940134 -0.0952370986 0.4727779925
+0.3514440060 -0.1236110032 0.4546130002
+0.3653019965 -0.1136889979 0.4628910124
+0.3501780033 -0.0821764022 0.4632560015
+0.3894970119 -0.1779630035 0.4582380056
+0.3784250021 -0.1457339972 0.4613609910
+0.3777039945 -0.1847430021 0.4528929889
+0.3139680028 -0.1539179981 0.4137960076
+0.2959769964 -0.1258659959 0.4099789858
+0.3449749947 -0.2090149969 0.4203450084
+0.3303300142 -0.1818349957 0.4172590077
+0.3213430047 -0.1044190004 0.4420189857
+0.3256140053 -0.1439100057 0.4302029908
+0.3381510079 -0.1337459981 0.4437740147
+0.3551999927 -0.2003449947 0.4342310131
+0.3661719859 -0.1921930015 0.4450230002
+0.3531180024 -0.1631630063 0.4448510110
+0.4000720084 0.2609809935 0.4746330082
+0.4337680042 0.2832469940 0.4681319892
+0.3398300111 0.2174350023 0.4832859933
+0.3681119978 0.2386340052 0.4800109863
+0.4174390137 0.1872590035 0.4811049998
+0.3965469897 0.2161780000 0.4800460041
+0.3936139941 0.1705230027 0.4834640026
+0.2451229990 0.1397950053 0.4753650129
+0.2666060030 0.1580719948 0.4807290137
+0.3234629929 0.1177759990 0.4830439985
+0.2965059876 0.1398929954 0.4821439981
+0.3021419942 0.1007379964 0.4791190028
+0.2892499864 0.1770559996 0.4838190079
+0.3133800030 0.1967699975 0.4846839905
+0.3996669948 -0.0042751902 0.4820699990
+0.3852669895 0.0305636004 0.4832220078
+0.3830020130 -0.0155496998 0.4798510075
+0.3902760148 0.1238949969 0.4852179885
+0.3876389861 0.0771713033 0.4850650132
+0.4071640074 0.0908994004 0.4852769971
+0.3483130038 0.0481495000 0.4806140065
+0.3678599894 0.0627821982 0.4836390018
+0.3472749889 0.0919715986 0.4835430086
+0.3694820106 0.1529760063 0.4849149883
+0.3438239992 0.1773680001 0.4847370088
+0.3459370136 0.1352539957 0.4849039912
+0.2543190122 0.1049100012 0.4707750082
+0.2692880034 0.0299661998 0.4569779932
+0.2622190118 0.0681034029 0.4646750093
+0.2816469967 0.0841185004 0.4730750024
+0.3066340089 0.0602221005 0.4747030139
+0.2890520096 -0.0872896016 0.4240700006
+0.3175179958 -0.0638488978 0.4524430037
+0.3027819991 -0.0757825002 0.4396080077
+0.2824229896 -0.0481928997 0.4366529882
+0.2759169936 -0.0089619700 0.4476369917
+0.3661339879 -0.0273343995 0.4761149883
+0.3290759921 0.0334705003 0.4757710099
+0.3488940001 0.0041663800 0.4762789905
+0.3494099975 -0.0394382998 0.4704929888
+0.3331240118 -0.0516722985 0.4626809955
+0.3104459941 0.0189343002 0.4688079953
+0.2926630080 0.0047282800 0.4594869912
+0.3139680028 -0.0225855000 0.4613879919
+0.3905369937 -0.2979010046 0.4254379869
+0.4062260091 -0.2993020117 0.4230270088
+0.3980199993 -0.2986379862 0.4247570038
+0.3932490051 -0.2740910053 0.4345110059
+0.3958970010 -0.2444519997 0.4438639879
+0.4409489930 -0.2969430089 0.4142189920
+0.4323219955 -0.2987349927 0.4158670008
+0.4252440035 -0.2360929996 0.4446969926
+0.4293499887 -0.2685340047 0.4317179918
+0.4349189997 -0.2329310030 0.4441950023
+0.4235469997 -0.2996090055 0.4181109965
+0.4147709906 -0.2997219861 0.4206050038
+0.4042600095 -0.1308279932 0.4688450098
+0.4075860083 -0.0870876983 0.4750590026
+0.3984879851 -0.2101529986 0.4528929889
+0.4012570083 -0.1720419973 0.4613609910
+0.4243110120 -0.1614300013 0.4638240039
+0.4128969908 -0.1666270047 0.4630169868
+0.4198240042 -0.2019300014 0.4550490081
+0.4056159854 -0.2415979952 0.4450829923
+0.4109790027 -0.2716479897 0.4344010055
+0.4154340029 -0.2389079928 0.4451540112
+0.5000000000 -0.2242189944 0.4637280107
+0.4935280085 -0.2427690029 0.4464929998
+0.4929069877 -0.1874320060 0.4660919905
+0.4933420122 -0.2171339989 0.4573409855
+0.4997169971 -0.1748439968 0.4761640131
+0.4869250059 -0.2574999928 0.4340339899
+0.4800849855 -0.2689889967 0.4254949987
+0.4874149859 -0.0379883014 0.4847800136
+0.4894779921 -0.0789405033 0.4820910096
+0.4960350096 -0.0304687992 0.4885999858
+0.4766519964 -0.1711769998 0.4620110095
+0.4830200076 -0.1259959936 0.4732550085
+0.4745219946 -0.1330910027 0.4697520137
+0.4985840023 -0.1085940003 0.4844549894
+0.4910340011 -0.1179149970 0.4780800045
+0.4921529889 -0.1542869955 0.4727469981
+0.4575429857 -0.2902199924 0.4141139984
+0.4493640065 -0.2941499949 0.4135429859
+0.4729189873 -0.2780619860 0.4195579886
+0.4654070139 -0.2849709988 0.4159939885
+0.4620229900 -0.2199369967 0.4458340108
+0.4639979899 -0.2538569868 0.4323390126
+0.4703350067 -0.2139800042 0.4483509958
+0.4793809950 -0.2394430041 0.4404639900
+0.4857699871 -0.1980029941 0.4582149982
+0.4782530069 -0.2067680061 0.4523780048
+0.4483389854 0.2513569891 0.4724949896
+0.4603520036 0.3007810116 0.4637280107
+0.4317489862 0.1526519954 0.4828169942
+0.4390160143 0.2019540071 0.4788160026
+0.4742290080 0.2251559943 0.4761640131
+0.4579539895 0.2145410031 0.4770759940
+0.4657990038 0.1749999970 0.4808390141
+0.4113560021 -0.0412722006 0.4798510075
+0.4156410098 0.0060715498 0.4831570089
+0.4449610114 0.0243273005 0.4838489890
+0.4307760000 0.0155723002 0.4836089909
+0.4392549992 -0.0245814007 0.4812340140
+0.4203169942 0.0543980002 0.4848699868
+0.4255410135 0.1033290029 0.4848299921
+0.4915040135 0.0545312017 0.4885999858
+0.4813629985 0.0473924987 0.4864360094
+0.4847739935 0.0043163700 0.4861469865
+0.4719460011 0.1333590001 0.4837819934
+0.4771110117 0.0906151980 0.4856480062
+0.4844239950 0.1414059997 0.4844549894
+0.4637930095 -0.0097498298 0.4825940132
+0.4702579975 0.0400914997 0.4850220084
+0.4581300020 0.0324546993 0.4842279851
+0.4581390023 0.1245239973 0.4837040007
+0.4426630139 0.1145590022 0.4841449857
+0.4512169957 0.0741612986 0.4847019911
+0.4210520089 -0.0794313028 0.4763070047
+0.4353699982 -0.1562269926 0.4642660022
+0.4289839864 -0.1179850027 0.4711929858
+0.4339430034 -0.0721864030 0.4770179987
+0.4461480081 -0.0652528033 0.4776160121
+0.4472379982 -0.2629640102 0.4301640093
+0.4594239891 -0.1836279929 0.4568639994
+0.4533540010 -0.2249809951 0.4444499910
+0.4443109930 -0.2292660028 0.4439960122
+0.4404149950 -0.1935140043 0.4552820027
+0.4781970084 -0.0450440012 0.4818649888
+0.4576010108 -0.0585120991 0.4784500003
+0.4682779908 -0.0518275015 0.4797990024
+0.4717909992 -0.0931347981 0.4756000042
+0.4655460119 -0.1394969970 0.4672690034
+0.4516719878 -0.1057360023 0.4725109935
+0.4459669888 -0.1509190053 0.4647659957
+0.4560340047 -0.1453880072 0.4656749964
+0.2767310143 0.1887439936 0.1449629962
+0.2838810086 0.1995940059 0.1587879956
+0.2888369858 0.1796129942 0.1567000002
+0.2762449980 0.2431669980 0.1611739993
+0.2797420025 0.2208770066 0.1601780057
+0.2681050003 0.2310010046 0.1470250040
+0.3053959906 0.2047369927 0.1808570027
+0.2921380103 0.2121219933 0.1714320034
+0.3014490008 0.2262479961 0.1828570068
+0.2676160038 0.3369599879 0.1679069996
+0.2689000070 0.3133270144 0.1651040018
+0.2568089962 0.3231559992 0.1519690007
+0.2937270105 0.2962740064 0.1868540049
+0.2811430097 0.3043839931 0.1766880006
+0.2924090028 0.3205510080 0.1886450052
+0.2615590096 0.2765220106 0.1484600008
+0.2708239853 0.2896539867 0.1632920057
+0.2732839882 0.2661820054 0.1621000022
+0.3497439921 0.2720229924 0.2148749977
+0.3347690105 0.2768029869 0.2096969932
+0.3472299874 0.2957099974 0.2162120044
+0.3117330074 0.2418510020 0.1930419952
+0.3228839934 0.2587699890 0.2019830048
+0.3259809911 0.2359700054 0.2002570033
+0.3186739981 0.3068009913 0.2045650035
+0.3204599917 0.2824699879 0.2033070028
+0.3067989945 0.2889690101 0.1957049966
+0.2982470095 0.2488600016 0.1843059957
+0.2854650021 0.2569710016 0.1740150005
+0.2956849933 0.2722919881 0.1855259985
+0.3074229956 0.5000000000 0.2709670067
+0.2919319868 0.4837790132 0.2452650070
+0.2809480131 0.4852829874 0.2452280074
+0.3076719940 0.4804489911 0.2411199957
+0.2995269895 0.4821679890 0.2431750000
+0.3156349957 0.4995700121 0.2582719922
+0.2617880106 0.4514850080 0.2027720064
+0.2815310061 0.4660679996 0.2246969938
+0.2750670016 0.4470010102 0.2084950060
+0.3473539948 0.4703510106 0.2351650000
+0.3362070024 0.4735740125 0.2361209989
+0.3499029875 0.4939840138 0.2424679995
+0.3084990084 0.4344049990 0.2184810042
+0.3223930001 0.4536339939 0.2281810045
+0.3200550079 0.4301350117 0.2209880054
+0.3303619921 0.4978519976 0.2489449978
+0.3257350028 0.4762600064 0.2373889983
+0.3161529899 0.4785160124 0.2390329987
+0.2546910048 0.3689720035 0.1605100036
+0.2674899995 0.3832049966 0.1779090017
+0.2671459913 0.3603239954 0.1720860004
+0.2708489895 0.4267250001 0.1955720037
+0.2685970068 0.4054009914 0.1855929941
+0.2553269863 0.4122500122 0.1762879938
+0.2929410040 0.3928869963 0.2001380026
+0.2808800042 0.3989830017 0.1933860034
+0.2946139872 0.4161170125 0.2069050074
+0.2865250111 0.4427309930 0.2125719935
+0.3016740084 0.4600659907 0.2270379961
+0.2974140048 0.4385679960 0.2157430053
+0.4461210072 0.4182519913 0.2346950024
+0.4337309897 0.4269529879 0.2345570028
+0.4422270060 0.4398440123 0.2346950024
+0.4117909968 0.3936649859 0.2331369966
+0.4234380126 0.4113360047 0.2340939939
+0.4262880087 0.3881599903 0.2339310050
+0.4204199910 0.4608980119 0.2349539995
+0.4214819968 0.4356540143 0.2343450040
+0.4089510143 0.4434959888 0.2341260016
+0.3600800037 0.3152070045 0.2215790004
+0.3731789887 0.3350799978 0.2258629948
+0.3754090071 0.3109639883 0.2249619961
+0.3705149889 0.3851790130 0.2275460064
+0.3715409935 0.3598810136 0.2266229987
+0.3571859896 0.3649570048 0.2235379964
+0.4016320109 0.3507499993 0.2310460061
+0.3863559961 0.3550739884 0.2291480005
+0.3993479908 0.3747859895 0.2315330058
+0.3725590110 0.4871090055 0.2383220047
+0.3711430132 0.4619730115 0.2340620011
+0.3589650095 0.4664840102 0.2344560027
+0.3963479996 0.4505859911 0.2339619994
+0.3836750090 0.4567089975 0.2339189947
+0.3966310024 0.4763669968 0.2359900028
+0.3568150103 0.4159559906 0.2271140069
+0.3703199923 0.4364460111 0.2310049981
+0.3701080084 0.4107719958 0.2289170027
+0.3966490030 0.4248310030 0.2327129990
+0.3976489902 0.3994930089 0.2319930047
+0.3837539852 0.4052670002 0.2305649966
+0.3453179896 0.3200950027 0.2172939926
+0.3175599873 0.3315080106 0.2061119974
+0.3311499953 0.3255459964 0.2121389955
+0.3440349996 0.3450030088 0.2184409946
+0.3433980048 0.3702470064 0.2199569941
+0.2794499993 0.3523209989 0.1822829992
+0.3050560057 0.3870050013 0.2060530037
+0.2920120060 0.3690660000 0.1950089931
+0.2918339968 0.3448820114 0.1912679970
+0.3044889867 0.3379540145 0.1991769969
+0.3454070091 0.4459129870 0.2294880003
+0.3434160054 0.3956260085 0.2221270055
+0.3440879881 0.4209240079 0.2252199948
+0.3318690062 0.4256500006 0.2232010067
+0.3183889985 0.4059379995 0.2154279947
+0.3301599920 0.3756990135 0.2158779949
+0.3171370029 0.3564029932 0.2082500011
+0.3174139857 0.3812850118 0.2112659961
+0.4603520036 0.4123429954 0.2346950024
+0.4518559873 0.3994530141 0.2346290052
+0.4627589881 0.3608779907 0.2345589995
+0.4575900137 0.3806250095 0.2345619947
+0.4742290080 0.3782809973 0.2349539995
+0.4415630102 0.3838360012 0.2343100011
+0.4299159944 0.3661650121 0.2335699946
+0.4779100120 0.2723430097 0.2364760041
+0.4749369919 0.2959469855 0.2355780005
+0.4915040135 0.2929680049 0.2383220047
+0.4411909878 0.3004789948 0.2319480032
+0.4581130147 0.2983599901 0.2335309982
+0.4446069896 0.2778689861 0.2314440012
+0.4844239950 0.3382810056 0.2359900028
+0.4714669883 0.3186219931 0.2350019962
+0.4674319923 0.3402920067 0.2346840054
+0.3913030028 0.3075799942 0.2273789942
+0.3782050014 0.2877070010 0.2236000001
+0.4174729884 0.3472859859 0.2322549969
+0.4044809937 0.3275740147 0.2302300036
+0.4109950066 0.2823390067 0.2278680056
+0.4076499939 0.3048520088 0.2291489989
+0.4243229926 0.3025619984 0.2305770069
+0.4337570071 0.3444640040 0.2330760062
+0.4504570067 0.3422139883 0.2337960005
+0.4375630021 0.3226499856 0.2325139940
+0.4903709888 0.0564833991 0.2630569935
+0.4893090129 0.0854483023 0.2572450042
+0.5000000000 0.0710927993 0.2709670067
+0.4650689960 0.1086210012 0.2350720018
+0.4776360095 0.0979031026 0.2453349978
+0.4680249989 0.0833204985 0.2373899966
+0.4997169971 0.1314049959 0.2582719922
+0.4882470071 0.1140030026 0.2522729933
+0.4871140122 0.1420689970 0.2480780035
+0.4079419971 0.1378629953 0.2065840065
+0.4230220020 0.1321890056 0.2122550011
+0.4136410058 0.1179549992 0.2038619965
+0.4447140098 0.1650999933 0.2259519994
+0.4334209859 0.1479669958 0.2196079940
+0.4294030070 0.1704249978 0.2207289934
+0.4421649873 0.1033030003 0.2181909978
+0.4376510084 0.1255670041 0.2187409997
+0.4517050087 0.1177780032 0.2262739986
+0.4960350096 0.2429679930 0.2424679995
+0.4825829864 0.2225580066 0.2395009995
+0.4804590046 0.2478899956 0.2377630025
+0.4858399928 0.1695690006 0.2445939928
+0.4843530059 0.1964250058 0.2417570055
+0.4985840023 0.1889050007 0.2489449978
+0.4539529979 0.2076739967 0.2309470028
+0.4694409966 0.2026180029 0.2358240038
+0.4567669928 0.1833889931 0.2313349992
+0.4736799896 0.1511200070 0.2394180000
+0.4622539878 0.1337839961 0.2333330065
+0.4595110118 0.1587329954 0.2321089953
+0.3020060062 0.1720940024 0.1663659960
+0.2948549986 0.1612440050 0.1536229998
+0.3195739985 0.1987480074 0.1884859949
+0.3102630079 0.1846220046 0.1780000031
+0.3227069974 0.1483840048 0.1699739993
+0.3160339892 0.1658470035 0.1743510067
+0.3307250142 0.1605489999 0.1810259968
+0.3653550148 0.2682099938 0.2188100070
+0.3528940082 0.2493029982 0.2129440010
+0.3609119952 0.2063519955 0.2075619996
+0.3566290140 0.2274409980 0.2104849964
+0.3726649880 0.2241840065 0.2141910046
+0.3410089910 0.2312700003 0.2059530020
+0.3298569918 0.2143509984 0.1978050023
+0.3834449947 0.1290149987 0.1925289929
+0.3769659996 0.1473010033 0.1966589987
+0.3925420046 0.1428190023 0.2014749944
+0.3458940089 0.1558890045 0.1867460012
+0.3613640070 0.1515679955 0.1918510050
+0.3527080119 0.1384350061 0.1820420027
+0.3817279935 0.1824650019 0.2082400024
+0.3710719943 0.1662980020 0.2005839944
+0.3657270074 0.1859800071 0.2042399943
+0.3398230076 0.1743530035 0.1909849942
+0.3344770074 0.1938309968 0.1946929991
+0.3499209881 0.1896740049 0.1998309940
+0.3814269900 0.2650650144 0.2218409926
+0.4144819975 0.2599540055 0.2264519930
+0.3978439867 0.2623859942 0.2242870033
+0.3850199878 0.2429289967 0.2197500020
+0.3889490068 0.2212149948 0.2173919976
+0.4643520117 0.2517719865 0.2340340018
+0.4380050004 0.2117969990 0.2269079983
+0.4509969950 0.2315090001 0.2308779955
+0.4478819966 0.2548980117 0.2310660034
+0.4312080145 0.2575399876 0.2286220044
+0.4026669860 0.1581799984 0.2093629986
+0.3931970000 0.1998669952 0.2148309946
+0.3977639973 0.1788560003 0.2121340036
+0.4137029946 0.1749249995 0.2162069976
+0.4255270064 0.1928640008 0.2220389992
+0.4053570032 0.2183170021 0.2203900069
+0.4180749953 0.2376130074 0.2249650061
+0.4217570126 0.2152590007 0.2234729975
+0.2767310143 0.1612440050 0.1280879974
+0.2658270001 0.1720940024 0.1142069995
+0.2707119882 0.1796129942 0.1300099939
+0.2591570020 0.1614370048 0.0810490996
+0.2620010078 0.1660739928 0.0978055969
+0.2688629925 0.1493069977 0.0962788984
+0.2508470118 0.2044679970 0.0979676023
+0.2560769916 0.1845680028 0.0982730985
+0.2474820018 0.1985870004 0.0803325027
+0.2559680045 0.1542350054 0.0149368001
+0.2557089925 0.1545930058 0.0309076998
+0.2633430064 0.1409319937 0.0306522995
+0.2434030026 0.1881349981 0.0271396004
+0.2491099983 0.1704290062 0.0296784993
+0.2437729985 0.1866309941 0.0100486996
+0.2646209896 0.1428699940 0.0632117987
+0.2560949922 0.1558240056 0.0473847017
+0.2572160065 0.1580619961 0.0641684979
+0.2248429954 0.2712709904 0.0093370900
+0.2294290066 0.2493029982 0.0142502999
+0.2265159935 0.2689619958 -0.0121622002
+0.2400960028 0.2140820026 0.0603855997
+0.2340259999 0.2310010046 0.0383880995
+0.2352740020 0.2351640016 0.0578618012
+0.2346059978 0.2257329971 0.0002518780
+0.2338310033 0.2278999984 0.0191111993
+0.2383909971 0.2073999941 0.0235217009
+0.2451730072 0.1939850003 0.0624969006
+0.2507990003 0.1752039939 0.0638533980
+0.2438410074 0.1905429959 0.0446924008
+0.2759239972 0.1687220037 -0.0763415024
+0.2717809975 0.1667329967 -0.0702038035
+0.2759239972 0.1600210071 -0.0677931011
+0.2651720047 0.1911879927 -0.0822070017
+0.2683030069 0.1774619967 -0.0752751008
+0.2712889910 0.1925189942 -0.0900069028
+0.2712619901 0.1529469937 -0.0503422990
+0.2682940066 0.1642349958 -0.0619856007
+0.2651279867 0.1616870016 -0.0521024987
+0.2578980029 0.2672699988 -0.1259579957
+0.2587710023 0.2457139939 -0.1126549989
+0.2651900053 0.2678070068 -0.1353890002
+0.2520770133 0.2052109987 -0.0695149004
+0.2543660104 0.2247979939 -0.0905798972
+0.2492749989 0.2240550071 -0.0787580982
+0.2673670053 0.2265300006 -0.1098169982
+0.2603619993 0.2256760001 -0.1009780020
+0.2625490129 0.2074030042 -0.0908351019
+0.2643229961 0.1424179971 0.0001950880
+0.2581509948 0.1556130052 -0.0147890998
+0.2567819953 0.1546110064 -0.0003394240
+0.2624160051 0.1592909992 -0.0408409983
+0.2600519955 0.1572079957 -0.0283359997
+0.2671459913 0.1467020065 -0.0271738004
+0.2489030063 0.1862149984 -0.0363412984
+0.2539950013 0.1705230027 -0.0314522982
+0.2519530058 0.1870840043 -0.0497376993
+0.2599810064 0.1736440063 -0.0560737997
+0.2600260079 0.1897169948 -0.0728064999
+0.2556549907 0.1882950068 -0.0619384013
+0.2715480030 0.4649800062 -0.2909240127
+0.2708559930 0.4412400126 -0.2667300105
+0.2906709909 0.4711030126 -0.3143959939
+0.2431219965 0.3857159913 -0.1797019988
+0.2545970082 0.4126250148 -0.2210430056
+0.2395160049 0.4085699916 -0.1944569945
+0.2764390111 0.4171510041 -0.2534160018
+0.2669050097 0.4155209959 -0.2407400012
+0.2639020085 0.3897759914 -0.2173870057
+0.2255509943 0.2899630070 -0.0410289988
+0.2265319973 0.3121989965 -0.0721461996
+0.2212380022 0.3125750124 -0.0486827008
+0.2384810001 0.3126060069 -0.1134919971
+0.2323459983 0.3122659922 -0.0938794985
+0.2346599996 0.2890720069 -0.0823644996
+0.2250110060 0.3582699895 -0.1157739982
+0.2294339985 0.3355230093 -0.1053389981
+0.2346760035 0.3599619865 -0.1409229934
+0.2657330036 0.3143920004 -0.1674519926
+0.2583140135 0.3140339851 -0.1576399952
+0.2578270137 0.2901510000 -0.1410479993
+0.2610760033 0.3639769852 -0.1953700036
+0.2593379915 0.3386969864 -0.1756580025
+0.2690109909 0.3646030128 -0.2060790062
+0.2454189956 0.2894209921 -0.1160560027
+0.2514150143 0.3135820031 -0.1454399973
+0.2448370010 0.3130809963 -0.1307229996
+0.2531299889 0.3630720079 -0.1813990027
+0.2443300039 0.3616980016 -0.1632059962
+0.2445970029 0.3372960091 -0.1465560049
+0.2292400002 0.2674939930 -0.0330674015
+0.2362670004 0.2243729979 -0.0179798007
+0.2326979935 0.2455170006 -0.0252516009
+0.2327159941 0.2666659951 -0.0528584011
+0.2367449999 0.2663069963 -0.0711446032
+0.2503280044 0.1692019999 -0.0025711299
+0.2448019981 0.2039490044 -0.0429578014
+0.2465720028 0.1857949942 -0.0218883008
+0.2448620051 0.1858969927 -0.0063809701
+0.2402399927 0.2043920010 -0.0115940999
+0.2516550124 0.2668220103 -0.1150090024
+0.2412279993 0.2662810087 -0.0876647979
+0.2461650074 0.2664780021 -0.1022870019
+0.2473690063 0.2445809990 -0.0897589996
+0.2450679988 0.2235800028 -0.0656493977
+0.2389429957 0.2443130016 -0.0606179982
+0.2386139929 0.2236469984 -0.0351931006
+0.2415470034 0.2234189957 -0.0511269011
+0.2397640049 0.4539160132 -0.2478819937
+0.1887689978 0.4370769858 -0.1634449959
+0.2110659927 0.4441669881 -0.2040369958
+0.2293010056 0.4283089936 -0.2030380070
+0.2225040048 0.4037629962 -0.1622039974
+0.1458320022 0.4270069897 -0.0166018996
+0.1499270052 0.4270069897 -0.0515438989
+0.1845290065 0.3949010074 -0.0610525012
+0.1687709987 0.4118730128 -0.0576802008
+0.1789000034 0.3948740065 -0.0286079999
+0.1582030058 0.4285370111 -0.0872619972
+0.1708800048 0.4317600131 -0.1242469996
+0.2153880000 0.3347580135 -0.0550592989
+0.2167620063 0.3135960102 -0.0240091998
+0.2176180035 0.3797270060 -0.1235970035
+0.2155340016 0.3567929864 -0.0881503969
+0.2018920034 0.3564969897 -0.0307286009
+0.2075600028 0.3560940027 -0.0595280007
+0.1973769963 0.3762359917 -0.0616248995
+0.2068780065 0.3995470107 -0.1283439994
+0.1913799942 0.4169630110 -0.1286039948
+0.1939519942 0.3964850008 -0.0943529010
+0.2468169928 0.4721780121 0.2125850022
+0.2409799993 0.4386219978 0.1776520014
+0.2427490056 0.4561850131 0.1932410002
+0.2166389972 0.4608710110 0.1794250011
+0.1931059957 0.4513109922 0.1472879946
+0.2427809983 0.3564569950 0.1412740052
+0.2413209975 0.3783710003 0.1470839977
+0.2105859965 0.3990100026 0.1141040027
+0.2267089933 0.3884289861 0.1316290051
+0.2155700028 0.3790560067 0.1071930006
+0.2402060032 0.3994930089 0.1547580063
+0.2398190051 0.4196349978 0.1647299975
+0.1512939930 0.4319480062 0.0507780984
+0.1462869942 0.4286180139 0.0175975002
+0.1741479933 0.4433079958 0.1150949970
+0.1604959965 0.4368630052 0.0831378028
+0.1838259995 0.4036830068 0.0653406978
+0.1730079949 0.4210039973 0.0733753964
+0.1927379966 0.4099400043 0.0946082026
+0.1999640018 0.4353860021 0.1342550069
+0.2218019962 0.4274230003 0.1508789957
+0.2054769993 0.4178619981 0.1230999976
+0.2655830085 0.1994860023 0.1310860068
+0.2460169941 0.2254420072 0.0972315967
+0.2553449869 0.2117460072 0.1151600033
+0.2610970140 0.2205549926 0.1316049993
+0.2570799887 0.2425220013 0.1318729967
+0.2196799964 0.2934539914 0.0048254002
+0.2243019938 0.2745479941 0.0312096998
+0.2279620022 0.2847259939 0.0746503025
+0.2252600044 0.2789790034 0.0530923009
+0.2199279964 0.3011609912 0.0515062995
+0.2303639948 0.2568899989 0.0553233996
+0.2376549989 0.2405080050 0.0773008019
+0.2471349984 0.3110710084 0.1344700009
+0.2446379960 0.3339520097 0.1371130049
+0.2534259856 0.2651079893 0.1322119981
+0.2500990033 0.2880429924 0.1329600066
+0.2282470018 0.3143739998 0.0963386968
+0.2389599979 0.3006780148 0.1156010032
+0.2325280011 0.2919229865 0.0955786034
+0.2466699928 0.2553589940 0.1147670001
+0.2414129972 0.2471950054 0.0963708982
+0.2369280010 0.2694450021 0.0957072005
+0.2139070034 0.3155829906 0.0010530400
+0.1988220066 0.3580819964 -0.0019175300
+0.2070789933 0.3372420073 -0.0013492800
+0.2130389959 0.3187249899 0.0261406004
+0.2144020051 0.3231830001 0.0509192012
+0.1627040058 0.4132030010 0.0095224800
+0.1932290047 0.3851250112 0.0589585006
+0.1784880012 0.3991439939 0.0348793007
+0.1768459976 0.3962439895 0.0034709999
+0.1888259947 0.3778209984 -0.0003543270
+0.2324919999 0.3456610143 0.1204930022
+0.2181189954 0.3290910125 0.0750835016
+0.2241899967 0.3365570009 0.0983572006
+0.2200450003 0.3581889868 0.1019319966
+0.2070289999 0.3714019954 0.0813876018
+0.2083059996 0.3446939886 0.0517950989
+0.1985940039 0.3610090017 0.0265708994
+0.2013300061 0.3654130101 0.0544313006
+0.5000000000 0.0710927993 -0.1577280015
+0.4816629887 0.0895498022 -0.1325830072
+0.4809550047 0.0640321970 -0.1260990053
+0.4815919995 0.1434369981 -0.1422239989
+0.4817329943 0.1164639965 -0.1367789954
+0.4997169971 0.1314049959 -0.1580079943
+0.4453949928 0.0950379968 -0.0880715027
+0.4635789990 0.1042340025 -0.1133949980
+0.4457609951 0.1158320010 -0.0991396978
+0.4779100120 0.2478899956 -0.1764079928
+0.4793969989 0.2226949930 -0.1660079956
+0.4960350096 0.2429679930 -0.1828649938
+0.4452649951 0.1846700013 -0.1305270046
+0.4624229968 0.2031439990 -0.1485339999
+0.4445689917 0.2081400007 -0.1423510015
+0.4985840023 0.1889050007 -0.1670749933
+0.4804590046 0.1968349963 -0.1566710025
+0.4811669886 0.1703899950 -0.1486569941
+0.3776679933 0.1280779988 -0.0571407005
+0.3941409886 0.1390189976 -0.0751215965
+0.3778339922 0.1442369968 -0.0715309009
+0.4281910062 0.1252530068 -0.0882994011
+0.4109619856 0.1328050047 -0.0805616006
+0.4107620120 0.1147510037 -0.0671996996
+0.4108330011 0.1727299988 -0.1068139970
+0.4109860063 0.1522939950 -0.0935697034
+0.4280729890 0.1676129997 -0.1121329963
+0.4458430111 0.1381309927 -0.1092989966
+0.4635500014 0.1532839984 -0.1294910014
+0.4456779957 0.1612389982 -0.1195650026
+0.4461210072 0.4182519913 -0.2759900093
+0.4517849982 0.3994530141 -0.2632940114
+0.4603520036 0.4123429954 -0.2720209956
+0.4292820096 0.3658480048 -0.2399699986
+0.4412949979 0.3837510049 -0.2525039911
+0.4260489941 0.3877969980 -0.2550689876
+0.4742290080 0.3782809973 -0.2499579936
+0.4573780000 0.3806250095 -0.2507190108
+0.4623340070 0.3608779907 -0.2378710061
+0.3741169870 0.2845109999 -0.1796790063
+0.3883709908 0.3053869903 -0.1957029998
+0.3728890121 0.3071410060 -0.1961130053
+0.4210099876 0.3020470142 -0.1952040046
+0.4044190049 0.3037100136 -0.1952880025
+0.4061419964 0.2814219892 -0.1795009971
+0.4005840123 0.3491609991 -0.2274859995
+0.4025189877 0.3262090087 -0.2112960070
+0.4162780046 0.3465470076 -0.2261690050
+0.4915040135 0.2929680049 -0.2033179998
+0.4734500051 0.2959469855 -0.1996230036
+0.4759280086 0.2723430097 -0.1876150072
+0.4667240083 0.3402920067 -0.2250079960
+0.4704050124 0.3186219931 -0.2121730000
+0.4844239950 0.3382810056 -0.2263689935
+0.4402680099 0.2777299881 -0.1814929992
+0.4556080103 0.2983199954 -0.1971489936
+0.4380970001 0.3002960086 -0.1957419962
+0.4493539929 0.3421509862 -0.2246080041
+0.4325149953 0.3441910148 -0.2250760049
+0.4355010092 0.3224210143 -0.2103199959
+0.2816590071 0.1600210071 -0.0704957023
+0.2889150083 0.1667329967 -0.0782520995
+0.2816590071 0.1687220037 -0.0789782032
+0.3083609939 0.1614490002 -0.0741382018
+0.2978270054 0.1641879976 -0.0763588026
+0.2973429859 0.1528040022 -0.0636831000
+0.2972899973 0.1924380064 -0.1014449969
+0.2978090048 0.1774349958 -0.0889481008
+0.3082720041 0.1910540015 -0.1017299965
+0.3621869981 0.1486119926 -0.0696974024
+0.3472709954 0.1522810012 -0.0693757012
+0.3469649851 0.1377529949 -0.0543068983
+0.3474189937 0.1855980009 -0.0999689996
+0.3474430144 0.1683000028 -0.0845839977
+0.3622989953 0.1832479984 -0.1000069976
+0.3197599947 0.1455119997 -0.0574042015
+0.3332160115 0.1555420011 -0.0702408999
+0.3201799989 0.1585769951 -0.0719491020
+0.3452300131 0.2651750147 -0.1632609963
+0.3460319936 0.2438340038 -0.1472309977
+0.3599570096 0.2638860047 -0.1634490043
+0.3199149966 0.2070000023 -0.1159889996
+0.3325960040 0.2247370034 -0.1312959939
+0.3193170130 0.2258580029 -0.1307819933
+0.3615550101 0.2219589949 -0.1312739998
+0.3466989994 0.2234459966 -0.1313100010
+0.3471710086 0.2040160000 -0.1155460030
+0.3203119934 0.1894340068 -0.1012540013
+0.3204010129 0.1732569933 -0.0865719020
+0.3333849907 0.1876250058 -0.1005169973
+0.3779279888 0.1617629975 -0.0861221030
+0.4104669988 0.1938299984 -0.1204620004
+0.3940649927 0.1769330055 -0.1031609997
+0.3778629899 0.1803929955 -0.1009740010
+0.3775799870 0.1999139935 -0.1161229983
+0.4598799944 0.2517539859 -0.1714320034
+0.4246450067 0.2572489977 -0.1654469967
+0.4420849979 0.2548039854 -0.1678290069
+0.4435189962 0.2315710038 -0.1547800004
+0.4269990027 0.2121510059 -0.1377400011
+0.3752729893 0.2624959946 -0.1634020060
+0.3770489991 0.2201679945 -0.1315850019
+0.3762699962 0.2410469949 -0.1473540068
+0.3911800086 0.2609759867 -0.1635019928
+0.4076519907 0.2592599988 -0.1640869975
+0.3931559920 0.2180099934 -0.1325799972
+0.4098300040 0.2153829932 -0.1345500052
+0.4088909924 0.2372290045 -0.1490930021
+0.2971319854 0.4721780121 -0.3181680143
+0.3074229956 0.5000000000 -0.3540289998
+0.2840439975 0.4177060127 -0.2600310147
+0.2895109951 0.4447399974 -0.2871209979
+0.3156349957 0.4995700121 -0.3456490040
+0.3026469946 0.4722850025 -0.3179129958
+0.3094049990 0.4720700085 -0.3170180023
+0.2739689946 0.3146429956 -0.1751299948
+0.2751959860 0.3393859863 -0.1935880035
+0.2976230085 0.3908680081 -0.2439319938
+0.2859170139 0.3649429977 -0.2191630006
+0.2956050038 0.3647109866 -0.2232780010
+0.2771340013 0.3649080098 -0.2136549950
+0.2799569964 0.3910470009 -0.2355979979
+0.3499029875 0.4939840138 -0.3318229914
+0.3363800049 0.4687399864 -0.3117179871
+0.3473539948 0.4664840102 -0.3094890118
+0.3171930015 0.4714260101 -0.3153690100
+0.3262549937 0.4703510106 -0.3136399984
+0.3303619921 0.4978519976 -0.3385500014
+0.3206329942 0.4158970118 -0.2684490085
+0.3230519891 0.4429860115 -0.2903290093
+0.3100720048 0.4169540107 -0.2677029967
+0.3043900132 0.4446949959 -0.2906090021
+0.2919070125 0.4178310037 -0.2639710009
+0.3005020022 0.4175800085 -0.2663030028
+0.2803480029 0.1797309965 -0.0869845971
+0.2963779867 0.2091010064 -0.1138549969
+0.2874020040 0.1932259947 -0.0995571017
+0.2787109911 0.1932529956 -0.0957904011
+0.2770670056 0.2092349976 -0.1058389992
+0.3443799913 0.2875190079 -0.1793269962
+0.3311640024 0.2663919926 -0.1623869985
+0.3053629994 0.2681199908 -0.1580719948
+0.3178479970 0.2674039900 -0.1607010067
+0.3172700107 0.2899450064 -0.1763619930
+0.3185780048 0.2460059971 -0.1455850005
+0.3068880141 0.2267660052 -0.1292680055
+0.2736389935 0.2682720125 -0.1431690007
+0.2734740078 0.2909030020 -0.1583579928
+0.2755759954 0.2271679938 -0.1169650033
+0.2743799984 0.2469460070 -0.1294019967
+0.2934449911 0.2910729945 -0.1697400063
+0.2831909955 0.2685320079 -0.1494459957
+0.2937879860 0.2684960067 -0.1543669999
+0.2849299908 0.2275030017 -0.1225659996
+0.2953900099 0.2273679972 -0.1266209930
+0.2944799960 0.2472030073 -0.1400479972
+0.4422270060 0.4398440123 -0.2904959917
+0.4337309897 0.4268450141 -0.2816979885
+0.4089510143 0.4428510070 -0.2922860086
+0.4214819968 0.4353320003 -0.2873080075
+0.4204199910 0.4608980119 -0.3048059940
+0.4233820140 0.4109289944 -0.2707630098
+0.4115819931 0.3927029967 -0.2580130100
+0.3589650095 0.4634760022 -0.3068389893
+0.3711430132 0.4597170055 -0.3039079905
+0.3725590110 0.4871090055 -0.3245620131
+0.3699870110 0.4060769975 -0.2651689947
+0.3702929914 0.4326460063 -0.2841129899
+0.3567230105 0.4093709886 -0.2666530013
+0.3966310024 0.4763669968 -0.3158589900
+0.3836750090 0.4550969899 -0.3005810082
+0.3963479996 0.4495109916 -0.2967450023
+0.3717330098 0.3306309879 -0.2126629949
+0.3579739928 0.3090029955 -0.1961340010
+0.3988609910 0.3729729950 -0.2439229935
+0.3854570091 0.3520970047 -0.2286890000
+0.3565819860 0.3575940132 -0.2300200015
+0.3707889915 0.3549799919 -0.2295680046
+0.3701750040 0.3801530004 -0.2470210046
+0.3974690139 0.3976089954 -0.2608000040
+0.3966079950 0.4231570065 -0.2783739865
+0.3836039901 0.4021379948 -0.2632200122
+0.3453949988 0.4391269982 -0.2881299853
+0.3188509941 0.3892390132 -0.2477809936
+0.3319729865 0.4143039882 -0.2684290111
+0.3440259993 0.4121290147 -0.2677839994
+0.3432239890 0.3856669962 -0.2484419942
+0.2832680047 0.3147859871 -0.1813499928
+0.3048320115 0.3142580092 -0.1900060028
+0.2935749888 0.3146879971 -0.1862599999
+0.2942709923 0.3392690122 -0.2040719986
+0.3062129915 0.3641560078 -0.2262810022
+0.3436250091 0.3107579947 -0.1956620067
+0.3429409862 0.3598859906 -0.2300499976
+0.3431060016 0.3348920047 -0.2125049978
+0.3299309909 0.3122709990 -0.1945710033
+0.3169749975 0.3134520054 -0.1927299947
+0.3299489915 0.3617649972 -0.2295259982
+0.3176830113 0.3631890118 -0.2283159941
+0.3170810044 0.3378910124 -0.2099999934
+0.4612720013 0.0622450002 -0.0871161968
+0.4769189954 0.0438368991 -0.1007559970
+0.4273529947 0.0889767036 -0.0615172014
+0.4443210065 0.0770855024 -0.0725603998
+0.4397400022 0.0503735989 -0.0248166006
+0.4424130023 0.0621973984 -0.0514555015
+0.4246770144 0.0628760010 -0.0214903001
+0.3616909981 0.1197450012 -0.0400470011
+0.3774319887 0.1137750000 -0.0423609987
+0.3768039942 0.0907657966 -0.0100832004
+0.3771350086 0.1013349965 -0.0267636999
+0.3612099886 0.0977896973 -0.0089211399
+0.3936870098 0.1069160029 -0.0463524014
+0.4103490114 0.0988269970 -0.0524696000
+0.3764710128 0.0671984032 0.0670910031
+0.3762229979 0.0702892989 0.0466743000
+0.3615669906 0.0747520998 0.0636539981
+0.4077030122 0.0645288005 0.0049169301
+0.3915959895 0.0669360012 0.0272787008
+0.4065879881 0.0575878993 0.0282455999
+0.3609800041 0.0827921033 0.0258050002
+0.3762669861 0.0752440989 0.0267767999
+0.3764910102 0.0820686966 0.0077835298
+0.4088470042 0.0736043975 -0.0169568993
+0.4097529948 0.0850370973 -0.0361055993
+0.3927640021 0.0828076005 -0.0128427995
+0.2803480029 0.1537339985 -0.0615434982
+0.2770229876 0.1436399966 -0.0404109992
+0.2787019908 0.1484439969 -0.0515930988
+0.2874189913 0.1483969986 -0.0560600013
+0.2964659929 0.1434019953 -0.0509395003
+0.2723590136 0.1309780031 0.0135171004
+0.2730189860 0.1330550015 -0.0011490700
+0.2937609851 0.1229790002 -0.0102428999
+0.2828460038 0.1265649945 -0.0045872000
+0.2931889892 0.1182290018 0.0044164001
+0.2740710080 0.1359390020 -0.0151289003
+0.2754429877 0.1395249963 -0.0282834992
+0.3324030042 0.1297219992 -0.0403774008
+0.3466109931 0.1249789968 -0.0393182002
+0.3071529865 0.1388110071 -0.0465410985
+0.3191969991 0.1342719942 -0.0428996012
+0.3181279898 0.1162300035 -0.0133544998
+0.3186179996 0.1245649979 -0.0282435007
+0.3057090044 0.1223130003 -0.0181482993
+0.2954970002 0.1354710013 -0.0378944986
+0.2849029899 0.1357090026 -0.0317886993
+0.2945590019 0.1287170053 -0.0243561007
+0.2888369858 0.1521130055 0.1398250014
+0.2838810086 0.1447010040 0.1250319928
+0.3013429940 0.1169089973 0.1154299974
+0.2921029925 0.1299410015 0.1208359972
+0.3052189946 0.1221999973 0.1304969937
+0.2799139917 0.1388960034 0.1094970033
+0.2768569887 0.1345809996 0.0934623033
+0.3477259874 0.0804601014 0.0782390013
+0.3347690105 0.0874133036 0.0903697014
+0.3492479920 0.0805137977 0.0961219966
+0.3071509898 0.1020210013 0.0762889013
+0.3206619918 0.0945129022 0.0838735998
+0.3192340136 0.0947635025 0.0670275018
+0.3254500031 0.0985545963 0.1164330021
+0.3227069974 0.0957347974 0.1004159972
+0.3115560114 0.1055350006 0.1086860001
+0.2723470032 0.1293489933 0.0446198992
+0.2721109986 0.1297419965 0.0287932996
+0.2746329904 0.1316359937 0.0771590024
+0.2731580138 0.1299349964 0.0608083010
+0.2934629917 0.1105400026 0.0510866009
+0.2827839851 0.1191859990 0.0568294004
+0.2944540083 0.1101640016 0.0673417971
+0.2859320045 0.1218400002 0.0892874002
+0.2983100116 0.1132209972 0.0997287035
+0.2960410118 0.1110140011 0.0836258978
+0.3467580080 0.0819998980 0.0599397011
+0.3459759951 0.0898908973 0.0241199005
+0.3462119997 0.0851415023 0.0417716987
+0.3322739899 0.0891320035 0.0555323996
+0.3183380067 0.0963570029 0.0500873998
+0.3463160098 0.1137989983 -0.0243280008
+0.3178150058 0.1092370003 0.0017388701
+0.3316569924 0.1102859974 -0.0103184003
+0.3460879922 0.1042210013 -0.0089082699
+0.3459590077 0.0962508023 0.0072067301
+0.2819760144 0.1209399998 0.0251419991
+0.3051689863 0.1039009988 0.0433306992
+0.2929790020 0.1120079979 0.0350595005
+0.2929109931 0.1145709977 0.0194828995
+0.3048770130 0.1106650010 0.0116924997
+0.3178600073 0.0992989019 0.0334381014
+0.3314799964 0.0967487991 0.0213769004
+0.3177089989 0.1035920009 0.0173020996
+0.3019349873 0.1444569975 0.1496219933
+0.3303000033 0.1322290003 0.1649349928
+0.3158209920 0.1379369944 0.1578679979
+0.3100160062 0.1292089969 0.1446889937
+0.3190430105 0.1154439971 0.1387549937
+0.3905600011 0.1114910021 0.1882590055
+0.3754799962 0.1169300005 0.1825290024
+0.3628590107 0.0979162008 0.1587489992
+0.3686299920 0.1065640002 0.1712999940
+0.3776569963 0.0919933990 0.1649460047
+0.3603020012 0.1220170036 0.1769360006
+0.3451859951 0.1270219982 0.1711779982
+0.3514069915 0.0822862983 0.1133679971
+0.3638679981 0.0736242011 0.1015459970
+0.3289720118 0.1030929983 0.1316930056
+0.3397699893 0.0920727029 0.1233140007
+0.3689480126 0.0793713033 0.1358830035
+0.3543280065 0.0857774988 0.1296849996
+0.3581160009 0.0909875035 0.1448580027
+0.3333800137 0.1093510017 0.1459829956
+0.3387610018 0.1173269972 0.1591649950
+0.3480440080 0.1036069989 0.1525350064
+0.4818750024 0.0435926989 0.2540920079
+0.4680869877 0.0226722993 0.2323769927
+0.4744589925 0.0323402993 0.2439260036
+0.4711929858 0.0579616018 0.2403530031
+0.4595459998 0.0704566985 0.2283910066
+0.4529530108 -0.0002892420 0.1675159931
+0.4551480114 0.0030408499 0.1871010065
+0.4406430125 0.0417748988 0.1930779964
+0.4479349852 0.0226734001 0.1901119947
+0.4365180135 0.0355175994 0.1777019948
+0.4584220052 0.0080091199 0.2042320073
+0.4627409875 0.0145618999 0.2192289978
+0.4198360145 0.0985364020 0.2012609988
+0.4053930044 0.1054409966 0.1944140047
+0.4470320046 0.0812549964 0.2180240005
+0.4337570071 0.0905470029 0.2090539932
+0.4202870131 0.0701098964 0.1867170036
+0.4264650047 0.0794825032 0.1986459941
+0.4334389865 0.0606299005 0.1959290057
+0.4521650076 0.0592578985 0.2181549966
+0.4574489892 0.0371082984 0.2185509950
+0.4458639920 0.0496972986 0.2064680010
+0.4696269929 0.0289638005 -0.0566143990
+0.4365719855 0.0413915999 0.0060863099
+0.4527490139 0.0354785994 -0.0225073993
+0.4632009864 0.0177063998 -0.0131096002
+0.4585289955 0.0095130401 0.0254864004
+0.3771429956 0.0659630969 0.0874795988
+0.3910909891 0.0590588003 0.0711859018
+0.4184289873 0.0396020003 0.0838460997
+0.4051539898 0.0499682017 0.0765950978
+0.4054189920 0.0490282997 0.0992394015
+0.4056139886 0.0527758002 0.0526441000
+0.4207299948 0.0469507016 0.0313040018
+0.4518910050 -0.0017931500 0.1199840009
+0.4518910050 -0.0019005700 0.1451240033
+0.4550240040 0.0036585301 0.0608212985
+0.4528999925 0.0000061719 0.0920358002
+0.4307129979 0.0270581003 0.1177370027
+0.4419170022 0.0139453001 0.1053370014
+0.4307299852 0.0276758000 0.0933369994
+0.4452709854 0.0203504004 0.0467309989
+0.4337930083 0.0346997008 0.0369815007
+0.4317750037 0.0301734004 0.0663513988
+0.3784529865 0.0664464980 0.1069810018
+0.3834620118 0.0725694969 0.1422290057
+0.3805240095 0.0686485991 0.1253020018
+0.3927280009 0.0586156994 0.1130810007
+0.4064640105 0.0498071015 0.1203759983
+0.3982770145 0.0946447998 0.1836609989
+0.4152429998 0.0624560006 0.1729820073
+0.4065339863 0.0783545002 0.1785970032
+0.3922770023 0.0855676010 0.1714289933
+0.3873560131 0.0782091990 0.1576250046
+0.4427930117 0.0148719000 0.1527580023
+0.4194729924 0.0397363007 0.1292629987
+0.4316160083 0.0281591993 0.1400099993
+0.4335269928 0.0309790000 0.1600179970
+0.4242880046 0.0467455983 0.1667830050
+0.4083929956 0.0523047000 0.1397909969
+0.3976399899 0.0650475994 0.1492509991
+0.4112960100 0.0565209985 0.1573459953
+3 0 1342 1344
+3 350 1343 1342
+3 352 1344 1343
+3 1344 1342 1343
+3 94 1345 1347
+3 351 1346 1345
+3 350 1347 1346
+3 1347 1345 1346
+3 96 1348 1350
+3 352 1349 1348
+3 351 1350 1349
+3 1350 1348 1349
+3 352 1343 1349
+3 350 1346 1343
+3 351 1349 1346
+3 1349 1343 1346
+3 26 1351 1353
+3 353 1352 1351
+3 355 1353 1352
+3 1353 1351 1352
+3 95 1354 1356
+3 354 1355 1354
+3 353 1356 1355
+3 1356 1354 1355
+3 94 1357 1359
+3 355 1358 1357
+3 354 1359 1358
+3 1359 1357 1358
+3 355 1352 1358
+3 353 1355 1352
+3 354 1358 1355
+3 1358 1352 1355
+3 28 1360 1362
+3 356 1361 1360
+3 358 1362 1361
+3 1362 1360 1361
+3 96 1363 1365
+3 357 1364 1363
+3 356 1365 1364
+3 1365 1363 1364
+3 95 1366 1368
+3 358 1367 1366
+3 357 1368 1367
+3 1368 1366 1367
+3 358 1361 1367
+3 356 1364 1361
+3 357 1367 1364
+3 1367 1361 1364
+3 96 1350 1363
+3 351 1369 1350
+3 357 1363 1369
+3 1363 1350 1369
+3 94 1359 1345
+3 354 1370 1359
+3 351 1345 1370
+3 1345 1359 1370
+3 95 1368 1354
+3 357 1371 1368
+3 354 1354 1371
+3 1354 1368 1371
+3 357 1369 1371
+3 351 1370 1369
+3 354 1371 1370
+3 1371 1369 1370
+3 1 1372 1374
+3 359 1373 1372
+3 361 1374 1373
+3 1374 1372 1373
+3 97 1375 1377
+3 360 1376 1375
+3 359 1377 1376
+3 1377 1375 1376
+3 99 1378 1380
+3 361 1379 1378
+3 360 1380 1379
+3 1380 1378 1379
+3 361 1373 1379
+3 359 1376 1373
+3 360 1379 1376
+3 1379 1373 1376
+3 27 1381 1383
+3 362 1382 1381
+3 364 1383 1382
+3 1383 1381 1382
+3 98 1384 1386
+3 363 1385 1384
+3 362 1386 1385
+3 1386 1384 1385
+3 97 1387 1389
+3 364 1388 1387
+3 363 1389 1388
+3 1389 1387 1388
+3 364 1382 1388
+3 362 1385 1382
+3 363 1388 1385
+3 1388 1382 1385
+3 26 1390 1392
+3 365 1391 1390
+3 367 1392 1391
+3 1392 1390 1391
+3 99 1393 1395
+3 366 1394 1393
+3 365 1395 1394
+3 1395 1393 1394
+3 98 1396 1398
+3 367 1397 1396
+3 366 1398 1397
+3 1398 1396 1397
+3 367 1391 1397
+3 365 1394 1391
+3 366 1397 1394
+3 1397 1391 1394
+3 99 1380 1393
+3 360 1399 1380
+3 366 1393 1399
+3 1393 1380 1399
+3 97 1389 1375
+3 363 1400 1389
+3 360 1375 1400
+3 1375 1389 1400
+3 98 1398 1384
+3 366 1401 1398
+3 363 1384 1401
+3 1384 1398 1401
+3 366 1399 1401
+3 360 1400 1399
+3 363 1401 1400
+3 1401 1399 1400
+3 3 1402 1404
+3 368 1403 1402
+3 370 1404 1403
+3 1404 1402 1403
+3 100 1405 1407
+3 369 1406 1405
+3 368 1407 1406
+3 1407 1405 1406
+3 102 1408 1410
+3 370 1409 1408
+3 369 1410 1409
+3 1410 1408 1409
+3 370 1403 1409
+3 368 1406 1403
+3 369 1409 1406
+3 1409 1403 1406
+3 28 1411 1413
+3 371 1412 1411
+3 373 1413 1412
+3 1413 1411 1412
+3 101 1414 1416
+3 372 1415 1414
+3 371 1416 1415
+3 1416 1414 1415
+3 100 1417 1419
+3 373 1418 1417
+3 372 1419 1418
+3 1419 1417 1418
+3 373 1412 1418
+3 371 1415 1412
+3 372 1418 1415
+3 1418 1412 1415
+3 27 1420 1422
+3 374 1421 1420
+3 376 1422 1421
+3 1422 1420 1421
+3 102 1423 1425
+3 375 1424 1423
+3 374 1425 1424
+3 1425 1423 1424
+3 101 1426 1428
+3 376 1427 1426
+3 375 1428 1427
+3 1428 1426 1427
+3 376 1421 1427
+3 374 1424 1421
+3 375 1427 1424
+3 1427 1421 1424
+3 102 1410 1423
+3 369 1429 1410
+3 375 1423 1429
+3 1423 1410 1429
+3 100 1419 1405
+3 372 1430 1419
+3 369 1405 1430
+3 1405 1419 1430
+3 101 1428 1414
+3 375 1431 1428
+3 372 1414 1431
+3 1414 1428 1431
+3 375 1429 1431
+3 369 1430 1429
+3 372 1431 1430
+3 1431 1429 1430
+3 28 1362 1411
+3 358 1432 1362
+3 371 1411 1432
+3 1411 1362 1432
+3 95 1433 1366
+3 377 1434 1433
+3 358 1366 1434
+3 1366 1433 1434
+3 101 1416 1436
+3 371 1435 1416
+3 377 1436 1435
+3 1436 1416 1435
+3 371 1432 1435
+3 358 1434 1432
+3 377 1435 1434
+3 1435 1432 1434
+3 26 1392 1351
+3 367 1437 1392
+3 353 1351 1437
+3 1351 1392 1437
+3 98 1438 1396
+3 378 1439 1438
+3 367 1396 1439
+3 1396 1438 1439
+3 95 1356 1441
+3 353 1440 1356
+3 378 1441 1440
+3 1441 1356 1440
+3 353 1437 1440
+3 367 1439 1437
+3 378 1440 1439
+3 1440 1437 1439
+3 27 1422 1381
+3 376 1442 1422
+3 362 1381 1442
+3 1381 1422 1442
+3 101 1443 1426
+3 379 1444 1443
+3 376 1426 1444
+3 1426 1443 1444
+3 98 1386 1446
+3 362 1445 1386
+3 379 1446 1445
+3 1446 1386 1445
+3 362 1442 1445
+3 376 1444 1442
+3 379 1445 1444
+3 1445 1442 1444
+3 101 1436 1443
+3 377 1447 1436
+3 379 1443 1447
+3 1443 1436 1447
+3 95 1441 1433
+3 378 1448 1441
+3 377 1433 1448
+3 1433 1441 1448
+3 98 1446 1438
+3 379 1449 1446
+3 378 1438 1449
+3 1438 1446 1449
+3 379 1447 1449
+3 377 1448 1447
+3 378 1449 1448
+3 1449 1447 1448
+3 3 1450 1402
+3 380 1451 1450
+3 368 1402 1451
+3 1402 1450 1451
+3 103 1452 1454
+3 381 1453 1452
+3 380 1454 1453
+3 1454 1452 1453
+3 100 1407 1456
+3 368 1455 1407
+3 381 1456 1455
+3 1456 1407 1455
+3 368 1451 1455
+3 380 1453 1451
+3 381 1455 1453
+3 1455 1451 1453
+3 29 1457 1459
+3 382 1458 1457
+3 384 1459 1458
+3 1459 1457 1458
+3 104 1460 1462
+3 383 1461 1460
+3 382 1462 1461
+3 1462 1460 1461
+3 103 1463 1465
+3 384 1464 1463
+3 383 1465 1464
+3 1465 1463 1464
+3 384 1458 1464
+3 382 1461 1458
+3 383 1464 1461
+3 1464 1458 1461
+3 28 1413 1467
+3 373 1466 1413
+3 386 1467 1466
+3 1467 1413 1466
+3 100 1468 1417
+3 385 1469 1468
+3 373 1417 1469
+3 1417 1468 1469
+3 104 1470 1472
+3 386 1471 1470
+3 385 1472 1471
+3 1472 1470 1471
+3 386 1466 1471
+3 373 1469 1466
+3 385 1471 1469
+3 1471 1466 1469
+3 100 1456 1468
+3 381 1473 1456
+3 385 1468 1473
+3 1468 1456 1473
+3 103 1465 1452
+3 383 1474 1465
+3 381 1452 1474
+3 1452 1465 1474
+3 104 1472 1460
+3 385 1475 1472
+3 383 1460 1475
+3 1460 1472 1475
+3 385 1473 1475
+3 381 1474 1473
+3 383 1475 1474
+3 1475 1473 1474
+3 8 1476 1478
+3 387 1477 1476
+3 389 1478 1477
+3 1478 1476 1477
+3 105 1479 1481
+3 388 1480 1479
+3 387 1481 1480
+3 1481 1479 1480
+3 107 1482 1484
+3 389 1483 1482
+3 388 1484 1483
+3 1484 1482 1483
+3 389 1477 1483
+3 387 1480 1477
+3 388 1483 1480
+3 1483 1477 1480
+3 30 1485 1487
+3 390 1486 1485
+3 392 1487 1486
+3 1487 1485 1486
+3 106 1488 1490
+3 391 1489 1488
+3 390 1490 1489
+3 1490 1488 1489
+3 105 1491 1493
+3 392 1492 1491
+3 391 1493 1492
+3 1493 1491 1492
+3 392 1486 1492
+3 390 1489 1486
+3 391 1492 1489
+3 1492 1486 1489
+3 29 1494 1496
+3 393 1495 1494
+3 395 1496 1495
+3 1496 1494 1495
+3 107 1497 1499
+3 394 1498 1497
+3 393 1499 1498
+3 1499 1497 1498
+3 106 1500 1502
+3 395 1501 1500
+3 394 1502 1501
+3 1502 1500 1501
+3 395 1495 1501
+3 393 1498 1495
+3 394 1501 1498
+3 1501 1495 1498
+3 107 1484 1497
+3 388 1503 1484
+3 394 1497 1503
+3 1497 1484 1503
+3 105 1493 1479
+3 391 1504 1493
+3 388 1479 1504
+3 1479 1493 1504
+3 106 1502 1488
+3 394 1505 1502
+3 391 1488 1505
+3 1488 1502 1505
+3 394 1503 1505
+3 388 1504 1503
+3 391 1505 1504
+3 1505 1503 1504
+3 0 1344 1507
+3 352 1506 1344
+3 397 1507 1506
+3 1507 1344 1506
+3 96 1508 1348
+3 396 1509 1508
+3 352 1348 1509
+3 1348 1508 1509
+3 109 1510 1512
+3 397 1511 1510
+3 396 1512 1511
+3 1512 1510 1511
+3 397 1506 1511
+3 352 1509 1506
+3 396 1511 1509
+3 1511 1506 1509
+3 28 1513 1360
+3 398 1514 1513
+3 356 1360 1514
+3 1360 1513 1514
+3 108 1515 1517
+3 399 1516 1515
+3 398 1517 1516
+3 1517 1515 1516
+3 96 1365 1519
+3 356 1518 1365
+3 399 1519 1518
+3 1519 1365 1518
+3 356 1514 1518
+3 398 1516 1514
+3 399 1518 1516
+3 1518 1514 1516
+3 30 1520 1522
+3 400 1521 1520
+3 402 1522 1521
+3 1522 1520 1521
+3 109 1523 1525
+3 401 1524 1523
+3 400 1525 1524
+3 1525 1523 1524
+3 108 1526 1528
+3 402 1527 1526
+3 401 1528 1527
+3 1528 1526 1527
+3 402 1521 1527
+3 400 1524 1521
+3 401 1527 1524
+3 1527 1521 1524
+3 109 1512 1523
+3 396 1529 1512
+3 401 1523 1529
+3 1523 1512 1529
+3 96 1519 1508
+3 399 1530 1519
+3 396 1508 1530
+3 1508 1519 1530
+3 108 1528 1515
+3 401 1531 1528
+3 399 1515 1531
+3 1515 1528 1531
+3 401 1529 1531
+3 396 1530 1529
+3 399 1531 1530
+3 1531 1529 1530
+3 28 1467 1513
+3 386 1532 1467
+3 398 1513 1532
+3 1513 1467 1532
+3 104 1533 1470
+3 403 1534 1533
+3 386 1470 1534
+3 1470 1533 1534
+3 108 1517 1536
+3 398 1535 1517
+3 403 1536 1535
+3 1536 1517 1535
+3 398 1532 1535
+3 386 1534 1532
+3 403 1535 1534
+3 1535 1532 1534
+3 29 1496 1457
+3 395 1537 1496
+3 382 1457 1537
+3 1457 1496 1537
+3 106 1538 1500
+3 404 1539 1538
+3 395 1500 1539
+3 1500 1538 1539
+3 104 1462 1541
+3 382 1540 1462
+3 404 1541 1540
+3 1541 1462 1540
+3 382 1537 1540
+3 395 1539 1537
+3 404 1540 1539
+3 1540 1537 1539
+3 30 1522 1485
+3 402 1542 1522
+3 390 1485 1542
+3 1485 1522 1542
+3 108 1543 1526
+3 405 1544 1543
+3 402 1526 1544
+3 1526 1543 1544
+3 106 1490 1546
+3 390 1545 1490
+3 405 1546 1545
+3 1546 1490 1545
+3 390 1542 1545
+3 402 1544 1542
+3 405 1545 1544
+3 1545 1542 1544
+3 108 1536 1543
+3 403 1547 1536
+3 405 1543 1547
+3 1543 1536 1547
+3 104 1541 1533
+3 404 1548 1541
+3 403 1533 1548
+3 1533 1541 1548
+3 106 1546 1538
+3 405 1549 1546
+3 404 1538 1549
+3 1538 1546 1549
+3 405 1547 1549
+3 403 1548 1547
+3 404 1549 1548
+3 1549 1547 1548
+3 3 1550 1450
+3 406 1551 1550
+3 380 1450 1551
+3 1450 1550 1551
+3 110 1552 1554
+3 407 1553 1552
+3 406 1554 1553
+3 1554 1552 1553
+3 103 1454 1556
+3 380 1555 1454
+3 407 1556 1555
+3 1556 1454 1555
+3 380 1551 1555
+3 406 1553 1551
+3 407 1555 1553
+3 1555 1551 1553
+3 31 1557 1559
+3 408 1558 1557
+3 410 1559 1558
+3 1559 1557 1558
+3 111 1560 1562
+3 409 1561 1560
+3 408 1562 1561
+3 1562 1560 1561
+3 110 1563 1565
+3 410 1564 1563
+3 409 1565 1564
+3 1565 1563 1564
+3 410 1558 1564
+3 408 1561 1558
+3 409 1564 1561
+3 1564 1558 1561
+3 29 1459 1567
+3 384 1566 1459
+3 412 1567 1566
+3 1567 1459 1566
+3 103 1568 1463
+3 411 1569 1568
+3 384 1463 1569
+3 1463 1568 1569
+3 111 1570 1572
+3 412 1571 1570
+3 411 1572 1571
+3 1572 1570 1571
+3 412 1566 1571
+3 384 1569 1566
+3 411 1571 1569
+3 1571 1566 1569
+3 103 1556 1568
+3 407 1573 1556
+3 411 1568 1573
+3 1568 1556 1573
+3 110 1565 1552
+3 409 1574 1565
+3 407 1552 1574
+3 1552 1565 1574
+3 111 1572 1560
+3 411 1575 1572
+3 409 1560 1575
+3 1560 1572 1575
+3 411 1573 1575
+3 407 1574 1573
+3 409 1575 1574
+3 1575 1573 1574
+3 5 1576 1578
+3 413 1577 1576
+3 415 1578 1577
+3 1578 1576 1577
+3 112 1579 1581
+3 414 1580 1579
+3 413 1581 1580
+3 1581 1579 1580
+3 114 1582 1584
+3 415 1583 1582
+3 414 1584 1583
+3 1584 1582 1583
+3 415 1577 1583
+3 413 1580 1577
+3 414 1583 1580
+3 1583 1577 1580
+3 32 1585 1587
+3 416 1586 1585
+3 418 1587 1586
+3 1587 1585 1586
+3 113 1588 1590
+3 417 1589 1588
+3 416 1590 1589
+3 1590 1588 1589
+3 112 1591 1593
+3 418 1592 1591
+3 417 1593 1592
+3 1593 1591 1592
+3 418 1586 1592
+3 416 1589 1586
+3 417 1592 1589
+3 1592 1586 1589
+3 31 1594 1596
+3 419 1595 1594
+3 421 1596 1595
+3 1596 1594 1595
+3 114 1597 1599
+3 420 1598 1597
+3 419 1599 1598
+3 1599 1597 1598
+3 113 1600 1602
+3 421 1601 1600
+3 420 1602 1601
+3 1602 1600 1601
+3 421 1595 1601
+3 419 1598 1595
+3 420 1601 1598
+3 1601 1595 1598
+3 114 1584 1597
+3 414 1603 1584
+3 420 1597 1603
+3 1597 1584 1603
+3 112 1593 1579
+3 417 1604 1593
+3 414 1579 1604
+3 1579 1593 1604
+3 113 1602 1588
+3 420 1605 1602
+3 417 1588 1605
+3 1588 1602 1605
+3 420 1603 1605
+3 414 1604 1603
+3 417 1605 1604
+3 1605 1603 1604
+3 8 1478 1607
+3 389 1606 1478
+3 423 1607 1606
+3 1607 1478 1606
+3 107 1608 1482
+3 422 1609 1608
+3 389 1482 1609
+3 1482 1608 1609
+3 116 1610 1612
+3 423 1611 1610
+3 422 1612 1611
+3 1612 1610 1611
+3 423 1606 1611
+3 389 1609 1606
+3 422 1611 1609
+3 1611 1606 1609
+3 29 1613 1494
+3 424 1614 1613
+3 393 1494 1614
+3 1494 1613 1614
+3 115 1615 1617
+3 425 1616 1615
+3 424 1617 1616
+3 1617 1615 1616
+3 107 1499 1619
+3 393 1618 1499
+3 425 1619 1618
+3 1619 1499 1618
+3 393 1614 1618
+3 424 1616 1614
+3 425 1618 1616
+3 1618 1614 1616
+3 32 1620 1622
+3 426 1621 1620
+3 428 1622 1621
+3 1622 1620 1621
+3 116 1623 1625
+3 427 1624 1623
+3 426 1625 1624
+3 1625 1623 1624
+3 115 1626 1628
+3 428 1627 1626
+3 427 1628 1627
+3 1628 1626 1627
+3 428 1621 1627
+3 426 1624 1621
+3 427 1627 1624
+3 1627 1621 1624
+3 116 1612 1623
+3 422 1629 1612
+3 427 1623 1629
+3 1623 1612 1629
+3 107 1619 1608
+3 425 1630 1619
+3 422 1608 1630
+3 1608 1619 1630
+3 115 1628 1615
+3 427 1631 1628
+3 425 1615 1631
+3 1615 1628 1631
+3 427 1629 1631
+3 422 1630 1629
+3 425 1631 1630
+3 1631 1629 1630
+3 29 1567 1613
+3 412 1632 1567
+3 424 1613 1632
+3 1613 1567 1632
+3 111 1633 1570
+3 429 1634 1633
+3 412 1570 1634
+3 1570 1633 1634
+3 115 1617 1636
+3 424 1635 1617
+3 429 1636 1635
+3 1636 1617 1635
+3 424 1632 1635
+3 412 1634 1632
+3 429 1635 1634
+3 1635 1632 1634
+3 31 1596 1557
+3 421 1637 1596
+3 408 1557 1637
+3 1557 1596 1637
+3 113 1638 1600
+3 430 1639 1638
+3 421 1600 1639
+3 1600 1638 1639
+3 111 1562 1641
+3 408 1640 1562
+3 430 1641 1640
+3 1641 1562 1640
+3 408 1637 1640
+3 421 1639 1637
+3 430 1640 1639
+3 1640 1637 1639
+3 32 1622 1585
+3 428 1642 1622
+3 416 1585 1642
+3 1585 1622 1642
+3 115 1643 1626
+3 431 1644 1643
+3 428 1626 1644
+3 1626 1643 1644
+3 113 1590 1646
+3 416 1645 1590
+3 431 1646 1645
+3 1646 1590 1645
+3 416 1642 1645
+3 428 1644 1642
+3 431 1645 1644
+3 1645 1642 1644
+3 115 1636 1643
+3 429 1647 1636
+3 431 1643 1647
+3 1643 1636 1647
+3 111 1641 1633
+3 430 1648 1641
+3 429 1633 1648
+3 1633 1641 1648
+3 113 1646 1638
+3 431 1649 1646
+3 430 1638 1649
+3 1638 1646 1649
+3 431 1647 1649
+3 429 1648 1647
+3 430 1649 1648
+3 1649 1647 1648
+3 23 1650 1652
+3 432 1651 1650
+3 434 1652 1651
+3 1652 1650 1651
+3 117 1653 1655
+3 433 1654 1653
+3 432 1655 1654
+3 1655 1653 1654
+3 119 1656 1658
+3 434 1657 1656
+3 433 1658 1657
+3 1658 1656 1657
+3 434 1651 1657
+3 432 1654 1651
+3 433 1657 1654
+3 1657 1651 1654
+3 33 1659 1661
+3 435 1660 1659
+3 437 1661 1660
+3 1661 1659 1660
+3 118 1662 1664
+3 436 1663 1662
+3 435 1664 1663
+3 1664 1662 1663
+3 117 1665 1667
+3 437 1666 1665
+3 436 1667 1666
+3 1667 1665 1666
+3 437 1660 1666
+3 435 1663 1660
+3 436 1666 1663
+3 1666 1660 1663
+3 35 1668 1670
+3 438 1669 1668
+3 440 1670 1669
+3 1670 1668 1669
+3 119 1671 1673
+3 439 1672 1671
+3 438 1673 1672
+3 1673 1671 1672
+3 118 1674 1676
+3 440 1675 1674
+3 439 1676 1675
+3 1676 1674 1675
+3 440 1669 1675
+3 438 1672 1669
+3 439 1675 1672
+3 1675 1669 1672
+3 119 1658 1671
+3 433 1677 1658
+3 439 1671 1677
+3 1671 1658 1677
+3 117 1667 1653
+3 436 1678 1667
+3 433 1653 1678
+3 1653 1667 1678
+3 118 1676 1662
+3 439 1679 1676
+3 436 1662 1679
+3 1662 1676 1679
+3 439 1677 1679
+3 433 1678 1677
+3 436 1679 1678
+3 1679 1677 1678
+3 22 1680 1682
+3 441 1681 1680
+3 443 1682 1681
+3 1682 1680 1681
+3 120 1683 1685
+3 442 1684 1683
+3 441 1685 1684
+3 1685 1683 1684
+3 122 1686 1688
+3 443 1687 1686
+3 442 1688 1687
+3 1688 1686 1687
+3 443 1681 1687
+3 441 1684 1681
+3 442 1687 1684
+3 1687 1681 1684
+3 34 1689 1691
+3 444 1690 1689
+3 446 1691 1690
+3 1691 1689 1690
+3 121 1692 1694
+3 445 1693 1692
+3 444 1694 1693
+3 1694 1692 1693
+3 120 1695 1697
+3 446 1696 1695
+3 445 1697 1696
+3 1697 1695 1696
+3 446 1690 1696
+3 444 1693 1690
+3 445 1696 1693
+3 1696 1690 1693
+3 33 1698 1700
+3 447 1699 1698
+3 449 1700 1699
+3 1700 1698 1699
+3 122 1701 1703
+3 448 1702 1701
+3 447 1703 1702
+3 1703 1701 1702
+3 121 1704 1706
+3 449 1705 1704
+3 448 1706 1705
+3 1706 1704 1705
+3 449 1699 1705
+3 447 1702 1699
+3 448 1705 1702
+3 1705 1699 1702
+3 122 1688 1701
+3 442 1707 1688
+3 448 1701 1707
+3 1701 1688 1707
+3 120 1697 1683
+3 445 1708 1697
+3 442 1683 1708
+3 1683 1697 1708
+3 121 1706 1692
+3 448 1709 1706
+3 445 1692 1709
+3 1692 1706 1709
+3 448 1707 1709
+3 442 1708 1707
+3 445 1709 1708
+3 1709 1707 1708
+3 19 1710 1712
+3 450 1711 1710
+3 452 1712 1711
+3 1712 1710 1711
+3 123 1713 1715
+3 451 1714 1713
+3 450 1715 1714
+3 1715 1713 1714
+3 125 1716 1718
+3 452 1717 1716
+3 451 1718 1717
+3 1718 1716 1717
+3 452 1711 1717
+3 450 1714 1711
+3 451 1717 1714
+3 1717 1711 1714
+3 35 1719 1721
+3 453 1720 1719
+3 455 1721 1720
+3 1721 1719 1720
+3 124 1722 1724
+3 454 1723 1722
+3 453 1724 1723
+3 1724 1722 1723
+3 123 1725 1727
+3 455 1726 1725
+3 454 1727 1726
+3 1727 1725 1726
+3 455 1720 1726
+3 453 1723 1720
+3 454 1726 1723
+3 1726 1720 1723
+3 34 1728 1730
+3 456 1729 1728
+3 458 1730 1729
+3 1730 1728 1729
+3 125 1731 1733
+3 457 1732 1731
+3 456 1733 1732
+3 1733 1731 1732
+3 124 1734 1736
+3 458 1735 1734
+3 457 1736 1735
+3 1736 1734 1735
+3 458 1729 1735
+3 456 1732 1729
+3 457 1735 1732
+3 1735 1729 1732
+3 125 1718 1731
+3 451 1737 1718
+3 457 1731 1737
+3 1731 1718 1737
+3 123 1727 1713
+3 454 1738 1727
+3 451 1713 1738
+3 1713 1727 1738
+3 124 1736 1722
+3 457 1739 1736
+3 454 1722 1739
+3 1722 1736 1739
+3 457 1737 1739
+3 451 1738 1737
+3 454 1739 1738
+3 1739 1737 1738
+3 35 1670 1719
+3 440 1740 1670
+3 453 1719 1740
+3 1719 1670 1740
+3 118 1741 1674
+3 459 1742 1741
+3 440 1674 1742
+3 1674 1741 1742
+3 124 1724 1744
+3 453 1743 1724
+3 459 1744 1743
+3 1744 1724 1743
+3 453 1740 1743
+3 440 1742 1740
+3 459 1743 1742
+3 1743 1740 1742
+3 33 1700 1659
+3 449 1745 1700
+3 435 1659 1745
+3 1659 1700 1745
+3 121 1746 1704
+3 460 1747 1746
+3 449 1704 1747
+3 1704 1746 1747
+3 118 1664 1749
+3 435 1748 1664
+3 460 1749 1748
+3 1749 1664 1748
+3 435 1745 1748
+3 449 1747 1745
+3 460 1748 1747
+3 1748 1745 1747
+3 34 1730 1689
+3 458 1750 1730
+3 444 1689 1750
+3 1689 1730 1750
+3 124 1751 1734
+3 461 1752 1751
+3 458 1734 1752
+3 1734 1751 1752
+3 121 1694 1754
+3 444 1753 1694
+3 461 1754 1753
+3 1754 1694 1753
+3 444 1750 1753
+3 458 1752 1750
+3 461 1753 1752
+3 1753 1750 1752
+3 124 1744 1751
+3 459 1755 1744
+3 461 1751 1755
+3 1751 1744 1755
+3 118 1749 1741
+3 460 1756 1749
+3 459 1741 1756
+3 1741 1749 1756
+3 121 1754 1746
+3 461 1757 1754
+3 460 1746 1757
+3 1746 1754 1757
+3 461 1755 1757
+3 459 1756 1755
+3 460 1757 1756
+3 1757 1755 1756
+3 1325 5167 5233
+3 462 1759 1758
+3 1333 5233 5197
+3 1760 1758 1759
+3 126 1761 1763
+3 463 1762 1761
+3 462 1763 1762
+3 1763 1761 1762
+3 5167 5197 5233
+3 85 5197 5167
+3 463 1766 1765
+3 1766 1764 1765
+3 464 1759 1765
+3 462 1762 1759
+3 463 1765 1762
+3 1765 1759 1762
+3 36 1767 1769
+3 465 1768 1767
+3 467 1769 1768
+3 1769 1767 1768
+3 127 1770 1772
+3 466 1771 1770
+3 465 1772 1771
+3 1772 1770 1771
+3 126 1773 1775
+3 467 1774 1773
+3 466 1775 1774
+3 1775 1773 1774
+3 467 1768 1774
+3 465 1771 1768
+3 466 1774 1771
+3 1774 1768 1771
+3 5200 5234 5235
+3 1333 5200 5235
+3 470 1778 1777
+3 1778 1776 1777
+3 348 5234 5200
+3 469 1780 1779
+3 1340 5235 5234
+3 1781 1779 1780
+3 127 1782 1784
+3 470 1783 1782
+3 469 1784 1783
+3 1784 1782 1783
+3 470 1777 1783
+3 468 1780 1777
+3 469 1783 1780
+3 1783 1777 1780
+3 128 1766 1779
+3 463 1785 1766
+3 469 1779 1785
+3 1779 1766 1785
+3 126 1775 1761
+3 466 1786 1775
+3 463 1761 1786
+3 1761 1775 1786
+3 127 1784 1770
+3 469 1787 1784
+3 466 1770 1787
+3 1770 1784 1787
+3 469 1785 1787
+3 463 1786 1785
+3 466 1787 1786
+3 1787 1785 1786
+3 1 1374 1789
+3 361 1788 1374
+3 472 1789 1788
+3 1789 1374 1788
+3 99 1790 1378
+3 471 1791 1790
+3 361 1378 1791
+3 1378 1790 1791
+3 130 1792 1794
+3 472 1793 1792
+3 471 1794 1793
+3 1794 1792 1793
+3 472 1788 1793
+3 361 1791 1788
+3 471 1793 1791
+3 1793 1788 1791
+3 26 1795 1390
+3 473 1796 1795
+3 365 1390 1796
+3 1390 1795 1796
+3 129 1797 1799
+3 474 1798 1797
+3 473 1799 1798
+3 1799 1797 1798
+3 99 1395 1801
+3 365 1800 1395
+3 474 1801 1800
+3 1801 1395 1800
+3 365 1796 1800
+3 473 1798 1796
+3 474 1800 1798
+3 1800 1796 1798
+3 36 1802 1804
+3 475 1803 1802
+3 477 1804 1803
+3 1804 1802 1803
+3 130 1805 1807
+3 476 1806 1805
+3 475 1807 1806
+3 1807 1805 1806
+3 129 1808 1810
+3 477 1809 1808
+3 476 1810 1809
+3 1810 1808 1809
+3 477 1803 1809
+3 475 1806 1803
+3 476 1809 1806
+3 1809 1803 1806
+3 130 1794 1805
+3 471 1811 1794
+3 476 1805 1811
+3 1805 1794 1811
+3 99 1801 1790
+3 474 1812 1801
+3 471 1790 1812
+3 1790 1801 1812
+3 129 1810 1797
+3 476 1813 1810
+3 474 1797 1813
+3 1797 1810 1813
+3 476 1811 1813
+3 471 1812 1811
+3 474 1813 1812
+3 1813 1811 1812
+3 5222 5239 5240
+3 1340 5236 5235
+3 350 1342 1815
+3 1342 1814 1815
+3 1325 5233 5236
+3 479 1817 1816
+3 1333 5235 5233
+3 1818 1816 1817
+3 94 1347 1820
+3 350 1819 1347
+3 479 1820 1819
+3 1820 1347 1819
+3 350 1815 1819
+3 478 1817 1815
+3 479 1819 1817
+3 1819 1815 1817
+3 347 5171 5237
+3 480 1822 1821
+3 1325 5236 5171
+3 1823 1821 1822
+3 132 1824 1826
+3 481 1825 1824
+3 480 1826 1825
+3 1826 1824 1825
+3 5237 5171 5236
+3 1340 5237 5236
+3 481 1829 1828
+3 1829 1827 1828
+3 482 1822 1828
+3 480 1825 1822
+3 481 1828 1825
+3 1828 1822 1825
+3 26 1353 1831
+3 355 1830 1353
+3 484 1831 1830
+3 1831 1353 1830
+3 94 1832 1357
+3 483 1833 1832
+3 355 1357 1833
+3 1357 1832 1833
+3 132 1834 1836
+3 484 1835 1834
+3 483 1836 1835
+3 1836 1834 1835
+3 484 1830 1835
+3 355 1833 1830
+3 483 1835 1833
+3 1835 1830 1833
+3 94 1820 1832
+3 479 1837 1820
+3 483 1832 1837
+3 1832 1820 1837
+3 131 1829 1816
+3 481 1838 1829
+3 479 1816 1838
+3 1816 1829 1838
+3 132 1836 1824
+3 483 1839 1836
+3 481 1824 1839
+3 1824 1836 1839
+3 483 1837 1839
+3 479 1838 1837
+3 481 1839 1838
+3 1839 1837 1838
+3 37 1778 1821
+3 470 1840 1778
+3 480 1821 1840
+3 1821 1778 1840
+3 127 1841 1782
+3 485 1842 1841
+3 470 1782 1842
+3 1782 1841 1842
+3 132 1826 1844
+3 480 1843 1826
+3 485 1844 1843
+3 1844 1826 1843
+3 480 1840 1843
+3 470 1842 1840
+3 485 1843 1842
+3 1843 1840 1842
+3 36 1804 1767
+3 477 1845 1804
+3 465 1767 1845
+3 1767 1804 1845
+3 129 1846 1808
+3 486 1847 1846
+3 477 1808 1847
+3 1808 1846 1847
+3 127 1772 1849
+3 465 1848 1772
+3 486 1849 1848
+3 1849 1772 1848
+3 465 1845 1848
+3 477 1847 1845
+3 486 1848 1847
+3 1848 1845 1847
+3 26 1831 1795
+3 484 1850 1831
+3 473 1795 1850
+3 1795 1831 1850
+3 132 1851 1834
+3 487 1852 1851
+3 484 1834 1852
+3 1834 1851 1852
+3 129 1799 1854
+3 473 1853 1799
+3 487 1854 1853
+3 1854 1799 1853
+3 473 1850 1853
+3 484 1852 1850
+3 487 1853 1852
+3 1853 1850 1852
+3 132 1844 1851
+3 485 1855 1844
+3 487 1851 1855
+3 1851 1844 1855
+3 127 1849 1841
+3 486 1856 1849
+3 485 1841 1856
+3 1841 1849 1856
+3 129 1854 1846
+3 487 1857 1854
+3 486 1846 1857
+3 1846 1854 1857
+3 487 1855 1857
+3 485 1856 1855
+3 486 1857 1856
+3 1857 1855 1856
+3 4 1858 1758
+3 488 1859 1858
+3 462 1758 1859
+3 1758 1858 1859
+3 133 1860 1862
+3 489 1861 1860
+3 488 1862 1861
+3 1862 1860 1861
+3 126 1763 1864
+3 462 1863 1763
+3 489 1864 1863
+3 1864 1763 1863
+3 462 1859 1863
+3 488 1861 1859
+3 489 1863 1861
+3 1863 1859 1861
+3 38 1865 1867
+3 490 1866 1865
+3 492 1867 1866
+3 1867 1865 1866
+3 134 1868 1870
+3 491 1869 1868
+3 490 1870 1869
+3 1870 1868 1869
+3 133 1871 1873
+3 492 1872 1871
+3 491 1873 1872
+3 1873 1871 1872
+3 492 1866 1872
+3 490 1869 1866
+3 491 1872 1869
+3 1872 1866 1869
+3 36 1769 1875
+3 467 1874 1769
+3 494 1875 1874
+3 1875 1769 1874
+3 126 1876 1773
+3 493 1877 1876
+3 467 1773 1877
+3 1773 1876 1877
+3 134 1878 1880
+3 494 1879 1878
+3 493 1880 1879
+3 1880 1878 1879
+3 494 1874 1879
+3 467 1877 1874
+3 493 1879 1877
+3 1879 1874 1877
+3 126 1864 1876
+3 489 1881 1864
+3 493 1876 1881
+3 1876 1864 1881
+3 133 1873 1860
+3 491 1882 1873
+3 489 1860 1882
+3 1860 1873 1882
+3 134 1880 1868
+3 493 1883 1880
+3 491 1868 1883
+3 1868 1880 1883
+3 493 1881 1883
+3 489 1882 1881
+3 491 1883 1882
+3 1883 1881 1882
+3 2 1884 1886
+3 495 1885 1884
+3 497 1886 1885
+3 1886 1884 1885
+3 135 1887 1889
+3 496 1888 1887
+3 495 1889 1888
+3 1889 1887 1888
+3 137 1890 1892
+3 497 1891 1890
+3 496 1892 1891
+3 1892 1890 1891
+3 497 1885 1891
+3 495 1888 1885
+3 496 1891 1888
+3 1891 1885 1888
+3 39 1893 1895
+3 498 1894 1893
+3 500 1895 1894
+3 1895 1893 1894
+3 136 1896 1898
+3 499 1897 1896
+3 498 1898 1897
+3 1898 1896 1897
+3 135 1899 1901
+3 500 1900 1899
+3 499 1901 1900
+3 1901 1899 1900
+3 500 1894 1900
+3 498 1897 1894
+3 499 1900 1897
+3 1900 1894 1897
+3 38 1902 1904
+3 501 1903 1902
+3 503 1904 1903
+3 1904 1902 1903
+3 137 1905 1907
+3 502 1906 1905
+3 501 1907 1906
+3 1907 1905 1906
+3 136 1908 1910
+3 503 1909 1908
+3 502 1910 1909
+3 1910 1908 1909
+3 503 1903 1909
+3 501 1906 1903
+3 502 1909 1906
+3 1909 1903 1906
+3 137 1892 1905
+3 496 1911 1892
+3 502 1905 1911
+3 1905 1892 1911
+3 135 1901 1887
+3 499 1912 1901
+3 496 1887 1912
+3 1887 1901 1912
+3 136 1910 1896
+3 502 1913 1910
+3 499 1896 1913
+3 1896 1910 1913
+3 502 1911 1913
+3 496 1912 1911
+3 499 1913 1912
+3 1913 1911 1912
+3 1 1789 1915
+3 472 1914 1789
+3 505 1915 1914
+3 1915 1789 1914
+3 130 1916 1792
+3 504 1917 1916
+3 472 1792 1917
+3 1792 1916 1917
+3 139 1918 1920
+3 505 1919 1918
+3 504 1920 1919
+3 1920 1918 1919
+3 505 1914 1919
+3 472 1917 1914
+3 504 1919 1917
+3 1919 1914 1917
+3 36 1921 1802
+3 506 1922 1921
+3 475 1802 1922
+3 1802 1921 1922
+3 138 1923 1925
+3 507 1924 1923
+3 506 1925 1924
+3 1925 1923 1924
+3 130 1807 1927
+3 475 1926 1807
+3 507 1927 1926
+3 1927 1807 1926
+3 475 1922 1926
+3 506 1924 1922
+3 507 1926 1924
+3 1926 1922 1924
+3 39 1928 1930
+3 508 1929 1928
+3 510 1930 1929
+3 1930 1928 1929
+3 139 1931 1933
+3 509 1932 1931
+3 508 1933 1932
+3 1933 1931 1932
+3 138 1934 1936
+3 510 1935 1934
+3 509 1936 1935
+3 1936 1934 1935
+3 510 1929 1935
+3 508 1932 1929
+3 509 1935 1932
+3 1935 1929 1932
+3 139 1920 1931
+3 504 1937 1920
+3 509 1931 1937
+3 1931 1920 1937
+3 130 1927 1916
+3 507 1938 1927
+3 504 1916 1938
+3 1916 1927 1938
+3 138 1936 1923
+3 509 1939 1936
+3 507 1923 1939
+3 1923 1936 1939
+3 509 1937 1939
+3 504 1938 1937
+3 507 1939 1938
+3 1939 1937 1938
+3 36 1875 1921
+3 494 1940 1875
+3 506 1921 1940
+3 1921 1875 1940
+3 134 1941 1878
+3 511 1942 1941
+3 494 1878 1942
+3 1878 1941 1942
+3 138 1925 1944
+3 506 1943 1925
+3 511 1944 1943
+3 1944 1925 1943
+3 506 1940 1943
+3 494 1942 1940
+3 511 1943 1942
+3 1943 1940 1942
+3 38 1904 1865
+3 503 1945 1904
+3 490 1865 1945
+3 1865 1904 1945
+3 136 1946 1908
+3 512 1947 1946
+3 503 1908 1947
+3 1908 1946 1947
+3 134 1870 1949
+3 490 1948 1870
+3 512 1949 1948
+3 1949 1870 1948
+3 490 1945 1948
+3 503 1947 1945
+3 512 1948 1947
+3 1948 1945 1947
+3 39 1930 1893
+3 510 1950 1930
+3 498 1893 1950
+3 1893 1930 1950
+3 138 1951 1934
+3 513 1952 1951
+3 510 1934 1952
+3 1934 1951 1952
+3 136 1898 1954
+3 498 1953 1898
+3 513 1954 1953
+3 1954 1898 1953
+3 498 1950 1953
+3 510 1952 1950
+3 513 1953 1952
+3 1953 1950 1952
+3 138 1944 1951
+3 511 1955 1944
+3 513 1951 1955
+3 1951 1944 1955
+3 134 1949 1941
+3 512 1956 1949
+3 511 1941 1956
+3 1941 1949 1956
+3 136 1954 1946
+3 513 1957 1954
+3 512 1946 1957
+3 1946 1954 1957
+3 513 1955 1957
+3 511 1956 1955
+3 512 1957 1956
+3 1957 1955 1956
+3 19 1958 1710
+3 514 1959 1958
+3 450 1710 1959
+3 1710 1958 1959
+3 140 1960 1962
+3 515 1961 1960
+3 514 1962 1961
+3 1962 1960 1961
+3 123 1715 1964
+3 450 1963 1715
+3 515 1964 1963
+3 1964 1715 1963
+3 450 1959 1963
+3 514 1961 1959
+3 515 1963 1961
+3 1963 1959 1961
+3 40 1965 1967
+3 516 1966 1965
+3 518 1967 1966
+3 1967 1965 1966
+3 141 1968 1970
+3 517 1969 1968
+3 516 1970 1969
+3 1970 1968 1969
+3 140 1971 1973
+3 518 1972 1971
+3 517 1973 1972
+3 1973 1971 1972
+3 518 1966 1972
+3 516 1969 1966
+3 517 1972 1969
+3 1972 1966 1969
+3 35 1721 1975
+3 455 1974 1721
+3 520 1975 1974
+3 1975 1721 1974
+3 123 1976 1725
+3 519 1977 1976
+3 455 1725 1977
+3 1725 1976 1977
+3 141 1978 1980
+3 520 1979 1978
+3 519 1980 1979
+3 1980 1978 1979
+3 520 1974 1979
+3 455 1977 1974
+3 519 1979 1977
+3 1979 1974 1977
+3 123 1964 1976
+3 515 1981 1964
+3 519 1976 1981
+3 1976 1964 1981
+3 140 1973 1960
+3 517 1982 1973
+3 515 1960 1982
+3 1960 1973 1982
+3 141 1980 1968
+3 519 1983 1980
+3 517 1968 1983
+3 1968 1980 1983
+3 519 1981 1983
+3 515 1982 1981
+3 517 1983 1982
+3 1983 1981 1982
+3 25 1984 1986
+3 521 1985 1984
+3 523 1986 1985
+3 1986 1984 1985
+3 142 1987 1989
+3 522 1988 1987
+3 521 1989 1988
+3 1989 1987 1988
+3 144 1990 1992
+3 523 1991 1990
+3 522 1992 1991
+3 1992 1990 1991
+3 523 1985 1991
+3 521 1988 1985
+3 522 1991 1988
+3 1991 1985 1988
+3 41 1993 1995
+3 524 1994 1993
+3 526 1995 1994
+3 1995 1993 1994
+3 143 1996 1998
+3 525 1997 1996
+3 524 1998 1997
+3 1998 1996 1997
+3 142 1999 2001
+3 526 2000 1999
+3 525 2001 2000
+3 2001 1999 2000
+3 526 1994 2000
+3 524 1997 1994
+3 525 2000 1997
+3 2000 1994 1997
+3 40 2002 2004
+3 527 2003 2002
+3 529 2004 2003
+3 2004 2002 2003
+3 144 2005 2007
+3 528 2006 2005
+3 527 2007 2006
+3 2007 2005 2006
+3 143 2008 2010
+3 529 2009 2008
+3 528 2010 2009
+3 2010 2008 2009
+3 529 2003 2009
+3 527 2006 2003
+3 528 2009 2006
+3 2009 2003 2006
+3 144 1992 2005
+3 522 2011 1992
+3 528 2005 2011
+3 2005 1992 2011
+3 142 2001 1987
+3 525 2012 2001
+3 522 1987 2012
+3 1987 2001 2012
+3 143 2010 1996
+3 528 2013 2010
+3 525 1996 2013
+3 1996 2010 2013
+3 528 2011 2013
+3 522 2012 2011
+3 525 2013 2012
+3 2013 2011 2012
+3 23 1652 2015
+3 434 2014 1652
+3 531 2015 2014
+3 2015 1652 2014
+3 119 2016 1656
+3 530 2017 2016
+3 434 1656 2017
+3 1656 2016 2017
+3 146 2018 2020
+3 531 2019 2018
+3 530 2020 2019
+3 2020 2018 2019
+3 531 2014 2019
+3 434 2017 2014
+3 530 2019 2017
+3 2019 2014 2017
+3 35 2021 1668
+3 532 2022 2021
+3 438 1668 2022
+3 1668 2021 2022
+3 145 2023 2025
+3 533 2024 2023
+3 532 2025 2024
+3 2025 2023 2024
+3 119 1673 2027
+3 438 2026 1673
+3 533 2027 2026
+3 2027 1673 2026
+3 438 2022 2026
+3 532 2024 2022
+3 533 2026 2024
+3 2026 2022 2024
+3 41 2028 2030
+3 534 2029 2028
+3 536 2030 2029
+3 2030 2028 2029
+3 146 2031 2033
+3 535 2032 2031
+3 534 2033 2032
+3 2033 2031 2032
+3 145 2034 2036
+3 536 2035 2034
+3 535 2036 2035
+3 2036 2034 2035
+3 536 2029 2035
+3 534 2032 2029
+3 535 2035 2032
+3 2035 2029 2032
+3 146 2020 2031
+3 530 2037 2020
+3 535 2031 2037
+3 2031 2020 2037
+3 119 2027 2016
+3 533 2038 2027
+3 530 2016 2038
+3 2016 2027 2038
+3 145 2036 2023
+3 535 2039 2036
+3 533 2023 2039
+3 2023 2036 2039
+3 535 2037 2039
+3 530 2038 2037
+3 533 2039 2038
+3 2039 2037 2038
+3 35 1975 2021
+3 520 2040 1975
+3 532 2021 2040
+3 2021 1975 2040
+3 141 2041 1978
+3 537 2042 2041
+3 520 1978 2042
+3 1978 2041 2042
+3 145 2025 2044
+3 532 2043 2025
+3 537 2044 2043
+3 2044 2025 2043
+3 532 2040 2043
+3 520 2042 2040
+3 537 2043 2042
+3 2043 2040 2042
+3 40 2004 1965
+3 529 2045 2004
+3 516 1965 2045
+3 1965 2004 2045
+3 143 2046 2008
+3 538 2047 2046
+3 529 2008 2047
+3 2008 2046 2047
+3 141 1970 2049
+3 516 2048 1970
+3 538 2049 2048
+3 2049 1970 2048
+3 516 2045 2048
+3 529 2047 2045
+3 538 2048 2047
+3 2048 2045 2047
+3 41 2030 1993
+3 536 2050 2030
+3 524 1993 2050
+3 1993 2030 2050
+3 145 2051 2034
+3 539 2052 2051
+3 536 2034 2052
+3 2034 2051 2052
+3 143 1998 2054
+3 524 2053 1998
+3 539 2054 2053
+3 2054 1998 2053
+3 524 2050 2053
+3 536 2052 2050
+3 539 2053 2052
+3 2053 2050 2052
+3 145 2044 2051
+3 537 2055 2044
+3 539 2051 2055
+3 2051 2044 2055
+3 141 2049 2041
+3 538 2056 2049
+3 537 2041 2056
+3 2041 2049 2056
+3 143 2054 2046
+3 539 2057 2054
+3 538 2046 2057
+3 2046 2054 2057
+3 539 2055 2057
+3 537 2056 2055
+3 538 2057 2056
+3 2057 2055 2056
+3 2 2058 2060
+3 540 2059 2058
+3 542 2060 2059
+3 2060 2058 2059
+3 147 2061 2063
+3 541 2062 2061
+3 540 2063 2062
+3 2063 2061 2062
+3 149 2064 2066
+3 542 2065 2064
+3 541 2066 2065
+3 2066 2064 2065
+3 542 2059 2065
+3 540 2062 2059
+3 541 2065 2062
+3 2065 2059 2062
+3 42 2067 2069
+3 543 2068 2067
+3 545 2069 2068
+3 2069 2067 2068
+3 148 2070 2072
+3 544 2071 2070
+3 543 2072 2071
+3 2072 2070 2071
+3 147 2073 2075
+3 545 2074 2073
+3 544 2075 2074
+3 2075 2073 2074
+3 545 2068 2074
+3 543 2071 2068
+3 544 2074 2071
+3 2074 2068 2071
+3 44 2076 2078
+3 546 2077 2076
+3 548 2078 2077
+3 2078 2076 2077
+3 149 2079 2081
+3 547 2080 2079
+3 546 2081 2080
+3 2081 2079 2080
+3 148 2082 2084
+3 548 2083 2082
+3 547 2084 2083
+3 2084 2082 2083
+3 548 2077 2083
+3 546 2080 2077
+3 547 2083 2080
+3 2083 2077 2080
+3 149 2066 2079
+3 541 2085 2066
+3 547 2079 2085
+3 2079 2066 2085
+3 147 2075 2061
+3 544 2086 2075
+3 541 2061 2086
+3 2061 2075 2086
+3 148 2084 2070
+3 547 2087 2084
+3 544 2070 2087
+3 2070 2084 2087
+3 547 2085 2087
+3 541 2086 2085
+3 544 2087 2086
+3 2087 2085 2086
+3 16 2088 2090
+3 549 2089 2088
+3 551 2090 2089
+3 2090 2088 2089
+3 150 2091 2093
+3 550 2092 2091
+3 549 2093 2092
+3 2093 2091 2092
+3 152 2094 2096
+3 551 2095 2094
+3 550 2096 2095
+3 2096 2094 2095
+3 551 2089 2095
+3 549 2092 2089
+3 550 2095 2092
+3 2095 2089 2092
+3 43 2097 2099
+3 552 2098 2097
+3 554 2099 2098
+3 2099 2097 2098
+3 151 2100 2102
+3 553 2101 2100
+3 552 2102 2101
+3 2102 2100 2101
+3 150 2103 2105
+3 554 2104 2103
+3 553 2105 2104
+3 2105 2103 2104
+3 554 2098 2104
+3 552 2101 2098
+3 553 2104 2101
+3 2104 2098 2101
+3 42 2106 2108
+3 555 2107 2106
+3 557 2108 2107
+3 2108 2106 2107
+3 152 2109 2111
+3 556 2110 2109
+3 555 2111 2110
+3 2111 2109 2110
+3 151 2112 2114
+3 557 2113 2112
+3 556 2114 2113
+3 2114 2112 2113
+3 557 2107 2113
+3 555 2110 2107
+3 556 2113 2110
+3 2113 2107 2110
+3 152 2096 2109
+3 550 2115 2096
+3 556 2109 2115
+3 2109 2096 2115
+3 150 2105 2091
+3 553 2116 2105
+3 550 2091 2116
+3 2091 2105 2116
+3 151 2114 2100
+3 556 2117 2114
+3 553 2100 2117
+3 2100 2114 2117
+3 556 2115 2117
+3 550 2116 2115
+3 553 2117 2116
+3 2117 2115 2116
+3 3 2118 2120
+3 558 2119 2118
+3 560 2120 2119
+3 2120 2118 2119
+3 153 2121 2123
+3 559 2122 2121
+3 558 2123 2122
+3 2123 2121 2122
+3 155 2124 2126
+3 560 2125 2124
+3 559 2126 2125
+3 2126 2124 2125
+3 560 2119 2125
+3 558 2122 2119
+3 559 2125 2122
+3 2125 2119 2122
+3 44 2127 2129
+3 561 2128 2127
+3 563 2129 2128
+3 2129 2127 2128
+3 154 2130 2132
+3 562 2131 2130
+3 561 2132 2131
+3 2132 2130 2131
+3 153 2133 2135
+3 563 2134 2133
+3 562 2135 2134
+3 2135 2133 2134
+3 563 2128 2134
+3 561 2131 2128
+3 562 2134 2131
+3 2134 2128 2131
+3 43 2136 2138
+3 564 2137 2136
+3 566 2138 2137
+3 2138 2136 2137
+3 155 2139 2141
+3 565 2140 2139
+3 564 2141 2140
+3 2141 2139 2140
+3 154 2142 2144
+3 566 2143 2142
+3 565 2144 2143
+3 2144 2142 2143
+3 566 2137 2143
+3 564 2140 2137
+3 565 2143 2140
+3 2143 2137 2140
+3 155 2126 2139
+3 559 2145 2126
+3 565 2139 2145
+3 2139 2126 2145
+3 153 2135 2121
+3 562 2146 2135
+3 559 2121 2146
+3 2121 2135 2146
+3 154 2144 2130
+3 565 2147 2144
+3 562 2130 2147
+3 2130 2144 2147
+3 565 2145 2147
+3 559 2146 2145
+3 562 2147 2146
+3 2147 2145 2146
+3 44 2078 2127
+3 548 2148 2078
+3 561 2127 2148
+3 2127 2078 2148
+3 148 2149 2082
+3 567 2150 2149
+3 548 2082 2150
+3 2082 2149 2150
+3 154 2132 2152
+3 561 2151 2132
+3 567 2152 2151
+3 2152 2132 2151
+3 561 2148 2151
+3 548 2150 2148
+3 567 2151 2150
+3 2151 2148 2150
+3 42 2108 2067
+3 557 2153 2108
+3 543 2067 2153
+3 2067 2108 2153
+3 151 2154 2112
+3 568 2155 2154
+3 557 2112 2155
+3 2112 2154 2155
+3 148 2072 2157
+3 543 2156 2072
+3 568 2157 2156
+3 2157 2072 2156
+3 543 2153 2156
+3 557 2155 2153
+3 568 2156 2155
+3 2156 2153 2155
+3 43 2138 2097
+3 566 2158 2138
+3 552 2097 2158
+3 2097 2138 2158
+3 154 2159 2142
+3 569 2160 2159
+3 566 2142 2160
+3 2142 2159 2160
+3 151 2102 2162
+3 552 2161 2102
+3 569 2162 2161
+3 2162 2102 2161
+3 552 2158 2161
+3 566 2160 2158
+3 569 2161 2160
+3 2161 2158 2160
+3 154 2152 2159
+3 567 2163 2152
+3 569 2159 2163
+3 2159 2152 2163
+3 148 2157 2149
+3 568 2164 2157
+3 567 2149 2164
+3 2149 2157 2164
+3 151 2162 2154
+3 569 2165 2162
+3 568 2154 2165
+3 2154 2162 2165
+3 569 2163 2165
+3 567 2164 2163
+3 568 2165 2164
+3 2165 2163 2164
+3 5 1578 2167
+3 415 2166 1578
+3 571 2167 2166
+3 2167 1578 2166
+3 114 2168 1582
+3 570 2169 2168
+3 415 1582 2169
+3 1582 2168 2169
+3 157 2170 2172
+3 571 2171 2170
+3 570 2172 2171
+3 2172 2170 2171
+3 571 2166 2171
+3 415 2169 2166
+3 570 2171 2169
+3 2171 2166 2169
+3 31 2173 1594
+3 572 2174 2173
+3 419 1594 2174
+3 1594 2173 2174
+3 156 2175 2177
+3 573 2176 2175
+3 572 2177 2176
+3 2177 2175 2176
+3 114 1599 2179
+3 419 2178 1599
+3 573 2179 2178
+3 2179 1599 2178
+3 419 2174 2178
+3 572 2176 2174
+3 573 2178 2176
+3 2178 2174 2176
+3 45 2180 2182
+3 574 2181 2180
+3 576 2182 2181
+3 2182 2180 2181
+3 157 2183 2185
+3 575 2184 2183
+3 574 2185 2184
+3 2185 2183 2184
+3 156 2186 2188
+3 576 2187 2186
+3 575 2188 2187
+3 2188 2186 2187
+3 576 2181 2187
+3 574 2184 2181
+3 575 2187 2184
+3 2187 2181 2184
+3 157 2172 2183
+3 570 2189 2172
+3 575 2183 2189
+3 2183 2172 2189
+3 114 2179 2168
+3 573 2190 2179
+3 570 2168 2190
+3 2168 2179 2190
+3 156 2188 2175
+3 575 2191 2188
+3 573 2175 2191
+3 2175 2188 2191
+3 575 2189 2191
+3 570 2190 2189
+3 573 2191 2190
+3 2191 2189 2190
+3 3 2120 1550
+3 560 2192 2120
+3 406 1550 2192
+3 1550 2120 2192
+3 155 2193 2124
+3 577 2194 2193
+3 560 2124 2194
+3 2124 2193 2194
+3 110 1554 2196
+3 406 2195 1554
+3 577 2196 2195
+3 2196 1554 2195
+3 406 2192 2195
+3 560 2194 2192
+3 577 2195 2194
+3 2195 2192 2194
+3 43 2197 2136
+3 578 2198 2197
+3 564 2136 2198
+3 2136 2197 2198
+3 158 2199 2201
+3 579 2200 2199
+3 578 2201 2200
+3 2201 2199 2200
+3 155 2141 2203
+3 564 2202 2141
+3 579 2203 2202
+3 2203 2141 2202
+3 564 2198 2202
+3 578 2200 2198
+3 579 2202 2200
+3 2202 2198 2200
+3 31 1559 2205
+3 410 2204 1559
+3 581 2205 2204
+3 2205 1559 2204
+3 110 2206 1563
+3 580 2207 2206
+3 410 1563 2207
+3 1563 2206 2207
+3 158 2208 2210
+3 581 2209 2208
+3 580 2210 2209
+3 2210 2208 2209
+3 581 2204 2209
+3 410 2207 2204
+3 580 2209 2207
+3 2209 2204 2207
+3 110 2196 2206
+3 577 2211 2196
+3 580 2206 2211
+3 2206 2196 2211
+3 155 2203 2193
+3 579 2212 2203
+3 577 2193 2212
+3 2193 2203 2212
+3 158 2210 2199
+3 580 2213 2210
+3 579 2199 2213
+3 2199 2210 2213
+3 580 2211 2213
+3 577 2212 2211
+3 579 2213 2212
+3 2213 2211 2212
+3 16 2214 2088
+3 582 2215 2214
+3 549 2088 2215
+3 2088 2214 2215
+3 159 2216 2218
+3 583 2217 2216
+3 582 2218 2217
+3 2218 2216 2217
+3 150 2093 2220
+3 549 2219 2093
+3 583 2220 2219
+3 2220 2093 2219
+3 549 2215 2219
+3 582 2217 2215
+3 583 2219 2217
+3 2219 2215 2217
+3 45 2221 2223
+3 584 2222 2221
+3 586 2223 2222
+3 2223 2221 2222
+3 160 2224 2226
+3 585 2225 2224
+3 584 2226 2225
+3 2226 2224 2225
+3 159 2227 2229
+3 586 2228 2227
+3 585 2229 2228
+3 2229 2227 2228
+3 586 2222 2228
+3 584 2225 2222
+3 585 2228 2225
+3 2228 2222 2225
+3 43 2099 2231
+3 554 2230 2099
+3 588 2231 2230
+3 2231 2099 2230
+3 150 2232 2103
+3 587 2233 2232
+3 554 2103 2233
+3 2103 2232 2233
+3 160 2234 2236
+3 588 2235 2234
+3 587 2236 2235
+3 2236 2234 2235
+3 588 2230 2235
+3 554 2233 2230
+3 587 2235 2233
+3 2235 2230 2233
+3 150 2220 2232
+3 583 2237 2220
+3 587 2232 2237
+3 2232 2220 2237
+3 159 2229 2216
+3 585 2238 2229
+3 583 2216 2238
+3 2216 2229 2238
+3 160 2236 2224
+3 587 2239 2236
+3 585 2224 2239
+3 2224 2236 2239
+3 587 2237 2239
+3 583 2238 2237
+3 585 2239 2238
+3 2239 2237 2238
+3 45 2182 2221
+3 576 2240 2182
+3 584 2221 2240
+3 2221 2182 2240
+3 156 2241 2186
+3 589 2242 2241
+3 576 2186 2242
+3 2186 2241 2242
+3 160 2226 2244
+3 584 2243 2226
+3 589 2244 2243
+3 2244 2226 2243
+3 584 2240 2243
+3 576 2242 2240
+3 589 2243 2242
+3 2243 2240 2242
+3 31 2205 2173
+3 581 2245 2205
+3 572 2173 2245
+3 2173 2205 2245
+3 158 2246 2208
+3 590 2247 2246
+3 581 2208 2247
+3 2208 2246 2247
+3 156 2177 2249
+3 572 2248 2177
+3 590 2249 2248
+3 2249 2177 2248
+3 572 2245 2248
+3 581 2247 2245
+3 590 2248 2247
+3 2248 2245 2247
+3 43 2231 2197
+3 588 2250 2231
+3 578 2197 2250
+3 2197 2231 2250
+3 160 2251 2234
+3 591 2252 2251
+3 588 2234 2252
+3 2234 2251 2252
+3 158 2201 2254
+3 578 2253 2201
+3 591 2254 2253
+3 2254 2201 2253
+3 578 2250 2253
+3 588 2252 2250
+3 591 2253 2252
+3 2253 2250 2252
+3 160 2244 2251
+3 589 2255 2244
+3 591 2251 2255
+3 2251 2244 2255
+3 156 2249 2241
+3 590 2256 2249
+3 589 2241 2256
+3 2241 2249 2256
+3 158 2254 2246
+3 591 2257 2254
+3 590 2246 2257
+3 2246 2254 2257
+3 591 2255 2257
+3 589 2256 2255
+3 590 2257 2256
+3 2257 2255 2256
+3 2 2258 2058
+3 592 2259 2258
+3 540 2058 2259
+3 2058 2258 2259
+3 161 2260 2262
+3 593 2261 2260
+3 592 2262 2261
+3 2262 2260 2261
+3 147 2063 2264
+3 540 2263 2063
+3 593 2264 2263
+3 2264 2063 2263
+3 540 2259 2263
+3 592 2261 2259
+3 593 2263 2261
+3 2263 2259 2261
+3 46 2265 2267
+3 594 2266 2265
+3 596 2267 2266
+3 2267 2265 2266
+3 162 2268 2270
+3 595 2269 2268
+3 594 2270 2269
+3 2270 2268 2269
+3 161 2271 2273
+3 596 2272 2271
+3 595 2273 2272
+3 2273 2271 2272
+3 596 2266 2272
+3 594 2269 2266
+3 595 2272 2269
+3 2272 2266 2269
+3 42 2069 2275
+3 545 2274 2069
+3 598 2275 2274
+3 2275 2069 2274
+3 147 2276 2073
+3 597 2277 2276
+3 545 2073 2277
+3 2073 2276 2277
+3 162 2278 2280
+3 598 2279 2278
+3 597 2280 2279
+3 2280 2278 2279
+3 598 2274 2279
+3 545 2277 2274
+3 597 2279 2277
+3 2279 2274 2277
+3 147 2264 2276
+3 593 2281 2264
+3 597 2276 2281
+3 2276 2264 2281
+3 161 2273 2260
+3 595 2282 2273
+3 593 2260 2282
+3 2260 2273 2282
+3 162 2280 2268
+3 597 2283 2280
+3 595 2268 2283
+3 2268 2280 2283
+3 597 2281 2283
+3 593 2282 2281
+3 595 2283 2282
+3 2283 2281 2282
+3 15 2284 2286
+3 599 2285 2284
+3 601 2286 2285
+3 2286 2284 2285
+3 163 2287 2289
+3 600 2288 2287
+3 599 2289 2288
+3 2289 2287 2288
+3 165 2290 2292
+3 601 2291 2290
+3 600 2292 2291
+3 2292 2290 2291
+3 601 2285 2291
+3 599 2288 2285
+3 600 2291 2288
+3 2291 2285 2288
+3 47 2293 2295
+3 602 2294 2293
+3 604 2295 2294
+3 2295 2293 2294
+3 164 2296 2298
+3 603 2297 2296
+3 602 2298 2297
+3 2298 2296 2297
+3 163 2299 2301
+3 604 2300 2299
+3 603 2301 2300
+3 2301 2299 2300
+3 604 2294 2300
+3 602 2297 2294
+3 603 2300 2297
+3 2300 2294 2297
+3 46 2302 2304
+3 605 2303 2302
+3 607 2304 2303
+3 2304 2302 2303
+3 165 2305 2307
+3 606 2306 2305
+3 605 2307 2306
+3 2307 2305 2306
+3 164 2308 2310
+3 607 2309 2308
+3 606 2310 2309
+3 2310 2308 2309
+3 607 2303 2309
+3 605 2306 2303
+3 606 2309 2306
+3 2309 2303 2306
+3 165 2292 2305
+3 600 2311 2292
+3 606 2305 2311
+3 2305 2292 2311
+3 163 2301 2287
+3 603 2312 2301
+3 600 2287 2312
+3 2287 2301 2312
+3 164 2310 2296
+3 606 2313 2310
+3 603 2296 2313
+3 2296 2310 2313
+3 606 2311 2313
+3 600 2312 2311
+3 603 2313 2312
+3 2313 2311 2312
+3 16 2090 2315
+3 551 2314 2090
+3 609 2315 2314
+3 2315 2090 2314
+3 152 2316 2094
+3 608 2317 2316
+3 551 2094 2317
+3 2094 2316 2317
+3 167 2318 2320
+3 609 2319 2318
+3 608 2320 2319
+3 2320 2318 2319
+3 609 2314 2319
+3 551 2317 2314
+3 608 2319 2317
+3 2319 2314 2317
+3 42 2321 2106
+3 610 2322 2321
+3 555 2106 2322
+3 2106 2321 2322
+3 166 2323 2325
+3 611 2324 2323
+3 610 2325 2324
+3 2325 2323 2324
+3 152 2111 2327
+3 555 2326 2111
+3 611 2327 2326
+3 2327 2111 2326
+3 555 2322 2326
+3 610 2324 2322
+3 611 2326 2324
+3 2326 2322 2324
+3 47 2328 2330
+3 612 2329 2328
+3 614 2330 2329
+3 2330 2328 2329
+3 167 2331 2333
+3 613 2332 2331
+3 612 2333 2332
+3 2333 2331 2332
+3 166 2334 2336
+3 614 2335 2334
+3 613 2336 2335
+3 2336 2334 2335
+3 614 2329 2335
+3 612 2332 2329
+3 613 2335 2332
+3 2335 2329 2332
+3 167 2320 2331
+3 608 2337 2320
+3 613 2331 2337
+3 2331 2320 2337
+3 152 2327 2316
+3 611 2338 2327
+3 608 2316 2338
+3 2316 2327 2338
+3 166 2336 2323
+3 613 2339 2336
+3 611 2323 2339
+3 2323 2336 2339
+3 613 2337 2339
+3 608 2338 2337
+3 611 2339 2338
+3 2339 2337 2338
+3 42 2275 2321
+3 598 2340 2275
+3 610 2321 2340
+3 2321 2275 2340
+3 162 2341 2278
+3 615 2342 2341
+3 598 2278 2342
+3 2278 2341 2342
+3 166 2325 2344
+3 610 2343 2325
+3 615 2344 2343
+3 2344 2325 2343
+3 610 2340 2343
+3 598 2342 2340
+3 615 2343 2342
+3 2343 2340 2342
+3 46 2304 2265
+3 607 2345 2304
+3 594 2265 2345
+3 2265 2304 2345
+3 164 2346 2308
+3 616 2347 2346
+3 607 2308 2347
+3 2308 2346 2347
+3 162 2270 2349
+3 594 2348 2270
+3 616 2349 2348
+3 2349 2270 2348
+3 594 2345 2348
+3 607 2347 2345
+3 616 2348 2347
+3 2348 2345 2347
+3 47 2330 2293
+3 614 2350 2330
+3 602 2293 2350
+3 2293 2330 2350
+3 166 2351 2334
+3 617 2352 2351
+3 614 2334 2352
+3 2334 2351 2352
+3 164 2298 2354
+3 602 2353 2298
+3 617 2354 2353
+3 2354 2298 2353
+3 602 2350 2353
+3 614 2352 2350
+3 617 2353 2352
+3 2353 2350 2352
+3 166 2344 2351
+3 615 2355 2344
+3 617 2351 2355
+3 2351 2344 2355
+3 162 2349 2341
+3 616 2356 2349
+3 615 2341 2356
+3 2341 2349 2356
+3 164 2354 2346
+3 617 2357 2354
+3 616 2346 2357
+3 2346 2354 2357
+3 617 2355 2357
+3 615 2356 2355
+3 616 2357 2356
+3 2357 2355 2356
+3 2 1886 2258
+3 497 2358 1886
+3 592 2258 2358
+3 2258 1886 2358
+3 137 2359 1890
+3 618 2360 2359
+3 497 1890 2360
+3 1890 2359 2360
+3 161 2262 2362
+3 592 2361 2262
+3 618 2362 2361
+3 2362 2262 2361
+3 592 2358 2361
+3 497 2360 2358
+3 618 2361 2360
+3 2361 2358 2360
+3 38 2363 1902
+3 619 2364 2363
+3 501 1902 2364
+3 1902 2363 2364
+3 168 2365 2367
+3 620 2366 2365
+3 619 2367 2366
+3 2367 2365 2366
+3 137 1907 2369
+3 501 2368 1907
+3 620 2369 2368
+3 2369 1907 2368
+3 501 2364 2368
+3 619 2366 2364
+3 620 2368 2366
+3 2368 2364 2366
+3 46 2267 2371
+3 596 2370 2267
+3 622 2371 2370
+3 2371 2267 2370
+3 161 2372 2271
+3 621 2373 2372
+3 596 2271 2373
+3 2271 2372 2373
+3 168 2374 2376
+3 622 2375 2374
+3 621 2376 2375
+3 2376 2374 2375
+3 622 2370 2375
+3 596 2373 2370
+3 621 2375 2373
+3 2375 2370 2373
+3 161 2362 2372
+3 618 2377 2362
+3 621 2372 2377
+3 2372 2362 2377
+3 137 2369 2359
+3 620 2378 2369
+3 618 2359 2378
+3 2359 2369 2378
+3 168 2376 2365
+3 621 2379 2376
+3 620 2365 2379
+3 2365 2376 2379
+3 621 2377 2379
+3 618 2378 2377
+3 620 2379 2378
+3 2379 2377 2378
+3 4 2380 1858
+3 623 2381 2380
+3 488 1858 2381
+3 1858 2380 2381
+3 169 2382 2384
+3 624 2383 2382
+3 623 2384 2383
+3 2384 2382 2383
+3 133 1862 2386
+3 488 2385 1862
+3 624 2386 2385
+3 2386 1862 2385
+3 488 2381 2385
+3 623 2383 2381
+3 624 2385 2383
+3 2385 2381 2383
+3 48 2387 2389
+3 625 2388 2387
+3 627 2389 2388
+3 2389 2387 2388
+3 170 2390 2392
+3 626 2391 2390
+3 625 2392 2391
+3 2392 2390 2391
+3 169 2393 2395
+3 627 2394 2393
+3 626 2395 2394
+3 2395 2393 2394
+3 627 2388 2394
+3 625 2391 2388
+3 626 2394 2391
+3 2394 2388 2391
+3 38 1867 2397
+3 492 2396 1867
+3 629 2397 2396
+3 2397 1867 2396
+3 133 2398 1871
+3 628 2399 2398
+3 492 1871 2399
+3 1871 2398 2399
+3 170 2400 2402
+3 629 2401 2400
+3 628 2402 2401
+3 2402 2400 2401
+3 629 2396 2401
+3 492 2399 2396
+3 628 2401 2399
+3 2401 2396 2399
+3 133 2386 2398
+3 624 2403 2386
+3 628 2398 2403
+3 2398 2386 2403
+3 169 2395 2382
+3 626 2404 2395
+3 624 2382 2404
+3 2382 2395 2404
+3 170 2402 2390
+3 628 2405 2402
+3 626 2390 2405
+3 2390 2402 2405
+3 628 2403 2405
+3 624 2404 2403
+3 626 2405 2404
+3 2405 2403 2404
+3 15 2286 2407
+3 601 2406 2286
+3 631 2407 2406
+3 2407 2286 2406
+3 165 2408 2290
+3 630 2409 2408
+3 601 2290 2409
+3 2290 2408 2409
+3 172 2410 2412
+3 631 2411 2410
+3 630 2412 2411
+3 2412 2410 2411
+3 631 2406 2411
+3 601 2409 2406
+3 630 2411 2409
+3 2411 2406 2409
+3 46 2413 2302
+3 632 2414 2413
+3 605 2302 2414
+3 2302 2413 2414
+3 171 2415 2417
+3 633 2416 2415
+3 632 2417 2416
+3 2417 2415 2416
+3 165 2307 2419
+3 605 2418 2307
+3 633 2419 2418
+3 2419 2307 2418
+3 605 2414 2418
+3 632 2416 2414
+3 633 2418 2416
+3 2418 2414 2416
+3 48 2420 2422
+3 634 2421 2420
+3 636 2422 2421
+3 2422 2420 2421
+3 172 2423 2425
+3 635 2424 2423
+3 634 2425 2424
+3 2425 2423 2424
+3 171 2426 2428
+3 636 2427 2426
+3 635 2428 2427
+3 2428 2426 2427
+3 636 2421 2427
+3 634 2424 2421
+3 635 2427 2424
+3 2427 2421 2424
+3 172 2412 2423
+3 630 2429 2412
+3 635 2423 2429
+3 2423 2412 2429
+3 165 2419 2408
+3 633 2430 2419
+3 630 2408 2430
+3 2408 2419 2430
+3 171 2428 2415
+3 635 2431 2428
+3 633 2415 2431
+3 2415 2428 2431
+3 635 2429 2431
+3 630 2430 2429
+3 633 2431 2430
+3 2431 2429 2430
+3 46 2371 2413
+3 622 2432 2371
+3 632 2413 2432
+3 2413 2371 2432
+3 168 2433 2374
+3 637 2434 2433
+3 622 2374 2434
+3 2374 2433 2434
+3 171 2417 2436
+3 632 2435 2417
+3 637 2436 2435
+3 2436 2417 2435
+3 632 2432 2435
+3 622 2434 2432
+3 637 2435 2434
+3 2435 2432 2434
+3 38 2397 2363
+3 629 2437 2397
+3 619 2363 2437
+3 2363 2397 2437
+3 170 2438 2400
+3 638 2439 2438
+3 629 2400 2439
+3 2400 2438 2439
+3 168 2367 2441
+3 619 2440 2367
+3 638 2441 2440
+3 2441 2367 2440
+3 619 2437 2440
+3 629 2439 2437
+3 638 2440 2439
+3 2440 2437 2439
+3 48 2422 2387
+3 636 2442 2422
+3 625 2387 2442
+3 2387 2422 2442
+3 171 2443 2426
+3 639 2444 2443
+3 636 2426 2444
+3 2426 2443 2444
+3 170 2392 2446
+3 625 2445 2392
+3 639 2446 2445
+3 2446 2392 2445
+3 625 2442 2445
+3 636 2444 2442
+3 639 2445 2444
+3 2445 2442 2444
+3 171 2436 2443
+3 637 2447 2436
+3 639 2443 2447
+3 2443 2436 2447
+3 168 2441 2433
+3 638 2448 2441
+3 637 2433 2448
+3 2433 2441 2448
+3 170 2446 2438
+3 639 2449 2446
+3 638 2438 2449
+3 2438 2446 2449
+3 639 2447 2449
+3 637 2448 2447
+3 638 2449 2448
+3 2449 2447 2448
+3 4 2450 2380
+3 640 2451 2450
+3 623 2380 2451
+3 2380 2450 2451
+3 173 2452 2454
+3 641 2453 2452
+3 640 2454 2453
+3 2454 2452 2453
+3 169 2384 2456
+3 623 2455 2384
+3 641 2456 2455
+3 2456 2384 2455
+3 623 2451 2455
+3 640 2453 2451
+3 641 2455 2453
+3 2455 2451 2453
+3 49 2457 2459
+3 642 2458 2457
+3 644 2459 2458
+3 2459 2457 2458
+3 174 2460 2462
+3 643 2461 2460
+3 642 2462 2461
+3 2462 2460 2461
+3 173 2463 2465
+3 644 2464 2463
+3 643 2465 2464
+3 2465 2463 2464
+3 644 2458 2464
+3 642 2461 2458
+3 643 2464 2461
+3 2464 2458 2461
+3 48 2389 2467
+3 627 2466 2389
+3 646 2467 2466
+3 2467 2389 2466
+3 169 2468 2393
+3 645 2469 2468
+3 627 2393 2469
+3 2393 2468 2469
+3 174 2470 2472
+3 646 2471 2470
+3 645 2472 2471
+3 2472 2470 2471
+3 646 2466 2471
+3 627 2469 2466
+3 645 2471 2469
+3 2471 2466 2469
+3 169 2456 2468
+3 641 2473 2456
+3 645 2468 2473
+3 2468 2456 2473
+3 173 2465 2452
+3 643 2474 2465
+3 641 2452 2474
+3 2452 2465 2474
+3 174 2472 2460
+3 645 2475 2472
+3 643 2460 2475
+3 2460 2472 2475
+3 645 2473 2475
+3 641 2474 2473
+3 643 2475 2474
+3 2475 2473 2474
+3 7 2476 2478
+3 647 2477 2476
+3 649 2478 2477
+3 2478 2476 2477
+3 175 2479 2481
+3 648 2480 2479
+3 647 2481 2480
+3 2481 2479 2480
+3 177 2482 2484
+3 649 2483 2482
+3 648 2484 2483
+3 2484 2482 2483
+3 649 2477 2483
+3 647 2480 2477
+3 648 2483 2480
+3 2483 2477 2480
+3 50 2485 2487
+3 650 2486 2485
+3 652 2487 2486
+3 2487 2485 2486
+3 176 2488 2490
+3 651 2489 2488
+3 650 2490 2489
+3 2490 2488 2489
+3 175 2491 2493
+3 652 2492 2491
+3 651 2493 2492
+3 2493 2491 2492
+3 652 2486 2492
+3 650 2489 2486
+3 651 2492 2489
+3 2492 2486 2489
+3 49 2494 2496
+3 653 2495 2494
+3 655 2496 2495
+3 2496 2494 2495
+3 177 2497 2499
+3 654 2498 2497
+3 653 2499 2498
+3 2499 2497 2498
+3 176 2500 2502
+3 655 2501 2500
+3 654 2502 2501
+3 2502 2500 2501
+3 655 2495 2501
+3 653 2498 2495
+3 654 2501 2498
+3 2501 2495 2498
+3 177 2484 2497
+3 648 2503 2484
+3 654 2497 2503
+3 2497 2484 2503
+3 175 2493 2479
+3 651 2504 2493
+3 648 2479 2504
+3 2479 2493 2504
+3 176 2502 2488
+3 654 2505 2502
+3 651 2488 2505
+3 2488 2502 2505
+3 654 2503 2505
+3 648 2504 2503
+3 651 2505 2504
+3 2505 2503 2504
+3 15 2407 2507
+3 631 2506 2407
+3 657 2507 2506
+3 2507 2407 2506
+3 172 2508 2410
+3 656 2509 2508
+3 631 2410 2509
+3 2410 2508 2509
+3 179 2510 2512
+3 657 2511 2510
+3 656 2512 2511
+3 2512 2510 2511
+3 657 2506 2511
+3 631 2509 2506
+3 656 2511 2509
+3 2511 2506 2509
+3 48 2513 2420
+3 658 2514 2513
+3 634 2420 2514
+3 2420 2513 2514
+3 178 2515 2517
+3 659 2516 2515
+3 658 2517 2516
+3 2517 2515 2516
+3 172 2425 2519
+3 634 2518 2425
+3 659 2519 2518
+3 2519 2425 2518
+3 634 2514 2518
+3 658 2516 2514
+3 659 2518 2516
+3 2518 2514 2516
+3 50 2520 2522
+3 660 2521 2520
+3 662 2522 2521
+3 2522 2520 2521
+3 179 2523 2525
+3 661 2524 2523
+3 660 2525 2524
+3 2525 2523 2524
+3 178 2526 2528
+3 662 2527 2526
+3 661 2528 2527
+3 2528 2526 2527
+3 662 2521 2527
+3 660 2524 2521
+3 661 2527 2524
+3 2527 2521 2524
+3 179 2512 2523
+3 656 2529 2512
+3 661 2523 2529
+3 2523 2512 2529
+3 172 2519 2508
+3 659 2530 2519
+3 656 2508 2530
+3 2508 2519 2530
+3 178 2528 2515
+3 661 2531 2528
+3 659 2515 2531
+3 2515 2528 2531
+3 661 2529 2531
+3 656 2530 2529
+3 659 2531 2530
+3 2531 2529 2530
+3 48 2467 2513
+3 646 2532 2467
+3 658 2513 2532
+3 2513 2467 2532
+3 174 2533 2470
+3 663 2534 2533
+3 646 2470 2534
+3 2470 2533 2534
+3 178 2517 2536
+3 658 2535 2517
+3 663 2536 2535
+3 2536 2517 2535
+3 658 2532 2535
+3 646 2534 2532
+3 663 2535 2534
+3 2535 2532 2534
+3 49 2496 2457
+3 655 2537 2496
+3 642 2457 2537
+3 2457 2496 2537
+3 176 2538 2500
+3 664 2539 2538
+3 655 2500 2539
+3 2500 2538 2539
+3 174 2462 2541
+3 642 2540 2462
+3 664 2541 2540
+3 2541 2462 2540
+3 642 2537 2540
+3 655 2539 2537
+3 664 2540 2539
+3 2540 2537 2539
+3 50 2522 2485
+3 662 2542 2522
+3 650 2485 2542
+3 2485 2522 2542
+3 178 2543 2526
+3 665 2544 2543
+3 662 2526 2544
+3 2526 2543 2544
+3 176 2490 2546
+3 650 2545 2490
+3 665 2546 2545
+3 2546 2490 2545
+3 650 2542 2545
+3 662 2544 2542
+3 665 2545 2544
+3 2545 2542 2544
+3 178 2536 2543
+3 663 2547 2536
+3 665 2543 2547
+3 2543 2536 2547
+3 174 2541 2533
+3 664 2548 2541
+3 663 2533 2548
+3 2533 2541 2548
+3 176 2546 2538
+3 665 2549 2546
+3 664 2538 2549
+3 2538 2546 2549
+3 665 2547 2549
+3 663 2548 2547
+3 664 2549 2548
+3 2549 2547 2548
+3 21 2550 2552
+3 666 2551 2550
+3 668 2552 2551
+3 2552 2550 2551
+3 180 2553 2555
+3 667 2554 2553
+3 666 2555 2554
+3 2555 2553 2554
+3 182 2556 2558
+3 668 2557 2556
+3 667 2558 2557
+3 2558 2556 2557
+3 668 2551 2557
+3 666 2554 2551
+3 667 2557 2554
+3 2557 2551 2554
+3 51 2559 2561
+3 669 2560 2559
+3 671 2561 2560
+3 2561 2559 2560
+3 181 2562 2564
+3 670 2563 2562
+3 669 2564 2563
+3 2564 2562 2563
+3 180 2565 2567
+3 671 2566 2565
+3 670 2567 2566
+3 2567 2565 2566
+3 671 2560 2566
+3 669 2563 2560
+3 670 2566 2563
+3 2566 2560 2563
+3 52 2568 2570
+3 672 2569 2568
+3 674 2570 2569
+3 2570 2568 2569
+3 182 2571 2573
+3 673 2572 2571
+3 672 2573 2572
+3 2573 2571 2572
+3 181 2574 2576
+3 674 2575 2574
+3 673 2576 2575
+3 2576 2574 2575
+3 674 2569 2575
+3 672 2572 2569
+3 673 2575 2572
+3 2575 2569 2572
+3 182 2558 2571
+3 667 2577 2558
+3 673 2571 2577
+3 2571 2558 2577
+3 180 2567 2553
+3 670 2578 2567
+3 667 2553 2578
+3 2553 2567 2578
+3 181 2576 2562
+3 673 2579 2576
+3 670 2562 2579
+3 2562 2576 2579
+3 673 2577 2579
+3 667 2578 2577
+3 670 2579 2578
+3 2579 2577 2578
+3 22 1682 2581
+3 443 2580 1682
+3 676 2581 2580
+3 2581 1682 2580
+3 122 2582 1686
+3 675 2583 2582
+3 443 1686 2583
+3 1686 2582 2583
+3 184 2584 2586
+3 676 2585 2584
+3 675 2586 2585
+3 2586 2584 2585
+3 676 2580 2585
+3 443 2583 2580
+3 675 2585 2583
+3 2585 2580 2583
+3 33 2587 1698
+3 677 2588 2587
+3 447 1698 2588
+3 1698 2587 2588
+3 183 2589 2591
+3 678 2590 2589
+3 677 2591 2590
+3 2591 2589 2590
+3 122 1703 2593
+3 447 2592 1703
+3 678 2593 2592
+3 2593 1703 2592
+3 447 2588 2592
+3 677 2590 2588
+3 678 2592 2590
+3 2592 2588 2590
+3 51 2594 2596
+3 679 2595 2594
+3 681 2596 2595
+3 2596 2594 2595
+3 184 2597 2599
+3 680 2598 2597
+3 679 2599 2598
+3 2599 2597 2598
+3 183 2600 2602
+3 681 2601 2600
+3 680 2602 2601
+3 2602 2600 2601
+3 681 2595 2601
+3 679 2598 2595
+3 680 2601 2598
+3 2601 2595 2598
+3 184 2586 2597
+3 675 2603 2586
+3 680 2597 2603
+3 2597 2586 2603
+3 122 2593 2582
+3 678 2604 2593
+3 675 2582 2604
+3 2582 2593 2604
+3 183 2602 2589
+3 680 2605 2602
+3 678 2589 2605
+3 2589 2602 2605
+3 680 2603 2605
+3 675 2604 2603
+3 678 2605 2604
+3 2605 2603 2604
+3 23 2606 1650
+3 682 2607 2606
+3 432 1650 2607
+3 1650 2606 2607
+3 185 2608 2610
+3 683 2609 2608
+3 682 2610 2609
+3 2610 2608 2609
+3 117 1655 2612
+3 432 2611 1655
+3 683 2612 2611
+3 2612 1655 2611
+3 432 2607 2611
+3 682 2609 2607
+3 683 2611 2609
+3 2611 2607 2609
+3 52 2613 2615
+3 684 2614 2613
+3 686 2615 2614
+3 2615 2613 2614
+3 186 2616 2618
+3 685 2617 2616
+3 684 2618 2617
+3 2618 2616 2617
+3 185 2619 2621
+3 686 2620 2619
+3 685 2621 2620
+3 2621 2619 2620
+3 686 2614 2620
+3 684 2617 2614
+3 685 2620 2617
+3 2620 2614 2617
+3 33 1661 2623
+3 437 2622 1661
+3 688 2623 2622
+3 2623 1661 2622
+3 117 2624 1665
+3 687 2625 2624
+3 437 1665 2625
+3 1665 2624 2625
+3 186 2626 2628
+3 688 2627 2626
+3 687 2628 2627
+3 2628 2626 2627
+3 688 2622 2627
+3 437 2625 2622
+3 687 2627 2625
+3 2627 2622 2625
+3 117 2612 2624
+3 683 2629 2612
+3 687 2624 2629
+3 2624 2612 2629
+3 185 2621 2608
+3 685 2630 2621
+3 683 2608 2630
+3 2608 2621 2630
+3 186 2628 2616
+3 687 2631 2628
+3 685 2616 2631
+3 2616 2628 2631
+3 687 2629 2631
+3 683 2630 2629
+3 685 2631 2630
+3 2631 2629 2630
+3 52 2570 2613
+3 674 2632 2570
+3 684 2613 2632
+3 2613 2570 2632
+3 181 2633 2574
+3 689 2634 2633
+3 674 2574 2634
+3 2574 2633 2634
+3 186 2618 2636
+3 684 2635 2618
+3 689 2636 2635
+3 2636 2618 2635
+3 684 2632 2635
+3 674 2634 2632
+3 689 2635 2634
+3 2635 2632 2634
+3 51 2596 2559
+3 681 2637 2596
+3 669 2559 2637
+3 2559 2596 2637
+3 183 2638 2600
+3 690 2639 2638
+3 681 2600 2639
+3 2600 2638 2639
+3 181 2564 2641
+3 669 2640 2564
+3 690 2641 2640
+3 2641 2564 2640
+3 669 2637 2640
+3 681 2639 2637
+3 690 2640 2639
+3 2640 2637 2639
+3 33 2623 2587
+3 688 2642 2623
+3 677 2587 2642
+3 2587 2623 2642
+3 186 2643 2626
+3 691 2644 2643
+3 688 2626 2644
+3 2626 2643 2644
+3 183 2591 2646
+3 677 2645 2591
+3 691 2646 2645
+3 2646 2591 2645
+3 677 2642 2645
+3 688 2644 2642
+3 691 2645 2644
+3 2645 2642 2644
+3 186 2636 2643
+3 689 2647 2636
+3 691 2643 2647
+3 2643 2636 2647
+3 181 2641 2633
+3 690 2648 2641
+3 689 2633 2648
+3 2633 2641 2648
+3 183 2646 2638
+3 691 2649 2646
+3 690 2638 2649
+3 2638 2646 2649
+3 691 2647 2649
+3 689 2648 2647
+3 690 2649 2648
+3 2649 2647 2648
+3 19 1712 2651
+3 452 2650 1712
+3 693 2651 2650
+3 2651 1712 2650
+3 125 2652 1716
+3 692 2653 2652
+3 452 1716 2653
+3 1716 2652 2653
+3 188 2654 2656
+3 693 2655 2654
+3 692 2656 2655
+3 2656 2654 2655
+3 693 2650 2655
+3 452 2653 2650
+3 692 2655 2653
+3 2655 2650 2653
+3 34 2657 1728
+3 694 2658 2657
+3 456 1728 2658
+3 1728 2657 2658
+3 187 2659 2661
+3 695 2660 2659
+3 694 2661 2660
+3 2661 2659 2660
+3 125 1733 2663
+3 456 2662 1733
+3 695 2663 2662
+3 2663 1733 2662
+3 456 2658 2662
+3 694 2660 2658
+3 695 2662 2660
+3 2662 2658 2660
+3 53 2664 2666
+3 696 2665 2664
+3 698 2666 2665
+3 2666 2664 2665
+3 188 2667 2669
+3 697 2668 2667
+3 696 2669 2668
+3 2669 2667 2668
+3 187 2670 2672
+3 698 2671 2670
+3 697 2672 2671
+3 2672 2670 2671
+3 698 2665 2671
+3 696 2668 2665
+3 697 2671 2668
+3 2671 2665 2668
+3 188 2656 2667
+3 692 2673 2656
+3 697 2667 2673
+3 2667 2656 2673
+3 125 2663 2652
+3 695 2674 2663
+3 692 2652 2674
+3 2652 2663 2674
+3 187 2672 2659
+3 697 2675 2672
+3 695 2659 2675
+3 2659 2672 2675
+3 697 2673 2675
+3 692 2674 2673
+3 695 2675 2674
+3 2675 2673 2674
+3 22 2581 1680
+3 676 2676 2581
+3 441 1680 2676
+3 1680 2581 2676
+3 184 2677 2584
+3 699 2678 2677
+3 676 2584 2678
+3 2584 2677 2678
+3 120 1685 2680
+3 441 2679 1685
+3 699 2680 2679
+3 2680 1685 2679
+3 441 2676 2679
+3 676 2678 2676
+3 699 2679 2678
+3 2679 2676 2678
+3 51 2681 2594
+3 700 2682 2681
+3 679 2594 2682
+3 2594 2681 2682
+3 189 2683 2685
+3 701 2684 2683
+3 700 2685 2684
+3 2685 2683 2684
+3 184 2599 2687
+3 679 2686 2599
+3 701 2687 2686
+3 2687 2599 2686
+3 679 2682 2686
+3 700 2684 2682
+3 701 2686 2684
+3 2686 2682 2684
+3 34 1691 2689
+3 446 2688 1691
+3 703 2689 2688
+3 2689 1691 2688
+3 120 2690 1695
+3 702 2691 2690
+3 446 1695 2691
+3 1695 2690 2691
+3 189 2692 2694
+3 703 2693 2692
+3 702 2694 2693
+3 2694 2692 2693
+3 703 2688 2693
+3 446 2691 2688
+3 702 2693 2691
+3 2693 2688 2691
+3 120 2680 2690
+3 699 2695 2680
+3 702 2690 2695
+3 2690 2680 2695
+3 184 2687 2677
+3 701 2696 2687
+3 699 2677 2696
+3 2677 2687 2696
+3 189 2694 2683
+3 702 2697 2694
+3 701 2683 2697
+3 2683 2694 2697
+3 702 2695 2697
+3 699 2696 2695
+3 701 2697 2696
+3 2697 2695 2696
+3 21 2698 2550
+3 704 2699 2698
+3 666 2550 2699
+3 2550 2698 2699
+3 190 2700 2702
+3 705 2701 2700
+3 704 2702 2701
+3 2702 2700 2701
+3 180 2555 2704
+3 666 2703 2555
+3 705 2704 2703
+3 2704 2555 2703
+3 666 2699 2703
+3 704 2701 2699
+3 705 2703 2701
+3 2703 2699 2701
+3 53 2705 2707
+3 706 2706 2705
+3 708 2707 2706
+3 2707 2705 2706
+3 191 2708 2710
+3 707 2709 2708
+3 706 2710 2709
+3 2710 2708 2709
+3 190 2711 2713
+3 708 2712 2711
+3 707 2713 2712
+3 2713 2711 2712
+3 708 2706 2712
+3 706 2709 2706
+3 707 2712 2709
+3 2712 2706 2709
+3 51 2561 2715
+3 671 2714 2561
+3 710 2715 2714
+3 2715 2561 2714
+3 180 2716 2565
+3 709 2717 2716
+3 671 2565 2717
+3 2565 2716 2717
+3 191 2718 2720
+3 710 2719 2718
+3 709 2720 2719
+3 2720 2718 2719
+3 710 2714 2719
+3 671 2717 2714
+3 709 2719 2717
+3 2719 2714 2717
+3 180 2704 2716
+3 705 2721 2704
+3 709 2716 2721
+3 2716 2704 2721
+3 190 2713 2700
+3 707 2722 2713
+3 705 2700 2722
+3 2700 2713 2722
+3 191 2720 2708
+3 709 2723 2720
+3 707 2708 2723
+3 2708 2720 2723
+3 709 2721 2723
+3 705 2722 2721
+3 707 2723 2722
+3 2723 2721 2722
+3 53 2666 2705
+3 698 2724 2666
+3 706 2705 2724
+3 2705 2666 2724
+3 187 2725 2670
+3 711 2726 2725
+3 698 2670 2726
+3 2670 2725 2726
+3 191 2710 2728
+3 706 2727 2710
+3 711 2728 2727
+3 2728 2710 2727
+3 706 2724 2727
+3 698 2726 2724
+3 711 2727 2726
+3 2727 2724 2726
+3 34 2689 2657
+3 703 2729 2689
+3 694 2657 2729
+3 2657 2689 2729
+3 189 2730 2692
+3 712 2731 2730
+3 703 2692 2731
+3 2692 2730 2731
+3 187 2661 2733
+3 694 2732 2661
+3 712 2733 2732
+3 2733 2661 2732
+3 694 2729 2732
+3 703 2731 2729
+3 712 2732 2731
+3 2732 2729 2731
+3 51 2715 2681
+3 710 2734 2715
+3 700 2681 2734
+3 2681 2715 2734
+3 191 2735 2718
+3 713 2736 2735
+3 710 2718 2736
+3 2718 2735 2736
+3 189 2685 2738
+3 700 2737 2685
+3 713 2738 2737
+3 2738 2685 2737
+3 700 2734 2737
+3 710 2736 2734
+3 713 2737 2736
+3 2737 2734 2736
+3 191 2728 2735
+3 711 2739 2728
+3 713 2735 2739
+3 2735 2728 2739
+3 187 2733 2725
+3 712 2740 2733
+3 711 2725 2740
+3 2725 2733 2740
+3 189 2738 2730
+3 713 2741 2738
+3 712 2730 2741
+3 2730 2738 2741
+3 713 2739 2741
+3 711 2740 2739
+3 712 2741 2740
+3 2741 2739 2740
+3 10 2742 2744
+3 714 2743 2742
+3 716 2744 2743
+3 2744 2742 2743
+3 192 2745 2747
+3 715 2746 2745
+3 714 2747 2746
+3 2747 2745 2746
+3 194 2748 2750
+3 716 2749 2748
+3 715 2750 2749
+3 2750 2748 2749
+3 716 2743 2749
+3 714 2746 2743
+3 715 2749 2746
+3 2749 2743 2746
+3 54 2751 2753
+3 717 2752 2751
+3 719 2753 2752
+3 2753 2751 2752
+3 193 2754 2756
+3 718 2755 2754
+3 717 2756 2755
+3 2756 2754 2755
+3 192 2757 2759
+3 719 2758 2757
+3 718 2759 2758
+3 2759 2757 2758
+3 719 2752 2758
+3 717 2755 2752
+3 718 2758 2755
+3 2758 2752 2755
+3 56 2760 2762
+3 720 2761 2760
+3 722 2762 2761
+3 2762 2760 2761
+3 194 2763 2765
+3 721 2764 2763
+3 720 2765 2764
+3 2765 2763 2764
+3 193 2766 2768
+3 722 2767 2766
+3 721 2768 2767
+3 2768 2766 2767
+3 722 2761 2767
+3 720 2764 2761
+3 721 2767 2764
+3 2767 2761 2764
+3 194 2750 2763
+3 715 2769 2750
+3 721 2763 2769
+3 2763 2750 2769
+3 192 2759 2745
+3 718 2770 2759
+3 715 2745 2770
+3 2745 2759 2770
+3 193 2768 2754
+3 721 2771 2768
+3 718 2754 2771
+3 2754 2768 2771
+3 721 2769 2771
+3 715 2770 2769
+3 718 2771 2770
+3 2771 2769 2770
+3 24 2772 2774
+3 723 2773 2772
+3 725 2774 2773
+3 2774 2772 2773
+3 195 2775 2777
+3 724 2776 2775
+3 723 2777 2776
+3 2777 2775 2776
+3 197 2778 2780
+3 725 2779 2778
+3 724 2780 2779
+3 2780 2778 2779
+3 725 2773 2779
+3 723 2776 2773
+3 724 2779 2776
+3 2779 2773 2776
+3 55 2781 2783
+3 726 2782 2781
+3 728 2783 2782
+3 2783 2781 2782
+3 196 2784 2786
+3 727 2785 2784
+3 726 2786 2785
+3 2786 2784 2785
+3 195 2787 2789
+3 728 2788 2787
+3 727 2789 2788
+3 2789 2787 2788
+3 728 2782 2788
+3 726 2785 2782
+3 727 2788 2785
+3 2788 2782 2785
+3 54 2790 2792
+3 729 2791 2790
+3 731 2792 2791
+3 2792 2790 2791
+3 197 2793 2795
+3 730 2794 2793
+3 729 2795 2794
+3 2795 2793 2794
+3 196 2796 2798
+3 731 2797 2796
+3 730 2798 2797
+3 2798 2796 2797
+3 731 2791 2797
+3 729 2794 2791
+3 730 2797 2794
+3 2797 2791 2794
+3 197 2780 2793
+3 724 2799 2780
+3 730 2793 2799
+3 2793 2780 2799
+3 195 2789 2775
+3 727 2800 2789
+3 724 2775 2800
+3 2775 2789 2800
+3 196 2798 2784
+3 730 2801 2798
+3 727 2784 2801
+3 2784 2798 2801
+3 730 2799 2801
+3 724 2800 2799
+3 727 2801 2800
+3 2801 2799 2800
+3 23 2802 2804
+3 732 2803 2802
+3 734 2804 2803
+3 2804 2802 2803
+3 198 2805 2807
+3 733 2806 2805
+3 732 2807 2806
+3 2807 2805 2806
+3 200 2808 2810
+3 734 2809 2808
+3 733 2810 2809
+3 2810 2808 2809
+3 734 2803 2809
+3 732 2806 2803
+3 733 2809 2806
+3 2809 2803 2806
+3 56 2811 2813
+3 735 2812 2811
+3 737 2813 2812
+3 2813 2811 2812
+3 199 2814 2816
+3 736 2815 2814
+3 735 2816 2815
+3 2816 2814 2815
+3 198 2817 2819
+3 737 2818 2817
+3 736 2819 2818
+3 2819 2817 2818
+3 737 2812 2818
+3 735 2815 2812
+3 736 2818 2815
+3 2818 2812 2815
+3 55 2820 2822
+3 738 2821 2820
+3 740 2822 2821
+3 2822 2820 2821
+3 200 2823 2825
+3 739 2824 2823
+3 738 2825 2824
+3 2825 2823 2824
+3 199 2826 2828
+3 740 2827 2826
+3 739 2828 2827
+3 2828 2826 2827
+3 740 2821 2827
+3 738 2824 2821
+3 739 2827 2824
+3 2827 2821 2824
+3 200 2810 2823
+3 733 2829 2810
+3 739 2823 2829
+3 2823 2810 2829
+3 198 2819 2805
+3 736 2830 2819
+3 733 2805 2830
+3 2805 2819 2830
+3 199 2828 2814
+3 739 2831 2828
+3 736 2814 2831
+3 2814 2828 2831
+3 739 2829 2831
+3 733 2830 2829
+3 736 2831 2830
+3 2831 2829 2830
+3 56 2762 2811
+3 722 2832 2762
+3 735 2811 2832
+3 2811 2762 2832
+3 193 2833 2766
+3 741 2834 2833
+3 722 2766 2834
+3 2766 2833 2834
+3 199 2816 2836
+3 735 2835 2816
+3 741 2836 2835
+3 2836 2816 2835
+3 735 2832 2835
+3 722 2834 2832
+3 741 2835 2834
+3 2835 2832 2834
+3 54 2792 2751
+3 731 2837 2792
+3 717 2751 2837
+3 2751 2792 2837
+3 196 2838 2796
+3 742 2839 2838
+3 731 2796 2839
+3 2796 2838 2839
+3 193 2756 2841
+3 717 2840 2756
+3 742 2841 2840
+3 2841 2756 2840
+3 717 2837 2840
+3 731 2839 2837
+3 742 2840 2839
+3 2840 2837 2839
+3 55 2822 2781
+3 740 2842 2822
+3 726 2781 2842
+3 2781 2822 2842
+3 199 2843 2826
+3 743 2844 2843
+3 740 2826 2844
+3 2826 2843 2844
+3 196 2786 2846
+3 726 2845 2786
+3 743 2846 2845
+3 2846 2786 2845
+3 726 2842 2845
+3 740 2844 2842
+3 743 2845 2844
+3 2845 2842 2844
+3 199 2836 2843
+3 741 2847 2836
+3 743 2843 2847
+3 2843 2836 2847
+3 193 2841 2833
+3 742 2848 2841
+3 741 2833 2848
+3 2833 2841 2848
+3 196 2846 2838
+3 743 2849 2846
+3 742 2838 2849
+3 2838 2846 2849
+3 743 2847 2849
+3 741 2848 2847
+3 742 2849 2848
+3 2849 2847 2848
+3 13 2850 2852
+3 744 2851 2850
+3 746 2852 2851
+3 2852 2850 2851
+3 201 2853 2855
+3 745 2854 2853
+3 744 2855 2854
+3 2855 2853 2854
+3 203 2856 2858
+3 746 2857 2856
+3 745 2858 2857
+3 2858 2856 2857
+3 746 2851 2857
+3 744 2854 2851
+3 745 2857 2854
+3 2857 2851 2854
+3 57 2859 2861
+3 747 2860 2859
+3 749 2861 2860
+3 2861 2859 2860
+3 202 2862 2864
+3 748 2863 2862
+3 747 2864 2863
+3 2864 2862 2863
+3 201 2865 2867
+3 749 2866 2865
+3 748 2867 2866
+3 2867 2865 2866
+3 749 2860 2866
+3 747 2863 2860
+3 748 2866 2863
+3 2866 2860 2863
+3 59 2868 2870
+3 750 2869 2868
+3 752 2870 2869
+3 2870 2868 2869
+3 203 2871 2873
+3 751 2872 2871
+3 750 2873 2872
+3 2873 2871 2872
+3 202 2874 2876
+3 752 2875 2874
+3 751 2876 2875
+3 2876 2874 2875
+3 752 2869 2875
+3 750 2872 2869
+3 751 2875 2872
+3 2875 2869 2872
+3 203 2858 2871
+3 745 2877 2858
+3 751 2871 2877
+3 2871 2858 2877
+3 201 2867 2853
+3 748 2878 2867
+3 745 2853 2878
+3 2853 2867 2878
+3 202 2876 2862
+3 751 2879 2876
+3 748 2862 2879
+3 2862 2876 2879
+3 751 2877 2879
+3 745 2878 2877
+3 748 2879 2878
+3 2879 2877 2878
+3 9 2880 2882
+3 753 2881 2880
+3 755 2882 2881
+3 2882 2880 2881
+3 204 2883 2885
+3 754 2884 2883
+3 753 2885 2884
+3 2885 2883 2884
+3 206 2886 2888
+3 755 2887 2886
+3 754 2888 2887
+3 2888 2886 2887
+3 755 2881 2887
+3 753 2884 2881
+3 754 2887 2884
+3 2887 2881 2884
+3 58 2889 2891
+3 756 2890 2889
+3 758 2891 2890
+3 2891 2889 2890
+3 205 2892 2894
+3 757 2893 2892
+3 756 2894 2893
+3 2894 2892 2893
+3 204 2895 2897
+3 758 2896 2895
+3 757 2897 2896
+3 2897 2895 2896
+3 758 2890 2896
+3 756 2893 2890
+3 757 2896 2893
+3 2896 2890 2893
+3 57 2898 2900
+3 759 2899 2898
+3 761 2900 2899
+3 2900 2898 2899
+3 206 2901 2903
+3 760 2902 2901
+3 759 2903 2902
+3 2903 2901 2902
+3 205 2904 2906
+3 761 2905 2904
+3 760 2906 2905
+3 2906 2904 2905
+3 761 2899 2905
+3 759 2902 2899
+3 760 2905 2902
+3 2905 2899 2902
+3 206 2888 2901
+3 754 2907 2888
+3 760 2901 2907
+3 2901 2888 2907
+3 204 2897 2883
+3 757 2908 2897
+3 754 2883 2908
+3 2883 2897 2908
+3 205 2906 2892
+3 760 2909 2906
+3 757 2892 2909
+3 2892 2906 2909
+3 760 2907 2909
+3 754 2908 2907
+3 757 2909 2908
+3 2909 2907 2908
+3 18 2910 2912
+3 762 2911 2910
+3 764 2912 2911
+3 2912 2910 2911
+3 207 2913 2915
+3 763 2914 2913
+3 762 2915 2914
+3 2915 2913 2914
+3 209 2916 2918
+3 764 2917 2916
+3 763 2918 2917
+3 2918 2916 2917
+3 764 2911 2917
+3 762 2914 2911
+3 763 2917 2914
+3 2917 2911 2914
+3 59 2919 2921
+3 765 2920 2919
+3 767 2921 2920
+3 2921 2919 2920
+3 208 2922 2924
+3 766 2923 2922
+3 765 2924 2923
+3 2924 2922 2923
+3 207 2925 2927
+3 767 2926 2925
+3 766 2927 2926
+3 2927 2925 2926
+3 767 2920 2926
+3 765 2923 2920
+3 766 2926 2923
+3 2926 2920 2923
+3 58 2928 2930
+3 768 2929 2928
+3 770 2930 2929
+3 2930 2928 2929
+3 209 2931 2933
+3 769 2932 2931
+3 768 2933 2932
+3 2933 2931 2932
+3 208 2934 2936
+3 770 2935 2934
+3 769 2936 2935
+3 2936 2934 2935
+3 770 2929 2935
+3 768 2932 2929
+3 769 2935 2932
+3 2935 2929 2932
+3 209 2918 2931
+3 763 2937 2918
+3 769 2931 2937
+3 2931 2918 2937
+3 207 2927 2913
+3 766 2938 2927
+3 763 2913 2938
+3 2913 2927 2938
+3 208 2936 2922
+3 769 2939 2936
+3 766 2922 2939
+3 2922 2936 2939
+3 769 2937 2939
+3 763 2938 2937
+3 766 2939 2938
+3 2939 2937 2938
+3 59 2870 2919
+3 752 2940 2870
+3 765 2919 2940
+3 2919 2870 2940
+3 202 2941 2874
+3 771 2942 2941
+3 752 2874 2942
+3 2874 2941 2942
+3 208 2924 2944
+3 765 2943 2924
+3 771 2944 2943
+3 2944 2924 2943
+3 765 2940 2943
+3 752 2942 2940
+3 771 2943 2942
+3 2943 2940 2942
+3 57 2900 2859
+3 761 2945 2900
+3 747 2859 2945
+3 2859 2900 2945
+3 205 2946 2904
+3 772 2947 2946
+3 761 2904 2947
+3 2904 2946 2947
+3 202 2864 2949
+3 747 2948 2864
+3 772 2949 2948
+3 2949 2864 2948
+3 747 2945 2948
+3 761 2947 2945
+3 772 2948 2947
+3 2948 2945 2947
+3 58 2930 2889
+3 770 2950 2930
+3 756 2889 2950
+3 2889 2930 2950
+3 208 2951 2934
+3 773 2952 2951
+3 770 2934 2952
+3 2934 2951 2952
+3 205 2894 2954
+3 756 2953 2894
+3 773 2954 2953
+3 2954 2894 2953
+3 756 2950 2953
+3 770 2952 2950
+3 773 2953 2952
+3 2953 2950 2952
+3 208 2944 2951
+3 771 2955 2944
+3 773 2951 2955
+3 2951 2944 2955
+3 202 2949 2941
+3 772 2956 2949
+3 771 2941 2956
+3 2941 2949 2956
+3 205 2954 2946
+3 773 2957 2954
+3 772 2946 2957
+3 2946 2954 2957
+3 773 2955 2957
+3 771 2956 2955
+3 772 2957 2956
+3 2957 2955 2956
+3 21 2958 2698
+3 774 2959 2958
+3 704 2698 2959
+3 2698 2958 2959
+3 210 2960 2962
+3 775 2961 2960
+3 774 2962 2961
+3 2962 2960 2961
+3 190 2702 2964
+3 704 2963 2702
+3 775 2964 2963
+3 2964 2702 2963
+3 704 2959 2963
+3 774 2961 2959
+3 775 2963 2961
+3 2963 2959 2961
+3 60 2965 2967
+3 776 2966 2965
+3 778 2967 2966
+3 2967 2965 2966
+3 211 2968 2970
+3 777 2969 2968
+3 776 2970 2969
+3 2970 2968 2969
+3 210 2971 2973
+3 778 2972 2971
+3 777 2973 2972
+3 2973 2971 2972
+3 778 2966 2972
+3 776 2969 2966
+3 777 2972 2969
+3 2972 2966 2969
+3 53 2707 2975
+3 708 2974 2707
+3 780 2975 2974
+3 2975 2707 2974
+3 190 2976 2711
+3 779 2977 2976
+3 708 2711 2977
+3 2711 2976 2977
+3 211 2978 2980
+3 780 2979 2978
+3 779 2980 2979
+3 2980 2978 2979
+3 780 2974 2979
+3 708 2977 2974
+3 779 2979 2977
+3 2979 2974 2977
+3 190 2964 2976
+3 775 2981 2964
+3 779 2976 2981
+3 2976 2964 2981
+3 210 2973 2960
+3 777 2982 2973
+3 775 2960 2982
+3 2960 2973 2982
+3 211 2980 2968
+3 779 2983 2980
+3 777 2968 2983
+3 2968 2980 2983
+3 779 2981 2983
+3 775 2982 2981
+3 777 2983 2982
+3 2983 2981 2982
+3 20 2984 2986
+3 781 2985 2984
+3 783 2986 2985
+3 2986 2984 2985
+3 212 2987 2989
+3 782 2988 2987
+3 781 2989 2988
+3 2989 2987 2988
+3 214 2990 2992
+3 783 2991 2990
+3 782 2992 2991
+3 2992 2990 2991
+3 783 2985 2991
+3 781 2988 2985
+3 782 2991 2988
+3 2991 2985 2988
+3 61 2993 2995
+3 784 2994 2993
+3 786 2995 2994
+3 2995 2993 2994
+3 213 2996 2998
+3 785 2997 2996
+3 784 2998 2997
+3 2998 2996 2997
+3 212 2999 3001
+3 786 3000 2999
+3 785 3001 3000
+3 3001 2999 3000
+3 786 2994 3000
+3 784 2997 2994
+3 785 3000 2997
+3 3000 2994 2997
+3 60 3002 3004
+3 787 3003 3002
+3 789 3004 3003
+3 3004 3002 3003
+3 214 3005 3007
+3 788 3006 3005
+3 787 3007 3006
+3 3007 3005 3006
+3 213 3008 3010
+3 789 3009 3008
+3 788 3010 3009
+3 3010 3008 3009
+3 789 3003 3009
+3 787 3006 3003
+3 788 3009 3006
+3 3009 3003 3006
+3 214 2992 3005
+3 782 3011 2992
+3 788 3005 3011
+3 3005 2992 3011
+3 212 3001 2987
+3 785 3012 3001
+3 782 2987 3012
+3 2987 3001 3012
+3 213 3010 2996
+3 788 3013 3010
+3 785 2996 3013
+3 2996 3010 3013
+3 788 3011 3013
+3 782 3012 3011
+3 785 3013 3012
+3 3013 3011 3012
+3 19 2651 3015
+3 693 3014 2651
+3 791 3015 3014
+3 3015 2651 3014
+3 188 3016 2654
+3 790 3017 3016
+3 693 2654 3017
+3 2654 3016 3017
+3 216 3018 3020
+3 791 3019 3018
+3 790 3020 3019
+3 3020 3018 3019
+3 791 3014 3019
+3 693 3017 3014
+3 790 3019 3017
+3 3019 3014 3017
+3 53 3021 2664
+3 792 3022 3021
+3 696 2664 3022
+3 2664 3021 3022
+3 215 3023 3025
+3 793 3024 3023
+3 792 3025 3024
+3 3025 3023 3024
+3 188 2669 3027
+3 696 3026 2669
+3 793 3027 3026
+3 3027 2669 3026
+3 696 3022 3026
+3 792 3024 3022
+3 793 3026 3024
+3 3026 3022 3024
+3 61 3028 3030
+3 794 3029 3028
+3 796 3030 3029
+3 3030 3028 3029
+3 216 3031 3033
+3 795 3032 3031
+3 794 3033 3032
+3 3033 3031 3032
+3 215 3034 3036
+3 796 3035 3034
+3 795 3036 3035
+3 3036 3034 3035
+3 796 3029 3035
+3 794 3032 3029
+3 795 3035 3032
+3 3035 3029 3032
+3 216 3020 3031
+3 790 3037 3020
+3 795 3031 3037
+3 3031 3020 3037
+3 188 3027 3016
+3 793 3038 3027
+3 790 3016 3038
+3 3016 3027 3038
+3 215 3036 3023
+3 795 3039 3036
+3 793 3023 3039
+3 3023 3036 3039
+3 795 3037 3039
+3 790 3038 3037
+3 793 3039 3038
+3 3039 3037 3038
+3 53 2975 3021
+3 780 3040 2975
+3 792 3021 3040
+3 3021 2975 3040
+3 211 3041 2978
+3 797 3042 3041
+3 780 2978 3042
+3 2978 3041 3042
+3 215 3025 3044
+3 792 3043 3025
+3 797 3044 3043
+3 3044 3025 3043
+3 792 3040 3043
+3 780 3042 3040
+3 797 3043 3042
+3 3043 3040 3042
+3 60 3004 2965
+3 789 3045 3004
+3 776 2965 3045
+3 2965 3004 3045
+3 213 3046 3008
+3 798 3047 3046
+3 789 3008 3047
+3 3008 3046 3047
+3 211 2970 3049
+3 776 3048 2970
+3 798 3049 3048
+3 3049 2970 3048
+3 776 3045 3048
+3 789 3047 3045
+3 798 3048 3047
+3 3048 3045 3047
+3 61 3030 2993
+3 796 3050 3030
+3 784 2993 3050
+3 2993 3030 3050
+3 215 3051 3034
+3 799 3052 3051
+3 796 3034 3052
+3 3034 3051 3052
+3 213 2998 3054
+3 784 3053 2998
+3 799 3054 3053
+3 3054 2998 3053
+3 784 3050 3053
+3 796 3052 3050
+3 799 3053 3052
+3 3053 3050 3052
+3 215 3044 3051
+3 797 3055 3044
+3 799 3051 3055
+3 3051 3044 3055
+3 211 3049 3041
+3 798 3056 3049
+3 797 3041 3056
+3 3041 3049 3056
+3 213 3054 3046
+3 799 3057 3054
+3 798 3046 3057
+3 3046 3054 3057
+3 799 3055 3057
+3 797 3056 3055
+3 798 3057 3056
+3 3057 3055 3056
+3 23 2015 2802
+3 531 3058 2015
+3 732 2802 3058
+3 2802 2015 3058
+3 146 3059 2018
+3 800 3060 3059
+3 531 2018 3060
+3 2018 3059 3060
+3 198 2807 3062
+3 732 3061 2807
+3 800 3062 3061
+3 3062 2807 3061
+3 732 3058 3061
+3 531 3060 3058
+3 800 3061 3060
+3 3061 3058 3060
+3 41 3063 2028
+3 801 3064 3063
+3 534 2028 3064
+3 2028 3063 3064
+3 217 3065 3067
+3 802 3066 3065
+3 801 3067 3066
+3 3067 3065 3066
+3 146 2033 3069
+3 534 3068 2033
+3 802 3069 3068
+3 3069 2033 3068
+3 534 3064 3068
+3 801 3066 3064
+3 802 3068 3066
+3 3068 3064 3066
+3 56 2813 3071
+3 737 3070 2813
+3 804 3071 3070
+3 3071 2813 3070
+3 198 3072 2817
+3 803 3073 3072
+3 737 2817 3073
+3 2817 3072 3073
+3 217 3074 3076
+3 804 3075 3074
+3 803 3076 3075
+3 3076 3074 3075
+3 804 3070 3075
+3 737 3073 3070
+3 803 3075 3073
+3 3075 3070 3073
+3 198 3062 3072
+3 800 3077 3062
+3 803 3072 3077
+3 3072 3062 3077
+3 146 3069 3059
+3 802 3078 3069
+3 800 3059 3078
+3 3059 3069 3078
+3 217 3076 3065
+3 803 3079 3076
+3 802 3065 3079
+3 3065 3076 3079
+3 803 3077 3079
+3 800 3078 3077
+3 802 3079 3078
+3 3079 3077 3078
+3 25 3080 1984
+3 805 3081 3080
+3 521 1984 3081
+3 1984 3080 3081
+3 218 3082 3084
+3 806 3083 3082
+3 805 3084 3083
+3 3084 3082 3083
+3 142 1989 3086
+3 521 3085 1989
+3 806 3086 3085
+3 3086 1989 3085
+3 521 3081 3085
+3 805 3083 3081
+3 806 3085 3083
+3 3085 3081 3083
+3 62 3087 3089
+3 807 3088 3087
+3 809 3089 3088
+3 3089 3087 3088
+3 219 3090 3092
+3 808 3091 3090
+3 807 3092 3091
+3 3092 3090 3091
+3 218 3093 3095
+3 809 3094 3093
+3 808 3095 3094
+3 3095 3093 3094
+3 809 3088 3094
+3 807 3091 3088
+3 808 3094 3091
+3 3094 3088 3091
+3 41 1995 3097
+3 526 3096 1995
+3 811 3097 3096
+3 3097 1995 3096
+3 142 3098 1999
+3 810 3099 3098
+3 526 1999 3099
+3 1999 3098 3099
+3 219 3100 3102
+3 811 3101 3100
+3 810 3102 3101
+3 3102 3100 3101
+3 811 3096 3101
+3 526 3099 3096
+3 810 3101 3099
+3 3101 3096 3099
+3 142 3086 3098
+3 806 3103 3086
+3 810 3098 3103
+3 3098 3086 3103
+3 218 3095 3082
+3 808 3104 3095
+3 806 3082 3104
+3 3082 3095 3104
+3 219 3102 3090
+3 810 3105 3102
+3 808 3090 3105
+3 3090 3102 3105
+3 810 3103 3105
+3 806 3104 3103
+3 808 3105 3104
+3 3105 3103 3104
+3 10 2744 3107
+3 716 3106 2744
+3 813 3107 3106
+3 3107 2744 3106
+3 194 3108 2748
+3 812 3109 3108
+3 716 2748 3109
+3 2748 3108 3109
+3 221 3110 3112
+3 813 3111 3110
+3 812 3112 3111
+3 3112 3110 3111
+3 813 3106 3111
+3 716 3109 3106
+3 812 3111 3109
+3 3111 3106 3109
+3 56 3113 2760
+3 814 3114 3113
+3 720 2760 3114
+3 2760 3113 3114
+3 220 3115 3117
+3 815 3116 3115
+3 814 3117 3116
+3 3117 3115 3116
+3 194 2765 3119
+3 720 3118 2765
+3 815 3119 3118
+3 3119 2765 3118
+3 720 3114 3118
+3 814 3116 3114
+3 815 3118 3116
+3 3118 3114 3116
+3 62 3120 3122
+3 816 3121 3120
+3 818 3122 3121
+3 3122 3120 3121
+3 221 3123 3125
+3 817 3124 3123
+3 816 3125 3124
+3 3125 3123 3124
+3 220 3126 3128
+3 818 3127 3126
+3 817 3128 3127
+3 3128 3126 3127
+3 818 3121 3127
+3 816 3124 3121
+3 817 3127 3124
+3 3127 3121 3124
+3 221 3112 3123
+3 812 3129 3112
+3 817 3123 3129
+3 3123 3112 3129
+3 194 3119 3108
+3 815 3130 3119
+3 812 3108 3130
+3 3108 3119 3130
+3 220 3128 3115
+3 817 3131 3128
+3 815 3115 3131
+3 3115 3128 3131
+3 817 3129 3131
+3 812 3130 3129
+3 815 3131 3130
+3 3131 3129 3130
+3 56 3071 3113
+3 804 3132 3071
+3 814 3113 3132
+3 3113 3071 3132
+3 217 3133 3074
+3 819 3134 3133
+3 804 3074 3134
+3 3074 3133 3134
+3 220 3117 3136
+3 814 3135 3117
+3 819 3136 3135
+3 3136 3117 3135
+3 814 3132 3135
+3 804 3134 3132
+3 819 3135 3134
+3 3135 3132 3134
+3 41 3097 3063
+3 811 3137 3097
+3 801 3063 3137
+3 3063 3097 3137
+3 219 3138 3100
+3 820 3139 3138
+3 811 3100 3139
+3 3100 3138 3139
+3 217 3067 3141
+3 801 3140 3067
+3 820 3141 3140
+3 3141 3067 3140
+3 801 3137 3140
+3 811 3139 3137
+3 820 3140 3139
+3 3140 3137 3139
+3 62 3122 3087
+3 818 3142 3122
+3 807 3087 3142
+3 3087 3122 3142
+3 220 3143 3126
+3 821 3144 3143
+3 818 3126 3144
+3 3126 3143 3144
+3 219 3092 3146
+3 807 3145 3092
+3 821 3146 3145
+3 3146 3092 3145
+3 807 3142 3145
+3 818 3144 3142
+3 821 3145 3144
+3 3145 3142 3144
+3 220 3136 3143
+3 819 3147 3136
+3 821 3143 3147
+3 3143 3136 3147
+3 217 3141 3133
+3 820 3148 3141
+3 819 3133 3148
+3 3133 3141 3148
+3 219 3146 3138
+3 821 3149 3146
+3 820 3138 3149
+3 3138 3146 3149
+3 821 3147 3149
+3 819 3148 3147
+3 820 3149 3148
+3 3149 3147 3148
+3 8 3150 3152
+3 822 3151 3150
+3 824 3152 3151
+3 3152 3150 3151
+3 222 3153 3155
+3 823 3154 3153
+3 822 3155 3154
+3 3155 3153 3154
+3 224 3156 3158
+3 824 3157 3156
+3 823 3158 3157
+3 3158 3156 3157
+3 824 3151 3157
+3 822 3154 3151
+3 823 3157 3154
+3 3157 3151 3154
+3 63 3159 3161
+3 825 3160 3159
+3 827 3161 3160
+3 3161 3159 3160
+3 223 3162 3164
+3 826 3163 3162
+3 825 3164 3163
+3 3164 3162 3163
+3 222 3165 3167
+3 827 3166 3165
+3 826 3167 3166
+3 3167 3165 3166
+3 827 3160 3166
+3 825 3163 3160
+3 826 3166 3163
+3 3166 3160 3163
+3 64 3168 3170
+3 828 3169 3168
+3 830 3170 3169
+3 3170 3168 3169
+3 224 3171 3173
+3 829 3172 3171
+3 828 3173 3172
+3 3173 3171 3172
+3 223 3174 3176
+3 830 3175 3174
+3 829 3176 3175
+3 3176 3174 3175
+3 830 3169 3175
+3 828 3172 3169
+3 829 3175 3172
+3 3175 3169 3172
+3 224 3158 3171
+3 823 3177 3158
+3 829 3171 3177
+3 3171 3158 3177
+3 222 3167 3153
+3 826 3178 3167
+3 823 3153 3178
+3 3153 3167 3178
+3 223 3176 3162
+3 829 3179 3176
+3 826 3162 3179
+3 3162 3176 3179
+3 829 3177 3179
+3 823 3178 3177
+3 826 3179 3178
+3 3179 3177 3178
+3 18 2912 3181
+3 764 3180 2912
+3 832 3181 3180
+3 3181 2912 3180
+3 209 3182 2916
+3 831 3183 3182
+3 764 2916 3183
+3 2916 3182 3183
+3 226 3184 3186
+3 832 3185 3184
+3 831 3186 3185
+3 3186 3184 3185
+3 832 3180 3185
+3 764 3183 3180
+3 831 3185 3183
+3 3185 3180 3183
+3 58 3187 2928
+3 833 3188 3187
+3 768 2928 3188
+3 2928 3187 3188
+3 225 3189 3191
+3 834 3190 3189
+3 833 3191 3190
+3 3191 3189 3190
+3 209 2933 3193
+3 768 3192 2933
+3 834 3193 3192
+3 3193 2933 3192
+3 768 3188 3192
+3 833 3190 3188
+3 834 3192 3190
+3 3192 3188 3190
+3 63 3194 3196
+3 835 3195 3194
+3 837 3196 3195
+3 3196 3194 3195
+3 226 3197 3199
+3 836 3198 3197
+3 835 3199 3198
+3 3199 3197 3198
+3 225 3200 3202
+3 837 3201 3200
+3 836 3202 3201
+3 3202 3200 3201
+3 837 3195 3201
+3 835 3198 3195
+3 836 3201 3198
+3 3201 3195 3198
+3 226 3186 3197
+3 831 3203 3186
+3 836 3197 3203
+3 3197 3186 3203
+3 209 3193 3182
+3 834 3204 3193
+3 831 3182 3204
+3 3182 3193 3204
+3 225 3202 3189
+3 836 3205 3202
+3 834 3189 3205
+3 3189 3202 3205
+3 836 3203 3205
+3 831 3204 3203
+3 834 3205 3204
+3 3205 3203 3204
+3 9 3206 2880
+3 838 3207 3206
+3 753 2880 3207
+3 2880 3206 3207
+3 227 3208 3210
+3 839 3209 3208
+3 838 3210 3209
+3 3210 3208 3209
+3 204 2885 3212
+3 753 3211 2885
+3 839 3212 3211
+3 3212 2885 3211
+3 753 3207 3211
+3 838 3209 3207
+3 839 3211 3209
+3 3211 3207 3209
+3 64 3213 3215
+3 840 3214 3213
+3 842 3215 3214
+3 3215 3213 3214
+3 228 3216 3218
+3 841 3217 3216
+3 840 3218 3217
+3 3218 3216 3217
+3 227 3219 3221
+3 842 3220 3219
+3 841 3221 3220
+3 3221 3219 3220
+3 842 3214 3220
+3 840 3217 3214
+3 841 3220 3217
+3 3220 3214 3217
+3 58 2891 3223
+3 758 3222 2891
+3 844 3223 3222
+3 3223 2891 3222
+3 204 3224 2895
+3 843 3225 3224
+3 758 2895 3225
+3 2895 3224 3225
+3 228 3226 3228
+3 844 3227 3226
+3 843 3228 3227
+3 3228 3226 3227
+3 844 3222 3227
+3 758 3225 3222
+3 843 3227 3225
+3 3227 3222 3225
+3 204 3212 3224
+3 839 3229 3212
+3 843 3224 3229
+3 3224 3212 3229
+3 227 3221 3208
+3 841 3230 3221
+3 839 3208 3230
+3 3208 3221 3230
+3 228 3228 3216
+3 843 3231 3228
+3 841 3216 3231
+3 3216 3228 3231
+3 843 3229 3231
+3 839 3230 3229
+3 841 3231 3230
+3 3231 3229 3230
+3 64 3170 3213
+3 830 3232 3170
+3 840 3213 3232
+3 3213 3170 3232
+3 223 3233 3174
+3 845 3234 3233
+3 830 3174 3234
+3 3174 3233 3234
+3 228 3218 3236
+3 840 3235 3218
+3 845 3236 3235
+3 3236 3218 3235
+3 840 3232 3235
+3 830 3234 3232
+3 845 3235 3234
+3 3235 3232 3234
+3 63 3196 3159
+3 837 3237 3196
+3 825 3159 3237
+3 3159 3196 3237
+3 225 3238 3200
+3 846 3239 3238
+3 837 3200 3239
+3 3200 3238 3239
+3 223 3164 3241
+3 825 3240 3164
+3 846 3241 3240
+3 3241 3164 3240
+3 825 3237 3240
+3 837 3239 3237
+3 846 3240 3239
+3 3240 3237 3239
+3 58 3223 3187
+3 844 3242 3223
+3 833 3187 3242
+3 3187 3223 3242
+3 228 3243 3226
+3 847 3244 3243
+3 844 3226 3244
+3 3226 3243 3244
+3 225 3191 3246
+3 833 3245 3191
+3 847 3246 3245
+3 3246 3191 3245
+3 833 3242 3245
+3 844 3244 3242
+3 847 3245 3244
+3 3245 3242 3244
+3 228 3236 3243
+3 845 3247 3236
+3 847 3243 3247
+3 3243 3236 3247
+3 223 3241 3233
+3 846 3248 3241
+3 845 3233 3248
+3 3233 3241 3248
+3 225 3246 3238
+3 847 3249 3246
+3 846 3238 3249
+3 3238 3246 3249
+3 847 3247 3249
+3 845 3248 3247
+3 846 3249 3248
+3 3249 3247 3248
+3 23 2804 2606
+3 734 3250 2804
+3 682 2606 3250
+3 2606 2804 3250
+3 200 3251 2808
+3 848 3252 3251
+3 734 2808 3252
+3 2808 3251 3252
+3 185 2610 3254
+3 682 3253 2610
+3 848 3254 3253
+3 3254 2610 3253
+3 682 3250 3253
+3 734 3252 3250
+3 848 3253 3252
+3 3253 3250 3252
+3 55 3255 2820
+3 849 3256 3255
+3 738 2820 3256
+3 2820 3255 3256
+3 229 3257 3259
+3 850 3258 3257
+3 849 3259 3258
+3 3259 3257 3258
+3 200 2825 3261
+3 738 3260 2825
+3 850 3261 3260
+3 3261 2825 3260
+3 738 3256 3260
+3 849 3258 3256
+3 850 3260 3258
+3 3260 3256 3258
+3 52 2615 3263
+3 686 3262 2615
+3 852 3263 3262
+3 3263 2615 3262
+3 185 3264 2619
+3 851 3265 3264
+3 686 2619 3265
+3 2619 3264 3265
+3 229 3266 3268
+3 852 3267 3266
+3 851 3268 3267
+3 3268 3266 3267
+3 852 3262 3267
+3 686 3265 3262
+3 851 3267 3265
+3 3267 3262 3265
+3 185 3254 3264
+3 848 3269 3254
+3 851 3264 3269
+3 3264 3254 3269
+3 200 3261 3251
+3 850 3270 3261
+3 848 3251 3270
+3 3251 3261 3270
+3 229 3268 3257
+3 851 3271 3268
+3 850 3257 3271
+3 3257 3268 3271
+3 851 3269 3271
+3 848 3270 3269
+3 850 3271 3270
+3 3271 3269 3270
+3 24 3272 2772
+3 853 3273 3272
+3 723 2772 3273
+3 2772 3272 3273
+3 230 3274 3276
+3 854 3275 3274
+3 853 3276 3275
+3 3276 3274 3275
+3 195 2777 3278
+3 723 3277 2777
+3 854 3278 3277
+3 3278 2777 3277
+3 723 3273 3277
+3 853 3275 3273
+3 854 3277 3275
+3 3277 3273 3275
+3 65 3279 3281
+3 855 3280 3279
+3 857 3281 3280
+3 3281 3279 3280
+3 231 3282 3284
+3 856 3283 3282
+3 855 3284 3283
+3 3284 3282 3283
+3 230 3285 3287
+3 857 3286 3285
+3 856 3287 3286
+3 3287 3285 3286
+3 857 3280 3286
+3 855 3283 3280
+3 856 3286 3283
+3 3286 3280 3283
+3 55 2783 3289
+3 728 3288 2783
+3 859 3289 3288
+3 3289 2783 3288
+3 195 3290 2787
+3 858 3291 3290
+3 728 2787 3291
+3 2787 3290 3291
+3 231 3292 3294
+3 859 3293 3292
+3 858 3294 3293
+3 3294 3292 3293
+3 859 3288 3293
+3 728 3291 3288
+3 858 3293 3291
+3 3293 3288 3291
+3 195 3278 3290
+3 854 3295 3278
+3 858 3290 3295
+3 3290 3278 3295
+3 230 3287 3274
+3 856 3296 3287
+3 854 3274 3296
+3 3274 3287 3296
+3 231 3294 3282
+3 858 3297 3294
+3 856 3282 3297
+3 3282 3294 3297
+3 858 3295 3297
+3 854 3296 3295
+3 856 3297 3296
+3 3297 3295 3296
+3 21 2552 3299
+3 668 3298 2552
+3 861 3299 3298
+3 3299 2552 3298
+3 182 3300 2556
+3 860 3301 3300
+3 668 2556 3301
+3 2556 3300 3301
+3 233 3302 3304
+3 861 3303 3302
+3 860 3304 3303
+3 3304 3302 3303
+3 861 3298 3303
+3 668 3301 3298
+3 860 3303 3301
+3 3303 3298 3301
+3 52 3305 2568
+3 862 3306 3305
+3 672 2568 3306
+3 2568 3305 3306
+3 232 3307 3309
+3 863 3308 3307
+3 862 3309 3308
+3 3309 3307 3308
+3 182 2573 3311
+3 672 3310 2573
+3 863 3311 3310
+3 3311 2573 3310
+3 672 3306 3310
+3 862 3308 3306
+3 863 3310 3308
+3 3310 3306 3308
+3 65 3312 3314
+3 864 3313 3312
+3 866 3314 3313
+3 3314 3312 3313
+3 233 3315 3317
+3 865 3316 3315
+3 864 3317 3316
+3 3317 3315 3316
+3 232 3318 3320
+3 866 3319 3318
+3 865 3320 3319
+3 3320 3318 3319
+3 866 3313 3319
+3 864 3316 3313
+3 865 3319 3316
+3 3319 3313 3316
+3 233 3304 3315
+3 860 3321 3304
+3 865 3315 3321
+3 3315 3304 3321
+3 182 3311 3300
+3 863 3322 3311
+3 860 3300 3322
+3 3300 3311 3322
+3 232 3320 3307
+3 865 3323 3320
+3 863 3307 3323
+3 3307 3320 3323
+3 865 3321 3323
+3 860 3322 3321
+3 863 3323 3322
+3 3323 3321 3322
+3 52 3263 3305
+3 852 3324 3263
+3 862 3305 3324
+3 3305 3263 3324
+3 229 3325 3266
+3 867 3326 3325
+3 852 3266 3326
+3 3266 3325 3326
+3 232 3309 3328
+3 862 3327 3309
+3 867 3328 3327
+3 3328 3309 3327
+3 862 3324 3327
+3 852 3326 3324
+3 867 3327 3326
+3 3327 3324 3326
+3 55 3289 3255
+3 859 3329 3289
+3 849 3255 3329
+3 3255 3289 3329
+3 231 3330 3292
+3 868 3331 3330
+3 859 3292 3331
+3 3292 3330 3331
+3 229 3259 3333
+3 849 3332 3259
+3 868 3333 3332
+3 3333 3259 3332
+3 849 3329 3332
+3 859 3331 3329
+3 868 3332 3331
+3 3332 3329 3331
+3 65 3314 3279
+3 866 3334 3314
+3 855 3279 3334
+3 3279 3314 3334
+3 232 3335 3318
+3 869 3336 3335
+3 866 3318 3336
+3 3318 3335 3336
+3 231 3284 3338
+3 855 3337 3284
+3 869 3338 3337
+3 3338 3284 3337
+3 855 3334 3337
+3 866 3336 3334
+3 869 3337 3336
+3 3337 3334 3336
+3 232 3328 3335
+3 867 3339 3328
+3 869 3335 3339
+3 3335 3328 3339
+3 229 3333 3325
+3 868 3340 3333
+3 867 3325 3340
+3 3325 3333 3340
+3 231 3338 3330
+3 869 3341 3338
+3 868 3330 3341
+3 3330 3338 3341
+3 869 3339 3341
+3 867 3340 3339
+3 868 3341 3340
+3 3341 3339 3340
+3 21 3342 3344
+3 870 3343 3342
+3 872 3344 3343
+3 3344 3342 3343
+3 234 3345 3347
+3 871 3346 3345
+3 870 3347 3346
+3 3347 3345 3346
+3 236 3348 3350
+3 872 3349 3348
+3 871 3350 3349
+3 3350 3348 3349
+3 872 3343 3349
+3 870 3346 3343
+3 871 3349 3346
+3 3349 3343 3346
+3 66 3351 3353
+3 873 3352 3351
+3 875 3353 3352
+3 3353 3351 3352
+3 235 3354 3356
+3 874 3355 3354
+3 873 3356 3355
+3 3356 3354 3355
+3 234 3357 3359
+3 875 3358 3357
+3 874 3359 3358
+3 3359 3357 3358
+3 875 3352 3358
+3 873 3355 3352
+3 874 3358 3355
+3 3358 3352 3355
+3 67 3360 3362
+3 876 3361 3360
+3 878 3362 3361
+3 3362 3360 3361
+3 236 3363 3365
+3 877 3364 3363
+3 876 3365 3364
+3 3365 3363 3364
+3 235 3366 3368
+3 878 3367 3366
+3 877 3368 3367
+3 3368 3366 3367
+3 878 3361 3367
+3 876 3364 3361
+3 877 3367 3364
+3 3367 3361 3364
+3 236 3350 3363
+3 871 3369 3350
+3 877 3363 3369
+3 3363 3350 3369
+3 234 3359 3345
+3 874 3370 3359
+3 871 3345 3370
+3 3345 3359 3370
+3 235 3368 3354
+3 877 3371 3368
+3 874 3354 3371
+3 3354 3368 3371
+3 877 3369 3371
+3 871 3370 3369
+3 874 3371 3370
+3 3371 3369 3370
+3 0 1507 3373
+3 397 3372 1507
+3 880 3373 3372
+3 3373 1507 3372
+3 109 3374 1510
+3 879 3375 3374
+3 397 1510 3375
+3 1510 3374 3375
+3 238 3376 3378
+3 880 3377 3376
+3 879 3378 3377
+3 3378 3376 3377
+3 880 3372 3377
+3 397 3375 3372
+3 879 3377 3375
+3 3377 3372 3375
+3 30 3379 1520
+3 881 3380 3379
+3 400 1520 3380
+3 1520 3379 3380
+3 237 3381 3383
+3 882 3382 3381
+3 881 3383 3382
+3 3383 3381 3382
+3 109 1525 3385
+3 400 3384 1525
+3 882 3385 3384
+3 3385 1525 3384
+3 400 3380 3384
+3 881 3382 3380
+3 882 3384 3382
+3 3384 3380 3382
+3 66 3386 3388
+3 883 3387 3386
+3 885 3388 3387
+3 3388 3386 3387
+3 238 3389 3391
+3 884 3390 3389
+3 883 3391 3390
+3 3391 3389 3390
+3 237 3392 3394
+3 885 3393 3392
+3 884 3394 3393
+3 3394 3392 3393
+3 885 3387 3393
+3 883 3390 3387
+3 884 3393 3390
+3 3393 3387 3390
+3 238 3378 3389
+3 879 3395 3378
+3 884 3389 3395
+3 3389 3378 3395
+3 109 3385 3374
+3 882 3396 3385
+3 879 3374 3396
+3 3374 3385 3396
+3 237 3394 3381
+3 884 3397 3394
+3 882 3381 3397
+3 3381 3394 3397
+3 884 3395 3397
+3 879 3396 3395
+3 882 3397 3396
+3 3397 3395 3396
+3 8 3398 1476
+3 886 3399 3398
+3 387 1476 3399
+3 1476 3398 3399
+3 239 3400 3402
+3 887 3401 3400
+3 886 3402 3401
+3 3402 3400 3401
+3 105 1481 3404
+3 387 3403 1481
+3 887 3404 3403
+3 3404 1481 3403
+3 387 3399 3403
+3 886 3401 3399
+3 887 3403 3401
+3 3403 3399 3401
+3 67 3405 3407
+3 888 3406 3405
+3 890 3407 3406
+3 3407 3405 3406
+3 240 3408 3410
+3 889 3409 3408
+3 888 3410 3409
+3 3410 3408 3409
+3 239 3411 3413
+3 890 3412 3411
+3 889 3413 3412
+3 3413 3411 3412
+3 890 3406 3412
+3 888 3409 3406
+3 889 3412 3409
+3 3412 3406 3409
+3 30 1487 3415
+3 392 3414 1487
+3 892 3415 3414
+3 3415 1487 3414
+3 105 3416 1491
+3 891 3417 3416
+3 392 1491 3417
+3 1491 3416 3417
+3 240 3418 3420
+3 892 3419 3418
+3 891 3420 3419
+3 3420 3418 3419
+3 892 3414 3419
+3 392 3417 3414
+3 891 3419 3417
+3 3419 3414 3417
+3 105 3404 3416
+3 887 3421 3404
+3 891 3416 3421
+3 3416 3404 3421
+3 239 3413 3400
+3 889 3422 3413
+3 887 3400 3422
+3 3400 3413 3422
+3 240 3420 3408
+3 891 3423 3420
+3 889 3408 3423
+3 3408 3420 3423
+3 891 3421 3423
+3 887 3422 3421
+3 889 3423 3422
+3 3423 3421 3422
+3 67 3362 3405
+3 878 3424 3362
+3 888 3405 3424
+3 3405 3362 3424
+3 235 3425 3366
+3 893 3426 3425
+3 878 3366 3426
+3 3366 3425 3426
+3 240 3410 3428
+3 888 3427 3410
+3 893 3428 3427
+3 3428 3410 3427
+3 888 3424 3427
+3 878 3426 3424
+3 893 3427 3426
+3 3427 3424 3426
+3 66 3388 3351
+3 885 3429 3388
+3 873 3351 3429
+3 3351 3388 3429
+3 237 3430 3392
+3 894 3431 3430
+3 885 3392 3431
+3 3392 3430 3431
+3 235 3356 3433
+3 873 3432 3356
+3 894 3433 3432
+3 3433 3356 3432
+3 873 3429 3432
+3 885 3431 3429
+3 894 3432 3431
+3 3432 3429 3431
+3 30 3415 3379
+3 892 3434 3415
+3 881 3379 3434
+3 3379 3415 3434
+3 240 3435 3418
+3 895 3436 3435
+3 892 3418 3436
+3 3418 3435 3436
+3 237 3383 3438
+3 881 3437 3383
+3 895 3438 3437
+3 3438 3383 3437
+3 881 3434 3437
+3 892 3436 3434
+3 895 3437 3436
+3 3437 3434 3436
+3 240 3428 3435
+3 893 3439 3428
+3 895 3435 3439
+3 3435 3428 3439
+3 235 3433 3425
+3 894 3440 3433
+3 893 3425 3440
+3 3425 3433 3440
+3 237 3438 3430
+3 895 3441 3438
+3 894 3430 3441
+3 3430 3438 3441
+3 895 3439 3441
+3 893 3440 3439
+3 894 3441 3440
+3 3441 3439 3440
+3 8 3152 3398
+3 824 3442 3152
+3 886 3398 3442
+3 3398 3152 3442
+3 224 3443 3156
+3 896 3444 3443
+3 824 3156 3444
+3 3156 3443 3444
+3 239 3402 3446
+3 886 3445 3402
+3 896 3446 3445
+3 3446 3402 3445
+3 886 3442 3445
+3 824 3444 3442
+3 896 3445 3444
+3 3445 3442 3444
+3 64 3447 3168
+3 897 3448 3447
+3 828 3168 3448
+3 3168 3447 3448
+3 241 3449 3451
+3 898 3450 3449
+3 897 3451 3450
+3 3451 3449 3450
+3 224 3173 3453
+3 828 3452 3173
+3 898 3453 3452
+3 3453 3173 3452
+3 828 3448 3452
+3 897 3450 3448
+3 898 3452 3450
+3 3452 3448 3450
+3 67 3407 3455
+3 890 3454 3407
+3 900 3455 3454
+3 3455 3407 3454
+3 239 3456 3411
+3 899 3457 3456
+3 890 3411 3457
+3 3411 3456 3457
+3 241 3458 3460
+3 900 3459 3458
+3 899 3460 3459
+3 3460 3458 3459
+3 900 3454 3459
+3 890 3457 3454
+3 899 3459 3457
+3 3459 3454 3457
+3 239 3446 3456
+3 896 3461 3446
+3 899 3456 3461
+3 3456 3446 3461
+3 224 3453 3443
+3 898 3462 3453
+3 896 3443 3462
+3 3443 3453 3462
+3 241 3460 3449
+3 899 3463 3460
+3 898 3449 3463
+3 3449 3460 3463
+3 899 3461 3463
+3 896 3462 3461
+3 898 3463 3462
+3 3463 3461 3462
+3 9 3464 3206
+3 901 3465 3464
+3 838 3206 3465
+3 3206 3464 3465
+3 242 3466 3468
+3 902 3467 3466
+3 901 3468 3467
+3 3468 3466 3467
+3 227 3210 3470
+3 838 3469 3210
+3 902 3470 3469
+3 3470 3210 3469
+3 838 3465 3469
+3 901 3467 3465
+3 902 3469 3467
+3 3469 3465 3467
+3 68 3471 3473
+3 903 3472 3471
+3 905 3473 3472
+3 3473 3471 3472
+3 243 3474 3476
+3 904 3475 3474
+3 903 3476 3475
+3 3476 3474 3475
+3 242 3477 3479
+3 905 3478 3477
+3 904 3479 3478
+3 3479 3477 3478
+3 905 3472 3478
+3 903 3475 3472
+3 904 3478 3475
+3 3478 3472 3475
+3 64 3215 3481
+3 842 3480 3215
+3 907 3481 3480
+3 3481 3215 3480
+3 227 3482 3219
+3 906 3483 3482
+3 842 3219 3483
+3 3219 3482 3483
+3 243 3484 3486
+3 907 3485 3484
+3 906 3486 3485
+3 3486 3484 3485
+3 907 3480 3485
+3 842 3483 3480
+3 906 3485 3483
+3 3485 3480 3483
+3 227 3470 3482
+3 902 3487 3470
+3 906 3482 3487
+3 3482 3470 3487
+3 242 3479 3466
+3 904 3488 3479
+3 902 3466 3488
+3 3466 3479 3488
+3 243 3486 3474
+3 906 3489 3486
+3 904 3474 3489
+3 3474 3486 3489
+3 906 3487 3489
+3 902 3488 3487
+3 904 3489 3488
+3 3489 3487 3488
+3 21 3344 3491
+3 872 3490 3344
+3 909 3491 3490
+3 3491 3344 3490
+3 236 3492 3348
+3 908 3493 3492
+3 872 3348 3493
+3 3348 3492 3493
+3 245 3494 3496
+3 909 3495 3494
+3 908 3496 3495
+3 3496 3494 3495
+3 909 3490 3495
+3 872 3493 3490
+3 908 3495 3493
+3 3495 3490 3493
+3 67 3497 3360
+3 910 3498 3497
+3 876 3360 3498
+3 3360 3497 3498
+3 244 3499 3501
+3 911 3500 3499
+3 910 3501 3500
+3 3501 3499 3500
+3 236 3365 3503
+3 876 3502 3365
+3 911 3503 3502
+3 3503 3365 3502
+3 876 3498 3502
+3 910 3500 3498
+3 911 3502 3500
+3 3502 3498 3500
+3 68 3504 3506
+3 912 3505 3504
+3 914 3506 3505
+3 3506 3504 3505
+3 245 3507 3509
+3 913 3508 3507
+3 912 3509 3508
+3 3509 3507 3508
+3 244 3510 3512
+3 914 3511 3510
+3 913 3512 3511
+3 3512 3510 3511
+3 914 3505 3511
+3 912 3508 3505
+3 913 3511 3508
+3 3511 3505 3508
+3 245 3496 3507
+3 908 3513 3496
+3 913 3507 3513
+3 3507 3496 3513
+3 236 3503 3492
+3 911 3514 3503
+3 908 3492 3514
+3 3492 3503 3514
+3 244 3512 3499
+3 913 3515 3512
+3 911 3499 3515
+3 3499 3512 3515
+3 913 3513 3515
+3 908 3514 3513
+3 911 3515 3514
+3 3515 3513 3514
+3 67 3455 3497
+3 900 3516 3455
+3 910 3497 3516
+3 3497 3455 3516
+3 241 3517 3458
+3 915 3518 3517
+3 900 3458 3518
+3 3458 3517 3518
+3 244 3501 3520
+3 910 3519 3501
+3 915 3520 3519
+3 3520 3501 3519
+3 910 3516 3519
+3 900 3518 3516
+3 915 3519 3518
+3 3519 3516 3518
+3 64 3481 3447
+3 907 3521 3481
+3 897 3447 3521
+3 3447 3481 3521
+3 243 3522 3484
+3 916 3523 3522
+3 907 3484 3523
+3 3484 3522 3523
+3 241 3451 3525
+3 897 3524 3451
+3 916 3525 3524
+3 3525 3451 3524
+3 897 3521 3524
+3 907 3523 3521
+3 916 3524 3523
+3 3524 3521 3523
+3 68 3506 3471
+3 914 3526 3506
+3 903 3471 3526
+3 3471 3506 3526
+3 244 3527 3510
+3 917 3528 3527
+3 914 3510 3528
+3 3510 3527 3528
+3 243 3476 3530
+3 903 3529 3476
+3 917 3530 3529
+3 3530 3476 3529
+3 903 3526 3529
+3 914 3528 3526
+3 917 3529 3528
+3 3529 3526 3528
+3 244 3520 3527
+3 915 3531 3520
+3 917 3527 3531
+3 3527 3520 3531
+3 241 3525 3517
+3 916 3532 3525
+3 915 3517 3532
+3 3517 3525 3532
+3 243 3530 3522
+3 917 3533 3530
+3 916 3522 3533
+3 3522 3530 3533
+3 917 3531 3533
+3 915 3532 3531
+3 916 3533 3532
+3 3533 3531 3532
+3 9 3534 3464
+3 918 3535 3534
+3 901 3464 3535
+3 3464 3534 3535
+3 246 3536 3538
+3 919 3537 3536
+3 918 3538 3537
+3 3538 3536 3537
+3 242 3468 3540
+3 901 3539 3468
+3 919 3540 3539
+3 3540 3468 3539
+3 901 3535 3539
+3 918 3537 3535
+3 919 3539 3537
+3 3539 3535 3537
+3 69 3541 3543
+3 920 3542 3541
+3 922 3543 3542
+3 3543 3541 3542
+3 247 3544 3546
+3 921 3545 3544
+3 920 3546 3545
+3 3546 3544 3545
+3 246 3547 3549
+3 922 3548 3547
+3 921 3549 3548
+3 3549 3547 3548
+3 922 3542 3548
+3 920 3545 3542
+3 921 3548 3545
+3 3548 3542 3545
+3 68 3473 3551
+3 905 3550 3473
+3 924 3551 3550
+3 3551 3473 3550
+3 242 3552 3477
+3 923 3553 3552
+3 905 3477 3553
+3 3477 3552 3553
+3 247 3554 3556
+3 924 3555 3554
+3 923 3556 3555
+3 3556 3554 3555
+3 924 3550 3555
+3 905 3553 3550
+3 923 3555 3553
+3 3555 3550 3553
+3 242 3540 3552
+3 919 3557 3540
+3 923 3552 3557
+3 3552 3540 3557
+3 246 3549 3536
+3 921 3558 3549
+3 919 3536 3558
+3 3536 3549 3558
+3 247 3556 3544
+3 923 3559 3556
+3 921 3544 3559
+3 3544 3556 3559
+3 923 3557 3559
+3 919 3558 3557
+3 921 3559 3558
+3 3559 3557 3558
+3 20 2986 3561
+3 783 3560 2986
+3 926 3561 3560
+3 3561 2986 3560
+3 214 3562 2990
+3 925 3563 3562
+3 783 2990 3563
+3 2990 3562 3563
+3 249 3564 3566
+3 926 3565 3564
+3 925 3566 3565
+3 3566 3564 3565
+3 926 3560 3565
+3 783 3563 3560
+3 925 3565 3563
+3 3565 3560 3563
+3 60 3567 3002
+3 927 3568 3567
+3 787 3002 3568
+3 3002 3567 3568
+3 248 3569 3571
+3 928 3570 3569
+3 927 3571 3570
+3 3571 3569 3570
+3 214 3007 3573
+3 787 3572 3007
+3 928 3573 3572
+3 3573 3007 3572
+3 787 3568 3572
+3 927 3570 3568
+3 928 3572 3570
+3 3572 3568 3570
+3 69 3574 3576
+3 929 3575 3574
+3 931 3576 3575
+3 3576 3574 3575
+3 249 3577 3579
+3 930 3578 3577
+3 929 3579 3578
+3 3579 3577 3578
+3 248 3580 3582
+3 931 3581 3580
+3 930 3582 3581
+3 3582 3580 3581
+3 931 3575 3581
+3 929 3578 3575
+3 930 3581 3578
+3 3581 3575 3578
+3 249 3566 3577
+3 925 3583 3566
+3 930 3577 3583
+3 3577 3566 3583
+3 214 3573 3562
+3 928 3584 3573
+3 925 3562 3584
+3 3562 3573 3584
+3 248 3582 3569
+3 930 3585 3582
+3 928 3569 3585
+3 3569 3582 3585
+3 930 3583 3585
+3 925 3584 3583
+3 928 3585 3584
+3 3585 3583 3584
+3 21 3491 2958
+3 909 3586 3491
+3 774 2958 3586
+3 2958 3491 3586
+3 245 3587 3494
+3 932 3588 3587
+3 909 3494 3588
+3 3494 3587 3588
+3 210 2962 3590
+3 774 3589 2962
+3 932 3590 3589
+3 3590 2962 3589
+3 774 3586 3589
+3 909 3588 3586
+3 932 3589 3588
+3 3589 3586 3588
+3 68 3591 3504
+3 933 3592 3591
+3 912 3504 3592
+3 3504 3591 3592
+3 250 3593 3595
+3 934 3594 3593
+3 933 3595 3594
+3 3595 3593 3594
+3 245 3509 3597
+3 912 3596 3509
+3 934 3597 3596
+3 3597 3509 3596
+3 912 3592 3596
+3 933 3594 3592
+3 934 3596 3594
+3 3596 3592 3594
+3 60 2967 3599
+3 778 3598 2967
+3 936 3599 3598
+3 3599 2967 3598
+3 210 3600 2971
+3 935 3601 3600
+3 778 2971 3601
+3 2971 3600 3601
+3 250 3602 3604
+3 936 3603 3602
+3 935 3604 3603
+3 3604 3602 3603
+3 936 3598 3603
+3 778 3601 3598
+3 935 3603 3601
+3 3603 3598 3601
+3 210 3590 3600
+3 932 3605 3590
+3 935 3600 3605
+3 3600 3590 3605
+3 245 3597 3587
+3 934 3606 3597
+3 932 3587 3606
+3 3587 3597 3606
+3 250 3604 3593
+3 935 3607 3604
+3 934 3593 3607
+3 3593 3604 3607
+3 935 3605 3607
+3 932 3606 3605
+3 934 3607 3606
+3 3607 3605 3606
+3 68 3551 3591
+3 924 3608 3551
+3 933 3591 3608
+3 3591 3551 3608
+3 247 3609 3554
+3 937 3610 3609
+3 924 3554 3610
+3 3554 3609 3610
+3 250 3595 3612
+3 933 3611 3595
+3 937 3612 3611
+3 3612 3595 3611
+3 933 3608 3611
+3 924 3610 3608
+3 937 3611 3610
+3 3611 3608 3610
+3 69 3576 3541
+3 931 3613 3576
+3 920 3541 3613
+3 3541 3576 3613
+3 248 3614 3580
+3 938 3615 3614
+3 931 3580 3615
+3 3580 3614 3615
+3 247 3546 3617
+3 920 3616 3546
+3 938 3617 3616
+3 3617 3546 3616
+3 920 3613 3616
+3 931 3615 3613
+3 938 3616 3615
+3 3616 3613 3615
+3 60 3599 3567
+3 936 3618 3599
+3 927 3567 3618
+3 3567 3599 3618
+3 250 3619 3602
+3 939 3620 3619
+3 936 3602 3620
+3 3602 3619 3620
+3 248 3571 3622
+3 927 3621 3571
+3 939 3622 3621
+3 3622 3571 3621
+3 927 3618 3621
+3 936 3620 3618
+3 939 3621 3620
+3 3621 3618 3620
+3 250 3612 3619
+3 937 3623 3612
+3 939 3619 3623
+3 3619 3612 3623
+3 247 3617 3609
+3 938 3624 3617
+3 937 3609 3624
+3 3609 3617 3624
+3 248 3622 3614
+3 939 3625 3622
+3 938 3614 3625
+3 3614 3622 3625
+3 939 3623 3625
+3 937 3624 3623
+3 938 3625 3624
+3 3625 3623 3624
+3 24 3626 3628
+3 940 3627 3626
+3 942 3628 3627
+3 3628 3626 3627
+3 251 3629 3631
+3 941 3630 3629
+3 940 3631 3630
+3 3631 3629 3630
+3 253 3632 3634
+3 942 3633 3632
+3 941 3634 3633
+3 3634 3632 3633
+3 942 3627 3633
+3 940 3630 3627
+3 941 3633 3630
+3 3633 3627 3630
+3 70 3635 3637
+3 943 3636 3635
+3 945 3637 3636
+3 3637 3635 3636
+3 252 3638 3640
+3 944 3639 3638
+3 943 3640 3639
+3 3640 3638 3639
+3 251 3641 3643
+3 945 3642 3641
+3 944 3643 3642
+3 3643 3641 3642
+3 945 3636 3642
+3 943 3639 3636
+3 944 3642 3639
+3 3642 3636 3639
+3 72 3644 3646
+3 946 3645 3644
+3 948 3646 3645
+3 3646 3644 3645
+3 253 3647 3649
+3 947 3648 3647
+3 946 3649 3648
+3 3649 3647 3648
+3 252 3650 3652
+3 948 3651 3650
+3 947 3652 3651
+3 3652 3650 3651
+3 948 3645 3651
+3 946 3648 3645
+3 947 3651 3648
+3 3651 3645 3648
+3 253 3634 3647
+3 941 3653 3634
+3 947 3647 3653
+3 3647 3634 3653
+3 251 3643 3629
+3 944 3654 3643
+3 941 3629 3654
+3 3629 3643 3654
+3 252 3652 3638
+3 947 3655 3652
+3 944 3638 3655
+3 3638 3652 3655
+3 947 3653 3655
+3 941 3654 3653
+3 944 3655 3654
+3 3655 3653 3654
+3 5245 5243 5244
+3 1340 5245 5244
+3 951 3658 3657
+3 3658 3656 3657
+3 1341 5243 5245
+3 950 3660 3659
+3 1339 5244 5243
+3 3661 3659 3660
+3 256 3662 3664
+3 951 3663 3662
+3 950 3664 3663
+3 3664 3662 3663
+3 951 3657 3663
+3 949 3660 3657
+3 950 3663 3660
+3 3663 3657 3660
+3 349 5232 5239
+3 952 3666 3665
+3 1339 5243 5232
+3 3667 3665 3666
+3 255 3668 3670
+3 953 3669 3668
+3 952 3670 3669
+3 3670 3668 3669
+3 5234 5242 5245
+3 1341 5239 5243
+3 953 3673 3672
+3 3673 3671 3672
+3 954 3666 3672
+3 952 3669 3666
+3 953 3672 3669
+3 3672 3666 3669
+3 70 3674 3676
+3 955 3675 3674
+3 957 3676 3675
+3 3676 3674 3675
+3 256 3677 3679
+3 956 3678 3677
+3 955 3679 3678
+3 3679 3677 3678
+3 255 3680 3682
+3 957 3681 3680
+3 956 3682 3681
+3 3682 3680 3681
+3 957 3675 3681
+3 955 3678 3675
+3 956 3681 3678
+3 3681 3675 3678
+3 256 3664 3677
+3 950 3683 3664
+3 956 3677 3683
+3 3677 3664 3683
+3 254 3673 3659
+3 953 3684 3673
+3 950 3659 3684
+3 3659 3673 3684
+3 255 3682 3668
+3 956 3685 3682
+3 953 3668 3685
+3 3668 3682 3685
+3 956 3683 3685
+3 950 3684 3683
+3 953 3685 3684
+3 3685 3683 3684
+3 348 5193 5242
+3 958 3687 3686
+3 1330 5241 5193
+3 3688 3686 3687
+3 257 3689 3691
+3 959 3690 3689
+3 958 3691 3690
+3 3691 3689 3690
+3 5242 5193 5241
+3 1341 5242 5241
+3 959 3694 3693
+3 3694 3692 3693
+3 960 3687 3693
+3 958 3690 3687
+3 959 3693 3690
+3 3693 3687 3690
+3 72 3695 3697
+3 961 3696 3695
+3 963 3697 3696
+3 3697 3695 3696
+3 258 3698 3700
+3 962 3699 3698
+3 961 3700 3699
+3 3700 3698 3699
+3 257 3701 3703
+3 963 3702 3701
+3 962 3703 3702
+3 3703 3701 3702
+3 963 3696 3702
+3 961 3699 3696
+3 962 3702 3699
+3 3702 3696 3699
+3 5241 5238 5240
+3 1341 5241 5240
+3 966 3706 3705
+3 3706 3704 3705
+3 1330 5238 5241
+3 965 3708 3707
+3 1338 5240 5238
+3 3709 3707 3708
+3 258 3710 3712
+3 966 3711 3710
+3 965 3712 3711
+3 3712 3710 3711
+3 966 3705 3711
+3 964 3708 3705
+3 965 3711 3708
+3 3711 3705 3708
+3 259 3694 3707
+3 959 3713 3694
+3 965 3707 3713
+3 3707 3694 3713
+3 257 3703 3689
+3 962 3714 3703
+3 959 3689 3714
+3 3689 3703 3714
+3 258 3712 3698
+3 965 3715 3712
+3 962 3698 3715
+3 3698 3712 3715
+3 965 3713 3715
+3 959 3714 3713
+3 962 3715 3714
+3 3715 3713 3714
+3 72 3646 3695
+3 948 3716 3646
+3 961 3695 3716
+3 3695 3646 3716
+3 252 3717 3650
+3 967 3718 3717
+3 948 3650 3718
+3 3650 3717 3718
+3 258 3700 3720
+3 961 3719 3700
+3 967 3720 3719
+3 3720 3700 3719
+3 961 3716 3719
+3 948 3718 3716
+3 967 3719 3718
+3 3719 3716 3718
+3 70 3676 3635
+3 957 3721 3676
+3 943 3635 3721
+3 3635 3676 3721
+3 255 3722 3680
+3 968 3723 3722
+3 957 3680 3723
+3 3680 3722 3723
+3 252 3640 3725
+3 943 3724 3640
+3 968 3725 3724
+3 3725 3640 3724
+3 943 3721 3724
+3 957 3723 3721
+3 968 3724 3723
+3 3724 3721 3723
+3 71 3706 3665
+3 966 3726 3706
+3 952 3665 3726
+3 3665 3706 3726
+3 258 3727 3710
+3 969 3728 3727
+3 966 3710 3728
+3 3710 3727 3728
+3 255 3670 3730
+3 952 3729 3670
+3 969 3730 3729
+3 3730 3670 3729
+3 952 3726 3729
+3 966 3728 3726
+3 969 3729 3728
+3 3729 3726 3728
+3 258 3720 3727
+3 967 3731 3720
+3 969 3727 3731
+3 3727 3720 3731
+3 252 3725 3717
+3 968 3732 3725
+3 967 3717 3732
+3 3717 3725 3732
+3 255 3730 3722
+3 969 3733 3730
+3 968 3722 3733
+3 3722 3730 3733
+3 969 3731 3733
+3 967 3732 3731
+3 968 3733 3732
+3 3733 3731 3732
+3 0 3373 3686
+3 880 3734 3373
+3 958 3686 3734
+3 3686 3373 3734
+3 238 3735 3376
+3 970 3736 3735
+3 880 3376 3736
+3 3376 3735 3736
+3 257 3691 3738
+3 958 3737 3691
+3 970 3738 3737
+3 3738 3691 3737
+3 958 3734 3737
+3 880 3736 3734
+3 970 3737 3736
+3 3737 3734 3736
+3 66 3739 3386
+3 971 3740 3739
+3 883 3386 3740
+3 3386 3739 3740
+3 260 3741 3743
+3 972 3742 3741
+3 971 3743 3742
+3 3743 3741 3742
+3 238 3391 3745
+3 883 3744 3391
+3 972 3745 3744
+3 3745 3391 3744
+3 883 3740 3744
+3 971 3742 3740
+3 972 3744 3742
+3 3744 3740 3742
+3 72 3697 3747
+3 963 3746 3697
+3 974 3747 3746
+3 3747 3697 3746
+3 257 3748 3701
+3 973 3749 3748
+3 963 3701 3749
+3 3701 3748 3749
+3 260 3750 3752
+3 974 3751 3750
+3 973 3752 3751
+3 3752 3750 3751
+3 974 3746 3751
+3 963 3749 3746
+3 973 3751 3749
+3 3751 3746 3749
+3 257 3738 3748
+3 970 3753 3738
+3 973 3748 3753
+3 3748 3738 3753
+3 238 3745 3735
+3 972 3754 3745
+3 970 3735 3754
+3 3735 3745 3754
+3 260 3752 3741
+3 973 3755 3752
+3 972 3741 3755
+3 3741 3752 3755
+3 973 3753 3755
+3 970 3754 3753
+3 972 3755 3754
+3 3755 3753 3754
+3 21 3299 3342
+3 861 3756 3299
+3 870 3342 3756
+3 3342 3299 3756
+3 233 3757 3302
+3 975 3758 3757
+3 861 3302 3758
+3 3302 3757 3758
+3 234 3347 3760
+3 870 3759 3347
+3 975 3760 3759
+3 3760 3347 3759
+3 870 3756 3759
+3 861 3758 3756
+3 975 3759 3758
+3 3759 3756 3758
+3 65 3761 3312
+3 976 3762 3761
+3 864 3312 3762
+3 3312 3761 3762
+3 261 3763 3765
+3 977 3764 3763
+3 976 3765 3764
+3 3765 3763 3764
+3 233 3317 3767
+3 864 3766 3317
+3 977 3767 3766
+3 3767 3317 3766
+3 864 3762 3766
+3 976 3764 3762
+3 977 3766 3764
+3 3766 3762 3764
+3 66 3353 3769
+3 875 3768 3353
+3 979 3769 3768
+3 3769 3353 3768
+3 234 3770 3357
+3 978 3771 3770
+3 875 3357 3771
+3 3357 3770 3771
+3 261 3772 3774
+3 979 3773 3772
+3 978 3774 3773
+3 3774 3772 3773
+3 979 3768 3773
+3 875 3771 3768
+3 978 3773 3771
+3 3773 3768 3771
+3 234 3760 3770
+3 975 3775 3760
+3 978 3770 3775
+3 3770 3760 3775
+3 233 3767 3757
+3 977 3776 3767
+3 975 3757 3776
+3 3757 3767 3776
+3 261 3774 3763
+3 978 3777 3774
+3 977 3763 3777
+3 3763 3774 3777
+3 978 3775 3777
+3 975 3776 3775
+3 977 3777 3776
+3 3777 3775 3776
+3 24 3628 3272
+3 942 3778 3628
+3 853 3272 3778
+3 3272 3628 3778
+3 253 3779 3632
+3 980 3780 3779
+3 942 3632 3780
+3 3632 3779 3780
+3 230 3276 3782
+3 853 3781 3276
+3 980 3782 3781
+3 3782 3276 3781
+3 853 3778 3781
+3 942 3780 3778
+3 980 3781 3780
+3 3781 3778 3780
+3 72 3783 3644
+3 981 3784 3783
+3 946 3644 3784
+3 3644 3783 3784
+3 262 3785 3787
+3 982 3786 3785
+3 981 3787 3786
+3 3787 3785 3786
+3 253 3649 3789
+3 946 3788 3649
+3 982 3789 3788
+3 3789 3649 3788
+3 946 3784 3788
+3 981 3786 3784
+3 982 3788 3786
+3 3788 3784 3786
+3 65 3281 3791
+3 857 3790 3281
+3 984 3791 3790
+3 3791 3281 3790
+3 230 3792 3285
+3 983 3793 3792
+3 857 3285 3793
+3 3285 3792 3793
+3 262 3794 3796
+3 984 3795 3794
+3 983 3796 3795
+3 3796 3794 3795
+3 984 3790 3795
+3 857 3793 3790
+3 983 3795 3793
+3 3795 3790 3793
+3 230 3782 3792
+3 980 3797 3782
+3 983 3792 3797
+3 3792 3782 3797
+3 253 3789 3779
+3 982 3798 3789
+3 980 3779 3798
+3 3779 3789 3798
+3 262 3796 3785
+3 983 3799 3796
+3 982 3785 3799
+3 3785 3796 3799
+3 983 3797 3799
+3 980 3798 3797
+3 982 3799 3798
+3 3799 3797 3798
+3 72 3747 3783
+3 974 3800 3747
+3 981 3783 3800
+3 3783 3747 3800
+3 260 3801 3750
+3 985 3802 3801
+3 974 3750 3802
+3 3750 3801 3802
+3 262 3787 3804
+3 981 3803 3787
+3 985 3804 3803
+3 3804 3787 3803
+3 981 3800 3803
+3 974 3802 3800
+3 985 3803 3802
+3 3803 3800 3802
+3 66 3769 3739
+3 979 3805 3769
+3 971 3739 3805
+3 3739 3769 3805
+3 261 3806 3772
+3 986 3807 3806
+3 979 3772 3807
+3 3772 3806 3807
+3 260 3743 3809
+3 971 3808 3743
+3 986 3809 3808
+3 3809 3743 3808
+3 971 3805 3808
+3 979 3807 3805
+3 986 3808 3807
+3 3808 3805 3807
+3 65 3791 3761
+3 984 3810 3791
+3 976 3761 3810
+3 3761 3791 3810
+3 262 3811 3794
+3 987 3812 3811
+3 984 3794 3812
+3 3794 3811 3812
+3 261 3765 3814
+3 976 3813 3765
+3 987 3814 3813
+3 3814 3765 3813
+3 976 3810 3813
+3 984 3812 3810
+3 987 3813 3812
+3 3813 3810 3812
+3 262 3804 3811
+3 985 3815 3804
+3 987 3811 3815
+3 3811 3804 3815
+3 260 3809 3801
+3 986 3816 3809
+3 985 3801 3816
+3 3801 3809 3816
+3 261 3814 3806
+3 987 3817 3814
+3 986 3806 3817
+3 3806 3814 3817
+3 987 3815 3817
+3 985 3816 3815
+3 986 3817 3816
+3 3817 3815 3816
+3 24 2774 3626
+3 725 3818 2774
+3 940 3626 3818
+3 3626 2774 3818
+3 197 3819 2778
+3 988 3820 3819
+3 725 2778 3820
+3 2778 3819 3820
+3 251 3631 3822
+3 940 3821 3631
+3 988 3822 3821
+3 3822 3631 3821
+3 940 3818 3821
+3 725 3820 3818
+3 988 3821 3820
+3 3821 3818 3820
+3 54 3823 2790
+3 989 3824 3823
+3 729 2790 3824
+3 2790 3823 3824
+3 263 3825 3827
+3 990 3826 3825
+3 989 3827 3826
+3 3827 3825 3826
+3 197 2795 3829
+3 729 3828 2795
+3 990 3829 3828
+3 3829 2795 3828
+3 729 3824 3828
+3 989 3826 3824
+3 990 3828 3826
+3 3828 3824 3826
+3 70 3637 3831
+3 945 3830 3637
+3 992 3831 3830
+3 3831 3637 3830
+3 251 3832 3641
+3 991 3833 3832
+3 945 3641 3833
+3 3641 3832 3833
+3 263 3834 3836
+3 992 3835 3834
+3 991 3836 3835
+3 3836 3834 3835
+3 992 3830 3835
+3 945 3833 3830
+3 991 3835 3833
+3 3835 3830 3833
+3 251 3822 3832
+3 988 3837 3822
+3 991 3832 3837
+3 3832 3822 3837
+3 197 3829 3819
+3 990 3838 3829
+3 988 3819 3838
+3 3819 3829 3838
+3 263 3836 3825
+3 991 3839 3836
+3 990 3825 3839
+3 3825 3836 3839
+3 991 3837 3839
+3 988 3838 3837
+3 990 3839 3838
+3 3839 3837 3838
+3 10 3840 2742
+3 993 3841 3840
+3 714 2742 3841
+3 2742 3840 3841
+3 264 3842 3844
+3 994 3843 3842
+3 993 3844 3843
+3 3844 3842 3843
+3 192 2747 3846
+3 714 3845 2747
+3 994 3846 3845
+3 3846 2747 3845
+3 714 3841 3845
+3 993 3843 3841
+3 994 3845 3843
+3 3845 3841 3843
+3 73 3847 3849
+3 995 3848 3847
+3 997 3849 3848
+3 3849 3847 3848
+3 265 3850 3852
+3 996 3851 3850
+3 995 3852 3851
+3 3852 3850 3851
+3 264 3853 3855
+3 997 3854 3853
+3 996 3855 3854
+3 3855 3853 3854
+3 997 3848 3854
+3 995 3851 3848
+3 996 3854 3851
+3 3854 3848 3851
+3 54 2753 3857
+3 719 3856 2753
+3 999 3857 3856
+3 3857 2753 3856
+3 192 3858 2757
+3 998 3859 3858
+3 719 2757 3859
+3 2757 3858 3859
+3 265 3860 3862
+3 999 3861 3860
+3 998 3862 3861
+3 3862 3860 3861
+3 999 3856 3861
+3 719 3859 3856
+3 998 3861 3859
+3 3861 3856 3859
+3 192 3846 3858
+3 994 3863 3846
+3 998 3858 3863
+3 3858 3846 3863
+3 264 3855 3842
+3 996 3864 3855
+3 994 3842 3864
+3 3842 3855 3864
+3 265 3862 3850
+3 998 3865 3862
+3 996 3850 3865
+3 3850 3862 3865
+3 998 3863 3865
+3 994 3864 3863
+3 996 3865 3864
+3 3865 3863 3864
+3 11 3658 3867
+3 951 3866 3658
+3 1001 3867 3866
+3 3867 3658 3866
+3 256 3868 3662
+3 1000 3869 3868
+3 951 3662 3869
+3 3662 3868 3869
+3 267 3870 3872
+3 1001 3871 3870
+3 1000 3872 3871
+3 3872 3870 3871
+3 1001 3866 3871
+3 951 3869 3866
+3 1000 3871 3869
+3 3871 3866 3869
+3 70 3873 3674
+3 1002 3874 3873
+3 955 3674 3874
+3 3674 3873 3874
+3 266 3875 3877
+3 1003 3876 3875
+3 1002 3877 3876
+3 3877 3875 3876
+3 256 3679 3879
+3 955 3878 3679
+3 1003 3879 3878
+3 3879 3679 3878
+3 955 3874 3878
+3 1002 3876 3874
+3 1003 3878 3876
+3 3878 3874 3876
+3 73 3880 3882
+3 1004 3881 3880
+3 1006 3882 3881
+3 3882 3880 3881
+3 267 3883 3885
+3 1005 3884 3883
+3 1004 3885 3884
+3 3885 3883 3884
+3 266 3886 3888
+3 1006 3887 3886
+3 1005 3888 3887
+3 3888 3886 3887
+3 1006 3881 3887
+3 1004 3884 3881
+3 1005 3887 3884
+3 3887 3881 3884
+3 267 3872 3883
+3 1000 3889 3872
+3 1005 3883 3889
+3 3883 3872 3889
+3 256 3879 3868
+3 1003 3890 3879
+3 1000 3868 3890
+3 3868 3879 3890
+3 266 3888 3875
+3 1005 3891 3888
+3 1003 3875 3891
+3 3875 3888 3891
+3 1005 3889 3891
+3 1000 3890 3889
+3 1003 3891 3890
+3 3891 3889 3890
+3 70 3831 3873
+3 992 3892 3831
+3 1002 3873 3892
+3 3873 3831 3892
+3 263 3893 3834
+3 1007 3894 3893
+3 992 3834 3894
+3 3834 3893 3894
+3 266 3877 3896
+3 1002 3895 3877
+3 1007 3896 3895
+3 3896 3877 3895
+3 1002 3892 3895
+3 992 3894 3892
+3 1007 3895 3894
+3 3895 3892 3894
+3 54 3857 3823
+3 999 3897 3857
+3 989 3823 3897
+3 3823 3857 3897
+3 265 3898 3860
+3 1008 3899 3898
+3 999 3860 3899
+3 3860 3898 3899
+3 263 3827 3901
+3 989 3900 3827
+3 1008 3901 3900
+3 3901 3827 3900
+3 989 3897 3900
+3 999 3899 3897
+3 1008 3900 3899
+3 3900 3897 3899
+3 73 3882 3847
+3 1006 3902 3882
+3 995 3847 3902
+3 3847 3882 3902
+3 266 3903 3886
+3 1009 3904 3903
+3 1006 3886 3904
+3 3886 3903 3904
+3 265 3852 3906
+3 995 3905 3852
+3 1009 3906 3905
+3 3906 3852 3905
+3 995 3902 3905
+3 1006 3904 3902
+3 1009 3905 3904
+3 3905 3902 3904
+3 266 3896 3903
+3 1007 3907 3896
+3 1009 3903 3907
+3 3903 3896 3907
+3 263 3901 3893
+3 1008 3908 3901
+3 1007 3893 3908
+3 3893 3901 3908
+3 265 3906 3898
+3 1009 3909 3906
+3 1008 3898 3909
+3 3898 3906 3909
+3 1009 3907 3909
+3 1007 3908 3907
+3 1008 3909 3908
+3 3909 3907 3908
+3 5236 5233 5235
+3 59 5219 5189
+3 1012 3912 3911
+3 3912 3910 3911
+3 1330 5189 5238
+3 1011 3914 3913
+3 1338 5238 5219
+3 3915 3913 3914
+3 270 3916 3918
+3 1012 3917 3916
+3 1011 3918 3917
+3 3918 3916 3917
+3 1012 3911 3917
+3 1010 3914 3911
+3 1011 3917 3914
+3 3917 3911 3914
+3 1338 5222 5240
+3 1013 3920 3919
+3 1341 5240 5239
+3 3921 3919 3920
+3 269 3922 3924
+3 1014 3923 3922
+3 1013 3924 3923
+3 3924 3922 3923
+3 5189 5219 5238
+3 349 5239 5222
+3 1014 3927 3926
+3 3927 3925 3926
+3 1015 3920 3926
+3 1013 3923 3920
+3 1014 3926 3923
+3 3926 3920 3923
+3 75 3928 3930
+3 1016 3929 3928
+3 1018 3930 3929
+3 3930 3928 3929
+3 270 3931 3933
+3 1017 3932 3931
+3 1016 3933 3932
+3 3933 3931 3932
+3 269 3934 3936
+3 1018 3935 3934
+3 1017 3936 3935
+3 3936 3934 3935
+3 1018 3929 3935
+3 1016 3932 3929
+3 1017 3935 3932
+3 3935 3929 3932
+3 270 3918 3931
+3 1011 3937 3918
+3 1017 3931 3937
+3 3931 3918 3937
+3 268 3927 3913
+3 1014 3938 3927
+3 1011 3913 3938
+3 3913 3927 3938
+3 269 3936 3922
+3 1017 3939 3936
+3 1014 3922 3939
+3 3922 3936 3939
+3 1017 3937 3939
+3 1011 3938 3937
+3 1014 3939 3938
+3 3939 3937 3938
+3 1340 5234 5245
+3 1001 3940 3867
+3 1341 5245 5242
+3 3941 3867 3940
+3 267 3942 3870
+3 1019 3943 3942
+3 1001 3870 3943
+3 3870 3942 3943
+3 5229 5237 5244
+3 348 5242 5234
+3 1019 3946 3945
+3 3946 3944 3945
+3 1020 3940 3945
+3 1001 3943 3940
+3 1019 3945 3943
+3 3945 3940 3943
+3 73 3947 3880
+3 1021 3948 3947
+3 1004 3880 3948
+3 3880 3947 3948
+3 271 3949 3951
+3 1022 3950 3949
+3 1021 3951 3950
+3 3951 3949 3950
+3 267 3885 3953
+3 1004 3952 3885
+3 1022 3953 3952
+3 3953 3885 3952
+3 1004 3948 3952
+3 1021 3950 3948
+3 1022 3952 3950
+3 3952 3948 3950
+3 5239 5232 5243
+3 347 5237 5229
+3 1025 3956 3955
+3 3956 3954 3955
+3 1339 5229 5244
+3 1024 3958 3957
+3 1340 5244 5237
+3 3959 3957 3958
+3 271 3960 3962
+3 1025 3961 3960
+3 1024 3962 3961
+3 3962 3960 3961
+3 1025 3955 3961
+3 1023 3958 3955
+3 1024 3961 3958
+3 3961 3955 3958
+3 272 3946 3957
+3 1019 3963 3946
+3 1024 3957 3963
+3 3957 3946 3963
+3 267 3953 3942
+3 1022 3964 3953
+3 1019 3942 3964
+3 3942 3953 3964
+3 271 3962 3949
+3 1024 3965 3962
+3 1022 3949 3965
+3 3949 3962 3965
+3 1024 3963 3965
+3 1019 3964 3963
+3 1022 3965 3964
+3 3965 3963 3964
+3 10 3966 3840
+3 1026 3967 3966
+3 993 3840 3967
+3 3840 3966 3967
+3 273 3968 3970
+3 1027 3969 3968
+3 1026 3970 3969
+3 3970 3968 3969
+3 264 3844 3972
+3 993 3971 3844
+3 1027 3972 3971
+3 3972 3844 3971
+3 993 3967 3971
+3 1026 3969 3967
+3 1027 3971 3969
+3 3971 3967 3969
+3 75 3973 3975
+3 1028 3974 3973
+3 1030 3975 3974
+3 3975 3973 3974
+3 274 3976 3978
+3 1029 3977 3976
+3 1028 3978 3977
+3 3978 3976 3977
+3 273 3979 3981
+3 1030 3980 3979
+3 1029 3981 3980
+3 3981 3979 3980
+3 1030 3974 3980
+3 1028 3977 3974
+3 1029 3980 3977
+3 3980 3974 3977
+3 73 3849 3983
+3 997 3982 3849
+3 1032 3983 3982
+3 3983 3849 3982
+3 264 3984 3853
+3 1031 3985 3984
+3 997 3853 3985
+3 3853 3984 3985
+3 274 3986 3988
+3 1032 3987 3986
+3 1031 3988 3987
+3 3988 3986 3987
+3 1032 3982 3987
+3 997 3985 3982
+3 1031 3987 3985
+3 3987 3982 3985
+3 264 3972 3984
+3 1027 3989 3972
+3 1031 3984 3989
+3 3984 3972 3989
+3 273 3981 3968
+3 1029 3990 3981
+3 1027 3968 3990
+3 3968 3981 3990
+3 274 3988 3976
+3 1031 3991 3988
+3 1029 3976 3991
+3 3976 3988 3991
+3 1031 3989 3991
+3 1027 3990 3989
+3 1029 3991 3990
+3 3991 3989 3990
+3 75 3930 3973
+3 1018 3992 3930
+3 1028 3973 3992
+3 3973 3930 3992
+3 269 3993 3934
+3 1033 3994 3993
+3 1018 3934 3994
+3 3934 3993 3994
+3 274 3978 3996
+3 1028 3995 3978
+3 1033 3996 3995
+3 3996 3978 3995
+3 1028 3992 3995
+3 1018 3994 3992
+3 1033 3995 3994
+3 3995 3992 3994
+3 74 3956 3919
+3 1025 3997 3956
+3 1013 3919 3997
+3 3919 3956 3997
+3 271 3998 3960
+3 1034 3999 3998
+3 1025 3960 3999
+3 3960 3998 3999
+3 269 3924 4001
+3 1013 4000 3924
+3 1034 4001 4000
+3 4001 3924 4000
+3 1013 3997 4000
+3 1025 3999 3997
+3 1034 4000 3999
+3 4000 3997 3999
+3 73 3983 3947
+3 1032 4002 3983
+3 1021 3947 4002
+3 3947 3983 4002
+3 274 4003 3986
+3 1035 4004 4003
+3 1032 3986 4004
+3 3986 4003 4004
+3 271 3951 4006
+3 1021 4005 3951
+3 1035 4006 4005
+3 4006 3951 4005
+3 1021 4002 4005
+3 1032 4004 4002
+3 1035 4005 4004
+3 4005 4002 4004
+3 274 3996 4003
+3 1033 4007 3996
+3 1035 4003 4007
+3 4003 3996 4007
+3 269 4001 3993
+3 1034 4008 4001
+3 1033 3993 4008
+3 3993 4001 4008
+3 271 4006 3998
+3 1035 4009 4006
+3 1034 3998 4009
+3 3998 4006 4009
+3 1035 4007 4009
+3 1033 4008 4007
+3 1034 4009 4008
+3 4009 4007 4008
+3 10 3107 3966
+3 813 4010 3107
+3 1026 3966 4010
+3 3966 3107 4010
+3 221 4011 3110
+3 1036 4012 4011
+3 813 3110 4012
+3 3110 4011 4012
+3 273 3970 4014
+3 1026 4013 3970
+3 1036 4014 4013
+3 4014 3970 4013
+3 1026 4010 4013
+3 813 4012 4010
+3 1036 4013 4012
+3 4013 4010 4012
+3 62 4015 3120
+3 1037 4016 4015
+3 816 3120 4016
+3 3120 4015 4016
+3 275 4017 4019
+3 1038 4018 4017
+3 1037 4019 4018
+3 4019 4017 4018
+3 221 3125 4021
+3 816 4020 3125
+3 1038 4021 4020
+3 4021 3125 4020
+3 816 4016 4020
+3 1037 4018 4016
+3 1038 4020 4018
+3 4020 4016 4018
+3 75 3975 4023
+3 1030 4022 3975
+3 1040 4023 4022
+3 4023 3975 4022
+3 273 4024 3979
+3 1039 4025 4024
+3 1030 3979 4025
+3 3979 4024 4025
+3 275 4026 4028
+3 1040 4027 4026
+3 1039 4028 4027
+3 4028 4026 4027
+3 1040 4022 4027
+3 1030 4025 4022
+3 1039 4027 4025
+3 4027 4022 4025
+3 273 4014 4024
+3 1036 4029 4014
+3 1039 4024 4029
+3 4024 4014 4029
+3 221 4021 4011
+3 1038 4030 4021
+3 1036 4011 4030
+3 4011 4021 4030
+3 275 4028 4017
+3 1039 4031 4028
+3 1038 4017 4031
+3 4017 4028 4031
+3 1039 4029 4031
+3 1036 4030 4029
+3 1038 4031 4030
+3 4031 4029 4030
+3 25 4032 3080
+3 1041 4033 4032
+3 805 3080 4033
+3 3080 4032 4033
+3 276 4034 4036
+3 1042 4035 4034
+3 1041 4036 4035
+3 4036 4034 4035
+3 218 3084 4038
+3 805 4037 3084
+3 1042 4038 4037
+3 4038 3084 4037
+3 805 4033 4037
+3 1041 4035 4033
+3 1042 4037 4035
+3 4037 4033 4035
+3 76 4039 4041
+3 1043 4040 4039
+3 1045 4041 4040
+3 4041 4039 4040
+3 277 4042 4044
+3 1044 4043 4042
+3 1043 4044 4043
+3 4044 4042 4043
+3 276 4045 4047
+3 1045 4046 4045
+3 1044 4047 4046
+3 4047 4045 4046
+3 1045 4040 4046
+3 1043 4043 4040
+3 1044 4046 4043
+3 4046 4040 4043
+3 62 3089 4049
+3 809 4048 3089
+3 1047 4049 4048
+3 4049 3089 4048
+3 218 4050 3093
+3 1046 4051 4050
+3 809 3093 4051
+3 3093 4050 4051
+3 277 4052 4054
+3 1047 4053 4052
+3 1046 4054 4053
+3 4054 4052 4053
+3 1047 4048 4053
+3 809 4051 4048
+3 1046 4053 4051
+3 4053 4048 4051
+3 218 4038 4050
+3 1042 4055 4038
+3 1046 4050 4055
+3 4050 4038 4055
+3 276 4047 4034
+3 1044 4056 4047
+3 1042 4034 4056
+3 4034 4047 4056
+3 277 4054 4042
+3 1046 4057 4054
+3 1044 4042 4057
+3 4042 4054 4057
+3 1046 4055 4057
+3 1042 4056 4055
+3 1044 4057 4056
+3 4057 4055 4056
+3 4 3912 4059
+3 1012 4058 3912
+3 1049 4059 4058
+3 4059 3912 4058
+3 270 4060 3916
+3 1048 4061 4060
+3 1012 3916 4061
+3 3916 4060 4061
+3 279 4062 4064
+3 1049 4063 4062
+3 1048 4064 4063
+3 4064 4062 4063
+3 1049 4058 4063
+3 1012 4061 4058
+3 1048 4063 4061
+3 4063 4058 4061
+3 75 4065 3928
+3 1050 4066 4065
+3 1016 3928 4066
+3 3928 4065 4066
+3 278 4067 4069
+3 1051 4068 4067
+3 1050 4069 4068
+3 4069 4067 4068
+3 270 3933 4071
+3 1016 4070 3933
+3 1051 4071 4070
+3 4071 3933 4070
+3 1016 4066 4070
+3 1050 4068 4066
+3 1051 4070 4068
+3 4070 4066 4068
+3 76 4072 4074
+3 1052 4073 4072
+3 1054 4074 4073
+3 4074 4072 4073
+3 279 4075 4077
+3 1053 4076 4075
+3 1052 4077 4076
+3 4077 4075 4076
+3 278 4078 4080
+3 1054 4079 4078
+3 1053 4080 4079
+3 4080 4078 4079
+3 1054 4073 4079
+3 1052 4076 4073
+3 1053 4079 4076
+3 4079 4073 4076
+3 279 4064 4075
+3 1048 4081 4064
+3 1053 4075 4081
+3 4075 4064 4081
+3 270 4071 4060
+3 1051 4082 4071
+3 1048 4060 4082
+3 4060 4071 4082
+3 278 4080 4067
+3 1053 4083 4080
+3 1051 4067 4083
+3 4067 4080 4083
+3 1053 4081 4083
+3 1048 4082 4081
+3 1051 4083 4082
+3 4083 4081 4082
+3 75 4023 4065
+3 1040 4084 4023
+3 1050 4065 4084
+3 4065 4023 4084
+3 275 4085 4026
+3 1055 4086 4085
+3 1040 4026 4086
+3 4026 4085 4086
+3 278 4069 4088
+3 1050 4087 4069
+3 1055 4088 4087
+3 4088 4069 4087
+3 1050 4084 4087
+3 1040 4086 4084
+3 1055 4087 4086
+3 4087 4084 4086
+3 62 4049 4015
+3 1047 4089 4049
+3 1037 4015 4089
+3 4015 4049 4089
+3 277 4090 4052
+3 1056 4091 4090
+3 1047 4052 4091
+3 4052 4090 4091
+3 275 4019 4093
+3 1037 4092 4019
+3 1056 4093 4092
+3 4093 4019 4092
+3 1037 4089 4092
+3 1047 4091 4089
+3 1056 4092 4091
+3 4092 4089 4091
+3 76 4074 4039
+3 1054 4094 4074
+3 1043 4039 4094
+3 4039 4074 4094
+3 278 4095 4078
+3 1057 4096 4095
+3 1054 4078 4096
+3 4078 4095 4096
+3 277 4044 4098
+3 1043 4097 4044
+3 1057 4098 4097
+3 4098 4044 4097
+3 1043 4094 4097
+3 1054 4096 4094
+3 1057 4097 4096
+3 4097 4094 4096
+3 278 4088 4095
+3 1055 4099 4088
+3 1057 4095 4099
+3 4095 4088 4099
+3 275 4093 4085
+3 1056 4100 4093
+3 1055 4085 4100
+3 4085 4093 4100
+3 277 4098 4090
+3 1057 4101 4098
+3 1056 4090 4101
+3 4090 4098 4101
+3 1057 4099 4101
+3 1055 4100 4099
+3 1056 4101 4100
+3 4101 4099 4100
+3 25 4102 4032
+3 1058 4103 4102
+3 1041 4032 4103
+3 4032 4102 4103
+3 280 4104 4106
+3 1059 4105 4104
+3 1058 4106 4105
+3 4106 4104 4105
+3 276 4036 4108
+3 1041 4107 4036
+3 1059 4108 4107
+3 4108 4036 4107
+3 1041 4103 4107
+3 1058 4105 4103
+3 1059 4107 4105
+3 4107 4103 4105
+3 77 4109 4111
+3 1060 4110 4109
+3 1062 4111 4110
+3 4111 4109 4110
+3 281 4112 4114
+3 1061 4113 4112
+3 1060 4114 4113
+3 4114 4112 4113
+3 280 4115 4117
+3 1062 4116 4115
+3 1061 4117 4116
+3 4117 4115 4116
+3 1062 4110 4116
+3 1060 4113 4110
+3 1061 4116 4113
+3 4116 4110 4113
+3 76 4041 4119
+3 1045 4118 4041
+3 1064 4119 4118
+3 4119 4041 4118
+3 276 4120 4045
+3 1063 4121 4120
+3 1045 4045 4121
+3 4045 4120 4121
+3 281 4122 4124
+3 1064 4123 4122
+3 1063 4124 4123
+3 4124 4122 4123
+3 1064 4118 4123
+3 1045 4121 4118
+3 1063 4123 4121
+3 4123 4118 4121
+3 276 4108 4120
+3 1059 4125 4108
+3 1063 4120 4125
+3 4120 4108 4125
+3 280 4117 4104
+3 1061 4126 4117
+3 1059 4104 4126
+3 4104 4117 4126
+3 281 4124 4112
+3 1063 4127 4124
+3 1061 4112 4127
+3 4112 4124 4127
+3 1063 4125 4127
+3 1059 4126 4125
+3 1061 4127 4126
+3 4127 4125 4126
+3 7 2478 4129
+3 649 4128 2478
+3 1066 4129 4128
+3 4129 2478 4128
+3 177 4130 2482
+3 1065 4131 4130
+3 649 2482 4131
+3 2482 4130 4131
+3 283 4132 4134
+3 1066 4133 4132
+3 1065 4134 4133
+3 4134 4132 4133
+3 1066 4128 4133
+3 649 4131 4128
+3 1065 4133 4131
+3 4133 4128 4131
+3 49 4135 2494
+3 1067 4136 4135
+3 653 2494 4136
+3 2494 4135 4136
+3 282 4137 4139
+3 1068 4138 4137
+3 1067 4139 4138
+3 4139 4137 4138
+3 177 2499 4141
+3 653 4140 2499
+3 1068 4141 4140
+3 4141 2499 4140
+3 653 4136 4140
+3 1067 4138 4136
+3 1068 4140 4138
+3 4140 4136 4138
+3 77 4142 4144
+3 1069 4143 4142
+3 1071 4144 4143
+3 4144 4142 4143
+3 283 4145 4147
+3 1070 4146 4145
+3 1069 4147 4146
+3 4147 4145 4146
+3 282 4148 4150
+3 1071 4149 4148
+3 1070 4150 4149
+3 4150 4148 4149
+3 1071 4143 4149
+3 1069 4146 4143
+3 1070 4149 4146
+3 4149 4143 4146
+3 283 4134 4145
+3 1065 4151 4134
+3 1070 4145 4151
+3 4145 4134 4151
+3 177 4141 4130
+3 1068 4152 4141
+3 1065 4130 4152
+3 4130 4141 4152
+3 282 4150 4137
+3 1070 4153 4150
+3 1068 4137 4153
+3 4137 4150 4153
+3 1070 4151 4153
+3 1065 4152 4151
+3 1068 4153 4152
+3 4153 4151 4152
+3 4 4059 2450
+3 1049 4154 4059
+3 640 2450 4154
+3 2450 4059 4154
+3 279 4155 4062
+3 1072 4156 4155
+3 1049 4062 4156
+3 4062 4155 4156
+3 173 2454 4158
+3 640 4157 2454
+3 1072 4158 4157
+3 4158 2454 4157
+3 640 4154 4157
+3 1049 4156 4154
+3 1072 4157 4156
+3 4157 4154 4156
+3 76 4159 4072
+3 1073 4160 4159
+3 1052 4072 4160
+3 4072 4159 4160
+3 284 4161 4163
+3 1074 4162 4161
+3 1073 4163 4162
+3 4163 4161 4162
+3 279 4077 4165
+3 1052 4164 4077
+3 1074 4165 4164
+3 4165 4077 4164
+3 1052 4160 4164
+3 1073 4162 4160
+3 1074 4164 4162
+3 4164 4160 4162
+3 49 2459 4167
+3 644 4166 2459
+3 1076 4167 4166
+3 4167 2459 4166
+3 173 4168 2463
+3 1075 4169 4168
+3 644 2463 4169
+3 2463 4168 4169
+3 284 4170 4172
+3 1076 4171 4170
+3 1075 4172 4171
+3 4172 4170 4171
+3 1076 4166 4171
+3 644 4169 4166
+3 1075 4171 4169
+3 4171 4166 4169
+3 173 4158 4168
+3 1072 4173 4158
+3 1075 4168 4173
+3 4168 4158 4173
+3 279 4165 4155
+3 1074 4174 4165
+3 1072 4155 4174
+3 4155 4165 4174
+3 284 4172 4161
+3 1075 4175 4172
+3 1074 4161 4175
+3 4161 4172 4175
+3 1075 4173 4175
+3 1072 4174 4173
+3 1074 4175 4174
+3 4175 4173 4174
+3 76 4119 4159
+3 1064 4176 4119
+3 1073 4159 4176
+3 4159 4119 4176
+3 281 4177 4122
+3 1077 4178 4177
+3 1064 4122 4178
+3 4122 4177 4178
+3 284 4163 4180
+3 1073 4179 4163
+3 1077 4180 4179
+3 4180 4163 4179
+3 1073 4176 4179
+3 1064 4178 4176
+3 1077 4179 4178
+3 4179 4176 4178
+3 77 4144 4109
+3 1071 4181 4144
+3 1060 4109 4181
+3 4109 4144 4181
+3 282 4182 4148
+3 1078 4183 4182
+3 1071 4148 4183
+3 4148 4182 4183
+3 281 4114 4185
+3 1060 4184 4114
+3 1078 4185 4184
+3 4185 4114 4184
+3 1060 4181 4184
+3 1071 4183 4181
+3 1078 4184 4183
+3 4184 4181 4183
+3 49 4167 4135
+3 1076 4186 4167
+3 1067 4135 4186
+3 4135 4167 4186
+3 284 4187 4170
+3 1079 4188 4187
+3 1076 4170 4188
+3 4170 4187 4188
+3 282 4139 4190
+3 1067 4189 4139
+3 1079 4190 4189
+3 4190 4139 4189
+3 1067 4186 4189
+3 1076 4188 4186
+3 1079 4189 4188
+3 4189 4186 4188
+3 284 4180 4187
+3 1077 4191 4180
+3 1079 4187 4191
+3 4187 4180 4191
+3 281 4185 4177
+3 1078 4192 4185
+3 1077 4177 4192
+3 4177 4185 4192
+3 282 4190 4182
+3 1079 4193 4190
+3 1078 4182 4193
+3 4182 4190 4193
+3 1079 4191 4193
+3 1077 4192 4191
+3 1078 4193 4192
+3 4193 4191 4192
+3 25 1986 4102
+3 523 4194 1986
+3 1058 4102 4194
+3 4102 1986 4194
+3 144 4195 1990
+3 1080 4196 4195
+3 523 1990 4196
+3 1990 4195 4196
+3 280 4106 4198
+3 1058 4197 4106
+3 1080 4198 4197
+3 4198 4106 4197
+3 1058 4194 4197
+3 523 4196 4194
+3 1080 4197 4196
+3 4197 4194 4196
+3 40 4199 2002
+3 1081 4200 4199
+3 527 2002 4200
+3 2002 4199 4200
+3 285 4201 4203
+3 1082 4202 4201
+3 1081 4203 4202
+3 4203 4201 4202
+3 144 2007 4205
+3 527 4204 2007
+3 1082 4205 4204
+3 4205 2007 4204
+3 527 4200 4204
+3 1081 4202 4200
+3 1082 4204 4202
+3 4204 4200 4202
+3 77 4111 4207
+3 1062 4206 4111
+3 1084 4207 4206
+3 4207 4111 4206
+3 280 4208 4115
+3 1083 4209 4208
+3 1062 4115 4209
+3 4115 4208 4209
+3 285 4210 4212
+3 1084 4211 4210
+3 1083 4212 4211
+3 4212 4210 4211
+3 1084 4206 4211
+3 1062 4209 4206
+3 1083 4211 4209
+3 4211 4206 4209
+3 280 4198 4208
+3 1080 4213 4198
+3 1083 4208 4213
+3 4208 4198 4213
+3 144 4205 4195
+3 1082 4214 4205
+3 1080 4195 4214
+3 4195 4205 4214
+3 285 4212 4201
+3 1083 4215 4212
+3 1082 4201 4215
+3 4201 4212 4215
+3 1083 4213 4215
+3 1080 4214 4213
+3 1082 4215 4214
+3 4215 4213 4214
+3 19 4216 1958
+3 1085 4217 4216
+3 514 1958 4217
+3 1958 4216 4217
+3 286 4218 4220
+3 1086 4219 4218
+3 1085 4220 4219
+3 4220 4218 4219
+3 140 1962 4222
+3 514 4221 1962
+3 1086 4222 4221
+3 4222 1962 4221
+3 514 4217 4221
+3 1085 4219 4217
+3 1086 4221 4219
+3 4221 4217 4219
+3 78 4223 4225
+3 1087 4224 4223
+3 1089 4225 4224
+3 4225 4223 4224
+3 287 4226 4228
+3 1088 4227 4226
+3 1087 4228 4227
+3 4228 4226 4227
+3 286 4229 4231
+3 1089 4230 4229
+3 1088 4231 4230
+3 4231 4229 4230
+3 1089 4224 4230
+3 1087 4227 4224
+3 1088 4230 4227
+3 4230 4224 4227
+3 40 1967 4233
+3 518 4232 1967
+3 1091 4233 4232
+3 4233 1967 4232
+3 140 4234 1971
+3 1090 4235 4234
+3 518 1971 4235
+3 1971 4234 4235
+3 287 4236 4238
+3 1091 4237 4236
+3 1090 4238 4237
+3 4238 4236 4237
+3 1091 4232 4237
+3 518 4235 4232
+3 1090 4237 4235
+3 4237 4232 4235
+3 140 4222 4234
+3 1086 4239 4222
+3 1090 4234 4239
+3 4234 4222 4239
+3 286 4231 4218
+3 1088 4240 4231
+3 1086 4218 4240
+3 4218 4231 4240
+3 287 4238 4226
+3 1090 4241 4238
+3 1088 4226 4241
+3 4226 4238 4241
+3 1090 4239 4241
+3 1086 4240 4239
+3 1088 4241 4240
+3 4241 4239 4240
+3 7 4129 4243
+3 1066 4242 4129
+3 1093 4243 4242
+3 4243 4129 4242
+3 283 4244 4132
+3 1092 4245 4244
+3 1066 4132 4245
+3 4132 4244 4245
+3 289 4246 4248
+3 1093 4247 4246
+3 1092 4248 4247
+3 4248 4246 4247
+3 1093 4242 4247
+3 1066 4245 4242
+3 1092 4247 4245
+3 4247 4242 4245
+3 77 4249 4142
+3 1094 4250 4249
+3 1069 4142 4250
+3 4142 4249 4250
+3 288 4251 4253
+3 1095 4252 4251
+3 1094 4253 4252
+3 4253 4251 4252
+3 283 4147 4255
+3 1069 4254 4147
+3 1095 4255 4254
+3 4255 4147 4254
+3 1069 4250 4254
+3 1094 4252 4250
+3 1095 4254 4252
+3 4254 4250 4252
+3 78 4256 4258
+3 1096 4257 4256
+3 1098 4258 4257
+3 4258 4256 4257
+3 289 4259 4261
+3 1097 4260 4259
+3 1096 4261 4260
+3 4261 4259 4260
+3 288 4262 4264
+3 1098 4263 4262
+3 1097 4264 4263
+3 4264 4262 4263
+3 1098 4257 4263
+3 1096 4260 4257
+3 1097 4263 4260
+3 4263 4257 4260
+3 289 4248 4259
+3 1092 4265 4248
+3 1097 4259 4265
+3 4259 4248 4265
+3 283 4255 4244
+3 1095 4266 4255
+3 1092 4244 4266
+3 4244 4255 4266
+3 288 4264 4251
+3 1097 4267 4264
+3 1095 4251 4267
+3 4251 4264 4267
+3 1097 4265 4267
+3 1092 4266 4265
+3 1095 4267 4266
+3 4267 4265 4266
+3 77 4207 4249
+3 1084 4268 4207
+3 1094 4249 4268
+3 4249 4207 4268
+3 285 4269 4210
+3 1099 4270 4269
+3 1084 4210 4270
+3 4210 4269 4270
+3 288 4253 4272
+3 1094 4271 4253
+3 1099 4272 4271
+3 4272 4253 4271
+3 1094 4268 4271
+3 1084 4270 4268
+3 1099 4271 4270
+3 4271 4268 4270
+3 40 4233 4199
+3 1091 4273 4233
+3 1081 4199 4273
+3 4199 4233 4273
+3 287 4274 4236
+3 1100 4275 4274
+3 1091 4236 4275
+3 4236 4274 4275
+3 285 4203 4277
+3 1081 4276 4203
+3 1100 4277 4276
+3 4277 4203 4276
+3 1081 4273 4276
+3 1091 4275 4273
+3 1100 4276 4275
+3 4276 4273 4275
+3 78 4258 4223
+3 1098 4278 4258
+3 1087 4223 4278
+3 4223 4258 4278
+3 288 4279 4262
+3 1101 4280 4279
+3 1098 4262 4280
+3 4262 4279 4280
+3 287 4228 4282
+3 1087 4281 4228
+3 1101 4282 4281
+3 4282 4228 4281
+3 1087 4278 4281
+3 1098 4280 4278
+3 1101 4281 4280
+3 4281 4278 4280
+3 288 4272 4279
+3 1099 4283 4272
+3 1101 4279 4283
+3 4279 4272 4283
+3 285 4277 4269
+3 1100 4284 4277
+3 1099 4269 4284
+3 4269 4277 4284
+3 287 4282 4274
+3 1101 4285 4282
+3 1100 4274 4285
+3 4274 4282 4285
+3 1101 4283 4285
+3 1099 4284 4283
+3 1100 4285 4284
+3 4285 4283 4284
+3 19 3015 4216
+3 791 4286 3015
+3 1085 4216 4286
+3 4216 3015 4286
+3 216 4287 3018
+3 1102 4288 4287
+3 791 3018 4288
+3 3018 4287 4288
+3 286 4220 4290
+3 1085 4289 4220
+3 1102 4290 4289
+3 4290 4220 4289
+3 1085 4286 4289
+3 791 4288 4286
+3 1102 4289 4288
+3 4289 4286 4288
+3 61 4291 3028
+3 1103 4292 4291
+3 794 3028 4292
+3 3028 4291 4292
+3 290 4293 4295
+3 1104 4294 4293
+3 1103 4295 4294
+3 4295 4293 4294
+3 216 3033 4297
+3 794 4296 3033
+3 1104 4297 4296
+3 4297 3033 4296
+3 794 4292 4296
+3 1103 4294 4292
+3 1104 4296 4294
+3 4296 4292 4294
+3 78 4225 4299
+3 1089 4298 4225
+3 1106 4299 4298
+3 4299 4225 4298
+3 286 4300 4229
+3 1105 4301 4300
+3 1089 4229 4301
+3 4229 4300 4301
+3 290 4302 4304
+3 1106 4303 4302
+3 1105 4304 4303
+3 4304 4302 4303
+3 1106 4298 4303
+3 1089 4301 4298
+3 1105 4303 4301
+3 4303 4298 4301
+3 286 4290 4300
+3 1102 4305 4290
+3 1105 4300 4305
+3 4300 4290 4305
+3 216 4297 4287
+3 1104 4306 4297
+3 1102 4287 4306
+3 4287 4297 4306
+3 290 4304 4293
+3 1105 4307 4304
+3 1104 4293 4307
+3 4293 4304 4307
+3 1105 4305 4307
+3 1102 4306 4305
+3 1104 4307 4306
+3 4307 4305 4306
+3 20 4308 2984
+3 1107 4309 4308
+3 781 2984 4309
+3 2984 4308 4309
+3 291 4310 4312
+3 1108 4311 4310
+3 1107 4312 4311
+3 4312 4310 4311
+3 212 2989 4314
+3 781 4313 2989
+3 1108 4314 4313
+3 4314 2989 4313
+3 781 4309 4313
+3 1107 4311 4309
+3 1108 4313 4311
+3 4313 4309 4311
+3 79 4315 4317
+3 1109 4316 4315
+3 1111 4317 4316
+3 4317 4315 4316
+3 292 4318 4320
+3 1110 4319 4318
+3 1109 4320 4319
+3 4320 4318 4319
+3 291 4321 4323
+3 1111 4322 4321
+3 1110 4323 4322
+3 4323 4321 4322
+3 1111 4316 4322
+3 1109 4319 4316
+3 1110 4322 4319
+3 4322 4316 4319
+3 61 2995 4325
+3 786 4324 2995
+3 1113 4325 4324
+3 4325 2995 4324
+3 212 4326 2999
+3 1112 4327 4326
+3 786 2999 4327
+3 2999 4326 4327
+3 292 4328 4330
+3 1113 4329 4328
+3 1112 4330 4329
+3 4330 4328 4329
+3 1113 4324 4329
+3 786 4327 4324
+3 1112 4329 4327
+3 4329 4324 4327
+3 212 4314 4326
+3 1108 4331 4314
+3 1112 4326 4331
+3 4326 4314 4331
+3 291 4323 4310
+3 1110 4332 4323
+3 1108 4310 4332
+3 4310 4323 4332
+3 292 4330 4318
+3 1112 4333 4330
+3 1110 4318 4333
+3 4318 4330 4333
+3 1112 4331 4333
+3 1108 4332 4331
+3 1110 4333 4332
+3 4333 4331 4332
+3 7 4243 4335
+3 1093 4334 4243
+3 1115 4335 4334
+3 4335 4243 4334
+3 289 4336 4246
+3 1114 4337 4336
+3 1093 4246 4337
+3 4246 4336 4337
+3 294 4338 4340
+3 1115 4339 4338
+3 1114 4340 4339
+3 4340 4338 4339
+3 1115 4334 4339
+3 1093 4337 4334
+3 1114 4339 4337
+3 4339 4334 4337
+3 78 4341 4256
+3 1116 4342 4341
+3 1096 4256 4342
+3 4256 4341 4342
+3 293 4343 4345
+3 1117 4344 4343
+3 1116 4345 4344
+3 4345 4343 4344
+3 289 4261 4347
+3 1096 4346 4261
+3 1117 4347 4346
+3 4347 4261 4346
+3 1096 4342 4346
+3 1116 4344 4342
+3 1117 4346 4344
+3 4346 4342 4344
+3 79 4348 4350
+3 1118 4349 4348
+3 1120 4350 4349
+3 4350 4348 4349
+3 294 4351 4353
+3 1119 4352 4351
+3 1118 4353 4352
+3 4353 4351 4352
+3 293 4354 4356
+3 1120 4355 4354
+3 1119 4356 4355
+3 4356 4354 4355
+3 1120 4349 4355
+3 1118 4352 4349
+3 1119 4355 4352
+3 4355 4349 4352
+3 294 4340 4351
+3 1114 4357 4340
+3 1119 4351 4357
+3 4351 4340 4357
+3 289 4347 4336
+3 1117 4358 4347
+3 1114 4336 4358
+3 4336 4347 4358
+3 293 4356 4343
+3 1119 4359 4356
+3 1117 4343 4359
+3 4343 4356 4359
+3 1119 4357 4359
+3 1114 4358 4357
+3 1117 4359 4358
+3 4359 4357 4358
+3 78 4299 4341
+3 1106 4360 4299
+3 1116 4341 4360
+3 4341 4299 4360
+3 290 4361 4302
+3 1121 4362 4361
+3 1106 4302 4362
+3 4302 4361 4362
+3 293 4345 4364
+3 1116 4363 4345
+3 1121 4364 4363
+3 4364 4345 4363
+3 1116 4360 4363
+3 1106 4362 4360
+3 1121 4363 4362
+3 4363 4360 4362
+3 61 4325 4291
+3 1113 4365 4325
+3 1103 4291 4365
+3 4291 4325 4365
+3 292 4366 4328
+3 1122 4367 4366
+3 1113 4328 4367
+3 4328 4366 4367
+3 290 4295 4369
+3 1103 4368 4295
+3 1122 4369 4368
+3 4369 4295 4368
+3 1103 4365 4368
+3 1113 4367 4365
+3 1122 4368 4367
+3 4368 4365 4367
+3 79 4350 4315
+3 1120 4370 4350
+3 1109 4315 4370
+3 4315 4350 4370
+3 293 4371 4354
+3 1123 4372 4371
+3 1120 4354 4372
+3 4354 4371 4372
+3 292 4320 4374
+3 1109 4373 4320
+3 1123 4374 4373
+3 4374 4320 4373
+3 1109 4370 4373
+3 1120 4372 4370
+3 1123 4373 4372
+3 4373 4370 4372
+3 293 4364 4371
+3 1121 4375 4364
+3 1123 4371 4375
+3 4371 4364 4375
+3 290 4369 4361
+3 1122 4376 4369
+3 1121 4361 4376
+3 4361 4369 4376
+3 292 4374 4366
+3 1123 4377 4374
+3 1122 4366 4377
+3 4366 4374 4377
+3 1123 4375 4377
+3 1121 4376 4375
+3 1122 4377 4376
+3 4377 4375 4376
+3 20 3561 4308
+3 926 4378 3561
+3 1107 4308 4378
+3 4308 3561 4378
+3 249 4379 3564
+3 1124 4380 4379
+3 926 3564 4380
+3 3564 4379 4380
+3 291 4312 4382
+3 1107 4381 4312
+3 1124 4382 4381
+3 4382 4312 4381
+3 1107 4378 4381
+3 926 4380 4378
+3 1124 4381 4380
+3 4381 4378 4380
+3 69 4383 3574
+3 1125 4384 4383
+3 929 3574 4384
+3 3574 4383 4384
+3 295 4385 4387
+3 1126 4386 4385
+3 1125 4387 4386
+3 4387 4385 4386
+3 249 3579 4389
+3 929 4388 3579
+3 1126 4389 4388
+3 4389 3579 4388
+3 929 4384 4388
+3 1125 4386 4384
+3 1126 4388 4386
+3 4388 4384 4386
+3 79 4317 4391
+3 1111 4390 4317
+3 1128 4391 4390
+3 4391 4317 4390
+3 291 4392 4321
+3 1127 4393 4392
+3 1111 4321 4393
+3 4321 4392 4393
+3 295 4394 4396
+3 1128 4395 4394
+3 1127 4396 4395
+3 4396 4394 4395
+3 1128 4390 4395
+3 1111 4393 4390
+3 1127 4395 4393
+3 4395 4390 4393
+3 291 4382 4392
+3 1124 4397 4382
+3 1127 4392 4397
+3 4392 4382 4397
+3 249 4389 4379
+3 1126 4398 4389
+3 1124 4379 4398
+3 4379 4389 4398
+3 295 4396 4385
+3 1127 4399 4396
+3 1126 4385 4399
+3 4385 4396 4399
+3 1127 4397 4399
+3 1124 4398 4397
+3 1126 4399 4398
+3 4399 4397 4398
+3 9 4400 3534
+3 1129 4401 4400
+3 918 3534 4401
+3 3534 4400 4401
+3 296 4402 4404
+3 1130 4403 4402
+3 1129 4404 4403
+3 4404 4402 4403
+3 246 3538 4406
+3 918 4405 3538
+3 1130 4406 4405
+3 4406 3538 4405
+3 918 4401 4405
+3 1129 4403 4401
+3 1130 4405 4403
+3 4405 4401 4403
+3 80 4407 4409
+3 1131 4408 4407
+3 1133 4409 4408
+3 4409 4407 4408
+3 297 4410 4412
+3 1132 4411 4410
+3 1131 4412 4411
+3 4412 4410 4411
+3 296 4413 4415
+3 1133 4414 4413
+3 1132 4415 4414
+3 4415 4413 4414
+3 1133 4408 4414
+3 1131 4411 4408
+3 1132 4414 4411
+3 4414 4408 4411
+3 69 3543 4417
+3 922 4416 3543
+3 1135 4417 4416
+3 4417 3543 4416
+3 246 4418 3547
+3 1134 4419 4418
+3 922 3547 4419
+3 3547 4418 4419
+3 297 4420 4422
+3 1135 4421 4420
+3 1134 4422 4421
+3 4422 4420 4421
+3 1135 4416 4421
+3 922 4419 4416
+3 1134 4421 4419
+3 4421 4416 4419
+3 246 4406 4418
+3 1130 4423 4406
+3 1134 4418 4423
+3 4418 4406 4423
+3 296 4415 4402
+3 1132 4424 4415
+3 1130 4402 4424
+3 4402 4415 4424
+3 297 4422 4410
+3 1134 4425 4422
+3 1132 4410 4425
+3 4410 4422 4425
+3 1134 4423 4425
+3 1130 4424 4423
+3 1132 4425 4424
+3 4425 4423 4424
+3 7 4335 4427
+3 1115 4426 4335
+3 1137 4427 4426
+3 4427 4335 4426
+3 294 4428 4338
+3 1136 4429 4428
+3 1115 4338 4429
+3 4338 4428 4429
+3 299 4430 4432
+3 1137 4431 4430
+3 1136 4432 4431
+3 4432 4430 4431
+3 1137 4426 4431
+3 1115 4429 4426
+3 1136 4431 4429
+3 4431 4426 4429
+3 79 4433 4348
+3 1138 4434 4433
+3 1118 4348 4434
+3 4348 4433 4434
+3 298 4435 4437
+3 1139 4436 4435
+3 1138 4437 4436
+3 4437 4435 4436
+3 294 4353 4439
+3 1118 4438 4353
+3 1139 4439 4438
+3 4439 4353 4438
+3 1118 4434 4438
+3 1138 4436 4434
+3 1139 4438 4436
+3 4438 4434 4436
+3 80 4440 4442
+3 1140 4441 4440
+3 1142 4442 4441
+3 4442 4440 4441
+3 299 4443 4445
+3 1141 4444 4443
+3 1140 4445 4444
+3 4445 4443 4444
+3 298 4446 4448
+3 1142 4447 4446
+3 1141 4448 4447
+3 4448 4446 4447
+3 1142 4441 4447
+3 1140 4444 4441
+3 1141 4447 4444
+3 4447 4441 4444
+3 299 4432 4443
+3 1136 4449 4432
+3 1141 4443 4449
+3 4443 4432 4449
+3 294 4439 4428
+3 1139 4450 4439
+3 1136 4428 4450
+3 4428 4439 4450
+3 298 4448 4435
+3 1141 4451 4448
+3 1139 4435 4451
+3 4435 4448 4451
+3 1141 4449 4451
+3 1136 4450 4449
+3 1139 4451 4450
+3 4451 4449 4450
+3 79 4391 4433
+3 1128 4452 4391
+3 1138 4433 4452
+3 4433 4391 4452
+3 295 4453 4394
+3 1143 4454 4453
+3 1128 4394 4454
+3 4394 4453 4454
+3 298 4437 4456
+3 1138 4455 4437
+3 1143 4456 4455
+3 4456 4437 4455
+3 1138 4452 4455
+3 1128 4454 4452
+3 1143 4455 4454
+3 4455 4452 4454
+3 69 4417 4383
+3 1135 4457 4417
+3 1125 4383 4457
+3 4383 4417 4457
+3 297 4458 4420
+3 1144 4459 4458
+3 1135 4420 4459
+3 4420 4458 4459
+3 295 4387 4461
+3 1125 4460 4387
+3 1144 4461 4460
+3 4461 4387 4460
+3 1125 4457 4460
+3 1135 4459 4457
+3 1144 4460 4459
+3 4460 4457 4459
+3 80 4442 4407
+3 1142 4462 4442
+3 1131 4407 4462
+3 4407 4442 4462
+3 298 4463 4446
+3 1145 4464 4463
+3 1142 4446 4464
+3 4446 4463 4464
+3 297 4412 4466
+3 1131 4465 4412
+3 1145 4466 4465
+3 4466 4412 4465
+3 1131 4462 4465
+3 1142 4464 4462
+3 1145 4465 4464
+3 4465 4462 4464
+3 298 4456 4463
+3 1143 4467 4456
+3 1145 4463 4467
+3 4463 4456 4467
+3 295 4461 4453
+3 1144 4468 4461
+3 1143 4453 4468
+3 4453 4461 4468
+3 297 4466 4458
+3 1145 4469 4466
+3 1144 4458 4469
+3 4458 4466 4469
+3 1145 4467 4469
+3 1143 4468 4467
+3 1144 4469 4468
+3 4469 4467 4468
+3 14 4470 4472
+3 1146 4471 4470
+3 1148 4472 4471
+3 4472 4470 4471
+3 300 4473 4475
+3 1147 4474 4473
+3 1146 4475 4474
+3 4475 4473 4474
+3 302 4476 4478
+3 1148 4477 4476
+3 1147 4478 4477
+3 4478 4476 4477
+3 1148 4471 4477
+3 1146 4474 4471
+3 1147 4477 4474
+3 4477 4471 4474
+3 81 4479 4481
+3 1149 4480 4479
+3 1151 4481 4480
+3 4481 4479 4480
+3 301 4482 4484
+3 1150 4483 4482
+3 1149 4484 4483
+3 4484 4482 4483
+3 300 4485 4487
+3 1151 4486 4485
+3 1150 4487 4486
+3 4487 4485 4486
+3 1151 4480 4486
+3 1149 4483 4480
+3 1150 4486 4483
+3 4486 4480 4483
+3 83 4488 4490
+3 1152 4489 4488
+3 1154 4490 4489
+3 4490 4488 4489
+3 302 4491 4493
+3 1153 4492 4491
+3 1152 4493 4492
+3 4493 4491 4492
+3 301 4494 4496
+3 1154 4495 4494
+3 1153 4496 4495
+3 4496 4494 4495
+3 1154 4489 4495
+3 1152 4492 4489
+3 1153 4495 4492
+3 4495 4489 4492
+3 302 4478 4491
+3 1147 4497 4478
+3 1153 4491 4497
+3 4491 4478 4497
+3 300 4487 4473
+3 1150 4498 4487
+3 1147 4473 4498
+3 4473 4487 4498
+3 301 4496 4482
+3 1153 4499 4496
+3 1150 4482 4499
+3 4482 4496 4499
+3 1153 4497 4499
+3 1147 4498 4497
+3 1150 4499 4498
+3 4499 4497 4498
+3 15 4500 4502
+3 1155 4501 4500
+3 1157 4502 4501
+3 4502 4500 4501
+3 303 4503 4505
+3 1156 4504 4503
+3 1155 4505 4504
+3 4505 4503 4504
+3 305 4506 4508
+3 1157 4507 4506
+3 1156 4508 4507
+3 4508 4506 4507
+3 1157 4501 4507
+3 1155 4504 4501
+3 1156 4507 4504
+3 4507 4501 4504
+3 82 4509 4511
+3 1158 4510 4509
+3 1160 4511 4510
+3 4511 4509 4510
+3 304 4512 4514
+3 1159 4513 4512
+3 1158 4514 4513
+3 4514 4512 4513
+3 303 4515 4517
+3 1160 4516 4515
+3 1159 4517 4516
+3 4517 4515 4516
+3 1160 4510 4516
+3 1158 4513 4510
+3 1159 4516 4513
+3 4516 4510 4513
+3 81 4518 4520
+3 1161 4519 4518
+3 1163 4520 4519
+3 4520 4518 4519
+3 305 4521 4523
+3 1162 4522 4521
+3 1161 4523 4522
+3 4523 4521 4522
+3 304 4524 4526
+3 1163 4525 4524
+3 1162 4526 4525
+3 4526 4524 4525
+3 1163 4519 4525
+3 1161 4522 4519
+3 1162 4525 4522
+3 4525 4519 4522
+3 305 4508 4521
+3 1156 4527 4508
+3 1162 4521 4527
+3 4521 4508 4527
+3 303 4517 4503
+3 1159 4528 4517
+3 1156 4503 4528
+3 4503 4517 4528
+3 304 4526 4512
+3 1162 4529 4526
+3 1159 4512 4529
+3 4512 4526 4529
+3 1162 4527 4529
+3 1156 4528 4527
+3 1159 4529 4528
+3 4529 4527 4528
+3 12 4530 4532
+3 1164 4531 4530
+3 1166 4532 4531
+3 4532 4530 4531
+3 306 4533 4535
+3 1165 4534 4533
+3 1164 4535 4534
+3 4535 4533 4534
+3 308 4536 4538
+3 1166 4537 4536
+3 1165 4538 4537
+3 4538 4536 4537
+3 1166 4531 4537
+3 1164 4534 4531
+3 1165 4537 4534
+3 4537 4531 4534
+3 83 4539 4541
+3 1167 4540 4539
+3 1169 4541 4540
+3 4541 4539 4540
+3 307 4542 4544
+3 1168 4543 4542
+3 1167 4544 4543
+3 4544 4542 4543
+3 306 4545 4547
+3 1169 4546 4545
+3 1168 4547 4546
+3 4547 4545 4546
+3 1169 4540 4546
+3 1167 4543 4540
+3 1168 4546 4543
+3 4546 4540 4543
+3 82 4548 4550
+3 1170 4549 4548
+3 1172 4550 4549
+3 4550 4548 4549
+3 308 4551 4553
+3 1171 4552 4551
+3 1170 4553 4552
+3 4553 4551 4552
+3 307 4554 4556
+3 1172 4555 4554
+3 1171 4556 4555
+3 4556 4554 4555
+3 1172 4549 4555
+3 1170 4552 4549
+3 1171 4555 4552
+3 4555 4549 4552
+3 308 4538 4551
+3 1165 4557 4538
+3 1171 4551 4557
+3 4551 4538 4557
+3 306 4547 4533
+3 1168 4558 4547
+3 1165 4533 4558
+3 4533 4547 4558
+3 307 4556 4542
+3 1171 4559 4556
+3 1168 4542 4559
+3 4542 4556 4559
+3 1171 4557 4559
+3 1165 4558 4557
+3 1168 4559 4558
+3 4559 4557 4558
+3 83 4490 4539
+3 1154 4560 4490
+3 1167 4539 4560
+3 4539 4490 4560
+3 301 4561 4494
+3 1173 4562 4561
+3 1154 4494 4562
+3 4494 4561 4562
+3 307 4544 4564
+3 1167 4563 4544
+3 1173 4564 4563
+3 4564 4544 4563
+3 1167 4560 4563
+3 1154 4562 4560
+3 1173 4563 4562
+3 4563 4560 4562
+3 81 4520 4479
+3 1163 4565 4520
+3 1149 4479 4565
+3 4479 4520 4565
+3 304 4566 4524
+3 1174 4567 4566
+3 1163 4524 4567
+3 4524 4566 4567
+3 301 4484 4569
+3 1149 4568 4484
+3 1174 4569 4568
+3 4569 4484 4568
+3 1149 4565 4568
+3 1163 4567 4565
+3 1174 4568 4567
+3 4568 4565 4567
+3 82 4550 4509
+3 1172 4570 4550
+3 1158 4509 4570
+3 4509 4550 4570
+3 307 4571 4554
+3 1175 4572 4571
+3 1172 4554 4572
+3 4554 4571 4572
+3 304 4514 4574
+3 1158 4573 4514
+3 1175 4574 4573
+3 4574 4514 4573
+3 1158 4570 4573
+3 1172 4572 4570
+3 1175 4573 4572
+3 4573 4570 4572
+3 307 4564 4571
+3 1173 4575 4564
+3 1175 4571 4575
+3 4571 4564 4575
+3 301 4569 4561
+3 1174 4576 4569
+3 1173 4561 4576
+3 4561 4569 4576
+3 304 4574 4566
+3 1175 4577 4574
+3 1174 4566 4577
+3 4566 4574 4577
+3 1175 4575 4577
+3 1173 4576 4575
+3 1174 4577 4576
+3 4577 4575 4576
+3 12 4578 4530
+3 1176 4579 4578
+3 1164 4530 4579
+3 4530 4578 4579
+3 309 4580 4582
+3 1177 4581 4580
+3 1176 4582 4581
+3 4582 4580 4581
+3 306 4535 4584
+3 1164 4583 4535
+3 1177 4584 4583
+3 4584 4535 4583
+3 1164 4579 4583
+3 1176 4581 4579
+3 1177 4583 4581
+3 4583 4579 4581
+3 84 4585 4587
+3 1178 4586 4585
+3 1180 4587 4586
+3 4587 4585 4586
+3 310 4588 4590
+3 1179 4589 4588
+3 1178 4590 4589
+3 4590 4588 4589
+3 309 4591 4593
+3 1180 4592 4591
+3 1179 4593 4592
+3 4593 4591 4592
+3 1180 4586 4592
+3 1178 4589 4586
+3 1179 4592 4589
+3 4592 4586 4589
+3 83 4541 4595
+3 1169 4594 4541
+3 1182 4595 4594
+3 4595 4541 4594
+3 306 4596 4545
+3 1181 4597 4596
+3 1169 4545 4597
+3 4545 4596 4597
+3 310 4598 4600
+3 1182 4599 4598
+3 1181 4600 4599
+3 4600 4598 4599
+3 1182 4594 4599
+3 1169 4597 4594
+3 1181 4599 4597
+3 4599 4594 4597
+3 306 4584 4596
+3 1177 4601 4584
+3 1181 4596 4601
+3 4596 4584 4601
+3 309 4593 4580
+3 1179 4602 4593
+3 1177 4580 4602
+3 4580 4593 4602
+3 310 4600 4588
+3 1181 4603 4600
+3 1179 4588 4603
+3 4588 4600 4603
+3 1181 4601 4603
+3 1177 4602 4601
+3 1179 4603 4602
+3 4603 4601 4602
+3 13 4604 4606
+3 1183 4605 4604
+3 1185 4606 4605
+3 4606 4604 4605
+3 311 4607 4609
+3 1184 4608 4607
+3 1183 4609 4608
+3 4609 4607 4608
+3 313 4610 4612
+3 1185 4611 4610
+3 1184 4612 4611
+3 4612 4610 4611
+3 1185 4605 4611
+3 1183 4608 4605
+3 1184 4611 4608
+3 4611 4605 4608
+3 85 4613 4615
+3 1186 4614 4613
+3 1188 4615 4614
+3 4615 4613 4614
+3 312 4616 4618
+3 1187 4617 4616
+3 1186 4618 4617
+3 4618 4616 4617
+3 311 4619 4621
+3 1188 4620 4619
+3 1187 4621 4620
+3 4621 4619 4620
+3 1188 4614 4620
+3 1186 4617 4614
+3 1187 4620 4617
+3 4620 4614 4617
+3 84 4622 4624
+3 1189 4623 4622
+3 1191 4624 4623
+3 4624 4622 4623
+3 313 4625 4627
+3 1190 4626 4625
+3 1189 4627 4626
+3 4627 4625 4626
+3 312 4628 4630
+3 1191 4629 4628
+3 1190 4630 4629
+3 4630 4628 4629
+3 1191 4623 4629
+3 1189 4626 4623
+3 1190 4629 4626
+3 4629 4623 4626
+3 313 4612 4625
+3 1184 4631 4612
+3 1190 4625 4631
+3 4625 4612 4631
+3 311 4621 4607
+3 1187 4632 4621
+3 1184 4607 4632
+3 4607 4621 4632
+3 312 4630 4616
+3 1190 4633 4630
+3 1187 4616 4633
+3 4616 4630 4633
+3 1190 4631 4633
+3 1184 4632 4631
+3 1187 4633 4632
+3 4633 4631 4632
+3 14 4472 4635
+3 1148 4634 4472
+3 1193 4635 4634
+3 4635 4472 4634
+3 302 4636 4476
+3 1192 4637 4636
+3 1148 4476 4637
+3 4476 4636 4637
+3 315 4638 4640
+3 1193 4639 4638
+3 1192 4640 4639
+3 4640 4638 4639
+3 1193 4634 4639
+3 1148 4637 4634
+3 1192 4639 4637
+3 4639 4634 4637
+3 83 4641 4488
+3 1194 4642 4641
+3 1152 4488 4642
+3 4488 4641 4642
+3 314 4643 4645
+3 1195 4644 4643
+3 1194 4645 4644
+3 4645 4643 4644
+3 302 4493 4647
+3 1152 4646 4493
+3 1195 4647 4646
+3 4647 4493 4646
+3 1152 4642 4646
+3 1194 4644 4642
+3 1195 4646 4644
+3 4646 4642 4644
+3 85 4648 4650
+3 1196 4649 4648
+3 1198 4650 4649
+3 4650 4648 4649
+3 315 4651 4653
+3 1197 4652 4651
+3 1196 4653 4652
+3 4653 4651 4652
+3 314 4654 4656
+3 1198 4655 4654
+3 1197 4656 4655
+3 4656 4654 4655
+3 1198 4649 4655
+3 1196 4652 4649
+3 1197 4655 4652
+3 4655 4649 4652
+3 315 4640 4651
+3 1192 4657 4640
+3 1197 4651 4657
+3 4651 4640 4657
+3 302 4647 4636
+3 1195 4658 4647
+3 1192 4636 4658
+3 4636 4647 4658
+3 314 4656 4643
+3 1197 4659 4656
+3 1195 4643 4659
+3 4643 4656 4659
+3 1197 4657 4659
+3 1192 4658 4657
+3 1195 4659 4658
+3 4659 4657 4658
+3 83 4595 4641
+3 1182 4660 4595
+3 1194 4641 4660
+3 4641 4595 4660
+3 310 4661 4598
+3 1199 4662 4661
+3 1182 4598 4662
+3 4598 4661 4662
+3 314 4645 4664
+3 1194 4663 4645
+3 1199 4664 4663
+3 4664 4645 4663
+3 1194 4660 4663
+3 1182 4662 4660
+3 1199 4663 4662
+3 4663 4660 4662
+3 84 4624 4585
+3 1191 4665 4624
+3 1178 4585 4665
+3 4585 4624 4665
+3 312 4666 4628
+3 1200 4667 4666
+3 1191 4628 4667
+3 4628 4666 4667
+3 310 4590 4669
+3 1178 4668 4590
+3 1200 4669 4668
+3 4669 4590 4668
+3 1178 4665 4668
+3 1191 4667 4665
+3 1200 4668 4667
+3 4668 4665 4667
+3 85 4650 4613
+3 1198 4670 4650
+3 1186 4613 4670
+3 4613 4650 4670
+3 314 4671 4654
+3 1201 4672 4671
+3 1198 4654 4672
+3 4654 4671 4672
+3 312 4618 4674
+3 1186 4673 4618
+3 1201 4674 4673
+3 4674 4618 4673
+3 1186 4670 4673
+3 1198 4672 4670
+3 1201 4673 4672
+3 4673 4670 4672
+3 314 4664 4671
+3 1199 4675 4664
+3 1201 4671 4675
+3 4671 4664 4675
+3 310 4669 4661
+3 1200 4676 4669
+3 1199 4661 4676
+3 4661 4669 4676
+3 312 4674 4666
+3 1201 4677 4674
+3 1200 4666 4677
+3 4666 4674 4677
+3 1201 4675 4677
+3 1199 4676 4675
+3 1200 4677 4676
+3 4677 4675 4676
+3 14 4678 4680
+3 1202 4679 4678
+3 1204 4680 4679
+3 4680 4678 4679
+3 316 4681 4683
+3 1203 4682 4681
+3 1202 4683 4682
+3 4683 4681 4682
+3 318 4684 4686
+3 1204 4685 4684
+3 1203 4686 4685
+3 4686 4684 4685
+3 1204 4679 4685
+3 1202 4682 4679
+3 1203 4685 4682
+3 4685 4679 4682
+3 86 4687 4689
+3 1205 4688 4687
+3 1207 4689 4688
+3 4689 4687 4688
+3 317 4690 4692
+3 1206 4691 4690
+3 1205 4692 4691
+3 4692 4690 4691
+3 316 4693 4695
+3 1207 4694 4693
+3 1206 4695 4694
+3 4695 4693 4694
+3 1207 4688 4694
+3 1205 4691 4688
+3 1206 4694 4691
+3 4694 4688 4691
+3 88 4696 4698
+3 1208 4697 4696
+3 1210 4698 4697
+3 4698 4696 4697
+3 318 4699 4701
+3 1209 4700 4699
+3 1208 4701 4700
+3 4701 4699 4700
+3 317 4702 4704
+3 1210 4703 4702
+3 1209 4704 4703
+3 4704 4702 4703
+3 1210 4697 4703
+3 1208 4700 4697
+3 1209 4703 4700
+3 4703 4697 4700
+3 318 4686 4699
+3 1203 4705 4686
+3 1209 4699 4705
+3 4699 4686 4705
+3 316 4695 4681
+3 1206 4706 4695
+3 1203 4681 4706
+3 4681 4695 4706
+3 317 4704 4690
+3 1209 4707 4704
+3 1206 4690 4707
+3 4690 4704 4707
+3 1209 4705 4707
+3 1203 4706 4705
+3 1206 4707 4706
+3 4707 4705 4706
+3 17 4708 4710
+3 1211 4709 4708
+3 1213 4710 4709
+3 4710 4708 4709
+3 319 4711 4713
+3 1212 4712 4711
+3 1211 4713 4712
+3 4713 4711 4712
+3 321 4714 4716
+3 1213 4715 4714
+3 1212 4716 4715
+3 4716 4714 4715
+3 1213 4709 4715
+3 1211 4712 4709
+3 1212 4715 4712
+3 4715 4709 4712
+3 87 4717 4719
+3 1214 4718 4717
+3 1216 4719 4718
+3 4719 4717 4718
+3 320 4720 4722
+3 1215 4721 4720
+3 1214 4722 4721
+3 4722 4720 4721
+3 319 4723 4725
+3 1216 4724 4723
+3 1215 4725 4724
+3 4725 4723 4724
+3 1216 4718 4724
+3 1214 4721 4718
+3 1215 4724 4721
+3 4724 4718 4721
+3 86 4726 4728
+3 1217 4727 4726
+3 1219 4728 4727
+3 4728 4726 4727
+3 321 4729 4731
+3 1218 4730 4729
+3 1217 4731 4730
+3 4731 4729 4730
+3 320 4732 4734
+3 1219 4733 4732
+3 1218 4734 4733
+3 4734 4732 4733
+3 1219 4727 4733
+3 1217 4730 4727
+3 1218 4733 4730
+3 4733 4727 4730
+3 321 4716 4729
+3 1212 4735 4716
+3 1218 4729 4735
+3 4729 4716 4735
+3 319 4725 4711
+3 1215 4736 4725
+3 1212 4711 4736
+3 4711 4725 4736
+3 320 4734 4720
+3 1218 4737 4734
+3 1215 4720 4737
+3 4720 4734 4737
+3 1218 4735 4737
+3 1212 4736 4735
+3 1215 4737 4736
+3 4737 4735 4736
+3 16 4738 4740
+3 1220 4739 4738
+3 1222 4740 4739
+3 4740 4738 4739
+3 322 4741 4743
+3 1221 4742 4741
+3 1220 4743 4742
+3 4743 4741 4742
+3 324 4744 4746
+3 1222 4745 4744
+3 1221 4746 4745
+3 4746 4744 4745
+3 1222 4739 4745
+3 1220 4742 4739
+3 1221 4745 4742
+3 4745 4739 4742
+3 88 4747 4749
+3 1223 4748 4747
+3 1225 4749 4748
+3 4749 4747 4748
+3 323 4750 4752
+3 1224 4751 4750
+3 1223 4752 4751
+3 4752 4750 4751
+3 322 4753 4755
+3 1225 4754 4753
+3 1224 4755 4754
+3 4755 4753 4754
+3 1225 4748 4754
+3 1223 4751 4748
+3 1224 4754 4751
+3 4754 4748 4751
+3 87 4756 4758
+3 1226 4757 4756
+3 1228 4758 4757
+3 4758 4756 4757
+3 324 4759 4761
+3 1227 4760 4759
+3 1226 4761 4760
+3 4761 4759 4760
+3 323 4762 4764
+3 1228 4763 4762
+3 1227 4764 4763
+3 4764 4762 4763
+3 1228 4757 4763
+3 1226 4760 4757
+3 1227 4763 4760
+3 4763 4757 4760
+3 324 4746 4759
+3 1221 4765 4746
+3 1227 4759 4765
+3 4759 4746 4765
+3 322 4755 4741
+3 1224 4766 4755
+3 1221 4741 4766
+3 4741 4755 4766
+3 323 4764 4750
+3 1227 4767 4764
+3 1224 4750 4767
+3 4750 4764 4767
+3 1227 4765 4767
+3 1221 4766 4765
+3 1224 4767 4766
+3 4767 4765 4766
+3 88 4698 4747
+3 1210 4768 4698
+3 1223 4747 4768
+3 4747 4698 4768
+3 317 4769 4702
+3 1229 4770 4769
+3 1210 4702 4770
+3 4702 4769 4770
+3 323 4752 4772
+3 1223 4771 4752
+3 1229 4772 4771
+3 4772 4752 4771
+3 1223 4768 4771
+3 1210 4770 4768
+3 1229 4771 4770
+3 4771 4768 4770
+3 86 4728 4687
+3 1219 4773 4728
+3 1205 4687 4773
+3 4687 4728 4773
+3 320 4774 4732
+3 1230 4775 4774
+3 1219 4732 4775
+3 4732 4774 4775
+3 317 4692 4777
+3 1205 4776 4692
+3 1230 4777 4776
+3 4777 4692 4776
+3 1205 4773 4776
+3 1219 4775 4773
+3 1230 4776 4775
+3 4776 4773 4775
+3 87 4758 4717
+3 1228 4778 4758
+3 1214 4717 4778
+3 4717 4758 4778
+3 323 4779 4762
+3 1231 4780 4779
+3 1228 4762 4780
+3 4762 4779 4780
+3 320 4722 4782
+3 1214 4781 4722
+3 1231 4782 4781
+3 4782 4722 4781
+3 1214 4778 4781
+3 1228 4780 4778
+3 1231 4781 4780
+3 4781 4778 4780
+3 323 4772 4779
+3 1229 4783 4772
+3 1231 4779 4783
+3 4779 4772 4783
+3 317 4777 4769
+3 1230 4784 4777
+3 1229 4769 4784
+3 4769 4777 4784
+3 320 4782 4774
+3 1231 4785 4782
+3 1230 4774 4785
+3 4774 4782 4785
+3 1231 4783 4785
+3 1229 4784 4783
+3 1230 4785 4784
+3 4785 4783 4784
+3 16 2315 4738
+3 609 4786 2315
+3 1220 4738 4786
+3 4738 2315 4786
+3 167 4787 2318
+3 1232 4788 4787
+3 609 2318 4788
+3 2318 4787 4788
+3 322 4743 4790
+3 1220 4789 4743
+3 1232 4790 4789
+3 4790 4743 4789
+3 1220 4786 4789
+3 609 4788 4786
+3 1232 4789 4788
+3 4789 4786 4788
+3 47 4791 2328
+3 1233 4792 4791
+3 612 2328 4792
+3 2328 4791 4792
+3 325 4793 4795
+3 1234 4794 4793
+3 1233 4795 4794
+3 4795 4793 4794
+3 167 2333 4797
+3 612 4796 2333
+3 1234 4797 4796
+3 4797 2333 4796
+3 612 4792 4796
+3 1233 4794 4792
+3 1234 4796 4794
+3 4796 4792 4794
+3 88 4749 4799
+3 1225 4798 4749
+3 1236 4799 4798
+3 4799 4749 4798
+3 322 4800 4753
+3 1235 4801 4800
+3 1225 4753 4801
+3 4753 4800 4801
+3 325 4802 4804
+3 1236 4803 4802
+3 1235 4804 4803
+3 4804 4802 4803
+3 1236 4798 4803
+3 1225 4801 4798
+3 1235 4803 4801
+3 4803 4798 4801
+3 322 4790 4800
+3 1232 4805 4790
+3 1235 4800 4805
+3 4800 4790 4805
+3 167 4797 4787
+3 1234 4806 4797
+3 1232 4787 4806
+3 4787 4797 4806
+3 325 4804 4793
+3 1235 4807 4804
+3 1234 4793 4807
+3 4793 4804 4807
+3 1235 4805 4807
+3 1232 4806 4805
+3 1234 4807 4806
+3 4807 4805 4806
+3 15 4502 2284
+3 1157 4808 4502
+3 599 2284 4808
+3 2284 4502 4808
+3 305 4809 4506
+3 1237 4810 4809
+3 1157 4506 4810
+3 4506 4809 4810
+3 163 2289 4812
+3 599 4811 2289
+3 1237 4812 4811
+3 4812 2289 4811
+3 599 4808 4811
+3 1157 4810 4808
+3 1237 4811 4810
+3 4811 4808 4810
+3 81 4813 4518
+3 1238 4814 4813
+3 1161 4518 4814
+3 4518 4813 4814
+3 326 4815 4817
+3 1239 4816 4815
+3 1238 4817 4816
+3 4817 4815 4816
+3 305 4523 4819
+3 1161 4818 4523
+3 1239 4819 4818
+3 4819 4523 4818
+3 1161 4814 4818
+3 1238 4816 4814
+3 1239 4818 4816
+3 4818 4814 4816
+3 47 2295 4821
+3 604 4820 2295
+3 1241 4821 4820
+3 4821 2295 4820
+3 163 4822 2299
+3 1240 4823 4822
+3 604 2299 4823
+3 2299 4822 4823
+3 326 4824 4826
+3 1241 4825 4824
+3 1240 4826 4825
+3 4826 4824 4825
+3 1241 4820 4825
+3 604 4823 4820
+3 1240 4825 4823
+3 4825 4820 4823
+3 163 4812 4822
+3 1237 4827 4812
+3 1240 4822 4827
+3 4822 4812 4827
+3 305 4819 4809
+3 1239 4828 4819
+3 1237 4809 4828
+3 4809 4819 4828
+3 326 4826 4815
+3 1240 4829 4826
+3 1239 4815 4829
+3 4815 4826 4829
+3 1240 4827 4829
+3 1237 4828 4827
+3 1239 4829 4828
+3 4829 4827 4828
+3 14 4680 4470
+3 1204 4830 4680
+3 1146 4470 4830
+3 4470 4680 4830
+3 318 4831 4684
+3 1242 4832 4831
+3 1204 4684 4832
+3 4684 4831 4832
+3 300 4475 4834
+3 1146 4833 4475
+3 1242 4834 4833
+3 4834 4475 4833
+3 1146 4830 4833
+3 1204 4832 4830
+3 1242 4833 4832
+3 4833 4830 4832
+3 88 4835 4696
+3 1243 4836 4835
+3 1208 4696 4836
+3 4696 4835 4836
+3 327 4837 4839
+3 1244 4838 4837
+3 1243 4839 4838
+3 4839 4837 4838
+3 318 4701 4841
+3 1208 4840 4701
+3 1244 4841 4840
+3 4841 4701 4840
+3 1208 4836 4840
+3 1243 4838 4836
+3 1244 4840 4838
+3 4840 4836 4838
+3 81 4481 4843
+3 1151 4842 4481
+3 1246 4843 4842
+3 4843 4481 4842
+3 300 4844 4485
+3 1245 4845 4844
+3 1151 4485 4845
+3 4485 4844 4845
+3 327 4846 4848
+3 1246 4847 4846
+3 1245 4848 4847
+3 4848 4846 4847
+3 1246 4842 4847
+3 1151 4845 4842
+3 1245 4847 4845
+3 4847 4842 4845
+3 300 4834 4844
+3 1242 4849 4834
+3 1245 4844 4849
+3 4844 4834 4849
+3 318 4841 4831
+3 1244 4850 4841
+3 1242 4831 4850
+3 4831 4841 4850
+3 327 4848 4837
+3 1245 4851 4848
+3 1244 4837 4851
+3 4837 4848 4851
+3 1245 4849 4851
+3 1242 4850 4849
+3 1244 4851 4850
+3 4851 4849 4850
+3 88 4799 4835
+3 1236 4852 4799
+3 1243 4835 4852
+3 4835 4799 4852
+3 325 4853 4802
+3 1247 4854 4853
+3 1236 4802 4854
+3 4802 4853 4854
+3 327 4839 4856
+3 1243 4855 4839
+3 1247 4856 4855
+3 4856 4839 4855
+3 1243 4852 4855
+3 1236 4854 4852
+3 1247 4855 4854
+3 4855 4852 4854
+3 47 4821 4791
+3 1241 4857 4821
+3 1233 4791 4857
+3 4791 4821 4857
+3 326 4858 4824
+3 1248 4859 4858
+3 1241 4824 4859
+3 4824 4858 4859
+3 325 4795 4861
+3 1233 4860 4795
+3 1248 4861 4860
+3 4861 4795 4860
+3 1233 4857 4860
+3 1241 4859 4857
+3 1248 4860 4859
+3 4860 4857 4859
+3 81 4843 4813
+3 1246 4862 4843
+3 1238 4813 4862
+3 4813 4843 4862
+3 327 4863 4846
+3 1249 4864 4863
+3 1246 4846 4864
+3 4846 4863 4864
+3 326 4817 4866
+3 1238 4865 4817
+3 1249 4866 4865
+3 4866 4817 4865
+3 1238 4862 4865
+3 1246 4864 4862
+3 1249 4865 4864
+3 4865 4862 4864
+3 327 4856 4863
+3 1247 4867 4856
+3 1249 4863 4867
+3 4863 4856 4867
+3 325 4861 4853
+3 1248 4868 4861
+3 1247 4853 4868
+3 4853 4861 4868
+3 326 4866 4858
+3 1249 4869 4866
+3 1248 4858 4869
+3 4858 4866 4869
+3 1249 4867 4869
+3 1247 4868 4867
+3 1248 4869 4868
+3 4869 4867 4868
+3 18 4870 4872
+3 1250 4871 4870
+3 1252 4872 4871
+3 4872 4870 4871
+3 328 4873 4875
+3 1251 4874 4873
+3 1250 4875 4874
+3 4875 4873 4874
+3 330 4876 4878
+3 1252 4877 4876
+3 1251 4878 4877
+3 4878 4876 4877
+3 1252 4871 4877
+3 1250 4874 4871
+3 1251 4877 4874
+3 4877 4871 4874
+3 89 4879 4881
+3 1253 4880 4879
+3 1255 4881 4880
+3 4881 4879 4880
+3 329 4882 4884
+3 1254 4883 4882
+3 1253 4884 4883
+3 4884 4882 4883
+3 328 4885 4887
+3 1255 4886 4885
+3 1254 4887 4886
+3 4887 4885 4886
+3 1255 4880 4886
+3 1253 4883 4880
+3 1254 4886 4883
+3 4886 4880 4883
+3 91 4888 4890
+3 1256 4889 4888
+3 1258 4890 4889
+3 4890 4888 4889
+3 330 4891 4893
+3 1257 4892 4891
+3 1256 4893 4892
+3 4893 4891 4892
+3 329 4894 4896
+3 1258 4895 4894
+3 1257 4896 4895
+3 4896 4894 4895
+3 1258 4889 4895
+3 1256 4892 4889
+3 1257 4895 4892
+3 4895 4889 4892
+3 330 4878 4891
+3 1251 4897 4878
+3 1257 4891 4897
+3 4891 4878 4897
+3 328 4887 4873
+3 1254 4898 4887
+3 1251 4873 4898
+3 4873 4887 4898
+3 329 4896 4882
+3 1257 4899 4896
+3 1254 4882 4899
+3 4882 4896 4899
+3 1257 4897 4899
+3 1251 4898 4897
+3 1254 4899 4898
+3 4899 4897 4898
+3 6 4900 4902
+3 1259 4901 4900
+3 1261 4902 4901
+3 4902 4900 4901
+3 331 4903 4905
+3 1260 4904 4903
+3 1259 4905 4904
+3 4905 4903 4904
+3 333 4906 4908
+3 1261 4907 4906
+3 1260 4908 4907
+3 4908 4906 4907
+3 1261 4901 4907
+3 1259 4904 4901
+3 1260 4907 4904
+3 4907 4901 4904
+3 90 4909 4911
+3 1262 4910 4909
+3 1264 4911 4910
+3 4911 4909 4910
+3 332 4912 4914
+3 1263 4913 4912
+3 1262 4914 4913
+3 4914 4912 4913
+3 331 4915 4917
+3 1264 4916 4915
+3 1263 4917 4916
+3 4917 4915 4916
+3 1264 4910 4916
+3 1262 4913 4910
+3 1263 4916 4913
+3 4916 4910 4913
+3 89 4918 4920
+3 1265 4919 4918
+3 1267 4920 4919
+3 4920 4918 4919
+3 333 4921 4923
+3 1266 4922 4921
+3 1265 4923 4922
+3 4923 4921 4922
+3 332 4924 4926
+3 1267 4925 4924
+3 1266 4926 4925
+3 4926 4924 4925
+3 1267 4919 4925
+3 1265 4922 4919
+3 1266 4925 4922
+3 4925 4919 4922
+3 333 4908 4921
+3 1260 4927 4908
+3 1266 4921 4927
+3 4921 4908 4927
+3 331 4917 4903
+3 1263 4928 4917
+3 1260 4903 4928
+3 4903 4917 4928
+3 332 4926 4912
+3 1266 4929 4926
+3 1263 4912 4929
+3 4912 4926 4929
+3 1266 4927 4929
+3 1260 4928 4927
+3 1263 4929 4928
+3 4929 4927 4928
+3 17 4930 4932
+3 1268 4931 4930
+3 1270 4932 4931
+3 4932 4930 4931
+3 334 4933 4935
+3 1269 4934 4933
+3 1268 4935 4934
+3 4935 4933 4934
+3 336 4936 4938
+3 1270 4937 4936
+3 1269 4938 4937
+3 4938 4936 4937
+3 1270 4931 4937
+3 1268 4934 4931
+3 1269 4937 4934
+3 4937 4931 4934
+3 91 4939 4941
+3 1271 4940 4939
+3 1273 4941 4940
+3 4941 4939 4940
+3 335 4942 4944
+3 1272 4943 4942
+3 1271 4944 4943
+3 4944 4942 4943
+3 334 4945 4947
+3 1273 4946 4945
+3 1272 4947 4946
+3 4947 4945 4946
+3 1273 4940 4946
+3 1271 4943 4940
+3 1272 4946 4943
+3 4946 4940 4943
+3 90 4948 4950
+3 1274 4949 4948
+3 1276 4950 4949
+3 4950 4948 4949
+3 336 4951 4953
+3 1275 4952 4951
+3 1274 4953 4952
+3 4953 4951 4952
+3 335 4954 4956
+3 1276 4955 4954
+3 1275 4956 4955
+3 4956 4954 4955
+3 1276 4949 4955
+3 1274 4952 4949
+3 1275 4955 4952
+3 4955 4949 4952
+3 336 4938 4951
+3 1269 4957 4938
+3 1275 4951 4957
+3 4951 4938 4957
+3 334 4947 4933
+3 1272 4958 4947
+3 1269 4933 4958
+3 4933 4947 4958
+3 335 4956 4942
+3 1275 4959 4956
+3 1272 4942 4959
+3 4942 4956 4959
+3 1275 4957 4959
+3 1269 4958 4957
+3 1272 4959 4958
+3 4959 4957 4958
+3 91 4890 4939
+3 1258 4960 4890
+3 1271 4939 4960
+3 4939 4890 4960
+3 329 4961 4894
+3 1277 4962 4961
+3 1258 4894 4962
+3 4894 4961 4962
+3 335 4944 4964
+3 1271 4963 4944
+3 1277 4964 4963
+3 4964 4944 4963
+3 1271 4960 4963
+3 1258 4962 4960
+3 1277 4963 4962
+3 4963 4960 4962
+3 89 4920 4879
+3 1267 4965 4920
+3 1253 4879 4965
+3 4879 4920 4965
+3 332 4966 4924
+3 1278 4967 4966
+3 1267 4924 4967
+3 4924 4966 4967
+3 329 4884 4969
+3 1253 4968 4884
+3 1278 4969 4968
+3 4969 4884 4968
+3 1253 4965 4968
+3 1267 4967 4965
+3 1278 4968 4967
+3 4968 4965 4967
+3 90 4950 4909
+3 1276 4970 4950
+3 1262 4909 4970
+3 4909 4950 4970
+3 335 4971 4954
+3 1279 4972 4971
+3 1276 4954 4972
+3 4954 4971 4972
+3 332 4914 4974
+3 1262 4973 4914
+3 1279 4974 4973
+3 4974 4914 4973
+3 1262 4970 4973
+3 1276 4972 4970
+3 1279 4973 4972
+3 4973 4970 4972
+3 335 4964 4971
+3 1277 4975 4964
+3 1279 4971 4975
+3 4971 4964 4975
+3 329 4969 4961
+3 1278 4976 4969
+3 1277 4961 4976
+3 4961 4969 4976
+3 332 4974 4966
+3 1279 4977 4974
+3 1278 4966 4977
+3 4966 4974 4977
+3 1279 4975 4977
+3 1277 4976 4975
+3 1278 4977 4976
+3 4977 4975 4976
+3 16 4740 4979
+3 1222 4978 4740
+3 1281 4979 4978
+3 4979 4740 4978
+3 324 4980 4744
+3 1280 4981 4980
+3 1222 4744 4981
+3 4744 4980 4981
+3 338 4982 4984
+3 1281 4983 4982
+3 1280 4984 4983
+3 4984 4982 4983
+3 1281 4978 4983
+3 1222 4981 4978
+3 1280 4983 4981
+3 4983 4978 4981
+3 87 4985 4756
+3 1282 4986 4985
+3 1226 4756 4986
+3 4756 4985 4986
+3 337 4987 4989
+3 1283 4988 4987
+3 1282 4989 4988
+3 4989 4987 4988
+3 324 4761 4991
+3 1226 4990 4761
+3 1283 4991 4990
+3 4991 4761 4990
+3 1226 4986 4990
+3 1282 4988 4986
+3 1283 4990 4988
+3 4990 4986 4988
+3 92 4992 4994
+3 1284 4993 4992
+3 1286 4994 4993
+3 4994 4992 4993
+3 338 4995 4997
+3 1285 4996 4995
+3 1284 4997 4996
+3 4997 4995 4996
+3 337 4998 5000
+3 1286 4999 4998
+3 1285 5000 4999
+3 5000 4998 4999
+3 1286 4993 4999
+3 1284 4996 4993
+3 1285 4999 4996
+3 4999 4993 4996
+3 338 4984 4995
+3 1280 5001 4984
+3 1285 4995 5001
+3 4995 4984 5001
+3 324 4991 4980
+3 1283 5002 4991
+3 1280 4980 5002
+3 4980 4991 5002
+3 337 5000 4987
+3 1285 5003 5000
+3 1283 4987 5003
+3 4987 5000 5003
+3 1285 5001 5003
+3 1280 5002 5001
+3 1283 5003 5002
+3 5003 5001 5002
+3 17 4932 4708
+3 1270 5004 4932
+3 1211 4708 5004
+3 4708 4932 5004
+3 336 5005 4936
+3 1287 5006 5005
+3 1270 4936 5006
+3 4936 5005 5006
+3 319 4713 5008
+3 1211 5007 4713
+3 1287 5008 5007
+3 5008 4713 5007
+3 1211 5004 5007
+3 1270 5006 5004
+3 1287 5007 5006
+3 5007 5004 5006
+3 90 5009 4948
+3 1288 5010 5009
+3 1274 4948 5010
+3 4948 5009 5010
+3 339 5011 5013
+3 1289 5012 5011
+3 1288 5013 5012
+3 5013 5011 5012
+3 336 4953 5015
+3 1274 5014 4953
+3 1289 5015 5014
+3 5015 4953 5014
+3 1274 5010 5014
+3 1288 5012 5010
+3 1289 5014 5012
+3 5014 5010 5012
+3 87 4719 5017
+3 1216 5016 4719
+3 1291 5017 5016
+3 5017 4719 5016
+3 319 5018 4723
+3 1290 5019 5018
+3 1216 4723 5019
+3 4723 5018 5019
+3 339 5020 5022
+3 1291 5021 5020
+3 1290 5022 5021
+3 5022 5020 5021
+3 1291 5016 5021
+3 1216 5019 5016
+3 1290 5021 5019
+3 5021 5016 5019
+3 319 5008 5018
+3 1287 5023 5008
+3 1290 5018 5023
+3 5018 5008 5023
+3 336 5015 5005
+3 1289 5024 5015
+3 1287 5005 5024
+3 5005 5015 5024
+3 339 5022 5011
+3 1290 5025 5022
+3 1289 5011 5025
+3 5011 5022 5025
+3 1290 5023 5025
+3 1287 5024 5023
+3 1289 5025 5024
+3 5025 5023 5024
+3 6 5026 4900
+3 1292 5027 5026
+3 1259 4900 5027
+3 4900 5026 5027
+3 340 5028 5030
+3 1293 5029 5028
+3 1292 5030 5029
+3 5030 5028 5029
+3 331 4905 5032
+3 1259 5031 4905
+3 1293 5032 5031
+3 5032 4905 5031
+3 1259 5027 5031
+3 1292 5029 5027
+3 1293 5031 5029
+3 5031 5027 5029
+3 92 5033 5035
+3 1294 5034 5033
+3 1296 5035 5034
+3 5035 5033 5034
+3 341 5036 5038
+3 1295 5037 5036
+3 1294 5038 5037
+3 5038 5036 5037
+3 340 5039 5041
+3 1296 5040 5039
+3 1295 5041 5040
+3 5041 5039 5040
+3 1296 5034 5040
+3 1294 5037 5034
+3 1295 5040 5037
+3 5040 5034 5037
+3 90 4911 5043
+3 1264 5042 4911
+3 1298 5043 5042
+3 5043 4911 5042
+3 331 5044 4915
+3 1297 5045 5044
+3 1264 4915 5045
+3 4915 5044 5045
+3 341 5046 5048
+3 1298 5047 5046
+3 1297 5048 5047
+3 5048 5046 5047
+3 1298 5042 5047
+3 1264 5045 5042
+3 1297 5047 5045
+3 5047 5042 5045
+3 331 5032 5044
+3 1293 5049 5032
+3 1297 5044 5049
+3 5044 5032 5049
+3 340 5041 5028
+3 1295 5050 5041
+3 1293 5028 5050
+3 5028 5041 5050
+3 341 5048 5036
+3 1297 5051 5048
+3 1295 5036 5051
+3 5036 5048 5051
+3 1297 5049 5051
+3 1293 5050 5049
+3 1295 5051 5050
+3 5051 5049 5050
+3 92 4994 5033
+3 1286 5052 4994
+3 1294 5033 5052
+3 5033 4994 5052
+3 337 5053 4998
+3 1299 5054 5053
+3 1286 4998 5054
+3 4998 5053 5054
+3 341 5038 5056
+3 1294 5055 5038
+3 1299 5056 5055
+3 5056 5038 5055
+3 1294 5052 5055
+3 1286 5054 5052
+3 1299 5055 5054
+3 5055 5052 5054
+3 87 5017 4985
+3 1291 5057 5017
+3 1282 4985 5057
+3 4985 5017 5057
+3 339 5058 5020
+3 1300 5059 5058
+3 1291 5020 5059
+3 5020 5058 5059
+3 337 4989 5061
+3 1282 5060 4989
+3 1300 5061 5060
+3 5061 4989 5060
+3 1282 5057 5060
+3 1291 5059 5057
+3 1300 5060 5059
+3 5060 5057 5059
+3 90 5043 5009
+3 1298 5062 5043
+3 1288 5009 5062
+3 5009 5043 5062
+3 341 5063 5046
+3 1301 5064 5063
+3 1298 5046 5064
+3 5046 5063 5064
+3 339 5013 5066
+3 1288 5065 5013
+3 1301 5066 5065
+3 5066 5013 5065
+3 1288 5062 5065
+3 1298 5064 5062
+3 1301 5065 5064
+3 5065 5062 5064
+3 341 5056 5063
+3 1299 5067 5056
+3 1301 5063 5067
+3 5063 5056 5067
+3 337 5061 5053
+3 1300 5068 5061
+3 1299 5053 5068
+3 5053 5061 5068
+3 339 5066 5058
+3 1301 5069 5066
+3 1300 5058 5069
+3 5058 5066 5069
+3 1301 5067 5069
+3 1299 5068 5067
+3 1300 5069 5068
+3 5069 5067 5068
+3 18 4872 5071
+3 1252 5070 4872
+3 1303 5071 5070
+3 5071 4872 5070
+3 330 5072 4876
+3 1302 5073 5072
+3 1252 4876 5073
+3 4876 5072 5073
+3 343 5074 5076
+3 1303 5075 5074
+3 1302 5076 5075
+3 5076 5074 5075
+3 1303 5070 5075
+3 1252 5073 5070
+3 1302 5075 5073
+3 5075 5070 5073
+3 91 5077 4888
+3 1304 5078 5077
+3 1256 4888 5078
+3 4888 5077 5078
+3 342 5079 5081
+3 1305 5080 5079
+3 1304 5081 5080
+3 5081 5079 5080
+3 330 4893 5083
+3 1256 5082 4893
+3 1305 5083 5082
+3 5083 4893 5082
+3 1256 5078 5082
+3 1304 5080 5078
+3 1305 5082 5080
+3 5082 5078 5080
+3 93 5084 5086
+3 1306 5085 5084
+3 1308 5086 5085
+3 5086 5084 5085
+3 343 5087 5089
+3 1307 5088 5087
+3 1306 5089 5088
+3 5089 5087 5088
+3 342 5090 5092
+3 1308 5091 5090
+3 1307 5092 5091
+3 5092 5090 5091
+3 1308 5085 5091
+3 1306 5088 5085
+3 1307 5091 5088
+3 5091 5085 5088
+3 343 5076 5087
+3 1302 5093 5076
+3 1307 5087 5093
+3 5087 5076 5093
+3 330 5083 5072
+3 1305 5094 5083
+3 1302 5072 5094
+3 5072 5083 5094
+3 342 5092 5079
+3 1307 5095 5092
+3 1305 5079 5095
+3 5079 5092 5095
+3 1307 5093 5095
+3 1302 5094 5093
+3 1305 5095 5094
+3 5095 5093 5094
+3 17 4710 4930
+3 1213 5096 4710
+3 1268 4930 5096
+3 4930 4710 5096
+3 321 5097 4714
+3 1309 5098 5097
+3 1213 4714 5098
+3 4714 5097 5098
+3 334 4935 5100
+3 1268 5099 4935
+3 1309 5100 5099
+3 5100 4935 5099
+3 1268 5096 5099
+3 1213 5098 5096
+3 1309 5099 5098
+3 5099 5096 5098
+3 86 5101 4726
+3 1310 5102 5101
+3 1217 4726 5102
+3 4726 5101 5102
+3 344 5103 5105
+3 1311 5104 5103
+3 1310 5105 5104
+3 5105 5103 5104
+3 321 4731 5107
+3 1217 5106 4731
+3 1311 5107 5106
+3 5107 4731 5106
+3 1217 5102 5106
+3 1310 5104 5102
+3 1311 5106 5104
+3 5106 5102 5104
+3 91 4941 5109
+3 1273 5108 4941
+3 1313 5109 5108
+3 5109 4941 5108
+3 334 5110 4945
+3 1312 5111 5110
+3 1273 4945 5111
+3 4945 5110 5111
+3 344 5112 5114
+3 1313 5113 5112
+3 1312 5114 5113
+3 5114 5112 5113
+3 1313 5108 5113
+3 1273 5111 5108
+3 1312 5113 5111
+3 5113 5108 5111
+3 334 5100 5110
+3 1309 5115 5100
+3 1312 5110 5115
+3 5110 5100 5115
+3 321 5107 5097
+3 1311 5116 5107
+3 1309 5097 5116
+3 5097 5107 5116
+3 344 5114 5103
+3 1312 5117 5114
+3 1311 5103 5117
+3 5103 5114 5117
+3 1312 5115 5117
+3 1309 5116 5115
+3 1311 5117 5116
+3 5117 5115 5116
+3 14 5118 4678
+3 1314 5119 5118
+3 1202 4678 5119
+3 4678 5118 5119
+3 345 5120 5122
+3 1315 5121 5120
+3 1314 5122 5121
+3 5122 5120 5121
+3 316 4683 5124
+3 1202 5123 4683
+3 1315 5124 5123
+3 5124 4683 5123
+3 1202 5119 5123
+3 1314 5121 5119
+3 1315 5123 5121
+3 5123 5119 5121
+3 93 5125 5127
+3 1316 5126 5125
+3 1318 5127 5126
+3 5127 5125 5126
+3 346 5128 5130
+3 1317 5129 5128
+3 1316 5130 5129
+3 5130 5128 5129
+3 345 5131 5133
+3 1318 5132 5131
+3 1317 5133 5132
+3 5133 5131 5132
+3 1318 5126 5132
+3 1316 5129 5126
+3 1317 5132 5129
+3 5132 5126 5129
+3 86 4689 5135
+3 1207 5134 4689
+3 1320 5135 5134
+3 5135 4689 5134
+3 316 5136 4693
+3 1319 5137 5136
+3 1207 4693 5137
+3 4693 5136 5137
+3 346 5138 5140
+3 1320 5139 5138
+3 1319 5140 5139
+3 5140 5138 5139
+3 1320 5134 5139
+3 1207 5137 5134
+3 1319 5139 5137
+3 5139 5134 5137
+3 316 5124 5136
+3 1315 5141 5124
+3 1319 5136 5141
+3 5136 5124 5141
+3 345 5133 5120
+3 1317 5142 5133
+3 1315 5120 5142
+3 5120 5133 5142
+3 346 5140 5128
+3 1319 5143 5140
+3 1317 5128 5143
+3 5128 5140 5143
+3 1319 5141 5143
+3 1315 5142 5141
+3 1317 5143 5142
+3 5143 5141 5142
+3 93 5086 5125
+3 1308 5144 5086
+3 1316 5125 5144
+3 5125 5086 5144
+3 342 5145 5090
+3 1321 5146 5145
+3 1308 5090 5146
+3 5090 5145 5146
+3 346 5130 5148
+3 1316 5147 5130
+3 1321 5148 5147
+3 5148 5130 5147
+3 1316 5144 5147
+3 1308 5146 5144
+3 1321 5147 5146
+3 5147 5144 5146
+3 91 5109 5077
+3 1313 5149 5109
+3 1304 5077 5149
+3 5077 5109 5149
+3 344 5150 5112
+3 1322 5151 5150
+3 1313 5112 5151
+3 5112 5150 5151
+3 342 5081 5153
+3 1304 5152 5081
+3 1322 5153 5152
+3 5153 5081 5152
+3 1304 5149 5152
+3 1313 5151 5149
+3 1322 5152 5151
+3 5152 5149 5151
+3 86 5135 5101
+3 1320 5154 5135
+3 1310 5101 5154
+3 5101 5135 5154
+3 346 5155 5138
+3 1323 5156 5155
+3 1320 5138 5156
+3 5138 5155 5156
+3 344 5105 5158
+3 1310 5157 5105
+3 1323 5158 5157
+3 5158 5105 5157
+3 1310 5154 5157
+3 1320 5156 5154
+3 1323 5157 5156
+3 5157 5154 5156
+3 346 5148 5155
+3 1321 5159 5148
+3 1323 5155 5159
+3 5155 5148 5159
+3 342 5153 5145
+3 1322 5160 5153
+3 1321 5145 5160
+3 5145 5153 5160
+3 344 5158 5150
+3 1323 5161 5158
+3 1322 5150 5161
+3 5150 5158 5161
+3 1323 5159 5161
+3 1321 5160 5159
+3 1322 5161 5160
+3 5161 5159 5160
+3 14 4635 5118
+3 1193 5162 4635
+3 1314 5118 5162
+3 5118 4635 5162
+3 315 5163 4638
+3 1324 5164 5163
+3 1193 4638 5164
+3 4638 5163 5164
+3 345 5122 5166
+3 1314 5165 5122
+3 1324 5166 5165
+3 5166 5122 5165
+3 1314 5162 5165
+3 1193 5164 5162
+3 1324 5165 5164
+3 5165 5162 5164
+3 85 5167 4648
+3 1325 5168 5167
+3 1196 4648 5168
+3 4648 5167 5168
+3 347 5169 5171
+3 1326 5170 5169
+3 1325 5171 5170
+3 5171 5169 5170
+3 315 4653 5173
+3 1196 5172 4653
+3 1326 5173 5172
+3 5173 4653 5172
+3 1196 5168 5172
+3 1325 5170 5168
+3 1326 5172 5170
+3 5172 5168 5170
+3 93 5127 5175
+3 1318 5174 5127
+3 1328 5175 5174
+3 5175 5127 5174
+3 345 5176 5131
+3 1327 5177 5176
+3 1318 5131 5177
+3 5131 5176 5177
+3 347 5178 5180
+3 1328 5179 5178
+3 1327 5180 5179
+3 5180 5178 5179
+3 1328 5174 5179
+3 1318 5177 5174
+3 1327 5179 5177
+3 5179 5174 5177
+3 345 5166 5176
+3 1324 5181 5166
+3 1327 5176 5181
+3 5176 5166 5181
+3 315 5173 5163
+3 1326 5182 5173
+3 1324 5163 5182
+3 5163 5173 5182
+3 347 5180 5169
+3 1327 5183 5180
+3 1326 5169 5183
+3 5169 5180 5183
+3 1327 5181 5183
+3 1324 5182 5181
+3 1326 5183 5182
+3 5183 5181 5182
+3 13 2852 4604
+3 746 5184 2852
+3 1183 4604 5184
+3 4604 2852 5184
+3 203 5185 2856
+3 1329 5186 5185
+3 746 2856 5186
+3 2856 5185 5186
+3 311 4609 5188
+3 1183 5187 4609
+3 1329 5188 5187
+3 5188 4609 5187
+3 1183 5184 5187
+3 746 5186 5184
+3 1329 5187 5186
+3 5187 5184 5186
+3 59 5189 2868
+3 1330 5190 5189
+3 750 2868 5190
+3 2868 5189 5190
+3 348 5191 5193
+3 1331 5192 5191
+3 1330 5193 5192
+3 5193 5191 5192
+3 203 2873 5195
+3 750 5194 2873
+3 1331 5195 5194
+3 5195 2873 5194
+3 750 5190 5194
+3 1330 5192 5190
+3 1331 5194 5192
+3 5194 5190 5192
+3 85 4615 5197
+3 1188 5196 4615
+3 1333 5197 5196
+3 5197 4615 5196
+3 311 5198 4619
+3 1332 5199 5198
+3 1188 4619 5199
+3 4619 5198 5199
+3 348 5200 5202
+3 1333 5201 5200
+3 1332 5202 5201
+3 5202 5200 5201
+3 1333 5196 5201
+3 1188 5199 5196
+3 1332 5201 5199
+3 5201 5196 5199
+3 311 5188 5198
+3 1329 5203 5188
+3 1332 5198 5203
+3 5198 5188 5203
+3 203 5195 5185
+3 1331 5204 5195
+3 1329 5185 5204
+3 5185 5195 5204
+3 348 5202 5191
+3 1332 5205 5202
+3 1331 5191 5205
+3 5191 5202 5205
+3 1332 5203 5205
+3 1329 5204 5203
+3 1331 5205 5204
+3 5205 5203 5204
+3 18 5071 2910
+3 1303 5206 5071
+3 762 2910 5206
+3 2910 5071 5206
+3 343 5207 5074
+3 1334 5208 5207
+3 1303 5074 5208
+3 5074 5207 5208
+3 207 2915 5210
+3 762 5209 2915
+3 1334 5210 5209
+3 5210 2915 5209
+3 762 5206 5209
+3 1303 5208 5206
+3 1334 5209 5208
+3 5209 5206 5208
+3 93 5211 5084
+3 1335 5212 5211
+3 1306 5084 5212
+3 5084 5211 5212
+3 349 5213 5215
+3 1336 5214 5213
+3 1335 5215 5214
+3 5215 5213 5214
+3 343 5089 5217
+3 1306 5216 5089
+3 1336 5217 5216
+3 5217 5089 5216
+3 1306 5212 5216
+3 1335 5214 5212
+3 1336 5216 5214
+3 5216 5212 5214
+3 59 2921 5219
+3 767 5218 2921
+3 1338 5219 5218
+3 5219 2921 5218
+3 207 5220 2925
+3 1337 5221 5220
+3 767 2925 5221
+3 2925 5220 5221
+3 349 5222 5224
+3 1338 5223 5222
+3 1337 5224 5223
+3 5224 5222 5223
+3 1338 5218 5223
+3 767 5221 5218
+3 1337 5223 5221
+3 5223 5218 5221
+3 207 5210 5220
+3 1334 5225 5210
+3 1337 5220 5225
+3 5220 5210 5225
+3 343 5217 5207
+3 1336 5226 5217
+3 1334 5207 5226
+3 5207 5217 5226
+3 349 5224 5213
+3 1337 5227 5224
+3 1336 5213 5227
+3 5213 5224 5227
+3 1337 5225 5227
+3 1334 5226 5225
+3 1336 5227 5226
+3 5227 5225 5226
+3 93 5175 5211
+3 1328 5228 5175
+3 1335 5211 5228
+3 5211 5175 5228
+3 347 5229 5178
+3 1339 5230 5229
+3 1328 5178 5230
+3 5178 5229 5230
+3 349 5215 5232
+3 1335 5231 5215
+3 1339 5232 5231
+3 5232 5215 5231
+3 1335 5228 5231
+3 1328 5230 5228
+3 1339 5231 5230
+3 5231 5228 5230
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/pig.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/pig.off
new file mode 100644
index 0000000..a6cd4ef
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/pig.off
@@ -0,0 +1,1361 @@
+OFF
+468 891 0
+0.063974 0.101970 -0.415827
+0.028523 0.114259 -0.442328
+0.063412 0.118087 -0.415381
+0.077614 0.162174 -0.435627
+0.128990 0.122892 -0.393541
+0.122864 -0.147913 0.401369
+0.178320 -0.063881 0.376630
+0.131227 -0.089511 0.441084
+0.164639 -0.008344 0.415245
+0.103820 -0.043044 -0.278399
+0.091834 -0.084101 -0.204746
+0.079859 -0.055424 -0.310790
+0.118637 -0.026027 -0.235186
+0.099707 0.153598 0.166104
+0.094930 0.196480 0.152483
+0.115864 0.191688 0.136248
+0.171734 0.181103 0.136002
+0.193585 0.183376 0.154622
+0.164526 0.109059 0.214381
+-0.153221 0.150924 -0.394866
+-0.081493 0.167834 -0.436769
+-0.072517 0.124239 -0.414300
+-0.161186 0.176848 -0.378966
+-0.176790 0.132941 -0.334836
+-0.171249 0.164538 -0.303896
+-0.080475 0.201851 -0.109296
+-0.071494 0.183497 -0.140195
+-0.097522 0.199020 -0.144832
+-0.056652 0.190914 -0.054368
+-0.039241 0.197263 -0.153247
+-0.141604 0.199711 -0.154047
+-0.129425 0.157767 -0.137661
+-0.165583 0.197728 -0.148208
+-0.190944 0.201695 -0.114791
+-0.184883 0.199199 -0.132786
+-0.178540 0.131594 -0.070966
+-0.153766 0.018107 -0.272151
+-0.130012 -0.023104 -0.280793
+-0.113295 -0.035252 -0.248969
+-0.199246 0.193683 0.195561
+-0.180750 0.123251 0.255085
+-0.181651 0.208804 0.233547
+-0.193764 0.183287 0.154611
+-0.183901 0.083655 0.279856
+-0.171726 0.068282 0.231479
+0.149160 0.094349 0.371830
+0.173037 0.085349 0.334114
+0.168678 0.151411 0.318997
+-0.168351 0.090355 0.342446
+-0.191982 0.004460 0.346603
+0.010306 -0.068937 0.495666
+-0.054048 -0.045698 0.495964
+-0.036648 -0.113382 0.498431
+0.049415 -0.137244 0.485860
+-0.135590 0.204770 -0.026654
+-0.164959 0.204458 -0.052698
+-0.119997 0.140111 0.025175
+0.172825 0.080263 -0.317843
+0.160628 0.062369 -0.340044
+0.177177 0.143953 -0.350070
+0.118606 0.021487 -0.375861
+0.165354 0.008939 -0.353730
+0.237839 0.022829 -0.306004
+0.212030 0.037710 -0.318516
+0.235958 0.004327 -0.346347
+0.269290 -0.012961 -0.323921
+0.177418 -0.011732 -0.301843
+0.134912 0.006718 -0.402388
+0.237840 -0.015554 -0.414292
+0.177088 -0.010878 -0.417488
+0.234583 -0.001111 -0.396570
+0.165512 -0.038754 -0.394103
+0.274848 -0.015963 -0.391667
+0.284810 -0.026997 -0.376984
+0.281300 -0.029101 -0.338206
+0.217331 -0.034592 -0.352687
+0.196409 -0.028130 -0.326693
+0.146613 0.129225 0.183979
+0.125633 0.114296 0.184366
+0.168417 0.063049 0.228672
+0.131279 0.094069 0.157481
+0.093427 0.144615 0.148946
+0.151538 0.030944 0.165340
+0.040532 0.197143 -0.154026
+0.056681 0.209038 -0.212225
+0.002775 0.206856 -0.166610
+0.117369 0.153354 -0.205966
+0.124488 0.200090 -0.152498
+0.086066 0.183902 -0.142107
+0.091309 0.198441 -0.138090
+0.064272 0.187025 -0.133132
+0.080301 0.201940 -0.109295
+0.087605 0.207177 -0.050256
+0.071100 0.186484 -0.043141
+0.144787 0.163143 -0.404482
+0.163037 0.176611 -0.376916
+0.093064 0.199241 -0.432443
+0.133133 0.208266 -0.382604
+0.143249 0.191538 -0.272444
+0.158095 0.192739 -0.314330
+-0.139488 0.186720 -0.261262
+-0.151500 0.199626 -0.324260
+-0.098372 0.223627 -0.288685
+-0.078536 0.189639 -0.197355
+-0.039805 0.227673 -0.260155
+0.097127 0.229527 -0.341482
+0.062369 0.228756 -0.395152
+0.036595 0.231173 -0.450000
+-0.028016 0.125004 -0.448876
+-0.036461 0.096667 -0.434533
+-0.083077 0.090894 -0.414311
+-0.082268 0.070800 -0.428081
+-0.123341 -0.003528 -0.217671
+-0.111649 -0.041351 -0.203434
+-0.143481 0.129458 -0.120457
+-0.166571 0.125111 -0.100292
+-0.091445 0.155603 -0.139780
+-0.108949 0.126603 -0.132705
+-0.155764 -0.002392 -0.117269
+-0.109909 -0.047484 -0.302472
+-0.091801 -0.053960 -0.282808
+-0.111273 -0.076464 -0.152548
+-0.089774 -0.101654 -0.175408
+-0.131191 -0.018764 -0.145092
+-0.117239 -0.118603 -0.106400
+-0.186719 -0.019496 0.218873
+0.094316 -0.206017 0.232131
+0.055117 -0.224837 0.203521
+0.079552 -0.189464 0.070678
+0.040403 -0.204104 0.063479
+0.071493 -0.170167 -0.083686
+-0.180726 -0.068980 0.362373
+-0.182633 -0.099623 0.308202
+-0.158938 -0.138266 0.334999
+0.085658 0.200413 0.176418
+0.065852 0.170004 0.177725
+-0.001292 0.195544 -0.033434
+-0.285400 -0.031989 -0.344981
+-0.271603 -0.015198 -0.325428
+-0.278372 -0.020235 -0.389284
+-0.206668 0.006555 -0.349794
+-0.225044 -0.007684 -0.420462
+-0.238803 0.004342 -0.347955
+-0.158634 0.013703 -0.350809
+-0.228727 0.004252 -0.318223
+-0.223154 0.035457 -0.308571
+-0.193549 0.057123 -0.317739
+-0.210450 -0.029622 -0.405169
+0.172645 -0.045708 -0.037575
+0.158143 -0.075581 -0.062747
+0.161129 -0.053779 -0.087832
+0.151586 -0.077141 0.017952
+0.172046 0.216581 0.250518
+0.160045 0.220693 0.263343
+0.199056 0.193772 0.195561
+0.181331 0.122923 0.257005
+0.183238 0.081029 0.279971
+0.186394 0.009376 0.360522
+0.200356 -0.009475 0.302375
+0.186432 0.204012 -0.088367
+0.166519 0.185025 -0.035652
+0.178625 0.148640 -0.039831
+0.162273 -0.038823 0.020282
+0.164324 0.000657 0.028308
+0.191989 -0.031903 0.230015
+0.188950 -0.072032 0.237843
+0.159438 -0.018081 0.152399
+0.179961 -0.012368 0.206350
+0.154184 -0.071463 0.150146
+0.157446 -0.054932 0.128257
+0.146606 -0.094660 0.103787
+-0.085574 0.204703 0.235486
+-0.100152 0.207801 0.255866
+-0.059913 0.174502 0.263217
+-0.177675 0.138122 0.302573
+-0.166640 0.138235 0.331535
+-0.160235 0.220604 0.263332
+0.065130 0.176233 0.262848
+0.085351 0.204781 0.235497
+0.062759 0.177657 0.222293
+0.099947 0.207890 0.255911
+0.029319 0.167713 0.235458
+-0.007308 0.176521 0.212726
+0.018184 0.155832 0.282328
+0.016196 0.134242 0.331153
+-0.115478 0.114685 0.373666
+-0.138087 0.098705 0.375545
+-0.107498 0.047438 0.447839
+-0.136533 0.029923 0.438192
+-0.151444 0.150957 0.333934
+-0.128669 0.172997 0.320075
+-0.141960 0.217696 0.269060
+-0.070700 0.154566 0.313918
+-0.089073 0.135316 0.352129
+0.113012 -0.180473 0.171463
+0.103166 -0.168475 0.072737
+0.137034 -0.171125 0.287599
+0.153718 -0.147893 0.232349
+0.149223 0.117836 -0.382727
+0.122958 0.086674 -0.404777
+0.070966 0.060503 -0.432879
+0.046513 0.085855 -0.431266
+0.092912 0.013673 -0.404533
+0.090952 -0.016720 -0.385023
+0.077405 -0.042537 -0.356280
+0.058093 -0.059147 -0.335116
+0.068427 -0.123215 -0.187213
+0.101335 -0.132006 -0.117248
+0.097814 -0.149292 -0.079001
+0.122020 -0.125228 -0.016951
+0.126097 -0.138388 0.097790
+0.126318 -0.145156 0.141802
+0.174282 -0.112276 0.330051
+0.190029 -0.084340 0.294626
+0.058942 -0.222818 0.301995
+0.098418 -0.193164 0.340401
+0.058809 -0.206985 0.375651
+0.021923 -0.222862 0.367343
+0.014505 -0.238117 0.299646
+0.122283 0.121443 0.075831
+0.113763 0.148142 0.020311
+0.140282 0.123337 0.018261
+0.027980 -0.177863 -0.119253
+0.026130 -0.193179 -0.070708
+-0.001321 -0.211350 0.079165
+-0.001523 -0.197311 -0.066313
+0.166925 0.094073 -0.266778
+0.163733 0.142170 -0.259072
+0.127467 0.088406 -0.181953
+0.150376 0.077937 0.039615
+0.190766 0.201784 -0.114791
+0.178517 0.136767 -0.071037
+0.184704 0.199288 -0.132775
+0.166379 0.133552 -0.102642
+0.165222 0.047122 -0.102044
+0.078264 0.226830 -0.278641
+0.019112 0.233265 -0.274429
+-0.039110 -0.233486 0.287357
+-0.021609 -0.223013 0.367699
+0.001943 -0.188166 0.439819
+-0.066652 -0.213379 0.338708
+0.027726 -0.233930 0.210941
+-0.000203 -0.237188 0.219039
+-0.136376 -0.172085 0.288837
+-0.099814 -0.201744 0.258297
+-0.027582 -0.234160 0.217991
+-0.060662 -0.218919 0.186226
+-0.055734 -0.201562 0.080354
+-0.029186 -0.209148 0.081362
+-0.029001 -0.192501 -0.071644
+-0.160342 0.063827 0.024713
+-0.177523 0.015890 -0.001911
+-0.162105 0.020607 0.040724
+-0.180080 0.125890 -0.032858
+-0.185297 0.023823 -0.038772
+-0.175803 -0.030161 -0.021666
+-0.149501 -0.083919 0.026313
+-0.160461 -0.041091 0.033786
+-0.156993 -0.049877 0.148952
+-0.179046 0.029177 -0.073993
+-0.177954 -0.024883 -0.058372
+-0.151976 0.126423 -0.229667
+-0.163106 0.092405 -0.253555
+-0.121432 0.099265 -0.173188
+-0.111794 0.137703 -0.178117
+-0.166077 0.091402 -0.340017
+-0.161312 0.070001 -0.345025
+-0.167665 0.059706 -0.282855
+-0.171035 0.078014 -0.296062
+-0.126978 0.030384 -0.171087
+-0.129126 0.050437 -0.192177
+-0.131368 0.059086 -0.126361
+-0.134950 0.025663 -0.131342
+-0.143437 -0.069595 -0.109286
+-0.148269 -0.039929 -0.120515
+-0.163978 -0.065334 -0.065543
+-0.167235 -0.061629 -0.042774
+0.002745 0.189510 0.110554
+0.036689 0.188942 0.019665
+-0.036527 0.174422 0.177147
+-0.087796 0.207088 -0.050265
+-0.076524 0.172540 0.006138
+-0.087508 0.177933 -0.017043
+-0.108099 0.206330 -0.029115
+-0.072629 0.172458 0.181190
+-0.090040 0.162292 0.168261
+-0.089665 0.198396 0.161152
+-0.063826 0.178856 0.211964
+-0.149794 0.182785 0.130788
+-0.116064 0.191599 0.136236
+-0.150418 0.160583 0.151346
+-0.171912 0.181013 0.135924
+-0.138972 0.123679 0.183787
+-0.105455 0.169777 0.154956
+-0.106937 0.141313 0.167043
+-0.064997 0.162208 0.148704
+-0.089200 0.146757 0.141467
+-0.116460 0.121274 0.141967
+0.130312 0.041995 0.435860
+0.129704 -0.002210 0.453987
+0.119563 0.095019 0.389830
+0.106258 -0.067817 0.474757
+0.072458 -0.092968 0.490348
+0.035744 -0.100524 0.501598
+0.090915 -0.018706 0.481902
+0.063954 -0.018620 0.488394
+0.012687 0.019863 0.473158
+-0.066639 0.014188 0.477250
+-0.001853 -0.014358 0.486138
+-0.073991 0.051995 0.453618
+0.015992 0.056915 0.445325
+-0.072272 0.083609 0.419400
+0.125713 0.148591 0.340006
+0.151075 0.147959 0.335541
+0.120626 0.212102 0.266920
+0.069491 0.149561 0.322080
+0.091434 0.136280 0.349720
+0.076196 0.038920 0.461948
+0.080702 0.078897 0.423801
+0.006477 0.083890 0.414722
+0.003928 0.102802 0.385224
+-0.068084 0.039517 -0.430070
+-0.017676 0.023776 -0.427482
+0.193970 0.042648 -0.293997
+0.172856 0.064667 -0.285834
+0.158578 0.030796 -0.272331
+0.140866 -0.005417 -0.270488
+0.134432 0.029296 -0.214306
+0.126251 0.015555 -0.188439
+0.132124 0.003792 -0.136979
+0.125810 -0.029504 -0.153529
+0.129423 0.061526 -0.128092
+0.108063 0.127431 -0.132395
+0.091794 0.155522 -0.139751
+0.124048 0.145248 -0.131126
+0.184444 0.016147 -0.030529
+0.181489 -0.003989 -0.053023
+0.141425 0.199800 -0.154047
+0.165405 0.197817 -0.148141
+0.144876 0.183940 -0.146208
+0.154368 0.144703 -0.122262
+0.146068 0.119123 -0.117735
+0.154841 -0.033503 -0.111889
+0.143738 -0.032315 -0.128787
+0.113871 -0.078221 -0.157136
+0.112005 -0.054404 -0.183556
+0.010090 -0.146944 0.487883
+0.011570 -0.146473 0.485554
+0.010090 -0.136782 0.493756
+-0.015165 -0.128494 0.494118
+-0.010143 -0.136180 0.492642
+-0.030104 -0.153530 0.480762
+-0.010143 -0.146454 0.487048
+-0.006480 -0.157970 0.476349
+0.045456 -0.167686 0.453108
+0.029848 -0.154023 0.480267
+0.030579 -0.132753 -0.220866
+0.021176 -0.090002 -0.310105
+0.181147 0.115479 -0.036001
+0.175183 0.070269 -0.003253
+0.161619 0.042238 0.028286
+0.156945 0.037056 0.086395
+0.051155 0.182427 -0.491632
+0.031566 0.180896 -0.501667
+0.002176 0.193366 -0.489790
+-0.037122 0.180476 -0.500027
+-0.025020 0.194670 -0.492815
+0.055556 0.214167 -0.473439
+0.066526 0.214610 -0.467774
+-0.082413 0.208049 -0.429210
+-0.065055 0.215687 -0.469354
+-0.062206 0.204472 -0.479930
+-0.036973 0.231911 -0.450571
+-0.036983 0.226530 -0.458574
+-0.125722 0.187261 -0.415111
+-0.091376 0.197028 -0.433439
+-0.109535 0.220672 -0.374442
+-0.132871 0.206436 -0.383456
+-0.068993 0.234380 -0.324450
+-0.054731 0.231939 -0.379365
+-0.015007 0.238836 -0.387236
+0.010198 0.238083 -0.347126
+-0.171832 0.010661 0.394832
+-0.164229 -0.033313 0.411342
+-0.071226 -0.093884 0.490608
+-0.099723 -0.021444 0.479401
+-0.106460 -0.079934 0.470702
+-0.126287 -0.023902 0.459235
+-0.151985 -0.067142 0.420950
+-0.147699 -0.107939 0.402674
+-0.109438 -0.119557 0.446423
+-0.020037 -0.195034 0.426407
+-0.045003 -0.203863 0.398142
+-0.079909 -0.190588 0.383979
+-0.073176 -0.153947 0.447608
+-0.060832 -0.134709 0.479062
+-0.132591 -0.160951 0.350157
+-0.119567 -0.148332 0.402715
+-0.065793 -0.128601 -0.175205
+-0.097272 -0.145676 -0.099799
+-0.002565 -0.181714 -0.122217
+-0.024515 -0.179484 -0.119506
+-0.064586 -0.176266 -0.074826
+-0.059683 -0.167369 -0.114486
+-0.099658 -0.163716 0.022325
+-0.040368 -0.148020 -0.173886
+-0.152092 0.033745 0.173508
+-0.159192 -0.012910 0.157435
+-0.186610 0.203923 -0.088370
+-0.183267 0.184340 -0.063974
+-0.136575 0.103373 0.069442
+-0.143137 0.116556 0.022602
+-0.200449 -0.005081 0.293234
+-0.198541 -0.044298 0.289997
+-0.176233 -0.086749 0.211940
+-0.129605 -0.146690 0.159205
+-0.172832 -0.114168 0.232984
+-0.146311 -0.094428 0.150409
+-0.147372 -0.095199 0.103658
+-0.110455 -0.178169 0.151965
+-0.128236 -0.127687 0.039765
+-0.128792 -0.120162 -0.025065
+0.064160 0.162938 0.145558
+0.035172 0.172321 0.185202
+-0.006127 0.202885 -0.099910
+-0.034296 0.191647 -0.029673
+-0.131196 0.116627 -0.390365
+-0.142598 0.108734 -0.385698
+-0.118388 0.084666 -0.406795
+-0.122705 0.099621 -0.397329
+-0.118280 0.017285 -0.383763
+-0.138200 0.021970 -0.357392
+-0.083219 -0.042897 -0.356408
+-0.171574 -0.015949 -0.418570
+-0.079870 -0.020831 -0.382774
+-0.146033 -0.002291 -0.413268
+-0.099733 0.026973 -0.404345
+-0.098251 0.013991 -0.401317
+0.044369 -0.016396 -0.405838
+0.042389 0.006708 -0.423304
+-0.042891 -0.004873 -0.416215
+-0.012107 -0.020909 -0.408756
+-0.205436 -0.024781 -0.328409
+-0.223220 -0.034022 -0.353666
+-0.149992 -0.036689 -0.391942
+-0.164885 -0.044415 -0.367829
+-0.091425 -0.051851 -0.329759
+-0.067188 -0.061962 -0.316028
+0.032718 -0.045780 -0.374356
+0.001142 -0.045018 -0.382344
+-0.008169 -0.088329 -0.317598
+-0.061474 -0.052657 -0.346404
+-0.036931 -0.052082 -0.363104
+-0.163689 -0.139768 0.263934
+-0.134461 -0.171429 0.220297
+-0.093110 -0.202067 0.185697
+-0.083335 -0.193614 0.109481
+-0.161181 0.096630 0.214117
+-0.169578 0.129140 0.197122
+-0.136316 0.091909 0.186973
+-0.137551 0.081713 0.154719
+0.129236 0.172656 -0.007278
+0.135409 0.204859 -0.026639
+0.107912 0.206419 -0.029102
+0.080873 0.173368 -0.015229
+0.100091 0.179921 -0.016858
+-0.000035 -0.119696 -0.260509
+-0.020383 -0.117167 -0.258779
+3 0 1 2
+3 2 3 4
+3 1 3 2
+3 5 6 7
+3 6 8 7
+3 9 10 11
+3 9 12 10
+3 13 14 15
+3 15 16 13
+3 17 18 16
+3 19 20 21
+3 22 23 24
+3 23 22 19
+3 25 26 27
+3 28 29 26
+3 30 31 32
+3 27 26 30
+3 30 26 31
+3 33 34 35
+3 36 37 38
+3 39 40 41
+3 42 40 39
+3 43 40 44
+3 45 46 47
+3 48 43 49
+3 50 51 52
+3 5 7 53
+3 54 55 56
+3 57 58 59
+3 60 58 61
+3 62 63 57
+3 63 64 61
+3 63 61 58
+3 63 58 57
+3 65 64 63
+3 65 63 62
+3 66 65 62
+3 61 67 60
+3 68 69 70
+3 71 69 68
+3 69 67 70
+3 70 67 61
+3 61 64 70
+3 72 73 68
+3 72 68 70
+3 72 70 64
+3 72 65 73
+3 72 64 65
+3 73 65 74
+3 68 73 71
+3 75 74 76
+3 74 65 76
+3 76 65 66
+3 76 66 9
+3 75 76 11
+3 76 9 11
+3 75 11 71
+3 71 73 75
+3 73 74 75
+3 77 16 18
+3 78 77 18
+3 78 18 79
+3 78 80 81
+3 78 13 77
+3 16 77 13
+3 13 78 81
+3 78 82 80
+3 82 78 79
+3 83 84 85
+3 83 86 84
+3 85 29 28
+3 87 88 89
+3 89 88 90
+3 91 89 90
+3 92 91 93
+3 90 93 91
+3 94 95 59
+3 95 94 96
+3 95 96 97
+3 3 96 94
+3 86 98 84
+3 59 95 99
+3 99 95 97
+3 100 101 24
+3 101 22 24
+3 101 100 102
+3 103 102 100
+3 102 103 104
+3 103 29 104
+3 104 29 85
+3 99 105 98
+3 105 97 106
+3 99 97 105
+3 96 106 97
+3 106 96 107
+3 21 108 109
+3 21 20 108
+3 110 21 109
+3 110 109 111
+3 112 38 113
+3 112 36 38
+3 114 115 32
+3 114 32 31
+3 115 35 34
+3 34 32 115
+3 116 117 114
+3 116 114 31
+3 31 26 116
+3 29 116 26
+3 116 29 103
+3 114 118 115
+3 117 118 114
+3 119 120 37
+3 38 37 120
+3 121 113 122
+3 38 122 113
+3 38 120 122
+3 123 113 121
+3 122 124 121
+3 44 125 43
+3 126 127 128
+3 128 129 130
+3 129 128 127
+3 131 132 133
+3 134 14 135
+3 135 14 13
+3 13 81 135
+3 136 90 83
+3 137 138 139
+3 140 141 142
+3 139 142 141
+3 139 138 142
+3 140 143 141
+3 144 36 145
+3 138 144 145
+3 143 145 146
+3 143 140 145
+3 140 142 145
+3 138 145 142
+3 36 144 37
+3 147 137 139
+3 141 147 139
+3 148 149 150
+3 151 149 148
+3 152 153 47
+3 154 152 47
+3 47 46 154
+3 18 155 156
+3 79 18 156
+3 18 17 155
+3 154 155 17
+3 156 155 46
+3 154 46 155
+3 157 6 158
+3 156 157 158
+3 46 157 156
+3 157 46 45
+3 157 45 8
+3 8 6 157
+3 159 160 161
+3 162 148 163
+3 151 148 162
+3 164 156 158
+3 164 158 165
+3 166 82 167
+3 167 79 164
+3 79 156 164
+3 82 79 167
+3 168 169 166
+3 168 170 169
+3 167 168 166
+3 164 168 167
+3 164 165 168
+3 170 151 169
+3 162 169 151
+3 163 169 162
+3 163 166 169
+3 171 172 173
+3 41 174 175
+3 40 174 41
+3 40 43 174
+3 175 174 48
+3 48 174 43
+3 41 175 176
+3 177 178 179
+3 177 180 178
+3 134 179 178
+3 134 135 179
+3 181 182 183
+3 179 181 183
+3 183 182 173
+3 183 184 177
+3 177 179 183
+3 179 135 181
+3 185 186 187
+3 48 186 175
+3 188 186 48
+3 188 187 186
+3 176 189 190
+3 190 189 185
+3 176 175 189
+3 189 175 186
+3 186 185 189
+3 191 176 190
+3 192 193 184
+3 192 184 183
+3 173 192 183
+3 192 173 172
+3 193 192 191
+3 192 172 191
+3 191 190 193
+3 190 185 193
+3 194 128 195
+3 128 130 195
+3 196 194 197
+3 196 126 194
+3 126 128 194
+3 198 199 0
+3 4 198 0
+3 198 4 3
+3 198 3 94
+3 94 59 198
+3 58 198 59
+3 198 58 199
+3 60 199 58
+3 200 201 199
+3 109 108 201
+3 201 108 1
+3 201 1 0
+3 199 201 0
+3 202 67 203
+3 199 202 200
+3 202 199 60
+3 67 202 60
+3 67 69 203
+3 71 203 69
+3 203 204 202
+3 71 204 203
+3 205 204 11
+3 11 10 205
+3 204 71 11
+3 130 206 207
+3 10 207 206
+3 206 205 10
+3 207 150 149
+3 195 208 209
+3 151 170 209
+3 195 130 208
+3 208 130 207
+3 149 209 208
+3 149 151 209
+3 208 207 149
+3 209 210 195
+3 170 210 209
+3 210 168 211
+3 210 170 168
+3 168 165 211
+3 197 211 165
+3 195 210 211
+3 194 211 197
+3 194 195 211
+3 212 197 213
+3 213 197 165
+3 213 165 158
+3 213 6 212
+3 213 158 6
+3 5 212 6
+3 5 196 212
+3 212 196 197
+3 214 215 216
+3 215 126 196
+3 5 215 196
+3 5 216 215
+3 216 217 214
+3 218 214 217
+3 214 218 127
+3 215 214 126
+3 127 126 214
+3 219 220 81
+3 80 219 81
+3 220 219 221
+3 221 161 160
+3 222 130 223
+3 223 130 129
+3 129 224 223
+3 223 225 222
+3 225 223 224
+3 226 227 228
+3 226 59 227
+3 226 57 59
+3 59 99 227
+3 227 99 98
+3 227 98 86
+3 228 227 86
+3 161 221 229
+3 221 219 229
+3 229 219 80
+3 161 230 159
+3 230 161 231
+3 232 230 233
+3 233 231 234
+3 230 231 233
+3 235 105 236
+3 98 105 235
+3 104 85 236
+3 235 236 84
+3 235 84 98
+3 84 236 85
+3 237 218 238
+3 217 238 218
+3 217 239 238
+3 237 238 240
+3 224 241 242
+3 129 241 224
+3 127 241 129
+3 242 241 218
+3 241 127 218
+3 218 237 242
+3 240 243 244
+3 240 244 237
+3 242 245 224
+3 246 245 237
+3 237 244 246
+3 245 242 237
+3 247 248 246
+3 248 247 249
+3 248 249 225
+3 224 248 225
+3 245 248 224
+3 245 246 248
+3 250 251 252
+3 253 251 250
+3 251 254 255
+3 254 251 253
+3 253 35 254
+3 256 257 255
+3 257 258 252
+3 252 251 257
+3 255 257 251
+3 259 118 260
+3 35 259 254
+3 35 115 259
+3 118 259 115
+3 254 259 260
+3 260 255 254
+3 261 24 262
+3 261 100 24
+3 24 23 262
+3 263 264 261
+3 264 263 117
+3 117 116 264
+3 116 103 264
+3 264 103 100
+3 261 264 100
+3 265 266 146
+3 23 19 265
+3 267 268 146
+3 267 262 268
+3 268 262 23
+3 268 23 265
+3 146 268 265
+3 145 267 146
+3 145 36 267
+3 267 36 112
+3 269 263 270
+3 270 112 269
+3 270 263 261
+3 270 261 262
+3 267 270 262
+3 270 267 112
+3 112 113 269
+3 123 269 113
+3 271 272 118
+3 123 272 269
+3 117 271 118
+3 272 271 263
+3 272 263 269
+3 263 271 117
+3 121 273 274
+3 124 273 121
+3 274 260 118
+3 272 274 118
+3 272 123 274
+3 274 123 121
+3 275 276 260
+3 276 256 255
+3 276 255 260
+3 275 260 274
+3 275 274 273
+3 275 273 124
+3 136 277 278
+3 277 136 279
+3 277 279 182
+3 93 90 278
+3 278 90 136
+3 28 26 280
+3 25 280 26
+3 281 282 56
+3 281 28 282
+3 280 282 28
+3 283 282 280
+3 283 54 282
+3 56 282 54
+3 284 285 286
+3 284 286 287
+3 171 287 286
+3 171 173 287
+3 182 287 173
+3 279 284 287
+3 279 287 182
+3 288 289 290
+3 288 290 291
+3 290 292 291
+3 293 294 290
+3 292 290 294
+3 289 293 290
+3 289 286 293
+3 293 285 294
+3 286 285 293
+3 295 281 296
+3 284 279 295
+3 56 296 281
+3 56 297 296
+3 297 294 296
+3 295 296 285
+3 284 295 285
+3 285 296 294
+3 298 299 8
+3 8 45 298
+3 45 300 298
+3 7 8 301
+3 299 301 8
+3 53 301 302
+3 301 53 7
+3 303 53 302
+3 301 304 302
+3 299 304 301
+3 298 304 299
+3 304 305 303
+3 304 303 302
+3 303 305 50
+3 306 307 308
+3 305 306 308
+3 51 308 307
+3 50 308 51
+3 308 50 305
+3 309 307 306
+3 310 309 306
+3 193 185 311
+3 311 187 309
+3 309 187 307
+3 185 187 311
+3 153 312 313
+3 313 47 153
+3 153 314 312
+3 313 312 45
+3 45 47 313
+3 300 45 312
+3 315 180 177
+3 315 177 184
+3 300 312 316
+3 316 314 315
+3 314 180 315
+3 314 316 312
+3 317 318 310
+3 310 306 317
+3 305 317 306
+3 305 304 317
+3 298 317 304
+3 317 298 318
+3 298 300 318
+3 318 300 316
+3 319 320 311
+3 315 184 320
+3 320 184 193
+3 193 311 320
+3 319 311 309
+3 310 319 309
+3 318 319 310
+3 320 319 316
+3 316 315 320
+3 318 316 319
+3 321 111 322
+3 109 322 111
+3 201 322 109
+3 201 200 322
+3 62 323 66
+3 57 324 323
+3 62 57 323
+3 324 57 226
+3 66 325 326
+3 9 326 12
+3 66 326 9
+3 323 325 66
+3 323 324 325
+3 324 226 325
+3 327 228 328
+3 328 12 327
+3 12 326 327
+3 326 325 327
+3 226 327 325
+3 226 228 327
+3 329 330 328
+3 329 328 228
+3 331 329 228
+3 331 228 332
+3 333 332 86
+3 332 228 86
+3 333 86 83
+3 83 90 333
+3 90 88 333
+3 333 88 334
+3 335 148 336
+3 335 163 148
+3 148 150 336
+3 336 231 335
+3 336 234 231
+3 337 338 339
+3 88 339 334
+3 337 339 87
+3 87 339 88
+3 340 341 334
+3 339 340 334
+3 340 339 338
+3 340 338 232
+3 233 340 232
+3 233 341 340
+3 233 234 341
+3 341 332 333
+3 341 333 334
+3 234 336 342
+3 343 342 150
+3 336 150 342
+3 331 343 329
+3 331 332 343
+3 332 341 343
+3 342 343 234
+3 343 330 329
+3 343 341 234
+3 330 344 345
+3 328 345 12
+3 328 330 345
+3 330 343 344
+3 344 343 150
+3 344 150 207
+3 345 344 10
+3 12 345 10
+3 207 10 344
+3 346 347 348
+3 303 347 53
+3 347 303 348
+3 349 350 303
+3 348 303 350
+3 50 349 303
+3 50 52 349
+3 52 351 349
+3 352 349 353
+3 352 350 349
+3 349 351 353
+3 351 239 353
+3 346 352 353
+3 353 347 346
+3 354 53 355
+3 354 355 239
+3 347 355 53
+3 347 353 355
+3 355 353 239
+3 354 239 217
+3 216 354 217
+3 5 354 216
+3 5 53 354
+3 205 356 357
+3 356 205 206
+3 356 206 130
+3 222 356 130
+3 335 231 358
+3 161 358 231
+3 358 161 359
+3 359 161 229
+3 335 358 359
+3 335 359 163
+3 360 361 163
+3 359 360 163
+3 360 229 361
+3 359 229 360
+3 80 361 229
+3 361 80 82
+3 361 82 166
+3 163 361 166
+3 3 362 96
+3 362 1 363
+3 1 362 3
+3 364 363 365
+3 363 1 365
+3 1 108 365
+3 364 365 366
+3 20 365 108
+3 367 107 368
+3 96 368 107
+3 368 96 362
+3 363 367 368
+3 364 367 363
+3 362 363 368
+3 369 370 371
+3 371 366 365
+3 365 20 371
+3 372 373 370
+3 107 373 372
+3 369 372 370
+3 107 367 373
+3 373 367 364
+3 364 366 373
+3 366 371 373
+3 371 370 373
+3 20 374 375
+3 375 369 371
+3 375 371 20
+3 19 374 20
+3 374 19 22
+3 376 369 377
+3 369 375 377
+3 377 101 376
+3 377 375 374
+3 374 22 377
+3 101 377 22
+3 101 102 376
+3 378 379 376
+3 369 379 372
+3 376 379 369
+3 376 102 378
+3 102 104 378
+3 380 378 381
+3 379 380 372
+3 379 378 380
+3 378 104 381
+3 236 381 104
+3 105 381 236
+3 105 106 381
+3 381 107 380
+3 380 107 372
+3 381 106 107
+3 382 383 188
+3 383 382 131
+3 188 48 382
+3 48 49 382
+3 49 131 382
+3 384 52 51
+3 384 51 385
+3 307 385 51
+3 386 385 387
+3 387 385 188
+3 386 384 385
+3 187 385 307
+3 187 188 385
+3 387 188 383
+3 388 131 389
+3 131 133 389
+3 389 390 388
+3 388 390 386
+3 386 387 388
+3 387 383 388
+3 388 383 131
+3 238 391 392
+3 392 393 240
+3 240 238 392
+3 239 391 238
+3 351 392 391
+3 391 239 351
+3 392 394 393
+3 351 395 394
+3 392 351 394
+3 52 395 351
+3 384 395 52
+3 395 384 386
+3 395 390 394
+3 395 386 390
+3 396 393 397
+3 393 394 397
+3 390 397 394
+3 389 397 390
+3 396 397 133
+3 389 133 397
+3 243 396 133
+3 243 240 396
+3 240 393 396
+3 124 398 399
+3 124 122 398
+3 122 120 398
+3 400 356 222
+3 400 222 225
+3 249 401 400
+3 225 249 400
+3 402 399 403
+3 399 402 404
+3 398 403 399
+3 398 405 403
+3 405 401 403
+3 249 402 403
+3 247 402 249
+3 403 401 249
+3 406 252 407
+3 407 252 258
+3 407 258 125
+3 406 407 44
+3 125 44 407
+3 408 33 409
+3 408 409 55
+3 33 35 409
+3 409 35 253
+3 250 410 411
+3 250 252 410
+3 411 410 56
+3 56 410 297
+3 411 56 55
+3 411 55 409
+3 253 411 409
+3 411 253 250
+3 412 125 413
+3 412 413 49
+3 413 132 131
+3 413 131 49
+3 412 49 43
+3 412 43 125
+3 414 415 416
+3 414 125 258
+3 416 413 414
+3 414 413 125
+3 416 132 413
+3 415 417 418
+3 414 417 415
+3 418 417 258
+3 414 258 417
+3 418 258 257
+3 256 418 257
+3 404 419 420
+3 415 420 419
+3 418 420 415
+3 418 256 420
+3 404 420 421
+3 420 256 421
+3 421 256 276
+3 275 421 276
+3 124 421 275
+3 124 399 421
+3 404 421 399
+3 422 135 81
+3 81 220 422
+3 422 278 423
+3 423 278 277
+3 277 182 423
+3 182 181 423
+3 135 422 423
+3 423 181 135
+3 136 424 425
+3 281 295 425
+3 295 279 425
+3 425 279 136
+3 424 136 83
+3 424 83 85
+3 425 424 28
+3 28 281 425
+3 424 85 28
+3 426 19 21
+3 265 427 266
+3 265 19 427
+3 19 426 427
+3 428 266 427
+3 429 428 427
+3 426 429 427
+3 429 110 428
+3 110 111 428
+3 430 143 431
+3 146 431 143
+3 266 431 146
+3 141 143 430
+3 432 433 434
+3 141 435 433
+3 141 430 435
+3 141 433 147
+3 431 436 430
+3 431 266 436
+3 266 428 436
+3 111 436 428
+3 436 111 321
+3 430 436 437
+3 436 321 437
+3 434 433 437
+3 435 437 433
+3 435 430 437
+3 438 439 202
+3 202 204 438
+3 322 200 439
+3 439 200 202
+3 437 440 434
+3 437 321 440
+3 322 440 321
+3 441 440 439
+3 441 439 438
+3 322 439 440
+3 442 144 443
+3 443 119 442
+3 138 443 144
+3 137 443 138
+3 147 443 137
+3 119 37 442
+3 37 144 442
+3 444 432 445
+3 147 444 445
+3 444 147 433
+3 432 444 433
+3 147 445 443
+3 446 447 119
+3 119 443 446
+3 445 446 443
+3 432 446 445
+3 398 447 405
+3 120 447 398
+3 120 119 447
+3 438 448 449
+3 449 448 357
+3 448 438 204
+3 448 204 205
+3 357 448 205
+3 450 449 357
+3 449 441 438
+3 451 405 447
+3 451 447 446
+3 432 451 446
+3 451 434 452
+3 451 432 434
+3 452 434 440
+3 441 452 440
+3 449 452 441
+3 451 452 450
+3 449 450 452
+3 133 453 243
+3 133 132 453
+3 416 454 453
+3 416 453 132
+3 416 415 454
+3 419 454 415
+3 243 453 454
+3 454 244 243
+3 455 456 247
+3 246 455 247
+3 244 455 246
+3 244 454 455
+3 455 419 456
+3 419 455 454
+3 404 456 419
+3 402 456 404
+3 402 247 456
+3 292 457 458
+3 458 457 40
+3 457 44 40
+3 458 40 42
+3 291 458 42
+3 292 458 291
+3 44 457 459
+3 459 457 292
+3 294 459 292
+3 460 406 459
+3 459 297 460
+3 459 406 44
+3 459 294 297
+3 297 410 460
+3 410 252 460
+3 406 460 252
+3 461 160 462
+3 462 463 461
+3 220 221 461
+3 221 160 461
+3 159 462 160
+3 422 464 278
+3 464 220 465
+3 464 422 220
+3 461 465 220
+3 463 465 461
+3 463 92 465
+3 464 465 93
+3 464 93 278
+3 93 465 92
+3 466 357 356
+3 400 466 356
+3 466 400 467
+3 400 401 467
+3 467 401 405
+3 405 451 467
+3 466 467 450
+3 466 450 357
+3 450 467 451
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/tet-shuffled.off b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/tet-shuffled.off
new file mode 100644
index 0000000..9cfb401
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/data/tet-shuffled.off
@@ -0,0 +1,10 @@
+OFF
+4 4 0
+0 0 0
+0 1 0
+1 1 0
+0 0 1
+3 0 1 2
+3 0 1 3
+3 0 2 3
+3 1 2 3
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example.cpp
new file mode 100644
index 0000000..f8b58e7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example.cpp
@@ -0,0 +1,62 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Polyhedron_3<Kernel>     Polyhedron;
+
+typedef Polyhedron::Halfedge_handle    Halfedge_handle;
+typedef Polyhedron::Facet_handle       Facet_handle;
+typedef Polyhedron::Vertex_handle      Vertex_handle;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/mech-holes-shark.off";
+  std::ifstream input(filename);
+
+  Polyhedron poly;
+  if ( !input || !(input >> poly) || poly.empty() ) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  // Incrementally fill the holes
+  unsigned int nb_holes = 0;
+  BOOST_FOREACH(Halfedge_handle h, halfedges(poly))
+  {
+    if(h->is_border())
+    {
+      std::vector<Facet_handle>  patch_facets;
+      std::vector<Vertex_handle> patch_vertices;
+      bool success = CGAL::cpp11::get<0>(
+        CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(
+                  poly,
+                  h,
+                  std::back_inserter(patch_facets),
+                  std::back_inserter(patch_vertices),
+     CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, poly)).
+                  geom_traits(Kernel())) );
+
+      std::cout << " Number of facets in constructed patch: " << patch_facets.size() << std::endl;
+      std::cout << " Number of vertices in constructed patch: " << patch_vertices.size() << std::endl;
+      std::cout << " Fairing : " << (success ? "succeeded" : "failed") << std::endl;
+      ++nb_holes;
+    }
+  }
+
+  std::cout << std::endl;
+  std::cout << nb_holes << " holes have been filled" << std::endl;
+  
+  std::ofstream out("filled.off");
+  out.precision(17);
+  out << poly << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp
new file mode 100644
index 0000000..44a7da3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp
@@ -0,0 +1,63 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+
+#include <CGAL/boost/graph/helpers.h>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
+
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
+typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/mech-holes-shark.off";
+
+
+  Mesh mesh;
+  OpenMesh::IO::read_mesh(mesh, filename);
+
+  // Incrementally fill the holes
+  unsigned int nb_holes = 0;
+  BOOST_FOREACH(halfedge_descriptor h, halfedges(mesh))
+  {
+    if(CGAL::is_border(h,mesh))
+    {
+      std::vector<face_descriptor>  patch_facets;
+      std::vector<vertex_descriptor> patch_vertices;
+      bool success = CGAL::cpp11::get<0>(
+        CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(
+                  mesh,
+                  h,
+                  std::back_inserter(patch_facets),
+                  std::back_inserter(patch_vertices),
+     CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)).
+                  geom_traits(Kernel())) );
+
+      CGAL_assertion(CGAL::is_valid_polygon_mesh(mesh));
+
+      std::cout << "* FILL HOLE NUMBER " << ++nb_holes << std::endl;
+      std::cout << "  Number of facets in constructed patch: " << patch_facets.size() << std::endl;
+      std::cout << "  Number of vertices in constructed patch: " << patch_vertices.size() << std::endl;
+      std::cout << "  Is fairing successful: " << success << std::endl;
+    }
+  }
+
+  CGAL_assertion(CGAL::is_valid_polygon_mesh(mesh));
+  std::cout << std::endl;
+  std::cout << nb_holes << " holes have been filled" << std::endl;
+
+    OpenMesh::IO::write_mesh(mesh, "filled_OM.off");
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp
new file mode 100644
index 0000000..818942d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp
@@ -0,0 +1,62 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef CGAL::Surface_mesh<Point> Mesh;
+
+typedef boost::graph_traits<Mesh>::halfedge_descriptor    halfedge_descriptor;
+typedef boost::graph_traits<Mesh>::face_descriptor       face_descriptor;
+typedef boost::graph_traits<Mesh>::vertex_descriptor      vertex_descriptor;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/mech-holes-shark.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  if ( !input || !(input >> mesh) ) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  // Incrementally fill the holes
+  unsigned int nb_holes = 0;
+  BOOST_FOREACH(halfedge_descriptor h, halfedges(mesh))
+  {
+    if(is_border(h,mesh))
+    {
+      std::vector<face_descriptor>  patch_facets;
+      std::vector<vertex_descriptor> patch_vertices;
+      bool success = CGAL::cpp11::get<0>(
+        CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(
+                  mesh,
+                  h,
+                  std::back_inserter(patch_facets),
+                  std::back_inserter(patch_vertices),
+     CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)).
+                  geom_traits(Kernel())) );
+
+      std::cout << "* Number of facets in constructed patch: " << patch_facets.size() << std::endl;
+      std::cout << "  Number of vertices in constructed patch: " << patch_vertices.size() << std::endl;
+      std::cout << "  Is fairing successful: " << success << std::endl;
+      nb_holes++;
+    }
+  }
+
+  std::cout << std::endl;
+  std::cout << nb_holes << " holes have been filled" << std::endl;
+  
+  std::ofstream out("filled_SM.off");
+  out.precision(17);
+  out << mesh << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp
new file mode 100644
index 0000000..4599be4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp
@@ -0,0 +1,71 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/remesh.h>
+#include <CGAL/Polygon_mesh_processing/border.h>
+
+#include <boost/function_output_iterator.hpp>
+#include <fstream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Surface_mesh<K::Point_3> Mesh;
+
+typedef boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
+typedef boost::graph_traits<Mesh>::edge_descriptor     edge_descriptor;
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+struct halfedge2edge
+{
+  halfedge2edge(const Mesh& m, std::vector<edge_descriptor>& edges)
+    : m_mesh(m), m_edges(edges)
+  {}
+  void operator()(const halfedge_descriptor& h) const
+  {
+    m_edges.push_back(edge(h, m_mesh));
+  }
+  const Mesh& m_mesh;
+  std::vector<edge_descriptor>& m_edges;
+};
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/pig.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  if (!input || !(input >> mesh)) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  double target_edge_length = 0.04;
+  unsigned int nb_iter = 3;
+
+  std::cout << "Split border...";
+
+    std::vector<edge_descriptor> border;
+    PMP::border_halfedges(faces(mesh),
+      mesh,
+      boost::make_function_output_iterator(halfedge2edge(mesh, border)));
+    PMP::split_long_edges(border, target_edge_length, mesh);
+
+  std::cout << "done." << std::endl;
+
+  std::cout << "Start remeshing of " << filename
+    << " (" << num_faces(mesh) << " faces)..." << std::endl;
+
+  PMP::isotropic_remeshing(
+      faces(mesh),
+      target_edge_length,
+      mesh,
+      PMP::parameters::number_of_iterations(nb_iter)
+      .protect_constraints(true)//i.e. protect border, here
+      );
+
+  std::cout << "Remeshing done." << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/mesh_slicer_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/mesh_slicer_example.cpp
new file mode 100644
index 0000000..dfba00f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/mesh_slicer_example.cpp
@@ -0,0 +1,56 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+
+#include <CGAL/Polygon_mesh_slicer.h>
+
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Surface_mesh<K::Point_3> Mesh;
+
+typedef std::vector<K::Point_3> Polyline_type;
+typedef std::list< Polyline_type > Polylines;
+
+typedef CGAL::AABB_halfedge_graph_segment_primitive<Mesh> HGSP;
+typedef CGAL::AABB_traits<K, HGSP>    AABB_traits;
+typedef CGAL::AABB_tree<AABB_traits>  AABB_tree;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/eight.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  if (!input || !(input >> mesh) || mesh.is_empty()) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  // Slicer constructor from the mesh
+  CGAL::Polygon_mesh_slicer<Mesh, K> slicer(mesh); 
+
+  Polylines polylines;
+  slicer(K::Plane_3(0, 0, 1, -0.4), std::back_inserter(polylines));
+  std::cout << "At z = 0.4, the slicer intersects "
+            << polylines.size() << " polylines" << std::endl;
+  polylines.clear();
+
+  slicer(K::Plane_3(0, 0, 1, 0.2), std::back_inserter(polylines));
+  std::cout << "At z = -0.2, the slicer intersects "
+            << polylines.size() << " polylines" << std::endl;
+  polylines.clear();
+
+  // Use the Slicer constructor from a pre-built AABB_tree
+  AABB_tree tree(edges(mesh).first, edges(mesh).second, mesh);
+  CGAL::Polygon_mesh_slicer<Mesh, K> slicer_aabb(mesh, tree);
+  slicer_aabb(K::Plane_3(0, 0, 1, -0.4), std::back_inserter(polylines));
+  std::cout << "At z = 0.4, the slicer intersects "
+            << polylines.size() << " polylines" << std::endl;
+  polylines.clear();
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example.cpp
new file mode 100644
index 0000000..0a91266
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example.cpp
@@ -0,0 +1,73 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/point_generators_3.h>
+
+#include <CGAL/Side_of_triangle_mesh.h>
+
+#include <vector>
+#include <fstream>
+#include <limits>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_3 Point;
+typedef CGAL::Polyhedron_3<K> Polyhedron;
+
+double max_coordinate(const Polyhedron& poly)
+{
+  double max_coord = (std::numeric_limits<double>::min)();
+  BOOST_FOREACH(Polyhedron::Vertex_handle v, vertices(poly))
+  {
+    Point p = v->point();
+    max_coord = (std::max)(max_coord, p.x());
+    max_coord = (std::max)(max_coord, p.y());
+    max_coord = (std::max)(max_coord, p.z());
+  }
+  return max_coord;
+}
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/eight.off";
+  std::ifstream input(filename);
+
+  Polyhedron poly;
+  if (!input || !(input >> poly) || poly.empty())
+  {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  CGAL::Side_of_triangle_mesh<Polyhedron, K> inside(poly);
+
+  double size = max_coordinate(poly);
+
+  unsigned int nb_points = 100;
+  std::vector<Point> points;
+  points.reserve(nb_points);
+  CGAL::Random_points_in_cube_3<Point> gen(size);
+  for (unsigned int i = 0; i < nb_points; ++i)
+    points.push_back(*gen++);
+
+  std::cout << "Test " << nb_points << " random points in cube "
+    << "[-" << size << "; " << size <<"]" << std::endl;
+
+  int nb_inside = 0;
+  int nb_boundary = 0;
+  for (std::size_t i = 0; i < nb_points; ++i)
+  {
+    CGAL::Bounded_side res = inside(points[i]);
+
+    if (res == CGAL::ON_BOUNDED_SIDE) { ++nb_inside; }
+    if (res == CGAL::ON_BOUNDARY) { ++nb_boundary; }
+  }
+
+  std::cerr << "Total query size: " << points.size() << std::endl;
+  std::cerr << "  " << nb_inside << " points inside " << std::endl;
+  std::cerr << "  " << nb_boundary << " points on boundary " << std::endl;
+  std::cerr << "  " << points.size() - nb_inside - nb_boundary << " points outside " << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example_OM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example_OM.cpp
new file mode 100644
index 0000000..14b45fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/point_inside_example_OM.cpp
@@ -0,0 +1,77 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+
+#include <CGAL/point_generators_3.h>
+
+#include <CGAL/Side_of_triangle_mesh.h>
+
+#include <vector>
+#include <fstream>
+#include <limits>
+#include <boost/foreach.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
+typedef K::Point_3 Point;
+
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+
+double max_coordinate(const Mesh& mesh)
+{
+  typedef boost::property_map<Mesh,CGAL::vertex_point_t>::type VPmap;
+  VPmap vpmap = get(CGAL::vertex_point,mesh);
+
+  double max_coord = std::numeric_limits<double>::min();
+  BOOST_FOREACH(vertex_descriptor v, vertices(mesh))
+  {
+    Point p = get(vpmap, v);
+    max_coord = (std::max)(max_coord, p.x());
+    max_coord = (std::max)(max_coord, p.y());
+    max_coord = (std::max)(max_coord, p.z());
+  }
+  return max_coord;
+}
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/eight.off";
+
+  Mesh mesh;
+  OpenMesh::IO::read_mesh(mesh, filename);
+ 
+  CGAL::Side_of_triangle_mesh<Mesh, K> inside(mesh);
+
+  double size = max_coordinate(mesh);
+
+  unsigned int nb_points = 100;
+  std::vector<Point> points;
+  points.reserve(nb_points);
+  CGAL::Random_points_in_cube_3<Point> gen(size);
+  for (unsigned int i = 0; i < nb_points; ++i)
+    points.push_back(*gen++);
+
+  std::cout << "Test " << nb_points << " random points in cube "
+    << "[-" << size << "; " << size <<"]" << std::endl;
+
+  int nb_inside = 0;
+  int nb_boundary = 0;
+  for (std::size_t i = 0; i < nb_points; ++i)
+  {
+    CGAL::Bounded_side res = inside(points[i]);
+
+    if (res == CGAL::ON_BOUNDED_SIDE) { ++nb_inside; }
+    if (res == CGAL::ON_BOUNDARY) { ++nb_boundary; }
+  }
+
+  std::cerr << "Total query size: " << points.size() << std::endl;
+  std::cerr << "  " << nb_inside << " points inside " << std::endl;
+  std::cerr << "  " << nb_boundary << " points on boundary " << std::endl;
+  std::cerr << "  " << points.size() - nb_inside - nb_boundary << " points outside " << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/polygon_soup_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/polygon_soup_example.cpp
new file mode 100644
index 0000000..7a8df47
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/polygon_soup_example.cpp
@@ -0,0 +1,54 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/IO/OFF_reader.h>
+#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/orientation.h>
+
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Polyhedron_3<K> Polyhedron;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/tet-shuffled.off";
+  std::ifstream input(filename);
+
+  if (!input)
+  {
+    std::cerr << "Cannot open file " << std::endl;
+    return 1;
+  }
+
+  std::vector<K::Point_3> points;
+  std::vector< std::vector<std::size_t> > polygons;
+  if (!CGAL::read_OFF(input, points, polygons))
+  {
+    std::cerr << "Error parsing the OFF file " << std::endl;
+    return 1;
+  }
+
+  CGAL::Polygon_mesh_processing::orient_polygon_soup(points, polygons);
+
+  Polyhedron mesh;
+  CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points, polygons, mesh);
+
+  if (CGAL::is_closed(mesh) && (!CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)))
+    CGAL::Polygon_mesh_processing::reverse_face_orientations(mesh);
+
+  std::ofstream out("tet-oriented1.off");
+  out << mesh;
+  out.close();
+
+  CGAL::Polygon_mesh_processing::reverse_face_orientations(mesh);
+  std::ofstream out2("tet-oriented2.off");
+  out2 << mesh;
+  out2.close();
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/refine_fair_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/refine_fair_example.cpp
new file mode 100644
index 0000000..82109c0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/refine_fair_example.cpp
@@ -0,0 +1,83 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Polygon_mesh_processing/refine.h>
+#include <CGAL/Polygon_mesh_processing/fair.h>
+
+#include <fstream>
+#include <map>
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+typedef CGAL::Polyhedron_3<Kernel>  Polyhedron;
+typedef Polyhedron::Vertex_handle   Vertex_handle;
+
+// extract vertices which are at most k (inclusive)
+// far from vertex v in the graph of edges
+void extract_k_ring(Vertex_handle v,
+                    int k,
+                    std::vector<Vertex_handle>& qv)
+{
+  std::map<Vertex_handle, int>  D;
+  qv.push_back(v);
+  D[v] = 0;
+  std::size_t current_index = 0;
+
+  int dist_v;
+  while (current_index < qv.size() && (dist_v = D[qv[current_index]]) < k)
+  {
+    v = qv[current_index++];
+
+    Polyhedron::Halfedge_around_vertex_circulator e(v->vertex_begin()), e_end(e);
+    do {
+      Vertex_handle new_v = e->opposite()->vertex();
+      if (D.insert(std::make_pair(new_v, dist_v + 1)).second) {
+        qv.push_back(new_v);
+      }
+    } while (++e != e_end);
+  }
+}
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/blobby.off";
+  std::ifstream input(filename);
+
+  Polyhedron poly;
+  if ( !input || !(input >> poly) || poly.empty() ) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  std::vector<Polyhedron::Facet_handle>  new_facets;
+  std::vector<Vertex_handle> new_vertices;
+
+  CGAL::Polygon_mesh_processing::refine(poly,
+                  faces(poly),
+                  std::back_inserter(new_facets),
+                  std::back_inserter(new_vertices),
+                  CGAL::Polygon_mesh_processing::parameters::density_control_factor(2.));
+
+  std::ofstream refined_off("refined.off");
+  refined_off << poly;
+  refined_off.close();
+  std::cout << "Refinement added " << new_vertices.size() << " vertices." << std::endl;
+
+  Polyhedron::Vertex_iterator v = poly.vertices_begin();
+  std::advance(v, 82/*e.g.*/);
+  std::vector<Vertex_handle> region;
+  extract_k_ring(v, 12/*e.g.*/, region);
+
+  bool success = CGAL::Polygon_mesh_processing::fair(poly, region);
+  std::cout << "Fairing : " << (success ? "succeeded" : "failed") << std::endl;
+
+  std::ofstream faired_off("faired.off");
+  faired_off << poly;
+  faired_off.close();
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/self_intersections_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/self_intersections_example.cpp
new file mode 100644
index 0000000..f92ea52
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/self_intersections_example.cpp
@@ -0,0 +1,42 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Surface_mesh<K::Point_3>             Mesh;
+typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+
+namespace PMP = CGAL::Polygon_mesh_processing;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/pig.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  if (!input || !(input >> mesh))
+  {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  bool intersecting = PMP::does_self_intersect(mesh,
+      PMP::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)));
+
+  std::cout
+    << (intersecting ? "There are self-intersections." : "There is no self-intersection.")
+    << std::endl;
+
+  std::vector<std::pair<face_descriptor, face_descriptor> > intersected_tris;
+  PMP::self_intersections(mesh,
+    std::back_inserter(intersected_tris),
+    PMP::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)));
+
+  std::cout << intersected_tris.size() << " pairs of triangles intersect." << std::endl;
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example.cpp
new file mode 100644
index 0000000..d03b8eb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example.cpp
@@ -0,0 +1,39 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
+
+#include <iostream>
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Polyhedron_3<K> Polyhedron;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/full_border_quads.off";
+  std::ifstream input(filename);
+
+  Polyhedron mesh;
+  if (!input || !(input >> mesh) || mesh.is_empty()) {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  std::cout << "Before stitching : " << std::endl;
+  std::cout << "\t Number of vertices  :\t" << mesh.size_of_vertices() << std::endl;
+  std::cout << "\t Number of halfedges :\t" << mesh.size_of_halfedges() << std::endl;
+  std::cout << "\t Number of facets    :\t" << mesh.size_of_facets() << std::endl;
+
+  CGAL::Polygon_mesh_processing::stitch_borders(mesh);
+
+  std::cout << "Stitching done : " << std::endl;
+  std::cout << "\t Number of vertices  :\t" << mesh.size_of_vertices() << std::endl;
+  std::cout << "\t Number of halfedges :\t" << mesh.size_of_halfedges() << std::endl;
+  std::cout << "\t Number of facets    :\t" << mesh.size_of_facets() << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example_OM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example_OM.cpp
new file mode 100644
index 0000000..af15ef8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/stitch_borders_example_OM.cpp
@@ -0,0 +1,38 @@
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
+
+#include <iostream>
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+
+typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/full_border_quads.off";
+
+  Mesh mesh;
+  OpenMesh::IO::read_mesh(mesh, filename);
+
+  std::cout << "Before stitching : " << std::endl;
+  std::cout << "\t Number of vertices  :\t" << num_vertices(mesh) << std::endl;
+  std::cout << "\t Number of halfedges :\t" << num_halfedges(mesh) << std::endl;
+  std::cout << "\t Number of facets    :\t" << num_faces(mesh) << std::endl;
+
+  CGAL::Polygon_mesh_processing::stitch_borders(mesh,
+                                                CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)));
+  
+  mesh.garbage_collection();
+  std::cout << "Stitching done : " << std::endl;
+  std::cout << "\t Number of vertices  :\t" << num_vertices(mesh) << std::endl;
+  std::cout << "\t Number of halfedges :\t" << num_halfedges(mesh) << std::endl;
+  std::cout << "\t Number of facets    :\t" << num_faces(mesh) << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example.cpp
new file mode 100644
index 0000000..276e072
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example.cpp
@@ -0,0 +1,40 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
+
+#include <boost/foreach.hpp>
+
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3                    Point;
+typedef CGAL::Surface_mesh<Point>          Surface_mesh;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/P.off";
+  const char* outfilename = (argc > 2) ? argv[2] : "P_tri.off";
+  std::ifstream input(filename);
+
+  Surface_mesh mesh;
+  if (!input || !(input >> mesh) || mesh.is_empty())
+  {
+    std::cerr << "Not a valid off file." << std::endl;
+    return 1;
+  }
+
+  CGAL::Polygon_mesh_processing::triangulate_faces(mesh);
+
+  // Confirm that all faces are triangles.
+  BOOST_FOREACH(boost::graph_traits<Surface_mesh>::face_descriptor fit, faces(mesh))
+    if (next(next(halfedge(fit, mesh), mesh), mesh)
+        !=   prev(halfedge(fit, mesh), mesh))
+      std::cerr << "Error: non-triangular face left in mesh." << std::endl;
+
+  std::ofstream cube_off(outfilename);
+  cube_off << mesh;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp
new file mode 100644
index 0000000..844b983
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp
@@ -0,0 +1,33 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
+
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3                    Point;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
+
+int main(int argc, char* argv[])
+{
+  const char* filename = (argc > 1) ? argv[1] : "data/cube_quad.off";
+  const char* outfilename = (argc > 2) ? argv[2] : "cube_tri.off";
+  std::ifstream input(filename);
+
+  Mesh mesh;
+  OpenMesh::IO::read_mesh(mesh, filename);
+ 
+  CGAL::Polygon_mesh_processing::triangulate_faces(mesh,
+     CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)).
+                                                   geom_traits(Kernel()));
+
+  mesh.garbage_collection();
+  OpenMesh::IO::write_mesh(mesh,outfilename);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_polyline_example.cpp b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_polyline_example.cpp
new file mode 100644
index 0000000..9564cc8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polygon_mesh_processing/triangulate_polyline_example.cpp
@@ -0,0 +1,50 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+#include <CGAL/utility.h>
+
+#include <vector>
+#include <iterator>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+
+int main()
+{
+  std::vector<Point> polyline;
+  polyline.push_back(Point( 1.,0.,0.));
+  polyline.push_back(Point( 0.,1.,0.));
+  polyline.push_back(Point(-1.,0.,0.));
+  polyline.push_back(Point( 1.,1.,0.));
+  // repeating first point (i.e. polyline.push_back(Point(1.,0.,0.)) ) is optional
+
+  // any type, having Type(int, int, int) constructor available, can be used to hold output triangles
+  typedef CGAL::Triple<int, int, int> Triangle_int;
+  std::vector<Triangle_int> patch;
+  patch.reserve(polyline.size() -2); // there will be exactly n-2 triangles in the patch
+
+  CGAL::Polygon_mesh_processing::triangulate_hole_polyline(
+          polyline,
+          std::back_inserter(patch));
+
+  for(std::size_t i = 0; i < patch.size(); ++i)
+  {
+    std::cout << "Triangle " << i << ": "
+      << patch[i].first << " " << patch[i].second << " " << patch[i].third
+      << std::endl;
+  }
+
+  // note that no degenerate triangles are generated in the patch
+  std::vector<Point> polyline_collinear;
+  polyline_collinear.push_back(Point(1.,0.,0.));
+  polyline_collinear.push_back(Point(2.,0.,0.));
+  polyline_collinear.push_back(Point(3.,0.,0.));
+  polyline_collinear.push_back(Point(4.,0.,0.));
+
+  std::vector<Triangle_int> patch_will_be_empty;
+  CGAL::Polygon_mesh_processing::triangulate_hole_polyline(
+          polyline_collinear,
+          back_inserter(patch_will_be_empty));
+  CGAL_assertion(patch_will_be_empty.empty());
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Polyhedron/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polyhedron/CMakeLists.txt
new file mode 100644
index 0000000..4e6a91b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polyhedron/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polyhedron_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "polyhedron_prog_color.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_cube.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_cut_cube.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_incr_builder.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_normals.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_off.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_planes.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_simple.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_subdiv.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_subdiv_with_boundary.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_tetra.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_traits.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_vector.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_vertex_color.cpp" )
+  create_single_source_cgal_program( "polyhedron_prog_vertex_normal.cpp" )
+  create_single_source_cgal_program( "polyhedron_self_intersection.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/corner.off b/3rdparty/CGAL-4.8/examples/Polyhedron/corner.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/corner.off
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/corner.off
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/corner_with_hole.off b/3rdparty/CGAL-4.8/examples/Polyhedron/corner_with_hole.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/corner_with_hole.off
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/corner_with_hole.off
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/corner_with_sharp_edge.off b/3rdparty/CGAL-4.8/examples/Polyhedron/corner_with_sharp_edge.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/corner_with_sharp_edge.off
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/corner_with_sharp_edge.off
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/cross.off b/3rdparty/CGAL-4.8/examples/Polyhedron/cross.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/cross.off
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/cross.off
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_color.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_color.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_color.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_color.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_cube.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_cube.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_cube.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_cube.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_cut_cube.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_cut_cube.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_cut_cube.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_cut_cube.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_incr_builder.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_incr_builder.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_incr_builder.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_incr_builder.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_normals.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_normals.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_normals.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_normals.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_off.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_off.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_off.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_off.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_planes.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_planes.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_planes.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_planes.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_simple.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_simple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_simple.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_simple.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv.cin b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cin b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_tetra.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_tetra.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_tetra.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_tetra.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_traits.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_traits.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vector.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vector.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vector.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vector.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vertex_color.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vertex_color.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vertex_color.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vertex_color.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vertex_normal.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vertex_normal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_prog_vertex_normal.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_prog_vertex_normal.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_self_intersection.cin b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_self_intersection.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_self_intersection.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_self_intersection.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_self_intersection.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_self_intersection.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron/polyhedron_self_intersection.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron/polyhedron_self_intersection.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Polyhedron_IO/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/CMakeLists.txt
new file mode 100644
index 0000000..c05285d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polyhedron_IO_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "iv2off.cpp" )
+  create_single_source_cgal_program( "off2iv.cpp" )
+  create_single_source_cgal_program( "off2off.cpp" )
+  create_single_source_cgal_program( "off2stl.cpp" )
+  create_single_source_cgal_program( "off2vrml.cpp" )
+  create_single_source_cgal_program( "off2wav.cpp" )
+  create_single_source_cgal_program( "off_bbox.cpp" )
+  create_single_source_cgal_program( "off_glue.cpp" )
+  create_single_source_cgal_program( "off_transform.cpp" )
+  create_single_source_cgal_program( "polyhedron2vrml.cpp" )
+  create_single_source_cgal_program( "polyhedron_copy.cpp" )
+  create_single_source_cgal_program( "terr_trian.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/iv2off.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/iv2off.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/iv2off.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/iv2off.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/iv2off.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/iv2off.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/iv2off.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/iv2off.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2iv.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2iv.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2iv.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2iv.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2iv.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2iv.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2iv.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2iv.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2off.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2off.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2off.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2off.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2off.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2off.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2off.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2off.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2stl.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2stl.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2stl.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2stl.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2stl.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2stl.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2stl.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2stl.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2vrml.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2vrml.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2vrml.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2vrml.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2vrml.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2vrml.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2vrml.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2vrml.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2wav.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2wav.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2wav.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2wav.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2wav.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2wav.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off2wav.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off2wav.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_bbox.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_bbox.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_bbox.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_bbox.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_bbox.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_bbox.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_bbox.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_bbox.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_glue.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_glue.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_glue.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_glue.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_glue.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_glue.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_glue.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_glue.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_transform.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_transform.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_transform.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_transform.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_transform.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_transform.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/off_transform.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/off_transform.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron2vrml.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron2vrml.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron2vrml.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron2vrml.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron2vrml.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron2vrml.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron2vrml.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron2vrml.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron_copy.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron_copy.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron_copy.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron_copy.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron_copy.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron_copy.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/polyhedron_copy.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/polyhedron_copy.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/terr_trian.cin b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/terr_trian.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/terr_trian.cin
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/terr_trian.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/terr_trian.cpp b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/terr_trian.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/terr_trian.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/terr_trian.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyhedron_IO/triangulation_print_OFF.h b/3rdparty/CGAL-4.8/examples/Polyhedron_IO/triangulation_print_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyhedron_IO/triangulation_print_OFF.h
rename to 3rdparty/CGAL-4.8/examples/Polyhedron_IO/triangulation_print_OFF.h
diff --git a/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/CMakeLists.txt
new file mode 100644
index 0000000..cf2336d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polyline_simplification_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "points_and_vertices.cpp" )
+  create_single_source_cgal_program( "simplify.cpp" )
+  create_single_source_cgal_program( "simplify_polygon.cpp" )
+  create_single_source_cgal_program( "simplify_polyline.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/points_and_vertices.cin b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/points_and_vertices.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/points_and_vertices.cin
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/points_and_vertices.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/points_and_vertices.cpp b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/points_and_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/points_and_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/points_and_vertices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify.cin b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify.cin
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify.cpp b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polygon.cin b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polygon.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polygon.cin
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polygon.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polygon.cpp b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polygon.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polyline.cin b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polyline.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polyline.cin
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polyline.cin
diff --git a/3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polyline.cpp b/3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polyline.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polyline_simplification_2/simplify_polyline.cpp
rename to 3rdparty/CGAL-4.8/examples/Polyline_simplification_2/simplify_polyline.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Polynomial/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polynomial/CMakeLists.txt
new file mode 100644
index 0000000..c60a4c1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polynomial/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polynomial_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "coefficient_access.cpp" )
+  create_single_source_cgal_program( "construction.cpp" )
+  create_single_source_cgal_program( "degree.cpp" )
+  create_single_source_cgal_program( "gcd_up_to_constant_factor.cpp" )
+  create_single_source_cgal_program( "subresultants.cpp" )
+  create_single_source_cgal_program( "substitute.cpp" )
+  create_single_source_cgal_program( "swap_move.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/coefficient_access.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/coefficient_access.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/coefficient_access.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/coefficient_access.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Polynomial/construction.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/construction.cpp
new file mode 100644
index 0000000..7dc438b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polynomial/construction.cpp
@@ -0,0 +1,49 @@
+#include <CGAL/Polynomial.h>
+#include <CGAL/Polynomial_traits_d.h>
+#include <CGAL/Polynomial_type_generator.h>
+
+int main(){
+  CGAL::set_pretty_mode(std::cout);
+  
+  typedef CGAL::Polynomial_type_generator<int,2>::Type Poly_2;
+  typedef CGAL::Polynomial_traits_d<Poly_2>            PT_2;
+  typedef PT_2::Coefficient_type                       Poly_1;
+  typedef PT_2::Innermost_coefficient_type             Integer; 
+   
+  PT_2::Construct_polynomial construct_polynomial;
+  Poly_2 dc;
+
+
+  // constructing a constant polynomial from int
+  Poly_2 two(2); // = 2 
+  std::cout << "A constant polynomial: " << two << std::endl;
+
+  
+  // construction from an iterator range of univariate polynomials
+  
+  std::list<Poly_1> univariate_coeffs;
+  univariate_coeffs.push_back(Poly_1(3));
+  univariate_coeffs.push_back(Poly_1(0));
+  univariate_coeffs.push_back(Poly_1(5));
+  Poly_2 F = // 5*y^2 + 3
+    construct_polynomial(univariate_coeffs.begin(),univariate_coeffs.end());
+  std::cout << "The bivariate polynomial F: " << F << std::endl;
+  
+   
+  // construction from an iterator range over monomials 
+  
+  std::list<std::pair<CGAL::Exponent_vector, Integer> > innermost_coeffs;
+  innermost_coeffs.push_back(std::make_pair(CGAL::Exponent_vector(0,0),-2));
+  innermost_coeffs.push_back(std::make_pair(CGAL::Exponent_vector(3,5),2));
+  Poly_2 G = // (2*x^3)*y^5 + (-2)
+    construct_polynomial(innermost_coeffs.begin(),innermost_coeffs.end());
+  std::cout << "The bivariate polynomial G: " << G << std::endl;
+  
+  //construction using shift 
+  PT_2::Shift shift;
+  Poly_2 x = shift(Poly_2(1),1,0); // 'multiply' 1 by x_0^1
+  Poly_2 y = shift(Poly_2(1),1,1); // 'multiply' 1 by x_1^1
+  
+  Poly_2 H = 5 * x * y + 3 * y * y; // = 3*y^2 + (5*x)*y
+  std::cout << "The bivariate polynomial H: " << H << std::endl;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/degree.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/degree.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/degree.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/degree.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/gcd_up_to_constant_factor.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/gcd_up_to_constant_factor.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/gcd_up_to_constant_factor.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/gcd_up_to_constant_factor.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/subresultants.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/subresultants.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/subresultants.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/subresultants.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/substitute.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/substitute.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/substitute.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/substitute.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polynomial/swap_move.cpp b/3rdparty/CGAL-4.8/examples/Polynomial/swap_move.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polynomial/swap_move.cpp
rename to 3rdparty/CGAL-4.8/examples/Polynomial/swap_move.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Polytope_distance_d/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/CMakeLists.txt
new file mode 100644
index 0000000..7d6bc94
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Polytope_distance_d_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "all_furthest_neighbors_2.cpp" )
+  create_single_source_cgal_program( "polytope_distance_d.cpp" )
+  create_single_source_cgal_program( "polytope_distance_d_fast_exact.cpp" )
+  create_single_source_cgal_program( "width_simplex.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/all_furthest_neighbors_2.cpp b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/all_furthest_neighbors_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polytope_distance_d/all_furthest_neighbors_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Polytope_distance_d/all_furthest_neighbors_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/polytope_distance_d.cpp b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/polytope_distance_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polytope_distance_d/polytope_distance_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Polytope_distance_d/polytope_distance_d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/polytope_distance_d_fast_exact.cpp b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/polytope_distance_d_fast_exact.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polytope_distance_d/polytope_distance_d_fast_exact.cpp
rename to 3rdparty/CGAL-4.8/examples/Polytope_distance_d/polytope_distance_d_fast_exact.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Polytope_distance_d/width_simplex.cpp b/3rdparty/CGAL-4.8/examples/Polytope_distance_d/width_simplex.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Polytope_distance_d/width_simplex.cpp
rename to 3rdparty/CGAL-4.8/examples/Polytope_distance_d/width_simplex.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Principal_component_analysis/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/CMakeLists.txt
new file mode 100644
index 0000000..04ab171
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Principal_component_analysis_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "barycenter.cpp" )
+  create_single_source_cgal_program( "bounding_box.cpp" )
+  create_single_source_cgal_program( "centroid.cpp" )
+  create_single_source_cgal_program( "linear_least_squares_fitting_points_2.cpp" )
+  create_single_source_cgal_program( "linear_least_squares_fitting_triangles_3.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/barycenter.cpp b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/barycenter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Principal_component_analysis/barycenter.cpp
rename to 3rdparty/CGAL-4.8/examples/Principal_component_analysis/barycenter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/bounding_box.cpp b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/bounding_box.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Principal_component_analysis/bounding_box.cpp
rename to 3rdparty/CGAL-4.8/examples/Principal_component_analysis/bounding_box.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/centroid.cpp b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/centroid.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Principal_component_analysis/centroid.cpp
rename to 3rdparty/CGAL-4.8/examples/Principal_component_analysis/centroid.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp b/3rdparty/CGAL-4.8/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Profiling_tools/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Profiling_tools/CMakeLists.txt
new file mode 100644
index 0000000..3c162c7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Profiling_tools/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Profiling_tools_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Profile_counter.cpp" )
+  create_single_source_cgal_program( "Profile_histogram_counter.cpp" )
+  create_single_source_cgal_program( "Profile_timer.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_counter.cpp b/3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_counter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_counter.cpp
rename to 3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_counter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_histogram_counter.cpp b/3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_histogram_counter.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_histogram_counter.cpp
rename to 3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_histogram_counter.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_timer.cpp b/3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_timer.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Profiling_tools/Profile_timer.cpp
rename to 3rdparty/CGAL-4.8/examples/Profiling_tools/Profile_timer.cpp
diff --git a/3rdparty/CGAL-4.8/examples/QP_solver/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/QP_solver/CMakeLists.txt
new file mode 100644
index 0000000..0764ef9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/QP_solver/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( QP_solver_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "convex_hull_containment.cpp" )
+  create_single_source_cgal_program( "convex_hull_containment2.cpp" )
+  create_single_source_cgal_program( "convex_hull_containment_benchmarks.cpp" )
+  create_single_source_cgal_program( "cycling.cpp" )
+  create_single_source_cgal_program( "first_lp.cpp" )
+  create_single_source_cgal_program( "first_lp_from_iterators.cpp" )
+  create_single_source_cgal_program( "first_lp_from_mps.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_lp.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_lp_from_iterators.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_lp_from_mps.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_qp.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_qp_from_iterators.cpp" )
+  create_single_source_cgal_program( "first_nonnegative_qp_from_mps.cpp" )
+  create_single_source_cgal_program( "first_qp.cpp" )
+  create_single_source_cgal_program( "first_qp_basic_constraints.cpp" )
+  create_single_source_cgal_program( "first_qp_from_iterators.cpp" )
+  create_single_source_cgal_program( "first_qp_from_mps.cpp" )
+  create_single_source_cgal_program( "important_variables.cpp" )
+  create_single_source_cgal_program( "infeasibility_certificate.cpp" )
+  create_single_source_cgal_program( "invert_matrix.cpp" )
+  create_single_source_cgal_program( "optimality_certificate.cpp" )
+  create_single_source_cgal_program( "print_first_lp.cpp" )
+  create_single_source_cgal_program( "print_first_nonnegative_lp.cpp" )
+  create_single_source_cgal_program( "print_first_nonnegative_qp.cpp" )
+  create_single_source_cgal_program( "print_first_qp.cpp" )
+  create_single_source_cgal_program( "unboundedness_certificate.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment2.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment2.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment_benchmarks.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment_benchmarks.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/convex_hull_containment_benchmarks.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/convex_hull_containment_benchmarks.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/cycling.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/cycling.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/cycling.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/cycling.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/cycling.mps b/3rdparty/CGAL-4.8/examples/QP_solver/cycling.mps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/cycling.mps
rename to 3rdparty/CGAL-4.8/examples/QP_solver/cycling.mps
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/double_qp_solver.cin b/3rdparty/CGAL-4.8/examples/QP_solver/double_qp_solver.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/double_qp_solver.cin
rename to 3rdparty/CGAL-4.8/examples/QP_solver/double_qp_solver.cin
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/double_qp_solver.data b/3rdparty/CGAL-4.8/examples/QP_solver/double_qp_solver.data
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/double_qp_solver.data
rename to 3rdparty/CGAL-4.8/examples/QP_solver/double_qp_solver.data
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_lp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_lp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_lp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_lp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_lp.mps b/3rdparty/CGAL-4.8/examples/QP_solver/first_lp.mps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_lp.mps
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_lp.mps
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_lp_from_iterators.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_lp_from_iterators.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_lp_from_iterators.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_lp_from_iterators.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_lp_from_mps.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_lp_from_mps.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_lp_from_mps.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_lp_from_mps.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp.mps b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp.mps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp.mps
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp.mps
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp_from_iterators.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp_from_iterators.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp_from_iterators.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp_from_iterators.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp_from_mps.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp_from_mps.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_lp_from_mps.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_lp_from_mps.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp.mps b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp.mps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp.mps
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp.mps
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp_from_iterators.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp_from_iterators.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp_from_iterators.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp_from_iterators.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp_from_mps.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp_from_mps.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_nonnegative_qp_from_mps.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_nonnegative_qp_from_mps.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_qp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_qp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_qp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_qp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_qp.mps b/3rdparty/CGAL-4.8/examples/QP_solver/first_qp.mps
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_qp.mps
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_qp.mps
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_qp_basic_constraints.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_qp_basic_constraints.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_qp_basic_constraints.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_qp_basic_constraints.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_qp_from_iterators.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_qp_from_iterators.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_qp_from_iterators.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_qp_from_iterators.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/first_qp_from_mps.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/first_qp_from_mps.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/first_qp_from_mps.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/first_qp_from_mps.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/important_variables.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/important_variables.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/important_variables.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/important_variables.cpp
diff --git a/3rdparty/CGAL-4.8/examples/QP_solver/infeasibility_certificate.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/infeasibility_certificate.cpp
new file mode 100644
index 0000000..c0be0a5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/QP_solver/infeasibility_certificate.cpp
@@ -0,0 +1,68 @@
+// example: extracting and verifying a proof of infeasibility from the solution
+#include <cassert>
+#include <CGAL/basic.h>
+#include <CGAL/QP_models.h>
+#include <CGAL/QP_functions.h>
+
+// choose exact integral type
+#ifdef CGAL_USE_GMP
+#include <CGAL/Gmpz.h>
+typedef CGAL::Gmpz ET;
+#else
+#include <CGAL/MP_Float.h>
+typedef CGAL::MP_Float ET;
+#endif
+
+// program and solution types
+typedef CGAL::Nonnegative_linear_program_from_iterators
+<int**,                                                // for A
+ int*,                                                 // for b
+ CGAL::Comparison_result*,                             // for r
+ int*>                                                 // for c 
+Program;
+typedef CGAL::Quadratic_program_solution<ET> Solution;
+
+// we demonstrate Farkas Lemma: either the system 
+//     A x <= b
+//       x >= 0
+// has a solution, or there exists y such that
+//       y >= 0 
+//    y^TA >= 0 
+//    y^Tb <  0
+// In the following instance, the first system has no solution,
+// since adding up the two inequalities gives x_2 <= -1:
+//     x_1 - 2x_2  <=  1
+//    -x_1 + 3x_2  <= -2
+//     x_1,   x_2  >=  0
+
+int main() {
+  int  Ax1[] = { 1, -1};                        // column for x1
+  int  Ax2[] = {-2,  3};                        // column for x2
+  int*   A[] = {Ax1, Ax2};                      // A comes columnwise
+  int    b[] = {1, -2};                         // right-hand side
+  CGAL::Comparison_result 
+    r[] = {CGAL::SMALLER, CGAL::SMALLER};      // constraints are "<="
+  int    c[] = {0, 0};                         // zero objective function
+
+  // now construct the linear program; the first two parameters are
+  // the number of variables and the number of constraints (rows of A)
+  Program lp (2, 2, A, b, r, c);
+
+  // solve the program, using ET as the exact type
+  Solution s = CGAL::solve_nonnegative_linear_program(lp, ET());
+
+  // get certificate for infeasibility
+  assert (s.is_infeasible());
+  Solution::Infeasibility_certificate_iterator y = 
+    s.infeasibility_certificate_begin();
+  // check y >= 0
+  assert (ET(y[0]) >= 0);
+  assert (ET(y[1]) >= 0);
+  // check y^T A >= 0
+  assert (ET(y[0]) * A[0][0] + ET(y[1]) * A[0][1] >= 0);
+  assert (ET(y[0]) * A[1][0] + ET(y[1]) * A[1][1] >= 0);
+  // check y^T b < 0
+  assert (ET(y[0]) * b[0] + ET(y[1]) * b[1] < 0);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/integer_qp_solver.cin b/3rdparty/CGAL-4.8/examples/QP_solver/integer_qp_solver.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/integer_qp_solver.cin
rename to 3rdparty/CGAL-4.8/examples/QP_solver/integer_qp_solver.cin
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/integer_qp_solver.data b/3rdparty/CGAL-4.8/examples/QP_solver/integer_qp_solver.data
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/integer_qp_solver.data
rename to 3rdparty/CGAL-4.8/examples/QP_solver/integer_qp_solver.data
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/invert_matrix.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/invert_matrix.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/invert_matrix.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/invert_matrix.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/optimality_certificate.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/optimality_certificate.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/optimality_certificate.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/optimality_certificate.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/print_first_lp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/print_first_lp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/print_first_lp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/print_first_lp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/print_first_nonnegative_lp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/print_first_nonnegative_lp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/print_first_nonnegative_lp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/print_first_nonnegative_lp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/print_first_nonnegative_qp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/print_first_nonnegative_qp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/print_first_nonnegative_qp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/print_first_nonnegative_qp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/print_first_qp.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/print_first_qp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/print_first_qp.cpp
rename to 3rdparty/CGAL-4.8/examples/QP_solver/print_first_qp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/rational_qp_solver.cin b/3rdparty/CGAL-4.8/examples/QP_solver/rational_qp_solver.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/rational_qp_solver.cin
rename to 3rdparty/CGAL-4.8/examples/QP_solver/rational_qp_solver.cin
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/rational_qp_solver.data b/3rdparty/CGAL-4.8/examples/QP_solver/rational_qp_solver.data
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/rational_qp_solver.data
rename to 3rdparty/CGAL-4.8/examples/QP_solver/rational_qp_solver.data
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp.h b/3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp.h
rename to 3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp.h
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp2.h b/3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp2.h
rename to 3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp2.h
diff --git a/3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp3.h b/3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/QP_solver/solve_convex_hull_containment_lp3.h
rename to 3rdparty/CGAL-4.8/examples/QP_solver/solve_convex_hull_containment_lp3.h
diff --git a/3rdparty/CGAL-4.8/examples/QP_solver/unboundedness_certificate.cpp b/3rdparty/CGAL-4.8/examples/QP_solver/unboundedness_certificate.cpp
new file mode 100644
index 0000000..2dd3a33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/QP_solver/unboundedness_certificate.cpp
@@ -0,0 +1,75 @@
+// example: extracting and verifying a proof of unboundedness from the solution
+#include <cassert>
+#include <CGAL/basic.h>
+#include <CGAL/QP_models.h>
+#include <CGAL/QP_functions.h>
+
+// choose exact integral type
+#ifdef CGAL_USE_GMP
+#include <CGAL/Gmpz.h>
+typedef CGAL::Gmpz ET;
+#else
+#include <CGAL/MP_Float.h>
+typedef CGAL::MP_Float ET;
+#endif
+
+// program and solution types
+typedef CGAL::Nonnegative_linear_program_from_iterators
+<int**,                                                // for A
+ int*,                                                 // for b
+ CGAL::Comparison_result*,                             // for r
+ int*>                                                 // for c 
+Program;
+typedef CGAL::Quadratic_program_solution<ET> Solution;
+
+// we demonstrate the unboundedness certificate: either the feasible
+// linear program
+// min c^T x 
+//       A x <= b
+//         x >= 0
+// is bounded, or there exists w such that
+//         w >= 0
+//       A w <= 0
+//     c^t w <  0,
+// in which case the objective function becomes arbitrarily small
+// along the ray {x* + tw | t >= 0}, x* any feasible solution.
+// 
+// In the following instance, the linear program is unbounded, since
+// the ray {(t,t)| t>= 1} is feasible, and the objective function becomes
+// arbitrarily small on it:
+// min -x_1 - 2x_2 
+//      x_1 - 2x_2  <=  -1
+//     -x_1 +  x_2  <=   2
+//      x_1,   x_2  >=   0
+
+int main() {
+  int  Ax1[] = { 1, -1};                        // column for x1
+  int  Ax2[] = {-2,  1};                        // column for x2
+  int*   A[] = {Ax1, Ax2};                      // A comes columnwise
+  int    b[] = {-1, 2};                         // right-hand side
+  CGAL::Comparison_result 
+    r[] = {CGAL::SMALLER, CGAL::SMALLER};       // constraints are "<="
+  int    c[] = {-1, -2};                        // objective function
+
+  // now construct the linear program; the first two parameters are
+  // the number of variables and the number of constraints (rows of A)
+  Program lp (2, 2, A, b, r, c);
+
+  // solve the program, using ET as the exact type
+  Solution s = CGAL::solve_nonnegative_linear_program(lp, ET());
+
+  // get certificate for unboundedness
+  assert (s.is_unbounded());
+  Solution::Unboundedness_certificate_iterator w =
+    s.unboundedness_certificate_begin();
+  // check w >= 0
+  assert (ET(w[0]) >= 0);
+  assert (ET(w[1]) >= 0);
+  // check A w <= 0
+  assert (A[0][0] * ET(w[0]) + A[1][0] * ET(w[1]) <= 0);
+  assert (A[0][1] * ET(w[0]) + A[1][1] * ET(w[1]) <= 0);
+  // check c^T w < 0
+  assert (c[0] * ET(w[0]) + c[1] * ET(w[1]) < 0);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/CMakeLists.txt
new file mode 100644
index 0000000..26c6486
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( RangeSegmentTrees_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+    include_directories (BEFORE "include")
+
+  create_single_source_cgal_program( "range_tree_1.cpp" )
+  create_single_source_cgal_program( "range_tree_2.cpp" )
+  create_single_source_cgal_program( "range_tree_3.cpp" )
+  create_single_source_cgal_program( "range_tree_4.cpp" )
+  create_single_source_cgal_program( "range_tree_map_2.cpp" )
+  create_single_source_cgal_program( "range_tree_set_2.cpp" )
+  create_single_source_cgal_program( "segment_tree_1.cpp" )
+  create_single_source_cgal_program( "segment_tree_2.cpp" )
+  create_single_source_cgal_program( "segment_tree_3.cpp" )
+  create_single_source_cgal_program( "segment_tree_4.cpp" )
+  create_single_source_cgal_program( "segment_tree_map_2.cpp" )
+  create_single_source_cgal_program( "segment_tree_set_2.cpp" )
+  create_single_source_cgal_program( "segment_tree_set_3.cpp" )
+  create_single_source_cgal_program( "software_design_rgs.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/include/Tree_Traits.h b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/include/Tree_Traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/include/Tree_Traits.h
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/include/Tree_Traits.h
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_1.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_1.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_3.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_3.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_4.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_4.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_4.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_4.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_map_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_map_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_map_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_map_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_set_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_set_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/range_tree_set_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/range_tree_set_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_1.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_1.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_3.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_3.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_4.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_4.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_4.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_4.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_map_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_map_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_map_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_map_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_set_2.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_set_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_set_2.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_set_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_set_3.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_set_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/segment_tree_set_3.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/segment_tree_set_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/RangeSegmentTrees/software_design_rgs.cpp b/3rdparty/CGAL-4.8/examples/RangeSegmentTrees/software_design_rgs.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/RangeSegmentTrees/software_design_rgs.cpp
rename to 3rdparty/CGAL-4.8/examples/RangeSegmentTrees/software_design_rgs.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Rectangular_p_center_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Rectangular_p_center_2/CMakeLists.txt
new file mode 100644
index 0000000..d07e75d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Rectangular_p_center_2/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Rectangular_p_center_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "rectangular_p_center_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp b/3rdparty/CGAL-4.8/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Ridges_3/CMakeLists.txt
new file mode 100644
index 0000000..a816d71
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/CMakeLists.txt
@@ -0,0 +1,52 @@
+# This is the CMake script for compiling a CGAL application.
+project( Ridges_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  # use either Eigen or BLAS/LAPACK
+  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+  if (NOT EIGEN3_FOUND)
+    find_package(LAPACK)
+    if(LAPACK_FOUND)
+      include( ${LAPACK_USE_FILE} )
+    endif(LAPACK_FOUND)
+  else()
+    include( ${EIGEN3_USE_FILE} )
+  endif()
+  
+  
+  if(EIGEN3_FOUND OR LAPACK_FOUND)
+    # Link with Boost.ProgramOptions (optional)
+    find_package(Boost QUIET COMPONENTS program_options)
+    if(Boost_PROGRAM_OPTIONS_FOUND)
+      if( CGAL_AUTO_LINK_ENABLED )
+        message( STATUS "Boost.ProgramOptions library: found" )
+      else()
+        message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
+      endif()
+      add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
+      list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
+   endif()
+
+   create_single_source_cgal_program( Compute_Ridges_Umbilics.cpp)
+   create_single_source_cgal_program( Ridges_Umbilics_SM.cpp)
+
+  else(EIGEN3_FOUND OR LAPACK_FOUND)
+
+    message(STATUS "NOTICE: This program requires either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.")
+
+  endif(EIGEN3_FOUND OR LAPACK_FOUND)
+
+else()
+  
+    message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+  
+endif()
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/Compute_Ridges_Umbilics.cpp b/3rdparty/CGAL-4.8/examples/Ridges_3/Compute_Ridges_Umbilics.cpp
new file mode 100644
index 0000000..ab21259
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/Compute_Ridges_Umbilics.cpp
@@ -0,0 +1,389 @@
+
+//this is an enriched Polyhedron with facet normals
+#include "PolyhedralSurf.h"
+#include "PolyhedralSurf_rings.h"
+#include "compute_normals.h"
+#include <CGAL/Ridges.h>
+
+#include <CGAL/Umbilics.h>
+#include <CGAL/Monge_via_jet_fitting.h>
+#include <fstream>
+#include <cassert>
+
+
+
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+#include <boost/program_options.hpp>
+namespace po = boost::program_options;
+#endif
+
+
+typedef PolyhedralSurf::Traits          Kernel;
+typedef Kernel::FT                      FT;
+typedef Kernel::Point_3                 Point_3;
+typedef Kernel::Vector_3                Vector_3;
+
+typedef boost::graph_traits<PolyhedralSurf>::vertex_descriptor  vertex_descriptor;
+typedef boost::graph_traits<PolyhedralSurf>::vertex_iterator vertex_iterator;
+typedef boost::graph_traits<PolyhedralSurf>::face_descriptor face_descriptor;
+
+typedef T_PolyhedralSurf_rings<PolyhedralSurf> Poly_rings;
+typedef CGAL::Monge_via_jet_fitting<Kernel>    Monge_via_jet_fitting;
+typedef Monge_via_jet_fitting::Monge_form      Monge_form;
+
+
+typedef std::map<vertex_descriptor, FT> VertexFT_map;
+typedef boost::associative_property_map< VertexFT_map > VertexFT_property_map;
+
+typedef std::map<vertex_descriptor, Vector_3> VertexVector_map;
+typedef boost::associative_property_map< VertexVector_map > VertexVector_property_map;
+
+typedef std::map<face_descriptor, Vector_3> Face2Vector_map;
+typedef boost::associative_property_map< Face2Vector_map > Face2Vector_property_map;
+
+//RIDGES
+typedef CGAL::Ridge_line<PolyhedralSurf> Ridge_line;
+typedef CGAL::Ridge_approximation < PolyhedralSurf,
+				    VertexFT_property_map,
+				    VertexVector_property_map > Ridge_approximation;
+//UMBILICS
+typedef CGAL::Umbilic<PolyhedralSurf> Umbilic;
+typedef CGAL::Umbilic_approximation < PolyhedralSurf,
+				      VertexFT_property_map,
+				      VertexVector_property_map > Umbilic_approximation;
+
+//create property maps
+VertexFT_map vertex_k1_map, vertex_k2_map,
+  vertex_b0_map, vertex_b3_map,
+  vertex_P1_map, vertex_P2_map;
+VertexVector_map vertex_d1_map, vertex_d2_map;
+Face2Vector_map face2normal_map;
+
+VertexFT_property_map vertex_k1_pm(vertex_k1_map), vertex_k2_pm(vertex_k2_map),
+  vertex_b0_pm(vertex_b0_map), vertex_b3_pm(vertex_b3_map),
+  vertex_P1_pm(vertex_P1_map), vertex_P2_pm(vertex_P2_map);
+VertexVector_property_map vertex_d1_pm(vertex_d1_map), vertex_d2_pm(vertex_d2_map);
+Face2Vector_property_map  face2normal_pm(face2normal_map);
+
+// default fct parameter values and global variables
+unsigned int d_fitting = 3;
+unsigned int d_monge = 3;
+unsigned int nb_rings = 0;//seek min # of rings to get the required #pts
+unsigned int nb_points_to_use = 0;//
+CGAL::Ridge_order tag_order = CGAL::Ridge_order_3;
+double umb_size = 2;
+bool verbose = false;
+unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+
+/* gather points around the vertex v using rings on the
+   polyhedralsurf. the collection of points resorts to 3 alternatives:
+   1. the exact number of points to be used
+   2. the exact number of rings to be used
+   3. nothing is specified
+*/
+template <typename VertexPointMap>
+void gather_fitting_points(vertex_descriptor v,
+			   std::vector<Point_3> &in_points,
+			   Poly_rings& poly_rings,
+                           VertexPointMap vpm)
+{
+  //container to collect vertices of v on the PolyhedralSurf
+  std::vector<vertex_descriptor> gathered;
+  //initialize
+  in_points.clear();
+
+  //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect
+  //enough rings and discard some points of the last collected ring to
+  //get the exact "nb_points_to_use"
+  if ( nb_points_to_use != 0 ) {
+    poly_rings.collect_enough_rings(v, nb_points_to_use, gathered);
+    if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use);
+  }
+  else { // nb_points_to_use=0, this is the default and the option -p is not considered;
+    // then option -a nb_rings is checked. If nb_rings=0, collect
+    // enough rings to get the min_nb_points required for the fitting
+    // else collect the nb_rings required
+    if ( nb_rings == 0 )
+      poly_rings.collect_enough_rings(v, min_nb_points, gathered);
+    else poly_rings.collect_i_rings(v, nb_rings, gathered);
+  }
+
+  //store the gathered points
+  std::vector<vertex_descriptor>::const_iterator
+    itb = gathered.begin(), ite = gathered.end();
+  CGAL_For_all(itb,ite) in_points.push_back(get(vpm,*itb));
+}
+
+/* Use the jet_fitting package and the class Poly_rings to compute
+   diff quantities.
+*/
+void compute_differential_quantities(PolyhedralSurf& P, Poly_rings& poly_rings)
+{
+  //container for approximation points
+  std::vector<Point_3> in_points;
+
+  typedef boost::property_map<PolyhedralSurf,CGAL::vertex_point_t>::type VPM;
+  VPM vpm = get(CGAL::vertex_point,P);
+
+  //MAIN LOOP
+  vertex_iterator vitb = P.vertices_begin(), vite = P.vertices_end();
+  for (; vitb != vite; vitb++) {
+    //initialize
+    vertex_descriptor v = * vitb;
+    in_points.clear();
+    Monge_form monge_form;
+    Monge_via_jet_fitting monge_fit;
+
+    //gather points around the vertex using rings
+    gather_fitting_points(v, in_points, poly_rings, vpm);
+
+    //exit if the nb of points is too small
+    if ( in_points.size() < min_nb_points )
+      {std::cerr << "Too few points to perform the fitting" << std::endl; exit(1);}
+
+    //For Ridges we need at least 3rd order info
+    assert( d_monge >= 3);
+    // run the main fct : perform the fitting
+    monge_form = monge_fit(in_points.begin(), in_points.end(),
+			   d_fitting, d_monge);
+
+    //switch min-max ppal curv/dir wrt the mesh orientation
+    const Vector_3 normal_mesh = computeFacetsAverageUnitNormal(P,v, face2normal_pm, Kernel());
+    monge_form.comply_wrt_given_normal(normal_mesh);
+
+    //Store monge data needed for ridge computations in property maps
+    vertex_d1_map[v] = monge_form.maximal_principal_direction();
+    vertex_d2_map[v] = monge_form.minimal_principal_direction();
+    vertex_k1_map[v] = monge_form.coefficients()[0];
+    vertex_k2_map[v] = monge_form.coefficients()[1];
+    vertex_b0_map[v] = monge_form.coefficients()[2];
+    vertex_b3_map[v] = monge_form.coefficients()[5];
+    if ( d_monge >= 4) {
+      //= 3*b1^2+(k1-k2)(c0-3k1^3)
+      vertex_P1_map[v] =
+	3*monge_form.coefficients()[3]*monge_form.coefficients()[3]
+	+(monge_form.coefficients()[0]-monge_form.coefficients()[1])
+	*(monge_form.coefficients()[6]
+	  -3*monge_form.coefficients()[0]*monge_form.coefficients()[0]
+	  *monge_form.coefficients()[0]);
+      //= 3*b2^2+(k2-k1)(c4-3k2^3)
+      vertex_P2_map[v] =
+	3*monge_form.coefficients()[4]*monge_form.coefficients()[4]
+	+(-monge_form.coefficients()[0]+monge_form.coefficients()[1])
+	*(monge_form.coefficients()[10]
+	  -3*monge_form.coefficients()[1]*monge_form.coefficients()[1]
+	  *monge_form.coefficients()[1]);
+    }
+  } //END FOR LOOP
+}
+
+
+///////////////MAIN///////////////////////////////////////////////////////
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+int main(int argc, char *argv[])
+#else
+int main()
+#endif
+{
+  std::string if_name, of_name;// of_name same as if_name with '/' -> '_'
+
+  try {
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+   unsigned int int_tag;
+   po::options_description desc("Allowed options");
+    desc.add_options()
+      ("help,h", "produce help message.")
+      ("input-file,f", po::value<std::string>(&if_name)->default_value("data/poly2x^2+y^2-0.062500.off"),
+       "name of the input off file")
+      ("degree-jet,d", po::value<unsigned int>(&d_fitting)->default_value(3),
+       "degree of the jet,  3 <= degre-jet <= 4")
+      ("degree-monge,m", po::value<unsigned int>(&d_monge)->default_value(3),
+       "degree of the Monge rep, 3<= degree-monge <= degree-jet")
+      ("nb-rings,a", po::value<unsigned int>(&nb_rings)->default_value(0),
+       "number of rings to collect neighbors. 0 means collect enough rings to make appro possible a>=1 fixes the nb of rings to be collected")
+      ("nb-points,p", po::value<unsigned int>(&nb_points_to_use)->default_value(0),
+       "number of neighbors to use.  0 means this option is not considered, this is the default p>=1 fixes the nb of points to be used")
+      ("ridge_order,t", po::value<unsigned int>(&int_tag)->default_value(3),
+       "Order of differential quantities used, must be 3 or 4")
+      ("umbilic-patch-size,u", po::value<double>(&umb_size)->default_value(2),
+       "size of umbilic patches (as multiple of 1ring size)")
+      ("verbose,v", po::value<bool>(&verbose)->default_value(false),
+       "verbose output on text file")
+      ;
+
+    po::variables_map vm;
+    po::store(po::parse_command_line(argc, argv, desc), vm);
+    po::notify(vm);
+
+    if (vm.count("help")) {
+      std::cerr << desc << "\n";
+      return 1;
+    }
+
+
+    if (vm.count("ridge_order")){
+      if ( int_tag == 3 ) tag_order = CGAL::Ridge_order_3;
+      if ( int_tag == 4 ) tag_order = CGAL::Ridge_order_4;
+      if ( int_tag != 3 && int_tag != 4 )
+	{std::cerr << "ridge_order must be CGAL::Ridge_order_3 or CGAL::Ridge_order_4";
+	  return 1;}
+    }
+#else 
+    std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
+    if_name = "data/poly2x^2+y^2-0.062500.off";
+    d_fitting = 3;
+    d_monge = 3;
+    nb_rings = 0;
+    nb_points_to_use = 0;
+    umb_size = 2;
+    verbose = false;
+#endif
+  }
+
+  catch(std::exception& e) {
+    std::cerr << "error: " << e.what() << "\n";
+    return 1;
+    }
+    catch(...) {
+      std::cerr << "Exception of unknown type!\n";
+    }
+
+  //modify global variables
+  min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+
+  //prepare output file names
+  assert(!if_name.empty());
+  of_name = if_name;
+  for(unsigned int i=0; i<of_name.size(); i++)
+    if (of_name[i] == '/') of_name[i]='_';
+  std::ostringstream str_4ogl;
+  str_4ogl << "data/"
+	   << of_name << "RIDGES"
+	   << "-d" << d_fitting
+	   << "-m" << d_monge
+	   << "-t" << tag_order
+	   << "-a" << nb_rings
+	   << "-p" << nb_points_to_use
+	   << ".4ogl.txt";
+  std::cout << str_4ogl.str() << std::endl ;
+  std::ofstream out_4ogl(str_4ogl.str().c_str() , std::ios::out);
+
+  //if verbose only...
+  std::ostringstream str_verb;
+  str_verb << "data/"
+	   << of_name << "RIDGES"
+	   << "-d" << d_fitting
+	   << "-m" << d_monge
+	   << "-t" << tag_order
+	   << "-a" << nb_rings
+	   << "-p" << nb_points_to_use
+	   << ".verb.txt";
+  std::cout << str_verb.str() << std::endl ;
+  std::ofstream out_verb(str_verb.str().c_str() , std::ios::out);
+
+  //load the model from <mesh.off>
+  PolyhedralSurf P;
+  std::ifstream stream(if_name.c_str());
+  stream >> P;
+  fprintf(stderr, "loadMesh %d Ves %d Facets\n",
+	  (int)P.size_of_vertices(), (int)P.size_of_facets());
+  if(verbose)
+    out_verb << "Polysurf with " << P.size_of_vertices()
+	     << " vertices and " << P.size_of_facets()
+	     << " facets. " << std::endl;
+
+  //exit if not enough points in the model
+  if (min_nb_points > P.size_of_vertices())
+    {std::cerr << "not enough points in the model" << std::endl;   exit(1);}
+
+  //initialize Polyhedral data : normal of facets
+  compute_facets_normals(P,face2normal_pm, Kernel());
+
+  //create a Poly_rings object
+  Poly_rings poly_rings(P);
+
+  std::cout << "Compute differential quantities via jet fitting..." << std::endl;
+  //initialize the diff quantities property maps
+  compute_differential_quantities(P, poly_rings);
+
+  //---------------------------------------------------------------------------
+  //Ridges
+  //--------------------------------------------------------------------------
+  std::cout << "Compute ridges..." << std::endl;
+  Ridge_approximation ridge_approximation(P,
+					  vertex_k1_pm, vertex_k2_pm,
+					  vertex_b0_pm, vertex_b3_pm,
+					  vertex_d1_pm, vertex_d2_pm,
+					  vertex_P1_pm, vertex_P2_pm );
+  std::vector<Ridge_line*> ridge_lines;
+  std::back_insert_iterator<std::vector<Ridge_line*> > ii(ridge_lines);
+
+  //Find MAX_RIDGE, MIN_RIDGE, CREST_RIDGES
+  //   ridge_approximation.compute_max_ridges(ii, tag_order);
+  //   ridge_approximation.compute_min_ridges(ii, tag_order);
+  ridge_approximation.compute_crest_ridges(ii, tag_order);
+
+  // or with the global function
+  CGAL::compute_max_ridges(P,
+			   vertex_k1_pm, vertex_k2_pm,
+			   vertex_b0_pm, vertex_b3_pm,
+			   vertex_d1_pm, vertex_d2_pm,
+			   vertex_P1_pm, vertex_P2_pm,
+			   ii, tag_order);
+
+  std::vector<Ridge_line*>::iterator iter_lines = ridge_lines.begin(),
+    iter_end = ridge_lines.end();
+  //OpenGL output
+
+  typedef boost::property_map<PolyhedralSurf,CGAL::vertex_point_t>::type VPM;
+  VPM vpm = get(CGAL::vertex_point,P);
+
+  for (;iter_lines!=iter_end;iter_lines++) (*iter_lines)->dump_4ogl(out_4ogl, vpm);
+
+
+  for (iter_lines = ridge_lines.begin();iter_lines!=iter_end;iter_lines++){
+    //verbose txt output
+    if (verbose){
+      (*iter_lines)->dump_verbose(out_verb,vpm);
+    }
+    delete *iter_lines;
+    }
+
+  //---------------------------------------------------------------------------
+  // UMBILICS
+  //--------------------------------------------------------------------------
+  std::cout << "Compute umbilics..." << std::endl;
+  std::vector<Umbilic*> umbilics;
+  std::back_insert_iterator<std::vector<Umbilic*> > umb_it(umbilics);
+
+  //explicit construction of the class
+ //  Umbilic_approximation umbilic_approximation(P,
+// 					      vertex_k1_pm, vertex_k2_pm,
+// 					      vertex_d1_pm, vertex_d2_pm);
+//   umbilic_approximation.compute(umb_it, umb_size);
+  //or global function call
+  CGAL::compute_umbilics(P,
+			 vertex_k1_pm, vertex_k2_pm,
+			 vertex_d1_pm, vertex_d2_pm,
+			 umb_it, umb_size);
+
+  std::vector<Umbilic*>::iterator iter_umb = umbilics.begin(),
+    iter_umb_end = umbilics.end();
+  // output
+  std::cout << "nb of umbilics " << umbilics.size() << std::endl;
+  for (;iter_umb!=iter_umb_end;iter_umb++) std::cout << **iter_umb;
+
+  //verbose txt output
+  if (verbose) {
+    out_verb << "nb of umbilics " << umbilics.size() << std::endl;
+  }
+  for ( iter_umb = umbilics.begin();iter_umb!=iter_umb_end;iter_umb++){
+    if (verbose) {
+      out_verb << **iter_umb;
+    }
+    delete *iter_umb;
+  }
+  return 0;
+}
+
+
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf.h b/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf.h
new file mode 100644
index 0000000..13f555e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf.h
@@ -0,0 +1,98 @@
+#ifndef CGAL_POLYHEDRALSURF_H_
+#define CGAL_POLYHEDRALSURF_H_
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <cstdlib>
+#include <cstdio>
+#include <algorithm>
+#include <vector>
+#include <list>
+
+#include <boost/foreach.hpp>
+
+//----------------------------------------------------------------
+// A redefined items class for the Polyhedron_3 with
+// a refined facet with a normal vector
+//---------------------------------------------------------------
+
+//----------------------------------------------------------------
+// Facet with normal and possibly more types. types are recovered
+//from the FGeomTraits template arg
+//----------------------------------------------------------------
+template < class Refs, class Tag, class FGeomTraits >
+class My_facet:public CGAL::HalfedgeDS_face_base < Refs, Tag >
+{
+public:
+ typedef typename FGeomTraits::Vector_3 Vector_3;
+
+protected:
+  //Vector_3 normal;
+public:
+  My_facet() {}
+  //const Vector_3 & getUnitNormal() const { std::cerr << "coucou" << std::endl;return normal; }
+  //void setNormal(Vector_3 n) { normal = n; }
+};
+
+//------------------------------------------------
+// Wrappers [Vertex, Face, Halfedge]
+//------------------------------------------------
+struct Wrappers_VFH:public CGAL::Polyhedron_items_3 {
+  // wrap face
+  //NOTE: [HDS, Face] renamed [Polyhedron, Facet]
+  template < class Refs, class Traits > struct Face_wrapper {
+    //typedef typename Traits::Vector_3 Vector_3;
+    //all types needed by the facet...
+    typedef struct {
+    public:
+       typedef typename Traits::Vector_3 Vector_3;
+     } FGeomTraits;
+    //custom type instantiated...
+    typedef My_facet < Refs, CGAL::Tag_true, FGeomTraits > Face;
+  };
+};
+
+//------------------------------------------------
+//PolyhedralSurf with facet normal operations
+//------------------------------------------------
+typedef double                FT;
+typedef CGAL::Simple_cartesian<FT>  Kernel;
+typedef CGAL::Polyhedron_3 < Kernel, Wrappers_VFH > Polyhedron;
+typedef Kernel::Vector_3 Vector_3;
+
+class PolyhedralSurf;
+
+namespace boost {
+  template <>
+  struct graph_traits<PolyhedralSurf> : public boost::graph_traits<Polyhedron>
+  {};  
+
+  template <>
+  struct graph_traits<PolyhedralSurf const> : public boost::graph_traits<Polyhedron>
+  {};
+
+  template <class Tag>
+  struct property_map<PolyhedralSurf,Tag> : public property_map<Polyhedron,Tag>
+  {};
+  template <class Tag>
+  struct property_map<const PolyhedralSurf,Tag> : public property_map<const Polyhedron,Tag>
+  {};
+}
+
+class PolyhedralSurf : public Polyhedron {
+public:
+  typedef boost::graph_traits<PolyhedralSurf>::vertex_descriptor vertex_descriptor;
+  typedef boost::graph_traits<PolyhedralSurf>::face_descriptor face_descriptor;
+  typedef boost::graph_traits<PolyhedralSurf>::halfedge_descriptor halfedge_descriptor;
+
+  PolyhedralSurf() {}
+
+};
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf_rings.h b/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf_rings.h
new file mode 100644
index 0000000..2f863bc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/PolyhedralSurf_rings.h
@@ -0,0 +1,170 @@
+#ifndef CGAL_PSURF_RINGS_H_
+#define CGAL_PSURF_RINGS_H_
+
+#include <cassert>
+#include <vector>
+#include <map>
+
+
+//---------------------------------------------------------------------------
+//T_PolyhedralSurf_rings
+//---------------------------------------------------------------------------
+template < class TPoly >
+class T_PolyhedralSurf_rings
+{
+
+  const TPoly& P;
+
+protected:
+  //Polyhedron
+  typedef typename boost::graph_traits<TPoly>::vertex_descriptor                     Vertex_const_handle;
+  typedef typename boost::graph_traits<TPoly>::halfedge_descriptor                   Halfedge_const_handle;
+  typedef typename boost::graph_traits<TPoly>::vertex_iterator                   Vertex_const_iterator;
+  typedef CGAL::Halfedge_around_target_circulator<TPoly> Halfedge_around_vertex_const_circulator;
+
+  typedef std::map<Vertex_const_handle, int> Vertex2int_map;
+  Vertex2int_map ring_index_map;
+
+  //vertex indices are initialised to -1
+  void reset_ring_indices(std::vector <Vertex_const_handle> &vces);
+
+  //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors
+  //of start in the nextRing and set indices to i. Also add these vertices in all.
+  void push_neighbours_of(const Vertex_const_handle start, const int ith,
+			  std::vector < Vertex_const_handle > &nextRing,
+			  std::vector < Vertex_const_handle > &all);
+
+  //i >= 1, from a currentRing i-1, collect all neighbors, set indices
+  //to i and store them in nextRing and all.
+  void collect_ith_ring(const int ith,
+			std::vector < Vertex_const_handle > &currentRing,
+			std::vector < Vertex_const_handle > &nextRing,
+			std::vector < Vertex_const_handle > &all);
+
+ public:
+  T_PolyhedralSurf_rings(const TPoly& P);
+
+  //collect i>=1 rings : all neighbours up to the ith ring,
+  void collect_i_rings(const Vertex_const_handle v,
+		       const int ring_i,
+		       std::vector < Vertex_const_handle >& all);
+
+  //collect enough rings (at least 1), to get at least min_nb of neighbors
+  void collect_enough_rings(const Vertex_const_handle v,
+			    const unsigned int min_nb,
+			    std::vector < Vertex_const_handle >& all);
+};
+
+////IMPLEMENTATION/////////////////////////////////////////////////////////////////////
+
+template < class TPoly >
+T_PolyhedralSurf_rings <TPoly>::
+T_PolyhedralSurf_rings(const TPoly& P)
+  : P(P)
+{
+  //init the ring_index_map
+  Vertex_const_iterator itb, ite;
+  boost::tie(itb,ite) = vertices(P);
+  for(;itb!=ite;itb++) ring_index_map[*itb] = -1;
+}
+
+template < class TPoly >
+void T_PolyhedralSurf_rings <TPoly>::
+push_neighbours_of(const Vertex_const_handle start, const int ith,
+		   std::vector < Vertex_const_handle > &nextRing,
+		   std::vector < Vertex_const_handle > &all)
+{
+  Vertex_const_handle v;
+  Halfedge_around_vertex_const_circulator
+    hedgeb(halfedge(start,P),P), hedgee = hedgeb;
+
+ CGAL_For_all(hedgeb, hedgee)
+  {
+    v = target(opposite(*hedgeb,P),P);
+    if (ring_index_map[v] != -1)  continue;//if visited: next
+
+    ring_index_map[v] = ith;
+    nextRing.push_back(v);
+    all.push_back(v);
+  }
+}
+
+template <class TPoly>
+void T_PolyhedralSurf_rings <TPoly>::
+collect_ith_ring(const int ith, std::vector < Vertex_const_handle > &currentRing,
+		 std::vector < Vertex_const_handle > &nextRing,
+		 std::vector < Vertex_const_handle > &all)
+{
+  typename std::vector < Vertex_const_handle >::const_iterator
+    itb = currentRing.begin(), ite = currentRing.end();
+
+  CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all);
+}
+
+template <class TPoly>
+  void T_PolyhedralSurf_rings <TPoly>::
+reset_ring_indices(std::vector < Vertex_const_handle >&vces)
+{
+  typename std::vector < Vertex_const_handle >::const_iterator
+    itb = vces.begin(), ite = vces.end();
+  CGAL_For_all(itb, ite)  ring_index_map[*itb] = -1;
+}
+
+template <class TPoly>
+  void T_PolyhedralSurf_rings <TPoly>::
+collect_i_rings(const Vertex_const_handle v,
+		const int ring_i,
+		std::vector < Vertex_const_handle >& all)
+{
+  std::vector<Vertex_const_handle> current_ring, next_ring;
+  std::vector<Vertex_const_handle> *p_current_ring, *p_next_ring;
+  assert(ring_i >= 1);
+  //initialize
+  p_current_ring = &current_ring;
+  p_next_ring = &next_ring;
+  ring_index_map[v] = 0;
+  current_ring.push_back(v);
+  all.push_back(v);
+
+  for (int i=1; i<=ring_i; i++)
+    {
+      collect_ith_ring(i, *p_current_ring, *p_next_ring, all);
+      //next round must be launched from p_nextRing...
+      p_current_ring->clear();
+      std::swap(p_current_ring, p_next_ring);
+    }
+  //clean up
+  reset_ring_indices(all);
+}
+
+template <class TPoly>
+  void T_PolyhedralSurf_rings <TPoly>::
+collect_enough_rings(const Vertex_const_handle v,
+		     const unsigned int min_nb,
+		     std::vector < Vertex_const_handle >& all)
+{
+  std::vector<Vertex_const_handle> current_ring, next_ring;
+  std::vector<Vertex_const_handle> *p_current_ring, *p_next_ring;
+
+  //initialize
+  p_current_ring = &current_ring;
+  p_next_ring = &next_ring;
+  ring_index_map[v] = 0;
+  current_ring.push_back(v);
+  all.push_back(v);
+
+  int i = 1;
+
+  while ( (all.size() < min_nb) &&  (p_current_ring->size() != 0) )
+    {
+      collect_ith_ring(i, *p_current_ring, *p_next_ring, all);
+      //next round must be launched from p_nextRing...
+      p_current_ring->clear();
+      std::swap(p_current_ring, p_next_ring);
+      i++;
+    }
+  //clean up
+  reset_ring_indices(all);
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/README b/3rdparty/CGAL-4.8/examples/Ridges_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Ridges_3/README
rename to 3rdparty/CGAL-4.8/examples/Ridges_3/README
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/Ridges_Umbilics_SM.cpp b/3rdparty/CGAL-4.8/examples/Ridges_3/Ridges_Umbilics_SM.cpp
new file mode 100644
index 0000000..ef3aaba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/Ridges_Umbilics_SM.cpp
@@ -0,0 +1,389 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+#include "PolyhedralSurf_rings.h"
+#include "compute_normals.h"
+#include <CGAL/Ridges.h>
+#include <CGAL/Umbilics.h>
+#include <CGAL/Monge_via_jet_fitting.h>
+#include <fstream>
+#include <cassert>
+
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+#include <boost/program_options.hpp>
+namespace po = boost::program_options;
+#endif
+
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::FT                      FT;
+typedef Kernel::Point_3                 Point_3;
+typedef Kernel::Vector_3                Vector_3;
+
+typedef CGAL::Surface_mesh<Point_3> PolyhedralSurf;
+
+typedef boost::graph_traits<PolyhedralSurf>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<PolyhedralSurf>::vertex_iterator   vertex_iterator;
+typedef boost::graph_traits<PolyhedralSurf>::face_descriptor   face_descriptor;
+
+typedef T_PolyhedralSurf_rings<PolyhedralSurf> Poly_rings;
+typedef CGAL::Monge_via_jet_fitting<Kernel>    Monge_via_jet_fitting;
+typedef Monge_via_jet_fitting::Monge_form      Monge_form;
+
+typedef PolyhedralSurf::Property_map<vertex_descriptor,FT> VertexFT_property_map;
+typedef PolyhedralSurf::Property_map<vertex_descriptor,Vector_3> VertexVector_property_map;
+//RIDGES
+typedef CGAL::Ridge_line<PolyhedralSurf> Ridge_line;
+typedef CGAL::Ridge_approximation < PolyhedralSurf,
+				    VertexFT_property_map,
+				    VertexVector_property_map > Ridge_approximation;
+//UMBILICS
+typedef CGAL::Umbilic<PolyhedralSurf> Umbilic;
+typedef CGAL::Umbilic_approximation < PolyhedralSurf,
+				      VertexFT_property_map,
+				      VertexVector_property_map > Umbilic_approximation;
+
+//create property maps
+
+PolyhedralSurf::Property_map<vertex_descriptor,FT> 
+vertex_k1_pm, vertex_k2_pm,
+  vertex_b0_pm, vertex_b3_pm,
+  vertex_P1_pm, vertex_P2_pm;
+
+PolyhedralSurf::Property_map<vertex_descriptor,Vector_3> vertex_d1_pm, vertex_d2_pm;
+
+PolyhedralSurf::Property_map<face_descriptor,Vector_3> face2normal_pm;
+
+// default fct parameter values and global variables
+unsigned int d_fitting = 3;
+unsigned int d_monge = 3;
+unsigned int nb_rings = 0;//seek min # of rings to get the required #pts
+unsigned int nb_points_to_use = 0;//
+CGAL::Ridge_order tag_order = CGAL::Ridge_order_3;
+double umb_size = 2;
+bool verbose = false;
+unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+
+/* gather points around the vertex v using rings on the
+   polyhedralsurf. the collection of points resorts to 3 alternatives:
+   1. the exact number of points to be used
+   2. the exact number of rings to be used
+   3. nothing is specified
+*/
+template <typename VertexPointMap>
+void gather_fitting_points(vertex_descriptor v,
+			   std::vector<Point_3> &in_points,
+			   Poly_rings& poly_rings,
+                           VertexPointMap vpm)
+{
+  //container to collect vertices of v on the PolyhedralSurf
+  std::vector<vertex_descriptor> gathered;
+  //initialize
+  in_points.clear();
+
+  //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect
+  //enough rings and discard some points of the last collected ring to
+  //get the exact "nb_points_to_use"
+  if ( nb_points_to_use != 0 ) {
+    poly_rings.collect_enough_rings(v, nb_points_to_use, gathered);
+    if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use);
+  }
+  else { // nb_points_to_use=0, this is the default and the option -p is not considered;
+    // then option -a nb_rings is checked. If nb_rings=0, collect
+    // enough rings to get the min_nb_points required for the fitting
+    // else collect the nb_rings required
+    if ( nb_rings == 0 )
+      poly_rings.collect_enough_rings(v, min_nb_points, gathered);
+    else poly_rings.collect_i_rings(v, nb_rings, gathered);
+  }
+
+  //store the gathered points
+  std::vector<vertex_descriptor>::const_iterator
+    itb = gathered.begin(), ite = gathered.end();
+  CGAL_For_all(itb,ite) in_points.push_back(get(vpm,*itb));
+}
+
+/* Use the jet_fitting package and the class Poly_rings to compute
+   diff quantities.
+*/
+void compute_differential_quantities(PolyhedralSurf& P, Poly_rings& poly_rings)
+{
+  //container for approximation points
+  std::vector<Point_3> in_points;
+
+  typedef boost::property_map<PolyhedralSurf,CGAL::vertex_point_t>::type VPM;
+  VPM vpm = get(CGAL::vertex_point,P);
+
+  //MAIN LOOP
+  vertex_iterator vitb = P.vertices_begin(), vite = P.vertices_end();
+  for (; vitb != vite; vitb++) {
+    //initialize
+    vertex_descriptor v = * vitb;
+    in_points.clear();
+    Monge_form monge_form;
+    Monge_via_jet_fitting monge_fit;
+
+    //gather points around the vertex using rings
+    gather_fitting_points(v, in_points, poly_rings, vpm);
+
+    //exit if the nb of points is too small
+    if ( in_points.size() < min_nb_points )
+      {std::cerr << "Too few points to perform the fitting" << std::endl; exit(1);}
+
+    //For Ridges we need at least 3rd order info
+    assert( d_monge >= 3);
+    // run the main fct : perform the fitting
+    monge_form = monge_fit(in_points.begin(), in_points.end(),
+			   d_fitting, d_monge);
+
+    //switch min-max ppal curv/dir wrt the mesh orientation
+    const Vector_3 normal_mesh = computeFacetsAverageUnitNormal(P,v, face2normal_pm, Kernel());
+    monge_form.comply_wrt_given_normal(normal_mesh);
+
+    //Store monge data needed for ridge computations in property maps
+    vertex_d1_pm[v] = monge_form.maximal_principal_direction();
+    vertex_d2_pm[v] = monge_form.minimal_principal_direction();
+    vertex_k1_pm[v] = monge_form.coefficients()[0];
+    vertex_k2_pm[v] = monge_form.coefficients()[1];
+    vertex_b0_pm[v] = monge_form.coefficients()[2];
+    vertex_b3_pm[v] = monge_form.coefficients()[5];
+    if ( d_monge >= 4) {
+      //= 3*b1^2+(k1-k2)(c0-3k1^3)
+      vertex_P1_pm[v] =
+	3*monge_form.coefficients()[3]*monge_form.coefficients()[3]
+	+(monge_form.coefficients()[0]-monge_form.coefficients()[1])
+	*(monge_form.coefficients()[6]
+	  -3*monge_form.coefficients()[0]*monge_form.coefficients()[0]
+	  *monge_form.coefficients()[0]);
+      //= 3*b2^2+(k2-k1)(c4-3k2^3)
+      vertex_P2_pm[v] =
+	3*monge_form.coefficients()[4]*monge_form.coefficients()[4]
+	+(-monge_form.coefficients()[0]+monge_form.coefficients()[1])
+	*(monge_form.coefficients()[10]
+	  -3*monge_form.coefficients()[1]*monge_form.coefficients()[1]
+	  *monge_form.coefficients()[1]);
+    }
+  } //END FOR LOOP
+}
+
+
+///////////////MAIN///////////////////////////////////////////////////////
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+int main(int argc, char *argv[])
+#else
+int main()
+#endif
+{
+  std::string if_name, of_name;// of_name same as if_name with '/' -> '_'
+
+  try {
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+   unsigned int int_tag;
+   po::options_description desc("Allowed options");
+    desc.add_options()
+      ("help,h", "produce help message.")
+      ("input-file,f", po::value<std::string>(&if_name)->default_value("data/poly2x^2+y^2-0.062500.off"),
+       "name of the input off file")
+      ("degree-jet,d", po::value<unsigned int>(&d_fitting)->default_value(3),
+       "degree of the jet,  3 <= degre-jet <= 4")
+      ("degree-monge,m", po::value<unsigned int>(&d_monge)->default_value(3),
+       "degree of the Monge rep, 3<= degree-monge <= degree-jet")
+      ("nb-rings,a", po::value<unsigned int>(&nb_rings)->default_value(0),
+       "number of rings to collect neighbors. 0 means collect enough rings to make appro possible a>=1 fixes the nb of rings to be collected")
+      ("nb-points,p", po::value<unsigned int>(&nb_points_to_use)->default_value(0),
+       "number of neighbors to use.  0 means this option is not considered, this is the default p>=1 fixes the nb of points to be used")
+      ("ridge_order,t", po::value<unsigned int>(&int_tag)->default_value(3),
+       "Order of differential quantities used, must be 3 or 4")
+      ("umbilic-patch-size,u", po::value<double>(&umb_size)->default_value(2),
+       "size of umbilic patches (as multiple of 1ring size)")
+      ("verbose,v", po::value<bool>(&verbose)->default_value(false),
+       "verbose output on text file")
+      ;
+
+    po::variables_map vm;
+    po::store(po::parse_command_line(argc, argv, desc), vm);
+    po::notify(vm);
+
+    if (vm.count("help")) {
+      std::cerr << desc << "\n";
+      return 1;
+    }
+
+
+    if (vm.count("ridge_order")){
+      if ( int_tag == 3 ) tag_order = CGAL::Ridge_order_3;
+      if ( int_tag == 4 ) tag_order = CGAL::Ridge_order_4;
+      if ( int_tag != 3 && int_tag != 4 )
+	{std::cerr << "ridge_order must be CGAL::Ridge_order_3 or CGAL::Ridge_order_4";
+	  return 1;}
+    }
+#else 
+    std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
+    if_name = "data/poly2x^2+y^2-0.062500.off";
+    d_fitting = 3;
+    d_monge = 3;
+    nb_rings = 0;
+    nb_points_to_use = 0;
+    umb_size = 2;
+    verbose = false;
+#endif
+  }
+
+  catch(std::exception& e) {
+    std::cerr << "error: " << e.what() << "\n";
+    return 1;
+    }
+    catch(...) {
+      std::cerr << "Exception of unknown type!\n";
+    }
+
+  //modify global variables
+  min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2;
+
+  //prepare output file names
+  assert(!if_name.empty());
+  of_name = if_name;
+  for(unsigned int i=0; i<of_name.size(); i++)
+    if (of_name[i] == '/') of_name[i]='_';
+  std::ostringstream str_4ogl;
+  str_4ogl << "data/"
+	   << of_name << "RIDGES"
+	   << "-d" << d_fitting
+	   << "-m" << d_monge
+	   << "-t" << tag_order
+	   << "-a" << nb_rings
+	   << "-p" << nb_points_to_use
+	   << ".4ogl.txt";
+  std::cout << str_4ogl.str() << std::endl ;
+  std::ofstream out_4ogl(str_4ogl.str().c_str() , std::ios::out);
+
+  //if verbose only...
+  std::ostringstream str_verb;
+  str_verb << "data/"
+	   << of_name << "RIDGES"
+	   << "-d" << d_fitting
+	   << "-m" << d_monge
+	   << "-t" << tag_order
+	   << "-a" << nb_rings
+	   << "-p" << nb_points_to_use
+	   << ".verb.txt";
+  std::cout << str_verb.str() << std::endl ;
+  std::ofstream out_verb(str_verb.str().c_str() , std::ios::out);
+
+  //load the model from <mesh.off>
+  PolyhedralSurf P;
+  std::ifstream stream(if_name.c_str());
+  stream >> P;
+  fprintf(stderr, "loadMesh %d Ves %d Facets\n",
+	  (int)num_vertices(P), (int)num_faces(P));
+  if(verbose)
+    out_verb << "Polysurf with " << num_vertices(P)
+	     << " vertices and " << num_faces(P)
+	     << " facets. " << std::endl;
+
+
+vertex_k1_pm = P.add_property_map<vertex_descriptor,FT>("v:k1",0).first;
+vertex_k2_pm = P.add_property_map<vertex_descriptor,FT>("v:k2",0).first;
+vertex_b0_pm = P.add_property_map<vertex_descriptor,FT>("v:b0",0).first; 
+vertex_b3_pm = P.add_property_map<vertex_descriptor,FT>("v:b3",0).first;
+vertex_P1_pm = P.add_property_map<vertex_descriptor,FT>("v:P1",0).first; 
+vertex_P2_pm = P.add_property_map<vertex_descriptor,FT>("v:P2",0).first;
+
+vertex_d1_pm = P.add_property_map<vertex_descriptor,Vector_3>("v:d1",Vector_3(0,0,0)).first;
+vertex_d2_pm = P.add_property_map<vertex_descriptor,Vector_3>("v:d2",Vector_3(0,0,0)).first;
+
+face2normal_pm = P.add_property_map<face_descriptor,Vector_3>("f:n",Vector_3(0,0,0)).first;
+
+  //exit if not enough points in the model
+  if (min_nb_points > num_vertices(P))
+    {std::cerr << "not enough points in the model" << std::endl;   exit(1);}
+
+  //initialize Polyhedral data : normal of facets
+  compute_facets_normals(P,face2normal_pm, Kernel());
+
+  //create a Poly_rings object
+  Poly_rings poly_rings(P);
+
+  std::cout << "Compute differential quantities via jet fitting..." << std::endl;
+  //initialize the diff quantities property maps
+  compute_differential_quantities(P, poly_rings);
+
+  //---------------------------------------------------------------------------
+  //Ridges
+  //--------------------------------------------------------------------------
+  std::cout << "Compute ridges..." << std::endl;
+  Ridge_approximation ridge_approximation(P,
+					  vertex_k1_pm, vertex_k2_pm,
+					  vertex_b0_pm, vertex_b3_pm,
+					  vertex_d1_pm, vertex_d2_pm,
+					  vertex_P1_pm, vertex_P2_pm );
+  std::vector<Ridge_line*> ridge_lines;
+  std::back_insert_iterator<std::vector<Ridge_line*> > ii(ridge_lines);
+
+  //Find MAX_RIDGE, MIN_RIDGE, CREST_RIDGES
+  //   ridge_approximation.compute_max_ridges(ii, tag_order);
+  //   ridge_approximation.compute_min_ridges(ii, tag_order);
+  ridge_approximation.compute_crest_ridges(ii, tag_order);
+
+  // or with the global function
+  CGAL::compute_max_ridges(P,
+			   vertex_k1_pm, vertex_k2_pm,
+			   vertex_b0_pm, vertex_b3_pm,
+			   vertex_d1_pm, vertex_d2_pm,
+			   vertex_P1_pm, vertex_P2_pm,
+			   ii, tag_order);
+
+  std::vector<Ridge_line*>::iterator iter_lines = ridge_lines.begin(),
+    iter_end = ridge_lines.end();
+  //OpenGL output
+
+  typedef boost::property_map<PolyhedralSurf,CGAL::vertex_point_t>::type VPM;
+  VPM vpm = get(CGAL::vertex_point,P);
+
+  for (;iter_lines!=iter_end;iter_lines++) (*iter_lines)->dump_4ogl(out_4ogl, vpm);
+
+
+  for (iter_lines = ridge_lines.begin();iter_lines!=iter_end;iter_lines++){
+    //verbose txt output
+    if (verbose){
+      (*iter_lines)->dump_verbose(out_verb,vpm);
+    }
+    delete *iter_lines;
+    }
+
+  //---------------------------------------------------------------------------
+  // UMBILICS
+  //--------------------------------------------------------------------------
+  std::cout << "Compute umbilics..." << std::endl;
+  std::vector<Umbilic*> umbilics;
+  std::back_insert_iterator<std::vector<Umbilic*> > umb_it(umbilics);
+
+  //explicit construction of the class
+ //  Umbilic_approximation umbilic_approximation(P,
+// 					      vertex_k1_pm, vertex_k2_pm,
+// 					      vertex_d1_pm, vertex_d2_pm);
+//   umbilic_approximation.compute(umb_it, umb_size);
+  //or global function call
+  CGAL::compute_umbilics(P,
+			 vertex_k1_pm, vertex_k2_pm,
+			 vertex_d1_pm, vertex_d2_pm,
+			 umb_it, umb_size);
+
+  std::vector<Umbilic*>::iterator iter_umb = umbilics.begin(),
+    iter_umb_end = umbilics.end();
+  // output
+  std::cout << "nb of umbilics " << umbilics.size() << std::endl;
+  for (;iter_umb!=iter_umb_end;iter_umb++) std::cout << **iter_umb;
+
+  //verbose txt output
+  if (verbose) {
+    out_verb << "nb of umbilics " << umbilics.size() << std::endl;
+  }
+  for ( iter_umb = umbilics.begin();iter_umb!=iter_umb_end;iter_umb++){
+    if (verbose) {
+      out_verb << **iter_umb;
+    }
+    delete *iter_umb;
+  }
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Ridges_3/compute_normals.h b/3rdparty/CGAL-4.8/examples/Ridges_3/compute_normals.h
new file mode 100644
index 0000000..4df6179
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Ridges_3/compute_normals.h
@@ -0,0 +1,62 @@
+#ifndef COMPUTE_NORMALS_H
+#define COMPUTE_NORMALS_H
+
+#include <CGAL/boost/graph/helpers.h>
+
+#include <boost/foreach.hpp>
+
+template <typename TriangleMesh, typename FaceVectorMap, typename Kernel>
+const typename Kernel::Vector_3 
+computeFacetsAverageUnitNormal(const TriangleMesh& tm,
+                               typename boost::graph_traits<TriangleMesh>::vertex_descriptor v,
+                               FaceVectorMap fvm,
+                               const Kernel& )
+{
+  typename boost::graph_traits<TriangleMesh>::halfedge_descriptor h;
+  typename boost::graph_traits<TriangleMesh>::face_descriptor f;
+  typename Kernel::Vector_3 sum(0., 0., 0.), n;
+
+  CGAL::Halfedge_around_target_circulator<TriangleMesh> hedgeb(halfedge(v,tm),tm), hedgee = hedgeb;
+
+  do
+    {
+      h = *hedgeb;
+      if (is_border_edge(h,tm))
+	{
+	  hedgeb++;
+	  continue;
+	}
+
+      f =  face(h,tm);
+      n = get(fvm,f);
+      sum = (sum + n);
+      hedgeb++;
+    }
+  while (hedgeb != hedgee);
+  sum = sum / std::sqrt(sum * sum);
+  return sum;
+}
+
+template <typename TriangleMesh, typename FaceVectorMap,typename Kernel>
+void compute_facets_normals(const TriangleMesh& tm,
+                            FaceVectorMap fvm,
+                            const Kernel& )
+{
+  typedef typename boost::property_traits<FaceVectorMap>::value_type Vector_3;
+
+  typedef typename boost::property_map<TriangleMesh,CGAL::vertex_point_t>::const_type VPM;
+  VPM vpm = get(CGAL::vertex_point,tm);
+  BOOST_FOREACH(typename boost::graph_traits<TriangleMesh>::face_descriptor f, faces(tm)){
+    typename boost::graph_traits<TriangleMesh>::halfedge_descriptor h = halfedge(f,tm);
+    Vector_3 normal = 
+      CGAL::cross_product(get(vpm, target(h,tm)) -
+			    get(vpm, target(opposite(h,tm),tm)),
+                          get(vpm, target(next(h,tm),tm)) -
+			    get(vpm, target(opposite(h,tm),tm)));
+      put(fvm, f, normal / CGAL::sqrt(normal * normal));
+  }
+}
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/data/poly2x^2+y^2-0.062500.off b/3rdparty/CGAL-4.8/examples/Ridges_3/data/poly2x^2+y^2-0.062500.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Ridges_3/data/poly2x^2+y^2-0.062500.off
rename to 3rdparty/CGAL-4.8/examples/Ridges_3/data/poly2x^2+y^2-0.062500.off
diff --git a/3rdparty/CGAL-4.6/examples/Ridges_3/skip_vcproj_auto_generation b/3rdparty/CGAL-4.8/examples/Ridges_3/skip_vcproj_auto_generation
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Ridges_3/skip_vcproj_auto_generation
rename to 3rdparty/CGAL-4.8/examples/Ridges_3/skip_vcproj_auto_generation
diff --git a/3rdparty/CGAL-4.8/examples/STL_Extension/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/STL_Extension/CMakeLists.txt
new file mode 100644
index 0000000..5501caa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/STL_Extension/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( STL_Extension_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Default.cpp" )
+  create_single_source_cgal_program( "Dispatch_output_iterator.cpp" )
+  create_single_source_cgal_program( "in_place_list_prog.cpp" )
+  create_single_source_cgal_program( "min_element_if_example.cpp" )
+  create_single_source_cgal_program( "min_max_element_example.cpp" )
+  create_single_source_cgal_program( "unordered_map.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/Default.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/Default.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/STL_Extension/Default.cpp
rename to 3rdparty/CGAL-4.8/examples/STL_Extension/Default.cpp
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/Dispatch_output_iterator.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/Dispatch_output_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/STL_Extension/Dispatch_output_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/STL_Extension/Dispatch_output_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/in_place_list_prog.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/in_place_list_prog.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/STL_Extension/in_place_list_prog.cpp
rename to 3rdparty/CGAL-4.8/examples/STL_Extension/in_place_list_prog.cpp
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/min_element_if_example.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/min_element_if_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/STL_Extension/min_element_if_example.cpp
rename to 3rdparty/CGAL-4.8/examples/STL_Extension/min_element_if_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/STL_Extension/min_max_element_example.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/min_max_element_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/STL_Extension/min_max_element_example.cpp
rename to 3rdparty/CGAL-4.8/examples/STL_Extension/min_max_element_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/STL_Extension/unordered_map.cpp b/3rdparty/CGAL-4.8/examples/STL_Extension/unordered_map.cpp
new file mode 100644
index 0000000..a4ddbea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/STL_Extension/unordered_map.cpp
@@ -0,0 +1,19 @@
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+#include <boost/unordered_map.hpp>
+
+
+typedef CGAL::Simple_cartesian<double>  Kernel;
+typedef Kernel::Point_3                 Point_3;
+typedef CGAL::Surface_mesh<Point_3>     Mesh;
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+
+int main()
+{ 
+  boost::unordered_map<vertex_descriptor, int> bum;
+  Mesh mesh;
+  vertex_descriptor vd  = mesh.add_vertex();
+  bum[vd] = 7812;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/CMakeLists.txt
new file mode 100644
index 0000000..392adad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/CMakeLists.txt
@@ -0,0 +1,40 @@
+project( Scale_space )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+find_package( CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+  include( ${CGAL_USE_FILE} )
+
+  # Activate concurrency?
+  option(ACTIVATE_CONCURRENCY
+         "Enable concurrency"
+         ON)
+ 
+  if( ACTIVATE_CONCURRENCY )
+    find_package( TBB )
+    if( TBB_FOUND )
+      include( ${TBB_USE_FILE} )
+      list( APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES} )
+    else()
+      message( STATUS "NOTICE: Intel TBB NOT found! The example is faster if TBB is linked." )
+    endif()
+  endif()
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  find_package( Eigen3 3.1.0 )
+  if( EIGEN3_FOUND )
+    include( ${EIGEN3_USE_FILE} )
+    create_single_source_cgal_program( "scale_space.cpp" )
+    create_single_source_cgal_program( "scale_space_incremental.cpp" )
+    create_single_source_cgal_program( "scale_space_manifold.cpp" )
+  else()
+    message( STATUS "NOTICE: The example needs Eigen 3.1 (or greater) and will not be compiled." )
+  endif()
+else()
+  
+  message( STATUS "This program requires the CGAL library, and will not be compiled." )
+  
+endif()
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/data/kitten.off b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/data/kitten.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/data/kitten.off
rename to 3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/data/kitten.off
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cmd b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space.cmd
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cmd
copy to 3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space.cpp b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space.cpp
new file mode 100644
index 0000000..9c40045
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space.cpp
@@ -0,0 +1,55 @@
+
+#include <fstream>
+#include <iostream>
+
+#include <CGAL/Scale_space_surface_reconstruction_3.h>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/IO/read_off_points.h>
+#include <CGAL/Timer.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel     Kernel;
+
+typedef CGAL::Scale_space_surface_reconstruction_3< Kernel >    Reconstruction;
+
+typedef Reconstruction::Point                                   Point;
+typedef std::vector< Point >                                    Point_collection;
+
+typedef Reconstruction::Triple_const_iterator                   Triple_iterator;
+typedef CGAL::Timer Timer;
+
+int main(int argc, char* argv[]) {
+    if (argc!=2){
+      std::cerr << "Error, no input file provided\n";
+      return 1;
+    }
+    // Read the data.
+    Point_collection points;
+    std::ifstream in(argv[1]);
+    std::cerr << "Reading " << std::flush;
+    if( !in || !CGAL::read_off_points( in, std::back_inserter( points ) ) ) {
+        std::cerr << "Error: cannot read file" << std::endl;
+        return EXIT_FAILURE;
+    }
+    std::cerr << "done: " << points.size() << " points." << std::endl;
+
+    Timer t;
+    t.start();
+	// Construct the mesh in a scale space.
+	Reconstruction reconstruct( 10, 200 );
+	reconstruct.reconstruct_surface( points.begin(), points.end(), 4 );
+        std::cerr << "Reconstruction done in " << t.time() << " sec." << std::endl;
+        t.reset();
+    std::ofstream out ("out.off");
+    // Write the reconstruction.
+    std::cerr << "Neighborhood radius^2 = " << reconstruct.neighborhood_squared_radius() << std::endl;
+    for( std::size_t shell = 0; shell < reconstruct.number_of_shells(); ++shell ) {
+        std::cerr << "Shell " << shell << std::endl;
+        for( Triple_iterator it = reconstruct.shell_begin( shell ); it != reconstruct.shell_end( shell ); ++it )
+          out << "3 "<< *it << '\n'; // We write a '3' in front so that it can be assembled into an OFF file
+    }
+        std::cerr << "Writing result in " << t.time() << " sec." << std::endl;
+    std::cerr << "Done." << std::endl;
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space_incremental.cmd b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_incremental.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space_incremental.cmd
rename to 3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_incremental.cmd
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp
rename to 3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cmd b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Scale_space_reconstruction_3/scale_space.cmd
rename to 3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp
new file mode 100644
index 0000000..3b9a2db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp
@@ -0,0 +1,69 @@
+
+#include <fstream>
+#include <iostream>
+
+#include <CGAL/Scale_space_surface_reconstruction_3.h>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/IO/read_off_points.h>
+#include <CGAL/Timer.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel     Kernel;
+
+typedef CGAL::Scale_space_surface_reconstruction_3< Kernel >    Reconstruction;
+
+typedef Reconstruction::Point                                   Point;
+typedef std::vector< Point >                                    Point_collection;
+
+typedef Reconstruction::Triple_const_iterator                   Triple_iterator;
+typedef CGAL::Timer Timer;
+
+int main(int argc, char* argv[]) {
+  if (argc!=2){
+    std::cerr << "Error, no input file provided\n";
+    return 1;
+  }
+  // Read the data.
+  Point_collection points;
+  std::ifstream in(argv[1]);
+  std::cerr << "Reading " << std::flush;
+  if( !in || !CGAL::read_off_points( in, std::back_inserter( points ) ) ) {
+    std::cerr << "Error: cannot read file" << std::endl;
+    return EXIT_FAILURE;
+  }
+  std::cerr << "done: " << points.size() << " points." << std::endl;
+
+  Timer t;
+  t.start();
+  // Construct the mesh in a scale space.
+  Reconstruction reconstruct( 10, 200 );
+  
+  reconstruct.reconstruct_surface( points.begin(), points.end(), 4,
+				   false, // Do not separate shells
+				   true // Force manifold output
+				   );
+  
+  std::cerr << "Reconstruction done in " << t.time() << " sec." << std::endl;
+  t.reset();
+  std::ofstream out ("out.off");
+  // Write the reconstruction.
+  for( Triple_iterator it = reconstruct.surface_begin( ); it != reconstruct.surface_end(  ); ++it )
+    out << "3 "<< *it << '\n'; // We write a '3' in front so that it can be assembled into an OFF file
+
+  std::cerr << "Writing result in " << t.time() << " sec." << std::endl;
+
+  out.close();
+
+  t.reset();
+  std::ofstream garbage ("garbage.off");
+  // Write facets that were removed to force manifold output
+  for( Triple_iterator it = reconstruct.garbage_begin( ); it != reconstruct.garbage_end(  ); ++it )
+    garbage << "3 "<< *it << '\n'; // We write a '3' in front so that it can be assembled into an OFF file
+  std::cerr << "Writing garbage facets in " << t.time() << " sec." << std::endl;
+
+  garbage.close ();
+
+  std::cerr << "Done." << std::endl;
+  return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/CMakeLists.txt
new file mode 100644
index 0000000..4be5765
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Segment_Delaunay_graph_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "sdg-count-sites.cpp" )
+  create_single_source_cgal_program( "sdg-fast-sp-polygon.cpp" )
+  create_single_source_cgal_program( "sdg-fast-sp.cpp" )
+  create_single_source_cgal_program( "sdg-filtered-traits.cpp" )
+  create_single_source_cgal_program( "sdg-info-set.cpp" )
+  create_single_source_cgal_program( "sdg-red-blue-info.cpp" )
+  create_single_source_cgal_program( "sdg-voronoi-edges.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sites.cin
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites.cin
copy to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sites.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites2.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sites2.cin
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites2.cin
copy to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sites2.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesx.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesx.cin
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesx.cin
copy to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesx.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesxx.cin
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.cin
copy to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesxx.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin
similarity index 100%
copy from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin
copy to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-count-sites.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-count-sites.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-count-sites.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-count-sites.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-fast-sp-polygon.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-fast-sp-polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-fast-sp-polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-fast-sp-polygon.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-fast-sp.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-fast-sp.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-fast-sp.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-fast-sp.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-filtered-traits.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-filtered-traits.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-filtered-traits.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-filtered-traits.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-info-set.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-info-set.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-info-set.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-info-set.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp
new file mode 100644
index 0000000..e32b0eb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-red-blue-info.cpp
@@ -0,0 +1,137 @@
+#include <CGAL/Random.h>
+
+// example that shows how to add info to input sites and how this is
+// propagated using the storage traits with info
+//
+// the input sites are considered to be colored either red of blue;
+// points on the plane belonging to sites of different colors become
+// purple.
+
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// an enum representing the color
+enum Red_blue {
+  RED = 1,
+  BLUE = 2,
+  PURPLE = 3
+};
+
+// output operator for the color
+std::ostream&
+operator<<(std::ostream& os, const Red_blue& rb)
+{
+  if ( rb == RED ) { os << "Red"; }
+  else if ( rb == BLUE ) { os << "Blue"; }
+  else if ( rb == PURPLE ) { os << "Purple"; }
+  return os;
+}
+
+// functor that defines how to convert color info when:
+// 1. constructing the storage site of an endpoint of a segment
+// 2. a segment site is split into two sub-segments
+struct Red_blue_convert_info
+{
+  typedef Red_blue      Info;
+  typedef const Info&   result_type;
+
+  inline
+  const Info& operator()(const Info& info0, bool) const {
+    // just return the info of the supporting segment
+    return info0;
+  }
+
+  inline
+  const Info& operator()(const Info& info0, const Info& , bool) const {
+    // just return the info of the supporting segment
+    return info0;
+  }
+};
+
+
+// functor that defines how to merge color info when a site (either
+// point or segment) corresponds to point(s) on plane belonging to
+// more than one input site
+struct Red_blue_merge_info
+{
+  typedef Red_blue   Info;
+  typedef Info       result_type;
+
+  inline
+  Info operator()(const Info& info0, const Info& info1) const {
+    // if the two sites defining the new site have the same info, keep
+    // this common info
+    if ( info0 == info1 ) { return info0; }
+    // otherwise the new site should be purple
+    return PURPLE;
+  }
+};
+
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+// typedefs for the geometric traits, storage traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_2.h>
+#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<K> Gt;
+
+// define the storage traits with info
+typedef
+CGAL::Segment_Delaunay_graph_storage_traits_with_info_2<Gt,
+							Red_blue,
+							Red_blue_convert_info,
+							Red_blue_merge_info>
+ST;
+
+typedef CGAL::Segment_Delaunay_graph_2<Gt,ST>  SDG2;
+
+typedef SDG2::Finite_vertices_iterator  FVIT;
+typedef SDG2::Site_2                    Site_2;
+
+
+int main()
+{
+
+  std::ifstream ifs("data/sitesxx.rb.cin");
+  assert( ifs );
+
+  SDG2 sdg;
+  Site_2 site;
+
+  // read the sites and their info and insert them in the
+  // segment Delaunay graph; print them as you read them
+  std::cout << std::endl;
+  std::cout << "Input sites:" << std::endl;
+  std::cout << "------------" << std::endl;
+  while ( ifs >> site ) {
+    char c;
+    ifs >> c;
+    Red_blue info = (c == 'r') ? RED : BLUE;
+    std::cout << site << std::flush;
+    std::cout << "\r\t\t\t" << info << std::endl;
+    sdg.insert(site, info);
+  }
+  std::cout << std::endl;
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true, 1) );
+
+  // print the sites of the segment Delaunay graph and their info
+  std::cout << std::endl << std::endl;
+  std::cout << "Output sites:" << std::endl;
+  std::cout << "-------------" << std::endl;
+  for (FVIT it = sdg.finite_vertices_begin();
+       it != sdg.finite_vertices_end(); ++it) {
+    std::cout << it->site() << std::flush;
+    std::cout << "\r\t\t\t" << it->storage_site().info() << std::endl;
+  }
+  std::cout << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/CMakeLists.txt
new file mode 100644
index 0000000..84632aa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Segment_Delaunay_graph_Linf_2_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "sdg-count-sites-linf.cpp" )
+  create_single_source_cgal_program( "sdg-fast-sp-linf.cpp" )
+  create_single_source_cgal_program( "sdg-fast-sp-polygon-linf.cpp" )
+  create_single_source_cgal_program( "sdg-filtered-traits-linf.cpp" )
+  create_single_source_cgal_program( "sdg-info-set-linf.cpp" )
+  create_single_source_cgal_program( "sdg-red-blue-info-linf.cpp" )
+  create_single_source_cgal_program( "sdg-voronoi-edges-linf.cpp" )
+  create_single_source_cgal_program( "sdg-voronoi-edges-exact-linf.cpp" )
+  create_single_source_cgal_program( "print-sdg-linf.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sites.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites.cin
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sites.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites2.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sites2.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sites2.cin
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sites2.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesx.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesx.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesx.cin
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesx.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesxx.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.cin
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesxx.cin
diff --git a/3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesxx.rb.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Segment_Delaunay_graph_2/data/sitesxx.rb.cin
rename to 3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/data/sitesxx.rb.cin
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/print-sdg-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/print-sdg-linf.cpp
new file mode 100644
index 0000000..c669e72
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/print-sdg-linf.cpp
@@ -0,0 +1,56 @@
+// standard includes
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// define the kernel
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Filtered_kernel.h>
+
+typedef CGAL::Simple_cartesian<double>    CK;
+typedef CGAL::Filtered_kernel<CK>         Kernel;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_traits_2<Kernel>  Gt;
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>             SDG2;
+
+using namespace std;
+
+int main( int argc, char *argv[] ) {
+  if ( argc >= 3 ) {
+    std::cout << "usage: " << argv[0] << " [filename]" << std::endl;
+  }
+
+  ifstream ifs( (argc == 1) ? "data/sites2.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  // read the sites from the stream and insert them in the diagram
+  while ( ifs >> site ) {
+    sdg.insert( site );
+  }
+
+  ifs.close();
+
+  //std::cout << "About to validate diagram ..." << std::endl;
+
+  // validate the diagram
+  //assert( sdg.is_valid(true, 1) );
+  //cout << endl << endl;
+
+  //std::cout << "Diagram validated." << std::endl;
+  std::cout
+     << "About to print sdg for input file: "
+     << ((argc == 1) ? "data/sites2.cin" : argv[1])
+     << std::endl ;
+
+  sdg.file_output_verbose(std::cout);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-count-sites-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-count-sites-linf.cpp
new file mode 100644
index 0000000..8cf3277
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-count-sites-linf.cpp
@@ -0,0 +1,71 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// define the input kernel
+#include <CGAL/Simple_cartesian.h>
+typedef CGAL::Simple_cartesian<double>     CK;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<
+          CK,CGAL::Field_with_sqrt_tag>  Gt;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>      SDG2;
+
+using namespace std;
+
+int main( int argc, char *argv[] ) {
+  if ( ! (( argc == 1 ) || (argc == 2)) ) {
+    std::cout <<"usage: "<< argv[0] <<" [filename]\n";
+  }
+
+  ifstream ifs( (argc == 1) ? "data/sitesx.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  while ( ifs >> site ) { sdg.insert( site ); }
+
+  ifs.close();
+
+  assert( sdg.is_valid(true, 1) );
+  cout << endl << endl;
+
+  // print the number of input and output sites
+  cout << "# of input sites : " << sdg.number_of_input_sites() << endl;
+  cout << "# of output sites: " << sdg.number_of_output_sites() << endl;
+
+  unsigned int n_ipt(0), n_iseg(0), n_opt(0), n_oseg(0), n_ptx(0);
+
+  // count the number of input points and input segments
+  SDG2::Input_sites_iterator iit;
+  for (iit = sdg.input_sites_begin(); iit != sdg.input_sites_end(); ++iit)
+    {
+      if ( iit->is_point() ) { n_ipt++; } else { n_iseg++; }
+    }
+
+  // count the number of output points and output segments, as well
+  // as the number of points that are points of intersection of pairs
+  // of strongly intersecting sites
+  SDG2::Output_sites_iterator oit;
+  for (oit = sdg.output_sites_begin(); oit != sdg.output_sites_end(); ++oit)
+    {
+      if ( oit->is_segment() ) { n_oseg++; } else {
+        n_opt++;
+        if ( !oit->is_input() ) { n_ptx++; }
+      }
+    }
+
+  cout << endl << "# of input segments:  " << n_iseg << endl;
+  cout << "# of input points:    " << n_ipt << endl << endl;
+  cout << "# of output segments: " << n_oseg << endl;
+  cout << "# of output points:   " << n_opt << endl << endl;
+  cout << "# of intersection points: " << n_ptx << endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-linf.cpp
new file mode 100644
index 0000000..dae141f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-linf.cpp
@@ -0,0 +1,44 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// example that uses the filtered traits,
+// the segment Delaunay graph and the spatial sorting
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2<K> Gt;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>  SDG2;
+
+
+int main()
+{
+  std::ifstream ifs("data/sites.cin");
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  std::vector<SDG2::Site_2> sites;
+  // read the sites
+  while ( ifs >> site ) {
+    sites.push_back(site);
+  }
+
+  //insert the sites all at once using spatial sorting to speed the insertion
+  sdg.insert( sites.begin(), sites.end(),CGAL::Tag_true() );
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true, 1) );
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-polygon-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-polygon-linf.cpp
new file mode 100644
index 0000000..eba30b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-fast-sp-polygon-linf.cpp
@@ -0,0 +1,61 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// example that uses the filtered traits,
+// the segment Delaunay graph and the spatial sorting
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2<K> Gt;
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>  SDG2;
+
+
+int main()
+{
+  std::ifstream ifs("data/sites.cin");
+  assert( ifs );
+
+  //polygon points
+  std::vector<Gt::Point_2> points;
+  //segments of the polygon as a pair of point indices
+  std::vector<std::pair<std::size_t,std::size_t> > indices;
+
+  SDG2::Site_2 site;
+  //read a close polygon given by its segments
+  // s x0 y0 x1 y1
+  // s x1 y1 x2 y2
+  // ...
+  // s xn yn x0 y0
+  ifs >> site;
+  assert( site.is_segment() );
+  points.push_back( site.source_of_supporting_site() );
+
+  std::size_t k=0;
+  while ( ifs >> site ) {
+    assert( site.is_segment() );
+    points.push_back( site.source_of_supporting_site() );
+    indices.push_back( std::make_pair(k, k+1) );
+    ++k;
+  }
+  indices.push_back( std::make_pair(k, 0) );
+  ifs.close();
+
+  SDG2          sdg;
+
+  //insert the polygon segments all at once using spatial sorting to speed the insertion
+  sdg.insert_segments( points.begin(), points.end(), indices.begin(), indices.end() );
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true, 1) );
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-filtered-traits-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-filtered-traits-linf.cpp
new file mode 100644
index 0000000..1b17778
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-filtered-traits-linf.cpp
@@ -0,0 +1,44 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// example that uses the filtered traits and
+// the segment Delaunay graph hierarchy
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+typedef CGAL::Simple_cartesian<double> Rep;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<Rep> Gt;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_hierarchy_2<Gt>  SDG2;
+
+
+int main( int argc, char *argv[] )
+{
+  if ( ! (( argc == 1 ) || (argc == 2)) ) {
+    std::cout <<"usage: "<< argv[0] <<" [filename]\n";
+  }
+
+  std::ifstream ifs( (argc == 1) ? "data/sites.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  // read the sites and insert them in the segment Delaunay graph
+  while ( ifs >> site ) {
+    sdg.insert(site);
+  }
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true, 1) );
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-info-set-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-info-set-linf.cpp
new file mode 100644
index 0000000..b0d7347
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-info-set-linf.cpp
@@ -0,0 +1,246 @@
+// example that shows how to add info to input sites and how this is
+// propagated using the storage traits with info
+//
+// the input sites are considered to have a label (a character
+// associated with them)
+// points on the plane belonging to sites of different labels get all
+// the labels from the different sites they belong to.
+
+// standard includes
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <list>
+#include <cassert>
+
+// a class representing a set of info items
+template<class Info_item>  struct Info_set_merge_info;
+
+template<class Info_item_t>
+class Info_set
+{
+public:
+  typedef Info_item_t                         Info_item;
+
+private:
+  friend struct Info_set_merge_info<Info_item>;
+
+  typedef std::list<Info_item>                Info_list;
+
+public:
+  typedef typename Info_list::const_iterator  Info_item_iterator;
+  typedef typename Info_list::size_type       size_type;
+
+  Info_set() {}
+
+  Info_set(Info_item info) {
+    info_list_.push_back(info);
+  }
+
+  template<typename InputIterator>
+  Info_set(InputIterator first, InputIterator beyond)
+    : info_list_(first, beyond) {}
+
+  size_type size() const { return info_list_.size(); }
+  bool is_empty() const { return info_list_.empty(); }
+
+  Info_item_iterator info_items_begin() const {
+    return info_list_.begin();
+  }
+
+  Info_item_iterator info_items_end() const {
+    return info_list_.end();
+  }
+
+private:
+  // private constructor from list of info items
+  Info_set(Info_list info_list) : info_list_(info_list) {}
+
+  // private access to list of info items
+  const Info_list& info_list() const { return info_list_; }
+
+private:
+  Info_list info_list_;
+};
+
+
+// output operator for the set of info items; it assumes that the
+// output operator is defined for info items
+template<class Info_item>
+std::ostream&
+operator<<(std::ostream& os, const Info_set<Info_item>& info)
+{
+  if ( info.is_empty() ) {
+    return os << "{}";
+  }
+
+  typedef typename Info_set<Info_item>::Info_item_iterator iterator;
+  iterator last = --info.info_items_end();
+  os << "{";
+  for (iterator it = info.info_items_begin(); it != last; ++it) {
+    os << *it << ", ";
+  }
+  os << *last << "}";
+
+  return os;
+}
+
+// functor that defines how to convert color info when:
+// 1. constructing the storage site of an endpoint of a segment
+// 2. a segment site is split into two sub-segments
+template<class Info_item_t>
+struct Info_set_convert_info
+{
+  typedef Info_item_t                  Info_item;
+  typedef const Info_set<Info_item>&   result_type;
+
+  inline
+  result_type operator()(const Info_set<Info_item>& info0, bool) const
+  {
+    // just return the info of the supporting segment
+    return info0;
+  }
+
+  inline
+  result_type operator()(const Info_set<Info_item>& info0,
+			 const Info_set<Info_item>& , bool) const
+  {
+    // just return the info of the supporting segment
+    return info0;
+  }
+};
+
+
+// functor that defines how to merge info items when a site (either
+// point or segment) corresponds to point(s) on plane belonging to
+// more than one input site
+template<class Info_item_t>
+struct Info_set_merge_info
+{
+  typedef Info_item_t          Info_item;
+  typedef Info_set<Info_item>  result_type;
+
+  inline
+  Info_set<Info_item> operator()(const Info_set<Info_item>& info0,
+				 const Info_set<Info_item>& info1) const
+  {
+    typedef typename Info_set<Info_item>::Info_list       Info_list;
+
+    // return as new info the union of the two infos
+    Info_list info_union = info0.info_list();
+    Info_list copy = info1.info_list();
+
+    info_union.splice(info_union.end(), copy);
+    return info_union;
+  }
+};
+
+
+// finally a class that generates info when the info items are
+// std::strings
+struct Generate_info
+{
+  static unsigned int ctr;
+
+  template<class Site>
+  std::string operator()(const Site& t) const
+  {
+    if ( t.is_point() ) {
+      char c = 'A' + ctr++;
+      return std::string(1, c);
+    }
+    char c1 = 'A' + ctr++;
+    char c2 = 'A' + ctr++;
+    return std::string(1, c1) + std::string(1, c2);
+  }
+};
+
+unsigned int Generate_info::ctr = 0;
+
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+struct Rep : public CGAL::Simple_cartesian<double> {};
+
+// typedefs for the geometric traits, storage traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h>
+
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<Rep> Gt;
+
+// define the info and the convert and merge functors
+typedef std::string                         Info_item;
+typedef Info_set<Info_item>                 Info;
+typedef Info_set_convert_info<Info_item>    Convert_info;
+typedef Info_set_merge_info<Info_item>      Merge_info;
+
+
+// define the storage traits with info
+
+typedef
+CGAL::Segment_Delaunay_graph_storage_traits_with_info_2<Gt,
+                                                             Info,
+                                                             Convert_info,
+                                                             Merge_info>
+ST;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST> SDG2;
+
+typedef SDG2::Finite_vertices_iterator     FVIT;
+typedef SDG2::Site_2                       Site_2;
+
+
+int main( int argc, char *argv[] )
+{
+  if ( ! (( argc == 1 ) || (argc == 2)) ) {
+    std::cout <<"usage: "<< argv[0] <<" [filename]\n";
+  }
+
+  std::ifstream ifs( (argc == 1) ? "data/sitesxx.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2 sdg;
+  Site_2 site;
+  Generate_info generate;
+
+  // read the sites and their info and insert them in the
+  // segment Delaunay graph; print them as you read them
+  std::cout << std::endl;
+  std::cout << "Input sites:" << std::endl;
+  std::cout << "------------" << std::endl;
+  while ( ifs >> site ) {
+    Info info = generate(site);
+    std::cout << site << std::flush;
+    std::cout << "\r\t\t\t" << info << std::endl;
+    sdg.insert(site, info);
+  }
+  std::cout << std::endl;
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true) );
+
+  // print the sites of the segment Delaunay graph and their info
+  std::cout << std::endl;
+  std::cout << "Output sites:" << std::endl;
+  std::cout << "-------------" << std::endl;
+  for (FVIT it = sdg.finite_vertices_begin();
+       it != sdg.finite_vertices_end(); ++it) {
+    if ( it->site().is_point() ) {
+      std::cout << it->site() << std::flush;
+      std::cout << "\r\t\t\t" << it->storage_site().info() << std::endl;
+    }
+  }
+  for (FVIT it = sdg.finite_vertices_begin();
+       it != sdg.finite_vertices_end(); ++it) {
+    if ( it->site().is_segment() ) {
+      std::cout << it->site() << std::flush;
+      std::cout << "\r\t\t\t" << it->storage_site().info() << std::endl;
+    }
+  }
+  std::cout << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-red-blue-info-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-red-blue-info-linf.cpp
new file mode 100644
index 0000000..e90c2e6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-red-blue-info-linf.cpp
@@ -0,0 +1,139 @@
+#include <CGAL/Random.h>
+
+// example that shows how to add info to input sites and how this is
+// propagated using the storage traits with info
+//
+// the input sites are considered to be colored either red of blue;
+// points on the plane belonging to sites of different colors become
+// purple.
+
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// an enum representing the color
+enum Red_blue {
+  RED = 1,
+  BLUE = 2,
+  PURPLE = 3
+};
+
+// output operator for the color
+std::ostream&
+operator<<(std::ostream& os, const Red_blue& rb)
+{
+  if ( rb == RED ) { os << "Red"; }
+  else if ( rb == BLUE ) { os << "Blue"; }
+  else if ( rb == PURPLE ) { os << "Purple"; }
+  return os;
+}
+
+// functor that defines how to convert color info when:
+// 1. constructing the storage site of an endpoint of a segment
+// 2. a segment site is split into two sub-segments
+struct Red_blue_convert_info
+{
+  typedef Red_blue      Info;
+  typedef const Info&   result_type;
+
+  inline
+  const Info& operator()(const Info& info0, bool) const {
+    // just return the info of the supporting segment
+    return info0;
+  }
+
+  inline
+  const Info& operator()(const Info& info0, const Info& , bool) const {
+    // just return the info of the supporting segment
+    return info0;
+  }
+};
+
+
+// functor that defines how to merge color info when a site (either
+// point or segment) corresponds to point(s) on plane belonging to
+// more than one input site
+struct Red_blue_merge_info
+{
+  typedef Red_blue   Info;
+  typedef Info       result_type;
+
+  inline
+  Info operator()(const Info& info0, const Info& info1) const {
+    // if the two sites defining the new site have the same info, keep
+    // this common info
+    if ( info0 == info1 ) { return info0; }
+    // otherwise the new site should be purple
+    return PURPLE;
+  }
+};
+
+
+// choose the kernel
+#include <CGAL/Simple_cartesian.h>
+
+typedef CGAL::Simple_cartesian<double> Rep;
+
+// typedefs for the geometric traits, storage traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h>
+
+
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<Rep> Gt;
+
+// define the storage traits with info
+typedef
+CGAL::Segment_Delaunay_graph_storage_traits_with_info_2<Gt,
+                                                        Red_blue,
+                                                        Red_blue_convert_info,
+                                                        Red_blue_merge_info>
+ST;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt,ST>  SDG2;
+
+typedef SDG2::Finite_vertices_iterator  FVIT;
+typedef SDG2::Site_2                    Site_2;
+
+
+int main()
+{
+
+  std::ifstream ifs("data/sitesxx.rb.cin");
+  assert( ifs );
+
+  SDG2 sdg;
+  Site_2 site;
+
+  // read the sites and their info and insert them in the
+  // segment Delaunay graph; print them as you read them
+  std::cout << std::endl;
+  std::cout << "Input sites:" << std::endl;
+  std::cout << "------------" << std::endl;
+  while ( ifs >> site ) {
+    char c;
+    ifs >> c;
+    Red_blue info = (c == 'r') ? RED : BLUE;
+    std::cout << site << std::flush;
+    std::cout << "\r\t\t\t" << info << std::endl;
+    sdg.insert(site, info);
+  }
+  std::cout << std::endl;
+
+  // validate the segment Delaunay graph
+  assert( sdg.is_valid(true, 1) );
+
+  // print the sites of the segment Delaunay graph and their info
+  std::cout << std::endl << std::endl;
+  std::cout << "Output sites:" << std::endl;
+  std::cout << "-------------" << std::endl;
+  for (FVIT it = sdg.finite_vertices_begin();
+       it != sdg.finite_vertices_end(); ++it) {
+    std::cout << it->site() << std::flush;
+    std::cout << "\r\t\t\t" << it->storage_site().info() << std::endl;
+  }
+  std::cout << std::endl;
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-exact-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-exact-linf.cpp
new file mode 100644
index 0000000..3ae8d33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-exact-linf.cpp
@@ -0,0 +1,131 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+#include <string>
+
+// define the kernel
+
+// choose number type
+#ifdef CGAL_USE_GMP
+
+#  include <CGAL/Gmpq.h>
+typedef CGAL::Gmpq                     exact_ring_t;
+typedef CGAL::Gmpq                     exact_field_t;
+
+//namespace CGAL {
+//// needed for the drawing methods
+//Gmpq sqrt(const Gmpq& x) {
+//  return Gmpq(  CGAL::sqrt( CGAL::to_double(x) )  );
+//}
+//
+//} //namespace CGAL
+#else
+
+#  include <CGAL/MP_Float.h>
+#  include <CGAL/Quotient.h>
+typedef CGAL::MP_Float                 exact_ring_t;
+typedef CGAL::Quotient<exact_ring_t>   exact_field_t;
+
+#endif
+
+//typedef exact_ring_t   ring_number_t;
+typedef exact_field_t  field_number_t;
+
+#include <CGAL/Simple_cartesian.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_traits_2.h>
+
+//struct K_ring  : public CGAL::Simple_cartesian<ring_number_t> {};
+typedef CGAL::Simple_cartesian<field_number_t> K_field;
+
+typedef CGAL::Field_tag  MTag;
+
+typedef CGAL::Segment_Delaunay_graph_Linf_traits_2<K_field,MTag> Gt;
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>      SDG2;
+
+using namespace std;
+
+int main( int argc, char *argv[] ) {
+  if ( ! (( argc == 1 ) || (argc == 2)) ) {
+    std::cout <<"usage: "<< argv[0] <<" [filename]\n";
+  }
+
+  ifstream ifs( (argc == 1) ? "data/sites2.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  // read the sites from the stream and insert them in the diagram
+  while ( ifs >> site ) {
+    sdg.insert( site );
+    CGAL_SDG_DEBUG( sdg.file_output_verbose(std::cout); );
+    CGAL_assertion( sdg.is_valid(false, 1) );
+  }
+
+  ifs.close();
+
+
+  std::cout << "About to validate diagram ..." << std::endl;
+
+  // validate the diagram
+  assert( sdg.is_valid(false, 1) );
+  cout << endl << endl;
+
+  std::cout << "Diagram validated." << std::endl;
+
+  /*
+  // now walk through the non-infinite edges of the segment Delaunay
+  // graphs (which are dual to the edges in the Voronoi diagram) and
+  // print the sites defining each Voronoi edge.
+  //
+  // Each oriented Voronoi edge (horizontal segment in the figure
+  // below) is defined by four sites A, B, C and D.
+  //
+  //     \                     /
+  //      \         B         /
+  //       \                 /
+  //     C  -----------------  D
+  //       /                 \
+  //      /         A         \
+  //     /                     \
+  //
+  // The sites A and B define the (oriented) bisector on which the
+  // edge lies whereas the sites C and D, along with A and B define
+  // the two endpoints of the edge. These endpoints are the Voronoi
+  // vertices of the triples A, B, C and B, A, D.
+  // If one of these vertices is the vertex at infinity the string
+  // "infinite vertex" is printed; the corresponding Voronoi edge is
+  // actually a stright-line or parabolic ray.
+  // The sites below are printed in the order A, B, C, D.
+  */
+
+  string inf_vertex("infinite vertex");
+  char vid[] = {'A', 'B', 'C', 'D'};
+
+  SDG2::Finite_edges_iterator eit = sdg.finite_edges_begin();
+  for (int k = 1; eit != sdg.finite_edges_end(); ++eit, ++k) {
+    SDG2::Edge e = *eit;
+    // get the vertices defining the Voronoi edge
+    SDG2::Vertex_handle v[] = { e.first->vertex( sdg.ccw(e.second) ),
+                                e.first->vertex( sdg.cw(e.second) ),
+                                e.first->vertex( e.second ),
+                                sdg.tds().mirror_vertex(e.first, e.second) };
+
+    cout << "--- Edge " << k << " ---" << endl;
+    for (int i = 0; i < 4; i++) {
+      // check if the vertex is the vertex at infinity; if yes, print
+      // the corresponding string, otherwise print the site
+      if ( sdg.is_infinite(v[i]) ) {
+        cout << vid[i] << ": " << inf_vertex << endl;
+      } else {
+        cout << vid[i] << ": " << v[i]->site() << endl;
+      }
+    }
+    cout << endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-linf.cpp b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-linf.cpp
new file mode 100644
index 0000000..4f5fe1e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-linf.cpp
@@ -0,0 +1,104 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+#include <string>
+
+// define the kernel
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Filtered_kernel.h>
+
+typedef CGAL::Simple_cartesian<double>    CK;
+typedef CGAL::Filtered_kernel<CK>         Kernel;
+
+// typedefs for the traits and the algorithm
+#include <CGAL/Segment_Delaunay_graph_Linf_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+
+typedef CGAL::Segment_Delaunay_graph_Linf_traits_2<Kernel>  Gt;
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>             SDG2;
+
+using namespace std;
+
+int main( int argc, char *argv[] ) {
+  if ( ! (( argc == 1 ) || (argc == 2)) ) {
+    std::cout <<"usage: "<< argv[0] <<" [filename]\n";
+  }
+
+  ifstream ifs( (argc == 1) ? "data/sites2.cin" : argv[1] );
+  assert( ifs );
+
+  SDG2          sdg;
+  SDG2::Site_2  site;
+
+  // read the sites from the stream and insert them in the diagram
+  while ( ifs >> site ) {
+    sdg.insert( site );
+    CGAL_SDG_DEBUG( sdg.file_output_verbose(std::cout); );
+    CGAL_assertion( sdg.is_valid(false, 1) );
+  }
+
+  ifs.close();
+
+
+  std::cout << "About to validate diagram ..." << std::endl;
+
+  // validate the diagram
+  assert( sdg.is_valid(false, 1) );
+  cout << endl << endl;
+
+  std::cout << "Diagram validated." << std::endl;
+
+  /*
+  // now walk through the non-infinite edges of the segment Delaunay
+  // graphs (which are dual to the edges in the Voronoi diagram) and
+  // print the sites defining each Voronoi edge.
+  //
+  // Each oriented Voronoi edge (horizontal segment in the figure
+  // below) is defined by four sites A, B, C and D.
+  //
+  //     \                     /
+  //      \         B         /
+  //       \                 /
+  //     C  -----------------  D
+  //       /                 \
+  //      /         A         \
+  //     /                     \
+  //
+  // The sites A and B define the (oriented) bisector on which the
+  // edge lies whereas the sites C and D, along with A and B define
+  // the two endpoints of the edge. These endpoints are the Voronoi
+  // vertices of the triples A, B, C and B, A, D.
+  // If one of these vertices is the vertex at infinity the string
+  // "infinite vertex" is printed; the corresponding Voronoi edge is
+  // actually a stright-line or parabolic ray.
+  // The sites below are printed in the order A, B, C, D.
+  */
+
+  string inf_vertex("infinite vertex");
+  char vid[] = {'A', 'B', 'C', 'D'};
+
+  SDG2::Finite_edges_iterator eit = sdg.finite_edges_begin();
+  for (int k = 1; eit != sdg.finite_edges_end(); ++eit, ++k) {
+    SDG2::Edge e = *eit;
+    // get the vertices defining the Voronoi edge
+    SDG2::Vertex_handle v[] = { e.first->vertex( sdg.ccw(e.second) ),
+                                e.first->vertex( sdg.cw(e.second) ),
+                                e.first->vertex( e.second ),
+                                sdg.tds().mirror_vertex(e.first, e.second) };
+
+    cout << "--- Edge " << k << " ---" << endl;
+    for (int i = 0; i < 4; i++) {
+      // check if the vertex is the vertex at infinity; if yes, print
+      // the corresponding string, otherwise print the site
+      if ( sdg.is_infinite(v[i]) ) {
+        cout << vid[i] << ": " << inf_vertex << endl;
+      } else {
+        cout << vid[i] << ": " << v[i]->site() << endl;
+      }
+    }
+    cout << endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Skin_surface_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Skin_surface_3/CMakeLists.txt
new file mode 100644
index 0000000..d7f5d60
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Skin_surface_3/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+project( Skin_surface_3_example ) 
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL)
+
+
+
+
+if (CGAL_FOUND)
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE include)
+
+  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/NGHK_skin_surface_simple.cpp")
+    # The two following .cpp files are in dont_submit, and thus not in the
+    # internal releases.
+    create_single_source_cgal_program( "NGHK_skin_surface_simple.cpp" )
+    create_single_source_cgal_program( "NGHK_skin_surface_subdiv.cpp" )
+  endif()
+  create_single_source_cgal_program( "skin_surface_simple.cpp" )
+  create_single_source_cgal_program( "skin_surface_subdiv.cpp" )
+  create_single_source_cgal_program( "skin_surface_subdiv_with_normals.cpp" )
+  create_single_source_cgal_program( "union_of_balls_simple.cpp" )
+  create_single_source_cgal_program( "union_of_balls_subdiv.cpp" )  
+  
+  find_package(ESBTL)
+  if(ESBTL_FOUND)
+    include_directories( ${ESBTL_INCLUDE_DIR} )
+    create_single_source_cgal_program( "skin_surface_pdb_reader.cpp" )    
+  else(ESBTL_FOUND)
+    message(STATUS "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled.")  
+  endif(ESBTL_FOUND)
+
+else(CGAL_FOUND)
+
+  message(STATUS "NOTICE: This directory requires CGAL library, and will not be compiled.")
+
+endif(CGAL_FOUND)
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1IYE.pdb b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1IYE.pdb
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1IYE.pdb
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1IYE.pdb
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1mvm.pdb b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1mvm.pdb
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1mvm.pdb
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1mvm.pdb
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1t7i.pdb b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1t7i.pdb
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/1t7i.pdb
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/1t7i.pdb
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/4lfq.pdb b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/4lfq.pdb
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/4lfq.pdb
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/4lfq.pdb
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/caffeine.cin b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/caffeine.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/caffeine.cin
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/caffeine.cin
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/data/molecule_tunnel.cin b/3rdparty/CGAL-4.8/examples/Skin_surface_3/data/molecule_tunnel.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/data/molecule_tunnel.cin
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/data/molecule_tunnel.cin
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/include/extract_balls_from_pdb.h b/3rdparty/CGAL-4.8/examples/Skin_surface_3/include/extract_balls_from_pdb.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/include/extract_balls_from_pdb.h
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/include/extract_balls_from_pdb.h
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_pdb_reader.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_pdb_reader.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_pdb_reader.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_pdb_reader.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_retrieve_defining_weighted_points.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_retrieve_defining_weighted_points.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_retrieve_defining_weighted_points.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_retrieve_defining_weighted_points.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_simple.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_simple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_simple.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_simple.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_subdiv.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_subdiv.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_subdiv.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_subdiv.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_subdiv_with_normals.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_subdiv_with_normals.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_subdiv_with_normals.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_subdiv_with_normals.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_writer.h b/3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_writer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/skin_surface_writer.h
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/skin_surface_writer.h
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/union_of_balls_simple.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/union_of_balls_simple.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/union_of_balls_simple.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/union_of_balls_simple.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Skin_surface_3/union_of_balls_subdiv.cpp b/3rdparty/CGAL-4.8/examples/Skin_surface_3/union_of_balls_subdiv.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Skin_surface_3/union_of_balls_subdiv.cpp
rename to 3rdparty/CGAL-4.8/examples/Skin_surface_3/union_of_balls_subdiv.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Snap_rounding_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/CMakeLists.txt
new file mode 100644
index 0000000..1c56168
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Snap_rounding_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "snap_rounding.cpp" )
+  create_single_source_cgal_program( "snap_rounding_data.cpp" )
+  create_single_source_cgal_program( "snap_rounding_to_integer.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/data/snap_rounding_data b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/data/snap_rounding_data
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Snap_rounding_2/data/snap_rounding_data
rename to 3rdparty/CGAL-4.8/examples/Snap_rounding_2/data/snap_rounding_data
diff --git a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding.cpp b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding.cpp
rename to 3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding_data.cpp b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding_data.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding_data.cpp
rename to 3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding_data.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding_to_integer.cpp b/3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding_to_integer.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Snap_rounding_2/snap_rounding_to_integer.cpp
rename to 3rdparty/CGAL-4.8/examples/Snap_rounding_2/snap_rounding_to_integer.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Solver_interface/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Solver_interface/CMakeLists.txt
new file mode 100644
index 0000000..be8c1e3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Solver_interface/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( examples_ )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../include")
+  
+  # Use Eigen
+  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+
+  if (EIGEN3_FOUND)
+    include( ${EIGEN3_USE_FILE} )
+    create_single_source_cgal_program( "singular_value_decomposition.cpp" )
+    create_single_source_cgal_program( "sparse_solvers.cpp" )
+  endif()
+
+  create_single_source_cgal_program( "diagonalize_matrix.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Solver_interface/diagonalize_matrix.cpp b/3rdparty/CGAL-4.8/examples/Solver_interface/diagonalize_matrix.cpp
new file mode 100644
index 0000000..3a79ddb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Solver_interface/diagonalize_matrix.cpp
@@ -0,0 +1,51 @@
+#include <iostream>
+
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_diagonalize_traits.h>
+#else
+#include <CGAL/Diagonalize_traits.h>
+#endif
+
+typedef double FT;
+typedef CGAL::cpp11::array<FT, 6> Eigen_matrix;
+typedef CGAL::cpp11::array<FT, 3> Eigen_vector;
+typedef CGAL::cpp11::array<FT, 9> Eigen_three_vectors;
+
+// If Eigen is enabled, use it, otherwise fallback to the internal model
+#ifdef CGAL_EIGEN3_ENABLED
+typedef CGAL::Eigen_diagonalize_traits<FT, 3> Diagonalize_traits;
+#else
+typedef CGAL::Diagonalize_traits<FT, 3> Diagonalize_traits;
+#endif
+
+int main(void)
+{
+  Eigen_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  
+  // Fill matrix with random numbers
+  for (std::size_t i = 0; i < 6; ++ i)
+    covariance[i] = rand ();
+
+  Eigen_vector eigenvalues;
+  Eigen_three_vectors eigenvectors;
+
+  if (!(Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix (covariance,
+								       eigenvalues,
+								       eigenvectors)))
+    {
+      std::cerr << "Error: cannot diagonalize matrix" << std::endl;
+      return -1;
+    }
+
+  // Print result
+  for (std::size_t i = 0; i < 3; ++ i)
+    {
+      std::cout << "Eigenvalue " << i+1 << " = " << eigenvalues[i] << std::endl
+		<< "  with eigenvector [ ";
+      for (std::size_t j = 0; j < 3; ++ j)
+	std::cout << eigenvectors[3*i + j] << " ";
+      std::cout << "]" << std::endl;
+    }
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Solver_interface/singular_value_decomposition.cpp b/3rdparty/CGAL-4.8/examples/Solver_interface/singular_value_decomposition.cpp
new file mode 100644
index 0000000..81fe15e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Solver_interface/singular_value_decomposition.cpp
@@ -0,0 +1,37 @@
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_matrix.h>
+#include <CGAL/Eigen_vector.h>
+#include <CGAL/Eigen_svd.h>
+typedef CGAL::Eigen_svd Svd;
+#endif
+
+typedef Svd::FT     FT;
+typedef Svd::Vector Eigen_vector;
+typedef Svd::Matrix Eigen_matrix;
+
+int main(void)
+{
+  std::size_t degree = 3;
+  
+  Eigen_vector B (degree);
+  Eigen_matrix M (degree, degree);
+
+  // Fill B and M with random numbers
+  for (std::size_t i = 0; i < degree; ++ i)
+    {
+      B.set (i, rand());
+      for (std::size_t j = 0; j < degree; ++ j)
+	M.set (i, j, rand());
+    }
+
+  // Solve MX=B
+  std::cout << Svd::solve(M, B) << std::endl;
+
+  // Print result
+  std::cout << "Solution of SVD = [ ";
+  for (std::size_t i = 0; i < degree; ++ i)
+    std::cout << B.vector()[i] << " ";
+  std::cout << "]" << std::endl;
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Solver_interface/sparse_solvers.cpp b/3rdparty/CGAL-4.8/examples/Solver_interface/sparse_solvers.cpp
new file mode 100644
index 0000000..307b663
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Solver_interface/sparse_solvers.cpp
@@ -0,0 +1,49 @@
+#include <CGAL/Eigen_solver_traits.h>
+#include <CGAL/Eigen_matrix.h>
+
+
+typedef CGAL::Eigen_solver_traits<> Eigen_solver;
+typedef Eigen_solver::NT FT;
+typedef Eigen_solver::Matrix Eigen_matrix;
+typedef Eigen_solver::Vector Eigen_vector;
+
+
+int main(void)
+{
+  srand (static_cast<unsigned int>(time (NULL)));
+  std::size_t degree = 3000;
+  std::size_t nb_nonzero_coef = 100;
+  
+  Eigen_vector B (degree); // Zero vector
+  Eigen_matrix A (degree);
+
+  Eigen_vector diag (degree);
+
+  // Randomly make some coefficients of the matrix non-zero
+  for (std::size_t i = 0; i < nb_nonzero_coef; ++ i)
+    {
+      int x = rand () % degree;
+      int y = rand () % degree;
+
+      FT value = rand () / (FT)RAND_MAX;
+	
+      A.add_coef (x, y, value);
+      A.add_coef (y, x, value);
+    }
+
+  // Create sparse matrix
+  A.assemble_matrix();
+  
+  Eigen_vector X (degree);
+  FT d;
+
+  Eigen_solver solver;
+  if (!(solver.linear_solver (A, B, X, d)))
+    {
+      std::cerr << "Error: linear solver failed" << std::endl;
+      return -1;
+    }
+
+  std::cerr << "Linear solve succeeded" << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_searching/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Spatial_searching/CMakeLists.txt
new file mode 100644
index 0000000..453cf04
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_searching/CMakeLists.txt
@@ -0,0 +1,92 @@
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( Spatial_searching )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )  
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+            
+find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
+if (EIGEN3_FOUND)
+  include( ${EIGEN3_USE_FILE} )
+endif()
+
+if (MSVC)
+    # Turn off VC++ warning
+    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244")
+endif()
+
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+create_single_source_cgal_program( "circular_query.cpp" )
+
+create_single_source_cgal_program( "distance_browsing.cpp" )
+
+create_single_source_cgal_program( "iso_rectangle_2_query.cpp" )
+
+create_single_source_cgal_program( "nearest_neighbor_searching.cpp" )
+
+create_single_source_cgal_program( "searching_with_circular_query.cpp" )
+
+create_single_source_cgal_program( "searching_with_point_with_info.cpp" )
+
+create_single_source_cgal_program( "searching_with_point_with_info_inplace.cpp" )
+
+create_single_source_cgal_program( "searching_with_point_with_info_pmap.cpp" )
+
+create_single_source_cgal_program( "searching_surface_mesh_vertices.cpp" )
+
+create_single_source_cgal_program( "searching_polyhedron_vertices.cpp" )
+
+create_single_source_cgal_program( "searching_polyhedron_vertices_with_fuzzy_sphere.cpp")
+
+create_single_source_cgal_program( "user_defined_point_and_distance.cpp" )
+
+create_single_source_cgal_program( "using_fair_splitting_rule.cpp" )
+
+create_single_source_cgal_program( "weighted_Minkowski_distance.cpp" )
+
+
+
+if (EIGEN3_FOUND)
+
+  create_single_source_cgal_program( "fuzzy_range_query.cpp" )
+
+  create_single_source_cgal_program( "general_neighbor_searching.cpp" )
+
+else()
+
+  message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp")
+  message(STATUS "will not be compiled as they use CGAL::Epick_d which requires the Eigen library.")
+
+endif()
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/Distance.h b/3rdparty/CGAL-4.8/examples/Spatial_searching/Distance.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/Distance.h
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/Distance.h
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/Point.h b/3rdparty/CGAL-4.8/examples/Spatial_searching/Point.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/Point.h
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/Point.h
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/circular_query.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/circular_query.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/circular_query.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/circular_query.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/data/tripod.off b/3rdparty/CGAL-4.8/examples/Spatial_searching/data/tripod.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/data/tripod.off
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/data/tripod.off
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/distance_browsing.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/distance_browsing.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/distance_browsing.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/distance_browsing.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/fuzzy_range_query.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/fuzzy_range_query.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/fuzzy_range_query.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/fuzzy_range_query.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/general_neighbor_searching.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/general_neighbor_searching.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/general_neighbor_searching.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/general_neighbor_searching.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/iso_rectangle_2_query.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/iso_rectangle_2_query.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/iso_rectangle_2_query.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/iso_rectangle_2_query.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/nearest_neighbor_searching.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/nearest_neighbor_searching.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/nearest_neighbor_searching.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/nearest_neighbor_searching.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_polyhedron_vertices.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_polyhedron_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_polyhedron_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_polyhedron_vertices.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp
new file mode 100644
index 0000000..1dda74f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp
@@ -0,0 +1,55 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Search_traits_adapter.h>
+#include <CGAL/Kd_tree.h>
+#include <CGAL/Fuzzy_sphere.h>
+
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point_3;
+
+typedef CGAL::Polyhedron_3<Kernel> Mesh;
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+
+typedef boost::property_map<Mesh,CGAL::vertex_point_t>::type Vertex_point_pmap;
+
+typedef CGAL::Search_traits_3<Kernel>                                    Traits_base;
+typedef CGAL::Search_traits_adapter<vertex_descriptor, Vertex_point_pmap, Traits_base> Traits;
+
+typedef CGAL::Kd_tree<Traits>                      Tree;
+typedef Tree::Splitter                             Splitter;
+
+int main(int argc, char* argv[])
+{
+  Mesh mesh;
+  std::ifstream in((argc>1)?argv[1]:"data/tripod.off");
+  in  >> mesh;
+
+  Vertex_point_pmap vppmap = get(CGAL::vertex_point,mesh);
+
+  // Insert number_of_data_points in the tree
+  Tree tree(vertices(mesh).begin(),
+            vertices(mesh).end(),
+            Splitter(),
+            Traits(vppmap)
+  );
+  Point_3 query(0.0, 0.0, 0.0);
+  double radius = 0.5;
+  double epsilon = 0.01;
+
+  // search vertices
+  CGAL::Fuzzy_sphere<Traits> fz(query, radius, epsilon);
+  
+  //collect vertices that are inside the sphere
+  std::list<vertex_descriptor> result;
+  tree.search(std::back_inserter(result), fz);
+  std::cout << "There are " << result.size() << " vertices inside the fuzzy sphere\n";
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_sphere_orthogonally.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_sphere_orthogonally.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_sphere_orthogonally.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_sphere_orthogonally.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_surface_mesh_vertices.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_surface_mesh_vertices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_surface_mesh_vertices.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_surface_mesh_vertices.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_circular_query.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_circular_query.cpp
new file mode 100644
index 0000000..2dd3aa5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_circular_query.cpp
@@ -0,0 +1,62 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Kd_tree.h>
+#include <CGAL/Search_traits_2.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/algorithm.h>
+#include <CGAL/Fuzzy_sphere.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef K::Point_2 Point;
+typedef CGAL::Random_points_in_square_2<Point> Random_points_iterator;
+typedef CGAL::Counting_iterator<Random_points_iterator> N_Random_points_iterator;
+typedef CGAL::Search_traits_2<K> Traits;
+typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_circle;
+typedef CGAL::Kd_tree<Traits> Tree;
+typedef CGAL::Random Random;
+
+int main() {
+
+  const int N=1000;
+
+  // generator for random data points in the square ( (-1,-1), (1,1) )
+  Random rnd(0);
+  Random_points_iterator rpit(1.0, rnd);
+
+  // Insert also the N points in the tree
+  Tree tree(N_Random_points_iterator(rpit,0),
+			      N_Random_points_iterator(N));
+
+  // define exact circular range query
+  Point center(0.2, 0.2);
+  Fuzzy_circle exact_range(center, 0.2);
+
+  boost::optional<Point> any = tree.search_any_point(exact_range);
+  if(any){
+    std::cout << *any << " is in the query circle\n";
+  }else{
+    std::cout << "Empty query circle\n";
+  }
+  std::list<Point> result;
+  tree.search(std::back_inserter( result ), exact_range);
+
+  std::cout << "\nPoints in cirle with center " << center << " and radius 0.2" << std::endl;
+
+  std::list<Point>::iterator it;
+  for (it=result.begin(); (it != result.end()); ++it) {
+    std::cout << *it << std::endl;
+  }
+
+  result.clear();
+  // approximate range searching using value 0.1 for fuzziness parameter
+  Fuzzy_circle approximate_range(center, 0.2, 0.1);
+
+  tree.search(std::back_inserter( result ), approximate_range);
+
+  std::cout << "\n\nPoints in cirle with center " << center << " and fuzzy radius [0.1,0.3]" << std::endl;
+
+  for (it=result.begin(); (it != result.end()); ++it) {
+    std::cout << *it << std::endl;
+  }
+  std::cout << "\ndone" << std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/splitter_worst_cases.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/splitter_worst_cases.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/splitter_worst_cases.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/splitter_worst_cases.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/user_defined_point_and_distance.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/user_defined_point_and_distance.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/user_defined_point_and_distance.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/user_defined_point_and_distance.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/using_fair_splitting_rule.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/using_fair_splitting_rule.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/using_fair_splitting_rule.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/using_fair_splitting_rule.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_searching/weighted_Minkowski_distance.cpp b/3rdparty/CGAL-4.8/examples/Spatial_searching/weighted_Minkowski_distance.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_searching/weighted_Minkowski_distance.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_searching/weighted_Minkowski_distance.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_sorting/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Spatial_sorting/CMakeLists.txt
new file mode 100644
index 0000000..b928eb1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_sorting/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Spatial_sorting_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "example_delaunay_2.cpp" )
+  create_single_source_cgal_program( "hilbert.cpp" )
+  create_single_source_cgal_program( "hilbert_policies.cpp" )
+  create_single_source_cgal_program( "hilbert_sort_on_sphere.cpp" )
+  create_single_source_cgal_program( "myPoint.cpp" )
+  create_single_source_cgal_program( "small_example_delaunay_2.cpp" )
+  create_single_source_cgal_program( "sort_indices.cpp" )
+  create_single_source_cgal_program( "sp_sort_using_property_map_2.cpp" )
+  create_single_source_cgal_program( "sp_sort_using_property_map_3.cpp" )
+  create_single_source_cgal_program( "sp_sort_using_property_map_d.cpp" )
+  create_single_source_cgal_program( "spatial_sort_on_sphere.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/example_delaunay_2.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/example_delaunay_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/example_delaunay_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/example_delaunay_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/hilbert.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/hilbert.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/hilbert_policies.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert_policies.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/hilbert_policies.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert_policies.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert_sort_on_sphere.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert_sort_on_sphere.cpp
new file mode 100644
index 0000000..3d31efa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_sorting/hilbert_sort_on_sphere.cpp
@@ -0,0 +1,49 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/hilbert_sort_on_sphere.h>
+#include <iostream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel     K;
+typedef K::Point_3                                              Point;
+typedef K::Vector_3                                             Vector;
+typedef K::Sphere_3                                             Sphere;
+typedef CGAL::Creator_uniform_3<double,Point>                   Creator_3;
+
+int main ()
+{
+  std::size_t size = 32;
+  CGAL::Random random (42);
+  std::vector<Point> v;
+
+  // unit sphere
+  std::cout << "UNIT SPHERE: " << std::endl;
+
+  v.reserve(size);
+                                                                    
+  CGAL::Random_points_on_sphere_3<Point> unit_sphere(1.0, random);  // generate points
+  for (std::size_t i = 0; i < size; ++i) v.push_back(*unit_sphere++);
+
+  CGAL::hilbert_sort_on_sphere(v.begin(), v.end());                 // sort
+
+  for(std::size_t i=0; i<size; ++i) std::cout << v[i] << std::endl; //output
+
+  v.clear();
+
+  // given sphere
+  std::cout << "GIVEN SPHERE: " << std::endl;
+
+  v.reserve(size);
+
+  Vector trans = Vector(3,4,5);
+  Sphere sphere = Sphere(CGAL::ORIGIN + trans, 4);
+  CGAL::Random_points_on_sphere_3<Point> given_sphere(2.0, random);  // generate points
+  for (std::size_t i = 0; i < size; ++i) v.push_back(*given_sphere++ + trans);
+
+  CGAL::hilbert_sort_on_sphere(v.begin(), v.end(),                   // sort
+    sphere.squared_radius(), sphere.center());  
+
+  for(std::size_t i=0; i<size; ++i) std::cout << v[i] << std::endl; //output
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/myPoint.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/myPoint.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/myPoint.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/myPoint.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/small_example_delaunay_2.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/small_example_delaunay_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/small_example_delaunay_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/small_example_delaunay_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/sort_indices.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/sort_indices.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/sort_indices.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/sort_indices.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_2.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_3.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_d.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Spatial_sorting/sp_sort_using_property_map_d.cpp
rename to 3rdparty/CGAL-4.8/examples/Spatial_sorting/sp_sort_using_property_map_d.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Spatial_sorting/spatial_sort_on_sphere.cpp b/3rdparty/CGAL-4.8/examples/Spatial_sorting/spatial_sort_on_sphere.cpp
new file mode 100644
index 0000000..758e6f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Spatial_sorting/spatial_sort_on_sphere.cpp
@@ -0,0 +1,49 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/spatial_sort_on_sphere.h>
+#include <iostream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel     K;
+typedef K::Point_3                                              Point;
+typedef K::Vector_3                                             Vector;
+typedef K::Sphere_3                                             Sphere;
+typedef CGAL::Creator_uniform_3<double,Point>                   Creator_3;
+
+int main ()
+{
+  std::size_t size = 32;
+  CGAL::Random random (42);
+  std::vector<Point> v;
+
+  // unit sphere
+  std::cout << "UNIT SPHERE: " << std::endl;
+
+  v.reserve(size);
+                                                                    
+  CGAL::Random_points_on_sphere_3<Point> unit_sphere(1.0, random);  // generate points
+  for (std::size_t i = 0; i < size; ++i) v.push_back(*unit_sphere++);
+
+  CGAL::spatial_sort_on_sphere(v.begin(), v.end());                 // sort
+
+  for(std::size_t i=0; i<size; ++i) std::cout << v[i] << std::endl; //output
+
+  v.clear();
+
+  // given sphere
+  std::cout << "GIVEN SPHERE: " << std::endl;
+
+  v.reserve(size);
+
+  Vector trans = Vector(3,4,5);
+  Sphere sphere = Sphere(CGAL::ORIGIN + trans, 4);
+  CGAL::Random_points_on_sphere_3<Point> given_sphere(2.0, random);  // generate points
+  for (std::size_t i = 0; i < size; ++i) v.push_back(*given_sphere++ + trans);
+
+  CGAL::spatial_sort_on_sphere(v.begin(), v.end(),                   // sort
+    sphere.squared_radius(), sphere.center());
+
+  for(std::size_t i=0; i<size; ++i) std::cout << v[i] << std::endl; //output
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/CMakeLists.txt
new file mode 100644
index 0000000..454e393
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Straight_skeleton_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "Create_offset_polygons_2.cpp" )
+  create_single_source_cgal_program( "Create_saop_from_polygon_with_holes_2.cpp" )
+  create_single_source_cgal_program( "Create_skeleton_and_offset_polygons_2.cpp" )
+  create_single_source_cgal_program( "Create_skeleton_and_offset_polygons_with_holes_2.cpp" )
+  create_single_source_cgal_program( "Create_straight_skeleton_2.cpp" )
+  create_single_source_cgal_program( "Create_straight_skeleton_from_polygon_with_holes_2.cpp" )
+  create_single_source_cgal_program( "Low_level_API.cpp" )
+  create_single_source_cgal_program( "Show_offset_polygon.cpp" )
+  create_single_source_cgal_program( "Show_straight_skeleton.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp
new file mode 100644
index 0000000..d475567
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp
@@ -0,0 +1,57 @@
+#include<vector>
+
+#include<boost/shared_ptr.hpp>
+
+#include<CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include<CGAL/Polygon_with_holes_2.h>
+#include<CGAL/create_offset_polygons_from_polygon_with_holes_2.h>
+
+#include "print.h"
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K ;
+
+typedef K::Point_2                    Point ;
+typedef CGAL::Polygon_2<K>            Polygon_2 ;
+typedef CGAL::Polygon_with_holes_2<K> PolygonWithHoles ;
+
+typedef boost::shared_ptr<PolygonWithHoles> PolygonWithHolesPtr ;
+
+typedef std::vector<PolygonWithHolesPtr> PolygonWithHolesPtrVector;
+
+
+int main()
+{  
+  Polygon_2 outer ;  
+  
+  outer.push_back( Point( 0.0, 0.0) ) ;
+  outer.push_back( Point(10.0, 0.0) ) ;
+  outer.push_back( Point(10.0, 4.5) ) ;
+  outer.push_back( Point(12.0, 4.5) ) ;
+  outer.push_back( Point(12.0, 2.0) ) ;
+  outer.push_back( Point(16.0, 2.0) ) ;
+  outer.push_back( Point(16.0, 8.0) ) ;
+  outer.push_back( Point(12.0, 8.0) ) ;
+  outer.push_back( Point(12.0, 5.5) ) ;
+  outer.push_back( Point(10.0, 5.5) ) ;
+  outer.push_back( Point(10.0,10.0) ) ;
+  outer.push_back( Point( 0.0,10.0) ) ;
+  
+  Polygon_2 hole ;
+  
+  hole.push_back( Point(3.0,3.0) ) ;
+  hole.push_back( Point(3.0,7.0) ) ;
+  hole.push_back( Point(7.0,7.0) ) ;
+  hole.push_back( Point(7.0,3.0) ) ;
+    
+  PolygonWithHoles poly( outer ) ;
+  
+  poly.add_hole( hole ) ;
+      
+  double lOffset = 1 ;
+
+  PolygonWithHolesPtrVector offset_poly_with_holes = CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2(lOffset,poly);
+  
+  print_polygons_with_holes(offset_poly_with_holes);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Low_level_API.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Low_level_API.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Low_level_API.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Low_level_API.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Show_offset_polygon.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Show_offset_polygon.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Show_offset_polygon.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Show_offset_polygon.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Show_straight_skeleton.cpp b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Show_straight_skeleton.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/Show_straight_skeleton.cpp
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/Show_straight_skeleton.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/dump_to_eps.h b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/dump_to_eps.h
new file mode 100644
index 0000000..b74ef6a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/dump_to_eps.h
@@ -0,0 +1,171 @@
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+
+namespace CGAL
+{
+
+template<class K, class C>
+Bbox_2 bbox_2 ( Polygon_with_holes_2<K,C> const& aPolyWH )
+{
+  Bbox_2 rBbox = bbox_2(aPolyWH.outer_boundary().vertices_begin(), aPolyWH.outer_boundary().vertices_end());
+  
+  for ( typename Polygon_with_holes_2<K,C>::Hole_const_iterator hit = aPolyWH.holes_begin()
+      ; hit != aPolyWH.holes_end() 
+      ; ++ hit 
+      )
+    rBbox = rBbox + bbox_2(hit->vertices_begin(), hit->vertices_end());
+    
+  return rBbox ;
+}
+
+}
+
+template<class K, class C>
+void dump_to_eps( CGAL::Polygon_2<K,C> const& aPoly, char const* aType, double aScale, std::ostream& rOut )
+{
+  typedef typename CGAL::Polygon_2<K,C>::const_iterator vertex_const_iterator ;
+    
+  vertex_const_iterator begin = aPoly.vertices_begin() ;
+  vertex_const_iterator end   = aPoly.vertices_end  () ;
+  vertex_const_iterator last  = end - 1 ;
+  
+  for( vertex_const_iterator curr = begin ; curr != end ; ++ curr )
+  {
+    vertex_const_iterator next = curr == last ? begin : curr + 1 ;
+    
+    rOut << aType << std::endl
+         << aScale * curr->x() 
+         << " " 
+         << aScale * curr->y()
+         << " "
+         << aScale * next->x()
+         << " "
+         << aScale * next->y() 
+         << " E\n";
+  }
+}
+
+template<class K, class C>
+void dump_to_eps( CGAL::Polygon_with_holes_2<K,C> const& aPWH, char const* aType, double aScale, std::ostream& rOut )
+{
+  dump_to_eps(aPWH.outer_boundary(), aType, aScale, rOut ) ;
+      
+  for ( typename CGAL::Polygon_with_holes_2<K,C>::Hole_const_iterator hit = aPWH.holes_begin()
+      ; hit != aPWH.holes_end()
+      ; ++ hit
+      )
+    dump_to_eps(*hit, aType, aScale, rOut ) ;
+}
+
+template<class K>
+void dump_to_eps( CGAL::Straight_skeleton_2<K> const& aSkeleton, char const* aType, double aScale, std::ostream& rOut )
+{
+  typedef typename CGAL::Straight_skeleton_2<K>::Halfedge_const_iterator Halfedge_const_iterator ;
+  typedef typename CGAL::Straight_skeleton_2<K>::Halfedge_const_handle   Halfedge_const_handle ;
+  
+  for(Halfedge_const_iterator hit = aSkeleton.halfedges_begin(); hit != aSkeleton.halfedges_end(); ++hit)
+  {
+    Halfedge_const_handle h = hit ;
+
+    if( h->is_bisector() && ((h->id()%2)==0) && !h->has_infinite_time() && !h->opposite()->has_infinite_time() )
+    { 
+      rOut << aType << std::endl 
+           << aScale * h->vertex()->point().x() 
+           << " " 
+           << aScale * h->vertex()->point().y()
+           << " "
+           << aScale * h->opposite()->vertex()->point().x()
+           << " "
+           << aScale * h->opposite()->vertex()->point().y() 
+           << " E\n";
+    }
+  }
+}
+
+template<class K, class C>
+void dump_to_eps ( CGAL::Polygon_with_holes_2<K,C> const&                                     aInput
+                 , std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K,C> > > const& aOutput
+                 , std::ostream&                                                            rOut
+                 ) 
+{
+  typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K,C> > > PolyWH_vector ;
+    
+  CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput);
+  
+  for( typename PolyWH_vector::const_iterator it = aOutput.begin() ; it != aOutput.end(); ++ it )
+    lBbox = lBbox + CGAL::bbox_2(**it);
+    
+  double lScale = 1000 / (lBbox.xmax() - lBbox.xmin()) ;
+
+  if ( lScale < 1 )
+    lScale = 1 ;
+    
+  rOut << "%!PS-Adobe-2.0 EPSF-2.0\n%%BoundingBox:" 
+       << static_cast<int>(std::floor(lScale* lBbox.xmin()-1)) 
+       << " " 
+       << static_cast<int>(std::floor(lScale* lBbox.ymin()-1)) 
+       << " "
+       << static_cast<int>(std::ceil(lScale*lBbox.xmax()+1)) 
+       << " " 
+       << static_cast<int>(std::ceil(lScale*lBbox.ymax()+1))
+       << std::endl;
+
+  rOut << "%%EndComments\n"
+          "gsave\n"
+          "1.0 setlinewidth\n"
+          "/input { 1 0 0 setrgbcolor } bind def\n"
+          "/input_w { 0.1 setlinewidth } bind def\n"
+          "/output { 0 1 0 setrgbcolor } bind def\n"
+          "/output_w { 0.1 setlinewidth } bind def\n"
+          "% stroke - x1 y1 x2 y2 E\n"
+          "/E {newpath moveto lineto stroke} bind def\n\n"  ;
+       
+  dump_to_eps(aInput,"input",lScale,rOut);
+   
+  for( typename PolyWH_vector::const_iterator it = aOutput.begin() ; it != aOutput.end(); ++ it )
+    dump_to_eps(**it,"output",lScale,rOut);
+   
+  rOut << "grestore\nshowpage" << std::endl;
+  
+}
+
+template<class K, class C>
+void dump_to_eps ( CGAL::Polygon_with_holes_2<K,C> const& aInput
+                 , CGAL::Straight_skeleton_2<K>  const& aSkeleton
+                 , std::ostream&                        rOut
+                 ) 
+{
+  CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput);
+    
+  double lScale = 1000 / (lBbox.xmax() - lBbox.xmin()) ;
+
+  if ( lScale < 1 )
+    lScale = 1 ;
+    
+  rOut << "%!PS-Adobe-2.0 EPSF-2.0\n%%BoundingBox:" 
+       << static_cast<int>(std::floor(lScale* lBbox.xmin()-1)) 
+       << " " 
+       << static_cast<int>(std::floor(lScale* lBbox.ymin()-1)) 
+       << " "
+       << static_cast<int>(std::ceil(lScale*lBbox.xmax()+1)) 
+       << " " 
+       << static_cast<int>(std::ceil(lScale*lBbox.ymax()+1))
+       << std::endl;
+
+  rOut << "%%EndComments\n"
+          "gsave\n"
+          "1.0 setlinewidth\n"
+          "/input { 1 0 0 setrgbcolor } bind def\n"
+          "/input_w { 0.1 setlinewidth } bind def\n"
+          "/skeleton { 0 1 0 setrgbcolor } bind def\n"
+          "/skeleton_w { 0.1 setlinewidth } bind def\n"
+          "% stroke - x1 y1 x2 y2 E\n"
+          "/E {newpath moveto lineto stroke} bind def\n\n"  ;
+       
+  dump_to_eps(aInput,"input",lScale,rOut);
+   
+  dump_to_eps(aSkeleton,"skeleton",lScale,rOut);
+   
+  rOut << "grestore\nshowpage" << std::endl;
+  
+}
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/input_file_format.txt b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/input_file_format.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/input_file_format.txt
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/input_file_format.txt
diff --git a/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/print.h b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/print.h
new file mode 100644
index 0000000..dfcfb10
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/print.h
@@ -0,0 +1,85 @@
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+
+template<class K>
+void print_point ( CGAL::Point_2<K> const& p )
+{
+  std::cout << "(" << p.x() << "," << p.y() << ")" ;
+}
+
+template<class K, class C>
+void print_polygon ( CGAL::Polygon_2<K,C> const& poly )
+{
+  typedef CGAL::Polygon_2<K,C> Polygon ;
+  
+  std::cout << "Polygon with " << poly.size() << " vertices" << std::endl ;
+  
+  for( typename Polygon::Vertex_const_iterator vi = poly.vertices_begin() ; vi != poly.vertices_end() ; ++ vi )
+  {
+    print_point(*vi); std::cout << std::endl ;
+  }
+}
+
+template<class K, class C>
+void print_polygons ( std::vector< boost::shared_ptr< CGAL::Polygon_2<K,C> > > const& polies )
+{
+  typedef std::vector< boost::shared_ptr< CGAL::Polygon_2<K,C> > > PolygonVector ;
+  
+  std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ;
+  
+  for( typename PolygonVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi )
+    print_polygon(**pi);
+}
+
+template<class K, class C>
+void print_polygon_with_holes ( CGAL::Polygon_with_holes_2<K,C> const& polywh )
+{
+  typedef CGAL::Polygon_with_holes_2<K,C> PolygonWithHoles ;
+  
+  std::cout << "Polygon_with_holes having " << polywh.number_of_holes() << " holes" << std::endl ;
+  
+  print_polygon(polywh.outer_boundary());
+  
+  for( typename PolygonWithHoles::Hole_const_iterator hi = polywh.holes_begin() ; hi != polywh.holes_end() ; ++ hi )
+    print_polygon(*hi);
+}
+
+template<class K, class C>
+void print_polygons_with_holes ( std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K,C> > > const& polies )
+{
+
+  typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2<K,C> > > PolygonWithHolesVector ;
+
+  std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ;
+
+  for( typename PolygonWithHolesVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi )
+    print_polygon_with_holes(**pi);
+}
+
+
+template<class K>
+void print_straight_skeleton( CGAL::Straight_skeleton_2<K> const& ss )
+{
+  typedef CGAL::Straight_skeleton_2<K> Ss ;
+  
+  typedef typename Ss::Vertex_const_handle     Vertex_const_handle ;
+  typedef typename Ss::Halfedge_const_handle   Halfedge_const_handle ;
+  typedef typename Ss::Halfedge_const_iterator Halfedge_const_iterator ;
+  
+  Halfedge_const_handle null_halfedge ;
+  Vertex_const_handle   null_vertex ;
+
+  std::cout << "Straight skeleton with " << ss.size_of_vertices() 
+            << " vertices, " << ss.size_of_halfedges()
+            << " halfedges and " << ss.size_of_faces()
+            << " faces" << std::endl ;
+            
+  for ( Halfedge_const_iterator i = ss.halfedges_begin(); i != ss.halfedges_end(); ++i )
+  {
+    print_point(i->opposite()->vertex()->point()) ;
+    std::cout << "->" ;
+    print_point(i->vertex()->point());
+    std::cout << " " << ( i->is_bisector() ? "bisector" : "contour" ) << std::endl;
+  }
+}
+
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_1.dat b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_1.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_1.dat
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_1.dat
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_2.dat b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_2.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_2.dat
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_2.dat
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_3.dat b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_3.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_3.dat
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_3.dat
diff --git a/3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_4.dat b/3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_4.dat
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Straight_skeleton_2/sample_4.dat
rename to 3rdparty/CGAL-4.8/examples/Straight_skeleton_2/sample_4.dat
diff --git a/3rdparty/CGAL-4.8/examples/Stream_lines_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Stream_lines_2/CMakeLists.txt
new file mode 100644
index 0000000..66a4245
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Stream_lines_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Stream_lines_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "stl_regular_field.cpp" )
+  create_single_source_cgal_program( "stl_triangular_field.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/data/datap.tri.cin b/3rdparty/CGAL-4.8/examples/Stream_lines_2/data/datap.tri.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/data/datap.tri.cin
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/data/datap.tri.cin
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/data/datav.tri.cin b/3rdparty/CGAL-4.8/examples/Stream_lines_2/data/datav.tri.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/data/datav.tri.cin
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/data/datav.tri.cin
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/data/irregular_data.tri.cin b/3rdparty/CGAL-4.8/examples/Stream_lines_2/data/irregular_data.tri.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/data/irregular_data.tri.cin
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/data/irregular_data.tri.cin
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/data/vnoise.vec.cin b/3rdparty/CGAL-4.8/examples/Stream_lines_2/data/vnoise.vec.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/data/vnoise.vec.cin
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/data/vnoise.vec.cin
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/stl_regular_field.cpp b/3rdparty/CGAL-4.8/examples/Stream_lines_2/stl_regular_field.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/stl_regular_field.cpp
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/stl_regular_field.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Stream_lines_2/stl_triangular_field.cpp b/3rdparty/CGAL-4.8/examples/Stream_lines_2/stl_triangular_field.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Stream_lines_2/stl_triangular_field.cpp
rename to 3rdparty/CGAL-4.8/examples/Stream_lines_2/stl_triangular_field.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Subdivision_method_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/CMakeLists.txt
new file mode 100644
index 0000000..63f68f4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Subdivision_method_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "CatmullClark_subdivision.cpp" )
+  create_single_source_cgal_program( "Customized_subdivision.cpp" )
+  create_single_source_cgal_program( "DooSabin_subdivision.cpp" )
+  create_single_source_cgal_program( "Loop_subdivision.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/CatmullClark_subdivision.cpp b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/CatmullClark_subdivision.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/CatmullClark_subdivision.cpp
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/CatmullClark_subdivision.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/Customized_subdivision.cpp b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/Customized_subdivision.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/Customized_subdivision.cpp
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/Customized_subdivision.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/DooSabin_subdivision.cpp b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/DooSabin_subdivision.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/DooSabin_subdivision.cpp
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/DooSabin_subdivision.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/Loop_subdivision.cpp b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/Loop_subdivision.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/Loop_subdivision.cpp
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/Loop_subdivision.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner.off
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_tris_with_hole.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_tris_with_hole.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_tris_with_hole.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_tris_with_hole.off
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_with_hole.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_with_hole.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_with_hole.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_with_hole.off
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_with_sharp_edge.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_with_sharp_edge.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/corner_with_sharp_edge.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/corner_with_sharp_edge.off
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/cross.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/cross.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/cross.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/cross.off
diff --git a/3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/quint_tris.off b/3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/quint_tris.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Subdivision_method_3/data/quint_tris.off
rename to 3rdparty/CGAL-4.8/examples/Subdivision_method_3/data/quint_tris.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh/CMakeLists.txt
new file mode 100644
index 0000000..d8b3eea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesh_ )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "sm_join.cpp" )
+  create_single_source_cgal_program( "sm_aabbtree.cpp" )
+  create_single_source_cgal_program( "sm_bgl.cpp" )
+  create_single_source_cgal_program( "sm_circulators.cpp" )
+  create_single_source_cgal_program( "sm_do_intersect.cpp" )
+  create_single_source_cgal_program( "sm_iterators.cpp" )
+  create_single_source_cgal_program( "sm_kruskal.cpp" )
+  create_single_source_cgal_program( "sm_memory.cpp" )
+  create_single_source_cgal_program( "sm_properties.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/cube.off b/3rdparty/CGAL-4.8/examples/Surface_mesh/cube.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/cube.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/cube.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/data/elephant.off b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/elephant.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/data/elephant.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/data/elephant.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/data/knot1.off b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/knot1.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/data/knot1.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/data/knot1.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/data/quad.off b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/quad.off
new file mode 100644
index 0000000..5fbf20d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/quad.off
@@ -0,0 +1,7 @@
+OFF
+4 1 0
+0 0 1
+1 0 1
+1 1 1
+0 1 1
+4 0 1 2 3
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/data/triangle.off b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/triangle.off
new file mode 100644
index 0000000..a3c407f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/data/triangle.off
@@ -0,0 +1,6 @@
+OFF
+3 1 0
+0 0 0
+1 0 0
+0 1 0
+3 0 1 2
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_aabbtree.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_aabbtree.cpp
new file mode 100644
index 0000000..3b3d8e4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_aabbtree.cpp
@@ -0,0 +1,90 @@
+#include <iostream>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+#include <CGAL/boost/graph/properties_Surface_mesh.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef K::Point_3 Point;
+typedef K::Plane_3 Plane;
+typedef K::Vector_3 Vector;
+typedef K::Segment_3 Segment;
+typedef CGAL::Surface_mesh<Point> Mesh;
+typedef CGAL::AABB_face_graph_triangle_primitive<Mesh> Primitive;
+typedef CGAL::AABB_traits<K, Primitive> Traits;
+typedef CGAL::AABB_tree<Traits> Tree;
+typedef boost::optional< Tree::Intersection_and_primitive_id<Segment>::Type > Segment_intersection;
+typedef boost::optional< Tree::Intersection_and_primitive_id<Plane>::Type > Plane_intersection;
+typedef Tree::Primitive_id Primitive_id;
+
+int main()
+{
+    Point p(1.0, 0.0, 0.0);
+    Point q(0.0, 1.0, 0.0);
+    Point r(0.0, 0.0, 1.0);
+    Point s(0.0, 0.0, 0.0);
+    Mesh m;
+    CGAL::make_tetrahedron(p, q, r, s, m);
+
+    // constructs AABB tree
+    Tree tree(faces(m).first, faces(m).second, m);
+
+    // constructs segment query
+    Point a(-0.2, 0.2, -0.2);
+    Point b(1.3, 0.2, 1.3);
+    Segment segment_query(a,b);
+
+    // tests intersections with segment query
+    if(tree.do_intersect(segment_query))
+        std::cout << "intersection(s)" << std::endl;
+    else
+        std::cout << "no intersection" << std::endl;
+
+    // computes #intersections with segment query
+    std::cout << tree.number_of_intersected_primitives(segment_query)
+        << " intersection(s)" << std::endl;
+
+    // computes first encountered intersection with segment query
+    // (generally a point)
+    Segment_intersection intersection =
+        tree.any_intersection(segment_query);
+    if(intersection){
+      // gets intersection object
+      if(boost::get<Point>(&(intersection->first))){
+        Point* p = boost::get<Point>(&(intersection->first));
+        std::cout << "intersection object is a point " << *p <<  std::endl;
+        std::cout << "with face "<< intersection->second  <<  std::endl;
+      }
+    }
+
+    // computes all intersections with segment query (as pairs object - primitive_id)
+    std::list<Segment_intersection> intersections;
+    tree.all_intersections(segment_query, std::back_inserter(intersections));
+
+    // computes all intersected primitives with segment query as primitive ids
+    std::list<Primitive_id> primitives;
+    tree.all_intersected_primitives(segment_query, std::back_inserter(primitives));
+
+    // constructs plane query
+    Point base(0.0,0.0,0.5);
+    Vector vec(0.0,0.0,1.0);
+    Plane plane_query(base,vec);
+
+    // computes first encountered intersection with plane query
+    // (generally a segment)
+    Plane_intersection plane_intersection = tree.any_intersection(plane_query);
+    if(plane_intersection){
+      if(boost::get<Segment>(&(plane_intersection->first))){
+        Segment* s = boost::get<Segment>(&(plane_intersection->first));
+        std::cout << "one intersection object is the segment " << s << std::endl;
+        std::cout << "with face "<< intersection->second  <<  std::endl;
+      }
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_bgl.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_bgl.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_bgl.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_bgl.cmd
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_bgl.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_bgl.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_bgl.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_bgl.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_circulators.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_circulators.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_circulators.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_circulators.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_do_intersect.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_do_intersect.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_do_intersect.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_do_intersect.cmd
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_do_intersect.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_do_intersect.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_do_intersect.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_do_intersect.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_iterators.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_iterators.cpp
new file mode 100644
index 0000000..47d95b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_iterators.cpp
@@ -0,0 +1,69 @@
+#include <vector>
+
+#include <boost/foreach.hpp>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef CGAL::Surface_mesh<K::Point_3> Mesh;
+typedef Mesh::Vertex_index vertex_descriptor;
+typedef Mesh::Face_index face_descriptor;
+int main()
+{
+  Mesh m;
+
+  // u            x
+  // +------------+
+  // |            |
+  // |            |
+  // |      f     |
+  // |            |
+  // |            |
+  // +------------+
+  // v            w
+
+  // Add the points as vertices
+  vertex_descriptor u = m.add_vertex(K::Point_3(0,1,0));
+  vertex_descriptor v = m.add_vertex(K::Point_3(0,0,0));
+  vertex_descriptor w = m.add_vertex(K::Point_3(1,0,0));
+  vertex_descriptor x = m.add_vertex(K::Point_3(1,1,0));
+
+  /* face_descriptor f = */ m.add_face(u,v,w,x);
+
+  { 
+    std::cout << "all vertices " << std::endl;
+
+    // The vertex iterator type is a nested type of the Vertex_range
+    Mesh::Vertex_range::iterator  vb, ve;
+
+    Mesh::Vertex_range r = m.vertices();
+    // The iterators can be accessed through the C++ range API
+    vb = r.begin(); 
+    ve = r.end();
+    // or the boost Range API
+    vb = boost::begin(r);
+    ve = boost::end(r);
+
+    // or with boost::tie, as the CGAL range derives from std::pair
+    for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb){
+            std::cout << *vb << std::endl;
+    }
+    
+    // Instead of the classical for loop one can use
+    // the boost macro for a range
+    BOOST_FOREACH(vertex_descriptor vd, m.vertices()){
+      std::cout << vd << std::endl;
+    }
+
+    // or the C++11 for loop. Note that there is a ':' and not a ',' as in BOOST_FOREACH 
+    #ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR
+    for(vertex_descriptor vd : m.vertices()){
+      std::cout << vd << std::endl;
+    }
+    #endif
+    
+  }
+  
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_join.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_join.cpp
new file mode 100644
index 0000000..c892bfc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_join.cpp
@@ -0,0 +1,40 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+#include <iostream>
+#include <fstream>
+
+#include <boost/foreach.hpp>
+
+typedef CGAL::Simple_cartesian<double>                       Kernel;
+typedef Kernel::Point_3                                      Point;
+typedef CGAL::Surface_mesh<Point>                            Mesh;
+
+typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
+
+int main(int argc, char* argv[]) 
+{
+  Mesh sm1, sm2;
+  std::ifstream in1((argc>1)?argv[1]:"data/triangle.off");
+  in1 >> sm1;
+ 
+  std::ifstream in2((argc>2)?argv[2]:"data/quad.off");
+
+  Mesh::Property_map<vertex_descriptor,std::string> name1, name2;
+  bool created;
+  sm1.add_property_map<vertex_descriptor,int>("v:weight",7812);
+  boost::tie(name1, created) = sm1.add_property_map<vertex_descriptor,std::string>("v:name","hello");
+  boost::tie(name2, created) = sm2.add_property_map<vertex_descriptor,std::string>("v:name","world");
+
+  in2 >> sm2;
+
+  sm1 += sm2;
+
+ 
+  BOOST_FOREACH(vertex_descriptor vd , vertices(sm1)){
+    std::cerr << vd << " " <<  name1[vd] <<std::endl;
+  }
+  
+  
+  std::cout << sm1 << std::endl;
+
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_kruskal.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_kruskal.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_kruskal.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_kruskal.cmd
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_kruskal.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_kruskal.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_kruskal.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_kruskal.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_memory.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_memory.cpp
new file mode 100644
index 0000000..918767f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_memory.cpp
@@ -0,0 +1,67 @@
+#include <iostream>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+
+typedef CGAL::Simple_cartesian<double> K;
+typedef CGAL::Surface_mesh<K::Point_3> Mesh;
+typedef Mesh::Vertex_index vertex_descriptor;
+
+int main()
+{
+  Mesh m;
+  Mesh::Vertex_index u;
+  for(unsigned int i=0; i < 5; ++i){
+    Mesh::Vertex_index v = m.add_vertex(K::Point_3(0,0,i+1));  
+    if(i==2) u=v;
+  }
+
+  m.remove_vertex(u);
+
+  std::cout << "After insertion of 5 vertices and removal of the 3. vertex\n"
+            << "# vertices  / # vertices + # removed vertices = " 
+            << m.number_of_vertices()
+            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
+  
+  std::cout << "Iterate over vertices\n";
+  {
+    BOOST_FOREACH(vertex_descriptor vd, m.vertices()){
+      std::cout << m.point(vd) << std::endl;
+    }
+  }
+  
+  // The status of being used or removed is stored in a property map
+  Mesh::Property_map<Mesh::Vertex_index,bool> removed
+    = m.property_map<Mesh::Vertex_index,bool>("v:removed").first;
+ 
+  
+  std::cout << "\nIterate over vertices and deleted vertices\n"
+            << "# vertices / # vertices + # removed vertices = " 
+            << m.number_of_vertices()
+            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
+    {
+    unsigned int i = 0, end = m.number_of_vertices() + m.number_of_removed_vertices();
+    for( ; i < end; ++i) {
+      vertex_descriptor vh(i);
+      assert(m.is_removed(vh) == removed[vh]);
+      std::cout << m.point(vh) << ((m.is_removed(vh)) ? "  R\n" : "\n");
+    }
+  }
+
+  m.collect_garbage();
+
+  std::cout << "\nAfter garbage collection\n"
+            << "# vertices / # vertices + # removed vertices = "
+            << m.number_of_vertices()
+            << " / " << m.number_of_vertices() + m.number_of_removed_vertices() << std::endl;
+  
+ {
+   unsigned int i = 0, end = m.number_of_vertices() + m.number_of_removed_vertices();
+    for( ; i < end; ++i) {
+      vertex_descriptor vh(i);
+      std::cout << m.point(vh) << ((m.is_removed(vh)) ? "  R\n" : "\n");
+    }
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh/sm_properties.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh/sm_properties.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh/sm_properties.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh/sm_properties.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/CMakeLists.txt
new file mode 100644
index 0000000..62e7605
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesh_deformation_ )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater)
+  if (EIGEN3_FOUND)
+    include( ${EIGEN3_USE_FILE} )
+    include( CGAL_CreateSingleSourceCGALProgram )
+
+    include_directories (BEFORE "../../include")
+
+    create_single_source_cgal_program( "all_roi_assign_example.cpp" )
+    create_single_source_cgal_program( "all_roi_assign_example_custom_polyhedron.cpp" )
+    create_single_source_cgal_program( "all_roi_assign_example_Surface_mesh.cpp" )
+    create_single_source_cgal_program( "custom_weight_for_edges_example.cpp" )
+    create_single_source_cgal_program( "deform_polyhedron_with_custom_pmap_example.cpp" )
+    create_single_source_cgal_program( "k_ring_roi_translate_rotate_example.cpp" )
+    create_single_source_cgal_program( "k_ring_roi_translate_rotate_Surface_mesh.cpp" )
+
+    find_package( OpenMesh QUIET )
+    if ( OpenMesh_FOUND )
+    include( UseOpenMesh )
+      create_single_source_cgal_program( "all_roi_assign_example_with_OpenMesh.cpp" )
+      target_link_libraries( all_roi_assign_example_with_OpenMesh ${OPENMESH_LIBRARIES} )
+    else()
+      message(STATUS "Example that use OpenMesh will not be compiled.")
+    endif()
+
+  else()
+    message(STATUS "NOTICE: These examples require the Eigen library, version 3.2 or later and will not be compiled.")
+  endif()
+else()
+  
+    message(STATUS "NOTICE: These exmaples require the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp
new file mode 100644
index 0000000..2160083
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp
@@ -0,0 +1,156 @@
+#include <fstream>
+#include <map>
+#include <cmath>
+#include <CGAL/property_map.h>
+#include <CGAL/algorithm.h>
+
+struct Custom_point_3{
+  // Required by File_scanner_OFF
+  struct R{
+    typedef double RT;
+  };
+
+  double coords[3];
+  Custom_point_3(){}
+  Custom_point_3(double x, double y, double z)
+  { coords[0]=x; coords[1]=y; coords[2]=z; }
+  Custom_point_3(double x, double y, double z, double w)
+  { coords[0]=x/w; coords[1]=y/w; coords[2]=z/w; }
+
+  double x() const {return coords[0];}
+  double y() const {return coords[1];}
+  double z() const {return coords[2];}
+
+  double& operator[](int i)       { return coords[i]; }
+  double  operator[](int i) const { return coords[i]; }
+
+  friend std::ostream& operator<<(std::ostream& out, const Custom_point_3& p)
+  {
+    out << p.x() << " " << p.y() << " " << p.z();
+    return out;
+  }
+
+  friend std::istream& operator<<(std::istream& in, Custom_point_3& p)
+  {
+    in >> p.coords[0] >> p.coords[1] >> p.coords[2];
+    return in;
+  }
+};
+
+#include <CGAL/basic.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+// Halfedge adapters for Polyhedron_3
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+
+#include <CGAL/Surface_mesh_deformation.h>
+
+struct Custom_traits{
+  typedef Custom_point_3 Point_3;
+  struct Plane_3{};
+};
+
+typedef CGAL::Polyhedron_3<Custom_traits>       Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator      vertex_iterator;
+typedef boost::graph_traits<Polyhedron>::halfedge_descriptor  halfedge_descriptor;
+typedef boost::graph_traits<Polyhedron>::halfedge_iterator    halfedge_iterator;
+
+typedef std::map<vertex_descriptor, std::size_t>   Internal_vertex_map;
+typedef std::map<halfedge_descriptor, std::size_t>     Internal_hedge_map;
+
+typedef boost::associative_property_map<Internal_vertex_map>   Vertex_index_map;
+typedef boost::associative_property_map<Internal_hedge_map>     Hedge_index_map;
+
+typedef CGAL::Surface_mesh_deformation<Polyhedron, Vertex_index_map, Hedge_index_map> Surface_mesh_deformation;
+
+int main()
+{
+  Polyhedron mesh;
+  std::ifstream input("data/plane.off");
+
+  if ( !input || !(input >> mesh) || mesh.empty() ) {
+    std::cerr<< "Cannot open  data/plane.off" << std::endl;
+    return 1;
+  }
+
+  // Index maps must contain an index unique per vertex starting from 0
+  // to the total number of vertices
+  Internal_vertex_map internal_vertex_index_map;
+  Vertex_index_map vertex_index_map(internal_vertex_index_map);
+  vertex_iterator vb, ve;
+  std::size_t counter = 0;
+  for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) {
+    put(vertex_index_map, *vb, counter);
+  }
+
+  Internal_hedge_map internal_hedge_index_map;
+  Hedge_index_map hedge_index_map(internal_hedge_index_map);
+  counter = 0;
+  halfedge_iterator eb, ee;
+  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) {
+    put(hedge_index_map, *eb, counter);
+  }
+
+  Surface_mesh_deformation deform_mesh(mesh, vertex_index_map, hedge_index_map);
+
+  // Insert the whole mesh as region of interest
+  boost::tie(vb, ve) = vertices(mesh);
+  deform_mesh.insert_roi_vertices(vb, ve);
+
+  // Insert two control vertices
+  vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213);
+  vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157);
+  deform_mesh.insert_control_vertex(control_1);
+  deform_mesh.insert_control_vertex(control_2);
+
+  // The definition of the ROI and the control vertices is done, call preprocess
+  bool is_matrix_factorization_OK = deform_mesh.preprocess();
+  if(!is_matrix_factorization_OK){
+    std::cerr << "Check documentation of preprocess()" << std::endl;
+    return 1;
+  }
+
+  // Use set_target_position() to set the constained position
+  // of control_1. control_2 remains at the last assigned positions
+  Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60);
+  deform_mesh.set_target_position(control_1, constrained_pos_1);
+
+  // Deform the mesh, the positions of vertices of 'mesh' are updated
+  deform_mesh.deform();
+  // The function deform() can be called several times if the convergence has not been reached yet
+  deform_mesh.deform();
+
+  // Set the constained position of control_2
+  Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70);
+  deform_mesh.set_target_position(control_2, constrained_pos_2);
+
+
+  // Call the function deform() with one-time parameters:
+  // iterate 10 times and do not use energy based termination criterion
+  deform_mesh.deform(10, 0.0);
+
+  std::ofstream output("deform_1.off");
+  output << mesh; // save deformed mesh
+  output.close();
+
+  // Add another control vertex
+  vertex_descriptor control_3 = *CGAL::cpp11::next(vb, 92);
+  deform_mesh.insert_control_vertex(control_3);
+
+  // The prepocessing step is again needed
+  if(!deform_mesh.preprocess()) {
+    std::cerr << "Check documentation of preprocess()" << std::endl;
+    return 1;
+  }
+
+  Surface_mesh_deformation::Point constrained_pos_3(0.55, 0.30, -0.70);
+  deform_mesh.set_target_position(control_3, constrained_pos_3);
+
+  deform_mesh.deform(15, 0.0);
+
+  output.open("deform_2.off");
+  output << mesh;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp
new file mode 100644
index 0000000..8ed1a56
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp
@@ -0,0 +1,85 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+// HalfedgeGraph adapters for Polyhedron_3
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+
+#include <CGAL/Surface_mesh_deformation.h>
+
+#include <fstream>
+#include <map>
+#include <CGAL/property_map.h>
+
+typedef CGAL::Simple_cartesian<double>   Kernel;
+typedef CGAL::Polyhedron_3<Kernel>       Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::vertex_iterator      vertex_iterator;
+typedef boost::graph_traits<Polyhedron>::halfedge_descriptor halfedge_descriptor;
+typedef boost::graph_traits<Polyhedron>::halfedge_iterator    halfedge_iterator;
+
+typedef std::map<vertex_descriptor, std::size_t>   Internal_vertex_map;
+typedef std::map<halfedge_descriptor, std::size_t>     Internal_hedge_map;
+
+typedef boost::associative_property_map<Internal_vertex_map>   Vertex_index_map;
+typedef boost::associative_property_map<Internal_hedge_map>     Hedge_index_map;
+
+// A model of SurfaceMeshDeformationWeights using a map of pre-computed weights
+struct Weights_from_map
+{
+  typedef Polyhedron Halfedge_graph;
+  Weights_from_map(std::map<halfedge_descriptor, double>* weight_map) : weight_map(weight_map)
+  { }
+  template<class VertexPointMap>
+  double operator()(halfedge_descriptor e, Polyhedron& /*P*/, VertexPointMap /*vpm*/) {
+    return (*weight_map)[e];
+  }
+  std::map<halfedge_descriptor, double>* weight_map;
+};
+
+typedef CGAL::Surface_mesh_deformation<Polyhedron, Vertex_index_map, Hedge_index_map, CGAL::ORIGINAL_ARAP, Weights_from_map> Surface_mesh_deformation;
+
+int main()
+{
+  Polyhedron mesh;
+  std::ifstream input("data/plane.off");
+
+  if ( !input || !(input >> mesh) || mesh.empty() ) {
+    std::cerr << "Cannot open  data/plane.off" << std::endl;
+    return 1;
+  }
+
+  std::map<halfedge_descriptor, double> weight_map;
+  // Store all the weights
+  halfedge_iterator eb, ee;
+  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb)
+  {
+    weight_map[*eb] = 1.0; // store some precomputed weights
+  }
+
+  // Create and initialize the vertex index map
+  Internal_vertex_map internal_vertex_index_map;
+  Vertex_index_map vertex_index_map(internal_vertex_index_map);
+  vertex_iterator vb, ve;
+  std::size_t counter = 0;
+  for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) {
+    put(vertex_index_map, *vb, counter);
+  }
+
+  // Create and initialize the halfedge index map
+  Internal_hedge_map internal_hedge_index_map;
+  Hedge_index_map hedge_index_map(internal_hedge_index_map);
+  counter = 0;
+  for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) {
+    put(hedge_index_map, *eb, counter);
+  }
+  Surface_mesh_deformation deform_mesh(mesh,
+                                       vertex_index_map,
+                                       hedge_index_map,
+                                       get(CGAL::vertex_point, mesh),
+                                       Weights_from_map(&weight_map));
+
+  // Deform mesh as desired
+  // .....
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/data/plane.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/data/plane.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/data/plane.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/data/plane.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Authalic_parameterization.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Authalic_parameterization.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp
new file mode 100644
index 0000000..1b89de2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp
@@ -0,0 +1,110 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Discrete_authalic_parameterizer_3.h>
+
+#include <iostream>
+#include <cstdlib>
+#include <fstream>
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef CGAL::Simple_cartesian<double>      Kernel;
+typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "PARAMETERIZATION" << std::endl;
+    std::cerr << "  Discrete Authalic Parameterization" << std::endl;
+    std::cerr << "  circle border" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    if (argc-1 != 1)
+    {
+        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
+        return(EXIT_FAILURE);
+    }
+
+    // File name is:
+    const char* input_filename  = argv[1];
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    // Read the mesh
+    std::ifstream stream(input_filename);
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Create Polyhedron adaptor
+    // Note: no cutting => we support only
+    // meshes that are topological disks
+    //***************************************
+
+    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
+                                            Parameterization_polyhedron_adaptor;
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    //***************************************
+    // Discrete Authalic Parameterization
+    // (defaults are circular border and Eigen solver)
+    //***************************************
+
+    typedef CGAL::Discrete_authalic_parameterizer_3<Parameterization_polyhedron_adaptor>
+                                                        Parameterizer;
+
+    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // Raw output: dump (u,v) pairs
+    Polyhedron::Vertex_const_iterator pVertex;
+    for (pVertex = mesh.vertices_begin();
+        pVertex != mesh.vertices_end();
+        pVertex++)
+    {
+        // (u,v) pair is stored in any halfedge
+        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
+        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
+        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/CMakeLists.txt
new file mode 100644
index 0000000..59271e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/CMakeLists.txt
@@ -0,0 +1,75 @@
+# This is the CMake script for compiling this folder.
+
+
+project( Surface_mesh_parameterization_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+# Include this package's headers first
+include_directories (BEFORE . include ../../include)
+
+# Find CGAL
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  # VisualC++ optimization for applications dealing with large data
+  if (MSVC)
+    # Use /FR to turn on IntelliSense
+    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
+
+    # Allow Windows applications to use up to 3GB of RAM
+    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+
+    # Turn off stupid VC++ warnings
+    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4311 /wd4800 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
+    
+    # Print new compilation options
+    message( STATUS "USING DEBUG CXXFLAGS   = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'" )
+    message( STATUS "USING DEBUG EXEFLAGS   = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" )
+    message( STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" )
+    message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" )
+  endif()
+
+
+  # Link with Boost.ProgramOptions (optional)
+  find_package(Boost QUIET COMPONENTS program_options)
+  if(Boost_PROGRAM_OPTIONS_FOUND)
+    if( CGAL_AUTO_LINK_ENABLED )
+      message( STATUS "Boost.ProgramOptions library: found" )
+    else()
+      message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" )
+    endif()
+    add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
+    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
+ endif()
+
+ 
+  find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
+ 
+  if (EIGEN3_FOUND)
+    # Executables that require Eigen 3.1
+    include( ${EIGEN3_USE_FILE} ) 
+  create_single_source_cgal_program( "Authalic_parameterization.cpp" )
+  create_single_source_cgal_program( "Mesh_cutting_parameterization.cpp" )
+  create_single_source_cgal_program( "Simple_parameterization.cpp" )
+  create_single_source_cgal_program( "Square_border_parameterization.cpp" )
+
+    create_single_source_cgal_program( "Complete_parameterization_example.cpp" )
+
+  create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" )
+
+  else(EIGEN3_FOUND)
+    message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.")  
+  endif(EIGEN3_FOUND)
+
+else()
+
+  message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.")
+
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Complete_parameterization_example.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Complete_parameterization_example.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp
new file mode 100644
index 0000000..c078600
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp
@@ -0,0 +1,285 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Discrete_authalic_parameterizer_3.h>
+#include <CGAL/Square_border_parameterizer_3.h>
+#include <CGAL/Parameterization_mesh_patch_3.h>
+
+#include <CGAL/Eigen_solver_traits.h>
+
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef CGAL::Simple_cartesian<double>      Kernel;
+typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
+
+// Polyhedron adaptor
+typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
+                                            Parameterization_polyhedron_adaptor;
+
+// Type describing a border or seam as a vertex list
+typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
+                                            Seam;
+
+
+// ----------------------------------------------------------------------------
+// Private functions
+// ----------------------------------------------------------------------------
+
+// If the mesh is a topological disk, extract its longest border,
+// else compute a very simple cut to make it homeomorphic to a disk.
+// Return the border of this region (empty on error)
+//
+// CAUTION: this cutting algorithm is very naive. Write your own!
+static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
+{
+    // Helper class to compute genus or extract borders
+    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
+                                            Mesh_feature_extractor;
+
+    Seam seam;              // returned list
+
+    // Get reference to Polyhedron_3 mesh
+    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
+
+    // Extract mesh borders and compute genus
+    Mesh_feature_extractor feature_extractor(mesh_adaptor);
+    int nb_borders = feature_extractor.get_nb_borders();
+    int genus = feature_extractor.get_genus();
+
+    // If mesh is a topological disk
+    if (genus == 0 && nb_borders > 0)
+    {
+        // Pick the longest border
+        seam = feature_extractor.get_longest_border();
+    }
+    else // if mesh is *not* a topological disk, create a virtual cut
+    {
+        const int CUT_LENGTH = 6;
+
+        // Build consecutive halfedges array
+        Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
+        seam_halfedges[0] = mesh.halfedges_begin();
+        if (seam_halfedges[0] == NULL)
+            return seam;                    // return empty list
+        int i;
+        for (i=1; i<CUT_LENGTH; i++)
+        {
+            seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
+            if (seam_halfedges[i] == NULL)
+                return seam;                // return empty list
+        }
+
+        // Convert halfedges array to two-ways vertices list
+        for (i=0; i<CUT_LENGTH; i++)
+            seam.push_back(seam_halfedges[i]->vertex());
+        for (i=CUT_LENGTH-1; i>=0; i--)
+            seam.push_back(seam_halfedges[i]->opposite()->vertex());
+    }
+
+    return seam;
+}
+
+// Dump parameterized mesh to an eps file
+static bool write_file_eps(const Parameterization_polyhedron_adaptor& mesh_adaptor,
+                           const char *pFilename,
+                           double scale = 500.0)
+{
+    const Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
+
+    std::ofstream out(pFilename);
+    if(!out)
+        return false;
+    CGAL::set_ascii_mode(out);
+
+    // compute bounding box
+    double xmin,xmax,ymin,ymax;
+    xmin = ymin = xmax = ymax = 0;
+    Polyhedron::Halfedge_const_iterator pHalfedge;
+    for (pHalfedge = mesh.halfedges_begin();
+         pHalfedge != mesh.halfedges_end();
+         pHalfedge++)
+    {
+        double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
+        double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
+        double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
+        double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
+        xmin = (std::min)(xmin,x1);
+        xmin = (std::min)(xmin,x2);
+        xmax = (std::max)(xmax,x1);
+        xmax = (std::max)(xmax,x2);
+        ymax = (std::max)(ymax,y1);
+        ymax = (std::max)(ymax,y2);
+        ymin = (std::min)(ymin,y1);
+        ymin = (std::min)(ymin,y2);
+    }
+
+    out << "%!PS-Adobe-2.0 EPSF-2.0" << std::endl;
+    out << "%%BoundingBox: " << int(xmin+0.5) << " "
+                                << int(ymin+0.5) << " "
+                                << int(xmax+0.5) << " "
+                                << int(ymax+0.5) << std::endl;
+    out << "%%HiResBoundingBox: " << xmin << " "
+                                    << ymin << " "
+                                    << xmax << " "
+                                    << ymax << std::endl;
+    out << "%%EndComments" << std::endl;
+    out << "gsave" << std::endl;
+    out << "0.1 setlinewidth" << std::endl;
+
+    // color macros
+    out << std::endl;
+    out << "% RGB color command - r g b C" << std::endl;
+    out << "/C { setrgbcolor } bind def" << std::endl;
+    out << "/white { 1 1 1 C } bind def" << std::endl;
+    out << "/black { 0 0 0 C } bind def" << std::endl;
+
+    // edge macro -> E
+    out << std::endl;
+    out << "% Black stroke - x1 y1 x2 y2 E" << std::endl;
+    out << "/E {moveto lineto stroke} bind def" << std::endl;
+    out << "black" << std::endl << std::endl;
+
+    // for each halfedge
+    for (pHalfedge = mesh.halfedges_begin();
+         pHalfedge != mesh.halfedges_end();
+         pHalfedge++)
+    {
+        double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
+        double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
+        double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
+        double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
+        out << x1 << " " << y1 << " " << x2 << " " << y2 << " E" << std::endl;
+    }
+
+    /* Emit EPS trailer. */
+    out << "grestore" << std::endl;
+    out << std::endl;
+    out << "showpage" << std::endl;
+
+    return true;
+}
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "PARAMETERIZATION" << std::endl;
+    std::cerr << "  Discrete Authalic Parameterization" << std::endl;
+    std::cerr << "  Square border" << std::endl;
+    std::cerr << "  Eigen solver" << std::endl;
+    std::cerr << "  Very simple cut if model is not a topological disk" << std::endl;
+    std::cerr << "  Output: EPS" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    if (argc-1 != 2)
+    {
+        std::cerr << "Usage: " << argv[0] << " input_file.off output_file.eps" << std::endl;
+        return(EXIT_FAILURE);
+    }
+
+    // File names are:
+    const char* input_filename  = argv[1];
+    const char* output_filename = argv[2];
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    // Read the mesh
+    std::ifstream stream(input_filename);
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Create Polyhedron adaptor
+    //***************************************
+
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    //***************************************
+    // Virtually cut mesh
+    //***************************************
+
+    // The parameterization methods support only meshes that
+    // are topological disks => we need to compute a "cutting" of the mesh
+    // that makes it homeomorphic to a disk
+    Seam seam = cut_mesh(mesh_adaptor);
+    if (seam.empty())
+    {
+        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    // Create a second adaptor that virtually "cuts" the mesh following the 'seam' path
+    typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
+                                            Mesh_patch_polyhedron;
+    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
+    if (!mesh_patch.is_valid())
+    {
+        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Discrete Authalic Parameterization (square border)
+    // with Eigen solver
+    //***************************************
+
+    // Border parameterizer
+    typedef CGAL::Square_border_arc_length_parameterizer_3<Mesh_patch_polyhedron>
+                                                            Border_parameterizer;
+    // Discrete Authalic Parameterization (square border)
+    // with Eigen solver
+    typedef CGAL::Discrete_authalic_parameterizer_3<Mesh_patch_polyhedron,
+                                                    Border_parameterizer> Parameterizer;
+
+    Parameterizer::Error_code err = CGAL::parameterize(mesh_patch, Parameterizer());
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // Write Postscript file
+    if ( ! write_file_eps(mesh_adaptor, output_filename) )
+    {
+        std::cerr << "Error: cannot write file " << output_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp
new file mode 100644
index 0000000..d012ca5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp
@@ -0,0 +1,196 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Parameterization_mesh_patch_3.h>
+
+#include <iostream>
+#include <fstream>
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef CGAL::Simple_cartesian<double>      Kernel;
+typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
+
+// Polyhedron adaptor
+typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
+                                            Parameterization_polyhedron_adaptor;
+
+// Type describing a border or seam as a vertex list
+typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
+                                            Seam;
+
+
+// ----------------------------------------------------------------------------
+// Private functions
+// ----------------------------------------------------------------------------
+
+// If the mesh is a topological disk, extract its longest border,
+// else compute a very simple cut to make it homeomorphic to a disk.
+// Return the border of this region (empty on error)
+//
+// CAUTION: this cutting algorithm is very naive. Write your own!
+static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
+{
+    // Helper class to compute genus or extract borders
+    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
+                                            Mesh_feature_extractor;
+
+    Seam seam;              // returned list
+
+    // Get reference to Polyhedron_3 mesh
+    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
+
+    // Extract mesh borders and compute genus
+    Mesh_feature_extractor feature_extractor(mesh_adaptor);
+    int nb_borders = feature_extractor.get_nb_borders();
+    int genus = feature_extractor.get_genus();
+
+    // If mesh is a topological disk
+    if (genus == 0 && nb_borders > 0)
+    {
+        // Pick the longest border
+        seam = feature_extractor.get_longest_border();
+    }
+    else // if mesh is *not* a topological disk, create a virtual cut
+    {
+        const int CUT_LENGTH = 6;
+
+        // Build consecutive halfedges array
+        Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
+        seam_halfedges[0] = mesh.halfedges_begin();
+        if (seam_halfedges[0] == NULL)
+            return seam;                    // return empty list
+        int i;
+        for (i=1; i<CUT_LENGTH; i++)
+        {
+            seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
+            if (seam_halfedges[i] == NULL)
+                return seam;                // return empty list
+        }
+
+        // Convert halfedges array to two-ways vertices list
+        for (i=0; i<CUT_LENGTH; i++)
+            seam.push_back(seam_halfedges[i]->vertex());
+        for (i=CUT_LENGTH-1; i>=0; i--)
+            seam.push_back(seam_halfedges[i]->opposite()->vertex());
+    }
+
+    return seam;
+}
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "PARAMETERIZATION" << std::endl;
+    std::cerr << "  Floater parameterization" << std::endl;
+    std::cerr << "  Circle border" << std::endl;
+    std::cerr << "  Very simple cut if model is not a topological disk" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    if (argc-1 != 1)
+    {
+        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
+        return(EXIT_FAILURE);
+    }
+
+    // File name is:
+    const char* input_filename  = argv[1];
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    // Read the mesh
+    std::ifstream stream(input_filename);
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Create Polyhedron adaptor
+    //***************************************
+
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    //***************************************
+    // Virtually cut mesh
+    //***************************************
+
+    // The parameterization methods support only meshes that
+    // are topological disks => we need to compute a "cutting" of the mesh
+    // that makes it homeomorphic to a disk
+    Seam seam = cut_mesh(mesh_adaptor);
+    if (seam.empty())
+    {
+        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    // Create a second adaptor that virtually "cuts" the mesh following the 'seam' path
+    typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
+                                            Mesh_patch_polyhedron;
+    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
+    if (!mesh_patch.is_valid())
+    {
+        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Floater Mean Value Coordinates parameterization
+    //***************************************
+
+    typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron>
+                                            Parameterizer; // Type that defines the error codes
+
+    Parameterizer::Error_code err = CGAL::parameterize(mesh_patch);
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // Raw output: dump (u,v) pairs
+    Polyhedron::Vertex_const_iterator pVertex;
+    for (pVertex = mesh.vertices_begin();
+        pVertex != mesh.vertices_end();
+        pVertex++)
+    {
+        // (u,v) pair is stored in any halfedge
+        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
+        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
+        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Simple_parameterization.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Simple_parameterization.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cpp
new file mode 100644
index 0000000..68a076f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cpp
@@ -0,0 +1,108 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+
+#include <iostream>
+#include <fstream>
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef CGAL::Simple_cartesian<double>      Kernel;
+typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "PARAMETERIZATION" << std::endl;
+    std::cerr << "  Floater parameterization" << std::endl;
+    std::cerr << "  Circle border" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    if (argc-1 != 1)
+    {
+        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
+        return(EXIT_FAILURE);
+    }
+
+    // File name is:
+    const char* input_filename  = argv[1];
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    // Read the mesh
+    std::ifstream stream(input_filename);
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Create Polyhedron adaptor
+    // Note: no cutting => we support only
+    // meshes that are topological disks
+    //***************************************
+
+    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
+                                            Parameterization_polyhedron_adaptor;
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    //***************************************
+    // Floater Mean Value Coordinates parameterization
+    // (defaults are circular border and Eigen solver)
+    //***************************************
+
+    typedef CGAL::Parameterizer_traits_3<Parameterization_polyhedron_adaptor>
+                                            Parameterizer;  // Type that defines the error codes
+
+    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor);
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // Raw output: dump (u,v) pairs
+    Polyhedron::Vertex_const_iterator pVertex;
+    for (pVertex = mesh.vertices_begin();
+        pVertex != mesh.vertices_end();
+        pVertex++)
+    {
+        // (u,v) pair is stored in any halfedge
+        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
+        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
+        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Square_border_parameterization.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/Square_border_parameterization.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp
new file mode 100644
index 0000000..426d9a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp
@@ -0,0 +1,115 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Square_border_parameterizer_3.h>
+
+#include <iostream>
+#include <fstream>
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef CGAL::Simple_cartesian<double>      Kernel;
+typedef CGAL::Polyhedron_3<Kernel>          Polyhedron;
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+int main(int argc, char * argv[])
+{
+    std::cerr << "PARAMETERIZATION" << std::endl;
+    std::cerr << "  Floater parameterization" << std::endl;
+    std::cerr << "  square border" << std::endl;
+
+    //***************************************
+    // decode parameters
+    //***************************************
+
+    if (argc-1 != 1)
+    {
+        std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
+        return(EXIT_FAILURE);
+    }
+
+    // File name is:
+    const char* input_filename  = argv[1];
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    // Read the mesh
+    std::ifstream stream(input_filename);
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    //***************************************
+    // Create Polyhedron adaptor
+    // Note: no cutting => we support only
+    // meshes that are topological disks
+    //***************************************
+
+    typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
+                                            Parameterization_polyhedron_adaptor;
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    //***************************************
+    // Floater Mean Value Coordinates parameterization
+    // with square border
+    //***************************************
+
+    // Square border parameterizer
+    typedef CGAL::Square_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
+                                                       Border_parameterizer;
+
+    // Floater Mean Value Coordinates parameterizer with square border
+    typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
+                                                         Border_parameterizer>
+                                                        Parameterizer;
+
+    Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:   
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:     
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:    
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // Raw output: dump (u,v) pairs
+    Polyhedron::Vertex_const_iterator pVertex;
+    for (pVertex = mesh.vertices_begin();
+        pVertex != mesh.vertices_end();
+        pVertex++)
+    {
+        // (u,v) pair is stored in any halfedge
+        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
+        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
+        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/check_64x64.bmp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/check_64x64.bmp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/check_64x64.bmp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/check_64x64.bmp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/holes.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/holes.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/holes.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/holes.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/mannequin-devil.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/mannequin-devil.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/mannequin-devil.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/mannequin-devil.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/mask_cone.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/mask_cone.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/mask_cone.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/mask_cone.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/nefertiti.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/nefertiti.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/nefertiti.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/nefertiti.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/parameterization.mtl b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/parameterization.mtl
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/parameterization.mtl
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/parameterization.mtl
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/rotor.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/rotor.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/rotor.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/rotor.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/sphere966.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/sphere966.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/sphere966.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/sphere966.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/three_peaks.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/three_peaks.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/data/three_peaks.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/data/three_peaks.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Mesh_cutter.h b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Mesh_cutter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Mesh_cutter.h
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Mesh_cutter.h
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Parameterization_polyhedron_adaptor_ex.h b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Parameterization_polyhedron_adaptor_ex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Parameterization_polyhedron_adaptor_ex.h
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Parameterization_polyhedron_adaptor_ex.h
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Polyhedron_ex.h b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Polyhedron_ex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/include/Polyhedron_ex.h
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/include/Polyhedron_ex.h
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp
new file mode 100644
index 0000000..f98a3b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp
@@ -0,0 +1,488 @@
+// ----------------------------------------------------------------------------
+// USAGE EXAMPLES
+// ----------------------------------------------------------------------------
+
+//----------------------------------------------------------
+// Discrete Conformal Map parameterization
+// circle border
+// OpenNL solver
+// output is a eps map
+// input file is mesh.off
+//----------------------------------------------------------
+// polyhedron_ex_parameterization -t conformal -b circle mesh.off mesh.eps
+
+//----------------------------------------------------------
+// Least Squares Conformal Maps parameterization
+// two pinned vertices (automatically picked)
+// OpenNL solver
+// output is a .obj
+// input file is mesh.off
+//----------------------------------------------------------
+// polyhedron_ex_parameterization -t lscm -b 2pts mesh.off mesh.obj
+
+
+#include <CGAL/Timer.h>
+#include <CGAL/parameterize.h>
+#include <CGAL/Parameterization_mesh_patch_3.h>
+#include <CGAL/Circular_border_parameterizer_3.h>
+#include <CGAL/Square_border_parameterizer_3.h>
+#include <CGAL/Two_vertices_parameterizer_3.h>
+#include <CGAL/Barycentric_mapping_parameterizer_3.h>
+#include <CGAL/Discrete_conformal_map_parameterizer_3.h>
+#include <CGAL/Discrete_authalic_parameterizer_3.h>
+#include <CGAL/Mean_value_coordinates_parameterizer_3.h>
+#include <CGAL/LSCM_parameterizer_3.h>
+#include <CGAL/Parameterization_mesh_feature_extractor.h>
+
+#include <CGAL/OpenNL/linear_solver.h>
+
+#include "Polyhedron_ex.h"
+#include "Mesh_cutter.h"
+#include "Parameterization_polyhedron_adaptor_ex.h"
+
+#include <iostream>
+#include <string.h>
+#include <ctype.h>
+#include <fstream>
+#include <cassert>
+
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+    #include <boost/program_options.hpp>
+    namespace po = boost::program_options;
+#endif
+
+
+// ----------------------------------------------------------------------------
+// Private types
+// ----------------------------------------------------------------------------
+
+typedef Polyhedron_ex                                       Polyhedron;
+
+// Mesh adaptors
+typedef Parameterization_polyhedron_adaptor_ex              Parameterization_polyhedron_adaptor;
+typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
+                                                            Mesh_patch_polyhedron;
+
+// Type describing a border or seam as a vertex list
+typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
+                                                            Seam;
+
+
+// ----------------------------------------------------------------------------
+// Private functions
+// ----------------------------------------------------------------------------
+
+// Cut the mesh to make it homeomorphic to a disk
+// or extract a region homeomorphic to a disc.
+// Return the border of this region (empty on error)
+//
+// CAUTION:
+// This method is provided "as is". It is very buggy and simply part of this example.
+// Developers using this package should implement a more robust cut algorithm!
+static Seam cut_mesh(Parameterization_polyhedron_adaptor& mesh_adaptor)
+{
+    // Helper class to compute genus or extract borders
+    typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor_ex>
+                                            Mesh_feature_extractor;
+    typedef Mesh_cutter::Backbone           Backbone;
+
+    Seam seam;              // returned list
+
+    // Get refererence to Polyhedron_3 mesh
+    Polyhedron& mesh = mesh_adaptor.get_adapted_mesh();
+
+    // Extract mesh borders and compute genus
+    Mesh_feature_extractor feature_extractor(mesh_adaptor);
+    int nb_borders = feature_extractor.get_nb_borders();
+    int genus = feature_extractor.get_genus();
+
+    // If mesh is a topological disk
+    if (genus == 0 && nb_borders > 0)
+    {
+        // Pick the longest border
+        seam = feature_extractor.get_longest_border();
+    }
+    else // if mesh is *not* a topological disk, create a virtual cut
+    {
+        Backbone seamingBackbone;           // result of cutting
+        Backbone::iterator he;
+
+        // Compute a cutting path that makes the mesh a "virtual" topological disk
+        mesh.compute_facet_centers();
+        Mesh_cutter cutter(mesh);
+        if (genus == 0)
+        {
+            // no border, we need to cut the mesh
+            assert (nb_borders == 0);
+            cutter.cut(seamingBackbone);    // simple cut
+        }
+        else // genus > 0 -> cut the mesh
+        {
+            cutter.cut_genus(seamingBackbone);
+        }
+
+        // The Mesh_cutter class is quite buggy
+        // => we check that seamingBackbone is valid
+        //
+        // 1) Check that seamingBackbone is not empty
+        if (seamingBackbone.begin() == seamingBackbone.end())
+            return seam;                    // return empty list
+        //
+        // 2) Check that seamingBackbone is a loop and
+        //    count occurences of seam halfedges
+        mesh.tag_halfedges(0);              // Reset counters
+        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
+        {
+            // Get next halfedge iterator (looping)
+            Backbone::iterator next_he = he;
+            next_he++;
+            if (next_he == seamingBackbone.end())
+                next_he = seamingBackbone.begin();
+
+            // Check that seamingBackbone is a loop: check that
+            // end of current HE == start of next one
+            if ((*he)->vertex() != (*next_he)->opposite()->vertex())
+                return seam;                // return empty list
+
+            // Increment counter (in "tag" field) of seam halfedges
+            (*he)->tag( (*he)->tag()+1 );
+        }
+        //
+        // 3) check that the seamingBackbone is a two-way list
+        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
+        {
+            // Counter of halfedge and opposite halfedge must be 1
+            if ((*he)->tag() != 1 || (*he)->opposite()->tag() != 1)
+                return seam;                // return empty list
+        }
+
+        // Convert list of halfedges to a list of vertices
+        for (he = seamingBackbone.begin(); he != seamingBackbone.end(); he++)
+            seam.push_back((*he)->vertex());
+    }
+
+    return seam;
+}
+
+// Call appropriate parameterization method based on command line parameters
+template<
+    class ParameterizationMesh_3,   // 3D surface
+    class GeneralSparseLinearAlgebraTraits_d,
+                                    // Traits class to solve a general sparse linear system
+    class SymmetricSparseLinearAlgebraTraits_d
+                                    // Traits class to solve a symmetric sparse linear system
+>
+typename CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
+parameterize(ParameterizationMesh_3& mesh,  // Mesh parameterization adaptor
+             const std::string& type,              // type of parameterization (see usage)
+             const std::string& border)            // type of border parameterization (see usage)
+{
+    typename CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::Error_code err;
+
+    if ( (type == std::string("floater"))  && (border == std::string("circle")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Mean_value_coordinates_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("floater")) && (border == std::string("square")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Mean_value_coordinates_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("barycentric")) && (border == std::string("circle")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Barycentric_mapping_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Circular_border_uniform_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("barycentric")) && (border == std::string("square")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Barycentric_mapping_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Square_border_uniform_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("conformal")) && (border == std::string("circle")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Discrete_conformal_map_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("conformal")) && (border == std::string("square")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Discrete_conformal_map_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("authalic")) && (border == std::string("circle")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Discrete_authalic_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("authalic")) && (border == std::string("square")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::Discrete_authalic_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+                GeneralSparseLinearAlgebraTraits_d
+            >());
+    }
+    else if ( (type == std::string("lscm")) && (border == std::string("2pts")) )
+    {
+        err = CGAL::parameterize(
+            mesh,
+            CGAL::LSCM_parameterizer_3<
+                ParameterizationMesh_3,
+                CGAL::Two_vertices_parameterizer_3<ParameterizationMesh_3>,
+                SymmetricSparseLinearAlgebraTraits_d
+            >());
+    }
+    else
+    {
+        std::cerr << "Error: invalid parameters combination " << type << " + " << border << std::endl;
+        err = CGAL::Parameterizer_traits_3<ParameterizationMesh_3>::ERROR_WRONG_PARAMETER;
+    }
+
+    return err;
+}
+
+
+// ----------------------------------------------------------------------------
+// main()
+// ----------------------------------------------------------------------------
+
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+int main(int argc, char * argv[])
+#else
+int main()
+#endif
+{
+    CGAL::Timer total_timer;
+    total_timer.start();
+
+    std::cerr << "PARAMETERIZATION" << std::endl;
+
+    //***************************************
+    // Read options on the command line
+    //***************************************
+
+    std::string type;               // default: Floater param
+    std::string border;             // default: circular border param.
+    std::string solver;             // default: OpenNL solver
+    std::string input;              // required
+    std::string output;             // default: out.eps
+    try
+    {
+#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS)
+        po::options_description desc("Allowed options");
+        desc.add_options()
+            ("help,h", "prints this help message")
+            ("type,t", po::value<std::string>(&type)->default_value("floater"),
+            "parameterization method: floater, conformal, barycentric, authalic or lscm")
+            ("border,b", po::value<std::string>(&border)->default_value("circle"),
+            "border shape: circle, square or 2pts (lscm only)")
+            ("solver,s", po::value<std::string>(&solver)->default_value("opennl"),
+            "solver: opennl")
+            ("input,i", po::value<std::string>(&input)->default_value(""),
+            "input mesh (OFF)")
+            ("output,o", po::value<std::string>(&output)->default_value("out.eps"),
+            "output file (EPS or OBJ)")
+            ;
+
+        po::positional_options_description p;
+        p.add("input", 1);
+        p.add("output", 1);
+
+        po::variables_map vm;
+        po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
+        po::notify(vm);
+
+        if (vm.count("help")) {
+            std::cout << desc << "\n";
+            return 1;
+        }
+#else
+        std::cerr << "Command-line options require Boost.ProgramOptions" << std::endl;
+        std::cerr << "Use hard-coded options" << std::endl;
+        border = "square";
+        type = "floater";
+        solver = "opennl";
+        input = "data/rotor.off";
+        output = "rotor_floater_square_opennl_parameterized.obj";
+#endif
+    }
+    catch(std::exception& e) {
+      std::cerr << "error: " << e.what() << "\n";
+      return 1;
+    }
+    catch(...) {
+      std::cerr << "Exception of unknown type!\n";
+      throw;
+    }
+
+    //***************************************
+    // Read the mesh
+    //***************************************
+
+    CGAL::Timer task_timer;
+    task_timer.start();
+
+    // Read the mesh
+    std::ifstream stream(input.c_str());
+    Polyhedron mesh;
+    stream >> mesh;
+    if(!stream || !mesh.is_valid() || mesh.empty())
+    {
+        std::cerr << "Error: cannot read OFF file " << input << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    std::cerr << "Read file " << input << ": "
+              << task_timer.time() << " seconds "
+              << "(" << mesh.size_of_facets() << " facets, "
+              << mesh.size_of_vertices() << " vertices)" << std::endl;
+    task_timer.reset();
+
+    //***************************************
+    // Create mesh adaptor
+    //***************************************
+
+    // The Surface_mesh_parameterization package needs an adaptor to handle Polyhedron_ex meshes
+    Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
+
+    // The parameterization methods support only meshes that
+    // are topological disks => we need to compute a cutting path
+    // that makes the mesh a "virtual" topological disk
+    //
+    // 1) Cut the mesh
+    Seam seam = cut_mesh(mesh_adaptor);
+    if (seam.empty())
+    {
+        std::cerr << "Input mesh not supported: the example cutting algorithm is too simple to cut this shape" << std::endl;
+        return EXIT_FAILURE;
+    }
+    //
+    // 2) Create adaptor that virtually "cuts" a patch in a Polyhedron_ex mesh
+    Mesh_patch_polyhedron   mesh_patch(mesh_adaptor, seam.begin(), seam.end());
+    if (!mesh_patch.is_valid())
+    {
+        std::cerr << "Input mesh not supported: non manifold shape or invalid cutting" << std::endl;
+        return EXIT_FAILURE;
+    }
+
+    std::cerr << "Mesh cutting: " << task_timer.time() << " seconds." << std::endl;
+    task_timer.reset();
+
+    //***************************************
+    // switch parameterization
+    //***************************************
+
+    std::cerr << "Parameterization..." << std::endl;
+
+    // Defines the error codes
+    typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron> Parameterizer;
+    Parameterizer::Error_code err;
+
+    if (solver == std::string("opennl"))
+    {
+        err = parameterize<Mesh_patch_polyhedron,
+                           OpenNL::DefaultLinearSolverTraits<double>,
+                           OpenNL::SymmetricLinearSolverTraits<double>
+                          >(mesh_patch, type, border);
+    }
+    else
+    {
+        std::cerr << "Error: invalid solver parameter " << solver << std::endl;
+        err = Parameterizer::ERROR_WRONG_PARAMETER;
+    }
+
+    // Report errors
+    switch(err) {
+    case Parameterizer::OK: // Success
+        break;
+    case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
+    case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
+    case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
+    case Parameterizer::ERROR_BORDER_TOO_SHORT:
+        std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    default: // Error
+        std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
+        return EXIT_FAILURE;
+        break;
+    };
+
+    std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl;
+    task_timer.reset();
+
+    //***************************************
+    // Output
+    //***************************************
+
+    // get output file's extension
+    std::string extension = output.substr(output.find_last_of('.'));
+
+    // Save mesh
+    if (extension == ".eps" || extension == ".EPS")
+    {
+        // write Postscript file
+        if ( ! mesh.write_file_eps(output.c_str()) )
+        {
+            std::cerr << "Error: cannot write file " << output << std::endl;
+            return EXIT_FAILURE;
+        }
+    }
+    else if (extension == ".obj" || extension == ".OBJ")
+    {
+        // write Wavefront obj file
+        if ( ! mesh.write_file_obj(output.c_str()) )
+        {
+            std::cerr << "Error: cannot write file " << output << std::endl;
+            return EXIT_FAILURE;
+        }
+    }
+    else
+    {
+        std::cerr << "Error: output format not supported" << output << std::endl;
+        err = Parameterizer::ERROR_WRONG_PARAMETER;
+        return EXIT_FAILURE;
+    }
+
+    std::cerr << "Write file " << output << ": "
+              << task_timer.time() << " seconds " << std::endl;
+
+    return EXIT_SUCCESS;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.bat b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.bat
new file mode 100644
index 0000000..9cdeb13
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.bat
@@ -0,0 +1,10 @@
+ at echo off
+
+rem Double-clickable version of quick_test_suite.sh on Windows/Cygwin
+
+rem Path to Cygwin is hard-coded
+PATH=%PATH%;c:\Applis\cygwin\bin
+
+sh ./quick_test_suite.sh
+pause
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.sh b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.sh
new file mode 100755
index 0000000..9db48f8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_parameterization/quick_test_suite.sh
@@ -0,0 +1,109 @@
+#!/bin/bash
+
+# This application is a cross-platform version of cgal_test.
+# This is a script for the CGAL test suite. Such a script must obey
+# the following rules:
+#
+# - for every target two one line messages are written to the file 'error.txt'
+#     the first one indicates if the compilation was successful
+#     the second one indicates if the execution was successful
+#   if one of the two was not successful, the line should start with 'ERROR:'
+# - running the script should not require any user interaction
+# - applications must be already compiled
+
+ERRORFILE=error.txt
+
+#---------------------------------------------------------------------#
+#                   find_executable <target>
+#                   (different on Windows and Unix)
+#---------------------------------------------------------------------#
+
+find_executable()
+{
+    PARAM_APPLICATION=""
+    [ -f ./debug/$1.exe ] && PARAM_APPLICATION="./debug/$1.exe"
+    [ -f ./release/$1.exe ] && PARAM_APPLICATION="./release/$1.exe"
+    [ -x ./$1 ] && PARAM_APPLICATION="./$1"
+    echo "$PARAM_APPLICATION"
+}
+
+#---------------------------------------------------------------------#
+#                    run <target>
+#---------------------------------------------------------------------#
+
+run()
+{
+    # Find exe
+    COMMAND="`find_executable $1`"
+    if [ -f "$COMMAND" ]; then
+      # Add params
+      if [ -f $1.cmd ] ; then
+          COMMAND="$COMMAND `cat $1.cmd`"
+      fi
+      if [ -f $1.cin ] ; then
+          COMMAND="cat $1.cin | $COMMAND"
+      fi
+
+      # Run
+      echo "------------------------------------------------------------------"
+      echo "- Executing $1"
+      echo "------------------------------------------------------------------"
+      echo
+      ulimit -t 3600 2> /dev/null
+      if eval $COMMAND 2>&1 ; then
+          echo "   successful execution   of $1" >> $ERRORFILE
+      else
+          echo "   ERROR:     execution   of $1" >> $ERRORFILE
+      fi
+    else
+      echo   "   ERROR:     not executed   $1" >> $ERRORFILE
+    fi
+}
+
+
+#---------------------------------------------------------------------#
+#                    main
+#---------------------------------------------------------------------#
+
+# start redirection to log file
+(
+
+#---------------------------------------------------------------------#
+#                    remove the previous error file
+#---------------------------------------------------------------------#
+
+rm -f $ERRORFILE
+touch $ERRORFILE
+
+#---------------------------------------------------------------------#
+#                    run the tests
+#---------------------------------------------------------------------#
+
+if [ $# -ne 0 ] ; then
+  for file in $* ; do
+    run $file
+  done
+else
+  echo "Run all tests."
+  run Authalic_parameterization 
+  run Complete_parameterization_example 
+  run Mesh_cutting_parameterization 
+  run polyhedron_ex_parameterization
+  run Simple_parameterization 
+  run Square_border_parameterization 
+fi
+
+#---------------------------------------------------------------------#
+#                   Recap results
+#---------------------------------------------------------------------#
+
+echo "------------------------------------------------------------------"
+echo "- Results"
+echo "------------------------------------------------------------------"
+echo
+cat $ERRORFILE
+echo
+rm -f $ERRORFILE
+
+) 2>&1 | tee quick_test_suite.log
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/CMakeLists.txt
new file mode 100644
index 0000000..677ea20
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/CMakeLists.txt
@@ -0,0 +1,73 @@
+# Created by the script cgal_create_cmake_script_with_options
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( Surface_mesh_segmentation )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )  
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+find_package( OpenMesh QUIET )
+
+if ( OpenMesh_FOUND )
+include( UseOpenMesh )
+else()
+  message(STATUS "Examples that use OpenMesh will not be compiled.")
+endif()
+
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+create_single_source_cgal_program( "sdf_values_example.cpp" )
+
+create_single_source_cgal_program( "segmentation_from_sdf_values_example.cpp" )
+
+create_single_source_cgal_program( "segmentation_via_sdf_values_example.cpp" )
+
+create_single_source_cgal_program( "segmentation_with_facet_ids_example.cpp" )
+create_single_source_cgal_program( "segmentation_from_sdf_values_SM_example.cpp")
+
+if(OpenMesh_FOUND)
+  create_single_source_cgal_program( "segmentation_from_sdf_values_OpenMesh_example.cpp" )
+  target_link_libraries( segmentation_from_sdf_values_OpenMesh_example ${OPENMESH_LIBRARIES} )
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/data/cactus.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/data/cactus.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/data/cactus.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/data/cactus.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/sdf_values_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/sdf_values_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/sdf_values_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/sdf_values_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp
new file mode 100644
index 0000000..1a998b4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_OpenMesh_example.cpp
@@ -0,0 +1,68 @@
+#define CGAL_BGL_TESTSUITE
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+
+#include <CGAL/mesh_segmentation.h>
+
+#include <CGAL/property_map.h>
+
+#include <iostream>
+#include <fstream>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT</* MyTraits*/> Mesh;
+
+typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
+typedef boost::graph_traits<Mesh>::face_iterator face_iterator;
+
+int main(int argc, char** argv )
+{
+  Mesh mesh;
+  if (argc==2)
+    OpenMesh::IO::read_mesh(mesh, argv[1]);
+  else
+    OpenMesh::IO::read_mesh(mesh, "data/cactus.off");
+
+  std::cout << "#F : " << num_faces(mesh) << std::endl;
+  std::cout << "#H : " << num_halfedges(mesh) << std::endl;
+  std::cout << "#V : " << num_vertices(mesh) << std::endl;
+
+  // create a property-map for SDF values
+  typedef std::map<face_descriptor, double> Facet_double_map;
+  Facet_double_map internal_sdf_map;
+  boost::associative_property_map<Facet_double_map> sdf_property_map(internal_sdf_map);
+
+  // compute SDF values
+  CGAL::sdf_values(mesh, sdf_property_map);
+
+  // create a property-map for segment-ids
+  typedef std::map<face_descriptor, std::size_t> Facet_int_map;
+  Facet_int_map internal_segment_map;
+  boost::associative_property_map<Facet_int_map> segment_property_map(internal_segment_map);
+
+  // segment the mesh using default parameters for number of levels, and smoothing lambda
+  // Any other scalar values can be used instead of using SDF values computed using the CGAL function
+  std::size_t number_of_segments = CGAL::segmentation_from_sdf_values(mesh, sdf_property_map, segment_property_map);
+
+  std::cout << "Number of segments: " << number_of_segments << std::endl;
+  // print segment-ids
+  face_iterator facet_it, fend;
+  for(boost::tie(facet_it,fend) = faces(mesh);
+      facet_it != fend; ++facet_it) {
+      // ids are between [0, number_of_segments -1]
+      std::cout << segment_property_map[*facet_it] << " ";
+  }
+  std::cout << std::endl;
+
+  const std::size_t number_of_clusters = 4;       // use 4 clusters in soft clustering
+  const double smoothing_lambda = 0.3;  // importance of surface features, suggested to be in-between [0,1]
+
+  // Note that we can use the same SDF values (sdf_property_map) over and over again for segmentation.
+  // This feature is relevant for segmenting the mesh several times with different parameters.
+  CGAL::segmentation_from_sdf_values(mesh, sdf_property_map, segment_property_map, number_of_clusters, smoothing_lambda);
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_SM_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_SM_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_SM_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_SM_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_from_sdf_values_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_via_sdf_values_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_via_sdf_values_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_via_sdf_values_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_via_sdf_values_example.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_with_facet_ids_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_with_facet_ids_example.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_segmentation/segmentation_with_facet_ids_example.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_segmentation/segmentation_with_facet_ids_example.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/CMakeLists.txt
new file mode 100644
index 0000000..ff2cb11
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesh_shortest_path_ )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "shortest_path_sequence.cpp" )
+  create_single_source_cgal_program( "shortest_paths_multiple_sources.cpp" )
+  create_single_source_cgal_program( "shortest_paths_no_id.cpp" )
+  create_single_source_cgal_program( "shortest_paths_with_id.cpp" )
+  
+  find_package( OpenMesh QUIET )
+  if ( OpenMesh_FOUND )
+    include( UseOpenMesh )
+    create_single_source_cgal_program( "shortest_paths_OpenMesh.cpp" )
+    target_link_libraries( shortest_paths_OpenMesh ${OPENMESH_LIBRARIES} )
+  else()
+    message(STATUS "Examples that use OpenMesh will not be compiled.")
+  endif()
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Mesh_3/data/elephant.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/data/elephant.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Mesh_3/data/elephant.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/data/elephant.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp
new file mode 100644
index 0000000..d29c38a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_path_sequence.cpp
@@ -0,0 +1,124 @@
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <iterator>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Random.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Surface_mesh_shortest_path.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+#include <boost/variant.hpp>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron_3;
+typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron_3> Traits;
+typedef CGAL::Surface_mesh_shortest_path<Traits> Surface_mesh_shortest_path;
+typedef Traits::Barycentric_coordinate Barycentric_coordinate;
+typedef boost::graph_traits<Polyhedron_3> Graph_traits;
+typedef Graph_traits::vertex_iterator vertex_iterator;
+typedef Graph_traits::face_iterator face_iterator;
+typedef Graph_traits::vertex_descriptor vertex_descriptor;
+typedef Graph_traits::face_descriptor face_descriptor;
+typedef Graph_traits::halfedge_descriptor halfedge_descriptor;
+
+// A model of SurfaceMeshShortestPathVisitor storing simplicies
+// using boost::variant
+struct Sequence_collector
+{
+  typedef boost::variant< vertex_descriptor,
+                         std::pair<halfedge_descriptor,double>,
+                         std::pair<face_descriptor, Barycentric_coordinate> > Simplex;
+  std::vector< Simplex > sequence;
+
+  void operator()(halfedge_descriptor he, double alpha)
+  {
+
+    sequence.push_back( std::make_pair(he, alpha) );
+  }
+
+  void operator()(vertex_descriptor v)
+  {
+    sequence.push_back( v );
+  }
+
+  void operator()(face_descriptor f, Barycentric_coordinate alpha)
+  {
+    sequence.push_back( std::make_pair(f, alpha) );
+  }
+};
+
+// A visitor to print what a variant contains using boost::apply_visitor
+struct Print_visitor : public boost::static_visitor<> {
+  int i;
+  Polyhedron_3& g;
+
+  Print_visitor(Polyhedron_3& g) :i(-1), g(g) {}
+
+  void operator()(vertex_descriptor v)
+  {
+    std::cout << "#" << ++i << " : Vertex : " << get(boost::vertex_index, g)[v] << "\n";
+  }
+
+  void operator()(const std::pair<halfedge_descriptor,double>& h_a)
+  {
+    std::cout << "#" << ++i << " : Edge : " << get(CGAL::halfedge_index, g)[h_a.first] << " , ("
+                                            << 1.0 - h_a.second << " , "
+                                            << h_a.second << ")\n";
+  }
+
+  void operator()(const std::pair<face_descriptor, Barycentric_coordinate>& f_bc)
+  {
+    std::cout << "#" << ++i << " : Face : " << get(CGAL::face_index, g)[f_bc.first] << " , ("
+                                            << f_bc.second[0] << " , "
+                                            << f_bc.second[1] << " , "
+                                            << f_bc.second[2] << ")\n";
+  }
+};
+
+int main(int argc, char** argv)
+{
+  // read input polyhedron
+  Polyhedron_3 polyhedron;
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  input >> polyhedron;
+  input.close();
+
+  // initialize indices of vertices, halfedges and facets
+  CGAL::set_halfedgeds_items_id(polyhedron);
+
+  // pick up a random face
+  const size_t randSeed = argc > 2 ? std::atoi(argv[2]) : 7915421;
+  CGAL::Random rand(randSeed);
+  const int target_face_index = rand.get_int(0, num_faces(polyhedron));
+  face_iterator face_it = faces(polyhedron).first;
+  std::advance(face_it,target_face_index);
+  // ... and define a barycentric coordinate inside the face
+  Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
+
+  // construct a shortest path query object and add a source point
+  Surface_mesh_shortest_path shortest_paths(polyhedron);
+  shortest_paths.add_source_point(*face_it, face_location);
+
+  // pick a random target point inside a face
+  face_it = faces(polyhedron).first;
+  std::advance(face_it, rand.get_int(0, num_faces(polyhedron)));
+
+  // collect the sequence of simplicies crossed by the shortest path
+  Sequence_collector sequence_collector;
+  shortest_paths.shortest_path_sequence_to_source_points(*face_it, face_location, sequence_collector);
+
+  // print the sequence using the visitor pattern
+  Print_visitor print_visitor(polyhedron);
+  for (size_t i = 0; i < sequence_collector.sequence.size(); ++i)
+    boost::apply_visitor(print_visitor, sequence_collector.sequence[i]);
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_OpenMesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_OpenMesh.cpp
new file mode 100644
index 0000000..156c79f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_OpenMesh.cpp
@@ -0,0 +1,71 @@
+#include <cstdlib>
+#include <iostream>
+#include <iterator>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Random.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
+
+#include <CGAL/boost/graph/iterator.h>
+
+#include <CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h>
+#include <CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT<> Mesh;
+
+typedef boost::graph_traits<Mesh> Graph_traits;
+typedef Graph_traits::vertex_descriptor vertex_descriptor;
+typedef Graph_traits::vertex_iterator vertex_iterator;
+typedef Graph_traits::face_descriptor face_descriptor;
+typedef Graph_traits::face_iterator face_iterator;
+
+typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Mesh> Traits;
+typedef CGAL::Surface_mesh_shortest_path<Traits> Surface_mesh_shortest_path;
+
+int main(int argc, char** argv)
+{
+  // read the input surface mesh
+  Mesh polyhedron;
+  OpenMesh::IO::read_mesh(polyhedron, (argc>1)?argv[1]:"data/elephant.off");
+
+  // pick up a random face
+  const size_t randSeed = argc > 2 ? std::atoi(argv[2]) : 7915421;
+  CGAL::Random rand(randSeed);
+  const int target_face_index = rand.get_int(0, num_faces(polyhedron));
+  face_iterator face_it = faces(polyhedron).first;
+  std::advance(face_it,target_face_index);
+  // ... and define a barycentric coordinate inside the face
+  Traits::Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
+
+  // construct a shortest path query object and add a source point
+  Surface_mesh_shortest_path shortest_paths(polyhedron);
+  shortest_paths.add_source_point(*face_it, face_location);
+
+  // For all vertices in the polyhedron, compute the points of
+  // the shortest path to the source point and write them
+  // into a file readable using the CGAL Polyhedron demo
+  std::ofstream output("shortest_paths_OpenMesh.cgal");
+  vertex_iterator vit, vit_end;
+  for ( boost::tie(vit, vit_end) = vertices(polyhedron);
+        vit != vit_end; ++vit)
+  {
+    std::vector<Traits::Point_3> points;
+    shortest_paths.shortest_path_points_to_source_points(*vit, std::back_inserter(points));
+
+    // print the points
+    output << points.size() << " ";
+    for (std::size_t i = 0; i < points.size(); ++i)
+      output << " " << points[i];
+    output << std::endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_multiple_sources.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_multiple_sources.cpp
new file mode 100644
index 0000000..3500f88
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_multiple_sources.cpp
@@ -0,0 +1,80 @@
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <iterator>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Random.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Surface_mesh_shortest_path.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron_3;
+typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron_3> Traits;
+typedef CGAL::Surface_mesh_shortest_path<Traits> Surface_mesh_shortest_path;
+typedef Surface_mesh_shortest_path::Face_location Face_location;
+typedef boost::graph_traits<Polyhedron_3> Graph_traits;
+typedef Graph_traits::vertex_iterator vertex_iterator;
+typedef Graph_traits::face_iterator face_iterator;
+typedef Graph_traits::face_descriptor face_descriptor;
+
+int main(int argc, char** argv)
+{
+  // read input polyhedron
+  Polyhedron_3 polyhedron;
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  input >> polyhedron;
+  input.close();
+
+  // initialize indices of vertices, halfedges and facets
+  CGAL::set_halfedgeds_items_id(polyhedron);
+
+  // pick up some source points inside faces,
+  const size_t randSeed = argc > 2 ? std::atoi(argv[2]) : 7915421;
+  CGAL::Random rand(randSeed);
+  // by copying the faces in a vector to get a direct access to faces
+  std::size_t nb_faces=num_faces(polyhedron);
+  face_iterator fit, fit_end;
+  boost::tie(fit, fit_end) = faces(polyhedron);
+  std::vector<face_descriptor> face_vector(fit, fit_end);
+  // and creating a vector of Face_location objects
+  const std::size_t nb_source_points = 30;
+  Traits::Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
+  std::vector<Face_location> faceLocations(nb_source_points, Face_location(face_descriptor(), face_location));
+  for (std::size_t i = 0; i < nb_source_points; ++i)
+  {
+    faceLocations[i].first=face_vector[rand.get_int(0, nb_faces)];
+  }
+
+  // construct a shortest path query object and add a range of source points
+  Surface_mesh_shortest_path shortest_paths(polyhedron);
+  shortest_paths.add_source_points(faceLocations.begin(), faceLocations.end());
+
+  // For all vertices in the polyhedron, compute the points of
+  // the shortest path to the source point and write them
+  // into a file readable using the CGAL Polyhedron demo
+  std::ofstream output("shortest_paths_multiple_sources.cgal");
+  vertex_iterator vit, vit_end;
+  for ( boost::tie(vit, vit_end) = vertices(polyhedron);
+        vit != vit_end; ++vit)
+  {
+    std::vector<Traits::Point_3> points;
+    shortest_paths.shortest_path_points_to_source_points(*vit, std::back_inserter(points));
+
+    // print the points
+    output << points.size() << " ";
+    for (std::size_t i = 0; i < points.size(); ++i)
+      output << " " << points[i];
+    output << std::endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_no_id.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_no_id.cpp
new file mode 100644
index 0000000..40d1744
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_no_id.cpp
@@ -0,0 +1,84 @@
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <iterator>
+
+#include <CGAL/Random.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Surface_mesh_shortest_path.h>
+
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3;
+typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron_3> Traits;
+// default property maps
+typedef boost::property_map<Polyhedron_3,
+                            boost::vertex_external_index_t>::type  Vertex_index_map;
+typedef boost::property_map<Polyhedron_3,
+                            CGAL::halfedge_external_index_t>::type Halfedge_index_map;
+typedef boost::property_map<Polyhedron_3,
+                            CGAL::face_external_index_t>::type     Face_index_map;
+typedef CGAL::Surface_mesh_shortest_path<Traits,
+                                         Vertex_index_map,
+                                         Halfedge_index_map,
+                                         Face_index_map>  Surface_mesh_shortest_path;
+typedef boost::graph_traits<Polyhedron_3> Graph_traits;
+typedef Graph_traits::vertex_iterator vertex_iterator;
+typedef Graph_traits::halfedge_iterator halfedge_iterator;
+typedef Graph_traits::face_iterator face_iterator;
+
+
+int main(int argc, char** argv)
+{
+  // read input polyhedron
+  Polyhedron_3 polyhedron;
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  input >> polyhedron;
+  input.close();
+
+  // pick up a random face
+  const size_t randSeed = argc > 2 ? std::atoi(argv[2]) : 7915421;
+  CGAL::Random rand(randSeed);
+  const int target_face_index = rand.get_int(0, num_faces(polyhedron));
+  face_iterator face_it = faces(polyhedron).first;
+  std::advance(face_it,target_face_index);
+  // ... and define a barycentric coordinate inside the face
+  Traits::Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
+
+  // construct a shortest path query object and add a source point
+  // Note that the external index property map are automatically initialized
+  Surface_mesh_shortest_path shortest_paths(polyhedron,
+                                            get(boost::vertex_external_index, polyhedron),
+                                            get(CGAL::halfedge_external_index, polyhedron),
+                                            get(CGAL::face_external_index, polyhedron),
+                                            get(CGAL::vertex_point, polyhedron));
+  shortest_paths.add_source_point(*face_it, face_location);
+
+  // For all vertices in the polyhedron, compute the points of
+  // the shortest path to the source point and write them
+  // into a file readable using the CGAL Polyhedron demo
+  std::ofstream output("shortest_paths_no_id.cgal");
+  vertex_iterator vit, vit_end;
+  for ( boost::tie(vit, vit_end) = vertices(polyhedron);
+        vit != vit_end; ++vit)
+  {
+    std::vector<Traits::Point_3> points;
+    shortest_paths.shortest_path_points_to_source_points(*vit, std::back_inserter(points));
+
+    // print the points
+    output << points.size() << " ";
+    for (std::size_t i = 0; i < points.size(); ++i)
+      output << " " << points[i];
+    output << std::endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_with_id.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_with_id.cpp
new file mode 100644
index 0000000..76cefe7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_shortest_path/shortest_paths_with_id.cpp
@@ -0,0 +1,70 @@
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <iterator>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <CGAL/Random.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/Surface_mesh_shortest_path.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron_3;
+typedef CGAL::Surface_mesh_shortest_path_traits<Kernel, Polyhedron_3> Traits;
+typedef CGAL::Surface_mesh_shortest_path<Traits> Surface_mesh_shortest_path;
+typedef boost::graph_traits<Polyhedron_3> Graph_traits;
+typedef Graph_traits::vertex_iterator vertex_iterator;
+typedef Graph_traits::face_iterator face_iterator;
+
+int main(int argc, char** argv)
+{
+  // read input polyhedron
+  Polyhedron_3 polyhedron;
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  input >> polyhedron;
+  input.close();
+
+  // initialize indices of vertices, halfedges and facets
+  CGAL::set_halfedgeds_items_id(polyhedron);
+
+  // pick up a random face
+  const size_t randSeed = argc > 2 ? std::atoi(argv[2]) : 7915421;
+  CGAL::Random rand(randSeed);
+  const int target_face_index = rand.get_int(0, num_faces(polyhedron));
+  face_iterator face_it = faces(polyhedron).first;
+  std::advance(face_it,target_face_index);
+  // ... and define a barycentric coordinate inside the face
+  Traits::Barycentric_coordinate face_location = {{0.25, 0.5, 0.25}};
+
+  // construct a shortest path query object and add a source point
+  Surface_mesh_shortest_path shortest_paths(polyhedron);
+  shortest_paths.add_source_point(*face_it, face_location);
+
+  // For all vertices in the polyhedron, compute the points of
+  // the shortest path to the source point and write them
+  // into a file readable using the CGAL Polyhedron demo
+  std::ofstream output("shortest_paths_with_id.cgal");
+  vertex_iterator vit, vit_end;
+  for ( boost::tie(vit, vit_end) = vertices(polyhedron);
+        vit != vit_end; ++vit)
+  {
+    std::vector<Traits::Point_3> points;
+    shortest_paths.shortest_path_points_to_source_points(*vit, std::back_inserter(points));
+
+    // print the points
+    output << points.size() << " ";
+    for (std::size_t i = 0; i < points.size(); ++i)
+      output << " " << points[i];
+    output << std::endl;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/CMakeLists.txt
new file mode 100644
index 0000000..fff87ba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/CMakeLists.txt
@@ -0,0 +1,78 @@
+# Created by the script cgal_create_cmake_script_with_options
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( Surface_mesh_simplification )
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )  
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+
+find_package( OpenMesh QUIET )
+
+if ( OpenMesh_FOUND )
+include( UseOpenMesh )
+else()
+  message(STATUS "Examples that use OpenMesh will not be compiled.")
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+
+create_single_source_cgal_program( "edge_collapse_constrain_sharp_edges.cpp" )
+
+create_single_source_cgal_program( "edge_collapse_constrained_border_polyhedron.cpp" )
+
+create_single_source_cgal_program( "edge_collapse_enriched_polyhedron.cpp" )
+
+create_single_source_cgal_program( "edge_collapse_polyhedron.cpp" )
+
+create_single_source_cgal_program( "edge_collapse_surface_mesh.cpp" )
+create_single_source_cgal_program( "edge_collapse_constrained_border_surface_mesh.cpp" )
+
+if(OpenMesh_FOUND)
+create_single_source_cgal_program( "edge_collapse_OpenMesh.cpp" )
+
+target_link_libraries( edge_collapse_OpenMesh ${OPENMESH_LIBRARIES} )
+endif()
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/cube-meshed.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/cube-meshed.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/cube-meshed.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/cube-meshed.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/cube.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/cube.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/cube.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/cube.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp
new file mode 100644
index 0000000..45ba0fa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp
@@ -0,0 +1,97 @@
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
+#include <OpenMesh/Core/IO/MeshIO.hh>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+typedef OpenMesh::PolyMesh_ArrayKernelT</* MyTraits*/> Surface_mesh;
+
+typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
+typedef boost::graph_traits<Surface_mesh>::edge_iterator edge_iterator;
+
+class Constrained_edge_map
+{
+public:
+  typedef boost::read_write_property_map_tag    category;
+  typedef bool                                  value_type;
+  typedef bool                                  reference;
+  typedef edge_descriptor                       key_type;
+
+  Constrained_edge_map(Surface_mesh& sm)
+    : sm_(sm)
+  {
+    sm_.add_property(constraint);
+  }
+
+  inline friend reference get(const Constrained_edge_map& em, key_type e)
+  {
+    bool b = em.sm_.property(em.constraint,em.sm_.edge_handle(e.idx())); 
+    return b;
+  }
+  
+  inline friend void put(const Constrained_edge_map& em, key_type e, value_type b)
+  {
+    em.sm_.property(em.constraint,em.sm_.edge_handle(e.idx())) = b;
+  }
+
+private:
+  Surface_mesh& sm_;
+  OpenMesh::EPropHandleT<bool> constraint;
+};
+
+
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+int main( int argc, char** argv ) 
+{
+  Surface_mesh surface_mesh;
+  Constrained_edge_map constraints_map(surface_mesh);
+  if (argc==2)
+    OpenMesh::IO::read_mesh(surface_mesh, argv[1]);
+  else
+    OpenMesh::IO::read_mesh(surface_mesh, "cube.off");
+  // For the pupose of the example we mark 10 edges as constrained edges
+  edge_iterator b,e;
+  int count=0;
+  for(boost::tie(b,e) = edges(surface_mesh); b!= e; ++b){
+      put(constraints_map,*b,(count++ <100));
+  }
+  // This is a stop predicate (defines when the algorithm terminates).
+  // In this example, the simplification stops when the number of undirected edges
+  // left in the surface mesh drops below the specified number (1000)
+  SMS::Count_stop_predicate<Surface_mesh> stop(0);
+     
+  // This the actual call to the simplification algorithm.
+  // The surface mesh and stop conditions are mandatory arguments.
+
+  int r = SMS::edge_collapse
+            (surface_mesh
+            ,stop
+             ,CGAL::parameters::halfedge_index_map  (get(CGAL::halfedge_index  ,surface_mesh)) 
+                               .vertex_point_map(get(boost::vertex_point, surface_mesh))
+                               .edge_is_constrained_map(constraints_map) 
+             );
+  
+  surface_mesh.garbage_collection();
+  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
+            << num_edges(surface_mesh) << " final edges.\n" ;
+        
+   OpenMesh::IO::write_mesh(surface_mesh, "out.off");
+  
+  return 0 ;      
+}
+
+// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp
new file mode 100644
index 0000000..042458a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp
@@ -0,0 +1,189 @@
+#include <iostream>
+#include <fstream>
+
+
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Mesh_3/dihedral_angle_3.h>
+#include <CGAL/property_map.h>
+#include <cmath>
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point_3;
+typedef CGAL::Polyhedron_3<Kernel> Surface_mesh;
+typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor;
+typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
+typedef boost::graph_traits<Surface_mesh>::edge_iterator edge_iterator;
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+//
+// BGL property map which indicates whether an edge is marked as non-removable
+struct Constrained_edge_map : public boost::put_get_helper<bool,Constrained_edge_map>
+{
+  typedef boost::readable_property_map_tag      category;
+  typedef bool                                  value_type;
+  typedef bool                                  reference;
+  typedef edge_descriptor                       key_type;
+
+  Constrained_edge_map(const CGAL::Unique_hash_map<key_type,bool>& aConstraints)
+    : mConstraints(aConstraints)
+  {}
+
+  reference operator[](key_type const& e) const { return  is_constrained(e); }
+
+  bool is_constrained( key_type const& e ) const {
+    return mConstraints.is_defined(e);
+  }
+
+private:
+  const CGAL::Unique_hash_map<key_type,bool>& mConstraints;
+};
+
+bool is_border (edge_descriptor e, const Surface_mesh& sm)
+{
+  return (face(halfedge(e,sm),sm) == boost::graph_traits<Surface_mesh>::null_face() )
+    || (face(opposite(halfedge(e,sm),sm),sm) == boost::graph_traits<Surface_mesh>::null_face() );
+}
+
+Point_3 point(vertex_descriptor vd,  const Surface_mesh& sm)
+{
+  return get(CGAL::vertex_point, sm, vd);
+}
+
+int main( int argc, char** argv )
+{
+  CGAL::Unique_hash_map<edge_descriptor,bool> constraint_hmap(false);
+
+  Surface_mesh surface_mesh;
+
+  if (argc < 2){
+    std::cerr<< "Usage: " << argv[0] << " input.off [out.off]\n";
+    return 1;
+  }
+
+  std::ifstream is(argv[1]);
+  if(!is){
+    std::cerr<< "Filename provided is invalid\n";
+    return 1;
+  }
+
+  is >> surface_mesh  ;
+
+  Constrained_edge_map constraints_map(constraint_hmap);
+  SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
+                             Constrained_edge_map > placement(constraints_map);
+
+  // map used to check that constrained_edges and the points of its vertices
+  // are preserved at the end of the simplification
+  // Warning: the computation of the dihedral angle is only an approximation and can
+  //          be far from the real value and could influence the detection of sharp
+  //          edges after the simplification
+  std::map<edge_descriptor,std::pair<Point_3, Point_3> >constrained_edges;
+  std::size_t nb_sharp_edges=0;
+
+  // detect sharp edges
+  std::ofstream cst_output("constrained_edges.cgal");
+  edge_iterator eb,ee;
+  for(boost::tie(eb,ee) = edges(surface_mesh); eb != ee ; ++eb )
+  {
+    halfedge_descriptor hd = halfedge(*eb,surface_mesh);
+    if ( is_border(*eb,surface_mesh) ){
+      std::cerr << "border" << std::endl;
+      ++nb_sharp_edges;
+      constraint_hmap[*eb]=true;
+      constrained_edges[*eb]=std::make_pair(point(source(hd,surface_mesh),surface_mesh),
+                                            point(target(hd,surface_mesh),surface_mesh));
+    }
+    else{
+      double angle = CGAL::Mesh_3::dihedral_angle(point(target(opposite(hd,surface_mesh),surface_mesh),surface_mesh),
+                                                  point(target(hd,surface_mesh),surface_mesh),
+                                                  point(target(next(hd,surface_mesh),surface_mesh),surface_mesh),
+                                                  point(target(next(opposite(hd,surface_mesh),surface_mesh),surface_mesh),surface_mesh));
+      if ( CGAL::abs(angle)<100 ){
+        ++nb_sharp_edges;
+        constraint_hmap[*eb]=true;
+        Point_3 p = point(source(hd,surface_mesh),surface_mesh);
+        Point_3 q = point(target(hd,surface_mesh),surface_mesh);
+        constrained_edges[*eb]=std::make_pair(p,q);
+        cst_output << "2 " << p << " "  << q << "\n";
+      }
+    }
+  }
+  cst_output.close();
+
+  std::cerr << "# sharp edges = " << nb_sharp_edges << std::endl;
+
+  // Contract the surface mesh as much as possible
+  SMS::Count_stop_predicate<Surface_mesh> stop(0);
+
+  int r
+  = SMS::edge_collapse(surface_mesh
+                       ,stop
+                       ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index, surface_mesh))
+                                         .halfedge_index_map(get(CGAL::halfedge_external_index, surface_mesh))
+                                         .edge_is_constrained_map(constraints_map)
+                                         .get_placement(placement)
+   );
+
+  std::cout << "\nFinished...\n" << r << " edges removed.\n"
+            << num_edges(surface_mesh) << " final edges.\n" ;
+  std::ofstream os(argc > 2 ? argv[2] : "out.off") ; os << surface_mesh ;
+
+  std::cout  << "Checking sharped edges were preserved...\n";
+  // check sharp edges were preserved
+  for(boost::tie(eb,ee) = edges(surface_mesh); eb != ee ; ++eb )
+  {
+    halfedge_descriptor hd = halfedge(*eb,surface_mesh);
+    if ( is_border(*eb,surface_mesh) ){
+      --nb_sharp_edges;
+      assert(
+             constrained_edges[*eb]==std::make_pair( point(source(hd,surface_mesh),surface_mesh),
+                                                     point(target(hd,surface_mesh),surface_mesh)));
+    }
+    else{
+      double angle = CGAL::Mesh_3::dihedral_angle(point(target(opposite(hd,surface_mesh),surface_mesh),surface_mesh),
+                                                  point(target(hd,surface_mesh),surface_mesh),
+                                                  point(target(next(hd,surface_mesh),surface_mesh),surface_mesh),
+                                                  point(target(next(opposite(hd,surface_mesh),surface_mesh),surface_mesh),surface_mesh));
+      if ( CGAL::abs(angle)<100 ){
+        --nb_sharp_edges;
+      assert(
+        constrained_edges[*eb]==std::make_pair( point(source(hd,surface_mesh),surface_mesh),
+                                                point(target(hd,surface_mesh),surface_mesh)));
+      }
+    }
+  }
+  std::cout  << "OK\n";
+  std::cerr << "# sharp edges = " << nb_sharp_edges << std::endl;
+
+  std::cout << "Check that no removable edge has been forgotten..." << std::endl;
+  r = SMS::edge_collapse(surface_mesh
+                         ,stop
+                         ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index, surface_mesh))
+                                           .halfedge_index_map  (get(CGAL::halfedge_external_index, surface_mesh))
+                                           .edge_is_constrained_map(constraints_map)
+                                           .get_placement(placement)
+   );
+
+  assert(r==0);
+
+  if ( r==0 )
+    std::cout  << "OK\n";
+  else{
+    std::cout  << "ERROR! " << r << " edges removed!\n";
+    return 1;
+  }
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp
new file mode 100644
index 0000000..cfbf1ad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp
@@ -0,0 +1,125 @@
+#include <iostream>
+#include <fstream>
+#include <map>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+
+// Midpoint placement policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
+
+//Placement wrapper
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
+
+// Stop-condition policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point_3;
+typedef CGAL::Polyhedron_3<Kernel> Surface_mesh;
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+//
+// BGL property map which indicates whether an edge is marked as non-removable
+//
+struct Border_is_constrained_edge_map{
+  const Surface_mesh* sm_ptr;
+  typedef boost::graph_traits<Surface_mesh>::edge_descriptor key_type;
+  typedef bool value_type;
+  typedef value_type reference;
+  typedef boost::readable_property_map_tag category;
+
+  Border_is_constrained_edge_map(const Surface_mesh& sm)
+    : sm_ptr(&sm)
+  {}
+
+  friend bool get(Border_is_constrained_edge_map m, const key_type& edge) {
+    return CGAL::is_border(edge, *m.sm_ptr);
+  }
+};
+
+//
+// Placement class
+//
+typedef SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
+                                   Border_is_constrained_edge_map > Placement;
+
+int main( int argc, char** argv )
+{
+  Surface_mesh surface_mesh;
+
+  if (argc!=2){
+    std::cerr<< "Usage: " << argv[0] << " input.off\n";
+    return 1;
+  }
+
+  std::ifstream is(argv[1]);
+  if(!is){
+    std::cerr<< "Filename provided is invalid\n";
+    return 1;
+  }
+
+  is >> surface_mesh  ;
+
+  // map used to check that constrained_edges and the points of its vertices
+  // are preserved at the end of the simplification
+  std::map<Surface_mesh::Halfedge_handle,std::pair<Point_3, Point_3> >constrained_edges;
+  std::size_t nb_border_edges=0;
+
+  for (Surface_mesh::Halfedge_iterator hit=surface_mesh.halfedges_begin(),
+                                       hit_end=surface_mesh.halfedges_end();
+                                       hit!=hit_end; ++hit )
+  {
+    if ( hit->is_border() ){
+      constrained_edges[hit]=std::make_pair( hit->opposite()->vertex()->point(),
+                                             hit->vertex()->point() );
+      ++nb_border_edges;
+    }
+  }
+
+  // Contract the surface mesh as much as possible
+  SMS::Count_stop_predicate<Surface_mesh> stop(0);
+
+  Border_is_constrained_edge_map bem(surface_mesh);
+
+
+  // This the actual call to the simplification algorithm.
+  // The surface mesh and stop conditions are mandatory arguments.
+  // The index maps are needed because the vertices and edges
+  // of this surface mesh lack an "id()" field.
+  int r = SMS::edge_collapse
+            (surface_mesh
+            ,stop
+             ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index,surface_mesh))
+                               .halfedge_index_map  (get(CGAL::halfedge_external_index  ,surface_mesh))
+                               .edge_is_constrained_map(bem)
+                               .get_placement(Placement(bem))
+            );
+
+  std::cout << "\nFinished...\n" << r << " edges removed.\n"
+            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
+
+  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
+
+  // now check!
+  for (Surface_mesh::Halfedge_iterator hit=surface_mesh.halfedges_begin(),
+                                       hit_end=surface_mesh.halfedges_end();
+                                       hit!=hit_end; ++hit )
+  {
+    if (hit->is_border()){
+      --nb_border_edges;
+      assert( constrained_edges[hit] ==
+              std::make_pair( hit->opposite()->vertex()->point(),
+                              hit->vertex()->point() ) );
+    }
+  }
+  assert( nb_border_edges==0 );
+
+  return 0 ;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp
new file mode 100644
index 0000000..d498c2d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp
@@ -0,0 +1,120 @@
+#include <iostream>
+#include <fstream>
+#include <map>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+
+// Midpoint placement policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
+
+//Placement wrapper
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h>
+
+// Stop-condition policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef Kernel::Point_3 Point_3;
+
+typedef CGAL::Surface_mesh<Point_3> Surface_mesh; 
+typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor;
+typedef boost::graph_traits<Surface_mesh>::edge_descriptor edge_descriptor;
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+//
+// BGL property map which indicates whether an edge is marked as non-removable
+//
+struct Border_is_constrained_edge_map{
+  const Surface_mesh* sm_ptr;
+  typedef edge_descriptor key_type;
+  typedef bool value_type;
+  typedef value_type reference;
+  typedef boost::readable_property_map_tag category;
+
+  Border_is_constrained_edge_map(const Surface_mesh& sm)
+    : sm_ptr(&sm)
+  {}
+
+  friend bool get(Border_is_constrained_edge_map m, const key_type& edge) {
+    return  CGAL::is_border(edge, *m.sm_ptr);
+  }
+};
+
+//
+// Placement class
+//
+typedef SMS::Constrained_placement<SMS::Midpoint_placement<Surface_mesh>,
+                                   Border_is_constrained_edge_map > Placement;
+
+int main( int argc, char** argv )
+{
+  Surface_mesh surface_mesh;
+
+  if (argc!=2){
+    std::cerr<< "Usage: " << argv[0] << " input.off\n";
+    return 1;
+  }
+
+  std::ifstream is(argv[1]);
+  if(!is){
+    std::cerr<< "Filename provided is invalid\n";
+    return 1;
+  }
+
+  is >> surface_mesh  ;
+  
+  Surface_mesh::Property_map<halfedge_descriptor,std::pair<Point_3, Point_3> > constrained_halfedges;
+
+  constrained_halfedges = surface_mesh.add_property_map<halfedge_descriptor,std::pair<Point_3, Point_3> >("h:vertices").first;
+
+  std::size_t nb_border_edges=0;
+  BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){
+    if(CGAL::is_border(hd,surface_mesh)){
+      constrained_halfedges[hd] = std::make_pair(surface_mesh.point(source(hd,surface_mesh)),
+                                                 surface_mesh.point(target(hd,surface_mesh)));
+      ++nb_border_edges;
+    }
+  }
+
+  // Contract the surface mesh as much as possible
+  SMS::Count_stop_predicate<Surface_mesh> stop(0);
+
+  Border_is_constrained_edge_map bem(surface_mesh);
+  
+  // This the actual call to the simplification algorithm.
+  // The surface mesh and stop conditions are mandatory arguments.
+  int r = SMS::edge_collapse
+            (surface_mesh
+            ,stop
+             ,CGAL::parameters::edge_is_constrained_map(bem)
+                               .get_placement(Placement(bem))
+            );
+
+  std::cout << "\nFinished...\n" << r << " edges removed.\n"
+            << surface_mesh.number_of_edges() << " final edges.\n" ;
+
+  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
+
+  // now check!
+  BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){
+    if(CGAL::is_border(hd,surface_mesh)){
+      --nb_border_edges;
+      if(constrained_halfedges[hd] != std::make_pair(surface_mesh.point(source(hd,surface_mesh)),
+                                                     surface_mesh.point(target(hd,surface_mesh)))){
+        std::cerr << "oops. send us a bug report\n";
+      }
+
+    }
+  }
+  assert( nb_border_edges==0 );
+
+  return 0 ;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp
new file mode 100644
index 0000000..7603fd0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp
@@ -0,0 +1,187 @@
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+
+// Visitor base
+#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
+
+// Extended polyhedron items which include an id() field
+#include <CGAL/Polyhedron_items_with_id_3.h>
+
+// Stop-condition policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>
+
+// Non-default cost and placement policies
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h> 
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+
+typedef Kernel::Point_3 Point ;
+
+//
+// Setup an enriched polyhedron type which stores an id() field in the items
+//
+typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3> Surface_mesh; 
+
+typedef Surface_mesh::Halfedge_handle Halfedge_handle ;
+typedef Surface_mesh::Vertex_handle   Vertex_handle ;
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+typedef SMS::Edge_profile<Surface_mesh> Profile ;
+
+
+// The following is a Visitor that keeps track of the simplification process.
+// In this example the progress is printed real-time and a few statistics are
+// recorded (and printed in the end).
+//
+struct Stats
+{
+  Stats() 
+    : collected(0)
+    , processed(0)
+    , collapsed(0)
+    , non_collapsable(0)
+    , cost_uncomputable(0) 
+    , placement_uncomputable(0) 
+  {} 
+  
+  std::size_t collected ;
+  std::size_t processed ;
+  std::size_t collapsed ;
+  std::size_t non_collapsable ;
+  std::size_t cost_uncomputable  ;
+  std::size_t placement_uncomputable ; 
+} ;
+
+struct My_visitor : SMS::Edge_collapse_visitor_base<Surface_mesh>
+{
+  My_visitor( Stats* s) : stats(s){} 
+
+  // Called during the collecting phase for each edge collected.
+  void OnCollected( Profile const&, boost::optional<double> const& )
+  {
+    ++ stats->collected ;
+    std::cerr << "\rEdges collected: " << stats->collected << std::flush ;
+  }                
+  
+  // Called during the processing phase for each edge selected.
+  // If cost is absent the edge won't be collapsed.
+  void OnSelected(Profile const&          
+                 ,boost::optional<double> cost
+                 ,std::size_t             initial
+                 ,std::size_t             current
+                 )
+  {
+    ++ stats->processed ;
+    if ( !cost )
+      ++ stats->cost_uncomputable ;
+      
+    if ( current == initial )
+      std::cerr << "\n" << std::flush ;
+    std::cerr << "\r" << current << std::flush ;
+  }                
+  
+  // Called during the processing phase for each edge being collapsed.
+  // If placement is absent the edge is left uncollapsed.
+  void OnCollapsing(Profile const&          
+                   ,boost::optional<Point>  placement
+                   )
+  {
+    if ( !placement )
+      ++ stats->placement_uncomputable ;
+  }                
+  
+  // Called for each edge which failed the so called link-condition,
+  // that is, which cannot be collapsed because doing so would
+  // turn the surface mesh into a non-manifold.
+  void OnNonCollapsable( Profile const& )
+  {
+    ++ stats->non_collapsable;
+  }                
+  
+  // Called AFTER each edge has been collapsed
+  void OnCollapsed( Profile const&, Vertex_handle )
+  {
+    ++ stats->collapsed;
+  }                
+  
+  Stats* stats ;
+} ;
+
+
+int main( int argc, char** argv ) 
+{
+  Surface_mesh surface_mesh; 
+  
+  std::ifstream is(argv[1]) ; is >> surface_mesh ;
+
+  // The items in this polyhedron have an "id()" field 
+  // which the default index maps used in the algorithm
+  // need to get the index of a vertex/edge.
+  // However, the Polyhedron_3 class doesn't assign any value to
+  // this id(), so we must do it here:
+  int index = 0 ;
+  
+  for( Surface_mesh::Halfedge_iterator eb = surface_mesh.halfedges_begin()
+     , ee = surface_mesh.halfedges_end()
+     ; eb != ee
+     ; ++ eb
+     ) 
+    eb->id() = index++;
+
+  index = 0 ;
+  for( Surface_mesh::Vertex_iterator vb = surface_mesh.vertices_begin()
+     , ve = surface_mesh.vertices_end()
+     ; vb != ve
+     ; ++ vb
+     ) 
+    vb->id() = index++;
+    
+  // In this example, the simplification stops when the number of undirected edges
+  // drops below 10% of the initial count
+  SMS::Count_ratio_stop_predicate<Surface_mesh> stop(0.1);
+ 
+  Stats stats ;
+  
+  My_visitor vis(&stats) ;
+    
+  // The index maps are not explicitelty passed as in the previous
+  // example because the surface mesh items have a proper id() field.
+  // On the other hand, we pass here explicit cost and placement
+  // function which differ from the default policies, ommited in
+  // the previous example.
+  int r = SMS::edge_collapse
+           (surface_mesh
+           ,stop
+            ,CGAL::parameters::get_cost     (SMS::Edge_length_cost  <Surface_mesh>())
+                              .get_placement(SMS::Midpoint_placement<Surface_mesh>())
+                              .visitor      (vis)
+           );
+  
+  std::cout << "\nEdges collected: "  << stats.collected
+            << "\nEdges proccessed: " << stats.processed
+            << "\nEdges collapsed: "  << stats.collapsed
+            << std::endl
+            << "\nEdges not collapsed due to topological constraints: "  << stats.non_collapsable
+            << "\nEdge not collapsed due to cost computation constraints: "  << stats.cost_uncomputable 
+            << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable 
+            << std::endl ; 
+            
+  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
+            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
+        
+  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
+  
+  return 0 ;      
+}
+
+// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp
new file mode 100644
index 0000000..ca5fcd1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp
@@ -0,0 +1,55 @@
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+
+// Stop-condition policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h>
+
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+typedef CGAL::Polyhedron_3<Kernel> Surface_mesh; 
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+int main( int argc, char** argv ) 
+{
+  Surface_mesh surface_mesh;
+  
+  std::ifstream is(argv[1]) ; is >> surface_mesh ;
+
+  // This is a stop predicate (defines when the algorithm terminates).
+  // In this example, the simplification stops when the number of undirected edges
+  // left in the surface mesh drops below the specified number (1000)
+  SMS::Count_stop_predicate<Surface_mesh> stop(1000);
+     
+  // This the actual call to the simplification algorithm.
+  // The surface mesh and stop conditions are mandatory arguments.
+  // The index maps are needed because the vertices and edges
+  // of this surface mesh lack an "id()" field.
+  int r = SMS::edge_collapse
+            (surface_mesh
+            ,stop
+             ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index,surface_mesh)) 
+                               .halfedge_index_map  (get(CGAL::halfedge_external_index  ,surface_mesh)) 
+                               .get_cost (SMS::Edge_length_cost <Surface_mesh>())
+                               .get_placement(SMS::Midpoint_placement<Surface_mesh>())
+            );
+  
+  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
+            << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ;
+        
+  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
+  
+  return 0 ;      
+}
+
+// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cmd b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cmd
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cmd
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cmd
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp
new file mode 100644
index 0000000..bcba14d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp
@@ -0,0 +1,161 @@
+#include <iostream>
+#include <fstream>
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+
+// Simplification function
+#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
+
+// Visitor base
+#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
+
+// Stop-condition policy
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>
+
+// Non-default cost and placement policies
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h> 
+
+typedef CGAL::Simple_cartesian<double> Kernel;
+
+typedef Kernel::Point_3 Point_3;
+
+//
+// Setup an enriched polyhedron type which stores an id() field in the items
+//
+typedef CGAL::Surface_mesh<Point_3> Surface_mesh; 
+
+typedef boost::graph_traits<Surface_mesh>::halfedge_descriptor halfedge_descriptor ;
+typedef boost::graph_traits<Surface_mesh>::vertex_descriptor vertex_descriptor;
+
+namespace SMS = CGAL::Surface_mesh_simplification ;
+
+typedef SMS::Edge_profile<Surface_mesh> Profile ;
+
+
+// The following is a Visitor that keeps track of the simplification process.
+// In this example the progress is printed real-time and a few statistics are
+// recorded (and printed in the end).
+//
+struct Stats
+{
+  Stats() 
+    : collected(0)
+    , processed(0)
+    , collapsed(0)
+    , non_collapsable(0)
+    , cost_uncomputable(0) 
+    , placement_uncomputable(0) 
+  {} 
+  
+  std::size_t collected ;
+  std::size_t processed ;
+  std::size_t collapsed ;
+  std::size_t non_collapsable ;
+  std::size_t cost_uncomputable  ;
+  std::size_t placement_uncomputable ; 
+} ;
+
+struct My_visitor : SMS::Edge_collapse_visitor_base<Surface_mesh>
+{
+  My_visitor( Stats* s) : stats(s){} 
+
+  // Called during the collecting phase for each edge collected.
+  void OnCollected( Profile const&, boost::optional<double> const& )
+  {
+    ++ stats->collected ;
+    std::cerr << "\rEdges collected: " << stats->collected << std::flush ;
+  }                
+  
+  // Called during the processing phase for each edge selected.
+  // If cost is absent the edge won't be collapsed.
+  void OnSelected(Profile const&          
+                 ,boost::optional<double> cost
+                 ,std::size_t             initial
+                 ,std::size_t             current
+                 )
+  {
+    ++ stats->processed ;
+    if ( !cost )
+      ++ stats->cost_uncomputable ;
+      
+    if ( current == initial )
+      std::cerr << "\n" << std::flush ;
+    std::cerr << "\r" << current << std::flush ;
+  }                
+  
+  // Called during the processing phase for each edge being collapsed.
+  // If placement is absent the edge is left uncollapsed.
+  void OnCollapsing(Profile const&          
+                   ,boost::optional<Point>  placement
+                   )
+  {
+    if ( !placement )
+      ++ stats->placement_uncomputable ;
+  }                
+  
+  // Called for each edge which failed the so called link-condition,
+  // that is, which cannot be collapsed because doing so would
+  // turn the surface mesh into a non-manifold.
+  void OnNonCollapsable( Profile const& )
+  {
+    ++ stats->non_collapsable;
+  }                
+  
+  // Called AFTER each edge has been collapsed
+  void OnCollapsed( Profile const&, vertex_descriptor )
+  {
+    ++ stats->collapsed;
+  }                
+  
+  Stats* stats ;
+} ;
+
+
+int main( int argc, char** argv ) 
+{
+  Surface_mesh surface_mesh; 
+  
+  std::ifstream is(argv[1]) ; is >> surface_mesh ;
+
+  // In this example, the simplification stops when the number of undirected edges
+  // drops below 10% of the initial count
+  SMS::Count_ratio_stop_predicate<Surface_mesh> stop(0.1);
+ 
+  Stats stats ;
+  
+  My_visitor vis(&stats) ;
+    
+  // The index maps are not explicitelty passed as in the previous
+  // example because the surface mesh items have a proper id() field.
+  // On the other hand, we pass here explicit cost and placement
+  // function which differ from the default policies, ommited in
+  // the previous example.
+  int r = SMS::edge_collapse
+           (surface_mesh
+           ,stop
+            ,CGAL::parameters::get_cost     (SMS::Edge_length_cost  <Surface_mesh>())
+                              .get_placement(SMS::Midpoint_placement<Surface_mesh>())
+                              .visitor      (vis)
+           );
+  
+  std::cout << "\nEdges collected: "  << stats.collected
+            << "\nEdges proccessed: " << stats.processed
+            << "\nEdges collapsed: "  << stats.collapsed
+            << std::endl
+            << "\nEdges not collapsed due to topological constraints: "  << stats.non_collapsable
+            << "\nEdge not collapsed due to cost computation constraints: "  << stats.cost_uncomputable 
+            << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable 
+            << std::endl ; 
+            
+  std::cout << "\nFinished...\n" << r << " edges removed.\n" 
+            << num_edges(surface_mesh) << " final edges.\n" ;
+        
+  std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ;
+  
+  return 0 ;      
+}
+
+// EOF //
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/mesh_with_border.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/mesh_with_border.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesh_simplification/mesh_with_border.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_simplification/mesh_with_border.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/CMakeLists.txt
new file mode 100644
index 0000000..b27bc6a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesh_skeletonization_ )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater)
+
+  if(EIGEN3_FOUND)
+    include( ${EIGEN3_USE_FILE} )
+
+    include( CGAL_CreateSingleSourceCGALProgram )
+
+    include_directories (BEFORE "../../include")
+
+    create_single_source_cgal_program( "simple_mcfskel_example.cpp" )
+    create_single_source_cgal_program( "simple_mcfskel_sm_example.cpp" )
+    create_single_source_cgal_program( "MCF_Skeleton_example.cpp" )
+    create_single_source_cgal_program( "MCF_Skeleton_sm_example.cpp" )
+    create_single_source_cgal_program( "segmentation_example.cpp" )
+  else()
+    message(STATUS "These programs require the Eigen library (3.2 or greater), and will not be compiled.")
+  endif()
+
+else()
+
+  message(STATUS "This program requires the CGAL library, and will not be compiled.")
+
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_example.cpp
new file mode 100644
index 0000000..7206f93
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_example.cpp
@@ -0,0 +1,72 @@
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Mean_curvature_flow_skeletonization.h>
+
+#include <fstream>
+
+typedef CGAL::Simple_cartesian<double>                        Kernel;
+typedef Kernel::Point_3                                       Point;
+typedef CGAL::Polyhedron_3<Kernel>                            Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Polyhedron> Skeletonization;
+typedef Skeletonization::Skeleton                             Skeleton;
+
+typedef Skeleton::vertex_descriptor                           Skeleton_vertex;
+typedef Skeleton::edge_descriptor                             Skeleton_edge;
+
+
+int main(int argc, char* argv[])
+{
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  Polyhedron tmesh;
+  input >> tmesh;
+
+  Skeleton skeleton;
+  Skeletonization mcs(tmesh);
+
+  // 1. Contract the mesh by mean curvature flow.
+  mcs.contract_geometry();
+
+  // 2. Collapse short edges and split bad triangles.
+  mcs.collapse_edges();
+  mcs.split_faces();
+
+  // 3. Fix degenerate vertices.
+  mcs.detect_degeneracies();
+
+  // Perform the above three steps in one iteration.
+  mcs.contract();
+
+  // Iteratively apply step 1 to 3 until convergence.
+  mcs.contract_until_convergence();
+
+  // Convert the contracted mesh into a curve skeleton and
+  // get the correspondent surface points
+  mcs.convert_to_skeleton(skeleton);
+
+  std::cout << "Number of vertices of the skeleton: " << boost::num_vertices(skeleton) << "\n";
+  std::cout << "Number of edges of the skeleton: " << boost::num_edges(skeleton) << "\n";
+
+  // Output all the edges of the skeleton.
+  std::ofstream output("skel.cgal");
+  BOOST_FOREACH(Skeleton_edge e, edges(skeleton))
+  {
+    const Point& s = skeleton[source(e, skeleton)].point;
+    const Point& t = skeleton[target(e, skeleton)].point;
+    output << "2 "<< s << " " << t << "\n";
+  }
+  output.close();
+
+  // Output skeleton points and the corresponding surface points
+  output.open("correspondance.cgal");
+  BOOST_FOREACH(Skeleton_vertex v, vertices(skeleton))
+    BOOST_FOREACH(vertex_descriptor vd, skeleton[v].vertices)
+      output << "2 " << skeleton[v].point << "  " << get(CGAL::vertex_point, tmesh, vd)  << "\n";
+
+  return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_sm_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_sm_example.cpp
new file mode 100644
index 0000000..6df14b3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/MCF_Skeleton_sm_example.cpp
@@ -0,0 +1,70 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+#include <CGAL/boost/graph/properties_Surface_mesh.h>
+#include <CGAL/Mean_curvature_flow_skeletonization.h>
+
+#include <fstream>
+
+typedef CGAL::Simple_cartesian<double>                        Kernel;
+typedef Kernel::Point_3                                       Point;
+typedef CGAL::Surface_mesh<Point>                             Triangle_mesh;
+
+typedef boost::graph_traits<Triangle_mesh>::vertex_descriptor vertex_descriptor;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Triangle_mesh> Skeletonization;
+typedef Skeletonization::Skeleton                             Skeleton;
+
+typedef Skeleton::vertex_descriptor                           Skeleton_vertex;
+typedef Skeleton::edge_descriptor                             Skeleton_edge;
+
+int main(int argc, char* argv[])
+{
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  Triangle_mesh tmesh;
+  input >> tmesh;
+
+  Skeleton skeleton;
+  Skeletonization mcs(tmesh);
+
+  // 1. Contract the mesh by mean curvature flow.
+  mcs.contract_geometry();
+
+  // 2. Collapse short edges and split bad triangles.
+  mcs.collapse_edges();
+  mcs.split_faces();
+
+  // 3. Fix degenerate vertices.
+  mcs.detect_degeneracies();
+
+  // Perform the above three steps in one iteration.
+  mcs.contract();
+
+  // Iteratively apply step 1 to 3 until convergence.
+  mcs.contract_until_convergence();
+
+  // Convert the contracted mesh into a curve skeleton and
+  // get the correspondent surface points
+  mcs.convert_to_skeleton(skeleton);
+
+  std::cout << "Number of vertices of the skeleton: " << boost::num_vertices(skeleton) << "\n";
+  std::cout << "Number of edges of the skeleton: " << boost::num_edges(skeleton) << "\n";
+
+  // Output all the edges of the skeleton.
+  std::ofstream output("skel.cgal");
+  BOOST_FOREACH(Skeleton_edge e, edges(skeleton))
+  {
+    const Point& s = skeleton[source(e, skeleton)].point;
+    const Point& t = skeleton[target(e, skeleton)].point;
+    output << "2 "<< s << " " << t << "\n";
+  }
+  output.close();
+
+  // Output skeleton points and the corresponding surface points
+  output.open("correspondance.cgal");
+  BOOST_FOREACH(Skeleton_vertex v, vertices(skeleton))
+    BOOST_FOREACH(vertex_descriptor vd, skeleton[v].vertices)
+      output << "2 " << skeleton[v].point << "  " << get(CGAL::vertex_point, tmesh, vd)  << "\n";
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/data/161.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/data/161.off
new file mode 100644
index 0000000..b00523d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/data/161.off
@@ -0,0 +1,41476 @@
+OFF
+13826 27648 41472
+-0.571085 -0.424564 0.319222
+-0.583216 -0.427852 0.318807
+-0.582243 -0.440065 0.324206
+-0.591019 -0.438279 0.319812
+-0.582015 -0.456482 0.326622
+-0.596146 -0.454708 0.322211
+-0.581021 -0.473757 0.326737
+-0.595931 -0.472514 0.326087
+-0.607334 -0.472702 0.319602
+-0.595289 -0.489172 0.325108
+-0.605865 -0.48562 0.322253
+-0.553006 -0.392678 0.301388
+-0.566429 -0.396652 0.303557
+-0.560979 -0.408466 0.311737
+-0.576622 -0.412031 0.309908
+-0.538998 -0.423239 0.308456
+-0.555382 -0.423607 0.316483
+-0.590845 -0.427887 0.309655
+-0.551074 -0.440002 0.317691
+-0.567711 -0.440069 0.323181
+-0.548895 -0.456801 0.317274
+-0.565891 -0.456962 0.324035
+-0.607497 -0.459743 0.310789
+-0.547792 -0.473182 0.315965
+-0.564339 -0.473609 0.322891
+-0.54799 -0.489635 0.31299
+-0.561409 -0.48696 0.319378
+-0.578527 -0.492188 0.322967
+-0.565664 -0.504397 0.315307
+-0.582549 -0.50959 0.317242
+-0.592941 -0.503677 0.320626
+-0.607089 -0.503746 0.316459
+-0.622335 -0.510062 0.303963
+0.04169 -0.08703 0.290358
+0.021956 -0.084823 0.291114
+0.004499 -0.084235 0.291333
+-0.012653 -0.084396 0.291301
+-0.02986 -0.085459 0.290539
+-0.044764 -0.088751 0.289254
+0.072142 -0.100069 0.289131
+0.053536 -0.101719 0.292577
+0.038451 -0.105548 0.295037
+0.025112 -0.102348 0.29498
+0.008261 -0.101343 0.295054
+-0.008771 -0.101114 0.295144
+-0.025681 -0.10137 0.294666
+-0.042202 -0.102015 0.293101
+-0.05805 -0.102015 0.288943
+0.059051 -0.118182 0.294325
+0.042145 -0.118894 0.296141
+0.026229 -0.118962 0.296881
+0.00996 -0.118316 0.296982
+-0.006888 -0.118061 0.297027
+-0.023834 -0.118061 0.296948
+-0.040718 -0.118155 0.295583
+-0.057445 -0.118249 0.292492
+0.061351 -0.135653 0.295222
+0.044081 -0.135168 0.296814
+0.027287 -0.135195 0.297576
+0.010592 -0.135101 0.297654
+-0.00626 -0.135007 0.297654
+-0.023207 -0.135007 0.297654
+-0.040153 -0.135007 0.297105
+-0.0571 -0.135007 0.295065
+-0.074046 -0.135007 0.290122
+0.089501 -0.152532 0.291319
+0.073969 -0.156456 0.295018
+0.061149 -0.153245 0.296206
+0.044619 -0.152182 0.297228
+0.027633 -0.151953 0.297654
+0.010686 -0.151953 0.297654
+-0.00626 -0.151953 0.297654
+-0.023207 -0.151953 0.297654
+-0.040153 -0.151953 0.297576
+-0.0571 -0.151953 0.296085
+-0.074046 -0.151953 0.292711
+0.076602 -0.169666 0.295085
+0.060575 -0.169801 0.296856
+0.044458 -0.169155 0.29752
+0.027633 -0.1689 0.297654
+0.010686 -0.1689 0.297654
+-0.00626 -0.1689 0.297654
+-0.023207 -0.1689 0.297654
+-0.040153 -0.1689 0.297654
+-0.0571 -0.1689 0.296791
+-0.074046 -0.1689 0.294359
+-0.090993 -0.1689 0.289416
+0.077997 -0.185873 0.295121
+0.06118 -0.186035 0.297027
+0.044485 -0.18594 0.297654
+0.027633 -0.185846 0.297654
+0.010686 -0.185846 0.297654
+-0.00626 -0.185846 0.297654
+-0.023207 -0.185846 0.297654
+-0.040153 -0.185846 0.297654
+-0.0571 -0.185846 0.297027
+-0.074046 -0.185846 0.294908
+-0.090993 -0.185846 0.290828
+0.078472 -0.202793 0.295144
+0.061526 -0.202793 0.297027
+0.044579 -0.202793 0.297654
+0.027633 -0.202793 0.297654
+0.010686 -0.202793 0.297654
+-0.00626 -0.202793 0.297654
+-0.023207 -0.202793 0.297654
+-0.040059 -0.202699 0.297654
+-0.056754 -0.202605 0.297027
+-0.073571 -0.202766 0.295121
+-0.090701 -0.202927 0.291254
+0.078472 -0.219739 0.295144
+0.061526 -0.219739 0.297027
+0.044579 -0.219739 0.297654
+0.027633 -0.219739 0.297654
+0.010686 -0.219739 0.297654
+-0.00626 -0.219739 0.297654
+-0.023207 -0.219739 0.297654
+-0.040032 -0.219484 0.29752
+-0.056149 -0.218838 0.296856
+-0.072177 -0.218973 0.295085
+-0.089473 -0.220102 0.291221
+0.078472 -0.236686 0.294908
+0.061526 -0.236686 0.297027
+0.044579 -0.236686 0.297654
+0.027633 -0.236686 0.297654
+0.010686 -0.236686 0.297654
+-0.00626 -0.236686 0.297654
+-0.023113 -0.236591 0.297654
+-0.039848 -0.236269 0.297228
+-0.05628 -0.235358 0.296187
+-0.069313 -0.232252 0.294995
+0.078472 -0.253632 0.294437
+0.061526 -0.253632 0.296791
+0.044579 -0.253632 0.297654
+0.027633 -0.253632 0.297654
+0.010686 -0.253632 0.297654
+-0.00626 -0.253632 0.297654
+-0.023086 -0.253376 0.29752
+-0.03927 -0.252664 0.296879
+-0.055625 -0.252143 0.295425
+-0.074845 -0.250666 0.292049
+0.061593 -0.270646 0.296186
+0.044579 -0.270578 0.297576
+0.027633 -0.270578 0.297654
+0.010686 -0.270578 0.297654
+-0.006166 -0.270484 0.297654
+-0.022902 -0.270162 0.297228
+-0.039333 -0.269251 0.296187
+-0.052528 -0.265983 0.295049
+0.062432 -0.287736 0.294355
+0.045278 -0.287565 0.296412
+0.02826 -0.287525 0.297027
+0.011314 -0.287525 0.297027
+-0.005534 -0.287269 0.296982
+-0.021871 -0.286557 0.296574
+-0.038293 -0.286103 0.295254
+-0.057698 -0.284608 0.291975
+0.046995 -0.304191 0.293815
+0.030175 -0.304283 0.294924
+0.013197 -0.304471 0.295144
+-0.003835 -0.304243 0.295054
+-0.020687 -0.303238 0.294761
+-0.034294 -0.299957 0.294269
+-0.548044 -0.37704 0.288099
+-0.561947 -0.382939 0.292883
+-0.535604 -0.392257 0.293492
+-0.57552 -0.395569 0.293126
+-0.523157 -0.402927 0.290168
+-0.531695 -0.409153 0.300464
+-0.545317 -0.407454 0.306701
+-0.534073 -0.439666 0.307929
+-0.598671 -0.444143 0.31444
+-0.532047 -0.456989 0.307524
+-0.531599 -0.473936 0.306544
+-0.61322 -0.473794 0.31247
+-0.531639 -0.490653 0.30376
+-0.615809 -0.487886 0.312262
+-0.624959 -0.493201 0.294964
+-0.531155 -0.507385 0.29884
+-0.54764 -0.506259 0.307047
+-0.546178 -0.522408 0.299196
+-0.559871 -0.519292 0.306247
+-0.574706 -0.522699 0.307846
+-0.59378 -0.52136 0.310441
+-0.611513 -0.524652 0.305075
+-0.6232 -0.52824 0.297839
+0.059301 -0.002851 0.272988
+0.03898 -0.000148 0.274061
+0.021446 0.000497 0.274386
+0.00441 0.000565 0.274431
+-0.012653 0.000336 0.274355
+-0.029814 -0.000385 0.273958
+-0.044475 -0.002771 0.273382
+0.074768 -0.020316 0.274749
+0.056237 -0.021644 0.277707
+0.042243 -0.017754 0.277861
+0.025207 -0.016611 0.278107
+0.008176 -0.016382 0.278197
+-0.008771 -0.016382 0.278197
+-0.025749 -0.01657 0.277977
+-0.042569 -0.016663 0.277319
+-0.060269 -0.014799 0.274645
+-0.077871 -0.020207 0.273219
+0.091614 -0.037133 0.275148
+0.073415 -0.038574 0.278473
+0.059885 -0.03544 0.279431
+0.043907 -0.034472 0.28036
+0.027534 -0.033584 0.280663
+0.010686 -0.033328 0.280708
+-0.00635 -0.033396 0.280685
+-0.023543 -0.033463 0.280506
+-0.040785 -0.033355 0.279914
+-0.058006 -0.033117 0.278895
+-0.075199 -0.033655 0.277304
+-0.091746 -0.034082 0.273945
+0.108726 -0.053933 0.275248
+0.090743 -0.055327 0.278879
+0.077669 -0.05158 0.27995
+0.062722 -0.050678 0.281315
+0.046924 -0.050598 0.282411
+0.030139 -0.050436 0.283017
+0.013197 -0.050275 0.283218
+-0.003929 -0.050409 0.283174
+-0.021651 -0.050894 0.282855
+-0.039539 -0.050894 0.282071
+-0.057032 -0.050342 0.280999
+-0.074275 -0.050235 0.27978
+-0.091248 -0.050396 0.277764
+-0.108033 -0.050369 0.273851
+0.124816 -0.070418 0.275158
+0.107919 -0.071565 0.278987
+0.095176 -0.068297 0.280363
+0.079719 -0.06697 0.282005
+0.067121 -0.06332 0.282814
+0.052564 -0.066643 0.284866
+0.034765 -0.067621 0.286451
+0.017142 -0.067356 0.286816
+-7.4e-05 -0.067289 0.286962
+-0.017666 -0.067934 0.286747
+-0.038124 -0.070703 0.285653
+-0.056736 -0.067934 0.282589
+-0.073979 -0.067289 0.281235
+-0.090992 -0.067221 0.279845
+-0.107939 -0.067221 0.277413
+-0.124885 -0.067221 0.27247
+0.139142 -0.085021 0.274245
+0.12322 -0.088618 0.278587
+0.110351 -0.084944 0.280429
+0.098459 -0.080966 0.281746
+0.084062 -0.082684 0.284354
+0.064434 -0.08119 0.286975
+-0.057476 -0.085459 0.285832
+-0.074006 -0.084396 0.282436
+-0.090992 -0.084168 0.280943
+-0.107939 -0.084168 0.27906
+-0.124885 -0.084168 0.27553
+0.127729 -0.10228 0.279061
+0.111204 -0.101437 0.281994
+0.093089 -0.098029 0.285384
+-0.074167 -0.10137 0.284781
+-0.090992 -0.101114 0.281963
+-0.107939 -0.101114 0.279923
+-0.124885 -0.101114 0.277413
+-0.141832 -0.101114 0.27247
+0.15699 -0.118666 0.274081
+0.141669 -0.122188 0.27821
+0.129442 -0.118487 0.280038
+0.113795 -0.117576 0.282806
+0.09623 -0.117899 0.286749
+0.077441 -0.117993 0.290817
+-0.07414 -0.118155 0.287973
+-0.090993 -0.118061 0.283218
+-0.107939 -0.118061 0.280708
+-0.124885 -0.118061 0.278197
+-0.141832 -0.118061 0.274117
+0.144348 -0.135545 0.278565
+0.128737 -0.134617 0.281358
+0.116722 -0.130811 0.283182
+0.101269 -0.134361 0.28702
+0.080351 -0.138177 0.29208
+-0.090993 -0.135007 0.285415
+-0.107939 -0.135007 0.281885
+-0.124885 -0.135007 0.278982
+-0.141832 -0.135007 0.275059
+0.145715 -0.151913 0.27878
+0.128603 -0.151429 0.282254
+0.110155 -0.148749 0.286176
+-0.090993 -0.151953 0.288004
+-0.107939 -0.151953 0.28314
+-0.124885 -0.151953 0.279923
+-0.141832 -0.151953 0.276314
+0.146258 -0.1689 0.278825
+0.129177 -0.168765 0.282546
+0.111751 -0.168281 0.286805
+0.093899 -0.168537 0.291221
+-0.107939 -0.1689 0.284866
+-0.124885 -0.1689 0.2811
+-0.141832 -0.1689 0.277569
+-0.158778 -0.1689 0.272077
+0.146258 -0.185846 0.278825
+0.129311 -0.185846 0.282591
+0.112298 -0.185779 0.286962
+0.095127 -0.185712 0.291333
+-0.107939 -0.185846 0.286278
+-0.124885 -0.185846 0.281885
+-0.141832 -0.185846 0.278276
+-0.158778 -0.185846 0.273254
+0.146258 -0.202793 0.278825
+0.129311 -0.202793 0.282591
+0.112365 -0.202793 0.286984
+0.095418 -0.202793 0.291378
+-0.107778 -0.202766 0.286726
+-0.12454 -0.202604 0.282355
+-0.141357 -0.202766 0.278724
+-0.158487 -0.202927 0.27368
+0.146258 -0.219739 0.278746
+0.129311 -0.219739 0.282355
+0.112365 -0.219739 0.286749
+0.095418 -0.219739 0.291299
+-0.107204 -0.220102 0.28667
+-0.1238 -0.218973 0.282376
+-0.139962 -0.218973 0.278766
+-0.157259 -0.220102 0.273691
+0.146258 -0.236686 0.278511
+0.129311 -0.236686 0.281885
+0.112365 -0.236686 0.286278
+0.095418 -0.236686 0.290828
+-0.084815 -0.236232 0.291278
+-0.105787 -0.239833 0.285792
+-0.124146 -0.236107 0.281434
+-0.137248 -0.232263 0.278798
+0.146258 -0.253632 0.278276
+0.129311 -0.253632 0.281414
+0.112365 -0.253632 0.285101
+0.095418 -0.253632 0.289652
+-0.096296 -0.254829 0.286863
+-0.112361 -0.258216 0.282564
+-0.125625 -0.25421 0.279981
+-0.143926 -0.250542 0.275605
+0.146258 -0.270578 0.277962
+0.129311 -0.270578 0.280865
+0.112459 -0.270484 0.283642
+0.095674 -0.270457 0.288246
+0.078701 -0.270619 0.292866
+-0.068483 -0.269506 0.291457
+-0.090055 -0.273521 0.286294
+-0.109068 -0.271879 0.28231
+-0.125428 -0.271385 0.278995
+-0.142276 -0.27035 0.2747
+0.146258 -0.287525 0.277491
+0.129311 -0.287525 0.280159
+0.112486 -0.287269 0.282553
+0.096171 -0.286772 0.286074
+0.079625 -0.287198 0.290332
+-0.079532 -0.288655 0.286886
+-0.095419 -0.291813 0.283152
+-0.107808 -0.287951 0.281377
+-0.123321 -0.287175 0.278565
+-0.140393 -0.287834 0.274297
+0.129311 -0.304471 0.279453
+0.112324 -0.304243 0.281557
+0.095664 -0.303399 0.283953
+0.082297 -0.300646 0.287319
+0.064695 -0.306054 0.290375
+-0.050379 -0.30386 0.290784
+-0.072515 -0.307887 0.285991
+-0.092085 -0.305601 0.282492
+-0.108002 -0.304112 0.280016
+-0.120297 -0.300344 0.27821
+0.129311 -0.321418 0.278589
+0.112297 -0.32135 0.280685
+0.095032 -0.320843 0.282079
+0.076156 -0.31877 0.285276
+0.058243 -0.323635 0.287225
+0.048901 -0.318082 0.29007
+0.03424 -0.320468 0.290904
+0.017079 -0.321189 0.291301
+-7.4e-05 -0.321351 0.291333
+-0.01753 -0.320763 0.290989
+-0.037418 -0.318674 0.289771
+-0.060449 -0.325202 0.285472
+-0.077645 -0.326147 0.282656
+-0.090355 -0.321821 0.281353
+-0.106384 -0.320413 0.278882
+-0.125438 -0.31857 0.275067
+0.129567 -0.338243 0.276745
+0.112593 -0.338404 0.279309
+0.095351 -0.338297 0.280921
+0.07783 -0.337911 0.282056
+0.060109 -0.337852 0.283527
+0.041904 -0.335528 0.286218
+0.022011 -0.337732 0.286773
+0.004499 -0.338297 0.286962
+-0.012716 -0.33823 0.286816
+-0.030339 -0.337965 0.286259
+-0.048161 -0.339081 0.284439
+-0.062648 -0.342544 0.282293
+-0.074845 -0.339252 0.281376
+-0.08945 -0.33744 0.279801
+-0.102042 -0.333947 0.278237
+0.113437 -0.355065 0.277017
+0.095993 -0.355697 0.27911
+0.078539 -0.355378 0.280416
+0.061162 -0.355136 0.281434
+0.043723 -0.354799 0.282263
+0.025996 -0.354773 0.282882
+0.008355 -0.355176 0.283174
+-0.008771 -0.355311 0.283218
+-0.025713 -0.355149 0.283017
+-0.042498 -0.354988 0.282344
+-0.058297 -0.354907 0.281167
+-0.073181 -0.3541 0.279724
+-0.085962 -0.350441 0.278587
+-0.536829 -0.363441 0.272414
+-0.545128 -0.363199 0.273116
+-0.557536 -0.370521 0.280837
+0.079203 -0.372643 0.278326
+0.062157 -0.37223 0.2796
+0.045139 -0.37219 0.280215
+0.027969 -0.372123 0.280506
+0.010776 -0.37219 0.280685
+-0.00626 -0.372257 0.280708
+-0.023108 -0.372002 0.280663
+-0.039481 -0.371114 0.28036
+-0.055459 -0.370145 0.279431
+-0.068989 -0.367012 0.278473
+0.063615 -0.388531 0.277031
+0.047054 -0.388948 0.277955
+0.030143 -0.389204 0.278197
+0.013197 -0.389204 0.278197
+-0.00375 -0.389204 0.278197
+-0.020781 -0.388975 0.278107
+-0.037817 -0.387832 0.277861
+-0.051811 -0.383942 0.277707
+-0.520251 -0.388715 0.278885
+-0.585882 -0.412414 0.29915
+-0.503769 -0.423682 0.280124
+-0.521668 -0.42056 0.295448
+-0.594467 -0.424552 0.292946
+-0.516611 -0.440423 0.295564
+-0.601997 -0.441785 0.301835
+-0.487786 -0.458596 0.276776
+-0.502579 -0.461771 0.287806
+-0.515566 -0.458351 0.296493
+-0.61091 -0.457415 0.293539
+-0.499571 -0.474863 0.285933
+-0.515603 -0.474837 0.296414
+-0.616523 -0.474406 0.302428
+-0.498141 -0.491137 0.28383
+-0.514998 -0.49107 0.293715
+-0.497572 -0.507963 0.280315
+-0.51433 -0.507775 0.288882
+-0.629857 -0.508488 0.294756
+-0.513048 -0.524274 0.282283
+-0.529833 -0.523924 0.29038
+-0.632633 -0.522549 0.290084
+-0.639547 -0.523311 0.273195
+-0.542876 -0.536079 0.28921
+-0.560466 -0.5361 0.294941
+-0.580481 -0.539396 0.295946
+-0.598344 -0.54062 0.295255
+-0.614783 -0.541448 0.29198
+-0.628008 -0.540181 0.286504
+0.076375 0.048204 0.256195
+0.056208 0.050503 0.257586
+0.038926 0.051242 0.258068
+0.021984 0.051404 0.258112
+0.005037 0.051404 0.258112
+-0.011999 0.051337 0.25809
+-0.029308 0.051041 0.257834
+-0.046693 0.050387 0.257146
+-0.061421 0.048068 0.256436
+0.092246 0.0317 0.258696
+0.075935 0.030188 0.262116
+0.062028 0.033225 0.262701
+0.044754 0.034161 0.26347
+0.027633 0.034457 0.263761
+0.010686 0.034457 0.263761
+-0.00644 0.034323 0.263716
+-0.024081 0.033919 0.263425
+-0.041839 0.033758 0.262587
+-0.059153 0.034002 0.261099
+-0.077158 0.035982 0.257814
+-0.094818 0.030632 0.256273
+0.126281 0.014615 0.256547
+0.105909 0.017372 0.260167
+0.091961 0.015184 0.263353
+0.082037 0.019757 0.26388
+0.068514 0.01695 0.266623
+0.051062 0.016798 0.268659
+0.033461 0.017376 0.269242
+0.016335 0.017511 0.26941
+-0.000701 0.017444 0.269388
+-0.018212 0.016879 0.269199
+-0.038017 0.014675 0.268734
+-0.056383 0.017039 0.265801
+-0.074311 0.017269 0.263524
+-0.092011 0.01705 0.260783
+-0.108692 0.016758 0.257077
+0.141934 -0.002692 0.257656
+0.125301 -0.003096 0.261668
+0.111919 0.001249 0.263073
+0.09824 0.004769 0.264557
+0.081899 0.003096 0.26825
+-0.053817 0.002782 0.270714
+-0.071788 -0.002026 0.269219
+-0.090835 3e-05 0.264995
+-0.108127 0.000376 0.261659
+-0.124979 0.00047 0.257375
+0.156264 -0.016924 0.257126
+0.141678 -0.019644 0.26177
+0.129127 -0.016244 0.263577
+0.116298 -0.01226 0.265039
+0.098672 -0.012948 0.268811
+-0.091238 -0.017454 0.26968
+-0.107899 -0.016611 0.265568
+-0.124885 -0.016382 0.261643
+-0.141832 -0.016382 0.256936
+0.146585 -0.03259 0.262935
+0.133277 -0.02911 0.26509
+0.115837 -0.029856 0.269156
+-0.10806 -0.033584 0.269717
+-0.124885 -0.033329 0.265173
+-0.141832 -0.033328 0.261015
+-0.158778 -0.033329 0.255445
+0.175342 -0.050427 0.257721
+0.160804 -0.052231 0.262774
+0.150576 -0.046266 0.264269
+0.132614 -0.046761 0.268851
+-0.124885 -0.050275 0.269253
+-0.141832 -0.050275 0.263997
+-0.158778 -0.050275 0.259132
+0.165552 -0.0636 0.263355
+0.148104 -0.063913 0.268326
+-0.141832 -0.067221 0.26737
+-0.158778 -0.067221 0.262427
+-0.175725 -0.067221 0.256229
+0.191638 -0.08381 0.25789
+0.177034 -0.086768 0.263679
+0.160912 -0.081849 0.267918
+-0.141832 -0.084168 0.270744
+-0.158778 -0.084168 0.264624
+-0.175725 -0.084168 0.259368
+0.182443 -0.097481 0.263435
+0.167528 -0.100782 0.268864
+0.146779 -0.104092 0.274968
+-0.158778 -0.101114 0.267056
+-0.175725 -0.101114 0.261721
+-0.192671 -0.101114 0.254974
+0.177752 -0.115457 0.267238
+-0.158778 -0.118061 0.268782
+-0.175725 -0.118061 0.26282
+-0.192671 -0.118061 0.256622
+0.208431 -0.136241 0.256977
+0.192525 -0.139441 0.263873
+0.17916 -0.13568 0.268473
+0.161715 -0.134863 0.27389
+-0.158778 -0.135007 0.269724
+-0.175725 -0.135007 0.263761
+-0.192671 -0.135007 0.257406
+0.195268 -0.152949 0.263528
+0.179133 -0.152787 0.26928
+0.162792 -0.152075 0.274252
+-0.158778 -0.151953 0.271136
+-0.175725 -0.151953 0.264467
+-0.192671 -0.151953 0.258034
+0.196501 -0.169182 0.263667
+0.179805 -0.169088 0.26941
+0.16311 -0.168994 0.274431
+-0.175725 -0.1689 0.265644
+-0.192671 -0.1689 0.25874
+0.197003 -0.18594 0.263793
+0.180151 -0.185846 0.26941
+0.163204 -0.185846 0.274431
+-0.175725 -0.185846 0.266821
+-0.192671 -0.185846 0.259289
+0.197097 -0.202793 0.263761
+0.180151 -0.202793 0.26941
+0.163204 -0.202793 0.274431
+-0.175658 -0.20286 0.267269
+-0.192577 -0.202699 0.25976
+0.197097 -0.219739 0.263761
+0.180151 -0.219739 0.26941
+0.163204 -0.219739 0.274431
+-0.175111 -0.220358 0.267393
+-0.192416 -0.219618 0.259816
+0.197097 -0.236686 0.263761
+0.180151 -0.236686 0.26941
+0.163204 -0.236686 0.274431
+-0.152861 -0.236107 0.274104
+-0.173596 -0.239971 0.267024
+-0.192348 -0.23717 0.259278
+0.197097 -0.253632 0.26329
+0.180151 -0.253632 0.269175
+0.163204 -0.253632 0.274353
+-0.164696 -0.25421 0.269137
+-0.180228 -0.258135 0.263438
+-0.193115 -0.254856 0.25831
+0.197097 -0.270578 0.262349
+0.180151 -0.270578 0.268469
+0.163204 -0.270578 0.273882
+-0.160231 -0.270283 0.269545
+-0.177594 -0.271345 0.263757
+-0.193622 -0.27148 0.257592
+0.180151 -0.287525 0.266821
+0.163204 -0.287525 0.272627
+-0.158124 -0.287834 0.269276
+-0.175501 -0.287592 0.263739
+-0.192389 -0.287713 0.257485
+0.180151 -0.304471 0.264703
+0.163204 -0.304471 0.271214
+0.146258 -0.304471 0.276236
+-0.135574 -0.303937 0.274331
+-0.155777 -0.307042 0.268526
+-0.173332 -0.304329 0.263438
+-0.190129 -0.304283 0.257485
+0.180151 -0.321418 0.262663
+0.163204 -0.321418 0.268861
+0.146258 -0.321418 0.274353
+-0.146681 -0.322156 0.269445
+-0.16205 -0.324458 0.264638
+-0.171237 -0.318345 0.262857
+0.163204 -0.338364 0.26588
+0.146352 -0.33827 0.271889
+-0.117712 -0.337569 0.27436
+-0.139115 -0.340914 0.268528
+-0.158149 -0.338364 0.263761
+-0.17612 -0.335609 0.258439
+-0.545965 -0.352366 0.255724
+0.163204 -0.355311 0.262898
+0.146379 -0.355055 0.268462
+0.130064 -0.354557 0.273239
+-0.103405 -0.351959 0.275042
+-0.126701 -0.358503 0.26861
+-0.143511 -0.358207 0.264287
+-0.15356 -0.352134 0.262852
+0.146217 -0.372028 0.264391
+0.129557 -0.371185 0.269367
+0.116093 -0.368529 0.273157
+0.097854 -0.374531 0.27501
+-0.087122 -0.368502 0.275131
+-0.111242 -0.37577 0.268851
+-0.129425 -0.3761 0.264325
+-0.139839 -0.369595 0.263157
+-0.518231 -0.37306 0.26352
+-0.533343 -0.37243 0.277381
+-0.569682 -0.377727 0.278913
+-0.575027 -0.37688 0.261318
+0.14619 -0.389136 0.261071
+0.128925 -0.388629 0.26506
+0.11001 -0.386848 0.269432
+0.091835 -0.392625 0.271115
+0.079176 -0.389375 0.274331
+-0.070342 -0.385269 0.274749
+-0.094246 -0.392638 0.268811
+-0.11183 -0.393535 0.264818
+-0.125289 -0.389884 0.262806
+-0.144036 -0.386703 0.258398
+-0.506542 -0.389042 0.263545
+-0.579984 -0.390686 0.274874
+0.129432 -0.405894 0.261244
+0.112019 -0.405804 0.264431
+0.094373 -0.406234 0.266928
+0.078095 -0.405612 0.270015
+0.065991 -0.401873 0.273068
+0.051232 -0.404859 0.273844
+0.034026 -0.405921 0.274355
+0.016963 -0.40615 0.274431
+1.6e-05 -0.40615 0.274431
+-0.01702 -0.406083 0.274386
+-0.03446 -0.405343 0.274061
+-0.05466 -0.402654 0.272921
+-0.077274 -0.408778 0.267964
+-0.093814 -0.410354 0.26438
+-0.107309 -0.406973 0.26296
+-0.120396 -0.403167 0.261307
+-0.510466 -0.405335 0.279346
+-0.587251 -0.407287 0.284343
+0.11345 -0.422702 0.260492
+0.096029 -0.4232 0.262854
+0.078463 -0.422612 0.265169
+0.059666 -0.419811 0.268584
+0.039105 -0.422451 0.269666
+0.021446 -0.423029 0.270015
+0.004504 -0.423002 0.270038
+-0.012192 -0.422908 0.269959
+-0.028999 -0.422612 0.269511
+-0.046022 -0.421738 0.268684
+-0.06304 -0.422616 0.266233
+-0.077076 -0.426164 0.26314
+-0.087611 -0.421071 0.262855
+-0.484081 -0.426269 0.263599
+-0.595887 -0.421898 0.275396
+0.080574 -0.439762 0.260843
+0.062579 -0.439774 0.26273
+0.043969 -0.439868 0.264331
+0.026001 -0.439949 0.265299
+0.008902 -0.439787 0.265599
+-0.007368 -0.439142 0.265499
+-0.023368 -0.43898 0.264983
+-0.040031 -0.438611 0.264098
+-0.054333 -0.435743 0.263531
+-0.46996 -0.437354 0.257066
+-0.480534 -0.44407 0.26868
+-0.497734 -0.444226 0.281428
+-0.60399 -0.439616 0.284603
+0.029488 -0.456779 0.261024
+0.012515 -0.456572 0.261569
+-0.004368 -0.455756 0.261715
+-0.017939 -0.452475 0.261938
+-0.612401 -0.455603 0.275387
+-0.482267 -0.474656 0.274677
+-0.620047 -0.473657 0.285231
+-0.453665 -0.492306 0.257606
+-0.468456 -0.495595 0.267147
+-0.481414 -0.492186 0.273927
+-0.628384 -0.489913 0.275702
+-0.465745 -0.508689 0.264028
+-0.481616 -0.508635 0.271889
+-0.633544 -0.507426 0.283581
+-0.480441 -0.524613 0.26726
+-0.496594 -0.524116 0.274478
+-0.478343 -0.540592 0.260999
+-0.494788 -0.540448 0.266879
+-0.509016 -0.537864 0.273423
+-0.526881 -0.542357 0.277992
+-0.637788 -0.538414 0.277023
+-0.54691 -0.550848 0.278313
+-0.565828 -0.554472 0.27942
+-0.584501 -0.55562 0.280203
+-0.602288 -0.555943 0.279048
+-0.620176 -0.555362 0.274976
+-0.633051 -0.549483 0.274627
+0.007432 0.624489 0.239452
+-0.012147 0.626604 0.240198
+-0.029724 0.626565 0.24002
+-0.044475 0.624246 0.239489
+0.038241 0.610574 0.23821
+0.019697 0.609815 0.241782
+0.004558 0.606202 0.244198
+-0.00878 0.609402 0.244141
+-0.025664 0.610219 0.243995
+-0.042569 0.610355 0.243426
+-0.060269 0.612218 0.240537
+-0.077871 0.606811 0.238667
+0.025419 0.59298 0.243792
+0.008319 0.592788 0.245324
+-0.007663 0.592788 0.246042
+-0.023933 0.593433 0.246143
+-0.040853 0.593729 0.245887
+-0.058006 0.5939 0.244767
+-0.075199 0.593362 0.242611
+-0.091746 0.592936 0.238153
+0.055174 0.576114 0.240371
+0.039846 0.572309 0.244075
+0.02675 0.575509 0.245123
+0.010162 0.57642 0.246154
+-0.006605 0.576554 0.246737
+-0.023301 0.576648 0.246815
+-0.040153 0.576742 0.246815
+-0.057167 0.57681 0.246602
+-0.074275 0.576783 0.244867
+-0.091248 0.576622 0.241439
+0.04271 0.559029 0.244246
+0.026682 0.558895 0.246017
+0.010565 0.559541 0.24668
+-0.00626 0.559796 0.246815
+-0.023207 0.559796 0.246815
+-0.040153 0.559796 0.246815
+-0.057005 0.55989 0.246815
+-0.073701 0.559984 0.245952
+-0.090517 0.559823 0.243497
+-0.107648 0.559662 0.237904
+0.044104 0.542823 0.244282
+0.027287 0.542661 0.246187
+0.010592 0.542756 0.246815
+-0.00626 0.54285 0.246815
+-0.023207 0.54285 0.246815
+-0.040153 0.54285 0.246815
+-0.056979 0.543105 0.24668
+-0.073096 0.543751 0.246017
+-0.089123 0.543616 0.244011
+-0.106419 0.542486 0.239249
+0.044579 0.525903 0.244304
+0.027633 0.525903 0.246187
+0.010686 0.525903 0.246815
+-0.00626 0.525903 0.246815
+-0.023207 0.525903 0.246815
+-0.040059 0.525997 0.246815
+-0.056795 0.52632 0.246389
+-0.073226 0.527231 0.245348
+-0.086259 0.530337 0.244156
+0.044579 0.508957 0.24399
+0.027633 0.508957 0.246187
+0.010686 0.508957 0.246815
+-0.00626 0.508957 0.246815
+-0.023113 0.509051 0.246815
+-0.039709 0.509401 0.24668
+-0.055826 0.510019 0.246039
+-0.072186 0.510379 0.244563
+-0.091433 0.512015 0.241075
+0.044924 0.492199 0.242594
+0.028198 0.492104 0.245136
+0.011314 0.49201 0.246187
+-0.005633 0.49201 0.246187
+-0.02248 0.492266 0.246143
+-0.038853 0.493154 0.245918
+-0.054709 0.494078 0.245178
+-0.068004 0.496735 0.244113
+0.029681 0.475965 0.242749
+0.013161 0.475319 0.244062
+-0.00375 0.475064 0.244304
+-0.020781 0.475292 0.244215
+-0.037817 0.476436 0.243968
+-0.051719 0.480256 0.243791
+0.058409 0.098636 0.239831
+0.038876 0.101346 0.240258
+0.021446 0.102176 0.240493
+0.00441 0.102243 0.240538
+-0.012537 0.102243 0.240538
+-0.029689 0.101947 0.24044
+-0.047056 0.101136 0.239766
+-0.061765 0.098896 0.238963
+0.110252 0.082221 0.238894
+0.09063 0.085449 0.24115
+0.072931 0.084517 0.244123
+0.058453 0.080685 0.247079
+0.044578 0.083982 0.246728
+0.027718 0.085068 0.246725
+0.010686 0.085297 0.246815
+-0.00626 0.085297 0.246815
+-0.023386 0.085162 0.24677
+-0.041059 0.08457 0.246259
+-0.05866 0.084505 0.244982
+-0.077138 0.086848 0.241022
+-0.094822 0.081767 0.23929
+0.126562 0.065186 0.24137
+0.109726 0.065357 0.245413
+0.098816 0.071393 0.245528
+0.083995 0.068583 0.248643
+0.066363 0.067059 0.251249
+0.049694 0.067315 0.252213
+0.033183 0.068095 0.252419
+0.016335 0.06835 0.252464
+-0.000612 0.06835 0.252464
+-0.017648 0.068283 0.252441
+-0.035159 0.067718 0.252253
+-0.055025 0.065549 0.25153
+-0.073536 0.068049 0.24797
+-0.091544 0.067799 0.245062
+-0.108312 0.068535 0.240914
+0.144265 0.048241 0.242168
+0.126857 0.047658 0.24699
+0.115345 0.053996 0.247659
+0.098496 0.053808 0.251044
+-0.070844 0.053702 0.253606
+-0.08893 0.048848 0.251612
+-0.108194 0.051283 0.246618
+-0.127313 0.05367 0.241479
+-0.145629 0.047745 0.238763
+0.161142 0.032078 0.242247
+0.147119 0.033503 0.246253
+0.134742 0.033547 0.249415
+0.114346 0.036277 0.253292
+-0.108319 0.03352 0.252308
+-0.125419 0.034615 0.247652
+-0.142904 0.034211 0.24383
+-0.159531 0.033704 0.239032
+0.17644 0.015465 0.24229
+0.162829 0.017511 0.246627
+0.14844 0.019014 0.250325
+-0.125074 0.017323 0.252872
+-0.14206 0.017551 0.248162
+-0.159034 0.01739 0.24395
+-0.175819 0.017417 0.237682
+0.18929 0.000252 0.241718
+0.177365 0.001069 0.246478
+0.163537 0.002803 0.25045
+-0.141832 0.000564 0.252777
+-0.158778 0.000564 0.247521
+-0.175725 0.000564 0.242343
+0.176721 -0.01426 0.250231
+-0.158778 -0.016382 0.251836
+-0.175725 -0.016382 0.24603
+-0.192671 -0.016382 0.239048
+0.20835 -0.033866 0.241928
+0.196847 -0.033516 0.246877
+0.184851 -0.033453 0.251295
+0.164825 -0.035345 0.258317
+-0.175725 -0.033329 0.249482
+-0.192671 -0.033328 0.243284
+0.19497 -0.048513 0.250474
+-0.175725 -0.050275 0.253562
+-0.192671 -0.050275 0.246736
+-0.209618 -0.050275 0.239048
+0.225258 -0.067234 0.240856
+0.213554 -0.067135 0.24655
+0.2015 -0.067164 0.251368
+0.18142 -0.069087 0.259061
+-0.192671 -0.067221 0.249953
+-0.209618 -0.067221 0.243049
+0.2107 -0.081632 0.249897
+-0.192671 -0.084168 0.253248
+-0.209618 -0.084168 0.245952
+-0.226564 -0.084168 0.237792
+0.214425 -0.100976 0.250696
+0.196303 -0.100178 0.25831
+-0.209618 -0.101114 0.248227
+-0.226564 -0.101114 0.240381
+0.220213 -0.118084 0.250077
+0.198772 -0.120727 0.259412
+-0.209618 -0.118061 0.249875
+-0.226564 -0.118061 0.241637
+-0.209618 -0.135007 0.250581
+-0.226564 -0.135007 0.242421
+0.241911 -0.152612 0.242421
+0.225831 -0.155795 0.251296
+0.212134 -0.152868 0.256879
+-0.209618 -0.151953 0.251287
+-0.226564 -0.151953 0.243127
+0.229013 -0.169747 0.250643
+0.212788 -0.169653 0.257516
+-0.209618 -0.1689 0.251836
+-0.226564 -0.1689 0.244304
+0.230394 -0.186129 0.250518
+0.213698 -0.186035 0.257547
+-0.209618 -0.185846 0.252542
+-0.226564 -0.185846 0.245481
+-0.243511 -0.185846 0.236929
+0.230896 -0.202887 0.250612
+0.214044 -0.202793 0.257485
+-0.209272 -0.202604 0.253013
+-0.226089 -0.202766 0.245952
+-0.243125 -0.202833 0.238137
+0.23099 -0.219739 0.250581
+0.214044 -0.219739 0.257485
+-0.208667 -0.218838 0.252984
+-0.224695 -0.218973 0.246393
+-0.241874 -0.21987 0.238653
+0.23099 -0.236686 0.250345
+0.214044 -0.236686 0.257406
+-0.209174 -0.235462 0.252266
+-0.222061 -0.232183 0.246976
+0.23099 -0.253632 0.249561
+0.214043 -0.253632 0.256857
+-0.20994 -0.253148 0.251298
+-0.228693 -0.250347 0.242757
+0.23099 -0.270578 0.247678
+0.214043 -0.270578 0.255209
+-0.209873 -0.2707 0.25076
+-0.227178 -0.26996 0.242556
+0.214044 -0.287525 0.253326
+0.197097 -0.287525 0.260544
+-0.209084 -0.287619 0.250581
+-0.226004 -0.287458 0.242443
+0.214044 -0.304471 0.25113
+0.197097 -0.304471 0.258112
+-0.207107 -0.304471 0.250581
+-0.224054 -0.304471 0.242421
+0.214043 -0.321418 0.248541
+0.197097 -0.321418 0.255523
+-0.185481 -0.320468 0.257431
+-0.202597 -0.321189 0.250625
+0.214044 -0.338364 0.245952
+0.197097 -0.338364 0.253327
+0.180151 -0.338364 0.259838
+-0.195738 -0.337799 0.250738
+-0.213294 -0.338297 0.242444
+-0.532353 -0.359807 0.263145
+-0.53155 -0.348406 0.244506
+-0.557753 -0.350579 0.243231
+0.197097 -0.355311 0.249953
+0.180151 -0.355311 0.256465
+-0.168444 -0.354317 0.257495
+-0.186691 -0.355092 0.250667
+-0.51761 -0.359235 0.247483
+-0.560587 -0.362389 0.264215
+0.197097 -0.372257 0.246736
+0.180151 -0.372257 0.253562
+0.163204 -0.372257 0.259368
+-0.155999 -0.369203 0.258448
+-0.177115 -0.374125 0.250177
+-0.196447 -0.372603 0.242194
+-0.504939 -0.373469 0.24785
+0.180151 -0.389203 0.249404
+0.163204 -0.389203 0.255445
+-0.164606 -0.388662 0.251407
+-0.176897 -0.389103 0.246848
+-0.582299 -0.389491 0.263592
+0.180151 -0.40615 0.245324
+0.163204 -0.40615 0.251522
+0.146352 -0.406056 0.256904
+-0.135184 -0.405631 0.256785
+-0.155673 -0.408115 0.250118
+-0.176891 -0.403795 0.242931
+-0.479989 -0.406651 0.246626
+-0.495584 -0.406584 0.263572
+-0.58886 -0.403568 0.265501
+-0.593437 -0.408574 0.246161
+0.163204 -0.423096 0.246344
+0.146379 -0.422841 0.252143
+0.130064 -0.422343 0.256998
+-0.101622 -0.423096 0.259788
+-0.121327 -0.420624 0.256252
+-0.142762 -0.42504 0.250073
+-0.156108 -0.423514 0.24632
+-0.466366 -0.423078 0.245722
+-0.597036 -0.419463 0.260532
+0.146217 -0.439814 0.246739
+0.129557 -0.438971 0.252106
+0.11619 -0.436218 0.256273
+0.098588 -0.441625 0.257699
+-0.068911 -0.439561 0.260352
+-0.088571 -0.438224 0.257368
+-0.110449 -0.441654 0.252938
+-0.130125 -0.43919 0.249271
+-0.142204 -0.439175 0.246224
+-0.455179 -0.439813 0.245453
+-0.605365 -0.437081 0.264775
+-0.610354 -0.443004 0.245799
+0.12918 -0.456294 0.246269
+0.110245 -0.454376 0.251593
+0.092216 -0.459288 0.253606
+0.082686 -0.453734 0.256463
+0.067411 -0.456605 0.257357
+0.047273 -0.459387 0.258508
+-0.033302 -0.455662 0.259832
+-0.054335 -0.454371 0.257569
+-0.077129 -0.459361 0.253331
+-0.097247 -0.457084 0.250437
+-0.111542 -0.458849 0.247347
+-0.122652 -0.453077 0.246783
+-0.468267 -0.455548 0.262078
+-0.613838 -0.453452 0.260306
+0.112876 -0.473156 0.244986
+0.094908 -0.473634 0.24797
+0.076297 -0.47133 0.251595
+0.0562 -0.474253 0.252726
+0.041221 -0.476928 0.253326
+0.03212 -0.470863 0.2562
+0.017787 -0.472919 0.256384
+0.00016 -0.473052 0.256517
+-0.019922 -0.470966 0.255981
+-0.042841 -0.476228 0.252557
+-0.063252 -0.474305 0.250493
+-0.0774 -0.477128 0.247643
+-0.091123 -0.473717 0.246655
+-0.105235 -0.469844 0.245565
+-0.4335 -0.471416 0.24041
+-0.445242 -0.477755 0.251061
+-0.462885 -0.477765 0.262422
+-0.6221 -0.471089 0.264928
+-0.627301 -0.476897 0.245799
+0.080032 -0.49009 0.244982
+0.0624 -0.490344 0.246479
+0.044831 -0.49089 0.247647
+0.026941 -0.488173 0.250216
+0.007351 -0.490116 0.250247
+-0.010792 -0.490415 0.250025
+-0.028789 -0.491497 0.248428
+-0.043463 -0.494972 0.245996
+-0.057298 -0.490951 0.246126
+-0.070719 -0.487523 0.245782
+-0.630491 -0.487523 0.260349
+-0.448768 -0.507859 0.254068
+-0.637604 -0.505461 0.264009
+-0.642629 -0.510485 0.244055
+-0.447185 -0.524802 0.251239
+-0.463943 -0.524613 0.259493
+-0.644792 -0.524115 0.256539
+-0.446517 -0.541372 0.24672
+-0.462473 -0.540726 0.254095
+-0.644544 -0.538439 0.262257
+-0.461308 -0.556347 0.247841
+-0.474337 -0.553655 0.253865
+-0.48893 -0.55666 0.25631
+-0.509435 -0.556182 0.262162
+-0.530435 -0.562929 0.262308
+-0.632847 -0.558141 0.262173
+-0.639803 -0.548704 0.265628
+-0.550763 -0.568542 0.259991
+-0.571773 -0.568343 0.262913
+-0.590235 -0.568316 0.262846
+-0.608042 -0.567348 0.261635
+-0.622183 -0.565486 0.258757
+0.007678 0.674669 0.222519
+-0.01217 0.677228 0.223213
+-0.03002 0.677247 0.222774
+-0.044819 0.675074 0.222017
+0.042006 0.6585 0.222673
+0.022217 0.660497 0.226196
+0.007947 0.657009 0.229514
+-0.006351 0.659959 0.229519
+-0.024027 0.66052 0.229223
+-0.041713 0.660683 0.228035
+-0.060153 0.663319 0.224173
+-0.077732 0.658886 0.222657
+0.059022 0.641354 0.224789
+0.041996 0.640971 0.229291
+0.030652 0.647101 0.229589
+0.016334 0.644025 0.232729
+-0.000558 0.64316 0.234863
+-0.018132 0.643506 0.235094
+-0.038078 0.641727 0.234583
+-0.056657 0.644294 0.231046
+-0.074925 0.644368 0.228403
+-0.093878 0.646123 0.223767
+-0.111764 0.640703 0.221021
+0.075072 0.624608 0.225266
+0.060598 0.626487 0.229155
+0.048589 0.627085 0.232013
+0.02935 0.629522 0.235387
+-0.053898 0.62988 0.23666
+-0.072042 0.625084 0.234604
+-0.091423 0.627286 0.22977
+-0.109025 0.627188 0.226191
+-0.125639 0.626829 0.220344
+0.091116 0.607857 0.224704
+0.074639 0.606959 0.230067
+0.058661 0.611874 0.233427
+-0.091306 0.609631 0.234853
+-0.108127 0.610447 0.229649
+-0.125141 0.610514 0.224728
+0.103825 0.593254 0.223384
+0.089498 0.590534 0.228915
+0.079996 0.59595 0.230755
+0.065533 0.593586 0.235281
+0.045002 0.590731 0.240611
+-0.10806 0.593433 0.233078
+-0.124885 0.593689 0.227828
+-0.141832 0.593689 0.220846
+0.09264 0.576667 0.229523
+0.075017 0.579136 0.234633
+-0.108033 0.576648 0.23627
+-0.124885 0.576742 0.229554
+-0.141832 0.576742 0.222964
+0.094719 0.559836 0.229824
+0.077526 0.56024 0.235338
+0.059925 0.560079 0.240381
+-0.124818 0.559729 0.231493
+-0.141832 0.559796 0.224141
+0.095418 0.54285 0.229868
+0.078405 0.542917 0.235495
+0.061234 0.542984 0.240494
+-0.124271 0.542231 0.232793
+-0.141698 0.542715 0.224724
+0.095418 0.525903 0.229633
+0.078472 0.525903 0.235282
+0.061526 0.525903 0.24046
+-0.101668 0.526451 0.240091
+-0.122168 0.52268 0.232891
+-0.141177 0.525056 0.224903
+0.095418 0.508957 0.228848
+0.078472 0.508957 0.234576
+0.061526 0.508957 0.239754
+-0.112206 0.508567 0.234952
+-0.127028 0.505174 0.229492
+-0.140423 0.507402 0.224282
+0.095418 0.49201 0.227593
+0.078472 0.49201 0.232614
+0.06162 0.492105 0.237839
+-0.083876 0.492863 0.240294
+-0.105647 0.489692 0.234026
+-0.121769 0.494611 0.229786
+0.078472 0.475064 0.229947
+0.061647 0.475319 0.23504
+0.045529 0.475965 0.239297
+-0.069613 0.478545 0.240702
+-0.092462 0.471971 0.234294
+-0.109824 0.471362 0.229435
+-0.125897 0.476823 0.225132
+0.078728 0.458238 0.226925
+0.061714 0.458306 0.230904
+0.045023 0.459341 0.235345
+0.032243 0.462701 0.238979
+0.017339 0.459409 0.239951
+0.000133 0.458346 0.240462
+-0.01702 0.458185 0.240494
+-0.03446 0.458924 0.240168
+-0.054594 0.461564 0.239011
+-0.077062 0.455695 0.233923
+-0.093596 0.454988 0.230078
+-0.104014 0.460226 0.228785
+0.062611 0.441565 0.226834
+0.045122 0.441672 0.230172
+0.026203 0.444618 0.234234
+0.005773 0.441884 0.23528
+-0.011819 0.441238 0.235495
+-0.028936 0.441561 0.235304
+-0.046022 0.442529 0.234712
+-0.06304 0.441651 0.232341
+-0.077233 0.438366 0.229056
+-0.08817 0.444026 0.228517
+0.029435 0.425124 0.227842
+0.011672 0.425031 0.229286
+-0.006081 0.424359 0.229824
+-0.023292 0.424453 0.229779
+-0.040242 0.425606 0.229564
+-0.054361 0.42869 0.229433
+0.060511 0.133175 0.22389
+0.040916 0.135252 0.224975
+0.023329 0.136069 0.22543
+0.006293 0.136136 0.225475
+-0.010654 0.136136 0.225475
+-0.027896 0.135773 0.225354
+-0.045652 0.134616 0.224663
+-0.060646 0.13253 0.223814
+0.11092 0.115754 0.223943
+0.090538 0.119687 0.225726
+0.075061 0.122548 0.227336
+0.064495 0.115459 0.232137
+0.049414 0.117589 0.233038
+0.031694 0.118826 0.233392
+0.014452 0.11919 0.233634
+-0.002494 0.11919 0.233634
+-0.019531 0.119122 0.233612
+-0.037028 0.118373 0.233272
+-0.056504 0.116236 0.232458
+-0.076032 0.12142 0.226242
+-0.097073 0.118487 0.223304
+-0.112987 0.115312 0.221044
+0.142944 0.099704 0.222959
+0.125971 0.104209 0.226337
+0.115633 0.098289 0.231536
+0.099847 0.101343 0.233442
+0.079136 0.104229 0.235244
+-0.071845 0.104993 0.234981
+-0.090065 0.099992 0.233203
+-0.109323 0.10139 0.228342
+-0.125694 0.102518 0.22345
+0.159973 0.082319 0.225031
+0.145791 0.085072 0.229099
+0.130945 0.086769 0.232539
+-0.107942 0.085008 0.235152
+-0.124504 0.0857 0.230572
+-0.143955 0.087281 0.224356
+-0.162523 0.081391 0.220018
+0.176455 0.065825 0.225146
+0.162743 0.068091 0.229868
+0.148112 0.070089 0.233627
+-0.121452 0.071922 0.236654
+-0.139977 0.066334 0.233542
+-0.159464 0.06753 0.226728
+0.19182 0.051376 0.223663
+0.179204 0.051836 0.229321
+0.165045 0.053447 0.233948
+-0.159243 0.050362 0.233462
+-0.17594 0.051054 0.226111
+0.182048 0.036645 0.233155
+-0.175846 0.034202 0.232843
+-0.192671 0.034457 0.224769
+0.213613 0.016852 0.225161
+0.195649 0.017255 0.233899
+-0.192671 0.017511 0.230731
+-0.209618 0.017511 0.222101
+0.22535 0.000242 0.224523
+0.206974 -1e-05 0.234095
+-0.192671 0.000564 0.235595
+-0.209618 0.000564 0.227358
+0.217218 -0.017024 0.23396
+0.197706 -0.018737 0.242931
+-0.209618 -0.016382 0.231987
+-0.226564 -0.016382 0.223043
+0.24366 -0.033413 0.223966
+0.225974 -0.033876 0.233772
+-0.209618 -0.033328 0.235909
+-0.226564 -0.033328 0.227201
+0.235133 -0.050307 0.233004
+0.215395 -0.052541 0.242632
+-0.226564 -0.050275 0.231437
+-0.243511 -0.050275 0.222023
+-0.226564 -0.067221 0.235203
+-0.243511 -0.067221 0.225396
+0.258449 -0.084367 0.225014
+0.242945 -0.087706 0.235029
+0.229157 -0.0844 0.241539
+-0.243511 -0.084168 0.228927
+0.247242 -0.101047 0.234105
+0.231618 -0.101114 0.242107
+-0.243511 -0.101114 0.231673
+-0.260457 -0.101114 0.221081
+0.249479 -0.117469 0.234262
+0.235816 -0.114526 0.241494
+-0.243511 -0.118061 0.232928
+-0.260457 -0.118061 0.223042
+0.253822 -0.134622 0.234174
+0.231091 -0.135108 0.246119
+-0.243511 -0.135007 0.233948
+-0.260457 -0.135007 0.224219
+-0.243511 -0.151953 0.234732
+-0.260457 -0.151953 0.225004
+0.275441 -0.168846 0.22499
+0.259643 -0.17266 0.235103
+0.245959 -0.169747 0.242013
+-0.243511 -0.1689 0.235988
+-0.260457 -0.1689 0.225945
+0.262865 -0.186465 0.234136
+0.246681 -0.186599 0.242453
+-0.260457 -0.185846 0.227358
+0.264408 -0.20282 0.233665
+0.247591 -0.202981 0.242484
+-0.260045 -0.202672 0.228597
+0.264883 -0.219739 0.233399
+0.247936 -0.219739 0.242421
+-0.258883 -0.219493 0.22909
+0.264883 -0.236686 0.232614
+0.247936 -0.236686 0.241872
+-0.23757 -0.235969 0.239727
+-0.258002 -0.238845 0.228408
+0.247936 -0.253632 0.24046
+-0.249486 -0.253991 0.232316
+-0.265283 -0.257167 0.222476
+0.247936 -0.270578 0.238341
+-0.24503 -0.270215 0.233549
+-0.262354 -0.270942 0.223134
+0.247936 -0.287525 0.23638
+0.23099 -0.287525 0.244853
+-0.243264 -0.287458 0.233679
+-0.260681 -0.287458 0.223143
+0.247936 -0.304471 0.233948
+0.23099 -0.304471 0.242578
+-0.241117 -0.304512 0.233822
+-0.258633 -0.304906 0.223197
+0.247936 -0.321418 0.232065
+0.23099 -0.321418 0.240617
+-0.21966 -0.321418 0.242421
+-0.236727 -0.321297 0.234011
+-0.544011 -0.34374 0.240142
+0.23099 -0.338364 0.237792
+-0.230581 -0.33827 0.233979
+-0.248141 -0.337916 0.224346
+-0.516343 -0.349349 0.230249
+0.23099 -0.355311 0.235203
+0.214043 -0.355311 0.243049
+-0.204865 -0.355311 0.242421
+-0.222328 -0.355311 0.234105
+-0.505595 -0.361185 0.234451
+-0.569048 -0.362935 0.249591
+0.23099 -0.372257 0.231437
+0.214043 -0.372257 0.239048
+-0.213921 -0.372324 0.234239
+-0.231209 -0.372351 0.22513
+-0.577139 -0.374247 0.242931
+0.214043 -0.389203 0.235674
+0.197097 -0.389203 0.243049
+-0.188095 -0.389203 0.241794
+-0.205022 -0.389203 0.234105
+-0.478897 -0.389857 0.230096
+-0.492646 -0.389459 0.24707
+-0.58413 -0.389835 0.252368
+0.214044 -0.40615 0.231359
+0.197097 -0.40615 0.238341
+-0.195909 -0.405737 0.234198
+-0.213294 -0.406083 0.225497
+-0.463963 -0.406817 0.22968
+0.598638 -0.432452 0.216774
+0.197097 -0.423096 0.23387
+0.18015 -0.423096 0.24046
+-0.167918 -0.422784 0.241718
+-0.185508 -0.422616 0.23422
+-0.449543 -0.423804 0.229491
+-0.601865 -0.426535 0.250332
+0.607977 -0.444208 0.219484
+0.597075 -0.446153 0.222586
+0.58513 -0.442412 0.218939
+0.197097 -0.440043 0.22877
+0.18015 -0.440043 0.235046
+0.163204 -0.440043 0.241087
+-0.155245 -0.437742 0.242086
+-0.174245 -0.439975 0.233993
+-0.436806 -0.441472 0.22968
+0.601097 -0.459331 0.223946
+0.585885 -0.45834 0.221958
+0.18015 -0.456989 0.229633
+0.163204 -0.456989 0.235517
+0.146284 -0.456828 0.241112
+-0.139723 -0.453826 0.242052
+-0.160458 -0.459139 0.233356
+-0.180621 -0.457335 0.225247
+-0.446076 -0.459866 0.246192
+-0.618828 -0.460525 0.250268
+0.62254 -0.479475 0.222895
+0.614991 -0.478859 0.225603
+0.604279 -0.475208 0.225223
+0.588248 -0.474861 0.222738
+0.16346 -0.473815 0.229671
+0.146607 -0.47372 0.235132
+0.129997 -0.473115 0.240422
+-0.122089 -0.470517 0.241345
+-0.143505 -0.475811 0.233467
+-0.157597 -0.474368 0.22947
+-0.418799 -0.474362 0.229586
+0.618095 -0.491169 0.22443
+0.608016 -0.487969 0.225526
+0.14738 -0.490336 0.228857
+0.130351 -0.490092 0.234021
+0.116425 -0.487099 0.238856
+0.098514 -0.492414 0.2409
+-0.08456 -0.490017 0.242647
+-0.10466 -0.487451 0.239287
+-0.12648 -0.492453 0.232685
+-0.141457 -0.490709 0.229148
+-0.43412 -0.489149 0.244551
+-0.635387 -0.494515 0.24988
+0.111388 -0.505446 0.232744
+0.093249 -0.510385 0.234755
+0.083137 -0.504481 0.238963
+0.068428 -0.506721 0.239766
+0.05099 -0.507492 0.24074
+0.033546 -0.507385 0.241534
+0.015909 -0.507291 0.24213
+-0.001777 -0.507627 0.242175
+-0.019091 -0.50795 0.241749
+-0.03571 -0.508595 0.241002
+-0.052109 -0.507832 0.240263
+-0.070924 -0.504392 0.239208
+-0.092007 -0.508668 0.234478
+-0.110491 -0.504622 0.231959
+-0.402715 -0.509894 0.225425
+-0.417847 -0.512472 0.235474
+-0.431449 -0.508662 0.243253
+0.077896 -0.521703 0.232418
+0.0584 -0.523959 0.233272
+0.040835 -0.524641 0.233746
+0.023575 -0.524641 0.23406
+0.006382 -0.524708 0.234239
+-0.010654 -0.524775 0.234183
+-0.027538 -0.524869 0.233948
+-0.04456 -0.5246 0.23347
+-0.062029 -0.523268 0.233038
+-0.077265 -0.520713 0.231916
+-0.414866 -0.525864 0.233116
+-0.430938 -0.525609 0.241605
+-0.648426 -0.52674 0.243159
+-0.413342 -0.542044 0.229882
+-0.430104 -0.541883 0.23816
+-0.647977 -0.536625 0.248823
+-0.42872 -0.558368 0.232294
+-0.445495 -0.557323 0.240301
+-0.64492 -0.551885 0.246991
+-0.444066 -0.57304 0.231974
+-0.458031 -0.569276 0.239192
+-0.475123 -0.570014 0.243775
+-0.495439 -0.573708 0.24529
+-0.514353 -0.575914 0.246133
+-0.532357 -0.578993 0.244985
+-0.546421 -0.582125 0.241633
+-0.561704 -0.579645 0.245267
+-0.579807 -0.578637 0.245805
+-0.599996 -0.577898 0.243113
+-0.618366 -0.57312 0.2452
+-0.633201 -0.565935 0.245872
+0.008121 0.709861 0.204632
+-0.012614 0.711309 0.205502
+-0.030813 0.71075 0.205613
+-0.045336 0.70864 0.205494
+0.042636 0.69354 0.207115
+0.024615 0.69798 0.209256
+0.013647 0.691403 0.214631
+-0.002044 0.69378 0.215472
+-0.020391 0.694188 0.215478
+-0.039946 0.692415 0.215123
+-0.059462 0.69754 0.209
+-0.080024 0.694756 0.206427
+-0.095891 0.691115 0.204208
+0.076093 0.675688 0.206237
+0.058609 0.681199 0.209448
+0.047228 0.675311 0.215013
+0.028851 0.67933 0.217599
+-0.054801 0.681268 0.218067
+-0.072554 0.676735 0.216579
+-0.091538 0.677419 0.212018
+-0.10849 0.67712 0.206853
+0.092386 0.658397 0.208277
+0.078213 0.661215 0.21223
+0.063304 0.663115 0.215797
+-0.088085 0.663911 0.218737
+-0.105919 0.658666 0.21594
+-0.124593 0.660806 0.20788
+0.108669 0.642003 0.2082
+0.094957 0.644269 0.212922
+0.080277 0.646317 0.21678
+-0.125131 0.643456 0.215418
+-0.141791 0.6443 0.207197
+0.123438 0.627683 0.206673
+0.111102 0.628101 0.212345
+0.096729 0.629655 0.216912
+-0.141953 0.627326 0.2137
+-0.158778 0.627582 0.204841
+0.112449 0.613028 0.21586
+-0.141926 0.610541 0.218304
+-0.158778 0.610635 0.209862
+0.139448 0.593886 0.207047
+0.121695 0.593944 0.216325
+-0.158778 0.593689 0.213706
+-0.175725 0.593689 0.204605
+0.126828 0.57685 0.216226
+0.109509 0.576689 0.223547
+-0.158778 0.576742 0.215746
+-0.175725 0.576743 0.207038
+0.128774 0.559863 0.21606
+0.111737 0.559796 0.223592
+-0.158778 0.559796 0.216531
+-0.175725 0.559796 0.208215
+0.129312 0.54285 0.21606
+0.112365 0.54285 0.223592
+-0.158684 0.542944 0.217033
+-0.17538 0.543038 0.208591
+0.129312 0.525903 0.215825
+0.112365 0.525903 0.223435
+-0.158523 0.526024 0.217098
+-0.174774 0.526804 0.20856
+0.129311 0.508957 0.215119
+0.112365 0.508957 0.222729
+-0.157725 0.508352 0.21654
+-0.174936 0.510127 0.207618
+0.129311 0.49201 0.213157
+0.112365 0.49201 0.220846
+-0.136305 0.491586 0.223975
+-0.155155 0.489301 0.215831
+-0.173967 0.491947 0.206403
+0.112365 0.475064 0.218335
+0.095418 0.475064 0.224926
+-0.146239 0.475029 0.217349
+-0.158214 0.475139 0.212543
+0.112365 0.458117 0.213706
+0.095513 0.458212 0.220736
+-0.118435 0.457889 0.223639
+-0.138638 0.455934 0.21621
+-0.160035 0.460796 0.208051
+0.095539 0.441426 0.215661
+0.079225 0.441924 0.222007
+-0.104295 0.443655 0.224083
+-0.125203 0.438832 0.216331
+-0.139195 0.440753 0.212293
+0.07895 0.425414 0.215966
+0.065517 0.428077 0.221416
+0.047821 0.422708 0.22368
+-0.06863 0.425202 0.226048
+-0.088174 0.427053 0.22238
+-0.109372 0.422485 0.215706
+-0.124223 0.424311 0.212172
+0.060344 0.410082 0.215284
+0.04241 0.404721 0.217647
+0.032298 0.410625 0.222017
+0.017589 0.408385 0.222819
+0.000222 0.407574 0.223493
+-0.01702 0.407345 0.223547
+-0.03445 0.408175 0.223312
+-0.054092 0.41103 0.222519
+-0.075265 0.406369 0.217599
+-0.093641 0.410388 0.215013
+0.027495 0.393354 0.214985
+0.008166 0.391148 0.21572
+-0.009309 0.390399 0.216038
+-0.026641 0.390695 0.215818
+-0.044459 0.391852 0.215495
+-0.06006 0.394297 0.214631
+0.059286 0.167613 0.205345
+0.039104 0.169387 0.206206
+0.021446 0.169962 0.2066
+0.00441 0.170029 0.206645
+-0.012537 0.170029 0.206645
+-0.029734 0.169666 0.206569
+-0.047343 0.168589 0.206106
+-0.062116 0.16623 0.205591
+0.110582 0.149013 0.206551
+0.090122 0.153039 0.20853
+0.074723 0.156453 0.209783
+0.064721 0.149643 0.215078
+0.049549 0.151643 0.21601
+0.031694 0.152719 0.216446
+0.014452 0.153083 0.216688
+-0.002494 0.153083 0.216688
+-0.019531 0.153015 0.216665
+-0.037095 0.152199 0.216326
+-0.056493 0.150002 0.215511
+-0.075874 0.154937 0.209102
+-0.093072 0.15007 0.207963
+0.129392 0.134576 0.208999
+0.115894 0.130939 0.215337
+0.099987 0.135016 0.216985
+0.079686 0.138706 0.21872
+-0.070825 0.139324 0.218649
+-0.086379 0.136588 0.216892
+-0.108674 0.135064 0.21208
+-0.128035 0.133027 0.207479
+0.163002 0.118988 0.20548
+0.145531 0.118436 0.212767
+0.128658 0.117799 0.21913
+-0.12611 0.11904 0.215965
+-0.144326 0.121384 0.20848
+-0.162652 0.115413 0.205252
+0.179787 0.102068 0.207578
+0.162057 0.101257 0.215885
+-0.139229 0.105999 0.217773
+-0.1575 0.099674 0.214759
+-0.176297 0.10096 0.206749
+0.195891 0.085942 0.207795
+0.178604 0.084419 0.216654
+-0.176203 0.084107 0.214029
+-0.192725 0.084974 0.206444
+0.210018 0.072026 0.206283
+0.195052 0.068401 0.215934
+-0.176411 0.06753 0.22018
+-0.192792 0.068095 0.212727
+-0.209618 0.06835 0.204449
+-0.192765 0.05131 0.21868
+-0.209618 0.051404 0.210647
+0.231563 0.033916 0.208842
+0.218502 0.030725 0.217979
+0.202911 0.034074 0.224526
+-0.209618 0.034457 0.216845
+-0.226564 0.034457 0.207822
+0.244189 0.02107 0.206369
+0.230425 0.017323 0.216444
+-0.226564 0.017511 0.21402
+-0.243511 0.017511 0.204449
+-0.226564 0.000564 0.21912
+-0.24351 0.000564 0.20947
+0.261632 -0.013273 0.206972
+0.250771 -0.01932 0.216618
+0.235531 -0.016968 0.22436
+-0.243511 -0.016382 0.214334
+-0.260457 -0.016382 0.204292
+-0.243511 -0.033328 0.218649
+-0.260457 -0.033329 0.207979
+0.276318 -0.04999 0.207314
+0.26148 -0.053065 0.218173
+0.25054 -0.04742 0.223532
+-0.260457 -0.050275 0.211902
+0.268367 -0.066756 0.216691
+0.246729 -0.067615 0.229515
+-0.260457 -0.067221 0.215825
+-0.277404 -0.067221 0.204135
+-0.260457 -0.084168 0.218884
+-0.277404 -0.084168 0.207273
+0.264317 -0.10131 0.223843
+-0.277404 -0.101114 0.20994
+0.292535 -0.119126 0.208166
+0.27867 -0.121892 0.218067
+0.266205 -0.118518 0.224547
+-0.277404 -0.118061 0.212137
+0.281807 -0.134953 0.217629
+0.268924 -0.132225 0.224664
+-0.277404 -0.135007 0.213392
+0.286909 -0.150689 0.21636
+0.264509 -0.152008 0.22992
+-0.277404 -0.151953 0.214805
+-0.277404 -0.1689 0.216217
+-0.29435 -0.1689 0.204292
+0.280242 -0.185416 0.223358
+-0.277404 -0.185846 0.217158
+-0.29435 -0.185846 0.205547
+0.281538 -0.202658 0.222886
+-0.276928 -0.202766 0.217896
+-0.294059 -0.202927 0.206253
+0.281829 -0.219739 0.222415
+-0.275386 -0.219121 0.2189
+-0.29283 -0.220102 0.206961
+0.281829 -0.236686 0.221003
+-0.272465 -0.233038 0.22019
+0.281829 -0.253632 0.21959
+0.264883 -0.253632 0.230731
+-0.279563 -0.251312 0.21364
+0.281829 -0.270578 0.217707
+0.264883 -0.270578 0.228142
+-0.278027 -0.269923 0.212931
+0.281829 -0.287525 0.21606
+0.264883 -0.287525 0.226102
+-0.277376 -0.286284 0.212012
+0.264883 -0.304471 0.224219
+-0.276884 -0.304216 0.210832
+0.264883 -0.321418 0.221787
+-0.253826 -0.321481 0.224038
+-0.273382 -0.324498 0.210933
+-0.532568 -0.338872 0.225306
+-0.526999 -0.333247 0.208079
+-0.550463 -0.340414 0.226885
+-0.541298 -0.333431 0.210048
+0.264883 -0.338364 0.21912
+0.247936 -0.338364 0.229005
+-0.262671 -0.335923 0.216615
+-0.561649 -0.348124 0.226671
+0.264883 -0.355311 0.215511
+0.247936 -0.355311 0.225396
+-0.240242 -0.35526 0.224416
+-0.262191 -0.355274 0.211646
+-0.569567 -0.359345 0.234686
+0.247936 -0.372257 0.221709
+-0.248899 -0.372839 0.215754
+-0.264486 -0.375807 0.205233
+-0.479719 -0.374807 0.213634
+-0.49301 -0.373445 0.231159
+-0.57814 -0.372795 0.225536
+0.247936 -0.389203 0.217864
+0.23099 -0.389203 0.226887
+-0.222171 -0.389203 0.225475
+-0.239269 -0.389271 0.216845
+-0.463342 -0.391725 0.212988
+-0.586174 -0.389777 0.235085
+0.598002 -0.414504 0.203407
+0.57904 -0.410065 0.202615
+0.564467 -0.411913 0.200404
+0.23099 -0.40615 0.222101
+-0.230581 -0.406056 0.217033
+-0.248032 -0.405795 0.207369
+-0.447405 -0.408727 0.212921
+-0.594751 -0.406428 0.225935
+0.608539 -0.430331 0.212009
+0.584265 -0.426128 0.212541
+0.567827 -0.424587 0.207402
+0.23099 -0.423096 0.217864
+0.214043 -0.423096 0.226181
+-0.203162 -0.422962 0.22552
+-0.220382 -0.423002 0.21719
+-0.431646 -0.425943 0.212921
+-0.603102 -0.424468 0.23533
+0.569357 -0.440662 0.213561
+0.552626 -0.440231 0.206708
+0.214043 -0.440043 0.22061
+-0.192335 -0.440043 0.225475
+-0.209649 -0.439854 0.217221
+-0.416795 -0.444444 0.212841
+-0.611608 -0.440792 0.226024
+0.616361 -0.46337 0.220374
+0.569797 -0.457401 0.217058
+0.552971 -0.456989 0.210882
+0.536025 -0.456989 0.203664
+0.214043 -0.456989 0.215119
+0.197097 -0.456989 0.222807
+-0.198481 -0.456962 0.21701
+-0.216184 -0.45626 0.207806
+-0.402131 -0.455897 0.207002
+-0.411457 -0.460994 0.218615
+-0.426213 -0.458213 0.229868
+-0.620017 -0.458509 0.235366
+0.570846 -0.474531 0.218137
+0.553581 -0.474043 0.212306
+0.536316 -0.47407 0.206287
+0.197097 -0.473936 0.216217
+0.180245 -0.473841 0.223482
+-0.169279 -0.473979 0.224641
+-0.186395 -0.473936 0.217002
+-0.628386 -0.474819 0.226204
+0.627487 -0.490653 0.219517
+0.594288 -0.491053 0.222575
+0.574136 -0.493856 0.217107
+0.555648 -0.490999 0.212365
+0.537994 -0.491356 0.206906
+0.180272 -0.490627 0.216603
+0.163957 -0.490129 0.223184
+-0.155074 -0.488294 0.22508
+-0.17295 -0.49025 0.216971
+-0.382845 -0.488777 0.206497
+-0.394686 -0.495031 0.217998
+-0.413022 -0.494359 0.230001
+-0.636527 -0.492308 0.235034
+0.631685 -0.502036 0.214252
+0.623216 -0.505628 0.2187
+0.606493 -0.504911 0.220606
+0.585986 -0.510736 0.216173
+0.56931 -0.511577 0.212368
+0.55893 -0.505221 0.211319
+0.163683 -0.506639 0.216202
+0.15018 -0.503907 0.222186
+0.132129 -0.509079 0.225289
+-0.121969 -0.510606 0.226394
+-0.139387 -0.505144 0.223166
+-0.158024 -0.506205 0.216547
+-0.644021 -0.507937 0.225893
+0.616214 -0.522769 0.213304
+0.599008 -0.524235 0.213141
+0.587193 -0.525023 0.211481
+0.145027 -0.521921 0.215498
+0.126727 -0.527498 0.218251
+0.115475 -0.521804 0.223971
+0.097493 -0.526297 0.22611
+-0.08833 -0.527193 0.226816
+-0.106065 -0.522878 0.224257
+-0.126474 -0.52617 0.217956
+-0.144652 -0.520364 0.214823
+-0.36981 -0.525664 0.206855
+-0.384739 -0.528878 0.216603
+-0.398286 -0.525975 0.223662
+-0.648484 -0.521489 0.233054
+0.110705 -0.540061 0.216242
+0.092889 -0.544306 0.218367
+0.082175 -0.537853 0.223726
+0.067024 -0.540201 0.224663
+0.049268 -0.541358 0.225354
+0.032026 -0.541722 0.225475
+0.01508 -0.541722 0.225475
+-0.001867 -0.541722 0.225475
+-0.018813 -0.541722 0.225475
+-0.035849 -0.541654 0.22543
+-0.053436 -0.540838 0.224975
+-0.073209 -0.538523 0.223732
+-0.092761 -0.543214 0.218263
+-0.110454 -0.538736 0.21579
+-0.381067 -0.54234 0.213691
+-0.397027 -0.542353 0.221559
+-0.65151 -0.537584 0.232641
+-0.656193 -0.54339 0.211031
+0.078015 -0.555576 0.215373
+0.058176 -0.557919 0.216483
+0.040365 -0.558668 0.217136
+0.023239 -0.558668 0.217315
+0.006293 -0.558668 0.217315
+-0.010654 -0.558668 0.217315
+-0.027538 -0.558574 0.217347
+-0.04456 -0.558117 0.217057
+-0.062106 -0.557077 0.216373
+-0.077325 -0.55473 0.21502
+-0.39523 -0.558009 0.217898
+-0.411558 -0.558341 0.224939
+-0.652548 -0.552577 0.226656
+-0.393697 -0.573601 0.211697
+-0.407477 -0.571289 0.218144
+-0.425052 -0.576523 0.222368
+-0.617228 -0.580141 0.228482
+-0.632681 -0.573821 0.22945
+-0.645661 -0.564114 0.229356
+-0.441278 -0.586149 0.221406
+-0.45963 -0.584939 0.22747
+-0.481106 -0.587998 0.228537
+-0.500239 -0.589244 0.229509
+-0.518047 -0.590448 0.228993
+-0.536291 -0.591795 0.226248
+-0.554343 -0.588934 0.228454
+-0.57184 -0.587241 0.22893
+-0.58954 -0.585541 0.228442
+-0.604318 -0.584497 0.225284
+0.041399 0.727452 0.187507
+0.023492 0.732964 0.186802
+0.009607 0.729818 0.190503
+-0.007933 0.728875 0.192833
+-0.026058 0.728427 0.193287
+-0.045252 0.726162 0.193746
+-0.064013 0.727878 0.189936
+-0.078468 0.725027 0.189108
+0.075919 0.709568 0.188903
+0.057754 0.714656 0.192143
+0.046997 0.709426 0.198149
+0.028629 0.714579 0.199172
+-0.056062 0.714942 0.200273
+-0.070786 0.712233 0.199125
+-0.092673 0.710994 0.193934
+-0.112232 0.708021 0.18899
+0.095449 0.69408 0.190255
+0.081292 0.690957 0.197621
+0.063114 0.696763 0.200894
+-0.109519 0.693841 0.19833
+-0.125827 0.694426 0.190829
+0.112123 0.677991 0.191167
+0.094988 0.676673 0.199564
+-0.125128 0.67791 0.199885
+-0.141926 0.678327 0.19155
+0.128105 0.66212 0.190927
+0.110913 0.660503 0.199958
+-0.141765 0.661407 0.200033
+-0.158778 0.661475 0.191033
+0.141978 0.648458 0.189111
+0.127195 0.644649 0.198965
+-0.158778 0.644528 0.198957
+-0.175725 0.644528 0.18915
+-0.175725 0.627582 0.195897
+-0.192671 0.627649 0.185563
+0.159044 0.614473 0.189985
+0.147993 0.608335 0.199642
+0.132736 0.610708 0.207131
+-0.175725 0.610635 0.201389
+-0.192671 0.610635 0.190405
+-0.192671 0.593689 0.194877
+0.144434 0.577177 0.206251
+-0.192671 0.576743 0.198015
+-0.209618 0.57681 0.186336
+0.146007 0.559702 0.206206
+-0.192671 0.559796 0.199192
+-0.209618 0.559796 0.188287
+0.146137 0.542594 0.206551
+-0.192196 0.542877 0.199773
+-0.209248 0.542715 0.188993
+0.146164 0.525809 0.206363
+-0.190739 0.526764 0.200275
+-0.207473 0.525715 0.189524
+0.146258 0.508957 0.205312
+-0.188029 0.513669 0.201151
+0.146258 0.49201 0.202879
+-0.193789 0.495683 0.195048
+0.146258 0.475064 0.199741
+0.129311 0.475064 0.209313
+-0.169389 0.475126 0.206467
+-0.189184 0.472932 0.194055
+0.129311 0.458117 0.20437
+-0.177049 0.461157 0.199607
+0.129311 0.441171 0.199192
+0.112365 0.441171 0.207351
+-0.151746 0.441628 0.206763
+-0.174264 0.441531 0.194702
+0.112594 0.424184 0.200696
+0.095539 0.42448 0.208522
+-0.137786 0.42674 0.20784
+-0.156482 0.424299 0.198471
+0.113518 0.407605 0.193458
+0.096289 0.407322 0.200586
+0.079179 0.408427 0.207742
+-0.105023 0.4045 0.209448
+-0.122441 0.409962 0.20622
+-0.141114 0.408646 0.199146
+0.080211 0.391117 0.198919
+0.065496 0.394181 0.205499
+0.047376 0.388873 0.207981
+-0.071028 0.38772 0.209256
+-0.089049 0.39216 0.207115
+-0.109528 0.388936 0.200698
+-0.127705 0.394742 0.19746
+0.043958 0.371564 0.199434
+0.033052 0.377458 0.204997
+0.018319 0.374953 0.205631
+0.000603 0.373614 0.206098
+-0.016868 0.373479 0.206475
+-0.034396 0.374215 0.20619
+-0.054615 0.37592 0.204928
+-0.075042 0.371121 0.199124
+-0.093411 0.376274 0.197875
+0.59796 0.247447 0.184612
+0.581575 0.24812 0.185859
+0.614632 0.230208 0.186422
+0.59828 0.231576 0.191203
+0.585013 0.235094 0.190099
+0.569147 0.236407 0.18633
+0.623707 0.213916 0.188975
+0.61349 0.214757 0.192665
+0.602126 0.219006 0.193118
+0.587515 0.220286 0.192229
+0.570994 0.220061 0.188493
+0.617618 0.20153 0.19274
+0.603095 0.203774 0.193476
+0.591075 0.207762 0.193024
+0.642622 0.185445 0.186136
+0.633324 0.183122 0.191042
+0.62152 0.185725 0.192308
+0.605554 0.187173 0.192103
+0.586657 0.189921 0.189313
+0.092661 0.184278 0.189505
+0.075453 0.189592 0.189805
+0.062418 0.186689 0.193301
+0.045448 0.186401 0.195361
+0.027812 0.186841 0.195807
+0.010686 0.186975 0.195975
+-0.00626 0.186975 0.195975
+-0.023274 0.186908 0.195975
+-0.040822 0.186307 0.195599
+-0.060711 0.184263 0.194753
+-0.080717 0.186022 0.189961
+-0.096064 0.183227 0.188332
+0.638972 0.173585 0.189042
+0.129136 0.169666 0.188374
+0.111938 0.168338 0.194938
+0.097281 0.165796 0.200631
+0.079206 0.172205 0.20037
+-0.073228 0.172203 0.200314
+-0.089988 0.167779 0.19923
+-0.110589 0.171497 0.191213
+-0.128355 0.166381 0.188828
+0.14619 0.153015 0.192086
+0.129056 0.152127 0.199784
+-0.104721 0.155285 0.202326
+-0.122679 0.150601 0.199817
+-0.141179 0.153145 0.191749
+0.18015 0.136136 0.187973
+0.163204 0.136136 0.195662
+0.14615 0.13584 0.203074
+-0.138852 0.139076 0.20122
+-0.159105 0.136152 0.195206
+-0.179679 0.132182 0.188981
+0.197003 0.119284 0.19006
+0.180151 0.119189 0.198564
+-0.177026 0.117855 0.198582
+-0.193613 0.118248 0.190044
+0.213102 0.103184 0.190515
+0.19672 0.10262 0.199537
+-0.19298 0.101799 0.198966
+-0.209712 0.102149 0.189589
+0.226866 0.08942 0.189187
+0.212725 0.086615 0.199051
+-0.209618 0.085297 0.197858
+-0.226564 0.085297 0.187188
+-0.226564 0.06835 0.195034
+0.248456 0.051692 0.190997
+0.234658 0.047897 0.201925
+0.214561 0.050909 0.212216
+-0.226564 0.051404 0.202173
+-0.243511 0.051404 0.191189
+0.260657 0.038871 0.18823
+0.247378 0.035123 0.199294
+-0.243511 0.034457 0.1988
+-0.260457 0.034457 0.186874
+-0.260457 0.017511 0.193543
+0.277654 0.004551 0.189167
+0.266448 -0.001001 0.200323
+0.24746 0.000806 0.211687
+-0.260457 0.000564 0.199976
+-0.277404 0.000564 0.187267
+-0.277404 -0.016382 0.192523
+0.264093 -0.033103 0.211534
+-0.277404 -0.033328 0.197309
+0.292875 -0.049611 0.194808
+-0.277404 -0.050275 0.201232
+-0.29435 -0.050208 0.187905
+0.28356 -0.063034 0.205185
+-0.29435 -0.067221 0.191974
+0.279777 -0.081851 0.210943
+-0.29435 -0.084168 0.195269
+0.312453 -0.098138 0.189281
+0.300654 -0.104865 0.200572
+0.2836 -0.104697 0.211931
+-0.29435 -0.101114 0.198093
+-0.29435 -0.118061 0.20029
+-0.311296 -0.117993 0.187356
+0.298673 -0.133823 0.206345
+-0.29435 -0.135007 0.201703
+-0.311296 -0.135007 0.189306
+0.302848 -0.147208 0.204696
+-0.29435 -0.151953 0.20335
+-0.311296 -0.151953 0.190326
+0.296532 -0.165499 0.210716
+-0.311296 -0.1689 0.191582
+0.298162 -0.185228 0.210429
+-0.311297 -0.185846 0.192758
+0.298709 -0.202726 0.210176
+-0.311229 -0.20286 0.193229
+0.298776 -0.219739 0.209705
+-0.310682 -0.220358 0.193482
+0.298776 -0.236686 0.20845
+-0.288375 -0.236326 0.208869
+-0.309168 -0.239971 0.193769
+0.298776 -0.253632 0.206959
+-0.299816 -0.254322 0.199737
+-0.315356 -0.258296 0.187749
+0.298776 -0.270578 0.205782
+-0.294055 -0.269587 0.201947
+-0.311021 -0.271533 0.189587
+0.298776 -0.287525 0.203821
+-0.290239 -0.282695 0.203319
+0.298776 -0.304471 0.201702
+0.281829 -0.304471 0.213785
+-0.29617 -0.300346 0.196696
+0.281829 -0.321418 0.210568
+-0.29401 -0.321462 0.195419
+-0.51441 -0.341224 0.212262
+-0.513769 -0.33518 0.195141
+0.281829 -0.338364 0.207037
+-0.273804 -0.342113 0.206931
+-0.290283 -0.3422 0.195025
+-0.49809 -0.357058 0.216207
+-0.497612 -0.347339 0.196338
+-0.557761 -0.341352 0.209273
+0.281829 -0.355311 0.203193
+-0.280019 -0.3532 0.200792
+-0.480629 -0.363023 0.196593
+-0.570009 -0.35669 0.217342
+0.264883 -0.372257 0.21096
+-0.280933 -0.370056 0.195233
+-0.463656 -0.379732 0.196109
+-0.578734 -0.370925 0.207651
+0.598114 -0.401064 0.191696
+0.585976 -0.394633 0.189444
+0.567458 -0.398398 0.192068
+0.264883 -0.389203 0.205782
+-0.256161 -0.389824 0.206688
+-0.275153 -0.39205 0.194067
+-0.446867 -0.396342 0.195975
+-0.587165 -0.388454 0.216763
+0.551712 -0.408647 0.19266
+0.264883 -0.40615 0.201624
+0.247936 -0.40615 0.212216
+-0.262776 -0.40378 0.199599
+-0.430212 -0.412874 0.195975
+-0.59567 -0.404777 0.207458
+0.551873 -0.424194 0.200996
+0.535837 -0.423441 0.19188
+0.247936 -0.423096 0.206331
+-0.238 -0.422858 0.207532
+-0.259689 -0.423076 0.194723
+-0.414375 -0.429374 0.196042
+-0.604021 -0.422817 0.216853
+0.616529 -0.442576 0.210383
+0.535931 -0.440137 0.199145
+0.519078 -0.440042 0.190484
+0.247936 -0.440043 0.201624
+0.23099 -0.440043 0.211588
+-0.22647 -0.439384 0.208215
+-0.242962 -0.439871 0.199153
+-0.400185 -0.444094 0.195784
+-0.612629 -0.439562 0.20764
+0.627373 -0.475531 0.214988
+0.624144 -0.45826 0.206299
+0.519078 -0.456989 0.196368
+0.502132 -0.456989 0.18813
+0.23099 -0.456989 0.204841
+-0.231211 -0.453257 0.200871
+-0.389536 -0.458419 0.195596
+-0.620731 -0.457217 0.217431
+0.519146 -0.474003 0.19964
+0.502132 -0.473935 0.192523
+0.23099 -0.473936 0.19825
+0.214043 -0.473936 0.207508
+-0.20451 -0.473865 0.207493
+-0.22717 -0.473781 0.19514
+-0.397883 -0.474738 0.212659
+-0.629161 -0.473639 0.208321
+0.633086 -0.489509 0.210042
+0.520101 -0.491383 0.200955
+0.502742 -0.490989 0.194888
+0.485477 -0.491016 0.188164
+0.214043 -0.490882 0.19982
+0.197097 -0.490882 0.20845
+-0.190313 -0.490909 0.208205
+-0.207931 -0.49147 0.199145
+-0.365707 -0.49316 0.194656
+-0.637161 -0.491083 0.217458
+0.635682 -0.502605 0.205636
+0.543686 -0.508074 0.206364
+0.523297 -0.510803 0.200161
+0.504808 -0.507945 0.195183
+0.487154 -0.508303 0.189489
+0.197097 -0.507828 0.200369
+0.180204 -0.507506 0.208421
+-0.175016 -0.507371 0.208358
+-0.192012 -0.508017 0.200149
+-0.351506 -0.504808 0.18902
+-0.362499 -0.511023 0.20004
+-0.381553 -0.509307 0.211972
+-0.645215 -0.50764 0.208715
+0.641101 -0.526332 0.195319
+0.632369 -0.51868 0.207156
+0.575979 -0.525527 0.208803
+0.556658 -0.523212 0.20524
+0.53522 -0.527858 0.199355
+0.51847 -0.528523 0.195422
+0.508091 -0.522168 0.194372
+0.18046 -0.524331 0.200064
+0.163777 -0.523491 0.20754
+-0.158809 -0.523488 0.20765
+-0.175684 -0.524546 0.199903
+-0.65077 -0.524205 0.218699
+0.637276 -0.535415 0.198592
+0.626239 -0.538082 0.203028
+0.609844 -0.540138 0.204608
+0.590202 -0.539538 0.203862
+0.569735 -0.544394 0.198551
+0.548797 -0.542035 0.196468
+0.536488 -0.54207 0.194602
+0.164576 -0.540316 0.198716
+0.150147 -0.537792 0.205472
+0.131792 -0.543556 0.20806
+-0.121114 -0.544063 0.209859
+-0.139279 -0.538975 0.206387
+-0.158392 -0.541147 0.19891
+-0.364103 -0.541685 0.203464
+0.127519 -0.561587 0.1997
+0.11592 -0.556258 0.205812
+0.098108 -0.560472 0.208096
+-0.087281 -0.560844 0.209493
+-0.10474 -0.556567 0.20706
+-0.123446 -0.558294 0.201769
+-0.362224 -0.558735 0.20029
+-0.379045 -0.558318 0.209109
+-0.654873 -0.560935 0.212844
+0.094316 -0.577756 0.199623
+0.083511 -0.57176 0.205158
+0.068025 -0.574575 0.206236
+0.049712 -0.575705 0.207322
+0.032143 -0.575655 0.208183
+0.01508 -0.575614 0.208528
+-0.001867 -0.575614 0.208528
+-0.018777 -0.575359 0.208546
+-0.035325 -0.574646 0.208589
+-0.051895 -0.574081 0.207786
+-0.07141 -0.572467 0.205968
+-0.089751 -0.575061 0.201311
+-0.360625 -0.575207 0.194749
+-0.377316 -0.574763 0.202877
+-0.632709 -0.579939 0.213011
+-0.646261 -0.571685 0.213764
+0.040699 -0.592361 0.198963
+0.023898 -0.592373 0.199522
+0.00692 -0.592561 0.199741
+-0.010143 -0.592332 0.199683
+-0.027344 -0.591327 0.199959
+-0.042116 -0.587966 0.201127
+-0.39045 -0.587068 0.203108
+-0.408356 -0.588023 0.208958
+-0.428326 -0.594767 0.210036
+-0.446523 -0.59901 0.210488
+-0.548152 -0.596916 0.214929
+-0.565394 -0.595998 0.210192
+-0.584482 -0.592016 0.212091
+-0.601367 -0.589414 0.211953
+-0.617282 -0.585671 0.21202
+-0.467537 -0.601206 0.208626
+-0.489086 -0.600236 0.212092
+-0.507103 -0.600095 0.212625
+-0.523964 -0.600281 0.211891
+-0.537885 -0.600396 0.209488
+0.062398 0.744779 0.168589
+0.0446 0.745579 0.172753
+0.026682 0.746534 0.175521
+0.009866 0.746893 0.176599
+-0.006673 0.746328 0.177666
+-0.023879 0.745927 0.178199
+-0.041498 0.745053 0.178289
+-0.059444 0.743683 0.177679
+-0.078392 0.740973 0.177092
+-0.09529 0.740806 0.172059
+0.078086 0.728431 0.175534
+0.060315 0.728698 0.182619
+-0.089963 0.730016 0.182888
+-0.10938 0.727078 0.177206
+-0.12917 0.724075 0.170734
+0.112298 0.712247 0.170275
+0.095032 0.71174 0.180024
+-0.126412 0.710734 0.181437
+-0.143298 0.711736 0.17186
+0.129284 0.695529 0.171936
+0.112325 0.695139 0.181858
+-0.142343 0.695126 0.182669
+-0.159585 0.695637 0.172864
+0.1452 0.679403 0.171764
+0.128935 0.678798 0.182277
+-0.158846 0.678488 0.182952
+-0.175953 0.678462 0.172956
+0.157749 0.665679 0.170734
+0.14461 0.662934 0.181437
+-0.175725 0.661475 0.18201
+-0.192295 0.661663 0.170605
+-0.192483 0.644757 0.17865
+0.175219 0.631788 0.17222
+0.164373 0.626252 0.183377
+0.145472 0.628015 0.1946
+-0.209241 0.628183 0.17229
+-0.209241 0.610958 0.178964
+0.159059 0.596777 0.193986
+-0.20943 0.593918 0.183821
+-0.225203 0.594706 0.169758
+0.162613 0.576693 0.193725
+-0.225793 0.577375 0.173129
+0.18966 0.558505 0.174019
+0.175446 0.555212 0.18599
+0.162761 0.558572 0.194966
+-0.225937 0.559931 0.175521
+0.177788 0.541949 0.18485
+0.162254 0.541948 0.196069
+-0.225634 0.542782 0.176283
+0.179037 0.525809 0.183767
+0.162859 0.525715 0.195489
+-0.224289 0.525365 0.176563
+0.163204 0.508957 0.194171
+-0.202628 0.510323 0.191163
+-0.221171 0.506455 0.177146
+0.163204 0.49201 0.191503
+-0.211153 0.495692 0.183625
+0.163204 0.475064 0.187345
+-0.211468 0.477304 0.178268
+0.163204 0.458117 0.183501
+0.146258 0.458117 0.194406
+-0.188351 0.454802 0.190037
+-0.205011 0.454906 0.177862
+0.146258 0.441171 0.188522
+-0.193366 0.443207 0.183595
+0.146352 0.424319 0.182999
+0.129567 0.424346 0.192248
+-0.171683 0.420634 0.188457
+0.130065 0.408031 0.185103
+-0.158062 0.406546 0.189508
+-0.176906 0.404474 0.17719
+0.116356 0.394184 0.185747
+0.098727 0.388808 0.190138
+-0.141809 0.391296 0.189666
+-0.15826 0.389371 0.180566
+0.093558 0.371419 0.182491
+0.082503 0.376304 0.189175
+0.062858 0.373942 0.194642
+-0.104167 0.371043 0.191632
+-0.122332 0.376132 0.188486
+0.060256 0.355209 0.183397
+0.049052 0.360597 0.189932
+0.032627 0.360288 0.19364
+0.013039 0.356752 0.193559
+-0.0054 0.356264 0.194523
+-0.022808 0.357434 0.19563
+-0.039498 0.357659 0.195041
+-0.056142 0.356137 0.191619
+-0.069905 0.352736 0.186923
+-0.087755 0.358247 0.187148
+-0.012241 0.340971 0.183503
+-0.027204 0.344447 0.185961
+0.583029 0.280008 0.167117
+0.601236 0.26474 0.171152
+0.583978 0.262203 0.179378
+0.56609 0.270664 0.173422
+0.548883 0.267268 0.171212
+0.612366 0.248129 0.177281
+0.568237 0.252584 0.181897
+0.551667 0.253933 0.176932
+0.535272 0.254008 0.171246
+0.552622 0.237442 0.181076
+0.535769 0.237693 0.175851
+0.518984 0.23772 0.169505
+0.553491 0.220155 0.183526
+0.536159 0.220733 0.177886
+0.519078 0.220868 0.172282
+0.059342 0.217426 0.17275
+0.039383 0.219967 0.173243
+0.022011 0.220707 0.173367
+0.005037 0.220868 0.17338
+-0.011909 0.220868 0.17338
+-0.029017 0.220707 0.173192
+-0.046124 0.219761 0.172777
+-0.060362 0.217418 0.172445
+0.642987 0.198792 0.180266
+0.63235 0.198926 0.18851
+0.576095 0.204375 0.189453
+0.555766 0.200756 0.183523
+0.536926 0.203141 0.1782
+0.519437 0.20372 0.173078
+0.11223 0.203787 0.170466
+0.094804 0.203307 0.176209
+0.077776 0.202877 0.180811
+0.065174 0.200139 0.184618
+0.050801 0.20277 0.184198
+0.033488 0.203626 0.184418
+0.016335 0.203922 0.184678
+-0.000612 0.203922 0.184678
+-0.017558 0.203922 0.184678
+-0.03467 0.203599 0.184458
+-0.052109 0.203241 0.183608
+-0.07228 0.205688 0.17842
+-0.094607 0.200626 0.177069
+-0.11203 0.199957 0.172196
+0.566147 0.186642 0.184209
+0.551507 0.183272 0.179866
+0.538308 0.185689 0.177088
+0.520845 0.186141 0.172439
+0.146258 0.186975 0.169693
+0.129244 0.186908 0.176866
+0.111911 0.186334 0.183974
+-0.107234 0.188719 0.182047
+-0.126397 0.18598 0.176941
+-0.146028 0.182951 0.171582
+0.649191 0.169518 0.181157
+0.627521 0.170766 0.189724
+0.611754 0.170587 0.188623
+0.594324 0.170758 0.186065
+0.573951 0.168019 0.181152
+0.557567 0.172698 0.1788
+0.163204 0.170029 0.173851
+0.146258 0.170029 0.182089
+-0.142481 0.169454 0.182036
+-0.158797 0.17044 0.174212
+0.658627 0.1588 0.169961
+0.648861 0.154247 0.178203
+0.637913 0.160086 0.18395
+0.620729 0.153343 0.181853
+0.603208 0.157089 0.182565
+0.180151 0.153082 0.177224
+0.163204 0.153082 0.185541
+-0.155276 0.156585 0.184944
+-0.175666 0.152592 0.178192
+-0.195984 0.148519 0.170305
+0.213949 0.13623 0.170132
+0.197097 0.136136 0.180127
+-0.193858 0.134687 0.18088
+-0.210317 0.135141 0.169944
+0.229797 0.120037 0.171136
+0.213667 0.119566 0.181571
+-0.209994 0.118813 0.180394
+0.242495 0.106367 0.17064
+0.229342 0.103702 0.181202
+-0.226564 0.102243 0.178636
+-0.243511 0.085297 0.175498
+0.262044 0.072351 0.172104
+0.25113 0.066318 0.183454
+0.230893 0.068669 0.19547
+-0.243511 0.06835 0.184285
+-0.260457 0.06835 0.170712
+-0.260457 0.051404 0.179421
+0.275999 0.03589 0.17725
+-0.277404 0.034457 0.172909
+0.26347 0.018887 0.194211
+-0.277404 0.017511 0.181068
+0.292879 0.001205 0.177775
+-0.294162 0.000524 0.173028
+0.278831 -0.013619 0.194864
+-0.293973 -0.016194 0.179782
+0.311155 -0.030186 0.172883
+0.300838 -0.036139 0.184572
+0.286076 -0.033582 0.195541
+-0.294162 -0.0331 0.184606
+-0.310043 -0.032241 0.169967
+-0.310947 -0.049504 0.173988
+0.297853 -0.06614 0.194393
+-0.311108 -0.06706 0.177926
+0.301897 -0.086664 0.195168
+-0.31092 -0.083979 0.181586
+0.325566 -0.100165 0.177667
+-0.311108 -0.100886 0.185233
+-0.326882 -0.100165 0.170756
+0.311042 -0.115398 0.194038
+-0.32744 -0.117334 0.173537
+0.314924 -0.133568 0.193415
+-0.327709 -0.134617 0.17572
+0.315718 -0.150595 0.194204
+-0.328055 -0.151725 0.176478
+0.315281 -0.168187 0.195177
+-0.328243 -0.168833 0.177157
+0.315588 -0.185712 0.195347
+-0.328243 -0.185846 0.177695
+0.315722 -0.202793 0.195112
+-0.328165 -0.202793 0.178166
+0.315722 -0.219739 0.194641
+-0.327795 -0.219874 0.178401
+0.315722 -0.236686 0.194171
+-0.327331 -0.237398 0.178231
+0.315722 -0.253632 0.193464
+-0.327689 -0.25499 0.177258
+0.315722 -0.270646 0.192613
+-0.326918 -0.272018 0.176469
+0.315534 -0.287754 0.190678
+-0.304839 -0.286128 0.192091
+-0.323146 -0.290188 0.177092
+0.315189 -0.304727 0.187544
+-0.313039 -0.300582 0.183948
+-0.529621 -0.329018 0.194097
+0.298776 -0.321418 0.198015
+-0.314541 -0.318417 0.178867
+-0.546907 -0.330483 0.191042
+-0.556773 -0.332098 0.174986
+0.298776 -0.338364 0.194171
+-0.310224 -0.339044 0.178706
+-0.560548 -0.338696 0.191523
+0.298776 -0.355378 0.189553
+-0.291018 -0.358675 0.190436
+-0.306578 -0.358886 0.177954
+-0.570847 -0.353424 0.197343
+-0.576428 -0.35866 0.178079
+0.584788 -0.378525 0.171418
+0.566577 -0.381561 0.175845
+0.54872 -0.382193 0.170952
+0.298588 -0.372486 0.185233
+0.281829 -0.372257 0.199192
+-0.297136 -0.369665 0.183716
+-0.579899 -0.36872 0.192612
+0.551517 -0.393402 0.182215
+0.535379 -0.392323 0.172152
+0.281829 -0.389203 0.1937
+-0.297081 -0.387326 0.178339
+-0.588418 -0.386242 0.196989
+-0.593408 -0.392164 0.178013
+0.611897 -0.425626 0.200287
+0.606085 -0.409303 0.189559
+0.535675 -0.407225 0.183234
+0.519213 -0.40684 0.172131
+0.281829 -0.406217 0.188141
+-0.27339 -0.409719 0.189953
+-0.290235 -0.409546 0.178089
+-0.596907 -0.40271 0.192456
+0.519078 -0.423096 0.182716
+0.502199 -0.423096 0.171822
+0.281641 -0.423325 0.183194
+0.264883 -0.423096 0.195269
+-0.278179 -0.421121 0.183574
+-0.605335 -0.420672 0.196627
+-0.609891 -0.42593 0.177329
+0.619931 -0.440584 0.195633
+0.502132 -0.440042 0.181775
+0.485051 -0.439751 0.17134
+0.264883 -0.440043 0.1886
+-0.257082 -0.443408 0.188743
+-0.387855 -0.446831 0.183241
+-0.614591 -0.439562 0.190223
+0.630716 -0.47405 0.201109
+0.62625 -0.457106 0.190306
+0.485118 -0.456922 0.179892
+0.46762 -0.456374 0.170518
+0.247936 -0.456989 0.194171
+-0.244491 -0.456893 0.190907
+-0.263226 -0.459548 0.178526
+-0.62169 -0.456199 0.199552
+0.485186 -0.473935 0.185541
+0.468105 -0.473801 0.177695
+0.45058 -0.473572 0.169309
+0.247936 -0.473936 0.186482
+-0.247285 -0.471713 0.184023
+-0.361684 -0.474191 0.179201
+-0.377992 -0.474365 0.194977
+-0.62982 -0.472496 0.190556
+0.635606 -0.490325 0.196339
+0.468306 -0.490949 0.181517
+0.451225 -0.490814 0.174949
+0.23099 -0.490882 0.189777
+-0.222531 -0.494868 0.189374
+-0.243334 -0.492718 0.17922
+-0.347476 -0.490457 0.178537
+-0.638078 -0.49024 0.199611
+0.639753 -0.509418 0.192419
+0.469262 -0.50833 0.183538
+0.451902 -0.507936 0.177471
+0.434638 -0.507963 0.17106
+0.23099 -0.507828 0.181539
+0.214043 -0.507828 0.191268
+-0.208613 -0.508676 0.19086
+-0.225239 -0.509567 0.18227
+-0.336683 -0.507228 0.178804
+-0.646365 -0.507348 0.190694
+0.492847 -0.52502 0.189339
+0.472457 -0.527749 0.183013
+0.453969 -0.524892 0.178001
+0.436234 -0.52533 0.172464
+0.214043 -0.524775 0.182559
+0.197191 -0.524681 0.19155
+-0.192577 -0.524869 0.191472
+-0.209308 -0.525219 0.183039
+-0.350372 -0.522765 0.193652
+-0.65327 -0.525013 0.200551
+0.644079 -0.538398 0.187352
+0.52514 -0.542473 0.191857
+0.505819 -0.540158 0.188294
+0.484381 -0.544805 0.182409
+0.467631 -0.54547 0.178476
+0.457252 -0.539114 0.177426
+0.197474 -0.541345 0.182512
+0.181092 -0.54078 0.190829
+-0.175657 -0.541654 0.190596
+-0.192671 -0.541721 0.182638
+-0.317764 -0.542174 0.175754
+-0.333217 -0.546074 0.184807
+-0.346798 -0.542474 0.192454
+-0.659067 -0.541932 0.190284
+0.636274 -0.54845 0.190453
+0.622375 -0.554462 0.192384
+0.605259 -0.556769 0.192485
+0.587724 -0.558534 0.190393
+0.574123 -0.562161 0.187125
+0.559045 -0.558752 0.188071
+0.539382 -0.556452 0.187046
+0.518896 -0.561274 0.181605
+0.497958 -0.558981 0.179521
+0.485649 -0.559017 0.177655
+0.181408 -0.557148 0.181579
+0.167328 -0.554544 0.189207
+0.147284 -0.558119 0.194665
+-0.14119 -0.558214 0.195146
+-0.158644 -0.558533 0.18804
+-0.175725 -0.558668 0.181304
+-0.330017 -0.55934 0.182373
+-0.34595 -0.55938 0.190546
+-0.659746 -0.55779 0.196709
+0.143851 -0.578021 0.184003
+0.13219 -0.573172 0.19036
+0.112968 -0.575806 0.19501
+-0.107149 -0.575174 0.195709
+-0.124522 -0.57544 0.189582
+-0.141765 -0.575547 0.184947
+-0.328273 -0.575197 0.178442
+-0.34439 -0.574955 0.186419
+-0.646773 -0.577356 0.198328
+-0.655051 -0.56832 0.201161
+0.110192 -0.594854 0.183862
+0.098909 -0.589384 0.190117
+0.081686 -0.589666 0.194579
+0.059728 -0.594512 0.19536
+-0.056352 -0.591118 0.197582
+-0.074231 -0.591585 0.193684
+-0.091383 -0.591633 0.1893
+-0.107993 -0.592238 0.185043
+-0.34314 -0.590534 0.180194
+-0.3568 -0.588272 0.186987
+-0.374793 -0.5927 0.192199
+-0.583267 -0.597663 0.194902
+-0.59991 -0.593631 0.195652
+-0.616677 -0.590067 0.195786
+-0.632713 -0.584653 0.196445
+0.073993 -0.608965 0.183341
+0.059151 -0.612016 0.1844
+0.048232 -0.606365 0.189318
+0.0345 -0.608558 0.188965
+0.017662 -0.609279 0.18904
+0.000554 -0.60944 0.189026
+-0.017096 -0.608852 0.189
+-0.03768 -0.606469 0.189008
+-0.058885 -0.611128 0.183698
+-0.077624 -0.605629 0.184166
+-0.395213 -0.601146 0.193129
+-0.414194 -0.605737 0.194394
+-0.432557 -0.608436 0.195038
+-0.450333 -0.610377 0.193827
+-0.466939 -0.611923 0.188084
+-0.483132 -0.607875 0.194015
+-0.500665 -0.606594 0.195683
+-0.5178 -0.606173 0.195786
+-0.534468 -0.605667 0.195694
+-0.552384 -0.602777 0.197557
+-0.56964 -0.601602 0.192149
+0.065647 0.756374 0.156179
+0.048497 0.761906 0.15634
+0.02907 0.762342 0.159454
+0.01126 0.762647 0.161067
+-0.005727 0.76262 0.161737
+-0.022669 0.762325 0.161936
+-0.039929 0.761585 0.161948
+-0.057458 0.760251 0.161858
+-0.075118 0.757241 0.161441
+-0.092305 0.753296 0.160694
+0.096048 0.744786 0.152653
+0.079264 0.744718 0.161971
+-0.108868 0.74738 0.160637
+-0.125847 0.738366 0.160254
+0.112621 0.728884 0.157568
+0.095472 0.72875 0.167453
+-0.143204 0.728149 0.159495
+0.129419 0.712543 0.160078
+-0.162421 0.713846 0.159312
+-0.180214 0.70761 0.152727
+0.146101 0.696188 0.160159
+-0.177016 0.694991 0.163355
+-0.193133 0.694579 0.151668
+0.161133 0.679712 0.159688
+-0.192739 0.678327 0.161999
+0.172299 0.662504 0.160254
+-0.208364 0.661881 0.158031
+0.161316 0.645864 0.177241
+-0.208526 0.64542 0.166449
+-0.220225 0.647864 0.154164
+0.188823 0.628818 0.160829
+-0.225969 0.630179 0.156194
+0.175091 0.614369 0.177862
+-0.225311 0.611397 0.164926
+0.17881 0.594208 0.178311
+-0.236623 0.597009 0.157625
+0.181738 0.573434 0.17884
+-0.241628 0.579371 0.156562
+0.20467 0.559567 0.159681
+-0.241045 0.560334 0.159807
+0.193132 0.542594 0.172423
+-0.240765 0.542917 0.161152
+0.194273 0.525903 0.170712
+-0.240081 0.525769 0.161455
+0.194932 0.509185 0.168477
+0.179523 0.508957 0.181618
+-0.237846 0.508325 0.161311
+0.17968 0.492077 0.178704
+-0.222594 0.488965 0.172334
+0.179994 0.475131 0.174545
+-0.230417 0.474796 0.16099
+0.179963 0.457956 0.169374
+-0.22403 0.457723 0.161544
+0.163204 0.441171 0.177224
+-0.203918 0.437167 0.17245
+0.163204 0.424225 0.170163
+-0.189762 0.425787 0.178278
+-0.208734 0.421202 0.160985
+0.146379 0.407534 0.174651
+-0.194566 0.409835 0.167195
+0.146473 0.390681 0.165519
+0.129857 0.391454 0.176779
+-0.171734 0.386479 0.170149
+0.130378 0.374632 0.165737
+0.111429 0.376497 0.177071
+-0.141325 0.373704 0.179356
+-0.157958 0.372699 0.169302
+0.099039 0.360862 0.172078
+0.079444 0.357372 0.177535
+-0.106499 0.356813 0.181543
+-0.124311 0.356892 0.174389
+-0.141832 0.356667 0.166944
+0.065647 0.343963 0.172248
+0.04844 0.344179 0.177839
+0.028416 0.340275 0.178388
+0.007743 0.336737 0.178514
+-0.040171 0.340877 0.182129
+-0.056239 0.339035 0.17858
+-0.072893 0.339165 0.176059
+-0.090176 0.339771 0.172156
+-0.10771 0.339667 0.167592
+-0.004496 0.326532 0.171814
+-0.021946 0.327399 0.172963
+0.57004 0.296606 0.154105
+0.550041 0.298125 0.1519
+0.596916 0.279021 0.16125
+0.568837 0.284506 0.166406
+0.554061 0.283368 0.163732
+0.535133 0.286882 0.154606
+0.535389 0.270413 0.164711
+0.518312 0.271613 0.15592
+0.51889 0.254572 0.164665
+0.501836 0.254868 0.156503
+0.633374 0.218116 0.177212
+0.630557 0.233955 0.16472
+0.623632 0.238113 0.174132
+0.502132 0.237814 0.162946
+0.485051 0.237949 0.155851
+0.078965 0.23768 0.153833
+0.061638 0.23694 0.15872
+0.044427 0.236295 0.161618
+0.027803 0.236779 0.162387
+0.011256 0.237559 0.162638
+-0.005633 0.237815 0.16271
+-0.022826 0.237882 0.162318
+-0.040817 0.237394 0.161317
+-0.060293 0.234311 0.160625
+-0.077029 0.234671 0.155924
+0.502226 0.220962 0.166555
+0.485531 0.221056 0.160514
+0.468647 0.220962 0.154013
+0.112365 0.220868 0.156198
+0.095284 0.220734 0.162934
+0.07788 0.220115 0.168038
+-0.071585 0.22333 0.166337
+-0.088981 0.222764 0.161635
+-0.108546 0.215105 0.161786
+0.50232 0.20411 0.167888
+0.486136 0.204822 0.162509
+0.470109 0.204688 0.157387
+0.146258 0.203922 0.155884
+0.129311 0.203922 0.164122
+-0.125373 0.207632 0.161817
+-0.142563 0.198495 0.161456
+0.650959 0.185915 0.17599
+0.503038 0.18676 0.167541
+0.48614 0.188168 0.162747
+0.472973 0.191409 0.159262
+0.180151 0.186975 0.152275
+0.163204 0.186975 0.161925
+-0.161103 0.188134 0.161078
+-0.178233 0.183015 0.155388
+0.662377 0.169038 0.162427
+0.657292 0.173322 0.171536
+0.543363 0.169594 0.174791
+0.525964 0.168822 0.170316
+0.505779 0.167261 0.16567
+0.48739 0.170692 0.161682
+0.467941 0.172899 0.156367
+0.197097 0.170029 0.155414
+0.180151 0.170029 0.165848
+-0.172716 0.172585 0.166706
+-0.190541 0.16655 0.16028
+0.588187 0.153314 0.177587
+0.573226 0.149759 0.172877
+0.55616 0.155066 0.172197
+0.535237 0.150664 0.167091
+0.5159 0.151679 0.163907
+0.501056 0.149988 0.160623
+0.490895 0.156182 0.160026
+0.214043 0.153082 0.157532
+0.197097 0.153082 0.168516
+-0.20994 0.151859 0.158783
+0.653984 0.146754 0.169064
+0.63929 0.144019 0.172785
+0.622852 0.137566 0.169599
+0.604524 0.140927 0.17137
+0.583591 0.136035 0.166534
+0.564989 0.137614 0.165502
+0.547866 0.137697 0.163075
+0.53614 0.136815 0.161273
+0.230645 0.136324 0.158881
+-0.226752 0.136015 0.157547
+0.24574 0.119943 0.159556
+-0.226658 0.119095 0.168955
+-0.243511 0.119257 0.155649
+0.257456 0.103205 0.160647
+-0.243511 0.102243 0.166319
+-0.260457 0.102243 0.152511
+0.246551 0.086547 0.177358
+-0.260457 0.085297 0.162474
+0.277159 0.069596 0.160694
+-0.277215 0.068579 0.156238
+0.266209 0.054828 0.177065
+-0.277404 0.051471 0.165052
+0.293936 0.03478 0.161706
+-0.294162 0.03482 0.157079
+0.285114 0.01844 0.177583
+-0.29435 0.017511 0.165669
+0.309749 0.00034 0.161706
+-0.31092 0.000416 0.156559
+0.30018 -0.018472 0.178594
+-0.310204 -0.016239 0.164928
+0.322905 -0.032379 0.16099
+-0.321632 -0.030051 0.157661
+0.310731 -0.047462 0.178571
+-0.327169 -0.046749 0.157063
+0.315386 -0.066966 0.178652
+-0.327732 -0.066389 0.161037
+0.321139 -0.083958 0.177937
+-0.327151 -0.083833 0.166887
+0.34005 -0.100886 0.161894
+-0.338495 -0.098069 0.158206
+0.328567 -0.117334 0.178226
+-0.343253 -0.115398 0.156985
+0.330537 -0.134617 0.178495
+-0.34263 -0.133568 0.160757
+0.331295 -0.151725 0.17884
+-0.343419 -0.150595 0.161528
+0.331739 -0.168833 0.179029
+-0.344392 -0.168187 0.16117
+0.332041 -0.185846 0.179029
+-0.344562 -0.185712 0.161634
+0.332131 -0.20286 0.178883
+-0.344326 -0.202793 0.162004
+0.332189 -0.219968 0.178674
+-0.343856 -0.219739 0.162082
+0.332068 -0.236941 0.1786
+-0.343318 -0.236753 0.162082
+0.33201 -0.253861 0.178125
+-0.342639 -0.253861 0.161894
+0.331871 -0.271291 0.177018
+-0.341881 -0.270968 0.161549
+0.330898 -0.288816 0.176047
+-0.339619 -0.288251 0.16128
+0.330409 -0.305144 0.172974
+-0.324505 -0.307378 0.172334
+-0.514348 -0.331398 0.178611
+-0.530424 -0.326326 0.177299
+-0.543052 -0.325418 0.173322
+0.31522 -0.321445 0.183584
+-0.333063 -0.321503 0.16099
+-0.497612 -0.341387 0.179001
+0.315565 -0.338431 0.178804
+-0.32805 -0.338064 0.161894
+-0.480759 -0.355568 0.179163
+-0.56719 -0.343974 0.182016
+0.586804 -0.370096 0.157402
+0.571623 -0.366142 0.156224
+0.315373 -0.356081 0.174537
+-0.324738 -0.356014 0.161732
+-0.463813 -0.370855 0.179095
+0.598002 -0.392807 0.178444
+0.59444 -0.379865 0.164662
+0.536011 -0.380003 0.160096
+0.314469 -0.37356 0.170301
+-0.308044 -0.375604 0.172418
+-0.446867 -0.386457 0.179028
+-0.446867 -0.379866 0.162082
+-0.584935 -0.375793 0.182482
+0.519962 -0.391817 0.159755
+0.298399 -0.389594 0.180522
+-0.316819 -0.389511 0.161564
+-0.42992 -0.402383 0.179028
+-0.42992 -0.394616 0.162082
+0.61426 -0.423661 0.184709
+0.608084 -0.406879 0.173454
+0.502706 -0.406786 0.159185
+0.298238 -0.406957 0.1744
+-0.310876 -0.406853 0.162842
+-0.413229 -0.418173 0.179257
+-0.413068 -0.409413 0.162243
+-0.601736 -0.409783 0.182256
+0.485253 -0.422793 0.159359
+0.297522 -0.424127 0.168499
+-0.289199 -0.42725 0.173019
+-0.39793 -0.43345 0.180198
+-0.396431 -0.423951 0.163188
+0.620758 -0.440042 0.179028
+0.46762 -0.438722 0.159063
+0.281453 -0.440231 0.175489
+-0.27492 -0.438622 0.178501
+-0.295687 -0.443653 0.163501
+-0.616333 -0.440042 0.179028
+0.631854 -0.473976 0.184919
+0.626407 -0.456989 0.173379
+0.447811 -0.455161 0.158491
+0.429601 -0.461344 0.152848
+0.264883 -0.456989 0.18201
+-0.281053 -0.455131 0.168423
+-0.360734 -0.456549 0.164493
+-0.375519 -0.458237 0.180223
+-0.622774 -0.454154 0.180726
+-0.62733 -0.459413 0.161429
+0.432988 -0.474244 0.161809
+0.41588 -0.474271 0.153596
+0.264883 -0.473936 0.17338
+-0.25934 -0.477976 0.174247
+-0.27919 -0.474786 0.16457
+-0.344175 -0.472636 0.164654
+-0.630945 -0.470399 0.175735
+0.637026 -0.491225 0.179808
+0.434118 -0.490841 0.168249
+0.41701 -0.490868 0.161078
+0.399647 -0.490613 0.153721
+0.247936 -0.490882 0.178636
+-0.26673 -0.492721 0.168064
+-0.28229 -0.493337 0.161899
+-0.32962 -0.489418 0.165613
+-0.639228 -0.488457 0.179681
+-0.643784 -0.493716 0.160383
+0.645358 -0.524478 0.182823
+0.642549 -0.508171 0.173688
+0.417561 -0.507801 0.165355
+0.400731 -0.507573 0.159886
+0.383754 -0.507761 0.152939
+0.247936 -0.507828 0.169693
+-0.239769 -0.513527 0.173739
+-0.258965 -0.512599 0.167866
+-0.27846 -0.507809 0.163759
+-0.296793 -0.503867 0.161625
+-0.317715 -0.506723 0.16762
+-0.648497 -0.507428 0.173223
+0.418212 -0.525195 0.167242
+0.401538 -0.524008 0.161993
+0.385377 -0.524008 0.157151
+0.23099 -0.524775 0.171968
+-0.225991 -0.526612 0.173979
+-0.245042 -0.530664 0.166271
+-0.263705 -0.53085 0.163742
+-0.277658 -0.525088 0.164276
+-0.291068 -0.51996 0.16416
+-0.3074 -0.523476 0.16885
+-0.328969 -0.527337 0.179878
+-0.654771 -0.524361 0.182131
+0.648514 -0.536391 0.175317
+0.441927 -0.542047 0.172392
+0.420923 -0.545272 0.16616
+0.401776 -0.541258 0.161899
+0.388321 -0.537368 0.15906
+0.214138 -0.541627 0.172643
+-0.209631 -0.542111 0.173804
+-0.226525 -0.543747 0.165983
+-0.278097 -0.542899 0.163335
+-0.296786 -0.538585 0.167622
+-0.660453 -0.541391 0.172084
+0.646103 -0.550902 0.173404
+0.474301 -0.559419 0.174911
+0.45498 -0.557105 0.171347
+0.433545 -0.562044 0.165547
+0.416721 -0.563789 0.161627
+0.40235 -0.559576 0.159877
+0.382958 -0.556047 0.155634
+0.197864 -0.55774 0.172156
+-0.192806 -0.558802 0.172528
+-0.295017 -0.558372 0.166624
+-0.312815 -0.558304 0.173656
+-0.661415 -0.557417 0.17962
+0.635198 -0.562802 0.176345
+0.619704 -0.569327 0.177392
+0.602452 -0.572396 0.177128
+0.585587 -0.573674 0.176897
+0.569739 -0.573703 0.177004
+0.553658 -0.573298 0.176489
+0.537011 -0.574947 0.173635
+0.523316 -0.578903 0.169984
+0.507987 -0.575651 0.17103
+0.488328 -0.57317 0.17018
+0.467714 -0.577843 0.164612
+0.446625 -0.575502 0.162508
+0.434541 -0.57566 0.160776
+0.183698 -0.571116 0.171124
+0.163709 -0.574424 0.178075
+-0.158778 -0.575614 0.177695
+-0.175792 -0.575682 0.169737
+-0.294309 -0.575843 0.163524
+-0.311426 -0.575453 0.170581
+-0.656613 -0.56997 0.187277
+0.160458 -0.593936 0.166571
+0.148846 -0.589658 0.173679
+0.129523 -0.592425 0.178847
+-0.124885 -0.592561 0.178793
+-0.141832 -0.592561 0.17236
+-0.158778 -0.592561 0.166554
+-0.292933 -0.592382 0.158698
+-0.310162 -0.592579 0.165005
+-0.327018 -0.591476 0.172385
+-0.599506 -0.597811 0.178772
+-0.616332 -0.593111 0.179028
+-0.63265 -0.588246 0.179656
+-0.647024 -0.580338 0.182041
+0.12773 -0.611088 0.1666
+0.115768 -0.606104 0.173486
+0.096433 -0.60861 0.177878
+-0.091239 -0.608435 0.178182
+-0.107899 -0.609279 0.171831
+-0.124885 -0.609507 0.16726
+-0.326224 -0.607661 0.16387
+-0.340459 -0.603837 0.17105
+-0.358645 -0.604976 0.176502
+-0.380378 -0.611266 0.177399
+-0.482083 -0.612095 0.176786
+-0.498339 -0.609809 0.178553
+-0.51528 -0.608959 0.179028
+-0.532299 -0.60858 0.179068
+-0.549452 -0.607696 0.179239
+-0.566645 -0.60579 0.178701
+-0.583192 -0.602039 0.178275
+0.082586 -0.622528 0.171412
+0.06765 -0.624678 0.173167
+0.049117 -0.623261 0.177119
+0.030574 -0.625822 0.176532
+0.013264 -0.626387 0.176518
+-0.003929 -0.626319 0.17635
+-0.021682 -0.626054 0.176115
+-0.039293 -0.626907 0.174119
+-0.053222 -0.630032 0.170195
+-0.071642 -0.624049 0.171018
+-0.401461 -0.616233 0.175259
+-0.42164 -0.617118 0.17841
+-0.438905 -0.617687 0.178674
+-0.455314 -0.616959 0.176881
+-0.469194 -0.615238 0.173325
+0.048968 0.774085 0.1409
+0.032742 0.777766 0.140989
+0.013788 0.777554 0.144152
+-0.003682 0.77759 0.145068
+-0.020875 0.777422 0.145001
+-0.038517 0.776973 0.144598
+-0.056243 0.774795 0.144624
+-0.07375 0.771051 0.144961
+0.098297 0.756196 0.139398
+0.079075 0.761948 0.143249
+-0.108195 0.761408 0.144759
+-0.125074 0.753472 0.144759
+0.113059 0.744564 0.142507
+-0.142155 0.744349 0.144602
+0.146265 0.726924 0.135536
+0.129872 0.728646 0.146103
+-0.159491 0.733029 0.144401
+-0.176435 0.72176 0.143224
+0.157743 0.714193 0.137543
+0.145784 0.712784 0.148324
+-0.19205 0.710176 0.141155
+-0.207092 0.696269 0.137351
+0.177374 0.679121 0.144817
+-0.208531 0.678815 0.147762
+0.188032 0.66173 0.144759
+-0.224916 0.660431 0.141647
+0.181889 0.645458 0.160637
+0.203538 0.627811 0.144947
+-0.242016 0.628283 0.138679
+0.193278 0.611339 0.161732
+-0.242005 0.608961 0.146675
+0.196568 0.593272 0.161952
+0.200913 0.57603 0.161042
+-0.255632 0.575981 0.137718
+-0.254006 0.560052 0.142923
+0.206904 0.54285 0.158787
+-0.253475 0.542984 0.144766
+0.207909 0.526159 0.15694
+-0.253004 0.525903 0.145136
+0.208951 0.509971 0.153281
+0.195896 0.49246 0.163857
+-0.234767 0.491061 0.160721
+0.196322 0.474831 0.159254
+-0.244735 0.474876 0.144759
+0.195709 0.457064 0.154566
+-0.239169 0.458091 0.144947
+0.179774 0.440915 0.163945
+-0.217835 0.43966 0.160856
+0.179774 0.423902 0.155752
+-0.225655 0.423408 0.144598
+0.163204 0.407211 0.162228
+-0.203957 0.404011 0.155549
+0.16311 0.390197 0.152127
+-0.189031 0.391964 0.160303
+0.147092 0.374403 0.154535
+-0.174572 0.373058 0.158704
+0.133842 0.361551 0.15408
+0.115964 0.356806 0.16054
+-0.158778 0.356851 0.156563
+0.096542 0.345504 0.160661
+0.079169 0.336166 0.160849
+-0.125531 0.339775 0.160529
+-0.143123 0.340994 0.152208
+0.572568 0.310417 0.138301
+0.554891 0.311729 0.138223
+0.062304 0.329377 0.16134
+0.044153 0.324499 0.162637
+0.025239 0.321007 0.163688
+0.008377 0.31683 0.163335
+-0.040288 0.323604 0.168572
+-0.057404 0.322492 0.16444
+-0.074445 0.322586 0.161726
+-0.091557 0.322707 0.158135
+-0.108903 0.322761 0.152493
+0.588639 0.289653 0.155176
+0.587015 0.299524 0.140338
+0.535281 0.303095 0.141353
+0.019389 0.303424 0.153238
+0.00458 0.302425 0.154658
+-0.007448 0.311925 0.16189
+-0.024969 0.30781 0.158859
+-0.042884 0.306119 0.155562
+0.515424 0.289336 0.142504
+0.496951 0.283551 0.137034
+0.008507 0.288079 0.148951
+-0.010514 0.291847 0.15209
+-0.031012 0.289725 0.149965
+-0.048335 0.289474 0.145786
+0.619085 0.252737 0.161365
+0.613725 0.266879 0.148906
+0.6077 0.270767 0.158531
+0.500653 0.271331 0.147756
+0.483772 0.27137 0.139032
+0.013551 0.270792 0.14816
+-0.004216 0.272137 0.149498
+-0.022319 0.272527 0.149099
+-0.040256 0.272802 0.146399
+0.484477 0.255214 0.148792
+0.465392 0.256879 0.139516
+0.446741 0.251485 0.135182
+0.081485 0.254573 0.140635
+0.064283 0.254505 0.14619
+0.047206 0.253228 0.15031
+0.033491 0.25 0.153867
+0.019415 0.253389 0.153356
+0.002531 0.254599 0.153742
+-0.014801 0.254963 0.153957
+-0.032693 0.255224 0.152646
+-0.05368 0.256427 0.148511
+-0.073432 0.24957 0.14706
+0.467665 0.238201 0.149028
+0.450073 0.237716 0.142897
+0.432804 0.237528 0.136647
+0.112845 0.237626 0.140657
+0.095983 0.237721 0.1484
+-0.090386 0.243159 0.14599
+-0.110035 0.234885 0.145396
+-0.128401 0.233149 0.139084
+0.647241 0.202529 0.167497
+0.640595 0.220002 0.158243
+0.451356 0.220774 0.148344
+0.434091 0.220747 0.143202
+0.416943 0.220949 0.137351
+0.146621 0.22068 0.140132
+0.129379 0.220868 0.148812
+-0.122562 0.222588 0.15083
+-0.142084 0.219407 0.144853
+-0.161452 0.215047 0.138796
+0.452813 0.203558 0.152108
+0.434961 0.203303 0.14628
+0.417534 0.203787 0.141662
+0.400386 0.203989 0.136058
+0.180379 0.203734 0.137331
+0.163271 0.203922 0.147557
+-0.156012 0.205073 0.150475
+-0.17378 0.200092 0.143923
+0.65752 0.185055 0.160038
+0.45747 0.187428 0.153792
+0.436845 0.183809 0.14822
+0.418238 0.186289 0.143276
+0.400812 0.186773 0.138098
+0.197097 0.186975 0.141448
+-0.192455 0.185398 0.143909
+0.446713 0.169129 0.150284
+0.431666 0.166423 0.145911
+0.419278 0.169437 0.143271
+0.402315 0.169312 0.13865
+0.214044 0.170029 0.143331
+-0.209685 0.169145 0.144129
+0.665946 0.159566 0.157248
+0.475751 0.153651 0.155089
+0.455107 0.150517 0.148785
+0.435698 0.152886 0.144893
+0.422476 0.156226 0.142671
+0.231057 0.15315 0.144553
+-0.226783 0.153113 0.143617
+0.662558 0.147991 0.158246
+0.652005 0.136943 0.157845
+0.52462 0.136433 0.159014
+0.507585 0.136813 0.156432
+0.4893 0.139199 0.153681
+0.468857 0.133624 0.146555
+0.454273 0.135201 0.144032
+0.247506 0.136365 0.145508
+-0.243501 0.13654 0.142941
+0.633802 0.129693 0.156198
+0.614419 0.128241 0.159179
+0.597594 0.126947 0.158017
+0.583776 0.12398 0.154673
+0.572674 0.126994 0.157706
+0.557867 0.124808 0.154709
+0.537879 0.1244 0.153197
+0.516882 0.120588 0.148787
+0.499883 0.125206 0.149333
+0.262493 0.119674 0.146028
+-0.260457 0.119324 0.14137
+0.275279 0.103144 0.145833
+-0.277215 0.102203 0.137331
+0.268195 0.08636 0.160794
+-0.277027 0.085485 0.147671
+0.294692 0.06878 0.145486
+-0.293097 0.069323 0.140152
+0.285573 0.052211 0.16141
+-0.293812 0.05222 0.148575
+0.310634 0.034525 0.145203
+-0.31007 0.035978 0.139637
+0.302264 0.017632 0.161706
+-0.310758 0.01826 0.148485
+0.32455 0.000524 0.144947
+-0.326882 0.001489 0.13851
+0.318017 -0.016182 0.16099
+-0.327473 -0.018701 0.146459
+0.340996 -0.050208 0.145136
+0.327307 -0.04971 0.161894
+-0.339651 -0.04698 0.141711
+0.332025 -0.067127 0.161894
+-0.34424 -0.06378 0.141531
+0.336403 -0.083979 0.161705
+-0.344406 -0.086231 0.147466
+0.342879 -0.117993 0.162082
+-0.35773 -0.119059 0.138666
+0.357696 -0.135007 0.145136
+0.345065 -0.135007 0.162082
+-0.355747 -0.133985 0.144793
+0.346399 -0.151953 0.162082
+-0.35391 -0.147289 0.149195
+0.346869 -0.1689 0.162082
+-0.35993 -0.165614 0.143007
+0.347363 -0.185981 0.161948
+-0.359643 -0.185228 0.144521
+0.347708 -0.203506 0.161719
+-0.35939 -0.202726 0.145068
+0.347271 -0.22103 0.162459
+-0.358919 -0.219739 0.145136
+0.346863 -0.237654 0.162965
+-0.357664 -0.236686 0.145136
+0.34706 -0.254439 0.161735
+-0.356173 -0.253632 0.145136
+0.347437 -0.273783 0.158944
+-0.354997 -0.270578 0.145136
+0.341653 -0.291721 0.163333
+0.343958 -0.30421 0.157087
+-0.336681 -0.305421 0.160721
+-0.514666 -0.328971 0.161691
+-0.531007 -0.323934 0.160257
+-0.546481 -0.324381 0.15906
+0.331405 -0.321224 0.16725
+-0.347276 -0.321606 0.144759
+-0.497706 -0.338128 0.162081
+-0.559541 -0.330416 0.156048
+0.33192 -0.339102 0.161338
+-0.343818 -0.338324 0.144947
+-0.480759 -0.350602 0.162082
+-0.480759 -0.347699 0.145135
+-0.56878 -0.342543 0.166891
+0.552544 -0.371114 0.15949
+0.554282 -0.359955 0.142812
+0.331479 -0.359064 0.156926
+-0.340404 -0.355311 0.145214
+-0.463813 -0.364803 0.162082
+-0.463813 -0.361115 0.145135
+-0.577777 -0.356696 0.158301
+0.523009 -0.380038 0.147951
+0.325889 -0.376519 0.157262
+-0.32145 -0.373345 0.160907
+-0.586125 -0.373777 0.16758
+0.6022 -0.390766 0.161802
+0.504805 -0.390329 0.142224
+0.314328 -0.39057 0.164998
+-0.333338 -0.389024 0.146721
+-0.594493 -0.390087 0.158418
+0.614975 -0.423096 0.167797
+0.60916 -0.406244 0.156504
+0.485827 -0.4071 0.144055
+0.314504 -0.409327 0.157546
+-0.328873 -0.405523 0.148585
+-0.602858 -0.40767 0.167446
+0.4684 -0.422051 0.1444
+0.309112 -0.426236 0.15618
+-0.304762 -0.425135 0.162962
+-0.32544 -0.42471 0.150427
+-0.379611 -0.440525 0.166379
+-0.379629 -0.425699 0.14802
+-0.610975 -0.423886 0.158503
+0.620759 -0.440042 0.162081
+0.450647 -0.435442 0.144136
+0.432988 -0.446942 0.143136
+0.297684 -0.440128 0.161116
+-0.31548 -0.441226 0.153499
+-0.330687 -0.441442 0.148732
+-0.34402 -0.432782 0.144447
+-0.361366 -0.438398 0.150517
+-0.618075 -0.440523 0.167833
+0.632034 -0.474002 0.16782
+0.626407 -0.456989 0.156432
+0.41588 -0.457795 0.14222
+0.281641 -0.456949 0.167346
+-0.292494 -0.461143 0.159659
+-0.308918 -0.459516 0.154156
+-0.324591 -0.453277 0.150513
+-0.341701 -0.452734 0.152488
+0.396684 -0.471941 0.141975
+0.37823 -0.477604 0.137233
+0.281829 -0.473868 0.158955
+-0.299108 -0.47376 0.155943
+-0.310472 -0.472829 0.153036
+-0.324535 -0.470062 0.154981
+-0.635613 -0.477471 0.165374
+0.63766 -0.491016 0.162261
+0.382068 -0.49111 0.146425
+0.364911 -0.491191 0.138878
+0.281829 -0.490882 0.152197
+0.264883 -0.490882 0.165456
+-0.292886 -0.486714 0.158654
+-0.309689 -0.486747 0.157724
+0.647501 -0.524008 0.167197
+0.643331 -0.507801 0.156428
+0.366529 -0.508016 0.146385
+0.349296 -0.507855 0.139602
+0.264883 -0.507828 0.156904
+-0.650246 -0.507949 0.162001
+0.36808 -0.525138 0.15148
+0.350228 -0.525393 0.144632
+0.332802 -0.524909 0.138681
+0.264883 -0.524775 0.149216
+0.247936 -0.524775 0.160592
+-0.656003 -0.522684 0.162692
+-0.659425 -0.527764 0.1416
+0.650349 -0.539064 0.162149
+0.372738 -0.541268 0.153725
+0.351801 -0.545064 0.147749
+0.333031 -0.542434 0.142121
+0.315789 -0.541788 0.136574
+0.247936 -0.541721 0.150706
+0.23099 -0.541721 0.161769
+-0.240999 -0.548249 0.160036
+-0.259282 -0.547622 0.159882
+-0.662139 -0.542474 0.154326
+0.650993 -0.551744 0.156995
+0.361786 -0.559784 0.150146
+0.346026 -0.563332 0.145822
+0.332829 -0.560026 0.14285
+0.316053 -0.559031 0.138087
+0.231245 -0.558547 0.151193
+0.214393 -0.558453 0.161674
+-0.210255 -0.559667 0.163803
+-0.228183 -0.561244 0.156678
+-0.247871 -0.564277 0.154358
+-0.264722 -0.564427 0.156458
+-0.278016 -0.560276 0.160853
+-0.662106 -0.557926 0.162252
+0.64635 -0.565659 0.156677
+0.633379 -0.577257 0.16013
+0.423429 -0.576341 0.158337
+0.406909 -0.576366 0.155494
+0.389277 -0.575511 0.152731
+0.369573 -0.577937 0.148357
+0.350893 -0.576996 0.144864
+0.334206 -0.576784 0.14192
+0.317156 -0.576488 0.137907
+0.215223 -0.575288 0.150193
+0.197917 -0.574767 0.160756
+-0.193178 -0.576452 0.161079
+-0.212914 -0.579952 0.151861
+-0.234069 -0.57841 0.149087
+-0.249262 -0.580864 0.148721
+-0.262443 -0.577851 0.152654
+-0.277995 -0.576636 0.157452
+-0.657131 -0.571503 0.170716
+0.61678 -0.583656 0.159133
+0.597714 -0.584935 0.16136
+0.580095 -0.585363 0.162569
+0.565405 -0.583905 0.165483
+0.551775 -0.587206 0.161472
+0.535105 -0.589816 0.159604
+0.51859 -0.590317 0.159372
+0.501788 -0.589741 0.159594
+0.485418 -0.590988 0.157238
+0.471789 -0.59508 0.152689
+0.455816 -0.591752 0.153524
+0.435818 -0.588742 0.153213
+0.415499 -0.592537 0.148806
+0.396771 -0.590873 0.147913
+0.379667 -0.59126 0.14543
+0.368285 -0.591982 0.14364
+0.178555 -0.589167 0.160897
+-0.1759 -0.592924 0.157758
+-0.244357 -0.594099 0.144364
+-0.260725 -0.593579 0.147648
+-0.276569 -0.592292 0.152807
+-0.615919 -0.595521 0.162202
+-0.632198 -0.590129 0.162714
+-0.64684 -0.582441 0.16504
+0.166131 -0.604306 0.155528
+0.146873 -0.608147 0.160952
+-0.141832 -0.609507 0.160435
+-0.158845 -0.609575 0.152791
+-0.274809 -0.608312 0.146617
+-0.288703 -0.605613 0.152021
+-0.306632 -0.611054 0.154848
+-0.481244 -0.614146 0.160364
+-0.49776 -0.611095 0.161602
+-0.514653 -0.609822 0.162081
+-0.531599 -0.609508 0.162081
+-0.548519 -0.609374 0.162243
+-0.565376 -0.608031 0.16231
+-0.582219 -0.605287 0.161987
+-0.599094 -0.600488 0.161947
+0.133363 -0.621837 0.155302
+0.115821 -0.622863 0.160844
+0.09691 -0.630689 0.160281
+-0.090606 -0.625879 0.165223
+-0.107939 -0.626387 0.158832
+-0.125114 -0.626265 0.152831
+-0.324061 -0.621724 0.15257
+-0.344792 -0.620901 0.157722
+-0.367618 -0.62081 0.161535
+-0.386591 -0.623049 0.160369
+-0.401849 -0.624805 0.156772
+-0.415866 -0.623332 0.160898
+-0.432023 -0.622507 0.162754
+-0.448011 -0.621124 0.162503
+-0.464648 -0.617856 0.16062
+0.080274 -0.637205 0.159823
+0.063368 -0.640336 0.160683
+0.045857 -0.641999 0.161342
+0.028395 -0.643187 0.161455
+0.011314 -0.6434 0.161455
+-0.005722 -0.643333 0.161253
+-0.022794 -0.643521 0.160719
+-0.039333 -0.644086 0.159574
+-0.056095 -0.643646 0.158187
+-0.0737 -0.642826 0.154811
+0.033052 0.789122 0.124116
+0.018386 0.789756 0.126554
+0.000895 0.790067 0.127826
+-0.016392 0.790098 0.128122
+-0.033993 0.789733 0.12749
+-0.054164 0.788898 0.125226
+0.081278 0.774005 0.125363
+0.060171 0.76755 0.145921
+0.062303 0.77903 0.128119
+-0.091154 0.767745 0.14488
+-0.090109 0.779489 0.127843
+-0.107576 0.773472 0.128014
+0.110905 0.76046 0.124426
+-0.141576 0.758384 0.12831
+0.150207 0.735044 0.122794
+0.132473 0.743696 0.128335
+-0.158496 0.747828 0.128404
+-0.174685 0.736645 0.128835
+0.161381 0.722445 0.125739
+-0.190031 0.72528 0.12807
+0.168837 0.708989 0.130588
+-0.204397 0.712195 0.126051
+0.16327 0.6981 0.144762
+-0.215794 0.699979 0.123318
+0.192258 0.678341 0.128539
+-0.223265 0.682186 0.128818
+-0.235266 0.666026 0.12459
+0.2102 0.644528 0.128189
+0.197234 0.644784 0.144759
+-0.231715 0.642343 0.144866
+-0.241915 0.647399 0.12804
+-0.253715 0.628506 0.121519
+0.221105 0.610635 0.128189
+0.208238 0.610635 0.145136
+-0.252571 0.613868 0.130567
+0.212217 0.593554 0.144979
+-0.247898 0.590718 0.146138
+-0.259226 0.593 0.127332
+0.215445 0.576675 0.144665
+0.218045 0.559796 0.144273
+0.219254 0.542944 0.143551
+0.220101 0.526656 0.142139
+0.220801 0.512616 0.139388
+-0.251289 0.508889 0.145136
+0.212895 0.493896 0.145517
+-0.248853 0.491782 0.144947
+-0.260536 0.49201 0.128189
+0.211804 0.472002 0.14134
+-0.256613 0.475064 0.128189
+0.20678 0.45427 0.140877
+0.195558 0.440245 0.147875
+-0.233049 0.440875 0.144947
+0.195198 0.422782 0.138981
+0.179451 0.40639 0.146994
+-0.216474 0.406305 0.143882
+0.178024 0.38896 0.137169
+-0.205695 0.390051 0.143882
+0.16231 0.373475 0.141108
+-0.191216 0.373596 0.144205
+0.146594 0.358833 0.142311
+-0.17559 0.357138 0.14352
+0.13028 0.347579 0.143661
+0.112966 0.337308 0.144665
+-0.15968 0.342097 0.142208
+0.580822 0.311816 0.129103
+0.536658 0.317526 0.125409
+0.095086 0.32731 0.145157
+0.077279 0.318568 0.146489
+-0.128505 0.322918 0.143547
+-0.146416 0.33026 0.139315
+0.602281 0.282065 0.146765
+0.51867 0.306999 0.126862
+0.500464 0.296697 0.126495
+0.073862 0.303029 0.137686
+0.059769 0.311477 0.148237
+0.039857 0.303175 0.149188
+-0.059982 0.30572 0.151877
+-0.076897 0.305815 0.14835
+-0.093561 0.306433 0.144943
+-0.110033 0.30633 0.138364
+0.481785 0.286374 0.126049
+0.465012 0.281751 0.120888
+0.059324 0.290605 0.138877
+0.041665 0.284231 0.142679
+0.026131 0.286738 0.146105
+-0.065084 0.289145 0.142507
+-0.082395 0.289804 0.138801
+-0.097299 0.293382 0.13548
+0.470178 0.273688 0.131475
+0.452395 0.268916 0.12555
+0.069865 0.271744 0.136553
+0.05191 0.270722 0.141637
+0.032701 0.267568 0.146151
+-0.055314 0.275403 0.142679
+-0.072575 0.270452 0.139297
+-0.094926 0.276014 0.131674
+0.632266 0.237242 0.14995
+0.62395 0.253959 0.141401
+0.430455 0.255947 0.125005
+0.411913 0.252067 0.119931
+0.114512 0.253958 0.125163
+0.097987 0.25386 0.134076
+-0.087345 0.259128 0.137825
+-0.1063 0.257233 0.131658
+-0.125512 0.247803 0.129001
+0.415315 0.237955 0.130052
+0.395666 0.239584 0.121502
+0.378011 0.233586 0.118949
+0.148225 0.236393 0.122626
+0.130243 0.237563 0.132074
+-0.142297 0.238807 0.127678
+-0.159042 0.228819 0.127097
+0.650562 0.203947 0.150076
+0.64298 0.221253 0.140379
+0.399441 0.2212 0.131391
+0.381997 0.220595 0.125793
+0.36535 0.220088 0.120337
+0.181522 0.219071 0.120929
+0.164159 0.220169 0.131056
+-0.175791 0.217672 0.126936
+0.383278 0.203962 0.130635
+0.366305 0.2038 0.125717
+0.349386 0.203962 0.119573
+0.197353 0.203388 0.125715
+-0.19246 0.202713 0.127651
+0.665409 0.172536 0.147339
+0.664132 0.183672 0.132521
+0.659461 0.189882 0.143419
+0.383574 0.186908 0.133424
+0.366561 0.186975 0.128268
+0.349614 0.186975 0.123326
+0.214043 0.186975 0.128111
+-0.209846 0.186535 0.127991
+0.384292 0.169446 0.134032
+0.36704 0.170082 0.129557
+0.350179 0.170123 0.125444
+0.333394 0.170284 0.120087
+0.231124 0.17032 0.129848
+-0.228335 0.169502 0.127653
+-0.238092 0.164611 0.122771
+0.673458 0.14972 0.130507
+0.669517 0.154954 0.144245
+0.40794 0.152823 0.138192
+0.387149 0.149554 0.132729
+0.368404 0.153213 0.129242
+0.352116 0.153849 0.125865
+0.335371 0.153432 0.121701
+0.248609 0.153912 0.131137
+-0.243041 0.15491 0.127451
+0.665334 0.139204 0.140498
+0.441822 0.135839 0.141272
+0.421486 0.138305 0.137337
+0.399721 0.132828 0.131654
+0.382807 0.131208 0.127977
+0.369041 0.135872 0.126854
+0.355791 0.140295 0.125289
+0.283071 0.138422 0.122729
+0.265053 0.137131 0.132621
+-0.26038 0.13654 0.127081
+0.648763 0.127061 0.139916
+0.633421 0.121878 0.140866
+0.620408 0.121322 0.144992
+0.606695 0.121055 0.147912
+0.592296 0.117942 0.144181
+0.572476 0.116058 0.144504
+0.486292 0.121103 0.143272
+0.472612 0.11647 0.136692
+0.455194 0.120818 0.136271
+0.434137 0.117185 0.130961
+0.413306 0.119035 0.128682
+0.401051 0.118739 0.126883
+0.29417 0.124499 0.123977
+0.279691 0.120763 0.133242
+-0.277403 0.11919 0.125275
+0.551183 0.111502 0.140002
+0.531201 0.109869 0.139278
+0.516103 0.107441 0.136705
+0.5021 0.112329 0.139377
+-0.294162 0.101799 0.120922
+0.286268 0.086171 0.145472
+-0.293258 0.085439 0.131851
+0.312238 0.068898 0.130401
+-0.304957 0.071354 0.126516
+0.303024 0.051605 0.145427
+-0.310337 0.054238 0.129846
+0.325677 0.034269 0.1287
+-0.322129 0.037994 0.124896
+0.318457 0.017444 0.145136
+-0.327053 0.020415 0.128873
+-0.33814 0.004048 0.123415
+0.342947 -0.016382 0.128189
+0.331304 -0.016194 0.144759
+-0.343064 -0.013903 0.1252
+0.337226 -0.0331 0.144947
+-0.33293 -0.03599 0.147394
+-0.344448 -0.035629 0.131472
+0.357461 -0.067221 0.128189
+0.345614 -0.067221 0.145136
+-0.356146 -0.06368 0.124797
+0.349929 -0.084168 0.145136
+-0.360297 -0.081826 0.125201
+0.353381 -0.101114 0.145136
+-0.349754 -0.104699 0.146768
+-0.361201 -0.104072 0.130179
+0.356049 -0.118061 0.145136
+0.359109 -0.151953 0.145136
+0.359826 -0.168967 0.145068
+-0.374232 -0.169421 0.122214
+0.360449 -0.186465 0.144521
+-0.372573 -0.185483 0.126669
+0.37458 -0.202214 0.122271
+0.361935 -0.206078 0.143007
+-0.3721 -0.202658 0.127898
+0.357596 -0.224242 0.149638
+-0.371629 -0.219739 0.128189
+0.359068 -0.237587 0.146714
+0.360043 -0.254022 0.144091
+0.361769 -0.269883 0.138828
+0.353641 -0.28734 0.148862
+-0.352968 -0.287592 0.145136
+0.355948 -0.300393 0.14186
+-0.350845 -0.3047 0.144947
+-0.362999 -0.304471 0.128189
+-0.514922 -0.327321 0.144328
+-0.532675 -0.321055 0.141085
+-0.527244 -0.319351 0.123444
+-0.550676 -0.322493 0.142804
+-0.541283 -0.318048 0.126646
+0.348439 -0.319601 0.147042
+-0.359782 -0.321418 0.128189
+-0.497773 -0.335875 0.145068
+-0.561589 -0.329564 0.141262
+0.58352 -0.360584 0.139891
+0.582405 -0.352187 0.126793
+0.568392 -0.354679 0.139154
+0.573936 -0.349386 0.126665
+0.558266 -0.349858 0.126302
+0.347592 -0.341782 0.142012
+-0.356801 -0.338364 0.128268
+-0.569877 -0.340934 0.14913
+0.595243 -0.37582 0.150848
+0.536889 -0.369104 0.14493
+0.538695 -0.357601 0.125567
+0.343621 -0.359091 0.141065
+-0.446867 -0.374923 0.145135
+-0.578584 -0.355269 0.139971
+0.337073 -0.370818 0.14628
+-0.336786 -0.372391 0.145544
+-0.430014 -0.388135 0.145229
+-0.586838 -0.372485 0.149645
+0.60312 -0.389674 0.145218
+0.486083 -0.394813 0.127668
+0.331658 -0.389913 0.144784
+-0.348422 -0.388003 0.132559
+-0.413351 -0.401069 0.145571
+-0.413562 -0.394785 0.129295
+-0.595268 -0.388907 0.140535
+0.61511 -0.423096 0.150784
+0.609461 -0.406149 0.139486
+0.46949 -0.407369 0.128068
+0.327348 -0.408442 0.14241
+-0.345473 -0.4039 0.136627
+-0.396875 -0.413673 0.146455
+-0.397116 -0.404555 0.130854
+-0.603504 -0.406445 0.149735
+0.451858 -0.420246 0.127745
+0.434346 -0.431779 0.127961
+0.320603 -0.419964 0.146709
+-0.341309 -0.417685 0.141645
+-0.36161 -0.417686 0.135704
+-0.611935 -0.422867 0.140625
+0.620759 -0.440042 0.145135
+0.417198 -0.441766 0.127844
+0.315678 -0.437101 0.144126
+-0.620036 -0.440523 0.150416
+0.632056 -0.473935 0.150784
+0.626407 -0.456989 0.139486
+0.399768 -0.451984 0.127893
+0.381974 -0.461777 0.128241
+0.316156 -0.457245 0.137612
+0.298655 -0.456555 0.152228
+-0.62857 -0.457496 0.141319
+0.362737 -0.47264 0.129025
+0.343064 -0.475445 0.127663
+0.328095 -0.478717 0.129653
+0.315349 -0.475298 0.134634
+0.298816 -0.47403 0.145203
+-0.636737 -0.475375 0.150553
+0.637705 -0.490882 0.145135
+0.347723 -0.490949 0.133251
+0.330736 -0.491742 0.131032
+0.314771 -0.491783 0.133182
+0.298654 -0.491137 0.140059
+-0.644868 -0.491671 0.141557
+0.64824 -0.524331 0.150968
+0.643354 -0.507828 0.139486
+0.332193 -0.507855 0.134545
+0.315376 -0.508017 0.132897
+0.298681 -0.507922 0.137134
+0.281829 -0.507828 0.145372
+-0.651779 -0.50847 0.150483
+0.315722 -0.524775 0.13478
+0.298775 -0.524775 0.134388
+0.281829 -0.524775 0.139331
+0.651549 -0.540336 0.146408
+0.298775 -0.541721 0.133603
+0.281829 -0.541721 0.135329
+0.264883 -0.541721 0.141213
+-0.663788 -0.545646 0.139582
+0.652485 -0.555582 0.143227
+0.298842 -0.558735 0.134052
+0.281829 -0.558668 0.132191
+0.264883 -0.558668 0.135173
+0.24803 -0.558574 0.141888
+-0.662386 -0.558522 0.144879
+0.651778 -0.568552 0.138882
+0.299389 -0.576233 0.133839
+0.281963 -0.575748 0.131048
+0.264977 -0.57552 0.13125
+0.248313 -0.575238 0.134933
+0.231985 -0.574915 0.141437
+-0.656838 -0.572313 0.153088
+0.644672 -0.580313 0.140589
+0.630341 -0.58816 0.144219
+0.620215 -0.591807 0.144761
+0.608559 -0.593487 0.144526
+0.590195 -0.595193 0.145162
+0.569114 -0.595534 0.147965
+0.357049 -0.592458 0.141365
+0.339935 -0.592983 0.138328
+0.321976 -0.593424 0.135576
+0.301665 -0.596042 0.131938
+0.28282 -0.593273 0.129602
+0.265676 -0.592372 0.12875
+0.249088 -0.591565 0.129915
+0.232829 -0.591184 0.133936
+0.218812 -0.589145 0.140093
+0.200245 -0.594385 0.145826
+-0.193228 -0.594667 0.148559
+-0.207999 -0.59874 0.141793
+-0.226038 -0.59691 0.141592
+-0.614323 -0.596978 0.145404
+-0.630382 -0.591306 0.146179
+-0.645441 -0.583539 0.147475
+0.548565 -0.600022 0.142927
+0.529841 -0.6011 0.144885
+0.512615 -0.601628 0.145556
+0.497556 -0.600743 0.147784
+0.484098 -0.604766 0.142918
+0.465292 -0.607112 0.139573
+0.446196 -0.603432 0.141897
+0.428676 -0.603341 0.140192
+0.414284 -0.605469 0.137618
+0.403591 -0.601796 0.140874
+0.388891 -0.604156 0.137798
+0.369288 -0.604722 0.1361
+0.348997 -0.609605 0.131848
+0.329919 -0.608899 0.130656
+0.312359 -0.610316 0.128528
+0.297931 -0.613997 0.126119
+0.284586 -0.610865 0.126208
+0.267747 -0.609547 0.125576
+0.250555 -0.608189 0.126146
+0.236205 -0.604934 0.128398
+0.195996 -0.612593 0.134624
+0.180925 -0.607995 0.145026
+-0.176057 -0.61052 0.144288
+-0.194853 -0.614479 0.135095
+-0.215399 -0.612526 0.134031
+-0.230363 -0.613251 0.134728
+-0.240404 -0.607472 0.138515
+-0.257042 -0.611336 0.140076
+-0.478927 -0.61456 0.141688
+-0.497437 -0.6114 0.144328
+-0.514586 -0.610035 0.145068
+-0.531505 -0.609508 0.145229
+-0.548102 -0.609374 0.145579
+-0.564152 -0.60871 0.14613
+-0.580184 -0.606603 0.145834
+-0.597251 -0.602133 0.14496
+0.164251 -0.618908 0.143943
+0.147251 -0.628263 0.143714
+-0.142087 -0.626077 0.146763
+-0.159007 -0.626306 0.138494
+-0.225904 -0.626573 0.127286
+-0.243989 -0.624138 0.131457
+-0.26084 -0.628508 0.132674
+-0.271872 -0.622532 0.138168
+-0.289378 -0.623381 0.142137
+-0.310302 -0.630429 0.141595
+-0.360127 -0.629885 0.147786
+-0.375994 -0.630478 0.145091
+-0.396032 -0.629898 0.141066
+-0.414006 -0.626697 0.14375
+-0.430203 -0.624625 0.146103
+-0.443118 -0.623065 0.149638
+-0.458461 -0.619524 0.145619
+0.130489 -0.635632 0.143882
+0.113172 -0.641652 0.144598
+0.095898 -0.647706 0.144602
+-0.091248 -0.642889 0.149442
+-0.108746 -0.642862 0.143623
+-0.126064 -0.642147 0.137838
+-0.331123 -0.635117 0.139121
+-0.349084 -0.634168 0.140768
+0.078947 -0.652967 0.144634
+0.06175 -0.656872 0.144912
+0.044418 -0.658668 0.145095
+0.027377 -0.659533 0.145257
+0.010592 -0.660002 0.14523
+-0.00626 -0.660268 0.145057
+-0.02318 -0.660441 0.144723
+-0.040324 -0.660311 0.143739
+-0.057942 -0.659665 0.141903
+-0.075359 -0.658892 0.138611
+0.065343 0.789557 0.108708
+0.043873 0.783587 0.130095
+0.047338 0.792198 0.112978
+-0.072549 0.784634 0.127757
+-0.07027 0.793554 0.113322
+-0.087748 0.791058 0.109072
+0.115973 0.769158 0.106805
+0.092733 0.767034 0.129371
+0.096274 0.777037 0.110387
+-0.124724 0.767628 0.128216
+-0.123683 0.7786 0.111058
+-0.140639 0.770251 0.111713
+0.130213 0.758491 0.11018
+-0.157518 0.761056 0.11165
+-0.187021 0.737357 0.115773
+-0.200329 0.727456 0.112212
+0.193878 0.694507 0.112144
+0.179939 0.695531 0.129183
+0.204645 0.677493 0.112009
+-0.236497 0.679897 0.110889
+0.202558 0.661381 0.128283
+0.22178 0.644434 0.111337
+-0.254813 0.645063 0.108943
+0.217025 0.627582 0.128189
+0.224557 0.593689 0.128189
+-0.271328 0.593626 0.105584
+0.238365 0.576743 0.111243
+0.22746 0.576743 0.128189
+-0.26559 0.572805 0.122797
+-0.27202 0.576433 0.109009
+0.229735 0.559796 0.128111
+-0.264757 0.559083 0.126109
+-0.272997 0.559177 0.109853
+0.23074 0.542971 0.127541
+-0.264255 0.542823 0.127714
+-0.273073 0.542661 0.110897
+0.231053 0.526082 0.126297
+-0.26391 0.525903 0.128189
+-0.272775 0.525903 0.111242
+0.229665 0.506483 0.124955
+-0.262968 0.508957 0.128189
+-0.271991 0.508957 0.111242
+0.223147 0.487846 0.130588
+-0.270265 0.49201 0.111243
+0.224802 0.47443 0.123431
+0.217227 0.460303 0.130284
+-0.251984 0.458117 0.128189
+0.211808 0.440374 0.12712
+-0.246775 0.441265 0.128283
+-0.256849 0.441547 0.111619
+0.20589 0.419572 0.123537
+-0.238808 0.424413 0.12831
+0.1943 0.403139 0.128145
+-0.230104 0.407278 0.127961
+0.18771 0.385651 0.123226
+-0.219362 0.390305 0.12784
+0.17604 0.372484 0.125827
+-0.206659 0.373771 0.128189
+0.160479 0.357364 0.127299
+-0.191945 0.35762 0.128205
+0.568106 0.320661 0.123298
+0.573577 0.325464 0.106707
+0.551288 0.324031 0.121668
+0.558966 0.330396 0.108011
+0.539841 0.329897 0.106879
+0.144465 0.343567 0.128557
+-0.175913 0.342379 0.127609
+0.520827 0.320639 0.109853
+0.128522 0.332568 0.128981
+0.111974 0.320688 0.129181
+-0.143415 0.317345 0.127102
+-0.15968 0.329241 0.126988
+0.602765 0.289489 0.126279
+0.597169 0.301239 0.114501
+0.591218 0.305023 0.125037
+0.485199 0.300234 0.111189
+0.092983 0.306773 0.130716
+-0.126858 0.30425 0.127459
+0.614515 0.270679 0.133892
+0.451667 0.284825 0.109444
+0.080109 0.288246 0.130322
+-0.110837 0.289814 0.127688
+-0.1294 0.285237 0.115523
+0.434154 0.274989 0.110159
+0.416193 0.266376 0.109615
+0.116579 0.271285 0.112132
+0.102193 0.267273 0.123192
+0.087556 0.270581 0.129192
+-0.112829 0.27486 0.123931
+-0.125992 0.265406 0.118767
+0.634215 0.238267 0.13213
+0.625742 0.255213 0.12359
+0.398482 0.258778 0.108747
+0.378697 0.249926 0.108284
+0.361101 0.248038 0.103094
+0.151906 0.247412 0.10717
+0.13416 0.254703 0.112622
+-0.141437 0.254851 0.115074
+0.36419 0.23572 0.112847
+0.348106 0.237087 0.104884
+0.184831 0.229369 0.106374
+0.16747 0.235232 0.111527
+-0.174707 0.234093 0.111033
+0.654335 0.203821 0.128606
+0.648532 0.217876 0.114207
+0.643851 0.223941 0.125116
+0.348717 0.220999 0.114063
+0.329821 0.222987 0.105219
+0.31117 0.217592 0.10102
+0.197998 0.218264 0.109743
+-0.192205 0.219642 0.11092
+0.332093 0.204308 0.113655
+0.314501 0.203824 0.108466
+0.297299 0.204196 0.10281
+0.214138 0.203263 0.112482
+-0.209618 0.203776 0.111243
+0.332695 0.187136 0.11817
+0.315838 0.187204 0.112826
+0.298928 0.187553 0.109522
+0.281797 0.18988 0.105308
+0.248071 0.189934 0.10537
+0.231057 0.187513 0.115446
+-0.226891 0.186889 0.111502
+0.671848 0.166781 0.127647
+0.317125 0.17093 0.115917
+0.301097 0.171221 0.113104
+0.283855 0.172369 0.111815
+0.265712 0.178547 0.109719
+0.248609 0.172114 0.118114
+0.318443 0.154387 0.117986
+0.30501 0.157843 0.115071
+0.29006 0.155378 0.115982
+0.268898 0.157394 0.119651
+-0.260371 0.153409 0.111973
+0.672441 0.138602 0.121442
+0.340657 0.136875 0.121795
+0.322361 0.136691 0.119004
+0.302706 0.140401 0.118443
+-0.277403 0.13627 0.11131
+0.660828 0.128203 0.1253
+0.64902 0.121849 0.124337
+0.63705 0.119693 0.128212
+0.624553 0.118304 0.132311
+0.607299 0.115198 0.131401
+0.390065 0.117804 0.124425
+0.372963 0.118234 0.12188
+0.352884 0.121682 0.120448
+0.330229 0.116758 0.118505
+0.309817 0.120444 0.120745
+-0.29435 0.119055 0.109102
+0.584372 0.109619 0.125683
+0.564475 0.106345 0.128051
+0.552931 0.103769 0.127757
+0.541185 0.101798 0.126466
+0.523835 0.099665 0.125375
+0.506539 0.100321 0.12612
+0.486946 0.105013 0.128545
+0.467456 0.104799 0.125723
+0.450607 0.104332 0.123693
+0.438031 0.100816 0.120162
+0.423388 0.10303 0.120237
+0.403573 0.104766 0.119251
+0.383157 0.099797 0.114605
+0.36203 0.101695 0.114648
+0.343321 0.101749 0.114841
+0.329035 0.098771 0.116227
+0.315081 0.102064 0.121552
+0.295198 0.105655 0.130691
+-0.311296 0.101705 0.104698
+0.335242 0.088046 0.114181
+0.32141 0.085602 0.120319
+0.304294 0.085888 0.131211
+-0.311296 0.082461 0.114277
+0.320135 0.051723 0.129428
+-0.329125 0.048385 0.111081
+0.342978 0.01661 0.112341
+0.331775 0.017255 0.128377
+-0.344239 0.01448 0.10975
+0.338302 0.00047 0.128283
+-0.355903 -0.015967 0.106721
+0.358716 -0.033328 0.111243
+0.348596 -0.033328 0.128189
+-0.354447 -0.029848 0.115179
+0.353852 -0.050275 0.128189
+-0.350006 -0.052455 0.130873
+-0.36086 -0.050311 0.112977
+0.36107 -0.084168 0.128189
+-0.373244 -0.08426 0.105269
+0.374015 -0.101114 0.111243
+0.364208 -0.101114 0.128189
+-0.372512 -0.100801 0.111627
+0.36719 -0.118061 0.128189
+-0.368191 -0.121413 0.12433
+-0.372646 -0.115154 0.115036
+0.369073 -0.135007 0.128189
+-0.367774 -0.135472 0.127432
+-0.378452 -0.132813 0.108937
+0.370092 -0.151953 0.128189
+-0.36579 -0.151277 0.133507
+-0.378937 -0.154654 0.112518
+0.3709 -0.169034 0.127898
+0.372318 -0.186209 0.126669
+0.368207 -0.220317 0.134107
+0.370061 -0.236296 0.129234
+-0.370217 -0.236686 0.128189
+0.370875 -0.252731 0.126611
+-0.368805 -0.253632 0.128189
+-0.379632 -0.253632 0.111243
+0.371861 -0.266048 0.12352
+-0.366922 -0.270578 0.128189
+-0.377278 -0.270578 0.111243
+0.366616 -0.284083 0.128941
+-0.365274 -0.287525 0.128189
+-0.375317 -0.287525 0.111243
+0.365255 -0.306406 0.125735
+-0.373434 -0.304471 0.111243
+-0.514343 -0.325474 0.12683
+0.358718 -0.325582 0.130911
+-0.480759 -0.345973 0.128189
+-0.497746 -0.334532 0.12796
+-0.55571 -0.322871 0.127544
+0.360373 -0.339055 0.123508
+-0.463813 -0.358448 0.128189
+-0.569593 -0.337459 0.128991
+-0.573978 -0.341478 0.108307
+0.59603 -0.373541 0.134234
+0.589281 -0.359289 0.123595
+0.522642 -0.361694 0.113611
+0.353267 -0.352986 0.130584
+-0.354039 -0.355216 0.128785
+-0.446867 -0.371785 0.128189
+-0.5802 -0.354843 0.122276
+0.518153 -0.372683 0.13005
+0.499667 -0.382682 0.124295
+0.504883 -0.371607 0.108791
+0.348945 -0.371722 0.12853
+-0.351795 -0.371821 0.130162
+-0.36456 -0.37128 0.115487
+-0.429991 -0.383616 0.128436
+-0.587797 -0.371467 0.131767
+0.603596 -0.389203 0.128228
+0.472726 -0.396475 0.114156
+0.344489 -0.390667 0.12671
+-0.362879 -0.386841 0.120138
+-0.595914 -0.387683 0.122824
+0.61511 -0.423096 0.133837
+0.609461 -0.40615 0.12254
+0.454637 -0.40594 0.108509
+0.338108 -0.402253 0.132078
+-0.359497 -0.400239 0.126913
+-0.382732 -0.413344 0.134694
+-0.378829 -0.399955 0.119773
+-0.604279 -0.405266 0.131852
+0.418288 -0.428428 0.112207
+0.333587 -0.419398 0.13131
+-0.612661 -0.421656 0.122636
+0.620759 -0.440042 0.128188
+0.401319 -0.435632 0.112992
+0.384206 -0.444321 0.114819
+0.333806 -0.440106 0.127484
+-0.621042 -0.439535 0.132004
+0.632056 -0.473935 0.133837
+0.626407 -0.456989 0.12254
+0.36742 -0.452998 0.118478
+0.352497 -0.460796 0.122752
+0.334712 -0.461004 0.126544
+-0.629576 -0.456508 0.122908
+-0.637599 -0.474164 0.132699
+0.637705 -0.490882 0.128188
+-0.645906 -0.490653 0.123678
+0.648375 -0.52468 0.134371
+0.643354 -0.507828 0.12254
+-0.653413 -0.508389 0.132806
+-0.660037 -0.525107 0.121961
+0.652343 -0.541412 0.130053
+-0.663655 -0.541684 0.126637
+0.654299 -0.558034 0.126468
+-0.662798 -0.556785 0.128516
+0.657248 -0.578051 0.106505
+0.653641 -0.575689 0.123372
+-0.654957 -0.572291 0.132342
+0.648289 -0.58566 0.126581
+0.639536 -0.591849 0.12749
+0.621689 -0.597224 0.129674
+-0.611062 -0.595972 0.126289
+-0.626205 -0.592022 0.132191
+-0.639964 -0.584927 0.130228
+0.60042 -0.601834 0.125247
+0.579938 -0.602958 0.128149
+0.562226 -0.604993 0.128638
+0.548892 -0.607775 0.126341
+0.538401 -0.607234 0.13166
+0.523638 -0.609487 0.129475
+0.502281 -0.61145 0.130226
+0.452866 -0.61323 0.130122
+0.438156 -0.613209 0.127937
+0.421208 -0.61352 0.127133
+0.402763 -0.613502 0.128425
+0.216663 -0.608733 0.130541
+-0.469732 -0.615843 0.12761
+-0.48515 -0.612144 0.123799
+-0.497738 -0.610878 0.127086
+-0.514048 -0.60962 0.128054
+-0.530873 -0.608914 0.128444
+-0.547246 -0.608612 0.129332
+-0.563044 -0.607823 0.130313
+-0.576166 -0.606695 0.13282
+-0.591125 -0.602299 0.128676
+0.480173 -0.616062 0.123793
+0.463031 -0.617016 0.124014
+0.382295 -0.618013 0.123211
+0.36201 -0.619478 0.123395
+0.350219 -0.621115 0.123159
+0.339347 -0.622161 0.121983
+0.322819 -0.624227 0.120742
+0.306204 -0.625864 0.11973
+0.290221 -0.62694 0.119181
+0.273329 -0.626792 0.119057
+0.255294 -0.625216 0.119691
+0.235205 -0.622319 0.120828
+0.218208 -0.6276 0.118873
+0.202738 -0.624676 0.122129
+0.182979 -0.625566 0.128441
+-0.175707 -0.627453 0.130083
+-0.189341 -0.631256 0.122725
+-0.207151 -0.630259 0.122784
+-0.413728 -0.629456 0.12679
+-0.430338 -0.625444 0.128579
+-0.448996 -0.621054 0.131474
+0.245676 -0.637776 0.112932
+0.163877 -0.634851 0.128014
+0.14658 -0.643537 0.127813
+-0.142761 -0.641955 0.130712
+-0.1597 -0.641877 0.122482
+-0.221296 -0.639031 0.118466
+-0.235777 -0.640322 0.120238
+-0.253306 -0.641315 0.121823
+-0.273762 -0.63961 0.126473
+-0.29497 -0.642478 0.126636
+-0.313981 -0.644774 0.125534
+-0.330488 -0.647217 0.120647
+-0.346035 -0.642629 0.126149
+-0.364978 -0.638108 0.130119
+-0.385484 -0.635935 0.127324
+-0.400789 -0.633281 0.123589
+0.12954 -0.650547 0.128001
+0.112432 -0.656828 0.128189
+0.095418 -0.66325 0.128189
+-0.092359 -0.658952 0.132511
+-0.111393 -0.659128 0.124769
+-0.129022 -0.653538 0.12377
+0.078337 -0.667632 0.128055
+0.060951 -0.671954 0.127803
+0.043507 -0.674149 0.128435
+0.026812 -0.674863 0.128875
+0.010274 -0.67593 0.12831
+-0.006933 -0.676464 0.127988
+-0.024552 -0.676554 0.127584
+-0.042498 -0.675944 0.126584
+-0.061446 -0.675357 0.123709
+-0.0784 -0.670352 0.124164
+0.027437 0.799225 0.108163
+0.032217 0.806492 0.090868
+0.007875 0.800272 0.110292
+0.017221 0.807926 0.092705
+-0.009847 0.800768 0.111108
+-0.00084 0.809205 0.093449
+-0.027269 0.800492 0.110879
+-0.018813 0.809309 0.094027
+-0.044931 0.799951 0.109745
+-0.036575 0.808569 0.093506
+-0.060153 0.798919 0.107208
+-0.05551 0.807065 0.091317
+0.099937 0.785557 0.090769
+0.076786 0.783166 0.114074
+0.081833 0.790503 0.095912
+-0.106284 0.785675 0.110949
+-0.103978 0.793445 0.096804
+-0.120941 0.789458 0.092458
+-0.154213 0.771503 0.0974
+0.147518 0.746142 0.110486
+0.146608 0.756579 0.094081
+-0.174192 0.749256 0.112251
+-0.172384 0.761984 0.092794
+0.163366 0.732276 0.110613
+0.163083 0.74356 0.094431
+0.178079 0.713531 0.113767
+0.178817 0.727598 0.094896
+0.19516 0.708906 0.092793
+-0.214899 0.713027 0.110521
+-0.224576 0.71257 0.094242
+0.205386 0.690869 0.097843
+-0.226486 0.696776 0.110634
+-0.23645 0.695691 0.094242
+0.223882 0.660533 0.095238
+0.214311 0.661098 0.111619
+-0.246217 0.662695 0.110562
+-0.255708 0.661502 0.093507
+0.227225 0.627582 0.111243
+-0.264141 0.627357 0.103707
+-0.272349 0.627145 0.086207
+0.240798 0.610635 0.094296
+0.231932 0.610635 0.111243
+-0.263061 0.610747 0.114811
+-0.273205 0.608419 0.095063
+0.235776 0.593689 0.111243
+0.240405 0.559796 0.111243
+0.241333 0.542675 0.110723
+0.241445 0.525046 0.109278
+0.241633 0.508325 0.105195
+0.233742 0.491297 0.115008
+0.234894 0.475477 0.106092
+-0.267126 0.475064 0.111243
+0.225341 0.458485 0.115565
+-0.263 0.458212 0.111337
+0.225442 0.441235 0.105187
+0.216704 0.423347 0.109374
+-0.250164 0.42522 0.111942
+0.207507 0.405812 0.1104
+-0.242034 0.408569 0.111431
+0.198234 0.388865 0.110557
+-0.231411 0.391327 0.111162
+0.186553 0.372484 0.110292
+-0.219613 0.374712 0.111955
+0.172361 0.356439 0.111126
+-0.207013 0.358949 0.111996
+0.585509 0.314206 0.113358
+0.525253 0.331725 0.093152
+0.15617 0.341324 0.112736
+-0.192138 0.343525 0.111431
+0.502571 0.310198 0.110624
+0.505045 0.322359 0.090953
+0.141567 0.331202 0.116163
+0.129208 0.31889 0.113859
+-0.159494 0.316164 0.111447
+-0.175819 0.329503 0.111149
+0.468419 0.293291 0.110124
+0.472037 0.302523 0.097842
+0.454582 0.298048 0.091907
+0.114028 0.304481 0.114842
+-0.143873 0.302416 0.112719
+-0.161108 0.300825 0.095632
+0.61635 0.27239 0.115632
+0.607945 0.28875 0.10688
+0.435889 0.289103 0.093503
+0.418646 0.280445 0.094659
+0.121282 0.289099 0.104567
+0.100925 0.285486 0.119398
+-0.148601 0.287439 0.101837
+-0.158302 0.288083 0.09242
+0.401564 0.274133 0.093974
+0.383403 0.266892 0.092971
+0.364889 0.260434 0.09246
+-0.142726 0.271546 0.106738
+-0.159533 0.274435 0.093249
+-0.583779 0.264316 0.083861
+0.637762 0.237986 0.111155
+0.631849 0.251995 0.097223
+0.626716 0.257915 0.108277
+0.346213 0.252094 0.092156
+0.32944 0.247858 0.086995
+0.165278 0.249234 0.093758
+-0.157474 0.245509 0.112665
+-0.154451 0.259987 0.10367
+-0.171681 0.253601 0.095417
+-0.552583 0.250822 0.086347
+-0.573153 0.252422 0.088707
+-0.587921 0.250199 0.090073
+-0.600105 0.255857 0.085239
+-0.609941 0.255055 0.081235
+0.334606 0.239795 0.097501
+0.316823 0.235023 0.091599
+0.198065 0.230525 0.093884
+-0.190732 0.236906 0.093899
+-0.536505 0.233969 0.088655
+-0.554083 0.232594 0.09166
+-0.568079 0.236141 0.092085
+-0.584788 0.23677 0.092504
+-0.600566 0.237845 0.090966
+-0.615182 0.240529 0.08462
+0.29501 0.222291 0.091137
+0.27733 0.219349 0.086246
+0.214366 0.21834 0.096361
+-0.208694 0.220456 0.093785
+-0.501299 0.217775 0.086982
+-0.522562 0.219379 0.090032
+-0.537803 0.216144 0.092405
+-0.550936 0.2188 0.092879
+-0.566792 0.219725 0.093479
+-0.583102 0.220518 0.093939
+-0.599703 0.220975 0.093658
+-0.615537 0.221813 0.090891
+-0.629739 0.221458 0.084153
+0.665517 0.185922 0.116948
+0.657863 0.203577 0.107283
+0.28042 0.206514 0.096626
+0.264237 0.211859 0.088417
+0.248071 0.206352 0.092611
+0.231057 0.203944 0.100876
+-0.226403 0.204025 0.094256
+-0.485386 0.200264 0.088849
+-0.503179 0.198798 0.091644
+-0.517254 0.202419 0.092172
+-0.533948 0.202859 0.093156
+-0.549886 0.202926 0.093829
+-0.565842 0.203572 0.094163
+-0.582187 0.204015 0.094219
+-0.598721 0.204271 0.093939
+-0.614789 0.205132 0.092694
+-0.629232 0.205839 0.089217
+-0.639201 0.207091 0.082936
+0.264694 0.196179 0.100163
+-0.24411 0.18759 0.094763
+-0.450777 0.184187 0.087608
+-0.471665 0.185544 0.090205
+-0.486964 0.182251 0.092405
+-0.500097 0.184908 0.092879
+-0.515859 0.185926 0.093479
+-0.531918 0.186814 0.09386
+-0.548326 0.186881 0.093905
+-0.56486 0.187136 0.093703
+-0.581035 0.187876 0.093524
+-0.596969 0.188104 0.093042
+-0.613275 0.18866 0.091981
+-0.626505 0.192209 0.090233
+0.676765 0.152698 0.115389
+0.674013 0.16964 0.107341
+-0.243156 0.169675 0.113205
+-0.261218 0.170526 0.095763
+-0.416213 0.166944 0.086966
+-0.43748 0.16862 0.08974
+-0.45298 0.165583 0.091942
+-0.466599 0.168664 0.092345
+-0.483015 0.16906 0.093156
+-0.498702 0.169222 0.09375
+-0.514433 0.169934 0.093804
+-0.53029 0.170835 0.093602
+-0.546111 0.170862 0.093098
+-0.562726 0.170472 0.092401
+-0.57952 0.171427 0.091845
+-0.592988 0.174789 0.091747
+-0.277766 0.153324 0.096798
+-0.399709 0.149858 0.087421
+-0.417694 0.147959 0.090741
+-0.431894 0.15158 0.091477
+-0.448589 0.15202 0.092381
+-0.464589 0.152181 0.092975
+-0.480697 0.152988 0.093266
+-0.496648 0.153795 0.093445
+-0.512398 0.15405 0.093008
+-0.52876 0.154527 0.092292
+-0.542261 0.157543 0.092011
+0.675574 0.13989 0.104275
+-0.294417 0.136203 0.096673
+-0.384655 0.137021 0.085538
+-0.399262 0.131879 0.088577
+-0.412791 0.134068 0.090087
+-0.42871 0.134992 0.090968
+-0.44502 0.135786 0.091428
+-0.461648 0.135947 0.091708
+-0.478366 0.136364 0.091728
+-0.494935 0.137544 0.091614
+-0.508406 0.140747 0.091672
+0.665841 0.128901 0.108821
+0.652027 0.121747 0.111233
+0.639927 0.118485 0.11547
+0.622803 0.11465 0.115156
+-0.311296 0.119122 0.094913
+0.599432 0.108423 0.108299
+0.581643 0.103814 0.107893
+0.570844 0.102949 0.114922
+0.554057 0.099364 0.114174
+-0.328148 0.102203 0.090995
+0.532768 0.094139 0.108007
+0.512878 0.092855 0.11011
+0.495044 0.093479 0.111328
+0.477641 0.09397 0.112081
+0.460903 0.093677 0.112055
+0.447361 0.093824 0.113275
+0.434549 0.090601 0.109094
+0.416835 0.089209 0.10747
+0.398978 0.087846 0.105974
+0.385364 0.084132 0.103579
+0.37091 0.085119 0.105638
+0.350516 0.082727 0.108799
+-0.32831 0.084853 0.097695
+0.346421 0.06399 0.105859
+0.331462 0.070401 0.116392
+-0.317216 0.064745 0.116616
+-0.329348 0.067014 0.103425
+-0.344947 0.069291 0.089026
+0.335527 0.050445 0.11414
+-0.345763 0.05081 0.092932
+0.3398 0.033058 0.112897
+-0.333846 0.03084 0.114845
+-0.345411 0.032407 0.099755
+-0.357069 0.01537 0.090357
+0.357614 0.000538 0.094771
+0.348564 0.000376 0.111588
+-0.348554 -0.002368 0.113028
+-0.356678 -0.000637 0.09885
+0.354558 -0.016382 0.111243
+0.363345 -0.050275 0.111243
+-0.37363 -0.050325 0.090669
+0.375428 -0.067221 0.094296
+0.36766 -0.067221 0.111243
+-0.365829 -0.069801 0.113595
+-0.373583 -0.067737 0.098837
+0.371348 -0.084168 0.111243
+0.376604 -0.118061 0.111243
+0.378095 -0.135007 0.111242
+-0.389164 -0.134832 0.089315
+0.379115 -0.151953 0.111242
+-0.389067 -0.151111 0.093385
+0.379832 -0.168873 0.110767
+-0.384323 -0.173253 0.10659
+-0.390587 -0.169353 0.093275
+0.381195 -0.18508 0.109373
+-0.383351 -0.186613 0.109373
+-0.391622 -0.186613 0.093211
+0.382849 -0.19829 0.10674
+-0.382801 -0.20282 0.110767
+-0.391463 -0.202981 0.093951
+0.378972 -0.216454 0.113371
+-0.382299 -0.219739 0.111243
+-0.39093 -0.219739 0.094296
+0.379245 -0.235879 0.111512
+-0.381358 -0.236686 0.111243
+-0.390145 -0.236686 0.094296
+0.379169 -0.252664 0.110359
+-0.388733 -0.253632 0.094296
+0.378339 -0.269466 0.110369
+0.377228 -0.287682 0.109655
+-0.531149 -0.317381 0.110023
+0.377204 -0.304979 0.10532
+-0.514725 -0.323933 0.10984
+-0.547172 -0.317346 0.111856
+0.580793 -0.349114 0.115668
+0.566419 -0.342734 0.108847
+0.568963 -0.337863 0.089028
+0.369313 -0.322073 0.115066
+-0.371002 -0.321418 0.111243
+-0.481051 -0.345032 0.111108
+-0.498195 -0.333584 0.110879
+-0.560763 -0.325607 0.11174
+0.547822 -0.346455 0.110301
+0.533125 -0.352166 0.108204
+0.538397 -0.345579 0.096719
+0.370497 -0.337857 0.106155
+-0.368883 -0.338364 0.111557
+-0.378847 -0.338364 0.094845
+-0.46388 -0.357506 0.111175
+0.597143 -0.372884 0.11744
+0.589889 -0.358 0.107538
+0.361328 -0.354452 0.115993
+-0.366694 -0.355122 0.112886
+-0.377105 -0.355059 0.096893
+-0.446961 -0.370294 0.111336
+-0.582016 -0.355189 0.110919
+0.486414 -0.384943 0.111059
+0.489019 -0.377372 0.096823
+0.36222 -0.370026 0.107335
+-0.37738 -0.370985 0.10199
+-0.413155 -0.388887 0.113052
+-0.430124 -0.380839 0.111642
+-0.588881 -0.369422 0.112941
+-0.593437 -0.374681 0.093643
+0.603812 -0.389203 0.111242
+0.355025 -0.384405 0.114846
+-0.37537 -0.38383 0.109773
+-0.399057 -0.395466 0.11753
+-0.393105 -0.385924 0.101544
+-0.597036 -0.38557 0.108014
+0.61511 -0.423096 0.116891
+0.609461 -0.40615 0.105593
+0.43527 -0.41859 0.110821
+0.436109 -0.408879 0.093198
+0.350601 -0.402438 0.115319
+-0.605365 -0.403188 0.112257
+-0.610354 -0.409111 0.093281
+0.404847 -0.424476 0.100025
+0.38513 -0.424766 0.098968
+0.365032 -0.427587 0.105404
+0.350637 -0.423465 0.114165
+-0.613854 -0.419656 0.107724
+0.620759 -0.440042 0.111242
+0.370807 -0.438277 0.109189
+0.353226 -0.44326 0.116012
+-0.622281 -0.437618 0.111895
+-0.626838 -0.442877 0.092597
+0.632056 -0.473935 0.116891
+0.626407 -0.456989 0.105593
+-0.631537 -0.456508 0.105491
+-0.638636 -0.473145 0.11482
+0.637705 -0.490882 0.111242
+-0.646767 -0.489442 0.105824
+0.648509 -0.524842 0.117451
+0.643354 -0.507828 0.105593
+-0.654307 -0.507321 0.11443
+-0.660442 -0.524005 0.103953
+0.65323 -0.54229 0.112704
+-0.663056 -0.540127 0.110112
+0.657282 -0.561396 0.107319
+-0.662949 -0.552575 0.115115
+-0.644869 -0.576965 0.112923
+-0.65725 -0.564711 0.113179
+0.649501 -0.589617 0.111767
+-0.598521 -0.594424 0.108821
+-0.613599 -0.591126 0.111328
+-0.627222 -0.586774 0.114574
+0.632516 -0.60041 0.108309
+0.613469 -0.604778 0.110297
+0.599139 -0.607464 0.107722
+0.585653 -0.607787 0.110487
+0.568123 -0.608766 0.112002
+0.554239 -0.609665 0.115763
+0.53833 -0.61211 0.115236
+-0.465239 -0.615942 0.111699
+-0.482186 -0.611943 0.110919
+-0.497316 -0.609838 0.111336
+-0.512272 -0.608625 0.111887
+-0.528605 -0.607636 0.111726
+-0.54557 -0.606501 0.112671
+-0.559651 -0.606046 0.116572
+-0.576811 -0.602244 0.115156
+0.517213 -0.615597 0.109506
+0.495623 -0.61891 0.109238
+0.479612 -0.621973 0.105803
+0.465689 -0.622162 0.109822
+0.448211 -0.620225 0.114057
+0.429124 -0.620505 0.112901
+0.412076 -0.621236 0.11294
+0.397413 -0.622588 0.114087
+0.386998 -0.62781 0.10755
+0.371781 -0.629213 0.109882
+0.352835 -0.63064 0.112275
+0.194445 -0.635587 0.114315
+-0.413925 -0.632352 0.110341
+-0.430177 -0.626304 0.111121
+-0.447482 -0.620907 0.111861
+0.335134 -0.634467 0.109489
+0.318107 -0.637971 0.108607
+0.30134 -0.640771 0.10821
+0.283918 -0.642315 0.107975
+0.263607 -0.643959 0.107648
+0.229016 -0.641195 0.10758
+0.209479 -0.637414 0.109574
+0.180295 -0.6412 0.112349
+0.163285 -0.649428 0.111566
+-0.176339 -0.642351 0.115607
+-0.193172 -0.643595 0.11084
+-0.209868 -0.646657 0.109466
+-0.34318 -0.64947 0.112453
+-0.360688 -0.647326 0.108756
+-0.380296 -0.64186 0.11095
+-0.39783 -0.637474 0.110408
+0.247138 -0.651344 0.100434
+0.146258 -0.656738 0.111243
+0.129244 -0.664617 0.111175
+-0.123474 -0.664808 0.112654
+-0.143261 -0.65869 0.109977
+-0.163208 -0.652617 0.108114
+-0.225214 -0.650457 0.108741
+-0.241708 -0.654239 0.108383
+-0.260551 -0.656452 0.108711
+-0.28163 -0.65766 0.107923
+-0.301949 -0.65494 0.110255
+-0.319449 -0.654235 0.10897
+-0.333522 -0.653323 0.106782
+0.112136 -0.669892 0.111202
+0.095096 -0.675995 0.111296
+0.077924 -0.68192 0.110695
+-0.072907 -0.681209 0.112523
+-0.09205 -0.676247 0.110891
+-0.111423 -0.67175 0.1079
+0.058648 -0.686565 0.108781
+0.040443 -0.685403 0.114918
+0.026477 -0.688887 0.111858
+0.009013 -0.691097 0.110857
+-0.009112 -0.691552 0.110409
+-0.028306 -0.692011 0.108211
+-0.047066 -0.688201 0.110073
+-0.061437 -0.6874 0.107255
+0.060717 0.799392 0.092081
+0.065666 0.805685 0.073647
+0.042479 0.801796 0.096922
+0.047928 0.807975 0.078973
+-0.075216 0.801845 0.095314
+-0.06868 0.810413 0.077605
+-0.093309 0.799159 0.091048
+-0.088086 0.806611 0.074729
+0.113754 0.77794 0.092907
+-0.1397 0.781117 0.094421
+-0.135956 0.790117 0.077468
+0.130078 0.768489 0.093368
+0.129688 0.775754 0.076973
+0.162828 0.752923 0.077538
+-0.188639 0.75645 0.081177
+0.178729 0.738217 0.07803
+-0.191965 0.744549 0.097972
+-0.203805 0.744865 0.07887
+0.190317 0.724195 0.080289
+-0.210206 0.72879 0.095099
+-0.220306 0.729005 0.077646
+-0.234143 0.712086 0.077309
+0.223808 0.674382 0.081389
+0.215558 0.676902 0.095554
+-0.246743 0.678744 0.094242
+-0.255416 0.678058 0.077175
+0.238861 0.643829 0.078345
+0.231257 0.644152 0.094673
+-0.264582 0.643923 0.09118
+-0.27303 0.641914 0.072936
+0.236922 0.627488 0.09439
+0.244799 0.593689 0.094296
+-0.27714 0.593775 0.093806
+0.255783 0.576742 0.07735
+0.248172 0.576743 0.094296
+-0.280332 0.579175 0.090599
+-0.287705 0.576321 0.07107
+0.250111 0.559729 0.094229
+-0.280941 0.560146 0.093121
+-0.287682 0.560307 0.075574
+0.250706 0.542244 0.093243
+-0.281179 0.542823 0.094135
+-0.287693 0.543051 0.076991
+0.250704 0.523275 0.090565
+-0.280935 0.525903 0.094296
+-0.287447 0.525903 0.077349
+0.247673 0.508769 0.093705
+-0.280464 0.508957 0.094296
+-0.286897 0.508957 0.077349
+0.243738 0.494112 0.095467
+-0.278612 0.492105 0.09439
+0.242863 0.475363 0.088453
+-0.27564 0.475319 0.094417
+0.234948 0.458678 0.097532
+-0.271199 0.458467 0.094511
+0.234742 0.441799 0.086974
+-0.266055 0.441938 0.095224
+-0.27309 0.441934 0.078255
+0.226059 0.42452 0.091969
+-0.259509 0.425613 0.095685
+0.217516 0.407251 0.093664
+-0.251451 0.411866 0.097754
+0.207503 0.390076 0.094175
+-0.243261 0.394017 0.092378
+0.196407 0.373129 0.094175
+-0.230279 0.375458 0.095078
+0.569573 0.332639 0.092945
+0.551451 0.338192 0.090191
+0.553914 0.344853 0.070437
+0.537412 0.33646 0.092893
+0.182776 0.356344 0.094269
+-0.218458 0.362055 0.098339
+0.58612 0.32041 0.092346
+0.579489 0.33071 0.080264
+0.166796 0.339707 0.095525
+-0.20779 0.347793 0.095191
+0.598302 0.30394 0.099888
+0.486032 0.31109 0.094669
+0.486751 0.319162 0.07621
+0.147709 0.323272 0.09954
+-0.17633 0.316942 0.094554
+-0.192295 0.332149 0.094417
+0.438707 0.300186 0.07505
+0.131627 0.305629 0.100344
+0.620782 0.271758 0.094363
+0.614714 0.285284 0.081069
+0.609156 0.290978 0.092241
+0.406106 0.284346 0.080859
+0.388302 0.280741 0.074589
+0.135377 0.293129 0.091493
+-0.551616 0.285774 0.068875
+-0.56904 0.288206 0.068597
+-0.583586 0.280119 0.0734
+-0.595211 0.276907 0.073286
+0.350148 0.265422 0.077229
+0.149664 0.260436 0.093829
+0.135434 0.275876 0.095244
+-0.175597 0.270702 0.079433
+-0.518632 0.269673 0.070947
+-0.53556 0.274215 0.073465
+-0.546423 0.268229 0.078814
+-0.565203 0.271334 0.079974
+-0.593889 0.270571 0.079851
+-0.603925 0.267461 0.074677
+0.316615 0.250891 0.075595
+0.181617 0.240222 0.09361
+0.180787 0.250305 0.077296
+-0.188126 0.253772 0.078033
+-0.48458 0.252017 0.070693
+-0.503884 0.254404 0.074886
+-0.516023 0.255213 0.077787
+-0.530624 0.256399 0.080744
+0.649339 0.221044 0.098689
+0.641375 0.238295 0.090118
+0.298959 0.240876 0.076172
+0.280994 0.232223 0.075673
+0.214524 0.231263 0.079575
+-0.206609 0.237471 0.074671
+-0.451509 0.235082 0.070385
+-0.470193 0.237832 0.074063
+-0.481122 0.237889 0.076808
+-0.493236 0.237689 0.079466
+-0.514019 0.239572 0.083043
+-0.628484 0.236469 0.073862
+0.264802 0.22591 0.076119
+0.24882 0.221389 0.07854
+0.231564 0.219306 0.084926
+-0.224996 0.220242 0.07678
+-0.417161 0.218437 0.070133
+-0.436296 0.220051 0.073903
+-0.450316 0.217968 0.077587
+-0.461944 0.22419 0.077691
+-0.478775 0.223264 0.081359
+-0.640992 0.217363 0.072642
+0.667167 0.187536 0.098327
+0.65948 0.205254 0.088985
+-0.243223 0.204945 0.077054
+-0.382683 0.201528 0.070381
+-0.40182 0.203505 0.073627
+-0.416052 0.201005 0.077224
+-0.427385 0.206619 0.077345
+-0.441872 0.204052 0.080652
+-0.462316 0.205945 0.083805
+-0.263972 0.189715 0.077314
+-0.282558 0.184892 0.071676
+-0.333164 0.183713 0.069506
+-0.352437 0.186218 0.07106
+-0.369325 0.187249 0.073553
+-0.382635 0.184933 0.076514
+-0.39317 0.190027 0.076799
+-0.40762 0.187196 0.080096
+-0.427782 0.188691 0.08331
+-0.6402 0.190244 0.08318
+-0.653333 0.184524 0.070105
+0.678279 0.154853 0.097538
+0.67533 0.171708 0.088887
+-0.279254 0.170653 0.083322
+-0.298583 0.173199 0.07425
+-0.31933 0.169875 0.073423
+-0.334344 0.165885 0.074968
+-0.347202 0.169831 0.075461
+-0.363099 0.171829 0.076872
+-0.376592 0.174577 0.078053
+-0.393173 0.172863 0.081649
+-0.607582 0.172171 0.089309
+-0.626998 0.173971 0.084989
+-0.644797 0.170404 0.07649
+-0.295283 0.153651 0.085326
+-0.313197 0.15349 0.078925
+-0.330538 0.152611 0.077171
+-0.346319 0.153691 0.077726
+-0.359101 0.158272 0.078641
+-0.376935 0.157392 0.081879
+-0.556983 0.154158 0.089897
+-0.574688 0.15434 0.087901
+-0.59414 0.157336 0.086246
+-0.614011 0.154901 0.081524
+0.676496 0.141986 0.087056
+-0.311587 0.13627 0.085869
+-0.328785 0.136176 0.080175
+-0.345866 0.13696 0.079105
+-0.364286 0.140704 0.081348
+-0.523471 0.137763 0.089325
+-0.543725 0.139479 0.086951
+-0.565678 0.135318 0.082246
+-0.583788 0.140949 0.081577
+0.66741 0.130706 0.091888
+0.653096 0.122144 0.094344
+0.634626 0.116483 0.098064
+-0.328242 0.119189 0.085039
+-0.345364 0.119552 0.080352
+-0.362508 0.121157 0.080584
+-0.376672 0.124342 0.083181
+-0.391612 0.119794 0.085631
+-0.407765 0.118516 0.087146
+-0.423743 0.118933 0.087808
+-0.44012 0.119189 0.087707
+-0.45691 0.119189 0.087471
+-0.47391 0.119512 0.087366
+-0.490927 0.120745 0.087216
+-0.509943 0.123061 0.085948
+-0.532072 0.118329 0.080651
+-0.550775 0.12282 0.079077
+0.613476 0.11097 0.094469
+0.598097 0.106156 0.089846
+0.584452 0.103328 0.093152
+0.566453 0.099249 0.097662
+-0.344911 0.102498 0.082851
+-0.362001 0.103117 0.079689
+-0.381153 0.10577 0.080992
+-0.401435 0.103191 0.082273
+-0.418152 0.103487 0.082948
+-0.433974 0.103648 0.082455
+-0.450422 0.103092 0.081408
+-0.467606 0.103076 0.080655
+-0.484996 0.104291 0.080318
+-0.499986 0.107644 0.080979
+0.546485 0.094166 0.094469
+0.531027 0.090501 0.089624
+0.516935 0.088941 0.092874
+0.499644 0.087839 0.094296
+0.482468 0.08715 0.09586
+0.468278 0.087313 0.099613
+0.450762 0.084622 0.097631
+-0.344239 0.08613 0.086393
+-0.360158 0.086426 0.079738
+-0.377185 0.086359 0.077346
+-0.395705 0.086567 0.076257
+-0.413646 0.088085 0.076523
+-0.427285 0.091644 0.077593
+0.429145 0.079112 0.090872
+0.408971 0.077592 0.092507
+0.392214 0.075788 0.093298
+0.37873 0.075214 0.096152
+0.363334 0.067357 0.096012
+-0.357385 0.073143 0.081395
+0.35062 0.047413 0.098094
+-0.363556 0.055448 0.07818
+0.348457 0.029857 0.100085
+-0.362016 0.031797 0.079661
+0.361127 0.017574 0.079555
+0.353278 0.016744 0.096471
+0.362875 -0.016382 0.094296
+-0.365933 -0.016476 0.089849
+-0.373932 -0.016318 0.072875
+0.37469 -0.033423 0.077444
+0.368053 -0.033328 0.094296
+-0.364946 -0.03268 0.099595
+-0.374097 -0.032831 0.081299
+0.372289 -0.050275 0.094296
+0.379272 -0.084168 0.094296
+-0.382822 -0.084396 0.087809
+-0.390155 -0.084406 0.071074
+0.382332 -0.101114 0.094296
+-0.382753 -0.101285 0.093458
+-0.390712 -0.100716 0.075815
+0.39159 -0.118061 0.07735
+0.384842 -0.118061 0.094296
+-0.381872 -0.117663 0.099724
+-0.391738 -0.120607 0.079152
+0.386568 -0.135007 0.094296
+0.387274 -0.151953 0.094296
+0.387981 -0.168712 0.093951
+0.388312 -0.184945 0.093346
+0.388021 -0.201502 0.093919
+0.387499 -0.219026 0.094659
+0.387351 -0.236457 0.094336
+0.387158 -0.253444 0.094108
+0.386701 -0.270955 0.093283
+-0.386771 -0.270578 0.094296
+0.386275 -0.290096 0.090622
+-0.385124 -0.287525 0.094296
+-0.392813 -0.287525 0.07735
+-0.538042 -0.317334 0.095206
+0.383244 -0.304659 0.093705
+-0.382927 -0.304471 0.094296
+-0.390773 -0.304471 0.07735
+-0.518395 -0.32355 0.091214
+-0.551908 -0.31874 0.099326
+0.580144 -0.345913 0.099039
+0.553124 -0.338752 0.093234
+0.559321 -0.333891 0.076041
+0.379309 -0.319316 0.095467
+-0.381201 -0.321418 0.094296
+-0.38889 -0.321418 0.07735
+-0.482749 -0.344265 0.093915
+-0.500113 -0.332677 0.094098
+-0.562971 -0.327037 0.094757
+0.378493 -0.337891 0.088704
+-0.464767 -0.357148 0.093633
+-0.574659 -0.340601 0.088754
+0.597491 -0.372638 0.100482
+0.589862 -0.357135 0.090503
+0.519692 -0.355731 0.093887
+0.500264 -0.366988 0.091283
+0.505153 -0.360529 0.079548
+0.370896 -0.353754 0.098572
+-0.447189 -0.369611 0.094349
+-0.583585 -0.355788 0.099518
+0.371402 -0.367113 0.092062
+-0.414254 -0.384692 0.096579
+-0.430753 -0.379241 0.095256
+0.603722 -0.389432 0.09421
+0.46955 -0.38927 0.094256
+0.450424 -0.399437 0.090498
+0.455514 -0.392981 0.079637
+0.366189 -0.385195 0.097179
+-0.601865 -0.392643 0.097815
+0.615065 -0.423163 0.099855
+0.609248 -0.40654 0.088566
+0.419092 -0.41713 0.095672
+0.421104 -0.406898 0.076468
+0.368927 -0.408393 0.097272
+-0.618682 -0.426729 0.097524
+0.620669 -0.440271 0.09421
+0.632011 -0.474002 0.099855
+0.626194 -0.457379 0.088566
+-0.633279 -0.456989 0.094296
+-0.63972 -0.4711 0.095994
+-0.644277 -0.476359 0.076697
+0.637615 -0.49111 0.09421
+-0.647892 -0.487345 0.091003
+0.648756 -0.524976 0.100191
+0.643141 -0.508218 0.088566
+-0.65554 -0.505461 0.094372
+-0.658776 -0.510278 0.074475
+-0.661873 -0.523982 0.086958
+0.653983 -0.542451 0.09483
+-0.662547 -0.538608 0.093071
+0.660222 -0.572465 0.0954
+0.658721 -0.558972 0.088064
+-0.658562 -0.554064 0.097516
+-0.631119 -0.576617 0.095371
+-0.646862 -0.567269 0.095344
+0.656729 -0.587411 0.091127
+-0.580352 -0.592395 0.094384
+-0.594933 -0.585707 0.090604
+-0.612326 -0.583814 0.096431
+0.644401 -0.599687 0.092861
+0.631812 -0.605909 0.090383
+0.619152 -0.607747 0.094169
+0.603725 -0.60938 0.095085
+0.590534 -0.609987 0.097115
+0.572698 -0.611953 0.092059
+0.550272 -0.612361 0.098358
+-0.463661 -0.615773 0.094874
+-0.479998 -0.611449 0.095506
+-0.495546 -0.608904 0.09629
+-0.508236 -0.607837 0.099045
+-0.522248 -0.605674 0.095792
+-0.539724 -0.602589 0.095294
+-0.560189 -0.599537 0.098111
+0.532178 -0.614711 0.098775
+0.520413 -0.616196 0.091543
+0.505264 -0.618267 0.092574
+0.48524 -0.621175 0.089892
+0.467298 -0.624175 0.092978
+0.451163 -0.625132 0.09556
+0.4345 -0.625651 0.097097
+0.419747 -0.625869 0.099912
+0.402091 -0.629636 0.097537
+-0.430015 -0.628055 0.094202
+-0.446841 -0.621456 0.094457
+0.381488 -0.636084 0.092262
+0.364314 -0.637046 0.098019
+0.349508 -0.642022 0.095123
+0.332174 -0.64726 0.094349
+0.216355 -0.649174 0.097588
+0.198302 -0.648142 0.098651
+-0.379609 -0.647093 0.093349
+-0.396463 -0.64126 0.09404
+-0.41332 -0.634598 0.094108
+0.315394 -0.650466 0.09422
+0.298328 -0.654563 0.093261
+0.280193 -0.657638 0.092748
+0.262789 -0.660777 0.091311
+0.2489 -0.663355 0.087364
+0.23204 -0.657888 0.089749
+0.179743 -0.653549 0.095995
+0.162859 -0.661481 0.094485
+-0.160009 -0.663504 0.094437
+-0.178633 -0.655717 0.097822
+-0.198786 -0.655727 0.096013
+-0.213964 -0.656597 0.098175
+-0.227048 -0.662553 0.09439
+-0.294119 -0.664531 0.096348
+-0.311582 -0.663533 0.091361
+-0.330532 -0.659136 0.093243
+-0.348489 -0.654468 0.095686
+-0.366029 -0.651779 0.09054
+0.145585 -0.668753 0.094094
+0.128208 -0.675822 0.093991
+0.111078 -0.68247 0.094623
+-0.105835 -0.682098 0.096662
+-0.125937 -0.676479 0.09332
+-0.145976 -0.670606 0.090475
+-0.245601 -0.668467 0.09025
+-0.267127 -0.669346 0.091781
+-0.282828 -0.669452 0.090153
+0.094423 -0.68689 0.094619
+0.077719 -0.693132 0.092817
+0.063222 -0.698566 0.090091
+0.045001 -0.69794 0.09665
+-0.039115 -0.698537 0.096924
+-0.053769 -0.697414 0.094285
+-0.075183 -0.692544 0.09385
+-0.09404 -0.688406 0.091704
+0.024909 -0.703045 0.091961
+0.004333 -0.703767 0.093291
+-0.013867 -0.703877 0.092732
+-0.028389 -0.703759 0.090621
+0.029641 0.812766 0.076356
+0.010836 0.816814 0.073707
+0.015619 0.822876 0.05582
+-0.009515 0.817398 0.076502
+0.000886 0.823449 0.059045
+-0.027901 0.816941 0.076596
+-0.016863 0.82359 0.059462
+-0.045793 0.815005 0.076731
+-0.037352 0.822586 0.05693
+-0.057382 0.813005 0.07739
+0.096679 0.793179 0.076942
+0.079569 0.800136 0.076618
+0.079292 0.806076 0.059717
+-0.108986 0.799661 0.079175
+-0.104202 0.808112 0.057861
+-0.123501 0.795571 0.077989
+0.11336 0.785532 0.07665
+0.112621 0.791405 0.060282
+0.146352 0.765931 0.077255
+0.146258 0.772333 0.060403
+-0.158266 0.778638 0.07661
+-0.178408 0.767752 0.074325
+-0.175897 0.775825 0.059023
+0.213154 0.694436 0.077838
+0.208966 0.710286 0.0634
+0.201587 0.713847 0.074761
+-0.245959 0.695112 0.077471
+-0.25428 0.694198 0.061085
+0.239747 0.658259 0.06487
+0.232527 0.660288 0.078799
+-0.264613 0.660408 0.075835
+-0.273278 0.658124 0.05737
+0.244747 0.627461 0.077605
+-0.277097 0.628 0.074477
+0.25696 0.610635 0.060403
+0.249585 0.610635 0.07735
+-0.28082 0.612688 0.073851
+-0.287638 0.609738 0.053108
+0.253429 0.593689 0.07735
+-0.281823 0.593572 0.081559
+-0.288496 0.59097 0.061182
+0.257386 0.559662 0.077058
+0.257789 0.542567 0.075615
+0.258104 0.526599 0.07093
+0.252356 0.509074 0.081559
+0.251353 0.489888 0.074442
+-0.285257 0.492131 0.077605
+0.247601 0.474317 0.076424
+-0.28288 0.475817 0.078103
+-0.288225 0.47539 0.061556
+0.243255 0.459869 0.078275
+-0.278747 0.459159 0.077815
+0.241447 0.441898 0.0701
+0.234261 0.42566 0.074883
+-0.266182 0.427832 0.081787
+0.225575 0.408579 0.076901
+-0.257947 0.408177 0.078162
+0.216373 0.391148 0.077071
+-0.248442 0.388654 0.07451
+0.20456 0.373748 0.077175
+-0.238155 0.377522 0.080163
+0.567784 0.339413 0.07695
+0.569416 0.342854 0.060139
+0.535683 0.340922 0.078097
+0.543948 0.347834 0.058799
+0.191168 0.356506 0.077282
+-0.225152 0.358353 0.078489
+0.516152 0.333862 0.076337
+0.501099 0.328002 0.072766
+0.50965 0.335109 0.059569
+0.176284 0.339492 0.078112
+-0.208173 0.337575 0.078145
+0.603185 0.302819 0.080029
+0.591423 0.320905 0.072297
+0.467325 0.309524 0.07995
+0.473264 0.318852 0.057702
+0.452198 0.304609 0.077505
+0.160943 0.322667 0.080728
+-0.192847 0.320872 0.077215
+0.420534 0.291763 0.077759
+0.425358 0.300189 0.060517
+0.146482 0.306371 0.085624
+-0.178543 0.303669 0.078422
+-0.531263 0.304531 0.050521
+-0.548298 0.303282 0.054775
+-0.5648 0.300783 0.0574
+-0.579842 0.294654 0.059592
+0.368101 0.273234 0.076337
+0.371763 0.282887 0.05691
+0.147246 0.290326 0.079373
+-0.168776 0.287517 0.08349
+-0.183526 0.285439 0.065282
+-0.497769 0.288197 0.052161
+-0.515667 0.288214 0.058809
+-0.533254 0.288282 0.064508
+0.633015 0.254909 0.081891
+0.624995 0.271479 0.073341
+0.333282 0.259379 0.076208
+0.338138 0.268469 0.063756
+0.321077 0.26396 0.057796
+0.165365 0.260964 0.077229
+0.153298 0.274272 0.077658
+-0.463876 0.27125 0.052161
+-0.481813 0.271035 0.059104
+-0.499792 0.270837 0.065695
+0.301836 0.254809 0.059466
+0.283564 0.246201 0.059762
+0.197393 0.241359 0.077614
+0.197122 0.250083 0.060726
+-0.430239 0.254559 0.052558
+-0.448055 0.254088 0.059036
+-0.466073 0.253846 0.065447
+-0.617046 0.25387 0.073351
+-0.624696 0.250335 0.057344
+0.650992 0.22368 0.078833
+0.647757 0.234871 0.06432
+0.642536 0.241254 0.074966
+0.265894 0.238864 0.0609
+0.251932 0.232325 0.065359
+0.233628 0.233495 0.066006
+-0.222309 0.232157 0.061943
+-0.382054 0.235776 0.051807
+-0.400153 0.241421 0.053062
+-0.414443 0.238224 0.059229
+-0.432288 0.236958 0.065309
+-0.240069 0.221692 0.057955
+-0.347927 0.218129 0.054569
+-0.365983 0.223183 0.056613
+-0.37718 0.217689 0.062287
+-0.395816 0.222569 0.064064
+0.668465 0.189937 0.078364
+0.665338 0.200466 0.063749
+0.660683 0.207458 0.073895
+-0.259403 0.20925 0.060435
+-0.280223 0.202094 0.059517
+-0.300585 0.205221 0.055093
+-0.316125 0.208279 0.054751
+-0.329722 0.20366 0.060146
+-0.344118 0.199564 0.065095
+-0.362037 0.205027 0.065593
+-0.647283 0.200288 0.076324
+-0.29388 0.190961 0.065371
+-0.311986 0.190447 0.065341
+0.678684 0.157268 0.077867
+0.677703 0.167396 0.063631
+0.67598 0.173743 0.073895
+-0.655796 0.168014 0.066727
+-0.632293 0.154404 0.074075
+-0.648551 0.155202 0.065492
+0.675581 0.144019 0.072109
+0.667836 0.133012 0.075246
+-0.599303 0.138556 0.075504
+-0.617865 0.138398 0.068231
+0.654112 0.124853 0.07704
+0.637363 0.118952 0.078241
+0.619954 0.113007 0.078671
+-0.562844 0.117965 0.072698
+-0.581297 0.123729 0.069916
+0.603425 0.108706 0.077416
+0.586959 0.105058 0.076425
+0.569894 0.101002 0.07821
+-0.514672 0.104056 0.075329
+-0.529847 0.101048 0.069082
+-0.547722 0.106953 0.068378
+0.55495 0.096851 0.08161
+0.5376 0.093747 0.074922
+0.519303 0.089616 0.075935
+0.502038 0.087366 0.07665
+0.484253 0.084956 0.077985
+0.464498 0.081917 0.081165
+-0.44146 0.088887 0.074306
+-0.459191 0.088248 0.071466
+-0.477446 0.089115 0.070376
+-0.497619 0.091812 0.069186
+0.443259 0.07686 0.077357
+0.428116 0.072487 0.073109
+0.414575 0.071219 0.076293
+0.397953 0.068981 0.077825
+0.379964 0.064316 0.081266
+-0.371877 0.070542 0.075743
+-0.389424 0.069985 0.070931
+-0.410493 0.07085 0.067
+-0.428849 0.079183 0.069469
+0.365061 0.05059 0.081169
+-0.381034 0.056888 0.069242
+0.357464 0.033525 0.085827
+-0.38019 0.038151 0.061554
+-0.367094 0.012715 0.075025
+-0.37484 0.017405 0.062057
+0.365645 0.000376 0.077695
+-0.366237 -0.000898 0.081868
+-0.375075 -0.001788 0.063923
+0.376197 -0.017135 0.061156
+0.370478 -0.016638 0.077471
+0.379037 -0.050275 0.07735
+-0.382874 -0.050284 0.071486
+-0.389813 -0.05045 0.053415
+0.382724 -0.067221 0.07735
+-0.382838 -0.067729 0.080704
+-0.391277 -0.06945 0.06067
+0.392107 -0.084262 0.060497
+0.386098 -0.084168 0.07735
+0.389707 -0.101114 0.07735
+0.393002 -0.135007 0.077349
+-0.396135 -0.138463 0.07488
+0.393551 -0.151953 0.077349
+-0.395201 -0.148429 0.07975
+0.393865 -0.168806 0.077255
+-0.398915 -0.16593 0.074724
+-0.406372 -0.169572 0.054391
+0.394044 -0.185591 0.077228
+-0.399566 -0.185483 0.076614
+-0.40596 -0.185483 0.058883
+0.394067 -0.202564 0.07739
+-0.399569 -0.20282 0.077188
+-0.405948 -0.202658 0.060112
+0.3941 -0.219739 0.077349
+-0.399089 -0.219739 0.07735
+-0.405522 -0.219739 0.060403
+0.393977 -0.236914 0.077309
+-0.397912 -0.236686 0.07735
+0.393641 -0.254022 0.077179
+-0.396421 -0.253632 0.07735
+0.393439 -0.270955 0.075709
+-0.395009 -0.270578 0.07735
+0.393675 -0.286829 0.07093
+0.572191 -0.335647 0.074821
+0.387928 -0.304354 0.081559
+-0.513387 -0.328178 0.073517
+-0.53038 -0.321564 0.075543
+-0.548783 -0.320698 0.083993
+0.58066 -0.343694 0.082052
+0.386941 -0.32349 0.074508
+-0.488249 -0.342724 0.077661
+-0.503145 -0.332348 0.079711
+-0.56236 -0.328552 0.07691
+0.537878 -0.340441 0.07635
+0.51755 -0.350286 0.074024
+0.52442 -0.343342 0.059697
+0.383241 -0.338903 0.076822
+-0.387085 -0.338364 0.077977
+-0.467951 -0.356531 0.07406
+-0.575213 -0.340645 0.070799
+0.597271 -0.37299 0.083025
+0.589659 -0.356714 0.07301
+0.378935 -0.352892 0.08034
+-0.387292 -0.354862 0.080457
+-0.393855 -0.354727 0.063676
+-0.447883 -0.369508 0.07636
+-0.585515 -0.356104 0.082002
+0.485783 -0.372344 0.077312
+0.466422 -0.383692 0.074895
+0.472035 -0.37733 0.063328
+0.377391 -0.371279 0.078967
+-0.388833 -0.37041 0.087229
+-0.403432 -0.380256 0.082316
+-0.397044 -0.369387 0.070525
+-0.417733 -0.382652 0.082774
+-0.430701 -0.378052 0.078708
+-0.594677 -0.372764 0.073533
+0.603494 -0.390504 0.077206
+0.44059 -0.399582 0.076738
+0.379054 -0.388774 0.07863
+-0.603058 -0.390642 0.082902
+0.614845 -0.423845 0.082492
+0.608829 -0.40745 0.071558
+0.403089 -0.413704 0.085105
+0.40557 -0.400695 0.065039
+0.388107 -0.404758 0.079953
+-0.611439 -0.407033 0.073686
+-0.619804 -0.424616 0.082714
+0.620441 -0.441343 0.077206
+-0.627922 -0.440832 0.073771
+0.631792 -0.474684 0.082492
+0.625775 -0.458289 0.071558
+-0.635021 -0.457469 0.083101
+0.637387 -0.492182 0.077206
+-0.652478 -0.494418 0.080481
+0.648716 -0.525591 0.082582
+0.642722 -0.509129 0.071558
+-0.662485 -0.525844 0.073639
+0.654257 -0.543062 0.077323
+-0.662469 -0.535146 0.079529
+0.66093 -0.574831 0.080209
+0.658794 -0.55978 0.070867
+-0.647701 -0.557861 0.078385
+-0.657931 -0.546027 0.078796
+-0.581484 -0.580531 0.076797
+-0.598242 -0.575312 0.077012
+-0.615843 -0.571006 0.077645
+-0.632969 -0.565425 0.077712
+0.658383 -0.590006 0.070768
+-0.528058 -0.599417 0.078402
+-0.546256 -0.593623 0.078092
+-0.564336 -0.586947 0.077837
+0.649163 -0.599945 0.075874
+0.635803 -0.606666 0.077367
+0.621206 -0.609917 0.078712
+0.608324 -0.611061 0.08224
+0.590648 -0.613601 0.079713
+0.552326 -0.613743 0.076804
+0.53194 -0.613986 0.080458
+0.512183 -0.615205 0.077036
+0.495004 -0.617594 0.075789
+0.480317 -0.62034 0.072669
+-0.462514 -0.615569 0.078492
+-0.478439 -0.610667 0.07967
+-0.491866 -0.608232 0.083028
+-0.508571 -0.604549 0.082059
+0.569633 -0.615551 0.069973
+0.467513 -0.62372 0.076112
+0.451364 -0.626794 0.078523
+0.437806 -0.628063 0.082911
+0.419145 -0.631011 0.081864
+-0.429356 -0.629624 0.077443
+-0.446141 -0.621848 0.077605
+0.396493 -0.63845 0.075429
+0.381646 -0.642144 0.077315
+0.36669 -0.645541 0.080273
+-0.396055 -0.64421 0.077188
+-0.412629 -0.63703 0.077538
+0.345422 -0.652983 0.07645
+0.328193 -0.655983 0.081179
+0.314069 -0.661995 0.077561
+0.211695 -0.659275 0.081564
+0.193558 -0.658564 0.083303
+0.179031 -0.664793 0.078528
+-0.172696 -0.666432 0.082369
+-0.188874 -0.665391 0.080188
+-0.209502 -0.666238 0.081731
+-0.329143 -0.665148 0.076318
+-0.346055 -0.660185 0.077332
+-0.363288 -0.655986 0.077023
+-0.379835 -0.650352 0.076596
+0.295631 -0.667948 0.074338
+0.275705 -0.670191 0.076129
+0.258081 -0.671042 0.075084
+0.24111 -0.669227 0.074638
+0.226705 -0.666199 0.07433
+0.161397 -0.671791 0.076964
+0.143612 -0.679783 0.076883
+-0.143261 -0.680343 0.07619
+-0.159491 -0.672707 0.077847
+-0.227326 -0.672219 0.077525
+-0.240718 -0.678353 0.072346
+-0.256851 -0.679173 0.074543
+-0.277576 -0.678941 0.073313
+-0.297826 -0.672458 0.078313
+-0.315375 -0.670064 0.073455
+0.125139 -0.687043 0.075723
+0.108051 -0.690581 0.081041
+0.094143 -0.69724 0.077204
+-0.089617 -0.697358 0.080096
+-0.109167 -0.692413 0.076882
+-0.12907 -0.68719 0.073287
+0.075959 -0.703766 0.073828
+0.056244 -0.706301 0.077352
+0.040857 -0.707843 0.080554
+0.030437 -0.71299 0.073647
+0.014903 -0.713737 0.075762
+-0.003444 -0.713743 0.07617
+-0.023 -0.713388 0.074396
+-0.042516 -0.707265 0.079522
+-0.063042 -0.704802 0.077069
+-0.078884 -0.70264 0.074504
+0.062678 0.810903 0.060076
+0.045445 0.814616 0.060386
+0.028664 0.818956 0.059152
+0.028583 0.824128 0.042555
+-0.05947 0.81742 0.062819
+-0.053145 0.824908 0.039502
+-0.076528 0.813558 0.063983
+-0.087948 0.81285 0.057714
+0.095768 0.799862 0.060188
+0.095513 0.804155 0.043362
+-0.125251 0.799632 0.062711
+-0.117974 0.807739 0.043224
+0.129406 0.783113 0.060309
+0.129311 0.787711 0.043457
+-0.14573 0.791618 0.060027
+-0.16125 0.785381 0.056304
+-0.1543 0.793279 0.042647
+0.162828 0.760769 0.060659
+-0.191184 0.776702 0.041013
+0.178729 0.747414 0.061312
+0.178826 0.754453 0.044729
+-0.194959 0.761745 0.06262
+-0.210824 0.761763 0.04382
+0.196208 0.728402 0.061247
+0.190616 0.742233 0.04753
+-0.215025 0.745422 0.060843
+-0.228656 0.745297 0.043538
+-0.231527 0.728548 0.060107
+-0.246093 0.725721 0.04211
+-0.244107 0.711023 0.06078
+0.231015 0.67878 0.061038
+0.229987 0.697511 0.043486
+0.22 0.69925 0.057844
+-0.264641 0.676903 0.059553
+-0.274535 0.673905 0.040849
+0.246883 0.644421 0.061614
+-0.277491 0.644269 0.059769
+0.261364 0.627649 0.044152
+0.252714 0.627622 0.060632
+-0.281213 0.629771 0.060686
+-0.288521 0.623825 0.038847
+0.260255 0.593689 0.060403
+0.262194 0.576675 0.060336
+-0.292402 0.573658 0.056664
+0.262541 0.559594 0.059887
+-0.292971 0.560459 0.058726
+0.262449 0.543361 0.058655
+-0.293211 0.543593 0.059488
+0.262225 0.530224 0.055783
+-0.292815 0.526038 0.060269
+0.258913 0.512073 0.060786
+-0.291919 0.508957 0.060403
+0.258113 0.492921 0.05321
+-0.29074 0.49197 0.060632
+0.251648 0.472181 0.062106
+0.247276 0.454522 0.063262
+-0.284066 0.461873 0.064297
+0.246264 0.44354 0.056877
+-0.279979 0.44358 0.058922
+0.240228 0.427216 0.056497
+-0.270259 0.422623 0.063745
+0.232397 0.411802 0.062637
+-0.263243 0.404592 0.058967
+0.224021 0.3935 0.05841
+-0.254638 0.393077 0.063148
+0.55819 0.348868 0.055373
+0.212072 0.374824 0.060029
+-0.243253 0.373992 0.060768
+0.581031 0.333465 0.065905
+0.526727 0.342808 0.060242
+0.199252 0.35708 0.05995
+-0.231054 0.35527 0.059073
+0.492943 0.327517 0.058972
+0.184769 0.339627 0.060896
+-0.219756 0.344222 0.064528
+0.604254 0.307356 0.057977
+0.597956 0.318964 0.046603
+0.592398 0.323792 0.057856
+0.451364 0.309259 0.062937
+0.459292 0.316517 0.043222
+0.437372 0.305044 0.061008
+0.171017 0.322479 0.063541
+-0.208704 0.329406 0.060867
+-0.528932 0.319256 0.035343
+-0.545762 0.318127 0.040045
+-0.561982 0.313914 0.041868
+-0.576474 0.30608 0.044519
+0.615603 0.288204 0.066008
+0.405089 0.292122 0.062328
+0.387902 0.288349 0.056713
+0.158215 0.305721 0.069363
+-0.194649 0.308225 0.057737
+-0.495716 0.303825 0.03686
+-0.513608 0.304677 0.045024
+0.352846 0.275371 0.060513
+0.357812 0.282263 0.042325
+0.160089 0.288896 0.06269
+-0.193525 0.288546 0.044954
+-0.461823 0.286879 0.03686
+-0.479805 0.287887 0.045484
+-0.595169 0.283527 0.062675
+0.637143 0.254509 0.060934
+0.631209 0.268192 0.047322
+0.626103 0.274031 0.058429
+0.306588 0.264668 0.042563
+0.181204 0.260119 0.060269
+0.18257 0.269159 0.042946
+0.168087 0.272965 0.060367
+-0.187303 0.267338 0.0665
+-0.193629 0.270918 0.052222
+-0.428428 0.270053 0.038082
+-0.445979 0.270941 0.045573
+-0.610175 0.269338 0.059422
+0.268915 0.250591 0.041535
+0.213945 0.242072 0.062353
+0.213999 0.249956 0.045034
+-0.198721 0.254885 0.06174
+-0.212192 0.244045 0.056878
+-0.206502 0.255951 0.044924
+-0.377796 0.252753 0.03558
+-0.396101 0.254273 0.041094
+-0.413337 0.254936 0.046927
+-0.325804 0.23491 0.034391
+-0.343817 0.235842 0.039719
+-0.362503 0.236799 0.04544
+-0.636437 0.232484 0.062389
+0.657413 0.21823 0.059415
+-0.255948 0.220191 0.046825
+-0.271271 0.217073 0.044405
+-0.291403 0.219992 0.040697
+-0.31166 0.220869 0.044074
+-0.328969 0.220626 0.04905
+-0.644576 0.219402 0.055897
+-0.651673 0.202599 0.064106
+0.673045 0.184406 0.059188
+-0.659158 0.188238 0.055043
+-0.661251 0.17445 0.059461
+0.676269 0.153604 0.058024
+-0.661087 0.159443 0.054237
+0.667803 0.13916 0.059322
+-0.637198 0.139373 0.058989
+-0.653107 0.146431 0.053802
+0.654978 0.12982 0.06069
+0.638897 0.122626 0.060877
+0.621771 0.117661 0.061546
+-0.603349 0.122793 0.059746
+-0.621669 0.127865 0.055233
+0.608152 0.112949 0.06482
+0.593047 0.110275 0.060954
+0.57291 0.107544 0.058229
+0.552243 0.100849 0.06298
+0.53429 0.0986 0.05724
+-0.568741 0.106663 0.059239
+-0.587087 0.111975 0.055462
+0.522942 0.094099 0.061959
+0.504794 0.091916 0.057144
+0.485495 0.086597 0.059905
+0.467616 0.082389 0.061012
+-0.518311 0.089159 0.05983
+-0.53844 0.093663 0.0573
+-0.553818 0.097184 0.054681
+0.449472 0.077301 0.060891
+0.432213 0.072209 0.059959
+0.416947 0.069124 0.060403
+0.40192 0.065874 0.061412
+0.386307 0.060144 0.062922
+-0.430265 0.066646 0.056922
+-0.448823 0.075329 0.06038
+-0.469888 0.077268 0.058397
+-0.487646 0.079124 0.057466
+-0.502699 0.080916 0.055057
+0.374493 0.052296 0.067024
+-0.398524 0.053498 0.058434
+-0.416751 0.059159 0.054128
+0.366758 0.035844 0.066428
+0.367682 0.01669 0.062114
+0.376007 -0.003357 0.04754
+0.37154 -0.000615 0.061026
+-0.378883 -0.015742 0.06125
+0.380621 -0.033517 0.060591
+-0.382375 -0.03087 0.06126
+-0.390683 -0.036204 0.040114
+0.384139 -0.050504 0.060363
+0.393172 -0.068122 0.044407
+0.388445 -0.067477 0.060524
+-0.395997 -0.086918 0.057087
+0.395277 -0.101114 0.060403
+-0.395756 -0.097642 0.06248
+0.39716 -0.118061 0.060403
+-0.399563 -0.115629 0.058178
+-0.406372 -0.118733 0.03731
+0.397709 -0.135007 0.060403
+-0.400898 -0.136024 0.060982
+-0.406337 -0.135482 0.042582
+0.397945 -0.151953 0.060403
+-0.401275 -0.152209 0.065303
+-0.407354 -0.155343 0.045232
+0.398258 -0.1689 0.060403
+0.398964 -0.185846 0.060403
+0.399626 -0.202927 0.060269
+0.399884 -0.220452 0.06004
+0.399393 -0.237977 0.06078
+-0.404346 -0.236686 0.060403
+0.398698 -0.254573 0.060811
+-0.403404 -0.253632 0.060403
+-0.408582 -0.253632 0.043457
+0.398312 -0.270229 0.058838
+-0.401756 -0.270578 0.060403
+-0.407327 -0.270578 0.043457
+0.397957 -0.283398 0.055815
+-0.400109 -0.287525 0.060403
+-0.406072 -0.287525 0.043457
+0.569031 -0.334019 0.061712
+0.394485 -0.301436 0.060866
+-0.397834 -0.304471 0.060403
+-0.519441 -0.32843 0.060824
+-0.531103 -0.324068 0.061584
+-0.545299 -0.323929 0.063839
+0.580324 -0.34262 0.065993
+0.554111 -0.332244 0.059337
+0.539787 -0.334966 0.055944
+0.393781 -0.320392 0.053479
+-0.395245 -0.321418 0.060403
+-0.49944 -0.339044 0.060666
+-0.562808 -0.330612 0.058919
+0.387624 -0.340814 0.063247
+-0.393832 -0.338364 0.061031
+-0.467587 -0.360693 0.055682
+-0.480173 -0.350418 0.062563
+-0.575596 -0.340701 0.053384
+0.596739 -0.375038 0.063023
+0.588051 -0.355297 0.055431
+0.503588 -0.355737 0.06
+0.48445 -0.367211 0.057675
+0.492698 -0.359814 0.043007
+0.383821 -0.358781 0.066644
+-0.449486 -0.370525 0.055908
+-0.586154 -0.355406 0.0636
+0.385535 -0.372647 0.062847
+-0.413122 -0.378473 0.066567
+-0.430575 -0.377519 0.060713
+-0.595454 -0.371763 0.055042
+0.603495 -0.393492 0.063185
+0.453275 -0.38751 0.060223
+0.430752 -0.398022 0.060996
+0.438434 -0.389425 0.041025
+0.418178 -0.401679 0.062555
+0.405268 -0.38699 0.045224
+0.392117 -0.388194 0.061942
+-0.603784 -0.389432 0.064913
+0.614156 -0.426039 0.062781
+0.606905 -0.406311 0.054758
+-0.612215 -0.405853 0.055803
+-0.62045 -0.423392 0.065003
+0.620441 -0.444331 0.063185
+-0.628881 -0.439814 0.055893
+0.631103 -0.476878 0.062781
+0.623852 -0.45715 0.054758
+-0.636982 -0.457469 0.065683
+-0.64544 -0.474483 0.056471
+0.637388 -0.49517 0.063185
+-0.653162 -0.492039 0.06557
+0.648049 -0.527717 0.062781
+0.640798 -0.507989 0.054758
+-0.657866 -0.506863 0.056103
+-0.660943 -0.520132 0.062997
+0.654334 -0.546009 0.063185
+-0.658211 -0.534457 0.063792
+0.660159 -0.577393 0.059784
+0.656924 -0.558748 0.05414
+-0.582318 -0.567673 0.060147
+-0.599771 -0.562376 0.059824
+-0.617784 -0.558547 0.060106
+-0.634565 -0.55445 0.061304
+-0.648348 -0.546842 0.062209
+-0.54851 -0.581551 0.060658
+-0.565425 -0.57353 0.06047
+0.657734 -0.592927 0.055379
+-0.512862 -0.597201 0.061934
+-0.531089 -0.589085 0.060631
+0.650138 -0.601099 0.058695
+0.636865 -0.607545 0.061344
+0.624249 -0.610759 0.065674
+0.606429 -0.614096 0.06456
+0.552362 -0.615861 0.058215
+0.535111 -0.612733 0.060523
+0.517187 -0.612605 0.060904
+0.499774 -0.614413 0.060188
+0.483137 -0.617921 0.059502
+-0.461367 -0.614977 0.061913
+-0.4752 -0.610309 0.065969
+-0.492628 -0.604855 0.065666
+0.583361 -0.618466 0.056511
+0.565833 -0.618785 0.054301
+0.467222 -0.622292 0.059569
+0.450732 -0.627 0.060918
+0.431604 -0.631595 0.064487
+-0.427724 -0.630644 0.061156
+-0.444411 -0.622247 0.06082
+0.410667 -0.637703 0.061508
+0.395906 -0.643223 0.05769
+0.379868 -0.647282 0.062354
+-0.395526 -0.646131 0.060591
+-0.411719 -0.638176 0.061156
+0.359585 -0.654524 0.061046
+0.346822 -0.659212 0.061351
+0.332158 -0.663258 0.063298
+0.215835 -0.668582 0.065394
+0.197466 -0.667778 0.065008
+-0.345377 -0.664835 0.060215
+-0.36227 -0.65898 0.060537
+-0.378992 -0.652838 0.06047
+0.311941 -0.671681 0.05833
+0.29902 -0.675334 0.059611
+0.286731 -0.677507 0.059559
+0.268365 -0.679381 0.058968
+0.247721 -0.678529 0.056622
+0.229317 -0.673057 0.060286
+0.176271 -0.674285 0.058597
+0.156716 -0.681378 0.05999
+-0.159518 -0.681205 0.060739
+-0.178311 -0.674164 0.064242
+-0.199678 -0.673274 0.063093
+-0.215266 -0.674819 0.065406
+-0.229186 -0.680687 0.060228
+-0.295596 -0.681119 0.059337
+-0.312418 -0.675733 0.059857
+-0.328996 -0.670374 0.05965
+0.139353 -0.688368 0.060575
+0.127571 -0.693167 0.061164
+0.112806 -0.697317 0.062874
+-0.126405 -0.695806 0.059146
+-0.14284 -0.688331 0.059529
+-0.247856 -0.685644 0.056138
+-0.267181 -0.686266 0.058134
+-0.282314 -0.685696 0.055792
+0.092321 -0.705965 0.057751
+0.078819 -0.709666 0.059504
+0.066092 -0.712402 0.060093
+0.045269 -0.715814 0.061992
+-0.037855 -0.716332 0.06325
+-0.055665 -0.714863 0.058775
+-0.075017 -0.710338 0.060079
+-0.094378 -0.704519 0.062048
+-0.112437 -0.701578 0.056856
+0.023798 -0.720227 0.056689
+0.004239 -0.720873 0.059277
+-0.013365 -0.720613 0.059363
+-0.027953 -0.72012 0.057137
+0.012735 0.827188 0.042555
+-0.003871 0.828098 0.042972
+-0.020871 0.828093 0.042085
+-0.034865 0.827939 0.038195
+-0.296728 0.84364 0.018222
+-0.314691 0.842711 0.018262
+0.078728 0.81058 0.043336
+0.061754 0.81487 0.043497
+0.044767 0.819815 0.043268
+0.044673 0.823848 0.026416
+-0.076344 0.818524 0.046245
+-0.069305 0.825206 0.023067
+-0.093504 0.81433 0.046655
+-0.103906 0.812937 0.041268
+-0.281775 0.827535 0.019879
+-0.299537 0.825774 0.022964
+-0.312198 0.829577 0.02189
+-0.32722 0.830562 0.018812
+0.112365 0.79689 0.043457
+-0.136166 0.801021 0.043134
+-0.267738 0.814165 0.017782
+-0.282929 0.809542 0.02222
+-0.296152 0.812154 0.023565
+-0.311651 0.813989 0.023307
+-0.324042 0.817894 0.021692
+0.146258 0.777904 0.043457
+-0.171344 0.786068 0.042367
+-0.293282 0.796373 0.022214
+-0.309804 0.79719 0.022536
+-0.329091 0.799712 0.01954
+0.162922 0.767579 0.043779
+0.163016 0.771565 0.026923
+-0.209656 0.776762 0.02828
+-0.226927 0.762176 0.029152
+-0.244201 0.74551 0.028329
+0.346722 0.726378 0.018544
+0.326615 0.727314 0.018929
+0.311219 0.724596 0.017775
+0.214751 0.715998 0.046108
+0.214699 0.731379 0.028236
+0.202795 0.732794 0.04203
+-0.261073 0.728669 0.024691
+0.359226 0.712322 0.019383
+0.343707 0.708074 0.023072
+0.330529 0.711013 0.022827
+0.314323 0.711278 0.021163
+0.298412 0.711641 0.01752
+0.231311 0.714872 0.028745
+-0.254289 0.707488 0.04792
+-0.262957 0.710498 0.033338
+0.348023 0.695018 0.022911
+0.332668 0.695367 0.024306
+0.317492 0.695852 0.022956
+0.301151 0.695367 0.019746
+0.244782 0.697921 0.028802
+-0.264449 0.693181 0.04434
+-0.278365 0.691657 0.025281
+0.351103 0.679524 0.021141
+0.334807 0.679722 0.022827
+0.321737 0.682742 0.023099
+0.24704 0.664366 0.046809
+0.241342 0.683211 0.040994
+0.261805 0.662174 0.030653
+-0.278145 0.659973 0.043973
+0.256202 0.644972 0.044717
+-0.281646 0.645649 0.045586
+-0.289 0.639726 0.023576
+0.264962 0.610635 0.044085
+-0.29188 0.606444 0.037947
+0.266329 0.593554 0.04395
+-0.292691 0.593505 0.042834
+0.266759 0.575972 0.043532
+-0.294317 0.577678 0.044489
+0.265927 0.558555 0.043505
+-0.295445 0.564137 0.046148
+0.264678 0.542607 0.043353
+-0.2983 0.546537 0.040298
+-0.303922 0.542852 0.019035
+0.263551 0.526787 0.043081
+-0.297156 0.52658 0.042766
+0.262632 0.510284 0.041691
+-0.295427 0.509024 0.043389
+0.262182 0.496735 0.037414
+-0.293903 0.491943 0.043524
+0.258672 0.478595 0.039073
+-0.291534 0.474785 0.044273
+0.251708 0.455578 0.046503
+-0.287388 0.456359 0.046507
+0.247093 0.438269 0.046353
+-0.282972 0.438654 0.040791
+0.243902 0.425121 0.037691
+-0.276299 0.424674 0.044594
+0.234832 0.406178 0.044032
+-0.268653 0.410205 0.048402
+0.225274 0.387374 0.040559
+-0.25881 0.390947 0.04459
+0.570434 0.345142 0.043479
+0.555258 0.350309 0.042493
+0.218234 0.376894 0.045868
+-0.247867 0.37197 0.042203
+0.585413 0.333328 0.047484
+0.538746 0.348707 0.043246
+0.521741 0.343033 0.04343
+0.206007 0.358884 0.04084
+-0.237811 0.36067 0.047688
+0.50484 0.335129 0.04304
+0.488137 0.327936 0.042186
+0.474514 0.322797 0.039173
+0.191317 0.340134 0.043608
+-0.225509 0.344208 0.047183
+-0.526004 0.329783 0.020821
+-0.541135 0.329931 0.023796
+-0.5574 0.326149 0.025858
+0.439002 0.308642 0.045948
+0.178145 0.322801 0.046214
+-0.210785 0.324772 0.042267
+-0.492299 0.314316 0.022328
+-0.510218 0.319627 0.026265
+0.62004 0.286557 0.04611
+0.608676 0.30596 0.038233
+0.417658 0.301432 0.040971
+0.396719 0.294087 0.043492
+0.406863 0.299309 0.025939
+0.382122 0.289259 0.045579
+0.372431 0.287476 0.040001
+0.168246 0.305304 0.052024
+-0.200678 0.306304 0.035758
+-0.458407 0.29737 0.022328
+-0.476368 0.303018 0.026653
+-0.588445 0.296497 0.048996
+0.337435 0.27492 0.045312
+0.320612 0.270645 0.04046
+0.172341 0.28723 0.042423
+-0.424364 0.280396 0.023819
+-0.442475 0.286114 0.026949
+-0.59965 0.285796 0.045168
+0.289024 0.257738 0.042429
+0.197429 0.257909 0.043618
+-0.373509 0.263414 0.021184
+-0.391356 0.268772 0.022557
+-0.41103 0.269373 0.031052
+-0.614294 0.268338 0.040298
+0.648906 0.23703 0.04905
+0.640897 0.254161 0.039842
+0.247638 0.243465 0.048205
+0.2554 0.252284 0.027867
+0.228315 0.243908 0.049539
+0.234177 0.250559 0.030641
+-0.321905 0.244338 0.021183
+-0.337137 0.24718 0.024321
+-0.357681 0.252352 0.026954
+-0.626355 0.250872 0.04074
+-0.226411 0.239433 0.042012
+-0.245698 0.228653 0.040437
+-0.242153 0.235835 0.025753
+-0.289098 0.231141 0.023926
+-0.306712 0.234618 0.02669
+-0.63602 0.236243 0.047923
+0.665767 0.203141 0.048372
+0.658435 0.22102 0.039381
+-0.644691 0.221177 0.038902
+-0.653706 0.204527 0.048321
+0.675666 0.17066 0.048453
+0.671796 0.187848 0.039
+-0.660248 0.191704 0.04143
+-0.665652 0.174879 0.043778
+-0.670138 0.168424 0.024478
+0.67332 0.159556 0.041056
+-0.668169 0.159637 0.03927
+0.667492 0.147387 0.043792
+0.655258 0.136353 0.044756
+-0.650727 0.136935 0.042511
+-0.66296 0.14812 0.042071
+0.642283 0.129372 0.047134
+0.624104 0.125943 0.042664
+0.603853 0.118016 0.047351
+0.583579 0.115906 0.043903
+0.568164 0.11478 0.040457
+-0.617888 0.118486 0.042585
+-0.634892 0.127529 0.042556
+0.55733 0.109649 0.046484
+0.541358 0.107545 0.043869
+0.518635 0.102185 0.042104
+0.498747 0.09728 0.03882
+-0.583709 0.103417 0.042506
+-0.600861 0.110894 0.042625
+0.485079 0.091679 0.042246
+0.468213 0.085791 0.043295
+0.451002 0.080083 0.043591
+-0.532214 0.085778 0.042312
+-0.549954 0.090689 0.042152
+-0.566735 0.096912 0.042291
+0.433831 0.0743 0.043658
+0.417432 0.068739 0.044559
+0.405005 0.065323 0.048008
+0.391316 0.058781 0.046025
+-0.447455 0.065004 0.043206
+-0.464872 0.069626 0.043789
+-0.481715 0.072135 0.043726
+-0.497648 0.074634 0.04295
+-0.514326 0.079891 0.042285
+0.377049 0.046224 0.049497
+-0.414414 0.049706 0.041707
+-0.430809 0.058251 0.04217
+0.370618 0.029878 0.049829
+-0.398249 0.035852 0.040323
+0.372962 0.014206 0.043412
+-0.385749 0.018661 0.045362
+-0.380991 0.004207 0.049847
+0.380295 -0.016843 0.044475
+-0.383906 -0.014217 0.047375
+-0.391694 -0.020612 0.024579
+0.384461 -0.034001 0.043322
+0.392619 -0.054858 0.031121
+0.389041 -0.051566 0.043833
+-0.394834 -0.05263 0.039645
+-0.395519 -0.063738 0.045234
+0.39694 -0.084356 0.043802
+-0.400055 -0.081948 0.041165
+-0.40599 -0.084998 0.019686
+0.398808 -0.101114 0.043457
+-0.401132 -0.100782 0.047781
+-0.407178 -0.104172 0.02695
+0.399592 -0.118061 0.043457
+0.399828 -0.135007 0.043457
+0.400354 -0.152021 0.043389
+0.401477 -0.169129 0.043416
+-0.41034 -0.173403 0.038954
+0.40794 -0.186882 0.027169
+0.403329 -0.186169 0.04351
+-0.410407 -0.186613 0.041587
+0.404952 -0.203506 0.042937
+-0.410443 -0.20282 0.042981
+0.405164 -0.223082 0.04127
+-0.41023 -0.219739 0.043457
+0.402284 -0.24135 0.047798
+-0.409759 -0.236686 0.043457
+0.401922 -0.254933 0.044586
+0.400896 -0.271005 0.043326
+0.399456 -0.287098 0.043587
+0.567078 -0.33297 0.045268
+0.398282 -0.303238 0.041942
+-0.403686 -0.304377 0.043551
+-0.530406 -0.328891 0.047657
+-0.549372 -0.327848 0.044674
+0.578865 -0.341336 0.050244
+0.551342 -0.330872 0.040052
+0.532219 -0.3362 0.042994
+0.54201 -0.331972 0.025864
+0.397846 -0.316624 0.037645
+-0.40073 -0.321162 0.043578
+-0.502029 -0.343965 0.041126
+-0.513161 -0.334933 0.047758
+-0.564689 -0.332261 0.042604
+0.517311 -0.344888 0.046687
+0.50735 -0.349927 0.040928
+0.395148 -0.334441 0.040334
+-0.397993 -0.338135 0.044044
+-0.482577 -0.355069 0.042272
+-0.574827 -0.339639 0.039432
+0.585622 -0.351629 0.041094
+0.390408 -0.355347 0.050747
+-0.398215 -0.354638 0.046595
+-0.444892 -0.376269 0.037803
+-0.460604 -0.36788 0.041097
+-0.58631 -0.354062 0.043311
+-0.590811 -0.360145 0.023413
+0.600719 -0.389042 0.049101
+0.593185 -0.369233 0.041132
+0.472888 -0.372381 0.045366
+0.456801 -0.381181 0.039668
+0.395173 -0.371802 0.045021
+-0.40307 -0.368759 0.053445
+-0.415405 -0.377152 0.046805
+-0.430929 -0.378631 0.042117
+-0.597133 -0.372018 0.037409
+0.419061 -0.395208 0.050172
+0.422382 -0.386573 0.028664
+-0.604743 -0.388413 0.047035
+0.604129 -0.401861 0.040674
+-0.612861 -0.404629 0.038092
+0.617665 -0.439881 0.049101
+0.610414 -0.420153 0.041078
+-0.621226 -0.422212 0.04712
+-0.629608 -0.438603 0.037904
+0.621075 -0.4527 0.040674
+-0.637966 -0.456549 0.047183
+0.634612 -0.49072 0.049101
+0.627361 -0.470992 0.041078
+-0.645897 -0.474127 0.037763
+-0.652933 -0.490941 0.04799
+0.638022 -0.50354 0.040674
+-0.656239 -0.504476 0.041804
+0.651558 -0.541559 0.049101
+0.644307 -0.521831 0.041078
+-0.656322 -0.519685 0.046532
+-0.601818 -0.548656 0.040221
+-0.622344 -0.546674 0.044071
+-0.637109 -0.54485 0.048051
+-0.647351 -0.534712 0.045427
+0.654406 -0.554282 0.040448
+-0.549299 -0.569134 0.044209
+-0.565681 -0.561287 0.043644
+-0.582869 -0.554194 0.042676
+0.657284 -0.58893 0.041954
+0.657939 -0.571453 0.039218
+-0.532672 -0.57752 0.043702
+-0.497184 -0.596943 0.045646
+-0.51508 -0.587433 0.043594
+0.64979 -0.600582 0.04212
+0.636603 -0.607751 0.043989
+0.618518 -0.61301 0.047979
+0.536461 -0.613515 0.042502
+0.518922 -0.611772 0.043456
+0.501594 -0.612703 0.043524
+0.484621 -0.616381 0.043362
+-0.457251 -0.614459 0.044563
+-0.477242 -0.605948 0.048293
+0.597499 -0.617899 0.043938
+0.582758 -0.620879 0.03959
+0.569934 -0.62079 0.04194
+0.55373 -0.617299 0.041718
+0.467894 -0.621292 0.043268
+0.451065 -0.626692 0.043497
+0.433615 -0.632409 0.044361
+-0.424206 -0.631811 0.047382
+-0.439214 -0.623048 0.044253
+0.415906 -0.638356 0.045217
+0.402134 -0.642997 0.04732
+0.387601 -0.648869 0.044066
+-0.393988 -0.647104 0.044398
+-0.410629 -0.638419 0.044468
+0.367996 -0.656595 0.041732
+0.346356 -0.663791 0.045951
+-0.361476 -0.661351 0.043645
+-0.377827 -0.654416 0.04421
+0.325776 -0.671953 0.044042
+0.313286 -0.676645 0.044076
+0.299795 -0.680095 0.045374
+0.229653 -0.679197 0.042842
+0.210578 -0.674287 0.047214
+0.189633 -0.675665 0.044813
+0.177984 -0.678326 0.043745
+0.166467 -0.682717 0.043582
+-0.176406 -0.681826 0.044143
+-0.194827 -0.678973 0.044855
+-0.215247 -0.6809 0.046904
+-0.311018 -0.681066 0.043241
+-0.32787 -0.674821 0.043336
+-0.344655 -0.668005 0.043362
+0.278265 -0.685402 0.040191
+0.258247 -0.68542 0.04151
+0.243029 -0.683462 0.038873
+0.149015 -0.689667 0.043927
+0.129093 -0.697272 0.046079
+-0.142208 -0.695291 0.04308
+-0.159007 -0.687977 0.043497
+-0.235104 -0.686827 0.042703
+-0.249745 -0.690867 0.038857
+-0.262958 -0.691138 0.041923
+-0.279022 -0.690084 0.042515
+-0.294802 -0.686587 0.042717
+0.107885 -0.706457 0.041192
+0.093591 -0.710913 0.043215
+0.079477 -0.714278 0.045276
+-0.071288 -0.716858 0.046043
+-0.089511 -0.71417 0.041048
+-0.108844 -0.708155 0.042694
+-0.125813 -0.701861 0.04269
+0.057286 -0.720143 0.040668
+0.036697 -0.723263 0.041968
+0.021547 -0.725573 0.038845
+0.008112 -0.725473 0.042142
+-0.008717 -0.725313 0.04304
+-0.025623 -0.724744 0.043176
+-0.043518 -0.721815 0.045451
+-0.060867 -0.720583 0.040949
+-0.263107 0.894456 0.00125
+-0.282935 0.897629 0.002522
+-0.300783 0.898523 0.002919
+-0.318249 0.89835 0.002719
+-0.335482 0.897184 0.001976
+-0.350207 0.894017 0.001169
+-0.247384 0.877881 0.003313
+-0.264223 0.877592 0.007142
+-0.277537 0.881025 0.007738
+-0.294954 0.881062 0.00839
+-0.313115 0.881102 0.008233
+-0.330582 0.881388 0.007238
+-0.347238 0.880877 0.005812
+-0.363153 0.880944 0.002618
+-0.231472 0.861045 0.003653
+-0.24768 0.860823 0.007946
+-0.260272 0.864693 0.009254
+-0.272737 0.868045 0.010232
+-0.287468 0.864573 0.01245
+-0.308987 0.860966 0.013581
+-0.32843 0.864061 0.010948
+-0.345686 0.86467 0.009041
+-0.36248 0.864643 0.006521
+-0.379176 0.864738 0.002394
+0.027978 0.827896 0.026322
+0.011251 0.82981 0.026416
+-0.005534 0.830268 0.026255
+-0.021907 0.830044 0.025367
+-0.037947 0.829349 0.024304
+-0.051536 0.828588 0.021108
+-0.2179 0.846179 0.003025
+-0.231869 0.84428 0.007542
+-0.244106 0.848024 0.009313
+-0.256586 0.851894 0.010815
+-0.273443 0.850877 0.014097
+-0.327959 0.846483 0.015005
+-0.344857 0.847522 0.011742
+-0.362068 0.847818 0.008926
+-0.379082 0.847885 0.005564
+-0.39584 0.848114 -0.000285
+0.094943 0.807336 0.026537
+0.078127 0.813601 0.026698
+0.061431 0.819015 0.026604
+0.061113 0.821738 0.009685
+-0.092174 0.818523 0.02976
+-0.083262 0.824219 0.009329
+-0.109486 0.81361 0.030062
+-0.228388 0.830697 0.008224
+-0.241206 0.835086 0.010294
+-0.25841 0.834853 0.014103
+-0.34379 0.83032 0.014736
+-0.361521 0.83032 0.010563
+-0.378947 0.830804 0.007032
+-0.396028 0.831006 0.001831
+0.129244 0.791096 0.026443
+0.112074 0.800129 0.026376
+-0.125414 0.809669 0.023632
+-0.146827 0.802714 0.025715
+-0.138345 0.810988 0.005457
+-0.194246 0.810545 0.008096
+-0.212861 0.808277 0.009686
+-0.227568 0.813091 0.009583
+-0.246554 0.817565 0.012644
+-0.339106 0.814352 0.017412
+-0.359637 0.810827 0.012178
+-0.378154 0.813374 0.007817
+-0.395333 0.813925 0.00265
+0.345846 0.792681 0.001359
+0.325946 0.795167 0.000861
+0.310563 0.793981 0.000368
+0.146258 0.78214 0.02651
+-0.165104 0.795809 0.027232
+-0.181794 0.790049 0.027614
+-0.177296 0.802087 0.015044
+-0.196108 0.786642 0.025314
+-0.191116 0.795931 0.017869
+-0.207859 0.793449 0.01621
+-0.226877 0.795538 0.012249
+-0.244134 0.797655 0.01222
+-0.261327 0.798435 0.015959
+-0.277609 0.797248 0.019923
+-0.350353 0.796123 0.014519
+-0.365359 0.79344 0.010531
+-0.37741 0.796656 0.007848
+-0.393513 0.797073 0.002818
+0.379794 0.776511 0.001767
+0.35929 0.778428 0.005016
+0.344175 0.775408 0.007637
+0.330287 0.77853 0.006976
+0.31331 0.779671 0.005925
+0.295072 0.781801 0.002712
+0.277741 0.776634 0.001524
+0.179084 0.76035 0.028241
+-0.226285 0.778847 0.018503
+-0.243577 0.780088 0.013811
+-0.260371 0.781525 0.013844
+-0.273363 0.784651 0.016432
+-0.288041 0.781202 0.018652
+-0.305221 0.780301 0.019145
+-0.323315 0.780005 0.017534
+-0.344213 0.777311 0.013774
+-0.362713 0.779996 0.009986
+-0.375186 0.783544 0.007709
+0.395875 0.75977 0.003268
+0.379556 0.759105 0.00734
+0.366341 0.762404 0.008438
+0.349875 0.762077 0.010002
+0.33291 0.761566 0.010737
+0.315538 0.762319 0.009955
+0.298003 0.76323 0.008178
+0.28073 0.763149 0.006237
+0.264725 0.764072 0.003265
+0.196078 0.746576 0.030475
+-0.24351 0.762929 0.018789
+-0.26082 0.763866 0.013793
+-0.279432 0.766634 0.014457
+-0.299796 0.76396 0.015048
+-0.317321 0.763247 0.014777
+-0.334472 0.762355 0.012743
+-0.348449 0.759778 0.01008
+-0.360861 0.763439 0.008468
+-0.378748 0.76648 0.003924
+0.409613 0.745086 0.002884
+0.395298 0.742751 0.007601
+0.383154 0.746264 0.009188
+0.371104 0.74957 0.01033
+0.356944 0.746582 0.012916
+0.33872 0.744906 0.0148
+0.317824 0.742529 0.014367
+0.299165 0.745655 0.011311
+0.282044 0.746691 0.009321
+0.265424 0.748013 0.00777
+0.247391 0.751493 0.005119
+0.228859 0.751932 0.00382
+0.21124 0.748682 0.011562
+-0.260497 0.746301 0.01778
+-0.277672 0.747014 0.012741
+-0.295242 0.747175 0.01152
+-0.312224 0.747242 0.011101
+-0.328368 0.747013 0.00998
+-0.344341 0.746808 0.008377
+-0.35698 0.74992 0.007056
+0.39862 0.729143 0.008757
+0.385903 0.733338 0.010721
+0.369356 0.73282 0.014178
+0.29852 0.728225 0.014588
+0.282716 0.730175 0.011822
+0.266644 0.731729 0.011125
+0.252439 0.735626 0.010566
+0.233588 0.734761 0.014667
+-0.27652 0.730094 0.014956
+-0.292677 0.730524 0.01035
+-0.309296 0.730897 0.00844
+-0.32291 0.733871 0.007919
+0.427033 0.711023 0.002703
+0.412386 0.707811 0.007588
+0.399117 0.711699 0.010037
+0.380449 0.715756 0.014144
+0.282483 0.713488 0.014742
+0.269083 0.717783 0.013584
+0.251214 0.717685 0.017088
+-0.277222 0.7127 0.019223
+-0.289605 0.716828 0.011365
+0.415352 0.694466 0.007119
+0.399369 0.694601 0.010448
+0.382789 0.695882 0.014536
+0.365085 0.696044 0.018965
+0.28385 0.695976 0.01755
+0.2646 0.69964 0.018864
+-0.295221 0.698491 0.00907
+0.416836 0.678327 0.006348
+0.400109 0.678233 0.009722
+0.383467 0.67865 0.013066
+0.36722 0.679456 0.01705
+0.306854 0.679093 0.020139
+0.288905 0.678156 0.018325
+0.2713 0.679192 0.020973
+0.254609 0.680375 0.029791
+-0.28374 0.672516 0.023547
+-0.292227 0.677203 0.009755
+0.400454 0.661475 0.008231
+0.383467 0.661703 0.011136
+0.366938 0.662766 0.014454
+0.354117 0.666139 0.017775
+0.338721 0.663421 0.018929
+0.318711 0.664533 0.01881
+0.296155 0.658612 0.017142
+0.27743 0.660954 0.021048
+-0.282927 0.659011 0.03174
+-0.290565 0.656849 0.011489
+0.400799 0.644716 0.00605
+0.383915 0.644622 0.008749
+0.366489 0.645106 0.01102
+0.347489 0.648067 0.014251
+0.326271 0.64564 0.014879
+0.307733 0.643923 0.014253
+0.293306 0.640094 0.015047
+0.281427 0.643295 0.020246
+0.26805 0.644434 0.030209
+0.385525 0.6282 0.005326
+0.368094 0.627366 0.00744
+0.349946 0.627756 0.00935
+0.331632 0.62816 0.010605
+0.313404 0.627461 0.011493
+0.297036 0.626681 0.013683
+0.28325 0.626681 0.019511
+0.27161 0.627326 0.029783
+-0.292172 0.622256 0.021484
+0.335043 0.610778 0.00624
+0.317277 0.610218 0.007653
+0.299645 0.609801 0.0111
+0.284712 0.610178 0.018419
+0.273397 0.610474 0.029582
+-0.293296 0.609415 0.025263
+0.285374 0.592116 0.015374
+0.274043 0.592945 0.028633
+-0.294803 0.594479 0.0275
+0.272909 0.57244 0.025494
+-0.295903 0.581552 0.031454
+0.26772 0.55444 0.030598
+-0.299198 0.563706 0.028882
+-0.304765 0.556061 0.005575
+0.266432 0.540784 0.028366
+0.26505 0.525083 0.027443
+-0.302099 0.526736 0.024878
+0.264243 0.509575 0.025681
+-0.299394 0.509566 0.026246
+0.263247 0.493983 0.024214
+-0.296368 0.492302 0.026376
+0.26186 0.480256 0.02113
+-0.294084 0.47505 0.0269
+0.25708 0.461564 0.024005
+-0.291044 0.458052 0.028124
+0.250409 0.441651 0.03245
+-0.286729 0.44391 0.030369
+0.247437 0.42869 0.02361
+-0.28065 0.42651 0.0257
+0.240282 0.411011 0.022608
+-0.270833 0.408187 0.033039
+0.230133 0.39086 0.025966
+-0.263282 0.391365 0.023352
+0.569918 0.346938 0.026707
+0.553536 0.350791 0.026416
+0.217995 0.371061 0.027842
+-0.253328 0.377506 0.030981
+0.585458 0.336085 0.02829
+0.536653 0.348124 0.02651
+0.519706 0.342318 0.02651
+0.205751 0.352989 0.022949
+-0.241495 0.360414 0.031312
+0.598263 0.321503 0.032311
+0.502858 0.334731 0.026254
+0.486589 0.328167 0.025609
+0.470494 0.32198 0.025811
+0.195704 0.340147 0.026841
+-0.226264 0.341069 0.027639
+-0.513254 0.332699 0.008165
+0.453298 0.315453 0.026698
+0.435821 0.309317 0.025872
+0.422283 0.304627 0.022226
+0.184477 0.323927 0.029142
+-0.212364 0.323039 0.023753
+-0.479146 0.316011 0.009026
+-0.573872 0.316629 0.025724
+0.620508 0.291139 0.024275
+0.614673 0.303166 0.012125
+0.609195 0.30886 0.023377
+0.386905 0.292834 0.028846
+0.368832 0.287876 0.02578
+0.175782 0.306551 0.033922
+-0.202401 0.305667 0.017813
+-0.445186 0.299087 0.009093
+-0.588155 0.30133 0.03436
+0.631618 0.271394 0.032136
+0.349576 0.282603 0.023402
+0.328839 0.276132 0.026623
+0.338707 0.28002 0.008999
+0.313848 0.270897 0.029277
+0.184405 0.278091 0.025142
+0.178355 0.293046 0.023858
+-0.197554 0.288909 0.026528
+-0.390531 0.279413 0.005497
+-0.408187 0.281967 0.011516
+-0.600282 0.28765 0.027407
+0.29893 0.266295 0.02392
+0.279143 0.259313 0.025993
+0.288607 0.264548 0.008962
+0.267183 0.255425 0.026698
+0.214483 0.255733 0.027281
+0.197929 0.264494 0.026214
+0.198179 0.2698 0.008415
+-0.199881 0.272111 0.034526
+-0.36031 0.265355 0.008878
+-0.611401 0.271792 0.020812
+0.650347 0.238279 0.030474
+0.642271 0.255354 0.02172
+-0.212468 0.256651 0.024965
+-0.227765 0.245071 0.021911
+-0.21988 0.252455 0.008479
+-0.30936 0.245753 0.008794
+-0.621776 0.257668 0.029293
+-0.260721 0.228289 0.029956
+-0.252728 0.236988 0.010419
+-0.278039 0.226299 0.030388
+-0.273292 0.234321 0.012853
+-0.632952 0.240316 0.029065
+0.6656 0.206043 0.028331
+0.66052 0.215191 0.010782
+0.65856 0.223943 0.02324
+-0.644388 0.2215 0.021462
+-0.654321 0.20489 0.032123
+0.669873 0.190774 0.024152
+-0.663024 0.18788 0.027753
+0.67158 0.174237 0.029304
+0.66565 0.157484 0.028834
+-0.669718 0.152892 0.030115
+0.656862 0.145935 0.03194
+0.638477 0.139743 0.028652
+0.618615 0.13379 0.02606
+-0.663031 0.142303 0.028164
+0.607889 0.127411 0.032167
+0.592865 0.125637 0.030212
+0.575568 0.124322 0.028413
+0.554249 0.12091 0.027631
+0.531326 0.11503 0.026674
+0.515075 0.11229 0.022648
+-0.633534 0.120607 0.026389
+-0.649888 0.130847 0.027021
+0.501087 0.105554 0.024973
+0.48481 0.098427 0.025568
+-0.581816 0.098852 0.026013
+-0.599098 0.104961 0.026349
+-0.616363 0.11247 0.026322
+0.468441 0.091706 0.026308
+0.451616 0.085201 0.026564
+0.434508 0.077974 0.026537
+-0.526898 0.082476 0.023533
+-0.546008 0.088013 0.025686
+-0.564111 0.093181 0.025717
+0.417105 0.070523 0.027155
+0.399395 0.061536 0.030299
+-0.463258 0.06571 0.027788
+-0.479262 0.069366 0.028702
+-0.492411 0.071897 0.031029
+-0.507274 0.076158 0.026819
+0.382995 0.047797 0.029671
+-0.414781 0.042458 0.024977
+-0.430365 0.052526 0.026093
+-0.446908 0.060097 0.026739
+0.374739 0.032369 0.03441
+-0.404424 0.030454 0.021474
+0.377976 0.00202 0.030245
+0.377735 0.014244 0.015688
+0.375572 0.019507 0.026386
+-0.394484 0.017295 0.026367
+-0.388187 0.000593 0.033841
+-0.394649 -0.002809 0.011484
+0.383059 -0.016789 0.026802
+0.388554 -0.036752 0.024539
+-0.395149 -0.037877 0.024021
+-0.396028 -0.047959 0.029844
+0.396467 -0.068122 0.028559
+-0.39998 -0.064494 0.028717
+-0.405093 -0.070115 0.006679
+0.39909 -0.084262 0.027075
+0.400377 -0.101114 0.02651
+0.400455 -0.118061 0.02651
+-0.410317 -0.122494 0.021777
+0.400881 -0.135142 0.026376
+-0.410452 -0.135908 0.024775
+0.402336 -0.152666 0.026147
+-0.410779 -0.152693 0.026398
+0.408665 -0.173564 0.014067
+0.405344 -0.170191 0.026887
+-0.411528 -0.170191 0.026134
+-0.412178 -0.186747 0.02556
+0.409964 -0.203344 0.025336
+-0.412348 -0.202981 0.026165
+0.410879 -0.219286 0.020333
+-0.412348 -0.219739 0.02651
+0.406409 -0.237883 0.031814
+-0.412113 -0.236686 0.02651
+0.405211 -0.256713 0.025731
+-0.411642 -0.253632 0.02651
+0.402012 -0.274786 0.031206
+-0.411171 -0.270578 0.02651
+0.401047 -0.288009 0.028254
+-0.410387 -0.287525 0.02651
+0.566991 -0.33251 0.028003
+0.556275 -0.328752 0.022669
+0.399993 -0.303503 0.025802
+-0.408755 -0.304283 0.026855
+-0.538733 -0.332996 0.028915
+-0.55525 -0.332294 0.028678
+0.578076 -0.341027 0.034266
+0.398976 -0.319293 0.024473
+-0.405457 -0.320517 0.027461
+-0.518426 -0.339985 0.029998
+-0.567742 -0.335766 0.030271
+0.522456 -0.340769 0.029162
+0.504556 -0.350445 0.026556
+0.39853 -0.333103 0.02254
+-0.402204 -0.337131 0.027393
+-0.486282 -0.360873 0.022467
+-0.499775 -0.351284 0.025867
+-0.57767 -0.344922 0.026639
+0.586249 -0.354704 0.027011
+0.487292 -0.361164 0.026658
+0.397506 -0.351849 0.028622
+-0.401119 -0.354095 0.029074
+-0.453583 -0.376643 0.024591
+-0.471276 -0.367751 0.025293
+0.598795 -0.387902 0.032302
+0.592734 -0.371507 0.021277
+0.470064 -0.371938 0.02608
+0.453489 -0.38107 0.024887
+0.439654 -0.385762 0.022632
+0.406193 -0.372825 0.023734
+-0.405387 -0.36849 0.035768
+-0.4167 -0.37803 0.028397
+-0.433698 -0.381893 0.022152
+-0.598962 -0.372757 0.026187
+-0.605828 -0.386436 0.028209
+-0.610022 -0.392234 0.008711
+0.60413 -0.404849 0.026653
+-0.613983 -0.402516 0.023282
+0.615742 -0.438742 0.032302
+0.609725 -0.422347 0.021367
+-0.622294 -0.420184 0.027459
+-0.626977 -0.426767 0.007639
+-0.630745 -0.436769 0.02277
+0.621077 -0.455688 0.026653
+-0.638896 -0.455006 0.026643
+-0.641574 -0.460983 0.006302
+0.632688 -0.489581 0.032302
+0.626672 -0.473186 0.021367
+-0.646451 -0.47501 0.019647
+-0.651814 -0.493233 0.029427
+0.638023 -0.506527 0.026653
+-0.653411 -0.509539 0.031738
+0.649556 -0.54042 0.032302
+0.643618 -0.524025 0.021367
+-0.645881 -0.520587 0.026435
+-0.566255 -0.550139 0.026375
+-0.583211 -0.543135 0.024932
+-0.596383 -0.537646 0.022392
+-0.611149 -0.537371 0.026613
+-0.63054 -0.533683 0.029744
+0.653721 -0.556936 0.026438
+-0.535559 -0.567349 0.030169
+-0.549298 -0.557862 0.027524
+0.655972 -0.584692 0.027624
+0.655775 -0.572338 0.020001
+-0.517208 -0.575232 0.024232
+-0.484167 -0.598034 0.031889
+-0.498254 -0.587944 0.027442
+0.649543 -0.597187 0.023541
+0.636634 -0.606601 0.026393
+0.620774 -0.611548 0.028285
+0.539325 -0.613206 0.022679
+0.519586 -0.611394 0.025672
+0.5022 -0.612075 0.026443
+0.485186 -0.615549 0.02651
+-0.44918 -0.614472 0.026944
+-0.468038 -0.604667 0.028477
+0.605801 -0.615344 0.031082
+0.588674 -0.617852 0.025388
+0.574299 -0.620656 0.029905
+0.560071 -0.617775 0.026649
+0.46824 -0.620727 0.02651
+0.451293 -0.626455 0.02651
+0.434212 -0.632686 0.026644
+-0.426858 -0.626996 0.027266
+0.416746 -0.639299 0.027357
+0.397702 -0.64699 0.029929
+-0.390366 -0.648183 0.030609
+-0.405591 -0.639056 0.027987
+0.377712 -0.655445 0.027311
+0.366086 -0.660256 0.026784
+0.354085 -0.665064 0.02675
+-0.359311 -0.662999 0.026698
+-0.376466 -0.654447 0.02729
+0.334214 -0.6731 0.024797
+0.31249 -0.680324 0.028678
+0.229904 -0.683472 0.025744
+0.213164 -0.679251 0.026998
+0.194949 -0.67874 0.027725
+0.175962 -0.682304 0.029335
+-0.193097 -0.682236 0.026779
+-0.210886 -0.683198 0.027196
+-0.32558 -0.678087 0.026537
+-0.342396 -0.670688 0.026698
+0.291678 -0.686938 0.025542
+0.275969 -0.690761 0.021996
+0.262398 -0.690054 0.025021
+0.245972 -0.687652 0.02538
+0.156636 -0.690048 0.027115
+0.138731 -0.698006 0.02721
+-0.141926 -0.700171 0.026416
+-0.158778 -0.692671 0.02651
+-0.175792 -0.686025 0.026577
+-0.228805 -0.687054 0.026873
+-0.245738 -0.691288 0.025838
+-0.261416 -0.693003 0.026053
+-0.276726 -0.692346 0.027156
+-0.29226 -0.689983 0.027156
+-0.308602 -0.684615 0.026537
+0.121618 -0.705136 0.026854
+0.10771 -0.711104 0.023716
+0.091805 -0.71512 0.028135
+-0.108404 -0.713005 0.025469
+-0.125101 -0.706975 0.026161
+0.071237 -0.721138 0.025519
+0.055574 -0.724969 0.022065
+0.041794 -0.725895 0.025146
+0.025283 -0.726844 0.025448
+0.009283 -0.72736 0.025609
+-0.006987 -0.727461 0.026255
+-0.023906 -0.727205 0.02655
+-0.041127 -0.726343 0.026789
+-0.05862 -0.724866 0.026804
+-0.077096 -0.721228 0.028269
+-0.094887 -0.718117 0.022754
+-0.2589 0.921724 -0.014567
+-0.277276 0.928698 -0.016781
+-0.297604 0.929231 -0.014954
+-0.315882 0.928675 -0.014981
+-0.334042 0.926351 -0.015275
+-0.34902 0.92357 -0.015943
+-0.229436 0.909856 -0.016999
+-0.245689 0.914637 -0.012554
+-0.256381 0.909816 -0.006096
+-0.271549 0.912552 -0.005105
+-0.289557 0.91453 -0.004835
+-0.30753 0.914775 -0.004423
+-0.325444 0.913647 -0.004744
+-0.345365 0.910555 -0.005849
+-0.364191 0.913901 -0.013749
+-0.380809 0.909541 -0.018317
+-0.215567 0.896391 -0.015658
+-0.227512 0.898347 -0.009691
+-0.24187 0.899346 -0.00526
+-0.363305 0.897124 -0.003517
+-0.379793 0.897591 -0.009636
+-0.394531 0.897207 -0.017989
+-0.225191 0.883272 -0.004919
+-0.379431 0.881563 -0.002589
+-0.395322 0.881751 -0.009482
+-0.409124 0.881482 -0.019023
+-0.194191 0.863678 -0.01337
+-0.21137 0.864078 -0.003876
+-0.395495 0.865087 -0.003723
+-0.410056 0.865733 -0.011968
+0.044104 0.826916 0.009591
+0.027287 0.829763 0.009752
+0.010592 0.83094 0.009658
+-0.006166 0.83094 0.009469
+-0.022763 0.830806 0.00912
+-0.038916 0.830349 0.008326
+-0.054709 0.829442 0.007496
+-0.067842 0.828254 0.005001
+-0.183244 0.846709 -0.013243
+-0.199883 0.846792 -0.003757
+-0.411204 0.849176 -0.007884
+-0.421171 0.852388 -0.016226
+0.349818 0.820489 -0.015408
+0.332558 0.823891 -0.018316
+0.093549 0.810095 0.01033
+0.077454 0.816092 0.010398
+-0.104366 0.817868 0.012018
+-0.120157 0.814395 0.005088
+-0.188036 0.829843 -0.002342
+-0.209192 0.826851 0.00456
+-0.412177 0.831652 -0.005804
+-0.426738 0.834224 -0.017888
+0.381668 0.80977 -0.016058
+0.36383 0.813934 -0.012553
+0.353071 0.808019 -0.006026
+0.33739 0.810087 -0.00623
+0.315244 0.811449 -0.010011
+0.293823 0.810489 -0.013788
+0.277977 0.807995 -0.016893
+0.128697 0.793086 0.008945
+0.110845 0.802602 0.009201
+0.10639 0.804986 -0.006862
+-0.159313 0.806944 0.010873
+-0.154071 0.817726 -0.008208
+-0.174032 0.815698 0.001799
+-0.411798 0.814127 -0.004569
+-0.426487 0.814611 -0.015187
+0.414175 0.793155 -0.017047
+0.397542 0.798625 -0.012963
+0.38599 0.793508 -0.006024
+0.367515 0.797222 -0.003272
+0.299963 0.799006 -0.003838
+0.282004 0.793796 -0.005576
+0.26179 0.796713 -0.014254
+0.244648 0.791092 -0.017159
+0.162855 0.774775 0.010227
+0.146029 0.784156 0.009523
+-0.410072 0.797046 -0.004243
+-0.425026 0.797207 -0.014237
+0.426715 0.779498 -0.01557
+0.415871 0.780497 -0.009632
+0.401551 0.781649 -0.005249
+0.264578 0.779996 -0.003068
+0.248527 0.78019 -0.008123
+0.23225 0.778817 -0.014242
+0.179088 0.765761 0.01198
+-0.388932 0.781116 0.002849
+-0.40564 0.780328 -0.004199
+0.417199 0.765392 -0.005092
+0.252325 0.767855 -0.000787
+0.237365 0.765263 -0.003129
+0.216555 0.764568 -0.006873
+0.192583 0.756216 0.015625
+0.195796 0.761459 0.000546
+-0.398241 0.763798 -0.004064
+-0.41466 0.763408 -0.01421
+0.444338 0.745951 -0.014165
+0.427896 0.745965 -0.004176
+-0.370676 0.747959 0.002668
+-0.388158 0.747013 -0.00406
+0.436705 0.728615 -0.004087
+0.417005 0.725871 0.003943
+-0.337783 0.730932 0.005151
+-0.357392 0.733093 0.001685
+-0.376508 0.730803 -0.004425
+0.457601 0.711467 -0.015228
+0.443275 0.711951 -0.004524
+-0.304701 0.714445 0.00675
+-0.324327 0.716342 0.002679
+-0.346104 0.712145 -0.003187
+-0.364588 0.717197 -0.006256
+0.447604 0.694655 -0.005568
+0.431648 0.695045 0.002089
+-0.31542 0.698025 -0.00027
+-0.331262 0.700105 -0.004795
+0.448579 0.67713 -0.007335
+0.433318 0.678192 0.000421
+0.433746 0.661219 -0.001919
+0.4174 0.661474 0.004308
+0.433917 0.644259 -0.00681
+0.417562 0.644555 0.000612
+-0.292761 0.639112 0.005577
+0.418223 0.627491 -0.004963
+0.401781 0.628294 0.00145
+-0.293052 0.625278 0.00794
+0.402424 0.611945 -0.005408
+0.389007 0.614823 -0.000187
+0.373493 0.611086 0.001243
+0.353269 0.608145 0.003098
+-0.294547 0.609671 0.009836
+0.363358 0.59436 -0.00512
+0.348468 0.591572 -0.003688
+0.33862 0.596944 0.000321
+0.323854 0.594252 0.000412
+0.302891 0.590071 0.00337
+-0.295801 0.597062 0.014528
+0.284529 0.573548 0.006827
+-0.298988 0.579361 0.01372
+-0.302267 0.570237 -0.007229
+0.272282 0.554288 0.013453
+0.267478 0.537171 0.015185
+-0.307969 0.538727 0.003962
+0.266317 0.523815 0.011975
+-0.306684 0.526544 0.008304
+0.265218 0.508405 0.01046
+-0.303324 0.511185 0.009788
+0.264066 0.492965 0.008609
+-0.29933 0.493831 0.009076
+-0.302069 0.499579 -0.007291
+0.262037 0.476436 0.007228
+-0.295744 0.475876 0.0093
+0.258237 0.458924 0.00387
+-0.292675 0.458848 0.011169
+0.252781 0.442529 0.015432
+-0.287508 0.440356 0.013294
+0.24761 0.4257 0.009455
+-0.281256 0.422477 0.007848
+-0.284653 0.43033 -0.005078
+0.241484 0.408834 0.003412
+-0.272781 0.407889 0.014688
+0.234935 0.395229 0.011585
+-0.264491 0.390919 0.00539
+0.568932 0.347498 0.009913
+0.552626 0.349913 0.009752
+0.223568 0.376285 0.007225
+-0.25351 0.374688 0.016493
+0.584719 0.33912 0.010595
+0.535863 0.346138 0.00959
+0.51885 0.339978 0.009523
+0.209565 0.355999 0.009188
+-0.240987 0.357276 0.012576
+-0.531595 0.339392 0.005452
+-0.526838 0.346609 -0.011982
+-0.550868 0.336331 0.009205
+-0.54183 0.344219 -0.008311
+0.601942 0.321204 0.010697
+0.594937 0.33101 -0.003987
+0.501971 0.333255 0.00959
+0.485437 0.326753 0.009469
+0.468714 0.32025 0.009537
+0.197573 0.339707 0.011245
+-0.226565 0.339694 0.009765
+-0.49616 0.324854 0.008959
+-0.497424 0.333863 -0.007665
+-0.564922 0.328771 0.012302
+0.451705 0.313738 0.009442
+0.435297 0.308067 0.008662
+0.419041 0.302999 0.008757
+0.188675 0.327012 0.015692
+-0.212757 0.322546 0.006425
+-0.462199 0.307851 0.009026
+-0.463491 0.316286 -0.007436
+-0.575818 0.320099 0.005417
+0.401798 0.297079 0.009967
+0.384319 0.292183 0.009873
+0.367448 0.287929 0.008303
+0.354073 0.284796 0.005081
+0.181826 0.309223 0.014117
+-0.202715 0.3056 0.000777
+-0.427778 0.291066 0.009628
+-0.429463 0.299699 -0.007302
+-0.587891 0.304237 0.01649
+0.63316 0.272455 0.013853
+0.624837 0.288901 0.00475
+0.318723 0.274002 0.011684
+0.304036 0.269891 0.005916
+0.185899 0.287427 0.005848
+-0.198749 0.289187 0.009308
+-0.376751 0.273236 0.007618
+-0.377938 0.280544 -0.00823
+-0.599686 0.288614 0.00977
+0.269171 0.258465 0.012192
+0.250084 0.254839 0.010778
+0.231748 0.255208 0.010307
+0.214178 0.259895 0.009564
+-0.201618 0.273371 0.016997
+-0.208419 0.263084 0.008482
+-0.32592 0.252173 0.008497
+-0.343054 0.258137 0.009358
+-0.344803 0.265871 -0.007342
+-0.610903 0.271896 0.003946
+0.651287 0.238346 0.008833
+0.645564 0.252388 -0.00412
+0.642653 0.257998 0.00643
+-0.235315 0.243702 0.008676
+-0.292324 0.239638 0.009744
+-0.293892 0.245329 -0.007302
+-0.622132 0.255711 0.01522
+-0.63331 0.238447 0.010039
+-0.644498 0.220935 0.003982
+0.666764 0.199852 0.014649
+-0.655072 0.203976 0.01536
+0.667121 0.18654 0.013235
+-0.665057 0.185943 0.009913
+0.662728 0.171291 0.014357
+-0.671387 0.168241 0.004623
+0.652671 0.156032 0.018372
+0.636755 0.156094 0.009974
+0.623841 0.158091 0.004458
+0.610069 0.154086 0.005198
+0.590192 0.150428 0.005113
+-0.670673 0.153418 0.016139
+0.621532 0.145946 0.015003
+0.603239 0.138077 0.01815
+0.585794 0.134269 0.018496
+0.571232 0.136421 0.014033
+0.553976 0.137748 0.007998
+0.537088 0.138448 0.00083
+-0.662818 0.13963 0.012034
+0.539506 0.12695 0.014768
+0.521715 0.124503 0.009234
+0.503074 0.115732 0.00959
+-0.632081 0.117459 0.008901
+-0.64888 0.127706 0.009922
+0.486491 0.10816 0.009859
+0.469702 0.100195 0.00993
+-0.578788 0.09866 0.00682
+-0.596786 0.103463 0.009504
+-0.614228 0.109624 0.009089
+0.452769 0.092711 0.009917
+0.435567 0.084713 0.009661
+-0.515354 0.081227 0.007617
+-0.528641 0.085014 0.008684
+-0.54047 0.088517 0.008684
+-0.558566 0.093477 0.00842
+0.417841 0.076237 0.009312
+0.400939 0.064628 0.00998
+-0.463039 0.064335 0.010993
+-0.476536 0.068568 0.014894
+-0.493905 0.073607 0.013686
+0.386623 0.050449 0.010733
+-0.429805 0.048681 0.009241
+-0.44628 0.057556 0.009792
+0.378349 0.031538 0.014443
+-0.414841 0.03738 0.007891
+-0.402581 0.019428 0.005346
+0.380864 -1.2e-05 0.011989
+0.384683 -0.017216 0.008806
+-0.395247 -0.021713 0.006439
+0.393591 -0.051566 0.016217
+0.389548 -0.034135 0.004117
+-0.396588 -0.035452 0.01055
+-0.399158 -0.050814 0.016347
+0.397702 -0.067477 0.012038
+0.399828 -0.084168 0.010191
+-0.40959 -0.088682 0.003704
+0.400455 -0.101114 0.009564
+-0.410576 -0.102536 0.007704
+0.40059 -0.118128 0.009496
+-0.411509 -0.119388 0.008744
+0.401818 -0.135626 0.008949
+-0.412178 -0.135908 0.008613
+0.405257 -0.15555 0.007381
+-0.412371 -0.152209 0.009286
+-0.41255 -0.169129 0.009604
+0.412031 -0.186949 0.011052
+-0.412841 -0.186102 0.009443
+0.413972 -0.202376 0.008358
+-0.412976 -0.202887 0.009469
+0.414662 -0.215418 0.004943
+-0.412976 -0.219739 0.009564
+0.411124 -0.233939 0.010332
+-0.412976 -0.236686 0.009564
+0.408415 -0.253498 0.00452
+-0.412897 -0.253632 0.009564
+0.403969 -0.271678 0.016386
+-0.412662 -0.270578 0.009564
+0.402114 -0.287552 0.011765
+-0.412427 -0.287525 0.009564
+0.566331 -0.332516 0.011048
+0.400848 -0.30396 0.009658
+-0.411297 -0.304377 0.010129
+0.57775 -0.34146 0.017123
+0.552308 -0.329809 0.010119
+0.536527 -0.33377 0.010944
+0.399864 -0.320274 0.008716
+-0.408909 -0.320517 0.011613
+-0.533268 -0.342847 0.012136
+-0.547916 -0.337115 0.015653
+-0.563914 -0.340031 0.014684
+0.519836 -0.342328 0.010353
+0.502741 -0.351333 0.009671
+0.399694 -0.337059 0.00909
+-0.40544 -0.33385 0.014405
+-0.4991 -0.361346 0.00885
+-0.515787 -0.351771 0.010293
+-0.579682 -0.350466 0.009857
+0.586053 -0.355899 0.00934
+0.485571 -0.361633 0.009604
+0.401954 -0.35463 0.007977
+-0.403518 -0.351972 0.009349
+-0.466239 -0.378122 0.008989
+-0.482957 -0.369463 0.00881
+-0.591499 -0.362235 0.004561
+0.598376 -0.388813 0.015293
+0.592532 -0.372378 0.003762
+0.46875 -0.371935 0.009187
+0.452436 -0.380695 0.008716
+0.436058 -0.384733 0.00909
+0.420256 -0.381091 0.007909
+0.408758 -0.370047 0.001161
+-0.406634 -0.369172 0.017176
+-0.416932 -0.381315 0.009156
+-0.431481 -0.389922 0.001184
+-0.44862 -0.38508 0.007304
+-0.600312 -0.374064 0.014822
+0.603902 -0.405921 0.009649
+-0.618761 -0.409739 0.012883
+0.615323 -0.439652 0.015293
+0.609506 -0.423029 0.004004
+-0.635356 -0.444452 0.011802
+0.620848 -0.45676 0.009649
+0.632269 -0.490492 0.015293
+0.626452 -0.473868 0.004004
+-0.645904 -0.477208 0.005611
+-0.647869 -0.490215 0.011491
+0.637795 -0.507599 0.009649
+-0.649178 -0.505271 0.01809
+0.648902 -0.541237 0.015356
+0.643399 -0.524707 0.004004
+-0.585682 -0.532662 0.007252
+-0.601211 -0.531377 0.012657
+-0.614977 -0.526896 0.010899
+-0.631227 -0.519402 0.010175
+-0.64178 -0.511229 0.009663
+-0.550526 -0.548366 0.009946
+-0.568143 -0.539334 0.009056
+0.652959 -0.557443 0.010048
+-0.530609 -0.560027 0.01138
+0.654193 -0.570339 0.005358
+-0.49734 -0.579587 0.00915
+-0.511571 -0.568508 0.00519
+0.653159 -0.585199 0.009489
+-0.478724 -0.592657 0.013079
+0.64529 -0.597114 0.005265
+0.636574 -0.604303 0.009509
+0.622357 -0.608523 0.011008
+0.603323 -0.612235 0.01271
+0.585327 -0.612855 0.007876
+0.552965 -0.610789 0.006299
+0.534184 -0.608656 0.003668
+0.519559 -0.60959 0.007515
+0.502307 -0.611234 0.0092
+0.485186 -0.615079 0.009563
+-0.439246 -0.614308 0.009236
+-0.457712 -0.603783 0.010209
+0.571913 -0.615503 0.015293
+0.46824 -0.620178 0.009563
+0.451293 -0.625984 0.009563
+0.434347 -0.632417 0.009563
+-0.412993 -0.631967 0.01335
+-0.424179 -0.622499 0.00714
+0.417266 -0.639276 0.009698
+0.399773 -0.647324 0.01025
+-0.392847 -0.642429 0.010407
+0.381661 -0.655236 0.010653
+0.362795 -0.663393 0.012388
+-0.353765 -0.66438 0.010465
+-0.370813 -0.654902 0.00994
+0.343671 -0.671517 0.010217
+0.332193 -0.676379 0.009837
+0.320008 -0.680808 0.009504
+0.213882 -0.681898 0.009537
+0.196671 -0.680667 0.009833
+0.179097 -0.683817 0.010169
+-0.192671 -0.684041 0.009564
+-0.209684 -0.683391 0.009631
+-0.320469 -0.679912 0.009442
+-0.337581 -0.672024 0.01033
+0.299158 -0.687518 0.006448
+0.279969 -0.691773 0.008142
+0.263546 -0.692297 0.008595
+0.247272 -0.690382 0.009214
+0.230644 -0.685751 0.009375
+0.161433 -0.690228 0.010102
+0.143797 -0.698365 0.009994
+-0.158778 -0.695574 0.009564
+-0.175725 -0.688513 0.009564
+-0.226761 -0.686507 0.009792
+-0.243541 -0.690867 0.00998
+-0.259564 -0.692785 0.010613
+-0.275107 -0.692742 0.011537
+-0.288038 -0.691204 0.014207
+-0.30271 -0.686519 0.01034
+0.126849 -0.70569 0.010715
+0.113829 -0.710837 0.013266
+0.099328 -0.71627 0.009873
+-0.108401 -0.716853 0.008676
+-0.124939 -0.710185 0.009241
+-0.141832 -0.70287 0.009564
+0.078744 -0.722335 0.006436
+0.059666 -0.725733 0.008142
+0.043243 -0.727131 0.008595
+0.026969 -0.727775 0.009214
+0.010341 -0.728055 0.009375
+-0.006354 -0.728133 0.009469
+-0.023207 -0.728133 0.009564
+-0.04022 -0.727999 0.009631
+-0.057369 -0.727328 0.009833
+-0.074517 -0.725316 0.010031
+-0.09167 -0.721985 0.009264
+-0.273142 0.938178 -0.030499
+-0.287831 0.938926 -0.027888
+-0.305445 0.939166 -0.027691
+-0.32518 0.938083 -0.029759
+-0.224445 0.917947 -0.029849
+-0.241412 0.923578 -0.025306
+-0.357686 0.926455 -0.023242
+-0.371625 0.921332 -0.026797
+-0.212625 0.907725 -0.027624
+-0.390141 0.91182 -0.031134
+-0.197547 0.891033 -0.028122
+-0.406496 0.895939 -0.029468
+-0.187012 0.878765 -0.028388
+-0.191589 0.87638 -0.020938
+-0.204885 0.880151 -0.013876
+-0.418727 0.880232 -0.031609
+-0.421117 0.865437 -0.022455
+0.059735 0.823296 -0.007652
+0.042324 0.828035 -0.006683
+0.026292 0.830142 -0.006388
+0.010242 0.830806 -0.006939
+-0.006354 0.83094 -0.007289
+-0.023113 0.83094 -0.007477
+-0.039709 0.830806 -0.007827
+-0.055759 0.830142 -0.008378
+-0.071791 0.828113 -0.008082
+-0.170766 0.843557 -0.023012
+0.386684 0.820503 -0.030144
+0.366618 0.826155 -0.027975
+0.317238 0.827708 -0.026036
+0.302983 0.821422 -0.022604
+0.285947 0.820301 -0.028932
+0.090766 0.812343 -0.00303
+0.077404 0.817395 -0.006768
+-0.089055 0.823801 -0.007127
+-0.106391 0.818851 -0.007813
+-0.122828 0.815052 -0.009417
+-0.136351 0.815021 -0.012287
+-0.170759 0.830654 -0.012191
+-0.437145 0.830222 -0.033825
+0.419334 0.802976 -0.029921
+0.402585 0.809783 -0.025915
+0.266656 0.812096 -0.027612
+0.249639 0.802707 -0.027329
+0.126871 0.794685 -0.010491
+-0.436877 0.814356 -0.028624
+0.430136 0.792211 -0.027209
+0.23345 0.792057 -0.027193
+0.162079 0.776622 -0.006392
+0.145299 0.785166 -0.007813
+-0.435665 0.797369 -0.026741
+0.440166 0.777651 -0.026746
+0.216729 0.778916 -0.02493
+0.178863 0.769715 -0.00467
+-0.421049 0.780355 -0.014165
+0.436078 0.763234 -0.014546
+-0.427511 0.76469 -0.026176
+0.456703 0.744929 -0.026126
+-0.404903 0.746103 -0.013841
+0.452181 0.728965 -0.014282
+-0.393011 0.729533 -0.013469
+-0.407655 0.728646 -0.025594
+-0.379056 0.714554 -0.014318
+-0.394436 0.715143 -0.022661
+0.472418 0.695183 -0.032875
+0.462013 0.691863 -0.017717
+-0.3426 0.694876 -0.011981
+-0.360787 0.700675 -0.016074
+0.458844 0.673918 -0.015944
+-0.307181 0.680571 -0.004264
+-0.327192 0.684394 -0.013934
+0.448462 0.660506 -0.011038
+-0.300284 0.661885 -0.007057
+0.448248 0.644272 -0.017617
+-0.29551 0.643546 -0.008125
+0.433921 0.627342 -0.014033
+-0.294252 0.626506 -0.008297
+0.433581 0.613632 -0.021618
+0.418861 0.609633 -0.01429
+-0.295152 0.609859 -0.006814
+0.411859 0.594792 -0.020487
+0.403712 0.599033 -0.013805
+0.385047 0.5963 -0.009823
+-0.297686 0.591369 -0.002941
+0.369474 0.582779 -0.015676
+0.354351 0.580334 -0.013597
+0.336119 0.581638 -0.009903
+0.315852 0.577426 -0.010392
+0.297251 0.569804 -0.009075
+0.281828 0.556431 -0.006408
+-0.306623 0.55462 -0.012071
+0.271082 0.53787 -0.001524
+-0.308497 0.541741 -0.008442
+0.266892 0.521041 -0.000852
+-0.308369 0.52716 -0.006471
+0.26598 0.50815 -0.004975
+-0.306449 0.514865 -0.003142
+0.264525 0.492172 -0.007544
+0.262284 0.475292 -0.009808
+-0.297096 0.477991 -0.010764
+0.258563 0.458185 -0.01357
+-0.293525 0.459441 -0.005719
+0.253373 0.441561 -0.001653
+-0.290747 0.445899 -0.001448
+0.247879 0.424547 -0.00736
+0.241558 0.407829 -0.013722
+-0.274947 0.409529 -0.005389
+0.234064 0.39178 -0.003765
+-0.264459 0.390059 -0.011968
+0.567139 0.346458 -0.006253
+0.223872 0.374403 -0.013745
+-0.25367 0.373654 -0.000649
+0.582669 0.340704 -0.006297
+0.551497 0.346514 -0.006522
+0.534824 0.34167 -0.007393
+0.517568 0.335827 -0.00711
+0.211534 0.356838 -0.008437
+-0.241001 0.356506 -0.004805
+-0.5139 0.341825 -0.008781
+-0.513702 0.347729 -0.02523
+0.500989 0.329485 -0.006536
+0.484742 0.32305 -0.006939
+0.19842 0.339425 -0.004962
+-0.226565 0.339492 -0.007383
+-0.480437 0.325466 -0.007436
+-0.48076 0.331805 -0.024329
+-0.560643 0.335228 -0.006191
+0.615507 0.30442 -0.002762
+0.606337 0.318497 -0.01191
+0.468078 0.31634 -0.007356
+0.451024 0.31021 -0.007652
+0.433817 0.304395 -0.007908
+0.18879 0.323497 0.001374
+-0.212757 0.322546 -0.010521
+-0.446544 0.308127 -0.007436
+-0.446961 0.313996 -0.024235
+-0.575768 0.321386 -0.012884
+0.416584 0.299491 -0.007222
+0.399687 0.294732 -0.006643
+0.382965 0.289829 -0.007423
+0.366605 0.286163 -0.008495
+0.18399 0.305018 -0.006648
+-0.202715 0.3056 -0.01617
+-0.394518 0.286258 -0.007655
+-0.411962 0.292405 -0.00705
+-0.413472 0.298249 -0.024168
+-0.587958 0.305412 -0.001326
+0.63555 0.270949 -0.007229
+0.628056 0.282381 -0.023472
+0.625393 0.290159 -0.010542
+0.350331 0.282462 -0.007823
+0.333484 0.277943 -0.006566
+0.316946 0.272297 -0.007414
+0.300537 0.267992 -0.007881
+0.197737 0.273036 -0.00997
+0.187068 0.287318 -0.015454
+-0.198855 0.289313 -0.007477
+-0.361624 0.273779 -0.007759
+-0.362332 0.278536 -0.024558
+-0.599386 0.288654 -0.007383
+0.28347 0.262531 -0.007006
+0.265869 0.257799 -0.006845
+0.24807 0.255278 -0.007248
+0.230384 0.256253 -0.007517
+0.213192 0.262103 -0.008212
+-0.201827 0.274312 0.000566
+-0.210708 0.262105 -0.005177
+-0.310883 0.25211 -0.007504
+-0.327767 0.258732 -0.007409
+-0.328242 0.263156 -0.024329
+-0.610684 0.271707 -0.013032
+-0.224435 0.251592 -0.007199
+-0.240713 0.243821 -0.007275
+-0.258497 0.239838 -0.00672
+-0.27647 0.240624 -0.006814
+-0.622013 0.25499 -0.001662
+0.649214 0.241204 -0.009286
+-0.633279 0.237882 -0.007316
+0.660439 0.200453 0.00125
+0.653353 0.222694 -0.007302
+-0.64442 0.220734 -0.013323
+-0.655489 0.203236 -0.00242
+0.660611 0.183874 0.003949
+0.654064 0.189859 -0.004567
+0.641614 0.187373 -0.009292
+0.622731 0.183728 -0.012469
+-0.665454 0.183378 -0.01028
+0.64976 0.173123 0.003033
+0.63251 0.17064 -0.001683
+0.618723 0.166866 -0.002206
+0.605238 0.168561 -0.005337
+0.587596 0.169181 -0.009607
+0.570053 0.169893 -0.014927
+-0.671104 0.165364 -0.009868
+0.570609 0.152714 -0.000385
+0.553295 0.153525 -0.006738
+0.536348 0.153727 -0.014162
+-0.670437 0.152815 -0.000425
+0.520478 0.138448 -0.00754
+-0.66131 0.138776 -0.005321
+0.507168 0.127215 -0.002628
+0.489498 0.121702 -0.006928
+-0.628111 0.117167 -0.010452
+-0.646422 0.126587 -0.007947
+0.473577 0.110473 -0.003037
+0.455185 0.105084 -0.008014
+-0.549425 0.095997 -0.010349
+-0.569052 0.099644 -0.008257
+-0.583541 0.10313 -0.010352
+-0.593583 0.104048 -0.004513
+-0.608344 0.109307 -0.00741
+0.438898 0.094008 -0.004026
+0.420109 0.087111 -0.009398
+-0.502057 0.080112 -0.005983
+-0.514937 0.0847 -0.006663
+-0.52827 0.088899 -0.005751
+0.401356 0.07307 -0.007958
+-0.461161 0.064194 -0.006612
+-0.480924 0.072034 -0.003371
+0.387074 0.057818 -0.007868
+-0.427491 0.046077 -0.007674
+-0.443797 0.056244 -0.007316
+0.378531 0.016579 0.000534
+0.378732 0.03692 -0.008934
+-0.413198 0.033343 -0.009396
+-0.40312 0.017475 -0.015763
+0.381563 -0.0008 -0.005068
+-0.397769 0.000385 -0.009108
+0.385201 -0.017418 -0.008311
+-0.396303 -0.017687 -0.007229
+0.394058 -0.050571 -0.001079
+0.389516 -0.033718 -0.013404
+-0.397894 -0.034539 -0.00563
+-0.401446 -0.051118 -0.000694
+0.397855 -0.06745 -0.004957
+-0.40631 -0.067876 -0.013059
+0.399783 -0.084423 -0.006657
+-0.410083 -0.085401 -0.009903
+0.400455 -0.101208 -0.007289
+-0.411895 -0.102083 -0.008719
+0.400881 -0.118195 -0.007674
+-0.41255 -0.118478 -0.007688
+0.402401 -0.135693 -0.009028
+-0.412841 -0.135263 -0.007504
+0.409819 -0.170846 -0.00133
+0.405769 -0.153066 -0.01378
+-0.412976 -0.152048 -0.007477
+-0.412976 -0.1689 -0.007383
+0.413717 -0.187147 -0.005244
+-0.412976 -0.185846 -0.007383
+0.415501 -0.202793 -0.00693
+-0.412976 -0.202793 -0.007383
+0.415004 -0.218694 -0.00792
+-0.412976 -0.219739 -0.007383
+0.412915 -0.235842 -0.009283
+-0.412976 -0.236686 -0.007383
+0.409446 -0.252274 -0.013812
+-0.412976 -0.253632 -0.007383
+0.40553 -0.270027 -0.001658
+-0.412976 -0.270578 -0.007383
+0.402367 -0.286906 -0.005827
+-0.412976 -0.287525 -0.007383
+0.561495 -0.332631 -0.004922
+0.400881 -0.304243 -0.007186
+-0.412348 -0.304471 -0.006755
+0.576333 -0.342111 -0.003215
+0.548081 -0.331827 -0.001955
+0.53542 -0.336079 -0.005141
+0.400321 -0.321162 -0.007504
+-0.410223 -0.321162 -0.004908
+-0.551135 -0.347924 -0.001017
+0.519119 -0.343651 -0.00684
+0.502132 -0.352328 -0.007383
+0.400724 -0.338203 -0.00788
+-0.406496 -0.337198 -0.00047
+-0.51494 -0.364641 -0.006675
+-0.532174 -0.35529 -0.005064
+-0.568366 -0.349411 -0.001224
+-0.580809 -0.356906 -0.006127
+0.586349 -0.357127 -0.008104
+0.485185 -0.36237 -0.007383
+0.402764 -0.354907 -0.010409
+-0.403644 -0.355068 -0.012095
+-0.481365 -0.381505 -0.007289
+-0.497908 -0.372933 -0.007038
+-0.591433 -0.366248 -0.009125
+0.598163 -0.389203 -0.001734
+0.592595 -0.37279 -0.013247
+0.468333 -0.372413 -0.007477
+0.451548 -0.38065 -0.007504
+0.434979 -0.383957 -0.008015
+0.419553 -0.380438 -0.010902
+0.40782 -0.3704 -0.017407
+-0.406077 -0.373553 -0.005285
+-0.447414 -0.396292 -0.010284
+-0.464419 -0.389158 -0.007921
+-0.601172 -0.376055 -0.002121
+-0.416941 -0.390817 -0.010216
+-0.43184 -0.400256 -0.016664
+-0.609122 -0.39215 -0.011042
+0.603812 -0.40615 -0.007383
+-0.619101 -0.40853 -0.002656
+0.61511 -0.440042 -0.001734
+0.609461 -0.423096 -0.013032
+-0.625925 -0.425709 -0.012689
+-0.634881 -0.444944 -0.005544
+0.620759 -0.456989 -0.007383
+-0.640037 -0.461578 -0.00852
+0.632056 -0.490882 -0.001734
+0.626407 -0.473935 -0.013032
+-0.643552 -0.47184 -0.003818
+-0.641802 -0.486933 -0.004237
+0.637705 -0.507828 -0.007383
+-0.615831 -0.514428 -0.006281
+-0.633022 -0.504046 -0.005009
+-0.644307 -0.500781 0.005064
+0.648453 -0.541533 -0.001452
+0.643354 -0.524774 -0.013032
+-0.571766 -0.530609 -0.007167
+-0.583396 -0.526238 -0.006484
+-0.597095 -0.522601 -0.004021
+-0.536557 -0.547813 -0.007696
+-0.554755 -0.538405 -0.007316
+0.652327 -0.557766 -0.00589
+-0.515747 -0.5583 -0.011079
+0.65254 -0.573406 -0.008185
+-0.480846 -0.581793 -0.006334
+-0.49734 -0.570352 -0.008469
+0.646729 -0.588138 -0.010886
+-0.463331 -0.592673 -0.006518
+0.63617 -0.599475 -0.006657
+0.625551 -0.605304 -0.002229
+0.611394 -0.605576 -0.005174
+0.593145 -0.6055 -0.006329
+0.572782 -0.606495 -0.00514
+0.556295 -0.60253 -0.011757
+0.540677 -0.603495 -0.010127
+0.520708 -0.604457 -0.011983
+0.502388 -0.608782 -0.008338
+0.485253 -0.613061 -0.00745
+-0.427434 -0.614705 -0.007593
+-0.445012 -0.603536 -0.007756
+0.46824 -0.618531 -0.007383
+0.451293 -0.624885 -0.007383
+0.434347 -0.63124 -0.007383
+-0.408765 -0.626992 -0.005124
+0.417401 -0.638066 -0.007383
+0.400387 -0.646203 -0.007316
+-0.376533 -0.646413 -0.007612
+-0.391023 -0.63596 -0.010498
+0.383082 -0.654295 -0.007114
+0.36544 -0.662768 -0.00671
+-0.345926 -0.665681 -0.00288
+-0.359531 -0.656577 -0.006186
+0.347553 -0.6703 -0.006374
+0.328937 -0.677841 -0.004754
+0.21411 -0.683469 -0.00745
+0.197097 -0.681609 -0.007383
+0.180083 -0.684489 -0.007316
+-0.192671 -0.684433 -0.007383
+-0.209523 -0.682503 -0.007289
+-0.22612 -0.685314 -0.006939
+-0.311196 -0.679895 -0.009591
+-0.331112 -0.671638 -0.006563
+0.309303 -0.684835 -0.008078
+0.294042 -0.689819 -0.011817
+0.281103 -0.692109 -0.008616
+0.264923 -0.693187 -0.007611
+0.248317 -0.691472 -0.00745
+0.231281 -0.68737 -0.007517
+0.162913 -0.690429 -0.007248
+0.145653 -0.69851 -0.007248
+-0.158778 -0.697378 -0.007383
+-0.175725 -0.68969 -0.007383
+-0.242273 -0.688934 -0.006146
+-0.258251 -0.691268 -0.005177
+-0.27184 -0.691794 -0.001981
+-0.289278 -0.688145 -0.003645
+0.128321 -0.706266 -0.00667
+0.109571 -0.714228 -0.004217
+-0.124365 -0.71244 -0.008096
+-0.141697 -0.704944 -0.007517
+0.089147 -0.721409 -0.00793
+0.073738 -0.725474 -0.011817
+0.060706 -0.726666 -0.00871
+0.044274 -0.727707 -0.0078
+0.027538 -0.728133 -0.007477
+0.010686 -0.728133 -0.007383
+-0.00626 -0.728133 -0.007383
+-0.023207 -0.728133 -0.007383
+-0.040153 -0.728133 -0.007383
+-0.056979 -0.727999 -0.007127
+-0.073163 -0.726965 -0.006414
+-0.089352 -0.724464 -0.006576
+-0.106675 -0.718949 -0.007867
+-0.259801 0.932599 -0.027438
+-0.262034 0.937366 -0.041993
+-0.344014 0.933216 -0.026526
+-0.339217 0.939087 -0.041119
+-0.202538 0.904466 -0.039005
+-0.402505 0.905182 -0.04515
+-0.180206 0.862957 -0.02713
+0.368769 0.832734 -0.045016
+0.344927 0.831634 -0.028371
+0.354221 0.83538 -0.042458
+0.330382 0.833334 -0.030343
+0.337232 0.836541 -0.042015
+0.321289 0.83503 -0.040634
+0.053876 0.824085 -0.024176
+0.038375 0.828254 -0.019766
+0.025242 0.829442 -0.022262
+0.009449 0.830349 -0.023092
+-0.006704 0.830806 -0.023885
+-0.023301 0.83094 -0.024235
+-0.040059 0.83094 -0.024423
+-0.056822 0.829943 -0.024585
+-0.0738 0.827307 -0.024397
+-0.430478 0.848258 -0.027539
+-0.435015 0.843713 -0.045212
+0.398922 0.819462 -0.041756
+0.272749 0.820654 -0.042159
+0.096624 0.808973 -0.021712
+0.075348 0.817075 -0.027409
+-0.090863 0.822429 -0.024168
+-0.107522 0.818026 -0.024612
+-0.123675 0.815991 -0.025392
+-0.139699 0.818608 -0.025879
+-0.156381 0.829679 -0.027765
+0.430035 0.800264 -0.040768
+0.240027 0.8022 -0.041071
+0.132331 0.791071 -0.027951
+0.117547 0.799545 -0.024758
+0.439977 0.788586 -0.038059
+0.223341 0.789418 -0.041083
+0.161362 0.777428 -0.023579
+0.144657 0.785094 -0.024773
+0.195349 0.770248 -0.020086
+0.204856 0.777366 -0.040387
+0.175884 0.772245 -0.019529
+-0.432948 0.781001 -0.025889
+0.457322 0.757382 -0.037625
+0.449412 0.761478 -0.026383
+-0.418709 0.747465 -0.026081
+0.46293 0.727983 -0.027019
+0.474242 0.708612 -0.039752
+0.468973 0.710598 -0.028217
+-0.402794 0.716198 -0.029519
+-0.380537 0.701323 -0.0278
+-0.396667 0.709225 -0.03251
+0.468147 0.678048 -0.027382
+-0.347081 0.684827 -0.024673
+-0.36409 0.690239 -0.029108
+-0.371874 0.69143 -0.041596
+0.459884 0.660986 -0.021975
+-0.315141 0.666971 -0.02317
+-0.332008 0.67494 -0.02861
+0.458878 0.646253 -0.03123
+-0.301888 0.646871 -0.027791
+0.446358 0.626624 -0.027767
+-0.295933 0.627787 -0.025222
+0.437055 0.609506 -0.032031
+-0.295077 0.610434 -0.024128
+0.42351 0.598668 -0.02793
+-0.296637 0.593186 -0.022581
+0.409997 0.587261 -0.030255
+0.398656 0.587637 -0.022453
+0.381711 0.57881 -0.025863
+-0.300106 0.578313 -0.020015
+0.362147 0.570597 -0.028595
+0.345389 0.570828 -0.022983
+0.328048 0.566415 -0.027477
+0.307374 0.563748 -0.025475
+0.290605 0.555189 -0.023948
+-0.303401 0.560214 -0.026877
+0.277316 0.541124 -0.020866
+-0.306911 0.542644 -0.023644
+0.269402 0.524462 -0.014978
+-0.308184 0.530106 -0.018808
+0.266857 0.508836 -0.021429
+-0.304763 0.512899 -0.020387
+0.264783 0.492077 -0.024419
+-0.298919 0.489599 -0.028394
+0.262373 0.475064 -0.02684
+-0.295217 0.471562 -0.028858
+0.258531 0.458346 -0.030722
+-0.29315 0.458365 -0.023123
+0.253564 0.441238 -0.01877
+-0.289232 0.44256 -0.016341
+0.247673 0.424547 -0.02454
+-0.281201 0.422557 -0.024359
+0.241068 0.408318 -0.030985
+-0.271722 0.403663 -0.021768
+0.233731 0.391377 -0.021693
+-0.263901 0.389941 -0.028768
+0.223655 0.375164 -0.031882
+-0.253536 0.373331 -0.01773
+-0.52973 0.350397 -0.025096
+0.594249 0.328714 -0.022025
+0.577629 0.338831 -0.021964
+0.563553 0.342792 -0.019167
+0.550201 0.339792 -0.022485
+0.531234 0.332163 -0.025812
+0.211487 0.357577 -0.026903
+-0.240832 0.356573 -0.021998
+-0.497585 0.341448 -0.024584
+-0.497957 0.34588 -0.041181
+-0.546444 0.346062 -0.024683
+0.513513 0.329405 -0.020286
+0.499811 0.323699 -0.022281
+0.198094 0.339313 -0.023167
+-0.226363 0.339559 -0.024419
+-0.463813 0.323018 -0.024329
+-0.562426 0.335573 -0.026607
+0.617161 0.301385 -0.022216
+0.60686 0.315469 -0.027731
+0.483814 0.316739 -0.022985
+0.466971 0.309782 -0.024039
+0.449358 0.304011 -0.024448
+0.430333 0.297619 -0.026114
+0.188215 0.321547 -0.016878
+-0.212678 0.322546 -0.027468
+-0.430266 0.305993 -0.024141
+-0.575923 0.321015 -0.030435
+0.412535 0.29407 -0.021031
+0.398054 0.289446 -0.023531
+0.380952 0.285795 -0.024049
+0.363015 0.281083 -0.025846
+0.182086 0.301293 -0.027821
+-0.202611 0.305828 -0.033188
+-0.379364 0.285689 -0.024517
+-0.396427 0.291414 -0.024289
+-0.587801 0.305412 -0.018645
+0.345951 0.278203 -0.020412
+0.331741 0.273382 -0.0232
+0.314654 0.268674 -0.023811
+0.194493 0.27329 -0.026934
+0.185682 0.284555 -0.030501
+-0.198881 0.289348 -0.024397
+-0.345256 0.271293 -0.024396
+-0.599041 0.288694 -0.024446
+0.64192 0.254193 -0.01777
+0.635108 0.267295 -0.024838
+0.298044 0.263843 -0.023603
+0.281322 0.259061 -0.02398
+0.264004 0.254887 -0.024706
+0.246143 0.25363 -0.025002
+0.228053 0.25549 -0.025069
+0.210431 0.261438 -0.027365
+-0.202369 0.274281 -0.015731
+-0.212191 0.261697 -0.021285
+-0.294349 0.248721 -0.024329
+-0.311296 0.255625 -0.024329
+-0.610527 0.271775 -0.030068
+-0.226564 0.251467 -0.023702
+-0.242972 0.244507 -0.024262
+-0.260165 0.241469 -0.024195
+-0.277336 0.243644 -0.024262
+-0.621981 0.254761 -0.01868
+0.644278 0.237802 -0.02165
+-0.633279 0.237747 -0.024397
+0.642951 0.220353 -0.022151
+-0.644074 0.220572 -0.030588
+0.649448 0.204104 -0.011471
+0.635436 0.203181 -0.01939
+0.619025 0.202307 -0.024758
+0.602995 0.202885 -0.030051
+-0.654906 0.203303 -0.020398
+0.60412 0.185939 -0.01735
+0.586905 0.186746 -0.022506
+0.569918 0.186974 -0.028959
+-0.662115 0.186262 -0.030153
+0.552972 0.170028 -0.021192
+0.536025 0.170028 -0.029194
+-0.667988 0.168926 -0.024114
+0.519402 0.153593 -0.022561
+0.502361 0.15327 -0.031039
+-0.667676 0.152979 -0.017102
+0.503652 0.137883 -0.015899
+0.486141 0.136834 -0.024709
+-0.656967 0.13886 -0.025236
+0.470105 0.120964 -0.01753
+0.451849 0.120049 -0.026988
+-0.616221 0.116724 -0.026646
+-0.63005 0.120644 -0.025208
+-0.641086 0.126303 -0.024953
+0.433303 0.103902 -0.020941
+0.415199 0.097099 -0.025923
+-0.532374 0.098302 -0.027755
+-0.550102 0.102932 -0.02808
+-0.561832 0.102752 -0.021729
+-0.576261 0.106527 -0.02398
+-0.595403 0.110092 -0.021935
+0.400795 0.086158 -0.025001
+-0.490844 0.08077 -0.023115
+-0.511759 0.088946 -0.021802
+0.385478 0.070006 -0.025397
+-0.454534 0.064303 -0.024195
+-0.472171 0.07288 -0.023586
+0.376063 0.051961 -0.025897
+-0.42214 0.044758 -0.023985
+-0.437524 0.055557 -0.024082
+0.377451 0.014789 -0.020504
+0.372849 0.034588 -0.030647
+-0.409251 0.032273 -0.026327
+-0.400392 0.017103 -0.03325
+0.381801 -0.003881 -0.018969
+-0.397722 0.000631 -0.027221
+0.384529 -0.017512 -0.02458
+-0.397027 -0.016611 -0.024289
+0.393809 -0.050988 -0.01873
+0.38872 -0.034135 -0.030875
+-0.398428 -0.033719 -0.022119
+-0.402115 -0.050571 -0.018057
+0.397608 -0.068593 -0.021994
+-0.406578 -0.067517 -0.030633
+0.399559 -0.085311 -0.023029
+-0.410376 -0.084396 -0.026755
+0.400321 -0.101558 -0.023885
+-0.412303 -0.10137 -0.025056
+0.400982 -0.118222 -0.024773
+-0.412976 -0.118155 -0.024423
+0.402181 -0.13502 -0.026939
+-0.412976 -0.135007 -0.024329
+0.409434 -0.171782 -0.021437
+0.404164 -0.15121 -0.032341
+-0.412976 -0.151953 -0.024329
+-0.412976 -0.1689 -0.024329
+0.413962 -0.190086 -0.018422
+-0.412976 -0.185846 -0.024329
+0.414528 -0.203237 -0.022195
+-0.412976 -0.202793 -0.024329
+0.413705 -0.219443 -0.024379
+-0.412976 -0.219739 -0.024329
+0.411851 -0.235717 -0.026311
+-0.412976 -0.236686 -0.024329
+0.408624 -0.249049 -0.02894
+-0.412976 -0.253632 -0.024329
+0.405199 -0.267097 -0.0223
+-0.412976 -0.270578 -0.024329
+0.401818 -0.286906 -0.023715
+-0.412976 -0.287431 -0.024235
+0.40059 -0.304404 -0.024262
+-0.412303 -0.304216 -0.023603
+0.580502 -0.347398 -0.019418
+0.568794 -0.338557 -0.023459
+0.551502 -0.334588 -0.01674
+0.536343 -0.338546 -0.022495
+0.400455 -0.321418 -0.024329
+-0.410376 -0.321189 -0.021904
+0.519213 -0.345289 -0.024038
+0.502132 -0.353583 -0.024329
+0.400657 -0.338499 -0.025091
+-0.406713 -0.338136 -0.017959
+-0.546434 -0.360436 -0.015806
+-0.565888 -0.361684 -0.01814
+0.586731 -0.358305 -0.024666
+0.485185 -0.364253 -0.024329
+0.401311 -0.355517 -0.028059
+-0.402541 -0.355243 -0.030561
+-0.513761 -0.379245 -0.022093
+-0.533393 -0.371985 -0.022658
+-0.583919 -0.366681 -0.017854
+0.598163 -0.389203 -0.01868
+0.592532 -0.373149 -0.029942
+0.468239 -0.374139 -0.024329
+0.451225 -0.38176 -0.024397
+0.434257 -0.385481 -0.025742
+0.416813 -0.383715 -0.031008
+0.403185 -0.371707 -0.034645
+-0.401278 -0.372587 -0.025929
+-0.480737 -0.395737 -0.023501
+-0.497294 -0.386947 -0.022559
+-0.5515 -0.371025 -0.027301
+-0.596603 -0.379062 -0.019452
+-0.4062 -0.389612 -0.025392
+-0.418355 -0.406628 -0.02968
+-0.434262 -0.412828 -0.030366
+-0.447517 -0.408895 -0.026486
+-0.463697 -0.402704 -0.024361
+-0.606507 -0.394229 -0.024844
+0.603812 -0.40615 -0.024329
+-0.616071 -0.409707 -0.021979
+0.61511 -0.440042 -0.01868
+0.609461 -0.423096 -0.029978
+-0.622085 -0.427232 -0.027202
+-0.628719 -0.441772 -0.023568
+0.620759 -0.456989 -0.024329
+-0.63419 -0.458282 -0.020434
+0.632056 -0.490882 -0.01868
+0.626407 -0.473935 -0.029978
+-0.638022 -0.473396 -0.015183
+-0.630804 -0.487897 -0.019273
+0.637705 -0.507828 -0.024329
+-0.599314 -0.509719 -0.022318
+-0.617059 -0.499323 -0.021638
+0.648375 -0.541627 -0.018147
+0.643354 -0.524774 -0.029978
+-0.560042 -0.528789 -0.023133
+-0.579764 -0.520412 -0.020554
+-0.525064 -0.54647 -0.025065
+-0.542498 -0.537414 -0.023778
+0.651482 -0.558224 -0.022303
+-0.497125 -0.561988 -0.025509
+-0.510151 -0.552673 -0.028715
+0.650303 -0.573536 -0.02541
+-0.467193 -0.582991 -0.02044
+-0.480885 -0.572387 -0.023513
+0.644728 -0.58348 -0.028286
+0.635808 -0.59264 -0.023254
+0.603655 -0.597167 -0.024762
+0.584712 -0.598773 -0.020763
+0.56786 -0.594886 -0.026864
+0.548317 -0.596213 -0.025398
+0.530663 -0.597076 -0.026482
+0.515152 -0.598582 -0.029736
+-0.448762 -0.591328 -0.026627
+0.622474 -0.599046 -0.017046
+0.501823 -0.603758 -0.025849
+0.485226 -0.609506 -0.024558
+0.46824 -0.61602 -0.024329
+-0.412078 -0.615437 -0.024128
+-0.429608 -0.604054 -0.024864
+0.451293 -0.622296 -0.024329
+0.434347 -0.628494 -0.024329
+-0.394737 -0.626342 -0.024518
+0.417401 -0.635398 -0.024329
+0.400454 -0.643087 -0.024329
+-0.361113 -0.648103 -0.023805
+-0.377957 -0.636873 -0.024868
+0.383508 -0.651246 -0.024329
+0.366494 -0.659932 -0.024262
+-0.342165 -0.660508 -0.020848
+0.349189 -0.667419 -0.02406
+0.331615 -0.67494 -0.023724
+0.313987 -0.681418 -0.024047
+0.214734 -0.683686 -0.025006
+0.197231 -0.6818 -0.024464
+0.18015 -0.684433 -0.024329
+-0.192604 -0.684411 -0.024397
+-0.209496 -0.681649 -0.024074
+-0.225716 -0.68314 -0.023186
+-0.295638 -0.680814 -0.026165
+-0.309932 -0.676078 -0.024747
+-0.322007 -0.670481 -0.023718
+0.297 -0.687065 -0.025002
+0.281322 -0.690934 -0.024787
+0.266102 -0.692501 -0.02359
+0.250191 -0.691501 -0.02363
+0.23281 -0.68762 -0.024817
+0.163204 -0.690161 -0.024329
+0.146258 -0.698084 -0.024329
+-0.158173 -0.69804 -0.024464
+-0.175433 -0.690194 -0.024464
+-0.241658 -0.686185 -0.022066
+-0.255216 -0.689174 -0.018789
+-0.273307 -0.687534 -0.02002
+0.129177 -0.705885 -0.024195
+0.111751 -0.713876 -0.023711
+-0.122091 -0.713825 -0.027495
+-0.140841 -0.705739 -0.025042
+0.093899 -0.720332 -0.023966
+0.076602 -0.72525 -0.025096
+0.060575 -0.727335 -0.02523
+0.044458 -0.727999 -0.024585
+0.027633 -0.728133 -0.024329
+0.010686 -0.728133 -0.024329
+-0.00626 -0.728133 -0.024329
+-0.023207 -0.728133 -0.024329
+-0.040059 -0.728133 -0.024235
+-0.056795 -0.727707 -0.023912
+-0.073226 -0.726666 -0.023002
+-0.086259 -0.725191 -0.019896
+-0.101668 -0.720961 -0.023782
+-0.278201 0.9416 -0.042473
+-0.295031 0.942676 -0.042365
+-0.311919 0.942907 -0.043071
+-0.325687 0.942256 -0.045405
+-0.228585 0.923569 -0.04122
+-0.24554 0.931173 -0.041179
+-0.357506 0.932238 -0.037855
+-0.213346 0.914908 -0.041078
+-0.375668 0.924104 -0.04173
+-0.388988 0.91738 -0.046031
+-0.18465 0.879018 -0.037774
+-0.192404 0.89376 -0.045771
+-0.414652 0.891863 -0.040774
+-0.422212 0.878495 -0.046213
+-0.166172 0.846223 -0.037431
+-0.17473 0.862811 -0.04575
+-0.428122 0.863439 -0.037247
+0.382313 0.827694 -0.0425
+0.303317 0.830057 -0.03859
+0.287675 0.826316 -0.044694
+0.039838 0.825206 -0.037832
+0.022069 0.828588 -0.035874
+0.00848 0.829349 -0.03907
+-0.00756 0.830044 -0.040133
+-0.023933 0.830268 -0.04102
+-0.040853 0.829934 -0.041316
+-0.058006 0.828101 -0.041487
+0.415429 0.810728 -0.041411
+0.256261 0.813193 -0.04087
+0.093386 0.808518 -0.041947
+0.079587 0.813287 -0.045603
+0.062707 0.818385 -0.044664
+-0.075199 0.824815 -0.040949
+-0.091746 0.820568 -0.040523
+-0.108033 0.816489 -0.041182
+-0.12463 0.816247 -0.04189
+-0.140648 0.821235 -0.043091
+-0.15377 0.831478 -0.047379
+-0.439572 0.826238 -0.04756
+0.128866 0.791554 -0.041219
+0.111411 0.80067 -0.041011
+-0.440524 0.813226 -0.043945
+0.156766 0.777614 -0.04077
+0.141849 0.785368 -0.038409
+-0.44009 0.797046 -0.041589
+0.450051 0.774083 -0.042115
+0.180459 0.772257 -0.0406
+-0.438769 0.78096 -0.039623
+-0.434887 0.768032 -0.037058
+0.463841 0.743382 -0.040151
+-0.428422 0.751154 -0.041458
+0.469799 0.72523 -0.042804
+-0.418162 0.734948 -0.037398
+-0.407342 0.718731 -0.03953
+0.476093 0.699252 -0.044866
+-0.390714 0.703424 -0.044711
+0.472761 0.682846 -0.044156
+-0.343586 0.677369 -0.040537
+-0.357299 0.683563 -0.03781
+0.467109 0.663549 -0.036781
+-0.312241 0.657137 -0.041969
+-0.32705 0.668934 -0.041139
+0.463882 0.650784 -0.043967
+-0.301855 0.642922 -0.048456
+0.455773 0.635269 -0.043156
+-0.296758 0.627698 -0.043209
+0.443666 0.615993 -0.045525
+-0.294833 0.610703 -0.0415
+0.429376 0.598757 -0.043229
+-0.295632 0.593235 -0.040634
+0.413687 0.586779 -0.041734
+0.395304 0.577861 -0.038805
+-0.298709 0.573915 -0.038863
+0.375111 0.569218 -0.041682
+0.359839 0.563917 -0.044427
+0.344631 0.56232 -0.039428
+0.313585 0.559332 -0.042089
+0.296669 0.553989 -0.041159
+-0.300578 0.555648 -0.044751
+0.328183 0.560245 -0.044162
+0.281964 0.542591 -0.039124
+-0.30303 0.541806 -0.040702
+0.27199 0.52619 -0.032686
+-0.304289 0.525942 -0.03403
+0.267327 0.509629 -0.039191
+-0.299381 0.505047 -0.043648
+0.264604 0.492145 -0.041612
+-0.295903 0.487201 -0.04622
+0.261896 0.475319 -0.04375
+-0.294498 0.47418 -0.042203
+0.257654 0.459351 -0.047986
+-0.292117 0.458517 -0.039755
+0.253067 0.441853 -0.036424
+-0.287473 0.441772 -0.034295
+0.246696 0.425124 -0.042136
+-0.280465 0.425305 -0.045363
+0.240413 0.410694 -0.045684
+-0.272332 0.407143 -0.037205
+0.233054 0.393354 -0.041138
+-0.263557 0.391573 -0.046224
+0.223066 0.37755 -0.046626
+-0.253112 0.37399 -0.035179
+-0.514402 0.351623 -0.04137
+-0.531124 0.35187 -0.04137
+0.584849 0.327014 -0.037742
+0.565588 0.332412 -0.03532
+0.211654 0.360715 -0.046006
+-0.240384 0.356976 -0.039639
+-0.481235 0.337328 -0.041249
+-0.547515 0.346454 -0.042419
+0.599129 0.317852 -0.040505
+0.547867 0.329736 -0.036683
+0.534638 0.319187 -0.045127
+0.514114 0.319427 -0.037152
+0.197344 0.341245 -0.041971
+-0.225612 0.339626 -0.041612
+-0.447055 0.317784 -0.041087
+-0.464105 0.327804 -0.04141
+-0.465414 0.33087 -0.058504
+-0.563552 0.334094 -0.04581
+0.610275 0.304558 -0.038761
+0.496442 0.315042 -0.035169
+0.482384 0.308168 -0.038644
+0.463652 0.299079 -0.041768
+0.184562 0.32021 -0.038461
+-0.211889 0.322801 -0.044356
+-0.415023 0.302167 -0.040374
+-0.430871 0.309699 -0.040374
+-0.576482 0.319151 -0.04416
+0.445933 0.296496 -0.037655
+0.434815 0.29069 -0.042533
+0.415503 0.285499 -0.040397
+0.392804 0.280763 -0.039591
+0.180265 0.287821 -0.043603
+0.177707 0.302043 -0.045188
+-0.201598 0.306833 -0.050207
+-0.363906 0.281381 -0.041814
+-0.381413 0.288218 -0.04141
+-0.398502 0.295424 -0.04102
+-0.403263 0.297717 -0.056931
+-0.587265 0.305458 -0.0355
+0.627823 0.273862 -0.03483
+0.62066 0.288837 -0.037193
+0.377544 0.279398 -0.037378
+0.366938 0.274661 -0.042088
+0.349383 0.272767 -0.037555
+0.328546 0.264364 -0.041576
+-0.198222 0.289869 -0.041998
+-0.329004 0.265701 -0.04141
+-0.346332 0.274084 -0.041814
+-0.598211 0.289031 -0.041885
+0.310477 0.262433 -0.03693
+0.29635 0.257437 -0.039442
+0.279521 0.25321 -0.040452
+0.261827 0.249078 -0.043528
+0.241078 0.249262 -0.042299
+0.223087 0.253016 -0.04172
+0.212156 0.256965 -0.04108
+0.202548 0.262898 -0.040845
+0.189931 0.273613 -0.041984
+-0.202423 0.274285 -0.032713
+-0.212375 0.261284 -0.038384
+-0.294887 0.250066 -0.041343
+-0.311923 0.2579 -0.041276
+-0.610181 0.271546 -0.0474
+0.631157 0.254034 -0.035109
+-0.227035 0.25085 -0.040738
+-0.24351 0.244484 -0.041276
+-0.260524 0.241828 -0.041343
+-0.277694 0.24435 -0.04141
+-0.621981 0.254627 -0.035761
+0.635624 0.233404 -0.031015
+0.619798 0.233811 -0.040578
+-0.633247 0.237183 -0.041751
+0.629376 0.218756 -0.029986
+0.615772 0.215993 -0.033526
+0.602882 0.219495 -0.040323
+0.586143 0.220773 -0.048015
+-0.643798 0.219771 -0.047708
+0.586744 0.203665 -0.035072
+0.569851 0.203988 -0.042722
+-0.653615 0.203532 -0.038057
+0.552972 0.186974 -0.035785
+0.535958 0.187042 -0.044056
+-0.659646 0.186955 -0.047595
+0.519079 0.170028 -0.036883
+0.502065 0.170095 -0.045311
+-0.664153 0.170721 -0.041343
+0.485253 0.153082 -0.038676
+0.468173 0.153149 -0.046802
+-0.664409 0.154749 -0.03456
+0.468536 0.136323 -0.032754
+0.45132 0.136323 -0.040786
+0.434468 0.136579 -0.048488
+-0.646184 0.1346 -0.040867
+-0.656704 0.14499 -0.042766
+0.434753 0.120442 -0.035784
+0.418467 0.120513 -0.044378
+-0.5827 0.116682 -0.043026
+-0.601448 0.1179 -0.038429
+-0.61283 0.123465 -0.044317
+-0.629382 0.126551 -0.039396
+0.420833 0.108748 -0.033566
+0.403508 0.103485 -0.038924
+0.388004 0.107695 -0.051038
+-0.51347 0.098836 -0.042052
+-0.526807 0.106115 -0.045839
+-0.54169 0.108721 -0.042643
+-0.561252 0.11111 -0.039249
+0.382242 0.088849 -0.043241
+-0.478093 0.082381 -0.041007
+-0.495954 0.091061 -0.040832
+0.370092 0.065502 -0.044739
+-0.443548 0.065257 -0.040876
+-0.460676 0.074379 -0.041209
+0.36936 0.047277 -0.040026
+-0.414749 0.043844 -0.037458
+-0.426962 0.055247 -0.039887
+0.368381 0.036179 -0.045234
+-0.404146 0.03317 -0.04288
+0.379491 -0.000844 -0.034344
+0.372886 0.018923 -0.043702
+-0.395363 0.017373 -0.049815
+-0.395713 0.000793 -0.044376
+0.383103 -0.017745 -0.041514
+-0.396242 -0.016449 -0.041679
+0.392735 -0.05369 -0.039051
+0.386449 -0.033889 -0.048265
+-0.398177 -0.033947 -0.03972
+-0.402068 -0.050988 -0.035734
+0.397454 -0.072483 -0.035987
+-0.406112 -0.068512 -0.047929
+0.398864 -0.086373 -0.03907
+-0.410223 -0.084423 -0.04375
+0.399864 -0.102351 -0.040038
+-0.412348 -0.101114 -0.041903
+0.400635 -0.11841 -0.041397
+-0.412976 -0.118061 -0.041276
+0.401507 -0.134267 -0.043616
+-0.412976 -0.135007 -0.041276
+0.402202 -0.147241 -0.047357
+-0.412976 -0.151953 -0.041276
+0.410352 -0.185839 -0.033941
+0.405183 -0.164928 -0.044483
+-0.412976 -0.1689 -0.041276
+-0.412976 -0.185846 -0.041276
+0.410781 -0.202305 -0.039455
+-0.412976 -0.202793 -0.041276
+0.410076 -0.219416 -0.04133
+-0.412976 -0.219739 -0.041276
+0.407985 -0.235785 -0.042226
+-0.412976 -0.236686 -0.041276
+0.405344 -0.252341 -0.041652
+-0.412976 -0.253632 -0.041276
+0.402336 -0.269866 -0.040913
+-0.412976 -0.270484 -0.041182
+0.400881 -0.28739 -0.041141
+-0.412841 -0.287081 -0.040832
+0.400455 -0.304471 -0.041276
+-0.412079 -0.303328 -0.039976
+0.579167 -0.347531 -0.034323
+0.570328 -0.341457 -0.041176
+0.555102 -0.338235 -0.037157
+0.536365 -0.341343 -0.040383
+0.400242 -0.321485 -0.041343
+-0.410129 -0.320046 -0.03894
+0.51889 -0.348174 -0.041088
+0.399171 -0.338673 -0.042518
+-0.406329 -0.337651 -0.035676
+0.586421 -0.359294 -0.040918
+0.502038 -0.356769 -0.041182
+0.485185 -0.366528 -0.041276
+0.396912 -0.356844 -0.046971
+-0.4016 -0.354759 -0.048391
+-0.563165 -0.377503 -0.032649
+0.598163 -0.389297 -0.035533
+0.592431 -0.37361 -0.046212
+0.468239 -0.377041 -0.041276
+0.451158 -0.384439 -0.041567
+0.405238 -0.385506 -0.046432
+0.397437 -0.373642 -0.048878
+-0.398809 -0.371813 -0.043365
+-0.511129 -0.392942 -0.033153
+-0.526483 -0.389803 -0.035136
+-0.547782 -0.389602 -0.039223
+-0.580512 -0.378907 -0.030723
+0.434288 -0.390345 -0.043504
+0.419418 -0.393677 -0.049969
+-0.399306 -0.388421 -0.041195
+-0.479545 -0.411914 -0.038611
+-0.49884 -0.405054 -0.038517
+-0.569726 -0.3921 -0.042283
+-0.585135 -0.395083 -0.041062
+-0.596684 -0.391857 -0.033221
+0.603812 -0.40615 -0.041276
+-0.404391 -0.405297 -0.042644
+-0.41356 -0.422331 -0.047636
+-0.429414 -0.423824 -0.042187
+-0.446325 -0.42366 -0.041166
+-0.462908 -0.418682 -0.039731
+-0.518646 -0.405289 -0.043653
+-0.533548 -0.40251 -0.045092
+-0.596614 -0.407552 -0.042497
+-0.606705 -0.404017 -0.033083
+0.61511 -0.440042 -0.035627
+0.609461 -0.423096 -0.046924
+-0.610603 -0.421783 -0.038291
+-0.619333 -0.440575 -0.036887
+0.620759 -0.456989 -0.041276
+-0.611723 -0.457245 -0.044657
+-0.624451 -0.457218 -0.033281
+0.632056 -0.490882 -0.035627
+0.626407 -0.473935 -0.046924
+-0.615175 -0.47333 -0.038947
+-0.628307 -0.472839 -0.028154
+-0.602469 -0.491879 -0.037163
+-0.619409 -0.485747 -0.030724
+0.637705 -0.507828 -0.041276
+-0.582426 -0.506337 -0.037217
+0.648162 -0.541721 -0.035066
+0.643118 -0.524774 -0.046925
+-0.547681 -0.527228 -0.038066
+-0.564767 -0.517875 -0.037278
+-0.514124 -0.544087 -0.040429
+-0.530739 -0.535593 -0.03899
+0.649862 -0.557922 -0.039582
+-0.480616 -0.562589 -0.040343
+-0.497644 -0.551937 -0.041276
+0.645506 -0.572563 -0.043592
+0.569841 -0.583345 -0.047668
+-0.461597 -0.575597 -0.038375
+0.637789 -0.583939 -0.03772
+0.622676 -0.588733 -0.037238
+0.606369 -0.586799 -0.042945
+0.588537 -0.587707 -0.039522
+0.555643 -0.587784 -0.039103
+0.539781 -0.588411 -0.041683
+0.519521 -0.590414 -0.045403
+0.501595 -0.597159 -0.04289
+-0.429837 -0.594047 -0.04216
+-0.443446 -0.583843 -0.044364
+0.485132 -0.603967 -0.041599
+0.46824 -0.611156 -0.041276
+-0.395988 -0.615152 -0.040859
+-0.412975 -0.604356 -0.041249
+0.451387 -0.617871 -0.041182
+0.434602 -0.624688 -0.041155
+0.417629 -0.63094 -0.041316
+-0.379055 -0.626046 -0.041209
+0.400521 -0.637931 -0.041343
+0.383508 -0.646225 -0.041276
+-0.344508 -0.648706 -0.04059
+-0.361974 -0.637328 -0.041236
+0.366561 -0.654384 -0.041276
+0.349615 -0.662858 -0.041276
+-0.326328 -0.660026 -0.040119
+0.332695 -0.670112 -0.041114
+0.315686 -0.676525 -0.04102
+0.29865 -0.68231 -0.041088
+0.217297 -0.682317 -0.045149
+0.197604 -0.681119 -0.042113
+0.180218 -0.683783 -0.041343
+-0.191618 -0.683817 -0.041881
+-0.209138 -0.68034 -0.041222
+-0.225995 -0.680732 -0.039739
+-0.279709 -0.680006 -0.042378
+-0.294004 -0.676328 -0.04093
+-0.307566 -0.671225 -0.038554
+0.282398 -0.687195 -0.040388
+0.266825 -0.690104 -0.039245
+0.253909 -0.69052 -0.036644
+0.238562 -0.687077 -0.041064
+0.163204 -0.689219 -0.041276
+0.146258 -0.697143 -0.041276
+-0.156407 -0.698309 -0.041639
+-0.173954 -0.690228 -0.041814
+-0.239443 -0.683159 -0.035779
+-0.257419 -0.684371 -0.036505
+0.129311 -0.704753 -0.041276
+0.112298 -0.712027 -0.041209
+-0.112206 -0.716058 -0.041666
+-0.126813 -0.710702 -0.044897
+-0.139684 -0.705522 -0.042293
+0.095221 -0.718485 -0.041047
+0.078252 -0.723912 -0.041182
+0.061409 -0.726656 -0.041504
+0.044552 -0.727999 -0.041437
+0.027633 -0.728133 -0.041276
+0.010686 -0.728133 -0.041276
+-0.006166 -0.728133 -0.041182
+-0.022862 -0.728055 -0.041087
+-0.03949 -0.727775 -0.040926
+-0.055764 -0.727131 -0.040307
+-0.072186 -0.725733 -0.039854
+-0.091433 -0.722268 -0.038218
+-0.267549 0.935815 -0.05699
+-0.28493 0.938079 -0.057577
+-0.302365 0.939197 -0.057649
+-0.319083 0.939105 -0.057572
+-0.334792 0.938547 -0.05571
+-0.234139 0.924782 -0.055249
+-0.250746 0.932154 -0.055645
+-0.348212 0.936013 -0.051266
+-0.361947 0.930047 -0.054026
+-0.203131 0.905663 -0.053219
+-0.218109 0.916778 -0.05479
+-0.377674 0.921672 -0.056366
+-0.392058 0.913144 -0.057348
+-0.402287 0.903968 -0.059099
+-0.184842 0.8782 -0.055284
+-0.193818 0.893093 -0.058504
+-0.412857 0.891695 -0.055352
+-0.420509 0.876079 -0.059265
+0.361638 0.833029 -0.056591
+0.344607 0.834582 -0.056367
+0.327208 0.834992 -0.054961
+-0.166271 0.844513 -0.056105
+-0.176221 0.861102 -0.059454
+-0.4286 0.860736 -0.054979
+0.393 0.822311 -0.055808
+0.377357 0.829458 -0.05612
+0.312853 0.833584 -0.051459
+0.299052 0.828915 -0.055332
+0.280303 0.821481 -0.058274
+0.023678 0.824908 -0.054268
+0.005398 0.827939 -0.052961
+-0.008596 0.828093 -0.05685
+-0.025664 0.82812 -0.057805
+-0.042569 0.827325 -0.057941
+-0.060269 0.824091 -0.059805
+-0.43163 0.843899 -0.060376
+0.425195 0.804124 -0.054727
+0.409435 0.814272 -0.055485
+0.263871 0.817054 -0.052625
+0.087829 0.807578 -0.058635
+0.074262 0.812878 -0.056211
+0.064037 0.81433 -0.061421
+0.046877 0.818524 -0.061011
+-0.077871 0.821157 -0.054397
+-0.091373 0.817315 -0.057285
+-0.108513 0.814343 -0.058612
+-0.126051 0.814588 -0.059383
+-0.142567 0.819559 -0.060082
+-0.154695 0.827851 -0.061892
+-0.434547 0.829515 -0.059468
+0.439891 0.790036 -0.053002
+0.250236 0.809066 -0.054432
+0.12332 0.791644 -0.057673
+0.105228 0.800629 -0.058532
+-0.436185 0.813132 -0.0587
+0.234571 0.797254 -0.055349
+0.144144 0.780624 -0.057728
+-0.436747 0.796723 -0.056987
+0.45782 0.758329 -0.052814
+0.449469 0.774927 -0.057602
+0.217836 0.783378 -0.056075
+0.199736 0.771806 -0.057599
+0.183893 0.766208 -0.061735
+0.166579 0.770595 -0.058666
+-0.436104 0.779911 -0.054921
+-0.434264 0.764658 -0.050028
+0.465205 0.740978 -0.052397
+-0.427766 0.750358 -0.056449
+0.472659 0.712556 -0.051787
+0.467016 0.729099 -0.059193
+-0.418185 0.733959 -0.052658
+-0.403167 0.716226 -0.056123
+0.472294 0.697894 -0.056483
+-0.376658 0.696167 -0.057063
+-0.39034 0.705587 -0.059585
+0.46968 0.684079 -0.059035
+-0.337266 0.676389 -0.055896
+-0.357276 0.685814 -0.053746
+0.466933 0.666431 -0.054192
+-0.30791 0.654133 -0.055912
+-0.320119 0.666404 -0.056513
+0.459153 0.647406 -0.056267
+-0.2993 0.643144 -0.064824
+0.450893 0.630432 -0.057312
+-0.295227 0.627183 -0.060634
+0.441328 0.617248 -0.06038
+-0.293701 0.610703 -0.05876
+0.430763 0.603622 -0.05922
+-0.294149 0.593554 -0.058088
+0.416153 0.590298 -0.056483
+0.399571 0.579947 -0.055488
+-0.295643 0.576168 -0.057836
+0.381813 0.572216 -0.055443
+0.364615 0.56563 -0.056084
+0.34831 0.562395 -0.055419
+0.318357 0.56035 -0.05835
+0.300228 0.557305 -0.057348
+-0.297495 0.558751 -0.058307
+0.334763 0.560459 -0.053186
+0.284403 0.548069 -0.057168
+-0.298835 0.541676 -0.058163
+0.27206 0.529457 -0.054187
+-0.298882 0.522308 -0.055317
+0.26568 0.509629 -0.057393
+-0.295634 0.504696 -0.060994
+0.262869 0.492172 -0.05872
+-0.294317 0.491075 -0.059255
+0.260331 0.475965 -0.060271
+-0.292543 0.475248 -0.0576
+0.256345 0.462632 -0.062902
+-0.291143 0.462196 -0.052831
+0.251313 0.444463 -0.056978
+-0.285904 0.444582 -0.054323
+0.242568 0.423131 -0.061045
+-0.278943 0.427971 -0.061237
+0.235855 0.404791 -0.055984
+-0.271179 0.410281 -0.057285
+0.225929 0.388933 -0.06108
+-0.262476 0.394269 -0.061501
+0.217062 0.371779 -0.057655
+-0.252309 0.376348 -0.055286
+-0.498657 0.348548 -0.057321
+-0.514774 0.352894 -0.057967
+-0.531443 0.35254 -0.058513
+0.207212 0.360622 -0.062532
+-0.23797 0.35695 -0.057366
+-0.482629 0.341408 -0.057455
+-0.54721 0.346626 -0.06019
+0.597586 0.314423 -0.048288
+0.591297 0.315772 -0.04902
+0.575253 0.317858 -0.049987
+0.197021 0.346136 -0.059277
+-0.223884 0.339653 -0.05872
+-0.447772 0.320292 -0.058437
+-0.56004 0.336543 -0.064625
+0.554523 0.316695 -0.050825
+0.538169 0.303633 -0.059044
+0.51982 0.303948 -0.055134
+0.498468 0.303265 -0.050468
+0.182812 0.326571 -0.059935
+-0.209941 0.323447 -0.060724
+-0.417907 0.304834 -0.053638
+-0.430952 0.311165 -0.056971
+-0.571451 0.324921 -0.055338
+0.611128 0.293109 -0.047535
+0.600896 0.306198 -0.049952
+0.586259 0.30136 -0.058275
+0.566951 0.302987 -0.060695
+0.552068 0.300673 -0.062611
+0.480243 0.297236 -0.050854
+0.468487 0.285549 -0.058077
+0.44822 0.285565 -0.052155
+0.17568 0.309719 -0.055509
+-0.200481 0.310114 -0.064593
+-0.368523 0.282972 -0.058693
+-0.386012 0.290325 -0.058061
+-0.583785 0.308194 -0.054283
+0.602135 0.289003 -0.056175
+0.487011 0.286202 -0.062049
+0.43083 0.281116 -0.051724
+0.419449 0.27002 -0.058602
+0.401205 0.269703 -0.054911
+0.380361 0.268874 -0.052367
+0.360625 0.264366 -0.052985
+0.184595 0.27377 -0.058483
+0.174034 0.291827 -0.061818
+-0.195341 0.292373 -0.062322
+-0.331649 0.266497 -0.058693
+-0.349588 0.274657 -0.060874
+-0.597629 0.28856 -0.059885
+0.616846 0.275047 -0.047368
+0.601541 0.271599 -0.059022
+0.43676 0.269636 -0.062568
+0.344844 0.262182 -0.05135
+0.332888 0.251807 -0.058992
+0.312528 0.252109 -0.053305
+0.292204 0.247587 -0.054529
+0.211424 0.253494 -0.05503
+0.196227 0.2634 -0.053934
+-0.201208 0.274167 -0.050982
+-0.211403 0.260179 -0.056316
+-0.297308 0.250155 -0.058357
+-0.314501 0.258505 -0.058289
+-0.609793 0.270691 -0.064686
+0.612384 0.254596 -0.05014
+0.594902 0.254801 -0.0602
+0.350521 0.251466 -0.063222
+0.277449 0.246216 -0.053331
+0.268154 0.241771 -0.059149
+0.252742 0.241973 -0.058589
+0.23185 0.244607 -0.060488
+-0.226721 0.248822 -0.057931
+-0.243645 0.242624 -0.058357
+-0.261286 0.240707 -0.058895
+-0.279487 0.243688 -0.058895
+-0.621605 0.254035 -0.0533
+0.601142 0.237155 -0.050284
+0.583283 0.238459 -0.059019
+-0.633252 0.235002 -0.060901
+0.568493 0.221553 -0.054995
+0.550161 0.222199 -0.062404
+-0.643722 0.217134 -0.062145
+0.552546 0.20419 -0.049727
+0.534689 0.204674 -0.05671
+0.516268 0.205252 -0.063065
+-0.652162 0.203134 -0.055323
+0.518653 0.187243 -0.05059
+0.500797 0.187728 -0.057259
+0.482375 0.188306 -0.0633
+-0.656767 0.186954 -0.064155
+0.48476 0.170297 -0.051297
+0.466904 0.170781 -0.05773
+0.448482 0.17136 -0.063614
+-0.661218 0.172053 -0.057399
+0.450867 0.153351 -0.052238
+0.433011 0.153835 -0.058896
+0.414764 0.154238 -0.06489
+-0.659147 0.157151 -0.053391
+0.41723 0.136754 -0.054484
+0.399571 0.137494 -0.062212
+-0.61729 0.133582 -0.060321
+-0.635177 0.13586 -0.054284
+-0.64766 0.144845 -0.056507
+0.401741 0.120699 -0.051485
+0.38474 0.121921 -0.059872
+0.370618 0.124675 -0.068288
+-0.529667 0.115985 -0.059083
+-0.546644 0.120468 -0.058253
+-0.56409 0.124221 -0.058699
+-0.578302 0.12838 -0.061898
+-0.596472 0.127799 -0.056854
+0.369722 0.107202 -0.061267
+-0.497227 0.102419 -0.058344
+-0.513635 0.11046 -0.059056
+0.362139 0.085748 -0.060723
+-0.46324 0.085977 -0.057846
+-0.480182 0.094491 -0.057967
+0.363437 0.047319 -0.056798
+0.357408 0.067199 -0.065652
+-0.4287 0.067252 -0.056683
+-0.445897 0.077811 -0.057787
+-0.39391 0.046752 -0.069834
+-0.409471 0.0523 -0.05608
+0.366956 0.030338 -0.056081
+-0.395484 0.03326 -0.058957
+0.376329 -0.00266 -0.055524
+0.369076 0.016486 -0.063673
+-0.389361 0.016843 -0.065671
+-0.391446 0.001362 -0.060815
+0.381958 -0.020651 -0.055685
+-0.394089 -0.015875 -0.059169
+0.38342 -0.031248 -0.062008
+-0.396888 -0.033813 -0.057743
+0.39448 -0.071175 -0.054383
+0.387882 -0.048047 -0.061668
+-0.40119 -0.053756 -0.056193
+-0.40514 -0.071805 -0.062833
+0.398103 -0.08957 -0.052659
+-0.408988 -0.085069 -0.060271
+0.398957 -0.103181 -0.055832
+-0.411611 -0.101208 -0.058787
+0.399736 -0.118868 -0.057227
+-0.412897 -0.118061 -0.058222
+0.400296 -0.1342 -0.059217
+-0.412976 -0.135007 -0.058222
+0.40111 -0.149896 -0.060326
+-0.412976 -0.151953 -0.058222
+0.402031 -0.163844 -0.062172
+-0.412976 -0.1689 -0.058222
+0.405486 -0.182249 -0.055338
+-0.412976 -0.185846 -0.058222
+0.406298 -0.202211 -0.057437
+-0.412976 -0.202793 -0.058222
+0.405736 -0.219578 -0.058249
+-0.412976 -0.219739 -0.058222
+0.403979 -0.23643 -0.058343
+-0.412976 -0.236686 -0.058222
+0.402027 -0.253403 -0.058182
+-0.412976 -0.253538 -0.058128
+0.400668 -0.270511 -0.058155
+-0.412841 -0.270135 -0.057778
+0.399906 -0.287525 -0.058222
+-0.412384 -0.286288 -0.056985
+0.399592 -0.304471 -0.058222
+-0.411385 -0.302266 -0.056016
+0.577758 -0.349792 -0.05272
+0.56537 -0.342068 -0.052401
+0.552151 -0.342289 -0.056462
+0.398507 -0.321458 -0.058451
+-0.409975 -0.316156 -0.052934
+0.534899 -0.345447 -0.057681
+0.518083 -0.351683 -0.057523
+0.396539 -0.337934 -0.059729
+-0.405256 -0.335098 -0.056148
+0.58676 -0.361915 -0.054592
+0.501755 -0.361931 -0.057846
+0.485091 -0.371126 -0.058128
+0.393168 -0.350668 -0.063258
+-0.399665 -0.355543 -0.06613
+0.598085 -0.389391 -0.052228
+0.591813 -0.373817 -0.062109
+0.468239 -0.381043 -0.058222
+0.392255 -0.365447 -0.061419
+-0.397209 -0.371141 -0.059773
+0.45132 -0.389527 -0.058698
+0.435162 -0.396205 -0.060545
+0.421915 -0.401399 -0.064635
+0.408168 -0.396928 -0.06223
+0.395002 -0.383858 -0.063887
+-0.395924 -0.387078 -0.05698
+-0.543617 -0.408484 -0.049241
+-0.558607 -0.407604 -0.049541
+0.603812 -0.40615 -0.058222
+-0.397252 -0.40132 -0.054745
+-0.476585 -0.426894 -0.049611
+-0.492309 -0.424122 -0.050369
+-0.510129 -0.421652 -0.051066
+-0.529197 -0.419349 -0.052019
+-0.578531 -0.410911 -0.049183
+0.61511 -0.440042 -0.052573
+0.609461 -0.423096 -0.063871
+-0.398739 -0.421432 -0.061591
+-0.409723 -0.435942 -0.058184
+-0.423284 -0.438877 -0.054381
+-0.440783 -0.43937 -0.053049
+-0.462132 -0.440022 -0.055595
+-0.54652 -0.422889 -0.05463
+-0.56304 -0.424633 -0.055055
+-0.576786 -0.428523 -0.055042
+-0.593154 -0.427337 -0.05022
+-0.400758 -0.44156 -0.066489
+-0.48435 -0.441237 -0.059342
+-0.503064 -0.439294 -0.05874
+-0.518646 -0.434619 -0.057172
+-0.532632 -0.437473 -0.057848
+-0.548595 -0.439114 -0.057843
+-0.564313 -0.44093 -0.057461
+-0.579933 -0.442167 -0.056156
+-0.592761 -0.444755 -0.054102
+-0.605776 -0.441086 -0.047243
+0.620759 -0.456989 -0.058222
+-0.413205 -0.453624 -0.06555
+-0.432908 -0.455165 -0.062621
+-0.448342 -0.453117 -0.062186
+-0.517303 -0.45289 -0.062268
+-0.53542 -0.451578 -0.060149
+-0.548644 -0.455654 -0.059626
+-0.565008 -0.457204 -0.058437
+-0.581098 -0.457984 -0.056374
+-0.596637 -0.45789 -0.052216
+0.632056 -0.490882 -0.052573
+0.626407 -0.473935 -0.063871
+-0.528818 -0.47012 -0.063168
+-0.548106 -0.473165 -0.060143
+-0.565331 -0.473962 -0.057887
+-0.582228 -0.474258 -0.054457
+-0.599063 -0.474258 -0.047405
+-0.530976 -0.490206 -0.063225
+-0.54864 -0.490559 -0.058977
+-0.565815 -0.490416 -0.054966
+-0.583084 -0.490647 -0.048358
+0.63747 -0.507828 -0.058222
+-0.532487 -0.507062 -0.059687
+-0.549918 -0.506031 -0.054865
+-0.566237 -0.505482 -0.048252
+0.646954 -0.541465 -0.052264
+0.642289 -0.524546 -0.063988
+-0.516738 -0.522785 -0.059391
+-0.535327 -0.522193 -0.050887
+-0.552581 -0.516356 -0.047423
+-0.501803 -0.538271 -0.054958
+-0.519382 -0.533308 -0.049809
+0.647375 -0.556593 -0.056837
+-0.464208 -0.560627 -0.05488
+-0.482442 -0.549366 -0.054986
+0.642808 -0.566294 -0.060451
+0.633358 -0.576482 -0.054811
+0.615428 -0.579412 -0.056303
+0.600186 -0.580747 -0.054426
+0.58584 -0.576761 -0.059625
+0.56885 -0.572855 -0.06566
+0.551043 -0.579524 -0.057233
+0.530162 -0.581709 -0.05955
+0.514479 -0.5839 -0.062983
+-0.446831 -0.57281 -0.055579
+0.501447 -0.589609 -0.059688
+0.485132 -0.596984 -0.058545
+-0.413342 -0.592141 -0.057368
+-0.430415 -0.582069 -0.056949
+0.46824 -0.604487 -0.058222
+0.451414 -0.612482 -0.057967
+-0.380032 -0.613936 -0.056861
+-0.396434 -0.603311 -0.056854
+0.4351 -0.619142 -0.057469
+0.418473 -0.625072 -0.057976
+0.401029 -0.631402 -0.058609
+-0.362862 -0.624813 -0.05742
+0.383736 -0.638864 -0.058263
+0.366817 -0.647261 -0.058101
+-0.327978 -0.648058 -0.057698
+-0.345512 -0.636532 -0.057622
+0.349938 -0.655263 -0.058169
+0.333112 -0.663438 -0.057913
+-0.309939 -0.659356 -0.057089
+0.316717 -0.670203 -0.057523
+0.300036 -0.676006 -0.057815
+0.282949 -0.681079 -0.057075
+0.230042 -0.680612 -0.061373
+0.2123 -0.677697 -0.064139
+0.197654 -0.67873 -0.060328
+0.180325 -0.68153 -0.058585
+-0.188483 -0.682304 -0.061047
+-0.207362 -0.678278 -0.05906
+-0.225196 -0.677585 -0.057146
+-0.244297 -0.679473 -0.053335
+-0.265135 -0.677923 -0.056318
+-0.277831 -0.675302 -0.05707
+-0.29132 -0.67065 -0.05499
+0.269192 -0.685407 -0.052945
+0.251738 -0.685125 -0.054199
+0.163204 -0.687258 -0.058222
+0.146352 -0.695056 -0.058128
+-0.151968 -0.698163 -0.058316
+-0.169336 -0.690093 -0.058693
+0.129567 -0.702171 -0.058101
+0.112594 -0.709301 -0.058263
+0.095607 -0.715439 -0.058034
+-0.105467 -0.714935 -0.060539
+-0.121569 -0.711074 -0.055472
+-0.135489 -0.705223 -0.058051
+0.079225 -0.720664 -0.057469
+0.062678 -0.724415 -0.057896
+0.045485 -0.726321 -0.058434
+0.028332 -0.727205 -0.058263
+0.011314 -0.727506 -0.058222
+-0.005534 -0.727461 -0.057967
+-0.021804 -0.72736 -0.057321
+-0.037804 -0.726844 -0.05716
+-0.054314 -0.725895 -0.056858
+-0.068095 -0.724969 -0.053777
+-0.083957 -0.721186 -0.05745
+-0.241687 0.922838 -0.066063
+-0.256319 0.925717 -0.068562
+-0.274678 0.926178 -0.07251
+-0.294054 0.928545 -0.071876
+-0.312098 0.928997 -0.071558
+-0.330292 0.929111 -0.069238
+-0.347351 0.930434 -0.063631
+-0.210362 0.907438 -0.063976
+-0.225748 0.912553 -0.067934
+-0.363428 0.921696 -0.067005
+-0.379381 0.913635 -0.067973
+-0.201587 0.898959 -0.064605
+-0.244092 0.910982 -0.076995
+-0.261222 0.916246 -0.078627
+-0.34689 0.915092 -0.077343
+-0.366129 0.90997 -0.075957
+-0.393167 0.904806 -0.067908
+-0.210856 0.897671 -0.071929
+-0.225766 0.897151 -0.078726
+-0.380797 0.898579 -0.077319
+-0.394153 0.896826 -0.073464
+-0.402561 0.894967 -0.067816
+-0.184851 0.868271 -0.066915
+-0.195801 0.883981 -0.068592
+-0.210059 0.882151 -0.078725
+-0.39509 0.883165 -0.077588
+-0.411148 0.880066 -0.068462
+-0.194665 0.866271 -0.076528
+-0.405116 0.864523 -0.078209
+-0.419159 0.864016 -0.06831
+0.385241 0.820935 -0.066097
+0.370891 0.823899 -0.067966
+0.353672 0.826281 -0.068738
+0.33379 0.824621 -0.070097
+0.31417 0.828196 -0.064227
+0.007885 0.822586 -0.071695
+-0.012604 0.82359 -0.074227
+-0.030307 0.823563 -0.074152
+-0.165057 0.830652 -0.07092
+-0.178705 0.850183 -0.070834
+-0.414315 0.848095 -0.077304
+-0.425292 0.850502 -0.067382
+0.417277 0.804617 -0.065536
+0.400807 0.810587 -0.068857
+0.29756 0.819885 -0.06879
+0.280918 0.809865 -0.072923
+0.264057 0.811342 -0.064427
+0.074839 0.808188 -0.072754
+0.058546 0.812834 -0.072576
+0.047126 0.813542 -0.078845
+0.030003 0.81742 -0.077585
+-0.044798 0.823114 -0.071833
+-0.054516 0.819892 -0.077386
+-0.072272 0.817899 -0.072498
+-0.091315 0.813107 -0.075119
+-0.110183 0.80919 -0.078627
+-0.131174 0.809062 -0.07663
+-0.151101 0.814024 -0.076267
+-0.179051 0.832356 -0.079835
+-0.423096 0.833245 -0.072867
+0.43023 0.793706 -0.066141
+0.382486 0.809321 -0.076966
+0.362916 0.812664 -0.078184
+0.347178 0.81542 -0.078446
+0.314696 0.812863 -0.078234
+0.296579 0.807645 -0.079111
+0.248264 0.8005 -0.066604
+0.115887 0.791256 -0.075043
+0.09565 0.799845 -0.077592
+-0.16829 0.81606 -0.08186
+-0.181696 0.819615 -0.085311
+-0.425698 0.814181 -0.072244
+0.441485 0.781652 -0.065451
+0.415105 0.793012 -0.076018
+0.398059 0.798415 -0.079346
+0.262689 0.796183 -0.076383
+0.247503 0.792947 -0.073476
+0.234084 0.787375 -0.068711
+0.142073 0.775962 -0.077231
+0.131382 0.784344 -0.071896
+-0.426716 0.796952 -0.071374
+0.432631 0.779413 -0.074351
+0.246199 0.779967 -0.078665
+0.231249 0.777283 -0.074752
+0.217326 0.772562 -0.070229
+0.198293 0.759386 -0.075885
+0.175123 0.761531 -0.075797
+0.156538 0.769309 -0.074999
+-0.426602 0.779561 -0.069305
+0.459174 0.745988 -0.064254
+0.447678 0.764998 -0.068196
+0.434178 0.763069 -0.079597
+0.229667 0.764142 -0.080147
+0.214544 0.76211 -0.077058
+-0.412056 0.762521 -0.078453
+-0.425938 0.760651 -0.065362
+0.448334 0.747333 -0.075148
+0.215168 0.750773 -0.083973
+-0.410752 0.745257 -0.074173
+-0.419965 0.743465 -0.064727
+0.458831 0.733618 -0.069566
+0.449294 0.730619 -0.077593
+-0.395419 0.729884 -0.077081
+-0.408595 0.730013 -0.066773
+0.463859 0.715899 -0.066713
+0.450079 0.713121 -0.077924
+-0.380258 0.715145 -0.076735
+-0.394096 0.715504 -0.068208
+0.463158 0.697129 -0.068588
+0.449451 0.695757 -0.078339
+-0.343376 0.694813 -0.07737
+-0.362684 0.700167 -0.072112
+-0.381464 0.705104 -0.067611
+0.460755 0.679998 -0.068475
+0.447357 0.67865 -0.078267
+-0.290675 0.674763 -0.088709
+-0.305218 0.678019 -0.081339
+-0.326514 0.681788 -0.072684
+-0.346087 0.686772 -0.067199
+0.456357 0.662577 -0.068045
+0.442681 0.66177 -0.078285
+-0.293153 0.660804 -0.084201
+-0.306737 0.661161 -0.070127
+0.449617 0.645393 -0.068503
+0.435732 0.645268 -0.078559
+-0.292636 0.644269 -0.079861
+0.440886 0.629171 -0.069291
+0.426466 0.628655 -0.078409
+-0.290827 0.627393 -0.077025
+0.432186 0.614082 -0.069293
+0.416782 0.61119 -0.076917
+-0.290742 0.610635 -0.075718
+0.42485 0.605078 -0.069183
+0.416683 0.597304 -0.068307
+0.403685 0.599673 -0.076293
+0.38557 0.594839 -0.079062
+-0.29184 0.593689 -0.075169
+0.401435 0.588437 -0.068053
+0.384697 0.57963 -0.067861
+0.371409 0.583818 -0.076425
+0.356056 0.58128 -0.077777
+0.338352 0.579556 -0.077935
+0.320281 0.578716 -0.078726
+0.30035 0.576482 -0.08017
+-0.293073 0.576675 -0.075101
+0.368215 0.573144 -0.067871
+0.351246 0.569583 -0.067794
+0.332142 0.566531 -0.066735
+0.314639 0.568233 -0.071018
+0.3037 0.563902 -0.068424
+0.286085 0.561452 -0.074527
+-0.294416 0.559756 -0.074783
+0.272124 0.545043 -0.074439
+-0.295118 0.543361 -0.074205
+0.264962 0.526867 -0.074496
+-0.294756 0.526366 -0.074003
+0.262014 0.509091 -0.075034
+-0.293523 0.509016 -0.073887
+0.259486 0.492199 -0.075514
+-0.292456 0.495256 -0.071591
+0.256094 0.475965 -0.076119
+-0.288457 0.477841 -0.076006
+0.251917 0.459378 -0.075764
+-0.287004 0.459072 -0.067978
+0.246179 0.44221 -0.075958
+-0.279784 0.439199 -0.075419
+0.239972 0.428227 -0.07901
+-0.273663 0.42164 -0.072179
+0.233452 0.410132 -0.073938
+-0.265317 0.40607 -0.07687
+0.223371 0.394346 -0.079143
+-0.256803 0.388252 -0.071554
+0.211933 0.374451 -0.076751
+-0.24761 0.373898 -0.073752
+-0.498666 0.3487 -0.073877
+-0.515177 0.352863 -0.074846
+-0.531474 0.352607 -0.075518
+0.196832 0.352678 -0.075724
+-0.233666 0.356613 -0.074806
+-0.470394 0.334177 -0.074509
+-0.485585 0.343443 -0.070666
+-0.546475 0.346985 -0.077468
+0.186205 0.337705 -0.072732
+-0.219488 0.33968 -0.075514
+-0.45046 0.321921 -0.077624
+-0.559436 0.336544 -0.081414
+0.175896 0.32601 -0.077919
+-0.205469 0.323447 -0.076572
+-0.413643 0.301799 -0.071526
+-0.432358 0.311569 -0.074313
+-0.571875 0.322802 -0.068996
+0.590819 0.284414 -0.062736
+0.576625 0.287191 -0.065971
+0.560172 0.287712 -0.06773
+0.544368 0.287779 -0.067855
+0.527593 0.287685 -0.066509
+0.169783 0.308806 -0.073783
+-0.194098 0.30686 -0.077976
+-0.375602 0.283389 -0.074913
+-0.393513 0.292017 -0.074456
+-0.584197 0.305695 -0.073505
+0.507401 0.284858 -0.065179
+0.494314 0.270161 -0.070193
+0.476691 0.270255 -0.067897
+0.175976 0.273757 -0.076981
+0.164691 0.289728 -0.082417
+-0.187918 0.290025 -0.082328
+-0.337163 0.265695 -0.075007
+-0.347642 0.271161 -0.074927
+-0.358655 0.275941 -0.074819
+-0.598041 0.28606 -0.079107
+0.585833 0.271129 -0.065804
+0.569954 0.272259 -0.06998
+0.554361 0.27242 -0.071619
+0.53832 0.271734 -0.071928
+0.521836 0.270604 -0.071894
+0.508551 0.267237 -0.072342
+0.45655 0.267559 -0.066031
+0.443565 0.253281 -0.070305
+0.426631 0.254156 -0.068136
+0.409393 0.254349 -0.066564
+0.391147 0.25343 -0.06539
+0.196234 0.256576 -0.074623
+-0.196501 0.272121 -0.072402
+-0.303351 0.248835 -0.074725
+-0.320661 0.257559 -0.074981
+-0.609864 0.268554 -0.078645
+0.577992 0.255957 -0.06669
+0.56407 0.259344 -0.070973
+0.550497 0.256307 -0.072184
+0.534335 0.255635 -0.073242
+0.519079 0.254761 -0.073702
+0.50397 0.254209 -0.073646
+0.487835 0.254465 -0.073152
+0.471248 0.253564 -0.072432
+0.457825 0.250177 -0.072422
+0.370384 0.249943 -0.065751
+0.356232 0.235896 -0.072808
+0.339097 0.236918 -0.070635
+0.321362 0.237058 -0.068749
+0.302802 0.236296 -0.067442
+0.282647 0.235809 -0.066677
+0.264522 0.232584 -0.070469
+0.245598 0.23231 -0.075818
+0.22818 0.237466 -0.077917
+0.216434 0.245755 -0.071968
+-0.210403 0.255902 -0.074289
+-0.226631 0.245762 -0.075169
+-0.24425 0.239059 -0.075998
+-0.26428 0.236091 -0.078584
+-0.285535 0.24161 -0.075384
+-0.62045 0.254175 -0.070734
+0.563793 0.241491 -0.066289
+0.544122 0.239818 -0.070115
+0.529645 0.242365 -0.072843
+0.516322 0.239172 -0.073096
+0.500281 0.23885 -0.073601
+0.484509 0.23846 -0.073881
+0.468979 0.237263 -0.074038
+0.453449 0.237101 -0.073926
+0.437332 0.237653 -0.073321
+0.420538 0.237814 -0.072581
+0.403305 0.237451 -0.072301
+0.385736 0.23577 -0.073012
+0.371048 0.232343 -0.074729
+-0.62896 0.238119 -0.080088
+0.530054 0.22466 -0.067369
+0.510229 0.222871 -0.070462
+0.495639 0.225532 -0.072843
+0.482178 0.22232 -0.073175
+0.466168 0.221809 -0.073836
+0.450455 0.221675 -0.074161
+0.434311 0.221217 -0.074262
+0.417615 0.220989 -0.074755
+0.400642 0.21994 -0.0758
+0.382139 0.216556 -0.07864
+0.363118 0.219442 -0.079702
+0.346413 0.220639 -0.079574
+0.329463 0.220868 -0.07879
+0.312113 0.220711 -0.078162
+0.294153 0.220514 -0.078384
+0.276019 0.220501 -0.080285
+0.260368 0.222609 -0.082517
+-0.63904 0.223279 -0.072973
+0.496161 0.207714 -0.067436
+0.476336 0.205925 -0.070462
+0.461746 0.208585 -0.072843
+0.448191 0.205468 -0.073175
+0.43193 0.205051 -0.073993
+0.415822 0.204459 -0.075358
+0.399534 0.202209 -0.077742
+-0.647786 0.20375 -0.075503
+0.462268 0.190767 -0.067504
+0.442443 0.188979 -0.070462
+0.427773 0.191558 -0.073193
+0.414001 0.187495 -0.074536
+0.396147 0.183384 -0.078133
+-0.652832 0.185169 -0.077715
+0.428341 0.173625 -0.068186
+0.408913 0.170502 -0.072368
+0.397361 0.169316 -0.075448
+0.383688 0.167532 -0.078692
+-0.656041 0.172584 -0.071022
+0.396186 0.155704 -0.070971
+0.382758 0.153255 -0.074812
+0.368157 0.152003 -0.079021
+-0.648954 0.158761 -0.071713
+-0.65828 0.164019 -0.06416
+0.381154 0.139421 -0.069531
+0.365128 0.135173 -0.074204
+0.353732 0.141248 -0.081155
+-0.531124 0.129997 -0.075196
+-0.548133 0.134673 -0.07529
+-0.564672 0.137702 -0.075855
+-0.581317 0.139378 -0.075715
+-0.598346 0.141627 -0.075959
+-0.612357 0.14579 -0.078775
+-0.630578 0.146941 -0.072359
+0.35354 0.123733 -0.076591
+-0.497478 0.116324 -0.075263
+-0.514308 0.123849 -0.075357
+0.349842 0.102748 -0.076156
+-0.463889 0.099672 -0.074077
+-0.480317 0.108489 -0.074981
+0.347893 0.08389 -0.07758
+-0.409148 0.080549 -0.081299
+-0.427387 0.083953 -0.074735
+-0.447221 0.092509 -0.074077
+0.347219 0.067691 -0.082849
+-0.397847 0.064944 -0.077418
+-0.414918 0.070253 -0.068995
+0.362186 0.030942 -0.073007
+0.355036 0.051062 -0.076596
+-0.383591 0.049417 -0.084187
+-0.385426 0.030353 -0.076613
+0.366029 0.016471 -0.075944
+-0.383969 0.013119 -0.079164
+0.377842 -0.019585 -0.072288
+0.370105 0.002038 -0.077651
+-0.387332 0.003234 -0.073938
+-0.389855 -0.014193 -0.07812
+0.382628 -0.036388 -0.072335
+-0.394145 -0.033077 -0.075609
+0.383907 -0.047215 -0.078003
+-0.397697 -0.05092 -0.074873
+0.394622 -0.087661 -0.070477
+0.388033 -0.064413 -0.077677
+-0.40164 -0.068512 -0.075545
+-0.405693 -0.085069 -0.076119
+0.397769 -0.105677 -0.068965
+-0.409461 -0.101302 -0.075514
+0.397864 -0.118666 -0.073008
+-0.411328 -0.118061 -0.075169
+0.398102 -0.134725 -0.075272
+-0.412113 -0.135007 -0.075169
+0.398873 -0.151523 -0.076379
+-0.412348 -0.151953 -0.075169
+0.400409 -0.168762 -0.074984
+-0.412348 -0.1689 -0.075169
+0.401812 -0.185977 -0.073778
+-0.412348 -0.185846 -0.075169
+0.402058 -0.202847 -0.074689
+-0.412348 -0.202793 -0.075169
+0.401554 -0.219739 -0.075169
+-0.412348 -0.219739 -0.075169
+0.400612 -0.236686 -0.075169
+-0.412348 -0.236686 -0.075169
+0.399435 -0.253632 -0.075169
+-0.412348 -0.253444 -0.074823
+0.398651 -0.270578 -0.075169
+-0.412178 -0.269583 -0.073828
+0.397945 -0.287525 -0.075169
+-0.411477 -0.285458 -0.072778
+0.39716 -0.304471 -0.075169
+-0.410624 -0.299069 -0.069605
+0.568286 -0.349157 -0.069834
+0.549068 -0.348695 -0.076069
+0.39508 -0.321297 -0.075424
+-0.407001 -0.317533 -0.071399
+0.582934 -0.360265 -0.068379
+0.531506 -0.35133 -0.071642
+0.391764 -0.337414 -0.07607
+-0.400545 -0.341375 -0.079517
+0.51769 -0.358176 -0.07378
+0.501365 -0.367235 -0.074241
+0.38892 -0.353378 -0.076455
+-0.396868 -0.358702 -0.079975
+0.597823 -0.38962 -0.069009
+0.590432 -0.374693 -0.078751
+0.484836 -0.37803 -0.074954
+0.467916 -0.386911 -0.075115
+0.386687 -0.370004 -0.077558
+-0.395582 -0.371023 -0.075213
+0.451091 -0.396382 -0.075527
+0.43441 -0.403607 -0.076976
+0.415017 -0.409102 -0.080506
+0.396442 -0.400544 -0.078786
+0.386459 -0.386196 -0.083414
+-0.394285 -0.383914 -0.070505
+0.603754 -0.406472 -0.075191
+-0.392015 -0.401901 -0.072302
+0.615065 -0.44011 -0.069609
+0.609248 -0.423486 -0.080898
+-0.387023 -0.422055 -0.080624
+-0.391325 -0.436499 -0.074158
+-0.458642 -0.459424 -0.066018
+-0.473762 -0.458089 -0.066324
+0.620669 -0.457217 -0.075254
+-0.377777 -0.459828 -0.088399
+-0.39326 -0.456613 -0.076337
+-0.406725 -0.47207 -0.07367
+-0.423861 -0.471622 -0.070012
+-0.443682 -0.470592 -0.069169
+-0.494215 -0.459836 -0.066407
+0.631933 -0.490949 -0.069609
+0.626194 -0.474325 -0.080898
+-0.384366 -0.474445 -0.084303
+-0.395638 -0.473124 -0.077695
+-0.461452 -0.474064 -0.071442
+-0.478141 -0.47529 -0.071923
+-0.491686 -0.478288 -0.071731
+-0.507318 -0.473928 -0.068042
+-0.397957 -0.488022 -0.080681
+-0.415159 -0.485297 -0.075462
+-0.429984 -0.488013 -0.074584
+-0.446769 -0.489295 -0.074184
+-0.463137 -0.490841 -0.074332
+-0.479357 -0.491783 -0.074067
+-0.495452 -0.491581 -0.072117
+-0.512832 -0.490394 -0.067843
+0.636808 -0.507801 -0.075218
+-0.414734 -0.503513 -0.07998
+-0.43338 -0.502267 -0.076872
+-0.446992 -0.506331 -0.076438
+-0.463746 -0.507761 -0.075461
+-0.480644 -0.508057 -0.073693
+-0.497554 -0.507734 -0.070792
+-0.514819 -0.507412 -0.065379
+0.644164 -0.540443 -0.069789
+0.640146 -0.523758 -0.081077
+-0.427074 -0.520909 -0.080262
+-0.446562 -0.524139 -0.076664
+-0.464459 -0.524936 -0.073823
+-0.482199 -0.52417 -0.070695
+-0.499388 -0.523349 -0.065661
+-0.42962 -0.541058 -0.079324
+-0.447607 -0.541867 -0.073847
+-0.467445 -0.542849 -0.066885
+-0.48607 -0.536248 -0.064267
+0.641962 -0.554865 -0.07364
+0.58232 -0.566643 -0.079767
+0.565224 -0.566914 -0.080222
+-0.431397 -0.557976 -0.074311
+-0.448159 -0.55815 -0.066508
+0.636528 -0.565546 -0.071052
+0.623887 -0.568686 -0.073335
+0.603817 -0.570266 -0.072557
+0.554915 -0.570946 -0.073608
+0.53688 -0.572906 -0.077762
+0.517628 -0.578067 -0.076519
+0.501343 -0.583187 -0.076043
+-0.416659 -0.575348 -0.071189
+-0.434307 -0.570117 -0.065981
+0.485321 -0.589358 -0.075303
+0.468468 -0.597267 -0.075209
+-0.376934 -0.594686 -0.077919
+-0.394984 -0.588657 -0.07216
+0.451414 -0.604951 -0.074913
+0.434902 -0.612533 -0.073922
+-0.365133 -0.609009 -0.072683
+-0.382487 -0.60233 -0.067949
+0.421387 -0.61871 -0.071344
+0.403362 -0.622082 -0.077501
+0.384405 -0.630712 -0.075367
+-0.346628 -0.623109 -0.072531
+0.367772 -0.638308 -0.074389
+0.351219 -0.64631 -0.074667
+-0.31174 -0.645534 -0.074102
+-0.329601 -0.634086 -0.073398
+0.334286 -0.654093 -0.074466
+0.31746 -0.662148 -0.0738
+-0.293455 -0.658043 -0.073386
+0.303439 -0.668457 -0.071618
+0.285544 -0.671353 -0.076343
+0.264476 -0.67835 -0.07102
+0.243596 -0.677477 -0.073926
+0.231245 -0.676142 -0.075483
+0.219646 -0.674186 -0.077255
+0.199493 -0.673238 -0.080025
+0.180483 -0.67785 -0.076181
+0.163366 -0.684267 -0.075142
+-0.179078 -0.68274 -0.075226
+-0.190505 -0.678326 -0.075457
+-0.201996 -0.675225 -0.076252
+-0.222392 -0.672151 -0.077179
+-0.238329 -0.674914 -0.069729
+-0.254208 -0.672811 -0.071793
+-0.274418 -0.668474 -0.070948
+0.146634 -0.69118 -0.074792
+0.130307 -0.69884 -0.074469
+-0.144491 -0.698092 -0.074594
+-0.162029 -0.690026 -0.075101
+0.113656 -0.705255 -0.07498
+0.096252 -0.710454 -0.075276
+0.079072 -0.716085 -0.074262
+-0.091997 -0.714369 -0.078181
+-0.109182 -0.709751 -0.079333
+-0.125061 -0.705954 -0.072957
+0.06542 -0.720412 -0.071413
+0.047798 -0.721971 -0.076801
+0.030049 -0.724744 -0.074888
+0.013228 -0.725403 -0.07498
+-0.003835 -0.725533 -0.07494
+-0.020687 -0.725459 -0.073935
+-0.034132 -0.725557 -0.070654
+-0.049406 -0.723384 -0.07376
+-0.069925 -0.720367 -0.072499
+-0.271343 0.911738 -0.08273
+-0.28563 0.913937 -0.082537
+-0.303082 0.91416 -0.082451
+-0.239277 0.894625 -0.083973
+-0.256615 0.900031 -0.085263
+-0.323436 0.911897 -0.081994
+-0.337195 0.896963 -0.086741
+-0.225743 0.881092 -0.085084
+-0.274534 0.898444 -0.088275
+-0.291287 0.898308 -0.088691
+-0.308193 0.897491 -0.08886
+-0.321899 0.89421 -0.089217
+-0.358443 0.894568 -0.084022
+-0.209711 0.865101 -0.084275
+-0.242357 0.881452 -0.088712
+-0.25955 0.88199 -0.090304
+-0.276704 0.881818 -0.091188
+-0.293623 0.881523 -0.091444
+-0.309893 0.880877 -0.091343
+-0.325893 0.880716 -0.090828
+-0.342534 0.880195 -0.089938
+-0.356598 0.876558 -0.089329
+-0.374094 0.877847 -0.085691
+-0.193603 0.848715 -0.081729
+-0.226308 0.864711 -0.089095
+-0.243281 0.864872 -0.091188
+-0.260389 0.864899 -0.091982
+-0.277403 0.864832 -0.092117
+-0.294255 0.864737 -0.092117
+-0.310951 0.864643 -0.092038
+-0.327579 0.864482 -0.091758
+-0.343889 0.863689 -0.091298
+-0.359745 0.862764 -0.090479
+-0.372932 0.860027 -0.089442
+-0.38781 0.863437 -0.085301
+-0.209711 0.848047 -0.088252
+-0.226564 0.847885 -0.091018
+-0.24351 0.847885 -0.092117
+-0.260457 0.847885 -0.092117
+-0.277403 0.847885 -0.092117
+-0.294349 0.847885 -0.092117
+-0.311296 0.847885 -0.092117
+-0.328148 0.847791 -0.092117
+-0.344745 0.847441 -0.091982
+-0.360862 0.846823 -0.091341
+-0.377055 0.846339 -0.089906
+-0.395484 0.844496 -0.085833
+0.058999 0.806633 -0.09
+0.039244 0.810425 -0.09259
+0.027915 0.813005 -0.092156
+0.016326 0.815005 -0.091497
+-0.001566 0.816941 -0.091362
+-0.019871 0.817426 -0.091349
+-0.039631 0.817352 -0.089279
+-0.05818 0.813971 -0.091414
+-0.075641 0.81137 -0.091137
+-0.193848 0.832172 -0.086066
+-0.209805 0.831284 -0.090171
+-0.226564 0.830939 -0.091803
+-0.24351 0.830939 -0.092117
+-0.260457 0.830939 -0.092117
+-0.277403 0.830939 -0.092117
+-0.294349 0.830939 -0.092117
+-0.311296 0.830939 -0.092117
+-0.328242 0.830939 -0.092117
+-0.345095 0.830845 -0.092117
+-0.36183 0.830522 -0.091691
+-0.378185 0.829554 -0.090668
+-0.391202 0.826436 -0.089319
+-0.405844 0.83028 -0.083988
+0.388146 0.793517 -0.083953
+0.3731 0.796287 -0.084812
+0.353196 0.798432 -0.085582
+0.3346 0.807528 -0.082169
+0.32384 0.795307 -0.08688
+0.306185 0.795285 -0.085356
+0.106442 0.790517 -0.092166
+0.09427 0.796125 -0.092547
+0.080442 0.800044 -0.093874
+-0.091737 0.807585 -0.092519
+-0.104151 0.803358 -0.096441
+-0.11928 0.80171 -0.093806
+-0.139592 0.797696 -0.095152
+-0.161148 0.799427 -0.091216
+-0.178745 0.805098 -0.089371
+-0.194061 0.816167 -0.08935
+-0.210187 0.814562 -0.091502
+-0.226909 0.814181 -0.092117
+-0.243604 0.814086 -0.092117
+-0.260457 0.813992 -0.092117
+-0.277403 0.813992 -0.092117
+-0.294349 0.813992 -0.092117
+-0.311296 0.813992 -0.092117
+-0.328242 0.813992 -0.092117
+-0.345189 0.813992 -0.092117
+-0.362014 0.813737 -0.091982
+-0.378131 0.813091 -0.091318
+-0.394159 0.813226 -0.089122
+-0.410684 0.814275 -0.082901
+0.421165 0.776355 -0.081102
+0.403811 0.781544 -0.084777
+0.338656 0.792565 -0.088488
+0.285732 0.792366 -0.083472
+0.128295 0.77883 -0.091735
+-0.194779 0.799422 -0.092938
+-0.211872 0.798238 -0.093078
+-0.227904 0.798041 -0.092585
+-0.243954 0.79749 -0.092251
+-0.260551 0.79714 -0.092117
+-0.277403 0.797046 -0.092117
+-0.294349 0.797046 -0.092117
+-0.311296 0.797046 -0.092117
+-0.328242 0.797046 -0.092117
+-0.345189 0.797046 -0.092117
+-0.362041 0.796952 -0.092117
+-0.378736 0.796858 -0.091489
+-0.395553 0.797019 -0.088743
+-0.412056 0.79718 -0.082152
+0.385744 0.779953 -0.088546
+0.368323 0.780221 -0.089682
+0.351327 0.779669 -0.090361
+0.335102 0.779216 -0.090547
+0.31842 0.779566 -0.090186
+0.301452 0.77862 -0.089462
+0.287343 0.774741 -0.089067
+0.26912 0.775568 -0.085679
+0.162104 0.758905 -0.091815
+0.147226 0.769511 -0.088544
+-0.178567 0.785532 -0.099942
+-0.200436 0.782528 -0.097325
+-0.21589 0.785043 -0.094378
+-0.229012 0.782282 -0.093627
+-0.244748 0.781337 -0.092708
+-0.2609 0.780543 -0.092251
+-0.277497 0.780194 -0.092117
+-0.294349 0.780099 -0.092117
+-0.311296 0.780099 -0.092117
+-0.328242 0.780099 -0.092117
+-0.345189 0.780099 -0.092117
+-0.362135 0.780099 -0.092117
+-0.379082 0.780099 -0.091253
+-0.396028 0.780099 -0.088193
+-0.412347 0.779965 -0.08065
+0.434069 0.746476 -0.082755
+0.418553 0.762894 -0.085856
+0.40136 0.763365 -0.089277
+0.384117 0.763261 -0.091132
+0.366946 0.763194 -0.091691
+0.350027 0.763032 -0.091904
+0.333233 0.763059 -0.091803
+0.316448 0.762898 -0.091522
+0.300075 0.76201 -0.09122
+0.284035 0.760947 -0.090526
+0.270354 0.757682 -0.089788
+0.252246 0.758876 -0.086649
+0.201448 0.744269 -0.088345
+0.183289 0.747955 -0.092789
+-0.21498 0.767985 -0.099293
+-0.232335 0.768832 -0.094803
+-0.245831 0.765474 -0.0938
+-0.261694 0.764391 -0.092708
+-0.277847 0.763597 -0.092251
+-0.294444 0.763247 -0.092117
+-0.311296 0.763153 -0.092117
+-0.328242 0.763153 -0.092117
+-0.345189 0.763153 -0.092117
+-0.362135 0.763153 -0.092038
+-0.379082 0.763153 -0.090469
+-0.396028 0.763086 -0.086266
+0.417629 0.746247 -0.088505
+0.400521 0.746274 -0.091119
+0.383507 0.746207 -0.092117
+0.366561 0.746207 -0.092117
+0.349614 0.746207 -0.092117
+0.332668 0.746207 -0.092117
+0.315816 0.746113 -0.092117
+0.299219 0.745763 -0.091982
+0.283066 0.744969 -0.091525
+0.267088 0.744001 -0.090664
+0.253407 0.740897 -0.090159
+0.235287 0.742924 -0.088217
+0.215893 0.730329 -0.094556
+-0.231388 0.751439 -0.099718
+-0.248958 0.751955 -0.094929
+-0.262366 0.748528 -0.0938
+-0.27825 0.74735 -0.092708
+-0.29447 0.746462 -0.092251
+-0.311296 0.746207 -0.092117
+-0.328242 0.746207 -0.092117
+-0.345256 0.746139 -0.091982
+-0.362364 0.746166 -0.090953
+-0.379337 0.746328 -0.088624
+-0.395934 0.746072 -0.082627
+0.434159 0.729489 -0.084636
+0.4174 0.72926 -0.08937
+0.400454 0.72926 -0.091489
+0.383507 0.72926 -0.092117
+0.366561 0.72926 -0.092117
+0.349614 0.72926 -0.092117
+0.332668 0.72926 -0.092117
+0.315722 0.72926 -0.092117
+0.298869 0.729166 -0.092117
+0.282273 0.728817 -0.091982
+0.26612 0.728023 -0.091525
+0.250061 0.72727 -0.091321
+0.235819 0.724908 -0.092472
+0.196846 0.734995 -0.097997
+-0.247104 0.734423 -0.099883
+-0.264657 0.734729 -0.094952
+-0.278115 0.730784 -0.093787
+-0.294722 0.72961 -0.092408
+-0.311681 0.72922 -0.091691
+-0.328852 0.729153 -0.091211
+-0.346153 0.729041 -0.090189
+-0.363426 0.729569 -0.0882
+-0.380077 0.730183 -0.083928
+0.434268 0.712381 -0.085089
+0.4174 0.712314 -0.089606
+0.400454 0.712314 -0.091489
+0.383507 0.712314 -0.092117
+0.366561 0.712314 -0.092117
+0.349614 0.712314 -0.092117
+0.332668 0.712314 -0.092117
+0.315722 0.712314 -0.092117
+0.298775 0.712314 -0.092117
+0.281923 0.71222 -0.092117
+0.265326 0.71187 -0.092061
+0.248931 0.71124 -0.092986
+0.231956 0.711398 -0.096502
+-0.260255 0.716586 -0.099949
+-0.279194 0.713838 -0.094424
+-0.295856 0.712627 -0.091717
+-0.313067 0.712107 -0.089888
+-0.330685 0.712434 -0.088361
+-0.34915 0.711081 -0.084327
+-0.366808 0.716613 -0.082448
+0.433484 0.695367 -0.085212
+0.416836 0.695462 -0.089606
+0.400109 0.695556 -0.091489
+0.383413 0.695462 -0.092117
+0.366561 0.695367 -0.092117
+0.349614 0.695367 -0.092117
+0.332668 0.695367 -0.092117
+0.315722 0.695367 -0.092117
+0.298775 0.695367 -0.092117
+0.281829 0.695367 -0.092117
+0.264977 0.695273 -0.092666
+0.248124 0.695022 -0.095078
+0.231249 0.694582 -0.102377
+-0.267709 0.697116 -0.100401
+-0.282786 0.699257 -0.093865
+-0.297231 0.693194 -0.089089
+-0.31746 0.695814 -0.084531
+-0.333162 0.698959 -0.08254
+0.431558 0.678676 -0.085235
+0.415352 0.679322 -0.089592
+0.399503 0.679322 -0.091319
+0.383386 0.678676 -0.091982
+0.366561 0.678421 -0.092117
+0.349614 0.678421 -0.092117
+0.332668 0.678421 -0.092117
+0.315722 0.678421 -0.092117
+0.298775 0.678421 -0.092117
+0.281829 0.678421 -0.092195
+0.264882 0.678421 -0.093686
+0.247936 0.678275 -0.098482
+-0.277156 0.680834 -0.097564
+0.426797 0.662766 -0.085333
+0.412467 0.666058 -0.089507
+0.399557 0.66286 -0.090668
+0.383203 0.661892 -0.091691
+0.366467 0.661569 -0.092117
+0.349614 0.661475 -0.092117
+0.332668 0.661475 -0.092117
+0.315722 0.661475 -0.092117
+0.298775 0.661475 -0.092117
+0.281829 0.661475 -0.092666
+0.264883 0.661475 -0.095176
+0.248125 0.661112 -0.102768
+-0.280272 0.661229 -0.096331
+0.41677 0.648113 -0.086072
+0.398427 0.646075 -0.089758
+0.382171 0.645496 -0.091115
+0.365898 0.644878 -0.091758
+0.349269 0.644716 -0.092038
+0.332574 0.644622 -0.092117
+0.315722 0.644528 -0.092117
+0.298775 0.644528 -0.092195
+0.281829 0.644528 -0.09345
+0.264883 0.644461 -0.097698
+-0.282976 0.644407 -0.094541
+0.40929 0.629192 -0.084868
+0.39433 0.632204 -0.088995
+0.380668 0.629026 -0.089892
+0.364212 0.628644 -0.090828
+0.348211 0.628483 -0.091343
+0.331942 0.627837 -0.091444
+0.315094 0.627582 -0.091489
+0.298148 0.627582 -0.091881
+0.281264 0.627676 -0.093921
+0.264726 0.627407 -0.099946
+-0.283849 0.627582 -0.093169
+0.395979 0.614495 -0.084009
+0.375733 0.612501 -0.087219
+0.360476 0.615246 -0.089556
+0.347041 0.611949 -0.089456
+0.330243 0.610864 -0.089516
+0.313121 0.610568 -0.089808
+0.295987 0.610756 -0.090895
+0.279395 0.611402 -0.094019
+0.264242 0.610676 -0.10084
+-0.285171 0.610635 -0.092429
+0.363223 0.598124 -0.084196
+0.343754 0.595135 -0.084932
+0.326073 0.594101 -0.085308
+0.308271 0.593867 -0.085893
+0.290382 0.594822 -0.088975
+0.275813 0.598127 -0.094177
+0.264479 0.594442 -0.100099
+-0.286741 0.593689 -0.092115
+0.278338 0.580955 -0.089381
+0.263213 0.581014 -0.099428
+-0.28933 0.576743 -0.092115
+0.266448 0.563826 -0.092462
+-0.291134 0.55989 -0.09155
+0.260779 0.543817 -0.092027
+-0.291905 0.543751 -0.090066
+0.258036 0.526038 -0.092048
+-0.292351 0.530337 -0.087193
+0.256018 0.508957 -0.092115
+-0.288649 0.511992 -0.092595
+0.254104 0.492104 -0.092209
+-0.287885 0.49305 -0.08645
+0.250363 0.475319 -0.092236
+-0.281865 0.475306 -0.096584
+0.246173 0.458467 -0.09233
+-0.280421 0.456114 -0.088567
+0.240603 0.441991 -0.092801
+-0.276276 0.440667 -0.089329
+0.234035 0.425414 -0.092594
+-0.270553 0.426427 -0.088469
+0.225609 0.408562 -0.092688
+-0.262309 0.411539 -0.094547
+0.216298 0.391848 -0.093706
+-0.253789 0.393078 -0.089562
+0.206264 0.377845 -0.096747
+-0.24127 0.373838 -0.091473
+-0.500149 0.347922 -0.091187
+-0.51702 0.352661 -0.091214
+-0.532312 0.352504 -0.091747
+0.196445 0.361829 -0.092927
+-0.22801 0.356506 -0.092048
+-0.481102 0.338942 -0.088726
+-0.54648 0.346812 -0.094182
+0.180293 0.340165 -0.092085
+-0.212709 0.339586 -0.092209
+-0.446081 0.316079 -0.095107
+-0.460954 0.32651 -0.092258
+-0.559311 0.33612 -0.098297
+0.165638 0.318487 -0.091741
+-0.198081 0.322801 -0.092841
+-0.421487 0.302279 -0.090359
+-0.435915 0.311572 -0.088881
+-0.571644 0.322013 -0.086058
+0.15974 0.302613 -0.090484
+-0.185884 0.305882 -0.094846
+-0.385304 0.282716 -0.091111
+-0.403523 0.292613 -0.090734
+-0.583614 0.305224 -0.091505
+0.163373 0.274541 -0.095128
+0.153923 0.290034 -0.099583
+-0.178099 0.289178 -0.100019
+-0.349271 0.265937 -0.088287
+-0.367578 0.274541 -0.090297
+-0.59456 0.288797 -0.09789
+0.192707 0.248916 -0.095835
+0.178494 0.260582 -0.093326
+-0.185786 0.276371 -0.090199
+-0.194658 0.262884 -0.090989
+-0.313106 0.245507 -0.0903
+-0.331155 0.25464 -0.090705
+-0.605021 0.27478 -0.089553
+0.212859 0.238454 -0.092226
+-0.209806 0.249173 -0.091752
+-0.226833 0.239799 -0.092407
+-0.278048 0.230111 -0.091782
+-0.295793 0.237723 -0.090152
+-0.61634 0.25732 -0.089709
+0.247101 0.218967 -0.092622
+0.232912 0.229884 -0.088903
+-0.244621 0.232006 -0.093661
+-0.260772 0.226267 -0.097584
+-0.626913 0.237859 -0.098383
+0.385755 0.198768 -0.080919
+0.371309 0.203141 -0.083372
+0.355295 0.204594 -0.084652
+0.339128 0.204365 -0.085156
+0.322532 0.204016 -0.085212
+0.3055 0.203989 -0.085795
+0.287662 0.20441 -0.088117
+0.266808 0.206418 -0.094114
+-0.637373 0.22092 -0.088175
+-0.642246 0.204002 -0.095476
+0.3775 0.186389 -0.083232
+0.363327 0.191231 -0.086466
+0.349798 0.189042 -0.088044
+0.333941 0.188212 -0.089014
+0.317788 0.187419 -0.09002
+0.301012 0.187204 -0.09243
+0.283385 0.18746 -0.0987
+-0.648022 0.191027 -0.087869
+0.362459 0.173796 -0.085361
+0.34497 0.175597 -0.089136
+0.33139 0.172373 -0.090412
+0.315502 0.171172 -0.093031
+0.299192 0.170217 -0.099222
+-0.646168 0.17595 -0.087289
+0.346437 0.158263 -0.086746
+0.328799 0.158745 -0.091339
+0.315534 0.154516 -0.096237
+-0.531599 0.145 -0.092116
+-0.548452 0.149896 -0.09221
+-0.565237 0.152561 -0.092237
+-0.582089 0.154162 -0.092331
+-0.598565 0.155589 -0.092802
+-0.615452 0.157708 -0.092294
+-0.632523 0.163746 -0.090243
+0.335429 0.14096 -0.08849
+0.316448 0.13614 -0.100834
+-0.49764 0.131674 -0.092116
+-0.514653 0.139038 -0.092116
+0.333805 0.119314 -0.090297
+-0.443575 0.115614 -0.098167
+-0.461105 0.116399 -0.092116
+-0.480222 0.124165 -0.092116
+0.333899 0.09736 -0.094601
+-0.411903 0.095998 -0.092089
+-0.431634 0.104662 -0.091876
+-0.449721 0.105548 -0.08597
+0.339912 0.079779 -0.091503
+-0.375519 0.080881 -0.104078
+-0.393058 0.085513 -0.093977
+0.347762 0.054579 -0.091067
+0.340798 0.066413 -0.09857
+-0.380604 0.066585 -0.093675
+-0.372071 0.049642 -0.100282
+0.361908 0.015102 -0.089885
+0.35321 0.036711 -0.093744
+-0.375985 0.03318 -0.094729
+-0.379615 0.015772 -0.092629
+0.366404 0.000478 -0.092029
+-0.383792 -0.002574 -0.09059
+0.37803 -0.03587 -0.088355
+0.370296 -0.014359 -0.093591
+-0.386467 -0.020207 -0.09594
+-0.390637 -0.033574 -0.093187
+0.382544 -0.052533 -0.088507
+-0.394279 -0.050302 -0.092277
+0.383125 -0.063475 -0.094962
+-0.397444 -0.06745 -0.092075
+0.393544 -0.101349 -0.08425
+0.387308 -0.081079 -0.093481
+-0.401436 -0.084423 -0.092236
+-0.404706 -0.101208 -0.092209
+0.39342 -0.11772 -0.090146
+-0.407798 -0.118061 -0.092115
+0.393708 -0.135464 -0.092599
+-0.409681 -0.135007 -0.092115
+0.394737 -0.155216 -0.094382
+-0.41023 -0.151953 -0.092115
+0.39833 -0.173128 -0.087564
+-0.410465 -0.1689 -0.092115
+0.398491 -0.186546 -0.090178
+-0.410465 -0.185846 -0.092115
+0.398471 -0.20282 -0.09164
+-0.410465 -0.202793 -0.092115
+0.398023 -0.219739 -0.092115
+-0.410465 -0.219739 -0.092115
+0.397317 -0.236686 -0.092115
+-0.410465 -0.236686 -0.092115
+0.396062 -0.253632 -0.092115
+-0.410443 -0.253605 -0.09164
+0.394728 -0.270578 -0.092115
+-0.410385 -0.269879 -0.08986
+0.393551 -0.287525 -0.092115
+-0.41029 -0.282962 -0.085911
+0.391668 -0.304471 -0.092115
+-0.407143 -0.300978 -0.087423
+0.389675 -0.321324 -0.092209
+-0.400553 -0.324392 -0.095066
+0.578217 -0.363395 -0.088576
+0.563685 -0.354046 -0.087339
+0.553307 -0.355422 -0.093752
+0.534927 -0.359093 -0.091018
+0.386035 -0.338019 -0.092303
+-0.396457 -0.342165 -0.096664
+0.515471 -0.36644 -0.087678
+0.383098 -0.354741 -0.092685
+-0.395072 -0.355786 -0.09246
+0.597328 -0.390817 -0.086044
+0.589931 -0.378604 -0.094372
+0.501231 -0.376363 -0.091187
+0.483777 -0.386503 -0.091668
+0.38068 -0.370986 -0.09429
+-0.393986 -0.368624 -0.087551
+0.466625 -0.396131 -0.091443
+0.449786 -0.404481 -0.091586
+0.378318 -0.384198 -0.097904
+-0.390269 -0.385535 -0.087637
+0.603456 -0.407683 -0.092007
+0.432957 -0.413493 -0.093173
+0.41599 -0.424304 -0.099999
+0.395911 -0.418667 -0.096096
+0.382541 -0.400875 -0.096252
+-0.383676 -0.407707 -0.093888
+0.614845 -0.440792 -0.086972
+0.608829 -0.424397 -0.097907
+0.379357 -0.416804 -0.105359
+-0.380949 -0.422687 -0.092353
+-0.379593 -0.439268 -0.089846
+0.620441 -0.458289 -0.092258
+-0.369584 -0.453577 -0.09845
+0.631353 -0.491537 -0.086909
+0.625583 -0.475236 -0.097907
+-0.365289 -0.473822 -0.099252
+-0.358593 -0.494557 -0.102183
+-0.376198 -0.494778 -0.091137
+0.63583 -0.50816 -0.091644
+-0.360266 -0.509738 -0.099516
+-0.37374 -0.51323 -0.093178
+-0.391465 -0.511252 -0.087327
+0.637659 -0.52133 -0.095064
+-0.360898 -0.526012 -0.098287
+-0.376691 -0.526842 -0.092563
+-0.389824 -0.529337 -0.089807
+-0.405348 -0.52479 -0.085511
+0.639312 -0.53773 -0.089486
+-0.361691 -0.542165 -0.096689
+-0.377808 -0.542784 -0.092518
+-0.394002 -0.542461 -0.088989
+-0.411476 -0.541179 -0.084503
+0.631685 -0.554486 -0.090292
+0.615316 -0.560642 -0.091151
+0.597591 -0.560581 -0.093151
+0.582452 -0.558894 -0.097469
+0.568156 -0.560856 -0.094316
+0.549829 -0.565218 -0.090956
+0.532163 -0.56827 -0.095839
+-0.345189 -0.558668 -0.100668
+-0.362176 -0.558896 -0.094672
+-0.379311 -0.559242 -0.090639
+-0.396773 -0.558597 -0.086588
+-0.414159 -0.558045 -0.080664
+0.518735 -0.572714 -0.093036
+0.502424 -0.577213 -0.09225
+0.48615 -0.583259 -0.091604
+-0.345256 -0.575681 -0.097474
+-0.362589 -0.576189 -0.091643
+-0.381848 -0.577698 -0.084559
+-0.40058 -0.572015 -0.080642
+0.469531 -0.58941 -0.091927
+0.452289 -0.596695 -0.092061
+-0.345619 -0.592668 -0.092679
+-0.362742 -0.593272 -0.084939
+0.435386 -0.604203 -0.09068
+0.417063 -0.611774 -0.089103
+0.39934 -0.613887 -0.095973
+-0.329601 -0.608902 -0.093091
+-0.346601 -0.608442 -0.084275
+0.385145 -0.620661 -0.092569
+0.368932 -0.629072 -0.090398
+-0.314778 -0.627595 -0.089143
+-0.332988 -0.620929 -0.083419
+0.355111 -0.636235 -0.087887
+0.337214 -0.640864 -0.092828
+-0.294955 -0.642887 -0.08928
+0.320621 -0.652066 -0.087553
+0.300381 -0.657584 -0.090622
+0.281096 -0.663125 -0.093458
+0.212658 -0.665945 -0.096071
+0.194132 -0.666835 -0.098193
+-0.209267 -0.666772 -0.095838
+-0.228336 -0.664138 -0.095013
+-0.259629 -0.663248 -0.088158
+-0.277404 -0.655225 -0.088562
+0.26998 -0.668919 -0.087586
+0.253844 -0.669283 -0.089598
+0.233339 -0.669355 -0.08935
+0.18012 -0.672378 -0.093679
+0.163621 -0.678813 -0.091967
+-0.169394 -0.682062 -0.091702
+-0.188726 -0.674419 -0.090259
+-0.241789 -0.667459 -0.085086
+0.147199 -0.68583 -0.091174
+0.130831 -0.693558 -0.090858
+-0.134825 -0.697527 -0.090976
+-0.151906 -0.689665 -0.091658
+0.117013 -0.699288 -0.088718
+0.099135 -0.703353 -0.094226
+0.079802 -0.70969 -0.09203
+0.060102 -0.71511 -0.089764
+0.04207 -0.717103 -0.09437
+-0.058528 -0.716251 -0.093658
+-0.078588 -0.713089 -0.09215
+-0.090603 -0.710462 -0.09253
+-0.101619 -0.707314 -0.093084
+-0.117997 -0.702635 -0.092057
+0.032277 -0.720485 -0.088779
+0.017876 -0.7208 -0.091166
+0.000671 -0.721108 -0.091819
+-0.016903 -0.720965 -0.09146
+-0.036681 -0.720257 -0.088938
+0.026023 0.807087 -0.106201
+0.007108 0.808569 -0.108272
+-0.010654 0.809309 -0.108793
+-0.02843 0.809309 -0.108524
+-0.046344 0.808313 -0.108362
+-0.064182 0.806411 -0.108063
+0.091973 0.791101 -0.106331
+0.078905 0.795253 -0.108076
+0.066442 0.798166 -0.108717
+0.045808 0.801865 -0.110959
+-0.079252 0.80504 -0.105362
+-0.09209 0.800776 -0.109045
+-0.107952 0.796751 -0.109344
+0.124758 0.771871 -0.112153
+0.110118 0.781674 -0.109052
+-0.123759 0.792169 -0.109556
+-0.137166 0.786389 -0.112755
+0.143324 0.762653 -0.106945
+-0.155408 0.78276 -0.108649
+-0.171706 0.77121 -0.113565
+0.164928 0.745569 -0.111864
+-0.191477 0.764829 -0.109578
+0.18593 0.731325 -0.109077
+-0.210516 0.74763 -0.111266
+0.214746 0.710533 -0.105131
+0.201368 0.723633 -0.105438
+-0.226487 0.73089 -0.111608
+-0.239876 0.713738 -0.111717
+0.231469 0.677389 -0.108487
+0.214791 0.693826 -0.114945
+-0.250647 0.69634 -0.111755
+-0.259567 0.67913 -0.111229
+0.248501 0.643564 -0.106957
+0.232244 0.659874 -0.115545
+-0.26728 0.661861 -0.110458
+-0.271291 0.644569 -0.109871
+0.249483 0.625743 -0.11049
+-0.274972 0.627582 -0.109376
+0.249827 0.606847 -0.11283
+-0.27764 0.610635 -0.10914
+0.255083 0.590358 -0.10784
+-0.280307 0.593689 -0.109062
+0.253995 0.577177 -0.108831
+-0.283367 0.576743 -0.109062
+0.253303 0.560284 -0.1087
+-0.28525 0.559796 -0.108434
+0.25197 0.54289 -0.108968
+-0.28692 0.543105 -0.106587
+0.250997 0.525903 -0.109062
+-0.287448 0.527069 -0.102149
+0.24935 0.508957 -0.109062
+-0.281121 0.50932 -0.113428
+0.246996 0.49201 -0.109062
+-0.280489 0.490116 -0.106726
+0.243701 0.475064 -0.109062
+-0.277169 0.475064 -0.10886
+0.238883 0.458212 -0.109156
+-0.273148 0.460334 -0.109829
+0.233652 0.441426 -0.109183
+-0.271869 0.441587 -0.101182
+0.226176 0.424547 -0.109115
+-0.263808 0.425387 -0.106707
+0.217976 0.407655 -0.109438
+-0.254818 0.408269 -0.108572
+0.207952 0.391088 -0.110483
+-0.245442 0.39065 -0.108554
+0.195475 0.372825 -0.11224
+-0.232955 0.373425 -0.108833
+-0.506336 0.347565 -0.107807
+-0.520964 0.352379 -0.104257
+-0.533281 0.351197 -0.10738
+0.185458 0.35513 -0.106392
+-0.218641 0.356439 -0.109062
+-0.488523 0.338872 -0.107978
+-0.547031 0.345662 -0.110232
+0.173892 0.344594 -0.111655
+-0.202949 0.339492 -0.109062
+-0.453656 0.316362 -0.1085
+-0.470883 0.328254 -0.1078
+-0.559373 0.335304 -0.11493
+0.163152 0.329087 -0.108989
+-0.187415 0.322546 -0.109689
+-0.434543 0.304629 -0.105686
+-0.571299 0.321617 -0.103323
+0.151306 0.308177 -0.107581
+-0.17467 0.305627 -0.111971
+-0.397211 0.281777 -0.106367
+-0.414893 0.292272 -0.106534
+-0.582785 0.305414 -0.109012
+0.142932 0.292469 -0.1134
+-0.166279 0.288559 -0.117327
+-0.360794 0.264046 -0.10124
+-0.378121 0.269813 -0.106651
+-0.593925 0.288546 -0.114818
+0.179146 0.250106 -0.109976
+0.162834 0.261861 -0.110301
+0.147176 0.276557 -0.113407
+-0.178321 0.270641 -0.10813
+-0.347254 0.251017 -0.105857
+-0.605185 0.272523 -0.103539
+0.209492 0.230008 -0.112362
+0.195577 0.240271 -0.110319
+-0.193088 0.253603 -0.108551
+-0.209685 0.241671 -0.108994
+-0.307018 0.233318 -0.101068
+-0.325076 0.237967 -0.105797
+-0.364998 0.256619 -0.111915
+-0.616131 0.254721 -0.109304
+0.227907 0.220567 -0.106548
+-0.227227 0.230812 -0.109492
+-0.246624 0.219586 -0.110854
+-0.26063 0.217273 -0.106985
+-0.272634 0.218155 -0.104986
+-0.291978 0.222589 -0.104302
+-0.624833 0.237259 -0.115884
+0.247788 0.204191 -0.109071
+-0.310264 0.221586 -0.111541
+-0.633498 0.2189 -0.107544
+0.26543 0.187314 -0.110255
+-0.263747 0.20617 -0.117168
+-0.283607 0.206133 -0.114596
+-0.298642 0.209708 -0.114663
+-0.637113 0.202127 -0.108785
+0.282147 0.169545 -0.110409
+-0.641222 0.189789 -0.100704
+0.299031 0.152464 -0.106962
+-0.531599 0.160221 -0.109062
+-0.548546 0.165085 -0.109062
+-0.565492 0.168302 -0.109062
+-0.582344 0.169824 -0.109156
+-0.599331 0.171357 -0.109183
+-0.616874 0.174218 -0.108044
+-0.632383 0.180032 -0.105015
+-0.497707 0.146805 -0.108748
+-0.514653 0.154258 -0.108983
+0.316496 0.115102 -0.108906
+0.300215 0.134236 -0.116078
+-0.446326 0.128696 -0.109293
+-0.463527 0.133438 -0.10856
+-0.48072 0.140331 -0.108481
+-0.392965 0.114383 -0.112236
+-0.410321 0.115707 -0.107447
+-0.429407 0.123758 -0.10882
+0.330626 0.08016 -0.108337
+0.32211 0.096463 -0.112483
+-0.359718 0.099182 -0.119909
+-0.378472 0.101074 -0.11041
+-0.397741 0.103268 -0.103127
+-0.361927 0.084047 -0.115684
+0.343166 0.048994 -0.10693
+0.335444 0.063347 -0.112654
+-0.364493 0.064315 -0.110411
+-0.362526 0.046723 -0.114218
+0.348457 0.035011 -0.108196
+-0.367417 0.033489 -0.111122
+0.361739 -0.001393 -0.106069
+0.352467 0.01988 -0.110814
+-0.372465 0.017054 -0.109452
+-0.377293 -0.000252 -0.108783
+0.365957 -0.015777 -0.107885
+-0.381496 -0.017535 -0.109388
+0.377292 -0.050369 -0.102431
+0.369538 -0.030971 -0.109477
+-0.385814 -0.034081 -0.109815
+-0.389603 -0.050396 -0.109317
+0.37853 -0.068719 -0.110394
+-0.393519 -0.067221 -0.109062
+0.382846 -0.083147 -0.107896
+-0.396186 -0.084168 -0.109062
+0.386293 -0.098123 -0.104685
+-0.399324 -0.101114 -0.109062
+0.387116 -0.117922 -0.108236
+-0.402463 -0.118061 -0.109062
+0.387732 -0.136123 -0.110747
+-0.40411 -0.135007 -0.109062
+0.393717 -0.16972 -0.102902
+0.388081 -0.152666 -0.114446
+-0.405601 -0.151953 -0.109062
+-0.406307 -0.168806 -0.108968
+0.393439 -0.185564 -0.107327
+-0.406486 -0.185591 -0.108941
+0.393428 -0.202658 -0.10877
+-0.406273 -0.202564 -0.109102
+0.393002 -0.219739 -0.109062
+-0.406094 -0.219672 -0.109129
+0.391825 -0.236686 -0.109062
+-0.406072 -0.236686 -0.109062
+0.390648 -0.253632 -0.109062
+-0.406027 -0.253767 -0.10877
+0.388765 -0.270578 -0.109062
+-0.405918 -0.270986 -0.107026
+0.387353 -0.287525 -0.109062
+-0.406065 -0.287291 -0.101197
+0.385156 -0.304471 -0.109062
+-0.399828 -0.30756 -0.110427
+0.382646 -0.321418 -0.109062
+-0.395673 -0.325083 -0.112372
+0.564478 -0.364714 -0.104961
+0.379743 -0.338364 -0.109062
+-0.395115 -0.336189 -0.106886
+0.581739 -0.378056 -0.110667
+0.548706 -0.363238 -0.104506
+0.538118 -0.368882 -0.109176
+0.375993 -0.355122 -0.109407
+-0.390569 -0.352825 -0.109938
+0.595642 -0.394215 -0.105313
+0.520527 -0.374882 -0.105339
+0.499016 -0.390851 -0.109851
+0.373607 -0.371356 -0.11016
+-0.389406 -0.371311 -0.101584
+0.480026 -0.39724 -0.104853
+0.464089 -0.409048 -0.108516
+0.372046 -0.387612 -0.110727
+-0.382318 -0.391442 -0.109177
+0.603398 -0.410765 -0.10608
+0.446532 -0.414851 -0.104207
+0.370263 -0.404236 -0.112516
+-0.378868 -0.406669 -0.107613
+0.614027 -0.443162 -0.106757
+0.606735 -0.423724 -0.114719
+0.433311 -0.425734 -0.109127
+0.417584 -0.44049 -0.115585
+0.399679 -0.438053 -0.110547
+0.380428 -0.434145 -0.112148
+0.367956 -0.420546 -0.11655
+-0.37548 -0.420709 -0.105323
+0.364758 -0.434311 -0.121919
+-0.367843 -0.438868 -0.108709
+0.620307 -0.461358 -0.106387
+-0.359771 -0.455636 -0.111529
+0.629764 -0.493678 -0.106216
+0.623192 -0.4743 -0.114732
+-0.352573 -0.46925 -0.115266
+-0.346483 -0.486933 -0.115422
+0.63472 -0.511284 -0.104159
+-0.344705 -0.507292 -0.111453
+0.634817 -0.52467 -0.106691
+-0.344745 -0.52495 -0.107242
+0.633317 -0.539846 -0.105841
+-0.328243 -0.54152 -0.114252
+-0.345095 -0.541815 -0.103335
+0.630276 -0.547892 -0.10539
+0.622839 -0.550529 -0.106432
+0.607764 -0.55204 -0.108551
+0.590854 -0.552771 -0.110434
+0.572074 -0.553389 -0.112647
+0.553835 -0.557773 -0.109578
+0.536141 -0.561846 -0.109465
+-0.311485 -0.558372 -0.119703
+-0.328243 -0.558668 -0.108435
+0.519801 -0.566951 -0.108954
+0.504293 -0.572091 -0.108322
+0.487448 -0.576349 -0.108219
+-0.311296 -0.575547 -0.113389
+-0.328243 -0.575614 -0.104355
+0.47302 -0.58197 -0.105791
+0.454953 -0.586233 -0.110426
+0.436718 -0.595054 -0.106998
+-0.29435 -0.592426 -0.117558
+-0.311363 -0.592628 -0.107964
+-0.328471 -0.592601 -0.09993
+0.422872 -0.601547 -0.103614
+0.407452 -0.603103 -0.107929
+0.387127 -0.607429 -0.110743
+-0.294484 -0.609642 -0.110475
+-0.312009 -0.609736 -0.101203
+0.372005 -0.618395 -0.104106
+0.354095 -0.624417 -0.104793
+0.333218 -0.625113 -0.11273
+-0.277847 -0.62576 -0.111781
+-0.295063 -0.62651 -0.101517
+0.316769 -0.64104 -0.102933
+0.298347 -0.641493 -0.110714
+-0.262 -0.640356 -0.110694
+-0.278318 -0.641426 -0.101287
+0.285235 -0.652756 -0.103845
+0.267908 -0.657871 -0.103644
+0.245948 -0.657406 -0.107705
+0.227995 -0.660654 -0.104858
+0.217077 -0.656102 -0.112176
+0.199286 -0.657148 -0.113794
+0.180322 -0.664803 -0.110569
+-0.191219 -0.66555 -0.109953
+-0.204836 -0.65867 -0.113704
+-0.220949 -0.655698 -0.110192
+-0.244233 -0.653679 -0.104933
+-0.264235 -0.651559 -0.099797
+0.164092 -0.671548 -0.108443
+0.147646 -0.679294 -0.107673
+-0.156407 -0.681187 -0.108699
+-0.173985 -0.672934 -0.108743
+0.133496 -0.68598 -0.104999
+0.113636 -0.691686 -0.108638
+0.093959 -0.696968 -0.112119
+-0.10826 -0.698839 -0.110455
+-0.125392 -0.695759 -0.105119
+-0.139415 -0.688894 -0.107922
+0.082898 -0.702344 -0.10691
+0.065018 -0.705023 -0.110852
+0.046044 -0.710242 -0.108326
+0.027656 -0.713838 -0.106064
+0.008158 -0.714159 -0.10843
+-0.009488 -0.714134 -0.10886
+-0.027286 -0.713702 -0.108434
+-0.045049 -0.712038 -0.108443
+-0.056946 -0.71044 -0.108874
+-0.068744 -0.707938 -0.108866
+-0.088324 -0.704665 -0.106767
+0.075867 0.789117 -0.122348
+0.056244 0.791933 -0.12601
+0.040857 0.793704 -0.129213
+0.030695 0.798931 -0.122403
+0.015521 0.799923 -0.124569
+-0.002198 0.800492 -0.125645
+-0.019531 0.800791 -0.125941
+-0.036822 0.800392 -0.125618
+-0.054282 0.799487 -0.125082
+-0.075415 0.79587 -0.125252
+-0.097206 0.791006 -0.125161
+0.111105 0.771204 -0.126412
+0.094047 0.78064 -0.124955
+-0.112481 0.788696 -0.122219
+-0.125546 0.782682 -0.125191
+0.128132 0.761711 -0.126335
+-0.141845 0.775388 -0.125835
+-0.158711 0.767529 -0.125943
+0.158631 0.738236 -0.130301
+0.145307 0.750089 -0.126855
+-0.175517 0.757854 -0.125696
+0.174075 0.727835 -0.126162
+-0.192453 0.745354 -0.125925
+0.195113 0.710992 -0.12122
+-0.208732 0.729373 -0.126412
+-0.223168 0.712583 -0.126546
+0.21503 0.675171 -0.125547
+0.202717 0.691603 -0.1288
+-0.23497 0.69557 -0.126569
+-0.244867 0.678556 -0.126524
+0.232407 0.640757 -0.123294
+0.220416 0.657482 -0.129229
+-0.252948 0.661609 -0.1263
+-0.259998 0.644596 -0.126075
+0.23842 0.622551 -0.122435
+-0.265714 0.627582 -0.126008
+0.244287 0.592376 -0.120997
+0.235487 0.609546 -0.130311
+-0.268696 0.610635 -0.126008
+-0.271991 0.593689 -0.126008
+0.243418 0.575936 -0.12429
+-0.274815 0.576743 -0.126008
+0.243732 0.55911 -0.124753
+-0.277718 0.559729 -0.12547
+0.243371 0.542661 -0.125663
+-0.279758 0.542715 -0.123677
+0.242759 0.525903 -0.126008
+-0.280832 0.526091 -0.119543
+0.241504 0.508957 -0.126008
+-0.272674 0.509414 -0.130985
+0.238915 0.49201 -0.126008
+-0.272062 0.492445 -0.126136
+0.235933 0.475064 -0.126008
+-0.271347 0.475185 -0.120856
+0.231069 0.458117 -0.126008
+-0.263061 0.458006 -0.129576
+0.224636 0.441171 -0.126008
+-0.263944 0.44149 -0.118567
+0.217732 0.424224 -0.126008
+-0.254414 0.423808 -0.123807
+0.20896 0.407332 -0.126331
+-0.245511 0.406216 -0.125008
+0.199431 0.390887 -0.127255
+-0.235213 0.389498 -0.12499
+0.188783 0.377468 -0.12993
+-0.222422 0.373197 -0.125663
+-0.519728 0.34729 -0.120748
+-0.535732 0.348989 -0.120275
+0.178587 0.360093 -0.124356
+-0.206794 0.356439 -0.126008
+-0.498145 0.336692 -0.126349
+-0.546874 0.342775 -0.125656
+0.162153 0.34181 -0.126007
+-0.190397 0.339492 -0.126008
+-0.465966 0.317261 -0.123535
+-0.480366 0.328956 -0.121439
+-0.558902 0.332484 -0.131043
+0.147207 0.323743 -0.125554
+-0.174414 0.322837 -0.126636
+-0.448257 0.303556 -0.123559
+-0.570922 0.32087 -0.120458
+0.133783 0.303368 -0.126271
+-0.160077 0.306147 -0.12868
+-0.409132 0.280751 -0.117445
+-0.427542 0.287651 -0.12318
+-0.582032 0.304337 -0.126614
+0.134235 0.286285 -0.122564
+0.12058 0.288049 -0.134976
+-0.150097 0.288882 -0.133509
+-0.395198 0.269363 -0.118717
+-0.593074 0.286831 -0.132191
+0.16311 0.250236 -0.126315
+0.146428 0.261302 -0.127264
+0.130883 0.27336 -0.130531
+-0.161518 0.271844 -0.127373
+-0.378744 0.254953 -0.119605
+-0.411673 0.270206 -0.127868
+-0.604631 0.271025 -0.121022
+0.196102 0.229687 -0.126708
+0.179774 0.240357 -0.126385
+-0.176496 0.256055 -0.125699
+-0.192927 0.242796 -0.125753
+-0.340706 0.234239 -0.115461
+-0.359418 0.239915 -0.119492
+-0.395597 0.254456 -0.128533
+-0.614806 0.251739 -0.128135
+0.212833 0.218152 -0.126116
+-0.209846 0.230958 -0.125914
+-0.326888 0.220793 -0.117347
+-0.378628 0.238389 -0.127721
+-0.622629 0.235445 -0.12845
+0.230425 0.203579 -0.125564
+-0.227227 0.21855 -0.126573
+-0.312152 0.206284 -0.119502
+-0.343968 0.22077 -0.122548
+-0.361628 0.221187 -0.126695
+-0.379238 0.220868 -0.132599
+-0.627759 0.224602 -0.122278
+0.247936 0.186964 -0.125963
+-0.244567 0.2038 -0.128602
+-0.261317 0.187731 -0.132747
+-0.279447 0.189606 -0.124582
+-0.296793 0.195383 -0.121188
+-0.328269 0.204531 -0.123389
+-0.345189 0.203921 -0.126292
+-0.362759 0.203312 -0.129857
+-0.628104 0.208579 -0.121849
+0.26482 0.169478 -0.125865
+-0.312713 0.189907 -0.124768
+-0.329063 0.188114 -0.126265
+-0.34575 0.18646 -0.127615
+-0.364982 0.18311 -0.130698
+-0.548734 0.18083 -0.125497
+-0.565519 0.184883 -0.12582
+-0.582864 0.186772 -0.125852
+-0.600985 0.188846 -0.125152
+-0.619257 0.193324 -0.122396
+-0.633017 0.193521 -0.11287
+0.282152 0.149624 -0.124581
+-0.297346 0.175953 -0.129201
+-0.315255 0.175831 -0.127459
+-0.328972 0.171462 -0.127866
+-0.345301 0.169016 -0.127624
+-0.358439 0.164742 -0.128061
+-0.376807 0.165656 -0.130799
+-0.514976 0.168882 -0.125139
+-0.531922 0.175809 -0.125363
+-0.310469 0.158461 -0.132255
+-0.329651 0.154704 -0.128734
+-0.345225 0.152907 -0.127377
+-0.360471 0.151007 -0.127443
+-0.374394 0.147422 -0.127059
+-0.393572 0.14925 -0.128184
+-0.464778 0.148506 -0.122848
+-0.480881 0.155713 -0.123816
+-0.497868 0.162422 -0.12461
+0.299933 0.117868 -0.12757
+0.289092 0.131698 -0.130406
+-0.317747 0.138783 -0.134785
+-0.333049 0.140848 -0.129264
+-0.345911 0.136943 -0.127498
+-0.361915 0.134795 -0.125512
+-0.378784 0.133471 -0.123684
+-0.395301 0.12874 -0.118787
+-0.412816 0.135954 -0.12079
+-0.431571 0.14062 -0.122523
+-0.448813 0.144075 -0.122577
+0.310432 0.101392 -0.126021
+-0.329055 0.123005 -0.133698
+-0.347452 0.120031 -0.127061
+-0.365306 0.116557 -0.121069
+-0.382302 0.119736 -0.117661
+-0.335917 0.103811 -0.133409
+-0.350107 0.105574 -0.125158
+0.326796 0.067787 -0.125888
+0.319206 0.084653 -0.125937
+-0.345126 0.087867 -0.128952
+-0.349957 0.067906 -0.127421
+0.342903 0.034508 -0.120802
+0.334756 0.050846 -0.124854
+-0.354125 0.050099 -0.12684
+-0.358182 0.033556 -0.126959
+0.343423 0.018014 -0.131337
+-0.364615 0.017323 -0.126353
+0.360272 -0.016156 -0.120417
+0.35236 0.001084 -0.125677
+-0.369567 0.000497 -0.125941
+-0.374833 -0.016611 -0.125968
+0.360762 -0.033377 -0.130056
+-0.37928 -0.033584 -0.126129
+0.37004 -0.050204 -0.120404
+-0.383586 -0.050369 -0.126102
+0.377363 -0.083941 -0.120126
+0.36954 -0.067105 -0.130123
+-0.387242 -0.067221 -0.126008
+-0.390851 -0.084168 -0.126008
+0.378245 -0.101383 -0.123691
+-0.393911 -0.101114 -0.126008
+0.379258 -0.119284 -0.125672
+-0.395715 -0.118061 -0.126008
+0.379616 -0.137739 -0.129386
+-0.397677 -0.135007 -0.126008
+0.383307 -0.151953 -0.126008
+-0.399324 -0.151953 -0.126008
+0.386294 -0.166329 -0.122335
+-0.400266 -0.168712 -0.125663
+0.386512 -0.185241 -0.124955
+-0.400833 -0.184945 -0.125058
+0.386389 -0.202726 -0.125941
+-0.400542 -0.201502 -0.125632
+0.385941 -0.219739 -0.126008
+-0.400019 -0.219026 -0.126371
+0.384528 -0.236686 -0.126008
+-0.39984 -0.236551 -0.126143
+0.382881 -0.253632 -0.126008
+-0.399804 -0.253605 -0.125847
+0.380998 -0.270578 -0.126008
+-0.399547 -0.270986 -0.124757
+0.379037 -0.287525 -0.126008
+-0.398813 -0.290517 -0.121631
+0.377546 -0.304471 -0.126008
+-0.395366 -0.305492 -0.124843
+0.374957 -0.321418 -0.126008
+-0.391089 -0.319805 -0.12761
+0.372368 -0.338364 -0.126008
+-0.389967 -0.337755 -0.120727
+0.578957 -0.387061 -0.128216
+0.567426 -0.379126 -0.123664
+0.549771 -0.374956 -0.119597
+0.368806 -0.355216 -0.126102
+-0.382768 -0.354611 -0.129711
+0.533093 -0.379893 -0.119245
+0.36493 -0.372001 -0.126196
+-0.382759 -0.372096 -0.120108
+0.599775 -0.4081 -0.119649
+0.590383 -0.394571 -0.124075
+0.518915 -0.391138 -0.12317
+0.502495 -0.406602 -0.128448
+0.361572 -0.388881 -0.126542
+-0.374097 -0.389701 -0.129353
+0.483908 -0.408082 -0.119323
+0.467926 -0.424248 -0.125682
+0.358979 -0.405639 -0.127844
+-0.373958 -0.406308 -0.118993
+0.603367 -0.420807 -0.128195
+0.450217 -0.425001 -0.117035
+0.355955 -0.421953 -0.129698
+-0.366388 -0.422656 -0.123207
+0.616965 -0.457667 -0.12083
+0.609136 -0.438283 -0.128108
+0.452392 -0.440132 -0.130932
+0.435105 -0.440948 -0.123194
+0.419652 -0.457546 -0.12939
+0.401654 -0.456007 -0.123062
+0.386465 -0.450971 -0.119486
+0.368273 -0.451686 -0.12485
+0.353277 -0.438381 -0.132176
+-0.357882 -0.43976 -0.125604
+0.349807 -0.45513 -0.135513
+-0.350246 -0.456155 -0.127106
+0.619602 -0.470964 -0.128794
+0.382829 -0.470522 -0.130374
+0.360596 -0.471355 -0.132971
+0.344985 -0.469212 -0.138504
+-0.342312 -0.471928 -0.128379
+0.62967 -0.508326 -0.118227
+0.623948 -0.488174 -0.127343
+0.349336 -0.484803 -0.13928
+-0.335249 -0.4853 -0.131642
+-0.329585 -0.502865 -0.129597
+0.626726 -0.526605 -0.1218
+-0.328364 -0.523445 -0.121195
+0.627235 -0.542157 -0.113665
+0.615887 -0.53969 -0.122723
+0.5992 -0.543941 -0.124749
+0.582503 -0.545112 -0.126272
+0.568076 -0.545675 -0.128806
+-0.3117 -0.540789 -0.128241
+0.557732 -0.550106 -0.123516
+0.540078 -0.551816 -0.127417
+0.521594 -0.559927 -0.124285
+-0.295442 -0.557584 -0.133882
+0.508142 -0.565356 -0.12104
+0.492756 -0.567296 -0.123991
+0.46934 -0.572108 -0.125053
+0.448556 -0.577937 -0.126121
+-0.294538 -0.574982 -0.124848
+0.438194 -0.585205 -0.120012
+0.420692 -0.590188 -0.119527
+0.39984 -0.591095 -0.1235
+0.380916 -0.591234 -0.127719
+-0.277404 -0.592023 -0.129618
+0.367224 -0.607302 -0.118158
+0.34826 -0.608283 -0.122749
+0.330094 -0.608301 -0.127029
+0.315766 -0.605613 -0.1311
+0.298705 -0.610739 -0.131305
+-0.260713 -0.609184 -0.131695
+-0.277498 -0.609346 -0.120026
+0.312869 -0.623434 -0.120001
+0.295126 -0.628348 -0.122033
+0.283897 -0.623081 -0.127887
+0.265405 -0.627922 -0.129419
+-0.244667 -0.624945 -0.131086
+-0.261452 -0.625253 -0.120842
+0.279572 -0.640318 -0.117208
+0.261311 -0.645527 -0.117138
+0.247128 -0.641368 -0.12363
+0.233426 -0.638279 -0.129256
+0.214773 -0.643441 -0.127554
+0.195553 -0.647506 -0.129746
+-0.208461 -0.649216 -0.126867
+-0.229067 -0.640944 -0.125686
+-0.248026 -0.637852 -0.118897
+0.231019 -0.650138 -0.117636
+0.181416 -0.654645 -0.126378
+0.164758 -0.662942 -0.124683
+-0.175312 -0.6637 -0.126129
+-0.191721 -0.655604 -0.126842
+0.150466 -0.670195 -0.1218
+0.130242 -0.676123 -0.125153
+0.110019 -0.682112 -0.128475
+-0.140818 -0.679757 -0.125434
+-0.158173 -0.67123 -0.125874
+0.098297 -0.688469 -0.123566
+0.079361 -0.692946 -0.126122
+0.061083 -0.697201 -0.127983
+-0.074627 -0.697545 -0.127686
+-0.093056 -0.69622 -0.122829
+-0.104011 -0.690645 -0.128323
+-0.121698 -0.687523 -0.123311
+0.050617 -0.702239 -0.122339
+0.036059 -0.703226 -0.124477
+0.0182 -0.704116 -0.125376
+0.000285 -0.704708 -0.125941
+-0.01711 -0.704663 -0.125874
+-0.034701 -0.704038 -0.125367
+-0.054131 -0.702899 -0.123531
+0.024909 0.788906 -0.140619
+0.004584 0.789704 -0.142313
+-0.013075 0.790098 -0.142888
+-0.030183 0.790112 -0.142726
+-0.047168 0.790037 -0.141857
+0.07784 0.776823 -0.14122
+0.063222 0.783661 -0.138749
+0.045001 0.783489 -0.145308
+-0.06143 0.790362 -0.139135
+-0.072457 0.785255 -0.144867
+-0.08755 0.783593 -0.14216
+-0.109862 0.777323 -0.141253
+0.112177 0.759471 -0.143076
+0.095082 0.76896 -0.142618
+-0.129513 0.772116 -0.138354
+-0.145694 0.760894 -0.143158
+0.145496 0.738696 -0.143255
+0.12919 0.749527 -0.142981
+-0.163071 0.75516 -0.13815
+0.161258 0.726247 -0.142733
+-0.176397 0.743948 -0.140866
+0.177611 0.711571 -0.1407
+-0.192317 0.728692 -0.142323
+0.190301 0.69781 -0.138404
+-0.207506 0.712274 -0.142766
+-0.220335 0.695556 -0.142578
+0.208576 0.663962 -0.140131
+0.196976 0.679931 -0.14422
+-0.230998 0.67865 -0.142766
+-0.239969 0.661542 -0.142955
+0.226027 0.62704 -0.13667
+0.214173 0.645987 -0.143436
+-0.248454 0.644529 -0.142955
+-0.25371 0.627582 -0.142955
+0.223529 0.613561 -0.145553
+-0.258888 0.610636 -0.142955
+0.230159 0.592758 -0.142218
+-0.262733 0.593689 -0.142955
+0.23615 0.572724 -0.137643
+-0.2654 0.576743 -0.142955
+0.23529 0.559083 -0.140874
+-0.267519 0.559662 -0.142663
+0.23471 0.542823 -0.142479
+-0.269419 0.542231 -0.141399
+0.233972 0.525903 -0.142955
+-0.271334 0.525379 -0.137068
+0.232795 0.508957 -0.142955
+-0.263457 0.508365 -0.147546
+0.229814 0.49201 -0.142955
+-0.265326 0.495642 -0.140532
+0.225656 0.475064 -0.142955
+-0.259202 0.475726 -0.142789
+0.221105 0.458117 -0.142955
+-0.252345 0.454922 -0.145358
+0.215143 0.441171 -0.142955
+-0.253365 0.440082 -0.136302
+0.207443 0.424157 -0.142955
+-0.240956 0.420639 -0.142647
+0.199272 0.40717 -0.143022
+-0.235003 0.402694 -0.138021
+0.18897 0.390896 -0.143331
+-0.223646 0.38943 -0.140906
+0.177188 0.374578 -0.143093
+-0.20841 0.373291 -0.14239
+0.162443 0.357412 -0.142665
+-0.192044 0.356439 -0.142955
+-0.500396 0.327532 -0.142405
+-0.515337 0.337163 -0.138995
+-0.532281 0.343309 -0.133615
+-0.54613 0.33727 -0.140565
+0.146272 0.339968 -0.142063
+-0.175109 0.34003 -0.142955
+-0.483214 0.320324 -0.136964
+-0.557515 0.327805 -0.144365
+0.130342 0.32229 -0.141315
+-0.158429 0.324102 -0.143497
+-0.464428 0.304143 -0.137301
+-0.569546 0.318545 -0.137504
+0.115548 0.304985 -0.141931
+0.098216 0.305815 -0.153035
+-0.12297 0.301878 -0.153016
+-0.1409 0.30789 -0.145551
+-0.446597 0.288156 -0.136504
+-0.580219 0.300013 -0.145492
+0.11145 0.271354 -0.146093
+0.103394 0.289151 -0.145746
+0.085636 0.289685 -0.155265
+-0.115099 0.287712 -0.155148
+-0.13279 0.288358 -0.145329
+-0.429265 0.271492 -0.136451
+-0.463786 0.288403 -0.147497
+-0.591228 0.28244 -0.146437
+0.14619 0.248563 -0.143179
+0.129213 0.25931 -0.144049
+0.093503 0.276371 -0.153272
+-0.127683 0.271425 -0.153181
+-0.144876 0.271837 -0.142034
+-0.412745 0.254573 -0.136177
+-0.446732 0.271707 -0.145858
+-0.602268 0.269118 -0.138115
+0.180056 0.228212 -0.143049
+0.163204 0.2386 -0.142955
+-0.160119 0.255589 -0.142051
+-0.177016 0.242522 -0.142006
+-0.39596 0.237882 -0.134426
+-0.429921 0.254694 -0.143717
+-0.607818 0.252286 -0.144668
+0.196842 0.216805 -0.143076
+-0.193572 0.231052 -0.142004
+-0.413109 0.23768 -0.141341
+-0.430612 0.237138 -0.147229
+-0.617113 0.240176 -0.137539
+0.213815 0.202714 -0.142914
+-0.209873 0.218295 -0.142609
+-0.380902 0.203433 -0.134542
+-0.39657 0.220827 -0.138282
+-0.413759 0.220286 -0.143228
+-0.432848 0.217083 -0.147981
+-0.61168 0.219766 -0.142953
+-0.620507 0.224453 -0.134744
+0.230923 0.186976 -0.142887
+-0.226833 0.203362 -0.143683
+-0.398323 0.204392 -0.140006
+-0.414122 0.203487 -0.143324
+-0.426644 0.199054 -0.145008
+-0.444673 0.199629 -0.147928
+-0.548876 0.197811 -0.141034
+-0.566299 0.202911 -0.141912
+-0.585115 0.205095 -0.14139
+-0.60382 0.208297 -0.139681
+-0.617691 0.209956 -0.133536
+0.24778 0.169895 -0.14282
+-0.243703 0.187033 -0.145241
+-0.260393 0.170409 -0.147073
+-0.386708 0.18699 -0.135844
+-0.402086 0.191231 -0.140079
+-0.414517 0.187899 -0.14191
+-0.429369 0.185855 -0.143492
+-0.442702 0.181783 -0.143709
+-0.461585 0.183657 -0.144927
+-0.516052 0.18411 -0.139568
+-0.532514 0.191424 -0.140184
+0.26378 0.152558 -0.142246
+-0.277597 0.172113 -0.135846
+-0.400715 0.173245 -0.136295
+-0.418145 0.174769 -0.13977
+-0.43157 0.170669 -0.139898
+-0.447821 0.168761 -0.13944
+-0.464324 0.16408 -0.134589
+-0.481087 0.172002 -0.137268
+-0.499159 0.178066 -0.138886
+0.27649 0.135746 -0.142381
+-0.277292 0.154727 -0.147849
+-0.291525 0.159234 -0.13728
+-0.417474 0.157149 -0.132541
+-0.437731 0.155756 -0.132879
+-0.452134 0.156183 -0.132021
+-0.296474 0.140454 -0.144883
+0.297646 0.102866 -0.14247
+0.286667 0.119482 -0.143242
+-0.309618 0.120646 -0.145756
+0.307981 0.088912 -0.139178
+-0.319821 0.103158 -0.145461
+-0.328001 0.086063 -0.144591
+0.324926 0.054749 -0.139139
+0.314111 0.070927 -0.144231
+-0.336201 0.068821 -0.143486
+-0.34198 0.05131 -0.142993
+0.331076 0.03435 -0.142532
+-0.348846 0.034202 -0.143076
+0.342842 0.003741 -0.141107
+0.33644 0.015091 -0.146583
+-0.354353 0.017417 -0.143049
+-0.360802 0.000565 -0.142955
+0.348375 -0.01621 -0.14279
+-0.366843 -0.016382 -0.142955
+0.360615 -0.050224 -0.138499
+0.353285 -0.036186 -0.145682
+-0.370766 -0.033328 -0.142955
+-0.375395 -0.050275 -0.142955
+0.360226 -0.064366 -0.145558
+-0.379946 -0.067221 -0.142955
+0.366209 -0.084561 -0.141748
+-0.384025 -0.084168 -0.142955
+0.371852 -0.10504 -0.137899
+-0.386536 -0.101114 -0.142955
+0.370745 -0.118962 -0.142672
+-0.38889 -0.118061 -0.142955
+0.377062 -0.151298 -0.137628
+0.369014 -0.134271 -0.148697
+-0.390302 -0.135007 -0.142955
+-0.391165 -0.151953 -0.142955
+0.376698 -0.168029 -0.141138
+-0.392118 -0.168873 -0.142479
+0.377093 -0.185833 -0.142408
+-0.393716 -0.18508 -0.141085
+0.377028 -0.202887 -0.142861
+-0.39537 -0.19829 -0.138452
+0.376448 -0.219739 -0.142955
+-0.391493 -0.216454 -0.145083
+0.375506 -0.236686 -0.142955
+-0.391703 -0.236067 -0.143569
+0.37378 -0.253632 -0.142955
+-0.391721 -0.253376 -0.142677
+0.372289 -0.270578 -0.142955
+-0.391622 -0.26996 -0.141565
+0.370406 -0.287525 -0.142955
+-0.390743 -0.287324 -0.14057
+0.368916 -0.304471 -0.142955
+-0.389883 -0.304698 -0.137073
+0.366797 -0.321418 -0.142955
+-0.382084 -0.321467 -0.147159
+0.363267 -0.338364 -0.142955
+-0.382717 -0.33783 -0.138067
+0.359266 -0.355311 -0.142955
+-0.373574 -0.354674 -0.148118
+0.58294 -0.400001 -0.138842
+0.569099 -0.393366 -0.137839
+0.555448 -0.387991 -0.133062
+0.355892 -0.372257 -0.142955
+-0.37363 -0.372207 -0.139328
+0.595212 -0.411345 -0.136232
+0.537734 -0.392971 -0.13281
+0.351812 -0.389203 -0.143033
+-0.364758 -0.389866 -0.147559
+0.552399 -0.405768 -0.145119
+0.533576 -0.41071 -0.143826
+0.519501 -0.407033 -0.136615
+0.506095 -0.419974 -0.139484
+0.347482 -0.406056 -0.143551
+-0.365682 -0.406473 -0.136059
+0.602254 -0.426452 -0.138116
+0.520368 -0.424143 -0.146793
+0.487593 -0.425699 -0.135387
+0.343453 -0.422841 -0.144405
+-0.356469 -0.423755 -0.140803
+0.611819 -0.459352 -0.139025
+0.603248 -0.439918 -0.145169
+0.50214 -0.439151 -0.147768
+0.482903 -0.444409 -0.144685
+0.468894 -0.440576 -0.13749
+0.455461 -0.453604 -0.139845
+0.339436 -0.439693 -0.145306
+-0.34835 -0.441159 -0.142358
+0.46934 -0.457955 -0.146614
+0.438419 -0.458649 -0.136065
+0.42431 -0.473505 -0.139202
+0.334307 -0.456491 -0.146616
+-0.340357 -0.457541 -0.142699
+0.618232 -0.476694 -0.138601
+0.450959 -0.471732 -0.146321
+0.436012 -0.472926 -0.142559
+0.405336 -0.476071 -0.135
+0.391543 -0.491675 -0.1384
+0.330957 -0.475642 -0.147223
+-0.332951 -0.473142 -0.143883
+0.618863 -0.488054 -0.142255
+0.434397 -0.487641 -0.146721
+0.417195 -0.487214 -0.142369
+0.406643 -0.493719 -0.141752
+0.370321 -0.492402 -0.137098
+0.354053 -0.505712 -0.141008
+0.337676 -0.493549 -0.14316
+0.322009 -0.492298 -0.150643
+-0.32498 -0.488884 -0.144811
+0.621357 -0.505132 -0.136851
+0.421603 -0.504724 -0.146738
+0.403224 -0.508074 -0.143087
+0.386233 -0.50891 -0.141347
+0.371967 -0.511455 -0.141082
+0.334909 -0.50875 -0.144593
+0.315173 -0.511993 -0.150528
+-0.317467 -0.502666 -0.146687
+0.614275 -0.522516 -0.137815
+0.418235 -0.523928 -0.146247
+0.401252 -0.52499 -0.143572
+0.384713 -0.525528 -0.142364
+0.368071 -0.525047 -0.142178
+0.350676 -0.524738 -0.142765
+0.333515 -0.526164 -0.144398
+0.320015 -0.530175 -0.145815
+0.302756 -0.529539 -0.150913
+-0.311619 -0.520837 -0.141083
+0.604774 -0.53279 -0.136026
+0.590644 -0.534069 -0.139068
+0.57372 -0.535669 -0.140012
+0.554754 -0.539397 -0.138917
+0.534557 -0.538553 -0.144648
+0.433472 -0.539076 -0.147385
+0.417082 -0.541011 -0.143911
+0.40001 -0.541815 -0.142597
+0.383135 -0.541842 -0.142339
+0.366225 -0.541587 -0.142507
+0.349458 -0.541721 -0.142945
+0.333421 -0.54277 -0.143548
+0.317816 -0.543904 -0.144685
+0.304737 -0.546826 -0.146187
+0.289226 -0.544507 -0.151712
+-0.295312 -0.540902 -0.144971
+0.52329 -0.549405 -0.137469
+0.505498 -0.555031 -0.136505
+0.484297 -0.55637 -0.139526
+0.465458 -0.555201 -0.143101
+0.448711 -0.549598 -0.14638
+0.433135 -0.555563 -0.141909
+0.41544 -0.558074 -0.139928
+0.397562 -0.558668 -0.139974
+0.380427 -0.558412 -0.140871
+0.364059 -0.557767 -0.141712
+0.348305 -0.557861 -0.142182
+0.332386 -0.558856 -0.142418
+0.316367 -0.55973 -0.143104
+0.300052 -0.560545 -0.144996
+0.280764 -0.563884 -0.149329
+-0.28355 -0.555514 -0.147214
+0.449897 -0.564937 -0.13665
+0.4311 -0.573461 -0.132222
+0.409963 -0.574933 -0.133048
+0.391483 -0.575229 -0.134975
+0.374138 -0.574323 -0.137464
+0.35996 -0.571031 -0.139929
+0.346454 -0.574323 -0.139672
+0.329803 -0.575386 -0.140073
+0.313144 -0.57591 -0.141057
+0.296563 -0.577042 -0.142643
+0.283223 -0.580423 -0.143836
+0.267259 -0.580711 -0.147905
+-0.277404 -0.572905 -0.141456
+0.360808 -0.588918 -0.132605
+0.340976 -0.591592 -0.134186
+0.324034 -0.59174 -0.135818
+0.307501 -0.592271 -0.136947
+0.291106 -0.592808 -0.139203
+0.277764 -0.59092 -0.142248
+0.267093 -0.596749 -0.142729
+0.250583 -0.596914 -0.146915
+-0.260269 -0.592117 -0.143802
+0.278139 -0.607321 -0.136092
+0.259105 -0.610313 -0.139438
+0.247213 -0.610841 -0.142094
+0.233175 -0.61293 -0.145125
+-0.243739 -0.60864 -0.144818
+0.244906 -0.624421 -0.135357
+0.228152 -0.629229 -0.135884
+0.214797 -0.626511 -0.141959
+0.198316 -0.625424 -0.150151
+-0.227143 -0.623611 -0.143945
+0.201138 -0.636835 -0.137985
+0.183782 -0.641277 -0.142245
+-0.19242 -0.64438 -0.142955
+-0.209784 -0.634842 -0.143128
+0.167925 -0.652365 -0.137895
+0.147636 -0.65863 -0.141311
+0.12721 -0.664832 -0.145056
+-0.159007 -0.660439 -0.142766
+-0.175819 -0.652143 -0.142672
+0.11511 -0.671944 -0.140209
+0.095751 -0.677112 -0.142698
+0.077063 -0.68213 -0.144484
+-0.1065 -0.681404 -0.14258
+-0.124244 -0.675131 -0.142501
+-0.141765 -0.667968 -0.14282
+0.065983 -0.688225 -0.138973
+0.049826 -0.691632 -0.139241
+0.030232 -0.691644 -0.142574
+0.011601 -0.692747 -0.143318
+-0.006144 -0.693895 -0.142995
+-0.02335 -0.694011 -0.142565
+-0.040462 -0.693548 -0.141735
+-0.056783 -0.690854 -0.14253
+-0.069986 -0.686422 -0.146254
+-0.087709 -0.68619 -0.141077
+0.058648 0.771337 -0.157439
+0.040443 0.770847 -0.163576
+0.026477 0.774747 -0.160516
+0.009081 0.776958 -0.159582
+-0.008592 0.777422 -0.159767
+-0.025785 0.77759 -0.159834
+-0.043094 0.777603 -0.159269
+-0.061776 0.778191 -0.15657
+-0.080409 0.774082 -0.158044
+0.095714 0.754811 -0.159646
+0.078086 0.763672 -0.159259
+-0.095319 0.772126 -0.155574
+-0.109128 0.761185 -0.163083
+0.130531 0.73604 -0.158332
+0.113262 0.745823 -0.159336
+-0.126469 0.761207 -0.15392
+-0.14272 0.745508 -0.162701
+0.146814 0.725576 -0.157417
+-0.16015 0.74441 -0.152641
+0.162388 0.711119 -0.156716
+-0.175752 0.728687 -0.157081
+0.178808 0.69341 -0.154993
+-0.191294 0.712103 -0.158657
+-0.205931 0.695649 -0.158648
+0.196982 0.659933 -0.156683
+0.185458 0.675768 -0.16071
+-0.21671 0.679394 -0.158648
+-0.226193 0.662224 -0.159363
+0.212899 0.627983 -0.153863
+0.202635 0.642246 -0.16024
+-0.234356 0.644851 -0.159525
+-0.241843 0.627838 -0.159525
+0.212538 0.608961 -0.16175
+-0.247833 0.610864 -0.159713
+0.226165 0.575981 -0.152484
+0.218431 0.590718 -0.160972
+-0.250819 0.593756 -0.159901
+-0.253475 0.576743 -0.159901
+0.224539 0.560052 -0.157689
+-0.255436 0.559729 -0.159834
+0.224008 0.542984 -0.159531
+-0.256945 0.542231 -0.159287
+0.223302 0.525903 -0.159901
+-0.257714 0.522376 -0.157302
+0.221352 0.508889 -0.159901
+-0.252592 0.504083 -0.161841
+0.218915 0.491782 -0.159713
+-0.255228 0.49187 -0.154537
+0.214562 0.474876 -0.159525
+-0.247828 0.477895 -0.161278
+0.208918 0.458091 -0.159713
+-0.241843 0.460181 -0.161495
+0.202877 0.440875 -0.159713
+-0.240951 0.440364 -0.153997
+0.195482 0.423408 -0.159363
+-0.225735 0.423552 -0.162499
+0.186662 0.4064 -0.158742
+-0.224794 0.405987 -0.152587
+0.176166 0.390306 -0.158769
+-0.209085 0.390076 -0.157113
+0.161718 0.373825 -0.15893
+-0.192672 0.373385 -0.158724
+0.14603 0.356546 -0.158155
+-0.175819 0.357004 -0.159242
+-0.530783 0.332672 -0.148117
+0.129379 0.339425 -0.156841
+-0.158833 0.341855 -0.159368
+-0.49437 0.316795 -0.149031
+-0.511874 0.321839 -0.152561
+-0.546529 0.325967 -0.153484
+0.113127 0.322411 -0.154174
+0.096145 0.322801 -0.164369
+-0.124015 0.318068 -0.161512
+-0.141509 0.328813 -0.159942
+-0.480479 0.304298 -0.148328
+-0.530617 0.318653 -0.160206
+-0.562795 0.313938 -0.154647
+0.081176 0.306641 -0.161106
+0.06719 0.309259 -0.167816
+0.049955 0.303276 -0.17016
+-0.069194 0.303184 -0.171221
+-0.084317 0.30434 -0.168766
+-0.105365 0.307005 -0.163596
+-0.496757 0.304831 -0.156522
+-0.513926 0.304999 -0.162625
+-0.572236 0.298388 -0.160204
+0.075847 0.270385 -0.163764
+0.065586 0.290804 -0.162817
+0.04843 0.28519 -0.166084
+0.034563 0.288599 -0.16955
+0.017878 0.28951 -0.174767
+-0.044801 0.285743 -0.174391
+-0.057309 0.294715 -0.171971
+-0.074607 0.288872 -0.167165
+-0.095046 0.285445 -0.162836
+-0.463813 0.271707 -0.153233
+-0.480571 0.288533 -0.155557
+-0.497545 0.288627 -0.161854
+-0.582574 0.285146 -0.158091
+0.129365 0.244789 -0.159603
+0.112109 0.254019 -0.160155
+0.094521 0.261949 -0.161834
+0.055006 0.271535 -0.168658
+0.038343 0.272819 -0.170648
+0.024926 0.276193 -0.172575
+-0.061638 0.274443 -0.172754
+-0.082224 0.271128 -0.169348
+-0.097255 0.267274 -0.167482
+-0.110746 0.270447 -0.161249
+-0.125746 0.254506 -0.165366
+-0.447158 0.254626 -0.150521
+-0.480894 0.271573 -0.159465
+-0.498397 0.271031 -0.164725
+-0.593402 0.264736 -0.155371
+0.146379 0.235363 -0.159525
+-0.143078 0.254891 -0.155304
+-0.16226 0.237465 -0.159778
+-0.464356 0.25472 -0.15664
+-0.481545 0.254178 -0.160723
+-0.500568 0.251025 -0.164846
+-0.592431 0.248936 -0.159929
+-0.601677 0.248376 -0.153911
+0.180312 0.213624 -0.159713
+0.163231 0.224865 -0.159713
+-0.180308 0.2301 -0.154874
+-0.448688 0.237326 -0.152642
+-0.466109 0.238285 -0.157423
+-0.481908 0.23738 -0.160506
+-0.494338 0.233016 -0.161827
+-0.511876 0.233769 -0.163965
+-0.583834 0.238016 -0.161134
+-0.597449 0.236497 -0.155843
+-0.609811 0.235167 -0.146973
+0.197353 0.201134 -0.159368
+-0.193572 0.218264 -0.157617
+-0.454494 0.220883 -0.153239
+-0.469872 0.225124 -0.157308
+-0.482303 0.221792 -0.158857
+-0.497055 0.219832 -0.159939
+-0.510095 0.216171 -0.159074
+-0.52577 0.219684 -0.159544
+-0.547637 0.218579 -0.156277
+-0.57084 0.223921 -0.156627
+-0.590422 0.222328 -0.152087
+-0.602946 0.224263 -0.149177
+0.214138 0.186411 -0.159242
+-0.209846 0.203263 -0.159168
+-0.468454 0.207264 -0.153285
+-0.485871 0.208871 -0.156485
+-0.499159 0.204701 -0.155692
+-0.517039 0.201921 -0.151866
+-0.534255 0.206133 -0.15085
+0.23099 0.170029 -0.159273
+-0.226823 0.186822 -0.160385
+-0.484945 0.191751 -0.149145
+-0.502855 0.191719 -0.148542
+0.247434 0.15311 -0.15872
+-0.243041 0.16956 -0.162603
+0.262623 0.136809 -0.157498
+-0.260344 0.153571 -0.16153
+0.274378 0.123398 -0.155273
+-0.277305 0.137041 -0.161023
+-0.292631 0.119933 -0.160572
+0.297323 0.084203 -0.157078
+0.280911 0.105455 -0.161024
+-0.303922 0.102512 -0.160484
+-0.313908 0.085431 -0.160349
+0.314958 0.049746 -0.157303
+0.303889 0.065863 -0.162139
+-0.321911 0.068485 -0.160058
+-0.330216 0.051471 -0.159901
+0.326981 0.020014 -0.157309
+0.320292 0.031696 -0.161624
+-0.337109 0.034457 -0.159901
+-0.343777 0.017511 -0.159901
+0.332164 0.000944 -0.159804
+-0.350838 0.000565 -0.159901
+0.343666 -0.030081 -0.156673
+0.337486 -0.018017 -0.161698
+-0.355467 -0.016382 -0.159901
+-0.361116 -0.033328 -0.159901
+0.348087 -0.049842 -0.159122
+-0.366373 -0.050275 -0.159901
+0.354867 -0.070012 -0.156499
+-0.370217 -0.067221 -0.159901
+0.36173 -0.101198 -0.153666
+0.353385 -0.083587 -0.16327
+-0.374061 -0.084168 -0.159901
+-0.377906 -0.101114 -0.159901
+0.359689 -0.116864 -0.160184
+-0.380809 -0.118061 -0.159901
+0.358175 -0.130573 -0.164285
+-0.381829 -0.135007 -0.159901
+0.364249 -0.149267 -0.158118
+-0.382613 -0.151953 -0.159901
+0.36571 -0.169643 -0.158847
+-0.383342 -0.169034 -0.15961
+0.366656 -0.18668 -0.158884
+-0.384839 -0.186209 -0.158381
+0.366546 -0.202981 -0.159556
+-0.387101 -0.202214 -0.153983
+0.366013 -0.219739 -0.159901
+-0.380728 -0.220317 -0.165819
+0.365071 -0.236686 -0.159901
+-0.38255 -0.236322 -0.161421
+0.363345 -0.253632 -0.159901
+-0.382925 -0.253471 -0.159717
+0.361619 -0.270578 -0.159901
+-0.383351 -0.26996 -0.157884
+0.360129 -0.287525 -0.159901
+-0.384319 -0.28376 -0.154496
+0.358481 -0.304471 -0.159901
+-0.37873 -0.304078 -0.158694
+0.356206 -0.321418 -0.159901
+-0.372747 -0.324273 -0.162505
+0.353617 -0.338364 -0.159901
+-0.373181 -0.33828 -0.155625
+0.349066 -0.355311 -0.159901
+-0.365832 -0.352312 -0.163107
+0.344673 -0.372257 -0.159901
+-0.360739 -0.372143 -0.161572
+0.587371 -0.413262 -0.14709
+0.34075 -0.389203 -0.159901
+-0.354194 -0.392601 -0.162904
+0.595657 -0.424677 -0.147533
+0.573094 -0.411544 -0.149343
+0.560305 -0.424233 -0.154962
+0.336513 -0.40615 -0.15998
+-0.355349 -0.407266 -0.153535
+0.58531 -0.42515 -0.154496
+0.574191 -0.427414 -0.157125
+0.540342 -0.427094 -0.1522
+0.330472 -0.423096 -0.160215
+-0.343752 -0.426378 -0.160295
+0.594431 -0.43711 -0.15386
+0.583494 -0.442068 -0.15921
+0.568663 -0.437304 -0.159386
+0.555407 -0.440549 -0.15863
+0.541749 -0.445126 -0.157728
+0.524438 -0.444341 -0.154257
+0.510326 -0.458789 -0.155535
+0.324909 -0.440083 -0.160482
+-0.338278 -0.444679 -0.156193
+0.610453 -0.476785 -0.150448
+0.599581 -0.455245 -0.154681
+0.571986 -0.454047 -0.161921
+0.55455 -0.457316 -0.160202
+0.53854 -0.459047 -0.158795
+0.525351 -0.461782 -0.158033
+0.489541 -0.461256 -0.152286
+0.318923 -0.457298 -0.160888
+-0.33084 -0.458633 -0.158627
+0.570175 -0.47229 -0.162116
+0.55359 -0.474016 -0.160651
+0.537366 -0.474931 -0.159512
+0.521428 -0.474998 -0.158761
+0.504844 -0.475576 -0.15781
+0.490769 -0.479363 -0.157184
+0.473015 -0.478481 -0.153743
+0.311602 -0.474568 -0.161659
+-0.322272 -0.475052 -0.159565
+0.614417 -0.493703 -0.149082
+0.604465 -0.490325 -0.156711
+0.587594 -0.486806 -0.161075
+0.569636 -0.48986 -0.16033
+0.552505 -0.490909 -0.159566
+0.535743 -0.49107 -0.159274
+0.519177 -0.491137 -0.15923
+0.503087 -0.491837 -0.159005
+0.487355 -0.493051 -0.15833
+0.473872 -0.496353 -0.157573
+0.456436 -0.494474 -0.153859
+0.303704 -0.491921 -0.162366
+-0.314426 -0.491205 -0.160062
+0.609891 -0.506115 -0.149761
+0.59813 -0.502389 -0.156467
+0.584677 -0.505309 -0.157196
+0.567537 -0.506995 -0.156954
+0.550125 -0.507672 -0.156943
+0.533012 -0.507573 -0.15775
+0.516671 -0.507021 -0.158658
+0.501173 -0.507371 -0.158994
+0.485697 -0.50881 -0.158638
+0.470002 -0.509896 -0.157776
+0.456819 -0.512278 -0.156237
+0.441924 -0.507817 -0.152326
+0.293768 -0.509423 -0.16241
+-0.305455 -0.507367 -0.15921
+0.598762 -0.518946 -0.148525
+0.580202 -0.521816 -0.150092
+0.562529 -0.523391 -0.150471
+0.544578 -0.523817 -0.151639
+0.527022 -0.523 -0.154334
+0.512644 -0.519998 -0.156871
+0.499271 -0.523417 -0.156468
+0.482644 -0.52499 -0.156551
+0.466567 -0.525425 -0.156138
+0.451194 -0.524376 -0.154533
+0.43515 -0.523269 -0.150358
+0.281902 -0.526692 -0.162127
+-0.293436 -0.524637 -0.160062
+0.514507 -0.536738 -0.149368
+0.494399 -0.540377 -0.149813
+0.476309 -0.540948 -0.151061
+0.459797 -0.539399 -0.151633
+0.446214 -0.536011 -0.151025
+0.267502 -0.546063 -0.161614
+-0.277269 -0.544315 -0.162428
+0.262289 -0.564808 -0.155414
+0.247825 -0.560178 -0.165518
+-0.271258 -0.561741 -0.155723
+0.248428 -0.577997 -0.155833
+0.231071 -0.576071 -0.166261
+-0.259365 -0.575757 -0.157497
+0.231885 -0.59394 -0.155264
+0.214245 -0.592762 -0.165875
+-0.243417 -0.591956 -0.15917
+0.214729 -0.60997 -0.153225
+0.197393 -0.609386 -0.163378
+-0.226887 -0.606876 -0.159838
+0.180958 -0.625781 -0.159054
+-0.192362 -0.629996 -0.159713
+-0.209846 -0.619299 -0.15987
+0.164637 -0.641622 -0.152777
+0.147107 -0.641955 -0.16265
+-0.159728 -0.647922 -0.158809
+-0.175867 -0.639617 -0.158809
+0.132774 -0.653563 -0.156438
+0.113051 -0.659217 -0.159027
+0.094004 -0.664864 -0.16088
+-0.124953 -0.66223 -0.159834
+-0.142464 -0.654418 -0.159713
+0.082611 -0.671754 -0.155439
+0.0658 -0.67632 -0.155444
+0.045779 -0.676495 -0.159229
+0.025212 -0.676406 -0.16286
+0.005091 -0.681597 -0.159691
+-0.012062 -0.682664 -0.159395
+-0.029322 -0.6829 -0.158543
+-0.044269 -0.683843 -0.155463
+-0.056656 -0.679275 -0.159296
+-0.072853 -0.675828 -0.159999
+-0.090176 -0.672281 -0.159623
+-0.107576 -0.667448 -0.159726
+0.061561 0.755008 -0.175959
+0.043798 0.758978 -0.176937
+0.026879 0.760578 -0.177534
+0.010274 0.761791 -0.176969
+-0.006798 0.762325 -0.176781
+-0.023834 0.762526 -0.176769
+-0.040821 0.76262 -0.176368
+-0.058122 0.762535 -0.175182
+-0.07566 0.761715 -0.173741
+0.097019 0.739317 -0.175594
+0.079311 0.748145 -0.176018
+-0.09266 0.760827 -0.170204
+-0.10815 0.74554 -0.1801
+0.133842 0.723328 -0.168939
+0.11609 0.7282 -0.175404
+-0.125208 0.745831 -0.171773
+-0.141805 0.729355 -0.179237
+0.146903 0.710927 -0.169997
+-0.158751 0.729194 -0.16898
+0.162045 0.695555 -0.169722
+0.130378 0.710839 -0.181089
+-0.174572 0.712641 -0.172763
+0.173618 0.681688 -0.168746
+0.146096 0.695207 -0.181723
+-0.189031 0.693736 -0.175001
+0.161951 0.679394 -0.180241
+-0.194566 0.675865 -0.181961
+-0.203957 0.681688 -0.170314
+0.190984 0.648397 -0.170376
+0.179053 0.664547 -0.17394
+-0.208995 0.664371 -0.17575
+-0.219233 0.645639 -0.175453
+0.196502 0.630306 -0.172241
+-0.228032 0.628508 -0.175426
+0.207156 0.597009 -0.172635
+0.195844 0.611397 -0.180278
+-0.233596 0.611871 -0.175594
+-0.237305 0.594527 -0.176498
+0.212161 0.579371 -0.171328
+-0.240171 0.576944 -0.176848
+0.211578 0.560334 -0.174573
+-0.241471 0.559796 -0.176848
+0.211298 0.542917 -0.175917
+-0.242177 0.542715 -0.176635
+0.210536 0.525769 -0.17622
+-0.242478 0.525123 -0.175868
+0.208144 0.508325 -0.176077
+-0.241789 0.507128 -0.174969
+0.205065 0.491061 -0.175487
+-0.241547 0.488598 -0.172104
+0.200793 0.474796 -0.175756
+-0.236591 0.471797 -0.172438
+0.194328 0.457723 -0.17631
+-0.225311 0.457894 -0.179695
+0.188133 0.43966 -0.175621
+-0.22587 0.441305 -0.171268
+0.1792 0.421202 -0.17575
+-0.209618 0.424224 -0.1791
+0.17449 0.404011 -0.170314
+0.165099 0.409835 -0.181961
+-0.20943 0.407049 -0.169042
+0.159565 0.391964 -0.175068
+-0.192672 0.390331 -0.172846
+0.145105 0.373058 -0.17347
+-0.175913 0.37373 -0.17396
+0.129056 0.356318 -0.171528
+0.112271 0.356344 -0.18223
+-0.159532 0.358635 -0.174243
+0.112365 0.339492 -0.168061
+0.095513 0.339586 -0.177507
+-0.125452 0.336517 -0.175591
+-0.142659 0.346919 -0.17502
+0.079678 0.323299 -0.171777
+0.06317 0.322792 -0.177275
+0.045879 0.32216 -0.182273
+-0.072139 0.31725 -0.178827
+-0.089539 0.322703 -0.178158
+-0.108171 0.3284 -0.17638
+-0.530564 0.30293 -0.1679
+-0.546377 0.311729 -0.164321
+0.030788 0.305375 -0.175847
+0.013436 0.306802 -0.181368
+-0.000497 0.310045 -0.185112
+-0.016458 0.305995 -0.184241
+-0.038341 0.304394 -0.180419
+-0.056793 0.311728 -0.179379
+-0.514689 0.288241 -0.167568
+-0.543316 0.298798 -0.171335
+-0.558593 0.298636 -0.168204
+0.008993 0.270352 -0.179254
+-0.002365 0.291008 -0.179074
+-0.026186 0.285015 -0.178336
+-0.531079 0.28734 -0.172293
+-0.546201 0.286336 -0.173883
+-0.558173 0.283533 -0.173599
+-0.569981 0.285778 -0.168121
+0.096291 0.245534 -0.175783
+0.07843 0.250435 -0.177283
+0.059781 0.25401 -0.178633
+0.041593 0.256144 -0.179531
+0.025588 0.261333 -0.179371
+-0.012147 0.26978 -0.182109
+-0.028481 0.266268 -0.181632
+-0.042714 0.270322 -0.177286
+-0.058292 0.254936 -0.182873
+-0.076153 0.255097 -0.179372
+-0.093315 0.253994 -0.17679
+-0.516379 0.271125 -0.169522
+-0.53341 0.271963 -0.173661
+-0.548357 0.271613 -0.174947
+-0.562764 0.270944 -0.172871
+-0.577033 0.270043 -0.16675
+0.129753 0.229867 -0.175567
+0.113035 0.238995 -0.175567
+-0.041216 0.253187 -0.186922
+-0.109342 0.25386 -0.172228
+-0.125047 0.237721 -0.179928
+-0.522064 0.254695 -0.169586
+-0.537599 0.258931 -0.173248
+-0.55075 0.255936 -0.172738
+-0.566594 0.255399 -0.170474
+-0.581369 0.253713 -0.164998
+0.146516 0.220054 -0.175594
+-0.142451 0.237788 -0.171309
+-0.159491 0.220653 -0.178903
+-0.535528 0.240195 -0.167194
+-0.556511 0.239168 -0.166697
+-0.571351 0.241961 -0.165899
+0.181398 0.196985 -0.17505
+0.163692 0.208313 -0.175987
+-0.177016 0.219367 -0.169063
+0.197998 0.184927 -0.174243
+-0.192994 0.203389 -0.173588
+0.214232 0.169684 -0.174274
+-0.210021 0.186899 -0.17519
+-0.228392 0.16956 -0.175763
+0.23099 0.153083 -0.174023
+-0.238092 0.164611 -0.171564
+0.247403 0.136392 -0.172882
+-0.242984 0.154853 -0.176369
+0.263381 0.120423 -0.169352
+-0.260234 0.136473 -0.176995
+-0.275964 0.119419 -0.176502
+0.280549 0.086196 -0.175516
+0.26448 0.102925 -0.180522
+-0.289365 0.102499 -0.176314
+0.292243 0.071767 -0.172345
+-0.299889 0.085485 -0.176471
+-0.308665 0.068606 -0.176471
+0.309168 0.037788 -0.172426
+0.297678 0.0543 -0.176843
+-0.317378 0.051633 -0.176659
+-0.324623 0.034525 -0.176848
+0.314593 0.018187 -0.175528
+-0.33248 0.017511 -0.176848
+0.32713 -0.012312 -0.172616
+0.32024 -0.00085 -0.177827
+-0.337815 0.000565 -0.176848
+-0.344091 -0.016382 -0.176848
+0.331613 -0.02966 -0.173722
+-0.350132 -0.033328 -0.176848
+0.343631 -0.066748 -0.171305
+0.331142 -0.049454 -0.181332
+-0.35429 -0.050275 -0.176848
+-0.358919 -0.067221 -0.176848
+0.341653 -0.07981 -0.17822
+-0.36347 -0.084168 -0.176848
+0.347383 -0.097633 -0.174092
+-0.367314 -0.101114 -0.176848
+0.347029 -0.116743 -0.177386
+-0.369511 -0.118061 -0.176848
+0.348033 -0.134867 -0.178214
+-0.371394 -0.135007 -0.176848
+0.35019 -0.155633 -0.178521
+-0.3721 -0.151953 -0.176848
+0.356997 -0.173532 -0.172124
+-0.372425 -0.168967 -0.17678
+0.355861 -0.186707 -0.174915
+-0.37297 -0.186465 -0.176233
+0.355296 -0.20282 -0.176372
+-0.374456 -0.206078 -0.174719
+0.354794 -0.219739 -0.176848
+-0.370117 -0.224242 -0.181351
+0.353852 -0.236686 -0.176848
+-0.371589 -0.237452 -0.178717
+0.351969 -0.253632 -0.176848
+-0.372169 -0.253793 -0.177031
+0.349772 -0.270578 -0.176848
+-0.372573 -0.271009 -0.175261
+0.348046 -0.287525 -0.176848
+-0.37426 -0.287414 -0.170137
+0.34632 -0.304471 -0.176848
+-0.365906 -0.305052 -0.180217
+0.343888 -0.321418 -0.176848
+-0.367388 -0.318627 -0.173445
+0.34075 -0.338364 -0.176848
+-0.360608 -0.338754 -0.176011
+0.337847 -0.355311 -0.176848
+-0.356186 -0.358332 -0.173996
+0.333454 -0.372257 -0.176848
+-0.349542 -0.370116 -0.179493
+0.328208 -0.389271 -0.176848
+-0.343631 -0.387686 -0.179421
+0.32279 -0.406379 -0.176659
+-0.343695 -0.406989 -0.171063
+0.316722 -0.423352 -0.176471
+-0.33339 -0.421556 -0.178062
+0.309269 -0.440298 -0.176471
+-0.326612 -0.441828 -0.175353
+0.5964 -0.473382 -0.159831
+0.587721 -0.459119 -0.16153
+0.302454 -0.457312 -0.176628
+-0.320164 -0.4619 -0.172152
+0.583346 -0.469447 -0.162838
+0.293959 -0.474393 -0.17692
+-0.308741 -0.477994 -0.176682
+0.285054 -0.491914 -0.176843
+-0.303114 -0.495256 -0.17203
+0.275105 -0.509479 -0.175745
+-0.292091 -0.508636 -0.174814
+0.263552 -0.526191 -0.175259
+-0.276902 -0.52534 -0.177381
+0.247645 -0.542106 -0.176873
+-0.260202 -0.542286 -0.18145
+0.230456 -0.55851 -0.178377
+-0.259365 -0.559617 -0.169456
+0.213815 -0.575574 -0.178229
+-0.243323 -0.575457 -0.172752
+0.197097 -0.592561 -0.177005
+-0.227466 -0.590512 -0.173929
+0.180218 -0.609507 -0.174729
+-0.193088 -0.612977 -0.176148
+-0.210923 -0.602336 -0.17505
+0.163527 -0.626077 -0.169598
+0.146446 -0.626077 -0.179405
+-0.155706 -0.627165 -0.182994
+-0.173327 -0.623786 -0.176686
+0.130022 -0.641979 -0.171194
+0.113224 -0.641979 -0.17919
+-0.125612 -0.646651 -0.176471
+-0.144507 -0.638177 -0.176686
+-0.161851 -0.635823 -0.170702
+0.099539 -0.653567 -0.171745
+0.082382 -0.659272 -0.171378
+0.062734 -0.660024 -0.174664
+0.044351 -0.660132 -0.178018
+0.027709 -0.65871 -0.182902
+-0.056759 -0.665355 -0.175722
+-0.07371 -0.660927 -0.176552
+-0.090925 -0.657478 -0.176781
+-0.108235 -0.652609 -0.176659
+0.013737 -0.669498 -0.173663
+-0.000858 -0.67043 -0.17483
+-0.018266 -0.670663 -0.175054
+-0.038528 -0.670668 -0.172882
+0.063593 0.738647 -0.191494
+0.04626 0.742932 -0.192355
+0.028655 0.744542 -0.193176
+0.011354 0.745728 -0.193261
+-0.005633 0.746129 -0.193167
+-0.022669 0.74614 -0.192965
+-0.039741 0.746328 -0.192431
+-0.056346 0.746893 -0.191219
+-0.073265 0.746297 -0.189831
+0.099411 0.724945 -0.187422
+0.081795 0.729352 -0.19223
+-0.090893 0.745319 -0.186276
+-0.107486 0.728619 -0.195792
+0.111352 0.709203 -0.193145
+-0.124818 0.729194 -0.18763
+-0.141711 0.71257 -0.193104
+0.129857 0.694246 -0.193124
+0.093125 0.714553 -0.198875
+-0.158025 0.713068 -0.18325
+0.146191 0.678395 -0.192523
+-0.1583 0.696557 -0.195092
+-0.171734 0.699221 -0.184632
+0.162666 0.662292 -0.188933
+-0.176906 0.681226 -0.191956
+0.179086 0.645968 -0.182919
+-0.189958 0.659817 -0.193029
+0.163016 0.644892 -0.197331
+-0.194395 0.641767 -0.198364
+-0.204941 0.647859 -0.18724
+0.179774 0.628251 -0.189236
+-0.208292 0.628205 -0.192594
+0.195736 0.594706 -0.184983
+0.179774 0.610958 -0.195119
+-0.210682 0.609136 -0.198199
+-0.221179 0.614757 -0.187014
+0.179963 0.593918 -0.199215
+-0.220963 0.597481 -0.192628
+0.196326 0.577375 -0.18813
+-0.223847 0.57788 -0.19305
+0.19647 0.559931 -0.190365
+-0.225578 0.559998 -0.193167
+0.196167 0.542782 -0.191048
+-0.226251 0.54285 -0.192931
+0.194822 0.525365 -0.191329
+-0.226486 0.525836 -0.192158
+0.191704 0.506455 -0.191911
+-0.226376 0.508594 -0.19103
+0.193127 0.488965 -0.1871
+0.181783 0.495595 -0.198359
+-0.225892 0.491136 -0.188473
+0.18207 0.477234 -0.19301
+-0.20943 0.474835 -0.199293
+-0.225176 0.474034 -0.184818
+0.175544 0.454906 -0.192628
+-0.209241 0.457929 -0.194077
+0.174451 0.437167 -0.187216
+0.16398 0.443146 -0.19834
+-0.20943 0.441211 -0.187009
+0.160352 0.425744 -0.193029
+-0.192672 0.424224 -0.193088
+0.147439 0.404474 -0.191956
+-0.175725 0.407278 -0.196305
+-0.192672 0.407278 -0.183673
+0.142267 0.386479 -0.184915
+0.128833 0.389142 -0.195406
+-0.159155 0.390708 -0.197042
+-0.175819 0.390426 -0.186074
+0.128558 0.372632 -0.18427
+0.112244 0.37313 -0.194359
+-0.143291 0.375033 -0.196203
+-0.159626 0.374578 -0.186372
+0.095419 0.356439 -0.190185
+0.078405 0.356506 -0.197829
+-0.106685 0.355225 -0.198134
+-0.126312 0.358166 -0.192002
+-0.145956 0.36188 -0.1855
+0.078728 0.339613 -0.184487
+0.061754 0.339452 -0.19015
+0.044512 0.339559 -0.195476
+0.027072 0.340434 -0.200127
+-0.05473 0.3368 -0.197887
+-0.071934 0.336976 -0.193362
+-0.094151 0.343322 -0.192739
+-0.111995 0.343871 -0.186986
+0.028359 0.322801 -0.186964
+0.011475 0.324066 -0.19158
+-0.005628 0.323931 -0.193631
+-0.024094 0.323309 -0.192896
+-0.043641 0.326143 -0.192381
+-0.059975 0.325636 -0.187851
+0.012504 0.25249 -0.187296
+-0.003073 0.253191 -0.188886
+0.099297 0.232531 -0.187183
+0.082252 0.232542 -0.192605
+0.062744 0.235644 -0.193337
+0.043942 0.238003 -0.194081
+0.023947 0.241004 -0.19401
+-0.023153 0.250357 -0.190219
+-0.040839 0.236349 -0.198717
+-0.057221 0.237559 -0.195209
+-0.074337 0.237949 -0.192786
+-0.091468 0.237788 -0.189634
+0.131994 0.216091 -0.187455
+0.112446 0.219296 -0.193245
+0.004042 0.237573 -0.198825
+-0.013389 0.236255 -0.2006
+-0.028075 0.233134 -0.20248
+-0.108284 0.237627 -0.185305
+-0.124885 0.220868 -0.194343
+0.145144 0.201633 -0.192249
+0.093342 0.222368 -0.198513
+-0.107939 0.220868 -0.199522
+-0.141966 0.220868 -0.18726
+-0.158846 0.203922 -0.194254
+0.184681 0.182118 -0.185536
+0.166773 0.187966 -0.191531
+0.126758 0.205273 -0.198913
+-0.175953 0.203734 -0.184577
+0.197864 0.168944 -0.186953
+-0.175725 0.186976 -0.199208
+-0.192806 0.186976 -0.188538
+0.21407 0.152921 -0.187408
+0.180984 0.169034 -0.197466
+-0.210021 0.17002 -0.190657
+0.23099 0.136136 -0.186733
+0.196966 0.152387 -0.19917
+-0.226595 0.153302 -0.191553
+0.247748 0.119418 -0.184655
+0.214003 0.135908 -0.199176
+-0.242926 0.136154 -0.192368
+0.23099 0.11919 -0.198266
+-0.25949 0.118938 -0.192303
+0.264506 0.08562 -0.191936
+0.247936 0.102311 -0.195666
+-0.274366 0.102768 -0.191534
+0.280576 0.06939 -0.186275
+-0.284711 0.086242 -0.191966
+-0.294638 0.06933 -0.192349
+0.297381 0.035568 -0.186989
+0.281291 0.052153 -0.195283
+-0.303018 0.052524 -0.192541
+-0.311015 0.035274 -0.193256
+0.308942 0.004686 -0.188409
+0.297354 0.018437 -0.195576
+-0.318263 0.017874 -0.193606
+-0.324724 0.000632 -0.193794
+0.314648 -0.012521 -0.188623
+-0.331146 -0.016382 -0.193794
+0.315243 -0.03211 -0.193383
+-0.335921 -0.033396 -0.193794
+0.330409 -0.066347 -0.188009
+0.31522 -0.049979 -0.199022
+-0.341386 -0.050315 -0.193606
+-0.346649 -0.067033 -0.193417
+0.330898 -0.082876 -0.191362
+-0.350845 -0.083939 -0.193606
+0.331839 -0.100374 -0.192729
+-0.353752 -0.101047 -0.193794
+0.332135 -0.118333 -0.194657
+-0.356879 -0.118061 -0.193794
+0.332346 -0.13805 -0.19731
+-0.358762 -0.135007 -0.193794
+0.345763 -0.170266 -0.186737
+0.337588 -0.155773 -0.195387
+-0.35939 -0.151953 -0.193794
+-0.359625 -0.1689 -0.193794
+0.343792 -0.185658 -0.191425
+-0.359883 -0.185981 -0.19366
+0.343261 -0.202658 -0.193189
+-0.360228 -0.203506 -0.193431
+0.342644 -0.219806 -0.193716
+-0.359791 -0.22103 -0.194171
+0.341023 -0.236914 -0.193606
+-0.359383 -0.237587 -0.194745
+0.339302 -0.253888 -0.193261
+-0.359563 -0.253888 -0.194072
+0.336204 -0.270605 -0.193292
+-0.359643 -0.271197 -0.19318
+0.333431 -0.28739 -0.193637
+-0.359957 -0.290845 -0.190743
+0.331559 -0.304404 -0.193794
+-0.354174 -0.308829 -0.195166
+0.330001 -0.321418 -0.193794
+-0.356151 -0.321891 -0.188251
+0.327345 -0.338431 -0.193794
+-0.343663 -0.33906 -0.198033
+0.323575 -0.355539 -0.193606
+-0.343917 -0.358485 -0.190519
+0.319412 -0.372647 -0.193418
+-0.338385 -0.375809 -0.190624
+0.313739 -0.39001 -0.193256
+-0.32699 -0.389965 -0.19863
+0.307954 -0.407328 -0.192541
+-0.327648 -0.408885 -0.190375
+0.301216 -0.423834 -0.192514
+-0.3219 -0.427089 -0.189164
+0.293126 -0.440633 -0.192514
+-0.309852 -0.44109 -0.196042
+0.285238 -0.457818 -0.192373
+-0.309491 -0.458553 -0.187149
+0.276014 -0.475177 -0.192373
+-0.293651 -0.474823 -0.195338
+0.264749 -0.494351 -0.192378
+-0.292553 -0.492254 -0.185827
+0.26009 -0.512133 -0.186149
+0.247385 -0.508084 -0.198443
+-0.27687 -0.508151 -0.190916
+0.247299 -0.524671 -0.18845
+0.234299 -0.521305 -0.20025
+-0.260417 -0.524681 -0.193662
+0.228612 -0.539505 -0.19298
+-0.243125 -0.541214 -0.196408
+0.212972 -0.558914 -0.191636
+-0.226245 -0.558161 -0.197674
+-0.243282 -0.558668 -0.184545
+0.196842 -0.575735 -0.190985
+-0.210855 -0.574888 -0.196312
+-0.227398 -0.574597 -0.185854
+0.180151 -0.592561 -0.188851
+0.163204 -0.592561 -0.199208
+-0.196822 -0.592999 -0.191212
+-0.214298 -0.587692 -0.185254
+0.163204 -0.609507 -0.184772
+0.146258 -0.609507 -0.194343
+-0.158806 -0.612765 -0.19403
+-0.177083 -0.604392 -0.192207
+0.1295 -0.626077 -0.187251
+0.112621 -0.626077 -0.19448
+0.095513 -0.626131 -0.199988
+-0.125606 -0.63018 -0.192756
+-0.141766 -0.620772 -0.194218
+0.096654 -0.642147 -0.18482
+0.079242 -0.642983 -0.188798
+0.061431 -0.64336 -0.192048
+0.044216 -0.643266 -0.194937
+0.027453 -0.642248 -0.19927
+-0.057176 -0.649376 -0.192158
+-0.07375 -0.644089 -0.193579
+-0.091696 -0.640444 -0.193445
+-0.109161 -0.636495 -0.192541
+0.011776 -0.657123 -0.187645
+-0.00561 -0.656908 -0.190203
+-0.023857 -0.656756 -0.190356
+-0.041243 -0.654198 -0.190571
+0.065829 0.724155 -0.202811
+0.05109 0.727207 -0.204427
+0.032617 0.725941 -0.208512
+0.013717 0.728562 -0.208221
+-0.003682 0.729194 -0.20823
+-0.020875 0.729126 -0.208062
+-0.038628 0.728861 -0.20776
+-0.056159 0.729795 -0.205603
+-0.070071 0.732936 -0.201713
+0.077633 0.709303 -0.208568
+-0.088295 0.726896 -0.202408
+-0.107359 0.710831 -0.208673
+0.116287 0.691446 -0.202964
+0.098503 0.696529 -0.208503
+0.057814 0.711628 -0.213668
+0.04338 0.714754 -0.215038
+-0.075378 0.714638 -0.214565
+-0.093238 0.708833 -0.214691
+-0.124643 0.711884 -0.201279
+0.130065 0.677668 -0.203272
+-0.123846 0.69414 -0.21302
+-0.141509 0.695422 -0.204267
+0.146352 0.661448 -0.201295
+0.113554 0.677943 -0.212211
+-0.140353 0.677611 -0.214237
+-0.157941 0.679409 -0.204433
+0.129567 0.661354 -0.212169
+-0.156679 0.661613 -0.213385
+-0.171764 0.665127 -0.203202
+0.163204 0.627649 -0.202671
+0.146258 0.644529 -0.208623
+-0.17501 0.644337 -0.209347
+0.146258 0.627582 -0.214742
+-0.17885 0.624309 -0.214617
+-0.190074 0.629865 -0.204985
+0.163204 0.610636 -0.207446
+-0.192941 0.610366 -0.209788
+0.180151 0.57681 -0.201573
+0.163204 0.593689 -0.21129
+-0.194599 0.591224 -0.214463
+-0.205381 0.597442 -0.204779
+0.163204 0.576743 -0.213487
+-0.205175 0.579946 -0.208752
+0.180151 0.559796 -0.203288
+0.163204 0.559796 -0.214507
+-0.208585 0.560459 -0.208275
+0.179781 0.542715 -0.203837
+0.162595 0.542742 -0.215244
+-0.209551 0.542917 -0.207995
+0.177939 0.525648 -0.204603
+0.160928 0.526005 -0.216045
+-0.209618 0.525903 -0.207367
+0.173206 0.509982 -0.206288
+0.159007 0.512159 -0.21654
+-0.209618 0.508957 -0.205484
+0.165194 0.494968 -0.209806
+-0.192672 0.49201 -0.215919
+-0.209618 0.491943 -0.202357
+0.160151 0.472771 -0.208902
+-0.192672 0.475064 -0.211839
+0.159094 0.454645 -0.204751
+0.148071 0.460616 -0.214407
+-0.192671 0.458117 -0.206504
+0.145301 0.441121 -0.209347
+-0.175725 0.441171 -0.212075
+-0.192672 0.441171 -0.20062
+0.142297 0.420573 -0.203202
+0.127212 0.424087 -0.213385
+-0.158779 0.424224 -0.214428
+-0.175725 0.424224 -0.204307
+0.128475 0.406291 -0.204433
+0.110886 0.408089 -0.214237
+-0.142141 0.407722 -0.21483
+-0.158873 0.407372 -0.206002
+0.112042 0.390278 -0.204581
+0.094272 0.391317 -0.21339
+-0.126257 0.391737 -0.213481
+-0.142774 0.391273 -0.205594
+0.095217 0.373587 -0.2022
+0.077625 0.373883 -0.209109
+0.059971 0.373875 -0.215413
+-0.090233 0.371425 -0.214199
+-0.109298 0.374191 -0.209325
+-0.129154 0.377533 -0.203804
+0.061162 0.356613 -0.202857
+0.043683 0.357178 -0.207955
+0.02631 0.358268 -0.212478
+0.012499 0.361183 -0.215967
+-0.002181 0.35773 -0.214753
+-0.019356 0.356855 -0.214229
+-0.036351 0.356581 -0.213594
+-0.055821 0.354103 -0.209145
+-0.07808 0.359365 -0.20856
+-0.095258 0.36039 -0.204697
+0.008169 0.343193 -0.204468
+-0.012026 0.340461 -0.204265
+-0.029649 0.340599 -0.203816
+-0.043804 0.342793 -0.203619
+0.08209 0.217089 -0.205073
+0.066089 0.216814 -0.209021
+0.046914 0.219643 -0.209391
+0.028229 0.220855 -0.210131
+0.009695 0.221232 -0.211153
+-0.007991 0.220653 -0.212297
+-0.024718 0.2199 -0.21259
+-0.040812 0.219833 -0.211525
+-0.057153 0.220546 -0.209537
+-0.074046 0.220868 -0.206504
+0.113499 0.19804 -0.209358
+0.093617 0.205724 -0.210395
+-0.090992 0.220868 -0.202738
+-0.107872 0.203855 -0.212814
+-0.124885 0.203922 -0.207524
+0.150519 0.183683 -0.203187
+0.132443 0.187611 -0.209102
+0.076698 0.205998 -0.215157
+-0.090764 0.203882 -0.216739
+-0.141832 0.203922 -0.20164
+0.16346 0.169773 -0.206128
+-0.141832 0.186976 -0.214977
+-0.158778 0.186976 -0.20721
+-0.175725 0.170029 -0.211839
+0.178023 0.150494 -0.211356
+0.146248 0.169885 -0.214997
+-0.192738 0.170029 -0.201954
+0.197343 0.135064 -0.210656
+0.1594 0.156057 -0.217542
+-0.192577 0.153177 -0.214773
+-0.209497 0.153271 -0.204213
+0.214165 0.118934 -0.210207
+-0.208864 0.136889 -0.216688
+-0.225559 0.136517 -0.206096
+0.23099 0.102243 -0.209093
+-0.240841 0.116855 -0.208804
+0.247936 0.085297 -0.206033
+-0.246077 0.098225 -0.216648
+-0.259111 0.101871 -0.204903
+0.264695 0.068579 -0.201131
+-0.259101 0.085366 -0.214752
+-0.271475 0.089094 -0.202898
+0.247936 0.06835 -0.215291
+-0.275641 0.069655 -0.209421
+0.281453 0.03478 -0.202606
+0.264883 0.051471 -0.209553
+-0.279936 0.049465 -0.215882
+-0.29007 0.055396 -0.204203
+0.264883 0.034457 -0.217096
+-0.293954 0.037618 -0.209643
+0.297522 0.0018 -0.201061
+0.281453 0.017767 -0.209779
+-0.30287 0.019089 -0.209514
+0.281641 0.000793 -0.215769
+-0.309458 0.001439 -0.210203
+0.298426 -0.015544 -0.205633
+-0.315535 -0.015992 -0.210364
+0.298776 -0.033127 -0.210225
+-0.321088 -0.033234 -0.210552
+0.315189 -0.066966 -0.203958
+0.298776 -0.050275 -0.21482
+-0.326458 -0.050709 -0.210552
+-0.332278 -0.067136 -0.209648
+0.315534 -0.083939 -0.207405
+-0.336442 -0.08308 -0.209487
+0.315722 -0.101181 -0.209396
+-0.339689 -0.100276 -0.210391
+0.315534 -0.118562 -0.211847
+-0.342399 -0.117859 -0.210741
+0.325974 -0.149046 -0.206733
+0.31463 -0.134922 -0.216031
+-0.34362 -0.135007 -0.210741
+-0.344326 -0.151953 -0.210741
+0.330786 -0.166398 -0.204944
+-0.344562 -0.1689 -0.210741
+0.330203 -0.185308 -0.208006
+-0.344562 -0.185846 -0.210741
+0.329788 -0.20286 -0.20934
+-0.344652 -0.20286 -0.210673
+0.329022 -0.220452 -0.209707
+-0.34471 -0.219968 -0.2107
+0.327784 -0.237977 -0.20897
+-0.344589 -0.236941 -0.210862
+0.325171 -0.254305 -0.208481
+-0.344531 -0.253726 -0.210835
+0.320903 -0.270054 -0.209638
+-0.344562 -0.270713 -0.210528
+0.316964 -0.286906 -0.210611
+-0.344392 -0.288238 -0.209514
+0.315398 -0.304404 -0.210741
+-0.343419 -0.305762 -0.208308
+0.313979 -0.321781 -0.210552
+-0.34293 -0.322292 -0.204955
+0.312105 -0.339238 -0.210068
+-0.327741 -0.338593 -0.215721
+0.308721 -0.356556 -0.209353
+-0.327737 -0.356023 -0.209792
+0.302862 -0.373624 -0.209346
+-0.32699 -0.373355 -0.204779
+0.295427 -0.392519 -0.209522
+-0.31092 -0.389526 -0.215047
+0.29426 -0.40996 -0.20413
+0.283931 -0.403746 -0.215621
+-0.31092 -0.406751 -0.209063
+0.280892 -0.423131 -0.21041
+-0.310205 -0.424136 -0.202976
+0.278428 -0.443297 -0.204425
+0.266899 -0.437845 -0.216104
+-0.293974 -0.440298 -0.211191
+0.264316 -0.457883 -0.20968
+-0.277404 -0.456989 -0.217645
+-0.293974 -0.457312 -0.203077
+0.260354 -0.477451 -0.204122
+0.249566 -0.471443 -0.215391
+-0.277404 -0.474003 -0.209788
+0.244574 -0.489356 -0.21007
+-0.260551 -0.490788 -0.215181
+-0.277215 -0.491111 -0.200817
+0.230802 -0.50799 -0.210391
+-0.260578 -0.507573 -0.205264
+0.21618 -0.527234 -0.209496
+-0.243757 -0.523703 -0.208297
+0.210316 -0.54545 -0.202491
+0.196851 -0.542794 -0.213132
+-0.205841 -0.545175 -0.218079
+-0.224209 -0.539366 -0.210814
+0.196344 -0.559421 -0.202879
+0.18003 -0.558923 -0.213345
+-0.191855 -0.558793 -0.21688
+-0.208801 -0.558793 -0.207513
+0.180057 -0.575708 -0.201608
+0.163204 -0.575614 -0.211525
+-0.176603 -0.574717 -0.214463
+-0.193895 -0.575063 -0.205208
+0.146258 -0.592561 -0.20721
+0.129244 -0.592494 -0.215246
+-0.162763 -0.592841 -0.208277
+-0.18097 -0.588499 -0.202698
+0.129311 -0.609507 -0.201718
+0.112298 -0.60944 -0.208028
+0.094965 -0.608866 -0.214464
+-0.106076 -0.611471 -0.215173
+-0.123509 -0.610956 -0.209493
+-0.1435 -0.603132 -0.208508
+0.077965 -0.626068 -0.20418
+0.060453 -0.6267 -0.207697
+0.043718 -0.626911 -0.210057
+0.027597 -0.625284 -0.213789
+0.014651 -0.621789 -0.217931
+-0.000235 -0.625163 -0.216565
+-0.017406 -0.625947 -0.216112
+-0.034558 -0.626243 -0.215045
+-0.054679 -0.629413 -0.209853
+-0.075121 -0.625536 -0.209943
+-0.094773 -0.621848 -0.209551
+-0.111556 -0.622595 -0.203969
+0.009141 -0.639354 -0.204358
+-0.011201 -0.641607 -0.20411
+-0.028609 -0.641383 -0.203877
+-0.043204 -0.640215 -0.202945
+0.032815 0.70864 -0.22026
+0.018382 0.710817 -0.220423
+0.000895 0.711951 -0.220707
+-0.016392 0.712247 -0.220738
+-0.034042 0.711659 -0.220645
+0.083443 0.691365 -0.217745
+0.06733 0.694353 -0.220815
+0.046895 0.697356 -0.223743
+-0.05476 0.709414 -0.220207
+-0.073771 0.695001 -0.226399
+-0.088063 0.698519 -0.221454
+0.096886 0.677876 -0.21958
+0.027368 0.692357 -0.230004
+0.007875 0.694417 -0.230912
+-0.009847 0.695233 -0.231408
+-0.027089 0.695139 -0.231317
+-0.044425 0.694081 -0.231097
+-0.059611 0.690611 -0.231518
+-0.105151 0.692557 -0.220116
+0.112688 0.661421 -0.22025
+0.080071 0.677219 -0.225543
+0.060572 0.675983 -0.231094
+0.042308 0.681102 -0.232939
+-0.092354 0.680419 -0.229721
+-0.107472 0.678197 -0.226494
+-0.121723 0.675375 -0.222747
+0.129311 0.644528 -0.218351
+0.09579 0.661125 -0.226999
+0.079161 0.660366 -0.232541
+-0.109843 0.663402 -0.231407
+-0.124424 0.661216 -0.227687
+-0.138136 0.658949 -0.222966
+0.112365 0.644528 -0.226589
+0.095539 0.644273 -0.23278
+-0.126483 0.646789 -0.231776
+-0.140569 0.645047 -0.227111
+-0.152855 0.644579 -0.221439
+0.146258 0.610635 -0.218351
+0.129311 0.627582 -0.223451
+0.112365 0.627582 -0.231375
+-0.142308 0.630116 -0.230878
+-0.162838 0.627389 -0.221919
+0.129311 0.610636 -0.227687
+-0.153014 0.610505 -0.231654
+-0.171683 0.609925 -0.222221
+0.146258 0.593689 -0.221254
+0.129311 0.593689 -0.230277
+-0.162137 0.593155 -0.231743
+-0.179964 0.593059 -0.222243
+0.146258 0.576743 -0.22298
+0.129311 0.576743 -0.231846
+-0.168785 0.576622 -0.231673
+-0.18604 0.576806 -0.221857
+0.146191 0.559729 -0.224
+0.12902 0.559662 -0.233493
+-0.173264 0.559904 -0.231541
+-0.19078 0.560298 -0.221016
+0.145312 0.542406 -0.225231
+-0.175187 0.542917 -0.231139
+-0.19238 0.542984 -0.220705
+0.143314 0.52339 -0.226314
+-0.175725 0.525903 -0.230433
+-0.192672 0.525903 -0.219999
+0.149982 0.505981 -0.22109
+0.134588 0.508595 -0.230264
+-0.175725 0.508957 -0.229413
+-0.192672 0.508957 -0.218116
+0.146642 0.491697 -0.221117
+0.128384 0.492114 -0.231335
+-0.175725 0.49201 -0.226511
+0.140106 0.475022 -0.221804
+0.122107 0.474687 -0.231269
+-0.158779 0.475064 -0.232552
+-0.175725 0.475064 -0.222431
+0.132685 0.458095 -0.221897
+0.112481 0.455595 -0.230724
+-0.158779 0.458117 -0.227766
+-0.175725 0.458117 -0.218037
+0.123388 0.441121 -0.221439
+0.111102 0.440652 -0.227111
+0.096848 0.43898 -0.231776
+-0.141953 0.441426 -0.230348
+-0.158779 0.441171 -0.221332
+0.108669 0.42675 -0.222966
+0.094957 0.424484 -0.227687
+0.080445 0.422367 -0.231545
+-0.125364 0.425414 -0.230732
+-0.141886 0.424547 -0.222872
+0.092187 0.410256 -0.222851
+0.078005 0.407503 -0.226918
+0.063275 0.405806 -0.230416
+-0.088754 0.404791 -0.232551
+-0.106709 0.410132 -0.230148
+-0.125458 0.408562 -0.222306
+0.075078 0.39279 -0.220496
+0.057814 0.388156 -0.223597
+0.047697 0.394269 -0.229043
+0.032384 0.391886 -0.230515
+0.01503 0.390789 -0.231509
+-0.00193 0.390426 -0.232034
+-0.018813 0.390331 -0.232081
+-0.036029 0.390399 -0.231879
+-0.053997 0.391148 -0.231069
+-0.073793 0.393354 -0.229866
+-0.09379 0.388873 -0.222747
+-0.111829 0.394261 -0.220238
+0.041747 0.376567 -0.220559
+0.02236 0.374986 -0.222586
+0.005858 0.374353 -0.223355
+-0.01069 0.373641 -0.223312
+-0.027717 0.373345 -0.222949
+-0.045363 0.373237 -0.221953
+-0.06381 0.374367 -0.220733
+-0.079247 0.377239 -0.219762
+0.06575 0.200188 -0.221038
+0.051402 0.202681 -0.221944
+0.032367 0.200936 -0.225777
+0.013336 0.203424 -0.225347
+-0.00422 0.203922 -0.225647
+-0.02144 0.203693 -0.225668
+-0.038943 0.203115 -0.225334
+-0.056485 0.203303 -0.223153
+0.117088 0.182091 -0.219285
+0.10122 0.185922 -0.221584
+0.07931 0.186924 -0.226634
+-0.073656 0.203908 -0.219488
+-0.089853 0.187154 -0.229351
+-0.107364 0.186589 -0.225161
+0.129378 0.169224 -0.222344
+0.057742 0.186663 -0.231784
+0.042986 0.18908 -0.23287
+-0.072863 0.186949 -0.233072
+-0.124751 0.186841 -0.220066
+-0.141765 0.169962 -0.226073
+0.143767 0.151229 -0.227488
+0.111126 0.167286 -0.230184
+0.093869 0.17261 -0.232
+-0.124432 0.169387 -0.232868
+-0.158778 0.170029 -0.219292
+0.183906 0.132242 -0.220198
+0.165646 0.137426 -0.22637
+0.125964 0.155461 -0.232472
+-0.158778 0.153083 -0.230982
+-0.175725 0.153083 -0.222823
+0.19785 0.118437 -0.220924
+-0.175657 0.136069 -0.234233
+-0.19255 0.136392 -0.225632
+-0.208866 0.120204 -0.227593
+0.214138 0.102149 -0.220516
+0.181273 0.118644 -0.230234
+-0.222605 0.122849 -0.217237
+0.23099 0.085297 -0.218194
+0.197353 0.102122 -0.230684
+-0.227485 0.104129 -0.225572
+0.214044 0.085297 -0.229649
+-0.241817 0.082454 -0.227311
+0.247936 0.051404 -0.221489
+0.23099 0.06835 -0.226353
+-0.247885 0.065293 -0.231633
+-0.257489 0.071363 -0.22193
+0.23099 0.051404 -0.233571
+-0.262778 0.053966 -0.226518
+0.264883 0.017511 -0.222352
+0.247936 0.034457 -0.228629
+-0.274739 0.032987 -0.226945
+-0.278437 0.015439 -0.232233
+-0.288811 0.021515 -0.221109
+0.281829 -0.016315 -0.219618
+0.264883 0.000565 -0.228315
+-0.290616 0.003946 -0.226388
+0.264883 -0.016382 -0.233336
+-0.298742 -0.015086 -0.226198
+0.281829 -0.033328 -0.224471
+-0.304833 -0.03215 -0.226299
+0.298776 -0.067221 -0.2189
+0.281829 -0.050275 -0.229178
+-0.309182 -0.050063 -0.227015
+0.281829 -0.067221 -0.233414
+-0.314256 -0.070033 -0.227309
+0.298776 -0.084168 -0.222666
+-0.313919 -0.087064 -0.232568
+-0.324496 -0.080959 -0.221076
+0.298776 -0.101181 -0.225558
+-0.322985 -0.097599 -0.22652
+0.298588 -0.118101 -0.227728
+-0.325604 -0.116923 -0.226943
+0.314361 -0.151004 -0.219033
+0.298399 -0.134819 -0.23048
+-0.327492 -0.134805 -0.22706
+0.298588 -0.151725 -0.232872
+-0.328165 -0.151953 -0.22706
+0.314951 -0.168268 -0.220936
+0.298776 -0.168833 -0.234838
+-0.328243 -0.1689 -0.22706
+0.315027 -0.185779 -0.223081
+-0.328243 -0.185846 -0.22706
+0.314256 -0.203411 -0.224488
+-0.328243 -0.202793 -0.22706
+0.311885 -0.222944 -0.225307
+-0.328243 -0.219739 -0.22706
+0.316328 -0.240882 -0.219725
+0.302306 -0.236363 -0.231982
+-0.328243 -0.236686 -0.22706
+0.31034 -0.253094 -0.222191
+0.29583 -0.24871 -0.234923
+-0.328243 -0.253632 -0.22706
+0.301072 -0.267247 -0.227849
+-0.328243 -0.270578 -0.226824
+0.299377 -0.287296 -0.227181
+-0.328243 -0.287592 -0.225972
+0.298429 -0.305278 -0.226858
+-0.328055 -0.3047 -0.224352
+0.297581 -0.323247 -0.225966
+-0.32771 -0.321673 -0.220904
+0.294378 -0.341915 -0.225723
+-0.311297 -0.338364 -0.23161
+0.294599 -0.359368 -0.220791
+0.282759 -0.35317 -0.232028
+-0.311297 -0.355378 -0.226521
+0.281593 -0.372882 -0.226705
+-0.311108 -0.372486 -0.220868
+0.279282 -0.391731 -0.222366
+0.268649 -0.385611 -0.232863
+-0.29435 -0.389203 -0.23059
+0.266932 -0.403354 -0.227992
+-0.29435 -0.406217 -0.224168
+0.25882 -0.42377 -0.227165
+-0.277404 -0.423096 -0.231924
+-0.294162 -0.423325 -0.217887
+0.249614 -0.442948 -0.226894
+-0.277404 -0.440043 -0.224235
+0.24565 -0.460083 -0.222222
+0.234526 -0.454495 -0.232634
+-0.260457 -0.456989 -0.229805
+0.230074 -0.474333 -0.226886
+-0.243511 -0.473936 -0.234199
+-0.260457 -0.473936 -0.221803
+0.226686 -0.494397 -0.22017
+0.212591 -0.492207 -0.230237
+-0.243766 -0.490761 -0.226369
+0.213623 -0.508914 -0.221025
+0.196855 -0.50834 -0.231328
+-0.227636 -0.507583 -0.228729
+-0.244264 -0.507075 -0.217535
+0.197389 -0.525444 -0.221998
+0.180218 -0.524842 -0.231924
+-0.212019 -0.526853 -0.226179
+-0.230292 -0.521047 -0.218926
+0.180191 -0.54195 -0.222635
+0.163164 -0.541493 -0.231536
+-0.192523 -0.541573 -0.227361
+0.163137 -0.558601 -0.221837
+0.145872 -0.558093 -0.230386
+-0.155459 -0.560881 -0.232827
+-0.173394 -0.556144 -0.227481
+0.146123 -0.57548 -0.219124
+0.12867 -0.575161 -0.226387
+0.111033 -0.574998 -0.233111
+-0.12272 -0.577862 -0.232921
+-0.140404 -0.57244 -0.230824
+-0.159043 -0.574496 -0.22224
+0.111961 -0.592157 -0.220608
+0.094802 -0.591229 -0.226796
+0.080786 -0.589149 -0.232117
+0.062858 -0.594885 -0.231705
+-0.09019 -0.594681 -0.231225
+-0.108489 -0.593037 -0.226951
+-0.130703 -0.591315 -0.221551
+-0.146765 -0.587466 -0.219004
+0.075775 -0.607142 -0.21969
+0.057551 -0.613183 -0.219036
+0.043759 -0.609786 -0.223665
+0.027058 -0.608207 -0.226914
+0.010404 -0.608472 -0.227687
+-0.006296 -0.609252 -0.227705
+-0.023323 -0.609548 -0.227342
+-0.040978 -0.609938 -0.226217
+-0.059453 -0.609194 -0.225271
+-0.07904 -0.605658 -0.225352
+-0.09528 -0.605675 -0.2217
+0.031954 0.674957 -0.23747
+0.016979 0.676938 -0.23876
+-0.000921 0.677655 -0.239873
+-0.018724 0.67822 -0.239994
+-0.036091 0.67822 -0.239541
+-0.052755 0.677596 -0.238575
+0.065431 0.657569 -0.237334
+0.047424 0.662779 -0.239585
+-0.071373 0.675152 -0.236551
+0.079158 0.643708 -0.238398
+0.028587 0.660681 -0.244257
+0.01019 0.658478 -0.247804
+-0.009596 0.660708 -0.248066
+-0.027739 0.661008 -0.247844
+-0.045676 0.661654 -0.24618
+-0.060293 0.664022 -0.243576
+-0.071755 0.657699 -0.243827
+-0.088904 0.658331 -0.239308
+0.095513 0.627488 -0.237777
+0.062292 0.643627 -0.243157
+0.043048 0.64207 -0.248422
+0.025124 0.646783 -0.25055
+-0.059416 0.646011 -0.250076
+-0.079554 0.643561 -0.24699
+-0.091854 0.643575 -0.243985
+-0.105926 0.642199 -0.240115
+0.112365 0.610635 -0.234905
+0.078687 0.627232 -0.243341
+0.061991 0.626541 -0.248922
+-0.093175 0.629085 -0.248144
+-0.107651 0.627668 -0.244418
+-0.121482 0.625939 -0.240128
+0.095418 0.610636 -0.241888
+0.078593 0.61038 -0.24753
+-0.108321 0.612924 -0.248253
+-0.122287 0.611327 -0.244235
+-0.134598 0.610852 -0.239406
+0.112365 0.593689 -0.23773
+0.095418 0.593689 -0.244477
+0.078566 0.593595 -0.251114
+-0.121445 0.5958 -0.248031
+-0.142633 0.591507 -0.240692
+0.112365 0.576743 -0.239613
+0.095418 0.576743 -0.246988
+-0.129095 0.576625 -0.249053
+-0.141107 0.576829 -0.244605
+-0.152018 0.5768 -0.239594
+0.127711 0.542567 -0.234872
+0.11189 0.559823 -0.241417
+0.095073 0.559984 -0.248871
+-0.137947 0.562309 -0.247602
+-0.155976 0.560267 -0.239736
+0.110495 0.543616 -0.243271
+0.094401 0.543684 -0.249682
+-0.140689 0.543388 -0.247559
+-0.158016 0.542984 -0.23949
+0.123255 0.526505 -0.237134
+0.107712 0.530256 -0.244463
+0.094428 0.526576 -0.249346
+-0.141765 0.52597 -0.246259
+-0.158778 0.525903 -0.238907
+0.113636 0.511623 -0.240256
+0.092944 0.50641 -0.24813
+-0.124886 0.508957 -0.251303
+-0.141832 0.508957 -0.244399
+-0.158778 0.508957 -0.237494
+0.110517 0.491478 -0.239272
+0.097033 0.488458 -0.244334
+0.082439 0.491759 -0.249737
+-0.12498 0.492105 -0.248431
+-0.141832 0.49201 -0.242751
+-0.158779 0.49201 -0.235141
+0.104739 0.474787 -0.238606
+0.090763 0.477858 -0.244552
+0.074859 0.473439 -0.248567
+-0.108692 0.475817 -0.251365
+-0.125007 0.475319 -0.24538
+-0.141832 0.475064 -0.239691
+0.091107 0.460353 -0.240039
+0.076731 0.458273 -0.244418
+0.062634 0.45633 -0.248037
+-0.108404 0.459159 -0.247237
+-0.125101 0.458467 -0.242305
+-0.141926 0.458212 -0.235345
+0.075954 0.44352 -0.240099
+0.062099 0.442038 -0.243957
+0.049818 0.442023 -0.246952
+0.029883 0.439639 -0.250059
+-0.071537 0.438916 -0.250195
+-0.089462 0.443629 -0.247919
+-0.108706 0.442072 -0.242444
+-0.125572 0.441991 -0.237064
+0.059622 0.427437 -0.239493
+0.042449 0.428001 -0.243891
+0.031062 0.421564 -0.243603
+0.016272 0.423951 -0.246149
+-0.001639 0.424624 -0.247867
+-0.019351 0.424426 -0.248209
+-0.036997 0.424856 -0.248234
+-0.056604 0.427222 -0.247804
+-0.075001 0.425018 -0.244109
+-0.093792 0.422989 -0.239253
+-0.11178 0.428227 -0.236575
+0.0428 0.410566 -0.236846
+0.023736 0.407445 -0.238472
+0.00666 0.407224 -0.239523
+-0.010564 0.407345 -0.240039
+-0.02778 0.407412 -0.240196
+-0.045493 0.408044 -0.239873
+-0.063393 0.408762 -0.23876
+-0.078368 0.410743 -0.23747
+0.031878 0.183241 -0.237977
+0.017701 0.185878 -0.237624
+0.000716 0.186747 -0.237698
+-0.016392 0.186908 -0.237685
+-0.033984 0.186263 -0.23762
+0.082578 0.167093 -0.23777
+0.066837 0.169791 -0.23956
+0.045258 0.169666 -0.244035
+-0.05441 0.183586 -0.237358
+-0.073208 0.169353 -0.244172
+-0.086808 0.17343 -0.238901
+0.115138 0.15 -0.238529
+0.097651 0.154762 -0.240606
+0.024274 0.169174 -0.247568
+0.007019 0.169773 -0.24818
+-0.010026 0.170029 -0.2484
+-0.027089 0.1698 -0.248341
+-0.04443 0.16859 -0.248386
+-0.059767 0.165079 -0.249272
+-0.105062 0.167567 -0.238362
+-0.124253 0.151348 -0.24349
+0.149788 0.132468 -0.236517
+0.131068 0.137699 -0.240066
+0.077384 0.150999 -0.247805
+0.059857 0.15578 -0.249299
+-0.091507 0.155229 -0.249584
+-0.109635 0.148877 -0.249122
+-0.14159 0.152652 -0.237133
+0.164119 0.118275 -0.238306
+0.110537 0.134308 -0.248191
+0.092664 0.138914 -0.250305
+-0.140779 0.134922 -0.248226
+-0.158348 0.135894 -0.240763
+-0.174554 0.118817 -0.244361
+0.180433 0.101961 -0.239474
+0.145035 0.116344 -0.246914
+0.126658 0.121843 -0.249964
+-0.157079 0.118691 -0.25134
+-0.191949 0.119284 -0.236338
+0.197097 0.085297 -0.23875
+0.16375 0.101121 -0.247521
+-0.189913 0.101978 -0.247
+-0.207637 0.102626 -0.237512
+0.214044 0.06835 -0.236396
+0.180272 0.085041 -0.247373
+-0.203408 0.085364 -0.247873
+-0.221526 0.085064 -0.23829
+0.197097 0.06835 -0.245732
+-0.215988 0.068256 -0.248565
+-0.233283 0.067539 -0.239068
+0.23099 0.034457 -0.238828
+0.214043 0.051404 -0.242594
+0.197097 0.051404 -0.251695
+-0.228447 0.051404 -0.248557
+-0.244963 0.051795 -0.238562
+0.247936 0.017511 -0.234748
+0.214044 0.034457 -0.249106
+-0.242335 0.035039 -0.247466
+-0.257044 0.038049 -0.237138
+0.23099 0.017511 -0.245104
+-0.259739 0.01744 -0.243358
+0.247936 0.000564 -0.239299
+0.23099 0.000565 -0.250753
+-0.263589 -0.002547 -0.248367
+-0.274209 0.003586 -0.238684
+0.264883 -0.033328 -0.237023
+0.247936 -0.016382 -0.244398
+-0.27767 -0.015942 -0.242846
+0.247936 -0.033328 -0.249419
+-0.279594 -0.035469 -0.247845
+-0.290578 -0.029356 -0.237398
+0.264883 -0.050275 -0.241417
+-0.290569 -0.046816 -0.242347
+0.281829 -0.084168 -0.236317
+0.264883 -0.067221 -0.245967
+-0.294778 -0.066645 -0.243073
+0.264883 -0.084168 -0.249812
+-0.29771 -0.087528 -0.244763
+0.281829 -0.101114 -0.239691
+-0.296364 -0.105 -0.249695
+-0.307786 -0.098314 -0.239204
+0.281829 -0.118061 -0.24228
+-0.306877 -0.115203 -0.242967
+0.281829 -0.135007 -0.243849
+-0.310264 -0.134344 -0.242168
+0.281829 -0.151953 -0.24534
+-0.311229 -0.151886 -0.242123
+0.298484 -0.185981 -0.236317
+0.281829 -0.1689 -0.247223
+-0.311297 -0.1689 -0.242123
+0.281354 -0.185819 -0.248902
+-0.311297 -0.185846 -0.242123
+0.297189 -0.203156 -0.238124
+0.27996 -0.202026 -0.250377
+-0.311297 -0.202793 -0.242123
+0.292459 -0.218986 -0.240722
+0.27723 -0.215139 -0.252139
+-0.311297 -0.219739 -0.242123
+0.283067 -0.232731 -0.246382
+-0.311297 -0.236686 -0.242123
+0.281762 -0.252435 -0.245315
+-0.311297 -0.253632 -0.242123
+0.282569 -0.271157 -0.243078
+-0.311297 -0.270578 -0.241888
+0.2823 -0.28891 -0.242047
+-0.311297 -0.287525 -0.24126
+0.279378 -0.30808 -0.242401
+-0.311297 -0.304471 -0.239142
+0.283836 -0.326292 -0.236957
+0.268386 -0.322052 -0.248592
+-0.29435 -0.321418 -0.249576
+-0.311297 -0.321418 -0.235611
+0.276119 -0.338748 -0.239712
+0.261517 -0.335396 -0.250281
+-0.29435 -0.338364 -0.245418
+0.263996 -0.354826 -0.244198
+-0.29435 -0.355311 -0.240475
+0.262983 -0.373983 -0.239245
+0.250672 -0.36835 -0.249657
+-0.277404 -0.372257 -0.248635
+-0.29435 -0.372257 -0.235376
+0.251169 -0.386469 -0.24406
+-0.277404 -0.389203 -0.243064
+0.244413 -0.40917 -0.242539
+-0.260457 -0.40615 -0.249576
+-0.277404 -0.40615 -0.23718
+0.243077 -0.427638 -0.237156
+0.229617 -0.423748 -0.247575
+-0.260457 -0.423096 -0.242986
+0.231638 -0.440233 -0.239566
+0.218502 -0.436472 -0.249502
+-0.243511 -0.440043 -0.247693
+-0.260457 -0.440043 -0.236474
+0.214497 -0.456706 -0.243623
+-0.226564 -0.456989 -0.250832
+-0.243511 -0.456989 -0.24024
+0.209873 -0.477636 -0.237967
+0.195052 -0.473986 -0.247646
+-0.226564 -0.473936 -0.244006
+0.195891 -0.491528 -0.239586
+0.178605 -0.490004 -0.248804
+-0.209806 -0.490694 -0.246667
+-0.226793 -0.490922 -0.236521
+0.179788 -0.507654 -0.240298
+0.162107 -0.506543 -0.248878
+-0.193284 -0.506774 -0.246972
+-0.210246 -0.507892 -0.237848
+0.163056 -0.52425 -0.240092
+0.145827 -0.523026 -0.248301
+-0.156095 -0.52845 -0.250374
+-0.174435 -0.522194 -0.246891
+-0.193388 -0.524012 -0.237658
+0.146289 -0.540434 -0.239362
+0.132131 -0.537311 -0.246535
+0.113954 -0.543117 -0.249668
+-0.142851 -0.541366 -0.24813
+-0.160794 -0.543437 -0.24026
+-0.178909 -0.537707 -0.236513
+0.126758 -0.555921 -0.238099
+0.10869 -0.560913 -0.241426
+0.097933 -0.555683 -0.247163
+0.079853 -0.560686 -0.249269
+-0.087285 -0.561402 -0.251108
+-0.103014 -0.558836 -0.249227
+-0.125648 -0.557522 -0.243979
+-0.144908 -0.555323 -0.239168
+0.092826 -0.57316 -0.238392
+0.075542 -0.578766 -0.239046
+0.061385 -0.575248 -0.243964
+0.047397 -0.570814 -0.249197
+0.031967 -0.574233 -0.248357
+0.014569 -0.575386 -0.248341
+-0.002494 -0.575614 -0.2484
+-0.019441 -0.575614 -0.2484
+-0.036477 -0.575547 -0.248377
+-0.053952 -0.574798 -0.24806
+-0.073181 -0.572572 -0.247443
+-0.092939 -0.577777 -0.240313
+-0.110473 -0.573142 -0.238849
+0.042321 -0.58958 -0.237507
+0.021867 -0.591717 -0.238203
+0.004437 -0.592399 -0.238344
+-0.012537 -0.592561 -0.238357
+-0.029573 -0.592628 -0.2382
+-0.047017 -0.592332 -0.23781
+-0.064732 -0.590993 -0.237343
+-0.079373 -0.588557 -0.236732
+0.015331 0.641193 -0.253932
+0.00084 0.643512 -0.254203
+-0.016786 0.643645 -0.254336
+0.048473 0.623826 -0.253294
+0.030852 0.629214 -0.255204
+-0.0368 0.64149 -0.2538
+-0.049617 0.626116 -0.256918
+0.062279 0.609882 -0.252919
+0.013102 0.627301 -0.258192
+-0.003804 0.627165 -0.258761
+-0.020687 0.626348 -0.258907
+-0.034132 0.623068 -0.259004
+-0.070685 0.62424 -0.254102
+0.045732 0.610309 -0.257376
+0.028539 0.610847 -0.259533
+0.011385 0.610676 -0.260653
+-0.005534 0.61038 -0.260908
+-0.021804 0.609734 -0.260807
+-0.037804 0.609573 -0.260292
+-0.054499 0.609133 -0.259389
+-0.068573 0.605512 -0.258777
+-0.086256 0.606966 -0.25536
+0.078472 0.576743 -0.253029
+0.061781 0.593568 -0.256205
+0.044808 0.593729 -0.259633
+0.0277 0.593756 -0.261368
+0.010686 0.593689 -0.261581
+-0.006166 0.593595 -0.261581
+-0.022862 0.593501 -0.261502
+-0.03949 0.593339 -0.261222
+-0.055799 0.592546 -0.260763
+-0.071656 0.591622 -0.259944
+-0.08495 0.588965 -0.258879
+-0.10055 0.592698 -0.25481
+0.061526 0.576743 -0.258285
+0.044579 0.576742 -0.260718
+0.027633 0.576742 -0.261581
+0.010686 0.576742 -0.261581
+-0.00626 0.576742 -0.261581
+-0.023207 0.576742 -0.261581
+-0.040059 0.576648 -0.261581
+-0.056656 0.576299 -0.261446
+-0.072773 0.57568 -0.260805
+-0.089133 0.575321 -0.259329
+-0.108322 0.573627 -0.25561
+0.078378 0.55989 -0.254676
+0.061526 0.559796 -0.258835
+0.044579 0.559796 -0.260953
+0.027633 0.559796 -0.261581
+0.010686 0.559796 -0.261581
+-0.00626 0.559796 -0.261581
+-0.023207 0.559796 -0.261581
+-0.040153 0.559796 -0.261581
+-0.057005 0.559702 -0.261581
+-0.073741 0.559379 -0.261155
+-0.090173 0.558468 -0.260113
+-0.103206 0.555362 -0.258921
+-0.118466 0.559101 -0.254722
+0.07806 0.542971 -0.255046
+0.06105 0.542877 -0.259048
+0.044234 0.543038 -0.260953
+0.027538 0.542944 -0.261581
+0.010686 0.54285 -0.261581
+-0.00626 0.54285 -0.261581
+-0.023207 0.54285 -0.261581
+-0.040153 0.54285 -0.261581
+-0.0571 0.54285 -0.261581
+-0.073925 0.542594 -0.261446
+-0.090042 0.541949 -0.260783
+-0.10607 0.542083 -0.258776
+-0.123151 0.543132 -0.254015
+0.076983 0.525759 -0.254763
+0.059656 0.52667 -0.259012
+0.043629 0.526804 -0.260783
+0.027512 0.526159 -0.261446
+0.010686 0.525903 -0.261581
+-0.00626 0.525903 -0.261581
+-0.023207 0.525903 -0.261581
+-0.040153 0.525903 -0.261581
+-0.0571 0.525903 -0.261581
+-0.073952 0.525809 -0.261581
+-0.090647 0.525715 -0.260718
+-0.107464 0.525876 -0.258263
+-0.124594 0.526038 -0.25267
+0.072258 0.509562 -0.254954
+0.056792 0.51339 -0.258921
+0.043759 0.510284 -0.260113
+0.027328 0.509374 -0.261155
+0.010592 0.509051 -0.261581
+-0.00626 0.508957 -0.261581
+-0.023207 0.508957 -0.261581
+-0.040153 0.508957 -0.261581
+-0.0571 0.508957 -0.261581
+-0.074046 0.508957 -0.261502
+-0.090993 0.508957 -0.260011
+-0.107939 0.508957 -0.256638
+0.061798 0.495138 -0.255783
+0.042719 0.493432 -0.259181
+0.026297 0.492979 -0.260579
+0.010023 0.49236 -0.261222
+-0.006605 0.492199 -0.261502
+-0.023301 0.492105 -0.261581
+-0.040153 0.49201 -0.261581
+-0.0571 0.49201 -0.261581
+-0.074113 0.491943 -0.260897
+-0.091221 0.49197 -0.258675
+-0.108195 0.492131 -0.25382
+0.05429 0.476055 -0.254585
+0.038628 0.479509 -0.258416
+0.024847 0.476428 -0.259342
+0.008337 0.476126 -0.260292
+-0.007663 0.475965 -0.260807
+-0.023933 0.475319 -0.260908
+-0.040781 0.475064 -0.260953
+-0.057799 0.475023 -0.260574
+-0.074952 0.474852 -0.25882
+-0.092145 0.47539 -0.255691
+0.040624 0.460986 -0.253956
+0.020073 0.459526 -0.256899
+0.004665 0.462632 -0.259004
+-0.00878 0.459351 -0.258907
+-0.025632 0.458346 -0.25898
+-0.042695 0.458306 -0.25885
+-0.059516 0.458398 -0.257965
+-0.077265 0.456485 -0.254633
+-0.094887 0.461873 -0.251659
+0.007333 0.444209 -0.2538
+-0.012564 0.441826 -0.254412
+-0.030138 0.441467 -0.254555
+-0.047343 0.44212 -0.254248
+-0.061744 0.444507 -0.253755
+0.048746 0.149807 -0.254576
+0.033347 0.152043 -0.255652
+0.015447 0.15276 -0.256765
+-0.001867 0.153082 -0.257187
+-0.018813 0.153082 -0.257187
+-0.035813 0.15276 -0.25716
+-0.052988 0.15154 -0.25679
+0.081411 0.13322 -0.255863
+0.063828 0.137747 -0.257529
+-0.072099 0.149963 -0.255314
+-0.087368 0.139244 -0.258592
+-0.102657 0.136138 -0.256829
+0.115475 0.116218 -0.255683
+0.097316 0.120948 -0.257901
+0.044073 0.133133 -0.263992
+0.024283 0.135252 -0.265276
+0.006472 0.136002 -0.265929
+-0.010654 0.136136 -0.265974
+-0.0276 0.136136 -0.265974
+-0.04478 0.135679 -0.265685
+-0.062267 0.134522 -0.26503
+-0.077205 0.132434 -0.263739
+-0.122395 0.132476 -0.254559
+0.15018 0.098321 -0.253804
+0.132129 0.103493 -0.257001
+0.076832 0.117411 -0.264861
+0.05919 0.121774 -0.266638
+-0.092324 0.121056 -0.266728
+-0.112801 0.118764 -0.263352
+-0.125353 0.117996 -0.260944
+-0.139086 0.116127 -0.257698
+-0.154845 0.104585 -0.258731
+0.163957 0.084544 -0.254347
+0.111339 0.099811 -0.264555
+0.092931 0.105062 -0.266716
+-0.126989 0.103232 -0.267126
+-0.144499 0.098829 -0.264312
+-0.171592 0.100324 -0.254683
+0.180245 0.068256 -0.253311
+0.14738 0.084751 -0.260334
+0.130351 0.084507 -0.265733
+-0.160307 0.087142 -0.264522
+-0.174422 0.08585 -0.260369
+-0.186202 0.085478 -0.255705
+0.16346 0.068229 -0.260677
+0.146607 0.068135 -0.266608
+-0.177635 0.070462 -0.264753
+-0.198128 0.068629 -0.256915
+0.197097 0.034457 -0.257422
+0.180151 0.051404 -0.25954
+0.163204 0.051404 -0.266523
+-0.19286 0.050943 -0.265814
+-0.211119 0.051337 -0.257209
+0.214043 0.017511 -0.254284
+0.180151 0.034457 -0.265582
+-0.207286 0.033987 -0.265794
+-0.224834 0.034484 -0.256864
+0.197097 0.017511 -0.263855
+-0.21966 0.017511 -0.26566
+-0.237654 0.017461 -0.256128
+0.23099 -0.016382 -0.254676
+0.214043 0.000565 -0.260011
+-0.230491 0.000538 -0.265669
+-0.248243 -3.2e-05 -0.256058
+0.214044 -0.016382 -0.264875
+-0.239305 -0.01657 -0.265723
+-0.256771 -0.016972 -0.255972
+0.247936 -0.050275 -0.253028
+0.23099 -0.033328 -0.258913
+0.214044 -0.033328 -0.268563
+-0.248092 -0.033517 -0.265723
+-0.265347 -0.033676 -0.255941
+0.23099 -0.050275 -0.263228
+-0.256149 -0.05014 -0.265503
+-0.272686 -0.049368 -0.255347
+0.247936 -0.067221 -0.256638
+0.23099 -0.067221 -0.267307
+-0.264787 -0.065992 -0.264234
+-0.279936 -0.062421 -0.253451
+0.264883 -0.101114 -0.252087
+0.247936 -0.084168 -0.260482
+-0.275801 -0.081796 -0.259417
+0.247936 -0.101114 -0.26362
+-0.278865 -0.104993 -0.260787
+0.264883 -0.118061 -0.254205
+0.247936 -0.118061 -0.264875
+-0.273175 -0.122547 -0.26668
+-0.287665 -0.119275 -0.256737
+0.264883 -0.135007 -0.255618
+0.247936 -0.135007 -0.265974
+-0.276422 -0.134967 -0.265848
+-0.292616 -0.134505 -0.255223
+0.264883 -0.151953 -0.256716
+0.247936 -0.151953 -0.267386
+-0.277305 -0.150689 -0.266135
+-0.294018 -0.15159 -0.255115
+0.264883 -0.1689 -0.258364
+-0.27704 -0.168187 -0.267014
+-0.294283 -0.168833 -0.255304
+0.264538 -0.185658 -0.260152
+-0.277269 -0.185712 -0.267229
+-0.29435 -0.185846 -0.255304
+0.263932 -0.201892 -0.261125
+-0.277404 -0.202793 -0.266994
+-0.29435 -0.202793 -0.255225
+0.264359 -0.218435 -0.260789
+-0.277404 -0.219739 -0.266523
+-0.29435 -0.219739 -0.25499
+0.264457 -0.236417 -0.259764
+-0.277404 -0.236686 -0.266052
+-0.29435 -0.236686 -0.254755
+0.262869 -0.256802 -0.259105
+-0.277404 -0.253632 -0.265582
+-0.29435 -0.253632 -0.254676
+0.269117 -0.275162 -0.253193
+0.253621 -0.271372 -0.264033
+-0.277404 -0.270578 -0.265346
+-0.29435 -0.270578 -0.254598
+0.265165 -0.288722 -0.254707
+0.247654 -0.286624 -0.265763
+-0.277404 -0.287525 -0.264797
+-0.29435 -0.287525 -0.253891
+0.258648 -0.304387 -0.256748
+0.242962 -0.300465 -0.266897
+-0.277404 -0.304471 -0.26362
+-0.29435 -0.304471 -0.252009
+0.246894 -0.320954 -0.261368
+-0.277404 -0.321418 -0.260482
+0.250614 -0.340929 -0.255651
+0.236016 -0.337992 -0.265125
+-0.260457 -0.338364 -0.267307
+-0.277404 -0.338364 -0.256559
+0.24333 -0.354473 -0.256779
+0.228729 -0.351518 -0.266449
+-0.260457 -0.355311 -0.262992
+-0.277404 -0.355311 -0.252715
+0.231178 -0.371484 -0.260446
+-0.243511 -0.372257 -0.268092
+-0.260457 -0.372257 -0.258442
+0.234054 -0.392729 -0.253876
+0.217742 -0.389396 -0.264341
+-0.243511 -0.389203 -0.263699
+-0.260457 -0.389203 -0.253891
+0.224663 -0.407097 -0.255465
+0.206938 -0.405831 -0.265587
+-0.226564 -0.40615 -0.267621
+-0.243511 -0.40615 -0.258599
+0.213416 -0.422666 -0.256841
+0.195649 -0.422841 -0.265611
+-0.226564 -0.423096 -0.2626
+-0.243511 -0.423096 -0.253264
+0.202911 -0.439659 -0.256238
+0.182048 -0.442231 -0.264867
+-0.209618 -0.440043 -0.265111
+-0.226564 -0.440043 -0.256481
+0.19182 -0.456962 -0.255375
+0.179204 -0.457421 -0.261033
+0.165049 -0.459151 -0.265702
+-0.192671 -0.456989 -0.266288
+-0.209618 -0.456989 -0.25907
+0.176455 -0.47141 -0.256908
+0.162743 -0.473676 -0.261667
+0.148283 -0.475961 -0.265862
+-0.175953 -0.473976 -0.266693
+-0.192927 -0.473815 -0.260598
+-0.209712 -0.473841 -0.25284
+0.159993 -0.487786 -0.257298
+0.145912 -0.490536 -0.261609
+0.131288 -0.492858 -0.265479
+-0.159474 -0.491013 -0.266129
+-0.176797 -0.490636 -0.260434
+-0.193424 -0.490129 -0.254111
+0.143292 -0.504701 -0.256952
+0.129052 -0.507569 -0.260889
+0.114262 -0.509587 -0.264554
+-0.142773 -0.507156 -0.265144
+-0.161367 -0.509956 -0.257478
+-0.179619 -0.504073 -0.253859
+0.126933 -0.522041 -0.254895
+0.109449 -0.527553 -0.258106
+0.098229 -0.521665 -0.263752
+0.079929 -0.525672 -0.26645
+-0.106631 -0.527445 -0.265526
+-0.12436 -0.521793 -0.26376
+-0.142491 -0.524573 -0.25664
+0.093475 -0.539893 -0.255831
+0.075551 -0.544236 -0.25827
+0.06468 -0.537756 -0.263563
+0.049549 -0.540201 -0.264806
+0.032197 -0.541358 -0.265449
+0.01508 -0.541722 -0.265895
+-0.001867 -0.541722 -0.265974
+-0.018813 -0.541722 -0.265974
+-0.03576 -0.541722 -0.265974
+-0.052917 -0.541399 -0.265709
+-0.070481 -0.540799 -0.264788
+-0.09146 -0.54153 -0.261022
+-0.113239 -0.540977 -0.256472
+-0.129281 -0.537477 -0.254221
+0.059794 -0.555488 -0.255137
+0.040467 -0.557125 -0.25679
+0.023293 -0.558345 -0.25716
+0.006293 -0.558668 -0.257187
+-0.010654 -0.558668 -0.257187
+-0.0276 -0.558668 -0.257187
+-0.044663 -0.558439 -0.257111
+-0.061918 -0.557547 -0.256629
+-0.076656 -0.555002 -0.256297
+0.048901 0.115725 -0.271363
+0.033925 0.117706 -0.272652
+0.016026 0.118423 -0.273766
+-0.001687 0.119055 -0.274088
+-0.018813 0.11919 -0.274133
+-0.035939 0.119055 -0.273887
+-0.053521 0.1184 -0.27317
+0.081928 0.099618 -0.271615
+0.064127 0.103913 -0.273619
+-0.07249 0.116248 -0.271889
+-0.086017 0.102105 -0.275868
+0.116356 0.081444 -0.270894
+0.098098 0.086708 -0.273398
+0.045453 0.10153 -0.278177
+0.027137 0.099246 -0.281697
+0.00753 0.101611 -0.282127
+-0.009936 0.102176 -0.28227
+-0.027152 0.102109 -0.282125
+-0.04486 0.101615 -0.28167
+-0.062524 0.101544 -0.279975
+-0.074215 0.101935 -0.278203
+-0.105917 0.100198 -0.272534
+-0.120067 0.08502 -0.275901
+0.130064 0.067597 -0.272313
+0.078553 0.085216 -0.2785
+0.059407 0.083541 -0.282899
+0.041973 0.087648 -0.284475
+-0.075555 0.086921 -0.283756
+-0.095642 0.085216 -0.280892
+-0.107939 0.085297 -0.278527
+-0.140131 0.082481 -0.2719
+0.146352 0.05131 -0.272768
+0.113131 0.067449 -0.277285
+0.093811 0.065949 -0.282549
+0.075445 0.071017 -0.284742
+-0.109574 0.070101 -0.283871
+-0.129984 0.068053 -0.28023
+-0.142726 0.067624 -0.277334
+-0.156805 0.065922 -0.273505
+0.163204 0.034457 -0.272486
+0.129526 0.051054 -0.278253
+0.11283 0.050362 -0.283537
+-0.144329 0.053027 -0.281809
+-0.158807 0.051231 -0.278311
+-0.173216 0.048876 -0.274094
+0.180151 0.017511 -0.27123
+0.146258 0.034457 -0.278527
+0.129432 0.034202 -0.28409
+-0.160682 0.036246 -0.282455
+-0.17535 0.034285 -0.278584
+-0.189029 0.031958 -0.274114
+0.197097 0.000565 -0.268563
+0.163204 0.017511 -0.277978
+0.146258 0.017511 -0.28394
+-0.177085 0.019534 -0.282418
+-0.191172 0.01803 -0.278186
+-0.202646 0.017612 -0.273337
+0.180151 0.000565 -0.276487
+0.163204 0.000565 -0.282999
+-0.192871 0.003003 -0.281745
+-0.212711 0.000968 -0.273887
+0.197097 -0.016382 -0.272878
+0.180151 -0.016382 -0.280567
+-0.203597 -0.016392 -0.282475
+-0.221812 -0.016382 -0.274133
+0.214044 -0.050275 -0.271936
+0.197097 -0.033328 -0.276722
+0.180151 -0.033328 -0.284568
+-0.213012 -0.033876 -0.28261
+-0.230778 -0.033463 -0.274178
+0.197097 -0.050275 -0.280723
+-0.221261 -0.05089 -0.282632
+-0.238938 -0.050409 -0.274178
+0.23099 -0.084168 -0.27021
+0.214043 -0.067221 -0.275781
+0.197097 -0.067221 -0.284254
+-0.229757 -0.067702 -0.282587
+-0.247303 -0.06706 -0.27381
+0.214044 -0.084168 -0.279311
+-0.236701 -0.084073 -0.282315
+-0.254471 -0.083637 -0.272707
+0.23099 -0.101114 -0.272643
+0.214044 -0.101114 -0.281351
+-0.241206 -0.100818 -0.282248
+-0.259326 -0.101404 -0.272219
+0.23099 -0.118061 -0.274055
+0.214044 -0.118061 -0.282371
+-0.243237 -0.118289 -0.282503
+-0.260278 -0.119338 -0.273259
+0.23099 -0.135007 -0.274839
+0.214044 -0.135007 -0.283391
+-0.244909 -0.135626 -0.282741
+-0.261376 -0.135142 -0.273864
+0.247936 -0.1689 -0.268798
+0.23099 -0.151953 -0.276252
+0.214044 -0.151953 -0.284568
+-0.249334 -0.151469 -0.281804
+-0.264546 -0.147676 -0.273174
+0.23099 -0.1689 -0.277899
+0.214044 -0.1689 -0.286529
+-0.258328 -0.165614 -0.277731
+0.247842 -0.185752 -0.270556
+0.23099 -0.185846 -0.279625
+-0.259843 -0.185228 -0.277872
+0.247815 -0.202537 -0.271372
+0.230923 -0.20286 -0.28125
+-0.26039 -0.202726 -0.277664
+0.247551 -0.219779 -0.271531
+0.229869 -0.220412 -0.281822
+-0.260457 -0.219739 -0.277193
+0.246157 -0.237708 -0.271528
+0.227282 -0.239452 -0.281678
+-0.260457 -0.236686 -0.276016
+0.242552 -0.254345 -0.27208
+0.23099 -0.253632 -0.278325
+0.21967 -0.253161 -0.283503
+-0.243511 -0.253632 -0.284568
+-0.260457 -0.253632 -0.274839
+0.234368 -0.267846 -0.274634
+0.216012 -0.269476 -0.283355
+-0.243511 -0.270578 -0.283156
+-0.260457 -0.270578 -0.274369
+0.230788 -0.286167 -0.274322
+0.21381 -0.287068 -0.282916
+-0.243511 -0.287525 -0.282214
+-0.260457 -0.287525 -0.273819
+0.229041 -0.303674 -0.273552
+0.211685 -0.304444 -0.282615
+-0.243511 -0.304471 -0.281351
+-0.260457 -0.304471 -0.272643
+0.225396 -0.321159 -0.273278
+0.207606 -0.321391 -0.282615
+-0.243511 -0.321418 -0.279311
+-0.260457 -0.321418 -0.27021
+0.219154 -0.337772 -0.273797
+0.201648 -0.338301 -0.282628
+-0.226564 -0.338364 -0.284332
+-0.243511 -0.338364 -0.275781
+0.214172 -0.354876 -0.273184
+0.194919 -0.357461 -0.281941
+-0.226564 -0.355311 -0.280645
+-0.243511 -0.355311 -0.271701
+0.208891 -0.372136 -0.27247
+0.196895 -0.372257 -0.278291
+0.184865 -0.372395 -0.283237
+-0.209618 -0.372257 -0.284332
+-0.226564 -0.372257 -0.276252
+0.197864 -0.386987 -0.274328
+0.176921 -0.391525 -0.282041
+-0.209618 -0.389203 -0.280096
+-0.226564 -0.389203 -0.271701
+0.18929 -0.405838 -0.27343
+0.177365 -0.406654 -0.27819
+0.163621 -0.408588 -0.282302
+-0.192671 -0.40615 -0.282528
+-0.209618 -0.40615 -0.27531
+0.17644 -0.42105 -0.274002
+0.162714 -0.423183 -0.278498
+0.147915 -0.425082 -0.282545
+-0.175725 -0.423096 -0.283705
+-0.192671 -0.423096 -0.277507
+-0.209618 -0.423096 -0.270054
+0.160964 -0.437918 -0.274162
+0.146258 -0.440043 -0.278527
+0.131199 -0.44193 -0.282578
+-0.158899 -0.439787 -0.28409
+-0.175725 -0.440043 -0.278291
+-0.192671 -0.440043 -0.272015
+0.144133 -0.454865 -0.274278
+0.129311 -0.456989 -0.278527
+0.114318 -0.458827 -0.282438
+-0.142078 -0.455917 -0.283818
+-0.158738 -0.456761 -0.278451
+-0.175725 -0.456989 -0.272721
+0.127187 -0.471811 -0.274228
+0.11248 -0.473849 -0.278282
+0.097989 -0.475382 -0.28168
+-0.104437 -0.477438 -0.28572
+-0.122726 -0.471615 -0.283402
+-0.141701 -0.47324 -0.277981
+-0.158873 -0.473841 -0.27269
+0.110441 -0.488503 -0.273604
+0.096447 -0.490055 -0.277267
+0.083965 -0.489903 -0.28
+0.065956 -0.490157 -0.283144
+0.046446 -0.493018 -0.284631
+-0.09127 -0.490384 -0.283898
+-0.107733 -0.491111 -0.280015
+-0.125464 -0.490169 -0.27672
+-0.142585 -0.490129 -0.271842
+0.093675 -0.504817 -0.271647
+0.073448 -0.506512 -0.275585
+0.058496 -0.504578 -0.278847
+0.047695 -0.510724 -0.277943
+0.033142 -0.508159 -0.280148
+0.015308 -0.507429 -0.28176
+-0.002315 -0.507694 -0.282125
+-0.019441 -0.507829 -0.282293
+-0.036477 -0.507761 -0.28227
+-0.054024 -0.507116 -0.2821
+-0.074173 -0.504324 -0.281259
+-0.092893 -0.507104 -0.2772
+-0.111339 -0.509388 -0.272433
+-0.128969 -0.503907 -0.270333
+0.059182 -0.521715 -0.271464
+0.040605 -0.524666 -0.27247
+0.023607 -0.524829 -0.273416
+0.006382 -0.524708 -0.273932
+-0.010654 -0.524775 -0.274133
+-0.0276 -0.524775 -0.274133
+-0.044726 -0.524641 -0.274088
+-0.062592 -0.523968 -0.273438
+-0.080797 -0.523664 -0.271737
+-0.096041 -0.52194 -0.270163
+0.032277 0.081961 -0.287825
+0.017809 0.08428 -0.288275
+0.000469 0.084934 -0.288919
+-0.01693 0.085162 -0.28913
+-0.034477 0.084641 -0.288854
+0.06505 0.065761 -0.288424
+0.047509 0.07016 -0.289774
+-0.054235 0.082297 -0.287879
+-0.067756 0.067843 -0.291623
+0.099313 0.047648 -0.287846
+0.081407 0.053047 -0.289719
+0.029439 0.067962 -0.29299
+0.012282 0.067718 -0.294321
+-0.005386 0.067812 -0.295137
+-0.023202 0.06792 -0.295137
+-0.040472 0.067257 -0.294653
+-0.05394 0.064814 -0.294317
+-0.087751 0.065755 -0.288964
+-0.102665 0.050784 -0.291892
+0.113118 0.033704 -0.288789
+0.062431 0.051079 -0.293796
+0.043965 0.051252 -0.29605
+0.026118 0.051452 -0.297843
+0.008381 0.048695 -0.300488
+-0.011434 0.050637 -0.300743
+-0.029523 0.050681 -0.300522
+-0.046829 0.051175 -0.298993
+-0.060469 0.054585 -0.296468
+-0.073883 0.051187 -0.295958
+-0.088123 0.047378 -0.29535
+-0.122629 0.049032 -0.288206
+0.129405 0.017417 -0.289087
+0.096504 0.034063 -0.292675
+0.078925 0.034023 -0.295799
+0.059708 0.031322 -0.300077
+0.038774 0.034761 -0.301851
+0.023575 0.03745 -0.302684
+-0.05945 0.036808 -0.302121
+-0.079314 0.033754 -0.30066
+-0.096843 0.034045 -0.29799
+-0.11119 0.037359 -0.294645
+-0.122219 0.03163 -0.294129
+-0.138998 0.031509 -0.289938
+0.146258 0.000565 -0.288648
+0.11262 0.01739 -0.293393
+0.095607 0.017323 -0.29698
+0.078916 0.016287 -0.301185
+-0.111185 0.019835 -0.299561
+-0.127941 0.020405 -0.295762
+-0.138869 0.014548 -0.294823
+-0.155695 0.014543 -0.29023
+0.163204 -0.016382 -0.286922
+0.129311 0.000564 -0.293355
+0.112365 0.000564 -0.297356
+0.095539 0.000309 -0.301665
+-0.127593 0.003157 -0.300313
+-0.144795 0.003528 -0.296054
+-0.155723 -0.002329 -0.294869
+-0.171965 -0.001977 -0.290045
+0.146258 -0.016382 -0.292727
+0.129311 -0.016382 -0.296886
+0.112365 -0.016382 -0.301514
+-0.144244 -0.013641 -0.300421
+-0.161289 -0.013184 -0.295976
+-0.171692 -0.018571 -0.294486
+-0.185683 -0.016557 -0.289257
+0.180151 -0.050275 -0.287471
+0.163204 -0.033328 -0.290766
+0.146258 -0.033328 -0.295709
+0.129311 -0.033328 -0.300965
+-0.160182 -0.030186 -0.300038
+-0.17741 -0.029776 -0.29509
+-0.192996 -0.035614 -0.29074
+0.163204 -0.050275 -0.294139
+0.146258 -0.050275 -0.299082
+-0.173436 -0.047936 -0.299647
+-0.189532 -0.053203 -0.2955
+-0.203943 -0.051101 -0.289741
+0.197097 -0.084168 -0.286451
+0.180151 -0.067221 -0.291001
+0.163204 -0.067221 -0.296415
+0.146258 -0.067221 -0.302691
+-0.180389 -0.067094 -0.300779
+-0.195318 -0.064524 -0.295523
+-0.210312 -0.069683 -0.290799
+0.180151 -0.084168 -0.293669
+0.163204 -0.084168 -0.299318
+-0.191031 -0.082363 -0.299802
+-0.206393 -0.086987 -0.295464
+-0.220221 -0.084339 -0.289577
+0.197097 -0.101114 -0.288569
+0.180151 -0.101114 -0.295238
+0.163204 -0.101114 -0.302142
+-0.197095 -0.100701 -0.300576
+-0.211545 -0.097492 -0.29515
+-0.224416 -0.100097 -0.290022
+0.197097 -0.118061 -0.289824
+0.180151 -0.118061 -0.297121
+-0.206823 -0.114895 -0.298717
+-0.225641 -0.117415 -0.290811
+0.197097 -0.135007 -0.290923
+0.180151 -0.135007 -0.298847
+-0.209138 -0.134523 -0.299149
+-0.227044 -0.135491 -0.291169
+0.197097 -0.151953 -0.292335
+0.180151 -0.151953 -0.300259
+-0.209914 -0.152599 -0.299508
+-0.228693 -0.155239 -0.291415
+0.214044 -0.185846 -0.288177
+0.197097 -0.1689 -0.294296
+0.180151 -0.1689 -0.302142
+-0.209241 -0.170191 -0.30032
+-0.222061 -0.173403 -0.295635
+-0.237593 -0.169478 -0.288493
+0.19703 -0.185913 -0.296628
+-0.208667 -0.186747 -0.301015
+-0.224695 -0.186613 -0.295052
+-0.241991 -0.185483 -0.287466
+0.213618 -0.203062 -0.289735
+0.196044 -0.203398 -0.298141
+-0.209272 -0.202981 -0.301122
+-0.226089 -0.20282 -0.294846
+-0.243219 -0.202658 -0.287235
+0.211981 -0.220748 -0.290362
+0.193423 -0.22231 -0.298423
+-0.209618 -0.219739 -0.301122
+-0.226564 -0.219739 -0.29461
+-0.243511 -0.219739 -0.286765
+0.208417 -0.237156 -0.290497
+0.197097 -0.236686 -0.295473
+0.185535 -0.235973 -0.300046
+-0.209618 -0.236686 -0.300887
+-0.226564 -0.236686 -0.294139
+-0.243511 -0.236686 -0.285588
+0.200805 -0.250865 -0.291957
+0.181998 -0.252543 -0.299687
+-0.209618 -0.253632 -0.300181
+-0.226564 -0.253632 -0.292727
+0.198218 -0.269906 -0.291259
+0.180509 -0.270377 -0.299306
+-0.209618 -0.270578 -0.299239
+-0.226564 -0.270578 -0.29108
+0.196402 -0.287592 -0.291057
+0.179007 -0.288063 -0.299105
+-0.209618 -0.287525 -0.297591
+-0.226564 -0.287525 -0.29006
+0.194295 -0.304942 -0.290811
+0.176266 -0.306984 -0.298643
+-0.192671 -0.304471 -0.302613
+-0.209618 -0.304471 -0.295709
+-0.226564 -0.304471 -0.288805
+0.190661 -0.3216 -0.290391
+0.179541 -0.321591 -0.295416
+0.16749 -0.321358 -0.299873
+-0.192671 -0.321418 -0.300494
+-0.209618 -0.321418 -0.294139
+-0.226564 -0.321418 -0.286686
+0.181828 -0.336536 -0.291452
+0.160439 -0.340593 -0.298853
+-0.192671 -0.338364 -0.29767
+-0.209618 -0.338364 -0.291472
+0.175079 -0.355607 -0.290402
+0.162529 -0.356244 -0.295075
+0.147961 -0.358293 -0.299308
+-0.175725 -0.355311 -0.300808
+-0.192671 -0.355311 -0.294846
+-0.209618 -0.355311 -0.287706
+0.165123 -0.371091 -0.290827
+0.149305 -0.376153 -0.29504
+0.131754 -0.375115 -0.300137
+-0.158873 -0.372163 -0.303131
+-0.175725 -0.372257 -0.296886
+-0.192671 -0.372257 -0.291237
+0.157111 -0.389512 -0.289302
+0.142757 -0.387026 -0.294482
+0.132053 -0.392333 -0.295999
+0.115007 -0.391846 -0.300453
+-0.158899 -0.388948 -0.298919
+-0.175725 -0.389203 -0.293512
+-0.192671 -0.389203 -0.286765
+0.142591 -0.403666 -0.290141
+0.126256 -0.403256 -0.294869
+0.115328 -0.409113 -0.296054
+0.098127 -0.408743 -0.300313
+-0.142078 -0.405078 -0.300043
+-0.158738 -0.405921 -0.294456
+-0.175725 -0.40615 -0.288883
+0.126228 -0.420128 -0.290279
+0.109402 -0.420133 -0.294892
+0.098474 -0.42599 -0.295928
+0.081775 -0.425431 -0.299976
+-0.10458 -0.425657 -0.302352
+-0.122766 -0.420483 -0.300036
+-0.141701 -0.422401 -0.294692
+-0.158805 -0.422935 -0.289614
+0.109347 -0.437025 -0.290246
+0.092677 -0.436914 -0.294616
+0.08215 -0.442204 -0.295439
+0.067915 -0.440137 -0.2986
+0.047387 -0.442205 -0.301349
+-0.070666 -0.442357 -0.302458
+-0.088146 -0.438156 -0.301031
+-0.107074 -0.440055 -0.29689
+-0.125316 -0.439343 -0.293671
+-0.142451 -0.439155 -0.289215
+0.092669 -0.453687 -0.289732
+0.075925 -0.452925 -0.293809
+0.061873 -0.457068 -0.294749
+0.047556 -0.460934 -0.295462
+0.033354 -0.45677 -0.298461
+0.016478 -0.455689 -0.30049
+-0.000531 -0.456599 -0.300909
+-0.017648 -0.456922 -0.3011
+-0.035159 -0.456357 -0.300911
+-0.054963 -0.454153 -0.300446
+-0.073181 -0.45653 -0.29736
+-0.09084 -0.45703 -0.294859
+-0.110063 -0.459114 -0.290398
+-0.128533 -0.45318 -0.288178
+0.076249 -0.470763 -0.287812
+0.056079 -0.474349 -0.289929
+0.038944 -0.473949 -0.292335
+0.02485 -0.469647 -0.295156
+0.010829 -0.472635 -0.295155
+-0.006175 -0.473707 -0.295384
+-0.023386 -0.473801 -0.295429
+-0.041027 -0.473398 -0.295137
+-0.058718 -0.473169 -0.294276
+-0.075772 -0.473088 -0.292523
+-0.09163 -0.474039 -0.289231
+0.024943 -0.488031 -0.2884
+0.00501 -0.490227 -0.288933
+-0.012447 -0.490815 -0.289152
+-0.029573 -0.490815 -0.289174
+-0.046882 -0.490519 -0.288919
+-0.064268 -0.489524 -0.288161
+-0.078834 -0.486605 -0.287511
+0.014851 0.031384 -0.305182
+0.000257 0.033441 -0.305625
+-0.017414 0.033574 -0.305803
+0.066028 0.013008 -0.304705
+0.050578 0.016852 -0.305767
+0.030576 0.020024 -0.306802
+-0.037183 0.031514 -0.305307
+-0.049111 0.016771 -0.308082
+-0.067497 0.017104 -0.306307
+0.079422 -0.000337 -0.305686
+0.013079 0.017368 -0.309077
+-0.003804 0.017094 -0.3096
+-0.020687 0.016277 -0.309746
+-0.034025 0.013077 -0.309897
+-0.088399 0.01413 -0.304777
+0.095512 -0.016476 -0.306033
+0.063395 -0.000202 -0.308712
+0.046112 0.00078 -0.310138
+0.028287 0.000874 -0.311268
+0.010847 0.000538 -0.312097
+-0.006162 0.000309 -0.312375
+-0.022431 -0.000337 -0.312274
+-0.038346 -0.000269 -0.311848
+-0.055024 0.000215 -0.31112
+-0.072248 -0.00074 -0.310324
+-0.086382 -0.004584 -0.309795
+-0.104478 -0.003262 -0.306529
+0.112365 -0.033328 -0.305594
+0.078817 -0.01657 -0.30969
+0.061866 -0.016543 -0.311738
+0.044256 -0.016866 -0.313357
+0.026144 -0.016933 -0.314433
+0.008355 -0.016517 -0.314886
+-0.008677 -0.016476 -0.314931
+-0.025372 -0.01657 -0.314852
+-0.042099 -0.016476 -0.314617
+-0.058974 -0.016705 -0.314135
+-0.075534 -0.017404 -0.313294
+-0.091221 -0.017754 -0.31188
+-0.104054 -0.020681 -0.310653
+-0.121209 -0.019943 -0.306959
+0.129311 -0.050275 -0.304182
+0.095418 -0.033328 -0.309674
+0.078405 -0.033396 -0.312397
+0.061162 -0.034041 -0.314536
+0.04255 -0.03681 -0.317581
+0.022091 -0.034041 -0.318459
+0.004499 -0.033396 -0.318674
+-0.012537 -0.033328 -0.318696
+-0.029483 -0.033328 -0.318696
+-0.046609 -0.033463 -0.318528
+-0.064214 -0.03388 -0.31799
+-0.081954 -0.033096 -0.316055
+-0.095842 -0.030147 -0.313479
+-0.108123 -0.033467 -0.312247
+-0.120784 -0.037268 -0.310847
+-0.137561 -0.036417 -0.30687
+0.112365 -0.050275 -0.309125
+0.095418 -0.050275 -0.312184
+0.078431 -0.050504 -0.314854
+0.061902 -0.051566 -0.318266
+-0.095279 -0.047206 -0.317208
+-0.11204 -0.046335 -0.313842
+-0.124701 -0.050136 -0.312374
+-0.137252 -0.053537 -0.310498
+-0.152111 -0.050679 -0.306091
+0.146258 -0.084168 -0.304888
+0.129311 -0.067221 -0.307477
+0.112365 -0.067221 -0.3114
+0.095418 -0.067221 -0.314617
+0.078593 -0.067477 -0.318376
+-0.111247 -0.0637 -0.317642
+-0.128621 -0.062933 -0.313726
+-0.141805 -0.066425 -0.311574
+-0.160002 -0.069357 -0.307206
+0.129311 -0.084168 -0.310145
+0.112365 -0.084168 -0.313597
+0.095418 -0.084168 -0.317755
+-0.127149 -0.080369 -0.31741
+-0.144894 -0.080392 -0.312928
+-0.154962 -0.087042 -0.311487
+-0.170422 -0.084956 -0.30656
+0.163204 -0.118061 -0.303554
+0.146258 -0.101114 -0.307555
+0.129311 -0.101114 -0.311871
+0.112365 -0.101114 -0.316029
+-0.139558 -0.098398 -0.317186
+-0.158701 -0.101056 -0.312401
+-0.17718 -0.103449 -0.30738
+0.146258 -0.118061 -0.309438
+0.129311 -0.118061 -0.313518
+0.112365 -0.118061 -0.318304
+-0.146681 -0.117322 -0.318103
+-0.162142 -0.114951 -0.313274
+-0.171437 -0.120984 -0.311466
+-0.186446 -0.118267 -0.306227
+0.163204 -0.135007 -0.30528
+0.146258 -0.135007 -0.310694
+0.129311 -0.135007 -0.314852
+0.112365 -0.135007 -0.320187
+-0.155777 -0.132436 -0.317185
+-0.173511 -0.135015 -0.312052
+-0.191084 -0.134577 -0.306009
+0.163204 -0.151953 -0.306536
+0.146258 -0.151953 -0.311949
+0.129311 -0.151953 -0.3165
+-0.157832 -0.15151 -0.317889
+-0.175115 -0.151846 -0.312353
+-0.192447 -0.151886 -0.306121
+0.179859 -0.185981 -0.303509
+0.163204 -0.1689 -0.308262
+0.146258 -0.1689 -0.312891
+0.129311 -0.1689 -0.317912
+-0.158711 -0.168833 -0.318046
+-0.175725 -0.1689 -0.31242
+-0.192712 -0.169129 -0.306345
+0.162729 -0.185819 -0.30973
+0.145913 -0.185658 -0.313832
+0.129217 -0.185752 -0.318461
+-0.158778 -0.185846 -0.318069
+-0.175725 -0.185846 -0.31242
+-0.19255 -0.186102 -0.306636
+0.178416 -0.203075 -0.304854
+0.161335 -0.202026 -0.310243
+0.145307 -0.201892 -0.314132
+0.12919 -0.202537 -0.318562
+-0.158778 -0.202793 -0.318069
+-0.175725 -0.202793 -0.31242
+-0.192577 -0.202887 -0.306771
+0.173991 -0.218919 -0.305603
+0.158701 -0.215236 -0.310537
+0.145881 -0.218448 -0.313482
+0.129284 -0.219578 -0.318248
+-0.158778 -0.219739 -0.318069
+-0.175725 -0.219739 -0.31242
+-0.192671 -0.219739 -0.306771
+0.165368 -0.233204 -0.307124
+0.146486 -0.236107 -0.312711
+0.128764 -0.237237 -0.317912
+-0.158778 -0.236686 -0.317833
+-0.175725 -0.236686 -0.312184
+-0.192671 -0.236686 -0.306693
+0.163818 -0.253013 -0.306323
+0.146029 -0.25421 -0.312128
+0.127182 -0.256918 -0.31735
+-0.158778 -0.253632 -0.317362
+-0.175725 -0.253632 -0.311714
+-0.192671 -0.253632 -0.3063
+0.16294 -0.270874 -0.305919
+0.146159 -0.271843 -0.311335
+0.1334 -0.274855 -0.314303
+0.118121 -0.27113 -0.318732
+-0.158778 -0.270578 -0.31595
+-0.175725 -0.270578 -0.310929
+-0.192671 -0.270578 -0.305359
+0.16159 -0.288063 -0.305538
+0.145339 -0.287659 -0.310649
+0.130096 -0.287525 -0.314146
+0.113073 -0.287583 -0.31852
+-0.141832 -0.287525 -0.319481
+-0.158778 -0.287525 -0.313989
+-0.175725 -0.287525 -0.309752
+-0.192671 -0.287525 -0.303868
+0.156879 -0.30387 -0.30564
+0.141858 -0.300344 -0.310487
+0.128527 -0.303941 -0.31313
+0.10949 -0.307848 -0.317387
+-0.141832 -0.304471 -0.3165
+-0.158778 -0.304471 -0.312341
+-0.175725 -0.304471 -0.308026
+0.146606 -0.318498 -0.306814
+0.127644 -0.321425 -0.31157
+0.114668 -0.325565 -0.313703
+0.097399 -0.325381 -0.317647
+-0.124885 -0.321418 -0.31799
+-0.141832 -0.321418 -0.313911
+-0.158778 -0.321418 -0.310615
+-0.175725 -0.321418 -0.306065
+0.139205 -0.337728 -0.305842
+0.124263 -0.334989 -0.310498
+0.111827 -0.33856 -0.312354
+0.099197 -0.342442 -0.313946
+0.08178 -0.341886 -0.317642
+-0.10806 -0.338109 -0.318376
+-0.124885 -0.338364 -0.314695
+-0.141832 -0.338364 -0.311949
+-0.158778 -0.338364 -0.308889
+-0.175725 -0.338364 -0.303868
+0.12509 -0.352173 -0.306771
+0.108264 -0.351371 -0.310847
+0.095418 -0.355311 -0.31242
+0.082573 -0.35925 -0.313842
+0.065813 -0.358379 -0.317208
+-0.091369 -0.354019 -0.318266
+-0.107899 -0.355082 -0.314854
+-0.124885 -0.355311 -0.312734
+-0.141832 -0.355311 -0.310302
+-0.158778 -0.355311 -0.306065
+0.108688 -0.368696 -0.307008
+0.091409 -0.368248 -0.31087
+0.078656 -0.372119 -0.312247
+0.066375 -0.375438 -0.313479
+0.052398 -0.372557 -0.3161
+0.034128 -0.372226 -0.318216
+0.013495 -0.37412 -0.319158
+-0.018118 -0.374763 -0.319113
+-0.033523 -0.37293 -0.318903
+-0.051442 -0.371773 -0.318535
+-0.072017 -0.368776 -0.317581
+-0.090629 -0.371544 -0.314536
+-0.107939 -0.372257 -0.312812
+-0.125114 -0.372297 -0.310786
+-0.142087 -0.372136 -0.30775
+0.091808 -0.385593 -0.306975
+0.074587 -0.384904 -0.310653
+0.061754 -0.387832 -0.31188
+0.045982 -0.38841 -0.313462
+0.029452 -0.389805 -0.314481
+0.015586 -0.392673 -0.314679
+-0.001911 -0.386998 -0.31626
+-0.020482 -0.389355 -0.315287
+-0.03779 -0.389257 -0.315038
+-0.055544 -0.388585 -0.314567
+-0.073499 -0.388652 -0.313648
+-0.091221 -0.389244 -0.31212
+-0.108755 -0.389482 -0.310394
+-0.126038 -0.388877 -0.308294
+-0.142585 -0.38845 -0.303994
+0.074945 -0.402373 -0.306619
+0.056823 -0.401071 -0.310016
+0.042704 -0.404903 -0.310822
+0.026489 -0.405841 -0.31188
+0.010793 -0.405522 -0.312573
+-0.005884 -0.405629 -0.312763
+-0.023135 -0.40611 -0.312586
+-0.040243 -0.406083 -0.312398
+-0.057508 -0.406056 -0.311918
+-0.074952 -0.406361 -0.310764
+-0.092513 -0.406444 -0.309379
+-0.11094 -0.407859 -0.306184
+-0.12871 -0.402325 -0.304272
+0.058557 -0.420031 -0.305172
+0.037272 -0.421805 -0.307757
+0.021919 -0.418727 -0.309924
+0.008395 -0.421822 -0.30988
+-0.008618 -0.4228 -0.309887
+-0.025717 -0.423096 -0.309909
+-0.042695 -0.422908 -0.30969
+-0.059516 -0.422815 -0.309031
+-0.077177 -0.424972 -0.306455
+-0.094529 -0.420519 -0.305347
+0.02459 -0.436912 -0.30511
+0.004916 -0.439293 -0.305879
+-0.012447 -0.439976 -0.306099
+-0.0296 -0.439814 -0.306067
+-0.04676 -0.439093 -0.30567
+-0.061421 -0.436707 -0.305094
+0.049189 -0.054858 -0.321625
+0.034286 -0.051566 -0.322502
+0.017079 -0.050503 -0.323014
+1.6e-05 -0.050275 -0.32309
+-0.01693 -0.050275 -0.32309
+-0.033966 -0.050342 -0.323045
+-0.0515 -0.050988 -0.32272
+0.062476 -0.068122 -0.322554
+-0.071971 -0.053541 -0.321646
+0.078566 -0.084262 -0.322274
+0.046628 -0.068122 -0.325614
+0.030107 -0.067477 -0.326614
+0.013197 -0.067221 -0.326856
+-0.00375 -0.067221 -0.326856
+-0.020696 -0.067221 -0.326856
+-0.037728 -0.06745 -0.326766
+-0.054764 -0.068593 -0.326519
+-0.068758 -0.072483 -0.326365
+-0.087292 -0.071037 -0.323391
+0.095418 -0.101114 -0.320658
+0.061871 -0.084356 -0.326322
+0.045144 -0.084262 -0.328237
+0.02826 -0.084168 -0.328739
+0.011314 -0.084168 -0.328739
+-0.005633 -0.084168 -0.328739
+-0.022579 -0.084168 -0.328739
+-0.039427 -0.084423 -0.328694
+-0.055799 -0.085311 -0.32847
+-0.07184 -0.086373 -0.327775
+-0.085429 -0.08957 -0.327014
+-0.103394 -0.087531 -0.323652
+0.078472 -0.101114 -0.3256
+0.061526 -0.101114 -0.328268
+0.044579 -0.101114 -0.329366
+0.027633 -0.101114 -0.329366
+0.010686 -0.101114 -0.329366
+-0.00626 -0.101114 -0.329366
+-0.023207 -0.101114 -0.329366
+-0.040059 -0.101208 -0.329366
+-0.056656 -0.101558 -0.329232
+-0.072809 -0.102351 -0.328775
+-0.088602 -0.103181 -0.327868
+-0.101897 -0.105838 -0.326734
+-0.117792 -0.101829 -0.323019
+0.095418 -0.118061 -0.323011
+0.078472 -0.118061 -0.327248
+0.061526 -0.118061 -0.329053
+0.044579 -0.118061 -0.329366
+0.027633 -0.118061 -0.329366
+0.010686 -0.118061 -0.329366
+-0.00626 -0.118061 -0.329366
+-0.023207 -0.118061 -0.329366
+-0.040153 -0.118061 -0.329366
+-0.057005 -0.118155 -0.329366
+-0.073602 -0.118504 -0.329232
+-0.089719 -0.119123 -0.328591
+-0.106079 -0.119482 -0.327114
+-0.125357 -0.120989 -0.323725
+0.112365 -0.151953 -0.321364
+0.095418 -0.135007 -0.324894
+0.078472 -0.135007 -0.328033
+0.061525 -0.135007 -0.329288
+0.044579 -0.135007 -0.329366
+0.027633 -0.135007 -0.329366
+0.010686 -0.135007 -0.329366
+-0.00626 -0.135007 -0.329366
+-0.023207 -0.135007 -0.329366
+-0.040153 -0.135007 -0.329366
+-0.0571 -0.135007 -0.329366
+-0.073952 -0.135101 -0.329366
+-0.090688 -0.135424 -0.32894
+-0.107119 -0.136335 -0.327899
+-0.120152 -0.139441 -0.326707
+-0.135574 -0.135541 -0.32299
+0.095418 -0.151953 -0.32615
+0.078472 -0.151953 -0.328503
+0.061525 -0.151953 -0.329366
+0.044579 -0.151953 -0.329366
+0.027633 -0.151953 -0.329366
+0.010686 -0.151953 -0.329366
+-0.00626 -0.151953 -0.329366
+-0.023207 -0.151953 -0.329366
+-0.040153 -0.151953 -0.329366
+-0.0571 -0.151953 -0.329366
+-0.074046 -0.151953 -0.329366
+-0.090871 -0.152209 -0.329232
+-0.106988 -0.152855 -0.328568
+-0.123016 -0.15272 -0.326797
+-0.140231 -0.151671 -0.322933
+0.112365 -0.1689 -0.322541
+0.095418 -0.1689 -0.32662
+0.078472 -0.1689 -0.328739
+0.061525 -0.1689 -0.329366
+0.044579 -0.1689 -0.329366
+0.027633 -0.1689 -0.329366
+0.010686 -0.1689 -0.329366
+-0.00626 -0.1689 -0.329366
+-0.023207 -0.1689 -0.329366
+-0.040153 -0.1689 -0.329366
+-0.0571 -0.1689 -0.329366
+-0.074046 -0.1689 -0.329366
+-0.090898 -0.168994 -0.329366
+-0.107594 -0.169088 -0.328739
+-0.12441 -0.168927 -0.326833
+-0.14154 -0.168765 -0.323045
+0.112365 -0.185846 -0.323011
+0.095418 -0.185846 -0.326856
+0.078472 -0.185846 -0.328739
+0.061525 -0.185846 -0.329366
+0.044579 -0.185846 -0.329366
+0.027633 -0.185846 -0.329366
+0.010686 -0.185846 -0.329366
+-0.00626 -0.185846 -0.329366
+-0.023207 -0.185846 -0.329366
+-0.040153 -0.185846 -0.329366
+-0.0571 -0.185846 -0.329366
+-0.074046 -0.185846 -0.329366
+-0.090992 -0.185846 -0.329366
+-0.107939 -0.185846 -0.328739
+-0.124885 -0.185846 -0.326856
+-0.141832 -0.185846 -0.32309
+0.112365 -0.202793 -0.32309
+0.095418 -0.202793 -0.326856
+0.078472 -0.202793 -0.328739
+0.061525 -0.202793 -0.329366
+0.044579 -0.202793 -0.329366
+0.027633 -0.202793 -0.329366
+0.010686 -0.202793 -0.329366
+-0.00626 -0.202793 -0.329366
+-0.023207 -0.202793 -0.329366
+-0.040153 -0.202793 -0.329366
+-0.0571 -0.202793 -0.329366
+-0.074046 -0.202793 -0.329366
+-0.090992 -0.202793 -0.329366
+-0.107939 -0.202793 -0.328739
+-0.124885 -0.202793 -0.326856
+-0.141832 -0.202793 -0.32309
+0.112073 -0.219874 -0.323045
+0.094943 -0.219712 -0.326833
+0.078127 -0.219551 -0.328739
+0.061431 -0.219645 -0.329366
+0.044579 -0.219739 -0.329366
+0.027633 -0.219739 -0.329366
+0.010686 -0.219739 -0.329366
+-0.00626 -0.219739 -0.329366
+-0.023207 -0.219739 -0.329366
+-0.040153 -0.219739 -0.329366
+-0.0571 -0.219739 -0.329366
+-0.074046 -0.219739 -0.329366
+-0.090992 -0.219739 -0.329366
+-0.107939 -0.219739 -0.328739
+-0.124885 -0.219739 -0.326856
+-0.141832 -0.219739 -0.32309
+0.110845 -0.237049 -0.322933
+0.093549 -0.235919 -0.326797
+0.077522 -0.235784 -0.328568
+0.061404 -0.23643 -0.329232
+0.044579 -0.236686 -0.329366
+0.027633 -0.236686 -0.329366
+0.010686 -0.236686 -0.329366
+-0.00626 -0.236686 -0.329366
+-0.023207 -0.236686 -0.329366
+-0.040153 -0.236686 -0.329366
+-0.0571 -0.236686 -0.329366
+-0.074046 -0.236686 -0.329366
+-0.090992 -0.236686 -0.329366
+-0.107939 -0.236686 -0.328739
+-0.124885 -0.236686 -0.326856
+-0.141832 -0.236686 -0.323011
+0.106447 -0.253054 -0.323031
+0.090916 -0.249129 -0.32673
+0.078095 -0.252341 -0.327918
+0.061566 -0.253403 -0.32894
+0.044579 -0.253632 -0.329366
+0.027633 -0.253632 -0.329366
+0.010686 -0.253632 -0.329366
+-0.00626 -0.253632 -0.329366
+-0.023207 -0.253632 -0.329366
+-0.040153 -0.253632 -0.329366
+-0.0571 -0.253632 -0.329366
+-0.074046 -0.253632 -0.329366
+-0.090992 -0.253632 -0.329366
+-0.107939 -0.253632 -0.328739
+-0.124885 -0.253632 -0.32662
+-0.141832 -0.253632 -0.322541
+0.097297 -0.267408 -0.32386
+0.07836 -0.269839 -0.32717
+0.061248 -0.270323 -0.328761
+0.044485 -0.270484 -0.329366
+0.027633 -0.270578 -0.329366
+0.010686 -0.270578 -0.329366
+-0.00626 -0.270578 -0.329366
+-0.023207 -0.270578 -0.329366
+-0.040153 -0.270578 -0.329366
+-0.0571 -0.270578 -0.329366
+-0.074046 -0.270578 -0.329366
+-0.090992 -0.270578 -0.329366
+-0.107939 -0.270578 -0.328503
+-0.124885 -0.270578 -0.326071
+-0.141832 -0.270578 -0.321128
+0.094212 -0.287394 -0.323071
+0.076351 -0.286691 -0.32682
+0.060185 -0.28653 -0.328568
+0.044135 -0.287081 -0.329232
+0.027538 -0.287431 -0.329366
+0.010686 -0.287525 -0.329366
+-0.00626 -0.287525 -0.329366
+-0.023207 -0.287525 -0.329366
+-0.040153 -0.287525 -0.329366
+-0.0571 -0.287525 -0.329366
+-0.074046 -0.287525 -0.329366
+-0.090992 -0.287525 -0.329288
+-0.107939 -0.287525 -0.327719
+-0.124885 -0.287525 -0.324188
+0.087859 -0.304389 -0.322862
+0.072268 -0.299909 -0.32668
+0.059135 -0.302404 -0.327868
+0.043342 -0.303234 -0.328775
+0.027189 -0.304027 -0.329232
+0.010592 -0.304377 -0.329366
+-0.00626 -0.304471 -0.329366
+-0.023207 -0.304471 -0.329366
+-0.040153 -0.304471 -0.329366
+-0.0571 -0.304471 -0.329366
+-0.074046 -0.304471 -0.329366
+-0.090993 -0.304471 -0.328503
+-0.107939 -0.304471 -0.326071
+-0.124885 -0.304471 -0.321128
+0.073869 -0.318112 -0.323632
+0.055962 -0.316016 -0.327014
+0.042373 -0.319212 -0.327775
+0.026333 -0.320275 -0.32847
+0.00996 -0.321162 -0.328772
+-0.006825 -0.321324 -0.329053
+-0.023619 -0.321297 -0.329153
+-0.040539 -0.321458 -0.32894
+-0.057638 -0.321485 -0.328761
+-0.074611 -0.321324 -0.328237
+-0.091338 -0.321229 -0.326401
+-0.108033 -0.321324 -0.322509
+0.057825 -0.334548 -0.323391
+0.039291 -0.333103 -0.326365
+0.025207 -0.33706 -0.326721
+0.00805 -0.337925 -0.327405
+-0.008695 -0.337481 -0.327797
+-0.024919 -0.337934 -0.327611
+-0.041884 -0.338674 -0.327152
+-0.059395 -0.338243 -0.326658
+-0.076095 -0.337463 -0.325614
+-0.091943 -0.337463 -0.322554
+0.042351 -0.35216 -0.321791
+0.021226 -0.354773 -0.323181
+0.003015 -0.353962 -0.324658
+-0.012087 -0.350829 -0.325899
+-0.026004 -0.356959 -0.323581
+-0.045892 -0.35558 -0.323184
+-0.063663 -0.354087 -0.322525
+-0.078657 -0.350727 -0.321625
+-0.00684 -0.366371 -0.321337
+3 19 0 2
+3 0 1 2
+3 2 1 3
+3 21 19 4
+3 19 2 4
+3 4 2 5
+3 2 3 5
+3 24 21 6
+3 21 4 6
+3 6 4 7
+3 4 5 7
+3 7 5 8
+3 26 24 27
+3 24 6 27
+3 27 6 9
+3 6 7 9
+3 9 7 10
+3 7 8 10
+3 9 30 27
+3 30 9 31
+3 9 10 31
+3 168 11 13
+3 11 12 13
+3 13 12 14
+3 16 15 168
+3 16 13 0
+3 168 13 16
+3 14 1 0
+3 13 14 0
+3 1 14 17
+3 169 15 18
+3 15 16 18
+3 19 18 16
+3 0 19 16
+3 17 3 1
+3 170 3 17
+3 171 169 20
+3 169 18 20
+3 21 20 18
+3 19 21 18
+3 5 170 22
+3 3 170 5
+3 172 171 23
+3 171 20 23
+3 24 23 20
+3 21 24 20
+3 22 8 5
+3 173 8 22
+3 174 172 25
+3 172 23 25
+3 26 25 23
+3 24 26 23
+3 10 8 175
+3 8 173 175
+3 25 178 174
+3 28 25 26
+3 178 25 28
+3 27 29 28
+3 26 27 28
+3 29 27 30
+3 31 175 32
+3 10 175 31
+3 28 180 178
+3 180 28 181
+3 28 29 181
+3 182 29 30
+3 181 29 182
+3 31 183 182
+3 30 31 182
+3 32 183 31
+3 184 183 32
+3 41 40 33
+3 41 33 42
+3 33 34 42
+3 42 34 43
+3 34 35 43
+3 43 35 44
+3 35 36 44
+3 44 36 45
+3 36 37 45
+3 45 37 46
+3 37 38 46
+3 46 38 47
+3 268 39 48
+3 39 40 48
+3 48 40 49
+3 40 41 49
+3 49 41 50
+3 41 42 50
+3 50 42 51
+3 42 43 51
+3 51 43 52
+3 43 44 52
+3 52 44 53
+3 44 45 53
+3 53 45 54
+3 45 46 54
+3 54 46 55
+3 46 47 55
+3 278 268 56
+3 268 48 56
+3 56 48 57
+3 48 49 57
+3 57 49 58
+3 49 50 58
+3 58 50 59
+3 50 51 59
+3 59 51 60
+3 51 52 60
+3 60 52 61
+3 52 53 61
+3 61 53 62
+3 53 54 62
+3 62 54 63
+3 54 55 63
+3 63 55 64
+3 66 65 278
+3 66 278 67
+3 278 56 67
+3 67 56 68
+3 56 57 68
+3 68 57 69
+3 57 58 69
+3 69 58 70
+3 58 59 70
+3 70 59 71
+3 59 60 71
+3 71 60 72
+3 60 61 72
+3 72 61 73
+3 61 62 73
+3 73 62 74
+3 62 63 74
+3 74 63 75
+3 63 64 75
+3 293 65 76
+3 65 66 76
+3 76 66 77
+3 66 67 77
+3 77 67 78
+3 67 68 78
+3 78 68 79
+3 68 69 79
+3 79 69 80
+3 69 70 80
+3 80 70 81
+3 70 71 81
+3 81 71 82
+3 71 72 82
+3 82 72 83
+3 72 73 83
+3 83 73 84
+3 73 74 84
+3 84 74 85
+3 74 75 85
+3 85 75 86
+3 301 293 87
+3 293 76 87
+3 87 76 88
+3 76 77 88
+3 88 77 89
+3 77 78 89
+3 89 78 90
+3 78 79 90
+3 90 79 91
+3 79 80 91
+3 91 80 92
+3 80 81 92
+3 92 81 93
+3 81 82 93
+3 93 82 94
+3 82 83 94
+3 94 83 95
+3 83 84 95
+3 95 84 96
+3 84 85 96
+3 96 85 97
+3 85 86 97
+3 309 301 98
+3 301 87 98
+3 98 87 99
+3 87 88 99
+3 99 88 100
+3 88 89 100
+3 100 89 101
+3 89 90 101
+3 101 90 102
+3 90 91 102
+3 102 91 103
+3 91 92 103
+3 103 92 104
+3 92 93 104
+3 104 93 105
+3 93 94 105
+3 105 94 106
+3 94 95 106
+3 106 95 107
+3 95 96 107
+3 107 96 108
+3 96 97 108
+3 317 309 109
+3 309 98 109
+3 109 98 110
+3 98 99 110
+3 110 99 111
+3 99 100 111
+3 111 100 112
+3 100 101 112
+3 112 101 113
+3 101 102 113
+3 113 102 114
+3 102 103 114
+3 114 103 115
+3 103 104 115
+3 115 104 116
+3 104 105 116
+3 116 105 117
+3 105 106 117
+3 117 106 118
+3 106 107 118
+3 118 107 119
+3 107 108 119
+3 325 317 120
+3 317 109 120
+3 120 109 121
+3 109 110 121
+3 121 110 122
+3 110 111 122
+3 122 111 123
+3 111 112 123
+3 123 112 124
+3 112 113 124
+3 124 113 125
+3 113 114 125
+3 125 114 126
+3 114 115 126
+3 126 115 127
+3 115 116 127
+3 127 116 128
+3 116 117 128
+3 128 117 129
+3 117 118 129
+3 129 118 326
+3 118 119 326
+3 333 325 130
+3 325 120 130
+3 130 120 131
+3 120 121 131
+3 131 121 132
+3 121 122 132
+3 132 122 133
+3 122 123 133
+3 133 123 134
+3 123 124 134
+3 134 124 135
+3 124 125 135
+3 135 125 136
+3 125 126 136
+3 136 126 137
+3 126 127 137
+3 137 127 138
+3 127 128 138
+3 138 128 139
+3 128 129 139
+3 129 326 139
+3 130 342 333
+3 342 130 140
+3 130 131 140
+3 140 131 141
+3 131 132 141
+3 141 132 142
+3 132 133 142
+3 142 133 143
+3 133 134 143
+3 143 134 144
+3 134 135 144
+3 144 135 145
+3 135 136 145
+3 145 136 146
+3 136 137 146
+3 146 137 147
+3 137 138 147
+3 147 138 343
+3 138 139 343
+3 352 342 148
+3 342 140 148
+3 148 140 149
+3 140 141 149
+3 149 141 150
+3 141 142 150
+3 150 142 151
+3 142 143 151
+3 151 143 152
+3 143 144 152
+3 152 144 153
+3 144 145 153
+3 153 145 154
+3 145 146 154
+3 154 146 155
+3 146 147 155
+3 147 343 155
+3 361 352 362
+3 352 148 362
+3 362 148 156
+3 148 149 156
+3 156 149 157
+3 149 150 157
+3 157 150 158
+3 150 151 158
+3 158 151 159
+3 151 152 159
+3 159 152 160
+3 152 153 160
+3 160 153 161
+3 153 154 161
+3 161 154 363
+3 154 155 363
+3 156 373 362
+3 373 156 374
+3 156 157 374
+3 374 157 375
+3 157 158 375
+3 375 158 376
+3 158 159 376
+3 376 159 377
+3 159 160 377
+3 377 160 378
+3 160 161 378
+3 161 363 378
+3 11 164 162
+3 163 12 11
+3 162 163 11
+3 12 163 165
+3 167 166 164
+3 168 167 164
+3 11 168 164
+3 165 14 12
+3 434 14 165
+3 436 167 15
+3 166 167 436
+3 15 167 168
+3 434 437 17
+3 14 434 17
+3 169 438 436
+3 15 169 436
+3 170 17 439
+3 17 437 439
+3 171 442 438
+3 169 171 438
+3 439 443 22
+3 170 439 22
+3 172 445 442
+3 171 172 442
+3 173 22 446
+3 22 443 446
+3 174 448 445
+3 172 174 445
+3 175 446 176
+3 173 446 175
+3 177 448 174
+3 450 448 177
+3 177 174 178
+3 176 32 175
+3 451 32 176
+3 177 453 450
+3 179 177 178
+3 453 177 179
+3 179 178 180
+3 184 32 454
+3 32 451 454
+3 179 456 453
+3 457 179 180
+3 456 179 457
+3 181 458 457
+3 180 181 457
+3 182 459 458
+3 181 182 458
+3 183 460 459
+3 182 183 459
+3 184 461 460
+3 183 184 460
+3 454 461 184
+3 193 192 185
+3 193 185 194
+3 185 186 194
+3 194 186 195
+3 186 187 195
+3 195 187 196
+3 187 188 196
+3 196 188 197
+3 188 189 197
+3 197 189 198
+3 189 190 198
+3 198 190 199
+3 190 191 199
+3 199 191 200
+3 203 202 192
+3 203 192 204
+3 192 193 204
+3 204 193 205
+3 193 194 205
+3 205 194 206
+3 194 195 206
+3 206 195 207
+3 195 196 207
+3 207 196 208
+3 196 197 208
+3 208 197 209
+3 197 198 209
+3 209 198 210
+3 198 199 210
+3 210 199 211
+3 199 200 211
+3 211 200 212
+3 200 201 212
+3 212 201 213
+3 215 214 202
+3 215 202 216
+3 202 203 216
+3 216 203 217
+3 203 204 217
+3 217 204 218
+3 204 205 218
+3 218 205 219
+3 205 206 219
+3 219 206 220
+3 206 207 220
+3 220 207 221
+3 207 208 221
+3 221 208 222
+3 208 209 222
+3 222 209 223
+3 209 210 223
+3 223 210 224
+3 210 211 224
+3 224 211 225
+3 211 212 225
+3 225 212 226
+3 212 213 226
+3 226 213 227
+3 229 228 214
+3 229 214 230
+3 214 215 230
+3 230 215 231
+3 215 216 231
+3 231 216 232
+3 216 217 232
+3 232 217 233
+3 217 218 233
+3 233 218 234
+3 218 219 234
+3 234 219 235
+3 219 220 235
+3 235 220 236
+3 220 221 236
+3 236 221 237
+3 221 222 237
+3 237 222 238
+3 222 223 238
+3 238 223 239
+3 223 224 239
+3 239 224 240
+3 224 225 240
+3 240 225 241
+3 225 226 241
+3 241 226 242
+3 226 227 242
+3 242 227 243
+3 245 244 228
+3 245 228 246
+3 228 229 246
+3 246 229 247
+3 229 230 247
+3 247 230 248
+3 230 231 248
+3 248 231 249
+3 231 232 249
+3 249 233 33
+3 232 233 249
+3 234 34 33
+3 233 234 33
+3 235 35 34
+3 234 235 34
+3 236 36 35
+3 235 236 35
+3 237 37 36
+3 236 237 36
+3 238 38 37
+3 237 238 37
+3 238 250 38
+3 239 250 238
+3 250 239 251
+3 239 240 251
+3 251 240 252
+3 240 241 252
+3 252 241 253
+3 241 242 253
+3 253 242 254
+3 242 243 254
+3 544 244 255
+3 244 245 255
+3 255 245 256
+3 245 246 256
+3 256 246 257
+3 246 247 257
+3 257 248 39
+3 247 248 257
+3 249 40 39
+3 248 249 39
+3 40 249 33
+3 250 47 38
+3 250 258 47
+3 251 258 250
+3 258 251 259
+3 251 252 259
+3 259 252 260
+3 252 253 260
+3 260 253 261
+3 253 254 261
+3 261 254 262
+3 264 263 544
+3 264 544 265
+3 544 255 265
+3 265 255 266
+3 255 256 266
+3 266 256 267
+3 256 257 267
+3 268 267 257
+3 39 268 257
+3 47 258 269
+3 55 47 269
+3 269 258 270
+3 258 259 270
+3 270 259 271
+3 259 260 271
+3 271 260 272
+3 260 261 272
+3 272 261 273
+3 261 262 273
+3 555 263 274
+3 263 264 274
+3 274 264 275
+3 264 265 275
+3 275 265 276
+3 265 266 276
+3 276 266 277
+3 266 267 277
+3 278 277 267
+3 268 278 267
+3 269 64 55
+3 269 279 64
+3 270 279 269
+3 279 270 280
+3 270 271 280
+3 280 271 281
+3 271 272 281
+3 281 272 282
+3 272 273 282
+3 561 555 283
+3 555 274 283
+3 283 274 284
+3 274 275 284
+3 284 275 285
+3 275 276 285
+3 285 277 65
+3 276 277 285
+3 65 277 278
+3 64 279 286
+3 75 64 286
+3 286 279 287
+3 279 280 287
+3 287 280 288
+3 280 281 288
+3 288 281 289
+3 281 282 289
+3 567 561 290
+3 561 283 290
+3 290 283 291
+3 283 284 291
+3 291 284 292
+3 284 285 292
+3 293 292 285
+3 65 293 285
+3 286 86 75
+3 286 294 86
+3 287 294 286
+3 294 287 295
+3 287 288 295
+3 295 288 296
+3 288 289 296
+3 296 289 297
+3 572 567 298
+3 567 290 298
+3 298 290 299
+3 290 291 299
+3 299 291 300
+3 291 292 300
+3 301 300 292
+3 293 301 292
+3 86 294 302
+3 97 86 302
+3 302 294 303
+3 294 295 303
+3 303 295 304
+3 295 296 304
+3 304 296 305
+3 296 297 305
+3 577 572 306
+3 572 298 306
+3 306 298 307
+3 298 299 307
+3 307 299 308
+3 299 300 308
+3 309 308 300
+3 301 309 300
+3 97 302 310
+3 108 97 310
+3 310 302 311
+3 302 303 311
+3 311 303 312
+3 303 304 312
+3 312 304 313
+3 304 305 313
+3 582 577 314
+3 577 306 314
+3 314 306 315
+3 306 307 315
+3 315 307 316
+3 307 308 316
+3 317 316 308
+3 309 317 308
+3 108 310 318
+3 119 108 318
+3 318 310 319
+3 310 311 319
+3 319 311 320
+3 311 312 320
+3 320 312 321
+3 312 313 321
+3 587 582 322
+3 582 314 322
+3 322 314 323
+3 314 315 323
+3 323 315 324
+3 315 316 324
+3 325 324 316
+3 317 325 316
+3 119 318 327
+3 326 119 327
+3 327 318 328
+3 318 319 328
+3 328 319 329
+3 319 320 329
+3 329 320 588
+3 320 321 588
+3 593 587 330
+3 587 322 330
+3 330 322 331
+3 322 323 331
+3 331 323 332
+3 323 324 332
+3 333 332 324
+3 325 333 324
+3 326 334 139
+3 327 334 326
+3 335 334 327
+3 335 327 336
+3 327 328 336
+3 336 328 337
+3 328 329 337
+3 329 588 337
+3 599 593 338
+3 593 330 338
+3 338 330 339
+3 330 331 339
+3 339 331 340
+3 331 332 340
+3 341 332 333
+3 340 332 341
+3 341 333 342
+3 139 334 344
+3 343 139 344
+3 344 334 345
+3 334 335 345
+3 345 335 346
+3 335 336 346
+3 346 336 347
+3 336 337 347
+3 604 599 348
+3 599 338 348
+3 348 338 349
+3 338 339 349
+3 349 339 350
+3 339 340 350
+3 350 340 351
+3 340 341 351
+3 352 351 341
+3 342 352 341
+3 343 353 155
+3 344 353 343
+3 354 353 344
+3 354 344 355
+3 344 345 355
+3 355 345 356
+3 345 346 356
+3 356 346 357
+3 346 347 357
+3 348 610 604
+3 610 348 358
+3 348 349 358
+3 358 349 359
+3 349 350 359
+3 359 350 360
+3 350 351 360
+3 361 360 351
+3 352 361 351
+3 155 353 364
+3 363 155 364
+3 364 353 365
+3 353 354 365
+3 365 354 366
+3 354 355 366
+3 366 355 367
+3 355 356 367
+3 367 356 611
+3 356 357 611
+3 617 610 368
+3 610 358 368
+3 368 358 369
+3 358 359 369
+3 369 359 370
+3 359 360 370
+3 371 360 361
+3 370 360 371
+3 362 372 371
+3 361 362 371
+3 372 362 373
+3 363 379 378
+3 364 379 363
+3 380 379 364
+3 380 364 381
+3 364 365 381
+3 381 365 382
+3 365 366 382
+3 382 366 383
+3 366 367 383
+3 367 611 383
+3 622 617 384
+3 617 368 384
+3 384 368 385
+3 368 369 385
+3 385 369 386
+3 369 370 386
+3 386 370 387
+3 370 371 387
+3 387 371 388
+3 371 372 388
+3 389 372 373
+3 388 372 389
+3 374 390 389
+3 373 374 389
+3 375 391 390
+3 374 375 390
+3 376 392 391
+3 375 376 391
+3 377 393 392
+3 376 377 392
+3 378 394 393
+3 377 378 393
+3 379 394 378
+3 395 394 379
+3 395 379 396
+3 379 380 396
+3 396 380 397
+3 380 381 397
+3 397 381 398
+3 381 382 398
+3 398 382 623
+3 382 383 623
+3 384 630 622
+3 630 384 399
+3 384 385 399
+3 399 385 400
+3 385 386 400
+3 400 386 401
+3 386 387 401
+3 401 387 402
+3 387 388 402
+3 402 388 403
+3 388 389 403
+3 403 389 404
+3 389 390 404
+3 404 390 405
+3 390 391 405
+3 405 391 406
+3 391 392 406
+3 406 392 407
+3 392 393 407
+3 407 393 408
+3 393 394 408
+3 408 394 409
+3 394 395 409
+3 409 395 410
+3 395 396 410
+3 410 396 411
+3 396 397 411
+3 411 397 631
+3 397 398 631
+3 398 623 631
+3 399 637 630
+3 637 399 638
+3 399 400 638
+3 638 400 415
+3 400 401 415
+3 415 401 416
+3 401 402 416
+3 416 402 417
+3 402 403 417
+3 417 403 418
+3 403 404 418
+3 418 404 419
+3 404 405 419
+3 419 405 420
+3 405 406 420
+3 420 406 421
+3 406 407 421
+3 421 407 422
+3 407 408 422
+3 422 408 423
+3 408 409 423
+3 423 409 424
+3 409 410 424
+3 424 410 639
+3 410 411 639
+3 411 631 639
+3 644 413 162
+3 412 413 644
+3 414 163 162
+3 413 414 162
+3 645 163 414
+3 415 651 638
+3 651 415 425
+3 415 416 425
+3 425 416 426
+3 416 417 426
+3 426 417 427
+3 417 418 427
+3 427 418 428
+3 418 419 428
+3 428 419 429
+3 419 420 429
+3 429 420 430
+3 420 421 430
+3 430 421 431
+3 421 422 431
+3 431 422 432
+3 422 423 432
+3 432 423 652
+3 423 424 652
+3 424 639 652
+3 164 433 644
+3 164 644 162
+3 645 658 165
+3 163 645 165
+3 425 663 651
+3 663 425 664
+3 425 426 664
+3 664 426 665
+3 426 427 665
+3 665 427 666
+3 427 428 666
+3 666 428 667
+3 428 429 667
+3 667 429 668
+3 429 430 668
+3 668 430 669
+3 430 431 669
+3 669 431 670
+3 431 432 670
+3 432 652 670
+3 675 433 166
+3 166 433 164
+3 434 165 676
+3 165 658 676
+3 675 436 435
+3 166 436 675
+3 676 691 437
+3 434 676 437
+3 438 703 435
+3 436 438 435
+3 439 437 704
+3 437 691 704
+3 441 440 703
+3 442 441 703
+3 438 442 703
+3 704 709 443
+3 439 704 443
+3 710 440 444
+3 440 441 444
+3 445 444 441
+3 442 445 441
+3 446 443 711
+3 443 709 711
+3 714 710 447
+3 710 444 447
+3 448 447 444
+3 445 448 444
+3 711 715 176
+3 446 711 176
+3 717 714 449
+3 714 447 449
+3 450 449 447
+3 448 450 447
+3 451 176 718
+3 176 715 718
+3 449 720 717
+3 452 449 450
+3 720 449 452
+3 452 450 453
+3 454 718 455
+3 451 718 454
+3 452 723 720
+3 724 452 453
+3 723 452 724
+3 724 453 456
+3 454 455 725
+3 461 454 725
+3 726 724 456
+3 457 727 726
+3 456 457 726
+3 458 728 727
+3 457 458 727
+3 459 729 728
+3 458 459 728
+3 460 730 729
+3 459 460 729
+3 461 731 730
+3 460 461 730
+3 731 461 725
+3 472 471 462
+3 472 462 473
+3 462 463 473
+3 473 463 474
+3 463 464 474
+3 474 464 475
+3 464 465 475
+3 475 465 476
+3 465 466 476
+3 476 466 477
+3 466 467 477
+3 477 467 478
+3 467 468 478
+3 478 468 479
+3 468 469 479
+3 479 469 480
+3 469 470 480
+3 480 470 481
+3 485 484 471
+3 485 471 486
+3 471 472 486
+3 486 472 487
+3 472 473 487
+3 487 473 488
+3 473 474 488
+3 488 474 489
+3 474 475 489
+3 489 475 490
+3 475 476 490
+3 490 476 491
+3 476 477 491
+3 491 477 492
+3 477 478 492
+3 492 478 493
+3 478 479 493
+3 493 479 494
+3 479 480 494
+3 494 480 495
+3 480 481 495
+3 495 481 496
+3 481 482 496
+3 496 482 497
+3 499 498 483
+3 499 483 500
+3 483 484 500
+3 500 484 501
+3 484 485 501
+3 501 485 502
+3 485 486 502
+3 502 487 185
+3 486 487 502
+3 488 186 185
+3 487 488 185
+3 489 187 186
+3 488 489 186
+3 490 188 187
+3 489 490 187
+3 491 189 188
+3 490 491 188
+3 492 190 189
+3 491 492 189
+3 493 191 190
+3 492 493 190
+3 493 503 191
+3 494 503 493
+3 503 494 504
+3 494 495 504
+3 504 495 505
+3 495 496 505
+3 505 496 506
+3 496 497 506
+3 506 497 507
+3 509 508 498
+3 509 498 510
+3 498 499 510
+3 510 499 511
+3 499 500 511
+3 511 500 512
+3 500 501 512
+3 512 502 192
+3 501 502 512
+3 192 502 185
+3 503 200 191
+3 504 201 200
+3 503 504 200
+3 504 513 201
+3 505 513 504
+3 513 505 514
+3 505 506 514
+3 514 506 515
+3 506 507 515
+3 515 507 516
+3 887 508 517
+3 508 509 517
+3 517 509 518
+3 509 510 518
+3 518 510 519
+3 510 511 519
+3 519 512 202
+3 511 512 519
+3 202 512 192
+3 513 213 201
+3 513 520 213
+3 514 520 513
+3 520 514 521
+3 514 515 521
+3 521 515 522
+3 515 516 522
+3 522 516 523
+3 525 524 887
+3 525 887 526
+3 887 517 526
+3 526 517 527
+3 517 518 527
+3 527 519 214
+3 518 519 527
+3 214 519 202
+3 520 227 213
+3 520 528 227
+3 521 528 520
+3 528 521 529
+3 521 522 529
+3 529 522 530
+3 522 523 530
+3 897 524 531
+3 524 525 531
+3 531 525 532
+3 525 526 532
+3 532 527 228
+3 526 527 532
+3 228 527 214
+3 528 243 227
+3 528 533 243
+3 529 533 528
+3 533 529 534
+3 529 530 534
+3 534 530 535
+3 537 536 897
+3 537 897 538
+3 897 531 538
+3 538 532 244
+3 531 532 538
+3 244 532 228
+3 243 533 539
+3 254 243 539
+3 539 533 540
+3 533 534 540
+3 540 534 541
+3 534 535 541
+3 905 536 542
+3 536 537 542
+3 542 537 543
+3 537 538 543
+3 544 543 538
+3 244 544 538
+3 539 262 254
+3 539 545 262
+3 540 545 539
+3 545 540 546
+3 540 541 546
+3 546 541 547
+3 909 905 548
+3 905 542 548
+3 548 543 263
+3 542 543 548
+3 263 543 544
+3 262 545 549
+3 273 262 549
+3 549 545 550
+3 545 546 550
+3 550 546 551
+3 546 547 551
+3 553 552 909
+3 553 909 554
+3 909 548 554
+3 555 554 548
+3 263 555 548
+3 273 549 556
+3 282 273 556
+3 556 549 557
+3 549 550 557
+3 557 550 558
+3 550 551 558
+3 916 552 559
+3 552 553 559
+3 559 553 560
+3 553 554 560
+3 561 560 554
+3 555 561 554
+3 282 556 562
+3 289 282 562
+3 562 556 563
+3 556 557 563
+3 563 557 564
+3 557 558 564
+3 920 916 565
+3 916 559 565
+3 565 559 566
+3 559 560 566
+3 567 566 560
+3 561 567 560
+3 562 297 289
+3 562 568 297
+3 563 568 562
+3 568 563 569
+3 563 564 569
+3 924 920 570
+3 920 565 570
+3 570 565 571
+3 565 566 571
+3 572 571 566
+3 567 572 566
+3 297 568 573
+3 305 297 573
+3 573 568 574
+3 568 569 574
+3 929 924 575
+3 924 570 575
+3 575 570 576
+3 570 571 576
+3 577 576 571
+3 572 577 571
+3 305 573 578
+3 313 305 578
+3 578 573 579
+3 573 574 579
+3 934 929 580
+3 929 575 580
+3 580 575 581
+3 575 576 581
+3 582 581 576
+3 577 582 576
+3 313 578 583
+3 321 313 583
+3 583 578 584
+3 578 579 584
+3 939 934 585
+3 934 580 585
+3 585 580 586
+3 580 581 586
+3 587 586 581
+3 582 587 581
+3 321 583 589
+3 588 321 589
+3 589 583 590
+3 583 584 590
+3 943 939 591
+3 939 585 591
+3 591 585 592
+3 585 586 592
+3 593 592 586
+3 587 593 586
+3 588 594 337
+3 589 594 588
+3 595 594 589
+3 595 589 596
+3 589 590 596
+3 947 943 597
+3 943 591 597
+3 597 591 598
+3 591 592 598
+3 599 598 592
+3 593 599 592
+3 337 594 600
+3 347 337 600
+3 600 594 601
+3 594 595 601
+3 601 595 602
+3 595 596 602
+3 597 951 947
+3 951 597 603
+3 597 598 603
+3 604 603 598
+3 599 604 598
+3 347 600 605
+3 357 347 605
+3 605 600 606
+3 600 601 606
+3 606 601 607
+3 601 602 607
+3 955 951 608
+3 951 603 608
+3 609 603 604
+3 608 603 609
+3 609 604 610
+3 357 605 612
+3 611 357 612
+3 612 605 613
+3 605 606 613
+3 613 606 614
+3 606 607 614
+3 959 955 615
+3 955 608 615
+3 615 608 616
+3 608 609 616
+3 617 616 609
+3 610 617 609
+3 611 618 383
+3 612 618 611
+3 619 618 612
+3 619 612 620
+3 612 613 620
+3 620 613 960
+3 613 614 960
+3 615 964 959
+3 964 615 621
+3 615 616 621
+3 622 621 616
+3 617 622 616
+3 383 618 624
+3 623 383 624
+3 624 618 625
+3 618 619 625
+3 625 619 626
+3 619 620 626
+3 620 960 626
+3 971 964 628
+3 964 621 628
+3 629 621 622
+3 628 621 629
+3 629 622 630
+3 623 632 631
+3 624 632 623
+3 633 632 624
+3 633 624 634
+3 624 625 634
+3 634 625 972
+3 625 626 972
+3 413 967 627
+3 412 967 413
+3 975 413 627
+3 414 413 975
+3 628 978 971
+3 978 628 635
+3 628 629 635
+3 636 629 630
+3 635 629 636
+3 636 630 637
+3 631 640 639
+3 632 640 631
+3 641 640 632
+3 641 632 642
+3 632 633 642
+3 642 633 979
+3 633 634 979
+3 634 972 979
+3 967 644 643
+3 412 644 967
+3 645 975 646
+3 414 975 645
+3 984 978 647
+3 978 635 647
+3 647 635 648
+3 635 636 648
+3 649 636 637
+3 648 636 649
+3 638 650 649
+3 637 638 649
+3 650 638 651
+3 639 653 652
+3 640 653 639
+3 654 653 640
+3 654 640 655
+3 640 641 655
+3 655 641 656
+3 641 642 656
+3 642 979 656
+3 433 657 643
+3 433 643 644
+3 646 658 645
+3 987 658 646
+3 647 990 984
+3 990 647 659
+3 647 648 659
+3 659 648 660
+3 648 649 660
+3 660 649 661
+3 649 650 661
+3 662 650 651
+3 661 650 662
+3 662 651 663
+3 652 671 670
+3 653 671 652
+3 672 671 653
+3 672 653 673
+3 653 654 673
+3 673 654 674
+3 654 655 674
+3 674 655 991
+3 655 656 991
+3 675 995 657
+3 433 675 657
+3 676 658 996
+3 658 987 996
+3 659 1000 990
+3 1000 659 677
+3 659 660 677
+3 677 660 678
+3 660 661 678
+3 678 661 679
+3 661 662 679
+3 680 662 663
+3 679 662 680
+3 664 681 680
+3 663 664 680
+3 665 682 681
+3 664 665 681
+3 666 683 682
+3 665 666 682
+3 667 684 683
+3 666 667 683
+3 668 685 684
+3 667 668 684
+3 669 686 685
+3 668 669 685
+3 670 687 686
+3 669 670 686
+3 671 687 670
+3 688 687 671
+3 688 671 689
+3 671 672 689
+3 689 672 1001
+3 672 673 1001
+3 1001 673 1002
+3 673 674 1002
+3 674 991 1002
+3 435 690 995
+3 435 995 675
+3 996 1006 691
+3 676 996 691
+3 677 1009 1000
+3 1009 677 1010
+3 677 678 1010
+3 1010 678 692
+3 678 679 692
+3 692 679 693
+3 679 680 693
+3 693 680 694
+3 680 681 694
+3 694 681 695
+3 681 682 695
+3 695 682 696
+3 682 683 696
+3 696 683 697
+3 683 684 697
+3 697 684 698
+3 684 685 698
+3 698 685 699
+3 685 686 699
+3 699 686 700
+3 686 687 700
+3 700 687 1011
+3 687 688 1011
+3 1011 688 1012
+3 688 689 1012
+3 689 1001 1012
+3 702 701 690
+3 703 702 690
+3 435 703 690
+3 704 691 1017
+3 691 1006 1017
+3 692 1022 1010
+3 1022 692 1023
+3 692 693 1023
+3 1023 693 1024
+3 693 694 1024
+3 1024 694 705
+3 694 695 705
+3 705 695 706
+3 695 696 706
+3 706 696 707
+3 696 697 707
+3 707 697 708
+3 697 698 708
+3 708 698 1025
+3 698 699 1025
+3 1025 699 1026
+3 699 700 1026
+3 700 1011 1026
+3 1031 702 440
+3 701 702 1031
+3 440 702 703
+3 1017 1032 709
+3 704 1017 709
+3 705 1038 1024
+3 1038 705 1039
+3 705 706 1039
+3 1039 706 1040
+3 706 707 1040
+3 1040 707 1041
+3 707 708 1041
+3 708 1025 1041
+3 710 1049 1031
+3 440 710 1031
+3 711 709 1050
+3 709 1032 1050
+3 713 712 1049
+3 714 713 1049
+3 710 714 1049
+3 1050 1062 715
+3 711 1050 715
+3 1063 712 716
+3 712 713 716
+3 717 716 713
+3 714 717 713
+3 718 715 1064
+3 715 1062 1064
+3 716 1067 1063
+3 719 716 717
+3 1067 716 719
+3 719 717 720
+3 1064 1068 455
+3 718 1064 455
+3 1070 1067 721
+3 1067 719 721
+3 722 719 720
+3 721 719 722
+3 722 720 723
+3 725 455 1071
+3 455 1068 1071
+3 721 1073 1070
+3 1073 721 1074
+3 721 722 1074
+3 1075 722 723
+3 1074 722 1075
+3 724 1076 1075
+3 723 724 1075
+3 1076 724 726
+3 725 1078 731
+3 1071 1078 725
+3 1079 1076 726
+3 727 1080 1079
+3 726 727 1079
+3 728 1081 1080
+3 727 728 1080
+3 729 1082 1081
+3 728 729 1081
+3 730 1083 1082
+3 729 730 1082
+3 730 1077 1083
+3 731 1077 730
+3 1077 731 1078
+3 738 737 732
+3 738 732 739
+3 732 733 739
+3 739 733 740
+3 733 734 740
+3 740 734 741
+3 734 735 741
+3 741 735 742
+3 1126 736 744
+3 736 737 744
+3 744 737 745
+3 737 738 745
+3 745 738 746
+3 738 739 746
+3 746 739 747
+3 739 740 747
+3 747 740 748
+3 740 741 748
+3 748 741 749
+3 741 742 749
+3 749 742 750
+3 742 743 750
+3 750 743 751
+3 753 752 1126
+3 753 1126 754
+3 1126 744 754
+3 754 744 755
+3 744 745 755
+3 755 745 756
+3 745 746 756
+3 756 746 757
+3 746 747 757
+3 757 747 758
+3 747 748 758
+3 758 748 759
+3 748 749 759
+3 759 749 760
+3 749 750 760
+3 760 750 761
+3 750 751 761
+3 1137 752 762
+3 752 753 762
+3 762 753 763
+3 753 754 763
+3 763 754 764
+3 754 755 764
+3 764 755 765
+3 755 756 765
+3 765 756 766
+3 756 757 766
+3 766 757 767
+3 757 758 767
+3 767 758 768
+3 758 759 768
+3 768 759 769
+3 759 760 769
+3 769 760 770
+3 760 761 770
+3 770 761 771
+3 1142 1137 772
+3 1137 762 772
+3 772 762 773
+3 762 763 773
+3 773 763 774
+3 763 764 774
+3 774 764 775
+3 764 765 775
+3 775 765 776
+3 765 766 776
+3 776 766 777
+3 766 767 777
+3 777 767 778
+3 767 768 778
+3 778 768 779
+3 768 769 779
+3 779 769 780
+3 769 770 780
+3 780 770 781
+3 770 771 781
+3 1147 1142 782
+3 1142 772 782
+3 782 772 783
+3 772 773 783
+3 783 773 784
+3 773 774 784
+3 784 774 785
+3 774 775 785
+3 785 775 786
+3 775 776 786
+3 786 776 787
+3 776 777 787
+3 787 777 788
+3 777 778 788
+3 788 778 789
+3 778 779 789
+3 789 779 790
+3 779 780 790
+3 790 780 1148
+3 780 781 1148
+3 1153 1147 791
+3 1147 782 791
+3 791 782 792
+3 782 783 792
+3 792 783 793
+3 783 784 793
+3 793 784 794
+3 784 785 794
+3 794 785 795
+3 785 786 795
+3 795 786 796
+3 786 787 796
+3 796 787 797
+3 787 788 797
+3 797 788 798
+3 788 789 798
+3 798 789 799
+3 789 790 799
+3 790 1148 799
+3 1159 1153 800
+3 1153 791 800
+3 800 791 801
+3 791 792 801
+3 801 792 802
+3 792 793 802
+3 802 793 803
+3 793 794 803
+3 803 794 804
+3 794 795 804
+3 804 795 805
+3 795 796 805
+3 805 796 806
+3 796 797 806
+3 806 797 807
+3 797 798 807
+3 807 798 1160
+3 798 799 1160
+3 800 1165 1159
+3 1165 800 808
+3 800 801 808
+3 808 801 809
+3 801 802 809
+3 809 802 810
+3 802 803 810
+3 810 803 811
+3 803 804 811
+3 811 804 812
+3 804 805 812
+3 812 805 813
+3 805 806 813
+3 813 806 1166
+3 806 807 1166
+3 807 1160 1166
+3 808 1173 1165
+3 1173 808 1174
+3 808 809 1174
+3 1174 809 1175
+3 809 810 1175
+3 1175 810 1176
+3 810 811 1176
+3 1176 811 1177
+3 811 812 1177
+3 1177 812 1178
+3 812 813 1178
+3 813 1166 1178
+3 825 824 814
+3 825 814 826
+3 814 815 826
+3 826 815 827
+3 815 816 827
+3 827 816 828
+3 816 817 828
+3 828 817 829
+3 817 818 829
+3 829 818 830
+3 818 819 830
+3 830 819 831
+3 819 820 831
+3 831 820 832
+3 820 821 832
+3 832 821 833
+3 836 835 822
+3 836 822 837
+3 822 823 837
+3 837 823 838
+3 823 824 838
+3 838 824 839
+3 824 825 839
+3 839 825 840
+3 825 826 840
+3 840 826 841
+3 826 827 841
+3 841 827 842
+3 827 828 842
+3 842 828 843
+3 828 829 843
+3 843 829 844
+3 829 830 844
+3 844 830 845
+3 830 831 845
+3 845 831 846
+3 831 832 846
+3 846 832 847
+3 832 833 847
+3 847 833 848
+3 833 834 848
+3 848 834 849
+3 851 850 835
+3 851 835 852
+3 835 836 852
+3 852 836 853
+3 836 837 853
+3 853 838 462
+3 837 838 853
+3 839 463 462
+3 838 839 462
+3 840 464 463
+3 839 840 463
+3 841 465 464
+3 840 841 464
+3 842 466 465
+3 841 842 465
+3 843 467 466
+3 842 843 466
+3 844 468 467
+3 843 844 467
+3 845 469 468
+3 844 845 468
+3 846 470 469
+3 845 846 469
+3 846 854 470
+3 847 854 846
+3 854 847 855
+3 847 848 855
+3 855 848 856
+3 848 849 856
+3 856 849 857
+3 860 859 850
+3 860 850 861
+3 850 851 861
+3 861 851 862
+3 851 852 862
+3 862 853 471
+3 852 853 862
+3 471 853 462
+3 854 481 470
+3 855 482 481
+3 854 855 481
+3 855 863 482
+3 856 863 855
+3 863 856 864
+3 856 857 864
+3 864 857 865
+3 857 858 865
+3 865 858 866
+3 868 867 859
+3 868 859 869
+3 859 860 869
+3 869 861 483
+3 860 861 869
+3 862 484 483
+3 861 862 483
+3 484 862 471
+3 863 497 482
+3 863 870 497
+3 864 870 863
+3 870 864 871
+3 864 865 871
+3 871 865 872
+3 865 866 872
+3 872 866 873
+3 875 874 867
+3 875 867 876
+3 867 868 876
+3 876 869 498
+3 868 869 876
+3 498 869 483
+3 870 507 497
+3 870 877 507
+3 871 877 870
+3 877 871 878
+3 871 872 878
+3 878 872 879
+3 872 873 879
+3 1259 874 880
+3 874 875 880
+3 880 876 508
+3 875 876 880
+3 508 876 498
+3 877 516 507
+3 877 881 516
+3 878 881 877
+3 881 878 882
+3 878 879 882
+3 882 879 883
+3 885 884 1259
+3 885 1259 886
+3 1259 880 886
+3 887 886 880
+3 508 887 880
+3 881 523 516
+3 881 888 523
+3 882 888 881
+3 888 882 889
+3 882 883 889
+3 1267 884 890
+3 884 885 890
+3 890 886 524
+3 885 886 890
+3 524 886 887
+3 523 888 891
+3 530 523 891
+3 891 888 892
+3 888 889 892
+3 892 889 893
+3 895 894 1267
+3 895 1267 896
+3 1267 890 896
+3 897 896 890
+3 524 897 890
+3 891 535 530
+3 891 898 535
+3 892 898 891
+3 898 892 899
+3 892 893 899
+3 1274 894 900
+3 894 895 900
+3 900 896 536
+3 895 896 900
+3 536 896 897
+3 535 898 901
+3 541 535 901
+3 901 898 902
+3 898 899 902
+3 902 899 903
+3 1277 1274 904
+3 1274 900 904
+3 905 904 900
+3 536 905 900
+3 901 547 541
+3 901 906 547
+3 902 906 901
+3 906 902 907
+3 902 903 907
+3 1281 1277 908
+3 1277 904 908
+3 909 908 904
+3 905 909 904
+3 547 906 910
+3 551 547 910
+3 910 906 911
+3 906 907 911
+3 1285 908 552
+3 1281 908 1285
+3 552 908 909
+3 551 910 912
+3 558 551 912
+3 912 910 913
+3 910 911 913
+3 915 914 1285
+3 916 915 1285
+3 552 916 1285
+3 558 912 917
+3 564 558 917
+3 917 912 918
+3 912 913 918
+3 1292 914 919
+3 914 915 919
+3 920 919 915
+3 916 920 915
+3 564 917 921
+3 569 564 921
+3 921 917 922
+3 917 918 922
+3 1296 1292 923
+3 1292 919 923
+3 924 923 919
+3 920 924 919
+3 569 921 925
+3 574 569 925
+3 925 921 926
+3 921 922 926
+3 926 922 927
+3 1299 1296 928
+3 1296 923 928
+3 929 928 923
+3 924 929 923
+3 574 925 930
+3 579 574 930
+3 930 925 931
+3 925 926 931
+3 931 926 932
+3 926 927 932
+3 1302 1299 933
+3 1299 928 933
+3 934 933 928
+3 929 934 928
+3 579 930 935
+3 584 579 935
+3 935 930 936
+3 930 931 936
+3 936 931 937
+3 931 932 937
+3 1305 1302 938
+3 1302 933 938
+3 939 938 933
+3 934 939 933
+3 584 935 940
+3 590 584 940
+3 940 935 941
+3 935 936 941
+3 941 936 1306
+3 936 937 1306
+3 1308 1305 942
+3 1305 938 942
+3 943 942 938
+3 939 943 938
+3 590 940 944
+3 596 590 944
+3 944 940 945
+3 940 941 945
+3 941 1306 945
+3 1311 1308 946
+3 1308 942 946
+3 947 946 942
+3 943 947 942
+3 596 944 948
+3 602 596 948
+3 948 944 949
+3 944 945 949
+3 946 1315 1311
+3 950 946 947
+3 1315 946 950
+3 950 947 951
+3 602 948 952
+3 607 602 952
+3 952 948 953
+3 948 949 953
+3 1319 1315 954
+3 1315 950 954
+3 955 954 950
+3 951 955 950
+3 607 952 956
+3 614 607 956
+3 956 952 957
+3 952 953 957
+3 1323 1319 958
+3 1319 954 958
+3 959 958 954
+3 955 959 954
+3 614 956 961
+3 960 614 961
+3 961 956 1324
+3 956 957 1324
+3 1327 1323 962
+3 1323 958 962
+3 963 958 959
+3 962 958 963
+3 963 959 964
+3 960 965 626
+3 961 965 960
+3 966 965 961
+3 961 1324 966
+3 1326 627 968
+3 1326 969 627
+3 962 1332 1327
+3 1332 962 970
+3 962 963 970
+3 971 970 963
+3 964 971 963
+3 626 965 973
+3 972 626 973
+3 973 965 1333
+3 965 966 1333
+3 967 974 968
+3 967 968 627
+3 969 975 627
+3 1336 975 969
+3 1338 1332 976
+3 1332 970 976
+3 977 970 971
+3 976 970 977
+3 977 971 978
+3 972 980 979
+3 973 980 972
+3 981 980 973
+3 973 1333 981
+3 643 982 974
+3 643 974 967
+3 1336 1341 646
+3 975 1336 646
+3 976 1343 1338
+3 1343 976 983
+3 976 977 983
+3 984 983 977
+3 978 984 977
+3 979 985 656
+3 980 985 979
+3 986 985 980
+3 986 980 1344
+3 980 981 1344
+3 1347 982 657
+3 657 982 643
+3 987 646 1348
+3 646 1341 1348
+3 1350 1343 988
+3 1343 983 988
+3 989 983 984
+3 988 983 989
+3 989 984 990
+3 656 985 992
+3 991 656 992
+3 992 985 993
+3 985 986 993
+3 986 1344 993
+3 1347 995 994
+3 657 995 1347
+3 996 1348 997
+3 987 1348 996
+3 988 1356 1350
+3 1356 988 998
+3 988 989 998
+3 999 989 990
+3 998 989 999
+3 999 990 1000
+3 991 1003 1002
+3 992 1003 991
+3 1004 1003 992
+3 1004 992 1357
+3 992 993 1357
+3 690 1005 994
+3 690 994 995
+3 997 1006 996
+3 1360 1006 997
+3 998 1366 1356
+3 1366 998 1007
+3 998 999 1007
+3 1008 999 1000
+3 1007 999 1008
+3 1008 1000 1009
+3 1001 1013 1012
+3 1002 1014 1013
+3 1001 1002 1013
+3 1003 1014 1002
+3 1015 1014 1003
+3 1015 1003 1367
+3 1003 1004 1367
+3 1004 1357 1367
+3 701 1016 1005
+3 701 1005 690
+3 1017 1360 1018
+3 1006 1360 1017
+3 1007 1374 1366
+3 1374 1007 1019
+3 1007 1008 1019
+3 1020 1008 1009
+3 1019 1008 1020
+3 1010 1021 1020
+3 1009 1010 1020
+3 1021 1010 1022
+3 1011 1027 1026
+3 1012 1028 1027
+3 1011 1012 1027
+3 1013 1028 1012
+3 1029 1028 1013
+3 1029 1013 1030
+3 1013 1014 1030
+3 1030 1014 1375
+3 1014 1015 1375
+3 1015 1367 1375
+3 1031 1378 1016
+3 701 1031 1016
+3 1018 1032 1017
+3 1379 1032 1018
+3 1019 1386 1374
+3 1386 1019 1033
+3 1019 1020 1033
+3 1033 1020 1034
+3 1020 1021 1034
+3 1035 1021 1022
+3 1034 1021 1035
+3 1023 1036 1035
+3 1022 1023 1035
+3 1024 1037 1036
+3 1023 1024 1036
+3 1037 1024 1038
+3 1025 1042 1041
+3 1026 1043 1042
+3 1025 1026 1042
+3 1027 1043 1026
+3 1044 1043 1027
+3 1044 1027 1045
+3 1027 1028 1045
+3 1045 1028 1046
+3 1028 1029 1046
+3 1046 1029 1387
+3 1029 1030 1387
+3 1030 1375 1387
+3 1048 1047 1378
+3 1049 1048 1378
+3 1031 1049 1378
+3 1050 1379 1051
+3 1032 1379 1050
+3 1033 1395 1386
+3 1395 1033 1396
+3 1033 1034 1396
+3 1396 1034 1052
+3 1034 1035 1052
+3 1052 1035 1053
+3 1035 1036 1053
+3 1053 1036 1054
+3 1036 1037 1054
+3 1055 1037 1038
+3 1054 1037 1055
+3 1039 1056 1055
+3 1038 1039 1055
+3 1040 1057 1056
+3 1039 1040 1056
+3 1041 1058 1057
+3 1040 1041 1057
+3 1042 1058 1041
+3 1059 1058 1042
+3 1059 1042 1060
+3 1042 1043 1060
+3 1060 1043 1061
+3 1043 1044 1061
+3 1061 1044 1397
+3 1044 1045 1397
+3 1397 1045 1398
+3 1045 1046 1398
+3 1046 1387 1398
+3 1401 1048 712
+3 1047 1048 1401
+3 712 1048 1049
+3 1051 1062 1050
+3 1402 1062 1051
+3 1052 1405 1396
+3 1405 1052 1406
+3 1052 1053 1406
+3 1406 1053 1407
+3 1053 1054 1407
+3 1407 1054 1408
+3 1054 1055 1408
+3 1408 1055 1409
+3 1055 1056 1409
+3 1409 1056 1410
+3 1056 1057 1410
+3 1410 1057 1411
+3 1057 1058 1411
+3 1411 1058 1412
+3 1058 1059 1412
+3 1412 1059 1413
+3 1059 1060 1413
+3 1413 1060 1414
+3 1060 1061 1414
+3 1061 1397 1414
+3 1063 1419 1401
+3 712 1063 1401
+3 1064 1402 1065
+3 1062 1402 1064
+3 1066 1419 1063
+3 1431 1419 1066
+3 1066 1063 1067
+3 1065 1068 1064
+3 1432 1068 1065
+3 1434 1431 1069
+3 1431 1066 1069
+3 1070 1069 1066
+3 1067 1070 1066
+3 1071 1068 1435
+3 1068 1432 1435
+3 1069 1437 1434
+3 1072 1069 1070
+3 1437 1069 1072
+3 1072 1070 1073
+3 1078 1071 1438
+3 1071 1435 1438
+3 1072 1440 1437
+3 1441 1072 1073
+3 1440 1072 1441
+3 1074 1442 1441
+3 1073 1074 1441
+3 1075 1443 1442
+3 1074 1075 1442
+3 1076 1444 1443
+3 1075 1076 1443
+3 1444 1076 1079
+3 1077 1450 1083
+3 1077 1438 1450
+3 1078 1438 1077
+3 1445 1444 1079
+3 1445 1079 1446
+3 1079 1080 1446
+3 1446 1080 1447
+3 1080 1081 1447
+3 1447 1081 1448
+3 1081 1082 1448
+3 1448 1082 1449
+3 1082 1083 1449
+3 1449 1083 1450
+3 1090 1089 1084
+3 1090 1084 1091
+3 1084 1085 1091
+3 1091 1085 1092
+3 1085 1086 1092
+3 1092 1086 1093
+3 1086 1087 1093
+3 1093 1087 1094
+3 1097 1096 1088
+3 1097 1088 1098
+3 1088 1089 1098
+3 1098 1089 1099
+3 1089 1090 1099
+3 1099 1090 1100
+3 1090 1091 1100
+3 1100 1091 1101
+3 1091 1092 1101
+3 1101 1092 1102
+3 1092 1093 1102
+3 1102 1093 1103
+3 1093 1094 1103
+3 1103 1094 1104
+3 1094 1095 1104
+3 1104 1095 1105
+3 1108 1107 1096
+3 1108 1096 1109
+3 1096 1097 1109
+3 1109 1097 1110
+3 1097 1098 1110
+3 1110 1099 732
+3 1098 1099 1110
+3 1100 733 732
+3 1099 1100 732
+3 1101 734 733
+3 1100 1101 733
+3 1102 735 734
+3 1101 1102 734
+3 1102 1111 735
+3 1103 1111 1102
+3 1111 1103 1112
+3 1103 1104 1112
+3 1112 1104 1113
+3 1104 1105 1113
+3 1113 1105 1114
+3 1105 1106 1114
+3 1114 1106 1115
+3 1117 1116 1107
+3 1117 1107 1118
+3 1107 1108 1118
+3 1118 1109 736
+3 1108 1109 1118
+3 1110 737 736
+3 1109 1110 736
+3 737 1110 732
+3 1111 742 735
+3 1112 743 742
+3 1111 1112 742
+3 1112 1119 743
+3 1113 1119 1112
+3 1119 1113 1120
+3 1113 1114 1120
+3 1120 1114 1121
+3 1114 1115 1121
+3 1123 1122 1116
+3 1123 1116 1124
+3 1116 1117 1124
+3 1124 1117 1125
+3 1117 1118 1125
+3 1126 1125 1118
+3 736 1126 1118
+3 1119 751 743
+3 1119 1127 751
+3 1120 1127 1119
+3 1127 1120 1128
+3 1120 1121 1128
+3 1128 1121 1129
+3 1496 1122 1130
+3 1122 1123 1130
+3 1130 1123 1131
+3 1123 1124 1131
+3 1131 1125 752
+3 1124 1125 1131
+3 752 1125 1126
+3 751 1127 1132
+3 761 751 1132
+3 1132 1127 1133
+3 1127 1128 1133
+3 1133 1128 1134
+3 1128 1129 1134
+3 1500 1496 1135
+3 1496 1130 1135
+3 1135 1130 1136
+3 1130 1131 1136
+3 1137 1136 1131
+3 752 1137 1131
+3 1132 771 761
+3 1132 1138 771
+3 1133 1138 1132
+3 1138 1133 1139
+3 1133 1134 1139
+3 1504 1500 1140
+3 1500 1135 1140
+3 1140 1135 1141
+3 1135 1136 1141
+3 1142 1141 1136
+3 1137 1142 1136
+3 771 1138 1143
+3 781 771 1143
+3 1143 1138 1144
+3 1138 1139 1144
+3 1508 1504 1145
+3 1504 1140 1145
+3 1145 1140 1146
+3 1140 1141 1146
+3 1147 1146 1141
+3 1142 1147 1141
+3 781 1143 1149
+3 1148 781 1149
+3 1149 1143 1150
+3 1143 1144 1150
+3 1512 1508 1151
+3 1508 1145 1151
+3 1151 1145 1152
+3 1145 1146 1152
+3 1153 1152 1146
+3 1147 1153 1146
+3 1148 1154 799
+3 1149 1154 1148
+3 1155 1154 1149
+3 1155 1149 1156
+3 1149 1150 1156
+3 1516 1512 1157
+3 1512 1151 1157
+3 1157 1151 1158
+3 1151 1152 1158
+3 1159 1158 1152
+3 1153 1159 1152
+3 799 1154 1161
+3 1160 799 1161
+3 1161 1154 1162
+3 1154 1155 1162
+3 1162 1155 1517
+3 1155 1156 1517
+3 1157 1521 1516
+3 1521 1157 1163
+3 1157 1158 1163
+3 1164 1158 1159
+3 1163 1158 1164
+3 1164 1159 1165
+3 1160 1167 1166
+3 1161 1167 1160
+3 1168 1167 1161
+3 1168 1161 1169
+3 1161 1162 1169
+3 1162 1517 1169
+3 1525 1521 1170
+3 1521 1163 1170
+3 1170 1163 1171
+3 1163 1164 1171
+3 1172 1164 1165
+3 1171 1164 1172
+3 1172 1165 1173
+3 1166 1179 1178
+3 1167 1179 1166
+3 1180 1179 1167
+3 1180 1167 1181
+3 1167 1168 1181
+3 1181 1168 1526
+3 1168 1169 1526
+3 1170 1530 1525
+3 1530 1170 1182
+3 1170 1171 1182
+3 1182 1171 1183
+3 1171 1172 1183
+3 1184 1172 1173
+3 1183 1172 1184
+3 1174 1185 1184
+3 1173 1174 1184
+3 1175 1186 1185
+3 1174 1175 1185
+3 1176 1187 1186
+3 1175 1176 1186
+3 1177 1188 1187
+3 1176 1177 1187
+3 1178 1189 1188
+3 1177 1178 1188
+3 1179 1189 1178
+3 1190 1189 1179
+3 1190 1179 1191
+3 1179 1180 1191
+3 1191 1180 1531
+3 1180 1181 1531
+3 1181 1526 1531
+3 1182 1535 1530
+3 1535 1182 1536
+3 1182 1183 1536
+3 1536 1183 1192
+3 1183 1184 1192
+3 1192 1184 1193
+3 1184 1185 1193
+3 1193 1185 1194
+3 1185 1186 1194
+3 1194 1186 1195
+3 1186 1187 1195
+3 1195 1187 1196
+3 1187 1188 1196
+3 1196 1188 1197
+3 1188 1189 1197
+3 1197 1189 1537
+3 1189 1190 1537
+3 1537 1190 1538
+3 1190 1191 1538
+3 1191 1531 1538
+3 1192 1543 1536
+3 1543 1192 1544
+3 1192 1193 1544
+3 1544 1193 1545
+3 1193 1194 1545
+3 1545 1194 1546
+3 1194 1195 1546
+3 1546 1195 1547
+3 1195 1196 1547
+3 1547 1196 1548
+3 1196 1197 1548
+3 1197 1537 1548
+3 1209 1208 1198
+3 1209 1198 1210
+3 1198 1199 1210
+3 1210 1199 1211
+3 1199 1200 1211
+3 1211 1200 1212
+3 1200 1201 1212
+3 1212 1201 1213
+3 1201 1202 1213
+3 1213 1202 1214
+3 1202 1203 1214
+3 1214 1203 1215
+3 1203 1204 1215
+3 1215 1204 1216
+3 1204 1205 1216
+3 1216 1205 1217
+3 1222 1221 1206
+3 1222 1206 1223
+3 1206 1207 1223
+3 1223 1207 1224
+3 1207 1208 1224
+3 1224 1209 814
+3 1208 1209 1224
+3 1210 815 814
+3 1209 1210 814
+3 1211 816 815
+3 1210 1211 815
+3 1212 817 816
+3 1211 1212 816
+3 1213 818 817
+3 1212 1213 817
+3 1214 819 818
+3 1213 1214 818
+3 1215 820 819
+3 1214 1215 819
+3 1216 821 820
+3 1215 1216 820
+3 1216 1225 821
+3 1217 1225 1216
+3 1225 1217 1226
+3 1217 1218 1226
+3 1226 1218 1227
+3 1218 1219 1227
+3 1227 1219 1228
+3 1230 1229 1220
+3 1230 1220 1231
+3 1220 1221 1231
+3 1231 1222 822
+3 1221 1222 1231
+3 1223 823 822
+3 1222 1223 822
+3 1224 824 823
+3 1223 1224 823
+3 824 1224 814
+3 1225 833 821
+3 1226 834 833
+3 1225 1226 833
+3 1226 1232 834
+3 1227 1232 1226
+3 1232 1227 1233
+3 1227 1228 1233
+3 1233 1228 1234
+3 1237 1236 1229
+3 1237 1229 1238
+3 1229 1230 1238
+3 1238 1231 835
+3 1230 1231 1238
+3 835 1231 822
+3 1232 849 834
+3 1232 1239 849
+3 1233 1239 1232
+3 1239 1233 1240
+3 1233 1234 1240
+3 1240 1234 1241
+3 1234 1235 1241
+3 1243 1242 1236
+3 1243 1236 1244
+3 1236 1237 1244
+3 1244 1238 850
+3 1237 1238 1244
+3 850 1238 835
+3 1239 857 849
+3 1240 858 857
+3 1239 1240 857
+3 1240 1245 858
+3 1241 1245 1240
+3 1245 1241 1246
+3 1610 1242 1247
+3 1242 1243 1247
+3 1247 1244 859
+3 1243 1244 1247
+3 859 1244 850
+3 1245 866 858
+3 1245 1248 866
+3 1246 1248 1245
+3 1248 1246 1249
+3 1251 1250 1610
+3 1251 1247 867
+3 1610 1247 1251
+3 867 1247 859
+3 1248 873 866
+3 1248 1252 873
+3 1249 1252 1248
+3 1252 1249 1253
+3 1255 1254 1250
+3 1255 1251 874
+3 1250 1251 1255
+3 874 1251 867
+3 873 1252 1256
+3 879 873 1256
+3 1256 1252 1257
+3 1252 1253 1257
+3 1621 1254 1258
+3 1254 1255 1258
+3 1259 1258 1255
+3 874 1259 1255
+3 1256 883 879
+3 1256 1260 883
+3 1257 1260 1256
+3 1260 1257 1261
+3 1263 1262 1621
+3 1263 1258 884
+3 1621 1258 1263
+3 884 1258 1259
+3 883 1260 1264
+3 889 883 1264
+3 1264 1260 1265
+3 1260 1261 1265
+3 1628 1262 1266
+3 1262 1263 1266
+3 1267 1266 1263
+3 884 1267 1263
+3 1264 893 889
+3 1264 1268 893
+3 1265 1268 1264
+3 1268 1265 1269
+3 1631 1266 894
+3 1628 1266 1631
+3 894 1266 1267
+3 893 1268 1270
+3 899 893 1270
+3 1270 1268 1271
+3 1268 1269 1271
+3 1273 1272 1631
+3 1274 1273 1631
+3 894 1274 1631
+3 1270 903 899
+3 1270 1275 903
+3 1271 1275 1270
+3 1636 1272 1276
+3 1272 1273 1276
+3 1277 1276 1273
+3 1274 1277 1273
+3 903 1275 1278
+3 907 903 1278
+3 1278 1275 1279
+3 1640 1636 1280
+3 1636 1276 1280
+3 1281 1280 1276
+3 1277 1281 1276
+3 907 1278 1282
+3 911 907 1282
+3 1282 1278 1283
+3 1278 1279 1283
+3 1643 1640 1284
+3 1640 1280 1284
+3 1285 1284 1280
+3 1281 1285 1280
+3 911 1282 1286
+3 913 911 1286
+3 1286 1282 1287
+3 1282 1283 1287
+3 1646 1284 914
+3 1643 1284 1646
+3 914 1284 1285
+3 913 1286 1288
+3 918 913 1288
+3 1288 1286 1289
+3 1286 1287 1289
+3 1291 1290 1646
+3 1292 1291 1646
+3 914 1292 1646
+3 918 1288 1293
+3 922 918 1293
+3 1293 1288 1294
+3 1288 1289 1294
+3 1650 1290 1295
+3 1290 1291 1295
+3 1296 1295 1291
+3 1292 1296 1291
+3 1293 927 922
+3 1293 1297 927
+3 1294 1297 1293
+3 1653 1650 1298
+3 1650 1295 1298
+3 1299 1298 1295
+3 1296 1299 1295
+3 927 1297 1300
+3 932 927 1300
+3 1656 1653 1301
+3 1653 1298 1301
+3 1302 1301 1298
+3 1299 1302 1298
+3 932 1300 1303
+3 937 932 1303
+3 1659 1656 1304
+3 1656 1301 1304
+3 1305 1304 1301
+3 1302 1305 1301
+3 937 1303 1307
+3 1306 937 1307
+3 1304 1662 1659
+3 1308 1662 1304
+3 1305 1308 1304
+3 1306 1309 945
+3 1307 1309 1306
+3 1310 1309 1307
+3 1311 1665 1662
+3 1308 1311 1662
+3 945 1309 1312
+3 949 945 1312
+3 1312 1309 1313
+3 1309 1310 1313
+3 1314 1665 1311
+3 1668 1665 1314
+3 1314 1311 1315
+3 949 1312 1316
+3 953 949 1316
+3 1316 1312 1317
+3 1312 1313 1317
+3 1670 1668 1318
+3 1668 1314 1318
+3 1319 1318 1314
+3 1315 1319 1314
+3 953 1316 1320
+3 957 953 1320
+3 1320 1316 1321
+3 1316 1317 1321
+3 1672 1670 1322
+3 1670 1318 1322
+3 1323 1322 1318
+3 1319 1323 1318
+3 957 1320 1325
+3 1324 957 1325
+3 1325 1320 1673
+3 1320 1321 1673
+3 1322 1680 1672
+3 1327 1680 1322
+3 1323 1327 1322
+3 1324 1328 966
+3 1325 1328 1324
+3 1329 1328 1325
+3 1325 1673 1329
+3 1675 968 1330
+3 968 1675 1326
+3 1675 1677 1326
+3 1326 1677 969
+3 1677 1682 969
+3 1331 1680 1327
+3 1684 1680 1331
+3 1331 1327 1332
+3 966 1328 1334
+3 1333 966 1334
+3 1334 1328 1685
+3 1328 1329 1685
+3 974 1335 1330
+3 974 1330 968
+3 1336 969 1687
+3 969 1682 1687
+3 1688 1684 1337
+3 1684 1331 1337
+3 1338 1337 1331
+3 1332 1338 1331
+3 1333 1339 981
+3 1334 1339 1333
+3 1340 1339 1334
+3 1334 1685 1340
+3 1692 1335 982
+3 982 1335 974
+3 1687 1693 1341
+3 1336 1687 1341
+3 1337 1695 1688
+3 1342 1337 1338
+3 1695 1337 1342
+3 1342 1338 1343
+3 981 1339 1345
+3 1344 981 1345
+3 1345 1339 1696
+3 1339 1340 1696
+3 1692 1347 1346
+3 982 1347 1692
+3 1348 1341 1699
+3 1341 1693 1699
+3 1703 1695 1349
+3 1695 1342 1349
+3 1350 1349 1342
+3 1343 1350 1342
+3 1344 1351 993
+3 1345 1351 1344
+3 1352 1351 1345
+3 1345 1696 1352
+3 994 1353 1346
+3 994 1346 1347
+3 1699 1707 997
+3 1348 1699 997
+3 1349 1712 1703
+3 1355 1349 1350
+3 1712 1349 1355
+3 1355 1350 1356
+3 993 1351 1358
+3 1357 993 1358
+3 1358 1351 1713
+3 1351 1352 1713
+3 1005 1359 1353
+3 1005 1353 994
+3 1360 997 1716
+3 997 1707 1716
+3 1362 1361 1354
+3 1362 1354 1363
+3 1719 1712 1364
+3 1712 1355 1364
+3 1365 1355 1356
+3 1364 1355 1365
+3 1365 1356 1366
+3 1357 1368 1367
+3 1358 1368 1357
+3 1720 1368 1358
+3 1358 1713 1720
+3 1016 1369 1359
+3 1016 1359 1005
+3 1716 1723 1018
+3 1360 1716 1018
+3 1724 1361 1370
+3 1361 1362 1370
+3 1370 1362 1371
+3 1362 1363 1371
+3 1364 1729 1719
+3 1729 1364 1372
+3 1364 1365 1372
+3 1373 1365 1366
+3 1372 1365 1373
+3 1373 1366 1374
+3 1367 1376 1375
+3 1368 1376 1367
+3 1377 1376 1368
+3 1368 1720 1377
+3 1378 1734 1369
+3 1016 1378 1369
+3 1379 1018 1735
+3 1018 1723 1735
+3 1381 1380 1724
+3 1381 1724 1382
+3 1724 1370 1382
+3 1382 1370 1383
+3 1370 1371 1383
+3 1372 1740 1729
+3 1740 1372 1384
+3 1372 1373 1384
+3 1385 1373 1374
+3 1384 1373 1385
+3 1385 1374 1386
+3 1375 1388 1387
+3 1376 1388 1375
+3 1389 1388 1376
+3 1389 1376 1741
+3 1376 1377 1741
+3 1047 1390 1734
+3 1047 1734 1378
+3 1735 1743 1051
+3 1379 1735 1051
+3 1744 1380 1391
+3 1380 1381 1391
+3 1391 1381 1392
+3 1381 1382 1392
+3 1392 1382 1745
+3 1382 1383 1745
+3 1384 1750 1740
+3 1750 1384 1393
+3 1384 1385 1393
+3 1394 1385 1386
+3 1393 1385 1394
+3 1394 1386 1395
+3 1387 1399 1398
+3 1388 1399 1387
+3 1400 1399 1388
+3 1400 1388 1751
+3 1388 1389 1751
+3 1389 1741 1751
+3 1401 1755 1390
+3 1047 1401 1390
+3 1402 1051 1756
+3 1051 1743 1756
+3 1757 1744 1758
+3 1744 1391 1758
+3 1758 1391 1759
+3 1391 1392 1759
+3 1392 1745 1759
+3 1393 1764 1750
+3 1764 1393 1765
+3 1393 1394 1765
+3 1403 1394 1395
+3 1765 1394 1403
+3 1396 1404 1403
+3 1395 1396 1403
+3 1404 1396 1405
+3 1397 1415 1414
+3 1398 1416 1415
+3 1397 1398 1415
+3 1399 1416 1398
+3 1766 1416 1399
+3 1766 1399 1767
+3 1399 1400 1767
+3 1400 1751 1767
+3 1418 1417 1755
+3 1419 1418 1755
+3 1401 1419 1755
+3 1756 1769 1065
+3 1402 1756 1065
+3 1403 1775 1765
+3 1775 1403 1776
+3 1403 1404 1776
+3 1420 1404 1405
+3 1776 1404 1420
+3 1406 1421 1420
+3 1405 1406 1420
+3 1407 1422 1421
+3 1406 1407 1421
+3 1408 1423 1422
+3 1407 1408 1422
+3 1409 1424 1423
+3 1408 1409 1423
+3 1410 1425 1424
+3 1409 1410 1424
+3 1411 1426 1425
+3 1410 1411 1425
+3 1412 1427 1426
+3 1411 1412 1426
+3 1413 1428 1427
+3 1412 1413 1427
+3 1414 1429 1428
+3 1413 1414 1428
+3 1415 1429 1414
+3 1777 1429 1415
+3 1777 1415 1778
+3 1415 1416 1778
+3 1416 1766 1778
+3 1783 1417 1430
+3 1417 1418 1430
+3 1431 1430 1418
+3 1419 1431 1418
+3 1432 1065 1784
+3 1065 1769 1784
+3 1420 1787 1776
+3 1787 1420 1788
+3 1420 1421 1788
+3 1788 1421 1789
+3 1421 1422 1789
+3 1789 1422 1790
+3 1422 1423 1790
+3 1790 1423 1791
+3 1423 1424 1791
+3 1791 1424 1792
+3 1424 1425 1792
+3 1792 1425 1793
+3 1425 1426 1793
+3 1793 1426 1794
+3 1426 1427 1794
+3 1794 1427 1795
+3 1427 1428 1795
+3 1795 1428 1796
+3 1428 1429 1796
+3 1429 1777 1796
+3 1800 1783 1433
+3 1783 1430 1433
+3 1434 1433 1430
+3 1431 1434 1430
+3 1435 1432 1801
+3 1432 1784 1801
+3 1433 1814 1800
+3 1436 1433 1434
+3 1814 1433 1436
+3 1436 1434 1437
+3 1438 1801 1815
+3 1435 1801 1438
+3 1817 1814 1818
+3 1814 1436 1818
+3 1439 1436 1437
+3 1818 1436 1439
+3 1439 1437 1440
+3 1438 1821 1450
+3 1821 1438 1815
+3 1439 1822 1818
+3 1823 1439 1440
+3 1822 1439 1823
+3 1441 1824 1823
+3 1440 1441 1823
+3 1442 1825 1824
+3 1441 1442 1824
+3 1443 1826 1825
+3 1442 1443 1825
+3 1444 1827 1826
+3 1443 1444 1826
+3 1445 1828 1827
+3 1444 1445 1827
+3 1446 1829 1828
+3 1445 1446 1828
+3 1447 1830 1829
+3 1446 1447 1829
+3 1448 1831 1830
+3 1447 1448 1830
+3 1448 1819 1831
+3 1449 1819 1448
+3 1819 1449 1820
+3 1449 1450 1820
+3 1820 1450 1821
+3 1457 1456 1451
+3 1457 1451 1458
+3 1451 1452 1458
+3 1458 1452 1459
+3 1452 1453 1459
+3 1459 1453 1460
+3 1453 1454 1460
+3 1460 1454 1461
+3 1466 1465 1455
+3 1466 1455 1467
+3 1455 1456 1467
+3 1467 1457 1084
+3 1456 1457 1467
+3 1458 1085 1084
+3 1457 1458 1084
+3 1459 1086 1085
+3 1458 1459 1085
+3 1460 1087 1086
+3 1459 1460 1086
+3 1460 1468 1087
+3 1461 1468 1460
+3 1468 1461 1469
+3 1461 1462 1469
+3 1469 1462 1470
+3 1462 1463 1470
+3 1470 1463 1471
+3 1473 1472 1464
+3 1473 1464 1474
+3 1464 1465 1474
+3 1474 1466 1088
+3 1465 1466 1474
+3 1467 1089 1088
+3 1466 1467 1088
+3 1089 1467 1084
+3 1468 1094 1087
+3 1469 1095 1094
+3 1468 1469 1094
+3 1469 1475 1095
+3 1470 1475 1469
+3 1475 1470 1476
+3 1470 1471 1476
+3 1476 1471 1477
+3 1479 1478 1472
+3 1479 1472 1480
+3 1472 1473 1480
+3 1480 1474 1096
+3 1473 1474 1480
+3 1096 1474 1088
+3 1475 1105 1095
+3 1476 1106 1105
+3 1475 1476 1105
+3 1476 1481 1106
+3 1477 1481 1476
+3 1481 1477 1482
+3 1484 1483 1478
+3 1484 1478 1485
+3 1478 1479 1485
+3 1485 1480 1107
+3 1479 1480 1485
+3 1107 1480 1096
+3 1481 1115 1106
+3 1481 1486 1115
+3 1482 1486 1481
+3 1486 1482 1487
+3 1869 1483 1488
+3 1483 1484 1488
+3 1488 1485 1116
+3 1484 1485 1488
+3 1116 1485 1107
+3 1115 1486 1489
+3 1121 1115 1489
+3 1489 1486 1490
+3 1486 1487 1490
+3 1492 1491 1869
+3 1492 1488 1122
+3 1869 1488 1492
+3 1122 1488 1116
+3 1489 1129 1121
+3 1489 1493 1129
+3 1490 1493 1489
+3 1493 1490 1494
+3 1873 1491 1495
+3 1491 1492 1495
+3 1496 1495 1492
+3 1122 1496 1492
+3 1129 1493 1497
+3 1134 1129 1497
+3 1497 1493 1498
+3 1493 1494 1498
+3 1876 1873 1499
+3 1873 1495 1499
+3 1500 1499 1495
+3 1496 1500 1495
+3 1134 1497 1501
+3 1139 1134 1501
+3 1501 1497 1502
+3 1497 1498 1502
+3 1879 1876 1503
+3 1876 1499 1503
+3 1504 1503 1499
+3 1500 1504 1499
+3 1139 1501 1505
+3 1144 1139 1505
+3 1505 1501 1506
+3 1501 1502 1506
+3 1882 1879 1507
+3 1879 1503 1507
+3 1508 1507 1503
+3 1504 1508 1503
+3 1144 1505 1509
+3 1150 1144 1509
+3 1509 1505 1510
+3 1505 1506 1510
+3 1885 1882 1511
+3 1882 1507 1511
+3 1512 1511 1507
+3 1508 1512 1507
+3 1150 1509 1513
+3 1156 1150 1513
+3 1513 1509 1514
+3 1509 1510 1514
+3 1887 1885 1515
+3 1885 1511 1515
+3 1516 1515 1511
+3 1512 1516 1511
+3 1156 1513 1518
+3 1517 1156 1518
+3 1518 1513 1519
+3 1513 1514 1519
+3 1515 1890 1887
+3 1520 1515 1516
+3 1890 1515 1520
+3 1520 1516 1521
+3 1517 1522 1169
+3 1518 1522 1517
+3 1523 1522 1518
+3 1523 1518 1891
+3 1518 1519 1891
+3 1893 1890 1524
+3 1890 1520 1524
+3 1525 1524 1520
+3 1521 1525 1520
+3 1169 1522 1527
+3 1526 1169 1527
+3 1527 1522 1528
+3 1522 1523 1528
+3 1523 1891 1528
+3 1524 1896 1893
+3 1529 1524 1525
+3 1896 1524 1529
+3 1529 1525 1530
+3 1526 1532 1531
+3 1527 1532 1526
+3 1533 1532 1527
+3 1533 1527 1897
+3 1527 1528 1897
+3 1529 1900 1896
+3 1534 1529 1530
+3 1900 1529 1534
+3 1534 1530 1535
+3 1531 1539 1538
+3 1532 1539 1531
+3 1540 1539 1532
+3 1540 1532 1901
+3 1532 1533 1901
+3 1533 1897 1901
+3 1534 1905 1900
+3 1541 1534 1535
+3 1905 1534 1541
+3 1536 1542 1541
+3 1535 1536 1541
+3 1542 1536 1543
+3 1537 1549 1548
+3 1538 1550 1549
+3 1537 1538 1549
+3 1539 1550 1538
+3 1906 1550 1539
+3 1906 1539 1907
+3 1539 1540 1907
+3 1540 1901 1907
+3 1541 1910 1905
+3 1910 1541 1911
+3 1541 1542 1911
+3 1551 1542 1543
+3 1911 1542 1551
+3 1544 1552 1551
+3 1543 1544 1551
+3 1545 1553 1552
+3 1544 1545 1552
+3 1546 1554 1553
+3 1545 1546 1553
+3 1547 1555 1554
+3 1546 1547 1554
+3 1548 1556 1555
+3 1547 1548 1555
+3 1549 1556 1548
+3 1912 1556 1549
+3 1912 1549 1913
+3 1549 1550 1913
+3 1550 1906 1913
+3 1551 1917 1911
+3 1917 1551 1918
+3 1551 1552 1918
+3 1918 1552 1919
+3 1552 1553 1919
+3 1919 1553 1920
+3 1553 1554 1920
+3 1920 1554 1921
+3 1554 1555 1921
+3 1921 1555 1922
+3 1555 1556 1922
+3 1556 1912 1922
+3 1568 1567 1557
+3 1568 1557 1569
+3 1557 1558 1569
+3 1569 1558 1570
+3 1558 1559 1570
+3 1570 1559 1571
+3 1559 1560 1571
+3 1571 1560 1572
+3 1560 1561 1572
+3 1572 1561 1573
+3 1561 1562 1573
+3 1573 1562 1574
+3 1562 1563 1574
+3 1574 1563 1575
+3 1563 1564 1575
+3 1575 1564 1576
+3 1579 1578 1565
+3 1579 1565 1580
+3 1565 1566 1580
+3 1580 1566 1581
+3 1566 1567 1581
+3 1581 1568 1198
+3 1567 1568 1581
+3 1569 1199 1198
+3 1568 1569 1198
+3 1570 1200 1199
+3 1569 1570 1199
+3 1571 1201 1200
+3 1570 1571 1200
+3 1572 1202 1201
+3 1571 1572 1201
+3 1573 1203 1202
+3 1572 1573 1202
+3 1574 1204 1203
+3 1573 1574 1203
+3 1575 1205 1204
+3 1574 1575 1204
+3 1575 1582 1205
+3 1576 1582 1575
+3 1582 1576 1583
+3 1576 1577 1583
+3 1583 1577 1584
+3 1588 1587 1578
+3 1588 1579 1206
+3 1578 1579 1588
+3 1580 1207 1206
+3 1579 1580 1206
+3 1581 1208 1207
+3 1580 1581 1207
+3 1208 1581 1198
+3 1582 1217 1205
+3 1583 1218 1217
+3 1582 1583 1217
+3 1584 1219 1218
+3 1583 1584 1218
+3 1584 1589 1219
+3 1585 1589 1584
+3 1589 1585 1590
+3 1593 1592 1586
+3 1593 1587 1220
+3 1586 1587 1593
+3 1588 1221 1220
+3 1587 1588 1220
+3 1221 1588 1206
+3 1589 1228 1219
+3 1589 1594 1228
+3 1590 1594 1589
+3 1594 1590 1595
+3 1590 1591 1595
+3 1595 1591 1596
+3 1598 1597 1592
+3 1598 1593 1229
+3 1592 1593 1598
+3 1229 1593 1220
+3 1594 1234 1228
+3 1595 1235 1234
+3 1594 1595 1234
+3 1595 1599 1235
+3 1596 1599 1595
+3 1599 1596 1600
+3 1602 1601 1597
+3 1602 1598 1236
+3 1597 1598 1602
+3 1236 1598 1229
+3 1235 1599 1603
+3 1241 1235 1603
+3 1603 1599 1604
+3 1599 1600 1604
+3 1604 1600 1605
+3 1991 1602 1242
+3 1601 1602 1991
+3 1242 1602 1236
+3 1603 1246 1241
+3 1603 1606 1246
+3 1604 1606 1603
+3 1606 1604 1607
+3 1604 1605 1607
+3 1609 1608 1991
+3 1610 1609 1991
+3 1242 1610 1991
+3 1606 1249 1246
+3 1606 1611 1249
+3 1607 1611 1606
+3 1611 1607 1612
+3 1614 1613 1608
+3 1614 1609 1250
+3 1608 1609 1614
+3 1250 1609 1610
+3 1611 1253 1249
+3 1611 1615 1253
+3 1612 1615 1611
+3 1615 1612 1616
+3 2001 1614 1254
+3 1613 1614 2001
+3 1254 1614 1250
+3 1253 1615 1617
+3 1257 1253 1617
+3 1617 1615 1618
+3 1615 1616 1618
+3 1620 1619 2001
+3 1621 1620 2001
+3 1254 1621 2001
+3 1617 1261 1257
+3 1617 1622 1261
+3 1618 1622 1617
+3 1622 1618 1623
+3 2005 1620 1262
+3 1619 1620 2005
+3 1262 1620 1621
+3 1261 1622 1624
+3 1265 1261 1624
+3 1624 1622 1625
+3 1622 1623 1625
+3 1627 1626 2005
+3 1628 1627 2005
+3 1262 1628 2005
+3 1624 1269 1265
+3 1624 1629 1269
+3 1625 1629 1624
+3 2010 1626 1630
+3 1626 1627 1630
+3 1631 1630 1627
+3 1628 1631 1627
+3 1269 1629 1632
+3 1271 1269 1632
+3 1632 1629 1633
+3 2012 1630 1272
+3 2010 1630 2012
+3 1272 1630 1631
+3 1271 1632 1634
+3 1275 1271 1634
+3 1634 1632 1635
+3 1632 1633 1635
+3 1636 2016 2012
+3 1272 1636 2012
+3 1634 1279 1275
+3 1634 1637 1279
+3 1635 1637 1634
+3 1639 1638 2016
+3 1640 1639 2016
+3 1636 1640 2016
+3 1279 1637 1641
+3 1283 1279 1641
+3 2020 1638 1642
+3 1638 1639 1642
+3 1643 1642 1639
+3 1640 1643 1639
+3 1283 1641 1644
+3 1287 1283 1644
+3 2023 2020 1645
+3 2020 1642 1645
+3 1646 1645 1642
+3 1643 1646 1642
+3 1287 1644 1647
+3 1289 1287 1647
+3 2026 1645 1290
+3 2023 1645 2026
+3 1290 1645 1646
+3 1289 1647 1648
+3 1294 1289 1648
+3 1648 1647 1649
+3 1650 2028 2026
+3 1290 1650 2026
+3 1294 1648 1651
+3 1297 1294 1651
+3 1651 1648 1652
+3 1648 1649 1652
+3 1653 2030 2028
+3 1650 1653 2028
+3 1297 1651 1654
+3 1300 1297 1654
+3 1654 1651 1655
+3 1651 1652 1655
+3 1656 2032 2030
+3 1653 1656 2030
+3 1300 1654 1657
+3 1303 1300 1657
+3 1657 1654 1658
+3 1654 1655 1658
+3 1659 2034 2032
+3 1656 1659 2032
+3 1303 1657 1660
+3 1307 1303 1660
+3 1660 1657 2035
+3 1657 1658 2035
+3 1661 2034 1659
+3 2037 2034 1661
+3 1661 1659 1662
+3 1307 1660 1663
+3 1310 1307 1663
+3 1660 2035 1663
+3 2040 2037 1664
+3 2037 1661 1664
+3 1665 1664 1661
+3 1662 1665 1661
+3 1310 1663 1666
+3 1313 1310 1666
+3 2043 2040 1667
+3 2040 1664 1667
+3 1668 1667 1664
+3 1665 1668 1664
+3 1313 1666 1669
+3 1317 1313 1669
+3 1667 2046 2043
+3 1670 2046 1667
+3 1668 1670 1667
+3 1317 1669 1671
+3 1321 1317 1671
+3 1672 2048 2046
+3 1670 1672 2046
+3 1321 1671 1674
+3 1673 1321 1674
+3 1679 2048 1672
+3 2052 2048 1679
+3 1679 1672 1680
+3 1673 1681 1329
+3 1674 1681 1673
+3 2053 1681 1674
+3 1675 2050 1676
+3 1330 2050 1675
+3 1678 1677 1675
+3 1676 1678 1675
+3 2057 1677 1678
+3 1682 1677 2057
+3 2058 2052 1683
+3 2052 1679 1683
+3 1684 1683 1679
+3 1680 1684 1679
+3 1329 1681 1686
+3 1685 1329 1686
+3 1681 2053 1686
+3 1330 1335 2055
+3 2050 1330 2055
+3 1687 1682 2061
+3 1682 2057 2061
+3 1683 2062 2058
+3 1688 2062 1683
+3 1684 1688 1683
+3 1685 1689 1340
+3 1686 1689 1685
+3 1690 1689 1686
+3 2055 1692 1691
+3 1335 1692 2055
+3 2061 2065 1693
+3 1687 2061 1693
+3 1694 2062 1688
+3 2069 2062 1694
+3 1694 1688 1695
+3 1340 1689 1697
+3 1696 1340 1697
+3 1697 1689 2070
+3 1689 1690 2070
+3 1346 1698 1691
+3 1346 1691 1692
+3 1699 1693 2073
+3 1693 2065 2073
+3 1694 2076 2069
+3 1703 2076 1694
+3 1695 1703 1694
+3 1696 1704 1352
+3 1697 1704 1696
+3 1705 1704 1697
+3 1697 2070 1705
+3 1353 1706 1698
+3 1353 1698 1346
+3 2073 2079 1707
+3 1699 2073 1707
+3 1354 1708 1700
+3 1700 1709 1354
+3 1701 1709 1700
+3 1709 1701 1710
+3 1701 1702 1710
+3 1711 2076 1703
+3 2082 2076 1711
+3 1711 1703 1712
+3 1352 1704 1714
+3 1713 1352 1714
+3 1714 1704 2083
+3 1704 1705 2083
+3 1359 1715 1706
+3 1359 1706 1353
+3 1716 1707 2086
+3 1707 2079 2086
+3 2087 1708 1361
+3 1361 1708 1354
+3 1709 1363 1354
+3 1709 1717 1363
+3 1710 1717 1709
+3 1717 1710 1718
+3 1711 2091 2082
+3 1719 2091 1711
+3 1712 1719 1711
+3 1713 1721 1720
+3 1714 1721 1713
+3 2092 1721 1714
+3 1714 2083 2092
+3 1369 1722 1715
+3 1369 1715 1359
+3 2086 2095 1723
+3 1716 2086 1723
+3 1361 1724 2087
+3 1724 2097 2087
+3 1363 1717 1725
+3 1371 1363 1725
+3 1725 1717 1726
+3 1717 1718 1726
+3 1726 1718 1727
+3 1728 2091 1719
+3 2100 2091 1728
+3 1728 1719 1729
+3 1720 1730 1377
+3 1721 1730 1720
+3 1731 1730 1721
+3 1721 2092 1731
+3 1733 1732 1722
+3 1734 1733 1722
+3 1369 1734 1722
+3 1735 1723 2103
+3 1723 2095 2103
+3 1724 1380 2096
+3 2097 1724 2096
+3 1371 1725 1736
+3 1383 1371 1736
+3 1736 1725 1737
+3 1725 1726 1737
+3 1737 1726 1738
+3 1726 1727 1738
+3 1728 2107 2100
+3 1739 1728 1729
+3 2107 1728 1739
+3 1739 1729 1740
+3 1377 1730 1742
+3 1741 1377 1742
+3 1742 1730 2108
+3 1730 1731 2108
+3 2110 1733 1390
+3 1732 1733 2110
+3 1390 1733 1734
+3 2103 2111 1743
+3 1735 2103 1743
+3 1380 1744 2096
+3 1744 2112 2096
+3 1383 1736 1746
+3 1745 1383 1746
+3 1746 1736 1747
+3 1736 1737 1747
+3 1747 1737 1748
+3 1737 1738 1748
+3 1739 2117 2107
+3 1749 1739 1740
+3 2117 1739 1749
+3 1749 1740 1750
+3 1741 1752 1751
+3 1742 1752 1741
+3 2118 1752 1742
+3 1742 2108 2118
+3 1754 1753 2110
+3 1755 1754 2110
+3 1390 1755 2110
+3 1756 1743 2121
+3 1743 2111 2121
+3 1744 1757 2112
+3 1757 2122 2112
+3 1745 1760 1759
+3 1746 1760 1745
+3 1761 1760 1746
+3 1761 1746 1762
+3 1746 1747 1762
+3 1762 1747 2123
+3 1747 1748 2123
+3 1749 2128 2117
+3 1763 1749 1750
+3 2128 1749 1763
+3 1763 1750 1764
+3 1751 1768 1767
+3 1752 1768 1751
+3 2129 1768 1752
+3 1752 2118 2129
+3 2133 1754 1417
+3 1753 1754 2133
+3 1417 1754 1755
+3 2121 2134 1769
+3 1756 2121 1769
+3 2122 1757 2136
+3 1758 1770 2136
+3 1757 1758 2136
+3 1759 1771 1770
+3 1758 1759 1770
+3 1760 1771 1759
+3 1772 1771 1760
+3 1772 1760 2137
+3 1760 1761 2137
+3 2137 1761 2138
+3 1761 1762 2138
+3 1762 2123 2138
+3 1763 2143 2128
+3 1773 1763 1764
+3 2143 1763 1773
+3 1765 1774 1773
+3 1764 1765 1773
+3 1774 1765 1775
+3 1766 1779 1778
+3 1767 1780 1779
+3 1766 1767 1779
+3 1768 1780 1767
+3 2144 1780 1768
+3 1768 2129 2144
+3 1782 1781 2133
+3 1783 1782 2133
+3 1417 1783 2133
+3 1784 1769 2146
+3 1769 2134 2146
+3 2147 2136 2148
+3 2136 1770 2148
+3 2148 1770 2149
+3 1770 1771 2149
+3 2149 1771 2150
+3 1771 1772 2150
+3 1772 2137 2150
+3 1773 2155 2143
+3 2155 1773 2156
+3 1773 1774 2156
+3 1785 1774 1775
+3 2156 1774 1785
+3 1776 1786 1785
+3 1775 1776 1785
+3 1786 1776 1787
+3 1777 1797 1796
+3 1778 1798 1797
+3 1777 1778 1797
+3 1779 1798 1778
+3 2157 1798 1779
+3 2157 1779 2158
+3 1779 1780 2158
+3 1780 2144 2158
+3 2160 1781 1799
+3 1781 1782 1799
+3 1800 1799 1782
+3 1783 1800 1782
+3 1801 2146 1802
+3 1784 2146 1801
+3 1785 2162 2156
+3 2162 1785 2163
+3 1785 1786 2163
+3 1803 1786 1787
+3 2163 1786 1803
+3 1788 1804 1803
+3 1787 1788 1803
+3 1789 1805 1804
+3 1788 1789 1804
+3 1790 1806 1805
+3 1789 1790 1805
+3 1791 1807 1806
+3 1790 1791 1806
+3 1792 1808 1807
+3 1791 1792 1807
+3 1793 1809 1808
+3 1792 1793 1808
+3 1794 1810 1809
+3 1793 1794 1809
+3 1795 1811 1810
+3 1794 1795 1810
+3 1796 1812 1811
+3 1795 1796 1811
+3 1797 1812 1796
+3 2164 1812 1797
+3 2164 1797 2165
+3 1797 1798 2165
+3 1798 2157 2165
+3 1799 2168 2160
+3 1813 1799 1800
+3 2168 1799 1813
+3 1813 1800 1814
+3 1802 1815 1801
+3 2169 1815 1802
+3 1803 2171 2163
+3 2171 1803 2172
+3 1803 1804 2172
+3 2172 1804 2173
+3 1804 1805 2173
+3 2173 1805 2174
+3 1805 1806 2174
+3 2174 1806 2175
+3 1806 1807 2175
+3 2175 1807 2176
+3 1807 1808 2176
+3 2176 1808 2177
+3 1808 1809 2177
+3 2177 1809 2178
+3 1809 1810 2178
+3 2178 1810 2179
+3 1810 1811 2179
+3 2179 1811 2180
+3 1811 1812 2180
+3 1812 2164 2180
+3 2183 2168 1816
+3 2168 1813 1816
+3 1817 1816 1813
+3 1814 1817 1813
+3 1821 1815 2169
+3 2185 1821 2169
+3 1816 2192 2183
+3 2193 1816 1817
+3 2192 1816 2193
+3 1818 2194 2193
+3 1817 1818 2193
+3 2194 1818 1822
+3 1819 2200 1831
+3 1819 2184 2200
+3 1820 2184 1819
+3 2184 1820 2185
+3 1820 1821 2185
+3 2195 2194 1822
+3 2195 1823 2201
+3 1822 1823 2195
+3 1824 2202 2201
+3 1823 1824 2201
+3 1825 2203 2202
+3 1824 1825 2202
+3 1826 2204 2203
+3 1825 1826 2203
+3 1827 2205 2204
+3 1826 1827 2204
+3 1827 2196 2205
+3 1828 2196 1827
+3 2196 1828 2197
+3 1828 1829 2197
+3 2197 1829 2198
+3 1829 1830 2198
+3 2198 1830 2199
+3 1830 1831 2199
+3 2199 1831 2200
+3 1842 1841 1832
+3 1842 1832 1843
+3 1832 1833 1843
+3 1843 1834 1451
+3 1833 1834 1843
+3 1835 1452 1451
+3 1834 1835 1451
+3 1836 1453 1452
+3 1835 1836 1452
+3 1837 1454 1453
+3 1836 1837 1453
+3 1837 1844 1454
+3 1838 1844 1837
+3 1844 1838 1845
+3 1838 1839 1845
+3 1845 1839 1846
+3 1849 1848 1840
+3 1849 1840 1850
+3 1840 1841 1850
+3 1850 1842 1455
+3 1841 1842 1850
+3 1843 1456 1455
+3 1842 1843 1455
+3 1456 1843 1451
+3 1844 1461 1454
+3 1845 1462 1461
+3 1844 1845 1461
+3 1846 1463 1462
+3 1845 1846 1462
+3 1846 1851 1463
+3 1847 1851 1846
+3 1851 1847 1852
+3 1854 1853 1848
+3 1854 1849 1464
+3 1848 1849 1854
+3 1850 1465 1464
+3 1849 1850 1464
+3 1465 1850 1455
+3 1851 1471 1463
+3 1851 1855 1471
+3 1852 1855 1851
+3 1855 1852 1856
+3 1858 1857 1853
+3 1858 1854 1472
+3 1853 1854 1858
+3 1472 1854 1464
+3 1855 1477 1471
+3 1855 1859 1477
+3 1856 1859 1855
+3 1859 1856 1860
+3 1862 1861 1857
+3 1862 1858 1478
+3 1857 1858 1862
+3 1478 1858 1472
+3 1859 1482 1477
+3 1859 1863 1482
+3 1860 1863 1859
+3 1863 1860 1864
+3 2240 1862 1483
+3 1861 1862 2240
+3 1483 1862 1478
+3 1863 1487 1482
+3 1863 1865 1487
+3 1864 1865 1863
+3 1865 1864 1866
+3 1868 1867 2240
+3 1869 1868 2240
+3 1483 1869 2240
+3 1487 1865 1870
+3 1490 1487 1870
+3 1870 1865 1871
+3 1865 1866 1871
+3 2243 1868 1491
+3 1867 1868 2243
+3 1491 1868 1869
+3 1870 1494 1490
+3 1870 1872 1494
+3 1871 1872 1870
+3 1873 2246 2243
+3 1491 1873 2243
+3 1494 1872 1874
+3 1498 1494 1874
+3 1874 1872 1875
+3 1876 2250 2246
+3 1873 1876 2246
+3 1498 1874 1877
+3 1502 1498 1877
+3 1877 1874 1878
+3 1874 1875 1878
+3 1879 2253 2250
+3 1876 1879 2250
+3 1502 1877 1880
+3 1506 1502 1880
+3 1880 1877 1881
+3 1877 1878 1881
+3 1882 2256 2253
+3 1879 1882 2253
+3 1506 1880 1883
+3 1510 1506 1883
+3 1883 1880 1884
+3 1880 1881 1884
+3 1885 2258 2256
+3 1882 1885 2256
+3 1510 1883 1886
+3 1514 1510 1886
+3 1886 1883 2259
+3 1883 1884 2259
+3 1887 2261 2258
+3 1885 1887 2258
+3 1514 1886 1888
+3 1519 1514 1888
+3 1886 2259 1888
+3 1889 2261 1887
+3 2263 2261 1889
+3 1889 1887 1890
+3 1519 1888 1892
+3 1891 1519 1892
+3 1889 2266 2263
+3 1893 2266 1889
+3 1890 1893 1889
+3 1891 1894 1528
+3 1892 1894 1891
+3 2267 1894 1892
+3 1895 2266 1893
+3 2269 2266 1895
+3 1895 1893 1896
+3 1528 1894 1898
+3 1897 1528 1898
+3 1894 2267 1898
+3 1895 2272 2269
+3 1899 1895 1896
+3 2272 1895 1899
+3 1899 1896 1900
+3 1897 1902 1901
+3 1898 1902 1897
+3 2273 1902 1898
+3 2274 2272 1903
+3 2272 1899 1903
+3 1904 1899 1900
+3 1903 1899 1904
+3 1904 1900 1905
+3 1901 1908 1907
+3 1902 1908 1901
+3 2275 1908 1902
+3 1902 2273 2275
+3 1903 2277 2274
+3 2277 1903 2278
+3 1903 1904 2278
+3 1909 1904 1905
+3 2278 1904 1909
+3 1909 1905 1910
+3 1906 1914 1913
+3 1907 1915 1914
+3 1906 1907 1914
+3 1908 1915 1907
+3 2279 1915 1908
+3 1908 2275 2279
+3 1909 2282 2278
+3 2283 1909 1910
+3 2282 1909 2283
+3 1911 1916 2283
+3 1910 1911 2283
+3 1916 1911 1917
+3 1912 1923 1922
+3 1913 1924 1923
+3 1912 1913 1923
+3 1914 1924 1913
+3 2284 1924 1914
+3 2284 1914 2285
+3 1914 1915 2285
+3 1915 2279 2285
+3 1916 2287 2283
+3 2288 1916 1917
+3 2287 1916 2288
+3 1918 2289 2288
+3 1917 1918 2288
+3 1919 2290 2289
+3 1918 1919 2289
+3 1920 2291 2290
+3 1919 1920 2290
+3 1921 2292 2291
+3 1920 1921 2291
+3 1922 2293 2292
+3 1921 1922 2292
+3 1923 2293 1922
+3 2294 2293 1923
+3 2294 1923 2295
+3 1923 1924 2295
+3 1924 2284 2295
+3 1928 1927 1925
+3 1928 1925 1929
+3 1925 1926 1929
+3 1929 1926 1930
+3 1932 1931 1927
+3 1932 1927 1933
+3 1927 1928 1933
+3 1933 1928 1934
+3 1928 1929 1934
+3 1934 1929 1935
+3 1929 1930 1935
+3 2322 1931 1936
+3 1931 1932 1936
+3 1936 1932 1937
+3 1932 1933 1937
+3 1937 1933 1938
+3 1933 1934 1938
+3 1938 1934 2323
+3 1934 1935 2323
+3 1940 1939 2322
+3 1940 2322 1941
+3 2322 1936 1941
+3 1941 1936 1942
+3 1936 1937 1942
+3 1942 1937 1943
+3 1937 1938 1943
+3 1938 2323 1943
+3 2351 1939 1956
+3 1939 1940 1956
+3 1956 1940 2352
+3 1940 1941 2352
+3 2352 1941 2353
+3 1941 1942 2353
+3 2353 1942 2354
+3 1942 1943 2354
+3 1959 1958 1944
+3 1959 1944 1960
+3 1944 1945 1960
+3 1960 1946 1557
+3 1945 1946 1960
+3 1947 1558 1557
+3 1946 1947 1557
+3 1948 1559 1558
+3 1947 1948 1558
+3 1949 1560 1559
+3 1948 1949 1559
+3 1950 1561 1560
+3 1949 1950 1560
+3 1951 1562 1561
+3 1950 1951 1561
+3 1952 1563 1562
+3 1951 1952 1562
+3 1953 1564 1563
+3 1952 1953 1563
+3 1953 1961 1564
+3 1954 1961 1953
+3 1961 1954 1962
+3 1954 1955 1962
+3 1962 1955 1963
+3 1956 2363 2351
+3 1956 2352 2363
+3 1966 1965 1957
+3 1966 1958 1565
+3 1957 1958 1966
+3 1959 1566 1565
+3 1958 1959 1565
+3 1960 1567 1566
+3 1959 1960 1566
+3 1567 1960 1557
+3 1961 1576 1564
+3 1962 1577 1576
+3 1961 1962 1576
+3 1962 1967 1577
+3 1963 1967 1962
+3 1967 1963 1968
+3 1963 1964 1968
+3 1968 1964 1969
+3 1972 1971 1965
+3 1972 1966 1578
+3 1965 1966 1972
+3 1578 1966 1565
+3 1967 1584 1577
+3 1968 1585 1584
+3 1967 1968 1584
+3 1968 1973 1585
+3 1969 1973 1968
+3 1973 1969 1974
+3 1977 1976 1970
+3 1977 1971 1586
+3 1970 1971 1977
+3 1972 1587 1586
+3 1971 1972 1586
+3 1587 1972 1578
+3 1973 1590 1585
+3 1974 1591 1590
+3 1973 1974 1590
+3 1974 1978 1591
+3 1975 1978 1974
+3 1978 1975 1979
+3 1981 1980 1976
+3 1981 1977 1592
+3 1976 1977 1981
+3 1592 1977 1586
+3 1978 1596 1591
+3 1978 1982 1596
+3 1979 1982 1978
+3 1982 1979 1983
+3 1985 1984 1980
+3 1985 1981 1597
+3 1980 1981 1985
+3 1597 1981 1592
+3 1982 1600 1596
+3 1982 1986 1600
+3 1983 1986 1982
+3 1986 1983 1987
+3 2384 1985 1601
+3 1984 1985 2384
+3 1601 1985 1597
+3 1986 1605 1600
+3 1986 1988 1605
+3 1987 1988 1986
+3 1990 1989 2384
+3 1991 1990 2384
+3 1601 1991 2384
+3 1605 1988 1992
+3 1607 1605 1992
+3 1992 1988 1993
+3 1995 1994 1989
+3 1995 1990 1608
+3 1989 1990 1995
+3 1608 1990 1991
+3 1992 1612 1607
+3 1992 1996 1612
+3 1993 1996 1992
+3 1996 1993 1997
+3 2390 1995 1613
+3 1994 1995 2390
+3 1613 1995 1608
+3 1996 1616 1612
+3 1996 1998 1616
+3 1997 1998 1996
+3 2000 1999 2390
+3 2001 2000 2390
+3 1613 2001 2390
+3 1616 1998 2002
+3 1618 1616 2002
+3 2002 1998 2003
+3 2394 2000 1619
+3 1999 2000 2394
+3 1619 2000 2001
+3 2002 1623 1618
+3 2002 2004 1623
+3 2003 2004 2002
+3 2005 2398 2394
+3 1619 2005 2394
+3 1623 2004 2006
+3 1625 1623 2006
+3 1626 2007 2398
+3 1626 2398 2005
+3 1625 2006 2008
+3 1629 1625 2008
+3 2008 2006 2009
+3 2010 2402 2007
+3 1626 2010 2007
+3 2008 1633 1629
+3 2008 2011 1633
+3 2009 2011 2008
+3 2012 2404 2402
+3 2010 2012 2402
+3 1633 2011 2013
+3 1635 1633 2013
+3 2015 2014 2404
+3 2016 2015 2404
+3 2012 2016 2404
+3 1635 2013 2017
+3 1637 1635 2017
+3 2409 2015 1638
+3 2014 2015 2409
+3 1638 2015 2016
+3 1637 2017 2018
+3 1641 1637 2018
+3 2018 2017 2019
+3 2020 2411 2409
+3 1638 2020 2409
+3 1641 2018 2021
+3 1644 1641 2021
+3 2021 2018 2022
+3 2018 2019 2022
+3 2023 2413 2411
+3 2020 2023 2411
+3 1644 2021 2024
+3 1647 1644 2024
+3 2024 2021 2025
+3 2021 2022 2025
+3 2026 2415 2413
+3 2023 2026 2413
+3 2024 1649 1647
+3 2024 2027 1649
+3 2025 2027 2024
+3 2028 2417 2415
+3 2026 2028 2415
+3 1649 2027 2029
+3 1652 1649 2029
+3 2030 2419 2417
+3 2028 2030 2417
+3 1652 2029 2031
+3 1655 1652 2031
+3 2032 2421 2419
+3 2030 2032 2419
+3 1655 2031 2033
+3 1658 1655 2033
+3 2034 2423 2421
+3 2032 2034 2421
+3 1658 2033 2036
+3 2035 1658 2036
+3 2037 2425 2423
+3 2034 2037 2423
+3 2035 2038 1663
+3 2036 2038 2035
+3 2039 2038 2036
+3 2040 2427 2425
+3 2037 2040 2425
+3 1663 2038 2041
+3 1666 1663 2041
+3 2041 2038 2042
+3 2038 2039 2042
+3 2043 2429 2427
+3 2040 2043 2427
+3 1666 2041 2044
+3 1669 1666 2044
+3 2044 2041 2430
+3 2041 2042 2430
+3 2045 2429 2043
+3 2432 2429 2045
+3 2045 2043 2046
+3 1669 2044 2047
+3 1671 1669 2047
+3 2044 2430 2047
+3 2045 2435 2432
+3 2048 2435 2045
+3 2046 2048 2045
+3 1671 2047 2049
+3 1674 1671 2049
+3 2434 1676 2051
+3 1676 2434 1678
+3 2434 2437 1678
+3 2052 2439 2435
+3 2048 2052 2435
+3 1674 2049 2054
+3 2053 1674 2054
+3 2050 2056 2051
+3 2050 2051 1676
+3 2437 2441 2057
+3 1678 2437 2057
+3 2058 2442 2439
+3 2052 2058 2439
+3 2053 2059 1686
+3 2054 2059 2053
+3 2443 2059 2054
+3 2055 2060 2056
+3 2055 2056 2050
+3 2061 2057 2445
+3 2057 2441 2445
+3 2451 2442 2058
+3 2451 2058 2062
+3 1686 2059 2063
+3 1690 1686 2063
+3 2059 2443 2063
+3 1691 2064 2060
+3 1691 2060 2055
+3 2445 2453 2065
+3 2061 2445 2065
+3 2069 2456 2451
+3 2062 2069 2451
+3 1690 2063 2071
+3 2070 1690 2071
+3 1698 2072 2064
+3 1698 2064 1691
+3 2073 2065 2458
+3 2065 2453 2458
+3 2461 2066 1700
+3 2067 1701 1700
+3 2066 2067 1700
+3 2068 1702 1701
+3 2067 2068 1701
+3 1702 2068 2074
+3 2075 2456 2069
+3 2464 2456 2075
+3 2075 2069 2076
+3 2070 2077 1705
+3 2071 2077 2070
+3 2465 2077 2071
+3 1706 2078 2072
+3 1706 2072 1698
+3 2458 2467 2079
+3 2073 2458 2079
+3 1700 1708 2460
+3 2461 1700 2460
+3 1702 2074 2080
+3 1710 1702 2080
+3 2080 2074 2081
+3 2075 2471 2464
+3 2082 2471 2075
+3 2076 2082 2075
+3 1705 2077 2084
+3 2083 1705 2084
+3 2077 2465 2084
+3 1715 2085 2078
+3 1715 2078 1706
+3 2086 2079 2473
+3 2079 2467 2473
+3 1708 2087 2460
+3 2087 2475 2460
+3 2080 1718 1710
+3 2080 2088 1718
+3 2081 2088 2080
+3 2088 2081 2089
+3 2090 2471 2082
+3 2478 2471 2090
+3 2090 2082 2091
+3 2083 2093 2092
+3 2084 2093 2083
+3 2479 2093 2084
+3 1722 2094 2085
+3 1722 2085 1715
+3 2473 2481 2095
+3 2086 2473 2095
+3 2087 2097 2475
+3 2097 2483 2475
+3 2088 1727 1718
+3 2088 2098 1727
+3 2089 2098 2088
+3 2098 2089 2099
+3 2090 2486 2478
+3 2100 2486 2090
+3 2091 2100 2090
+3 2092 2101 1731
+3 2093 2101 2092
+3 2487 2101 2093
+3 2093 2479 2487
+3 1732 2102 2094
+3 1732 2094 1722
+3 2103 2095 2489
+3 2095 2481 2489
+3 2097 2096 2482
+3 2483 2097 2482
+3 1727 2098 2104
+3 1738 1727 2104
+3 2104 2098 2105
+3 2098 2099 2105
+3 2106 2486 2100
+3 2493 2486 2106
+3 2106 2100 2107
+3 1731 2101 2109
+3 2108 1731 2109
+3 2101 2487 2109
+3 2110 2496 2102
+3 1732 2110 2102
+3 2489 2497 2111
+3 2103 2489 2111
+3 2096 2112 2482
+3 2112 2498 2482
+3 1738 2104 2113
+3 1748 1738 2113
+3 2113 2104 2114
+3 2104 2105 2114
+3 2114 2105 2115
+3 2106 2501 2493
+3 2116 2106 2107
+3 2501 2106 2116
+3 2116 2107 2117
+3 2108 2119 2118
+3 2109 2119 2108
+3 2502 2119 2109
+3 1753 2120 2496
+3 1753 2496 2110
+3 2121 2111 2505
+3 2111 2497 2505
+3 2112 2122 2498
+3 2122 2506 2498
+3 1748 2113 2124
+3 2123 1748 2124
+3 2124 2113 2125
+3 2113 2114 2125
+3 2125 2114 2126
+3 2114 2115 2126
+3 2116 2511 2501
+3 2127 2116 2117
+3 2511 2116 2127
+3 2127 2117 2128
+3 2118 2130 2129
+3 2119 2130 2118
+3 2512 2130 2119
+3 2119 2502 2512
+3 2132 2131 2120
+3 2133 2132 2120
+3 1753 2133 2120
+3 2505 2515 2134
+3 2121 2505 2134
+3 2506 2136 2135
+3 2122 2136 2506
+3 2123 2139 2138
+3 2124 2139 2123
+3 2140 2139 2124
+3 2140 2124 2141
+3 2124 2125 2141
+3 2141 2125 2516
+3 2125 2126 2516
+3 2127 2521 2511
+3 2142 2127 2128
+3 2521 2127 2142
+3 2142 2128 2143
+3 2129 2145 2144
+3 2130 2145 2129
+3 2522 2145 2130
+3 2130 2512 2522
+3 2524 2132 1781
+3 2131 2132 2524
+3 1781 2132 2133
+3 2146 2134 2525
+3 2134 2515 2525
+3 2147 2526 2135
+3 2136 2147 2135
+3 2137 2151 2150
+3 2138 2152 2151
+3 2137 2138 2151
+3 2139 2152 2138
+3 2153 2152 2139
+3 2153 2139 2527
+3 2139 2140 2527
+3 2527 2140 2528
+3 2140 2141 2528
+3 2141 2516 2528
+3 2142 2533 2521
+3 2154 2142 2143
+3 2533 2142 2154
+3 2154 2143 2155
+3 2144 2159 2158
+3 2145 2159 2144
+3 2534 2159 2145
+3 2145 2522 2534
+3 2160 2538 2524
+3 1781 2160 2524
+3 2525 2539 1802
+3 2146 2525 1802
+3 2540 2526 2147
+3 2148 2541 2540
+3 2147 2148 2540
+3 2149 2542 2541
+3 2148 2149 2541
+3 2150 2543 2542
+3 2149 2150 2542
+3 2151 2543 2150
+3 2544 2543 2151
+3 2544 2151 2545
+3 2151 2152 2545
+3 2545 2152 2546
+3 2152 2153 2546
+3 2153 2527 2546
+3 2154 2551 2533
+3 2552 2154 2155
+3 2551 2154 2552
+3 2156 2161 2552
+3 2155 2156 2552
+3 2161 2156 2162
+3 2157 2166 2165
+3 2158 2553 2166
+3 2157 2158 2166
+3 2159 2553 2158
+3 2554 2553 2159
+3 2159 2534 2554
+3 2167 2538 2160
+3 2557 2538 2167
+3 2167 2160 2168
+3 2169 1802 2558
+3 1802 2539 2558
+3 2161 2560 2552
+3 2561 2161 2162
+3 2560 2161 2561
+3 2163 2170 2561
+3 2162 2163 2561
+3 2170 2163 2171
+3 2164 2181 2180
+3 2165 2562 2181
+3 2164 2165 2181
+3 2166 2562 2165
+3 2563 2562 2166
+3 2166 2553 2563
+3 2566 2557 2182
+3 2557 2167 2182
+3 2183 2182 2167
+3 2168 2183 2167
+3 2169 2568 2185
+3 2558 2568 2169
+3 2170 2570 2561
+3 2571 2170 2171
+3 2570 2170 2571
+3 2172 2572 2571
+3 2171 2172 2571
+3 2173 2186 2572
+3 2172 2173 2572
+3 2174 2187 2186
+3 2173 2174 2186
+3 2175 2188 2187
+3 2174 2175 2187
+3 2176 2189 2188
+3 2175 2176 2188
+3 2177 2190 2189
+3 2176 2177 2189
+3 2178 2191 2190
+3 2177 2178 2190
+3 2179 2573 2191
+3 2178 2179 2191
+3 2180 2574 2573
+3 2179 2180 2573
+3 2181 2574 2180
+3 2575 2574 2181
+3 2181 2562 2575
+3 2182 2578 2566
+3 2579 2182 2183
+3 2578 2182 2579
+3 2579 2183 2192
+3 2184 2583 2200
+3 2184 2567 2583
+3 2185 2567 2184
+3 2567 2185 2568
+3 2186 2586 2572
+3 2586 2186 2587
+3 2186 2187 2587
+3 2587 2187 2588
+3 2187 2188 2588
+3 2588 2188 2589
+3 2188 2189 2589
+3 2589 2189 2590
+3 2189 2190 2590
+3 2590 2190 2591
+3 2190 2191 2591
+3 2191 2573 2591
+3 2594 2579 2192
+3 2193 2595 2594
+3 2192 2193 2594
+3 2194 2596 2595
+3 2193 2194 2595
+3 2195 2597 2596
+3 2194 2195 2596
+3 2597 2195 2201
+3 2196 2603 2205
+3 2197 2604 2603
+3 2196 2197 2603
+3 2197 2580 2604
+3 2198 2580 2197
+3 2580 2198 2581
+3 2198 2199 2581
+3 2581 2199 2582
+3 2199 2200 2582
+3 2582 2200 2583
+3 2598 2597 2201
+3 2598 2201 2599
+3 2201 2202 2599
+3 2599 2202 2600
+3 2202 2203 2600
+3 2600 2203 2601
+3 2203 2204 2601
+3 2601 2204 2602
+3 2204 2205 2602
+3 2602 2205 2603
+3 2217 2216 2206
+3 2217 2207 1832
+3 2206 2207 2217
+3 2208 1833 1832
+3 2207 2208 1832
+3 2209 1834 1833
+3 2208 2209 1833
+3 2210 1835 1834
+3 2209 2210 1834
+3 2211 1836 1835
+3 2210 2211 1835
+3 2212 1837 1836
+3 2211 2212 1836
+3 2213 1838 1837
+3 2212 2213 1837
+3 2214 1839 1838
+3 2213 2214 1838
+3 2214 2218 1839
+3 2215 2218 2214
+3 2218 2215 2219
+3 1840 2222 2216
+3 2217 1841 1840
+3 2216 2217 1840
+3 1841 2217 1832
+3 2218 1846 1839
+3 2219 1847 1846
+3 2218 2219 1846
+3 2219 2223 1847
+3 2220 2223 2219
+3 2223 2220 2224
+3 2226 2225 2221
+3 2226 2222 1848
+3 2221 2222 2226
+3 1848 2222 1840
+3 2223 1852 1847
+3 2223 2227 1852
+3 2224 2227 2223
+3 2227 2224 2228
+3 2230 2229 2225
+3 2230 2226 1853
+3 2225 2226 2230
+3 1853 2226 1848
+3 2227 1856 1852
+3 2227 2231 1856
+3 2228 2231 2227
+3 2231 2228 2232
+3 2234 2233 2229
+3 2234 2230 1857
+3 2229 2230 2234
+3 1857 2230 1853
+3 2231 1860 1856
+3 2231 2235 1860
+3 2232 2235 2231
+3 2235 2232 2236
+3 2632 2234 1861
+3 2233 2234 2632
+3 1861 2234 1857
+3 2235 1864 1860
+3 2235 2237 1864
+3 2236 2237 2235
+3 2239 2238 2632
+3 2240 2239 2632
+3 1861 2240 2632
+3 2237 1866 1864
+3 1866 2237 2241
+3 2637 2239 1867
+3 2238 2239 2637
+3 1867 2239 2240
+3 1866 2241 2242
+3 1871 1866 2242
+3 2243 2639 2637
+3 1867 2243 2637
+3 1871 2242 2244
+3 1872 1871 2244
+3 2244 2242 2245
+3 2246 2641 2639
+3 2243 2246 2639
+3 2244 1875 1872
+3 2244 2247 1875
+3 2245 2247 2244
+3 2249 2248 2641
+3 2250 2249 2641
+3 2246 2250 2641
+3 1875 2247 2251
+3 1878 1875 2251
+3 2645 2248 2252
+3 2248 2249 2252
+3 2253 2252 2249
+3 2250 2253 2249
+3 1878 2251 2254
+3 1881 1878 2254
+3 2647 2645 2255
+3 2645 2252 2255
+3 2256 2255 2252
+3 2253 2256 2252
+3 1881 2254 2257
+3 1884 1881 2257
+3 2255 2650 2647
+3 2258 2650 2255
+3 2256 2258 2255
+3 1884 2257 2260
+3 2259 1884 2260
+3 2261 2652 2650
+3 2258 2261 2650
+3 2259 2262 1888
+3 2260 2262 2259
+3 2653 2262 2260
+3 2263 2654 2652
+3 2261 2263 2652
+3 1888 2262 2264
+3 1892 1888 2264
+3 2262 2653 2264
+3 2265 2654 2263
+3 2656 2654 2265
+3 2265 2263 2266
+3 1892 2264 2268
+3 2267 1892 2268
+3 2265 2658 2656
+3 2269 2658 2265
+3 2266 2269 2265
+3 2267 2270 1898
+3 2268 2270 2267
+3 2659 2270 2268
+3 2271 2658 2269
+3 2660 2658 2271
+3 2271 2269 2272
+3 1898 2270 2661
+3 2273 1898 2661
+3 2270 2659 2661
+3 2271 2663 2660
+3 2274 2663 2271
+3 2272 2274 2271
+3 2273 2276 2275
+3 2276 2273 2661
+3 2666 2663 2274
+3 2666 2274 2277
+3 2275 2280 2279
+3 2276 2280 2275
+3 2667 2280 2276
+3 2669 2666 2277
+3 2278 2281 2669
+3 2277 2278 2669
+3 2281 2278 2282
+3 2279 2670 2285
+3 2280 2670 2279
+3 2671 2670 2280
+3 2280 2667 2671
+3 2281 2672 2669
+3 2673 2281 2282
+3 2672 2281 2673
+3 2283 2286 2673
+3 2282 2283 2673
+3 2286 2283 2287
+3 2284 2674 2295
+3 2285 2675 2674
+3 2284 2285 2674
+3 2675 2285 2670
+3 2286 2677 2673
+3 2678 2286 2287
+3 2677 2286 2678
+3 2288 2679 2678
+3 2287 2288 2678
+3 2289 2680 2679
+3 2288 2289 2679
+3 2290 2296 2680
+3 2289 2290 2680
+3 2291 2297 2296
+3 2290 2291 2296
+3 2292 2681 2297
+3 2291 2292 2297
+3 2293 2682 2681
+3 2292 2293 2681
+3 2294 2683 2682
+3 2293 2294 2682
+3 2295 2684 2683
+3 2294 2295 2683
+3 2684 2295 2674
+3 2296 2686 2680
+3 2686 2296 2687
+3 2296 2297 2687
+3 2297 2681 2687
+3 2300 2299 2298
+3 2300 2298 2301
+3 1925 2303 2299
+3 2300 1926 1925
+3 2299 2300 1925
+3 2300 2304 1926
+3 2301 2304 2300
+3 2304 2301 2305
+3 2301 2302 2305
+3 2305 2302 2306
+3 2700 2303 1927
+3 1927 2303 1925
+3 2304 1930 1926
+3 2304 2307 1930
+3 2305 2307 2304
+3 2307 2305 2308
+3 2305 2306 2308
+3 2308 2306 2309
+3 1927 1931 2698
+3 2700 1927 2698
+3 1930 2307 2310
+3 1935 1930 2310
+3 2310 2307 2311
+3 2307 2308 2311
+3 2311 2308 2312
+3 2308 2309 2312
+3 2698 2322 2321
+3 1931 2322 2698
+3 1935 2310 2324
+3 2323 1935 2324
+3 2324 2310 2325
+3 2310 2311 2325
+3 2325 2311 2326
+3 2311 2312 2326
+3 2330 2329 2313
+3 2330 2313 2331
+3 2313 2314 2331
+3 2331 2314 2332
+3 2314 2315 2332
+3 2332 2315 2333
+3 2315 2316 2333
+3 2333 2316 2334
+3 2316 2317 2334
+3 2334 2317 2335
+3 2317 2318 2335
+3 2335 2318 2336
+3 2318 2319 2336
+3 2336 2319 2337
+3 2319 2320 2337
+3 2337 2320 2338
+3 2729 2321 1939
+3 1939 2321 2322
+3 2323 2341 1943
+3 2324 2341 2323
+3 2342 2341 2324
+3 2342 2324 2343
+3 2324 2325 2343
+3 2343 2325 2344
+3 2325 2326 2344
+3 2347 2346 2327
+3 2347 2328 1944
+3 2327 2328 2347
+3 2329 1945 1944
+3 2328 2329 1944
+3 2330 1946 1945
+3 2329 2330 1945
+3 2331 1947 1946
+3 2330 2331 1946
+3 2332 1948 1947
+3 2331 2332 1947
+3 2333 1949 1948
+3 2332 2333 1948
+3 2334 1950 1949
+3 2333 2334 1949
+3 2335 1951 1950
+3 2334 2335 1950
+3 2336 1952 1951
+3 2335 2336 1951
+3 2337 1953 1952
+3 2336 2337 1952
+3 2338 1954 1953
+3 2337 2338 1953
+3 2339 1955 1954
+3 2338 2339 1954
+3 2339 2348 1955
+3 2340 2348 2339
+3 2348 2340 2349
+3 1939 2351 2729
+3 2351 2738 2729
+3 1943 2341 2355
+3 2354 1943 2355
+3 2355 2341 2356
+3 2341 2342 2356
+3 2356 2342 2739
+3 2342 2343 2739
+3 2739 2343 2740
+3 2343 2344 2740
+3 2358 2357 2345
+3 2358 2346 1957
+3 2345 2346 2358
+3 2347 1958 1957
+3 2346 2347 1957
+3 1958 2347 1944
+3 2348 1963 1955
+3 2349 1964 1963
+3 2348 2349 1963
+3 2349 2359 1964
+3 2350 2359 2349
+3 2359 2350 2360
+3 2361 2738 2351
+3 2362 2361 2351
+3 2362 2351 2363
+3 2352 2364 2363
+3 2353 2365 2364
+3 2352 2353 2364
+3 2354 2748 2365
+3 2353 2354 2365
+3 2355 2748 2354
+3 2749 2748 2355
+3 2749 2355 2750
+3 2355 2356 2750
+3 2356 2739 2750
+3 2367 2366 2357
+3 2367 2358 1965
+3 2357 2358 2367
+3 1965 2358 1957
+3 2359 1969 1964
+3 2359 2368 1969
+3 2360 2368 2359
+3 2368 2360 2369
+3 2362 2758 2361
+3 2759 2362 2363
+3 2758 2362 2759
+3 2364 2759 2363
+3 2760 2759 2364
+3 2760 2364 2761
+3 2364 2365 2761
+3 2365 2748 2761
+3 1970 2372 2366
+3 2367 1971 1970
+3 2366 2367 1970
+3 1971 2367 1965
+3 2368 1974 1969
+3 2369 1975 1974
+3 2368 2369 1974
+3 2369 2373 1975
+3 2370 2373 2369
+3 2373 2370 2374
+3 2376 2375 2371
+3 2376 2372 1976
+3 2371 2372 2376
+3 1976 2372 1970
+3 2373 1979 1975
+3 2373 2377 1979
+3 2374 2377 2373
+3 2379 2378 2375
+3 2379 2376 1980
+3 2375 2376 2379
+3 1980 2376 1976
+3 2377 1983 1979
+3 1983 2377 2380
+3 2774 2379 1984
+3 2378 2379 2774
+3 1984 2379 1980
+3 2380 1987 1983
+3 1987 2380 2381
+3 2383 2382 2774
+3 2384 2383 2774
+3 1984 2384 2774
+3 1987 2381 2385
+3 1988 1987 2385
+3 2385 2381 2386
+3 2778 2383 1989
+3 2382 2383 2778
+3 1989 2383 2384
+3 2385 1993 1988
+3 2385 2387 1993
+3 2386 2387 2385
+3 1994 2388 2778
+3 1994 2778 1989
+3 2387 1997 1993
+3 1997 2387 2389
+3 2390 2782 2388
+3 1994 2390 2388
+3 1997 2389 2391
+3 1998 1997 2391
+3 1999 2392 2782
+3 1999 2782 2390
+3 2391 2003 1998
+3 2003 2391 2393
+3 2394 2786 2392
+3 1999 2394 2392
+3 2003 2393 2395
+3 2004 2003 2395
+3 2397 2396 2786
+3 2398 2397 2786
+3 2394 2398 2786
+3 2004 2395 2399
+3 2006 2004 2399
+3 2399 2395 2400
+3 2790 2397 2007
+3 2396 2397 2790
+3 2007 2397 2398
+3 2399 2009 2006
+3 2399 2401 2009
+3 2400 2401 2399
+3 2402 2792 2790
+3 2007 2402 2790
+3 2009 2401 2403
+3 2011 2009 2403
+3 2404 2794 2792
+3 2402 2404 2792
+3 2011 2403 2405
+3 2013 2011 2405
+3 2014 2406 2794
+3 2014 2794 2404
+3 2013 2405 2407
+3 2017 2013 2407
+3 2407 2405 2408
+3 2409 2798 2406
+3 2014 2409 2406
+3 2407 2019 2017
+3 2407 2410 2019
+3 2408 2410 2407
+3 2411 2800 2798
+3 2409 2411 2798
+3 2019 2410 2412
+3 2022 2019 2412
+3 2413 2802 2800
+3 2411 2413 2800
+3 2022 2412 2414
+3 2025 2022 2414
+3 2415 2804 2802
+3 2413 2415 2802
+3 2025 2414 2416
+3 2027 2025 2416
+3 2417 2806 2804
+3 2415 2417 2804
+3 2027 2416 2418
+3 2029 2027 2418
+3 2419 2808 2806
+3 2417 2419 2806
+3 2029 2418 2420
+3 2031 2029 2420
+3 2421 2810 2808
+3 2419 2421 2808
+3 2031 2420 2422
+3 2033 2031 2422
+3 2423 2812 2810
+3 2421 2423 2810
+3 2033 2422 2424
+3 2036 2033 2424
+3 2425 2814 2812
+3 2423 2425 2812
+3 2036 2424 2426
+3 2039 2036 2426
+3 2427 2816 2814
+3 2425 2427 2814
+3 2039 2426 2428
+3 2042 2039 2428
+3 2429 2818 2816
+3 2427 2429 2816
+3 2042 2428 2431
+3 2430 2042 2431
+3 2432 2820 2818
+3 2429 2432 2818
+3 2430 2433 2047
+3 2431 2433 2430
+3 2821 2433 2431
+3 2825 2820 2432
+3 2825 2432 2435
+3 2047 2433 2436
+3 2049 2047 2436
+3 2433 2821 2436
+3 2051 2822 2434
+3 2822 2823 2434
+3 2434 2823 2437
+3 2823 2824 2437
+3 2824 2438 2437
+3 2439 2828 2825
+3 2435 2439 2825
+3 2049 2436 2440
+3 2054 2049 2440
+3 2051 2056 2827
+3 2822 2051 2827
+3 2438 2441 2437
+3 2831 2441 2438
+3 2442 2834 2828
+3 2439 2442 2828
+3 2054 2440 2444
+3 2443 2054 2444
+3 2056 2060 2830
+3 2827 2056 2830
+3 2445 2831 2446
+3 2441 2831 2445
+3 2450 2834 2442
+3 2840 2834 2450
+3 2450 2442 2451
+3 2443 2452 2063
+3 2444 2452 2443
+3 2841 2452 2444
+3 2060 2064 2836
+3 2830 2060 2836
+3 2446 2453 2445
+3 2844 2453 2446
+3 2067 2837 2447
+3 2066 2837 2067
+3 2448 2068 2067
+3 2447 2448 2067
+3 2448 2454 2068
+3 2449 2454 2448
+3 2454 2449 2455
+3 2450 2846 2840
+3 2456 2846 2450
+3 2451 2456 2450
+3 2063 2452 2457
+3 2071 2063 2457
+3 2452 2841 2457
+3 2064 2072 2842
+3 2836 2064 2842
+3 2458 2844 2459
+3 2453 2844 2458
+3 2066 2461 2837
+3 2461 2851 2837
+3 2454 2074 2068
+3 2454 2462 2074
+3 2455 2462 2454
+3 2462 2455 2463
+3 2464 2853 2846
+3 2456 2464 2846
+3 2071 2457 2466
+3 2465 2071 2466
+3 2072 2078 2848
+3 2842 2072 2848
+3 2459 2467 2458
+3 2857 2467 2459
+3 2461 2460 2850
+3 2851 2461 2850
+3 2462 2081 2074
+3 2462 2468 2081
+3 2463 2468 2462
+3 2468 2463 2469
+3 2470 2853 2464
+3 2859 2853 2470
+3 2470 2464 2471
+3 2465 2472 2084
+3 2466 2472 2465
+3 2860 2472 2466
+3 2078 2085 2855
+3 2848 2078 2855
+3 2473 2857 2474
+3 2467 2857 2473
+3 2460 2475 2850
+3 2475 2863 2850
+3 2468 2089 2081
+3 2468 2476 2089
+3 2469 2476 2468
+3 2476 2469 2477
+3 2470 2865 2859
+3 2478 2865 2470
+3 2471 2478 2470
+3 2084 2472 2866
+3 2479 2084 2866
+3 2472 2860 2866
+3 2861 2094 2480
+3 2085 2094 2861
+3 2855 2085 2861
+3 2474 2481 2473
+3 2868 2481 2474
+3 2475 2483 2863
+3 2483 2870 2863
+3 2476 2099 2089
+3 2476 2484 2099
+3 2477 2484 2476
+3 2484 2477 2485
+3 2873 2865 2478
+3 2873 2478 2486
+3 2479 2488 2487
+3 2488 2479 2866
+3 2876 2480 2102
+3 2102 2480 2094
+3 2489 2481 2877
+3 2481 2868 2877
+3 2483 2482 2869
+3 2870 2483 2869
+3 2099 2484 2490
+3 2105 2099 2490
+3 2490 2484 2491
+3 2484 2485 2491
+3 2491 2485 2492
+3 2493 2881 2873
+3 2486 2493 2873
+3 2487 2494 2109
+3 2488 2494 2487
+3 2882 2494 2488
+3 2876 2496 2495
+3 2102 2496 2876
+3 2877 2885 2497
+3 2489 2877 2497
+3 2482 2498 2869
+3 2498 2886 2869
+3 2490 2115 2105
+3 2490 2499 2115
+3 2491 2499 2490
+3 2499 2491 2500
+3 2491 2492 2500
+3 2890 2881 2493
+3 2890 2493 2501
+3 2109 2494 2503
+3 2502 2109 2503
+3 2494 2882 2503
+3 2120 2504 2495
+3 2120 2495 2496
+3 2505 2497 2894
+3 2497 2885 2894
+3 2498 2506 2886
+3 2506 2897 2886
+3 2115 2499 2507
+3 2126 2115 2507
+3 2507 2499 2508
+3 2499 2500 2508
+3 2508 2500 2509
+3 2510 2890 2501
+3 2901 2890 2510
+3 2510 2501 2511
+3 2502 2513 2512
+3 2503 2513 2502
+3 2902 2513 2503
+3 2131 2514 2504
+3 2131 2504 2120
+3 2894 2907 2515
+3 2505 2894 2515
+3 2506 2135 2896
+3 2897 2506 2896
+3 2126 2507 2517
+3 2516 2126 2517
+3 2517 2507 2518
+3 2507 2508 2518
+3 2518 2508 2519
+3 2508 2509 2519
+3 2510 2911 2901
+3 2520 2510 2511
+3 2911 2510 2520
+3 2520 2511 2521
+3 2512 2523 2522
+3 2513 2523 2512
+3 2912 2523 2513
+3 2513 2902 2912
+3 2524 2918 2514
+3 2131 2524 2514
+3 2525 2515 2919
+3 2515 2907 2919
+3 2135 2526 2896
+3 2526 2920 2896
+3 2516 2529 2528
+3 2517 2529 2516
+3 2530 2529 2517
+3 2530 2517 2531
+3 2517 2518 2531
+3 2531 2518 2921
+3 2518 2519 2921
+3 2520 2925 2911
+3 2532 2520 2521
+3 2925 2520 2532
+3 2532 2521 2533
+3 2522 2535 2534
+3 2523 2535 2522
+3 2926 2535 2523
+3 2523 2912 2926
+3 2537 2536 2918
+3 2538 2537 2918
+3 2524 2538 2918
+3 2919 2930 2539
+3 2525 2919 2539
+3 2920 2526 2931
+3 2931 2526 2540
+3 2527 2547 2546
+3 2528 2548 2547
+3 2527 2528 2547
+3 2529 2548 2528
+3 2549 2548 2529
+3 2549 2529 2932
+3 2529 2530 2932
+3 2932 2530 2933
+3 2530 2531 2933
+3 2531 2921 2933
+3 2532 2938 2925
+3 2550 2532 2533
+3 2938 2532 2550
+3 2550 2533 2551
+3 2534 2555 2554
+3 2535 2555 2534
+3 2939 2555 2535
+3 2535 2926 2939
+3 2941 2536 2556
+3 2536 2537 2556
+3 2557 2556 2537
+3 2538 2557 2537
+3 2558 2539 2942
+3 2539 2930 2942
+3 2943 2931 2540
+3 2541 2944 2943
+3 2540 2541 2943
+3 2542 2945 2944
+3 2541 2542 2944
+3 2543 2946 2945
+3 2542 2543 2945
+3 2544 2947 2946
+3 2543 2544 2946
+3 2545 2948 2947
+3 2544 2545 2947
+3 2546 2949 2948
+3 2545 2546 2948
+3 2547 2949 2546
+3 2950 2949 2547
+3 2950 2547 2951
+3 2547 2548 2951
+3 2951 2548 2952
+3 2548 2549 2952
+3 2549 2932 2952
+3 2550 2956 2938
+3 2957 2550 2551
+3 2956 2550 2957
+3 2552 2559 2957
+3 2551 2552 2957
+3 2559 2552 2560
+3 2553 2564 2563
+3 2554 2958 2564
+3 2553 2554 2564
+3 2555 2958 2554
+3 2959 2958 2555
+3 2555 2939 2959
+3 2961 2941 2565
+3 2941 2556 2565
+3 2566 2565 2556
+3 2557 2566 2556
+3 2568 2558 2962
+3 2558 2942 2962
+3 2559 2964 2957
+3 2965 2559 2560
+3 2964 2559 2965
+3 2561 2569 2965
+3 2560 2561 2965
+3 2569 2561 2570
+3 2562 2576 2575
+3 2563 2966 2576
+3 2562 2563 2576
+3 2564 2966 2563
+3 2967 2966 2564
+3 2564 2958 2967
+3 2565 2971 2961
+3 2577 2565 2566
+3 2971 2565 2577
+3 2577 2566 2578
+3 2567 2975 2583
+3 2567 2962 2975
+3 2568 2962 2567
+3 2569 2977 2965
+3 2978 2569 2570
+3 2977 2569 2978
+3 2571 2584 2978
+3 2570 2571 2978
+3 2572 2585 2584
+3 2571 2572 2584
+3 2585 2572 2586
+3 2573 2592 2591
+3 2574 2593 2592
+3 2573 2574 2592
+3 2575 2979 2593
+3 2574 2575 2593
+3 2576 2979 2575
+3 2980 2979 2576
+3 2576 2966 2980
+3 2577 2983 2971
+3 2984 2577 2578
+3 2983 2577 2984
+3 2579 2985 2984
+3 2578 2579 2984
+3 2985 2579 2594
+3 2580 2992 2604
+3 2580 2972 2992
+3 2581 2972 2580
+3 2972 2581 2973
+3 2581 2582 2973
+3 2973 2582 2974
+3 2582 2583 2974
+3 2974 2583 2975
+3 2584 2993 2978
+3 2993 2584 2994
+3 2584 2585 2994
+3 2995 2585 2586
+3 2994 2585 2995
+3 2587 2996 2995
+3 2586 2587 2995
+3 2588 2997 2996
+3 2587 2588 2996
+3 2589 2998 2997
+3 2588 2589 2997
+3 2590 2999 2998
+3 2589 2590 2998
+3 2591 3000 2999
+3 2590 2591 2999
+3 2592 3000 2591
+3 3001 3000 2592
+3 3001 2592 3002
+3 2592 2593 3002
+3 2593 2979 3002
+3 3003 2985 2594
+3 2595 3004 3003
+3 2594 2595 3003
+3 2596 3005 3004
+3 2595 2596 3004
+3 2597 3006 3005
+3 2596 2597 3005
+3 2598 3007 3006
+3 2597 2598 3006
+3 2598 2986 3007
+3 2599 2986 2598
+3 2986 2599 2987
+3 2599 2600 2987
+3 2987 2600 2988
+3 2600 2601 2988
+3 2988 2601 2989
+3 2601 2602 2989
+3 2989 2602 2990
+3 2602 2603 2990
+3 2990 2603 2991
+3 2603 2604 2991
+3 2991 2604 2992
+3 2206 2616 2605
+3 2606 2207 2206
+3 2605 2606 2206
+3 2607 2208 2207
+3 2606 2607 2207
+3 2608 2209 2208
+3 2607 2608 2208
+3 2609 2210 2209
+3 2608 2609 2209
+3 2610 2211 2210
+3 2609 2610 2210
+3 2611 2212 2211
+3 2610 2611 2211
+3 2612 2213 2212
+3 2611 2612 2212
+3 2613 2214 2213
+3 2612 2613 2213
+3 2614 2215 2214
+3 2613 2614 2214
+3 2215 2614 2617
+3 2620 2619 2615
+3 2620 2616 2216
+3 2615 2616 2620
+3 2216 2616 2206
+3 2617 2219 2215
+3 2618 2220 2219
+3 2617 2618 2219
+3 2220 2618 2621
+3 2221 2622 2619
+3 2620 2222 2221
+3 2619 2620 2221
+3 2222 2620 2216
+3 2621 2224 2220
+3 2224 2621 2623
+3 2225 2625 2622
+3 2225 2622 2221
+3 2623 2228 2224
+3 2623 2626 2228
+3 2624 2626 2623
+3 2626 2624 2627
+3 2229 2628 2625
+3 2229 2625 2225
+3 2626 2232 2228
+3 2626 2629 2232
+3 2627 2629 2626
+3 2233 2630 2628
+3 2233 2628 2229
+3 2629 2236 2232
+3 2236 2629 2631
+3 2632 3034 2630
+3 2233 2632 2630
+3 2236 2631 2633
+3 2237 2236 2633
+3 2633 2631 2634
+3 2238 2635 3034
+3 2238 3034 2632
+3 2633 2241 2237
+3 2633 2636 2241
+3 2634 2636 2633
+3 2637 3037 2635
+3 2238 2637 2635
+3 2241 2636 2638
+3 2242 2241 2638
+3 2639 3039 3037
+3 2637 2639 3037
+3 2638 2245 2242
+3 2245 2638 2640
+3 2641 3040 3039
+3 2639 2641 3039
+3 2245 2640 2642
+3 2247 2245 2642
+3 2248 2643 3040
+3 2248 3040 2641
+3 2247 2642 2644
+3 2251 2247 2644
+3 2645 3043 2643
+3 2248 2645 2643
+3 2251 2644 2646
+3 2254 2251 2646
+3 2647 3045 3043
+3 2645 2647 3043
+3 2254 2646 2648
+3 2257 2254 2648
+3 2649 3045 2647
+3 3047 3045 2649
+3 2649 2647 2650
+3 2257 2648 2651
+3 2260 2257 2651
+3 2649 3048 3047
+3 2652 3048 2649
+3 2650 2652 2649
+3 2260 2651 3049
+3 2653 2260 3049
+3 2654 3050 3048
+3 2652 2654 3048
+3 2653 2655 2264
+3 2655 2653 3049
+3 2656 3052 3050
+3 2654 2656 3050
+3 2264 2655 2657
+3 2268 2264 2657
+3 3054 3052 2656
+3 3054 2656 2658
+3 2268 2657 3055
+3 2659 2268 3055
+3 2660 3056 3054
+3 2658 2660 3054
+3 2659 2662 2661
+3 2662 2659 3055
+3 3058 3056 2660
+3 3058 2660 2663
+3 2661 2664 2276
+3 2662 2664 2661
+3 3059 2664 2662
+3 2665 3058 2663
+3 3060 3058 2665
+3 2665 2663 2666
+3 2276 2664 3061
+3 2667 2276 3061
+3 2664 3059 3061
+3 2665 3062 3060
+3 2668 2665 2666
+3 3062 2665 2668
+3 2668 2666 2669
+3 2667 3063 2671
+3 3063 2667 3061
+3 2668 3064 3062
+3 3065 2668 2669
+3 3064 2668 3065
+3 3065 2669 2672
+3 2670 2676 2675
+3 2671 3066 2676
+3 2670 2671 2676
+3 3066 2671 3063
+3 3067 3065 2672
+3 2673 3068 3067
+3 2672 2673 3067
+3 3068 2673 2677
+3 2674 2685 2684
+3 2675 3069 2685
+3 2674 2675 2685
+3 2676 3069 2675
+3 3070 3069 2676
+3 2676 3066 3070
+3 3073 3068 2677
+3 2678 3074 3073
+3 2677 2678 3073
+3 2679 3075 3074
+3 2678 2679 3074
+3 2680 3076 3075
+3 2679 2680 3075
+3 3076 2680 2686
+3 2681 3077 2687
+3 2682 3078 3077
+3 2681 2682 3077
+3 2683 3079 3078
+3 2682 2683 3078
+3 2684 3080 3079
+3 2683 2684 3079
+3 2685 3080 2684
+3 3081 3080 2685
+3 2685 3069 3081
+3 3087 3076 2686
+3 2687 3088 3087
+3 2686 2687 3087
+3 3088 2687 3077
+3 3082 2298 2690
+3 2298 3082 2688
+3 2298 2688 2691
+3 2691 2688 2692
+3 2688 2689 2692
+3 2692 2689 2693
+3 3098 2690 2299
+3 2299 2690 2298
+3 2691 2301 2298
+3 2692 2302 2301
+3 2691 2692 2301
+3 2692 2694 2302
+3 2693 2694 2692
+3 2694 2693 2695
+3 2299 2303 3096
+3 3098 2299 3096
+3 2694 2306 2302
+3 2694 2696 2306
+3 2695 2696 2694
+3 2696 2695 2697
+3 3096 2700 2699
+3 2303 2700 3096
+3 2696 2309 2306
+3 2696 2701 2309
+3 2697 2701 2696
+3 2701 2697 2702
+3 3127 2699 2698
+3 2698 2699 2700
+3 2309 2701 2713
+3 2312 2309 2713
+3 2713 2701 2714
+3 2701 2702 2714
+3 2714 2702 2715
+3 2718 2717 2703
+3 2718 2704 2313
+3 2703 2704 2718
+3 2705 2314 2313
+3 2704 2705 2313
+3 2706 2315 2314
+3 2705 2706 2314
+3 2707 2316 2315
+3 2706 2707 2315
+3 2708 2317 2316
+3 2707 2708 2316
+3 2709 2318 2317
+3 2708 2709 2317
+3 2710 2319 2318
+3 2709 2710 2318
+3 2711 2320 2319
+3 2710 2711 2319
+3 2711 2719 2320
+3 2712 2719 2711
+3 2719 2712 2720
+3 2698 2321 3126
+3 3127 2698 3126
+3 2312 2713 2722
+3 2326 2312 2722
+3 2722 2713 2723
+3 2713 2714 2723
+3 2723 2714 2724
+3 2714 2715 2724
+3 2327 2726 2716
+3 2717 2328 2327
+3 2716 2717 2327
+3 2718 2329 2328
+3 2717 2718 2328
+3 2329 2718 2313
+3 2719 2338 2320
+3 2720 2339 2338
+3 2719 2720 2338
+3 2721 2340 2339
+3 2720 2721 2339
+3 2340 2721 2727
+3 2321 2729 3126
+3 2729 3144 3126
+3 2326 2722 2730
+3 2344 2326 2730
+3 2730 2722 2731
+3 2722 2723 2731
+3 2731 2723 2732
+3 2723 2724 2732
+3 2732 2724 3145
+3 2345 2734 2725
+3 2726 2346 2345
+3 2725 2726 2345
+3 2346 2726 2327
+3 2727 2349 2340
+3 2728 2350 2349
+3 2727 2728 2349
+3 2350 2728 2735
+3 3144 2738 2737
+3 2729 2738 3144
+3 2344 2730 2741
+3 2740 2344 2741
+3 2741 2730 2742
+3 2730 2731 2742
+3 2742 2731 2743
+3 2731 2732 2743
+3 2732 3145 2743
+3 2745 2744 2733
+3 2745 2734 2357
+3 2733 2734 2745
+3 2357 2734 2345
+3 2735 2360 2350
+3 2735 2746 2360
+3 2736 2746 2735
+3 2746 2736 2747
+3 3157 2737 2361
+3 2361 2737 2738
+3 2739 2751 2750
+3 2740 2752 2751
+3 2739 2740 2751
+3 2741 2752 2740
+3 2753 2752 2741
+3 2753 2741 2754
+3 2741 2742 2754
+3 2754 2742 3158
+3 2742 2743 3158
+3 2756 2755 2744
+3 2756 2745 2366
+3 2744 2745 2756
+3 2366 2745 2357
+3 2746 2369 2360
+3 2747 2370 2369
+3 2746 2747 2369
+3 2370 2747 2757
+3 3157 2361 3164
+3 3164 2361 2758
+3 2748 2762 2761
+3 2749 2763 2762
+3 2748 2749 2762
+3 2750 2764 2763
+3 2749 2750 2763
+3 2751 2764 2750
+3 2765 2764 2751
+3 2765 2751 3166
+3 2751 2752 3166
+3 3166 2752 3167
+3 2752 2753 3167
+3 3167 2753 3168
+3 2753 2754 3168
+3 2754 3158 3168
+3 2371 2766 2755
+3 2756 2372 2371
+3 2755 2756 2371
+3 2372 2756 2366
+3 2757 2374 2370
+3 2374 2757 2767
+3 3165 3164 2758
+3 3165 2759 3173
+3 2758 2759 3165
+3 2760 3174 3173
+3 2759 2760 3173
+3 2761 3175 3174
+3 2760 2761 3174
+3 2762 3175 2761
+3 3176 3175 2762
+3 3176 2762 3177
+3 2762 2763 3177
+3 3177 2763 3178
+3 2763 2764 3178
+3 3178 2764 3179
+3 2764 2765 3179
+3 2765 3166 3179
+3 2375 2768 2766
+3 2375 2766 2371
+3 2374 2767 2769
+3 2377 2374 2769
+3 2769 2767 2770
+3 2378 2771 2768
+3 2378 2768 2375
+3 2769 2380 2377
+3 2769 2772 2380
+3 2770 2772 2769
+3 2772 2770 2773
+3 2774 3186 2771
+3 2378 2774 2771
+3 2772 2381 2380
+3 2772 2775 2381
+3 2773 2775 2772
+3 2382 2776 3186
+3 2382 3186 2774
+3 2775 2386 2381
+3 2386 2775 2777
+3 2778 3190 2776
+3 2382 2778 2776
+3 2386 2777 2779
+3 2387 2386 2779
+3 2388 2780 3190
+3 2388 3190 2778
+3 2779 2389 2387
+3 2389 2779 2781
+3 2782 3194 2780
+3 2388 2782 2780
+3 2389 2781 2783
+3 2391 2389 2783
+3 2392 2784 3194
+3 2392 3194 2782
+3 2783 2393 2391
+3 2393 2783 2785
+3 2786 3198 2784
+3 2392 2786 2784
+3 2393 2785 2787
+3 2395 2393 2787
+3 2396 2788 3198
+3 2396 3198 2786
+3 2787 2400 2395
+3 2400 2787 2789
+3 2790 3201 2788
+3 2396 2790 2788
+3 2400 2789 2791
+3 2401 2400 2791
+3 2792 3203 3201
+3 2790 2792 3201
+3 2401 2791 2793
+3 2403 2401 2793
+3 2794 3205 3203
+3 2792 2794 3203
+3 2403 2793 2795
+3 2405 2403 2795
+3 2406 2796 3205
+3 2406 3205 2794
+3 2795 2408 2405
+3 2408 2795 2797
+3 2798 3207 2796
+3 2406 2798 2796
+3 2408 2797 2799
+3 2410 2408 2799
+3 2800 3210 3207
+3 2798 2800 3207
+3 2410 2799 2801
+3 2412 2410 2801
+3 2802 3212 3210
+3 2800 2802 3210
+3 2412 2801 2803
+3 2414 2412 2803
+3 2804 3214 3212
+3 2802 2804 3212
+3 2414 2803 2805
+3 2416 2414 2805
+3 2806 3216 3214
+3 2804 2806 3214
+3 2416 2805 2807
+3 2418 2416 2807
+3 2808 3218 3216
+3 2806 2808 3216
+3 2418 2807 2809
+3 2420 2418 2809
+3 2810 3220 3218
+3 2808 2810 3218
+3 2420 2809 2811
+3 2422 2420 2811
+3 2812 3222 3220
+3 2810 2812 3220
+3 2422 2811 2813
+3 2424 2422 2813
+3 2814 3224 3222
+3 2812 2814 3222
+3 2424 2813 2815
+3 2426 2424 2815
+3 2816 3226 3224
+3 2814 2816 3224
+3 2426 2815 2817
+3 2428 2426 2817
+3 2818 3228 3226
+3 2816 2818 3226
+3 2428 2817 2819
+3 2431 2428 2819
+3 2820 3229 3228
+3 2818 2820 3228
+3 2431 2819 3230
+3 2821 2431 3230
+3 3234 3229 2820
+3 3234 2820 2825
+3 2821 2826 2436
+3 2826 2821 3230
+3 2822 3231 2823
+3 3231 3232 2823
+3 2823 3232 2824
+3 3232 3233 2824
+3 2824 3233 2438
+3 3233 3237 2438
+3 2828 3238 3234
+3 2825 2828 3234
+3 2436 2826 2829
+3 2440 2436 2829
+3 2822 2827 3236
+3 3231 2822 3236
+3 2831 2438 3242
+3 2438 3237 3242
+3 2834 3245 3238
+3 2828 2834 3238
+3 2440 2829 2835
+3 2444 2440 2835
+3 2827 2830 3240
+3 3236 2827 3240
+3 3242 3249 2446
+3 2831 3242 2446
+3 2447 2838 2832
+3 2833 2448 2447
+3 2832 2833 2447
+3 3243 2448 2833
+3 2449 2448 3243
+3 3243 2839 2449
+3 2840 3251 3245
+3 2834 2840 3245
+3 2444 2835 3252
+3 2841 2444 3252
+3 3247 2836 2843
+3 2830 2836 3247
+3 3240 2830 3247
+3 2844 2446 3253
+3 2446 3249 3253
+3 3254 2838 2837
+3 2837 2838 2447
+3 2839 2455 2449
+3 2455 2839 2845
+3 3256 3251 2840
+3 3256 2840 2846
+3 2841 2847 2457
+3 2847 2841 3252
+3 2842 2849 2843
+3 2842 2843 2836
+3 3253 3258 2459
+3 2844 3253 2459
+3 2837 2851 3254
+3 2851 3260 3254
+3 2845 2463 2455
+3 2463 2845 2852
+3 2853 3262 3256
+3 2846 2853 3256
+3 2457 2847 2854
+3 2466 2457 2854
+3 2848 2856 2849
+3 2848 2849 2842
+3 2857 2459 3264
+3 2459 3258 3264
+3 2851 2850 3259
+3 3260 2851 3259
+3 2852 2469 2463
+3 2469 2852 2858
+3 2859 3266 3262
+3 2853 2859 3262
+3 2466 2854 3267
+3 2860 2466 3267
+3 2855 2862 2856
+3 2855 2856 2848
+3 3264 3271 2474
+3 2857 3264 2474
+3 2850 2863 3259
+3 2863 3272 3259
+3 2858 2477 2469
+3 2477 2858 2864
+3 3275 3266 2859
+3 3275 2859 2865
+3 2860 2867 2866
+3 2867 2860 3267
+3 2861 3269 2862
+3 2480 3269 2861
+3 2861 2862 2855
+3 2868 2474 3280
+3 2474 3271 3280
+3 2863 2870 3272
+3 2870 3282 3272
+3 2864 2485 2477
+3 2485 2864 2871
+3 3284 3275 2865
+3 3284 2865 2873
+3 2866 2874 2488
+3 2867 2874 2866
+3 3285 2874 2867
+3 3269 2876 2875
+3 2480 2876 3269
+3 2877 3280 2878
+3 2868 3280 2877
+3 2870 2869 3281
+3 3282 2870 3281
+3 2871 2492 2485
+3 2871 2879 2492
+3 2872 2879 2871
+3 2879 2872 2880
+3 2881 3291 3284
+3 2873 2881 3284
+3 2488 2874 2883
+3 2882 2488 2883
+3 2874 3285 2883
+3 2495 2884 2875
+3 2495 2875 2876
+3 2878 2885 2877
+3 3295 2885 2878
+3 2869 2886 3281
+3 2886 3296 3281
+3 2492 2879 2887
+3 2500 2492 2887
+3 2887 2879 2888
+3 2879 2880 2888
+3 2888 2880 2889
+3 3300 3291 2881
+3 3300 2881 2890
+3 2882 2891 2503
+3 2883 2891 2882
+3 2892 2891 2883
+3 2504 2893 2884
+3 2504 2884 2495
+3 2894 3295 2895
+3 2885 3295 2894
+3 2886 2897 3296
+3 2897 3304 3296
+3 2887 2509 2500
+3 2887 2898 2509
+3 2888 2898 2887
+3 2898 2888 2899
+3 2888 2889 2899
+3 2899 2889 2900
+3 2901 3307 3300
+3 2890 2901 3300
+3 2503 2891 2903
+3 2902 2503 2903
+3 2903 2891 2904
+3 2891 2892 2904
+3 2904 2892 2905
+3 2514 2906 2893
+3 2514 2893 2504
+3 2895 2907 2894
+3 3308 2907 2895
+3 2897 2896 3303
+3 3304 2897 3303
+3 2509 2898 2908
+3 2519 2509 2908
+3 2908 2898 2909
+3 2898 2899 2909
+3 2909 2899 2910
+3 2899 2900 2910
+3 3313 3307 2901
+3 3313 2901 2911
+3 2902 2913 2912
+3 2903 2913 2902
+3 2914 2913 2903
+3 2914 2903 2915
+3 2903 2904 2915
+3 2915 2904 2916
+3 2904 2905 2916
+3 2916 2905 2917
+3 2905 2906 2917
+3 2918 2917 2906
+3 2514 2918 2906
+3 2919 2907 3314
+3 2907 3308 3314
+3 2896 2920 3303
+3 2920 3316 3303
+3 2519 2908 2922
+3 2921 2519 2922
+3 2922 2908 2923
+3 2908 2909 2923
+3 2923 2909 2924
+3 2909 2910 2924
+3 2924 2910 3317
+3 3322 3313 2911
+3 3322 2911 2925
+3 2912 2927 2926
+3 2913 2927 2912
+3 3323 2927 2913
+3 3323 2913 3324
+3 2913 2914 3324
+3 3324 2914 2928
+3 2914 2915 2928
+3 2928 2915 2929
+3 2915 2916 2929
+3 2929 2917 2536
+3 2916 2917 2929
+3 2536 2917 2918
+3 3314 3325 2930
+3 2919 3314 2930
+3 2920 2931 3316
+3 2931 3326 3316
+3 2921 2934 2933
+3 2922 2934 2921
+3 2935 2934 2922
+3 2935 2922 2936
+3 2922 2923 2936
+3 2936 2923 2937
+3 2923 2924 2937
+3 2924 3317 2937
+3 3332 3322 2925
+3 3332 2925 2938
+3 2926 3333 2939
+3 2927 3333 2926
+3 3334 3333 2927
+3 2927 3323 3334
+3 2928 3337 3324
+3 3337 2928 2940
+3 2928 2929 2940
+3 2941 2940 2929
+3 2536 2941 2929
+3 2942 2930 3338
+3 2930 3325 3338
+3 3326 2931 3339
+3 3339 2931 2943
+3 2932 2953 2952
+3 2933 2954 2953
+3 2932 2933 2953
+3 2934 2954 2933
+3 2955 2954 2934
+3 2955 2934 3341
+3 2934 2935 3341
+3 3341 2935 3342
+3 2935 2936 3342
+3 3342 2936 3343
+3 2936 2937 3343
+3 3349 3332 2938
+3 3349 2938 2956
+3 2939 3350 2959
+3 3350 2939 3333
+3 3355 3337 2960
+3 3337 2940 2960
+3 2961 2960 2940
+3 2941 2961 2940
+3 2962 2942 3356
+3 2942 3338 3356
+3 3340 3339 2943
+3 3340 2944 3357
+3 2943 2944 3340
+3 2945 3358 3357
+3 2944 2945 3357
+3 2946 3359 3358
+3 2945 2946 3358
+3 2947 3360 3359
+3 2946 2947 3359
+3 2948 3361 3360
+3 2947 2948 3360
+3 2949 3362 3361
+3 2948 2949 3361
+3 2950 3363 3362
+3 2949 2950 3362
+3 2951 3364 3363
+3 2950 2951 3363
+3 2952 3365 3364
+3 2951 2952 3364
+3 2953 3365 2952
+3 3366 3365 2953
+3 3366 2953 3367
+3 2953 2954 3367
+3 3367 2954 3368
+3 2954 2955 3368
+3 2955 3341 3368
+3 3373 3349 2956
+3 2957 2963 3373
+3 2956 2957 3373
+3 2963 2957 2964
+3 2958 2968 2967
+3 2959 3374 2968
+3 2958 2959 2968
+3 3374 2959 3350
+3 3377 3355 2969
+3 3355 2960 2969
+3 2970 2960 2961
+3 2969 2960 2970
+3 2970 2961 2971
+3 2975 2962 3356
+3 3380 2975 3356
+3 2963 3381 3373
+3 3382 2963 2964
+3 3381 2963 3382
+3 2965 2976 3382
+3 2964 2965 3382
+3 2976 2965 2977
+3 2966 2981 2980
+3 2967 3383 2981
+3 2966 2967 2981
+3 2968 3383 2967
+3 3384 3383 2968
+3 2968 3374 3384
+3 2969 3386 3377
+3 3386 2969 3387
+3 2969 2970 3387
+3 2982 2970 2971
+3 3387 2970 2982
+3 2982 2971 2983
+3 2972 3395 2992
+3 2972 3378 3395
+3 2973 3378 2972
+3 3378 2973 3379
+3 2973 2974 3379
+3 3379 2974 3380
+3 2974 2975 3380
+3 2976 3396 3382
+3 3397 2976 2977
+3 3396 2976 3397
+3 2978 3398 3397
+3 2977 2978 3397
+3 3398 2978 2993
+3 2979 3399 3002
+3 2980 3400 3399
+3 2979 2980 3399
+3 2981 3400 2980
+3 3401 3400 2981
+3 2981 3383 3401
+3 2982 3402 3387
+3 3403 2982 2983
+3 3402 2982 3403
+3 2984 3404 3403
+3 2983 2984 3403
+3 2985 3405 3404
+3 2984 2985 3404
+3 3405 2985 3003
+3 3007 2986 3388
+3 3410 3007 3388
+3 3388 2986 3389
+3 2986 2987 3389
+3 3389 2987 3390
+3 2987 2988 3390
+3 3390 2988 3391
+3 2988 2989 3391
+3 3391 2989 3392
+3 2989 2990 3392
+3 3392 2990 3393
+3 2990 2991 3393
+3 3393 2991 3394
+3 2991 2992 3394
+3 3394 2992 3395
+3 3411 3398 2993
+3 2994 3412 3411
+3 2993 2994 3411
+3 2995 3413 3412
+3 2994 2995 3412
+3 2996 3414 3413
+3 2995 2996 3413
+3 2997 3415 3414
+3 2996 2997 3414
+3 2998 3416 3415
+3 2997 2998 3415
+3 2999 3417 3416
+3 2998 2999 3416
+3 3000 3418 3417
+3 2999 3000 3417
+3 3001 3419 3418
+3 3000 3001 3418
+3 3002 3420 3419
+3 3001 3002 3419
+3 3420 3002 3399
+3 3406 3405 3003
+3 3406 3003 3407
+3 3003 3004 3407
+3 3407 3004 3408
+3 3004 3005 3408
+3 3408 3005 3409
+3 3005 3006 3409
+3 3409 3006 3410
+3 3006 3007 3410
+3 3428 2605 3017
+3 2606 3428 3008
+3 2605 3428 2606
+3 3009 2607 2606
+3 3008 3009 2606
+3 3010 2608 2607
+3 3009 3010 2607
+3 3011 2609 2608
+3 3010 3011 2608
+3 3012 2610 2609
+3 3011 3012 2609
+3 3013 2611 2610
+3 3012 3013 2610
+3 3014 2612 2611
+3 3013 3014 2611
+3 3015 2613 2612
+3 3014 3015 2612
+3 3430 2613 3015
+3 2614 2613 3430
+3 3430 3018 2614
+3 2615 3020 3016
+3 3017 2616 2615
+3 3016 3017 2615
+3 2616 3017 2605
+3 3018 2617 2614
+3 3019 2618 2617
+3 3018 3019 2617
+3 2618 3019 3021
+3 2619 3023 3020
+3 2619 3020 2615
+3 3021 2621 2618
+3 2621 3021 3024
+3 3027 3026 3022
+3 3027 3023 2622
+3 3022 3023 3027
+3 2622 3023 2619
+3 3024 2623 2621
+3 3025 2624 2623
+3 3024 3025 2623
+3 2624 3025 3028
+3 3443 3027 2625
+3 3026 3027 3443
+3 2625 3027 2622
+3 3028 2627 2624
+3 2627 3028 3029
+3 2628 3030 3443
+3 2628 3443 2625
+3 2627 3029 3031
+3 2629 2627 3031
+3 2630 3032 3030
+3 2630 3030 2628
+3 3031 2631 2629
+3 2631 3031 3033
+3 3034 3449 3032
+3 2630 3034 3032
+3 3033 2634 2631
+3 3450 2634 3033
+3 2635 3035 3449
+3 2635 3449 3034
+3 2636 3450 3036
+3 2634 3450 2636
+3 3037 3454 3035
+3 2635 3037 3035
+3 2636 3036 3038
+3 2638 2636 3038
+3 3039 3456 3454
+3 3037 3039 3454
+3 3038 2640 2638
+3 3457 2640 3038
+3 3040 3459 3456
+3 3039 3040 3456
+3 2642 3457 3041
+3 2640 3457 2642
+3 3460 3459 2643
+3 2643 3459 3040
+3 2642 3041 3042
+3 2644 2642 3042
+3 2643 3043 3460
+3 3043 3461 3460
+3 2644 3042 3044
+3 2646 2644 3044
+3 3043 3045 3461
+3 3045 3462 3461
+3 2646 3044 3046
+3 2648 2646 3046
+3 3045 3047 3462
+3 3047 3463 3462
+3 2648 3046 3464
+3 2651 2648 3464
+3 3463 3047 3465
+3 3465 3047 3048
+3 3466 2651 3464
+3 3049 2651 3466
+3 3050 3468 3465
+3 3048 3050 3465
+3 3049 3051 2655
+3 3466 3051 3049
+3 3052 3470 3468
+3 3050 3052 3468
+3 2655 3051 3053
+3 2657 2655 3053
+3 3471 3470 3052
+3 3471 3052 3054
+3 2657 3053 3472
+3 3055 2657 3472
+3 3056 3473 3471
+3 3054 3056 3471
+3 3055 3057 2662
+3 3057 3055 3472
+3 3474 3473 3056
+3 3474 3056 3058
+3 2662 3057 3475
+3 3059 2662 3475
+3 3060 3476 3474
+3 3058 3060 3474
+3 3059 3477 3061
+3 3477 3059 3475
+3 3478 3476 3060
+3 3478 3060 3062
+3 3061 3479 3063
+3 3479 3061 3477
+3 3480 3478 3062
+3 3480 3062 3064
+3 3063 3481 3066
+3 3481 3063 3479
+3 3482 3480 3064
+3 3065 3483 3482
+3 3064 3065 3482
+3 3483 3065 3067
+3 3066 3484 3070
+3 3484 3066 3481
+3 3487 3483 3067
+3 3068 3488 3487
+3 3067 3068 3487
+3 3488 3068 3073
+3 3069 3489 3081
+3 3070 3490 3489
+3 3069 3070 3489
+3 3490 3070 3484
+3 2688 3083 3071
+3 3072 2689 2688
+3 3071 3072 2688
+3 2689 3072 3084
+3 3495 3488 3073
+3 3074 3496 3495
+3 3073 3074 3495
+3 3075 3085 3496
+3 3074 3075 3496
+3 3076 3086 3085
+3 3075 3076 3085
+3 3086 3076 3087
+3 3077 3089 3088
+3 3078 3497 3089
+3 3077 3078 3089
+3 3079 3498 3497
+3 3078 3079 3497
+3 3080 3499 3498
+3 3079 3080 3498
+3 3081 3500 3499
+3 3080 3081 3499
+3 3500 3081 3489
+3 3082 3491 3083
+3 2690 3491 3082
+3 3082 3083 2688
+3 3084 2693 2689
+3 2693 3084 3090
+3 3085 3505 3496
+3 3505 3085 3092
+3 3085 3086 3092
+3 3093 3086 3087
+3 3092 3086 3093
+3 3088 3094 3093
+3 3087 3088 3093
+3 3089 3094 3088
+3 3095 3094 3089
+3 3089 3497 3095
+3 3491 3098 3097
+3 2690 3098 3491
+3 3090 2695 2693
+3 3090 3099 2695
+3 3091 3099 3090
+3 3099 3091 3100
+3 3513 3505 3101
+3 3505 3092 3101
+3 3101 3092 3102
+3 3092 3093 3102
+3 3102 3093 3103
+3 3093 3094 3103
+3 3103 3094 3104
+3 3094 3095 3104
+3 3518 3097 3096
+3 3096 3097 3098
+3 3099 2697 2695
+3 3099 3105 2697
+3 3100 3105 3099
+3 3105 3100 3106
+3 3111 3110 3513
+3 3111 3513 3112
+3 3513 3101 3112
+3 3112 3101 3113
+3 3101 3102 3113
+3 3113 3102 3114
+3 3102 3103 3114
+3 3114 3103 3115
+3 3103 3104 3115
+3 3115 3104 3116
+3 3096 2699 3517
+3 3518 3096 3517
+3 3105 2702 2697
+3 3105 3118 2702
+3 3106 3118 3105
+3 3118 3106 3119
+3 3106 3107 3119
+3 3119 3107 3120
+3 2703 3122 3108
+3 3109 2704 2703
+3 3108 3109 2703
+3 3110 2705 2704
+3 3109 3110 2704
+3 3111 2706 2705
+3 3110 3111 2705
+3 3112 2707 2706
+3 3111 3112 2706
+3 3113 2708 2707
+3 3112 3113 2707
+3 3114 2709 2708
+3 3113 3114 2708
+3 3115 2710 2709
+3 3114 3115 2709
+3 3116 2711 2710
+3 3115 3116 2710
+3 3117 2712 2711
+3 3116 3117 2711
+3 2712 3117 3123
+3 2699 3127 3517
+3 3127 3534 3517
+3 3118 2715 2702
+3 3118 3128 2715
+3 3119 3128 3118
+3 3128 3119 3129
+3 3119 3120 3129
+3 3129 3120 3130
+3 2716 3132 3121
+3 3122 2717 2716
+3 3121 3122 2716
+3 2717 3122 2703
+3 3123 2720 2712
+3 3124 2721 2720
+3 3123 3124 2720
+3 3124 3133 2721
+3 3125 3133 3124
+3 3133 3125 3134
+3 3127 3126 3533
+3 3534 3127 3533
+3 2715 3128 3136
+3 2724 2715 3136
+3 3136 3128 3137
+3 3128 3129 3137
+3 3137 3129 3138
+3 3129 3130 3138
+3 3138 3130 3139
+3 2725 3141 3131
+3 3132 2726 2725
+3 3131 3132 2725
+3 2726 3132 2716
+3 3133 2727 2721
+3 3134 2728 2727
+3 3133 3134 2727
+3 3134 3142 2728
+3 3135 3142 3134
+3 3142 3135 3143
+3 3126 3144 3533
+3 3144 3548 3533
+3 3136 3145 2724
+3 3136 3146 3145
+3 3137 3146 3136
+3 3146 3137 3147
+3 3137 3138 3147
+3 3147 3138 3148
+3 3138 3139 3148
+3 2733 3149 3140
+3 3141 2734 2733
+3 3140 3141 2733
+3 2734 3141 2725
+3 3142 2735 2728
+3 3143 2736 2735
+3 3142 3143 2735
+3 2736 3143 3150
+3 3144 2737 3546
+3 3548 3144 3546
+3 3145 3151 2743
+3 3146 3151 3145
+3 3152 3151 3146
+3 3152 3146 3153
+3 3146 3147 3153
+3 3153 3147 3154
+3 3147 3148 3154
+3 2744 3155 3149
+3 2744 3149 2733
+3 3150 2747 2736
+3 2747 3150 3156
+3 2737 3157 3546
+3 3157 3562 3546
+3 2743 3151 3159
+3 3158 2743 3159
+3 3159 3151 3160
+3 3151 3152 3160
+3 3160 3152 3161
+3 3152 3153 3161
+3 3161 3153 3563
+3 3153 3154 3563
+3 2755 3162 3155
+3 2755 3155 2744
+3 3156 2757 2747
+3 2757 3156 3163
+3 3157 3164 3562
+3 3164 3570 3562
+3 3158 3169 3168
+3 3159 3169 3158
+3 3170 3169 3159
+3 3170 3159 3571
+3 3159 3160 3571
+3 3571 3160 3572
+3 3160 3161 3572
+3 3161 3563 3572
+3 2766 3171 3162
+3 2766 3162 2755
+3 3163 2767 2757
+3 2767 3163 3172
+3 3570 3165 3580
+3 3164 3165 3570
+3 3580 3165 3173
+3 3166 3180 3179
+3 3167 3181 3180
+3 3166 3167 3180
+3 3168 3586 3181
+3 3167 3168 3181
+3 3169 3586 3168
+3 3587 3586 3169
+3 3587 3169 3588
+3 3169 3170 3588
+3 3170 3571 3588
+3 2768 3182 3171
+3 2768 3171 2766
+3 3172 2770 2767
+3 2770 3172 3183
+3 3581 3580 3173
+3 3581 3173 3582
+3 3173 3174 3582
+3 3582 3174 3583
+3 3174 3175 3583
+3 3583 3175 3584
+3 3175 3176 3584
+3 3584 3176 3585
+3 3176 3177 3585
+3 3585 3178 3595
+3 3177 3178 3585
+3 3179 3596 3595
+3 3178 3179 3595
+3 3180 3596 3179
+3 3597 3596 3180
+3 3597 3180 3598
+3 3180 3181 3598
+3 3181 3586 3598
+3 2771 3184 3182
+3 2771 3182 2768
+3 3183 2773 2770
+3 2773 3183 3185
+3 3186 3600 3184
+3 2771 3186 3184
+3 2773 3185 3187
+3 2775 2773 3187
+3 2776 3188 3600
+3 2776 3600 3186
+3 3187 2777 2775
+3 2777 3187 3189
+3 3190 3604 3188
+3 2776 3190 3188
+3 2777 3189 3191
+3 2779 2777 3191
+3 2780 3192 3604
+3 2780 3604 3190
+3 3191 2781 2779
+3 2781 3191 3193
+3 3194 3608 3192
+3 2780 3194 3192
+3 2781 3193 3195
+3 2783 2781 3195
+3 2784 3196 3608
+3 2784 3608 3194
+3 3195 2785 2783
+3 2785 3195 3197
+3 3198 3612 3196
+3 2784 3198 3196
+3 2785 3197 3199
+3 2787 2785 3199
+3 3614 3612 2788
+3 2788 3612 3198
+3 3199 2789 2787
+3 3615 2789 3199
+3 3614 3201 3200
+3 2788 3201 3614
+3 2791 3615 3202
+3 2789 3615 2791
+3 3203 3618 3200
+3 3201 3203 3200
+3 2791 3202 3204
+3 2793 2791 3204
+3 3205 3620 3618
+3 3203 3205 3618
+3 2793 3204 3206
+3 2795 2793 3206
+3 3622 3620 2796
+3 2796 3620 3205
+3 3206 2797 2795
+3 3623 2797 3206
+3 2796 3207 3622
+3 3207 3625 3622
+3 2799 3623 3208
+3 2797 3623 2799
+3 3625 3210 3209
+3 3207 3210 3625
+3 2799 3208 3211
+3 2801 2799 3211
+3 3212 3626 3209
+3 3210 3212 3209
+3 2801 3211 3213
+3 2803 2801 3213
+3 3214 3627 3626
+3 3212 3214 3626
+3 2803 3213 3215
+3 2805 2803 3215
+3 3216 3629 3627
+3 3214 3216 3627
+3 2805 3215 3217
+3 2807 2805 3217
+3 3218 3632 3629
+3 3216 3218 3629
+3 2807 3217 3219
+3 2809 2807 3219
+3 3220 3634 3632
+3 3218 3220 3632
+3 2809 3219 3221
+3 2811 2809 3221
+3 3222 3636 3634
+3 3220 3222 3634
+3 2811 3221 3223
+3 2813 2811 3223
+3 3224 3637 3636
+3 3222 3224 3636
+3 2813 3223 3225
+3 2815 2813 3225
+3 3226 3638 3637
+3 3224 3226 3637
+3 2815 3225 3227
+3 2817 2815 3227
+3 3226 3639 3638
+3 3228 3639 3226
+3 2817 3227 3640
+3 2819 2817 3640
+3 3228 3229 3639
+3 3229 3641 3639
+3 3642 2819 3640
+3 3230 2819 3642
+3 3641 3229 3649
+3 3649 3229 3234
+3 3230 3235 2826
+3 3642 3235 3230
+3 3231 3644 3232
+3 3644 3645 3232
+3 3232 3645 3233
+3 3645 3647 3233
+3 3233 3647 3237
+3 3647 3652 3237
+3 3238 3658 3649
+3 3234 3238 3649
+3 2826 3235 3239
+3 2829 2826 3239
+3 3651 3236 3241
+3 3231 3236 3651
+3 3644 3231 3651
+3 3242 3237 3660
+3 3237 3652 3660
+3 2832 3653 2833
+3 3653 3655 2833
+3 3655 3244 2833
+3 3245 3664 3658
+3 3238 3245 3658
+3 2829 3239 3246
+3 2835 2829 3246
+3 3240 3248 3241
+3 3240 3241 3236
+3 3660 3666 3249
+3 3242 3660 3249
+3 2832 2838 3661
+3 3653 2832 3661
+3 3244 3243 2833
+3 3662 3243 3244
+3 2839 3243 3662
+3 3662 3250 2839
+3 3245 3667 3664
+3 3251 3667 3245
+3 2835 3246 3668
+3 3252 2835 3668
+3 3247 3665 3248
+3 2843 3665 3247
+3 3247 3248 3240
+3 3253 3249 3670
+3 3249 3666 3670
+3 2838 3254 3661
+3 3254 3671 3661
+3 3250 2845 2839
+3 2845 3250 3255
+3 3667 3251 3673
+3 3673 3251 3256
+3 3252 3257 2847
+3 3257 3252 3668
+3 2843 2849 3669
+3 3665 2843 3669
+3 3670 3677 3258
+3 3253 3670 3258
+3 3254 3260 3671
+3 3260 3679 3671
+3 3255 2852 2845
+3 2852 3255 3261
+3 3262 3681 3673
+3 3256 3262 3673
+3 2847 3257 3263
+3 2854 2847 3263
+3 2849 2856 3675
+3 3669 2849 3675
+3 3264 3258 3685
+3 3258 3677 3685
+3 3260 3259 3678
+3 3679 3260 3678
+3 3261 2858 2852
+3 2858 3261 3265
+3 3262 3688 3681
+3 3266 3688 3262
+3 2854 3263 3268
+3 3267 2854 3268
+3 3683 2862 3270
+3 2856 2862 3683
+3 3675 2856 3683
+3 3685 3691 3271
+3 3264 3685 3271
+3 3259 3272 3678
+3 3272 3692 3678
+3 3265 2864 2858
+3 2864 3265 3273
+3 3688 3266 3694
+3 3694 3266 3275
+3 3267 3276 2867
+3 3268 3276 3267
+3 3277 3276 3268
+3 3277 3268 3278
+3 3269 3279 3270
+3 3269 3270 2862
+3 3280 3271 3695
+3 3271 3691 3695
+3 3272 3282 3692
+3 3282 3697 3692
+3 3273 2871 2864
+3 3274 2872 2871
+3 3273 3274 2871
+3 2872 3274 3283
+3 3701 3694 3275
+3 3701 3275 3284
+3 2867 3276 3286
+3 3285 2867 3286
+3 3286 3276 3287
+3 3276 3277 3287
+3 3287 3277 3288
+3 3277 3278 3288
+3 3288 3279 2875
+3 3278 3279 3288
+3 2875 3279 3269
+3 3695 3702 2878
+3 3280 3695 2878
+3 3282 3281 3696
+3 3697 3282 3696
+3 3283 2880 2872
+3 2880 3283 3289
+3 3291 3707 3701
+3 3284 3291 3701
+3 3285 3292 2883
+3 3286 3292 3285
+3 3293 3292 3286
+3 3293 3286 3294
+3 3286 3287 3294
+3 3294 3288 2884
+3 3287 3288 3294
+3 2884 3288 2875
+3 3295 2878 3708
+3 2878 3702 3708
+3 3281 3296 3696
+3 3296 3709 3696
+3 3289 2889 2880
+3 3289 3297 2889
+3 3290 3297 3289
+3 3297 3290 3298
+3 3299 3707 3291
+3 3713 3707 3299
+3 3299 3291 3300
+3 2883 3292 3301
+3 2892 2883 3301
+3 3301 3292 3302
+3 3292 3293 3302
+3 3302 3294 2893
+3 3293 3294 3302
+3 2893 3294 2884
+3 3708 3714 2895
+3 3295 3708 2895
+3 3296 3304 3709
+3 3304 3716 3709
+3 3297 2900 2889
+3 3297 3305 2900
+3 3298 3305 3297
+3 3305 3298 3306
+3 3299 3720 3713
+3 3307 3720 3299
+3 3300 3307 3299
+3 3301 2905 2892
+3 3302 2906 2905
+3 3301 3302 2905
+3 2906 3302 2893
+3 3308 2895 3721
+3 2895 3714 3721
+3 3304 3303 3715
+3 3716 3304 3715
+3 2900 3305 3309
+3 2910 2900 3309
+3 3309 3305 3310
+3 3305 3306 3310
+3 3310 3306 3311
+3 3312 3720 3307
+3 3724 3720 3312
+3 3312 3307 3313
+3 3314 3721 3315
+3 3308 3721 3314
+3 3303 3316 3715
+3 3316 3725 3715
+3 3309 3317 2910
+3 3309 3318 3317
+3 3310 3318 3309
+3 3318 3310 3319
+3 3310 3311 3319
+3 3319 3311 3320
+3 3312 3728 3724
+3 3321 3312 3313
+3 3728 3312 3321
+3 3321 3313 3322
+3 3315 3325 3314
+3 3729 3325 3315
+3 3316 3326 3725
+3 3326 3730 3725
+3 3317 3327 2937
+3 3318 3327 3317
+3 3328 3327 3318
+3 3328 3318 3329
+3 3318 3319 3329
+3 3329 3319 3330
+3 3319 3320 3330
+3 3321 3734 3728
+3 3331 3321 3322
+3 3734 3321 3331
+3 3331 3322 3332
+3 3323 3335 3334
+3 3324 3336 3335
+3 3323 3324 3335
+3 3336 3324 3337
+3 3338 3325 3735
+3 3325 3729 3735
+3 3326 3339 3730
+3 3339 3736 3730
+3 2937 3327 3344
+3 3343 2937 3344
+3 3344 3327 3345
+3 3327 3328 3345
+3 3345 3328 3346
+3 3328 3329 3346
+3 3346 3329 3347
+3 3329 3330 3347
+3 3331 3741 3734
+3 3348 3331 3332
+3 3741 3331 3348
+3 3348 3332 3349
+3 3333 3351 3350
+3 3334 3352 3351
+3 3333 3334 3351
+3 3335 3352 3334
+3 3353 3352 3335
+3 3353 3335 3354
+3 3335 3336 3354
+3 3355 3354 3336
+3 3337 3355 3336
+3 3356 3338 3742
+3 3338 3735 3742
+3 3736 3339 3743
+3 3340 3744 3743
+3 3339 3340 3743
+3 3744 3340 3357
+3 3341 3369 3368
+3 3342 3370 3369
+3 3341 3342 3369
+3 3343 3371 3370
+3 3342 3343 3370
+3 3344 3371 3343
+3 3372 3371 3344
+3 3372 3344 3749
+3 3344 3345 3749
+3 3749 3345 3750
+3 3345 3346 3750
+3 3750 3346 3751
+3 3346 3347 3751
+3 3348 3757 3741
+3 3758 3348 3349
+3 3757 3348 3758
+3 3758 3349 3373
+3 3350 3759 3374
+3 3351 3759 3350
+3 3760 3759 3351
+3 3760 3351 3761
+3 3351 3352 3761
+3 3761 3352 3375
+3 3352 3353 3375
+3 3375 3353 3376
+3 3353 3354 3376
+3 3377 3376 3354
+3 3355 3377 3354
+3 3380 3356 3742
+3 3764 3380 3742
+3 3745 3744 3357
+3 3745 3357 3746
+3 3357 3358 3746
+3 3746 3358 3747
+3 3358 3359 3747
+3 3747 3359 3748
+3 3359 3360 3748
+3 3748 3361 3765
+3 3360 3361 3748
+3 3362 3766 3765
+3 3361 3362 3765
+3 3363 3767 3766
+3 3362 3363 3766
+3 3364 3768 3767
+3 3363 3364 3767
+3 3365 3769 3768
+3 3364 3365 3768
+3 3366 3770 3769
+3 3365 3366 3769
+3 3367 3771 3770
+3 3366 3367 3770
+3 3368 3772 3771
+3 3367 3368 3771
+3 3369 3772 3368
+3 3773 3772 3369
+3 3773 3369 3774
+3 3369 3370 3774
+3 3774 3370 3775
+3 3370 3371 3775
+3 3775 3371 3776
+3 3371 3372 3776
+3 3372 3749 3776
+3 3786 3758 3373
+3 3786 3373 3381
+3 3374 3787 3384
+3 3787 3374 3759
+3 3375 3791 3761
+3 3791 3375 3792
+3 3375 3376 3792
+3 3385 3376 3377
+3 3792 3376 3385
+3 3385 3377 3386
+3 3395 3378 3762
+3 3800 3395 3762
+3 3762 3378 3763
+3 3378 3379 3763
+3 3763 3379 3764
+3 3379 3380 3764
+3 3801 3786 3381
+3 3382 3802 3801
+3 3381 3382 3801
+3 3802 3382 3396
+3 3383 3803 3401
+3 3384 3804 3803
+3 3383 3384 3803
+3 3804 3384 3787
+3 3385 3808 3792
+3 3809 3385 3386
+3 3808 3385 3809
+3 3387 3810 3809
+3 3386 3387 3809
+3 3810 3387 3402
+3 3410 3388 3793
+3 3817 3410 3793
+3 3793 3388 3794
+3 3388 3389 3794
+3 3794 3389 3795
+3 3389 3390 3795
+3 3795 3390 3796
+3 3390 3391 3796
+3 3796 3391 3797
+3 3391 3392 3797
+3 3797 3392 3798
+3 3392 3393 3798
+3 3798 3393 3799
+3 3393 3394 3799
+3 3799 3394 3800
+3 3394 3395 3800
+3 3818 3802 3396
+3 3397 3819 3818
+3 3396 3397 3818
+3 3398 3820 3819
+3 3397 3398 3819
+3 3820 3398 3411
+3 3399 3821 3420
+3 3400 3822 3821
+3 3399 3400 3821
+3 3401 3823 3822
+3 3400 3401 3822
+3 3823 3401 3803
+3 3824 3810 3402
+3 3403 3825 3824
+3 3402 3403 3824
+3 3403 3811 3825
+3 3404 3811 3403
+3 3811 3404 3812
+3 3404 3405 3812
+3 3812 3405 3813
+3 3405 3406 3813
+3 3813 3406 3814
+3 3406 3407 3814
+3 3814 3407 3815
+3 3407 3408 3815
+3 3815 3408 3816
+3 3408 3409 3816
+3 3816 3409 3817
+3 3409 3410 3817
+3 3826 3820 3411
+3 3412 3827 3826
+3 3411 3412 3826
+3 3413 3828 3827
+3 3412 3413 3827
+3 3414 3829 3828
+3 3413 3414 3828
+3 3415 3830 3829
+3 3414 3415 3829
+3 3416 3831 3830
+3 3415 3416 3830
+3 3417 3832 3831
+3 3416 3417 3831
+3 3418 3833 3832
+3 3417 3418 3832
+3 3419 3834 3833
+3 3418 3419 3833
+3 3420 3835 3834
+3 3419 3420 3834
+3 3835 3420 3821
+3 3837 3008 3429
+3 3009 3837 3421
+3 3008 3837 3009
+3 3422 3010 3009
+3 3421 3422 3009
+3 3423 3011 3010
+3 3422 3423 3010
+3 3424 3012 3011
+3 3423 3424 3011
+3 3425 3013 3012
+3 3424 3425 3012
+3 3426 3014 3013
+3 3425 3426 3013
+3 3839 3014 3426
+3 3015 3014 3839
+3 3839 3431 3015
+3 3843 3016 3433
+3 3017 3843 3427
+3 3016 3843 3017
+3 3429 3428 3017
+3 3427 3429 3017
+3 3428 3429 3008
+3 3431 3430 3015
+3 3432 3018 3430
+3 3431 3432 3430
+3 3845 3018 3432
+3 3019 3018 3845
+3 3845 3434 3019
+3 3020 3436 3433
+3 3020 3433 3016
+3 3434 3021 3019
+3 3021 3434 3437
+3 3022 3439 3435
+3 3436 3023 3022
+3 3435 3436 3022
+3 3023 3436 3020
+3 3437 3024 3021
+3 3438 3025 3024
+3 3437 3438 3024
+3 3025 3438 3440
+3 3026 3441 3439
+3 3026 3439 3022
+3 3440 3028 3025
+3 3028 3440 3442
+3 3443 3853 3441
+3 3026 3443 3441
+3 3442 3029 3028
+3 3029 3442 3444
+3 3030 3445 3853
+3 3030 3853 3443
+3 3029 3444 3446
+3 3031 3029 3446
+3 3856 3445 3032
+3 3032 3445 3030
+3 3446 3033 3031
+3 3033 3446 3447
+3 3856 3449 3448
+3 3032 3449 3856
+3 3033 3447 3451
+3 3450 3033 3451
+3 3859 3448 3035
+3 3035 3448 3449
+3 3451 3036 3450
+3 3036 3451 3452
+3 3859 3454 3453
+3 3035 3454 3859
+3 3036 3452 3455
+3 3038 3036 3455
+3 3456 3860 3453
+3 3454 3456 3453
+3 3038 3455 3458
+3 3457 3038 3458
+3 3459 3863 3860
+3 3456 3459 3860
+3 3458 3041 3457
+3 3864 3041 3458
+3 3460 3866 3863
+3 3459 3460 3863
+3 3042 3041 3867
+3 3041 3864 3867
+3 3461 3869 3866
+3 3460 3461 3866
+3 3044 3042 3870
+3 3042 3867 3870
+3 3462 3872 3869
+3 3461 3462 3869
+3 3046 3044 3873
+3 3044 3870 3873
+3 3463 3875 3872
+3 3462 3463 3872
+3 3464 3046 3876
+3 3046 3873 3876
+3 3465 3878 3875
+3 3463 3465 3875
+3 3464 3467 3466
+3 3876 3467 3464
+3 3468 3880 3878
+3 3465 3468 3878
+3 3466 3467 3469
+3 3051 3466 3469
+3 3468 3881 3880
+3 3470 3881 3468
+3 3051 3469 3882
+3 3053 3051 3882
+3 3881 3470 3883
+3 3883 3470 3471
+3 3884 3053 3882
+3 3472 3053 3884
+3 3473 3886 3883
+3 3471 3473 3883
+3 3472 3887 3057
+3 3884 3887 3472
+3 3888 3886 3473
+3 3888 3473 3474
+3 3889 3057 3887
+3 3475 3057 3889
+3 3476 3890 3888
+3 3474 3476 3888
+3 3475 3891 3477
+3 3889 3891 3475
+3 3892 3890 3476
+3 3892 3476 3478
+3 3477 3893 3479
+3 3893 3477 3891
+3 3894 3892 3478
+3 3894 3478 3480
+3 3479 3895 3481
+3 3895 3479 3893
+3 3901 3894 3480
+3 3901 3480 3482
+3 3481 3902 3484
+3 3902 3481 3895
+3 3896 3071 3485
+3 3071 3896 3072
+3 3896 3898 3072
+3 3898 3486 3072
+3 3904 3901 3482
+3 3483 3905 3904
+3 3482 3483 3904
+3 3905 3483 3487
+3 3484 3907 3490
+3 3907 3484 3902
+3 3910 3485 3083
+3 3083 3485 3071
+3 3486 3084 3072
+3 3084 3486 3492
+3 3912 3905 3487
+3 3488 3494 3912
+3 3487 3488 3912
+3 3494 3488 3495
+3 3489 3913 3500
+3 3489 3906 3913
+3 3490 3906 3489
+3 3906 3490 3907
+3 3083 3491 3908
+3 3910 3083 3908
+3 3492 3090 3084
+3 3493 3091 3090
+3 3492 3493 3090
+3 3091 3493 3501
+3 3494 3916 3912
+3 3503 3494 3495
+3 3916 3494 3503
+3 3496 3504 3503
+3 3495 3496 3503
+3 3504 3496 3505
+3 3497 3506 3095
+3 3498 3507 3506
+3 3497 3498 3506
+3 3499 3508 3507
+3 3498 3499 3507
+3 3500 3917 3508
+3 3499 3500 3508
+3 3917 3500 3913
+3 3491 3097 3914
+3 3908 3491 3914
+3 3501 3100 3091
+3 3501 3509 3100
+3 3502 3509 3501
+3 3509 3502 3510
+3 3923 3916 3511
+3 3916 3503 3511
+3 3511 3503 3512
+3 3503 3504 3512
+3 3513 3512 3504
+3 3505 3513 3504
+3 3095 3506 3514
+3 3104 3095 3514
+3 3514 3506 3515
+3 3506 3507 3515
+3 3515 3507 3516
+3 3507 3508 3516
+3 3508 3917 3516
+3 3097 3518 3914
+3 3518 3927 3914
+3 3509 3106 3100
+3 3510 3107 3106
+3 3509 3510 3106
+3 3107 3510 3519
+3 3108 3522 3923
+3 3511 3109 3108
+3 3923 3511 3108
+3 3512 3110 3109
+3 3511 3512 3109
+3 3110 3512 3513
+3 3514 3116 3104
+3 3515 3117 3116
+3 3514 3515 3116
+3 3515 3523 3117
+3 3516 3523 3515
+3 3523 3516 3524
+3 3518 3517 3926
+3 3927 3518 3926
+3 3519 3120 3107
+3 3519 3526 3120
+3 3520 3526 3519
+3 3526 3520 3527
+3 3121 3530 3521
+3 3522 3122 3121
+3 3521 3522 3121
+3 3122 3522 3108
+3 3523 3123 3117
+3 3524 3124 3123
+3 3523 3524 3123
+3 3525 3125 3124
+3 3524 3525 3124
+3 3125 3525 3531
+3 3517 3534 3926
+3 3534 3941 3926
+3 3526 3130 3120
+3 3526 3535 3130
+3 3527 3535 3526
+3 3535 3527 3536
+3 3527 3528 3536
+3 3536 3528 3537
+3 3131 3539 3529
+3 3530 3132 3131
+3 3529 3530 3131
+3 3132 3530 3121
+3 3531 3134 3125
+3 3532 3135 3134
+3 3531 3532 3134
+3 3135 3532 3540
+3 3534 3533 3939
+3 3941 3534 3939
+3 3535 3139 3130
+3 3535 3541 3139
+3 3536 3541 3535
+3 3541 3536 3542
+3 3536 3537 3542
+3 3542 3537 3543
+3 3140 3544 3538
+3 3539 3141 3140
+3 3538 3539 3140
+3 3141 3539 3131
+3 3540 3143 3135
+3 3143 3540 3545
+3 3939 3548 3547
+3 3533 3548 3939
+3 3139 3541 3549
+3 3148 3139 3549
+3 3549 3541 3550
+3 3541 3542 3550
+3 3550 3542 3551
+3 3542 3543 3551
+3 3149 3552 3544
+3 3149 3544 3140
+3 3545 3150 3143
+3 3150 3545 3553
+3 3959 3547 3546
+3 3546 3547 3548
+3 3148 3549 3554
+3 3154 3148 3554
+3 3554 3549 3555
+3 3549 3550 3555
+3 3555 3550 3556
+3 3550 3551 3556
+3 3556 3551 3557
+3 3155 3558 3552
+3 3155 3552 3149
+3 3553 3156 3150
+3 3156 3553 3559
+3 3959 3562 3561
+3 3546 3562 3959
+3 3154 3554 3564
+3 3563 3154 3564
+3 3564 3554 3565
+3 3554 3555 3565
+3 3565 3555 3566
+3 3555 3556 3566
+3 3566 3556 3567
+3 3556 3557 3567
+3 3162 3568 3558
+3 3162 3558 3155
+3 3559 3163 3156
+3 3559 3569 3163
+3 3560 3569 3559
+3 3570 3970 3561
+3 3562 3570 3561
+3 3563 3573 3572
+3 3564 3573 3563
+3 3574 3573 3564
+3 3574 3564 3575
+3 3564 3565 3575
+3 3575 3565 3576
+3 3565 3566 3576
+3 3576 3566 3971
+3 3566 3567 3971
+3 3171 3578 3568
+3 3171 3568 3162
+3 3569 3172 3163
+3 3172 3569 3579
+3 3975 3970 3570
+3 3975 3570 3580
+3 3571 3589 3588
+3 3572 3590 3589
+3 3571 3572 3589
+3 3573 3590 3572
+3 3591 3590 3573
+3 3591 3573 3980
+3 3573 3574 3980
+3 3980 3574 3981
+3 3574 3575 3981
+3 3981 3575 3982
+3 3575 3576 3982
+3 3576 3971 3982
+3 3593 3592 3577
+3 3593 3578 3182
+3 3577 3578 3593
+3 3182 3578 3171
+3 3579 3183 3172
+3 3183 3579 3594
+3 3976 3975 3580
+3 3976 3580 3977
+3 3580 3581 3977
+3 3977 3581 3978
+3 3581 3582 3978
+3 3978 3582 3979
+3 3582 3583 3979
+3 3979 3584 3986
+3 3583 3584 3979
+3 3585 3987 3986
+3 3584 3585 3986
+3 3987 3585 3595
+3 3586 3992 3598
+3 3587 3993 3992
+3 3586 3587 3992
+3 3588 3994 3993
+3 3587 3588 3993
+3 3589 3994 3588
+3 3995 3994 3589
+3 3995 3589 3996
+3 3589 3590 3996
+3 3996 3590 3997
+3 3590 3591 3997
+3 3591 3980 3997
+3 4003 3593 3184
+3 3592 3593 4003
+3 3184 3593 3182
+3 3594 3185 3183
+3 3185 3594 3599
+3 3988 3987 3595
+3 3988 3595 3989
+3 3595 3596 3989
+3 3989 3596 3990
+3 3596 3597 3990
+3 3990 3597 3991
+3 3597 3598 3991
+3 3991 3598 3992
+3 3600 4007 4003
+3 3184 3600 4003
+3 3185 3599 3601
+3 3187 3185 3601
+3 3188 3602 4007
+3 3188 4007 3600
+3 3601 3189 3187
+3 3189 3601 3603
+3 3604 4009 3602
+3 3188 3604 3602
+3 3189 3603 3605
+3 3191 3189 3605
+3 3192 3606 4009
+3 3192 4009 3604
+3 3605 3193 3191
+3 3193 3605 3607
+3 3608 4012 3606
+3 3192 3608 3606
+3 3193 3607 3609
+3 3195 3193 3609
+3 4014 4012 3196
+3 3196 4012 3608
+3 3609 3197 3195
+3 3197 3609 3610
+3 4014 3612 3611
+3 3196 3612 4014
+3 3197 3610 3613
+3 3199 3197 3613
+3 3614 4017 3611
+3 3612 3614 3611
+3 3199 3613 3616
+3 3615 3199 3616
+3 4019 4017 3200
+3 3200 4017 3614
+3 3616 3202 3615
+3 4020 3202 3616
+3 4019 3618 3617
+3 3200 3618 4019
+3 3204 4020 3619
+3 3202 4020 3204
+3 3620 4022 3617
+3 3618 3620 3617
+3 3204 3619 3621
+3 3206 3204 3621
+3 3622 4025 4022
+3 3620 3622 4022
+3 3206 3621 3624
+3 3623 3206 3624
+3 3625 4027 4025
+3 3622 3625 4025
+3 3624 3208 3623
+3 4028 3208 3624
+3 4030 4027 3209
+3 3209 4027 3625
+3 3211 3208 4031
+3 3208 4028 4031
+3 3209 3626 4030
+3 3626 4033 4030
+3 3213 3211 4034
+3 3211 4031 4034
+3 3626 3627 4033
+3 3627 4036 4033
+3 3215 4034 3628
+3 3213 4034 3215
+3 3627 3629 4036
+3 3629 4037 4036
+3 3215 3628 3630
+3 3217 3215 3630
+3 4037 3632 3631
+3 3629 3632 4037
+3 3217 3630 3633
+3 3219 3217 3633
+3 3632 4038 3631
+3 3634 4038 3632
+3 3219 3633 3635
+3 3221 3219 3635
+3 3634 3636 4038
+3 3636 4039 4038
+3 3221 3635 4040
+3 3223 3221 4040
+3 3636 3637 4039
+3 3637 4041 4039
+3 4042 3223 4040
+3 3225 3223 4042
+3 3637 3638 4041
+3 3638 4044 4041
+3 3227 3225 4045
+3 3225 4042 4045
+3 4044 3638 4047
+3 4047 3638 3639
+3 3640 3227 4048
+3 3227 4045 4048
+3 3641 4050 4047
+3 3639 3641 4047
+3 3640 3643 3642
+3 4048 3643 3640
+3 3649 4053 4050
+3 3641 3649 4050
+3 3642 3643 3650
+3 3235 3642 3650
+3 3645 4052 3646
+3 3644 4052 3645
+3 3648 3647 3645
+3 3646 3648 3645
+3 4056 3647 3648
+3 3652 3647 4056
+3 3658 4057 4053
+3 3649 3658 4053
+3 3235 3650 3659
+3 3239 3235 3659
+3 3241 4054 3651
+3 4054 4055 3651
+3 3644 3651 4055
+3 4052 3644 4055
+3 3660 3652 4059
+3 3652 4056 4059
+3 4062 3654 3653
+3 3656 3655 3653
+3 3654 3656 3653
+3 3657 3244 3655
+3 3656 3657 3655
+3 3244 3657 3663
+3 3658 4064 4057
+3 3664 4064 3658
+3 3239 3659 4065
+3 3246 3239 4065
+3 3241 3248 4058
+3 4054 3241 4058
+3 4059 4067 3666
+3 3660 4059 3666
+3 3653 3661 4061
+3 4062 3653 4061
+3 3663 3662 3244
+3 4068 3662 3663
+3 3250 3662 4068
+3 4064 3664 4071
+3 4071 3664 3667
+3 4072 3246 4065
+3 3668 3246 4072
+3 3248 3665 4066
+3 4058 3248 4066
+3 3670 3666 4075
+3 3666 4067 4075
+3 3661 3671 4061
+3 3671 4076 4061
+3 4068 4069 3255
+3 3250 4068 3255
+3 4069 3672 3255
+3 3673 4078 4071
+3 3667 3673 4071
+3 3668 3674 3257
+3 4072 3674 3668
+3 4074 3669 3676
+3 3665 3669 4074
+3 4066 3665 4074
+3 4075 4080 3677
+3 3670 4075 3677
+3 3671 3679 4076
+3 3679 4082 4076
+3 3672 3261 3255
+3 3261 3672 3680
+3 3673 4084 4078
+3 3681 4084 3673
+3 3257 3674 3682
+3 3263 3257 3682
+3 3675 3684 3676
+3 3675 3676 3669
+3 3685 3677 4088
+3 3677 4080 4088
+3 3679 3678 4081
+3 4082 3679 4081
+3 3680 3265 3261
+3 3265 3680 3686
+3 4084 3681 4090
+3 4090 3681 3688
+3 3263 3682 3689
+3 3268 3263 3689
+3 3689 3682 3690
+3 4086 3270 3690
+3 3683 4086 3684
+3 3270 4086 3683
+3 3683 3684 3675
+3 4088 4091 3691
+3 3685 4088 3691
+3 3678 3692 4081
+3 3692 4092 4081
+3 3686 3273 3265
+3 3687 3274 3273
+3 3686 3687 3273
+3 3274 3687 3693
+3 3694 4095 4090
+3 3688 3694 4090
+3 3689 3278 3268
+3 3690 3279 3278
+3 3689 3690 3278
+3 3279 3690 3270
+3 3695 3691 4096
+3 3691 4091 4096
+3 3692 3697 4092
+3 3697 4098 4092
+3 3693 3283 3274
+3 3283 3693 3698
+3 3700 4095 3694
+3 4101 4095 3700
+3 3700 3694 3701
+3 4096 4102 3702
+3 3695 4096 3702
+3 3697 3696 4097
+3 4098 3697 4097
+3 3698 3289 3283
+3 3699 3290 3289
+3 3698 3699 3289
+3 3290 3699 3703
+3 3705 3704 4101
+3 3705 4101 3706
+3 4101 3700 3706
+3 3707 3706 3700
+3 3701 3707 3700
+3 3708 3702 4103
+3 3702 4102 4103
+3 3696 3709 4097
+3 3709 4104 4097
+3 3703 3298 3290
+3 3703 3710 3298
+3 3704 3710 3703
+3 3710 3704 3711
+3 3704 3705 3711
+3 3711 3705 3712
+3 3705 3706 3712
+3 3713 3712 3706
+3 3707 3713 3706
+3 4103 4105 3714
+3 3708 4103 3714
+3 3709 3716 4104
+3 3716 4107 4104
+3 3710 3306 3298
+3 3710 3717 3306
+3 3711 3717 3710
+3 3717 3711 3718
+3 3711 3712 3718
+3 3719 3712 3713
+3 3718 3712 3719
+3 3719 3713 3720
+3 3721 3714 4108
+3 3714 4105 4108
+3 3716 3715 4106
+3 4107 3716 4106
+3 3717 3311 3306
+3 3717 3722 3311
+3 3718 3722 3717
+3 3722 3718 3723
+3 3718 3719 3723
+3 3724 3723 3719
+3 3720 3724 3719
+3 4108 4109 3315
+3 3721 4108 3315
+3 3715 3725 4106
+3 3725 4110 4106
+3 3722 3320 3311
+3 3722 3726 3320
+3 3723 3726 3722
+3 3727 3723 3724
+3 3726 3723 3727
+3 3727 3724 3728
+3 3729 3315 4111
+3 3315 4109 4111
+3 3725 3730 4110
+3 3730 4112 4110
+3 3320 3726 3731
+3 3330 3320 3731
+3 3731 3726 3732
+3 3726 3727 3732
+3 3733 3727 3728
+3 3732 3727 3733
+3 3733 3728 3734
+3 3735 3729 4113
+3 3729 4111 4113
+3 3730 3736 4112
+3 3736 4115 4112
+3 3330 3731 3737
+3 3347 3330 3737
+3 3737 3731 3738
+3 3731 3732 3738
+3 3738 3732 3739
+3 3732 3733 3739
+3 3740 3733 3734
+3 3739 3733 3740
+3 3740 3734 3741
+3 3742 3735 4116
+3 3735 4113 4116
+3 3736 3743 4115
+3 3743 4117 4115
+3 3347 3737 3752
+3 3751 3347 3752
+3 3752 3737 3753
+3 3737 3738 3753
+3 3753 3738 3754
+3 3738 3739 3754
+3 3754 3739 3755
+3 3739 3740 3755
+3 3756 3740 3741
+3 3755 3740 3756
+3 3756 3741 3757
+3 3764 3742 4116
+3 4122 3764 4116
+3 4117 3743 4118
+3 3743 3744 4118
+3 4118 3744 4119
+3 3744 3745 4119
+3 4119 3746 4123
+3 3745 3746 4119
+3 3747 4124 4123
+3 3746 3747 4123
+3 3748 4125 4124
+3 3747 3748 4124
+3 4125 3748 3765
+3 3749 3777 3776
+3 3750 3778 3777
+3 3749 3750 3777
+3 3751 3779 3778
+3 3750 3751 3778
+3 3752 3779 3751
+3 3780 3779 3752
+3 3780 3752 3781
+3 3752 3753 3781
+3 3781 3753 3782
+3 3753 3754 3782
+3 3782 3754 3783
+3 3754 3755 3783
+3 3783 3755 3784
+3 3755 3756 3784
+3 4134 3756 3757
+3 3784 3756 4134
+3 3758 3785 4134
+3 3757 3758 4134
+3 3785 3758 3786
+3 3759 3788 3787
+3 3760 3789 3788
+3 3759 3760 3788
+3 3761 3790 3789
+3 3760 3761 3789
+3 3790 3761 3791
+3 3800 3762 4120
+3 4143 3800 4120
+3 4120 3762 4121
+3 3762 3763 4121
+3 4121 3763 4122
+3 3763 3764 4122
+3 4126 4125 3765
+3 4126 3765 4127
+3 3765 3766 4127
+3 4127 3766 4128
+3 3766 3767 4128
+3 4128 3767 4129
+3 3767 3768 4129
+3 4129 3769 4144
+3 3768 3769 4129
+3 3770 4145 4144
+3 3769 3770 4144
+3 3770 4130 4145
+3 3771 4130 3770
+3 4130 3771 4131
+3 3771 3772 4131
+3 4131 3772 4132
+3 3772 3773 4132
+3 4132 3773 4133
+3 3773 3774 4133
+3 4133 3775 4146
+3 3774 3775 4133
+3 3776 4147 4146
+3 3775 3776 4146
+3 3777 4147 3776
+3 4148 4147 3777
+3 4148 3777 4149
+3 3777 3778 4149
+3 4149 3778 4150
+3 3778 3779 4150
+3 4150 3779 4151
+3 3779 3780 4151
+3 4151 3780 4152
+3 3780 3781 4152
+3 4152 3781 4153
+3 3781 3782 4153
+3 4153 3782 4154
+3 3782 3783 4154
+3 4154 3783 4155
+3 3783 3784 4155
+3 3784 4134 4155
+3 3785 4157 4134
+3 4158 3785 3786
+3 4157 3785 4158
+3 4158 3786 3801
+3 3787 4159 3804
+3 3788 4159 3787
+3 4160 4159 3788
+3 4160 3788 4161
+3 3788 3789 4161
+3 4161 3789 3805
+3 3789 3790 3805
+3 3806 3790 3791
+3 3805 3790 3806
+3 3792 3807 3806
+3 3791 3792 3806
+3 3807 3792 3808
+3 3817 4135 4164
+3 3793 4135 3817
+3 4136 4135 3793
+3 4136 3793 4137
+3 3793 3794 4137
+3 4137 3794 4138
+3 3794 3795 4138
+3 4138 3795 4139
+3 3795 3796 4139
+3 4139 3796 4140
+3 3796 3797 4140
+3 4140 3797 4141
+3 3797 3798 4141
+3 4141 3798 4142
+3 3798 3799 4142
+3 4142 3799 4143
+3 3799 3800 4143
+3 4166 4158 3801
+3 3802 4167 4166
+3 3801 3802 4166
+3 4167 3802 3818
+3 3803 4168 3823
+3 3804 4169 4168
+3 3803 3804 4168
+3 4169 3804 4159
+3 3805 4170 4161
+3 4170 3805 4171
+3 3805 3806 4171
+3 4171 3806 4172
+3 3806 3807 4172
+3 4173 3807 3808
+3 4172 3807 4173
+3 3809 4174 4173
+3 3808 3809 4173
+3 3810 4175 4174
+3 3809 3810 4174
+3 4175 3810 3824
+3 3811 4178 3825
+3 3812 4179 4178
+3 3811 3812 4178
+3 3813 4180 4179
+3 3812 3813 4179
+3 3813 4162 4180
+3 3814 4162 3813
+3 4162 3814 4163
+3 3814 3815 4163
+3 4163 3815 4164
+3 3815 3816 4164
+3 3816 3817 4164
+3 4181 4167 3818
+3 3819 4182 4181
+3 3818 3819 4181
+3 3820 4183 4182
+3 3819 3820 4182
+3 4183 3820 3826
+3 3821 4184 3835
+3 3822 4185 4184
+3 3821 3822 4184
+3 3823 4186 4185
+3 3822 3823 4185
+3 4186 3823 4168
+3 4176 4175 3824
+3 4176 3824 4177
+3 3824 3825 4177
+3 4177 3825 4178
+3 4187 4183 3826
+3 3827 4188 4187
+3 3826 3827 4187
+3 3828 4189 4188
+3 3827 3828 4188
+3 3829 4190 4189
+3 3828 3829 4189
+3 3830 4191 4190
+3 3829 3830 4190
+3 3831 4192 4191
+3 3830 3831 4191
+3 3832 4193 4192
+3 3831 3832 4192
+3 3833 4194 4193
+3 3832 3833 4193
+3 3834 4195 4194
+3 3833 3834 4194
+3 3835 4196 4195
+3 3834 3835 4195
+3 4196 3835 4184
+3 4197 3421 3838
+3 3421 4197 3422
+3 4197 4199 3422
+3 3422 4199 3423
+3 4199 4201 3423
+3 3423 4201 3424
+3 4201 4203 3424
+3 3424 4203 3425
+3 4203 4205 3425
+3 3425 4205 3426
+3 4205 4207 3426
+3 4207 3840 3426
+3 4210 3427 3844
+3 3429 4210 3836
+3 3427 4210 3429
+3 3838 3837 3429
+3 3836 3838 3429
+3 3837 3838 3421
+3 3840 3839 3426
+3 3841 3431 3839
+3 3840 3841 3839
+3 4212 3431 3841
+3 3432 3431 4212
+3 4212 3846 3432
+3 3433 3848 3842
+3 3844 3843 3433
+3 3842 3844 3433
+3 3843 3844 3427
+3 3846 3845 3432
+3 3847 3434 3845
+3 3846 3847 3845
+3 3434 3847 3849
+3 3436 4216 3848
+3 3435 4216 3436
+3 3436 3848 3433
+3 3849 3437 3434
+3 4218 3437 3849
+3 3438 3437 4218
+3 4218 3850 3438
+3 3435 3439 4220
+3 4216 3435 4220
+3 3850 3440 3438
+3 3440 3850 3851
+3 3439 3441 4222
+3 4220 3439 4222
+3 3851 3442 3440
+3 4225 3442 3851
+3 4222 3853 3852
+3 3441 3853 4222
+3 4225 4228 3444
+3 3442 4225 3444
+3 3445 3854 3852
+3 3445 3852 3853
+3 3446 4228 3855
+3 3444 4228 3446
+3 3856 4231 3854
+3 3445 3856 3854
+3 3855 3447 3446
+3 4232 3447 3855
+3 3448 3857 4231
+3 3448 4231 3856
+3 3451 4232 3858
+3 3447 4232 3451
+3 3859 4234 3857
+3 3448 3859 3857
+3 3858 3452 3451
+3 4235 3452 3858
+3 4238 4234 3453
+3 3453 4234 3859
+3 3455 3452 4239
+3 3452 4235 4239
+3 3453 3860 4238
+3 3860 4241 4238
+3 3458 4239 3861
+3 3455 4239 3458
+3 4241 3863 3862
+3 3860 3863 4241
+3 3458 3861 3865
+3 3864 3458 3865
+3 3866 4242 3862
+3 3863 3866 3862
+3 3864 3865 3868
+3 3867 3864 3868
+3 3869 4243 4242
+3 3866 3869 4242
+3 3867 3868 3871
+3 3870 3867 3871
+3 3872 4244 4243
+3 3869 3872 4243
+3 3870 3871 3874
+3 3873 3870 3874
+3 3875 4245 4244
+3 3872 3875 4244
+3 3873 3874 3877
+3 3876 3873 3877
+3 3875 4246 4245
+3 3878 4246 3875
+3 3876 3877 3879
+3 3467 3876 3879
+3 3878 3880 4246
+3 3880 4247 4246
+3 3467 3879 4248
+3 3469 3467 4248
+3 4247 3880 4249
+3 4249 3880 3881
+3 4250 3469 4248
+3 3882 3469 4250
+3 3883 4251 4249
+3 3881 3883 4249
+3 3882 3885 3884
+3 4250 3885 3882
+3 3883 4252 4251
+3 3886 4252 3883
+3 3884 3885 4253
+3 3887 3884 4253
+3 4252 3886 4254
+3 4254 3886 3888
+3 3887 4255 3889
+3 4255 3887 4253
+3 3888 4256 4254
+3 3890 4256 3888
+3 4257 3889 4255
+3 3891 3889 4257
+3 4256 3890 4258
+3 4258 3890 3892
+3 3891 4259 3893
+3 4257 4259 3891
+3 4260 4258 3892
+3 4260 3892 3894
+3 3893 4261 3895
+3 4261 3893 4259
+3 4264 4260 3894
+3 4264 3894 3901
+3 3895 4265 3902
+3 4265 3895 4261
+3 3896 4262 3897
+3 3485 4262 3896
+3 3899 3898 3896
+3 3897 3899 3896
+3 3900 3486 3898
+3 3899 3900 3898
+3 3486 3900 3903
+3 4268 4264 3901
+3 4268 3901 3904
+3 3902 4271 3907
+3 4271 3902 4265
+3 4262 3910 3909
+3 3485 3910 4262
+3 3903 3492 3486
+3 4266 3492 3903
+3 3493 3492 4266
+3 4266 3911 3493
+3 4269 4268 3904
+3 4269 3905 4275
+3 3904 3905 4269
+3 4275 3905 3912
+3 3906 4276 3913
+3 3906 4270 4276
+3 3907 4270 3906
+3 4270 3907 4271
+3 4279 3909 3908
+3 3908 3909 3910
+3 3911 3501 3493
+3 4272 3501 3911
+3 3502 3501 4272
+3 4272 3915 3502
+3 4283 4275 3912
+3 4283 3912 3916
+3 3913 3918 3917
+3 3918 3913 4276
+3 3908 3914 4278
+3 4279 3908 4278
+3 3915 3510 3502
+3 3510 3915 3919
+3 3922 3921 4283
+3 3923 3922 4283
+3 3916 3923 4283
+3 3917 3924 3516
+3 3918 3924 3917
+3 3925 3924 3918
+3 3914 3927 4278
+3 3927 4294 4278
+3 3919 3519 3510
+3 3920 3520 3519
+3 3919 3920 3519
+3 3520 3920 3928
+3 3521 3932 3921
+3 3922 3522 3521
+3 3921 3922 3521
+3 3522 3922 3923
+3 3924 3524 3516
+3 3925 3525 3524
+3 3924 3925 3524
+3 3525 3925 3933
+3 3927 3926 4292
+3 4294 3927 4292
+3 3928 3527 3520
+3 3929 3528 3527
+3 3928 3929 3527
+3 3929 3934 3528
+3 3930 3934 3929
+3 3934 3930 3935
+3 3529 3937 3931
+3 3932 3530 3529
+3 3931 3932 3529
+3 3530 3932 3521
+3 3933 3531 3525
+3 4298 3531 3933
+3 3532 3531 4298
+3 4298 3938 3532
+3 4292 3941 3940
+3 3926 3941 4292
+3 3934 3537 3528
+3 3934 3942 3537
+3 3935 3942 3934
+3 3942 3935 3943
+3 3538 3945 3936
+3 3937 3539 3538
+3 3936 3937 3538
+3 3539 3937 3529
+3 3938 3540 3532
+3 3540 3938 3946
+3 4330 3940 3939
+3 3939 3940 3941
+3 3942 3543 3537
+3 3942 3947 3543
+3 3943 3947 3942
+3 3947 3943 3948
+3 3943 3944 3948
+3 3948 3944 3949
+3 3544 3950 3945
+3 3544 3945 3538
+3 3946 3545 3540
+3 3545 3946 3951
+3 3939 3547 4329
+3 4330 3939 4329
+3 3543 3947 3952
+3 3551 3543 3952
+3 3952 3947 3953
+3 3947 3948 3953
+3 3953 3948 3954
+3 3948 3949 3954
+3 3954 3949 3955
+3 3552 3957 3950
+3 3552 3950 3544
+3 3951 3553 3545
+3 3553 3951 3958
+3 3547 3959 4329
+3 3959 4362 4329
+3 3952 3557 3551
+3 3952 3960 3557
+3 3953 3960 3952
+3 3960 3953 3961
+3 3953 3954 3961
+3 3961 3954 3962
+3 3954 3955 3962
+3 3962 3955 3963
+3 3964 3963 3956
+3 3964 3957 3558
+3 3956 3957 3964
+3 3558 3957 3552
+3 3958 3559 3553
+3 4363 3559 3958
+3 3560 3559 4363
+3 3959 3561 4361
+3 4362 3959 4361
+3 3557 3960 3965
+3 3567 3557 3965
+3 3965 3960 3966
+3 3960 3961 3966
+3 3966 3961 3967
+3 3961 3962 3967
+3 3967 3962 3968
+3 3962 3963 3968
+3 3968 3964 3568
+3 3963 3964 3968
+3 3568 3964 3558
+3 3569 4363 3969
+3 3560 4363 3569
+3 3561 3970 4361
+3 3970 4388 4361
+3 3567 3965 3972
+3 3971 3567 3972
+3 3972 3965 3973
+3 3965 3966 3973
+3 3973 3967 3577
+3 3966 3967 3973
+3 3968 3578 3577
+3 3967 3968 3577
+3 3578 3968 3568
+3 3969 3579 3569
+3 3579 3969 3974
+3 4399 4388 3970
+3 3975 4399 3970
+3 3971 3983 3982
+3 3972 3983 3971
+3 3984 3983 3972
+3 3984 3973 3592
+3 3972 3973 3984
+3 3592 3973 3577
+3 3974 3594 3579
+3 3594 3974 3985
+3 4399 3975 4400
+3 3975 3976 4400
+3 4400 3976 4401
+3 3976 3977 4401
+3 4401 3977 4402
+3 3977 3978 4402
+3 4402 3979 4404
+3 3978 3979 4402
+3 4404 3979 3986
+3 3980 3998 3997
+3 3981 3999 3998
+3 3980 3981 3998
+3 3982 4000 3999
+3 3981 3982 3999
+3 3983 4000 3982
+3 4001 4000 3983
+3 4001 3983 4002
+3 3983 3984 4002
+3 4003 4002 3984
+3 3592 4003 3984
+3 3985 3599 3594
+3 3599 3985 4004
+3 4405 4404 3986
+3 4405 3986 4406
+3 3986 3987 4406
+3 4406 3987 4407
+3 3987 3988 4407
+3 4407 3989 4409
+3 3988 3989 4407
+3 3990 4410 4409
+3 3989 3990 4409
+3 3991 4411 4410
+3 3990 3991 4410
+3 3992 4412 4411
+3 3991 3992 4411
+3 3993 4413 4412
+3 3992 3993 4412
+3 3994 4414 4413
+3 3993 3994 4413
+3 3995 4415 4414
+3 3994 3995 4414
+3 3996 4416 4415
+3 3995 3996 4415
+3 3997 4417 4416
+3 3996 3997 4416
+3 3998 4417 3997
+3 4418 4417 3998
+3 4418 3998 4419
+3 3998 3999 4419
+3 4419 3999 4420
+3 3999 4000 4420
+3 4420 4000 4005
+3 4000 4001 4005
+3 4005 4001 4006
+3 4001 4002 4006
+3 4007 4006 4002
+3 4003 4007 4002
+3 3599 4004 4008
+3 3601 3599 4008
+3 4005 4423 4420
+3 4423 4006 3602
+3 4005 4006 4423
+3 3602 4006 4007
+3 4008 3603 3601
+3 4424 3603 4008
+3 4009 4427 4423
+3 3602 4009 4423
+3 3605 4424 4010
+3 3603 4424 3605
+3 4429 4427 3606
+3 3606 4427 4009
+3 4010 3607 3605
+3 4430 3607 4010
+3 4429 4012 4011
+3 3606 4012 4429
+3 3609 4430 4013
+3 3607 4430 3609
+3 4014 4434 4011
+3 4012 4014 4011
+3 4013 3610 3609
+3 4435 3610 4013
+3 4437 4434 3611
+3 3611 4434 4014
+3 3613 4435 4015
+3 3610 4435 3613
+3 4437 4017 4016
+3 3611 4017 4437
+3 3613 4015 4018
+3 3616 3613 4018
+3 4019 4438 4016
+3 4017 4019 4016
+3 3616 4018 4021
+3 4020 3616 4021
+3 4441 4438 3617
+3 3617 4438 4019
+3 4021 3619 4020
+3 4442 3619 4021
+3 3617 4022 4441
+3 4022 4444 4441
+3 3621 4442 4023
+3 3619 4442 3621
+3 4444 4025 4024
+3 4022 4025 4444
+3 3621 4023 4026
+3 3624 3621 4026
+3 4027 4445 4024
+3 4025 4027 4024
+3 3624 4026 4029
+3 4028 3624 4029
+3 4030 4446 4445
+3 4027 4030 4445
+3 4028 4029 4032
+3 4031 4028 4032
+3 4033 4448 4446
+3 4030 4033 4446
+3 4031 4032 4035
+3 4034 4031 4035
+3 4036 4450 4448
+3 4033 4036 4448
+3 4035 3628 4034
+3 4451 3628 4035
+3 4037 4453 4450
+3 4036 4037 4450
+3 3630 3628 4454
+3 3628 4451 4454
+3 4456 4453 3631
+3 3631 4453 4037
+3 3633 3630 4457
+3 3630 4454 4457
+3 4456 3631 4459
+3 4459 3631 4038
+3 3635 3633 4460
+3 3633 4457 4460
+3 4039 4462 4459
+3 4038 4039 4459
+3 4040 3635 4463
+3 3635 4460 4463
+3 4041 4465 4462
+3 4039 4041 4462
+3 4040 4043 4042
+3 4463 4043 4040
+3 4044 4467 4465
+3 4041 4044 4465
+3 4042 4043 4046
+3 4045 4042 4046
+3 4047 4468 4467
+3 4044 4047 4467
+3 4045 4046 4049
+3 4048 4045 4049
+3 4050 4470 4468
+3 4047 4050 4468
+3 4048 4049 4051
+3 3643 4048 4051
+3 3646 4469 3648
+3 4469 4472 3648
+3 4050 4476 4470
+3 4053 4476 4050
+3 3643 4051 4477
+3 3650 3643 4477
+3 3646 4052 4471
+3 4469 3646 4471
+3 4472 4480 4056
+3 3648 4472 4056
+3 3654 4473 3656
+3 4473 4474 3656
+3 3656 4474 3657
+3 4474 4481 3657
+3 4053 4057 4476
+3 4057 4484 4476
+3 4485 3650 4477
+3 3659 3650 4485
+3 4054 4478 4055
+3 4478 4479 4055
+3 4052 4055 4479
+3 4471 4052 4479
+3 4059 4480 4060
+3 4056 4480 4059
+3 3654 4062 4473
+3 4062 4489 4473
+3 4481 4482 3663
+3 3657 4481 3663
+3 4482 4063 3663
+3 4484 4057 4490
+3 4490 4057 4064
+3 4065 3659 4491
+3 3659 4485 4491
+3 4054 4058 4487
+3 4478 4054 4487
+3 4060 4067 4059
+3 4494 4067 4060
+3 4062 4061 4488
+3 4489 4062 4488
+3 4063 4068 3663
+3 4068 4063 4070
+3 4071 4497 4490
+3 4064 4071 4490
+3 4065 4073 4072
+3 4491 4073 4065
+3 4058 4066 4493
+3 4487 4058 4493
+3 4075 4067 4501
+3 4067 4494 4501
+3 4061 4076 4488
+3 4076 4503 4488
+3 4070 4069 4068
+3 4495 4069 4070
+3 3672 4069 4495
+3 4495 4077 3672
+3 4071 4504 4497
+3 4078 4504 4071
+3 4072 4073 4079
+3 3674 4072 4079
+3 3676 4499 4074
+3 4499 4500 4074
+3 4066 4074 4500
+3 4493 4066 4500
+3 4501 4508 4080
+3 4075 4501 4080
+3 4076 4082 4503
+3 4082 4510 4503
+3 4077 3680 3672
+3 3680 4077 4083
+3 4504 4078 4513
+3 4513 4078 4084
+3 3674 4079 4085
+3 3682 3674 4085
+3 4085 4079 4087
+3 4506 3684 4087
+3 3676 3684 4506
+3 4499 3676 4506
+3 4088 4080 4514
+3 4080 4508 4514
+3 4082 4081 4509
+3 4510 4082 4509
+3 4083 3686 3680
+3 4511 3686 4083
+3 3687 3686 4511
+3 4511 4089 3687
+3 4090 4519 4513
+3 4084 4090 4513
+3 4085 3690 3682
+3 4087 4086 3690
+3 4085 4087 3690
+3 4086 4087 3684
+3 4514 4520 4091
+3 4088 4514 4091
+3 4081 4092 4509
+3 4092 4521 4509
+3 4089 3693 3687
+3 3693 4089 4093
+3 4095 4523 4519
+3 4090 4095 4519
+3 4096 4091 4524
+3 4091 4520 4524
+3 4092 4098 4521
+3 4098 4527 4521
+3 4093 3698 3693
+3 4094 3699 3698
+3 4093 4094 3698
+3 3699 4094 4099
+3 4100 4099 4523
+3 4101 4100 4523
+3 4095 4101 4523
+3 4524 4528 4102
+3 4096 4524 4102
+3 4098 4097 4526
+3 4527 4098 4526
+3 4099 3703 3699
+3 4100 3704 3703
+3 4099 4100 3703
+3 3704 4100 4101
+3 4103 4102 4529
+3 4102 4528 4529
+3 4097 4104 4526
+3 4104 4530 4526
+3 4529 4531 4105
+3 4103 4529 4105
+3 4104 4107 4530
+3 4107 4533 4530
+3 4108 4105 4534
+3 4105 4531 4534
+3 4107 4106 4532
+3 4533 4107 4532
+3 4534 4535 4109
+3 4108 4534 4109
+3 4106 4110 4532
+3 4110 4536 4532
+3 4111 4109 4537
+3 4109 4535 4537
+3 4110 4112 4536
+3 4112 4538 4536
+3 4113 4111 4539
+3 4111 4537 4539
+3 4538 4115 4114
+3 4112 4115 4538
+3 4116 4113 4541
+3 4113 4539 4541
+3 4115 4542 4114
+3 4117 4542 4115
+3 4122 4540 4545
+3 4116 4540 4122
+3 4541 4540 4116
+3 4542 4118 4546
+3 4117 4118 4542
+3 4119 4547 4546
+3 4118 4119 4546
+3 4547 4119 4123
+3 4143 4543 4560
+3 4120 4543 4143
+3 4544 4543 4120
+3 4544 4120 4545
+3 4120 4121 4545
+3 4121 4122 4545
+3 4548 4547 4123
+3 4548 4123 4549
+3 4123 4124 4549
+3 4549 4124 4550
+3 4124 4125 4550
+3 4550 4125 4551
+3 4125 4126 4551
+3 4551 4126 4552
+3 4126 4127 4552
+3 4552 4128 4561
+3 4127 4128 4552
+3 4129 4562 4561
+3 4128 4129 4561
+3 4562 4129 4144
+3 4130 4565 4145
+3 4131 4566 4565
+3 4130 4131 4565
+3 4132 4567 4566
+3 4131 4132 4566
+3 4133 4568 4567
+3 4132 4133 4567
+3 4568 4133 4146
+3 4134 4156 4155
+3 4156 4134 4157
+3 4164 4135 4553
+3 4575 4164 4553
+3 4553 4135 4554
+3 4135 4136 4554
+3 4554 4136 4555
+3 4136 4137 4555
+3 4555 4137 4556
+3 4137 4138 4556
+3 4556 4138 4557
+3 4138 4139 4557
+3 4557 4139 4558
+3 4139 4140 4558
+3 4558 4140 4559
+3 4140 4141 4559
+3 4559 4141 4560
+3 4141 4142 4560
+3 4142 4143 4560
+3 4563 4562 4144
+3 4563 4144 4564
+3 4144 4145 4564
+3 4564 4145 4565
+3 4569 4568 4146
+3 4569 4146 4570
+3 4146 4147 4570
+3 4570 4147 4571
+3 4147 4148 4571
+3 4571 4149 4576
+3 4148 4149 4571
+3 4150 4577 4576
+3 4149 4150 4576
+3 4151 4578 4577
+3 4150 4151 4577
+3 4152 4579 4578
+3 4151 4152 4578
+3 4153 4580 4579
+3 4152 4153 4579
+3 4154 4165 4580
+3 4153 4154 4580
+3 4155 4581 4165
+3 4154 4155 4165
+3 4156 4581 4155
+3 4582 4581 4156
+3 4582 4156 4157
+3 4582 4157 4572
+3 4572 4158 4583
+3 4157 4158 4572
+3 4583 4158 4166
+3 4159 4585 4169
+3 4160 4586 4585
+3 4159 4160 4585
+3 4161 4587 4586
+3 4160 4161 4586
+3 4587 4161 4170
+3 4180 4162 4573
+3 4591 4180 4573
+3 4573 4162 4574
+3 4162 4163 4574
+3 4574 4163 4575
+3 4163 4164 4575
+3 4165 4592 4580
+3 4165 4581 4592
+3 4584 4583 4166
+3 4584 4167 4593
+3 4166 4167 4584
+3 4593 4167 4181
+3 4168 4596 4186
+3 4169 4597 4596
+3 4168 4169 4596
+3 4597 4169 4585
+3 4598 4587 4170
+3 4171 4599 4598
+3 4170 4171 4598
+3 4172 4600 4599
+3 4171 4172 4599
+3 4173 4601 4600
+3 4172 4173 4600
+3 4174 4602 4601
+3 4173 4174 4601
+3 4175 4603 4602
+3 4174 4175 4602
+3 4176 4604 4603
+3 4175 4176 4603
+3 4176 4588 4604
+3 4177 4588 4176
+3 4588 4177 4589
+3 4177 4178 4589
+3 4589 4178 4590
+3 4178 4179 4590
+3 4590 4179 4591
+3 4179 4180 4591
+3 4594 4593 4181
+3 4594 4182 4605
+3 4181 4182 4594
+3 4183 4606 4605
+3 4182 4183 4605
+3 4606 4183 4187
+3 4184 4609 4196
+3 4185 4610 4609
+3 4184 4185 4609
+3 4185 4595 4610
+3 4186 4595 4185
+3 4595 4186 4596
+3 4607 4606 4187
+3 4607 4188 4611
+3 4187 4188 4607
+3 4189 4612 4611
+3 4188 4189 4611
+3 4190 4613 4612
+3 4189 4190 4612
+3 4191 4614 4613
+3 4190 4191 4613
+3 4192 4615 4614
+3 4191 4192 4614
+3 4193 4616 4615
+3 4192 4193 4615
+3 4194 4617 4616
+3 4193 4194 4616
+3 4195 4618 4617
+3 4194 4195 4617
+3 4195 4608 4618
+3 4196 4608 4195
+3 4608 4196 4609
+3 4619 3836 4211
+3 3836 4619 3838
+3 4619 4621 3838
+3 4197 4621 4198
+3 3838 4621 4197
+3 4200 4199 4197
+3 4198 4200 4197
+3 4202 4201 4199
+3 4200 4202 4199
+3 4204 4203 4201
+3 4202 4204 4201
+3 4206 4205 4203
+3 4204 4206 4203
+3 4208 4207 4205
+3 4206 4208 4205
+3 4623 4207 4208
+3 3840 4207 4623
+3 3840 4623 3841
+3 4623 4625 3841
+3 4625 4213 3841
+3 3844 4627 4209
+3 3842 4627 3844
+3 4211 4210 3844
+3 4209 4211 3844
+3 4210 4211 3836
+3 4213 4212 3841
+3 4214 3846 4212
+3 4213 4214 4212
+3 4628 3846 4214
+3 3847 3846 4628
+3 4628 4215 3847
+3 4630 3848 4217
+3 3842 3848 4630
+3 4627 3842 4630
+3 4215 3849 3847
+3 3849 4215 4219
+3 4216 4221 4217
+3 4216 4217 3848
+3 4219 4218 3849
+3 4635 4218 4219
+3 3850 4218 4635
+3 4220 4223 4221
+3 4220 4221 4216
+3 4635 4638 3851
+3 3850 4635 3851
+3 4222 4224 4223
+3 4222 4223 4220
+3 4225 4638 4226
+3 3851 4638 4225
+3 3852 4227 4224
+3 3852 4224 4222
+3 4226 4228 4225
+3 4228 4226 4229
+3 4642 4227 3854
+3 3854 4227 3852
+3 4229 3855 4228
+3 4643 3855 4229
+3 4642 4231 4230
+3 3854 4231 4642
+3 4232 4643 4233
+3 3855 4643 4232
+3 4646 4230 3857
+3 3857 4230 4231
+3 4233 3858 4232
+3 4647 3858 4233
+3 3857 4234 4646
+3 4234 4649 4646
+3 4235 4647 4236
+3 3858 4647 4235
+3 4649 4238 4237
+3 4234 4238 4649
+3 4235 4236 4240
+3 4239 4235 4240
+3 4241 4650 4237
+3 4238 4241 4237
+3 4240 3861 4239
+3 4651 3861 4240
+3 4653 4650 3862
+3 3862 4650 4241
+3 3865 3861 4654
+3 3861 4651 4654
+3 3862 4242 4653
+3 4242 4656 4653
+3 3868 3865 4657
+3 3865 4654 4657
+3 4242 4243 4656
+3 4243 4659 4656
+3 3871 3868 4660
+3 3868 4657 4660
+3 4243 4244 4659
+3 4244 4662 4659
+3 3874 3871 4663
+3 3871 4660 4663
+3 4244 4245 4662
+3 4245 4665 4662
+3 3877 3874 4666
+3 3874 4663 4666
+3 4665 4245 4668
+3 4668 4245 4246
+3 3879 3877 4669
+3 3877 4666 4669
+3 4247 4670 4668
+3 4246 4247 4668
+3 4248 3879 4671
+3 3879 4669 4671
+3 4247 4672 4670
+3 4249 4672 4247
+3 4248 4673 4250
+3 4671 4673 4248
+3 4249 4251 4672
+3 4251 4674 4672
+3 4675 4250 4673
+3 3885 4250 4675
+3 4674 4251 4677
+3 4677 4251 4252
+3 4253 3885 4678
+3 3885 4675 4678
+3 4252 4679 4677
+3 4254 4679 4252
+3 4253 4680 4255
+3 4678 4680 4253
+3 4679 4254 4681
+3 4681 4254 4256
+3 4255 4682 4257
+3 4682 4255 4680
+3 4256 4683 4681
+3 4258 4683 4256
+3 4684 4257 4682
+3 4259 4257 4684
+3 4689 4683 4258
+3 4260 4689 4258
+3 4259 4690 4261
+3 4684 4690 4259
+3 3897 4685 3899
+3 4685 4686 3899
+3 3899 4686 3900
+3 4686 4688 3900
+3 4688 4263 3900
+3 4693 4689 4260
+3 4264 4693 4260
+3 4261 4694 4265
+3 4694 4261 4690
+3 3897 4262 4691
+3 4685 3897 4691
+3 4263 3903 3900
+3 3903 4263 4267
+3 4698 4693 4264
+3 4268 4698 4264
+3 4265 4700 4271
+3 4700 4265 4694
+3 4262 3909 4695
+3 4691 4262 4695
+3 4267 4266 3903
+3 4696 4266 4267
+3 3911 4266 4696
+3 4696 4273 3911
+3 4698 4269 4702
+3 4268 4269 4698
+3 4702 4269 4275
+3 4270 4277 4276
+3 4270 4699 4277
+3 4271 4699 4270
+3 4699 4271 4700
+3 3909 4279 4695
+3 4279 4705 4695
+3 4273 4272 3911
+3 4274 3915 4272
+3 4273 4274 4272
+3 3915 4274 4280
+3 4282 4702 4275
+3 4708 4702 4282
+3 4282 4275 4283
+3 4276 4284 3918
+3 4277 4284 4276
+3 4285 4284 4277
+3 4279 4278 4703
+3 4705 4279 4703
+3 4280 3919 3915
+3 4281 3920 3919
+3 4280 4281 3919
+3 3920 4281 4286
+3 4715 4282 3921
+3 4708 4282 4715
+3 3921 4282 4283
+3 3918 4284 4289
+3 3925 3918 4289
+3 4289 4284 4290
+3 4284 4285 4290
+3 4703 4294 4293
+3 4278 4294 4703
+3 4286 3928 3920
+3 4287 3929 3928
+3 4286 4287 3928
+3 4288 3930 3929
+3 4287 4288 3929
+3 3930 4288 4295
+3 4714 3931 4297
+3 3932 4714 4715
+3 3931 4714 3932
+3 3932 4715 3921
+3 4289 3933 3925
+3 4289 4299 3933
+3 4290 4299 4289
+3 4299 4290 4300
+3 4303 4302 4291
+3 4303 4291 4304
+3 4732 4293 4292
+3 4292 4293 4294
+3 4295 3935 3930
+3 4295 4306 3935
+3 4296 4306 4295
+3 4306 4296 4307
+3 4724 3936 4308
+3 3937 4724 4297
+3 3936 4724 3937
+3 3937 4297 3931
+3 4299 4298 3933
+3 4300 3938 4298
+3 4299 4300 4298
+3 3938 4300 4309
+3 4311 4310 4301
+3 4311 4301 4312
+3 4301 4302 4312
+3 4312 4302 4313
+3 4302 4303 4313
+3 4313 4303 4314
+3 4303 4304 4314
+3 4314 4304 4315
+3 4304 4305 4315
+3 4292 3940 4731
+3 4732 4292 4731
+3 4306 3943 3935
+3 4307 3944 3943
+3 4306 4307 3943
+3 3944 4307 4316
+3 3945 4318 4308
+3 3945 4308 3936
+3 4309 3946 3938
+3 3946 4309 4319
+3 4322 4321 4310
+3 4322 4310 4323
+3 4310 4311 4323
+3 4323 4311 4324
+3 4311 4312 4324
+3 4324 4312 4325
+3 4312 4313 4325
+3 4325 4313 4326
+3 4313 4314 4326
+3 4326 4314 4327
+3 4314 4315 4327
+3 4327 4315 4328
+3 3940 4330 4731
+3 4330 4754 4731
+3 4316 3949 3944
+3 4316 4331 3949
+3 4317 4331 4316
+3 4331 4317 4332
+3 3950 4334 4318
+3 3950 4318 3945
+3 4319 3951 3946
+3 3951 4319 4335
+3 4337 4336 4320
+3 4337 4320 4338
+3 4320 4321 4338
+3 4338 4321 4339
+3 4321 4322 4339
+3 4339 4322 4340
+3 4322 4323 4340
+3 4340 4323 4341
+3 4323 4324 4341
+3 4341 4324 4342
+3 4324 4325 4342
+3 4342 4325 4343
+3 4325 4326 4343
+3 4343 4326 4344
+3 4326 4327 4344
+3 4344 4327 4345
+3 4327 4328 4345
+3 4345 4328 4346
+3 4330 4329 4753
+3 4754 4330 4753
+3 4331 3955 3949
+3 4331 4347 3955
+3 4332 4347 4331
+3 4347 4333 3956
+3 4332 4333 4347
+3 4334 3957 3956
+3 4333 4334 3956
+3 3957 4334 3950
+3 4335 3958 3951
+3 3958 4335 4348
+3 4351 4350 4336
+3 4351 4336 4352
+3 4336 4337 4352
+3 4352 4337 4353
+3 4337 4338 4353
+3 4353 4338 4354
+3 4338 4339 4354
+3 4354 4339 4355
+3 4339 4340 4355
+3 4355 4340 4356
+3 4340 4341 4356
+3 4356 4341 4357
+3 4341 4342 4357
+3 4357 4342 4358
+3 4342 4343 4358
+3 4358 4343 4359
+3 4343 4344 4359
+3 4359 4344 4360
+3 4344 4345 4360
+3 4360 4345 4771
+3 4345 4346 4771
+3 4329 4362 4753
+3 4362 4774 4753
+3 4347 3963 3955
+3 3963 4347 3956
+3 4348 4363 3958
+3 4363 4348 4364
+3 4367 4366 4349
+3 4367 4349 4368
+3 4349 4350 4368
+3 4368 4350 4369
+3 4350 4351 4369
+3 4369 4351 4370
+3 4351 4352 4370
+3 4370 4352 4371
+3 4352 4353 4371
+3 4371 4353 4372
+3 4353 4354 4372
+3 4372 4354 4373
+3 4354 4355 4373
+3 4373 4355 4374
+3 4355 4356 4374
+3 4374 4356 4375
+3 4356 4357 4375
+3 4375 4357 4376
+3 4357 4358 4376
+3 4376 4358 4783
+3 4358 4359 4783
+3 4783 4359 4784
+3 4359 4360 4784
+3 4360 4771 4784
+3 4362 4361 4773
+3 4774 4362 4773
+3 4364 3969 4363
+3 3969 4364 4377
+3 4379 4378 4365
+3 4379 4365 4380
+3 4365 4366 4380
+3 4380 4366 4381
+3 4366 4367 4381
+3 4381 4367 4382
+3 4367 4368 4382
+3 4382 4368 4383
+3 4368 4369 4383
+3 4383 4369 4384
+3 4369 4370 4384
+3 4384 4370 4385
+3 4370 4371 4385
+3 4385 4371 4386
+3 4371 4372 4386
+3 4386 4372 4387
+3 4372 4373 4387
+3 4387 4373 4792
+3 4373 4374 4792
+3 4792 4374 4793
+3 4374 4375 4793
+3 4793 4375 4794
+3 4375 4376 4794
+3 4376 4783 4794
+3 4361 4388 4773
+3 4388 4796 4773
+3 4377 3974 3969
+3 3974 4377 4389
+3 4391 4390 4378
+3 4391 4378 4392
+3 4378 4379 4392
+3 4392 4379 4393
+3 4379 4380 4393
+3 4393 4380 4394
+3 4380 4381 4394
+3 4394 4381 4395
+3 4381 4382 4395
+3 4395 4382 4396
+3 4382 4383 4396
+3 4396 4383 4397
+3 4383 4384 4397
+3 4397 4384 4398
+3 4384 4385 4398
+3 4398 4385 4801
+3 4385 4386 4801
+3 4801 4386 4802
+3 4386 4387 4802
+3 4387 4792 4802
+3 4805 4796 4388
+3 4399 4805 4388
+3 4389 3985 3974
+3 3985 4389 4403
+3 4811 4390 4812
+3 4390 4391 4812
+3 4812 4391 4813
+3 4391 4392 4813
+3 4813 4392 4814
+3 4392 4393 4814
+3 4814 4393 4815
+3 4393 4394 4815
+3 4815 4394 4816
+3 4394 4395 4816
+3 4816 4395 4817
+3 4395 4396 4817
+3 4817 4396 4818
+3 4396 4397 4818
+3 4818 4397 4819
+3 4397 4398 4819
+3 4398 4801 4819
+3 4805 4399 4806
+3 4399 4400 4806
+3 4806 4400 4807
+3 4400 4401 4807
+3 4807 4402 4822
+3 4401 4402 4807
+3 4822 4402 4404
+3 4403 4004 3985
+3 4004 4403 4408
+3 4823 4822 4404
+3 4823 4404 4824
+3 4404 4405 4824
+3 4824 4405 4825
+3 4405 4406 4825
+3 4825 4407 4836
+3 4406 4407 4825
+3 4836 4407 4409
+3 4004 4408 4421
+3 4008 4004 4421
+3 4837 4836 4409
+3 4837 4409 4838
+3 4409 4410 4838
+3 4838 4410 4839
+3 4410 4411 4839
+3 4839 4411 4840
+3 4411 4412 4840
+3 4840 4412 4841
+3 4412 4413 4841
+3 4841 4413 4842
+3 4413 4414 4842
+3 4842 4415 4849
+3 4414 4415 4842
+3 4416 4850 4849
+3 4415 4416 4849
+3 4417 4851 4850
+3 4416 4417 4850
+3 4418 4852 4851
+3 4417 4418 4851
+3 4419 4853 4852
+3 4418 4419 4852
+3 4420 4422 4853
+3 4419 4420 4853
+3 4422 4420 4423
+3 4008 4421 4425
+3 4424 4008 4425
+3 4425 4421 4426
+3 4422 4855 4853
+3 4427 4855 4422
+3 4423 4427 4422
+3 4425 4010 4424
+3 4425 4428 4010
+3 4426 4428 4425
+3 4429 4857 4855
+3 4427 4429 4855
+3 4010 4428 4431
+3 4430 4010 4431
+3 4860 4857 4011
+3 4011 4857 4429
+3 4431 4013 4430
+3 4013 4431 4432
+3 4860 4434 4433
+3 4011 4434 4860
+3 4013 4432 4436
+3 4435 4013 4436
+3 4437 4861 4433
+3 4434 4437 4433
+3 4436 4015 4435
+3 4862 4015 4436
+3 4865 4861 4016
+3 4016 4861 4437
+3 4018 4015 4866
+3 4015 4862 4866
+3 4016 4438 4865
+3 4438 4868 4865
+3 4021 4866 4439
+3 4018 4866 4021
+3 4868 4441 4440
+3 4438 4441 4868
+3 4021 4439 4443
+3 4442 4021 4443
+3 4444 4869 4440
+3 4441 4444 4440
+3 4443 4023 4442
+3 4870 4023 4443
+3 4872 4869 4024
+3 4024 4869 4444
+3 4026 4023 4873
+3 4023 4870 4873
+3 4024 4445 4872
+3 4445 4876 4872
+3 4029 4026 4877
+3 4026 4873 4877
+3 4445 4446 4876
+3 4446 4879 4876
+3 4032 4877 4447
+3 4029 4877 4032
+3 4446 4448 4879
+3 4448 4880 4879
+3 4032 4447 4449
+3 4035 4032 4449
+3 4448 4450 4880
+3 4450 4881 4880
+3 4035 4449 4452
+3 4451 4035 4452
+3 4450 4453 4881
+3 4453 4882 4881
+3 4451 4452 4455
+3 4454 4451 4455
+3 4453 4456 4882
+3 4456 4883 4882
+3 4454 4455 4458
+3 4457 4454 4458
+3 4456 4459 4883
+3 4459 4884 4883
+3 4457 4458 4461
+3 4460 4457 4461
+3 4459 4462 4884
+3 4462 4885 4884
+3 4460 4461 4464
+3 4463 4460 4464
+3 4462 4465 4885
+3 4465 4886 4885
+3 4463 4464 4466
+3 4043 4463 4466
+3 4465 4467 4886
+3 4467 4887 4886
+3 4043 4466 4888
+3 4046 4043 4888
+3 4467 4468 4887
+3 4468 4889 4887
+3 4890 4046 4888
+3 4049 4046 4890
+3 4468 4470 4889
+3 4470 4893 4889
+3 4051 4049 4894
+3 4049 4890 4894
+3 4469 4892 4472
+3 4892 4897 4472
+3 4893 4470 4901
+3 4901 4470 4476
+3 4477 4051 4902
+3 4051 4894 4902
+3 4469 4471 4896
+3 4892 4469 4896
+3 4897 4906 4480
+3 4472 4897 4480
+3 4474 4898 4475
+3 4473 4898 4474
+3 4899 4474 4475
+3 4481 4474 4899
+3 4899 4483 4481
+3 4484 4907 4901
+3 4476 4484 4901
+3 4477 4486 4485
+3 4902 4486 4477
+3 4478 4904 4479
+3 4904 4905 4479
+3 4471 4479 4905
+3 4896 4471 4905
+3 4906 4909 4060
+3 4480 4906 4060
+3 4473 4489 4898
+3 4489 4911 4898
+3 4483 4482 4481
+3 4912 4482 4483
+3 4063 4482 4912
+3 4484 4915 4907
+3 4490 4915 4484
+3 4485 4486 4492
+3 4491 4485 4492
+3 4478 4487 4908
+3 4904 4478 4908
+3 4494 4060 4917
+3 4060 4909 4917
+3 4489 4488 4910
+3 4911 4489 4910
+3 4912 4913 4070
+3 4063 4912 4070
+3 4913 4496 4070
+3 4490 4497 4915
+3 4497 4918 4915
+3 4491 4492 4498
+3 4073 4491 4498
+3 4487 4493 4916
+3 4908 4487 4916
+3 4501 4917 4502
+3 4494 4917 4501
+3 4488 4503 4910
+3 4503 4921 4910
+3 4496 4495 4070
+3 4922 4495 4496
+3 4077 4495 4922
+3 4918 4497 4925
+3 4925 4497 4504
+3 4073 4498 4505
+3 4079 4073 4505
+3 4505 4498 4507
+3 4919 4499 4507
+3 4499 4919 4500
+3 4919 4920 4500
+3 4493 4500 4920
+3 4916 4493 4920
+3 4502 4508 4501
+3 4926 4508 4502
+3 4503 4510 4921
+3 4510 4928 4921
+3 4922 4923 4083
+3 4077 4922 4083
+3 4923 4512 4083
+3 4513 4931 4925
+3 4504 4513 4925
+3 4505 4087 4079
+3 4507 4506 4087
+3 4505 4507 4087
+3 4506 4507 4499
+3 4514 4926 4515
+3 4508 4926 4514
+3 4510 4509 4927
+3 4928 4510 4927
+3 4512 4511 4083
+3 4929 4511 4512
+3 4089 4511 4929
+3 4929 4516 4089
+3 4518 4517 4931
+3 4519 4518 4931
+3 4513 4519 4931
+3 4515 4520 4514
+3 4932 4520 4515
+3 4509 4521 4927
+3 4521 4933 4927
+3 4516 4093 4089
+3 4517 4094 4093
+3 4516 4517 4093
+3 4517 4522 4094
+3 4518 4522 4517
+3 4523 4522 4518
+3 4519 4523 4518
+3 4524 4932 4525
+3 4520 4932 4524
+3 4521 4527 4933
+3 4527 4935 4933
+3 4522 4099 4094
+3 4099 4522 4523
+3 4525 4528 4524
+3 4936 4528 4525
+3 4527 4526 4934
+3 4935 4527 4934
+3 4529 4528 4937
+3 4528 4936 4937
+3 4526 4530 4934
+3 4530 4939 4934
+3 4937 4940 4531
+3 4529 4937 4531
+3 4530 4533 4939
+3 4533 4942 4939
+3 4534 4531 4943
+3 4531 4940 4943
+3 4533 4532 4941
+3 4942 4533 4941
+3 4943 4945 4535
+3 4534 4943 4535
+3 4532 4536 4941
+3 4536 4946 4941
+3 4537 4535 4947
+3 4535 4945 4947
+3 4536 4538 4946
+3 4538 4949 4946
+3 4539 4537 4950
+3 4537 4947 4950
+3 4538 4114 4948
+3 4949 4538 4948
+3 4541 4950 4952
+3 4539 4950 4541
+3 4948 4114 4953
+3 4953 4114 4542
+3 4545 4951 4956
+3 4540 4951 4545
+3 4952 4951 4540
+3 4540 4541 4952
+3 4957 4953 4542
+3 4957 4542 4546
+3 4560 4954 4970
+3 4543 4954 4560
+3 4955 4954 4543
+3 4955 4543 4956
+3 4543 4544 4956
+3 4544 4545 4956
+3 4958 4957 4546
+3 4958 4546 4959
+3 4546 4547 4959
+3 4959 4547 4960
+3 4547 4548 4960
+3 4960 4548 4961
+3 4548 4549 4961
+3 4961 4549 4962
+3 4549 4550 4962
+3 4962 4550 4963
+3 4550 4551 4963
+3 4963 4552 4971
+3 4551 4552 4963
+3 4971 4552 4561
+3 4575 4553 4964
+3 4981 4575 4964
+3 4964 4553 4965
+3 4553 4554 4965
+3 4965 4554 4966
+3 4554 4555 4966
+3 4966 4555 4967
+3 4555 4556 4967
+3 4967 4556 4968
+3 4556 4557 4968
+3 4968 4557 4969
+3 4557 4558 4969
+3 4969 4558 4970
+3 4558 4559 4970
+3 4559 4560 4970
+3 4972 4971 4561
+3 4972 4561 4973
+3 4561 4562 4973
+3 4973 4562 4974
+3 4562 4563 4974
+3 4974 4563 4975
+3 4563 4564 4975
+3 4975 4564 4976
+3 4564 4565 4976
+3 4976 4565 4977
+3 4565 4566 4977
+3 4977 4566 4978
+3 4566 4567 4978
+3 4978 4567 4979
+3 4567 4568 4979
+3 4979 4569 4982
+3 4568 4569 4979
+3 4570 4983 4982
+3 4569 4570 4982
+3 4571 4984 4983
+3 4570 4571 4983
+3 4984 4571 4576
+3 4572 4987 4582
+3 4987 4572 4583
+3 4573 4990 4591
+3 4573 4980 4990
+3 4574 4980 4573
+3 4980 4574 4981
+3 4574 4575 4981
+3 4985 4984 4576
+3 4985 4577 4991
+3 4576 4577 4985
+3 4578 4992 4991
+3 4577 4578 4991
+3 4579 4993 4992
+3 4578 4579 4992
+3 4580 4994 4993
+3 4579 4580 4993
+3 4994 4580 4592
+3 4581 4996 4592
+3 4581 4986 4996
+3 4582 4986 4581
+3 4986 4582 4987
+3 4997 4987 4583
+3 4584 4998 4997
+3 4583 4584 4997
+3 4998 4584 4593
+3 4585 5000 4597
+3 4586 5001 5000
+3 4585 4586 5000
+3 4587 5002 5001
+3 4586 4587 5001
+3 5002 4587 4598
+3 4588 5007 4604
+3 4589 5008 5007
+3 4588 4589 5007
+3 4589 4988 5008
+3 4590 4988 4589
+3 4988 4590 4989
+3 4590 4591 4989
+3 4989 4591 4990
+3 4995 4994 4592
+3 4995 4592 4996
+3 5009 4998 4593
+3 4594 5010 5009
+3 4593 4594 5009
+3 5010 4594 4605
+3 4595 5013 4610
+3 4596 5014 5013
+3 4595 4596 5013
+3 4596 4999 5014
+3 4597 4999 4596
+3 4999 4597 5000
+3 5003 5002 4598
+3 5003 4599 5015
+3 4598 4599 5003
+3 4600 5016 5015
+3 4599 4600 5015
+3 4601 5017 5016
+3 4600 4601 5016
+3 4601 5004 5017
+3 4602 5004 4601
+3 5004 4602 5005
+3 4602 4603 5005
+3 5005 4603 5006
+3 4603 4604 5006
+3 5006 4604 5007
+3 5011 5010 4605
+3 5011 4606 5018
+3 4605 4606 5011
+3 4607 5019 5018
+3 4606 4607 5018
+3 5019 4607 4611
+3 4608 5024 4618
+3 4609 5025 5024
+3 4608 4609 5024
+3 4609 5012 5025
+3 4610 5012 4609
+3 5012 4610 5013
+3 5020 5019 4611
+3 5020 4611 5021
+3 4611 4612 5021
+3 5021 4613 5026
+3 4612 4613 5021
+3 4614 5027 5026
+3 4613 4614 5026
+3 4615 5028 5027
+3 4614 4615 5027
+3 4616 5029 5028
+3 4615 4616 5028
+3 4616 5022 5029
+3 4617 5022 4616
+3 5022 4617 5023
+3 4617 4618 5023
+3 5023 4618 5024
+3 5030 4198 4622
+3 4198 5030 4200
+3 5030 5031 4200
+3 4200 5031 4202
+3 5031 5033 4202
+3 4202 5033 4204
+3 5033 5035 4204
+3 4204 5035 4206
+3 5035 5037 4206
+3 4206 5037 4208
+3 5037 5039 4208
+3 5039 4624 4208
+3 4209 5040 4211
+3 5040 5041 4211
+3 4619 5041 4620
+3 4211 5041 4619
+3 4622 4621 4619
+3 4620 4622 4619
+3 4621 4622 4198
+3 4624 4623 4208
+3 4626 4625 4623
+3 4624 4626 4623
+3 5043 4625 4626
+3 4213 4625 5043
+3 4213 5043 4214
+3 5043 5045 4214
+3 5045 4629 4214
+3 5046 4627 4631
+3 4209 4627 5046
+3 5040 4209 5046
+3 4629 4628 4214
+3 5050 4628 4629
+3 4215 4628 5050
+3 5048 4217 4632
+3 4630 5048 4631
+3 4217 5048 4630
+3 4630 4631 4627
+3 5050 5051 4219
+3 4215 5050 4219
+3 5051 4633 4219
+3 4221 4634 4632
+3 4221 4632 4217
+3 4633 4635 4219
+3 4635 4633 4636
+3 4223 4637 4634
+3 4223 4634 4221
+3 4636 4638 4635
+3 4638 4636 4639
+3 5055 4637 4224
+3 4224 4637 4223
+3 4639 4226 4638
+3 4226 4639 4640
+3 4224 4227 5053
+3 5055 4224 5053
+3 4640 4229 4226
+3 5056 4229 4640
+3 5053 4642 4641
+3 4227 4642 5053
+3 4643 5056 4644
+3 4229 5056 4643
+3 5059 4641 4230
+3 4230 4641 4642
+3 4644 4233 4643
+3 5060 4233 4644
+3 5059 4646 4645
+3 4230 4646 5059
+3 4647 5060 4648
+3 4233 5060 4647
+3 4649 5062 4645
+3 4646 4649 4645
+3 4648 4236 4647
+3 5063 4236 4648
+3 5065 5062 4237
+3 4237 5062 4649
+3 4240 4236 5066
+3 4236 5063 5066
+3 4237 4650 5065
+3 4650 5068 5065
+3 4651 4240 5069
+3 4240 5066 5069
+3 5068 4653 4652
+3 4650 4653 5068
+3 4654 5069 4655
+3 4651 5069 4654
+3 4656 5071 4652
+3 4653 4656 4652
+3 4654 4655 4658
+3 4657 4654 4658
+3 4659 5072 5071
+3 4656 4659 5071
+3 4657 4658 4661
+3 4660 4657 4661
+3 4662 5073 5072
+3 4659 4662 5072
+3 4660 4661 4664
+3 4663 4660 4664
+3 4662 5074 5073
+3 4665 5074 4662
+3 4663 4664 4667
+3 4666 4663 4667
+3 4665 4668 5074
+3 4668 5075 5074
+3 4666 4667 5076
+3 4669 4666 5076
+3 4668 4670 5075
+3 4670 5077 5075
+3 5078 4669 5076
+3 4671 4669 5078
+3 5077 4670 5080
+3 5080 4670 4672
+3 4673 4671 5081
+3 4671 5078 5081
+3 4674 5082 5080
+3 4672 4674 5080
+3 4673 4676 4675
+3 5081 4676 4673
+3 4674 5083 5082
+3 4677 5083 4674
+3 4675 4676 5084
+3 4678 4675 5084
+3 5083 4677 5085
+3 5085 4677 4679
+3 5086 4678 5084
+3 4680 4678 5086
+3 4679 5087 5085
+3 4681 5087 4679
+3 4682 4680 5086
+3 5088 4682 5086
+3 5087 4681 5089
+3 5089 4681 4683
+3 4682 5090 4684
+3 5088 5090 4682
+3 5095 5089 4683
+3 5095 4683 4689
+3 5096 4684 5090
+3 4690 4684 5096
+3 5091 4685 4692
+3 4686 5091 4687
+3 4685 5091 4686
+3 5093 4686 4687
+3 4688 4686 5093
+3 4688 5093 4263
+3 5093 5097 4263
+3 5100 5095 4689
+3 5100 4689 4693
+3 4694 4690 5096
+3 5101 4694 5096
+3 5103 4692 4691
+3 4691 4692 4685
+3 5097 5098 4267
+3 4263 5097 4267
+3 5098 4697 4267
+3 5107 5100 4693
+3 5107 4693 4698
+3 4700 4694 5101
+3 5108 4700 5101
+3 4691 4695 5102
+3 5103 4691 5102
+3 4697 4696 4267
+3 5104 4696 4697
+3 4273 4696 5104
+3 4273 5104 4274
+3 5104 5106 4274
+3 5106 4701 4274
+3 5111 5107 4698
+3 5111 4698 4702
+3 4699 5112 4277
+3 4699 5108 5112
+3 4700 5108 4699
+3 5102 4705 4704
+3 4695 4705 5102
+3 4701 4280 4274
+3 5109 4280 4701
+3 4281 4280 5109
+3 5109 4706 4281
+3 4708 5119 5111
+3 4702 4708 5111
+3 5120 4277 5112
+3 4285 4277 5120
+3 5126 4704 4703
+3 4703 4704 4705
+3 4706 4286 4281
+3 4707 4287 4286
+3 4706 4707 4286
+3 5117 4287 4707
+3 4288 4287 5117
+3 5117 4713 4288
+3 4715 5131 5119
+3 4708 4715 5119
+3 4290 5120 4716
+3 4285 5120 4290
+3 4719 4718 4709
+3 4719 4709 4720
+3 4709 4710 4720
+3 4720 4711 4291
+3 4710 4711 4720
+3 4711 4721 4291
+3 4712 4721 4711
+3 4721 4712 4722
+3 4703 4293 5125
+3 5126 4703 5125
+3 4713 4295 4288
+3 5127 4295 4713
+3 4296 4295 5127
+3 5127 4723 4296
+3 5130 4297 4725
+3 4714 5130 5131
+3 4297 5130 4714
+3 4714 5131 4715
+3 4716 4300 4290
+3 4300 4716 4726
+3 4729 4728 4717
+3 4729 4717 4730
+3 4717 4718 4730
+3 4730 4719 4301
+3 4718 4719 4730
+3 4720 4302 4301
+3 4719 4720 4301
+3 4302 4720 4291
+3 4721 4304 4291
+3 4722 4305 4304
+3 4721 4722 4304
+3 5142 4305 4722
+3 4293 4732 5125
+3 4732 5146 5125
+3 4723 4307 4296
+3 4307 4723 4733
+3 5137 4308 4735
+3 4724 5137 4725
+3 4308 5137 4724
+3 4724 4725 4297
+3 4726 4309 4300
+3 4309 4726 4736
+3 4739 4738 4727
+3 4739 4727 4740
+3 4727 4728 4740
+3 4740 4728 4741
+3 4728 4729 4741
+3 4741 4730 4310
+3 4729 4730 4741
+3 4310 4730 4301
+3 4315 5142 4742
+3 4305 5142 4315
+3 4732 4731 5144
+3 5146 4732 5144
+3 4733 4316 4307
+3 4734 4317 4316
+3 4733 4734 4316
+3 4317 4734 4743
+3 4318 4745 4735
+3 4318 4735 4308
+3 4736 4319 4309
+3 4319 4736 4746
+3 4749 4748 4737
+3 4749 4737 4750
+3 4737 4738 4750
+3 4750 4738 4751
+3 4738 4739 4751
+3 4751 4740 4320
+3 4739 4740 4751
+3 4741 4321 4320
+3 4740 4741 4320
+3 4321 4741 4310
+3 4742 4328 4315
+3 4328 4742 4752
+3 4731 4754 5144
+3 4754 5162 5144
+3 4743 4332 4317
+3 4744 4333 4332
+3 4743 4744 4332
+3 4745 4334 4333
+3 4744 4745 4333
+3 4334 4745 4318
+3 4746 4335 4319
+3 4335 4746 4755
+3 4758 4757 4747
+3 4758 4747 4759
+3 4747 4748 4759
+3 4759 4748 4760
+3 4748 4749 4760
+3 4760 4749 4761
+3 4749 4750 4761
+3 4761 4751 4336
+3 4750 4751 4761
+3 4336 4751 4320
+3 4752 4346 4328
+3 5170 4346 4752
+3 4754 4753 5160
+3 5162 4754 5160
+3 4755 4348 4335
+3 4348 4755 4762
+3 4767 4766 4756
+3 4767 4756 4768
+3 4756 4757 4768
+3 4768 4757 4769
+3 4757 4758 4769
+3 4769 4758 4770
+3 4758 4759 4770
+3 4770 4760 4349
+3 4759 4760 4770
+3 4761 4350 4349
+3 4760 4761 4349
+3 4350 4761 4336
+3 4771 5170 4772
+3 4346 5170 4771
+3 4753 4774 5160
+3 4774 5175 5160
+3 4762 4364 4348
+3 4762 4775 4364
+3 4763 4775 4762
+3 4775 4763 4776
+3 4778 4777 4764
+3 4778 4764 4779
+3 4764 4765 4779
+3 4779 4765 4780
+3 4765 4766 4780
+3 4780 4766 4781
+3 4766 4767 4781
+3 4781 4767 4782
+3 4767 4768 4782
+3 4782 4769 4365
+3 4768 4769 4782
+3 4770 4366 4365
+3 4769 4770 4365
+3 4366 4770 4349
+3 4771 4785 4784
+3 4772 4785 4771
+3 5176 4785 4772
+3 4774 4773 5173
+3 5175 4774 5173
+3 4775 4377 4364
+3 4775 4786 4377
+3 4776 4786 4775
+3 4786 4776 4787
+3 4776 4777 4787
+3 4787 4777 4788
+3 4777 4778 4788
+3 4788 4778 4789
+3 4778 4779 4789
+3 4789 4779 4790
+3 4779 4780 4790
+3 4790 4780 4791
+3 4780 4781 4791
+3 4791 4782 4378
+3 4781 4782 4791
+3 4378 4782 4365
+3 4783 4795 4794
+3 4784 5177 4795
+3 4783 4784 4795
+3 4785 5177 4784
+3 5178 5177 4785
+3 4785 5176 5178
+3 4773 4796 5173
+3 4796 5179 5173
+3 4786 4389 4377
+3 4786 4797 4389
+3 4787 4797 4786
+3 4797 4787 4798
+3 4787 4788 4798
+3 4798 4788 4799
+3 4788 4789 4799
+3 4799 4789 4800
+3 4789 4790 4800
+3 4800 4791 4390
+3 4790 4791 4800
+3 4390 4791 4378
+3 4792 4803 4802
+3 4793 4804 4803
+3 4792 4793 4803
+3 4794 5181 4804
+3 4793 4794 4804
+3 4795 5181 4794
+3 5182 5181 4795
+3 4795 5177 5182
+3 5180 4796 4805
+3 5179 4796 5180
+3 5180 4805 5183
+3 4797 4403 4389
+3 4797 4808 4403
+3 4798 4808 4797
+3 4808 4798 4809
+3 4798 4799 4809
+3 4809 4799 4810
+3 4799 4800 4810
+3 4811 4810 4800
+3 4390 4811 4800
+3 4801 4820 4819
+3 4802 4821 4820
+3 4801 4802 4820
+3 4803 4821 4802
+3 5186 4821 4803
+3 5186 4803 5187
+3 4803 4804 5187
+3 4804 5181 5187
+3 4806 5183 4805
+3 5183 4806 5184
+3 4806 4807 5184
+3 5185 4807 4822
+3 5184 4807 5185
+3 5185 4822 5188
+3 4808 4408 4403
+3 4808 4826 4408
+3 4809 4826 4808
+3 4826 4809 4827
+3 4809 4810 4827
+3 4828 4810 4811
+3 4827 4810 4828
+3 4812 4829 4828
+3 4811 4812 4828
+3 4813 4830 4829
+3 4812 4813 4829
+3 4814 4831 4830
+3 4813 4814 4830
+3 4815 4832 4831
+3 4814 4815 4831
+3 4816 4833 4832
+3 4815 4816 4832
+3 4817 4834 4833
+3 4816 4817 4833
+3 4818 4835 4834
+3 4817 4818 4834
+3 4819 5191 4835
+3 4818 4819 4835
+3 4820 5191 4819
+3 5192 5191 4820
+3 5192 4820 5193
+3 4820 4821 5193
+3 4821 5186 5193
+3 4823 5188 4822
+3 5188 4823 5189
+3 4823 4824 5189
+3 5189 4824 5190
+3 4824 4825 5190
+3 5194 5190 4825
+3 4836 5194 4825
+3 4408 4826 4843
+3 4421 4408 4843
+3 4843 4826 4844
+3 4826 4827 4844
+3 4844 4827 4845
+3 4827 4828 4845
+3 4845 4828 4846
+3 4828 4829 4846
+3 4846 4829 4847
+3 4829 4830 4847
+3 4847 4830 4848
+3 4830 4831 4848
+3 4848 4831 5200
+3 4831 4832 5200
+3 5200 4832 5201
+3 4832 4833 5201
+3 5201 4833 5202
+3 4833 4834 5202
+3 5202 4834 5203
+3 4834 4835 5203
+3 4835 5191 5203
+3 5194 4836 5195
+3 4836 4837 5195
+3 5195 4837 5196
+3 4837 4838 5196
+3 5196 4838 5197
+3 4838 4839 5197
+3 5197 4839 5198
+3 4839 4840 5198
+3 5198 4840 5199
+3 4840 4841 5199
+3 5199 4842 5204
+3 4841 4842 5199
+3 5204 4842 4849
+3 4843 4426 4421
+3 4843 4854 4426
+3 4844 4854 4843
+3 4854 4844 5209
+3 4844 4845 5209
+3 5209 4845 5210
+3 4845 4846 5210
+3 5210 4846 5211
+3 4846 4847 5211
+3 5211 4847 5212
+3 4847 4848 5212
+3 4848 5200 5212
+3 5205 5204 4849
+3 5205 4849 5206
+3 4849 4850 5206
+3 5206 4850 5207
+3 4850 4851 5207
+3 5207 4851 5208
+3 4851 4852 5208
+3 5208 4853 5213
+3 4852 4853 5208
+3 5213 4853 4855
+3 4426 4854 4856
+3 4428 4426 4856
+3 4854 5209 4856
+3 4855 5215 5213
+3 4857 5215 4855
+3 4428 4856 4858
+3 4431 4428 4858
+3 5215 4860 4859
+3 4857 4860 5215
+3 4858 4432 4431
+3 5217 4432 4858
+3 5219 4859 4433
+3 4433 4859 4860
+3 4436 4432 5220
+3 4432 5217 5220
+3 4433 4861 5219
+3 4861 5223 5219
+3 4862 5220 4863
+3 4436 5220 4862
+3 5223 4865 4864
+3 4861 4865 5223
+3 4862 4863 4867
+3 4866 4862 4867
+3 4868 5224 4864
+3 4865 4868 4864
+3 4867 4439 4866
+3 5225 4439 4867
+3 5227 5224 4440
+3 4440 5224 4868
+3 4443 4439 5228
+3 4439 5225 5228
+3 4440 4869 5227
+3 4869 5231 5227
+3 4870 5228 4871
+3 4443 5228 4870
+3 4869 4872 5231
+3 4872 5232 5231
+3 4870 4871 4874
+3 4873 4870 4874
+3 5232 4876 4875
+3 4872 4876 5232
+3 4873 4874 4878
+3 4877 4873 4878
+3 4879 5233 4875
+3 4876 4879 4875
+3 4878 4447 4877
+3 5234 4447 4878
+3 4880 5235 5233
+3 4879 4880 5233
+3 4449 4447 5236
+3 4447 5234 5236
+3 4881 5237 5235
+3 4880 4881 5235
+3 4452 4449 5238
+3 4449 5236 5238
+3 4882 5240 5237
+3 4881 4882 5237
+3 4455 4452 5241
+3 4452 5238 5241
+3 4883 5243 5240
+3 4882 4883 5240
+3 4458 4455 5244
+3 4455 5241 5244
+3 4884 5246 5243
+3 4883 4884 5243
+3 4461 4458 5247
+3 4458 5244 5247
+3 4885 5249 5246
+3 4884 4885 5246
+3 4464 4461 5250
+3 4461 5247 5250
+3 4886 5251 5249
+3 4885 4886 5249
+3 4466 4464 5252
+3 4464 5250 5252
+3 4887 5253 5251
+3 4886 4887 5251
+3 4888 4466 5254
+3 4466 5252 5254
+3 4889 5255 5253
+3 4887 4889 5253
+3 4888 4891 4890
+3 5254 4891 4888
+3 4889 5257 5255
+3 4893 5257 4889
+3 4890 4891 4895
+3 4894 4890 4895
+3 4897 4892 5260
+3 5256 4900 4475
+3 4893 4901 5257
+3 4901 5262 5257
+3 4894 4895 4903
+3 4902 4894 4903
+3 4896 5259 4892
+3 5258 5259 4896
+3 5259 5260 4892
+3 5260 5265 4906
+3 4897 5260 4906
+3 4475 4898 5261
+3 5256 4475 5261
+3 4900 4899 4475
+3 5266 4899 4900
+3 4483 4899 5266
+3 4901 4907 5262
+3 4907 5269 5262
+3 4902 4903 5270
+3 4486 4902 5270
+3 4904 5263 4905
+3 5263 5264 4905
+3 4896 4905 5264
+3 5258 4896 5264
+3 5265 5272 4909
+3 4906 5265 4909
+3 4898 4911 5261
+3 4911 5274 5261
+3 5266 5267 4912
+3 4483 5266 4912
+3 5267 4914 4912
+3 5269 4907 5275
+3 5275 4907 4915
+3 5276 4486 5270
+3 4492 4486 5276
+3 4904 4908 5271
+3 5263 4904 5271
+3 4917 4909 5279
+3 4909 5272 5279
+3 4911 4910 5273
+3 5274 4911 5273
+3 4914 4913 4912
+3 5280 4913 4914
+3 4496 4913 5280
+3 4918 5283 5275
+3 4915 4918 5275
+3 4498 4492 5284
+3 4492 5276 5284
+3 4908 4916 5278
+3 5271 4908 5278
+3 5279 5289 4502
+3 4917 5279 4502
+3 4910 4921 5273
+3 4921 5290 5273
+3 5280 5281 4922
+3 4496 5280 4922
+3 5281 4924 4922
+3 4925 5292 5283
+3 4918 4925 5283
+3 5284 5285 4507
+3 4498 5284 4507
+3 4507 5285 4919
+3 5285 5287 4919
+3 4919 5287 4920
+3 5287 5288 4920
+3 4916 4920 5288
+3 5278 4916 5288
+3 4926 4502 5293
+3 4502 5289 5293
+3 4921 4928 5290
+3 4928 5295 5290
+3 4924 4923 4922
+3 5291 4923 4924
+3 4512 4923 5291
+3 5291 4930 4512
+3 4931 5298 5292
+3 4925 4931 5292
+3 5293 5299 4515
+3 4926 5293 4515
+3 4928 4927 5294
+3 5295 4928 5294
+3 4930 4929 4512
+3 5296 4929 4930
+3 4516 4929 5296
+3 4517 5296 5298
+3 4516 5296 4517
+3 4517 5298 4931
+3 4932 4515 5300
+3 4515 5299 5300
+3 4927 4933 5294
+3 4933 5301 5294
+3 5300 5302 4525
+3 4932 5300 4525
+3 4933 4935 5301
+3 4935 5304 5301
+3 4936 4525 5305
+3 4525 5302 5305
+3 4935 4934 5303
+3 5304 4935 5303
+3 4937 5305 4938
+3 4936 5305 4937
+3 4934 4939 5303
+3 4939 5306 5303
+3 4938 4940 4937
+3 5307 4940 4938
+3 4939 4942 5306
+3 4942 5309 5306
+3 4943 5307 4944
+3 4940 5307 4943
+3 4942 4941 5308
+3 5309 4942 5308
+3 4944 4945 4943
+3 5310 4945 4944
+3 4941 4946 5308
+3 4946 5311 5308
+3 4947 4945 5312
+3 4945 5310 5312
+3 4946 4949 5311
+3 4949 5314 5311
+3 4950 4947 5316
+3 4947 5312 5316
+3 4949 4948 5313
+3 5314 4949 5313
+3 4952 5315 5320
+3 4950 5315 4952
+3 5316 5315 4950
+3 4948 4953 5313
+3 4953 5321 5313
+3 4954 5317 5324
+3 4955 5318 5317
+3 4954 4955 5317
+3 4956 5319 5318
+3 4955 4956 5318
+3 4951 5319 4956
+3 5320 5319 4951
+3 4951 4952 5320
+3 5325 5321 4953
+3 4957 5325 4953
+3 4968 5322 5338
+3 4969 5323 5322
+3 4968 4969 5322
+3 4970 5324 5323
+3 4969 4970 5323
+3 5324 4970 4954
+3 5325 4957 5326
+3 4957 4958 5326
+3 5326 4958 5327
+3 4958 4959 5327
+3 5327 4959 5328
+3 4959 4960 5328
+3 5328 4960 5329
+3 4960 4961 5329
+3 5329 4962 5339
+3 4961 4962 5329
+3 4962 5330 5339
+3 4963 5330 4962
+3 5331 4963 4971
+3 5330 4963 5331
+3 4972 5332 5331
+3 4971 4972 5331
+3 4973 5333 5332
+3 4972 4973 5332
+3 4974 5334 5333
+3 4973 4974 5333
+3 5334 4974 5340
+3 4981 4964 5335
+3 5345 4981 5335
+3 5335 4964 5336
+3 4964 4965 5336
+3 5336 4965 5337
+3 4965 4966 5337
+3 5337 4966 5338
+3 4966 4967 5338
+3 4967 4968 5338
+3 4975 5340 4974
+3 5340 4975 5341
+3 4975 4976 5341
+3 5341 4976 5342
+3 4976 4977 5342
+3 5342 4977 5343
+3 4977 4978 5343
+3 5343 4979 5346
+3 4978 4979 5343
+3 5346 4979 4982
+3 4990 4980 5344
+3 5350 4990 5344
+3 5344 4980 5345
+3 4980 4981 5345
+3 5347 5346 4982
+3 5347 4982 5348
+3 4982 4983 5348
+3 5348 4984 5351
+3 4983 4984 5348
+3 4985 5352 5351
+3 4984 4985 5351
+3 5352 4985 4991
+3 4986 5354 4996
+3 4987 5355 5354
+3 4986 4987 5354
+3 5355 4987 4997
+3 4988 5363 5008
+3 4988 5349 5363
+3 4989 5349 4988
+3 5349 4989 5350
+3 4989 4990 5350
+3 5353 5352 4991
+3 5353 4992 5364
+3 4991 4992 5353
+3 4993 5365 5364
+3 4992 4993 5364
+3 4994 5366 5365
+3 4993 4994 5365
+3 4995 5367 5366
+3 4994 4995 5366
+3 4996 5368 5367
+3 4995 4996 5367
+3 5368 4996 5354
+3 5356 5355 4997
+3 5356 4998 5369
+3 4997 4998 5356
+3 5369 4998 5009
+3 4999 5372 5014
+3 4999 5357 5372
+3 5000 5357 4999
+3 5357 5000 5358
+3 5000 5001 5358
+3 5358 5001 5359
+3 5001 5002 5359
+3 5359 5003 5373
+3 5002 5003 5359
+3 5373 5003 5015
+3 5004 5377 5017
+3 5005 5378 5377
+3 5004 5005 5377
+3 5005 5360 5378
+3 5006 5360 5005
+3 5360 5006 5361
+3 5006 5007 5361
+3 5361 5007 5362
+3 5007 5008 5362
+3 5362 5008 5363
+3 5370 5369 5009
+3 5370 5010 5379
+3 5009 5010 5370
+3 5011 5380 5379
+3 5010 5011 5379
+3 5380 5011 5018
+3 5012 5383 5025
+3 5013 5384 5383
+3 5012 5013 5383
+3 5013 5371 5384
+3 5014 5371 5013
+3 5371 5014 5372
+3 5374 5373 5015
+3 5374 5015 5375
+3 5015 5016 5375
+3 5375 5016 5376
+3 5016 5017 5376
+3 5376 5017 5377
+3 5381 5380 5018
+3 5381 5019 5385
+3 5018 5019 5381
+3 5020 5386 5385
+3 5019 5020 5385
+3 5021 5387 5386
+3 5020 5021 5386
+3 5387 5021 5026
+3 5022 5392 5029
+3 5023 5393 5392
+3 5022 5023 5392
+3 5024 5394 5393
+3 5023 5024 5393
+3 5024 5382 5394
+3 5025 5382 5024
+3 5382 5025 5383
+3 5388 5387 5026
+3 5388 5026 5389
+3 5026 5027 5389
+3 5389 5027 5390
+3 5027 5028 5390
+3 5390 5028 5391
+3 5028 5029 5391
+3 5391 5029 5392
+3 5395 4620 5042
+3 4620 5395 4622
+3 5395 5396 4622
+3 4622 5396 5030
+3 5396 5397 5030
+3 5031 5397 5032
+3 5030 5397 5031
+3 5034 5033 5031
+3 5032 5034 5031
+3 5036 5035 5033
+3 5034 5036 5033
+3 5038 5037 5035
+3 5036 5038 5035
+3 5399 5037 5038
+3 5039 5037 5399
+3 5039 5399 4624
+3 5399 5401 4624
+3 4624 5401 4626
+3 5401 5402 4626
+3 5402 5044 4626
+3 5403 5040 5047
+3 5041 5403 5042
+3 5040 5403 5041
+3 5041 5042 4620
+3 5044 5043 4626
+3 5405 5043 5044
+3 5045 5043 5405
+3 5045 5405 4629
+3 5405 5409 4629
+3 5407 4631 5049
+3 5046 5407 5047
+3 4631 5407 5046
+3 5046 5047 5040
+3 5409 5410 5050
+3 4629 5409 5050
+3 5410 5052 5050
+3 5048 5412 5049
+3 4632 5412 5048
+3 5048 5049 4631
+3 5052 5051 5050
+3 5416 5051 5052
+3 4633 5051 5416
+3 4632 4634 5414
+3 5412 4632 5414
+3 5416 5420 4636
+3 4633 5416 4636
+3 4634 4637 5418
+3 5414 4634 5418
+3 5420 5422 4639
+3 4636 5420 4639
+3 5418 5055 5054
+3 4637 5055 5418
+3 5422 5424 4640
+3 4639 5422 4640
+3 5427 5054 5053
+3 5053 5054 5055
+3 5056 5424 5057
+3 4640 5424 5056
+3 5053 4641 5425
+3 5427 5053 5425
+3 5057 4644 5056
+3 5428 4644 5057
+3 5425 5059 5058
+3 4641 5059 5425
+3 5060 5428 5061
+3 4644 5428 5060
+3 5430 5058 4645
+3 4645 5058 5059
+3 5061 4648 5060
+3 5431 4648 5061
+3 4645 5062 5430
+3 5062 5433 5430
+3 5063 4648 5434
+3 4648 5431 5434
+3 5433 5065 5064
+3 5062 5065 5433
+3 5066 5434 5067
+3 5063 5434 5066
+3 5068 5436 5064
+3 5065 5068 5064
+3 5066 5067 5070
+3 5069 5066 5070
+3 5437 5436 4652
+3 4652 5436 5068
+3 5070 4655 5069
+3 5438 4655 5070
+3 4652 5071 5437
+3 5071 5439 5437
+3 4658 4655 5440
+3 4655 5438 5440
+3 5071 5072 5439
+3 5072 5441 5439
+3 4661 4658 5442
+3 4658 5440 5442
+3 5072 5073 5441
+3 5073 5443 5441
+3 4664 4661 5444
+3 4661 5442 5444
+3 5443 5073 5445
+3 5445 5073 5074
+3 4667 4664 5446
+3 4664 5444 5446
+3 5075 5447 5445
+3 5074 5075 5445
+3 5076 4667 5448
+3 4667 5446 5448
+3 5075 5449 5447
+3 5077 5449 5075
+3 5076 5079 5078
+3 5448 5079 5076
+3 5077 5080 5449
+3 5080 5450 5449
+3 5078 5079 5451
+3 5081 5078 5451
+3 5080 5082 5450
+3 5082 5452 5450
+3 5453 5081 5451
+3 4676 5081 5453
+3 5452 5082 5454
+3 5454 5082 5083
+3 5084 4676 5455
+3 4676 5453 5455
+3 5083 5456 5454
+3 5085 5456 5083
+3 5086 5084 5455
+3 5457 5086 5455
+3 5456 5085 5458
+3 5458 5085 5087
+3 5086 5459 5088
+3 5457 5459 5086
+3 5087 5461 5458
+3 5089 5461 5087
+3 5462 5088 5459
+3 5090 5088 5462
+3 5460 4687 5092
+3 5460 5094 4687
+3 5465 5461 5089
+3 5095 5465 5089
+3 5096 5090 5462
+3 5466 5096 5462
+3 5091 5463 5092
+3 4692 5463 5091
+3 5091 5092 4687
+3 5094 5093 4687
+3 5464 5093 5094
+3 5097 5093 5464
+3 5464 5099 5097
+3 5468 5465 5095
+3 5100 5468 5095
+3 5096 5469 5101
+3 5466 5469 5096
+3 4692 5103 5463
+3 5103 5472 5463
+3 5099 5098 5097
+3 5467 5098 5099
+3 4697 5098 5467
+3 5467 5105 4697
+3 5476 5468 5100
+3 5107 5476 5100
+3 5101 5477 5108
+3 5477 5101 5469
+3 5103 5102 5470
+3 5472 5103 5470
+3 5105 5104 4697
+3 5473 5104 5105
+3 5106 5104 5473
+3 5106 5473 4701
+3 5473 5475 4701
+3 5475 5110 4701
+3 5476 5107 5485
+3 5485 5107 5111
+3 5108 5486 5112
+3 5486 5108 5477
+3 5102 4704 5482
+3 5470 5102 5482
+3 5110 5109 4701
+3 5483 5109 5110
+3 4706 5109 5483
+3 4706 5483 4707
+3 5483 5484 4707
+3 5484 5118 4707
+3 5119 5491 5485
+3 5111 5119 5485
+3 5112 5121 5120
+3 5121 5112 5486
+3 5124 5123 5113
+3 5124 5114 4709
+3 5113 5114 5124
+3 5115 4710 4709
+3 5114 5115 4709
+3 5116 4711 4710
+3 5115 5116 4710
+3 5495 4711 5116
+3 4712 4711 5495
+3 4704 5126 5482
+3 5126 5498 5482
+3 5118 5117 4707
+3 5489 5117 5118
+3 4713 5117 5489
+3 5489 5128 4713
+3 5131 5502 5491
+3 5119 5131 5491
+3 5121 4716 5120
+3 5503 4716 5121
+3 5134 5133 5122
+3 5134 5123 4717
+3 5122 5123 5134
+3 5124 4718 4717
+3 5123 5124 4717
+3 4718 5124 4709
+3 5495 5507 4722
+3 4712 5495 4722
+3 5126 5125 5496
+3 5498 5126 5496
+3 5128 5127 4713
+3 5129 4723 5127
+3 5128 5129 5127
+3 4723 5129 5135
+3 5500 4725 5138
+3 5130 5500 5502
+3 4725 5500 5130
+3 5130 5502 5131
+3 5503 5511 4726
+3 4716 5503 4726
+3 5141 5140 5132
+3 5141 5133 4727
+3 5132 5133 5141
+3 5134 4728 4727
+3 5133 5134 4727
+3 4728 5134 4717
+3 5142 5507 5143
+3 4722 5507 5142
+3 5496 5146 5145
+3 5125 5146 5496
+3 5135 4733 4723
+3 5136 4734 4733
+3 5135 5136 4733
+3 4734 5136 5147
+3 5509 4735 5149
+3 5137 5509 5138
+3 4735 5509 5137
+3 5137 5138 4725
+3 5511 5512 4736
+3 4726 5511 4736
+3 5512 5150 4736
+3 5154 5153 5139
+3 5154 5140 4737
+3 5139 5140 5154
+3 5141 4738 4737
+3 5140 5141 4737
+3 4738 5141 4727
+3 5143 4742 5142
+3 5520 4742 5143
+3 5521 5145 5144
+3 5144 5145 5146
+3 5147 4743 4734
+3 5148 4744 4743
+3 5147 5148 4743
+3 5149 4745 4744
+3 5148 5149 4744
+3 4745 5149 4735
+3 5150 4746 4736
+3 4746 5150 5155
+3 5158 5157 5151
+3 5158 5151 5159
+3 5151 5152 5159
+3 5159 5153 4747
+3 5152 5153 5159
+3 5154 4748 4747
+3 5153 5154 4747
+3 4748 5154 4737
+3 5520 5527 4752
+3 4742 5520 4752
+3 5521 5162 5161
+3 5144 5162 5521
+3 5155 4755 4746
+3 4755 5155 5163
+3 5168 5167 5156
+3 5168 5156 5169
+3 5156 5157 5169
+3 5169 5158 4756
+3 5157 5158 5169
+3 5159 4757 4756
+3 5158 5159 4756
+3 4757 5159 4747
+3 5170 4752 5528
+3 4752 5527 5528
+3 5529 5161 5160
+3 5160 5161 5162
+3 5163 4762 4755
+3 5164 4763 4762
+3 5163 5164 4762
+3 5164 5171 4763
+3 5165 5171 5164
+3 5171 5165 5172
+3 5165 5166 5172
+3 5172 5167 4764
+3 5166 5167 5172
+3 5168 4765 4764
+3 5167 5168 4764
+3 5169 4766 4765
+3 5168 5169 4765
+3 4766 5169 4756
+3 5528 5530 4772
+3 5170 5528 4772
+3 5529 5175 5174
+3 5160 5175 5529
+3 5171 4776 4763
+3 5172 4777 4776
+3 5171 5172 4776
+3 4777 5172 4764
+3 5176 4772 5531
+3 4772 5530 5531
+3 5532 5174 5173
+3 5173 5174 5175
+3 5176 5533 5178
+3 5531 5533 5176
+3 5173 5179 5532
+3 5532 5179 5534
+3 5177 5535 5182
+3 5178 5536 5535
+3 5177 5178 5535
+3 5536 5178 5533
+3 5180 5534 5179
+3 5537 5534 5180
+3 5183 5537 5180
+3 5181 5540 5187
+3 5182 5541 5540
+3 5181 5182 5540
+3 5541 5182 5535
+3 5537 5183 5538
+3 5183 5184 5538
+3 5538 5184 5539
+3 5184 5185 5539
+3 5542 5539 5185
+3 5188 5542 5185
+3 5186 5547 5193
+3 5187 5548 5547
+3 5186 5187 5547
+3 5548 5187 5540
+3 5542 5188 5543
+3 5188 5189 5543
+3 5543 5189 5544
+3 5189 5190 5544
+3 5545 5190 5194
+3 5544 5190 5545
+3 5195 5546 5545
+3 5194 5195 5545
+3 5546 5195 5549
+3 5191 5553 5203
+3 5192 5554 5553
+3 5191 5192 5553
+3 5193 5555 5554
+3 5192 5193 5554
+3 5555 5193 5547
+3 5196 5549 5195
+3 5549 5196 5550
+3 5196 5197 5550
+3 5550 5197 5551
+3 5197 5198 5551
+3 5551 5198 5552
+3 5198 5199 5552
+3 5556 5552 5199
+3 5204 5556 5199
+3 5200 5562 5212
+3 5201 5563 5562
+3 5200 5201 5562
+3 5202 5564 5563
+3 5201 5202 5563
+3 5203 5565 5564
+3 5202 5203 5564
+3 5565 5203 5553
+3 5556 5204 5557
+3 5204 5205 5557
+3 5557 5205 5558
+3 5205 5206 5558
+3 5558 5206 5559
+3 5206 5207 5559
+3 5559 5207 5560
+3 5207 5208 5560
+3 5566 5560 5208
+3 5213 5566 5208
+3 5209 5214 4856
+3 5210 5567 5214
+3 5209 5210 5214
+3 5211 5568 5567
+3 5210 5211 5567
+3 5211 5561 5568
+3 5212 5561 5211
+3 5561 5212 5562
+3 5566 5213 5569
+3 5569 5213 5215
+3 4856 5214 5216
+3 4858 4856 5216
+3 5214 5567 5216
+3 5570 5569 4859
+3 4859 5569 5215
+3 4858 5216 5218
+3 5217 4858 5218
+3 4859 5219 5570
+3 5219 5572 5570
+3 5217 5218 5221
+3 5220 5217 5221
+3 5572 5223 5222
+3 5219 5223 5572
+3 5221 4863 5220
+3 5573 4863 5221
+3 5574 5222 4864
+3 4864 5222 5223
+3 4867 4863 5575
+3 4863 5573 5575
+3 4864 5224 5574
+3 5224 5577 5574
+3 5225 5575 5226
+3 4867 5575 5225
+3 5224 5227 5577
+3 5227 5579 5577
+3 5225 5226 5229
+3 5228 5225 5229
+3 5579 5231 5230
+3 5227 5231 5579
+3 5229 4871 5228
+3 5580 4871 5229
+3 5232 5581 5230
+3 5231 5232 5230
+3 4874 4871 5582
+3 4871 5580 5582
+3 5583 5581 4875
+3 4875 5581 5232
+3 4878 4874 5584
+3 4874 5582 5584
+3 4875 5233 5583
+3 5233 5586 5583
+3 5234 4878 5587
+3 4878 5584 5587
+3 5233 5235 5586
+3 5235 5589 5586
+3 5236 5234 5590
+3 5234 5587 5590
+3 5235 5237 5589
+3 5237 5592 5589
+3 5238 5590 5239
+3 5236 5590 5238
+3 5237 5240 5592
+3 5240 5593 5592
+3 5238 5239 5242
+3 5241 5238 5242
+3 5240 5243 5593
+3 5243 5594 5593
+3 5241 5242 5245
+3 5244 5241 5245
+3 5243 5246 5594
+3 5246 5595 5594
+3 5244 5245 5248
+3 5247 5244 5248
+3 5246 5249 5595
+3 5249 5596 5595
+3 5247 5248 5597
+3 5250 5247 5597
+3 5249 5251 5596
+3 5251 5598 5596
+3 5599 5250 5597
+3 5252 5250 5599
+3 5251 5253 5598
+3 5253 5601 5598
+3 5254 5252 5602
+3 5252 5599 5602
+3 5253 5255 5601
+3 5255 5604 5601
+3 4891 5254 5605
+3 5254 5602 5605
+3 5604 5255 5608
+3 5608 5255 5257
+3 4895 4891 5609
+3 4891 5605 5609
+3 5256 5607 4900
+3 5607 5614 4900
+3 5262 5616 5608
+3 5257 5262 5608
+3 4903 4895 5617
+3 4895 5609 5617
+3 5258 5610 5259
+3 5610 5611 5259
+3 5259 5612 5260
+3 5611 5612 5259
+3 5612 5265 5260
+3 5619 5265 5612
+3 5256 5261 5613
+3 5607 5256 5613
+3 5614 5615 5266
+3 4900 5614 5266
+3 5615 5268 5266
+3 5262 5620 5616
+3 5269 5620 5262
+3 5270 4903 5621
+3 4903 5617 5621
+3 5264 5263 5618
+3 5258 5264 5618
+3 5610 5258 5618
+3 5619 5624 5272
+3 5265 5619 5272
+3 5261 5274 5613
+3 5274 5626 5613
+3 5268 5267 5266
+3 5627 5267 5268
+3 4914 5267 5627
+3 5269 5275 5620
+3 5275 5630 5620
+3 5270 5277 5276
+3 5621 5277 5270
+3 5271 5623 5263
+3 5622 5623 5271
+3 5623 5618 5263
+3 5279 5272 5632
+3 5272 5624 5632
+3 5274 5273 5625
+3 5626 5274 5625
+3 5627 5628 5280
+3 4914 5627 5280
+3 5628 5282 5280
+3 5275 5283 5630
+3 5283 5633 5630
+3 5276 5277 5286
+3 5284 5276 5286
+3 5271 5278 5631
+3 5622 5271 5631
+3 5632 5636 5289
+3 5279 5632 5289
+3 5273 5290 5625
+3 5290 5637 5625
+3 5282 5281 5280
+3 5638 5281 5282
+3 4924 5281 5638
+3 5283 5292 5633
+3 5292 5643 5633
+3 5286 5285 5284
+3 5634 5285 5286
+3 5287 5285 5634
+3 5287 5634 5288
+3 5634 5635 5288
+3 5278 5288 5635
+3 5631 5278 5635
+3 5293 5289 5644
+3 5289 5636 5644
+3 5290 5295 5637
+3 5295 5646 5637
+3 5638 5639 5291
+3 4924 5638 5291
+3 5291 5639 4930
+3 5639 5641 4930
+3 5641 5297 4930
+3 5643 5298 5297
+3 5292 5298 5643
+3 5644 5647 5299
+3 5293 5644 5299
+3 5295 5294 5645
+3 5646 5295 5645
+3 5297 5296 4930
+3 5296 5297 5298
+3 5300 5299 5648
+3 5299 5647 5648
+3 5294 5301 5645
+3 5301 5649 5645
+3 5648 5650 5302
+3 5300 5648 5302
+3 5301 5304 5649
+3 5304 5652 5649
+3 5305 5302 5653
+3 5302 5650 5653
+3 5304 5303 5651
+3 5652 5304 5651
+3 5653 5654 4938
+3 5305 5653 4938
+3 5303 5306 5651
+3 5306 5655 5651
+3 5307 4938 5656
+3 4938 5654 5656
+3 5306 5309 5655
+3 5309 5658 5655
+3 5656 5659 4944
+3 5307 5656 4944
+3 5309 5308 5657
+3 5658 5309 5657
+3 5310 4944 5660
+3 4944 5659 5660
+3 5308 5311 5657
+3 5311 5661 5657
+3 5312 5310 5662
+3 5310 5660 5662
+3 5311 5314 5661
+3 5314 5664 5661
+3 5316 5662 5669
+3 5312 5662 5316
+3 5314 5313 5663
+3 5664 5314 5663
+3 5317 5665 5671
+3 5318 5666 5665
+3 5317 5318 5665
+3 5319 5667 5666
+3 5318 5319 5666
+3 5320 5668 5667
+3 5319 5320 5667
+3 5315 5668 5320
+3 5669 5668 5315
+3 5315 5316 5669
+3 5313 5321 5663
+3 5321 5672 5663
+3 5323 5670 5674
+3 5324 5671 5670
+3 5323 5324 5670
+3 5671 5324 5317
+3 5675 5672 5321
+3 5325 5675 5321
+3 5338 5673 5686
+3 5322 5673 5338
+3 5674 5673 5322
+3 5322 5323 5674
+3 5675 5325 5676
+3 5325 5326 5676
+3 5676 5326 5677
+3 5326 5327 5677
+3 5677 5327 5678
+3 5327 5328 5678
+3 5678 5329 5687
+3 5328 5329 5678
+3 5687 5329 5339
+3 5339 5330 5679
+3 5688 5339 5679
+3 5679 5330 5680
+3 5330 5331 5680
+3 5680 5331 5681
+3 5331 5332 5681
+3 5681 5332 5682
+3 5332 5333 5682
+3 5682 5333 5683
+3 5333 5334 5683
+3 5689 5683 5334
+3 5340 5689 5334
+3 5345 5335 5684
+3 5693 5345 5684
+3 5684 5335 5685
+3 5335 5336 5685
+3 5685 5336 5686
+3 5336 5337 5686
+3 5337 5338 5686
+3 5688 5687 5339
+3 5689 5340 5690
+3 5340 5341 5690
+3 5690 5341 5691
+3 5341 5342 5691
+3 5691 5343 5694
+3 5342 5343 5691
+3 5694 5343 5346
+3 5350 5344 5692
+3 5698 5350 5692
+3 5692 5344 5693
+3 5344 5345 5693
+3 5695 5694 5346
+3 5695 5346 5696
+3 5346 5347 5696
+3 5696 5348 5699
+3 5347 5348 5696
+3 5699 5348 5351
+3 5363 5349 5697
+3 5706 5363 5697
+3 5697 5349 5698
+3 5349 5350 5698
+3 5700 5699 5351
+3 5700 5351 5701
+3 5351 5352 5701
+3 5701 5353 5707
+3 5352 5353 5701
+3 5707 5353 5364
+3 5368 5354 5702
+3 5712 5368 5702
+3 5702 5354 5703
+3 5354 5355 5703
+3 5703 5356 5713
+3 5355 5356 5703
+3 5713 5356 5369
+3 5357 5716 5372
+3 5358 5717 5716
+3 5357 5358 5716
+3 5359 5718 5717
+3 5358 5359 5717
+3 5718 5359 5373
+3 5360 5722 5378
+3 5360 5704 5722
+3 5361 5704 5360
+3 5704 5361 5705
+3 5361 5362 5705
+3 5705 5362 5706
+3 5362 5363 5706
+3 5708 5707 5364
+3 5708 5364 5709
+3 5364 5365 5709
+3 5709 5365 5710
+3 5365 5366 5710
+3 5710 5366 5711
+3 5366 5367 5711
+3 5711 5367 5712
+3 5367 5368 5712
+3 5714 5713 5369
+3 5714 5370 5723
+3 5369 5370 5714
+3 5723 5370 5379
+3 5371 5727 5384
+3 5371 5715 5727
+3 5372 5715 5371
+3 5715 5372 5716
+3 5719 5718 5373
+3 5719 5374 5728
+3 5373 5374 5719
+3 5375 5729 5728
+3 5374 5375 5728
+3 5376 5730 5729
+3 5375 5376 5729
+3 5376 5720 5730
+3 5377 5720 5376
+3 5720 5377 5721
+3 5377 5378 5721
+3 5721 5378 5722
+3 5724 5723 5379
+3 5724 5379 5725
+3 5379 5380 5725
+3 5725 5381 5731
+3 5380 5381 5725
+3 5731 5381 5385
+3 5382 5738 5394
+3 5383 5739 5738
+3 5382 5383 5738
+3 5383 5726 5739
+3 5384 5726 5383
+3 5726 5384 5727
+3 5732 5731 5385
+3 5732 5385 5733
+3 5385 5386 5733
+3 5733 5386 5734
+3 5386 5387 5734
+3 5734 5388 5740
+3 5387 5388 5734
+3 5389 5741 5740
+3 5388 5389 5740
+3 5390 5742 5741
+3 5389 5390 5741
+3 5391 5743 5742
+3 5390 5391 5742
+3 5391 5735 5743
+3 5392 5735 5391
+3 5735 5392 5736
+3 5392 5393 5736
+3 5736 5393 5737
+3 5393 5394 5737
+3 5737 5394 5738
+3 5744 5032 5398
+3 5032 5744 5034
+3 5744 5745 5034
+3 5034 5745 5036
+3 5745 5746 5036
+3 5036 5746 5038
+3 5746 5747 5038
+3 5747 5400 5038
+3 5750 5042 5404
+3 5042 5750 5395
+3 5750 5751 5395
+3 5395 5751 5396
+3 5751 5752 5396
+3 5397 5752 5398
+3 5396 5752 5397
+3 5397 5398 5032
+3 5400 5399 5038
+3 5754 5399 5400
+3 5401 5399 5754
+3 5401 5754 5402
+3 5754 5756 5402
+3 5402 5756 5044
+3 5756 5757 5044
+3 5757 5406 5044
+3 5762 5047 5408
+3 5403 5762 5404
+3 5047 5762 5403
+3 5403 5404 5042
+3 5406 5405 5044
+3 5763 5405 5406
+3 5409 5405 5763
+3 5763 5411 5409
+3 5407 5769 5408
+3 5049 5769 5407
+3 5407 5408 5047
+3 5411 5410 5409
+3 5770 5410 5411
+3 5052 5410 5770
+3 5770 5413 5052
+3 5774 5412 5415
+3 5049 5412 5774
+3 5769 5049 5774
+3 5413 5416 5052
+3 5416 5413 5417
+3 5414 5419 5415
+3 5414 5415 5412
+3 5417 5420 5416
+3 5420 5417 5421
+3 5784 5419 5418
+3 5418 5419 5414
+3 5421 5422 5420
+3 5422 5421 5423
+3 5418 5054 5782
+3 5784 5418 5782
+3 5423 5424 5422
+3 5792 5424 5423
+3 5782 5427 5426
+3 5054 5427 5782
+3 5792 5799 5057
+3 5424 5792 5057
+3 5805 5426 5425
+3 5425 5426 5427
+3 5428 5799 5429
+3 5057 5799 5428
+3 5425 5058 5804
+3 5805 5425 5804
+3 5429 5061 5428
+3 5807 5061 5429
+3 5058 5430 5804
+3 5430 5808 5804
+3 5431 5061 5809
+3 5061 5807 5809
+3 5808 5433 5432
+3 5430 5433 5808
+3 5434 5809 5435
+3 5431 5809 5434
+3 5811 5432 5064
+3 5064 5432 5433
+3 5435 5067 5434
+3 5812 5067 5435
+3 5064 5436 5811
+3 5436 5813 5811
+3 5070 5067 5814
+3 5067 5812 5814
+3 5436 5437 5813
+3 5437 5815 5813
+3 5438 5070 5816
+3 5070 5814 5816
+3 5437 5439 5815
+3 5439 5817 5815
+3 5440 5438 5818
+3 5438 5816 5818
+3 5439 5441 5817
+3 5441 5819 5817
+3 5442 5440 5820
+3 5440 5818 5820
+3 5441 5443 5819
+3 5443 5822 5819
+3 5444 5442 5823
+3 5442 5820 5823
+3 5443 5445 5822
+3 5445 5824 5822
+3 5446 5444 5825
+3 5444 5823 5825
+3 5445 5447 5824
+3 5447 5826 5824
+3 5448 5446 5827
+3 5446 5825 5827
+3 5826 5447 5828
+3 5828 5447 5449
+3 5079 5448 5829
+3 5448 5827 5829
+3 5449 5830 5828
+3 5450 5830 5449
+3 5451 5079 5831
+3 5079 5829 5831
+3 5450 5452 5830
+3 5452 5832 5830
+3 5453 5451 5831
+3 5833 5453 5831
+3 5452 5454 5832
+3 5454 5834 5832
+3 5455 5453 5835
+3 5453 5833 5835
+3 5836 5834 5454
+3 5456 5836 5454
+3 5455 5837 5457
+3 5835 5837 5455
+3 5456 5458 5836
+3 5458 5838 5836
+3 5839 5457 5837
+3 5459 5457 5839
+3 5842 5838 5458
+3 5461 5842 5458
+3 5462 5459 5839
+3 5843 5462 5839
+3 5092 5840 5460
+3 5840 5841 5460
+3 5460 5841 5094
+3 5841 5845 5094
+3 5842 5461 5847
+3 5847 5461 5465
+3 5462 5848 5466
+3 5843 5848 5462
+3 5092 5463 5844
+3 5840 5092 5844
+3 5845 5846 5464
+3 5094 5845 5464
+3 5464 5846 5099
+3 5846 5849 5099
+3 5852 5847 5465
+3 5852 5465 5468
+3 5853 5466 5848
+3 5469 5466 5853
+3 5844 5472 5471
+3 5463 5472 5844
+3 5849 5850 5467
+3 5099 5849 5467
+3 5467 5850 5105
+3 5850 5851 5105
+3 5851 5474 5105
+3 5858 5852 5468
+3 5858 5468 5476
+3 5477 5469 5853
+3 5859 5477 5853
+3 5863 5471 5470
+3 5470 5471 5472
+3 5474 5473 5105
+3 5857 5473 5474
+3 5475 5473 5857
+3 5475 5857 5110
+3 5857 5864 5110
+3 5476 5869 5858
+3 5485 5869 5476
+3 5486 5477 5859
+3 5870 5486 5859
+3 5113 5488 5478
+3 5479 5114 5113
+3 5478 5479 5113
+3 5480 5115 5114
+3 5479 5480 5114
+3 5481 5116 5115
+3 5480 5481 5115
+3 5873 5116 5481
+3 5470 5482 5862
+3 5863 5470 5862
+3 5864 5865 5483
+3 5110 5864 5483
+3 5483 5865 5484
+3 5865 5867 5484
+3 5484 5867 5118
+3 5867 5868 5118
+3 5868 5490 5118
+3 5485 5491 5869
+3 5491 5876 5869
+3 5486 5492 5121
+3 5870 5492 5486
+3 5122 5494 5487
+3 5488 5123 5122
+3 5487 5488 5122
+3 5123 5488 5113
+3 5873 5879 5495
+3 5116 5873 5495
+3 5862 5498 5497
+3 5482 5498 5862
+3 5490 5489 5118
+3 5874 5489 5490
+3 5128 5489 5874
+3 5128 5874 5129
+3 5874 5875 5129
+3 5875 5499 5129
+3 5876 5502 5501
+3 5491 5502 5876
+3 5121 5492 5504
+3 5503 5121 5504
+3 5132 5506 5493
+3 5494 5133 5132
+3 5493 5494 5132
+3 5133 5494 5122
+3 5879 5885 5507
+3 5495 5879 5507
+3 5887 5497 5496
+3 5496 5497 5498
+3 5499 5135 5129
+3 5880 5135 5499
+3 5136 5135 5880
+3 5880 5508 5136
+3 5881 5138 5510
+3 5500 5881 5501
+3 5138 5881 5500
+3 5500 5501 5502
+3 5504 5511 5503
+3 5511 5504 5513
+3 5139 5516 5505
+3 5506 5140 5139
+3 5505 5506 5139
+3 5140 5506 5132
+3 5885 5895 5143
+3 5507 5885 5143
+3 5496 5145 5886
+3 5887 5496 5886
+3 5508 5147 5136
+3 5888 5147 5508
+3 5148 5147 5888
+3 5148 5888 5149
+3 5888 5890 5149
+3 5509 5890 5510
+3 5149 5890 5509
+3 5509 5510 5138
+3 5513 5512 5511
+3 5896 5512 5513
+3 5150 5512 5896
+3 5151 5519 5514
+3 5515 5152 5151
+3 5514 5515 5151
+3 5516 5153 5152
+3 5515 5516 5152
+3 5153 5516 5139
+3 5520 5143 5901
+3 5143 5895 5901
+3 5145 5521 5886
+3 5521 5903 5886
+3 5896 5897 5155
+3 5150 5896 5155
+3 5897 5522 5155
+3 5526 5525 5517
+3 5526 5518 5156
+3 5517 5518 5526
+3 5519 5157 5156
+3 5518 5519 5156
+3 5157 5519 5151
+3 5901 5904 5527
+3 5520 5901 5527
+3 5521 5161 5902
+3 5903 5521 5902
+3 5522 5163 5155
+3 5523 5164 5163
+3 5522 5523 5163
+3 5524 5165 5164
+3 5523 5524 5164
+3 5525 5166 5165
+3 5524 5525 5165
+3 5526 5167 5166
+3 5525 5526 5166
+3 5167 5526 5156
+3 5528 5527 5905
+3 5527 5904 5905
+3 5161 5529 5902
+3 5529 5907 5902
+3 5905 5908 5530
+3 5528 5905 5530
+3 5529 5174 5906
+3 5907 5529 5906
+3 5531 5530 5909
+3 5530 5908 5909
+3 5174 5532 5906
+3 5532 5911 5906
+3 5533 5909 5912
+3 5531 5909 5533
+3 5913 5911 5532
+3 5534 5913 5532
+3 5533 5916 5536
+3 5916 5533 5912
+3 5914 5534 5537
+3 5913 5534 5914
+3 5914 5537 5917
+3 5535 5923 5541
+3 5535 5915 5923
+3 5536 5915 5535
+3 5915 5536 5916
+3 5538 5917 5537
+3 5917 5538 5918
+3 5538 5539 5918
+3 5919 5539 5542
+3 5918 5539 5919
+3 5543 5920 5919
+3 5542 5543 5919
+3 5544 5921 5920
+3 5543 5544 5920
+3 5921 5544 5924
+3 5540 5929 5548
+3 5540 5922 5929
+3 5541 5922 5540
+3 5922 5541 5923
+3 5545 5924 5544
+3 5924 5545 5925
+3 5545 5546 5925
+3 5926 5546 5549
+3 5925 5546 5926
+3 5550 5927 5926
+3 5549 5550 5926
+3 5927 5550 5930
+3 5547 5935 5555
+3 5547 5928 5935
+3 5548 5928 5547
+3 5928 5548 5929
+3 5551 5930 5550
+3 5930 5551 5931
+3 5551 5552 5931
+3 5932 5552 5556
+3 5931 5552 5932
+3 5932 5556 5936
+3 5553 5944 5565
+3 5553 5933 5944
+3 5554 5933 5553
+3 5933 5554 5934
+3 5554 5555 5934
+3 5934 5555 5935
+3 5557 5936 5556
+3 5936 5557 5937
+3 5557 5558 5937
+3 5937 5558 5938
+3 5558 5559 5938
+3 5938 5559 5939
+3 5559 5560 5939
+3 5945 5939 5560
+3 5566 5945 5560
+3 5561 5947 5568
+3 5561 5940 5947
+3 5562 5940 5561
+3 5940 5562 5941
+3 5562 5563 5941
+3 5941 5563 5942
+3 5563 5564 5942
+3 5942 5564 5943
+3 5564 5565 5943
+3 5943 5565 5944
+3 5566 5569 5945
+3 5569 5948 5945
+3 5567 5949 5216
+3 5567 5946 5949
+3 5568 5946 5567
+3 5946 5568 5947
+3 5569 5570 5948
+3 5570 5950 5948
+3 5951 5216 5949
+3 5218 5216 5951
+3 5950 5572 5571
+3 5570 5572 5950
+3 5221 5218 5952
+3 5218 5951 5952
+3 5953 5571 5222
+3 5222 5571 5572
+3 5573 5221 5954
+3 5221 5952 5954
+3 5222 5574 5953
+3 5574 5956 5953
+3 5575 5954 5576
+3 5573 5954 5575
+3 5574 5577 5956
+3 5577 5958 5956
+3 5576 5226 5575
+3 5959 5226 5576
+3 5958 5579 5578
+3 5577 5579 5958
+3 5229 5226 5960
+3 5226 5959 5960
+3 5961 5578 5230
+3 5230 5578 5579
+3 5580 5229 5962
+3 5229 5960 5962
+3 5230 5581 5961
+3 5581 5964 5961
+3 5582 5580 5965
+3 5580 5962 5965
+3 5581 5583 5964
+3 5583 5967 5964
+3 5584 5965 5585
+3 5582 5965 5584
+3 5583 5586 5967
+3 5586 5968 5967
+3 5584 5585 5588
+3 5587 5584 5588
+3 5586 5589 5968
+3 5589 5969 5968
+3 5587 5588 5591
+3 5590 5587 5591
+3 5589 5592 5969
+3 5592 5970 5969
+3 5591 5239 5590
+3 5971 5239 5591
+3 5592 5593 5970
+3 5593 5973 5970
+3 5242 5239 5974
+3 5239 5971 5974
+3 5593 5594 5973
+3 5594 5975 5973
+3 5245 5242 5976
+3 5242 5974 5976
+3 5594 5595 5975
+3 5595 5977 5975
+3 5248 5245 5978
+3 5245 5976 5978
+3 5595 5596 5977
+3 5596 5979 5977
+3 5597 5248 5980
+3 5248 5978 5980
+3 5596 5598 5979
+3 5598 5981 5979
+3 5597 5600 5599
+3 5980 5600 5597
+3 5598 5601 5981
+3 5601 5982 5981
+3 5599 5600 5603
+3 5602 5599 5603
+3 5601 5604 5982
+3 5604 5983 5982
+3 5602 5603 5606
+3 5605 5602 5606
+3 5604 5608 5983
+3 5608 5985 5983
+3 5605 5606 5986
+3 5609 5605 5986
+3 5607 5984 5614
+3 5984 5990 5614
+3 5608 5616 5985
+3 5616 5993 5985
+3 5994 5609 5986
+3 5617 5609 5994
+3 5611 5610 5987
+3 5611 5987 5612
+3 5987 5988 5612
+3 5612 5988 5619
+3 5988 5997 5619
+3 5607 5613 5989
+3 5984 5607 5989
+3 5990 5991 5615
+3 5614 5990 5615
+3 5615 5991 5268
+3 5991 5998 5268
+3 5993 5616 6000
+3 6000 5616 5620
+3 5621 5617 6001
+3 5617 5994 6001
+3 5618 5996 5610
+3 5995 5996 5618
+3 5996 5987 5610
+3 5997 6003 5624
+3 5619 5997 5624
+3 5613 5626 5989
+3 5626 6004 5989
+3 5998 5999 5627
+3 5268 5998 5627
+3 5999 5629 5627
+3 5620 6005 6000
+3 5630 6005 5620
+3 5277 5621 6006
+3 5621 6001 6006
+3 5623 5622 6002
+3 5618 5623 6002
+3 5995 5618 6002
+3 5632 5624 6009
+3 5624 6003 6009
+3 6012 5626 5625
+3 6004 5626 6012
+3 5629 5628 5627
+3 6013 5628 5629
+3 5282 5628 6013
+3 5630 5633 6005
+3 5633 6015 6005
+3 5286 5277 6016
+3 5277 6006 6016
+3 5631 6008 5622
+3 6007 6008 5631
+3 6008 6002 5622
+3 6009 6019 5636
+3 5632 6009 5636
+3 5637 6011 5625
+3 6011 6012 5625
+3 6013 6014 5638
+3 5282 6013 5638
+3 6014 5640 5638
+3 6015 5643 5642
+3 5633 5643 6015
+3 6016 6017 5634
+3 5286 6016 5634
+3 5634 6017 5635
+3 6017 6018 5635
+3 5631 5635 6018
+3 6007 5631 6018
+3 5644 5636 6022
+3 5636 6019 6022
+3 5637 5646 6011
+3 5646 6023 6011
+3 5640 5639 5638
+3 6020 5639 5640
+3 5641 5639 6020
+3 5297 6020 5642
+3 5641 6020 5297
+3 5297 5642 5643
+3 6022 6024 5647
+3 5644 6022 5647
+3 6026 5646 5645
+3 6023 5646 6026
+3 5648 5647 6027
+3 5647 6024 6027
+3 5649 6025 5645
+3 6025 6026 5645
+3 6027 6028 5650
+3 5648 6027 5650
+3 5649 5652 6025
+3 5652 6029 6025
+3 5653 5650 6030
+3 5650 6028 6030
+3 6032 5652 5651
+3 6029 5652 6032
+3 6030 6033 5654
+3 5653 6030 5654
+3 5655 6031 5651
+3 6031 6032 5651
+3 5656 5654 6034
+3 5654 6033 6034
+3 5655 5658 6031
+3 5658 6035 6031
+3 6034 6036 5659
+3 5656 6034 5659
+3 6038 5658 5657
+3 6035 5658 6038
+3 5660 5659 6039
+3 5659 6036 6039
+3 5661 6037 5657
+3 6037 6038 5657
+3 5662 6039 6043
+3 5660 6039 5662
+3 5661 5664 6037
+3 5664 6044 6037
+3 5666 6040 6047
+3 5667 6041 6040
+3 5666 5667 6040
+3 5668 6042 6041
+3 5667 5668 6041
+3 5669 6043 6042
+3 5668 5669 6042
+3 6043 5669 5662
+3 6049 5664 5663
+3 6044 5664 6049
+3 5670 6045 6050
+3 5671 6046 6045
+3 5670 5671 6045
+3 5665 6046 5671
+3 6047 6046 5665
+3 5665 5666 6047
+3 5672 6048 5663
+3 6048 6049 5663
+3 5674 6050 6052
+3 6050 5674 5670
+3 6053 6048 5672
+3 5675 6053 5672
+3 5686 6051 6061
+3 5673 6051 5686
+3 6052 6051 5673
+3 5673 5674 6052
+3 6053 5675 6054
+3 5675 5676 6054
+3 6054 5676 6055
+3 5676 5677 6055
+3 6055 5678 6062
+3 5677 5678 6055
+3 6062 5678 5687
+3 5679 6065 5688
+3 5679 6056 6065
+3 5680 6056 5679
+3 6056 5680 6057
+3 5680 5681 6057
+3 6057 5681 6058
+3 5681 5682 6058
+3 6058 5682 6059
+3 5682 5683 6059
+3 6066 6059 5683
+3 5689 6066 5683
+3 5693 5684 6060
+3 6070 5693 6060
+3 6060 5684 6061
+3 5684 5685 6061
+3 5685 5686 6061
+3 6063 6062 5687
+3 6063 5687 6064
+3 5687 5688 6064
+3 6064 5688 6065
+3 6066 5689 6067
+3 5689 5690 6067
+3 6067 5690 6068
+3 5690 5691 6068
+3 6071 6068 5691
+3 5694 6071 5691
+3 5698 5692 6069
+3 6075 5698 6069
+3 6069 5692 6070
+3 5692 5693 6070
+3 6071 5694 6072
+3 5694 5695 6072
+3 6072 5695 6073
+3 5695 5696 6073
+3 6076 6073 5696
+3 5699 6076 5696
+3 5706 5697 6074
+3 6079 5706 6074
+3 6074 5697 6075
+3 5697 5698 6075
+3 6076 5699 6077
+3 5699 5700 6077
+3 6077 5701 6080
+3 5700 5701 6077
+3 6080 5701 5707
+3 5702 6084 5712
+3 5703 6085 6084
+3 5702 5703 6084
+3 6085 5703 5713
+3 5704 6093 5722
+3 5704 6078 6093
+3 5705 6078 5704
+3 6078 5705 6079
+3 5705 5706 6079
+3 6081 6080 5707
+3 6081 5707 6082
+3 5707 5708 6082
+3 6082 5709 6094
+3 5708 5709 6082
+3 5710 6095 6094
+3 5709 5710 6094
+3 5711 6096 6095
+3 5710 5711 6095
+3 5711 6083 6096
+3 5712 6083 5711
+3 6083 5712 6084
+3 6086 6085 5713
+3 6086 5713 6087
+3 5713 5714 6087
+3 6097 6087 5714
+3 5723 6097 5714
+3 5715 6100 5727
+3 5715 6088 6100
+3 5716 6088 5715
+3 6088 5716 6089
+3 5716 5717 6089
+3 6089 5717 6090
+3 5717 5718 6090
+3 6090 5719 6101
+3 5718 5719 6090
+3 6101 5719 5728
+3 5720 6105 5730
+3 5720 6091 6105
+3 5721 6091 5720
+3 6091 5721 6092
+3 5721 5722 6092
+3 6092 5722 6093
+3 6097 5723 6098
+3 5723 5724 6098
+3 6098 5725 6106
+3 5724 5725 6098
+3 6106 5725 5731
+3 5726 6112 5739
+3 5726 6099 6112
+3 5727 6099 5726
+3 6099 5727 6100
+3 6102 6101 5728
+3 6102 5728 6103
+3 5728 5729 6103
+3 6103 5729 6104
+3 5729 5730 6104
+3 6104 5730 6105
+3 6107 6106 5731
+3 6107 5731 6108
+3 5731 5732 6108
+3 6108 5733 6113
+3 5732 5733 6108
+3 5734 6114 6113
+3 5733 5734 6113
+3 6114 5734 5740
+3 5735 6119 5743
+3 5736 6120 6119
+3 5735 5736 6119
+3 5736 6109 6120
+3 5737 6109 5736
+3 6109 5737 6110
+3 5737 5738 6110
+3 6110 5738 6111
+3 5738 5739 6111
+3 6111 5739 6112
+3 6115 6114 5740
+3 6115 5740 6116
+3 5740 5741 6116
+3 6116 5741 6117
+3 5741 5742 6117
+3 6117 5742 6118
+3 5742 5743 6118
+3 6118 5743 6119
+3 6145 5398 5753
+3 5398 6145 5744
+3 6145 6146 5744
+3 5744 6146 5745
+3 6146 6147 5745
+3 5745 6147 5746
+3 6147 6148 5746
+3 5746 6148 5747
+3 6148 6149 5747
+3 5747 6149 5400
+3 6149 6150 5400
+3 6150 5755 5400
+3 5759 5758 5748
+3 5759 5748 5760
+3 5748 5749 5760
+3 5760 5749 5761
+3 5404 6161 5750
+3 6161 6162 5750
+3 5750 6162 5751
+3 6162 6163 5751
+3 5752 6163 5753
+3 5751 6163 5752
+3 5752 5753 5398
+3 5755 5754 5400
+3 6165 5754 5755
+3 5756 5754 6165
+3 5756 6165 5757
+3 6165 6167 5757
+3 5757 6167 5406
+3 6167 6177 5406
+3 5765 5764 5758
+3 5765 5758 5766
+3 5758 5759 5766
+3 5766 5759 5767
+3 5759 5760 5767
+3 5767 5760 5768
+3 5760 5761 5768
+3 5768 5761 6184
+3 5408 6175 5762
+3 6175 6176 5762
+3 5404 5762 6176
+3 6161 5404 6176
+3 6177 6178 5763
+3 5406 6177 5763
+3 5763 6178 5411
+3 6178 6192 5411
+3 5765 6201 5764
+3 6201 5765 5771
+3 5765 5766 5771
+3 5771 5766 5772
+3 5766 5767 5772
+3 5772 5767 5773
+3 5767 5768 5773
+3 5768 6184 5773
+3 6191 5769 5775
+3 5408 5769 6191
+3 6175 5408 6191
+3 6192 6193 5770
+3 5411 6192 5770
+3 5770 6193 5413
+3 6193 6195 5413
+3 6195 5776 5413
+3 6217 6201 6218
+3 6201 5771 6218
+3 6218 5771 6219
+3 5771 5772 6219
+3 6219 5772 6220
+3 5772 5773 6220
+3 5774 6213 5775
+3 5415 6213 5774
+3 5774 5775 5769
+3 5776 5417 5413
+3 5417 5776 5777
+3 5415 5419 6233
+3 6213 5415 6233
+3 5777 5421 5417
+3 5421 5777 5778
+3 6233 5784 5783
+3 5419 5784 6233
+3 5778 5423 5421
+3 5423 5778 5785
+3 5787 5786 5779
+3 5787 5779 5788
+3 5779 5780 5788
+3 5788 5780 5789
+3 5780 5781 5789
+3 5789 5781 5790
+3 5782 5791 5783
+3 5782 5783 5784
+3 5423 5785 5793
+3 5792 5423 5793
+3 6287 5786 5794
+3 5786 5787 5794
+3 5794 5787 5795
+3 5787 5788 5795
+3 5795 5788 5796
+3 5788 5789 5796
+3 5796 5789 5797
+3 5789 5790 5797
+3 5426 5798 5791
+3 5426 5791 5782
+3 5793 5799 5792
+3 5799 5793 5800
+3 6294 6287 5801
+3 6287 5794 5801
+3 5801 5794 5802
+3 5794 5795 5802
+3 5802 5795 5803
+3 5795 5796 5803
+3 5803 5796 6295
+3 5796 5797 6295
+3 5805 6298 5798
+3 5426 5805 5798
+3 5800 5429 5799
+3 6299 5429 5800
+3 5801 6304 6294
+3 6304 5801 6305
+3 5801 5802 6305
+3 6305 5802 6306
+3 5802 5803 6306
+3 5803 6295 6306
+3 5804 5806 6298
+3 5804 6298 5805
+3 5807 5429 6309
+3 5429 6299 6309
+3 5808 6319 5806
+3 5804 5808 5806
+3 5809 6309 5810
+3 5807 6309 5809
+3 6327 6319 5432
+3 5432 6319 5808
+3 5810 5435 5809
+3 6328 5435 5810
+3 5432 5811 6327
+3 5811 6333 6327
+3 5812 5435 6334
+3 5435 6328 6334
+3 5811 5813 6333
+3 5813 6336 6333
+3 5814 5812 6337
+3 5812 6334 6337
+3 5813 5815 6336
+3 5815 6338 6336
+3 5816 5814 6339
+3 5814 6337 6339
+3 5815 5817 6338
+3 5817 6340 6338
+3 5818 5816 6341
+3 5816 6339 6341
+3 5817 5819 6340
+3 5819 6343 6340
+3 5820 6341 5821
+3 5818 6341 5820
+3 5819 5822 6343
+3 5822 6344 6343
+3 5820 5821 6345
+3 5823 5820 6345
+3 5822 5824 6344
+3 5824 6346 6344
+3 6347 5823 6345
+3 5825 5823 6347
+3 5824 5826 6346
+3 5826 6348 6346
+3 5827 5825 6349
+3 5825 6347 6349
+3 5826 5828 6348
+3 5828 6350 6348
+3 5829 5827 6351
+3 5827 6349 6351
+3 6350 5828 6352
+3 6352 5828 5830
+3 5831 5829 6353
+3 5829 6351 6353
+3 5830 6354 6352
+3 5832 6354 5830
+3 5831 6355 5833
+3 6353 6355 5831
+3 5832 5834 6354
+3 5834 6356 6354
+3 6357 5833 6355
+3 5835 5833 6357
+3 6356 5834 6358
+3 6358 5834 5836
+3 5837 5835 6359
+3 5835 6357 6359
+3 5836 6360 6358
+3 5838 6360 5836
+3 5839 5837 6359
+3 6361 5839 6359
+3 6364 6360 5838
+3 5842 6364 5838
+3 5839 6365 5843
+3 6361 6365 5839
+3 5840 6362 5841
+3 6362 6363 5841
+3 5841 6363 5845
+3 6363 6367 5845
+3 5842 5847 6364
+3 5847 6369 6364
+3 6370 5843 6365
+3 5848 5843 6370
+3 5840 5844 6366
+3 6362 5840 6366
+3 6367 6368 5846
+3 5845 6367 5846
+3 5846 6368 5849
+3 6368 6372 5849
+3 6375 6369 5847
+3 5852 6375 5847
+3 5853 5848 6370
+3 6376 5853 6370
+3 5844 5471 6371
+3 6366 5844 6371
+3 6372 6373 5850
+3 5849 6372 5850
+3 5850 6373 5851
+3 6373 6374 5851
+3 5851 6374 5474
+3 6374 6378 5474
+3 6381 6375 5852
+3 5858 6381 5852
+3 5859 5853 6376
+3 6382 5859 6376
+3 5478 5861 5854
+3 5855 5479 5478
+3 5854 5855 5478
+3 5856 5480 5479
+3 5855 5856 5479
+3 6384 5480 5856
+3 5481 5480 6384
+3 5471 5863 6371
+3 5863 6387 6371
+3 6378 6379 5857
+3 5474 6378 5857
+3 5857 6379 5864
+3 6379 6380 5864
+3 6380 5866 5864
+3 6390 6381 5858
+3 5869 6390 5858
+3 5870 5859 6382
+3 6391 5870 6382
+3 5487 5872 5860
+3 5861 5488 5487
+3 5860 5861 5487
+3 5488 5861 5478
+3 5873 5481 6393
+3 5481 6384 6393
+3 5863 5862 6385
+3 6387 5863 6385
+3 5866 5865 5864
+3 6388 5865 5866
+3 5867 5865 6388
+3 5867 6388 5868
+3 6388 6389 5868
+3 5868 6389 5490
+3 6389 6395 5490
+3 5869 5876 6390
+3 5876 6400 6390
+3 5492 5870 6401
+3 5870 6391 6401
+3 5493 5878 5871
+3 5872 5494 5493
+3 5871 5872 5493
+3 5494 5872 5487
+3 6393 6404 5879
+3 5873 6393 5879
+3 5862 5497 6394
+3 6385 5862 6394
+3 6395 6396 5874
+3 5490 6395 5874
+3 5874 6396 5875
+3 6396 6398 5875
+3 5875 6398 5499
+3 6398 6405 5499
+3 5876 5501 6399
+3 6400 5876 6399
+3 5504 5492 6412
+3 5492 6401 6412
+3 5505 5884 5877
+3 5878 5506 5505
+3 5877 5878 5505
+3 5506 5878 5493
+3 6404 6414 5885
+3 5879 6404 5885
+3 5497 5887 6394
+3 5887 6416 6394
+3 6405 6406 5880
+3 5499 6405 5880
+3 5880 6406 5508
+3 6406 6408 5508
+3 6408 5889 5508
+3 6409 5510 5891
+3 5510 6409 5881
+3 6409 6410 5881
+3 5501 5881 6410
+3 6399 5501 6410
+3 6412 6417 5513
+3 5504 6412 5513
+3 5514 5894 5882
+3 5883 5515 5514
+3 5882 5883 5514
+3 5884 5516 5515
+3 5883 5884 5515
+3 5516 5884 5505
+3 5885 6421 5895
+3 6414 6421 5885
+3 5887 5886 6415
+3 6416 5887 6415
+3 5889 5888 5508
+3 5891 5890 5888
+3 5889 5891 5888
+3 5890 5891 5510
+3 6417 6418 5896
+3 5513 6417 5896
+3 6418 5898 5896
+3 5517 5900 5892
+3 5893 5518 5517
+3 5892 5893 5517
+3 5894 5519 5518
+3 5893 5894 5518
+3 5519 5894 5514
+3 6426 5895 6421
+3 5901 5895 6426
+3 5886 5903 6415
+3 5903 6429 6415
+3 5898 5897 5896
+3 6422 5897 5898
+3 5522 5897 6422
+3 5522 6422 5523
+3 6422 6424 5523
+3 5524 6424 5899
+3 5523 6424 5524
+3 5900 5525 5524
+3 5899 5900 5524
+3 5525 5900 5517
+3 6426 6430 5904
+3 5901 6426 5904
+3 5903 5902 6427
+3 6429 5903 6427
+3 5905 5904 6431
+3 5904 6430 6431
+3 5902 5907 6427
+3 5907 6432 6427
+3 6431 6433 5908
+3 5905 6431 5908
+3 6434 5907 5906
+3 6432 5907 6434
+3 5909 6433 5910
+3 5908 6433 5909
+3 6434 5906 5911
+3 6435 6434 5911
+3 5910 5912 5909
+3 6436 5912 5910
+3 6435 5911 5913
+3 6435 5913 6437
+3 5916 5912 6436
+3 6440 5916 6436
+3 5914 6437 5913
+3 6438 5914 5917
+3 6437 5914 6438
+3 5918 6439 6438
+3 5917 5918 6438
+3 6439 5918 6441
+3 5915 6448 5923
+3 5915 6440 6448
+3 5916 6440 5915
+3 5919 6441 5918
+3 6441 5919 6442
+3 5919 5920 6442
+3 6442 5920 6443
+3 5920 5921 6443
+3 6444 5921 5924
+3 6443 5921 6444
+3 5925 6445 6444
+3 5924 5925 6444
+3 5926 6446 6445
+3 5925 5926 6445
+3 6446 5926 6449
+3 5922 6453 5929
+3 5922 6447 6453
+3 5923 6447 5922
+3 6447 5923 6448
+3 5927 6449 5926
+3 6450 5927 5930
+3 6449 5927 6450
+3 6450 5930 6454
+3 5935 5928 6451
+3 6459 5935 6451
+3 6451 5928 6452
+3 5928 5929 6452
+3 6452 5929 6453
+3 5931 6454 5930
+3 6454 5931 6455
+3 5931 5932 6455
+3 6456 5932 5936
+3 6455 5932 6456
+3 6456 5936 6460
+3 5944 5933 6457
+3 6465 5944 6457
+3 6457 5933 6458
+3 5933 5934 6458
+3 6458 5934 6459
+3 5934 5935 6459
+3 5937 6460 5936
+3 6460 5937 6461
+3 5937 5938 6461
+3 6461 5939 6466
+3 5938 5939 6461
+3 6466 5939 5945
+3 5940 6469 5947
+3 5940 6462 6469
+3 5941 6462 5940
+3 6462 5941 6463
+3 5941 5942 6463
+3 6463 5942 6464
+3 5942 5943 6464
+3 6464 5943 6465
+3 5943 5944 6465
+3 5945 6470 6466
+3 5948 6470 5945
+3 5949 5946 6467
+3 6471 5949 6467
+3 6467 5946 6468
+3 5946 5947 6468
+3 6468 5947 6469
+3 5948 5950 6470
+3 5950 6474 6470
+3 5949 6475 5951
+3 6471 6475 5949
+3 5950 5571 6472
+3 6474 5950 6472
+3 6476 5951 6475
+3 5952 5951 6476
+3 5571 5953 6472
+3 5953 6478 6472
+3 5954 6476 5955
+3 5952 6476 5954
+3 5953 5956 6478
+3 5956 6479 6478
+3 5955 5576 5954
+3 6480 5576 5955
+3 6479 5958 5957
+3 5956 5958 6479
+3 5959 5576 6481
+3 5576 6480 6481
+3 6482 5957 5578
+3 5578 5957 5958
+3 5960 5959 6483
+3 5959 6481 6483
+3 5578 5961 6482
+3 5961 6485 6482
+3 5962 6483 5963
+3 5960 6483 5962
+3 5961 5964 6485
+3 5964 6486 6485
+3 5962 5963 5966
+3 5965 5962 5966
+3 5964 5967 6486
+3 5967 6487 6486
+3 5966 5585 5965
+3 6488 5585 5966
+3 5967 5968 6487
+3 5968 6489 6487
+3 5588 5585 6490
+3 5585 6488 6490
+3 5968 5969 6489
+3 5969 6491 6489
+3 5591 5588 6492
+3 5588 6490 6492
+3 5969 5970 6491
+3 5970 6494 6491
+3 5971 5591 6495
+3 5591 6492 6495
+3 6494 5973 5972
+3 5970 5973 6494
+3 5974 5971 6496
+3 5971 6495 6496
+3 5975 6497 5972
+3 5973 5975 5972
+3 5976 5974 6498
+3 5974 6496 6498
+3 5977 6499 6497
+3 5975 5977 6497
+3 5978 5976 6500
+3 5976 6498 6500
+3 5977 6501 6499
+3 5979 6501 5977
+3 5980 5978 6502
+3 5978 6500 6502
+3 5979 5981 6501
+3 5981 6503 6501
+3 5600 5980 6504
+3 5980 6502 6504
+3 5981 5982 6503
+3 5982 6505 6503
+3 5603 5600 6506
+3 5600 6504 6506
+3 5982 5983 6505
+3 5983 6507 6505
+3 5606 5603 6508
+3 5603 6506 6508
+3 5983 5985 6507
+3 5985 6511 6507
+3 5986 5606 6512
+3 5606 6508 6512
+3 5984 6509 5990
+3 6509 6510 5990
+3 6510 5992 5990
+3 5985 5993 6511
+3 5993 6516 6511
+3 5986 6517 5994
+3 6512 6517 5986
+3 5987 6513 5988
+3 6513 6514 5988
+3 5988 6514 5997
+3 6514 6519 5997
+3 5984 5989 6515
+3 6509 5984 6515
+3 5992 5991 5990
+3 6520 5991 5992
+3 5998 5991 6520
+3 5993 6000 6516
+3 6000 6522 6516
+3 6523 5994 6517
+3 6001 5994 6523
+3 5996 5995 6518
+3 5987 5996 6518
+3 6513 5987 6518
+3 6519 6526 6003
+3 5997 6519 6003
+3 5989 6004 6515
+3 6004 6527 6515
+3 6520 6521 5999
+3 5998 6520 5999
+3 5999 6521 5629
+3 6521 6528 5629
+3 6522 6000 6529
+3 6529 6000 6005
+3 6006 6001 6530
+3 6001 6523 6530
+3 6002 6525 5995
+3 6524 6525 6002
+3 6525 6518 5995
+3 6009 6526 6010
+3 6003 6526 6009
+3 6004 6012 6527
+3 6012 6534 6527
+3 6528 6535 6013
+3 5629 6528 6013
+3 6015 6538 6529
+3 6005 6015 6529
+3 6016 6006 6539
+3 6006 6530 6539
+3 6007 6531 6008
+3 6531 6532 6008
+3 6002 6008 6532
+3 6524 6002 6532
+3 6010 6019 6009
+3 6542 6019 6010
+3 6012 6011 6533
+3 6534 6012 6533
+3 6535 6536 6014
+3 6013 6535 6014
+3 6014 6536 5640
+3 6536 6537 5640
+3 6537 6021 5640
+3 5642 6021 6538
+3 5642 6538 6015
+3 6539 6540 6017
+3 6016 6539 6017
+3 6017 6540 6018
+3 6540 6541 6018
+3 6007 6018 6541
+3 6531 6007 6541
+3 6022 6019 6543
+3 6019 6542 6543
+3 6011 6023 6533
+3 6023 6545 6533
+3 6021 6020 5640
+3 6020 6021 5642
+3 6543 6546 6024
+3 6022 6543 6024
+3 6023 6026 6545
+3 6026 6548 6545
+3 6027 6024 6549
+3 6024 6546 6549
+3 6026 6025 6547
+3 6548 6026 6547
+3 6549 6551 6028
+3 6027 6549 6028
+3 6025 6029 6547
+3 6029 6552 6547
+3 6030 6028 6553
+3 6028 6551 6553
+3 6029 6032 6552
+3 6032 6556 6552
+3 6553 6557 6033
+3 6030 6553 6033
+3 6032 6031 6555
+3 6556 6032 6555
+3 6034 6033 6558
+3 6033 6557 6558
+3 6031 6035 6555
+3 6035 6559 6555
+3 6558 6560 6036
+3 6034 6558 6036
+3 6035 6038 6559
+3 6038 6562 6559
+3 6039 6560 6563
+3 6036 6560 6039
+3 6038 6037 6561
+3 6562 6038 6561
+3 6043 6563 6568
+3 6563 6043 6039
+3 6037 6044 6561
+3 6044 6569 6561
+3 6046 6564 6571
+3 6047 6565 6564
+3 6046 6047 6564
+3 6040 6565 6047
+3 6566 6565 6040
+3 6566 6040 6567
+3 6040 6041 6567
+3 6567 6041 6568
+3 6041 6042 6568
+3 6042 6043 6568
+3 6044 6049 6569
+3 6049 6573 6569
+3 6050 6570 6574
+3 6045 6570 6050
+3 6571 6570 6045
+3 6045 6046 6571
+3 6049 6048 6572
+3 6573 6049 6572
+3 6052 6574 6576
+3 6574 6052 6050
+3 6577 6572 6048
+3 6053 6577 6048
+3 6061 6575 6585
+3 6051 6575 6061
+3 6576 6575 6051
+3 6051 6052 6576
+3 6577 6053 6578
+3 6053 6054 6578
+3 6578 6054 6579
+3 6054 6055 6579
+3 6586 6579 6055
+3 6062 6586 6055
+3 6065 6056 6580
+3 6589 6065 6580
+3 6580 6056 6581
+3 6056 6057 6581
+3 6581 6057 6582
+3 6057 6058 6582
+3 6582 6058 6583
+3 6058 6059 6583
+3 6590 6583 6059
+3 6066 6590 6059
+3 6070 6584 6593
+3 6060 6584 6070
+3 6585 6584 6060
+3 6060 6061 6585
+3 6586 6062 6587
+3 6062 6063 6587
+3 6587 6063 6588
+3 6063 6064 6588
+3 6588 6064 6589
+3 6064 6065 6589
+3 6590 6066 6591
+3 6066 6067 6591
+3 6591 6067 6592
+3 6067 6068 6592
+3 6594 6592 6068
+3 6071 6594 6068
+3 6075 6069 6593
+3 6597 6075 6593
+3 6069 6070 6593
+3 6594 6071 6595
+3 6071 6072 6595
+3 6595 6073 6598
+3 6072 6073 6595
+3 6598 6073 6076
+3 6079 6074 6596
+3 6602 6079 6596
+3 6596 6074 6597
+3 6074 6075 6597
+3 6599 6598 6076
+3 6599 6076 6600
+3 6076 6077 6600
+3 6603 6600 6077
+3 6080 6603 6077
+3 6093 6078 6601
+3 6612 6093 6601
+3 6601 6078 6602
+3 6078 6079 6602
+3 6603 6080 6604
+3 6080 6081 6604
+3 6604 6082 6613
+3 6081 6082 6604
+3 6613 6082 6094
+3 6096 6083 6605
+3 6616 6096 6605
+3 6605 6083 6606
+3 6083 6084 6606
+3 6606 6084 6607
+3 6084 6085 6607
+3 6607 6085 6608
+3 6085 6086 6608
+3 6608 6087 6617
+3 6086 6087 6608
+3 6617 6087 6097
+3 6088 6621 6100
+3 6088 6609 6621
+3 6089 6609 6088
+3 6609 6089 6610
+3 6089 6090 6610
+3 6622 6610 6090
+3 6101 6622 6090
+3 6091 6627 6105
+3 6091 6611 6627
+3 6092 6611 6091
+3 6611 6092 6612
+3 6092 6093 6612
+3 6614 6613 6094
+3 6614 6094 6615
+3 6094 6095 6615
+3 6615 6095 6616
+3 6095 6096 6616
+3 6618 6617 6097
+3 6618 6098 6628
+3 6097 6098 6618
+3 6628 6098 6106
+3 6112 6099 6619
+3 6632 6112 6619
+3 6619 6099 6620
+3 6099 6100 6620
+3 6620 6100 6621
+3 6622 6101 6623
+3 6101 6102 6623
+3 6623 6102 6624
+3 6102 6103 6624
+3 6624 6103 6625
+3 6103 6104 6625
+3 6625 6104 6626
+3 6104 6105 6626
+3 6626 6105 6627
+3 6629 6628 6106
+3 6629 6106 6630
+3 6106 6107 6630
+3 6630 6108 6633
+3 6107 6108 6630
+3 6633 6108 6113
+3 6109 6642 6120
+3 6110 6643 6642
+3 6109 6110 6642
+3 6110 6631 6643
+3 6111 6631 6110
+3 6631 6111 6632
+3 6111 6112 6632
+3 6634 6633 6113
+3 6634 6113 6635
+3 6113 6114 6635
+3 6635 6114 6636
+3 6114 6115 6636
+3 6636 6115 6637
+3 6115 6116 6637
+3 6637 6116 6638
+3 6116 6117 6638
+3 6638 6117 6639
+3 6117 6118 6639
+3 6639 6118 6640
+3 6118 6119 6640
+3 6640 6119 6641
+3 6119 6120 6641
+3 6641 6120 6642
+3 6128 6127 6121
+3 6128 6121 6129
+3 6121 6122 6129
+3 6129 6122 6130
+3 6122 6123 6130
+3 6130 6123 6131
+3 6123 6124 6131
+3 6131 6124 6132
+3 6124 6125 6132
+3 6132 6125 6133
+3 6125 6126 6133
+3 6133 6126 6134
+3 6136 6135 6127
+3 6136 6127 6137
+3 6127 6128 6137
+3 6137 6128 6138
+3 6128 6129 6138
+3 6138 6129 6139
+3 6129 6130 6139
+3 6139 6130 6140
+3 6130 6131 6140
+3 6140 6131 6141
+3 6131 6132 6141
+3 6141 6132 6142
+3 6132 6133 6142
+3 6142 6133 6143
+3 6133 6134 6143
+3 6143 6134 6144
+3 6152 6151 6135
+3 6152 6135 6153
+3 6135 6136 6153
+3 6153 6136 6154
+3 6136 6137 6154
+3 6154 6137 6155
+3 6137 6138 6155
+3 6155 6139 5748
+3 6138 6139 6155
+3 6140 5749 5748
+3 6139 6140 5748
+3 6140 6156 5749
+3 6141 6156 6140
+3 6156 6141 6157
+3 6141 6142 6157
+3 6157 6142 6158
+3 6142 6143 6158
+3 6158 6143 6159
+3 6143 6144 6159
+3 6159 6144 6160
+3 6674 5753 6164
+3 5753 6674 6145
+3 6674 6675 6145
+3 6145 6675 6146
+3 6675 6676 6146
+3 6146 6676 6147
+3 6676 6677 6147
+3 6147 6677 6148
+3 6677 6678 6148
+3 6148 6678 6149
+3 6678 6679 6149
+3 6149 6679 6150
+3 6679 6680 6150
+3 6150 6680 5755
+3 6680 6681 5755
+3 6681 6166 5755
+3 6693 6151 6168
+3 6151 6152 6168
+3 6168 6152 6169
+3 6152 6153 6169
+3 6169 6153 6170
+3 6153 6154 6170
+3 6170 6155 5758
+3 6154 6155 6170
+3 5758 6155 5748
+3 6156 5761 5749
+3 6156 6171 5761
+3 6157 6171 6156
+3 6171 6157 6172
+3 6157 6158 6172
+3 6172 6158 6173
+3 6158 6159 6173
+3 6173 6159 6174
+3 6159 6160 6174
+3 6161 6688 6162
+3 6688 6689 6162
+3 6163 6689 6164
+3 6162 6689 6163
+3 6163 6164 5753
+3 6166 6165 5755
+3 6690 6165 6166
+3 6167 6165 6690
+3 6167 6690 6177
+3 6690 6691 6177
+3 6691 6179 6177
+3 6181 6180 6693
+3 6181 6693 6182
+3 6693 6168 6182
+3 6182 6168 6183
+3 6168 6169 6183
+3 6183 6170 5764
+3 6169 6170 6183
+3 5764 6170 5758
+3 6171 6184 5761
+3 6171 6185 6184
+3 6172 6185 6171
+3 6185 6172 6186
+3 6172 6173 6186
+3 6186 6173 6187
+3 6173 6174 6187
+3 6175 6703 6176
+3 6703 6704 6176
+3 6161 6176 6704
+3 6688 6161 6704
+3 6179 6178 6177
+3 6706 6178 6179
+3 6192 6178 6706
+3 6706 6194 6192
+3 6196 6194 6180
+3 6196 6180 6197
+3 6180 6181 6197
+3 6197 6181 6198
+3 6181 6182 6198
+3 6198 6182 6199
+3 6182 6183 6199
+3 6200 6183 5764
+3 6199 6183 6200
+3 6200 5764 6201
+3 6184 6202 5773
+3 6185 6202 6184
+3 6203 6202 6185
+3 6203 6185 6204
+3 6185 6186 6204
+3 6204 6186 6205
+3 6186 6187 6205
+3 6208 6207 6188
+3 6208 6188 6209
+3 6188 6189 6209
+3 6209 6189 6210
+3 6189 6190 6210
+3 6210 6190 6211
+3 5775 6719 6191
+3 6719 6720 6191
+3 6175 6191 6720
+3 6703 6175 6720
+3 6194 6193 6192
+3 6196 6195 6193
+3 6194 6196 6193
+3 6197 5776 6195
+3 6196 6197 6195
+3 6197 6214 5776
+3 6198 6214 6197
+3 6214 6198 6215
+3 6198 6199 6215
+3 6215 6199 6216
+3 6199 6200 6216
+3 6217 6216 6200
+3 6201 6217 6200
+3 5773 6202 6221
+3 6220 5773 6221
+3 6221 6202 6222
+3 6202 6203 6222
+3 6222 6203 6223
+3 6203 6204 6223
+3 6223 6204 6730
+3 6204 6205 6730
+3 6225 6224 6206
+3 6225 6206 6226
+3 6206 6207 6226
+3 6226 6207 6227
+3 6207 6208 6227
+3 6227 6208 6228
+3 6208 6209 6228
+3 6228 6209 6229
+3 6209 6210 6229
+3 6229 6210 6230
+3 6210 6211 6230
+3 6230 6211 6231
+3 6211 6212 6231
+3 6231 6212 6232
+3 5775 6213 6729
+3 6719 5775 6729
+3 6214 5777 5776
+3 6214 6234 5777
+3 6215 6234 6214
+3 6234 6215 6235
+3 6215 6216 6235
+3 6236 6216 6217
+3 6235 6216 6236
+3 6218 6237 6236
+3 6217 6218 6236
+3 6219 6238 6237
+3 6218 6219 6237
+3 6220 6239 6238
+3 6219 6220 6238
+3 6221 6239 6220
+3 6240 6239 6221
+3 6240 6221 6241
+3 6221 6222 6241
+3 6241 6222 6242
+3 6222 6223 6242
+3 6223 6730 6242
+3 6244 6243 6224
+3 6244 6224 6245
+3 6224 6225 6245
+3 6245 6225 6246
+3 6225 6226 6246
+3 6246 6226 6247
+3 6226 6227 6247
+3 6247 6227 6248
+3 6227 6228 6248
+3 6248 6228 6249
+3 6228 6229 6249
+3 6249 6229 6250
+3 6229 6230 6250
+3 6250 6230 6251
+3 6230 6231 6251
+3 6251 6231 6252
+3 6231 6232 6252
+3 6252 6232 6253
+3 6736 6233 6255
+3 6213 6233 6736
+3 6729 6213 6736
+3 6234 5778 5777
+3 6234 6256 5778
+3 6235 6256 6234
+3 6256 6235 6257
+3 6235 6236 6257
+3 6257 6236 6258
+3 6236 6237 6258
+3 6258 6237 6259
+3 6237 6238 6259
+3 6259 6238 6260
+3 6238 6239 6260
+3 6260 6239 6261
+3 6239 6240 6261
+3 6261 6240 6262
+3 6240 6241 6262
+3 6262 6241 6742
+3 6241 6242 6742
+3 6745 6243 6263
+3 6243 6244 6263
+3 6263 6244 6264
+3 6244 6245 6264
+3 6264 6245 6265
+3 6245 6246 6265
+3 6265 6247 5779
+3 6246 6247 6265
+3 6248 5780 5779
+3 6247 6248 5779
+3 6249 5781 5780
+3 6248 6249 5780
+3 6249 6266 5781
+3 6250 6266 6249
+3 6266 6250 6267
+3 6250 6251 6267
+3 6267 6251 6268
+3 6251 6252 6268
+3 6268 6252 6269
+3 6252 6253 6269
+3 6269 6253 6270
+3 6253 6254 6270
+3 6270 6255 5783
+3 6254 6255 6270
+3 5783 6255 6233
+3 6256 5785 5778
+3 6256 6271 5785
+3 6257 6271 6256
+3 6271 6257 6272
+3 6257 6258 6272
+3 6272 6258 6273
+3 6258 6259 6273
+3 6273 6259 6274
+3 6259 6260 6274
+3 6274 6260 6746
+3 6260 6261 6746
+3 6746 6261 6747
+3 6261 6262 6747
+3 6262 6742 6747
+3 6276 6275 6745
+3 6276 6745 6277
+3 6745 6263 6277
+3 6277 6263 6278
+3 6263 6264 6278
+3 6278 6265 5786
+3 6264 6265 6278
+3 5786 6265 5779
+3 6266 5790 5781
+3 6266 6279 5790
+3 6267 6279 6266
+3 6279 6267 6280
+3 6267 6268 6280
+3 6280 6268 6281
+3 6268 6269 6281
+3 6281 6270 5791
+3 6269 6270 6281
+3 5791 6270 5783
+3 5785 6271 6282
+3 5793 5785 6282
+3 6282 6271 6283
+3 6271 6272 6283
+3 6283 6272 6751
+3 6272 6273 6751
+3 6751 6273 6752
+3 6273 6274 6752
+3 6274 6746 6752
+3 6756 6275 6284
+3 6275 6276 6284
+3 6284 6276 6285
+3 6276 6277 6285
+3 6285 6277 6286
+3 6277 6278 6286
+3 6287 6286 6278
+3 5786 6287 6278
+3 5790 6279 6288
+3 5797 5790 6288
+3 6288 6279 6289
+3 6279 6280 6289
+3 6289 6281 5798
+3 6280 6281 6289
+3 5798 6281 5791
+3 6282 5800 5793
+3 6282 6290 5800
+3 6283 6290 6282
+3 6283 6751 6290
+3 6760 6756 6291
+3 6756 6284 6291
+3 6291 6284 6292
+3 6284 6285 6292
+3 6292 6285 6293
+3 6285 6286 6293
+3 6294 6293 6286
+3 6287 6294 6286
+3 5797 6288 6296
+3 6295 5797 6296
+3 6296 6288 6297
+3 6288 6289 6297
+3 6298 6297 6289
+3 5798 6298 6289
+3 5800 6290 6300
+3 6299 5800 6300
+3 6291 6762 6760
+3 6762 6291 6301
+3 6291 6292 6301
+3 6301 6292 6302
+3 6292 6293 6302
+3 6303 6293 6294
+3 6302 6293 6303
+3 6303 6294 6304
+3 6295 6307 6306
+3 6296 6307 6295
+3 6308 6307 6296
+3 6308 6297 5806
+3 6296 6297 6308
+3 5806 6297 6298
+3 6299 6300 6310
+3 6309 6299 6310
+3 6764 6762 6311
+3 6762 6301 6311
+3 6311 6301 6312
+3 6301 6302 6312
+3 6312 6302 6313
+3 6302 6303 6313
+3 6314 6303 6304
+3 6313 6303 6314
+3 6305 6315 6314
+3 6304 6305 6314
+3 6306 6316 6315
+3 6305 6306 6315
+3 6307 6316 6306
+3 6317 6316 6307
+3 6317 6307 6318
+3 6307 6308 6318
+3 6319 6318 6308
+3 5806 6319 6308
+3 6310 5810 6309
+3 6765 5810 6310
+3 6311 6767 6764
+3 6767 6311 6320
+3 6311 6312 6320
+3 6320 6312 6321
+3 6312 6313 6321
+3 6321 6313 6322
+3 6313 6314 6322
+3 6322 6314 6323
+3 6314 6315 6323
+3 6323 6315 6324
+3 6315 6316 6324
+3 6324 6316 6325
+3 6316 6317 6325
+3 6325 6317 6326
+3 6317 6318 6326
+3 6327 6326 6318
+3 6319 6327 6318
+3 6328 5810 6768
+3 5810 6765 6768
+3 6320 6770 6767
+3 6770 6320 6771
+3 6320 6321 6771
+3 6771 6321 6772
+3 6321 6322 6772
+3 6772 6322 6329
+3 6322 6323 6329
+3 6329 6323 6330
+3 6323 6324 6330
+3 6330 6324 6331
+3 6324 6325 6331
+3 6331 6325 6332
+3 6325 6326 6332
+3 6333 6332 6326
+3 6327 6333 6326
+3 6334 6328 6773
+3 6328 6768 6773
+3 6329 6776 6772
+3 6776 6329 6777
+3 6329 6330 6777
+3 6777 6330 6778
+3 6330 6331 6778
+3 6778 6331 6335
+3 6331 6332 6335
+3 6336 6335 6332
+3 6333 6336 6332
+3 6337 6334 6779
+3 6334 6773 6779
+3 6335 6780 6778
+3 6338 6780 6335
+3 6336 6338 6335
+3 6339 6337 6781
+3 6337 6779 6781
+3 6338 6783 6780
+3 6340 6783 6338
+3 6341 6781 6342
+3 6339 6781 6341
+3 6340 6343 6783
+3 6343 6784 6783
+3 6342 5821 6341
+3 6785 5821 6342
+3 6343 6344 6784
+3 6344 6786 6784
+3 6345 5821 6787
+3 5821 6785 6787
+3 6344 6346 6786
+3 6346 6788 6786
+3 6345 6789 6347
+3 6787 6789 6345
+3 6346 6348 6788
+3 6348 6790 6788
+3 6791 6347 6789
+3 6349 6347 6791
+3 6348 6350 6790
+3 6350 6793 6790
+3 6351 6349 6794
+3 6349 6791 6794
+3 6350 6352 6793
+3 6352 6795 6793
+3 6353 6351 6796
+3 6351 6794 6796
+3 6797 6795 6352
+3 6354 6797 6352
+3 6355 6353 6798
+3 6353 6796 6798
+3 6354 6356 6797
+3 6356 6799 6797
+3 6357 6355 6798
+3 6800 6357 6798
+3 6356 6358 6799
+3 6358 6802 6799
+3 6359 6357 6803
+3 6357 6800 6803
+3 6804 6802 6358
+3 6360 6804 6358
+3 6361 6359 6803
+3 6805 6361 6803
+3 6804 6360 6808
+3 6808 6360 6364
+3 6365 6361 6809
+3 6361 6805 6809
+3 6362 6806 6363
+3 6806 6807 6363
+3 6363 6807 6367
+3 6807 6811 6367
+3 6364 6813 6808
+3 6369 6813 6364
+3 6370 6365 6809
+3 6814 6370 6809
+3 6362 6366 6810
+3 6806 6362 6810
+3 6811 6812 6368
+3 6367 6811 6368
+3 6368 6812 6372
+3 6812 6821 6372
+3 6824 6813 6369
+3 6375 6824 6369
+3 6376 6370 6814
+3 6825 6376 6814
+3 6815 5854 6377
+3 5854 6815 5855
+3 6815 6817 5855
+3 5855 6817 5856
+3 6817 6828 5856
+3 6366 6371 6819
+3 6810 6366 6819
+3 6821 6822 6373
+3 6372 6821 6373
+3 6373 6822 6374
+3 6822 6823 6374
+3 6374 6823 6378
+3 6823 6829 6378
+3 6832 6824 6375
+3 6381 6832 6375
+3 6382 6376 6825
+3 6833 6382 6825
+3 6826 5860 6383
+3 5861 6826 6377
+3 5860 6826 5861
+3 5861 6377 5854
+3 6828 6836 6384
+3 5856 6828 6384
+3 6819 6387 6386
+3 6371 6387 6819
+3 6829 6830 6379
+3 6378 6829 6379
+3 6379 6830 6380
+3 6830 6831 6380
+3 6380 6831 5866
+3 6831 6837 5866
+3 6832 6381 6841
+3 6841 6381 6390
+3 6391 6382 6833
+3 6842 6391 6833
+3 6834 5871 6392
+3 5872 6834 6383
+3 5871 6834 5872
+3 5872 6383 5860
+3 6393 6384 6845
+3 6384 6836 6845
+3 6847 6386 6385
+3 6385 6386 6387
+3 6837 6838 6388
+3 5866 6837 6388
+3 6388 6838 6389
+3 6838 6839 6389
+3 6389 6839 6395
+3 6839 6840 6395
+3 6840 6397 6395
+3 6400 6850 6841
+3 6390 6400 6841
+3 6401 6391 6851
+3 6391 6842 6851
+3 6843 5877 6403
+3 5878 6843 6392
+3 5877 6843 5878
+3 5878 6392 5871
+3 6845 6854 6404
+3 6393 6845 6404
+3 6385 6394 6846
+3 6847 6385 6846
+3 6397 6396 6395
+3 6848 6396 6397
+3 6398 6396 6848
+3 6398 6848 6405
+3 6848 6849 6405
+3 6849 6407 6405
+3 6399 6411 6850
+3 6399 6850 6400
+3 6412 6401 6859
+3 6401 6851 6859
+3 6852 5882 6413
+3 5883 6852 6402
+3 5882 6852 5883
+3 6403 5884 5883
+3 6402 6403 5883
+3 5884 6403 5877
+3 6854 6864 6414
+3 6404 6854 6414
+3 6394 6416 6846
+3 6416 6867 6846
+3 6407 6406 6405
+3 6855 6406 6407
+3 6408 6406 6855
+3 6408 6855 5889
+3 6855 6856 5889
+3 5889 6856 5891
+3 6856 6857 5891
+3 5891 6857 6409
+3 6857 6858 6409
+3 6410 6858 6411
+3 6409 6858 6410
+3 6410 6411 6399
+3 6859 6860 6417
+3 6412 6859 6417
+3 6860 6419 6417
+3 6861 5892 6420
+3 5892 6861 5893
+3 6861 6862 5893
+3 5894 6862 6413
+3 5893 6862 5894
+3 5894 6413 5882
+3 6421 6414 6871
+3 6414 6864 6871
+3 6416 6415 6865
+3 6867 6416 6865
+3 6419 6418 6417
+3 6868 6418 6419
+3 5898 6418 6868
+3 6868 6423 5898
+3 6869 5899 6425
+3 5900 6869 6420
+3 5899 6869 5900
+3 5900 6420 5892
+3 6871 6872 6426
+3 6421 6871 6426
+3 6865 6429 6428
+3 6415 6429 6865
+3 6423 6422 5898
+3 6425 6424 6422
+3 6423 6425 6422
+3 6424 6425 5899
+3 6872 6873 6430
+3 6426 6872 6430
+3 6874 6428 6427
+3 6427 6428 6429
+3 6431 6430 6875
+3 6430 6873 6875
+3 6427 6432 6874
+3 6432 6876 6874
+3 6875 6877 6433
+3 6431 6875 6433
+3 6432 6434 6876
+3 6434 6878 6876
+3 6877 6879 5910
+3 6433 6877 5910
+3 6434 6435 6878
+3 6878 6435 6880
+3 6436 5910 6885
+3 5910 6879 6885
+3 6880 6435 6437
+3 6438 6881 6880
+3 6437 6438 6880
+3 6881 6438 6886
+3 6440 6436 6885
+3 6892 6440 6885
+3 6439 6886 6438
+3 6887 6439 6441
+3 6886 6439 6887
+3 6442 6888 6887
+3 6441 6442 6887
+3 6443 6889 6888
+3 6442 6443 6888
+3 6444 6890 6889
+3 6443 6444 6889
+3 6890 6444 6893
+3 6448 6440 6892
+3 6897 6448 6892
+3 6445 6893 6444
+3 6893 6445 6894
+3 6445 6446 6894
+3 6895 6446 6449
+3 6894 6446 6895
+3 6895 6449 6898
+3 6453 6447 6896
+3 6902 6453 6896
+3 6896 6447 6897
+3 6447 6448 6897
+3 6450 6898 6449
+3 6899 6450 6454
+3 6898 6450 6899
+3 6899 6454 6903
+3 6459 6451 6900
+3 6908 6459 6900
+3 6900 6451 6901
+3 6451 6452 6901
+3 6901 6452 6902
+3 6452 6453 6902
+3 6455 6903 6454
+3 6903 6455 6904
+3 6455 6456 6904
+3 6909 6904 6456
+3 6460 6909 6456
+3 6465 6905 6913
+3 6457 6905 6465
+3 6906 6905 6457
+3 6906 6457 6907
+3 6457 6458 6907
+3 6907 6458 6908
+3 6458 6459 6908
+3 6909 6460 6910
+3 6460 6461 6910
+3 6914 6910 6461
+3 6466 6914 6461
+3 6469 6462 6911
+3 6916 6469 6911
+3 6911 6462 6912
+3 6462 6463 6912
+3 6912 6463 6913
+3 6463 6464 6913
+3 6464 6465 6913
+3 6917 6914 6466
+3 6470 6917 6466
+3 6467 6918 6471
+3 6467 6915 6918
+3 6468 6915 6467
+3 6915 6468 6916
+3 6468 6469 6916
+3 6917 6474 6473
+3 6470 6474 6917
+3 6919 6471 6918
+3 6475 6471 6919
+3 6920 6473 6472
+3 6472 6473 6474
+3 6475 6477 6476
+3 6919 6477 6475
+3 6472 6478 6920
+3 6478 6921 6920
+3 6477 5955 6476
+3 6922 5955 6477
+3 6478 6479 6921
+3 6479 6924 6921
+3 6480 5955 6925
+3 5955 6922 6925
+3 6479 5957 6923
+3 6924 6479 6923
+3 6481 6480 6926
+3 6480 6925 6926
+3 5957 6482 6923
+3 6482 6927 6923
+3 6483 6926 6484
+3 6481 6926 6483
+3 6482 6485 6927
+3 6485 6928 6927
+3 6484 5963 6483
+3 6929 5963 6484
+3 6485 6486 6928
+3 6486 6930 6928
+3 5966 5963 6931
+3 5963 6929 6931
+3 6486 6487 6930
+3 6487 6932 6930
+3 6488 5966 6933
+3 5966 6931 6933
+3 6487 6489 6932
+3 6489 6934 6932
+3 6490 6488 6935
+3 6488 6933 6935
+3 6489 6491 6934
+3 6491 6936 6934
+3 6492 6490 6937
+3 6490 6935 6937
+3 6936 6494 6493
+3 6491 6494 6936
+3 6495 6492 6938
+3 6492 6937 6938
+3 6939 6493 5972
+3 5972 6493 6494
+3 6496 6495 6940
+3 6495 6938 6940
+3 5972 6497 6939
+3 6497 6941 6939
+3 6498 6496 6942
+3 6496 6940 6942
+3 6497 6499 6941
+3 6499 6943 6941
+3 6500 6498 6944
+3 6498 6942 6944
+3 6943 6499 6945
+3 6945 6499 6501
+3 6502 6500 6946
+3 6500 6944 6946
+3 6503 6947 6945
+3 6501 6503 6945
+3 6504 6502 6948
+3 6502 6946 6948
+3 6503 6949 6947
+3 6505 6949 6503
+3 6506 6504 6950
+3 6504 6948 6950
+3 6505 6507 6949
+3 6507 6951 6949
+3 6508 6506 6952
+3 6506 6950 6952
+3 6507 6511 6951
+3 6511 6954 6951
+3 6512 6508 6955
+3 6508 6952 6955
+3 6509 6953 6510
+3 6953 6957 6510
+3 6510 6957 5992
+3 6511 6516 6954
+3 6516 6959 6954
+3 6517 6512 6960
+3 6512 6955 6960
+3 6509 6515 6956
+3 6953 6509 6956
+3 6958 5992 6957
+3 6958 6520 5992
+3 6964 6520 6958
+3 6516 6522 6959
+3 6522 6966 6959
+3 6517 6967 6523
+3 6960 6967 6517
+3 6513 6518 6961
+3 6962 6514 6513
+3 6961 6962 6513
+3 6963 6519 6514
+3 6962 6963 6514
+3 6963 6526 6519
+3 6970 6526 6963
+3 6515 6527 6956
+3 6527 6971 6956
+3 6964 6965 6521
+3 6520 6964 6521
+3 6521 6965 6528
+3 6965 6972 6528
+3 6522 6529 6966
+3 6529 6973 6966
+3 6974 6523 6967
+3 6530 6523 6974
+3 6525 6524 6968
+3 6525 6969 6518
+3 6968 6969 6525
+3 6969 6961 6518
+3 6970 6977 6010
+3 6526 6970 6010
+3 6527 6534 6971
+3 6534 6979 6971
+3 6972 6980 6535
+3 6528 6972 6535
+3 6529 6538 6973
+3 6538 6984 6973
+3 6539 6530 6985
+3 6530 6974 6985
+3 6532 6531 6975
+3 6532 6976 6524
+3 6975 6976 6532
+3 6976 6968 6524
+3 6542 6010 6989
+3 6010 6977 6989
+3 6534 6533 6978
+3 6979 6534 6978
+3 6980 6981 6536
+3 6535 6980 6536
+3 6536 6981 6537
+3 6981 6982 6537
+3 6537 6982 6021
+3 6982 6983 6021
+3 6538 6021 6983
+3 6984 6538 6983
+3 6985 6986 6540
+3 6539 6985 6540
+3 6540 6986 6541
+3 6986 6987 6541
+3 6541 6988 6531
+3 6987 6988 6541
+3 6988 6975 6531
+3 6543 6989 6544
+3 6542 6989 6543
+3 6533 6545 6978
+3 6545 6990 6978
+3 6544 6546 6543
+3 6991 6546 6544
+3 6545 6548 6990
+3 6548 6993 6990
+3 6549 6991 6550
+3 6546 6991 6549
+3 6548 6547 6992
+3 6993 6548 6992
+3 6550 6551 6549
+3 6994 6551 6550
+3 6547 6552 6992
+3 6552 6995 6992
+3 6553 6994 6554
+3 6551 6994 6553
+3 6552 6556 6995
+3 6556 6997 6995
+3 6554 6557 6553
+3 6998 6557 6554
+3 6556 6555 6996
+3 6997 6556 6996
+3 6558 6557 6999
+3 6557 6998 6999
+3 6555 6559 6996
+3 6559 7000 6996
+3 6558 7001 6560
+3 6999 7001 6558
+3 6559 6562 7000
+3 6562 7003 7000
+3 7001 6563 6560
+3 7008 6563 7001
+3 6562 6561 7002
+3 7003 6562 7002
+3 6565 7004 7010
+3 6566 7005 7004
+3 6565 6566 7004
+3 6567 7006 7005
+3 6566 6567 7005
+3 6568 7007 7006
+3 6567 6568 7006
+3 6563 7007 6568
+3 7008 7007 6563
+3 6561 6569 7002
+3 6569 7011 7002
+3 6571 7009 7012
+3 6564 7009 6571
+3 7010 7009 6564
+3 6564 6565 7010
+3 6569 6573 7011
+3 6573 7013 7011
+3 6574 6570 7012
+3 7015 6574 7012
+3 6570 6571 7012
+3 7016 6573 6572
+3 7013 6573 7016
+3 6576 7014 7017
+3 6574 7014 6576
+3 7015 7014 6574
+3 6577 7016 6572
+3 7018 7016 6577
+3 6585 6575 7017
+3 7029 6585 7017
+3 6575 6576 7017
+3 7018 6577 7019
+3 6577 6578 7019
+3 7019 6578 7020
+3 6578 6579 7020
+3 7021 6579 6586
+3 7020 6579 7021
+3 6587 7022 7021
+3 6586 6587 7021
+3 7022 6587 7030
+3 6589 7023 7030
+3 6580 7023 6589
+3 7024 7023 6580
+3 7024 6580 7025
+3 6580 6581 7025
+3 7025 6581 7026
+3 6581 6582 7026
+3 7026 6582 7027
+3 6582 6583 7027
+3 7031 7027 6583
+3 6590 7031 6583
+3 6593 6584 7028
+3 7035 6593 7028
+3 7028 6584 7029
+3 6584 6585 7029
+3 6588 7030 6587
+3 6588 6589 7030
+3 7031 6590 7032
+3 6590 6591 7032
+3 7032 6591 7033
+3 6591 6592 7033
+3 7036 7033 6592
+3 6594 7036 6592
+3 6597 7034 7038
+3 6593 7034 6597
+3 7035 7034 6593
+3 7036 6594 7037
+3 6594 6595 7037
+3 7039 7037 6595
+3 6598 7039 6595
+3 6602 6596 7038
+3 7042 6602 7038
+3 6596 6597 7038
+3 7039 6598 7040
+3 6598 6599 7040
+3 7040 6600 7043
+3 6599 6600 7040
+3 7043 6600 6603
+3 6612 6601 7041
+3 7052 6612 7041
+3 7041 6601 7042
+3 6601 6602 7042
+3 7044 7043 6603
+3 7044 6603 7045
+3 6603 6604 7045
+3 7053 7045 6604
+3 6613 7053 6604
+3 6605 7057 6616
+3 6605 7046 7057
+3 6606 7046 6605
+3 7046 6606 7047
+3 6606 6607 7047
+3 7047 6607 7048
+3 6607 6608 7048
+3 7058 7048 6608
+3 6617 7058 6608
+3 6621 6609 7049
+3 7061 6621 7049
+3 7049 6609 7050
+3 6609 6610 7050
+3 7062 7050 6610
+3 6622 7062 6610
+3 6627 6611 7051
+3 7067 6627 7051
+3 7051 6611 7052
+3 6611 6612 7052
+3 7053 6613 7054
+3 6613 6614 7054
+3 7054 6614 7055
+3 6614 6615 7055
+3 7055 6615 7056
+3 6615 6616 7056
+3 7056 6616 7057
+3 7058 6617 7059
+3 6617 6618 7059
+3 7068 7059 6618
+3 6628 7068 6618
+3 6619 7073 6632
+3 6619 7060 7073
+3 6620 7060 6619
+3 7060 6620 7061
+3 6620 6621 7061
+3 7062 6622 7063
+3 6622 6623 7063
+3 7063 6623 7064
+3 6623 6624 7064
+3 7064 6624 7065
+3 6624 6625 7065
+3 7065 6625 7066
+3 6625 6626 7066
+3 7066 6626 7067
+3 6626 6627 7067
+3 7068 6628 7069
+3 6628 6629 7069
+3 7069 6629 7070
+3 6629 6630 7070
+3 7074 7070 6630
+3 6633 7074 6630
+3 6643 6631 7071
+3 7084 6643 7071
+3 7071 6631 7072
+3 6631 6632 7072
+3 7072 6632 7073
+3 7074 6633 7075
+3 6633 6634 7075
+3 7075 6634 7076
+3 6634 6635 7076
+3 7076 6635 7077
+3 6635 6636 7077
+3 7077 6636 7078
+3 6636 6637 7078
+3 7078 6637 7079
+3 6637 6638 7079
+3 7079 6638 7080
+3 6638 6639 7080
+3 7080 6639 7081
+3 6639 6640 7081
+3 7081 6640 7082
+3 6640 6641 7082
+3 7082 6641 7083
+3 6641 6642 7083
+3 7083 6642 7084
+3 6642 6643 7084
+3 6652 6651 6644
+3 6652 6644 6653
+3 6644 6645 6653
+3 6653 6645 6654
+3 6645 6646 6654
+3 6654 6646 6655
+3 6646 6647 6655
+3 6655 6647 6656
+3 6647 6648 6656
+3 6656 6648 6657
+3 6648 6649 6657
+3 6657 6649 6658
+3 6661 6660 6650
+3 6661 6650 6662
+3 6650 6651 6662
+3 6662 6652 6121
+3 6651 6652 6662
+3 6653 6122 6121
+3 6652 6653 6121
+3 6654 6123 6122
+3 6653 6654 6122
+3 6655 6124 6123
+3 6654 6655 6123
+3 6656 6125 6124
+3 6655 6656 6124
+3 6657 6126 6125
+3 6656 6657 6125
+3 6657 6663 6126
+3 6658 6663 6657
+3 6663 6658 6664
+3 6658 6659 6664
+3 6664 6659 6665
+3 7099 6660 6666
+3 6660 6661 6666
+3 6666 6662 6127
+3 6661 6662 6666
+3 6127 6662 6121
+3 6663 6134 6126
+3 6663 6667 6134
+3 6664 6667 6663
+3 6667 6664 6668
+3 6664 6665 6668
+3 6668 6665 6669
+3 6671 6670 7099
+3 6671 6666 6135
+3 7099 6666 6671
+3 6135 6666 6127
+3 6667 6144 6134
+3 6667 6672 6144
+3 6668 6672 6667
+3 6672 6668 6673
+3 6668 6669 6673
+3 6683 6682 6670
+3 6683 6671 6151
+3 6670 6671 6683
+3 6151 6671 6135
+3 6672 6160 6144
+3 6672 6684 6160
+3 6673 6684 6672
+3 6684 6673 6685
+3 6164 7102 6674
+3 7102 7103 6674
+3 6674 7103 6675
+3 7103 7104 6675
+3 6675 7104 6676
+3 7104 7105 6676
+3 6676 7105 6677
+3 7105 7106 6677
+3 6677 7106 6678
+3 7106 7107 6678
+3 6678 7107 6679
+3 7107 7108 6679
+3 6679 7108 6680
+3 7108 7109 6680
+3 6680 7109 6681
+3 7109 7110 6681
+3 6681 7110 6166
+3 7110 7119 6166
+3 7123 6682 6692
+3 6682 6683 6692
+3 6693 6692 6683
+3 6151 6693 6683
+3 6160 6684 6694
+3 6174 6160 6694
+3 6694 6684 6695
+3 6684 6685 6695
+3 6698 6697 6686
+3 6698 6686 6699
+3 6686 6687 6699
+3 6699 6687 6700
+3 7117 6688 6705
+3 6688 7117 6689
+3 7117 7118 6689
+3 6164 6689 7118
+3 7102 6164 7118
+3 7119 7120 6690
+3 6166 7119 6690
+3 6690 7120 6691
+3 7120 7121 6691
+3 6691 7121 6179
+3 7121 7122 6179
+3 7122 6707 6179
+3 6708 6707 7123
+3 6708 6692 6180
+3 7123 6692 6708
+3 6180 6692 6693
+3 6174 6694 6709
+3 6187 6174 6709
+3 6709 6694 6710
+3 6694 6695 6710
+3 6713 6712 6696
+3 6713 6696 6714
+3 6696 6697 6714
+3 6714 6698 6188
+3 6697 6698 6714
+3 6699 6189 6188
+3 6698 6699 6188
+3 6700 6190 6189
+3 6699 6700 6189
+3 6700 6715 6190
+3 6701 6715 6700
+3 6715 6701 6716
+3 6701 6702 6716
+3 6716 6702 6717
+3 6704 7129 6705
+3 6703 7129 6704
+3 6704 6705 6688
+3 6707 6706 6179
+3 6708 6194 6706
+3 6707 6708 6706
+3 6194 6708 6180
+3 6187 6709 6721
+3 6205 6187 6721
+3 6721 6709 6722
+3 6709 6710 6722
+3 6724 6723 6711
+3 6724 6711 6725
+3 6711 6712 6725
+3 6725 6713 6206
+3 6712 6713 6725
+3 6714 6207 6206
+3 6713 6714 6206
+3 6207 6714 6188
+3 6715 6211 6190
+3 6716 6212 6211
+3 6715 6716 6211
+3 6716 6726 6212
+3 6717 6726 6716
+3 6726 6717 6727
+3 6717 6718 6727
+3 6727 6718 6728
+3 6719 7133 6720
+3 7133 7134 6720
+3 6703 6720 7134
+3 7129 6703 7134
+3 6205 6721 6731
+3 6730 6205 6731
+3 6731 6721 7139
+3 6721 6722 7139
+3 7140 6723 6732
+3 6723 6724 6732
+3 6732 6725 6224
+3 6724 6725 6732
+3 6224 6725 6206
+3 6726 6232 6212
+3 6726 6733 6232
+3 6727 6733 6726
+3 6733 6727 6734
+3 6727 6728 6734
+3 6734 6728 6735
+3 7138 6729 6737
+3 6719 6729 7138
+3 7133 6719 7138
+3 6730 6738 6242
+3 6731 6738 6730
+3 6739 6738 6731
+3 6731 7139 6739
+3 6741 6740 7140
+3 6741 6732 6243
+3 7140 6732 6741
+3 6243 6732 6224
+3 6733 6253 6232
+3 6734 6254 6253
+3 6733 6734 6253
+3 6735 6255 6254
+3 6734 6735 6254
+3 6737 6736 6255
+3 6735 6737 6255
+3 6736 6737 6729
+3 6242 6738 6743
+3 6742 6242 6743
+3 6743 6738 7143
+3 6738 6739 7143
+3 7144 6740 6744
+3 6740 6741 6744
+3 6745 6744 6741
+3 6243 6745 6741
+3 6742 6748 6747
+3 6743 6748 6742
+3 7145 6748 6743
+3 6743 7143 7145
+3 6750 6749 7144
+3 6750 6744 6275
+3 7144 6744 6750
+3 6275 6744 6745
+3 6746 6753 6752
+3 6747 6754 6753
+3 6746 6747 6753
+3 6748 6754 6747
+3 7147 6754 6748
+3 6748 7145 7147
+3 7150 6749 6755
+3 6749 6750 6755
+3 6756 6755 6750
+3 6275 6756 6750
+3 6751 6757 6290
+3 6752 6758 6757
+3 6751 6752 6757
+3 6753 6758 6752
+3 7151 6758 6753
+3 7151 6753 7152
+3 6753 6754 7152
+3 6754 7147 7152
+3 7153 7150 6759
+3 7150 6755 6759
+3 6760 6759 6755
+3 6756 6760 6755
+3 6290 6757 7154
+3 6300 6290 7154
+3 7154 6757 7155
+3 6757 6758 7155
+3 6758 7151 7155
+3 6759 7156 7153
+3 6761 6759 6760
+3 7156 6759 6761
+3 6761 6760 6762
+3 7157 6300 7154
+3 6310 6300 7157
+3 7158 7156 6763
+3 7156 6761 6763
+3 6764 6763 6761
+3 6762 6764 6761
+3 6765 6310 7159
+3 6310 7157 7159
+3 6763 7160 7158
+3 6766 6763 6764
+3 7160 6763 6766
+3 6766 6764 6767
+3 6768 6765 7161
+3 6765 7159 7161
+3 7162 7160 7163
+3 7160 6766 7163
+3 6769 6766 6767
+3 7163 6766 6769
+3 6769 6767 6770
+3 6773 6768 7164
+3 6768 7161 7164
+3 6769 7166 7163
+3 7167 6769 6770
+3 7166 6769 7167
+3 6771 6774 7167
+3 6770 6771 7167
+3 6772 6775 6774
+3 6771 6772 6774
+3 6775 6772 6776
+3 6779 6773 7168
+3 6773 7164 7168
+3 6774 7169 7167
+3 7169 6774 7170
+3 6774 6775 7170
+3 7171 6775 6776
+3 7170 6775 7171
+3 6777 7172 7171
+3 6776 6777 7171
+3 6778 7173 7172
+3 6777 6778 7172
+3 7173 6778 6780
+3 6781 7168 6782
+3 6779 7168 6781
+3 7174 7173 6780
+3 7174 6780 6783
+3 6782 6342 6781
+3 7175 6342 6782
+3 6783 7176 7174
+3 6784 7176 6783
+3 6785 6342 7177
+3 6342 7175 7177
+3 6784 6786 7176
+3 6786 7178 7176
+3 6787 6785 7179
+3 6785 7177 7179
+3 6786 6788 7178
+3 6788 7180 7178
+3 6789 6787 7181
+3 6787 7179 7181
+3 6788 6790 7180
+3 6790 7182 7180
+3 6789 6792 6791
+3 7181 6792 6789
+3 6790 6793 7182
+3 6793 7183 7182
+3 7184 6791 6792
+3 6794 6791 7184
+3 6793 6795 7183
+3 6795 7185 7183
+3 6796 6794 7186
+3 6794 7184 7186
+3 7187 7185 6795
+3 6797 7187 6795
+3 6798 6796 7188
+3 6796 7186 7188
+3 6797 6799 7187
+3 6799 7189 7187
+3 6798 6801 6800
+3 7188 6801 6798
+3 6799 6802 7189
+3 6802 7190 7189
+3 7191 6800 6801
+3 6803 6800 7191
+3 7192 7190 6802
+3 6804 7192 6802
+3 6805 6803 7191
+3 7193 6805 7191
+3 6804 6808 7192
+3 6808 7195 7192
+3 6809 6805 7196
+3 6805 7193 7196
+3 6806 7194 6807
+3 7194 7198 6807
+3 6807 7198 6811
+3 7201 7195 6808
+3 6813 7201 6808
+3 6814 6809 7196
+3 7202 6814 7196
+3 7197 6810 6820
+3 6806 6810 7197
+3 7194 6806 7197
+3 7199 6811 7198
+3 7199 6812 6811
+3 7200 6812 7199
+3 6812 7200 6821
+3 7200 7205 6821
+3 7207 7201 6813
+3 6824 7207 6813
+3 6825 6814 7202
+3 7208 6825 7202
+3 7203 6377 6827
+3 6815 7203 6816
+3 6377 7203 6815
+3 6818 6817 6815
+3 6816 6818 6815
+3 7211 6817 6818
+3 6828 6817 7211
+3 7213 6820 6819
+3 6819 6820 6810
+3 7205 7206 6822
+3 6821 7205 6822
+3 6822 7206 6823
+3 7206 7214 6823
+3 6823 7214 6829
+3 7217 7207 6824
+3 6832 7217 6824
+3 6833 6825 7208
+3 7218 6833 7208
+3 7209 6383 6835
+3 6826 7209 6827
+3 6383 7209 6826
+3 6826 6827 6377
+3 7211 7221 6836
+3 6828 7211 6836
+3 6819 6386 7212
+3 7213 6819 7212
+3 7215 6829 7214
+3 7215 6830 6829
+3 7216 6830 7215
+3 6830 7216 6831
+3 7216 7222 6831
+3 6831 7222 6837
+3 6832 6841 7217
+3 6841 7226 7217
+3 6842 6833 7218
+3 7227 6842 7218
+3 7219 6392 6844
+3 6834 7219 6835
+3 6392 7219 6834
+3 6834 6835 6383
+3 6845 6836 7231
+3 6836 7221 7231
+3 6386 6847 7212
+3 6847 7234 7212
+3 7223 6837 7222
+3 7223 6838 6837
+3 7224 6838 7223
+3 6838 7224 6839
+3 7224 7225 6839
+3 6839 7225 6840
+3 7225 7235 6840
+3 6840 7235 6397
+3 6841 6850 7226
+3 6850 7240 7226
+3 6851 6842 7241
+3 6842 7227 7241
+3 7228 6402 6853
+3 6402 7228 6403
+3 7228 7229 6403
+3 6843 7229 6844
+3 6403 7229 6843
+3 6843 6844 6392
+3 7231 7244 6854
+3 6845 7231 6854
+3 6847 6846 7232
+3 7234 6847 7232
+3 7236 6397 7235
+3 7236 6848 6397
+3 7237 6848 7236
+3 6848 7237 6849
+3 7237 7238 6849
+3 6849 7238 6407
+3 7238 7245 6407
+3 6850 6411 7239
+3 7240 6850 7239
+3 6859 6851 7250
+3 6851 7241 7250
+3 7242 6413 6863
+3 6852 7242 6853
+3 6413 7242 6852
+3 6852 6853 6402
+3 7244 7255 6864
+3 6854 7244 6864
+3 7232 6867 6866
+3 6846 6867 7232
+3 7245 7246 6855
+3 6407 7245 6855
+3 6855 7246 6856
+3 7246 7247 6856
+3 6856 7247 6857
+3 7247 7248 6857
+3 6857 7248 6858
+3 7248 7249 6858
+3 6411 6858 7249
+3 7239 6411 7249
+3 7250 7251 6860
+3 6859 7250 6860
+3 6860 7251 6419
+3 7251 7256 6419
+3 7252 6420 6870
+3 6420 7252 6861
+3 7252 7253 6861
+3 6862 7253 6863
+3 6861 7253 6862
+3 6862 6863 6413
+3 6871 6864 7260
+3 6864 7255 7260
+3 7261 6866 6865
+3 6865 6866 6867
+3 7256 7257 6868
+3 6419 7256 6868
+3 6868 7257 6423
+3 7257 7258 6423
+3 6423 7258 6425
+3 7258 7259 6425
+3 6869 7259 6870
+3 6425 7259 6869
+3 6869 6870 6420
+3 7260 7262 6872
+3 6871 7260 6872
+3 7264 6865 6428
+3 7261 6865 7264
+3 7262 7265 6873
+3 6872 7262 6873
+3 6874 7263 6428
+3 7263 7264 6428
+3 6875 6873 7266
+3 6873 7265 7266
+3 6874 6876 7263
+3 6876 7267 7263
+3 7266 7271 6877
+3 6875 7266 6877
+3 6876 6878 7267
+3 7267 6878 7272
+3 7271 7278 6879
+3 6877 7271 6879
+3 7272 6878 6880
+3 6881 7273 7272
+3 6880 6881 7272
+3 6882 7274 7273
+3 6881 6882 7273
+3 6883 7275 7274
+3 6882 6883 7274
+3 6884 7276 7275
+3 6883 6884 7275
+3 7276 6884 7279
+3 6885 6879 7282
+3 6879 7278 7282
+3 6882 6881 6886
+3 6882 6886 6883
+3 6886 6887 6883
+3 6883 6887 6884
+3 6887 6888 6884
+3 6884 6889 7279
+3 6888 6889 6884
+3 6890 7280 7279
+3 6889 6890 7279
+3 6891 7281 7280
+3 6890 6891 7280
+3 7281 6891 7283
+3 6892 6885 7282
+3 7284 6892 7282
+3 6891 6890 6893
+3 6891 6894 7283
+3 6893 6894 6891
+3 7283 6894 7285
+3 6897 6892 7284
+3 7288 6897 7284
+3 6895 7285 6894
+3 7286 6895 6898
+3 7285 6895 7286
+3 7286 6898 7289
+3 6902 6896 7287
+3 7295 6902 7287
+3 7287 6896 7288
+3 6896 6897 7288
+3 6899 7289 6898
+3 7290 6899 6903
+3 7289 6899 7290
+3 7290 6903 7296
+3 6907 7291 7300
+3 6908 7292 7291
+3 6907 6908 7291
+3 6900 7292 6908
+3 7293 7292 6900
+3 7293 6900 7294
+3 6900 6901 7294
+3 7294 6901 7295
+3 6901 6902 7295
+3 6904 7296 6903
+3 7297 6904 6909
+3 7296 6904 7297
+3 7297 6909 7301
+3 6913 7298 7303
+3 6905 7298 6913
+3 7299 7298 6905
+3 7299 6905 7300
+3 6905 6906 7300
+3 6906 6907 7300
+3 6910 7301 6909
+3 7304 7301 6910
+3 6914 7304 6910
+3 6916 6911 7302
+3 7306 6916 7302
+3 7302 6911 7303
+3 6911 6912 7303
+3 6912 6913 7303
+3 7308 7304 6914
+3 6917 7308 6914
+3 6918 6915 7305
+3 7309 6918 7305
+3 7305 6915 7306
+3 6915 6916 7306
+3 6917 6473 7307
+3 7308 6917 7307
+3 6919 6918 7309
+3 7310 6919 7309
+3 6473 6920 7307
+3 6920 7311 7307
+3 6477 6919 7312
+3 6919 7310 7312
+3 6920 6921 7311
+3 6921 7313 7311
+3 6922 6477 7314
+3 6477 7312 7314
+3 6921 6924 7313
+3 6924 7316 7313
+3 6925 6922 7317
+3 6922 7314 7317
+3 6924 6923 7315
+3 7316 6924 7315
+3 6926 6925 7318
+3 6925 7317 7318
+3 6923 6927 7315
+3 6927 7319 7315
+3 7318 7320 6484
+3 6926 7318 6484
+3 6927 6928 7319
+3 6928 7321 7319
+3 6929 6484 7322
+3 6484 7320 7322
+3 6928 6930 7321
+3 6930 7323 7321
+3 6931 6929 7324
+3 6929 7322 7324
+3 6930 6932 7323
+3 6932 7325 7323
+3 6933 6931 7326
+3 6931 7324 7326
+3 6932 6934 7325
+3 6934 7327 7325
+3 6935 6933 7328
+3 6933 7326 7328
+3 6934 6936 7327
+3 6936 7330 7327
+3 6937 6935 7331
+3 6935 7328 7331
+3 6936 6493 7329
+3 7330 6936 7329
+3 6938 6937 7332
+3 6937 7331 7332
+3 6493 6939 7329
+3 6939 7333 7329
+3 6940 6938 7334
+3 6938 7332 7334
+3 6939 6941 7333
+3 6941 7335 7333
+3 6942 6940 7336
+3 6940 7334 7336
+3 6941 6943 7335
+3 6943 7337 7335
+3 6944 6942 7338
+3 6942 7336 7338
+3 6943 6945 7337
+3 6945 7339 7337
+3 6946 6944 7340
+3 6944 7338 7340
+3 6945 6947 7339
+3 6947 7341 7339
+3 6948 6946 7342
+3 6946 7340 7342
+3 7343 7341 6947
+3 6949 7343 6947
+3 6950 6948 7344
+3 6948 7342 7344
+3 6949 6951 7343
+3 6951 7345 7343
+3 6952 6950 7346
+3 6950 7344 7346
+3 6951 6954 7345
+3 6954 7348 7345
+3 6955 6952 7349
+3 6952 7346 7349
+3 6953 7347 6957
+3 7347 7351 6957
+3 6954 6959 7348
+3 6959 7353 7348
+3 6960 6955 7354
+3 6955 7349 7354
+3 6953 6956 7350
+3 7347 6953 7350
+3 7351 7352 6958
+3 6957 7351 6958
+3 6958 7352 6964
+3 7352 7356 6964
+3 6959 6966 7353
+3 6966 7358 7353
+3 6967 6960 7359
+3 6960 7354 7359
+3 6962 6961 7355
+3 6962 7355 6963
+3 7355 7362 6963
+3 6963 7362 6970
+3 6956 6971 7350
+3 6971 7364 7350
+3 7356 7357 6965
+3 6964 7356 6965
+3 6965 7357 6972
+3 7357 7365 6972
+3 6966 6973 7358
+3 6973 7366 7358
+3 6974 6967 7359
+3 7367 6974 7359
+3 6969 6968 7360
+3 6969 7361 6961
+3 7360 7361 6969
+3 7361 7355 6961
+3 7363 6970 7362
+3 7363 6977 6970
+3 7370 6977 7363
+3 6971 6979 7364
+3 6979 7372 7364
+3 7365 7373 6980
+3 6972 7365 6980
+3 6973 6984 7366
+3 6984 7377 7366
+3 6985 6974 7378
+3 6974 7367 7378
+3 6976 6975 7368
+3 6976 7369 6968
+3 7368 7369 6976
+3 7369 7360 6968
+3 6989 6977 7381
+3 6977 7370 7381
+3 6979 6978 7371
+3 7372 6979 7371
+3 7373 7374 6981
+3 6980 7373 6981
+3 6981 7374 6982
+3 7374 7375 6982
+3 6982 7375 6983
+3 7375 7376 6983
+3 6984 6983 7376
+3 7377 6984 7376
+3 7378 7382 6986
+3 6985 7378 6986
+3 6986 7382 6987
+3 6988 6987 7379
+3 6988 7380 6975
+3 7379 7380 6988
+3 7380 7368 6975
+3 7381 7384 6544
+3 6989 7381 6544
+3 6978 6990 7371
+3 6990 7385 7371
+3 7383 6987 7382
+3 7383 7379 6987
+3 6991 6544 7386
+3 6544 7384 7386
+3 6990 6993 7385
+3 6993 7388 7385
+3 7386 7389 6550
+3 6991 7386 6550
+3 6993 6992 7387
+3 7388 6993 7387
+3 6994 6550 7390
+3 6550 7389 7390
+3 6992 6995 7387
+3 6995 7391 7387
+3 7390 7392 6554
+3 6994 7390 6554
+3 6995 6997 7391
+3 6997 7394 7391
+3 6998 6554 7395
+3 6554 7392 7395
+3 6997 6996 7393
+3 7394 6997 7393
+3 6999 6998 7396
+3 6998 7395 7396
+3 6996 7000 7393
+3 7000 7397 7393
+3 7001 6999 7400
+3 6999 7396 7400
+3 7000 7003 7397
+3 7003 7402 7397
+3 7006 7398 7405
+3 7007 7399 7398
+3 7006 7007 7398
+3 7008 7400 7399
+3 7007 7008 7399
+3 7001 7400 7008
+3 7003 7002 7401
+3 7402 7003 7401
+3 7010 7403 7407
+3 7004 7403 7010
+3 7404 7403 7004
+3 7404 7004 7405
+3 7004 7005 7405
+3 7005 7006 7405
+3 7002 7011 7401
+3 7011 7408 7401
+3 7012 7406 7409
+3 7009 7406 7012
+3 7407 7406 7009
+3 7009 7010 7407
+3 7011 7013 7408
+3 7013 7410 7408
+3 7015 7409 7412
+3 7409 7015 7012
+3 7013 7016 7410
+3 7016 7413 7410
+3 7017 7411 7414
+3 7014 7411 7017
+3 7412 7411 7014
+3 7014 7015 7412
+3 7016 7018 7413
+3 7413 7018 7415
+3 7029 7414 7426
+3 7414 7029 7017
+3 7019 7415 7018
+3 7415 7019 7416
+3 7019 7020 7416
+3 7416 7020 7417
+3 7020 7021 7417
+3 7417 7021 7418
+3 7021 7022 7418
+3 7419 7022 7030
+3 7418 7022 7419
+3 7023 7419 7030
+3 7420 7419 7023
+3 7420 7023 7421
+3 7023 7024 7421
+3 7421 7024 7422
+3 7024 7025 7422
+3 7422 7025 7423
+3 7025 7026 7423
+3 7423 7026 7424
+3 7026 7027 7424
+3 7427 7424 7027
+3 7031 7427 7027
+3 7035 7425 7430
+3 7028 7425 7035
+3 7426 7425 7028
+3 7028 7029 7426
+3 7427 7031 7428
+3 7031 7032 7428
+3 7428 7032 7429
+3 7032 7033 7429
+3 7431 7429 7033
+3 7036 7431 7033
+3 7038 7034 7430
+3 7434 7038 7430
+3 7034 7035 7430
+3 7431 7036 7432
+3 7036 7037 7432
+3 7435 7432 7037
+3 7039 7435 7037
+3 7042 7433 7438
+3 7038 7433 7042
+3 7434 7433 7038
+3 7435 7039 7436
+3 7039 7040 7436
+3 7439 7436 7040
+3 7043 7439 7040
+3 7052 7437 7448
+3 7041 7437 7052
+3 7438 7437 7041
+3 7041 7042 7438
+3 7439 7043 7440
+3 7043 7044 7440
+3 7440 7045 7449
+3 7044 7045 7440
+3 7449 7045 7053
+3 7057 7046 7441
+3 7454 7057 7441
+3 7441 7046 7442
+3 7046 7047 7442
+3 7442 7047 7443
+3 7047 7048 7443
+3 7455 7443 7048
+3 7058 7455 7048
+3 7061 7049 7444
+3 7458 7061 7444
+3 7444 7049 7445
+3 7049 7050 7445
+3 7446 7050 7062
+3 7445 7050 7446
+3 7446 7062 7459
+3 7067 7447 7462
+3 7051 7447 7067
+3 7448 7447 7051
+3 7051 7052 7448
+3 7450 7449 7053
+3 7450 7053 7451
+3 7053 7054 7451
+3 7451 7054 7452
+3 7054 7055 7452
+3 7452 7055 7453
+3 7055 7056 7453
+3 7453 7056 7454
+3 7056 7057 7454
+3 7455 7058 7456
+3 7058 7059 7456
+3 7463 7456 7059
+3 7068 7463 7059
+3 7073 7060 7457
+3 7466 7073 7457
+3 7457 7060 7458
+3 7060 7061 7458
+3 7063 7459 7062
+3 7459 7063 7460
+3 7063 7064 7460
+3 7460 7064 7461
+3 7064 7065 7461
+3 7461 7065 7462
+3 7065 7066 7462
+3 7066 7067 7462
+3 7463 7068 7464
+3 7068 7069 7464
+3 7464 7070 7467
+3 7069 7070 7464
+3 7467 7070 7074
+3 7071 7479 7084
+3 7071 7465 7479
+3 7072 7465 7071
+3 7465 7072 7466
+3 7072 7073 7466
+3 7468 7467 7074
+3 7468 7074 7469
+3 7074 7075 7469
+3 7469 7075 7470
+3 7075 7076 7470
+3 7470 7076 7471
+3 7076 7077 7471
+3 7471 7077 7472
+3 7077 7078 7472
+3 7472 7078 7473
+3 7078 7079 7473
+3 7473 7079 7474
+3 7079 7080 7474
+3 7474 7080 7475
+3 7080 7081 7475
+3 7475 7081 7476
+3 7081 7082 7476
+3 7476 7082 7477
+3 7082 7083 7477
+3 7477 7083 7478
+3 7083 7084 7478
+3 7478 7084 7479
+3 7480 6644 7090
+3 6645 7480 7085
+3 6644 7480 6645
+3 7086 6646 6645
+3 7085 7086 6645
+3 7087 6647 6646
+3 7086 7087 6646
+3 7088 6648 6647
+3 7087 7088 6647
+3 7482 6648 7088
+3 6649 6648 7482
+3 7482 7091 6649
+3 6650 7093 7089
+3 7090 6651 6650
+3 7089 7090 6650
+3 6651 7090 6644
+3 7091 6658 6649
+3 7092 6659 6658
+3 7091 7092 6658
+3 6659 7092 7094
+3 6660 7095 7093
+3 6660 7093 6650
+3 7094 6665 6659
+3 6665 7094 7096
+3 7098 7097 7095
+3 7099 7098 7095
+3 6660 7099 7095
+3 7096 6669 6665
+3 6669 7096 7100
+3 7486 7098 6670
+3 7097 7098 7486
+3 6670 7098 7099
+3 6669 7100 7101
+3 6673 6669 7101
+3 6682 7111 7486
+3 6682 7486 6670
+3 7101 6685 6673
+3 7502 6685 7101
+3 7488 6686 7113
+3 6686 7488 6687
+3 7488 7490 6687
+3 7490 7114 6687
+3 7102 7493 7103
+3 7493 7494 7103
+3 7103 7494 7104
+3 7494 7495 7104
+3 7104 7495 7105
+3 7495 7496 7105
+3 7105 7496 7106
+3 7496 7497 7106
+3 7106 7497 7107
+3 7497 7498 7107
+3 7107 7498 7108
+3 7498 7499 7108
+3 7108 7499 7109
+3 7499 7500 7109
+3 7109 7500 7110
+3 7500 7501 7110
+3 7110 7501 7119
+3 7501 7508 7119
+3 7123 7512 7111
+3 6682 7123 7111
+3 6695 7502 7124
+3 6685 7502 6695
+3 6696 7126 7112
+3 7113 6697 6696
+3 7112 7113 6696
+3 6697 7113 6686
+3 7114 6700 6687
+3 7115 6701 6700
+3 7114 7115 6700
+3 7116 6702 6701
+3 7115 7116 6701
+3 6702 7116 7127
+3 7117 6705 7506
+3 7117 7506 7118
+3 7506 7507 7118
+3 7102 7118 7507
+3 7493 7102 7507
+3 7508 7509 7120
+3 7119 7508 7120
+3 7120 7509 7121
+3 7509 7510 7121
+3 7121 7510 7122
+3 7510 7511 7122
+3 6707 7511 7512
+3 7122 7511 6707
+3 6707 7512 7123
+3 6695 7124 7130
+3 6710 6695 7130
+3 6711 7131 7125
+3 7126 6712 6711
+3 7125 7126 6711
+3 6712 7126 6696
+3 7127 6717 6702
+3 7128 6718 6717
+3 7127 7128 6717
+3 6718 7128 7132
+3 7129 7516 6705
+3 7515 7516 7129
+3 7516 7506 6705
+3 6710 7130 7135
+3 6722 6710 7135
+3 6723 7136 7131
+3 6723 7131 6711
+3 7132 6728 6718
+3 6728 7132 7137
+3 7133 7519 7134
+3 7519 7520 7134
+3 7129 7134 7520
+3 7515 7129 7520
+3 6722 7135 7524
+3 7139 6722 7524
+3 7140 7526 7136
+3 6723 7140 7136
+3 7137 6735 6728
+3 7521 6735 7137
+3 6737 6735 7521
+3 6737 7521 7138
+3 7521 7523 7138
+3 7133 7138 7523
+3 7519 7133 7523
+3 7139 7141 6739
+3 7141 7139 7524
+3 6740 7142 7526
+3 6740 7526 7140
+3 6739 7141 7527
+3 7143 6739 7527
+3 7144 7528 7142
+3 6740 7144 7142
+3 7143 7146 7145
+3 7146 7143 7527
+3 7530 7528 6749
+3 6749 7528 7144
+3 7145 7148 7147
+3 7146 7148 7145
+3 7531 7148 7146
+3 7530 7150 7149
+3 6749 7150 7530
+3 7147 7532 7152
+3 7148 7532 7147
+3 7533 7532 7148
+3 7148 7531 7533
+3 7150 7534 7149
+3 7153 7534 7150
+3 7151 7535 7155
+3 7152 7536 7535
+3 7151 7152 7535
+3 7536 7152 7532
+3 7534 7153 7538
+3 7538 7153 7156
+3 7154 7539 7157
+3 7155 7540 7539
+3 7154 7155 7539
+3 7540 7155 7535
+3 7158 7541 7538
+3 7156 7158 7538
+3 7542 7157 7539
+3 7159 7157 7542
+3 7543 7541 7158
+3 7543 7158 7160
+3 7161 7159 7544
+3 7159 7542 7544
+3 7162 7545 7543
+3 7160 7162 7543
+3 7164 7161 7546
+3 7161 7544 7546
+3 7547 7545 7162
+3 7163 7165 7547
+3 7162 7163 7547
+3 7165 7163 7166
+3 7168 7164 7548
+3 7164 7546 7548
+3 7165 7549 7547
+3 7550 7165 7166
+3 7549 7165 7550
+3 7167 7551 7550
+3 7166 7167 7550
+3 7551 7167 7169
+3 7168 7552 6782
+3 7548 7552 7168
+3 7553 7551 7169
+3 7170 7554 7553
+3 7169 7170 7553
+3 7171 7555 7554
+3 7170 7171 7554
+3 7172 7556 7555
+3 7171 7172 7555
+3 7173 7557 7556
+3 7172 7173 7556
+3 7557 7173 7174
+3 7558 6782 7552
+3 7175 6782 7558
+3 7559 7557 7174
+3 7559 7174 7176
+3 7177 7175 7560
+3 7175 7558 7560
+3 7176 7561 7559
+3 7178 7561 7176
+3 7179 7177 7562
+3 7177 7560 7562
+3 7178 7180 7561
+3 7180 7563 7561
+3 7181 7179 7564
+3 7179 7562 7564
+3 7180 7182 7563
+3 7182 7565 7563
+3 6792 7564 7566
+3 7181 7564 6792
+3 7182 7183 7565
+3 7183 7567 7565
+3 7566 7184 6792
+3 7568 7184 7566
+3 7183 7185 7567
+3 7185 7569 7567
+3 7186 7184 7570
+3 7184 7568 7570
+3 7571 7569 7185
+3 7187 7571 7185
+3 7188 7186 7572
+3 7186 7570 7572
+3 7187 7189 7571
+3 7189 7573 7571
+3 6801 7572 7574
+3 7188 7572 6801
+3 7189 7190 7573
+3 7190 7575 7573
+3 7574 7191 6801
+3 7576 7191 7574
+3 7577 7575 7190
+3 7192 7577 7190
+3 7193 7191 7576
+3 7578 7193 7576
+3 7192 7195 7577
+3 7195 7579 7577
+3 7196 7193 7580
+3 7193 7578 7580
+3 7194 7584 7198
+3 7587 7579 7195
+3 7201 7587 7195
+3 7202 7196 7580
+3 7588 7202 7580
+3 7581 6816 7204
+3 6816 7581 6818
+3 7581 7591 6818
+3 6820 7582 7197
+3 7582 7583 7197
+3 7194 7197 7583
+3 7584 7194 7583
+3 7585 7198 7584
+3 7585 7199 7198
+3 7586 7199 7585
+3 7199 7586 7200
+3 7586 7592 7200
+3 7200 7592 7205
+3 7594 7587 7201
+3 7207 7594 7201
+3 7208 7202 7588
+3 7595 7208 7588
+3 7589 6827 7210
+3 7203 7589 7204
+3 6827 7589 7203
+3 7203 7204 6816
+3 7591 7597 7211
+3 6818 7591 7211
+3 6820 7213 7582
+3 7213 7599 7582
+3 7593 7205 7592
+3 7593 7206 7205
+3 7600 7206 7593
+3 7206 7600 7214
+3 7604 7594 7207
+3 7217 7604 7207
+3 7218 7208 7595
+3 7605 7218 7595
+3 7596 6835 7220
+3 7209 7596 7210
+3 6835 7596 7209
+3 7209 7210 6827
+3 7597 7607 7221
+3 7211 7597 7221
+3 7213 7212 7598
+3 7599 7213 7598
+3 7601 7214 7600
+3 7601 7215 7214
+3 7602 7215 7601
+3 7215 7602 7216
+3 7602 7603 7216
+3 7216 7603 7222
+3 7603 7608 7222
+3 7217 7226 7604
+3 7226 7612 7604
+3 7227 7218 7605
+3 7613 7227 7605
+3 7606 6844 7230
+3 7219 7606 7220
+3 6844 7606 7219
+3 7219 7220 6835
+3 7231 7221 7616
+3 7221 7607 7616
+3 7598 7234 7233
+3 7212 7234 7598
+3 7608 7609 7223
+3 7222 7608 7223
+3 7223 7609 7224
+3 7609 7610 7224
+3 7224 7610 7225
+3 7610 7611 7225
+3 7225 7611 7235
+3 7611 7617 7235
+3 7226 7240 7612
+3 7240 7621 7612
+3 7241 7227 7622
+3 7227 7613 7622
+3 7614 6853 7243
+3 6853 7614 7228
+3 7614 7615 7228
+3 7229 7615 7230
+3 7228 7615 7229
+3 7229 7230 6844
+3 7616 7624 7244
+3 7231 7616 7244
+3 7626 7233 7232
+3 7232 7233 7234
+3 7617 7618 7236
+3 7235 7617 7236
+3 7236 7618 7237
+3 7618 7619 7237
+3 7237 7619 7238
+3 7619 7627 7238
+3 7238 7627 7245
+3 7240 7239 7620
+3 7621 7240 7620
+3 7250 7241 7633
+3 7241 7622 7633
+3 7623 6863 7254
+3 7242 7623 7243
+3 6863 7623 7242
+3 7242 7243 6853
+3 7624 7637 7255
+3 7244 7624 7255
+3 7232 6866 7625
+3 7626 7232 7625
+3 7628 7245 7627
+3 7628 7246 7245
+3 7629 7246 7628
+3 7246 7629 7247
+3 7629 7630 7247
+3 7247 7630 7248
+3 7630 7631 7248
+3 7248 7631 7249
+3 7631 7632 7249
+3 7239 7249 7632
+3 7620 7239 7632
+3 7633 7634 7251
+3 7250 7633 7251
+3 7251 7634 7256
+3 7634 7638 7256
+3 6870 7635 7252
+3 7635 7636 7252
+3 7253 7636 7254
+3 7252 7636 7253
+3 7253 7254 6863
+3 7260 7255 7642
+3 7255 7637 7642
+3 6866 7261 7625
+3 7261 7643 7625
+3 7638 7639 7257
+3 7256 7638 7257
+3 7257 7639 7258
+3 7639 7640 7258
+3 7258 7640 7259
+3 7640 7641 7259
+3 6870 7259 7641
+3 7635 6870 7641
+3 7642 7644 7262
+3 7260 7642 7262
+3 7261 7264 7643
+3 7264 7645 7643
+3 7644 7646 7265
+3 7262 7644 7265
+3 7647 7264 7263
+3 7645 7264 7647
+3 7266 7265 7651
+3 7265 7646 7651
+3 7263 7268 7647
+3 7267 7268 7263
+3 7269 7648 7647
+3 7268 7269 7647
+3 7270 7649 7648
+3 7269 7270 7648
+3 7649 7270 7652
+3 7651 7655 7271
+3 7266 7651 7271
+3 7268 7267 7272
+3 7268 7272 7269
+3 7272 7273 7269
+3 7269 7273 7270
+3 7273 7274 7270
+3 7270 7275 7652
+3 7274 7275 7270
+3 7276 7653 7652
+3 7275 7276 7652
+3 7277 7654 7653
+3 7276 7277 7653
+3 7654 7277 7656
+3 7271 7658 7278
+3 7655 7658 7271
+3 7277 7276 7279
+3 7277 7280 7656
+3 7279 7280 7277
+3 7281 7657 7656
+3 7280 7281 7656
+3 7657 7281 7659
+3 7661 7278 7658
+3 7282 7278 7661
+3 7659 7281 7283
+3 7659 7283 7662
+3 7284 7282 7661
+3 7664 7284 7661
+3 7662 7283 7285
+3 7286 7663 7662
+3 7285 7286 7662
+3 7663 7286 7665
+3 7288 7284 7664
+3 7669 7288 7664
+3 7665 7286 7289
+3 7290 7666 7665
+3 7289 7290 7665
+3 7666 7290 7670
+3 7295 7667 7676
+3 7287 7667 7295
+3 7668 7667 7287
+3 7668 7287 7669
+3 7287 7288 7669
+3 7670 7290 7296
+3 7297 7671 7670
+3 7296 7297 7670
+3 7671 7297 7677
+3 7300 7672 7679
+3 7291 7672 7300
+3 7673 7672 7291
+3 7673 7291 7674
+3 7291 7292 7674
+3 7674 7292 7675
+3 7292 7293 7675
+3 7675 7293 7676
+3 7293 7294 7676
+3 7294 7295 7676
+3 7677 7297 7301
+3 7677 7301 7680
+3 7303 7298 7678
+3 7682 7303 7678
+3 7678 7298 7679
+3 7298 7299 7679
+3 7299 7300 7679
+3 7680 7301 7304
+3 7680 7304 7683
+3 7306 7302 7681
+3 7685 7306 7681
+3 7681 7302 7682
+3 7302 7303 7682
+3 7308 7683 7304
+3 7687 7683 7308
+3 7309 7305 7684
+3 7688 7309 7684
+3 7684 7305 7685
+3 7305 7306 7685
+3 7308 7307 7686
+3 7687 7308 7686
+3 7310 7309 7688
+3 7689 7310 7688
+3 7307 7311 7686
+3 7311 7690 7686
+3 7312 7310 7691
+3 7310 7689 7691
+3 7311 7313 7690
+3 7313 7692 7690
+3 7314 7312 7693
+3 7312 7691 7693
+3 7313 7316 7692
+3 7316 7695 7692
+3 7317 7314 7696
+3 7314 7693 7696
+3 7316 7315 7694
+3 7695 7316 7694
+3 7318 7317 7697
+3 7317 7696 7697
+3 7315 7319 7694
+3 7319 7698 7694
+3 7697 7699 7320
+3 7318 7697 7320
+3 7319 7321 7698
+3 7321 7700 7698
+3 7322 7320 7701
+3 7320 7699 7701
+3 7321 7323 7700
+3 7323 7702 7700
+3 7324 7322 7703
+3 7322 7701 7703
+3 7323 7325 7702
+3 7325 7704 7702
+3 7326 7324 7705
+3 7324 7703 7705
+3 7325 7327 7704
+3 7327 7706 7704
+3 7328 7326 7707
+3 7326 7705 7707
+3 7327 7330 7706
+3 7330 7709 7706
+3 7331 7328 7710
+3 7328 7707 7710
+3 7330 7329 7708
+3 7709 7330 7708
+3 7332 7331 7711
+3 7331 7710 7711
+3 7329 7333 7708
+3 7333 7712 7708
+3 7334 7332 7713
+3 7332 7711 7713
+3 7333 7335 7712
+3 7335 7714 7712
+3 7336 7334 7715
+3 7334 7713 7715
+3 7335 7337 7714
+3 7337 7716 7714
+3 7338 7336 7717
+3 7336 7715 7717
+3 7337 7339 7716
+3 7339 7718 7716
+3 7340 7338 7719
+3 7338 7717 7719
+3 7339 7341 7718
+3 7341 7720 7718
+3 7342 7340 7721
+3 7340 7719 7721
+3 7722 7720 7341
+3 7343 7722 7341
+3 7344 7342 7723
+3 7342 7721 7723
+3 7343 7345 7722
+3 7345 7724 7722
+3 7346 7344 7725
+3 7344 7723 7725
+3 7345 7348 7724
+3 7348 7726 7724
+3 7349 7346 7727
+3 7346 7725 7727
+3 7351 7347 7730
+3 7348 7353 7726
+3 7353 7732 7726
+3 7354 7349 7733
+3 7349 7727 7733
+3 7350 7729 7347
+3 7728 7729 7350
+3 7729 7730 7347
+3 7730 7731 7352
+3 7351 7730 7352
+3 7352 7731 7356
+3 7731 7734 7356
+3 7353 7358 7732
+3 7358 7736 7732
+3 7359 7354 7737
+3 7354 7733 7737
+3 7350 7364 7728
+3 7364 7740 7728
+3 7734 7735 7357
+3 7356 7734 7357
+3 7357 7735 7365
+3 7735 7741 7365
+3 7358 7366 7736
+3 7366 7742 7736
+3 7367 7359 7737
+3 7743 7367 7737
+3 7355 7361 7738
+3 7739 7362 7355
+3 7738 7739 7355
+3 7739 7363 7362
+3 7746 7363 7739
+3 7363 7746 7370
+3 7364 7372 7740
+3 7372 7748 7740
+3 7741 7749 7373
+3 7365 7741 7373
+3 7366 7377 7742
+3 7377 7753 7742
+3 7378 7367 7754
+3 7367 7743 7754
+3 7360 7369 7744
+3 7745 7361 7360
+3 7744 7745 7360
+3 7745 7738 7361
+3 7758 7370 7746
+3 7381 7370 7758
+3 7372 7371 7747
+3 7748 7372 7747
+3 7749 7750 7374
+3 7373 7749 7374
+3 7374 7750 7375
+3 7750 7751 7375
+3 7375 7751 7376
+3 7751 7752 7376
+3 7377 7376 7752
+3 7753 7377 7752
+3 7378 7759 7382
+3 7754 7759 7378
+3 7368 7380 7755
+3 7756 7369 7368
+3 7755 7756 7368
+3 7756 7744 7369
+3 7758 7764 7384
+3 7381 7758 7384
+3 7371 7385 7747
+3 7385 7765 7747
+3 7760 7382 7759
+3 7760 7383 7382
+3 7761 7383 7760
+3 7383 7762 7379
+3 7761 7762 7383
+3 7763 7380 7379
+3 7762 7763 7379
+3 7763 7755 7380
+3 7386 7384 7766
+3 7384 7764 7766
+3 7385 7388 7765
+3 7388 7768 7765
+3 7766 7769 7389
+3 7386 7766 7389
+3 7388 7387 7767
+3 7768 7388 7767
+3 7390 7389 7770
+3 7389 7769 7770
+3 7387 7391 7767
+3 7391 7771 7767
+3 7390 7772 7392
+3 7770 7772 7390
+3 7391 7394 7771
+3 7394 7774 7771
+3 7775 7392 7772
+3 7395 7392 7775
+3 7394 7393 7773
+3 7774 7394 7773
+3 7396 7775 7776
+3 7395 7775 7396
+3 7393 7397 7773
+3 7397 7777 7773
+3 7399 7776 7779
+3 7399 7396 7776
+3 7400 7396 7399
+3 7397 7402 7777
+3 7402 7781 7777
+3 7405 7778 7783
+3 7398 7778 7405
+3 7779 7778 7398
+3 7398 7399 7779
+3 7402 7401 7780
+3 7781 7402 7780
+3 7407 7403 7782
+3 7785 7407 7782
+3 7782 7403 7783
+3 7403 7404 7783
+3 7404 7405 7783
+3 7401 7408 7780
+3 7408 7786 7780
+3 7409 7406 7784
+3 7788 7409 7784
+3 7784 7406 7785
+3 7406 7407 7785
+3 7408 7410 7786
+3 7410 7789 7786
+3 7412 7787 7791
+3 7409 7787 7412
+3 7788 7787 7409
+3 7410 7413 7789
+3 7413 7792 7789
+3 7414 7790 7800
+3 7411 7790 7414
+3 7791 7790 7411
+3 7411 7412 7791
+3 7793 7413 7415
+3 7792 7413 7793
+3 7793 7415 7801
+3 7417 7794 7801
+3 7418 7795 7794
+3 7417 7418 7794
+3 7419 7796 7795
+3 7418 7419 7795
+3 7420 7797 7796
+3 7419 7420 7796
+3 7421 7798 7797
+3 7420 7421 7797
+3 7422 7799 7798
+3 7421 7422 7798
+3 7799 7422 7802
+3 7426 7800 7806
+3 7800 7426 7414
+3 7416 7801 7415
+3 7416 7417 7801
+3 7423 7802 7422
+3 7802 7423 7803
+3 7423 7424 7803
+3 7804 7424 7427
+3 7803 7424 7804
+3 7804 7427 7807
+3 7430 7805 7809
+3 7425 7805 7430
+3 7806 7805 7425
+3 7425 7426 7806
+3 7428 7807 7427
+3 7807 7428 7808
+3 7428 7429 7808
+3 7810 7808 7429
+3 7431 7810 7429
+3 7434 7809 7813
+3 7809 7434 7430
+3 7810 7431 7811
+3 7431 7432 7811
+3 7814 7811 7432
+3 7435 7814 7432
+3 7438 7812 7816
+3 7433 7812 7438
+3 7813 7812 7433
+3 7433 7434 7813
+3 7814 7435 7815
+3 7435 7436 7815
+3 7817 7815 7436
+3 7439 7817 7436
+3 7448 7437 7816
+3 7828 7448 7816
+3 7437 7438 7816
+3 7817 7439 7818
+3 7439 7440 7818
+3 7819 7440 7449
+3 7818 7440 7819
+3 7819 7449 7829
+3 7454 7441 7820
+3 7833 7454 7820
+3 7820 7441 7821
+3 7441 7442 7821
+3 7821 7442 7822
+3 7442 7443 7822
+3 7834 7822 7443
+3 7455 7834 7443
+3 7458 7444 7823
+3 7837 7458 7823
+3 7823 7444 7824
+3 7444 7445 7824
+3 7824 7445 7825
+3 7445 7446 7825
+3 7838 7825 7446
+3 7459 7838 7446
+3 7462 7826 7840
+3 7447 7826 7462
+3 7827 7826 7447
+3 7827 7447 7828
+3 7447 7448 7828
+3 7450 7829 7449
+3 7829 7450 7830
+3 7450 7451 7830
+3 7830 7451 7831
+3 7451 7452 7831
+3 7831 7452 7832
+3 7452 7453 7832
+3 7832 7453 7833
+3 7453 7454 7833
+3 7834 7455 7835
+3 7455 7456 7835
+3 7841 7835 7456
+3 7463 7841 7456
+3 7466 7457 7836
+3 7844 7466 7836
+3 7836 7457 7837
+3 7457 7458 7837
+3 7838 7459 7839
+3 7459 7460 7839
+3 7839 7460 7840
+3 7460 7461 7840
+3 7461 7462 7840
+3 7841 7463 7842
+3 7463 7464 7842
+3 7845 7842 7464
+3 7467 7845 7464
+3 7479 7465 7843
+3 7857 7479 7843
+3 7843 7465 7844
+3 7465 7466 7844
+3 7845 7467 7846
+3 7467 7468 7846
+3 7846 7468 7847
+3 7468 7469 7847
+3 7847 7469 7848
+3 7469 7470 7848
+3 7848 7470 7849
+3 7470 7471 7849
+3 7849 7471 7850
+3 7471 7472 7850
+3 7850 7472 7851
+3 7472 7473 7851
+3 7851 7473 7852
+3 7473 7474 7852
+3 7852 7474 7853
+3 7474 7475 7853
+3 7853 7475 7854
+3 7475 7476 7854
+3 7854 7476 7855
+3 7476 7477 7855
+3 7855 7477 7856
+3 7477 7478 7856
+3 7856 7478 7857
+3 7478 7479 7857
+3 7858 7085 7481
+3 7085 7858 7086
+3 7858 7859 7086
+3 7086 7859 7087
+3 7859 7860 7087
+3 7087 7860 7088
+3 7860 7861 7088
+3 7861 7483 7088
+3 7089 7862 7090
+3 7862 7863 7090
+3 7480 7863 7481
+3 7090 7863 7480
+3 7480 7481 7085
+3 7483 7482 7088
+3 7864 7482 7483
+3 7091 7482 7864
+3 7091 7864 7092
+3 7864 7866 7092
+3 7865 7093 7484
+3 7089 7093 7865
+3 7862 7089 7865
+3 7866 7867 7094
+3 7092 7866 7094
+3 7867 7485 7094
+3 7869 7484 7095
+3 7095 7484 7093
+3 7485 7096 7094
+3 7870 7096 7485
+3 7095 7097 7868
+3 7869 7095 7868
+3 7870 7871 7100
+3 7096 7870 7100
+3 7097 7486 7868
+3 7486 7873 7868
+3 7101 7100 7874
+3 7100 7871 7874
+3 7486 7111 7872
+3 7873 7486 7872
+3 7502 7874 7503
+3 7101 7874 7502
+3 7875 7112 7504
+3 7113 7875 7487
+3 7112 7875 7113
+3 7489 7488 7113
+3 7487 7489 7113
+3 7491 7490 7488
+3 7489 7491 7488
+3 7492 7114 7490
+3 7491 7492 7490
+3 7876 7114 7492
+3 7115 7114 7876
+3 7115 7876 7116
+3 7876 7877 7116
+3 7877 7505 7116
+3 7494 7493 7878
+3 7494 7878 7495
+3 7878 7879 7495
+3 7495 7879 7496
+3 7879 7880 7496
+3 7496 7880 7497
+3 7880 7881 7497
+3 7497 7881 7498
+3 7881 7882 7498
+3 7498 7882 7499
+3 7882 7883 7499
+3 7499 7883 7500
+3 7883 7884 7500
+3 7500 7884 7501
+3 7884 7890 7501
+3 7501 7890 7508
+3 7111 7512 7872
+3 7512 7895 7872
+3 7503 7124 7502
+3 7896 7124 7503
+3 7885 7125 7513
+3 7126 7885 7504
+3 7125 7885 7126
+3 7126 7504 7112
+3 7505 7127 7116
+3 7886 7127 7505
+3 7128 7127 7886
+3 7886 7514 7128
+3 7506 7887 7507
+3 7887 7888 7507
+3 7507 7889 7493
+3 7888 7889 7507
+3 7889 7878 7493
+3 7891 7508 7890
+3 7891 7509 7508
+3 7892 7509 7891
+3 7509 7892 7510
+3 7892 7893 7510
+3 7510 7893 7511
+3 7893 7894 7511
+3 7512 7511 7894
+3 7895 7512 7894
+3 7130 7124 7899
+3 7124 7896 7899
+3 7131 7517 7513
+3 7131 7513 7125
+3 7514 7132 7128
+3 7132 7514 7518
+3 7515 7897 7516
+3 7897 7898 7516
+3 7506 7516 7898
+3 7887 7506 7898
+3 7135 7130 7902
+3 7130 7899 7902
+3 7903 7517 7136
+3 7136 7517 7131
+3 7518 7137 7132
+3 7137 7518 7522
+3 7519 7900 7520
+3 7900 7901 7520
+3 7515 7520 7901
+3 7897 7515 7901
+3 7524 7135 7905
+3 7135 7902 7905
+3 7903 7526 7525
+3 7136 7526 7903
+3 7522 7521 7137
+3 7904 7521 7522
+3 7523 7521 7904
+3 7519 7523 7904
+3 7900 7519 7904
+3 7524 7906 7141
+3 7905 7906 7524
+3 7907 7525 7142
+3 7142 7525 7526
+3 7908 7141 7906
+3 7527 7141 7908
+3 7142 7528 7907
+3 7528 7909 7907
+3 7527 7910 7146
+3 7908 7910 7527
+3 7909 7530 7529
+3 7528 7530 7909
+3 7911 7146 7910
+3 7531 7146 7911
+3 7912 7529 7149
+3 7149 7529 7530
+3 7533 7531 7911
+3 7913 7533 7911
+3 7912 7149 7914
+3 7914 7149 7534
+3 7532 7537 7536
+3 7532 7913 7537
+3 7533 7913 7532
+3 7534 7917 7914
+3 7538 7917 7534
+3 7540 7535 7915
+3 7919 7540 7915
+3 7915 7535 7916
+3 7535 7536 7916
+3 7916 7536 7537
+3 7538 7541 7917
+3 7541 7920 7917
+3 7542 7539 7918
+3 7921 7542 7918
+3 7918 7539 7919
+3 7539 7540 7919
+3 7920 7541 7922
+3 7922 7541 7543
+3 7544 7542 7923
+3 7542 7921 7923
+3 7543 7924 7922
+3 7545 7924 7543
+3 7546 7544 7925
+3 7544 7923 7925
+3 7926 7924 7545
+3 7547 7926 7545
+3 7548 7546 7927
+3 7546 7925 7927
+3 7928 7926 7547
+3 7549 7928 7547
+3 7552 7548 7930
+3 7548 7927 7930
+3 7928 7549 7929
+3 7549 7550 7929
+3 7929 7551 7931
+3 7550 7551 7929
+3 7931 7551 7553
+3 7930 7936 7558
+3 7552 7930 7558
+3 7932 7931 7553
+3 7932 7553 7933
+3 7553 7554 7933
+3 7933 7555 7937
+3 7554 7555 7933
+3 7555 7934 7937
+3 7556 7934 7555
+3 7934 7556 7935
+3 7556 7557 7935
+3 7938 7935 7557
+3 7559 7938 7557
+3 7560 7558 7939
+3 7558 7936 7939
+3 7940 7938 7559
+3 7561 7940 7559
+3 7562 7560 7941
+3 7560 7939 7941
+3 7561 7563 7940
+3 7563 7942 7940
+3 7564 7941 7943
+3 7562 7941 7564
+3 7563 7565 7942
+3 7565 7944 7942
+3 7943 7566 7564
+3 7945 7566 7943
+3 7565 7567 7944
+3 7567 7946 7944
+3 7568 7566 7947
+3 7566 7945 7947
+3 7567 7569 7946
+3 7569 7948 7946
+3 7570 7568 7949
+3 7568 7947 7949
+3 7950 7948 7569
+3 7571 7950 7569
+3 7572 7570 7951
+3 7570 7949 7951
+3 7571 7573 7950
+3 7573 7952 7950
+3 7574 7572 7951
+3 7953 7574 7951
+3 7573 7575 7952
+3 7575 7954 7952
+3 7576 7574 7955
+3 7574 7953 7955
+3 7956 7954 7575
+3 7577 7956 7575
+3 7578 7576 7955
+3 7957 7578 7955
+3 7577 7579 7956
+3 7579 7958 7956
+3 7580 7578 7959
+3 7578 7957 7959
+3 7964 7958 7579
+3 7587 7964 7579
+3 7588 7580 7959
+3 7965 7588 7959
+3 7960 7204 7590
+3 7204 7960 7581
+3 7960 7961 7581
+3 7581 7961 7591
+3 7961 7967 7591
+3 7583 7582 7962
+3 7583 7963 7584
+3 7962 7963 7583
+3 7963 7585 7584
+3 7969 7585 7963
+3 7585 7969 7586
+3 7972 7964 7587
+3 7594 7972 7587
+3 7595 7588 7965
+3 7973 7595 7965
+3 7589 7966 7590
+3 7210 7966 7589
+3 7589 7590 7204
+3 7967 7977 7597
+3 7591 7967 7597
+3 7599 7968 7582
+3 7968 7962 7582
+3 7970 7586 7969
+3 7971 7592 7586
+3 7970 7971 7586
+3 7971 7593 7592
+3 7979 7593 7971
+3 7593 7979 7600
+3 7982 7972 7594
+3 7604 7982 7594
+3 7605 7595 7973
+3 7983 7605 7973
+3 7220 7974 7596
+3 7974 7975 7596
+3 7210 7596 7975
+3 7966 7210 7975
+3 7977 7986 7607
+3 7597 7977 7607
+3 7599 7598 7978
+3 7968 7599 7978
+3 7980 7600 7979
+3 7980 7601 7600
+3 7981 7601 7980
+3 7601 7981 7602
+3 7981 7987 7602
+3 7602 7987 7603
+3 7604 7612 7982
+3 7982 7612 7992
+3 7613 7605 7983
+3 7993 7613 7983
+3 7230 7984 7606
+3 7984 7985 7606
+3 7220 7606 7985
+3 7974 7220 7985
+3 7616 7607 7998
+3 7607 7986 7998
+3 8000 7598 7233
+3 7978 7598 8000
+3 7988 7603 7987
+3 7989 7608 7603
+3 7988 7989 7603
+3 7989 7609 7608
+3 7990 7609 7989
+3 7609 7990 7610
+3 7990 8001 7610
+3 7610 8001 7611
+3 7621 7991 7612
+3 7991 7992 7612
+3 7622 7613 8005
+3 7613 7993 8005
+3 7243 7994 7614
+3 7994 7995 7614
+3 7614 7995 7615
+3 7995 7996 7615
+3 7230 7615 7996
+3 7984 7230 7996
+3 7998 8008 7624
+3 7616 7998 7624
+3 7626 7999 7233
+3 7999 8000 7233
+3 8002 7611 8001
+3 8003 7617 7611
+3 8002 8003 7611
+3 8003 7618 7617
+3 8004 7618 8003
+3 7618 8004 7619
+3 8004 8009 7619
+3 7619 8009 7627
+3 8017 7621 7620
+3 7991 7621 8017
+3 7633 7622 8018
+3 7622 8005 8018
+3 7254 8006 7623
+3 8006 8007 7623
+3 7243 7623 8007
+3 7994 7243 8007
+3 8008 8022 7637
+3 7624 8008 7637
+3 8023 7626 7625
+3 7999 7626 8023
+3 8010 7627 8009
+3 8010 7628 7627
+3 8011 7628 8010
+3 7628 8011 7629
+3 8011 8012 7629
+3 7629 8012 7630
+3 8012 8013 7630
+3 7630 8013 7631
+3 8013 8014 7631
+3 7631 8014 7632
+3 8014 8015 7632
+3 7632 8016 7620
+3 8015 8016 7632
+3 8016 8017 7620
+3 8018 8019 7634
+3 7633 8018 7634
+3 7634 8019 7638
+3 8019 8024 7638
+3 7635 8020 7636
+3 8020 8021 7636
+3 7254 7636 8021
+3 8006 7254 8021
+3 7642 7637 8028
+3 7637 8022 8028
+3 8023 7625 7643
+3 8029 8023 7643
+3 8024 8025 7639
+3 7638 8024 7639
+3 7639 8025 7640
+3 8025 8026 7640
+3 7640 8026 7641
+3 8026 8027 7641
+3 7635 7641 8027
+3 8020 7635 8027
+3 8028 8031 7644
+3 7642 8028 7644
+3 8029 7643 7645
+3 8032 8029 7645
+3 8031 8036 7646
+3 7644 8031 7646
+3 7645 7648 8032
+3 7647 7648 7645
+3 7649 8033 8032
+3 7648 7649 8032
+3 7650 8034 8033
+3 7649 7650 8033
+3 8034 7650 8037
+3 7651 7646 8039
+3 7646 8036 8039
+3 7650 7649 7652
+3 7650 7653 8037
+3 7652 7653 7650
+3 7654 8038 8037
+3 7653 7654 8037
+3 8038 7654 8040
+3 8039 8042 7655
+3 7651 8039 7655
+3 8040 7654 7656
+3 7657 8041 8040
+3 7656 7657 8040
+3 8041 7657 8043
+3 7658 7655 8045
+3 7655 8042 8045
+3 8043 7657 7659
+3 7660 8044 8043
+3 7659 7660 8043
+3 8044 7660 8046
+3 7658 8048 7661
+3 8045 8048 7658
+3 7660 7659 7662
+3 7660 7663 8046
+3 7662 7663 7660
+3 8046 7663 8049
+3 8048 7664 7661
+3 8053 7664 8048
+3 8049 7663 7665
+3 7666 8050 8049
+3 7665 7666 8049
+3 8050 7666 8054
+3 7669 8052 8059
+3 7664 8052 7669
+3 8053 8052 7664
+3 8054 7666 7670
+3 8054 7670 8060
+3 7675 8056 8066
+3 7676 8057 8056
+3 7675 7676 8056
+3 7667 8057 7676
+3 8058 8057 7667
+3 8058 7667 8059
+3 7667 7668 8059
+3 7668 7669 8059
+3 7671 8060 7670
+3 8061 7671 7677
+3 8060 7671 8061
+3 8061 7677 8067
+3 7679 8063 8069
+3 7672 8063 7679
+3 8064 8063 7672
+3 8064 7672 8065
+3 7672 7673 8065
+3 8065 7673 8066
+3 7673 7674 8066
+3 7674 7675 8066
+3 8067 7677 7680
+3 8067 7680 8070
+3 7682 8068 8072
+3 7678 8068 7682
+3 8069 8068 7678
+3 7678 7679 8069
+3 7683 8070 7680
+3 8073 8070 7683
+3 7685 8071 8075
+3 7681 8071 7685
+3 8072 8071 7681
+3 7681 7682 8072
+3 7683 7687 8073
+3 7687 8076 8073
+3 7688 8074 8077
+3 7684 8074 7688
+3 8075 8074 7684
+3 7684 7685 8075
+3 8079 7687 7686
+3 8076 7687 8079
+3 8077 7689 7688
+3 8080 7689 8077
+3 7690 8078 7686
+3 8078 8079 7686
+3 7691 7689 8081
+3 7689 8080 8081
+3 7690 7692 8078
+3 7692 8082 8078
+3 7693 7691 8083
+3 7691 8081 8083
+3 7692 7695 8082
+3 7695 8085 8082
+3 7696 7693 8086
+3 7693 8083 8086
+3 7695 7694 8084
+3 8085 7695 8084
+3 7697 7696 8087
+3 7696 8086 8087
+3 7694 7698 8084
+3 7698 8088 8084
+3 8087 8089 7699
+3 7697 8087 7699
+3 7698 7700 8088
+3 7700 8090 8088
+3 7701 7699 8091
+3 7699 8089 8091
+3 7700 7702 8090
+3 7702 8092 8090
+3 7703 7701 8093
+3 7701 8091 8093
+3 7702 7704 8092
+3 7704 8094 8092
+3 7705 7703 8095
+3 7703 8093 8095
+3 7704 7706 8094
+3 7706 8096 8094
+3 7707 7705 8097
+3 7705 8095 8097
+3 7706 7709 8096
+3 7709 8098 8096
+3 7710 7707 8099
+3 7707 8097 8099
+3 8101 7709 7708
+3 8098 7709 8101
+3 7711 7710 8102
+3 7710 8099 8102
+3 7712 8100 7708
+3 8100 8101 7708
+3 7713 7711 8103
+3 7711 8102 8103
+3 7712 7714 8100
+3 7714 8104 8100
+3 7715 7713 8105
+3 7713 8103 8105
+3 7714 7716 8104
+3 7716 8106 8104
+3 7717 7715 8107
+3 7715 8105 8107
+3 7716 7718 8106
+3 7718 8108 8106
+3 7719 7717 8109
+3 7717 8107 8109
+3 7718 7720 8108
+3 8108 7720 8110
+3 7721 7719 8111
+3 7719 8109 8111
+3 7722 8110 7720
+3 8112 8110 7722
+3 7723 7721 8113
+3 7721 8111 8113
+3 7722 7724 8112
+3 7724 8114 8112
+3 7725 7723 8115
+3 7723 8113 8115
+3 7724 7726 8114
+3 7726 8116 8114
+3 7727 7725 8117
+3 7725 8115 8117
+3 7726 7732 8116
+3 7732 8122 8116
+3 7733 7727 8123
+3 7727 8117 8123
+3 7728 8118 7729
+3 8118 8119 7729
+3 7729 8120 7730
+3 8119 8120 7729
+3 8120 7731 7730
+3 8121 7731 8120
+3 7731 8121 7734
+3 8121 8124 7734
+3 7732 7736 8122
+3 7736 8125 8122
+3 7737 7733 8126
+3 7733 8123 8126
+3 7728 7740 8118
+3 7740 8127 8118
+3 8124 8128 7735
+3 7734 8124 7735
+3 7735 8128 7741
+3 7736 7742 8125
+3 7742 8130 8125
+3 7743 7737 8126
+3 8131 7743 8126
+3 7740 7748 8127
+3 7748 8134 8127
+3 8129 7741 8128
+3 8129 7749 7741
+3 8135 7749 8129
+3 7742 7753 8130
+3 8130 7753 8138
+3 7754 7743 8139
+3 7743 8131 8139
+3 7757 7738 7745
+3 7739 7757 8132
+3 7738 7757 7739
+3 8143 7746 7739
+3 8132 8143 7739
+3 7746 8143 7758
+3 7748 7747 8133
+3 8134 7748 8133
+3 8135 8136 7750
+3 7749 8135 7750
+3 7750 8136 7751
+3 8136 8144 7751
+3 7751 8144 7752
+3 7753 7752 8137
+3 8137 8138 7753
+3 7759 7754 8146
+3 7754 8139 8146
+3 7744 7756 8140
+3 8141 7745 7744
+3 8140 8141 7744
+3 8142 7757 7745
+3 8141 8142 7745
+3 8142 8132 7757
+3 8151 7758 8143
+3 7758 8151 7764
+3 7747 7765 8133
+3 7765 8152 8133
+3 8145 7752 8144
+3 8145 8137 7752
+3 7759 8153 7760
+3 8146 8153 7759
+3 7755 7763 8147
+3 8148 7756 7755
+3 8147 8148 7755
+3 8148 8140 7756
+3 8161 7764 8151
+3 7766 7764 8161
+3 7765 7768 8152
+3 7768 8163 8152
+3 8154 7760 8153
+3 8155 7761 7760
+3 8154 8155 7760
+3 8156 7762 7761
+3 8155 8156 7761
+3 8157 7763 7762
+3 8156 8157 7762
+3 8157 8147 7763
+3 7766 8164 7769
+3 8161 8164 7766
+3 7768 7767 8162
+3 8163 7768 8162
+3 8165 7769 8164
+3 7770 7769 8165
+3 7767 7771 8162
+3 7771 8166 8162
+3 7772 7770 8168
+3 7770 8165 8168
+3 7771 7774 8166
+3 7774 8170 8166
+3 7772 8172 7775
+3 8168 8172 7772
+3 7774 7773 8169
+3 8170 7774 8169
+3 7776 8172 8174
+3 8172 7776 7775
+3 7773 7777 8169
+3 7777 8175 8169
+3 7778 8173 8176
+3 7779 8174 8173
+3 7778 7779 8173
+3 8174 7779 7776
+3 7777 7781 8175
+3 7781 8178 8175
+3 7783 8176 8180
+3 8176 7783 7778
+3 7781 7780 8177
+3 8178 7781 8177
+3 7785 8179 8182
+3 7782 8179 7785
+3 8180 8179 7782
+3 7782 7783 8180
+3 7780 7786 8177
+3 7786 8183 8177
+3 7788 8181 8185
+3 7784 8181 7788
+3 8182 8181 7784
+3 7784 7785 8182
+3 7786 7789 8183
+3 7789 8186 8183
+3 7791 8184 8188
+3 7787 8184 7791
+3 8185 8184 7787
+3 7787 7788 8185
+3 7789 7792 8186
+3 8186 7792 8189
+3 7796 8187 8192
+3 8187 7796 8193
+3 7800 7790 8188
+3 8198 7800 8188
+3 7790 7791 8188
+3 7793 8189 7792
+3 8190 7793 7801
+3 8189 7793 8190
+3 7794 8190 7801
+3 8191 8190 7794
+3 8191 7794 8192
+3 7794 7795 8192
+3 7795 7796 8192
+3 7797 8193 7796
+3 8193 7797 8194
+3 7797 7798 8194
+3 8194 7798 8195
+3 7798 7799 8195
+3 8196 7799 7802
+3 8195 7799 8196
+3 8196 7802 8199
+3 7806 8197 8202
+3 7800 8197 7806
+3 8198 8197 7800
+3 7803 8199 7802
+3 8199 7803 8200
+3 7803 7804 8200
+3 8203 8200 7804
+3 7807 8203 7804
+3 7809 8201 8206
+3 7805 8201 7809
+3 8202 8201 7805
+3 7805 7806 8202
+3 8203 7807 8204
+3 7807 7808 8204
+3 8205 7808 7810
+3 8204 7808 8205
+3 8205 7810 8207
+3 7813 8206 8210
+3 8206 7813 7809
+3 7811 8207 7810
+3 8208 7811 7814
+3 8207 7811 8208
+3 8208 7814 8211
+3 7816 8209 8213
+3 7812 8209 7816
+3 8210 8209 7812
+3 7812 7813 8210
+3 7815 8211 7814
+3 8212 7815 7817
+3 8211 7815 8212
+3 8212 7817 8214
+3 7828 8213 8225
+3 8213 7828 7816
+3 7818 8214 7817
+3 8214 7818 8215
+3 7818 7819 8215
+3 8216 7819 7829
+3 8215 7819 8216
+3 8216 7829 8226
+3 7833 7820 8217
+3 8229 7833 8217
+3 8217 7820 8218
+3 7820 7821 8218
+3 8218 7821 8219
+3 7821 7822 8219
+3 8230 8219 7822
+3 7834 8230 7822
+3 7837 7823 8220
+3 8233 7837 8220
+3 8220 7823 8221
+3 7823 7824 8221
+3 8221 7824 8222
+3 7824 7825 8222
+3 8234 8222 7825
+3 7838 8234 7825
+3 7840 8223 8235
+3 7826 8223 7840
+3 8224 8223 7826
+3 8224 7826 8225
+3 7826 7827 8225
+3 7827 7828 8225
+3 7830 8226 7829
+3 8226 7830 8227
+3 7830 7831 8227
+3 8227 7831 8228
+3 7831 7832 8228
+3 8228 7832 8229
+3 7832 7833 8229
+3 8230 7834 8231
+3 7834 7835 8231
+3 8236 8231 7835
+3 7841 8236 7835
+3 7844 7836 8232
+3 8240 7844 8232
+3 8232 7836 8233
+3 7836 7837 8233
+3 8234 7838 8235
+3 7838 7839 8235
+3 7839 7840 8235
+3 8236 7841 8237
+3 7841 7842 8237
+3 8241 8237 7842
+3 7845 8241 7842
+3 7857 8238 8252
+3 7843 8238 7857
+3 8239 8238 7843
+3 8239 7843 8240
+3 7843 7844 8240
+3 8241 7845 8242
+3 7845 7846 8242
+3 8242 7846 8243
+3 7846 7847 8243
+3 8243 7847 8244
+3 7847 7848 8244
+3 8244 7848 8245
+3 7848 7849 8245
+3 8245 7849 8246
+3 7849 7850 8246
+3 8246 7850 8247
+3 7850 7851 8247
+3 8247 7851 8248
+3 7851 7852 8248
+3 8248 7852 8249
+3 7852 7853 8249
+3 8249 7853 8250
+3 7853 7854 8250
+3 8250 7854 8251
+3 7854 7855 8251
+3 8251 7855 8252
+3 7855 7856 8252
+3 7856 7857 8252
+3 7481 8253 7858
+3 8253 8254 7858
+3 7858 8254 7859
+3 8254 8255 7859
+3 7859 8255 7860
+3 8255 8256 7860
+3 7860 8256 7861
+3 8256 8257 7861
+3 7861 8257 7483
+3 8257 8260 7483
+3 7862 8258 7863
+3 8258 8259 7863
+3 7481 7863 8259
+3 8253 7481 8259
+3 8260 8261 7864
+3 7483 8260 7864
+3 7864 8261 7866
+3 8261 8264 7866
+3 7484 8262 7865
+3 8262 8263 7865
+3 7862 7865 8263
+3 8258 7862 8263
+3 8264 8265 7867
+3 7866 8264 7867
+3 7867 8265 7485
+3 8265 8266 7485
+3 7484 7869 8262
+3 7869 8268 8262
+3 7870 7485 8269
+3 7485 8266 8269
+3 7869 7868 8267
+3 8268 7869 8267
+3 8269 8270 7871
+3 7870 8269 7871
+3 7868 7873 8267
+3 7873 8275 8267
+3 7874 7871 8276
+3 7871 8270 8276
+3 7487 8271 7489
+3 8271 8272 7489
+3 7489 8272 7491
+3 8272 8273 7491
+3 7491 8273 7492
+3 8273 8279 7492
+3 7873 7872 8274
+3 8275 7873 8274
+3 8276 8288 7503
+3 7874 8276 7503
+3 7504 8277 7875
+3 8277 8278 7875
+3 7487 7875 8278
+3 8271 7487 8278
+3 8279 8280 7876
+3 7492 8279 7876
+3 7876 8280 7877
+3 8280 8281 7877
+3 7877 8281 7505
+3 8281 8291 7505
+3 7879 7878 8282
+3 7879 8282 7880
+3 8282 8283 7880
+3 7880 8283 7881
+3 8283 8284 7881
+3 7881 8284 7882
+3 8284 8285 7882
+3 7882 8285 7883
+3 8285 8286 7883
+3 7883 8286 7884
+3 8286 8287 7884
+3 7884 8287 7890
+3 8287 8296 7890
+3 7872 7895 8274
+3 7895 8301 8274
+3 7896 7503 8302
+3 7503 8288 8302
+3 7513 8289 7885
+3 8289 8290 7885
+3 7504 7885 8290
+3 8277 7504 8290
+3 8291 8304 7886
+3 7505 8291 7886
+3 7886 8304 7514
+3 7887 8292 7888
+3 8292 8293 7888
+3 7888 8293 7889
+3 8293 8294 7889
+3 7889 8295 7878
+3 8294 8295 7889
+3 8295 8282 7878
+3 8296 8297 7891
+3 7890 8296 7891
+3 7891 8297 7892
+3 8297 8298 7892
+3 7892 8298 7893
+3 8298 8299 7893
+3 7893 8299 7894
+3 8299 8300 7894
+3 7895 7894 8300
+3 8301 7895 8300
+3 7899 7896 8307
+3 7896 8302 8307
+3 7513 7517 8303
+3 8289 7513 8303
+3 8308 7514 8304
+3 7514 8308 7518
+3 7897 8305 7898
+3 8305 8306 7898
+3 7887 7898 8306
+3 8292 7887 8306
+3 7902 7899 8310
+3 7899 8307 8310
+3 7517 7903 8303
+3 7903 8312 8303
+3 8313 7518 8308
+3 7518 8313 7522
+3 7901 7900 8309
+3 7897 7901 8309
+3 8305 7897 8309
+3 7905 7902 8317
+3 7902 8310 8317
+3 7903 7525 8311
+3 8312 7903 8311
+3 8314 7522 8313
+3 8314 7904 7522
+3 8315 7904 8314
+3 7904 8316 7900
+3 8315 8316 7904
+3 8316 8309 7900
+3 7906 7905 8318
+3 7905 8317 8318
+3 7525 7907 8311
+3 7907 8319 8311
+3 7908 7906 8318
+3 8320 7908 8318
+3 7907 7909 8319
+3 7909 8322 8319
+3 7910 7908 8323
+3 7908 8320 8323
+3 7909 7529 8321
+3 8322 7909 8321
+3 7911 7910 8323
+3 8324 7911 8323
+3 7529 7912 8321
+3 7912 8325 8321
+3 7913 7911 8324
+3 8327 7913 8324
+3 7912 7914 8325
+3 7914 8328 8325
+3 7537 8326 8330
+3 7913 8326 7537
+3 8327 8326 7913
+3 8331 8328 7914
+3 7917 8331 7914
+3 7919 7915 8329
+3 8333 7919 8329
+3 8329 7915 8330
+3 7915 7916 8330
+3 7916 7537 8330
+3 7917 7920 8331
+3 7920 8334 8331
+3 7921 7918 8332
+3 8335 7921 8332
+3 8332 7918 8333
+3 7918 7919 8333
+3 7920 7922 8334
+3 8334 7922 8336
+3 7923 7921 8337
+3 7921 8335 8337
+3 7924 8336 7922
+3 8338 8336 7924
+3 7925 7923 8339
+3 7923 8337 8339
+3 8340 8338 7924
+3 7926 8340 7924
+3 7927 7925 8341
+3 7925 8339 8341
+3 8342 8340 7926
+3 7928 8342 7926
+3 7930 7927 8344
+3 7927 8341 8344
+3 8342 7928 8343
+3 7928 7929 8343
+3 8345 8343 7929
+3 7931 8345 7929
+3 7930 8350 7936
+3 8344 8350 7930
+3 8345 7931 8346
+3 7931 7932 8346
+3 8346 7932 8347
+3 7932 7933 8347
+3 8351 8347 7933
+3 7937 8351 7933
+3 7937 7934 8348
+3 8351 7937 8348
+3 8348 7934 8349
+3 7934 7935 8349
+3 8352 8349 7935
+3 7938 8352 7935
+3 8353 7939 7936
+3 8350 8353 7936
+3 8354 8352 7938
+3 7940 8354 7938
+3 8355 7941 7939
+3 8353 8355 7939
+3 7940 7942 8354
+3 7942 8356 8354
+3 8355 7943 7941
+3 8357 7943 8355
+3 7942 7944 8356
+3 7944 8358 8356
+3 7945 7943 8359
+3 7943 8357 8359
+3 7944 7946 8358
+3 7946 8360 8358
+3 7947 7945 8361
+3 7945 8359 8361
+3 7946 7948 8360
+3 7948 8362 8360
+3 7949 7947 8363
+3 7947 8361 8363
+3 8364 8362 7948
+3 7950 8364 7948
+3 7951 7949 8365
+3 7949 8363 8365
+3 7950 7952 8364
+3 7952 8366 8364
+3 7953 7951 8365
+3 8367 7953 8365
+3 7952 7954 8366
+3 8366 7954 8368
+3 7955 7953 8369
+3 7953 8367 8369
+3 7956 8368 7954
+3 8370 8368 7956
+3 7957 7955 8369
+3 8371 7957 8369
+3 7956 7958 8370
+3 8370 7958 8372
+3 7959 7957 8373
+3 7957 8371 8373
+3 7964 8372 7958
+3 8377 8372 7964
+3 7965 7959 8373
+3 8378 7965 8373
+3 7590 8374 7960
+3 8374 8375 7960
+3 7960 8375 7961
+3 8375 8376 7961
+3 7961 8376 7967
+3 8376 8380 7967
+3 8384 8377 7964
+3 7972 8384 7964
+3 7973 7965 8378
+3 8385 7973 8378
+3 8379 7966 7976
+3 7590 7966 8379
+3 8374 7590 8379
+3 8380 8387 7977
+3 7967 8380 7977
+3 7968 8382 7962
+3 8381 8382 7968
+3 8383 7963 7962
+3 8382 8383 7962
+3 8388 7969 7963
+3 8383 8388 7963
+3 7969 8388 7970
+3 8392 8384 7972
+3 7982 8392 7972
+3 7983 7973 8385
+3 8393 7983 8385
+3 7975 8386 7976
+3 7974 8386 7975
+3 7975 7976 7966
+3 7977 8396 7986
+3 8387 8396 7977
+3 8398 7968 7978
+3 8381 7968 8398
+3 8389 7970 8388
+3 8390 7971 7970
+3 8389 8390 7970
+3 8391 7979 7971
+3 8390 8391 7971
+3 8391 7980 7979
+3 8402 7980 8391
+3 7980 8402 7981
+3 8405 8392 7982
+3 7992 8405 7982
+3 7993 7983 8393
+3 8406 7993 8393
+3 8394 7984 7997
+3 7984 8394 7985
+3 8394 8395 7985
+3 7974 7985 8395
+3 8386 7974 8395
+3 8409 7986 8396
+3 7998 7986 8409
+3 8000 8397 7978
+3 8397 8398 7978
+3 8403 7981 8402
+3 8404 7987 7981
+3 8403 8404 7981
+3 8404 7988 7987
+3 8412 7988 8404
+3 7988 8412 7989
+3 8418 7992 7991
+3 8405 7992 8418
+3 8005 7993 8419
+3 7993 8406 8419
+3 7994 8407 7995
+3 8407 8408 7995
+3 7996 8408 7997
+3 7995 8408 7996
+3 7996 7997 7984
+3 8409 8422 8008
+3 7998 8409 8008
+3 8423 8000 7999
+3 8397 8000 8423
+3 8413 7989 8412
+3 8414 7990 7989
+3 8413 8414 7989
+3 8415 8001 7990
+3 8414 8415 7990
+3 8415 8002 8001
+3 8416 8002 8415
+3 8002 8416 8003
+3 8416 8426 8003
+3 8003 8426 8004
+3 8017 8417 7991
+3 8417 8418 7991
+3 8018 8005 8432
+3 8005 8419 8432
+3 8006 8420 8007
+3 8420 8421 8007
+3 7994 8007 8421
+3 8407 7994 8421
+3 8422 8436 8022
+3 8008 8422 8022
+3 8423 7999 8023
+3 8437 8423 8023
+3 8427 8004 8426
+3 8428 8009 8004
+3 8427 8428 8004
+3 8428 8010 8009
+3 8429 8010 8428
+3 8010 8429 8011
+3 8429 8440 8011
+3 8011 8440 8012
+3 8015 8014 8430
+3 8015 8430 8016
+3 8430 8431 8016
+3 8017 8016 8431
+3 8417 8017 8431
+3 8432 8433 8019
+3 8018 8432 8019
+3 8019 8433 8024
+3 8433 8444 8024
+3 8020 8434 8021
+3 8434 8435 8021
+3 8006 8021 8435
+3 8420 8006 8435
+3 8028 8022 8448
+3 8022 8436 8448
+3 8023 8030 8437
+3 8029 8030 8023
+3 8437 8030 8449
+3 8441 8012 8440
+3 8442 8013 8012
+3 8441 8442 8012
+3 8443 8014 8013
+3 8442 8443 8013
+3 8443 8430 8014
+3 8444 8445 8025
+3 8024 8444 8025
+3 8025 8445 8026
+3 8445 8446 8026
+3 8026 8446 8027
+3 8446 8447 8027
+3 8020 8027 8447
+3 8434 8020 8447
+3 8448 8451 8031
+3 8028 8448 8031
+3 8029 8032 8030
+3 8032 8033 8030
+3 8030 8034 8449
+3 8033 8034 8030
+3 8035 8450 8449
+3 8034 8035 8449
+3 8450 8035 8452
+3 8451 8454 8036
+3 8031 8451 8036
+3 8035 8034 8037
+3 8035 8038 8452
+3 8037 8038 8035
+3 8452 8038 8455
+3 8039 8036 8458
+3 8036 8454 8458
+3 8455 8038 8040
+3 8041 8456 8455
+3 8040 8041 8455
+3 8456 8041 8459
+3 8458 8462 8042
+3 8039 8458 8042
+3 8459 8041 8043
+3 8044 8460 8459
+3 8043 8044 8459
+3 8460 8044 8463
+3 8045 8042 8466
+3 8042 8462 8466
+3 8463 8044 8046
+3 8047 8464 8463
+3 8046 8047 8463
+3 8464 8047 8467
+3 8048 8045 8470
+3 8045 8466 8470
+3 8047 8046 8049
+3 8047 8050 8467
+3 8049 8050 8047
+3 8051 8468 8467
+3 8050 8051 8467
+3 8468 8051 8471
+3 8053 8470 8475
+3 8048 8470 8053
+3 8051 8050 8054
+3 8051 8055 8471
+3 8054 8055 8051
+3 8471 8055 8476
+3 8058 8473 8483
+3 8059 8474 8473
+3 8058 8059 8473
+3 8052 8474 8059
+3 8475 8474 8052
+3 8052 8053 8475
+3 8055 8054 8060
+3 8055 8061 8476
+3 8060 8061 8055
+3 8062 8477 8476
+3 8061 8062 8476
+3 8477 8062 8484
+3 8064 8479 8486
+3 8065 8480 8479
+3 8064 8065 8479
+3 8066 8481 8480
+3 8065 8066 8480
+3 8056 8481 8066
+3 8482 8481 8056
+3 8482 8056 8483
+3 8056 8057 8483
+3 8057 8058 8483
+3 8062 8061 8067
+3 8484 8062 8067
+3 8487 8484 8067
+3 8069 8485 8489
+3 8063 8485 8069
+3 8486 8485 8063
+3 8063 8064 8486
+3 8487 8067 8070
+3 8487 8070 8491
+3 8072 8488 8493
+3 8068 8488 8072
+3 8489 8488 8068
+3 8068 8069 8489
+3 8073 8490 8070
+3 8490 8491 8070
+3 8075 8492 8495
+3 8071 8492 8075
+3 8493 8492 8071
+3 8071 8072 8493
+3 8073 8076 8490
+3 8076 8496 8490
+3 8077 8074 8495
+3 8497 8077 8495
+3 8074 8075 8495
+3 8076 8079 8496
+3 8079 8499 8496
+3 8080 8497 8500
+3 8077 8497 8080
+3 8079 8078 8498
+3 8499 8079 8498
+3 8501 8080 8500
+3 8081 8080 8501
+3 8078 8082 8498
+3 8082 8502 8498
+3 8083 8081 8503
+3 8081 8501 8503
+3 8082 8085 8502
+3 8085 8504 8502
+3 8086 8083 8505
+3 8083 8503 8505
+3 8507 8085 8084
+3 8504 8085 8507
+3 8087 8086 8508
+3 8086 8505 8508
+3 8088 8506 8084
+3 8506 8507 8084
+3 8508 8509 8089
+3 8087 8508 8089
+3 8088 8090 8506
+3 8090 8510 8506
+3 8091 8089 8511
+3 8089 8509 8511
+3 8090 8092 8510
+3 8092 8512 8510
+3 8093 8091 8513
+3 8091 8511 8513
+3 8092 8094 8512
+3 8094 8514 8512
+3 8095 8093 8515
+3 8093 8513 8515
+3 8094 8096 8514
+3 8096 8516 8514
+3 8097 8095 8517
+3 8095 8515 8517
+3 8096 8098 8516
+3 8098 8518 8516
+3 8099 8097 8519
+3 8097 8517 8519
+3 8098 8101 8518
+3 8101 8520 8518
+3 8102 8099 8521
+3 8099 8519 8521
+3 8522 8101 8100
+3 8520 8101 8522
+3 8103 8102 8523
+3 8102 8521 8523
+3 8522 8100 8104
+3 8524 8522 8104
+3 8105 8103 8525
+3 8103 8523 8525
+3 8524 8104 8106
+3 8526 8524 8106
+3 8107 8105 8527
+3 8105 8525 8527
+3 8526 8106 8108
+3 8528 8526 8108
+3 8109 8107 8529
+3 8107 8527 8529
+3 8110 8528 8108
+3 8530 8528 8110
+3 8111 8109 8531
+3 8109 8529 8531
+3 8110 8112 8530
+3 8112 8532 8530
+3 8113 8111 8533
+3 8111 8531 8533
+3 8112 8114 8532
+3 8114 8534 8532
+3 8115 8113 8535
+3 8113 8533 8535
+3 8114 8116 8534
+3 8116 8536 8534
+3 8117 8115 8537
+3 8115 8535 8537
+3 8116 8122 8536
+3 8122 8541 8536
+3 8123 8117 8542
+3 8117 8537 8542
+3 8118 8538 8119
+3 8538 8539 8119
+3 8119 8539 8120
+3 8539 8540 8120
+3 8120 8540 8121
+3 8540 8543 8121
+3 8121 8543 8124
+3 8122 8125 8541
+3 8125 8545 8541
+3 8126 8123 8546
+3 8123 8542 8546
+3 8118 8127 8538
+3 8127 8547 8538
+3 8544 8124 8543
+3 8544 8128 8124
+3 8548 8128 8544
+3 8125 8130 8545
+3 8130 8550 8545
+3 8131 8126 8546
+3 8551 8131 8546
+3 8127 8134 8547
+3 8134 8553 8547
+3 8548 8549 8129
+3 8128 8548 8129
+3 8129 8549 8135
+3 8549 8554 8135
+3 8555 8550 8130
+3 8138 8555 8130
+3 8139 8131 8556
+3 8131 8551 8556
+3 8134 8133 8552
+3 8553 8134 8552
+3 8554 8557 8136
+3 8135 8554 8136
+3 8136 8557 8144
+3 8561 8138 8137
+3 8555 8138 8561
+3 8146 8139 8562
+3 8139 8556 8562
+3 8149 8132 8142
+3 8132 8149 8143
+3 8149 8150 8143
+3 8150 8151 8143
+3 8133 8152 8552
+3 8152 8565 8552
+3 8558 8144 8557
+3 8558 8145 8144
+3 8559 8145 8558
+3 8145 8560 8137
+3 8559 8560 8145
+3 8560 8561 8137
+3 8153 8146 8566
+3 8146 8562 8566
+3 8158 8140 8148
+3 8140 8158 8141
+3 8158 8159 8141
+3 8142 8159 8563
+3 8141 8159 8142
+3 8564 8149 8142
+3 8563 8564 8142
+3 8571 8150 8149
+3 8564 8571 8149
+3 8160 8150 8571
+3 8151 8150 8160
+3 8160 8161 8151
+3 8152 8163 8565
+3 8163 8573 8565
+3 8153 8574 8154
+3 8566 8574 8153
+3 8147 8157 8567
+3 8568 8148 8147
+3 8567 8568 8147
+3 8569 8158 8148
+3 8568 8569 8148
+3 8570 8159 8158
+3 8569 8570 8158
+3 8570 8563 8159
+3 8582 8160 8571
+3 8164 8160 8582
+3 8161 8160 8164
+3 8163 8162 8572
+3 8573 8163 8572
+3 8575 8154 8574
+3 8576 8155 8154
+3 8575 8576 8154
+3 8577 8156 8155
+3 8576 8577 8155
+3 8578 8157 8156
+3 8577 8578 8156
+3 8578 8567 8157
+3 8592 8164 8582
+3 8164 8592 8165
+3 8162 8166 8572
+3 8166 8593 8572
+3 8167 8592 8602
+3 8167 8165 8592
+3 8168 8165 8167
+3 8166 8170 8593
+3 8170 8604 8593
+3 8609 8171 8167
+3 8602 8609 8167
+3 8167 8171 8168
+3 8171 8172 8168
+3 8170 8169 8603
+3 8604 8170 8603
+3 8173 8609 8613
+3 8173 8171 8609
+3 8174 8171 8173
+3 8171 8174 8172
+3 8169 8175 8603
+3 8175 8614 8603
+3 8176 8613 8617
+3 8613 8176 8173
+3 8175 8178 8614
+3 8178 8619 8614
+3 8180 8617 8622
+3 8617 8180 8176
+3 8178 8177 8618
+3 8619 8178 8618
+3 8182 8621 8624
+3 8179 8621 8182
+3 8622 8621 8179
+3 8179 8180 8622
+3 8177 8183 8618
+3 8183 8625 8618
+3 8185 8623 8627
+3 8181 8623 8185
+3 8624 8623 8181
+3 8181 8182 8624
+3 8183 8186 8625
+3 8186 8628 8625
+3 8188 8626 8637
+3 8184 8626 8188
+3 8627 8626 8184
+3 8184 8185 8627
+3 8629 8186 8189
+3 8628 8186 8629
+3 8190 8630 8629
+3 8189 8190 8629
+3 8191 8631 8630
+3 8190 8191 8630
+3 8192 8632 8631
+3 8191 8192 8631
+3 8187 8632 8192
+3 8633 8632 8187
+3 8634 8187 8193
+3 8633 8187 8634
+3 8194 8635 8634
+3 8193 8194 8634
+3 8195 8636 8635
+3 8194 8195 8635
+3 8636 8195 8638
+3 8198 8637 8641
+3 8637 8198 8188
+3 8196 8638 8195
+3 8639 8196 8199
+3 8638 8196 8639
+3 8639 8199 8642
+3 8202 8640 8645
+3 8197 8640 8202
+3 8641 8640 8197
+3 8197 8198 8641
+3 8200 8642 8199
+3 8643 8200 8203
+3 8642 8200 8643
+3 8643 8203 8646
+3 8206 8644 8649
+3 8201 8644 8206
+3 8645 8644 8201
+3 8201 8202 8645
+3 8204 8646 8203
+3 8646 8204 8647
+3 8204 8205 8647
+3 8648 8205 8207
+3 8647 8205 8648
+3 8648 8207 8650
+3 8210 8649 8653
+3 8649 8210 8206
+3 8208 8650 8207
+3 8651 8208 8211
+3 8650 8208 8651
+3 8651 8211 8654
+3 8213 8652 8656
+3 8209 8652 8213
+3 8653 8652 8209
+3 8209 8210 8653
+3 8212 8654 8211
+3 8655 8212 8214
+3 8654 8212 8655
+3 8655 8214 8657
+3 8225 8656 8670
+3 8656 8225 8213
+3 8215 8657 8214
+3 8657 8215 8658
+3 8215 8216 8658
+3 8659 8216 8226
+3 8658 8216 8659
+3 8659 8226 8671
+3 8229 8660 8672
+3 8217 8660 8229
+3 8661 8660 8217
+3 8661 8217 8662
+3 8217 8218 8662
+3 8662 8218 8663
+3 8218 8219 8663
+3 8673 8663 8219
+3 8230 8673 8219
+3 8233 8220 8664
+3 8676 8233 8664
+3 8664 8220 8665
+3 8220 8221 8665
+3 8665 8221 8666
+3 8221 8222 8666
+3 8667 8222 8234
+3 8666 8222 8667
+3 8235 8668 8667
+3 8234 8235 8667
+3 8223 8668 8235
+3 8669 8668 8223
+3 8669 8223 8670
+3 8223 8224 8670
+3 8224 8225 8670
+3 8227 8671 8226
+3 8671 8227 8672
+3 8227 8228 8672
+3 8228 8229 8672
+3 8673 8230 8674
+3 8230 8231 8674
+3 8677 8674 8231
+3 8236 8677 8231
+3 8240 8232 8675
+3 8682 8240 8675
+3 8675 8232 8676
+3 8232 8233 8676
+3 8677 8236 8678
+3 8236 8237 8678
+3 8679 8237 8241
+3 8678 8237 8679
+3 8679 8241 8683
+3 8252 8238 8680
+3 8693 8252 8680
+3 8680 8238 8681
+3 8238 8239 8681
+3 8681 8239 8682
+3 8239 8240 8682
+3 8242 8683 8241
+3 8683 8242 8684
+3 8242 8243 8684
+3 8684 8243 8685
+3 8243 8244 8685
+3 8685 8244 8686
+3 8244 8245 8686
+3 8686 8245 8687
+3 8245 8246 8687
+3 8687 8246 8688
+3 8246 8247 8688
+3 8688 8247 8689
+3 8247 8248 8689
+3 8689 8248 8690
+3 8248 8249 8690
+3 8690 8249 8691
+3 8249 8250 8691
+3 8691 8250 8692
+3 8250 8251 8692
+3 8692 8251 8693
+3 8251 8252 8693
+3 8259 8258 8694
+3 8259 8695 8253
+3 8694 8695 8259
+3 8696 8254 8253
+3 8695 8696 8253
+3 8697 8255 8254
+3 8696 8697 8254
+3 8698 8256 8255
+3 8697 8698 8255
+3 8699 8257 8256
+3 8698 8699 8256
+3 8700 8260 8257
+3 8699 8700 8257
+3 8700 8261 8260
+3 8703 8261 8700
+3 8261 8703 8264
+3 8263 8262 8701
+3 8263 8702 8258
+3 8701 8702 8263
+3 8702 8694 8258
+3 8704 8264 8703
+3 8704 8265 8264
+3 8710 8265 8704
+3 8265 8710 8266
+3 8268 8705 8262
+3 8705 8701 8262
+3 8715 8266 8710
+3 8269 8266 8715
+3 8717 8268 8267
+3 8705 8268 8717
+3 8269 8720 8270
+3 8715 8720 8269
+3 8275 8716 8267
+3 8716 8717 8267
+3 8723 8270 8720
+3 8276 8270 8723
+3 8733 8275 8274
+3 8716 8275 8733
+3 8276 8735 8288
+3 8723 8735 8276
+3 8278 8277 8724
+3 8278 8725 8271
+3 8724 8725 8278
+3 8726 8272 8271
+3 8725 8726 8271
+3 8727 8273 8272
+3 8726 8727 8272
+3 8728 8279 8273
+3 8727 8728 8273
+3 8728 8280 8279
+3 8738 8280 8728
+3 8280 8738 8281
+3 8283 8282 8729
+3 8283 8729 8284
+3 8729 8730 8284
+3 8284 8730 8285
+3 8730 8731 8285
+3 8285 8731 8286
+3 8731 8745 8286
+3 8286 8745 8287
+3 8301 8732 8274
+3 8732 8733 8274
+3 8753 8302 8288
+3 8735 8753 8288
+3 8290 8289 8736
+3 8290 8737 8277
+3 8736 8737 8290
+3 8737 8724 8277
+3 8739 8281 8738
+3 8740 8291 8281
+3 8739 8740 8281
+3 8740 8304 8291
+3 8760 8304 8740
+3 8293 8292 8741
+3 8293 8741 8294
+3 8741 8742 8294
+3 8294 8742 8295
+3 8742 8743 8295
+3 8295 8744 8282
+3 8743 8744 8295
+3 8744 8729 8282
+3 8746 8287 8745
+3 8747 8296 8287
+3 8746 8747 8287
+3 8747 8297 8296
+3 8748 8297 8747
+3 8297 8748 8298
+3 8748 8749 8298
+3 8298 8749 8299
+3 8749 8750 8299
+3 8299 8750 8300
+3 8750 8751 8300
+3 8301 8300 8751
+3 8732 8301 8751
+3 8765 8307 8302
+3 8753 8765 8302
+3 8289 8303 8754
+3 8754 8736 8289
+3 8760 8771 8308
+3 8304 8760 8308
+3 8306 8305 8761
+3 8306 8762 8292
+3 8761 8762 8306
+3 8762 8741 8292
+3 8774 8310 8307
+3 8765 8774 8307
+3 8312 8766 8303
+3 8766 8754 8303
+3 8771 8778 8313
+3 8308 8771 8313
+3 8309 8773 8305
+3 8772 8773 8309
+3 8773 8761 8305
+3 8782 8317 8310
+3 8774 8782 8310
+3 8784 8312 8311
+3 8766 8312 8784
+3 8778 8779 8314
+3 8313 8778 8314
+3 8314 8779 8315
+3 8779 8780 8315
+3 8315 8780 8316
+3 8780 8781 8316
+3 8309 8316 8781
+3 8772 8309 8781
+3 8789 8318 8317
+3 8782 8789 8317
+3 8319 8783 8311
+3 8783 8784 8311
+3 8789 8320 8318
+3 8793 8320 8789
+3 8319 8322 8783
+3 8322 8794 8783
+3 8323 8793 8797
+3 8320 8793 8323
+3 8798 8322 8321
+3 8794 8322 8798
+3 8324 8797 8801
+3 8797 8324 8323
+3 8798 8321 8325
+3 8802 8798 8325
+3 8327 8801 8806
+3 8801 8327 8324
+3 8802 8325 8328
+3 8807 8802 8328
+3 8330 8805 8812
+3 8326 8805 8330
+3 8806 8805 8326
+3 8326 8327 8806
+3 8331 8807 8328
+3 8813 8807 8331
+3 8333 8811 8816
+3 8329 8811 8333
+3 8812 8811 8329
+3 8329 8330 8812
+3 8331 8334 8813
+3 8813 8334 8817
+3 8335 8332 8816
+3 8819 8335 8816
+3 8332 8333 8816
+3 8336 8817 8334
+3 8820 8817 8336
+3 8337 8335 8822
+3 8335 8819 8822
+3 8336 8338 8820
+3 8820 8338 8823
+3 8339 8337 8825
+3 8337 8822 8825
+3 8340 8823 8338
+3 8826 8823 8340
+3 8341 8339 8830
+3 8339 8825 8830
+3 8827 8340 8342
+3 8826 8340 8827
+3 8827 8342 8831
+3 8344 8341 8838
+3 8341 8830 8838
+3 8343 8831 8342
+3 8832 8343 8345
+3 8831 8343 8832
+3 8832 8345 8839
+3 8350 8344 8845
+3 8344 8838 8845
+3 8346 8839 8345
+3 8839 8346 8840
+3 8346 8347 8840
+3 8841 8347 8351
+3 8840 8347 8841
+3 8348 8841 8351
+3 8842 8841 8348
+3 8842 8348 8843
+3 8348 8349 8843
+3 8844 8349 8352
+3 8843 8349 8844
+3 8844 8352 8846
+3 8353 8350 8847
+3 8350 8845 8847
+3 8354 8846 8352
+3 8848 8846 8354
+3 8355 8353 8849
+3 8353 8847 8849
+3 8354 8356 8848
+3 8356 8850 8848
+3 8357 8355 8851
+3 8355 8849 8851
+3 8356 8358 8850
+3 8358 8852 8850
+3 8359 8357 8853
+3 8357 8851 8853
+3 8358 8360 8852
+3 8360 8854 8852
+3 8361 8359 8855
+3 8359 8853 8855
+3 8360 8362 8854
+3 8854 8362 8856
+3 8363 8361 8857
+3 8361 8855 8857
+3 8364 8856 8362
+3 8858 8856 8364
+3 8365 8857 8859
+3 8363 8857 8365
+3 8364 8366 8858
+3 8366 8860 8858
+3 8859 8367 8365
+3 8861 8367 8859
+3 8862 8860 8366
+3 8368 8862 8366
+3 8369 8861 8863
+3 8367 8861 8369
+3 8368 8370 8862
+3 8370 8864 8862
+3 8863 8371 8369
+3 8865 8371 8863
+3 8866 8864 8370
+3 8372 8866 8370
+3 8373 8865 8867
+3 8371 8865 8373
+3 8372 8377 8866
+3 8866 8377 8871
+3 8867 8378 8373
+3 8872 8378 8867
+3 8374 8868 8375
+3 8868 8869 8375
+3 8375 8869 8376
+3 8869 8870 8376
+3 8376 8870 8380
+3 8870 8875 8380
+3 8871 8377 8384
+3 8871 8384 8876
+3 8385 8378 8872
+3 8877 8385 8872
+3 7976 8873 8379
+3 8873 8874 8379
+3 8374 8379 8874
+3 8868 8374 8874
+3 8875 8879 8387
+3 8380 8875 8387
+3 8392 8876 8384
+3 8880 8876 8392
+3 8393 8385 8877
+3 8881 8393 8877
+3 7976 8386 8878
+3 8873 7976 8878
+3 8396 8387 8884
+3 8387 8879 8884
+3 8381 8398 8382
+3 8398 8399 8382
+3 8382 8399 8383
+3 8399 8400 8383
+3 8383 8400 8388
+3 8400 8401 8388
+3 8401 8389 8388
+3 8890 8880 8392
+3 8405 8890 8392
+3 8406 8393 8881
+3 8891 8406 8881
+3 8394 7997 8882
+3 8394 8882 8395
+3 8882 8883 8395
+3 8386 8395 8883
+3 8878 8386 8883
+3 8884 8894 8409
+3 8396 8884 8409
+3 8410 8398 8397
+3 8399 8410 8885
+3 8398 8410 8399
+3 8886 8400 8399
+3 8885 8886 8399
+3 8887 8401 8400
+3 8886 8887 8400
+3 8888 8389 8401
+3 8887 8888 8401
+3 8889 8390 8389
+3 8888 8889 8389
+3 8895 8391 8390
+3 8889 8895 8390
+3 8411 8391 8895
+3 8402 8391 8411
+3 8411 8403 8402
+3 8405 8418 8890
+3 8418 8899 8890
+3 8419 8891 8900
+3 8406 8891 8419
+3 8408 8407 8892
+3 8408 8893 7997
+3 8892 8893 8408
+3 8893 8882 7997
+3 8894 8904 8422
+3 8409 8894 8422
+3 8397 8423 8410
+3 8423 8424 8410
+3 8885 8410 8424
+3 8905 8885 8424
+3 8896 8411 8895
+3 8897 8403 8411
+3 8896 8897 8411
+3 8911 8404 8403
+3 8897 8911 8403
+3 8425 8404 8911
+3 8412 8404 8425
+3 8425 8413 8412
+3 8418 8417 8898
+3 8899 8418 8898
+3 8917 8419 8900
+3 8432 8419 8917
+3 8420 8901 8421
+3 8901 8902 8421
+3 8421 8903 8407
+3 8902 8903 8421
+3 8903 8892 8407
+3 8904 8920 8436
+3 8422 8904 8436
+3 8423 8437 8424
+3 8437 8438 8424
+3 8905 8424 8438
+3 8921 8905 8438
+3 8912 8425 8911
+3 8913 8413 8425
+3 8912 8913 8425
+3 8914 8414 8413
+3 8913 8914 8413
+3 8915 8415 8414
+3 8914 8915 8414
+3 8930 8416 8415
+3 8915 8930 8415
+3 8439 8416 8930
+3 8426 8416 8439
+3 8439 8427 8426
+3 8431 8430 8916
+3 8417 8431 8916
+3 8898 8417 8916
+3 8917 8940 8433
+3 8432 8917 8433
+3 8433 8940 8444
+3 8434 8918 8435
+3 8918 8919 8435
+3 8420 8435 8919
+3 8901 8420 8919
+3 8448 8436 8945
+3 8436 8920 8945
+3 8438 8437 8449
+3 8438 8450 8921
+3 8449 8450 8438
+3 8921 8450 8946
+3 8931 8439 8930
+3 8932 8427 8439
+3 8931 8932 8439
+3 8933 8428 8427
+3 8932 8933 8427
+3 8934 8429 8428
+3 8933 8934 8428
+3 8935 8440 8429
+3 8934 8935 8429
+3 8935 8441 8440
+3 8936 8441 8935
+3 8441 8936 8442
+3 8936 8937 8442
+3 8442 8937 8443
+3 8937 8938 8443
+3 8443 8939 8430
+3 8938 8939 8443
+3 8939 8916 8430
+3 8941 8444 8940
+3 8941 8445 8444
+3 8942 8445 8941
+3 8445 8942 8446
+3 8942 8943 8446
+3 8446 8943 8447
+3 8943 8944 8447
+3 8434 8447 8944
+3 8918 8434 8944
+3 8945 8959 8451
+3 8448 8945 8451
+3 8946 8450 8452
+3 8453 8947 8946
+3 8452 8453 8946
+3 8947 8453 8960
+3 8451 8977 8454
+3 8959 8977 8451
+3 8453 8452 8455
+3 8453 8456 8960
+3 8455 8456 8453
+3 8457 8961 8960
+3 8456 8457 8960
+3 8961 8457 8978
+3 8985 8454 8977
+3 8458 8454 8985
+3 8457 8456 8459
+3 8457 8460 8978
+3 8459 8460 8457
+3 8461 8979 8978
+3 8460 8461 8978
+3 8979 8461 8986
+3 8985 8991 8462
+3 8458 8985 8462
+3 8461 8460 8463
+3 8461 8464 8986
+3 8463 8464 8461
+3 8465 8987 8986
+3 8464 8465 8986
+3 8987 8465 8992
+3 8466 8462 8996
+3 8462 8991 8996
+3 8465 8464 8467
+3 8465 8468 8992
+3 8467 8468 8465
+3 8469 8993 8992
+3 8468 8469 8992
+3 8993 8469 8997
+3 8470 8466 9001
+3 8466 8996 9001
+3 8469 8468 8471
+3 8469 8472 8997
+3 8471 8472 8469
+3 8997 8472 9002
+3 8475 9000 9011
+3 8470 9000 8475
+3 9001 9000 8470
+3 8472 8471 8476
+3 8472 8477 9002
+3 8476 8477 8472
+3 8478 9003 9002
+3 8477 8478 9002
+3 9003 8478 9012
+3 8479 9005 9014
+3 8480 9006 9005
+3 8479 8480 9005
+3 8481 9007 9006
+3 8480 8481 9006
+3 8482 9008 9007
+3 8481 8482 9007
+3 8483 9009 9008
+3 8482 8483 9008
+3 8473 9009 8483
+3 9010 9009 8473
+3 9010 8473 9011
+3 8473 8474 9011
+3 8474 8475 9011
+3 8478 8477 8484
+3 9012 8478 8484
+3 9015 9012 8484
+3 8485 9013 9017
+3 8486 9014 9013
+3 8485 8486 9013
+3 9014 8486 8479
+3 9015 8484 8487
+3 9018 9015 8487
+3 8488 9016 9021
+3 8489 9017 9016
+3 8488 8489 9016
+3 9017 8489 8485
+3 8491 9018 8487
+3 9022 9018 8491
+3 8492 9020 9024
+3 8493 9021 9020
+3 8492 8493 9020
+3 9021 8493 8488
+3 9026 8491 8490
+3 9022 8491 9026
+3 8494 9023 9027
+3 8495 9024 9023
+3 8494 8495 9023
+3 9024 8495 8492
+3 8496 9025 8490
+3 9025 9026 8490
+3 9028 8497 8494
+3 9027 9028 8494
+3 8494 8497 8495
+3 8496 8499 9025
+3 8499 9029 9025
+3 9028 8500 8497
+3 9030 8500 9028
+3 9032 8499 8498
+3 9029 8499 9032
+3 8500 9033 8501
+3 9030 9033 8500
+3 8502 9031 8498
+3 9031 9032 8498
+3 9034 8501 9033
+3 8503 8501 9034
+3 8502 8504 9031
+3 8504 9035 9031
+3 8505 8503 9036
+3 8503 9034 9036
+3 8504 8507 9035
+3 8507 9037 9035
+3 8508 8505 9038
+3 8505 9036 9038
+3 9040 8507 8506
+3 9037 8507 9040
+3 8508 9041 8509
+3 9038 9041 8508
+3 8510 9039 8506
+3 9039 9040 8506
+3 9042 8509 9041
+3 8511 8509 9042
+3 8510 8512 9039
+3 8512 9043 9039
+3 8513 8511 9044
+3 8511 9042 9044
+3 8512 8514 9043
+3 8514 9045 9043
+3 8515 8513 9046
+3 8513 9044 9046
+3 8514 8516 9045
+3 8516 9047 9045
+3 8517 8515 9048
+3 8515 9046 9048
+3 8516 8518 9047
+3 8518 9049 9047
+3 8519 8517 9050
+3 8517 9048 9050
+3 8518 8520 9049
+3 8520 9051 9049
+3 8521 8519 9052
+3 8519 9050 9052
+3 8520 8522 9051
+3 8522 9053 9051
+3 8523 8521 9054
+3 8521 9052 9054
+3 8522 8524 9053
+3 8524 9055 9053
+3 8525 8523 9056
+3 8523 9054 9056
+3 8524 8526 9055
+3 8526 9057 9055
+3 8527 8525 9058
+3 8525 9056 9058
+3 8526 8528 9057
+3 8528 9059 9057
+3 8529 8527 9060
+3 8527 9058 9060
+3 8528 8530 9059
+3 8530 9061 9059
+3 8531 8529 9062
+3 8529 9060 9062
+3 8530 8532 9061
+3 8532 9063 9061
+3 8533 8531 9064
+3 8531 9062 9064
+3 8532 8534 9063
+3 8534 9065 9063
+3 8535 8533 9066
+3 8533 9064 9066
+3 8534 8536 9065
+3 8536 9067 9065
+3 8537 8535 9068
+3 8535 9066 9068
+3 8536 8541 9067
+3 8541 9071 9067
+3 8542 8537 9072
+3 8537 9068 9072
+3 8539 8538 9069
+3 8539 9069 8540
+3 9069 9070 8540
+3 8540 9070 8543
+3 9070 9074 8543
+3 8541 8545 9071
+3 8545 9075 9071
+3 8546 9072 9076
+3 8542 9072 8546
+3 8547 9073 8538
+3 9073 9069 8538
+3 9074 9077 8544
+3 8543 9074 8544
+3 8544 9077 8548
+3 8545 8550 9075
+3 9075 8550 9079
+3 9076 8551 8546
+3 9080 8551 9076
+3 8547 8553 9073
+3 8553 9082 9073
+3 9078 8548 9077
+3 9078 8549 8548
+3 9083 8549 9078
+3 8549 9083 8554
+3 8555 9079 8550
+3 9085 9079 8555
+3 8556 8551 9086
+3 8551 9080 9086
+3 8553 8552 9081
+3 9082 8553 9081
+3 9084 8554 9083
+3 9084 8557 8554
+3 9087 8557 9084
+3 8555 8561 9085
+3 8561 9091 9085
+3 8562 8556 9092
+3 8556 9086 9092
+3 8552 8565 9081
+3 8565 9093 9081
+3 9087 9088 8558
+3 8557 9087 8558
+3 8558 9088 8559
+3 9088 9089 8559
+3 8559 9089 8560
+3 9089 9090 8560
+3 8561 8560 9090
+3 9091 8561 9090
+3 8566 8562 9094
+3 8562 9092 9094
+3 8565 8573 9093
+3 8573 9096 9093
+3 8574 9094 9097
+3 8566 9094 8574
+3 8579 8563 8570
+3 8563 8579 8564
+3 8579 8580 8564
+3 8564 8580 8571
+3 8580 8581 8571
+3 8581 8582 8571
+3 8573 8572 9095
+3 9096 8573 9095
+3 9098 8583 8574
+3 9097 9098 8574
+3 8583 8575 8574
+3 8584 8567 8578
+3 8567 8584 8568
+3 8584 8585 8568
+3 8568 8585 8569
+3 8585 8586 8569
+3 8569 8586 8570
+3 8586 8587 8570
+3 8570 8587 8579
+3 8587 8588 8579
+3 8579 8588 8580
+3 8588 8589 8580
+3 8580 8589 8581
+3 8589 8590 8581
+3 8581 8590 8582
+3 8590 8591 8582
+3 8591 8592 8582
+3 8572 8593 9095
+3 8593 9101 9095
+3 9103 8583 9098
+3 8594 8583 9103
+3 8575 8583 8594
+3 8575 8594 8576
+3 8594 8595 8576
+3 8576 8595 8577
+3 8595 8596 8577
+3 8578 8596 9099
+3 8577 8596 8578
+3 9100 8584 8578
+3 9099 9100 8578
+3 9107 8585 8584
+3 9100 9107 8584
+3 8597 8585 9107
+3 8586 8585 8597
+3 8586 8597 8587
+3 8597 8598 8587
+3 8587 8598 8588
+3 8598 8599 8588
+3 8588 8599 8589
+3 8599 8600 8589
+3 8589 8600 8590
+3 8600 8601 8590
+3 8590 8601 8591
+3 8601 8602 8591
+3 8591 8602 8592
+3 8593 8604 9101
+3 8604 9109 9101
+3 9104 8594 9103
+3 9105 8595 8594
+3 9104 9105 8594
+3 9106 8596 8595
+3 9105 9106 8595
+3 9106 9099 8596
+3 9115 8597 9107
+3 8605 8597 9115
+3 8598 8597 8605
+3 8598 8605 8599
+3 8605 8606 8599
+3 8599 8606 8600
+3 8606 8607 8600
+3 8600 8607 8601
+3 8607 8608 8601
+3 8601 8608 8602
+3 8608 8609 8602
+3 8604 8603 9108
+3 9109 8604 9108
+3 9123 8610 8605
+3 9115 9123 8605
+3 8605 8610 8606
+3 8610 8611 8606
+3 8606 8611 8607
+3 8611 8612 8607
+3 8607 8612 8608
+3 8612 8613 8608
+3 8608 8613 8609
+3 8603 8614 9108
+3 8614 9124 9108
+3 9131 8615 8610
+3 9123 9131 8610
+3 8610 8615 8611
+3 8615 8616 8611
+3 8611 8616 8612
+3 8616 8617 8612
+3 8612 8617 8613
+3 8614 8619 9124
+3 8619 9133 9124
+3 8620 9131 9138
+3 8620 8615 9131
+3 8621 8615 8620
+3 8615 8621 8616
+3 8621 8622 8616
+3 8616 8622 8617
+3 8619 8618 9132
+3 9133 8619 9132
+3 8623 9138 9142
+3 8623 8620 9138
+3 8624 8620 8623
+3 8620 8624 8621
+3 8618 8625 9132
+3 8625 9143 9132
+3 8626 9141 9147
+3 8627 9142 9141
+3 8626 8627 9141
+3 9142 8627 8623
+3 8625 8628 9143
+3 9143 8628 9148
+3 8632 9144 9150
+3 8633 9145 9144
+3 8632 8633 9144
+3 9145 8633 9151
+3 8637 9147 9156
+3 9147 8637 8626
+3 8629 9148 8628
+3 9148 8629 9149
+3 8629 8630 9149
+3 9149 8630 9150
+3 8630 8631 9150
+3 8631 8632 9150
+3 8634 9151 8633
+3 9151 8634 9152
+3 8634 8635 9152
+3 9152 8635 9153
+3 8635 8636 9153
+3 9154 8636 8638
+3 9153 8636 9154
+3 9154 8638 9157
+3 8640 9155 9160
+3 8641 9156 9155
+3 8640 8641 9155
+3 9156 8641 8637
+3 8639 9157 8638
+3 9158 8639 8642
+3 9157 8639 9158
+3 9158 8642 9161
+3 8645 9160 9164
+3 9160 8645 8640
+3 8643 9161 8642
+3 9162 8643 8646
+3 9161 8643 9162
+3 9162 8646 9165
+3 8649 9163 9168
+3 8644 9163 8649
+3 9164 9163 8644
+3 8644 8645 9164
+3 8647 9165 8646
+3 9165 8647 9166
+3 8647 8648 9166
+3 9167 8648 8650
+3 9166 8648 9167
+3 9167 8650 9169
+3 8653 9168 9172
+3 9168 8653 8649
+3 8651 9169 8650
+3 9170 8651 8654
+3 9169 8651 9170
+3 9170 8654 9173
+3 8656 9171 9175
+3 8652 9171 8656
+3 9172 9171 8652
+3 8652 8653 9172
+3 8655 9173 8654
+3 9174 8655 8657
+3 9173 8655 9174
+3 9174 8657 9176
+3 8670 9175 9191
+3 9175 8670 8656
+3 8658 9176 8657
+3 9176 8658 9177
+3 8658 8659 9177
+3 9178 8659 8671
+3 9177 8659 9178
+3 8672 9179 9178
+3 8671 8672 9178
+3 8660 9179 8672
+3 9180 9179 8660
+3 9180 8660 9181
+3 8660 8661 9181
+3 9181 8661 9182
+3 8661 8662 9182
+3 9182 8662 9183
+3 8662 8663 9183
+3 9184 8663 8673
+3 9183 8663 9184
+3 9184 8673 9192
+3 8676 9185 9195
+3 8664 9185 8676
+3 9186 9185 8664
+3 9186 8664 9187
+3 8664 8665 9187
+3 9187 8665 9188
+3 8665 8666 9188
+3 9188 8666 9189
+3 8666 8667 9189
+3 9189 8667 9190
+3 8667 8668 9190
+3 9190 8668 9191
+3 8668 8669 9191
+3 8669 8670 9191
+3 8674 9192 8673
+3 9193 8674 8677
+3 9192 8674 9193
+3 9193 8677 9196
+3 8682 9194 9201
+3 8675 9194 8682
+3 9195 9194 8675
+3 8675 8676 9195
+3 8678 9196 8677
+3 9196 8678 9197
+3 8678 8679 9197
+3 9198 8679 8683
+3 9197 8679 9198
+3 9198 8683 9202
+3 8693 9199 9210
+3 8680 9199 8693
+3 9200 9199 8680
+3 9200 8680 9201
+3 8680 8681 9201
+3 8681 8682 9201
+3 8684 9202 8683
+3 9202 8684 9203
+3 8684 8685 9203
+3 9203 8685 9204
+3 8685 8686 9204
+3 9204 8686 9205
+3 8686 8687 9205
+3 9205 8687 9206
+3 8687 8688 9206
+3 9206 8688 9207
+3 8688 8689 9207
+3 9207 8689 9208
+3 8689 8690 9208
+3 9208 8690 9209
+3 8690 8691 9209
+3 9209 8691 9210
+3 8691 8692 9210
+3 8692 8693 9210
+3 8706 8694 8702
+3 8694 8706 8695
+3 8706 8707 8695
+3 8696 8707 9211
+3 8695 8707 8696
+3 9212 8697 8696
+3 9211 9212 8696
+3 9213 8698 8697
+3 9212 9213 8697
+3 9216 8699 8698
+3 9213 9216 8698
+3 8708 8699 9216
+3 8700 8699 8708
+3 8700 8708 8703
+3 8708 8709 8703
+3 8709 8704 8703
+3 8711 8701 8705
+3 8701 8711 8702
+3 8711 8712 8702
+3 8706 8712 9214
+3 8702 8712 8706
+3 9215 8707 8706
+3 9214 9215 8706
+3 9215 9211 8707
+3 9217 8708 9216
+3 9223 8709 8708
+3 9217 9223 8708
+3 8713 8709 9223
+3 8704 8709 8713
+3 8704 8713 8710
+3 8713 8714 8710
+3 8714 8715 8710
+3 8705 8717 8711
+3 8717 8718 8711
+3 8712 8718 9218
+3 8711 8718 8712
+3 9218 9214 8712
+3 9233 8713 9223
+3 8719 8713 9233
+3 8714 8713 8719
+3 8714 8719 8715
+3 8719 8720 8715
+3 8721 8717 8716
+3 8718 8721 9224
+3 8717 8721 8718
+3 9224 9218 8718
+3 9245 8719 9233
+3 8722 8719 9245
+3 8720 8719 8722
+3 8722 8723 8720
+3 8721 8733 9234
+3 8716 8733 8721
+3 9234 9224 8721
+3 9257 8734 8722
+3 9245 9257 8722
+3 8722 8734 8723
+3 8734 8735 8723
+3 8752 8733 8732
+3 9234 8733 8752
+3 9267 9234 8752
+3 9280 8734 9257
+3 8753 8734 9280
+3 8735 8734 8753
+3 8755 8724 8737
+3 8724 8755 8725
+3 8755 8756 8725
+3 8725 8756 8726
+3 8756 8757 8726
+3 8727 8757 9284
+3 8726 8757 8727
+3 8758 8727 9284
+3 8728 8727 8758
+3 8728 8758 8738
+3 8758 8759 8738
+3 8759 8739 8738
+3 8742 8741 9258
+3 8742 9258 8743
+3 9258 9259 8743
+3 8743 9259 8744
+3 9259 9260 8744
+3 8744 9261 8729
+3 9260 9261 8744
+3 9262 8730 8729
+3 9261 9262 8729
+3 9263 8731 8730
+3 9262 9263 8730
+3 9264 8745 8731
+3 9263 9264 8731
+3 9264 8746 8745
+3 9265 8746 9264
+3 8746 9265 8747
+3 9265 9266 8747
+3 8747 9266 8748
+3 9266 9290 8748
+3 8748 9290 8749
+3 8763 8732 8751
+3 8732 8763 8752
+3 8763 8764 8752
+3 9267 8752 8764
+3 9296 9267 8764
+3 9309 8765 8753
+3 9280 9309 8753
+3 8767 8736 8754
+3 8736 8767 8737
+3 8767 8768 8737
+3 8755 8768 9281
+3 8737 8768 8755
+3 9282 8756 8755
+3 9281 9282 8755
+3 9283 8757 8756
+3 9282 9283 8756
+3 9283 9284 8757
+3 9285 8758 9284
+3 9286 8759 8758
+3 9285 9286 8758
+3 9313 8739 8759
+3 9286 9313 8759
+3 8769 8739 9313
+3 8740 8739 8769
+3 8740 8769 8760
+3 8769 8770 8760
+3 8770 8771 8760
+3 8761 9287 8762
+3 9287 9288 8762
+3 8762 9289 8741
+3 9288 9289 8762
+3 9289 9258 8741
+3 9291 8749 9290
+3 9292 8750 8749
+3 9291 9292 8749
+3 9293 8751 8750
+3 9292 9293 8750
+3 9294 8763 8751
+3 9293 9294 8751
+3 9295 8764 8763
+3 9294 9295 8763
+3 9295 9296 8764
+3 9328 8774 8765
+3 9309 9328 8765
+3 8775 8754 8766
+3 8767 8775 9310
+3 8754 8775 8767
+3 9311 8768 8767
+3 9310 9311 8767
+3 9311 9281 8768
+3 9336 8769 9313
+3 8776 8769 9336
+3 8770 8769 8776
+3 8770 8776 8771
+3 8776 8777 8771
+3 8777 8778 8771
+3 8773 8772 9314
+3 8761 8773 9314
+3 9287 8761 9314
+3 9353 8782 8774
+3 9328 9353 8774
+3 8766 8784 8775
+3 8784 8785 8775
+3 9310 8775 8785
+3 9355 9310 8785
+3 9365 8776 9336
+3 8786 8776 9365
+3 8777 8776 8786
+3 8777 8786 8778
+3 8786 8787 8778
+3 8787 8779 8778
+3 8781 8780 9337
+3 8781 9338 8772
+3 9337 9338 8781
+3 9338 9314 8772
+3 8788 9353 9379
+3 8788 8782 9353
+3 8789 8782 8788
+3 8790 8784 8783
+3 8785 8790 9354
+3 8784 8790 8785
+3 9354 9355 8785
+3 9391 8786 9365
+3 8791 8786 9391
+3 8787 8786 8791
+3 8779 8791 9366
+3 8787 8791 8779
+3 9367 8780 8779
+3 9366 9367 8779
+3 9367 9337 8780
+3 9403 8792 8788
+3 9379 9403 8788
+3 8788 8792 8789
+3 8792 8793 8789
+3 8783 8794 8790
+3 8794 8795 8790
+3 9354 8790 8795
+3 9404 9354 8795
+3 9392 8791 9391
+3 9392 9366 8791
+3 8796 9403 9426
+3 8796 8792 9403
+3 8797 8792 8796
+3 8792 8797 8793
+3 8794 8798 8795
+3 8798 8799 8795
+3 9404 8795 8799
+3 9427 9404 8799
+3 8800 9426 9446
+3 8800 8796 9426
+3 8801 8796 8800
+3 8796 8801 8797
+3 8798 8802 8799
+3 8802 8803 8799
+3 9427 8799 8803
+3 9447 9427 8803
+3 8804 9445 9464
+3 8805 9446 9445
+3 8804 8805 9445
+3 8805 8800 9446
+3 8806 8800 8805
+3 8800 8806 8801
+3 8802 8807 8803
+3 8807 8808 8803
+3 9447 8803 8808
+3 9465 9447 8808
+3 8809 9462 9477
+3 8810 9463 9462
+3 8809 8810 9462
+3 8811 9464 9463
+3 8810 8811 9463
+3 8811 8804 9464
+3 8812 8804 8811
+3 8804 8812 8805
+3 8807 8813 8808
+3 8813 8814 8808
+3 9465 8808 8814
+3 9478 9465 8814
+3 9490 8815 8809
+3 9477 9490 8809
+3 8809 8815 8810
+3 8815 8816 8810
+3 8810 8816 8811
+3 8814 8813 8817
+3 8814 8818 9478
+3 8817 8818 8814
+3 9478 8818 9491
+3 9501 8819 8815
+3 9490 9501 8815
+3 8815 8819 8816
+3 8817 8820 8818
+3 8820 8821 8818
+3 9491 8818 8821
+3 9502 9491 8821
+3 9512 8822 8819
+3 9501 9512 8819
+3 8821 8820 8823
+3 8821 8824 9502
+3 8823 8824 8821
+3 9502 8824 9513
+3 9522 8825 8822
+3 9512 9522 8822
+3 8823 8826 8824
+3 8826 8827 8824
+3 8824 8828 9513
+3 8827 8828 8824
+3 8829 9514 9513
+3 8828 8829 9513
+3 9514 8829 9523
+3 9530 8825 9522
+3 8830 8825 9530
+3 8828 8827 8831
+3 8828 8831 8829
+3 8831 8832 8829
+3 8829 8833 9523
+3 8832 8833 8829
+3 8834 9524 9523
+3 8833 8834 9523
+3 8835 9525 9524
+3 8834 8835 9524
+3 8836 9526 9525
+3 8835 8836 9525
+3 8837 9527 9526
+3 8836 8837 9526
+3 9527 8837 9531
+3 8838 8830 9533
+3 8830 9530 9533
+3 8833 8832 8839
+3 8833 8839 8834
+3 8839 8840 8834
+3 8834 8840 8835
+3 8840 8841 8835
+3 8835 8841 8836
+3 8841 8842 8836
+3 8836 8842 8837
+3 8842 8843 8837
+3 8837 8844 9531
+3 8843 8844 8837
+3 9531 8844 9534
+3 8845 8838 9535
+3 8838 9533 9535
+3 8846 9534 8844
+3 9536 9534 8846
+3 8847 8845 9537
+3 8845 9535 9537
+3 8846 8848 9536
+3 8848 9538 9536
+3 8849 8847 9539
+3 8847 9537 9539
+3 8848 8850 9538
+3 8850 9540 9538
+3 8851 8849 9541
+3 8849 9539 9541
+3 8850 8852 9540
+3 9540 8852 9542
+3 8853 8851 9543
+3 8851 9541 9543
+3 9542 8852 8854
+3 9544 9542 8854
+3 8855 9543 9545
+3 8853 9543 8855
+3 8856 9544 8854
+3 9546 9544 8856
+3 9547 8857 8855
+3 9545 9547 8855
+3 8856 8858 9546
+3 8858 9548 9546
+3 9547 8859 8857
+3 9549 8859 9547
+3 8858 8860 9548
+3 9548 8860 9550
+3 8861 8859 9551
+3 8859 9549 9551
+3 8862 9550 8860
+3 9552 9550 8862
+3 8863 8861 9551
+3 9553 8863 9551
+3 8862 8864 9552
+3 9552 8864 9554
+3 8865 8863 9555
+3 8863 9553 9555
+3 8866 9554 8864
+3 9556 9554 8866
+3 8867 8865 9555
+3 9557 8867 9555
+3 9561 9556 8866
+3 8871 9561 8866
+3 8872 9557 9562
+3 8867 9557 8872
+3 8868 9558 8869
+3 9558 9559 8869
+3 8869 9559 8870
+3 9559 9560 8870
+3 8870 9560 8875
+3 9560 9564 8875
+3 9565 9561 8871
+3 8876 9565 8871
+3 8877 9562 9566
+3 9562 8877 8872
+3 8874 8873 9563
+3 8868 8874 9563
+3 9558 8868 9563
+3 9564 9569 8879
+3 8875 9564 8879
+3 8876 8880 9565
+3 9565 8880 9570
+3 8881 9566 9571
+3 9566 8881 8877
+3 8878 9568 8873
+3 9567 9568 8878
+3 9568 9563 8873
+3 8884 8879 9574
+3 8879 9569 9574
+3 9570 8880 8890
+3 9570 8890 9575
+3 8891 9571 9576
+3 9571 8891 8881
+3 8882 9572 8883
+3 9572 9573 8883
+3 8878 8883 9573
+3 9567 8878 9573
+3 9574 9579 8894
+3 8884 9574 8894
+3 9575 8890 8899
+3 9581 9575 8899
+3 9576 8900 8891
+3 9582 8900 9576
+3 8892 9577 8893
+3 9577 9578 8893
+3 8882 8893 9578
+3 9572 8882 9578
+3 9579 9585 8904
+3 8894 9579 8904
+3 8885 8905 8886
+3 8905 8906 8886
+3 8886 8906 8887
+3 8906 8907 8887
+3 8887 8907 8888
+3 8907 8908 8888
+3 8888 8908 8889
+3 8908 8909 8889
+3 8889 8909 8895
+3 8909 8910 8895
+3 8910 8896 8895
+3 8899 8898 9580
+3 9580 9581 8899
+3 8900 9588 8917
+3 9582 9588 8900
+3 8902 8901 9583
+3 8902 9583 8903
+3 9583 9584 8903
+3 8892 8903 9584
+3 9577 8892 9584
+3 8904 9592 8920
+3 9585 9592 8904
+3 8905 8921 8906
+3 8921 8922 8906
+3 8906 8922 8907
+3 8922 8923 8907
+3 8907 8923 8908
+3 8923 8924 8908
+3 8908 8924 8909
+3 8924 8925 8909
+3 8909 8925 8910
+3 8925 8926 8910
+3 8910 8926 8896
+3 8926 8927 8896
+3 8896 8927 8897
+3 8927 8928 8897
+3 8897 8928 8911
+3 8928 8929 8911
+3 8929 8912 8911
+3 8916 9587 8898
+3 9586 9587 8916
+3 9587 9580 8898
+3 9589 8917 9588
+3 9589 8940 8917
+3 9594 8940 9589
+3 8919 8918 9590
+3 8919 9591 8901
+3 9590 9591 8919
+3 9591 9583 8901
+3 9598 8920 9592
+3 8945 8920 9598
+3 8922 8921 8946
+3 8922 8946 8923
+3 8946 8947 8923
+3 8923 8947 8924
+3 8947 8948 8924
+3 8924 8948 8925
+3 8948 8949 8925
+3 8925 8949 8926
+3 8949 8950 8926
+3 8926 8950 8927
+3 8950 8951 8927
+3 8927 8951 8928
+3 8951 8952 8928
+3 8928 8952 8929
+3 8952 8953 8929
+3 8929 8953 8912
+3 8953 8954 8912
+3 8912 8954 8913
+3 8954 8955 8913
+3 8913 8955 8914
+3 8955 8956 8914
+3 8914 8956 8915
+3 8956 8957 8915
+3 8915 8957 8930
+3 8957 8958 8930
+3 8958 8931 8930
+3 8939 8938 9593
+3 8916 8939 9593
+3 9586 8916 9593
+3 9594 9595 8941
+3 8940 9594 8941
+3 8941 9595 8942
+3 9595 9601 8942
+3 8942 9601 8943
+3 8944 8943 9596
+3 8944 9597 8918
+3 9596 9597 8944
+3 9597 9590 8918
+3 9598 9603 8959
+3 8945 9598 8959
+3 8948 8947 8960
+3 8948 8960 8949
+3 8960 8961 8949
+3 8949 8961 8950
+3 8961 8962 8950
+3 8950 8962 8951
+3 8962 8963 8951
+3 8951 8963 8952
+3 8963 8964 8952
+3 8952 8964 8953
+3 8964 8965 8953
+3 8953 8965 8954
+3 8965 8966 8954
+3 8954 8966 8955
+3 8966 8967 8955
+3 8955 8967 8956
+3 8967 8968 8956
+3 8956 8968 8957
+3 8968 8969 8957
+3 8957 8969 8958
+3 8969 8970 8958
+3 8958 8970 8931
+3 8970 8971 8931
+3 8931 8971 8932
+3 8971 8972 8932
+3 8932 8972 8933
+3 8972 8973 8933
+3 8933 8973 8934
+3 8973 8974 8934
+3 8934 8974 8935
+3 8974 8975 8935
+3 8935 8975 8936
+3 8975 8976 8936
+3 8937 8976 9599
+3 8936 8976 8937
+3 9600 8938 8937
+3 9599 9600 8937
+3 9600 9593 8938
+3 9602 8943 9601
+3 9602 9596 8943
+3 8977 8959 9612
+3 8959 9603 9612
+3 8962 8961 8978
+3 8962 8978 8963
+3 8978 8979 8963
+3 8963 8979 8964
+3 8979 8980 8964
+3 8964 8980 8965
+3 8980 8981 8965
+3 8965 8981 8966
+3 8981 8982 8966
+3 8966 8982 8967
+3 8982 8983 8967
+3 8967 8983 8968
+3 8983 8984 8968
+3 8969 8984 9604
+3 8968 8984 8969
+3 9605 8970 8969
+3 9604 9605 8969
+3 9606 8971 8970
+3 9605 9606 8970
+3 9607 8972 8971
+3 9606 9607 8971
+3 9608 8973 8972
+3 9607 9608 8972
+3 9609 8974 8973
+3 9608 9609 8973
+3 9610 8975 8974
+3 9609 9610 8974
+3 9611 8976 8975
+3 9610 9611 8975
+3 9611 9599 8976
+3 9612 9613 8985
+3 8977 9612 8985
+3 8980 8979 8986
+3 8980 8986 8981
+3 8986 8987 8981
+3 8981 8987 8982
+3 8987 8988 8982
+3 8982 8988 8983
+3 8988 8989 8983
+3 8983 8989 8984
+3 8989 8990 8984
+3 9604 8984 8990
+3 9614 9604 8990
+3 8985 9621 8991
+3 9613 9621 8985
+3 8988 8987 8992
+3 8988 8992 8989
+3 8992 8993 8989
+3 8989 8993 8990
+3 8993 8994 8990
+3 8990 8995 9614
+3 8994 8995 8990
+3 9614 8995 9622
+3 9627 8996 8991
+3 9621 9627 8991
+3 8994 8993 8997
+3 8994 8997 8995
+3 8997 8998 8995
+3 8995 8999 9622
+3 8998 8999 8995
+3 9622 8999 9628
+3 9000 9627 9637
+3 9000 8996 9627
+3 9001 8996 9000
+3 8998 8997 9002
+3 8998 9002 8999
+3 9002 9003 8999
+3 8999 9004 9628
+3 9003 9004 8999
+3 9628 9004 9638
+3 9005 9631 9641
+3 9006 9632 9631
+3 9005 9006 9631
+3 9007 9633 9632
+3 9006 9007 9632
+3 9008 9634 9633
+3 9007 9008 9633
+3 9009 9635 9634
+3 9008 9009 9634
+3 9010 9636 9635
+3 9009 9010 9635
+3 9011 9637 9636
+3 9010 9011 9636
+3 9637 9011 9000
+3 9004 9003 9012
+3 9638 9004 9012
+3 9642 9638 9012
+3 9013 9640 9645
+3 9014 9641 9640
+3 9013 9014 9640
+3 9641 9014 9005
+3 9642 9012 9015
+3 9646 9642 9015
+3 9016 9644 9649
+3 9017 9645 9644
+3 9016 9017 9644
+3 9645 9017 9013
+3 9646 9015 9018
+3 9650 9646 9018
+3 9019 9647 9652
+3 9020 9648 9647
+3 9019 9020 9647
+3 9021 9649 9648
+3 9020 9021 9648
+3 9649 9021 9016
+3 9650 9018 9022
+3 9654 9650 9022
+3 9023 9652 9655
+3 9023 9019 9652
+3 9024 9019 9023
+3 9019 9024 9020
+3 9026 9653 9022
+3 9653 9654 9022
+3 9027 9655 9656
+3 9655 9027 9023
+3 9658 9026 9025
+3 9653 9026 9658
+3 9659 9027 9656
+3 9028 9027 9659
+3 9029 9657 9025
+3 9657 9658 9025
+3 9030 9028 9660
+3 9028 9659 9660
+3 9029 9032 9657
+3 9032 9661 9657
+3 9033 9030 9662
+3 9030 9660 9662
+3 9664 9032 9031
+3 9661 9032 9664
+3 9662 9665 9034
+3 9033 9662 9034
+3 9035 9663 9031
+3 9663 9664 9031
+3 9036 9034 9666
+3 9034 9665 9666
+3 9035 9037 9663
+3 9037 9667 9663
+3 9038 9036 9668
+3 9036 9666 9668
+3 9037 9040 9667
+3 9040 9669 9667
+3 9041 9038 9670
+3 9038 9668 9670
+3 9672 9040 9039
+3 9669 9040 9672
+3 9041 9673 9042
+3 9670 9673 9041
+3 9043 9671 9039
+3 9671 9672 9039
+3 9674 9042 9673
+3 9044 9042 9674
+3 9043 9045 9671
+3 9045 9675 9671
+3 9046 9044 9676
+3 9044 9674 9676
+3 9045 9047 9675
+3 9047 9677 9675
+3 9048 9046 9678
+3 9046 9676 9678
+3 9047 9049 9677
+3 9049 9679 9677
+3 9050 9048 9680
+3 9048 9678 9680
+3 9049 9051 9679
+3 9051 9681 9679
+3 9052 9050 9682
+3 9050 9680 9682
+3 9051 9053 9681
+3 9053 9683 9681
+3 9054 9052 9684
+3 9052 9682 9684
+3 9053 9055 9683
+3 9055 9685 9683
+3 9056 9054 9686
+3 9054 9684 9686
+3 9055 9057 9685
+3 9057 9687 9685
+3 9058 9056 9688
+3 9056 9686 9688
+3 9057 9059 9687
+3 9059 9689 9687
+3 9060 9058 9690
+3 9058 9688 9690
+3 9059 9061 9689
+3 9061 9691 9689
+3 9062 9060 9692
+3 9060 9690 9692
+3 9061 9063 9691
+3 9063 9693 9691
+3 9064 9062 9694
+3 9062 9692 9694
+3 9063 9065 9693
+3 9065 9695 9693
+3 9066 9064 9696
+3 9064 9694 9696
+3 9065 9067 9695
+3 9067 9697 9695
+3 9068 9066 9698
+3 9066 9696 9698
+3 9067 9071 9697
+3 9697 9071 9699
+3 9072 9698 9700
+3 9068 9698 9072
+3 9069 9702 9070
+3 9699 9071 9075
+3 9705 9699 9075
+3 9700 9076 9072
+3 9706 9076 9700
+3 9069 9073 9701
+3 9702 9069 9701
+3 9703 9070 9702
+3 9704 9074 9070
+3 9703 9704 9070
+3 9704 9077 9074
+3 9707 9077 9704
+3 9079 9705 9075
+3 9708 9705 9079
+3 9080 9076 9709
+3 9076 9706 9709
+3 9073 9082 9701
+3 9082 9711 9701
+3 9707 9712 9078
+3 9077 9707 9078
+3 9078 9712 9083
+3 9079 9085 9708
+3 9085 9714 9708
+3 9086 9080 9715
+3 9080 9709 9715
+3 9082 9081 9710
+3 9711 9082 9710
+3 9713 9083 9712
+3 9713 9084 9083
+3 9716 9084 9713
+3 9084 9716 9087
+3 9085 9091 9714
+3 9091 9718 9714
+3 9092 9086 9719
+3 9086 9715 9719
+3 9081 9093 9710
+3 9093 9720 9710
+3 9717 9087 9716
+3 9717 9088 9087
+3 9721 9088 9717
+3 9088 9721 9089
+3 9724 9091 9090
+3 9718 9091 9724
+3 9094 9719 9725
+3 9092 9719 9094
+3 9093 9096 9720
+3 9096 9727 9720
+3 9722 9089 9721
+3 9723 9090 9089
+3 9722 9723 9089
+3 9723 9724 9090
+3 9725 9097 9094
+3 9729 9097 9725
+3 9096 9095 9726
+3 9727 9096 9726
+3 9098 9097 9730
+3 9097 9729 9730
+3 9095 9101 9726
+3 9101 9731 9726
+3 9102 9730 9732
+3 9103 9098 9730
+3 9102 9103 9730
+3 9101 9109 9731
+3 9109 9734 9731
+3 9735 9110 9102
+3 9732 9735 9102
+3 9102 9110 9103
+3 9110 9111 9103
+3 9111 9104 9103
+3 9112 9099 9106
+3 9099 9112 9100
+3 9112 9113 9100
+3 9100 9113 9107
+3 9113 9114 9107
+3 9114 9115 9107
+3 9109 9108 9733
+3 9734 9109 9733
+3 9737 9110 9735
+3 9116 9110 9737
+3 9111 9110 9116
+3 9111 9116 9104
+3 9116 9117 9104
+3 9104 9117 9105
+3 9117 9118 9105
+3 9105 9118 9106
+3 9118 9119 9106
+3 9106 9119 9112
+3 9119 9120 9112
+3 9112 9120 9113
+3 9120 9121 9113
+3 9113 9121 9114
+3 9121 9122 9114
+3 9114 9122 9115
+3 9122 9123 9115
+3 9108 9124 9733
+3 9124 9738 9733
+3 9741 9116 9737
+3 9125 9116 9741
+3 9117 9116 9125
+3 9117 9125 9118
+3 9125 9126 9118
+3 9118 9126 9119
+3 9126 9127 9119
+3 9119 9127 9120
+3 9127 9128 9120
+3 9120 9128 9121
+3 9128 9129 9121
+3 9121 9129 9122
+3 9129 9130 9122
+3 9122 9130 9123
+3 9130 9131 9123
+3 9124 9133 9738
+3 9133 9742 9738
+3 9746 9125 9741
+3 9134 9125 9746
+3 9126 9125 9134
+3 9126 9134 9127
+3 9134 9135 9127
+3 9127 9135 9128
+3 9135 9136 9128
+3 9128 9136 9129
+3 9136 9137 9129
+3 9129 9137 9130
+3 9137 9138 9130
+3 9130 9138 9131
+3 9747 9133 9132
+3 9742 9133 9747
+3 9751 9139 9134
+3 9746 9751 9134
+3 9134 9139 9135
+3 9139 9140 9135
+3 9135 9140 9136
+3 9140 9141 9136
+3 9136 9141 9137
+3 9141 9142 9137
+3 9137 9142 9138
+3 9747 9132 9143
+3 9752 9747 9143
+3 9763 9146 9139
+3 9751 9763 9139
+3 9139 9146 9140
+3 9146 9147 9140
+3 9140 9147 9141
+3 9752 9143 9148
+3 9149 9753 9752
+3 9148 9149 9752
+3 9150 9754 9753
+3 9149 9150 9753
+3 9144 9754 9150
+3 9755 9754 9144
+3 9755 9144 9756
+3 9144 9145 9756
+3 9757 9145 9151
+3 9756 9145 9757
+3 9152 9758 9757
+3 9151 9152 9757
+3 9758 9152 9764
+3 9155 9763 9770
+3 9155 9146 9763
+3 9156 9146 9155
+3 9146 9156 9147
+3 9153 9764 9152
+3 9764 9153 9765
+3 9153 9154 9765
+3 9766 9154 9157
+3 9765 9154 9766
+3 9766 9157 9771
+3 9159 9769 9774
+3 9160 9770 9769
+3 9159 9160 9769
+3 9770 9160 9155
+3 9158 9771 9157
+3 9772 9158 9161
+3 9771 9158 9772
+3 9772 9161 9775
+3 9163 9774 9779
+3 9163 9159 9774
+3 9164 9159 9163
+3 9159 9164 9160
+3 9162 9775 9161
+3 9776 9162 9165
+3 9775 9162 9776
+3 9166 9777 9776
+3 9165 9166 9776
+3 9777 9166 9780
+3 9168 9779 9783
+3 9779 9168 9163
+3 9167 9780 9166
+3 9781 9167 9169
+3 9780 9167 9781
+3 9781 9169 9784
+3 9171 9782 9786
+3 9172 9783 9782
+3 9171 9172 9782
+3 9783 9172 9168
+3 9170 9784 9169
+3 9785 9170 9173
+3 9784 9170 9785
+3 9785 9173 9787
+3 9175 9786 9795
+3 9786 9175 9171
+3 9174 9787 9173
+3 9788 9174 9176
+3 9787 9174 9788
+3 9177 9789 9788
+3 9176 9177 9788
+3 9789 9177 9796
+3 9181 9790 9798
+3 9182 9791 9790
+3 9181 9182 9790
+3 9791 9182 9799
+3 9187 9792 9802
+3 9188 9793 9792
+3 9187 9188 9792
+3 9793 9188 9803
+3 9190 9794 9803
+3 9191 9795 9794
+3 9190 9191 9794
+3 9795 9191 9175
+3 9178 9796 9177
+3 9796 9178 9797
+3 9178 9179 9797
+3 9797 9179 9798
+3 9179 9180 9798
+3 9180 9181 9798
+3 9183 9799 9182
+3 9799 9183 9800
+3 9183 9184 9800
+3 9804 9800 9184
+3 9192 9804 9184
+3 9195 9185 9801
+3 9807 9195 9801
+3 9801 9185 9802
+3 9185 9186 9802
+3 9186 9187 9802
+3 9189 9803 9188
+3 9189 9190 9803
+3 9804 9192 9805
+3 9192 9193 9805
+3 9808 9805 9193
+3 9196 9808 9193
+3 9201 9194 9806
+3 9817 9201 9806
+3 9806 9194 9807
+3 9194 9195 9807
+3 9808 9196 9809
+3 9196 9197 9809
+3 9809 9197 9810
+3 9197 9198 9810
+3 9811 9198 9202
+3 9810 9198 9811
+3 9203 9812 9811
+3 9202 9203 9811
+3 9812 9203 9818
+3 9209 9813 9822
+3 9210 9814 9813
+3 9209 9210 9813
+3 9199 9814 9210
+3 9815 9814 9199
+3 9815 9199 9816
+3 9199 9200 9816
+3 9816 9200 9817
+3 9200 9201 9817
+3 9204 9818 9203
+3 9818 9204 9819
+3 9204 9205 9819
+3 9819 9205 9820
+3 9205 9206 9820
+3 9820 9206 9821
+3 9206 9207 9821
+3 9821 9207 9822
+3 9207 9208 9822
+3 9208 9209 9822
+3 9219 9211 9215
+3 9211 9219 9212
+3 9219 9220 9212
+3 9212 9220 9213
+3 9220 9221 9213
+3 9213 9221 9216
+3 9221 9222 9216
+3 9222 9217 9216
+3 9225 9214 9218
+3 9214 9225 9215
+3 9225 9226 9215
+3 9215 9226 9219
+3 9226 9227 9219
+3 9219 9227 9220
+3 9227 9228 9220
+3 9220 9228 9221
+3 9228 9229 9221
+3 9221 9229 9222
+3 9229 9230 9222
+3 9222 9230 9217
+3 9230 9231 9217
+3 9217 9231 9223
+3 9231 9232 9223
+3 9232 9233 9223
+3 9235 9218 9224
+3 9218 9235 9225
+3 9235 9236 9225
+3 9225 9236 9226
+3 9236 9237 9226
+3 9226 9237 9227
+3 9237 9238 9227
+3 9227 9238 9228
+3 9238 9239 9228
+3 9228 9239 9229
+3 9239 9240 9229
+3 9229 9240 9230
+3 9240 9241 9230
+3 9230 9241 9231
+3 9241 9242 9231
+3 9231 9242 9232
+3 9242 9243 9232
+3 9232 9243 9233
+3 9243 9244 9233
+3 9244 9245 9233
+3 9246 9224 9234
+3 9224 9246 9235
+3 9246 9247 9235
+3 9235 9247 9236
+3 9247 9248 9236
+3 9236 9248 9237
+3 9248 9249 9237
+3 9237 9249 9238
+3 9249 9250 9238
+3 9238 9250 9239
+3 9250 9251 9239
+3 9239 9251 9240
+3 9251 9252 9240
+3 9240 9252 9241
+3 9252 9253 9241
+3 9241 9253 9242
+3 9253 9254 9242
+3 9242 9254 9243
+3 9254 9255 9243
+3 9243 9255 9244
+3 9255 9256 9244
+3 9244 9256 9245
+3 9256 9257 9245
+3 9234 9267 9246
+3 9267 9268 9246
+3 9246 9268 9247
+3 9268 9269 9247
+3 9247 9269 9248
+3 9269 9270 9248
+3 9248 9270 9249
+3 9270 9271 9249
+3 9249 9271 9250
+3 9271 9272 9250
+3 9250 9272 9251
+3 9272 9273 9251
+3 9251 9273 9252
+3 9273 9274 9252
+3 9252 9274 9253
+3 9274 9275 9253
+3 9253 9275 9254
+3 9275 9276 9254
+3 9254 9276 9255
+3 9276 9277 9255
+3 9255 9277 9256
+3 9277 9278 9256
+3 9256 9278 9257
+3 9278 9279 9257
+3 9279 9280 9257
+3 9260 9259 9823
+3 9260 9823 9261
+3 9823 9824 9261
+3 9261 9824 9262
+3 9824 9825 9262
+3 9262 9825 9263
+3 9825 9826 9263
+3 9263 9826 9264
+3 9826 9827 9264
+3 9264 9827 9265
+3 9827 9828 9265
+3 9265 9828 9266
+3 9828 9833 9266
+3 9266 9833 9290
+3 9267 9296 9268
+3 9296 9297 9268
+3 9268 9297 9269
+3 9297 9298 9269
+3 9269 9298 9270
+3 9298 9299 9270
+3 9270 9299 9271
+3 9299 9300 9271
+3 9271 9300 9272
+3 9300 9301 9272
+3 9272 9301 9273
+3 9301 9302 9273
+3 9273 9302 9274
+3 9302 9303 9274
+3 9274 9303 9275
+3 9303 9304 9275
+3 9275 9304 9276
+3 9304 9305 9276
+3 9276 9305 9277
+3 9305 9306 9277
+3 9277 9306 9278
+3 9306 9307 9278
+3 9278 9307 9279
+3 9307 9308 9279
+3 9279 9308 9280
+3 9308 9309 9280
+3 9312 9284 9283
+3 9312 9285 9284
+3 9288 9287 9829
+3 9288 9829 9289
+3 9829 9830 9289
+3 9289 9831 9258
+3 9830 9831 9289
+3 9832 9259 9258
+3 9831 9832 9258
+3 9832 9823 9259
+3 9834 9290 9833
+3 9834 9291 9290
+3 9835 9291 9834
+3 9291 9835 9292
+3 9835 9838 9292
+3 9292 9838 9293
+3 9315 9296 9295
+3 9296 9315 9297
+3 9315 9316 9297
+3 9297 9316 9298
+3 9316 9317 9298
+3 9298 9317 9299
+3 9317 9318 9299
+3 9299 9318 9300
+3 9318 9319 9300
+3 9300 9319 9301
+3 9319 9320 9301
+3 9301 9320 9302
+3 9320 9321 9302
+3 9302 9321 9303
+3 9321 9322 9303
+3 9303 9322 9304
+3 9322 9323 9304
+3 9304 9323 9305
+3 9323 9324 9305
+3 9305 9324 9306
+3 9324 9325 9306
+3 9306 9325 9307
+3 9325 9326 9307
+3 9307 9326 9308
+3 9326 9327 9308
+3 9308 9327 9309
+3 9327 9328 9309
+3 9329 9281 9311
+3 9281 9329 9282
+3 9329 9330 9282
+3 9282 9330 9283
+3 9330 9331 9283
+3 9283 9331 9312
+3 9331 9332 9312
+3 9312 9332 9285
+3 9332 9333 9285
+3 9285 9333 9286
+3 9333 9334 9286
+3 9286 9334 9313
+3 9334 9335 9313
+3 9335 9336 9313
+3 9314 9837 9287
+3 9836 9837 9314
+3 9837 9829 9287
+3 9839 9293 9838
+3 9841 9294 9293
+3 9839 9841 9293
+3 9339 9294 9841
+3 9295 9294 9339
+3 9295 9339 9315
+3 9339 9340 9315
+3 9315 9340 9316
+3 9340 9341 9316
+3 9316 9341 9317
+3 9341 9342 9317
+3 9317 9342 9318
+3 9342 9343 9318
+3 9318 9343 9319
+3 9343 9344 9319
+3 9319 9344 9320
+3 9344 9345 9320
+3 9320 9345 9321
+3 9345 9346 9321
+3 9321 9346 9322
+3 9346 9347 9322
+3 9322 9347 9323
+3 9347 9348 9323
+3 9323 9348 9324
+3 9348 9349 9324
+3 9324 9349 9325
+3 9349 9350 9325
+3 9325 9350 9326
+3 9350 9351 9326
+3 9326 9351 9327
+3 9351 9352 9327
+3 9327 9352 9328
+3 9352 9353 9328
+3 9310 9355 9311
+3 9355 9356 9311
+3 9311 9356 9329
+3 9356 9357 9329
+3 9329 9357 9330
+3 9357 9358 9330
+3 9330 9358 9331
+3 9358 9359 9331
+3 9331 9359 9332
+3 9359 9360 9332
+3 9332 9360 9333
+3 9360 9361 9333
+3 9333 9361 9334
+3 9361 9362 9334
+3 9334 9362 9335
+3 9362 9363 9335
+3 9335 9363 9336
+3 9363 9364 9336
+3 9364 9365 9336
+3 9338 9337 9840
+3 9314 9338 9840
+3 9836 9314 9840
+3 9842 9339 9841
+3 9844 9340 9339
+3 9842 9844 9339
+3 9368 9340 9844
+3 9341 9340 9368
+3 9341 9368 9342
+3 9368 9369 9342
+3 9342 9369 9343
+3 9369 9370 9343
+3 9343 9370 9344
+3 9370 9371 9344
+3 9344 9371 9345
+3 9371 9372 9345
+3 9345 9372 9346
+3 9372 9373 9346
+3 9346 9373 9347
+3 9373 9374 9347
+3 9347 9374 9348
+3 9374 9375 9348
+3 9348 9375 9349
+3 9375 9376 9349
+3 9349 9376 9350
+3 9376 9377 9350
+3 9350 9377 9351
+3 9377 9378 9351
+3 9351 9378 9352
+3 9378 9379 9352
+3 9352 9379 9353
+3 9380 9355 9354
+3 9355 9380 9356
+3 9380 9381 9356
+3 9356 9381 9357
+3 9381 9382 9357
+3 9357 9382 9358
+3 9382 9383 9358
+3 9358 9383 9359
+3 9383 9384 9359
+3 9359 9384 9360
+3 9384 9385 9360
+3 9360 9385 9361
+3 9385 9386 9361
+3 9361 9386 9362
+3 9386 9387 9362
+3 9362 9387 9363
+3 9387 9388 9363
+3 9363 9388 9364
+3 9388 9389 9364
+3 9364 9389 9365
+3 9389 9390 9365
+3 9390 9391 9365
+3 9337 9367 9843
+3 9843 9840 9337
+3 9846 9368 9844
+3 9393 9368 9846
+3 9369 9368 9393
+3 9369 9393 9370
+3 9393 9394 9370
+3 9370 9394 9371
+3 9394 9395 9371
+3 9371 9395 9372
+3 9395 9396 9372
+3 9372 9396 9373
+3 9396 9397 9373
+3 9373 9397 9374
+3 9397 9398 9374
+3 9374 9398 9375
+3 9398 9399 9375
+3 9375 9399 9376
+3 9399 9400 9376
+3 9376 9400 9377
+3 9400 9401 9377
+3 9377 9401 9378
+3 9401 9402 9378
+3 9378 9402 9379
+3 9402 9403 9379
+3 9354 9404 9380
+3 9404 9405 9380
+3 9380 9405 9381
+3 9405 9406 9381
+3 9381 9406 9382
+3 9406 9407 9382
+3 9382 9407 9383
+3 9407 9408 9383
+3 9383 9408 9384
+3 9408 9409 9384
+3 9384 9409 9385
+3 9409 9410 9385
+3 9385 9410 9386
+3 9410 9411 9386
+3 9386 9411 9387
+3 9411 9412 9387
+3 9387 9412 9388
+3 9412 9413 9388
+3 9388 9413 9389
+3 9413 9414 9389
+3 9389 9414 9390
+3 9414 9415 9390
+3 9390 9415 9391
+3 9415 9416 9391
+3 9416 9392 9391
+3 9417 9366 9392
+3 9367 9417 9845
+3 9366 9417 9367
+3 9845 9843 9367
+3 9849 9393 9846
+3 9418 9393 9849
+3 9394 9393 9418
+3 9394 9418 9395
+3 9418 9419 9395
+3 9395 9419 9396
+3 9419 9420 9396
+3 9396 9420 9397
+3 9420 9421 9397
+3 9397 9421 9398
+3 9421 9422 9398
+3 9398 9422 9399
+3 9422 9423 9399
+3 9399 9423 9400
+3 9423 9424 9400
+3 9400 9424 9401
+3 9424 9425 9401
+3 9401 9425 9402
+3 9425 9426 9402
+3 9402 9426 9403
+3 9404 9427 9405
+3 9427 9428 9405
+3 9405 9428 9406
+3 9428 9429 9406
+3 9406 9429 9407
+3 9429 9430 9407
+3 9407 9430 9408
+3 9430 9431 9408
+3 9408 9431 9409
+3 9431 9432 9409
+3 9409 9432 9410
+3 9432 9433 9410
+3 9410 9433 9411
+3 9433 9434 9411
+3 9411 9434 9412
+3 9434 9435 9412
+3 9412 9435 9413
+3 9435 9436 9413
+3 9413 9436 9414
+3 9436 9437 9414
+3 9414 9437 9415
+3 9437 9438 9415
+3 9415 9438 9416
+3 9438 9439 9416
+3 9392 9439 9847
+3 9416 9439 9392
+3 9848 9417 9392
+3 9847 9848 9392
+3 9848 9845 9417
+3 9850 9418 9849
+3 9440 9418 9850
+3 9419 9418 9440
+3 9419 9440 9420
+3 9440 9441 9420
+3 9420 9441 9421
+3 9441 9442 9421
+3 9421 9442 9422
+3 9442 9443 9422
+3 9422 9443 9423
+3 9443 9444 9423
+3 9423 9444 9424
+3 9444 9445 9424
+3 9424 9445 9425
+3 9445 9446 9425
+3 9425 9446 9426
+3 9427 9447 9428
+3 9447 9448 9428
+3 9428 9448 9429
+3 9448 9449 9429
+3 9429 9449 9430
+3 9449 9450 9430
+3 9430 9450 9431
+3 9450 9451 9431
+3 9431 9451 9432
+3 9451 9452 9432
+3 9432 9452 9433
+3 9452 9453 9433
+3 9433 9453 9434
+3 9453 9454 9434
+3 9434 9454 9435
+3 9454 9455 9435
+3 9435 9455 9436
+3 9455 9456 9436
+3 9436 9456 9437
+3 9456 9457 9437
+3 9437 9457 9438
+3 9457 9458 9438
+3 9438 9458 9439
+3 9458 9459 9439
+3 9847 9439 9459
+3 9852 9847 9459
+3 9853 9460 9440
+3 9850 9853 9440
+3 9440 9460 9441
+3 9460 9461 9441
+3 9441 9461 9442
+3 9461 9462 9442
+3 9442 9462 9443
+3 9462 9463 9443
+3 9443 9463 9444
+3 9463 9464 9444
+3 9444 9464 9445
+3 9447 9465 9448
+3 9465 9466 9448
+3 9448 9466 9449
+3 9466 9467 9449
+3 9449 9467 9450
+3 9467 9468 9450
+3 9450 9468 9451
+3 9468 9469 9451
+3 9451 9469 9452
+3 9469 9470 9452
+3 9452 9470 9453
+3 9470 9471 9453
+3 9453 9471 9454
+3 9471 9472 9454
+3 9454 9472 9455
+3 9472 9473 9455
+3 9455 9473 9456
+3 9473 9474 9456
+3 9456 9474 9457
+3 9474 9475 9457
+3 9457 9475 9458
+3 9475 9476 9458
+3 9459 9476 9851
+3 9458 9476 9459
+3 9851 9852 9459
+3 9854 9460 9853
+3 9477 9460 9854
+3 9461 9460 9477
+3 9461 9477 9462
+3 9465 9478 9466
+3 9478 9479 9466
+3 9466 9479 9467
+3 9479 9480 9467
+3 9467 9480 9468
+3 9480 9481 9468
+3 9468 9481 9469
+3 9481 9482 9469
+3 9469 9482 9470
+3 9482 9483 9470
+3 9470 9483 9471
+3 9483 9484 9471
+3 9471 9484 9472
+3 9484 9485 9472
+3 9472 9485 9473
+3 9485 9486 9473
+3 9473 9486 9474
+3 9486 9487 9474
+3 9474 9487 9475
+3 9487 9488 9475
+3 9475 9488 9476
+3 9488 9489 9476
+3 9851 9476 9489
+3 9856 9851 9489
+3 9857 9490 9477
+3 9854 9857 9477
+3 9479 9478 9491
+3 9479 9491 9480
+3 9491 9492 9480
+3 9480 9492 9481
+3 9492 9493 9481
+3 9481 9493 9482
+3 9493 9494 9482
+3 9482 9494 9483
+3 9494 9495 9483
+3 9483 9495 9484
+3 9495 9496 9484
+3 9484 9496 9485
+3 9496 9497 9485
+3 9485 9497 9486
+3 9497 9498 9486
+3 9486 9498 9487
+3 9498 9499 9487
+3 9487 9499 9488
+3 9499 9500 9488
+3 9489 9500 9855
+3 9488 9500 9489
+3 9855 9856 9489
+3 9858 9490 9857
+3 9501 9490 9858
+3 9491 9502 9492
+3 9502 9503 9492
+3 9492 9503 9493
+3 9503 9504 9493
+3 9493 9504 9494
+3 9504 9505 9494
+3 9494 9505 9495
+3 9505 9506 9495
+3 9495 9506 9496
+3 9506 9507 9496
+3 9496 9507 9497
+3 9507 9508 9497
+3 9497 9508 9498
+3 9508 9509 9498
+3 9498 9509 9499
+3 9509 9510 9499
+3 9499 9510 9500
+3 9510 9511 9500
+3 9855 9500 9511
+3 9859 9855 9511
+3 9512 9501 9860
+3 9501 9858 9860
+3 9503 9502 9513
+3 9503 9513 9504
+3 9513 9514 9504
+3 9504 9514 9505
+3 9514 9515 9505
+3 9505 9515 9506
+3 9515 9516 9506
+3 9506 9516 9507
+3 9516 9517 9507
+3 9507 9517 9508
+3 9517 9518 9508
+3 9508 9518 9509
+3 9518 9519 9509
+3 9509 9519 9510
+3 9519 9520 9510
+3 9510 9520 9511
+3 9520 9521 9511
+3 9859 9511 9521
+3 9861 9859 9521
+3 9522 9512 9862
+3 9512 9860 9862
+3 9515 9514 9523
+3 9515 9523 9516
+3 9523 9524 9516
+3 9516 9524 9517
+3 9524 9525 9517
+3 9517 9525 9518
+3 9525 9526 9518
+3 9518 9526 9519
+3 9526 9527 9519
+3 9519 9527 9520
+3 9527 9528 9520
+3 9520 9528 9521
+3 9528 9529 9521
+3 9861 9521 9529
+3 9863 9861 9529
+3 9522 9864 9530
+3 9862 9864 9522
+3 9528 9527 9531
+3 9528 9531 9529
+3 9531 9532 9529
+3 9863 9529 9532
+3 9865 9863 9532
+3 9866 9533 9530
+3 9864 9866 9530
+3 9532 9531 9534
+3 9865 9532 9534
+3 9867 9865 9534
+3 9868 9533 9866
+3 9535 9533 9868
+3 9867 9534 9536
+3 9869 9867 9536
+3 9537 9535 9870
+3 9535 9868 9870
+3 9869 9536 9538
+3 9871 9869 9538
+3 9539 9537 9872
+3 9537 9870 9872
+3 9871 9538 9540
+3 9873 9871 9540
+3 9541 9872 9874
+3 9539 9872 9541
+3 9542 9873 9540
+3 9875 9873 9542
+3 9876 9543 9541
+3 9874 9876 9541
+3 9542 9544 9875
+3 9544 9877 9875
+3 9876 9545 9543
+3 9878 9545 9876
+3 9544 9546 9877
+3 9546 9879 9877
+3 9547 9545 9880
+3 9545 9878 9880
+3 9546 9548 9879
+3 9879 9548 9881
+3 9549 9547 9882
+3 9547 9880 9882
+3 9550 9881 9548
+3 9883 9881 9550
+3 9551 9882 9884
+3 9549 9882 9551
+3 9550 9552 9883
+3 9883 9552 9885
+3 9884 9553 9551
+3 9886 9553 9884
+3 9554 9885 9552
+3 9887 9885 9554
+3 9555 9886 9888
+3 9553 9886 9555
+3 9554 9556 9887
+3 9887 9556 9889
+3 9888 9557 9555
+3 9890 9557 9888
+3 9889 9556 9561
+3 9889 9561 9894
+3 9562 9557 9890
+3 9895 9562 9890
+3 9558 9891 9559
+3 9891 9892 9559
+3 9559 9892 9560
+3 9892 9893 9560
+3 9560 9893 9564
+3 9893 9897 9564
+3 9565 9894 9561
+3 9898 9894 9565
+3 9566 9562 9895
+3 9899 9566 9895
+3 9558 9563 9896
+3 9891 9558 9896
+3 9897 9902 9569
+3 9564 9897 9569
+3 9903 9898 9565
+3 9570 9903 9565
+3 9571 9566 9899
+3 9904 9571 9899
+3 9567 9900 9568
+3 9900 9901 9568
+3 9563 9568 9901
+3 9896 9563 9901
+3 9574 9569 9906
+3 9569 9902 9906
+3 9907 9903 9570
+3 9575 9907 9570
+3 9576 9571 9904
+3 9908 9576 9904
+3 9573 9572 9905
+3 9567 9573 9905
+3 9900 9567 9905
+3 9906 9911 9579
+3 9574 9906 9579
+3 9575 9581 9907
+3 9581 9912 9907
+3 9582 9908 9913
+3 9576 9908 9582
+3 9578 9577 9909
+3 9578 9910 9572
+3 9909 9910 9578
+3 9910 9905 9572
+3 9911 9916 9585
+3 9579 9911 9585
+3 9919 9581 9580
+3 9912 9581 9919
+3 9920 9582 9913
+3 9588 9582 9920
+3 9584 9583 9914
+3 9584 9915 9577
+3 9914 9915 9584
+3 9915 9909 9577
+3 9592 9585 9922
+3 9585 9916 9922
+3 9587 9586 9917
+3 9587 9918 9580
+3 9917 9918 9587
+3 9918 9919 9580
+3 9920 9925 9589
+3 9588 9920 9589
+3 9589 9925 9594
+3 9583 9591 9921
+3 9921 9914 9583
+3 9922 9930 9598
+3 9592 9922 9598
+3 9593 9924 9586
+3 9923 9924 9593
+3 9924 9917 9586
+3 9926 9594 9925
+3 9926 9595 9594
+3 9932 9595 9926
+3 9595 9932 9601
+3 9590 9597 9927
+3 9928 9591 9590
+3 9927 9928 9590
+3 9928 9921 9591
+3 9930 9937 9603
+3 9598 9930 9603
+3 9600 9599 9931
+3 9593 9600 9931
+3 9923 9593 9931
+3 9933 9601 9932
+3 9933 9602 9601
+3 9934 9602 9933
+3 9602 9935 9596
+3 9934 9935 9602
+3 9936 9597 9596
+3 9935 9936 9596
+3 9936 9927 9597
+3 9612 9603 9940
+3 9603 9937 9940
+3 9599 9611 9938
+3 9938 9931 9599
+3 9940 9945 9613
+3 9612 9940 9613
+3 9604 9614 9605
+3 9614 9615 9605
+3 9605 9615 9606
+3 9615 9616 9606
+3 9606 9616 9607
+3 9616 9617 9607
+3 9607 9617 9608
+3 9617 9618 9608
+3 9608 9618 9609
+3 9618 9619 9609
+3 9609 9619 9610
+3 9619 9620 9610
+3 9611 9620 9941
+3 9610 9620 9611
+3 9941 9938 9611
+3 9621 9613 9947
+3 9613 9945 9947
+3 9615 9614 9622
+3 9615 9622 9616
+3 9622 9623 9616
+3 9616 9623 9617
+3 9623 9624 9617
+3 9617 9624 9618
+3 9624 9625 9618
+3 9618 9625 9619
+3 9625 9626 9619
+3 9620 9626 9946
+3 9619 9626 9620
+3 9946 9941 9620
+3 9627 9947 9955
+3 9621 9947 9627
+3 9623 9622 9628
+3 9623 9628 9624
+3 9628 9629 9624
+3 9624 9629 9625
+3 9629 9630 9625
+3 9626 9630 9948
+3 9625 9630 9626
+3 9948 9946 9626
+3 9631 9949 9957
+3 9632 9950 9949
+3 9631 9632 9949
+3 9633 9951 9950
+3 9632 9633 9950
+3 9634 9952 9951
+3 9633 9634 9951
+3 9635 9953 9952
+3 9634 9635 9952
+3 9636 9954 9953
+3 9635 9636 9953
+3 9637 9955 9954
+3 9636 9637 9954
+3 9955 9637 9627
+3 9629 9628 9638
+3 9629 9638 9630
+3 9638 9639 9630
+3 9948 9630 9639
+3 9959 9948 9639
+3 9640 9956 9962
+3 9641 9957 9956
+3 9640 9641 9956
+3 9957 9641 9631
+3 9639 9642 9958
+3 9638 9642 9639
+3 9958 9959 9639
+3 9643 9960 9965
+3 9644 9961 9960
+3 9643 9644 9960
+3 9645 9962 9961
+3 9644 9645 9961
+3 9962 9645 9640
+3 9958 9642 9646
+3 9967 9958 9646
+3 9647 9964 9970
+3 9648 9965 9964
+3 9647 9648 9964
+3 9648 9643 9965
+3 9649 9643 9648
+3 9643 9649 9644
+3 9650 9966 9646
+3 9966 9967 9646
+3 9651 9969 9971
+3 9652 9970 9969
+3 9651 9652 9969
+3 9970 9652 9647
+3 9650 9654 9966
+3 9654 9973 9966
+3 9974 9655 9651
+3 9971 9974 9651
+3 9651 9655 9652
+3 9654 9653 9972
+3 9973 9654 9972
+3 9974 9656 9655
+3 9975 9656 9974
+3 9653 9658 9972
+3 9658 9976 9972
+3 9656 9977 9659
+3 9975 9977 9656
+3 9979 9658 9657
+3 9976 9658 9979
+3 9980 9659 9977
+3 9660 9659 9980
+3 9661 9978 9657
+3 9978 9979 9657
+3 9662 9660 9981
+3 9660 9980 9981
+3 9661 9664 9978
+3 9664 9982 9978
+3 9662 9983 9665
+3 9981 9983 9662
+3 9985 9664 9663
+3 9982 9664 9985
+3 9986 9666 9665
+3 9983 9986 9665
+3 9667 9984 9663
+3 9984 9985 9663
+3 9987 9666 9986
+3 9668 9666 9987
+3 9667 9669 9984
+3 9669 9988 9984
+3 9670 9668 9989
+3 9668 9987 9989
+3 9669 9672 9988
+3 9672 9990 9988
+3 9673 9670 9991
+3 9670 9989 9991
+3 9992 9672 9671
+3 9990 9672 9992
+3 9673 9993 9674
+3 9991 9993 9673
+3 9992 9671 9675
+3 9994 9992 9675
+3 9995 9676 9674
+3 9993 9995 9674
+3 9994 9675 9677
+3 9996 9994 9677
+3 9997 9676 9995
+3 9678 9676 9997
+3 9996 9677 9679
+3 9999 9996 9679
+3 9680 9678 10000
+3 9678 9997 10000
+3 9681 9998 9679
+3 9998 9999 9679
+3 9682 9680 10001
+3 9680 10000 10001
+3 9681 9683 9998
+3 9683 10002 9998
+3 9684 9682 10003
+3 9682 10001 10003
+3 9683 9685 10002
+3 9685 10004 10002
+3 9686 9684 10005
+3 9684 10003 10005
+3 9685 9687 10004
+3 9687 10006 10004
+3 9688 9686 10007
+3 9686 10005 10007
+3 9687 9689 10006
+3 9689 10008 10006
+3 9690 9688 10009
+3 9688 10007 10009
+3 9689 9691 10008
+3 10008 9691 10010
+3 9692 9690 10011
+3 9690 10009 10011
+3 10010 9691 9693
+3 10012 10010 9693
+3 9694 9692 10013
+3 9692 10011 10013
+3 10012 9693 9695
+3 10014 10012 9695
+3 9696 9694 10015
+3 9694 10013 10015
+3 10014 9695 9697
+3 10016 10014 9697
+3 9698 10015 10017
+3 9696 10015 9698
+3 9699 10016 9697
+3 10018 10016 9699
+3 10017 9700 9698
+3 10019 9700 10017
+3 9699 9705 10018
+3 9705 10021 10018
+3 9706 9700 10022
+3 9700 10019 10022
+3 9702 9701 10020
+3 10020 9703 9702
+3 10024 9703 10020
+3 9703 10024 9704
+3 9705 9708 10021
+3 9708 10026 10021
+3 9709 9706 10027
+3 9706 10022 10027
+3 9711 10023 9701
+3 10023 10020 9701
+3 10025 9704 10024
+3 10029 9707 9704
+3 10025 10029 9704
+3 9707 10029 9712
+3 9708 9714 10026
+3 10026 9714 10031
+3 9715 9709 10032
+3 9709 10027 10032
+3 9711 9710 10028
+3 10023 9711 10028
+3 10030 9712 10029
+3 10030 9713 9712
+3 10033 9713 10030
+3 9713 10033 9716
+3 10031 9714 9718
+3 10035 10031 9718
+3 9719 10032 10036
+3 9715 10032 9719
+3 9710 9720 10028
+3 9720 10037 10028
+3 10034 9716 10033
+3 10034 9717 9716
+3 10038 9717 10034
+3 9717 10038 9721
+3 10035 9718 9724
+3 10039 10035 9724
+3 10036 9725 9719
+3 10040 9725 10036
+3 9720 9727 10037
+3 9727 10042 10037
+3 10043 9721 10038
+3 9721 10043 9722
+3 9728 9724 9723
+3 10039 9724 9728
+3 10047 10039 9728
+3 9729 9725 10048
+3 9725 10040 10048
+3 9727 9726 10041
+3 10042 9727 10041
+3 10044 9722 10043
+3 10045 9723 9722
+3 10044 10045 9722
+3 10046 9728 9723
+3 10045 10046 9723
+3 10046 10047 9728
+3 9730 10048 10050
+3 9729 10048 9730
+3 9726 9731 10041
+3 9731 10051 10041
+3 10050 9732 9730
+3 10052 9732 10050
+3 9731 9734 10051
+3 9734 10054 10051
+3 9735 10052 10055
+3 9732 10052 9735
+3 9734 9733 10053
+3 10054 9734 10053
+3 10056 9736 9735
+3 10055 10056 9735
+3 9736 9737 9735
+3 9733 9738 10053
+3 9738 10057 10053
+3 10058 9739 9736
+3 10056 10058 9736
+3 9736 9739 9737
+3 9739 9740 9737
+3 9740 9741 9737
+3 9738 9742 10057
+3 9742 10059 10057
+3 10060 9743 9739
+3 10058 10060 9739
+3 9739 9743 9740
+3 9743 9744 9740
+3 9740 9744 9741
+3 9744 9745 9741
+3 9745 9746 9741
+3 9742 9747 10059
+3 9747 10061 10059
+3 10063 9748 9743
+3 10060 10063 9743
+3 9743 9748 9744
+3 9748 9749 9744
+3 9744 9749 9745
+3 9749 9750 9745
+3 9745 9750 9746
+3 9750 9751 9746
+3 9747 9752 10061
+3 9752 10064 10061
+3 9759 10063 10072
+3 9759 9748 10063
+3 9760 9748 9759
+3 9748 9760 9749
+3 9760 9761 9749
+3 9749 9761 9750
+3 9761 9762 9750
+3 9750 9762 9751
+3 9762 9763 9751
+3 10064 9752 10065
+3 9752 9753 10065
+3 10065 9753 10066
+3 9753 9754 10066
+3 10066 9754 10067
+3 9754 9755 10067
+3 10067 9755 10068
+3 9755 9756 10068
+3 10068 9756 10069
+3 9756 9757 10069
+3 10069 9757 10070
+3 9757 9758 10070
+3 10073 10070 9758
+3 9764 10073 9758
+3 10077 9767 9759
+3 10072 10077 9759
+3 9759 9767 9760
+3 9767 9768 9760
+3 9760 9768 9761
+3 9768 9769 9761
+3 9761 9769 9762
+3 9769 9770 9762
+3 9762 9770 9763
+3 10073 9764 10074
+3 9764 9765 10074
+3 10074 9765 10075
+3 9765 9766 10075
+3 10078 10075 9766
+3 9771 10078 9766
+3 10083 9773 9767
+3 10077 10083 9767
+3 9767 9773 9768
+3 9773 9774 9768
+3 9768 9774 9769
+3 10078 9771 10079
+3 9771 9772 10079
+3 10080 9772 9775
+3 10079 9772 10080
+3 10080 9775 10084
+3 9778 10083 10088
+3 9778 9773 10083
+3 9779 9773 9778
+3 9773 9779 9774
+3 9776 10084 9775
+3 10084 9776 10085
+3 9776 9777 10085
+3 10086 9777 9780
+3 10085 9777 10086
+3 10086 9780 10089
+3 9782 10088 10093
+3 9782 9778 10088
+3 9783 9778 9782
+3 9778 9783 9779
+3 9781 10089 9780
+3 10090 9781 9784
+3 10089 9781 10090
+3 9785 10091 10090
+3 9784 9785 10090
+3 10091 9785 10094
+3 9786 10093 10097
+3 10093 9786 9782
+3 10094 9785 9787
+3 9788 10095 10094
+3 9787 9788 10094
+3 10095 9788 10098
+3 9795 10097 10109
+3 10097 9795 9786
+3 9789 10098 9788
+3 10099 9789 9796
+3 10098 9789 10099
+3 9797 10100 10099
+3 9796 9797 10099
+3 9798 10101 10100
+3 9797 9798 10100
+3 9790 10101 9798
+3 10102 10101 9790
+3 10102 9790 10103
+3 9790 9791 10103
+3 10104 9791 9799
+3 10103 9791 10104
+3 10104 9799 10110
+3 9802 10105 10113
+3 9792 10105 9802
+3 10106 10105 9792
+3 10106 9792 10107
+3 9792 9793 10107
+3 10108 9793 9803
+3 10107 9793 10108
+3 9794 10108 9803
+3 10109 10108 9794
+3 9794 9795 10109
+3 9800 10110 9799
+3 10111 9800 9804
+3 10110 9800 10111
+3 10111 9804 10114
+3 9807 10112 10119
+3 9801 10112 9807
+3 10113 10112 9801
+3 9801 9802 10113
+3 9805 10114 9804
+3 10115 9805 9808
+3 10114 9805 10115
+3 9809 10116 10115
+3 9808 9809 10115
+3 10116 9809 10120
+3 9816 10117 10130
+3 9817 10118 10117
+3 9816 9817 10117
+3 9806 10118 9817
+3 10119 10118 9806
+3 9806 9807 10119
+3 9810 10120 9809
+3 10120 9810 10121
+3 9810 9811 10121
+3 10121 9811 10122
+3 9811 9812 10122
+3 10123 9812 9818
+3 10122 9812 10123
+3 9819 10124 10123
+3 9818 9819 10123
+3 9820 10125 10124
+3 9819 9820 10124
+3 9821 10126 10125
+3 9820 9821 10125
+3 9822 10127 10126
+3 9821 9822 10126
+3 9813 10127 9822
+3 10128 10127 9813
+3 10128 9813 10129
+3 9813 9814 10129
+3 10129 9814 10130
+3 9814 9815 10130
+3 9815 9816 10130
+3 9830 9829 10131
+3 9830 10131 9831
+3 10131 10132 9831
+3 9831 10132 9832
+3 10132 10133 9832
+3 9832 10134 9823
+3 10133 10134 9832
+3 10135 9824 9823
+3 10134 10135 9823
+3 10136 9825 9824
+3 10135 10136 9824
+3 10137 9826 9825
+3 10136 10137 9825
+3 10138 9827 9826
+3 10137 10138 9826
+3 10139 9828 9827
+3 10138 10139 9827
+3 10140 9833 9828
+3 10139 10140 9828
+3 10140 9834 9833
+3 10141 9834 10140
+3 9834 10141 9835
+3 10141 10144 9835
+3 9835 10144 9838
+3 9837 9836 10142
+3 9837 10143 9829
+3 10142 10143 9837
+3 10143 10131 9829
+3 10145 9838 10144
+3 10145 9839 9838
+3 10147 9839 10145
+3 9839 10147 9841
+3 9836 9840 10146
+3 10146 10142 9836
+3 10148 9841 10147
+3 10148 9842 9841
+3 10151 9842 10148
+3 9842 10151 9844
+3 9843 10150 9840
+3 10149 10150 9843
+3 10150 10146 9840
+3 10153 9844 10151
+3 9844 10153 9846
+3 9843 9845 10152
+3 10149 9843 10152
+3 10155 9846 10153
+3 9846 10155 9849
+3 9848 9847 10154
+3 9845 9848 10154
+3 10152 9845 10154
+3 10156 9849 10155
+3 9849 10156 9850
+3 10154 9847 9852
+3 10158 10154 9852
+3 10159 9853 9850
+3 10156 10159 9850
+3 9852 9851 10157
+3 10157 10158 9852
+3 10160 9853 10159
+3 9853 10160 9854
+3 10157 9851 9856
+3 10162 10157 9856
+3 10163 9854 10160
+3 9857 9854 10163
+3 9856 9855 10161
+3 10161 10162 9856
+3 9857 10164 9858
+3 10163 10164 9857
+3 10161 9855 9859
+3 10165 10161 9859
+3 10166 9860 9858
+3 10164 10166 9858
+3 10165 9859 9861
+3 10168 10165 9861
+3 10169 9860 10166
+3 9862 9860 10169
+3 9863 10167 9861
+3 10167 10168 9861
+3 9864 9862 10170
+3 9862 10169 10170
+3 9863 9865 10167
+3 9865 10171 10167
+3 9866 9864 10172
+3 9864 10170 10172
+3 9865 9867 10171
+3 9867 10173 10171
+3 9866 10174 9868
+3 10172 10174 9866
+3 9867 9869 10173
+3 9869 10175 10173
+3 10176 9870 9868
+3 10174 10176 9868
+3 9869 9871 10175
+3 9871 10177 10175
+3 10178 9872 9870
+3 10176 10178 9870
+3 9871 9873 10177
+3 9873 10179 10177
+3 10178 9874 9872
+3 10180 9874 10178
+3 9873 9875 10179
+3 9875 10181 10179
+3 9876 9874 10182
+3 9874 10180 10182
+3 9875 9877 10181
+3 10181 9877 10183
+3 9878 9876 10184
+3 9876 10182 10184
+3 10183 9877 9879
+3 10185 10183 9879
+3 9880 10184 10186
+3 9878 10184 9880
+3 9881 10185 9879
+3 10187 10185 9881
+3 10188 9882 9880
+3 10186 10188 9880
+3 9881 9883 10187
+3 10187 9883 10189
+3 10188 9884 9882
+3 10190 9884 10188
+3 9885 10189 9883
+3 10191 10189 9885
+3 9886 10190 10192
+3 9884 10190 9886
+3 9885 9887 10191
+3 10191 9887 10193
+3 10192 9888 9886
+3 10194 9888 10192
+3 9889 10193 9887
+3 10195 10193 9889
+3 9890 10194 10196
+3 9888 10194 9890
+3 10199 10195 9889
+3 9894 10199 9889
+3 9895 10196 10200
+3 10196 9895 9890
+3 9892 9891 10197
+3 9892 10197 9893
+3 10197 10198 9893
+3 9893 10198 9897
+3 10198 10202 9897
+3 9894 9898 10199
+3 10199 9898 10203
+3 9899 10200 10204
+3 10200 9899 9895
+3 9891 9896 10201
+3 10201 10197 9891
+3 10202 10207 9902
+3 9897 10202 9902
+3 10203 9898 9903
+3 10203 9903 10208
+3 9904 10204 10209
+3 10204 9904 9899
+3 9901 9900 10205
+3 9901 10206 9896
+3 10205 10206 9901
+3 10206 10201 9896
+3 9906 9902 10211
+3 9902 10207 10211
+3 10208 9903 9907
+3 10208 9907 10212
+3 9908 10209 10213
+3 10209 9908 9904
+3 9900 9905 10210
+3 10210 10205 9900
+3 10211 10216 9911
+3 9906 10211 9911
+3 10212 9907 9912
+3 10217 10212 9912
+3 9913 10213 10219
+3 10213 9913 9908
+3 9910 9909 10214
+3 9910 10215 9905
+3 10214 10215 9910
+3 10215 10210 9905
+3 10216 10221 9916
+3 9911 10216 9916
+3 10217 9912 9919
+3 10224 10217 9919
+3 10225 9913 10219
+3 9913 10225 9920
+3 9909 9915 10220
+3 10220 10214 9909
+3 9922 9916 10228
+3 9916 10221 10228
+3 9918 9917 10222
+3 9918 10223 9919
+3 10222 10223 9918
+3 10223 10224 9919
+3 10231 9920 10225
+3 9920 10231 9925
+3 9929 9914 9921
+3 9915 9929 10226
+3 9914 9929 9915
+3 10226 10220 9915
+3 10228 10236 9930
+3 9922 10228 9930
+3 9924 9923 10229
+3 9924 10230 9917
+3 10229 10230 9924
+3 10230 10222 9917
+3 10232 9925 10231
+3 10232 9926 9925
+3 10238 9926 10232
+3 9926 10238 9932
+3 9921 9928 10233
+3 10234 9929 9921
+3 10233 10234 9921
+3 10234 10226 9929
+3 10236 10241 9937
+3 9930 10236 9937
+3 9923 9931 10237
+3 10237 10229 9923
+3 10243 9932 10238
+3 9932 10243 9933
+3 9939 9927 9936
+3 9928 9939 10239
+3 9927 9939 9928
+3 10239 10233 9928
+3 9940 9937 10248
+3 9937 10241 10248
+3 9931 9938 10242
+3 10242 10237 9931
+3 10250 9933 10243
+3 9942 9933 10250
+3 9934 9933 9942
+3 9934 9942 9935
+3 9942 9943 9935
+3 9935 9943 9936
+3 9943 9944 9936
+3 9939 9944 10244
+3 9936 9944 9939
+3 10244 10239 9939
+3 9940 10257 9945
+3 10248 10257 9940
+3 9938 9941 10249
+3 10249 10242 9938
+3 10251 9942 10250
+3 10252 9943 9942
+3 10251 10252 9942
+3 10253 9944 9943
+3 10252 10253 9943
+3 10253 10244 9944
+3 10268 9947 9945
+3 10257 10268 9945
+3 9941 9946 10258
+3 10258 10249 9941
+3 9950 10263 10277
+3 9951 10264 10263
+3 9950 9951 10263
+3 9952 10265 10264
+3 9951 9952 10264
+3 9953 10266 10265
+3 9952 9953 10265
+3 9954 10267 10266
+3 9953 9954 10266
+3 9955 10268 10267
+3 9954 9955 10267
+3 10268 9955 9947
+3 9946 9948 10269
+3 10269 10258 9946
+3 9957 10276 10286
+3 9949 10276 9957
+3 10277 10276 9949
+3 9949 9950 10277
+3 10269 9948 9959
+3 10288 10269 9959
+3 9961 10284 10297
+3 9962 10285 10284
+3 9961 9962 10284
+3 9956 10285 9962
+3 10286 10285 9956
+3 9956 9957 10286
+3 9959 9958 10287
+3 10287 10288 9959
+3 9963 10294 10302
+3 9964 10295 10294
+3 9963 9964 10294
+3 9965 10296 10295
+3 9964 9965 10295
+3 9960 10296 9965
+3 10297 10296 9960
+3 9960 9961 10297
+3 9967 10298 9958
+3 10298 10287 9958
+3 9968 10301 10304
+3 9969 10302 10301
+3 9968 9969 10301
+3 9969 9963 10302
+3 9970 9963 9969
+3 9963 9970 9964
+3 10306 9967 9966
+3 10298 9967 10306
+3 10307 9971 9968
+3 10304 10307 9968
+3 9968 9971 9969
+3 9973 10305 9966
+3 10305 10306 9966
+3 10308 9974 9971
+3 10307 10308 9971
+3 10310 9973 9972
+3 10305 9973 10310
+3 10311 9975 9974
+3 10308 10311 9974
+3 9976 10309 9972
+3 10309 10310 9972
+3 10312 9975 10311
+3 9977 9975 10312
+3 9976 9979 10309
+3 9979 10313 10309
+3 9977 10314 9980
+3 10312 10314 9977
+3 10316 9979 9978
+3 10313 9979 10316
+3 10317 9980 10314
+3 9981 9980 10317
+3 9982 10315 9978
+3 10315 10316 9978
+3 9983 9981 10318
+3 9981 10317 10318
+3 9982 9985 10315
+3 9985 10319 10315
+3 9986 9983 10320
+3 9983 10318 10320
+3 10321 9985 9984
+3 10319 9985 10321
+3 9986 10322 9987
+3 10320 10322 9986
+3 10321 9984 9988
+3 10324 10321 9988
+3 10325 9987 10322
+3 9989 9987 10325
+3 9990 10323 9988
+3 10323 10324 9988
+3 9991 9989 10326
+3 9989 10325 10326
+3 9990 9992 10323
+3 9992 10327 10323
+3 9993 9991 10328
+3 9991 10326 10328
+3 9992 9994 10327
+3 9994 10329 10327
+3 9995 9993 10330
+3 9993 10328 10330
+3 9994 9996 10329
+3 9996 10331 10329
+3 9995 10332 9997
+3 10330 10332 9995
+3 9996 9999 10331
+3 9999 10333 10331
+3 10334 10000 9997
+3 10332 10334 9997
+3 10335 9999 9998
+3 10333 9999 10335
+3 10336 10001 10000
+3 10334 10336 10000
+3 10335 9998 10002
+3 10337 10335 10002
+3 10338 10003 10001
+3 10336 10338 10001
+3 10337 10002 10004
+3 10339 10337 10004
+3 10340 10005 10003
+3 10338 10340 10003
+3 10339 10004 10006
+3 10341 10339 10006
+3 10342 10007 10005
+3 10340 10342 10005
+3 10341 10006 10008
+3 10343 10341 10008
+3 10344 10009 10007
+3 10342 10344 10007
+3 10010 10343 10008
+3 10345 10343 10010
+3 10346 10011 10009
+3 10344 10346 10009
+3 10010 10012 10345
+3 10012 10347 10345
+3 10348 10013 10011
+3 10346 10348 10011
+3 10012 10014 10347
+3 10014 10349 10347
+3 10350 10015 10013
+3 10348 10350 10013
+3 10014 10016 10349
+3 10016 10351 10349
+3 10350 10017 10015
+3 10352 10017 10350
+3 10016 10018 10351
+3 10018 10353 10351
+3 10019 10017 10354
+3 10017 10352 10354
+3 10018 10021 10353
+3 10353 10021 10355
+3 10022 10019 10356
+3 10019 10354 10356
+3 10355 10021 10026
+3 10360 10355 10026
+3 10027 10356 10361
+3 10022 10356 10027
+3 10023 10358 10020
+3 10357 10358 10023
+3 10359 10024 10020
+3 10358 10359 10020
+3 10359 10025 10024
+3 10362 10025 10359
+3 10025 10362 10029
+3 10031 10360 10026
+3 10363 10360 10031
+3 10364 10032 10027
+3 10361 10364 10027
+3 10366 10023 10028
+3 10357 10023 10366
+3 10367 10029 10362
+3 10029 10367 10030
+3 10031 10035 10363
+3 10035 10369 10363
+3 10364 10036 10032
+3 10370 10036 10364
+3 10037 10365 10028
+3 10365 10366 10028
+3 10368 10030 10367
+3 10371 10033 10030
+3 10368 10371 10030
+3 10033 10371 10034
+3 10035 10039 10369
+3 10369 10039 10373
+3 10040 10036 10374
+3 10036 10370 10374
+3 10037 10042 10365
+3 10042 10375 10365
+3 10372 10034 10371
+3 10376 10038 10034
+3 10372 10376 10034
+3 10038 10376 10043
+3 10373 10039 10047
+3 10377 10373 10047
+3 10048 10374 10378
+3 10040 10374 10048
+3 10380 10042 10041
+3 10375 10042 10380
+3 10382 10043 10376
+3 10043 10382 10044
+3 10049 10047 10046
+3 10377 10047 10049
+3 10387 10377 10049
+3 10378 10050 10048
+3 10388 10050 10378
+3 10051 10379 10041
+3 10379 10380 10041
+3 10383 10044 10382
+3 10384 10045 10044
+3 10383 10384 10044
+3 10385 10046 10045
+3 10384 10385 10045
+3 10386 10049 10046
+3 10385 10386 10046
+3 10386 10387 10049
+3 10052 10388 10390
+3 10050 10388 10052
+3 10051 10054 10379
+3 10054 10391 10379
+3 10390 10055 10052
+3 10395 10055 10390
+3 10397 10054 10053
+3 10391 10054 10397
+3 10056 10395 10399
+3 10055 10395 10056
+3 10057 10396 10053
+3 10396 10397 10053
+3 10400 10058 10056
+3 10399 10400 10056
+3 10057 10059 10396
+3 10059 10401 10396
+3 10402 10060 10058
+3 10400 10402 10058
+3 10059 10061 10401
+3 10061 10403 10401
+3 10062 10402 10408
+3 10062 10060 10402
+3 10063 10060 10062
+3 10061 10064 10403
+3 10065 10404 10403
+3 10064 10065 10403
+3 10066 10405 10404
+3 10065 10066 10404
+3 10067 10406 10405
+3 10066 10067 10405
+3 10068 10407 10406
+3 10067 10068 10406
+3 10407 10068 10409
+3 10071 10408 10412
+3 10071 10062 10408
+3 10072 10062 10071
+3 10062 10072 10063
+3 10069 10409 10068
+3 10409 10069 10410
+3 10069 10070 10410
+3 10411 10070 10073
+3 10410 10070 10411
+3 10411 10073 10413
+3 10417 10076 10071
+3 10412 10417 10071
+3 10071 10076 10072
+3 10076 10077 10072
+3 10074 10413 10073
+3 10413 10074 10414
+3 10074 10075 10414
+3 10415 10075 10078
+3 10414 10075 10415
+3 10079 10416 10415
+3 10078 10079 10415
+3 10416 10079 10418
+3 10081 10417 10422
+3 10081 10076 10417
+3 10082 10076 10081
+3 10076 10082 10077
+3 10082 10083 10077
+3 10080 10418 10079
+3 10419 10080 10084
+3 10418 10080 10419
+3 10085 10420 10419
+3 10084 10085 10419
+3 10086 10421 10420
+3 10085 10086 10420
+3 10421 10086 10423
+3 10429 10087 10081
+3 10422 10429 10081
+3 10081 10087 10082
+3 10087 10088 10082
+3 10082 10088 10083
+3 10423 10086 10089
+3 10090 10424 10423
+3 10089 10090 10423
+3 10091 10425 10424
+3 10090 10091 10424
+3 10425 10091 10430
+3 10092 10429 10435
+3 10092 10087 10429
+3 10093 10087 10092
+3 10087 10093 10088
+3 10430 10091 10094
+3 10095 10431 10430
+3 10094 10095 10430
+3 10431 10095 10436
+3 10096 10435 10444
+3 10096 10092 10435
+3 10097 10092 10096
+3 10092 10097 10093
+3 10436 10095 10098
+3 10099 10437 10436
+3 10098 10099 10436
+3 10100 10438 10437
+3 10099 10100 10437
+3 10438 10100 10445
+3 10102 10440 10445
+3 10103 10441 10440
+3 10102 10103 10440
+3 10441 10103 10446
+3 10106 10442 10449
+3 10107 10443 10442
+3 10106 10107 10442
+3 10108 10444 10443
+3 10107 10108 10443
+3 10108 10096 10444
+3 10109 10096 10108
+3 10096 10109 10097
+3 10101 10445 10100
+3 10101 10102 10445
+3 10104 10446 10103
+3 10447 10104 10110
+3 10446 10104 10447
+3 10447 10110 10450
+3 10113 10448 10454
+3 10105 10448 10113
+3 10449 10448 10105
+3 10105 10106 10449
+3 10111 10450 10110
+3 10451 10111 10114
+3 10450 10111 10451
+3 10115 10452 10451
+3 10114 10115 10451
+3 10452 10115 10455
+3 10119 10453 10461
+3 10112 10453 10119
+3 10454 10453 10112
+3 10112 10113 10454
+3 10116 10455 10115
+3 10456 10116 10120
+3 10455 10116 10456
+3 10121 10457 10456
+3 10120 10121 10456
+3 10457 10121 10462
+3 10129 10458 10468
+3 10130 10459 10458
+3 10129 10130 10458
+3 10117 10459 10130
+3 10460 10459 10117
+3 10460 10117 10461
+3 10117 10118 10461
+3 10118 10119 10461
+3 10122 10462 10121
+3 10462 10122 10463
+3 10122 10123 10463
+3 10463 10123 10464
+3 10123 10124 10464
+3 10464 10124 10465
+3 10124 10125 10465
+3 10465 10125 10466
+3 10125 10126 10466
+3 10466 10126 10467
+3 10126 10127 10467
+3 10467 10127 10468
+3 10127 10128 10468
+3 10128 10129 10468
+3 10134 10133 10469
+3 10134 10469 10135
+3 10469 10470 10135
+3 10135 10470 10136
+3 10470 10471 10136
+3 10136 10471 10137
+3 10471 10472 10137
+3 10137 10472 10138
+3 10472 10473 10138
+3 10138 10473 10139
+3 10473 10477 10139
+3 10139 10477 10140
+3 10131 10143 10474
+3 10475 10132 10131
+3 10474 10475 10131
+3 10476 10133 10132
+3 10475 10476 10132
+3 10476 10469 10133
+3 10478 10140 10477
+3 10479 10141 10140
+3 10478 10479 10140
+3 10480 10144 10141
+3 10479 10480 10141
+3 10480 10145 10144
+3 10483 10145 10480
+3 10145 10483 10147
+3 10142 10146 10481
+3 10482 10143 10142
+3 10481 10482 10142
+3 10482 10474 10143
+3 10484 10147 10483
+3 10484 10148 10147
+3 10487 10148 10484
+3 10148 10487 10151
+3 10150 10149 10485
+3 10150 10486 10146
+3 10485 10486 10150
+3 10486 10481 10146
+3 10489 10151 10487
+3 10151 10489 10153
+3 10149 10152 10488
+3 10488 10485 10149
+3 10491 10153 10489
+3 10153 10491 10155
+3 10152 10154 10490
+3 10490 10488 10152
+3 10493 10155 10491
+3 10155 10493 10156
+3 10158 10492 10154
+3 10492 10490 10154
+3 10494 10156 10493
+3 10159 10156 10494
+3 10496 10158 10157
+3 10492 10158 10496
+3 10159 10497 10160
+3 10494 10497 10159
+3 10162 10495 10157
+3 10495 10496 10157
+3 10498 10160 10497
+3 10160 10498 10163
+3 10500 10162 10161
+3 10495 10162 10500
+3 10501 10164 10163
+3 10498 10501 10163
+3 10165 10499 10161
+3 10499 10500 10161
+3 10502 10164 10501
+3 10166 10164 10502
+3 10165 10168 10499
+3 10168 10503 10499
+3 10166 10504 10169
+3 10502 10504 10166
+3 10505 10168 10167
+3 10503 10168 10505
+3 10506 10170 10169
+3 10504 10506 10169
+3 10505 10167 10171
+3 10507 10505 10171
+3 10508 10172 10170
+3 10506 10508 10170
+3 10507 10171 10173
+3 10509 10507 10173
+3 10510 10172 10508
+3 10174 10172 10510
+3 10509 10173 10175
+3 10511 10509 10175
+3 10176 10174 10512
+3 10174 10510 10512
+3 10511 10175 10177
+3 10513 10511 10177
+3 10178 10176 10514
+3 10176 10512 10514
+3 10513 10177 10179
+3 10515 10513 10179
+3 10180 10514 10516
+3 10178 10514 10180
+3 10515 10179 10181
+3 10517 10515 10181
+3 10518 10182 10180
+3 10516 10518 10180
+3 10183 10517 10181
+3 10519 10517 10183
+3 10520 10184 10182
+3 10518 10520 10182
+3 10183 10185 10519
+3 10185 10521 10519
+3 10520 10186 10184
+3 10522 10186 10520
+3 10185 10187 10521
+3 10521 10187 10523
+3 10188 10186 10524
+3 10186 10522 10524
+3 10189 10523 10187
+3 10525 10523 10189
+3 10190 10524 10526
+3 10188 10524 10190
+3 10189 10191 10525
+3 10525 10191 10527
+3 10526 10192 10190
+3 10528 10192 10526
+3 10193 10527 10191
+3 10529 10527 10193
+3 10194 10528 10530
+3 10192 10528 10194
+3 10193 10195 10529
+3 10529 10195 10531
+3 10196 10530 10532
+3 10530 10196 10194
+3 10531 10195 10199
+3 10531 10199 10533
+3 10200 10532 10534
+3 10532 10200 10196
+3 10198 10197 10537
+3 10198 10537 10202
+3 10533 10199 10203
+3 10533 10203 10539
+3 10204 10534 10540
+3 10534 10204 10200
+3 10201 10536 10197
+3 10535 10536 10201
+3 10536 10537 10197
+3 10538 10202 10537
+3 10538 10207 10202
+3 10542 10207 10538
+3 10539 10203 10208
+3 10539 10208 10543
+3 10209 10540 10544
+3 10540 10209 10204
+3 10206 10205 10541
+3 10201 10206 10541
+3 10535 10201 10541
+3 10211 10207 10546
+3 10207 10542 10546
+3 10543 10208 10212
+3 10543 10212 10547
+3 10213 10544 10550
+3 10544 10213 10209
+3 10205 10210 10545
+3 10545 10541 10205
+3 10546 10552 10216
+3 10211 10546 10216
+3 10212 10218 10547
+3 10217 10218 10212
+3 10547 10218 10554
+3 10219 10550 10557
+3 10550 10219 10213
+3 10210 10215 10551
+3 10551 10545 10210
+3 10552 10560 10221
+3 10216 10552 10221
+3 10218 10224 10553
+3 10217 10224 10218
+3 10553 10554 10218
+3 10565 10219 10557
+3 10219 10565 10225
+3 10227 10214 10220
+3 10215 10227 10558
+3 10214 10227 10215
+3 10558 10551 10215
+3 10228 10221 10568
+3 10221 10560 10568
+3 10223 10222 10561
+3 10223 10562 10224
+3 10561 10562 10223
+3 10562 10553 10224
+3 10571 10225 10565
+3 10225 10571 10231
+3 10235 10220 10226
+3 10227 10235 10566
+3 10220 10235 10227
+3 10566 10558 10227
+3 10568 10575 10236
+3 10228 10568 10236
+3 10230 10229 10569
+3 10230 10570 10222
+3 10569 10570 10230
+3 10570 10561 10222
+3 10572 10231 10571
+3 10572 10232 10231
+3 10577 10232 10572
+3 10232 10577 10238
+3 10240 10226 10234
+3 10235 10240 10573
+3 10226 10240 10235
+3 10573 10566 10235
+3 10236 10580 10241
+3 10575 10580 10236
+3 10229 10237 10576
+3 10576 10569 10229
+3 10582 10238 10577
+3 10238 10582 10243
+3 10245 10233 10239
+3 10233 10245 10234
+3 10245 10246 10234
+3 10234 10246 10240
+3 10246 10247 10240
+3 10573 10240 10247
+3 10584 10573 10247
+3 10588 10241 10580
+3 10248 10241 10588
+3 10237 10242 10581
+3 10581 10576 10237
+3 10590 10243 10582
+3 10243 10590 10250
+3 10254 10239 10244
+3 10239 10254 10245
+3 10254 10255 10245
+3 10245 10255 10246
+3 10255 10256 10246
+3 10247 10256 10583
+3 10246 10256 10247
+3 10583 10584 10247
+3 10257 10588 10599
+3 10248 10588 10257
+3 10242 10249 10589
+3 10589 10581 10242
+3 10601 10250 10590
+3 10250 10601 10251
+3 10259 10244 10253
+3 10244 10259 10254
+3 10259 10260 10254
+3 10254 10260 10255
+3 10260 10261 10255
+3 10255 10261 10256
+3 10261 10262 10256
+3 10583 10256 10262
+3 10603 10583 10262
+3 10263 10595 10610
+3 10264 10596 10595
+3 10263 10264 10595
+3 10265 10597 10596
+3 10264 10265 10596
+3 10266 10598 10597
+3 10265 10266 10597
+3 10267 10599 10598
+3 10266 10267 10598
+3 10267 10257 10599
+3 10268 10257 10267
+3 10249 10258 10600
+3 10600 10589 10249
+3 10602 10251 10601
+3 10612 10252 10251
+3 10602 10612 10251
+3 10270 10252 10612
+3 10253 10252 10270
+3 10253 10270 10259
+3 10270 10271 10259
+3 10259 10271 10260
+3 10271 10272 10260
+3 10260 10272 10261
+3 10272 10273 10261
+3 10261 10273 10262
+3 10273 10274 10262
+3 10262 10275 10603
+3 10274 10275 10262
+3 10603 10275 10613
+3 10276 10609 10619
+3 10277 10610 10609
+3 10276 10277 10609
+3 10610 10277 10263
+3 10258 10269 10611
+3 10611 10600 10258
+3 10622 10270 10612
+3 10278 10270 10622
+3 10271 10270 10278
+3 10271 10278 10272
+3 10278 10279 10272
+3 10272 10279 10273
+3 10279 10280 10273
+3 10273 10280 10274
+3 10280 10281 10274
+3 10274 10281 10275
+3 10281 10282 10275
+3 10275 10283 10613
+3 10282 10283 10275
+3 10613 10283 10623
+3 10284 10617 10625
+3 10285 10618 10617
+3 10284 10285 10617
+3 10286 10619 10618
+3 10285 10286 10618
+3 10619 10286 10276
+3 10288 10620 10269
+3 10620 10611 10269
+3 10626 10289 10278
+3 10622 10626 10278
+3 10278 10289 10279
+3 10289 10290 10279
+3 10279 10290 10280
+3 10290 10291 10280
+3 10280 10291 10281
+3 10291 10292 10281
+3 10281 10292 10282
+3 10292 10293 10282
+3 10282 10293 10283
+3 10293 10294 10283
+3 10283 10295 10623
+3 10294 10295 10283
+3 10296 10624 10623
+3 10295 10296 10623
+3 10297 10625 10624
+3 10296 10297 10624
+3 10625 10297 10284
+3 10628 10288 10287
+3 10620 10288 10628
+3 10629 10289 10626
+3 10299 10289 10629
+3 10290 10289 10299
+3 10290 10299 10291
+3 10299 10300 10291
+3 10291 10300 10292
+3 10300 10301 10292
+3 10292 10301 10293
+3 10301 10302 10293
+3 10293 10302 10294
+3 10287 10298 10627
+3 10627 10628 10287
+3 10631 10303 10299
+3 10629 10631 10299
+3 10299 10303 10300
+3 10303 10304 10300
+3 10300 10304 10301
+3 10306 10630 10298
+3 10630 10627 10298
+3 10632 10303 10631
+3 10307 10303 10632
+3 10304 10303 10307
+3 10634 10306 10305
+3 10630 10306 10634
+3 10635 10308 10307
+3 10632 10635 10307
+3 10310 10633 10305
+3 10633 10634 10305
+3 10636 10308 10635
+3 10311 10308 10636
+3 10637 10310 10309
+3 10633 10310 10637
+3 10311 10638 10312
+3 10636 10638 10311
+3 10637 10309 10313
+3 10640 10637 10313
+3 10641 10312 10638
+3 10314 10312 10641
+3 10316 10639 10313
+3 10639 10640 10313
+3 10314 10642 10317
+3 10641 10642 10314
+3 10643 10316 10315
+3 10639 10316 10643
+3 10644 10318 10317
+3 10642 10644 10317
+3 10643 10315 10319
+3 10646 10643 10319
+3 10647 10318 10644
+3 10320 10318 10647
+3 10321 10645 10319
+3 10645 10646 10319
+3 10322 10320 10648
+3 10320 10647 10648
+3 10321 10324 10645
+3 10324 10649 10645
+3 10322 10650 10325
+3 10648 10650 10322
+3 10651 10324 10323
+3 10649 10324 10651
+3 10652 10326 10325
+3 10650 10652 10325
+3 10651 10323 10327
+3 10653 10651 10327
+3 10654 10326 10652
+3 10328 10326 10654
+3 10653 10327 10329
+3 10655 10653 10329
+3 10330 10328 10656
+3 10328 10654 10656
+3 10655 10329 10331
+3 10658 10655 10331
+3 10332 10330 10659
+3 10330 10656 10659
+3 10333 10657 10331
+3 10657 10658 10331
+3 10334 10332 10660
+3 10332 10659 10660
+3 10333 10335 10657
+3 10335 10661 10657
+3 10336 10334 10662
+3 10334 10660 10662
+3 10335 10337 10661
+3 10337 10663 10661
+3 10338 10336 10664
+3 10336 10662 10664
+3 10337 10339 10663
+3 10339 10665 10663
+3 10340 10338 10666
+3 10338 10664 10666
+3 10339 10341 10665
+3 10341 10667 10665
+3 10342 10340 10668
+3 10340 10666 10668
+3 10341 10343 10667
+3 10343 10669 10667
+3 10344 10342 10670
+3 10342 10668 10670
+3 10343 10345 10669
+3 10345 10671 10669
+3 10346 10344 10672
+3 10344 10670 10672
+3 10345 10347 10671
+3 10671 10347 10673
+3 10348 10346 10674
+3 10346 10672 10674
+3 10673 10347 10349
+3 10675 10673 10349
+3 10350 10348 10676
+3 10348 10674 10676
+3 10675 10349 10351
+3 10677 10675 10351
+3 10352 10350 10678
+3 10350 10676 10678
+3 10677 10351 10353
+3 10679 10677 10353
+3 10354 10678 10680
+3 10352 10678 10354
+3 10355 10679 10353
+3 10681 10679 10355
+3 10682 10356 10354
+3 10680 10682 10354
+3 10355 10360 10681
+3 10360 10683 10681
+3 10682 10361 10356
+3 10684 10361 10682
+3 10360 10363 10683
+3 10683 10363 10688
+3 10364 10361 10689
+3 10361 10684 10689
+3 10366 10685 10357
+3 10686 10358 10357
+3 10685 10686 10357
+3 10687 10359 10358
+3 10686 10687 10358
+3 10691 10362 10359
+3 10687 10691 10359
+3 10362 10691 10367
+3 10688 10363 10369
+3 10692 10688 10369
+3 10370 10689 10693
+3 10364 10689 10370
+3 10366 10365 10690
+3 10685 10366 10690
+3 10696 10367 10691
+3 10367 10696 10368
+3 10373 10692 10369
+3 10698 10692 10373
+3 10699 10374 10370
+3 10693 10699 10370
+3 10365 10375 10690
+3 10375 10700 10690
+3 10697 10368 10696
+3 10702 10371 10368
+3 10697 10702 10368
+3 10371 10702 10372
+3 10373 10377 10698
+3 10377 10703 10698
+3 10699 10378 10374
+3 10704 10378 10699
+3 10375 10380 10700
+3 10380 10706 10700
+3 10709 10372 10702
+3 10381 10372 10709
+3 10376 10372 10381
+3 10381 10382 10376
+3 10377 10387 10703
+3 10703 10387 10711
+3 10388 10704 10712
+3 10378 10704 10388
+3 10380 10379 10705
+3 10706 10380 10705
+3 10710 10381 10709
+3 10714 10382 10381
+3 10710 10714 10381
+3 10382 10714 10383
+3 10389 10387 10386
+3 10711 10387 10389
+3 10716 10711 10389
+3 10712 10390 10388
+3 10717 10390 10712
+3 10379 10391 10705
+3 10391 10718 10705
+3 10715 10383 10714
+3 10721 10384 10383
+3 10715 10721 10383
+3 10392 10384 10721
+3 10385 10384 10392
+3 10385 10392 10386
+3 10392 10393 10386
+3 10386 10393 10389
+3 10393 10394 10389
+3 10716 10389 10394
+3 10723 10716 10394
+3 10395 10717 10724
+3 10390 10717 10395
+3 10391 10397 10718
+3 10397 10725 10718
+3 10722 10392 10721
+3 10729 10393 10392
+3 10722 10729 10392
+3 10398 10393 10729
+3 10394 10393 10398
+3 10723 10394 10398
+3 10731 10723 10398
+3 10724 10399 10395
+3 10733 10399 10724
+3 10734 10397 10396
+3 10725 10397 10734
+3 10730 10398 10729
+3 10730 10731 10398
+3 10400 10733 10741
+3 10399 10733 10400
+3 10734 10396 10401
+3 10742 10734 10401
+3 10751 10402 10400
+3 10741 10751 10400
+3 10401 10404 10742
+3 10403 10404 10401
+3 10742 10404 10752
+3 10408 10751 10767
+3 10751 10408 10402
+3 10405 10752 10404
+3 10752 10405 10753
+3 10405 10406 10753
+3 10753 10406 10754
+3 10406 10407 10754
+3 10755 10407 10409
+3 10754 10407 10755
+3 10410 10756 10755
+3 10409 10410 10755
+3 10756 10410 10768
+3 10412 10767 10783
+3 10767 10412 10408
+3 10411 10768 10410
+3 10769 10411 10413
+3 10768 10411 10769
+3 10414 10770 10769
+3 10413 10414 10769
+3 10415 10771 10770
+3 10414 10415 10770
+3 10771 10415 10784
+3 10796 10417 10412
+3 10783 10796 10412
+3 10416 10784 10415
+3 10785 10416 10418
+3 10784 10416 10785
+3 10419 10786 10785
+3 10418 10419 10785
+3 10420 10787 10786
+3 10419 10420 10786
+3 10421 10788 10787
+3 10420 10421 10787
+3 10788 10421 10797
+3 10422 10796 10805
+3 10796 10422 10417
+3 10797 10421 10423
+3 10424 10798 10797
+3 10423 10424 10797
+3 10425 10799 10798
+3 10424 10425 10798
+3 10426 10800 10799
+3 10425 10426 10799
+3 10427 10801 10800
+3 10426 10427 10800
+3 10801 10427 10806
+3 10428 10805 10810
+3 10428 10422 10805
+3 10429 10422 10428
+3 10426 10425 10430
+3 10426 10430 10427
+3 10430 10431 10427
+3 10427 10432 10806
+3 10431 10432 10427
+3 10433 10807 10806
+3 10432 10433 10806
+3 10807 10433 10811
+3 10434 10810 10815
+3 10434 10428 10810
+3 10435 10428 10434
+3 10428 10435 10429
+3 10432 10431 10436
+3 10432 10436 10433
+3 10436 10437 10433
+3 10433 10438 10811
+3 10437 10438 10433
+3 10439 10812 10811
+3 10438 10439 10811
+3 10440 10813 10812
+3 10439 10440 10812
+3 10813 10440 10816
+3 10443 10815 10819
+3 10443 10434 10815
+3 10444 10434 10443
+3 10434 10444 10435
+3 10439 10438 10445
+3 10439 10445 10440
+3 10441 10816 10440
+3 10817 10441 10446
+3 10816 10441 10817
+3 10817 10446 10820
+3 10449 10818 10824
+3 10442 10818 10449
+3 10819 10818 10442
+3 10442 10443 10819
+3 10447 10820 10446
+3 10821 10447 10450
+3 10820 10447 10821
+3 10451 10822 10821
+3 10450 10451 10821
+3 10822 10451 10825
+3 10454 10823 10830
+3 10448 10823 10454
+3 10824 10823 10448
+3 10448 10449 10824
+3 10452 10825 10451
+3 10826 10452 10455
+3 10825 10452 10826
+3 10456 10827 10826
+3 10455 10456 10826
+3 10827 10456 10831
+3 10460 10828 10840
+3 10461 10829 10828
+3 10460 10461 10828
+3 10453 10829 10461
+3 10830 10829 10453
+3 10453 10454 10830
+3 10457 10831 10456
+3 10832 10457 10462
+3 10831 10457 10832
+3 10463 10833 10832
+3 10462 10463 10832
+3 10464 10834 10833
+3 10463 10464 10833
+3 10465 10835 10834
+3 10464 10465 10834
+3 10466 10836 10835
+3 10465 10466 10835
+3 10467 10837 10836
+3 10466 10467 10836
+3 10468 10838 10837
+3 10467 10468 10837
+3 10458 10838 10468
+3 10839 10838 10458
+3 10839 10458 10840
+3 10458 10459 10840
+3 10459 10460 10840
+3 10475 10474 10841
+3 10475 10841 10476
+3 10841 10842 10476
+3 10476 10843 10469
+3 10842 10843 10476
+3 10844 10470 10469
+3 10843 10844 10469
+3 10845 10471 10470
+3 10844 10845 10470
+3 10846 10472 10471
+3 10845 10846 10471
+3 10847 10473 10472
+3 10846 10847 10472
+3 10848 10477 10473
+3 10847 10848 10473
+3 10848 10478 10477
+3 10849 10478 10848
+3 10478 10849 10479
+3 10849 10852 10479
+3 10479 10852 10480
+3 10482 10481 10850
+3 10482 10851 10474
+3 10850 10851 10482
+3 10851 10841 10474
+3 10853 10480 10852
+3 10856 10483 10480
+3 10853 10856 10480
+3 10483 10856 10484
+3 10486 10485 10854
+3 10486 10855 10481
+3 10854 10855 10486
+3 10855 10850 10481
+3 10857 10484 10856
+3 10859 10487 10484
+3 10857 10859 10484
+3 10487 10859 10489
+3 10485 10488 10858
+3 10858 10854 10485
+3 10861 10489 10859
+3 10489 10861 10491
+3 10488 10490 10860
+3 10860 10858 10488
+3 10863 10491 10861
+3 10491 10863 10493
+3 10490 10492 10862
+3 10862 10860 10490
+3 10864 10493 10863
+3 10493 10864 10494
+3 10862 10492 10496
+3 10866 10862 10496
+3 10867 10494 10864
+3 10497 10494 10867
+3 10496 10495 10865
+3 10865 10866 10496
+3 10497 10868 10498
+3 10867 10868 10497
+3 10865 10495 10500
+3 10870 10865 10500
+3 10871 10498 10868
+3 10501 10498 10871
+3 10500 10499 10869
+3 10869 10870 10500
+3 10501 10872 10502
+3 10871 10872 10501
+3 10869 10499 10503
+3 10873 10869 10503
+3 10874 10504 10502
+3 10872 10874 10502
+3 10873 10503 10505
+3 10876 10873 10505
+3 10877 10504 10874
+3 10506 10504 10877
+3 10507 10875 10505
+3 10875 10876 10505
+3 10508 10506 10878
+3 10506 10877 10878
+3 10507 10509 10875
+3 10509 10879 10875
+3 10508 10880 10510
+3 10878 10880 10508
+3 10509 10511 10879
+3 10511 10881 10879
+3 10882 10512 10510
+3 10880 10882 10510
+3 10511 10513 10881
+3 10513 10883 10881
+3 10884 10514 10512
+3 10882 10884 10512
+3 10513 10515 10883
+3 10515 10885 10883
+3 10884 10516 10514
+3 10886 10516 10884
+3 10515 10517 10885
+3 10885 10517 10887
+3 10518 10516 10888
+3 10516 10886 10888
+3 10887 10517 10519
+3 10889 10887 10519
+3 10520 10888 10890
+3 10518 10888 10520
+3 10889 10519 10521
+3 10891 10889 10521
+3 10892 10522 10520
+3 10890 10892 10520
+3 10523 10891 10521
+3 10893 10891 10523
+3 10894 10524 10522
+3 10892 10894 10522
+3 10523 10525 10893
+3 10893 10525 10895
+3 10526 10894 10896
+3 10894 10526 10524
+3 10527 10895 10525
+3 10897 10895 10527
+3 10898 10528 10526
+3 10896 10898 10526
+3 10527 10529 10897
+3 10897 10529 10899
+3 10530 10898 10900
+3 10898 10530 10528
+3 10899 10529 10531
+3 10899 10531 10901
+3 10532 10900 10902
+3 10900 10532 10530
+3 10901 10531 10533
+3 10901 10533 10903
+3 10534 10902 10904
+3 10902 10534 10532
+3 10903 10533 10539
+3 10903 10539 10906
+3 10540 10904 10907
+3 10904 10540 10534
+3 10537 10536 10905
+3 10905 10538 10537
+3 10910 10538 10905
+3 10538 10910 10542
+3 10906 10539 10543
+3 10906 10543 10911
+3 10544 10907 10914
+3 10907 10544 10540
+3 10535 10541 10908
+3 10909 10536 10535
+3 10908 10909 10535
+3 10909 10905 10536
+3 10917 10542 10910
+3 10546 10542 10917
+3 10911 10543 10547
+3 10548 10912 10911
+3 10547 10548 10911
+3 10912 10548 10918
+3 10549 10913 10923
+3 10550 10914 10913
+3 10549 10550 10913
+3 10914 10550 10544
+3 10541 10545 10915
+3 10915 10908 10541
+3 10917 10926 10552
+3 10546 10917 10552
+3 10548 10547 10554
+3 10548 10555 10918
+3 10554 10555 10548
+3 10918 10555 10928
+3 10556 10923 10935
+3 10556 10549 10923
+3 10557 10549 10556
+3 10549 10557 10550
+3 10559 10545 10551
+3 10915 10545 10559
+3 10937 10915 10559
+3 10552 10939 10560
+3 10926 10939 10552
+3 10563 10554 10553
+3 10555 10563 10927
+3 10554 10563 10555
+3 10927 10928 10555
+3 10949 10556 10935
+3 10564 10556 10949
+3 10557 10556 10564
+3 10564 10565 10557
+3 10567 10551 10558
+3 10559 10567 10936
+3 10551 10567 10559
+3 10936 10937 10559
+3 10954 10560 10939
+3 10568 10560 10954
+3 10562 10561 10940
+3 10562 10941 10553
+3 10940 10941 10562
+3 10942 10563 10553
+3 10941 10942 10553
+3 10942 10927 10563
+3 10950 10564 10949
+3 10956 10565 10564
+3 10950 10956 10564
+3 10565 10956 10571
+3 10574 10558 10566
+3 10567 10574 10951
+3 10558 10574 10567
+3 10951 10936 10567
+3 10954 10962 10575
+3 10568 10954 10575
+3 10561 10570 10955
+3 10955 10940 10561
+3 10957 10571 10956
+3 10957 10572 10571
+3 10965 10572 10957
+3 10572 10965 10577
+3 10578 10566 10573
+3 10566 10578 10574
+3 10578 10579 10574
+3 10951 10574 10579
+3 10966 10951 10579
+3 10580 10575 10973
+3 10575 10962 10973
+3 10569 10576 10963
+3 10964 10570 10569
+3 10963 10964 10569
+3 10964 10955 10570
+3 10975 10577 10965
+3 10577 10975 10582
+3 10573 10584 10578
+3 10584 10585 10578
+3 10578 10585 10579
+3 10585 10586 10579
+3 10966 10579 10586
+3 10976 10966 10586
+3 10587 10973 10985
+3 10588 10580 10973
+3 10587 10588 10973
+3 10576 10581 10974
+3 10974 10963 10576
+3 10987 10582 10975
+3 10582 10987 10590
+3 10591 10584 10583
+3 10584 10591 10585
+3 10591 10592 10585
+3 10585 10592 10586
+3 10592 10593 10586
+3 10586 10594 10976
+3 10593 10594 10586
+3 10976 10594 10988
+3 10595 10982 10992
+3 10596 10983 10982
+3 10595 10596 10982
+3 10597 10984 10983
+3 10596 10597 10983
+3 10598 10985 10984
+3 10597 10598 10984
+3 10598 10587 10985
+3 10599 10587 10598
+3 10587 10599 10588
+3 10581 10589 10986
+3 10986 10974 10581
+3 10994 10590 10987
+3 10590 10994 10601
+3 10583 10603 10591
+3 10603 10604 10591
+3 10591 10604 10592
+3 10604 10605 10592
+3 10592 10605 10593
+3 10605 10606 10593
+3 10593 10606 10594
+3 10606 10607 10594
+3 10594 10608 10988
+3 10607 10608 10594
+3 10988 10608 10995
+3 10609 10991 10996
+3 10610 10992 10991
+3 10609 10610 10991
+3 10992 10610 10595
+3 10589 10600 10993
+3 10993 10986 10589
+3 10998 10601 10994
+3 10601 10998 10602
+3 10604 10603 10613
+3 10604 10613 10605
+3 10613 10614 10605
+3 10605 10614 10606
+3 10614 10615 10606
+3 10606 10615 10607
+3 10615 10616 10607
+3 10607 10616 10608
+3 10616 10617 10608
+3 10608 10618 10995
+3 10617 10618 10608
+3 10619 10996 10995
+3 10618 10619 10995
+3 10996 10619 10609
+3 10600 10611 10997
+3 10997 10993 10600
+3 11000 10602 10998
+3 10621 10602 11000
+3 10612 10602 10621
+3 10621 10622 10612
+3 10614 10613 10623
+3 10614 10623 10615
+3 10623 10624 10615
+3 10615 10624 10616
+3 10624 10625 10616
+3 10616 10625 10617
+3 10611 10620 10999
+3 10999 10997 10611
+3 11002 10621 11000
+3 10626 10621 11002
+3 10622 10621 10626
+3 10628 11001 10620
+3 11001 10999 10620
+3 11003 10626 11002
+3 10626 11003 10629
+3 11005 10628 10627
+3 11001 10628 11005
+3 11006 10629 11003
+3 10631 10629 11006
+3 10627 10630 11004
+3 11004 11005 10627
+3 10631 11007 10632
+3 11006 11007 10631
+3 11004 10630 10634
+3 11009 11004 10634
+3 11010 10632 11007
+3 10635 10632 11010
+3 10634 10633 11008
+3 11008 11009 10634
+3 10635 11011 10636
+3 11010 11011 10635
+3 11008 10633 10637
+3 11013 11008 10637
+3 11014 10636 11011
+3 10638 10636 11014
+3 10640 11012 10637
+3 11012 11013 10637
+3 10638 11015 10641
+3 11014 11015 10638
+3 11016 10640 10639
+3 11012 10640 11016
+3 11017 10642 10641
+3 11015 11017 10641
+3 11016 10639 10643
+3 11019 11016 10643
+3 11020 10642 11017
+3 10644 10642 11020
+3 10646 11018 10643
+3 11018 11019 10643
+3 10644 11021 10647
+3 11020 11021 10644
+3 11022 10646 10645
+3 11018 10646 11022
+3 11023 10648 10647
+3 11021 11023 10647
+3 11022 10645 10649
+3 11024 11022 10649
+3 11025 10648 11023
+3 10650 10648 11025
+3 11024 10649 10651
+3 11027 11024 10651
+3 10652 10650 11028
+3 10650 11025 11028
+3 10653 11026 10651
+3 11026 11027 10651
+3 10652 11029 10654
+3 11028 11029 10652
+3 10653 10655 11026
+3 10655 11030 11026
+3 11031 10656 10654
+3 11029 11031 10654
+3 10655 10658 11030
+3 10658 11032 11030
+3 11033 10659 10656
+3 11031 11033 10656
+3 11034 10658 10657
+3 11032 10658 11034
+3 11035 10660 10659
+3 11033 11035 10659
+3 11034 10657 10661
+3 11036 11034 10661
+3 11037 10662 10660
+3 11035 11037 10660
+3 11036 10661 10663
+3 11038 11036 10663
+3 11039 10664 10662
+3 11037 11039 10662
+3 11038 10663 10665
+3 11040 11038 10665
+3 11041 10664 11039
+3 10666 10664 11041
+3 11040 10665 10667
+3 11042 11040 10667
+3 10668 11041 11043
+3 10666 11041 10668
+3 11042 10667 10669
+3 11044 11042 10669
+3 11045 10670 10668
+3 11043 11045 10668
+3 11044 10669 10671
+3 11046 11044 10671
+3 11047 10672 10670
+3 11045 11047 10670
+3 10673 11046 10671
+3 11048 11046 10673
+3 11049 10674 10672
+3 11047 11049 10672
+3 10673 10675 11048
+3 10675 11050 11048
+3 11051 10676 10674
+3 11049 11051 10674
+3 10675 10677 11050
+3 10677 11052 11050
+3 11053 10678 10676
+3 11051 11053 10676
+3 10677 10679 11052
+3 10679 11054 11052
+3 11053 10680 10678
+3 11055 10680 11053
+3 10679 10681 11054
+3 11054 10681 11056
+3 10682 10680 11057
+3 10680 11055 11057
+3 11056 10681 10683
+3 11058 11056 10683
+3 10684 11057 11059
+3 10682 11057 10684
+3 10688 11058 10683
+3 11060 11058 10688
+3 11061 10689 10684
+3 11059 11061 10684
+3 10688 10692 11060
+3 10692 11063 11060
+3 11061 10693 10689
+3 11064 10693 11061
+3 10685 10690 11062
+3 11066 10686 10685
+3 11062 11066 10685
+3 10694 10686 11066
+3 10687 10686 10694
+3 10687 10694 10691
+3 10694 10695 10691
+3 10695 10696 10691
+3 10692 10698 11063
+3 11063 10698 11068
+3 10699 10693 11069
+3 10693 11064 11069
+3 10700 11065 10690
+3 11065 11062 10690
+3 11067 10694 11066
+3 11072 10695 10694
+3 11067 11072 10694
+3 10701 10695 11072
+3 10696 10695 10701
+3 10701 10697 10696
+3 11068 10698 10703
+3 11073 11068 10703
+3 10704 11069 11074
+3 10699 11069 10704
+3 10700 10706 11065
+3 10706 11075 11065
+3 11080 10701 11072
+3 10707 10701 11080
+3 10697 10701 10707
+3 10697 10707 10702
+3 10707 10708 10702
+3 10708 10709 10702
+3 11073 10703 10711
+3 11073 10711 11082
+3 11074 10712 10704
+3 11083 10712 11074
+3 11085 10706 10705
+3 11075 10706 11085
+3 11081 10707 11080
+3 11090 10708 10707
+3 11081 11090 10707
+3 10713 10708 11090
+3 10709 10708 10713
+3 10713 10710 10709
+3 11082 10711 10716
+3 11091 11082 10716
+3 10717 11083 11092
+3 10712 11083 10717
+3 10718 11084 10705
+3 11084 11085 10705
+3 11099 10713 11090
+3 10719 10713 11099
+3 10710 10713 10719
+3 10710 10719 10714
+3 10719 10720 10714
+3 10720 10715 10714
+3 11091 10716 10723
+3 11100 11091 10723
+3 11092 10724 10717
+3 11101 10724 11092
+3 10718 10725 11084
+3 10725 11102 11084
+3 11112 10719 11099
+3 10726 10719 11112
+3 10720 10719 10726
+3 10720 10726 10715
+3 10726 10727 10715
+3 10715 10727 10721
+3 10727 10728 10721
+3 10728 10722 10721
+3 10723 10732 11100
+3 10731 10732 10723
+3 11100 10732 11113
+3 10733 11101 11114
+3 10724 11101 10733
+3 10725 10734 11102
+3 10734 11115 11102
+3 11126 10726 11112
+3 10735 10726 11126
+3 10727 10726 10735
+3 10727 10735 10728
+3 10735 10736 10728
+3 10728 10736 10722
+3 10736 10737 10722
+3 10722 10737 10729
+3 10737 10738 10729
+3 10738 10730 10729
+3 10739 10731 10730
+3 10731 10739 10732
+3 10739 10740 10732
+3 11113 10732 10740
+3 11127 11113 10740
+3 11114 10741 10733
+3 11128 10741 11114
+3 10734 10742 11115
+3 11115 10742 11129
+3 11139 10743 10735
+3 11126 11139 10735
+3 10735 10743 10736
+3 10743 10744 10736
+3 10736 10744 10737
+3 10744 10745 10737
+3 10737 10745 10738
+3 10745 10746 10738
+3 10738 10746 10730
+3 10746 10747 10730
+3 10730 10747 10739
+3 10747 10748 10739
+3 10739 10748 10740
+3 10748 10749 10740
+3 10740 10750 11127
+3 10749 10750 10740
+3 11127 10750 11140
+3 10751 11128 11141
+3 10741 11128 10751
+3 11129 10742 10752
+3 10753 11130 11129
+3 10752 10753 11129
+3 10754 11131 11130
+3 10753 10754 11130
+3 10755 11132 11131
+3 10754 10755 11131
+3 10756 11133 11132
+3 10755 10756 11132
+3 11133 10756 11142
+3 10757 11139 11146
+3 10757 10743 11139
+3 10758 10743 10757
+3 10743 10758 10744
+3 10758 10759 10744
+3 10744 10759 10745
+3 10759 10760 10745
+3 10745 10760 10746
+3 10760 10761 10746
+3 10746 10761 10747
+3 10761 10762 10747
+3 10747 10762 10748
+3 10762 10763 10748
+3 10748 10763 10749
+3 10763 10764 10749
+3 10749 10764 10750
+3 10764 10765 10750
+3 10750 10766 11140
+3 10765 10766 10750
+3 11140 10766 11147
+3 10767 11141 11148
+3 11141 10767 10751
+3 11142 10756 10768
+3 10769 11143 11142
+3 10768 10769 11142
+3 10770 11144 11143
+3 10769 10770 11143
+3 10771 11145 11144
+3 10770 10771 11144
+3 10772 11146 11145
+3 10771 10772 11145
+3 10772 10757 11146
+3 10773 10757 10772
+3 10757 10773 10758
+3 10773 10774 10758
+3 10758 10774 10759
+3 10774 10775 10759
+3 10759 10775 10760
+3 10775 10776 10760
+3 10760 10776 10761
+3 10776 10777 10761
+3 10761 10777 10762
+3 10777 10778 10762
+3 10762 10778 10763
+3 10778 10779 10763
+3 10763 10779 10764
+3 10779 10780 10764
+3 10764 10780 10765
+3 10780 10781 10765
+3 10765 10781 10766
+3 10781 10782 10766
+3 11147 10766 10782
+3 11149 11147 10782
+3 11148 10783 10767
+3 11151 10783 11148
+3 10772 10771 10784
+3 10772 10784 10773
+3 10784 10785 10773
+3 10773 10785 10774
+3 10785 10786 10774
+3 10774 10786 10775
+3 10786 10787 10775
+3 10775 10787 10776
+3 10787 10788 10776
+3 10776 10788 10777
+3 10788 10789 10777
+3 10777 10789 10778
+3 10789 10790 10778
+3 10778 10790 10779
+3 10790 10791 10779
+3 10779 10791 10780
+3 10791 10792 10780
+3 10780 10792 10781
+3 10792 10793 10781
+3 10781 10793 10782
+3 10793 10794 10782
+3 10782 10795 11149
+3 10794 10795 10782
+3 11149 10795 11152
+3 10796 11151 11154
+3 10783 11151 10796
+3 10789 10788 10797
+3 10789 10797 10790
+3 10797 10798 10790
+3 10790 10798 10791
+3 10798 10799 10791
+3 10791 10799 10792
+3 10799 10800 10792
+3 10792 10800 10793
+3 10800 10801 10793
+3 10793 10801 10794
+3 10801 10802 10794
+3 10794 10802 10795
+3 10802 10803 10795
+3 10795 10804 11152
+3 10803 10804 10795
+3 11152 10804 11155
+3 10805 11154 11157
+3 11154 10805 10796
+3 10802 10801 10806
+3 10802 10806 10803
+3 10806 10807 10803
+3 10803 10807 10804
+3 10807 10808 10804
+3 10804 10809 11155
+3 10808 10809 10804
+3 11155 10809 11158
+3 10810 11157 11160
+3 11157 10810 10805
+3 10808 10807 10811
+3 10808 10811 10809
+3 10811 10812 10809
+3 10809 10813 11158
+3 10812 10813 10809
+3 10814 11159 11158
+3 10813 10814 11158
+3 11159 10814 11161
+3 10815 11160 11163
+3 11160 10815 10810
+3 10814 10813 10816
+3 10814 10817 11161
+3 10816 10817 10814
+3 11161 10817 11164
+3 10818 11162 11167
+3 10819 11163 11162
+3 10818 10819 11162
+3 11163 10819 10815
+3 11164 10817 10820
+3 10821 11165 11164
+3 10820 10821 11164
+3 11165 10821 11168
+3 10823 11166 11172
+3 10824 11167 11166
+3 10823 10824 11166
+3 11167 10824 10818
+3 10822 11168 10821
+3 11169 10822 10825
+3 11168 10822 11169
+3 10826 11170 11169
+3 10825 10826 11169
+3 11170 10826 11173
+3 10829 11171 11184
+3 10830 11172 11171
+3 10829 10830 11171
+3 11172 10830 10823
+3 10827 11173 10826
+3 11174 10827 10831
+3 11173 10827 11174
+3 10832 11175 11174
+3 10831 10832 11174
+3 10833 11176 11175
+3 10832 10833 11175
+3 10834 11177 11176
+3 10833 10834 11176
+3 10835 11178 11177
+3 10834 10835 11177
+3 10836 11179 11178
+3 10835 10836 11178
+3 10837 11180 11179
+3 10836 10837 11179
+3 10838 11181 11180
+3 10837 10838 11180
+3 10839 11182 11181
+3 10838 10839 11181
+3 10840 11183 11182
+3 10839 10840 11182
+3 10828 11183 10840
+3 11184 11183 10828
+3 10828 10829 11184
+3 10841 10851 11185
+3 11186 10842 10841
+3 11185 11186 10841
+3 11187 10843 10842
+3 11186 11187 10842
+3 11188 10844 10843
+3 11187 11188 10843
+3 11189 10845 10844
+3 11188 11189 10844
+3 11190 10846 10845
+3 11189 11190 10845
+3 11191 10847 10846
+3 11190 11191 10846
+3 11192 10848 10847
+3 11191 11192 10847
+3 11193 10849 10848
+3 11192 11193 10848
+3 11196 10852 10849
+3 11193 11196 10849
+3 10852 11196 10853
+3 10850 10855 11194
+3 11195 10851 10850
+3 11194 11195 10850
+3 11195 11185 10851
+3 11197 10853 11196
+3 11200 10856 10853
+3 11197 11200 10853
+3 10856 11200 10857
+3 10854 10858 11198
+3 11199 10855 10854
+3 11198 11199 10854
+3 11199 11194 10855
+3 11201 10857 11200
+3 11203 10859 10857
+3 11201 11203 10857
+3 10859 11203 10861
+3 10858 10860 11202
+3 11202 11198 10858
+3 11206 10861 11203
+3 10861 11206 10863
+3 10860 10862 11204
+3 11204 11202 10860
+3 11209 10863 11206
+3 10863 11209 10864
+3 10866 11207 10862
+3 11207 11204 10862
+3 11212 10864 11209
+3 10864 11212 10867
+3 11214 10866 10865
+3 11207 10866 11214
+3 11215 10868 10867
+3 11212 11215 10867
+3 10870 11213 10865
+3 11213 11214 10865
+3 11216 10868 11215
+3 10868 11216 10871
+3 11217 10870 10869
+3 11213 10870 11217
+3 11218 10872 10871
+3 11216 11218 10871
+3 11217 10869 10873
+3 11220 11217 10873
+3 11221 10872 11218
+3 10874 10872 11221
+3 10876 11219 10873
+3 11219 11220 10873
+3 10874 11222 10877
+3 11221 11222 10874
+3 11223 10876 10875
+3 11219 10876 11223
+3 11224 10878 10877
+3 11222 11224 10877
+3 11223 10875 10879
+3 11225 11223 10879
+3 11226 10880 10878
+3 11224 11226 10878
+3 11225 10879 10881
+3 11227 11225 10881
+3 11228 10882 10880
+3 11226 11228 10880
+3 11227 10881 10883
+3 11229 11227 10883
+3 11230 10884 10882
+3 11228 11230 10882
+3 11229 10883 10885
+3 11231 11229 10885
+3 11232 10886 10884
+3 11230 11232 10884
+3 10887 11231 10885
+3 11233 11231 10887
+3 11234 10888 10886
+3 11232 11234 10886
+3 10887 10889 11233
+3 11233 10889 11235
+3 11234 10890 10888
+3 11236 10890 11234
+3 11235 10889 10891
+3 11237 11235 10891
+3 10892 11236 11238
+3 10890 11236 10892
+3 11237 10891 10893
+3 11239 11237 10893
+3 11240 10894 10892
+3 11238 11240 10892
+3 11239 10893 10895
+3 11239 10895 11241
+3 10896 11240 11242
+3 11240 10896 10894
+3 11241 10895 10897
+3 11243 11241 10897
+3 11245 10898 10896
+3 11242 11245 10896
+3 11243 10897 10899
+3 11243 10899 11246
+3 10900 11245 11247
+3 11245 10900 10898
+3 11246 10899 10901
+3 11246 10901 11248
+3 10902 11247 11249
+3 11247 10902 10900
+3 11248 10901 10903
+3 11248 10903 11250
+3 10904 11249 11252
+3 11249 10904 10902
+3 11250 10903 10906
+3 11250 10906 11253
+3 10907 11252 11256
+3 11252 10907 10904
+3 11253 10906 10911
+3 10912 11254 11253
+3 10911 10912 11253
+3 11254 10912 11257
+3 10913 11255 11262
+3 10914 11256 11255
+3 10913 10914 11255
+3 11256 10914 10907
+3 10916 10905 10909
+3 10910 10916 11264
+3 10905 10916 10910
+3 10910 11264 10917
+3 11257 10912 10918
+3 10919 11258 11257
+3 10918 10919 11257
+3 10920 11259 11258
+3 10919 10920 11258
+3 11259 10920 11265
+3 10921 11260 11270
+3 10922 11261 11260
+3 10921 10922 11260
+3 10923 11262 11261
+3 10922 10923 11261
+3 11262 10923 10913
+3 10924 10908 10915
+3 10908 10924 10909
+3 10924 10925 10909
+3 10916 10925 11263
+3 10909 10925 10916
+3 11263 11264 10916
+3 11273 10917 11264
+3 10917 11273 10926
+3 10919 10918 10928
+3 10919 10928 10920
+3 10928 10929 10920
+3 10920 10930 11265
+3 10929 10930 10920
+3 10931 11266 11265
+3 10930 10931 11265
+3 11266 10931 11275
+3 10932 11269 11276
+3 10933 11270 11269
+3 10932 10933 11269
+3 10933 10921 11270
+3 10934 10921 10933
+3 10921 10934 10922
+3 10934 10935 10922
+3 10922 10935 10923
+3 10915 10937 10924
+3 10937 10938 10924
+3 10925 10938 11271
+3 10924 10938 10925
+3 11271 11263 10925
+3 11280 10926 11273
+3 10939 10926 11280
+3 10943 10928 10927
+3 10928 10943 10929
+3 10943 10944 10929
+3 10929 10944 10930
+3 10944 10945 10930
+3 10931 10945 11274
+3 10930 10945 10931
+3 11274 11275 10931
+3 11288 10932 11276
+3 10946 10932 11288
+3 10933 10932 10946
+3 10933 10946 10934
+3 10946 10947 10934
+3 10934 10947 10935
+3 10947 10948 10935
+3 10948 10949 10935
+3 10952 10937 10936
+3 10937 10952 10938
+3 10952 10953 10938
+3 11271 10938 10953
+3 11292 11271 10953
+3 10939 11296 10954
+3 11280 11296 10939
+3 10942 10941 11281
+3 10942 11282 10927
+3 11281 11282 10942
+3 11283 10943 10927
+3 11282 11283 10927
+3 11284 10944 10943
+3 11283 11284 10943
+3 11285 10945 10944
+3 11284 11285 10944
+3 11285 11274 10945
+3 11289 10946 11288
+3 11290 10947 10946
+3 11289 11290 10946
+3 11291 10948 10947
+3 11290 11291 10947
+3 11300 10949 10948
+3 11291 11300 10948
+3 10949 11300 10950
+3 10958 10936 10951
+3 10936 10958 10952
+3 10958 10959 10952
+3 10952 10959 10953
+3 10959 10960 10953
+3 11292 10953 10960
+3 11302 11292 10960
+3 11306 10961 10954
+3 11296 11306 10954
+3 10961 10962 10954
+3 10940 10955 11297
+3 11298 10941 10940
+3 11297 11298 10940
+3 11298 11281 10941
+3 11301 10950 11300
+3 11308 10956 10950
+3 11301 11308 10950
+3 10956 11308 10957
+3 10951 10966 10958
+3 10966 10967 10958
+3 10958 10967 10959
+3 10967 10968 10959
+3 10959 10968 10960
+3 10968 10969 10960
+3 10960 10970 11302
+3 10969 10970 10960
+3 11302 10970 11310
+3 10971 11306 11312
+3 10971 10961 11306
+3 10972 10961 10971
+3 10961 10972 10962
+3 10972 10973 10962
+3 10955 10964 11307
+3 11307 11297 10955
+3 11309 10957 11308
+3 11315 10965 10957
+3 11309 11315 10957
+3 10965 11315 10975
+3 10966 10976 10967
+3 10976 10977 10967
+3 10967 10977 10968
+3 10977 10978 10968
+3 10968 10978 10969
+3 10978 10979 10969
+3 10969 10979 10970
+3 10979 10980 10970
+3 10970 10981 11310
+3 10980 10981 10970
+3 10982 11311 11310
+3 10981 10982 11310
+3 10983 11312 11311
+3 10982 10983 11311
+3 10983 10971 11312
+3 10984 10971 10983
+3 10971 10984 10972
+3 10984 10985 10972
+3 10972 10985 10973
+3 10963 10974 11313
+3 11314 10964 10963
+3 11313 11314 10963
+3 11314 11307 10964
+3 11317 10975 11315
+3 10975 11317 10987
+3 10977 10976 10988
+3 10977 10988 10978
+3 10988 10989 10978
+3 10978 10989 10979
+3 10989 10990 10979
+3 10979 10990 10980
+3 10990 10991 10980
+3 10980 10991 10981
+3 10991 10992 10981
+3 10981 10992 10982
+3 10974 10986 11316
+3 11316 11313 10974
+3 11319 10987 11317
+3 10987 11319 10994
+3 10989 10988 10995
+3 10989 10995 10990
+3 10995 10996 10990
+3 10990 10996 10991
+3 10986 10993 11318
+3 11318 11316 10986
+3 11320 10994 11319
+3 11320 10998 10994
+3 11322 10998 11320
+3 10993 10997 11321
+3 11321 11318 10993
+3 10998 11324 11000
+3 11322 11324 10998
+3 10997 10999 11323
+3 11323 11321 10997
+3 11326 11000 11324
+3 11000 11326 11002
+3 10999 11001 11325
+3 11325 11323 10999
+3 11327 11002 11326
+3 11002 11327 11003
+3 11325 11001 11005
+3 11329 11325 11005
+3 11330 11003 11327
+3 11003 11330 11006
+3 11005 11004 11328
+3 11328 11329 11005
+3 11332 11007 11006
+3 11330 11332 11006
+3 11009 11331 11004
+3 11331 11328 11004
+3 11333 11007 11332
+3 11007 11333 11010
+3 11335 11009 11008
+3 11331 11009 11335
+3 11336 11011 11010
+3 11333 11336 11010
+3 11013 11334 11008
+3 11334 11335 11008
+3 11337 11011 11336
+3 11011 11337 11014
+3 11338 11013 11012
+3 11334 11013 11338
+3 11339 11015 11014
+3 11337 11339 11014
+3 11338 11012 11016
+3 11341 11338 11016
+3 11342 11015 11339
+3 11017 11015 11342
+3 11019 11340 11016
+3 11340 11341 11016
+3 11017 11343 11020
+3 11342 11343 11017
+3 11344 11019 11018
+3 11340 11019 11344
+3 11345 11021 11020
+3 11343 11345 11020
+3 11344 11018 11022
+3 11347 11344 11022
+3 11348 11021 11345
+3 11023 11021 11348
+3 11024 11346 11022
+3 11346 11347 11022
+3 11023 11349 11025
+3 11348 11349 11023
+3 11024 11027 11346
+3 11027 11350 11346
+3 11351 11028 11025
+3 11349 11351 11025
+3 11352 11027 11026
+3 11350 11027 11352
+3 11353 11029 11028
+3 11351 11353 11028
+3 11352 11026 11030
+3 11354 11352 11030
+3 11355 11029 11353
+3 11031 11029 11355
+3 11354 11030 11032
+3 11356 11354 11032
+3 11033 11031 11357
+3 11031 11355 11357
+3 11356 11032 11034
+3 11358 11356 11034
+3 11035 11033 11359
+3 11033 11357 11359
+3 11358 11034 11036
+3 11360 11358 11036
+3 11037 11035 11361
+3 11035 11359 11361
+3 11360 11036 11038
+3 11362 11360 11038
+3 11039 11037 11363
+3 11037 11361 11363
+3 11362 11038 11040
+3 11364 11362 11040
+3 11039 11365 11041
+3 11363 11365 11039
+3 11364 11040 11042
+3 11366 11364 11042
+3 11365 11043 11041
+3 11367 11043 11365
+3 11366 11042 11044
+3 11368 11366 11044
+3 11045 11043 11369
+3 11043 11367 11369
+3 11368 11044 11046
+3 11370 11368 11046
+3 11047 11045 11371
+3 11045 11369 11371
+3 11370 11046 11048
+3 11372 11370 11048
+3 11049 11047 11373
+3 11047 11371 11373
+3 11372 11048 11050
+3 11374 11372 11050
+3 11051 11049 11375
+3 11049 11373 11375
+3 11374 11050 11052
+3 11376 11374 11052
+3 11053 11375 11377
+3 11051 11375 11053
+3 11376 11052 11054
+3 11378 11376 11054
+3 11379 11055 11053
+3 11377 11379 11053
+3 11056 11378 11054
+3 11380 11378 11056
+3 11381 11057 11055
+3 11379 11381 11055
+3 11056 11058 11380
+3 11380 11058 11382
+3 11381 11059 11057
+3 11383 11059 11381
+3 11382 11058 11060
+3 11384 11382 11060
+3 11061 11383 11385
+3 11059 11383 11061
+3 11384 11060 11063
+3 11386 11384 11063
+3 11387 11064 11061
+3 11385 11387 11061
+3 11068 11386 11063
+3 11388 11386 11068
+3 11389 11069 11064
+3 11387 11389 11064
+3 11070 11062 11065
+3 11062 11070 11066
+3 11070 11071 11066
+3 11071 11067 11066
+3 11068 11073 11388
+3 11388 11073 11390
+3 11074 11389 11391
+3 11389 11074 11069
+3 11065 11075 11070
+3 11075 11076 11070
+3 11070 11076 11071
+3 11076 11077 11071
+3 11071 11077 11067
+3 11077 11078 11067
+3 11067 11078 11072
+3 11078 11079 11072
+3 11079 11080 11072
+3 11082 11390 11073
+3 11392 11390 11082
+3 11393 11083 11074
+3 11391 11393 11074
+3 11076 11085 11395
+3 11075 11085 11076
+3 11086 11076 11395
+3 11077 11076 11086
+3 11077 11086 11078
+3 11086 11087 11078
+3 11078 11087 11079
+3 11087 11088 11079
+3 11079 11088 11080
+3 11088 11089 11080
+3 11089 11081 11080
+3 11082 11091 11392
+3 11392 11091 11396
+3 11393 11092 11083
+3 11397 11092 11393
+3 11085 11084 11394
+3 11394 11395 11085
+3 11398 11093 11086
+3 11395 11398 11086
+3 11086 11093 11087
+3 11093 11094 11087
+3 11087 11094 11088
+3 11094 11095 11088
+3 11088 11095 11089
+3 11095 11096 11089
+3 11089 11096 11081
+3 11096 11097 11081
+3 11081 11097 11090
+3 11097 11098 11090
+3 11098 11099 11090
+3 11396 11091 11100
+3 11399 11396 11100
+3 11101 11397 11400
+3 11092 11397 11101
+3 11084 11103 11394
+3 11102 11103 11084
+3 11104 11398 11394
+3 11103 11104 11394
+3 11104 11093 11398
+3 11105 11093 11104
+3 11093 11105 11094
+3 11105 11106 11094
+3 11094 11106 11095
+3 11106 11107 11095
+3 11095 11107 11096
+3 11107 11108 11096
+3 11096 11108 11097
+3 11108 11109 11097
+3 11097 11109 11098
+3 11109 11110 11098
+3 11098 11110 11099
+3 11110 11111 11099
+3 11111 11112 11099
+3 11399 11100 11113
+3 11399 11113 11401
+3 11400 11114 11101
+3 11402 11114 11400
+3 11102 11115 11103
+3 11115 11116 11103
+3 11103 11116 11104
+3 11116 11117 11104
+3 11104 11117 11105
+3 11117 11118 11105
+3 11105 11118 11106
+3 11118 11119 11106
+3 11106 11119 11107
+3 11119 11120 11107
+3 11107 11120 11108
+3 11120 11121 11108
+3 11108 11121 11109
+3 11121 11122 11109
+3 11109 11122 11110
+3 11122 11123 11110
+3 11110 11123 11111
+3 11123 11124 11111
+3 11111 11124 11112
+3 11124 11125 11112
+3 11125 11126 11112
+3 11401 11113 11127
+3 11403 11401 11127
+3 11128 11402 11404
+3 11114 11402 11128
+3 11116 11115 11129
+3 11116 11129 11117
+3 11129 11130 11117
+3 11117 11130 11118
+3 11130 11131 11118
+3 11118 11131 11119
+3 11131 11132 11119
+3 11119 11132 11120
+3 11132 11133 11120
+3 11120 11133 11121
+3 11133 11134 11121
+3 11121 11134 11122
+3 11134 11135 11122
+3 11122 11135 11123
+3 11135 11136 11123
+3 11123 11136 11124
+3 11136 11137 11124
+3 11124 11137 11125
+3 11137 11138 11125
+3 11125 11138 11126
+3 11138 11139 11126
+3 11403 11127 11140
+3 11403 11140 11405
+3 11141 11404 11406
+3 11404 11141 11128
+3 11134 11133 11142
+3 11134 11142 11135
+3 11142 11143 11135
+3 11135 11143 11136
+3 11143 11144 11136
+3 11136 11144 11137
+3 11144 11145 11137
+3 11137 11145 11138
+3 11145 11146 11138
+3 11138 11146 11139
+3 11405 11140 11147
+3 11405 11147 11407
+3 11148 11406 11408
+3 11406 11148 11141
+3 11147 11150 11407
+3 11149 11150 11147
+3 11407 11150 11409
+3 11410 11151 11148
+3 11408 11410 11148
+3 11150 11149 11152
+3 11150 11153 11409
+3 11152 11153 11150
+3 11409 11153 11411
+3 11154 11410 11412
+3 11410 11154 11151
+3 11153 11152 11155
+3 11153 11156 11411
+3 11155 11156 11153
+3 11411 11156 11413
+3 11157 11412 11414
+3 11412 11157 11154
+3 11156 11155 11158
+3 11156 11159 11413
+3 11158 11159 11156
+3 11413 11159 11415
+3 11160 11414 11417
+3 11414 11160 11157
+3 11415 11159 11161
+3 11415 11161 11418
+3 11162 11416 11421
+3 11163 11417 11416
+3 11162 11163 11416
+3 11417 11163 11160
+3 11418 11161 11164
+3 11165 11419 11418
+3 11164 11165 11418
+3 11419 11165 11422
+3 11167 11421 11426
+3 11421 11167 11162
+3 11422 11165 11168
+3 11169 11423 11422
+3 11168 11169 11422
+3 11423 11169 11427
+3 11171 11424 11435
+3 11172 11425 11424
+3 11171 11172 11424
+3 11166 11425 11172
+3 11426 11425 11166
+3 11166 11167 11426
+3 11170 11427 11169
+3 11428 11170 11173
+3 11427 11170 11428
+3 11174 11429 11428
+3 11173 11174 11428
+3 11175 11430 11429
+3 11174 11175 11429
+3 11176 11431 11430
+3 11175 11176 11430
+3 11431 11176 11436
+3 11181 11432 11439
+3 11182 11433 11432
+3 11181 11182 11432
+3 11183 11434 11433
+3 11182 11183 11433
+3 11184 11435 11434
+3 11183 11184 11434
+3 11435 11184 11171
+3 11177 11436 11176
+3 11436 11177 11437
+3 11177 11178 11437
+3 11437 11178 11438
+3 11178 11179 11438
+3 11438 11179 11439
+3 11179 11180 11439
+3 11180 11181 11439
+3 11185 11195 11440
+3 11441 11186 11185
+3 11440 11441 11185
+3 11442 11187 11186
+3 11441 11442 11186
+3 11443 11188 11187
+3 11442 11443 11187
+3 11444 11189 11188
+3 11443 11444 11188
+3 11445 11190 11189
+3 11444 11445 11189
+3 11446 11191 11190
+3 11445 11446 11190
+3 11447 11192 11191
+3 11446 11447 11191
+3 11448 11193 11192
+3 11447 11448 11192
+3 11451 11196 11193
+3 11448 11451 11193
+3 11196 11451 11197
+3 11194 11199 11449
+3 11450 11195 11194
+3 11449 11450 11194
+3 11450 11440 11195
+3 11452 11197 11451
+3 11454 11200 11197
+3 11452 11454 11197
+3 11200 11454 11201
+3 11205 11198 11202
+3 11199 11205 11453
+3 11198 11205 11199
+3 11453 11449 11199
+3 11455 11201 11454
+3 11458 11203 11201
+3 11455 11458 11201
+3 11203 11458 11206
+3 11208 11202 11204
+3 11205 11208 11456
+3 11202 11208 11205
+3 11456 11453 11205
+3 11461 11206 11458
+3 11206 11461 11209
+3 11210 11204 11207
+3 11208 11210 11459
+3 11204 11210 11208
+3 11459 11456 11208
+3 11463 11211 11209
+3 11461 11463 11209
+3 11211 11212 11209
+3 11210 11214 11462
+3 11207 11214 11210
+3 11462 11459 11210
+3 11465 11211 11463
+3 11215 11211 11465
+3 11212 11211 11215
+3 11214 11213 11464
+3 11464 11462 11214
+3 11468 11215 11465
+3 11215 11468 11216
+3 11464 11213 11217
+3 11469 11464 11217
+3 11470 11218 11216
+3 11468 11470 11216
+3 11469 11217 11220
+3 11472 11469 11220
+3 11474 11218 11470
+3 11218 11474 11221
+3 11220 11219 11471
+3 11471 11472 11220
+3 11476 11222 11221
+3 11474 11476 11221
+3 11471 11219 11223
+3 11477 11471 11223
+3 11478 11224 11222
+3 11476 11478 11222
+3 11477 11223 11225
+3 11479 11477 11225
+3 11480 11226 11224
+3 11478 11480 11224
+3 11479 11225 11227
+3 11481 11479 11227
+3 11482 11228 11226
+3 11480 11482 11226
+3 11481 11227 11229
+3 11483 11481 11229
+3 11484 11230 11228
+3 11482 11484 11228
+3 11483 11229 11231
+3 11485 11483 11231
+3 11486 11232 11230
+3 11484 11486 11230
+3 11485 11231 11233
+3 11487 11485 11233
+3 11489 11234 11232
+3 11486 11489 11232
+3 11487 11233 11235
+3 11487 11235 11490
+3 11492 11236 11234
+3 11489 11492 11234
+3 11490 11235 11237
+3 11493 11490 11237
+3 11238 11492 11494
+3 11492 11238 11236
+3 11493 11237 11239
+3 11495 11493 11239
+3 11497 11240 11238
+3 11494 11497 11238
+3 11495 11239 11241
+3 11495 11241 11498
+3 11242 11497 11499
+3 11497 11242 11240
+3 11241 11244 11498
+3 11243 11244 11241
+3 11498 11244 11500
+3 11502 11245 11242
+3 11499 11502 11242
+3 11244 11243 11246
+3 11500 11244 11246
+3 11503 11500 11246
+3 11247 11502 11506
+3 11502 11247 11245
+3 11503 11246 11248
+3 11503 11248 11507
+3 11249 11506 11510
+3 11506 11249 11247
+3 11507 11248 11250
+3 11251 11508 11507
+3 11250 11251 11507
+3 11508 11251 11511
+3 11252 11510 11515
+3 11510 11252 11249
+3 11251 11250 11253
+3 11251 11254 11511
+3 11253 11254 11251
+3 11511 11254 11516
+3 11255 11514 11523
+3 11256 11515 11514
+3 11255 11256 11514
+3 11515 11256 11252
+3 11516 11254 11257
+3 11258 11517 11516
+3 11257 11258 11516
+3 11259 11518 11517
+3 11258 11259 11517
+3 11518 11259 11524
+3 11260 11521 11529
+3 11261 11522 11521
+3 11260 11261 11521
+3 11262 11523 11522
+3 11261 11262 11522
+3 11523 11262 11255
+3 11524 11259 11265
+3 11266 11525 11524
+3 11265 11266 11524
+3 11267 11526 11525
+3 11266 11267 11525
+3 11268 11527 11526
+3 11267 11268 11526
+3 11269 11528 11527
+3 11268 11269 11527
+3 11270 11529 11528
+3 11269 11270 11528
+3 11529 11270 11260
+3 11272 11264 11263
+3 11272 11273 11264
+3 11267 11266 11275
+3 11267 11275 11268
+3 11275 11276 11268
+3 11268 11276 11269
+3 11277 11263 11271
+3 11263 11277 11272
+3 11277 11278 11272
+3 11272 11278 11273
+3 11278 11279 11273
+3 11279 11280 11273
+3 11286 11275 11274
+3 11275 11286 11276
+3 11286 11287 11276
+3 11287 11288 11276
+3 11271 11292 11277
+3 11292 11293 11277
+3 11277 11293 11278
+3 11293 11294 11278
+3 11278 11294 11279
+3 11294 11295 11279
+3 11279 11295 11280
+3 11295 11296 11280
+3 11274 11285 11530
+3 11531 11286 11274
+3 11530 11531 11274
+3 11537 11287 11286
+3 11531 11537 11286
+3 11299 11287 11537
+3 11288 11287 11299
+3 11299 11289 11288
+3 11292 11302 11293
+3 11302 11303 11293
+3 11293 11303 11294
+3 11303 11304 11294
+3 11294 11304 11295
+3 11304 11305 11295
+3 11295 11305 11296
+3 11305 11306 11296
+3 11281 11298 11532
+3 11533 11282 11281
+3 11532 11533 11281
+3 11534 11283 11282
+3 11533 11534 11282
+3 11535 11284 11283
+3 11534 11535 11283
+3 11536 11285 11284
+3 11535 11536 11284
+3 11536 11530 11285
+3 11538 11299 11537
+3 11539 11289 11299
+3 11538 11539 11299
+3 11540 11290 11289
+3 11539 11540 11289
+3 11541 11291 11290
+3 11540 11541 11290
+3 11547 11300 11291
+3 11541 11547 11291
+3 11300 11547 11301
+3 11303 11302 11310
+3 11303 11310 11304
+3 11310 11311 11304
+3 11304 11311 11305
+3 11311 11312 11305
+3 11305 11312 11306
+3 11297 11307 11542
+3 11543 11298 11297
+3 11542 11543 11297
+3 11543 11532 11298
+3 11548 11301 11547
+3 11552 11308 11301
+3 11548 11552 11301
+3 11308 11552 11309
+3 11307 11314 11549
+3 11549 11542 11307
+3 11553 11309 11552
+3 11557 11315 11309
+3 11553 11557 11309
+3 11315 11557 11317
+3 11313 11316 11554
+3 11555 11314 11313
+3 11554 11555 11313
+3 11555 11549 11314
+3 11560 11317 11557
+3 11317 11560 11319
+3 11316 11318 11558
+3 11558 11554 11316
+3 11563 11319 11560
+3 11319 11563 11320
+3 11318 11321 11561
+3 11561 11558 11318
+3 11566 11320 11563
+3 11324 11320 11566
+3 11322 11320 11324
+3 11321 11323 11564
+3 11564 11561 11321
+3 11569 11324 11566
+3 11324 11569 11326
+3 11323 11325 11567
+3 11567 11564 11323
+3 11571 11326 11569
+3 11326 11571 11327
+3 11567 11325 11329
+3 11573 11567 11329
+3 11574 11327 11571
+3 11327 11574 11330
+3 11329 11328 11572
+3 11572 11573 11329
+3 11576 11330 11574
+3 11332 11330 11576
+3 11328 11331 11575
+3 11575 11572 11328
+3 11332 11577 11333
+3 11576 11577 11332
+3 11575 11331 11335
+3 11579 11575 11335
+3 11580 11333 11577
+3 11336 11333 11580
+3 11335 11334 11578
+3 11578 11579 11335
+3 11336 11581 11337
+3 11580 11581 11336
+3 11578 11334 11338
+3 11583 11578 11338
+3 11584 11337 11581
+3 11339 11337 11584
+3 11341 11582 11338
+3 11582 11583 11338
+3 11339 11585 11342
+3 11584 11585 11339
+3 11586 11341 11340
+3 11582 11341 11586
+3 11587 11343 11342
+3 11585 11587 11342
+3 11586 11340 11344
+3 11588 11586 11344
+3 11589 11343 11587
+3 11345 11343 11589
+3 11588 11344 11347
+3 11591 11588 11347
+3 11345 11592 11348
+3 11589 11592 11345
+3 11347 11346 11590
+3 11590 11591 11347
+3 11593 11349 11348
+3 11592 11593 11348
+3 11590 11346 11350
+3 11594 11590 11350
+3 11595 11351 11349
+3 11593 11595 11349
+3 11594 11350 11352
+3 11596 11594 11352
+3 11597 11351 11595
+3 11353 11351 11597
+3 11596 11352 11354
+3 11598 11596 11354
+3 11353 11599 11355
+3 11597 11599 11353
+3 11598 11354 11356
+3 11600 11598 11356
+3 11601 11357 11355
+3 11599 11601 11355
+3 11600 11356 11358
+3 11603 11600 11358
+3 11604 11359 11357
+3 11601 11604 11357
+3 11360 11602 11358
+3 11602 11603 11358
+3 11605 11361 11359
+3 11604 11605 11359
+3 11360 11362 11602
+3 11362 11606 11602
+3 11607 11363 11361
+3 11605 11607 11361
+3 11362 11364 11606
+3 11364 11608 11606
+3 11609 11365 11363
+3 11607 11609 11363
+3 11364 11366 11608
+3 11366 11610 11608
+3 11611 11367 11365
+3 11609 11611 11365
+3 11366 11368 11610
+3 11368 11612 11610
+3 11613 11369 11367
+3 11611 11613 11367
+3 11368 11370 11612
+3 11612 11370 11614
+3 11615 11371 11369
+3 11613 11615 11369
+3 11614 11370 11372
+3 11616 11614 11372
+3 11617 11373 11371
+3 11615 11617 11371
+3 11616 11372 11374
+3 11618 11616 11374
+3 11619 11375 11373
+3 11617 11619 11373
+3 11618 11374 11376
+3 11620 11618 11376
+3 11619 11377 11375
+3 11621 11377 11619
+3 11620 11376 11378
+3 11622 11620 11378
+3 11379 11377 11623
+3 11377 11621 11623
+3 11622 11378 11380
+3 11624 11622 11380
+3 11381 11623 11625
+3 11379 11623 11381
+3 11382 11624 11380
+3 11626 11624 11382
+3 11627 11383 11381
+3 11625 11627 11381
+3 11382 11384 11626
+3 11626 11384 11628
+3 11627 11385 11383
+3 11629 11385 11627
+3 11628 11384 11386
+3 11630 11628 11386
+3 11387 11629 11631
+3 11385 11629 11387
+3 11630 11386 11388
+3 11632 11630 11388
+3 11633 11389 11387
+3 11631 11633 11387
+3 11632 11388 11390
+3 11632 11390 11634
+3 11633 11391 11389
+3 11635 11391 11633
+3 11634 11390 11392
+3 11636 11634 11392
+3 11393 11635 11637
+3 11391 11635 11393
+3 11636 11392 11396
+3 11636 11396 11638
+3 11639 11397 11393
+3 11637 11639 11393
+3 11398 11395 11394
+3 11638 11396 11399
+3 11640 11638 11399
+3 11400 11639 11641
+3 11639 11400 11397
+3 11640 11399 11401
+3 11640 11401 11642
+3 11643 11402 11400
+3 11641 11643 11400
+3 11642 11401 11403
+3 11644 11642 11403
+3 11404 11643 11646
+3 11643 11404 11402
+3 11644 11403 11405
+3 11644 11405 11647
+3 11406 11646 11649
+3 11646 11406 11404
+3 11647 11405 11407
+3 11647 11407 11650
+3 11408 11649 11651
+3 11649 11408 11406
+3 11650 11407 11409
+3 11650 11409 11652
+3 11654 11410 11408
+3 11651 11654 11408
+3 11652 11409 11411
+3 11652 11411 11655
+3 11412 11654 11657
+3 11654 11412 11410
+3 11655 11411 11413
+3 11655 11413 11658
+3 11414 11657 11661
+3 11657 11414 11412
+3 11658 11413 11415
+3 11658 11415 11662
+3 11416 11660 11665
+3 11417 11661 11660
+3 11416 11417 11660
+3 11661 11417 11414
+3 11662 11415 11418
+3 11419 11663 11662
+3 11418 11419 11662
+3 11663 11419 11666
+3 11420 11664 11670
+3 11421 11665 11664
+3 11420 11421 11664
+3 11665 11421 11416
+3 11666 11419 11422
+3 11423 11667 11666
+3 11422 11423 11666
+3 11667 11423 11671
+3 11424 11669 11679
+3 11425 11670 11669
+3 11424 11425 11669
+3 11425 11420 11670
+3 11426 11420 11425
+3 11420 11426 11421
+3 11671 11423 11427
+3 11428 11672 11671
+3 11427 11428 11671
+3 11429 11673 11672
+3 11428 11429 11672
+3 11430 11674 11673
+3 11429 11430 11673
+3 11431 11675 11674
+3 11430 11431 11674
+3 11675 11431 11680
+3 11432 11676 11683
+3 11433 11677 11676
+3 11432 11433 11676
+3 11434 11678 11677
+3 11433 11434 11677
+3 11435 11679 11678
+3 11434 11435 11678
+3 11679 11435 11424
+3 11680 11431 11436
+3 11437 11681 11680
+3 11436 11437 11680
+3 11438 11682 11681
+3 11437 11438 11681
+3 11439 11683 11682
+3 11438 11439 11682
+3 11683 11439 11432
+3 11440 11450 11684
+3 11685 11441 11440
+3 11684 11685 11440
+3 11686 11442 11441
+3 11685 11686 11441
+3 11687 11443 11442
+3 11686 11687 11442
+3 11688 11444 11443
+3 11687 11688 11443
+3 11689 11445 11444
+3 11688 11689 11444
+3 11690 11446 11445
+3 11689 11690 11445
+3 11691 11447 11446
+3 11690 11691 11446
+3 11692 11448 11447
+3 11691 11692 11447
+3 11694 11451 11448
+3 11692 11694 11448
+3 11451 11694 11452
+3 11457 11449 11453
+3 11450 11457 11693
+3 11449 11457 11450
+3 11693 11684 11450
+3 11695 11452 11694
+3 11702 11454 11452
+3 11695 11702 11452
+3 11454 11702 11455
+3 11453 11456 11696
+3 11697 11457 11453
+3 11696 11697 11453
+3 11697 11693 11457
+3 11705 11455 11702
+3 11460 11455 11705
+3 11458 11455 11460
+3 11460 11461 11458
+3 11456 11459 11703
+3 11703 11696 11456
+3 11709 11460 11705
+3 11463 11460 11709
+3 11461 11460 11463
+3 11459 11462 11706
+3 11706 11703 11459
+3 11712 11463 11709
+3 11463 11712 11465
+3 11466 11462 11464
+3 11706 11462 11466
+3 11714 11706 11466
+3 11715 11467 11465
+3 11712 11715 11465
+3 11467 11468 11465
+3 11466 11469 11713
+3 11464 11469 11466
+3 11713 11714 11466
+3 11718 11467 11715
+3 11470 11467 11718
+3 11468 11467 11470
+3 11713 11469 11472
+3 11719 11713 11472
+3 11720 11473 11470
+3 11718 11720 11470
+3 11473 11474 11470
+3 11475 11472 11471
+3 11719 11472 11475
+3 11722 11719 11475
+3 11724 11473 11720
+3 11476 11473 11724
+3 11474 11473 11476
+3 11475 11477 11721
+3 11471 11477 11475
+3 11721 11722 11475
+3 11726 11478 11476
+3 11724 11726 11476
+3 11721 11477 11479
+3 11727 11721 11479
+3 11729 11480 11478
+3 11726 11729 11478
+3 11727 11479 11481
+3 11730 11727 11481
+3 11732 11482 11480
+3 11729 11732 11480
+3 11730 11481 11483
+3 11733 11730 11483
+3 11735 11484 11482
+3 11732 11735 11482
+3 11733 11483 11485
+3 11736 11733 11485
+3 11738 11486 11484
+3 11735 11738 11484
+3 11485 11488 11736
+3 11487 11488 11485
+3 11736 11488 11739
+3 11741 11489 11486
+3 11738 11741 11486
+3 11488 11487 11490
+3 11739 11488 11490
+3 11742 11739 11490
+3 11491 11741 11743
+3 11491 11489 11741
+3 11492 11489 11491
+3 11742 11490 11493
+3 11744 11742 11493
+3 11746 11494 11491
+3 11743 11746 11491
+3 11491 11494 11492
+3 11493 11496 11744
+3 11495 11496 11493
+3 11744 11496 11747
+3 11749 11497 11494
+3 11746 11749 11494
+3 11496 11495 11498
+3 11747 11496 11498
+3 11750 11747 11498
+3 11499 11749 11753
+3 11749 11499 11497
+3 11750 11498 11500
+3 11750 11500 11754
+3 11501 11753 11757
+3 11501 11499 11753
+3 11502 11499 11501
+3 11500 11504 11754
+3 11503 11504 11500
+3 11754 11504 11758
+3 11505 11757 11761
+3 11505 11501 11757
+3 11506 11501 11505
+3 11501 11506 11502
+3 11504 11503 11507
+3 11504 11508 11758
+3 11507 11508 11504
+3 11758 11508 11762
+3 11509 11761 11767
+3 11509 11505 11761
+3 11510 11505 11509
+3 11505 11510 11506
+3 11762 11508 11511
+3 11512 11763 11762
+3 11511 11512 11762
+3 11763 11512 11768
+3 11513 11766 11777
+3 11514 11767 11766
+3 11513 11514 11766
+3 11514 11509 11767
+3 11515 11509 11514
+3 11509 11515 11510
+3 11512 11511 11516
+3 11512 11517 11768
+3 11516 11517 11512
+3 11518 11769 11768
+3 11517 11518 11768
+3 11519 11770 11769
+3 11518 11519 11769
+3 11770 11519 11778
+3 11520 11775 11781
+3 11521 11776 11775
+3 11520 11521 11775
+3 11522 11777 11776
+3 11521 11522 11776
+3 11522 11513 11777
+3 11523 11513 11522
+3 11513 11523 11514
+3 11519 11518 11524
+3 11519 11525 11778
+3 11524 11525 11519
+3 11526 11779 11778
+3 11525 11526 11778
+3 11527 11780 11779
+3 11526 11527 11779
+3 11528 11781 11780
+3 11527 11528 11780
+3 11528 11520 11781
+3 11529 11520 11528
+3 11520 11529 11521
+3 11544 11530 11536
+3 11530 11544 11531
+3 11544 11545 11531
+3 11531 11545 11537
+3 11545 11546 11537
+3 11546 11538 11537
+3 11550 11532 11543
+3 11533 11550 11782
+3 11532 11550 11533
+3 11783 11534 11533
+3 11782 11783 11533
+3 11784 11535 11534
+3 11783 11784 11534
+3 11785 11536 11535
+3 11784 11785 11535
+3 11786 11544 11536
+3 11785 11786 11536
+3 11787 11545 11544
+3 11786 11787 11544
+3 11788 11546 11545
+3 11787 11788 11545
+3 11789 11538 11546
+3 11788 11789 11546
+3 11790 11539 11538
+3 11789 11790 11538
+3 11791 11540 11539
+3 11790 11791 11539
+3 11794 11541 11540
+3 11791 11794 11540
+3 11551 11541 11794
+3 11547 11541 11551
+3 11551 11548 11547
+3 11556 11542 11549
+3 11543 11556 11792
+3 11542 11556 11543
+3 11793 11550 11543
+3 11792 11793 11543
+3 11793 11782 11550
+3 11795 11551 11794
+3 11796 11548 11551
+3 11795 11796 11551
+3 11801 11552 11548
+3 11796 11801 11548
+3 11552 11801 11553
+3 11549 11555 11797
+3 11798 11556 11549
+3 11797 11798 11549
+3 11798 11792 11556
+3 11804 11553 11801
+3 11559 11553 11804
+3 11557 11553 11559
+3 11559 11560 11557
+3 11562 11554 11558
+3 11555 11562 11802
+3 11554 11562 11555
+3 11802 11797 11555
+3 11805 11559 11804
+3 11808 11560 11559
+3 11805 11808 11559
+3 11560 11808 11563
+3 11565 11558 11561
+3 11562 11565 11806
+3 11558 11565 11562
+3 11806 11802 11562
+3 11812 11563 11808
+3 11563 11812 11566
+3 11568 11561 11564
+3 11565 11568 11809
+3 11561 11568 11565
+3 11809 11806 11565
+3 11815 11566 11812
+3 11566 11815 11569
+3 11570 11564 11567
+3 11568 11570 11813
+3 11564 11570 11568
+3 11813 11809 11568
+3 11817 11569 11815
+3 11569 11817 11571
+3 11570 11573 11816
+3 11567 11573 11570
+3 11816 11813 11570
+3 11820 11571 11817
+3 11571 11820 11574
+3 11573 11572 11818
+3 11818 11816 11573
+3 11823 11574 11820
+3 11574 11823 11576
+3 11572 11575 11821
+3 11821 11818 11572
+3 11825 11577 11576
+3 11823 11825 11576
+3 11821 11575 11579
+3 11827 11821 11579
+3 11829 11577 11825
+3 11577 11829 11580
+3 11579 11578 11826
+3 11826 11827 11579
+3 11831 11581 11580
+3 11829 11831 11580
+3 11826 11578 11583
+3 11833 11826 11583
+3 11834 11581 11831
+3 11581 11834 11584
+3 11583 11582 11832
+3 11832 11833 11583
+3 11836 11585 11584
+3 11834 11836 11584
+3 11832 11582 11586
+3 11837 11832 11586
+3 11838 11587 11585
+3 11836 11838 11585
+3 11837 11586 11588
+3 11839 11837 11588
+3 11840 11587 11838
+3 11587 11840 11589
+3 11839 11588 11591
+3 11842 11839 11591
+3 11843 11592 11589
+3 11840 11843 11589
+3 11591 11590 11841
+3 11841 11842 11591
+3 11844 11593 11592
+3 11843 11844 11592
+3 11841 11590 11594
+3 11845 11841 11594
+3 11846 11593 11844
+3 11595 11593 11846
+3 11845 11594 11596
+3 11847 11845 11596
+3 11595 11848 11597
+3 11846 11848 11595
+3 11847 11596 11598
+3 11849 11847 11598
+3 11850 11599 11597
+3 11848 11850 11597
+3 11849 11598 11600
+3 11852 11849 11600
+3 11853 11601 11599
+3 11850 11853 11599
+3 11603 11851 11600
+3 11851 11852 11600
+3 11854 11604 11601
+3 11853 11854 11601
+3 11855 11603 11602
+3 11851 11603 11855
+3 11856 11605 11604
+3 11854 11856 11604
+3 11855 11602 11606
+3 11857 11855 11606
+3 11858 11607 11605
+3 11856 11858 11605
+3 11857 11606 11608
+3 11859 11857 11608
+3 11860 11609 11607
+3 11858 11860 11607
+3 11859 11608 11610
+3 11861 11859 11610
+3 11862 11611 11609
+3 11860 11862 11609
+3 11861 11610 11612
+3 11863 11861 11612
+3 11864 11613 11611
+3 11862 11864 11611
+3 11614 11863 11612
+3 11865 11863 11614
+3 11866 11615 11613
+3 11864 11866 11613
+3 11614 11616 11865
+3 11865 11616 11867
+3 11868 11617 11615
+3 11866 11868 11615
+3 11867 11616 11618
+3 11869 11867 11618
+3 11870 11619 11617
+3 11868 11870 11617
+3 11869 11618 11620
+3 11871 11869 11620
+3 11872 11621 11619
+3 11870 11872 11619
+3 11871 11620 11622
+3 11873 11871 11622
+3 11874 11623 11621
+3 11872 11874 11621
+3 11873 11622 11624
+3 11875 11873 11624
+3 11625 11874 11876
+3 11874 11625 11623
+3 11875 11624 11626
+3 11877 11875 11626
+3 11878 11627 11625
+3 11876 11878 11625
+3 11877 11626 11628
+3 11877 11628 11879
+3 11880 11629 11627
+3 11878 11880 11627
+3 11879 11628 11630
+3 11881 11879 11630
+3 11631 11880 11882
+3 11880 11631 11629
+3 11881 11630 11632
+3 11883 11881 11632
+3 11885 11633 11631
+3 11882 11885 11631
+3 11883 11632 11634
+3 11883 11634 11886
+3 11887 11635 11633
+3 11885 11887 11633
+3 11886 11634 11636
+3 11888 11886 11636
+3 11637 11887 11890
+3 11887 11637 11635
+3 11888 11636 11638
+3 11888 11638 11891
+3 11893 11639 11637
+3 11890 11893 11637
+3 11891 11638 11640
+3 11894 11891 11640
+3 11641 11893 11896
+3 11893 11641 11639
+3 11894 11640 11642
+3 11894 11642 11897
+3 11899 11643 11641
+3 11896 11899 11641
+3 11642 11645 11897
+3 11644 11645 11642
+3 11897 11645 11900
+3 11646 11899 11901
+3 11899 11646 11643
+3 11645 11644 11647
+3 11645 11648 11900
+3 11647 11648 11645
+3 11900 11648 11902
+3 11649 11901 11903
+3 11901 11649 11646
+3 11648 11647 11650
+3 11902 11648 11650
+3 11904 11902 11650
+3 11651 11903 11907
+3 11903 11651 11649
+3 11904 11650 11652
+3 11904 11652 11908
+3 11653 11907 11911
+3 11653 11651 11907
+3 11654 11651 11653
+3 11908 11652 11655
+3 11908 11655 11912
+3 11656 11911 11915
+3 11656 11653 11911
+3 11657 11653 11656
+3 11653 11657 11654
+3 11912 11655 11658
+3 11659 11913 11912
+3 11658 11659 11912
+3 11913 11659 11916
+3 11660 11915 11919
+3 11660 11656 11915
+3 11661 11656 11660
+3 11656 11661 11657
+3 11659 11658 11662
+3 11659 11663 11916
+3 11662 11663 11659
+3 11916 11663 11920
+3 11664 11918 11925
+3 11665 11919 11918
+3 11664 11665 11918
+3 11919 11665 11660
+3 11920 11663 11666
+3 11667 11921 11920
+3 11666 11667 11920
+3 11668 11922 11921
+3 11667 11668 11921
+3 11922 11668 11926
+3 11669 11924 11937
+3 11670 11925 11924
+3 11669 11670 11924
+3 11925 11670 11664
+3 11668 11667 11671
+3 11668 11672 11926
+3 11671 11672 11668
+3 11673 11927 11926
+3 11672 11673 11926
+3 11674 11928 11927
+3 11673 11674 11927
+3 11675 11929 11928
+3 11674 11675 11928
+3 11929 11675 11938
+3 11676 11934 11941
+3 11677 11935 11934
+3 11676 11677 11934
+3 11678 11936 11935
+3 11677 11678 11935
+3 11679 11937 11936
+3 11678 11679 11936
+3 11937 11679 11669
+3 11938 11675 11680
+3 11681 11939 11938
+3 11680 11681 11938
+3 11682 11940 11939
+3 11681 11682 11939
+3 11683 11941 11940
+3 11682 11683 11940
+3 11941 11683 11676
+3 11698 11684 11693
+3 11684 11698 11685
+3 11698 11699 11685
+3 11686 11699 11942
+3 11685 11699 11686
+3 11943 11687 11686
+3 11942 11943 11686
+3 11944 11688 11687
+3 11943 11944 11687
+3 11945 11689 11688
+3 11944 11945 11688
+3 11946 11690 11689
+3 11945 11946 11689
+3 11950 11691 11690
+3 11946 11950 11690
+3 11700 11691 11950
+3 11692 11691 11700
+3 11692 11700 11694
+3 11700 11701 11694
+3 11701 11695 11694
+3 11693 11697 11947
+3 11948 11698 11693
+3 11947 11948 11693
+3 11949 11699 11698
+3 11948 11949 11698
+3 11949 11942 11699
+3 11951 11700 11950
+3 11952 11701 11700
+3 11951 11952 11700
+3 11960 11695 11701
+3 11952 11960 11701
+3 11704 11695 11960
+3 11702 11695 11704
+3 11704 11705 11702
+3 11707 11696 11703
+3 11697 11707 11953
+3 11696 11707 11697
+3 11953 11947 11697
+3 11967 11704 11960
+3 11708 11704 11967
+3 11705 11704 11708
+3 11708 11709 11705
+3 11710 11703 11706
+3 11707 11710 11961
+3 11703 11710 11707
+3 11961 11953 11707
+3 11973 11708 11967
+3 11711 11708 11973
+3 11709 11708 11711
+3 11711 11712 11709
+3 11710 11714 11968
+3 11706 11714 11710
+3 11968 11961 11710
+3 11978 11711 11973
+3 11715 11711 11978
+3 11712 11711 11715
+3 11716 11714 11713
+3 11968 11714 11716
+3 11980 11968 11716
+3 11983 11717 11715
+3 11978 11983 11715
+3 11717 11718 11715
+3 11716 11719 11979
+3 11713 11719 11716
+3 11979 11980 11716
+3 11986 11717 11983
+3 11720 11717 11986
+3 11718 11717 11720
+3 11979 11719 11722
+3 11987 11979 11722
+3 11990 11723 11720
+3 11986 11990 11720
+3 11723 11724 11720
+3 11725 11722 11721
+3 11987 11722 11725
+3 11991 11987 11725
+3 11994 11723 11990
+3 11726 11723 11994
+3 11724 11723 11726
+3 11721 11727 11725
+3 11727 11728 11725
+3 11991 11725 11728
+3 11995 11991 11728
+3 11998 11729 11726
+3 11994 11998 11726
+3 11727 11730 11728
+3 11730 11731 11728
+3 11995 11728 11731
+3 11999 11995 11731
+3 12001 11732 11729
+3 11998 12001 11729
+3 11730 11733 11731
+3 11733 11734 11731
+3 11999 11731 11734
+3 12002 11999 11734
+3 12004 11735 11732
+3 12001 12004 11732
+3 11733 11736 11734
+3 11736 11737 11734
+3 12002 11734 11737
+3 12005 12002 11737
+3 12008 11738 11735
+3 12004 12008 11735
+3 11737 11736 11739
+3 12005 11737 11739
+3 12009 12005 11739
+3 11740 12008 12011
+3 11740 11738 12008
+3 11741 11738 11740
+3 12009 11739 11742
+3 12012 12009 11742
+3 12015 11743 11740
+3 12011 12015 11740
+3 11740 11743 11741
+3 11742 11745 12012
+3 11744 11745 11742
+3 12012 11745 12016
+3 12019 11746 11743
+3 12015 12019 11743
+3 11745 11744 11747
+3 12016 11745 11747
+3 12020 12016 11747
+3 11748 12019 12024
+3 11748 11746 12019
+3 11749 11746 11748
+3 11747 11751 12020
+3 11750 11751 11747
+3 12020 11751 12025
+3 11752 12024 12029
+3 11752 11748 12024
+3 11753 11748 11752
+3 11748 11753 11749
+3 11751 11750 11754
+3 11751 11755 12025
+3 11754 11755 11751
+3 12025 11755 12030
+3 11756 12029 12035
+3 11756 11752 12029
+3 11757 11752 11756
+3 11752 11757 11753
+3 11755 11754 11758
+3 11755 11759 12030
+3 11758 11759 11755
+3 12030 11759 12036
+3 11760 12035 12047
+3 11760 11756 12035
+3 11761 11756 11760
+3 11756 11761 11757
+3 11759 11758 11762
+3 11759 11763 12036
+3 11762 11763 11759
+3 11764 12037 12036
+3 11763 11764 12036
+3 12037 11764 12048
+3 11765 12046 12055
+3 11766 12047 12046
+3 11765 11766 12046
+3 11766 11760 12047
+3 11767 11760 11766
+3 11760 11767 11761
+3 11764 11763 11768
+3 11764 11769 12048
+3 11768 11769 11764
+3 11770 12049 12048
+3 11769 11770 12048
+3 11771 12050 12049
+3 11770 11771 12049
+3 11772 12051 12050
+3 11771 11772 12050
+3 11773 12052 12051
+3 11772 11773 12051
+3 11774 12053 12052
+3 11773 11774 12052
+3 11775 12054 12053
+3 11774 11775 12053
+3 11776 12055 12054
+3 11775 11776 12054
+3 11776 11765 12055
+3 11777 11765 11776
+3 11765 11777 11766
+3 11771 11770 11778
+3 11771 11778 11772
+3 11778 11779 11772
+3 11772 11779 11773
+3 11779 11780 11773
+3 11773 11780 11774
+3 11780 11781 11774
+3 11774 11781 11775
+3 11799 11782 11793
+3 11783 11799 12056
+3 11782 11799 11783
+3 12057 11784 11783
+3 12056 12057 11783
+3 12058 11785 11784
+3 12057 12058 11784
+3 12059 11786 11785
+3 12058 12059 11785
+3 12060 11787 11786
+3 12059 12060 11786
+3 12061 11788 11787
+3 12060 12061 11787
+3 12062 11789 11788
+3 12061 12062 11788
+3 12063 11790 11789
+3 12062 12063 11789
+3 12067 11791 11790
+3 12063 12067 11790
+3 11800 11791 12067
+3 11794 11791 11800
+3 11800 11795 11794
+3 11792 11798 12064
+3 12065 11793 11792
+3 12064 12065 11792
+3 12066 11799 11793
+3 12065 12066 11793
+3 12066 12056 11799
+3 12068 11800 12067
+3 12069 11795 11800
+3 12068 12069 11800
+3 12074 11796 11795
+3 12069 12074 11795
+3 11803 11796 12074
+3 11801 11796 11803
+3 11803 11804 11801
+3 11807 11797 11802
+3 11798 11807 12070
+3 11797 11807 11798
+3 12070 12064 11798
+3 12075 11803 12074
+3 12080 11804 11803
+3 12075 12080 11803
+3 11804 12080 11805
+3 11810 11802 11806
+3 11807 11810 12076
+3 11802 11810 11807
+3 12076 12070 11807
+3 12085 11805 12080
+3 11811 11805 12085
+3 11808 11805 11811
+3 11811 11812 11808
+3 11806 11809 12081
+3 12082 11810 11806
+3 12081 12082 11806
+3 12082 12076 11810
+3 12088 11811 12085
+3 11814 11811 12088
+3 11812 11811 11814
+3 11814 11815 11812
+3 11809 11813 12086
+3 12086 12081 11809
+3 12089 11814 12088
+3 12092 11815 11814
+3 12089 12092 11814
+3 11815 12092 11817
+3 11813 11816 12090
+3 12090 12086 11813
+3 12095 11819 11817
+3 12092 12095 11817
+3 11819 11820 11817
+3 11816 11818 12093
+3 12093 12090 11816
+3 12097 11819 12095
+3 11822 11819 12097
+3 11820 11819 11822
+3 11822 11823 11820
+3 11824 11818 11821
+3 12093 11818 11824
+3 12099 12093 11824
+3 12101 11822 12097
+3 11825 11822 12101
+3 11823 11822 11825
+3 11824 11827 12098
+3 11821 11827 11824
+3 12098 12099 11824
+3 12103 11828 11825
+3 12101 12103 11825
+3 11828 11829 11825
+3 11830 11827 11826
+3 12098 11827 11830
+3 12105 12098 11830
+3 12106 11828 12103
+3 11831 11828 12106
+3 11829 11828 11831
+3 11830 11833 12104
+3 11826 11833 11830
+3 12104 12105 11830
+3 12108 11831 12106
+3 11831 12108 11834
+3 11835 11833 11832
+3 12104 11833 11835
+3 12110 12104 11835
+3 12111 11836 11834
+3 12108 12111 11834
+3 11835 11837 12109
+3 11832 11837 11835
+3 12109 12110 11835
+3 12113 11838 11836
+3 12111 12113 11836
+3 12109 11837 11839
+3 12114 12109 11839
+3 12115 11838 12113
+3 11838 12115 11840
+3 12114 11839 11842
+3 12117 12114 11842
+3 12118 11843 11840
+3 12115 12118 11840
+3 11842 11841 12116
+3 12116 12117 11842
+3 12120 11844 11843
+3 12118 12120 11843
+3 12116 11841 11845
+3 12121 12116 11845
+3 12123 11844 12120
+3 11844 12123 11846
+3 12121 11845 11847
+3 12124 12121 11847
+3 12125 11848 11846
+3 12123 12125 11846
+3 12124 11847 11849
+3 12126 12124 11849
+3 12127 11850 11848
+3 12125 12127 11848
+3 12126 11849 11852
+3 12129 12126 11852
+3 12130 11853 11850
+3 12127 12130 11850
+3 11852 11851 12128
+3 12128 12129 11852
+3 12132 11854 11853
+3 12130 12132 11853
+3 12128 11851 11855
+3 12133 12128 11855
+3 12135 11856 11854
+3 12132 12135 11854
+3 12133 11855 11857
+3 12136 12133 11857
+3 12137 11858 11856
+3 12135 12137 11856
+3 12136 11857 11859
+3 12138 12136 11859
+3 12139 11860 11858
+3 12137 12139 11858
+3 12138 11859 11861
+3 12140 12138 11861
+3 12141 11862 11860
+3 12139 12141 11860
+3 12140 11861 11863
+3 12142 12140 11863
+3 12144 11864 11862
+3 12141 12144 11862
+3 12142 11863 11865
+3 12145 12142 11865
+3 12147 11866 11864
+3 12144 12147 11864
+3 12145 11865 11867
+3 12145 11867 12148
+3 12149 11868 11866
+3 12147 12149 11866
+3 12148 11867 11869
+3 12150 12148 11869
+3 12151 11870 11868
+3 12149 12151 11868
+3 12150 11869 11871
+3 12152 12150 11871
+3 12153 11872 11870
+3 12151 12153 11870
+3 12152 11871 11873
+3 12154 12152 11873
+3 12155 11874 11872
+3 12153 12155 11872
+3 12154 11873 11875
+3 12156 12154 11875
+3 11876 12155 12157
+3 12155 11876 11874
+3 12156 11875 11877
+3 12158 12156 11877
+3 12160 11878 11876
+3 12157 12160 11876
+3 12158 11877 11879
+3 12158 11879 12161
+3 12162 11880 11878
+3 12160 12162 11878
+3 12161 11879 11881
+3 12163 12161 11881
+3 11882 12162 12165
+3 12162 11882 11880
+3 11881 11884 12163
+3 11883 11884 11881
+3 12163 11884 12166
+3 12167 11885 11882
+3 12165 12167 11882
+3 11884 11883 11886
+3 12166 11884 11886
+3 12168 12166 11886
+3 12170 11887 11885
+3 12167 12170 11885
+3 11886 11889 12168
+3 11888 11889 11886
+3 12168 11889 12171
+3 11890 12170 12172
+3 12170 11890 11887
+3 11889 11888 11891
+3 12171 11889 11891
+3 12173 12171 11891
+3 11892 12172 12175
+3 11892 11890 12172
+3 11893 11890 11892
+3 11891 11895 12173
+3 11894 11895 11891
+3 12173 11895 12176
+3 12178 11896 11892
+3 12175 12178 11892
+3 11892 11896 11893
+3 11895 11894 11897
+3 12176 11895 11897
+3 12179 12176 11897
+3 11898 12178 12181
+3 11898 11896 12178
+3 11899 11896 11898
+3 12179 11897 11900
+3 12179 11900 12182
+3 12185 11901 11898
+3 12181 12185 11898
+3 11898 11901 11899
+3 12182 11900 11902
+3 12182 11902 12186
+3 11903 12185 12189
+3 12185 11903 11901
+3 11902 11905 12186
+3 11904 11905 11902
+3 12186 11905 12190
+3 11906 12188 12192
+3 11907 12189 12188
+3 11906 11907 12188
+3 12189 11907 11903
+3 11905 11904 11908
+3 11905 11909 12190
+3 11908 11909 11905
+3 12190 11909 12193
+3 11910 12192 12196
+3 11910 11906 12192
+3 11911 11906 11910
+3 11906 11911 11907
+3 11909 11908 11912
+3 11909 11913 12193
+3 11912 11913 11909
+3 12193 11913 12197
+3 11914 12196 12202
+3 11914 11910 12196
+3 11915 11910 11914
+3 11910 11915 11911
+3 12197 11913 11916
+3 11917 12198 12197
+3 11916 11917 12197
+3 12198 11917 12203
+3 11918 12202 12210
+3 11918 11914 12202
+3 11919 11914 11918
+3 11914 11919 11915
+3 11917 11916 11920
+3 11917 11921 12203
+3 11920 11921 11917
+3 11922 12204 12203
+3 11921 11922 12203
+3 12204 11922 12211
+3 11923 12208 12221
+3 11924 12209 12208
+3 11923 11924 12208
+3 11925 12210 12209
+3 11924 11925 12209
+3 12210 11925 11918
+3 12211 11922 11926
+3 11927 12212 12211
+3 11926 11927 12211
+3 11928 12213 12212
+3 11927 11928 12212
+3 11929 12214 12213
+3 11928 11929 12213
+3 11930 12215 12214
+3 11929 11930 12214
+3 11931 12216 12215
+3 11930 11931 12215
+3 11932 12217 12216
+3 11931 11932 12216
+3 11933 12218 12217
+3 11932 11933 12217
+3 11934 12219 12218
+3 11933 11934 12218
+3 11935 12220 12219
+3 11934 11935 12219
+3 11936 12221 12220
+3 11935 11936 12220
+3 11936 11923 12221
+3 11937 11923 11936
+3 11923 11937 11924
+3 11930 11929 11938
+3 11930 11938 11931
+3 11938 11939 11931
+3 11931 11939 11932
+3 11939 11940 11932
+3 11932 11940 11933
+3 11940 11941 11933
+3 11933 11941 11934
+3 11954 11942 11949
+3 11942 11954 11943
+3 11954 11955 11943
+3 11943 11955 11944
+3 11955 11956 11944
+3 11944 11956 11945
+3 11956 11957 11945
+3 11945 11957 11946
+3 11957 11958 11946
+3 11946 11958 11950
+3 11958 11959 11950
+3 11959 11951 11950
+3 11962 11947 11953
+3 11947 11962 11948
+3 11962 11963 11948
+3 11948 11963 11949
+3 11963 11964 11949
+3 11954 11964 12222
+3 11949 11964 11954
+3 12223 11955 11954
+3 12222 12223 11954
+3 12224 11956 11955
+3 12223 12224 11955
+3 12225 11957 11956
+3 12224 12225 11956
+3 12226 11958 11957
+3 12225 12226 11957
+3 12227 11959 11958
+3 12226 12227 11958
+3 12230 11951 11959
+3 12227 12230 11959
+3 11965 11951 12230
+3 11952 11951 11965
+3 11952 11965 11960
+3 11965 11966 11960
+3 11966 11967 11960
+3 11969 11953 11961
+3 11953 11969 11962
+3 11969 11970 11962
+3 11963 11970 12228
+3 11962 11970 11963
+3 12229 11964 11963
+3 12228 12229 11963
+3 12229 12222 11964
+3 12239 11965 12230
+3 11971 11965 12239
+3 11966 11965 11971
+3 11966 11971 11967
+3 11971 11972 11967
+3 11972 11973 11967
+3 11974 11961 11968
+3 11961 11974 11969
+3 11974 11975 11969
+3 11970 11975 12231
+3 11969 11975 11970
+3 12231 12228 11970
+3 12247 11971 12239
+3 11976 11971 12247
+3 11972 11971 11976
+3 11972 11976 11973
+3 11976 11977 11973
+3 11977 11978 11973
+3 11968 11980 11974
+3 11980 11981 11974
+3 11975 11981 12240
+3 11974 11981 11975
+3 12240 12231 11975
+3 12253 11976 12247
+3 11982 11976 12253
+3 11977 11976 11982
+3 11977 11982 11978
+3 11982 11983 11978
+3 11984 11980 11979
+3 11981 11984 12248
+3 11980 11984 11981
+3 12248 12240 11981
+3 12258 11982 12253
+3 11985 11982 12258
+3 11983 11982 11985
+3 11985 11986 11983
+3 11979 11987 11984
+3 11987 11988 11984
+3 12248 11984 11988
+3 12259 12248 11988
+3 12263 11989 11985
+3 12258 12263 11985
+3 11985 11989 11986
+3 11989 11990 11986
+3 11987 11991 11988
+3 11991 11992 11988
+3 12259 11988 11992
+3 12264 12259 11992
+3 12268 11989 12263
+3 11993 11989 12268
+3 11990 11989 11993
+3 11993 11994 11990
+3 11991 11995 11992
+3 11995 11996 11992
+3 12264 11992 11996
+3 12270 12264 11996
+3 12273 11997 11993
+3 12268 12273 11993
+3 11993 11997 11994
+3 11997 11998 11994
+3 11996 11999 12269
+3 11995 11999 11996
+3 12269 12270 11996
+3 12277 12000 11997
+3 12273 12277 11997
+3 11997 12000 11998
+3 12000 12001 11998
+3 12269 11999 12002
+3 12278 12269 12002
+3 12282 12003 12000
+3 12277 12282 12000
+3 12000 12003 12001
+3 12003 12004 12001
+3 12002 12006 12278
+3 12005 12006 12002
+3 12278 12006 12283
+3 12287 12007 12003
+3 12282 12287 12003
+3 12003 12007 12004
+3 12007 12008 12004
+3 12005 12009 12006
+3 12009 12010 12006
+3 12283 12006 12010
+3 12288 12283 12010
+3 12293 12011 12007
+3 12287 12293 12007
+3 12007 12011 12008
+3 12009 12012 12010
+3 12012 12013 12010
+3 12288 12010 12013
+3 12294 12288 12013
+3 12014 12293 12299
+3 12014 12011 12293
+3 12015 12011 12014
+3 12013 12012 12016
+3 12013 12017 12294
+3 12016 12017 12013
+3 12294 12017 12300
+3 12305 12018 12014
+3 12299 12305 12014
+3 12014 12018 12015
+3 12018 12019 12015
+3 12016 12020 12017
+3 12020 12021 12017
+3 12017 12022 12300
+3 12021 12022 12017
+3 12300 12022 12306
+3 12023 12305 12313
+3 12023 12018 12305
+3 12024 12018 12023
+3 12018 12024 12019
+3 12021 12020 12025
+3 12021 12025 12022
+3 12025 12026 12022
+3 12022 12027 12306
+3 12026 12027 12022
+3 12306 12027 12314
+3 12028 12313 12324
+3 12028 12023 12313
+3 12029 12023 12028
+3 12023 12029 12024
+3 12026 12025 12030
+3 12026 12030 12027
+3 12030 12031 12027
+3 12027 12032 12314
+3 12031 12032 12027
+3 12314 12032 12325
+3 12033 12323 12332
+3 12034 12324 12323
+3 12033 12034 12323
+3 12034 12028 12324
+3 12035 12028 12034
+3 12028 12035 12029
+3 12031 12030 12036
+3 12031 12036 12032
+3 12036 12037 12032
+3 12032 12038 12325
+3 12037 12038 12032
+3 12039 12326 12325
+3 12038 12039 12325
+3 12040 12327 12326
+3 12039 12040 12326
+3 12041 12328 12327
+3 12040 12041 12327
+3 12042 12329 12328
+3 12041 12042 12328
+3 12043 12330 12329
+3 12042 12043 12329
+3 12044 12331 12330
+3 12043 12044 12330
+3 12045 12332 12331
+3 12044 12045 12331
+3 12045 12033 12332
+3 12046 12033 12045
+3 12033 12046 12034
+3 12046 12047 12034
+3 12034 12047 12035
+3 12038 12037 12048
+3 12038 12048 12039
+3 12048 12049 12039
+3 12039 12049 12040
+3 12049 12050 12040
+3 12040 12050 12041
+3 12050 12051 12041
+3 12041 12051 12042
+3 12051 12052 12042
+3 12042 12052 12043
+3 12052 12053 12043
+3 12043 12053 12044
+3 12053 12054 12044
+3 12044 12054 12045
+3 12054 12055 12045
+3 12045 12055 12046
+3 12071 12056 12066
+3 12056 12071 12057
+3 12071 12072 12057
+3 12058 12072 12333
+3 12057 12072 12058
+3 12334 12059 12058
+3 12333 12334 12058
+3 12335 12060 12059
+3 12334 12335 12059
+3 12336 12061 12060
+3 12335 12336 12060
+3 12337 12062 12061
+3 12336 12337 12061
+3 12341 12063 12062
+3 12337 12341 12062
+3 12073 12063 12341
+3 12067 12063 12073
+3 12073 12068 12067
+3 12077 12064 12070
+3 12064 12077 12065
+3 12077 12078 12065
+3 12066 12078 12338
+3 12065 12078 12066
+3 12339 12071 12066
+3 12338 12339 12066
+3 12340 12072 12071
+3 12339 12340 12071
+3 12340 12333 12072
+3 12342 12073 12341
+3 12343 12068 12073
+3 12342 12343 12073
+3 12352 12069 12068
+3 12343 12352 12068
+3 12079 12069 12352
+3 12074 12069 12079
+3 12079 12075 12074
+3 12083 12070 12076
+3 12077 12083 12344
+3 12070 12083 12077
+3 12345 12078 12077
+3 12344 12345 12077
+3 12345 12338 12078
+3 12353 12079 12352
+3 12360 12075 12079
+3 12353 12360 12079
+3 12084 12075 12360
+3 12080 12075 12084
+3 12084 12085 12080
+3 12076 12082 12354
+3 12355 12083 12076
+3 12354 12355 12076
+3 12355 12344 12083
+3 12365 12084 12360
+3 12087 12084 12365
+3 12085 12084 12087
+3 12087 12088 12085
+3 12091 12081 12086
+3 12082 12091 12361
+3 12081 12091 12082
+3 12361 12354 12082
+3 12366 12087 12365
+3 12371 12088 12087
+3 12366 12371 12087
+3 12088 12371 12089
+3 12094 12086 12090
+3 12091 12094 12367
+3 12086 12094 12091
+3 12367 12361 12091
+3 12375 12089 12371
+3 12095 12089 12375
+3 12092 12089 12095
+3 12096 12090 12093
+3 12094 12096 12372
+3 12090 12096 12094
+3 12372 12367 12094
+3 12379 12095 12375
+3 12095 12379 12097
+3 12096 12099 12376
+3 12093 12099 12096
+3 12376 12372 12096
+3 12382 12100 12097
+3 12379 12382 12097
+3 12100 12101 12097
+3 12102 12099 12098
+3 12376 12099 12102
+3 12384 12376 12102
+3 12387 12100 12382
+3 12103 12100 12387
+3 12101 12100 12103
+3 12102 12105 12383
+3 12098 12105 12102
+3 12383 12384 12102
+3 12391 12103 12387
+3 12103 12391 12106
+3 12105 12104 12388
+3 12388 12383 12105
+3 12393 12107 12106
+3 12391 12393 12106
+3 12107 12108 12106
+3 12388 12104 12110
+3 12394 12388 12110
+3 12397 12107 12393
+3 12111 12107 12397
+3 12108 12107 12111
+3 12112 12110 12109
+3 12394 12110 12112
+3 12399 12394 12112
+3 12400 12113 12111
+3 12397 12400 12111
+3 12112 12114 12398
+3 12109 12114 12112
+3 12398 12399 12112
+3 12403 12113 12400
+3 12113 12403 12115
+3 12398 12114 12117
+3 12404 12398 12117
+3 12405 12118 12115
+3 12403 12405 12115
+3 12119 12117 12116
+3 12404 12117 12119
+3 12407 12404 12119
+3 12408 12120 12118
+3 12405 12408 12118
+3 12119 12121 12406
+3 12116 12121 12119
+3 12406 12407 12119
+3 12410 12122 12120
+3 12408 12410 12120
+3 12122 12123 12120
+3 12406 12121 12124
+3 12411 12406 12124
+3 12413 12122 12410
+3 12125 12122 12413
+3 12123 12122 12125
+3 12411 12124 12126
+3 12414 12411 12126
+3 12415 12127 12125
+3 12413 12415 12125
+3 12414 12126 12129
+3 12416 12414 12129
+3 12417 12130 12127
+3 12415 12417 12127
+3 12131 12129 12128
+3 12416 12129 12131
+3 12418 12416 12131
+3 12419 12132 12130
+3 12417 12419 12130
+3 12128 12133 12131
+3 12133 12134 12131
+3 12418 12131 12134
+3 12421 12418 12134
+3 12422 12135 12132
+3 12419 12422 12132
+3 12134 12136 12420
+3 12133 12136 12134
+3 12420 12421 12134
+3 12424 12137 12135
+3 12422 12424 12135
+3 12420 12136 12138
+3 12425 12420 12138
+3 12427 12139 12137
+3 12424 12427 12137
+3 12425 12138 12140
+3 12428 12425 12140
+3 12430 12141 12139
+3 12427 12430 12139
+3 12140 12143 12428
+3 12142 12143 12140
+3 12428 12143 12431
+3 12432 12144 12141
+3 12430 12432 12141
+3 12142 12145 12143
+3 12145 12146 12143
+3 12431 12143 12146
+3 12433 12431 12146
+3 12434 12147 12144
+3 12432 12434 12144
+3 12146 12145 12148
+3 12433 12146 12148
+3 12435 12433 12148
+3 12436 12149 12147
+3 12434 12436 12147
+3 12435 12148 12150
+3 12437 12435 12150
+3 12438 12151 12149
+3 12436 12438 12149
+3 12437 12150 12152
+3 12439 12437 12152
+3 12440 12153 12151
+3 12438 12440 12151
+3 12439 12152 12154
+3 12441 12439 12154
+3 12444 12155 12153
+3 12440 12444 12153
+3 12441 12154 12156
+3 12445 12441 12156
+3 12157 12444 12447
+3 12444 12157 12155
+3 12156 12159 12445
+3 12158 12159 12156
+3 12445 12159 12448
+3 12449 12160 12157
+3 12447 12449 12157
+3 12159 12158 12161
+3 12448 12159 12161
+3 12450 12448 12161
+3 12453 12162 12160
+3 12449 12453 12160
+3 12161 12164 12450
+3 12163 12164 12161
+3 12450 12164 12454
+3 12165 12453 12455
+3 12453 12165 12162
+3 12164 12163 12166
+3 12454 12164 12166
+3 12456 12454 12166
+3 12458 12167 12165
+3 12455 12458 12165
+3 12456 12166 12168
+3 12459 12456 12168
+3 12169 12458 12461
+3 12169 12167 12458
+3 12170 12167 12169
+3 12459 12168 12171
+3 12459 12171 12462
+3 12465 12172 12169
+3 12461 12465 12169
+3 12169 12172 12170
+3 12171 12174 12462
+3 12173 12174 12171
+3 12462 12174 12466
+3 12175 12465 12468
+3 12465 12175 12172
+3 12174 12173 12176
+3 12466 12174 12176
+3 12469 12466 12176
+3 12177 12468 12471
+3 12177 12175 12468
+3 12178 12175 12177
+3 12176 12180 12469
+3 12179 12180 12176
+3 12469 12180 12472
+3 12475 12181 12177
+3 12471 12475 12177
+3 12177 12181 12178
+3 12180 12179 12182
+3 12180 12183 12472
+3 12182 12183 12180
+3 12472 12183 12476
+3 12184 12475 12479
+3 12184 12181 12475
+3 12185 12181 12184
+3 12183 12182 12186
+3 12183 12187 12476
+3 12186 12187 12183
+3 12476 12187 12480
+3 12188 12479 12484
+3 12188 12184 12479
+3 12189 12184 12188
+3 12184 12189 12185
+3 12187 12186 12190
+3 12187 12191 12480
+3 12190 12191 12187
+3 12480 12191 12485
+3 12192 12484 12490
+3 12484 12192 12188
+3 12191 12190 12193
+3 12191 12194 12485
+3 12193 12194 12191
+3 12485 12194 12491
+3 12195 12489 12498
+3 12196 12490 12489
+3 12195 12196 12489
+3 12490 12196 12192
+3 12194 12193 12197
+3 12194 12198 12491
+3 12197 12198 12194
+3 12199 12492 12491
+3 12198 12199 12491
+3 12492 12199 12499
+3 12200 12497 12511
+3 12201 12498 12497
+3 12200 12201 12497
+3 12201 12195 12498
+3 12202 12195 12201
+3 12195 12202 12196
+3 12199 12198 12203
+3 12199 12204 12499
+3 12203 12204 12199
+3 12205 12500 12499
+3 12204 12205 12499
+3 12206 12501 12500
+3 12205 12206 12500
+3 12501 12206 12512
+3 12207 12510 12519
+3 12208 12511 12510
+3 12207 12208 12510
+3 12208 12200 12511
+3 12209 12200 12208
+3 12200 12209 12201
+3 12209 12210 12201
+3 12201 12210 12202
+3 12205 12204 12211
+3 12205 12211 12206
+3 12211 12212 12206
+3 12206 12213 12512
+3 12212 12213 12206
+3 12214 12513 12512
+3 12213 12214 12512
+3 12215 12514 12513
+3 12214 12215 12513
+3 12216 12515 12514
+3 12215 12216 12514
+3 12217 12516 12515
+3 12216 12217 12515
+3 12218 12517 12516
+3 12217 12218 12516
+3 12219 12518 12517
+3 12218 12219 12517
+3 12220 12519 12518
+3 12219 12220 12518
+3 12220 12207 12519
+3 12221 12207 12220
+3 12207 12221 12208
+3 12232 12222 12229
+3 12222 12232 12223
+3 12232 12233 12223
+3 12223 12233 12224
+3 12233 12234 12224
+3 12224 12234 12225
+3 12234 12235 12225
+3 12225 12235 12226
+3 12235 12236 12226
+3 12226 12236 12227
+3 12236 12237 12227
+3 12227 12237 12230
+3 12237 12238 12230
+3 12238 12239 12230
+3 12241 12228 12231
+3 12228 12241 12229
+3 12241 12242 12229
+3 12229 12242 12232
+3 12242 12243 12232
+3 12233 12243 12520
+3 12232 12243 12233
+3 12521 12234 12233
+3 12520 12521 12233
+3 12522 12235 12234
+3 12521 12522 12234
+3 12525 12236 12235
+3 12522 12525 12235
+3 12244 12236 12525
+3 12237 12236 12244
+3 12237 12244 12238
+3 12244 12245 12238
+3 12238 12245 12239
+3 12245 12246 12239
+3 12246 12247 12239
+3 12249 12231 12240
+3 12231 12249 12241
+3 12249 12250 12241
+3 12242 12250 12523
+3 12241 12250 12242
+3 12524 12243 12242
+3 12523 12524 12242
+3 12524 12520 12243
+3 12526 12244 12525
+3 12532 12245 12244
+3 12526 12532 12244
+3 12251 12245 12532
+3 12246 12245 12251
+3 12246 12251 12247
+3 12251 12252 12247
+3 12252 12253 12247
+3 12254 12240 12248
+3 12240 12254 12249
+3 12254 12255 12249
+3 12250 12255 12527
+3 12249 12255 12250
+3 12527 12523 12250
+3 12541 12251 12532
+3 12256 12251 12541
+3 12252 12251 12256
+3 12252 12256 12253
+3 12256 12257 12253
+3 12257 12258 12253
+3 12248 12259 12254
+3 12259 12260 12254
+3 12254 12260 12255
+3 12260 12261 12255
+3 12527 12255 12261
+3 12543 12527 12261
+3 12553 12256 12541
+3 12262 12256 12553
+3 12257 12256 12262
+3 12257 12262 12258
+3 12262 12263 12258
+3 12259 12264 12260
+3 12264 12265 12260
+3 12261 12265 12542
+3 12260 12265 12261
+3 12542 12543 12261
+3 12564 12266 12262
+3 12553 12564 12262
+3 12262 12266 12263
+3 12266 12267 12263
+3 12267 12268 12263
+3 12264 12270 12265
+3 12270 12271 12265
+3 12542 12265 12271
+3 12565 12542 12271
+3 12577 12266 12564
+3 12272 12266 12577
+3 12267 12266 12272
+3 12267 12272 12268
+3 12272 12273 12268
+3 12274 12270 12269
+3 12270 12274 12271
+3 12274 12275 12271
+3 12565 12271 12275
+3 12578 12565 12275
+3 12590 12276 12272
+3 12577 12590 12272
+3 12272 12276 12273
+3 12276 12277 12273
+3 12269 12278 12274
+3 12278 12279 12274
+3 12274 12279 12275
+3 12279 12280 12275
+3 12578 12275 12280
+3 12591 12578 12280
+3 12603 12281 12276
+3 12590 12603 12276
+3 12276 12281 12277
+3 12281 12282 12277
+3 12279 12278 12283
+3 12279 12283 12280
+3 12283 12284 12280
+3 12591 12280 12284
+3 12604 12591 12284
+3 12285 12603 12615
+3 12285 12281 12603
+3 12286 12281 12285
+3 12281 12286 12282
+3 12286 12287 12282
+3 12283 12288 12284
+3 12288 12289 12284
+3 12284 12290 12604
+3 12289 12290 12284
+3 12604 12290 12616
+3 12626 12291 12285
+3 12615 12626 12285
+3 12285 12291 12286
+3 12291 12292 12286
+3 12286 12292 12287
+3 12292 12293 12287
+3 12288 12294 12289
+3 12294 12295 12289
+3 12289 12295 12290
+3 12295 12296 12290
+3 12616 12290 12296
+3 12627 12616 12296
+3 12297 12626 12636
+3 12297 12291 12626
+3 12298 12291 12297
+3 12291 12298 12292
+3 12298 12299 12292
+3 12292 12299 12293
+3 12295 12294 12300
+3 12295 12300 12296
+3 12300 12301 12296
+3 12296 12302 12627
+3 12301 12302 12296
+3 12627 12302 12637
+3 12645 12303 12297
+3 12636 12645 12297
+3 12297 12303 12298
+3 12303 12304 12298
+3 12298 12304 12299
+3 12304 12305 12299
+3 12301 12300 12306
+3 12301 12306 12302
+3 12306 12307 12302
+3 12302 12308 12637
+3 12307 12308 12302
+3 12309 12638 12637
+3 12308 12309 12637
+3 12638 12309 12646
+3 12310 12644 12650
+3 12311 12645 12644
+3 12310 12311 12644
+3 12311 12303 12645
+3 12312 12303 12311
+3 12303 12312 12304
+3 12312 12313 12304
+3 12304 12313 12305
+3 12307 12306 12314
+3 12307 12314 12308
+3 12314 12315 12308
+3 12308 12315 12309
+3 12315 12316 12309
+3 12309 12317 12646
+3 12316 12317 12309
+3 12318 12647 12646
+3 12317 12318 12646
+3 12319 12648 12647
+3 12318 12319 12647
+3 12320 12649 12648
+3 12319 12320 12648
+3 12321 12650 12649
+3 12320 12321 12649
+3 12321 12310 12650
+3 12322 12310 12321
+3 12310 12322 12311
+3 12322 12323 12311
+3 12311 12323 12312
+3 12323 12324 12312
+3 12312 12324 12313
+3 12315 12314 12325
+3 12315 12325 12316
+3 12325 12326 12316
+3 12316 12326 12317
+3 12326 12327 12317
+3 12317 12327 12318
+3 12327 12328 12318
+3 12318 12328 12319
+3 12328 12329 12319
+3 12319 12329 12320
+3 12329 12330 12320
+3 12320 12330 12321
+3 12330 12331 12321
+3 12321 12331 12322
+3 12331 12332 12322
+3 12322 12332 12323
+3 12346 12333 12340
+3 12333 12346 12334
+3 12346 12347 12334
+3 12334 12347 12335
+3 12347 12348 12335
+3 12335 12348 12336
+3 12348 12349 12336
+3 12336 12349 12337
+3 12349 12350 12337
+3 12337 12350 12341
+3 12350 12351 12341
+3 12351 12342 12341
+3 12356 12338 12345
+3 12338 12356 12339
+3 12356 12357 12339
+3 12340 12357 12651
+3 12339 12357 12340
+3 12652 12346 12340
+3 12651 12652 12340
+3 12653 12347 12346
+3 12652 12653 12346
+3 12654 12348 12347
+3 12653 12654 12347
+3 12655 12349 12348
+3 12654 12655 12348
+3 12656 12350 12349
+3 12655 12656 12349
+3 12657 12351 12350
+3 12656 12657 12350
+3 12660 12342 12351
+3 12657 12660 12351
+3 12358 12342 12660
+3 12343 12342 12358
+3 12343 12358 12352
+3 12358 12359 12352
+3 12359 12353 12352
+3 12362 12344 12355
+3 12344 12362 12345
+3 12362 12363 12345
+3 12356 12363 12658
+3 12345 12363 12356
+3 12659 12357 12356
+3 12658 12659 12356
+3 12659 12651 12357
+3 12661 12358 12660
+3 12662 12359 12358
+3 12661 12662 12358
+3 12673 12353 12359
+3 12662 12673 12359
+3 12364 12353 12673
+3 12360 12353 12364
+3 12364 12365 12360
+3 12368 12354 12361
+3 12354 12368 12355
+3 12368 12369 12355
+3 12362 12369 12663
+3 12355 12369 12362
+3 12664 12363 12362
+3 12663 12664 12362
+3 12664 12658 12363
+3 12681 12364 12673
+3 12370 12364 12681
+3 12365 12364 12370
+3 12370 12366 12365
+3 12373 12361 12367
+3 12368 12373 12674
+3 12361 12373 12368
+3 12675 12369 12368
+3 12674 12675 12368
+3 12675 12663 12369
+3 12682 12370 12681
+3 12688 12366 12370
+3 12682 12688 12370
+3 12374 12366 12688
+3 12371 12366 12374
+3 12374 12375 12371
+3 12377 12367 12372
+3 12373 12377 12683
+3 12367 12377 12373
+3 12683 12674 12373
+3 12694 12374 12688
+3 12378 12374 12694
+3 12375 12374 12378
+3 12378 12379 12375
+3 12380 12372 12376
+3 12377 12380 12689
+3 12372 12380 12377
+3 12689 12683 12377
+3 12698 12381 12378
+3 12694 12698 12378
+3 12378 12381 12379
+3 12381 12382 12379
+3 12376 12384 12380
+3 12384 12385 12380
+3 12689 12380 12385
+3 12700 12689 12385
+3 12703 12381 12698
+3 12386 12381 12703
+3 12382 12381 12386
+3 12386 12387 12382
+3 12389 12384 12383
+3 12385 12389 12699
+3 12384 12389 12385
+3 12699 12700 12385
+3 12707 12386 12703
+3 12390 12386 12707
+3 12387 12386 12390
+3 12390 12391 12387
+3 12392 12383 12388
+3 12389 12392 12704
+3 12383 12392 12389
+3 12704 12699 12389
+3 12710 12390 12707
+3 12393 12390 12710
+3 12391 12390 12393
+3 12388 12394 12392
+3 12394 12395 12392
+3 12704 12392 12395
+3 12712 12704 12395
+3 12714 12396 12393
+3 12710 12714 12393
+3 12396 12397 12393
+3 12395 12399 12711
+3 12394 12399 12395
+3 12711 12712 12395
+3 12717 12396 12714
+3 12400 12396 12717
+3 12397 12396 12400
+3 12401 12399 12398
+3 12711 12399 12401
+3 12719 12711 12401
+3 12722 12402 12400
+3 12717 12722 12400
+3 12402 12403 12400
+3 12401 12404 12718
+3 12398 12404 12401
+3 12718 12719 12401
+3 12725 12402 12722
+3 12405 12402 12725
+3 12403 12402 12405
+3 12718 12404 12407
+3 12726 12718 12407
+3 12729 12408 12405
+3 12725 12729 12405
+3 12409 12407 12406
+3 12726 12407 12409
+3 12731 12726 12409
+3 12732 12410 12408
+3 12729 12732 12408
+3 12409 12411 12730
+3 12406 12411 12409
+3 12730 12731 12409
+3 12734 12412 12410
+3 12732 12734 12410
+3 12412 12413 12410
+3 12730 12411 12414
+3 12735 12730 12414
+3 12738 12412 12734
+3 12415 12412 12738
+3 12413 12412 12415
+3 12735 12414 12416
+3 12739 12735 12416
+3 12742 12417 12415
+3 12738 12742 12415
+3 12739 12416 12418
+3 12743 12739 12418
+3 12746 12419 12417
+3 12742 12746 12417
+3 12743 12418 12421
+3 12747 12743 12421
+3 12749 12422 12419
+3 12746 12749 12419
+3 12423 12421 12420
+3 12747 12421 12423
+3 12750 12747 12423
+3 12752 12424 12422
+3 12749 12752 12422
+3 12420 12425 12423
+3 12425 12426 12423
+3 12750 12423 12426
+3 12753 12750 12426
+3 12755 12427 12424
+3 12752 12755 12424
+3 12425 12428 12426
+3 12428 12429 12426
+3 12753 12426 12429
+3 12756 12753 12429
+3 12758 12430 12427
+3 12755 12758 12427
+3 12429 12428 12431
+3 12756 12429 12431
+3 12759 12756 12431
+3 12761 12432 12430
+3 12758 12761 12430
+3 12759 12431 12433
+3 12762 12759 12433
+3 12764 12434 12432
+3 12761 12764 12432
+3 12762 12433 12435
+3 12765 12762 12435
+3 12768 12436 12434
+3 12764 12768 12434
+3 12765 12435 12437
+3 12769 12765 12437
+3 12772 12438 12436
+3 12768 12772 12436
+3 12769 12437 12439
+3 12773 12769 12439
+3 12776 12440 12438
+3 12772 12776 12438
+3 12439 12442 12773
+3 12441 12442 12439
+3 12773 12442 12777
+3 12443 12776 12778
+3 12443 12440 12776
+3 12444 12440 12443
+3 12441 12445 12442
+3 12445 12446 12442
+3 12777 12442 12446
+3 12779 12777 12446
+3 12782 12447 12443
+3 12778 12782 12443
+3 12443 12447 12444
+3 12446 12445 12448
+3 12779 12446 12448
+3 12783 12779 12448
+3 12786 12449 12447
+3 12782 12786 12447
+3 12448 12451 12783
+3 12450 12451 12448
+3 12783 12451 12787
+3 12452 12786 12789
+3 12452 12449 12786
+3 12453 12449 12452
+3 12451 12450 12454
+3 12787 12451 12454
+3 12790 12787 12454
+3 12793 12455 12452
+3 12789 12793 12452
+3 12452 12455 12453
+3 12790 12454 12456
+3 12794 12790 12456
+3 12457 12793 12797
+3 12457 12455 12793
+3 12458 12455 12457
+3 12456 12460 12794
+3 12459 12460 12456
+3 12794 12460 12798
+3 12801 12461 12457
+3 12797 12801 12457
+3 12457 12461 12458
+3 12460 12459 12462
+3 12460 12463 12798
+3 12462 12463 12460
+3 12798 12463 12802
+3 12464 12801 12805
+3 12464 12461 12801
+3 12465 12461 12464
+3 12463 12462 12466
+3 12802 12463 12466
+3 12806 12802 12466
+3 12467 12805 12810
+3 12467 12464 12805
+3 12468 12464 12467
+3 12464 12468 12465
+3 12466 12470 12806
+3 12469 12470 12466
+3 12806 12470 12811
+3 12816 12471 12467
+3 12810 12816 12467
+3 12467 12471 12468
+3 12470 12469 12472
+3 12470 12473 12811
+3 12472 12473 12470
+3 12811 12473 12817
+3 12474 12816 12822
+3 12474 12471 12816
+3 12475 12471 12474
+3 12473 12472 12476
+3 12473 12477 12817
+3 12476 12477 12473
+3 12817 12477 12823
+3 12478 12822 12828
+3 12478 12474 12822
+3 12479 12474 12478
+3 12474 12479 12475
+3 12477 12476 12480
+3 12477 12481 12823
+3 12480 12481 12477
+3 12823 12481 12829
+3 12482 12827 12835
+3 12483 12828 12827
+3 12482 12483 12827
+3 12483 12478 12828
+3 12484 12478 12483
+3 12478 12484 12479
+3 12481 12480 12485
+3 12481 12486 12829
+3 12485 12486 12481
+3 12487 12830 12829
+3 12486 12487 12829
+3 12830 12487 12836
+3 12488 12835 12849
+3 12488 12482 12835
+3 12489 12482 12488
+3 12482 12489 12483
+3 12489 12490 12483
+3 12483 12490 12484
+3 12486 12485 12491
+3 12486 12491 12487
+3 12491 12492 12487
+3 12487 12493 12836
+3 12492 12493 12487
+3 12494 12837 12836
+3 12493 12494 12836
+3 12837 12494 12850
+3 12495 12847 12858
+3 12496 12848 12847
+3 12495 12496 12847
+3 12497 12849 12848
+3 12496 12497 12848
+3 12497 12488 12849
+3 12498 12488 12497
+3 12488 12498 12489
+3 12493 12492 12499
+3 12493 12499 12494
+3 12499 12500 12494
+3 12494 12501 12850
+3 12500 12501 12494
+3 12502 12851 12850
+3 12501 12502 12850
+3 12503 12852 12851
+3 12502 12503 12851
+3 12504 12853 12852
+3 12503 12504 12852
+3 12505 12854 12853
+3 12504 12505 12853
+3 12506 12855 12854
+3 12505 12506 12854
+3 12507 12856 12855
+3 12506 12507 12855
+3 12508 12857 12856
+3 12507 12508 12856
+3 12509 12858 12857
+3 12508 12509 12857
+3 12509 12495 12858
+3 12510 12495 12509
+3 12495 12510 12496
+3 12510 12511 12496
+3 12496 12511 12497
+3 12502 12501 12512
+3 12502 12512 12503
+3 12512 12513 12503
+3 12503 12513 12504
+3 12513 12514 12504
+3 12504 12514 12505
+3 12514 12515 12505
+3 12505 12515 12506
+3 12515 12516 12506
+3 12506 12516 12507
+3 12516 12517 12507
+3 12507 12517 12508
+3 12517 12518 12508
+3 12508 12518 12509
+3 12518 12519 12509
+3 12509 12519 12510
+3 12528 12520 12524
+3 12520 12528 12521
+3 12528 12529 12521
+3 12521 12529 12522
+3 12529 12530 12522
+3 12522 12530 12525
+3 12530 12531 12525
+3 12531 12526 12525
+3 12533 12523 12527
+3 12523 12533 12524
+3 12533 12534 12524
+3 12524 12534 12528
+3 12534 12535 12528
+3 12528 12535 12529
+3 12535 12536 12529
+3 12529 12536 12530
+3 12536 12537 12530
+3 12530 12537 12531
+3 12537 12538 12531
+3 12531 12538 12526
+3 12538 12539 12526
+3 12526 12539 12532
+3 12539 12540 12532
+3 12540 12541 12532
+3 12527 12543 12533
+3 12543 12544 12533
+3 12533 12544 12534
+3 12544 12545 12534
+3 12534 12545 12535
+3 12545 12546 12535
+3 12535 12546 12536
+3 12546 12547 12536
+3 12536 12547 12537
+3 12547 12548 12537
+3 12537 12548 12538
+3 12548 12549 12538
+3 12538 12549 12539
+3 12549 12550 12539
+3 12539 12550 12540
+3 12550 12551 12540
+3 12540 12551 12541
+3 12551 12552 12541
+3 12552 12553 12541
+3 12554 12543 12542
+3 12543 12554 12544
+3 12554 12555 12544
+3 12544 12555 12545
+3 12555 12556 12545
+3 12545 12556 12546
+3 12556 12557 12546
+3 12546 12557 12547
+3 12557 12558 12547
+3 12547 12558 12548
+3 12558 12559 12548
+3 12548 12559 12549
+3 12559 12560 12549
+3 12549 12560 12550
+3 12560 12561 12550
+3 12550 12561 12551
+3 12561 12562 12551
+3 12551 12562 12552
+3 12562 12563 12552
+3 12552 12563 12553
+3 12563 12564 12553
+3 12542 12565 12554
+3 12565 12566 12554
+3 12554 12566 12555
+3 12566 12567 12555
+3 12555 12567 12556
+3 12567 12568 12556
+3 12556 12568 12557
+3 12568 12569 12557
+3 12557 12569 12558
+3 12569 12570 12558
+3 12558 12570 12559
+3 12570 12571 12559
+3 12559 12571 12560
+3 12571 12572 12560
+3 12560 12572 12561
+3 12572 12573 12561
+3 12561 12573 12562
+3 12573 12574 12562
+3 12562 12574 12563
+3 12574 12575 12563
+3 12563 12575 12564
+3 12575 12576 12564
+3 12576 12577 12564
+3 12565 12578 12566
+3 12578 12579 12566
+3 12566 12579 12567
+3 12579 12580 12567
+3 12567 12580 12568
+3 12580 12581 12568
+3 12568 12581 12569
+3 12581 12582 12569
+3 12569 12582 12570
+3 12582 12583 12570
+3 12570 12583 12571
+3 12583 12584 12571
+3 12571 12584 12572
+3 12584 12585 12572
+3 12572 12585 12573
+3 12585 12586 12573
+3 12573 12586 12574
+3 12586 12587 12574
+3 12574 12587 12575
+3 12587 12588 12575
+3 12575 12588 12576
+3 12588 12589 12576
+3 12576 12589 12577
+3 12589 12590 12577
+3 12578 12591 12579
+3 12591 12592 12579
+3 12579 12592 12580
+3 12592 12593 12580
+3 12580 12593 12581
+3 12593 12594 12581
+3 12581 12594 12582
+3 12594 12595 12582
+3 12582 12595 12583
+3 12595 12596 12583
+3 12583 12596 12584
+3 12596 12597 12584
+3 12584 12597 12585
+3 12597 12598 12585
+3 12585 12598 12586
+3 12598 12599 12586
+3 12586 12599 12587
+3 12599 12600 12587
+3 12587 12600 12588
+3 12600 12601 12588
+3 12588 12601 12589
+3 12601 12602 12589
+3 12589 12602 12590
+3 12602 12603 12590
+3 12591 12604 12592
+3 12604 12605 12592
+3 12592 12605 12593
+3 12605 12606 12593
+3 12593 12606 12594
+3 12606 12607 12594
+3 12594 12607 12595
+3 12607 12608 12595
+3 12595 12608 12596
+3 12608 12609 12596
+3 12596 12609 12597
+3 12609 12610 12597
+3 12597 12610 12598
+3 12610 12611 12598
+3 12598 12611 12599
+3 12611 12612 12599
+3 12599 12612 12600
+3 12612 12613 12600
+3 12600 12613 12601
+3 12613 12614 12601
+3 12601 12614 12602
+3 12614 12615 12602
+3 12602 12615 12603
+3 12605 12604 12616
+3 12605 12616 12606
+3 12616 12617 12606
+3 12606 12617 12607
+3 12617 12618 12607
+3 12607 12618 12608
+3 12618 12619 12608
+3 12608 12619 12609
+3 12619 12620 12609
+3 12609 12620 12610
+3 12620 12621 12610
+3 12610 12621 12611
+3 12621 12622 12611
+3 12611 12622 12612
+3 12622 12623 12612
+3 12612 12623 12613
+3 12623 12624 12613
+3 12613 12624 12614
+3 12624 12625 12614
+3 12614 12625 12615
+3 12625 12626 12615
+3 12616 12627 12617
+3 12627 12628 12617
+3 12617 12628 12618
+3 12628 12629 12618
+3 12618 12629 12619
+3 12629 12630 12619
+3 12619 12630 12620
+3 12630 12631 12620
+3 12620 12631 12621
+3 12631 12632 12621
+3 12621 12632 12622
+3 12632 12633 12622
+3 12622 12633 12623
+3 12633 12634 12623
+3 12623 12634 12624
+3 12634 12635 12624
+3 12624 12635 12625
+3 12635 12636 12625
+3 12625 12636 12626
+3 12628 12627 12637
+3 12628 12637 12629
+3 12637 12638 12629
+3 12629 12638 12630
+3 12638 12639 12630
+3 12630 12639 12631
+3 12639 12640 12631
+3 12631 12640 12632
+3 12640 12641 12632
+3 12632 12641 12633
+3 12641 12642 12633
+3 12633 12642 12634
+3 12642 12643 12634
+3 12634 12643 12635
+3 12643 12644 12635
+3 12635 12644 12636
+3 12644 12645 12636
+3 12639 12638 12646
+3 12639 12646 12640
+3 12646 12647 12640
+3 12640 12647 12641
+3 12647 12648 12641
+3 12641 12648 12642
+3 12648 12649 12642
+3 12642 12649 12643
+3 12649 12650 12643
+3 12643 12650 12644
+3 12665 12651 12659
+3 12651 12665 12652
+3 12665 12666 12652
+3 12652 12666 12653
+3 12666 12667 12653
+3 12653 12667 12654
+3 12667 12668 12654
+3 12654 12668 12655
+3 12668 12669 12655
+3 12655 12669 12656
+3 12669 12670 12656
+3 12656 12670 12657
+3 12670 12671 12657
+3 12657 12671 12660
+3 12671 12672 12660
+3 12672 12661 12660
+3 12676 12658 12664
+3 12658 12676 12659
+3 12676 12677 12659
+3 12665 12677 12859
+3 12659 12677 12665
+3 12860 12666 12665
+3 12859 12860 12665
+3 12861 12667 12666
+3 12860 12861 12666
+3 12862 12668 12667
+3 12861 12862 12667
+3 12863 12669 12668
+3 12862 12863 12668
+3 12864 12670 12669
+3 12863 12864 12669
+3 12865 12671 12670
+3 12864 12865 12670
+3 12868 12672 12671
+3 12865 12868 12671
+3 12678 12672 12868
+3 12661 12672 12678
+3 12661 12678 12662
+3 12678 12679 12662
+3 12662 12679 12673
+3 12679 12680 12673
+3 12680 12681 12673
+3 12684 12663 12675
+3 12663 12684 12664
+3 12684 12685 12664
+3 12676 12685 12866
+3 12664 12685 12676
+3 12867 12677 12676
+3 12866 12867 12676
+3 12867 12859 12677
+3 12869 12678 12868
+3 12880 12679 12678
+3 12869 12880 12678
+3 12686 12679 12880
+3 12680 12679 12686
+3 12680 12686 12681
+3 12686 12687 12681
+3 12687 12682 12681
+3 12690 12674 12683
+3 12674 12690 12675
+3 12690 12691 12675
+3 12684 12691 12870
+3 12675 12691 12684
+3 12871 12685 12684
+3 12870 12871 12684
+3 12871 12866 12685
+3 12881 12686 12880
+3 12889 12687 12686
+3 12881 12889 12686
+3 12692 12687 12889
+3 12682 12687 12692
+3 12682 12692 12688
+3 12692 12693 12688
+3 12693 12694 12688
+3 12695 12683 12689
+3 12683 12695 12690
+3 12695 12696 12690
+3 12691 12696 12882
+3 12690 12696 12691
+3 12882 12870 12691
+3 12897 12692 12889
+3 12697 12692 12897
+3 12693 12692 12697
+3 12693 12697 12694
+3 12697 12698 12694
+3 12689 12700 12695
+3 12700 12701 12695
+3 12696 12701 12890
+3 12695 12701 12696
+3 12890 12882 12696
+3 12903 12697 12897
+3 12702 12697 12903
+3 12698 12697 12702
+3 12702 12703 12698
+3 12705 12700 12699
+3 12701 12705 12898
+3 12700 12705 12701
+3 12898 12890 12701
+3 12909 12702 12903
+3 12706 12702 12909
+3 12703 12702 12706
+3 12706 12707 12703
+3 12708 12699 12704
+3 12705 12708 12904
+3 12699 12708 12705
+3 12904 12898 12705
+3 12915 12706 12909
+3 12709 12706 12915
+3 12707 12706 12709
+3 12709 12710 12707
+3 12708 12712 12910
+3 12704 12712 12708
+3 12910 12904 12708
+3 12919 12713 12709
+3 12915 12919 12709
+3 12709 12713 12710
+3 12713 12714 12710
+3 12715 12712 12711
+3 12910 12712 12715
+3 12920 12910 12715
+3 12923 12713 12919
+3 12716 12713 12923
+3 12714 12713 12716
+3 12716 12717 12714
+3 12711 12719 12715
+3 12719 12720 12715
+3 12920 12715 12720
+3 12925 12920 12720
+3 12928 12721 12716
+3 12923 12928 12716
+3 12716 12721 12717
+3 12721 12722 12717
+3 12723 12719 12718
+3 12720 12723 12924
+3 12719 12723 12720
+3 12924 12925 12720
+3 12931 12721 12928
+3 12724 12721 12931
+3 12722 12721 12724
+3 12724 12725 12722
+3 12718 12726 12723
+3 12726 12727 12723
+3 12924 12723 12727
+3 12933 12924 12727
+3 12936 12728 12724
+3 12931 12936 12724
+3 12724 12728 12725
+3 12728 12729 12725
+3 12727 12731 12932
+3 12726 12731 12727
+3 12932 12933 12727
+3 12939 12728 12936
+3 12732 12728 12939
+3 12729 12728 12732
+3 12733 12731 12730
+3 12932 12731 12733
+3 12940 12932 12733
+3 12943 12734 12732
+3 12939 12943 12732
+3 12730 12735 12733
+3 12735 12736 12733
+3 12940 12733 12736
+3 12944 12940 12736
+3 12947 12737 12734
+3 12943 12947 12734
+3 12737 12738 12734
+3 12735 12739 12736
+3 12739 12740 12736
+3 12944 12736 12740
+3 12948 12944 12740
+3 12951 12741 12737
+3 12947 12951 12737
+3 12737 12741 12738
+3 12741 12742 12738
+3 12739 12743 12740
+3 12743 12744 12740
+3 12948 12740 12744
+3 12953 12948 12744
+3 12956 12745 12741
+3 12951 12956 12741
+3 12741 12745 12742
+3 12745 12746 12742
+3 12744 12747 12952
+3 12743 12747 12744
+3 12952 12953 12744
+3 12959 12748 12745
+3 12956 12959 12745
+3 12745 12748 12746
+3 12748 12749 12746
+3 12952 12747 12750
+3 12960 12952 12750
+3 12962 12751 12748
+3 12959 12962 12748
+3 12748 12751 12749
+3 12751 12752 12749
+3 12960 12750 12753
+3 12963 12960 12753
+3 12965 12754 12751
+3 12962 12965 12751
+3 12751 12754 12752
+3 12754 12755 12752
+3 12963 12753 12756
+3 12966 12963 12756
+3 12968 12757 12754
+3 12965 12968 12754
+3 12754 12757 12755
+3 12757 12758 12755
+3 12966 12756 12759
+3 12969 12966 12759
+3 12971 12760 12757
+3 12968 12971 12757
+3 12757 12760 12758
+3 12760 12761 12758
+3 12969 12759 12762
+3 12972 12969 12762
+3 12976 12763 12760
+3 12971 12976 12760
+3 12760 12763 12761
+3 12763 12764 12761
+3 12762 12766 12972
+3 12765 12766 12762
+3 12972 12766 12977
+3 12980 12767 12763
+3 12976 12980 12763
+3 12763 12767 12764
+3 12767 12768 12764
+3 12765 12769 12766
+3 12769 12770 12766
+3 12977 12766 12770
+3 12981 12977 12770
+3 12984 12771 12767
+3 12980 12984 12767
+3 12767 12771 12768
+3 12771 12772 12768
+3 12769 12773 12770
+3 12773 12774 12770
+3 12981 12770 12774
+3 12985 12981 12774
+3 12988 12775 12771
+3 12984 12988 12771
+3 12771 12775 12772
+3 12775 12776 12772
+3 12774 12773 12777
+3 12985 12774 12777
+3 12989 12985 12777
+3 12992 12778 12775
+3 12988 12992 12775
+3 12775 12778 12776
+3 12777 12780 12989
+3 12779 12780 12777
+3 12989 12780 12993
+3 12781 12992 12996
+3 12781 12778 12992
+3 12782 12778 12781
+3 12779 12783 12780
+3 12783 12784 12780
+3 12993 12780 12784
+3 12997 12993 12784
+3 13000 12785 12781
+3 12996 13000 12781
+3 12781 12785 12782
+3 12785 12786 12782
+3 12784 12783 12787
+3 12997 12784 12787
+3 13001 12997 12787
+3 12788 13000 13005
+3 12788 12785 13000
+3 12789 12785 12788
+3 12785 12789 12786
+3 12787 12791 13001
+3 12790 12791 12787
+3 13001 12791 13006
+3 13009 12792 12788
+3 13005 13009 12788
+3 12788 12792 12789
+3 12792 12793 12789
+3 12790 12794 12791
+3 12794 12795 12791
+3 13006 12791 12795
+3 13010 13006 12795
+3 12796 13009 13014
+3 12796 12792 13009
+3 12797 12792 12796
+3 12792 12797 12793
+3 12795 12794 12798
+3 12795 12799 13010
+3 12798 12799 12795
+3 13010 12799 13015
+3 13020 12800 12796
+3 13014 13020 12796
+3 12796 12800 12797
+3 12800 12801 12797
+3 12799 12798 12802
+3 12799 12803 13015
+3 12802 12803 12799
+3 13015 12803 13021
+3 12804 13020 13026
+3 12804 12800 13020
+3 12805 12800 12804
+3 12800 12805 12801
+3 12802 12806 12803
+3 12806 12807 12803
+3 12803 12808 13021
+3 12807 12808 12803
+3 13021 12808 13027
+3 12809 13026 13032
+3 12809 12804 13026
+3 12810 12804 12809
+3 12804 12810 12805
+3 12807 12806 12811
+3 12807 12811 12808
+3 12811 12812 12808
+3 12808 12813 13027
+3 12812 12813 12808
+3 13027 12813 13033
+3 12814 13032 13039
+3 12814 12809 13032
+3 12815 12809 12814
+3 12809 12815 12810
+3 12815 12816 12810
+3 12812 12811 12817
+3 12812 12817 12813
+3 12817 12818 12813
+3 12813 12819 13033
+3 12818 12819 12813
+3 13033 12819 13040
+3 12820 13039 13048
+3 12820 12814 13039
+3 12821 12814 12820
+3 12814 12821 12815
+3 12821 12822 12815
+3 12815 12822 12816
+3 12818 12817 12823
+3 12818 12823 12819
+3 12823 12824 12819
+3 12819 12825 13040
+3 12824 12825 12819
+3 13040 12825 13049
+3 12826 13048 13062
+3 12826 12820 13048
+3 12827 12820 12826
+3 12820 12827 12821
+3 12827 12828 12821
+3 12821 12828 12822
+3 12824 12823 12829
+3 12824 12829 12825
+3 12829 12830 12825
+3 12825 12831 13049
+3 12830 12831 12825
+3 12832 13050 13049
+3 12831 12832 13049
+3 13050 12832 13063
+3 12833 13061 13072
+3 12834 13062 13061
+3 12833 12834 13061
+3 12834 12826 13062
+3 12835 12826 12834
+3 12826 12835 12827
+3 12831 12830 12836
+3 12831 12836 12832
+3 12836 12837 12832
+3 12832 12838 13063
+3 12837 12838 12832
+3 12839 13064 13063
+3 12838 12839 13063
+3 12840 13065 13064
+3 12839 12840 13064
+3 12841 13066 13065
+3 12840 12841 13065
+3 12842 13067 13066
+3 12841 12842 13066
+3 12843 13068 13067
+3 12842 12843 13067
+3 12844 13069 13068
+3 12843 12844 13068
+3 12845 13070 13069
+3 12844 12845 13069
+3 12846 13071 13070
+3 12845 12846 13070
+3 12847 13072 13071
+3 12846 12847 13071
+3 12847 12833 13072
+3 12848 12833 12847
+3 12833 12848 12834
+3 12848 12849 12834
+3 12834 12849 12835
+3 12838 12837 12850
+3 12838 12850 12839
+3 12850 12851 12839
+3 12839 12851 12840
+3 12851 12852 12840
+3 12840 12852 12841
+3 12852 12853 12841
+3 12841 12853 12842
+3 12853 12854 12842
+3 12842 12854 12843
+3 12854 12855 12843
+3 12843 12855 12844
+3 12855 12856 12844
+3 12844 12856 12845
+3 12856 12857 12845
+3 12845 12857 12846
+3 12857 12858 12846
+3 12846 12858 12847
+3 12872 12859 12867
+3 12859 12872 12860
+3 12872 12873 12860
+3 12860 12873 12861
+3 12873 12874 12861
+3 12861 12874 12862
+3 12874 12875 12862
+3 12862 12875 12863
+3 12875 12876 12863
+3 12863 12876 12864
+3 12876 12877 12864
+3 12864 12877 12865
+3 12877 12878 12865
+3 12865 12878 12868
+3 12878 12879 12868
+3 12879 12869 12868
+3 12883 12866 12871
+3 12866 12883 12867
+3 12883 12884 12867
+3 12867 12884 12872
+3 12884 12885 12872
+3 12873 12885 13073
+3 12872 12885 12873
+3 13074 12874 12873
+3 13073 13074 12873
+3 13075 12875 12874
+3 13074 13075 12874
+3 13076 12876 12875
+3 13075 13076 12875
+3 13077 12877 12876
+3 13076 13077 12876
+3 13080 12878 12877
+3 13077 13080 12877
+3 12886 12878 13080
+3 12879 12878 12886
+3 12879 12886 12869
+3 12886 12887 12869
+3 12869 12887 12880
+3 12887 12888 12880
+3 12888 12881 12880
+3 12891 12870 12882
+3 12870 12891 12871
+3 12891 12892 12871
+3 12871 12892 12883
+3 12892 12893 12883
+3 12884 12893 13078
+3 12883 12893 12884
+3 13079 12885 12884
+3 13078 13079 12884
+3 13079 13073 12885
+3 13081 12886 13080
+3 13090 12887 12886
+3 13081 13090 12886
+3 12894 12887 13090
+3 12888 12887 12894
+3 12888 12894 12881
+3 12894 12895 12881
+3 12881 12895 12889
+3 12895 12896 12889
+3 12896 12897 12889
+3 12899 12882 12890
+3 12882 12899 12891
+3 12899 12900 12891
+3 12892 12900 13082
+3 12891 12900 12892
+3 13083 12893 12892
+3 13082 13083 12892
+3 13083 13078 12893
+3 13091 12894 13090
+3 13103 12895 12894
+3 13091 13103 12894
+3 12901 12895 13103
+3 12896 12895 12901
+3 12896 12901 12897
+3 12901 12902 12897
+3 12902 12903 12897
+3 12905 12890 12898
+3 12890 12905 12899
+3 12905 12906 12899
+3 12900 12906 13092
+3 12899 12906 12900
+3 13092 13082 12900
+3 13115 12901 13103
+3 12907 12901 13115
+3 12902 12901 12907
+3 12902 12907 12903
+3 12907 12908 12903
+3 12908 12909 12903
+3 12911 12898 12904
+3 12898 12911 12905
+3 12911 12912 12905
+3 12906 12912 13104
+3 12905 12912 12906
+3 13104 13092 12906
+3 13123 12907 13115
+3 12913 12907 13123
+3 12908 12907 12913
+3 12908 12913 12909
+3 12913 12914 12909
+3 12914 12915 12909
+3 12916 12904 12910
+3 12904 12916 12911
+3 12916 12917 12911
+3 12912 12917 13116
+3 12911 12917 12912
+3 13116 13104 12912
+3 13131 12913 13123
+3 12918 12913 13131
+3 12914 12913 12918
+3 12914 12918 12915
+3 12918 12919 12915
+3 12910 12920 12916
+3 12920 12921 12916
+3 12917 12921 13124
+3 12916 12921 12917
+3 13124 13116 12917
+3 13138 12918 13131
+3 12922 12918 13138
+3 12919 12918 12922
+3 12922 12923 12919
+3 12920 12925 12921
+3 12925 12926 12921
+3 13124 12921 12926
+3 13140 13124 12926
+3 13145 12927 12922
+3 13138 13145 12922
+3 12922 12927 12923
+3 12927 12928 12923
+3 12929 12925 12924
+3 12926 12929 13139
+3 12925 12929 12926
+3 13139 13140 12926
+3 13150 12927 13145
+3 12930 12927 13150
+3 12928 12927 12930
+3 12930 12931 12928
+3 12924 12933 12929
+3 12933 12934 12929
+3 13139 12929 12934
+3 13152 13139 12934
+3 13157 12935 12930
+3 13150 13157 12930
+3 12930 12935 12931
+3 12935 12936 12931
+3 12937 12933 12932
+3 12934 12937 13151
+3 12933 12937 12934
+3 13151 13152 12934
+3 13162 12935 13157
+3 12938 12935 13162
+3 12936 12935 12938
+3 12938 12939 12936
+3 12932 12940 12937
+3 12940 12941 12937
+3 13151 12937 12941
+3 13163 13151 12941
+3 13168 12942 12938
+3 13162 13168 12938
+3 12938 12942 12939
+3 12942 12943 12939
+3 12940 12944 12941
+3 12944 12945 12941
+3 13163 12941 12945
+3 13169 13163 12945
+3 13172 12946 12942
+3 13168 13172 12942
+3 12942 12946 12943
+3 12946 12947 12943
+3 12944 12948 12945
+3 12948 12949 12945
+3 13169 12945 12949
+3 13173 13169 12949
+3 13176 12950 12946
+3 13172 13176 12946
+3 12946 12950 12947
+3 12950 12951 12947
+3 12948 12953 12949
+3 12953 12954 12949
+3 13173 12949 12954
+3 13177 13173 12954
+3 13180 12955 12950
+3 13176 13180 12950
+3 12950 12955 12951
+3 12955 12956 12951
+3 12957 12953 12952
+3 12953 12957 12954
+3 12957 12958 12954
+3 13177 12954 12958
+3 13182 13177 12958
+3 13186 12955 13180
+3 12959 12955 13186
+3 12956 12955 12959
+3 12952 12960 12957
+3 12960 12961 12957
+3 12958 12961 13181
+3 12957 12961 12958
+3 13181 13182 12958
+3 13190 12962 12959
+3 13186 13190 12959
+3 12960 12963 12961
+3 12963 12964 12961
+3 13181 12961 12964
+3 13191 13181 12964
+3 13195 12965 12962
+3 13190 13195 12962
+3 12963 12966 12964
+3 12966 12967 12964
+3 13191 12964 12967
+3 13196 13191 12967
+3 13200 12968 12965
+3 13195 13200 12965
+3 12966 12969 12967
+3 12969 12970 12967
+3 13196 12967 12970
+3 13201 13196 12970
+3 13206 12971 12968
+3 13200 13206 12968
+3 12969 12972 12970
+3 12972 12973 12970
+3 12970 12974 13201
+3 12973 12974 12970
+3 13201 12974 13207
+3 12975 13206 13210
+3 12975 12971 13206
+3 12976 12971 12975
+3 12973 12972 12977
+3 12973 12977 12974
+3 12977 12978 12974
+3 13207 12974 12978
+3 13211 13207 12978
+3 13214 12979 12975
+3 13210 13214 12975
+3 12975 12979 12976
+3 12979 12980 12976
+3 12977 12981 12978
+3 12981 12982 12978
+3 13211 12978 12982
+3 13215 13211 12982
+3 13218 12983 12979
+3 13214 13218 12979
+3 12979 12983 12980
+3 12983 12984 12980
+3 12981 12985 12982
+3 12985 12986 12982
+3 13215 12982 12986
+3 13219 13215 12986
+3 13223 12987 12983
+3 13218 13223 12983
+3 12983 12987 12984
+3 12987 12988 12984
+3 12985 12989 12986
+3 12989 12990 12986
+3 13219 12986 12990
+3 13224 13219 12990
+3 13229 12991 12987
+3 13223 13229 12987
+3 12987 12991 12988
+3 12991 12992 12988
+3 12990 12989 12993
+3 12990 12994 13224
+3 12993 12994 12990
+3 13224 12994 13230
+3 12995 13229 13233
+3 12995 12991 13229
+3 12996 12991 12995
+3 12991 12996 12992
+3 12993 12997 12994
+3 12997 12998 12994
+3 13230 12994 12998
+3 13234 13230 12998
+3 13239 12999 12995
+3 13233 13239 12995
+3 12995 12999 12996
+3 12999 13000 12996
+3 12997 13001 12998
+3 13001 13002 12998
+3 12998 13003 13234
+3 13002 13003 12998
+3 13234 13003 13240
+3 13004 13239 13245
+3 13004 12999 13239
+3 13005 12999 13004
+3 12999 13005 13000
+3 13002 13001 13006
+3 13002 13006 13003
+3 13006 13007 13003
+3 13240 13003 13007
+3 13246 13240 13007
+3 13252 13008 13004
+3 13245 13252 13004
+3 13004 13008 13005
+3 13008 13009 13005
+3 13006 13010 13007
+3 13010 13011 13007
+3 13007 13012 13246
+3 13011 13012 13007
+3 13246 13012 13253
+3 13013 13252 13259
+3 13013 13008 13252
+3 13014 13008 13013
+3 13008 13014 13009
+3 13011 13010 13015
+3 13011 13015 13012
+3 13015 13016 13012
+3 13012 13017 13253
+3 13016 13017 13012
+3 13253 13017 13260
+3 13018 13259 13267
+3 13018 13013 13259
+3 13019 13013 13018
+3 13013 13019 13014
+3 13019 13020 13014
+3 13016 13015 13021
+3 13016 13021 13017
+3 13021 13022 13017
+3 13017 13023 13260
+3 13022 13023 13017
+3 13260 13023 13268
+3 13024 13267 13277
+3 13024 13018 13267
+3 13025 13018 13024
+3 13018 13025 13019
+3 13025 13026 13019
+3 13019 13026 13020
+3 13022 13021 13027
+3 13022 13027 13023
+3 13027 13028 13023
+3 13023 13029 13268
+3 13028 13029 13023
+3 13268 13029 13278
+3 13030 13277 13291
+3 13030 13024 13277
+3 13031 13024 13030
+3 13024 13031 13025
+3 13031 13032 13025
+3 13025 13032 13026
+3 13028 13027 13033
+3 13028 13033 13029
+3 13033 13034 13029
+3 13029 13035 13278
+3 13034 13035 13029
+3 13278 13035 13292
+3 13036 13290 13302
+3 13037 13291 13290
+3 13036 13037 13290
+3 13037 13030 13291
+3 13038 13030 13037
+3 13030 13038 13031
+3 13038 13039 13031
+3 13031 13039 13032
+3 13034 13033 13040
+3 13034 13040 13035
+3 13040 13041 13035
+3 13035 13042 13292
+3 13041 13042 13035
+3 13043 13293 13292
+3 13042 13043 13292
+3 13044 13294 13293
+3 13043 13044 13293
+3 13294 13044 13303
+3 13045 13302 13309
+3 13045 13036 13302
+3 13046 13036 13045
+3 13036 13046 13037
+3 13046 13047 13037
+3 13037 13047 13038
+3 13047 13048 13038
+3 13038 13048 13039
+3 13041 13040 13049
+3 13041 13049 13042
+3 13049 13050 13042
+3 13042 13050 13043
+3 13050 13051 13043
+3 13043 13051 13044
+3 13051 13052 13044
+3 13044 13053 13303
+3 13052 13053 13044
+3 13054 13304 13303
+3 13053 13054 13303
+3 13055 13305 13304
+3 13054 13055 13304
+3 13056 13306 13305
+3 13055 13056 13305
+3 13057 13307 13306
+3 13056 13057 13306
+3 13058 13308 13307
+3 13057 13058 13307
+3 13059 13309 13308
+3 13058 13059 13308
+3 13059 13045 13309
+3 13060 13045 13059
+3 13045 13060 13046
+3 13060 13061 13046
+3 13046 13061 13047
+3 13061 13062 13047
+3 13047 13062 13048
+3 13051 13050 13063
+3 13051 13063 13052
+3 13063 13064 13052
+3 13052 13064 13053
+3 13064 13065 13053
+3 13053 13065 13054
+3 13065 13066 13054
+3 13054 13066 13055
+3 13066 13067 13055
+3 13055 13067 13056
+3 13067 13068 13056
+3 13056 13068 13057
+3 13068 13069 13057
+3 13057 13069 13058
+3 13069 13070 13058
+3 13058 13070 13059
+3 13070 13071 13059
+3 13059 13071 13060
+3 13071 13072 13060
+3 13060 13072 13061
+3 13084 13073 13079
+3 13073 13084 13074
+3 13084 13085 13074
+3 13074 13085 13075
+3 13085 13086 13075
+3 13075 13086 13076
+3 13086 13087 13076
+3 13076 13087 13077
+3 13087 13088 13077
+3 13077 13088 13080
+3 13088 13089 13080
+3 13089 13081 13080
+3 13093 13078 13083
+3 13078 13093 13079
+3 13093 13094 13079
+3 13079 13094 13084
+3 13094 13095 13084
+3 13084 13095 13085
+3 13095 13096 13085
+3 13085 13096 13086
+3 13096 13097 13086
+3 13086 13097 13087
+3 13097 13098 13087
+3 13087 13098 13088
+3 13098 13099 13088
+3 13088 13099 13089
+3 13099 13100 13089
+3 13089 13100 13081
+3 13100 13101 13081
+3 13081 13101 13090
+3 13101 13102 13090
+3 13102 13091 13090
+3 13105 13082 13092
+3 13082 13105 13083
+3 13105 13106 13083
+3 13083 13106 13093
+3 13106 13107 13093
+3 13093 13107 13094
+3 13107 13108 13094
+3 13094 13108 13095
+3 13108 13109 13095
+3 13096 13109 13310
+3 13095 13109 13096
+3 13311 13097 13096
+3 13310 13311 13096
+3 13312 13098 13097
+3 13311 13312 13097
+3 13316 13099 13098
+3 13312 13316 13098
+3 13110 13099 13316
+3 13100 13099 13110
+3 13100 13110 13101
+3 13110 13111 13101
+3 13101 13111 13102
+3 13111 13112 13102
+3 13102 13112 13091
+3 13112 13113 13091
+3 13091 13113 13103
+3 13113 13114 13103
+3 13114 13115 13103
+3 13117 13092 13104
+3 13092 13117 13105
+3 13117 13118 13105
+3 13105 13118 13106
+3 13118 13119 13106
+3 13107 13119 13313
+3 13106 13119 13107
+3 13314 13108 13107
+3 13313 13314 13107
+3 13315 13109 13108
+3 13314 13315 13108
+3 13315 13310 13109
+3 13317 13110 13316
+3 13318 13111 13110
+3 13317 13318 13110
+3 13324 13112 13111
+3 13318 13324 13111
+3 13120 13112 13324
+3 13113 13112 13120
+3 13113 13120 13114
+3 13120 13121 13114
+3 13114 13121 13115
+3 13121 13122 13115
+3 13122 13123 13115
+3 13125 13104 13116
+3 13104 13125 13117
+3 13125 13126 13117
+3 13117 13126 13118
+3 13126 13127 13118
+3 13119 13127 13319
+3 13118 13127 13119
+3 13319 13313 13119
+3 13336 13120 13324
+3 13128 13120 13336
+3 13121 13120 13128
+3 13121 13128 13122
+3 13128 13129 13122
+3 13122 13129 13123
+3 13129 13130 13123
+3 13130 13131 13123
+3 13132 13116 13124
+3 13116 13132 13125
+3 13132 13133 13125
+3 13125 13133 13126
+3 13133 13134 13126
+3 13127 13134 13325
+3 13126 13134 13127
+3 13325 13319 13127
+3 13350 13128 13336
+3 13135 13128 13350
+3 13129 13128 13135
+3 13129 13135 13130
+3 13135 13136 13130
+3 13130 13136 13131
+3 13136 13137 13131
+3 13137 13138 13131
+3 13124 13140 13132
+3 13140 13141 13132
+3 13132 13141 13133
+3 13141 13142 13133
+3 13134 13142 13337
+3 13133 13142 13134
+3 13337 13325 13134
+3 13366 13135 13350
+3 13143 13135 13366
+3 13136 13135 13143
+3 13136 13143 13137
+3 13143 13144 13137
+3 13137 13144 13138
+3 13144 13145 13138
+3 13146 13140 13139
+3 13140 13146 13141
+3 13146 13147 13141
+3 13142 13147 13351
+3 13141 13147 13142
+3 13351 13337 13142
+3 13375 13143 13366
+3 13148 13143 13375
+3 13144 13143 13148
+3 13144 13148 13145
+3 13148 13149 13145
+3 13149 13150 13145
+3 13139 13152 13146
+3 13152 13153 13146
+3 13146 13153 13147
+3 13153 13154 13147
+3 13351 13147 13154
+3 13377 13351 13154
+3 13384 13155 13148
+3 13375 13384 13148
+3 13148 13155 13149
+3 13155 13156 13149
+3 13149 13156 13150
+3 13156 13157 13150
+3 13158 13152 13151
+3 13152 13158 13153
+3 13158 13159 13153
+3 13154 13159 13376
+3 13153 13159 13154
+3 13376 13377 13154
+3 13391 13155 13384
+3 13160 13155 13391
+3 13156 13155 13160
+3 13156 13160 13157
+3 13160 13161 13157
+3 13161 13162 13157
+3 13151 13163 13158
+3 13163 13164 13158
+3 13158 13164 13159
+3 13164 13165 13159
+3 13376 13159 13165
+3 13393 13376 13165
+3 13398 13166 13160
+3 13391 13398 13160
+3 13160 13166 13161
+3 13166 13167 13161
+3 13161 13167 13162
+3 13167 13168 13162
+3 13163 13169 13164
+3 13169 13170 13164
+3 13165 13170 13392
+3 13164 13170 13165
+3 13392 13393 13165
+3 13405 13166 13398
+3 13171 13166 13405
+3 13167 13166 13171
+3 13167 13171 13168
+3 13171 13172 13168
+3 13169 13173 13170
+3 13173 13174 13170
+3 13392 13170 13174
+3 13406 13392 13174
+3 13412 13175 13171
+3 13405 13412 13171
+3 13171 13175 13172
+3 13175 13176 13172
+3 13173 13177 13174
+3 13177 13178 13174
+3 13406 13174 13178
+3 13413 13406 13178
+3 13418 13179 13175
+3 13412 13418 13175
+3 13175 13179 13176
+3 13179 13180 13176
+3 13177 13182 13178
+3 13182 13183 13178
+3 13413 13178 13183
+3 13420 13413 13183
+3 13425 13184 13179
+3 13418 13425 13179
+3 13179 13184 13180
+3 13184 13185 13180
+3 13185 13186 13180
+3 13187 13182 13181
+3 13183 13187 13419
+3 13182 13187 13183
+3 13419 13420 13183
+3 13431 13188 13184
+3 13425 13431 13184
+3 13184 13188 13185
+3 13188 13189 13185
+3 13185 13189 13186
+3 13189 13190 13186
+3 13181 13191 13187
+3 13191 13192 13187
+3 13419 13187 13192
+3 13432 13419 13192
+3 13438 13193 13188
+3 13431 13438 13188
+3 13188 13193 13189
+3 13193 13194 13189
+3 13189 13194 13190
+3 13194 13195 13190
+3 13191 13196 13192
+3 13196 13197 13192
+3 13432 13192 13197
+3 13439 13432 13197
+3 13445 13198 13193
+3 13438 13445 13193
+3 13193 13198 13194
+3 13198 13199 13194
+3 13194 13199 13195
+3 13199 13200 13195
+3 13196 13201 13197
+3 13201 13202 13197
+3 13197 13203 13439
+3 13202 13203 13197
+3 13439 13203 13446
+3 13451 13204 13198
+3 13445 13451 13198
+3 13198 13204 13199
+3 13204 13205 13199
+3 13199 13205 13200
+3 13205 13206 13200
+3 13202 13201 13207
+3 13202 13207 13203
+3 13207 13208 13203
+3 13446 13203 13208
+3 13452 13446 13208
+3 13457 13209 13204
+3 13451 13457 13204
+3 13204 13209 13205
+3 13209 13210 13205
+3 13205 13210 13206
+3 13207 13211 13208
+3 13211 13212 13208
+3 13452 13208 13212
+3 13458 13452 13212
+3 13464 13213 13209
+3 13457 13464 13209
+3 13209 13213 13210
+3 13213 13214 13210
+3 13211 13215 13212
+3 13215 13216 13212
+3 13458 13212 13216
+3 13465 13458 13216
+3 13472 13217 13213
+3 13464 13472 13213
+3 13213 13217 13214
+3 13217 13218 13214
+3 13215 13219 13216
+3 13219 13220 13216
+3 13465 13216 13220
+3 13473 13465 13220
+3 13221 13472 13479
+3 13221 13217 13472
+3 13222 13217 13221
+3 13217 13222 13218
+3 13222 13223 13218
+3 13219 13224 13220
+3 13224 13225 13220
+3 13220 13226 13473
+3 13225 13226 13220
+3 13473 13226 13480
+3 13487 13227 13221
+3 13479 13487 13221
+3 13221 13227 13222
+3 13227 13228 13222
+3 13222 13228 13223
+3 13228 13229 13223
+3 13225 13224 13230
+3 13225 13230 13226
+3 13230 13231 13226
+3 13480 13226 13231
+3 13488 13480 13231
+3 13497 13232 13227
+3 13487 13497 13227
+3 13227 13232 13228
+3 13232 13233 13228
+3 13228 13233 13229
+3 13230 13234 13231
+3 13234 13235 13231
+3 13231 13236 13488
+3 13235 13236 13231
+3 13488 13236 13498
+3 13237 13497 13507
+3 13237 13232 13497
+3 13238 13232 13237
+3 13232 13238 13233
+3 13238 13239 13233
+3 13235 13234 13240
+3 13235 13240 13236
+3 13240 13241 13236
+3 13236 13242 13498
+3 13241 13242 13236
+3 13498 13242 13508
+3 13243 13507 13522
+3 13243 13237 13507
+3 13244 13237 13243
+3 13237 13244 13238
+3 13244 13245 13238
+3 13238 13245 13239
+3 13240 13246 13241
+3 13246 13247 13241
+3 13241 13247 13242
+3 13247 13248 13242
+3 13242 13249 13508
+3 13248 13249 13242
+3 13508 13249 13523
+3 13537 13250 13243
+3 13522 13537 13243
+3 13243 13250 13244
+3 13250 13251 13244
+3 13244 13251 13245
+3 13251 13252 13245
+3 13247 13246 13253
+3 13247 13253 13248
+3 13253 13254 13248
+3 13248 13254 13249
+3 13254 13255 13249
+3 13249 13256 13523
+3 13255 13256 13249
+3 13523 13256 13538
+3 13257 13537 13550
+3 13257 13250 13537
+3 13258 13250 13257
+3 13250 13258 13251
+3 13258 13259 13251
+3 13251 13259 13252
+3 13254 13253 13260
+3 13254 13260 13255
+3 13260 13261 13255
+3 13255 13261 13256
+3 13261 13262 13256
+3 13256 13263 13538
+3 13262 13263 13256
+3 13538 13263 13551
+3 13264 13549 13560
+3 13265 13550 13549
+3 13264 13265 13549
+3 13265 13257 13550
+3 13266 13257 13265
+3 13257 13266 13258
+3 13266 13267 13258
+3 13258 13267 13259
+3 13261 13260 13268
+3 13261 13268 13262
+3 13268 13269 13262
+3 13262 13269 13263
+3 13269 13270 13263
+3 13263 13271 13551
+3 13270 13271 13263
+3 13272 13552 13551
+3 13271 13272 13551
+3 13552 13272 13561
+3 13273 13559 13566
+3 13274 13560 13559
+3 13273 13274 13559
+3 13274 13264 13560
+3 13275 13264 13274
+3 13264 13275 13265
+3 13275 13276 13265
+3 13265 13276 13266
+3 13276 13277 13266
+3 13266 13277 13267
+3 13269 13268 13278
+3 13269 13278 13270
+3 13278 13279 13270
+3 13270 13279 13271
+3 13279 13280 13271
+3 13271 13280 13272
+3 13280 13281 13272
+3 13272 13282 13561
+3 13281 13282 13272
+3 13283 13562 13561
+3 13282 13283 13561
+3 13284 13563 13562
+3 13283 13284 13562
+3 13285 13564 13563
+3 13284 13285 13563
+3 13286 13565 13564
+3 13285 13286 13564
+3 13287 13566 13565
+3 13286 13287 13565
+3 13287 13273 13566
+3 13288 13273 13287
+3 13273 13288 13274
+3 13288 13289 13274
+3 13274 13289 13275
+3 13289 13290 13275
+3 13275 13290 13276
+3 13290 13291 13276
+3 13276 13291 13277
+3 13279 13278 13292
+3 13279 13292 13280
+3 13292 13293 13280
+3 13280 13293 13281
+3 13293 13294 13281
+3 13281 13294 13282
+3 13294 13295 13282
+3 13282 13295 13283
+3 13295 13296 13283
+3 13283 13296 13284
+3 13296 13297 13284
+3 13284 13297 13285
+3 13297 13298 13285
+3 13285 13298 13286
+3 13298 13299 13286
+3 13286 13299 13287
+3 13299 13300 13287
+3 13287 13300 13288
+3 13300 13301 13288
+3 13288 13301 13289
+3 13301 13302 13289
+3 13289 13302 13290
+3 13295 13294 13303
+3 13295 13303 13296
+3 13303 13304 13296
+3 13296 13304 13297
+3 13304 13305 13297
+3 13297 13305 13298
+3 13305 13306 13298
+3 13298 13306 13299
+3 13306 13307 13299
+3 13299 13307 13300
+3 13307 13308 13300
+3 13300 13308 13301
+3 13308 13309 13301
+3 13301 13309 13302
+3 13320 13310 13315
+3 13310 13320 13311
+3 13320 13321 13311
+3 13311 13321 13312
+3 13321 13322 13312
+3 13312 13322 13316
+3 13322 13323 13316
+3 13323 13317 13316
+3 13326 13313 13319
+3 13313 13326 13314
+3 13326 13327 13314
+3 13314 13327 13315
+3 13327 13328 13315
+3 13315 13328 13320
+3 13328 13329 13320
+3 13320 13329 13321
+3 13329 13330 13321
+3 13321 13330 13322
+3 13330 13331 13322
+3 13322 13331 13323
+3 13331 13332 13323
+3 13323 13332 13317
+3 13332 13333 13317
+3 13317 13333 13318
+3 13333 13334 13318
+3 13318 13334 13324
+3 13334 13335 13324
+3 13335 13336 13324
+3 13338 13319 13325
+3 13319 13338 13326
+3 13338 13339 13326
+3 13326 13339 13327
+3 13339 13340 13327
+3 13327 13340 13328
+3 13340 13341 13328
+3 13328 13341 13329
+3 13341 13342 13329
+3 13329 13342 13330
+3 13342 13343 13330
+3 13330 13343 13331
+3 13343 13344 13331
+3 13331 13344 13332
+3 13344 13345 13332
+3 13332 13345 13333
+3 13345 13346 13333
+3 13333 13346 13334
+3 13346 13347 13334
+3 13334 13347 13335
+3 13347 13348 13335
+3 13335 13348 13336
+3 13348 13349 13336
+3 13349 13350 13336
+3 13352 13325 13337
+3 13325 13352 13338
+3 13352 13353 13338
+3 13338 13353 13339
+3 13353 13354 13339
+3 13339 13354 13340
+3 13354 13355 13340
+3 13340 13355 13341
+3 13355 13356 13341
+3 13341 13356 13342
+3 13356 13357 13342
+3 13342 13357 13343
+3 13357 13358 13343
+3 13343 13358 13344
+3 13358 13359 13344
+3 13344 13359 13345
+3 13359 13360 13345
+3 13345 13360 13346
+3 13360 13361 13346
+3 13346 13361 13347
+3 13361 13362 13347
+3 13347 13362 13348
+3 13362 13363 13348
+3 13348 13363 13349
+3 13363 13364 13349
+3 13349 13364 13350
+3 13364 13365 13350
+3 13365 13366 13350
+3 13367 13337 13351
+3 13337 13367 13352
+3 13367 13368 13352
+3 13352 13368 13353
+3 13368 13369 13353
+3 13353 13369 13354
+3 13369 13370 13354
+3 13355 13370 13567
+3 13354 13370 13355
+3 13568 13356 13355
+3 13567 13568 13355
+3 13569 13357 13356
+3 13568 13569 13356
+3 13570 13358 13357
+3 13569 13570 13357
+3 13571 13359 13358
+3 13570 13571 13358
+3 13572 13360 13359
+3 13571 13572 13359
+3 13573 13361 13360
+3 13572 13573 13360
+3 13575 13362 13361
+3 13573 13575 13361
+3 13371 13362 13575
+3 13363 13362 13371
+3 13363 13371 13364
+3 13371 13372 13364
+3 13364 13372 13365
+3 13372 13373 13365
+3 13365 13373 13366
+3 13373 13374 13366
+3 13374 13375 13366
+3 13351 13377 13367
+3 13377 13378 13367
+3 13367 13378 13368
+3 13378 13379 13368
+3 13368 13379 13369
+3 13379 13380 13369
+3 13370 13380 13574
+3 13369 13380 13370
+3 13574 13567 13370
+3 13585 13371 13575
+3 13381 13371 13585
+3 13372 13371 13381
+3 13372 13381 13373
+3 13381 13382 13373
+3 13373 13382 13374
+3 13382 13383 13374
+3 13374 13383 13375
+3 13383 13384 13375
+3 13385 13377 13376
+3 13377 13385 13378
+3 13385 13386 13378
+3 13378 13386 13379
+3 13386 13387 13379
+3 13380 13387 13576
+3 13379 13387 13380
+3 13576 13574 13380
+3 13597 13381 13585
+3 13388 13381 13597
+3 13382 13381 13388
+3 13382 13388 13383
+3 13388 13389 13383
+3 13383 13389 13384
+3 13389 13390 13384
+3 13390 13391 13384
+3 13376 13393 13385
+3 13393 13394 13385
+3 13385 13394 13386
+3 13394 13395 13386
+3 13387 13395 13586
+3 13386 13395 13387
+3 13586 13576 13387
+3 13610 13388 13597
+3 13396 13388 13610
+3 13389 13388 13396
+3 13389 13396 13390
+3 13396 13397 13390
+3 13390 13397 13391
+3 13397 13398 13391
+3 13399 13393 13392
+3 13393 13399 13394
+3 13399 13400 13394
+3 13394 13400 13395
+3 13400 13401 13395
+3 13586 13395 13401
+3 13611 13586 13401
+3 13624 13402 13396
+3 13610 13624 13396
+3 13396 13402 13397
+3 13402 13403 13397
+3 13397 13403 13398
+3 13403 13404 13398
+3 13404 13405 13398
+3 13392 13406 13399
+3 13406 13407 13399
+3 13399 13407 13400
+3 13407 13408 13400
+3 13400 13408 13401
+3 13408 13409 13401
+3 13611 13401 13409
+3 13626 13611 13409
+3 13640 13402 13624
+3 13410 13402 13640
+3 13403 13402 13410
+3 13403 13410 13404
+3 13410 13411 13404
+3 13404 13411 13405
+3 13411 13412 13405
+3 13406 13413 13407
+3 13413 13414 13407
+3 13407 13414 13408
+3 13414 13415 13408
+3 13409 13415 13625
+3 13408 13415 13409
+3 13625 13626 13409
+3 13655 13416 13410
+3 13640 13655 13410
+3 13410 13416 13411
+3 13416 13417 13411
+3 13411 13417 13412
+3 13417 13418 13412
+3 13413 13420 13414
+3 13420 13421 13414
+3 13414 13421 13415
+3 13421 13422 13415
+3 13625 13415 13422
+3 13656 13625 13422
+3 13671 13423 13416
+3 13655 13671 13416
+3 13416 13423 13417
+3 13423 13424 13417
+3 13417 13424 13418
+3 13424 13425 13418
+3 13426 13420 13419
+3 13420 13426 13421
+3 13426 13427 13421
+3 13421 13427 13422
+3 13427 13428 13422
+3 13656 13422 13428
+3 13672 13656 13428
+3 13687 13429 13423
+3 13671 13687 13423
+3 13423 13429 13424
+3 13429 13430 13424
+3 13424 13430 13425
+3 13430 13431 13425
+3 13419 13432 13426
+3 13432 13433 13426
+3 13426 13433 13427
+3 13433 13434 13427
+3 13427 13434 13428
+3 13434 13435 13428
+3 13672 13428 13435
+3 13688 13672 13435
+3 13703 13436 13429
+3 13687 13703 13429
+3 13429 13436 13430
+3 13436 13437 13430
+3 13430 13437 13431
+3 13437 13438 13431
+3 13432 13439 13433
+3 13439 13440 13433
+3 13433 13440 13434
+3 13440 13441 13434
+3 13434 13441 13435
+3 13441 13442 13435
+3 13688 13435 13442
+3 13704 13688 13442
+3 13719 13443 13436
+3 13703 13719 13436
+3 13436 13443 13437
+3 13443 13444 13437
+3 13437 13444 13438
+3 13444 13445 13438
+3 13440 13439 13446
+3 13440 13446 13441
+3 13446 13447 13441
+3 13441 13447 13442
+3 13447 13448 13442
+3 13704 13442 13448
+3 13720 13704 13448
+3 13735 13449 13443
+3 13719 13735 13443
+3 13443 13449 13444
+3 13449 13450 13444
+3 13444 13450 13445
+3 13450 13451 13445
+3 13446 13452 13447
+3 13452 13453 13447
+3 13447 13453 13448
+3 13453 13454 13448
+3 13720 13448 13454
+3 13736 13720 13454
+3 13751 13455 13449
+3 13735 13751 13449
+3 13449 13455 13450
+3 13455 13456 13450
+3 13450 13456 13451
+3 13456 13457 13451
+3 13452 13458 13453
+3 13458 13459 13453
+3 13453 13459 13454
+3 13459 13460 13454
+3 13454 13461 13736
+3 13460 13461 13454
+3 13736 13461 13752
+3 13766 13462 13455
+3 13751 13766 13455
+3 13455 13462 13456
+3 13462 13463 13456
+3 13456 13463 13457
+3 13463 13464 13457
+3 13458 13465 13459
+3 13465 13466 13459
+3 13459 13466 13460
+3 13466 13467 13460
+3 13460 13467 13461
+3 13467 13468 13461
+3 13752 13461 13468
+3 13767 13752 13468
+3 13469 13766 13780
+3 13469 13462 13766
+3 13470 13462 13469
+3 13462 13470 13463
+3 13470 13471 13463
+3 13463 13471 13464
+3 13471 13472 13464
+3 13465 13473 13466
+3 13473 13474 13466
+3 13466 13474 13467
+3 13474 13475 13467
+3 13467 13475 13468
+3 13475 13476 13468
+3 13767 13468 13476
+3 13781 13767 13476
+3 13794 13477 13469
+3 13780 13794 13469
+3 13469 13477 13470
+3 13477 13478 13470
+3 13470 13478 13471
+3 13478 13479 13471
+3 13471 13479 13472
+3 13474 13473 13480
+3 13474 13480 13475
+3 13480 13481 13475
+3 13475 13481 13476
+3 13481 13482 13476
+3 13476 13483 13781
+3 13482 13483 13476
+3 13781 13483 13795
+3 13484 13794 13806
+3 13484 13477 13794
+3 13485 13477 13484
+3 13477 13485 13478
+3 13485 13486 13478
+3 13478 13486 13479
+3 13486 13487 13479
+3 13480 13488 13481
+3 13488 13489 13481
+3 13481 13489 13482
+3 13489 13490 13482
+3 13482 13490 13483
+3 13490 13491 13483
+3 13483 13492 13795
+3 13491 13492 13483
+3 13795 13492 13807
+3 13493 13806 13816
+3 13493 13484 13806
+3 13494 13484 13493
+3 13484 13494 13485
+3 13494 13495 13485
+3 13485 13495 13486
+3 13495 13496 13486
+3 13486 13496 13487
+3 13496 13497 13487
+3 13489 13488 13498
+3 13489 13498 13490
+3 13498 13499 13490
+3 13490 13499 13491
+3 13499 13500 13491
+3 13491 13500 13492
+3 13500 13501 13492
+3 13492 13502 13807
+3 13501 13502 13492
+3 13807 13502 13817
+3 13503 13816 13824
+3 13503 13493 13816
+3 13504 13493 13503
+3 13493 13504 13494
+3 13504 13505 13494
+3 13494 13505 13495
+3 13505 13506 13495
+3 13495 13506 13496
+3 13506 13507 13496
+3 13496 13507 13497
+3 13499 13498 13508
+3 13499 13508 13500
+3 13508 13509 13500
+3 13500 13509 13501
+3 13509 13510 13501
+3 13501 13510 13502
+3 13510 13511 13502
+3 13502 13512 13817
+3 13511 13512 13502
+3 13513 13818 13817
+3 13512 13513 13817
+3 13514 13819 13818
+3 13513 13514 13818
+3 13819 13514 13825
+3 13515 13821 13825
+3 13516 13822 13821
+3 13515 13516 13821
+3 13517 13823 13822
+3 13516 13517 13822
+3 13518 13824 13823
+3 13517 13518 13823
+3 13518 13503 13824
+3 13519 13503 13518
+3 13503 13519 13504
+3 13519 13520 13504
+3 13504 13520 13505
+3 13520 13521 13505
+3 13505 13521 13506
+3 13521 13522 13506
+3 13506 13522 13507
+3 13509 13508 13523
+3 13509 13523 13510
+3 13523 13524 13510
+3 13510 13524 13511
+3 13524 13525 13511
+3 13511 13525 13512
+3 13525 13526 13512
+3 13512 13526 13513
+3 13526 13527 13513
+3 13513 13527 13514
+3 13527 13528 13514
+3 13514 13529 13825
+3 13528 13529 13514
+3 13529 13515 13825
+3 13530 13515 13529
+3 13515 13530 13516
+3 13530 13531 13516
+3 13516 13531 13517
+3 13531 13532 13517
+3 13517 13532 13518
+3 13532 13533 13518
+3 13518 13533 13519
+3 13533 13534 13519
+3 13519 13534 13520
+3 13534 13535 13520
+3 13520 13535 13521
+3 13535 13536 13521
+3 13521 13536 13522
+3 13536 13537 13522
+3 13524 13523 13538
+3 13524 13538 13525
+3 13538 13539 13525
+3 13525 13539 13526
+3 13539 13540 13526
+3 13526 13540 13527
+3 13540 13541 13527
+3 13527 13541 13528
+3 13541 13542 13528
+3 13528 13542 13529
+3 13542 13543 13529
+3 13529 13543 13530
+3 13543 13544 13530
+3 13530 13544 13531
+3 13544 13545 13531
+3 13531 13545 13532
+3 13545 13546 13532
+3 13532 13546 13533
+3 13546 13547 13533
+3 13533 13547 13534
+3 13547 13548 13534
+3 13534 13548 13535
+3 13548 13549 13535
+3 13535 13549 13536
+3 13549 13550 13536
+3 13536 13550 13537
+3 13539 13538 13551
+3 13539 13551 13540
+3 13551 13552 13540
+3 13540 13552 13541
+3 13552 13553 13541
+3 13541 13553 13542
+3 13553 13554 13542
+3 13542 13554 13543
+3 13554 13555 13543
+3 13543 13555 13544
+3 13555 13556 13544
+3 13544 13556 13545
+3 13556 13557 13545
+3 13545 13557 13546
+3 13557 13558 13546
+3 13546 13558 13547
+3 13558 13559 13547
+3 13547 13559 13548
+3 13559 13560 13548
+3 13548 13560 13549
+3 13553 13552 13561
+3 13553 13561 13554
+3 13561 13562 13554
+3 13554 13562 13555
+3 13562 13563 13555
+3 13555 13563 13556
+3 13563 13564 13556
+3 13556 13564 13557
+3 13564 13565 13557
+3 13557 13565 13558
+3 13565 13566 13558
+3 13558 13566 13559
+3 13577 13567 13574
+3 13567 13577 13568
+3 13577 13578 13568
+3 13568 13578 13569
+3 13578 13579 13569
+3 13569 13579 13570
+3 13579 13580 13570
+3 13570 13580 13571
+3 13580 13581 13571
+3 13571 13581 13572
+3 13581 13582 13572
+3 13572 13582 13573
+3 13582 13583 13573
+3 13573 13583 13575
+3 13583 13584 13575
+3 13584 13585 13575
+3 13587 13574 13576
+3 13574 13587 13577
+3 13587 13588 13577
+3 13577 13588 13578
+3 13588 13589 13578
+3 13578 13589 13579
+3 13589 13590 13579
+3 13579 13590 13580
+3 13590 13591 13580
+3 13580 13591 13581
+3 13591 13592 13581
+3 13581 13592 13582
+3 13592 13593 13582
+3 13582 13593 13583
+3 13593 13594 13583
+3 13583 13594 13584
+3 13594 13595 13584
+3 13584 13595 13585
+3 13595 13596 13585
+3 13596 13597 13585
+3 13598 13576 13586
+3 13576 13598 13587
+3 13598 13599 13587
+3 13587 13599 13588
+3 13599 13600 13588
+3 13588 13600 13589
+3 13600 13601 13589
+3 13589 13601 13590
+3 13601 13602 13590
+3 13590 13602 13591
+3 13602 13603 13591
+3 13591 13603 13592
+3 13603 13604 13592
+3 13592 13604 13593
+3 13604 13605 13593
+3 13593 13605 13594
+3 13605 13606 13594
+3 13594 13606 13595
+3 13606 13607 13595
+3 13595 13607 13596
+3 13607 13608 13596
+3 13596 13608 13597
+3 13608 13609 13597
+3 13609 13610 13597
+3 13586 13611 13598
+3 13611 13612 13598
+3 13598 13612 13599
+3 13612 13613 13599
+3 13599 13613 13600
+3 13613 13614 13600
+3 13600 13614 13601
+3 13614 13615 13601
+3 13601 13615 13602
+3 13615 13616 13602
+3 13602 13616 13603
+3 13616 13617 13603
+3 13603 13617 13604
+3 13617 13618 13604
+3 13604 13618 13605
+3 13618 13619 13605
+3 13605 13619 13606
+3 13619 13620 13606
+3 13606 13620 13607
+3 13620 13621 13607
+3 13607 13621 13608
+3 13621 13622 13608
+3 13608 13622 13609
+3 13622 13623 13609
+3 13609 13623 13610
+3 13623 13624 13610
+3 13611 13626 13612
+3 13626 13627 13612
+3 13612 13627 13613
+3 13627 13628 13613
+3 13613 13628 13614
+3 13628 13629 13614
+3 13614 13629 13615
+3 13629 13630 13615
+3 13615 13630 13616
+3 13630 13631 13616
+3 13616 13631 13617
+3 13631 13632 13617
+3 13617 13632 13618
+3 13632 13633 13618
+3 13618 13633 13619
+3 13633 13634 13619
+3 13619 13634 13620
+3 13634 13635 13620
+3 13620 13635 13621
+3 13635 13636 13621
+3 13621 13636 13622
+3 13636 13637 13622
+3 13622 13637 13623
+3 13637 13638 13623
+3 13623 13638 13624
+3 13638 13639 13624
+3 13639 13640 13624
+3 13641 13626 13625
+3 13626 13641 13627
+3 13641 13642 13627
+3 13627 13642 13628
+3 13642 13643 13628
+3 13628 13643 13629
+3 13643 13644 13629
+3 13629 13644 13630
+3 13644 13645 13630
+3 13630 13645 13631
+3 13645 13646 13631
+3 13631 13646 13632
+3 13646 13647 13632
+3 13632 13647 13633
+3 13647 13648 13633
+3 13633 13648 13634
+3 13648 13649 13634
+3 13634 13649 13635
+3 13649 13650 13635
+3 13635 13650 13636
+3 13650 13651 13636
+3 13636 13651 13637
+3 13651 13652 13637
+3 13637 13652 13638
+3 13652 13653 13638
+3 13638 13653 13639
+3 13653 13654 13639
+3 13639 13654 13640
+3 13654 13655 13640
+3 13625 13656 13641
+3 13656 13657 13641
+3 13641 13657 13642
+3 13657 13658 13642
+3 13642 13658 13643
+3 13658 13659 13643
+3 13643 13659 13644
+3 13659 13660 13644
+3 13644 13660 13645
+3 13660 13661 13645
+3 13645 13661 13646
+3 13661 13662 13646
+3 13646 13662 13647
+3 13662 13663 13647
+3 13647 13663 13648
+3 13663 13664 13648
+3 13648 13664 13649
+3 13664 13665 13649
+3 13649 13665 13650
+3 13665 13666 13650
+3 13650 13666 13651
+3 13666 13667 13651
+3 13651 13667 13652
+3 13667 13668 13652
+3 13652 13668 13653
+3 13668 13669 13653
+3 13653 13669 13654
+3 13669 13670 13654
+3 13654 13670 13655
+3 13670 13671 13655
+3 13656 13672 13657
+3 13672 13673 13657
+3 13657 13673 13658
+3 13673 13674 13658
+3 13658 13674 13659
+3 13674 13675 13659
+3 13659 13675 13660
+3 13675 13676 13660
+3 13660 13676 13661
+3 13676 13677 13661
+3 13661 13677 13662
+3 13677 13678 13662
+3 13662 13678 13663
+3 13678 13679 13663
+3 13663 13679 13664
+3 13679 13680 13664
+3 13664 13680 13665
+3 13680 13681 13665
+3 13665 13681 13666
+3 13681 13682 13666
+3 13666 13682 13667
+3 13682 13683 13667
+3 13667 13683 13668
+3 13683 13684 13668
+3 13668 13684 13669
+3 13684 13685 13669
+3 13669 13685 13670
+3 13685 13686 13670
+3 13670 13686 13671
+3 13686 13687 13671
+3 13672 13688 13673
+3 13688 13689 13673
+3 13673 13689 13674
+3 13689 13690 13674
+3 13674 13690 13675
+3 13690 13691 13675
+3 13675 13691 13676
+3 13691 13692 13676
+3 13676 13692 13677
+3 13692 13693 13677
+3 13677 13693 13678
+3 13693 13694 13678
+3 13678 13694 13679
+3 13694 13695 13679
+3 13679 13695 13680
+3 13695 13696 13680
+3 13680 13696 13681
+3 13696 13697 13681
+3 13681 13697 13682
+3 13697 13698 13682
+3 13682 13698 13683
+3 13698 13699 13683
+3 13683 13699 13684
+3 13699 13700 13684
+3 13684 13700 13685
+3 13700 13701 13685
+3 13685 13701 13686
+3 13701 13702 13686
+3 13686 13702 13687
+3 13702 13703 13687
+3 13688 13704 13689
+3 13704 13705 13689
+3 13689 13705 13690
+3 13705 13706 13690
+3 13690 13706 13691
+3 13706 13707 13691
+3 13691 13707 13692
+3 13707 13708 13692
+3 13692 13708 13693
+3 13708 13709 13693
+3 13693 13709 13694
+3 13709 13710 13694
+3 13694 13710 13695
+3 13710 13711 13695
+3 13695 13711 13696
+3 13711 13712 13696
+3 13696 13712 13697
+3 13712 13713 13697
+3 13697 13713 13698
+3 13713 13714 13698
+3 13698 13714 13699
+3 13714 13715 13699
+3 13699 13715 13700
+3 13715 13716 13700
+3 13700 13716 13701
+3 13716 13717 13701
+3 13701 13717 13702
+3 13717 13718 13702
+3 13702 13718 13703
+3 13718 13719 13703
+3 13704 13720 13705
+3 13720 13721 13705
+3 13705 13721 13706
+3 13721 13722 13706
+3 13706 13722 13707
+3 13722 13723 13707
+3 13707 13723 13708
+3 13723 13724 13708
+3 13708 13724 13709
+3 13724 13725 13709
+3 13709 13725 13710
+3 13725 13726 13710
+3 13710 13726 13711
+3 13726 13727 13711
+3 13711 13727 13712
+3 13727 13728 13712
+3 13712 13728 13713
+3 13728 13729 13713
+3 13713 13729 13714
+3 13729 13730 13714
+3 13714 13730 13715
+3 13730 13731 13715
+3 13715 13731 13716
+3 13731 13732 13716
+3 13716 13732 13717
+3 13732 13733 13717
+3 13717 13733 13718
+3 13733 13734 13718
+3 13718 13734 13719
+3 13734 13735 13719
+3 13720 13736 13721
+3 13736 13737 13721
+3 13721 13737 13722
+3 13737 13738 13722
+3 13722 13738 13723
+3 13738 13739 13723
+3 13723 13739 13724
+3 13739 13740 13724
+3 13724 13740 13725
+3 13740 13741 13725
+3 13725 13741 13726
+3 13741 13742 13726
+3 13726 13742 13727
+3 13742 13743 13727
+3 13727 13743 13728
+3 13743 13744 13728
+3 13728 13744 13729
+3 13744 13745 13729
+3 13729 13745 13730
+3 13745 13746 13730
+3 13730 13746 13731
+3 13746 13747 13731
+3 13731 13747 13732
+3 13747 13748 13732
+3 13732 13748 13733
+3 13748 13749 13733
+3 13733 13749 13734
+3 13749 13750 13734
+3 13734 13750 13735
+3 13750 13751 13735
+3 13737 13736 13752
+3 13737 13752 13738
+3 13752 13753 13738
+3 13738 13753 13739
+3 13753 13754 13739
+3 13739 13754 13740
+3 13754 13755 13740
+3 13740 13755 13741
+3 13755 13756 13741
+3 13741 13756 13742
+3 13756 13757 13742
+3 13742 13757 13743
+3 13757 13758 13743
+3 13743 13758 13744
+3 13758 13759 13744
+3 13744 13759 13745
+3 13759 13760 13745
+3 13745 13760 13746
+3 13760 13761 13746
+3 13746 13761 13747
+3 13761 13762 13747
+3 13747 13762 13748
+3 13762 13763 13748
+3 13748 13763 13749
+3 13763 13764 13749
+3 13749 13764 13750
+3 13764 13765 13750
+3 13750 13765 13751
+3 13765 13766 13751
+3 13752 13767 13753
+3 13767 13768 13753
+3 13753 13768 13754
+3 13768 13769 13754
+3 13754 13769 13755
+3 13769 13770 13755
+3 13755 13770 13756
+3 13770 13771 13756
+3 13756 13771 13757
+3 13771 13772 13757
+3 13757 13772 13758
+3 13772 13773 13758
+3 13758 13773 13759
+3 13773 13774 13759
+3 13759 13774 13760
+3 13774 13775 13760
+3 13760 13775 13761
+3 13775 13776 13761
+3 13761 13776 13762
+3 13776 13777 13762
+3 13762 13777 13763
+3 13777 13778 13763
+3 13763 13778 13764
+3 13778 13779 13764
+3 13764 13779 13765
+3 13779 13780 13765
+3 13765 13780 13766
+3 13767 13781 13768
+3 13781 13782 13768
+3 13768 13782 13769
+3 13782 13783 13769
+3 13769 13783 13770
+3 13783 13784 13770
+3 13770 13784 13771
+3 13784 13785 13771
+3 13771 13785 13772
+3 13785 13786 13772
+3 13772 13786 13773
+3 13786 13787 13773
+3 13773 13787 13774
+3 13787 13788 13774
+3 13774 13788 13775
+3 13788 13789 13775
+3 13775 13789 13776
+3 13789 13790 13776
+3 13776 13790 13777
+3 13790 13791 13777
+3 13777 13791 13778
+3 13791 13792 13778
+3 13778 13792 13779
+3 13792 13793 13779
+3 13779 13793 13780
+3 13793 13794 13780
+3 13782 13781 13795
+3 13782 13795 13783
+3 13795 13796 13783
+3 13783 13796 13784
+3 13796 13797 13784
+3 13784 13797 13785
+3 13797 13798 13785
+3 13785 13798 13786
+3 13798 13799 13786
+3 13786 13799 13787
+3 13799 13800 13787
+3 13787 13800 13788
+3 13800 13801 13788
+3 13788 13801 13789
+3 13801 13802 13789
+3 13789 13802 13790
+3 13802 13803 13790
+3 13790 13803 13791
+3 13803 13804 13791
+3 13791 13804 13792
+3 13804 13805 13792
+3 13792 13805 13793
+3 13805 13806 13793
+3 13793 13806 13794
+3 13796 13795 13807
+3 13796 13807 13797
+3 13807 13808 13797
+3 13797 13808 13798
+3 13808 13809 13798
+3 13798 13809 13799
+3 13809 13810 13799
+3 13799 13810 13800
+3 13810 13811 13800
+3 13800 13811 13801
+3 13811 13812 13801
+3 13801 13812 13802
+3 13812 13813 13802
+3 13802 13813 13803
+3 13813 13814 13803
+3 13803 13814 13804
+3 13814 13815 13804
+3 13804 13815 13805
+3 13815 13816 13805
+3 13805 13816 13806
+3 13808 13807 13817
+3 13808 13817 13809
+3 13817 13818 13809
+3 13809 13818 13810
+3 13818 13819 13810
+3 13810 13819 13811
+3 13819 13820 13811
+3 13811 13820 13812
+3 13820 13821 13812
+3 13812 13821 13813
+3 13821 13822 13813
+3 13813 13822 13814
+3 13822 13823 13814
+3 13814 13823 13815
+3 13823 13824 13815
+3 13815 13824 13816
+3 13820 13819 13825
+3 13820 13825 13821
diff --git a/3rdparty/CGAL-4.6/demo/Polyhedron/data/elephant.off b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/data/elephant.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/demo/Polyhedron/data/elephant.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/data/elephant.off
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/segmentation_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/segmentation_example.cpp
new file mode 100644
index 0000000..edc273e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/segmentation_example.cpp
@@ -0,0 +1,98 @@
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/extract_mean_curvature_flow_skeleton.h>
+#include <CGAL/mesh_segmentation.h>
+
+#include <fstream>
+
+typedef CGAL::Simple_cartesian<double>                               Kernel;
+typedef Kernel::Point_3                                              Point;
+typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor           vertex_descriptor;
+typedef boost::graph_traits<Polyhedron>::halfedge_descriptor         halfedge_descriptor;
+typedef boost::graph_traits<Polyhedron>::face_descriptor             face_descriptor;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Polyhedron>        Skeletonization;
+typedef Skeletonization::Skeleton                                    Skeleton;
+
+typedef Skeleton::vertex_descriptor                                  Skeleton_vertex;
+
+// Property map associating a facet with an integer as id to an
+// element in a vector stored internally
+template<class ValueType>
+struct Facet_with_id_pmap
+    : public boost::put_get_helper<ValueType&,
+             Facet_with_id_pmap<ValueType> >
+{
+    typedef face_descriptor key_type;
+    typedef ValueType value_type;
+    typedef value_type& reference;
+    typedef boost::lvalue_property_map_tag category;
+
+    Facet_with_id_pmap(
+      std::vector<ValueType>& internal_vector
+    ) : internal_vector(internal_vector) { }
+
+    reference operator[](key_type key) const
+    { return internal_vector[key->id()]; }
+private:
+    std::vector<ValueType>& internal_vector;
+};
+
+
+int main(int argc, char* argv[])
+{
+  std::ifstream input((argc>1)?argv[1]:"data/161.off");
+  Polyhedron tmesh;
+  input >> tmesh;
+
+  // extract the skeleton
+  Skeleton skeleton;
+  CGAL::extract_mean_curvature_flow_skeleton(tmesh, skeleton);
+
+  // init the polyhedron simplex indices
+  CGAL::set_halfedgeds_items_id(tmesh);
+
+  //for each input vertex compute its distance to the skeleton
+  std::vector<double> distances(num_vertices(tmesh));
+  BOOST_FOREACH(Skeleton_vertex v, vertices(skeleton) )
+  {
+    const Point& skel_pt = skeleton[v].point;
+    BOOST_FOREACH(vertex_descriptor mesh_v, skeleton[v].vertices)
+    {
+      const Point& mesh_pt = mesh_v->point();
+      distances[mesh_v->id()] = std::sqrt(CGAL::squared_distance(skel_pt, mesh_pt));
+    }
+  }
+
+  // create a property-map for sdf values
+  std::vector<double> sdf_values( num_faces(tmesh) );
+  Facet_with_id_pmap<double> sdf_property_map(sdf_values);
+
+  // compute sdf values with skeleton
+  BOOST_FOREACH(face_descriptor f, faces(tmesh))
+  {
+    double dist = 0;
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(f, tmesh), tmesh))
+      dist+=distances[target(hd, tmesh)->id()];
+    sdf_property_map[f] = dist / 3.;
+  }
+
+  // post-process the sdf values
+  CGAL::sdf_values_postprocessing(tmesh, sdf_property_map);
+
+  // create a property-map for segment-ids (it is an adaptor for this case)
+  std::vector<std::size_t> segment_ids( num_faces(tmesh) );
+  Facet_with_id_pmap<std::size_t> segment_property_map(segment_ids);
+
+  // segment the mesh using default parameters
+  std::cout << "Number of segments: "
+            << CGAL::segmentation_from_sdf_values(tmesh, sdf_property_map, segment_property_map) <<"\n";
+
+  return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp
new file mode 100644
index 0000000..c21af6d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp
@@ -0,0 +1,79 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/extract_mean_curvature_flow_skeleton.h>
+#include <CGAL/boost/graph/split_graph_into_polylines.h>
+#include <fstream>
+
+#include <boost/foreach.hpp>
+
+typedef CGAL::Simple_cartesian<double>                        Kernel;
+typedef Kernel::Point_3                                       Point;
+typedef CGAL::Polyhedron_3<Kernel>                            Polyhedron;
+
+typedef boost::graph_traits<Polyhedron>::vertex_descriptor    vertex_descriptor;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Polyhedron> Skeletonization;
+typedef Skeletonization::Skeleton                             Skeleton;
+
+typedef Skeleton::vertex_descriptor                           Skeleton_vertex;
+typedef Skeleton::edge_descriptor                             Skeleton_edge;
+
+//only needed for the display of the skeleton as maximal polylines
+struct Display_polylines{
+  const Skeleton& skeleton;
+  std::ofstream& out;
+  int polyline_size;
+  std::stringstream sstr;
+
+  Display_polylines(const Skeleton& skeleton, std::ofstream& out)
+    : skeleton(skeleton), out(out)
+  {}
+
+  void start_new_polyline(){
+    polyline_size=0;
+    sstr.str("");
+    sstr.clear();
+  }
+  void add_node(Skeleton_vertex v){
+    ++polyline_size;
+    sstr << " " << skeleton[v].point;
+  }
+  void end_polyline()
+  {
+    out << polyline_size << sstr.str() << "\n";
+  }
+};
+
+// This example extracts a medially centered skeleton from a given mesh.
+int main(int argc, char* argv[])
+{
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  Polyhedron tmesh;
+  input >> tmesh;
+
+  Skeleton skeleton;
+
+  CGAL::extract_mean_curvature_flow_skeleton(tmesh, skeleton);
+
+  std::cout << "Number of vertices of the skeleton: " << boost::num_vertices(skeleton) << "\n";
+  std::cout << "Number of edges of the skeleton: " << boost::num_edges(skeleton) << "\n";
+
+  // Output all the edges of the skeleton.
+  std::ofstream output("skel.cgal");
+  Display_polylines display(skeleton,output);
+  CGAL::split_graph_into_polylines(skeleton, display);
+  output.close();
+
+  // Output skeleton points and the corresponding surface points
+  output.open("correspondance.cgal");
+  BOOST_FOREACH(Skeleton_vertex v, vertices(skeleton))
+    BOOST_FOREACH(vertex_descriptor vd, skeleton[v].vertices)
+      output << "2 " << skeleton[v].point << " "
+                     << get(CGAL::vertex_point, tmesh, vd)  << "\n";
+
+  return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_sm_example.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_sm_example.cpp
new file mode 100644
index 0000000..2b6a52c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_sm_example.cpp
@@ -0,0 +1,57 @@
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/extract_mean_curvature_flow_skeleton.h>
+
+#include <fstream>
+
+#include <boost/foreach.hpp>
+
+typedef CGAL::Simple_cartesian<double>                        Kernel;
+typedef Kernel::Point_3                                       Point;
+typedef CGAL::Surface_mesh<Point>                             Triangle_mesh;
+
+typedef boost::graph_traits<Triangle_mesh>::vertex_descriptor    vertex_descriptor;
+
+typedef CGAL::Mean_curvature_flow_skeletonization<Triangle_mesh> Skeletonization;
+typedef Skeletonization::Skeleton                             Skeleton;
+
+typedef Skeleton::vertex_descriptor                           Skeleton_vertex;
+typedef Skeleton::edge_descriptor                             Skeleton_edge;
+
+
+// This example extracts a medially centered skeleton from a given mesh.
+int main(int argc, char* argv[])
+{
+  std::ifstream input((argc>1)?argv[1]:"data/elephant.off");
+  Triangle_mesh tmesh;
+  input >> tmesh;
+
+  Skeleton skeleton;
+
+  CGAL::extract_mean_curvature_flow_skeleton(tmesh, skeleton);
+
+  std::cout << "Number of vertices of the skeleton: " << boost::num_vertices(skeleton) << "\n";
+  std::cout << "Number of edges of the skeleton: " << boost::num_edges(skeleton) << "\n";
+
+  // Output all the edges of the skeleton.
+  std::ofstream output("skel.cgal");
+  BOOST_FOREACH(Skeleton_edge e, edges(skeleton))
+  {
+    const Point& s = skeleton[source(e, skeleton)].point;
+    const Point& t = skeleton[target(e, skeleton)].point;
+    output << "2 " << s << " " << t << "\n";
+  }
+  output.close();
+
+  // Output skeleton points and the corresponding surface points
+  output.open("correspondance.cgal");
+  BOOST_FOREACH(Skeleton_vertex v, vertices(skeleton))
+    BOOST_FOREACH(vertex_descriptor vd, skeleton[v].vertices)
+      output << "2 " << skeleton[v].point << "  " << get(CGAL::vertex_point, tmesh, vd)  << "\n";
+
+
+  return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Surface_mesher/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Surface_mesher/CMakeLists.txt
new file mode 100644
index 0000000..36413fc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Surface_mesher/CMakeLists.txt
@@ -0,0 +1,30 @@
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Surface_mesher_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+include_directories(../../include)
+
+find_package(CGAL QUIET COMPONENTS ImageIO)
+
+if ( CGAL_FOUND AND CGAL_ImageIO_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  create_single_source_cgal_program( "mesh_a_3d_gray_image.cpp" )
+  create_single_source_cgal_program( "mesh_an_implicit_function.cpp" )
+
+else()
+  if(RUNNING_CGAL_AUTO_TEST)
+    # Just to avoid a warning from CMake if that variable is set on the command line...
+  endif()
+  
+  message(STATUS "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/data/skull_2.9.inr b/3rdparty/CGAL-4.8/examples/Surface_mesher/data/skull_2.9.inr
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesher/data/skull_2.9.inr
rename to 3rdparty/CGAL-4.8/examples/Surface_mesher/data/skull_2.9.inr
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/data/triceratops.off b/3rdparty/CGAL-4.8/examples/Surface_mesher/data/triceratops.off
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesher/data/triceratops.off
rename to 3rdparty/CGAL-4.8/examples/Surface_mesher/data/triceratops.off
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/mesh_a_3d_gray_image.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesher/mesh_a_3d_gray_image.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesher/mesh_a_3d_gray_image.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesher/mesh_a_3d_gray_image.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/mesh_an_implicit_function.cpp b/3rdparty/CGAL-4.8/examples/Surface_mesher/mesh_an_implicit_function.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesher/mesh_an_implicit_function.cpp
rename to 3rdparty/CGAL-4.8/examples/Surface_mesher/mesh_an_implicit_function.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Surface_mesher/skip_vcproj_auto_generation b/3rdparty/CGAL-4.8/examples/Surface_mesher/skip_vcproj_auto_generation
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Surface_mesher/skip_vcproj_auto_generation
rename to 3rdparty/CGAL-4.8/examples/Surface_mesher/skip_vcproj_auto_generation
diff --git a/3rdparty/CGAL-4.8/examples/Sweep_line_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Sweep_line_2/CMakeLists.txt
new file mode 100644
index 0000000..41d605e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Sweep_line_2/CMakeLists.txt
@@ -0,0 +1,63 @@
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+project( Sweep_line_2 )
+
+
+cmake_minimum_required(VERSION 2.6.2)
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
+  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
+    cmake_policy(VERSION 2.8.4)
+  else()
+    cmake_policy(VERSION 2.6)
+  endif()
+endif()
+
+if ( COMMAND cmake_policy )
+
+  cmake_policy( SET CMP0003 NEW )  
+
+endif()
+
+# CGAL and its components
+find_package( CGAL QUIET COMPONENTS  )
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+
+# Boost and its components
+find_package( Boost REQUIRED )
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+
+# include for local directory
+
+# include for local package
+include_directories( BEFORE ../../include )
+
+
+# Creating entries for all .cpp/.C files with "main" routine
+# ##########################################################
+
+include( CGAL_CreateSingleSourceCGALProgram )
+
+
+create_single_source_cgal_program( "sweep_line.cpp" )
+
+
+
+
diff --git a/3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/sweep_line.cpp b/3rdparty/CGAL-4.8/examples/Sweep_line_2/sweep_line.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Arrangement_on_surface_2/sweep_line.cpp
rename to 3rdparty/CGAL-4.8/examples/Sweep_line_2/sweep_line.cpp
diff --git a/3rdparty/CGAL-4.8/examples/TDS_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/TDS_3/CMakeLists.txt
new file mode 100644
index 0000000..618ccfb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/TDS_3/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( TDS_3_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "linking_2d_and_3d.cpp" )
+  create_single_source_cgal_program( "tds.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/linking_2d_and_3d.cpp b/3rdparty/CGAL-4.8/examples/TDS_3/linking_2d_and_3d.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/linking_2d_and_3d.cpp
rename to 3rdparty/CGAL-4.8/examples/TDS_3/linking_2d_and_3d.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/tds.cpp b/3rdparty/CGAL-4.8/examples/TDS_3/tds.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/tds.cpp
rename to 3rdparty/CGAL-4.8/examples/TDS_3/tds.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Triangulation/CMakeLists.txt
new file mode 100644
index 0000000..a11f3ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Triangulation_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+  
+  find_package(Eigen3 3.1.0) 
+  if (EIGEN3_FOUND) 
+    include( ${EIGEN3_USE_FILE} ) 
+    include_directories (BEFORE "../../include")
+
+    create_single_source_cgal_program( "barycentric_subdivision.cpp" )
+    create_single_source_cgal_program( "delaunay_triangulation.cpp" )
+    create_single_source_cgal_program( "triangulation.cpp" )
+    create_single_source_cgal_program( "triangulation_data_structure_dynamic.cpp" )
+    create_single_source_cgal_program( "triangulation_data_structure_static.cpp" )
+
+  else()
+    message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.")
+  endif()
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/barycentric_subdivision.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/barycentric_subdivision.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation/barycentric_subdivision.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation/barycentric_subdivision.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation/delaunay_triangulation.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/delaunay_triangulation.cpp
new file mode 100644
index 0000000..0ab829b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation/delaunay_triangulation.cpp
@@ -0,0 +1,78 @@
+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ < 4)
+
+#include <iostream>
+int main()
+{
+  std::cerr << "NOTICE: This test requires G++ >= 4.4, and will not be compiled." << std::endl;
+}
+
+#else
+
+#include <CGAL/Epick_d.h>
+#include <CGAL/point_generators_d.h>
+#include <CGAL/Delaunay_triangulation.h>
+#include <CGAL/algorithm.h>
+#include <CGAL/Timer.h>
+#include <CGAL/assertions.h>
+
+#include <iostream>
+#include <iterator>
+#include <vector>
+
+const int D=5;
+typedef CGAL::Epick_d< CGAL::Dimension_tag<D> >               K;
+typedef CGAL::Delaunay_triangulation<K>                       T;
+// The triangulation uses the default instanciation of the 
+// TriangulationDataStructure template parameter
+
+int main(int argc, char **argv)
+{
+  int N = 100; if( argc > 2 )N = atoi(argv[1]); // number of points
+  CGAL::Timer cost;  // timer
+
+  // Instanciate a random point generator
+  CGAL::Random rng(0);
+  typedef CGAL::Random_points_in_cube_d<T::Point> Random_points_iterator;
+  Random_points_iterator rand_it(D, 1.0, rng);
+  // Generate N random points
+  std::vector<T::Point> points;
+  CGAL::cpp11::copy_n(rand_it, N, std::back_inserter(points));
+  
+  T t(D);
+  CGAL_assertion(t.empty());
+  
+  // insert the points in the triangulation
+  cost.reset();cost.start();
+  std::cout << "  Delaunay triangulation of "<<N<<" points in dim "<<D<< std::flush;
+  t.insert(points.begin(), points.end());
+  std::cout << " done in "<<cost.time()<<" seconds." << std::endl;
+  CGAL_assertion( t.is_valid() );
+
+  // insert with special operations in conflict zone and new created cells
+  cost.reset();
+  std::cout << "  adding "<<N<<" other points "<< std::endl;
+  for(int i=0; i<N; ++i)
+  {
+    T::Vertex_handle v;
+    T::Face f(t.current_dimension()); 
+    T::Facet ft; 
+    T::Full_cell_handle c; 
+    T::Locate_type lt;
+    typedef std::vector<T::Full_cell_handle> Full_cells; 
+    Full_cells zone, new_full_cells; 
+    std::back_insert_iterator<Full_cells> out(zone); 
+    c = t.locate(*++rand_it, lt, f, ft, v);
+    // previously inserted vertex v is used as hint for point location (if defined)
+    T::Facet ftc = t.compute_conflict_zone(*rand_it, c, out); 
+    std::cout<<i<<"     conflict zone of size "<<zone.size()<<" -> "<<std::flush;
+    out = std::back_inserter(new_full_cells);
+    CGAL_assertion( t.is_valid() );
+    v = t.insert_in_hole(*rand_it, zone.begin(), zone.end(), ftc, out);
+    std::cout<<new_full_cells.size()<<" new cells"<<std::endl;
+  }
+
+  std::cout << " done in "<<cost.time()<<" seconds." << std::endl;
+  return 0;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation/triangulation.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation.cpp
new file mode 100644
index 0000000..043c3cd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation.cpp
@@ -0,0 +1,53 @@
+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ < 4)
+
+#include <iostream>
+int main()
+{
+  std::cerr << "NOTICE: This test requires G++ >= 4.4, and will not be compiled." << std::endl;
+}
+
+#else
+
+#include <CGAL/Epick_d.h>
+#include <CGAL/point_generators_d.h>
+#include <CGAL/Triangulation.h>
+#include <CGAL/algorithm.h>
+#include <CGAL/assertions.h>
+
+#include <iostream>
+#include <iterator>
+#include <vector>
+
+typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag >  K;
+typedef CGAL::Triangulation<K>                        Triangulation;
+
+int main()
+{
+    const int D = 5;   // we work in Euclidean 5-space
+    const int N = 100; // we will insert 100 points
+    // - - - - - - - - - - - - - - - - - - - - - - - - STEP 1
+    CGAL::Random_points_in_cube_d<Triangulation::Point> rand_it(D, 1.0);
+    std::vector<Triangulation::Point> points;
+    CGAL::cpp11::copy_n(rand_it, N, std::back_inserter(points));
+
+    Triangulation t(D);                      // create triangulation
+    CGAL_assertion(t.empty());
+    t.insert(points.begin(), points.end());  // compute triangulation
+    CGAL_assertion( t.is_valid() );
+    // - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
+    typedef Triangulation::Face Face;
+    typedef std::vector<Face> Faces;
+    Faces edges;
+    std::back_insert_iterator<Faces> out(edges);
+    t.tds().incident_faces(t.infinite_vertex(), 1, out);  
+    // collect faces of dimension 1 (edges) incident to the infinite vertex
+    std::cout << "There are " << edges.size() 
+              << " vertices on the convex hull." << std::endl;
+
+#include "triangulation1.cpp" // See below
+#include "triangulation2.cpp"
+
+    return 0;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation1.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation/triangulation1.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation/triangulation1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation/triangulation2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation/triangulation2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation_data_structure_dynamic.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation_data_structure_dynamic.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation/triangulation_data_structure_dynamic.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation/triangulation_data_structure_dynamic.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation/triangulation_data_structure_static.cpp b/3rdparty/CGAL-4.8/examples/Triangulation/triangulation_data_structure_static.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation/triangulation_data_structure_static.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation/triangulation_data_structure_static.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Triangulation_2/CMakeLists.txt
new file mode 100644
index 0000000..8a225d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation_2/CMakeLists.txt
@@ -0,0 +1,43 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Triangulation_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "adding_handles.cpp" )
+  create_single_source_cgal_program( "colored_face.cpp" )
+  create_single_source_cgal_program( "constrained.cpp" )
+  create_single_source_cgal_program( "constrained_hierarchy_plus.cpp" )
+  create_single_source_cgal_program( "constrained_plus.cpp" )
+  create_single_source_cgal_program( "copy_triangulation_2.cpp" )
+  create_single_source_cgal_program( "hierarchy.cpp" )
+  create_single_source_cgal_program( "info_insert_with_pair_iterator_2.cpp" )
+  create_single_source_cgal_program( "info_insert_with_pair_iterator_regular_2.cpp" )
+  create_single_source_cgal_program( "info_insert_with_transform_iterator_2.cpp" )
+  create_single_source_cgal_program( "info_insert_with_zip_iterator_2.cpp" )
+  create_single_source_cgal_program( "polygon_triangulation.cpp" )
+  create_single_source_cgal_program( "polylines_triangulation.cpp" )
+  create_single_source_cgal_program( "print_cropped_voronoi.cpp" )
+  create_single_source_cgal_program( "regular.cpp" )
+  create_single_source_cgal_program( "terrain.cpp" )
+  create_single_source_cgal_program( "triangulation_prog1.cpp" )
+  create_single_source_cgal_program( "voronoi.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/README b/3rdparty/CGAL-4.8/examples/Triangulation_2/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/README
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/README
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/adding_handles.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/adding_handles.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/adding_handles.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/adding_handles.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/colored_face.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/colored_face.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/colored_face.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/colored_face.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/constrained.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/constrained.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/constrained.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/constrained.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/constrained_hierarchy_plus.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/constrained_hierarchy_plus.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/constrained_hierarchy_plus.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/constrained_hierarchy_plus.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/constrained_plus.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/constrained_plus.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/constrained_plus.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/constrained_plus.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/copy_triangulation_2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/copy_triangulation_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/copy_triangulation_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/copy_triangulation_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/data/constrained.cin b/3rdparty/CGAL-4.8/examples/Triangulation_2/data/constrained.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/data/constrained.cin
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/data/constrained.cin
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/data/regular.cin b/3rdparty/CGAL-4.8/examples/Triangulation_2/data/regular.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/data/regular.cin
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/data/regular.cin
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/data/terrain.cin b/3rdparty/CGAL-4.8/examples/Triangulation_2/data/terrain.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/data/terrain.cin
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/data/terrain.cin
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/data/triangulation_prog1.cin b/3rdparty/CGAL-4.8/examples/Triangulation_2/data/triangulation_prog1.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/data/triangulation_prog1.cin
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/data/triangulation_prog1.cin
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/data/voronoi.cin b/3rdparty/CGAL-4.8/examples/Triangulation_2/data/voronoi.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/data/voronoi.cin
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/data/voronoi.cin
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/hierarchy.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/hierarchy.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/hierarchy.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/hierarchy.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_pair_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_pair_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_pair_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_pair_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_pair_iterator_regular_2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_pair_iterator_regular_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_pair_iterator_regular_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_pair_iterator_regular_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_transform_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_transform_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_transform_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_transform_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_zip_iterator_2.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_zip_iterator_2.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/info_insert_with_zip_iterator_2.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/info_insert_with_zip_iterator_2.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/polygon_triangulation.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/polygon_triangulation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/polygon_triangulation.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/polygon_triangulation.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/polylines_triangulation.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/polylines_triangulation.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/polylines_triangulation.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/polylines_triangulation.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/print_cropped_voronoi.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/print_cropped_voronoi.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/print_cropped_voronoi.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/print_cropped_voronoi.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/regular.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/regular.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/regular.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/regular.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/terrain.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/terrain.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/terrain.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/terrain.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/triangulation_prog1.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/triangulation_prog1.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/triangulation_prog1.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/triangulation_prog1.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_2/voronoi.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_2/voronoi.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_2/voronoi.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_2/voronoi.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation_3/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Triangulation_3/CMakeLists.txt
new file mode 100644
index 0000000..8f33ffa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation_3/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Triangulation_3_example )
+
+cmake_minimum_required(VERSION 2.8.11)
+
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+  
+  find_package( TBB QUIET )
+
+  if( TBB_FOUND )
+    include(${TBB_USE_FILE})
+    list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
+  endif()
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "adding_handles_3.cpp" )
+  create_single_source_cgal_program( "color.cpp" )
+  create_single_source_cgal_program( "copy_triangulation_3.cpp" )
+  create_single_source_cgal_program( "fast_location_3.cpp" )
+  create_single_source_cgal_program( "find_conflicts_3.cpp" )
+  create_single_source_cgal_program( "info_insert_with_pair_iterator.cpp" )
+  create_single_source_cgal_program( "info_insert_with_pair_iterator_regular.cpp" )
+  create_single_source_cgal_program( "info_insert_with_transform_iterator.cpp" )
+  create_single_source_cgal_program( "info_insert_with_zip_iterator.cpp" )
+  create_single_source_cgal_program( "parallel_insertion_and_removal_in_regular_3.cpp" )
+  create_single_source_cgal_program( "parallel_insertion_in_delaunay_3.cpp" )
+  create_single_source_cgal_program( "regular_3.cpp" )
+  create_single_source_cgal_program( "sequential_parallel.cpp" )
+  create_single_source_cgal_program( "simple_triangulation_3.cpp" )
+  create_single_source_cgal_program( "simplex.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/README b/3rdparty/CGAL-4.8/examples/Triangulation_3/README
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/README
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/README
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/adding_handles_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/adding_handles_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/adding_handles_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/adding_handles_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/color.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/color.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/color.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/color.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/copy_triangulation_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/copy_triangulation_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/copy_triangulation_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/copy_triangulation_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation_3/fast_location_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/fast_location_3.cpp
new file mode 100644
index 0000000..b6a8630
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation_3/fast_location_3.cpp
@@ -0,0 +1,35 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Random.h>
+
+#include <vector>
+#include <cassert>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
+typedef Delaunay::Point Point;
+
+int main()
+{
+  // generating points on a grid.
+  std::vector<Point> P;
+
+  for (int z=0 ; z<20 ; z++)
+    for (int y=0 ; y<20 ; y++)
+      for (int x=0 ; x<20 ; x++)
+	  P.push_back(Point(x,y,z));
+
+  // building their Delaunay triangulation.
+  Delaunay T(P.begin(), P.end());
+
+  assert( T.number_of_vertices() == 8000 );
+
+  // performing nearest vertex queries to a series of random points,
+  // which is a case where the Fast_location policy is beneficial.
+  for (int i=0; i<10000; ++i)
+    T.nearest_vertex(Point(CGAL::get_default_random().get_double(0, 20),
+			   CGAL::get_default_random().get_double(0, 20),
+			   CGAL::get_default_random().get_double(0, 20)));
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/find_conflicts_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/find_conflicts_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/find_conflicts_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/find_conflicts_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_pair_iterator.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_pair_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_pair_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_pair_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_pair_iterator_regular.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_pair_iterator_regular.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_pair_iterator_regular.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_pair_iterator_regular.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_transform_iterator.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_transform_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_transform_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_transform_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_zip_iterator.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_zip_iterator.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/info_insert_with_zip_iterator.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/info_insert_with_zip_iterator.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/parallel_insertion_in_delaunay_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/parallel_insertion_in_delaunay_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/parallel_insertion_in_delaunay_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/parallel_insertion_in_delaunay_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/regular_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/regular_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/regular_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/regular_3.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Triangulation_3/sequential_parallel.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/sequential_parallel.cpp
new file mode 100644
index 0000000..0215718
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Triangulation_3/sequential_parallel.cpp
@@ -0,0 +1,56 @@
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Real_timer.h>
+
+#include <iostream>
+#include <fstream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+typedef K::Point_3          Point;
+
+const int NUM_INSERTED_POINTS = 10000;
+
+int main()
+{
+  CGAL::Random_points_in_cube_3<Point> rnd(1.);
+
+  std::cerr << "Construction of a 3D Delaunay triangulation from a vector of " 
+            << NUM_INSERTED_POINTS << " random points in a cube" << std::endl;
+  std::vector<Point> V;
+  V.reserve(NUM_INSERTED_POINTS);
+  for (int i = 0; i != NUM_INSERTED_POINTS; ++i)
+    V.push_back(*rnd++);
+  
+  // Sequential Delaunay T3
+  typedef CGAL::Delaunay_triangulation_3<K> SequentialTriangulation;
+
+  CGAL::Real_timer t;
+  t.start();
+  SequentialTriangulation S(V.begin(), V.end());
+  t.stop();
+  std::cerr << "Sequential construction takes " << t.time() << " sec." << std::endl;
+  
+// Parallel Delaunay T3
+#ifdef CGAL_LINKED_WITH_TBB
+  typedef CGAL::Triangulation_data_structure_3< 
+    CGAL::Triangulation_vertex_base_3<K>, 
+    CGAL::Triangulation_cell_base_3<K>, 
+    CGAL::Parallel_tag>                          ParallelTds;
+  typedef CGAL::Delaunay_triangulation_3<K, ParallelTds> ParallelTriangulation;
+
+  t.reset();
+  t.start();
+  // Construct the locking data-structure, using the bounding-box of the points
+  ParallelTriangulation::Lock_data_structure locking_ds(
+    CGAL::Bbox_3(-1., -1., -1., 1., 1., 1.), 50);
+  // Construct the triangulation in parallel
+  ParallelTriangulation T(V.begin(), V.end(), &locking_ds);
+  t.stop();
+  std::cerr << "Parallel construction takes " << t.time() << " sec. with "
+            << tbb::task_scheduler_init::default_num_threads() << " threads" << std::endl;
+#endif
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/simple_triangulation_3.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/simple_triangulation_3.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/simple_triangulation_3.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/simple_triangulation_3.cpp
diff --git a/3rdparty/CGAL-4.6/examples/Triangulation_3/simplex.cpp b/3rdparty/CGAL-4.8/examples/Triangulation_3/simplex.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Triangulation_3/simplex.cpp
rename to 3rdparty/CGAL-4.8/examples/Triangulation_3/simplex.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Visibility_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Visibility_2/CMakeLists.txt
new file mode 100644
index 0000000..7625f49
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Visibility_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Visibility_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "general_polygon_example.cpp" )
+  create_single_source_cgal_program( "simple_polygon_visibility_2.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.8/examples/Visibility_2/general_polygon_example.cpp b/3rdparty/CGAL-4.8/examples/Visibility_2/general_polygon_example.cpp
new file mode 100644
index 0000000..d1e231a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Visibility_2/general_polygon_example.cpp
@@ -0,0 +1,67 @@
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Triangular_expansion_visibility_2.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <iostream>
+#include <vector>
+
+// Define the used kernel and arrangement  
+typedef CGAL::Exact_predicates_exact_constructions_kernel       Kernel;
+typedef Kernel::Point_2                                         Point_2;
+typedef Kernel::Segment_2                                       Segment_2;
+typedef CGAL::Arr_segment_traits_2<Kernel>                      Traits_2;
+typedef CGAL::Arrangement_2<Traits_2>                           Arrangement_2;
+typedef Arrangement_2::Halfedge_const_handle                    Halfedge_const_handle;
+typedef Arrangement_2::Face_handle                              Face_handle;
+
+// Define the used visibility class 
+typedef CGAL::Triangular_expansion_visibility_2<Arrangement_2>  TEV;
+
+int main() {
+  // Defining the input geometry 
+  Point_2 p1(1,2), p2(12, 3), p3(19,-2), p4(12,6), p5(14,14), p6( 9,5);
+  Point_2 h1(8,3), h2(10, 3), h3( 8, 4), h4(10,6), h5(11, 6), h6(11,7);
+  std::vector<Segment_2> segments;
+  segments.push_back(Segment_2(p1,p2));
+  segments.push_back(Segment_2(p2,p3));
+  segments.push_back(Segment_2(p3,p4));
+  segments.push_back(Segment_2(p4,p5));
+  segments.push_back(Segment_2(p5,p6));
+  segments.push_back(Segment_2(p6,p1));
+  
+  segments.push_back(Segment_2(h1,h2));
+  segments.push_back(Segment_2(h2,h3));
+  segments.push_back(Segment_2(h3,h1));
+  segments.push_back(Segment_2(h4,h5));
+  segments.push_back(Segment_2(h5,h6));
+  segments.push_back(Segment_2(h6,h4));
+  
+  // insert geometry into the arrangement 
+  Arrangement_2 env;
+  CGAL::insert_non_intersecting_curves(env,segments.begin(),segments.end());
+  
+  //Find the halfedge whose target is the query point.
+  //(usually you may know that already by other means)  
+  Point_2 query_point = p4;
+  Halfedge_const_handle he = env.halfedges_begin();
+  while (he->source()->point() != p3 || he->target()->point() != p4)
+    he++;
+  
+  //visibility query
+  Arrangement_2 output_arr;
+  TEV tev(env);
+  Face_handle fh = tev.compute_visibility(query_point, he, output_arr);
+  
+  //print out the visibility region.
+  std::cout << "Regularized visibility region of q has "
+            << output_arr.number_of_edges()
+            << " edges." << std::endl;
+  
+  std::cout << "Boundary edges of the visibility region:" << std::endl;
+  Arrangement_2::Ccb_halfedge_circulator curr = fh->outer_ccb();
+  std::cout << "[" << curr->source()->point() << " -> " << curr->target()->point() << "]" << std::endl;
+  while (++curr != fh->outer_ccb())
+    std::cout << "[" << curr->source()->point() << " -> " << curr->target()->point() << "]"<< std::endl;
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/examples/Visibility_2/simple_polygon_visibility_2.cpp b/3rdparty/CGAL-4.8/examples/Visibility_2/simple_polygon_visibility_2.cpp
new file mode 100644
index 0000000..e0aa3cf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Visibility_2/simple_polygon_visibility_2.cpp
@@ -0,0 +1,74 @@
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Simple_polygon_visibility_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_naive_point_location.h>
+#include <istream>
+#include <vector>
+
+typedef CGAL::Exact_predicates_exact_constructions_kernel               Kernel;
+typedef Kernel::Point_2                                                 Point_2;
+typedef Kernel::Segment_2                                               Segment_2;
+typedef CGAL::Arr_segment_traits_2<Kernel>                              Traits_2;
+typedef CGAL::Arrangement_2<Traits_2>                                   Arrangement_2;
+typedef Arrangement_2::Face_handle                                      Face_handle;
+typedef Arrangement_2::Edge_const_iterator                              Edge_const_iterator;
+typedef Arrangement_2::Ccb_halfedge_circulator                          Ccb_halfedge_circulator;
+
+
+int main() {
+  //create environment
+  Point_2 p1(0,4), p2(0,0), p3(3,2), p4(4,0), p5(4,4), p6(1,2);
+  std::vector<Segment_2> segments;
+  segments.push_back(Segment_2(p1, p2));
+  segments.push_back(Segment_2(p2, p3));
+  segments.push_back(Segment_2(p3, p4));
+  segments.push_back(Segment_2(p4, p5));
+  segments.push_back(Segment_2(p5, p6));
+  segments.push_back(Segment_2(p6, p1));
+
+  Arrangement_2 env;
+  CGAL::insert_non_intersecting_curves(env,segments.begin(),segments.end());
+
+  // find the face of the query point 
+  // (usually you may know that by other means)
+  Point_2 q(0.5, 2);
+  Arrangement_2::Face_const_handle * face;
+  CGAL::Arr_naive_point_location<Arrangement_2> pl(env);
+  CGAL::Arr_point_location_result<Arrangement_2>::Type obj = pl.locate(q);
+  // The query point locates in the interior of a face
+  face = boost::get<Arrangement_2::Face_const_handle> (&obj);
+  
+  // compute non regularized visibility area  
+  // Define visibiliy object type that computes non-regularized visibility area
+  typedef CGAL::Simple_polygon_visibility_2<Arrangement_2, CGAL::Tag_false> NSPV;
+  Arrangement_2 non_regular_output;
+  NSPV non_regular_visibility(env);
+
+  non_regular_visibility.compute_visibility(q, *face, non_regular_output);
+
+  std::cout << "Non-regularized visibility region of q has "
+            << non_regular_output.number_of_edges()
+            << " edges:" << std::endl;
+  for (Edge_const_iterator eit = non_regular_output.edges_begin(); eit != non_regular_output.edges_end(); ++eit)
+    std::cout << "[" << eit->source()->point() << " -> " << eit->target()->point() << "]" << std::endl;
+   
+
+  // compute non regularized visibility area 
+  // Define visibiliy object type that computes regularized visibility area
+  typedef CGAL::Simple_polygon_visibility_2<Arrangement_2, CGAL::Tag_true> RSPV;
+  Arrangement_2 regular_output;
+  RSPV regular_visibility(env);
+
+  regular_visibility.compute_visibility(q, *face, regular_output);
+
+  std::cout << "Regularized visibility region of q has "
+            << regular_output.number_of_edges()
+            << " edges:" << std::endl;
+  for (Edge_const_iterator eit = regular_output.edges_begin(); eit != regular_output.edges_end(); ++eit)
+    std::cout << "[" << eit->source()->point() << " -> " << eit->target()->point() << "]" << std::endl;
+  
+  return 0;
+}
+
diff --git a/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/CMakeLists.txt b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/CMakeLists.txt
new file mode 100644
index 0000000..7658da0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( Voronoi_diagram_2_example )
+
+cmake_minimum_required(VERSION 2.8.10)
+
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+  include_directories (BEFORE "../../include")
+
+  create_single_source_cgal_program( "vd_2_point_location.cpp" )
+  create_single_source_cgal_program( "vd_2_point_location_sdg_linf.cpp" )
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/1D.ag.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/1D.ag.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/1D.ag.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/1D.ag.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.ag.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.ag.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.ag.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.ag.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.dt.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.dt.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.dt.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.dt.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.svd.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.svd.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data1.svd.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data1.svd.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data2.ag.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data2.ag.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data2.ag.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data2.ag.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data3.ag.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data3.ag.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/data3.ag.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/data3.ag.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/degenerate.ag.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/degenerate.ag.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/degenerate.ag.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/degenerate.ag.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/queries1.dt.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/queries1.dt.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/queries1.dt.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/queries1.dt.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/queries1.svd.cin b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/queries1.svd.cin
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/data/queries1.svd.cin
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/data/queries1.svd.cin
diff --git a/3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/vd_2_point_location.cpp b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/vd_2_point_location.cpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/examples/Voronoi_diagram_2/vd_2_point_location.cpp
rename to 3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/vd_2_point_location.cpp
diff --git a/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp
new file mode 100644
index 0000000..3fa8850
--- /dev/null
+++ b/3rdparty/CGAL-4.8/examples/Voronoi_diagram_2/vd_2_point_location_sdg_linf.cpp
@@ -0,0 +1,90 @@
+// standard includes
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+// includes for defining the Voronoi diagram adaptor
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Voronoi_diagram_2.h>
+#include <CGAL/Segment_Delaunay_graph_adaptation_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_adaptation_policies_2.h>
+
+// typedefs for defining the adaptor
+typedef CGAL::Exact_predicates_inexact_constructions_kernel                  K;
+typedef CGAL::Segment_Delaunay_graph_Linf_filtered_traits_2<K>               Gt;
+typedef CGAL::Segment_Delaunay_graph_Linf_2<Gt>                              DT;
+typedef CGAL::Segment_Delaunay_graph_adaptation_traits_2<DT>                 AT;
+typedef CGAL::Segment_Delaunay_graph_degeneracy_removal_policy_2<DT>         AP;
+typedef CGAL::Voronoi_diagram_2<DT,AT,AP>                                    VD;
+
+// typedef for the result type of the point location
+typedef AT::Site_2                    Site_2;
+typedef AT::Point_2                   Point_2;
+
+typedef VD::Locate_result             Locate_result;
+typedef VD::Vertex_handle             Vertex_handle;
+typedef VD::Face_handle               Face_handle;
+typedef VD::Halfedge_handle           Halfedge_handle;
+typedef VD::Ccb_halfedge_circulator   Ccb_halfedge_circulator;
+
+void print_endpoint(Halfedge_handle e, bool is_src) {
+  std::cout << "\t";
+  if ( is_src ) {
+    if ( e->has_source() )  std::cout << e->source()->point() << std::endl;
+    else  std::cout << "point at infinity" << std::endl;
+  } else {
+    if ( e->has_target() )  std::cout << e->target()->point() << std::endl;
+    else  std::cout << "point at infinity" << std::endl;
+  }
+}
+
+int main()
+{
+  std::ifstream ifs("data/data1.svd.cin");
+  assert( ifs );
+
+  VD vd;
+
+  Site_2 t;
+  while ( ifs >> t ) { vd.insert(t); }
+  ifs.close();
+
+  assert( vd.is_valid() );
+
+  std::ifstream ifq("data/queries1.svd.cin");
+  assert( ifq );
+
+  Point_2 p;
+  while ( ifq >> p ) {
+    std::cout << "Query point (" << p.x() << "," << p.y()
+              << ") lies on a Voronoi " << std::flush;
+
+    Locate_result lr = vd.locate(p);
+    if ( Vertex_handle* v = boost::get<Vertex_handle>(&lr) ) {
+      std::cout << "vertex." << std::endl;
+      std::cout << "The Voronoi vertex is:" << std::endl;
+      std::cout << "\t" << (*v)->point() << std::endl;
+    } else if ( Halfedge_handle* e = boost::get<Halfedge_handle>(&lr) ) {
+      std::cout << "edge." << std::endl;
+      std::cout << "The source and target vertices "
+                << "of the Voronoi edge are:" << std::endl;
+      print_endpoint(*e, true);
+      print_endpoint(*e, false);
+    } else if ( Face_handle* f = boost::get<Face_handle>(&lr) ) {
+      std::cout << "face." << std::endl;
+      std::cout << "The vertices of the Voronoi face are"
+                << " (in counterclockwise order):" << std::endl;
+      Ccb_halfedge_circulator ec_start = (*f)->ccb();
+      Ccb_halfedge_circulator ec = ec_start;
+      do {
+        print_endpoint(ec, false);
+      } while ( ++ec != ec_start );
+    }
+    std::cout << std::endl;
+  }
+  ifq.close();
+
+  return 0;
+}
diff --git a/3rdparty/CGAL-4.8/include/CGAL/AABB_C3T3_triangle_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_C3T3_triangle_primitive.h
new file mode 100644
index 0000000..4608bb3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/AABB_C3T3_triangle_primitive.h
@@ -0,0 +1,115 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb, Pierre Alliez
+//
+
+#ifndef CGAL_AABB_C3T3_TRIANGLE_PRIMITIVE_H_
+#define CGAL_AABB_C3T3_TRIANGLE_PRIMITIVE_H_
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+    /// \ingroup PkgAABB_tree
+    /// Primitive type that wraps a facet handle of a C3T3,
+    /// which is used as id, and allows the construction of the datum on
+    /// the fly. Since only the facet handle is stored in this primitive,
+    /// the C3T3 from which the AABB tree is built should not be
+    /// deleted while the AABB tree is in use.
+    ///
+    /// \cgalModels `AABBPrimitive`
+    /// \tparam GeomTraits must provides a \c %Point_3
+    /// type, used as \c Point, and a \c %Triangle_3 type, used as \c
+    /// Datum and constructible from three arguments of type \c
+    /// Point.
+    /// \tparam  C3T3 must be a
+    /// \c CGAL::C3T3_3 whose points have type \c Point.
+    ///
+    /// \sa `AABBPrimitive`
+    /// \sa `AABB_C3T3_segment_primitive`
+    template<typename GeomTraits, typename C3T3>
+    class AABB_C3T3_triangle_primitive
+    {
+    public:
+        typedef typename GeomTraits::Point_3 Point;
+        /// \name Types
+        /// @{
+
+        /// Id type.
+        typedef typename C3T3::Facet Id;
+        /// Geometric data type.
+        typedef typename GeomTraits::Triangle_3 Datum;
+
+        /// @}
+
+        // Self
+        typedef AABB_C3T3_triangle_primitive<GeomTraits, C3T3> Self;
+
+        // Constructors
+        AABB_C3T3_triangle_primitive() {}
+        AABB_C3T3_triangle_primitive(const AABB_C3T3_triangle_primitive& primitive)
+        {
+            m_facet = primitive.id();
+        }
+        AABB_C3T3_triangle_primitive(const Id& handle)
+            : m_facet(handle)  { };
+        AABB_C3T3_triangle_primitive(const Id* ptr)
+            : m_facet(*ptr)  { };
+        template <class Iterator>
+        AABB_C3T3_triangle_primitive( Iterator it,
+                                            typename boost::enable_if<
+                                                       boost::is_same<Id,typename Iterator::value_type>
+                                            >::type* =0
+        ) : m_facet(*it)  { }
+
+
+        // Default destructor, copy constructor and assignment operator are ok
+
+        // Returns by constructing on the fly the geometric datum wrapped by the primitive
+        Datum datum() const
+        {
+          int i = m_facet.second;
+          const Point& a = m_facet.first->vertex((i+1) &3)->point();
+          const Point& b = m_facet.first->vertex((i+2) &3)->point();
+          const Point& c = m_facet.first->vertex((i+3) &3)->point();
+          
+          return Datum(a,b,c);
+        }
+
+        // Returns a point on the primitive
+        Point reference_point() const
+        {
+          return  m_facet.first->vertex((m_facet.second +1) &3)->point();
+        }
+
+        // Returns the identifier
+        const Id& id() const { return m_facet; }
+        Id& id() { return m_facet; }
+
+    private:
+        /// The id, here a C3T3 facet handle
+        Id m_facet;
+    };  // end class AABB_C3T3_triangle_primitive
+
+
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_AABB_C3T3_TRIANGLE_PRIMITIVE_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_face_graph_triangle_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_face_graph_triangle_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_face_graph_triangle_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_face_graph_triangle_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_halfedge_graph_segment_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_halfedge_graph_segment_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_halfedge_graph_segment_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_intersections.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_intersections.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_intersections.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_intersections.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedral_oracle.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedral_oracle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedral_oracle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedral_oracle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedron_segment_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedron_segment_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedron_segment_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedron_segment_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedron_triangle_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedron_triangle_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_polyhedron_triangle_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_polyhedron_triangle_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_segment_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_segment_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_segment_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_segment_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_traits.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/AABB_tree.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_tree.h
new file mode 100644
index 0000000..d605c02
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/AABB_tree.h
@@ -0,0 +1,1239 @@
+// Copyright (c) 2008,2011  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb
+
+#ifndef CGAL_AABB_TREE_H
+#define CGAL_AABB_TREE_H
+
+#include <vector>
+#include <iterator>
+#include <CGAL/internal/AABB_tree/AABB_traversal_traits.h>
+#include <CGAL/internal/AABB_tree/AABB_node.h>
+#include <CGAL/internal/AABB_tree/AABB_search_tree.h>
+#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
+#include <CGAL/internal/AABB_tree/Primitive_helper.h>
+#include <boost/optional.hpp>
+
+#ifdef CGAL_HAS_THREADS
+#include <CGAL/mutex.h>
+#endif
+
+/// \file AABB_tree.h
+
+namespace CGAL {
+
+/// \addtogroup PkgAABB_tree
+/// @{
+
+	/**
+   * Class AABB_tree is a static data structure for efficient
+   * intersection and distance computations in 3D. It builds a
+   * hierarchy of axis-aligned bounding boxes (an AABB tree) from a set
+   * of 3D geometric objects, and can receive intersection and distance
+   * queries, provided that the corresponding predicates are
+   * implemented in the traits class AABBTraits.
+   * An instance of the class `AABBTraits` is internally stored.
+   *
+   * \sa `AABBTraits`
+   * \sa `AABBPrimitive`
+   *
+   */
+	template <typename AABBTraits>
+	class AABB_tree
+	{
+	private:
+		// internal KD-tree used to accelerate the distance queries
+		typedef AABB_search_tree<AABBTraits> Search_tree;
+
+		// type of the primitives container
+		typedef std::vector<typename AABBTraits::Primitive> Primitives;
+
+	public:
+    typedef AABBTraits AABB_traits;
+    
+    /// \name Types
+    ///@{
+
+    /// Number type returned by the distance queries.
+		typedef typename AABBTraits::FT FT;
+
+
+    /// Type of 3D point.
+		typedef typename AABBTraits::Point_3 Point;
+
+    /// Type of input primitive.
+		typedef typename AABBTraits::Primitive Primitive;
+		/// Identifier for a primitive in the tree.
+		typedef typename Primitive::Id Primitive_id;
+		/// Unsigned integral size type.
+		typedef typename Primitives::size_type size_type; 
+    /// Type of bounding box.
+		typedef typename AABBTraits::Bounding_box Bounding_box;
+    /// 
+		typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+    /// \deprecated 
+		typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+
+    /*!
+    An alias to `AABBTraits::Intersection_and_primitive_id<Query>`
+    */
+    #ifdef DOXYGEN_RUNNING
+    template<typename Query>
+    using Intersection_and_primitive_id = AABBTraits::Intersection_and_primitive_id<Query>;
+    #else
+    template<typename Query>
+    struct Intersection_and_primitive_id {
+      typedef typename AABBTraits::template Intersection_and_primitive_id<Query>::Type Type;
+    };
+    #endif
+
+    
+    ///@}
+
+	public:
+    /// \name Creation
+    ///@{
+
+    /// Constructs an empty tree, and initializes the internally stored traits
+    /// class using `traits`.
+    AABB_tree(const AABBTraits& traits = AABBTraits());
+
+    /**
+     * @brief Builds the datastructure from a sequence of primitives.
+     * @param first iterator over first primitive to insert
+     * @param beyond past-the-end iterator
+     *
+     * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`.
+     * For compilers that do not support variadic templates, overloads up to 
+     * 5 template arguments are provided.
+     * The tree stays empty if the memory allocation is not successful.
+     */
+    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+		template<typename InputIterator,typename ... T>
+		AABB_tree(InputIterator first, InputIterator beyond,T&& ...);  
+    #else
+		template<typename InputIterator>
+		AABB_tree(InputIterator first, InputIterator beyond);
+    template<typename InputIterator, typename T1>
+		AABB_tree(InputIterator first, InputIterator beyond, T1&);
+    template<typename InputIterator, typename T1, typename T2>
+    AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&);
+    template<typename InputIterator, typename T1, typename T2, typename T3>
+		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
+		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
+    #endif
+
+    ///@}
+
+		/// \name Operations
+		///@{
+
+    /// Equivalent to calling `clear()` and then `insert(first,last,t...)`.
+    /// For compilers that do not support variadic templates, overloads up
+    /// to 5 template arguments are provided.
+    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+		template<typename ConstPrimitiveIterator,typename ... T>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...);
+    #else
+		template<typename ConstPrimitiveIterator>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond);
+    template<typename ConstPrimitiveIterator, typename T1>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond, T1&);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&,T5&);
+    #endif
+
+
+    /// Add a sequence of primitives to the set of primitives of the AABB tree.
+    /// `%InputIterator` is any iterator and the parameter pack `T` are any types
+    /// such that `Primitive` has a constructor with the following signature:
+    /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept
+    /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)`
+    /// is made using the internally stored traits.
+    /// For compilers that do not support variadic templates,
+    /// overloads up to 5 template arguments are provided.
+    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+		template<typename InputIterator,typename ... T>
+		void insert(InputIterator first, InputIterator beyond,T&& ...);
+    #else
+		template<typename InputIterator>
+		void insert(InputIterator first, InputIterator beyond);
+    template<typename InputIterator, typename T1>
+		void insert(InputIterator first, InputIterator beyond,T1&);
+    template<typename InputIterator, typename T1, typename T2>
+		void insert(InputIterator first, InputIterator beyond,T1&, T2&);
+    template<typename InputIterator, typename T1, typename T2, typename T3>
+		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
+		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
+    #endif
+
+    /// Adds a primitive to the set of primitives of the tree.
+    inline void insert(const Primitive& p);
+
+		/// Clears and destroys the tree.
+		~AABB_tree()
+		{
+			clear();
+		}
+    /// Returns a const reference to the internally stored traits class.
+    const AABBTraits& traits() const{
+      return m_traits; 
+    }
+    
+		/// Clears the tree.
+		void clear()
+		{
+			// clear AABB tree
+      clear_nodes();
+			m_primitives.clear();
+			clear_search_tree();
+		}
+
+		/// Returns the axis-aligned bounding box of the whole tree.
+		/// \pre `!empty()`
+		const Bounding_box bbox() const { 
+			CGAL_precondition(!empty());
+			if(size() > 1)
+				return root_node()->bbox(); 
+			else
+				return AABB_traits().compute_bbox_object()(m_primitives.begin(), 
+																									 m_primitives.end());
+		}
+    
+    /// Returns the number of primitives in the tree.
+		size_type size() const { return m_primitives.size(); }
+    
+    /// Returns \c true, iff the tree contains no primitive.
+		bool empty() const { return m_primitives.empty(); }
+		///@}
+
+    /// \name Advanced
+    ///@{
+
+    /// After one or more calls to `AABB_tree::insert()` the internal data
+    /// structure of the tree must be reconstructed. This procedure
+    /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of
+    /// primitives of the tree.  This procedure is called implicitly
+    /// at the first call to a query member function. You can call
+    /// AABB_tree::build() explicitly to ensure that the next call to
+    /// query functions will not trigger the reconstruction of the
+    /// data structure.
+    void build();
+
+    ///@}
+
+private:
+    #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+    template <typename ... T>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T ... ){}
+    template <typename ... T>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T&& ... t)
+    {m_traits.set_shared_data(std::forward<T>(t)...);}
+
+    template <typename ... T>
+    void set_shared_data(T&& ...t){
+      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),std::forward<T>(t)...);
+    }
+    #else
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>){}
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>)
+    {m_traits.set_shared_data();}
+    void set_shared_data(){
+      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>());
+    }
+    
+    template <typename T1>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1){}
+    template <typename T1>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1)
+    {m_traits.set_shared_data(t1);}
+    template <typename T1>
+    void set_shared_data(T1& t1){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1);
+    }
+    
+    template <typename T1, typename T2>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2){}
+    template <typename T1, typename T2>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2)
+    {m_traits.set_shared_data(t1,t2);}
+    template <typename T1, typename T2>
+    void set_shared_data(const T1& t1,const T2& t2){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2);
+    }
+    
+    template <typename T1, typename T2, typename T3>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3){}
+    template <typename T1, typename T2, typename T3>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3)
+    {m_traits.set_shared_data(t1,t2,t3);}
+    template <typename T1, typename T2, typename T3>
+    void set_shared_data(T1& t1,T2& t2,T3& t3){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3);
+    }
+    
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4){}
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4)
+    {m_traits.set_shared_data(t1,t2,t3,t4);}
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4);
+    }
+    
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4,T5){}
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
+    {m_traits.set_shared_data(t1,t2,t3,t4,t5);}
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4,t5);
+    }
+    #endif
+
+		template<typename ConstPointIterator>
+		bool accelerate_distance_queries_impl(ConstPointIterator first,
+                                          ConstPointIterator beyond) const;
+public:
+
+    /// \name Intersection Tests
+    ///@{
+
+		/// Returns `true`, iff the query intersects at least one of
+		/// the input primitives. \tparam Query must be a type for
+		/// which `do_intersect` predicates are
+		/// defined in the traits class `AABBTraits`.
+		template<typename Query>
+		bool do_intersect(const Query& query) const;
+
+    /// Returns the number of primitives intersected by the
+    /// query. \tparam Query must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template<typename Query>
+		size_type number_of_intersected_primitives(const Query& query) const;
+
+    /// Outputs to the iterator the list of all intersected primitives
+    /// ids. This function does not compute the intersection points
+    /// and is hence faster than the function `all_intersections()`
+    /// function below. \tparam Query must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template<typename Query, typename OutputIterator>
+		OutputIterator all_intersected_primitives(const Query& query, OutputIterator out) const;
+
+
+    /// Returns the first encountered intersected primitive id, iff
+    /// the query intersects at least one of the input primitives. No
+    /// particular order is guaranteed over the tree traversal, such
+    /// that, e.g, the primitive returned is not necessarily the
+    /// closest from the source point of a ray query. \tparam Query
+    /// must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template <typename Query>
+		boost::optional<Primitive_id> any_intersected_primitive(const Query& query) const;
+    
+    ///@}
+
+    /// \name Intersections
+    ///@{
+
+    /// Outputs the list of all intersections, as objects of
+    /// `Intersection_and_primitive_id<Query>::%Type`,
+    /// between the query and the input data to
+    /// the iterator. `do_intersect()`
+    /// predicates and intersections must be defined for `Query`
+    /// in the `AABBTraits` class.
+		template<typename Query, typename OutputIterator>
+		OutputIterator all_intersections(const Query& query, OutputIterator out) const;
+
+
+    /// Returns the first encountered intersection. No particular
+    /// order is guaranteed over the tree traversal, e.g, the
+    /// primitive returned is not necessarily the closest from the
+    /// source point of a ray query. Type `Query` must be a type
+    /// for which `do_intersect` predicates
+    /// and intersections are defined in the traits class AABBTraits.
+		template <typename Query>
+    #if CGAL_INTERSECTION_VERSION < 2 && !defined(DOXYGEN_RUNNING)
+		boost::optional<Object_and_primitive_id> 
+    #else
+    boost::optional< typename Intersection_and_primitive_id<Query>::Type >
+    #endif
+    any_intersection(const Query& query) const;
+
+    ///@}
+
+    /// \name Distance Queries
+    ///@{
+
+    /// Returns the minimum squared distance between the query point
+    /// and all input primitives. Method
+    /// `accelerate_distance_queries()` should be called before the
+    /// first distance query, so that an internal secondary search
+    /// structure is build, for improving performance.
+		/// \pre `!empty()`
+		FT squared_distance(const Point& query) const;
+
+    /// Returns the point in the union of all input primitives which
+    /// is closest to the query. In case there are several closest
+    /// points, one arbitrarily chosen closest point is
+    /// returned. Method `accelerate_distance_queries()` should be
+    /// called before the first distance query, so that an internal
+    /// secondary search structure is build, for improving
+    /// performance.
+		/// \pre `!empty()`
+		Point closest_point(const Point& query) const;
+
+    
+    /// Returns a `Point_and_primitive_id` which realizes the
+    /// smallest distance between the query point and all input
+    /// primitives. Method `accelerate_distance_queries()` should be
+    /// called before the first distance query, so that an internal
+    /// secondary search structure is build, for improving
+    /// performance.
+		/// \pre `!empty()`
+		Point_and_primitive_id closest_point_and_primitive(const Point& query) const;
+
+
+    ///@}
+
+    /// \name Accelerating the Distance Queries
+    /// 
+    /// In the following paragraphs, we discuss details of the
+    /// implementation of the distance queries. We explain the
+    /// internal use of hints, how the user can pass his own hints to
+    /// the tree, and how the user can influence the construction of
+    /// the secondary data structure used for accelerating distance
+    /// queries.
+    /// Internally, the distance queries algorithms are initialized
+    /// with some hint, which has the same type as the return type of
+    /// the query, and this value is refined along a traversal of the
+    /// tree, until it is optimal, that is to say until it realizes
+    /// the shortest distance to the primitives. In particular, the
+    /// exact specification of these internal algorithms is that they
+    /// minimize the distance to the object composed of the union of
+    /// the primitives and the hint.
+    /// It follows that 
+    /// - in order to return the exact distance to the set of
+    /// primitives, the algorithms need the hint to be exactly on the
+    /// primitives;
+    /// - if this is not the case, and if the hint happens to be closer
+    /// to the query point than any of the primitives, then the hint
+    /// is returned.
+    ///
+    /// This second observation is reasonable, in the sense that
+    /// providing a hint to the algorithm means claiming that this
+    /// hint belongs to the union of the primitives. These
+    /// considerations about the hints being exactly on the primitives
+    /// or not are important: in the case where the set of primitives
+    /// is a triangle soup, and if some of the primitives are large,
+    /// one may want to provide a much better hint than a vertex of
+    /// the triangle soup could be. It could be, for example, the
+    /// barycenter of one of the triangles. But, except with the use
+    /// of an exact constructions kernel, one cannot easily construct
+    /// points other than the vertices, that lie exactly on a triangle
+    /// soup. Hence, providing a good hint sometimes means not being
+    /// able to provide it exactly on the primitives. In rare
+    /// occasions, this hint can be returned as the closest point.
+    /// In order to accelerate distance queries significantly, the
+    /// AABB tree builds an internal KD-tree containing a set of
+    /// potential hints, when the method
+    /// `accelerate_distance_queries()` is called. This KD-tree
+    /// provides very good hints that allow the algorithms to run much
+    /// faster than with a default hint (such as the
+    /// `reference_point` of the first primitive). The set of
+    /// potential hints is a sampling of the union of the primitives,
+    /// which is obtained, by default, by calling the method
+    /// `reference_point` of each of the primitives. However, such
+    /// a sampling with one point per primitive may not be the most
+    /// relevant one: if some primitives are very large, it helps
+    /// inserting more than one sample on them. Conversely, a sparser
+    /// sampling with less than one point per input primitive is
+    /// relevant in some cases.
+    ///@{
+
+		/// Constructs internal search tree from
+		/// a point set taken on the internal primitives
+		/// returns `true` iff successful memory allocation
+		bool accelerate_distance_queries() const;
+
+    /// Constructs an internal KD-tree containing the specified point
+    /// set, to be used as the set of potential hints for accelerating
+    /// the distance queries. 
+		/// \tparam ConstPointIterator is an iterator with
+    /// value type `Point_and_primitive_id`.
+		template<typename ConstPointIterator>
+		bool accelerate_distance_queries(ConstPointIterator first,
+                                     ConstPointIterator beyond) const
+    {
+      #ifdef CGAL_HAS_THREADS
+      //this ensures that this is done once at a time
+      CGAL_SCOPED_LOCK(kd_tree_mutex);
+      #endif
+      clear_search_tree();
+      return accelerate_distance_queries_impl(first,beyond);
+      
+    }
+    
+    /// Returns the minimum squared distance between the query point
+    /// and all input primitives. The internal KD-tree is not used.
+		/// \pre `!empty()`
+		FT squared_distance(const Point& query, const Point& hint) const;
+
+    /// Returns the point in the union of all input primitives which
+    /// is closest to the query. In case there are several closest
+    /// points, one arbitrarily chosen closest point is returned. The
+    /// internal KD-tree is not used.
+		/// \pre `!empty()`
+		Point closest_point(const Point& query, const Point& hint) const;
+    
+    /// Returns a `Point_and_primitive_id` which realizes the
+    /// smallest distance between the query point and all input
+    /// primitives. The internal KD-tree is not used.
+		/// \pre `!empty()`
+		Point_and_primitive_id closest_point_and_primitive(const Point& query, const Point_and_primitive_id& hint) const;
+
+    ///@}
+
+	private:
+    // clear nodes
+    void clear_nodes()
+    {
+			if( size() > 1 ) {
+				delete [] m_p_root_node;
+			}
+			m_p_root_node = NULL;
+    }
+
+		// clears internal KD tree
+		void clear_search_tree() const
+		{
+			if ( m_search_tree_constructed )
+			{
+				CGAL_assertion( m_p_search_tree!=NULL );
+				delete m_p_search_tree;
+				m_p_search_tree = NULL;
+				m_search_tree_constructed = false;
+				m_default_search_tree_constructed = false;
+                        }
+		}
+
+	public:
+
+    /// \internal
+		template <class Query, class Traversal_traits>
+		void traversal(const Query& query, Traversal_traits& traits) const
+		{
+			switch(size())
+			{
+			case 0:
+				break;
+			case 1:
+				traits.intersection(query, singleton_data());
+				break;
+			default: // if(size() >= 2)
+				root_node()->template traversal<Traversal_traits,Query>(query, traits, m_primitives.size());
+			}
+		}
+
+	private:
+		typedef AABB_node<AABBTraits> Node;
+
+
+	public:
+		// returns a point which must be on one primitive
+		Point_and_primitive_id any_reference_point_and_id() const
+		{
+			CGAL_assertion(!empty());
+			return Point_and_primitive_id(
+        internal::Primitive_helper<AABB_traits>::get_reference_point(m_primitives[0],m_traits), m_primitives[0].id()
+      );
+		}
+
+	public:
+		Point_and_primitive_id best_hint(const Point& query) const
+		{
+			if(m_search_tree_constructed)
+				return m_p_search_tree->closest_point(query);
+			else
+				return this->any_reference_point_and_id();
+		}
+
+	private:
+    //Traits class
+    AABBTraits m_traits;
+		// set of input primitives
+		Primitives m_primitives;
+		// single root node
+		Node* m_p_root_node;
+    #ifdef CGAL_HAS_THREADS
+    mutable CGAL_MUTEX internal_tree_mutex;//mutex used to protect const calls inducing build()
+    mutable CGAL_MUTEX kd_tree_mutex;//mutex used to protect calls to accelerate_distance_queries
+    #endif
+  
+    const Node* root_node() const {
+			CGAL_assertion(size() > 1);
+      if(m_need_build){
+        #ifdef CGAL_HAS_THREADS
+        //this ensures that build() will be called once
+        CGAL_SCOPED_LOCK(internal_tree_mutex);
+        if(m_need_build)
+        #endif
+          const_cast< AABB_tree<AABBTraits>* >(this)->build(); 
+      }
+      return m_p_root_node;
+    }
+
+		const Primitive& singleton_data() const {
+			CGAL_assertion(size() == 1);
+			return *m_primitives.begin();
+		}
+
+		// search KD-tree
+		mutable const Search_tree* m_p_search_tree;
+		mutable bool m_search_tree_constructed;
+    mutable bool m_default_search_tree_constructed;
+    bool m_need_build;
+
+	private:
+		// Disabled copy constructor & assignment operator
+		typedef AABB_tree<AABBTraits> Self;
+		AABB_tree(const Self& src);
+		Self& operator=(const Self& src);
+
+	};  // end class AABB_tree
+
+/// @}
+
+  template<typename Tr>
+  AABB_tree<Tr>::AABB_tree(const Tr& traits)
+    : m_traits(traits)
+    , m_primitives()
+    , m_p_root_node(NULL)
+    , m_p_search_tree(NULL)
+    , m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+  {}
+
+  #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) 
+ 	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T&& ... t)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,std::forward<T>(t)...);
+ 	}
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T&& ... t)
+	{
+    set_shared_data(std::forward<T>(t)...);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,std::forward<T>(t)...));
+			++first;
+		}
+    m_need_build = true;
+  }
+  
+  // Clears tree and insert a set of primitives
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T&& ... t)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,std::forward<T>(t)...);
+
+    build();
+	}  
+  #else
+  //=============constructor======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1& t1)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1& t1,T2& t2)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1& t1,T2& t2,T3& t3)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1& t1,T2& t2,T3& t3,T4& t4)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3,t4);
+ 	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3,t4,t5);
+ 	}
+  //=============insert======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond)
+	{
+    set_shared_data();
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1& t1)
+	{
+    set_shared_data(t1);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1));
+			++first;
+		}
+    m_need_build = true;
+  }
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1& t1, T2& t2)
+	{
+    set_shared_data(t1,t2);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1& t1,T2& t2,T3& t3)
+	{
+    set_shared_data(t1,t2,t3);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1& t1,T2& t2,T3& t3,T4& t4)
+	{
+    set_shared_data(t1,t2,t3,t4);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3,t4));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
+	{
+    set_shared_data(t1,t2,t3,t4,t5);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  //=============rebuild======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond);
+
+    build();
+	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1& t1)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1);
+
+    build();
+	}
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1& t1, T2& t2)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1& t1,T2& t2,T3& t3)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1& t1,T2& t2,T3& t3,T4& t4)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3,t4);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3,t4,t5);
+
+    build();
+	}
+  #endif
+
+	template<typename Tr>
+	void AABB_tree<Tr>::insert(const Primitive& p)
+	{
+    m_primitives.push_back(p);
+    m_need_build = true;
+  }
+
+	// Build the data structure, after calls to insert(..)
+	template<typename Tr>
+	void AABB_tree<Tr>::build()
+	{
+    clear_nodes();
+
+    if(m_primitives.size() > 1) {
+
+			// allocates tree nodes
+			m_p_root_node = new Node[m_primitives.size()-1]();
+			if(m_p_root_node == NULL)
+			{
+				std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
+				CGAL_assertion(m_p_root_node != NULL);
+				m_primitives.clear();
+				clear();
+			}
+
+			// constructs the tree
+			m_p_root_node->expand(m_primitives.begin(), m_primitives.end(),
+														m_primitives.size(), m_traits);
+		}
+
+    // In case the users has switched on the accelerated distance query
+    // data structure with the default arguments, then it has to be
+    // rebuilt.
+    if(m_default_search_tree_constructed)
+      accelerate_distance_queries();
+
+    m_need_build = false;    
+	}
+
+
+	// constructs the search KD tree from given points
+	// to accelerate the distance queries
+	template<typename Tr>
+	template<typename ConstPointIterator>
+	bool AABB_tree<Tr>::accelerate_distance_queries_impl(ConstPointIterator first,
+		ConstPointIterator beyond) const
+	{
+		m_p_search_tree = new Search_tree(first, beyond);
+		if(m_p_search_tree != NULL)
+		{
+			m_search_tree_constructed = true;
+			return true;
+		}
+		else
+    {
+			std::cerr << "Unable to allocate memory for accelerating distance queries" << std::endl;
+			return false;
+    }
+	}
+
+	// constructs the search KD tree from internal primitives
+	template<typename Tr>
+	bool AABB_tree<Tr>::accelerate_distance_queries() const
+	{
+		if(m_primitives.empty()) return true;
+    #ifdef CGAL_HAS_THREADS
+    //this ensures that this function will be done once
+    CGAL_SCOPED_LOCK(kd_tree_mutex);
+    #endif
+
+    //we only redo computation only if needed 
+    if (!m_need_build && m_default_search_tree_constructed)
+      return m_search_tree_constructed;
+    
+		// iterate over primitives to get reference points on them
+		std::vector<Point_and_primitive_id> points;
+		points.reserve(m_primitives.size());
+		typename Primitives::const_iterator it;
+		for(it = m_primitives.begin(); it != m_primitives.end(); ++it)
+			points.push_back(
+        Point_and_primitive_id(
+          internal::Primitive_helper<AABB_traits>::get_reference_point(*it,m_traits), it->id()
+        )
+      );
+
+    // clears current KD tree
+    clear_search_tree();
+    m_default_search_tree_constructed = true;
+		return accelerate_distance_queries_impl(points.begin(), points.end());
+	}
+
+	template<typename Tr>
+	template<typename Query>
+	bool
+		AABB_tree<Tr>::do_intersect(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		Do_intersect_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.is_intersection_found();
+	}
+
+	template<typename Tr>
+	template<typename Query>
+	typename AABB_tree<Tr>::size_type
+		AABB_tree<Tr>::number_of_intersected_primitives(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    using CGAL::internal::AABB_tree::Counting_output_iterator;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+    typedef Counting_output_iterator<Primitive_id, size_type> Counting_iterator;
+
+    size_type counter = 0;
+    Counting_iterator out(&counter);
+
+		Listing_primitive_traits<AABBTraits, 
+      Query, Counting_iterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return counter;
+	}
+
+	template<typename Tr>
+	template<typename Query, typename OutputIterator>
+	OutputIterator
+		AABB_tree<Tr>::all_intersected_primitives(const Query& query,
+		OutputIterator out) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		Listing_primitive_traits<AABBTraits, 
+      Query, OutputIterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return out;
+	}
+
+	template<typename Tr>
+	template<typename Query, typename OutputIterator>
+	OutputIterator
+		AABB_tree<Tr>::all_intersections(const Query& query,
+		OutputIterator out) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		Listing_intersection_traits<AABBTraits, 
+      Query, OutputIterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return out;
+	}
+
+
+	template <typename Tr>
+	template <typename Query>
+  #if CGAL_INTERSECTION_VERSION < 2
+	boost::optional<typename AABB_tree<Tr>::Object_and_primitive_id>
+  #else
+  boost::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type >
+  #endif
+		AABB_tree<Tr>::any_intersection(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		First_intersection_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.result();
+	}
+
+	template <typename Tr>
+	template <typename Query>
+	boost::optional<typename AABB_tree<Tr>::Primitive_id>
+		AABB_tree<Tr>::any_intersected_primitive(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		First_primitive_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.result();
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::Point
+		AABB_tree<Tr>::closest_point(const Point& query,
+		const Point& hint) const
+	{
+		CGAL_precondition(!empty());
+		typename Primitive::Id hint_primitive = m_primitives[0].id();
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		Projection_traits<AABBTraits> projection_traits(hint,hint_primitive,m_traits);
+		this->traversal(query, projection_traits);
+		return projection_traits.closest_point();
+	}
+
+	// closest point without hint, the search KD-tree is queried for the
+	// first closest neighbor point to get a hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::Point
+		AABB_tree<Tr>::closest_point(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		const Point_and_primitive_id hint = best_hint(query);
+		return closest_point(query,hint.first);
+	}
+
+	// squared distance with user-specified hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::FT
+		AABB_tree<Tr>::squared_distance(const Point& query,
+		const Point& hint) const
+	{
+		CGAL_precondition(!empty());
+		const Point closest = this->closest_point(query, hint);
+		return Tr().squared_distance_object()(query, closest);
+	}
+
+	// squared distance without user-specified hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::FT
+		AABB_tree<Tr>::squared_distance(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		const Point closest = this->closest_point(query);
+		return Tr().squared_distance_object()(query, closest);
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::Point_and_primitive_id
+		AABB_tree<Tr>::closest_point_and_primitive(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		return closest_point_and_primitive(query,best_hint(query));
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree<Tr>::Point_and_primitive_id
+		AABB_tree<Tr>::closest_point_and_primitive(const Point& query,
+		const Point_and_primitive_id& hint) const
+	{
+		CGAL_precondition(!empty());
+    using namespace CGAL::internal::AABB_tree;
+    typedef typename AABB_tree<Tr>::AABB_traits AABBTraits;
+		Projection_traits<AABBTraits> projection_traits(hint.first,hint.second,m_traits);
+		this->traversal(query, projection_traits);
+		return projection_traits.closest_point_and_primitive();
+	}
+
+} // end namespace CGAL
+
+#endif // CGAL_AABB_TREE_H
+
+/***EMACS SETTINGS**    */
+/* Local Variables:     */
+/* tab-width: 2         */
+/* indent-tabs-mode: t  */
+/* End:                 */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/AABB_triangle_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/AABB_triangle_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/AABB_triangle_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/AABB_triangle_primitive.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction.h b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction.h
new file mode 100644
index 0000000..77fd21e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction.h
@@ -0,0 +1,2638 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H
+#define CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H
+
+// In order to activate lazy evaluation:
+// #define LAZY
+
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Triangulation_data_structure_3.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Cartesian_converter.h>
+
+#include <cstdio>
+#include <cstring>
+#include <cassert>
+#include <vector>
+#include <list>
+#include <set>
+
+#include <CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h>
+#include <CGAL/Advancing_front_surface_reconstruction_cell_base_3.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/internal/AFSR/Surface_vertex_base_2.h>
+#include <CGAL/internal/AFSR/Surface_face_base_2.h>
+#include <CGAL/internal/AFSR/construct_surface_2.h>
+#include <CGAL/internal/AFSR/construct_polyhedron.h>
+#include <CGAL/internal/AFSR/write_triple_indices.h>
+
+namespace CGAL {
+
+  // This iterator allows to visit all contours. It has the particularity
+  // that it visits the entry point of the contour twice. This allows to
+  // detect that the traversal of the border is finished. One more increment
+  // brings us to the next vertex.
+
+
+
+  template < class Surface>
+  class Advancing_front_surface_reconstruction_boundary_iterator {
+  private:
+    Advancing_front_surface_reconstruction_boundary_iterator();
+
+    typedef typename Surface::Finite_vertices_iterator Finite_vertices_iterator;
+    typedef Advancing_front_surface_reconstruction_boundary_iterator<Surface>  Self;
+    typedef typename Surface::Vertex_handle            Vertex_handle;
+    typedef typename Surface::Vertex                   Vertex;
+
+    const Surface& S;
+    int mark;
+    Finite_vertices_iterator first_vertex;
+    Vertex_handle pos;
+    bool first, last;
+
+  public:
+    Advancing_front_surface_reconstruction_boundary_iterator(const Surface& S_, int m)
+      : S(S_), mark(m), first_vertex(S.triangulation_3().finite_vertices_begin()), pos(first_vertex)
+    {
+      if (pos->number_of_incident_border() <= 0){
+        advance_to_next_boundary();
+      }
+      first = true;
+      last = false;
+    }
+
+    Advancing_front_surface_reconstruction_boundary_iterator(const Surface& S_)
+      : S(S_), pos(NULL)
+    {}
+
+    Advancing_front_surface_reconstruction_boundary_iterator(const Self& s)
+      : S(s.S), mark(s.mark), first_vertex(s.first_vertex), pos(s.pos), first(s.first), last(s.last)
+    {}
+
+    bool operator==(const Self &s) const
+    {
+      return pos == s.pos;
+    }
+
+    bool operator!=(const Self &s) const
+    {
+      return pos != s.pos;
+    }
+
+
+    Self operator++()
+    {
+      if(pos == NULL) {
+        return *this;
+      }
+      if(first){
+        advance_on_boundary();
+        first = false;
+      } else if (last) {
+        advance_to_next_boundary();
+        first = true;
+        last = false;
+      } else {
+        advance_on_boundary();
+        if(&*pos == &*first_vertex){
+          last = true;
+        }
+      }
+      return *this;
+    }
+
+    Vertex_handle operator*()
+    {
+      return pos;
+    }
+
+    void advance_on_boundary()
+    {
+      if(pos == NULL) {
+        return;
+      }
+      pos = pos->first_incident()->first;
+      pos->set_post_mark(mark);
+    }
+
+    void advance_to_next_boundary()
+    {
+      if(pos == NULL) {
+        return;
+      }
+      do {
+        first_vertex++;
+      } while((first_vertex != S.triangulation_3().finite_vertices_end()) &&
+              (! ((first_vertex->is_on_border())
+                  && ! first_vertex->is_post_marked(mark))));
+      if(first_vertex != S.triangulation_3().finite_vertices_end()) {
+        pos = first_vertex;
+        pos->set_post_mark(mark);
+        CGAL_assertion(pos->is_on_border());
+
+      } else {
+        pos = NULL;
+      }
+    }
+  };
+
+  namespace AFSR{
+    struct Default_priority {
+      template <typename AdvancingFront, typename Cell_handle>
+      double operator() (const AdvancingFront& adv, Cell_handle& c,
+                         const int& index) const
+      {
+        return adv.smallest_radius_delaunay_sphere (c, index);
+      }
+    };
+  } //end of namespace AFSR
+
+
+  /*!
+  \ingroup PkgAdvancingFrontSurfaceReconstruction
+
+  The class `Advancing_front_surface_reconstruction` enables advanced users to provide the unstructured
+  point cloud in a 3D Delaunay triangulation. The reconstruction algorithm then marks vertices and faces
+  in the triangulation as being on the 2D surface embedded in 3D space, and constructs a 2D triangulation
+  data structure that describes the surface.  The vertices and facets of the 2D triangulation data structure
+  store handles to the vertices and faces of the 3D triangulation, which enables the user to explore the
+  2D as well as 3D neighborhood of vertices and facets of the surface.
+
+  \tparam Dt must be a `Delaunay_triangulation_3` with
+  `Advancing_front_surface_reconstruction_vertex_base_3` and `Advancing_front_surface_reconstruction_cell_base_3` blended into the vertex and cell type.
+  The default uses the `Exact_predicates_inexact_constructions_kernel` as geometric traits class.
+
+  \tparam P must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
+  priority of the facet `(Cell_handle,int)`. This functor enables the user to choose how candidate
+  triangles are prioritized. If a facet should not appear in the output,
+  `infinity()` must be returned. It defaults to a functor that returns the
+  `smallest_radius_delaunay_sphere()`.
+
+  */
+  template <
+    class Dt = Default,
+    class P = Default>
+  class Advancing_front_surface_reconstruction {
+
+    typedef typename Default::Get<Dt,Delaunay_triangulation_3<Exact_predicates_inexact_constructions_kernel, Triangulation_data_structure_3<Advancing_front_surface_reconstruction_vertex_base_3<Exact_predicates_inexact_constructions_kernel>, Advancing_front_surface_reconstruction_cell_base_3<Exact_predicates_inexact_constructions_kernel> > > >::type Triangulation;
+    typedef typename Default::Get<P,AFSR::Default_priority>::type Priority;
+  public:
+
+#ifdef DOXYGEN_RUNNING
+  /// \name Types
+  /// @{
+
+  /*!
+    The type of the 2D triangulation data structure describing the reconstructed surface, being a model of `TriangulationDataStructure_2`.
+    - The type `Triangulation_data_structure_2::Vertex` is model of the concept `TriangulationDataStructure_2::Vertex` and has additionally the
+    method `vertex_3()` that returns a `#Vertex_handle` to the associated 3D vertex.
+    - The type `Triangulation_data_structure_2::Face` is model of the concept `TriangulationDataStructure_2::Face` and  has additionally the
+    method `facet()` that returns the associated `#Facet`, and a method `bool is_on_surface()`
+    for testing if a face is part of the reconstructed surface or a face incident to a boundary edge.
+
+    In case the surface has boundaries, the 2D surface has one vertex which is associated to the infinite
+    vertex of the 3D triangulation.
+  */
+    typedef unspecified_type Triangulation_data_structure_2;
+
+  /*!
+  The type of the 3D triangulation.
+  */
+    typedef unspecified_type Triangulation_3;
+
+  /*!
+  The type of the facet priority functor.
+  */
+    typedef unspecified_type Priority;
+
+  /*!
+  The point type.
+  */
+    typedef typename Triangulation_3::Point Point;
+
+  /*!
+  The vertex handle type of the 3D triangulation.
+  */
+    typedef typename Triangulation_3::Vertex_handle Vertex_handle;
+
+  /*!
+  The cell handle type of the 3D triangulation.
+  */
+    typedef typename Triangulation_3::Cell_handle Cell_handle;
+
+  /*!
+  The facet type of the 3D triangulation.
+  */
+    typedef typename Triangulation_3::Facet Facet;
+
+  /*!
+    A bidirectional iterator range which enables to enumerate all points that were removed
+    from the 3D Delaunay triangulation during the surface reconstruction. The value type
+    of the iterator is `#Point`.
+  */
+    typedef unspecified_type Outlier_range;
+
+  /*!
+    A bidirectional iterator range which enables to visit all boundaries.
+    The value type of the iterator is `Vertex_on_boundary_range`.
+  */
+    typedef unspecified_type Boundary_range;
+
+ /*!
+    A bidirectional iterator range which enables to visit all vertices on a boundary.
+    The value type of the iterator is  `#Vertex_handle`
+  */
+    typedef unspecified_type Vertex_on_boundary_range;
+  /// @}
+#endif
+
+    typedef Triangulation Triangulation_3;
+    typedef typename Triangulation_3::Geom_traits Kernel;
+    typedef Advancing_front_surface_reconstruction<Dt,P> Extract;
+    typedef typename Triangulation_3::Geom_traits Geom_traits;
+
+    typedef typename Kernel::FT coord_type;
+
+    typedef typename Kernel::Point_3  Point;
+    typedef typename Kernel::Vector_3 Vector;
+    typedef typename Kernel::Segment_3  Segment;
+    typedef typename Kernel::Triangle_3  Triangle;
+    typedef typename Kernel::Sphere_3 Sphere;
+
+    typedef typename Triangulation_3::Cell  Cell;
+    typedef typename Triangulation_3::Vertex Vertex;
+    typedef typename Triangulation_3::Edge Edge;
+    typedef typename Triangulation_3::Facet Facet;
+    typedef typename Triangulation_3::Cell_handle  Cell_handle;
+    typedef typename Triangulation_3::Vertex_handle Vertex_handle;
+
+    typedef typename Triangulation_3::Cell_circulator  Cell_circulator;
+    typedef typename Triangulation_3::Facet_circulator Facet_circulator;
+
+    typedef typename Triangulation_3::Locate_type Locate_type;
+
+    typedef typename Triangulation_3::Finite_cells_iterator  Finite_cells_iterator;
+    typedef typename Triangulation_3::Finite_facets_iterator Finite_facets_iterator;
+    typedef typename Triangulation_3::Finite_vertices_iterator  Finite_vertices_iterator;
+    typedef typename Triangulation_3::Finite_edges_iterator  Finite_edges_iterator;
+
+    typedef typename Triangulation_3::All_cells_iterator  All_cells_iterator;
+    typedef typename Triangulation_3::All_facets_iterator All_facets_iterator;
+    typedef typename Triangulation_3::All_vertices_iterator  All_vertices_iterator;
+    typedef typename Triangulation_3::All_edges_iterator  All_edges_iterator;
+
+    typedef typename Triangulation_3::Vertex::Edge_incident_facet Edge_incident_facet;
+    typedef typename Triangulation_3::Vertex::IO_edge_type IO_edge_type;
+    typedef typename Triangulation_3::Vertex::criteria criteria;
+    typedef typename Triangulation_3::Vertex::Radius_edge_type Radius_edge_type;
+    typedef typename Triangulation_3::Vertex::Border_elt Border_elt;
+    typedef typename Triangulation_3::Vertex::Next_border_elt Next_border_elt;
+    typedef typename Triangulation_3::Vertex::Intern_successors_type Intern_successors_type;
+    typedef typename Triangulation_3::Vertex::Radius_ptr_type Radius_ptr_type;
+
+    typedef typename Triangulation_3::Vertex::Incidence_request_iterator Incidence_request_iterator;
+    typedef typename Triangulation_3::Vertex::Incidence_request_elt Incidence_request_elt;
+
+    typedef std::pair< Vertex_handle, Vertex_handle > Edge_like;
+    typedef CGAL::Triple< Vertex_handle, Vertex_handle, Vertex_handle > Facet_like;
+
+    typedef std::set<Radius_ptr_type> Ordered_border_type;
+
+    typedef typename Ordered_border_type::iterator Ordered_border_iterator;
+
+    enum Validation_case {NOT_VALID, NOT_VALID_CONNECTING_CASE, FINAL_CASE,
+                          EAR_CASE, EXTERIOR_CASE, CONNECTING_CASE};
+
+    //=====================================================================
+    //=====================================================================
+
+
+    typedef const std::list<std::list<Vertex_handle> > Boundary_range;
+    typedef const std::list<Vertex_handle> Vertex_on_boundary_range;
+
+  private:
+
+    mutable std::list<std::list<Vertex_handle> >  m_boundaries;
+
+    Timer postprocess_timer, extend_timer, extend2_timer, init_timer;
+
+    Triangulation_3& T;
+
+    Ordered_border_type _ordered_border;
+    int _number_of_border;
+
+    const coord_type COS_ALPHA_SLIVER;
+    coord_type COS_BETA;
+    const int NB_BORDER_MAX;
+    coord_type DELTA; // = sampling quality of the border
+    coord_type K, min_K;
+    const coord_type eps;
+    const coord_type inv_eps_2; // 1/(eps^2)
+    const coord_type eps_3; // test de ^3 donc points tel 1e-7 soit petit
+    const criteria STANDBY_CANDIDATE;
+    const criteria STANDBY_CANDIDATE_BIS;
+    const criteria NOT_VALID_CANDIDATE;
+
+    //---------------------------------------------------------------------
+    //Pour une visu correcte
+    //pour retenir les facettes selectionnees
+    int _vh_number;
+    int _facet_number;
+
+    //---------------------------------------------------------------------
+    //Pour le post traitement
+    mutable int _postprocessing_counter;
+    int _size_before_postprocessing;
+
+    std::list<Point> m_outliers;
+
+    int _number_of_connected_components;
+
+    Vertex_handle added_vertex;
+    bool deal_with_2d;
+    Priority priority;
+    int max_connected_component;
+    double K_init, K_step;
+    std::list<Vertex_handle> interior_edges;
+    std::list< Incidence_request_elt > incidence_requests;
+    typename std::list< Incidence_request_elt >::iterator sentinel;
+    typename std::list<Vertex_handle>::iterator ie_sentinel;
+    std::list<Next_border_elt> nbe_pool;
+    std::list<Intern_successors_type> ist_pool;
+
+
+    Intern_successors_type* new_border()
+    {
+      nbe_pool.push_back(Next_border_elt());
+
+      Next_border_elt* p1 = & nbe_pool.back();
+      nbe_pool.push_back(Next_border_elt());
+      Next_border_elt* p2 = & nbe_pool.back();
+
+      Intern_successors_type ist(p1,p2);
+      ist_pool.push_back(ist);
+
+      Intern_successors_type* ret = &ist_pool.back();
+
+      ret->first->first = NULL;
+      ret->second->first = NULL;
+      return ret;
+    }
+
+
+    inline bool is_on_border(Vertex_handle vh, const int& i) const
+    {
+      if (vh->m_incident_border == NULL) return false; //vh is interior
+      if (vh->m_incident_border->first->first != NULL)
+	{
+	  if (vh->m_incident_border->second->first != NULL)
+	    return ((vh->m_incident_border->first->second.second == i)||
+		    (vh->m_incident_border->second->second.second == i));
+	  return (vh->m_incident_border->first->second.second == i);
+	}
+      return false; //vh is still exterior
+    }
+
+
+    void remove_border_edge(Vertex_handle w, Vertex_handle v)
+    {
+      if (w->m_incident_border != NULL)
+	{
+	  if (w->m_incident_border->second->first == v)
+	    {
+	      w->m_incident_border->second->first = NULL;
+	      set_interior_edge(w,v);
+	      return;
+	    }
+	  if (w->m_incident_border->first->first == v)
+	    {
+	      if (w->m_incident_border->second->first != NULL)
+		{
+		  Next_border_elt* tmp = w->m_incident_border->first;
+		  w->m_incident_border->first = w->m_incident_border->second;
+		  w->m_incident_border->second = tmp;
+		  w->m_incident_border->second->first = NULL;
+		  set_interior_edge(w,v);
+		  return;
+		}
+	      else
+		{
+		  w->m_incident_border->first->first = NULL;
+		  set_interior_edge(w,v);
+		  return;
+		}
+	    }
+	}
+    }
+
+
+    inline bool is_interior_edge(Vertex_handle w, Vertex_handle v) const
+    {
+
+      bool r1;
+      if(w->m_ie_first == ie_sentinel){
+	r1 = false;
+      }else {
+	typename std::list<Vertex_handle>::iterator b(w->m_ie_first), e(w->m_ie_last);
+	e++;
+	typename std::list<Vertex_handle>::iterator r = std::find(b, e, v);
+	r1 = ( r != e);
+      }
+
+      return r1;
+    }
+
+    //-------------------------------------------------------------------
+    // pour gerer certaines aretes interieures: a savoir celle encore connectee au
+    // bord (en fait seule, les aretes interieures reliant 2 bords nous
+    // interressent...)
+
+    inline void set_interior_edge(Vertex_handle w, Vertex_handle v)
+    {
+      if(w->m_ie_last == ie_sentinel){ // empty set
+	CGAL_assertion(w->m_ie_first == w->m_ie_last);
+	w->m_ie_last = interior_edges.insert(w->m_ie_last, v);
+	w->m_ie_first = w->m_ie_last;
+      } else {
+	typename std::list<Vertex_handle>::iterator e(w->m_ie_last);
+	e++;
+#ifdef DEBUG
+	typename std::list<Vertex_handle>::iterator r = std::find(w->m_ie_first, e, v);
+	CGAL_assertion(r == e);
+#endif
+	w->m_ie_last = interior_edges.insert(e, v);
+      }
+    }
+
+
+    inline void remove_interior_edge(Vertex_handle w, Vertex_handle v)
+    {
+      if(w->m_ie_first == ie_sentinel){
+	CGAL_assertion(w->m_ie_last == w->m_ie_first);
+      } else if(w->m_ie_first == w->m_ie_last){ // there is only one element
+	if(*(w->m_ie_first) == v){
+	  interior_edges.erase(w->m_ie_first);
+	  w->m_ie_last = ie_sentinel;
+	  w->m_ie_first = w->m_ie_last;
+	}
+      } else {
+	typename std::list<Vertex_handle>::iterator b(w->m_ie_first), e(w->m_ie_last);
+	e++;
+	typename std::list<Vertex_handle>::iterator r = std::find(b, e, v);
+	if(r != e){
+	  if(r == w->m_ie_first){
+	    w->m_ie_first++;
+	  }
+	  if(r == w->m_ie_last){
+	    w->m_ie_last--;
+	  }
+	  interior_edges.erase(r);
+	}
+      }
+    }
+
+
+    //-------------------------------------------------------------------
+
+    inline void set_incidence_request(Vertex_handle w, const Incidence_request_elt& ir)
+    {
+      if(w->m_ir_last == sentinel ){
+	CGAL_assertion(w->m_ir_first == w->m_ir_last);
+	w->m_ir_last = incidence_requests.insert(w->m_ir_last, ir);
+	w->m_ir_first = w->m_ir_last;
+      } else {
+	typename std::list<Incidence_request_elt>::iterator e(w->m_ir_last);
+	e++;
+	w->m_ir_last = incidence_requests.insert(e, ir);
+      }
+    }
+
+    inline bool is_incidence_requested(Vertex_handle w) const
+    {
+      if(w->m_ir_last == sentinel ){
+	CGAL_assertion(w->m_ir_first == sentinel );
+      }
+      return (w->m_ir_last != sentinel );
+    }
+
+    inline Incidence_request_iterator incidence_request_begin(Vertex_handle w)
+    {
+      return w->m_ir_first;
+    }
+
+    inline Incidence_request_iterator incidence_request_end(Vertex_handle w)
+    {
+      if(w->m_ir_last != sentinel ){
+	CGAL_assertion(w->m_ir_first != sentinel );
+	Incidence_request_iterator it(w->m_ir_last);
+	it++;
+	return it;
+      }
+      return w->m_ir_last;
+    }
+
+    inline void erase_incidence_request(Vertex_handle w)
+    {
+      if(w->m_ir_last != sentinel ){
+	CGAL_assertion(w->m_ir_first != sentinel );
+	w->m_ir_last++;
+	incidence_requests.erase(w->m_ir_first, w->m_ir_last);
+	w->m_ir_first = sentinel ;
+	w->m_ir_last = sentinel ;
+      }
+    }
+
+
+    void re_init(Vertex_handle w)
+    {
+      if (w->m_incident_border != NULL)
+	{
+	  w->delete_border();
+	}
+
+      if(w->m_ir_first != sentinel ){
+	CGAL_assertion(w->m_ir_last != sentinel );
+	typename std::list< Incidence_request_elt >::iterator b(w->m_ir_first), e(w->m_ir_last);
+	e++;
+	incidence_requests.erase(b, e);
+	w->m_ir_first = sentinel ;
+	w->m_ir_last = sentinel ;
+      }
+
+      w->m_incident_border = new_border();
+      w->m_mark = -1;
+      w->m_post_mark = -1;
+    }
+
+
+
+    inline void dec_mark(Vertex_handle w)
+    {
+      w->m_mark--;
+      if(w->m_mark == 0)
+	{
+	  w->delete_border();
+	  erase_incidence_request(w);
+	}
+    }
+
+
+
+    void initialize_vertices_and_cells()
+    {
+
+      Incidence_request_elt ire;
+      incidence_requests.clear();
+      incidence_requests.push_back(ire);
+      sentinel = incidence_requests.begin();
+
+      interior_edges.clear();
+      interior_edges.push_back(Vertex_handle());
+      ie_sentinel = interior_edges.begin();
+
+      for(All_vertices_iterator fit = T.all_vertices_begin();
+          fit != T.all_vertices_end();
+          ++fit){
+        fit->m_ie_first =  fit->m_ie_last = ie_sentinel;
+        fit->m_ir_first = fit->m_ir_last = sentinel ;
+        fit->m_incident_border = new_border();
+      }
+    }
+
+    //-------------------- DESTRUCTOR -----------------------------------
+
+    void clear_vertex(Vertex_handle w)
+    {
+      if (w->m_incident_border != NULL)
+	{
+	  w->delete_border();
+	}
+      if(w->m_ir_first != sentinel ){
+	CGAL_assertion(w->m_ir_last != sentinel );
+	typename std::list< Incidence_request_elt >::iterator b(w->m_ir_first), e(w->m_ir_last);
+	e++;
+	incidence_requests.erase(b, e);
+      }
+
+      if(w->m_ie_first != ie_sentinel){
+	CGAL_assertion(w->m_ie_last != ie_sentinel);
+	typename std::list<Vertex_handle>::iterator b(w->m_ie_first), e(w->m_ie_last);
+	e++;
+	interior_edges.erase(b, e);
+      }
+    }
+
+
+    void clear_vertices()
+    {
+      for (All_vertices_iterator vit = T.all_vertices_begin();
+           vit != T.all_vertices_end();
+           ++vit){
+        clear_vertex(vit);
+      }
+    }
+
+
+  public:
+    /// \name Creation
+    /// @{
+
+    /*!
+    Constructor for the unstructured point cloud given as 3D Delaunay triangulation.
+    */
+    Advancing_front_surface_reconstruction(Triangulation_3& dt,
+                                           Priority priority = Priority())
+      : T(dt), _number_of_border(1), COS_ALPHA_SLIVER(-0.86),
+        NB_BORDER_MAX(15), DELTA(.86), min_K(infinity()),
+        eps(1e-7), inv_eps_2(coord_type(1)/(eps*eps)), eps_3(eps*eps*eps),
+        STANDBY_CANDIDATE(3), STANDBY_CANDIDATE_BIS(STANDBY_CANDIDATE+1),
+        NOT_VALID_CANDIDATE(STANDBY_CANDIDATE+2),
+      _vh_number(static_cast<int>(T.number_of_vertices())), _facet_number(0),
+      _postprocessing_counter(0), _size_before_postprocessing(0), _number_of_connected_components(0),
+      deal_with_2d(false), priority(priority), max_connected_component(-1), K_init(1.1), K_step(.1)
+
+    {
+      if(T.dimension() == 2){
+        deal_with_2d = true;
+        Finite_vertices_iterator it = T.finite_vertices_begin();
+        const Point& p = it->point();
+        ++it;
+        const Point& q = it->point();
+        do{
+          ++it;
+        }while(collinear(p,q,it->point()));
+        const Point& r = it->point();
+        Vector u = q-r;
+        Vector v = q-p;
+        Vector w = r-p;
+        Vector vw = cross_product(v,w);
+        double len = (std::max)(u*u,(std::max)(v*v,w*w));
+        Point s = p + 10* len * (vw/(vw*vw));
+        added_vertex = T.insert(s);
+      }
+    }
+
+    /// @}
+
+
+    /*
+      ~Advancing_front_surface_reconstruction()
+      {
+
+      std::cerr << "postprocessing" << postprocess_timer.time() << std::endl;
+      std::cerr << "extend        " << extend_timer.time() << std::endl;
+      std::cerr << "extend2       " << extend2_timer.time() << std::endl;
+      std::cerr << "init          " << postprocess_timer.time() << std::endl;
+      std::cerr << "#outliers     " << number_of_outliers() << std::endl;
+      }
+    */
+
+    typedef Advancing_front_surface_reconstruction_boundary_iterator<Extract> Boundary_iterator;
+
+    Boundary_iterator boundaries_begin() const
+    {
+      return Boundary_iterator(*this, next_mark());
+    }
+
+
+    Boundary_iterator boundaries_end() const
+    {
+      return Boundary_iterator(*this);
+    }
+
+    typedef std::list<Point> Outlier_range;
+
+    typedef CGAL::Triangulation_data_structure_2<AFSR::Surface_vertex_base_2<Kernel,Vertex_handle>,
+                                                 AFSR::Surface_face_base_2<Kernel, typename Triangulation_3::Facet> > TDS_2;
+
+    typedef TDS_2 Triangulation_data_structure_2;
+
+    mutable TDS_2 _tds_2;
+
+    mutable typename TDS_2::Vertex_handle _tds_2_inf;
+
+    /// \name Operations
+    /// @{
+
+    /*!
+    runs the surface reconstruction function.
+
+    \param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
+           are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
+           Described in Section \ref AFSR_Boundaries
+    \param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
+           Described in Section \ref AFSR_Selection
+
+    */
+    void run(double radius_ratio_bound=5, double beta= 0.52)
+    {
+      K = radius_ratio_bound;
+      COS_BETA = cos(beta);
+      if(T.dimension() < 3){
+        return;
+      }
+      initialize_vertices_and_cells();
+      bool re_init = false;
+      do
+        {
+          _number_of_connected_components++;
+
+          if ( (re_init = init(re_init)) )
+            {
+              //std::cerr << "Growing connected component " << _number_of_connected_components << std::endl;
+              extend_timer.start();
+              extend();
+              extend_timer.stop();
+
+              if ((number_of_facets() > static_cast<int>(T.number_of_vertices()))&&
+                  (NB_BORDER_MAX > 0))
+                // en principe 2*nb_sommets = nb_facettes: y a encore de la marge!!!
+                {
+                  while(postprocessing()){
+                    extend2_timer.start();
+                    extend();
+
+                    extend2_timer.stop();
+                  }
+                }
+            }
+        }while(re_init &&
+               ((_number_of_connected_components < max_connected_component)||
+                (max_connected_component < 0)));
+
+      _tds_2_inf = AFSR::construct_surface(_tds_2, *this);
+
+      boundaries();
+      clear_vertices();
+    }
+
+    /*!
+    returns the reconstructed surface.
+    */
+    const Triangulation_data_structure_2& triangulation_data_structure_2() const
+    {
+      return _tds_2;
+    }
+
+    /*!
+    returns the underlying 3D Delaunay triangulation.
+    */
+    Triangulation_3&
+    triangulation_3() const
+    {
+      return T;
+    }
+
+    /*!
+    returns an iterator range over the outliers.
+    */
+    const Outlier_range& outliers() const
+    {
+      return m_outliers;
+    }
+
+    /*!
+    returns an iterator range over the boundaries.
+    */
+    const Boundary_range& boundaries() const
+    {
+      if(has_boundaries() && m_boundaries.empty()){
+        Boundary_iterator b =  boundaries_begin();
+        Boundary_iterator e =  boundaries_end();
+        for(; b!= e; ++b){
+          Vertex_handle v = *b;
+          std::list<Vertex_handle> border;
+          m_boundaries.push_back(border);
+          do {
+            m_boundaries.back().push_back(*b);
+            ++b;
+          }while(*b != v);
+        }
+      }
+
+      return  m_boundaries;
+    }
+    /// @}
+
+/// \name Predicates
+/// @{
+
+    /*!
+    returns `true` if the reconstructed surface has boundaries.
+    */
+    bool
+    has_boundaries() const
+    {
+      return _tds_2_inf != typename TDS_2::Vertex_handle();
+    }
+
+    /*!
+    returns `true` if the facet is on the surface.
+    */
+    bool
+    has_on_surface(Facet f) const
+    {
+      return f.first->has_facet_on_surface(f.second);
+    }
+
+    /*!
+    returns `true` if the facet `f2` is on the surface.
+    */
+    bool
+    has_on_surface(typename Triangulation_data_structure_2::Face_handle f2) const
+    {
+      return f2->is_on_surface();
+    }
+
+    /*!
+    returns `true` if the vertex `v2` is on the surface.
+    */
+    bool
+    has_on_surface(typename Triangulation_data_structure_2::Vertex_handle v2) const
+    {
+      return v2 != _tds_2_inf;
+    }
+    /// @}
+
+    int number_of_connected_components() const
+    {
+      return _number_of_connected_components;
+    }
+
+    int number_of_facets() const
+    {
+      return _facet_number;
+    }
+
+
+    int number_of_vertices() const
+    {
+      return _vh_number;
+    }
+
+
+    int number_of_outliers() const
+    {
+      return static_cast<int>(m_outliers.size());
+    }
+
+    typedef typename std::list<Point>::const_iterator Outlier_iterator;
+
+
+    Outlier_iterator outliers_begin() const
+    {
+      return m_outliers.begin();
+    }
+
+
+    Outlier_iterator m_outliers_end() const
+    {
+      return m_outliers.end();
+    }
+
+    int next_mark() const
+    {
+      _postprocessing_counter++;
+      return _postprocessing_counter;
+    }
+
+
+    Next_border_elt* border_elt(const Vertex_handle& v1, const Vertex_handle& v2) const
+    {
+      return v1->border_elt(v2);
+    }
+
+
+    //public
+
+    IO_edge_type* border_IO_elt(const Vertex_handle& v1, const Vertex_handle& v2)
+    {
+      return &border_elt(v1,v2)->second.first.second;
+    }
+
+
+    IO_edge_type* set_border_elt(const Vertex_handle& v1, const Vertex_handle& v2,
+                                 const Border_elt& e)
+    {
+      v1->set_next_border_elt(Next_border_elt (v2, e));
+      return border_IO_elt(v1, v2);
+    }
+
+
+    IO_edge_type* set_again_border_elt(const Vertex_handle& v1, const Vertex_handle& v2,
+                                       const Border_elt& e)
+    {
+      border_elt(v1,v2)->second = e;
+      return border_IO_elt(v1, v2);
+    }
+
+    //---------------------------------------------------------------------
+    bool is_border_elt(Edge_like& key, Border_elt& result) const
+    {
+      Next_border_elt* it12 = border_elt(key.first, key.second);
+      if (it12 != NULL)
+        {
+          result = it12->second;
+          return true;
+        }
+
+      Next_border_elt* it21 =  border_elt(key.second, key.first);
+      if (it21 != NULL)
+        {
+          result = it21->second;
+          std::swap(key.first, key.second);
+          return true;
+        }
+      return false;
+    }
+
+    //---------------------------------------------------------------------
+    bool is_border_elt(Edge_like& key) const {
+      Next_border_elt* it12 =  border_elt(key.first, key.second);
+      if (it12 != NULL)
+        {
+          return true;
+        }
+
+      Next_border_elt* it21 =  border_elt(key.second, key.first);
+      if (it21 != NULL)
+        {
+          std::swap(key.first, key.second);
+          return true;
+        }
+      return false;
+    }
+
+    //---------------------------------------------------------------------
+    bool is_ordered_border_elt(const Edge_like& key, Border_elt& result) const
+    {
+      Next_border_elt* it12 =  border_elt(key.first, key.second);
+      if (it12 != NULL)
+        {
+          result = it12->second;
+          return true;
+        }
+      return false;
+    }
+
+    //---------------------------------------------------------------------
+    void
+    remove_border_elt(const Edge_like& ordered_key)
+    {
+      remove_border_edge(ordered_key.first, ordered_key.second);
+    }
+
+    //---------------------------------------------------------------------
+    bool is_ordered_border_elt(const Edge_like& e,
+                               IO_edge_type* &ptr) const
+    {
+      Vertex_handle v1 = e.first;
+
+      Next_border_elt* it12 =  border_elt(v1, e.second);
+      if (it12 != NULL)
+        {
+          ptr = &it12->second.first.second;
+          return true;
+        }
+      return false;
+    }
+
+    //---------------------------------------------------------------------
+    void set_incidence_request(const Vertex_handle& v,
+                               const criteria& value,
+                               const Edge_like& e)
+    {
+      Incidence_request_elt incident_elt(value, e);
+      set_incidence_request(v, incident_elt);
+    }
+
+    //---------------------------------------------------------------------
+    bool is_interior_edge(const Edge_like& key) const
+    // pour gerer certaines aretes interieures: a savoir celle encore connectee au
+    // bord (en fait seule, les aretes interieures reliant 2 bords nous
+    // interressent...)
+    {
+      return (is_interior_edge(key.first, key.second)||
+              is_interior_edge(key.second, key.first));
+    }
+
+    //---------------------------------------------------------------------
+#ifdef AFSR_LAZY
+
+    coord_type lazy_squared_radius(const Cell_handle& c)
+    {
+      if (c->lazy_squared_radius() != NULL)
+        return *(c->lazy_squared_radius());
+
+      c->set_lazy_squared_radius
+        (CGAL::squared_radius(c->vertex(0)->point(),
+                              c->vertex(1)->point(),
+                              c->vertex(2)->point(),
+                              c->vertex(3)->point()));
+      return *(c->lazy_squared_radius());
+    }
+
+    Point lazy_circumcenter(const Cell_handle& c)
+    {
+      if (c->lazy_circumcenter() != NULL)
+        return *(c->lazy_circumcenter());
+
+      c->set_lazy_circumcenter
+        (CGAL::circumcenter(c->vertex(0)->point(),
+                      c->vertex(1)->point(),
+                      c->vertex(2)->point(),
+                      c->vertex(3)->point()));
+      return *(c->lazy_circumcenter());
+    }
+
+#endif //NOLAZY
+
+    //---------------------------------------------------------------------
+    Edge_incident_facet next(const Edge_incident_facet& e) const
+    {
+      Cell_handle c = e.first.first;
+      int i = e.second;
+      int i1 = e.first.second, i2 = e.first.third;
+      int i3 = (6 - e.second - i1 - i2);
+
+      Cell_handle n = c->neighbor(i);
+      int j1 = n->index(c->vertex(i1)), j2 = n->index(c->vertex(i2));
+      int j =  n->index(c->vertex(i3));
+      return Edge_incident_facet(Edge(n, j1, j2), j);
+    }
+
+    //---------------------------------------------------------------------
+    Edge_incident_facet previous(const Edge_incident_facet& e) const
+    {
+      Cell_handle c = e.first.first;
+      int i = e.second;
+      int i1 = e.first.second, i2 = e.first.third;
+      int i3 = (6 - e.second - i1 - i2);
+
+      Cell_handle n = c->neighbor(i3);
+      int j1 = n->index(c->vertex(i1)), j2 = n->index(c->vertex(i2));
+      int j =  n->index(c->vertex(i));
+      return Edge_incident_facet(Edge(n, j1, j2), j);
+    }
+
+    //---------------------------------------------------------------------
+    bool
+    my_coplanar(const Point& p, const Point& q,
+                const Point& r, const Point& s) const
+    {
+      coord_type qpx = q.x()-p.x();
+      coord_type qpy = q.y()-p.y();
+      coord_type qpz = q.z()-p.z();
+      coord_type rpx = r.x()-p.x();
+      coord_type rpy = r.y()-p.y();
+      coord_type rpz = r.z()-p.z();
+      coord_type spx = s.x()-p.x();
+      coord_type spy = s.y()-p.y();
+      coord_type spz = s.z()-p.z();
+
+      coord_type den = CGAL::determinant(qpx,qpy,qpz,
+                                         rpx,rpy,rpz,
+                                         spx,spy,spz);
+      return (CGAL_NTS abs(den) < eps_3);
+    }
+
+    //---------------------------------------------------------------------
+    bool
+    my_collinear(const Point& p, const Point& q, const Point& s) const
+    {
+      coord_type psx = p.x()-s.x();
+      coord_type psy = p.y()-s.y();
+      coord_type psz = p.z()-s.z();
+      coord_type qsx = q.x()-s.x();
+      coord_type qsy = q.y()-s.y();
+      coord_type qsz = q.z()-s.z();
+      coord_type rsx = psy*qsz-psz*qsy;
+      coord_type rsy = psz*qsx-psx*qsz;
+      coord_type rsz = psx*qsy-psy*qsx;
+
+      coord_type den = CGAL::determinant(psx,psy,psz,
+                                         qsx,qsy,qsz,
+                                         rsx,rsy,rsz);
+
+      return (CGAL_NTS abs(den) < eps_3);
+    }
+
+    //---------------------------------------------------------------------
+    void
+    select_facet(const Cell_handle& c, const int& i)
+    {
+      c->select_facet(i);
+      _facet_number++;
+      c->set_facet_number(i, _facet_number);
+    }
+
+
+    void
+    unselect_facet(const Cell_handle& c, const int& i)
+    {
+      c->unselect_facet(i);
+    }
+
+
+    int
+    number_of_border_edges()
+    {
+      int _border_count(0);
+      for(Finite_edges_iterator e_it=T.finite_edges_begin();
+          e_it!=T.finite_edges_end();
+          e_it++)
+        {
+          Cell_handle c = (*e_it).first;
+          int i1 = (*e_it).second, i2 = (*e_it).third;
+          Edge_like key(c->vertex(i1), c->vertex(i2));
+
+          if (is_border_elt(key))
+            _border_count++;
+        }
+      return _border_count;
+    }
+
+
+    //=====================================================================
+
+
+    /// \name Priority values
+    /// @{
+
+    /*!
+
+      computes the priority of the facet `(c,index)` such that the
+      facet with the smallest radius of Delaunay sphere has the
+      highest priority.
+
+    \param c handle to the cell containing the facet
+    \param index index of the facet in `c`
+
+    */
+    coord_type
+    smallest_radius_delaunay_sphere(const Cell_handle& c,
+                                    const int& index) const
+    {
+      int i1, i2, i3;
+
+      if(deal_with_2d && ( (c->vertex((index+1) & 3) == added_vertex)
+                           || (c->vertex((index+2) & 3) == added_vertex)
+                           || (c->vertex((index+3) & 3) == added_vertex) ))
+        {
+          return infinity();
+        }
+      Cell_handle n = c->neighbor(index);
+      // lazy evaluation ...
+      coord_type value = c->smallest_radius(index);
+      if ((value >= 0)&&(n->smallest_radius(n->index(c)) == value))
+        return value;
+
+      const Point& cp0 = c->vertex(index)->point();
+      const Point& cp1 = c->vertex((index+1) & 3)->point();
+      const Point& cp2 = c->vertex((index+2) & 3)->point();
+      const Point& cp3 = c->vertex((index+3) & 3)->point();
+
+      const Point& np0 = n->vertex(0)->point();
+      const Point& np1 = n->vertex(1)->point();
+      const Point& np2 = n->vertex(2)->point();
+      const Point& np3 = n->vertex(3)->point();
+
+      bool c_is_plane(my_coplanar(cp0, cp1, cp2, cp3));
+      bool n_is_plane(my_coplanar(np0, np1, np2, np3));
+
+      bool c_is_infinite(T.is_infinite(c));
+      bool n_is_infinite(T.is_infinite(n));
+      if ((c_is_plane && n_is_plane)||
+          (c_is_plane && n_is_infinite)||
+          (n_is_plane && c_is_infinite)||
+          my_collinear(cp1, cp2, cp3))
+        value = infinity();
+      else
+        {
+          if (c_is_infinite||n_is_infinite||c_is_plane||n_is_plane)
+            {
+              int ind;
+              Cell_handle cc;
+              if(c_is_infinite||c_is_plane)
+                {
+                  cc = n;
+                  ind = n->index(c);
+                }
+              else
+                {
+                  cc = c;
+                  ind = index;
+                }
+              i1 = (ind+1) & 3;
+              i2 = (ind+2) & 3;
+              i3 = (ind+3) & 3;
+
+              const Point& pp0 = cc->vertex(ind)->point();
+              const Point& pp1 = cc->vertex(i1)->point();
+              const Point& pp2 = cc->vertex(i2)->point();
+              const Point& pp3 = cc->vertex(i3)->point();
+
+              Sphere facet_sphere(pp1, pp2, pp3);
+              if (squared_distance(facet_sphere.center(), pp0) <
+                  facet_sphere.squared_radius())
+                {
+#ifdef AFSR_LAZY
+                  value = lazy_squared_radius(cc);
+#else
+                  // qualified with CGAL, to avoid a compilation error with clang
+                  value = CGAL::squared_radius(pp0, pp1, pp2, pp3);
+#endif
+                }
+              else
+                value = facet_sphere.squared_radius();
+            }
+          else
+            {
+              Point cc, cn;
+#ifdef AFSR_LAZY
+              cc = lazy_circumcenter(c);
+              cn = lazy_circumcenter(n);
+#else
+              cc = CGAL::circumcenter(cp0, cp1, cp2, cp3);
+              cn = CGAL::circumcenter(np0, np1, np2, np3);
+#endif
+              // computation of the distance of  cp1  to the  dual segment cc, cn...
+              Vector V(cc - cn), Vc(cc - cp1), Vn(cp1 - cn);
+              coord_type ac(V * Vc), an(V * Vn), norm_V(V * V);
+              if ((ac > 0) && (an > 0))
+                {
+                  value = (Vc*Vc) - ac*ac/norm_V;
+                  if ((value < 0)||(norm_V > inv_eps_2)){
+                    // qualified with CGAL, to avoid a compilation error with clang
+                    value = CGAL::squared_radius(cp1, cp2, cp3);
+                  }
+                }
+              else
+                {
+                  if (ac <= 0)
+                    value = squared_distance(cc, cp1);
+                  else // (an <= 0)
+                    value = squared_distance(cn, cp1);
+                }
+            }
+        }
+      // cache computed values
+      c->set_smallest_radius(index, value);
+      n->set_smallest_radius(n->index(c), value);
+
+      return value;
+    }
+
+    /*!
+
+      returns the infinite floating value that prevents a facet to be used.
+    */
+    coord_type infinity() const { return std::numeric_limits<coord_type>::infinity(); }
+    /// @}      
+
+    //---------------------------------------------------------------------
+    // For a border edge e we determine the incident facet which has the highest
+    // chance to be a natural extension of the surface
+
+    Radius_edge_type
+    compute_value(const Edge_incident_facet& e)
+    {
+      Cell_handle c = e.first.first;
+      int i = e.second;
+      int i1 = e.first.second, i2 = e.first.third;
+      int i3 = 6 - e.second - i1 - i2;
+
+      Edge_incident_facet e_it = e;
+
+      coord_type min_valueP = NOT_VALID_CANDIDATE,
+        min_valueA = infinity();
+      Facet min_facet, min_facetA;
+      bool border_facet(false);
+
+      coord_type pscal;
+      const Point& p1 = c->vertex(i1)->point();
+      const Point& p2 = c->vertex(i2)->point();
+      const Point& pc = c->vertex(i3)->point();
+
+      Vector P2P1 = p1-p2, P2Pn, PnP1;
+
+      Vector v2, v1 = cross_product(pc-p2, P2P1);
+
+      coord_type norm, norm1 = v1*v1;
+      coord_type norm12 = P2P1*P2P1;
+
+      e_it = next(e_it);
+
+      do
+        {
+          Cell_handle neigh = e_it.first.first;
+          Facet facet_it(neigh, e_it.second);
+
+          if (!T.is_infinite(facet_it))
+            {
+              int n_ind = facet_it.second;
+              int n_i1 = e_it.first.second;
+              int n_i2 = e_it.first.third;
+              int n_i3 = 6 - n_ind - n_i1 - n_i2;
+
+              coord_type tmp=0;
+
+              tmp = priority (*this, neigh, n_ind);
+
+              Edge_like el1(neigh->vertex(n_i1),neigh->vertex(n_i3)),
+                el2(neigh->vertex(n_i2),neigh->vertex(n_i3));
+
+              if ((tmp != infinity())&&
+                  neigh->vertex(n_i3)->not_interior()&&
+                  (!is_interior_edge(el1))&&(!is_interior_edge(el2)))
+                {
+                  const Point& pn = neigh->vertex(n_i3)->point();
+
+                  P2Pn = pn-p2;
+                  v2 = cross_product(P2P1,P2Pn);
+
+                  //pas necessaire de normer pour un bon echantillon:
+                  //            on peut alors tester v1*v2 >= 0
+                  norm =  sqrt(norm1 * (v2*v2));
+                  pscal = v1*v2;
+                  // check if the triangle will produce a sliver on the surface
+                  bool sliver_facet = (pscal <= COS_ALPHA_SLIVER*norm);
+
+                  if (!sliver_facet)
+                    {
+                      if (tmp < min_valueA)
+                        {
+                          PnP1 = p1-pn;
+                          // DELTA represente la qualite d'echantillonnage du bord
+                          // We skip triangles having an internal angle along e
+                          // whose cosinus is smaller than -DELTA
+                          // that is the angle is larger than arcos(-DELTA)
+                          border_facet = !((P2P1*P2Pn >=
+                                            -DELTA*sqrt(norm12*(P2Pn*P2Pn)))&&
+                                           (P2P1*PnP1 >=
+                                            -DELTA*sqrt(norm12*(PnP1*PnP1))));
+                          // \todo investigate why we simply do not skip this triangle
+                          // but continue looking for a better candidate
+                          // if (!border_facet){
+                          min_facetA = facet_it;
+                          min_valueA = tmp;
+                          min_valueP = pscal/norm;
+                        }
+                    }
+                }
+            }
+          e_it = next(e_it);
+        }
+      while(e_it.first.first != c);
+
+      criteria value;
+
+      if ((min_valueA == infinity()) || border_facet) // bad facets case
+        {
+          min_facet = Facet(c, i); // !!! sans aucune signification....
+          value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ
+        }
+      else
+        {
+          min_facet = min_facetA;
+
+          //si on considere seulement la pliure value appartient a [0, 2]
+          //value = coord_type(1) - min_valueP;
+
+          // si la pliure est bonne on note suivant le alpha sinon on prend en compte la
+          // pliure seule... pour discriminer entre les bons slivers...
+          // si on veut discriminer les facettes de bonnes pliures plus finement
+          // alors -(1+1/min_valueA) app a [-inf, -1]
+          // -min_valueP app a [-1, 1]
+
+          if (min_valueP > COS_BETA)
+            value = -(coord_type(1) + coord_type(1)/min_valueA);
+          else
+            {
+              //on refuse une trop grande non-uniformite
+              coord_type tmp = priority (*this, c, i);
+              if (min_valueA <= K * tmp)
+                value = - min_valueP;
+              else
+                {
+                  value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure
+                  // + grand alpha... a traiter plus tard....
+                  min_K =
+                    (std::min)(min_K,
+                               min_valueA/tmp);
+                }
+            }
+        }
+
+      Cell_handle n = min_facet.first;
+      int ni1 = n->index(c->vertex(i1)), ni2 = n->index(c->vertex(i2));
+
+      return
+        Radius_edge_type(value, IO_edge_type(e, Edge_incident_facet
+                                             (Edge(n, ni1, ni2),
+                                              min_facet.second)));
+    }
+
+    //=====================================================================
+    // The parameter re_init is false the first time only
+    // Returns true, iff it found a face where the next surface can grow
+    bool
+    init(const bool& re_init)
+    {
+      init_timer.start();
+      Facet min_facet;
+      coord_type min_value = infinity();
+      int i1, i2, i3;
+
+      if (!re_init){
+        Finite_facets_iterator end = T.finite_facets_end();
+        for(Finite_facets_iterator facet_it = T.finite_facets_begin();
+            facet_it != end;
+            ++facet_it)
+          {
+            coord_type value = priority (*this, (*facet_it).first,
+                                         (*facet_it).second);
+            if (value < min_value)
+              {
+                min_facet = *facet_it;
+                min_value = value;
+              }
+          }
+      }else{ //if (re_init)
+        Finite_facets_iterator end = T.finite_facets_end();
+        for(Finite_facets_iterator facet_it = T.finite_facets_begin();
+            facet_it != end;
+            ++facet_it)
+          {
+            Cell_handle c = (*facet_it).first;
+            int index = (*facet_it).second;
+            if (c->vertex((index+1) & 3)->is_exterior())
+              if (c->vertex((index+2) & 3)->is_exterior())
+                if (c->vertex((index+3) & 3)->is_exterior())
+                  {
+                    coord_type value = priority (*this, c, index);
+
+                    // we might not want the triangle, for example because it is too large
+                    if(value == infinity()){
+                      value = min_value;
+                    }
+
+                    if (value < min_value)
+                      {
+                        min_facet = *facet_it;
+                        min_value = value;
+                      }
+                  }
+          }
+      }
+
+      if (min_value != infinity())
+        {
+          Cell_handle c_min = min_facet.first;
+
+          int ind = min_facet.second;
+          i1 = (ind+1) & 3;
+          i2 = (ind+2) & 3;
+          i3 = (ind+3) & 3;
+
+          Radius_edge_type e12, e23, e31;
+
+          e12 = compute_value(Edge_incident_facet(Edge(c_min, i1, i2), ind));
+          e23 = compute_value(Edge_incident_facet(Edge(c_min, i2, i3), ind));
+          e31 = compute_value(Edge_incident_facet(Edge(c_min, i3, i1), ind));
+
+          IO_edge_type* p12 = set_border_elt(c_min->vertex(i1), c_min->vertex(i2),
+                                             Border_elt(e12, _number_of_border));
+          IO_edge_type* p23 = set_border_elt(c_min->vertex(i2), c_min->vertex(i3),
+                                             Border_elt(e23, _number_of_border));
+          IO_edge_type* p31 = set_border_elt(c_min->vertex(i3), c_min->vertex(i1),
+                                             Border_elt(e31, _number_of_border));
+
+          c_min->vertex(i1)->inc_mark();
+          c_min->vertex(i2)->inc_mark();
+          c_min->vertex(i3)->inc_mark();
+          _ordered_border.insert(Radius_ptr_type (e12.first, p12));
+          _ordered_border.insert(Radius_ptr_type (e23.first, p23));
+          _ordered_border.insert(Radius_ptr_type (e31.first, p31));
+
+          select_facet(c_min, ind);
+          init_timer.stop();
+          return true;
+        }
+      init_timer.stop();
+      return false;
+    }
+
+    //---------------------------------------------------------------------
+    // test de reciprocite avant de recoller une oreille anti-singularite
+    int
+    test_merge(const Edge_like& ordered_key, const Border_elt& result,
+               const Vertex_handle& v, const coord_type& ear_alpha)
+    {
+      Edge_incident_facet Ifacet = result.first.second.first;
+
+      const Point& p1 = (ordered_key.first)->point();
+      const Point& p2 = (ordered_key.second)->point();
+      const Point& pc = v->point();
+
+      Cell_handle neigh = Ifacet.first.first;
+      int n_ind = Ifacet.second;
+      int n_i1 = Ifacet.first.second;
+      int n_i2 = Ifacet.first.third;
+      int n_i3 = (6 - n_ind - n_i1 - n_i2);
+
+      const Point& pn = neigh->vertex(n_i3)->point();
+      Vector v1 = cross_product(pc-p2,p1-p2),
+        v2 = cross_product(p1-p2,pn-p2);
+      coord_type norm = sqrt((v1*v1)*(v2*v2));
+
+      if (v1*v2 > COS_BETA*norm)
+        return 1; // label bonne pliure sinon:
+
+      if (ear_alpha <= K * priority(*this, neigh, n_ind))
+        return 2; // label alpha coherent...
+
+      return 0; //sinon oreille a rejeter...
+    }
+
+
+    //---------------------------------------------------------------------
+    void
+    ordered_map_erase(const criteria& value, const IO_edge_type* pkey)
+    {
+      _ordered_border.erase(Radius_ptr_type(value,(IO_edge_type*)pkey));
+    }
+
+    //---------------------------------------------------------------------
+    void
+    force_merge(const Edge_like& ordered_key, const Border_elt& result)
+    {
+      criteria value = result.first.first;
+      IO_edge_type* pkey = border_IO_elt(ordered_key.first, ordered_key.second);
+
+      ordered_map_erase(value, pkey);
+
+      remove_border_elt(ordered_key);
+    }
+
+    //---------------------------------------------------------------------
+    void
+    dequeue_incidence_request(const Vertex_handle& v)
+    {
+      if (is_incidence_requested(v))
+        {
+          for(Incidence_request_iterator v_it = incidence_request_begin(v);
+              v_it != incidence_request_end(v);
+              v_it++)
+            {
+              IO_edge_type* ptr;
+
+              if (is_ordered_border_elt(v_it->second, ptr))
+                _ordered_border.insert(Radius_ptr_type(v_it->first, ptr));
+            }
+          erase_incidence_request(v);
+        }
+    }
+
+
+    //---------------------------------------------------------------------
+    void
+    merge_ear(const Edge_like& ordered_el1, const Border_elt& result1,
+              const Edge_like& ordered_key,
+              const Vertex_handle& v1, const Vertex_handle& v2,
+              const Edge_incident_facet& edge_Ifacet_2)
+    {
+      remove_border_elt(ordered_key);
+      force_merge(ordered_el1, result1);
+      Radius_edge_type e2 = compute_value(edge_Ifacet_2);
+      IO_edge_type* p2;
+      if (ordered_el1.first == v1)
+        p2 = set_border_elt(v2, ordered_el1.second,
+                            Border_elt(e2,result1.second));
+      else
+        p2 = set_border_elt(ordered_el1.first, v2,
+                            Border_elt(e2,result1.second));
+      dec_mark(v1);
+
+      _ordered_border.insert(Radius_ptr_type(e2.first, p2));
+
+      //depiler les eventuelles requettes de connections avortees... zones etoilees,
+      //en effet le bord a change donc on peut peut etre maintenant.
+      dequeue_incidence_request(v2);
+      if (ordered_el1.first == v1)
+        dequeue_incidence_request(ordered_el1.second);
+      else
+        dequeue_incidence_request(ordered_el1.first);
+    }
+
+    //---------------------------------------------------------------------
+    void
+    border_extend(const Edge_like& ordered_key, const Border_elt& result12,
+                  const Vertex_handle& v1, const Vertex_handle& v2,
+                  const Vertex_handle& v3,
+                  const Radius_edge_type& e1, const Radius_edge_type& e2,
+                  IO_edge_type* &p1, IO_edge_type* &p2)
+    {
+      remove_border_elt(ordered_key);
+
+      //depiler v3 avant de le mettre a jour... pour reperer s'il est sur un bord
+      if (v3->is_on_border())
+        dequeue_incidence_request(v3);
+
+      if (ordered_key.first == v1)
+        {
+          p1 = set_border_elt(v1, v3, Border_elt(e1,result12.second));
+          p2 = set_border_elt(v3, v2, Border_elt(e2,result12.second));
+        }
+      else
+        {
+          p2 = set_border_elt(v2, v3, Border_elt(e2,result12.second));
+          p1 = set_border_elt(v3, v1, Border_elt(e1,result12.second));
+        }
+
+      v3->inc_mark();
+
+      //depiler les eventuelles requettes de connections avortees... zones etoilees,
+      //en effet le bord a change donc on peut peut etre maintenant.
+      dequeue_incidence_request(v1);
+      dequeue_incidence_request(v2);
+    }
+
+    //=====================================================================
+    Validation_case
+    validate(const Edge_incident_facet& edge_Efacet,
+             const criteria& value)
+    {
+      int i = (6 - edge_Efacet.second
+               - edge_Efacet.first.second
+               - edge_Efacet.first.third);
+      Cell_handle c =  edge_Efacet.first.first;
+
+      Vertex_handle v1 = c->vertex(edge_Efacet.first.second),
+        v2 = c->vertex(edge_Efacet.first.third);
+
+      Edge_like ordered_el1(c->vertex(i), v1);
+      Edge_like ordered_el2(c->vertex(i), v2);
+      Border_elt result1, result2, result12;
+
+      Edge_like ordered_key(v1,v2);
+
+      if (!is_border_elt(ordered_key, result12))
+        std::cerr << "+++probleme coherence bord <validate>" << std::endl;
+
+      bool is_border_el1 = is_border_elt(ordered_el1, result1),
+        is_border_el2 = is_border_elt(ordered_el2, result2);
+
+      Radius_edge_type e1, e2;
+      if (c->vertex(i)->not_interior())
+        {
+          if ((!is_interior_edge(ordered_el1))&&
+              (!is_interior_edge(ordered_el2)))
+            {
+              //toujours utile meme avec l'essai de try_to_close_border avant
+              //validate pour la resolution de singularite par oreille qui elle
+              //doit etre dans Delaunay.
+              if (is_border_el1&&is_border_el2)
+                {
+                  remove_border_elt(ordered_key);
+                  force_merge(ordered_el1, result1);
+                  force_merge(ordered_el2, result2);
+
+                  dec_mark(v1);
+                  dec_mark(v2);
+                  dec_mark(c->vertex(i));
+
+                  select_facet(c, edge_Efacet.second);
+
+                  return FINAL_CASE;
+                }
+              //---------------------------------------------------------------------
+              //on peut alors marquer v1 et on pourrait essayer de merger
+              //sans faire de calcul inutile???
+              if (is_border_el1)
+                {
+                  Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
+                                                    edge_Efacet.second);
+                  merge_ear(ordered_el1, result1,
+                            ordered_key, v1, v2, edge_Ifacet_2);
+
+                  select_facet(c, edge_Efacet.second);
+
+                  return EAR_CASE;
+                }
+              //---------------------------------------------------------------------
+              //idem pour v2
+              if (is_border_el2)
+                {
+                  Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
+                                                    edge_Efacet.second);
+                  merge_ear(ordered_el2, result2,
+                            ordered_key, v2, v1, edge_Ifacet_1);
+                  select_facet(c, edge_Efacet.second);
+
+                  return EAR_CASE;
+                }
+
+              //---------------------------------------------------------------------
+              if ((!is_border_el1)&&(!is_border_el2))
+                {
+                  // si on veut s'interdir de spliter un bord (pelure d'orange....)
+                  // seulement c->vertex(i)->is_exterior()
+                  // pour s'autoriser des split de bord surface a bord->sphere ou Moebius...
+                  // alors || is_on_same_border:
+                  //       if (c->vertex(i)->is_exterior() || is_on_same_border)
+                  // pour passer au tore (changementde type de topologie)
+                  // recoller deux bord different...
+                  //       if (c->vertex(i)->not_interior() deja teste en haut
+
+                  if(c->vertex(i)->is_exterior())
+                    {
+                      Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
+                                                        edge_Efacet.second);
+
+                      Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
+                                                        edge_Efacet.second);
+                      e1 = compute_value(edge_Ifacet_1);
+                      e2 = compute_value(edge_Ifacet_2);
+
+                      IO_edge_type* p1;
+                      IO_edge_type* p2;
+
+                      border_extend(ordered_key, result12,
+                                    v1, v2, c->vertex(i),
+                                    e1, e2, p1, p2);
+
+                      // if e1 contain infinity there is no candidates to
+                      // continue: compute_value is not valid...
+
+                      _ordered_border.insert(Radius_ptr_type(e1.first, p1));
+
+                      _ordered_border.insert(Radius_ptr_type(e2.first, p2));
+
+                      select_facet(c, edge_Efacet.second);
+
+                      return EXTERIOR_CASE;
+                    }
+                  else // c->vertex(i) is a border point (and now there's only 1
+		  // border incident to a point... _mark<1 even if th orientation
+		  // may be such as one vh has 2 successorson the same border...
+		  {
+		    // a ce niveau on peut tester si le recollement se fait en
+		    // maintenant la compatibilite d'orientation des bords (pour
+		    // surface orientable...) ou si elle est brisee...
+		    Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
+                                                      edge_Efacet.second);
+		    Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
+                                                      edge_Efacet.second);
+
+		    e1 = compute_value(edge_Ifacet_1);
+		    e2 = compute_value(edge_Ifacet_2);
+
+		    if ((e1.first >= STANDBY_CANDIDATE)&&(e2.first >= STANDBY_CANDIDATE))
+		      return NOT_VALID_CONNECTING_CASE;
+
+		    // vu compute value: les candidats oreilles fournis sont sans
+		    // aretes interieures et le sommet oppose n'est pas non plus interieur
+		    Edge_incident_facet ear1 = e1.second.second;
+		    Edge_incident_facet ear2 = e2.second.second;
+
+		    int ear1_i = (6 - ear1.second
+				  - ear1.first.second
+				  - ear1.first.third);
+		    Cell_handle ear1_c =  ear1.first.first;
+		    Border_elt result_ear1;
+
+		    int ear2_i = (6 - ear2.second
+				  - ear2.first.second
+				  - ear2.first.third);
+		    Cell_handle ear2_c =  ear2.first.first;
+		    Border_elt result_ear2;
+
+		    Edge_like ear1_e, ear2_e;
+		    // pour maintenir la reconstruction d'une surface orientable :
+		    // on verifie que les bords se recollent dans des sens opposes
+		    if (ordered_key.first==v1)
+		      {
+			ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i));
+			ear2_e = Edge_like(ear2_c ->vertex(ear2_i), c->vertex(i));
+		      }
+		    else
+		      {
+			ear1_e = Edge_like(ear1_c ->vertex(ear1_i), c->vertex(i));
+			ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i));
+		      }
+
+		    //maintient la surface orientable
+		    bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1);
+		    bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2);
+		    bool ear1_valid(false), ear2_valid(false);
+		    if (is_border_ear1&&(e1.first < STANDBY_CANDIDATE)&&
+			(e1.first <=  value)&&
+			(result12.second==result_ear1.second))
+		      {
+			ear1_valid = test_merge(ear1_e, result_ear1, v1,
+						priority(*this, ear1_c, ear1.second)) != 0;
+		      }
+		    if (is_border_ear2&&(e2.first < STANDBY_CANDIDATE)&&
+			(e2.first <= value)&&
+			(result12.second==result_ear2.second))
+		      {
+			ear2_valid = test_merge(ear2_e, result_ear2, v2,
+						priority(*this, ear2_c, ear2.second)) != 0;
+		      }
+		    if ((!ear1_valid)&&(!ear2_valid))
+		      return NOT_VALID_CONNECTING_CASE;
+
+		    IO_edge_type* p1;
+		    IO_edge_type* p2;
+
+		    border_extend(ordered_key, result12,
+				  v1, v2, c->vertex(i),
+				  e1, e2, p1, p2);
+
+		    if (ear1_valid&&ear2_valid&&(ear1_e==ear2_e))
+		      {
+			if (e1.first < e2.first)
+			  {
+			    Validation_case res = validate(ear1, e1.first);
+			    if (!((res == EAR_CASE)||(res == FINAL_CASE)))
+			      std::cerr << "+++probleme de recollement : cas "
+					<< res << std::endl;
+			    e2 = compute_value(edge_Ifacet_2);
+
+			    if (ordered_key.first == v1)
+			      p2 = set_again_border_elt(c->vertex(i), v2,
+							Border_elt(e2, result2.second));
+			    else
+			      p2 = set_again_border_elt(v2, c->vertex(i),
+							Border_elt(e2, result2.second));
+
+			    _ordered_border.insert(Radius_ptr_type(e2.first, p2));
+			  }
+			else
+			  {
+			    Validation_case res = validate(ear2, e2.first);
+			    if (!((res == EAR_CASE)||(res == FINAL_CASE)))
+			      std::cerr << "+++probleme de recollement : cas "
+					<< res << std::endl;
+			    e1 = compute_value(edge_Ifacet_1);
+
+			    if (ordered_key.first == v1)
+			      p1 = set_again_border_elt(v1, c->vertex(i),
+							Border_elt(e1, result1.second));
+			    else
+			      p1 = set_again_border_elt(c->vertex(i), v1,
+							Border_elt(e1, result1.second));
+
+			    _ordered_border.insert(Radius_ptr_type(e1.first, p1));
+			  }
+		      }
+		    else// les deux oreilles ne se recollent pas sur la meme arete...
+		      {
+			// on resoud la singularite.
+			if (ear1_valid)
+			  {
+			    Validation_case res = validate(ear1, e1.first);
+			    if (!((res == EAR_CASE)||(res == FINAL_CASE)))
+			      std::cerr << "+++probleme de recollement : cas "
+					<< res << std::endl;
+			  }
+			if (ear2_valid)
+			  {
+			    Validation_case res = validate(ear2, e2.first);
+			    if (!((res == EAR_CASE)||(res == FINAL_CASE)))
+			      std::cerr << "+++probleme de recollement : cas "
+					<< res << std::endl;
+			  }
+			// on met a jour la PQ s'il y a lieu... mais surtout pas
+			// avant la resolution de la singularite
+			if (!ear1_valid)
+			  {
+			    _ordered_border.insert(Radius_ptr_type(e1.first, p1));
+			  }
+			if (!ear2_valid)
+			  {
+			    _ordered_border.insert(Radius_ptr_type(e2.first, p2));
+			  }
+		      }
+		    select_facet(c, edge_Efacet.second);
+		    return CONNECTING_CASE;
+		  }
+                }
+            }
+        }
+      return NOT_VALID;
+    }
+
+    //=====================================================================
+    void
+    re_compute_values()
+    {
+      if(!_ordered_border.empty())
+        {
+          Ordered_border_type _ordered_border_tmp;
+          do
+            {
+              Ordered_border_iterator e_it = _ordered_border.begin();
+              Edge_incident_facet mem_Ifacet =  e_it->second->first;
+              Cell_handle c_tmp = mem_Ifacet.first.first;
+              _ordered_border.erase(e_it);
+              Vertex_handle v1 = c_tmp->vertex(mem_Ifacet.first.second);
+              Vertex_handle v2 = c_tmp->vertex(mem_Ifacet.first.third);
+
+              Radius_edge_type new_candidate;
+              new_candidate = compute_value(mem_Ifacet);
+
+              if (new_candidate.first == STANDBY_CANDIDATE)
+                {
+                  // a garder pour un K un peu plus grand...
+                  new_candidate.first = STANDBY_CANDIDATE_BIS;
+                }
+
+              Border_elt result;
+              Edge_like key_tmp(v1,v2);
+              is_border_elt(key_tmp, result);
+              IO_edge_type* pnew =
+                set_again_border_elt(key_tmp.first, key_tmp.second,
+                                     Border_elt (new_candidate, result.second));
+              _ordered_border_tmp.insert(Radius_ptr_type(new_candidate.first, pnew));
+            }
+          while(!_ordered_border.empty());
+
+          _ordered_border.swap(_ordered_border_tmp);
+        }
+    }
+
+    //---------------------------------------------------------------------
+    void
+    extend()
+    {
+      // initilisation de la variable globale K: qualite d'echantillonnage requise
+      K = K_init; // valeur d'initialisation de K pour commencer prudemment...
+
+      Vertex_handle v1, v2;
+      if (_ordered_border.empty()){
+        return;
+      }
+      do
+        {
+          min_K = infinity(); // pour retenir le prochain K necessaire pour progresser...
+          do
+            {
+
+              Ordered_border_iterator e_it = _ordered_border.begin();
+
+              criteria value = e_it->first;
+              if (value >= STANDBY_CANDIDATE)
+                re_compute_values();
+              else
+                {
+                  Edge_incident_facet candidate = e_it->second->second;
+                  Cell_handle c_ext =  candidate.first.first;
+                  int i1, i2 , i3;
+                  i1 = candidate.first.second;
+                  i2 = candidate.first.third;
+                  i3 = (6 - i1- i2 - candidate.second);
+
+                  Edge_incident_facet mem_Ifacet =  e_it->second->first;
+                  Cell_handle c_tmp =  mem_Ifacet.first.first;
+
+                  v1 = c_tmp->vertex(mem_Ifacet.first.second);
+                  v2 = c_tmp->vertex(mem_Ifacet.first.third);
+
+                  Radius_edge_type mem_e_it(e_it->first, *e_it->second);
+
+                  _ordered_border.erase(e_it);
+                  Validation_case validate_result = validate(candidate, value);
+                  if ((validate_result == NOT_VALID)||
+                      (validate_result == NOT_VALID_CONNECTING_CASE))
+                    {
+                      Radius_edge_type new_candidate;
+                      Border_elt result;
+                      Edge_like key_tmp(v1,v2);
+                      is_border_elt(key_tmp, result);
+
+                      if (validate_result == NOT_VALID_CONNECTING_CASE)
+                        set_incidence_request(c_ext->vertex(i3), value, key_tmp);
+
+                      if (validate_result == NOT_VALID)
+                        {
+                          new_candidate = compute_value(mem_Ifacet);
+                          if ((new_candidate != mem_e_it))
+                            // 			      &&(new_candidate.first < NOT_VALID_CANDIDATE))
+                            {
+                              IO_edge_type* pnew =
+                                set_again_border_elt(key_tmp.first, key_tmp.second,
+                                                     Border_elt (new_candidate, result.second));
+                              _ordered_border.insert(Radius_ptr_type(new_candidate.first,
+                                                                     pnew));
+                            }
+                        }
+                    }
+                }
+            }
+          while((!_ordered_border.empty())&&
+                (_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS));
+
+          K += (std::max)(K_step, min_K - K + eps);
+          // on augmente progressivement le K mais on a deja rempli sans
+          // faire des betises auparavant...
+        }
+      while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity()));
+
+#ifdef VERBOSE
+      if ((min_K < infinity())&&(!_ordered_border.empty())) {
+        std::cout << "   [ next K required = " << min_K << " ]" << std::endl;
+      }
+#endif // VERBOSE
+    }
+
+
+    //---------------------------------------------------------------------
+    // En principe, si l'allocateur de cellules etait bien fait on aurait pas besoin
+    // de mettre a jour les valeurs rajoutees pour les cellules a  la main...
+
+    void
+    re_init_for_free_cells_cache(const Vertex_handle& vh)
+    {
+      std::list<Cell_handle> ch_set;
+      T.incident_cells(vh, std::back_inserter(ch_set));
+      for (typename std::list<Cell_handle>::iterator c_it = ch_set.begin();
+           c_it != ch_set.end();
+           c_it++)
+        (*c_it)->clear();
+    }
+
+    //---------------------------------------------------------------------
+    void
+    swap_selected_facets_on_conflict_boundary(const Vertex_handle& vh)
+    {
+      std::list<Cell_handle> ch_set;
+      T.incident_cells(vh, std::back_inserter(ch_set));
+      for (typename std::list<Cell_handle>::iterator c_it = ch_set.begin();
+           c_it != ch_set.end(); c_it++)
+        {
+          Cell_handle c = *c_it;
+          int index = c->index(vh);
+          Cell_handle neigh = c->neighbor(index);
+          int n_ind = neigh->index(c);
+          neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul
+          // si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par
+          // compute_value... donc a swapper aussi
+          if (c->is_selected_facet(index))
+            {
+              int fn = c->facet_number(index);
+              unselect_facet(c, index);
+              neigh->select_facet(n_ind);
+              neigh->set_facet_number(n_ind, fn);
+              int i1 = (n_ind+1) & 3;
+              int i2 = (n_ind+2) & 3;
+              int i3 = (n_ind+3) & 3;
+              Edge_like key(neigh->vertex(i1), neigh->vertex(i2));
+
+              if (is_border_elt(key))
+                {
+                  Edge_incident_facet ei_facet(Edge(neigh, i1, i2),
+                                               n_ind);
+                  *border_IO_elt(key.first, key.second) =
+                    IO_edge_type(ei_facet, ei_facet);
+                }
+              key = Edge_like(neigh->vertex(i1), neigh->vertex(i3));
+              if (is_border_elt(key))
+                {
+                  Edge_incident_facet ei_facet(Edge(neigh, i1, i3),
+                                               n_ind);
+                  *border_IO_elt(key.first, key.second) =
+                    IO_edge_type(ei_facet, ei_facet);
+                }
+              key = Edge_like(neigh->vertex(i3), neigh->vertex(i2));
+              if (is_border_elt(key))
+                {
+                  Edge_incident_facet ei_facet(Edge(neigh, i3, i2),
+                                               n_ind);
+                  *border_IO_elt(key.first, key.second) =
+                    IO_edge_type(ei_facet, ei_facet);
+                }
+            }
+        }
+    }
+
+    //---------------------------------------------------------------------
+    Facet
+    next_surface_facet(const Edge_incident_facet& start)
+    {
+      Edge_incident_facet circ = next(start);
+      Cell_handle c =  start.first.first;
+      do
+        {
+          Cell_handle ch =  circ.first.first;
+          int ind = circ.second;
+          Cell_handle neigh = ch->neighbor(ind);
+          int n_ind = neigh->index(ch);
+          if (ch->is_selected_facet(ind)){
+            return Facet(ch, ind);
+          }
+          if (neigh->is_selected_facet(n_ind)){
+            return Facet(neigh, n_ind);
+          }
+          circ = next(circ);
+        }
+      while(circ.first.first != c);
+      // si on passe par la, alors y a eu un probleme....
+      std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl;
+      return Facet(c, start.second);
+    }
+
+    //---------------------------------------------------------------------
+    void
+    retract_border_for_incident_facets(const Vertex_handle& vh)
+    {
+      Next_border_elt border_elt =  *(vh->first_incident());
+      int border_index = border_elt.second.second;
+      Vertex_handle vh_succ = border_elt.first;
+      IO_edge_type io_edge = border_elt.second.first.second;
+      Edge_incident_facet i_facet = io_edge.first;
+      Cell_handle c = i_facet.first.first;
+      int i1 = c->index(vh);
+      int i2 = c->index(vh_succ);
+      int index = i_facet.second;
+      int i3 = 6 - index - i1 - i2;
+      Vertex_handle vh_int = c->vertex(i3);
+      ordered_map_erase(border_elt.second.first.first,
+                        border_IO_elt(vh, vh_succ));
+      remove_border_edge(vh, vh_succ);
+      // 1- a virer au cas ou car vh va etre detruit
+      remove_interior_edge(vh_succ, vh);
+      bool while_cond(true);
+      do
+        {
+          _facet_number--;
+
+          CGAL_assertion(c->is_selected_facet(index));
+          unselect_facet(c, index);
+
+          Facet f32 =
+            next_surface_facet(Edge_incident_facet(Edge(c, i3, i2),
+                                                   index));
+
+          if (!vh_int->is_on_border())
+            {
+              re_init(vh_int);
+              vh_int->inc_mark();
+            }
+
+          Edge_incident_facet e32(Edge(f32.first,
+                                       f32.first->index(vh_int),
+                                       f32.first->index(vh_succ)), f32.second);
+          Radius_edge_type rad_elt_32(STANDBY_CANDIDATE, IO_edge_type(e32, e32));
+          Border_elt result;
+          if (is_ordered_border_elt(Edge_like(vh_int, vh), result))
+            {
+              ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh));
+              remove_border_edge(vh_int, vh);
+              // 1- a virer au cas ou car vh va etre detruit
+              remove_interior_edge(vh_int, vh);
+              while_cond = false;
+            }
+          // a titre  preventif... on essaye de s'assurer de marquer les aretes
+          // interieures au sens large...
+
+          // 2- a virer a tout pris pour que maintenir le sens de interior edge
+          remove_interior_edge(vh_int, vh_succ);
+          remove_interior_edge(vh_succ, vh_int);
+
+          IO_edge_type* p32 = set_border_elt(vh_int, vh_succ,
+                                             Border_elt(rad_elt_32, border_index));
+          _ordered_border.insert(Radius_ptr_type (STANDBY_CANDIDATE, p32));
+
+          // incrementation...
+          if (while_cond)
+            {
+              Facet f31 =
+                next_surface_facet(Edge_incident_facet(Edge(c, i3, i1),
+                                                       index));
+
+              c = f31.first;
+              index = f31.second;
+              i1 = c->index(vh);
+              vh_succ = vh_int;
+              i2 = c->index(vh_int);
+              i3 = 6 - index - i1 - i2;
+              vh_int = c->vertex(i3);
+            }
+        }
+      while(while_cond);
+    }
+
+    //---------------------------------------------------------------------
+    bool
+    create_singularity(const Vertex_handle& vh)
+    {
+      // Pour reperer le cas de triangle isole
+      if (vh->is_on_border())
+        {
+          // vh sommet 0
+          Next_border_elt border_elt =  *(vh->first_incident());
+          Vertex_handle vh_1 = border_elt.first;// sommet 1
+          border_elt =  *(vh_1->first_incident());
+          Vertex_handle vh_2 = border_elt.first;// sommet 2
+          border_elt =  *(vh_2->first_incident());
+          Vertex_handle vh_3 = border_elt.first;// sommet 0 ???
+          Cell_handle c;
+          int i, j, k;
+          if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k)))
+            {
+              int l = 6-i-j-k;
+              Cell_handle neigh = c->neighbor(l);
+
+              if
+                (c->is_selected_facet(l)||neigh->is_selected_facet(neigh->index(c)))
+                return true;
+            }
+        }
+
+
+      // Reperer le cas d'aretes interieures...
+      std::list<Vertex_handle> vh_list;
+      T.incident_vertices(vh, std::back_inserter(vh_list));
+
+      for (typename std::list<Vertex_handle>::iterator v_it = vh_list.begin();
+           v_it != vh_list.end(); v_it++)
+        if ((*v_it)->is_on_border() && is_interior_edge(Edge_like(vh, *v_it)))
+          return true;
+      return false;
+    }
+
+
+    //---------------------------------------------------------------------
+    void
+    store_outlier(const Point& p){
+      m_outliers.push_back(p);
+    }
+
+
+    void dec_vh_number()
+    {
+      _vh_number--;
+    }
+
+
+    struct Remove : public std::unary_function<Vertex_handle, bool>
+    {
+
+      Extract& E;
+      Triangulation_3& T;
+
+      Remove(Extract& E_, Triangulation_3& T_) : E(E_), T(T_) {}
+
+      bool operator()(Vertex_handle vh) {
+        if (vh->is_exterior())
+          {
+            E.swap_selected_facets_on_conflict_boundary(vh);
+            E.re_init_for_free_cells_cache(vh);
+            Point p = vh->point();
+            T.remove(vh);
+            E.dec_vh_number();
+            E.store_outlier(p);
+
+            return true;
+          }
+        else if (vh->is_on_border()&&(!E.create_singularity(vh)))
+          {
+            E.swap_selected_facets_on_conflict_boundary(vh);
+            E.retract_border_for_incident_facets(vh);
+            E.re_init_for_free_cells_cache(vh);
+            Point p = vh->point();
+            T.remove(vh);
+            E.dec_vh_number();
+            E.store_outlier(p);
+
+            return true;
+          }
+        else
+          { }
+        return false;
+      }
+    };
+
+
+    //---------------------------------------------------------------------
+    bool
+    postprocessing()
+    {
+      postprocess_timer.start();
+
+      _postprocessing_counter++;
+
+      std::list<Vertex_handle> L_v;
+
+      //  Pour controler les sommets choisis sur le bord...
+
+      // nombre d'aretes a partir duquel on considere que c'est irrecuperable NB_BORDER_MAX
+
+      int vh_on_border_inserted(0);
+      for(Finite_vertices_iterator v_it = T.finite_vertices_begin();
+          v_it != T.finite_vertices_end();
+          v_it++)
+        {
+          erase_incidence_request(v_it);
+          if ((v_it->is_on_border())&&
+              (!v_it->is_post_marked(_postprocessing_counter)))
+            {
+              std::list<Vertex_handle> L_v_tmp;
+              Vertex_handle vprev_it(v_it), done(vprev_it), vh_it;
+              // 	  Vertex_handle vsucc_it;
+              int v_count(0);
+              // collect all vertices on the border
+              do
+                {
+                  vh_it =  vprev_it->first_incident()->first;
+                  L_v_tmp.push_back(vh_it);
+                  vh_it->set_post_mark(_postprocessing_counter);
+                  vprev_it = vh_it;
+                  v_count++;
+                }
+              while((vprev_it != done)&&(v_count < NB_BORDER_MAX));
+              // we stopped either because we did a complete tour, or because
+              // the border was so long that we consider it as too big to close
+              // e.g., if it is a terrain with only one real border at the exterior
+              if (v_count < NB_BORDER_MAX)
+                {
+                  L_v.insert(L_v.begin(), L_v_tmp.begin(), L_v_tmp.end());
+                  vh_on_border_inserted += v_count;
+                }
+
+            }
+          if (v_it->is_exterior())
+            L_v.push_back(v_it);
+        }
+
+      std::size_t itmp, L_v_size_mem;
+      L_v_size_mem = L_v.size();
+      if ((vh_on_border_inserted != 0)&& // pour ne post-traiter que les bords
+          (L_v.size() < .1 * _size_before_postprocessing))
+        {
+          {
+            do
+              {
+                itmp = L_v.size();
+                typename std::list<Vertex_handle>::iterator new_end =
+                  std::remove_if(L_v.begin(), L_v.end(), Remove(*this,T));
+                L_v.erase(new_end, L_v.end());
+              }
+            while (!L_v.empty() && (L_v.size() < itmp));
+          }
+#ifdef VERBOSE
+          if(L_v.size() > 0){
+            std::cout << "   " << L_v.size() << " non regular points." << std::endl;
+          }
+#endif // VERBOSE
+          re_compute_values();
+        }
+      else{
+        postprocess_timer.stop();
+        return false;
+      }
+      // we stop if we removed more than 10% of points or after 20 rounds
+      if ((L_v_size_mem == L_v.size())||
+          ((_size_before_postprocessing - T.number_of_vertices()) >
+           .1 * _size_before_postprocessing)||
+          (_postprocessing_counter > 20)){
+        postprocess_timer.stop();
+        return false;
+      }
+
+      min_K = infinity();
+      // fin--
+      //   if (_postprocessing_counter < 5)
+      //     return true;
+      postprocess_timer.stop();
+      return true;
+    }
+
+  }; // class Advancing_front_surface_reconstruction
+
+  namespace AFSR {
+
+    template <typename T>
+    struct Auto_count : public std::unary_function<const T&,std::pair<T,std::size_t> >{
+      mutable std::size_t i;
+
+      Auto_count()
+        : i(0)
+      {}
+
+      std::pair<T,std::size_t> operator()(const T& p) const {
+        return std::make_pair(p,i++);
+      }
+    };
+
+    template <typename T, typename CC>
+    struct Auto_count_cc : public std::unary_function<const T&,std::pair<T,std::size_t> >{
+      mutable std::size_t i;
+      CC cc;
+
+      Auto_count_cc(CC cc)
+        : i(0), cc(cc)
+      {}
+
+      template <typename T2>
+      std::pair<T,std::size_t> operator()(const T2& p) const {
+        return std::make_pair(cc(p),i++);
+      }
+    };
+  }
+
+  /*!
+  \ingroup PkgAdvancingFrontSurfaceReconstruction
+
+  For a sequence of points computes a sequence of index triples
+  describing the faces of the reconstructed surface.
+
+  \tparam PointInputIterator must be an input iterator with 3D points as value type.  This point type must
+  be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
+  \tparam IndicesOutputIterator must be an output iterator to which
+  `CGAL::cpp11::tuple<std::size_t,std::size_t,std::size_t>` can be assigned.
+
+  \param b iterator on the first point of the sequence
+  \param e past the end iterator of the point sequence
+  \param out output iterator
+  \param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
+         are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
+         Described in Section \ref AFSR_Boundaries
+  \param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
+         Described in Section \ref AFSR_Selection
+
+  */
+  template <typename PointInputIterator, typename IndicesOutputIterator>
+  IndicesOutputIterator
+  advancing_front_surface_reconstruction(PointInputIterator b,
+                                         PointInputIterator e,
+                                         IndicesOutputIterator out,
+                                         double radius_ratio_bound = 5,
+                                         double beta = 0.52 )
+  {
+    typedef Exact_predicates_inexact_constructions_kernel Kernel;
+    typedef Advancing_front_surface_reconstruction_vertex_base_3<Kernel> LVb;
+    typedef Advancing_front_surface_reconstruction_cell_base_3<Kernel> LCb;
+
+    typedef Triangulation_data_structure_3<LVb,LCb> Tds;
+    typedef Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
+
+    typedef Advancing_front_surface_reconstruction<Triangulation_3> Reconstruction;
+    typedef typename std::iterator_traits<PointInputIterator>::value_type InputPoint;
+    typedef typename Kernel_traits<InputPoint>::Kernel InputKernel;
+    typedef Cartesian_converter<InputKernel,Kernel> CC;
+    typedef Kernel::Point_3 Point_3;
+
+    CC cc=CC();
+    Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc<Point_3,CC>(cc)),
+                        boost::make_transform_iterator(e, AFSR::Auto_count_cc<Point_3,CC>(cc) )  );
+
+    Reconstruction R(dt);
+    R.run(radius_ratio_bound, beta);
+    write_triple_indices(out, R);
+    return out;
+  }
+
+  /*!
+  \ingroup PkgAdvancingFrontSurfaceReconstruction
+
+  For a sequence of points computes a sequence of index triples
+  describing the faces of the reconstructed surface.
+
+  \tparam PointInputIterator must be an input iterator with 3D points as value type.  This point type must
+  be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
+  \tparam IndicesOutputIterator must be an output iterator to which
+  `CGAL::cpp11::tuple<std::size_t,std::size_t,std::size_t>` can be assigned.
+  \tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
+  priority of the facet `(Cell_handle,int)`.
+
+  \param b iterator on the first point of the sequence
+  \param e past the end iterator of the point sequence
+  \param out output iterator
+  \param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
+         are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
+         Described in Section \ref AFSR_Boundaries
+  \param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
+         Described in Section \ref AFSR_Selection
+  \param priority allows the user to choose how candidate triangles are prioritized.
+
+  */
+  template <typename PointInputIterator, typename IndicesOutputIterator, typename Priority>
+  IndicesOutputIterator
+  advancing_front_surface_reconstruction(PointInputIterator b,
+                                         PointInputIterator e,
+                                         IndicesOutputIterator out,
+                                         Priority priority,
+                                         double radius_ratio_bound = 5,
+                                         double beta = 0.52 )
+  {
+    typedef Exact_predicates_inexact_constructions_kernel Kernel;
+    typedef Advancing_front_surface_reconstruction_vertex_base_3<Kernel> LVb;
+    typedef Advancing_front_surface_reconstruction_cell_base_3<Kernel> LCb;
+
+    typedef Triangulation_data_structure_3<LVb,LCb> Tds;
+    typedef Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
+
+    typedef Advancing_front_surface_reconstruction<Triangulation_3,Priority> Reconstruction;
+    typedef typename std::iterator_traits<PointInputIterator>::value_type InputPoint;
+    typedef typename Kernel_traits<InputPoint>::Kernel InputKernel;
+    typedef Cartesian_converter<InputKernel,Kernel> CC;
+    typedef Kernel::Point_3 Point_3;
+
+    CC cc=CC();
+    Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc<Point_3,CC>(cc)),
+                        boost::make_transform_iterator(e, AFSR::Auto_count_cc<Point_3,CC>(cc) )  );
+
+    Reconstruction R(dt, priority);
+    R.run(radius_ratio_bound, beta);
+    write_triple_indices(out, R);
+    return out;
+  }
+
+
+  template <typename PointInputIterator, typename Kernel, typename Items,  template < class T, class I, class A> class HDS, typename Alloc,typename Priority>
+  void
+  advancing_front_surface_reconstruction(PointInputIterator b,
+                                         PointInputIterator e,
+                                         Polyhedron_3<Kernel,Items,HDS,Alloc>& polyhedron,
+                                         Priority priority,
+                                         double radius_ratio_bound = 5,
+                                         double beta = 0.52)
+  {
+    typedef Advancing_front_surface_reconstruction_vertex_base_3<Kernel> LVb;
+    typedef Advancing_front_surface_reconstruction_cell_base_3<Kernel> LCb;
+
+    typedef Triangulation_data_structure_3<LVb,LCb> Tds;
+    typedef Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
+
+    typedef Advancing_front_surface_reconstruction<Triangulation_3,Priority> Reconstruction;
+    typedef typename std::iterator_traits<PointInputIterator>::value_type InputPoint;
+    typedef typename Kernel_traits<InputPoint>::Kernel InputKernel;
+    typedef Cartesian_converter<InputKernel,Kernel> CC;
+    typedef typename Kernel::Point_3 Point_3;
+
+    CC cc=CC();
+    Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc<Point_3,CC>(cc)),
+                        boost::make_transform_iterator(e, AFSR::Auto_count_cc<Point_3,CC>(cc) )  );
+
+    Reconstruction R(dt, priority);
+    R.run(radius_ratio_bound, beta);
+    AFSR::construct_polyhedron(polyhedron, R);
+  }
+
+
+  template <typename PointInputIterator, typename Kernel, typename Items, template < class T, class I, class A> class HDS, typename Alloc>
+  void
+  advancing_front_surface_reconstruction(PointInputIterator b,
+                                         PointInputIterator e,
+                                         Polyhedron_3<Kernel,Items,HDS,Alloc>& polyhedron,
+                                         double radius_ratio_bound = 5,
+                                         double beta = 0.52)
+  {
+    typedef Advancing_front_surface_reconstruction_vertex_base_3<Kernel> LVb;
+    typedef Advancing_front_surface_reconstruction_cell_base_3<Kernel> LCb;
+
+    typedef Triangulation_data_structure_3<LVb,LCb> Tds;
+    typedef Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
+
+    typedef Advancing_front_surface_reconstruction<Triangulation_3> Reconstruction;
+    typedef typename std::iterator_traits<PointInputIterator>::value_type InputPoint;
+    typedef typename Kernel_traits<InputPoint>::Kernel InputKernel;
+    typedef Cartesian_converter<InputKernel,Kernel> CC;
+    typedef typename Kernel::Point_3 Point_3;
+    CC cc=CC();
+    Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc<Point_3,CC>(cc)),
+                        boost::make_transform_iterator(e, AFSR::Auto_count_cc<Point_3,CC>(cc) )  );
+
+    Reconstruction R(dt);
+    R.run(radius_ratio_bound, beta);
+    AFSR::construct_polyhedron(polyhedron, R);
+  }
+
+
+
+} // namespace CGAL
+
+#endif // CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h
new file mode 100644
index 0000000..06f71e9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h
@@ -0,0 +1,253 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_CELL_BASE_3_H
+#define CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_CELL_BASE_3_H
+
+#include <CGAL/Triangulation_cell_base_3.h>
+
+namespace CGAL {
+
+  /*!
+  \ingroup PkgAdvancingFrontSurfaceReconstruction
+
+  The class `Advancing_front_surface_reconstruction_cell_base_3` is the default
+  cell type for the class  `Advancing_front_surface_reconstruction`.
+
+  \tparam Traits has to be a model of `DelaunayTriangulationTraits_3`.
+
+  \tparam Cb has to be a model of `TriangulationCellBase_3`.
+  */
+  template < typename Traits, typename Cb = Triangulation_cell_base_3<Traits> >
+  class Advancing_front_surface_reconstruction_cell_base_3 : public Cb
+  {
+
+  public:
+    template < typename TDS2 >
+    struct Rebind_TDS {
+      typedef typename Cb::template Rebind_TDS<TDS2>::Other  Cb2;
+      typedef Advancing_front_surface_reconstruction_cell_base_3<Traits,Cb2>                    Other;
+    };
+
+    typedef typename Cb::Vertex_handle Vertex_handle;
+    typedef typename Cb::Cell_handle Cell_handle;
+
+  private:
+
+#ifdef AFSR_FACET_NUMBER
+    int _facet_number[4];
+#endif
+    typedef double coord_type;
+#ifdef AFSR_LAZY
+    typedef typename CGAL::Simple_cartesian<coord_type>::Point_3 D_Point;
+#endif
+    //-------------------- DATA MEMBERS ---------------------------------
+
+    coord_type* _smallest_radius_facet_tab;
+    unsigned char selected_facet;
+#ifdef AFSR_LAZY
+    D_Point* _circumcenter;
+    coord_type* _squared_radius;
+#endif
+
+    //-------------------- CONSTRUCTORS ----------------------------------
+
+  public:
+
+    Advancing_front_surface_reconstruction_cell_base_3()
+      : Cb(),
+        _smallest_radius_facet_tab(NULL), selected_facet(0)
+#ifdef AFSR_LAZY
+      , _circumcenter(NULL), _squared_radius(NULL)
+#endif
+    {
+#ifdef AFSR_FACET_NUMBER
+      for(int i = 0; i < 4; i++){
+	_facet_number[i] = -1;
+      }
+#endif
+    }
+
+    Advancing_front_surface_reconstruction_cell_base_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
+      : Cb( v0, v1, v2, v3),
+        _smallest_radius_facet_tab(NULL), selected_facet(0)
+#ifdef AFSR_LAZY
+      , _circumcenter(NULL), _squared_radius(NULL)
+#endif
+    {
+#ifdef FACET_NUMBER
+      for(int i = 0; i < 4; i++){
+	_facet_number[i] = -1;
+      }
+#endif
+    }
+
+    Advancing_front_surface_reconstruction_cell_base_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
+                                                       Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
+      : Cb(v0,  v1,  v2, v3,
+           n0,  n1,  n2, n3),
+        _smallest_radius_facet_tab(NULL), selected_facet(0)
+#ifdef AFSR_LAZY
+      , _circumcenter(NULL), _squared_radius(NULL)
+#endif
+    {
+#ifdef AFSR_FACET_NUMBER
+      for(int i = 0; i < 4; i++){
+	_facet_number[i] = -1;
+      }
+#endif
+    }
+
+    //-------------------- DESTRUCTOR -----------------------------------
+
+    inline ~Advancing_front_surface_reconstruction_cell_base_3()
+    {
+      if (_smallest_radius_facet_tab != NULL)
+        delete[] _smallest_radius_facet_tab;
+#ifdef AFSR_LAZY
+      if (_circumcenter != NULL)
+	delete _circumcenter;
+      if (_squared_radius != NULL)
+	delete _squared_radius;
+#endif
+    }
+
+    //--------------------  MEMBER FUNCTIONS ----------------------------
+  public:
+
+    inline void clear()
+    {
+      if (_smallest_radius_facet_tab != NULL)
+	delete[] _smallest_radius_facet_tab;
+      _smallest_radius_facet_tab = NULL;
+      selected_facet = 0;
+#ifdef AFSR_LAZY
+      if (_circumcenter != NULL)
+	delete _circumcenter;
+      _circumcenter = NULL;
+      if (_squared_radius != NULL)
+	delete _squared_radius;
+      _squared_radius = NULL;
+#endif
+    }
+
+    //-------------------------------------------------------------------
+    inline coord_type smallest_radius(const int& i)
+    {
+      if (_smallest_radius_facet_tab == NULL)
+	return -1;
+      return _smallest_radius_facet_tab[i];
+    }
+
+    inline void set_smallest_radius(const int& i, const coord_type& c)
+    {
+      if (_smallest_radius_facet_tab == NULL)
+	{
+	  _smallest_radius_facet_tab = new coord_type[4];
+	  for(int i = 0; i < 4; i++)
+	    _smallest_radius_facet_tab[i] = -1;
+	}
+      _smallest_radius_facet_tab[i] = c;
+    }
+
+    // pour un controle de l'allocation memoire... utile???
+    inline bool alloc_smallest_radius_tab(coord_type* ptr)
+    {
+      if (_smallest_radius_facet_tab==NULL)
+	{
+	  _smallest_radius_facet_tab = ptr;
+	  return true;
+	}
+      return false;
+    }
+
+
+    //-------------------------------------------------------------------
+
+#ifdef FACET_NUMBER
+    void set_facet_number(int i, int n){}
+    {
+      _facet_number[i] = n;
+    }
+
+    int facet_number(int i)
+    {
+      return _facet_number[i];
+    }
+#else
+    void set_facet_number(int, int){}
+    int facet_number(int){return 0;}
+#endif
+
+
+    //-------------------------------------------------------------------
+
+    inline void select_facet(const int& i)
+    {
+      selected_facet |= (1 << i);
+    }
+
+    inline void unselect_facet(const int& i)
+    {
+      selected_facet &= (15 - (1 << i));
+    }
+
+    inline bool is_selected_facet(const int& i)
+    {
+      return (selected_facet & (1 << i)) != 0;
+    }
+
+    inline bool has_facet_on_surface(const int& i)
+    {
+      return (selected_facet & (1 << i)) != 0;
+    }
+
+#ifdef AFSR_LAZY
+
+    //-------------------------------------------------------------------
+
+    inline D_Point* lazy_circumcenter()
+    {
+      return _circumcenter;
+    }
+
+    inline void set_lazy_circumcenter(const D_Point& p)
+    {
+      _circumcenter = new D_Point(p);
+    }
+
+    //-------------------------------------------------------------------
+
+    inline coord_type* lazy_squared_radius()
+    {
+      return _squared_radius;
+    }
+
+    inline void set_lazy_squared_radius(const coord_type& sr)
+    {
+      _squared_radius = new coord_type(sr);
+    }
+
+#endif //AFSR_LAZY
+
+  };
+
+} // namespace CGAL
+
+#endif // CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_CELL_BASE_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
new file mode 100644
index 0000000..a510d4c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
@@ -0,0 +1,286 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_VERTEX_BASE_WITH_ID_3_H
+#define CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_VERTEX_BASE_WITH_ID_3_H
+
+#include <CGAL/Triangulation_vertex_base_3.h>
+#include <CGAL/utility.h>
+
+#include <utility>
+
+#include <list>
+
+
+
+namespace CGAL {
+
+  template <class B, class C> class Advancing_front_surface_reconstruction;
+
+  /*!
+  \ingroup PkgAdvancingFrontSurfaceReconstruction
+
+  The class `Advancing_front_surface_reconstruction_vertex_base_3` is the default
+  vertex type for the class  `Advancing_front_surface_reconstruction`.
+
+  \tparam Traits has to be a model of `DelaunayTriangulationTraits_3`.
+
+  \tparam Vb has to be a model of `TriangulationVertexBase_3`.
+  */
+  template <typename Traits, typename Vb = Triangulation_vertex_base_3<Traits> >
+  class Advancing_front_surface_reconstruction_vertex_base_3 : public Vb
+  {
+  public:
+
+    template < typename TDS2 >
+    struct Rebind_TDS {
+      typedef typename Vb::template Rebind_TDS<TDS2>::Other  Vb2;
+      typedef Advancing_front_surface_reconstruction_vertex_base_3<Traits,Vb2>  Other;
+    };
+
+
+    template <class B,class C> friend class Advancing_front_surface_reconstruction;
+
+
+    typedef Vb Base;
+    typedef typename Base::Vertex_handle Vertex_handle;
+    typedef typename Base::Cell_handle Cell_handle;
+    typedef typename Vb::Point Point;
+    typedef double coord_type;
+
+    typedef Triple< Cell_handle, int, int > Edge;
+    typedef std::pair< Edge, int > Edge_incident_facet;
+    typedef std::pair< Edge_incident_facet, Edge_incident_facet > IO_edge_type;
+
+    typedef coord_type criteria;
+
+    typedef std::pair< criteria, IO_edge_type > Radius_edge_type;
+    typedef std::pair< Radius_edge_type, int > Border_elt;
+    typedef std::pair< Vertex_handle, Border_elt > Next_border_elt;
+
+
+    //par convention je remplis d'abord first et si necessaire second...
+    typedef std::pair< Next_border_elt*,  Next_border_elt*> Intern_successors_type;
+
+
+
+  public:
+
+    typedef std::pair< criteria, IO_edge_type* > Radius_ptr_type;
+    typedef std::pair< Vertex_handle, Vertex_handle > Edge_like;
+    typedef std::pair< criteria,  Edge_like > Incidence_request_elt;
+    typedef std::list< Incidence_request_elt > Incidence_request_type;
+    typedef typename Incidence_request_type::iterator Incidence_request_iterator;
+
+
+    //-------------------- DATA MEMBERS ---------------------------------
+
+    typedef std::size_t Info;  // so that we are a model of TriangulationVertexBaseWithInfo_3
+
+  private:
+    std::size_t m_id;
+    int m_mark;
+    int m_post_mark;
+    Intern_successors_type* m_incident_border;
+
+    // Instead of having a set per vertex, there is a global list
+    // in the surface reconstruction class
+    // and two iterators per vertex in this list
+    // Note that m_ie_last is not past the end
+    // m_ie_first == m_ie_last == interior_edge.end()  iff  the set is empty
+    typename std::list<Vertex_handle>::iterator m_ie_first, m_ie_last;
+
+
+    // We do the same for the incidence requests
+    typename std::list< Incidence_request_elt >::iterator m_ir_first, m_ir_last;
+
+
+    //-------------------- CONSTRUCTORS ---------------------------------
+
+  public:
+
+    Advancing_front_surface_reconstruction_vertex_base_3()
+      : Vb(), m_mark(-1),
+        m_post_mark(-1)
+    {}
+
+    Advancing_front_surface_reconstruction_vertex_base_3(const Point & p)
+      : Vb(p), m_mark(-1),
+        m_post_mark(-1)
+    {}
+
+    Advancing_front_surface_reconstruction_vertex_base_3(const Point & p, Cell_handle f)
+      : Vb(p, f), m_mark(-1),
+        m_post_mark(-1)
+    {}
+
+    Advancing_front_surface_reconstruction_vertex_base_3(Cell_handle f)
+      : Vb(f), m_mark(-1),
+        m_post_mark(-1)
+    {}
+
+    Advancing_front_surface_reconstruction_vertex_base_3(const Advancing_front_surface_reconstruction_vertex_base_3& other)
+      : Vb(other), m_mark(-1),
+        m_post_mark(-1)
+    {}
+
+    //-------------------- MEMBER FUNCTIONS -----------------------------
+
+  public:
+
+    std::size_t& id()
+    {
+      return m_id;
+    }
+
+    const std::size_t& id() const
+    {
+      return m_id;
+    }
+
+    std::size_t& info()
+    {
+      return m_id;
+    }
+
+    const std::size_t& info() const
+    {
+      return m_id;
+    }
+
+
+    //-------------------------------------------------------------------
+  private:
+
+    void delete_border()
+    {
+      m_incident_border = NULL;
+    }
+
+
+    inline Next_border_elt* next_on_border(const int& i) const
+    {
+      if (m_incident_border == NULL) return NULL; //vh is interior
+      if (m_incident_border->first->first != NULL)
+	if (m_incident_border->first->second.second == i)
+	  return m_incident_border->first;
+      if (m_incident_border->second->first != NULL)
+	if (m_incident_border->second->second.second == i)
+	  return m_incident_border->second;
+      return NULL;
+    }
+
+
+
+
+    inline bool is_border_edge(Vertex_handle v) const
+    {
+      if (m_incident_border == NULL) return false;
+      return ((m_incident_border->first->first == v)||
+	      (m_incident_border->second->first == v));
+    }
+
+    inline Next_border_elt* border_elt(Vertex_handle v) const
+    {
+      if (m_incident_border == NULL) return NULL;
+      if (m_incident_border->first->first == v) return m_incident_border->first;
+      if (m_incident_border->second->first == v) return m_incident_border->second;
+      return NULL;
+    }
+
+  public:
+    inline Next_border_elt* first_incident() const
+    {
+      if (m_incident_border == NULL) return NULL;
+      return m_incident_border->first;
+    }
+  private:
+    inline Next_border_elt* second_incident() const
+    {
+      if (m_incident_border == NULL) return NULL;
+      return m_incident_border->second;
+    }
+
+
+    inline  void set_next_border_elt(const Next_border_elt& elt)
+    {
+      if (m_incident_border->first->first == NULL)
+	*m_incident_border->first = elt;
+      else
+	{
+	  if (m_incident_border->second->first != NULL)
+	    std::cerr << "+++probleme de MAJ du bord <Vertex_base>" << std::endl;
+	  *m_incident_border->second = elt;
+	}
+    }
+
+
+
+    //-------------------------------------------------------------------
+
+  public:
+
+    inline bool is_on_border() const
+    {
+      return (m_mark > 0);
+    }
+
+    inline bool not_interior() const
+    {
+      return (m_mark != 0);
+    }
+
+    inline int number_of_incident_border() const
+    {
+      return m_mark;
+    }
+
+    inline bool is_exterior() const
+    {
+      return (m_mark < 0);
+    }
+
+    //-------------------------------------------------------------------
+  private:
+
+    inline void inc_mark()
+    {
+      if (m_mark==-1)
+	m_mark=1;
+      else
+	m_mark++;
+    }
+
+    //-------------------------------------------------------------------
+  public:
+    inline void set_post_mark(const int& i)
+    {
+      m_post_mark = i;
+    }
+
+    inline bool is_post_marked(const int& i)
+    {
+      return (m_post_mark == i);
+    }
+  };
+
+} // namespace CGAL
+
+#endif // CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_VERTEX_BASE_3_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Aff_transformation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Aff_transformation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Aff_transformation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Aff_transformation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Aff_transformation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Aff_transformation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Aff_transformation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Aff_transformation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_extension_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_extension_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_extension_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_extension_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
new file mode 100644
index 0000000..c38eedf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
@@ -0,0 +1,2559 @@
+// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Kerber <mkerber at mpi-inf.mpg.de>
+//
+// ============================================================================
+
+#ifndef CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H
+#define CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H
+
+#include <vector>
+#include <set>
+#include <map>
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/logical.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Cache.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/Handle_with_policy.h>
+#include <CGAL/Arr_enums.h>
+
+#include <CGAL/Algebraic_kernel_d/Bitstream_descartes.h>
+#include <CGAL/Algebraic_kernel_d/Interval_evaluate_1.h>
+#include <CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h>
+#include <CGAL/Algebraic_kernel_d/macros.h>
+#include <CGAL/Algebraic_kernel_d/exceptions.h>
+#include <CGAL/Algebraic_kernel_d/enums.h>
+#include <CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h>
+#include <CGAL/Algebraic_kernel_d/Status_line_CA_1.h>
+#include <CGAL/Algebraic_kernel_d/Event_line_builder.h>
+#include <CGAL/Algebraic_kernel_d/Shear_controller.h>
+#include <CGAL/Algebraic_kernel_d/Shear_transformation.h>
+#include <CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h>
+#include <CGAL/Algebraic_kernel_d/shear.h>
+
+#include <CGAL/Polynomial_traits_d.h>
+
+
+
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+// put includes here
+#endif
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4290)
+#endif
+
+
+namespace CGAL {
+
+template<typename AlgebraicKernelWithAnalysis_2, 
+         typename Rep_>
+class Curve_analysis_2;
+
+namespace internal {
+
+template<typename Comparable,bool has_template_typedefs> 
+  struct Is_derived_from_Handle_with_policy {
+    typedef boost::false_type Tag;
+};
+  
+template<typename Comparable> 
+  struct Is_derived_from_Handle_with_policy<Comparable,true> {
+
+    typedef typename
+      boost::is_base_of< CGAL::Handle_with_policy
+                             < typename Comparable::T,
+			       typename Comparable::Handle_policy,
+                               typename Comparable::Allocator >,
+                         Comparable 
+                       >::type Tag;
+};
+
+
+template<typename Comparable,typename Tag> struct Compare_for_vert_line_map_ 
+    {
+      bool operator() (const Comparable& a, const Comparable& b) const {
+	return a<b;
+      }	
+};
+
+template<typename Comparable>
+  struct Compare_for_vert_line_map_<Comparable,boost::true_type> {
+
+    bool operator() (const Comparable& a, const Comparable& b) const {
+      return CGAL::Handle_id_less_than< Comparable >()(a,b);
+    }
+};
+
+template<typename Comparable> struct Compare_for_vert_line_map
+  : public std::binary_function<Comparable,Comparable,bool> {
+    
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(T)
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(Handle_policy)
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(Allocator)
+
+  typedef typename CGAL::internal::Is_derived_from_Handle_with_policy
+    < Comparable,
+      has_T<Comparable>::value &&
+      has_Handle_policy<Comparable>::value &&
+      has_Allocator<Comparable>::value>::Tag Tag;
+  
+  public:
+
+  bool operator() (const Comparable& a, const Comparable& b) const {
+
+    return eval(a,b);
+  }
+
+  private:
+    
+  Compare_for_vert_line_map_<Comparable,Tag> eval;
+  
+
+};
+
+
+// \brief Representation class for algebraic curves.
+template< typename AlgebraicKernelWithAnalysis_2>
+class Curve_analysis_2_rep {
+
+public:
+    //! this instance's template parameter
+    typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
+
+    //! the class itself
+    typedef Curve_analysis_2_rep Self;
+    
+    //! The handle class
+    typedef CGAL::Curve_analysis_2
+        <Algebraic_kernel_with_analysis_2,Self> Handle;
+    
+    //protected:
+public:
+
+    typedef int size_type;
+    
+    CGAL_ACK_SNAP_ALGEBRAIC_CURVE_KERNEL_2_TYPEDEFS(Handle);
+
+    typedef std::map< Bound, Status_line_1 > 
+    Vert_line_at_rational_map;
+    
+    typedef 
+    std::map< Algebraic_real_1, 
+              Status_line_1, 
+              internal::Compare_for_vert_line_map<Algebraic_real_1> >
+    Vert_line_map;
+    
+    //!\name Constructors
+    //!@{
+
+    //! Default constructor
+    Curve_analysis_2_rep()
+    {
+    }
+    
+    //! Constructor with polynomial
+    Curve_analysis_2_rep(Algebraic_kernel_with_analysis_2 *kernel,
+                         Polynomial_2 poly, 
+                         CGAL::Degeneracy_strategy strategy) :  
+        _m_kernel(kernel), f(poly), degeneracy_strategy(strategy)
+    {
+    }
+    
+    //!@}
+    
+private:
+
+    typedef internal::LRU_hashed_map<
+        Bound,
+        std::vector<Algebraic_real_1>,
+        internal::To_double_hasher > Intermediate_cache;
+
+    Intermediate_cache intermediate_cache;
+
+    typedef internal::Event_line_builder<Algebraic_kernel_with_analysis_2> 
+        Event_line_builder;
+    
+
+    // Internal information struct about x-coordinates
+    struct Event_coordinate_1 {
+        Event_coordinate_1(){} //added to solve a compilation error of gcc-3.4 (bug?)
+        Algebraic_real_1 val;
+        size_type mult_of_prim_res_root;
+        size_type index_of_prim_res_root;
+        size_type mult_of_content_root;
+        size_type index_of_content_root;
+        size_type mult_of_prim_lcoeff_root;
+        size_type index_of_prim_lcoeff_root;
+        boost::optional<Status_line_1> stack;
+    };
+    
+    // Functor to get the X_coordinate of an Event_coordinate
+    struct Val_functor {
+        typedef Event_coordinate_1 argument_type;
+        typedef Algebraic_real_1 result_type;
+        result_type operator() (argument_type event) const {
+            return event.val;
+        }
+    };
+
+
+    //! The object holding the information about events, as an optional
+    mutable boost::optional<std::vector<Event_coordinate_1> > 
+        event_coordinates;
+
+    //! The algebraic kernel to use
+    Algebraic_kernel_with_analysis_2* _m_kernel;
+
+    //! The polynomial defining the curve
+    boost::optional<Polynomial_2> f;
+
+    //! How degenerate situations are handled
+    CGAL::Degeneracy_strategy degeneracy_strategy;
+
+    /*!
+     * \brief The polynomial without its content (the gcd of the coeffs).
+     *
+     * The content is the greatest common divisor of the coefficients of \c f
+     * considered as polynomial <tt>y</tt>. \c The polynomial f_primitive is
+     * \c f/cont(f). The corresponding curve is equal to the curve of \c f,
+     * only without vertical line components.
+     */
+    mutable boost::optional<Polynomial_2> f_primitive;
+    
+    //! the polynomial containing all roots of the resultant of the primitive
+    //! part of f and its y-derivative
+    mutable boost::optional<Polynomial_1> 
+        resultant_of_primitive_and_derivative_y;
+
+    //! the polynomial containing all roots of the resultant of the primitive
+    //! part of f and its x-derivative
+    mutable boost::optional<Polynomial_1> 
+        resultant_of_primitive_and_derivative_x;
+
+    //! The Sturm-Habicht polynomials of f
+    mutable boost::optional<std::vector<Polynomial_2> > 
+        sturm_habicht_of_primitive;
+
+    //! The content of f
+    mutable boost::optional<Polynomial_1> content;
+
+    //! The non-working shear factors, as far as known
+    mutable std::set<Integer> bad_shears;
+
+    //! The already known shear factors
+    mutable std::map<Integer,Handle> sheared_curves;
+
+    //! Has the curve vertical line components
+    mutable boost::optional<bool> has_vertical_component;
+
+    //! The intermediate values
+    mutable boost::optional<std::vector<boost::optional<Bound> > > 
+    intermediate_values;
+
+    //! stores Y_values at rational coordinate
+    mutable Vert_line_at_rational_map vert_line_at_rational_map;
+    
+    //! stores vert_lines
+    mutable Vert_line_map vert_line_map;
+
+    /**! \brief Information about whether arcs at +/- infty 
+     *   are asymptotic to y=beta,
+     *   or go to +/- infty also in y-direction
+     */
+    mutable boost::optional<std::vector<CGAL::Object> >
+    horizontal_asymptotes_left, horizontal_asymptotes_right;
+
+    //! friends
+    friend class ::CGAL::Curve_analysis_2
+        <Algebraic_kernel_with_analysis_2,Self>;
+
+}; // class Curve_analysis_2_rep
+} // namespace internal
+
+
+/*!
+ * \brief Analysis for algebraic curves of arbitrary degree. 
+ *
+ * This class constitutes a model for the concept
+ * AlgebraicKernelWithAnalysis_d_2::CurveAnalysis_2.
+ * For a square-free bivariate polynomial \c f, a topologic-geometrical
+ * analysis of the algebraic curve defined by the vanishing set of \c f
+ * is provided. This means, one can ask for the total number, and the position
+ * of the critical x-coordinates of the curve, and for each x-coordinate, 
+ * geometric information about the curve can be obtained. This data
+ * is capsuled into an object of type \c Curve_analysis_2::Status_line_1,
+ * which is in fact a \c Status_line_CA_1 object.
+ *
+ * The restriction to square-free curves is a weak one, since the curves
+ * can be made square-free before passed to the analysis. 
+ * The \c Construct_curve_2 functor of \c Algebraic_curve_kernel_2 is
+ * doing so, thus it accepts arbitrary bivariate polynomials.
+ *
+ * The analysis is implemented in a "lazy" fashion. This means, when
+ * created, the analysis delays all computations until the information
+ * is queried for the first time. This means, if only parts of the curves
+ * are of interest, only a partial analysis is performed. 
+ * We remark that nevertheless, the global \e projection \e step
+ * (i.e., computing the (sub)resultants) must be done once a \c Status_line_1
+ * is queried. Often, this step forms the bottleneck in the whole computation.
+ *
+ * For more details of the algorithm, consult the reference:
+ * A.Eigenwillig, M.Kerber, N.Wolpert: Fast and Exact Geometric Analysis of 
+ * Real Algebraic Plane Curves. Proceedings of the International Symposium 
+ * on Symbolic and Algebraic Computation (ISSAC 2007), pp. 151-158
+ */
+template<typename AlgebraicKernelWithAnalysis_2, 
+  typename Rep_ 
+   = internal::Curve_analysis_2_rep< AlgebraicKernelWithAnalysis_2> 
+>
+class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > {
+  
+    //! \name typedefs
+    //! @{
+
+public:
+    //! this instance' first template parameter
+    typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
+  
+    //! this instance' second template parameter
+    typedef Rep_ Rep;
+
+private:
+  
+    //! The internal type for event coordinates
+    typedef typename Rep::Event_coordinate_1 Event_coordinate_1;
+
+    // Internal class to build lines at events
+    typedef typename Rep::Event_line_builder Event_line_builder;
+
+    // Base class
+    typedef ::CGAL::Handle_with_policy<Rep> Base;
+    
+    // This type
+    typedef CGAL::Curve_analysis_2<Algebraic_kernel_with_analysis_2,Rep> Self;
+    
+public:
+
+    //! Indexing type
+    typedef typename Rep::size_type size_type;
+    
+    CGAL_ACK_SNAP_ALGEBRAIC_CURVE_KERNEL_2_TYPEDEFS(Self);
+
+    //! Required by the CurveKernel_2 concept
+    typedef Algebraic_real_1 Coordinate_1;
+
+    //! Traits type for Polynomial_2
+    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
+
+private:
+
+    /*!
+     * \brief Coercion between the coefficient type of the polynomial
+     * and the bound type of the curve analysis
+     *
+     * Interoperability of both types is required
+     */
+    typedef CGAL::Coercion_traits<Bound, Coefficient> Coercion;
+
+    /*!
+     * \brief The common supertype that both the coefficient and the bound
+     * type are convertible to
+     */
+    typedef typename Coercion::Type Coercion_type;
+
+    //! Polynomial over the \c Coercion_type
+    typedef typename CGAL::Polynomial_traits_d<Polynomial_2>
+        ::template Rebind<Coercion_type,1>::Other::Type Poly_coer_1;
+
+public:
+
+    //! Type to represent points on curves
+    typedef typename Algebraic_kernel_with_analysis_2::Algebraic_real_2 
+      Algebraic_real_2;
+
+    //! Required by the CurveKernel_2 concept
+    typedef Algebraic_real_2 Coordinate_2;
+
+    //! type for horizontal asymtote values
+    typedef CGAL::Object Asymptote_y;
+
+    //! @}
+
+private:
+
+    //! \name Helping structs
+    // @{
+    
+    struct Event_functor {
+        Event_functor(const Self* curve) : curve(curve) {}
+        const Self* curve;
+        typedef size_type argument_type;
+        typedef Status_line_1 result_type;
+        result_type operator() (argument_type index) const {
+            return curve->status_line_at_event(index);
+        }
+    };
+
+    struct Intermediate_functor {
+        Intermediate_functor(const Self* curve) : curve(curve) {}
+        const Self* curve;
+        typedef size_type argument_type;
+        typedef Status_line_1 result_type;
+        result_type operator() (argument_type index) const {
+            return curve->status_line_of_interval(index);
+        }
+    };
+
+    struct Stha_functor {
+        Stha_functor(const Self* curve) : curve(curve) {}
+        const Self* curve;
+        typedef size_type argument_type;
+        typedef Polynomial_1 result_type;
+        result_type operator() (argument_type index) const {
+            return curve->principal_sturm_habicht_of_primitive(index);
+        }
+    };
+
+    //! @}
+
+public:
+
+    //! \name Iterators
+    //! @{
+
+    //! Iterator type for status lines at events
+    typedef boost::transform_iterator<Event_functor, 
+                              boost::counting_iterator<size_type> > 
+    Event_line_iterator;
+
+    //! Iterator type for status lines of intervals
+    typedef boost::transform_iterator<Intermediate_functor, 
+                              boost::counting_iterator<size_type> > 
+    Intermediate_line_iterator;
+
+    //! Iterator type for the principal sturm habicht coefficients of the curve
+    typedef boost::transform_iterator<Stha_functor, 
+                              boost::counting_iterator<size_type> > 
+    Principal_sturm_habicht_iterator;
+
+    //! @}
+
+public:
+
+    //!\name Constructors
+    //!@{  
+      
+    //! Default constructor, constructs an empty and invalid curve analysis
+    Curve_analysis_2() :Base(Rep()) {
+    }
+
+    /*! 
+     * \brief Constructs the curve analysis for the given polynomial
+     *
+     * Analyses the curve that is defined by the vanishing set of the
+     * polynomial \c f. 
+     * \pre \c f is square free.
+     * \param strategy The default strategy 
+     * (\c SHEAR_ONLY_AT_IRRATIONAL_STRATEGY)
+     * is to \c shear the curve
+     * if a degenerate situation is detected during the analysis,
+     * except at rational x-coordinates where the curve can be analysed
+     * more directly. The analysis
+     * is then performed in  the sheared system, and finally translated back
+     * into the original system. 
+     * Using \c SHEAR_STRATEGY, a shear is triggered also for degeneracies
+     * at rational x-coordinate. With both strategies, it is guaranteed that
+     * the analysis works successfully for any square free input curve.
+     * On the other hand, the EXCEPTION_STRATEGY throws an exception of type
+     * \c internal::Zero_resultant_exception<Polynomial_2>, 
+     * instead of performing a shear.
+     *
+     * \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY
+     * because there exist a problem if vertical asymtotes are present at
+     * the rational x-coordinate.
+     */
+    explicit Curve_analysis_2(Algebraic_kernel_with_analysis_2 *kernel,
+                              const Polynomial_2& f,
+                              CGAL::Degeneracy_strategy strategy
+                                  = CGAL_ACK_DEFAULT_DEGENERACY_STRATEGY) 
+        throw(internal::Zero_resultant_exception<Polynomial_2>)
+        : Base(Rep(kernel,f,strategy))
+    {
+
+    }
+
+    //! \brief Copy constructor
+    Curve_analysis_2(const Self& alg_curve)
+        : Base(static_cast<const Base&>(alg_curve)) 
+    {
+    }
+
+
+    //!@}
+
+
+    //! \name Members
+    //!@{
+
+private:
+
+    /*
+     * \brief Sets all status lines at events and of intervals
+     *
+     * Writes the status lines of events and interval into the object.
+     * The value type of both \c InputIterator1 and \c InputIterator2
+     * is \c Status_line_1.
+     */
+    template<typename InputIterator1,typename InputIterator2>
+    void set_event_lines(InputIterator1 event_begin,
+                         InputIterator1 event_end,
+                         InputIterator2 intermediate_begin,
+                         InputIterator2 CGAL_precondition_code(intermediate_end)) const {
+        
+        if(! this->ptr()->event_coordinates) {
+            
+            std::vector<Event_coordinate_1> event_coordinate_vector;
+            
+            for(InputIterator1 it = event_begin; it != event_end; it++) {
+                Event_coordinate_1 curr_event;
+                curr_event.val = it->x();
+                event_coordinate_vector.push_back(curr_event);
+            }
+            this->ptr()->event_coordinates = event_coordinate_vector;
+
+        }
+
+        InputIterator1 it1 = event_begin;
+        for(size_type i = 0; i < number_of_status_lines_with_event() ; i++ ) {
+            this->ptr()->vert_line_map[event_coordinates()[i].val] = *it1; 
+            event_coordinates()[i].stack = *it1;
+
+            it1++;
+        }
+        CGAL_assertion(it1 == event_end);
+
+        if(! this->ptr()->intermediate_values) {
+            this->ptr()->intermediate_values 
+                = std::vector<boost::optional<Bound> >
+                    (number_of_status_lines_with_event()+1);
+        }
+
+        InputIterator2 it2 = intermediate_begin;
+        for(size_type i = 0; 
+            i < static_cast<int>(intermediate_values().size()); 
+            i++,it2++) {
+            
+            CGAL_assertion(it2->x().is_rational());
+            Bound q = it2->x().rational();
+            
+            intermediate_values()[i] = q;
+            this->ptr()->vert_line_map[it2->x()] = *it2;
+            this->ptr()->vert_line_at_rational_map[q] = *it2;
+            
+        }
+        CGAL_assertion(it2 == intermediate_end);
+        
+    }
+
+public:
+
+    /*! \brief Returns whether the curve has a valid defining polynomial
+     */
+    bool has_defining_polynomial() const {
+        return bool(this->ptr()->f);
+    }
+        
+public:
+    
+    /*! \brief Sets the defining polynomial.
+     *
+     * \pre The object has no defining polynomial yet.
+     */
+    void set_f(Polynomial_2 f) {
+        CGAL_precondition(! has_defining_polynomial());
+        if((! this->ptr()->f) || f!=this->ptr()->f.get()) {
+            this->copy_on_write();
+            this->ptr()->f=f;
+        }
+    }
+
+
+public:
+
+    /*! 
+     * \brief Returns whether the curve is y-regular
+     * 
+     * A curve is called y-regular if the leading coefficient of its defining
+     * polynomial wrt y is a constant, i.e., contains no x
+     */
+    bool is_y_regular() const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_is_y_regular();
+        }
+#endif
+        return CGAL::degree(CGAL::leading_coefficient(polynomial_2())) == 0;
+    }
+    
+public:
+
+    /*!
+     * \brief returns whether the curve contains a vertical line as a component
+     *
+     * In algebraic terms, this methods computes whether the content
+     * of its defining polynomial has a real root.
+     */
+    bool has_vertical_component() const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_has_vertical_components();
+        }
+#endif
+        if(is_y_regular()) {
+	    this->ptr()->has_vertical_component = false;
+        }
+        if(! this->ptr()->has_vertical_component) {
+            // This is computed as side effect 
+            // when the event coordinates are computed
+            event_coordinates();
+            CGAL_assertion(this->ptr()->has_vertical_component);
+        }
+        return this->ptr()->has_vertical_component.get();
+    }
+
+public:
+
+    //! Returns the defining polynomial
+    Polynomial_2 polynomial_2() const {
+        CGAL_precondition(bool(this->ptr()->f));
+        return this->ptr()->f.get();
+    }
+
+public:
+
+    /*! 
+     * \brief Returns the number of event lines of the curve
+     *
+     * Algebraically, the number of real roots of the discriminant of
+     * the curve's defining equation is returned.
+     */
+    size_type number_of_status_lines_with_event() const {
+        CGAL_precondition(bool(this->ptr()->f));
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_number_of_status_lines_with_event();
+        }
+#endif
+        return static_cast<size_type>(event_coordinates().size());
+    }
+      
+public:
+
+    /*! 
+     * \brief Returns whether the given x-coordinate is critical for the curve
+     * and which event or interval index the x-coordinate belongs to.
+     * 
+     * \param is_event is set to \c true if the curve has an event
+     * at this x-coordinate, or in other words, if the discriminant of its
+     * defining polynomial vanishes at \c x
+     * \param i is set to the index of the event if \c x is an event. Otherwise
+     * \c i is set to the index of the interval \c x is contained in.
+     */
+    void x_to_index(Algebraic_real_1 x,size_type& i,bool& is_event) const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_x_to_index(x,i,is_event);
+        }
+#endif
+        CGAL_precondition(has_defining_polynomial());
+        typename Rep::Val_functor xval;
+        i = std::lower_bound(
+                ::boost::make_transform_iterator(event_coordinates().begin(), 
+                                                 xval),
+                ::boost::make_transform_iterator(event_coordinates().end(),
+                                                 xval),
+                x
+        ) - ::boost::make_transform_iterator(event_coordinates().begin(), 
+                                             xval);
+        is_event = (i < static_cast<size_type>(event_coordinates().size()) && 
+                    (event_coordinates()[i].val == x) );
+    }
+
+public:
+
+    //! Returns the status line at the <tt>i</tt>-th event of the curve.
+    Status_line_1& status_line_at_event(size_type i) const {
+
+        CGAL_precondition(has_defining_polynomial());
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_status_line_at_event(i);
+        }
+#endif
+        CGAL_precondition_code(
+                size_type n = 
+                static_cast<size_type>(event_coordinates().size());
+        );
+        CGAL_precondition(i>=0 && i<n);
+        if(! event_coordinates()[i].stack) {
+            Status_line_1 event_line = create_status_line_at_event(i);
+            this->ptr()->vert_line_map[event_coordinates()[i].val] 
+                = event_line; 
+            event_coordinates()[i].stack = event_line;
+        }
+        CGAL_postcondition(event_coordinates()[i].stack.get().is_event());
+        return event_coordinates()[i].stack.get();
+    }
+    
+public:    
+
+    //! Returns a status line at the rational <tt>x</tt>-coordinate \c b
+    Status_line_1& status_line_at_exact_x(Bound b) const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_status_line_at_exact_x(b);
+        }
+#endif
+        return status_line_at_exact_x(Algebraic_real_1(b));
+    }
+
+private:
+
+    /*
+     * \brief Returns a status line for an exact value \c alpha that
+     * is not an event of the curve
+     *
+     * This function controls the internal cache that stores already created
+     * status line at non-events. 
+     */
+    Status_line_1& status_line_at_exact_non_event_x(Algebraic_real_1 alpha) 
+        const {
+
+        if(alpha.is_rational()) {
+            
+            typename Rep::Vert_line_at_rational_map::iterator it =
+                this->ptr()->vert_line_at_rational_map.find
+                (alpha.rational());
+            
+            if (it != this->ptr()->vert_line_at_rational_map.end()) {
+                CGAL_assertion(!it->second.is_event());
+                return it->second;
+            }
+        }
+        
+        typename Rep::Vert_line_map::iterator it =
+            this->ptr()->vert_line_map.find(alpha);
+        
+        if (it != this->ptr()->vert_line_map.end()) {
+            CGAL_assertion(!it->second.is_event());
+            return it->second;
+        }
+        
+        
+        // Not stored yet, so create it and store it
+        Status_line_1 cvl 
+            = create_status_line_at_non_event(alpha);
+        CGAL_assertion(!cvl.is_event());
+        this->ptr()->vert_line_map[alpha] = cvl;
+        
+        if(alpha.is_rational()) {
+            this->ptr()->vert_line_at_rational_map[alpha.rational()] = cvl;
+        }
+        return this->ptr()->vert_line_map[alpha];
+    }
+
+public:
+
+    //! Returns a vert line for the <tt>x</tt>-coordinate alpha
+    Status_line_1& status_line_at_exact_x(Algebraic_real_1 alpha) const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_status_line_at_exact_x(alpha);
+        }
+#endif
+        bool is_event_value;
+        size_type index;
+        this->x_to_index(alpha,index,is_event_value);
+        if(is_event_value) {
+            return status_line_at_event(index);
+        }
+        else {
+            return status_line_at_exact_non_event_x(alpha);
+        }
+    }
+
+private:
+    
+    // Creates a status line for the curve's <tt>index</tt>th critical point
+    Status_line_1 create_status_line_at_event(size_type index) const 
+        throw(CGAL::internal::Non_generic_position_exception) {
+
+        Event_coordinate_1& event = event_coordinates()[index];
+        
+        Algebraic_real_1 x = event.val;
+        
+        try {
+            
+            Event_coordinate_1& event = event_coordinates()[index];
+        
+            Algebraic_real_1 x = event.val;
+            
+#if CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES
+            if(event.mult_of_prim_lcoeff_root > 0) {
+                throw CGAL::internal::Non_generic_position_exception();
+            }
+#else
+            if(event.mult_of_prim_lcoeff_root > 0) {
+                if(event.mult_of_prim_lcoeff_root > 1 ||
+                   event.mult_of_prim_res_root > 1) {
+                    throw CGAL::internal::Non_generic_position_exception();
+                }
+            }
+        
+#endif
+        
+#if CGAL_ACK_DEBUG_FLAG
+            double ev_approx = CGAL::to_double(x);
+            CGAL_ACK_DEBUG_PRINT << (index+1) << "th line: "
+                                 << std::setw(6) << std::setprecision(3)
+                                 << ev_approx
+                                 << ".."
+                                 << std::flush;
+#endif	
+            size_type left_arcs 
+                = status_line_for_x(x,CGAL::NEGATIVE).number_of_events();
+            size_type right_arcs 
+                = status_line_for_x(x,CGAL::POSITIVE).number_of_events();
+        
+            bool root_of_resultant=(event.mult_of_prim_res_root>0);
+            bool root_of_content=(event.mult_of_content_root>0);
+        
+            size_type mult_of_resultant  = event.mult_of_prim_res_root;
+
+/*
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << "Event line for " << index << " " 
+                                 << root_of_resultant << " " 
+                                 << root_of_content << " " 
+                                 << mult_of_resultant << " " 
+                                 << left_arcs << " " << right_arcs 
+                                 << std::endl;
+#endif
+*/
+
+            Status_line_1 ev_line 
+                = event_line_builder().create_event_line(index,
+                                                         x,
+                                                         left_arcs,
+                                                         right_arcs,
+                                                         root_of_resultant,
+                                                         root_of_content,
+                                                         mult_of_resultant);
+        
+            event.stack = ev_line;
+
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+
+            return ev_line;
+        } catch(CGAL::internal::Non_generic_position_exception /* exc */) {
+            switch(this->ptr()->degeneracy_strategy) {
+            case(CGAL::EXCEPTION_STRATEGY): {
+                throw CGAL::internal::Non_generic_position_exception();
+                break;
+            }
+	    // Feature does not working atm
+            case(CGAL::SHEAR_ONLY_AT_IRRATIONAL_STRATEGY): {
+	      CGAL_error_msg("Currently not supported");
+	      /*
+	      if(x.is_rational()) {
+                    return create_non_generic_event_at_rational(x,index);
+                }
+                // FALL INTO NEXT CASE                    
+	      */
+            }
+	    case(CGAL::SHEAR_STRATEGY): {
+                return create_non_generic_event_with_shear(index);
+                break;
+            }
+            default:{
+              CGAL_assertion(false); // !!! Never reached
+            }
+            }
+        }
+        // !!! Never reached
+        return Status_line_1();
+    }
+
+private:
+
+    /* 
+     * \brief Method to create a status line using shear and backshear 
+     *
+     * Note that this methods creates <b>all</b> event lines of the object
+     * at once, and stores them in the object.
+     */
+    Status_line_1 create_non_generic_event_with_shear(size_type index) const {
+
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Use sheared technique..." << std::endl;
+#endif
+        internal::Shear_controller<Integer> shear_controller;
+        Integer s(0);
+        while(true) {
+            try {
+                s = shear_controller.get_shear_factor();
+#if CGAL_ACK_DEBUG_FLAG
+                CGAL_ACK_DEBUG_PRINT << "Trying shear factor " 
+                                     << s << std::endl;
+#endif
+                // TODO: Move shear somewhere else
+                Self D(kernel(),
+                       CGAL::internal::shear
+                           (primitive_polynomial_2(),Coefficient(s)),
+                       CGAL::EXCEPTION_STRATEGY);
+                Shear_transformation< Algebraic_kernel_with_analysis_2 > 
+                    shear_transformation(kernel());
+                shear_transformation.report_sheared_disc_roots
+                    (boost::make_transform_iterator(
+                             event_coordinates().begin(),
+                             typename Rep::Val_functor()),
+                     boost::make_transform_iterator(
+                             event_coordinates().end(),
+                             typename Rep::Val_functor()) 
+                    );
+              
+                // Store the sheared curve for later use
+                this->ptr()->sheared_curves.insert(std::make_pair(s,D));
+                shear_transformation(D,-s,(Self&)*this,false);
+                set_vertical_line_components();
+                
+                break;
+            }
+            catch(CGAL::internal::Non_generic_position_exception /* err */) {
+
+                shear_controller.report_failure(s);
+#if CGAL_ACK_DEBUG_FLAG
+                CGAL_ACK_DEBUG_PRINT << "Bad shear factor, retrying..." 
+                                     << std::endl;
+#endif
+            }
+        }
+        
+        return status_line_at_event(index);
+    }
+
+private:
+
+    /*
+     * \brief creates a status line for a rational event x-coordinate
+     *
+     * If an event coordinate is rational, a shear can be prevented
+     * by plugging in the x-coordinate for x and explicitly computing
+     * the square free part of the defining polynomial at this position.
+     *
+     * COMMENTED OUT
+     
+    Status_line_1 create_non_generic_event_at_rational(Algebraic_real_1 x,
+                                                       size_type index) const {
+
+        
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Non-generic, rational position x = " 
+                             << CGAL::to_double(x)
+                             << std::flush;
+#endif
+        
+        CGAL_precondition(x.is_rational());
+        Bound r = x.rational();
+
+	Polynomial_1 f_at_x = kernel()->evaluate_utcf_2_object()
+	  (typename Polynomial_traits_2::Swap()
+	      (primitive_polynomial_2(),0, 1),
+	   r);
+        
+        f_at_x_sq_free 
+            = typename CGAL::Polynomial_traits_d<typename FT::Numerator_type>
+                ::Make_square_free() (f_at_x);
+
+        Bitstream_coefficient_kernel coeff_kernel(kernel(),x);
+        Bitstream_traits traits(coeff_kernel);
+
+        // We need to make an artificial bivariate polynomial
+        typedef typename 
+            CGAL::Polynomial_traits_d<typename FT::Numerator_type>
+            ::template Rebind<typename FT::Numerator_type,1>::Other::Type 
+            Poly_coer_num_2;
+
+        std::vector<typename FT::Numerator_type> coeffs;
+        for(int i = 0; i <= CGAL::degree(f_at_x_sq_free); i++) {
+            coeffs.push_back(typename FT::Numerator_type(f_at_x_sq_free[i]));
+        }
+        Poly_coer_num_2 f_at_x_ext(coeffs.begin(), coeffs.end());
+
+        Bitstream_descartes isolator(CGAL::internal::Square_free_descartes_tag(),
+                                     f_at_x_ext,
+                                     traits);
+        
+        // Now adjacencies
+        std::vector<Bound> bucket_borders;
+
+        int n = isolator.number_of_real_roots();
+
+        if(n==0) {
+            bucket_borders.push_back(0);
+        } else {
+            bucket_borders.push_back(
+                    CGAL::internal::bound_left_of
+                        (kernel(),Algebraic_real_1(isolator.left_bound(0))));
+            for(int i = 1; i < n; i++) {
+                while(Algebraic_real_1(isolator.right_bound(i-1))==
+                      Algebraic_real_1(isolator.left_bound(i))) {
+                    isolator.refine_interval(i-1);
+                    isolator.refine_interval(i);
+                }
+                bucket_borders.push_back(
+                        kernel()->bound_between_1_object()
+                        (Algebraic_real_1(isolator.right_bound(i-1)),
+                         Algebraic_real_1(isolator.left_bound(i)))
+                );
+            }
+            
+            bucket_borders.push_back(
+                    CGAL::internal::bound_right_of
+                        (kernel(),
+			 Algebraic_real_1(isolator.right_bound(n-1))));
+        }
+
+        Bound left = bound_value_in_interval(index);
+        Bound right = bound_value_in_interval(index+1);
+        
+        typedef boost::numeric::interval<Coercion_type> Coercion_interval;
+
+        typename Coercion::Cast cast;
+
+        for(int i = 0; i < static_cast<int>(bucket_borders.size()); i++) {
+            
+            Poly_coer_1 curr_pol 
+                =  primitive_polynomial_2().evaluate(bucket_borders[i]);
+            
+	    CGAL::internal::Interval_evaluate_1
+	      <Poly_coer_1,Bound>
+	      interval_evaluate_1;
+
+            while(true) {
+	      std::pair<Bound,Bound> curr_interval_pair 
+                  = interval_evaluate_1(curr_pol,std::make_pair(left,right));
+	      Coercion_interval curr_interval(curr_interval_pair.first,
+					      curr_interval_pair.second);
+
+	      if(boost::numeric::in_zero(curr_interval)) {
+		// "refine"
+		Bound middle = (left+right)/2;
+		if(middle==r) {
+		  left=(left+middle)/2;
+		  right = (right+middle)/2;
+		} else if(middle>r) {
+		  right=middle;
+		} else {
+		  left=middle;
+		}
+	      } else {
+		break;
+	      }
+            }
+        }
+
+        Status_line_1 left_line 
+            = status_line_at_exact_non_event_x(Algebraic_real_1(left)),
+            right_line 
+            = status_line_at_exact_non_event_x(Algebraic_real_1(right));
+        
+        int n_left = left_line.number_of_events();
+        int n_right = right_line.number_of_events();
+        
+        std::vector<int> left_arcs(bucket_borders.size()+1),
+            right_arcs(bucket_borders.size()+1);
+        
+        for(unsigned int i=0;i<left_arcs.size();i++) {
+            left_arcs[i]=0;
+        }
+        for(unsigned int i=0;i<right_arcs.size();i++) {
+            right_arcs[i]=0;
+        }
+        
+        int curr_index=0;
+        for(int i=0; i < n_left; i++) {
+            
+            while(true) {
+                if(curr_index==static_cast<int>(bucket_borders.size())) {
+                    left_arcs[curr_index]++;
+                    break;
+                } else if(left_line.lower_bound(i)>
+                          bucket_borders[curr_index]) {
+                    curr_index++;
+                } else if(left_line.upper_bound(i)<
+                          bucket_borders[curr_index]) {
+                    left_arcs[curr_index]++;
+                    break;
+                } else {
+                    left_line.refine(i);
+                }
+            }
+        }
+        curr_index=0;
+        for(int i=0; i < n_right; i++) {
+            
+            while(true) {
+                if(curr_index==static_cast<int>(bucket_borders.size())) {
+                    right_arcs[curr_index]++;
+                    break;
+                } else if(right_line.lower_bound(i)>
+                          bucket_borders[curr_index]) {
+                    curr_index++;
+                } else if(right_line.upper_bound(i)<
+                          bucket_borders[curr_index]) {
+                    right_arcs[curr_index]++;
+                    break;
+                } else {
+                    right_line.refine(i);
+                }
+            }
+
+        }
+        
+        typename Status_line_1::Arc_container arc_container;
+        
+        for(int i = 0; i < n; i++) {
+            arc_container.push_back(std::make_pair(left_arcs[i+1],
+                                                   right_arcs[i+1]));
+        }
+        
+        Status_line_1 status_line(x,index,*this,n_left,n_right,arc_container);
+
+        status_line._set_number_of_branches_approaching_infinity
+            (std::make_pair(left_arcs[0],right_arcs[0]),
+             std::make_pair(left_arcs[n+1],right_arcs[n+1]));
+
+        status_line.set_isolator(isolator);
+
+        if(event_coordinates()[index].mult_of_content_root > 0) {
+            status_line._set_v_line();
+        }
+
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+
+        return status_line;
+    }
+    */
+
+public:
+
+    /*! 
+     * \brief Returns the status line for the interval 
+     * preceeding the <tt>i</tt>th event
+     *
+     * Returns a status line for a reference x-coordinate of the <tt>i</tt>th
+     * interval of the curve. If called multiple times for the same <tt>i</tt>,
+     * the same status line is returned.
+     */
+    Status_line_1 status_line_of_interval(size_type i) const
+    {
+        CGAL_precondition(i >= 0 && i <= number_of_status_lines_with_event());
+      
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_status_line_of_interval(i);
+        }
+#endif
+  
+        Bound b = bound_value_in_interval(i);
+        
+        Status_line_1 intermediate_line 
+            = status_line_at_exact_non_event_x(Algebraic_real_1(b));
+
+        CGAL_postcondition(! intermediate_line.is_event());
+
+        return intermediate_line;
+    }
+    
+
+public:
+
+    /*!
+     * \brief returns a status line at position \c x
+     *
+     * If \c x is not an event of the curve, and lies in the <tt>i</tt>th
+     * interval, the result is equal to <tt>status_line_of_interval(i)</tt>.
+     * Different from <tt>status_line_at_exact_x(x)</tt>
+     * the status line \c s returned does not satisft <tt>s.x()==x</tt>.
+     * If \c x is an event, and \c perturb is set to \c CGAL::ZERO,
+     * the status line for the event is returned. Otherwise, the status line
+     * for the left or right neighboring interval is returned, depending
+     * on whether \c perturb is set to \c CGAL::NEGATIVE or \c CGAL::POSITIVE.
+     * If \c x is not an event, \c perturb has no effect. 
+     */ 
+    Status_line_1 status_line_for_x(Algebraic_real_1 x,
+                                    CGAL::Sign perturb = CGAL::ZERO) const
+    {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_status_line_for_x(x,perturb);
+        }
+#endif
+
+        size_type i;
+        bool is_evt;
+        x_to_index(x, i, is_evt);
+        if(is_evt) {
+            if(perturb == CGAL::ZERO)
+                return status_line_at_event(i);
+            if(perturb == CGAL::POSITIVE)
+                i++;
+        } 
+        return status_line_of_interval(i);
+    }
+
+
+private:
+
+    /*
+     * \brief Creates an intermediate line at position \c ar.
+     *
+     * It is required that none of the following situations occurs at position
+     * <tt>ar</tt>: singularity, vertical tangent line, vertical asymptote.\n
+     * Otherwise, the method might run into an infinite loop. 
+     * 
+     * \param index if set to -1, the interval containing \c ar is computed
+     * within the method, and the index of the status line is set accordingly.
+     */
+    Status_line_1
+    create_status_line_at_non_event(Algebraic_real_1 ar, int index = -1) 
+        const {
+
+        if(index==-1) {
+            bool event;
+            x_to_index(ar,index,event);
+            CGAL_assertion(!event);
+        }
+        CGAL_assertion(index>=0);
+
+        // TODO .. delay creation of refinement object 
+        // especially when ar is rational
+        
+        Bitstream_coefficient_kernel coeff_kernel(kernel(),ar);
+        Bitstream_traits traits(coeff_kernel);
+
+        Bitstream_descartes 
+            bitstream_descartes(CGAL::internal::Square_free_descartes_tag(),
+                                primitive_polynomial_2(),
+                                traits);
+
+        size_type root_number=bitstream_descartes.number_of_real_roots();
+
+        Status_line_1 status_line(ar, index, *this, root_number);
+        status_line.set_isolator(bitstream_descartes);
+        
+        CGAL_assertion(! status_line.is_event());
+
+        return status_line;
+    }
+
+private:
+
+   /*
+    * \brief Returns an Event_line_builder instance
+    *
+    * Note: So far, a new instance is created each time the function is called
+    */
+    Event_line_builder event_line_builder() const {
+        
+        return Event_line_builder(kernel(), *this, primitive_polynomial_2());
+    }
+
+public:
+
+    /*! 
+     * \brief Number of arcs over the given interval
+     *
+     * Shortcut for <tt>status_line_of_interval(i).number_of_events()</tt>
+     */
+    size_type arcs_over_interval(size_type i) const {
+        CGAL_precondition(has_defining_polynomial());
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_arcs_over_interval(i);
+        }
+#endif
+        CGAL_assertion_code(
+                size_type n 
+                    = static_cast<size_type>(intermediate_values().size());
+        );
+        CGAL_precondition(i>=0 && i<=n);
+        return status_line_of_interval(i).number_of_events();
+    }
+
+public:
+
+    /*! 
+     * \brief Rational number in the <tt>i</tt>th interval between events
+     *
+     * The result of this method is taken as the reference x-coordinate
+     * for the status lines of intervals.
+     */
+    Bound bound_value_in_interval(size_type i) const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_bound_value_in_interval(i);
+        }
+#endif
+        CGAL_assertion(i>=0 && 
+                       i < static_cast<size_type>
+                           (intermediate_values().size()));
+        if(! intermediate_values()[i]) {
+          // Create it
+            if(event_coordinates().size()==0) {
+                CGAL_assertion(i==0);
+                intermediate_values()[0]=Bound(0);
+            } else {
+                if(i==0) {
+                    intermediate_values()[i] 
+		      = bound_left_of(kernel(),event_coordinates()[i].val);
+                } else if(i == static_cast<size_type>
+                              (event_coordinates().size())) {
+                    intermediate_values()[i] 
+                        = bound_right_of
+		      (kernel(),event_coordinates()[i-1].val);
+                    
+                } else {
+                    intermediate_values()[i]
+		      = kernel()->bound_between_1_object()
+		      (event_coordinates()[i-1].val,
+		       event_coordinates()[i].val);
+                }
+            }
+        }
+        return intermediate_values()[i].get();
+    }
+
+
+public:
+
+    /*! 
+     * Returns the content of the defining polynomial
+     *
+     * The content is the gcd of its coefficients (the polynomial is considered
+     * as polynomial in \c y)
+     */
+    Polynomial_1 content() const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_content();
+        }
+#endif
+        if(! this->ptr()->content) {
+            compute_content_and_primitive_part();
+        }
+        return this->ptr()->content.get();
+    }
+
+public:
+
+    /*! 
+     * Returns the primitive part of the defining polynomial
+     * 
+     * The primitive part of \c f is the \c f divided by its content.
+     */
+    Polynomial_2 primitive_polynomial_2() const {
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_primitive_polynomial_2();
+        }
+#endif
+        if(! this->ptr()->f_primitive) {
+            compute_content_and_primitive_part();
+        }
+        return this->ptr()->f_primitive.get();
+    }
+
+    Algebraic_kernel_with_analysis_2* kernel() const {
+        return this->ptr()->_m_kernel;
+    }
+
+private:
+
+
+    // computes and sets the content and the primitive part for the curve
+    void compute_content_and_primitive_part() const {
+
+        CGAL_assertion(has_defining_polynomial());
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Computing the content..." << std::flush;
+#endif
+        this->ptr()->content 
+            = typename CGAL::Polynomial_traits_d< Polynomial_2 >::
+                Univariate_content_up_to_constant_factor()( polynomial_2() );
+        if(CGAL::degree(content())==0) {
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << "no vertical lines as components" 
+                                 << std::endl;
+#endif
+            this->ptr()->f_primitive=polynomial_2();
+        }
+        else {
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << "non-trivial content found" << std::endl;
+#endif
+            // Content must be square free, because the curve is square free
+            CGAL_assertion( typename CGAL::Polynomial_traits_d< Polynomial_1 >
+                            ::Is_square_free()(content()));
+            this->ptr()->f_primitive=polynomial_2() / content();
+	    
+        }
+
+    }
+
+private:
+
+    //! Returns the Sturm-Habicht sequence of the primitive part of f
+    std::vector<Polynomial_2>& sturm_habicht_of_primitive() const 
+    throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        if(! this->ptr()->sturm_habicht_of_primitive) {
+            compute_sturm_habicht_of_primitive();
+        }  
+        return this->ptr()->sturm_habicht_of_primitive.get();
+    }
+
+public: 
+
+    /*! 
+     * \brief Returns the <tt>i</tt>th Sturm-Habicht polynomial 
+     * of the primitive part of the defining polynomial
+     */
+    Polynomial_2 sturm_habicht_of_primitive(size_type i) const 
+      throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        CGAL_assertion(i>=0 && 
+                    i < static_cast<size_type>
+                       (sturm_habicht_of_primitive().size()));
+        return sturm_habicht_of_primitive()[i];
+    }
+
+public:
+
+    /*! 
+     * \brief Returns the <tt>i</tt>th principal Sturm-Habicht coefficient
+     * of the primitive part of the defining polynomial
+     */
+    Polynomial_1 principal_sturm_habicht_of_primitive(size_type i) const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        CGAL_assertion(i>=0 && 
+                    i < static_cast<size_type>
+                       (sturm_habicht_of_primitive().size()));
+
+        CGAL_assertion(CGAL::degree(sturm_habicht_of_primitive()[i])<=i);
+        if(CGAL::degree(sturm_habicht_of_primitive()[i]) < i) {
+            return Polynomial_1(0);
+        } // else:
+        return sturm_habicht_of_primitive()[i][i];
+    }
+
+public:
+
+    /*! 
+     * \brief Returns the <tt>i</tt>th coprincipal Sturm-Habicht coefficient
+     * of the primitive part of the defining polynomial
+     *
+     * The coprincipal Sturm-Habicht coefficient is the coefficient
+     * of <tt>y^{i-1}</tt> of the <tt>i</tt>th Sturm-Habicht polynomial
+     */
+    Polynomial_1 coprincipal_sturm_habicht_of_primitive(size_type i) const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        CGAL_assertion(i>=1 && 
+                    i < static_cast<size_type>
+                       (sturm_habicht_of_primitive().size()));
+        CGAL_assertion(CGAL::degree(sturm_habicht_of_primitive()[i])<=i);
+        if(CGAL::degree(sturm_habicht_of_primitive()[i]) < i-1) {
+            return Polynomial_1(0);
+        } // else:
+        return sturm_habicht_of_primitive()[i][i-1];
+    }
+
+public:
+
+    /*! 
+     * \brief Returns an iterator to the principal Sturm-Habicht coefficients,
+     * starting with the <tt>0</tt>th one (the resultant)
+     */
+    Principal_sturm_habicht_iterator principal_sturm_habicht_begin() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>(0),
+             Stha_functor(this));
+    }
+
+    //! Returns an iterator to the end of principal Sturm-Habicht coefficients
+    Principal_sturm_habicht_iterator principal_sturm_habicht_end() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>
+                 (sturm_habicht_of_primitive().size()),
+             Stha_functor(this));
+    }
+
+private:
+
+    // Internal method to compute the Sturm-Habicht sequence
+    void compute_sturm_habicht_of_primitive() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Compute Sturm-Habicht.." << std::flush;
+#endif
+        std::vector<Polynomial_2> stha;
+        
+        // Fix a problem for constant primitive part.
+        // In this case, the St.-Ha. sequence is never needed
+        if(CGAL::degree(primitive_polynomial_2()) == 0) {
+            // Set the resultant
+            stha.push_back(primitive_polynomial_2());
+        } else {
+            
+#if CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS
+#warning USES BEZOUT MATRIX FOR SUBRESULTANTS
+            CGAL::internal::bezout_polynomial_subresultants<Polynomial_traits_2>
+                (primitive_polynomial_2(),
+                 CGAL::differentiate(primitive_polynomial_2()),
+                 std::back_inserter(stha));
+            stha.push_back(primitive_polynomial_2());
+            size_type p = CGAL::degree(primitive_polynomial_2());
+            CGAL_assertion(static_cast<size_type>(stha.size()) == p+1);
+            for(size_type i=0;i<p; i++) {
+                if((p-i)%4==0 || (p-i)%4==1) {
+                    stha[i] = stha[i];
+                } else {
+                    stha[i] = -stha[i];
+                }
+            }
+            
+#else
+            typename Polynomial_traits_2::Sturm_habicht_sequence()
+                (primitive_polynomial_2(),std::back_inserter(stha));
+#endif
+        }
+        // Also set the resultant, if not yet set
+        if(! this->ptr()->resultant_of_primitive_and_derivative_y) {
+            this->ptr()->resultant_of_primitive_and_derivative_y = stha[0][0];
+            if(this->ptr()->resultant_of_primitive_and_derivative_y.
+                   get().is_zero()) {
+                throw internal::Zero_resultant_exception<Polynomial_2>
+                    (polynomial_2());
+            }
+        }
+        
+        this->ptr()->sturm_habicht_of_primitive = stha;
+        CGAL_assertion(CGAL::canonicalize
+		       (resultant_of_primitive_and_derivative_y()) == 
+                       CGAL::canonicalize
+		       (principal_sturm_habicht_of_primitive(0)));
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+    }
+
+private:
+
+    //! Returns the resultant of the primitive part of f and its y-derivative
+    Polynomial_1 resultant_of_primitive_and_derivative_y() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        if(! this->ptr()->resultant_of_primitive_and_derivative_y) {
+            compute_resultant_of_primitive_and_derivative_y();
+        }
+        return this->ptr()->resultant_of_primitive_and_derivative_y.get();
+    }
+
+private:
+
+    //! Returns the resultant of the primitive part of f with its x-derivative
+    Polynomial_1 resultant_of_primitive_and_derivative_x() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        if(! this->ptr()->resultant_of_primitive_and_derivative_x) {
+            compute_resultant_of_primitive_and_derivative_x();
+        }
+        return this->ptr()->resultant_of_primitive_and_derivative_x.get();
+    }
+
+private:
+    // Computes <tt>res_y(f,f_y)</tt>, where \c f is the defining polynomial
+    void compute_resultant_of_primitive_and_derivative_y() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Compute resultant.." << std::flush;
+#endif
+
+        CGAL_assertion(has_defining_polynomial());
+
+#if CGAL_ACK_RESULTANT_FIRST_STRATEGY
+#ifndef CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD
+        bool speed_up = true;
+#else
+        bool speed_up=CGAL::degree(polynomial_2()) >= 
+            CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD;
+#endif
+#else
+        bool speed_up=false;
+#endif
+        
+        if(CGAL::degree(polynomial_2()) == 0) {
+	    this->ptr()->resultant_of_primitive_and_derivative_y 
+                = Polynomial_1(1);
+        } else {
+            
+            if(! speed_up) {
+                
+                // Compute resultant using the Sturm-Habicht sequence
+                this->ptr()->resultant_of_primitive_and_derivative_y 
+                    = principal_sturm_habicht_of_primitive(0);
+        
+            } else {
+                typename Polynomial_traits_2::Differentiate diff;
+                this->ptr()->resultant_of_primitive_and_derivative_y
+                    = CGAL::resultant
+                        (primitive_polynomial_2(),
+                         diff(primitive_polynomial_2(),1));
+            }
+
+        }
+
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+
+        if(resultant_of_primitive_and_derivative_y().is_zero()) {
+            throw internal::Zero_resultant_exception<Polynomial_2>
+                (polynomial_2());
+        }
+    }
+    
+    // Computes <tt>res_y(f,f_x)</tt>, where \c f is the defining polynomial
+    void compute_resultant_of_primitive_and_derivative_x() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "Compute x-resultant.." << std::flush;
+#endif
+
+        CGAL_assertion(has_defining_polynomial());
+
+        // Transpose the polynomial
+        Polynomial_2 f_yx = typename Polynomial_traits_2::Swap() 
+            (polynomial_2(),0,1);
+
+        if( CGAL::degree(f_yx) == 0 ) {
+            // Polynomial only consists of horizontal lines
+            // primitive resultant is set to 1
+            this->ptr()->resultant_of_primitive_and_derivative_x 
+                = Polynomial_1(1);
+        } else {
+            
+            Polynomial_2 f_yx_primitive;
+            
+            Polynomial_1 content_yx 
+                = typename CGAL::Polynomial_traits_d< Polynomial_2 >::
+                    Univariate_content_up_to_constant_factor()( f_yx );
+            if(CGAL::degree(content_yx)==0) {
+                f_yx_primitive=f_yx;
+            }
+            else {
+                CGAL_assertion
+                    (typename CGAL::Polynomial_traits_d< Polynomial_1 >::
+                         Is_square_free()(content_yx));
+                f_yx_primitive=f_yx / content_yx;
+                
+            }
+            
+            this->ptr()->resultant_of_primitive_and_derivative_x
+                = CGAL::resultant
+                (typename Polynomial_traits_2::Swap() (f_yx_primitive,0,1),
+                 typename Polynomial_traits_2::Swap() 
+                    (CGAL::differentiate(f_yx_primitive),0,1) );
+        }
+        
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+
+        if(resultant_of_primitive_and_derivative_x().is_zero()) {
+            throw internal::Zero_resultant_exception<Polynomial_2>
+                (polynomial_2());
+        }
+    }
+
+
+
+
+private:
+
+    // Returns the critical event coordinates
+    std::vector<Event_coordinate_1>& event_coordinates() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        if(! this->ptr()->event_coordinates) {
+            compute_event_coordinates();
+        }
+        return this->ptr()->event_coordinates.get();
+    }
+
+private:
+
+    // Returns the intermediate values for intervals between events
+    std::vector<boost::optional<Bound> >& intermediate_values() const 
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+        
+        if(! this->ptr()->intermediate_values) {
+            // This is created during event_coordiantes()
+            event_coordinates();
+            CGAL_assertion(bool(this->ptr()->intermediate_values));
+        }
+        return this->ptr()->intermediate_values.get();
+    }
+
+
+private:
+
+    /*
+     * \brief Computes the event coordinates of the curve.
+     *
+     * This function computes the content of the defining polynomial,
+     * and the roots of its discriminant. These two sets form the critical
+     * x-coordinates of the curve.
+     */
+    void compute_event_coordinates() const
+        throw(internal::Zero_resultant_exception<Polynomial_2>) {
+         
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "compute events..." << std::flush;
+#endif
+         
+        Solve_1 solve_1;
+         
+        std::vector<std::pair<Algebraic_real_1,size_type> > content_pairs;
+        std::vector<Algebraic_real_1> content_roots;
+        std::vector<size_type> content_mults;
+        solve_1(content(),
+                std::back_inserter(content_pairs));
+
+        for(int i=0; i < static_cast<int>(content_pairs.size()); i++ ) {
+            content_roots.push_back(content_pairs[i].first);
+            content_mults.push_back(content_pairs[i].second);
+        }
+        
+        // Set the vertical_line_components flag as side effect
+        this->ptr()->has_vertical_component = (content_roots.size() > 0);
+
+        std::vector<std::pair<Algebraic_real_1,size_type> > res_pairs;
+        std::vector<Algebraic_real_1> res_roots;
+        std::vector<size_type> res_mults;
+        Polynomial_1 R = resultant_of_primitive_and_derivative_y();
+        solve_1(R,std::back_inserter(res_pairs));
+        
+        for(int i=0; i < static_cast<int>(res_pairs.size()); i++ ) {
+            res_roots.push_back(res_pairs[i].first);
+            res_mults.push_back(res_pairs[i].second);
+        }
+
+        std::vector<std::pair<Algebraic_real_1,size_type> > lcoeff_pairs;
+        std::vector<Algebraic_real_1> lcoeff_roots;
+        std::vector<size_type> lcoeff_mults;
+        solve_1(CGAL::leading_coefficient(primitive_polynomial_2()),
+                std::back_inserter(lcoeff_pairs));
+
+        for(int i=0; i < static_cast<int>(lcoeff_pairs.size()); i++ ) {
+            lcoeff_roots.push_back(lcoeff_pairs[i].first);
+            lcoeff_mults.push_back(lcoeff_pairs[i].second);
+        }
+        
+
+        //Now, merge the vertical line positions with the resultant roots
+        typename 
+            CGAL::Real_embeddable_traits<Algebraic_real_1>::Compare compare;
+
+        std::vector<Algebraic_real_1> event_values;
+        std::vector<CGAL::internal::Three_valued> event_values_info;
+
+        CGAL::internal::set_union_with_source
+            (res_roots.begin(),
+             res_roots.end(),
+             content_roots.begin(),
+             content_roots.end(),
+             std::back_inserter(event_values),
+             std::back_inserter(event_values_info),
+             compare);
+
+        // Now, build the Event_coordinate_1 entries 
+        // for each element of event_values
+        size_type curr_res_index = 0, curr_content_index = 0, 
+            curr_lcoeff_index = 0;
+        std::vector<Event_coordinate_1> event_coordinate_vector;
+
+        for(size_type i = 0; 
+            i < static_cast<size_type>(event_values.size()); 
+            i++ ) {
+            
+            Event_coordinate_1 curr_event;
+            curr_event.val = event_values[i];
+            switch(event_values_info[i]) {
+            
+            case(CGAL::internal::ROOT_OF_FIRST_SET): {
+                curr_event.index_of_prim_res_root = curr_res_index;
+                CGAL_expensive_assertion(res_roots[curr_res_index] == 
+                                         event_values[i]);
+                curr_event.mult_of_prim_res_root 
+                    = res_mults[curr_res_index];
+                curr_res_index++;
+                if(curr_lcoeff_index < 
+                   static_cast<size_type>(lcoeff_roots.size()) &&
+                   event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
+                    // We have a root of the leading coefficient
+                    // of the primitve polynomial
+                    curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
+                    curr_event.mult_of_prim_lcoeff_root 
+                        = lcoeff_mults[curr_lcoeff_index];
+                    curr_lcoeff_index++;
+                } else {
+                    curr_event.index_of_prim_lcoeff_root = -1;
+                    curr_event.mult_of_prim_lcoeff_root = 0;
+                }
+                
+                curr_event.index_of_content_root = -1;
+                curr_event.mult_of_content_root = 0;
+                break;
+            }
+            case(CGAL::internal::ROOT_OF_SECOND_SET): {
+                curr_event.index_of_content_root = curr_content_index;
+                CGAL_expensive_assertion(content_roots[curr_content_index] == 
+                                         event_values[i]);
+                curr_event.mult_of_content_root 
+                    = content_mults[curr_content_index];
+                curr_content_index++;
+                curr_event.index_of_prim_res_root = -1;
+                curr_event.mult_of_prim_res_root = 0;
+                CGAL_expensive_assertion(event_values[i]!=
+                                         lcoeff_roots[curr_lcoeff_index]);
+                curr_event.index_of_prim_lcoeff_root = -1;
+                curr_event.mult_of_prim_lcoeff_root = 0;
+                break;
+            }
+            case(CGAL::internal::ROOT_OF_BOTH_SETS): {
+                curr_event.index_of_prim_res_root = curr_res_index;
+                CGAL_expensive_assertion(res_roots[curr_res_index] == 
+                                         event_values[i]);
+                curr_event.mult_of_prim_res_root 
+                    = res_mults[curr_res_index];
+                curr_res_index++;
+                if(curr_lcoeff_index < 
+                   static_cast<size_type>(lcoeff_roots.size()) &&
+                   event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
+                    // We have a root of the leading coefficient
+                    // of the primitve polynomial
+                    curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
+                    curr_event.mult_of_prim_lcoeff_root 
+                        = lcoeff_mults[curr_lcoeff_index];
+                    curr_lcoeff_index++;
+                } else {
+                    curr_event.index_of_prim_lcoeff_root = -1;
+                    curr_event.mult_of_prim_lcoeff_root = 0;
+                }
+                curr_event.index_of_content_root = curr_content_index;
+                CGAL_expensive_assertion(content_roots[curr_content_index] == 
+                                         event_values[i]);
+                curr_event.mult_of_content_root 
+                    = content_mults[curr_content_index];
+                curr_content_index++;
+                break;
+            }
+            } // of switch
+            /*           
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << "Constructed event_coordinate: " 
+                                 << CGAL::to_double(curr_event.val) << " " 
+                                 << "\nmult_of_prim_res_root : "
+                                 << curr_event.mult_of_prim_res_root
+                                 << "\nindex_of_prim_res_root : "
+                                 << curr_event.index_of_prim_res_root
+                                 << "\nmult_of_content_root : "
+                                 << curr_event.mult_of_content_root
+                                 << "\nindex_of_content_root : "
+                                 << curr_event.index_of_content_root
+                                 << "\nmult_of_lcoeff_root : "
+                                 << curr_event.mult_of_prim_lcoeff_root
+                                 << "\nindex_of_lcoeff_root : "
+                                 << curr_event.index_of_prim_lcoeff_root
+                                 << std::endl;
+#endif
+            */
+            event_coordinate_vector.push_back(curr_event);
+        }
+        
+
+        CGAL_assertion(curr_lcoeff_index == 
+                       static_cast<size_type>(lcoeff_roots.size()));
+        CGAL_assertion(curr_res_index == 
+                       static_cast<size_type>(res_roots.size()));
+        CGAL_assertion(curr_content_index == 
+                       static_cast<size_type>(content_roots.size()));
+
+        this->ptr()->intermediate_values 
+            = std::vector<boost::optional<Bound> >
+            (event_coordinate_vector.size()+1);
+        this->ptr()->event_coordinates = event_coordinate_vector;
+      
+#if CGAL_ACK_DEBUG_FLAG
+        CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
+#endif
+
+    }
+
+public:    
+
+    /*! 
+     * \brief Returns a \c Curve_analysis_2 object for a sheared curve.
+     *
+     * The shear factor is given by the integer \c s.
+     * This functions only shears the primitive part of the defining equation.
+     * Internal caching is used to avoid repeated shears.
+     *
+     * \todo The sheared curves are not inserted into the curve_cache 
+     * of the Algebraic_curve_kernel_2 yet.
+     */
+    Self& shear_primitive_part(Integer s) const
+        throw(CGAL::internal::Non_generic_position_exception)
+    {
+        CGAL_assertion(s!=0);
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_shear_primitive_part();
+        }
+#endif
+        if(this->ptr()->bad_shears.find(s) !=
+           this->ptr()->bad_shears.end()) {
+            throw CGAL::internal::Non_generic_position_exception();
+        }
+        typedef typename std::map<Integer,Self>::iterator 
+            Map_iterator;
+        Map_iterator it = this->ptr()->sheared_curves.find(s);
+        if(it != this->ptr()->sheared_curves.end()) {
+            return it->second;
+        }
+        try {
+            Shear_transformation<Algebraic_kernel_with_analysis_2> 
+                shear_transformation(kernel());
+            Self D=shear_transformation((Self&)*this, s);
+            std::pair<Map_iterator,bool> insertion =
+                this->ptr()->sheared_curves.insert(std::make_pair(s,D));
+            CGAL_assertion(insertion.second);
+            return insertion.first->second;
+        }
+        catch(CGAL::internal::Non_generic_position_exception /* err */) {
+            this->ptr()->bad_shears.insert(s);
+            throw CGAL::internal::Non_generic_position_exception();
+        }
+    }
+    
+public:
+
+    //! Iterator for sheared curves
+    typename std::map<Coefficient,Self>::const_iterator shear_begin() {
+        return this->ptr()->sheared_curves.begin();
+    }
+
+    //! Iterator for sheared curves
+    typename std::map<Coefficient,Self>::const_iterator shear_end() {
+        return this->ptr()->sheared_curves.end();
+    }
+
+private:	
+  
+    // Sets the flag for vertical lines in all status lines that need it
+    void set_vertical_line_components() const {
+        for(size_type i = 0; 
+            i < static_cast<size_type>(event_coordinates().size()); 
+            i++ ) {
+            
+            if(event_coordinates()[i].mult_of_content_root > 0) {
+                status_line_at_event(i)._set_v_line();
+            }
+        }
+         
+    }
+    
+
+public:
+
+    /*!
+     * \brief Increases the precision of all status lines
+     *
+     * For each status line at an event and each status line that represents
+     * an interval, all y-coordinates are approximated such that their
+     * isolating interval has absolute size smaller then \c precision.
+     */
+    void refine_all(Bound precision) {
+
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_refine_all(precision);
+        }
+#endif
+
+        for(size_type i=0;
+            i<static_cast<size_type>(event_coordinates().size());
+            i++) {
+        /*
+#if CGAL_ACK_DEBUG_FLAG
+            CGAL_ACK_DEBUG_PRINT << i << ": " << std::flush;
+#endif
+        */
+            Status_line_1& el = status_line_at_event(i);
+
+            for(size_type j=0;j<el.number_of_events();j++) {
+/*
+#if CGAL_ACK_DEBUG_FLAG
+                CGAL_ACK_DEBUG_PRINT << j << " " << std::flush;
+#endif
+*/
+                el.refine_to(j,precision);
+            }
+        }
+        for(size_type i=0;
+            i<static_cast<size_type>(intermediate_values().size());
+            i++) {
+            Status_line_1 il = status_line_of_interval(i);
+            for(size_type j=0;j<il.number_of_events();j++) {
+                il.refine_to(j,precision);
+            }
+        }
+    }
+
+public:
+
+    //! \brief Iterator for the status lines at events
+    Event_line_iterator event_begin() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>(0),
+             Event_functor(this));
+    }
+
+    //! \brief Iterator for the status lines at events
+    Event_line_iterator event_end() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>
+             (number_of_status_lines_with_event()),
+             Event_functor(this));
+    }
+
+public:
+   
+    //! \brief Iterator for the status lines for intervals
+    Intermediate_line_iterator intermediate_begin() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>(0),
+             Intermediate_functor(this));
+    }
+
+    //! \brief Iterator for the status lines for intervals
+    Intermediate_line_iterator intermediate_end() const {
+        return boost::make_transform_iterator
+            (boost::counting_iterator<size_type>(intermediate_values().size()),
+             Intermediate_functor(this));
+    }
+
+public:
+
+    /*!
+     * \brief Returns the limit an infinite arc converges to
+     *
+     * \pre <tt>loc==CGAL::ARR_LEFT_BOUNDARY || 
+     *          loc==CGAL::ARR_RIGHT_BOUNDARY</tt>
+     *
+     * This method returns for the <tt>arcno</tt>th arc that goes to -infinity
+     * or +infinity (depending on \c loc) the y-coordinate it converges to.
+     * Possible values are either a \c Algebraic_real_1 object, or one of the
+     * values \c CGAL::ARR_TOP_BOUNDARY, \c CGAL::ARR_BOTTOM_BOUNDARY
+     * that denote that the arc is unbounded in y-direction. 
+     * The result is wrapped into a \c CGAL::Object object.
+     */
+    Asymptote_y asymptotic_value_of_arc(CGAL::Arr_parameter_space loc,
+                                        size_type arcno) const {
+        
+        CGAL_precondition(loc == CGAL::ARR_LEFT_BOUNDARY ||
+                          loc == CGAL::ARR_RIGHT_BOUNDARY);
+
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+        if(CGAL::degree(polynomial_2(),1)==2) {
+            return this->conic_asymptotic_value_of_arc(loc,arcno);
+        }
+#endif
+        
+        if(loc == CGAL::ARR_LEFT_BOUNDARY) {
+            
+            if(! this->ptr()->horizontal_asymptotes_left) {
+                compute_horizontal_asymptotes();
+            }
+            std::vector<Asymptote_y>& asym_info 
+                = this->ptr()->horizontal_asymptotes_left.get();
+            CGAL_precondition(arcno>=0 && 
+                              arcno<static_cast<size_type>(asym_info.size()));
+            return asym_info[arcno];
+        } // else loc == CGAL::ARR_RIGHT_BOUNDARY
+
+        if(! this->ptr()->horizontal_asymptotes_right) {
+            compute_horizontal_asymptotes();
+        }
+        std::vector<Asymptote_y>& asym_info 
+            = this->ptr()->horizontal_asymptotes_right.get();
+        CGAL_precondition(arcno>=0 && 
+                          arcno<static_cast<size_type>(asym_info.size()));
+        return asym_info[arcno];
+        
+    }
+
+
+private:
+
+    // Internal method to compute horizontal asymptotes
+    void compute_horizontal_asymptotes() const {
+      
+        // TODO: Filter out curves with no arc to +/- infty
+
+        Solve_1 solve_1 = kernel()->solve_1_object();
+
+        Polynomial_1 leading_coefficient_in_x 
+            = CGAL::leading_coefficient(typename Polynomial_traits_2::Swap() 
+                                        (polynomial_2(),0,1));
+        std::vector<Algebraic_real_1> roots_of_lcoeff;
+        
+        solve_1(leading_coefficient_in_x,
+                std::back_inserter(roots_of_lcoeff),
+                false);
+        
+
+        std::vector<Bound> stripe_bounds;
+        find_intermediate_values(kernel(),
+				 roots_of_lcoeff.begin(),
+                                 roots_of_lcoeff.end(),
+                                 std::back_inserter(stripe_bounds));
+        Bound leftmost_bound = bound_value_in_interval(0),
+            rightmost_bound = bound_value_in_interval
+                (this->number_of_status_lines_with_event());
+        for(size_type i=0;i<static_cast<size_type>(stripe_bounds.size());i++) {
+            Bound& beta = stripe_bounds[i];
+            Polynomial_1 poly_at_beta 
+	      = kernel()->evaluate_utcf_2_object()(this->polynomial_2(),beta);
+            std::vector<Algebraic_real_1> x_coordinates_at_beta;
+            solve_1(poly_at_beta,std::back_inserter(x_coordinates_at_beta),
+                    false);
+            size_type number_of_roots 
+                = static_cast<size_type>(x_coordinates_at_beta.size());
+            if(number_of_roots>0) {
+                if(leftmost_bound > x_coordinates_at_beta[0].low()) {
+                    leftmost_bound = x_coordinates_at_beta[0].low();
+                }
+                if(rightmost_bound 
+                   < x_coordinates_at_beta[number_of_roots-1].high()) {
+                    rightmost_bound 
+                        = x_coordinates_at_beta[number_of_roots-1].high();
+                }
+            }     
+        }
+        
+        // Just to be sure...
+        leftmost_bound = leftmost_bound - 1;
+        rightmost_bound = rightmost_bound + 1;
+
+        Polynomial_1 curve_at_left_end 
+	= kernel()->evaluate_utcf_2_object()
+	  (typename Polynomial_traits_2::Swap() (this->polynomial_2(),0,1),
+	   leftmost_bound);
+        std::vector<Algebraic_real_1> roots_at_left_end;
+        solve_1(curve_at_left_end,std::back_inserter(roots_at_left_end),false);
+        size_type number_of_roots_at_left_end 
+            = static_cast<size_type>(roots_at_left_end.size());
+        std::vector<Asymptote_y> asym_left_info;
+        size_type current_stripe=0,i=0;
+        while(i<number_of_roots_at_left_end) {
+            if(current_stripe==static_cast<size_type>(stripe_bounds.size())) {
+                asym_left_info.push_back( CGAL::make_object
+                                              (CGAL::ARR_TOP_BOUNDARY) );
+                i++;
+                continue;
+            }
+            if(roots_at_left_end[i].low() > stripe_bounds[current_stripe]) {
+                current_stripe++;
+                continue;
+            }        
+            if(roots_at_left_end[i].high() < stripe_bounds[current_stripe]) {
+                if(current_stripe==0) {
+                    asym_left_info.push_back(CGAL::make_object
+                                                 (CGAL::ARR_BOTTOM_BOUNDARY));
+                    i++;
+                    continue;
+                } else {
+                    asym_left_info.push_back(CGAL::make_object
+                                 (roots_of_lcoeff[current_stripe-1]));
+                    i++;
+                    continue;
+                }
+            }
+            roots_at_left_end[i].refine();
+        }
+        this->ptr()->horizontal_asymptotes_left = asym_left_info;
+         
+        Polynomial_1 curve_at_right_end 
+	= kernel()->evaluate_utcf_2_object()
+  	    (typename Polynomial_traits_2::Swap() (this->polynomial_2(),0,1),
+             rightmost_bound);
+        std::vector<Algebraic_real_1> roots_at_right_end;
+        solve_1(curve_at_right_end,std::back_inserter(roots_at_right_end),false);
+        size_type number_of_roots_at_right_end 
+            = static_cast<size_type>(roots_at_right_end.size());
+        std::vector<Asymptote_y> asym_right_info;
+        current_stripe=0;
+        i=0;
+        while(i<number_of_roots_at_right_end) {
+            if(current_stripe==static_cast<size_type>(stripe_bounds.size())) {
+                asym_right_info.push_back(CGAL::make_object
+                                              (CGAL::ARR_TOP_BOUNDARY) );
+                i++;
+                continue;
+            }
+            if(roots_at_right_end[i].low() > stripe_bounds[current_stripe]) {
+                current_stripe++;
+                continue;
+            }        
+            if(roots_at_right_end[i].high() < stripe_bounds[current_stripe]) {
+                if(current_stripe==0) {
+                    asym_right_info.push_back(CGAL::make_object
+                                                  (CGAL::ARR_BOTTOM_BOUNDARY));
+                    i++;
+                    continue;
+                } else {
+                    asym_right_info.push_back
+                        (CGAL::make_object(roots_of_lcoeff[current_stripe-1]));
+                    i++;
+                    continue;
+                }
+            }
+            roots_at_right_end[i].refine();
+        }
+        this->ptr()->horizontal_asymptotes_right = asym_right_info;
+ 
+    }
+
+    //! @}
+
+public:
+
+    template<typename OutputIterator> void get_roots_at_rational
+    (Bound r, OutputIterator it) const {
+        
+        typename Rep::Intermediate_cache::Find_result find_result
+            = this->ptr()->intermediate_cache.find(r);
+
+	std::vector<Algebraic_real_1> p_roots;
+
+        if(find_result.second) {
+            p_roots = find_result.first->second;
+        } else {
+	    Polynomial_2 swapped = typename Polynomial_traits_2::Swap() 
+                              	    (this->polynomial_2(), 0, 1);
+	    Polynomial_1 p = kernel()->evaluate_utcf_2_object()(swapped,r);
+	    kernel()->solve_1_object()(p,std::back_inserter(p_roots),false);
+
+            this->ptr()->intermediate_cache.insert(std::make_pair(r,p_roots));
+            
+        }
+        std::copy(p_roots.begin(),p_roots.end(),it);
+    }
+
+
+    // \name Internal functions for Conic optimization
+    //! @{
+
+#if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX
+
+private:
+    
+    bool conic_is_y_regular() const {
+        CGAL_error_msg("Implement me");
+        return false;
+    }
+
+    bool conic_has_vertical_component() const {
+        CGAL_error_msg("Implement me");
+        return false;
+    }
+
+    size_type conic_number_of_status_lines_with_event() const {
+        CGAL_error_msg("Implement me");
+        return 0;
+    }
+
+    void conic_x_to_index(Algebraic_real_1 x,size_type& i,bool& is_event) const
+    {
+        CGAL_error_msg("Implement me");
+    }
+
+    Status_line_1& conic_status_line_at_event(size_type i) const {
+        CGAL_error_msg("Implement me");
+        // Just a random status line to make compiler happy
+        return this->ptr()->vert_line_at_rational_map[Bound(0)];
+    }
+
+    Status_line_1& conic_status_line_at_exact_x(Bound b) const {
+        CGAL_error_msg("Implement me");
+        return this->ptr()->vert_line_at_rational_map[Bound(0)];
+    }
+
+    Status_line_1& conic_status_line_at_exact_x(Algebraic_real_1 alpha) const {
+        CGAL_error_msg("Implement me");
+        return this->ptr()->vert_line_at_rational_map[Bound(0)];
+    }
+
+    Status_line_1 conic_status_line_of_interval(size_type i) const {
+        CGAL_error_msg("Implement me");
+        return this->ptr()->vert_line_at_rational_map[Bound(0)];
+    }
+
+    Status_line_1 conic_status_line_for_x
+        (Algebraic_real_1 x,
+         CGAL::Sign perturb = CGAL::ZERO) const {
+        CGAL_error_msg("Implement me");
+        return this->ptr()->vert_line_at_rational_map[Bound(0)];
+    }
+
+    size_type conic_arcs_over_interval(size_type i) const {
+        CGAL_error_msg("Implement me");
+        return -1;
+    }
+
+    Bound conic_bound_value_in_interval(size_type i) const {
+        CGAL_error_msg("Implement me");
+        return Bound(0);
+    }
+
+    Polynomial_1 conic_content() const {
+        CGAL_error_msg("Implement me");
+        return Polynomial_1();
+    }
+
+    Polynomial_2 conic_primitive_polynomial_2() const {
+        CGAL_error_msg("Implement me");
+        return Polynomial_2();
+    }
+
+    Self& conic_shear_primitive_part(Integer s) const {
+        CGAL_error_msg("Implement me");
+        return Self();
+    }
+
+    void conic_refine_all(Bound precision) {
+        CGAL_error_msg("Implement me");
+    }
+
+    Asymptote_y conic_asymptotic_value_of_arc(CGAL::Arr_parameter_space loc,
+                                              size_type arcno) const {
+        CGAL_error_msg("Implement me");
+        return Asymptote_y();
+    }
+
+#endif
+
+
+    //! @}
+
+    //! \name friends
+    //! @{
+
+    // friend function for id-based hashing
+    friend std::size_t hash_value(const Self& x) {
+        return static_cast<std::size_t>(x.id());
+    }
+
+    // another friend
+    friend class Shear_transformation<Algebraic_kernel_with_analysis_2>;
+    
+    //! @}
+
+}; // class Algebraic_curve_2_2
+
+
+//! \brief Prints the objects.
+template<typename AlgebraicKernelWithAnalysis_2, 
+         typename Rep_>
+std::ostream& operator<< (
+        std::ostream& out, 
+        const Curve_analysis_2< AlgebraicKernelWithAnalysis_2, 
+        Rep_ >& curve) {
+
+  typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
+  
+  typedef Rep_ Rep;
+  
+  typedef Curve_analysis_2< Algebraic_kernel_with_analysis_2, Rep > Curve;
+  
+  typedef typename Curve::size_type size_type;
+  typedef typename Curve::Asymptote_y Asymptote_y;
+  
+    
+    switch (::CGAL::get_mode(out)) {
+    case ::CGAL::IO::PRETTY: {
+      
+      out << "--------------- Analysis results ---------------" << std::endl;
+      out << "Number of constructed event lines: " 
+          << curve.number_of_status_lines_with_event() 
+          << std::endl;
+      out << "(Horizontal) asymptotes at -infty: " << std::flush;
+      for (size_type i = 0; i < curve.arcs_over_interval(0); i++) {
+        
+        const Asymptote_y& curr_asym_info_obj 
+          = curve.asymptotic_value_of_arc(CGAL::ARR_LEFT_BOUNDARY,i);
+        typename Curve::Algebraic_real_1 curr_asym_info;
+        bool is_finite = CGAL::assign(curr_asym_info,curr_asym_info_obj);
+        if (!is_finite) {
+          // Assignment to prevent compiler warning
+          CGAL::Arr_parameter_space loc = CGAL::ARR_LEFT_BOUNDARY;
+          CGAL_assertion_code(bool is_valid = )
+            CGAL::assign(loc, curr_asym_info_obj);
+          CGAL_assertion(is_valid);
+          if (loc == CGAL::ARR_TOP_BOUNDARY) {
+            out << "+infty " << std::flush;
+          } else {
+            CGAL_assertion(loc == CGAL::ARR_BOTTOM_BOUNDARY);
+            out << "-infty " << std::flush;
+          }
+        } else { // is_finite
+          out << CGAL::to_double(curr_asym_info) 
+              << " " << std::flush;
+        }
+      }
+      
+      out << std::endl;
+      
+      out << "Intermediate line at " 
+          << CGAL::to_double(curve.bound_value_in_interval(0))
+          << ": " << curve.arcs_over_interval(0) << " passing arcs" 
+          << std::endl 
+          << std::endl;
+      for (size_type i = 0; i < curve.number_of_status_lines_with_event(); 
+           i++) {
+        out << curve.status_line_at_event(i) << std::endl;
+        out << "Intermediate line at " 
+            << CGAL::to_double(curve.bound_value_in_interval(i+1))
+            << ": " << curve.arcs_over_interval(i+1) 
+            << " passing arcs" << std::endl
+            << std::endl;
+      }
+      out << "(Horizontal) asymptotes at +infty: " << std::flush;
+      size_type no_events = curve.number_of_status_lines_with_event();
+      for (size_type i = 0; i < curve.arcs_over_interval(no_events); i++) {
+        
+        const Asymptote_y& curr_asym_info_obj 
+          = curve.asymptotic_value_of_arc(CGAL::ARR_RIGHT_BOUNDARY,i);
+        typename Curve::Algebraic_real_1 curr_asym_info;
+        bool is_finite = CGAL::assign(curr_asym_info,curr_asym_info_obj);
+        if(! is_finite) {
+          // Assignment to prevent compiler warning
+          CGAL::Arr_parameter_space loc = CGAL::ARR_LEFT_BOUNDARY;
+          CGAL_assertion_code(bool is_valid = )
+            CGAL::assign(loc, curr_asym_info_obj);
+          CGAL_assertion(is_valid);
+          if(loc == CGAL::ARR_TOP_BOUNDARY) {
+            out << "+infty " << std::flush;
+          } else {
+            CGAL_assertion(loc == CGAL::ARR_BOTTOM_BOUNDARY);
+            out << "-infty " << std::flush;
+          }
+        } else { // is_finite
+          out << CGAL::to_double(curr_asym_info) 
+              << " " << std::flush;
+        }
+      }
+      
+      out << std::endl;
+      
+      out << "------------------------------------------------" << std::endl;
+      break;
+    }
+    case ::CGAL::IO::BINARY:
+      std::cerr << "BINARY format not yet implemented" << std::endl;
+      break;
+    default:
+      // ASCII
+      out << curve.polynomial_2();
+    }
+    
+    return out;
+}
+
+//! \brief Reads the objects from stream
+template<typename AlgebraicKernelWithAnalysis_2, 
+         typename Rep_>
+std::istream& operator>> (
+    std::istream& is, 
+    Curve_analysis_2< AlgebraicKernelWithAnalysis_2, Rep_ >& curve) {
+  
+  CGAL_precondition(CGAL::is_ascii(is));
+  
+  typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
+
+  typedef Rep_ Rep;
+  
+  typename Curve_analysis_2< Algebraic_kernel_with_analysis_2, Rep >::
+    Polynomial_2 f;
+
+  is >> f;
+
+  // TODO is get_static_instance the right way?
+  curve = Algebraic_kernel_with_analysis_2::get_static_instance().
+    construct_curve_2_object()(f);
+  
+  return is;
+}
+  
+
+} //namespace CGAL
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+
+#endif // ALGEBRAIC_CURVE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Descartes.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Descartes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Descartes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Descartes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Event_line_builder.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Event_line_builder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Event_line_builder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Event_line_builder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Float_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Float_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Float_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Float_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Real_roots.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Real_roots.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Real_roots.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Real_roots.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Shear_controller.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Shear_controller.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Shear_controller.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Shear_controller.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Shear_transformation.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Shear_transformation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Shear_transformation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Shear_transformation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
new file mode 100644
index 0000000..86d4568
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
@@ -0,0 +1,785 @@
+// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
+//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+//
+// ============================================================================
+
+#ifndef CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
+#define CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
+
+#include <CGAL/basic.h>
+#include <boost/numeric/interval.hpp>
+
+#include <CGAL/Bbox_2.h>
+
+#include <CGAL/Arithmetic_kernel.h>
+
+namespace CGAL {
+
+namespace internal {
+
+template < class AlgebraicCurveKernel_2, class Rep_, 
+      class HandlePolicy_ ,
+      class Allocator_>
+        //::boost::fast_pool_allocator<Rep_> >
+class Xy_coordinate_2;
+
+
+template < class AlgebraicCurveKernel_2 >
+class Xy_coordinate_2_rep {
+
+public:
+    // this first template argument
+    typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
+
+    // myself
+    typedef Xy_coordinate_2_rep<Algebraic_curve_kernel_2> Self;
+
+    typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
+        Curve_analysis_2;
+
+    typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
+        Algebraic_real_1;
+
+    typedef CGAL::Bbox_2 Bbox_2;
+
+    typedef CGAL::Handle_with_policy<Self>
+        Xy_coordinate_2_inst;
+
+    // constructors
+public:
+    // default constructor ()
+    Xy_coordinate_2_rep() : _m_arcno(-1) {
+    }
+    
+    // standard constructor
+    Xy_coordinate_2_rep(const Algebraic_real_1& x,
+                        const Curve_analysis_2& curve, int arcno) 
+      : _m_kernel(curve.kernel()),_m_x(x), _m_curve(curve), _m_arcno(arcno) {
+    }
+
+    // data
+
+    const Algebraic_curve_kernel_2* _m_kernel;
+
+    // x-coordinate
+    Algebraic_real_1 _m_x;
+    
+    // supporting curve
+    mutable Curve_analysis_2 _m_curve;
+    
+    // arc number on curve
+    mutable int _m_arcno;
+
+    // y-coordinate
+    mutable boost::optional< Algebraic_real_1 > _m_y;
+
+    //! A bounding box for the given point
+    mutable boost::optional< std::pair<double,Bbox_2> > _m_bbox_2_pair;
+
+};
+
+//! \brief class \c Xy_coordinate_2 represents a single root of a system of 
+//! two polynomial equations in two variables that are models 
+//! \c AlgebraicCurveKernel_2::Polynomial_2
+//!
+//! \c Xy_coordinate_2 coordinate is represented by an \c Algebraic_real_1,
+//! a supporting curve and an arcno and is valid only for finite solutions,
+//! i.e., it cannot represent points at infinity 
+template <class AlgebraicCurveKernel_2, 
+          class Rep_ = internal::Xy_coordinate_2_rep<AlgebraicCurveKernel_2>,
+          class HandlePolicy_= CGAL::Handle_policy_union, 
+          class Allocator_ = CGAL_ALLOCATOR(Rep_) >
+class Xy_coordinate_2 : 
+    public ::CGAL::Handle_with_policy<Rep_, HandlePolicy_, Allocator_> 
+{
+public:
+    //! \name public typedefs
+    //!@{
+    
+    //! this instance's first template parameter
+    typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
+    
+    //! this instance's second template parameter
+    typedef Rep_ Rep;
+    
+    //! this instance's third template parameter
+    typedef HandlePolicy_ Handle_policy;
+    
+    //! this instance's fourth template parameter
+    typedef Allocator_ Allocator;
+
+    //! this instance itself
+    typedef Xy_coordinate_2<Algebraic_curve_kernel_2, Rep, Handle_policy,
+        Allocator> Self;
+        
+    //! an instance of AlgebraicKernel_1
+    typedef typename Algebraic_curve_kernel_2::Algebraic_kernel_d_1 
+        Algebraic_kernel_d_1;
+    
+    typedef typename Algebraic_curve_kernel_2::Polynomial_1 Polynomial_1;
+    typedef CGAL::Polynomial_traits_d<Polynomial_1> Polynomial_traits_1;
+
+    typedef typename Algebraic_curve_kernel_2::Polynomial_2 Polynomial_2;
+    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
+
+    //! type of (explicit) x- and y-coordinates
+    typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
+        Algebraic_real_1;
+
+    //! Coefficient type
+    typedef typename Algebraic_curve_kernel_2::Coefficient Coefficient;
+
+    //! type of curve pair analysis
+    typedef typename Algebraic_curve_kernel_2::Curve_pair_analysis_2
+                Curve_pair_analysis_2;
+    
+    //! type of curve analysis
+    typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
+                Curve_analysis_2;
+    
+    //! the handle superclass
+    typedef ::CGAL::Handle_with_policy<Rep, Handle_policy, Allocator> Base;
+
+    //! type for approximation boundaries
+    typedef typename Algebraic_curve_kernel_2::Bound Bound;
+
+    //! type for bound intervals
+    typedef boost::numeric::interval<Bound> Bound_interval;
+
+    //! Type for the bounding box
+    typedef typename Rep::Bbox_2 Bbox_2;
+    
+    //!@}
+private:
+    //! \name private methods
+    //!@{
+
+    /*!\brief
+     * Simplifies the representation of two points whose supporting curves
+     * share a common part.
+     */
+    bool _simplify(const Xy_coordinate_2& p, const Xy_coordinate_2& q) const
+    {
+        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
+
+        if(kernel()->decompose_2_object()(p.curve(), q.curve(), 
+            std::back_inserter(parts_of_f), std::back_inserter(parts_of_g),
+                std::back_inserter(common))) {
+
+            CGAL_assertion((parts_of_f.size() == 1 ||
+                       parts_of_g.size() == 1) && common.size() == 1);
+            if(parts_of_f.size() == 1) {
+                p.simplify_by(kernel()->construct_curve_pair_2_object()(
+                    parts_of_f[0], common[0]));
+            } 
+            
+            if(parts_of_g.size() == 1) {
+                q.simplify_by(kernel()->construct_curve_pair_2_object()(
+                    parts_of_g[0], common[0]));
+            } 
+            return true;
+        }
+        return false;
+    }
+    
+    //!@}
+public:
+    //!\name Constructors
+    //!@{
+
+    /*!\brief 
+     * default constructor
+     *
+     * A default-constructed point supports no operation other than
+     * having \c CGAL::degree(curve()) return \c -1. 
+     */
+    Xy_coordinate_2() : 
+        Base(Rep()) { 
+    }
+
+    /*!\brief
+     * copy constructor
+     */
+    Xy_coordinate_2(const Self& p) : 
+        Base(static_cast<const Base&>(p)) {  
+    }
+
+    /*!\brief
+     * Point at \c x, on \c curve with \c arcno. Finite points on vertical arcs
+     * are also constructed in this way
+     */
+    Xy_coordinate_2(const Algebraic_real_1& x, const Curve_analysis_2& curve,
+                    int arcno) :
+          Base(Rep(x, curve, arcno)) {
+            
+        CGAL_precondition(arcno >= 0);
+        CGAL_precondition_code(
+            typename Curve_analysis_2::Status_line_1 v =
+                curve.status_line_for_x(x);
+        );
+        CGAL_precondition(arcno >= 0 && arcno < v.number_of_events());
+    }
+    
+    /*!\brief
+     * constructs a point from a given represenation
+     */
+    Xy_coordinate_2(Rep rep) : 
+        Base(rep) {  
+    }
+   
+    //!@}
+public:
+    //!\name Access functions
+    //!@{
+    
+    /*!\brief 
+     * x-coordinate of the point
+     */
+    const Algebraic_real_1& x() const { 
+        return this->ptr()->_m_x; 
+    }
+
+    /*!
+     * \brief y-coordinate of this point
+     *
+     * Note: In general, this method results in a extremly large polynomial
+     * for the y-coordinate. It is recommended to use it carefully,
+     * and using get_approximation_y() instead whenever approximations suffice.
+     */
+    Algebraic_real_1 y() const {
+
+        typedef std::vector< Algebraic_real_1 > Roots;
+        // EBEB 2012-07-05 deactivated map for y-roots for not being used
+        // typedef typename Curve_analysis_2::Status_line_1 Key;
+        // EBEB 2012-07-05 deactivated map for y-roots for not being used
+        // typedef Roots Data;
+        // EBEB 2012-07-05 deactivated map for y-roots for not being used
+        //        typedef std::map< Key, Data, CGAL::Handle_id_less_than< Key > > 
+        //    Y_root_map;
+        
+        // EBEB 2012-07-05 deactivated map for y-roots for not being used
+        //static Y_root_map y_root_map;
+
+        if (!this->ptr()->_m_y) {
+            
+            Polynomial_2 f = curve().primitive_polynomial_2();
+            // This will be the defining polynomial of y
+            Polynomial_1 y_pol;
+
+            // Filter: If we know that the point is critical, we can use
+            // the resultant of f and f_y with respect to x as polynomial
+            bool point_is_certainly_critical = false;
+            typename Curve_analysis_2::Status_line_1 line =
+                curve().status_line_at_exact_x(x());
+            
+            // EBEB 2012-07-05 deactivated map for y-roots for not being used
+            //typename Y_root_map::iterator yit = 
+            //    y_root_map.find(line);
+
+            // TODO: Cache resultant computation
+            // exacus-related code shouldn't be used here
+            //curve().x_to_index(x(),i,is_event);
+            if (line.is_event()) {
+                //typename Internal_curve_2::Event1_info ev_info =
+                //   curve().event_info(i);
+                typename Curve_analysis_2::Status_line_1::Arc_pair ipair =
+                    line.number_of_incident_branches(arcno());
+                
+                if (ipair.first != 1 || ipair.second != 1) {
+                    point_is_certainly_critical = true;
+                    y_pol = CGAL::make_square_free(
+                              CGAL::resultant
+                                (typename Polynomial_traits_2::Swap() (f,0,1),
+                                 typename Polynomial_traits_2::Swap() 
+                                   (CGAL::differentiate(f),0,1))
+                        );
+                    // BUGFIX: y_pol might be zero:
+                    if(y_pol.is_zero()) {
+                        // force re-computation with bigger resultant
+                        point_is_certainly_critical=false;
+                    }                             
+                    
+                }
+            }
+            
+            if (!point_is_certainly_critical) {
+                
+                Polynomial_2 r(x().polynomial());
+                y_pol = CGAL::make_square_free(
+			  CGAL::resultant
+                            (typename Polynomial_traits_2::Swap() (f,0,1),
+                             typename Polynomial_traits_2::Swap() (r,0,1))
+                );
+                
+            }
+            typename Algebraic_kernel_d_1::Solve_1 real_roots;
+            
+            Roots y_roots;
+            real_roots(y_pol, std::back_inserter(y_roots), false ); 
+            
+            long prec = 16;
+	    
+	    typename Algebraic_curve_kernel_2::Approximate_absolute_y_2
+	      approx_y=kernel()->approximate_absolute_y_2_object();
+	    
+	    std::pair<Bound,Bound> y_pair = approx_y(*this,prec);
+	    
+	    Bound_interval y_iv(y_pair.first,y_pair.second);
+            
+            typedef typename std::vector<Algebraic_real_1>::const_iterator
+                Iterator;
+            
+            std::list< Iterator > candidates;
+            
+            for (Iterator it = y_roots.begin(); it != y_roots.end(); it++) {
+                Bound_interval it_interval(it->low(), it->high());
+                if (boost::numeric::overlap(it_interval, y_iv)) {
+                    candidates.push_back(it);
+                }
+            }
+            CGAL_assertion(!candidates.empty());
+
+            while (candidates.size() > 1) {
+	        prec*=2;
+	        y_pair = approx_y(*this,prec);
+	    
+                y_iv = Bound_interval(y_pair.first,y_pair.second);
+
+                for (typename std::list< Iterator >::iterator dit, cit =
+                         candidates.begin(); cit != candidates.end(); ) {
+                    bool remove = false;
+                    Bound_interval 
+                        cit_interval((*cit)->low(), (*cit)->high());
+                    if (!boost::numeric::overlap(cit_interval, y_iv)) {
+                        dit = cit;
+                        remove = true;
+                    }
+                    cit++;
+                    if (remove) {
+                        candidates.erase(dit);
+                    }
+                }
+            }
+            CGAL_assertion(static_cast< int >(candidates.size()) == 1);
+            this->ptr()->_m_y = 
+                Algebraic_real_1(
+                        (*candidates.begin())->polynomial(), 
+                        (*candidates.begin())->low(), 
+                        (*candidates.begin())->high()
+                );
+        }
+        CGAL_postcondition(bool(this->ptr()->_m_y));
+        return *this->ptr()->_m_y;
+    }
+    
+    /*!\brief
+     * supporting curve of the point
+     */
+    Curve_analysis_2 curve() const {
+        return this->ptr()->_m_curve; 
+    }
+    
+    /*!\brief
+     * arc number of point
+     *
+     */
+    int arcno() const { 
+        return this->ptr()->_m_arcno; 
+    }
+
+    //!@}
+public:
+    //!\name comparison predicates
+    //!@{
+
+    /*!\brief
+     * compares x-coordinates of \c *this with \c q
+     * 
+     * do we need this method or one should use Algebraic_curve_kernel_2
+     * directly ?
+     */
+    CGAL::Comparison_result compare_x(const Self& q) const {
+    
+        if(this->is_identical(q)) {
+            return CGAL::EQUAL;
+        }
+        return kernel()->compare_1_object()(this->x(), q.x());
+    }
+
+    /*!\brief
+     * compares \c *this with \c q lexicographically
+     */
+    CGAL::Comparison_result compare_xy(const Self& q, 
+        bool equal_x = false) const {
+        
+        if(this->is_identical(q)) 
+            return CGAL::EQUAL;
+
+        CGAL::Comparison_result res = (equal_x ? CGAL::EQUAL : compare_x(q)); 
+        if(res == CGAL::EQUAL) {
+            res = _compare_y_at_x(q);
+        }
+        return res;
+    }
+    
+    //! equality
+    bool operator == (const Self& q) const {return q.compare_xy(*this)== 0;}
+    
+    //! inequality
+    bool operator != (const Self& q) const {return q.compare_xy(*this)!= 0;}
+
+    //! less than in (x,y) lexicographic order
+    bool operator <  (const Self& q) const {return q.compare_xy(*this)> 0;}
+
+    //! less-equal in (x,y) lexicographic order
+    bool operator <= (const Self& q) const {return q.compare_xy(*this)>= 0;}
+
+    //! greater than in (x,y) lexicographic order
+    bool operator >  (const Self& q) const {return q.compare_xy(*this)< 0;}
+
+    //! greater-equal in (x,y) lexicographic order
+    bool operator >= (const Self& q) const {return q.compare_xy(*this)<= 0;}
+    
+    //!@}
+
+    //!@{
+    //! \name 
+
+    const Algebraic_curve_kernel_2* kernel() const {
+        return this->ptr()->_m_kernel;
+    }
+
+private:
+
+    /*!\brief
+     * compares y-coordinates for covertical points \c *this and \c q
+     *
+     * \pre x() == q.x()
+     */
+    CGAL::Comparison_result _compare_y_at_x(const Self& q) const 
+    {
+        CGAL_precondition(this->compare_x(q) == CGAL::EQUAL);
+    
+        Curve_analysis_2 f = curve(), g = q.curve();
+        if(f.is_identical(g)) 
+            return CGAL::sign(arcno() - q.arcno());
+        if(Self::_simplify(*this, q)) 
+            // restart since supporting curves might be equal now
+            return _compare_y_at_x(q);
+                        
+        Curve_pair_analysis_2 cpa_2 =
+            kernel()->construct_curve_pair_2_object()(f, g);
+            
+            
+        typename Curve_pair_analysis_2::Status_line_1 vline =
+            cpa_2.status_line_for_x(x());
+        return CGAL::sign(vline.event_of_curve(arcno(), f) -
+                    vline.event_of_curve(q.arcno(), g));
+    }
+    
+    //!@}
+public:
+    //!\name Reconstructing functions
+    //!@{
+    
+    /*!\brief
+     * Simplifies the representation of a point.
+     * 
+     * Given a decomposition of the point's supporting \c curve() into 
+     * a pair of two curves \c pair, this function searches this point
+     * in the curve pair and resets the curve and the arcno to this
+     * found arc. It can happen, that both curves of the pair fit this 
+     * condition (intersection of the two curves at this point), then it
+     * chooses the simpler one (less total degree).
+     *
+     * \pre pair must be a decomposition of curve()
+     */
+    void simplify_by(const Curve_pair_analysis_2& cpa_2) const {
+    
+        CGAL_precondition_code(
+            Polynomial_2 mult =
+                    cpa_2.curve_analysis(0).polynomial_2() *
+                    cpa_2.curve_analysis(1).polynomial_2();
+        );
+        // common parts
+        CGAL_precondition(CGAL::resultant(mult, 
+                                          curve().polynomial_2()).is_zero());
+        // full parts
+        CGAL_precondition(CGAL::degree(mult) == 
+                          CGAL::degree(curve().polynomial_2()));
+        CGAL_precondition(CGAL::total_degree(mult) ==
+                          CGAL::total_degree(curve().polynomial_2()));
+
+        typename Curve_pair_analysis_2::Status_line_1 cpv_line =
+                cpa_2.status_line_for_x(x());
+        // # of arcs must match
+        CGAL_precondition_code(
+            typename Curve_analysis_2::Status_line_1 cv_line =
+                curve().status_line_for_x(x());
+        );
+        CGAL_precondition(cpv_line.number_of_events() == 
+            cv_line.number_of_events());
+
+        bool cid = false;
+        std::pair<int, int> p = cpv_line.curves_at_event(arcno());
+        if(p.first != -1 && p.second != -1) {
+            // both curves involved: choose simpler one
+            // Remark: In this case, a vertical line in the curves can be
+            // ignored, since it has not been considered when constructing
+            // the point from the composed curved (also including this vertical
+            // line). Therefore, the old arc number is also valid in the curve
+            // pair.
+            Polynomial_2 ff = cpa_2.curve_analysis(0).polynomial_2(),
+	                 gg = cpa_2.curve_analysis(1).polynomial_2();
+            if(total_degree(ff) > total_degree(gg)) 
+                cid = true;
+        } else 
+          cid = (p.first == -1);
+        // overwrite data
+        this->ptr()->_m_curve = cpa_2.curve_analysis(cid);
+        this->ptr()->_m_arcno = (cid == 0 ? p.first : p.second);
+    }
+    
+    //! befriending output iterator
+   // friend std::ostream& operator << <>(std::ostream& os, const Self& pt);
+
+    //!@}
+public:
+    
+    //! Returns whether the x-coordinate equals zero
+    bool is_x_zero() const {
+      return CGAL::is_zero(this->ptr()->_m_x);
+    }
+
+    //! Returns whether the y-coordinate equals zero
+    bool is_y_zero() const {
+      CGAL::Sign lower_sign = CGAL::sign(this->lower_bound_y()),
+                 upper_sign = CGAL::sign(this->upper_bound_y());
+      if( lower_sign == CGAL::ZERO ||upper_sign == CGAL::ZERO) {
+	if(lower_sign==upper_sign) { //both zero
+	  return true;
+	} else { // one zero, one not...isol interval is OPEN
+	  return false;
+	}
+      } else if( lower_sign==upper_sign) { // zero not in isol interval
+	return false;
+      } else { // zero in interval, need to check
+	Polynomial_1 constant_pol =
+ 	  CGAL::get_coefficient(curve().primitive_polynomial_2(),0);
+	bool zero_is_root_of_local_pol 
+  	  = kernel()->is_zero_at_1_object()(constant_pol,this->ptr()->_m_x);
+        // Since we know that y_iv is an _isolating_ interval,
+        // we can immediately return
+        return zero_is_root_of_local_pol;
+      }
+    }
+
+    // returns a double approximation of the point
+    std::pair<double, double> to_double() const {
+
+      typedef typename CGAL::Get_arithmetic_kernel<Bound>::Arithmetic_kernel 
+        AT;
+        typedef typename AT::Bigfloat_interval BFI; 
+
+        long old_prec = get_precision(BFI());
+        
+        set_precision (BFI(), 53);
+
+	// rely on double conversion of the x-type
+        double double_x = CGAL::to_double(this->ptr()->_m_x);
+        double double_y;
+
+
+        if (this->lower_bound_y()==this->upper_bound_y()) {
+            double_y = CGAL::to_double(convert_to_bfi(this->lower_bound_y()));
+        } else if(is_y_zero()) {
+            double_y = 0.;
+        } else {
+            while(CGAL::sign(this->lower_bound_y()) != 
+                  CGAL::sign(this->upper_bound_y()) ) {
+                this->refine_y();
+            }
+            long final_prec = set_precision(BFI(),get_precision(BFI())+4);
+            
+            BFI bfi = CGAL::hull(convert_to_bfi(this->lower_bound_y()), 
+				 convert_to_bfi(this->upper_bound_y()));
+            
+            while( !singleton(bfi) &&  
+                   get_significant_bits(bfi) < final_prec  ){
+                this->refine_y();
+                bfi = CGAL::hull(
+                        convert_to_bfi(this->lower_bound_y()), 
+                        convert_to_bfi(this->upper_bound_y()));
+            }
+            double_y 
+                = CGAL::to_double((CGAL::lower(bfi)+ CGAL::upper(bfi)) / 2);
+        }
+        set_precision(BFI(),old_prec);
+        return std::make_pair(double_x, double_y); 
+    }
+
+    public:
+
+    
+    void refine_y() const {
+        this->curve().status_line_at_exact_x(this->x()).refine(this->arcno());
+    }
+
+    Bound lower_bound_y() const {
+      return this->curve().status_line_at_exact_x(this->x()).
+          lower_bound(this->arcno());
+    }
+
+    Bound upper_bound_y() const {
+      return this->curve().status_line_at_exact_x(this->x()).
+          upper_bound(this->arcno());
+    }
+
+#if CGAL_AK_ENABLE_DEPRECATED_INTERFACE
+
+    void refine_x() const {
+      this->x().refine();
+    }
+
+    Bound lower_bound_x() const {
+      return this->x().low();
+    }
+
+    Bound upper_bound_x() const {
+      return this->x().high();
+    }
+
+#endif
+
+
+     // friend function to provide a fast hashing
+    friend std::size_t hash_value(const Self& x) {
+        return static_cast<std::size_t>(x.id());
+    }
+
+    //!@}
+
+}; // class Xy_coordinate_2
+
+template < class AlgebraicCurveKernel_2, class Rep> 
+std::ostream& operator<< (std::ostream& os, 
+    const Xy_coordinate_2<AlgebraicCurveKernel_2, Rep>& pt)
+{
+  switch (::CGAL::get_mode(os)) {
+  case ::CGAL::IO::PRETTY: {
+    os << "[x-coord: " << CGAL::to_double(pt.x()) << "; curve: " <<
+      pt.curve().polynomial_2() << 
+      "; arcno: " << pt.arcno() << "]\n";
+    break;
+  } 
+  case ::CGAL::IO::BINARY:
+    std::cerr << "BINARY format not yet implemented" << std::endl;
+    break;
+  default:
+    // ASCII
+    os << "Algebraic_real_xca_2(";
+    os << pt.x();
+    os << ",";
+    os << pt.curve();
+    os << ",";
+    os << pt.arcno();
+    os << ")";
+  }
+  return os;    
+}
+
+template < class AlgebraicCurveKernel_2, class Rep_ > 
+std::istream& operator >> (
+    std::istream& is,
+    Xy_coordinate_2< AlgebraicCurveKernel_2, Rep_>& pt) {
+
+  CGAL_precondition(CGAL::is_ascii(is));
+  
+  // this instance's first template argument
+  typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
+  
+  // this instance's second template argument
+  typedef Rep_ Rep;
+
+  // myself
+  typedef Xy_coordinate_2< Algebraic_curve_kernel_2, Rep > Xy_coordinate_2;
+  
+  typedef typename Algebraic_curve_kernel_2::Algebraic_real_1 
+    Algebraic_real_1;
+
+  typedef typename Algebraic_curve_kernel_2::Curve_analysis_2
+    Curve_analysis_2;
+  
+  // x-coordinate
+  Algebraic_real_1 x;
+    
+  // supporting curve
+  Curve_analysis_2 curve;
+    
+  // arc number on curve
+  int arcno;
+  
+  // read "Algebraic_real_xca_2("
+  swallow(is, 'A');
+  swallow(is, 'l');
+  swallow(is, 'g');
+  swallow(is, 'e');
+  swallow(is, 'b');
+  swallow(is, 'r');
+  swallow(is, 'a');
+  swallow(is, 'i');
+  swallow(is, 'c');
+  swallow(is, '_');
+  swallow(is, 'r');
+  swallow(is, 'e');
+  swallow(is, 'a');
+  swallow(is, 'l');
+  swallow(is, '_');
+  swallow(is, 'x');
+  swallow(is, 'c');
+  swallow(is, 'a');
+  swallow(is, '_');
+  swallow(is, '2');
+  swallow(is, '(');
+  
+  
+  // read values
+  is >> x;
+  swallow(is, ',');
+  
+  is >> curve;
+  swallow(is, ',');
+  
+  is >> arcno;
+  
+  // read the ")
+  swallow(is, ')'); 
+  
+  pt = Xy_coordinate_2(x, curve, arcno);
+  
+  return is;
+}
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_ALGEBRAIC_CURVE_KERNEL_XY_COORDINATE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/bound_between_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/bound_between_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/bound_between_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/bound_between_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/construct_binary.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/construct_binary.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/construct_binary.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/construct_binary.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/enums.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/enums.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/enums.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/enums.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/exceptions.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/exceptions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/exceptions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/exceptions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/flags.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/flags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/flags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/flags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/macros.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/refine_zero_against.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/refine_zero_against.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/refine_zero_against.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/refine_zero_against.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/shear.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/shear.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/shear.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/shear.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_d_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_d_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_circles_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_circles_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_for_spheres_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_for_spheres_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Algebraic_structure_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Algebraic_structure_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Algebraic_structure_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Algebraic_structure_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_2.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_3.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_euclidean_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_euclidean_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_euclidean_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_euclidean_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_euclidean_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_euclidean_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_euclidean_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_euclidean_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Alpha_shape_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Alpha_shape_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2.h
new file mode 100644
index 0000000..66c6fe0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2.h
@@ -0,0 +1,1345 @@
+// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+#ifndef CGAL_APOLLONIUS_GRAPH_2_H
+#define CGAL_APOLLONIUS_GRAPH_2_H
+
+#define CGAL_APOLLONIUS_GRAPH_PSEUDO_CIRCLE_DESIGN 1
+
+
+#include <iostream>
+#include <vector>
+#include <map>
+
+#include <boost/tuple/tuple.hpp>
+
+#include <CGAL/Apollonius_graph_2/basic.h>
+
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/Triangulation_face_base_2.h>
+#include <CGAL/Apollonius_graph_vertex_base_2.h>
+
+#include <CGAL/in_place_edge_list.h>
+#include <CGAL/Segment_Delaunay_graph_2/edge_list.h>
+#include <CGAL/Apollonius_graph_2/Traits_wrapper_2.h>
+
+#include <CGAL/Apollonius_graph_2/Constructions_C2.h>
+
+#include <CGAL/iterator.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Nested_iterator.h>
+#include <CGAL/Concatenate_iterator.h>
+
+
+namespace CGAL {
+
+
+namespace internal {
+
+  template<typename Edge, typename LTag> struct AG2_which_list;
+
+  // use the in-place edge list
+  template<typename E>
+  struct AG2_which_list<E,Tag_true>
+  {
+    typedef E                           Edge;
+    typedef In_place_edge_list<Edge>    List;
+  };
+
+  // do not use the in-place edge list
+  template<typename E>
+  struct AG2_which_list<E,Tag_false>
+  {
+    typedef E                                 Edge;
+    // change the following to Tag_false in order to use
+    // CGAL's Unique_hash_map
+    typedef Tag_true                          Use_stl_map_tag;
+    typedef Edge_list<Edge,Use_stl_map_tag>   List;
+  };
+
+  template < class Node >
+  struct Project_site_2 {
+    typedef Node                   argument_type;
+    typedef typename Node::Site_2  Site;
+    typedef Site                   result_type;
+    Site&       operator()( Node& x) const { return x.site(); }
+    const Site& operator()( const Node& x) const { return x.site(); }
+  };
+
+} // namespace internal
+
+
+template<class Gt,class Agds,class LTag>
+class Apollonius_graph_hierarchy_2;
+
+template < class Gt,
+	   class Agds = Triangulation_data_structure_2 < 
+               Apollonius_graph_vertex_base_2<Gt,true>,
+               Triangulation_face_base_2<Gt> >,
+	   class LTag = Tag_false>
+class Apollonius_graph_2
+  : private Triangulation_2
+  <CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_traits_wrapper_2<Gt>,Agds>
+{
+  friend class Apollonius_graph_hierarchy_2<Gt,Agds,LTag>;
+private:
+  // types and access methods needed for visualization
+  //--------------------------------------------------
+
+  // types
+  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_2<Gt>
+  Construct_Apollonius_bisector_2;
+
+  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_ray_2<Gt>
+  Construct_Apollonius_bisector_ray_2;
+
+  typedef
+  CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_bisector_segment_2<Gt>
+  Construct_Apollonius_bisector_segment_2;
+
+  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_primal_ray_2<Gt>
+  Construct_Apollonius_primal_ray_2;
+
+  typedef CGAL_APOLLONIUS_GRAPH_2_NS::Construct_Apollonius_primal_segment_2<Gt>
+  Construct_Apollonius_primal_segment_2;
+
+
+  // access
+  Construct_Apollonius_bisector_2
+  construct_Apollonius_bisector_2_object() const {
+    return Construct_Apollonius_bisector_2();
+  }
+
+  Construct_Apollonius_bisector_ray_2
+  construct_Apollonius_bisector_ray_2_object() const {
+    return Construct_Apollonius_bisector_ray_2();
+  }
+
+  Construct_Apollonius_bisector_segment_2
+  construct_Apollonius_bisector_segment_2_object() const { 
+    return Construct_Apollonius_bisector_segment_2(); 
+  }
+
+  Construct_Apollonius_primal_ray_2
+  construct_Apollonius_primal_ray_2_object() const {
+    return Construct_Apollonius_primal_ray_2(); 
+  }
+
+  Construct_Apollonius_primal_segment_2
+  construct_Apollonius_primal_segment_2_object() const { 
+    return Construct_Apollonius_primal_segment_2();
+  }
+
+
+protected:
+  // some local types
+  typedef
+  CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_traits_wrapper_2<Gt>
+  Modified_traits;
+
+  typedef Triangulation_2<Modified_traits,Agds>  DG;
+
+  typedef DG                                 Delaunay_graph;
+
+public:
+  // TYPES
+  //------
+  typedef Agds                                   Data_structure;
+  typedef Agds                                   Triangulation_data_structure;
+  typedef Gt                                     Geom_traits;
+  typedef typename Gt::Point_2                   Point_2;
+  typedef typename Gt::Site_2                    Site_2;
+
+  typedef typename Agds::Edge                    Edge;
+  typedef typename Agds::Vertex_handle           Vertex_handle;
+  typedef typename Agds::Face_handle             Face_handle;
+  typedef typename Agds::Vertex                  Vertex;
+  typedef typename Agds::Face                    Face;
+
+  typedef typename Agds::Vertex_circulator       Vertex_circulator;
+  typedef typename Agds::Edge_circulator         Edge_circulator;
+  typedef typename Agds::Face_circulator         Face_circulator;
+
+  typedef typename Agds::Face_iterator           All_faces_iterator;
+  typedef typename Agds::Vertex_iterator         All_vertices_iterator;
+  typedef typename Agds::Edge_iterator           All_edges_iterator;
+
+  typedef typename DG::Finite_faces_iterator     Finite_faces_iterator;
+  typedef typename DG::Finite_vertices_iterator  Finite_vertices_iterator;
+  typedef typename DG::Finite_edges_iterator     Finite_edges_iterator;
+
+  typedef typename Agds::size_type               size_type;
+
+  // Auxiliary iterators for convenience
+  // do not use default template argument to please VC++
+  typedef internal::Project_site_2<Vertex>                   Proj_site;
+  typedef Iterator_project<Finite_vertices_iterator, 
+                           Proj_site>
+  /*                                           */ Visible_sites_iterator;
+
+  typedef
+  Apollonius_graph_vertex_base_nested_iterator_traits<
+    Finite_vertices_iterator>  Hidden_sites_nested_iterator_traits;
+  
+
+  typedef Nested_iterator<Finite_vertices_iterator,
+			  Hidden_sites_nested_iterator_traits>
+  /*                                            */ Hidden_sites_iterator;
+
+  typedef Concatenate_iterator<Visible_sites_iterator,
+			       Hidden_sites_iterator>     Sites_iterator;
+
+  typedef Site_2               value_type; // to have a back_inserter
+  typedef const value_type&    const_reference; 
+  typedef value_type&          reference;
+
+public:
+  struct   Vertex_iterator {};
+  struct   Face_iterator {};
+  struct   Edge_iterator {};
+
+protected:
+  // some more local types
+  //  typedef typename Agds::Vertex            Vertex;
+
+  // point lists
+  typedef std::vector<Site_2>              Site_list;
+  typedef typename Site_list::iterator     Site_list_iterator;
+
+  typedef std::map<Face_handle,bool>           Face_map;
+  typedef std::map<Face_handle, Face_handle>   Face_face_map;
+  typedef std::map<Vertex_handle,bool>         Vertex_map;
+  typedef std::set<Edge>                       Edge_list;
+
+  typedef std::list<Vertex_handle>         Vertex_list;
+  typedef typename Vertex_list::iterator   Vertex_list_iterator;
+  typedef Vertex_handle                    Vh_triple[3];
+
+  // the edge list
+  typedef typename internal::AG2_which_list<Edge,LTag>::List  List;
+
+  typedef enum { NO_CONFLICT = -1, INTERIOR, LEFT_VERTEX,
+		 RIGHT_VERTEX, BOTH_VERTICES, ENTIRE_EDGE }
+  Conflict_type;
+
+  static Conflict_type opposite(const Conflict_type& ct) {
+    if ( ct == RIGHT_VERTEX ) { return LEFT_VERTEX; }
+    if ( ct == LEFT_VERTEX ) { return RIGHT_VERTEX; }
+    return ct;
+  }
+
+protected:
+  // Less_than comparator for site weights;
+  // used to sort sites by decreasing weight when a sequence of sites
+  // is inserted
+  class Site_less_than_comparator
+  {
+  private:
+    const Gt& gt;
+  public:
+    Site_less_than_comparator(const Gt& gt) : gt(gt) {}
+
+    bool operator ()(const Site_2& p,
+		     const Site_2& q) {
+      Comparison_result result = gt.compare_weight_2_object()(p, q);
+      return (result == LARGER);
+    }
+  };
+
+public:
+  // CREATION
+  //---------
+  Apollonius_graph_2(const Gt& gt=Gt()) :
+    DG( Modified_traits(gt) ) {}
+
+  template< class Input_iterator >
+  Apollonius_graph_2(Input_iterator first, Input_iterator beyond,
+		     const Gt& gt=Gt())
+    : DG( Modified_traits(gt) )
+  {
+    insert(first, beyond);
+  }
+
+  Apollonius_graph_2(const Apollonius_graph_2 &ag)
+    : DG(ag)
+  {
+    CGAL_postcondition( is_valid() );
+  }
+
+  Apollonius_graph_2&
+  operator=(const Apollonius_graph_2& ag)
+  {
+    if ( this != &ag ) {
+      DG::operator=(ag);
+    }
+    return (*this);
+  }
+
+public:
+  // ACCESS METHODS
+  // --------------
+  const Geom_traits& geom_traits() const {
+    return DG::geom_traits();
+  }
+
+  const Data_structure& data_structure() const { return this->_tds; }
+  const Triangulation_data_structure& tds() const { return this->_tds; }
+
+  int dimension() const {
+    return this->_tds.dimension();
+  }
+
+  size_type number_of_faces() const {
+    return this->_tds.number_of_faces();
+  }
+
+  size_type number_of_vertices() const {
+    return DG::number_of_vertices();
+  }
+
+  size_type number_of_visible_sites() const {
+    return number_of_vertices();
+  }
+
+  size_type number_of_hidden_sites() const {
+    //    if ( !Vertex::StoreHidden ) { return 0; }
+
+    size_type n_hidden(0);
+    for (Finite_vertices_iterator vit = finite_vertices_begin();
+	 vit != finite_vertices_end(); ++vit) {
+      n_hidden += vit->number_of_hidden_sites();
+    }
+
+    return n_hidden;
+  }
+
+  Vertex_handle infinite_vertex() const {
+    return DG::infinite_vertex();
+  }
+
+  Face_handle infinite_face() const {
+    return DG::infinite_face();
+  }
+
+  Vertex_handle finite_vertex() const {
+    return DG::finite_vertex();
+  }
+
+protected:
+  using Delaunay_graph::cw;
+  using Delaunay_graph::ccw;
+
+public:
+  // TRAVERSAL OF THE APOLLONIUS GRAPH
+  //----------------------------------
+  Finite_faces_iterator finite_faces_begin() const {
+    return DG::finite_faces_begin();
+  }
+
+  Finite_faces_iterator finite_faces_end() const {
+    return DG::finite_faces_end();
+  }
+
+  Finite_vertices_iterator finite_vertices_begin() const {
+    return DG::finite_vertices_begin();
+  }
+
+  Finite_vertices_iterator finite_vertices_end() const {
+    return DG::finite_vertices_end();
+  }
+
+  Finite_edges_iterator finite_edges_begin() const {
+    return DG::finite_edges_begin();    
+  }
+  Finite_edges_iterator finite_edges_end() const {
+    return DG::finite_edges_end();    
+  }
+
+
+  Sites_iterator sites_begin() const {
+    return Sites_iterator(visible_sites_end(),
+    			  hidden_sites_begin(),
+    			  visible_sites_begin());
+  }
+
+  Sites_iterator sites_end() const {
+    return Sites_iterator(visible_sites_end(),
+    			  hidden_sites_begin(),
+    			  hidden_sites_end(),0);
+  }
+
+  Visible_sites_iterator visible_sites_begin() const {
+    return Visible_sites_iterator(finite_vertices_begin());
+  }
+
+  Visible_sites_iterator visible_sites_end() const {
+    return Visible_sites_iterator(finite_vertices_end());
+  }
+
+  Hidden_sites_iterator hidden_sites_begin() const {
+    return Hidden_sites_iterator(finite_vertices_end(),
+				 finite_vertices_begin());
+  }
+
+  Hidden_sites_iterator hidden_sites_end() const {
+    return Hidden_sites_iterator(finite_vertices_end(),
+				 finite_vertices_end());
+  }
+
+
+  All_faces_iterator all_faces_begin() const {
+    return DG::all_faces_begin();
+  }
+
+  All_faces_iterator all_faces_end() const {
+    return DG::all_faces_end();
+  }
+
+  All_vertices_iterator all_vertices_begin() const {
+    return DG::all_vertices_begin();
+  }
+
+  All_vertices_iterator all_vertices_end() const {
+    return DG::all_vertices_end();
+  }
+
+  All_edges_iterator all_edges_begin() const {
+    return DG::all_edges_begin();
+  }
+
+  All_edges_iterator all_edges_end() const {
+    return DG::all_edges_end();
+  }
+
+public:
+  // CIRCULATORS
+  //------------
+  Face_circulator
+  incident_faces(Vertex_handle v,
+		 Face_handle f = Face_handle()) const {
+    return DG::incident_faces(v, f);
+  }
+
+  Vertex_circulator
+  incident_vertices(Vertex_handle v,
+		    Face_handle f = Face_handle()) const { 
+    return DG::incident_vertices(v, f);
+  }
+
+  Edge_circulator
+  incident_edges(Vertex_handle v,
+		 Face_handle f = Face_handle()) const {
+    return DG::incident_edges(v, f);
+  }
+ 
+public:
+  // PREDICATES
+  //-----------
+  bool is_infinite(const Vertex_handle& v) const {
+    return DG::is_infinite(v);
+  }
+
+  bool is_infinite(const Face_handle& f) const {
+    return DG::is_infinite(f);
+  }
+
+  bool is_infinite(const Face_handle& f, int i) const {
+    return DG::is_infinite(f, i);
+  }
+
+  bool is_infinite(const Edge& e) const {
+    return is_infinite(e.first, e.second);
+  }
+
+  bool is_infinite(const Edge_circulator& ec) const {
+    return DG::is_infinite(ec);
+  }
+
+public:
+  // INSERTION
+  //----------
+  template< class Input_iterator >
+  size_type insert(Input_iterator first, Input_iterator beyond) {
+    // copy to a local container
+    Site_list wp_list;
+    for (Input_iterator it = first; it != beyond; ++it) {
+      wp_list.push_back(*it);
+    }
+
+    // sort by decreasing weight
+    Site_less_than_comparator less_than(geom_traits());
+    std::sort(wp_list.begin(), wp_list.end(), less_than);
+
+    // now insert
+    Site_list_iterator lit;
+    for (lit = wp_list.begin(); lit != wp_list.end(); ++lit) {
+      insert(*lit);
+    }
+
+    // store how many sites where in the range
+    size_type num = wp_list.size();
+
+    // clear the local container
+    wp_list.clear();
+
+    // return the number of sites in range
+    return num;
+  }
+
+  Vertex_handle  insert(const Site_2& p) {
+    return insert(p, Vertex_handle());
+  }
+
+  Vertex_handle  insert(const Site_2& p, Vertex_handle vnear);
+
+public:
+  // REMOVAL
+  //--------
+  void remove(Vertex_handle v);
+
+public:
+  // NEAREST NEIGHBOR LOCATION
+  //--------------------------
+  Vertex_handle  nearest_neighbor(const Point_2& p) const;
+  Vertex_handle  nearest_neighbor(const Point_2& p,
+				  Vertex_handle vnear) const;
+
+public:
+  // ACCESS TO THE DUAL
+  //-------------------
+  typename Gt::Object_2 dual(const Face_handle& f) const;
+
+  Site_2 dual(const Finite_faces_iterator& it) const
+  {
+    typename Gt::Object_2 o = dual(Face_handle(it));
+    Site_2 s;
+    if ( assign(s, o) ) {
+      return s;
+    } else {
+      CGAL_assertion_code( bool the_assign_statement_must_always_work(false); )
+      CGAL_assertion( the_assign_statement_must_always_work );
+    }
+    return s;
+  }
+
+
+private:
+  typename Gt::Object_2 dual(const Edge e) const;
+
+  typename Gt::Object_2 dual(const Edge_circulator& ec) const {
+    return dual(*ec);
+  }
+
+  typename Gt::Object_2 dual(const Finite_edges_iterator& ei) const {
+    return dual(*ei);
+  }
+
+public:
+  // I/O
+  //----
+  void file_input(std::istream&);
+  void file_output(std::ostream&) const;
+
+  template< class Stream >
+  Stream& draw_primal(Stream &str) const
+  {
+    if ( number_of_vertices() < 2 ) {
+      // do nothing
+    } else if ( number_of_vertices() == 2 ) {
+      Vertex_handle v1(finite_vertices_begin());
+      Vertex_handle v2(++finite_vertices_begin());
+      Site_2 p1 = v1->site();
+      Site_2 p2 = v2->site();
+      
+
+      typename Geom_traits::Segment_2 seg =
+	construct_Apollonius_primal_segment_2_object()(p1,p2);
+      typename Geom_traits::Ray_2 ray1 =
+	construct_Apollonius_primal_ray_2_object()(p1,p2,p2);
+      typename Geom_traits::Ray_2 ray2 =
+	construct_Apollonius_primal_ray_2_object()(p2,p1,p1);
+
+      str << seg;
+      str << ray1;
+      str << ray2;
+    } else {
+      All_edges_iterator eit = all_edges_begin();
+      for (; eit != all_edges_end(); ++eit) {
+	draw_primal_edge< Stream >(eit, str);
+      }
+    }
+    return str;
+  }
+
+  template < class Stream > 
+  Stream& draw_dual(Stream &str) const
+  {
+    Finite_edges_iterator eit = finite_edges_begin();
+    for (; eit != finite_edges_end(); ++eit) {
+      typename Gt::Object_2 o = dual(eit);
+      typename Geom_traits::Line_2     l;
+      typename Geom_traits::Segment_2  s;
+      typename Geom_traits::Ray_2      r;
+      CGAL::Hyperbola_2<Gt>            h;
+      CGAL::Hyperbola_segment_2<Gt>    hs;
+      CGAL::Hyperbola_ray_2<Gt>        hr;
+      if (assign(hs, o)) hs.draw(str);
+      else if (assign(s, o))  str << s; 
+      else if (assign(hr, o))  hr.draw(str);
+      else if (assign(r, o))   str << r;
+      else if (assign(h, o))  h.draw(str);
+      else if (assign(l, o)) str << l;
+    }
+    return str;
+  }
+
+protected:
+  template< class Stream >
+  Stream& draw_primal_vertex(const Finite_vertices_iterator& it,
+			     Stream &str) const
+  {
+    return str << it->site().point();
+  }
+
+
+  template< class Stream >
+  Stream& draw_dual_vertex(const Finite_faces_iterator& it,
+			   Stream &str) const
+  {
+    return str << dual(it);
+  }
+
+public:
+  template< class Stream >
+  Stream& draw_primal_edge(const Finite_edges_iterator& eit,
+			   Stream &str) const
+  {
+    return draw_primal_edge(*eit, str);
+  }
+
+  template< class Stream >
+  Stream& draw_primal_edge(const All_edges_iterator& eit,
+			   Stream &str) const
+  {
+    return draw_primal_edge(*eit, str);
+  }
+
+
+  template < class Stream > 
+  Stream& draw_dual_edge(const Finite_edges_iterator& eit,
+			 Stream &str) const
+  {
+    return draw_dual_edge(*eit, str);
+  }
+
+  template< class Stream >
+  Stream& draw_primal_edge(const Edge& e, Stream &str) const
+  {
+    typedef typename Geom_traits::Segment_2     Segment_2;
+    typedef typename Geom_traits::Ray_2         Ray_2;
+    typedef std::pair<Segment_2,Segment_2>      Segment_pair_2;
+
+    typename Geom_traits::Object_2 o = primal(e);
+    Segment_2       s;
+    Ray_2           r;
+    Segment_pair_2  s_pair;
+    CGAL::Hyperbola_segment_2<Gt>    hs;
+    CGAL::Parabola_segment_2<Gt>     ps;
+    if (assign(hs, o))  hs.draw(str);
+    if (assign(s, o))   str << s; 
+    if (assign(ps, o))  ps.draw(str);
+    if (assign(r, o))   str << r;
+    if (assign(s_pair, o)) str << s_pair.first << s_pair.second;
+    return str;
+  }
+
+  template < class Stream > 
+  Stream& draw_dual_edge(const Edge& e, Stream &str) const
+  {
+    if ( is_infinite(e) ) { return str; }
+    typename Gt::Object_2 o = dual(e);
+    typename Geom_traits::Line_2     l;
+    typename Geom_traits::Segment_2  s;
+    typename Geom_traits::Ray_2      r;
+    CGAL::Hyperbola_2<Gt>            h;
+    CGAL::Hyperbola_segment_2<Gt>    hs;
+    CGAL::Hyperbola_ray_2<Gt>        hr;
+    if (assign(hs, o))  hs.draw(str);
+    if (assign(s, o))   str << s; 
+    if (assign(hr, o))  hr.draw(str);
+    if (assign(r, o))   str << r;
+    if (assign(h, o))   h.draw(str);
+    if (assign(l, o))   str << l;
+
+    return str;
+  }
+
+protected:
+  template< class Stream >
+  Stream& draw_primal_face(All_faces_iterator fit, Stream &str) const
+  {
+    for (int i = 0; i < 3; i++) {
+      draw_primal_edge< Stream >(Edge(Face_handle(fit), i), str);
+    }
+    return str;
+  }
+
+
+  template< class Stream >
+  Stream& draw_dual_face(const All_vertices_iterator& vit,
+			 Stream &str) const
+  {
+    Edge_circulator ec_start = incident_edges(Vertex_handle(vit));
+    Edge_circulator ec = ec_start;
+    do {
+      draw_dual_edge< Stream >(*ec, str);
+      ++ec;
+    } while ( ec_start != ec );
+    return str;
+  }
+
+protected:
+  template < class Stream > 
+  Stream& draw_dual_sites(Stream &str) const
+  {
+    All_faces_iterator fit = all_faces_begin();
+    for (; fit != all_faces_end(); ++fit) {
+      Face_handle f(fit);
+      if ( is_infinite(f) ) {
+	if (  is_infinite(f->vertex(0))  ) {
+	  str << circumcircle( f->vertex(1)->site(),
+			       f->vertex(2)->site() );
+	} else if (  is_infinite(f->vertex(1))  ){
+	  str << circumcircle( f->vertex(2)->site(),
+			       f->vertex(0)->site() );
+	} else {
+	  str << circumcircle( f->vertex(0)->site(),
+			       f->vertex(1)->site() );	  
+	}
+      } else {
+	Site_2 wp = circumcircle(f);
+	typename Gt::Rep::Circle_2 c(wp.point(),
+				     CGAL::square(wp.weight()));
+	str << c;
+      }
+    }
+    return str;
+  }
+
+public:
+  // VALIDITY CHECK
+  //---------------
+  bool is_valid(bool verbose = false, int level = 1) const;
+
+public:
+  // MISCELLANEOUS
+  //--------------
+  void clear() {
+    DG::clear();
+  }
+
+  void swap(Apollonius_graph_2& ag) {
+    DG::swap(ag);
+  }
+
+public:
+  // MK: THE FOLLOWING ARE NOT IN THE SPEC
+  //======================================
+  // Primal
+  typename Gt::Object_2 primal(const Edge e) const;
+  typename Gt::Object_2 primal(const Edge_circulator& ec) const {
+    return primal(*ec);
+  }
+  typename Gt::Object_2 primal(const Finite_edges_iterator& ei) const {
+    return primal(*ei);
+  }
+
+protected:
+  // wrappers for the geometric predicates
+
+  // checks is q is contained inside p
+  bool is_hidden(const Site_2 &p, const Site_2 &q) const;
+
+  // returns:
+  //   ON_POSITIVE_SIDE if q is closer to p1
+  //   ON_NEGATIVE_SIDE if q is closer to p2
+  //   ON_ORIENTED_BOUNDARY if q is on the bisector of p1 and p2
+  Oriented_side side_of_bisector(const Site_2 &p1,
+				 const Site_2 &p2,
+				 const Point_2 &q) const;
+
+  Sign incircle(const Site_2 &p1, const Site_2 &p2,
+		const Site_2 &p3, const Site_2 &q) const;
+
+  Sign incircle(const Site_2 &p1, const Site_2 &p2,
+		const Site_2 &q) const;
+
+
+  Sign incircle(const Face_handle& f, const Site_2& q) const;
+
+
+  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
+		const Vertex_handle& v) const;
+
+  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
+		const Vertex_handle& v2, const Vertex_handle& v) const;
+
+
+  
+  bool finite_edge_interior(const Site_2& p1,
+			    const Site_2& p2,
+			    const Site_2& p3,
+			    const Site_2& p4,
+			    const Site_2& q,
+			    bool endpoints_in_conflict) const;
+
+  bool finite_edge_interior(const Face_handle& f, int i,
+			    const Site_2& q,
+			    bool endpoints_in_conflict) const;
+
+  bool finite_edge_interior(const Vertex_handle& v1,
+			    const Vertex_handle& v2,
+			    const Vertex_handle& v3,
+			    const Vertex_handle& v4,
+			    const Vertex_handle& v,
+			    bool endpoints_in_conflict) const;
+
+  bool finite_edge_interior_degenerated(const Site_2& p1,
+					const Site_2& p2,
+					const Site_2& p3,
+					const Site_2& q,
+					bool endpoints_in_conflict) const;
+
+
+  bool finite_edge_interior_degenerated(const Site_2& p1,
+					const Site_2& p2,
+					const Site_2& q,
+					bool endpoints_in_conflict) const;
+
+  bool finite_edge_interior_degenerated(const Face_handle& f, int i,
+					const Site_2& p,
+					bool endpoints_in_conflict) const;
+
+  bool finite_edge_interior_degenerated(const Vertex_handle& v1,
+					const Vertex_handle& v2,
+					const Vertex_handle& v3,
+					const Vertex_handle& v4,
+					const Vertex_handle& v,
+					bool endpoints_in_conflict) const;
+  bool infinite_edge_interior(const Site_2& p2,
+			      const Site_2& p3,
+			      const Site_2& p4,
+			      const Site_2& q,
+			      bool endpoints_in_conflict) const;
+
+
+  bool infinite_edge_interior(const Face_handle& f, int i,
+			      const Site_2& p,
+			      bool endpoints_in_conflict) const;
+
+  bool infinite_edge_interior(const Vertex_handle& v1,
+			      const Vertex_handle& v2,
+			      const Vertex_handle& v3,
+			      const Vertex_handle& v4,
+			      const Vertex_handle& v,
+			      bool endpoints_in_conflict) const;
+
+  Conflict_type
+  infinite_edge_conflict_type(const Site_2& p2,
+			      const Site_2& p3,
+			      const Site_2& p4,
+			      const Site_2& q) const;
+
+  Conflict_type
+  finite_edge_conflict_type_degenerated(const Site_2& p1,
+					const Site_2& p2,
+					const Site_2& q) const;
+
+  bool edge_interior(const Face_handle& f, int i,
+		     const Site_2& p, bool b) const;
+
+
+  bool edge_interior(const Edge& e,
+			    const Site_2& p, bool b) const {
+    return edge_interior(e.first, e.second, p, b);
+  }
+
+  bool edge_interior(const Vertex_handle& v1,
+		     const Vertex_handle& v2,
+		     const Vertex_handle& v3,
+		     const Vertex_handle& v4,
+		     const Vertex_handle& v,
+		     bool endpoints_in_conflict) const;
+
+  bool is_degenerate_edge(const Site_2& p1,
+				 const Site_2& p2,
+				 const Site_2& p3,
+				 const Site_2& p4) const {
+    return geom_traits().is_degenerate_edge_2_object()
+      (p1, p2, p3, p4);
+  }
+
+  bool is_degenerate_edge(const Vertex_handle& v1,
+				 const Vertex_handle& v2,
+				 const Vertex_handle& v3,
+				 const Vertex_handle& v4) const {
+    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
+		       !is_infinite(v3) && !is_infinite(v4) );
+
+    return is_degenerate_edge(v1->site(), v2->site(),
+			      v3->site(), v4->site());
+  }
+
+  bool is_degenerate_edge(const Face_handle& f, int i) const {
+    Vertex_handle v1 = f->vertex( ccw(i) );
+    Vertex_handle v2 = f->vertex(  cw(i) );
+    Vertex_handle v3 = f->vertex(     i  );
+    Vertex_handle v4 = tds().mirror_vertex(f, i);
+
+    return is_degenerate_edge(v1, v2, v3, v4);
+  }
+
+  bool is_degenerate_edge(const Edge& e) const {
+    return is_degenerate_edge(e.first, e.second);
+  }
+
+
+protected:
+  // wrappers for constructions
+  Point_2 circumcenter(const Face_handle& f) const;
+  Point_2 circumcenter(const Site_2& p0, 
+		       const Site_2& p1, 
+		       const Site_2& p2) const;
+
+  Site_2 circumcircle(const Face_handle& f) const;
+  Site_2 circumcircle(const Site_2& p0, 
+		      const Site_2& p1, 
+		      const Site_2& p2) const;
+
+  typename Gt::Line_2 circumcircle(const Site_2& p0,
+				   const Site_2& p1) const;
+
+protected:
+  // wrappers for combinatorial operations on the data structure
+
+  // getting the degree of a vertex
+  typename Data_structure::size_type degree(const Vertex_handle& v) {
+    return this->_tds.degree(v);
+  }
+
+  // getting the symmetric edge
+  Edge sym_edge(const Edge e) const {
+    return sym_edge(e.first, e.second);
+  }
+
+  Edge sym_edge(const Face_handle& f, int i) const {
+    Face_handle f_sym = f->neighbor(i);
+    return Edge(  f_sym, f_sym->index( tds().mirror_vertex(f, i) )  );
+  }
+
+  Edge flip(Face_handle& f, int i);
+  Edge flip(Edge e);
+
+  Vertex_handle insert_in_face(Face_handle& f, const Site_2& p);
+
+  bool          is_degree_2(const Vertex_handle& v) const;
+
+  Vertex_handle insert_degree_2(Edge e);
+  Vertex_handle insert_degree_2(Edge e, const Site_2& p);
+  void          remove_degree_2(Vertex_handle v);
+  void          remove_degree_3(Vertex_handle v);
+  void          remove_degree_3(Vertex_handle v, Face_handle f);
+
+  // this was defined because the hierarchy needs it
+  Vertex_handle create_vertex() {
+    return this->_tds.create_vertex();
+  }
+
+protected:
+  // insertion of the first three sites
+  Vertex_handle  insert_first(const Site_2& p);
+  Vertex_handle  insert_second(const Site_2& p);
+  Vertex_handle  insert_third(const Site_2& p);
+
+  // methods for insertion
+  void initialize_conflict_region(const Face_handle& f, List& l) const;
+  bool check_edge_for_hidden_sites(const Face_handle& f, int i,
+				   const Site_2& p, Vertex_map& vm) const;
+  void expand_conflict_region(const Face_handle& f,
+			      const Site_2& p,
+			      List& l, Face_map& fm, Vertex_map& vm,
+			      std::vector<Vh_triple*>* fe);
+
+  Vertex_handle add_bogus_vertex(Edge e, List& l);
+  Vertex_list   add_bogus_vertices(List& l);
+  void          remove_bogus_vertices(Vertex_list& vl);
+
+  void move_hidden_sites(Vertex_handle& vold, Vertex_handle& vnew);
+
+  // MK: this is not currently used
+  std::vector<Face*> get_faces_for_recycling(Face_map& fm,
+					     unsigned int n_wanted);
+  void remove_hidden_vertices(Vertex_map& vm);
+  Vertex_handle retriangulate_conflict_region(const Site_2& p,
+					      List& l,
+					      Face_map& fm,
+					      Vertex_map& vm);
+
+protected:
+  // methods for removal
+  void  remove_first(Vertex_handle v);
+  void  remove_second(Vertex_handle v);
+  void  remove_third(Vertex_handle v);
+  void  remove_degree_d_vertex(Vertex_handle v);
+  void  minimize_degree(Vertex_handle v);
+
+  void find_conflict_region_remove(const Vertex_handle& v,
+				   const Vertex_handle& vnearest,
+				   List& l, Face_map& fm,
+				   Vertex_map& vm,
+				   std::vector<Vh_triple*>* fe);
+
+protected:
+  // methods for I/O
+
+  template<class T>
+  bool assign(T& t2, const typename Gt::Object_2& o2) const
+  {
+    return geom_traits().assign_2_object()(t2, o2);
+  }
+
+
+protected:
+  template<class OutputItFaces>
+  OutputItFaces find_conflicts(const Face_handle& f,
+			       const Site_2& p,
+			       List& l,
+			       Face_map& fm,
+			       Vertex_map& vm,
+			       OutputItFaces fit) const
+  {
+    // setting fm[f] to true means that the face has been reached and
+    // that the face is available for recycling. If we do not want the
+    // face to be available for recycling we must set this flag to
+    // false.
+    if ( fm.find(f) != fm.end() ) { return fit; }
+    fm[f] = true;
+    CGAL_assertion( incircle(f, p) == NEGATIVE );
+    *fit++ = f;
+
+    //  CGAL_assertion( fm.find(f) != fm.end() );
+    for (int i = 0; i < 3; i++) {
+      bool hidden_found = check_edge_for_hidden_sites(f, i, p, vm);
+
+      Face_handle n = f->neighbor(i);
+
+      if ( !hidden_found ) {
+	Sign s = incircle(n, p);
+	if ( s != NEGATIVE ) { continue; }
+
+	bool interior_in_conflict = edge_interior(f, i, p, true);
+
+	if ( !interior_in_conflict ) { continue; }
+      }
+
+      if ( fm.find(n) != fm.end() ) {
+	Edge e = sym_edge(f, i);
+	if ( l.is_in_list(e) ||
+	     l.is_in_list(sym_edge(e)) ) {
+	  l.remove(e);
+	  l.remove(sym_edge(e));
+	}
+	continue;
+      }
+
+      Edge e = sym_edge(f, i);
+
+      CGAL_assertion( l.is_in_list(e) );
+      int j = tds().mirror_index(f, i);
+      Edge e_before = sym_edge(n, ccw(j));
+      Edge e_after = sym_edge(n, cw(j));
+      if ( !l.is_in_list(e_before) ) {
+	l.insert_before(e, e_before);
+      }
+      if ( !l.is_in_list(e_after) ) {
+	l.insert_after(e, e_after);
+      }
+      l.remove(e);
+
+      fit = find_conflicts(n, p, l, fm, vm, fit);
+    } // for-loop
+    return fit;
+  } // find_conflicts
+
+  bool equal(const Edge& e1, const Edge& e2) const {
+    return e1.first == e2.first && e1.second == e2.second;
+  }
+
+
+protected:
+  template<class OutputItFaces, class OutputItBoundaryEdges,
+	   class OutputItHiddenVertices>
+  boost::tuples::tuple<OutputItFaces, OutputItBoundaryEdges,
+		       OutputItHiddenVertices>
+  get_all(const Site_2& p,
+	  OutputItFaces fit,
+	  OutputItBoundaryEdges eit,
+	  OutputItHiddenVertices vit,
+	  Vertex_handle start,
+	  bool find_nearest) const
+  {
+    CGAL_precondition( dimension() == 2 );
+
+    // first find the nearest neighbor
+    Vertex_handle vnearest = start;
+    if ( find_nearest ) {
+      vnearest = nearest_neighbor(p.point(), start);
+      CGAL_assertion( vnearest != Vertex_handle() );
+    }
+
+    // check if it is hidden
+    if ( is_hidden(vnearest->site(), p) ) {
+      return boost::tuples::make_tuple(fit, eit, vit);
+    }
+
+    // find the first conflict
+
+    // first look for conflict with vertex
+    Face_circulator fc_start = incident_faces(vnearest);
+    Face_circulator fc = fc_start;
+    Face_handle start_f;
+    Sign s;
+    do {
+      Face_handle f(fc);
+      s = incircle(f, p);
+
+      if ( s == NEGATIVE ) {
+	start_f = f;
+	break;
+      }
+      ++fc;
+    } while ( fc != fc_start );
+
+    // we are not in conflict with an Apollonius vertex, so we have to
+    // be in conflict with the interior of an Apollonius edge
+    if ( s != NEGATIVE ) {
+      Edge_circulator ec_start = incident_edges(vnearest);
+      Edge_circulator ec = ec_start;
+
+      bool interior_in_conflict(false);
+      Edge e;
+      do {
+	e = *ec;
+	interior_in_conflict = edge_interior(e, p, false);
+	
+	if ( interior_in_conflict ) { break; }
+	++ec;
+      } while ( ec != ec_start );
+
+      CGAL_assertion( interior_in_conflict );
+
+      *eit++ = e;
+      *eit++ = sym_edge(e);
+      return boost::tuples::make_tuple(fit, eit, vit);
+    }
+
+    // we are in conflict with an Apollonius vertex; start from that and 
+    // find the entire conflict region and then repair the diagram
+    List l;
+    Face_map fm;
+    Vertex_map vm;
+
+    //    *fit++ = start_f;
+    initialize_conflict_region(start_f, l);
+    fit = find_conflicts(start_f, p, l, fm, vm, fit);
+
+    // output the edges on the boundary of the conflict region
+    if ( l.size() > 0 ) {
+      const Edge& e_front = l.front();
+      // here I should be able to write: const Edge& e = l.front();
+      // instead of what I have; but the compiler complains for the
+      // assignment: e = l.next(e);
+      Edge e = l.front();
+      do {
+	*eit++ = e;
+	e = l.next(e);
+      } while ( !equal(e, e_front) );
+    }
+
+    // output the hidden vertices
+    for (typename Vertex_map::iterator it = vm.begin(); it != vm.end(); ++it) {
+      *vit++ = it->first;
+    }
+
+    // clear containers
+    fm.clear();
+    vm.clear();
+    l.clear();
+
+    return boost::tuples::make_tuple(fit, eit, vit);
+  }
+
+public:
+  template<class OutputItFaces, class OutputItBoundaryEdges,
+	   class OutputItHiddenVertices>
+  boost::tuples::tuple<OutputItFaces, OutputItBoundaryEdges,
+		       OutputItHiddenVertices>
+  get_conflicts_and_boundary_and_hidden_vertices(const Site_2& p,
+						 OutputItFaces fit,
+						 OutputItBoundaryEdges eit,
+						 OutputItHiddenVertices vit,
+						 Vertex_handle start =
+						 Vertex_handle()) const
+  {
+    return get_all(p, fit, eit, vit, start, true);
+  }
+
+  template<class OutputItFaces, class OutputItBoundaryEdges>
+  std::pair<OutputItFaces, OutputItBoundaryEdges>
+  get_conflicts_and_boundary(const Site_2& p,
+			     OutputItFaces fit,
+			     OutputItBoundaryEdges eit,
+			     Vertex_handle start =
+			     Vertex_handle()) const {
+    boost::tuples::tuple<OutputItFaces,OutputItBoundaryEdges,Emptyset_iterator>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     fit,
+						     eit,
+						     Emptyset_iterator(),
+						     start);
+    return std::make_pair( boost::tuples::get<0>(tup),
+			   boost::tuples::get<1>(tup) );
+  }
+
+
+  template<class OutputItBoundaryEdges, class OutputItHiddenVertices>
+  std::pair<OutputItBoundaryEdges, OutputItHiddenVertices>
+  get_boundary_of_conflicts_and_hidden_vertices(const Site_2& p,
+						OutputItBoundaryEdges eit,
+						OutputItHiddenVertices vit,
+						Vertex_handle start =
+						Vertex_handle()) const {
+    boost::tuples::tuple<Emptyset_iterator,OutputItBoundaryEdges,
+      OutputItHiddenVertices>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     Emptyset_iterator(),
+						     eit,
+						     vit,
+						     start);
+    return std::make_pair( boost::tuples::get<1>(tup),
+			   boost::tuples::get<2>(tup) );
+  }
+
+
+  template<class OutputItFaces, class OutputItHiddenVertices>
+  std::pair<OutputItFaces, OutputItHiddenVertices>
+  get_conflicts_and_hidden_vertices(const Site_2& p,
+				    OutputItFaces fit,
+				    OutputItHiddenVertices vit,
+				    Vertex_handle start =
+				    Vertex_handle()) const {
+    boost::tuples::tuple<OutputItFaces,Emptyset_iterator,
+      OutputItHiddenVertices>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     fit,
+						     Emptyset_iterator(),
+						     vit,
+						     start);
+    return std::make_pair( boost::tuples::get<0>(tup),
+			   boost::tuples::get<2>(tup) );
+  }
+
+  template<class OutputItFaces>
+  OutputItFaces get_conflicts(const Site_2& p,
+			      OutputItFaces fit,
+			      Vertex_handle start = Vertex_handle()) const {
+    boost::tuples::tuple<OutputItFaces,Emptyset_iterator,Emptyset_iterator>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     fit,
+						     Emptyset_iterator(),
+						     Emptyset_iterator(),
+						     start);
+    return boost::tuples::get<0>(tup);
+  }
+
+  template<class OutputItBoundaryEdges>
+  OutputItBoundaryEdges
+  get_boundary_of_conflicts(const Site_2& p,
+			    OutputItBoundaryEdges eit,
+			    Vertex_handle start = Vertex_handle()) const {
+    boost::tuples::tuple<Emptyset_iterator,OutputItBoundaryEdges,
+      Emptyset_iterator>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     Emptyset_iterator(),
+						     eit,
+						     Emptyset_iterator(),
+						     start);
+    return boost::tuples::get<1>(tup);
+  }
+
+  template<class OutputItHiddenVertices>
+  OutputItHiddenVertices
+  get_hidden_vertices(const Site_2& p,
+		      OutputItHiddenVertices vit,
+		      Vertex_handle start = Vertex_handle()) const {
+    boost::tuples::tuple<Emptyset_iterator,Emptyset_iterator,
+      OutputItHiddenVertices>
+      tup =
+      get_conflicts_and_boundary_and_hidden_vertices(p,
+						     Emptyset_iterator(),
+						     Emptyset_iterator(),
+						     vit,
+						     start);
+    return boost::tuples::get<2>(tup);
+  }
+
+
+}; // Apollonius_graph_2
+
+template<class Gt, class Agds, class LTag>
+std::ostream& operator<<(std::ostream& os,
+			 const Apollonius_graph_2<Gt,Agds,LTag>& ag)
+{
+  ag.file_output(os);
+  return os;
+}
+
+template<class Gt, class Agds, class LTag>
+std::istream& operator>>(std::istream& is,
+			 Apollonius_graph_2<Gt,Agds,LTag>& ag)
+{
+  ag.file_input(is);
+  return is;
+}
+
+} //namespace CGAL
+
+#include <CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h>
+
+
+#endif // CGAL_APOLLONIUS_GRAPH_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_weight_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_weight_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_weight_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_weight_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_x_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_x_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_x_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_x_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_y_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_y_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Compare_y_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Compare_y_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Incircle8_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Incircle8_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Incircle8_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Incircle8_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Incircle_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Incircle_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Incircle_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Incircle_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Orientation8_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Orientation8_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Orientation8_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Orientation8_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Orientation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Orientation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Orientation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Orientation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Predicates_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Predicates_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Predicates_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Predicates_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/check_filter.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/check_filter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/check_filter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/check_filter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/comparator_profiler.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/comparator_profiler.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/comparator_profiler.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/comparator_profiler.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/compare_quadratic.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/compare_quadratic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/compare_quadratic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/compare_quadratic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/predicate_profiler.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/predicate_profiler.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/predicate_profiler.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/predicate_profiler.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Apollonius_graph_uncertain_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Apollonius_graph_uncertain_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Apollonius_graph_uncertain_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Apollonius_graph_uncertain_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_adaptation_policies_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_adaptation_policies_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_adaptation_policies_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_adaptation_policies_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_adaptation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_adaptation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_adaptation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_adaptation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_data_structure_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_data_structure_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_data_structure_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_data_structure_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_hierarchy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_hierarchy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_hierarchy_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h
new file mode 100644
index 0000000..279e4b8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h
@@ -0,0 +1,71 @@
+// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+#ifndef CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
+#define CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
+
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+template < class Vbb >
+class Apollonius_graph_hierarchy_vertex_base_2
+ : public Vbb
+{
+  typedef Vbb                                                Base;
+  typedef typename Base::Apollonius_graph_data_structure_2   Agds;
+
+public:
+  typedef typename Base::Site_2             Site_2;
+  typedef Agds                              Apollonius_graph_data_structure_2;
+  typedef typename Agds::Vertex_handle      Vertex_handle;
+  typedef typename Agds::Face_handle        Face_handle;
+
+  template < typename AGDS2 >
+  struct Rebind_TDS {
+    typedef typename Vbb::template Rebind_TDS<AGDS2>::Other   Vb2;
+    typedef Apollonius_graph_hierarchy_vertex_base_2<Vb2>     Other;
+  };
+
+  Apollonius_graph_hierarchy_vertex_base_2()
+    : Base(), _up(), _down()
+    {}
+  Apollonius_graph_hierarchy_vertex_base_2(const Site_2& p,
+					   Face_handle f)
+    : Base(p,f), _up(), _down()
+    {}
+  Apollonius_graph_hierarchy_vertex_base_2(const Site_2& p)
+    : Base(p), _up(), _down()
+    {}
+
+  Vertex_handle up() {return _up;}
+  Vertex_handle down() {return _down;}
+  void set_up(Vertex_handle u) {_up=u;}
+  void set_down(Vertex_handle d) {_down=d;}
+
+
+ private:
+  Vertex_handle  _up;    // same vertex one level above
+  Vertex_handle  _down;  // same vertex one level below
+};
+
+} //namespace CGAL
+
+#endif // CGAL_APOLLONIUS_GRAPH_HIERARCHY_VERTEX_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Apollonius_graph_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Apollonius_graph_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Apollonius_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_site_2.h
new file mode 100644
index 0000000..f6f555c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Apollonius_site_2.h
@@ -0,0 +1,90 @@
+// Copyright (c) 2003,2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+#ifndef CGAL_APOLLONIUS_SITE_2_H
+#define CGAL_APOLLONIUS_SITE_2_H
+
+#include <iostream>
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+
+template < class K >
+class Apollonius_site_2
+{
+public:
+  typedef K                       Kernel;
+  typedef typename K::Point_2     Point_2;
+  typedef Apollonius_site_2<K>    Self;
+  typedef typename K::FT          Weight;
+  typedef typename K::RT          RT;
+  typedef Weight                  FT;
+
+
+public:
+  Apollonius_site_2(const Point_2& p = Point_2(),
+		    const Weight& w = Weight(0))
+    : _p(p), _w(w) {}
+
+  Apollonius_site_2(const Apollonius_site_2& other)
+    : _p(other._p), _w(other._w) {}
+
+  
+  const Point_2& point() const { return _p; }
+  const Weight&  weight() const { return _w; }
+  RT      x() const { return _p.x(); }
+  RT      y() const { return _p.y(); }
+
+  bool operator==(const Apollonius_site_2& other) const
+  {
+    return ( _p == other._p && _w == other._w );
+  }
+
+private:
+  Point_2 _p;
+  Weight  _w;
+
+};
+
+template <class K>
+std::ostream&
+operator<<(std::ostream &os, const Apollonius_site_2<K>& wp)
+{
+  return os << wp.point() << " " << wp.weight();
+}
+
+template <class K>
+std::istream&
+operator>>(std::istream& is, Apollonius_site_2<K>& wp)
+{
+  typename Apollonius_site_2<K>::Weight   weight (0.);
+  typename Apollonius_site_2<K>::Point_2  p (0., 0.);
+  is >> p >> weight;
+  if(is) {
+    wp = Apollonius_site_2<K>(p, weight);
+  }
+  return is;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_APOLLONIUS_SITE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h
new file mode 100644
index 0000000..6b90635
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h
@@ -0,0 +1,282 @@
+// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Kaspar Fischer <fischerk at inf.ethz.ch>
+
+
+#include <CGAL/Default_diagonalize_traits.h>
+
+#include <CGAL/Approximate_min_ellipsoid_d.h>
+
+namespace CGAL {
+
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  find_lower_dimensional_approximation()
+  {
+    // (No implementation yet, in accordance with the current
+    // specification in doc_tex ...)
+  }
+
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  compute_center()
+  {
+    // According to (****), the computed ellipsoid E* has the representation
+    //
+    //   E* = { y in R^d | y^T M'/alpha y + 2/alpha y^Tm + (nu/alpha-1) <= 0 }
+    // 
+    // for
+    //
+    //       [ M'  m  ]
+    //   M = [ m^T nu ]
+    //
+    // where M is the matrix defined via E->matrix(i,j).  We need
+    // something in the form
+    //
+    //    E* = { y | (y - c)^T M'/alpha (y - c) + mu <= 0 }.
+    //
+    // Expanding the later and comparing with the original form we
+    // obtain
+    //
+    //    c = - M'^{-1} m
+    //
+    // as the formula for the ellipsoid's center.  Comparing
+    // coefficients we also get
+    //
+    //    mu = nu/alpha-1 - c^T M'/alpha c 
+    //       = nu/alpha-1 + c^T m / alpha
+    //       = (nu + c^Tm)/alpha - 1                               (********)
+    //
+    // In order to compute c, we will compute the inverse of M' and
+    // multiply with m.
+
+    // precondition checking:
+    CGAL_APPEL_ASSERT(!has_center);
+
+    // compute M'^{-1}:
+    mi.resize(d * d);
+    E->compute_inverse_of_submatrix(mi.begin());
+
+    // compute center:
+    center_.resize(d);
+    for (int i=0; i<d; ++i) {
+      FT ci(0);
+      for (int j=0; j<d; ++j)
+	ci += mi[i+d*j] * E->matrix(d,j);
+      center_[i] = -ci;
+    }
+
+    // remember that we have computed the center:
+    has_center = true;
+  }
+
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  compute_axes_2_3()
+  {
+    // According to (****), the computed ellipsoid E* has the representation
+    //
+    //   E* = { y in R^d | y^T M'/alpha y + 2/alpha y^Tm + (nu/alpha-1) <= 0 }
+    // 
+    // for
+    //
+    //       [ M'  m  ]
+    //   M = [ m^T nu ]
+    //
+    // where M is the matrix defined via E->matrix(i,j).  After caling
+    // compute_center() (see above), we have in center_ a point c such
+    // that
+    // 
+    //   E* = { y | (y - c)^T M'/alpha (y - c) + mu <= 0 }.
+    //
+    // where mu = nu/alpha-1 - c^T M'/alpha c.
+    //
+    // Now if we can write M' = U D U^T holds for some diagonal matrix
+    // D and an orthogonal matrix U then the length l_i of the ith axes
+    // (corresponding to the ith "direcion" stored in the ith row of
+    // U) can be obtained by plugging (0,...,0,l_i,0,...,0)U^T=y-c into
+    // the above equation for E*:
+    //
+    //   l_i^2 d[i]/alpha = -mu, 
+    //
+    // which gives l_i = sqrt(-mu*alpha/d[i]).
+
+    // precondition checking:
+    CGAL_APPEL_ASSERT(!has_axes && lengths_.size() == 0 &&
+		      directions_.size() == 0);
+
+    // compute M'^{-1}, if need be:
+    if (!has_center)
+      compute_center();
+
+    const double alpha = (1+achieved_epsilon()) * (d+1);
+
+    // compute mu according to (********):
+    double mu = E->matrix(d,d);
+    for (int i=0; i<d; ++i)
+      mu += center_[i] * E->matrix(d,i);
+    mu = mu/alpha - 1.0;
+    const double factor = -mu*alpha;
+    
+    // compute Eigendecomposition:
+    if (d == 2)
+      compute_axes_2(alpha, factor);
+    else
+      compute_axes_3(alpha, factor);
+
+    // remember that we have computed the axes:
+    has_axes = true;
+  }
+
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  compute_axes_2(const double /* alpha */, const double factor)
+  {
+    CGAL_APPEL_ASSERT(d==2);
+
+    // write matrix M' as [ a, b; b, c ]:
+    const CGAL::cpp11::array<double, 3> matrix = {{ E->matrix(0, 0),    // a
+						    E->matrix(0, 1),    // b
+						    E->matrix(1, 1) }}; // c
+    CGAL::cpp11::array<double, 4> eigenvectors; // Note: not neces. normalized.
+    CGAL::cpp11::array<double, 2> eigenvalues;  // Note: sorted ascendent.
+
+    CGAL::Default_diagonalize_traits<double, 2>::diagonalize_selfadjoint_covariance_matrix
+      (matrix, eigenvalues, eigenvectors);
+    
+    // normalize eigenvectors:
+    double l1=1.0/std::sqrt(eigenvectors[2]*eigenvectors[2]+
+			    eigenvectors[3]*eigenvectors[3]);
+    double l2=1.0/std::sqrt(eigenvectors[0]*eigenvectors[0]+
+			    eigenvectors[1]*eigenvectors[1]);
+    
+    // store axes lengths:
+    lengths_.push_back(std::sqrt(factor/eigenvalues[1]));
+    lengths_.push_back(std::sqrt(factor/eigenvalues[0]));
+    
+    // store directions:
+    directions_.resize(2);
+    directions_[0].push_back(eigenvectors[2]*l1);
+    directions_[0].push_back(eigenvectors[3]*l1);
+    directions_[1].push_back(eigenvectors[0]*l2);
+    directions_[1].push_back(eigenvectors[1]*l2);
+  }
+  
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  compute_axes_3(const double /* alpha */, const double factor)
+  {
+    CGAL_APPEL_ASSERT(d==3);
+
+    // write matrix M' as
+    //
+    //        [ a b c ]
+    //   M' = [ b d e ]
+    //        [ c e f ]
+    //
+    const CGAL::cpp11::array<double, 6> matrix = {{ E->matrix(0, 0),   // a
+                                                    E->matrix(0, 1),   // b
+                                                    E->matrix(0, 2),   // c
+                                                    E->matrix(1, 1),   // d
+                                                    E->matrix(1, 2),   // e
+                                                    E->matrix(2, 2) }}; // f
+    
+    CGAL::cpp11::array<double, 9> eigenvectors; // Note: not necessarily normalized.
+    CGAL::cpp11::array<double, 3> eigenvalues;  // Note: sorted ascendent.
+
+    CGAL::Default_diagonalize_traits<double, 3>::diagonalize_selfadjoint_covariance_matrix
+      (matrix, eigenvalues, eigenvectors);
+    
+    // normalize eigenvectors:
+    double l1 = 1.0/std::sqrt(eigenvectors[0] * eigenvectors[0]+  // x^2
+			      eigenvectors[1] * eigenvectors[1]+  // y^2
+			      eigenvectors[2] * eigenvectors[2]); // z^2
+    double l2 = 1.0/std::sqrt(eigenvectors[3] * eigenvectors[3]+  // x^2
+			      eigenvectors[4] * eigenvectors[4]+  // y^2
+			      eigenvectors[5] * eigenvectors[5]); // z^2
+    double l3 = 1.0/std::sqrt(eigenvectors[6] * eigenvectors[6]+  // x^2
+			      eigenvectors[7] * eigenvectors[7]+  // y^2
+			      eigenvectors[8] * eigenvectors[8]); // z^2
+    
+    // store axes lengths:
+    for (int i=0; i<3; ++i)
+      lengths_.push_back(std::sqrt(factor/eigenvalues[i]));
+    
+    // store directions:
+    directions_.resize(3);
+    directions_[0].push_back(eigenvectors[6]*l3);
+    directions_[0].push_back(eigenvectors[7]*l3);
+    directions_[0].push_back(eigenvectors[8]*l3);
+    directions_[1].push_back(eigenvectors[3]*l2);
+    directions_[1].push_back(eigenvectors[4]*l2);
+    directions_[1].push_back(eigenvectors[5]*l2);
+    directions_[2].push_back(eigenvectors[0]*l1);
+    directions_[2].push_back(eigenvectors[1]*l1);
+    directions_[2].push_back(eigenvectors[2]*l1);
+  }
+
+  template<class Traits>
+  void Approximate_min_ellipsoid_d<Traits>::
+  write_eps(const std::string& name)
+  {
+    CGAL_APPEL_ASSERT(d==2 && !is_degenerate());
+
+    namespace Impl = Approximate_min_ellipsoid_d_impl;
+    Impl::Eps_export_2 epsf(name,2.0);
+    epsf.set_label_mode(Impl::Eps_export_2::None);
+
+    // output the input points:
+    for (unsigned int k=0; k<P.size(); ++k) {
+      C_it pk = tco.cartesian_begin(P[k]);
+      const double u = to_double(*pk++);
+      const double v = to_double(*pk);
+      epsf.write_circle(u,v,0.0);
+    }
+
+    // output center:
+    Center_coordinate_iterator c = center_cartesian_begin();
+    const double cx = *c;
+    const double cy = *++c;
+    epsf.write_circle(cx, cy, 0.0, true); // (Note: last arg says to color.)
+
+    // output axes:
+    Axes_lengths_iterator axes = axes_lengths_begin();
+    const double a1 = *axes;
+    const double a2 = *++axes;
+    Axes_direction_coordinate_iterator d1 = axis_direction_cartesian_begin(0);
+    const double d1_x = *d1;
+    const double d1_y = *++d1;
+    Axes_direction_coordinate_iterator d2 = axis_direction_cartesian_begin(1);
+    const double d2_x = *d2;
+    const double d2_y = *++d2;
+    epsf.write_line(cx, cy, cx+a1*d1_x, cy+a1*d1_y, true);
+    epsf.write_line(cx, cy, cx+a2*d2_x, cy+a2*d2_y, true);
+
+    // output the inscribed ellipse:
+    const double alpha_inv = 1.0/((1+achieved_epsilon())*(d+1));
+    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
+    epsf.write_ellipse(to_double(defining_matrix(0,0)*alpha_inv),
+		       to_double(defining_matrix(1,1)*alpha_inv),
+		       to_double(defining_matrix(0,1)*alpha_inv),
+		       to_double(defining_vector(0)*alpha_inv),
+		       to_double(defining_vector(1)*alpha_inv),
+		       to_double(defining_scalar()*alpha_inv-1.0));
+  }
+
+}
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h
new file mode 100644
index 0000000..2a07ab9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h
@@ -0,0 +1,667 @@
+// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Kaspar Fischer <fischerk at inf.ethz.ch>
+
+// Note: whenever a comment refers to "Khachiyan's paper" then the
+// paper "Rounding of polytopes in the real number model of
+// computation" is ment (Mathematics of Operations Research, Vol. 21,
+// No. 2, May 1996).  Nontheless, most comments refer to the
+// accompanying documentation sheet (and not to the above paper), see
+// the file(s) in documentation/.
+
+#include <numeric>
+
+#include <CGAL/tags.h>
+#include <CGAL/use.h>
+#include <CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h>
+
+namespace CGAL {
+
+  namespace Appel_impl {
+    
+    // Computes the inverse of the positive definite (dxd)-matrix A
+    // into Ai, by using the Cholesky decomposition of A. All three
+    // iterator template parameters must be random access iterators of
+    // value type FT. The iterator tmp must have d entries.  The
+    // routine returns true in case no errors occurred; false is
+    // returned in case of stability problems or when A is not
+    // positive definite.
+    //
+    // Note: A is destroyed in this process.
+    //
+    // Precondition: A and Ai may point to the same matrix (i.e., might alias).
+    template<typename FT,
+	     typename Tmp_iterator,
+	     typename A_iterator,
+	     typename A_inverse_iterator>
+    bool pd_matrix_inverse(const int d,
+			   A_iterator A,
+			   A_inverse_iterator Ai,
+			   Tmp_iterator tmp)
+    {
+      // I use the following version (in matlab notation) from Walter
+      // Gander's lecture "Ausgleichsrechnung" (ETH Zurich, around 2000, see
+      // http://www.inf.ethz.ch/personal/chinella/education/ausgleich/
+      // Demo2.txt):
+      //
+      //    # compute lower-triangular L s.t. A = LL^T:
+      //    for j=1:d
+      //      v = A(j:d,j) - L(j:d,1:j-1) * L(j,1:j-1)';
+      //      L(j:d,j) = v/sqrt(v(1));
+      //    end;
+      //
+      // Observe that the vector v in this pseudo-code is a
+      // (d-j+1)-vector; we use (the last d-j+1 entries of) the vector
+      // tmp to store v.  (Also, the above program uses one-based
+      // counting, the code below is of course zero-based.)  Note also
+      // that instead of computing the result into L we can as well
+      // overwrite the lower part of A.
+      for (int j=0; j<d; ++j) {
+	// compute new column (v in above pseudo-code):
+	for (int i=j; i<d; ++i) {
+	  FT ll(0);
+	  for (int k=0; k<j; ++k)
+	    ll += A[i+k*d] * A[j+k*d];
+	  tmp[i] = A[i+j*d] - ll;
+	}
+
+	// check regularity:
+	if (tmp[j] <= 0) // todo: epsilon?
+	  return false;
+
+	// overwrite column:
+	const FT scale = FT(1)/std::sqrt(tmp[j]);
+	for (int i=j; i<d; ++i)
+	  A[i+j*d] = tmp[i] * scale;
+      }
+
+      // Now that we have in the lower triangular part of A the
+      // Cholesky decomposition A = LL^T of the original A, we compute
+      // the inverse of A see "Numerical Recipes in C", end of Chapter
+      // 2.9.
+      for (int i=0; i<d; ++i) {
+	A[i+i*d] = FT(1)/A[i+i*d];
+	for (int j=i+1; j<d; ++j) {
+	  FT sum(0);
+	  for (int k=i; k<j; ++k)
+	    sum -= A[j+k*d] * A[k+i*d];
+	  A[j+i*d] = sum/A[j+j*d];
+	}
+      }
+    
+      // Finally, we calculate A^{-1} = (L^{-1})^T L^{-1} into Ai:
+      for (int i=0; i<d; ++i)
+	for (int j=0; j<=i; ++j) {
+
+	  // compute entry (i,j) of A^{-1}:
+	  FT sum(0);
+	  for (int k=i; k<d; ++k)
+	    sum += A[k+i*d] * A[k+j*d];
+	  Ai[i+j*d] = sum;
+
+	  // Since A^{-1} is symmetric, we set:
+	  Ai[j+i*d] = sum;
+	}
+
+      return true;
+    }
+
+  } // end of namespace Appel_impl
+
+  template<bool Embed,class Traits>
+  Khachiyan_approximation<Embed,Traits>::
+  ~Khachiyan_approximation()
+  {
+    CGAL_APPEL_ASSERT_EXPENSIVE(is_valid(false));
+  }
+
+  #ifdef CGAL_APPEL_ASSERTION_MODE
+  template<bool Embed,class Traits>
+  void Khachiyan_approximation<Embed,Traits>::compute_M_of_x()
+  // Computes into t the matrix
+  // 
+  //    M(x) = sum(x_i p_i p_i^T,i=0..(n-1)).
+  //
+  // Complexity: O(n d^2)
+  //
+  // Note: we only use this routine to check assertions.
+  {
+    // erase m:
+    for (int i=0; i<d; ++i)
+      for (int j=0; j<d; ++j)
+	t[i+j*d] = FT(0);
+
+    // evaluate products:
+    for (int k=0; k<n; ++k) {
+      C_it pi = tco.cartesian_begin(*P[k]);
+      for (int i=0; i<d_P; ++i, ++pi) {
+	C_it pj = tco.cartesian_begin(*P[k]);
+	for (int j=0; j<d_P; ++j, ++pj)
+	  t[i+j*d] += x[k] * (*pi) * (*pj);
+	if (Embed)
+	  t[i+d_P*d] += x[k] * (*pi);
+      }
+      if (Embed) {
+	C_it pj = tco.cartesian_begin(*P[k]);
+	for (int j=0; j<d_P; ++j, ++pj)
+	  t[d_P+j*d] += x[k] * (*pj);
+	t[d_P+d_P*d] += x[k];
+      }
+    }
+  }
+  #endif // CGAL_APPEL_ASSERTION_MODE
+
+  template<bool Embed,class Traits>
+  bool Khachiyan_approximation<Embed,Traits>::
+  compute_inverse_of_t_into_mi(const Tag_true /* exact*/)
+  // Note: this routine is not used in CGAL; it turned out that using
+  // exact arithmetic, the algorithm is very slow.
+  {
+    // We need to compute into mi the inverse of the matrix t.  We use
+    // Gauss-Jordan elimination to do this.  So we write t and the
+    // identity matrix I as [I|t] and transform this (by means of row
+    // operations) into a system of the form [N|I].  Then N is the
+    // inverse of t.  Why?  This is like solving a linear system with
+    // several right-hand sides simultaneously by Gauss elimination:
+    // Since the transformations we apply do not change the solution
+    // space of the intermediate systems, we can say: The system t x =
+    // e_j has, for any i in {1,...,d}, the same solution space as I x
+    // = n_i (with n_i being the i-th colum of N); it follows that
+    // x=n_i.
+
+    // store the identity matrix in mi:
+    for (int i=0; i<d; ++i)
+      for (int j=0; j<d; ++j)
+	mi[i+j*d] = FT(i==j? 1 : 0);
+
+    // Since it is not always possible to achieve a final form [*|I]
+    // without row exchanges, we try to get the form [*|P(I)] where
+    // P(I) stands for a permutation of the rows of the matrix I ---
+    // in other words: we want a "1" in every row.  Therefore, we
+    // maintain a integer for every row with the number of the column
+    // into which we placed a "1", or a -1 in case we haven't yet
+    // place a "1" in this row.  Also, we maintain for every column
+    // the number of the row into which we placed the one.
+    std::vector<int> col_with_one(d,-1);
+    std::vector<int> row_with_one(d);
+
+    for (int j=d-1; j>=0; --j) {
+      // In this iteration of the loop we try to make the column j of
+      // m a zero vector with exactly one 1 in an unused place (i.e.,
+      // in a place k for which one_in_row(k) isn't yet true).
+
+      // search for a suitable place k:
+      bool found = false;
+      int k = d-1;
+      for (; k>=0; --k)
+	if (!is_zero(t[k+j*d]) && col_with_one[k]<0) {
+	  found = true;
+	  break;
+	}
+      if (!found)
+	return false;
+      col_with_one[k] = j;
+      row_with_one[j] = k;
+
+      // zero out the entries above and below entry k:
+      for (int i=0; i<d; ++i)
+	if (i != k) {
+	  // we add l times row k to row i:
+	  const FT l = -t[i+j*d]/t[k+j*d];
+	  for (int jj=0; jj<d; ++jj)
+	    mi[i+jj*d] += l*mi[k+jj*d];
+	  for (int jj=0; jj<=j; ++jj)
+	    t[i+jj*d]  += l*t[k+jj*d];
+	}
+
+      // finally, we scale row k to get a one at (k,j):
+      for (int jj=0; jj<d; ++jj)
+	mi[k+jj*d] /= t[k+j*d];
+      for (int jj=0; jj<=j; ++jj)
+	t[k+jj*d] /= t[k+j*d];
+    }
+
+    // At this point we know that for any i in {1,...,d} the system m
+    // x = e_i has the some solution as P(I) x = n_i.  So x =
+    // P(I)^{-1} n_i and it thus suffices to undo the permutation:
+    for (int i=0; i<d; ++i)
+      if (row_with_one[i] != i) {
+	const int repl_row = row_with_one[i];
+	const int col = col_with_one[i];
+	for (int j=0; j<d; ++j)
+	  std::swap(mi[i+j*d],mi[repl_row+j*d]);
+	row_with_one[col] = repl_row;
+	col_with_one[repl_row] = col;
+	row_with_one[i] = col_with_one[i] = i;
+    }
+    return true;
+  }
+
+  template<bool Embed,class Traits>
+  bool Khachiyan_approximation<Embed,Traits>::
+  compute_inverse_of_t_into_mi(const Tag_false /* exact */)
+  {
+    // handle the obvious case when the points cannot span \R^d:
+    if (P.size() <= static_cast<unsigned int>(d))
+      return false;
+
+    return Appel_impl::pd_matrix_inverse<FT>(d,
+					     t.begin(),
+					     mi.begin(),
+					     tmp.begin());
+  }
+
+  template<bool Embed,class Traits>
+  bool Khachiyan_approximation<Embed,Traits>::
+    compute_initial_inverse_from_sum()
+  {
+    // assertions:
+    CGAL_APPEL_ASSERT(is_deg);
+
+    // check number of points:
+    if (n == 0)
+      return false;
+
+    // When this routine is called, the variable sum contains the
+    // matrix sum(p_i p_i^T,i=0...(n-1)), which coincides with n M(x)
+    // for x = (1/n,...,1/n).  Our aim is to compute M(x)^{-1} into
+    // the variable mi and, if the latter matrix exits, to set x to
+    // (1/n,...,1/n).  For this, we first compute M(x) into variable t:
+    const FT invOfn = 1/FT(n);
+    for (int i=0; i<d; ++i)
+      for (int j=0; j<d; ++j)
+	t[i+j*d] = sum[i+j*d] * invOfn;
+
+    if (!compute_inverse_of_t_into_mi(Exact_flag()))
+      return false;
+
+    #ifdef CGAL_APPEL_ASSERTION_MODE
+    // We start with the solution (1/n,...,1/n):
+    for (int k=0; k<n; ++k)
+      x[k] = invOfn;
+    #endif // CGAL_APPEL_ASSERTION_MODE
+
+    // Finally, we compute the excess of P[k] (w.r.t. x) into ex[k]
+    // for all k:
+    ex_max = 0;
+    for (int k=0; k<n; ++k) 
+      if ((ex[k] = excess<FT>(tco.cartesian_begin(*P[k]))) > ex[ex_max])
+	ex_max = k;
+    CGAL_APPEL_LOG("appel","  Largest excess after initialization is " <<
+	      to_double(ex[ex_max]) << "." << "\n");
+    
+    // Accoding to Khachiyam (Lemma 3, eq. (2.20) in "Rounding of
+    // polytopes in the real number model of computation"), the
+    // following eps makes (*) hold:
+    eps = n-1;
+    is_exact_eps_uptodate = false;
+
+    return true;
+  }
+
+  #ifdef CGAL_APPEL_ASSERTION_MODE
+  template<bool Embed,class Traits>
+  typename Traits::FT Khachiyan_approximation<Embed,Traits>::
+    representation_error_of_mi()
+  {
+    using std::abs;
+
+    // If the points are degenerate then the inverse of M(x) doesn't
+    // exist, and so we exit immediately:
+    if (is_deg)
+      return FT(0);
+
+    // compute M(x) into the matrix represented by t:
+    compute_M_of_x();
+
+    // compute mi times the matrix M(x) (which should give the
+    // identity matrix):
+    FT max_error(0);
+    for (int i=0; i<d; ++i)
+      for (int j=0; j<d; ++j) {
+	
+	// compute element (i,j) of the product of m and M(x):
+	FT v(0);
+	for (int k=0; k<d; ++k)
+	  v += t[i+k*d] * mi[k+j*d];
+	
+	// check it:
+	const FT exact(i == j? 1 : 0);
+	max_error = (std::max)(max_error,std::abs(v-exact));
+      }
+
+    // update statistics:
+    #ifdef CGAL_APPEL_STATS_MODE
+    max_error_m_all = (std::max)(max_error,max_error_m_all);
+    max_error_m = max_error;
+    #endif
+    CGAL_APPEL_LOG("appel","  The represenation error in m is: " <<
+	      to_double(max_error) << (max_error == FT(0)?
+              " (zero)" : "") << "." << "\n");
+    
+    return max_error;
+  }
+  #endif // CGAL_APPEL_ASSERTION_MODE
+
+  template<bool Embed,class Traits>
+  void Khachiyan_approximation<Embed,Traits>::rank_1_update(int k,
+							    const FT& tau)
+  {
+    // check preconditions:
+    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || tau == eps/((1+eps)*d-1));
+    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || 
+		      excess<ET>(tco.cartesian_begin(*P[k])) == (1+eps)*d);
+    CGAL_USE(tau);
+    const FT mu = eps / ((d-1)*(1+eps));
+    const FT alpha = 1 + mu;
+    const FT beta = mu / (1+eps);
+
+    // compute into tmp the vector M(x)^{-1} p_k:
+    for (int i=0; i<d; ++i) { // loop to determine tmp[i]
+      tmp[i] = FT(0);
+      C_it pk = tco.cartesian_begin(*P[k]);
+      for (int j=0; j<d_P; ++j, ++pk)
+	tmp[i] += (*pk) * mi[i+j*d];
+      if (Embed)
+	tmp[i] += mi[i+d_P*d];
+    }
+
+    // We need to scale the current matrix m by alpha and add to it
+    // the matrix (tmp tmp^T) times -beta:
+    for (int i=0; i<d; ++i)
+      for (int j=0; j<d; ++j) {
+	mi[i+j*d] *= alpha;
+	mi[i+j*d] -= beta * tmp[i]*tmp[j];
+      }
+
+    // Update ex[k]: We need to scale ex[k] by alpha and subtract from
+    // it beta (p_k^T tmp)^2:
+    ex_max = 0;
+    for (int k=0; k<n; ++k) {
+      
+      // compute gamma = (p_k^T tmp)^2:
+      FT gamma(0);
+      C_it pk = tco.cartesian_begin(*P[k]);
+      for (int i=0; i<d_P; ++i, ++pk)
+	gamma += tmp[i] * (*pk);
+      if (Embed)
+	gamma += tmp[d_P];
+      gamma *= gamma;
+      
+      // update ex[k]:
+      ex[k] *= alpha;
+      ex[k] -= beta*gamma;
+
+      // remember the largest so far:
+      if (ex[k] > ex[ex_max])
+	ex_max = k;
+    }
+
+    // check postcondition:
+    #ifdef CGAL_APPEL_EXP_ASSERTION_MODE
+    representation_error_of_mi();
+    #endif // CGAL_APPEL_EXP_ASSERTION_MODE
+  }
+
+  template<bool Embed,class Traits>
+  bool Khachiyan_approximation<Embed,Traits>::improve(const double desired_eps)
+  {
+    // Take the smallest eps s.t. (excess(p_m) =) p_m^T M(x)^{-1} p_m <=
+    // (1+eps) d holds for all m in {1,...,n}:
+    eps = ex[ex_max]/d - 1;
+    is_exact_eps_uptodate = false;
+    
+    CGAL_APPEL_LOG("appel","  The current eps is: " << to_double(eps) << "\n");
+    
+    // check if we have already reached an acceptable eps:
+    if (eps <= desired_eps) // numerics say we're ready to stop...
+      if (exact_epsilon() <= desired_eps) // ... and if it's o.k, we stop
+        // Note: if FT is inexact, exact_epsilon() may return a
+        // negative number here, which we will interpret as the input
+        // points being degenerate.
+	return true;
+
+    // We optimize along the line
+    //
+    //   x' = (1 - tau) x + tau e_{ex_max},
+    //
+    // i.e., we replace our current solution x with x' for the value
+    // tau which minimizes the objective function on this line.  It
+    // turns out that the minimum is attained at tau = eps/((1+eps)d-1)
+    // which then equals tau = eps/(largest_excess-1).
+    const FT tau = eps / (ex[ex_max] - 1);
+
+    #ifdef CGAL_APPEL_ASSERTION_MODE
+    // replace x by x':
+    for (int i=0; i<n; ++i)
+      x[i] = (1-tau)*x[i];
+    x[ex_max] += tau;
+    CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) ||
+		      std::accumulate(x.begin(),x.end(),FT(0)) == FT(1));
+    #endif // CGAL_APPEL_ASSERTION_MODE
+
+    // recompute the inverse m of M(x) (where x is our new x') and
+    // update the excesses in the array ex:
+    rank_1_update(ex_max,tau);
+
+    return false;
+  }
+
+  template<bool Embed,class Traits>
+  double Khachiyan_approximation<Embed,Traits>::exact_epsilon(bool recompute)
+  {
+    CGAL_APPEL_ASSERT(!is_deg);
+
+    // return cached result, if possible:
+    if (!recompute && is_exact_eps_uptodate)
+      return eps_exact;
+
+    // find max p_i^T M(x)^{-1} p_i:
+    ET max = 0;
+    for (int i=0; i<n; ++i)
+      max = (std::max)(max, excess<ET>(tco.cartesian_begin(*P[i])));
+
+    // compute (using exact arithmetic) epsilon via (*):
+    typedef CGAL::Quotient<ET> QET;
+    QET eps_e = QET(max,d)-1;
+    eps_exact = CGAL::to_interval(eps_e).second;
+
+    // debugging output:
+    CGAL_APPEL_LOG("appel",
+		   "Exact epsilon is " << eps_e << " (rounded: " <<
+		   eps_exact << ")." << "\n");
+    
+    // check whether eps is negative (which under exact arithmetic is
+    // not possible, and which we will take as a sign that the input
+    // points are degenerate):
+    if (CGAL::is_negative(eps_e)) {
+      CGAL_APPEL_LOG("appel", "Negative Exact epsilon -> degenerate!" << "\n");
+      is_deg = true;
+    }
+
+    is_exact_eps_uptodate = true;
+    return eps_exact;
+  }
+
+  template<bool Embed,class Traits>
+  bool Khachiyan_approximation<Embed,Traits>::is_valid(bool verbose)
+  {
+    // debugging output:
+    if (verbose) {
+      CGAL_APPEL_IF_STATS(
+        std::cout << "The overall error in the matrix inverse is:   " 
+	          << max_error_m_all << "." << "\n");
+    }
+
+    // handle degenerate case:
+    if (is_deg)
+      return true;
+
+    // check Eq. (*) for the exact epsilon:
+    const double epsilon = exact_epsilon(true);
+    const ET     ratio   = (ET(epsilon)+1)*d;
+    for (int i=0; i<n; ++i)
+      if (excess<ET>(tco.cartesian_begin(*P[i])) > ratio) {
+	CGAL_APPEL_LOG("appel","ERROR: Eq. (*) violated." << "\n");
+	return false;
+      }
+
+    return true;
+  }
+
+  template<bool Embed,class Traits>
+  template<typename Iterator>
+  bool Khachiyan_approximation<Embed,Traits>::
+  compute_inverse_of_submatrix(Iterator inverse)
+  {
+    CGAL_APPEL_ASSERT(!is_deg);
+
+    // copy matrix to destination:
+    for (int i=0; i<d-1; ++i)
+      for (int j=0; j<d-1; ++j)
+	inverse[i+j*(d-1)] = mi[i+j*d];
+
+    // solve in place:
+    return Appel_impl::pd_matrix_inverse<FT>(d-1, inverse,
+					     inverse, tmp.begin());
+  }
+  
+  template<bool Embed,class Traits>
+  void Khachiyan_approximation<Embed,Traits>::print(std::ostream& o)
+  {
+    #ifdef CGAL_APPEL_ASSERTION_MODE
+    o << "xsol := [ ";
+    for (int k=0; k<n; ++k) {
+      o << x[k];
+      if (k<n-1)
+	o << ",";
+    }
+    o << "];" << "\n\n";
+    #endif // CGAL_APPEL_ASSERTION_MODE
+
+    o << "Mi:= matrix([" << "\n";
+    for (int i=0; i<d; ++i) {
+      o << " [ ";
+      for (int j=0; j<d; ++j) {
+	o << mi[i+j*d];
+	if (j<d-1)
+	  o << ",";
+      }
+      o << "]";
+      if (i<d-1)
+	o << ",";
+      o << "\n";
+    }
+    o << "]);" << "\n";
+
+    o << "S:= matrix([" << "\n";
+    for (int i=0; i<d; ++i) {
+      o << " [ ";
+      for (int j=0; j<d; ++j) {
+	o << sum[i+j*d];
+	if (j<d-1)
+	  o << ",";
+      }
+      o << "]";
+      if (i<d-1)
+	o << ",";
+      o << "\n";
+    }
+    o << "]);" << "\n";
+
+    o << "M:= matrix([" << "\n";
+    for (int i=0; i<d; ++i) {
+      o << " [ ";
+      for (int j=0; j<d; ++j) {
+	o << t[i+j*d];
+	if (j<d-1)
+	  o << ",";
+      }
+      o << "]";
+      if (i<d-1)
+	o << ",";
+      o << "\n";
+    }
+    o << "]);" << "\n";
+  }
+  
+  template<bool Embed,class Traits>
+  int Khachiyan_approximation<Embed,Traits>::write_eps() const
+  {
+    CGAL_APPEL_ASSERT(d == 2 && !Embed);
+    static int id = 0;
+
+    namespace Impl = Approximate_min_ellipsoid_d_impl;
+    // (Using "Impl::tostr(id)" in the following doesn't work on GCC 2.95.2.)
+    Impl::Eps_export_2 epsf(Approximate_min_ellipsoid_d_impl::tostr(id)+".eps",
+                            100.0);
+    epsf.set_label_mode(Impl::Eps_export_2::None);
+
+    // output the input points:
+    for (int k=0; k<n; ++k) {
+      C_it pk = tco.cartesian_begin(*P[k]);
+      const double u = to_double(*pk++);
+      const double v = to_double(*pk);
+      epsf.write_circle(u,v,0.0);
+    }
+
+    // output the inscribed ellipse:
+    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
+    epsf.write_cs_ellipse(to_double(mi[0+0*d]),
+			  to_double(mi[1+1*d]),
+			  to_double(mi[1+0*d]));
+
+    // Output the approximation of the minellipse: Since the relaxed
+    // optimality conditions (*) hold, 
+    //
+    //      p_i^T M(x)^{-1} p_i <= (1+eps) d,
+    // 
+    // we can divide by a:=(1+eps)d to get
+    //
+    //     p_i^T M(x)^{-1}/a p_i <= 1,
+    //
+    // which means that all points lie in the ellipsoid defined by the
+    // matrix M(x)^{-1}/alpha.
+    const FT a = (1+eps)*d;
+    for (int k=0; k<n; ++k) {
+      // compute M(x)^{-1}/alpha p_k into vector tmp:
+      for (int i=0; i<d; ++i) { // loop to determine tmp[i]
+	tmp[i] = FT(0);
+	C_it pk = tco.cartesian_begin(*P[k]);
+	for (int j=0; j<d; ++j, ++pk)
+	  tmp[i] += (*pk) * mi[i+j*d];
+      }
+
+      // calculate p^T tmp:
+      FT result(0);
+      C_it pk = tco.cartesian_begin(*P[k]);
+      for (int i=0; i<d; ++i, ++pk)
+	result += (*pk) * tmp[i];
+    }
+
+    epsf.set_stroke_mode(Impl::Eps_export_2::Dashed);
+    epsf.set_label("E2");
+    epsf.write_cs_ellipse(to_double(mi[0+0*d]/a),
+			  to_double(mi[1+1*d]/a),
+			  to_double(mi[1+0*d]/a));
+    
+    return id++;
+  }
+
+}
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h b/3rdparty/CGAL-4.8/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_Bezier_curve_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_Bezier_curve_traits_2.h
new file mode 100644
index 0000000..21d137d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_Bezier_curve_traits_2.h
@@ -0,0 +1,877 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
+//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
+//                 Waqar Khan   <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_BEZIER_CURVE_TRAITS_2_H
+#define CGAL_ARR_BEZIER_CURVE_TRAITS_2_H
+
+/*! \file
+ * Definition of the Arr_Bezier_curve_traits_2 class.
+ */
+
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_geometry_traits/Bezier_curve_2.h>
+#include <CGAL/Arr_geometry_traits/Bezier_point_2.h>
+#include <CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h>
+#include <CGAL/Arr_geometry_traits/Bezier_cache.h>
+#include <CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h>
+
+namespace CGAL {
+
+/*! \class
+ * A traits class for maintaining an arrangement of Bezier curves with
+ * rational control points.
+ *
+ * The class is templated with four parameters:
+ * Rat_kernel A kernel that defines the type of control points.
+ * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
+ *            for the coordinates of arrangement vertices and is used to
+ *            represent algebraic numbers.
+ * Nt_traits A number-type traits class. This class defines the Rational
+ *           number type (should be the same as Rat_kernel::FT) and the
+ *           Algebraic number type (should be the same as Alg_kernel::FT)
+ *           and supports various operations on them.
+ * Bounding_traits A traits class for filtering the exact computations.
+ *                 By default we use the rational bounding traits.
+ */
+template <class RatKernel_, class AlgKernel_, class NtTraits_,
+          class BoundingTraits_ = Bezier_bounding_rational_traits<RatKernel_> >
+class Arr_Bezier_curve_traits_2
+{
+public:
+
+  typedef RatKernel_                             Rat_kernel;
+  typedef AlgKernel_                             Alg_kernel;
+  typedef NtTraits_                              Nt_traits;
+  typedef BoundingTraits_                        Bounding_traits;
+  typedef Arr_Bezier_curve_traits_2<Rat_kernel,
+                                    Alg_kernel,
+                                    Nt_traits,
+                                    Bounding_traits>   Self;
+
+  typedef typename Nt_traits::Integer            Integer;
+  typedef typename Rat_kernel::FT                Rational;
+  typedef typename Alg_kernel::FT                Algebraic;
+
+  typedef typename Rat_kernel::Point_2           Rat_point_2;
+  typedef typename Alg_kernel::Point_2           Alg_point_2;
+
+  // Category tags:
+  typedef Tag_true                               Has_left_category;
+  typedef Tag_true                               Has_merge_category;
+  typedef Tag_false                              Has_do_intersect_category;
+
+  typedef Arr_oblivious_side_tag                 Left_side_category;
+  typedef Arr_oblivious_side_tag                 Bottom_side_category;
+  typedef Arr_oblivious_side_tag                 Top_side_category;
+  typedef Arr_oblivious_side_tag                 Right_side_category;
+
+  // Traits-class types:
+  typedef _Bezier_curve_2<Rat_kernel,
+                          Alg_kernel,
+                          Nt_traits,
+                          Bounding_traits>             Curve_2;
+
+  typedef _Bezier_x_monotone_2<Rat_kernel,
+                               Alg_kernel,
+                               Nt_traits,
+                               Bounding_traits>        X_monotone_curve_2;
+
+  typedef _Bezier_point_2<Rat_kernel,
+                          Alg_kernel,
+                          Nt_traits,
+                          Bounding_traits>             Point_2;
+
+  typedef typename X_monotone_curve_2::Multiplicity    Multiplicity;
+
+
+  // Type definition for the vertical-tangnecy and intersection point cache.
+  typedef _Bezier_cache<Nt_traits>                     Bezier_cache;
+
+private:
+
+  // Type definition for the bounded intersection points mapping.
+  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
+
+  // Data members:
+  mutable Bezier_cache * p_cache;         /*!< Caches vertical tangency points
+                                           * and intersection points that have
+                                           * been computed in an exact manner.
+                                           */
+  mutable Intersection_map * p_inter_map; /*!< Maps curve pairs to their
+                                           * intersection points.
+                                           */
+  bool m_owner;                           /*!< Does this instance own its cache
+                                           * and map structures.
+                                           */
+
+public:
+
+  /// \name Construction.
+  //@{
+
+  /*! Default constructor. */
+  Arr_Bezier_curve_traits_2 ()
+  {
+    p_cache = new Bezier_cache;
+    p_inter_map = new Intersection_map;
+    m_owner = true;
+  }
+
+  /*! Copy constructor. */
+  Arr_Bezier_curve_traits_2 (const Self& tr) :
+    p_cache (tr.p_cache),
+    p_inter_map (tr.p_inter_map),
+    m_owner (false)
+  {}
+
+  /*! Assignmnet operator. */
+  Self& operator= (const Self& tr)
+  {
+    if (this == &tr)
+      return (*this);
+
+    p_cache = tr.p_cache;
+    p_inter_map = tr.p_inter_map;
+    m_owner = false;
+    return (*this);
+  }
+
+  /*! Destructor. */
+  ~Arr_Bezier_curve_traits_2 ()
+  {
+    if (m_owner)
+    {
+      delete p_cache;
+      delete p_inter_map;
+    }
+    p_cache = NULL;
+    p_inter_map = NULL;
+  }
+  //@}
+
+  /// \name Functor definitions for the arrangement traits.
+  //@{
+
+  /*! \class Compare_x_2
+   * The Compare_x_2 functor.
+   */
+  class Compare_x_2
+  {
+  private:
+    const Bezier_cache   *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Compare_x_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      return (p1.compare_x (p2,
+                            const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object () const
+  {
+    return (Compare_x_2 (p_cache));
+  }
+
+  /*! \class Compare_xy_2
+   * The Compare_xy_2 functor.
+   */
+  class Compare_xy_2
+  {
+  private:
+    const Bezier_cache   *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Compare_xy_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Compares two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      return (p1.compare_xy (p2,
+                             const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return (Compare_xy_2 (p_cache));
+  }
+
+  /*! \class Construct_min_vertex_2
+   * The Construct_min_vertex_2 functor.
+   */
+  class Construct_min_vertex_2
+  {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The left endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.left());
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return Construct_min_vertex_2();
+  }
+
+  /*! \class Construct_max_vertex_2
+   * The Construct_max_vertex_2 functor.
+   */
+  class Construct_max_vertex_2
+  {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.right());
+    }
+  };
+
+  /*! Get a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return Construct_max_vertex_2();
+  }
+
+  /*! \class Is_vertical_2
+   * The Is_vertical_2 functor.
+   */
+  class Is_vertical_2
+  {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv) const
+    {
+      return (cv.is_vertical());
+    }
+  };
+
+  /*! Get an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object () const
+  {
+    return Is_vertical_2();
+  }
+
+  /*! \class Compare_y_at_x_2
+   * The Compare_y_at_x_2 functor.
+   */
+  class Compare_y_at_x_2
+  {
+  private:
+    const Bezier_cache   *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Compare_y_at_x_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator() (const Point_2& p,
+                                  const X_monotone_curve_2& cv) const
+    {
+      return (cv.point_position (p,
+                                 const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object () const
+  {
+    return (Compare_y_at_x_2 (p_cache));
+  }
+
+  /*! \class Compare_y_at_x_left_2
+   * The Compare_y_at_x_left_2 functor.
+   */
+  class Compare_y_at_x_left_2
+  {
+  private:
+    const Bezier_cache   *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Compare_y_at_x_left_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      return (cv1.compare_to_left (cv2, p,
+                                   const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
+  {
+    return (Compare_y_at_x_left_2 (p_cache));
+  }
+
+  /*! \class Compare_y_at_x_right_2
+   * The Compare_y_at_x_right_2 functor.
+   */
+  class Compare_y_at_x_right_2
+  {
+  private:
+    const Bezier_cache   *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Compare_y_at_x_right_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      return (cv1.compare_to_right (cv2, p,
+                                    const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
+  {
+    return (Compare_y_at_x_right_2 (p_cache));
+  }
+
+  /*! \class Equal_2
+   * The Equal_2 functor.
+   */
+  class Equal_2
+  {
+  private:
+    const Bezier_cache         *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Equal_2 (const Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Check if the two x-monotone curves are the same (have the same graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      return (cv1.equals (cv2,
+                          const_cast<Bezier_cache&> (*p_cache)));
+    }
+
+    /*!
+     * Check if the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      return (p1.equals (p2,
+                         const_cast<Bezier_cache&> (*p_cache)));
+    }
+  };
+
+  /*! Get an Equal_2 functor object. */
+  Equal_2 equal_2_object () const
+  {
+    return (Equal_2 (p_cache));
+  }
+
+  /*! \class Make_x_monotone_2
+   * The Make_x_monotone_2 functor.
+   */
+  class Make_x_monotone_2
+  {
+  private:
+    Bezier_cache         *p_cache;
+
+  public:
+
+    /*! Constructor. */
+    Make_x_monotone_2 (Bezier_cache *cache) :
+      p_cache (cache)
+    {}
+
+    /*!
+     * Cut the given Bezier curve into x-monotone subcurves and insert them
+     * into the given output iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The returned
+     *           objects is a wrapper for an X_monotone_curve_2 object.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const Curve_2& B, OutputIterator oi) const
+    {
+      typedef typename Bounding_traits::Vertical_tangency_point
+                                                Vertical_tangency_point;
+
+      // Try to compute the bounds of the vertical tangency points.
+      Bounding_traits                           bound_tr;
+      typename Bounding_traits::Control_points  cpts;
+      std::list<Vertical_tangency_point>        vpt_bounds;
+
+      std::copy (B.control_points_begin(), B.control_points_end(),
+                 std::back_inserter(cpts));
+
+      bound_tr.compute_vertical_tangency_points
+          (cpts, std::back_inserter (vpt_bounds));
+
+      // Construct Point_2 from bounded tangency points.
+      std::list<Point_2>                            vpts;
+      bool                                          app_ok = true;
+      typename std::list<Vertical_tangency_point>::const_iterator iter;
+
+      for (iter = vpt_bounds.begin(); iter != vpt_bounds.end(); ++iter)
+      {
+        const typename Bounding_traits::Bez_point_bound& bound = iter->bound;
+        const typename Bounding_traits::Bez_point_bbox&  bbox = iter->bbox;
+
+        if (! bound.can_refine)
+        {
+          // If we cannot refine the vertical-tangency bound anymore, then
+          // we failed to bound the vertical tangency point.
+          // \todo In the future, we might want to use the info.
+          app_ok = false;
+          break;
+        }
+
+        // Construct an approximate vertical tangency point.
+        Point_2   pt;
+
+        if (bound.type == Bounding_traits::Bez_point_bound::RATIONAL_PT)
+        {
+          CGAL_assertion (CGAL::compare (bound.t_min, bound.t_max) == EQUAL);
+          Rational  t0 = bound.t_min;
+
+          pt = Point_2 (B, t0);
+        }
+        else
+        {
+          pt.add_originator (typename Point_2::Originator(B, bound));
+        }
+        pt.set_bbox (bbox);
+
+        vpts.push_back(pt);
+      }
+
+      // If bounding the approximated vertical-tangency points went fine,
+      // use these points as endpoint for the x-monotone subcurves.
+      if (app_ok)
+      {
+        // Create the x-monotone subcurves with approximate endpoints.
+        typename std::list<Point_2>::const_iterator pit;
+        unsigned int  xid = 1;            // Serial number of the subcurve.
+        Point_2       p0(B, xid, Rational(0)); // A rational start point.
+        // Note: xid is needed in ctr of p0 (and of p1 below),
+        // for handling end case of start point == end point.
+
+        for (pit = vpts.begin(); pit != vpts.end(); ++pit)
+        {
+          *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
+                                                         p0, *pit,
+                                                         *p_cache));
+          xid++;
+          p0 = *pit;
+        }
+
+        Point_2    p1(B, xid, Rational(1)); // A rational end point.
+        *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
+                                                       p0, p1,
+                                                       *p_cache));
+        return (oi);
+      }
+
+      // If we reached here then we have to compute the vertical-tangency
+      // points in an exact manner. We do this by considering all t-values
+      // on B(t) = (X(t), Y(t)), such that X'(t) = 0.
+      const typename Bezier_cache::Vertical_tangency_list&
+        vt_list = p_cache->get_vertical_tangencies (B.id(),
+                                                    B.x_polynomial(),
+                                                    B.x_norm());
+
+      // Create the x-monotone subcurves.
+      Point_2                                        p1;
+      typename Bezier_cache::Vertical_tangency_iter  it;
+      unsigned int  xid = 1;            // Serial number of the subcurve.
+      Point_2                                        p0 (B, xid, Rational(0));
+
+
+      for (it = vt_list.begin(); it != vt_list.end(); ++it)
+      {
+        p1 = Point_2 (B, *it);
+        *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
+                                                       p0, p1,
+                                                       *p_cache));
+        xid++;
+        p0 = p1;
+      }
+
+      // Create the final subcurve.
+      p1 = Point_2 (B, xid, Rational(1));
+      *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid,
+                                                     p0, p1,
+                                                     *p_cache));
+      return (oi);
+    }
+  };
+
+  /*! Get a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object () const
+  {
+    return (Make_x_monotone_2 (p_cache));
+  }
+
+  /*! \class Split_2
+   * The Split_2 functor.
+   */
+  class Split_2
+  {
+  public:
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      cv.split (p, c1, c2);
+      return;
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return Split_2();
+  }
+
+  /*! \class Intersect_2
+   * The Intersect_2 functor.
+   */
+  class Intersect_2
+  {
+  private:
+    Bezier_cache         *p_cache;
+    Intersection_map     *p_imap;
+
+  public:
+
+    /*! Constructor. */
+    Intersect_2 (Bezier_cache *cache, Intersection_map *imap) :
+      p_cache (cache),
+      p_imap (imap)
+    {}
+
+    /*!
+     * Find the intersections of the two given curves and insert them to the
+     * given output iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      return (cv1.intersect (cv2, *p_imap, *p_cache, oi));
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return (Intersect_2 (p_cache, p_inter_map));
+  }
+
+  /*! \class Are_mergeable_2
+   * The Are_mergeable_2 functor.
+   */
+  class Are_mergeable_2
+  {
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable - if they are supported
+     *         by the same line and share a common endpoint; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      return (cv1.can_merge_with (cv2));
+    }
+  };
+
+  /*! Get an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object () const
+  {
+    return Are_mergeable_2();
+  }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2
+  {
+    typedef Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
+                                      Nt_traits, Bounding_traits>       Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
+                                           Nt_traits, Bounding_traits>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve (segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2,
+                     X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      c = cv1.merge (cv2);
+      return;
+    }
+  };
+
+  /*! Get a Merge_2 functor object. */
+  Merge_2 merge_2_object () const
+  {
+    return Merge_2(this);
+  }
+
+  //@}
+
+  /// \name Functor definitions for the Boolean set-operation traits.
+  //@{
+
+  /*! \class Compare_endpoints_xy_2
+   * The Compare_endpoints_xy_2 functor.
+   */
+  class Compare_endpoints_xy_2
+  {
+  public:
+    /*!
+     * Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv)
+    {
+      if (cv.is_directed_right())
+        return (SMALLER);
+      else
+        return (LARGER);
+    }
+  };
+
+  /*! Get a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+
+  class Trim_2 {
+    typedef Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
+                                      Nt_traits, Bounding_traits>       Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Trim_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
+                                           Nt_traits, Bounding_traits>;
+    /*!\brief
+     * Returns a trimmed version of an arc
+     *
+     * \param xcv The arc
+     * \param src the new first endpoint
+     * \param tgt the new second endpoint
+     * \return The trimmed arc
+     *
+     * \pre src != tgt
+     * \pre both points must be interior and must lie on \c cv
+     */
+  public:
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
+                                  const Point_2& src,
+                                  const Point_2& tgt) const
+    {
+      // make functor objects
+      CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x_2 =
+                             m_traits.compare_y_at_x_2_object());
+      CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object());
+      Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
+      // Check whether source and taget are two distinct points and they lie
+      // on the line.
+      CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL);
+      CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL);
+      CGAL_precondition(! equal_2(src, tgt));
+
+      //check if the orientation conforms to the src and tgt.
+      if( xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER)
+        return (xcv.trim(tgt, src));
+      else if(! xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER)
+        return (xcv.trim(tgt, src));
+      else return (xcv.trim(src, tgt));
+    }
+  };
+
+  /*! Obtain a Trim_2 functor object. */
+  Trim_2 trim_2_object() const { return Trim_2(*this); }
+
+  /*! \class Construct_opposite_2
+   * The Construct_opposite_2 functor.
+   */
+  class Construct_opposite_2
+  {
+  public:
+
+    /*!
+     * Construct an opposite x-monotone curve (with swapped source and target).
+     * \param cv The curve.
+     * \return The opposite curve.
+     */
+    X_monotone_curve_2 operator() (const X_monotone_curve_2& cv)
+    {
+      return (cv.flip());
+    }
+  };
+
+  /*! Get a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2();
+  }
+
+  //@}
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_accessor.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_accessor.h
new file mode 100644
index 0000000..0120dca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_accessor.h
@@ -0,0 +1,948 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+//                 Efi Fogel         <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_ACCESSOR_H
+#define CGAL_ARR_ACCESSOR_H
+
+/*! \file
+ * Definition of the Arr_accessor<Arrangement> class.
+ */
+
+#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * A class that provides access to some of the internal arrangement operations.
+ * Used mostly by the global insertion functions and by the sweep-line visitors
+ * for utilizing topological and geometrical information available during the
+ * algorithms they perform.
+ * The Arrangement parameter corresponds to an arrangement instantiation
+ * (of the template Arrangement_on_surface_2).
+ */
+template <typename Arrangement_>
+class Arr_accessor {
+public:
+  typedef Arrangement_                                  Arrangement_2;
+  typedef Arr_accessor<Arrangement_2>                   Self;
+
+  typedef typename Arrangement_2::Size                  Size;
+  typedef typename Arrangement_2::Point_2               Point_2;
+  typedef typename Arrangement_2::X_monotone_curve_2    X_monotone_curve_2;
+
+  typedef typename Arrangement_2::Vertex_handle         Vertex_handle;
+  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
+  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
+  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
+  typedef typename Arrangement_2::Face_handle           Face_handle;
+  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  typedef typename Arrangement_2::Ccb_halfedge_circulator
+                                                        Ccb_halfedge_circulator;
+
+private:
+  typedef typename Arrangement_2::DVertex               DVertex;
+  typedef typename Arrangement_2::DHalfedge             DHalfedge;
+  typedef typename Arrangement_2::DFace                 DFace;
+  typedef typename Arrangement_2::DOuter_ccb            DOuter_ccb;
+  typedef typename Arrangement_2::DInner_ccb            DInner_ccb;
+  typedef typename Arrangement_2::DIso_vertex           DIso_vertex;
+
+private:
+  Arrangement_2* p_arr;           // The associated arrangement.
+
+public:
+
+  /*! Constructor with an associated arrangement. */
+  Arr_accessor(Arrangement_2& arr) : p_arr(&arr) {}
+
+  /* Get the arrangement. */
+  Arrangement_2& arrangement() { return (*p_arr); }
+
+  /* Get the arrangement (const version). */
+  const Arrangement_2& arrangement() const { return (*p_arr); }
+
+  /// \name Accessing the notification functions (for the global functions).
+  //@{
+
+  /*! Notify that a global operation is about to take place. */
+  void notify_before_global_change() { p_arr->_notify_before_global_change(); }
+
+  /*! Notify that a global operation was completed. */
+  void notify_after_global_change() { p_arr->_notify_after_global_change(); }
+  //@}
+
+  /// \name Local operations and predicates for the arrangement.
+  //@{
+
+  /*!
+   * Locate the arrangement feature that contains the given curve-end.
+   * \param cv The curve.
+   * \param ind ARR_MIN_END if we refer to cv's minimal end;
+   *            ARR_MAX_END if we refer to its maximal end.
+   * \param ps_x The boundary condition in x.
+   * \param ps_y The boundary condition in y.
+   * \pre The relevant end of cv has boundary conditions in x or in y.
+   * \return An object that contains the curve end.
+   *         This object may wrap a Face_const_handle (the general case),
+   *         or a Halfedge_const_handle (in case of an overlap).
+   */
+  CGAL::Object locate_curve_end(const X_monotone_curve_2& cv,
+                                Arr_curve_end ind,
+                                Arr_parameter_space ps_x,
+                                Arr_parameter_space ps_y) const
+  {
+    CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
+
+    // Use the topology traits to locate the unbounded curve end.
+    CGAL::Object obj =
+      p_arr->topology_traits()->locate_curve_end(cv, ind, ps_x, ps_y);
+
+    // Return a handle to the DCEL feature.
+    DFace* f;
+    if (CGAL::assign(f, obj))
+      return (CGAL::make_object(p_arr->_const_handle_for(f)));
+
+    DHalfedge* he;
+    if (CGAL::assign(he, obj))
+      return (CGAL::make_object(p_arr->_const_handle_for(he)));
+
+    DVertex* v;
+    if (CGAL::assign(v, obj))
+      return (CGAL::make_object(p_arr->_const_handle_for(v)));
+
+    // We should never reach here:
+    CGAL_error();
+    return Object();
+  }
+
+  /*!
+   * Locate the place for the given curve around the given vertex.
+   * \param vh A handle for the arrangement vertex.
+   * \param cv The given x-monotone curve.
+   * \pre v is one of cv's endpoints.
+   * \return A handle for a halfedge whose target is v, where cv should be
+   *         inserted between this halfedge and the next halfedge around this
+   *         vertex (in a clockwise order).
+   */
+  Halfedge_handle locate_around_vertex(Vertex_handle vh,
+                                       const X_monotone_curve_2& cv) const
+  {
+    typedef
+      Arr_traits_basic_adaptor_2<typename Arrangement_2::Geometry_traits_2>
+      Traits_adaptor_2;
+
+    const Traits_adaptor_2* m_traits = 
+      static_cast<const Traits_adaptor_2*> (p_arr->geometry_traits());
+
+    Arr_curve_end ind = ARR_MIN_END;
+
+    if (m_traits->is_closed_2_object() (cv, ARR_MAX_END) &&
+        m_traits->equal_2_object()
+        (vh->point(), m_traits->construct_max_vertex_2_object()(cv)))
+    {
+      ind = ARR_MAX_END;
+    }
+
+    DHalfedge* he = p_arr->_locate_around_vertex(p_arr->_vertex (vh), cv, ind);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for (he));
+  }
+
+  /*!
+   * Locate the place for the given curve-end around the given vertex,
+   * which lies on the boundary.
+   * \param vh A handle for the arrangement vertex.
+   * \param cv The curve.
+   * \param ind ARR_MIN_END if we refer to cv's minimal end;
+   *            ARR_MAX_END if we refer to its maximal end.
+   * \param ps_x The boundary condition in x.
+   * \param ps_y The boundary condition in y.
+   * \pre The relevant end of cv has boundary conditions in x or in y.
+   * \return A handle for a halfedge whose target is v, where cv should be
+   *         inserted between this halfedge and the next halfedge around this
+   *         vertex (in a clockwise order).
+   */
+  Halfedge_handle
+      locate_around_boundary_vertex(Vertex_handle vh,
+                                    const X_monotone_curve_2& cv,
+                                    Arr_curve_end ind,
+                                    Arr_parameter_space ps_x,
+                                    Arr_parameter_space ps_y) const
+  {
+    CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
+
+    // Use the topology traits to locate the unbounded curve end.
+    DHalfedge* he = p_arr->topology_traits()->
+      locate_around_boundary_vertex(p_arr->_vertex (vh), cv, ind, ps_x, ps_y);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for (he));
+  }
+
+  /*!
+   * Compute the distance (in halfedges) between two halfedges.
+   * \param e1 A handle for the source halfedge.
+   * \param e2 A handle for the destination halfedge.
+   * \return In case e1 and e2 belong to the same connected component, the 
+   *         function returns number of boundary halfedges between the two 
+   *         halfedges. Otherwise, it returns (-1).
+   */
+  int halfedge_distance(Halfedge_const_handle e1,
+                        Halfedge_const_handle e2) const
+  {
+    // If the two halfedges do not belong to the same component, return (-1).
+    const DHalfedge* he1 = p_arr->_halfedge(e1);
+    const DHalfedge* he2 = p_arr->_halfedge(e2);
+    
+    if (he1 == he2) return (0);
+
+    const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
+    const DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
+    const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+    const DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+
+    if ((oc1 != oc2) || (ic1 != ic2)) return (-1);
+
+    // Compute the distance between the two halfedges.
+    unsigned int dist = p_arr->_halfedge_distance(he1, he2);
+    return (static_cast<int>(dist));
+  }
+
+  /*!
+   * Determine whether a given query halfedge lies in the interior of a new
+   * face we are about to create, by connecting it with another halfedge
+   * using a given x-monotone curve.
+   * \param prev1 A handle for the query halfedge.
+   * \param prev2 The other halfedge we are about to connect with prev1.
+   * \param cv The x-monotone curve we use to connect prev1 and prev2.
+   * \pre prev1 and prev2 belong to the same connected component, and by
+   *      connecting them using cv we form a new face.
+   * \return (true) if prev1 lies in the interior of the face we are about
+   *         to create, (false) otherwise - in which case prev2 must lie
+   *         inside this new face.
+   */
+  bool defines_outer_ccb_of_new_face(Halfedge_handle prev1,
+                                     Halfedge_handle prev2,
+                                     const X_monotone_curve_2& cv) const
+  {
+    return (p_arr->_defines_outer_ccb_of_new_face(p_arr->_halfedge (prev1),
+                                                  p_arr->_halfedge (prev2),
+                                                  cv));
+  }
+
+  /*!
+   * Check if the given vertex represents one of the ends of a given curve.
+   * \param v The vertex.
+   * \param cv The curve.
+   * \param ind ARR_MIN_END if we refer to cv's minimal end;
+   *            ARR_MAX_END if we refer to its maximal end.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \return Whether v represents the left (or right) end of cv.
+   */
+  bool are_equal(Vertex_const_handle v,
+                 const X_monotone_curve_2& cv, Arr_curve_end ind,
+                 Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
+  {
+    return (p_arr->topology_traits()->are_equal(p_arr->_vertex (v),
+                                                cv, ind, ps_x, ps_y));
+  }
+
+  /*!
+   * Check whether the given halfedge lies on the outer boundary of its
+   * incident face.
+   * \param he The given halfedge.
+   * \return (true) in case he lies on the outer boundary of its incident face;
+   *         (false) if he lies on a hole inside this face.
+   */
+  bool is_on_outer_boundary(Halfedge_const_handle he) const
+  {
+    const DHalfedge* p_he = p_arr->_halfedge(he);
+    return (! p_he->is_on_inner_ccb());
+  }
+
+  /*!
+   * Check whether the given halfedge lies on the inner boundary of its
+   * incident face.
+   * \param he The given halfedge.
+   * \return (true) in case he lies on a hole inside its incident face;
+   *         (false) if he lies on the outer boundary of this face.
+   */
+  bool is_on_inner_boundary(Halfedge_const_handle he) const
+  {
+    const DHalfedge* p_he = p_arr->_halfedge (he);
+    return (p_he->is_on_inner_ccb());
+  }
+
+  /*!
+   * Create a new vertex and associate it with the given point.
+   * \param p The point.
+   * \return A handle for the newly created vertex.
+   */
+  Vertex_handle create_vertex(const Point_2& p)
+  {
+    DVertex* v = p_arr->_create_vertex (p);
+    CGAL_assertion(v != NULL);
+    return (p_arr->_handle_for (v));
+  }
+  
+  /*!
+   * Create a new boundary vertex.
+   * \param cv The curve incident to the boundary.
+   * \param ind The relevant curve-end.
+   * \param ps_x The boundary condition in x.
+   * \param by The boundary condition in y.
+   * \param notify Should we send a notification to the topology traits
+   *               on the creation of the vertex (true by default).
+   * \pre Either ps_x or by does not equal ARR_INTERIOR.
+   * \return A handle for the newly created vertex.
+   */
+  Vertex_handle create_boundary_vertex(const X_monotone_curve_2& cv,
+                                       Arr_curve_end ind,
+                                       Arr_parameter_space ps_x,
+                                       Arr_parameter_space ps_y,
+                                       bool notify = true)
+  {
+    DVertex* v = p_arr->_create_boundary_vertex (cv, ind, ps_x, ps_y);
+
+    CGAL_assertion(v != NULL);
+
+    // Notify the topology traits on the creation of the boundary vertex.
+    if (notify)
+      p_arr->topology_traits()->notify_on_boundary_vertex_creation(v, cv, ind,
+                                                                   ps_x, ps_y);
+    return (p_arr->_handle_for(v));
+  }
+
+  /*!
+   * Locate the arrangement features that will be used for inserting the
+   * given curve end, which has a boundary condition, and set a proper vertex
+   * there.
+   * \param f The face that contains the curve end.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param ps_x The boundary condition at the x-coordinate.
+   * \param ps_y The boundary condition at the y-coordinate.
+   * \return A pair of <Vertex_handle, Halfedge_handle>:
+   *         The first element is the vertex that corresponds to the curve end.
+   *         The second is its predecessor halfedge (if valid).
+   */
+  std::pair<Vertex_handle, Halfedge_handle>
+  place_and_set_curve_end(Face_handle f,
+                          const X_monotone_curve_2& cv, Arr_curve_end ind,
+                          Arr_parameter_space ps_x, Arr_parameter_space ps_y)
+  {
+    DHalfedge* pred;
+    DVertex* v = p_arr->_place_and_set_curve_end(p_arr->_face (f), cv, ind,
+                                                 ps_x, ps_y, &pred);
+
+    if (pred == NULL)
+      // No predecessor halfedge, return just the vertex:
+      return (std::make_pair(p_arr->_handle_for(v), Halfedge_handle()));
+
+    // Return a pair of the vertex and predecessor halfedge:
+    return (std::make_pair(p_arr->_handle_for(v), p_arr->_handle_for(pred)));
+  }
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, where the end vertices
+   * are given by the target points of two given halfedges.
+   * The two halfedges should be given such that in case a new face is formed,
+   * it will be the incident face of the halfedge directed from the first
+   * vertex to the second vertex.
+   * \param he_to The reference halfedge pointing to the first vertex.
+   * \param cv the given curve.
+   * \param cv_dir the direction of the curve
+   * \param he_away The reference halfedge pointing away from the second vertex.
+   * \param new_face Output - whether a new face has been created.
+   * \param swapped_predecessors Output - whether roles of prev1 and prev2 have
+   *        been switched
+   * \param allow_swap_of_predecessors - set to false if no swapping should
+   *        take place at all
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve directed from prev1's target to prev2's target.
+   *         In case a new face has been created, it is given as the incident
+   *         face of this halfedge.
+   */
+  Halfedge_handle insert_at_vertices_ex(Halfedge_handle he_to, 
+                                        const X_monotone_curve_2& cv,
+                                        Arr_halfedge_direction cv_dir,
+                                        Halfedge_handle he_away,
+                                        bool& new_face,
+                                        bool& swapped_predecessors,
+                                        bool allow_swap_of_predecessors = true)
+  {
+    DHalfedge* he = p_arr->_insert_at_vertices(p_arr->_halfedge (he_to),
+                                               cv, cv_dir,
+                                               p_arr->_halfedge (he_away),
+                                               new_face, swapped_predecessors,
+                                               allow_swap_of_predecessors);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for(he));
+  }
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that one of its
+   * endpoints corresponds to a given arrangement vertex, given the exact
+   * place for the curve in the circular list around this vertex. The other
+   * endpoint corrsponds to a free vertex (a newly created vertex or an
+   * isolated vertex).
+   * \param he_to The reference halfedge. We should represent cv as a pair
+   *              of edges, one of them should become he_to's successor.
+   * \param cv The given x-monotone curve.
+   * \param cv_dir The direction of the curve.
+   * \param v The free vertex that corresponds to the other endpoint.
+   * \return A handle to one of the halfedges corresponding to the inserted
+   *         curve, whose target is the vertex v.
+   */
+  Halfedge_handle insert_from_vertex_ex(Halfedge_handle he_to,
+                                        const X_monotone_curve_2& cv,
+                                        Arr_halfedge_direction cv_dir, 
+                                        Vertex_handle v)
+  {
+    DVertex* p_v = p_arr->_vertex(v);
+    if (p_v->is_isolated()) {
+      // Remove the isolated vertex record, which will not be isolated any
+      // more.
+      DIso_vertex* iv = p_v->isolated_vertex();
+      DFace* f = iv->face();
+
+      f->erase_isolated_vertex (iv);
+      p_arr->_dcel().delete_isolated_vertex(iv);
+    }
+
+    DHalfedge* he =
+      p_arr->_insert_from_vertex(p_arr->_halfedge(he_to), cv, cv_dir, p_v);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for (he));
+  }
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that both its
+   * endpoints correspond to free arrangement vertices (newly created vertices
+   * or existing isolated vertices), so a new hole is formed in the face
+   * that contains the two vertices.
+   * \param f The face containing the two end vertices.
+   * \param cv The given x-monotone curve.
+   * \param cv_dir The direction of the curve.
+   * \param v1 The free vertex that corresponds to the left endpoint of cv.
+   * \param v2 The free vertex that corresponds to the right endpoint of cv.
+   * \return A handle to one of the halfedges corresponding to the inserted
+   *         curve, directed from v1 to v2.
+   */
+  Halfedge_handle insert_in_face_interior_ex(Face_handle f,
+                                             const X_monotone_curve_2& cv,
+                                             Arr_halfedge_direction cv_dir, 
+                                             Vertex_handle v1,
+                                             Vertex_handle v2)
+  {
+    DVertex* p_v1 = p_arr->_vertex (v1);
+    DVertex* p_v2 = p_arr->_vertex (v2);
+
+    if (p_v1->is_isolated()) {
+      // Remove the isolated vertex record, which will not be isolated any
+      // more.
+      DIso_vertex* iv1 = p_v1->isolated_vertex();
+      DFace* f1 = iv1->face();
+      f1->erase_isolated_vertex(iv1);
+      p_arr->_dcel().delete_isolated_vertex(iv1);
+    }
+
+    if (p_v2->is_isolated()) {
+      // Remove the isolated vertex record, which will not be isolated any
+      // more.
+      DIso_vertex* iv2 = p_v2->isolated_vertex();
+      DFace* f2 = iv2->face();
+      f2->erase_isolated_vertex(iv2);
+      p_arr->_dcel().delete_isolated_vertex(iv2);
+    }
+
+    DHalfedge* he = p_arr->_insert_in_face_interior(p_arr->_face (f),
+                                                    cv, cv_dir, p_v1, p_v2);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for (he));
+  
+  }
+
+  /*!
+   * Insert the given vertex as an isolated vertex inside the given face.
+   * \param f The face that should contain the isolated vertex.
+   * \param v The isolated vertex.
+   */
+  void insert_isolated_vertex(Face_handle f, Vertex_handle v)
+  { p_arr->_insert_isolated_vertex(p_arr->_face (f), p_arr->_vertex(v)); }
+  
+  /*!
+   * Relocate all holes and isolated vertices to their proper position,
+   * immediately after a face has split due to the insertion of a new halfedge.
+   * In case insert_at_vertices_ex() was invoked and indicated that a new face
+   * has been created, this function should be called with the halfedge
+   * returned by insert_at_vertices_ex().
+   * \param new_he The new halfedge that caused the split, such that the new
+   *               face lies to its left and the old face to its right.
+   */
+  void relocate_in_new_face(Halfedge_handle new_he)
+  { p_arr->_relocate_in_new_face (p_arr->_halfedge (new_he)); }
+
+  void relocate_isolated_vertices_in_new_face(Halfedge_handle new_he)
+  {
+    p_arr->_relocate_isolated_vertices_in_new_face(p_arr->_halfedge(new_he));
+  }
+
+  void relocate_holes_in_new_face(Halfedge_handle new_he)
+  { p_arr->_relocate_holes_in_new_face(p_arr->_halfedge(new_he)); }
+
+  /*!
+   * Move an outer CCB from one face to another.
+   * \param from_face The source face.
+   * \param to_face The destination face.
+   * \param ccb A CCB circulator that corresponds to component to move.
+   */
+  void move_outer_ccb(Face_handle from_face, Face_handle to_face,
+                      Ccb_halfedge_circulator ccb)
+  {
+    p_arr->_move_outer_ccb(p_arr->_face(from_face), p_arr->_face(to_face),
+                           p_arr->_halfedge (ccb));
+  }
+
+  /*!
+   * Move an inner CCB from one face to another.
+   * \param from_face The source face.
+   * \param to_face The destination face.
+   * \param ccb A CCB circulator that corresponds to component to move.
+   */
+  void move_inner_ccb (Face_handle from_face, Face_handle to_face,
+                       Ccb_halfedge_circulator ccb)
+  {
+    p_arr->_move_inner_ccb(p_arr->_face(from_face), p_arr->_face(to_face),
+                           p_arr->_halfedge(ccb));
+  }
+  
+  /*!
+   * Move an isolated vertex from one face to another.
+   * \param from_face The source face.
+   * \param to_face The destination face.
+   * \param v The isolated vertex to move.
+   */
+  void move_isolated_vertex(Face_handle from_face, Face_handle to_face,
+                            Vertex_handle v)
+  {
+    p_arr->_move_isolated_vertex(p_arr->_face(from_face),
+                                 p_arr->_face(to_face), p_arr->_vertex(v));
+  }
+
+  /*!
+   * Remove an isolated vertex from its face.
+   * \param v The isolated vertex to remove.
+   */
+  void remove_isolated_vertex_ex (Vertex_handle v)
+  {
+    CGAL_precondition(v->is_isolated());
+    DVertex* iso_v = p_arr->_vertex(v);
+    p_arr->_remove_isolated_vertex(iso_v);
+  }
+
+  /*!
+   * Modify the point associated with a given vertex. The point may be
+   * geometrically different than the one currently associated with the vertex.
+   * \param v The vertex to modify.
+   * \param p The new point to associate with v.
+   * \return A handle for the modified vertex (same as v).
+   */
+  Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p)
+  {
+    p_arr->_modify_vertex(p_arr->_vertex(v), p);
+    return v;
+  }
+        
+  /*!
+   * Modify the x-monotone curve associated with a given edge. The curve may be
+   * geometrically different than the one currently associated with the edge.
+   * \param e The edge to modify.
+   * \param cv The new x-monotone curve to associate with e.
+   * \return A handle for the modified edge (same as e).
+   */
+  Halfedge_handle modify_edge_ex(Halfedge_handle e,
+                                 const X_monotone_curve_2& cv)
+  {
+    p_arr->_modify_edge(p_arr->_halfedge (e), cv);
+    return e;
+  }
+          
+  /*!
+   * Split a given edge into two at a given point, and associate the given
+   * x-monotone curves with the split edges.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param p The split point.
+   * \param cv1 The curve that should be associated with the first split edge,
+   *            whose source equals e's source and its target is p.
+   * \param cv2 The curve that should be associated with the second split edge,
+   *            whose source is p and its target equals e's target.
+   * \return A handle for the first split halfedge, whose source equals the
+   *         source of e, and whose target is the split point.
+   */
+  Halfedge_handle split_edge_ex(Halfedge_handle e, const Point_2& p,
+                                const X_monotone_curve_2& cv1, 
+                                const X_monotone_curve_2& cv2)
+  {
+    DHalfedge* he = p_arr->_split_edge (p_arr->_halfedge(e), p, cv1, cv2);
+
+    CGAL_assertion(he != NULL);
+    return (p_arr->_handle_for(he));
+  }
+
+  /*!
+   * Split a given edge into two at the given vertex, and associate the given
+   * x-monotone curves with the split edges.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param v The split vertex.
+   * \param cv1 The curve that should be associated with the first split edge,
+   *            whose source equals e's source and its target is v's point.
+   * \param cv2 The curve that should be associated with the second split edge,
+   *            whose source is v's point and its target equals e's target.
+   * \return A handle for the first split halfedge, whose source equals the
+   *         source of e, and whose target is the split vertex v.
+   */
+  Halfedge_handle split_edge_ex(Halfedge_handle e, Vertex_handle v,
+                                const X_monotone_curve_2& cv1,
+                                const X_monotone_curve_2& cv2)
+  {
+    DHalfedge* he = p_arr->_split_edge(p_arr->_halfedge(e), p_arr->_vertex(v),
+                                       cv1, cv2);
+
+    CGAL_assertion (he != NULL);
+    return (p_arr->_handle_for(he));
+  }
+
+  /*!
+   * Split a fictitious edge at the given vertex.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param v The split vertex.
+   * \return A handle for the first split halfedge, whose source equals the
+   *         source of e, and whose target is the split vertex v.
+   */
+  Halfedge_handle split_fictitious_edge(Halfedge_handle e, Vertex_handle v)
+  {
+    CGAL_precondition(e->is_fictitious());
+    DHalfedge* he =  
+      p_arr->topology_traits()->split_fictitious_edge(p_arr->_halfedge(e),
+                                                      p_arr->_vertex(v));
+    return (p_arr->_handle_for(he));
+  }
+
+  /*!
+   * Remove a pair of twin halfedges from the arrangement.
+   * \param e A handle for one of the halfedges to be removed.
+   * \param remove_source Should the source vertex of e be removed if it
+   *                      becomes isolated (true by default).
+   * \param remove_target Should the target vertex of e be removed if it
+   *                      becomes isolated (true by default).
+   * \pre In case the removal causes the creation of a new hole, e should 
+   *      point at this hole.
+   * \return A handle for the remaining face.
+   */
+  Face_handle remove_edge_ex(Halfedge_handle e,
+                             bool remove_source = true,
+                             bool remove_target = true)
+  {
+    DFace* f =
+      p_arr->_remove_edge(p_arr->_halfedge (e), remove_source, remove_target);
+    CGAL_assertion(f != NULL);
+    return (p_arr->_handle_for(f));
+  }
+
+  /*!
+   * Check if the two given halfedges lie on the same inner component.
+   * \param e1 A handle for the first halfedge.
+   * \param e2 A handle for the second halfedge.
+   * \return Whether e1 and e2 lie on the same inner component.
+   */
+  bool are_on_same_inner_component(Halfedge_handle e1, Halfedge_handle e2)
+  {
+     DHalfedge* he1 = p_arr->_halfedge(e1);
+     DHalfedge* he2 = p_arr->_halfedge(e2);
+    const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
+    if (ic1 == NULL) return (false);
+    const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+    return (ic1 == ic2);
+  }
+
+  /*!
+   * Check if the two given halfedges lie on the same outer component.
+   * \param e1 A handle for the first halfedge.
+   * \param e2 A handle for the second halfedge.
+   * \return Whether e1 and e2 lie on the same outer component.
+   */
+  bool are_on_same_outer_component(Halfedge_handle e1, Halfedge_handle e2)
+  {
+     DHalfedge* he1 = p_arr->_halfedge(e1);
+     DHalfedge* he2 = p_arr->_halfedge(e2);
+    const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : NULL;
+    if (oc1 == NULL) return (false);
+    const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : NULL;
+    return (oc1 == oc2);
+  }
+  //@}
+
+  /// \name Traversal methods for the BOOST graph traits.
+  //@{
+
+  /*! \class
+   * An iterator for traversing all arrangement vertices, including vertices
+   * at infinity (not including fictitious vertices).
+   */
+  typedef typename Arrangement_2::_Is_valid_vertex       Is_valid_vertex;
+  typedef typename Arrangement_2::_Valid_vertex_iterator Valid_vertex_iterator;
+
+  /*! Get an iterator for the first valid arrangement vertex. */
+  Valid_vertex_iterator valid_vertices_begin()
+  { 
+    return (Valid_vertex_iterator
+            (p_arr->topology_traits()->dcel().vertices_begin(),
+             p_arr->topology_traits()->dcel().vertices_end(),
+             Is_valid_vertex (p_arr->topology_traits()))); 
+  }
+
+  /*! Get a past-the-end iterator for the valid arrangement vertices. */
+  Valid_vertex_iterator valid_vertices_end()
+  { 
+    return (Valid_vertex_iterator
+            (p_arr->topology_traits()->dcel().vertices_end(),
+             p_arr->topology_traits()->dcel().vertices_end(),
+             Is_valid_vertex (p_arr->topology_traits()))); 
+  }
+
+  /*! Get the number of valid arrangement vertices. */
+  Size number_of_valid_vertices() const
+  {
+    return (p_arr->topology_traits()->number_of_valid_vertices());
+  }
+  //@}
+
+  /// \name Functions used by the arrangement reader and writer.
+  //@{
+  typedef typename Arrangement_2::Dcel                Dcel;
+  typedef typename Arrangement_2::DVertex_const_iter  Dcel_vertex_iterator;
+  typedef typename Arrangement_2::DEdge_const_iter    Dcel_edge_iterator;
+  typedef typename Arrangement_2::DFace_const_iter    Dcel_face_iterator;
+  typedef typename Arrangement_2::DOuter_ccb_const_iter
+                                                      Dcel_outer_ccb_iterator;
+  typedef typename Arrangement_2::DInner_ccb_const_iter
+                                                      Dcel_inner_ccb_iterator;
+  typedef typename Arrangement_2::DIso_vertex_const_iter
+                                                      Dcel_iso_vertex_iterator;
+
+  typedef DVertex                                     Dcel_vertex;
+  typedef DHalfedge                                   Dcel_halfedge;
+  typedef DFace                                       Dcel_face;
+  typedef DOuter_ccb                                  Dcel_outer_ccb;
+  typedef DInner_ccb                                  Dcel_inner_ccb;
+  typedef DIso_vertex                                 Dcel_isolated_vertex;
+
+  /*!
+   * Get the arrangement DCEL.
+   */
+  const Dcel& dcel() const { return (p_arr->_dcel()); }
+
+  /*!
+   * Clear the entire arrangment.
+   */
+  void clear_all()
+  {
+    p_arr->clear();
+    p_arr->_dcel().delete_all();
+  }
+
+   /*!
+   * Set the boundary of a vertex
+   * \param p A vertex
+   * \param ps_x The boundary condition at x.
+   * \param ps_y The boundary condition at y.
+   * \return A pointer to the created DCEL vertex.
+   */
+  Dcel_vertex* set_vertex_boundary(const Vertex_handle v,
+                                   Arr_parameter_space ps_x,
+                                   Arr_parameter_space ps_y)
+  {
+    Dcel_vertex* v_to_set = p_arr->_vertex(v);
+    v_to_set->set_boundary(ps_x, ps_y);
+    return (v_to_set);
+  }
+
+  /*!
+   * Create a new vertex.
+   * \param p A pointer to the point (may be NULL in case of a vertex at
+   *          infinity).
+   * \param ps_x The boundary condition at x.
+   * \param ps_y The boundary condition at y.
+   * \return A pointer to the created DCEL vertex.
+   */
+  Dcel_vertex* new_vertex(const Point_2* p,
+                          Arr_parameter_space ps_x, Arr_parameter_space ps_y)
+  {
+    Dcel_vertex* new_v = p_arr->_dcel().new_vertex();
+    if (p != NULL) {
+      typename Dcel::Vertex::Point* p_pt = p_arr->_new_point(*p);
+      new_v->set_point(p_pt);
+    }
+    else
+    {
+      CGAL_precondition (p_arr->is_open(ps_x, ps_y));
+      new_v->set_point (NULL);
+    }
+
+    new_v->set_boundary (ps_x, ps_y);
+    return (new_v);
+  }
+
+  /*!
+   * Create a new edge (halfedge pair), associated with the given curve.
+   * \param cv A pointer to the x-monotone curve (may be NULL in case of
+   *           a fictitious edge).
+   * \return A pointer to one of the created DCEL halfedge.
+   */
+  Dcel_halfedge* new_edge(const X_monotone_curve_2* cv)
+  {
+    Dcel_halfedge* new_he = p_arr->_dcel().new_edge();
+
+    if (cv != NULL) {
+      typename Dcel::Halfedge::X_monotone_curve* p_cv = p_arr->_new_curve(*cv);
+      new_he->set_curve(p_cv);
+    }
+    else new_he->set_curve(NULL);
+    return new_he;
+  }
+
+  /*!
+   * Create a new face.
+   * \return A pointer to the created DCEL face.
+   */
+  Dcel_face* new_face() { return (p_arr->_dcel().new_face()); }
+
+  /*!
+   * Create a new outer CCB.
+   * \return A pointer to the created DCEL outer CCB.
+   */
+  Dcel_outer_ccb* new_outer_ccb() { return (p_arr->_dcel().new_outer_ccb()); }
+
+  /*!
+   * Create a new inner CCB.
+   * \return A pointer to the created DCEL inner CCB.
+   */
+  Dcel_inner_ccb* new_inner_ccb()
+  {  return (p_arr->_dcel().new_inner_ccb()); }
+
+  /*!
+   * Create a new isolated vertex.
+   * \return A pointer to the created DCEL isolated vertex.
+   */
+  Dcel_isolated_vertex* new_isolated_vertex()
+  { return (p_arr->_dcel().new_isolated_vertex()); }
+
+  /*!
+   * Remove a range of vertices
+   */
+  template <typename VertexRange>
+  void delete_vertices(const VertexRange& range)
+  {
+    for(typename VertexRange::const_iterator  it=range.begin(),
+                                              end=range.end();
+                                              it!=end; ++it)
+    {
+      CGAL_assertion(! (*it)->has_null_point());
+      p_arr->_delete_point( (*it)->point() );
+      p_arr->_dcel().delete_vertex( *it );
+    }
+  }
+
+  /*!
+   * Remove a range of edges
+   */
+  template <typename EdgeRange>
+  void delete_edges(const EdgeRange& range)
+  {
+    for(typename EdgeRange::const_iterator  it=range.begin(),
+                                            end=range.end();
+                                            it!=end; ++it)
+    {
+      CGAL_assertion(! (*it)->has_null_curve());
+      p_arr->_delete_curve( (*it)->curve() );
+      p_arr->_dcel().delete_edge( *it );
+    }
+  }
+
+  /*!
+   * Remove a range of faces
+   */
+  template <typename FaceRange>
+  void delete_faces(const FaceRange& range)
+  {
+    for(typename FaceRange::const_iterator  it=range.begin(),
+                                            end=range.end();
+                                            it!=end; ++it)
+    {
+      p_arr->_dcel().delete_face( *it );
+    }
+  }
+
+  /*!
+   * Remove a range of outer ccbs
+   */
+  template <typename CcbRange>
+  void delete_outer_ccbs(const CcbRange& range)
+  {
+    for(typename CcbRange::const_iterator  it=range.begin(),
+                                           end=range.end();
+                                           it!=end; ++it)
+    {
+      p_arr->_dcel().delete_outer_ccb( *it );
+    }
+  }
+
+  /*!
+   * Remove a range of inner ccbs
+   */
+  template <typename CcbRange>
+  void delete_inner_ccbs(const CcbRange& range)
+  {
+    for(typename CcbRange::const_iterator  it=range.begin(),
+                                           end=range.end();
+                                           it!=end; ++it)
+    {
+      p_arr->_dcel().delete_inner_ccb( *it );
+    }
+  }
+
+  /*!
+   * Update the topology traits after the DCEL has been updated.
+   */
+  void dcel_updated() { p_arr->topology_traits()->dcel_updated(); }
+  //@}
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_algebraic_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_algebraic_segment_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_algebraic_segment_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_algebraic_segment_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_batched_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_batched_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_batched_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_batched_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_bounded_planar_topology_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_bounded_planar_topology_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_bounded_planar_topology_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_circle_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_circle_segment_traits_2.h
new file mode 100644
index 0000000..a46d005
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_circle_segment_traits_2.h
@@ -0,0 +1,745 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+//                 Baruch Zukerman   <baruchzu at post.tau.ac.il>
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_CIRCLE_SEGMENT_TRAITS_2_H
+#define CGAL_ARR_CIRCLE_SEGMENT_TRAITS_2_H
+
+/*! \file
+ * The header file for the Arr_circle_segment_traits_2<Kenrel> class.
+ */
+
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
+
+#include <fstream>
+
+namespace CGAL {
+
+/*! \class
+ * A traits class for maintaining an arrangement of circles.
+ */
+template <typename Kernel_, bool Filter = true>
+class Arr_circle_segment_traits_2 {
+public:
+  typedef Kernel_                                        Kernel;
+  typedef typename Kernel::FT                            NT;
+  typedef typename Kernel::Point_2                       Rational_point_2;
+  typedef typename Kernel::Segment_2                     Rational_segment_2;
+  typedef typename Kernel::Circle_2                      Rational_circle_2;
+  typedef _One_root_point_2<NT, Filter>                  Point_2;
+  typedef typename Point_2::CoordNT                      CoordNT;
+  typedef _Circle_segment_2<Kernel, Filter>              Curve_2;
+  typedef _X_monotone_circle_segment_2<Kernel, Filter>   X_monotone_curve_2;
+  typedef unsigned int                                   Multiplicity;
+  typedef Arr_circle_segment_traits_2<Kernel, Filter>    Self;
+
+  // Category tags:
+  typedef Tag_true                                   Has_left_category;
+  typedef Tag_true                                   Has_merge_category;
+  typedef Tag_false                                  Has_do_intersect_category;
+
+  typedef Arr_oblivious_side_tag                     Left_side_category;
+  typedef Arr_oblivious_side_tag                     Bottom_side_category;
+  typedef Arr_oblivious_side_tag                     Top_side_category;
+  typedef Arr_oblivious_side_tag                     Right_side_category;
+
+protected:
+  // Type definition for the intersection points mapping.
+  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
+
+  mutable Intersection_map inter_map;   // Mapping pairs of curve IDs to their
+                                        // intersection points.
+  bool m_use_cache;
+
+public:
+  /*! Default constructor. */
+  Arr_circle_segment_traits_2 (bool use_intersection_caching = false) :
+    m_use_cache(use_intersection_caching)
+  {}
+
+  /*! Get the next curve index. */
+  static unsigned int get_index ()
+  {
+    static unsigned int index = 0;
+    return (++index);
+  }
+
+  /// \name Basic functor definitions.
+  //@{
+
+  class Compare_x_2
+  {
+  public:
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      if (p1.identical (p2))
+        return (EQUAL);
+
+      return (CGAL::compare (p1.x(), p2.x()));
+    }
+  };
+
+  /*! Get a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object () const
+  {
+    return Compare_x_2();
+  }
+
+  class Compare_xy_2
+  {
+  public:
+    /*!
+     * Compares two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      if (p1.identical (p2))
+        return (EQUAL);
+
+      Comparison_result  res = CGAL::compare (p1.x(), p2.x());
+
+      if (res != EQUAL)
+        return (res);
+
+      return (CGAL::compare (p1.y(), p2.y()));
+    }
+  };
+
+  /*! Get a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return Compare_xy_2();
+  }
+
+  class Construct_min_vertex_2
+  {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The left endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.left());
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return Construct_min_vertex_2();
+  }
+
+  class Construct_max_vertex_2
+  {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.right());
+    }
+  };
+
+  /*! Get a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return Construct_max_vertex_2();
+  }
+
+  class Is_vertical_2
+  {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv) const
+    {
+      return (cv.is_vertical());
+    }
+  };
+
+  /*! Get an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object () const
+  {
+    return Is_vertical_2();
+  }
+
+  class Compare_y_at_x_2
+  {
+  public:
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator() (const Point_2& p,
+                                  const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (cv.is_in_x_range (p));
+
+      return (cv.point_position (p));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object () const
+  {
+    return Compare_y_at_x_2();
+  }
+
+  class Compare_y_at_x_right_2
+  {
+  public:
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // right (so their right endpoint is lexicographically larger than p).
+      CGAL_precondition (cv1.point_position (p) == EQUAL &&
+                         cv2.point_position (p) == EQUAL);
+
+      if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
+          (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
+      { //both cv1 and cv2 are vertical
+        CGAL_precondition (!(cv1.right()).equals(p) && !(cv2.right()).equals(p));
+      }
+      else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) != EQUAL) &&
+               (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
+      { //only cv1 is vertical
+        CGAL_precondition (!(cv1.right()).equals(p));
+      }
+      else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
+               (CGAL::compare (cv2.left().x(),cv2.right().x()) != EQUAL))
+      { //only cv2 is vertical
+        CGAL_precondition (!(cv2.right()).equals(p));
+      }
+      else
+      { //both cv1 and cv2 are non vertical
+        CGAL_precondition (CGAL::compare (cv1.right().x(),p.x()) == LARGER &&
+                           CGAL::compare (cv2.right().x(),p.x()) == LARGER);
+      }
+      // Compare the two curves immediately to the right of p:
+      return (cv1.compare_to_right (cv2, p));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
+  {
+    return Compare_y_at_x_right_2();
+  }
+
+  class Compare_y_at_x_left_2
+  {
+  public:
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+
+      CGAL_precondition (cv1.point_position (p) == EQUAL &&
+                         cv2.point_position (p) == EQUAL);
+
+      if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
+          (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
+	  { //both cv1 and cv2 are vertical
+         CGAL_precondition (!(cv1.left()).equals(p) && !(cv2.left()).equals(p));
+	  }
+	  else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) != EQUAL) &&
+                   (CGAL::compare (cv2.left().x(),cv2.right().x()) == EQUAL))
+	  { //only cv1 is vertical
+         CGAL_precondition (!(cv1.left()).equals(p));
+	  }
+	  else if ((CGAL::compare (cv1.left().x(),cv1.right().x()) == EQUAL) &&
+                   (CGAL::compare (cv2.left().x(),cv2.right().x()) != EQUAL))
+	  { //only cv2 is vertical
+         CGAL_precondition (!(cv2.left()).equals(p));
+	  }
+	  else
+	  { //both cv1 and cv2 are non vertical
+        CGAL_precondition (CGAL::compare (cv1.left().x(),p.x()) == SMALLER &&
+                           CGAL::compare (cv2.left().x(),p.x()) == SMALLER);
+	  }
+      // Compare the two curves immediately to the left of p:
+      return (cv1.compare_to_left (cv2, p));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
+  {
+    return Compare_y_at_x_left_2();
+  }
+
+  class Equal_2
+  {
+  public:
+    /*!
+     * Check if the two x-monotone curves are the same (have the same graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      if (&cv1 == &cv2)
+        return (true);
+
+      return (cv1.equals (cv2));
+    }
+
+    /*!
+     * Check if the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      return (p1.equals (p2));
+    }
+  };
+
+  /*! Get an Equal_2 functor object. */
+  Equal_2 equal_2_object () const
+  {
+    return Equal_2();
+  }
+  //@}
+
+  /// \name Functor definitions for supporting intersections.
+  //@{
+
+  class Make_x_monotone_2
+  {
+  private:
+    typedef Arr_circle_segment_traits_2<Kernel_, Filter> Self;
+
+    bool m_use_cache;
+
+  public:
+
+    Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache)
+    {}
+
+    /*!
+     * Cut the given conic curve (ocv.is_in_x_range (p)r conic arc) into x-monotone subcurves
+     * and insert them to the given output iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The returned
+     *           objects are all wrcv.is_in_x_range (p)appers X_monotone_curve_2 objects.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
+    {
+      // Increment the serial number of the curve cv, which will serve as its
+      // unique identifier.
+      unsigned int  index = 0;
+      if(m_use_cache)
+        index = Self::get_index();
+
+      if (cv.orientation() == COLLINEAR)
+      {
+        // The curve is a line segment.
+        *oi = make_object (X_monotone_curve_2 (cv.supporting_line(),
+                                               cv.source(), cv.target(),
+                                               index));
+        ++oi;
+        return (oi);
+      }
+
+      // Check the case of a degenrate circle (a point).
+      const typename Kernel::Circle_2&  circ = cv.supporting_circle();
+      CGAL::Sign   sign_rad = CGAL::sign (circ.squared_radius());
+      CGAL_precondition (sign_rad != NEGATIVE);
+
+      if (sign_rad == ZERO)
+      {
+        // Create an isolated point.
+        *oi = make_object (Point_2 (circ.center().x(), circ.center().y()));
+        ++oi;
+        return (oi);
+      }
+
+      // The curve is circular: compute the to vertical tangency points
+      // of the supporting circle.
+      Point_2         vpts[2];
+      unsigned int    n_vpts = cv.vertical_tangency_points (vpts);
+
+      if (cv.is_full())
+      {
+        CGAL_assertion (n_vpts == 2);
+
+        // Subdivide the circle into two arcs (an upper and a lower half).
+        *oi = make_object (X_monotone_curve_2 (circ,
+                                               vpts[0], vpts[1],
+                                               cv.orientation(),
+                                               index));
+        ++oi;
+
+        *oi = make_object (X_monotone_curve_2 (circ,
+                                               vpts[1], vpts[0],
+                                               cv.orientation(),
+                                               index));
+        ++oi;
+      }
+      else
+      {
+        // Act according to the number of vertical tangency points.
+        if (n_vpts == 2)
+        {
+          // Subdivide the circular arc into three x-monotone arcs.
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 cv.source(), vpts[0],
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 vpts[0], vpts[1],
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 vpts[1], cv.target(),
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+        }
+        else if (n_vpts == 1)
+        {
+          // Subdivide the circular arc into two x-monotone arcs.
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 cv.source(), vpts[0],
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 vpts[0], cv.target(),
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+        }
+        else
+        {
+          CGAL_assertion (n_vpts == 0);
+
+          // The arc is already x-monotone:
+          *oi = make_object (X_monotone_curve_2 (circ,
+                                                 cv.source(), cv.target(),
+                                                 cv.orientation(),
+                                                 index));
+          ++oi;
+        }
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Get a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object () const
+  {
+    return Make_x_monotone_2(m_use_cache);
+  }
+
+  class Split_2
+  {
+  public:
+
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      CGAL_precondition (cv.point_position(p)==EQUAL &&
+      ! p.equals (cv.source()) &&
+      ! p.equals (cv.target()));
+
+      cv.split (p, c1, c2);
+      return;
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return Split_2();
+  }
+
+  class Intersect_2
+  {
+  private:
+
+    Intersection_map&  _inter_map;       // The map of intersection points.
+
+  public:
+
+    /*! Constructor. */
+    Intersect_2 (Intersection_map& map) :
+      _inter_map (map)
+    {}
+
+    /*!
+     * Find the intersections of the two given curves and insert them to the
+     * given output iterator. As two segments may itersect only once, only a
+     * single will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      return (cv1.intersect (cv2, oi, &_inter_map));
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return (Intersect_2 (inter_map));
+  }
+
+  class Are_mergeable_2
+  {
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable - if they are supported
+     *         by the same line and share a common endpoint; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      return (cv1.can_merge_with (cv2));
+    }
+  };
+
+  /*! Get an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object () const
+  {
+    return Are_mergeable_2();
+  }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2
+  {
+  protected:
+    typedef Arr_circle_segment_traits_2<Kernel, Filter> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_circle_segment_traits_2<Kernel, Filter>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2,
+                     X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      c = cv1;
+      c.merge (cv2);
+    }
+  };
+
+  /*! Get a Merge_2 functor object. */
+  Merge_2 merge_2_object () const
+  {
+    return Merge_2(this);
+  }
+
+  class Compare_endpoints_xy_2
+  {
+  public:
+    /*!
+     * compare lexicogrphic the endpoints of a x-monotone curve.
+     * \param cv the curve
+     * \return SMALLER if the curve is directed right, else return SMALLER
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv) const
+    {
+      if(cv.is_directed_right())
+        return(SMALLER);
+      return (LARGER);
+    }
+  };
+
+  /*! Get a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+
+  class Construct_opposite_2
+  {
+  public:
+    /*!
+     * construct an opposite x-monotone curve.
+     * \param cv the curve
+     * \return an opposite x-monotone curve.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const
+    {
+      return cv.construct_opposite();
+    }
+  };
+
+  /*! Get a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2();
+  }
+
+  class Trim_2 {
+  protected:
+    typedef Arr_circle_segment_traits_2<Kernel, Filter> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Trim_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_circle_segment_traits_2<Kernel, Filter>;
+
+  public:
+    /*!\brief
+     * Returns a trimmed version of an arc
+     *
+     * \param xcv The arc
+     * \param src the new first endpoint
+     * \param tgt the new second endpoint
+     * \return The trimmed arc
+     *
+     * \pre src != tgt
+     * \pre both points must be interior and must lie on \c cv
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
+                                  const Point_2& src,
+                                  const Point_2& tgt)const
+    {
+      // make functor objects
+      CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x_2 =
+                             m_traits.compare_y_at_x_2_object());
+      CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object());
+      Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
+      // Check whether source and taget are two distinct points and they lie
+      // on the line.
+      CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL);
+      CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL);
+      CGAL_precondition(! equal_2(src, tgt));
+
+      //check if the orientation conforms to the src and tgt.
+      if( (xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER) ||
+          (! xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER) )
+        return (xcv.trim(tgt, src) );
+      else return (xcv.trim(src, tgt));
+    }
+  };
+
+  /*! Obtain a Trim_2 functor object. */
+  Trim_2 trim_2_object() const { return Trim_2(*this); }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_circular_arc_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_circular_arc_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_circular_arc_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_circular_arc_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_circular_line_arc_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_circular_line_arc_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_circular_line_arc_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_circular_line_arc_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_conic_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_conic_traits_2.h
new file mode 100644
index 0000000..05cd525
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_conic_traits_2.h
@@ -0,0 +1,875 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_CONIC_TRAITS_2_H
+#define CGAL_ARR_CONIC_TRAITS_2_H
+
+/*! \file
+ * The conic traits-class for the arrangement package.
+ */
+
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_geometry_traits/Conic_arc_2.h>
+#include <CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h>
+#include <CGAL/Arr_geometry_traits/Conic_point_2.h>
+
+#include <fstream>
+
+namespace CGAL {
+
+/*!
+ * \class A traits class for maintaining an arrangement of conic arcs (bounded
+ * segments of algebraic curves of degree 2 at most).
+ *
+ * The class is templated with two parameters:
+ * Rat_kernel A kernel that provides the input objects or coefficients.
+ *            Rat_kernel::FT should be an integral or a rational type.
+ * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
+ *            for the coordinates of arrangement vertices, which are algebraic
+ *            numbers of degree up to 4 (preferably it is CORE::Expr).
+ * Nt_traits A traits class for performing various operations on the integer,
+ *           rational and algebraic types.
+ */
+template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_>
+class Arr_conic_traits_2
+{
+public:
+
+  typedef Rat_kernel_                     Rat_kernel;
+  typedef Alg_kernel_                     Alg_kernel;
+  typedef Nt_traits_                      Nt_traits;
+
+  typedef typename Rat_kernel::FT         Rational;
+  typedef typename Rat_kernel::Point_2    Rat_point_2;
+  typedef typename Rat_kernel::Segment_2  Rat_segment_2;
+  typedef typename Rat_kernel::Line_2     Rat_line_2;
+  typedef typename Rat_kernel::Circle_2   Rat_circle_2;
+
+  typedef typename Alg_kernel::FT         Algebraic;
+
+  typedef typename Nt_traits::Integer     Integer;
+
+  typedef Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>  Self;
+
+  // Category tags:
+  typedef Tag_true                        Has_left_category;
+  typedef Tag_true                        Has_merge_category;
+  typedef Tag_false                       Has_do_intersect_category;
+  //typedef boost::true_type                Has_line_segment_constructor;
+
+  typedef Arr_oblivious_side_tag          Left_side_category;
+  typedef Arr_oblivious_side_tag          Bottom_side_category;
+  typedef Arr_oblivious_side_tag          Top_side_category;
+  typedef Arr_oblivious_side_tag          Right_side_category;
+
+  // Traits objects:
+  typedef _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits> Curve_2;
+  typedef _Conic_x_monotone_arc_2<Curve_2>                X_monotone_curve_2;
+  typedef _Conic_point_2<Alg_kernel>                      Point_2;
+  typedef unsigned int                                    Multiplicity;
+
+private:
+
+  // Type definition for the intersection points mapping.
+  typedef typename X_monotone_curve_2::Conic_id           Conic_id;
+  typedef typename X_monotone_curve_2::Intersection_point_2
+                                                          Intersection_point_2;
+  typedef typename X_monotone_curve_2::Intersection_map   Intersection_map;
+
+  mutable Intersection_map  inter_map;  // Mapping conic pairs to their
+                                        // intersection points.
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  Arr_conic_traits_2 ()
+  {}
+
+  /*! Get the next conic index. */
+  static unsigned int get_index ()
+  {
+    static unsigned int index = 0;
+    return (++index);
+  }
+
+  /// \name Basic functor definitions.
+  //@{
+
+  class Compare_x_2
+  {
+  public:
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const
+    {
+      Alg_kernel   ker;
+      return (ker.compare_x_2_object() (p1, p2));
+    }
+  };
+
+  /*! Get a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object () const
+  {
+    return Compare_x_2();
+  }
+
+  class Compare_xy_2
+  {
+  public:
+    /*!
+     * Compares two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      Alg_kernel   ker;
+      return (ker.compare_xy_2_object() (p1, p2));
+    }
+  };
+
+  /*! Get a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return Compare_xy_2();
+  }
+
+  class Construct_min_vertex_2
+  {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The left endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.left());
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return Construct_min_vertex_2();
+  }
+
+  class Construct_max_vertex_2
+  {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2 & cv) const
+    {
+      return (cv.right());
+    }
+  };
+
+  /*! Get a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return Construct_max_vertex_2();
+  }
+
+  class Is_vertical_2
+  {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv) const
+    {
+      return (cv.is_vertical());
+    }
+  };
+
+  /*! Get an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object () const
+  {
+    return Is_vertical_2();
+  }
+
+  class Compare_y_at_x_2
+  {
+  public:
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator() (const Point_2 & p,
+                                  const X_monotone_curve_2 & cv) const
+    {
+      Alg_kernel   ker;
+
+      if (cv.is_vertical())
+      {
+        // A special treatment for vertical segments:
+        // In case p has the same x c-ordinate of the vertical segment, compare
+        // it to the segment endpoints to determine its position.
+        Comparison_result res1 = ker.compare_y_2_object() (p, cv.left());
+        Comparison_result res2 = ker.compare_y_2_object() (p, cv.right());
+
+        if (res1 == res2)
+          return (res1);
+        else
+          return (EQUAL);
+      }
+
+      // Check whether the point is exactly on the curve.
+      if (cv.contains_point(p))
+        return (EQUAL);
+
+      // Get a point q on the x-monotone arc with the same x coordinate as p.
+      Comparison_result  x_res;
+      Point_2            q;
+
+      if ((x_res = ker.compare_x_2_object() (p, cv.left())) == EQUAL)
+      {
+        q = cv.left();
+      }
+      else
+      {
+	CGAL_precondition (x_res != SMALLER);
+
+	if ((x_res = ker.compare_x_2_object() (p, cv.right())) == EQUAL)
+	{
+	  q = cv.right();
+	}
+	else
+	{
+	  CGAL_precondition (x_res != LARGER);
+
+	  q = cv.point_at_x (p);
+	}
+      }
+
+      // Compare p with the a point of the curve with the same x coordinate.
+      return (ker.compare_y_2_object() (p, q));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object () const
+  {
+    return Compare_y_at_x_2();
+  }
+
+  class Compare_y_at_x_left_2
+  {
+  public:
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition (cv1.contains_point (p) &&
+                         cv2.contains_point (p));
+
+      CGAL_precondition_code (
+        Alg_kernel   ker;
+      );
+      CGAL_precondition (ker.compare_xy_2_object() (p,
+                                                    cv1.left()) == LARGER &&
+                         ker.compare_xy_2_object() (p,
+                                                    cv2.left()) == LARGER);
+
+      // If one of the curves is vertical, it is below the other one.
+      if (cv1.is_vertical())
+      {
+        if (cv2.is_vertical())
+          // Both are vertical:
+          return (EQUAL);
+        else
+          return (SMALLER);
+      }
+      else if (cv2.is_vertical())
+      {
+        return (LARGER);
+      }
+
+      // Compare the two curves immediately to the left of p:
+      return (cv1.compare_to_left (cv2, p));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
+  {
+    return Compare_y_at_x_left_2();
+  }
+
+  class Compare_y_at_x_right_2
+  {
+  public:
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition (cv1.contains_point (p) &&
+                         cv2.contains_point (p));
+
+      CGAL_precondition_code (
+        Alg_kernel   ker;
+      );
+
+      CGAL_precondition (ker.compare_xy_2_object() (p,
+                                                    cv1.right()) == SMALLER &&
+                         ker.compare_xy_2_object() (p,
+                                                    cv2.right()) == SMALLER);
+
+      // If one of the curves is vertical, it is above the other one.
+      if (cv1.is_vertical())
+      {
+        if (cv2.is_vertical())
+          // Both are vertical:
+          return (EQUAL);
+        else
+          return (LARGER);
+      }
+      else if (cv2.is_vertical())
+      {
+        return (SMALLER);
+      }
+
+      // Compare the two curves immediately to the right of p:
+      return (cv1.compare_to_right (cv2, p));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
+  {
+    return Compare_y_at_x_right_2();
+  }
+
+  class Equal_2
+  {
+  public:
+    /*!
+     * Check if the two x-monotone curves are the same (have the same graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      if (&cv1 == &cv2)
+        return (true);
+
+      return (cv1.equals (cv2));
+    }
+
+    /*!
+     * Check if the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      if (&p1 == &p2)
+        return (true);
+
+      Alg_kernel   ker;
+      return (ker.compare_xy_2_object() (p1, p2) == EQUAL);
+    }
+  };
+
+  /*! Get an Equal_2 functor object. */
+  Equal_2 equal_2_object () const
+  {
+    return Equal_2();
+  }
+  //@}
+
+  /// \name Functor definitions for supporting intersections.
+  //@{
+
+  class Make_x_monotone_2
+  {
+    typedef Arr_conic_traits_2 <Rat_kernel_, Alg_kernel_, Nt_traits_>    Self;
+  public:
+
+    /*!
+     * Cut the given conic curve (or conic arc) into x-monotone subcurves
+     * and insert them to the given output iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The returned
+     *           objects are all wrappers X_monotone_curve_2 objects.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
+    {
+      // Increment the serial number of the curve cv, which will serve as its
+      // unique identifier.
+      unsigned int  index = Self::get_index();
+      Conic_id      conic_id (index);
+
+      // Find the points of vertical tangency to cv and act accordingly.
+      typename Curve_2::Point_2  vtan_ps[2];
+      int                        n_vtan_ps;
+
+      n_vtan_ps = cv.vertical_tangency_points (vtan_ps);
+
+      if (n_vtan_ps == 0)
+      {
+        // In case the given curve is already x-monotone:
+        *oi = make_object (X_monotone_curve_2 (cv, conic_id));
+        ++oi;
+        return (oi);
+      }
+
+      // Split the conic arc into x-monotone sub-curves.
+      if (cv.is_full_conic())
+      {
+        // Make sure we have two vertical tangency points.
+        CGAL_assertion(n_vtan_ps == 2);
+
+        // In case the curve is a full conic, split it into two x-monotone
+        // arcs, one going from ps[0] to ps[1], and the other from ps[1] to
+        // ps[0].
+        *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[0], vtan_ps[1],
+                                               conic_id));
+        ++oi;
+        *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[1], vtan_ps[0],
+                                               conic_id));
+        ++oi;
+      }
+      else
+      {
+        if (n_vtan_ps == 1)
+        {
+          // Split the arc into two x-monotone sub-curves: one going from the
+          // arc source to ps[0], and the other from ps[0] to the target.
+          *oi = make_object (X_monotone_curve_2 (cv, cv.source(), vtan_ps[0],
+                                                 conic_id));
+          ++oi;
+          *oi = make_object (X_monotone_curve_2 (cv, vtan_ps[0], cv.target(),
+                                                 conic_id));
+          ++oi;
+        }
+        else
+        {
+          CGAL_assertion (n_vtan_ps == 2);
+
+          // Identify the first point we encounter when going from cv's source
+          // to its target, and the second point we encounter. Note that the
+          // two endpoints must both be below the line connecting the two
+          // tangnecy points (or both lies above it).
+          int                   ind_first = 0;
+          int                   ind_second = 1;
+          Alg_kernel_           ker;
+          typename Alg_kernel_::Line_2  line =
+            ker.construct_line_2_object() (vtan_ps[0], vtan_ps[1]);
+          const Comparison_result       start_pos =
+            ker.compare_y_at_x_2_object() (cv.source(), line);
+          const Comparison_result       order_vpts =
+            ker.compare_x_2_object() (vtan_ps[0], vtan_ps[1]);
+
+          CGAL_assertion (start_pos != EQUAL &&
+                          ker.compare_y_at_x_2_object() (cv.target(),
+                                                         line) == start_pos);
+          CGAL_assertion (order_vpts != EQUAL);
+
+          if ((cv.orientation() == COUNTERCLOCKWISE &&
+               start_pos == order_vpts) ||
+              (cv.orientation() == CLOCKWISE &&
+               start_pos != order_vpts))
+          {
+            ind_first = 1;
+            ind_second = 0;
+          }
+
+          // Split the arc into three x-monotone sub-curves.
+          *oi = make_object (X_monotone_curve_2 (cv,
+                                                 cv.source(),
+                                                 vtan_ps[ind_first],
+                                                 conic_id));
+          ++oi;
+
+          *oi = make_object (X_monotone_curve_2 (cv,
+                                                 vtan_ps[ind_first],
+                                                 vtan_ps[ind_second],
+                                                 conic_id));
+          ++oi;
+
+          *oi = make_object (X_monotone_curve_2 (cv,
+                                                 vtan_ps[ind_second],
+                                                 cv.target(),
+                                                 conic_id));
+          ++oi;
+        }
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Get a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object () const
+  {
+    return Make_x_monotone_2();
+  }
+
+  class Split_2
+  {
+  public:
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      cv.split (p, c1, c2);
+      return;
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return Split_2();
+  }
+
+  class Intersect_2
+  {
+  private:
+
+    Intersection_map&  _inter_map;       // The map of intersection points.
+
+  public:
+
+    /*! Constructor. */
+    Intersect_2 (Intersection_map& map) :
+      _inter_map (map)
+    {}
+
+    /*!
+     * Find the intersections of the two given curves and insert them to the
+     * given output iterator. As two segments may itersect only once, only a
+     * single will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      return (cv1.intersect (cv2, _inter_map, oi));
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return (Intersect_2 (inter_map));
+  }
+
+  class Are_mergeable_2
+  {
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable - if they are supported
+     *         by the same line and share a common endpoint; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      return (cv1.can_merge_with (cv2));
+    }
+  };
+
+  /*! Get an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object () const
+  {
+    return Are_mergeable_2();
+  }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2
+  {
+  protected:
+    typedef Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>       Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve (segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2,
+                     X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      c = cv1;
+      c.merge (cv2);
+    }
+  };
+
+  /*! Obtain a Merge_2 functor object. */
+  Merge_2 merge_2_object() const
+  {
+    return Merge_2(this);
+  }
+
+  //@}
+
+  /// \name Functor definitions for the landmarks point-location strategy.
+  //@{
+  typedef double                          Approximate_number_type;
+
+  class Approximate_2
+  {
+  public:
+
+    /*!
+     * Return an approximation of a point coordinate.
+     * \param p The exact point.
+     * \param i The coordinate index (either 0 or 1).
+     * \pre i is either 0 or 1.
+     * \return An approximation of p's x-coordinate (if i == 0), or an
+     *         approximation of p's y-coordinate (if i == 1).
+     */
+    Approximate_number_type operator() (const Point_2& p,
+                                        int i) const
+    {
+      CGAL_precondition (i == 0 || i == 1);
+
+      if (i == 0)
+	return (CGAL::to_double(p.x()));
+      else
+	return (CGAL::to_double(p.y()));
+    }
+  };
+
+  /*! Get an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object () const
+  {
+    return Approximate_2();
+  }
+
+  class Construct_x_monotone_curve_2
+  {
+  public:
+
+    /*!
+     * Return an x-monotone curve connecting the two given endpoints.
+     * \param p The first point.
+     * \param q The second point.
+     * \pre p and q must not be the same.
+     * \return A segment connecting p and q.
+     */
+    X_monotone_curve_2 operator() (const Point_2& p,
+                                   const Point_2& q) const
+    {
+      return (X_monotone_curve_2 (p, q));
+    }
+  };
+
+  /*! Get a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
+  {
+    return Construct_x_monotone_curve_2();
+  }
+  //@}
+
+  /// \name Functor definitions for the Boolean set-operation traits.
+  //@{
+
+  class Compare_endpoints_xy_2
+  {
+  public:
+
+    /*!
+     * Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv) const
+    {
+      if (cv.is_directed_right())
+        return (SMALLER);
+      else
+	return (LARGER);
+    }
+  };
+
+  /*! Get a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+
+  class Construct_opposite_2
+  {
+  public:
+
+    /*!
+     * Construct an opposite x-monotone (with swapped source and target).
+     * \param cv The curve.
+     * \return The opposite curve.
+     */
+    X_monotone_curve_2 operator() (const X_monotone_curve_2& cv) const
+    {
+      return (cv.flip());
+    }
+  };
+
+  /*! Get a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2();
+  }
+
+  class Trim_2
+  {
+  protected:
+    typedef Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>       Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Trim_2(const Traits& traits) : m_traits(traits) {}
+
+  public:
+    friend class Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>;
+    /*!\brief
+     * Returns a trimmed version of an arc
+     *
+     * \param xcv The arc
+     * \param src the new first endpoint
+     * \param tgt the new second endpoint
+     * \return The trimmed arc
+     *
+     * \pre src != tgt
+     * \pre both points must be interior and must lie on \c cv
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
+                                  const Point_2& src,
+                                  const Point_2& tgt)const
+    {
+      // make functor objects
+      CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x_2 =
+                             m_traits.compare_y_at_x_2_object());
+      CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object());
+      Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
+      // Check  whether source and taget are two distinct points and they lie
+      // on the line.
+      CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL);
+      CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL);
+      CGAL_precondition(! equal_2(src, tgt));
+
+      //check if the orientation conforms to the src and tgt.
+      if( (xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER) ||
+          (! xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER) )
+        return (xcv.trim(tgt, src));
+      else return (xcv.trim(src, tgt));
+    }
+  };
+
+  /*! Obtain a Trim_2 functor object. */
+  Trim_2 trim_2_object() const { return Trim_2(*this); }
+  //@}
+};
+
+} //namespace CGAL
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_consolidated_curve_data_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_consolidated_curve_data_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_consolidated_curve_data_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_consolidated_curve_data_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_counting_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_counting_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_counting_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_counting_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_curve_data_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_curve_data_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_curve_data_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_curve_data_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_dcel_base.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_dcel_base.h
new file mode 100644
index 0000000..0b9f1d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_dcel_base.h
@@ -0,0 +1,1418 @@
+// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein <wein at post.tau.ac.il>
+//                 (based on old version by: Iddo Hanniel and Oren Nechushtan)
+
+#ifndef CGAL_ARR_DCEL_BASE_H
+#define CGAL_ARR_DCEL_BASE_H
+
+/*! \file
+ * The definition of the base DCEL class for planar arrangements and its
+ * peripheral records.
+ */
+
+#include <CGAL/basic.h>
+#include <CGAL/Arr_enums.h>
+#include <list>
+#include <map>
+#include <CGAL/N_step_adaptor_derived.h>
+#include <CGAL/In_place_list.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
+#include <CGAL/assertions.h>
+
+
+namespace CGAL {
+
+inline void* _clean_pointer(const void* p)
+{
+  CGAL_static_assertion(sizeof(void*) == sizeof(size_t));
+  const size_t  mask = ~1;
+  const size_t  val = (reinterpret_cast<size_t>(p) & mask);
+
+  return (reinterpret_cast<void*>(val));
+}
+
+inline void* _set_lsb(const void* p)
+{
+  const size_t  mask = 1;
+  const size_t  val = (reinterpret_cast<size_t>(p) | mask);
+  return (reinterpret_cast<void*>( val));
+}
+
+inline bool _is_lsb_set(const void* p)
+{
+  const size_t  mask = 1;
+  const size_t  val = reinterpret_cast<size_t>(p);
+  return ((val & mask) != 0);
+}
+
+/*! \class
+ * Base vertex class.
+ */
+template <typename Point_> class Arr_vertex_base {
+public:
+  typedef Point_       Point;
+
+  /*! \struct
+   * An auxiliary structure for rebinding the vertex with a new point class.
+   */
+  template<typename PNT> struct rebind { typedef Arr_vertex_base<PNT> other; };
+
+protected:
+  void* p_inc;  // An incident halfedge pointing at the vertex,
+                // or the isolated vertex information (in case it is
+                // isolated). The LSB of the pointer indicates whether
+                // the vertex is isolated.
+  Point* p_pt;  // The point associated with the vertex.
+  char pss[2];  // The x and y parameter spaces (condensed in two bytes).
+
+public:
+  /*! Default constructor. */
+  Arr_vertex_base() :
+    p_inc(NULL),
+    p_pt(NULL)
+  { pss[0] = pss[1] = static_cast<char>(CGAL::ARR_INTERIOR); }
+
+  /*! Destructor. */
+  virtual ~Arr_vertex_base() {}
+
+  /*! Check if the point pointer is NULL. */
+  bool has_null_point() const { return (p_pt == NULL); }
+
+  /*! Get the point (const version). */
+  const Point& point() const
+  {
+    CGAL_assertion(p_pt != NULL);
+    return (*p_pt);
+  }
+
+  /*! Get the point (non-const version). */
+  Point& point()
+  {
+    CGAL_assertion(p_pt != NULL);
+    return (*p_pt);
+  }
+
+  /*! Set the point (may be a NULL point). */
+  void set_point(Point* p) { p_pt = p; }
+
+  /*! Get the boundary type in x. */
+  Arr_parameter_space parameter_space_in_x() const
+  { return (Arr_parameter_space(pss[0])); }
+
+  /*! Get the boundary type in y. */
+  Arr_parameter_space parameter_space_in_y() const
+  { return (Arr_parameter_space(pss[1])); }
+
+  /*! Set the boundary conditions of the vertex. */
+  void set_boundary(Arr_parameter_space ps_x, Arr_parameter_space ps_y)
+  {
+    pss[0] = static_cast<char>(ps_x);
+    pss[1] = static_cast<char>(ps_y);
+    return;
+  }
+
+  /*! Assign from another vertex. */
+  virtual void assign(const Arr_vertex_base<Point>& v)
+  {
+    p_pt = v.p_pt;
+    pss[0] = v.pss[0];
+    pss[1] = v.pss[1];
+  }
+};
+
+/*! \class
+ * Base halfedge class.
+ */
+template <typename X_monotone_curve_> class Arr_halfedge_base {
+public:
+  typedef X_monotone_curve_  X_monotone_curve;
+
+  /*! \struct
+   * An auxiliary structure for rebinding the halfedge with a new curve class.
+   */
+  template<typename XCV>
+  struct rebind { typedef Arr_halfedge_base<XCV> other; };
+
+protected:
+  void* p_opp;  // The opposite halfedge.
+  void* p_prev; // The previous halfedge in the component boundary.
+  void* p_next; // The next halfedge in the component boundary.
+
+  void* p_v;    // The incident vertex (the target of the halfedge).
+                // The LSB of this pointer is used to store the
+                // direction of the halfedge.
+  void* p_comp; // The component this halfedge belongs to: the incident
+                // face for outer CCBs and the inner CCB information for
+                // inner CCBs. The LSB of the pointer indicates whether
+                // the halfedge lies on the boundary of an inner CCB.
+
+  X_monotone_curve* p_cv; // The associated x-monotone curve.
+
+public:
+  /*! Default constructor */
+  Arr_halfedge_base() :
+    p_opp(NULL),
+    p_prev(NULL),
+    p_next(NULL),
+    p_v(NULL),
+    p_comp(NULL),
+    p_cv(NULL)
+  {}
+
+  /*! Destructor. */
+  virtual ~Arr_halfedge_base() {}
+
+  /*! Check if the curve pointer is NULL. */
+  bool has_null_curve() const { return (p_cv == NULL); }
+
+  /*! Get the x-monotone curve (const version). */
+  const X_monotone_curve& curve() const
+  {
+    CGAL_precondition(p_cv != NULL);
+    return (*p_cv);
+  }
+
+  /*! Get the x-monotone curve (non-const version). */
+  X_monotone_curve& curve()
+  {
+    CGAL_precondition(p_cv != NULL);
+    return (*p_cv);
+  }
+
+  /*! Set the x-monotone curve. */
+  void set_curve(X_monotone_curve* c)
+  {
+    p_cv = c;
+
+    // Set the curve for the opposite halfedge as well.
+    Arr_halfedge_base<X_monotone_curve>* opp =
+      reinterpret_cast<Arr_halfedge_base<X_monotone_curve>* >(p_opp);
+
+    opp->p_cv = c;
+  }
+
+  /*! Assign from another halfedge. */
+  virtual void assign(const Arr_halfedge_base<X_monotone_curve>& he)
+  { p_cv = he.p_cv; }
+};
+
+/*!
+ * Base face class.
+ */
+class Arr_face_base
+{
+public:
+  typedef std::list<void*>                      Outer_ccbs_container;
+  typedef Outer_ccbs_container::iterator        Outer_ccb_iterator;
+  typedef Outer_ccbs_container::const_iterator  Outer_ccb_const_iterator;
+
+  typedef std::list<void*>                      Inner_ccbs_container;
+  typedef Inner_ccbs_container::iterator        Inner_ccb_iterator;
+  typedef Inner_ccbs_container::const_iterator  Inner_ccb_const_iterator;
+
+  typedef std::list<void*>                      Isolated_vertices_container;
+  typedef Isolated_vertices_container::iterator Isolated_vertex_iterator;
+  typedef Isolated_vertices_container::const_iterator
+                                                Isolated_vertex_const_iterator;
+
+protected:
+  enum {
+    IS_UNBOUNDED = 1,
+    IS_FICTITIOUS = 2
+  };
+
+  int                          flags;      // Face flags.
+  Outer_ccbs_container         outer_ccbs; // The outer CCBs of the faces.
+  Inner_ccbs_container         inner_ccbs; // The inner CCBs of the face.
+  Isolated_vertices_container  iso_verts;  // The isolated vertices inside
+                                           // the face.
+public:
+  /*! Default constructor. */
+  Arr_face_base() : flags(0) {}
+
+  /*! Destructor. */
+  virtual ~Arr_face_base() {}
+
+  /*! Check if the face is unbounded. */
+  bool is_unbounded() const { return ((flags & IS_UNBOUNDED) != 0); }
+
+  /*! Set the face as bounded or unbounded. */
+  void set_unbounded(bool unbounded)
+  { flags = (unbounded) ? (flags | IS_UNBOUNDED) : (flags & ~IS_UNBOUNDED); }
+
+  /*! Check if the face is fictitious. */
+  bool is_fictitious() const { return ((flags & IS_FICTITIOUS) != 0); }
+
+  /*! Set the face as fictitious or valid. */
+  void set_fictitious(bool fictitious)
+  { flags = (fictitious) ? (flags | IS_FICTITIOUS) : (flags & ~IS_FICTITIOUS); }
+
+  /*! Assign from another face. */
+  virtual void assign(const Arr_face_base& f) { flags = f.flags; }
+};
+
+// Forward declarations:
+template <class V, class H, class F> class Arr_vertex;
+template <class V, class H, class F> class Arr_halfedge;
+template <class V, class H, class F> class Arr_face;
+template <class V, class H, class F> class Arr_outer_ccb;
+template <class V, class H, class F> class Arr_inner_ccb;
+template <class V, class H, class F> class Arr_isolated_vertex;
+
+/*! \class
+ * The default arrangement DCEL vertex class.
+ */
+template <class V, class H, class F>
+class Arr_vertex : public V, public In_place_list_base<Arr_vertex<V,H,F> >
+{
+public:
+
+  typedef V                           Base;
+  typedef Arr_vertex<V,H,F>           Vertex;
+  typedef Arr_halfedge<V,H,F>         Halfedge;
+  typedef Arr_isolated_vertex<V,H,F>  Isolated_vertex;
+
+  /*! Default constructor. */
+  Arr_vertex() {}
+
+  /*! Check if the vertex is isolated. */
+  bool is_isolated() const
+  {
+    // Note that we use the LSB of the p_inc pointer as a Boolean flag.
+    return (_is_lsb_set(this->p_inc));
+  }
+
+  /*! Get an incident halfedge (const version). */
+  const Halfedge* halfedge() const
+  {
+    CGAL_precondition(! is_isolated());
+    return (reinterpret_cast<const Halfedge*>(this->p_inc));
+  }
+
+  /*! Get an incident halfedge (non-const version). */
+  Halfedge* halfedge()
+  {
+    CGAL_precondition(! is_isolated());
+    return (reinterpret_cast<Halfedge*>(this->p_inc));
+  }
+
+  /*! Set an incident halfedge (for non-isolated vertices). */
+  void set_halfedge(Halfedge* he)
+  {
+    // Set the halfedge pointer and reset the LSB.
+    this->p_inc = he;
+  }
+
+  /*! Get the isolated vertex information (const version). */
+  const Isolated_vertex* isolated_vertex() const
+  {
+    CGAL_precondition(is_isolated());
+    return (reinterpret_cast<const Isolated_vertex*>(_clean_pointer
+                                                     (this->p_inc)));
+  }
+
+  /*! Get the isolated vertex information (non-const version). */
+  Isolated_vertex* isolated_vertex()
+  {
+    CGAL_precondition(is_isolated());
+    return (reinterpret_cast<Isolated_vertex*>(_clean_pointer(this->p_inc)));
+  }
+
+  /*! Set the isolated vertex information. */
+  void set_isolated_vertex(Isolated_vertex* iv)
+  {
+    // Set the isolated vertex-information pointer and set its LSB.
+    this->p_inc = _set_lsb(iv);
+  }
+};
+
+/*! \class
+ * The default arrangement DCEL halfedge class.
+ */
+template <class V, class H, class F>
+class Arr_halfedge : public H,
+                     public In_place_list_base<Arr_halfedge<V,H,F> >
+{
+public:
+  typedef H                     Base;
+  typedef Arr_vertex<V,H,F>     Vertex;
+  typedef Arr_halfedge<V,H,F>   Halfedge;
+  typedef Arr_face<V,H,F>       Face;
+  typedef Arr_outer_ccb<V,H,F>  Outer_ccb;
+  typedef Arr_inner_ccb<V,H,F>  Inner_ccb;
+
+  /*! Default constructor. */
+  Arr_halfedge() {}
+
+  /*! Get the opposite halfedge (const version). */
+  const Halfedge* opposite () const
+  { return (reinterpret_cast<const Halfedge*>(this->p_opp)); }
+
+  /*! Get the opposite halfedge (non-const version). */
+  Halfedge* opposite() { return (reinterpret_cast<Halfedge*>(this->p_opp)); }
+
+  /*! Sets the opposite halfedge. */
+  void set_opposite(Halfedge* he) { this->p_opp = he; }
+
+  /*! Get the direction of the halfedge. */
+  Arr_halfedge_direction direction() const
+  {
+    // Note that we use the LSB of the p_v pointer as a Boolean flag.
+    if (_is_lsb_set(this->p_v)) return (ARR_LEFT_TO_RIGHT);
+    else return (ARR_RIGHT_TO_LEFT);
+  }
+
+  /*! Set the direction of the edge (and of its opposite halfedge). */
+  void set_direction(Arr_halfedge_direction dir)
+  {
+    Halfedge* opp = reinterpret_cast<Halfedge*>(this->p_opp);
+
+    if (dir == ARR_LEFT_TO_RIGHT) {
+      this->p_v = _set_lsb(this->p_v);
+      opp->p_v = _clean_pointer(opp->p_v);
+    }
+    else {
+      this->p_v = _clean_pointer(this->p_v);
+      opp->p_v = _set_lsb(opp->p_v);
+    }
+  }
+
+  /*! Get the previous halfedge along the chain (const version). */
+  const Halfedge* prev() const
+  { return (reinterpret_cast<const Halfedge*>(this->p_prev)); }
+
+  /*! Get the previous halfedge along the chain (const version). */
+  Halfedge* prev() { return (reinterpret_cast<Halfedge*>(this->p_prev)); }
+
+  /*! Set the previous halfedge along the chain. */
+  void set_prev(Halfedge* he)
+  {
+    this->p_prev = he;
+    he->p_next = this;
+  }
+
+  /*! Get the next halfedge along the chain (const version). */
+  const Halfedge* next() const
+  { return (reinterpret_cast<const Halfedge*>(this->p_next)); }
+
+  /*! Get the next halfedge along the chain (const version). */
+  Halfedge* next() { return (reinterpret_cast<Halfedge*>(this->p_next)); }
+
+  /*! Set the next halfedge along the chain. */
+  void set_next(Halfedge* he)
+  {
+    this->p_next = he;
+    he->p_prev = this;
+  }
+
+  /*! Get the target vertex (const version). */
+  const Vertex* vertex() const
+  { return (reinterpret_cast<const Vertex*>(_clean_pointer(this->p_v))); }
+
+  /*! Get the target vertex (non-const version). */
+  Vertex* vertex()
+  { return (reinterpret_cast<Vertex*>(_clean_pointer(this->p_v))); }
+
+  /*! Set the target vertex. */
+  void set_vertex(Vertex* v)
+  {
+    // Set the vertex pointer, preserving the content of the LSB.
+    if (_is_lsb_set(this->p_v)) this->p_v = _set_lsb(v);
+    else this->p_v = v;
+  }
+
+  /*! Check whether the halfedge lies on the boundary of an outer CCB. */
+  bool is_on_outer_ccb() const { return (!_is_lsb_set(this->p_comp)); }
+
+  /*! Get an incident outer CCB (const version).
+   * \pre The edge does not lie on an inner CCB.
+   */
+  const Outer_ccb* outer_ccb() const
+  {
+    CGAL_precondition(! is_on_inner_ccb());
+    return (reinterpret_cast<const Outer_ccb*>(this->p_comp));
+  }
+
+  /*! Get an incident outer CCB (non-const version).
+   * \pre The edge does not lie on an inner CCB.
+   */
+  Outer_ccb* outer_ccb()
+  {
+    CGAL_precondition(! is_on_inner_ccb());
+    return (reinterpret_cast<Outer_ccb*>(this->p_comp));
+  }
+
+  /*! Set the incident outer CCB. */
+  void set_outer_ccb(Outer_ccb *oc)
+  {
+    // Set the component pointer and reset its LSB.
+    this->p_comp = oc;
+  }
+
+  /*! Check whether the halfedge lies on the boundary of an inner CCB. */
+  bool is_on_inner_ccb() const { return (_is_lsb_set(this->p_comp)); }
+
+  /*! Get an incident inner CCB (const version).
+   * \pre The edge lies on an inner CCB.
+   */
+  const Inner_ccb* inner_ccb() const
+  {
+    CGAL_precondition(is_on_inner_ccb());
+    return (reinterpret_cast<const Inner_ccb*>(_clean_pointer(this->p_comp)));
+  }
+
+  /*! Get an incident inner CCB (non-const version).
+   * \pre The edge lies on an inner CCB.
+   */
+  Inner_ccb* inner_ccb()
+  {
+    CGAL_precondition(is_on_inner_ccb());
+    return (reinterpret_cast<Inner_ccb*>(_clean_pointer(this->p_comp)));
+  }
+
+  /*! Set the incident inner CCB. */
+  void set_inner_ccb(Inner_ccb *ic)
+  {
+    // Set the component pointer and set its LSB.
+    this->p_comp = _set_lsb(ic);
+  }
+};
+
+/*! \class
+ * The default arrangement DCEL face class.
+ */
+template <class V, class H, class F>
+class Arr_face : public F,
+                 public In_place_list_base<Arr_face<V,H,F> >
+{
+public:
+  typedef F                            Base;
+  typedef Arr_vertex<V,H,F>            Vertex;
+  typedef Arr_halfedge<V,H,F>          Halfedge;
+  typedef Arr_face<V,H,F>              Face;
+  typedef Arr_outer_ccb<V,H,F>         Outer_ccb;
+  typedef Arr_inner_ccb<V,H,F>         Inner_ccb;
+  typedef Arr_isolated_vertex<V,H,F>   Isolated_vertex;
+
+  typedef Inner_ccb                    Hole;
+
+private:
+  typedef Cast_function_object<void*, Halfedge*> _Ccb_to_halfedge_cast;
+  // typedef Cast_function_object<const void*, const Halfedge*>
+  //                                             _Const_ccb_to_halfedge_cast;
+  typedef _Ccb_to_halfedge_cast                  _Const_ccb_to_halfedge_cast;
+
+public:
+
+  /*! Default constructor. */
+  Arr_face()
+  {}
+
+  // Definition of the outer CCB iterators:
+  typedef Iterator_project<typename F::Outer_ccb_iterator,
+                           _Ccb_to_halfedge_cast>   Outer_ccb_iterator;
+
+  typedef Iterator_project<typename F::Outer_ccb_const_iterator,
+                           _Const_ccb_to_halfedge_cast>
+                                                    Outer_ccb_const_iterator;
+
+  /*! Get the number of outer CCBs the face has. */
+  size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); }
+
+  /*! Get an iterator for the first outer CCB of the face. */
+  Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); }
+
+  /*! Get a past-the-end iterator for the outer CCBs inside the face. */
+  Outer_ccb_iterator outer_ccbs_end() { return (this->outer_ccbs.end()); }
+
+  /*! Get an const iterator for the first outer CCB inside the face. */
+  Outer_ccb_const_iterator outer_ccbs_begin() const
+  { return (this->outer_ccbs.begin()); }
+
+  /*! Get a const past-the-end iterator for the outer CCBs inside the face. */
+  Outer_ccb_const_iterator outer_ccbs_end() const
+  { return (this->outer_ccbs.end()); }
+
+  /*! Add an outer CCB to the face. */
+  void add_outer_ccb(Outer_ccb *oc, Halfedge *h)
+  { oc->set_iterator(this->outer_ccbs.insert(this->outer_ccbs.end(), h)); }
+
+  /*! Erase an outer CCB of the face. */
+  void erase_outer_ccb(Outer_ccb *oc)
+  { this->outer_ccbs.erase(oc->iterator().current_iterator()); }
+
+  // Definition of the inner CCB iterators:
+  typedef Iterator_project<typename F::Inner_ccb_iterator,
+                           _Ccb_to_halfedge_cast>   Inner_ccb_iterator;
+
+  typedef Iterator_project<typename F::Inner_ccb_const_iterator,
+                           _Const_ccb_to_halfedge_cast>
+                                                    Inner_ccb_const_iterator;
+
+  typedef Inner_ccb_iterator                        Hole_iterator;
+  typedef Inner_ccb_const_iterator                  Hole_const_iterator;
+
+  /*! Get the number of inner CCBs the face has. */
+  size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); }
+
+  /*! Get an iterator for the first inner CCB of the face. */
+  Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); }
+
+  /*! Get a past-the-end iterator for the inner CCBs inside the face. */
+  Inner_ccb_iterator inner_ccbs_end() { return (this->inner_ccbs.end()); }
+
+  /*! Get an const iterator for the first inner CCB inside the face. */
+  Inner_ccb_const_iterator inner_ccbs_begin() const
+  { return (this->inner_ccbs.begin()); }
+
+  /*! Get a const past-the-end iterator for the inner CCBs inside the face. */
+  Inner_ccb_const_iterator inner_ccbs_end() const
+  { return (this->inner_ccbs.end()); }
+
+  /*! Add an inner CCB to the face. */
+  void add_inner_ccb(Inner_ccb* ic, Halfedge* h)
+  { ic->set_iterator(this->inner_ccbs.insert(this->inner_ccbs.end(), h)); }
+
+  /*! Erase an inner CCB of the face. */
+  void erase_inner_ccb(Inner_ccb* ic)
+  { this->inner_ccbs.erase(ic->iterator().current_iterator()); }
+
+  /*! Move all inner CCBs (holes) from the face to another. */
+  Inner_ccb_iterator splice_inner_ccbs(Arr_face& other)
+  {
+    const bool was_empty = this->inner_ccbs.empty();
+    typename Base::Inner_ccbs_container::iterator previous =
+      this->inner_ccbs.end();
+    if (!was_empty) --previous;
+    this->inner_ccbs.splice(this->inner_ccbs.end(), other.inner_ccbs);
+    if (was_empty) previous = this->inner_ccbs.begin();
+    else ++previous;
+    for (typename Base::Inner_ccbs_container::iterator it = previous;
+         it != this->inner_ccbs.end(); ++it)
+    {
+      Inner_ccb* ccb = static_cast<Halfedge*>(*it)->inner_ccb();
+      ccb->set_iterator(it);
+      ccb->set_face(this);
+    }
+    return previous;
+  }
+
+  // Backward compatibility:
+  size_t number_of_holes() const { return number_of_inner_ccbs(); }
+  Hole_iterator holes_begin() { return inner_ccbs_begin(); }
+  Hole_iterator holes_end() { return inner_ccbs_end(); }
+  Hole_const_iterator holes_begin() const { return inner_ccbs_begin(); }
+  Hole_const_iterator holes_end() const { return inner_ccbs_end(); }
+
+  // Definition of the isloated vertices iterators:
+  typedef I_Dereference_iterator<
+    typename F::Isolated_vertex_iterator,
+    Vertex,
+    typename F::Isolated_vertex_iterator::difference_type,
+    typename F::Isolated_vertex_iterator::iterator_category>
+                                              Isolated_vertex_iterator;
+
+  typedef I_Dereference_const_iterator<
+    typename F::Isolated_vertex_const_iterator,
+    typename F::Isolated_vertex_iterator,
+    Vertex,
+    typename F::Isolated_vertex_iterator::difference_type,
+    typename F::Isolated_vertex_iterator::iterator_category>
+                                              Isolated_vertex_const_iterator;
+
+  /*! Get the number of isloated vertices inside the face. */
+  size_t number_of_isolated_vertices() const
+  { return (this->iso_verts.size()); }
+
+  /*! Get an iterator for the first isloated vertex inside the face. */
+  Isolated_vertex_iterator isolated_vertices_begin()
+  { return (this->iso_verts.begin()); }
+
+  /*! Get a past-the-end iterator for the isloated vertices inside the face. */
+  Isolated_vertex_iterator isolated_vertices_end()
+  { return (this->iso_verts.end()); }
+
+  /*! Get an const iterator for the first isloated vertex inside the face. */
+  Isolated_vertex_const_iterator isolated_vertices_begin() const
+  { return (this->iso_verts.begin()); }
+
+  /*! Get a const past-the-end iterator for the isloated vertices inside the
+   * face. */
+  Isolated_vertex_const_iterator isolated_vertices_end() const
+  { return (this->iso_verts.end()); }
+
+  /*! Add an isloated vertex inside the face. */
+  void add_isolated_vertex(Isolated_vertex *iv, Vertex* v)
+  { iv->set_iterator(this->iso_verts.insert(this->iso_verts.end(), v)); }
+
+  /*! Erase an isloated vertex from the face. */
+  void erase_isolated_vertex(Isolated_vertex *iv)
+  { this->iso_verts.erase(iv->iterator().current_iterator()); }
+
+  /*! Move all isolated vertices from the face to another. */
+  Isolated_vertex_iterator splice_isolated_vertices(Arr_face& other)
+  {
+    const bool was_empty = this->iso_verts.empty();
+    typename Base::Isolated_vertices_container::iterator previous =
+      this->iso_verts.end();
+    if (!was_empty) --previous;
+    this->iso_verts.splice(this->iso_verts.end(), other.iso_verts);
+    if (was_empty) previous = this->iso_verts.begin();
+    else ++previous;
+    for (typename Base::Isolated_vertices_container::iterator it = previous;
+         it != this->iso_verts.end(); ++it)
+    {
+      Isolated_vertex* iv = static_cast<Vertex*>(*it)->isolated_vertex();
+      iv->set_iterator(it);
+      iv->set_face(this);
+    }
+    return previous;
+  }
+};
+
+/*! \class
+ * Representation of an outer CCB.
+ */
+template <class V, class H, class F>
+class Arr_outer_ccb : public In_place_list_base<Arr_outer_ccb<V,H,F> > {
+public:
+  typedef Arr_outer_ccb<V,H,F>               Self;
+  typedef Arr_halfedge<V,H,F>                Halfedge;
+  typedef Arr_face<V,H,F>                    Face;
+  typedef typename Face::Outer_ccb_iterator  Outer_ccb_iterator;
+
+private:
+  Face* p_f;                  // The face the contains the CCB in its interior.
+  Outer_ccb_iterator  iter;   // The outer CCB identifier.
+  bool iter_is_not_singular;
+
+public:
+  /*! Default constructor. */
+  Arr_outer_ccb() : p_f(NULL), iter_is_not_singular(false) {}
+
+  /*! Copy constructor. */
+  Arr_outer_ccb(const Arr_outer_ccb& other) :
+    p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
+  { if (other.iter_is_not_singular) iter = other.iter; }
+
+  /*! Get a halfedge along the component (const version). */
+  const Halfedge* halfedge() const { return (*iter); }
+
+  /*! Get a halfedge along the component (non-const version). */
+  Halfedge* halfedge() { return (*iter); }
+
+  /*! Set a representative halfedge for the component. */
+  void set_halfedge(Halfedge* he) { *iter = he; }
+
+  /*! Get the incident face (const version). */
+  const Face* face() const { return (p_f); }
+
+  /*! Get the incident face (non-const version). */
+  Face* face() { return (p_f); }
+
+  /*! Set the incident face. */
+  void set_face(Face* f) { p_f = f; }
+
+  /*! Get the iterator (const version). */
+  Outer_ccb_iterator iterator() const
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iter);
+  }
+
+  /*! Get the iterator (non-const version). */
+  Outer_ccb_iterator iterator()
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iter);
+  }
+
+  /*! Set the outer CCB iterator. */
+  void set_iterator(Outer_ccb_iterator it)
+  {
+    iter = it;
+    iter_is_not_singular = true;
+  }
+};
+
+/*! \class
+ * Representation of an inner CCB.
+ */
+template <class V, class H, class F>
+class Arr_inner_ccb : public In_place_list_base<Arr_inner_ccb<V,H,F> >
+{
+public:
+  typedef Arr_inner_ccb<V,H,F>               Self;
+  typedef Arr_halfedge<V,H,F>                Halfedge;
+  typedef Arr_face<V,H,F>                    Face;
+  typedef typename Face::Inner_ccb_iterator  Inner_ccb_iterator;
+
+private:
+  Face* p_f;                  // The face the contains the CCB in its interior.
+  Inner_ccb_iterator  iter;   // The inner CCB identifier.
+  bool iter_is_not_singular;
+
+public:
+  /*! Default constructor. */
+  Arr_inner_ccb() : p_f(NULL), iter_is_not_singular(false) {}
+
+  /*! Copy constructor. */
+  Arr_inner_ccb(const Arr_inner_ccb& other) :
+    p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
+  { if (other.iter_is_not_singular) iter = other.iter; }
+
+  /*! Get a halfedge along the component (const version). */
+  const Halfedge* halfedge() const { return (*iter); }
+
+  /*! Get a halfedge along the component (non-const version). */
+  Halfedge* halfedge() { return (*iter); }
+
+  /*! Set a representative halfedge for the component. */
+  void set_halfedge(Halfedge *he) { *iter = he; }
+
+  /*! Get the incident face (const version). */
+  const Face* face() const { return (p_f); }
+
+  /*! Get the incident face (non-const version). */
+  Face* face() { return (p_f); }
+
+  /*! Set the incident face. */
+  void set_face(Face* f) { p_f = f; }
+
+  /*! Get the iterator (const version). */
+  Inner_ccb_iterator iterator() const
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iter);
+  }
+
+  /*! Get the iterator (non-const version). */
+  Inner_ccb_iterator iterator()
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iter);
+  }
+
+  /*! Set the inner CCB iterator. */
+  void set_iterator(Inner_ccb_iterator it)
+  {
+    iter = it;
+    iter_is_not_singular = true;
+  }
+};
+
+/*! \class
+ * Representation of an isolated vertex.
+ */
+template <class V, class H, class F>
+class Arr_isolated_vertex :
+public In_place_list_base<Arr_isolated_vertex<V,H,F> > {
+public:
+  typedef Arr_isolated_vertex<V,H,F>                Self;
+  typedef Arr_face<V,H,F>                           Face;
+  typedef typename Face::Isolated_vertex_iterator   Isolated_vertex_iterator;
+
+private:
+  Face* p_f;                             // The containing face.
+  Isolated_vertex_iterator   iv_it;     // The isolated vertex identifier.
+  bool iter_is_not_singular;
+
+public:
+  /*! Default constructor. */
+  Arr_isolated_vertex() : p_f(NULL), iter_is_not_singular(false) {}
+
+  /*! Copy constructor. */
+  Arr_isolated_vertex(const Arr_isolated_vertex& other) :
+    p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
+  { if (other.iter_is_not_singular) iv_it = other.iv_it; }
+
+  /*! Get the containing face (const version). */
+  const Face* face() const { return (p_f); }
+
+  /*! Get the containing face (non-const version). */
+  Face* face() { return (p_f); }
+
+  /*! Set the incident face, the one that contains the isolated vertex. */
+  void set_face(Face* f) { p_f = f; }
+
+  /*! Get the isolated vertex iterator (const version). */
+  Isolated_vertex_iterator iterator() const
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iv_it);
+  }
+
+  /*! Get the isolated vertex iterator (non-const version). */
+  Isolated_vertex_iterator iterator()
+  {
+    CGAL_assertion(iter_is_not_singular);
+    return (iv_it);
+  }
+
+  /*! Set the isolated vertex iterator. */
+  void set_iterator(Isolated_vertex_iterator iv)
+  {
+    iv_it = iv;
+    iter_is_not_singular = true;
+  }
+};
+
+/*! \class
+ * The arrangement DCEL class.
+ */
+template <class V, class H, class F,
+          class Allocator = CGAL_ALLOCATOR(int) >
+class Arr_dcel_base {
+public:
+  // Define the vertex, halfedge and face types.
+  typedef Arr_dcel_base<V,H,F>        Self;
+  typedef Arr_vertex<V,H,F>           Vertex;
+  typedef Arr_halfedge<V,H,F>         Halfedge;
+  typedef Arr_face<V,H,F>             Face;
+  typedef Arr_outer_ccb<V,H,F>        Outer_ccb;
+  typedef Arr_inner_ccb<V,H,F>        Inner_ccb;
+  typedef Arr_isolated_vertex<V,H,F>  Isolated_vertex;
+
+  typedef Inner_ccb                   Hole;
+
+protected:
+  // The vetices, halfedges and faces are stored in three in-place lists.
+  typedef In_place_list<Vertex, false>           Vertex_list;
+  typedef In_place_list<Halfedge, false>         Halfedge_list;
+  typedef In_place_list<Face, false>             Face_list;
+  typedef In_place_list<Outer_ccb, false>        Outer_ccb_list;
+  typedef In_place_list<Inner_ccb, false>        Inner_ccb_list;
+  typedef In_place_list<Isolated_vertex, false>  Iso_vert_list;
+
+  // Vertex allocator.
+  typedef typename Allocator::template rebind<Vertex>    Vertex_alloc_rebind;
+  typedef typename Vertex_alloc_rebind::other            Vertex_allocator;
+
+  // Halfedge allocator.
+  typedef typename Allocator::template rebind<Halfedge>  Halfedge_alloc_rebind;
+  typedef typename Halfedge_alloc_rebind::other          Halfedge_allocator;
+
+  // Face allocator.
+  typedef typename Allocator::template rebind<Face>      Face_alloc_rebind;
+  typedef typename Face_alloc_rebind::other              Face_allocator;
+
+  // Outer CCB allocator.
+  typedef typename Allocator::template rebind<Outer_ccb> Out_ccb_alloc_rebind;
+  typedef typename Out_ccb_alloc_rebind::other           Outer_ccb_allocator;
+
+  // Inner CCB allocator.
+  typedef typename Allocator::template rebind<Inner_ccb> In_ccb_alloc_rebind;
+  typedef typename In_ccb_alloc_rebind::other            Inner_ccb_allocator;
+
+  // Isolated vertex allocator.
+  typedef typename Allocator::template rebind<Isolated_vertex>
+                                                         Iso_vert_alloc_rebind;
+  typedef typename Iso_vert_alloc_rebind::other          Iso_vert_allocator;
+
+public:
+  typedef typename Halfedge_list::size_type              Size;
+  typedef typename Halfedge_list::size_type              size_type;
+  typedef typename Halfedge_list::difference_type        difference_type;
+  typedef typename Halfedge_list::difference_type        Difference;
+  typedef std::bidirectional_iterator_tag                iterator_category;
+
+protected:
+
+  Vertex_list         vertices;             // The vertices container.
+  Halfedge_list       halfedges;            // The halfedges container.
+  Face_list           faces;                // The faces container.
+  Outer_ccb_list      out_ccbs;             // The outer CCBs.
+  Inner_ccb_list      in_ccbs;              // The inner CCBs.
+  Iso_vert_list       iso_verts;            // The isolated vertices.
+
+  Vertex_allocator    vertex_alloc;         // An allocator for vertices.
+  Halfedge_allocator  halfedge_alloc;       // An allocator for halfedges.
+  Face_allocator      face_alloc;           // An allocator for faces.
+  Outer_ccb_allocator out_ccb_alloc;        // An allocator for outer CCBs.
+  Inner_ccb_allocator in_ccb_alloc;         // An allocator for inner CCBs.
+  Iso_vert_allocator  iso_vert_alloc;       // Allocator for isolated vertices.
+
+public:
+  // Definitions of iterators.
+  typedef typename Vertex_list::iterator              Vertex_iterator;
+  typedef typename Halfedge_list::iterator            Halfedge_iterator;
+  typedef typename Face_list::iterator                Face_iterator;
+  typedef CGAL::N_step_adaptor_derived<Halfedge_iterator, 2>
+                                                      Edge_iterator;
+
+  // Definitions of const iterators.
+  typedef typename Vertex_list::const_iterator        Vertex_const_iterator;
+  typedef typename Halfedge_list::const_iterator      Halfedge_const_iterator;
+  typedef typename Face_list::const_iterator          Face_const_iterator;
+  typedef CGAL::N_step_adaptor_derived<Halfedge_const_iterator, 2>
+                                                      Edge_const_iterator;
+
+private:
+  // Copy constructor - not supported.
+  Arr_dcel_base(const Self&);
+
+  // Assignment operator - not supported.
+  Self& operator=(const Self&);
+
+public:
+  /// \name Construction and destruction.
+  //@{
+  /*! Default constructor. */
+  Arr_dcel_base() {}
+
+  /*! Destructor. */
+  ~Arr_dcel_base() { delete_all(); }
+  //@}
+
+  /// \name The DCEL size.
+  //@{
+  /*! Get the number of DCEL vertices. */
+  Size size_of_vertices() const { return (vertices.size()); }
+
+  /*! Get the number of DCEL halfedges (twice the number of edges). */
+  Size size_of_halfedges() const { return (halfedges.size()); }
+
+  /*! Get the number of DCEL faces. */
+  Size size_of_faces() const { return (faces.size()); }
+
+  /*! Get the number of outer CCBs. */
+  Size size_of_outer_ccbs() const { return (out_ccbs.size()); }
+
+  /*! Get the number of inner CCBs. */
+  Size size_of_inner_ccbs() const { return (in_ccbs.size()); }
+
+  /*! Get the number of isolated vertices. */
+  Size size_of_isolated_vertices() const { return (iso_verts.size()); }
+  //@}
+
+  /// \name Obtaining iterators.
+  //@{
+  Vertex_iterator   vertices_begin()  { return vertices.begin(); }
+  Vertex_iterator   vertices_end()    { return vertices.end(); }
+  Halfedge_iterator halfedges_begin() { return halfedges.begin();}
+  Halfedge_iterator halfedges_end()   { return halfedges.end(); }
+  Face_iterator     faces_begin()     { return faces.begin(); }
+  Face_iterator     faces_end()       { return faces.end(); }
+  Edge_iterator     edges_begin()     { return halfedges.begin(); }
+  Edge_iterator     edges_end()       { return halfedges.end(); }
+  //@}
+
+  /// \name Obtaining constant iterators.
+  //@{
+  Vertex_const_iterator   vertices_begin() const { return vertices.begin(); }
+  Vertex_const_iterator   vertices_end() const { return vertices.end(); }
+  Halfedge_const_iterator halfedges_begin() const { return halfedges.begin(); }
+  Halfedge_const_iterator halfedges_end() const { return halfedges.end(); }
+  Face_const_iterator     faces_begin() const { return faces.begin(); }
+  Face_const_iterator     faces_end() const { return faces.end(); }
+  Edge_const_iterator     edges_begin() const { return halfedges.begin(); }
+  Edge_const_iterator     edges_end() const { return halfedges.end(); }
+  //@}
+
+  // \name Creation of new DCEL features.
+  //@{
+  /*! Create a new vertex. */
+  Vertex* new_vertex()
+  {
+    Vertex* v = vertex_alloc.allocate(1);
+
+    vertex_alloc.construct(v, Vertex());
+    vertices.push_back(*v);
+    return v;
+  }
+
+  /*! Create a new pair of opposite halfedges. */
+  Halfedge* new_edge()
+  {
+    // Create two new halfedges.
+    Halfedge* h1 = _new_halfedge();
+    Halfedge* h2 = _new_halfedge();
+
+    // Pair them together.
+    h1->set_opposite(h2);
+    h2->set_opposite(h1);
+
+    return (h1);
+  }
+
+  /*! Create a new face. */
+  Face* new_face()
+  {
+    Face* f = face_alloc.allocate(1);
+
+    face_alloc.construct(f, Face());
+    faces.push_back (*f);
+    return(f);
+  }
+
+  /*! Create a new outer CCB. */
+  Outer_ccb* new_outer_ccb()
+  {
+    Outer_ccb* oc = out_ccb_alloc.allocate(1);
+    out_ccb_alloc.construct(oc, Outer_ccb());
+    out_ccbs.push_back(*oc);
+    return (oc);
+  }
+
+  /*! Create a new inner CCB. */
+  Inner_ccb* new_inner_ccb()
+  {
+    Inner_ccb* ic = in_ccb_alloc.allocate(1);
+    in_ccb_alloc.construct(ic, Inner_ccb());
+    in_ccbs.push_back(*ic);
+    return (ic);
+  }
+
+  /*! Create a new isolated vertex. */
+  Isolated_vertex* new_isolated_vertex()
+  {
+    Isolated_vertex* iv = iso_vert_alloc.allocate(1);
+    iso_vert_alloc.construct(iv, Isolated_vertex());
+    iso_verts.push_back(*iv);
+    return (iv);
+  }
+  //@}
+
+  /// \name Deletion of DCEL features.
+  //@{
+  /*! Delete an existing vertex. */
+  void delete_vertex(Vertex* v)
+  {
+    vertices.erase(v);
+    vertex_alloc.destroy(v);
+    vertex_alloc.deallocate(v,1);
+  }
+
+  /*! Delete an existing pair of opposite halfedges. */
+  void delete_edge(Halfedge *h)
+  {
+    Halfedge* h_opp = h->opposite();
+    _delete_halfedge(h);
+    _delete_halfedge(h_opp);
+  }
+
+  /*! Delete an existing face. */
+  void delete_face(Face* f)
+  {
+    faces.erase(f);
+    face_alloc.destroy(f);
+    face_alloc.deallocate(f, 1);
+  }
+
+  /*! Delete an existing outer CCB. */
+  void delete_outer_ccb(Outer_ccb* oc)
+  {
+    out_ccbs.erase(oc);
+    out_ccb_alloc.destroy(oc);
+    out_ccb_alloc.deallocate(oc, 1);
+  }
+
+  /*! Delete an existing inner CCB. */
+  void delete_inner_ccb(Inner_ccb* ic)
+  {
+    in_ccbs.erase(ic);
+    in_ccb_alloc.destroy(ic);
+    in_ccb_alloc.deallocate(ic, 1);
+  }
+
+  /*! Delete an existing isolated vertex. */
+  void delete_isolated_vertex(Isolated_vertex* iv)
+  {
+    iso_verts.erase(iv);
+    iso_vert_alloc.destroy(iv);
+    iso_vert_alloc.deallocate(iv, 1);
+  }
+
+  /*! Delete all DCEL features. */
+  void delete_all()
+  {
+    // Free all vertices.
+    Vertex_iterator vit = vertices.begin(), v_curr;
+    while (vit != vertices.end()) {
+      v_curr = vit;
+      ++vit;
+      delete_vertex(&(*v_curr));
+    }
+
+    // Free all halfedges.
+    Halfedge_iterator  hit = halfedges.begin(), h_curr;
+    while (hit != halfedges.end()) {
+      h_curr = hit;
+      ++hit;
+      _delete_halfedge(&(*h_curr));
+    }
+
+    // Free all faces.
+    Face_iterator fit = faces.begin(), f_curr;
+    while (fit != faces.end()) {
+      f_curr = fit;
+      ++fit;
+      delete_face(&(*f_curr));
+    }
+
+    // Free all outer CCBs.
+    typename Outer_ccb_list::iterator ocit = out_ccbs.begin(), oc_curr;
+    while (ocit != out_ccbs.end()) {
+      oc_curr = ocit;
+      ++ocit;
+      delete_outer_ccb(&(*oc_curr));
+    }
+
+    // Free all inner CCBs.
+    typename Inner_ccb_list::iterator icit = in_ccbs.begin(), ic_curr;
+    while (icit != in_ccbs.end()) {
+      ic_curr = icit;
+      ++icit;
+      delete_inner_ccb(&(*ic_curr));
+    }
+
+    // Free all isolated vertices.
+    typename Iso_vert_list::iterator ivit = iso_verts.begin(), iv_curr;
+    while (ivit != iso_verts.end()) {
+      iv_curr = ivit;
+      ++ivit;
+      delete_isolated_vertex(&(*iv_curr));
+    }
+  }
+  //@}
+
+  /*! Assign our DCEL the contents of another DCEL.
+   */
+  void assign(const Self& dcel)
+  {
+    // Clear the current contents of the DCEL.
+    delete_all();
+
+    // Create duplicated of the DCEL features and map the features of the
+    // given DCEL to their corresponding duplicates.
+    typedef std::map<const Vertex*, Vertex*>                    Vertex_map;
+    typedef std::map<const Halfedge*, Halfedge*>                Halfedge_map;
+    typedef std::map<const Face*, Face*>                        Face_map;
+    typedef std::map<const Outer_ccb*, Outer_ccb*>              Outer_ccb_map;
+    typedef std::map<const Inner_ccb*, Inner_ccb*>              Inner_ccb_map;
+    typedef std::map<const Isolated_vertex*, Isolated_vertex*>  Iso_vert_map;
+
+    Vertex_map v_map;
+    Vertex_const_iterator vit;
+    Vertex* dup_v;
+
+    for (vit = dcel.vertices_begin(); vit != dcel.vertices_end(); ++vit) {
+      dup_v = new_vertex();
+      dup_v->assign(*vit);
+      v_map.insert(typename Vertex_map::value_type(&(*vit), dup_v));
+    }
+
+    Halfedge_map he_map;
+    Halfedge_const_iterator hit;
+    Halfedge* dup_h;
+
+    for (hit = dcel.halfedges_begin(); hit != dcel.halfedges_end(); ++hit) {
+      dup_h = _new_halfedge();
+      dup_h->assign(*hit);
+      he_map.insert(typename Halfedge_map::value_type(&(*hit), dup_h));
+    }
+
+    Face_map f_map;
+    Face_const_iterator fit;
+    Face* dup_f;
+
+    for (fit = dcel.faces_begin(); fit != dcel.faces_end(); ++fit) {
+      dup_f = new_face();
+      dup_f->assign(*fit);
+      f_map.insert(typename Face_map::value_type(&(*fit), dup_f));
+    }
+
+    Outer_ccb_map oc_map;
+    typename Outer_ccb_list::const_iterator ocit;
+    Outer_ccb* dup_oc;
+
+    for (ocit = dcel.out_ccbs.begin(); ocit != dcel.out_ccbs.end(); ++ocit) {
+      dup_oc = new_outer_ccb();
+      oc_map.insert(typename Outer_ccb_map::value_type(&(*ocit), dup_oc));
+    }
+
+    Inner_ccb_map ic_map;
+    typename Inner_ccb_list::const_iterator icit;
+    Inner_ccb* dup_ic;
+
+    for (icit = dcel.in_ccbs.begin(); icit != dcel.in_ccbs.end(); ++icit) {
+      dup_ic = new_inner_ccb();
+      ic_map.insert(typename Inner_ccb_map::value_type(&(*icit), dup_ic));
+    }
+
+    Iso_vert_map iv_map;
+    typename Iso_vert_list::const_iterator ivit;
+    Isolated_vertex* dup_iv;
+
+    for (ivit = dcel.iso_verts.begin(); ivit != dcel.iso_verts.end(); ++ivit) {
+      dup_iv = new_isolated_vertex();
+      iv_map.insert(typename Iso_vert_map::value_type(&(*ivit), dup_iv));
+    }
+
+    // Update the vertex records.
+    const Vertex* v;
+    const Halfedge* h;
+    const Face* f;
+    const Outer_ccb* oc;
+    const Inner_ccb* ic;
+    const Isolated_vertex* iv;
+
+    for (vit = dcel.vertices_begin(); vit != dcel.vertices_end(); ++vit) {
+      v = &(*vit);
+      dup_v = (v_map.find(v))->second;
+
+      if (v->is_isolated()) {
+        // Isolated vertex - set its information.
+        iv = v->isolated_vertex();
+        dup_iv = (iv_map.find(iv))->second;
+
+        dup_v->set_isolated_vertex(dup_iv);
+      }
+      else {
+        // Regular vertex - set its incident halfedge.
+        h = v->halfedge();
+        dup_h = (he_map.find(h))->second;
+
+        dup_v->set_halfedge(dup_h);
+      }
+    }
+
+    // Update the halfedge records.
+    const Halfedge* opp;
+    const Halfedge* prev;
+    const Halfedge* next;
+    Halfedge* dup_opp;
+    Halfedge* dup_prev;
+    Halfedge* dup_next;
+
+    for (hit = dcel.halfedges_begin(); hit != dcel.halfedges_end(); ++hit) {
+      h = &(*hit);
+      v = h->vertex();
+      opp = h->opposite();
+      prev = h->prev();
+      next = h->next();
+
+      dup_h = (he_map.find(h))->second;
+      dup_v = (v_map.find(v))->second;
+      dup_opp = (he_map.find(opp))->second;
+      dup_prev = (he_map.find(prev))->second;
+      dup_next = (he_map.find(next))->second;
+
+      dup_h->set_vertex(dup_v);
+      dup_h->set_opposite(dup_opp);
+      dup_h->set_prev(dup_prev);
+      dup_h->set_next(dup_next);
+      dup_h->set_direction(h->direction());
+
+      if (h->is_on_inner_ccb()) {
+        // The halfedge lies on an inner CCB - set its inner CCB record.
+        ic = h->inner_ccb();
+        dup_ic = (ic_map.find(ic))->second;
+        dup_h->set_inner_ccb(dup_ic);
+      }
+      else {
+        // The halfedge lies on an outer CCB - set its outer CCB record.
+        oc = h->outer_ccb();
+        dup_oc = (oc_map.find(oc))->second;
+        dup_h->set_outer_ccb(dup_oc);
+      }
+    }
+
+    // Update the face records, along with the CCB records and isolated vertex
+    // records.
+    typename Face::Outer_ccb_const_iterator out_ccb_it;
+    typename Face::Inner_ccb_const_iterator in_ccb_it;
+    typename Face::Isolated_vertex_const_iterator iso_vert_it;
+    const Halfedge* hccb;
+    const Vertex* iso_vert;
+    Halfedge* dup_hccb;
+    Vertex* dup_iso_vert;
+
+    for (fit = dcel.faces_begin(); fit != dcel.faces_end(); ++fit) {
+      f = &(*fit);
+      dup_f = (f_map.find(f))->second;
+      dup_f->set_unbounded(f->is_unbounded());
+      dup_f->set_fictitious(f->is_fictitious());
+
+      // Assign the outer CCBs of the face.
+      for (out_ccb_it = f->outer_ccbs_begin();
+           out_ccb_it != f->outer_ccbs_end(); ++out_ccb_it)
+      {
+        hccb = *out_ccb_it;
+
+        dup_hccb = (he_map.find(hccb))->second;
+        dup_oc = dup_hccb->outer_ccb();
+
+        dup_oc->set_face(dup_f);
+        dup_f->add_outer_ccb(dup_oc, dup_hccb);
+      }
+
+      // Assign the inner CCBs of the face.
+      for (in_ccb_it = f->inner_ccbs_begin();
+           in_ccb_it != f->inner_ccbs_end(); ++in_ccb_it)
+      {
+        hccb = *in_ccb_it;
+
+        dup_hccb = (he_map.find(hccb))->second;
+        dup_ic = dup_hccb->inner_ccb();
+
+        dup_ic->set_face(dup_f);
+        dup_f->add_inner_ccb(dup_ic, dup_hccb);
+      }
+
+      // Assign the isolated vertices.
+      for (iso_vert_it = f->isolated_vertices_begin();
+           iso_vert_it != f->isolated_vertices_end(); ++iso_vert_it)
+      {
+        iso_vert = &(*iso_vert_it);
+
+        dup_iso_vert = (v_map.find(iso_vert))->second;
+        dup_iv = dup_iso_vert->isolated_vertex();
+
+        dup_iv->set_face(dup_f);
+        dup_f->add_isolated_vertex(dup_iv, dup_iso_vert);
+      }
+    }
+  }
+
+protected:
+  /*! Create a new halfedge. */
+  Halfedge* _new_halfedge()
+  {
+    Halfedge* h = halfedge_alloc.allocate(1);
+    halfedge_alloc.construct(h, Halfedge());
+    halfedges.push_back(*h);
+    return (h);
+  }
+
+  /*! Delete an existing halfedge. */
+  void _delete_halfedge(Halfedge* h)
+  {
+    halfedges.erase(h);
+    halfedge_alloc.destroy(h);
+    halfedge_alloc.deallocate(h, 1);
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_default_dcel.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_default_dcel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_default_dcel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_default_dcel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_default_overlay_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_default_overlay_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_default_overlay_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_default_overlay_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h
new file mode 100644
index 0000000..5baec54
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h
@@ -0,0 +1,150 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_DIRECTIONAL_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
+#define CGAL_ARR_DIRECTIONAL_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
+
+#include <CGAL/Arr_non_caching_segment_basic_traits_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * A model of the following concepts:
+ * 1. ArrangementBasicTraits_2,
+ * 2. ArrangementDirectionalXMonotoneTraits_2,
+ * 4. ArrangementConstructXMonotoneCurveTraits_2, and
+ * 3. ArrangementOpenBoundaryTraits_2
+ * It handles linear curves.
+ */
+template <class Kernel_T>
+class Arr_directional_non_caching_segment_basic_traits_2 :
+  public Arr_non_caching_segment_basic_traits_2<Kernel_T>
+{
+public:
+  typedef Kernel_T                                         Kernel;
+
+  typedef Arr_non_caching_segment_basic_traits_2<Kernel>   Base;
+  typedef typename Base::Segment_assertions                Segment_assertions;
+  typedef typename Base::Has_exact_division                Has_exact_division;
+
+  /*! Default constructor. */
+  Arr_directional_non_caching_segment_basic_traits_2() : Base() {}
+
+  /// \name Types and functors inherited from the base, required by the
+  // ArrangementBasicTraits_2 concept.
+  //@{
+
+  // Traits types:
+  typedef typename Base::Has_left_category         Has_left_category;
+  typedef typename Base::Has_do_intersect_category Has_do_intersect_category;
+
+  typedef typename Base::Left_side_category        Left_side_category;
+  typedef typename Base::Bottom_side_category      Bottom_side_category;
+  typedef typename Base::Top_side_category         Top_side_category;
+  typedef typename Base::Right_side_category       Right_side_category;
+
+  typedef typename Base::Point_2                   Point_2;
+  typedef typename Base::X_monotone_curve_2        X_monotone_curve_2;
+
+  /*! Compare the x-coordinates of two points */
+  typedef typename Base::Compare_x_2             Compare_x_2;
+
+  /*! Compare two points lexigoraphically; by x, then by y */
+  typedef typename Base::Compare_xy_2            Compare_xy_2;
+
+  /*! Obtain the left endpoint of a given segment */
+  typedef typename Base::Construct_min_vertex_2  Construct_min_vertex_2;
+
+  /*! Obtain the right endpoint of a given segment */
+  typedef typename Base::Construct_max_vertex_2  Construct_max_vertex_2;
+
+  /*! Check whether a given segment is vertical */
+  typedef typename Base::Is_vertical_2           Is_vertical_2;
+
+  /*! Return the location of a given point with respect to an input segment */
+  typedef typename Base::Compare_y_at_x_2        Compare_y_at_x_2;
+
+  /*! Check if two segments or if two points are identical */
+  typedef typename Base::Equal_2                 Equal_2;
+
+  /*! Compare the y value of two segments immediately to the left of their
+   * intersection point
+   */
+  typedef typename Base::Compare_y_at_x_left_2   Compare_y_at_x_left_2;
+
+  /*! Compare the y value of two segments immediately to the right of their
+   * intersection point
+   */
+  typedef typename Base::Compare_y_at_x_right_2  Compare_y_at_x_right_2;
+
+  /*! Construct a segment. */
+  typedef typename Base::Construct_x_monotone_curve_2
+                                                 Construct_x_monotone_curve_2;
+
+  /*! Obtain an approximation of a point coordinate. */
+  typedef typename Base::Approximate_number_type Approximate_number_type;
+
+  //@}
+
+  /// \name Types and functors introduced here, required by the
+  // ArrangementDirectionalXMonotoneTraits concept.
+  //@{
+  typedef typename Kernel::Construct_opposite_segment_2  Construct_opposite_2;
+
+  /*! Obtain a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  { return Construct_opposite_2(); }
+
+  class Compare_endpoints_xy_2 {
+  protected:
+    typedef Arr_directional_non_caching_segment_basic_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state). */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state).
+     */
+    Compare_endpoints_xy_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_directional_non_caching_segment_basic_traits_2<Kernel>;
+
+  public:
+    /*! Compare the two endpoints of a given curve lexigoraphically.
+     * \param cv The curve.
+     * \return SMALLER if cv is directed from left to right and LARGER
+     * otherwise.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv) const
+    {
+      typedef typename Kernel::Construct_vertex_2     Construct_vertex_2;
+
+      const Kernel& kernel = m_traits;
+      Construct_vertex_2 ctr_v = kernel.construct_vertex_2_object();
+      Compare_xy_2 cmp_xy = m_traits.compare_xy_2_object();
+      return(cmp_xy(ctr_v(cv,0), ctr_v(cv,1)));
+    }
+  };
+
+  /*! Obtain a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  { return Compare_endpoints_xy_2(*this); }
+  //@}
+};
+
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_enums.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_enums.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_enums.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_enums.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_extended_dcel.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_extended_dcel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_extended_dcel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_extended_dcel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_face_index_map.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_face_index_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_face_index_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_face_index_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_face_map.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_face_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_face_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_face_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h
new file mode 100644
index 0000000..edbd334
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h
@@ -0,0 +1,3247 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel         <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_GEODESIC_ARC_ON_SPHERE_TRAITS_2_H
+#define CGAL_ARR_GEODESIC_ARC_ON_SPHERE_TRAITS_2_H
+
+// #define CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED 1
+
+/*! \file
+ * A class that handles great circular arcs embedded on spheres suitable
+ * as a geometry traits class for the arrangement on surface package.
+ */
+
+#include <fstream>
+
+#include <CGAL/config.h>
+#include <CGAL/tags.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+
+namespace CGAL {
+
+#define CGAL_X_MINUS_1_Y_0      0
+#define CGAL_X_MINUS_8_Y_6      1
+#define CGAL_X_MINUS_11_Y_7     2
+
+#ifndef CGAL_IDENTIFICATION_XY
+#define CGAL_IDENTIFICATION_XY  CGAL_X_MINUS_1_Y_0
+#endif
+
+template <typename Kernel> class Arr_x_monotone_geodesic_arc_on_sphere_3;
+template <typename Kernel> class Arr_geodesic_arc_on_sphere_3;
+template <typename Kernel> class Arr_extended_direction_3;
+
+/*! A traits class-template for constructing and maintaining arcs of great
+ * circles embedded on spheres. It is parameterized from a (linear) geometry
+ * kernel, which it also derives from
+ */
+template <typename T_Kernel>
+class Arr_geodesic_arc_on_sphere_traits_2 : public T_Kernel {
+  friend class Arr_x_monotone_geodesic_arc_on_sphere_3<T_Kernel>;
+  friend class Arr_geodesic_arc_on_sphere_3<T_Kernel>;
+  friend class Arr_extended_direction_3<T_Kernel>;
+
+public:
+  typedef T_Kernel                              Kernel;
+
+  // Category tags:
+  typedef Tag_true                              Has_left_category;
+  typedef Tag_true                              Has_merge_category;
+  typedef Tag_false                             Has_do_intersect_category;
+
+  typedef Arr_identified_side_tag               Left_side_category;
+  typedef Arr_contracted_side_tag               Bottom_side_category;
+  typedef Arr_contracted_side_tag               Top_side_category;
+  typedef Arr_identified_side_tag               Right_side_category;
+
+  /*! Default constructor */
+  Arr_geodesic_arc_on_sphere_traits_2(){}
+
+protected:
+  typedef typename Kernel::FT                   FT;
+
+  typedef typename Kernel::Direction_3          Direction_3;
+  typedef typename Kernel::Vector_3             Vector_3;
+  typedef typename Kernel::Direction_2          Direction_2;
+  typedef typename Kernel::Vector_2             Vector_2;
+
+  /*! Obtain the possitive (north) pole
+   * \return the possitive (north) pole
+   */
+  inline static const Direction_3& pos_pole()
+  {
+    static const Direction_3 d(0, 0, 1);
+    return d;
+  }
+
+  /*! Obtain the negative (south) pole
+   * \return the negative (south) pole
+   */
+  inline static const Direction_3& neg_pole()
+  {
+    static const Direction_3 d(0, 0, -1);
+    return d;
+  }
+
+  /*! Obtain the intersection of the identification arc and the xy plane.
+   * By default, it is the vector directed along the negative x axis
+   * (x = -infinity).
+   * \return the intersection of the identification arc and the xy plane.
+   */
+  inline static const Direction_2& identification_xy()
+  {
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+    static const Direction_2 d(-1, 0);
+#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_8_Y_6)
+    static const Direction_2 d(-8, 6);
+#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_11_Y_7)
+    static const Direction_2 d(-11, 7);
+#else
+#error CGAL_IDENTIFICATION_XY is not defined
+#endif
+    return d;
+  }
+
+  /*! Obtain the normal of the plane that contains the identification arc.
+   * By default, it is the vector directed along the positive y axis
+   * (y = infinity).
+   * \return the normal of the plane that contains the identification arc.
+   */
+  inline static const Direction_3& identification_normal()
+  {
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+    static const Direction_3 d(0, 1, 0);
+#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_8_Y_6)
+    static const Direction_3 d(6, 8, 0);
+#elif (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_11_Y_7)
+    static const Direction_3 d(7, 11, 0);
+#else
+#error CGAL_IDENTIFICATION_XY is not defined
+#endif
+    return d;
+  }
+
+  /*! Obtain the 2D direction directed along the negative x axis
+   * \return the direction directed at x = -infinity
+   */
+  inline static const Direction_2& neg_x_2()
+  {
+    static const Direction_2 d(-1, 0);
+    return d;
+  }
+
+  /*! Obtain the 2D direction directed along the negative y axis
+   * \return the direction directed at y = -infinity
+   */
+  inline static const Direction_2& neg_y_2()
+  {
+    static const Direction_2 d(0, -1);
+    return d;
+  }
+
+  /*! Obtain the sign of the x-coordinate of a direction in space
+   * \param d the direction in space
+   * \return the sign of the x-coordinate of d
+   */
+  inline static Sign x_sign(Direction_3 d) { return CGAL::sign(d.dx()); }
+
+  /*! Obtain the sign of the y-coordinate of a direction in space
+   * \param d the direction in space
+   * \return the sign of the y-coordinate of d
+   */
+  inline static Sign y_sign(Direction_3 d) { return CGAL::sign(d.dy()); }
+
+  /*! Obtain the sign of the z-coordinate of a direction in space
+   * \param d the direction in space
+   * \return the sign of the z-coordinate of d
+   */
+  inline static Sign z_sign(Direction_3 d) { return CGAL::sign(d.dz()); }
+
+  typedef Direction_2 (*Project)(const Direction_3& d) ;
+
+  /*! Project a 3D direction onto the xy-plane
+   * \param d the 3D direction
+   * \return the projection onto the xy-plane
+   */
+  inline static Direction_2 project_xy(const Direction_3& d)
+  { return Direction_2(d.dx(), d.dy()); }
+
+  /*! Project a 3D direction onto the yz-plane
+   * \param d the 3D direction
+   * \return the projection onto the yz-plane
+   */
+  inline static Direction_2 project_yz(const Direction_3& d)
+  { return Direction_2(d.dy(), d.dz()); }
+
+  /*! Project a 3D direction onto the zx-plane
+   * \param d the 3D direction
+   * \return the projection onto the xz-plane
+   */
+  inline static Direction_2 project_xz(const Direction_3& d)
+  { return Direction_2(d.dx(), d.dz()); }
+
+  /*! Project a 3D direction onto the yz-plane and reflect the y coordinate
+   * \param d the 3D direction
+   * \return the projection onto the yz-plane
+   */
+  inline static Direction_2 project_minus_yz(const Direction_3& d)
+  { return Direction_2(-d.dy(), d.dz()); }
+
+  /*! Project a 3D direction onto the zx-plane and reflect the x coordinate
+   * \param d the 3D direction
+   * \return the projection onto the xz-plane
+   */
+  inline static Direction_2 project_minus_xz(const Direction_3& d)
+  { return Direction_2(-d.dx(), d.dz()); }
+
+  /*! Compare the relative position of a direction and a plane given by its
+   * normal.
+   * \param normal the direction of the plane.
+   * \param dir the direction.
+   */
+  inline Oriented_side oriented_side(const Direction_3& normal,
+                                     const Direction_3 dir) const
+  {
+    FT dot = normal.vector() * dir.vector();
+    return CGAL::sign(dot);
+  }
+
+  /*! Compute the orientation of two directions.
+   * \param d1 the first direction.
+   * \param d2 the second direction.
+   * \return the relative orientation of d1 and d2.
+   */
+  static inline Orientation orientation(const Direction_2& d1,
+                                        const Direction_2& d2)
+  {
+    Kernel kernel;
+    return kernel.orientation_2_object()(d1.vector(), d2.vector());
+  }
+
+  /*! Determined whether a direction is contained in a plane given by its
+   * normal
+   * \param normal the direction of the 3D plane.
+   * \param dir the 3D direction.
+   * \return true if dir is contained in plane; false otherwise.
+   * \pre the plane contains the origin.
+   */
+  inline bool has_on(const Direction_3& normal, const Direction_3& dir) const
+  {
+    FT dot = normal.vector() * dir.vector();
+    return CGAL::sign(dot) == ZERO;
+  }
+
+public:
+  /*! Compare two endpoint directions by v.
+   * \param d1 the first enpoint direction.
+   * \param d2 the second endpoint direction.
+   * \return SMALLER - v(d1) < v(d2);
+   *         EQUAL   - v(d1) = v(d2);
+   *         LARGER  - v(d1) > v(d2).
+   */
+  inline Comparison_result compare_y(const Direction_3& d1,
+                                     const Direction_3& d2) const
+  {
+    Vector_3 v1 = d1.vector();
+    Vector_3 v2 = d2.vector();
+
+    FT dot_p1 = v1.z();
+    FT dot_p2 = v2.z();
+
+    Sign s1 = CGAL::sign(dot_p1);
+    Sign s2 = CGAL::sign(dot_p2);
+
+    if (s1 != s2) {
+      if (s1 == NEGATIVE) return SMALLER;
+      if (s1 == POSITIVE) return LARGER;
+      if (s2 == NEGATIVE) return LARGER;
+      if (s2 == POSITIVE) return SMALLER;
+    }
+    if (s1 == ZERO) return EQUAL;
+
+    FT norm1 = v1 * v1;
+    FT norm2 = v2 * v2;
+
+    return (s1 == POSITIVE) ?
+      CGAL::compare(dot_p1 * dot_p1 * norm2, dot_p2 * dot_p2 * norm1) :
+      CGAL::compare(dot_p2 * dot_p2 * norm1, dot_p1 * dot_p1 * norm2);
+  }
+
+  /*! Compare two directions contained in the xy plane by u.
+   * \param d1 the first direction.
+   * \param d2 the second direction.
+   * \return SMALLER - u(d1) < u(d2);
+   *         EQUAL   - u(d1) = u(d2);
+   *         LARGER  - u(d1) > u(d2).
+   */
+  inline Comparison_result compare_x(const Direction_2& d1,
+                                     const Direction_2& d2) const
+  {
+    const Kernel* kernel = this;
+    if (kernel->equal_2_object()(d1, d2)) return EQUAL;
+    const Direction_2& d = identification_xy();
+    return (kernel->counterclockwise_in_between_2_object()(d, d1, d2)) ?
+      LARGER : SMALLER;
+  }
+
+  /*! Compare two endpoint directions by u.
+   * \param d1 the first enpoint direction.
+   * \param d2 the second endpoint direction.
+   * \return SMALLER - u(d1) < u(d2);
+   *         EQUAL   - u(d1) = u(d2);
+   *         LARGER  - u(d1) > u(d2).
+   * \pre d1 does not coincide with any pole.
+   * \pre d2 does not coincide with any pole.
+   */
+  inline Comparison_result compare_x(const Direction_3& d1,
+                                     const Direction_3& d2) const
+  {
+    // Compare the projections onto the xy plane:
+    Direction_2 d1_2 = project_xy(d1);
+    Direction_2 d2_2 = project_xy(d2);
+    return compare_x(d1_2, d2_2);
+  }
+
+  /*! Compare two endpoint directions lexigoraphically: by u, then by v.
+   * \param d1 the first enpoint direction.
+   * \param d2 the second endpoint direction.
+   * \return SMALLER - u(d1) < u(d2);
+   *         SMALLER - u(d1) = u(d2) and v(d1) < v(d2);
+   *         EQUAL   - u(d1) = u(d2) and v(d1) = v(d2);
+   *         LARGER  - u(d1) = u(d2) and v(d1) > v(d2);
+   *         LARGER  - u(d1) > u(d2).
+   * \pre d1 does not lie on the discontinuity arc.
+   * \pre d2 does not lie on the discontinuity arc.
+   */
+  inline Comparison_result compare_xy(const Direction_3& d1,
+                                      const Direction_3& d2) const
+  {
+    Comparison_result res = compare_x(d1, d2);
+    if (res == EQUAL) return compare_y(d1, d2);
+    return res;
+  }
+
+public:
+  // Traits objects
+  typedef Arr_extended_direction_3<Kernel>                Point_2;
+  typedef Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel> X_monotone_curve_2;
+  typedef Arr_geodesic_arc_on_sphere_3<Kernel>            Curve_2;
+  typedef unsigned int                                    Multiplicity;
+
+public:
+  /// \name Basic functor definitions
+  //@{
+
+  /*! A functor that compares the x-coordinates of two directional points */
+  class Compare_x_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_x_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the x-coordinates of two directional points.
+     * \param p1 the first directional point.
+     * \param p2 the second directional point.
+     * \return SMALLER - x(p1) < x(p2);
+     *         EQUAL   - x(p1) = x(p2);
+     *         LARGER  - x(p1) > x(p2).
+     * \pre p1 does not lie on the boundary.
+     * \pre p2 does not lie on the boundary.
+    */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      CGAL_precondition(p1.is_no_boundary());
+      CGAL_precondition(p2.is_no_boundary());
+
+      return m_traits->compare_x(p1, p2);
+    }
+  };
+
+  /*! Obtain a Compare_x_2 function object */
+  Compare_x_2 compare_x_2_object() const { return Compare_x_2(this); }
+
+  /*! A functor that compares two directional points lexigoraphically:
+   * by x, then by y.
+   */
+  class Compare_xy_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_xy_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare two directional points lexigoraphically: by x, then by y.
+     * \param p1 the first enpoint directional point.
+     * \param p2 the second endpoint directional point.
+     * \return SMALLER - x(p1) < x(p2);
+     *         SMALLER - x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL   - x(p1) = x(p2) and y(p1) = y(p2);
+     *         LARGER  - x(p1) = x(p2) and y(p1) > y(p2);
+     *         LARGER  - x(p1) > x(p2).
+     * \pre p1 does not lie on the boundary.
+     * \pre p2 does not lie on the boundary.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      CGAL_precondition(p1.is_no_boundary());
+      CGAL_precondition(p2.is_no_boundary());
+
+      return m_traits->compare_xy(p1, p2);
+    }
+  };
+
+  /*! Obtain a Compare_xy_2 function object */
+  Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(this); }
+
+  /*! A functor that obtain the left endpoint of an x-monotone arc */
+  class Construct_min_vertex_2 {
+  public:
+    /*! Obtain the left endpoint of and arc.
+     * \param xc the arc.
+     * \return the left endpoint.
+     */
+    const Point_2& operator()(const X_monotone_curve_2& xc) const
+    { return xc.left(); }
+  };
+
+  /*! Obtain a Construct_min_vertex_2 function object */
+  Construct_min_vertex_2 construct_min_vertex_2_object() const
+  { return Construct_min_vertex_2(); }
+
+  /*! A functor that obtain the right endpoint of an x-monotone arc */
+  class Construct_max_vertex_2 {
+  public:
+    /*! Obtain the right endpoint of an arc.
+     * \param xc the arc.
+     * \return the right endpoint.
+     */
+    const Point_2& operator()(const X_monotone_curve_2& xc) const
+    { return xc.right(); }
+  };
+
+  /*! Obtain a Construct_max_vertex_2 function object */
+  Construct_max_vertex_2 construct_max_vertex_2_object() const
+  { return Construct_max_vertex_2(); }
+
+  /*! A functor that checks whether an x-monotone arc is a vertical */
+  class Is_vertical_2 {
+  public:
+    /*! Check whether a given arc is vertical.
+     * \param xc the arc.
+     * \return true if the curve is a vertical spherical_arc; false otherwise.
+     * \pre the arc is not degenerate (consists of a single point)
+     */
+    bool operator()(const X_monotone_curve_2& xc) const
+    {
+      CGAL_precondition(!xc.is_degenerate());
+      return xc.is_vertical();
+    }
+  };
+
+  /*! Obtain an Is_vertical_2 function object */
+  Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); }
+
+  /*! A functor that compares the y-coordinates of a directional point and
+   * an x-monotone arc at the point x-coordinate
+   */
+  class Compare_y_at_x_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Return the location of the given point with respect to the input arc.
+     * \param xc the arc.
+     * \param p the point.
+     * \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve;
+     *         EQUAL   - p lies on the curve.
+     *         LARGER  - y(p) > xc(x(p)), i.e. the point is above the curve;
+     * \pre p is not a construction point.
+     * \pre p is in the x-range of xc.
+     */
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2& xc) const
+    {
+      CGAL_precondition(!p.is_min_boundary() && !p.is_max_boundary());
+      CGAL_precondition(xc.is_in_x_range(p));
+
+      if (xc.is_vertical()) {
+        // Compare the point with the left endpoint. If smaller, return SMALLER.
+        // Otherwise, if EQUAL, return EQUAL.
+        // Otherwise, compare with the right endpoint. If larger, return LARGER.
+        // Otherwise, return EQUAL:
+        if (!xc.left().is_min_boundary()) {
+          Comparison_result cr = m_traits->compare_y(p, xc.left());
+          if (cr != LARGER) return cr;
+        }
+        if (xc.right().is_max_boundary()) return EQUAL;
+        Comparison_result cr = m_traits->compare_y(p, xc.right());
+        return (cr == LARGER) ? LARGER : EQUAL;
+      }
+
+      // Compare the point to the underlying plane of xc:
+      Oriented_side os = m_traits->oriented_side(xc.normal(), p);
+      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+        (xc.is_directed_right()) ?
+        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_2 function object */
+  Compare_y_at_x_2 compare_y_at_x_2_object() const
+  { return Compare_y_at_x_2(this); }
+
+  /*! A functor that compares the y-coordinates of two x-monotone arcs
+   * immediately to the left of their intersection directional point.
+   */
+  class Compare_y_at_x_left_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_left_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \param p the intersection point.
+     * \return the relative position of xc1 with respect to xc2 immdiately to
+     *         the left of p: SMALLER, EQUAL, or LARGER.
+     * \pre the point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \pre the arcs are not degenerate
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xc1,
+                                 const X_monotone_curve_2& xc2,
+                                 const Point_2&
+                                 CGAL_precondition_code(p)) const
+    {
+      CGAL_precondition(!xc1.is_degenerate());
+      CGAL_precondition(!xc2.is_degenerate());
+      CGAL_precondition(p == xc1.right());
+      CGAL_precondition(p == xc2.right());
+
+      // If Both arcs are vertical, they overlap:
+      if (xc1.is_vertical() && xc2.is_vertical()) return EQUAL;
+      if (xc1.is_vertical()) return SMALLER;
+      if (xc2.is_vertical()) return LARGER;
+
+      // Non of the arc is verticel. Thus, non of the endpoints coincide with
+      // a pole.
+      // Compare the y-coord. at the x-coord of the most right left-endpoint.
+      const Point_2& l1 = xc1.left();
+      const Point_2& l2 = xc2.left();
+      if (!l1.is_no_boundary()) {
+        // use l2 and xc1:
+        Oriented_side os = m_traits->oriented_side(xc1.normal(), l2);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc1.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+      }
+      if (!l2.is_no_boundary()) {
+        // use l1 and xc2:
+        Oriented_side os = m_traits->oriented_side(xc2.normal(), l1);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc2.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+      }
+
+      if (m_traits->compare_xy(l1, l2) == SMALLER) {
+        // use l2 and xc1:
+        Oriented_side os = m_traits->oriented_side(xc1.normal(), l2);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc1.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+      }
+      // use l1 and xc2:
+      Oriented_side os = m_traits->oriented_side(xc2.normal(), l1);
+      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+        (xc2.is_directed_right()) ?
+        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_left_2 function object */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
+  { return Compare_y_at_x_left_2(this); }
+
+  /*! A functor that compares the y-coordinates of two x-monotone arcs
+   * immediately to the right of their intersection directional point.
+   */
+  class Compare_y_at_x_right_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_right_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \param p the intersection point.
+     * \return the relative position of xc1 with respect to xc2 immdiately to
+     *         the right of p: SMALLER, EQUAL, or LARGER.
+     * \pre the point p lies on both curves, and both of them must also be
+     *      defined to its right (lexicographically).
+     * \pre the arcs are not degenerate
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xc1,
+                                 const X_monotone_curve_2& xc2,
+                                 const Point_2& p) const
+    {
+      CGAL_precondition(!xc1.is_degenerate());
+      CGAL_precondition(!xc2.is_degenerate());
+
+      // CGAL_precondition(p == xc1.left());
+      // CGAL_precondition(p == xc2.left());
+
+      // If Both arcs are vertical, they overlap:
+      if (xc1.is_vertical() && xc2.is_vertical()) return EQUAL;
+      if (xc1.is_vertical()) return LARGER;
+      if (xc2.is_vertical()) return SMALLER;
+
+      // Non of the arcs is verticel. Thus, non of the endpoints coincide with
+      // a pole.
+      // Compare the y-coord. at the x-coord of the most left right-endpoint.
+      const Point_2& r1 = xc1.right();
+      const Point_2& r2 = xc2.right();
+      if (!r1.is_no_boundary()) {
+        // use r2 and xc1:
+        Oriented_side os = m_traits->oriented_side(xc1.normal(), r2);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc1.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+      }
+      if (!r2.is_no_boundary()) {
+        // use r1 and xc2:
+        Oriented_side os = m_traits->oriented_side(xc2.normal(), r1);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc2.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+      }
+      Comparison_result res = m_traits->compare_xy(r1, r2);
+      if (res == LARGER) {
+        // use r2 and xc1:
+        Oriented_side os = m_traits->oriented_side(xc1.normal(), r2);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc1.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+      }
+      if (res == SMALLER) {
+        // use r1 and xc2:
+        Oriented_side os = m_traits->oriented_side(xc2.normal(), r1);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xc2.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+      }
+      // res == equal
+      // if p and r1 are antipodal, compare the plane normals
+      const Kernel* kernel = m_traits;
+      typename Kernel::Construct_opposite_direction_3 opposite_3 =
+        kernel->construct_opposite_direction_3_object();
+      Point_2 tmp1 = opposite_3(p);     // pacify msvc 10
+      if (!kernel->equal_3_object()(tmp1, r1)) return EQUAL;
+
+      Sign xsign = Traits::x_sign(p);
+      Sign ysign = Traits::y_sign(p);
+      Project project = (xsign == ZERO) ?
+        ((ysign == POSITIVE) ? Traits::project_minus_xz : Traits::project_xz) :
+        ((xsign == POSITIVE) ? Traits::project_yz : Traits::project_minus_yz);
+
+      Direction_2 n1 = project(xc1.normal());
+      Direction_2 n2 = project(xc2.normal());
+      typename Kernel::Construct_opposite_direction_2 opposite_2 =
+        kernel->construct_opposite_direction_2_object();
+      if (!xc1.is_directed_right()) n1 = opposite_2(n1);
+      if (!xc2.is_directed_right()) n2 = opposite_2(n2);
+      if (kernel->equal_2_object()(n1, n2)) return EQUAL;
+      const Direction_2 d(1, 0);
+      return (kernel->counterclockwise_in_between_2_object()(n1, d, n2)) ?
+        SMALLER : LARGER;
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_right_2 function object */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
+  { return Compare_y_at_x_right_2(this); }
+
+  /*! A functor that checks whether two directional points and two x-monotone
+   * arcs are identical.
+   */
+  class Equal_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Equal_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Determines whether the two x-monotone curves are the same (have the
+     * same graph).
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \return true if the two curves are the same; false otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& xc1,
+                    const X_monotone_curve_2& xc2) const
+    {
+      const Kernel* kernel = m_traits;
+      typename Kernel::Equal_3 equal_3 = kernel->equal_3_object();
+      if (xc1.is_full() || xc2.is_full()) {
+        if (!xc1.is_full() || !xc2.is_full()) return false;
+        typename Kernel::Construct_opposite_direction_3 opposite_3 =
+          kernel->construct_opposite_direction_3_object();
+        return (equal_3(xc1.normal(), xc2.normal()) ||
+                equal_3(opposite_3(xc1.normal()), xc2.normal()));
+      }
+
+      if (xc1.is_meridian() || xc2.is_meridian()) {
+        return (xc1.is_meridian() && xc2.is_meridian() &&
+                equal_3(xc1.normal(), xc2.normal()));
+      }
+
+      return (equal_3(xc1.left(), xc2.left()) &&
+              equal_3(xc1.right(), xc2.right()));
+    }
+
+    /*! Determines whether the two points are the same.
+     * \param p1 the first point.
+     * \param p2 the second point.
+     * \return true if the two point are the same; false otherwise.
+     */
+    bool operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      const Kernel* kernel = m_traits;
+      return kernel->equal_3_object()(p1, p2);
+    }
+  };
+
+  /*! Obtain an Equal_2 function object */
+  Equal_2 equal_2_object() const { return Equal_2(this); }
+  //@}
+
+  /// \name Functor definitions to handle boundaries
+  //@{
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the x-axis
+   */
+  class Parameter_space_in_x_2 {
+  public:
+    /*! Obtains the parameter space at the end of an arc along the x-axis .
+     * Note that if the arc end coincides with a pole, then unless the arc
+     * coincides with the identification arc, the arc end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the arc coincides with the identification arc, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the arc
+     * \param ce the arc end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the arc xcv.
+     *   ARR_LEFT_BOUNDARY  - the arc approaches the identification arc from
+     *                        the right at the arc left end.
+     *   ARR_INTERIOR       - the arc does not approache the identification arc.
+     *   ARR_RIGHT_BOUNDARY - the arc approaches the identification arc from
+     *                        the left at the arc right end.
+     * \pre xcv does not coincide with the vertical identification arc.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
+                                   Arr_curve_end ce) const
+    {
+      if (xcv.is_vertical()) {
+        CGAL_precondition(!xcv.is_on_boundary());
+        return ARR_INTERIOR;
+      }
+
+      return (ce == ARR_MIN_END) ?
+        ((xcv.left().is_no_boundary()) ? ARR_INTERIOR : ARR_LEFT_BOUNDARY) :
+        ((xcv.right().is_no_boundary()) ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
+    }
+
+    /*! Obtains the parameter space at a point along the x-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     * \pre p does not lie on the vertical identification curve.
+     */
+    Arr_parameter_space operator()(const Point_2 p) const
+    {
+      /*! \todo For now the precondition is not applied. Instead, and as
+       * a convention, if the point lies on the vertical identification
+       * curve it is assumed to be smaller than anything else. Thus,
+       * ARR_LEFT_BOUNDARY is returned.
+       */
+      return (p.is_mid_boundary()) ? ARR_LEFT_BOUNDARY : ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_x_2 function object */
+  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
+  { return Parameter_space_in_x_2(); }
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the y-axis
+   */
+  class Parameter_space_in_y_2 {
+  public:
+    /*! Obtains the parameter space at the end of an arc along the y-axis .
+     * Note that if the arc end coincides with a pole, then unless the arc
+     * coincides with the identification arc, the arc end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the arc coincides with the identification arc, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the arc
+     * \param ce the arc end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the arc xcv.
+     *   ARR_BOTTOM_BOUNDARY  - the arc approaches the south pole at the arc
+     *                          left end.
+     *   ARR_INTERIOR         - the arc does not approache a contraction point.
+     *   ARR_TOP_BOUNDARY     - the arc approaches the north pole at the arc
+     *                          right end.
+     * There are no horizontal identification arcs!
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
+                                   Arr_curve_end ce) const
+    {
+      return (ce == ARR_MIN_END) ?
+        ((xcv.left().is_min_boundary()) ?  ARR_BOTTOM_BOUNDARY: ARR_INTERIOR) :
+        ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR);
+    }
+
+    /*! Obtains the parameter space at a point along the y-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     * \pre p does not lie on the horizontal identification curve.
+     * There are no horizontal identification arcs!
+     */
+    Arr_parameter_space operator()(const Point_2 p) const
+    {
+      return
+        (p.is_min_boundary()) ? ARR_BOTTOM_BOUNDARY :
+        (p.is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_y_2 function object */
+  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
+  { return Parameter_space_in_y_2(); }
+
+
+  /*! A functor that compares the x-coordinate of arc ends and points on the
+   * boundary of the parameter space.
+   */
+  class Compare_x_on_boundary_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_x_on_boundary_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the x-limit of a direction with the x-coordinate of an
+     * arc end on the boundary.
+     * \param point the point direction.
+     * \param xcv the arc, the endpoint of which is compared.
+     * \param ce the arc-end indicator -
+     *            ARR_MIN_END - the minimal end of xc or
+     *            ARR_MAX_END - the maximal end of xc.
+     * \return the comparison result:
+     *         SMALLER - x(p) < x(xc, ce);
+     *         EQUAL   - x(p) = x(xc, ce);
+     *         LARGER  - x(p) > x(xc, ce).
+     * \pre p lies in the interior of the parameter space.
+     * \pre the ce end of the arc xcv lies on a pole (implying ce is vertical).
+     * \pre xcv does not coincide with the vertical identification curve.
+     */
+    Comparison_result operator()(const Point_2& point,
+                                 const X_monotone_curve_2& xcv,
+                                 Arr_curve_end CGAL_precondition_code(ce)) const
+    {
+      CGAL_precondition(point.is_no_boundary());
+      CGAL_precondition_code
+        (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right(););
+      CGAL_precondition(!p2.is_no_boundary());
+      CGAL_precondition(xcv.is_vertical());
+
+      CGAL_precondition(!xcv.is_on_boundary());
+
+      // xcv is vertical, but does not coincide with the discontinuity arc.
+      // Obtain the direction contained in the underlying plane, which is
+      // also on the xy-plane:
+      Direction_3 normal = xcv.normal();
+      Direction_2 q = (xcv.is_directed_right()) ?
+        Direction_2(-(normal.dy()), normal.dx()) :
+        Direction_2(normal.dy(), -(normal.dx()));
+      Direction_2 p = Traits::project_xy(point);
+      return m_traits->compare_x(p, q);
+    }
+
+    /*! Compare the x-coordinates of 2 arc ends near the boundary of the
+     * parameter space.
+     * \param xcv1 the first arc.
+     * \param ce1 the first arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv1 or
+     *            ARR_MAX_END - the maximal end of xcv1.
+     * \param xcv2 the second arc.
+     * \param ce2 the second arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv2 or
+     *            ARR_MAX_END - the maximal end of xcv2.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
+     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
+     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
+     * \pre the ce1 end of the arc xcv1 lies on a pole (implying ce1 is
+     *      vertical).
+     * \pre the ce2 end of the arc xcv2 lies on a pole (implying ce2 is
+     *      vertical).
+     * \pre xcv1 does not coincide with the vertical identification curve.
+     * \pre xcv2 does not coincide with the vertical identification curve.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xcv1,
+                                 Arr_curve_end CGAL_precondition_code(ce1),
+                                 const X_monotone_curve_2& xcv2,
+                                 Arr_curve_end CGAL_precondition_code(ce2)) const
+    {
+      CGAL_precondition_code
+        (const Point_2& p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right(););
+      CGAL_precondition(!p1.is_no_boundary());
+      CGAL_precondition_code
+        (const Point_2& p2 = (ce2 == ARR_MIN_END) ? xcv2.left() : xcv2.right(););
+      CGAL_precondition(!p2.is_no_boundary());
+
+      CGAL_precondition(xcv1.is_vertical());
+      CGAL_precondition(xcv2.is_vertical());
+
+      CGAL_precondition(!xcv1.is_on_boundary());
+      CGAL_precondition(!xcv2.is_on_boundary());
+
+      // Non of the arcs coincide with the discontinuity arc:
+      // Obtain the directions contained in the underlying planes, which are
+      // also on the xy-plane:
+      Direction_3 normal1 = xcv1.normal();
+      Direction_2 p = (xcv1.is_directed_right()) ?
+        Direction_2(-(normal1.dy()), normal1.dx()) :
+        Direction_2(normal1.dy(), -(normal1.dx()));
+      Direction_3 normal2 = xcv2.normal();
+      Direction_2 q = (xcv2.is_directed_right()) ?
+        Direction_2(-(normal2.dy()), normal2.dx()) :
+        Direction_2(normal2.dy(), -(normal2.dx()));
+      return m_traits->compare_x(p, q);
+    }
+
+    /*! Compare the x-coordinate of two given points that lie on the
+     * horizontal identification arc.
+     * \param p1 the first point.
+     * \param p2 the second point.
+     * There is no horizontal identification arc!
+     */
+    Comparison_result operator()(const Point_2&, const Point_2&) const
+    {
+      CGAL_error_msg("There is no horizontal identification arc!");
+      return SMALLER;
+    }
+  };
+
+  /*! Obtain a Compare_x_on_boundary_2 function object */
+  Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
+  { return Compare_x_on_boundary_2(this); }
+
+
+  /*! A functor that compares the x-coordinates of arc ends near the
+   * boundary of the parameter space.
+   */
+  class Compare_x_near_boundary_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_x_near_boundary_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+
+    /*! Compare the x-coordinates of 2 arc ends near the boundary of the
+     * parameter space.
+     * \param xcv1 the first arc.
+     * \param xcv2 the second arc.
+     * \param ce the curve end indicator -
+     *            ARR_MIN_END - the minimal end of curves or
+     *            ARR_MAX_END - the maximal end of curves.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce) < x(xcv2, ce);
+     *         EQUAL   - x(xcv1, ce) = x(xcv2, ce);
+     *         LARGER  - x(xcv1, ce) > x(xcv2, ce).
+     * \pre the ce end of the arc xcv1 lies on a pole.
+     * \pre the ce end of the arc xcv2 lies on a pole.
+     * \pre the the $x$-coordinates of xcv1 and xcv2 at their ce end are
+     *      equal (implying that the curves overlap).
+     * \pre xcv1 does not coincide with the vertical identification curve.
+     * \pre xcv2 does not coincide with the vertical identification curve.
+     */
+    Comparison_result operator()(const X_monotone_curve_2&
+                                   CGAL_precondition_code(xcv1),
+                                 const X_monotone_curve_2&
+                                   CGAL_precondition_code(xcv2),
+                                 Arr_curve_end CGAL_precondition_code(ce)) const
+    {
+      CGAL_precondition_code
+        (const Point_2& p1 = (ce == ARR_MIN_END) ? xcv1.left() : xcv1.right(););
+      CGAL_precondition(!p1.is_no_boundary());
+      CGAL_precondition_code
+        (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv2.left() : xcv2.right(););
+      CGAL_precondition(!p2.is_no_boundary());
+
+      CGAL_precondition(xcv1.is_vertical());
+      CGAL_precondition(xcv2.is_vertical());
+      CGAL_precondition(!xcv1.is_on_boundary());
+      CGAL_precondition(!xcv2.is_on_boundary());
+
+      return EQUAL;
+    }
+  };
+
+  /*! Obtain a Compare_x_near_boundary_2 function object */
+  Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
+  { return Compare_x_near_boundary_2(this); }
+
+
+  /*! A functor that compares the y-coordinates of arc ends near the
+   * boundary of the parameter space.
+   */
+  class Compare_y_near_boundary_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the y-coordinates of 2 curves at their ends near the boundary
+     * of the parameter space.
+     * \param xcv1 the first arc.
+     * \param xcv2 the second arc.
+     * \param ce the arc end indicator.
+     * \return the second comparison result.
+     * \pre the ce ends of the arcs xcv1 and xcv2 lie either on the left
+     *      boundary or on the right boundary of the parameter space (implying
+     *      that they cannot be vertical).
+     * There is no horizontal identification curve!
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xcv1,
+                                 const X_monotone_curve_2& xcv2,
+                                 Arr_curve_end ce) const
+    {
+      CGAL_precondition(!xcv1.is_degenerate());
+      CGAL_precondition(!xcv2.is_degenerate());
+
+      const Point_2& l1 = xcv1.left();
+      const Point_2& r1 = xcv1.right();
+      const Point_2& l2 = xcv2.left();
+      const Point_2& r2 = xcv2.right();
+
+      // If xcv1 is vertical, xcv1 coincides with the discontinuity arc:
+      if (xcv1.is_vertical()) {
+        CGAL_precondition(!l1.is_no_boundary());
+        CGAL_precondition(!r1.is_no_boundary());
+      }
+
+      // If xcv2 is vertical, xcv2 coincides with the discontinuity arc:
+      if (xcv2.is_vertical()) {
+        CGAL_precondition(!l2.is_no_boundary());
+        CGAL_precondition(!r2.is_no_boundary());
+      }
+
+      if (ce == ARR_MIN_END) {
+        // Handle the south pole. It has the smallest y coords:
+        if (l1.is_min_boundary())
+          return (l2.is_min_boundary()) ? EQUAL : SMALLER;
+        if (l2.is_min_boundary()) return LARGER;
+
+        // None of xcv1 and xcv2 endpoints coincide with a pole:
+        Comparison_result cr = m_traits->compare_y(l1, l2);
+        if (cr != EQUAL) return cr;
+
+        // If Both arcs are vertical, they overlap:
+        if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
+        if (xcv1.is_vertical()) return LARGER;
+        if (xcv2.is_vertical()) return SMALLER;
+
+        // Non of the arcs is verticel. Thus, non of the endpoints coincide
+        // with a pole.
+        // Compare the y-coord. at the x-coord of the most left right-endpoint.
+        CGAL_assertion(r1.is_no_boundary());
+        CGAL_assertion(r2.is_no_boundary());
+
+        if (m_traits->compare_xy(r1, r2) == LARGER) {
+          // use r2 and xcv1:
+          Oriented_side os =
+            m_traits->oriented_side(xcv1.normal(), r2);
+          return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+            (xcv1.is_directed_right()) ?
+            ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+            ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+        }
+        // use r1 and xcv2:
+        Oriented_side os = m_traits->oriented_side(xcv2.normal(), r1);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xcv2.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+      }
+
+      // ce == ARR_MAX_END
+
+      // Handle the north pole. It has the largest y coords:
+      if (r1.is_max_boundary()) return (r2.is_max_boundary()) ? EQUAL : LARGER;
+      if (r2.is_max_boundary()) return SMALLER;
+
+      // None of xcv1 and xcv2 endpoints coincide with a pole:
+      Direction_2 r1_xy = Traits::project_xy(r1);
+      Comparison_result cr = m_traits->compare_y(r1, r2);
+      if (cr != EQUAL) return cr;
+
+      // If Both arcs are vertical, they overlap:
+      if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
+      if (xcv1.is_vertical()) return LARGER;
+      if (xcv2.is_vertical()) return SMALLER;
+
+      // Compare to the left:
+      Direction_2 p_r1 = Traits::project_xy(r1);
+      cr = m_traits->compare_y(r1, r2);
+      if (cr != EQUAL) return cr;
+
+      // Non of the arcs is verticel. Thus, non of the endpoints coincide with
+      // a pole.
+      // Compare the y-coord. at the x-coord of the most right left-endpoint.
+      CGAL_assertion(l1.is_no_boundary());
+      CGAL_assertion(l2.is_no_boundary());
+
+      if (m_traits->compare_xy(l1, l2) == SMALLER) {
+        // use l2 and xcv1:
+        Oriented_side os = m_traits->oriented_side(xcv1.normal(), l2);
+        return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+          (xcv1.is_directed_right()) ?
+          ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
+          ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
+      }
+      // use l1 and xcv2:
+      Oriented_side os = m_traits->oriented_side(xcv2.normal(), l1);
+      return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
+        (xcv2.is_directed_right()) ?
+        ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
+        ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
+    }
+  };
+
+  /*! Obtain a Compare_y_near_boundary_2 function object */
+  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
+  { return Compare_y_near_boundary_2(this); }
+
+  /*! A functor that indicates whether a geometric object lies on the
+   * horizontal identification arc. In this setup there is no such entity.
+   */
+  class Is_on_x_identification_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+  public:
+    /*! Determine whether a point lies on the horizontal identification arc.
+     * \param p the point.
+     * \return a Boolean indicating whether p lies on the horizontal
+     * identification arc.
+     */
+    bool operator()(const Point_2&) const
+    {
+      CGAL_error_msg("There is no horizontal identification arc!");
+      return false;
+    }
+
+    /*! Determine whether an arc coincides with the horizontal identification
+     * arc.
+     * \param xcv the arc.
+     * \return a Boolean indicating whether xcv coincides with the horizontal
+     * identification arc.
+     */
+    bool operator()(const X_monotone_curve_2&) const
+    {
+      CGAL_error_msg("There is no horizontal identification arc!");
+      return false;
+    }
+  };
+
+  /*! Obtain a Is_on_x_identification_2 function object */
+  Is_on_x_identification_2 is_on_x_identification_2_object() const
+  { return Is_on_x_identification_2(); }
+
+  /*! A functor that indicates whether a geometric object lies on the
+   * vertical identification arc.
+   */
+  class Is_on_y_identification_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Is_on_y_identification_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Determine whether a point lies on the vertical identification arc.
+     * \param p the point.
+     * \return a Boolean indicating whether p lies on the vertical
+     * identification arc.
+     */
+    bool operator()(const Point_2& p) const { return p.is_mid_boundary(); }
+
+    /*! Determine whether an arc coincides with the vertical identification
+     * arc.
+     * \param xcv the arc.
+     * \return a Boolean indicating whether xcv coincides with the vertical
+     * identification arc.
+     */
+    bool operator()(const X_monotone_curve_2& xcv) const
+    { return xcv.is_on_boundary(); }
+  };
+
+  /*! Obtain a Is_on_y_identification_2 function object */
+  Is_on_y_identification_2 is_on_y_identification_2_object() const
+  { return Is_on_y_identification_2(this); }
+
+  /*! A functor that compares the y-coordinate of two given points
+   * that lie on the vertical identification arc.
+   */
+  class Compare_y_on_boundary_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_on_boundary_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Compare the y-coordinate of two given points that lie on the vertical
+     * identification curve.
+     * \param p1 the first point.
+     * \param p2 the second point.
+     * \return SMALLER - p1 is lexicographically smaller than p2;
+     *         EQUAL   - p1 and p2 coincides;
+     *         LARGER  - p1 is lexicographically larger than p2;
+     * \pre p1 lies on the vertical identification arc.
+     * \pre p2 lies on the vertical identification arc.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      CGAL_precondition(!p1.is_no_boundary());
+      CGAL_precondition(!p2.is_no_boundary());
+      return m_traits->compare_y(p1, p2);
+    }
+  };
+
+  /*! Obtain a Compare_y_on_boundary_2 function object */
+  Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
+  { return Compare_y_on_boundary_2(this); }
+  //@}
+
+  /// \name Functor definitions for supporting intersections.
+  //@{
+
+  /*! A functor that divides an arc into x-monotone arcs. That are, arcs that
+   * do not cross the identification arc.
+   */
+  class Make_x_monotone_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Make_x_monotone_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Cut the given curve into x-monotone subcurves and insert them into the
+     * given output iterator. As spherical_arcs are always x_monotone, only one
+     * object will be contained in the iterator.
+     * \param xc the curve.
+     * \param oi the output iterator, whose value-type is Object. The output
+     *           object is a wrapper of either an X_monotone_curve_2, or - in
+     *           case the input spherical_arc is degenerate - a Point_2 object.
+     * \return the past-the-end iterator.
+     */
+    template<typename OutputIterator>
+    OutputIterator operator()(const Curve_2& c, OutputIterator oi) const
+    {
+      if (c.is_degenerate()) {
+        // The spherical_arc is a degenerate point - wrap it with an object:
+        *oi++ = make_object(c.right());
+        return oi;
+      }
+
+      if (c.is_x_monotone()) {
+        // The spherical arc is monotone - wrap it with an object:
+        // *oi++ = make_object(X_monotone_curve_2(c));
+        const X_monotone_curve_2* xc = &c;
+        *oi++ = make_object(*xc);
+        return oi;
+      }
+
+      if (c.is_full()) {
+        // The spherical arc is full
+        if (c.is_vertical()) {
+          // The arc is vertical => divide it into 2 meridians;
+          const Direction_3& np = m_traits->neg_pole();
+          const Direction_3& pp = m_traits->pos_pole();
+          X_monotone_curve_2 xc1(np, pp, c.normal(), true, true);
+          X_monotone_curve_2 xc2(pp, np, c.normal(), true, false);
+          *oi++ = make_object(xc1);
+          *oi++ = make_object(xc2);
+          return oi;
+        }
+#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
+        // The arc is not vertical => break it at the discontinuity arc:
+        const X_monotone_curve_2 xc(c.normal());
+        *oi++ = make_object(xc);
+#else
+        // Full x-monotone arcs are not supported!
+        // Split the arc at the intersection point with the complement of the
+        // discontinuity arc:
+        Direction_3 normal = c.normal();
+        bool directed_right = Traits::x_sign(normal) == POSITIVE;
+        Direction_3 d1(-(normal.dz()), 0, normal.dx());
+        Direction_3 d2(normal.dz(), 0, -(normal.dx()));
+        X_monotone_curve_2 xc1(d1, d2, normal, false, directed_right);
+        X_monotone_curve_2 xc2(d2, d1, normal, false, directed_right);
+        *oi++ = make_object(xc1);
+        *oi++ = make_object(xc2);
+#endif
+        return oi;
+      }
+
+      const Point_2& source = c.source();
+      const Point_2& target = c.target();
+      const Direction_3& normal = c.normal();
+
+      if (c.is_vertical()) {
+        /* If one of the endpoints coincide with a pole, divide the arc at
+         * the opposite pole:
+         */
+        const Direction_3& np = m_traits->neg_pole();
+        const Direction_3& pp = m_traits->pos_pole();
+        if (source.is_min_boundary() || target.is_min_boundary()) {
+          X_monotone_curve_2 xc1(source, pp, normal, true, true);
+          X_monotone_curve_2 xc2(pp, target, normal, true, false);
+          *oi++ = make_object(xc1);
+          *oi++ = make_object(xc2);
+          return oi;
+        }
+
+        if (source.is_max_boundary() || target.is_max_boundary()) {
+          X_monotone_curve_2 xc1(source, np, normal, true, false);
+          X_monotone_curve_2 xc2(np, target, normal, true, true);
+          *oi++ = make_object(xc1);
+          *oi++ = make_object(xc2);
+          return oi;
+        }
+
+        // None of the enpoints coincide with a pole.
+        bool s_is_positive, t_is_positive, plane_is_positive;
+        CGAL::Sign xsign = Traits::x_sign(normal);
+        if (xsign == ZERO) {
+          s_is_positive = Traits::x_sign(source) == POSITIVE;
+          t_is_positive = Traits::x_sign(target) == POSITIVE;
+          plane_is_positive = Traits::y_sign(normal) == NEGATIVE;
+        } else {
+          s_is_positive = Traits::y_sign(source) == POSITIVE;
+          t_is_positive = Traits::y_sign(target) == POSITIVE;
+          plane_is_positive = xsign == POSITIVE;
+        }
+        bool ccw = ((plane_is_positive && s_is_positive) ||
+                    (!plane_is_positive && !s_is_positive));
+        const Point_2& pole1 = (ccw) ? pp : np;
+        X_monotone_curve_2 xc1(source, pole1, normal, true, ccw);
+        *oi++ = make_object(xc1);
+        if (s_is_positive != t_is_positive) {
+          // Construct 1 more arc:
+          X_monotone_curve_2 xc2(pole1, target, normal, true, !ccw);
+          *oi++ = make_object(xc2);
+          return oi;
+        }
+        // Construct 2 more arcs:
+        const Point_2& pole2 = (ccw) ? np : pp;
+        X_monotone_curve_2 xc2(pole1, pole2, normal, true, !ccw);
+        *oi++ = make_object(xc2);
+        X_monotone_curve_2 xc3(pole2, target, normal, true, ccw);
+        *oi++ = make_object(xc3);
+        return oi;
+      }
+
+      // The curve is not vertical, (none of the enpoints coincide with a pole)
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+      Direction_3 dp = (CGAL::sign(normal.dz()) == POSITIVE) ?
+        Direction_3(-(normal.dz()), 0, normal.dx()) :
+        Direction_3(normal.dz(), 0, -(normal.dx()));
+#else
+      const Direction_2& xy = Traits::identification_xy();
+      FT x = xy.dx();
+      FT y = xy.dy();
+      FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) /  -(normal.dz()));
+      Direction_3 dp(x, y, z);
+#endif
+      Point_2 p(dp, Point_2::MID_BOUNDARY_LOC);
+      Direction_2 s = Traits::project_xy(source);
+      Direction_2 t = Traits::project_xy(target);
+      const Direction_2& d = Traits::identification_xy();
+      const Kernel* kernel = m_traits;
+      bool directed_right =
+        kernel->counterclockwise_in_between_2_object()(d, s, t);
+
+      X_monotone_curve_2 xc1(source, p, normal, false, directed_right);
+      X_monotone_curve_2 xc2(p, target, normal, false, directed_right);
+      *oi++ = make_object(xc1);
+      *oi++ = make_object(xc2);
+      return oi;
+    }
+  };
+
+  /*! Obtain a Make_x_monotone_2 function object */
+  Make_x_monotone_2 make_x_monotone_2_object() const
+  { return Make_x_monotone_2(this); }
+
+  /*! A functor that splits an x-monotone arc at a directional point. */
+  class Split_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Split_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Split a given x-monotone curve at a given point into two sub-curves.
+     * \param xc the curve to split
+     * \param p the split point.
+     * \param xc1 (output) the left resulting subcurve. p is its right
+     * endpoint.
+     * \param xc2 (output) the right resulting subcurve. p is its left
+     * endpoint.
+     * \pre p lies on xc but is not one of its endpoints.
+     * \pre xc is not degenerate
+     */
+    void operator()(const X_monotone_curve_2& xc, const Point_2& p,
+                    X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const
+    {
+      CGAL_precondition(!xc.is_degenerate());
+      const Point_2& source = xc.source();
+      const Point_2& target = xc.target();
+      CGAL_precondition_code(const Kernel* kernel = m_traits);
+      CGAL_precondition_code
+        (typename Kernel::Equal_3 equal_3 = kernel->equal_3_object());
+      CGAL_precondition(!equal_3(p, source));
+      CGAL_precondition(!equal_3(p, target));
+
+      xc1.set_normal(xc.normal());
+      xc1.set_is_vertical(xc.is_vertical());
+      xc1.set_is_degenerate(false);
+      xc1.set_is_empty(false);
+
+      xc2.set_normal(xc.normal());
+      xc2.set_is_vertical(xc.is_vertical());
+      xc2.set_is_empty(false);
+
+      if (xc.is_directed_right()) {
+        xc1.set_source(source);
+        xc1.set_target(p);
+        xc1.set_is_directed_right(true);
+        xc2.set_source(p);
+        xc2.set_target(target);
+        xc2.set_is_directed_right(true);
+      } else {
+        xc1.set_source(p);
+        xc1.set_target(target);
+        xc1.set_is_directed_right(false);
+        xc2.set_source(source);
+        xc2.set_target(p);
+        xc2.set_is_directed_right(false);
+      }
+    }
+  };
+
+  /*! Obtain a Split_2 function object */
+  Split_2 split_2_object() const { return Split_2(this); }
+
+  /*! The clockwise-in-between function object */
+  class Clockwise_in_between_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Clockwise_in_between_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    bool operator()(const Direction_2& d,
+                    const Direction_2& d1, const Direction_2& d2) const
+    {
+      const Kernel* kernel = m_traits;
+      return kernel->counterclockwise_in_between_2_object()(d, d2, d1);
+    }
+  };
+
+  /*! Obtain a Clockwise_in_between function object */
+  Clockwise_in_between_2 clockwise_in_between_2_object() const
+  { return Clockwise_in_between_2(this); }
+
+  /*! A functor that computes intersections between x-monotone arcs. */
+  class Intersect_2 {
+  private:
+
+    /*! Computes the intersection between two arcs contained in the same plane
+     * \param l1_3
+     * \param r1_3
+     * \param l2_3
+     * \param r2_3
+     * \param normal      - the normal of the common plane
+     * \param vertical   - is the plane vertical
+     * \param start      - the start 2d vertex
+     * \param in_between - the in_between operator
+     * \param project    - the projection function
+     * \param oi         - the output iterator
+     */
+    template <typename In_between, typename OutputIterator>
+    OutputIterator compute_intersection(const Point_2& l1_3,
+                                        const Point_2 r1_3,
+                                        const Point_2& l2_3,
+                                        const Point_2 r2_3,
+                                        const Direction_3& normal,
+                                        bool vertical,
+                                        const Direction_2& start,
+                                        const In_between& in_between,
+                                        Project project,
+                                        OutputIterator oi) const
+    {
+      typedef std::pair<Point_2, Multiplicity>                  Point_2_pair;
+      const Kernel* kernel = m_traits;
+      typename Kernel::Equal_2 equal = kernel->equal_2_object();
+
+      Direction_2 l1 = project(l1_3);
+      Direction_2 r1 = project(r1_3);
+      Direction_2 l2 = project(l2_3);
+      Direction_2 r2 = project(r2_3);
+
+      if (equal(l1, l2)) {
+        const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
+        X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true);
+        *oi++ = make_object(xc);
+        return oi;
+      }
+
+      bool l1_eq_start = equal(l1, start);
+      bool l2_eq_start = equal(l2, start);
+
+      if (l1_eq_start || (!l2_eq_start && in_between(l1, start, l2))) {
+        // The following applies only to full circles:
+        if (l1_eq_start && equal(r2, start))
+          *oi++ = make_object(Point_2_pair(r2_3, 1));
+        if (in_between(r1, l1, l2)) return oi;      // no intersection
+        if (equal(r1, l2)) {
+          *oi++ = make_object(Point_2_pair(r1_3, 1));
+          return oi;
+        }
+        const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
+        X_monotone_curve_2 xc(l2_3, trg, normal, vertical, true);
+        *oi++ = make_object(xc);
+        return oi;
+      }
+      CGAL_assertion(l2_eq_start || in_between(l2, start, l1));
+      // The following applies only to full circles:
+      if (l2_eq_start && equal(r1, start))
+        *oi++ = make_object(Point_2_pair(r1_3, 1));
+      if (in_between(r2, l2, l1)) return oi;      // no intersection
+      if (equal(r2, l1)) {
+        *oi++ = make_object(Point_2_pair(r2_3, 1));
+        return oi;
+      }
+      const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3;
+      X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true);
+      *oi++ = make_object(xc);
+      return oi;
+    }
+
+    /*! Determine whether a direction pierces an arc.
+     * \param point the direction.
+     * \param xc the arc.
+     * \return true iff point pierces xc.
+     * \pre point lies in the underlying plane of xc.
+     */
+    bool is_in_between(const Point_2& point,
+                       const X_monotone_curve_2& xc) const
+    {
+      const Kernel* kernel = m_traits;
+      CGAL_precondition(m_traits->has_on(xc.normal(), point));
+
+      const Point_2& left = xc.left();
+      const Point_2& right = xc.right();
+
+      // Handle the poles:
+      if (point.is_max_boundary()) return (right.is_max_boundary());
+      if (point.is_min_boundary()) return (left.is_min_boundary());
+
+      if (xc.is_vertical()) {
+        // Compare the x coordinates. If they are not equal, return false:
+        Direction_3 normal = xc.normal();
+        bool plane_is_positive, p_is_positive;
+        CGAL::Sign xsign = Traits::x_sign(normal);
+        if (xsign == ZERO) {
+          plane_is_positive = Traits::y_sign(normal) == NEGATIVE;
+          p_is_positive = Traits::x_sign(point) == POSITIVE;
+        } else {
+          plane_is_positive = xsign == POSITIVE;
+          p_is_positive = Traits::y_sign(point) == POSITIVE;
+        }
+
+        bool xc_is_positive = ((plane_is_positive && xc.is_directed_right()) ||
+                               (!plane_is_positive && !xc.is_directed_right()));
+
+        if ((xc_is_positive && !p_is_positive) ||
+            (!xc_is_positive && p_is_positive))
+          return false;
+
+        // Compare the y-coords:
+        return (((left.is_min_boundary()) ||
+                 (m_traits->compare_y(point, left) != SMALLER)) &&
+                ((right.is_max_boundary()) ||
+                 (m_traits->compare_y(point, right) != LARGER)));
+      }
+
+      // The arc is not vertical. Compare the projections onto the xy-plane:
+      typename Kernel::Equal_2 equal_2 = kernel->equal_2_object();
+      Direction_2 p = Traits::project_xy(point);
+      Direction_2 r = Traits::project_xy(right);
+      if (equal_2(p, r)) return true;
+      Direction_2 l = Traits::project_xy(left);
+      if (equal_2(p, l)) return true;
+      return kernel->counterclockwise_in_between_2_object()(p, l, r);
+    }
+
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Intersect_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Find the intersections of the two given curves and insert them into the
+     * given output iterator. As two spherical_arcs may itersect only once,
+     * only a single intersection will be contained in the iterator.
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \param oi the output iterator.
+     * \return the past-the-end iterator.
+     * \pre xc1 and xc2 are not degenerate
+     */
+    template<typename OutputIterator>
+    OutputIterator operator()(const X_monotone_curve_2& xc1,
+                              const X_monotone_curve_2& xc2,
+                              OutputIterator oi) const
+    {
+      CGAL_precondition(!xc1.is_degenerate());
+      CGAL_precondition(!xc2.is_degenerate());
+
+      typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+      typedef typename Kernel::Counterclockwise_in_between_2
+        Counterclockwise_in_between_2;
+      typedef typename Kernel::Equal_3                          Equal_3;
+
+      typedef std::pair<Point_2, Multiplicity>                  Point_2_pair;
+      const Kernel* kernel = m_traits;
+
+      Equal_3 equal_3 = kernel->equal_3_object();
+      const Direction_3& normal1 = xc1.normal();
+      const Direction_3& normal2 = xc2.normal();
+
+      Direction_3 opposite_normal1 =
+        kernel->construct_opposite_direction_3_object()(normal1);
+
+      if (equal_3(normal1, normal2) || equal_3(opposite_normal1, normal2)) {
+        // The underlying planes are the same
+        Counterclockwise_in_between_2 ccib =
+          kernel->counterclockwise_in_between_2_object();
+        typename Traits::Clockwise_in_between_2 cib =
+          m_traits->clockwise_in_between_2_object();
+
+        if (xc1.is_vertical()) {
+          // Both arcs are vertical
+          bool res = kernel->equal_3_object()(normal1, normal2);
+          if ((!res && (xc1.is_directed_right() == xc2.is_directed_right())) ||
+              (res && (xc1.is_directed_right() != xc2.is_directed_right())))
+          {
+            if (xc1.left().is_min_boundary() && xc2.left().is_min_boundary())
+              *oi++ = make_object(Point_2_pair(xc1.left(), 1));
+            if (xc1.right().is_max_boundary() && xc2.right().is_max_boundary())
+              *oi++ = make_object(Point_2_pair(xc1.right(), 1));
+            return oi;
+          }
+
+          /*! If the endpoints of one arc coinside with the 2 poles resp,
+           * the other arc is completely overlapping.
+           */
+          if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) {
+            *oi++ = make_object(xc2);
+            return oi;
+          }
+          if (xc2.left().is_min_boundary() && xc2.right().is_max_boundary()) {
+            *oi++ = make_object(xc1);
+            return oi;
+          }
+          /*! Find an endpoint that does not coincide with a pole, and project
+           * it onto the xy plane. If the projection coincide with the negative
+           * x, project onto the zx plane. Otherwise project onto the yz plane.
+           */
+          const Point_2& point =
+            xc1.left().is_min_boundary() ? xc1.right() : xc1.left();
+
+          CGAL::Sign xsign = Traits::x_sign(normal1);
+          bool xz_plane = xsign == ZERO;
+          Project project =
+            (xz_plane) ? Traits::project_xz : Traits::project_yz;
+
+          Direction_3 normal = (xc1.is_directed_right()) ?
+            normal1 : opposite_normal1;
+
+          bool p_x_is_positive = Traits::x_sign(point) == POSITIVE;
+          bool p_y_is_positive = Traits::y_sign(point) == POSITIVE;
+
+          if ((xz_plane && p_x_is_positive) || (!xz_plane && p_y_is_positive)) {
+            // The endpoints reside in the positive x-halfspace:
+            return compute_intersection(xc1.left(), xc1.right(),
+                                        xc2.left(), xc2.right(),
+                                        normal, true, Traits::neg_y_2(),
+                                        ccib, project, oi);
+          }
+          // The endpoints reside in the negative x-halfspace:
+          return compute_intersection(xc1.left(), xc1.right(),
+                                      xc2.left(), xc2.right(),
+                                      normal, true, Traits::neg_y_2(),
+                                      cib, project, oi);
+        }
+
+        // The arcs are not vertical:
+        bool plane_is_positive = (Traits::z_sign(normal1) == POSITIVE);
+        Direction_3 normal =
+          (plane_is_positive) ? normal1 : opposite_normal1;
+        return compute_intersection(xc1.left(), xc1.right(),
+                                    xc2.left(), xc2.right(),
+                                    normal, false, Traits::identification_xy(),
+                                    ccib, Traits::project_xy, oi);
+      }
+
+      Vector_3 v =
+        kernel->
+        construct_cross_product_vector_3_object()(xc1.normal().vector(),
+                                                  xc2.normal().vector());
+
+      // Determine which one of the two directions:
+      Point_2 ed(v.direction());
+      if (is_in_between(ed, xc1) && is_in_between(ed, xc2)) {
+        *oi++ = make_object(Point_2_pair(ed, 1));
+        return oi;
+      }
+
+      Vector_3 vo(kernel->construct_opposite_vector_3_object()(v));
+      Point_2 edo(vo.direction());
+      if (is_in_between(edo, xc1) && is_in_between(edo, xc2)) {
+        *oi++ = make_object(Point_2_pair(edo, 1));
+        return oi;
+      }
+      return oi;
+    }
+  };
+
+  /*! Obtain an Intersect_2 function object */
+  Intersect_2 intersect_2_object() const { return Intersect_2(this); }
+
+  /*! A functor that tests whether two x-monotone arcs can be merged. */
+  class Are_mergeable_2 {
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Check whether it is possible to merge two given x-monotone curves.
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \return true if the two arcs are mergeable; false otherwise.
+     * Two arcs are mergeable if:
+     * 1. they are supported by the same plane, and
+     * 2. share a common endpoint that is not on the identification arc
+     */
+    bool operator()(const X_monotone_curve_2& xc1,
+                    const X_monotone_curve_2& xc2) const
+    {
+      if (xc1.is_empty() || xc2.is_empty()) return true;
+      if ((xc1.is_full() || xc1.is_meridian()) &&
+          (xc2.is_full() || xc2.is_meridian())) return false;
+
+      const Kernel* kernel = m_traits;
+      typename Kernel::Equal_3 equal = kernel->equal_3_object();
+
+      if (xc1.is_degenerate() && xc2.is_degenerate())
+        return equal(xc1.left(), xc2.left());
+      if ((xc1.is_full() || xc1.is_meridian()) && xc2.is_degenerate())
+        return xc1.has_on(xc2.left());
+      if ((xc2.is_full() || xc2.is_meridian()) && xc1.is_degenerate())
+        return xc2.has_on(xc1.left());
+
+      const Direction_3& normal1 = xc1.normal();
+      const Direction_3& normal2 = xc2.normal();
+      Direction_3 opposite_normal1 =
+        kernel->construct_opposite_direction_3_object()(normal1);
+      if (!equal(normal1, normal2) && !equal(opposite_normal1, normal2))
+        return false;
+
+      bool eq1 = equal(xc1.right(), xc2.left());
+      bool eq2 = equal(xc1.left(), xc2.right());
+
+#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
+      if (eq1 && eq2) return true;
+#else
+      if (eq1 && eq2) return false;
+#endif
+
+      if (eq1 && xc2.left().is_no_boundary()) return true;
+      if (eq2 && xc1.left().is_no_boundary()) return true;
+      return false;
+    }
+  };
+
+  /*! Obtain an Are_mergeable_2 function object */
+  Are_mergeable_2 are_mergeable_2_object() const
+  { return Are_mergeable_2(this); }
+
+  /*! A functor that merges two x-monotone arcs into one */
+  class Merge_2 {
+  protected:
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+
+  public:
+    /*! Merge two given x-monotone curves into a single curve (spherical_arc).
+     * \param xc1 the first curve.
+     * \param xc2 the second curve.
+     * \param xc Output: the merged curve.
+     * \pre the two curves are mergeable.
+     */
+    void operator()(const X_monotone_curve_2& xc1,
+                    const X_monotone_curve_2& xc2,
+                    X_monotone_curve_2& xc) const
+    {
+      CGAL_precondition (m_traits->are_mergeable_2_object()(xc1, xc2) == true);
+
+      if (xc1.is_degenerate() || xc1.is_empty()) {
+        xc = xc2;
+        return;
+      }
+
+      if (xc2.is_degenerate() || xc2.is_empty()) {
+        xc = xc1;
+        return;
+      }
+
+      const Kernel* kernel = m_traits;
+      typename Kernel::Equal_3 equal = kernel->equal_3_object();
+
+      xc.set_is_degenerate(false);
+      xc.set_is_empty(false);
+      xc.set_is_vertical(xc1.is_vertical());
+
+      bool eq1 = equal(xc1.right(), xc2.left());
+
+#if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
+      bool eq2 = equal(xc1.left(), xc2.right());
+      if (eq1 && eq2) {
+        const Point_2& p =
+          xc1.source().is_mid_boundary() ? xc1.source() : xc1.target();
+        xc.set_source(p);
+        xc.set_target(p);
+        xc.set_normal(xc1.normal());
+        xc.set_is_full(true);
+      }
+#endif
+
+      if (xc1.is_directed_right() || xc2.is_directed_right()) {
+        xc.set_normal(xc1.is_directed_right() ? xc1.normal() : xc2.normal());
+        xc.set_is_directed_right(true);
+
+        if (eq1) {
+          xc.set_source(xc1.left());
+          xc.set_target(xc2.right());
+        } else {
+          CGAL_assertion(equal(xc1.left(), xc2.right()));
+          xc.set_source(xc2.left());
+          xc.set_target(xc1.right());
+        }
+      } else {
+        xc.set_normal(xc1.normal());
+        xc.set_is_directed_right(false);
+
+        if (eq1) {
+          xc.set_source(xc2.right());
+          xc.set_target(xc1.left());
+        } else {
+          CGAL_assertion(equal(xc1.left(), xc2.right()));
+          xc.set_source(xc1.right());
+          xc.set_target(xc2.left());
+        }
+      }
+    }
+  };
+
+  /*! Obtain a Merge_2 function object */
+  Merge_2 merge_2_object() const { return Merge_2(this); }
+  //@}
+
+  /// \name Functor definitions for the landmarks point-location strategy.
+  //@{
+  typedef double                          Approximate_number_type;
+
+  class Approximate_2 {
+  public:
+
+    /*! Return an approximation of a point coordinate.
+     * \param p the exact point.
+     * \param i the coordinate index (either 0 or 1).
+     * \pre i is either 0 or 1.
+     * \return an approximation of p's x-coordinate (if i == 0), or an
+     *         approximation of p's y-coordinate (if i == 1).
+     */
+    Approximate_number_type operator()(const Point_2& p, int i) const
+    {
+      CGAL_precondition(i == 0 || i == 1);
+      return (i == 0) ? CGAL::to_double(p.x()) : CGAL::to_double(p.y());
+    }
+  };
+
+  /*! Obtain an Approximate_2 function object */
+  Approximate_2 approximate_2_object() const { return Approximate_2(); }
+
+  class Construct_x_monotone_curve_2 {
+  public:
+
+    /*! Return an x-monotone curve connecting the two given endpoints.
+     * \param p the first point.
+     * \param q the second point.
+     * \pre p and q must not be the same.
+     * \return a spherical_arc connecting p and q.
+     */
+    X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const
+    { return X_monotone_curve_2(p, q); }
+  };
+
+  /*! Obtain a Construct_x_monotone_curve_2 function object */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
+  { return Construct_x_monotone_curve_2(); }
+  //@}
+
+
+  /// \name Functor definitions for the Boolean set-operation traits.
+  //@{
+
+  class Compare_endpoints_xy_2 {
+  public:
+
+    /*!
+     * Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param xc the curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xc)
+    { return (xc.is_directed_right()) ? SMALLER : LARGER; }
+  };
+
+  /*! Obtain a Compare_endpoints_xy_2 function object */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  { return Compare_endpoints_xy_2(); }
+
+  class Construct_opposite_2 {
+  public:
+    /*! Construct an opposite x-monotone (with swapped source and target).
+     * \param xc the curve.
+     * \return the opposite curve.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xc)
+    { return xc.opposite(); }
+  };
+
+  /*! Obtain a Construct_opposite_2 function object */
+  Construct_opposite_2 construct_opposite_2_object() const
+  { return Construct_opposite_2(); }
+  //@}
+
+#if 0
+  /*! Inserter for the spherical_arc class used by the traits-class */
+  template <typename OutputStream>
+  friend OutputStream& operator<<(OutputStream& os, const Point_2& p)
+  {
+    CGAL::To_double<typename Kernel::FT> todouble;
+    os << static_cast<float>(todouble(p.dx())) << ", "
+       << static_cast<float>(todouble(p.dy())) << ", "
+       << static_cast<float>(todouble(p.dz()));
+    return os;
+  }
+
+  /*! Inserter for the spherical_arc class used by the traits-class */
+  template <typename OutputStream>
+  friend OutputStream& operator<<(OutputStream& os,
+                                  const X_monotone_curve_2& xc)
+  {
+    os << "(" << xc.left() << "), (" << xc.right() << ")";
+    return os;
+  }
+
+  /*! Extractor for the spherical_arc class used by the traits-class */
+  template <typename InputStream>
+  friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc)
+  {
+    CGAL_error_msg("Not implemented yet!");
+    return is;
+  }
+#endif
+};
+
+/*! Represent an extended 3D direction that is used in turn to represent a
+ * spherical-arc endpoint. The extended data consists of two flags that
+ * indicate whether the point is on the x and on a y boundaries,
+ * respectively.
+ */
+template <typename Kernel>
+class Arr_extended_direction_3 : public Kernel::Direction_3 {
+public:
+  typedef typename Kernel::FT                           FT;
+  typedef typename Kernel::Direction_3                  Direction_3;
+
+  /*! Enumeration of discontinuity type */
+  enum Location_type {
+    NO_BOUNDARY_LOC,
+    MIN_BOUNDARY_LOC,
+    MID_BOUNDARY_LOC,
+    MAX_BOUNDARY_LOC
+  };
+
+private:
+  typedef typename Kernel::Direction_2                  Direction_2;
+
+  /*! The point discontinuity type */
+  Location_type m_location;
+
+  inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); }
+
+  inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); }
+
+  inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); }
+
+public:
+  /*! Default constructor */
+  Arr_extended_direction_3() :
+    Direction_3(0, 0, 1),
+    m_location(MAX_BOUNDARY_LOC)
+  {}
+
+  /*! Constructor */
+  Arr_extended_direction_3(const Direction_3& dir, Location_type location) :
+    Direction_3(dir),
+    m_location(location)
+  {}
+
+  /*! Constructor
+   * \param x the x coordinate
+   * \param y the y coordinate
+   * \param z the z coordinate
+   */
+  Arr_extended_direction_3(const FT& x, const FT& y, const FT& z) :
+    Direction_3(x, y, z)
+  { init(); }
+
+  /*! Constructor from a direction
+   * \param dir the direction
+   */
+  Arr_extended_direction_3(const Direction_3& dir) : Direction_3(dir)
+  { init(); }
+
+  /*! Initialize from a direction
+   * \param dir the direction
+   */
+  void init()
+  {
+    const Direction_3& dir = *this;
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+    if (y_sign(dir) != ZERO) {
+      m_location = NO_BOUNDARY_LOC;
+      return;
+    }
+    CGAL::Sign signx = x_sign(dir);
+    m_location =
+      (signx == POSITIVE) ? NO_BOUNDARY_LOC :
+      ((signx == NEGATIVE) ? MID_BOUNDARY_LOC :
+       ((z_sign(dir) == NEGATIVE) ? MIN_BOUNDARY_LOC : MAX_BOUNDARY_LOC));
+#else
+    if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) {
+      m_location =
+        (z_sign(dir) == NEGATIVE) ? MIN_BOUNDARY_LOC : MAX_BOUNDARY_LOC;
+      return;
+    }
+
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+    Direction_2 dir_xy = Traits::project_xy(dir);
+    Kernel kernel;
+    typename Kernel::Equal_2 equal_2 = kernel.equal_2_object();
+    const Direction_2& xy = Traits::identification_xy();
+    m_location = equal_2(dir_xy, xy) ? MID_BOUNDARY_LOC : NO_BOUNDARY_LOC;
+#endif
+  }
+
+  /*! Copy constructor */
+  Arr_extended_direction_3(const Arr_extended_direction_3& ed) :
+    Direction_3(static_cast<const Direction_3&>(ed))
+  {
+    m_location = ed.discontinuity_type();
+  }
+
+  /*! Assignment operator */
+  Arr_extended_direction_3& operator=(const Arr_extended_direction_3& ed)
+  {
+    *(static_cast<Direction_3*>(this)) = static_cast<const Direction_3&>(ed);
+    m_location = ed.discontinuity_type();
+    return (*this);
+  }
+
+  /*! Obtain the discontinuity type of the point */
+  Location_type discontinuity_type() const
+  { return m_location; }
+
+  bool is_no_boundary() const { return (m_location == NO_BOUNDARY_LOC); }
+
+  bool is_min_boundary() const { return (m_location == MIN_BOUNDARY_LOC); }
+
+  bool is_mid_boundary() const { return (m_location == MID_BOUNDARY_LOC); }
+
+  bool is_max_boundary() const { return (m_location == MAX_BOUNDARY_LOC); }
+};
+
+/*! A Representation of an x-monotone great circular arc embedded on a sphere,
+ * as used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class
+ * An x-monotone great circular arc cannot cross the closed hemi-circle arc of
+ * discontinuity, defined as the longitude that lies in the zx-plane, and is
+ * contained in the open halfspace (x > 0).
+ * \todo At this point such an arc cannot have an angle of 180 degrees.
+ * \todo It is always directed from its source to its target.
+ */
+template <typename T_Kernel>
+class Arr_x_monotone_geodesic_arc_on_sphere_3 {
+public:
+  typedef T_Kernel                                    Kernel;
+  typedef typename Kernel::Direction_3                Direction_3;
+  typedef typename Kernel::Plane_3                    Plane_3;
+  typedef typename Kernel::Vector_3                   Vector_3;
+  typedef typename Kernel::Direction_2                Direction_2;
+
+protected:
+  // For some reason compilation under Windows fails without the qualifier
+  typedef CGAL::Arr_extended_direction_3<Kernel>      Arr_extended_direction_3;
+
+  /*! The source point of the arc */
+  Arr_extended_direction_3 m_source;
+
+  /*! The target point of the arc */
+  Arr_extended_direction_3 m_target;
+
+  /*! The direction of the plane that contains the arc */
+  Direction_3 m_normal;
+
+  /*! The arc is vertical */
+  bool m_is_vertical;
+
+  /*! Target (lexicographically) larger than source */
+  bool m_is_directed_right;
+
+  /*! The arc is a full circle */
+  bool m_is_full;
+
+  /* The arc is degenerate - it consists of a single point */
+  bool m_is_degenerate;
+
+  /*! The arc is empty */
+  bool m_is_empty;
+
+  inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); }
+
+  inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); }
+
+  inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); }
+
+  /*! Constructs a plane that contains two directions.
+   * \param d1 the first direction.
+   * \param d2 the second direction.
+   */
+  inline Direction_3 construct_normal_3(const Direction_3& d1,
+                                        const Direction_3& d2) const
+  {
+    Kernel kernel;
+    Vector_3 v = kernel.construct_cross_product_vector_3_object()(d1.vector(),
+                                                                  d2.vector());
+    return v.direction();
+  }
+
+public:
+  /*! Default constructor - constructs an empty arc */
+  Arr_x_monotone_geodesic_arc_on_sphere_3() :
+    m_is_vertical(false),
+    m_is_directed_right(false),
+    m_is_full(false),
+    m_is_degenerate(false),
+    m_is_empty(true)
+  {}
+
+  /*! Constructor
+   * \param src the source point of the arc
+   * \param trg the target point of the arc
+   * \param plane the plane that contains the arc
+   * \param is_vertical is the arc vertical ?
+   * \param is_directed_right is the arc directed from left to right?
+   * \param is_full is the arc a full circle?
+   * \param is_degenerate is the arc degenerate (single point)?
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3
+  (const Arr_extended_direction_3& src,
+   const Arr_extended_direction_3& trg,
+   const Direction_3& normal,
+   bool is_vertical, bool is_directed_right,
+   bool is_full = false, bool is_degenerate = false, bool is_empty = false) :
+    m_source(src),
+    m_target(trg),
+    m_normal(normal),
+    m_is_vertical(is_vertical),
+    m_is_directed_right(is_directed_right),
+    m_is_full(is_full),
+    m_is_degenerate(is_degenerate),
+    m_is_empty(is_empty)
+  {}
+
+  /*! Copy constructor
+   * \param other the other arc
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3
+  (const Arr_x_monotone_geodesic_arc_on_sphere_3& other)
+  {
+    m_source = other.m_source;
+    m_target = other.m_target;
+    m_normal = other.m_normal;
+    m_is_vertical = other.m_is_vertical;
+    m_is_directed_right = other.m_is_directed_right;
+    m_is_full = other.m_is_full;
+    m_is_degenerate = other.m_is_degenerate;
+    m_is_empty = other.m_is_empty;
+  }
+
+  /*! Assignment operator */
+  Arr_x_monotone_geodesic_arc_on_sphere_3& operator=
+  (const Arr_x_monotone_geodesic_arc_on_sphere_3& other)
+  {
+    m_source = other.m_source;
+    m_target = other.m_target;
+    m_normal = other.m_normal;
+    m_is_vertical = other.m_is_vertical;
+    m_is_directed_right = other.m_is_directed_right;
+    m_is_full = other.m_is_full;
+    m_is_degenerate = other.m_is_degenerate;
+    m_is_empty = other.m_is_empty;
+    return (*this);
+  }
+
+  /*! Construct the minor arc from two endpoint directions. The minor arc
+   *  is the one with the smaller angle among the two geodesic arcs with
+   * the given endpoints.
+   * 1. Find out whether the arc is x-monotone.
+   * 2. If it is x-monotone,
+   *    2.1 Find out whether it is vertical, and
+   *    2.2 whether the target is larger than the source (directed right).
+   * The arc is vertical, iff
+   * 1. one of its endpoint direction pierces a pole, or
+   * 2. the projections onto the xy-plane coincide.
+   * \param source the source point.
+   * \param target the target point.
+   * \pre the source and target cannot be equal.
+   * \pre the source and target cannot be antipodal.
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3
+  (const Arr_extended_direction_3& source,
+   const Arr_extended_direction_3& target) :
+    m_source(source),
+    m_target(target),
+    m_is_full(false),
+    m_is_degenerate(false),
+    m_is_empty(false)
+  {
+    // MSVC 10 complains when the casting below is not present probably due
+    // to a bug (in MSVC 10).
+    CGAL_precondition_code(Kernel kernel);
+    CGAL_precondition(!kernel.equal_3_object()
+                      (kernel.construct_opposite_direction_3_object()(m_source),
+                       (const typename Kernel::Direction_3&)(m_target)));
+    m_normal = construct_normal_3(m_source, m_target);
+    init();
+  }
+
+  /*! Initialize a spherical_arc given that the two endpoint directions
+   * have been set. It is assumed that the arc is the one with the smaller
+   * angle among the two.
+   * 1. Find out whether the arc is x-monotone.
+   * 2. If it is x-monotone,
+   *    2.1 Find out whether it is vertical, and
+   *    2.2 whether the target is larger than the source (directed right).
+   * The arc is vertical, iff
+   * 1. one of its endpoint direction pierces a pole, or
+   * 2. the projections onto the xy-plane coincide.
+   * \param source the source point.
+   * \param target the target point.
+   * \pre the source and target cannot be equal.
+   */
+  void init()
+  {
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    Kernel kernel;
+    CGAL_precondition(!kernel.equal_3_object()(m_source, m_target));
+
+    // Check whether any one of the endpoint coincide with a pole:
+    if (m_source.is_max_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(false);
+      return;
+    }
+    if (m_source.is_min_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(true);
+      return;
+    }
+    if (m_target.is_max_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(true);
+      return;
+    }
+    if (m_target.is_min_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(false);
+      return;
+    }
+
+    // None of the enpoints coincide with a pole:
+    Direction_2 s = Traits::project_xy(m_source);
+    Direction_2 t = Traits::project_xy(m_target);
+
+    Orientation orient = Traits::orientation(s, t);
+    if (orient == COLLINEAR) {
+      set_is_vertical(true);
+      const Direction_2& nx = Traits::neg_x_2();
+      if (Traits::orientation(nx, s) == COLLINEAR) {
+        // Project onto xz plane:
+        s = Traits::project_xz(m_source);
+        t = Traits::project_xz(m_target);
+        const Direction_2& ny = Traits::neg_y_2();
+        Orientation orient1 = Traits::orientation(ny, s);
+        CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t));
+        CGAL_assertion(orient1 == orient2);
+        orient = Traits::orientation(s, t);
+        CGAL_assertion(orient != COLLINEAR);
+        if (orient1 == LEFT_TURN) {
+          set_is_directed_right(orient == LEFT_TURN);
+          return;
+        }
+        set_is_directed_right(orient == RIGHT_TURN);
+        return;
+      }
+      // Project onto yz plane:
+      s = Traits::project_yz(m_source);
+      t = Traits::project_yz(m_target);
+      const Direction_2& ny = Traits::neg_y_2();
+      Orientation orient1 = Traits::orientation(ny, s);
+      CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t));
+      CGAL_assertion(orient1 == orient2);
+      if (orient1 == LEFT_TURN) {
+        orient = Traits::orientation(s, t);
+        CGAL_assertion(orient != COLLINEAR);
+        set_is_directed_right(orient == LEFT_TURN);
+        return;
+      }
+      orient = Traits::orientation(s, t);
+      CGAL_assertion(orient != COLLINEAR);
+      set_is_directed_right(orient == RIGHT_TURN);
+      return;
+    }
+
+    // The arc is not vertical!
+    set_is_vertical(false);
+    set_is_directed_right(orient == LEFT_TURN);
+    set_is_full(kernel.equal_3_object()(m_source, m_target));
+  }
+
+  /*! Construct a full spherical_arc from a plane
+   * \param plane the containing plane.
+   * \pre the plane is not vertical
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3(const Direction_3& normal) :
+    m_normal(normal),
+    m_is_vertical(false),
+    m_is_directed_right(z_sign(normal) == POSITIVE),
+    m_is_full(true),
+    m_is_degenerate(false),
+    m_is_empty(false)
+  {
+    CGAL_precondition(z_sign(normal) != ZERO);
+
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+    Direction_3 d = (CGAL::sign(normal.dz()) == POSITIVE) ?
+      Direction_3(-(normal.dz()), 0, normal.dx()) :
+      Direction_3(normal.dz(), 0, -(normal.dx()));
+#else
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+    typedef typename Kernel::FT                         FT;
+
+    const Direction_2& xy = Traits::identification_xy();
+    FT x = xy.dx();
+    FT y = xy.dy();
+    FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) / -(normal.dz()));
+    Direction_3 d(x, y, z);
+#endif
+    m_source = m_target =
+      Arr_extended_direction_3(d, Arr_extended_direction_3::MID_BOUNDARY_LOC);
+  }
+
+  /*! Construct a full spherical_arc from a common endpoint and a plane
+   * \param plane the containing plane.
+   * \pre the point lies on the plane
+   * \pre the point lies on the open discontinuity arc
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3
+  (const Arr_extended_direction_3& point,
+   const Direction_3& normal) :
+    m_source(point),
+    m_target(point),
+    m_normal(normal),
+    m_is_vertical(false),
+    m_is_directed_right(z_sign(normal) == POSITIVE),
+    m_is_full(true),
+    m_is_degenerate(false),
+    m_is_empty(false)
+  {
+    CGAL_precondition(has_on(point));
+    CGAL_precondition(z_sign(normal) != ZERO);
+#if !defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED)
+    CGAL_error_msg( "Full x-monotone arcs are not supported!");
+#endif
+  }
+
+  /*! Construct a spherical_arc from two endpoints directions contained
+   * in a plane.
+   * \param plane the containing plane.
+   * \param source the source-point direction.
+   * \param target the target-point direction.
+   * \pre Both endpoint lie on the given plane.
+   * \pre Both endpoint lie on the given plane.
+   */
+  Arr_x_monotone_geodesic_arc_on_sphere_3
+  (const Arr_extended_direction_3& source,
+   const Arr_extended_direction_3& target,
+   const Direction_3& normal) :
+    m_source(source),
+    m_target(target),
+    m_normal(normal),
+    m_is_full(false),
+    m_is_degenerate(false),
+    m_is_empty(false)
+  {
+    CGAL_precondition(has_on(source));
+    CGAL_precondition(has_on(target));
+
+    // Check whether any one of the endpoint coincide with a pole:
+    if (source.is_max_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(false);
+      return;
+    }
+    if (source.is_min_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(true);
+      return;
+    }
+    if (target.is_max_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(true);
+      return;
+    }
+    if (target.is_min_boundary()) {
+      set_is_vertical(true);
+      set_is_directed_right(false);
+      return;
+    }
+
+    if (z_sign(normal) == ZERO) {
+      set_is_vertical(true);
+      bool s_is_positive, plane_is_positive;
+      CGAL::Sign xsign = x_sign(normal);
+      if (xsign == ZERO) {
+        s_is_positive = x_sign(source) == POSITIVE;
+        plane_is_positive = y_sign(normal) == NEGATIVE;
+      } else {
+        s_is_positive = y_sign(source) == POSITIVE;
+        plane_is_positive = xsign == POSITIVE;
+      }
+      bool ccw = ((plane_is_positive && s_is_positive) ||
+                  (!plane_is_positive && !s_is_positive));
+      set_is_directed_right(ccw);
+      return;
+    }
+
+    // The arc is not vertical!
+    set_is_vertical(false);
+    set_is_directed_right(z_sign(normal) == POSITIVE);
+  }
+
+  /*! Set the source endpoint direction.
+   * \param p the endpoint to set.
+   */
+  void set_source(const Direction_3& p) { m_source = p; }
+
+  /*! Set the target endpoint direction.
+   * \param p the endpoint to set.
+   */
+  void set_target(const Direction_3& p) { m_target = p; }
+
+  /*! Set the direction of the underlying plane.
+   * \param normal the plane direction.
+   */
+  void set_normal(const Direction_3& normal) { m_normal = normal; }
+
+  void set_is_vertical(bool flag) { m_is_vertical = flag; }
+  void set_is_directed_right(bool flag) { m_is_directed_right = flag; }
+  void set_is_full(bool flag) { m_is_full = flag; }
+  void set_is_degenerate(bool flag) { m_is_degenerate = flag; }
+  void set_is_empty(bool flag) { m_is_empty = flag; }
+
+  /*! Obtain the source */
+  const Arr_extended_direction_3& source() const { return m_source; }
+
+  /*! Obtain the target */
+  const Arr_extended_direction_3& target() const { return m_target; }
+
+  /*! Obtain the normal to the containing plane */
+  const Direction_3& normal() const { return m_normal; }
+
+  /*! Obtain the (lexicographically) left endpoint direction */
+  const Arr_extended_direction_3& left() const
+  { return (m_is_directed_right ? m_source : m_target); }
+
+  /*! Obtain the (lexicographically) right endpoint */
+  const Arr_extended_direction_3& right() const
+  { return (m_is_directed_right ? m_target : m_source); }
+
+  /*! Determines whether the curve is vertical */
+  bool is_vertical() const { return m_is_vertical; }
+
+  /*! Determines whether the curve is directed lexicographically from left to
+   * right
+   */
+  bool is_directed_right() const { return m_is_directed_right; }
+
+  /*! Determines whether the curve is a full circle */
+  bool is_full() const { return m_is_full; }
+
+  /*! Determines whether the curve is degenerate */
+  bool is_degenerate() const { return m_is_degenerate; }
+
+  /*! Determines whether the curve is degenerate */
+  bool is_empty() const { return m_is_empty; }
+
+  /*! Determine whether the curve lie on the identification arc */
+  bool is_on_boundary() const
+  {
+    /* If the curve is not vertical and non of its endpoints lie on the
+     * boundary, the arc itself cannot lie on the identification arc.
+     */
+    if (m_source.is_no_boundary() || m_target.is_no_boundary() ||
+        !is_vertical())
+      return false;
+
+    /*! The curve is vertical. If at least one endpoint lies on the open
+     * identification arc, it entirely lies on it.
+     */
+    if (m_source.is_mid_boundary() || m_target.is_mid_boundary())
+      return true;
+
+    /* Both endpoints lie on opposite poles respectively. If the normal
+     * coincides with the normal of the plane that contains the identification
+     * arc, the arc lies on the identification arc.
+     */
+#if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0)
+    return ((x_sign(m_normal) == ZERO) &&
+            (((y_sign(m_normal) == NEGATIVE) && !is_directed_right()) ||
+             ((y_sign(m_normal) == POSITIVE) && is_directed_right())));
+#else
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    const Direction_3& iden_normal = Traits::identification_normal();
+    const Direction_2 iden_normal_xy = Traits::project_xy(iden_normal);
+    Direction_2 normal_xy = Traits::project_xy(m_normal);
+    Kernel kernel;
+    if (is_directed_right()) {
+      return kernel.equal_2_object()(normal_xy, iden_normal_xy);
+    } else {
+      Direction_2 opposite_normal_xy =
+        kernel.construct_opposite_direction_2_object()(normal_xy);
+      return kernel.equal_2_object()(opposite_normal_xy, iden_normal_xy);
+    }
+#endif
+  }
+
+  /*! Determine whether the given point is in the x-range of the
+   * spherical_arc.
+   * \param point the query point direction.
+   * \return true if point is in the x-range of the (closed) spherical_arc and
+   * false otherwise.
+   * \pre point does not coincide with one of the poles
+   */
+  bool is_in_x_range(const Arr_extended_direction_3& point) const
+  {
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    CGAL_precondition(!point.is_min_boundary());
+    CGAL_precondition(!point.is_max_boundary());
+
+    Direction_2 p = Traits::project_xy(point);
+    if (is_vertical()) {
+      Direction_2 q = (is_directed_right()) ?
+        Direction_2(-(m_normal.dy()), m_normal.dx()) :
+        Direction_2(m_normal.dy(), -(m_normal.dx()));
+      Kernel kernel;
+      return kernel.equal_2_object()(p, q);
+    }
+
+    // The curve is not vertical:
+    Direction_2 r = Traits::project_xy(right());
+    Kernel kernel;
+    if (kernel.equal_2_object()(p, r)) return true;
+    Direction_2 l = Traits::project_xy(left());
+    if (kernel.equal_2_object()(p, l)) return true;
+    return kernel.counterclockwise_in_between_2_object()(p, l, r);
+  }
+
+  /*! Determines whether the curve is a meridian */
+  bool is_meridian() const
+  { return left().is_min_boundary() && right().is_max_boundary(); }
+
+#if 0
+  /*! Create a bounding box for the spherical_arc */
+  Bbox_2 bbox() const
+  {
+    Kernel kernel;
+    Segment_2 seg = kernel.construct_spherical_arc_2_object()(this->m_source,
+                                                              this->m_target);
+    return kernel.construct_bbox_2_object()(seg);
+  }
+#endif
+
+  /*! Flip the spherical_arc (swap it source and target) */
+  Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const
+  {
+    Arr_x_monotone_geodesic_arc_on_sphere_3 opp;
+    opp.m_source = this->m_target;
+    opp.m_target = this->m_source;
+    opp.m_normal = this->m_normal;
+    opp.m_is_directed_right = !(this->is_directed_right());
+    opp.m_is_vertical = this->is_vertical();
+    opp.m_is_full = this->is_full();
+    opp.m_is_degenerate = this->is_degenerate();
+    opp.m_is_empty = this->is_empty();
+    return opp;
+  }
+
+  /*! Determined whether a direction is contained in a plane
+   * \param plane the 3D plane.
+   * \param dir the 3D direction.
+   * \return true if dir is contained in plane; false otherwise.
+   * \pre the plane contains the origin.
+   */
+  inline bool has_on(const Direction_3& dir) const
+  {
+    typename Kernel::FT dot = normal().vector() * dir.vector();
+    return CGAL::sign(dot) == ZERO;
+  }
+};
+
+/*! A representation of a general great circular arc embedded on a sphere,
+ * used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class
+ * An arc is uniqely represented by a plane p, and two endpoints the source
+ * s and the target t, which lie in the plane p. The points of the arc are
+ * the locus of points visited when moving from the source s toward the
+ * target t on the plane p in counterclockwise direction along the circle
+ * defined by s and t.
+ */
+template <typename T_Kernel>
+class Arr_geodesic_arc_on_sphere_3 :
+  public Arr_x_monotone_geodesic_arc_on_sphere_3<T_Kernel> {
+public:
+  typedef T_Kernel                                              Kernel;
+
+protected:
+  typedef Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>       Base;
+
+public:
+  typedef typename Base::Plane_3                                Plane_3;
+  typedef typename Base::Direction_3                            Direction_3;
+  typedef typename Base::Direction_2                            Direction_2;
+
+protected:
+  // For some reason compilation under Windows fails without the qualifier
+  typedef CGAL::Arr_extended_direction_3<Kernel>    Arr_extended_direction_3;
+
+  using Base::x_sign;
+  using Base::y_sign;
+  using Base::z_sign;
+
+  /*! Indicates whether the arc is x-monotone */
+  bool m_is_x_monotone;
+
+public:
+  /*! Default constructor - constructs an empty arc */
+  Arr_geodesic_arc_on_sphere_3() : Base(), m_is_x_monotone(true) {}
+
+  /*! Copy constructor
+   * \param other the other arc
+   */
+  Arr_geodesic_arc_on_sphere_3
+  (const Arr_geodesic_arc_on_sphere_3& other) : Base(other)
+  {
+    m_is_x_monotone = other.m_is_x_monotone;
+  }
+
+  /*! Constructor
+   * \param src the source point of the arc
+   * \param trg the target point of the arc
+   * \param normal the normal to the  plane that contains the arc
+   * \param is_x_monotone is arc  x-monotone ?
+   * \param is_vertical is the arc vertical ?
+   * \param is_directed_right is the arc directed from left to right?
+   * \param is_full is the arc a full (great) circle?
+   * \param is_degenerate is the arc degenerate (single point)?
+   * \pre plane contains the origin
+   * \pre plane contains src
+   * \pre plane contains trg
+   */
+  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& src,
+                               const Arr_extended_direction_3& trg,
+                               const Direction_3& normal,
+                               bool is_x_monotone, bool is_vertical,
+                               bool is_directed_right,
+                               bool is_full = false,
+                               bool is_degenerate = false,
+                               bool is_empty = false) :
+    Base(src, trg, normal,
+         is_vertical, is_directed_right, is_full, is_degenerate, is_empty),
+    m_is_x_monotone(is_x_monotone)
+  {
+    CGAL_precondition(this->has_on(src));
+    CGAL_precondition(this->has_on(trg));
+  }
+
+  /*! Construct a spherical_arc from two endpoint directions. It is assumed
+   * that the arc is the one with the smaller angle among the two.
+   * 1. Find out whether the arc is x-monotone.
+   * 2. If it is x-monotone,
+   *    2.1 Find out whether it is vertical, and
+   *    2.2 whether the target is larger than the source (directed right).
+   * The arc is vertical, iff
+   * 1. one of its endpoint direction pierces a pole, or
+   * 2. the projections onto the xy-plane coincide.
+   * \param source the source point.
+   * \param target the target point.
+   * \pre the source and target cannot be equal.
+   * \pre the source and target cannot be the opoosite of each other.
+   */
+  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source,
+                               const Arr_extended_direction_3& target)
+  {
+    this->set_source(source);
+    this->set_target(target);
+    this->set_is_full(false);
+    this->set_is_degenerate(false);
+    this->set_is_empty(false);
+
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel>         Traits;
+    typedef typename Kernel::Direction_2                        Direction_2;
+    typedef typename Kernel::Direction_3                        Direction_3;
+
+    Kernel kernel;
+    CGAL_precondition(!kernel.equal_3_object()(source, target));
+    CGAL_precondition(!kernel.equal_3_object()
+                      (kernel.construct_opposite_direction_3_object()(source),
+                       target));
+    this->m_normal = this->construct_normal_3(source, target);
+
+    // Check whether one of the endpoints coincides with a pole: */
+    if (source.is_max_boundary()) {
+      this->set_is_vertical(true);
+      this->set_is_directed_right(false);
+      set_is_x_monotone(true);
+      return;
+    }
+    if (source.is_min_boundary()) {
+      this->set_is_vertical(true);
+      this->set_is_directed_right(true);
+      set_is_x_monotone(true);
+      return;
+    }
+    if (target.is_max_boundary()) {
+      this->set_is_vertical(true);
+      this->set_is_directed_right(true);
+      set_is_x_monotone(true);
+      return;
+    }
+    if (target.is_min_boundary()) {
+      this->set_is_vertical(true);
+      this->set_is_directed_right(false);
+      set_is_x_monotone(true);
+      return;
+    }
+
+    // None of the enpoints coincide with a pole:
+    Direction_3 normal = this->m_normal;
+    if (z_sign(normal) == ZERO) {
+      // The arc is vertical
+      this->set_is_vertical(true);
+      bool s_is_positive, t_is_positive, plane_is_positive;
+      CGAL::Sign xsign = x_sign(normal);
+      if (xsign == ZERO) {
+        s_is_positive = x_sign(source) == POSITIVE;
+        t_is_positive = x_sign(target) == POSITIVE;
+        plane_is_positive = y_sign(normal) == NEGATIVE;
+      } else {
+        s_is_positive = y_sign(source) == POSITIVE;
+        t_is_positive = y_sign(target) == POSITIVE;
+        plane_is_positive = xsign == POSITIVE;
+      }
+      set_is_x_monotone(s_is_positive == t_is_positive);
+      bool ccw = ((plane_is_positive && s_is_positive) ||
+                  (!plane_is_positive && !s_is_positive));
+      this->set_is_directed_right(ccw);
+      return;
+    }
+
+    // The arc is not vertical!
+    this->set_is_vertical(false);
+    Direction_2 s = Traits::project_xy(source);
+    Direction_2 t = Traits::project_xy(target);
+    Orientation orient = Traits::orientation(s, t);
+
+    const Direction_2& d = Traits::identification_xy();
+    if (orient == LEFT_TURN) {
+      this->set_is_directed_right(true);
+      set_is_x_monotone(!kernel.counterclockwise_in_between_2_object()(d, s, t));
+      return;
+    }
+
+    // (orient == RIGHT_TURN)
+    this->set_is_directed_right(false);
+    set_is_x_monotone(!kernel.counterclockwise_in_between_2_object()(d, t, s));
+    return;
+  }
+
+  /*! Construct a spherical_arc from two endpoint directions contained
+   * in a plane.
+   * \param plane the containing plane.
+   * \param source the source-point direction.
+   * \param target the target-point direction.
+   * \param normal the normal to the plane containing the arc
+   * \pre plane contain the origin
+   * \pre Both endpoints lie on the given plane.
+   */
+  Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source,
+                               const Arr_extended_direction_3& target,
+                               const Direction_3& normal)
+  {
+    Kernel kernel;
+
+    this->set_source(source);
+    this->set_target(target);
+    this->set_normal(normal);
+    this->set_is_degenerate(false);
+    this->set_is_empty(false);
+
+    typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel> Traits;
+
+    CGAL_precondition(this->has_on(source));
+    CGAL_precondition(this->has_on(target));
+
+    if (z_sign(normal) == ZERO) {
+      this->set_is_vertical(true);
+
+      // Check whether both endpoint coincide with the poles:
+      if (source.is_min_boundary() && target.is_max_boundary()) {
+        // Both endpoints coincide with the 2 poles respectively.
+        this->set_is_directed_right(true);
+        this->set_is_full(false);
+        set_is_x_monotone(true);
+        return;
+      }
+
+      if (source.is_max_boundary() && target.is_min_boundary()) {
+        // Both endpoints coincide with the 2 poles respectively.
+        this->set_is_directed_right(false);
+        this->set_is_full(false);
+        set_is_x_monotone(true);
+        return;
+      }
+
+      CGAL::Sign xsign = x_sign(normal);
+      bool xz_plane = xsign == ZERO;
+      bool s_is_positive, t_is_positive, plane_is_positive;
+      if (xz_plane) {
+        s_is_positive = x_sign(source) == POSITIVE;
+        t_is_positive = x_sign(target) == POSITIVE;
+        plane_is_positive = y_sign(normal) == NEGATIVE;
+      } else {
+        s_is_positive = y_sign(source) == POSITIVE;
+        t_is_positive = y_sign(target) == POSITIVE;
+        plane_is_positive = xsign == POSITIVE;
+      }
+
+      // Process degenerate cases:
+      if (source.is_min_boundary()) {
+        this->set_is_directed_right(true);
+        set_is_x_monotone((plane_is_positive && t_is_positive) ||
+                          (!plane_is_positive && !t_is_positive));
+        return;
+      }
+      if (source.is_max_boundary()) {
+        this->set_is_directed_right(false);
+        set_is_x_monotone((plane_is_positive && !t_is_positive) ||
+                          (!plane_is_positive && t_is_positive));
+        return;
+      }
+      if (target.is_min_boundary()) {
+        this->set_is_directed_right(false);
+        set_is_x_monotone((plane_is_positive && !s_is_positive) ||
+                          (!plane_is_positive && s_is_positive));
+        return;
+      }
+      if (target.is_max_boundary()) {
+        this->set_is_directed_right(true);
+        set_is_x_monotone((plane_is_positive && s_is_positive) ||
+                          (!plane_is_positive && !s_is_positive));
+        return;
+      }
+      if (s_is_positive != t_is_positive) {
+        set_is_x_monotone(false);
+        return;
+      }
+
+      /* Non of the endpoints coincide with a pole.
+       * The projections of both endpoints lie on the same hemi-circle.
+       * Thus, either the arc is x-monotone, or it includes both poles.
+       * This means that it is sufficient to check whether one pole lies
+       * on the arc in order to determine x-monotonicity
+       */
+
+      typename Traits::Project project =
+        (xz_plane) ? Traits::project_xz : Traits::project_yz;
+      Direction_2 s = project(source);
+      Direction_2 t = project(target);
+      const Direction_2& ny = Traits::neg_y_2();
+      typename Kernel::Counterclockwise_in_between_2 ccib =
+        kernel.counterclockwise_in_between_2_object();
+      set_is_x_monotone((plane_is_positive && !ccib(ny, s, t)) ||
+                        (!plane_is_positive && !ccib(ny, t, s)));
+
+      bool ccw = ((plane_is_positive && s_is_positive) ||
+                  (!plane_is_positive && !s_is_positive));
+      this->set_is_directed_right(ccw);
+      return;
+    }
+
+    // The arc is not vertical!
+    this->set_is_vertical(false);
+    this->set_is_directed_right(z_sign(normal) == POSITIVE);
+    const Direction_2& d = Traits::identification_xy();
+    Direction_2 s = Traits::project_xy(source);
+    Direction_2 t = Traits::project_xy(target);
+    typename Kernel::Counterclockwise_in_between_2 ccib =
+      kernel.counterclockwise_in_between_2_object();
+    bool plane_is_positive = (z_sign(normal) == POSITIVE);
+    set_is_x_monotone((plane_is_positive && !ccib(d, s, t)) ||
+                      (!plane_is_positive && !ccib(d, t, s)));
+  }
+
+  /*! Construct a full spherical_arc from a plane.
+   * \param plane the containing plane.
+   */
+  Arr_geodesic_arc_on_sphere_3(const Direction_3& normal)
+  {
+    this->normal(normal);
+    this->set_is_vertical(CGAL::sign(normal.dz()) == ZERO);
+    this->set_is_directed_right(true);
+    this->set_is_full(true);
+    this->set_is_degenerate(false);
+    this->set_is_empty(false);
+    set_is_x_monotone(false);
+  }
+
+  /*! Indicates whether the arc is x-monotone
+   * \return true if the arc is x-monotone; false otherwise
+   */
+  bool is_x_monotone() const { return m_is_x_monotone; }
+
+  /*! Set the flag that indicates whether the arc is x-monotone
+   * \param flag indicates whether the arc is x-monotone
+   */
+  void set_is_x_monotone(bool flag) { m_is_x_monotone = flag; }
+};
+
+/*! Inserter for the spherical_arc class used by the traits-class */
+template <typename Kernel, typename OutputStream>
+OutputStream& operator<<(OutputStream& os,
+                         const Arr_extended_direction_3<Kernel>& ed)
+{
+#if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS)
+  os << "("
+     << ed.dx() << ", " << ed.dy() << ",  " << ed.dz();
+  os << ")"
+     << ", "
+     << (ed.is_min_boundary() ? "min" :
+         ed.is_max_boundary() ? "max" :
+         ed.is_mid_boundary() ? "dis" : "reg");
+#else
+  // CGAL::To_double<typename Kernel::FT> todouble;
+  // os << static_cast<float>(todouble(ed.dx())) << ", "
+  //    << static_cast<float>(todouble(ed.dy())) << ", "
+  //    << static_cast<float>(todouble(ed.dz()));
+#endif
+  const typename Kernel::Direction_3* dir = &ed;
+  os << *dir;
+  return os;
+}
+
+/*! Inserter for the spherical_arc class used by the traits-class */
+template <typename Kernel, typename OutputStream>
+OutputStream&
+operator<<(OutputStream& os,
+           const Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>& arc)
+{
+#if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS)
+  os << "("
+     << "(" << arc.source() << "), (" << arc.target() << ")"
+     << "("
+     << ", (" << arc.normal() << ")"
+     << ", " << (arc.is_vertical() ? " |" : "!|")
+     << ", " << (arc.is_directed_right() ? "=>" : "<=")
+     << ", " << (arc.is_full() ? "o" : "/");
+#else
+  os << arc.source() << " " << arc.target() << " ";
+  if (!arc.is_meridian()) os << "0";
+  else os << "1 " << arc.normal();
+#endif
+  return os;
+}
+
+/*! Extractor for the spherical-arc point class used by the traits-class */
+template <typename Kernel, typename InputStream>
+InputStream&
+operator>>(InputStream& is, Arr_extended_direction_3<Kernel>& point)
+{
+  typename Kernel::Direction_3* dir = &point;
+  is >> *dir;
+  point.init();
+  return is;
+}
+
+/*! Extractor for the spherical_arc class used by the traits-class */
+template <typename Kernel, typename InputStream>
+InputStream&
+operator>>(InputStream& is,
+           Arr_x_monotone_geodesic_arc_on_sphere_3<Kernel>& arc)
+{
+  Arr_extended_direction_3<Kernel> source, target;
+  is >> source >> target;
+  arc.set_source(source);
+  arc.set_target(target);
+  unsigned int flag;
+  is >> flag;
+  if (flag == 1) {
+    typename Kernel::Direction_3 normal;
+    is >> normal;
+    arc.set_normal(normal);
+  }
+  else {
+    Kernel kernel;
+    CGAL_precondition(!kernel.equal_3_object()
+                      (kernel.construct_opposite_direction_3_object()(source),
+                       target));
+    typename Kernel::Vector_3 v =
+      kernel.construct_cross_product_vector_3_object()(source.vector(),
+                                                       target.vector());
+    arc.set_normal(v.direction());
+  }
+  arc.init();
+  return is;
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Arr_plane_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Arr_plane_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Arr_plane_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_cache.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_cache.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_cache.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
new file mode 100644
index 0000000..d5dda23
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
@@ -0,0 +1,957 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
+//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
+
+#ifndef CGAL_BEZIER_CURVE_2_H
+#define CGAL_BEZIER_CURVE_2_H
+
+/*! \file
+ * Header file for the _Bezier_curve_2 class.
+ */
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Arr_geometry_traits/de_Casteljau_2.h>
+#include <algorithm>
+#include <deque>
+#include <vector>
+#include <list>
+#include <CGAL/Arr_enums.h>
+#include <ostream>
+
+namespace CGAL {
+
+/*! \class _Bezier_curve_2
+ * Representation of a Bezier curve, specified by (n+1) control points
+ * p_0, ... , p_n that define the curve (X(t), Y(t)) for 0 <= t <= 1,
+ * where X(t) and Y(t) are polynomials of degree n.
+ *
+ * The class is templated with three parameters:
+ * Rat_kernel A geometric kernel, where Alg_kernel::FT is the number type
+ *            for the coordinates of control points (and subsequently also for
+ *            the polynomial coefficients). This number type must be the same
+ *            as Nt_traits::Rational.
+ * Alg_kernel A geometric kernel, where Alg_kernel::FT is a number type
+ *            for representing algebraic numbers. This number type must be the
+ *            same as Nt_traits::Algebraic.
+ * Nt_traits A traits class that defines the Integer, Rational and Algebraic
+ *           number-types, as well as the Polynomial class (a polynomial with
+ *           integer coefficients) and enables performing various operations
+ *           on objects of these types.
+ * Bounding_traits A traits class for filtering the exact computations.
+ */
+
+// Forward declaration:
+template <class RatKernel_, class AlgKernel_, class NtTraits_,
+          class BoundingTraits_>
+class _Bezier_curve_2;
+
+template <class RatKernel_, class AlgKernel_, class NtTraits_,
+          class BoundingTraits_>
+class _Bezier_curve_2_rep
+{
+  friend class _Bezier_curve_2<RatKernel_, AlgKernel_, NtTraits_,
+                               BoundingTraits_>;
+
+public:
+
+  typedef RatKernel_                              Rat_kernel;
+  typedef AlgKernel_                              Alg_kernel;
+  typedef NtTraits_                               Nt_traits;
+  typedef BoundingTraits_                         Bounding_traits;
+
+  typedef typename Rat_kernel::Point_2            Rat_point_2;
+  typedef typename Alg_kernel::Point_2            Alg_point_2;
+
+  typedef typename Nt_traits::Integer             Integer;
+  typedef typename Nt_traits::Rational            Rational;
+  typedef typename Nt_traits::Algebraic           Algebraic;
+  typedef typename Nt_traits::Polynomial          Polynomial;
+
+private:
+
+  typedef std::deque<Rat_point_2>                 Control_point_vec;
+
+  Control_point_vec   _ctrl_pts;      /*!< The control points (we prefer deque
+                                           to a vector, as it enables
+                                           push_front()). */
+  Bbox_2              _bbox;          /*!< A bounding box for the curve. */
+  bool                _no_self_inter; /*!< Whether the curve surely has  no
+                                           self intersections. */
+
+  /// \name Lazily-evaluated values of the polynomials B(t) = (X(t), Y(t)).
+  //@{
+
+  // X(t) is given by *p_polyX(t) / _normX:
+  mutable Polynomial        *p_polyX;       // The polynomial for x.
+  mutable Integer           *p_normX;       // Normalizing factor for y.
+
+  // Y(t) is given by _polyY(t) / _normY:
+  mutable Polynomial        *p_polyY;       // The polynomial for y.
+  mutable Integer           *p_normY;       // Normalizing factor for y.
+  //@}
+
+public:
+
+  /*! Default constructor. */
+  _Bezier_curve_2_rep () :
+    _no_self_inter (true),
+    p_polyX(NULL),
+    p_normX(NULL),
+    p_polyY(NULL),
+    p_normY(NULL)
+  {}
+
+  /*! Copy constructor (isn't really used). */
+  _Bezier_curve_2_rep (const _Bezier_curve_2_rep& other) :
+    _ctrl_pts(other._ctrl_pts),
+    _bbox(other._bbox),
+    _no_self_inter(other._no_self_inter),
+    p_polyX(NULL),
+    p_normX(NULL),
+    p_polyY(NULL),
+    p_normY(NULL)
+  {
+    if (other.p_polyX != NULL)
+      p_polyX = new Polynomial(*(other.p_polyX));
+    if (other.p_polyY != NULL)
+      p_polyY = new Polynomial(*(other.p_polyY));
+    if (other.p_normX != NULL)
+      p_normX = new Integer(*(other.p_normX));
+    if (other.p_normY != NULL)
+      p_normY = new Integer(*(other.p_normY));
+  }
+
+  /*!
+   * Constructor from a given range of control points.
+   * \param pts_begin An iterator pointing to the first point in the range.
+   * \param pts_end A past-the-end iterator for the range.
+   * \pre The value-type of the input iterator must be Rat_kernel::Point_2.
+   *      It is forbidden to specify two identical consecutive control points.
+   */
+  template <class InputIterator>
+  _Bezier_curve_2_rep (InputIterator pts_begin, InputIterator pts_end) :
+    p_polyX(NULL),
+    p_normX(NULL),
+    p_polyY(NULL),
+    p_normY(NULL)
+  {
+    // Copy the control points and compute their bounding box.
+    const int   pts_size = std::distance (pts_begin, pts_end);
+    double      x, y;
+    double      x_min = 0, x_max = 0;
+    double      y_min = 0, y_max = 0;
+    int         k;
+
+    CGAL_precondition_msg (pts_size > 1,
+                           "There must be at least 2 control points.");
+
+    _ctrl_pts.resize (pts_size);
+
+    for (k = 0; pts_begin != pts_end; ++pts_begin, k++)
+    {
+//SL: Acccording to the fact that all operations are based on polynomials
+//    duplicated control points can be allowed.
+//      // Make sure that we do not have two identical consecutive control
+//      // points.
+//      CGAL_precondition_msg
+//          (k == 0 || ! equal (*pts_begin, _ctrl_pts[k - 1]),
+//           "Two consecutive control points must not be identical.");
+
+      // Copy the current control point.
+      _ctrl_pts[k] = *pts_begin;
+
+      // Update the bounding box, if necessary.
+      x = CGAL::to_double (pts_begin->x());
+      y = CGAL::to_double (pts_begin->y());
+
+      if (k == 0)
+      {
+        x_min = x_max = x;
+        y_min = y_max = y;
+      }
+      else
+      {
+        if (x < x_min)
+          x_min = x;
+        else if (x > x_max)
+          x_max = x;
+
+        if (y < y_min)
+          y_min = y;
+        else if (y > y_max)
+          y_max = y;
+      }
+    }
+
+    // Construct the bounding box.
+    _bbox = Bbox_2 (x_min, y_min, x_max, y_max);
+
+    // Use the bounding traits to determine whether the curve surely has
+    // not self intersections.
+    Bounding_traits     bound_tr;
+
+    _no_self_inter = ! bound_tr.may_have_self_intersections (_ctrl_pts);
+  }
+
+  /*! Destructor. */
+  ~_Bezier_curve_2_rep ()
+  {
+    if (p_polyX != NULL)
+      delete p_polyX;
+    if (p_normX != NULL)
+      delete p_normX;
+    if (p_polyY != NULL)
+      delete p_polyY;
+    if (p_normY != NULL)
+      delete p_normY;
+  }
+
+  /// \name Access the polynomials (lazily evaluated).
+  //@{
+
+  /*! Check if the polynomials are already constructed. */
+  bool has_polynomials () const
+  {
+    return (p_polyX != NULL && p_normX != NULL &&
+            p_polyY != NULL && p_normY != NULL);
+  }
+
+  /*! Get the polynomial X(t). */
+  const Polynomial& x_polynomial () const
+  {
+    if (p_polyX == NULL)
+      _construct_polynomials ();
+
+    return (*p_polyX);
+  }
+
+  /*! Get the normalizing factor for X(t). */
+  const Integer& x_norm () const
+  {
+    if (p_normX == NULL)
+      _construct_polynomials ();
+
+    return (*p_normX);
+  }
+
+  /*! Get the polynomial Y(t). */
+  const Polynomial& y_polynomial () const
+  {
+    if (p_polyY == NULL)
+      _construct_polynomials ();
+
+    return (*p_polyY);
+  }
+
+  /*! Get the normalizing factor for Y(t). */
+  const Integer& y_norm () const
+  {
+    if (p_normY == NULL)
+      _construct_polynomials ();
+
+    return (*p_normY);
+  }
+  //@}
+
+private:
+
+  /*!
+   * Construct the representation of X(t) and Y(t).
+   * The function is declared as "const" as it changes only mutable members.
+   */
+  void _construct_polynomials () const;
+
+  /*!
+   * Compute the value of n! / (j! k! (n-k-j)!).
+   */
+  Integer _choose (int n, int j, int k) const;
+
+};
+
+template <class RatKernel_, class AlgKernel_, class NtTraits_,
+          class BoundingTraits_>
+class _Bezier_curve_2 :
+  public Handle_for<_Bezier_curve_2_rep<RatKernel_,
+                                        AlgKernel_,
+                                        NtTraits_,
+                                        BoundingTraits_> >
+{
+public:
+
+  typedef RatKernel_                              Rat_kernel;
+  typedef AlgKernel_                              Alg_kernel;
+  typedef NtTraits_                               Nt_traits;
+  typedef BoundingTraits_                         Bounding_traits;
+  typedef _Bezier_curve_2<Rat_kernel,
+                          Alg_kernel,
+                          Nt_traits,
+                          Bounding_traits>        Self;
+
+private:
+
+  typedef _Bezier_curve_2_rep<Rat_kernel,
+                              Alg_kernel,
+                              Nt_traits,
+                              Bounding_traits>    Bcv_rep;
+  typedef Handle_for<Bcv_rep>                     Bcv_handle;
+
+  typedef typename Bcv_rep::Control_point_vec     Control_pt_vec;
+
+public:
+
+  typedef typename Bcv_rep::Rat_point_2           Rat_point_2;
+  typedef typename Bcv_rep::Alg_point_2           Alg_point_2;
+
+  typedef typename Bcv_rep::Integer               Integer;
+  typedef typename Bcv_rep::Rational              Rational;
+  typedef typename Bcv_rep::Algebraic             Algebraic;
+  typedef typename Bcv_rep::Polynomial            Polynomial;
+
+  typedef typename Control_pt_vec::const_iterator Control_point_iterator;
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  _Bezier_curve_2 () :
+    Bcv_handle (Bcv_rep())
+  {}
+
+  /*!
+   * Copy constructor.
+   */
+  _Bezier_curve_2 (const Self& bc) :
+    Bcv_handle (bc)
+  {}
+
+  /*!
+   * Constructor from a given range of control points.
+   * \param pts_begin An iterator pointing to the first point in the range.
+   * \param pts_end A past-the-end iterator for the range.
+   * \pre The value-type of the input iterator must be Rat_kernel::Point_2.
+   *      It is forbidden to specify two identical consecutive control points.
+   */
+  template <class InputIterator>
+  _Bezier_curve_2 (InputIterator pts_begin, InputIterator pts_end) :
+    Bcv_handle (Bcv_rep (pts_begin, pts_end))
+  {}
+
+  /*!
+   * Assignment operator.
+   */
+  Self& operator= (const Self& bc)
+  {
+    if (this == &bc || this->identical (bc))
+      return (*this);
+
+    Bcv_handle::operator= (bc);
+    return (*this);
+  }
+
+  /*!
+   * Get a unique curve ID (based on the actual representation pointer).
+   */
+  size_t id () const
+  {
+    return (reinterpret_cast<size_t> (this->ptr()));
+  }
+
+  /*!
+   * Get the polynomial for the x-coordinates of the curve.
+   */
+  const Polynomial& x_polynomial () const
+  {
+    return (this->_rep().x_polynomial());
+  }
+
+  /*!
+   * Get the normalizing factor for the x-coordinates.
+   */
+  const Integer& x_norm () const
+  {
+    return (this->_rep().x_norm());
+  }
+
+  /*!
+   * Get the polynomial for the y-coordinates of the curve.
+   */
+  const Polynomial& y_polynomial () const
+  {
+    return (this->_rep().y_polynomial());
+  }
+
+  /*!
+   * Get the normalizing factor for the y-coordinates.
+   */
+  const Integer& y_norm () const
+  {
+    return (this->_rep().y_norm());
+  }
+
+  /*!
+   * Get the number of control points inducing the Bezier curve.
+   */
+  unsigned int number_of_control_points () const
+  {
+    return (this->_rep()._ctrl_pts.size());
+  }
+
+  /*!
+   * Get the i'th control point.
+   * \pre i must be between 0 and n - 1, where n is the number of control
+   *      points.
+   */
+  const Rat_point_2& control_point (unsigned int i) const
+  {
+    CGAL_precondition (i < number_of_control_points());
+
+    return ((this->_rep()._ctrl_pts)[i]);
+  }
+
+  /*!
+   * Get an interator for the first control point.
+   */
+  Control_point_iterator control_points_begin () const
+  {
+    return (this->_rep()._ctrl_pts.begin());
+  }
+
+  /*!
+   * Get a past-the-end interator for control points.
+   */
+  Control_point_iterator control_points_end () const
+  {
+    return (this->_rep()._ctrl_pts.end());
+  }
+
+  /*!
+   * Check if both curve handles refer to the same object.
+   */
+  bool is_same (const Self& bc) const
+  {
+    return (this->identical (bc));
+  }
+
+  /*!
+   * Compute a point of the Bezier curve given a rational t-value.
+   * \param t The given t-value.
+   * \return The point B(t).
+   */
+  Rat_point_2 operator() (const Rational& t) const;
+
+  /*!
+   * Compute a point of the Bezier curve given an algebraic t-value.
+   * \param t The given t-value.
+   * \return The point B(t).
+   */
+  Alg_point_2 operator() (const Algebraic& t) const;
+
+  /*!
+   * Sample a portion of the curve (for drawing purposes, etc.).
+   * \param t_start The t-value to start with.
+   * \param t_end The t-value to end at.
+   * \param n_samples The required number of samples.
+   * \param oi Output: An output iterator for the samples. The value-type of
+   *                   this iterator must be std::pair<double, double>.
+   * \return A past-the-end iterator for the samples.
+   */
+  template <class OutputIterator>
+  OutputIterator sample (const double& t_start, const double& t_end,
+                         unsigned int n_samples,
+                         OutputIterator oi) const
+  {
+    // Convert the coordinates of the control points to doubles.
+    typedef Simple_cartesian<double>                        App_kernel;
+    typedef App_kernel::Point_2                             App_point_2;
+
+    const unsigned int             n_pts = number_of_control_points();
+    std::vector<App_point_2>       app_ctrl_pts (n_pts);
+    unsigned int                   k;
+
+    for (k = 0; k < n_pts; k++)
+    {
+      const Rat_point_2&   pt = control_point(k);
+
+      app_ctrl_pts[k] = App_point_2 (CGAL::to_double (pt.x()),
+                                     CGAL::to_double (pt.y()));
+    }
+
+    // Sample the approximated curve.
+    const unsigned int   n = (n_samples >= 2) ? n_samples : 2;
+    const double         delta_t = (t_end - t_start) / (n - 1);
+    App_point_2          p;
+
+    for (k = 0; k < n; k++)
+    {
+      p = point_on_Bezier_curve_2 (app_ctrl_pts.begin(), app_ctrl_pts.end(),
+                                   t_start + k * delta_t);
+
+      *oi = std::make_pair (p.x(), p.y());
+      ++oi;
+    }
+
+    return (oi);
+  }
+
+  /*!
+   * Compute all parameter values t such that the x-coordinate of B(t) is x0.
+   * Note that the function does not return only values between 0 and 1, so
+   * the output t-values may belong to the imaginary continuation of the curve.
+   * \param x0 The given x-coordinate.
+   * \param oi Output: An output iterator for the t-values.
+   * \return A past-the-end iterator.
+   */
+  template <class OutputIterator>
+  OutputIterator get_t_at_x (const Rational& x0,
+                             OutputIterator oi) const
+  {
+    return (_solve_t_values (this->_rep().x_polynomial(),
+                             this->_rep().x_norm(),
+                             x0,
+                             oi));
+  }
+
+  /*!
+   * Compute all parameter values t such that the y-coordinate of B(t) is y0.
+   * Note that the function does not return only values between 0 and 1, so
+   * the output t-values may belong to the imaginary continuation of the curve.
+   * \param y0 The given y-coordinate.
+   * \param oi Output: An output iterator for the t-values.
+   * \return A past-the-end iterator.
+   */
+  template <class OutputIterator>
+  OutputIterator get_t_at_y (const Rational& y0,
+                             OutputIterator oi) const
+  {
+    return (_solve_t_values (this->_rep().y_polynomial(),
+                             this->_rep().y_norm(), y0,
+                             oi));
+  }
+
+  /*!
+   * Check if the two curves have the same support.
+   */
+  bool has_same_support (const Self& bc) const;
+
+  /*!
+   * Get the bounding box of the curve.
+   */
+  const Bbox_2& bbox () const
+  {
+    return (this->_rep()._bbox);
+  }
+
+  /*!
+   * Check if the curve contains not self intersections.
+   * Note that there may not be any self intersections even if the
+   * function returns true (but not vice versa).
+   */
+  bool has_no_self_intersections () const
+  {
+    return (this->_rep()._no_self_inter);
+  }
+
+private:
+
+  // Get the representation.
+  inline const Bcv_rep& _rep () const
+  {
+    return (*(this->ptr()));
+  }
+
+  inline Bcv_rep& _rep ()
+  {
+    return (*(this->ptr()));
+  }
+
+  /*!
+   * Compute all parameter values t, such that P(t) = val.
+   * \param poly The polynomial.
+   * \param norm Its normalizing factor.
+   * \param val The required value.
+   * \param oi Output: An output iterator for the t-values.
+   * \return A past-the-end iterator.
+   */
+  template <class OutputIterator>
+  OutputIterator _solve_t_values (const Polynomial& poly,
+                                  const Integer& norm,
+                                  const Rational& val,
+                                  OutputIterator oi) const
+  {
+    // Construct the polynomial P(t) - val = 0:
+    Nt_traits             nt_traits;
+    const Integer         numer = nt_traits.numerator (val);
+    const Integer         denom = nt_traits.denominator (val);
+    const int             deg = nt_traits.degree (poly);
+    if (deg <=0 ) return oi;
+    Integer              *coeffs = new Integer [deg + 1];
+    int                   k;
+
+    for (k = 1; k <= deg; k++)
+    {
+      coeffs[k] = nt_traits.get_coefficient (poly, k) * denom;
+    }
+    coeffs[0] = nt_traits.get_coefficient (poly, 0) * denom -
+                numer * norm;
+
+    // Solve the polynomial and obtain the t-values.
+    OutputIterator  end = nt_traits.compute_polynomial_roots
+                            (nt_traits.construct_polynomial (coeffs, deg),
+                             oi);
+
+    delete[] coeffs;
+    return (end);
+  }
+};
+
+/*!
+ * Exporter for Bezier curves.
+ */
+template <class Rat_kernel, class Alg_kernel, class Nt_traits,
+          class Bounding_traits>
+std::ostream&
+operator<< (std::ostream& os,
+            const _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
+                                  Bounding_traits> & bc)
+{
+  const unsigned int  n = bc.number_of_control_points();
+  unsigned int        k;
+
+  os << n;
+  for (k = 0; k < n; k++)
+    os << "  " << bc.control_point(k);
+
+  return (os);
+}
+
+/*!
+ * Importer for Bezier curves.
+ */
+template <class Rat_kernel, class Alg_kernel, class Nt_traits,
+          class Bounding_traits>
+std::istream&
+operator>> (std::istream& is,
+            _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
+                            Bounding_traits> & bc)
+{
+  // Read the number of control points.
+  unsigned int  n;
+
+  is >> n;
+
+  // Read the control points.
+  std::vector<typename Rat_kernel::Point_2>   ctrl_pts (n);
+  unsigned int                                k;
+
+  for (k = 0; k < n; k++)
+    is >> ctrl_pts[k];
+
+  // Set the Bezier curve.
+  bc = _Bezier_curve_2<Rat_kernel, Alg_kernel, Nt_traits,
+                       Bounding_traits> (ctrl_pts.begin(),
+                                         ctrl_pts.end());
+
+  return (is);
+}
+
+// ---------------------------------------------------------------------------
+// Construct the representation of X(t) and Y(t).
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+void _Bezier_curve_2_rep<RatKer, AlgKer, NtTrt,
+                         BndTrt>::_construct_polynomials () const
+{
+  const int        n = _ctrl_pts.size() - 1;
+  Rational        *coeffsX = new Rational [n + 1];
+  Rational        *coeffsY = new Rational [n + 1];
+  const Rational   rat_zero = Rational (0);
+  int              j, k;
+
+  CGAL_precondition_msg (n > 0,
+                         "There must be at least 2 control points.");
+
+  for (j = 0; j <= n; j++)
+    coeffsX[j] = coeffsY[j] = rat_zero;
+
+  // Compute the rational coefficients, given by the formula:
+  //
+  //                     n
+  //                   *****
+  //                   *   *      / n \   k        n-k
+  //   (X(t), Y(t)) =   *    p_k (     ) t  (1 - t)
+  //                   *   *      \ k /
+  //                   *****
+  //                    k=0
+  //
+  Rational               px, py;
+  Integer                n_over_k_j;
+  bool                   even_exp;
+
+  typename Control_point_vec::const_iterator pts_begin = _ctrl_pts.begin();
+  typename Control_point_vec::const_iterator pts_end = _ctrl_pts.end();
+
+  for (k = 0; pts_begin != pts_end; ++pts_begin, k++)
+  {
+    px = pts_begin->x();
+    py = pts_begin->y();
+
+    // By simplifying (1 - t)^(n-k) we obtain that the k'th expression of
+    // the above sum is given by:
+    //
+    //     n-k
+    //    *****
+    //    *   *     j            n!         j+k
+    //     *    (-1)  p_k ---------------- t
+    //    *   *            j! k! (n-k-j)!
+    //    *****
+    //     j=0
+    //
+    even_exp = true;
+    for (j = 0; j <= n - k; j++)
+    {
+      n_over_k_j = _choose (n, k, j);
+
+      if (even_exp)
+      {
+        // We should add the current values to the coefficients of the
+        // monomial t^(n_j).
+        coeffsX[j + k] += px * n_over_k_j;
+        coeffsY[j + k] += py * n_over_k_j;
+      }
+      else
+      {
+        // We should subtract the current values from the coefficients of the
+        // monomial t^(n_j).
+        coeffsX[j + k] -= px * n_over_k_j;
+        coeffsY[j + k] -= py * n_over_k_j;
+      }
+
+      // As we increment j, negate the "even" flag for the exponent (n-j).
+      even_exp = !even_exp;
+    } // loop on j.
+  } // loop on k.
+
+  // Convert the rational polynomials to polynomials with rational
+  // coefficients (plus normalizing factors).
+  Nt_traits        nt_traits;
+  p_polyX = new Polynomial;
+  p_normX = new Integer;
+  p_polyY = new Polynomial;
+  p_normY = new Integer;
+
+  nt_traits.construct_polynomial (coeffsX, n,
+                                  *p_polyX, *p_normX);
+  delete[] coeffsX;
+
+  nt_traits.construct_polynomial (coeffsY, n,
+                                  *p_polyY, *p_normY);
+  delete[] coeffsY;
+
+//  CGAL_assertion (nt_traits.degree (*p_polyX) >= 0);
+//  CGAL_assertion (nt_traits.degree (*p_polyY) >= 0);
+
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Compute the value of n! / (j! k! (n-k-j)!).
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+typename _Bezier_curve_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::Integer
+_Bezier_curve_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_choose (int n,
+                                                             int j,
+                                                             int k) const
+{
+  Integer   reduced_fact = 1;
+  Integer   j_fact = 1, k_fact = 1;
+  int       i;
+
+  for (i = n - k - j + 1; i <= n; i++)
+    reduced_fact *= Integer (i);
+
+  for (i = 2; i <= j; i++)
+    j_fact *= Integer (i);
+
+  for (i = 2; i <= k; i++)
+    k_fact *= Integer (i);
+
+  return (CGAL::div (reduced_fact, (j_fact * k_fact)));
+}
+
+// ---------------------------------------------------------------------------
+// Compute a point on the Bezier curve B(t) given a rational t-value.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+typename _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::Rat_point_2
+_Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::operator()
+        (const Rational& t) const
+{
+  // Check for extermal t values (either 0 or 1).
+  const CGAL::Sign   sign_t = CGAL::sign (t);
+
+  CGAL_precondition (sign_t != NEGATIVE);
+
+  if (sign_t == ZERO)
+  {
+    // If t is 0, simply return the first control point.
+    return (this->_rep()._ctrl_pts[0]);
+  }
+
+  Comparison_result  res = CGAL::compare (t, Rational(1));
+
+  CGAL_precondition (res != LARGER);
+
+  if (res == EQUAL)
+  {
+    // If t is 1, simply return the first control point.
+    return (this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1]);
+  }
+
+  // Evaluate the point for 0 < t < 1.
+  if (! this->_rep().has_polynomials())
+  {
+    // Use de Casteljau's algorithm to evaluate the polynomial at t.
+    return (point_on_Bezier_curve_2 (this->_rep()._ctrl_pts.begin(),
+                                     this->_rep()._ctrl_pts.end(),
+                                     t));
+  }
+
+  // Compute the x and y coordinates using the X(t), Y(t) polynomials.
+  Rational           x, y;
+  Nt_traits          nt_traits;
+
+  x = nt_traits.evaluate_at (this->_rep().x_polynomial(), t) /
+      Rational (this->_rep().x_norm(), 1);
+  y = nt_traits.evaluate_at (this->_rep().y_polynomial(), t) /
+      Rational (this->_rep().y_norm(), 1);
+
+  // Return the point.
+  return (Rat_point_2 (x, y));
+}
+
+// ---------------------------------------------------------------------------
+// Compute a point on the Bezier curve B(t) given an algebraic t-value.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+typename _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::Alg_point_2
+_Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::operator()
+          (const Algebraic& t) const
+{
+  // Check for extermal t values (either 0 or 1).
+  Nt_traits          nt_traits;
+  const CGAL::Sign   sign_t = CGAL::sign (t);
+
+  CGAL_precondition (sign_t != NEGATIVE);
+
+  if (sign_t == ZERO)
+  {
+    // If t is 0, simply return the first control point.
+    const Rat_point_2&  p_0 = this->_rep()._ctrl_pts[0];
+
+    return (Alg_point_2 (nt_traits.convert (p_0.x()),
+                         nt_traits.convert (p_0.y())));
+  }
+
+  Comparison_result  res = CGAL::compare (t, Algebraic(1));
+
+  CGAL_precondition (res != LARGER);
+
+  if (res == EQUAL)
+  {
+    // If t is 1, simply return the first control point.
+    const Rat_point_2&  p_n =
+      this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1];
+
+    return (Alg_point_2 (nt_traits.convert (p_n.x()),
+                         nt_traits.convert (p_n.y())));
+  }
+
+  // The t-value is between 0 and 1: Compute the x and y coordinates.
+  const Algebraic    x = nt_traits.evaluate_at (this->_rep().x_polynomial(), t)/
+                         nt_traits.convert (this->_rep().x_norm());
+  const Algebraic    y = nt_traits.evaluate_at (this->_rep().y_polynomial(), t)/
+                         nt_traits.convert (this->_rep().y_norm());
+
+  return (Alg_point_2 (x, y));
+}
+
+// ---------------------------------------------------------------------------
+// Check if the two curves have the same support.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::has_same_support
+        (const Self& bc) const
+{
+  // If one curve is of degree d1 and the other of degree d2, there can be
+  // at most d1*d2 intersection points between them.
+  const int      deg1 = number_of_control_points() - 1;
+  const int      deg2 = bc.number_of_control_points() - 1;
+  const int      n_samples = deg1*deg2;
+  Rat_point_2    p1;
+  int            k;
+
+  for (k = 0; k <= n_samples; k++)
+  {
+    // Compute p1 = B1(k/n_samples), where B1 is (*this) curve.
+    if (k == 0)
+      p1 = (this->_rep()._ctrl_pts[0]);
+    else if (k == 1)
+      p1 = (this->_rep()._ctrl_pts[this->_rep()._ctrl_pts.size() - 1]);
+    else
+      p1 = this->operator() (Rational (k, n_samples));
+
+    // Get all t-values such that the x-coordinate of B2(t) equals x1,
+    // and check if there exists a t-value such that the y-coordinate of
+    // b2(t) equals the y-coordinate of p1.
+    std::list<Algebraic>                           t_vals;
+    typename std::list<Algebraic>::const_iterator  t_iter;
+    Nt_traits                             nt_traits;
+    const Algebraic&                      y1 = nt_traits.convert (p1.y());
+    bool                                  eq_y = false;
+
+    bc.get_t_at_x (p1.x(), std::back_inserter(t_vals));
+
+    for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
+    {
+      const Alg_point_2&  p2 = bc (*t_iter);
+
+      if (CGAL::compare (y1, p2.y()) == CGAL::EQUAL)
+      {
+        eq_y = true;
+        break;
+      }
+    }
+
+    // If we found a point on B1 which is not of B2, the two curves do not
+    // have the same support.
+    if (! eq_y)
+      return (false);
+  }
+
+  // If we reached here, we found (d1*d2 + 1) common points of B1 and B2.
+  // This means they have the same support.
+  return (true);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
new file mode 100644
index 0000000..eae5b0e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
@@ -0,0 +1,2836 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
+//                 Iddo Hanniel <iddoh at cs.technion.ac.il>
+
+#ifndef CGAL_BEZIER_X_MONOTONE_2_H
+#define CGAL_BEZIER_X_MONOTONE_2_H
+
+/*! \file
+ * Header file for the _Bezier_x_monotone_2 class.
+ */
+
+#include <CGAL/Arr_geometry_traits/Bezier_curve_2.h>
+#include <CGAL/Arr_geometry_traits/Bezier_point_2.h>
+#include <CGAL/Arr_geometry_traits/Bezier_cache.h>
+#include <CGAL/Arr_enums.h>
+#include <ostream>
+
+namespace CGAL {
+
+/*! \class
+ * Representation of an x-monotone Bezier subcurve, specified by a Bezier curve
+ * and two end points.
+ */
+template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_,
+          class Bounding_traits_>
+class _Bezier_x_monotone_2
+{
+public:
+
+  typedef Rat_kernel_                             Rat_kernel;
+  typedef Alg_kernel_                             Alg_kernel;
+  typedef Nt_traits_                              Nt_traits;
+  typedef Bounding_traits_                        Bounding_traits;
+  typedef _Bezier_curve_2<Rat_kernel,
+                          Alg_kernel,
+                          Nt_traits,
+                          Bounding_traits>              Curve_2;
+  typedef _Bezier_point_2<Rat_kernel,
+                          Alg_kernel,
+                          Nt_traits,
+                          Bounding_traits>              Point_2;
+  typedef _Bezier_x_monotone_2<Rat_kernel,
+                               Alg_kernel,
+                               Nt_traits,
+                               Bounding_traits>         Self;
+
+  typedef unsigned int                                  Multiplicity;
+
+  typedef _Bezier_cache<Nt_traits>                      Bezier_cache;
+
+private:
+
+  typedef typename Alg_kernel::Point_2            Alg_point_2;
+  typedef typename Rat_kernel::Point_2            Rat_point_2;
+
+  typedef typename Nt_traits::Integer             Integer;
+  typedef typename Nt_traits::Rational            Rational;
+  typedef typename Nt_traits::Algebraic           Algebraic;
+  typedef typename Nt_traits::Polynomial          Polynomial;
+
+  typedef typename Point_2::Originator               Originator;
+  typedef typename Point_2::Originator_iterator      Originator_iterator;
+  typedef typename Bounding_traits::Bez_point_bound  Bez_point_bound;
+  typedef typename Bounding_traits::Bez_point_bbox   Bez_point_bbox;
+
+  // Type definition for the vertical tangency-point mapping.
+  typedef typename Bezier_cache::Curve_id                 Curve_id;
+  typedef std::pair<Curve_id, Curve_id>                   Curve_pair;
+  typedef typename Bezier_cache::Vertical_tangency_list   Vert_tang_list;
+  typedef typename Bezier_cache::Vertical_tangency_iter   Vert_tang_iter;
+
+  // Type definition for the intersection-point mapping.
+  typedef typename Bezier_cache::Intersection_list        Intersect_list;
+  typedef typename Bezier_cache::Intersection_iter        Intersect_iter;
+
+  // Representation of an intersection point with its multiplicity:
+  typedef std::pair<Point_2,Multiplicity>                Intersection_point_2;
+
+  /*! \class Less_intersection_point
+   * Comparison functor for intersection points.
+   */
+  class Less_intersection_point
+  {
+  private:
+    Bezier_cache    *p_cache;
+
+  public:
+
+    Less_intersection_point (Bezier_cache& cache) :
+      p_cache (&cache)
+    {}
+
+    bool operator() (const Intersection_point_2& ip1,
+                     const Intersection_point_2& ip2) const
+    {
+      // Use an xy-lexicographic comparison.
+      return (ip1.first.compare_xy (ip2.first, *p_cache) == SMALLER);
+    }
+  };
+
+  // Type definition for the bounded intersection-point mapping.
+  typedef std::list<Point_2>                          Intersection_list;
+
+  /*! \struct Less_curve_pair
+   * An auxiliary functor for comparing a pair of curve IDs.
+   */
+  struct Less_curve_pair
+  {
+    bool operator() (const Curve_pair& cp1, const Curve_pair& cp2) const
+    {
+      // Compare the pairs of IDs lexicographically.
+      return (cp1.first < cp2.first ||
+              (cp1.first == cp2.first && cp1.second < cp2.second));
+    }
+  };
+
+  /*! \struct Subcurve
+   * For the usage of the _exact_vertical_position() function.
+   */
+  struct Subcurve
+  {
+    std::list<Rat_point_2>    control_points;
+    Rational                  t_min;
+    Rational                  t_max;
+
+    /*! Get the rational bounding box of the subcurve. */
+    void bbox (Rational& x_min, Rational& y_min,
+               Rational& x_max, Rational& y_max) const
+    {
+      typename std::list<Rat_point_2>::const_iterator  pit =
+        control_points.begin();
+
+      CGAL_assertion (pit != control_points.end());
+
+      x_min = x_max = pit->x();
+      y_min = y_max = pit->y();
+
+      for (++pit; pit != control_points.end(); ++pit)
+      {
+        if (CGAL::compare (x_min, pit->x()) == LARGER)
+          x_min = pit->x();
+        else if (CGAL::compare (x_max, pit->x()) == SMALLER)
+          x_max = pit->x();
+
+        if (CGAL::compare (y_min, pit->y()) == LARGER)
+          y_min = pit->y();
+        else if (CGAL::compare (y_max, pit->y()) == SMALLER)
+          y_max = pit->y();
+      }
+
+      return;
+    }
+  };
+
+public:
+
+  typedef std::map<Curve_pair,
+                   Intersection_list,
+                   Less_curve_pair>               Intersection_map;
+  typedef typename Intersection_map::value_type   Intersection_map_entry;
+  typedef typename Intersection_map::iterator     Intersection_map_iterator;
+
+private:
+
+  // Data members:
+  Curve_2       _curve;        /*!< The supporting Bezier curve. */
+  unsigned int  _xid;          /*!< The serial number of the basic x-monotone
+                                    subcurve of the Bezier curve. */
+  Point_2       _ps;           /*!< The source point. */
+  Point_2       _pt;           /*!< The target point. */
+  bool          _dir_right;    /*!< Is the subcurve directed right
+                                    (or left). */
+  bool          _inc_to_right; /*!< Does the parameter value increase when
+                                    traversing the subcurve from left to
+                                    right. */
+  bool          _is_vert;      /*!< Is the subcurve a vertical segment. */
+
+public:
+
+  /*! Default constructor. */
+  _Bezier_x_monotone_2 () :
+    _xid(0),
+    _dir_right (false),
+    _is_vert (false)
+  {}
+
+  /*!
+   * Constructor given two endpoints.
+   * \param B The supporting Bezier curve.
+   * \param xid The serial number of the x-monotone subcurve with respect to
+   *            the parameter range of the Bezier curve.
+   *            For example, if B is split to two x-monotone subcurves at t',
+   *            the subcurve defined over [0, t'] has a serial number 1,
+   *            and the other, defined over [t', 1] has a serial number 2.
+   * \param ps The source point.
+   * \param pt The target point.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre B should be an originator of both ps and pt.
+   * \pre xid is a non-zero serial number.
+   */
+  _Bezier_x_monotone_2 (const Curve_2& B, unsigned int xid,
+                        const Point_2& ps, const Point_2& pt,
+                        Bezier_cache& cache);
+
+  /*!
+   * Get the supporting Bezier curve.
+   */
+  const Curve_2& supporting_curve () const
+  {
+    return (_curve);
+  }
+
+  /*!
+   * Get the x-monotone ID of the curve.
+   */
+  unsigned int xid () const
+  {
+    return (_xid);
+  }
+
+  /*!
+   * Get the source point.
+   */
+  const Point_2& source () const
+  {
+    return (_ps);
+  }
+
+  /*!
+   * Get the target point.
+   */
+  const Point_2& target () const
+  {
+    return (_pt);
+  }
+
+  /*!
+   * Get the left endpoint (the lexicographically smaller one).
+   */
+  const Point_2& left () const
+  {
+    return (_dir_right ? _ps : _pt);
+  }
+
+  /*!
+   * Get the right endpoint (the lexicographically larger one).
+   */
+  const Point_2& right () const
+  {
+    return (_dir_right ? _pt : _ps);
+  }
+
+  /*!
+   * Check if the subcurve is a vertical segment.
+   */
+  bool is_vertical () const
+  {
+    return (_is_vert);
+  }
+
+  /*!
+   * Check if the subcurve is directed from left to right.
+   */
+  bool is_directed_right () const
+  {
+    return (_dir_right);
+  }
+
+  /*!
+   * Get the approximate parameter range defining the curve.
+   * \return A pair of t_src and t_trg, where B(t_src) is the source point
+   *         and B(t_trg) is the target point.
+   */
+  std::pair<double, double> parameter_range () const;
+
+  /*!
+   * Get the relative position of the query point with respect to the subcurve.
+   * \param p The query point.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre p is in the x-range of the arc.
+   * \return SMALLER if the point is below the arc;
+   *         LARGER if the point is above the arc;
+   *         EQUAL if p lies on the arc.
+   */
+  Comparison_result point_position (const Point_2& p,
+                                    Bezier_cache& cache) const;
+
+  /*!
+   * Compare the relative y-position of two x-monotone subcurve to the right
+   * of their intersection point.
+   * \param cv The other subcurve.
+   * \param p The intersection point.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre p is incident to both subcurves, and both are defined to its right.
+   * \return SMALLER if (*this) lies below cv to the right of p;
+   *         EQUAL in case of an overlap (should not happen);
+   *         LARGER if (*this) lies above cv to the right of p.
+   */
+  Comparison_result compare_to_right (const Self& cv,
+                                      const Point_2& p,
+                                      Bezier_cache& cache) const;
+
+  /*!
+   * Compare the relative y-position of two x-monotone subcurve to the left
+   * of their intersection point.
+   * \param cv The other subcurve.
+   * \param p The intersection point.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre p is incident to both subcurves, and both are defined to its left.
+   * \return SMALLER if (*this) lies below cv to the right of p;
+   *         EQUAL in case of an overlap (should not happen);
+   *         LARGER if (*this) lies above cv to the right of p.
+   */
+  Comparison_result compare_to_left (const Self& cv,
+                                     const Point_2& p,
+                                     Bezier_cache& cache) const;
+
+  /*!
+   * Check whether the two subcurves are equal (have the same graph).
+   * \param cv The other subcurve.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \return (true) if the two subcurves have the same graph;
+   *         (false) otherwise.
+   */
+  bool equals (const Self& cv,
+               Bezier_cache& cache) const;
+
+  /*!
+   * Compute the intersections with the given subcurve.
+   * \param cv The other subcurve.
+   * \param inter_map Caches the bounded intersection points.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \param oi The output iterator.
+   * \return The past-the-end iterator.
+   */
+  template<class OutputIterator>
+  OutputIterator intersect (const Self& cv,
+                            Intersection_map& inter_map,
+                            Bezier_cache& cache,
+                            OutputIterator oi) const
+  {
+    // In case we have two x-monotone subcurves of the same Bezier curve,
+    // check if they have a common left endpoint.
+    if (_curve.is_same (cv._curve))
+    {
+      if (left().is_same (cv.left()) || left().is_same (cv.right()))
+      {
+        *oi = CGAL::make_object (Intersection_point_2 (left(), 0));
+        ++oi;
+      }
+    }
+
+    // Compute the intersections of the two sucurves. Note that for caching
+    // purposes we always apply the _intersect() function on the subcurve whose
+    // curve ID is smaller.
+    std::vector<Intersection_point_2>   ipts;
+    Self                                ovlp_cv;
+    bool                                do_ovlp;
+
+    if (_curve.id() <= cv._curve.id())
+      do_ovlp = _intersect (cv, inter_map, cache, ipts, ovlp_cv);
+    else
+      do_ovlp = cv._intersect (*this, inter_map, cache, ipts, ovlp_cv);
+
+    // In case of overlap, just report the overlapping subcurve.
+    if (do_ovlp)
+    {
+      *oi = CGAL::make_object (ovlp_cv);
+      ++oi;
+      return (oi);
+    }
+
+    // If we have a set of intersection points, sort them in ascending
+    // xy-lexicorgraphical order, and insert them to the output iterator.
+    typename std::vector<Intersection_point_2>::const_iterator  ip_it;
+
+    std::sort (ipts.begin(), ipts.end(), Less_intersection_point (cache));
+    for (ip_it = ipts.begin(); ip_it != ipts.end(); ++ip_it)
+    {
+      *oi = CGAL::make_object (*ip_it);
+      ++oi;
+    }
+
+    // In case we have two x-monotone subcurves of the same Bezier curve,
+    // check if they have a common right endpoint.
+    if (_curve.is_same (cv._curve))
+    {
+      if (right().is_same (cv.left()) || right().is_same (cv.right()))
+      {
+        *oi = CGAL::make_object (Intersection_point_2 (right(), 0));
+        ++oi;
+      }
+    }
+
+    return (oi);
+  }
+
+  /*!
+   * Split the subcurve into two at a given split point.
+   * \param p The split point.
+   * \param c1 Output: The first resulting arc, lying to the left of p.
+   * \param c2 Output: The first resulting arc, lying to the right of p.
+   * \pre p lies in the interior of the subcurve (not one of its endpoints).
+   */
+  void split (const Point_2& p,
+              Self& c1, Self& c2) const;
+
+  /*!
+   * Check if the two subcurves are mergeable.
+   * \param cv The other subcurve.
+   * \return Whether the two subcurves can be merged.
+   */
+  bool can_merge_with (const Self& cv) const;
+
+  /*!
+   * Merge the current arc with the given arc.
+   * \param cv The other subcurve.
+   * \pre The two arcs are mergeable.
+   * \return The merged arc.
+   */
+  Self merge (const Self& cv) const;
+
+  /*!
+   * Flip the subcurve (swap its source and target points).
+   * \return The flipped subcurve.
+   */
+  Self flip () const
+  {
+    // Note that we just swap the source and target of the original subcurve
+    // and do not touch the supporting Beizer curve.
+    Self  cv = *this;
+
+    cv._ps = this->_pt;
+    cv._pt = this->_ps;
+    cv._dir_right = ! this->_dir_right;
+
+    return (cv);
+  }
+
+  Self trim(const Point_2& src, const Point_2& tgt) const
+  {
+    //this will make a copy.
+    Self cv = *this;
+
+    cv._ps = src;
+    cv._pt = tgt;
+
+    return cv;
+  }
+
+private:
+
+  /*!
+   * Check if the given t-value is in the range of the subcurve.
+   * \param t The parameter value.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \return If t in the parameter-range of the subcurve.
+   */
+  bool _is_in_range (const Algebraic& t,
+                     Bezier_cache& cache) const;
+
+  /*!
+   * Check if the given point lies in the range of this x-monotone subcurve.
+   * \param p The point, which lies on the supporting Bezier curve.
+   * \param is_certain Output: Is the answer we provide is certain.
+   * \return Whether p is on the x-monotone subcurve.
+   */
+  bool _is_in_range (const Point_2& p, bool& is_certain) const;
+
+  /*!
+   * Given a point p that lies on the supporting Bezier curve (X(t), Y(t)),
+   * determine whether p lies within the t-range of the x-monotone subcurve.
+   * If so, the value t0 such that p = (X(t0), Y(t0)) is also computed.
+   * \param p The point, which lies on the supporting Bezier curve.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \param t0 Output: A parameter value such that p = (X(t0), Y(t0)).
+   * \param is_endpoint Output: Whether p equals on the of the endpoints.
+   * \return Whether p lies in the t-range of the subcurve.
+   */
+  bool _is_in_range (const Point_2& p,
+                     Bezier_cache& cache,
+                     Algebraic& t0,
+                     bool& is_endpoint) const;
+
+  /*!
+   * Compute a y-coordinate of a point on the x-monotone subcurve with a
+   * given x-coordinate.
+   * \param x0 The given x-coodinate.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \return The y-coordinate.
+   */
+  Algebraic _get_y (const Rational& x0,
+                    Bezier_cache& cache) const;
+
+  /*!
+   * Compare the slopes of the subcurve with another given Bezier subcurve at
+   * their given intersection point.
+   * \param cv The other subcurve.
+   * \param p The intersection point.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre p lies of both subcurves.
+   * \pre Neither of the subcurves is a vertical segment.
+   * \return SMALLER if (*this) slope is less than cv's;
+   *         EQUAL if the two slopes are equal;
+   *         LARGER if (*this) slope is greater than cv's.
+   */
+  Comparison_result _compare_slopes (const Self& cv,
+                                     const Point_2& p,
+                                     Bezier_cache& cache) const;
+
+  /*!
+   * Get the range of t-value over which the subcurve is defined.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \return A pair comprised of the t-value for the source point and the
+   *         t-value for the target point.
+   */
+  std::pair<Algebraic, Algebraic> _t_range (Bezier_cache& cache) const;
+
+  /*!
+   * Compare the relative y-position of two x-monotone subcurve to the right
+   * (or to the left) of their intersection point, whose multiplicity is
+   * greater than 1.
+   * \param cv The other subcurve.
+   * \param p The query point.
+   * \param to_right Should we compare to p's right or to p's left.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \pre The x-coordinate of the right endpoint of *this is smaller than
+   *      (or equal to) the x-coordinate of the right endpoint of cv.
+   * \pre p is a common point of both subcurves.
+   * \pre Neither of the subcurves is a vertical segment.
+   * \return SMALLER if (*this) lies below cv next to p;
+   *         EQUAL in case of an overlap (should not happen);
+   *         LARGER if (*this) lies above cv next to p.
+   */
+  Comparison_result _compare_to_side (const Self& cv,
+                                      const Point_2& p,
+                                      bool to_right,
+                                      Bezier_cache& cache) const;
+
+  /*!
+   * Clip the control polygon of the supporting Bezier curve such that it
+   * fits the current x-monotone subcurve.
+   * \param ctrl Output: The clipped control polygon.
+   * \param t_min Output: The minimal t-value of the clipped curve.
+   * \param t_max Output: The maximal t-value of the clipped curve.
+   */
+  void _clip_control_polygon
+        (typename Bounding_traits::Control_points& ctrl,
+         typename Bounding_traits::NT& t_min,
+         typename Bounding_traits::NT& t_max) const;
+
+  /*!
+   * Approximate the intersection points between the supporting Bezier curves
+   * of the given x-monotone curves.
+   * \param cv The x-monotone curve we intersect.
+   * \param inter_pts Output: An output list of intersection points between
+   *                          the supporting Bezier curves.
+   *                          In case (*this) and cv are subcurve of the same
+   *                          Bezier curve, only the self-intersection points
+   *                          between the subcurves are approximated.
+   * \return Whether all intersection points where successfully approximated.
+   */
+  bool _approximate_intersection_points (const Self& cv,
+                                         std::list<Point_2>& inter_pts) const;
+
+  /*!
+   * Compute the intersections with the given subcurve.
+   * \param cv The other subcurve.
+   * \param inter_map Caches the bounded intersection points.
+   * \param cache Caches the vertical tangency points and intersection points.
+   * \param ipts Output: A vector of intersection points + multiplicities.
+   * \param ovlp_cv Output: An overlapping subcurve (if exists).
+   * \return Whether an overlap has occured.
+   */
+  bool _intersect (const Self& cv,
+                   Intersection_map& inter_map,
+                   Bezier_cache& cache,
+                   std::vector<Intersection_point_2>& ipts,
+                   Self& ovlp_cv) const;
+
+  /*!
+   * Compute the exact vertical position of the given point with respect to
+   * the x-monotone curve.
+   * \param p The point.
+   * \param force_exact Sould we force an exact result.
+   * \return SMALLER if the point is below the curve;
+   *         LARGER if the point is above the curve;
+   *         EQUAL if p lies on the curve.
+   */
+  Comparison_result _exact_vertical_position (const Point_2& p,
+                                              bool
+#if !defined(CGAL_NO_ASSERTIONS)
+                                              force_exact
+#endif
+                                              ) const;
+
+};
+
+/*!
+ * Exporter for Bezier curves.
+ */
+template <class Rat_kernel, class Alg_kernel, class Nt_traits,
+          class Bounding_traits>
+std::ostream&
+operator<< (std::ostream& os,
+            const _Bezier_x_monotone_2<Rat_kernel, Alg_kernel, Nt_traits,
+                                       Bounding_traits>& cv)
+{
+  os << cv.supporting_curve()
+     << " [" << cv.xid()
+     << "] | " << cv.source()
+     << " --> " << cv.target();
+
+  return (os);
+}
+
+// ---------------------------------------------------------------------------
+// Constructor given two endpoints.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_x_monotone_2
+        (const Curve_2& B, unsigned int xid,
+         const Point_2& ps, const Point_2& pt,
+         Bezier_cache& cache) :
+  _curve (B),
+  _xid (xid),
+  _ps (ps),
+  _pt (pt),
+  _is_vert (false)
+{
+  CGAL_precondition (xid > 0);
+
+  // Get the originators of the point that correspond to the curve B.
+  Originator_iterator   ps_org = ps.get_originator (B, _xid);
+  CGAL_precondition (ps_org != ps.originators_end());
+
+  Originator_iterator   pt_org = pt.get_originator (B, _xid);
+  CGAL_precondition (pt_org != pt.originators_end());
+
+  // Check if the subcurve is directed left or right.
+  const Comparison_result    res = _ps.compare_x (_pt, cache);
+
+  if (res == EQUAL)
+  {
+    // We have a vertical segment. Check if the source is below the target.
+    _is_vert = true;
+    _dir_right = (CGAL::compare (_ps.y(), _pt.y()) == SMALLER);
+  }
+  else
+  {
+    _dir_right = (res == SMALLER);
+  }
+
+  // Check if the value of the parameter t increases when we traverse the
+  // curve from left to right: If the curve is directed to the right, we
+  // check if t_src < t_trg, otherwise we check whether t_src > t_trg.
+  Comparison_result      t_res;
+
+  if (CGAL::compare (ps_org->point_bound().t_max,
+                     pt_org->point_bound().t_min) == SMALLER ||
+      CGAL::compare (ps_org->point_bound().t_min,
+                     pt_org->point_bound().t_max) == LARGER)
+  {
+    // Perform the comparison assuming that the possible parameter
+    // values do not overlap.
+    t_res = CGAL::compare (ps_org->point_bound().t_min,
+                           pt_org->point_bound().t_min);
+  }
+  else
+  {
+    // In this case both exact parameter values must be known.
+    // We use them to perform an exact comparison.
+    CGAL_assertion (ps_org->has_parameter() && pt_org->has_parameter());
+
+    t_res = CGAL::compare (ps_org->parameter(), pt_org->parameter());
+  }
+
+  CGAL_precondition (t_res != EQUAL);
+
+  if (_dir_right)
+    _inc_to_right = (t_res == SMALLER);
+  else
+    _inc_to_right = (t_res == LARGER);
+}
+
+// ---------------------------------------------------------------------------
+// Get the approximate parameter range defining the curve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+std::pair<double, double>
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::parameter_range () const
+{
+  // First try to use the approximate representation of the endpoints.
+  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion (s_org != _ps.originators_end());
+
+  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion (t_org != _pt.originators_end());
+
+  double  t_src = (CGAL::to_double (s_org->point_bound().t_min) +
+                   CGAL::to_double (s_org->point_bound().t_max)) / 2;
+  double  t_trg = (CGAL::to_double (t_org->point_bound().t_min) +
+                   CGAL::to_double (t_org->point_bound().t_max)) / 2;
+
+  return (std::make_pair (t_src, t_trg));
+}
+
+// ---------------------------------------------------------------------------
+// Get the relative position of the query point with respect to the subcurve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::point_position
+    (const Point_2& p,
+     Bezier_cache& cache) const
+{
+  Nt_traits nt_traits;
+
+  //First check if the bezier is a vertical segment
+  if (is_vertical())
+  {
+    if (! p.is_exact()) p.make_exact (cache);
+    if (! _ps.is_exact()) _ps.make_exact (cache);
+    if (! _pt.is_exact()) _ps.make_exact (cache);
+
+    if (p.is_rational() && _ps.is_rational() && _pt.is_rational())
+    {
+      const Rat_point_2&  rat_p = (Rat_point_2) p;
+      const Rat_point_2&  rat_ps = (Rat_point_2) _ps;
+      const Rat_point_2&  rat_pt = (Rat_point_2) _pt;
+
+      Comparison_result res1 = (CGAL::compare (rat_p.y(), rat_ps.y()));
+      Comparison_result res2 = (CGAL::compare (rat_p.y(), rat_pt.y()));
+      return (res1==res2 ? res1:EQUAL);
+    }
+
+    Comparison_result res1 = (CGAL::compare (p.y(), _ps.y()));
+    Comparison_result res2 = (CGAL::compare (p.y(), _pt.y()));
+    return (res1==res2 ? res1:EQUAL);
+  }
+
+  if (p.identical(_ps)) {
+    return EQUAL;
+  }
+
+  // Then check whether the bezier is an horizontal segment or
+  // if p has the same x-coordinate as one of the endpoint
+
+  const Comparison_result  res1 =  p.compare_x (_ps, cache);
+
+  if (res1 == EQUAL || nt_traits.degree(_curve.y_polynomial()) <= 0)
+  {
+    if (! p.is_exact()) p.make_exact (cache);
+    if (! _ps.is_exact()) _ps.make_exact (cache);
+
+    // If both point are rational, compare their rational y-coordinates.
+    if (p.is_rational() && _ps.is_rational())
+    {
+      const Rat_point_2&  rat_p = (Rat_point_2) p;
+      const Rat_point_2&  rat_ps = (Rat_point_2) _ps;
+
+      return (CGAL::compare (rat_p.y(), rat_ps.y()));
+    }
+
+    // Compare the algebraic y-coordinates.
+    return (CGAL::compare (p.y(), _ps.y()));
+  }
+
+  if (p.identical(_pt)) {
+    return EQUAL;
+  }
+
+  const Comparison_result  res2 = p.compare_x (_pt, cache);
+
+  if (res2 == EQUAL)
+  {
+    // In this case both points must be exact.
+    CGAL_assertion (p.is_exact() && _pt.is_exact());
+
+    // If both point are rational, compare their rational y-coordinates.
+    if (p.is_rational() && _pt.is_rational())
+    {
+      const Rat_point_2&  rat_p = (Rat_point_2) p;
+      const Rat_point_2&  rat_pt = (Rat_point_2) _pt;
+
+      return (CGAL::compare (rat_p.y(), rat_pt.y()));
+    }
+
+    // Compare the algebraic y-coordinates.
+    return (CGAL::compare (p.y(), _pt.y()));
+  }
+
+  // Make sure that p is in the x-range of our subcurve.
+  CGAL_precondition (res1 != res2);
+
+  // Check for the case when curve is an originator of the point.
+  Originator_iterator   p_org = p.get_originator (_curve, _xid);
+
+  if (p_org != p.originators_end())
+  {
+    CGAL_assertion_code
+      (Originator_iterator ps_org = _ps.get_originator (_curve, _xid);
+       CGAL_assertion(ps_org != _ps.originators_end());
+       Originator_iterator pt_org = _pt.get_originator (_curve, _xid);
+       CGAL_assertion(pt_org != _pt.originators_end()));
+
+    // Check if the point is in the parameter range of this subcurve.
+    // First try an approximate check of the parameter bounds.
+    bool  correct_res;
+    bool  in_range = false;
+
+    in_range = _is_in_range (p, correct_res);
+
+    if (! correct_res)
+    {
+      // Perform the comparsion in an exact manner.
+      if (! p.is_exact())
+        p.make_exact (cache);
+
+      CGAL_assertion (p_org->has_parameter());
+
+      in_range = _is_in_range (p_org->parameter(), cache);
+    }
+
+    if (in_range)
+      return (EQUAL);
+  }
+
+  // Call the vertical-position function that uses the bounding-boxes
+  // to evaluate the comparsion result.
+  typename Bounding_traits::Control_points  cp;
+
+  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
+             std::back_inserter(cp));
+
+  Originator_iterator           ps_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion (ps_org != _ps.originators_end());
+
+  Originator_iterator           pt_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion (pt_org != _pt.originators_end());
+
+  Comparison_result             res_bound = EQUAL;
+  typename Bounding_traits::NT  x_min, y_min, x_max, y_max;
+  bool                          can_refine;
+
+  p.get_bbox (x_min, y_min, x_max, y_max);
+
+  if (CGAL::compare (ps_org->point_bound().t_max,
+                     pt_org->point_bound().t_min) == SMALLER)
+  {
+    // Examine the parameter range of the originator of the source point
+    // with respect to the current subcurve B, and make sure that B(t_max)
+    // lies to the left of p if the curve is directed from left to right
+    // (or to the right of p, if the subcurve is directed from right to left).
+    can_refine = ! _ps.is_exact();
+    do
+    {
+      const Rat_point_2&  ps = _curve (ps_org->point_bound().t_max);
+
+      if ((_dir_right && CGAL::compare (ps.x(), x_min) != LARGER) ||
+          (! _dir_right && CGAL::compare (ps.x(), x_max) != SMALLER))
+        break;
+
+      if (can_refine)
+        can_refine = _ps.refine();
+    } while (can_refine);
+
+    // Examine the parameter range of the originator of the target point
+    // with respect to the current subcurve B, and make sure that B(t_min)
+    // lies to the right of p if the curve is directed from left to right
+    // (or to the left of p, if the subcurve is directed from right to left).
+    can_refine = ! _pt.is_exact();
+    do
+    {
+      const Rat_point_2&  pt = _curve (pt_org->point_bound().t_min);
+
+      if ((_dir_right && CGAL::compare (pt.x(), x_max) != SMALLER) ||
+          (! _dir_right && CGAL::compare (pt.x(), x_min) != LARGER))
+        break;
+
+      if (can_refine)
+        can_refine = _pt.refine();
+    } while (can_refine);
+
+    // In this case the parameter value of the source is smaller than the
+    // target's, so we compare the point with the subcurve of B defined over
+    // the proper parameter range.
+    res_bound = p.vertical_position (cp,
+                                     ps_org->point_bound().t_max,
+                                     pt_org->point_bound().t_min);
+  }
+  else if (CGAL::compare (pt_org->point_bound().t_max,
+                          ps_org->point_bound().t_min) == SMALLER)
+  {
+    // Examine the parameter range of the originator of the source point
+    // with respect to the current subcurve B, and make sure that B(t_min)
+    // lies to the left of p if the curve is directed from left to right
+    // (or to the right of p, if the subcurve is directed from right to left).
+    can_refine = ! _ps.is_exact();
+    do
+    {
+      const Rat_point_2&  ps = _curve (ps_org->point_bound().t_min);
+
+      if ((_dir_right && CGAL::compare (ps.x(), x_min) != LARGER) ||
+          (! _dir_right && CGAL::compare (ps.x(), x_max) != SMALLER))
+        break;
+
+      if (can_refine)
+        can_refine = _ps.refine();
+    } while (can_refine);
+
+    // Examine the parameter range of the originator of the target point
+    // with respect to the current subcurve B, and make sure that B(t_max)
+    // lies to the right of p if the curve is directed from left to right
+    // (or to the left of p, if the subcurve is directed from right to left).
+    can_refine = ! _pt.is_exact();
+    do
+    {
+      const Rat_point_2&  pt = _curve (pt_org->point_bound().t_max);
+
+      if ((_dir_right && CGAL::compare (pt.x(), x_max) != SMALLER) ||
+          (! _dir_right && CGAL::compare (pt.x(), x_min) != LARGER))
+        break;
+
+      if (can_refine)
+        can_refine = _pt.refine();
+    } while (can_refine);
+
+    // In this case the parameter value of the source is large than the
+    // target's, so we compare the point with the subcurve of B defined over
+    // the proper parameter range.
+    res_bound = p.vertical_position (cp,
+                                     pt_org->point_bound().t_max,
+                                     ps_org->point_bound().t_min);
+  }
+
+  if (res_bound != EQUAL)
+    return (res_bound);
+
+
+  if ( p.is_rational() ){
+    const Rational& px = ((Rat_point_2) p).x();
+
+    Integer denom_px=nt_traits.denominator(px);
+    Integer numer_px=nt_traits.numerator(px);
+    Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&numer_px,0);
+    Polynomial poly_x = nt_traits.scale(_curve.x_polynomial(),denom_px) - poly_px;
+
+    std::vector <Algebraic> roots;
+    std::pair<double,double> prange = parameter_range();
+    nt_traits.compute_polynomial_roots (poly_x,prange.first,prange.second,std::back_inserter(roots));
+
+    CGAL_assertion(roots.size()==1); //p is in the range and the curve is x-monotone
+
+    return CGAL::compare(
+      ((Rat_point_2) p).y(),
+      nt_traits.evaluate_at (_curve.y_polynomial(), *roots.begin())
+    );
+  }
+
+  // In this case we have to switch to exact computations and check whether
+  // p lies of the given subcurve. We take one of p's originating curves and
+  // compute its intersections with our x-monotone curve.
+  if (! p.is_exact())
+    p.make_exact (cache);
+
+  CGAL_assertion (p.originators_begin() != p.originators_end());
+
+  Originator   org = *(p.originators_begin());
+  bool         do_ovlp;
+  bool         swap_order = (_curve.id() > org.curve().id());
+  const Intersect_list&  inter_list = (! swap_order ?
+    (cache.get_intersections (_curve.id(),
+                              _curve.x_polynomial(), _curve.x_norm(),
+                              _curve.y_polynomial(), _curve.y_norm(),
+                              org.curve().id(),
+                              org.curve().x_polynomial(), org.curve().x_norm(),
+                              org.curve().y_polynomial(), org.curve().y_norm(),
+                              do_ovlp)) :
+    (cache.get_intersections (org.curve().id(),
+                              org.curve().x_polynomial(), org.curve().x_norm(),
+                              org.curve().y_polynomial(), org.curve().y_norm(),
+                              _curve.id(),
+                              _curve.x_polynomial(), _curve.x_norm(),
+                              _curve.y_polynomial(), _curve.y_norm(),
+                              do_ovlp)));
+
+  if (do_ovlp)
+    return (EQUAL);
+
+  // Go over the intersection points and look for p there.
+  Intersect_iter       iit;
+
+  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
+  {
+    // Get the parameter of the originator and compare it to p's parameter.
+    const Algebraic&  s = swap_order ? iit->s : iit->t;
+
+    if (CGAL::compare (s, org.parameter()) == EQUAL)
+    {
+      // Add this curve as an originator for p.
+      const Algebraic&  t = swap_order ? iit->t : iit->s;
+
+      CGAL_assertion (_is_in_range (t, cache));
+
+      Point_2&  pt = const_cast<Point_2&> (p);
+      pt.add_originator (Originator (_curve, _xid, t));
+
+      // The point p lies on the subcurve.
+      return (EQUAL);
+    }
+  }
+
+  // We now know that p is not on the subcurve. We therefore subdivide the
+  // curve using exact rational arithmetic, until we reach a separation
+  // between the curve and the point. (This case should be very rare.)
+  // Note that we first try to work with inexact endpoint representation, and
+  // only if we fail we make the endpoints of the x-monotone curves exact.
+  if (! p.is_exact())
+    p.make_exact (cache);
+
+  Comparison_result  exact_res = _exact_vertical_position (p, false);
+
+  if (exact_res != EQUAL)
+    return (exact_res);
+
+  if (! _ps.is_exact())
+    _ps.make_exact (cache);
+
+  if (! _pt.is_exact())
+    _pt.make_exact (cache);
+
+  return (_exact_vertical_position (p, true));
+}
+
+// ---------------------------------------------------------------------------
+// Compare the relative y-position of two x-monotone subcurves to the right
+// of their intersection point.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::compare_to_right
+        (const Self& cv,
+         const Point_2& p,
+         Bezier_cache& cache) const
+{
+  CGAL_precondition (p.compare_xy (right(), cache) != LARGER);
+  CGAL_precondition (p.compare_xy (cv.right(), cache) != LARGER);
+
+  if (this == &cv)
+    return (EQUAL);
+
+  // Make sure that p is incident to both curves (either equals the left
+  // endpoint or lies in the curve interior). Note that this is important to
+  // carry out these tests, as it assures us the eventually both curves are
+  // originators of p.
+  if (! p.equals (left(), cache))
+  {
+    if (point_position (p, cache) != EQUAL)
+    {
+      CGAL_precondition_msg (false, "p is not on cv1");
+    }
+  }
+
+  if (! p.equals (cv.left(), cache))
+  {
+    if (cv.point_position (p, cache) != EQUAL)
+    {
+      CGAL_precondition_msg (false, "p is not on cv2");
+    }
+  }
+
+  // Check for vertical subcurves. A vertical segment is above any other
+  // x-monotone subcurve to the right of their common endpoint.
+  if (is_vertical())
+  {
+    if (cv.is_vertical())
+      // Both are vertical segments with a common endpoint, so they overlap:
+      return (EQUAL);
+
+    return (LARGER);
+  }
+  else if (cv.is_vertical())
+  {
+    return (SMALLER);
+  }
+
+  // Check if both subcurves originate from the same Bezier curve.
+  Nt_traits       nt_traits;
+
+  if (_curve.is_same (cv._curve))
+  {
+    // Get the originator, and check whether p is a vertical tangency
+    // point of this originator (otherwise it is a self-intersection point,
+    // and we proceed as if it is a regular intersection point).
+    Originator_iterator  org = p.get_originator(_curve, _xid);
+
+    CGAL_assertion (org != p.originators_end());
+
+    if (org->point_bound().type == Bez_point_bound::VERTICAL_TANGENCY_PT)
+    {
+      CGAL_assertion (_inc_to_right != cv._inc_to_right);
+
+      if (! p.is_exact())
+      {
+        // Comparison based on the control polygon of the bounded vertical
+        // tangency point, using the fact this polygon is y-monotone.
+        const typename Bounding_traits::Control_points& cp =
+          org->point_bound().ctrl;
+
+        if (_inc_to_right)
+        {
+          return (CGAL::compare (cp.back().y(), cp.front().y()));
+        }
+        else
+        {
+          return (CGAL::compare (cp.front().y(), cp.back().y()));
+        }
+      }
+
+      // Iddo: Handle rational points (using de Casteljau derivative)?
+
+      // In this case we know that we have a vertical tangency at t0, so
+      // X'(t0) = 0. We evaluate the sign of Y'(t0) in order to find the
+      // vertical position of the two subcurves to the right of this point.
+      CGAL_assertion (org->has_parameter());
+
+      const Algebraic&  t0 = org->parameter();
+      Polynomial        polyY_der = nt_traits.derive (_curve.y_polynomial());
+      const CGAL::Sign  sign_der =
+        CGAL::sign (nt_traits.evaluate_at (polyY_der, t0));
+
+      CGAL_assertion (sign_der != CGAL::ZERO);
+
+      if (_inc_to_right)
+        return ((sign_der == CGAL::POSITIVE) ? LARGER : SMALLER);
+      else
+        return ((sign_der == CGAL::NEGATIVE) ? LARGER : SMALLER);
+    }
+  }
+
+  // Compare the slopes of the two supporting curves at p. In the general
+  // case, the slopes are not equal and their comparison gives us the
+  // vertical order to p's right.
+  Comparison_result   slope_res = _compare_slopes (cv, p, cache);
+
+  if (slope_res != EQUAL)
+    return (slope_res);
+
+  // Compare the two subcurves by choosing some point to the right of p
+  // and comparing the vertical position there.
+  Comparison_result   right_res;
+
+  if (right().compare_x (cv.right(), cache) != LARGER)
+  {
+    right_res = _compare_to_side (cv, p,
+                                  true,           // Compare to p's right.
+                                  cache);
+  }
+  else
+  {
+    right_res = cv._compare_to_side (*this, p,
+                                     true,        // Compare to p's right.
+                                     cache);
+
+    right_res = CGAL::opposite (right_res);
+  }
+
+  return (right_res);
+}
+
+// ---------------------------------------------------------------------------
+// Compare the relative y-position of two x-monotone subcurve to the left
+// of their intersection point.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::compare_to_left
+        (const Self& cv,
+         const Point_2& p,
+         Bezier_cache& cache) const
+{
+  CGAL_precondition (p.compare_xy (left(), cache) != SMALLER);
+  CGAL_precondition (p.compare_xy (cv.left(), cache) != SMALLER);
+
+  if (this == &cv)
+    return (EQUAL);
+
+  // Make sure that p is incident to both curves (either equals the right
+  // endpoint or lies in the curve interior). Note that this is important to
+  // carry out these tests, as it assures us the eventually both curves are
+  // originators of p.
+  if (! p.equals (right(), cache))
+  {
+    if (point_position (p, cache) != EQUAL)
+    {
+      CGAL_precondition_msg (false, "p is not on cv1");
+    }
+  }
+
+  if (! p.equals (cv.right(), cache))
+  {
+    if (cv.point_position (p, cache) != EQUAL)
+    {
+      CGAL_precondition_msg (false, "p is not on cv2");
+    }
+  }
+
+  // Check for vertical subcurves. A vertical segment is below any other
+  // x-monotone subcurve to the left of their common endpoint.
+  if (is_vertical())
+  {
+    if (cv.is_vertical())
+      // Both are vertical segments with a common endpoint, so they overlap:
+      return (EQUAL);
+
+    return (SMALLER);
+  }
+  else if (cv.is_vertical())
+  {
+    return (LARGER);
+  }
+
+  // Check if both subcurves originate from the same Bezier curve.
+  Nt_traits       nt_traits;
+
+  if (_curve.is_same (cv._curve))
+  {
+    // Get the originator, and check whether p is a vertical tangency
+    // point of this originator (otherwise it is a self-intersection point,
+    // and we proceed as if it is a regular intersection point).
+    Originator_iterator  org = p.get_originator (_curve, _xid);
+
+    CGAL_assertion (org != p.originators_end());
+    CGAL_assertion (_inc_to_right != cv._inc_to_right);
+
+    if (org->point_bound().type == Bez_point_bound::VERTICAL_TANGENCY_PT)
+    {
+      if (! p.is_exact())
+      {
+        // Comparison based on the control polygon of the bounded vertical
+        // tangency point, using the fact this polygon is y-monotone.
+        const typename Bounding_traits::Control_points& cp =
+          org->point_bound().ctrl;
+
+        if (_inc_to_right)
+        {
+          return (CGAL::compare(cp.front().y(), cp.back().y()));
+        }
+        else
+        {
+          return (CGAL::compare(cp.back().y(), cp.front().y()));
+        }
+      }
+
+      // Iddo: Handle rational points (using de Casteljau derivative)?
+
+      // In this case we know that we have a vertical tangency at t0, so
+      // X'(t0) = 0. We evaluate the sign of Y'(t0) in order to find the
+      // vertical position of the two subcurves to the right of this point.
+      CGAL_assertion (org->has_parameter());
+
+      const Algebraic&  t0 = org->parameter();
+      Polynomial        polyY_der = nt_traits.derive (_curve.y_polynomial());
+      const CGAL::Sign  sign_der =
+        CGAL::sign (nt_traits.evaluate_at (polyY_der, t0));
+
+      CGAL_assertion (sign_der != CGAL::ZERO);
+
+      if (_inc_to_right)
+        return ((sign_der == CGAL::NEGATIVE) ? LARGER : SMALLER);
+      else
+        return ((sign_der == CGAL::POSITIVE) ? LARGER : SMALLER);
+    }
+  }
+
+  // Compare the slopes of the two supporting curves at p. In the general
+  // case, the slopes are not equal and their comparison gives us the
+  // vertical order to p's right; note that we swap the order of the curves
+  // to obtains their position to the left.
+  Comparison_result   slope_res = cv._compare_slopes (*this, p, cache);
+
+  if (slope_res != EQUAL)
+    return (slope_res);
+
+  // Compare the two subcurves by choosing some point to the left of p
+  // and compareing the vertical position there.
+  Comparison_result   left_res;
+
+  if (left().compare_x (cv.left(), cache) != SMALLER)
+  {
+    left_res = _compare_to_side (cv, p,
+                                 false,          // Compare to p's left.
+                                 cache);
+  }
+  else
+  {
+    left_res = cv._compare_to_side (*this, p,
+                                    false,       // Compare to p's left.
+                                    cache);
+    left_res = CGAL::opposite (left_res);
+  }
+
+  return (left_res);
+}
+
+// ---------------------------------------------------------------------------
+// Check whether the two subcurves are equal (have the same graph).
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::equals
+        (const Self& cv,
+         Bezier_cache& cache) const
+{
+  // Check if the two subcurves have overlapping supporting curves.
+  if (! _curve.is_same (cv._curve))
+  {
+    //special case when curves are vertical
+    if (cv.is_vertical()){
+      if (is_vertical())
+        return compare(left().x(),cv.left().x())==EQUAL;
+      return false;
+    }
+
+    // Check whether the two curves have the same support:
+    if (! _curve.has_same_support (cv._curve))
+      return (false);
+
+    // Mark that the two curves overlap in the cache.
+    const Curve_id               id1 = _curve.id();
+    const Curve_id               id2 = cv._curve.id();
+
+    if (id1 < id2)
+      cache.mark_as_overlapping (id1, id2);
+    else
+      cache.mark_as_overlapping (id2, id1);
+  }
+
+  // Check for equality of the endpoints.
+  return (left().equals (cv.left(), cache) &&
+          right().equals (cv.right(), cache));
+}
+
+// ---------------------------------------------------------------------------
+// Split the subcurve into two at a given split point.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::
+split(const Point_2& p, Self& c1, Self& c2) const
+{
+  //this was added to handle the case where p is the endpoint of another
+  //Bezier curve and the curve is vertical
+  if ( p.is_rational() && is_vertical() ){
+    Nt_traits nt_traits;
+    Rat_point_2 rp = (Rat_point_2) p;
+    std::list<Algebraic> sols;
+
+    // typename std::list<Algebraic>::iterator sol = sols.begin();
+    Integer rpyn = nt_traits.numerator(rp.y());
+    Polynomial poly_y =
+      nt_traits.scale(_curve.y_polynomial(),
+                      nt_traits.denominator(rp.y())) -
+                        nt_traits.construct_polynomial(&rpyn, 0);
+    nt_traits.compute_polynomial_roots(poly_y, 0, 1, std::back_inserter(sols));
+    CGAL_assertion(sols.size() == 1);
+    p.add_originator(Originator(_curve, _xid,*sols.begin()) );
+  }
+
+  CGAL_precondition(p.get_originator(_curve, _xid) != p.originators_end() ||
+                    p.is_rational());
+
+  // Duplicate the curve.
+  c1 = c2 = *this;
+
+  // Perform the split.
+  if (_dir_right)
+  {
+    c1._pt = p;
+    c2._ps = p;
+  }
+  else
+  {
+    c1._ps = p;
+    c2._pt = p;
+  }
+}
+
+// ---------------------------------------------------------------------------
+// Check if the two subcurves are mergeable.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::can_merge_with
+        (const Self& cv) const
+{
+  // Note that we only allow merging subcurves of the same originating
+  // Bezier curve (overlapping curves will not do in this case).
+  return (_curve.is_same (cv._curve) &&
+          _xid == cv._xid &&
+          (right().is_same (cv.left()) || left().is_same (cv.right())));
+
+  return (false);
+}
+
+// ---------------------------------------------------------------------------
+// Merge the current arc with the given arc.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::Self
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::merge
+        (const Self& cv) const
+{
+  CGAL_precondition (_curve.is_same (cv._curve));
+  CGAL_precondition (_xid == cv._xid);
+
+  Self    res = *this;
+
+  if (right().is_same (cv.left()))
+  {
+    // Extend the subcurve to the right.
+    if (_dir_right)
+      res._pt = cv.right();
+    else
+      res._ps = cv.right();
+  }
+  else
+  {
+    CGAL_precondition (left().is_same (cv.right()));
+
+    // Extend the subcurve to the left.
+    if (_dir_right)
+      res._ps = cv.left();
+    else
+      res._pt = cv.left();
+  }
+
+  return (res);
+}
+
+// ---------------------------------------------------------------------------
+// Check if the given t-value is in the range of the subcurve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
+        (const Algebraic& t,
+         Bezier_cache& cache) const
+{
+  // First try to use the approximate representation of the endpoints.
+  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion (s_org != _ps.originators_end());
+
+  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion (t_org != _pt.originators_end());
+
+  Nt_traits            nt_traits;
+
+  bool  p_lt_ps =
+      (CGAL::compare (t, nt_traits.convert (s_org->point_bound().t_min)) ==
+       SMALLER);
+  bool  p_gt_ps =
+      (CGAL::compare (t, nt_traits.convert (s_org->point_bound().t_max)) ==
+       LARGER);
+  bool  p_lt_pt =
+      (CGAL::compare (t, nt_traits.convert (t_org->point_bound().t_min)) ==
+       SMALLER);
+  bool  p_gt_pt =
+      (CGAL::compare (t, nt_traits.convert (t_org->point_bound().t_max)) ==
+       LARGER);
+
+  if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
+  {
+    // The point p is definately in the x-range of the subcurve, as its
+    // parameter is between the source and target parameters.
+    return (true);
+  }
+
+  if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
+  {
+    // The point p is definately not in the x-range of the subcurve,
+    // as its parameter is smaller than both source and target parameter
+    // (or greater than both of them).
+    return (false);
+  }
+
+  // Obtain the exact t-range of the curve and peform an exact comparison.
+  std::pair<Algebraic, Algebraic> range = _t_range (cache);
+  const Algebraic&                t_src = range.first;
+  const Algebraic&                t_trg = range.second;
+
+  const Comparison_result  res1 = CGAL::compare (t, t_src);
+  const Comparison_result  res2 = CGAL::compare (t, t_trg);
+
+  return (res1 == EQUAL || res2 == EQUAL || res1 != res2);
+}
+
+// ---------------------------------------------------------------------------
+// Check if the given point lies in the range of this x-monotone subcurve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
+        (const Point_2& p,
+         bool& is_certain) const
+{
+  is_certain = true;
+
+  // Check the easy case that p is one of the subcurve endpoints.
+  if (p.is_same(_ps) || p.is_same(_pt))
+    return true;
+
+  // Compare the parameter of p with the parameters of the endpoints.
+  Originator_iterator  p_org = p.get_originator (_curve, _xid);
+
+  if (p_org == p.originators_end())
+  {
+    CGAL_assertion (p.get_originator (_curve) != p.originators_end());
+
+    // In this case a different x-monotone curve of the supporting Bezier
+    // curve is an originator of the point, so we know that p does not
+    // lie in the range of our x-monotone subcurve.
+    return (false);
+  }
+
+  Originator_iterator  s_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion (s_org != _ps.originators_end());
+
+  Originator_iterator  t_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion (t_org != _pt.originators_end());
+
+  bool      can_refine_p = ! p.is_exact();
+  bool      can_refine_s = ! _ps.is_exact();
+  bool      can_refine_t = ! _pt.is_exact();
+
+  while (can_refine_p || can_refine_s || can_refine_t)
+  {
+    bool  p_lt_ps = (CGAL::compare (p_org->point_bound().t_max,
+                                    s_org->point_bound().t_min) == SMALLER);
+    bool  p_gt_ps = (CGAL::compare (p_org->point_bound().t_min,
+                                    s_org->point_bound().t_max) == LARGER);
+    bool  p_lt_pt = (CGAL::compare (p_org->point_bound().t_max,
+                                    t_org->point_bound().t_min) == SMALLER);
+    bool  p_gt_pt = (CGAL::compare (p_org->point_bound().t_min,
+                                    t_org->point_bound().t_max) == LARGER);
+
+    if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
+    {
+      // The point p is definately in the x-range of the subcurve, as its
+      // parameter is between the source and target parameters.
+      return (true);
+    }
+
+    if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
+    {
+      // The point p is definately not in the x-range of the subcurve,
+      // as its parameter is smaller than both source and target parameter
+      // (or greater than both of them).
+      return (false);
+    }
+
+    // Try to refine the points.
+    if (can_refine_p)
+      can_refine_p = p.refine();
+
+    if (can_refine_s)
+      can_refine_s = _ps.refine();
+
+    if (can_refine_t)
+      can_refine_t = _pt.refine();
+  }
+
+  // If we reached here, we do not have a certain answer.
+  is_certain = false;
+  return (false);
+}
+
+// ---------------------------------------------------------------------------
+// Given a point p that lies on the supporting Bezier curve (X(t), Y(t)),
+// determine whether p lies within the t-range of the x-monotone subcurve.
+// If so, the value t0 such that p = (X(t0), Y(t0)) is also computed.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
+        (const Point_2& p,
+         Bezier_cache& cache,
+         Algebraic& t0,
+         bool& is_endpoint) const
+{
+  // The given point p must be rational, otherwise there is no point checking
+  // whether it lies in the interior of the curve.
+  if (! p.is_rational())
+  {
+    is_endpoint = false;
+    return (false);
+  }
+
+  const Rat_point_2&    rat_p = (Rat_point_2) p;
+
+  // Determine the parameter range [t_min, t_max] for our x-monotone
+  // subcurve.
+  std::pair<Algebraic, Algebraic>          t_range = _t_range (cache);
+  Algebraic                                t_min, t_max;
+
+  if ((_dir_right && _inc_to_right) || (! _dir_right && ! _inc_to_right))
+  {
+    t_min = t_range.first;
+    t_max = t_range.second;
+  }
+  else
+  {
+    t_min = t_range.second;
+    t_max = t_range.first;
+  }
+
+  // The given point p must lie on (X(t), Y(t)) for some t-value. Obtain the
+  // parameter value t0 for that point. We start by computing all t-values
+  // such that X(t) equals the x-coordinate of p.
+  Nt_traits                                nt_traits;
+  std::list<Algebraic>                     t_vals;
+  typename std::list<Algebraic>::iterator  t_iter;
+  Comparison_result                        res1, res2;
+  Algebraic                                y0;
+
+  if ( is_vertical() ){
+    if ( compare(rat_p.x(),left().x())==EQUAL ){
+      _curve.get_t_at_y (rat_p.y(), std::back_inserter(t_vals));
+
+      for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
+      {
+        // Compare the current t-value with t_min.
+        res1 = CGAL::compare (t_min, *t_iter);
+
+        if (res1 == LARGER)
+          continue;
+
+
+        if (res1 == EQUAL)
+        {
+          t0 = t_min;
+          is_endpoint = true;
+          return (true);
+        }
+
+        // Compare the current t-value with t_max.
+        res2 = CGAL::compare (t_max, *t_iter);
+
+        if (res2 == EQUAL)
+        {
+          t0 = t_max;
+          is_endpoint = true;
+          return (true);
+        }
+
+        if (res2 == LARGER)
+        {
+          t0 = *t_iter;
+          is_endpoint = false;
+          return (true);
+        }
+      }
+    }
+    is_endpoint = false;
+    return (false);
+  }
+
+  _curve.get_t_at_x (rat_p.x(), std::back_inserter(t_vals));
+  CGAL_assertion (! t_vals.empty() );
+
+  for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
+  {
+    // Compare the current t-value with t_min.
+    res1 = CGAL::compare (t_min, *t_iter);
+
+    if (res1 == LARGER)
+      continue;
+
+    // Make sure the y-coordinates match.
+    y0 = nt_traits.evaluate_at (_curve.y_polynomial(), *t_iter) /
+         nt_traits.convert (_curve.y_norm());
+
+    if (CGAL::compare (nt_traits.convert (rat_p.y()), y0) == EQUAL)
+    {
+      if (res1 == EQUAL)
+      {
+        t0 = t_min;
+        is_endpoint = true;
+        return (true);
+      }
+
+      // Compare the current t-value with t_max.
+      res2 = CGAL::compare (t_max, *t_iter);
+
+      if (res2 == EQUAL)
+      {
+        t0 = t_max;
+        is_endpoint = true;
+        return (true);
+      }
+
+      if (res2 == LARGER)
+      {
+        t0 = *t_iter;
+        is_endpoint = false;
+        return (true);
+      }
+    }
+  }
+
+  // In this case, we have not found a t-value in the range of our subcurve,
+  // so p does not lie on the subcurve:
+  is_endpoint = false;
+  return (false);
+}
+
+// ---------------------------------------------------------------------------
+// Compute a y-coordinate of a point on the x-monotone subcurve with a
+// given x-coordinate.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::Algebraic
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_get_y
+        (const Rational& x0,
+         Bezier_cache& cache) const
+{
+  // Obtain the t-values for with the x-coordinates of the supporting
+  // curve equal x0.
+  std::list<Algebraic>  t_vals;
+
+  _curve.get_t_at_x (x0, std::back_inserter(t_vals));
+
+  // Find a t-value that is in the range of the current curve.
+  Nt_traits                                nt_traits;
+  typename std::list<Algebraic>::iterator  t_iter;
+  std::pair<Algebraic, Algebraic>          t_range = _t_range (cache);
+  const Algebraic&                         t_src = t_range.first;
+  const Algebraic&                         t_trg = t_range.second;
+  Comparison_result                        res1, res2;
+
+  for (t_iter = t_vals.begin(); t_iter != t_vals.end(); ++t_iter)
+  {
+    res1 = CGAL::compare (*t_iter, t_src);
+
+    if (res1 == EQUAL)
+    {
+      // Return the y-coordinate of the source point:
+      return (_ps.y());
+    }
+
+    res2 = CGAL::compare (*t_iter, t_trg);
+
+    if (res2 == EQUAL)
+    {
+      // Return the y-coordinate of the source point:
+      return (_pt.y());
+    }
+
+    if (res1 != res2)
+    {
+      // We found a t-value in the range of our x-monotone subcurve.
+      // Use this value to compute the y-coordinate.
+      return (nt_traits.evaluate_at (_curve.y_polynomial(), *t_iter) /
+              nt_traits.convert (_curve.y_norm()));
+    }
+  }
+
+  // If we reached here, x0 is not in the x-range of our subcurve.
+  CGAL_error();
+  return (0);
+}
+
+// ---------------------------------------------------------------------------
+// Compare the slopes of the subcurve with another given Bezier subcurve at
+// their given intersection point.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_compare_slopes
+        (const Self& cv,
+         const Point_2& p,
+         Bezier_cache& cache) const
+{
+  // Get the originators of p.
+  Originator_iterator     org1 = p.get_originator (_curve, _xid);
+  const bool              valid_org1 = (org1 != p.originators_end());
+
+  Originator_iterator     org2 = p.get_originator (cv._curve, cv._xid);
+  const bool              valid_org2 = (org2 != p.originators_end());
+
+  CGAL_assertion (valid_org1 || valid_org2);
+
+  // If the point is only approximated, we can carry out a comparison using
+  // an approximate number type.
+  if (valid_org1 && valid_org2 && ! p.is_exact())
+  {
+    // If the point is inexact, we assume it is a bounded intersection
+    // point of two curves, and therefore the bounding angle these curves
+    // span do not overlap.
+    const Bez_point_bound&  bound1 = org1->point_bound();
+    const Bez_point_bound&  bound2 = org2->point_bound();
+    Bounding_traits         bound_tr;
+
+    return (bound_tr.compare_slopes_at_intersection_point (bound1,
+                                                           bound2));
+  }
+
+  // Obtain the parameter values t1 and t2 that correspond to the point p.
+  // Note that it is possible that one of the curves is not an originator
+  // of p. This can happen if p is an endpoint of the other curve (hence
+  // it must be a ratioal point!) and lies in its interior. In this
+  // (degenerate) case we compute the parameter value and set the appropriate
+  // originator for p.
+  Nt_traits         nt_traits;
+  Algebraic         t1;
+  Algebraic         t2;
+
+  if (valid_org1)
+  {
+    CGAL_assertion (org1->has_parameter());
+    t1 = org1->parameter();
+  }
+  else
+  {
+    bool    is_endpoint1;
+    CGAL_assertion_code (bool   in_range1 =)
+    _is_in_range (p, cache, t1, is_endpoint1);
+    CGAL_assertion (in_range1);
+    p.add_originator (Originator (_curve, _xid, t1));
+  }
+
+  if (valid_org2)
+  {
+    CGAL_assertion (org2->has_parameter());
+    t2 = org2->parameter();
+  }
+  else
+  {
+    bool    is_endpoint2;
+    CGAL_assertion_code (bool   in_range2 =)
+    cv._is_in_range (p, cache, t2, is_endpoint2);
+    CGAL_assertion (in_range2);
+    p.add_originator (Originator (cv._curve, cv._xid, t2));
+  }
+
+  // The slope of (X(t), Y(t)) at t0 is given by Y'(t0)/X'(t0).
+  // Compute the slope of (*this).
+  // Note that we take special care of the case X'(t0) = 0, when the tangent
+  // is vertical and its slope is +/- oo.
+  Polynomial        derivX = nt_traits.derive (_curve.x_polynomial());
+  Polynomial        derivY = nt_traits.derive (_curve.y_polynomial());
+  Algebraic         numer1 = nt_traits.evaluate_at (derivY, t1) *
+                             nt_traits.convert (_curve.x_norm());
+  Algebraic         denom1 = nt_traits.evaluate_at (derivX, t1) *
+                             nt_traits.convert (_curve.y_norm());
+  CGAL::Sign        inf_slope1 = CGAL::ZERO;
+  Algebraic         slope1;
+
+  if (CGAL::sign (denom1) == CGAL::ZERO)
+  {
+    inf_slope1 = is_directed_right() ? CGAL::sign (numer1) : CGAL::opposite( CGAL::sign (numer1) );
+
+    // If both derivatives are zero, we cannot perform the comparison:
+    if (inf_slope1 == CGAL::ZERO)
+      return (EQUAL);
+  }
+  else
+  {
+    slope1 = numer1 / denom1;
+  }
+
+  // Compute the slope of the other subcurve.
+  derivX = nt_traits.derive (cv._curve.x_polynomial());
+  derivY = nt_traits.derive (cv._curve.y_polynomial());
+  Algebraic         numer2 = nt_traits.evaluate_at (derivY, t2) *
+                             nt_traits.convert (cv._curve.x_norm());
+  Algebraic         denom2 = nt_traits.evaluate_at (derivX, t2) *
+                             nt_traits.convert (cv._curve.y_norm());
+  CGAL::Sign        inf_slope2 = CGAL::ZERO;
+  Algebraic         slope2;
+
+  if (CGAL::sign (denom2) == CGAL::ZERO)
+  {
+    inf_slope2 = cv.is_directed_right() ? CGAL::sign (numer2) : CGAL::opposite( CGAL::sign (numer2) );
+
+    // If both derivatives are zero, we cannot perform the comparison:
+    if (inf_slope2 == CGAL::ZERO)
+      return (EQUAL);
+  }
+  else
+  {
+    slope2 = numer2 / denom2;
+  }
+
+  // Handle the comparison when one slope (or both) is +/- oo.
+  if (inf_slope1 == CGAL::POSITIVE)
+    return (inf_slope2 == CGAL::POSITIVE ? EQUAL : LARGER);
+
+  if (inf_slope1 == CGAL::NEGATIVE)
+    return (inf_slope2 == CGAL::NEGATIVE ? EQUAL : SMALLER);
+
+  if (inf_slope2 == CGAL::POSITIVE)
+    return (SMALLER);
+
+  if (inf_slope2 == CGAL::NEGATIVE)
+    return (LARGER);
+
+  // Compare the slopes.
+  return (CGAL::compare (slope1, slope2));
+}
+
+// ---------------------------------------------------------------------------
+// Get the range of t-value over which the subcurve is defined.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+std::pair<typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
+                                        BndTrt>::Algebraic,
+          typename _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
+                                        BndTrt>::Algebraic>
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_t_range
+        (Bezier_cache& cache) const
+{
+  Originator_iterator  ps_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion(ps_org != _ps.originators_end());
+
+  Originator_iterator  pt_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion(pt_org != _pt.originators_end());
+
+  // Make sure that the two endpoints are exact.
+  if (! ps_org->has_parameter())
+    _ps.make_exact (cache);
+
+  if (! pt_org->has_parameter())
+    _pt.make_exact (cache);
+
+  return (std::make_pair (ps_org->parameter(),
+                          pt_org->parameter()));
+}
+
+// ---------------------------------------------------------------------------
+// Compare the relative y-position of two x-monotone subcurve to the right
+// (or to the left) of their intersection point, whose multiplicity is
+// greater than 1.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_compare_to_side
+        (const Self& cv,
+         const Point_2& p,
+         bool to_right,
+         Bezier_cache& cache) const
+{
+  // Get the intersection points of the two curves from the cache. Note that
+  // we make sure that the ID of this->_curve is smaller than of cv's curve ID.
+  const bool             no_swap_curves = (_curve.id() <= cv._curve.id());
+  bool                   do_ovlp;
+  const Intersect_list&  inter_list =
+    (no_swap_curves ?
+     (cache.get_intersections (_curve.id(),
+                               _curve.x_polynomial(), _curve.x_norm(),
+                               _curve.y_polynomial(), _curve.y_norm(),
+                               cv._curve.id(),
+                               cv._curve.x_polynomial(), cv._curve.x_norm(),
+                               cv._curve.y_polynomial(), cv._curve.y_norm(),
+                               do_ovlp)) :
+     (cache.get_intersections (cv._curve.id(),
+                               cv._curve.x_polynomial(), cv._curve.x_norm(),
+                               cv._curve.y_polynomial(), cv._curve.y_norm(),
+                               _curve.id(),
+                               _curve.x_polynomial(), _curve.x_norm(),
+                               _curve.y_polynomial(), _curve.y_norm(),
+                               do_ovlp)));
+
+  // Get the parameter value for the point p.
+  Originator_iterator          org = p.get_originator (_curve, _xid);
+
+  CGAL_assertion (org != p.originators_end());
+  CGAL_assertion (org->has_parameter());
+
+  const Algebraic&             t0 = org->parameter();
+
+  // Get the parameter range of the curve.
+  const std::pair<Algebraic,
+                  Algebraic>&  range = _t_range (cache);
+  const Algebraic&             t_src = range.first;
+  const Algebraic&             t_trg = range.second;
+
+  // Find the next intersection point that lies to the right of p.
+  Intersect_iter               iit;
+  Algebraic                    next_t;
+  Comparison_result            res = CGAL::EQUAL;
+  bool                         found = false;
+
+  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
+  {
+    // Check if the current point lies to the right (left) of p. We do so by
+    // considering its originating parameter value s (or t, if we swapped
+    // the curves).
+    const Algebraic&     t = (no_swap_curves ? (iit->s) : iit->t);
+
+    res = CGAL::compare (t, t0);
+    if ((to_right && ((_inc_to_right && res == LARGER) ||
+                      (! _inc_to_right && res == SMALLER))) ||
+        (! to_right && ((_inc_to_right && res == SMALLER) ||
+                        (! _inc_to_right && res == LARGER))))
+    {
+      if (! found)
+      {
+        next_t = t;
+        found = true;
+      }
+      else
+      {
+        // If we have already located an intersection point to the right
+        // (left) of p, choose the leftmost (rightmost) of the two points.
+        res = CGAL::compare (t, next_t);
+        if ((to_right && ((_inc_to_right && res == SMALLER) ||
+                          (! _inc_to_right && res == LARGER))) ||
+            (! to_right && ((_inc_to_right && res == LARGER) ||
+                            (! _inc_to_right && res == SMALLER))))
+        {
+          next_t = t;
+        }
+      }
+    }
+  }
+
+  // If the next intersection point occurs before the right (left) endpoint
+  // of the subcurve, keep it. Otherwise, take the parameter value at
+  // the endpoint.
+  if (found)
+  {
+    if (to_right == _dir_right)
+      res = CGAL::compare (t_trg, next_t);
+    else
+      res = CGAL::compare (t_src, next_t);
+  }
+
+  if (! found ||
+      (to_right && ((_inc_to_right && res == SMALLER) ||
+                    (! _inc_to_right && res == LARGER))) ||
+      (! to_right && ((_inc_to_right && res == LARGER) ||
+                      (! _inc_to_right && res == SMALLER))))
+  {
+    next_t = ((to_right == _dir_right) ? t_trg : t_src);
+  }
+
+  // Find a rational value between t0 and t_next. Using this value, we
+  // a point with rational coordinates on our subcurve. We also locate a point
+  // on the other curve with the same x-coordinates.
+  Nt_traits           nt_traits;
+  const Rational&     mid_t = nt_traits.rational_in_interval (t0, next_t);
+  const Rat_point_2&  q1 = _curve (mid_t);
+  const Algebraic&    y2 = cv._get_y (q1.x(), cache);
+
+  // We now just have to compare the y-coordinates of the two points we have
+  // computed.
+  return (CGAL::compare (nt_traits.convert (q1.y()), y2));
+}
+
+// ---------------------------------------------------------------------------
+// Clip the control polygon of the supporting Bezier curve such that it fits
+// the current x-monotone subcurve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
+                          BndTrt>::_clip_control_polygon
+        (typename Bounding_traits::Control_points& ctrl,
+         typename Bounding_traits::NT& t_min,
+         typename Bounding_traits::NT& t_max) const
+{
+  // Start from the control polygon of the supporting curve.
+  ctrl.clear();
+  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
+             std::back_inserter (ctrl));
+
+  // The x-monotone subcurve is defined over a parameter range
+  // 0 <= t_min < t_max <= 1. Determine the endpoint with minimal t-value and
+  // the one with maximal t-value.
+  const Point_2&       p_min = (_inc_to_right ? left() : right());
+  Originator_iterator  org_min = p_min.get_originator (_curve, _xid);
+  const Point_2&       p_max = (_inc_to_right ? right() : left());
+  Originator_iterator  org_max = p_max.get_originator (_curve, _xid);
+  bool                 clipped_min = false;
+
+  CGAL_assertion (org_min != p_min.originators_end());
+  CGAL_assertion (org_max != p_max.originators_end());
+
+  // Check if t_min = 0. If so, there is no need to clip.
+  if (! (org_min->point_bound().type == Bez_point_bound::RATIONAL_PT &&
+         CGAL::sign (org_min->point_bound().t_min) == CGAL::ZERO))
+  {
+    // It is possible that the paramater range of the originator is too large.
+    // We therefore make sure it fits the current bounding box of the point
+    // (which we know is tight enough).
+    p_min.fit_to_bbox();
+
+    // Obtain two control polygons, the first for [0, t_min] and the other for
+    // [t_min, 1] and take the second one.
+    typename Bounding_traits::Control_points    cp_a;
+    typename Bounding_traits::Control_points    cp_b;
+
+    t_min = org_min->point_bound().t_max;
+    de_Casteljau_2 (ctrl.begin(), ctrl.end(),
+                    t_min,
+                    std::back_inserter(cp_a),
+                    std::front_inserter(cp_b));
+
+    ctrl.clear();
+    std::copy (cp_b.begin(), cp_b.end(),
+               std::back_inserter (ctrl));
+    clipped_min = true;
+  }
+  else
+  {
+    t_min = 0;
+  }
+
+  // Check if t_max = 1. If so, there is no need to clip.
+  if (! (org_max->point_bound().type == Bez_point_bound::RATIONAL_PT &&
+         CGAL::compare (org_max->point_bound().t_max, 1) == CGAL::EQUAL))
+  {
+    // It is possible that the paramater range of the originator is too large.
+    // We therefore make sure it fits the current bounding box of the point
+    // (which we know is tight enough).
+    p_max.fit_to_bbox();
+
+    // Obtain two control polygons, the first for [t_min, t_max] and the other
+    // for [t_max, 1] and take the first one.
+    typename Bounding_traits::Control_points    cp_a;
+    typename Bounding_traits::Control_points    cp_b;
+
+    if (clipped_min)
+    {
+      t_max = (org_max->point_bound().t_min - t_min) / (1 - t_min);
+    }
+    else
+    {
+      t_max = org_max->point_bound().t_min;
+    }
+
+    de_Casteljau_2 (ctrl.begin(), ctrl.end(),
+                    t_max,
+                    std::back_inserter(cp_a),
+                    std::front_inserter(cp_b));
+
+    ctrl.clear();
+    std::copy (cp_a.begin(), cp_a.end(),
+               std::back_inserter (ctrl));
+    t_max = org_max->point_bound().t_min;
+  }
+  else
+  {
+    t_max = 1;
+  }
+
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Approximate the intersection points between the two given curves.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt,
+                          BndTrt>::_approximate_intersection_points
+        (const Self& cv,
+         std::list<Point_2>& inter_pts) const
+{
+  typedef typename Bounding_traits::Intersection_point  Intersection_point;
+
+  inter_pts.clear();
+
+  // Get the supporting Bezier curves, and make local copies of their control
+  // polygons.
+  const Curve_2&                            B1 = this->_curve;
+  const Curve_2&                            B2 = cv._curve;
+  typename Bounding_traits::Control_points  cp1;
+  typename Bounding_traits::NT              t_min1 = 0, t_max1 = 1;
+  typename Bounding_traits::Control_points  cp2;
+  typename Bounding_traits::NT              t_min2 = 0, t_max2 = 1;
+  bool                                      is_self_intersection = false;
+
+  if (! B1.is_same (B2))
+  {
+    // In case B1 and B2 are different curves, use their full control polygons
+    // in order to approximate all intersection points between the two
+    // supporting Bezier curves.
+    std::copy (B1.control_points_begin(), B1.control_points_end(),
+               std::back_inserter (cp1));
+    std::copy (B2.control_points_begin(), B2.control_points_end(),
+               std::back_inserter(cp2));
+  }
+  else
+  {
+    // In this case we need to approximate the (self-)intersection points of
+    // two subcurves of the same Bezier curve. Clip the control polygons and
+    // obtain the control polygons of the two subcurves.
+    _clip_control_polygon (cp1, t_min1, t_max1);
+    cv._clip_control_polygon (cp2, t_min2, t_max2);
+    is_self_intersection = true;
+  }
+
+  // Use the bounding traits to isolate the intersection points.
+  Bounding_traits                  bound_tr;
+  std::list<Intersection_point>    ipt_bounds;
+
+  bound_tr.compute_intersection_points (cp1, cp2,
+                                        std::back_inserter (ipt_bounds));
+
+  // Construct the approximated points.
+  typename std::list<Intersection_point>::const_iterator  iter;
+
+  for (iter = ipt_bounds.begin(); iter != ipt_bounds.end(); ++iter)
+  {
+    const Bez_point_bound&  bound1 = iter->bound1;
+    const Bez_point_bound&  bound2 = iter->bound2;
+    const Bez_point_bbox&   bbox = iter->bbox;
+
+    // In case it is impossible to further refine the point, stop here.
+    if (! bound1.can_refine || ! bound2.can_refine)
+      return (false);
+
+    // Create the approximated intersection point.
+    Point_2                 pt;
+
+    if (bound1.type == Bounding_traits::Bez_point_bound::RATIONAL_PT &&
+        bound2.type == Bounding_traits::Bez_point_bound::RATIONAL_PT)
+    {
+      CGAL_assertion (CGAL::compare (bound1.t_min, bound1.t_max) == EQUAL);
+      CGAL_assertion (CGAL::compare (bound2.t_min, bound2.t_max) == EQUAL);
+      Rational   t1 = bound1.t_min;
+      Rational   t2 = bound2.t_min;
+      Nt_traits  nt_traits;
+
+      if (is_self_intersection)
+      {
+        // Set the originators with the curve x-monotone IDs.
+        // Note that the parameter values we have computed relate to the
+        // parameter range [t_min1, t_max1] and [t_min2, t_max2], respectively,
+        // so we scale them back to the parameter range [0, 1] that represent
+        // the entire curve.
+        t1 = t_min1 + t1 * (t_max1 - t_min1);
+        t2 = t_min2 + t2 * (t_max2 - t_min2);
+
+        pt = Point_2 (B1, _xid, t1);
+        pt.add_originator (Originator (B2, cv._xid, t2));
+      }
+      else
+      {
+        // Set the originators referring to the entire supporting curves.
+        pt = Point_2 (B1, t1);
+        pt.add_originator (Originator (B2, nt_traits.convert (t2)));
+      }
+    }
+    else
+    {
+      if (is_self_intersection)
+      {
+        // Set the originators with the curve x-monotone IDs.
+        // Note that the parameter values we have computed relate to the
+        // parameter range [t_min1, t_max1] and [t_min2, t_max2], respectively,
+        // so we scale them back to the parameter range [0, 1] that represent
+        // the entire curve.
+        Bez_point_bound  sc_bound1 = bound1;
+        sc_bound1.t_min = t_min1 + bound1.t_min * (t_max1 - t_min1);
+        sc_bound1.t_max = t_min1 + bound1.t_max * (t_max1 - t_min1);
+        pt.add_originator (Originator (B1, _xid, sc_bound1));
+
+        Bez_point_bound  sc_bound2 = bound2;
+        sc_bound2.t_min = t_min2 + bound2.t_min * (t_max2 - t_min2);
+        sc_bound2.t_max = t_min2 + bound2.t_max * (t_max2 - t_min2);
+        pt.add_originator (Originator (B2, cv._xid, sc_bound2));
+      }
+      else
+      {
+        // Set the originators with the curve x-monotone IDs.
+        pt.add_originator (Originator (B1, bound1));
+        pt.add_originator (Originator (B2, bound2));
+      }
+    }
+    pt.set_bbox (bbox);
+
+    inter_pts.push_back (pt);
+  }
+
+  // The approximation process ended OK.
+  return (true);
+}
+
+// ---------------------------------------------------------------------------
+// Compute the intersections with the given subcurve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_intersect
+    (const Self& cv,
+     Intersection_map& inter_map,
+     Bezier_cache& cache,
+     std::vector<Intersection_point_2>& ipts,
+     Self& ovlp_cv) const
+{
+  CGAL_precondition (_curve.id() <= cv._curve.id());
+
+  ipts.clear();
+
+  // In case the two x-monotone curves are subcurves of the same Bezier curve,
+  // first check if this base curve is not self-intersecting. If this is the
+  // case we can avoid any attempt of computing intersection points between
+  // the two subcurves.
+  const bool                self_intersect = (_curve.id() == cv._curve.id());
+
+  if (self_intersect)
+  {
+    if (_xid == cv._xid)
+      return (false);
+
+    if (_curve.has_no_self_intersections())
+      return (false);
+  }
+
+  // Construct the pair of curve IDs and look for it in the intersection map.
+  Curve_pair                 curve_pair (_curve.id(), cv._curve.id());
+  Intersection_map_iterator  map_iter = inter_map.find (curve_pair);
+  std::list<Point_2>         inter_pts;
+  bool                       app_ok = true;
+
+  if (map_iter != inter_map.end())
+  {
+    // Get the intersection points between the two supporting curves as stored
+    // in the map.
+    inter_pts = map_iter->second;
+  }
+  else
+  {
+    // Approximate the intersection points and store them in the map.
+    // Note that we do not store approximated self-intersections in the map,
+    // as they realte only to the pecific x-monotone curves, and not to the
+    // entire curve.
+    app_ok = _approximate_intersection_points (cv,
+                                               inter_pts);
+
+    if (app_ok && ! self_intersect)
+      inter_map[curve_pair] = inter_pts;
+  }
+
+  // Try to approximate the intersection points.
+  bool                in_range1, in_range2;
+  bool                correct_res;
+
+  if (app_ok)
+  {
+    // Approximations are computed using de Casteljau subdivision and
+    // filtering using skewed bounding boxes. A property of these bboxes
+    // if that it can fail in the following cases: (i) there are two intersection
+    // points lying very close together, (ii) there exists an intersection point
+    // whose multiplicity is greater than 1, or (iii) the curves overlap.
+    // If the approximation went OK, then we know that we have a simple
+    // intersection point (with multiplicity 1) if intersection point
+    // is not rational (otherwise it is unknown: at this point, an intersection point
+    // is rational if it was found as a control point during the de Casteljau subdivision)
+    // We go over the points and report the ones lying in the parameter
+    // ranges of both curves. Note that in case of self-intersections,
+    // all points we get are in the respective parameter range of the curves.
+    typename std::list<Point_2>::iterator  pit;
+
+    for (pit = inter_pts.begin(); pit != inter_pts.end(); ++pit)
+    {
+      // Check if the point is in the range of this curve - first using
+      // its parameter bounds, and if we fail we perform an exact check.
+      if (! self_intersect)
+      {
+        in_range1 = _is_in_range (*pit, correct_res);
+      }
+      else
+      {
+        in_range1 = true;
+        correct_res = true;
+      }
+
+      if (! correct_res)
+      {
+        if (! pit->is_exact())
+          pit->make_exact (cache);
+
+        Originator_iterator  p_org = pit->get_originator (_curve, _xid);
+        CGAL_assertion (p_org != pit->originators_end());
+
+        in_range1 = _is_in_range (p_org->parameter(), cache);
+      }
+
+      if (! in_range1)
+        continue;
+
+      // Check if the point is in the range of the other curve - first using
+      // its parameter bounds, and if we fail we perform an exact check.
+      if (! self_intersect)
+      {
+        in_range2 = cv._is_in_range (*pit, correct_res);
+      }
+      else
+      {
+        in_range2 = true;
+        correct_res = true;
+      }
+
+      if (! correct_res)
+      {
+        if (! pit->is_exact())
+          pit->make_exact (cache);
+
+        Originator_iterator  p_org = pit->get_originator (cv._curve, cv._xid);
+        CGAL_assertion (p_org != pit->originators_end());
+
+        in_range2 = cv._is_in_range (p_org->parameter(), cache);
+      }
+
+      if (in_range1 && in_range2)
+      {
+        // In case the originators of the intersection point are not marked
+        // with x-monotone identifiers, mark them now as we know in which
+        // subcurves they lie.
+        Originator_iterator  p_org1 = pit->get_originator (_curve, _xid);
+        CGAL_assertion (p_org1 != pit->originators_end());
+
+        if (p_org1->xid() == 0)
+          pit->update_originator_xid (*p_org1, _xid);
+
+        Originator_iterator  p_org2 = pit->get_originator (cv._curve, cv._xid);
+        CGAL_assertion (p_org2 != pit->originators_end());
+
+        if (p_org2->xid() == 0)
+          pit->update_originator_xid (*p_org2, cv._xid);
+
+        // The point lies within the parameter range of both curves, so we
+        // report it as a valid intersection point with multiplicity 1 or unknown.
+        ipts.push_back (Intersection_point_2 (*pit, pit->is_rational()?0:1));
+      }
+    }
+
+    // Since the apporximation went fine we cannot possibly have an overlap:
+    return (false);
+  }
+
+  // We did not succeed in isolate the approximate intersection points.
+  // We therefore resort to the exact procedure and exactly compute them.
+  bool                   do_ovlp;
+  const Intersect_list&  inter_list =
+    cache.get_intersections (_curve.id(),
+                             _curve.x_polynomial(), _curve.x_norm(),
+                             _curve.y_polynomial(), _curve.y_norm(),
+                             cv._curve.id(),
+                             cv._curve.x_polynomial(), cv._curve.x_norm(),
+                             cv._curve.y_polynomial(), cv._curve.y_norm(),
+                             do_ovlp);
+
+  if (do_ovlp)
+  {
+    // Check the case of co-inciding endpoints
+    if (left().equals (cv.left(), cache))
+    {
+      if (right().equals (cv.right(), cache))
+      {
+        // The two curves entirely overlap one another:
+        ovlp_cv = cv;
+        return (true);
+      }
+
+      Algebraic     t_right;
+      bool          is_endpoint;
+
+      if (_is_in_range (cv.right(), cache, t_right, is_endpoint))
+      {
+        CGAL_assertion (! is_endpoint);
+
+        // Case 1 - *this:   s +-----------+ t
+        //             cv:   s'+=====+ t'
+        //
+        // Take cv as the overlapping subcurve, and add originators for its
+        // right endpoint referring to *this.
+        ovlp_cv = cv;
+        ovlp_cv.right().add_originator (Originator (_curve, _xid, t_right));
+
+        return (true);
+      }
+      else if (cv._is_in_range (right(), cache, t_right, is_endpoint))
+      {
+        CGAL_assertion (! is_endpoint);
+
+        // Case 2 - *this:   s +----+ t
+        //             cv:   s'+==========+ t'
+        //
+        // Take this as the overlapping subcurve, and add originators for its
+        // right endpoint referring to cv.
+        ovlp_cv = *this;
+        ovlp_cv.right().add_originator (Originator (cv._curve, cv._xid,
+                                                    t_right));
+
+        return (true);
+      }
+
+      // In this case the two curves do not overlap, but have a common left
+      // endpoint.
+      ipts.push_back (Intersection_point_2 (left(), 0));
+      return (false);
+    }
+    else if (right().equals (cv.right(), cache))
+    {
+      Algebraic     t_left;
+      bool          is_endpoint;
+
+      if (_is_in_range (cv.left(), cache, t_left, is_endpoint))
+      {
+        CGAL_assertion (! is_endpoint);
+
+        // Case 3 - *this:   s +-----------+ t
+        //             cv:         s'+=====+ t'
+        //
+        // Take cv as the overlapping subcurve, and add originators for its
+        // left endpoint referring to *this.
+        ovlp_cv = cv;
+        ovlp_cv.left().add_originator (Originator (_curve, _xid, t_left));
+
+        return (true);
+      }
+      else if (cv._is_in_range (left(), cache, t_left, is_endpoint))
+      {
+        CGAL_assertion (! is_endpoint);
+
+        // Case 4 - *this:         s +----+ t
+        //             cv:   s'+==========+ t'
+        //
+        // Take this as the overlapping subcurve, and add originators for its
+        // left endpoint referring to cv.
+        ovlp_cv = *this;
+        ovlp_cv.left().add_originator (Originator (cv._curve, cv._xid,
+                                                   t_left));
+
+        return (true);
+      }
+
+      // In this case the two curves do not overlap, but have a common right
+      // endpoint.
+      ipts.push_back (Intersection_point_2 (right(), 0));
+      return (false);
+    }
+
+    // If we reached here, none of the endpoints coincide.
+    // Check the possible overlap scenarios.
+    Point_2         ovrp_src, ovlp_trg;
+    Algebraic       t_cv_src;
+    Algebraic       t_cv_trg;
+    bool            is_endpoint = false;
+
+    if (_is_in_range (cv._ps, cache, t_cv_src, is_endpoint) &&
+        ! is_endpoint)
+    {
+      if (_is_in_range (cv._pt, cache, t_cv_trg, is_endpoint) &&
+          ! is_endpoint)
+      {
+        // Case 5 - *this:   s +-----------+ t
+        //             cv:     s' +=====+ t'
+        //
+        // Take cv as the overlapping subcurve, and add originators for its
+        // endpoints referring to *this.
+        ovlp_cv = cv;
+        ovlp_cv._ps.add_originator (Originator (_curve, _xid, t_cv_src));
+        ovlp_cv._pt.add_originator (Originator (_curve, _xid, t_cv_trg));
+
+        return (true);
+      }
+      else
+      {
+        // Case 6 - *this:   s +-----------+ t
+        //             cv:            s' +=====+ t'
+        //
+        // Use *this as a base, and replace its source point.
+        ovlp_cv = *this;
+        ovlp_cv._ps = cv._ps;
+        ovlp_cv._ps.add_originator (Originator (_curve, _xid, t_cv_src));
+
+        // Add an originator to the target point, referring to cv:
+        CGAL_assertion_code (bool  pt_in_cv_range =)
+        cv._is_in_range (ovlp_cv._pt, cache, t_cv_trg, is_endpoint);
+        CGAL_assertion (pt_in_cv_range);
+        ovlp_cv._pt.add_originator (Originator (cv._curve, cv._xid, t_cv_trg));
+
+        return (true);
+      }
+    }
+    else if (_is_in_range (cv._pt, cache, t_cv_trg, is_endpoint) &&
+             ! is_endpoint)
+    {
+      // Case 7 - *this:      s +-----------+ t
+      //             cv:   s' +=====+ t'
+      //
+      // Use *this as a base, and replace its target point.
+      ovlp_cv = *this;
+      ovlp_cv._pt = cv._pt;
+      ovlp_cv._pt.add_originator (Originator (_curve, _xid, t_cv_trg));
+
+      // Add an originator to the source point, referring to cv:
+      CGAL_assertion_code (bool  ps_in_cv_range =)
+      cv._is_in_range (ovlp_cv._ps, cache, t_cv_src, is_endpoint);
+      CGAL_assertion (ps_in_cv_range);
+      ovlp_cv._ps.add_originator (Originator (cv._curve, cv._xid, t_cv_src));
+
+      return (true);
+    }
+    else if (cv._is_in_range (_ps, cache, t_cv_src, is_endpoint) &&
+             cv._is_in_range (_pt, cache, t_cv_trg, is_endpoint))
+    {
+      // Case 8 - *this:      s +---------+ t
+      //             cv:  s' +================+ t'
+      //
+      // Take *this as the overlapping subcurve, and add originators for its
+      // endpoints referring to cv.
+      ovlp_cv = *this;
+      ovlp_cv._ps.add_originator (Originator (cv._curve, cv._xid, t_cv_src));
+      ovlp_cv._pt.add_originator (Originator (cv._curve, cv._xid, t_cv_trg));
+
+      return (true);
+    }
+
+    // If we reached here, there are no overlaps:
+    return (false);
+  }
+
+  // Go over the points and report the ones lying in the parameter ranges
+  // of both curves.
+  Intersect_iter          iit;
+
+  for (iit = inter_list.begin(); iit != inter_list.end(); ++iit)
+  {
+    if (_is_in_range (iit->s, cache) &&
+        cv._is_in_range (iit->t, cache))
+    {
+      // Construct an intersection point with unknown multiplicity.
+      Point_2                 pt (iit->x, iit->y,
+                                  true);        // Dummy parameter.
+
+      pt.add_originator (Originator (_curve, _xid, iit->s));
+      pt.add_originator (Originator (cv._curve, cv._xid, iit->t));
+
+      ipts.push_back (Intersection_point_2 (pt, 0));
+    }
+  }
+
+  // Mark that there is no overlap:
+  return (false);
+}
+
+// ---------------------------------------------------------------------------
+// Compute the exact vertical position of the point p with respect to the
+// curve.
+//
+template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
+Comparison_result
+_Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::
+_exact_vertical_position(const Point_2& p,
+                         bool
+#if !defined(CGAL_NO_ASSERTIONS)
+                         force_exact
+#endif
+                         ) const
+{
+  // If it is a rational point, obtain its rational reprsentation.
+  Rat_point_2              rat_p;
+
+  if (p.is_rational())
+    rat_p = (Rat_point_2) p;
+
+  // Get a rational approximation of the parameter values at the endpoints.
+  Nt_traits                nt_traits;
+  Originator_iterator      ps_org = _ps.get_originator (_curve, _xid);
+  CGAL_assertion (ps_org != _ps.originators_end());
+
+  Originator_iterator      pt_org = _pt.get_originator (_curve, _xid);
+  CGAL_assertion (pt_org != _pt.originators_end());
+
+  Rational                 my_t_min;
+  Rational                 my_t_max;
+
+
+  bool      can_refine_s = ! _ps.is_exact();
+  bool      can_refine_t = ! _pt.is_exact();
+
+  do {
+    if (CGAL::compare (ps_org->point_bound().t_max,
+                       pt_org->point_bound().t_min) == SMALLER)
+    {
+      // In case the parameter value of the source is smaller than the target's.
+      my_t_min = ps_org->point_bound().t_max;
+      my_t_max = pt_org->point_bound().t_min;
+      break;
+    }
+    else
+      if (CGAL::compare (pt_org->point_bound().t_max,
+                                     ps_org->point_bound().t_min) == SMALLER)
+    {
+      // In case the parameter value of the target is smaller than the source's.
+      my_t_min = pt_org->point_bound().t_max;
+      my_t_max = ps_org->point_bound().t_min;
+      break;
+    }
+    // Try to refine the points.
+
+    if (can_refine_s)
+      can_refine_s = _ps.refine();
+
+    if (can_refine_t)
+      can_refine_t = _pt.refine();
+  }
+  while(can_refine_s || can_refine_t);
+
+  // Start the subdivision process from the entire supporting curve.
+  std::list<Subcurve>      subcurves;
+  Subcurve                 init_scv;
+  Rational                 x_min, y_min, x_max, y_max;
+  bool                     no_x_ovlp;
+  Comparison_result        res_y_min, res_y_max;
+
+  std::copy (_curve.control_points_begin(), _curve.control_points_end(),
+             std::back_inserter (init_scv.control_points));
+  init_scv.t_min = 0;
+  init_scv.t_max = 1;
+  subcurves.push_back (init_scv);
+
+  while (! subcurves.empty())
+  {
+    // Go over the list of subcurves and consider only those lying in the
+    // given [t_min, t_max] bound.
+    typename std::list<Subcurve>::iterator  iter = subcurves.begin();
+    bool                                    is_fully_in_range;
+
+    while (iter != subcurves.end())
+    {
+      if (CGAL::compare (iter->t_max, my_t_min) == SMALLER ||
+          CGAL::compare (iter->t_min, my_t_max) == LARGER)
+      {
+        // Subcurve out of bounds of the x-monotone curve we consider - erase
+        // it and continue to next subcurve.
+        subcurves.erase(iter++);
+        continue;
+      }
+
+      // Construct the bounding box of the subcurve and compare it to
+      // the bounding box of the point.
+      iter->bbox (x_min, y_min, x_max, y_max);
+
+      if (p.is_rational())
+      {
+        no_x_ovlp = (CGAL::compare (x_min, rat_p.x()) == LARGER ||
+                     CGAL::compare (x_max, rat_p.x()) == SMALLER);
+      }
+      else
+      {
+        no_x_ovlp = (CGAL::compare (nt_traits.convert (x_min),
+                                    p.x()) == LARGER ||
+                     CGAL::compare (nt_traits.convert (x_max),
+                                    p.x()) == SMALLER);
+      }
+
+      if (no_x_ovlp)
+      {
+        // Subcurve out of x-bounds - erase it and continue to next subcurve.
+        subcurves.erase(iter++);
+        continue;
+      }
+
+      // In this case, check if there is an overlap in the y-range.
+      if (p.is_rational())
+      {
+        res_y_min = CGAL::compare (rat_p.y(), y_min);
+        res_y_max = CGAL::compare (rat_p.y(), y_max);
+      }
+      else
+      {
+        res_y_min = CGAL::compare (p.y(), nt_traits.convert (y_min));
+        res_y_max = CGAL::compare (p.y(), nt_traits.convert (y_max));
+      }
+
+      is_fully_in_range = (CGAL::compare (iter->t_min, my_t_min) != SMALLER) &&
+                          (CGAL::compare (iter->t_max, my_t_max) != LARGER);
+
+      if (res_y_min != res_y_max || ! is_fully_in_range)
+      {
+        // Subdivide the current subcurve and replace iter with the two
+        // resulting subcurves using de Casteljau's algorithm.
+        Subcurve           scv_l, scv_r;
+
+        scv_l.t_min = iter->t_min;
+        scv_r.t_max = iter->t_max;
+        scv_l.t_max = scv_r.t_min = (iter->t_min + iter->t_max) / 2;
+
+        bisect_control_polygon_2 (iter->control_points.begin(),
+                                  iter->control_points.end(),
+                                  std::back_inserter(scv_l.control_points),
+                                  std::front_inserter(scv_r.control_points));
+
+        subcurves.insert (iter, scv_l);
+        subcurves.insert (iter, scv_r);
+        subcurves.erase(iter++);
+
+        continue;
+      }
+
+      if (res_y_min == res_y_max)
+      {
+        CGAL_assertion (res_y_min != EQUAL);
+
+        // We reached a separation, as p is either strictly above or strictly
+        // below the bounding box of the current subcurve.
+        return (res_y_min);
+      }
+
+      // If we got here without entering one of the clauses above,
+      // then iter has not been incremented yet.
+      ++iter;
+    }
+  }
+
+  // We can reach here only if we do not force an exact result.
+  CGAL_assertion (! force_exact);
+  return (EQUAL);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
new file mode 100644
index 0000000..058a6d9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
@@ -0,0 +1,2492 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein <wein at post.tau.ac.il>
+//                 Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_CIRCLE_SEGMENT_2_H
+#define CGAL_CIRCLE_SEGMENT_2_H
+
+/*! \file
+ * Header file for the _Circle_segment_2<Kernel, Filter> class.
+ */
+#include <CGAL/Sqrt_extension.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Handle_for.h>
+#include <list>
+#include <map>
+#include <ostream>
+
+namespace CGAL {
+
+// Forward declaration:
+template <class NumberType_, bool Filter_> class _One_root_point_2;
+
+/*! \class
+ * Representation of a point whose coordinates are one-root numbers.
+ */
+template <class NumberType_, bool Filter_>
+class _One_root_point_2_rep //: public Ref_counted
+{
+  friend class _One_root_point_2<NumberType_, Filter_>;
+
+public:
+
+  typedef NumberType_                               NT;
+  typedef _One_root_point_2_rep<NT, Filter_>        Self;
+  typedef Sqrt_extension<NT,NT,Tag_true,Boolean_tag<Filter_> >    CoordNT;
+
+private:
+
+  CoordNT       _x;            // The coordinates.
+  CoordNT       _y;
+
+public:
+
+  /*! Default constructor. */
+  _One_root_point_2_rep () :
+    _x (0),
+    _y (0)
+  {}
+
+  /*! Constructor of a point with one-root coefficients.
+     This constructor of a point can also be used with rational coefficients
+     thanks to convertor of CoordNT. */
+  _One_root_point_2_rep (const CoordNT& x, const CoordNT& y) :
+    _x (x),
+    _y (y)
+  {}
+};
+
+/*! \class
+ * A handle for a point whose coordinates are one-root numbers.
+ */
+template <class NumberType_, bool Filter_>
+class _One_root_point_2 :
+  public Handle_for<_One_root_point_2_rep<NumberType_, Filter_> >
+{
+public:
+
+  typedef NumberType_                           NT;
+  typedef _One_root_point_2<NT, Filter_>        Self;
+
+private:
+
+  typedef _One_root_point_2_rep<NT, Filter_>    Point_rep;
+  typedef Handle_for<Point_rep>                 Point_handle;
+
+public:
+
+  typedef typename Point_rep::CoordNT           CoordNT;
+
+  /*! Default constructor. */
+  _One_root_point_2 () :
+    Point_handle (Point_rep())
+  {}
+
+  /*! Copy constructor. */
+  _One_root_point_2 (const Self& p) :
+    Point_handle (p)
+  {}
+
+  /*! Constructor of a point with one-root coefficients.
+     This constructor of a point can also be used with rational coefficients
+     thanks to convertor of CoordNT. */
+  _One_root_point_2 (const CoordNT& x, const CoordNT& y) :
+    Point_handle (Point_rep (x, y))
+  {}
+
+  /*! Get the x-coordinate. */
+  const CoordNT& x () const
+  {
+    return (this->ptr()->_x);
+  }
+
+  /*! Get the y-coordinate. */
+  const CoordNT& y () const
+  {
+    return (this->ptr()->_y);
+  }
+
+  /*! Check for equality. */
+  bool equals (const Self& p) const
+  {
+    if (this->identical (p))
+      return (true);
+
+    return (CGAL::compare (this->ptr()->_x, p.ptr()->_x) == EQUAL &&
+            CGAL::compare (this->ptr()->_y, p.ptr()->_y) == EQUAL);
+  }
+
+  bool operator != (const Self& p) const
+  {
+    return !equals(p);
+  }
+
+  bool operator == (const Self& p)
+  {
+    return equals(p);
+  }
+  /*! Set the point coordinates. */
+  void set (const NT& x, const NT& y)
+  {
+    this->copy_on_write();
+    this->ptr()->_x = CoordNT (x);
+    this->ptr()->_y = CoordNT (y);
+    return;
+  }
+
+  /*! Set the point coordinates. */
+  void set (const CoordNT& x, const CoordNT& y)
+  {
+    this->copy_on_write();
+    this->ptr()->_x = x;
+    this->ptr()->_y = y;
+    return;
+  }
+};
+
+/*!
+ * Exporter for conic arcs.
+ */
+template <class NT, bool Filter>
+std::ostream&
+operator<< (std::ostream& os,
+            const _One_root_point_2<NT, Filter>& p)
+{
+  os << CGAL::to_double(p.x()) << ' ' << CGAL::to_double(p.y());
+  return (os);
+}
+
+/*
+template <class NT, bool Filter>
+std::istream & operator >> (std::istream & is,
+                            _One_root_point_2<NT, Filter>& p)
+{
+  typename _One_root_point_2<NT, Filter>::CoordNT ort1,ort2;
+  is >> ort1 >> ort2;
+  p=_One_root_point_2<NT, Filter>(ort1,ort2);
+  return is;
+}
+*/
+
+/*! \class
+ * Representation of a circle, a circular arc or a line segment.
+ */
+template <class Kernel_, bool Filter_>
+class _Circle_segment_2
+{
+public:
+
+  typedef Kernel_                                          Kernel;
+  typedef typename Kernel::FT                              NT;
+  typedef _One_root_point_2<NT, Filter_>                   Point_2;
+  typedef typename Kernel::Circle_2                        Circle_2;
+  typedef typename Kernel::Segment_2                       Segment_2;
+  typedef typename Kernel::Line_2                          Line_2;
+
+protected:
+
+  typedef typename Point_2::CoordNT                        CoordNT;
+
+  // Data members:
+  Line_2        _line;        // The supporting line (for line segments).
+  Circle_2      _circ;        // The supporting circle (for circular arcs).
+  bool          _is_full;     // Whether we have a full circle.
+  bool          _has_radius;  // Is the radius (not just the squared radius)
+                              // explicitly specified).
+  NT            _radius;      // The radius, in case it is specified.
+  Point_2       _source;      // The source point.
+  Point_2       _target;      // The target point.
+  Orientation   _orient;      // The orientation (COLLINEAR for line segments).
+
+public:
+
+  /*! Default constructor. */
+  _Circle_segment_2 () :
+    _is_full (false),
+    _has_radius (false),
+    _orient (COLLINEAR)
+  {}
+
+  /*!
+   * Constructor from a line segment.
+   * \param seg The segment.
+   */
+  _Circle_segment_2 (const Segment_2& seg) :
+    _line (seg),
+    _is_full (false),
+    _has_radius (false),
+    _source (seg.source().x(), seg.source().y()),
+    _target (seg.target().x(), seg.target().y()),
+    _orient (COLLINEAR)
+  {}
+
+  /*!
+  * Constructor from of a line segment.
+   * \param ps The source point.
+   * \param pt The target point.
+   */
+  _Circle_segment_2 (const typename Kernel::Point_2& ps,
+                     const typename Kernel::Point_2& pt) :
+    _line (ps, pt),
+    _is_full (false),
+    _has_radius (false),
+    _source (ps.x(), ps.y()),
+    _target (pt.x(), pt.y()),
+    _orient (COLLINEAR)
+  {}
+
+  /*!
+   * Constructor of a segment, given a supporting line and two endpoints,
+   * which need not necessarily have rational coordinates.
+   * \param line The supporting line.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre Both endpoints lie on the supporting line.
+   */
+  _Circle_segment_2 (const Line_2& line,
+                     const Point_2& source, const Point_2& target) :
+    _line (line),
+    _is_full (false),
+    _has_radius (false),
+    _source (source),
+    _target (target),
+    _orient (COLLINEAR)
+  {
+    CGAL_precondition (CGAL::compare (source.x()*line.a() + line.c(),
+                                      -source.y()*line.b()) == EQUAL);
+
+    CGAL_precondition (CGAL::compare (target.x()*line.a() + line.c(),
+                                      -target.y()*line.b()) == EQUAL);
+  }
+
+  /*!
+   * Constructor from a circle.
+   * \param circ The circle.
+   */
+  _Circle_segment_2 (const Circle_2& circ) :
+    _circ (circ),
+    _is_full (true),
+    _has_radius (false),
+    _orient (circ.orientation())
+  {
+    CGAL_assertion (_orient != COLLINEAR);
+  }
+
+  /*!
+   * Constructor from a circle.
+   * \param c The circle center.
+   * \param r The radius.
+   * \param orient The orientation of the circle.
+   */
+  _Circle_segment_2 (const typename Kernel::Point_2& c,
+                     const NT& r,
+                     Orientation orient = COUNTERCLOCKWISE) :
+    _circ (c, r*r, orient),
+    _is_full (true),
+    _has_radius (true),
+    _radius (r),
+    _orient (orient)
+  {
+    CGAL_assertion (orient != COLLINEAR);
+  }
+
+  /*!
+   * Constructor of a circular arc, given a supporting circle and two
+   * endpoints, which need not necessarily have rational coordinates.
+   * The orientation of the circle determines the orientation of the arc.
+   * \param circ The supporting circle.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre Both endpoints lie on the supporting circle.
+   */
+  _Circle_segment_2 (const Circle_2& circ,
+                     const Point_2& source, const Point_2& target) :
+    _circ (circ),
+    _is_full (false),
+    _has_radius (false),
+    _source (source),
+    _target (target),
+    _orient (circ.orientation())
+  {
+    CGAL_assertion (_orient != COLLINEAR);
+
+    CGAL_precondition
+      (CGAL::compare (CGAL::square (source.x() - circ.center().x()),
+                      circ.squared_radius() -
+                      CGAL::square (source.y() - circ.center().y())) == EQUAL);
+
+    CGAL_precondition
+      (CGAL::compare (CGAL::square (target.x() - circ.center().x()),
+                      circ.squared_radius() -
+                      CGAL::square (target.y() - circ.center().y())) == EQUAL);
+  }
+
+  /*!
+   * Constructor of a circular arc, given a supporting circle and two
+   * endpoints, which need not necessarily have rational coordinates.
+   * \param c The circle center.
+   * \param r The radius.
+   * \param orient The orientation of the circle.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre Both endpoints lie on the supporting circle.
+   */
+  _Circle_segment_2 (const typename Kernel::Point_2& c,
+                     const NT& r, Orientation orient,
+                     const Point_2& source, const Point_2& target) :
+    _circ (c, r*r, orient),
+    _is_full (false),
+    _has_radius (true),
+    _radius (r),
+    _source (source),
+    _target (target),
+    _orient (orient)
+  {
+    CGAL_assertion (orient != COLLINEAR);
+
+    CGAL_precondition
+      (CGAL::compare (CGAL::square (source.x() - c.x()),
+                      CGAL::square (r) -
+                      CGAL::square (source.y() - c.y())) == EQUAL);
+
+    CGAL_precondition
+      (CGAL::compare (CGAL::square (target.x() - c.x()),
+                      CGAL::square (r) -
+                      CGAL::square (target.y() - c.y())) == EQUAL);
+  }
+
+  /*!
+   * Constructor of a circular arc, from the given three points, in case of
+   * three collinear points, a segment will be constructed.
+   * \param p1 The arc source.
+   * \param p2 A point in the interior of the arc.
+   * \param p3 The arc target.
+   * \pre p1 and p3 are not equal.
+   */
+   _Circle_segment_2 (const typename Kernel::Point_2& p1,
+                      const typename Kernel::Point_2& p2,
+                      const typename Kernel::Point_2& p3) :
+     _is_full(false),
+     _has_radius(false),
+     _source(p1.x(), p1.y()),
+     _target(p3.x(), p3.y())
+  {
+    // Set the source and target.
+    NT          x1 = p1.x();
+    NT          y1 = p1.y();
+    NT          x2 = p2.x();
+    NT          y2 = p2.y();
+    NT          x3 = p3.x();
+    NT          y3 = p3.y();
+
+
+    // Make sure that the source and the taget are not the same.
+    CGAL_precondition (Kernel().compare_xy_2_object() (p1, p3) != EQUAL);
+
+    // Compute the lines: A1*x + B1*y + C1 = 0,
+    //               and: A2*x + B2*y + C2 = 0,
+    // where:
+    const NT  _two  = 2;
+
+    const NT  A1 = _two*(x1 - x2);
+    const NT  B1 = _two*(y1 - y2);
+    const NT  C1 = CGAL::square(y2) - CGAL::square(y1) +
+                   CGAL::square(x2) - CGAL::square(x1);
+
+    const NT  A2 = _two*(x2 - x3);
+    const NT  B2 = _two*(y2 - y3);
+    const NT  C2 = CGAL::square(y3) - CGAL::square(y2) +
+                   CGAL::square(x3) - CGAL::square(x2);
+
+    // Compute the coordinates of the intersection point between the
+    // two lines, given by (Nx / D, Ny / D), where:
+    const NT  Nx = B1*C2 - B2*C1;
+    const NT  Ny = A2*C1 - A1*C2;
+    const NT  D = A1*B2 - A2*B1;
+
+    // Make sure the three points are not collinear.
+    const bool  points_collinear = (CGAL::sign (D) == ZERO);
+
+    if (points_collinear)
+    {
+      _line  = Line_2(p1, p3);
+      _orient = COLLINEAR;
+      return;
+    }
+
+    // The equation of the underlying circle is given by:
+
+    NT x_center = Nx / D;
+    NT y_center = Ny / D;
+
+    typename Kernel::Point_2 circ_center(x_center, y_center);
+
+
+
+    NT sqr_rad = (CGAL::square(D*x2 - Nx) + CGAL::square(D*y2 - Ny)) /
+                 CGAL::square(D);
+
+    // Determine the orientation: If the mid-point forms a left-turn with
+    // the source and the target points, the orientation is positive (going
+    // counterclockwise).
+    // Otherwise, it is negative (going clockwise).
+    Kernel                         ker;
+    typename Kernel::Orientation_2 orient_f = ker.orientation_2_object();
+
+    if (orient_f(p1, p2, p3) == LEFT_TURN)
+      _orient = COUNTERCLOCKWISE;
+    else
+      _orient = CLOCKWISE;
+
+     _circ = Circle_2(circ_center, sqr_rad, _orient);
+  }
+
+  /*!
+   * Get the orientation of the curve.
+   * \return COLLINEAR in case of a line segment,
+   *         CLOCKWISE or COUNTERCLOCKWISE for circular curves.
+   */
+  inline Orientation orientation () const
+  {
+    return (_orient);
+  }
+
+  /*! Check if the arc is linear. */
+  inline bool is_linear () const
+  {
+    return (_orient == COLLINEAR);
+  }
+
+  /*! Check if the arc is circular. */
+  inline bool is_circular () const
+  {
+    return (_orient != COLLINEAR);
+  }
+
+  /*!
+   * Get the supporting line.
+   * \pre The curve orientation is COLLINEAR.
+   */
+  const Line_2& supporting_line () const
+  {
+    CGAL_precondition (_orient == COLLINEAR);
+    return (_line);
+  }
+
+  /*!
+   * Get the supporting circle.
+   * \pre The curve orientation is not COLLINEAR.
+   */
+  const Circle_2& supporting_circle () const
+  {
+    CGAL_precondition (_orient != COLLINEAR);
+    return (_circ);
+  }
+
+  /*! Check if the curve is a full circle. */
+  bool is_full () const
+  {
+    return (_is_full);
+  }
+
+  /*!
+   * Get the source point.
+   * \pre The curve is not a full circle.
+   */
+  const Point_2& source () const
+  {
+    CGAL_precondition (! _is_full);
+    return (_source);
+  }
+
+  /*!
+   * Get the target point.
+   * \pre The curve is not a full circle.
+   */
+  const Point_2& target () const
+  {
+    CGAL_precondition (! _is_full);
+    return (_target);
+  }
+
+  /*!
+   * Get the vertical tangency points the arc contains.
+   * \param vpts Output: The vertical tagnecy points.
+   * \pre The curve is circular.
+   * \return The number of points (0, 1, or 2).
+   */
+  unsigned int vertical_tangency_points (Point_2 *vpts) const
+  {
+    CGAL_precondition (_orient != COLLINEAR);
+    unsigned int  n_vpts = 0;
+
+    if (_is_full)
+    {
+      // In case of a full circle, create both vertical tangency points:
+      const NT&     x0 = _circ.center().x();
+      const NT&     y0 = _circ.center().y();
+      CoordNT       xv_left;
+      CoordNT       xv_right;
+
+      if (_has_radius)
+      {
+        // In case the radius is explicitly given:
+        xv_left = CoordNT (x0 - _radius);
+        xv_right = CoordNT (x0 + _radius);
+      }
+      else
+      {
+        // In case only the squared root is given:
+        xv_left = CoordNT (x0, NT(-1), _circ.squared_radius());
+        xv_right = CoordNT (x0, NT(1), _circ.squared_radius());
+      }
+
+      vpts[0] = Point_2 (xv_left, y0);
+      vpts[1] = Point_2 (xv_right, y0);
+      return (2);
+    }
+
+    if (_orient == COUNTERCLOCKWISE)
+    {
+      // Compute the vertical tangency points for the arc:
+      n_vpts = _ccw_vertical_tangency_points (_source, _target, vpts);
+    }
+    else
+    {
+      // Compute the vertical tangency points for the opposite arc:
+      n_vpts = _ccw_vertical_tangency_points (_target, _source, vpts);
+
+      // Swap their order, if necessary.
+      if (n_vpts == 2)
+      {
+        Point_2   temp = vpts[0];
+        vpts[0] = vpts[1];
+        vpts[1] = temp;
+      }
+    }
+
+    return (n_vpts);
+  }
+
+private:
+
+  /*!
+   * Get the vertical tangency points the arc contains, assuming it is
+   * counterclockwise oreinted.
+   * \param vpts Output: The vertical tagnecy points.
+   * \return The number of points (0, 1, or 2).
+   */
+  unsigned int _ccw_vertical_tangency_points (const Point_2& src,
+                                              const Point_2& trg,
+                                              Point_2 *vpts) const
+  {
+    unsigned int  n_vpts = 0;
+    const NT&     x0 = _circ.center().x();
+    const NT&     y0 = _circ.center().y();
+    int           qs = _quart_index (src);
+    int           qt = _quart_index (trg);
+
+    if (qs == qt)
+    {
+      if ((qs == 0 || qs == 1) && CGAL::compare (src.x(), trg.x()) == LARGER)
+        // We have an x-monotone arc lying on the upper half of the circle:
+        return (0);
+
+      if ((qs == 2 || qs == 3) && CGAL::compare (src.x(), trg.x()) == SMALLER)
+        // We have an x-monotone arc lying on the lower half of the circle:
+        return (0);
+    }
+
+    // Make sure the target quarter is larger than the source quarter, by
+    // adding 4 to its index, if necessary.
+    if (qt <= qs)
+      qt += 4;
+
+    // Start traversing the quarter-planes and collect the vertical tangency
+    // points we encounter.
+    while (qs < qt)
+    {
+      if ((qs % 4) == 1)
+      {
+        // We collect the left tangency point when going from Q[1] to Q[2]:
+        if (CGAL::compare (x0, trg.x()) != LARGER ||
+            CGAL::compare (y0, trg.y()) != EQUAL)
+        {
+          if (_has_radius)
+            vpts[n_vpts] = Point_2 (CoordNT (x0 - _radius), y0);
+          else
+            vpts[n_vpts] = Point_2 (CoordNT (x0, NT(-1), _circ.squared_radius()),
+                                             y0);
+
+          n_vpts++;
+        }
+      }
+      else if ((qs % 4) == 3)
+      {
+        // We collect the right tangency point when going from Q[3] to Q[0]:
+        if (CGAL::compare (x0, trg.x()) != SMALLER ||
+            CGAL::compare (y0, trg.y()) != EQUAL)
+        {
+          if (_has_radius)
+            vpts[n_vpts] = Point_2 (CoordNT (x0 + _radius), y0);
+          else
+            vpts[n_vpts] = Point_2 (CoordNT (x0, NT(1), _circ.squared_radius()),
+                                             y0);
+          n_vpts++;
+        }
+      }
+
+      qs++;
+    }
+
+    return (n_vpts);
+  }
+
+  /*!
+   * Get the index of the quarter-plane containing the given point,
+   * where the circle center is considered to be the origin.
+   */
+  int _quart_index (const Point_2& p) const
+  {
+    // The plane looks like:
+    //
+    //      Q[1] :  |   Q[0]:
+    //      x <= 0  |   x >  0
+    //      y >  0  |   y >= 0
+    //    ----------+-----------
+    //      Q[2] :  |   Q[3]:
+    //      x <  0  |   x >= 0
+    //      y <= 0  |   y <  0
+    //
+    const CGAL::Sign   sign_x = CGAL::sign (p.x() - _circ.center().x());
+    const CGAL::Sign   sign_y = CGAL::sign (p.y() - _circ.center().y());
+
+    if (sign_x == POSITIVE)
+    {
+      return ((sign_y == NEGATIVE) ? 3 : 0);
+    }
+    else if (sign_x == NEGATIVE)
+    {
+      return ((sign_y == POSITIVE) ? 1 : 2);
+    }
+
+    CGAL_assertion (sign_y != ZERO);
+    return ((sign_y == POSITIVE) ? 1 : 3);
+  }
+};
+
+/*!
+ * Exporter for line segments and circular arcs.
+ */
+template <class Kernel, bool Filter>
+std::ostream&
+operator<< (std::ostream& os,
+            const _Circle_segment_2<Kernel, Filter>& c)
+{
+  if (c.orientation() == COLLINEAR)
+  {
+    os<< "segment: " << c.source() << " -> " << c.target();
+  }
+  else
+  {
+    if(!c.is_full())
+    {
+      os << "circular arc: " << c.supporting_circle() << ' '
+         << c.source() << " -> " << c.target();
+    }
+    else
+    {
+      os << "circular arc: " << c.supporting_circle();
+    }
+  }
+
+  return (os);
+}
+
+/*! \class
+ * Representation of an x-monotone circular arc.
+ */
+template <class Kernel_, bool Filter_>
+class _X_monotone_circle_segment_2
+{
+public:
+
+  typedef Kernel_                                          Kernel;
+  typedef _X_monotone_circle_segment_2<Kernel, Filter_>    Self;
+  typedef typename Kernel::FT                              NT;
+  typedef _One_root_point_2<NT, Filter_>                   Point_2;
+  typedef typename Kernel::Circle_2                        Circle_2;
+  typedef typename Kernel::Line_2                          Line_2;
+  typedef typename Point_2::CoordNT                        CoordNT;
+
+  // Type definition for the intersection points mapping.
+  typedef std::pair<unsigned int, unsigned int>   Curve_id_pair;
+  typedef unsigned int                            Multiplicity;
+  typedef std::pair<Point_2,Multiplicity>         Intersection_point_2;
+  typedef std::list<Intersection_point_2>         Intersection_list;
+
+  /*!
+   * \struct Less functor for Curve_id_pair.
+   */
+  struct Less_id_pair
+  {
+    bool operator() (const Curve_id_pair& ip1, const Curve_id_pair& ip2) const
+    {
+      // Compare the pairs of IDs lexicographically.
+      return (ip1.first < ip2.first ||
+              (ip1.first == ip2.first && ip1.second < ip2.second));
+    }
+  };
+
+  typedef std::map<Curve_id_pair,
+                   Intersection_list,
+                   Less_id_pair>                  Intersection_map;
+  typedef typename Intersection_map::value_type   Intersection_map_entry;
+  typedef typename Intersection_map::iterator     Intersection_map_iterator;
+
+protected:
+
+  NT           _first;       // The x-coordinate of the circle center.
+                             // Or: the coefficient of x in the line equation.
+
+  NT           _second;      // The y-coordinate of the circle center.
+                             // Or: the coefficient of y in the line equation.
+
+  NT           _third;       // The squared radius of the supporting circle.
+                             // Or: the free coefficient in the line equation.
+
+  Point_2      _source;      // The source point.
+  Point_2      _target;      // The target point.
+
+  enum {
+    IS_DIRECTED_RIGHT_MASK = 1,
+    IS_VERTICAL_SEGMENT_MASK = 2,
+    COUNTERCLOCKWISE_CODE = 4,
+    CLOCKWISE_CODE = 8,
+    ORIENTATION_MASK = 4 + 8,
+    INDEX_SHIFT_BITS = 4
+  };
+
+  unsigned int _info;        // A bit vector, where:
+                             // Bit 0 (the LSB): marks if the arc is directed
+                             //                  from left to right.
+                             // Bit 1: marks if the arc is a vertical segment.
+                             // Bits 2-3: mark the orientation.
+                             // The rest of the bits represent the curve index.
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  _X_monotone_circle_segment_2 () :
+    _first(),
+    _second(),
+    _third(),
+    _source(),
+    _target(),
+    _info (0)
+  {}
+
+  /*!
+   * Construct an arc from a line segment.
+   * \param line The supporting line.
+   * \param source The source point.
+   * \param target The target point.
+   */
+  _X_monotone_circle_segment_2 (const Line_2& line,
+                                const Point_2& source, const Point_2& target,
+                                unsigned int index = 0) :
+    _first (line.a()),
+    _second (line.b()),
+    _third (line.c()),
+    _source (source),
+    _target(target),
+    _info (index << INDEX_SHIFT_BITS)
+  {
+    // Check if the segment is directed left or right:
+    Comparison_result   res = CGAL::compare (source.x(), target.x());
+
+    if (res == EQUAL)
+    {
+      CGAL_precondition (CGAL::sign(_second) == ZERO);
+
+      // We have a vertical segment - compare the points by their
+      // y-coordinates:
+      _info = (_info | IS_VERTICAL_SEGMENT_MASK);
+      res = CGAL::compare (source.y(), target.y());
+    }
+
+    CGAL_precondition (res != EQUAL);
+    if (res == SMALLER)
+      _info = (_info | IS_DIRECTED_RIGHT_MASK);
+  }
+
+  /*!
+   * Construct a segment arc from two kernel points
+   * \param source the source point.
+   * \ param target the target point.
+   * \pre source and target are not equal.
+   */
+  _X_monotone_circle_segment_2 (const typename Kernel::Point_2& source,
+                                const typename Kernel::Point_2& target) :
+    _source(source.x(), source.y()),
+    _target(target.x(), target.y()),
+    _info (0)
+  {
+    Line_2 line(source, target);
+    _first  = line.a();
+    _second = line.b();
+    _third  = line.c();
+
+    // Check if the segment is directed left or right:
+    Comparison_result   res = CGAL::compare (source.x(), target.x());
+
+    if (res == EQUAL)
+    {
+      CGAL_precondition (CGAL::sign(_second) == ZERO);
+
+      // We have a vertical segment - compare the points by their
+      // y-coordinates:
+      _info = (_info | IS_VERTICAL_SEGMENT_MASK);
+      res = CGAL::compare (source.y(), target.y());
+    }
+
+    CGAL_precondition (res != EQUAL);
+    if (res == SMALLER)
+      _info = (_info | IS_DIRECTED_RIGHT_MASK);
+  }
+
+  /*!
+   * Construct a circular arc.
+   * \param line The supporting line.
+   * \param source The source point.
+   * \param target The target point.
+   * \param orient The orientation of the arc.
+   */
+  _X_monotone_circle_segment_2 (const Circle_2& circ,
+                                const Point_2& source, const Point_2& target,
+                                Orientation orient,
+                                unsigned int index = 0) :
+    _first (circ.center().x()),
+    _second (circ.center().y()),
+    _third (circ.squared_radius()),
+    _source (source),
+    _target(target),
+    _info (index << INDEX_SHIFT_BITS)
+  {
+    // Check if the segment is directed left or right:
+    Comparison_result   res = CGAL::compare (source.x(), target.x());
+
+    CGAL_precondition (res != EQUAL);
+    if (res == SMALLER)
+      _info = (_info | IS_DIRECTED_RIGHT_MASK);
+
+    // Set the orientation.
+    CGAL_precondition (orient != COLLINEAR);
+    if (orient == COUNTERCLOCKWISE)
+      _info = (_info | COUNTERCLOCKWISE_CODE);
+    else
+      _info = (_info | CLOCKWISE_CODE);
+  }
+
+  /*! Check if the arc is linear. */
+  inline bool is_linear () const
+  {
+    return ((_info & ORIENTATION_MASK) == 0);
+  }
+
+  /*! Check if the arc is circular. */
+  inline bool is_circular () const
+  {
+    return ((_info & ORIENTATION_MASK) != 0);
+  }
+
+  /*!
+   * Get the supporting line.
+   * \pre The arc is linear (a line segment).
+   */
+  Line_2 supporting_line () const
+  {
+    CGAL_precondition (is_linear());
+
+    return (Line_2 (a(), b(), c()));
+  }
+
+  /*!
+   * Get the supporting circle.
+   * \pre The arc is circular.
+   */
+  Circle_2 supporting_circle () const
+  {
+    CGAL_precondition (is_circular());
+
+    typename Kernel::Point_2  center (x0(), y0());
+    return (Circle_2 (center , sqr_r(), orientation()));
+  }
+
+  /*! Get the source point. */
+  inline const Point_2& source () const
+  {
+    return (_source);
+  }
+
+  /*! Get the target point. */
+  inline const Point_2& target () const
+  {
+    return (_target);
+  }
+
+  /*! True if the arc is directed right, false otherwise. */
+  bool is_directed_right () const
+  {
+    return ((_info & IS_DIRECTED_RIGHT_MASK) != 0);
+  }
+
+  bool has_left() const
+  {
+    return true;
+  }
+
+  bool has_right() const
+  {
+    return true;
+  }
+
+  /*! Get the left endpoint of the arc. */
+  inline const Point_2& left () const
+  {
+    return (((_info & IS_DIRECTED_RIGHT_MASK) != 0) ? _source : _target);
+  }
+
+  /*! Get the right endpoint of the arc. */
+  inline const Point_2& right () const
+  {
+    return (((_info & IS_DIRECTED_RIGHT_MASK) != 0) ? _target : _source);
+  }
+
+  /*!
+   * Check whether the given point is in the x-range of the arc.
+   */
+  bool is_in_x_range (const Point_2& p) const
+  {
+    Comparison_result    res = CGAL::compare (p.x(), left().x());
+
+    if (res == SMALLER)
+      return (false);
+    else if (res == EQUAL)
+      return (true);
+
+    return (CGAL::compare (p.x(), right().x()) != LARGER);
+  }
+
+  /*! Check if the arc is a vertical segment. */
+  inline bool is_vertical () const
+  {
+    return ((_info & IS_VERTICAL_SEGMENT_MASK) != 0);
+  }
+
+  /*! Get the orientation of the arc. */
+  inline Orientation orientation() const
+  {
+    unsigned int   _or = (_info & ORIENTATION_MASK);
+
+    if (_or == COUNTERCLOCKWISE_CODE)
+      return (CGAL::COUNTERCLOCKWISE);
+    else if (_or == CLOCKWISE_CODE)
+      return (CGAL::CLOCKWISE);
+
+    CGAL_assertion (_or == 0);
+    return (CGAL::COLLINEAR);
+  }
+
+  /*!
+   * Check the position of a given point with respect to the arc.
+   */
+  Comparison_result point_position (const Point_2& p) const
+  {
+    if (is_linear())
+      return (_line_point_position (p));
+    else
+      return (_circ_point_position (p));
+  }
+
+
+  /*!
+   * Compare the two arcs to the right of their intersection point.
+   */
+  Comparison_result compare_to_right (const Self& cv, const Point_2& p) const
+  {
+    if (is_linear())
+    {
+      if (cv.is_linear())
+        return (_lines_compare_to_right (cv, p));
+
+      Comparison_result   res = cv._circ_line_compare_to_right (*this, p);
+
+      if (res != EQUAL)
+        res = (res == SMALLER) ? LARGER : SMALLER;
+
+      return (res);
+    }
+    else
+    {
+      if (cv.is_linear())
+        return (_circ_line_compare_to_right (cv, p));
+
+      return (_circs_compare_to_right (cv, p));
+    }
+  }
+
+  /*!
+   * Compare the two arcs to the left of their intersection point.
+   */
+  Comparison_result compare_to_left (const Self& cv, const Point_2& p) const
+  {
+    if (is_linear())
+    {
+      if (cv.is_linear())
+        return (_lines_compare_to_left (cv, p));
+
+      Comparison_result   res = cv._circ_line_compare_to_left (*this, p);
+
+      if (res != EQUAL)
+        res = (res == SMALLER) ? LARGER : SMALLER;
+
+      return (res);
+    }
+    else
+    {
+      if (cv.is_linear())
+        return (_circ_line_compare_to_left (cv, p));
+
+      return (_circs_compare_to_left (cv, p));
+    }
+  }
+
+  /*!
+   * Check whether the two arcs have the same supporting curve.
+   */
+  bool has_same_supporting_curve (const Self& cv) const
+  {
+    // Check if the curve indices are the same.
+    if (_index() != 0 && _index() == cv._index())
+      return (true);
+
+    // Make sure that the supporting curves are of the same type.
+    if (is_linear() && ! cv.is_linear())
+      return (false);
+
+    if (! is_linear() && cv.is_linear())
+      return (false);
+
+    // Compare the curve coefficients.
+    if (! is_linear())
+    {
+      // The two circles must have the same center and the same radius.
+      return (CGAL::compare (x0(), cv.x0()) == EQUAL &&
+              CGAL::compare (y0(), cv.y0()) == EQUAL &&
+              CGAL::compare (sqr_r(), cv.sqr_r()) == EQUAL);
+    }
+
+    // Compare the line equations: Note that these may be scaled.
+    NT    fact1;
+    NT    fact2;
+
+    if (is_vertical())
+    {
+      if (! cv.is_vertical())
+        return (false);
+
+      fact1 = a();
+      fact2 = cv.a();
+    }
+    else
+    {
+      fact1 = b();
+      fact2 = cv.b();
+    }
+
+    return (CGAL::compare (fact2*a(), fact1*cv.a()) == EQUAL &&
+            CGAL::compare (fact2*b(), fact1*cv.b()) == EQUAL &&
+            CGAL::compare (fact2*c(), fact1*cv.c()) == EQUAL);
+  }
+
+  /*!
+   * Check if the two curves are equal.
+   */
+  bool equals (const Self& cv) const
+  {
+    if (! this->has_same_supporting_curve (cv))
+      return (false);
+
+    if (is_linear())
+    {
+      // In case of line segments we can swap the source and target:
+      return ((_source.equals (cv._source) && _target.equals (cv._target)) ||
+              (_source.equals (cv._target) && _target.equals (cv._source)));
+    }
+
+    // Once again, opposite circular arcs are considered to be equal:
+    return ((orientation() == cv.orientation() &&
+             _source.equals (cv._source) && _target.equals (cv._target)) ||
+            (orientation() != cv.orientation() &&
+             _source.equals (cv._target) && _target.equals (cv._source)));
+  }
+
+  /*!
+   * Split the curve at a given point into two sub-arcs.
+   */
+  void split (const Point_2& p, Self& c1, Self& c2) const
+  {
+    // Copy the properties of this arc to the sub-arcs.
+    c1 = *this;
+    c2 = *this;
+
+    // Change the endpoint, such that c1 lies to the right of c2:
+    if (is_directed_right())
+    {
+      c1._target = p;
+      c2._source = p;
+    }
+    else
+    {
+      c1._source = p;
+      c2._target = p;
+    }
+
+    return;
+  }
+
+  /*!
+   * Compute the intersections between the two arcs or segments.
+   */
+  template <class OutputIterator>
+  OutputIterator intersect (const Self& cv, OutputIterator oi,
+                            Intersection_map *inter_map = NULL) const
+  {
+    // First check whether the two arcs have the same supporting curve.
+    if (has_same_supporting_curve (cv))
+    {
+      // Check for overlaps between the two arcs.
+      Self    overlap;
+
+      if (_compute_overlap (cv, overlap))
+      {
+        // There can be just a single overlap between two x-monotone arcs:
+        *oi = CGAL::make_object (overlap);
+        ++oi;
+        return (oi);
+      }
+
+      // In case there is not overlap and the supporting curves are the same,
+      // there cannot be any intersection points, unless the two arcs share
+      // a common end point.
+      // Note that in this case we do not define the multiplicity of the
+      // intersection points we report.
+      unsigned int  mult = 0;
+      if (left().equals (cv.left()) || left().equals(cv.right()))
+      {
+        *oi = CGAL::make_object (std::make_pair (left(), mult));
+        ++oi;
+      }
+
+      if (right().equals (cv.right()) || right().equals(cv.left()))
+      {
+        *oi = CGAL::make_object (std::make_pair (right(), mult));
+        ++oi;
+      }
+
+      return (oi);
+    }
+
+    // Before computing the intersection points between the two supporting
+    // curves, check if their intersection has already been computed and
+    // cached.
+    Curve_id_pair                id_pair;
+    Intersection_map_iterator    map_iter;
+    Intersection_list            inter_list;
+    bool                         invalid_ids = false;
+
+    if (inter_map != NULL && _index() != 0 && cv._index() != 0)
+    {
+      if (_index() < cv._index())
+        id_pair = Curve_id_pair (_index(), cv._index());
+      else
+        id_pair = Curve_id_pair (cv._index(), _index());
+
+      map_iter = inter_map->find (id_pair);
+    }
+    else
+    {
+      // In case one of the IDs is invalid, we do not look in the map neither
+      // we cache the results.
+      if (inter_map != NULL)
+        map_iter = inter_map->end();
+      invalid_ids = true;
+    }
+
+    if (inter_map == NULL || map_iter == inter_map->end())
+    {
+      // Compute the intersections points between the two supporting curves.
+      if (is_linear())
+      {
+        if (cv.is_linear())
+          _lines_intersect (cv, inter_list);
+        else
+          cv._circ_line_intersect (*this, inter_list);
+      }
+      else
+      {
+        if (cv.is_linear())
+          _circ_line_intersect (cv, inter_list);
+        else
+          _circs_intersect (cv, inter_list);
+      }
+
+      // Cache the result.
+      if (! invalid_ids)
+        (*inter_map)[id_pair] = inter_list;
+    }
+    else
+    {
+      // Obtain the precomputed intersection points from the map.
+      inter_list = (*map_iter).second;
+    }
+
+    // Report only the intersection points that lie on both arcs.
+    typename Intersection_list::const_iterator   iter;
+
+    for (iter = inter_list.begin(); iter != inter_list.end(); ++iter)
+    {
+      if (this->_is_between_endpoints (iter->first) &&
+          cv._is_between_endpoints (iter->first))
+      {
+        *oi = CGAL::make_object (*iter);
+        ++oi;
+      }
+    }
+
+    return (oi);
+  }
+
+  /*!
+   * Check whether it is possible to merge our arc with the given arc.
+   */
+  bool can_merge_with (const Self& cv) const
+  {
+    // In order to merge the two arcs, they should have the same supporting
+    // curve.
+    if (! this->has_same_supporting_curve (cv))
+      return (false);
+
+    // Check if the left endpoint of one curve is the right endpoint of the
+    // other.
+    return (right().equals (cv.left()) ||
+            left().equals (cv.right()));
+  }
+
+  /*!
+   * Merge our arc with the given arc.
+   * \pre The two arcs are mergeable.
+   */
+  void merge (const Self& cv)
+  {
+    CGAL_precondition (this->can_merge_with (cv));
+
+    // Check if we should extend the arc to the left or to the right.
+    if (right().equals (cv.left()))
+    {
+      // Extend the arc to the right.
+      if (is_directed_right())
+        this->_target = cv.right();
+      else
+        this->_source = cv.right();
+    }
+    else
+    {
+      CGAL_precondition (left().equals (cv.right()));
+
+      // Extend the arc to the left.
+      if (is_directed_right())
+        this->_source = cv.left();
+      else
+        this->_target = cv.left();
+    }
+
+    return;
+  }
+
+  /*! construct an opposite arc. */
+  Self construct_opposite() const
+  {
+    Self opp_cv;
+    opp_cv._first = this->_first;
+    opp_cv._second = this-> _second;
+    opp_cv._third = this-> _third;
+    opp_cv._source = this->_target;
+    opp_cv._target = this->_source;
+
+    // Take care of the information bits: We flip the orientation bits and
+    // the bits that marks the direction.
+    if (is_linear())
+      opp_cv._info = (this->_info ^ IS_DIRECTED_RIGHT_MASK);
+    else
+      opp_cv._info = (this->_info ^ IS_DIRECTED_RIGHT_MASK ^ ORIENTATION_MASK);
+
+    return (opp_cv);
+  }
+
+  Bbox_2 bbox() const
+  {
+    double x_min = to_double(left().x());
+    double x_max = to_double(right().x());
+    double y_min = to_double(left().y());
+    double y_max = to_double(right().y());
+    if(y_min > y_max)
+      std::swap(y_min, y_max);
+    if(is_circular())
+    {
+      const Circle_2& circ = this->supporting_circle();
+      if(_is_upper())
+      {
+        y_max = to_double(circ.center().y())+
+                std::sqrt(to_double(circ.squared_radius()));
+      }
+      else
+      {
+        y_min = to_double(circ.center().y()) -
+                std::sqrt(to_double(circ.squared_radius()));
+      }
+    }
+
+
+    return Bbox_2(x_min, y_min, x_max, y_max);
+  }
+
+protected:
+
+  /*! Get the curve index. */
+  inline unsigned int _index () const
+  {
+    return (_info >> INDEX_SHIFT_BITS);
+  }
+
+  /// \name Accessors for circular arcs.
+  //@{
+
+  /*! Get the x-coordinate of the center of the supporting circle. */
+  inline const NT& x0 () const
+  {
+    return (_first);
+  }
+
+  /*! Get the y-coordinate of the center of the supporting circle. */
+  inline const NT& y0 () const
+  {
+    return (_second);
+  }
+
+  /*! Get the squared radius of the supporting circle. */
+  inline const NT& sqr_r () const
+  {
+    return (_third);
+  }
+
+  /*!
+   * Check if the circular arc lies on the upper half of the supporting circle.
+   */
+  inline bool _is_upper () const
+  {
+    Orientation  orient = orientation();
+    bool         dir_right = ((_info & IS_DIRECTED_RIGHT_MASK) != 0);
+
+    CGAL_precondition (orient != COLLINEAR);
+
+    return ((orient == COUNTERCLOCKWISE && !dir_right) ||
+            (orient == CLOCKWISE && dir_right));
+  }
+  //@}
+
+  /// \name Accessors for line segments.
+  //@{
+
+  /*! Get the coefficient of x in the equation of the supporting line. */
+  inline const NT& a () const
+  {
+    return (_first);
+  }
+
+  /*! Get the coefficient of y in the equation of the supporting line. */
+  inline const NT& b () const
+  {
+    return (_second);
+  }
+
+  /*! Get the free coefficient in the equation of the supporting line. */
+  inline const NT& c () const
+  {
+    return (_third);
+  }
+  //@}
+
+  /// \name Auxiliary functions for the point_position predicate.
+  //@{
+
+  /*!
+   * Check the position of a given point with respect to a line segment.
+   */
+  Comparison_result _line_point_position (const Point_2& p) const
+  {
+    // Check if we have a vertical segment.
+
+    CGAL_precondition (is_in_x_range(p));
+
+    Comparison_result    res;
+
+    if (is_vertical())
+    {
+      // left() is the lower endpoint:
+      res = CGAL::compare (p.y(), left().y());
+
+      if (res != LARGER)
+        return (res);
+
+      // left() is the upper endpoint:
+      res = CGAL::compare (p.y(), right().y());
+
+      if (res != SMALLER)
+        return (res);
+
+      // p lies in the interior of the vertical segment:
+      return (EQUAL);
+    }
+
+    // Compute the y-coordinate of the vertical projection of p onto the
+    // supporting line.
+    const CoordNT        y_proj = (a()*p.x() + c()) / (-b());
+
+    return (CGAL::compare (p.y(), y_proj));
+  }
+
+  /*!
+   * Check the position of a given point with respect to a circular arc.
+   */
+  Comparison_result _circ_point_position (const Point_2& p) const
+  {
+
+    Comparison_result   c_res = CGAL::compare (p.y(), y0());
+
+    if (_is_upper())
+    {
+      // Check if p lies below the "equator" (while the arc lies above it):
+      if (c_res == SMALLER)
+        return (SMALLER);
+    }
+    else
+    {
+      // Check if p lies above the "equator" (while the arc lies below it):
+      if (c_res == LARGER)
+        return (LARGER);
+    }
+
+    // Check if p lies inside the supporting circle, namely we have to check
+    // whether (p.x() - x0)^2 + (p.y() - y0)^2 < r^2:
+    Comparison_result   res =
+                         CGAL::compare (CGAL::square (p.x() - x0()),
+                                        sqr_r() - CGAL::square (p.y() - y0()));
+
+    if (res == EQUAL)
+      // p lies on the circle:
+      return (EQUAL);
+
+    if (_is_upper())
+    {
+      // If p is inside the circle, it lies below the upper arc:
+      return (res);
+    }
+    else
+    {
+      // If p is inside the circle, it lies above the lower arc:
+      return (res == SMALLER ? LARGER : SMALLER);
+    }
+  }
+  //@}
+
+  /// \name Auxiliary functions for the compare_to_right predicate.
+  //@{
+
+  /*!
+   * Compare two line segments to the right of their intersection point.
+   */
+  Comparison_result _lines_compare_to_right (const Self& cv,
+                                             const Point_2& /* p */) const
+  {
+    if (_index() != 0 && _index() == cv._index())
+      return (EQUAL);
+
+    // Special treatment for vertical segments: a vertical segment is larger
+    // than any other non-vertical segment.
+    if (is_vertical())
+    {
+      if (cv.is_vertical())
+        return (EQUAL);
+
+      return (LARGER);
+    }
+    else if (cv.is_vertical())
+    {
+      return (SMALLER);
+    }
+
+    // Compare the slopes: -A1/B1 and -A2/B2. We actually negate the slopes
+    // and swap the result.
+    return (CGAL::compare (cv.a()/cv.b(), a()/b()));
+  }
+
+  /*!
+   * Compare a circular arcs (this) and a line segment (cv) to the right of
+   * their intersection point.
+   */
+  Comparison_result _circ_line_compare_to_right (const Self& cv,
+                                                 const Point_2& p) const
+  {
+    // A vertical segment lies above any other circle to the right of p:
+    if (cv.is_vertical())
+      return (SMALLER);
+
+    // We have to compare the slopes of the supporting circles and the
+    // supporting line at p:
+    //
+    //    p.x() - x0(1)           A(2)
+    //   ---------------  and  - ------
+    //    y0(1) - p.y()           B(2)
+    //
+    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
+
+    // Check the case of a vertical tangent.
+    if (sign_denom1 == ZERO)
+    {
+      // The arc lies above any line segment if it is an upper arc, or below
+      // any segment if it is a lower arc.
+      return (_is_upper() ? LARGER : SMALLER);
+    }
+
+    // Compare (p.x() - x0(1)) and (A(2)/B(2)*(p.y() - y0(1)).
+    // Note that if the denominator is negative, we have to swap the result.
+    const bool        swap_res = (sign_denom1 == NEGATIVE);
+    Comparison_result slope_res = CGAL::compare (p.x() - x0(),
+                                                 (p.y() - y0())*cv.a()/cv.b());
+
+    if (slope_res != EQUAL)
+    {
+      if (swap_res)
+        // Swap the comparison result, if necessary:
+        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
+
+      return (slope_res);
+    }
+
+    // In this case we have a tangency point at p. If the circular arc is an
+    // upper arc, it must lie below the tangent line, and if it is a lower arc
+    // it must lie above the tangent line.
+    return (_is_upper() ? SMALLER : LARGER);
+  }
+
+  /*!
+   * Compare two circular arcs to the right of their intersection point.
+   */
+  Comparison_result _circs_compare_to_right (const Self& cv,
+                                             const Point_2& p) const
+  {
+    if (_index() != 0 && _index() == cv._index())
+    {
+      // Check the case of comparing two circular arcs that originate from the
+      // same supporting circle. Their comparison result is not EQUAL only if
+      // one is an upper arc and the other is a lower arc.
+      if (_is_upper() && ! cv._is_upper())
+        return (LARGER);
+      else if (! _is_upper() && cv._is_upper())
+        return (SMALLER);
+      else
+        return (EQUAL);
+    }
+
+    // We have to compare the slopes of the two supporting circles at p:
+    //
+    //    p.x() - x0(1)         p.x() - x0(2)
+    //   ---------------  and  ---------------
+    //    y0(1) - p.y()         y0(2) - p.y()
+    //
+    const CGAL::Sign  sign_numer1 = CGAL::sign (p.x() - x0());
+    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
+    const CGAL::Sign  sign_numer2 = CGAL::sign (p.x() - cv.x0());
+    const CGAL::Sign  sign_denom2 = CGAL::sign (cv.y0() - p.y());
+
+    // Check the case of vertical tangents.
+    if (sign_denom1 == ZERO)
+    {
+      if (sign_denom2 == ZERO)
+      {
+        if (_is_upper())
+        {
+          if (cv._is_upper())
+          {
+            // The two circles have a vertical tangent:
+            // The one with a larger radius is above the other.
+            return (CGAL::compare (sqr_r(), cv.sqr_r()));
+          }
+          else
+          {
+            // The other curve is directed downwards:
+            return (LARGER);
+          }
+        }
+        else
+        {
+          if (cv._is_upper())
+          {
+            // The other curve is directed upwards:
+            return (SMALLER);
+          }
+          else
+          {
+            // The two circles have a vertical tangent:
+            // The one with a smaller radius is above the other.
+            return (CGAL::compare (cv.sqr_r(), sqr_r()));
+          }
+        }
+      }
+
+      // The other arc does not have a vertical tangent.
+      return (_is_upper() ? LARGER : SMALLER);
+    }
+    else if (sign_denom2 == ZERO)
+    {
+      return (cv._is_upper() ? SMALLER : LARGER);
+    }
+
+    // Try to act according to the slope signs.
+    CGAL::Sign   sign_slope1;
+    CGAL::Sign   sign_slope2;
+
+    if (sign_numer1 == sign_denom1)
+      sign_slope1 = POSITIVE;
+    else if (sign_numer1 == ZERO)
+      sign_slope1 = ZERO;
+    else
+      sign_slope1 = NEGATIVE;
+
+    if (sign_numer2 == sign_denom2)
+      sign_slope2 = POSITIVE;
+    else if (sign_numer2 == ZERO)
+      sign_slope2 = ZERO;
+    else
+      sign_slope2 = NEGATIVE;
+
+    if ((sign_slope1 == POSITIVE && sign_slope2 != POSITIVE) ||
+        (sign_slope1 == ZERO && sign_slope2 == NEGATIVE))
+      return (LARGER);
+
+    if ((sign_slope2 == POSITIVE && sign_slope1 != POSITIVE) ||
+        (sign_slope2 == ZERO && sign_slope1 == NEGATIVE))
+      return (SMALLER);
+
+    // Compare the slopes of the two tangents to the circles.
+    Comparison_result  slope_res;
+
+    if (sign_slope1 == ZERO && sign_slope2 == ZERO)
+    {
+      // Special case were both circles have a horizontal tangent:
+      slope_res = EQUAL;
+    }
+    else
+    {
+      // Actually compare the slopes.
+      const bool    swap_res = (sign_denom1 != sign_denom2);
+      const CoordNT A = (cv.y0() - y0())*p.x() + (y0()*cv.x0() - cv.y0()*x0());
+      const CoordNT B = (cv.x0() - x0())*p.y();
+
+      slope_res = CGAL::compare (A, B);
+
+      if (slope_res != EQUAL && swap_res)
+      {
+        // Swap the comparison result, if necessary:
+        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
+      }
+    }
+
+    // In case the two circles have different tangent slopes at p:
+    if (slope_res != EQUAL)
+      return (slope_res);
+
+    // In this case we have a tangency point at p.
+    if (_is_upper())
+    {
+      if (cv._is_upper())
+      {
+        // The circle with a larger radius is above the other.
+        return (CGAL::compare (sqr_r(), cv.sqr_r()));
+      }
+      else
+      {
+        // The other curve is above our curve:
+        return (SMALLER);
+      }
+    }
+    else
+    {
+      if (cv._is_upper())
+      {
+        // Out curve is above the other curve:
+        return (LARGER);
+      }
+      else
+      {
+        // The circle with a smaller radius is above the other.
+        return (CGAL::compare (cv.sqr_r(), sqr_r()));
+      }
+    }
+  }
+  //@}
+
+  /// \name Auxiliary functions for the compare_to_left predicate.
+  //@{
+
+  /*!
+   * Compare two line segments to the left of their intersection point.
+   */
+  Comparison_result _lines_compare_to_left (const Self& cv,
+                                            const Point_2& ) const
+  {
+    if (_index() != 0 && _index() == cv._index())
+      return (EQUAL);
+
+    // Special treatment for vertical segments: a vertical segment is smaller
+    // than any other non-vertical segment.
+    if (is_vertical())
+    {
+      if (cv.is_vertical())
+        return (EQUAL);
+
+      return (SMALLER);
+    }
+    else if (cv.is_vertical())
+    {
+      return (LARGER);
+    }
+
+    // Compare the slopes: -A1/B1 and -A2/B2 and swap the result.
+    //  We actually negate the slopes and compare them.
+    return (CGAL::compare (a()/b(), cv.a()/cv.b()));
+  }
+
+  /*!
+   * Compare a circular arcs (this) and a line segment (cv) to the left of
+   * their intersection point.
+   */
+  Comparison_result _circ_line_compare_to_left (const Self& cv,
+                                                const Point_2& p) const
+  {
+    // A vertical segment lies below any other circle to the left of p:
+    if (cv.is_vertical())
+      return (LARGER);
+
+    // We have to compare the slopes of the supporting circles and the
+    // supporting line at p, and return the swapped result:
+    //
+    //    p.x() - x0(1)           A(2)
+    //   ---------------  and  - ------
+    //    y0(1) - p.y()           B(2)
+    //
+    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
+
+    // Check the case of a vertical tangent.
+    if (sign_denom1 == ZERO)
+    {
+      // The arc lies above any line segment if it is an upper arc, or below
+      // any segment if it is a lower arc.
+      return (_is_upper() ? LARGER : SMALLER);
+    }
+
+    // Compare (p.x() - x0(1)) and (A(2)/B(2)*(p.y() - y0(1)).
+    // Note that if the denominator is negative, we have to swap the result.
+    const bool        swap_res = (sign_denom1 == NEGATIVE);
+    Comparison_result slope_res = CGAL::compare (p.x() - x0(),
+                                                 (p.y() - y0())*cv.a()/cv.b());
+
+    if (slope_res != EQUAL)
+    {
+      if (swap_res)
+        // Swap the comparison result, if necessary:
+        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
+
+      // Swap at any case to get the position to the left:
+      return ((slope_res == SMALLER) ? LARGER : SMALLER);
+    }
+
+    // In this case we have a tangency point at p. If the circular arc is an
+    // upper arc, it must lie below the tangent line, and if it is a lower arc
+    // it must lie above the tangent line.
+    return (_is_upper() ? SMALLER : LARGER);
+  }
+
+  /*!
+   * Compare the two arcs to the left of their intersection point.
+   */
+  Comparison_result _circs_compare_to_left (const Self& cv,
+                                            const Point_2& p) const
+  {
+    if (_index() != 0 && _index() == cv._index())
+    {
+      // Check the case of comparing two circular arcs that originate from the
+      // same supporting circle. Their comparison result is not EQUAL only if
+      // one is an upper arc and the other is a lower arc.
+      if (_is_upper() && ! cv._is_upper())
+        return (LARGER);
+      else if (! _is_upper() && cv._is_upper())
+        return (SMALLER);
+      else
+        return (EQUAL);
+    }
+
+    // We have to compare the slopes of the two supporting circles at p:
+    //
+    //    p.x() - x0(1)         p.x() - x0(2)
+    //   ---------------  and  ---------------
+    //    y0(1) - p.y()         y0(2) - p.y()
+    //
+    // Eventually, we should take the opposite result.
+    const CGAL::Sign  sign_numer1 = CGAL::sign (p.x() - x0());
+    const CGAL::Sign  sign_denom1 = CGAL::sign (y0() - p.y());
+    const CGAL::Sign  sign_numer2 = CGAL::sign (p.x() - cv.x0());
+    const CGAL::Sign  sign_denom2 = CGAL::sign (cv.y0() - p.y());
+
+    // Check the case of vertical tangents.
+    if (sign_denom1 == ZERO)
+    {
+      if (sign_denom2 == ZERO)
+      {
+        if (_is_upper())
+        {
+          if (cv._is_upper())
+          {
+            // The two circles have a vertical tangent:
+            // The one with a larger radius is above the other.
+            return (CGAL::compare (sqr_r(), cv.sqr_r()));
+          }
+          else
+          {
+            // The other curve is directed downwards:
+            return (LARGER);
+          }
+        }
+        else
+        {
+          if (cv._is_upper())
+          {
+            // The other curve is directed upwards:
+            return (SMALLER);
+          }
+          else
+          {
+            // The two circles have a vertical tangent:
+            // The one with a smaller radius is above the other.
+            return (CGAL::compare (cv.sqr_r(), sqr_r()));
+          }
+        }
+      }
+
+      // The other arc does not have a vertical tangent.
+      return (_is_upper() ? LARGER : SMALLER);
+    }
+    else if (sign_denom2 == ZERO)
+    {
+      return (cv._is_upper() ? SMALLER : LARGER);
+    }
+
+    // Try to act according to the slope signs.
+    CGAL::Sign   sign_slope1;
+    CGAL::Sign   sign_slope2;
+
+    if (sign_numer1 == sign_denom1)
+      sign_slope1 = POSITIVE;
+    else if (sign_numer1 == ZERO)
+      sign_slope1 = ZERO;
+    else
+      sign_slope1 = NEGATIVE;
+
+    if (sign_numer2 == sign_denom2)
+      sign_slope2 = POSITIVE;
+    else if (sign_numer2 == ZERO)
+      sign_slope2 = ZERO;
+    else
+      sign_slope2 = NEGATIVE;
+
+    if ((sign_slope1 == POSITIVE && sign_slope2 != POSITIVE) ||
+        (sign_slope1 == ZERO && sign_slope2 == NEGATIVE))
+      return (SMALLER);
+
+    if ((sign_slope2 == POSITIVE && sign_slope1 != POSITIVE) ||
+        (sign_slope2 == ZERO && sign_slope1 == NEGATIVE))
+      return (LARGER);
+
+    // Compare the slopes of the two tangents to the circles.
+    Comparison_result  slope_res;
+
+    if (sign_slope1 == ZERO && sign_slope2 == ZERO)
+    {
+      // Special case were both circles have a horizontal tangent:
+      slope_res = EQUAL;
+    }
+    else
+    {
+      // Actually compare the slopes.
+      const bool    swap_res = (sign_denom1 != sign_denom2);
+      const CoordNT A = (cv.y0() - y0())*p.x() + (y0()*cv.x0() - cv.y0()*x0());
+      const CoordNT B = (cv.x0() - x0())*p.y();
+
+      slope_res = CGAL::compare (A, B);
+
+      if (slope_res != EQUAL && swap_res)
+      {
+        // Swap the comparison result, if necessary:
+        slope_res = (slope_res == SMALLER) ? LARGER : SMALLER;
+      }
+    }
+
+    // In case the two circles have different tangent slopes at p, return
+    // the opposite of the slope result (since the slope result is the
+    // comparison result to the right of the intersection point):
+    if (slope_res != EQUAL)
+      return ((slope_res == SMALLER) ? LARGER : SMALLER);
+
+    // In this case we have a tangency point at p.
+    if (_is_upper())
+    {
+      if (cv._is_upper())
+      {
+        // The circle with a larger radius is above the other.
+        return (CGAL::compare (sqr_r(), cv.sqr_r()));
+      }
+      else
+      {
+        // The other curve is above our curve:
+        return (SMALLER);
+      }
+    }
+    else
+    {
+      if (cv._is_upper())
+      {
+        // Out curve is above the other curve:
+        return (LARGER);
+      }
+      else
+      {
+        // The circle with a smaller radius is above the other.
+        return (CGAL::compare (cv.sqr_r(), sqr_r()));
+      }
+    }
+  }
+  //@}
+
+  /// \name Auxiliary functions for computing intersections.
+  //@{
+
+  /*!
+   * Compute the intersections between two line segments.
+   */
+  void _lines_intersect (const Self& cv,
+                         Intersection_list& inter_list) const
+  {
+    // The intersection of the lines:
+    //   a1*x + b1*y + c1 = 0   and   a2*x + b2*y + c2 = 0 ,
+    // is given by:
+    //
+    //      b1*c2 - c1*b2     c1*a2 - a1*c2
+    //   ( --------------- , --------------- )
+    //      a1*b2 - b1*a2     a1*b2 - b1*a2
+    //
+    unsigned int  mult = 1;
+    const NT      denom = a()*cv.b() - b()*cv.a();
+
+    // Make sure the supporting lines are not parallel.
+    if (CGAL::sign(denom) == ZERO)
+      return;
+
+    const NT      x_numer = b()*cv.c() - c()*cv.b();
+    const NT      y_numer = c()*cv.a() - a()*cv.c();
+    Point_2       p (x_numer / denom, y_numer / denom);
+
+    inter_list.push_back (Intersection_point_2 (p, mult));
+    return;
+  }
+
+  /*!
+   * Compute the intersections between the supporting circle of (*this) and
+   * the supporting line of the segement cv.
+   */
+  void _circ_line_intersect (const Self& cv,
+                             Intersection_list& inter_list) const
+  {
+    Point_2       p;
+    unsigned int  mult;
+
+    // First check the special cases of vertical and horizontal lines.
+    if (cv.is_vertical())
+    {
+      // The equation of the vertical line is x = -c / a.
+      // The y-coordinates of the intersection points are:
+      //   y =  y0 +/- sqrt(r^2 - (x - x0)^2)
+      //
+      const NT   vx = -cv.c() / cv.a();
+      const NT   vdisc = sqr_r() - CGAL::square (vx - x0());
+      CGAL::Sign sign_vdisc = CGAL::sign (vdisc);
+
+      if (sign_vdisc == NEGATIVE)
+      {
+        // The circle and the vertical line do not intersect.
+        return;
+      }
+      else if (sign_vdisc == ZERO)
+      {
+        // A single tangency point, given by:
+        mult = 2;
+        p = Point_2 (vx, y0());
+        inter_list.push_back (Intersection_point_2 (p, mult));
+
+        return;
+      }
+
+      // Compute the two intersection points:
+      mult = 1;
+
+      p = Point_2 (CoordNT (vx),
+                   CoordNT (y0(), NT(-1), vdisc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (vx),
+                   CoordNT (y0(), NT(1), vdisc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      return;
+    }
+    else if (CGAL::sign (cv.a()) == ZERO)
+    {
+      // The equation of the horizontal line is y = -c / b.
+      // The y-coordinates of the intersection points are:
+      //   x =  x0 +/- sqrt(r^2 - (y - y0)^2)
+      //
+      const NT   hy = -cv.c() / cv.b();
+      const NT   hdisc = sqr_r() - CGAL::square (hy - y0());
+      CGAL::Sign sign_hdisc = CGAL::sign (hdisc);
+
+      if (sign_hdisc == NEGATIVE)
+      {
+        // The circle and the vertical line do not intersect.
+        return;
+      }
+      else if (sign_hdisc == ZERO)
+      {
+        // A single tangency point, given by:
+        mult = 2;
+        p = Point_2 (x0(), hy);
+        inter_list.push_back (Intersection_point_2 (p, mult));
+
+        return;
+      }
+
+      // Compute the two intersection points:
+      mult = 1;
+
+      p = Point_2 (CoordNT (x0(), NT(-1), hdisc),
+                   CoordNT (hy));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (x0(), NT(1), hdisc),
+                   CoordNT (hy));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      return;
+    }
+
+    // Compute the squared distance between the line and the circle center,
+    // inducing the discriminant of the quadratic equations we have to solve.
+    const NT   line_factor = CGAL::square(cv.a()) + CGAL::square(cv.b());
+    const NT   disc = line_factor*sqr_r() -
+                      CGAL::square(cv.a()*x0() + cv.b()*y0() + cv.c());
+    CGAL::Sign sign_disc = CGAL::sign (disc);
+
+    if (sign_disc == NEGATIVE)
+    {
+      // The circle and the line do not intersect:
+      return;
+    }
+
+    // Compare the square-free part of the solution:
+    const NT   aux = cv.b()*x0() - cv.a()*y0();
+    const NT   x_base = (aux*cv.b() - cv.a()*cv.c()) / line_factor;
+    const NT   y_base = (-aux*cv.a() - cv.b()*cv.c()) / line_factor;
+
+    if (sign_disc == ZERO)
+    {
+      // A single tangency point, given by:
+      mult = 2;
+      p = Point_2 (x_base, y_base);
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      return;
+    }
+
+    // We have two intersection points, whose coordinates are one-root numbers.
+    bool       minus_root_first = (CGAL::sign(cv.b()) == POSITIVE);
+    const NT   x_root_coeff = cv.b() / line_factor;
+    const NT   y_root_coeff = cv.a() / line_factor;
+
+    mult = 1;
+    if (minus_root_first)
+    {
+      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
+                   CoordNT (y_base, y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
+                   CoordNT (y_base, -y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+    }
+    else
+    {
+      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
+                   CoordNT (y_base, -y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
+                   CoordNT (y_base, y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+    }
+
+    return;
+  }
+
+  /*!
+   * Compute the intersections between two circles.
+   */
+  void _circs_intersect (const Self& cv,
+                         Intersection_list& inter_list) const
+  {
+    Point_2       p;
+    unsigned int  mult;
+
+    // Compute the squared distance between the circle centers, inducing the
+    // discriminant of the quadratic equations we have to solve.
+    const NT   diff_x = cv.x0() - x0();
+    const NT   diff_y = cv.y0() - y0();
+    const NT   sqr_dist = CGAL::square(diff_x) + CGAL::square(diff_y);
+    const NT   diff_sqr_rad = sqr_r() - cv.sqr_r();
+    const NT   disc = 2*sqr_dist*(sqr_r() + cv.sqr_r()) -
+                      (CGAL::square(diff_sqr_rad) + CGAL::square(sqr_dist));
+    CGAL::Sign sign_disc = CGAL::sign (disc);
+
+    if (sign_disc == NEGATIVE)
+    {
+      // The two circles do not intersect.
+      return;
+    }
+
+    // Compare the square-free part of the solution:
+    const NT   x_base = ((x0() + cv.x0()) + diff_x*diff_sqr_rad/sqr_dist) / 2;
+    const NT   y_base = ((y0() + cv.y0()) + diff_y*diff_sqr_rad/sqr_dist) / 2;
+
+    if (sign_disc == ZERO)
+    {
+      // A single tangency point, given by:
+      mult = 2;
+      p = Point_2 (x_base, y_base);
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      return;
+    }
+
+    // We have two intersection points, whose coordinates are one-root numbers.
+    CGAL::Sign sign_diff_y = CGAL::sign (diff_y);
+    bool       minus_root_first;
+
+    if (sign_diff_y == ZERO)
+      minus_root_first = (CGAL::sign (diff_x) == NEGATIVE);
+    else
+      minus_root_first = (sign_diff_y == POSITIVE);
+
+    const NT   x_root_coeff = diff_y / (2 * sqr_dist);
+    const NT   y_root_coeff = diff_x / (2 * sqr_dist);
+
+    mult = 1;
+    if (minus_root_first)
+    {
+      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
+                   CoordNT (y_base, y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
+                   CoordNT (y_base, -y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+    }
+    else
+    {
+      p = Point_2 (CoordNT (x_base, x_root_coeff, disc),
+                   CoordNT (y_base, -y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+
+      p = Point_2 (CoordNT (x_base, -x_root_coeff, disc),
+                   CoordNT (y_base, y_root_coeff, disc));
+      inter_list.push_back (Intersection_point_2 (p, mult));
+    }
+
+    return;
+  }
+
+  /*!
+   * Check if the given point lies on the arc.
+   * \pre p lies on the supporting curve.
+   */
+  bool _is_between_endpoints (const Point_2& p) const
+  {
+    if (is_linear())
+    {
+      if (is_vertical())
+      {
+        // Check if the point is in the y-range of the arc.
+        // Note that left() is the lower endpoint and right() is the upper
+        // endpoint of the segment in this case.
+        Comparison_result    res = CGAL::compare (p.y(), left().y());
+
+        if (res == SMALLER)
+          return (false);
+        else if (res == EQUAL)
+          return (true);
+
+        return (CGAL::compare (p.y(), right().y()) != LARGER);
+      }
+
+      // For non-vertical segments, it is sufficient to check if the point
+      // is in the x-range of the arc.
+      return (this->is_in_x_range (p));
+    }
+
+    // The supporting curve is a circle:
+    // Check whether p lies on the upper or on the lower part of the circle.
+    Comparison_result   c_res = CGAL::compare (p.y(), y0());
+
+    if ((_is_upper() && c_res == SMALLER) ||
+        (! _is_upper() && c_res == LARGER))
+    {
+      // The point lies on the other half of the circle:
+      return (false);
+    }
+
+    // Check if the point is in the x-range of the arc.
+    return (this->is_in_x_range (p));
+  }
+
+  /*!
+   * Check if the given point lies in the interior of the arc.
+   * \pre p lies on the supporting curve.
+   */
+  bool _is_strictly_between_endpoints (const Point_2& p) const
+  {
+    if (p.equals (_source) || p.equals (_target))
+      return (false);
+
+    return (_is_between_endpoints (p));
+  }
+
+  /*!
+   * Compute the overlap with a given arc having the same supporting curve.
+   * \param cv The given arc.
+   * \param overlap Output: The overlapping arc (if any).
+   * \return Whether we found an overlap.
+   */
+  bool _compute_overlap (const Self& cv, Self& overlap) const
+  {
+    // Check if the two arcs are identical.
+    if (is_linear())
+    {
+      // In case of line segments we can swap the source and target:
+      if (((_source.equals (cv._source) && _target.equals (cv._target)) ||
+           (_source.equals (cv._target) && _target.equals (cv._source))))
+      {
+        overlap = cv;
+        return (true);
+      }
+    }
+    else
+    {
+      if ((orientation() == cv.orientation() &&
+           _source.equals (cv._source) && _target.equals (cv._target)) ||
+          (orientation() != cv.orientation() &&
+           _source.equals (cv._target) && _target.equals (cv._source)))
+      {
+        overlap = cv;
+        return (true);
+      }
+    }
+
+    // Check for other overlaps:
+    if (_is_strictly_between_endpoints (cv.left()))
+    {
+      if (_is_strictly_between_endpoints (cv.right()))
+      {
+        // Case 1 - *this:     +----------->
+        //             cv:       +=====>
+        overlap = cv;
+        return (true);
+      }
+      else
+      {
+        // Case 2 - *this:     +----------->
+        //             cv:               +=====>
+        overlap = *this;
+
+        if (overlap.is_directed_right())
+          overlap._source = cv.left();
+        else
+          overlap._target = cv.left();
+
+        return (true);
+      }
+    }
+    else if (_is_strictly_between_endpoints (cv.right()))
+    {
+      // Case 3 - *this:     +----------->
+      //             cv:   +=====>
+      overlap = *this;
+
+      if (overlap.is_directed_right())
+        overlap._target = cv.right();
+      else
+        overlap._source = cv.right();
+
+      return (true);
+    }
+    else if (cv._is_between_endpoints (_source) &&
+             cv._is_between_endpoints (_target) &&
+             (cv._is_strictly_between_endpoints (_source) ||
+              cv._is_strictly_between_endpoints (_target)))
+    {
+      // Case 4 - *this:     +----------->
+      //             cv:   +================>
+      overlap = *this;
+      return (true);
+    }
+
+    // If we reached here, there are no overlaps:
+    return (false);
+  }
+
+  public:
+  template <class OutputIterator>
+  void approximate(OutputIterator oi, unsigned int n) const
+  {
+    const double x_left = CGAL::to_double(this->source().x());
+    const double y_left = CGAL::to_double(this->source().y());
+
+    const double x_right = CGAL::to_double(this->target().x());
+    const double y_right = CGAL::to_double(this->target().y());
+    if(this->is_linear())
+    {
+      *oi = std::make_pair(x_left, y_left);
+      ++oi;
+
+      *oi = std::make_pair(x_right, y_right);
+      ++oi;
+      return;
+    }
+
+    // Otherwise, sample (n - 1) equally-spaced points in between.
+    const double  app_xcenter = CGAL::to_double (this->_first);
+    const double  app_ycenter = CGAL::to_double (this->_second);
+    const double  app_sqr_rad = CGAL::to_double (this->_third);
+
+    const double  x_jump = (x_right - x_left) / n;
+    double        x, y;
+    double        disc;
+    unsigned int        i;
+
+    const bool is_up = this->_is_upper();
+    *oi = std::make_pair (x_left, y_left);   // The left point.
+    ++oi;
+    for (i = 1; i < n; i++)
+    {
+      x = x_left + x_jump*i;
+      disc = app_sqr_rad - CGAL::square(x - app_xcenter);
+      CGAL_precondition(disc >= 0);
+      if(is_up)
+        y = app_ycenter + std::sqrt(disc);
+      else
+        y = app_ycenter - std::sqrt(disc);
+
+      *oi = std::make_pair(x, y);
+      ++oi;
+    }
+    *oi = std::make_pair(x_right, y_right);   // The right point.
+    ++oi;
+  }
+
+  /*!
+   * Trim the arc given its new endpoints.
+   * \param ps The new source point.
+   * \param pt The new target point.
+   * \return The new trimmed arc.
+   * \pre Both ps and pt lies on the arc and must conform with the current
+   *      direction of the arc.
+   */
+  Self trim (const Point_2& ps,
+             const Point_2& pt) const
+  {
+    Self  arc = *this;
+
+    arc._source = ps;
+    arc._target = pt;
+
+    return arc;
+  }
+
+  //@}
+};
+
+/*!
+ * Exporter for circular arcs (or line segments).
+ */
+template <class Kernel, bool Filter>
+std::ostream&
+operator<< (std::ostream& os,
+            const _X_monotone_circle_segment_2<Kernel, Filter> & arc)
+{
+  if (! arc.is_linear())
+    os << "(" << arc.supporting_circle() << ") ";
+
+  os << "[" << arc.source() << " --> " << arc.target() << "]";
+  return (os);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
new file mode 100644
index 0000000..ff029ff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
@@ -0,0 +1,1870 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein <wein at post.tau.ac.il>
+
+#ifndef CGAL_CONIC_ARC_2_H
+#define CGAL_CONIC_ARC_2_H
+
+/*! \file
+ * Header file for the _Conic_arc_2<Int_kernel, Alg_kernel, Nt_traits> class.
+ */
+
+#include <CGAL/Arr_geometry_traits/Conic_point_2.h>
+#include <CGAL/Arr_geometry_traits/Conic_intersections_2.h>
+#include <CGAL/Bbox_2.h>
+
+#include <ostream>
+
+namespace CGAL {
+
+
+/*!
+ * Representation of a conic arc -- a bounded segment that lies on a conic
+ * curve, the loci of all points satisfying the equation:
+ *   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0
+ *
+ * The class is templated with three parameters:
+ * Rat_kernel A kernel that provides the input objects or coefficients.
+ *            Rat_kernel::FT should be an integral or a rational type.
+ * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
+ *            for the coordinates of arrangement vertices, which are algebraic
+ *            numbers of degree up to 4 (preferably it is CORE::Expr).
+ * Nt_traits A traits class for performing various operations on the integer,
+ *           rational and algebraic types.
+ */
+
+template <class Rat_kernel_, class Alg_kernel_, class Nt_traits_>
+class _Conic_arc_2
+{
+public:
+
+  typedef Rat_kernel_                                      Rat_kernel;
+  typedef Alg_kernel_                                      Alg_kernel;
+  typedef Nt_traits_                                       Nt_traits;
+
+  typedef _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits>  Self;
+
+  typedef typename Rat_kernel::FT                          Rational;
+  typedef typename Rat_kernel::Point_2                     Rat_point_2;
+  typedef typename Rat_kernel::Segment_2                   Rat_segment_2;
+  typedef typename Rat_kernel::Circle_2                    Rat_circle_2;
+
+  typedef typename Nt_traits::Integer                      Integer;
+
+  typedef typename Alg_kernel::FT                          Algebraic;
+  typedef typename Alg_kernel::Point_2                     Point_2;
+  typedef _Conic_point_2<Alg_kernel>                       Conic_point_2;
+
+protected:
+
+  Integer        _r;       //
+  Integer        _s;       // The coefficients of the supporting conic curve:
+  Integer        _t;       //
+  Integer        _u;       //
+  Integer        _v;       //   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 .
+  Integer        _w;       //
+
+  Orientation    _orient;  // The orientation of the conic.
+
+  // Bit masks for the _info field.
+  enum
+  {
+    IS_VALID = 1,
+    IS_FULL_CONIC = 2
+  };
+
+  int            _info;    // Does the arc represent a full conic curve.
+  Conic_point_2  _source;  // The source of the arc (if not a full curve).
+  Conic_point_2  _target;  // The target of the arc (if not a full curve).
+
+  /*! \struct
+   * For arcs whose base is a hyperbola we store the axis (a*x + b*y + c = 0)
+   * which separates the two bracnes of the hyperbola. We also store the side
+   * (NEGATIVE or POSITIVE) that the arc occupies.
+   * In case of line segments connecting two algebraic endpoints, we use this
+   * structure two store the coefficients of the line supporting this segment.
+   * In this case we set the side field to be ZERO.
+   */
+  struct Extra_data
+  {
+    Algebraic     a;
+    Algebraic     b;
+    Algebraic     c;
+    Sign          side;
+  };
+
+  Extra_data    *_extra_data_P;  // The extra data stored with the arc
+                                 // (may be NULL).
+
+public:
+
+  /// \name Construction and destruction functions.
+  //@{
+
+  /*!
+   * Default constructor.
+   */
+  _Conic_arc_2 () :
+    _r(0), _s(0), _t(0), _u(0), _v(0), _w(0),
+    _orient (COLLINEAR),
+    _info (0),
+    _extra_data_P (NULL)
+  {}
+
+  /*!
+   * Copy constructor.
+   * \param arc The copied arc.
+   */
+  _Conic_arc_2 (const Self& arc) :
+    _r(arc._r), _s(arc._s), _t(arc._t), _u(arc._u), _v(arc._v), _w(arc._w),
+    _orient (arc._orient),
+    _info (arc._info),
+    _source(arc._source),
+    _target(arc._target)
+  {
+    if (arc._extra_data_P != NULL)
+      _extra_data_P = new Extra_data (*(arc._extra_data_P));
+    else
+      _extra_data_P = NULL;
+  }
+
+  /*!
+   * Construct a conic arc which is the full conic:
+   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
+   * \pre The conic C must be an ellipse (so 4rs - t^2 > 0).
+   */
+  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
+                const Rational& u, const Rational& v, const Rational& w) :
+    _extra_data_P (NULL)
+  {
+    // Make sure the given curve is an ellipse (4rs - t^2 should be positive).
+    CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE);
+
+    // Set the arc to be the full conic (and compute the orientation).
+    Rational    rat_coeffs [6];
+
+    rat_coeffs[0] = r;
+    rat_coeffs[1] = s;
+    rat_coeffs[2] = t;
+    rat_coeffs[3] = u;
+    rat_coeffs[4] = v;
+    rat_coeffs[5] = w;
+
+    _set_full (rat_coeffs, true);
+  }
+
+  /*!
+   * Construct a conic arc which lies on the conic:
+   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
+   * \param orient The orientation of the arc (clockwise or counterclockwise).
+   * \param source The source point.
+   * \param target The target point.
+   * \pre The source and the target must be on the conic boundary and must
+   * not be the same.
+   */
+  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
+                const Rational& u, const Rational& v, const Rational& w,
+                const Orientation& orient,
+                const Point_2& source, const Point_2& target) :
+    _orient (orient),
+    _source (source),
+    _target (target),
+    _extra_data_P (NULL)
+  {
+    // Make sure that the source and the taget are not the same.
+    CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
+                                                           target) != EQUAL);
+
+    // Set the arc properties (no need to compute the orientation).
+    Rational    rat_coeffs [6];
+
+    rat_coeffs[0] = r;
+    rat_coeffs[1] = s;
+    rat_coeffs[2] = t;
+    rat_coeffs[3] = u;
+    rat_coeffs[4] = v;
+    rat_coeffs[5] = w;
+
+    _set (rat_coeffs);
+  }
+
+  /*!
+   * Construct a conic arc from the given line segment.
+   * \param seg The line segment with rational endpoints.
+   */
+  _Conic_arc_2 (const Rat_segment_2& seg) :
+    _orient (COLLINEAR),
+    _extra_data_P (NULL)
+  {
+    // Set the source and target.
+    Rat_kernel        ker;
+    Rat_point_2       source = ker.construct_vertex_2_object() (seg, 0);
+    Rat_point_2       target = ker.construct_vertex_2_object() (seg, 1);
+    Rational          x1 = source.x();
+    Rational          y1 = source.y();
+    Rational          x2 = target.x();
+    Rational          y2 = target.y();
+    Nt_traits         nt_traits;
+
+    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
+    _target = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2));
+
+    // Make sure that the source and the taget are not the same.
+    CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source,
+                                                           _target) != EQUAL);
+
+    // The supporting conic is r=s=t=0, and u*x + v*y + w = 0 should hold
+    // for both the source (x1,y1) and the target (x2, y2).
+    const Rational    _zero (0);
+    const Rational    _one (1);
+    Rational          rat_coeffs [6];
+
+    rat_coeffs[0] = _zero;
+    rat_coeffs[1] = _zero;
+    rat_coeffs[2] = _zero;
+
+    if (CGAL::compare (x1, x2) == EQUAL)
+    {
+      // The supporting conic is a vertical line, of the form x = CONST.
+      rat_coeffs[3] = _one;
+      rat_coeffs[4] = _zero;
+      rat_coeffs[5] = -x1;
+    }
+    else
+    {
+      // The supporting line is A*x + B*y + C = 0, where:
+      //
+      //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2
+      //
+      rat_coeffs[3] = y2 - y1;
+      rat_coeffs[4] = x1 - x2;
+      rat_coeffs[5] = x2*y1 - x1*y2;
+    }
+
+    // Set the arc properties (no need to compute the orientation).
+    _set (rat_coeffs);
+  }
+
+  /*!
+   * Set a circular arc that corresponds to a full circle.
+   * \param circ The circle (with rational center and rational squared radius).
+   */
+  _Conic_arc_2 (const Rat_circle_2& circ) :
+    _orient (CLOCKWISE),
+    _extra_data_P (NULL)
+  {
+    // Get the circle properties.
+    Rat_kernel        ker;
+    Rat_point_2       center = ker.construct_center_2_object() (circ);
+    Rational          x0 = center.x();
+    Rational          y0 = center.y();
+    Rational          R_sqr = ker.compute_squared_radius_2_object() (circ);
+
+    // Produce the correponding conic: if the circle center is (x0,y0)
+    // and its squared radius is R^2, that its equation is:
+    //   x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0
+    // Note that this equation describes a curve with a negative (clockwise)
+    // orientation.
+    const Rational    _zero (0);
+    const Rational    _one (1);
+    const Rational    _minus_two (-2);
+    Rational          rat_coeffs [6];
+
+    rat_coeffs[0] = _one;
+    rat_coeffs[1] = _one;
+    rat_coeffs[2] = _zero;
+    rat_coeffs[3] = _minus_two*x0;
+    rat_coeffs[4] = _minus_two*y0;
+    rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr;
+
+    // Set the arc to be the full conic (no need to compute the orientation).
+    _set_full (rat_coeffs, false);
+  }
+
+  /*!
+   * Set a circular arc that lies on the given circle:
+   *   C: (x - x0)^2 + (y - y0)^2 = R^2
+   * \param orient The orientation of the circle.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre The source and the target must be on the conic boundary and must
+   *      not be the same.
+   */
+  _Conic_arc_2 (const Rat_circle_2& circ,
+                const Orientation& orient,
+                const Point_2& source, const Point_2& target) :
+    _orient(orient),
+    _source(source),
+    _target(target),
+    _extra_data_P (NULL)
+  {
+    // Make sure that the source and the taget are not the same.
+    CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
+                                                           target) != EQUAL);
+    CGAL_precondition (orient != COLLINEAR);
+
+    // Get the circle properties.
+    Rat_kernel        ker;
+    Rat_point_2       center = ker.construct_center_2_object() (circ);
+    Rational          x0 = center.x();
+    Rational          y0 = center.y();
+    Rational          R_sqr = ker.compute_squared_radius_2_object() (circ);
+
+    // Produce the correponding conic: if the circle center is (x0,y0)
+    // and it squared radius is R^2, that its equation is:
+    //   x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0
+    // Since this equation describes a curve with a negative (clockwise)
+    // orientation, we multiply it by -1 if necessary to obtain a positive
+    // (counterclockwise) orientation.
+    const Rational    _zero (0);
+    Rational          rat_coeffs[6];
+
+    if (_orient == COUNTERCLOCKWISE)
+    {
+      const Rational  _minus_one (-1);
+      const Rational  _two (2);
+
+      rat_coeffs[0] = _minus_one;
+      rat_coeffs[1] = _minus_one;
+      rat_coeffs[2] = _zero;
+      rat_coeffs[3] = _two*x0;
+      rat_coeffs[4] = _two*y0;
+      rat_coeffs[5] = R_sqr - x0*x0 - y0*y0;
+    }
+    else
+    {
+      const Rational    _one (1);
+      const Rational    _minus_two (-2);
+
+      rat_coeffs[0] = _one;
+      rat_coeffs[1] = _one;
+      rat_coeffs[2] = _zero;
+      rat_coeffs[3] = _minus_two*x0;
+      rat_coeffs[4] = _minus_two*y0;
+      rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr;
+    }
+
+    // Set the arc properties (no need to compute the orientation).
+    _set (rat_coeffs);
+  }
+
+  /*!
+   * Construct a circular arc from the given three points.
+   * \param p1 The arc source.
+   * \param p2 A point in the interior of the arc.
+   * \param p3 The arc target.
+   * \pre The three points must not be collinear.
+   */
+  _Conic_arc_2 (const Rat_point_2& p1,
+                const Rat_point_2& p2,
+                const Rat_point_2& p3):
+    _extra_data_P (NULL)
+  {
+    // Set the source and target.
+    Rational          x1 = p1.x();
+    Rational          y1 = p1.y();
+    Rational          x2 = p2.x();
+    Rational          y2 = p2.y();
+    Rational          x3 = p3.x();
+    Rational          y3 = p3.y();
+    Nt_traits         nt_traits;
+
+    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
+    _target = Point_2 (nt_traits.convert (x3), nt_traits.convert (y3));
+
+    // Make sure that the source and the taget are not the same.
+    CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source,
+                                                           _target) != EQUAL);
+
+    // Compute the lines: A1*x + B1*y + C1 = 0,
+    //               and: A2*x + B2*y + C2 = 0,
+    // where:
+    const Rational  _two  = 2;
+
+    const Rational  A1 = _two*(x1 - x2);
+    const Rational  B1 = _two*(y1 - y2);
+    const Rational  C1 = y2*y2 - y1*y1 + x2*x2 - x1*x1;
+
+    const Rational  A2 = _two*(x2 - x3);
+    const Rational  B2 = _two*(y2 - y3);
+    const Rational  C2 = y3*y3 - y2*y2 + x3*x3 - x2*x2;
+
+    // Compute the coordinates of the intersection point between the
+    // two lines, given by (Nx / D, Ny / D), where:
+    const Rational  Nx = B1*C2 - B2*C1;
+    const Rational  Ny = A2*C1 - A1*C2;
+    const Rational  D = A1*B2 - A2*B1;
+
+    // Make sure the three points are not collinear.
+    const bool  points_collinear = (CGAL::sign (D) == ZERO);
+
+    if (points_collinear)
+    {
+      _info = 0;           // Inavlid arc.
+      return;
+    }
+
+    // The equation of the underlying circle is given by:
+    Rational          rat_coeffs[6];
+
+    rat_coeffs[0] = D*D;
+    rat_coeffs[1] = D*D;
+    rat_coeffs[2] = 0;
+    rat_coeffs[3] = -_two*D*Nx;
+    rat_coeffs[4] = -_two*D*Ny;
+    rat_coeffs[5] =
+      Nx*Nx + Ny*Ny - ((D*x2 - Nx)*(D*x2 - Nx) + (D*y2 - Ny)*(D*y2 - Ny));
+
+    // Determine the orientation: If the mid-point forms a left-turn with
+    // the source and the target points, the orientation is positive (going
+    // counterclockwise).
+    // Otherwise, it is negative (going clockwise).
+    Alg_kernel                         ker;
+    typename Alg_kernel::Orientation_2 orient_f = ker.orientation_2_object();
+
+
+    Point_2  p_mid = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2));
+
+    if (orient_f(_source, p_mid, _target) == LEFT_TURN)
+      _orient = COUNTERCLOCKWISE;
+    else
+      _orient = CLOCKWISE;
+
+    // Set the arc properties (no need to compute the orientation).
+    _set (rat_coeffs);
+  }
+
+  /*!
+   * Construct a conic arc from the given five points, specified by the
+   * points p1, p2, p3, p4 and p5.
+   * \param p1 The source point of the given arc.
+   * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5.
+   * \param p5 The target point of the given arc.
+   * \pre No three points are collinear.
+   */
+  _Conic_arc_2 (const Rat_point_2& p1,
+		const Rat_point_2& p2,
+		const Rat_point_2& p3,
+		const Rat_point_2& p4,
+		const Rat_point_2& p5) :
+    _extra_data_P(NULL)
+  {
+    // Make sure that no three points are collinear.
+    Rat_kernel                         ker;
+    typename Rat_kernel::Orientation_2 orient_f = ker.orientation_2_object();
+    const bool                         point_collinear =
+      (orient_f (p1, p2, p3) == COLLINEAR ||
+       orient_f (p1, p2, p4) == COLLINEAR ||
+       orient_f (p1, p2, p5) == COLLINEAR ||
+       orient_f (p1, p3, p4) == COLLINEAR ||
+       orient_f (p1, p3, p5) == COLLINEAR ||
+       orient_f (p1, p4, p5) == COLLINEAR ||
+       orient_f (p2, p3, p4) == COLLINEAR ||
+       orient_f (p2, p3, p5) == COLLINEAR ||
+       orient_f (p2, p4, p5) == COLLINEAR ||
+       orient_f (p3, p4, p5) == COLLINEAR);
+
+    if (point_collinear)
+    {
+      _info = 0;           // Inavlid arc.
+      return;
+    }
+
+    // Set the source and target.
+    Rational          x1 = p1.x();
+    Rational          y1 = p1.y();
+    Rational          x5 = p5.x();
+    Rational          y5 = p5.y();
+    Nt_traits         nt_traits;
+
+    _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1));
+    _target = Point_2 (nt_traits.convert (x5), nt_traits.convert (y5));
+
+    // Set a conic curve that passes through the five given point.
+    typename Rat_kernel::Conic_2   temp_conic;
+    Rational                       rat_coeffs [6];
+
+    temp_conic.set (p1, p2, p3, p4, p5);
+
+    // Get the conic coefficients.
+    rat_coeffs[0] = temp_conic.r();
+    rat_coeffs[1] = temp_conic.s();
+    rat_coeffs[2] = temp_conic.t();
+    rat_coeffs[3] = temp_conic.u();
+    rat_coeffs[4] = temp_conic.v();
+    rat_coeffs[5] = temp_conic.w();
+
+    // Determine the orientation: If one of the midpoints forms a left-turn
+    // with the source and the target points, the orientation is positive
+    // (going counterclockwise).
+    // Otherwise, it is negative (going clockwise).
+    const Orientation                  turn = orient_f(p1, p2, p5);
+
+    if (turn == LEFT_TURN)
+    {
+      _orient = COUNTERCLOCKWISE;
+      CGAL_precondition (orient_f(p1, p3, p5) == LEFT_TURN &&
+			 orient_f(p1, p4, p5) == LEFT_TURN);
+    }
+    else
+    {
+      _orient = CLOCKWISE;
+      CGAL_precondition (orient_f(p1, p3, p5) != LEFT_TURN &&
+			 orient_f(p1, p4, p5) != LEFT_TURN);
+    }
+
+    // Set the arc properties (no need to compute the orientation).
+    _set (rat_coeffs);
+
+    // Make sure that all midpoints are strictly between the
+    // source and the target.
+    Point_2  mp2 = Point_2 (nt_traits.convert (p2.x()),
+			    nt_traits.convert (p2.y()));
+    Point_2  mp3 = Point_2 (nt_traits.convert (p3.x()),
+			    nt_traits.convert (p3.y()));
+    Point_2  mp4 = Point_2 (nt_traits.convert (p4.x()),
+			    nt_traits.convert (p4.y()));
+
+    if (! _is_strictly_between_endpoints (mp2) ||
+	! _is_strictly_between_endpoints (mp3) ||
+	! _is_strictly_between_endpoints (mp4))
+    {
+      _info = 0;               // Inalvid arc.
+    }
+  }
+
+  /*!
+   * Construct a conic arc which lies on the conic:
+   *   C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
+   * The source and the target are specified by the intersection of the
+   * conic with:
+   *   C_1: r_1*x^2 + s_1*y^2 + t_1*xy + u_1*x + v_1*y + w_1 = 0
+   *   C_2: r_2*x^2 + s_2*y^2 + t_2*xy + u_2*x + v_2*y + w_2 = 0
+   * The user must also specify the source and the target with approximated
+   * coordinates. The actual intersection points that best fits the source
+   * (or the target) will be selected.
+   */
+  _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
+		const Rational& u, const Rational& v, const Rational& w,
+		const Orientation& orient,
+		const Point_2& app_source,
+		const Rational& r_1, const Rational& s_1, const Rational& t_1,
+		const Rational& u_1, const Rational& v_1, const Rational& w_1,
+		const Point_2& app_target,
+		const Rational& r_2, const Rational& s_2, const Rational& t_2,
+		const Rational& u_2, const Rational& v_2, const Rational& w_2):
+    _orient(orient),
+    _extra_data_P(NULL)
+  {
+    // Create the integer coefficients of the base conic.
+    Rational          rat_coeffs [6];
+    Nt_traits         nt_traits;
+    Integer           base_coeffs[6];
+    int               deg_base;
+
+    rat_coeffs[0] = r;
+    rat_coeffs[1] = s;
+    rat_coeffs[2] = t;
+    rat_coeffs[3] = u;
+    rat_coeffs[4] = v;
+    rat_coeffs[5] = w;
+
+    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
+                                    base_coeffs);
+
+    if (CGAL::sign (base_coeffs[0]) == ZERO &&
+	CGAL::sign (base_coeffs[1]) == ZERO &&
+	CGAL::sign (base_coeffs[2]) == ZERO)
+    {
+      deg_base = 1;
+    }
+    else
+    {
+      deg_base = 2;
+    }
+
+    // Compute the endpoints.
+    Rational          aux_rat_coeffs [6];
+    Integer           aux_coeffs[6];
+    int               deg_aux;
+    Algebraic         xs[4];
+    int               n_xs;
+    Algebraic         ys[4];
+    int               n_ys;
+    int               i, j;
+    Algebraic         val;
+    bool              found;
+    double            dx, dy;
+    double            curr_dist;
+    double            min_dist = -1;
+    int               k;
+
+    for (k = 1; k <= 2; k++)
+    {
+      // Get the integer coefficients of the k'th auxiliary conic curve.
+      aux_rat_coeffs[0] = (k == 1) ? r_1 : r_2;
+      aux_rat_coeffs[1] = (k == 1) ? s_1 : s_2;
+      aux_rat_coeffs[2] = (k == 1) ? t_1 : t_2;
+      aux_rat_coeffs[3] = (k == 1) ? u_1 : u_2;
+      aux_rat_coeffs[4] = (k == 1) ? v_1 : v_2;
+      aux_rat_coeffs[5] = (k == 1) ? w_1 : w_2;
+
+      nt_traits.convert_coefficients (aux_rat_coeffs, aux_rat_coeffs + 6,
+				      aux_coeffs);
+
+      if (CGAL::sign (aux_coeffs[0]) == ZERO &&
+	  CGAL::sign (aux_coeffs[1]) == ZERO &&
+	  CGAL::sign (aux_coeffs[2]) == ZERO)
+      {
+	deg_aux = 1;
+      }
+      else
+      {
+	deg_aux = 2;
+      }
+
+      // Compute the x- and y-coordinates of intersection points of the base
+      // conic and the k'th auxiliary conic.
+      n_xs = _compute_resultant_roots (nt_traits,
+				       base_coeffs[0], base_coeffs[1],
+				       base_coeffs[2],
+				       base_coeffs[3], base_coeffs[4],
+				       base_coeffs[5],
+				       deg_base,
+				       aux_coeffs[0], aux_coeffs[1],
+				       aux_coeffs[2],
+				       aux_coeffs[3], aux_coeffs[4],
+				       aux_coeffs[5],
+				       deg_aux,
+				       xs);
+
+      n_ys = _compute_resultant_roots (nt_traits,
+				       base_coeffs[1], base_coeffs[0],
+				       base_coeffs[2],
+				       base_coeffs[4], base_coeffs[3],
+				       base_coeffs[5],
+				       deg_base,
+				       aux_coeffs[1], aux_coeffs[0],
+				       aux_coeffs[2],
+				       aux_coeffs[4], aux_coeffs[3],
+				       aux_coeffs[5],
+				       deg_aux,
+				       ys);
+
+      // Find the intersection point which is nearest the given approximation
+      // and set it as the endpoint.
+      found = false;
+      for (i = 0; i < n_xs; i++)
+      {
+	for (j = 0; j < n_ys; j++)
+	{
+	  // Check if the point (xs[i], ys[j]) lies on both conics.
+	  val = nt_traits.convert(base_coeffs[0]) * xs[i]*xs[i] +
+	        nt_traits.convert(base_coeffs[1]) * ys[j]*ys[j] +
+	        nt_traits.convert(base_coeffs[2]) * xs[i]*ys[j] +
+	        nt_traits.convert(base_coeffs[3]) * xs[i] +
+                nt_traits.convert(base_coeffs[4]) * ys[j] +
+	        nt_traits.convert(base_coeffs[5]);
+
+	  if (CGAL::sign (val) != ZERO)
+	    continue;
+
+	  val = nt_traits.convert(aux_coeffs[0]) * xs[i]*xs[i] +
+	        nt_traits.convert(aux_coeffs[1]) * ys[j]*ys[j] +
+	        nt_traits.convert(aux_coeffs[2]) * xs[i]*ys[j] +
+	        nt_traits.convert(aux_coeffs[3]) * xs[i] +
+                nt_traits.convert(aux_coeffs[4]) * ys[j] +
+	        nt_traits.convert(aux_coeffs[5]);
+
+	  if (CGAL::sign (val) == ZERO)
+	  {
+	    // Compute the distance of (xs[i], ys[j]) from the approximated
+	    // endpoint.
+	    if (k == 1)
+	    {
+	      dx = CGAL::to_double (xs[i] - app_source.x());
+	      dy = CGAL::to_double (ys[j] - app_source.y());
+	    }
+	    else
+	    {
+	      dx = CGAL::to_double (xs[i] - app_target.x());
+	      dy = CGAL::to_double (ys[j] - app_target.y());
+	    }
+
+	    curr_dist = dx*dx + dy*dy;
+
+	    // Update the endpoint if (xs[i], ys[j]) is the nearest pair so
+	    // far.
+	    if (! found || curr_dist < min_dist)
+	    {
+	      if (k == 1)
+		_source = Point_2 (xs[i], ys[j]);
+	      else
+		_target = Point_2 (xs[i], ys[j]);
+
+	      min_dist = curr_dist;
+	      found = true;
+	    }
+	  }
+	}
+      }
+
+      if (! found)
+      {
+	_info = 0;           // Invalid arc.
+	return;
+      }
+    }
+
+    // Make sure that the source and the target are not the same.
+    if (Alg_kernel().compare_xy_2_object() (_source,
+					    _target) == EQUAL)
+    {
+      _info = 0;      // Invalid arc.
+      return;
+    }
+
+    // Set the arc properties (no need to compute the orientation).
+    _set (rat_coeffs);
+  }
+
+  /*!
+   * Destructor.
+   */
+  virtual ~_Conic_arc_2 ()
+  {
+    if (_extra_data_P != NULL)
+      delete _extra_data_P;
+  }
+
+  /*!
+   * Assignment operator.
+   * \param arc The copied arc.
+   */
+  const Self& operator= (const Self& arc)
+  {
+    if (this == &arc)
+      return (*this);
+
+    // Free any existing data.
+    if (_extra_data_P != NULL)
+      delete _extra_data_P;
+
+    // Copy the arc's attributes.
+    _r = arc._r;
+    _s = arc._s;
+    _t = arc._t;
+    _u = arc._u;
+    _v = arc._v;
+    _w = arc._w;
+
+    _orient = arc._orient;
+    _info = arc._info;
+    _source = arc._source;
+    _target = arc._target;
+
+    // Duplicate the extra data, if necessary.
+    if (arc._extra_data_P != NULL)
+      _extra_data_P = new Extra_data (*(arc._extra_data_P));
+    else
+      _extra_data_P = NULL;
+
+    return (*this);
+  }
+  //@}
+
+  /// \name Get the arc properties.
+  //@{
+
+  /*!
+   * Check if the arc is valid.
+   */
+  bool is_valid () const
+  {
+    return ((_info & IS_VALID) != 0);
+  }
+
+  /*!
+   * Get the coefficients of the underlying conic.
+   */
+  const Integer& r () const {return (_r);}
+  const Integer& s () const {return (_s);}
+  const Integer& t () const {return (_t);}
+  const Integer& u () const {return (_u);}
+  const Integer& v () const {return (_v);}
+  const Integer& w () const {return (_w);}
+
+  /*!
+   * Check whether the arc is x-monotone.
+   */
+  bool is_x_monotone () const
+  {
+    // Check if the arc contains no vertical tangency points.
+    Point_2      vtan_ps[2];
+    return (vertical_tangency_points (vtan_ps) == 0);
+  }
+
+  /*!
+   * Check whether the arc is y-monotone.
+   */
+  bool is_y_monotone () const
+  {
+    // Check if the arc contains no horizontal tangency points.
+    Point_2      htan_ps[2];
+    return (horizontal_tangency_points (htan_ps) == 0);
+  }
+
+  /*!
+   * Check whether the arc represents a full conic curve.
+   */
+  bool is_full_conic () const
+  {
+    return ((_info & IS_FULL_CONIC) != 0);
+  }
+
+  /*!
+   * Get the arc's source.
+   * \return The source point.
+   * \pre The arc does not represent a full conic curve.
+   */
+  const Point_2& source () const
+  {
+    CGAL_precondition (! is_full_conic());
+
+    return (_source);
+  }
+
+  /*!
+   * Get the arc's target.
+   * \return The target point.
+   * \pre The arc does not represent a full conic curve.
+   */
+  const Point_2& target () const
+  {
+    CGAL_precondition (! is_full_conic());
+
+    return (_target);
+  }
+
+  /*!
+   * Get the orientation of the arc.
+   * \return The orientation.
+   */
+  Orientation orientation () const
+  {
+    return (_orient);
+  }
+
+  /*!
+   * Get a bounding box for the conic arc.
+   * \return The bounding box.
+   */
+  Bbox_2 bbox () const
+  {
+    CGAL_precondition (is_valid());
+
+    double    x_min = 0, y_min = 0;
+    double    x_max = 0, y_max = 0;
+
+    if (is_full_conic())
+    {
+      // In case of a full conic (an ellipse or a circle), compute the
+      // horizontal and vertical tangency points and use them to bound the arc.
+      Point_2   tan_ps[2];
+      CGAL_assertion_code(int n_tan_ps);
+
+      CGAL_assertion_code(n_tan_ps = vertical_tangency_points(tan_ps));
+      CGAL_assertion(n_tan_ps == 2);
+
+      if (CGAL::to_double(tan_ps[0].x()) < CGAL::to_double(tan_ps[1].x()))
+      {
+        x_min = CGAL::to_double(tan_ps[0].x());
+        x_max = CGAL::to_double(tan_ps[1].x());
+      }
+      else
+      {
+        x_min = CGAL::to_double(tan_ps[1].x());
+        x_max = CGAL::to_double(tan_ps[0].x());
+      }
+
+      CGAL_assertion_code(n_tan_ps = horizontal_tangency_points(tan_ps));
+      CGAL_assertion(n_tan_ps == 2);
+
+      if (CGAL::to_double(tan_ps[0].y()) < CGAL::to_double(tan_ps[1].y()))
+      {
+        y_min = CGAL::to_double(tan_ps[0].y());
+        y_max = CGAL::to_double(tan_ps[1].y());
+      }
+      else
+      {
+        y_min = CGAL::to_double(tan_ps[1].y());
+        y_max = CGAL::to_double(tan_ps[0].y());
+      }
+    }
+    else
+    {
+      // Use the source and target to initialize the exterme points.
+      bool   source_left =
+        CGAL::to_double(_source.x()) < CGAL::to_double(_target.x());
+      x_min = source_left ?
+        CGAL::to_double(_source.x()) : CGAL::to_double(_target.x());
+      x_max = source_left ?
+        CGAL::to_double(_target.x()) : CGAL::to_double(_source.x());
+
+      bool   source_down =
+        CGAL::to_double(_source.y()) < CGAL::to_double(_target.y());
+      y_min = source_down ?
+        CGAL::to_double(_source.y()) : CGAL::to_double(_target.y());
+      y_max = source_down ?
+        CGAL::to_double(_target.y()) : CGAL::to_double(_source.y());
+
+      // Go over the vertical tangency points and try to update the x-points.
+      Point_2    tan_ps[2];
+      int        n_tan_ps;
+      int        i;
+
+      n_tan_ps = vertical_tangency_points (tan_ps);
+      for (i = 0; i < n_tan_ps; i++)
+      {
+        if (CGAL::to_double(tan_ps[i].x()) < x_min)
+          x_min = CGAL::to_double(tan_ps[i].x());
+        if (CGAL::to_double(tan_ps[i].x()) > x_max)
+          x_max = CGAL::to_double(tan_ps[i].x());
+      }
+
+      // Go over the horizontal tangency points and try to update the y-points.
+      n_tan_ps = horizontal_tangency_points (tan_ps);
+      for (i = 0; i < n_tan_ps; i++)
+      {
+        if (CGAL::to_double(tan_ps[i].y()) < y_min)
+          y_min = CGAL::to_double(tan_ps[i].y());
+        if (CGAL::to_double(tan_ps[i].y()) > y_max)
+          y_max = CGAL::to_double(tan_ps[i].y());
+      }
+    }
+
+    // Return the resulting bounding box.
+    return (Bbox_2 (x_min, y_min, x_max, y_max));
+  }
+  //@}
+
+  /// \name Modifying functions.
+  //@{
+
+  /*!
+   * Set the source point of the conic arc.
+   * \param ps The new source point.
+   * \pre The arc is not a full conic curve.
+   *      ps must lie on the supporting conic curve.
+   */
+  void set_source (const Point_2& ps)
+  {
+    CGAL_precondition (! is_full_conic());
+    CGAL_precondition (_is_on_supporting_conic (ps));
+    CGAL_precondition (Alg_kernel().orientation_2_object()
+                       (_source, ps, _target) == _orient ||
+                       Alg_kernel().orientation_2_object()
+                       (ps, _source, _target) == _orient);
+
+    _source = ps;
+    return;
+  }
+
+  /*!
+   * Set the target point of the conic arc.
+   * \param pt The new source point.
+   * \pre The arc is not a full conic curve.
+   *      pt must lie on the supporting conic curve.
+   */
+  void set_target (const Point_2& pt)
+  {
+    CGAL_precondition (! is_full_conic());
+    CGAL_precondition (_is_on_supporting_conic (pt));
+    CGAL_precondition (Alg_kernel().orientation_2_object()
+                       (_source, pt, _target) == _orient ||
+                       Alg_kernel().orientation_2_object()
+                       (_source, _target, pt) == _orient);
+
+    _target = pt;
+    return;
+  }
+
+  //@}
+
+  /// \name Compute points on the arc.
+  //@{
+
+  /*!
+   * Calculate the vertical tangency points of the arc.
+   * \param vpts The vertical tangency points.
+   * \pre The vpts vector should be allocated at the size of 2.
+   * \return The number of vertical tangency points.
+   */
+  int vertical_tangency_points (Point_2* vpts) const
+  {
+    // No vertical tangency points for line segments:
+    if (_orient == COLLINEAR)
+      return (0);
+
+    // Calculate the vertical tangency points of the supporting conic.
+    Point_2 ps[2];
+    int     n;
+
+    n = _conic_vertical_tangency_points (ps);
+
+    // Return only the points that are contained in the arc interior.
+    int    m = 0;
+
+    for (int i = 0; i < n; i++)
+    {
+      if (is_full_conic() || _is_strictly_between_endpoints(ps[i]))
+      {
+        vpts[m] = ps[i];
+        m++;
+      }
+    }
+
+    // Return the number of vertical tangency points found.
+    CGAL_assertion (m <= 2);
+    return (m);
+  }
+
+  /*!
+   * Calculate the horizontal tangency points of the arc.
+   * \param hpts The horizontal tangency points.
+   * \pre The hpts vector should be allocated at the size of 2.
+   * \return The number of horizontal tangency points.
+   */
+  int horizontal_tangency_points (Point_2* hpts) const
+  {
+    // No horizontal tangency points for line segments:
+    if (_orient == COLLINEAR)
+      return (0);
+
+    // Calculate the horizontal tangency points of the conic.
+    Point_2    ps[2];
+    int        n;
+
+    n = _conic_horizontal_tangency_points (ps);
+
+    // Return only the points that are contained in the arc interior.
+    int    m = 0;
+
+    for (int i = 0; i < n; i++)
+    {
+      if (is_full_conic() || _is_strictly_between_endpoints(ps[i]))
+      {
+        hpts[m] = ps[i];
+        m++;
+      }
+    }
+
+    // Return the number of horizontal tangency points found.
+    CGAL_assertion (m <= 2);
+    return (m);
+  }
+
+  /*!
+   * Find all points on the arc with a given x-coordinate.
+   * \param p A placeholder for the x-coordinate.
+   * \param ps The point on the arc at x(p).
+   * \pre The vector ps should be allocated at the size of 2.
+   * \return The number of points found.
+   */
+  int points_at_x (const Point_2& p,
+                       Point_2 *ps) const
+  {
+    // Get the y coordinates of the points on the conic.
+    Algebraic    ys[2];
+    int          n;
+
+    n = _conic_get_y_coordinates (p.x(), ys);
+
+    // Find all the points that are contained in the arc.
+    int   m = 0;
+
+    for (int i = 0; i < n; i++)
+    {
+      ps[m] = Point_2 (p.x(), ys[i]);
+
+      if (is_full_conic() || _is_between_endpoints(ps[m]))
+        m++;
+    }
+
+    // Return the number of points on the arc.
+    CGAL_assertion (m <= 2);
+    return (m);
+  }
+
+  /*!
+   * Find all points on the arc with a given y-coordinate.
+   * \param p A placeholder for the y-coordinate.
+   * \param ps The point on the arc at x(p).
+   * \pre The vector ps should be allocated at the size of 2.
+   * \return The number of points found.
+   */
+  int points_at_y (const Point_2& p,
+                       Point_2 *ps) const
+  {
+    // Get the y coordinates of the points on the conic.
+    Algebraic    xs[2];
+    int          n;
+
+    n = _conic_get_x_coordinates (p.y(), xs);
+
+    // Find all the points that are contained in the arc.
+    int   m = 0;
+
+    for (int i = 0; i < n; i++)
+    {
+      ps[m] = Point_2 (xs[i], p.y());
+
+      if (is_full_conic() || _is_between_endpoints(ps[m]))
+        m++;
+    }
+
+    // Return the number of points on the arc.
+    CGAL_assertion (m <= 2);
+    return (m);
+  }
+  //@}
+
+private:
+
+  /// \name Auxiliary construction functions.
+  //@{
+
+  /*!
+   * Set the properties of a conic arc (for the usage of the constructors).
+   * \param rat_coeffs A vector of size 6, storing the rational coefficients
+   *                   of x^2, y^2, xy, x, y and the free coefficient resp.
+   */
+  void _set (const Rational* rat_coeffs)
+  {
+    _info = IS_VALID;
+
+    // Convert the coefficients vector to an equivalent vector of integer
+    // coefficients.
+    Nt_traits         nt_traits;
+    Integer           int_coeffs[6];
+
+    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
+                                    int_coeffs);
+
+    // Check the orientation of conic curve, and negate the conic coefficients
+    // if its given orientation.
+    typename Rat_kernel::Conic_2   temp_conic (rat_coeffs[0], rat_coeffs[1],
+                                               rat_coeffs[2], rat_coeffs[3],
+                                               rat_coeffs[4], rat_coeffs[5]);
+
+    if (_orient == temp_conic.orientation())
+    {
+      _r = int_coeffs[0];
+      _s = int_coeffs[1];
+      _t = int_coeffs[2];
+      _u = int_coeffs[3];
+      _v = int_coeffs[4];
+      _w = int_coeffs[5];
+    }
+    else
+    {
+      _r = -int_coeffs[0];
+      _s = -int_coeffs[1];
+      _t = -int_coeffs[2];
+      _u = -int_coeffs[3];
+      _v = -int_coeffs[4];
+      _w = -int_coeffs[5];
+    }
+
+    // Make sure both endpoint lie on the supporting conic.
+    if (! _is_on_supporting_conic (_source) ||
+	! _is_on_supporting_conic (_target))
+    {
+      _info = 0;          // Invalid arc.
+      return;
+    }
+
+    _extra_data_P = NULL;
+
+    // Check whether we have a degree 2 curve.
+    if ((CGAL::sign (_r) != ZERO ||
+	 CGAL::sign (_s) != ZERO ||
+	 CGAL::sign (_t) != ZERO))
+    {
+      if (_orient == COLLINEAR)
+      {
+        // We have a segment of a line pair with rational coefficients.
+        // Compose the equation of the underlying line
+        // (with algebraic coefficients).
+        const Algebraic        x1 = _source.x(), y1 = _source.y();
+        const Algebraic        x2 = _target.x(), y2 = _target.y();
+
+        // The supporting line is A*x + B*y + C = 0, where:
+        //
+        //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2
+        //
+        // We use the extra dat field to store the equation of this line.
+        _extra_data_P = new Extra_data;
+        _extra_data_P->a = y2 - y1;
+        _extra_data_P->b = x1 - x2;
+        _extra_data_P->c = x2*y1 - x1*y2;
+        _extra_data_P->side = ZERO;
+
+        // Make sure the midpoint is on the line pair (thus making sure that
+        // the two points are not taken from different lines).
+        Alg_kernel       ker;
+        Point_2          p_mid = ker.construct_midpoint_2_object() (_source,
+                                                                    _target);
+
+        if (CGAL::sign ((nt_traits.convert(_r)*p_mid.x() +
+                         nt_traits.convert(_t)*p_mid.y() +
+                         nt_traits.convert(_u)) * p_mid.x() +
+                        (nt_traits.convert(_s)*p_mid.y() +
+                         nt_traits.convert(_v)) * p_mid.y() +
+                        nt_traits.convert(_w)) != ZERO)
+        {
+          _info = 0;          // Invalid arc.
+          return;
+        }
+      }
+      else
+      {
+        // The sign of (4rs - t^2) detetmines the conic type:
+        // - if it is possitive, the conic is an ellipse,
+        // - if it is negative, the conic is a hyperbola,
+        // - if it is zero, the conic is a parabola.
+        CGAL::Sign   sign_conic = CGAL::sign (4*_r*_s - _t*_t);
+
+        if (sign_conic == NEGATIVE)
+          // Build the extra hyperbolic data
+          _build_hyperbolic_arc_data ();
+
+        if (sign_conic != POSITIVE)
+        {
+          // In case of a non-degenerate parabola or a hyperbola, make sure
+          // the arc is not infinite.
+          Alg_kernel       ker;
+          Point_2          p_mid = ker.construct_midpoint_2_object() (_source,
+                                                                      _target);
+          Point_2          ps[2];
+
+          bool  finite_at_x = (points_at_x(p_mid, ps) > 0);
+          bool  finite_at_y = (points_at_y(p_mid, ps) > 0);
+
+          if (! finite_at_x && ! finite_at_y)
+          {
+            _info = 0;          // Invalid arc.
+            return;
+          }
+        }
+      }
+    }
+
+    // Mark that this arc valid and is not a full conic curve.
+    _info = IS_VALID;
+
+    return;
+  }
+
+  /*!
+   * Set the properties of a conic arc that is really a full curve
+   * (that is, an ellipse).
+   * \param rat_coeffs A vector of size 6, storing the rational coefficients
+   *                   of x^2, y^2, xy, x, y and the free coefficient resp.
+   * \param comp_orient Should we compute the orientation of the given curve.
+   */
+  void _set_full (const Rational* rat_coeffs,
+                  const bool& comp_orient)
+  {
+    // Convert the coefficients vector to an equivalent vector of integer
+    // coefficients.
+    Nt_traits         nt_traits;
+    Integer           int_coeffs[6];
+
+    nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6,
+                                    int_coeffs);
+
+    // Check the orientation of conic curve, and negate the conic coefficients
+    // if its given orientation.
+    typename Rat_kernel::Conic_2   temp_conic (rat_coeffs[0], rat_coeffs[1],
+                                               rat_coeffs[2], rat_coeffs[3],
+                                               rat_coeffs[4], rat_coeffs[5]);
+    const Orientation              temp_orient = temp_conic.orientation();
+
+    if (comp_orient)
+      _orient = temp_orient;
+
+    if (_orient == temp_orient)
+    {
+      _r = int_coeffs[0];
+      _s = int_coeffs[1];
+      _t = int_coeffs[2];
+      _u = int_coeffs[3];
+      _v = int_coeffs[4];
+      _w = int_coeffs[5];
+    }
+    else
+    {
+      _r = -int_coeffs[0];
+      _s = -int_coeffs[1];
+      _t = -int_coeffs[2];
+      _u = -int_coeffs[3];
+      _v = -int_coeffs[4];
+      _w = -int_coeffs[5];
+    }
+
+    // Make sure the conic is a non-degenerate ellipse:
+    // The coefficients should satisfy (4rs - t^2) > 0.
+    const bool  is_ellipse = (CGAL::sign (4*_r*_s - _t*_t) == POSITIVE);
+    CGAL_assertion (is_ellipse);
+
+    // We do not have to store any extra data with the arc.
+    _extra_data_P = NULL;
+
+    // Mark that this arc is a full conic curve.
+    if (is_ellipse)
+      _info = IS_VALID | IS_FULL_CONIC;
+    else
+      _info = 0;
+
+    return;
+  }
+
+  /*!
+   * Build the data for hyperbolic arc, contaning the characterization of the
+   * hyperbolic branch the arc is placed on.
+   */
+  void _build_hyperbolic_arc_data ()
+  {
+    // Let phi be the rotation angle of the conic from its canonic form.
+    // We can write:
+    //
+    //                          t
+    //  sin(2*phi) = -----------------------
+    //                sqrt((r - s)^2 + t^2)
+    //
+    //                        r - s
+    //  cos(2*phi) = -----------------------
+    //                sqrt((r - s)^2 + t^2)
+    //
+    Nt_traits        nt_traits;
+    const int        or_fact = (_orient == CLOCKWISE) ? -1 : 1;
+    const Algebraic  r = nt_traits.convert (or_fact * _r);
+    const Algebraic  s = nt_traits.convert (or_fact * _s);
+    const Algebraic  t = nt_traits.convert (or_fact * _t);
+    const Algebraic  cos_2phi = (r - s) / nt_traits.sqrt((r-s)*(r-s) + t*t);
+    const Algebraic  _zero = 0;
+    const Algebraic  _one = 1;
+    const Algebraic  _two = 2;
+    Algebraic        sin_phi;
+    Algebraic        cos_phi;
+
+    // Calculate sin(phi) and cos(phi) according to the half-angle formulae:
+    //
+    //  sin(phi)^2 = 0.5 * (1 - cos(2*phi))
+    //  cos(phi)^2 = 0.5 * (1 + cos(2*phi))
+    Sign             sign_t = CGAL::sign (t);
+
+    if (sign_t == ZERO)
+    {
+      // sin(2*phi) == 0, so phi = 0 or phi = PI/2
+      if (CGAL::sign (cos_2phi) == POSITIVE)
+      {
+        // phi = 0.
+        sin_phi = _zero;
+        cos_phi = _one;
+      }
+      else
+      {
+        // phi = PI/2.
+        sin_phi = _one;
+        cos_phi = _zero;
+      }
+    }
+    else if (sign_t == POSITIVE)
+    {
+      // sin(2*phi) > 0 so 0 < phi < PI/2.
+      sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two);
+      cos_phi = nt_traits.sqrt((_one - cos_2phi) / _two);
+    }
+    else
+    {
+      // sin(2*phi) < 0 so PI/2 < phi < PI.
+      sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two);
+      cos_phi = -nt_traits.sqrt((_one - cos_2phi) / _two);
+    }
+
+    // Calculate the center (x0, y0) of the conic, given by the formulae:
+    //
+    //        t*v - 2*s*u                t*u - 2*r*v
+    //  x0 = -------------   ,     y0 = -------------
+    //        4*r*s - t^2                4*r*s - t^2
+    //
+    // The denominator (4*r*s - t^2) must be negative for hyperbolas.
+    const Algebraic  u = nt_traits.convert (or_fact * _u);
+    const Algebraic  v = nt_traits.convert (or_fact * _v);
+    const Algebraic  det = 4*r*s - t*t;
+    Algebraic        x0, y0;
+
+    CGAL_assertion (CGAL::sign (det) == NEGATIVE);
+
+    x0 = (t*v - _two*s*u) / det;
+    y0 = (t*u - _two*r*v) / det;
+
+    // The axis separating the two branches of the hyperbola is now given by:
+    //
+    //  cos(phi)*x + sin(phi)*y - (cos(phi)*x0 + sin(phi)*y0) = 0
+    //
+    // We store the equation of this line in the extra data structure and also
+    // the sign (side of half-plane) our arc occupies with respect to the line.
+    _extra_data_P = new Extra_data;
+
+    _extra_data_P->a = cos_phi;
+    _extra_data_P->b = sin_phi;
+    _extra_data_P->c = - (cos_phi*x0 + sin_phi*y0);
+
+    // Make sure that the two endpoints are located on the same branch
+    // of the hyperbola.
+    _extra_data_P->side = _sign_of_extra_data (_source.x(), _source.y());
+
+    CGAL_assertion (_extra_data_P->side != ZERO);
+    CGAL_assertion (_extra_data_P->side == _sign_of_extra_data(_target.x(),
+							      _target.y()));
+
+    return;
+  }
+  //@}
+
+protected:
+
+  /// \name Auxiliary functions.
+  //@{
+
+  /*!
+   * Evaluate the sign of (a*x + b*y + c) stored with the extra data field
+   * at a given point.
+   * \param px The x-coordinate of query point.
+   * \param py The y-coordinate of query point.
+   * \return The sign of (a*x + b*y + c).
+   */
+  Sign _sign_of_extra_data (const Algebraic& px,
+			    const Algebraic& py) const
+  {
+    CGAL_assertion (_extra_data_P != NULL);
+
+    if (_extra_data_P == NULL)
+      return (ZERO);
+
+    Algebraic         val = (_extra_data_P->a*px + _extra_data_P->b*py +
+                             _extra_data_P->c);
+
+    return (CGAL::sign (val));
+  }
+
+  /*!
+   * Check whether the given point lies on the supporting conic of the arc.
+   * \param p The query point.
+   * \return (true) if p lies on the supporting conic; (false) otherwise.
+   */
+  bool _is_on_supporting_conic (const Point_2& p) const
+  {
+    // Check whether p satisfies the conic equation.
+    // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0.
+    Nt_traits        nt_traits;
+    const Algebraic  val = (nt_traits.convert(_r)*p.x() +
+			    nt_traits.convert(_t)*p.y() +
+			    nt_traits.convert(_u)) * p.x() +
+                           (nt_traits.convert(_s)*p.y() +
+			    nt_traits.convert(_v)) * p.y() +
+                           nt_traits.convert(_w);
+
+    return (CGAL::sign (val) == ZERO);
+  }
+
+  /*!
+   * Check whether the given point is between the source and the target.
+   * The point is assumed to be on the conic's boundary.
+   * \param p The query point.
+   * \return (true) if the point is between the two endpoints,
+   *         (false) if it is not.
+   */
+  bool _is_between_endpoints (const Point_2& p) const
+  {
+    CGAL_precondition (! is_full_conic());
+
+    // Check if p is one of the endpoints.
+    Alg_kernel                         ker;
+
+    if (ker.equal_2_object() (p, _source) ||
+        ker.equal_2_object() (p, _target))
+    {
+      return (true);
+    }
+    else
+    {
+      return (_is_strictly_between_endpoints(p));
+    }
+  }
+
+  /*!
+   * Check whether the given point is strictly between the source and the
+   * target (but not any of them).
+   * The point is assumed to be on the conic's boundary.
+   * \param p The query point.
+   * \return (true) if the point is strictly between the two endpoints,
+   *         (false) if it is not.
+   */
+  bool _is_strictly_between_endpoints (const Point_2& p) const
+  {
+    // In case this is a full conic, any point on its boundary is between
+    // its end points.
+    if (is_full_conic())
+      return (true);
+
+    // Check if we have extra data available.
+    if (_extra_data_P != NULL)
+    {
+      if (_extra_data_P->side != ZERO)
+      {
+        // In case of a hyperbolic arc, make sure the point is located on the
+        // same branch as the arc.
+        if (_sign_of_extra_data(p.x(), p.y()) != _extra_data_P->side)
+          return (false);
+      }
+      else
+      {
+        // In case we have a segment of a line pair, make sure that p really
+        // satisfies the equation of the line.
+        if (_sign_of_extra_data(p.x(), p.y()) != ZERO)
+          return (false);
+      }
+    }
+
+    // Act according to the conic degree.
+    Alg_kernel                         ker;
+
+    if (_orient == COLLINEAR)
+    {
+      Comparison_result  res1;
+      Comparison_result  res2;
+
+      if (ker.compare_x_2_object() (_source, _target) == EQUAL)
+      {
+        // In case of a vertical segment - just check whether the y coordinate
+        // of p is between those of the source's and of the target's.
+        res1 = ker.compare_y_2_object() (p, _source);
+        res2 = ker.compare_y_2_object() (p, _target);
+      }
+      else
+      {
+        // Otherwise, since the segment is x-monotone, just check whether the
+        // x coordinate of p is between those of the source's and of the
+        // target's.
+        res1 = ker.compare_x_2_object() (p, _source);
+        res2 = ker.compare_x_2_object() (p, _target);
+      }
+
+      // If p is not in the (open) x-range (or y-range) of the segment, it
+      // cannot be contained in the segment.
+      if (res1 == EQUAL || res2 == EQUAL || res1 == res2)
+	return (false);
+
+      // Perform an orientation test: This is crucial for segment of line
+      // pairs, as we want to make sure that p lies on the same line as the
+      // source and the target.
+      return (ker.orientation_2_object()(_source, p, _target) == COLLINEAR);
+    }
+    else
+    {
+      // In case of a conic of degree 2, make a decision based on the conic's
+      // orientation and whether (source,p,target) is a right or a left turn.
+      if (_orient == COUNTERCLOCKWISE)
+        return (ker.orientation_2_object()(_source, p, _target) == LEFT_TURN);
+      else
+        return (ker.orientation_2_object()(_source, p, _target) == RIGHT_TURN);
+    }
+  }
+
+  /*!
+   * Find the vertical tangency points of the undelying conic.
+   * \param ps The output points of vertical tangency.
+   *           This area must be allocated at the size of 2.
+   * \return The number of vertical tangency points.
+   */
+  int _conic_vertical_tangency_points (Point_2* ps) const
+  {
+    // In case the base conic is of degree 1 (and not 2), the arc has no
+    // vertical tangency points.
+    if (CGAL::sign (_s) == ZERO)
+      return (0);
+
+    // We are interested in the x coordinates where the quadratic equation:
+    //  s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0
+    // has a single solution (obviously if s = 0, there are no such points).
+    // We therefore demand that the discriminant of this equation is zero:
+    //  (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0
+    const Integer _two = 2;
+    const Integer _four = 4;
+    Algebraic     xs[2];
+    Algebraic    *xs_end;
+    int           n_xs;
+    Nt_traits     nt_traits;
+
+    xs_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s,
+						 _two*_t*_v - _four*_s*_u,
+						 _v*_v - _four*_s*_w,
+						 xs);
+    n_xs = static_cast<int>(xs_end - xs);
+
+    // Find the y-coordinates of the vertical tangency points.
+    Algebraic     ys[2];
+    Algebraic    *ys_end;
+    int           n_ys;
+
+    if (CGAL::sign (_t) == ZERO)
+    {
+      // The two vertical tangency points have the same y coordinate:
+      ys[0] = nt_traits.convert (-_v) /nt_traits.convert (_two*_s);
+      n_ys = 1;
+    }
+    else
+    {
+      ys_end =
+        nt_traits.solve_quadratic_equation (_four*_r*_s*_s - _s*_t*_t,
+                                            _four*_r*_s*_v - _two*_s*_t*_u,
+                                            _r*_v*_v - _t*_u*_v + _t*_t*_w,
+                                            ys);
+      n_ys = static_cast<int>(ys_end - ys);
+    }
+
+    // Pair the x and y coordinates and obtain the vertical tangency points.
+    int   n = 0;
+    int   i, j;
+
+    for (i = 0; i < n_xs; i++)
+    {
+      if (n_ys == 1)
+      {
+        ps[n] = Point_2 (xs[i], ys[0]);
+        n++;
+      }
+      else
+      {
+        for (j = 0; j < n_ys; j++)
+        {
+          if (CGAL::compare (nt_traits.convert(_two*_s) * ys[j],
+                             -(nt_traits.convert(_t) * xs[i] +
+                               nt_traits.convert(_v))) == EQUAL)
+          {
+            ps[n] = Point_2 (xs[i], ys[j]);
+            n++;
+            break;
+          }
+        }
+      }
+    }
+
+    CGAL_assertion (n <= 2);
+    return (n);
+  }
+
+  /*!
+   * Find the horizontal tangency points of the undelying conic.
+   * \param ps The output points of horizontal tangency.
+   *           This area must be allocated at the size of 2.
+   * \return The number of horizontal tangency points.
+   */
+  int _conic_horizontal_tangency_points (Point_2* ps) const
+  {
+    const Integer _zero = 0;
+
+    // In case the base conic is of degree 1 (and not 2), the arc has no
+    // vertical tangency points.
+    if (CGAL::sign (_r) == ZERO)
+      return (0);
+
+    // We are interested in the y coordinates were the quadratic equation:
+    //  r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0
+    // has a single solution (obviously if r = 0, there are no such points).
+    // We therefore demand that the discriminant of this equation is zero:
+    //  (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0
+    const Integer _two = 2;
+    const Integer _four = 4;
+    int           n;
+    Algebraic     ys[2];
+    Algebraic    *ys_end;
+    Nt_traits     nt_traits;
+
+    ys_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s,
+						 _two*_t*_u - _four*_r*_v,
+						 _u*_u - _four*_r*_w,
+						 ys);
+    n = static_cast<int>(ys_end - ys);
+
+    // Compute the x coordinates and construct the horizontal tangency points.
+    Algebraic     x;
+    int           i;
+
+    for (i = 0; i < n; i++)
+    {
+      // Having computed y, x is the single solution to the quadratic equation
+      // above, and since its discriminant is 0, x is simply given by:
+      x = -(nt_traits.convert(_t)*ys[i] + nt_traits.convert(_u)) /
+        nt_traits.convert(_two*_r);
+
+      ps[i] = Point_2 (x, ys[i]);
+    }
+
+    CGAL_assertion (n <= 2);
+    return (n);
+  }
+
+  /*!
+   * Find the y coordinates of the underlying conic at a given x coordinate.
+   * \param x The x coordinate.
+   * \param ys The output y coordinates.
+   * \pre The vector ys must be allocated at the size of 2.
+   * \return The number of y coordinates computed (either 0, 1 or 2).
+   */
+  int _conic_get_y_coordinates (const Algebraic& x,
+                                Algebraic *ys) const
+  {
+    // Solve the quadratic equation for a given x and find the y values:
+    //  s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0
+    Nt_traits     nt_traits;
+    Algebraic     A = nt_traits.convert(_s);
+    Algebraic     B = nt_traits.convert(_t)*x + nt_traits.convert(_v);
+    Algebraic     C = (nt_traits.convert(_r)*x +
+                       nt_traits.convert(_u))*x + nt_traits.convert(_w);
+
+    return (_solve_quadratic_equation (A, B, C, ys[0], ys[1]));
+  }
+
+  /*!
+   * Find the x coordinates of the underlying conic at a given y coordinate.
+   * \param y The y coordinate.
+   * \param xs The output x coordinates.
+   * \pre The vector xs must be allocated at the size of 2.
+   * \return The number of x coordinates computed (either 0, 1 or 2).
+   */
+  int _conic_get_x_coordinates (const Algebraic& y,
+                                Algebraic *xs) const
+  {
+    // Solve the quadratic equation for a given y and find the x values:
+    //  r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0
+    Nt_traits     nt_traits;
+    Algebraic     A = nt_traits.convert(_r);
+    Algebraic     B = nt_traits.convert(_t)*y + nt_traits.convert(_u);
+    Algebraic     C = (nt_traits.convert(_s)*y +
+                       nt_traits.convert(_v))*y + nt_traits.convert(_w);
+
+    return (_solve_quadratic_equation (A, B, C, xs[0], xs[1]));
+  }
+
+  /*!
+   * Solve the given quadratic equation: Ax^2 + B*x + C = 0.
+   * \param x_minus The root obtained from taking -sqrt(discriminant).
+   * \param x_plus The root obtained from taking -sqrt(discriminant).
+   * \return The number of disticnt solutions to the equation.
+   */
+  int _solve_quadratic_equation (const Algebraic& A,
+                                 const Algebraic& B,
+                                 const Algebraic& C,
+                                 Algebraic& x_minus, Algebraic& x_plus) const
+  {
+    // Check if we actually have a linear equation.
+    if (CGAL::sign(A) == ZERO)
+    {
+      if (CGAL::sign(B) == ZERO)
+	return (0);
+
+      x_minus = x_plus = -C / B;
+      return (1);
+    }
+
+    // Compute the discriminant and act according to its sign.
+    const Algebraic  disc = B*B - 4*A*C;
+    Sign             sign_disc = CGAL::sign (disc);
+
+    if (sign_disc == NEGATIVE)
+    {
+      // No real-valued solutions:
+      return (0);
+    }
+    else if (sign_disc == ZERO)
+    {
+      // One distinct solution:
+      x_minus = x_plus = -B / (2*A);
+      return (1);
+    }
+
+    // Compute the two distinct solutions:
+    Algebraic     _2A = 2*A;
+    Nt_traits     nt_traits;
+    Algebraic     sqrt_disc = nt_traits.sqrt (disc);
+
+    x_minus = -(B + sqrt_disc) / _2A;
+    x_plus = (sqrt_disc - B) / _2A;
+    return (2);
+  }
+  //@}
+
+};
+
+/*!
+ * Exporter for conic arcs.
+ */
+template <class Rat_kernel, class Alg_kernel, class Nt_traits>
+std::ostream&
+operator<< (std::ostream& os,
+            const _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits> & arc)
+{
+  os << "{" << CGAL::to_double(arc.r()) << "*x^2 + "
+     << CGAL::to_double(arc.s()) << "*y^2 + "
+     << CGAL::to_double(arc.t()) << "*xy + "
+     << CGAL::to_double(arc.u()) << "*x + "
+     << CGAL::to_double(arc.v()) << "*y + "
+     << CGAL::to_double(arc.w()) << "}";
+
+  if (arc.is_full_conic())
+  {
+    os << " - Full curve";
+  }
+  else
+  {
+    os << " : (" << CGAL::to_double(arc.source().x()) << ","
+       << CGAL::to_double(arc.source().y()) << ") ";
+
+    if (arc.orientation() == CLOCKWISE)
+      os << "--cw-->";
+    else if (arc.orientation() == COUNTERCLOCKWISE)
+      os << "--ccw-->";
+    else
+      os << "--l-->";
+
+    os << " (" << CGAL::to_double(arc.target().x()) << ","
+       << CGAL::to_double(arc.target().y()) << ")";
+  }
+
+  return (os);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Conic_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_point_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
new file mode 100644
index 0000000..3478b8f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
@@ -0,0 +1,2140 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein <wein at post.tau.ac.il>
+
+#ifndef CGAL_CONIC_X_MONOTONE_ARC_2_H
+#define CGAL_CONIC_X_MONOTONE_ARC_2_H
+
+/*! \file
+ * Header file for the _Conic_x_monotone_arc_2<Conic_arc_2> class.
+ */
+
+#include <CGAL/Arr_geometry_traits/Conic_intersections_2.h>
+
+#include <map>
+#include <ostream>
+
+namespace CGAL {
+
+/*!
+ * Representation of an x-monotone conic arc.
+ * The class is templated by a representation of a general bounded conic arc.
+ */
+
+template <class Conic_arc_>
+class _Conic_x_monotone_arc_2 : private Conic_arc_
+{
+public:
+
+  typedef Conic_arc_                              Conic_arc_2;
+  typedef _Conic_x_monotone_arc_2<Conic_arc_2>    Self;
+
+  typedef typename Conic_arc_2::Alg_kernel        Alg_kernel;
+  typedef typename Conic_arc_2::Algebraic         Algebraic;
+
+  typedef typename Conic_arc_2::Point_2           Point_2;
+  typedef typename Conic_arc_2::Conic_point_2     Conic_point_2;
+
+  // Type definition for the intersection points mapping.
+  typedef typename Conic_point_2::Conic_id        Conic_id;
+  typedef std::pair<Conic_id, Conic_id>           Conic_pair;
+  typedef std::pair<Conic_point_2, unsigned int>  Intersection_point_2;
+  typedef std::list<Intersection_point_2>         Intersection_list;
+
+  using Conic_arc_2::_sign_of_extra_data;
+  using Conic_arc_2::_is_between_endpoints;
+  using Conic_arc_2::_is_strictly_between_endpoints;
+  using Conic_arc_2::_conic_get_y_coordinates;
+  /*!
+   * \struct Less functor for Conic_pair.
+   */
+  struct Less_conic_pair
+  {
+    bool operator() (const Conic_pair& cp1, const Conic_pair& cp2) const
+    {
+      // Compare the pairs of IDs lexicographically.
+      return (cp1.first < cp2.first ||
+              (cp1.first == cp2.first && cp1.second < cp2.second));
+    }
+  };
+
+  typedef std::map<Conic_pair,
+                   Intersection_list,
+                   Less_conic_pair>               Intersection_map;
+  typedef typename Intersection_map::value_type   Intersection_map_entry;
+  typedef typename Intersection_map::iterator     Intersection_map_iterator;
+
+protected:
+
+  typedef Conic_arc_2                             Base;
+
+  typedef typename Conic_arc_2::Integer           Integer;
+  typedef typename Conic_arc_2::Nt_traits         Nt_traits;
+  typedef typename Conic_arc_2::Rat_kernel        Rat_kernel;
+
+  // Bit masks for the _info field (the two least significant bits are already
+  // used by the base class).
+  enum
+  {
+    IS_VERTICAL_SEGMENT = 4,
+    IS_DIRECTED_RIGHT = 8,
+    DEGREE_1 = 16,
+    DEGREE_2 = 32,
+    DEGREE_MASK = 16 + 32,
+    PLUS_SQRT_DISC_ROOT = 64,
+    FACING_UP = 128,
+    FACING_DOWN = 256,
+    FACING_MASK = 128 + 256,
+    IS_SPECIAL_SEGMENT = 512
+  };
+
+  Algebraic      alg_r;      // The coefficients of the supporting conic curve:
+  Algebraic      alg_s;      //
+  Algebraic      alg_t;      //   r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 ,
+  Algebraic      alg_u;      //
+  Algebraic      alg_v;      // converted to algebraic numbers.
+  Algebraic      alg_w;      //
+
+  Conic_id      _id;         // The ID number of the supporting conic curve.
+
+public:
+
+  /// \name Constrcution methods.
+  //@{
+
+  /*!
+   * Default constructor.
+   */
+  _Conic_x_monotone_arc_2 () :
+    Base (),
+    _id ()
+  {}
+
+  /*!
+   * Copy constructor.
+   * \param arc The copied arc.
+   */
+  _Conic_x_monotone_arc_2 (const Self& arc) :
+    Base (arc),
+    alg_r (arc.alg_r),
+    alg_s (arc.alg_s),
+    alg_t (arc.alg_t),
+    alg_u (arc.alg_u),
+    alg_v (arc.alg_v),
+    alg_w (arc.alg_w),
+    _id (arc._id)
+  {}
+
+  /*!
+   * Construct an x-monotone arc from a conic arc.
+   * \param arc The given (base) arc.
+   * \pre The given arc is x-monotone.
+   */
+  _Conic_x_monotone_arc_2 (const Base& arc) :
+    Base (arc),
+    _id ()
+  {
+    CGAL_precondition (arc.is_valid() && arc.is_x_monotone());
+
+    _set ();
+  }
+
+  /*!
+   * Construct an x-monotone arc from a conic arc.
+   * \param arc The given (base) arc.
+   * \param id The ID of the base arc.
+   */
+  _Conic_x_monotone_arc_2 (const Base& arc,
+                           const Conic_id& id) :
+    Base (arc),
+    _id (id)
+  {
+    CGAL_precondition (arc.is_valid() && id.is_valid());
+
+    _set ();
+  }
+
+  /*!
+   * Construct an x-monotone sub-arc from a conic arc.
+   * \param arc The given (base) arc.
+   * \param source The source point.
+   * \param target The target point.
+   * \param id The ID of the base arc.
+   */
+  _Conic_x_monotone_arc_2 (const Base& arc,
+                           const Point_2& source, const Point_2& target,
+                           const Conic_id& id) :
+    Base (arc),
+    _id (id)
+  {
+    CGAL_precondition (arc.is_valid() && id.is_valid());
+
+    // Set the two endpoints.
+    this->_source = source;
+    this->_target = target;
+
+    _set();
+  }
+
+  /*!
+   * Construct a special segment connecting to given endpoints (for the usage
+   * of the landmarks point-location strategy).
+   * \param source The source point.
+   * \param target The target point.
+   */
+  _Conic_x_monotone_arc_2 (const Point_2& source, const Point_2& target) :
+    Base()
+  {
+    // Set the basic properties and clear the _info bits.
+    this->_source = source;
+    this->_target = target;
+    this->_orient = COLLINEAR;
+    this->_info = 0;
+
+    // Check if the arc is directed right (the target is lexicographically
+    // greater than the source point), or to the left.
+    Alg_kernel         ker;
+    Comparison_result  dir_res = ker.compare_xy_2_object() (this->_source,
+                                                            this->_target);
+
+    CGAL_precondition (dir_res != EQUAL);
+    if (dir_res == EQUAL)
+      // Invalid arc:
+      return;
+
+    this->_info = (Conic_arc_2::IS_VALID | DEGREE_1);
+    if (dir_res == SMALLER)
+      this->_info = (this->_info | IS_DIRECTED_RIGHT);
+
+    // Compose the equation of the underlying line.
+    const Algebraic        x1 = source.x(), y1 = source.y();
+    const Algebraic        x2 = target.x(), y2 = target.y();
+
+    // The supporting line is A*x + B*y + C = 0, where:
+    //
+    //  A = y2 - y1,    B = x1 - x2,    C = x2*y1 - x1*y2
+    //
+    // We use the extra data field to store the equation of this line.
+    this->_extra_data_P = new typename Base::Extra_data;
+    this->_extra_data_P->a = y2 - y1;
+    this->_extra_data_P->b = x1 - x2;
+    this->_extra_data_P->c = x2*y1 - x1*y2;
+    this->_extra_data_P->side = ZERO;
+
+    // Check if the segment is vertical.
+    if (CGAL::sign (this->_extra_data_P->b) == ZERO)
+      this->_info = (this->_info | IS_VERTICAL_SEGMENT);
+
+    // Mark that this is a special segment.
+    this->_info = (this->_info | IS_SPECIAL_SEGMENT);
+
+    return;
+  }
+
+  /*!
+   * Construct a special segment of a given line connecting to given
+   * endpoints.
+   * \param a, b, c The coefficients of the supporting line (ax + by + c = 0).
+   * \param source The source point.
+   * \param target The target point.
+   */
+  _Conic_x_monotone_arc_2 (const Algebraic& a,
+                           const Algebraic& b,
+                           const Algebraic& c,
+                           const Point_2& source, const Point_2& target) :
+    Base()
+  {
+    // Make sure the two endpoints lie on the supporting line.
+    CGAL_precondition (CGAL::sign (a * source.x() +
+                                   b * source.y() + c) == CGAL::ZERO);
+
+    CGAL_precondition (CGAL::sign (a * target.x() +
+                                   b * target.y() + c) == CGAL::ZERO);
+
+    // Set the basic properties and clear the _info bits.
+    this->_source = source;
+    this->_target = target;
+    this->_orient = COLLINEAR;
+    this->_info = 0;
+
+    // Check if the arc is directed right (the target is lexicographically
+    // greater than the source point), or to the left.
+    Alg_kernel         ker;
+    Comparison_result  res = ker.compare_x_2_object() (this->_source,
+                                                       this->_target);
+
+    this->_info = (Conic_arc_2::IS_VALID | DEGREE_1);
+    if (res == EQUAL)
+    {
+      // Mark that the segment is vertical.
+      this->_info = (this->_info | IS_VERTICAL_SEGMENT);
+
+      // Compare the endpoints lexicographically.
+      res = ker.compare_y_2_object() (this->_source,
+                                      this->_target);
+
+      CGAL_precondition (res != EQUAL);
+      if (res == EQUAL)
+      {
+        // Invalid arc:
+        this->_info = 0;
+        return;
+      }
+    }
+
+    if (res == SMALLER)
+      this->_info = (this->_info | IS_DIRECTED_RIGHT);
+
+    // Store the coefficients of the line.
+    this->_extra_data_P = new typename Base::Extra_data;
+    this->_extra_data_P->a = a;
+    this->_extra_data_P->b = b;
+    this->_extra_data_P->c = c;
+    this->_extra_data_P->side = ZERO;
+
+    // Mark that this is a special segment.
+    this->_info = (this->_info | IS_SPECIAL_SEGMENT);
+
+    return;
+  }
+
+  /*!
+   * Assignment operator.
+   * \param arc The copied arc.
+   */
+  const Self& operator= (const Self& arc)
+  {
+    CGAL_precondition (arc.is_valid());
+
+    if (this == &arc)
+      return (*this);
+
+    // Copy the base arc.
+    Base::operator= (arc);
+
+    // Set the rest of the properties.
+    alg_r = arc.alg_r;
+    alg_s = arc.alg_s;
+    alg_t = arc.alg_t;
+    alg_u = arc.alg_u;
+    alg_v = arc.alg_v;
+    alg_w = arc.alg_w;
+
+    _id = arc._id;
+
+    return (*this);
+  }
+  //@}
+
+  /// \name Accessing the arc properties.
+  //@{
+
+  /*!
+   * Get the coefficients of the underlying conic.
+   */
+  const Integer& r () const {return (this->_r);}
+  const Integer& s () const {return (this->_s);}
+  const Integer& t () const {return (this->_t);}
+  const Integer& u () const {return (this->_u);}
+  const Integer& v () const {return (this->_v);}
+  const Integer& w () const {return (this->_w);}
+
+  /*!
+   * Get the arc's source.
+   * \return The source point.
+   */
+  const Conic_point_2& source () const
+  {
+    return (this->_source);
+  }
+
+  /*!
+   * Get the arc's target.
+   * \return The target point.
+   */
+  const Conic_point_2& target () const
+  {
+    return (this->_target);
+  }
+
+  /*!
+   * Get the orientation of the arc.
+   * \return The orientation.
+   */
+  Orientation orientation () const
+  {
+    return (this->_orient);
+  }
+
+  /*!
+   * Get the left endpoint of the arc.
+   */
+  const Conic_point_2& left () const
+  {
+    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
+      return (this->_source);
+    else
+      return (this->_target);
+  }
+
+  /*!
+   * Get the right endpoint of the arc.
+   */
+  const Conic_point_2& right () const
+  {
+    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
+      return (this->_target);
+    else
+      return (this->_source);
+  }
+
+  /*!
+   * Return true iff the conic arc is directed right iexicographically.
+   */
+  bool is_directed_right() const
+  {
+    return ((this->_info & IS_DIRECTED_RIGHT) != 0);
+  }
+
+  /*!
+   * Get a bounding box for the conic arc.
+   * \return The bounding box.
+   */
+  Bbox_2 bbox () const
+  {
+    return (Base::bbox());
+  }
+  //@}
+
+  /// \name Predicates.
+  //@{
+
+  /*!
+   * Check if the conic arc is a vertical segment.
+   */
+  bool is_vertical () const
+  {
+    return ((this->_info & IS_VERTICAL_SEGMENT) != 0);
+  }
+
+  /*!
+   * Check whether the given point lies on the arc.
+   * \param p The qury point.
+   * \param (true) if p lies on the arc; (false) otherwise.
+   */
+  bool contains_point (const Conic_point_2& p) const
+  {
+    // First check if p lies on the supporting conic. We first check whether
+    // it is one of p's generating conic curves.
+    bool       p_on_conic = false;
+
+    if (p.is_generating_conic (_id))
+    {
+      p_on_conic = true;
+    }
+    else
+    {
+      // Check whether p satisfies the supporting conic equation.
+      p_on_conic = _is_on_supporting_conic (p.x(), p.y());
+
+      if (p_on_conic)
+      {
+        // As p lies on the supporting conic of our arc, add its ID to
+        // the list of generating conics for p.
+        Conic_point_2&  p_non_const = const_cast<Conic_point_2&> (p);
+        p_non_const.set_generating_conic (_id);
+      }
+    }
+
+    if (! p_on_conic)
+      return (false);
+
+    // Check if p is between the endpoints of the arc.
+    return (_is_between_endpoints (p));
+  }
+  //@}
+
+  /// \name Constructing points on the arc.
+  //@{
+
+  /*!
+   * Compute a point on the arc with the same x-coordiante as the given point.
+   * \param p The given point.
+   * \pre The arc is not vertical and p is in the x-range of the arc.
+   * \return A point on the arc with the same x-coordiante as p.
+   */
+  Point_2 point_at_x (const Point_2& p) const
+  {
+    // Make sure that p is in the x-range of the arc.
+    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0);
+
+    CGAL_precondition_code (
+      Alg_kernel   ker;
+    );
+
+    CGAL_precondition (ker.compare_x_2_object() (p, left()) != SMALLER &&
+                       ker.compare_x_2_object() (p, right()) != LARGER);
+
+    if (_is_special_segment())
+    {
+      // In case of a special segment, the equation of the supported line
+      // (a*x + b*y + c) = 0 is stored with the extra data field, and we
+      // simply have:
+      Algebraic        _y = -(this->_extra_data_P->a*p.x() +
+                              this->_extra_data_P->c) /
+                            this->_extra_data_P->b;
+
+      // Return the computed point.
+      return (Point_2 (p.x(), _y));
+    }
+
+    // Compute the y-coordinate according to the degree of the supporting
+    // conic curve.
+    Nt_traits        nt_traits;
+    Algebraic        y;
+
+    if ((this->_info & DEGREE_MASK) == DEGREE_1)
+    {
+      // In case of a linear curve, the y-coordinate is a simple linear
+      // expression of x(p) (note that v is not 0 as the arc is not vertical):
+      //   y = -(u*x(p) + w) / v
+      y = -(alg_u*p.x() + alg_w) / alg_v;
+    }
+    else if (this->_orient == COLLINEAR)
+    {
+      CGAL_assertion (this->_extra_data_P != NULL);
+
+      // In this case the equation of the supporting line is given by the
+      // extra data structure.
+      y = -(this->_extra_data_P->a * p.x() +
+            this->_extra_data_P->c) / this->_extra_data_P->b;
+    }
+    else
+    {
+      CGAL_assertion ((this->_info & DEGREE_MASK) == DEGREE_2);
+
+      // In this case the y-coordinate is one of solutions to the quadratic
+      // equation:
+      //  s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0
+      Algebraic  A = alg_s;
+      Algebraic  B = alg_t*p.x() + alg_v;
+      Algebraic  C = (alg_r*p.x() + alg_u)*p.x() + alg_w;
+
+      if (CGAL::sign(this->_s) == ZERO)
+      {
+        // In this case A is 0 and we have a linear equation.
+        CGAL_assertion (CGAL::sign (B) != ZERO);
+
+        y = -C / B;
+      }
+      else
+      {
+        // Solve the quadratic equation.
+        Algebraic  disc = B*B - 4*A*C;
+
+        CGAL_assertion (CGAL::sign (disc) != NEGATIVE);
+
+        // We take either the root involving -sqrt(disc) or +sqrt(disc)
+        // based on the information flags.
+        if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0)
+        {
+          y = (nt_traits.sqrt (disc) - B) / (2*A);
+        }
+        else
+
+        {
+          y = -(B + nt_traits.sqrt (disc)) / (2*A);
+        }
+      }
+    }
+
+    // Return the computed point.
+    return (Point_2 (p.x(), y));
+  }
+
+  /*!
+   * Get a polyline approximating the conic arc.
+   * \param n The maximal number of sample points.
+   * \param oi An output iterator, whose value-type is pair<double,double>
+   *           (representing an approximated point).
+   *           In case the arc is a line segment, there are 2 output points,
+   *           otherwise the arc is approximated by the polyline defined by
+   *           (p_0, p_1, ..., p_n), where p_0 and p_n are the left and right
+   *           endpoints of the arc, respectively.
+   */
+  template <class OutputIterator>
+  OutputIterator polyline_approximation (size_t n,
+                                         OutputIterator oi) const
+  {
+    CGAL_precondition (n != 0);
+
+    const double  x_left = CGAL::to_double (left().x());
+    const double  y_left = CGAL::to_double (left().y());
+    const double  x_right = CGAL::to_double (right().x());
+    const double  y_right = CGAL::to_double (right().y());
+
+    if (this->_orient == COLLINEAR)
+    {
+      // In case of a line segment, return the two endpoints.
+      *oi = std::pair<double, double> (x_left, y_left);
+      ++oi;
+      *oi = std::pair<double, double> (x_right, y_right);
+      ++oi;
+      return (oi);
+    }
+
+    // Otherwise, sample (n - 1) equally-spaced points in between.
+    const double  app_r = CGAL::to_double (this->_r);
+    const double  app_s = CGAL::to_double (this->_s);
+    const double  app_t = CGAL::to_double (this->_t);
+    const double  app_u = CGAL::to_double (this->_u);
+    const double  app_v = CGAL::to_double (this->_v);
+    const double  app_w = CGAL::to_double (this->_w);
+    const double  x_jump = (x_right - x_left) / n;
+    double        x, y;
+    const bool    A_is_zero = (CGAL::sign(this->_s) == ZERO);
+    double        A = app_s, B, C;
+    double        disc;
+    size_t        i;
+
+    *oi = std::pair<double, double> (x_left, y_left);   // The left point.
+    ++oi;
+    for (i = 1; i < n; i++)
+    {
+      x = x_left + x_jump*i;
+
+      // Solve the quadratic equation: A*x^2 + B*x + C = 0:
+      B = app_t*x + app_v;
+      C = (app_r*x + app_u)*x + app_w;
+
+      if (A_is_zero)
+      {
+        y = -C / B;
+      }
+      else
+      {
+        disc = B*B - 4*A*C;
+
+        if (disc < 0)
+          disc = 0;
+
+        // We take either the root involving -sqrt(disc) or +sqrt(disc)
+        // based on the information flags.
+        if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0)
+        {
+          y = (std::sqrt(disc) - B) / (2*A);
+        }
+        else
+        {
+          y = -(B + std::sqrt (disc)) / (2*A);
+        }
+      }
+
+      *oi = std::pair<double, double> (x, y);
+      ++oi;
+    }
+    *oi = std::pair<double, double> (x_right, y_right);   // The right point.
+    ++oi;
+
+    return (oi);
+  }
+
+  /*!
+   * Compare to arcs immediately to the right of their intersection point.
+   * \param arc The compared arc.
+   * \param p The reference intersection point.
+   * \return The relative position of the arcs to the right of p.
+   * \pre Both arcs we compare are not vertical segments.
+   */
+  Comparison_result compare_to_right (const Self& arc,
+                                      const Conic_point_2& p) const
+  {
+    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0 &&
+                       (arc._info & IS_VERTICAL_SEGMENT) == 0);
+
+    // In case one arc is facing upwards and another facing downwards, it is
+    // clear that the one facing upward is above the one facing downwards.
+    if (_has_same_supporting_conic (arc))
+    {
+      if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
+        return (LARGER);
+      else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP) != 0)
+        return (SMALLER);
+
+      // In this case the two arcs overlap.
+      CGAL_assertion ((this->_info & FACING_MASK) ==
+                      (arc._info & FACING_MASK));
+
+      return (EQUAL);
+    }
+
+    // Compare the slopes of the two arcs at p, using their first-order
+    // partial derivatives.
+    Algebraic      slope1_numer, slope1_denom;
+    Algebraic      slope2_numer, slope2_denom;
+
+    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
+    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
+
+    // Check if any of the slopes is vertical.
+    const bool     is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO);
+    const bool     is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO);
+
+    if (!is_vertical_slope1 && !is_vertical_slope2)
+    {
+      // The two derivatives at p are well-defined: use them to determine
+      // which arc is above the other (the one with a larger slope is below).
+      Comparison_result slope_res = CGAL::compare (slope1_numer*slope2_denom,
+                                                   slope2_numer*slope1_denom);
+
+      if (slope_res != EQUAL)
+        return (slope_res);
+
+      // Use the second-order derivative.
+      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
+      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope1_numer*slope2_denom,
+                                 slope2_numer*slope1_denom);
+
+      if (slope_res != EQUAL)
+        return (slope_res);
+
+      // Use the third-order derivative.
+      _derive_by_x_at (p, 3, slope1_numer, slope1_denom);
+      arc._derive_by_x_at (p, 3, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope1_numer*slope2_denom,
+                                 slope2_numer*slope1_denom);
+
+      // \todo Handle higher-order derivatives:
+      CGAL_assertion (slope_res != EQUAL);
+
+      return (slope_res);
+    }
+    else if (!is_vertical_slope2)
+    {
+      // The first arc has a vertical slope at p: check whether it is
+      // facing upwards or downwards and decide accordingly.
+      CGAL_assertion ((this->_info & FACING_MASK) != 0);
+
+      if ((this->_info & FACING_UP) != 0)
+        return (LARGER);
+      return (SMALLER);
+    }
+    else if (!is_vertical_slope1)
+    {
+      // The second arc has a vertical slope at p_int: check whether it is
+      // facing upwards or downwards and decide accordingly.
+      CGAL_assertion ((arc._info & FACING_MASK) != 0);
+
+      if ((arc._info & FACING_UP) != 0)
+        return (SMALLER);
+      return (LARGER);
+    }
+
+    // The two arcs have vertical slopes at p_int:
+    // First check whether one is facing up and one down. In this case the
+    // comparison result is trivial.
+    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
+      return (LARGER);
+    else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
+      return (SMALLER);
+
+    // Compute the second-order derivative by y and act according to it.
+    _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
+    arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
+
+    Comparison_result slope_res = CGAL::compare (slope1_numer*slope2_denom,
+                                                 slope2_numer*slope1_denom);
+
+    // If necessary, use the third-order derivative by y.
+    if (slope_res == EQUAL)
+    {
+      // \todo Check this!
+      _derive_by_y_at (p, 3, slope1_numer, slope1_denom);
+      arc._derive_by_y_at (p, 3, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope2_numer*slope1_denom,
+                                 slope1_numer*slope2_denom);
+    }
+
+    // \todo Handle higher-order derivatives:
+    CGAL_assertion(slope_res != EQUAL);
+
+    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0)
+    {
+      // Both are facing up.
+      return ((slope_res == LARGER) ? SMALLER : LARGER);
+    }
+    // Both are facing down.
+    return (slope_res);
+  }
+
+  /*!
+   * Compare to arcs immediately to the leftt of their intersection point.
+   * \param arc The compared arc.
+   * \param p The reference intersection point.
+   * \return The relative position of the arcs to the left of p.
+   * \pre Both arcs we compare are not vertical segments.
+   */
+  Comparison_result compare_to_left (const Self& arc,
+                                     const Conic_point_2& p) const
+  {
+    CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0 &&
+                       (arc._info & IS_VERTICAL_SEGMENT) == 0);
+
+    // In case one arc is facing upwards and another facing downwards, it is
+    // clear that the one facing upward is above the one facing downwards.
+    if (_has_same_supporting_conic (arc))
+    {
+      if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
+        return (LARGER);
+      else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
+        return (SMALLER);
+
+      // In this case the two arcs overlap.
+      CGAL_assertion ((this->_info & FACING_MASK) ==
+                      (arc._info & FACING_MASK));
+
+      return (EQUAL);
+    }
+
+    // Compare the slopes of the two arcs at p, using their first-order
+    // partial derivatives.
+    Algebraic      slope1_numer, slope1_denom;
+    Algebraic      slope2_numer, slope2_denom;
+
+    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
+    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
+
+    // Check if any of the slopes is vertical.
+    const bool     is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO);
+
+    const bool     is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO);
+
+    if (!is_vertical_slope1 && !is_vertical_slope2)
+    {
+      // The two derivatives at p are well-defined: use them to determine
+      // which arc is above the other (the one with a larger slope is below).
+      Comparison_result  slope_res = CGAL::compare(slope2_numer*slope1_denom,
+                                                   slope1_numer*slope2_denom);
+
+      if (slope_res != EQUAL)
+        return (slope_res);
+
+      // Use the second-order derivative.
+      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
+      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope1_numer*slope2_denom,
+                                 slope2_numer*slope1_denom);
+
+      if (slope_res != EQUAL)
+        return (slope_res);
+
+      // Use the third-order derivative.
+      _derive_by_x_at (p, 3, slope1_numer, slope1_denom);
+      arc._derive_by_x_at (p, 3, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope2_numer*slope1_denom,
+                                 slope1_numer*slope2_denom);
+
+      // \todo Handle higher-order derivatives:
+      CGAL_assertion (slope_res != EQUAL);
+
+      return (slope_res);
+    }
+    else if (!is_vertical_slope2)
+    {
+      // The first arc has a vertical slope at p: check whether it is
+      // facing upwards or downwards and decide accordingly.
+      CGAL_assertion ((this->_info & FACING_MASK) != 0);
+
+      if ((this->_info & FACING_UP) != 0)
+        return (LARGER);
+      return (SMALLER);
+    }
+    else if (!is_vertical_slope1)
+    {
+      // The second arc has a vertical slope at p_int: check whether it is
+      // facing upwards or downwards and decide accordingly.
+      CGAL_assertion ((arc._info & FACING_MASK) != 0);
+
+      if ((arc._info & FACING_UP) != 0)
+        return (SMALLER);
+      return (LARGER);
+    }
+
+    // The two arcs have vertical slopes at p_int:
+    // First check whether one is facing up and one down. In this case the
+    // comparison result is trivial.
+    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0)
+      return (LARGER);
+    else if ((this->_info & FACING_DOWN)!= 0 && (arc._info & FACING_UP)!= 0)
+      return (SMALLER);
+
+    // Compute the second-order derivative by y and act according to it.
+    _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
+    arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
+
+    Comparison_result  slope_res = CGAL::compare(slope2_numer*slope1_denom,
+                                                 slope1_numer*slope2_denom);
+
+    // If necessary, use the third-order derivative by y.
+    if (slope_res == EQUAL)
+    {
+      // \todo Check this!
+      _derive_by_y_at (p, 3, slope1_numer, slope1_denom);
+      arc._derive_by_y_at (p, 3, slope2_numer, slope2_denom);
+
+      slope_res = CGAL::compare (slope2_numer*slope1_denom,
+                                 slope1_numer*slope2_denom);
+    }
+
+    // \todo Handle higher-order derivatives:
+    CGAL_assertion(slope_res != EQUAL);
+
+    if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0)
+    {
+      // Both are facing up.
+      return ((slope_res == LARGER) ? SMALLER : LARGER);
+    }
+    // Both are facing down.
+    return (slope_res);
+  }
+
+  /*!
+   * Compute the intersections with the given arc.
+   * \param arc The given intersecting arc.
+   * \param inter_map Maps conic pairs to lists of their intersection points.
+   * \param oi The output iterator.
+   * \return The past-the-end iterator.
+   */
+  template<class OutputIterator>
+  OutputIterator intersect (const Self& arc,
+                            Intersection_map& inter_map,
+                            OutputIterator oi) const
+  {
+    if (_has_same_supporting_conic (arc))
+    {
+      // Check for overlaps between the two arcs.
+      Self    overlap;
+
+      if (_compute_overlap (arc, overlap))
+      {
+        // There can be just a single overlap between two x-monotone arcs:
+        *oi = make_object (overlap);
+        oi++;
+        return (oi);
+      }
+
+      // In case there is not overlap and the supporting conics are the same,
+      // there cannot be any intersection points, unless the two arcs share
+      // an end point.
+      // Note that in this case we do not define the multiplicity of the
+      // intersection points we report.
+      Alg_kernel  ker;
+
+      if (ker.equal_2_object() (left(), arc.left()))
+      {
+        Intersection_point_2  ip (left(), 0);
+
+        *oi = make_object (ip);
+        oi++;
+      }
+
+      if (ker.equal_2_object() (right(), arc.right()))
+      {
+        Intersection_point_2  ip (right(), 0);
+
+        *oi = make_object (ip);
+        oi++;
+      }
+
+      return (oi);
+    }
+
+    // Search for the pair of supporting conics in the map (the first conic
+    // ID in the pair should be smaller than the second one, to guarantee
+    // uniqueness).
+    Conic_pair                   conic_pair;
+    Intersection_map_iterator    map_iter;
+    Intersection_list            inter_list;
+    bool                         invalid_ids = false;
+
+    if (_id.is_valid() && arc._id.is_valid())
+    {
+      if (_id < arc._id)
+        conic_pair = Conic_pair (_id, arc._id);
+      else
+        conic_pair = Conic_pair (arc._id, _id);
+
+      map_iter = inter_map.find (conic_pair);
+    }
+    else
+    {
+      // In case one of the IDs is invalid, we do not look in the map neither
+      // we cache the results.
+      map_iter = inter_map.end();
+      invalid_ids = true;
+    }
+
+    if (map_iter == inter_map.end())
+    {
+      // In case the intersection points between the supporting conics have
+      // not been computed before, compute them now and store them in the map.
+      _intersect_supporting_conics (arc, inter_list);
+
+      if (! invalid_ids)
+        inter_map[conic_pair] = inter_list;
+    }
+    else
+    {
+      // Obtain the precomputed intersection points from the map.
+      inter_list = (*map_iter).second;
+    }
+
+    // Go over the list of intersection points and report those that lie on
+    // both x-monotone arcs.
+    typename Intersection_list::const_iterator  iter;
+
+    for (iter = inter_list.begin(); iter != inter_list.end(); ++iter)
+    {
+      if (_is_between_endpoints ((*iter).first) &&
+          arc._is_between_endpoints ((*iter).first))
+      {
+        *oi = make_object (*iter);
+        ++oi;
+      }
+    }
+
+    return (oi);
+  }
+  //@}
+
+  /// \name Constructing x-monotone arcs.
+  //@{
+
+  /*!
+   * Split the arc into two at a given split point.
+   * \param p The split point.
+   * \param c1 Output: The first resulting arc, lying to the left of p.
+   * \param c2 Output: The first resulting arc, lying to the right of p.
+   * \pre p lies in the interior of the arc (not one of its endpoints).
+   */
+  void split (const Conic_point_2& p,
+              Self& c1, Self& c2) const
+  {
+    // Make sure that p lies on the interior of the arc.
+    CGAL_precondition_code (
+      Alg_kernel   ker;
+    );
+
+    CGAL_precondition (this->contains_point (p) &&
+                       ! ker.equal_2_object() (p, this->_source) &&
+                       ! ker.equal_2_object() (p, this->_target));
+
+    // Make copies of the current arc.
+    c1 = *this;
+    c2 = *this;
+
+    // Assign the endpoints of the arc.
+    if ((this->_info & IS_DIRECTED_RIGHT) != 0)
+    {
+      // The arc is directed from left to right, so p becomes c1's target
+      // and c2's source.
+      c1._target = p;
+      c2._source = p;
+
+      if (! p.is_generating_conic (_id))
+      {
+        c1._target.set_generating_conic (_id);
+        c2._source.set_generating_conic (_id);
+      }
+    }
+    else
+    {
+      // The arc is directed from right to left, so p becomes c2's target
+      // and c1's source.
+      c1._source = p;
+      c2._target = p;
+
+      if (! p.is_generating_conic (_id))
+      {
+        c1._source.set_generating_conic (_id);
+        c2._target.set_generating_conic (_id);
+      }
+    }
+
+    return;
+  }
+
+  /*!
+   * Flip the arc.
+   * \return An arc with swapped source and target and a reverse orienation.
+   */
+  Self flip () const
+  {
+    // Make a copy of the current arc.
+    Self    arc = *this;
+
+    // Reverse the orientation.
+    if (this->_orient == CLOCKWISE)
+      arc._orient = COUNTERCLOCKWISE;
+    else if (this->_orient == COUNTERCLOCKWISE)
+      arc._orient = CLOCKWISE;
+
+    // Swap the source and the target.
+    arc._source = this->_target;
+    arc._target = this->_source;
+
+    // Change the direction bit among the information flags.
+    arc._info = (this->_info ^ IS_DIRECTED_RIGHT);
+
+    return (arc);
+  }
+
+  /*!
+   * Trim the arc given its new endpoints.
+   * \param ps The new source point.
+   * \param pt The new target point.
+   * \return The new trimmed arc.
+   * \pre Both ps and pt lies on the arc and must conform with the current
+   *      direction of the arc.
+   */
+  Self trim (const Conic_point_2& ps,
+             const Conic_point_2& pt) const
+  {
+    // Make sure that both ps and pt lie on the arc.
+    CGAL_precondition (this->contains_point (ps) &&
+                       this->contains_point (pt));
+
+    // Make sure that the endpoints conform with the direction of the arc.
+    Self         arc = *this;
+    Alg_kernel   ker;
+
+    if (! ((((this->_info & IS_DIRECTED_RIGHT) != 0) &&
+            ker.compare_xy_2_object() (ps, pt) == SMALLER) ||
+           (((this->_info & IS_DIRECTED_RIGHT) == 0) &&
+            ker.compare_xy_2_object() (ps, pt) == LARGER)))
+    {
+      // We are allowed to change the direction only in case of a segment.
+      CGAL_assertion (this->_orient == COLLINEAR);
+      arc._info = (this->_info ^ IS_DIRECTED_RIGHT);
+    }
+
+    // Make a copy of the current arc and assign its endpoints.
+    if (! ker.equal_2_object() (ps, this->_source))
+    {
+      arc._source = ps;
+
+      if (! ps.is_generating_conic (_id))
+        arc._source.set_generating_conic (_id);
+    }
+
+    if (! ker.equal_2_object() (pt, this->_target))
+    {
+      arc._target = pt;
+
+      if (! pt.is_generating_conic (_id))
+        arc._target.set_generating_conic (_id);
+    }
+
+    return (arc);
+  }
+
+  /*!
+   * Check whether the two arcs are equal (have the same graph).
+   * \param arc The compared arc.
+   * \return (true) if the two arcs have the same graph; (false) otherwise.
+   */
+  bool equals (const Self& arc) const
+  {
+    // The two arc must have the same supporting conic curves.
+    if (! _has_same_supporting_conic (arc))
+      return (false);
+
+    // Check that the arc endpoints are the same.
+    Alg_kernel   ker;
+
+    if(this->_orient == COLLINEAR)
+    {
+      CGAL_assertion(arc._orient == COLLINEAR);
+      return((ker.equal_2_object() (this->_source, arc._source) &&
+              ker.equal_2_object() (this->_target, arc._target)) ||
+              (ker.equal_2_object() (this->_source, arc._target) &&
+               ker.equal_2_object() (this->_target, arc._source)));
+    }
+
+    if (this->_orient == arc._orient)
+    {
+      // Same orientation - the source and target points must be the same.
+      return (ker.equal_2_object() (this->_source, arc._source) &&
+              ker.equal_2_object() (this->_target, arc._target));
+    }
+    else
+    {
+      // Reverse orientation - the source and target points must be swapped.
+      return (ker.equal_2_object() (this->_source, arc._target) &&
+              ker.equal_2_object() (this->_target, arc._source));
+    }
+  }
+
+  /*!
+   * Check whether it is possible to merge the arc with the given arc.
+   * \param arc The query arc.
+   * \return (true) if it is possible to merge the two arcs;
+   *         (false) otherwise.
+   */
+  bool can_merge_with (const Self& arc) const
+  {
+    // In order to merge the two arcs, they should have the same supporting
+    // conic.
+    if (! _has_same_supporting_conic (arc))
+      return (false);
+
+    // Check if the left endpoint of one curve is the right endpoint of the
+    // other.
+    Alg_kernel   ker;
+
+    return (ker.equal_2_object() (right(), arc.left()) ||
+            ker.equal_2_object() (left(), arc.right()));
+  }
+
+  /*!
+   * Merge the current arc with the given arc.
+   * \param arc The arc to merge with.
+   * \pre The two arcs are mergeable.
+   */
+  void merge (const Self& arc)
+  {
+    CGAL_precondition (this->can_merge_with (arc));
+
+    // Check if we should extend the arc to the left or to the right.
+    Alg_kernel   ker;
+
+    if (ker.equal_2_object() (right(), arc.left()))
+    {
+      // Extend the arc to the right.
+      if ((this->_info & IS_DIRECTED_RIGHT) != 0)
+        this->_target = arc.right();
+      else
+        this->_source = arc.right();
+    }
+    else
+    {
+      CGAL_precondition (ker.equal_2_object() (left(), arc.right()));
+
+      // Extend the arc to the left.
+      if ((this->_info & IS_DIRECTED_RIGHT) != 0)
+        this->_source = arc.left();
+      else
+        this->_target = arc.left();
+    }
+
+    return;
+  }
+
+  bool is_upper() const
+  {
+    return ((this->_info & FACING_UP) != 0);
+  }
+
+  bool is_lower() const
+  {
+    return ((this->_info & FACING_DOWN) != 0);
+  }
+  //@}
+
+private:
+
+  /// \name Auxiliary (private) functions.
+  //@{
+
+  /*!
+   * Set the properties of the x-monotone conic arc (for the usage of the
+   * constructors).
+   */
+  void _set ()
+  {
+    // Convert the coefficients of the supporting conic to algebraic numbers.
+    Nt_traits        nt_traits;
+
+    alg_r = nt_traits.convert (this->_r);
+    alg_s = nt_traits.convert (this->_s);
+    alg_t = nt_traits.convert (this->_t);
+    alg_u = nt_traits.convert (this->_u);
+    alg_v = nt_traits.convert (this->_v);
+    alg_w = nt_traits.convert (this->_w);
+
+    // Set the generating conic ID for the source and target points.
+    this->_source.set_generating_conic (_id);
+    this->_target.set_generating_conic (_id);
+
+    // Clear the _info bits.
+    this->_info = Conic_arc_2::IS_VALID;
+
+    // Check if the arc is directed right (the target is lexicographically
+    // greater than the source point), or to the left.
+    Alg_kernel         ker;
+    Comparison_result  dir_res = ker.compare_xy_2_object() (this->_source,
+							    this->_target);
+
+    CGAL_assertion (dir_res != EQUAL);
+
+    if (dir_res == SMALLER)
+      this->_info = (this->_info | IS_DIRECTED_RIGHT);
+
+    // Compute the degree of the underlying conic.
+    if (CGAL::sign (this->_r) != ZERO ||
+        CGAL::sign (this->_s) != ZERO ||
+        CGAL::sign (this->_t) != ZERO)
+    {
+      this->_info = (this->_info | DEGREE_2);
+
+      if (this->_orient == COLLINEAR)
+      {
+        this->_info = (this->_info | IS_SPECIAL_SEGMENT);
+
+        if (ker.compare_x_2_object() (this->_source, this->_target) == EQUAL)
+        {
+          // The arc is a vertical segment:
+          this->_info = (this->_info | IS_VERTICAL_SEGMENT);
+        }
+
+        return;
+      }
+    }
+    else
+    {
+      CGAL_assertion (CGAL::sign (this->_u) != ZERO ||
+                      CGAL::sign (this->_v) != ZERO);
+
+      if (CGAL::sign (this->_v) == ZERO)
+      {
+
+        // The supporting curve is of the form: _u*x + _w = 0
+        this->_info = (this->_info | IS_VERTICAL_SEGMENT);
+      }
+
+      this->_info = (this->_info | DEGREE_1);
+
+      return;
+    }
+
+    if (this->_orient == COLLINEAR)
+      return;
+
+    // Compute a midpoint between the source and the target and get the y-value
+    // of the arc at its x-coordiante.
+    Point_2          p_mid = ker.construct_midpoint_2_object() (this->_source,
+                                                                this->_target);
+    Algebraic        ys[2];
+    CGAL_assertion_code(int              n_ys = )
+      _conic_get_y_coordinates (p_mid.x(), ys);
+
+    CGAL_assertion (n_ys != 0);
+
+    // Check which solution lies on the x-monotone arc.
+    Point_2          p_arc_mid (p_mid.x(), ys[0]);
+
+    if (_is_strictly_between_endpoints (p_arc_mid))
+    {
+      // Mark that we should use the -sqrt(disc) root for points on this
+      // x-monotone arc.
+      this->_info = (this->_info & ~PLUS_SQRT_DISC_ROOT);
+    }
+    else
+    {
+      CGAL_assertion (n_ys == 2);
+      p_arc_mid = Point_2 (p_mid.x(), ys[1]);
+
+      CGAL_assertion (_is_strictly_between_endpoints (p_arc_mid));
+
+      // Mark that we should use the +sqrt(disc) root for points on this
+      // x-monotone arc.
+      this->_info = (this->_info | PLUS_SQRT_DISC_ROOT);
+    }
+
+    // Check whether the conic is facing up or facing down:
+    // Check whether the arc (which is x-monotone of degree 2) lies above or
+    // below the segement that contects its two end-points (x1,y1) and (x2,y2).
+    // To do that, we find the y coordinate of a point on the arc whose x
+    // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2.
+    Comparison_result res = ker.compare_y_2_object() (p_arc_mid, p_mid);
+
+    if (res == LARGER)
+    {
+      // The arc is above the connecting segment, so it is facing upwards.
+      this->_info = (this->_info | FACING_UP);
+    }
+    else if (res == SMALLER)
+    {
+      // The arc is below the connecting segment, so it is facing downwards.
+      this->_info = (this->_info | FACING_DOWN);
+    }
+
+    return;
+  }
+
+  /*!
+   * Check if the arc is a special segment connecting two algebraic endpoints
+   * (and has no undelying integer conic coefficients).
+   */
+  bool _is_special_segment () const
+  {
+    return ((this->_info & IS_SPECIAL_SEGMENT) != 0);
+  }
+
+  /*!
+   * Check whether the given point lies on the supporting conic of the arc.
+   * \param px The x-coordinate of query point.
+   * \param py The y-coordinate of query point.
+   * \return (true) if p lies on the supporting conic; (false) otherwise.
+   */
+  bool _is_on_supporting_conic (const Algebraic& px,
+                                const Algebraic& py) const
+  {
+    CGAL::Sign       _sign;
+
+    if (! _is_special_segment())
+    {
+      // Check whether p satisfies the conic equation.
+      // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0.
+      _sign = CGAL::sign ((alg_r*px + alg_t*py + alg_u) * px +
+                          (alg_s*py + alg_v) * py +
+                          alg_w);
+    }
+    else
+    {
+      // Check whether p satisfies the equation of the line stored with the
+      // extra data.
+      _sign = _sign_of_extra_data (px, py);
+    }
+
+    return (_sign == ZERO);
+  }
+
+  /*!
+   * Check whether the two arcs have the same supporting conic.
+   * \param arc The compared arc.
+   * \return (true) if the two supporting conics are the same.
+   */
+  bool _has_same_supporting_conic (const Self& arc) const
+  {
+    // Check if the two arcs originate from the same conic:
+    if (_id == arc._id && _id.is_valid() && arc._id.is_valid())
+      return (true);
+
+    // In case both arcs are collinear, check if they have the same
+    // supporting lines.
+    if (this->_orient == COLLINEAR && arc._orient == COLLINEAR)
+    {
+      // Construct the two supporting lines and compare them.
+      Alg_kernel                             ker;
+      typename Alg_kernel::Construct_line_2  construct_line =
+                                                 ker.construct_line_2_object();
+      typename Alg_kernel::Line_2          l1 = construct_line (this->_source,
+                                                                this->_target);
+      typename Alg_kernel::Line_2          l2 = construct_line (arc._source,
+                                                                arc._target);
+      typename Alg_kernel::Equal_2         equal = ker.equal_2_object();
+
+      if (equal (l1, l2))
+        return (true);
+
+      // Try to compare l1 with the opposite of l2.
+      l2 = construct_line (arc._target, arc._source);
+
+      return (equal (l1, l2));
+    }
+    else if (this->_orient == COLLINEAR || arc._orient == COLLINEAR)
+    {
+      // Only one arc is collinear, so the supporting curves cannot be the
+      // same:
+      return (false);
+    }
+
+    // Check whether the coefficients of the two supporting conics are equal
+    // up to a constant factor.
+    Integer        factor1 = 1;
+    Integer        factor2 = 1;
+
+    if (CGAL::sign (this->_r) != ZERO)
+      factor1 = this->_r;
+    else if (CGAL::sign (this->_s) != ZERO)
+      factor1 = this->_s;
+    else if (CGAL::sign (this->_t) != ZERO)
+      factor1 = this->_t;
+    else if (CGAL::sign (this->_u) != ZERO)
+      factor1 = this->_u;
+    else if (CGAL::sign (this->_v) != ZERO)
+      factor1 = this->_v;
+    else if (CGAL::sign (this->_w) != ZERO)
+      factor1 = this->_w;
+
+    if (CGAL::sign (arc._r) != ZERO)
+      factor2 = arc._r;
+    else if (CGAL::sign (arc._s) != ZERO)
+      factor2 = arc._s;
+    else if (CGAL::sign (arc._t) != ZERO)
+      factor2 = arc._t;
+    else if (CGAL::sign (arc._u) != ZERO)
+
+      factor2 = arc._u;
+    else if (CGAL::sign (arc._v) != ZERO)
+      factor2 = arc._v;
+    else if (CGAL::sign (arc._w) != ZERO)
+      factor2 = arc._w;
+
+    return (CGAL::compare  (this->_r * factor2, arc._r * factor1) == EQUAL &&
+            CGAL::compare  (this->_s * factor2, arc._s * factor1) == EQUAL &&
+            CGAL::compare  (this->_t * factor2, arc._t * factor1) == EQUAL &&
+            CGAL::compare  (this->_u * factor2, arc._u * factor1) == EQUAL &&
+            CGAL::compare  (this->_v * factor2, arc._v * factor1) == EQUAL &&
+            CGAL::compare  (this->_w * factor2, arc._w * factor1) == EQUAL);
+  }
+
+  /*!
+   * Get the i'th order derivative by x of the conic at the point p=(x,y).
+   * \param p The point where we derive.
+   * \param i The order of the derivatives (either 1, 2 or 3).
+   * \param slope_numer The numerator of the slope.
+   * \param slope_denom The denominator of the slope.
+   * \todo Allow higher order derivatives.
+   */
+  void _derive_by_x_at (const Point_2& p, const unsigned int& i,
+                        Algebraic& slope_numer, Algebraic& slope_denom) const
+  {
+    if (_is_special_segment())
+    {
+      // Special treatment for special segments, given by (a*x + b*y + c = 0),
+      // so their first-order derivative by x is simply -a/b. The higher-order
+      // derivatives are all 0.
+      if (i == 1)
+      {
+        if (CGAL::sign (this->_extra_data_P->b) != NEGATIVE)
+        {
+          slope_numer = - this->_extra_data_P->a;
+          slope_denom = this->_extra_data_P->b;
+        }
+        else
+        {
+          slope_numer = this->_extra_data_P->a;
+          slope_denom = - this->_extra_data_P->b;
+        }
+      }
+      else
+      {
+        slope_numer = 0;
+        slope_denom = 1;
+      }
+
+      return;
+    }
+
+    // The derivative by x of the conic
+    //   C: {r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0}
+    // at the point p=(x,y) is given by:
+    //
+    //           2r*x + t*y + u       alpha
+    //   y' = - ---------------- = - -------
+    //           2s*y + t*x + v       beta
+    //
+    const Algebraic  _two = 2;
+    const Algebraic  sl_numer = _two*alg_r*p.x() + alg_t*p.y() + alg_u;
+    const Algebraic  sl_denom = _two*alg_s*p.y() + alg_t*p.x() + alg_v;
+
+    if (i == 1)
+    {
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -sl_numer;
+        slope_denom = sl_denom;
+      }
+      else
+      {
+        slope_numer = sl_numer;
+        slope_denom = -sl_denom;
+      }
+
+      return;
+    }
+
+    // The second-order derivative is given by:
+    //
+    //             s*alpha^2 - t*alpha*beta + r*beta^2     gamma
+    //   y'' = -2 ------------------------------------- = -------
+    //                           beta^3                    delta
+    //
+    const Algebraic  sl2_numer = alg_s * sl_numer*sl_numer -
+                                 alg_t * sl_numer*sl_denom +
+                                 alg_r * sl_denom*sl_denom;
+    const Algebraic  sl2_denom = sl_denom*sl_denom*sl_denom;
+
+    if (i == 2)
+    {
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -_two *sl2_numer;
+        slope_denom = sl2_denom;
+      }
+      else
+      {
+        slope_numer = _two *sl2_numer;
+        slope_denom = -sl2_denom;
+      }
+
+      return;
+    }
+
+    // The third-order derivative is given by:
+    //
+    //              (2s*alpha - t*beta) * gamma
+    //   y''' = -6 ------------------------------
+    //                    beta^2 * delta
+    //
+    const Algebraic  sl3_numer = (_two * alg_s * sl_numer -
+                                  alg_t * sl_denom) * sl2_numer;
+    const Algebraic  sl3_denom = sl_denom*sl_denom * sl2_denom;
+
+    if (i == 3)
+    {
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -6 * sl3_numer;
+        slope_denom = sl3_denom;
+      }
+      else
+      {
+        slope_numer = 6 * sl3_numer;
+        slope_denom = -sl2_denom;
+      }
+
+      return;
+    }
+
+    // \todo Handle higher-order derivatives as well.
+    CGAL_error();
+    return;
+  }
+
+  /*!
+   * Get the i'th order derivative by y of the conic at the point p=(x,y).
+   * \param p The point where we derive.
+   * \param i The order of the derivatives (either 1, 2 or 3).
+   * \param slope_numer The numerator of the slope.
+   * \param slope_denom The denominator of the slope.
+   * \todo Allow higher order derivatives.
+   */
+  void _derive_by_y_at (const Point_2& p, const int& i,
+                        Algebraic& slope_numer, Algebraic& slope_denom) const
+  {
+    if (_is_special_segment())
+    {
+      // Special treatment for special segments, given by (a*x + b*y + c = 0),
+      // so their first-order derivative by x is simply -b/a. The higher-order
+      // derivatives are all 0.
+      if (i == 1)
+      {
+        if (CGAL::sign (this->_extra_data_P->a) != NEGATIVE)
+        {
+          slope_numer = - this->_extra_data_P->b;
+          slope_denom = this->_extra_data_P->a;
+        }
+        else
+        {
+          slope_numer = this->_extra_data_P->b;
+          slope_denom = - this->_extra_data_P->a;
+        }
+      }
+      else
+      {
+        slope_numer = 0;
+        slope_denom = 1;
+      }
+
+      return;
+    }
+
+    // The derivative by y of the conic
+    //   C: {r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0}
+    // at the point p=(x,y) is given by:
+    //
+    //           2s*y + t*x + v     alpha
+    //   x' = - ---------------- = -------
+    //           2r*x + t*y + u      beta
+    //
+    const Algebraic  _two = 2;
+    const Algebraic  sl_numer = _two*alg_s*p.y() + alg_t*p.x() + alg_v;
+    const Algebraic  sl_denom = _two*alg_r*p.x() + alg_t*p.y() + alg_u;
+
+    if (i == 1)
+    {
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -sl_numer;
+        slope_denom = sl_denom;
+      }
+      else
+      {
+        slope_numer = sl_numer;
+        slope_denom = -sl_denom;
+      }
+
+
+      return;
+    }
+
+    // The second-order derivative is given by:
+    //
+    //             r*alpha^2 - t*alpha*beta + s*beta^2
+    //   x'' = -2 -------------------------------------
+    //                           beta^3
+    //
+    const Algebraic  sl2_numer = alg_r * sl_numer*sl_numer -
+                                 alg_t * sl_numer*sl_denom +
+                                 alg_s * sl_denom*sl_denom;
+    const Algebraic  sl2_denom = sl_denom*sl_denom*sl_denom;
+
+    if (i == 2)
+    {
+
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -_two *sl2_numer;
+        slope_denom = sl2_denom;
+      }
+      else
+      {
+        slope_numer = _two *sl2_numer;
+        slope_denom = -sl2_denom;
+      }
+
+      return;
+    }
+
+    // The third-order derivative is given by:
+    //
+    //              (2t*alpha - t*beta) * gamma
+    //   y''' = -6 ------------------------------
+    //                    beta^2 * delta
+    //
+    const Algebraic  sl3_numer = (_two * alg_r * sl_numer -
+                                  alg_t * sl_denom) * sl2_numer;
+    const Algebraic  sl3_denom = sl_denom*sl_denom * sl2_denom;
+
+    if (i == 3)
+    {
+      // Make sure that the denominator is always positive.
+      if (CGAL::sign (sl_denom) != NEGATIVE)
+      {
+        slope_numer = -6 * sl3_numer;
+        slope_denom = sl3_denom;
+      }
+      else
+      {
+        slope_numer = 6 * sl3_numer;
+        slope_denom = -sl2_denom;
+      }
+
+      return;
+    }
+
+    // \todo Handle higher-order derivatives as well.
+    CGAL_error();
+    return;
+  }
+
+  /*!
+   * Compute the overlap with a given arc, which is supposed to have the same
+   * supporting conic curve as this arc.
+   * \param arc The given arc.
+   * \param overlap Output: The overlapping arc (if any).
+   * \return Whether we found an overlap.
+   */
+  bool _compute_overlap (const Self& arc, Self& overlap) const
+  {
+    // Check if the two arcs are identical.
+    if (equals (arc))
+    {
+      overlap = arc;
+      return (true);
+    }
+
+    if (_is_strictly_between_endpoints (arc.left()))
+    {
+      if (_is_strictly_between_endpoints(arc.right()))
+      {
+        // Case 1 - *this:     +----------->
+        //            arc:       +=====>
+        overlap = arc;
+        return (true);
+      }
+      else
+      {
+        // Case 2 - *this:     +----------->
+        //            arc:               +=====>
+        overlap = *this;
+
+        if ((overlap._info & IS_DIRECTED_RIGHT) != 0)
+          overlap._source = arc.left();
+        else
+          overlap._target = arc.left();
+
+        return (true);
+      }
+    }
+    else if (_is_strictly_between_endpoints (arc.right()))
+    {
+      // Case 3 - *this:     +----------->
+      //            arc:   +=====>
+      overlap = *this;
+
+      if ((overlap._info & IS_DIRECTED_RIGHT) != 0)
+        overlap._target = arc.right();
+      else
+        overlap._source = arc.right();
+
+      return (true);
+    }
+    else if (arc._is_between_endpoints (this->_source) &&
+             arc._is_between_endpoints (this->_target) &&
+             (arc._is_strictly_between_endpoints(this->_source) ||
+              arc._is_strictly_between_endpoints(this->_target)))
+    {
+      // Case 4 - *this:     +----------->
+      //            arc:   +================>
+      overlap = *this;
+      return (true);
+    }
+
+    // If we reached here, there are no overlaps:
+    return (false);
+  }
+
+  /*!
+   * Intersect the supporing conic curves of this arc and the given arc.
+   * \param arc The arc to intersect with.
+   * \param inter_list The list of intersection points.
+   */
+  void _intersect_supporting_conics (const Self& arc,
+                                     Intersection_list& inter_list) const
+  {
+    if (_is_special_segment() && ! arc._is_special_segment())
+    {
+      // If one of the arcs is a special segment, make sure it is (arc).
+      arc._intersect_supporting_conics (*this, inter_list);
+      return;
+    }
+
+    const int   deg1 = ((this->_info & DEGREE_MASK) == DEGREE_1) ? 1 : 2;
+    const int   deg2 = ((arc._info & DEGREE_MASK) == DEGREE_1) ? 1 : 2;
+    Nt_traits   nt_traits;
+    Algebraic   xs[4];
+    int         n_xs = 0;
+    Algebraic   ys[4];
+    int         n_ys = 0;
+
+    if (arc._is_special_segment())
+    {
+      // The second arc is a special segment (a*x + b*y + c = 0).
+      if (_is_special_segment())
+      {
+        // Both arc are sepcial segment, so they have at most one intersection
+        // point.
+        Algebraic   denom = this->_extra_data_P->a * arc._extra_data_P->b -
+                            this->_extra_data_P->b * arc._extra_data_P->a;
+
+        if (CGAL::sign (denom) != CGAL::ZERO)
+        {
+          xs[0] = (this->_extra_data_P->b * arc._extra_data_P->c -
+                   this->_extra_data_P->c * arc._extra_data_P->b) / denom;
+          n_xs = 1;
+
+          ys[0] = (this->_extra_data_P->c * arc._extra_data_P->a -
+                   this->_extra_data_P->a * arc._extra_data_P->c) / denom;
+          n_ys = 1;
+        }
+      }
+      else
+      {
+        // Compute the x-coordinates of the intersection points.
+        n_xs = _compute_resultant_roots (nt_traits,
+                                         alg_r, alg_s, alg_t,
+                                         alg_u, alg_v, alg_w,
+                                         deg1,
+                                         arc._extra_data_P->a,
+                                         arc._extra_data_P->b,
+                                         arc._extra_data_P->c,
+                                         xs);
+        CGAL_assertion (n_xs <= 2);
+
+        // Compute the y-coordinates of the intersection points.
+        n_ys = _compute_resultant_roots (nt_traits,
+                                         alg_s, alg_r, alg_t,
+                                         alg_v, alg_u, alg_w,
+                                         deg1,
+                                         arc._extra_data_P->b,
+                                         arc._extra_data_P->a,
+                                         arc._extra_data_P->c,
+                                         ys);
+        CGAL_assertion (n_ys <= 2);
+      }
+    }
+    else
+    {
+      // Compute the x-coordinates of the intersection points.
+      n_xs = _compute_resultant_roots (nt_traits,
+                                       this->_r, this->_s, this->_t,
+                                       this->_u, this->_v, this->_w,
+                                       deg1,
+                                       arc._r, arc._s, arc._t,
+                                       arc._u, arc._v, arc._w,
+                                       deg2,
+                                       xs);
+      CGAL_assertion (n_xs <= 4);
+
+      // Compute the y-coordinates of the intersection points.
+      n_ys = _compute_resultant_roots (nt_traits,
+                                       this->_s, this->_r, this->_t,
+                                       this->_v, this->_u, this->_w,
+                                       deg1,
+                                       arc._s, arc._r, arc._t,
+                                       arc._v, arc._u, arc._w,
+                                       deg2,
+                                       ys);
+      CGAL_assertion (n_ys <= 4);
+    }
+
+    // Pair the coordinates of the intersection points. As the vectors of
+    // x and y-coordinates are sorted in ascending order, we output the
+    // intersection points in lexicographically ascending order.
+    unsigned int  mult;
+    int   i, j;
+
+    if (arc._is_special_segment())
+    {
+      if (n_xs == 0 || n_ys == 0)
+        return;
+
+      if (n_xs == 1 && n_ys == 1)
+      {
+        // Single intersection.
+        Conic_point_2         ip (xs[0], ys[0]);
+
+        ip.set_generating_conic (_id);
+        ip.set_generating_conic (arc._id);
+
+        // In case the other curve is of degree 2, this is a tangency point.
+        mult = (deg1 == 1 || _is_special_segment()) ? 1 : 2;
+        inter_list.push_back (Intersection_point_2 (ip, mult));
+      }
+      else if (n_xs == 1 && n_ys == 2)
+      {
+        Conic_point_2         ip1 (xs[0], ys[0]);
+
+        ip1.set_generating_conic (_id);
+        ip1.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip1, 1));
+
+        Conic_point_2         ip2 (xs[0], ys[1]);
+
+        ip2.set_generating_conic (_id);
+        ip2.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip2, 1));
+      }
+      else if (n_xs == 2 && n_ys == 1)
+      {
+        Conic_point_2         ip1 (xs[0], ys[0]);
+
+        ip1.set_generating_conic (_id);
+        ip1.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip1, 1));
+
+        Conic_point_2         ip2 (xs[1], ys[0]);
+
+        ip2.set_generating_conic (_id);
+        ip2.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip2, 1));
+
+      }
+      else
+      {
+        CGAL_assertion (n_xs == 2 && n_ys == 2);
+
+        // The x-coordinates and the y-coordinates are given in ascending
+        // order. If the slope of the segment is positive, we pair the
+        // coordinates as is - otherwise, we swap the pairs.
+        int                   ind_first_y = 0, ind_second_y = 1;
+
+        if (CGAL::sign (arc._extra_data_P->b) ==
+            CGAL::sign(arc._extra_data_P->a))
+        {
+          ind_first_y = 1;
+          ind_second_y = 0;
+        }
+
+        Conic_point_2         ip1 (xs[0], ys[ind_first_y]);
+
+        ip1.set_generating_conic (_id);
+        ip1.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip1, 1));
+
+        Conic_point_2         ip2 (xs[1], ys[ind_second_y]);
+
+        ip2.set_generating_conic (_id);
+        ip2.set_generating_conic (arc._id);
+
+        inter_list.push_back (Intersection_point_2 (ip2, 1));
+      }
+
+      return;
+    }
+
+    for (i = 0; i < n_xs; i++)
+    {
+      for (j = 0; j < n_ys; j++)
+      {
+        if (_is_on_supporting_conic (xs[i], ys[j]) &&
+            arc._is_on_supporting_conic (xs[i], ys[j]))
+        {
+          // Create the intersection point and set its generating conics.
+          Conic_point_2         ip (xs[i], ys[j]);
+
+          ip.set_generating_conic (_id);
+          ip.set_generating_conic (arc._id);
+
+          // Compute the multiplicity of the intersection point.
+          if (deg1 == 1 && deg2 == 1)
+            mult = 1;
+          else
+            mult = _multiplicity_of_intersection_point (arc, ip);
+
+          // Insert the intersection point to the output list.
+          inter_list.push_back (Intersection_point_2 (ip, mult));
+        }
+      }
+    }
+
+    return;
+  }
+
+  /*!
+   * Compute the multiplicity of an intersection point.
+   * \param arc The arc to intersect with.
+   * \param p The intersection point.
+   * \return The multiplicity of the intersection point.
+   */
+  unsigned int _multiplicity_of_intersection_point (const Self& arc,
+                                                    const Point_2& p) const
+  {
+    CGAL_assertion (! _is_special_segment() || ! arc._is_special_segment());
+
+    // Compare the slopes of the two arcs at p, using their first-order
+    // partial derivatives.
+    Algebraic      slope1_numer, slope1_denom;
+    Algebraic      slope2_numer, slope2_denom;
+
+    _derive_by_x_at (p, 1, slope1_numer, slope1_denom);
+    arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom);
+
+    if (CGAL::compare (slope1_numer*slope2_denom,
+                       slope2_numer*slope1_denom) != EQUAL)
+    {
+      // Different slopes at p - the mutiplicity of p is 1:
+      return (1);
+    }
+
+    if (CGAL::sign (slope1_denom) != ZERO &&
+        CGAL::sign (slope2_denom) != ZERO)
+    {
+      // The curves do not have a vertical slope at p.
+      // Compare their second-order derivative by x:
+      _derive_by_x_at (p, 2, slope1_numer, slope1_denom);
+      arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom);
+    }
+    else
+    {
+      // Both curves have a vertical slope at p.
+      // Compare their second-order derivative by y:
+      _derive_by_y_at (p, 2, slope1_numer, slope1_denom);
+      arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom);
+    }
+
+    if (CGAL::compare (slope1_numer*slope2_denom,
+                       slope2_numer*slope1_denom) != EQUAL)
+    {
+      // Different curvatures at p - the mutiplicity of p is 2:
+      return (2);
+    }
+
+    // If we reached here, the multiplicity of the intersection point is 3:
+    return (3);
+  }
+  //@}
+
+};
+
+/*!
+ * Exporter for x-monotone conic arcs.
+ */
+template <class Conic_arc_2>
+std::ostream& operator<< (std::ostream& os,
+                          const _Conic_x_monotone_arc_2<Conic_arc_2>& arc)
+{
+  // Output the supporting conic curve.
+  os << "{" << CGAL::to_double(arc.r()) << "*x^2 + "
+     << CGAL::to_double(arc.s()) << "*y^2 + "
+     << CGAL::to_double(arc.t()) << "*xy + "
+     << CGAL::to_double(arc.u()) << "*x + "
+     << CGAL::to_double(arc.v()) << "*y + "
+     << CGAL::to_double(arc.w()) << "}";
+
+  // Output the endpoints.
+  os << " : (" << CGAL::to_double(arc.source().x()) << ","
+     << CGAL::to_double(arc.source().y()) << ") ";
+
+  if (arc.orientation() == CLOCKWISE)
+    os << "--cw-->";
+  else if (arc.orientation() == COUNTERCLOCKWISE)
+    os << "--ccw-->";
+  else
+    os << "--l-->";
+
+  os << " (" << CGAL::to_double(arc.target().x()) << ","
+     << CGAL::to_double(arc.target().y()) << ")";
+
+  return (os);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Curve_data_aux.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Curve_data_aux.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Curve_data_aux.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Curve_data_aux.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h
new file mode 100644
index 0000000..6155737
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2016 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel <efifogel at gmail.com>
+
+#ifndef CGAL_POLYCURVE_2_IOSTREAM_H
+#define CGAL_POLYCURVE_2_IOSTREAM_H
+
+#include <iostream>
+
+#include <CGAL/basic.h>
+#include <CGAL/Arr_geometry_traits/Polycurve_2.h>
+#include <CGAL/Arr_segment_traits_2.h>
+
+namespace CGAL {
+namespace internal {
+
+/*! Output operator for a polyline. */
+template <typename OutputStream, typename SubcurveType_2, typename PointType_2>
+void write_polyline(OutputStream& os,
+                    const Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+  typedef Polycurve_2<Subcurve_type_2, Point_type_2>    Curve_2;
+
+  os << xcv.number_of_subcurves();       // export the number of points.
+
+  // Write the points.
+  typename Curve_2::Point_const_iterator it = xcv.points_begin();
+  while (it != xcv.points_end()) os << " " << *it++;
+}
+
+/*! Output operator for a polyline of type CGAL::Arr_segment_2<Kernel_>. */
+template <typename OutputStream, typename Kernel_, typename PointType_2>
+void write_polycurve(OutputStream& os,
+                     const Polycurve_2<CGAL::Arr_segment_2<Kernel_>, PointType_2>& xcv)
+{ write_polyline(os, xcv); }
+
+/*! Output operator for a polyline of type CGAL::Segment_2<Kernel_>. */
+template <typename OutputStream, typename Kernel_, typename PointType_2>
+void write_polycurve(OutputStream& os,
+                     const Polycurve_2<CGAL::Segment_2<Kernel_>, PointType_2>& xcv)
+{ write_polyline(os, xcv); }
+
+/*! Output operator for a polycurve. */
+template <typename OutputStream, typename SubcurveType_2, typename PointType_2>
+void write_polycurve(OutputStream& os,
+                     const Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+  typedef Polycurve_2<Subcurve_type_2, Point_type_2>    Curve_2;
+
+  os << xcv.number_of_subcurves();       // export the number of subcurves.
+
+  // Write the subcurves.
+  typename Curve_2::Subcurve_const_iterator it = xcv.subcurves_begin();
+  while (it != xcv.subcurves_end()) os << " " << *it++;
+}
+
+/*! Output operator for a polycurve. */
+template <typename OutputStream, typename SubcurveType_2, typename PointType_2>
+OutputStream& operator<<(OutputStream& os,
+                         const Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  write_polycurve(os, xcv);
+  return os;
+}
+
+/*! Input operator for a polyline. */
+template <typename InputStream, typename SubcurveType_2, typename PointType_2>
+void read_polyline(InputStream& is,
+                   Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+  typedef Polycurve_2<Subcurve_type_2, Point_type_2>    Curve_2;
+
+  std::size_t num;              // read the number of points.
+  is >> num;
+  if (0 == num) return;
+
+  Point_type_2 ps;
+  is >> ps;
+  if (1 == num) {
+    xcv = Curve_2(Subcurve_type_2(ps, ps));
+    return;
+  }
+
+  // Read the points.
+  Point_type_2 pt;
+  Point_type_2* ps_p = &ps;
+  Point_type_2* pt_p = &pt;
+  std::list<Subcurve_type_2> subcurves;
+  for (std::size_t i = 1; i < num; ++i) {
+    is >> *pt_p;
+    subcurves.push_back(Subcurve_type_2(*ps_p, *pt_p));
+    std::swap(ps_p, pt_p);
+  }
+
+  xcv = Curve_2(subcurves.begin(), subcurves.end());    // create the polycurve
+}
+
+/*! Input operator for a polyline of type CGAL::Arr_segment_2<Kernel_>. */
+template <typename InputStream, typename Kernel_, typename PointType_2>
+void read_polycurve(InputStream& is,
+                    Polycurve_2<CGAL::Arr_segment_2<Kernel_>, PointType_2>& xcv)
+{ read_polyline(is, xcv); }
+
+/*! Input operator for a polyline of type CGAL::Segment_2<Kernel_>. */
+template <typename InputStream, typename Kernel_, typename PointType_2>
+void read_polycurve(InputStream& is,
+                    Polycurve_2<CGAL::Segment_2<Kernel_>, PointType_2>& xcv)
+{ read_polyline(is, xcv); }
+
+/*! Input operator for a polycurve. */
+template <typename InputStream, typename SubcurveType_2, typename PointType_2>
+void read_polycurve(InputStream& is,
+                    Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+  typedef Polycurve_2<Subcurve_type_2, Point_type_2>    Curve_2;
+
+  std::size_t num;                      // read the number of subcurves.
+  is >> num;
+
+  // Read the subcurves.
+  std::list<Subcurve_type_2> subcurves;
+  for (std::size_t i = 0; i < num; ++i) {
+    Subcurve_type_2 subcurve;
+    is >> subcurve;
+    subcurves.push_back(subcurve);
+  }
+
+  xcv = Curve_2(subcurves.begin(), subcurves.end());    // create the polycurve
+}
+
+/*! Input operator for a polycurve. */
+template <typename InputStream, typename SubcurveType_2, typename PointType_2>
+InputStream& operator>>(InputStream& is,
+                        Polycurve_2<SubcurveType_2, PointType_2>& xcv)
+{
+  read_polycurve(is, xcv);
+  return is;
+}
+
+}
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polycurve_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polycurve_2.h
new file mode 100644
index 0000000..12c8c13
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polycurve_2.h
@@ -0,0 +1,465 @@
+// Copyright (c) 2009,2010,2011,2015 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein  <wein at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+//                 Dror Atariah <dror.atariah at fu-berlin.de>
+
+#ifndef CGAL_POLYCURVE_2_H
+#define CGAL_POLYCURVE_2_H
+
+/*! \file
+ * Header file for the polyline classes used by the
+ * Arr_polycurve_basic_traits_2, Arr_polycurve_traits_2, and
+ * Arr_polyline_traits_2 classes.
+ */
+
+#include <list>
+#include <vector>
+#include <iterator>
+#include <limits>
+
+#include <CGAL/Bbox_2.h>
+
+namespace CGAL {
+
+namespace internal {
+
+/*! \class
+ * Representation of a polycurve.
+ */
+template <typename SubcurveType_2, typename PointType_2>
+class Polycurve_2 {
+public:
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+
+protected:
+  // The subcurves that comprise the poyline:
+  typedef typename std::vector<Subcurve_type_2>         Subcurves_container;
+
+  Subcurves_container m_subcurves;
+
+public:
+  typedef typename Subcurves_container::size_type       Size;
+  typedef typename Subcurves_container::size_type       size_type;
+
+  /*! Construct default. */
+  Polycurve_2() : m_subcurves() {}
+
+  /*! Construct from a subcurve. */
+  Polycurve_2(const Subcurve_type_2& seg) : m_subcurves()
+  { m_subcurves.push_back(seg); }
+
+  /* Roadmap:
+   * - Currently construction from points is marked as deprecated.
+   *   For the sake of backwards compatibility, it is not removed yet.
+   * - In the next release, construction from points will be removed.
+   * - Then, the remaining construction from subcurves will become private
+   *   in this class as construction is provided by the traits.
+   *   Furthermore, the polycurve traits class will become a friend of
+   *   this class.
+   */
+
+  /*! Construct from a range. The range can be either:
+   *
+   * For the sake of backwards compatibility we have to keep the possibility
+   * of construction from a range of points. Therefore, we have to test the
+   * type of the elements of the range again.
+   * Since ultimately the construction from points will be deprecated, the
+   * actual constructor that we implemented which handles a range of point
+   * is already deprecated and SHOULD NOT BE USED.
+   *
+   * If you want to construct a polycurve from a range of points, use the
+   * construction functors from the traits class.
+   *
+   * - Range of points, and the polycurve is defined by the order of the
+   *   points.
+   * - Range of linear object. The polycurve is the sequence of linear
+   *   objects.
+   * \param begin An iterator pointing to the first point in the range.
+   * \param end An iterator pointing after the last point in the range.
+   * \pre Depends on the range's content. See the implementations for
+   *      further details.
+   */
+  template <typename InputIterator>
+  Polycurve_2(InputIterator begin, InputIterator end) :
+    m_subcurves()
+  {
+    typedef typename std::iterator_traits<InputIterator>::value_type VT;
+    typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
+    construct_polycurve(begin, end, Is_point());
+  }
+
+  /*! Construct a polycurve from a range of subcurves.
+   * \param begin An iterator pointing to the first subcurve in the range.
+   * \param end An iterator pointing after the past-the-end subcurve
+   *        in the range.
+   * \pre The end of subcurve n should be the beginning of subcurve n+1.
+   */
+  template <typename InputIterator>
+  void construct_polycurve(InputIterator begin, InputIterator end,
+                          boost::false_type)
+  { m_subcurves.assign(begin, end); }
+
+  /*! Construct a polycurve from a range of points.
+   * \param begin An iterator pointing to the first point in the range.
+   * \param end An iterator pointing after the last point in the range.
+   * \pre There are at least 2 points in the range.
+   *      In other cases, an empty polycurve will be created.
+   */
+  template <typename InputIterator>
+  CGAL_DEPRECATED void construct_polycurve(InputIterator begin,
+                                          InputIterator end,
+                                          boost::true_type)
+  {
+    // Check if there are no points in the range:
+    InputIterator ps = begin;
+    if (ps == end) return;
+
+    InputIterator pt = ps;
+    ++pt;
+
+    // The range contains only one point. A degenerated polycurve is
+    // constructed.
+    // With one degenerated subcurve, where source=target.
+    if (pt == end) {
+      m_subcurves.push_back(Subcurve_type_2(*ps, *ps));
+      return;
+    }
+
+    // Construct a subcurve from each to adjacent points.
+    // The container has to contain at least two points.
+    while (pt != end) {
+      m_subcurves.push_back(Subcurve_type_2(*ps, *pt));
+      ++ps;
+      ++pt;
+    }
+  }
+
+  /* Roadmap: Make this private in the next version (after the traits
+   *          becomes friendly...)
+   */
+
+  /*! Append a subcurve to the (x-monotone) polycurve.
+   * Warning: This is a risky function! Don't use it! Prefer the
+   *          provided implementation in the traits class.
+   * \param seg The new subcurve to be appended to the polycurve.
+   * \pre If the polycurve is not empty, seg source must be the
+   *      same as the target point of the last subcurve in the polycurve.
+   */
+  inline void push_back(const Subcurve_type_2& seg)
+  { this->m_subcurves.push_back(seg); }
+
+  /*! Append a subcurve to the (x-monotone) polycurve.
+   * Warning: This is a risky function! Don't use it! Prefer the
+   *          provided implementation in the traits class.
+   * \param seg The new subcurve to be appended to the polycurve.
+   * \pre If the polycurve is not empty, seg source must be the
+   *      same as the target point of the last subcurve in the polycurve.
+   */
+  inline void push_front(const Subcurve_type_2& seg)
+  { this->m_subcurves.insert(this->m_subcurves.begin(), seg); }
+
+  /*! Append a point to the polycurve.
+   * To properly implemented this function the traits class is needed,
+   * thus it is deprecated.
+   */
+  CGAL_DEPRECATED void push_back(const Point_type_2& p)
+  {
+    CGAL_assertion(!m_subcurves.empty());
+    Point_type_2 pt = p;
+    Point_type_2 ps = m_subcurves.back().target();
+    m_subcurves.push_back(Subcurve_type_2(ps, pt));
+  }
+
+  /*! Compute the bounding box of the polycurve.
+   * \return The bounding-box.
+   */
+  Bbox_2 bbox() const
+  {
+    // Compute the union of the bounding boxes of all subcurves.
+    size_type n = this->number_of_subcurves();
+    Bbox_2 bbox;
+    for (std::size_t i = 0; i < n; ++i)
+      bbox = (i > 0) ? (bbox + (*this)[i].bbox()) : (*this)[i].bbox();
+    return bbox;
+  }
+
+  class Point_const_iterator;
+  friend class Point_const_iterator;
+  typedef std::reverse_iterator<Point_const_iterator>
+    Point_const_reverse_iterator;
+
+  /*! An iterator for the polycurve points. */
+  class Point_const_iterator {
+  public:
+    // Type definitions:
+    typedef std::bidirectional_iterator_tag     iterator_category;
+    typedef Point_type_2                        value_type;
+    typedef std::ptrdiff_t                      difference_type;
+    typedef size_t                              size_type;
+    typedef const value_type&                   reference;
+    typedef const value_type*                   pointer;
+
+  private:
+    // The polycurve curve.
+    const Polycurve_2<Subcurve_type_2, Point_type_2>* m_cvP;
+    size_type m_num_pts;                        // Its number of points.
+    size_type m_index;                          // The current point.
+
+    /*! Private constructor.
+     * \param cv The scanned curve.
+     * \param index The index of the subcurve.
+     */
+    Point_const_iterator(const Polycurve_2<Subcurve_type_2, Point_type_2>* cvP,
+                         size_type index) :
+      m_cvP(cvP),
+      m_index(index)
+    {
+      m_num_pts = (m_cvP == NULL) ? 0 :
+        ((m_cvP->number_of_subcurves() == 0) ?
+         0 : (m_cvP->number_of_subcurves() + 1));
+    }
+
+    bool is_index_valid() const
+    { return m_index != std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+
+  public:
+    /*! Default constructor. */
+    Point_const_iterator() :
+      m_cvP(NULL),
+      m_num_pts(0),
+      m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
+    {}
+
+    /*! Dereference operator.
+     * \return The current point.
+     */
+    const Point_type_2& operator*() const
+    {
+      CGAL_assertion(m_cvP != NULL);
+      CGAL_assertion((is_index_valid()) && (m_index < m_num_pts));
+
+      // First point is the source of the first subcurve.
+      // Else return the target of the(i-1)'st subcurve.
+      if (m_index == 0) return ((*m_cvP)[0]).source();
+      else return ((*m_cvP)[m_index - 1]).target();
+    }
+
+    /*! Arrow operator.
+     * \return A pointer to the current point.
+     */
+    const Point_type_2* operator->() const { return (&(this->operator* ())); }
+
+    /*! Increment operators. */
+    Point_const_iterator& operator++()
+    {
+      if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
+      return (*this);
+    }
+
+    Point_const_iterator operator++(int)
+    {
+      Point_const_iterator temp = *this;
+      if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
+      return temp;
+    }
+
+    /*! Decrement operators. */
+    Point_const_iterator& operator--()
+    {
+      if ((m_cvP != NULL) && (is_index_valid())) --m_index;
+      return (*this);
+    }
+
+    Point_const_iterator operator--(int)
+    {
+      Point_const_iterator temp = *this;
+      if ((m_cvP != NULL) && (is_index_valid())) --m_index;
+      return temp;
+    }
+
+    /*! Equality operators. */
+    bool operator==(const Point_const_iterator& it) const
+    { return ((m_cvP == it.m_cvP) && (m_index == it.m_index)); }
+
+    bool operator!=(const Point_const_iterator& it) const
+    { return ((m_cvP != it.m_cvP) || (m_index != it.m_index)); }
+
+    friend class Polycurve_2<Subcurve_type_2, Point_type_2>;
+  };
+
+  // Backward compatibility
+  typedef Point_const_iterator                  const_iterator;
+  typedef Point_const_reverse_iterator          const_reverse_iterator;
+
+  /*! Obtain an iterator for the polycurve points.*/
+  Point_const_iterator points_begin() const
+  {
+    if (number_of_subcurves() == 0) return (Point_const_iterator());
+    else return (Point_const_iterator(this, 0));
+  }
+
+  /*! Obtain an iterator for the polycurve points.*/
+  CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); }
+
+  /*! Obtain a past-the-end iterator for the polycurve points.*/
+  Point_const_iterator points_end() const
+  {
+    if (number_of_subcurves() == 0) return (Point_const_iterator());
+    else return (Point_const_iterator(this, number_of_subcurves() + 1));
+  }
+
+  /*! Obtain a past-the-end iterator for the polycurve points.*/
+  CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); }
+
+  /*! Obtain a reverse iterator for the polycurve points. */
+  Point_const_reverse_iterator points_rbegin() const
+  { return Point_const_reverse_iterator(points_end()); }
+
+  /*! Obtain a reverse iterator for the polycurve points. */
+  CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const
+  { return points_rbegin(); }
+
+  /*! Obtain a reverse past-the-end iterator for the polycurve points. */
+  Point_const_reverse_iterator points_rend() const
+  { return Point_const_reverse_iterator(points_begin()); }
+
+  /*! Obtain a reverse past-the-end iterator for the polycurve points. */
+  CGAL_DEPRECATED Point_const_reverse_iterator rend() const
+  { return points_rend(); }
+
+  typedef typename Subcurves_container::iterator Subcurve_iterator;
+  typedef typename Subcurves_container::const_iterator
+                                                 Subcurve_const_iterator;
+  typedef typename std::reverse_iterator<Subcurve_const_iterator>
+                                                 Subcurve_const_reverse_iterator;
+
+  /*! Obtain an iterator for the polycurve subcurves. */
+  Subcurve_const_iterator subcurves_begin() const
+  { return m_subcurves.begin(); }
+
+  /*! Deprecated! */
+  CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const
+  { return subcurves_begin(); }
+
+  /*! Obtain a past-the-end iterator for the polycurve subcurves. */
+  Subcurve_const_iterator subcurves_end() const
+  { return m_subcurves.end(); }
+
+  /*! Deprecated! */
+  CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const
+  { return subcurves_end(); }
+
+  /*! Obtain a reverse iterator for the polycurve subcurves. */
+  Subcurve_const_reverse_iterator subcurves_rbegin() const
+  { return (Subcurve_const_reverse_iterator(subcurves_end())); }
+
+  /*! Obtain a reverse past-the-end iterator for the polycurve points. */
+  Subcurve_const_reverse_iterator subcurves_rend() const
+  { return (Subcurve_const_reverse_iterator(subcurves_begin())); }
+
+  /*! Deprecated!
+   * Obtain the number of points contained in the polycurve.
+   * In general (for example if the polycurve is not bounded), then the
+   * number of vertices cannot be read-off from the number of subcurves, and
+   * the traits class is needed.
+   * \return The number of points.
+   */
+  CGAL_DEPRECATED std::size_t points() const
+  { return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; }
+
+  /*! Obtain the number of subcurves that comprise the poyline.
+   * \return The number of subcurves.
+   */
+  size_type number_of_subcurves() const
+  { return m_subcurves.size(); }
+
+  /*! Deprecated! Replaced by number_of_subcurves(). */
+  CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); }
+
+  /*! Obtain the ith subcurve of the polycurve.
+   * \param[in] i The subcurve index(from 0 to size()-1).
+   * \return A const reference to the subcurve.
+   */
+  inline const Subcurve_type_2& operator[](const std::size_t i) const
+  {
+    CGAL_assertion(i < number_of_subcurves());
+    return (m_subcurves[i]);
+  }
+
+  /*! Clear the polycurve. */
+  inline void clear() { m_subcurves.clear(); }
+};
+
+/*! \class
+ * Representation of an x-monotone polycurve.
+ * An x-monotone polycurve is always directed from left to right.
+ */
+template <typename SubcurveType_2, typename PointType_2>
+class X_monotone_polycurve_2 :
+    public Polycurve_2<SubcurveType_2, PointType_2>
+{
+public:
+  typedef SubcurveType_2                             Subcurve_type_2;
+  typedef PointType_2                                Point_type_2;
+
+  typedef Polycurve_2<Subcurve_type_2, Point_type_2> Base;
+
+  /*! Construct default. */
+  X_monotone_polycurve_2() : Base() {}
+
+  /*! Construct from a subcurve. */
+  X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {}
+
+  /*! Construct from a range.
+   * Similar to the constructor of a general polycurve.
+   * Like in the case of general polycurve, for the sake of backwards
+   * compatibility we have to keep an implementation of construction
+   * from a range of points. DO NOT USE THIS CONSTRUCTION.
+   */
+  template <typename InputIterator>
+  X_monotone_polycurve_2(InputIterator begin, InputIterator end) :
+    Base(begin, end)
+  {
+    typedef typename std::iterator_traits<InputIterator>::value_type VT;
+    typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
+    construct_x_monotone_polycurve(begin, end, Is_point());
+  }
+
+  /*! Construct from a range of subcurves.
+   * This constructor is expected to be called only from the
+   * traits class, after the input was verified there.
+   * \pre The range of subcurves form an x-monotone polycurve.
+   */
+  template <typename InputIterator>
+  void construct_x_monotone_polycurve(InputIterator, InputIterator,
+                                      boost::false_type)
+  {}
+
+  /*! Construct from a range of points, defining the endpoints of the
+   * polycurve subcurves.
+   */
+  template <typename InputIterator>
+  CGAL_DEPRECATED void construct_x_monotone_polycurve(InputIterator,
+                                                     InputIterator,
+                                                     boost::true_type)
+  {}
+};
+
+} // namespace polycurve
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polyline_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polyline_2.h
new file mode 100644
index 0000000..8f5070b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Polyline_2.h
@@ -0,0 +1,145 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_POLYLINE_2_H
+#define CGAL_ARR_POLYLINE_2_H
+
+/*! \file
+ * Header file for the polyline classes used by the
+ * Arr_polycurve_basic_traits_2, Arr_polycurve_traits_2, and
+ * Arr_polyline_traits_2 classes.
+ */
+
+#if (defined __GNUC__)
+  #warning Polyline_2.h is DEPRECATED, please include Polycurve_2.h instead
+#elif (defined _MSC_VER)
+  #pragma message("Polyline_2.h is DEPRECATED, please include Polycurve_2.h instead")
+#endif
+
+#include <CGAL/Arr_geometry_traits/Polycurve_2.h>
+
+namespace CGAL {
+
+namespace polyline {
+
+template <typename SubcurveType_2, typename PointType_2>
+class Polyline_2 : public internal::Polycurve_2<SubcurveType_2, PointType_2> {
+public:
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+
+  typedef internal::Polycurve_2<Subcurve_type_2, Point_type_2> Base;
+
+  typedef typename Base::Subcurve_type_2                Segment_type_2;
+  typedef typename Base::size_type                      Segments_size_type;
+  typedef typename Base::Subcurve_iterator              Segment_iterator;
+  typedef typename Base::Subcurve_const_iterator        Segment_const_iterator;
+  typedef typename Base::Subcurve_const_reverse_iterator
+    Segment_const_reverse_iterator;
+
+  /*! Construct default. */
+  Polyline_2() : Base() {}
+
+  /*! Construct from a subcurve. */
+  Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {}
+
+  /*! Construct from a range. */
+  template <typename InputIterator>
+  Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {}
+
+  /*! Obtain an iterator for the polycurve subcurves. */
+  Segment_const_iterator begin_segments() const
+  { return this->subcurves_begin(); }
+
+  /*! Obtain a past-the-end iterator for the polycurve subcurves. */
+  Segment_const_iterator end_segments() const
+  { return this->subcurves_end(); }
+
+  /*! Obtain a reverse iterator for the polycurve subcurves. */
+  Segment_const_reverse_iterator rbegin_segments() const
+  { return this->subcurves_rbegin(); }
+
+  /*! Obtain a reverse past-the-end iterator for the polycurve points. */
+  Segment_const_reverse_iterator rend_segments() const
+  { return this->subcurves_rend() ; }
+
+  /*! Obtain the number of subcurves that comprise the poyline.
+   * \return The number of subcurves.
+   */
+  Segments_size_type number_of_segments() const
+  { return this->number_of_subcurves(); }
+};
+
+template <typename SubcurveType_2, typename PointType_2>
+class X_monotone_polyline_2 :
+    public internal::X_monotone_polycurve_2<SubcurveType_2, PointType_2> {
+public:
+  typedef SubcurveType_2                                Subcurve_type_2;
+  typedef PointType_2                                   Point_type_2;
+
+  typedef internal::X_monotone_polycurve_2<Subcurve_type_2, Point_type_2> Base;
+
+  typedef typename Base::Subcurve_type_2                Segment_type_2;
+  typedef typename Base::size_type                      Segments_size_type;
+  typedef typename Base::Subcurve_iterator              Segment_iterator;
+  typedef typename Base::Subcurve_const_iterator        Segment_const_iterator;
+  typedef typename Base::Subcurve_const_reverse_iterator
+    Segment_const_reverse_iterator;
+
+  /*! Construct default. */
+  X_monotone_polyline_2() : Base() {}
+
+  /*! Construct from a subcurve. */
+  X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {}
+
+  /*! Construct from a range.
+   * Similar to the constructor of a general polycurve.
+   * Like in the case of general polycurve, for the sake of backwards
+   * compatibility we have to keep an implementation of construction
+   * from a range of points. DO NOT USE THIS CONSTRUCTION.
+   */
+  template <typename InputIterator>
+  X_monotone_polyline_2(InputIterator begin, InputIterator end) :
+    Base(begin, end)
+  {}
+
+  /*! Obtain an iterator for the polycurve subcurves. */
+  Segment_const_iterator begin_segments() const
+  { return this->subcurves_begin(); }
+
+  /*! Obtain a past-the-end iterator for the polycurve subcurves. */
+  Segment_const_iterator end_segments() const
+  { return this->subcurves_end(); }
+
+  /*! Obtain a reverse iterator for the polycurve subcurves. */
+  Segment_const_reverse_iterator rbegin_segments() const
+  { return this->subcurves_rbegin(); }
+
+  /*! Obtain a reverse past-the-end iterator for the polycurve points. */
+  Segment_const_reverse_iterator rend_segments() const
+  { return this->subcurves_rend() ; }
+
+  /*! Obtain the number of subcurves that comprise the poyline.
+   * \return The number of subcurves.
+   */
+  Segments_size_type number_of_segments() const
+  { return this->number_of_subcurves(); }
+};
+
+} // namespace polyline
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Rational_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Rational_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Rational_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Segment_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Segment_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/Segment_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/Segment_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_landmarks_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_landmarks_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_landmarks_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_landmarks_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_line_arc_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_line_arc_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_line_arc_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_line_arc_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_linear_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_linear_traits_2.h
new file mode 100644
index 0000000..847b048
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_linear_traits_2.h
@@ -0,0 +1,2025 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+//               : Waqar Khan        <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_LINEAR_TRAITS_2_H
+#define CGAL_ARR_LINEAR_TRAITS_2_H
+
+/*! \file
+ * The traits-class for handling linear objects (lines, rays and segments)
+ * in the arrangement package.
+ */
+
+#include <CGAL/tags.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
+#include <fstream>
+
+namespace CGAL {
+
+template <class Kernel_> class Arr_linear_object_2;
+
+/*! \class
+ * A traits class for maintaining an arrangement of linear objects (lines,
+ * rays and segments), aoviding cascading of computations as much as possible.
+ */
+template <class Kernel_>
+class Arr_linear_traits_2 : public Kernel_ {
+  friend class Arr_linear_object_2<Kernel_>;
+
+public:
+
+  typedef Kernel_                         Kernel;
+  typedef typename Kernel::FT             FT;
+
+  typedef typename Algebraic_structure_traits<FT>::Is_exact
+                                          Has_exact_division;
+
+  // Category tags:
+  typedef Tag_true                        Has_left_category;
+  typedef Tag_true                        Has_merge_category;
+  typedef Tag_false                       Has_do_intersect_category;
+
+  typedef Arr_open_side_tag               Left_side_category;
+  typedef Arr_open_side_tag               Bottom_side_category;
+  typedef Arr_open_side_tag               Top_side_category;
+  typedef Arr_open_side_tag               Right_side_category;
+
+  typedef typename Kernel::Line_2         Line_2;
+  typedef typename Kernel::Ray_2          Ray_2;
+  typedef typename Kernel::Segment_2      Segment_2;
+
+  typedef CGAL::Segment_assertions<Arr_linear_traits_2<Kernel> >
+                                          Segment_assertions;
+
+  /*!
+   * \class Representation of a linear with cached data.
+   */
+  class _Linear_object_cached_2
+  {
+  public:
+
+    typedef typename Kernel::Line_2                Line_2;
+    typedef typename Kernel::Ray_2                 Ray_2;
+    typedef typename Kernel::Segment_2             Segment_2;
+    typedef typename Kernel::Point_2               Point_2;
+
+  protected:
+
+    Line_2    l;                // The supporting line.
+    Point_2   ps;               // The source point (if exists).
+    Point_2   pt;               // The target point (if exists).
+    bool      has_source;       // Is the source point valid
+                                // (false for a line).
+    bool      has_target;       // Is the target point valid
+                                // (false for a line and for a ray).
+    bool      is_right;         // Is the object directed to the right
+                                // (for segments and rays).
+    bool      is_vert;          // Is this a vertical object.
+    bool      is_horiz;         // Is this a horizontal object.
+    bool      has_pos_slope;    // Does the supporting line has a positive
+                                // slope (if all three flags is_vert, is_horiz
+                                // and has_pos_slope are false, then the line
+                                // has a negative slope).
+    bool      is_degen;         // Is the object degenerate (a single point).
+
+  public:
+
+    /*!
+     * Default constructor.
+     */
+    _Linear_object_cached_2 () :
+      has_source (true),
+      has_target (true),
+      is_vert (false),
+      is_horiz (false),
+      has_pos_slope (false),
+      is_degen (true)
+    {}
+
+    /*!
+     * Constructor for segment from two points.
+     * \param p1 source point.
+     * \param p2 target point.
+     * \pre The two points must not be equal.
+     */
+    _Linear_object_cached_2(const Point_2& source, const Point_2& target) :
+      ps (source),
+      pt (target),
+      has_source (true),
+      has_target (true)
+    {
+      Kernel   kernel;
+
+      Comparison_result  res = kernel.compare_xy_2_object()(source, target);
+      is_degen = (res == EQUAL);
+      is_right = (res == SMALLER);
+
+      CGAL_precondition_msg (! is_degen,
+                             "Cannot construct a degenerate segment.");
+
+      l = kernel.construct_line_2_object()(source, target);
+      is_vert = kernel.is_vertical_2_object()(l);
+      is_horiz = kernel.is_horizontal_2_object()(l);
+      has_pos_slope = _has_positive_slope();
+    }
+
+    /*!
+     * Constructor from a segment.
+     * \param seg The segment.
+     * \pre The segment is not degenerate.
+     */
+    _Linear_object_cached_2 (const Segment_2& seg)
+    {
+      Kernel   kernel;
+
+      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (seg),
+                          "Cannot construct a degenerate segment.");
+
+      typename Kernel_::Construct_vertex_2
+        construct_vertex = kernel.construct_vertex_2_object();
+
+      ps = construct_vertex(seg, 0);
+      has_source = true;
+      pt = construct_vertex(seg, 1);
+      has_target = true;
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+
+      CGAL_assertion (res != EQUAL);
+      is_degen = false;
+      is_right = (res == SMALLER);
+
+      l = kernel.construct_line_2_object()(seg);
+      is_vert = kernel.is_vertical_2_object()(seg);
+      is_horiz = kernel.is_horizontal_2_object()(seg);
+      has_pos_slope = _has_positive_slope();
+    }
+
+    /*!
+     * Constructor from a ray.
+     * \param ray The ray.
+     * \pre The ray is not degenerate.
+     */
+    _Linear_object_cached_2 (const Ray_2& ray)
+    {
+      Kernel   kernel;
+
+      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (ray),
+                          "Cannot construct a degenerate ray.");
+
+      typename Kernel_::Construct_point_on_2
+        construct_vertex = kernel.construct_point_on_2_object();
+
+      ps = construct_vertex(ray, 0);         // The source point.
+      has_source = true;
+      pt = construct_vertex(ray, 1);         // Some point on the ray.
+      has_target = false;
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+      CGAL_assertion (res != EQUAL);
+      is_degen = false;
+      is_right = (res == SMALLER);
+
+      l = kernel.construct_line_2_object()(ray);
+      is_vert = kernel.is_vertical_2_object()(ray);
+      is_horiz = kernel.is_horizontal_2_object()(ray);
+      has_pos_slope = _has_positive_slope();
+    }
+
+    /*!
+     * Constructor from a line.
+     * \param ln The line.
+     * \pre The line is not degenerate.
+     */
+    _Linear_object_cached_2 (const Line_2& ln) :
+      l (ln),
+      has_source (false),
+      has_target (false)
+    {
+      Kernel   kernel;
+
+      CGAL_assertion_msg (! kernel.is_degenerate_2_object() (ln),
+                          "Cannot construct a degenerate line.");
+
+      typename Kernel_::Construct_point_on_2
+        construct_vertex = kernel.construct_point_on_2_object();
+
+      ps = construct_vertex(ln, 0);         // Some point on the line.
+      has_source = false;
+      pt = construct_vertex(ln, 1);         // Some point further on the line.
+      has_target = false;
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+      CGAL_assertion (res != EQUAL);
+      is_degen = false;
+      is_right = (res == SMALLER);
+
+      is_vert = kernel.is_vertical_2_object()(ln);
+      is_horiz = kernel.is_horizontal_2_object()(ln);
+      has_pos_slope = _has_positive_slope();
+    }
+
+    /*!
+     * Check whether the x-coordinate of the left point is infinite.
+     * \return ARR_LEFT_BOUNDARY if the left point is near the boundary;
+     *         ARR_INTERIOR if the x-coordinate is finite.
+     */
+    Arr_parameter_space left_infinite_in_x () const
+    {
+      if (is_vert || is_degen)
+        return (ARR_INTERIOR);
+
+      return (is_right) ?
+        (has_source ? ARR_INTERIOR : ARR_LEFT_BOUNDARY) :
+        (has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY);
+    }
+
+    /*!
+     * Check whether the y-coordinate of the left point is infinite.
+     * \return ARR_BOTTOM_BOUNDARY if the left point is at y = -oo;
+     *         ARR_INTERIOR if the y-coordinate is finite.
+     *         ARR_TOP_BOUNDARY if the left point is at y = +oo;
+     */
+    Arr_parameter_space left_infinite_in_y () const
+    {
+      if (is_horiz || is_degen)
+        return ARR_INTERIOR;
+
+      if (is_vert) {
+        return (is_right) ?
+          (has_source ? ARR_INTERIOR : ARR_BOTTOM_BOUNDARY) :
+          (has_target ? ARR_INTERIOR : ARR_BOTTOM_BOUNDARY);
+      }
+
+      if ((is_right && has_source) || (! is_right && has_target))
+          return ARR_INTERIOR;
+
+      return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
+    }
+
+    /*!
+     * Check whether the left point is finite.
+     */
+    bool has_left () const
+    {
+      if (is_right)
+        return (has_source);
+      else
+        return (has_target);
+    }
+
+    /*!
+     * Obtain the (lexicographically) left endpoint.
+     * \pre The left point is finite.
+     */
+    const Point_2& left () const
+    {
+      CGAL_precondition (has_left());
+      return (is_right ? ps : pt);
+    }
+
+    /*!
+     * Set the (lexicographically) left endpoint.
+     * \param p The point to set.
+     * \pre p lies on the supporting line to the left of the right endpoint.
+     */
+    void set_left (const Point_2& p, bool CGAL_assertion_code(check_validity) = true)
+    {
+      CGAL_precondition (! is_degen);
+
+      CGAL_precondition_code (
+        Kernel    kernel;
+      );
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, l,
+                                                  Has_exact_division()) &&
+         (! check_validity || ! has_right() ||
+          kernel.compare_xy_2_object() (p, right()) == SMALLER));
+
+      if (is_right)
+      {
+        ps = p;
+        has_source = true;
+      }
+      else
+      {
+        pt = p;
+        has_target = true;
+      }
+    }
+
+    /*!
+     * Set the (lexicographically) left endpoint as infinite.
+     */
+    void set_left ()
+    {
+      CGAL_precondition (! is_degen);
+
+      if (is_right)
+        has_source = false;
+      else
+        has_target = false;
+    }
+
+    /*!
+     * Check whether the x-coordinate of the right point is infinite.
+     * \return ARR_RIGHT_BOUNDARY if the right point is near the boundary;
+     *         ARR_INTERIOR if the x-coordinate is finite.
+     */
+    Arr_parameter_space right_infinite_in_x () const
+    {
+      if (is_vert || is_degen)
+        return ARR_INTERIOR;
+
+      return (is_right) ?
+        (has_target ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY) :
+        (has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
+    }
+
+    /*!
+     * Check whether the y-coordinate of the right point is infinite.
+     * \return ARR_BOTTOM_BOUNDARY if the right point is at y = -oo;
+     *         ARR_INTERIOR if the y-coordinate is finite.
+     *         ARR_TOP_BOUNDARY if the right point is at y = +oo;
+     */
+    Arr_parameter_space right_infinite_in_y () const
+    {
+      if (is_horiz || is_degen)
+        return ARR_INTERIOR;
+
+      if (is_vert) {
+        return (is_right) ?
+          (has_target ? ARR_INTERIOR : ARR_TOP_BOUNDARY) :
+          (has_source ? ARR_INTERIOR : ARR_TOP_BOUNDARY);
+      }
+
+      if ((is_right && has_target) || (! is_right && has_source))
+          return ARR_INTERIOR;
+
+      return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY);
+    }
+
+    /*!
+     * Check whether the right point is finite.
+     */
+    bool has_right () const
+    {
+      if (is_right)
+        return (has_target);
+      else
+        return (has_source);
+    }
+
+    /*!
+     * Obtain the (lexicographically) right endpoint.
+     * \pre The right endpoint is finite.
+     */
+    const Point_2& right () const
+    {
+      CGAL_precondition (has_right());
+      return (is_right ? pt : ps);
+    }
+
+    /*!
+     * Set the (lexicographically) right endpoint.
+     * \param p The point to set.
+     * \pre p lies on the supporting line to the right of the left endpoint.
+     */
+    void set_right (const Point_2& p, bool CGAL_assertion_code(check_validity) = true)
+    {
+      CGAL_precondition (! is_degen);
+      CGAL_precondition_code (
+        Kernel    kernel;
+      );
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, l,
+                                                  Has_exact_division()) &&
+         (! check_validity || ! has_left() ||
+          kernel.compare_xy_2_object() (p, left()) == LARGER));
+
+      if (is_right)
+      {
+        pt = p;
+        has_target = true;
+      }
+      else
+      {
+        ps = p;
+        has_source = true;
+      }
+    }
+
+    /*!
+     * Set the (lexicographically) right endpoint as infinite.
+     */
+    void set_right ()
+    {
+      CGAL_precondition (! is_degen);
+
+      if (is_right)
+        has_target = false;
+      else
+        has_source = false;
+    }
+
+    /*!
+     * Obtain the supporting line.
+     */
+    const Line_2& supp_line () const
+    {
+      CGAL_precondition (! is_degen);
+      return (l);
+    }
+
+    /*!
+     * Check whether the curve is vertical.
+     */
+    bool is_vertical () const
+    {
+      CGAL_precondition (! is_degen);
+      return (is_vert);
+    }
+
+    /*!
+     * Check whether the curve is degenerate.
+     */
+    bool is_degenerate () const
+    {
+      return (is_degen);
+    }
+
+    /*!
+     * Check whether the curve is directed lexicographic from left to right
+     */
+    bool is_directed_right () const
+    {
+      return (is_right);
+    }
+
+    /*!
+     * Check whether the given point is in the x-range of the object.
+     * \param p The query point.
+     * \return (true) is in the x-range of the segment; (false) if it is not.
+     */
+    bool is_in_x_range (const Point_2& p) const
+    {
+      Kernel                          kernel;
+      typename Kernel_::Compare_x_2   compare_x = kernel.compare_x_2_object();
+      Comparison_result               res1;
+
+      if (left_infinite_in_x() == ARR_INTERIOR)
+      {
+        if (left_infinite_in_y() != ARR_INTERIOR)
+          // Compare with some point on the curve.
+          res1 = compare_x (p, ps);
+        else
+          res1 = compare_x (p, left());
+      }
+      else
+      {
+        // p is obviously to the right.
+        res1 = LARGER;
+      }
+
+      if (res1 == SMALLER)
+        return (false);
+      else if (res1 == EQUAL)
+        return (true);
+
+      Comparison_result               res2;
+
+      if (right_infinite_in_x() == ARR_INTERIOR)
+      {
+        if (right_infinite_in_y() != ARR_INTERIOR)
+          // Compare with some point on the curve.
+          res2 = compare_x (p, ps);
+        else
+          res2 = compare_x (p, right());
+      }
+      else
+      {
+        // p is obviously to the right.
+        res2 = SMALLER;
+      }
+
+      return (res2 != LARGER);
+    }
+
+    /*!
+     * Check whether the given point is in the y-range of the object.
+     * \param p The query point.
+     * \pre The object is vertical.
+     * \return (true) is in the y-range of the segment; (false) if it is not.
+     */
+    bool is_in_y_range (const Point_2& p) const
+    {
+      CGAL_precondition (is_vertical());
+
+      Kernel                          kernel;
+      typename Kernel_::Compare_y_2   compare_y = kernel.compare_y_2_object();
+      Arr_parameter_space             inf = left_infinite_in_y();
+      Comparison_result               res1;
+
+      CGAL_assertion (inf != ARR_TOP_BOUNDARY);
+      if (inf == ARR_INTERIOR)
+        res1 = compare_y (p, left());
+      else
+        res1 = LARGER;           // p is obviously above.
+
+      if (res1 == SMALLER)
+        return (false);
+      else if (res1 == EQUAL)
+        return (true);
+
+      Comparison_result               res2;
+
+      inf = right_infinite_in_y();
+      CGAL_assertion (inf != ARR_BOTTOM_BOUNDARY);
+      if (inf == ARR_INTERIOR)
+        res2 = compare_y (p, right());
+      else
+        res2 = SMALLER;          // p is obviously below.
+
+      return (res2 != LARGER);
+    }
+
+  private:
+
+    /*!
+     * Determine if the supporting line has a positive slope.
+     */
+    bool _has_positive_slope () const
+    {
+      if (is_vert)
+        return (true);
+
+      if (is_horiz)
+        return (false);
+
+      // Construct a horizontal line and compare its slope the that of l.
+      Kernel     kernel;
+      Line_2     l_horiz = kernel.construct_line_2_object() (Point_2 (0, 0),
+                                                             Point_2 (1, 0));
+
+      return (kernel.compare_slope_2_object() (l, l_horiz) == LARGER);
+    }
+  };
+
+public:
+
+  // Traits objects
+  typedef typename Kernel::Point_2              Point_2;
+  typedef Arr_linear_object_2<Kernel>           X_monotone_curve_2;
+  typedef Arr_linear_object_2<Kernel>           Curve_2;
+  typedef unsigned int                          Multiplicity;
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  Arr_linear_traits_2 ()
+  {}
+
+  /// \name Basic functor definitions.
+  //@{
+
+  /*! A functor that compares the x-coordinates of two points */
+  class Compare_x_2 {
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits * m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Compare_x_2(const Traits * traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      const Kernel * kernel = m_traits;
+      return (kernel->compare_x_2_object()(p1, p2));
+    }
+  };
+
+  /*! Obtain a Compare_x_2 functor. */
+  Compare_x_2 compare_x_2_object () const
+  {
+    return Compare_x_2(this);
+  }
+
+  /*! A functor that compares the he endpoints of an $x$-monotone curve. */
+  class Compare_endpoints_xy_2{
+  public:
+    /*! Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+     Comparison_result operator() (const X_monotone_curve_2& xcv) const
+    { return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); }
+  };
+
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+
+  class Trim_2{
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Trim_2(const Traits * traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    X_monotone_curve_2 operator()( const X_monotone_curve_2 xcv,
+                                   const Point_2 src,
+                                   const Point_2 tgt )
+    {
+      /*
+       * "Line_segment, line, and ray" will become line segments
+       * when trimmed.
+      */
+      Equal_2 equal = Equal_2();
+      Compare_y_at_x_2 compare_y_at_x = m_traits->compare_y_at_x_2_object();
+
+      //preconditions
+      //check if source and taget are two distinct points and they lie on the line.
+      CGAL_precondition(!equal(src, tgt));
+      CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL);
+      CGAL_precondition(compare_y_at_x(tgt, xcv) == EQUAL);
+
+      //create trimmed line_segment
+      X_monotone_curve_2 trimmed_segment;
+
+      if( xcv.is_directed_right() && tgt.x() < src.x() )
+        trimmed_segment = Segment_2(tgt, src);
+
+
+      else if( !xcv.is_directed_right() && tgt.x() > src.x())
+        trimmed_segment = Segment_2(tgt, src);
+
+      else
+        trimmed_segment = Segment_2(src, tgt);
+
+      return trimmed_segment;
+    }
+
+  };
+
+  Trim_2 trim_2_object() const
+  {
+    return Trim_2(this);
+  }
+
+
+  class Construct_opposite_2{
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Construct_opposite_2(const Traits * traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv)const
+    {
+      CGAL_precondition (! xcv.is_degenerate());
+
+      X_monotone_curve_2 opp_xcv;
+
+      if( xcv.is_segment() )
+      {
+        opp_xcv = Segment_2(xcv.target(), xcv.source());
+      }
+
+      if( xcv.is_line() )
+      {
+        opp_xcv = Line_2(xcv.get_pt(), xcv.get_ps());
+      }
+
+      if( xcv.is_ray() )
+      {
+        Point_2 opp_tgt = Point_2( -(xcv.get_pt().x()), -(xcv.get_pt().y()));
+        opp_xcv = Ray_2( xcv.source(),  opp_tgt);
+      }
+
+      return opp_xcv;
+
+    }
+
+  };
+
+  /*! Get a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2(this);
+  }
+
+  /*! A functor that compares the x-coordinates of two points */
+  class Compare_xy_2 {
+  public:
+    /*!
+     * Compare two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      Kernel    kernel;
+      return (kernel.compare_xy_2_object()(p1, p2));
+    }
+  };
+
+  /*! Obtain a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return Compare_xy_2();
+  }
+
+  /*! A functor that obtains the left endpoint of a segment or a ray. */
+  class Construct_min_vertex_2
+  {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \pre The left end of cv is a valid (bounded) point.
+     * \return The left endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (! cv.is_degenerate());
+      CGAL_precondition (cv.has_left());
+
+      return (cv.left());
+    }
+  };
+
+  /*! Obtain a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return Construct_min_vertex_2();
+  }
+
+  /*! A functor that obtains the right endpoint of a segment or a ray. */
+  class Construct_max_vertex_2
+  {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \pre The right end of cv is a valid (bounded) point.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (! cv.is_degenerate());
+      CGAL_precondition (cv.has_right());
+
+      return (cv.right());
+    }
+  };
+
+  /*! Obtain a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return Construct_max_vertex_2();
+  }
+
+  /*! A functor that checks whether a given linear curve is vertical. */
+  class Is_vertical_2
+  {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (! cv.is_degenerate());
+      return (cv.is_vertical());
+    }
+  };
+
+  /*! Obtain an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object () const
+  {
+    return Is_vertical_2();
+  }
+
+  /*! A functor that compares the y-coordinates of a point and a line at
+   * the point x-coordinate
+   */
+  class Compare_y_at_x_2 {
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Compare_y_at_x_2(const Traits * traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator() (const Point_2& p,
+                                  const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (! cv.is_degenerate());
+      CGAL_precondition (cv.is_in_x_range (p));
+
+      const Kernel * kernel = m_traits;
+      if (! cv.is_vertical())
+        // Compare p with the segment's supporting line.
+        return (kernel->compare_y_at_x_2_object()(p, cv.supp_line()));
+
+      // Compare with the vertical segment's end-points.
+      typename Kernel::Compare_y_2  compare_y = kernel->compare_y_2_object();
+      const Comparison_result res1 =
+        cv.has_left() ? compare_y (p, cv.left()) : LARGER;
+      const Comparison_result res2 =
+        cv.has_right() ? compare_y (p, cv.right()) : SMALLER;
+
+      return (res1 == res2) ? res1 : EQUAL;
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object () const
+  {
+    return Compare_y_at_x_2(this);
+  }
+
+  /*! A functor that compares compares the y-coordinates of two linear
+   * curves immediately to the left of their intersection point.
+   */
+  class Compare_y_at_x_left_2
+  {
+  public:
+    /*!
+     * Compare the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& CGAL_precondition_code(p)) const
+    {
+      CGAL_precondition (! cv1.is_degenerate());
+      CGAL_precondition (! cv2.is_degenerate());
+
+      Kernel                        kernel;
+
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition_code (
+        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, cv1,
+                                                  Has_exact_division()) &&
+         Segment_assertions::_assert_is_point_on (p, cv2,
+                                                  Has_exact_division()));
+
+      CGAL_precondition ((! cv1.has_left() ||
+                          compare_xy(cv1.left(), p) == SMALLER) &&
+                         (! cv2.has_left() ||
+                          compare_xy(cv2.left(), p) == SMALLER));
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+      // Notice we use the supporting lines in order to compare the slopes,
+      // and that we swap the order of the curves in order to obtain the
+      // correct result to the left of p.
+      return (kernel.compare_slope_2_object()(cv2.supp_line(), cv1.supp_line()));
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
+  {
+    return Compare_y_at_x_left_2();
+  }
+
+  /*! A functor that compares compares the y-coordinates of two linear
+   * curves immediately to the right of their intersection point.
+   */
+  class Compare_y_at_x_right_2
+  {
+  public:
+    /*!
+     * Compare the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& CGAL_precondition_code(p)) const
+    {
+      CGAL_precondition (! cv1.is_degenerate());
+      CGAL_precondition (! cv2.is_degenerate());
+
+      Kernel                        kernel;
+
+      // Make sure that p lies on both curves, and that both are defined to its
+      // right (so their right endpoint is lexicographically larger than p).
+      CGAL_precondition_code (
+        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, cv1,
+                                                  Has_exact_division()) &&
+         Segment_assertions::_assert_is_point_on (p, cv2,
+                                                  Has_exact_division()));
+
+      CGAL_precondition ((! cv1.has_right() ||
+                          compare_xy(cv1.right(), p) == LARGER) &&
+                         (! cv2.has_right() ||
+                          compare_xy(cv2.right(), p) == LARGER));
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+      // Notice we use the supporting lines in order to compare the slopes.
+      return (kernel.compare_slope_2_object()(cv1.supp_line(),
+                                              cv2.supp_line()));
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
+  {
+    return Compare_y_at_x_right_2();
+  }
+
+  /*! A functor that checks whether two points and two linear curves are
+   * identical.
+   */
+  class Equal_2
+  {
+  public:
+    /*!
+     * Check whether the two x-monotone curves are the same (have the same
+     * graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      CGAL_precondition (! cv1.is_degenerate());
+      CGAL_precondition (! cv2.is_degenerate());
+
+      Kernel                    kernel;
+      typename Kernel::Equal_2  equal = kernel.equal_2_object();
+
+      // Check that the two supporting lines are the same.
+      if (! equal (cv1.supp_line(), cv2.supp_line()) &&
+          ! equal (cv1.supp_line(),
+                   kernel.construct_opposite_line_2_object()(cv2.supp_line())))
+      {
+        return (false);
+      }
+
+      // Check that either the two left endpoints are at infinity, or they
+      // are bounded and equal.
+      if ((cv1.has_left() != cv2.has_left()) ||
+          (cv1.has_left() && ! equal (cv1.left(), cv2.left())))
+      {
+        return (false);
+      }
+
+      // Check that either the two right endpoints are at infinity, or they
+      // are bounded and equal.
+      return ((cv1.has_right() == cv2.has_right()) &&
+              (! cv1.has_right() || equal (cv1.right(), cv2.right())));
+    }
+
+    /*!
+     * Check whether the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      Kernel    kernel;
+      return (kernel.equal_2_object()(p1, p2));
+    }
+  };
+
+  /*! Obtain an Equal_2 functor object. */
+  Equal_2 equal_2_object () const
+  {
+    return Equal_2();
+  }
+  //@}
+
+  /// \name Functor definitions to handle boundaries
+  //@{
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the x-axis
+   */
+  class Parameter_space_in_x_2 {
+  public:
+    /*! Obtains the parameter space at the end of a line along the x-axis.
+     * \param xcv the line
+     * \param ce the line end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the line xcv.
+     *   ARR_LEFT_BOUNDARY  - the line approaches the identification arc from
+     *                        the right at the line left end.
+     *   ARR_INTERIOR       - the line does not approache the identification arc.
+     *   ARR_RIGHT_BOUNDARY - the line approaches the identification arc from
+     *                        the left at the line right end.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
+                                   Arr_curve_end ce) const
+    {
+      CGAL_precondition (! xcv.is_degenerate());
+      return (ce == ARR_MIN_END) ?
+        xcv.left_infinite_in_x() : xcv.right_infinite_in_x();
+    }
+
+    /*! Obtains the parameter space at a point along the x-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     */
+    Arr_parameter_space operator()(const Point_2 ) const
+    {
+      return ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_x_2 function object */
+  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
+  { return Parameter_space_in_x_2(); }
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the y-axis
+   */
+  class Parameter_space_in_y_2 {
+  public:
+    /*! Obtains the parameter space at the end of a line along the y-axis .
+     * Note that if the line end coincides with a pole, then unless the line
+     * coincides with the identification arc, the line end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the line coincides with the identification arc, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the line
+     * \param ce the line end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the line xcv.
+     *   ARR_BOTTOM_BOUNDARY  - the line approaches the south pole at the line
+     *                          left end.
+     *   ARR_INTERIOR         - the line does not approache a contraction point.
+     *   ARR_TOP_BOUNDARY     - the line approaches the north pole at the line
+     *                          right end.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
+                                   Arr_curve_end ce) const
+    {
+      CGAL_precondition (! xcv.is_degenerate());
+
+      return (ce == ARR_MIN_END) ?
+        xcv.left_infinite_in_y() : xcv.right_infinite_in_y();
+    }
+
+    /*! Obtains the parameter space at a point along the y-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     */
+    Arr_parameter_space operator()(const Point_2 ) const
+    {
+      return ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_y_2 function object */
+  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
+  { return Parameter_space_in_y_2(); }
+
+  /*! A function object that compares the x-limits of arc ends on the
+   * boundary of the parameter space
+   */
+  class Compare_x_at_limit_2 {
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Compare_x_at_limit_2(const Traits* traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    /*! Compare the x-limit of a vertical line at a point with the x-limit of
+     * a line end on the boundary at y = +/- oo.
+     * \param p the point direction.
+     * \param xcv the line, the endpoint of which is compared.
+     * \param ce the line-end indicator -
+     *            ARR_MIN_END - the minimal end of xc or
+     *            ARR_MAX_END - the maximal end of xc.
+     * \return the comparison result:
+     *         SMALLER - x(p) < x(xc, ce);
+     *         EQUAL   - x(p) = x(xc, ce);
+     *         LARGER  - x(p) > x(xc, ce).
+     * \pre p lies in the interior of the parameter space.
+     * \pre the ce end of the line xcv lies on a boundary, implying
+     *      that xcv1 is vertical.
+     */
+    Comparison_result operator()(const Point_2 & p,
+                                 const X_monotone_curve_2 & xcv,
+                                 Arr_curve_end ) const
+    {
+      CGAL_precondition(! xcv.is_degenerate());
+      CGAL_precondition(xcv.is_vertical());
+
+      const Kernel* kernel = m_traits;
+      return (kernel->compare_x_at_y_2_object()(p, xcv.supp_line()));
+    }
+
+    /*! Compare the x-limits of 2 arcs ends on the boundary of the
+     * parameter space at y = +/- oo.
+     * \param xcv1 the first arc.
+     * \param ce1 the first arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv1 or
+     *            ARR_MAX_END - the maximal end of xcv1.
+     * \param xcv2 the second arc.
+     * \param ce2 the second arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv2 or
+     *            ARR_MAX_END - the maximal end of xcv2.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
+     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
+     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
+     * \pre the ce1 end of the line xcv1 lies on a boundary, implying
+     *      that xcv1 is vertical.
+     * \pre the ce2 end of the line xcv2 lies on a boundary, implying
+     *      that xcv2 is vertical.
+     */
+    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
+                                 Arr_curve_end /* ce1 */,
+                                 const X_monotone_curve_2 & xcv2,
+                                 Arr_curve_end /*! ce2 */) const
+    {
+      CGAL_precondition(! xcv1.is_degenerate());
+      CGAL_precondition(! xcv2.is_degenerate());
+      CGAL_precondition(xcv1.is_vertical());
+      CGAL_precondition(xcv2.is_vertical());
+
+      const Kernel* kernel = m_traits;
+      const Point_2 p = kernel->construct_point_2_object()(ORIGIN);
+      return (kernel->compare_x_at_y_2_object()(p, xcv1.supp_line(),
+                                                xcv2.supp_line()));
+    }
+  };
+
+  /*! Obtain a Compare_x_at_limit_2 function object */
+  Compare_x_at_limit_2 compare_x_at_limit_2_object() const
+  { return Compare_x_at_limit_2(this); }
+
+  /*! A function object that compares the x-coordinates of arc ends near the
+   * boundary of the parameter space
+   */
+  class Compare_x_near_limit_2 {
+  public:
+
+    /*! Compare the x-coordinates of 2 arcs ends near the boundary of the
+     * parameter space at y = +/- oo.
+     * \param xcv1 the first arc.
+     * \param ce1 the first arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv1 or
+     *            ARR_MAX_END - the maximal end of xcv1.
+     * \param xcv2 the second arc.
+     * \param ce2 the second arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv2 or
+     *            ARR_MAX_END - the maximal end of xcv2.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
+     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
+     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
+     * \pre the ce end of the line xcv1 lies on a boundary, implying
+     *      that xcv1 is vertical.
+     * \pre the ce end of the line xcv2 lies on a boundary, implying
+     *      that xcv2 is vertical.
+     * \pre the the $x$-coordinates of xcv1 and xcv2 at their ce ends are
+     *      equal, implying that the curves overlap!
+     */
+    Comparison_result
+    operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1),
+               const X_monotone_curve_2& CGAL_precondition_code(xcv2),
+               Arr_curve_end /*! ce2 */) const
+    {
+      CGAL_precondition(! xcv1.is_degenerate());
+      CGAL_precondition(! xcv2.is_degenerate());
+      CGAL_precondition(xcv1.is_vertical());
+      CGAL_precondition(xcv2.is_vertical());
+      return EQUAL;
+    }
+  };
+
+  /*! Obtain a Compare_x_near_limit_2 function object */
+  Compare_x_near_limit_2 compare_x_near_limit_2_object() const
+  { return Compare_x_near_limit_2(); }
+
+
+  /*! A function object that compares the y-limits of arc ends on the
+   * boundary of the parameter space.
+   */
+  class Compare_y_near_boundary_2 {
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     * The constructor is declared private to allow only the functor
+     * obtaining function, which is a member of the nesting class,
+     * constructing it.
+     */
+    Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {}
+
+    //! Allow its functor obtaining function calling the private constructor.
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    /*! Compare the y-limits of 2 lines at their ends on the boundary
+     * of the parameter space at x = +/- oo.
+     * \param xcv1 the first arc.
+     * \param xcv2 the second arc.
+     * \param ce the line end indicator.
+     * \return the second comparison result.
+     * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left
+     * boundary or on the right boundary of the parameter space.
+     */
+    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
+                                 const X_monotone_curve_2 & xcv2,
+                                 Arr_curve_end ce) const
+    {
+      // Make sure both curves are defined at x = -oo (or at x = +oo).
+      CGAL_precondition(! xcv1.is_degenerate());
+      CGAL_precondition(! xcv2.is_degenerate());
+      CGAL_precondition((ce == ARR_MIN_END &&
+                         xcv1.left_infinite_in_x() == ARR_LEFT_BOUNDARY &&
+                         xcv2.left_infinite_in_x() == ARR_LEFT_BOUNDARY) ||
+                        (ce == ARR_MAX_END &&
+                         xcv1.right_infinite_in_x() == ARR_RIGHT_BOUNDARY &&
+                         xcv2.right_infinite_in_x() == ARR_RIGHT_BOUNDARY));
+
+      // Compare the slopes of the two supporting lines.
+      const Kernel* kernel = m_traits;
+      const Comparison_result res_slopes =
+        kernel->compare_slope_2_object()(xcv1.supp_line(), xcv2.supp_line());
+
+      if (res_slopes == EQUAL) {
+        // In case the two supporting line are parallel, compare their
+        // relative position at x = 0, which is the same as their position
+        // at infinity.
+        const Point_2 p = kernel->construct_point_2_object()(ORIGIN);
+        return (kernel->compare_y_at_x_2_object()(p, xcv1.supp_line(),
+                                                  xcv2.supp_line()));
+      }
+
+      // Flip the slope result if we compare at x = -oo:
+      return (ce == ARR_MIN_END) ? CGAL::opposite(res_slopes) : res_slopes;
+    }
+  };
+
+
+  /*! Obtain a Compare_y_limit_on_boundary_2 function object */
+  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
+  { return Compare_y_near_boundary_2(this); }
+
+  //@}
+
+  /// \name Functor definitions for supporting intersections.
+  //@{
+
+  class Make_x_monotone_2
+  {
+  public:
+    /*!
+     * Cut the given curve into x-monotone subcurves and insert them into the
+     * given output iterator. As segments are always x_monotone, only one
+     * object will be contained in the iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The output
+     *           object is a wrapper of an X_monotone_curve_2 which is
+     *           essentially the same as the input curve.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const
+    {
+      // Wrap the curve with an object.
+      *oi = make_object (cv);
+      ++oi;
+
+      return (oi);
+    }
+  };
+
+  /*! Obtain a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object () const
+  {
+    return Make_x_monotone_2();
+  }
+
+  class Split_2
+  {
+  public:
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      CGAL_precondition (! cv.is_degenerate());
+
+      // Make sure that p lies on the interior of the curve.
+      CGAL_precondition_code (
+        Kernel                        kernel;
+        typename Kernel::Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, cv,
+                                                  Has_exact_division()) &&
+         (! cv.has_left() || compare_xy(cv.left(), p) == SMALLER) &&
+         (! cv.has_right() || compare_xy(cv.right(), p) == LARGER));
+
+      // Perform the split.
+      c1 = cv;
+      c1.set_right (p);
+
+      c2 = cv;
+      c2.set_left (p);
+
+      return;
+    }
+  };
+
+  /*! Obtain a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return Split_2();
+  }
+
+  class Intersect_2
+  {
+  public:
+    /*!
+     * Find the intersections of the two given curves and insert them into the
+     * given output iterator. As two segments may itersect only once, only a
+     * single intersection will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      CGAL_precondition (! cv1.is_degenerate());
+      CGAL_precondition (! cv2.is_degenerate());
+
+      // Intersect the two supporting lines.
+      Kernel       kernel;
+      CGAL::Object obj = kernel.intersect_2_object()(cv1.supp_line(),
+                                                     cv2.supp_line());
+
+      if (obj.is_empty())
+      {
+        // The supporting line are parallel lines and do not intersect:
+        return (oi);
+      }
+
+      // Check whether we have a single intersection point.
+      const Point_2  *ip = object_cast<Point_2> (&obj);
+
+      if (ip != NULL)
+      {
+        // Check whether the intersection point ip lies on both segments.
+        const bool    ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
+                                                      cv1.is_in_x_range(*ip);
+
+        if (ip_on_cv1)
+        {
+          const bool  ip_on_cv2 = cv2.is_vertical() ? cv2.is_in_y_range(*ip) :
+                                                      cv2.is_in_x_range(*ip);
+
+          if (ip_on_cv2)
+          {
+            // Create a pair representing the point with its multiplicity,
+            // which is always 1 for line segments.
+            std::pair<Point_2,Multiplicity>   ip_mult (*ip, 1);
+            *oi = make_object (ip_mult);
+            oi++;
+          }
+        }
+        return (oi);
+      }
+
+      // In this case, the two supporting lines overlap.
+      // We start with the entire cv1 curve as the overlapping subcurve,
+      // then clip it to form the true overlapping curve.
+      typename Kernel::Compare_xy_2  compare_xy = kernel.compare_xy_2_object();
+      X_monotone_curve_2             ovlp = cv1;
+
+      if (cv2.has_left())
+      {
+        // If the left endpoint of cv2 is to the right of cv1's left endpoint,
+        // clip the overlapping subcurve.
+        if (! cv1.has_left())
+        {
+          ovlp.set_left (cv2.left(), false);
+        }
+        else
+        {
+          if (compare_xy (cv1.left(), cv2.left()) == SMALLER)
+            ovlp.set_left (cv2.left(), false);
+        }
+      }
+
+      if (cv2.has_right())
+      {
+        // If the right endpoint of cv2 is to the left of cv1's right endpoint,
+        // clip the overlapping subcurve.
+        if (! cv1.has_right())
+        {
+          ovlp.set_right (cv2.right(), false);
+        }
+        else
+        {
+          if (compare_xy (cv1.right(), cv2.right()) == LARGER)
+            ovlp.set_right (cv2.right(), false);
+        }
+      }
+
+      // Examine the resulting subcurve.
+      Comparison_result        res = SMALLER;
+
+      if (ovlp.has_left() && ovlp.has_right())
+        res = compare_xy (ovlp.left(), ovlp.right());
+
+      if (res == SMALLER)
+      {
+        // We have discovered a true overlapping subcurve:
+        *oi = make_object (ovlp);
+        oi++;
+      }
+      else if (res == EQUAL)
+      {
+        // The two objects have the same supporting line, but they just share
+        // a common endpoint. Thus we have an intersection point, but we leave
+        // the multiplicity of this point undefined.
+        std::pair<Point_2,Multiplicity>   ip_mult (ovlp.left(), 0);
+        *oi = make_object (ip_mult);
+        oi++;
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Obtain an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return Intersect_2();
+  }
+
+  class Are_mergeable_2
+  {
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable - if they are supported
+     *         by the same line and share a common endpoint; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      CGAL_precondition (! cv1.is_degenerate());
+      CGAL_precondition (! cv2.is_degenerate());
+
+      Kernel                    kernel;
+      typename Kernel::Equal_2  equal = kernel.equal_2_object();
+
+      // Check whether the two curves have the same supporting line.
+      if (! equal (cv1.supp_line(), cv2.supp_line()) &&
+          ! equal (cv1.supp_line(),
+                   kernel.construct_opposite_line_2_object()(cv2.supp_line())))
+        return (false);
+
+      // Check whether the left endpoint of one curve is the right endpoint of the
+      // other.
+      return ((cv1.has_right() && cv2.has_left() &&
+               equal (cv1.right(), cv2.left())) ||
+              (cv2.has_right() && cv1.has_left() &&
+               equal (cv2.right(), cv1.left())));
+    }
+  };
+
+  /*! Obtain an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object () const
+  {
+    return Are_mergeable_2();
+  }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2
+  {
+  protected:
+    typedef Arr_linear_traits_2<Kernel> Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_linear_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve (segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2,
+                     X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      CGAL_precondition(!cv1.is_degenerate());
+      CGAL_precondition(!cv2.is_degenerate());
+
+      Equal_2 equal = m_traits->equal_2_object();
+
+      // Check which curve extends to the right of the other.
+      if (cv1.has_right() && cv2.has_left() &&
+          equal(cv1.right(), cv2.left()))
+      {
+        // cv2 extends cv1 to the right.
+        c = cv1;
+
+        if (cv2.has_right())
+          c.set_right(cv2.right());
+        else
+          c.set_right();      // Unbounded endpoint.
+      }
+      else {
+        CGAL_precondition(cv2.has_right() && cv1.has_left() &&
+                          equal(cv2.right(), cv1.left()));
+
+        // cv1 extends cv2 to the right.
+        c = cv2;
+
+        if (cv1.has_right())
+          c.set_right(cv1.right());
+        else
+          c.set_right();      // Unbounded endpoint.
+      }
+    }
+  };
+
+  /*! Obtain a Merge_2 functor object. */
+  Merge_2 merge_2_object () const { return Merge_2(this); }
+  //@}
+
+  /// \name Functor definitions for the landmarks point-location strategy.
+  //@{
+  typedef double                          Approximate_number_type;
+
+  class Approximate_2
+  {
+  public:
+
+    /*!
+     * Return an approximation of a point coordinate.
+     * \param p The exact point.
+     * \param i The coordinate index (either 0 or 1).
+     * \pre i is either 0 or 1.
+     * \return An approximation of p's x-coordinate (if i == 0), or an
+     *         approximation of p's y-coordinate (if i == 1).
+     */
+    Approximate_number_type operator() (const Point_2& p,
+                                        int i) const
+    {
+      CGAL_precondition (i == 0 || i == 1);
+
+      if (i == 0)
+        return (CGAL::to_double(p.x()));
+      else
+        return (CGAL::to_double(p.y()));
+    }
+  };
+
+  /*! Obtain an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object () const
+  {
+    return Approximate_2();
+  }
+
+  class Construct_x_monotone_curve_2
+  {
+  public:
+
+    /*!
+     * Return an x-monotone curve connecting the two given endpoints.
+     * \param p The first point.
+     * \param q The second point.
+     * \pre p and q must not be the same.
+     * \return A segment connecting p and q.
+     */
+    X_monotone_curve_2 operator() (const Point_2& p,
+                                   const Point_2& q) const
+    {
+      Kernel     kernel;
+      Segment_2  seg = kernel.construct_segment_2_object() (p, q);
+
+      return (X_monotone_curve_2 (seg));
+    }
+  };
+
+  /*! Obtain a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
+  {
+    return Construct_x_monotone_curve_2();
+  }
+  //@}
+
+};
+
+/*!
+ * \class A representation of a segment, as used by the Arr_segment_traits_2
+ * traits-class.
+ */
+template <class Kernel_>
+class Arr_linear_object_2 :
+    public Arr_linear_traits_2<Kernel_>::_Linear_object_cached_2
+{
+  typedef typename Arr_linear_traits_2<Kernel_>::_Linear_object_cached_2
+                                                                   Base;
+
+public:
+
+  typedef Kernel_                                           Kernel;
+
+  typedef typename Kernel::Point_2                          Point_2;
+  typedef typename Kernel::Segment_2                        Segment_2;
+  typedef typename Kernel::Ray_2                            Ray_2;
+  typedef typename Kernel::Line_2                           Line_2;
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  Arr_linear_object_2 () :
+    Base()
+  {}
+
+  /*!
+   * Constructor from two points.
+   * \param s The source point.
+   * \param t The target point.
+   * \pre The two points must not be the same.
+   */
+  Arr_linear_object_2(const Point_2& s, const Point_2& t):
+    Base(s, t)
+  {}
+
+  /*!
+   * Constructor from a segment.
+   * \param seg The segment.
+   * \pre The segment is not degenerate.
+   */
+  Arr_linear_object_2 (const Segment_2& seg) :
+    Base (seg)
+  {}
+
+  /*!
+   * Constructor from a ray.
+   * \param ray The segment.
+   * \pre The ray is not degenerate.
+   */
+  Arr_linear_object_2 (const Ray_2& ray) :
+    Base (ray)
+  {}
+
+  /*!
+   * Constructor from a line.
+   * \param line The line.
+   * \pre The line is not degenerate.
+   */
+  Arr_linear_object_2 (const Line_2& line) :
+    Base (line)
+  {}
+
+  /*!
+   * Check whether the object is actually a segment.
+   */
+  bool is_segment () const
+  {
+    return (! this->is_degen && this->has_source && this->has_target);
+  }
+
+  /*!
+   * Cast to a segment.
+   * \pre The linear object is really a segment.
+   */
+  Segment_2 segment () const
+  {
+    CGAL_precondition (is_segment());
+
+    Kernel     kernel;
+    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
+    return seg;
+  }
+
+  /*!
+   * Check whether the object is actually a ray.
+   */
+  bool is_ray () const
+  {
+    return (! this->is_degen && (this->has_source != this->has_target));
+  }
+
+  /*!
+   * Cast to a ray.
+   * \pre The linear object is really a ray.
+   */
+  Ray_2 ray () const
+  {
+    CGAL_precondition (is_ray());
+
+    Kernel     kernel;
+    Ray_2      ray = (this->has_source) ?
+      kernel.construct_ray_2_object() (this->ps, this->l) :
+      kernel.construct_ray_2_object()
+        (this->pt, kernel.construct_opposite_line_2_object()(this->l));
+    return ray;
+  }
+
+  /*!
+   * Check whether the object is actually a line.
+   */
+  bool is_line () const
+  {
+    return (! this->is_degen && ! this->has_source && ! this->has_target);
+  }
+
+  /*!
+   * Cast to a line.
+   * \pre The linear object is really a line.
+   */
+  Line_2 line () const
+  {
+    CGAL_precondition (is_line());
+    return (this->l);
+  }
+
+  /*!
+   * Get the supporting line.
+   * \pre The object is not a point.
+   */
+  const Line_2& supporting_line () const
+  {
+    CGAL_precondition (! this->is_degen);
+    return (this->l);
+  }
+
+  /*!
+   * Get the source point.
+   * \pre The object is a point, a segment or a ray.
+   */
+  const Point_2& source() const
+  {
+    CGAL_precondition (! is_line());
+
+    if (this->is_degen)
+      return (this->ps);      // For a point.
+
+    if (this->has_source)
+      return (this->ps);      // For a segment or a ray.
+    else
+      return (this->pt);      // For a "flipped" ray.
+  }
+
+  /*!
+   * Get the target point.
+   * \pre The object is a point or a segment.
+   */
+  const Point_2& target() const
+  {
+    CGAL_precondition (! is_line() && ! is_ray());
+
+    return (this->pt);
+  }
+
+  /*!
+   * Create a bounding box for the linear object.
+   */
+  Bbox_2 bbox() const
+  {
+    CGAL_precondition(this->is_segment());
+    Kernel     kernel;
+    Segment_2  seg = kernel.construct_segment_2_object() (this->ps, this->pt);
+    return (kernel.construct_bbox_2_object() (seg));
+  }
+
+  // Introducing casting operators instead from a curve to
+  // Kernel::Segment_2, Kernel::Ray_2, and Kernel::Line_2 creates an
+  // umbiguity. The compiler will barf on the last one, because there are
+  // 2 constructors of Kernel::Line_2: one from Kernel::Segment_2 and one
+  // from Kernel::Ray_2. Together with the cast to Kernel::Line_2, the
+  // compiler will have 3 equivalent options to choose from.
+};
+
+/*!
+ * Exporter for the segment class used by the traits-class.
+ */
+template <class Kernel, class OutputStream>
+OutputStream& operator<< (OutputStream& os,
+                          const Arr_linear_object_2<Kernel>& lobj)
+{
+  // Print a letter identifying the object type, then the object itself.
+  if (lobj.is_segment())
+    os << " S " << lobj.segment();
+  else if (lobj.is_ray())
+    os << " R " << lobj.ray();
+  else
+    os << " L " << lobj.line();
+
+  return (os);
+}
+
+/*!
+ * Importer for the segment class used by the traits-class.
+ */
+template <class Kernel, class InputStream>
+InputStream& operator>> (InputStream& is, Arr_linear_object_2<Kernel>& lobj)
+{
+  // Read the object type.
+  char        c;
+
+  do
+  {
+    is >> c;
+  } while ((c != 'S' && c != 's') &&
+           (c != 'R' && c != 'r') &&
+           (c != 'L' && c != 'l'));
+
+  // Read the object accordingly.
+  if (c == 'S' || c == 's')
+  {
+    typename Kernel::Segment_2  seg;
+    is >> seg;
+    lobj = seg;
+  }
+  else if (c == 'R' || c == 'r')
+  {
+    typename Kernel::Ray_2      ray;
+    is >> ray;
+    lobj = ray;
+  }
+  else
+  {
+    typename Kernel::Line_2     line;
+    is >> line;
+    lobj = line;
+  }
+
+  return (is);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_naive_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_naive_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_naive_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_naive_point_location.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_basic_traits_2.h
new file mode 100644
index 0000000..f96c3ff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_basic_traits_2.h
@@ -0,0 +1,278 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
+//                 Ron Wein  <wein at post.tau.ac.il>
+//                 (based on old version by: Iddo Hanniel,
+//                                           Eyal Flato,
+//                                           Oren Nechushtan,
+//                                           Ester Ezra,
+//                                           Shai Hirsch,
+//                                           and Eugene Lipovetsky)
+
+#ifndef CGAL_ARR_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
+#define CGAL_ARR_NON_CACHING_SEGMENT_BASIC_TRAITS_2_H
+
+/*! \file The basic non-caching segment traits-class for the arrangement
+ * package. This traits class handles x-monotone non-intersecting segments.
+ * It is a model of the ArrangementBasicTraits_2 concept. The class is
+ * templated by a kernel and inherits from it all the types and many of the
+ * functors required by the concept it models.
+ */
+
+#include <CGAL/Algebraic_structure_traits.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
+
+namespace CGAL {
+
+/*! \class
+ * A model of the ArrangementBasicTraits_2 concept that handles x-monotone
+ * non-intersecting line segments.
+ */
+template <class T_Kernel>
+class Arr_non_caching_segment_basic_traits_2 : public T_Kernel
+{
+public:
+
+  typedef T_Kernel                              Kernel;
+
+  typedef typename Kernel::FT                   FT;
+
+private:
+  typedef Algebraic_structure_traits<FT> AST;
+  typedef typename AST::Is_exact FT_is_exact;
+public:
+
+  typedef Boolean_tag<FT_is_exact::value> Has_exact_division;
+
+  typedef
+  CGAL::Segment_assertions<Arr_non_caching_segment_basic_traits_2<Kernel> >
+                                                Segment_assertions;
+
+  // Categories:
+  typedef Tag_true                              Has_left_category;
+  typedef Tag_false                             Has_do_intersect_category;
+
+  typedef Arr_oblivious_side_tag                Left_side_category;
+  typedef Arr_oblivious_side_tag                Bottom_side_category;
+  typedef Arr_oblivious_side_tag                Top_side_category;
+  typedef Arr_oblivious_side_tag                Right_side_category;
+
+  /*! Default Constructor */
+  Arr_non_caching_segment_basic_traits_2()
+  {}
+
+  /// \name Types and functor inherited from the kernel
+  //@{
+
+  // Traits types:
+  typedef typename Kernel::Point_2                 Point_2;
+  typedef typename Kernel::Segment_2               X_monotone_curve_2;
+  typedef unsigned int                             Multiplicity;
+
+  /*! Compare the x-coordinates of two points */
+  typedef typename Kernel::Compare_x_2             Compare_x_2;
+
+  /*! Compare two points lexigoraphically; by x, then by y */
+  typedef typename Kernel::Compare_xy_2            Compare_xy_2;
+
+  /*! Obtain the left endpoint of a given segment */
+  typedef typename Kernel::Construct_min_vertex_2  Construct_min_vertex_2;
+
+  /*! Obtain the right endpoint of a given segment */
+  typedef typename Kernel::Construct_max_vertex_2  Construct_max_vertex_2;
+
+  /*! Check whether a given segment is vertical */
+  typedef typename Kernel::Is_vertical_2           Is_vertical_2;
+
+  /*! Return the location of a given point with respect to an input segment */
+  typedef typename Kernel::Compare_y_at_x_2        Compare_y_at_x_2;
+
+  /*! Check if two segments or if two points are identical */
+  typedef typename Kernel::Equal_2                 Equal_2;
+
+  //@}
+
+  /// \name Functor introduced here (based on the kernel)
+  //@{
+
+  /*! \class
+   * A functor for comparing two segments to the left of a point
+   */
+  class Compare_y_at_x_left_2 {
+  public:
+
+    /*
+     * Compare the y value of two segments immediately to the left of their
+     * intersection point.
+     * \param cv1 The first segment.
+     * \param cv2 The second segment.
+     * \param p The intersection point.
+     * \pre The point p lies on both segments, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv1,
+                                 const X_monotone_curve_2& cv2,
+                                 const Point_2& CGAL_precondition_code(p)) const
+    {
+      Kernel kernel;
+
+      // The two segments must be defined at q and also to its left.
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&&
+         Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division()));
+
+      CGAL_precondition_code(
+        Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
+        typename Kernel::Construct_vertex_2 construct_vertex =
+          kernel.construct_vertex_2_object();
+        const Point_2 & source1 = construct_vertex(cv1, 0);
+        const Point_2 & target1 = construct_vertex(cv1, 1);
+        const Point_2 & left1 =
+          (kernel.less_xy_2_object()(source1, target1)) ? source1 : target1;
+        const Point_2 & source2 = construct_vertex(cv2, 0);
+        const Point_2 & target2 = construct_vertex(cv2, 1);
+        const Point_2 & left2 =
+          (kernel.less_xy_2_object()(source2, target2)) ? source2 : target2;
+        );
+
+      CGAL_precondition(compare_xy(left1, p) == SMALLER &&
+                        compare_xy(left2, p) == SMALLER);
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+      // Notice that we swap the order of the curves in order to obtain the
+      // correct result to the left of p.
+      return kernel.compare_slope_2_object()(cv2, cv1);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
+  {
+    return Compare_y_at_x_left_2();
+  }
+
+  /*! \class
+   * A functor for comparing two segments to the right of a point.
+   */
+  class Compare_y_at_x_right_2 {
+  public:
+
+    /*!
+     * Compare the y value of two segments immediately to the right of their
+     * intersection point.
+     * \param cv1 The first segment.
+     * \param cv2 The second segment.
+     * \param p The intersection point.
+     * \pre The point p lies on both segments, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+
+    Comparison_result operator()(const X_monotone_curve_2 & cv1,
+                                 const X_monotone_curve_2 & cv2,
+                                 const Point_2 & CGAL_precondition_code(p)) const
+    {
+      Kernel kernel;
+
+      // The two segments must be defined at q and also to its right.
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&&
+         Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division()));
+
+      CGAL_precondition_code(
+        Compare_xy_2 compare_xy = kernel.compare_xy_2_object();
+        typename Kernel::Construct_vertex_2 construct_vertex =
+          kernel.construct_vertex_2_object();
+        const Point_2 & source1 = construct_vertex(cv1, 0);
+        const Point_2 & target1 = construct_vertex(cv1, 1);
+        const Point_2 & right1 =
+          (kernel.less_xy_2_object()(source1, target1)) ? target1 : source1;
+        const Point_2 & source2 = construct_vertex(cv2, 0);
+        const Point_2 & target2 = construct_vertex(cv2, 1);
+        const Point_2 & right2 =
+          (kernel.less_xy_2_object()(source2, target2)) ? target2 : source2;
+        );
+
+      CGAL_precondition(compare_xy(right1, p) == LARGER &&
+                        compare_xy(right2, p) == LARGER);
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+       return kernel.compare_slope_2_object()(cv1, cv2);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
+  {
+    return Compare_y_at_x_right_2();
+  }
+  //@}
+
+  /// \name Functor definitions for the landmarks point-location strategy.
+  //@{
+  typedef double                          Approximate_number_type;
+
+  class Approximate_2
+  {
+  public:
+
+    /*!
+     * Return an approximation of a point coordinate.
+     * \param p The exact point.
+     * \param i The coordinate index (either 0 or 1).
+     * \pre i is either 0 or 1.
+     * \return An approximation of p's x-coordinate (if i == 0), or an
+     *         approximation of p's y-coordinate (if i == 1).
+     */
+    Approximate_number_type operator() (const Point_2& p,
+                                        int i) const
+    {
+      CGAL_precondition (i == 0 || i == 1);
+
+      if (i == 0)
+	return (CGAL::to_double(p.x()));
+      else
+	return (CGAL::to_double(p.y()));
+    }
+  };
+
+  /*! Get an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object () const
+  {
+    return Approximate_2();
+  }
+
+  typedef typename Kernel::Construct_segment_2    Construct_x_monotone_curve_2;
+
+  /*! Get a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
+  {
+    return (this->construct_segment_2_object());
+  }
+  //@}
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_traits_2.h
new file mode 100644
index 0000000..3d5ab03
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_non_caching_segment_traits_2.h
@@ -0,0 +1,429 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel    <efif at post.tau.ac.il>
+//                 Ron Wein     <wein at post.tau.ac.il>
+//                 (base on old version by: Iddo Hanniel)
+
+#ifndef CGAL_ARR_NON_CACHING_SEGMENT_TRAITS_H
+#define CGAL_ARR_NON_CACHING_SEGMENT_TRAITS_H
+
+/*! \file The non-caching segment traits-class for the arrangement package.
+ * This traits class handles general segments. It is a model of the
+ * ArrangementTraits_2 concept, a refinement of the ArrangementBasicTraits_2
+ * concept. The class is templated by a kernel and inherits from the
+ * Arr_non_caching_segment_basic_traits_2 class instanciated with the kernel -
+ * a model of the ArrangementBasicTraits_2 concept. It defined a few additional
+ * functors required by the concept it models.
+ */
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_non_caching_segment_basic_traits_2.h>
+#include <CGAL/intersections.h>
+
+namespace CGAL {
+
+/*! \class
+ * A model of the ArrangementTraits_2 concept that handles general
+ * line segments.
+ */
+template <class Kernel_T = Exact_predicates_exact_constructions_kernel>
+class Arr_non_caching_segment_traits_2 :
+  public Arr_non_caching_segment_basic_traits_2<Kernel_T>
+{
+public:
+  typedef Kernel_T                                         Kernel;
+
+  typedef Arr_non_caching_segment_basic_traits_2<Kernel>   Base;
+  typedef typename Base::Segment_assertions                Segment_assertions;
+  typedef typename Base::Has_exact_division                Has_exact_division;
+
+  /*! Default constructor */
+  Arr_non_caching_segment_traits_2() : Base() {}
+
+  /// \name Types and functors inherited from the base
+  //@{
+
+  // Traits types:
+  typedef typename Base::Has_left_category           Has_left_category;
+  typedef typename Base::Has_do_intersect_category   Has_do_intersect_category;
+
+  typedef typename Base::Left_side_category      Left_side_category;
+  typedef typename Base::Bottom_side_category    Bottom_side_category;
+  typedef typename Base::Top_side_category       Top_side_category;
+  typedef typename Base::Right_side_category     Right_side_category;
+
+  typedef typename Base::Point_2                     Point_2;
+  typedef typename Base::X_monotone_curve_2          X_monotone_curve_2;
+  typedef typename Base::Multiplicity                Multiplicity;
+
+  /*! Compare the x-coordinates of two points */
+  typedef typename Base::Compare_x_2            Compare_x_2;
+
+  /*! Compare two points lexigoraphically; by x, then by y */
+  typedef typename Base::Compare_xy_2           Compare_xy_2;
+
+  /*! Obtain the left endpoint of a given segment */
+  typedef typename Base::Construct_min_vertex_2 Construct_min_vertex_2;
+
+  /*! Obtain the right endpoint of a given segment */
+  typedef typename Base::Construct_max_vertex_2 Construct_max_vertex_2;
+
+  /*! Check whether a given segment is vertical */
+  typedef typename Base::Is_vertical_2          Is_vertical_2;
+
+  /*! Return the location of a given point with respect to an input segment */
+  typedef typename Base::Compare_y_at_x_2       Compare_y_at_x_2;
+
+  /*! Check if two segments or if two points are identical */
+  typedef typename Base::Equal_2                Equal_2;
+
+  /*! Compare the y value of two segments immediately to the left of their
+   * intersection point
+   */
+  typedef typename Base::Compare_y_at_x_left_2  Compare_y_at_x_left_2;
+
+  /*! Compare the y value of two segments immediately to the right of their
+   * intersection point
+   */
+  typedef typename Base::Compare_y_at_x_right_2 Compare_y_at_x_right_2;
+
+  //@}
+
+  /// \name Types and functors introduced here (based on the kernel)
+  //@{
+
+  // Categories:
+  typedef Tag_true                              Has_merge_category;
+
+  // Traits types:
+  typedef X_monotone_curve_2                    Curve_2;
+
+  /*! \class
+   * A functor for splitting curves into x-monotone pieces.
+   */
+  class Make_x_monotone_2
+  {
+  public:
+
+    /*!
+     * Cut the given segment into x-monotone subcurves and insert them into
+     * the given output iterator. As segments are always x_monotone, only one
+     * x-monotone curve is inserted into the output iterator.
+     * \param cv The segment.
+     * \param oi The output iterator, whose value-type is Object. The output
+     *           object is a wrapper of an X_monotone_curve_2 object.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator()(const Curve_2 & cv, OutputIterator oi) const
+    {
+      *oi = make_object (cv);
+      ++oi;
+      return (oi);
+    }
+  };
+
+  /*! Get a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object() const
+  {
+    return Make_x_monotone_2();
+  }
+
+  /*! \class
+   * A functor for splitting a segment into two segements.
+   */
+  class Split_2
+  {
+    typedef Arr_non_caching_segment_traits_2<Kernel_T>    Self;
+  public:
+
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator()(const X_monotone_curve_2 & cv, const Point_2 & p,
+                    X_monotone_curve_2 & c1, X_monotone_curve_2 & c2) const
+    {
+      Base base;
+
+      // Make sure that p lies on the interior of the curve.
+      CGAL_precondition_code (
+        Compare_xy_2 compare_xy = base.compare_xy_2_object();
+      );
+
+      Construct_min_vertex_2 min_vertex = base.construct_min_vertex_2_object();
+      Construct_max_vertex_2 max_vertex = base.construct_max_vertex_2_object();
+
+      const Point_2 & left = min_vertex(cv);
+      const Point_2 & right = max_vertex(cv);
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on(p, cv, Has_exact_division())&&
+         compare_xy(left, p) == SMALLER &&
+         compare_xy(right, p) == LARGER);
+
+      typename Base::Construct_segment_2 construct_segment =
+        base.construct_segment_2_object();
+
+      Self self;
+      if(self.compare_endpoints_xy_2_object()(cv) == SMALLER)
+      {
+        c1 = construct_segment(left, p);
+        c2 = construct_segment(p, right);
+      }
+      else
+      {
+        c1 = construct_segment(p, left);
+        c2 = construct_segment(right, p);
+      }
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object() const
+  {
+    return Split_2();
+  }
+
+  /*! \class
+   * A functor for computing intersections.
+   */
+  class Intersect_2
+  {
+    typedef Arr_non_caching_segment_traits_2<Kernel_T>    Self;
+
+  public:
+    /*! Find the intersections of the two given segments and insert them into
+     * the given output iterator. As two segments may itersect only once, only
+     * a single intersection will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator()(const X_monotone_curve_2 & cv1,
+                              const X_monotone_curve_2 & cv2,
+                              OutputIterator oi) const
+    {
+      Base   base;
+      Object res = base.intersect_2_object()(cv1, cv2);
+
+      // There is no intersection:
+      if (res.is_empty())
+        return (oi);
+
+      // Chack if the intersection is a point:
+      const Point_2             *ip;
+
+      if ((ip = object_cast<Point_2> (&res)) != NULL)
+      {
+        // Create a pair representing the point with its multiplicity,
+        // which is always 1 for line segments for all practical purposes.
+        // If the two segments intersect at their endpoints, then the
+        // multiplicity is undefined, but we deliberately ignore it for
+        // efficieny reasons.
+        std::pair<Point_2,Multiplicity> ip_mult(*ip, 1);
+        *oi = make_object (ip_mult);
+        ++oi;
+      }
+      else
+      {
+        // The intersection is a segment.
+
+        const X_monotone_curve_2 *ov = object_cast<X_monotone_curve_2>(&res);
+        CGAL_assertion (ov != NULL);
+
+        Self self;
+        Comparison_result cmp1 = self.compare_endpoints_xy_2_object()(cv1);
+        Comparison_result cmp2 = self.compare_endpoints_xy_2_object()(cv2);
+
+        if(cmp1 == cmp2)
+        {
+          // cv1 and cv2 have the same directions, maintain this direction
+          // in the overlap segment
+          if(self.compare_endpoints_xy_2_object()(*ov) != cmp1)
+          {
+            Kernel k;
+            res = make_object(k.construct_opposite_segment_2_object()(*ov));
+          }
+        }
+
+        *oi = res;
+        ++oi;
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object() const
+  {
+    return Intersect_2();
+  }
+
+  /*! \class
+   * A functor for testing whether two segments are mergeable.
+   */
+  class Are_mergeable_2 {
+  protected:
+    typedef Arr_non_caching_segment_traits_2<Kernel>    Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_non_caching_segment_traits_2<Kernel>;
+
+  public:
+
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable, that is, if they are
+     *         supported by the same line; (false) otherwise.
+     * \pre cv1 and cv2 share a common endpoint.
+     */
+    bool operator()(const X_monotone_curve_2 & cv1,
+                    const X_monotone_curve_2 & cv2) const
+    {
+      const Base* base = m_traits;
+      Equal_2 equal = base->equal_2_object();
+      Construct_min_vertex_2 min_vertex = base->construct_min_vertex_2_object();
+      Construct_max_vertex_2 max_vertex = base->construct_max_vertex_2_object();
+      if (!equal(max_vertex(cv1), min_vertex(cv2)) &&
+          !equal(max_vertex(cv2), min_vertex(cv1)))
+        return false;
+
+      // Check if the two curves have the same supporting line.
+      return (base->compare_slope_2_object()(cv1, cv2) == EQUAL);
+    }
+  };
+
+  /*! Obtain an Are_mergeable_2 functor object */
+  Are_mergeable_2 are_mergeable_2_object() const
+  { return Are_mergeable_2(this); }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2 {
+  protected:
+    typedef Arr_non_caching_segment_traits_2<Kernel>    Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_non_caching_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Merge two given segments into a single segment.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator()(const X_monotone_curve_2 & cv1,
+                    const X_monotone_curve_2 & cv2,
+                    X_monotone_curve_2 & c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      const Base* base = m_traits;
+      Equal_2 equal = base->equal_2_object();
+      Construct_min_vertex_2 min_vertex = base->construct_min_vertex_2_object();
+      Construct_max_vertex_2 max_vertex = base->construct_max_vertex_2_object();
+
+      // Check which curve extends to the right of the other.
+      const Point_2& left1 = min_vertex(cv1);
+      const Point_2& right1 = max_vertex(cv1);
+      const Point_2& left2 = min_vertex(cv2);
+      const Point_2& right2 = max_vertex(cv2);
+
+      if (equal(right1, left2)) {
+        // cv2 extends cv1 to the right.
+        c = base->construct_segment_2_object()(left1, right2);
+        return;
+      }
+      // cv1 extends cv2 to the right.
+      CGAL_precondition(equal(right2, left1));
+
+      c = base->construct_segment_2_object()(left2, right1);
+    }
+  };
+
+  /*! Obtain a Merge_2 functor object */
+  Merge_2 merge_2_object() const { return Merge_2(this); }
+  //@}
+
+  //! \name Functor definitions for the Boolean set-operations.
+  //@{
+  typedef typename Kernel::Construct_opposite_segment_2  Construct_opposite_2;
+
+  /*! Obtain a Construct_opposite_2 functor object */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2();
+  }
+
+  class Compare_endpoints_xy_2
+  {
+  public:
+    /*!
+     * Compare the two endpoints of a given curve lexigoraphically.
+     * \param cv The curve.
+     * \return SMALLER if cv is directed from left to right and LARGER
+     * otherwise.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv) const
+    {
+      typedef typename Kernel::Construct_vertex_2     Construct_vertex_2;
+
+      Kernel k;
+      Base b;
+      Construct_vertex_2 ctr_v = k.construct_vertex_2_object();
+      Compare_xy_2 cmp_xy = b.compare_xy_2_object();
+      return(cmp_xy(ctr_v(cv,0), ctr_v(cv,1)));
+    }
+  };
+
+  /*! Obtain a Compare_endpoints_xy_2 functor object */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+  //@}
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_observer.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_observer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_observer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_observer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_overlay.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_overlay.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_overlay.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_overlay.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_overlay_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_overlay_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_overlay_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_overlay_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_generator_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_generator_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_generator_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_random_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_random_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_random_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_random_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
new file mode 100644
index 0000000..772fc05
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
@@ -0,0 +1,444 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
+//                 (based on old version by Eyal Flato)
+//                 Efi Fogel  <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_SIMPLE_POINT_LOCATION_FUNCTIONS_H
+#define CGAL_ARR_SIMPLE_POINT_LOCATION_FUNCTIONS_H
+
+/*! \file
+ * Member-function definitions for the Arr_simple_point_location<Arrangement>
+ * class.
+ */
+
+namespace CGAL {
+
+//-----------------------------------------------------------------------------
+// Locate the arrangement feature containing the given point.
+//
+template <class Arrangement>
+typename Arr_simple_point_location<Arrangement>::Result_type
+Arr_simple_point_location<Arrangement>::locate(const Point_2& p) const
+{
+  // Go over the arrangement vertices and check whether one of them equals
+  // the query point.
+  typename Traits_adaptor_2::Equal_2 equal = m_geom_traits->equal_2_object();
+  typename Arrangement::Vertex_const_iterator  vit;
+  for (vit = m_arr->vertices_begin(); vit != m_arr->vertices_end(); ++vit) {
+    Vertex_const_handle vh = vit;
+    if (equal(p, vh->point()))
+      return make_result(vh);
+  }
+
+  // Go over arrangement halfedges and check whether one of them contains
+  // the query point in its interior.
+  typename Traits_adaptor_2::Is_in_x_range_2  is_in_x_range =
+    m_geom_traits->is_in_x_range_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_2 cmp_y_at_x =
+    m_geom_traits->compare_y_at_x_2_object();
+
+  typename Arrangement::Edge_const_iterator   eit;
+  for (eit = m_arr->edges_begin(); eit != m_arr->edges_end(); ++eit) {
+    Halfedge_const_handle hh = eit;
+    if (is_in_x_range(hh->curve(), p) && (cmp_y_at_x(p, hh->curve()) == EQUAL))
+      return make_result(hh);
+  }
+
+  // Shoot a vertical ray from the query point.
+  // The ray shooting returns either a vertex of a halfedge (or an empty
+  // object).
+  Optional_result_type optional_obj = _base_vertical_ray_shoot(p, true);
+  if (optional_empty(optional_obj)) {
+    // We should return the unbounded face.
+    Face_const_handle fh = Face_const_handle(m_topol_traits->initial_face());
+    return make_result(fh);
+  }
+
+  const Result_type& obj = optional_assign(optional_obj);
+
+  // In case the ray-shooting returned a vertex, we have to locate the first
+  // halfedge whose source vertex is v, rotating clockwise around the vertex
+  // from "6 o'clock", and to return its incident face.
+  const Vertex_const_handle* vh = Result().template assign<Vertex_const_handle>(obj);
+  if (vh) {
+    Halfedge_const_handle hh = _first_around_vertex(*vh);
+    Face_const_handle fh = hh->face();
+    return make_result(fh);
+  }
+
+  const Halfedge_const_handle* hh = Result().template assign<Halfedge_const_handle>(obj);
+  if (hh) {
+    // Make sure that the edge is directed from right to left, so that p
+    // (which lies below it) is contained in its incident face. If necessary,
+    // we take the twin halfedge.
+    Face_const_handle fh = ((*hh)->direction() == ARR_LEFT_TO_RIGHT) ?
+      (*hh)->twin()->face() : (*hh)->face();    // Return the incident face.
+    return make_result(fh);
+  }
+
+  CGAL_error();
+  return default_result();
+}
+
+//-----------------------------------------------------------------------------
+// Locate the arrangement feature which a vertical ray emanating from the
+// given point hits (not inculding isolated vertices).
+//
+template <class Arrangement>
+typename Arr_simple_point_location<Arrangement>::Optional_result_type
+Arr_simple_point_location<Arrangement>::
+_base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
+{
+  // Set the results for comparison according to the ray direction.
+  const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
+  const Comparison_result curve_above_under = (shoot_up ? LARGER : SMALLER);
+
+  // Go over all halfedges in the arrangement.
+  typename Traits_adaptor_2::Is_vertical_2 is_vertical =
+    m_geom_traits->is_vertical_2_object();
+  typename Traits_adaptor_2::Compare_y_position_2 compare_y_position =
+    m_geom_traits->compare_y_position_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right =
+    m_geom_traits->compare_y_at_x_right_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_left_2 compare_y_at_x_left =
+    m_geom_traits->compare_y_at_x_left_2_object();
+
+  typename Dcel::Edge_const_iterator  eit =
+    m_topol_traits->dcel().edges_begin();
+  typename Dcel::Edge_const_iterator  e_end =
+    m_topol_traits->dcel().edges_end();
+  const typename Dcel::Halfedge*  he;   // The current edge.
+  const typename Dcel::Vertex*    vs;   // The current edge source
+  const typename Dcel::Vertex*    vt;   // The current edge target.
+  Comparison_result               res_s;
+  Comparison_result               res = EQUAL;
+  Comparison_result               y_res;
+  bool                            in_x_range;
+  const typename Dcel::Halfedge*  closest_he = NULL; // The closest so far.
+  const typename Dcel::Vertex*    cl_vs = NULL;      // Its source.
+  const typename Dcel::Vertex*    cl_vt = NULL;      // Its target.
+
+  while (eit != e_end) {
+    // Get the current edge and its source and target vertices.
+    he = &(*eit);
+    vs = he->opposite()->vertex();
+    vt = he->vertex();
+
+    // Determine whether p is in the x-range of the curve and above or below it
+    // (according to the direction of the shoot).
+    res_s = m_topol_traits->compare_x(p, vs);
+
+    in_x_range = (res_s == EQUAL) ? true :
+      ((((res_s == SMALLER) && (he->direction() == ARR_LEFT_TO_RIGHT)) ||
+        ((res_s == LARGER) && (he->direction() == ARR_RIGHT_TO_LEFT))) ? false :
+       (res_s != m_topol_traits->compare_x(p, vt)));
+
+    if (in_x_range)
+      res = m_topol_traits->compare_y_at_x(p, he);
+
+    if (in_x_range && (res == point_above_under)) {
+      if (closest_he == NULL) {
+        // If no other x-monotone curve containing p in its x-range has been
+        // found yet, take the current one as the vertically closest to p.
+        closest_he = he;
+        cl_vs = vs;
+        cl_vt = vt;
+      }
+      else {
+        // Compare with the vertically closest curve so far and detemine the
+        // curve closest to p. We first check the case that the two curves
+        // have a common endpoint (note that the two curves do not intersect
+        // in their interiors). Observe that if such a common vertex exists,
+        // it is certainly not a vertex at infinity, therefore it is
+        // associated with a valid point.
+        if (((cl_vs == vs) && (closest_he->direction() == eit->direction())) ||
+            ((cl_vs == vt) && (closest_he->direction() != eit->direction())))
+        {
+          CGAL_assertion(! cl_vs->has_null_point());
+
+          y_res = (closest_he->direction() == ARR_LEFT_TO_RIGHT) ?
+            // Both curves extend to the right from a common point.
+            compare_y_at_x_right(closest_he->curve(), eit->curve(),
+                                 cl_vs->point()) :
+            // Both curves extend to the left from a common point.
+            compare_y_at_x_left(closest_he->curve(), eit->curve(),
+                                cl_vs->point());
+
+        }
+        else if ((cl_vt == vs && closest_he->direction() != eit->direction()) ||
+                 (cl_vt == vt && closest_he->direction() == eit->direction()))
+        {
+          CGAL_assertion(! cl_vt->has_null_point());
+
+          y_res = (closest_he->direction() == ARR_LEFT_TO_RIGHT) ?
+            // Both curves extend to the left from a common point.
+            compare_y_at_x_left(closest_he->curve(), eit->curve(),
+                                cl_vt->point()) :
+            // Both curves extend to the right from a common point.
+            compare_y_at_x_right(closest_he->curve(), eit->curve(),
+                                 cl_vt->point());
+        }
+        else {
+          // In case the two curves do not have a common endpoint, but overlap
+          // in their x-range (both contain p), just compare their positions.
+          // Note that in this case one of the edges may be fictitious, so we
+          // preform the comparsion symbolically in this case.
+          y_res = (closest_he->has_null_curve()) ? curve_above_under :
+            ((eit->has_null_curve()) ? point_above_under :
+             compare_y_position(closest_he->curve(), eit->curve()));
+        }
+
+        // If the current edge is closer to the query point than the closest
+        // edge so far, update the closest edge.
+        if (y_res == curve_above_under) {
+          closest_he = he;
+          cl_vs = vs;
+          cl_vt = vt;
+        }
+      }
+    }
+
+    if ((in_x_range && res == EQUAL) &&
+        ! eit->has_null_curve() && is_vertical(eit->curve()))
+    {
+      // Check if the query point is one of the end-vertices of the vertical
+      // edge.
+      Comparison_result  res1 = m_topol_traits->compare_xy(p, vs);
+      Comparison_result  res2 = m_topol_traits->compare_xy(p, vt);
+
+      if (! (((res1 == EQUAL) && (res2 == curve_above_under)) ||
+             ((res1 == curve_above_under) && (res2 == EQUAL))))
+      {
+        // The vertical ray overlaps an existing vertical edge containing p.
+        // In this case simply return this edge.
+        closest_he = he;
+        return make_result(Halfedge_const_handle(closest_he));
+      }
+    }
+
+    // Move to the next edge.
+    ++eit;
+  }
+
+  // If we did not locate a closest halfedge, return an empty object.
+  if (closest_he == NULL)
+    return make_optional_result();
+
+  // If we found a fictitious edge, return it now.
+  if (closest_he->has_null_curve())
+    return make_result(Halfedge_const_handle(closest_he));
+
+  // If one of the closest edge's end vertices has the same x-coordinate
+  // as the query point, return this vertex.
+  if (! is_vertical(closest_he->curve())) {
+    if (! cl_vs->has_null_point() &&
+        m_geom_traits->compare_x_2_object()(cl_vs->point(), p) == EQUAL)
+      return make_result(Vertex_const_handle(cl_vs));
+    else if (! cl_vt->has_null_point() &&
+             m_geom_traits->compare_x_2_object()(cl_vt->point(), p) == EQUAL)
+      return make_result(Vertex_const_handle(cl_vt));
+  }
+  else {
+    CGAL_assertion_code(
+      Comparison_result  res1 = m_topol_traits->compare_xy(p, cl_vs);
+      Comparison_result  res2 = m_topol_traits->compare_xy(p, cl_vt));
+
+    CGAL_assertion(res1 == res2);
+    CGAL_assertion(res1 == point_above_under);
+
+    return ((shoot_up && closest_he->direction() == ARR_LEFT_TO_RIGHT) ||
+            (! shoot_up && closest_he->direction() == ARR_RIGHT_TO_LEFT)) ?
+      make_result(Vertex_const_handle(cl_vs)) :
+      make_result(Vertex_const_handle(cl_vt));
+  }
+
+  // Otherwise, return the closest edge.
+  return make_result(Halfedge_const_handle(closest_he));
+}
+
+//-----------------------------------------------------------------------------
+// Locate the arrangement feature which a vertical ray emanating from the
+// given point hits, considering isolated vertices.
+//
+template <typename Arrangement>
+typename Arr_simple_point_location<Arrangement>::Result_type
+Arr_simple_point_location<Arrangement>::_vertical_ray_shoot(const Point_2& p,
+                                                            bool shoot_up) const
+{
+  // Locate the arrangement feature which a vertical ray emanating from the
+  // given point hits, when not considering the isolated vertices.
+  // This feature may not exist, or be either a vertex of a halfedge.
+  Optional_result_type optional_obj = _base_vertical_ray_shoot(p, shoot_up);
+  bool                   found_vertex = false;
+  bool                   found_halfedge = false;
+  Vertex_const_handle    closest_v;
+  Halfedge_const_handle  closest_he;
+
+  if (! optional_empty(optional_obj)) {
+    const Result_type& obj = optional_assign(optional_obj);
+    const Vertex_const_handle* p_vh = Result().template assign<Vertex_const_handle>(obj);
+    if (p_vh) {
+      found_vertex = true;
+      closest_v = *p_vh;
+    }
+    else {
+      const Halfedge_const_handle* p_hh =
+        Result().template assign<Halfedge_const_handle>(obj);
+      CGAL_assertion(p_hh != NULL);
+      found_halfedge = true;
+      closest_he = *p_hh;
+    }
+  }
+
+  // Set the result for comparison according to the ray direction.
+  const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
+
+  // Go over all isolated vertices in the arrangement.
+  typename Traits_adaptor_2::Compare_x_2 compare_x =
+    m_geom_traits->compare_x_2_object();
+  typename Traits_adaptor_2::Compare_xy_2 compare_xy =
+    m_geom_traits->compare_xy_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_2 compare_y_at_x =
+    m_geom_traits->compare_y_at_x_2_object();
+
+  Vertex_const_handle                          vh;
+  typename Arrangement::Vertex_const_iterator  vit;
+  for (vit = m_arr->vertices_begin(); vit != m_arr->vertices_end(); ++vit) {
+    vh = vit;
+    if (! vh->is_isolated())
+      continue;
+
+    // The current isolated vertex should have the same x-coordinate as the
+    // query point in order to be below or above it.
+    if (compare_x(p, vh->point()) != EQUAL)
+      continue;
+
+    // Make sure the isolated vertex is above the query point (if we shoot up)
+    // or below it (if we shoot down).
+    if (compare_xy(p, vh->point()) != point_above_under)
+      continue;
+
+    // Check if the isolated vertex is closer to p than the current closest
+    // object.
+    if ((found_vertex &&
+         (closest_v->is_at_open_boundary() ||
+          compare_xy(vh->point(), closest_v->point()) == point_above_under)) ||
+        (! found_vertex &&
+         (! found_halfedge ||
+          closest_he->is_fictitious() ||
+          compare_y_at_x(vh->point(), closest_he->curve()) ==
+          point_above_under)))
+    {
+      found_vertex = true;
+      closest_v = vh;
+    }
+  }
+
+  // If we found a vertex, return it.
+  if (found_vertex)
+    return make_result(closest_v);
+
+  if (found_halfedge) {
+    // If we found a valid edge, return it.
+    if (! closest_he->is_fictitious())
+      return make_result(closest_he);
+
+    // If we found a fictitious edge, we have to return a handle to its
+    // incident unbounded face.
+    if ((shoot_up && closest_he->direction() == ARR_LEFT_TO_RIGHT) ||
+        (!shoot_up && closest_he->direction() == ARR_RIGHT_TO_LEFT))
+      closest_he = closest_he->twin();
+    Face_const_handle fh = closest_he->face();
+    return make_result(fh);
+  }
+
+  // If we have no halfedge above, return the initial face.
+  Face_const_handle  uf = Face_const_handle(m_topol_traits->initial_face());
+  return make_result(uf);
+}
+
+//-----------------------------------------------------------------------------
+// Find the first halfedge with a given source vertex, when going clockwise
+// from "6 o'clock" around this vertex.
+//
+template <class Arrangement>
+typename Arr_simple_point_location<Arrangement>::Halfedge_const_handle
+Arr_simple_point_location<Arrangement>::
+_first_around_vertex(Vertex_const_handle v) const
+{
+  // Travrse the incident halfedges of the current vertex and locate the
+  // lowest one to its left and the topmost to its right.
+  typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right =
+    m_geom_traits->compare_y_at_x_right_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_left_2  compare_y_at_x_left =
+    m_geom_traits->compare_y_at_x_left_2_object();
+
+  const Halfedge_const_handle   invalid_handle;
+  Halfedge_const_handle         lowest_left;
+  Halfedge_const_handle         top_right;
+
+  bool found_lowest_left = false;
+  bool found_top_right = false;
+
+  typename Arrangement::Halfedge_around_vertex_const_circulator  first =
+    v->incident_halfedges();
+  typename Arrangement::Halfedge_around_vertex_const_circulator  curr = first;
+
+  do {
+    // Check whether the current halfedge is defined to the left or to the
+    // right of the given vertex.
+    if (curr->direction() == ARR_LEFT_TO_RIGHT) {
+      // The curve associated with the current halfedge is defined to the left
+      // of v.
+      if (! found_lowest_left ||
+          (! curr->is_fictitious() &&
+           compare_y_at_x_left(curr->curve(), lowest_left->curve(),
+                               v->point()) == SMALLER))
+      {
+        lowest_left = curr;
+        found_lowest_left = true;
+      }
+    }
+    else {
+      // The curve associated with the current halfedge is defined to the right
+      // of v.
+      if (! found_top_right ||
+          (! curr->is_fictitious() &&
+           compare_y_at_x_right(curr->curve(), top_right->curve(),
+                                v->point()) == LARGER))
+      {
+        top_right = curr;
+        found_top_right = true;
+      }
+    }
+
+    ++curr;
+  } while (curr != first);
+
+  // The first halfedge we encounter is the lowest to the left, but if there
+  // is no edge to the left, we first encounter the topmost halfedge to the
+  // right. Note that as the halfedge we located has v as its target, we now
+  // have to return its twin.
+  return (found_lowest_left) ? lowest_left->twin() : top_right->twin();
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_X_trapezoid.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_X_trapezoid.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_X_trapezoid.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_edge.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_edge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_edge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_edge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_trapezoid.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_trapezoid.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_trapezoid.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_active_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_active_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_dag.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_dag.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_dag.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_dag.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_dag_node.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_dag_node.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_dag_node.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_dag_node.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_edge.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_edge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_edge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_edge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_inactive_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_inactive_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_ninetuple.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_ninetuple.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_ninetuple.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_ninetuple.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_predicates.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_predicates.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_predicates.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_predicates.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_traits_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_traits_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Td_traits_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Td_traits_functions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
new file mode 100644
index 0000000..c80590a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
@@ -0,0 +1,2317 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Oren Nechushtan <theoren at math.tau.ac.il>
+//                 Iddo Hanniel <hanniel at math.tau.ac.il>
+
+#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H
+#define CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H
+
+//#define CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+#include <CGAL/Arr_tags.h>
+#include <CGAL/basic.h>
+#include <CGAL/Arr_point_location/Td_predicates.h>
+#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h>
+
+#include <boost/optional.hpp>
+#include <boost/variant.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <cmath>
+#include <ctime>
+#include <list>
+#include <vector>
+#include <map>
+
+namespace CGAL {
+
+/*! \class Trapezoidal_decomposition_2
+ * parameters    Traits
+ * Description   Implementation for a planar trapezoidal map also known as
+ *   trapezoidal decomposition and vertical decomposition.
+ *
+ * For requirements on Traits and X_curve classes see
+ *   Trapezoidal_decomposition_2 documentation.
+ */
+template < class Td_traits>
+class Trapezoidal_decomposition_2
+{
+public:
+  enum Locate_type {
+    POINT=0,
+    CURVE,
+    TRAPEZOID,
+    UNBOUNDED_TRAPEZOID=8
+  };
+
+  //forward declarations & friend classes declarations
+  class Base_map_item_iterator;
+  class In_face_iterator;
+  friend class In_face_iterator;
+
+  //type of trapezoidal decomposition traits
+  typedef Td_traits Traits;
+
+  //type of the class itself
+  typedef Trapezoidal_decomposition_2<Traits> Self;
+
+  //typedef of arrangement on surface
+  typedef typename Traits::Arrangement_on_surface_2 Arrangement_on_surface_2;
+
+  //type of traits adaptor
+  typedef typename Traits::Arrangement_on_surface_2::Traits_adaptor_2
+    Traits_adaptor_2;
+
+  //type of point
+  typedef typename Traits::Point Point;
+
+  //!type of Halfedge_handle
+  typedef typename Traits::Halfedge_handle
+    Halfedge_handle;
+
+  //!type of Halfedge_const_handle
+  typedef typename Traits::Halfedge_const_handle
+    Halfedge_const_handle;
+
+  //!type of Vertex_const_handle
+  typedef typename Traits::Vertex_const_handle
+    Vertex_const_handle;
+
+  //type of X_monotone_curve
+  typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
+
+  //type of Curve end: X_monotone_curve_2 ref & Arr_curve_end
+  typedef typename Traits::Curve_end    Curve_end;
+
+  //type of td_map_item
+  typedef typename Traits::Td_map_item Td_map_item;
+
+  //type of Td_nothing
+  typedef typename Traits::Td_nothing Td_nothing;
+
+  //type of Td_active_trapezoid
+  typedef typename Traits::Td_active_trapezoid Td_active_trapezoid;
+
+  //type of Td_inactive_trapezoid
+  typedef typename Traits::Td_inactive_trapezoid Td_inactive_trapezoid;
+
+  //type of Td_active_edge
+  typedef typename Traits::Td_active_edge Td_active_edge;
+
+  //type of Td_inactive_edge
+  typedef typename Traits::Td_inactive_edge Td_inactive_edge;
+
+  //type of Td_active_vertex
+  typedef typename Traits::Td_active_vertex Td_active_vertex;
+
+  //type of Td_active_fictitious_vertex
+  typedef typename Traits::Td_active_fictitious_vertex
+    Td_active_fictitious_vertex;
+
+  //type of Td_inactive_vertex
+  typedef typename Traits::Td_inactive_vertex Td_inactive_vertex;
+
+  //type of Td_inactive_fictitious_vertex
+  typedef typename Traits::Td_inactive_fictitious_vertex
+    Td_inactive_fictitious_vertex;
+
+  //type of Curve end pair
+  typedef typename Traits::Curve_end_pair Curve_end_pair;
+
+  //type of Halfedge_const_handle-s' vector
+  typedef std::vector<Halfedge_const_handle> Halfedge_container;
+
+  //predicates
+  //typedef CGAL::Td_active_map_item<Td_map_item> Td_active_map_item;
+  typedef CGAL::Td_active_edge_item<Td_map_item, Traits> Td_active_edge_item;
+
+  //type of search structure DAG node
+  typedef Td_dag_node< Traits > Dag_node;
+
+  //type of map of DAG nodes
+  typedef std::map< int,Dag_node > Nodes_map;
+
+  //type of trapezoids comparison function - for the map
+  typedef Td_map_item_handle_less<const Td_map_item* const>
+    Td_map_item_ptr_less;
+
+  //type of trapezoids ptr map
+  typedef std::map<const Td_map_item*, Td_map_item*, Td_map_item_ptr_less>
+    Td_map_item_ptr_map;
+
+public:
+
+  /*! \class Base_map_item_iterator
+   * member of Trapezoidal_decomposition_2<Traits>
+   * Description Implements a basic Trapezoid iterator
+   */
+  class Base_map_item_iterator
+  {
+  public:
+    //constructors
+    Base_map_item_iterator() : traits(0), m_cur_item(Td_map_item(0)){ }
+
+    Base_map_item_iterator(const Traits* traits_,
+                           boost::optional<Td_map_item&> curr = boost::none)
+      :traits(traits_), m_cur_item((curr) ? *curr : Td_map_item(0) ) { }
+
+    Base_map_item_iterator(const Base_map_item_iterator &it)
+          :traits(it.traits), m_cur_item(it.m_cur_item) { }
+
+    //operator overloading
+    Base_map_item_iterator  & operator=(const Base_map_item_iterator &it)
+    {
+      traits = it.traits;
+      m_cur_item = it.m_cur_item;
+      return *this;
+    }
+
+    bool operator==(const Base_map_item_iterator &it) const
+    {
+      return (m_cur_item == it.m_cur_item);
+    }
+
+    bool operator!=(const Base_map_item_iterator &it) const
+    {
+      return !operator==(it);
+    }
+
+    Td_map_item& operator*() //const
+    {
+      CGAL_precondition(!traits->is_empty_item(m_cur_item));
+      return m_cur_item;
+    }
+
+    bool operator!() const
+    {
+      return traits->is_empty_item(m_cur_item);//!m_cur_item;
+    }
+
+  protected:
+    const Traits *traits; //pointer to the traits
+    Td_map_item m_cur_item; //the current map item (or none)
+  };
+
+/*! \class In_face_iterator
+   * member of Trapezoidal_decomposition_2<Traits>
+   * Derived from Base_map_item_iterator class
+   * Description Implements a Trapezoid iterator along a Halfedge
+   */
+  class In_face_iterator : public Base_map_item_iterator
+  {
+
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
+    using Base_map_item_iterator::m_cur_item;
+    using Base_map_item_iterator::traits;
+#endif
+
+  protected:
+    //reference to the seperating X_monotone_curve_2
+    const X_monotone_curve_2& m_sep;
+
+  public:
+    //constructors
+    In_face_iterator(const Traits* traits_, Halfedge_const_handle sep,
+                     boost::optional<Td_map_item&> curr = boost::none)
+            :Base_map_item_iterator(traits_,curr), m_sep(sep->curve())
+    { }
+
+    In_face_iterator(const Traits* traits_, const X_monotone_curve_2& sep,
+                     boost::optional<Td_map_item&> curr = boost::none)
+            :Base_map_item_iterator(traits_,curr), m_sep(sep)
+    { }
+
+
+    In_face_iterator(const In_face_iterator &it)
+            :Base_map_item_iterator((Base_map_item_iterator&)it),
+              m_sep(it.m_sep)
+    { }
+
+    //operatoror overloading
+    bool operator==(const In_face_iterator &it) const
+    {
+      return ( Base_map_item_iterator::operator==(it) &&
+               traits->equal_2_object()(m_sep,it.m_sep));
+    }
+
+    /*
+      destription:
+      advances m_cur_item to one of the right neighbours according to the relation
+      between the seperating Halfedge (m_sep) and the right() trapezoid point.
+      precoditions:
+      m_sep doesn't intersect any existing edges except possibly on common end
+      points.
+      postconditions:
+      if the rightmost trapezoid was traversed m_cur_item is set to NULL.
+      remark:
+      if the seperator is vertical, using the precondition assumptions it
+      follows that there is exactly one trapezoid to travel.
+    */
+    In_face_iterator& operator++()
+    {
+      if (traits->is_empty_item(m_cur_item))
+        return *this;// end reached, do nothing!
+
+#ifndef CGAL_TD_DEBUG
+      CGAL_warning(traits != NULL);
+#else
+      CGAL_assertion(traits != NULL);
+      CGAL_assertion(traits->is_active(m_cur_item));
+      //m_cur_item should be a trapezoid or an edge
+      CGAL_assertion(!traits->is_td_vertex(m_cur_item));
+#endif
+
+      if (traits->is_td_trapezoid(m_cur_item))
+      {
+        //if the map item is a trapezoid
+        Td_active_trapezoid tr (boost::get<Td_active_trapezoid>(m_cur_item));
+
+#ifndef CGAL_TD_DEBUG
+        CGAL_warning_code(Dag_node* tt = tr.dag_node();)
+        CGAL_warning(!tt->is_inner_node());
+#else
+        CGAL_assertion_code(Dag_node* tt = tr.dag_node();)
+        CGAL_assertion(tt);
+        CGAL_assertion(!tt->is_inner_node());
+#endif
+
+        // handle degeneracies
+        typename Traits::Compare_curve_end_xy_2 compare_xy =
+          traits->compare_curve_end_xy_2_object();
+        if (compare_xy (traits->vtx_to_ce(tr.left()),
+                        Curve_end(m_sep,ARR_MAX_END)) != SMALLER)
+        {
+          //if the trapezoid's left end point is equal to or larger from the
+          //  max end of sep, we reached the end of the iterator
+          m_cur_item = Td_map_item(0);
+        }
+        else
+        {
+          //if the trapezoid's left end point is smaller from the sep's max end
+
+          //comparing the y value of the trapezoid's right end point and sep
+          //   (at the trapezoid's right x value), in order to select the
+          //    next trapezoid in the iterator
+          typename Traits::Compare_curve_end_y_at_x_2 compare_y_at_x =
+            traits->compare_curve_end_y_at_x_2_object();
+          switch (compare_y_at_x (traits->vtx_to_ce(tr.right()), m_sep))
+          {
+           case SMALLER:
+              m_cur_item = tr.rt();
+            break;
+           case LARGER:
+              m_cur_item = tr.rb();
+            break;
+           case EQUAL:
+            // end reached
+             m_cur_item = Td_map_item(0);
+            break;
+           default:
+             m_cur_item = Td_map_item(0);
+            break;
+          }
+        }
+      }
+      else
+      {
+        //if the map item is an edge
+
+        Td_active_edge e (boost::get<Td_active_edge>(m_cur_item));
+        CGAL_assertion_code(Dag_node* tt = e.dag_node();)
+        CGAL_assertion(tt != NULL);
+        CGAL_assertion(tt->is_inner_node());
+
+        //go to next() of the current edge.
+        // as long as there is an edge fragment of the same
+        //  edge - next() exists.
+        // If next() does not exist we reached the last fragment of the edge
+        m_cur_item = e.next();
+        if (!traits->is_empty_item(m_cur_item))
+        {
+          //if next() exists, find the next real edge fragment trapezoid
+          //    (skip points)
+          while(traits->is_td_vertex(m_cur_item))
+          {
+            Dag_node* node =
+              boost::apply_visitor(dag_node_visitor(),m_cur_item);
+            m_cur_item = node->left_child().get_data();
+          }
+
+          //make sure we stopped in an edge
+          CGAL_warning(traits->is_td_edge(m_cur_item));
+        }
+      }
+      return *this;
+    }
+
+    In_face_iterator operator++(int)
+    {
+      In_face_iterator tmp = *this;
+      ++*this;
+      return tmp;
+    }
+
+    const X_monotone_curve_2& seperator()
+    {
+      return m_sep;
+    }
+
+    Td_active_trapezoid& trp()
+    {
+      CGAL_precondition (!traits->is_empty_item(m_cur_item));
+      CGAL_precondition (traits->is_active(m_cur_item) &&
+                         traits->is_td_trapezoid(m_cur_item));
+      return boost::get<Td_active_trapezoid>(m_cur_item);
+    }
+
+    Td_active_edge& e()
+    {
+      CGAL_precondition (!traits->is_empty_item(m_cur_item));
+      CGAL_precondition (traits->is_active(m_cur_item) &&
+                         traits->is_td_edge(m_cur_item));
+      return boost::get<Td_active_edge>(m_cur_item);
+    }
+
+  };
+
+  /*!  Visitors for accessing td map items methods */
+  class rb_visitor : public boost::static_visitor<Td_map_item>
+  {
+  public:
+    Td_map_item operator()(Td_active_trapezoid& t) const
+    {
+      return t.rb();
+    }
+
+    template < typename T >
+    Td_map_item operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return Td_map_item(0);
+    }
+  };
+
+  class set_rb_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_rb_visitor (const Td_map_item& rb) : m_rb(rb) {}
+
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      t.set_rb(m_rb);
+    }
+
+    template < typename T >
+    void operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+    }
+
+  private:
+    const Td_map_item& m_rb;
+  };
+
+  class rt_visitor : public boost::static_visitor<Td_map_item>
+  {
+  public:
+    Td_map_item operator()(Td_active_trapezoid& t) const
+    {
+      return t.rt();
+    }
+
+    template < typename T >
+    Td_map_item operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return Td_map_item(0);
+    }
+  };
+
+  class set_rt_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_rt_visitor (const Td_map_item& rt) : m_rt(rt) {}
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      t.set_rt(m_rt);
+    }
+
+    template < typename T >
+    void operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+
+  private:
+    const Td_map_item& m_rt;
+  };
+
+  class lb_visitor : public boost::static_visitor<Td_map_item>
+  {
+  public:
+    Td_map_item operator()(Td_active_trapezoid& t) const
+    {
+      return t.lb();
+    }
+
+    template < typename T >
+    Td_map_item operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return Td_map_item(0);
+    }
+  };
+
+  class set_lb_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_lb_visitor (const Td_map_item& lb) : m_lb(lb) {}
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      return t.set_lb(m_lb);
+    }
+
+    template < typename T >
+    void operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+    }
+
+  private:
+    const Td_map_item& m_lb;
+  };
+
+  class set_lt_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_lt_visitor (const Td_map_item& lt) : m_lt(lt) {}
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      t.set_lt(m_lt);
+    }
+
+    template < typename T >
+    void operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+
+  private:
+    const Td_map_item& m_lt;
+  };
+
+  class bottom_he_visitor : public boost::static_visitor<Halfedge_const_handle>
+  {
+  public:
+    Halfedge_const_handle operator()(Td_active_trapezoid& t) const
+    {
+      return t.bottom();
+    }
+
+    template < typename T >
+    Halfedge_const_handle operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+      return Halfedge_const_handle();
+    }
+  };
+
+  class set_bottom_he_visitor : public boost::static_visitor< void  >
+  {
+  public:
+    set_bottom_he_visitor (Halfedge_const_handle he) : m_bottom_he(he) {}
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      t.set_bottom(m_bottom_he);
+    }
+
+    template < typename T >
+    void operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+  private:
+    Halfedge_const_handle m_bottom_he;
+  };
+
+  class top_he_visitor : public boost::static_visitor<Halfedge_const_handle>
+  {
+  public:
+     Halfedge_const_handle operator()(Td_active_trapezoid& t) const
+    {
+      return t.top();
+    }
+
+    template < typename T >
+    Halfedge_const_handle operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return Halfedge_const_handle();
+    }
+  };
+
+  class set_top_he_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_top_he_visitor (Halfedge_const_handle he) : m_top_he(he) {}
+
+    void operator()(Td_active_trapezoid& t) const
+    {
+      t.set_top(m_top_he);
+    }
+
+    template < typename T >
+    void operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+    }
+  private:
+    Halfedge_const_handle m_top_he;
+  };
+
+  class cw_he_visitor : public boost::static_visitor< Halfedge_const_handle  >
+  {
+  public:
+    Halfedge_const_handle operator()(Td_active_vertex& t) const
+    {
+      return t.cw_he();
+    }
+    Halfedge_const_handle operator()(Td_active_fictitious_vertex& t) const
+    {
+      return t.cw_he();
+    }
+
+    template < typename T >
+    Halfedge_const_handle operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+      return Halfedge_const_handle();
+    }
+  };
+
+  class set_cw_he_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_cw_he_visitor (Halfedge_const_handle he) : m_cw_he(he) {}
+
+    void operator()(Td_active_vertex& t) const
+    {
+      t.set_cw_he(m_cw_he);
+    }
+    void operator()(Td_active_fictitious_vertex& t) const
+    {
+      t.set_cw_he(m_cw_he);
+    }
+
+    template < typename T >
+    void operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+  private:
+    Halfedge_const_handle m_cw_he;
+  };
+
+  class dag_node_visitor : public boost::static_visitor<Dag_node*>
+  {
+  public:
+    Dag_node* operator()(Td_nothing& /* t */) const
+    {
+      CGAL_assertion(false);
+      return NULL;
+    }
+    Dag_node* operator()(Td_inactive_trapezoid& /* t */) const
+    {
+      CGAL_assertion(false);
+      return NULL;
+    }
+
+    template < typename T >
+    Dag_node* operator()(T& t) const
+    {
+      return t.dag_node();
+    }
+  };
+
+  class set_dag_node_visitor : public boost::static_visitor<void>
+  {
+  public:
+    set_dag_node_visitor(Dag_node* node):m_node(node) {}
+
+    void operator()(Td_nothing& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+    void operator()(Td_inactive_trapezoid& /*t*/) const
+    {
+      CGAL_assertion(false);
+    }
+
+    template < typename T >
+    void operator()(T& t) const
+    {
+      t.set_dag_node(m_node);
+    }
+
+  private:
+    Dag_node* m_node;
+  };
+
+  class curve_end_for_fict_vertex_visitor :
+    public boost::static_visitor<boost::optional<Curve_end> >
+  {
+  public:
+    boost::optional<Curve_end> operator()(Td_active_fictitious_vertex& t) const
+    {
+      return t.curve_end();
+    }
+
+    boost::optional<Curve_end>
+    operator()(Td_inactive_fictitious_vertex& t) const
+    {
+      return t.curve_end();
+    }
+
+    template < typename T >
+    boost::optional<Curve_end> operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return boost::none;
+    }
+  };
+
+  class point_for_vertex_visitor : public boost::static_visitor< Point  >
+  {
+  public:
+    Point operator()(Td_active_vertex& t) const
+    {
+      return t.point();
+    }
+
+    Point operator()(Td_inactive_vertex& t) const
+    {
+      return t.point();
+    }
+
+    template < typename T >
+    Point operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return Point();
+    }
+  };
+
+  class curve_end_for_active_vertex_visitor :
+    public boost::static_visitor<boost::optional<Curve_end> >
+  {
+    public:
+    boost::optional<Curve_end> operator()(Td_active_vertex& t) const
+    {
+      return t.curve_end();
+    }
+
+    boost::optional<Curve_end> operator()(Td_active_fictitious_vertex& t) const
+    {
+      return t.curve_end();
+    }
+
+    template < typename T >
+    boost::optional<Curve_end> operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return boost::none;
+    }
+  };
+
+  class vertex_for_active_vertex_visitor :
+    public boost::static_visitor<Vertex_const_handle>
+  {
+    public:
+    Vertex_const_handle operator()(Td_active_vertex& t) const
+    {
+      return t.vertex();
+    }
+
+    Vertex_const_handle operator()(Td_active_fictitious_vertex& t) const
+    {
+      return t.vertex();
+    }
+
+    template < typename T >
+    Vertex_const_handle operator()(T& /*t*/) const
+    {
+      CGAL_assertion(false);
+      return Vertex_const_handle();
+    }
+  };
+
+  class cv_for_edge_visitor :
+    public boost::static_visitor<boost::optional<const X_monotone_curve_2&> >
+  {
+  public:
+    boost::optional<const X_monotone_curve_2&>
+    operator()(Td_active_edge& t) const
+    {
+      return t.halfedge()->curve();
+    }
+
+    boost::optional<const X_monotone_curve_2&>
+    operator()(Td_inactive_edge& t) const
+    {
+      return t.curve();
+    }
+
+    template <typename T>
+    boost::optional<const X_monotone_curve_2&> operator()(T& /* t */) const
+    {
+      CGAL_assertion(false);
+      return boost::none;
+    }
+  };
+
+  ////MICHAL: currently not in use since split is implemented as removed and insert two
+  //struct Before_split_data
+  //{
+  //  X_monotone_curve_2 m_cv_before_split;
+  //  Td_map_item* m_p_old_t;
+  //  Td_map_item* m_p_t1;
+  //  Td_map_item* m_p_t2;
+  //  In_face_iterator* m_p_btm_it;
+  //  In_face_iterator* m_p_mid_it;
+  //  In_face_iterator* m_p_top_it;
+  //
+  //};
+
+  //////////////////////////////////////////////
+  //Trapezoidal_decomposition_2 member functions:
+  //////////////////////////////////////////////
+
+
+protected:
+
+  /*!  is_edge_to_right variants:
+      returning true if the given edge is on the right side
+      of the given point / curve-end */
+
+  bool is_edge_to_right(Halfedge_const_handle he, const Point& p) const
+  {
+    typename Traits::Equal_curve_end_2 equal =
+      traits->equal_curve_end_2_object();
+    //p is either min or max end of he
+    CGAL_precondition(equal(Curve_end(he,ARR_MIN_END), p) ||
+                      equal(Curve_end(he,ARR_MAX_END), p));
+
+    return equal(Curve_end(he,ARR_MIN_END), p);
+  }
+
+  bool is_edge_to_right(Halfedge_const_handle he, const Curve_end& ce) const
+  {
+    typename Traits::Equal_curve_end_2 equal =
+      traits->equal_curve_end_2_object();
+    //p is either min or max end of he
+    CGAL_precondition(equal(Curve_end(he,ARR_MIN_END), ce) ||
+                      equal(Curve_end(he,ARR_MAX_END), ce));
+
+    //if the curve end ce is on the right boundary - return false;
+    if (traits->parameter_space_in_x_2_object()
+          (ce.cv(), ce.ce()) == ARR_RIGHT_BOUNDARY)
+    {
+      return false;
+    }
+
+    return equal(Curve_end(he,ARR_MIN_END), ce);
+  }
+
+  //returns true if the given curve is on the right side of the given point
+  bool is_curve_to_right(const X_monotone_curve_2& cv, const Point& p) const
+  {
+    typename Traits::Equal_curve_end_2 equal =
+      traits->equal_curve_end_2_object();
+    //p is either min or max end of he
+    CGAL_precondition(equal(Curve_end(cv,ARR_MIN_END), p) ||
+                      equal(Curve_end(cv,ARR_MAX_END), p));
+
+    return equal(Curve_end(cv,ARR_MIN_END), p);
+  }
+
+  /*!  is_end_point_left_low variants:
+      returning true if the first curve-end is left-low
+      of the second curve-end */
+  bool is_end_point_left_low(const Point& p1, const Point& p2) const
+  {
+    return (traits->compare_xy_2_object()(p1, p2) == SMALLER);
+  }
+
+  bool is_end_point_left_low(const Point& p, const Curve_end& ce) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(p, ce) == SMALLER);
+  }
+
+  bool is_end_point_left_low(const Curve_end& ce, const Point& p) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(p, ce) == LARGER);
+  }
+
+  bool is_end_point_left_low(const Curve_end& ce1, const Curve_end& ce2) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(ce1, ce2) == SMALLER);
+  }
+
+  template <typename T>
+  bool is_end_point_left_low(const T& t, const Dag_node& node) const
+  {
+    typename Traits::Compare_curve_end_xy_2 compare =
+      traits->compare_curve_end_xy_2_object();
+    Td_map_item vtx_item (node.get_data());
+    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
+    if (is_fict_vtx) {
+      return (compare(t,
+                      *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
+                                             vtx_item))) == SMALLER);
+    }
+    else {
+      return (compare(t, boost::apply_visitor(point_for_vertex_visitor(),
+                                              vtx_item)) == SMALLER);
+    }
+  }
+
+  /*!  is_end_point_right_top variants:
+      returning true if the first curve-end is right-top
+      of the second curve-end */
+  bool is_end_point_right_top(const Point& p1, const Point& p2) const
+  {
+    return (traits->compare_xy_2_object()(p1, p2) == LARGER);
+  }
+
+  bool is_end_point_right_top(const Point& p, const Curve_end& ce) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(p, ce) == LARGER);
+  }
+
+  bool is_end_point_right_top(const Curve_end& ce, const Point& p) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(p, ce) == SMALLER);
+  }
+
+  bool is_end_point_right_top(const Curve_end& ce1, const Curve_end& ce2) const
+  {
+    return (traits->compare_curve_end_xy_2_object()(ce1, ce2) == LARGER);
+  }
+
+  template <typename T>
+  bool is_end_point_right_top(const T& t, const Dag_node& node) const
+  {
+    typename Traits::Compare_curve_end_xy_2 compare =
+      traits->compare_curve_end_xy_2_object();
+    Td_map_item vtx_item (node.get_data());
+    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
+    if (is_fict_vtx) {
+      return (compare(t,
+                 *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
+                                        vtx_item)))  == LARGER);
+    }
+    else {
+      return (compare(t,
+                  boost::apply_visitor(point_for_vertex_visitor(),
+                                       vtx_item)) == LARGER);
+    }
+  }
+
+  template <typename T>
+  bool are_equal_end_points(const T& t, const Dag_node& node) const
+  {
+    typename Traits::Equal_curve_end_2 equal =
+      traits->equal_curve_end_2_object();
+    Td_map_item vtx_item (node.get_data());
+    bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item);
+    if (is_fict_vtx) {
+      return equal(t,
+                   *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
+                                          vtx_item)));
+    }
+    else {
+      return equal(t,
+                   boost::apply_visitor(point_for_vertex_visitor(),
+                                        vtx_item));
+    }
+  }
+
+  /*!
+   * finds the node of the leftmost trapezoid with respect to a curve.
+   * \param left_cv_end_node The dag node representing the left endpoint of
+   *        the cv
+   * \param cv The curve
+   * \param cres SMALLER/EQUAL/LARGER (searching for the leftmost trapezoid
+   *        which is below/on/above cv)
+   * \return The required DAG node
+   */
+  Dag_node find_leftmost_dag_node_of_curve(const Dag_node& left_cv_end_node,
+                                           const X_monotone_curve_2& cv,
+                                           Comparison_result cres) const
+  {
+    CGAL_assertion(traits != NULL);
+    Td_map_item& item = left_cv_end_node.get_data();
+    CGAL_precondition(traits->is_td_vertex(item));
+    CGAL_precondition (are_equal_end_points(Curve_end(cv,ARR_MIN_END),
+                                            left_cv_end_node));
+
+    //if ( traits->is_fictitious_vertex(item) )
+    //{
+    //  CGAL_precondition(traits->equal_curve_end_2_object()
+    //    (Curve_end(cv,ARR_MIN_END), *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))));
+    //}
+    //else
+    //{
+    //  CGAL_precondition(traits->equal_curve_end_2_object()
+    //     (Curve_end(cv,ARR_MIN_END), boost::apply_visitor(point_for_vertex_visitor(), item)));
+    //}
+    //find the node of the curve's leftmost trapezoid
+    Dag_node cv_leftmost_node(left_cv_end_node.right_child());
+    if (traits->is_fictitious_vertex(item) )
+    {
+      Curve_end ce( *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),
+                                           item)));
+      search_using_dag_with_cv(cv_leftmost_node, traits, ce, &cv, cres);
+    }
+    else
+    {
+      Point p( boost::apply_visitor(point_for_vertex_visitor(), item));
+      search_using_dag_with_cv(cv_leftmost_node, traits, p, &cv, cres);
+    }
+    return cv_leftmost_node;
+  }
+
+   /*!
+   * follow_curve variants:
+   * follows trapezoids along a curve (below/on/above it)
+   * \param left_cv_end_node The dag node representing the left endpoint of
+   *        the cv
+   * \param he/cv The halfedge / The curve
+   * \param cres SMALLER/EQUAL/LARGER (indicating the position with respect to the curve)
+   * \return An iterator for td map items along a curve
+   */
+  In_face_iterator follow_curve(const Dag_node& left_cv_end_node,
+                                Halfedge_const_handle he,
+                                Comparison_result up) const
+  {
+    return follow_curve(left_cv_end_node, he->curve(), up);
+  }
+
+  In_face_iterator follow_curve(const Dag_node& left_cv_end_node,
+                                const X_monotone_curve_2& cv,
+                                Comparison_result up) const
+  {
+    Dag_node cv_leftmost_node(find_leftmost_dag_node_of_curve(left_cv_end_node,cv,up));
+    //return a trapezoid iterator that starts from this trapezoid
+    //  and continues according to the curve cv
+    return In_face_iterator(traits, cv, cv_leftmost_node.get_data());
+  }
+
+  //-----------------------------------------------------------------------------
+  // Description:
+  //  Input: pointer to left trapezoid, pointer to right trapezoid
+  //  Output: true iff the merging took place
+  //  If the two input trapezoids can be merged they are ,
+  //  with one copy destroyed(the right one).
+  // Preconditions:
+  //  the right trapezoid is to the right of the left one
+  bool merge_if_possible(Td_map_item& left_item, Td_map_item& right_item)
+  {
+    CGAL_precondition(traits->is_empty_item(left_item) ||
+                      (traits->is_active(left_item) &&
+                       traits->is_td_trapezoid(left_item)));
+    CGAL_precondition(traits->is_empty_item(right_item) ||
+                      (traits->is_active(right_item) &&
+                       traits->is_td_trapezoid(right_item)));
+
+    if (traits->is_empty_item(left_item) || traits->is_empty_item(right_item))
+      return false;
+
+    Td_active_trapezoid& left  (boost::get<Td_active_trapezoid>(left_item));
+    Td_active_trapezoid& right (boost::get<Td_active_trapezoid>(right_item));
+
+    if (traits->is_trapezoids_top_equal(left,right) &&
+        traits->is_trapezoids_bottom_equal(left,right) &&
+        traits->equal_curve_end_2_object()
+         (traits->vtx_to_ce(left.right()), traits->vtx_to_ce(right.left())))
+    {
+      left.merge_trapezoid(right);
+      //set the depth to be the max of the two merged nodes
+      left.dag_node()->depth() = (std::max)(left.dag_node()->depth(),
+                                            right.dag_node()->depth());
+      CGAL_postcondition(
+        left.is_on_right_boundary() == right.is_on_right_boundary());
+
+      return true;
+    }
+    return false;
+  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  splits the trapezoid with vertical line through v
+  //  assuming that he (the first cw halfedge starting at 12 o'clock) is in the
+  //  desired direction, such that v is their source
+  // Precondition:
+  //  The trapezoid is active and contains v in its closure
+  //
+  Dag_node& split_trapezoid_by_vertex(Dag_node& tt,
+                                      Vertex_const_handle v,
+                                      Halfedge_const_handle he);
+
+  Td_map_item build_vertex_map_item(Vertex_const_handle v,
+                                    Halfedge_const_handle he,
+                                    Dag_node* node);
+  //---------------------------------------------------------------------------
+  // Description:
+  //  the opposite operation for spliting the trapezoid with
+  //  vertical line through ce
+  // Precondition:
+  //  The root trapezoid is degenerate point (ce) and is active
+  void undo_split_trapezoid_by_vertex(Dag_node& tr_node, const Curve_end& ce);
+
+  void deactivate_trapezoid (Dag_node& trpz_node, Dag_node* active_node) const;
+
+  void deactivate_vertex (Dag_node& vtx_node) const;
+
+  void deactivate_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const;
+
+  //-----------------------------------------------------------------------------
+  // Description:
+  //  splits the trapezoid that corresponds to the root of the
+  //  trapezoidal tree with an input halfedge he
+  // Precondition:
+  //  The root trapezoid is active
+  //  The root trapezoid is devided by he or is equal to it and is vertical.
+  Dag_node& split_trapezoid_by_halfedge(Dag_node& split_node,
+                                        Td_map_item& prev_e,
+                                        Td_map_item& prev_bottom_tr,
+                                        Td_map_item& prev_top_tr,
+                                        Halfedge_const_handle he);
+
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  update
+  //   tr.bottom()
+  //   vertical_ray_shoot downward from tr
+  //   tr.top()
+  //    vertical_ray_shoot upward from tr
+  //  update all the curves incident to the vertex that there's a new curve
+  //  starting from this vertex
+  //  this point must be an interior point and not a point on the boundaries,
+  //  since a point on the boundaries is related to one curve only
+  Td_map_item&
+  update_vtx_with_new_edge(Halfedge_const_handle he,
+                           const Curve_end& ce,
+                           Td_map_item& vtx_item,
+                           const Locate_type& CGAL_precondition_code(lt));
+
+  Td_map_item& insert_curve_at_vtx_using_dag(Halfedge_const_handle he,
+                                             Vertex_const_handle v,
+                                             Td_map_item& tr,
+                                             const Locate_type&
+                                             CGAL_precondition_code(lt));
+
+
+  //void set_trp_params_after_halfedge_update(Halfedge_const_handle old_he,
+  //                                          Halfedge_const_handle new_he,
+  //                                          Td_map_item& vtx_item); //MICHAL: not in use
+
+
+  void update_vtx_cw_he_after_merge(const X_monotone_curve_2& old_cv,
+                                    Halfedge_const_handle new_he,
+                                    Td_map_item& vtx_item);
+
+  ////MICHAL: currently not in use since split is implemented as: remove and insert two
+  //void set_trp_params_after_split_halfedge_update(Halfedge_const_handle new_he,
+  //                                                Td_map_item& vtx_item,
+  //                                                Halfedge_const_handle he1,
+  //                                                Halfedge_const_handle he2);
+
+  //-----------------------------------------------------------------------------
+  // Description:
+  //  update map items traveled along an iterator till end reached
+  //   with the new halfedge
+  // precondition:
+  //  end==0 or end is on the path of the iterator
+  // postcondition:
+  //  end is pointer to the last trapezoid encountered,if any
+  void update_map_items_after_merge(In_face_iterator& it,
+                                    Halfedge_const_handle old_he,
+                                    Halfedge_const_handle new_he,
+                                    Vertex_const_handle min_v,
+                                    Vertex_const_handle max_v,
+                                    Td_map_item& end);
+
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  advances input Data structure using data structure,input point p and
+  //  possibly Halfedge p_he till
+  //  p is found(if p_he hadn't been given)
+  //  p_he is found(if p_he was given)
+  //  or
+  //  leaf node reached
+  // postcondition:
+  //  output is the closest active trapezoid to ce/p_he
+  // remark:
+  //  use this function with care!
+  Locate_type search_using_dag(Dag_node& curr_node,
+                               const Traits* traits,
+                               const Point& p,
+                               Halfedge_const_handle he,
+                               Comparison_result up = EQUAL) const;
+
+  ////-------------------------------------------------------------------------
+  //// Description:
+  ////  advances input Data structure using data structure,input point p and
+  ////  possibly Halfedge p_he till
+  ////  p is found(if p_he hadn't been given)
+  ////  p_he is found(if p_he was given)
+  ////  or
+  ////  leaf node reached
+  //// postcondition:
+  ////  output is the closest active trapezoid to ce/p_he
+  //// remark:
+  ////  use this function with care!
+  //void search_and_print_using_dag (std::ostream& out,
+  //                                Dag_node& curr_node,
+  //                                const Traits* traits,
+  //                                const Point& p,
+  //                                Halfedge_const_handle he,
+  //                                Comparison_result up = EQUAL) const;
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  advances input Data structure using data structure,input point ce and
+  //  possibly Halfedge p_he till
+  //  ce is found(if p_he hadn't been given)
+  //  p_he is found(if p_he was given)
+  //  or
+  //  leaf node reached
+  // postcondition:
+  //  output is the closest active trapezoid to ce/p_he
+  // remark:
+  //  use this function with care!
+  Locate_type search_using_dag (Dag_node& curr_node,
+                                const Traits* traits,
+                                const Curve_end& ce,
+                                Halfedge_const_handle he,
+                                Comparison_result up = EQUAL) const;
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  advances input Data structure using data structure,input point ce and
+  //  possibly X_monotone_curve_2 p_cv till
+  //  ce is found(if p_cv hadn't been given)
+  //  p_cv is found(if p_cv was given)
+  //  or
+  //  leaf node reached
+  // postcondition:
+  //  output is the closest active trapezoid to ce/p_cv
+  // remark:
+  //  use this function with care!
+  Locate_type search_using_dag_with_cv(Dag_node& curr_node,
+                                       const Traits* traits,
+                                       const Curve_end& ce,
+                                       const X_monotone_curve_2* p_cv,
+                                       Comparison_result up = EQUAL) const;
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  advances input Data structure using data structure,input point ce and
+  //  possibly X_monotone_curve_2 p_cv till
+  //  p is found(if p_cv hadn't been given)
+  //  p_cv is found(if p_cv was given)
+  //  or
+  //  leaf node reached
+  // postcondition:
+  //  output is the closest active trapezoid to ce/p_cv
+  // remark:
+  //  use this function with care!
+  Locate_type search_using_dag_with_cv (Dag_node& curr_node,
+                                        const Traits* traits,
+                                        const Point& p,
+                                        const X_monotone_curve_2* p_cv,
+                                        Comparison_result up = EQUAL) const;
+
+
+  Dag_node container2dag(Nodes_map& ar, int left, int right,
+                         int& num_of_new_nodes) const;
+
+  bool is_last_edge(Halfedge_const_handle he, Td_map_item& vtx_item);
+
+  /*==============================================
+    Trapezoidal_decomposition_2 public member functions
+    ==============================================*/
+public:
+
+  Trapezoidal_decomposition_2(bool with_guarantees = true) :
+    m_largest_leaf_depth(0),
+    m_number_of_dag_nodes(1),
+    m_number_of_curves(0),
+    traits(0),
+    m_arr(0),
+    m_depth_threshold(CGAL_TD_DEFAULT_DEPTH_THRESHOLD),
+    m_size_threshold(CGAL_TD_DEFAULT_SIZE_THRESHOLD)
+  {
+    init();
+    set_with_guarantees(with_guarantees);
+  }
+
+  Trapezoidal_decomposition_2(const double& depth_th, const double& size_th,
+                              bool with_guarantees = true) :
+    m_largest_leaf_depth(0),
+    m_number_of_curves(0),
+    m_number_of_dag_nodes(1),
+    traits(0),
+    m_arr(0),
+    m_depth_threshold(depth_th),
+    m_size_threshold(size_th)
+  {
+    init();
+    set_with_guarantees(with_guarantees);
+  }
+
+  //MICHAL: problematic, should not be used
+  //Trapezoidal_decomposition_2(const Self& td)
+  //  : m_with_guarantees(td.m_with_guarantees),
+  //    m_number_of_curves(td.m_number_of_curves),
+  //    m_largest_leaf_depth(td.m_largest_leaf_depth),
+  //    m_number_of_dag_nodes(td.m_number_of_dag_nodes),
+  //    traits(td.traits),
+  //    m_arr(td.m_arr),
+  //    last_cv(Td_map_item(0)), prev_cv(Td_map_item(0)),
+  //    m_depth_threshold(td.m_depth_threshold),
+  //    m_size_threshold(td.m_size_threshold)
+  //{
+  //  Td_map_item_ptr_map htr;
+  //  /*! \todo allocate hash_map size according to content.
+  //   * \todo change vector<> to in_place_list and pointer hash to trapezoidal
+  //   * hash..
+  //   */
+  //  //X_trapezoid_vector vtr;
+  //  std::vector<Td_map_item> vtr;
+  //  Td_active_map_item pr;
+  //  int sz = Td_map_item_filter(vtr, &td.dag_root());
+  //  //! \todo Reduce the 3 iterations to 1 (or 2) iterator.
+  //  // First iteration: filter out the active trapezoids.
+  //  typename std::vector<Td_map_item>::const_iterator it;
+  //  for (it = vtr.begin(); it != vtr.end(); ++it)
+  //  {
+  //    Dag_node* ds_copy = new Dag_node(*it);
+  //    const Td_map_item* cur = &*it;
+  //    Td_map_item* tr_copy = &*(*ds_copy);
+  //    tr_copy->set_dag_node(ds_copy);
+  //    CGAL_assertion(&*(*tr_copy->dag_node()) == tr_copy);
+  //    ds_copy->depth() = cur->dag_node()->depth();
+  //    // We cheat a little with the depth.
+  //    htr.insert(typename Td_map_item_ptr_map::value_type(cur, tr_copy));
+  //    // Second iteration: generate new copies of trapezoids and nodes.
+  //  }
+  //
+  //  for (it = vtr.begin(); it!=vtr.end(); ++it)
+  //  {
+  //    const Td_map_item* cur = &*it;
+  //    Td_map_item* tr_copy = htr.find(cur)->second;
+  //    const Dag_node* child;
+  //    CGAL_assertion(tr_copy);
+  //    tr_copy->set_rt(cur->rt() ?
+  //                    htr.find(cur->rt())->second : NULL);
+  //    tr_copy->set_rb(cur->rb() ?
+  //                    htr.find(cur->rb())->second : NULL);
+  //    tr_copy->set_lt(cur->lt() ?
+  //                    htr.find(cur->lt())->second : NULL);
+  //    tr_copy->set_lb(cur->lb() ?
+  //                    htr.find(cur->lb())->second : NULL);
+
+  //    if (cur->dag_node()->is_inner_node())
+  //    {
+  //      child = &cur->dag_node()->right_child();
+  //      while (child && child->is_inner_node() && !pr(*(*child)))
+  //        child = &child->left_child();
+  //      tr_copy->dag_node()->set_right_child(*child);
+  //      child = &cur->dag_node()->left_child();
+  //      while (child && child->is_inner_node() && !pr(*(*child)))
+  //        child = &child->left_child();
+  //      tr_copy->dag_node()->set_left_child(*child);
+  //    }
+  //    // Third iteration: generate links in-between trapezoids
+  //    //  and in-between nodes .
+  //  }
+  //  m_dag_root = htr.find(&*(*td.m_dag_root))->second->dag_node();
+  //}
+  //
+
+  /*
+    TODO: Should we add another constructor with non const argument that
+    rebuild the trapezoidal decomposition prior to copy construction?
+  */
+  virtual ~Trapezoidal_decomposition_2()
+  {
+    CGAL_warning(m_dag_root != NULL);
+    if (!m_dag_root) return;
+
+    delete m_dag_root;
+
+    if (traits)
+      delete traits;
+  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  if Halfedge or twin already inserted the latter is returned.
+  //  otherwise the left-low most edge-degenerate trapezoid that represents the
+  //  input Halfedge is returned
+  // Remark:
+  //  Given an edge-degenerate trapezoid representing a Halfedge,
+  //  all the other trapezoids representing the Halfedge can be extracted
+  //  via moving continously to the left and right neighbours.
+  Td_map_item insert(Halfedge_const_handle he);
+
+
+  //---------------------------------------------------------------------------
+  // Description:
+  // inserts a range of halfedges into the Search structure.
+  // First it randomly shuffles the container and then it inserts the Halfedges
+  //  according to the new order
+  // Precondition: the data structure is empty
+  template <class Halfedge_iterator>
+  void insert(Halfedge_iterator begin, Halfedge_iterator end)
+  {
+    //Precondition: the data structure is empty
+    CGAL_precondition(m_number_of_curves == 0);
+
+    if (begin == end)
+      return;
+
+    //insert the shuffled halfedges into the search structure
+
+    //disable the rebuild check from within the halfedge insert and check here
+    //  for rebuild
+    bool do_rebuild = set_with_guarantees(false);
+
+    bool start_over = true;
+    while (start_over)
+    {
+      start_over = false;
+
+      //random_shuffle the range
+      std::random_shuffle(begin,end);
+
+      Halfedge_const_handle he_cst;
+      Halfedge_iterator it = begin;
+      for (; it < end ; ++it)
+      {
+        if (do_rebuild && not_within_limits())
+        {
+          std::cout << "starting over after " << number_of_curves() << std::flush;
+          start_over = true;
+          clear();
+          break;
+        }
+
+        he_cst = *it;
+        insert(he_cst);
+      }
+      if (it != end)
+        continue;
+
+      //after inserting the last halfedge in the range
+      //  perform another rebuild check
+      if (do_rebuild && not_within_limits()) //MICHAL: should I use needs_update() instead (with the random check)?
+      {
+        start_over = true;
+        clear();
+      }
+    }
+
+    //enable the rebuild from within the halfedge insert
+    set_with_guarantees(do_rebuild);
+  }
+
+
+  // removal functions
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //
+  void remove(Halfedge_const_handle he);
+
+  ////-------------------------------------------------------------------------
+  //// Description:
+  ////
+  //template <class curve_iterator>
+  //void remove(curve_iterator begin, curve_iterator end)
+  //{
+  //  if(begin == end)
+  //    return;
+  //
+  //  std::random_shuffle(begin,end);
+  //
+  //  curve_iterator it=begin,next=it;
+  //  while(it!=end)
+  //  {
+  //    ++next;
+  //    remove(*it);
+  //    it=next;
+  //  }
+  //}
+
+  void clear()
+  {
+    delete m_dag_root;
+    init();
+  }
+
+
+//  //-------------------------------------------------------------------------
+//  // Description:
+//  //  returns the active trapezoid representing the input point.
+//  // Precondition:
+//  //  The trapezoidal tree is not empty
+//  // Postcondition:
+//  //  the input locate type is set to the type of the output trapezoid.
+//  // Remark:
+//  //  locate call may change the class
+//  Td_map_item& locate_and_print(std::ostream& out, const Point& p) const
+//  {
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//    CGAL_assertion(traits);
+//    CGAL_assertion(m_dag_root);
+//
+//#endif
+//
+//    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//    CGAL_precondition(!!curr);
+//
+//#endif
+//    //the actual locate. curr is the DAG root, the traits,
+//    //the point to location, and 0 - indicates point location
+//    search_and_print_using_dag(out, curr,traits,p,Halfedge_const_handle());//m_empty_he_handle);
+//
+//
+//#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+//
+//    locate_opt_push(curr.get_data());
+//
+//#endif
+//
+//    return *curr;
+//  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  returns the active trapezoid representing the input point.
+  // Precondition:
+  //  The trapezoidal tree is not empty
+  // Postcondition:
+  //  the input locate type is set to the type of the output trapezoid.
+  // Remark:
+  //  locate call may change the class
+  Td_map_item& locate(const Point& p,Locate_type &t) const
+  {
+    //print_dag_addresses(*m_dag_root);
+#ifdef CGAL_TD_DEBUG
+
+    CGAL_assertion(traits);
+    CGAL_assertion(m_dag_root);
+
+#endif
+
+    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
+
+#ifdef CGAL_TD_DEBUG
+
+    CGAL_precondition(!!curr);
+
+#endif
+    //the actual locate. curr is the DAG root, the traits,
+    //the point to location, and 0 - indicates point location
+    t = search_using_dag(curr,traits,p,Halfedge_const_handle());
+
+#ifdef CGAL_TD_DEBUG
+
+    CGAL_postcondition(t == POINT || t == CURVE || t == TRAPEZOID ||
+                       t == UNBOUNDED_TRAPEZOID);
+
+#endif
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+    locate_opt_push(curr.get_data());
+
+#endif
+
+    return *curr;
+  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  returns the active trapezoid representing the input point.
+  // Precondition:
+  //  The trapezoidal tree is not empty
+  // Postcondition:
+  //  the input locate type is set to the type of the output trapezoid.
+  // Remark:
+  //  locate call may change the class
+  Td_map_item& locate(const Curve_end& ce, Locate_type& lt) const
+  {
+
+#ifdef CGAL_TD_DEBUG
+
+    CGAL_assertion(traits);
+    CGAL_assertion(m_dag_root);
+
+#endif
+
+    Dag_node curr = *m_dag_root; //MICHAL: is it ok to add &?
+
+    //the actual locate. curr is the DAG root, the traits,
+    //the end point to locate,
+    //and NULL as cv ptr - indicates point location
+    lt = search_using_dag (curr, traits, ce, Halfedge_const_handle());
+
+#ifdef CGAL_TD_DEBUG
+
+    CGAL_postcondition(lt == POINT || lt == CURVE || lt == TRAPEZOID ||
+                       lt == UNBOUNDED_TRAPEZOID);
+
+#endif
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+    locate_opt_push(curr.get_data());
+
+#endif
+
+    return curr.get_data();
+  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //  returns the active trapezoid containing the point represented by vertex.
+  // Precondition:
+  //  The trapezoidal tree is not empty
+  // Postcondition:
+  //  the input locate type is set to the type of the output trapezoid.
+  // Remark:
+  //  locate call may change the class
+  Td_map_item& locate( Vertex_const_handle v, Locate_type& lt) const
+  {
+    CGAL_precondition(traits != NULL);
+    return locate(traits->vtx_to_ce(v), lt);
+  }
+
+  //---------------------------------------------------------------------------
+  // Description:
+  //
+  // preconditions:
+  //  p is not on an edge or a vertex.
+  Td_map_item& vertical_ray_shoot(const Point& p,Locate_type& t,
+                                  const bool up_direction = true) const;
+
+
+  ////MICHAL: commented due to inefficient depth update, remove and insert instead
+  //void before_split_edge(const X_monotone_curve_2& cv,
+  //                       const X_monotone_curve_2& cv1,
+  //                       const X_monotone_curve_2& cv2);
+
+  ////MICHAL: commented due to inefficient depth update, remove and insert instead
+  ////-------------------------------------------------------------------------
+  //// Description:
+  //// Input:
+  ////  1 whole curves
+  ////  2 partial halfedge_handle-s
+  //// precondition:
+  ////  The two halfedges are valid
+  ////  The first input curve is the union of the two halfedges.
+  ////  The intersection of the latter is a point inside the
+  ////  interior of the former.
+  ////  The latter are ordered from left-down to right-up
+  //// postcondition:
+  ////  The first input curve is broken into two halfedges
+  ////  corresponding to the input.
+  //void split_edge(const X_monotone_curve_2& cv, Halfedge_const_handle he1,
+  //                Halfedge_const_handle he2);
+
+
+  void merge_edge(Halfedge_const_handle he1, Halfedge_const_handle he2,
+                  const X_monotone_curve_2& cv);
+
+
+  void
+  after_merge_edge(Halfedge_const_handle CGAL_precondition_code(merged_he),
+                   Halfedge_const_handle CGAL_precondition_code(before_mrg_he))
+  {
+    //Precondition:
+    // the merge uses the suspected halfedge before the arrangement merge
+    CGAL_precondition(merged_he == before_mrg_he ||
+                      merged_he == before_mrg_he->twin());
+  }
+
+
+  unsigned long size() const
+  {
+    return m_dag_root->size();
+  }
+
+  unsigned long number_of_curves() const
+  {
+    return m_number_of_curves;
+  }
+
+  void init_arrangement_and_traits(const Arrangement_on_surface_2* arr,
+                                   bool allocate_traits = true)
+  {
+    m_arr = arr;
+    m_trts_adaptor =
+      static_cast<const Traits_adaptor_2*> (arr->geometry_traits());
+
+    if (allocate_traits)
+      traits = new Td_traits(*m_trts_adaptor);
+  }
+
+
+
+#ifdef CGAL_TD_DEBUG
+  /*------------------------------------------------------------------
+    description:
+    returns whether the Trapezoidal Dag is valid
+  */
+  bool is_valid(const Dag_node& ds) const
+  {
+    if ( !ds ) return true;
+    if (ds->is_valid(traits) && ds->dag_node() &&
+        is_valid(ds.left_child()) && is_valid(ds.right_child()))
+      return true;
+    CGAL_warning(ds->is_valid(traits));
+    CGAL_warning(ds->dag_node());
+    CGAL_warning(is_valid(ds.left_child()));
+    CGAL_warning(is_valid(ds.right_child()));
+    return false;
+  }
+  /*------------------------------------------------------------------
+    description:
+    returns whether the member Trapezoidal data structure is valid
+  */
+  bool is_valid() const
+  {
+    return is_valid(*m_dag_root);
+  }
+  //void debug() const
+  //{
+  //  std::cout << "\nTrapezoidal_decomposition_2<Traits>::debug()\n" << *this
+  //            << std::endl;
+  //  Td_map_item x;
+  //  x.debug(); //MICHAL: will not work!
+  //}
+#endif
+
+  /*------------------------------------------------------------------
+    description:
+    Rebuilds the trapezoid data structure by reinserting the curves
+    in a random order in an empty data structure.
+
+    postcondition:
+    The old and new data structures agree on their member curves.
+    ------------------------------------------------------------------*/
+  Self& rebuild()
+  {
+#ifdef CGAL_TD_DEBUG
+    std::cout << "\nrebuild!  " << m_number_of_curves << std::endl
+              << std::flush;
+#endif
+
+    Halfedge_container container;
+
+#ifdef CGAL_TD_DEBUG
+    unsigned long rep = Halfedge_filter(container, &dag_root());
+#endif
+
+    clear();
+
+    //// initialize container to point to curves in Td_map_item Tree
+    //if (rep>0)
+    //{
+    //  bool o = set_with_guarantees(false);
+    //  typename std::vector<Halfedge_const_handle>::iterator
+    //    it = container.begin(),
+    //    it_end = container.end();
+    //  while(it!=it_end)
+    //  {
+    //    insert(*it);
+    //    ++it;
+    //  }
+    //  set_with_guarantees(o);
+    //}
+
+    //insert the already inserted curves from scratch in order to build a
+    // search structure guaranteeing logarithmic query time and linear size
+    insert(container.begin(), container.end());
+
+#ifdef CGAL_TD_DEBUG
+    CGAL_assertion(is_valid());
+    unsigned long sz = number_of_curves();
+    if (sz != rep)
+    {
+      std::cerr << "\nnumber_of_curves()=" << sz;
+      std::cerr << "\nrepresentatives.size()=" << rep;
+      CGAL_assertion(number_of_curves() == rep);
+    }
+#endif
+
+    container.clear();
+    return *this;
+  }
+
+  /*
+     Input:
+     a list of pointers to Td_map_items and a Td_map_item boolean predicate.
+     Output:
+     void
+     Postcondition:
+     the list pointers correspond to all the Td_map_items in the data
+     structure for which the predicate value is true.
+  */
+
+  template <typename Container, typename Predicate>
+  void filter(Container& c, const Predicate& pr, const Dag_node * ds) const
+  {
+    CGAL_assertion(ds);
+    ds->filter(c,pr);
+  }
+
+  template <typename Container, typename Predicate>
+  void filter(Container& c, const Predicate& pr) const
+  {
+    filter(c, pr, &dag_root());
+  }
+
+  ////MICHAL: not in use
+  //template <class Container>
+  //unsigned long Td_map_item_filter(Container& container,
+  //                                 const Dag_node* ds) const
+  ///* Return a container for all active map items */
+  //{
+  //  ds->filter(container, Td_active_map_item());
+  //  return container.size();
+  //}
+
+  template <typename Halfedge_container>
+  unsigned long Halfedge_filter(Halfedge_container& container,
+                                const Dag_node* ds) const
+  /* Return a container for all active curves */
+  {
+    unsigned long sz = number_of_curves();
+    std::list<Td_map_item> representatives;
+    //X_trapezoid_list representatives;
+    ds->filter(representatives, Td_active_edge_item(*traits));
+
+#ifndef CGAL_TD_DEBUG
+
+    CGAL_warning(sz==representatives.size());
+
+#else
+
+    unsigned long rep=representatives.size();
+    if (sz != rep)
+    {
+      std::cerr << "\nnumber_of_curves()=" << sz;
+      std::cerr << "\nrepresentatives.size()=" << rep;
+      CGAL_assertion(number_of_curves()==representatives.size());
+    }
+
+#endif
+
+    if (sz > 0)
+    {
+      typename std::list<Td_map_item>::iterator it = representatives.begin(),
+        it_end = representatives.end();
+      //typename X_trapezoid_list::iterator it = representatives.begin(),
+      //  it_end = representatives.end();
+      while(!(it==it_end))
+      {
+        Td_active_edge e (boost::get<Td_active_edge>(*it));
+        container.push_back(e.halfedge()); //it represents an active trapezoid
+        ++it;
+      }
+    }
+    if(! container.empty()) {
+      std::random_shuffle(container.begin(),container.end());
+    }
+    return sz;
+  }
+
+
+
+  /*------------------------------------------------------------------
+    Input: None
+    Output: bool
+    Description:
+    determines according to pre defined conditions whether the
+    current Trapezoidal_decomposition_2<Traits> needs update
+    Postconditions:
+    The output is true iff the depth of the Trapezoidal Tree is more then
+    DepthThreshold times log of the X_curve count or the Trapezoidal Tree's
+    size
+    is more then SizeThreshold times the log of the last count.
+  */
+  bool set_with_guarantees(bool u)
+  {
+    bool old = m_with_guarantees;
+    m_with_guarantees = u;
+    return old;
+  }
+
+  //This method occasionaly(!) checks the guarantees
+  // It is currently not in use, since the guarantees are constantly checked in O(1) time
+  bool needs_update()
+  {
+    unsigned long num_of_cv = number_of_curves();
+    //to avoid signed / unsigned conversion warnings
+    // rand() returns an int but a non negative one.
+    if (static_cast<unsigned long>(std::rand()) >
+        RAND_MAX / ( num_of_cv + 1))
+      return false;
+    /*       INTERNAL COMPILER ERROR overide
+             #ifndef __GNUC__
+    */
+#ifdef CGAL_TD_REBUILD_DEBUG
+    std::cout << "\n|heavy!" << std::flush;
+#endif
+
+    return not_within_limits();
+  }
+
+  /*------------------------------------------------------------------
+    input: None
+    output: bool
+    Description:
+    uses needs_update to determine whether the
+    Trapezoidal_decomposition_2<Traits> needs update
+    and calls rebuild accordingly
+    Postcondition:
+    the return value is true iff rebuilding took place.
+  */
+  bool update()
+  {
+    //if the structure violates the guarantees - rebuild
+    if (not_within_limits()) //needs_update())
+    {
+      rebuild();
+      return true;
+    }
+
+    return false;
+  }
+
+  bool not_within_limits()
+  {
+    unsigned long num_of_cv = number_of_curves();
+
+    //Cond 1: Depth is greater than threshold*log(number of curves)
+    bool cond1 = largest_leaf_depth() >
+                   (depth_threshold()*(std::log(double(num_of_cv+1))));
+    //Cond 2: Number of nodes is greater than threshold*number of curves
+    bool cond2 = number_of_dag_nodes() > (size_threshold()*(num_of_cv + 1));
+
+    //return true if at least one of the conditions is true
+    return cond1 || cond2;
+  }
+
+  /* returns a reference to the internal data structure */
+  const Dag_node& dag_root() const {return *m_dag_root;}
+
+  /* returns a reference to the internal data structure */
+  const Traits& get_traits() const {return *traits;}
+
+  /* returns a reference to the internal depth threshold constant */
+  const double& depth_threshold() const
+  {
+    return m_depth_threshold;
+  }
+
+  /* sets the internal depth threshold constant to the parameter and
+     returns its reference */
+  void depth_threshold(const double& depth_th)
+  {
+    m_depth_threshold = depth_th;
+  }
+
+  /* returns a reference to the internal size threshold constant */
+  const double& size_threshold() const
+  {
+    return m_size_threshold;
+  }
+
+  /* sets the internal size threshold constant to the parameter and
+     returns its reference */
+  void size_threshold(const double& size_th)
+  {
+    m_size_threshold = size_th;
+  }
+
+  void update_largest_leaf_depth( unsigned long depth )
+  {
+    if(m_largest_leaf_depth < depth )
+        m_largest_leaf_depth = depth;
+  }
+
+  unsigned long largest_leaf_depth()
+  {
+    //CGAL_assertion((m_largest_leaf_depth + 1) == m_dag_root->rec_depth());
+    return m_largest_leaf_depth;
+  }
+
+  unsigned long number_of_dag_nodes()
+  {
+    //CGAL_assertion(m_number_of_dag_nodes == m_dag_root->size());
+    return m_number_of_dag_nodes;
+  }
+
+  unsigned long longest_query_path_length()
+  {
+    return longest_query_path_length_rec(true, *m_dag_root,
+                                         true, *m_dag_root, *m_dag_root);
+  }
+
+
+protected:
+
+  //Trapezoidal Decomposition data members
+  Dag_node* m_dag_root;
+  unsigned long m_largest_leaf_depth; //holds the leargest depth of a leaf in the DAG
+  unsigned long m_number_of_dag_nodes; //holds the number of nodes in the DAG
+  bool m_with_guarantees; //whether the structure holds logarithmic query time and linear size guarantees //m_needs_update;
+  unsigned long m_number_of_curves;
+  const Traits* traits;
+  //Before_split_data m_before_split;
+  const Arrangement_on_surface_2* m_arr;
+  const Traits_adaptor_2* m_trts_adaptor;
+
+  Halfedge_const_handle m_empty_he_handle;
+
+private:
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+  mutable Td_map_item last_cv;
+  mutable Td_map_item prev_cv;
+
+#endif
+
+  unsigned long longest_query_path_length_rec(bool minus_inf,
+                                              Dag_node& min_node,
+                                              bool plus_inf,
+                                              Dag_node& max_node,
+                                              Dag_node& node);
+
+  void init()
+  {
+    // traits may be initialized later
+    m_dag_root = new Dag_node(Td_active_trapezoid());
+    //(*m_dag_root)->set_dag_node(m_dag_root);
+    boost::apply_visitor(set_dag_node_visitor(m_dag_root),
+                         m_dag_root->get_data());
+
+    m_number_of_curves = 0;
+    m_largest_leaf_depth = 0;
+    m_number_of_dag_nodes = 1; //the root is the only node in the DAG
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+    locate_opt_empty();
+
+#endif
+
+  }
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+  void locate_opt_push(Td_map_item& cv_tr) const
+  {
+    prev_cv = last_cv;
+    last_cv = cv_tr;
+  }
+  void locate_opt_empty() const
+  {
+    last_cv = Td_map_item(0);
+    prev_cv = Td_map_item(0);
+  }
+  bool locate_opt_swap(Td_map_item& item) const
+  {
+    item = last_cv;
+    last_cv = prev_cv;
+    prev_cv = item;
+    return (!traits->is_empty_item(item));
+  }
+  void locate_optimization(const Curve_end& ce, Td_map_item& item,
+                            Locate_type& lt) const
+  {
+    bool res = false;
+    // optimization
+    if (locate_opt_swap(item) && traits->is_active(item) )
+    {
+      if (traits->is_td_vertex(item))
+        res = are_equal_end_points(ce, item);
+
+      //if (traits->is_td_vertex(item))
+      //{
+      //  if ( traits->is_fictitious_vertex(item) )
+      //  {
+      //    res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
+      //  }
+      //  else
+      //  {
+      //    res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item));
+      //  }
+      //}
+      if (traits->is_td_trapezoid(item))
+        res = traits->is_inside(item,ce);
+    }
+    if (!res && locate_opt_swap(item) && traits->is_active(item) )
+    {
+      if (traits->is_td_vertex(item))
+        res = are_equal_end_points(ce, item);
+      //if (traits->is_td_vertex(item))
+      //{
+      //  if ( traits->is_fictitious_vertex(item) )
+      //  {
+      //    res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
+      //  }
+      //  else
+      //  {
+      //    res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item));
+      //  }
+      //}
+      if (traits->is_td_trapezoid(item))
+        res = traits->is_inside(item,ce);
+    }
+    if (res)
+    {
+      if (traits->is_td_vertex(item))
+        lt=POINT;
+      else
+      {
+        Td_active_trapezoid tr (boost::get<Td_active_trapezoid>(item));
+        lt = tr.is_on_boundaries()? UNBOUNDED_TRAPEZOID : TRAPEZOID;
+      }
+    }
+    else
+      item = locate(ce,lt);
+  }
+
+#endif
+
+
+  void print_cv_data(const X_monotone_curve_2& cv,
+                     std::ostream& out = std::cout) const
+  {
+    out << "min end: " << std::endl;
+    print_ce_data(cv, ARR_MIN_END, out);
+    out << std::endl << "max end: " << std::endl;
+    print_ce_data(cv, ARR_MAX_END, out);
+    out << std::endl << std::endl ;
+  }
+
+  void print_point_data(const Point& p, std::ostream& out = std::cout) const
+  {
+    out << "x: " << CGAL::to_double(p.x()) << ", y: "
+        << CGAL::to_double(p.y()) << std::endl;
+  }
+
+  void print_ce_data(const X_monotone_curve_2& cv, Arr_curve_end ce,
+                     std::ostream& out = std::cout) const
+  {
+    Arr_parameter_space ps_x = traits->parameter_space_in_x_2_object()(cv, ce);
+    Arr_parameter_space ps_y = traits->parameter_space_in_y_2_object()(cv, ce);
+
+    if (ps_x == ARR_INTERIOR && ps_y == ARR_INTERIOR)
+    {
+      if (ce == ARR_MIN_END)
+        out << "x: "
+            << CGAL::to_double(traits->construct_min_vertex_2_object()(cv).x())
+            << ", y: "
+            << CGAL::to_double(traits->construct_min_vertex_2_object()(cv).y())
+            << std::endl;
+      else
+        out << "x: "
+            << CGAL::to_double(traits->construct_max_vertex_2_object()(cv).x())
+            << ", y: "
+            << CGAL::to_double(traits->construct_max_vertex_2_object()(cv).y())
+            << std::endl;
+    }
+    else if (ps_x == ARR_INTERIOR && ps_y != ARR_INTERIOR)
+    {
+      out << " vertical asymptote, " ;
+      if (ps_y == ARR_TOP_BOUNDARY)
+        out << " y -> +oo " << std::endl;
+      else
+        out << " y -> -oo " << std::endl;
+    }
+    else if (ps_x != ARR_INTERIOR && ps_y == ARR_INTERIOR)
+    {
+      out << " horizontal asymptote, " ;
+      if (ps_x == ARR_RIGHT_BOUNDARY)
+        out << " x -> +oo " << std::endl;
+      else
+        out << " x -> -oo " << std::endl;
+    }
+    else //both are not interior
+    {
+      if (ps_x == ARR_RIGHT_BOUNDARY)
+        out << " x -> +oo " ;
+      else
+        out << " x -> -oo " ;
+      if (ps_y == ARR_TOP_BOUNDARY)
+        out << " , y -> +oo " << std::endl;
+      else
+        out << " , y -> -oo " << std::endl;
+
+    }
+  }
+
+
+  void print_dag_addresses(const Dag_node& curr) const
+  {
+
+    std::cout << "----------------- DAG ----------------" <<std::endl
+              << "--------------------------------------" <<std::endl;
+
+    print_dag_addresses_rec(curr, 0);
+    std::cout << "----------------- END OF DAG ----------------" <<std::endl
+              << "---------------------------------------------" <<std::endl;
+
+  }
+
+  void print_dag_addresses_rec(const Dag_node& curr ,int level,
+                               std::ostream& out = std::cout) const
+  {
+
+    out << "------ level " << level << ", depth " << curr.depth()
+        << " ------\n";
+    out << " (void *)curr : " << (void *)(&curr) << std::endl;
+    out << "      (void *)curr->TRPZ : " << (void *)(curr.operator->())
+        << std::endl;
+
+    //curr is the current pointer to node in the data structure
+    //item holds the trapezoidal map item connected to curr.
+    Td_map_item item = curr.get_data();
+    if (traits->is_td_vertex(item))
+    {
+      out << " POINT : " ;
+
+      // if the map item represents a fictitious vertex
+      if (traits->is_fictitious_vertex(item))
+      {
+        const Curve_end left_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)));
+        print_ce_data(left_ce.cv(), left_ce.ce(), out);
+      }
+      else // if the map item represents a vertex
+      {
+        Point p = boost::apply_visitor(point_for_vertex_visitor(),item);
+        print_point_data(p, out);
+      }
+      out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
+          << std::endl;
+      out << "          (void *)right_child: " << (void*)(&(curr.right_child()))
+          << std::endl;
+      print_dag_addresses_rec(curr.left_child(), level+1, out);
+      print_dag_addresses_rec(curr.right_child(), level+1, out);
+      return;
+    }
+    if (traits->is_td_edge(item))
+    {
+      // bool is_active = traits->is_active(item);
+      // if the map item represents an edge
+      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), item));
+
+      //   so top() is a real Halfedge with a curve() if curr is active
+      //   or curr holds the curve if curr is not active
+      out << " CURVE : " ;
+      print_cv_data(he_cv, out);
+      out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
+          << std::endl;
+      out << "          (void *)right_child: " << (void*)(&(curr.right_child()))
+          << std::endl;
+      print_dag_addresses_rec(curr.left_child(), level+1, out);
+      print_dag_addresses_rec(curr.right_child(), level+1, out);
+      return;
+    }
+    else
+    {
+      // if ithe map item represents a trapezoid
+      if (traits->is_active(item))
+        out << " TRAPEZOID \n";
+      else //trapezoid is removed - may have a left child
+      {
+        out << " REMOVED TRAPEZOID \n";
+        if (curr.left_child().is_null())
+          return;
+        out << "          (void *)left_child: " << (void*)(&(curr.left_child()))
+            << std::endl;
+        print_dag_addresses_rec(curr.left_child(), level+1, out);
+      }
+    }
+  }
+
+public:
+  void print_dag(std::ostream& out) const
+  {
+
+    out << "----------------- DAG ----------------" << std::endl
+        << "--------------------------------------" << std::endl;
+
+    print_dag_addresses_rec(*m_dag_root , 0, out);
+    out << "----------------- END OF DAG ----------------" << std::endl
+        << "---------------------------------------------" << std::endl;
+
+  }
+
+protected:
+  double m_depth_threshold;
+  double m_size_threshold;
+};
+
+} //namespace CGAL
+
+#include <CGAL/Arr_point_location/Td_active_trapezoid.h>
+#include <CGAL/Arr_point_location/Td_inactive_trapezoid.h>
+#include <CGAL/Arr_point_location/Td_active_edge.h>
+#include <CGAL/Arr_point_location/Td_inactive_edge.h>
+#include <CGAL/Arr_point_location/Td_active_vertex.h>
+#include <CGAL/Arr_point_location/Td_active_fictitious_vertex.h>
+#include <CGAL/Arr_point_location/Td_inactive_vertex.h>
+#include <CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h>
+
+// The member-function definitions can be found under:
+#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
new file mode 100644
index 0000000..3b9885b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
@@ -0,0 +1,3112 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: svn+ssh://balasmic@scm.gforge.inria.fr/svn/cgal/trunk/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h $
+// $Id: Arr_trapezoid_ric_pl_impl.h 56667 2010-06-09 07:37:13Z sloriot $
+//
+//
+// Author(s)     : Michal Balas   <balasmic at post.tau.ac.il>
+//                based on the methods implemented in Trapezoidal_decomposition.h by Oren Nechushtan
+
+#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_FUNCTIONS_H
+#define CGAL_TRAPEZOIDAL_DECOMPOSITION_FUNCTIONS_H
+
+/*! \file
+* Member-function definitions for the Trapezoidal_decomposition_2<Traits>
+* class.
+*/
+
+#include <algorithm>
+
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+//-----------------------------------------------------------------------------
+// Description:
+//  splits the trapezoid with vertical line through v
+//  assuming that he_bottom_ray_shoot & he_top_ray_shoot are in the
+//  desired direction, such that v is their source
+// Precondition:
+//  The trapezoid is active and contains v in its closure
+//
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Dag_node &
+Trapezoidal_decomposition_2<Td_traits>
+::split_trapezoid_by_vertex(Dag_node& split_node,
+                            Vertex_const_handle v,
+                            Halfedge_const_handle he)
+{
+  CGAL_precondition(!split_node.is_null());
+  if (split_node.is_null())  return split_node;
+
+
+  Td_map_item curr_item (split_node.get_data());
+  CGAL_precondition(traits->is_active(curr_item));
+
+  Dag_node left_node, right_node;
+
+  if (traits->is_td_trapezoid(curr_item))
+  {
+    Td_active_trapezoid& tr (boost::get<Td_active_trapezoid>(curr_item));
+
+    CGAL_warning(traits->is_in_closure(tr, traits->vtx_to_ce(v)));
+
+    left_node.set_data(Td_active_trapezoid
+                        (tr.left(), v, tr.bottom(), tr.top()));
+
+    right_node.set_data(Td_active_trapezoid
+                        (v, tr.right(), tr.bottom(), tr.top()));
+
+    Td_active_trapezoid& left_tr  (boost::get<Td_active_trapezoid>(left_node.get_data()));
+    Td_active_trapezoid& right_tr (boost::get<Td_active_trapezoid>(right_node.get_data()));
+
+    CGAL_warning(traits->is_trapezoids_top_equal(left_tr,right_tr));
+    CGAL_warning(traits->is_trapezoids_bottom_equal(left_tr,right_tr));
+    CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary());
+    CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary());
+
+    left_tr.init_neighbours(tr.lb(),tr.lt(),right_node.get_data(),right_node.get_data());
+    right_tr.init_neighbours(left_node.get_data(),left_node.get_data(),tr.rb(),tr.rt());
+    if (!traits->is_empty_item(tr.lb()))
+    {
+      Td_active_trapezoid& lb(boost::get<Td_active_trapezoid>(tr.lb()));
+      lb.set_rb(left_node.get_data());
+    }
+    if (!traits->is_empty_item(tr.lt()))
+    {
+      Td_active_trapezoid& lt(boost::get<Td_active_trapezoid>(tr.lt()));
+      lt.set_rt(left_node.get_data());
+    }
+    if (!traits->is_empty_item(tr.rb()))
+    {
+      Td_active_trapezoid& rb(boost::get<Td_active_trapezoid>(tr.rb()));
+      rb.set_lb(right_node.get_data());
+    }
+    if (!traits->is_empty_item(tr.rt()))
+    {
+      Td_active_trapezoid& rt(boost::get<Td_active_trapezoid>(tr.rt()));
+      rt.set_lt(right_node.get_data());
+    }
+
+  }
+  else //if the curr_item is an edge
+  {
+    Td_active_edge& e (boost::get<Td_active_edge>(curr_item));
+
+    CGAL_warning(traits->is_in_closure(e, traits->vtx_to_ce(v)));
+
+    left_node.set_data(Td_active_edge(e.halfedge()));
+
+    right_node.set_data(Td_active_edge(e.halfedge()));
+
+    Td_active_edge& left_e  (boost::get<Td_active_edge>(left_node.get_data()));
+    Td_active_edge& right_e (boost::get<Td_active_edge>(right_node.get_data()));
+
+    //CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary());
+    //CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary());
+
+    left_e.init_neighbours(boost::none);//left_e.init_neighbours(e.lb(),e.lt(),Td_map_item(),right_node.get_data());
+    right_e.init_neighbours(e.next());//right_e.init_neighbours(left_node.get_data(),left_node.get_data(),e.rb(),e.rt());
+
+  }
+
+  // left and right are set to the point itself,
+  // bottom and top are set to the ray shooting resulting curves at this
+  // stage.
+  //need to define the boundaries flag before creating the trapezoid
+  Td_map_item vtx_item (build_vertex_map_item(v, he, &split_node));
+  split_node.replace( vtx_item, left_node, right_node); //nodes depth are updated here
+  update_largest_leaf_depth( (std::max)(left_node.depth(), right_node.depth()) );
+  m_number_of_dag_nodes += 2;
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+  if (last_cv == curr_item)
+    last_cv = vtx_item;
+  if (prev_cv == curr_item)
+    prev_cv = vtx_item;
+#endif
+
+  const Dag_node* left_ptr  = &split_node.left_child();
+  const Dag_node* right_ptr = &split_node.right_child();
+
+  boost::apply_visitor(set_dag_node_visitor((Dag_node*)left_ptr),left_ptr->get_data()); //(*left_ptr)->set_dag_node((Dag_node*)left_ptr);
+  boost::apply_visitor(set_dag_node_visitor((Dag_node*)right_ptr),right_ptr->get_data()); //(*right_ptr)->set_dag_node((Dag_node*)right_ptr);
+
+  //print_dag_addresses(*m_dag_root);
+
+  return split_node;
+}
+
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item
+Trapezoidal_decomposition_2<Td_traits>
+::build_vertex_map_item(Vertex_const_handle v,
+                        Halfedge_const_handle he,
+                        Dag_node* node)
+{
+  Curve_end ce(traits->vtx_to_ce(v));
+  if ((traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce()) == ARR_INTERIOR)
+      && (traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce()) == ARR_INTERIOR))
+  {
+    Td_active_vertex vtx (v, he, node);
+    return vtx;
+  }
+  else
+  {
+    Td_active_fictitious_vertex vtx (v, he, node);
+    return vtx;
+  }
+}
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//  the opposite operation for spliting the trapezoid with
+//  vertical line through ce
+// Precondition:
+//  tr_node data is a td vertex and is active
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::undo_split_trapezoid_by_vertex(Dag_node& tr_node, const Curve_end& ce)
+{
+  CGAL_precondition(!tr_node.is_null());
+  Td_map_item item = tr_node.get_data();
+  CGAL_precondition(traits->is_active(item));
+  CGAL_precondition(traits->is_td_vertex(item));
+
+  //get the ds left child and right child nodes of
+  //    tr_node (in the search structure)
+  Dag_node tr_left_node  = tr_node.left_child();
+  Dag_node tr_right_node = tr_node.right_child();
+
+  //advances the ds nodes until ce is found
+  search_using_dag(tr_left_node,  traits, ce, m_empty_he_handle);
+  search_using_dag(tr_right_node, traits, ce, m_empty_he_handle);
+
+  //make sure the trapezoids are active before merging them
+  //CGAL_assertion(traits->is_active(tr_left_node.get_data()) && traits->is_active(tr_right_node.get_data()));
+
+  // bool mrg_res =
+  merge_if_possible(tr_left_node.get_data(), tr_right_node.get_data());
+
+  CGAL_warning(!tr_left_node.is_inner_node());
+  CGAL_warning(!tr_right_node.is_inner_node());
+
+
+  deactivate_trapezoid( tr_right_node, &tr_left_node); //tr_right_node->remove(&tr_left_node);
+  update_largest_leaf_depth( tr_left_node.depth()); //tr_left_node is not an inner node
+  // mark root as deleted
+  deactivate_vertex(tr_node); //tr_node->remove();
+  //no need to update m_number_of_dag_nodes because the number of nodes did not change.
+  // removed nodes were only marked as removed
+}
+
+
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::deactivate_trapezoid (Dag_node& trpz_node, Dag_node* active_node) const
+{
+  CGAL_precondition(traits->is_active(trpz_node.get_data()));
+  CGAL_precondition(traits->is_td_trapezoid(trpz_node.get_data()));
+  if ( Td_active_trapezoid* trap = boost::get<Td_active_trapezoid>(&trpz_node.get_data()) )
+    trap->clear_neighbors();
+  trpz_node.set_data(Td_inactive_trapezoid());
+  if (active_node)
+    trpz_node.set_left_child(*active_node);
+}
+
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::deactivate_vertex (Dag_node& vtx_node) const
+{
+  CGAL_precondition(traits->is_active(vtx_node.get_data()));
+  CGAL_precondition(traits->is_td_vertex(vtx_node.get_data()));
+  if (traits->is_fictitious_vertex(vtx_node.get_data()))
+  {
+    Td_active_fictitious_vertex& v(boost::get<Td_active_fictitious_vertex>(vtx_node.get_data()));
+    vtx_node.set_data(Td_inactive_fictitious_vertex(v.vertex(), &vtx_node));
+  }
+  else
+  {
+    Td_active_vertex& v(boost::get<Td_active_vertex>(vtx_node.get_data()));
+    vtx_node.set_data(Td_inactive_vertex(v.vertex(), &vtx_node));
+  }
+}
+
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::deactivate_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const
+{
+  CGAL_precondition(traits->is_active(edge_node.get_data()));
+  CGAL_precondition(traits->is_td_edge(edge_node.get_data()));
+
+  edge_node.set_data(Td_inactive_edge(cv, &edge_node));
+}
+
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//  splits the trapezoid that corresponds to the root of the
+//  trapezoidal tree with an input halfedge he
+// Precondition:
+//  The root trapezoid is active
+//  The root trapezoid is devided by he or is equal to it and is vertical.
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Dag_node &
+Trapezoidal_decomposition_2<Td_traits>
+::split_trapezoid_by_halfedge(Dag_node& split_node,
+                              Td_map_item& prev_e,
+                              Td_map_item& prev_bottom_tr,
+                              Td_map_item& prev_top_tr,
+                              Halfedge_const_handle he)
+{
+
+  CGAL_warning(traits != NULL);
+  CGAL_precondition(traits->is_active(split_node.get_data()));
+  CGAL_precondition(traits->is_td_trapezoid(split_node.get_data()));
+
+  Td_map_item curr_item (split_node.get_data());
+  Td_active_trapezoid& split_tr = boost::get<Td_active_trapezoid>(curr_item);
+
+  // sets left and right according to td_edge's source and target positions
+  // sets bottom and top to Halfedge itself
+  // no need to set the boundaries since its irrelevant for this trapezoid
+  //   type (TD_EDGE)
+  Td_active_edge sep(he, &split_node);
+
+
+  //creates a one-way path for all the td edges
+  //that represent the Halfedge.
+  //rb() is used to retrieve the
+  //next on path information
+
+  Dag_node top_node(Td_active_trapezoid
+                        (split_tr.left(), split_tr.right(), he, split_tr.top()));
+                         //Td_active_trapezoid::TD_TRAPEZOID,
+                         //split_tr.on_boundaries_flag() &
+                         // (CGAL_TD_ON_LEFT_BOUNDARY  |
+                         //  CGAL_TD_ON_RIGHT_BOUNDARY |
+                         //  CGAL_TD_ON_TOP_BOUNDARY  )));
+  Dag_node bottom_node(Td_active_trapezoid
+                        (split_tr.left(),split_tr.right(), split_tr.bottom(), he));
+                         //Td_active_trapezoid::TD_TRAPEZOID,
+                         //split_tr.on_boundaries_flag() &
+                         // (CGAL_TD_ON_LEFT_BOUNDARY  |
+                         //  CGAL_TD_ON_RIGHT_BOUNDARY |
+                         //  CGAL_TD_ON_BOTTOM_BOUNDARY )));
+
+  Td_active_trapezoid& bottom = boost::get<Td_active_trapezoid>(bottom_node.get_data());
+  Td_active_trapezoid& top    = boost::get<Td_active_trapezoid>(top_node.get_data());
+
+  top.init_neighbours(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt());
+  bottom.init_neighbours(split_tr.lb(), prev_bottom_tr, split_tr.rb(), boost::none);
+
+  if (!traits->is_empty_item(prev_bottom_tr))
+  {
+    Td_active_trapezoid& prev_btm (boost::get<Td_active_trapezoid>(prev_bottom_tr));
+    prev_btm.set_rt(bottom_node.get_data());
+  }
+  if (!traits->is_empty_item(prev_top_tr))
+  {
+    Td_active_trapezoid& prev_top (boost::get<Td_active_trapezoid>(prev_top_tr));
+    prev_top.set_rb(top_node.get_data());
+  }
+  if (!traits->is_empty_item(split_tr.lb()))
+  {
+    Td_active_trapezoid& lb (boost::get<Td_active_trapezoid>(split_tr.lb()));
+    lb.set_rb(bottom_node.get_data());
+  }
+  if (!traits->is_empty_item(split_tr.lt()))
+  {
+    Td_active_trapezoid& lt (boost::get<Td_active_trapezoid>(split_tr.lt()));
+    lt.set_rt(top_node.get_data());
+  }
+  if (!traits->is_empty_item(split_tr.rb()))
+  {
+    Td_active_trapezoid& rb (boost::get<Td_active_trapezoid>(split_tr.rb()));
+    rb.set_lb(bottom_node.get_data());
+  }
+  if (!traits->is_empty_item(split_tr.rt()))
+  {
+    Td_active_trapezoid& rt (boost::get<Td_active_trapezoid>(split_tr.rt()));
+    rt.set_lt(top_node.get_data());
+  }
+  split_node.replace(sep,bottom_node,top_node); //nodes depth are updated here
+  update_largest_leaf_depth( (std::max)(bottom_node.depth(), top_node.depth()) );
+  m_number_of_dag_nodes += 2; //two new nodes were added to the DAG
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+  if (last_cv == curr_item)
+    last_cv = sep;
+  if (prev_cv == curr_item)
+    prev_cv = sep;
+#endif
+
+  const Dag_node* bottomPtr = &split_node.left_child();
+  const Dag_node* topPtr    = &split_node.right_child();
+
+  boost::apply_visitor(set_dag_node_visitor((Dag_node*)bottomPtr),
+                       bottomPtr->get_data());
+  boost::apply_visitor(set_dag_node_visitor((Dag_node*)topPtr),
+                       topPtr->get_data());
+
+  // Td_active_edge& new_e = boost::get<Td_active_edge>(split_node.get_data());
+  if (!traits->is_empty_item(prev_e))
+  {
+    Td_active_edge& e ( boost::get<Td_active_edge>(prev_e));
+    e.set_next(split_node.get_data());
+  }
+  //update these trapezoids pointers.
+  // will be used for the next trapezoid that should be split
+  //  by this Halfedge
+  prev_bottom_tr = bottomPtr->get_data(); //(*bottomPtr).operator->();
+  prev_top_tr    = topPtr->get_data(); //(*topPtr).operator->();
+  prev_e         = split_node.get_data(); //tt.operator->();
+
+  return split_node;
+}
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//  update
+//   tr.bottom()
+//   vertical_ray_shoot downward from tr
+//   tr.top()
+//    vertical_ray_shoot upward from tr
+//  update all the curves incident to the vertex that there's a new curve
+//  starting from this vertex
+//  this point must be an interior point and not a point on the boundaries,
+//  since a point on the boundaries is related to one curve only
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item &
+Trapezoidal_decomposition_2<Td_traits>
+::update_vtx_with_new_edge(Halfedge_const_handle he,
+                           const Curve_end& ce,
+                           Td_map_item& vtx_item,
+                           const Locate_type&
+                              CGAL_precondition_code(lt))
+{
+  CGAL_assertion(traits != NULL);
+  CGAL_precondition(lt == POINT);
+  CGAL_precondition(traits->is_active(vtx_item));
+
+  //ee is interior
+  CGAL_assertion((traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce())
+                                                          == ARR_INTERIOR) &&
+                 (traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce())
+                                                          == ARR_INTERIOR) );
+  //the underlying point of ce
+  const Point& p = (ce.ce() == ARR_MIN_END) ?
+                    traits->construct_min_vertex_2_object()(ce.cv()) :
+                    traits->construct_max_vertex_2_object()(ce.cv()) ;
+
+  //set cw to hold the halfedge whose source is p,
+  // which is clockwise "smallest" starting from top (12 o'clock)
+  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
+  if (traits->compare_cw_around_point_2_object()
+      (he->curve(), is_edge_to_right(he,p),
+       cw_he->curve(),
+       is_edge_to_right(cw_he,p), p) == SMALLER)
+  {
+    boost::apply_visitor(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he);
+  }
+
+  return vtx_item;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item &
+Trapezoidal_decomposition_2<Td_traits>
+::insert_curve_at_vtx_using_dag (Halfedge_const_handle he,
+                                   Vertex_const_handle v,
+                                   Td_map_item& item,
+                                   const Locate_type&
+                                   CGAL_precondition_code(lt))
+{
+  CGAL_precondition(lt==TRAPEZOID || lt==UNBOUNDED_TRAPEZOID);
+
+  Dag_node* node = boost::apply_visitor(dag_node_visitor(), item);
+
+  CGAL_assertion(node != NULL);
+  CGAL_assertion (he != m_empty_he_handle);
+
+
+  //we need to use the halfedge whose source is v. //MICHAL: do we have to?
+  if (he->source() == v)
+ // if ((ce_pair.second == ARR_MIN_END && he->direction() == ARR_LEFT_TO_RIGHT) ||
+ //     (ce_pair.second == ARR_MAX_END && he->direction() == ARR_RIGHT_TO_LEFT)  )
+  {
+    return *split_trapezoid_by_vertex(*node, v, he);
+  }
+  else
+  {
+    return *split_trapezoid_by_vertex(*node, v, he->twin());
+  }
+}
+
+////-----------------------------------------------------------------------------
+//// Description:
+//template <class Td_traits>
+//void Trapezoidal_decomposition_2<Td_traits>
+//::set_trp_params_after_halfedge_update(Halfedge_const_handle old_he,
+//                                       Halfedge_const_handle new_he,
+//                                       Td_map_item& vtx_item)
+//{
+//  CGAL_precondition(old_he != m_empty_he_handle);
+//  CGAL_precondition(traits->is_td_vertex(vtx_item));
+//  CGAL_precondition(traits->is_active(vtx_item));
+//
+//  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
+//
+//  //make sure the cw_he is added in same direction as before
+//  //  such that vtx_item is the source (done inside the set methods)
+//  if (cw_he == old_he || cw_he->twin() == old_he)
+//  {
+//    boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item);
+//  }
+//}
+
+//-----------------------------------------------------------------------------
+// Description:
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::update_vtx_cw_he_after_merge (const X_monotone_curve_2& old_cv,
+                                Halfedge_const_handle new_he,
+                                Td_map_item& vtx_item)
+{
+  CGAL_precondition(traits->is_td_vertex(vtx_item));
+  CGAL_precondition(traits->is_active(vtx_item));
+
+  Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item));
+
+  //make sure the cw_he is added in same direction as before
+  //  such that v_tr is the source (done inside the set methods)
+  if (traits->equal_2_object()(cw_he->curve(), old_cv))
+  {
+    boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item);
+  }
+}
+
+////MICHAL: currently not in use since split is implemented as removed and insert two
+////         in case the split is done differenty - this method would have to be rewritten since it is obsolete
+//template <class Td_traits>
+//void Trapezoidal_decomposition_2<Td_traits>
+//::set_trp_params_after_split_halfedge_update(Halfedge_const_handle new_he,
+//                                            Td_map_item& vtx_item,
+//                                            Halfedge_const_handle he1,
+//                                            Halfedge_const_handle he2)
+//{
+//  CGAL_precondition(traits->is_td_vertex(vtx_item));
+//  CGAL_precondition(traits->is_active(vtx_item));
+//
+//  Halfedge_const_handle top_he (boost::apply_visitor(top_he_visitor(), vtx_item));
+//  Halfedge_const_handle bottom_he (boost::apply_visitor(bottom_he_visitor(), vtx_item));
+//
+//  //make sure the top & bottom are added in same direction as before
+//  //  such that sep is the source (done inside the set methods)
+//  if ((top_he == he1) || (top_he == he1->twin()) ||
+//      (top_he == he2) || (top_he == he2->twin()) )
+//  {
+//     boost::apply_visitor(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he);
+//  }
+//  if ((bottom_he == he1) || (bottom_he == he1->twin()) ||
+//      (bottom_he == he2) || (bottom_he == he2->twin()) )
+//  {
+//    boost::apply_visitor(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he);
+//  }
+//}
+
+//-----------------------------------------------------------------------------
+// Description:
+//  update geometric boundary(top and bottom) for trapezoids
+//  traveled along an iterator till end reached
+//  precondition:
+//  end==0 or end is on the path of the iterator
+// postcondition:
+//  end is pointer to the last trapezoid encountered,if any
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::update_map_items_after_merge (In_face_iterator& it,
+                                Halfedge_const_handle old_he,
+                                Halfedge_const_handle new_he,
+                                Vertex_const_handle /* min_v */,
+                                Vertex_const_handle /* max_v */,
+                                Td_map_item& end)
+{
+  Td_map_item last_item = Td_map_item(0);
+
+  while (!!it && !(*it == end))
+  {
+    Td_map_item curr_item = *it;
+    CGAL_assertion(traits->is_active(curr_item));
+
+    if (traits->is_td_edge(curr_item))
+    {
+      Td_active_edge& e(boost::get<Td_active_edge>(curr_item));
+      if (e.halfedge() == old_he || e.halfedge() == old_he->twin())
+        e.set_halfedge(new_he);
+    }
+    else if (traits->is_td_trapezoid(curr_item))
+    {
+      Td_active_trapezoid& tr(boost::get<Td_active_trapezoid>(curr_item));
+      if (tr.bottom() == old_he || tr.bottom() == old_he->twin())
+        tr.set_bottom(new_he);
+      if (tr.top() == old_he || tr.top() == old_he->twin())
+        tr.set_top(new_he);
+    }
+    else //if is_td_vertex
+    {
+      Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), curr_item));
+      if (cw_he == old_he || cw_he == old_he->twin())
+        boost::apply_visitor(set_cw_he_visitor(new_he), curr_item);
+    }
+
+    last_item = *it;
+    ++it;
+  }
+  end = last_item;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+//  advances input Data structure using data structure,input point p and
+//  possibly Halfedge p_he till
+//  p is found(if p_he hadn't been given)
+//  p_he is found(if p_he was given)
+//  or
+//  leaf node reached
+// postcondition:
+//  output is the closest active trapezoid to ce/p_he
+// remark:
+//  use this function with care!
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
+Trapezoidal_decomposition_2<Td_traits>
+::search_using_dag (Dag_node& curr_node,
+                    const Traits* traits,
+                    const Point& p,
+                    Halfedge_const_handle he,
+                    Comparison_result up /*=EQUAL*/) const
+{
+
+  while(true)
+  {
+    //curr_node is the current pointer to node in the data structure
+    //curr_item is the curent Td_map_item held in curr_node
+    Td_map_item curr_item(curr_node.get_data());
+
+    if (traits->is_td_vertex(curr_item))
+    { // if the curr_item represents a vertex
+      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
+      //if ((is_fict_vtx  && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
+      //    (!is_fict_vtx &&  is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) )
+      if (is_end_point_left_low(p, curr_node))
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      //else if ((is_fict_vtx  && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
+      //         (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) )
+      else if (is_end_point_right_top(p, curr_node))
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      //else if ((is_fict_vtx  && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
+      //         (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
+      else if (are_equal_end_points(p, curr_node))
+      {
+        if (he == m_empty_he_handle) //if he is the empty handle
+        {
+          if ( up == EQUAL )
+          {      // point found!
+            if (traits->is_active(curr_item))
+              return POINT;
+            curr_node = curr_node.left_child();
+          }
+          else if ( up == LARGER ) {          // vertical ray shut up
+            curr_node = curr_node.right_child();
+          }
+          else /*if ( up == SMALLER ) */ {
+            curr_node = curr_node.left_child();               // vertical ray shut down
+          }
+          continue;
+        }
+        else //if he was given
+        {
+          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
+                               (Curve_end(he,ARR_MIN_END), p);
+          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
+                               (Curve_end(he,ARR_MAX_END), p);
+
+          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
+          CGAL_USE(is_equal_to_he_max);
+
+          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
+          continue;
+        }
+      }
+      else
+      {
+        CGAL_assertion(is_end_point_left_low(p,curr_node) ||
+                       is_end_point_right_top(p,curr_node) ||
+                       are_equal_end_points(p,curr_node));
+
+                    //(is_fict_vtx &&
+                    //  (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+                    //   is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+                    //   traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) ||
+                    // (!is_fict_vtx &&
+                    //  (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+                    //   is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+                    //   traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p))));
+
+        return Locate_type();
+      }
+    }
+    if (traits->is_td_edge(curr_item))
+    { // if curr_item represents an edge,
+      //   so top() is a real Halfedge with a curve() if curr_item is active
+      //   or curr_item holds the curve if it is not active
+      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
+
+      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
+      if (cres == SMALLER)
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      else if (cres == LARGER)
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      else
+      {
+        // p is on the curve itself
+         CGAL_warning(
+          (cres == EQUAL) &&
+          (traits->compare_curve_end_x_2_object()
+                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
+          (traits->compare_curve_end_x_2_object()
+                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
+
+        if (he == m_empty_he_handle) //if he was not given
+        {
+          // For a vertical curve, we always visit it after visiting
+          // one of its endpoints.
+          if ((up == EQUAL) || traits->is_vertical(curr_item))
+          {
+            if (traits->is_active(curr_item))
+              return CURVE;
+            curr_node = curr_node.left_child();
+          }
+          else if (up == LARGER)
+          {
+            curr_node = curr_node.right_child();
+          }
+          else
+          { // if (up==SMALLER)
+            curr_node = curr_node.left_child();
+          }
+          continue;
+        }
+        else //if he was given
+        {
+          //p is a parameter space interior point
+          bool is_min_equal = traits->equal_curve_end_2_object()
+                                      (Curve_end(he,ARR_MIN_END),
+                                       Curve_end(he_cv,ARR_MIN_END));
+
+          bool is_max_equal = traits->equal_curve_end_2_object()
+                                      (Curve_end(he,ARR_MAX_END),
+                                       Curve_end(he_cv,ARR_MAX_END));
+
+          CGAL_warning (is_min_equal || is_max_equal);
+          CGAL_USE(is_max_equal);
+
+          Comparison_result res =
+             is_min_equal ?
+              traits->compare_cw_around_point_2_object()
+                       (he_cv, is_curve_to_right(he_cv,p),
+                        he->curve(), is_edge_to_right(he,p), p) :
+              traits->compare_cw_around_point_2_object()
+                       (he->curve(), is_edge_to_right(he,p),
+                        he_cv, is_curve_to_right(he_cv,p), p ,false);
+
+          switch(res)
+          {
+           case LARGER:
+            curr_node = curr_node.right_child();
+            break;
+           case SMALLER:
+            curr_node = curr_node.left_child();
+            break;
+           case EQUAL:
+            switch(up)
+            {
+             case LARGER:
+              curr_node = curr_node.right_child();
+              break;
+             case SMALLER:
+              curr_node = curr_node.left_child();
+              break;
+             case EQUAL:
+              if (traits->is_active(curr_item))
+                return CURVE;
+              curr_node = curr_node.left_child();
+              break;
+            }
+            break;
+          }
+        }
+      }
+    }
+    else
+    {
+      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
+      if (traits->is_active(curr_item))
+      {
+        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
+        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
+      }
+      curr_node = curr_node.left_child();
+      continue;
+    }
+  }
+}
+
+
+
+////-----------------------------------------------------------------------------
+//// Description:
+////  advances input Data structure using data structure,input point p and
+////  possibly Halfedge p_he till
+////  p is found(if p_he hadn't been given)
+////  p_he is found(if p_he was given)
+////  or
+////  leaf node reached
+//// postcondition:
+////  output is the closest active trapezoid to ce/p_he
+//// remark:
+////  use this function with care!
+//template <class Td_traits>
+//void
+//Trapezoidal_decomposition_2<Td_traits>
+//::search_and_print_using_dag (std::ostream& out,
+//                              Dag_node& curr_node,
+//                              const Traits* traits,
+//                              const Point& p,
+//                              Halfedge_const_handle he,
+//                              Comparison_result up /*=EQUAL*/) const
+//{
+//  out << "QUERY: " << std::endl;
+//  out << "x: " << CGAL::to_double(p.x())
+//      << ", y: " << CGAL::to_double(p.y()) << std::endl;
+//
+//
+//
+//  while(true)
+//  {
+//    //curr_node is the current pointer to node in the data structure
+//    //curr_item is the curent Td_map_item held in curr_node
+//    Td_map_item curr_item(curr_node.get_data());
+//
+//    if (traits->is_td_vertex(curr_item))
+//    {
+//      // if the map item represents a vertex
+//
+//      out << " VERTEX : " ;
+//      if (traits->is_active(curr_item))
+//        out << " (active) ";
+//      else
+//        out << " (inactive) ";
+//
+//      // if the curr_item represents a vertex
+//      bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
+//      if (is_fict_vtx)
+//      {
+//        Curve_end vtx_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)));
+//        print_ce_data(vtx_ce.cv(), vtx_ce.ce(), out);
+//      }
+//      else
+//      {
+//        print_point_data(boost::apply_visitor(point_for_vertex_visitor(),curr_item), out);
+//      }
+//
+//      if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
+//        (!is_fict_vtx &&  is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) )
+//      {
+//        out << " Going left " << std::endl;
+//        curr_node = curr_node.left_child();
+//        continue;
+//      }
+//      else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) ||
+//               (!is_fict_vtx &&  is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) )
+//      {
+//        out << " Going right " << std::endl;
+//        curr_node = curr_node.right_child();
+//        continue;
+//      }
+//      else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
+//               (!is_fict_vtx &&  traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(),curr_item), p)) )
+//      {
+//        out << " Equal to query " << std::endl;
+//        if (he == m_empty_he_handle) //if he is the empty handle
+//        {
+//          if ( up == EQUAL )
+//          {      // point found!
+//            if (traits->is_active(curr_item))
+//            {
+//              out << " Found active point! " << std::endl;
+//              return;
+//            }
+//            out << " (equal to inactive point) Going left " << std::endl;
+//            curr_node = curr_node.left_child();
+//          }
+//          else if ( up == LARGER )
+//          {          // vertical ray shut up
+//            out << " Going right " << std::endl;
+//            curr_node = curr_node.right_child();
+//          }
+//          else //if ( up == SMALLER )
+//          {       // vertical ray shut down
+//            out << " Going left " << std::endl;
+//            curr_node = curr_node.left_child();
+//          }
+//          continue;
+//        }
+//        else //if he was given
+//        {
+//          //NOT GONNA HAPPEN
+//        }
+//      }
+//      else
+//      {
+//        out << " Problem - comparing to point" << std::endl;
+//        return;
+//      }
+//    }
+//    if (traits->is_td_edge(curr_item))
+//    {
+//      // if curr_item represents an edge,
+//      //   so top() is a real Halfedge with a curve() if curr_item is active
+//      //   or curr_item holds the curve if it is not active
+//      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
+//
+//      out << " EDGE : " ;
+//      if (traits->is_active(curr_item))
+//      {
+//        out << " (active) ";
+//        if (traits->is_vertical(curr_item))
+//          out << " (vertical) ";
+//      }
+//      else
+//        out << " (inactive) ";
+//
+//      print_cv_data(he_cv, out);
+//
+//      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
+//      if (cres == SMALLER)
+//      {
+//        out << " Going left " << std::endl;
+//        curr_node = curr_node.left_child();
+//        continue;
+//      }
+//      else if (cres == LARGER)
+//      {
+//        out << " Going right " << std::endl;
+//        curr_node = curr_node.right_child();
+//        continue;
+//      }
+//      else
+//      {
+//        // p is on the CURVE (top_he = curr.top()) itself
+//        out << " query is on the curve " << std::endl;
+//
+//        CGAL_assertion(
+//          (cres == EQUAL) &&
+//          (traits->compare_curve_end_x_2_object()
+//                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
+//          (traits->compare_curve_end_x_2_object()
+//                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
+//        if (he == m_empty_he_handle) //if he was not given
+//        {
+//          // For a vertical curve, we always visit it after visiting
+//          // one of its endpoints.
+//          if ((up == EQUAL) || traits->is_vertical(curr_item))
+//          {
+//            if (traits->is_active(curr_item))
+//            {
+//              out << " On active curve " << std::endl;
+//              return;
+//            }
+//            out << " (equal to inactive curve) Going left " << std::endl;
+//            curr_node = curr_node.left_child();
+//          }
+//          else if (up == LARGER) {
+//            out << " Going right " << std::endl;
+//            curr_node = curr_node.right_child();
+//          }
+//          else { // if (up==SMALLER)
+//            out << " Going left " << std::endl;
+//            curr_node = curr_node.left_child();
+//          }
+//          continue;
+//        }
+//        else //if he was given
+//        {
+//          //NOT GONNA HAPPEN
+//        }
+//      }
+//    }
+//    else
+//    {
+//      // if item represents a trapezoid
+//      out << " TRAPEZOID : " ;
+//      if (traits->is_active(curr_item))
+//      {
+//        out << " (active) ";
+//        Td_active_trapezoid tr =  boost::get<Td_active_trapezoid>(curr_item);
+//        if (tr.is_on_boundaries())
+//          out << " UNBOUNDED! ";
+//        else
+//          out << " BOUNDED! ";
+//        return;
+//      }
+//      else
+//        out << " (inactive) ";
+//      out << " (on inactive trapezoid) Going left " << std::endl;
+//      curr_node = curr_node.left_child();
+//      continue;
+//    }
+//  }
+//}
+
+//-----------------------------------------------------------------------------
+// Description:
+//  advances input Data structure using data structure,input point ce and
+//  possibly Halfedge p_he till
+//  ce is found(if p_he hadn't been given)
+//  p_he is found(if p_he was given)
+//  or
+//  leaf node reached
+// postcondition:
+//  output is the closest active trapezoid to ce/p_he
+// remark:
+//  use this function with care!
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
+Trapezoidal_decomposition_2<Td_traits>
+::search_using_dag (Dag_node& curr_node,
+                    const Traits* traits,
+                    const Curve_end& ce,
+                    Halfedge_const_handle he,
+                    Comparison_result up /*=EQUAL*/) const
+{
+  if (he == m_empty_he_handle)
+    return search_using_dag_with_cv (curr_node,traits,ce,NULL, up);
+  else
+    return search_using_dag_with_cv (curr_node,traits,ce,&he->curve(), up);
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+//  advances input Data structure using data structure,input point ce and
+//  possibly X_monotone_curve_2 p_cv till
+//  ce is found(if p_cv hadn't been given)
+//  p_cv is found(if p_cv was given)
+//  or
+//  leaf node reached
+// postcondition:
+//  output is the closest active trapezoid to ce/p_cv
+// remark:
+//  use this function with care!
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
+Trapezoidal_decomposition_2<Td_traits>
+::search_using_dag_with_cv (Dag_node& curr_node,
+                            const Traits* traits,
+                            const Curve_end& ce,
+                            const X_monotone_curve_2* p_cv,
+                            Comparison_result up /*=EQUAL*/) const
+{
+  while(true)
+  {
+    //curr_node is the current pointer to node in the data structure
+    //curr_item is the curent Td_map_item held in curr_node
+    Td_map_item curr_item(curr_node.get_data());
+
+    if (traits->is_td_vertex(curr_item))
+    { // if the curr_item represents a vertex
+      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
+      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
+      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
+      if (is_end_point_left_low(ce, curr_node))
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      //else if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
+      //         (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
+      else if (is_end_point_right_top(ce, curr_node))
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) ||
+      //         (!is_fict_vtx &&  traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) )
+      else if (are_equal_end_points(ce, curr_node))
+      {
+        if (!p_cv) //if p_cv was not given
+        {
+          if ( up == EQUAL )
+          {      // point found!
+            if (traits->is_active(curr_item))
+              return POINT;
+            curr_node = curr_node.left_child();
+          }
+          else if ( up == LARGER )
+          {          // vertical ray shut up
+            curr_node = curr_node.right_child();
+          }
+          else
+          { // if ( up == SMALLER )
+            curr_node = curr_node.left_child();               // vertical ray shut down
+          }
+          continue;
+        }
+        else //if p_cv was given
+        {
+          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
+                               (Curve_end(*p_cv,ARR_MIN_END), ce);
+          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
+                               (Curve_end(*p_cv,ARR_MAX_END), ce);
+
+          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
+          CGAL_USE(is_equal_to_he_max);
+
+          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
+
+          continue;
+        }
+      }
+      else
+      {
+        CGAL_assertion(is_end_point_left_low(ce, curr_node) ||
+                       is_end_point_right_top(ce, curr_node) ||
+                       are_equal_end_points(ce, curr_node));
+          //(is_fict_vtx &&
+          //            (is_end_point_left_low(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+          //             is_end_point_right_top(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+          //             traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) ||
+          //           (!is_fict_vtx &&
+          //            (is_end_point_left_low(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+          //             is_end_point_right_top(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+          //             traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),ce))));
+        return Locate_type();
+      }
+    }
+    if (traits->is_td_edge(curr_item))
+    { // if curr_item represents an edge,
+      //   so top() is a real Halfedge with a curve() if curr_item is active
+      //   or curr_item holds the curve if it is not active
+
+      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
+      Comparison_result cres = traits->compare_curve_end_y_at_x_2_object()(ce, he_cv);
+      if (cres == SMALLER)
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      else if (cres == LARGER)
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      else
+      {
+        // ce is on the CURVE (he_cv = ce.cv()) itself
+        CGAL_warning(
+          (cres == EQUAL) &&
+          (traits->compare_curve_end_x_2_object()
+                        (ce, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
+          (traits->compare_curve_end_x_2_object()
+                        (ce, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
+
+        if (!p_cv) //if p_cv was not given
+        {
+          // For a vertical curve, we always visit it after visiting
+          // one of its endpoints.
+          if ((up == EQUAL) || traits->is_vertical(curr_item))
+          {
+            if (traits->is_active(curr_item))
+              return CURVE;
+            curr_node = curr_node.left_child();
+          }
+          else if (up == LARGER)
+          {
+            curr_node = curr_node.right_child();
+          }
+          else
+          { // if (up==SMALLER)
+            curr_node = curr_node.left_child();
+          }
+          continue;
+        }
+        else //if p_cv was given
+        {
+          Comparison_result res = EQUAL;
+
+          if ((traits->parameter_space_in_x_2_object()
+                      (ce.cv(), ce.ce()) == ARR_INTERIOR) &&
+              (traits->parameter_space_in_y_2_object()
+                      (ce.cv(), ce.ce()) == ARR_INTERIOR) )
+          {
+            //if ce is interior then there might be more than one curve
+            // with ce as its endpoint
+            bool is_min_equal = traits->equal_curve_end_2_object()
+                                      (Curve_end(*p_cv,ARR_MIN_END),
+                                       Curve_end(he_cv,ARR_MIN_END));
+
+            bool is_max_equal = traits->equal_curve_end_2_object()
+                                      (Curve_end(*p_cv,ARR_MAX_END),
+                                       Curve_end(he_cv,ARR_MAX_END));
+
+            CGAL_warning (is_min_equal || is_max_equal);
+            CGAL_USE(is_max_equal);
+
+            //the underlying point of ce
+            const Point& p = (ce.ce() == ARR_MIN_END) ?
+                           traits->construct_min_vertex_2_object()(ce.cv()) :
+                           traits->construct_max_vertex_2_object()(ce.cv()) ;
+
+            res = is_min_equal ?
+                    traits->compare_cw_around_point_2_object()
+                           (he_cv, is_curve_to_right(he_cv,p),
+                            *p_cv, is_curve_to_right(*p_cv,p), p)  :
+                    traits->compare_cw_around_point_2_object()
+                           (*p_cv, is_curve_to_right(*p_cv,p),
+                            he_cv, is_curve_to_right(he_cv,p), p ,false);
+          }
+
+          switch(res)
+          {
+           case LARGER:
+            curr_node = curr_node.right_child();
+          break;
+           case SMALLER:
+            curr_node = curr_node.left_child();
+            break;
+           case EQUAL:
+            switch(up)
+            {
+             case LARGER:
+              curr_node = curr_node.right_child();
+              break;
+             case SMALLER:
+              curr_node = curr_node.left_child();
+              break;
+             case EQUAL:
+              if (traits->is_active(curr_item))
+                return CURVE;
+              curr_node = curr_node.left_child();
+              break;
+            }
+            break;
+          }
+        }
+      }
+    }
+    else
+    {
+      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
+      if (traits->is_active(curr_item))
+      {
+        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
+        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
+      }
+      curr_node = curr_node.left_child();
+      continue;
+    }
+  }
+}
+
+
+
+
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//  advances input Data structure using data structure,input point ce and
+//  possibly X_monotone_curve_2 p_cv till
+//  ce is found(if p_cv hadn't been given)
+//  p_cv is found(if p_cv was given)
+//  or
+//  leaf node reached
+// postcondition:
+//  output is the closest active trapezoid to ce/p_cv
+// remark:
+//  use this function with care!
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Locate_type
+Trapezoidal_decomposition_2<Td_traits>
+::search_using_dag_with_cv (Dag_node& curr_node,
+                            const Traits* traits,
+                            const Point& p,
+                            const X_monotone_curve_2* p_cv,
+                            Comparison_result up /*=EQUAL*/) const
+{
+
+  while(true)
+  {
+    //curr_node is the current pointer to node in the data structure
+    //curr_item is the curent Td_map_item held in curr_node
+    Td_map_item curr_item(curr_node.get_data());
+
+    if (traits->is_td_vertex(curr_item))
+    { // if the curr_item represents a vertex
+      //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
+      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
+      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
+      if (is_end_point_left_low(p, curr_node))
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      //else if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
+      //         (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
+      else if (is_end_point_right_top(p, curr_node))
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) ||
+      //         (!is_fict_vtx &&  traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) )
+      else if (are_equal_end_points(p, curr_node))
+      {
+        if (!p_cv) //if p_cv was not given
+        {
+          if ( up == EQUAL )
+          {      // point found!
+            if (traits->is_active(curr_item))
+              return POINT;
+            curr_node = curr_node.left_child();
+          }
+          else if ( up == LARGER )
+          {          // vertical ray shut up
+            curr_node = curr_node.right_child();
+          }
+          else
+          { // if ( up == SMALLER )
+            curr_node = curr_node.left_child();               // vertical ray shut down
+          }
+          continue;
+        }
+        else //if p_cv was given
+        {
+          bool is_equal_to_he_min = traits->equal_curve_end_2_object()
+                               (Curve_end(*p_cv,ARR_MIN_END), p);
+          bool is_equal_to_he_max = traits->equal_curve_end_2_object()
+                               (Curve_end(*p_cv,ARR_MAX_END), p);
+
+          CGAL_assertion( is_equal_to_he_min || is_equal_to_he_max );
+          CGAL_USE(is_equal_to_he_max);
+
+          curr_node = is_equal_to_he_min ? curr_node.right_child() : curr_node.left_child();
+
+          continue;
+        }
+      }
+      else
+      {
+        CGAL_assertion(is_end_point_left_low(p, curr_node) ||
+                       is_end_point_right_top(p, curr_node) ||
+                       are_equal_end_points(p, curr_node));
+        //CGAL_assertion((is_fict_vtx &&
+        //              (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+        //               is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) ||
+        //               traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) ||
+        //             (!is_fict_vtx &&
+        //              (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+        //               is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) ||
+        //               traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p))));
+        return Locate_type();
+      }
+    }
+    if (traits->is_td_edge(curr_item))
+    { // if curr_item represents an edge,
+      //   so top() is a real Halfedge with a curve() if curr_item is active
+      //   or curr_item holds the curve if it is not active
+      const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item));
+      Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv);
+      if (cres == SMALLER)
+      {
+        curr_node = curr_node.left_child();
+        continue;
+      }
+      else if (cres == LARGER)
+      {
+        curr_node = curr_node.right_child();
+        continue;
+      }
+      else
+      {
+        // p is on the CURVE itself
+        CGAL_warning(
+          (cres == EQUAL) &&
+          (traits->compare_curve_end_x_2_object()
+                        (p, Curve_end(he_cv,ARR_MAX_END)) != LARGER) &&
+          (traits->compare_curve_end_x_2_object()
+                        (p, Curve_end(he_cv,ARR_MIN_END)) != SMALLER));
+
+        if (!p_cv) //if p_cv was not given
+        {
+          // For a vertical curve, we always visit it after visiting
+          // one of its endpoints.
+          if ((up == EQUAL) || traits->is_vertical(curr_item))
+          {
+            if (traits->is_active(curr_item))
+              return CURVE;
+            curr_node = curr_node.left_child();
+          }
+          else if (up == LARGER)
+          {
+            curr_node = curr_node.right_child();
+          }
+          else
+          { // if (up==SMALLER)
+            curr_node = curr_node.left_child();
+          }
+          continue;
+        }
+        else //if p_cv was given
+        {
+          Comparison_result res = EQUAL;
+
+          //p is interior then there might be more than one curve
+          // with p as its endpoint
+          bool is_min_equal = traits->equal_curve_end_2_object()
+                                    (Curve_end(*p_cv,ARR_MIN_END),
+                                     Curve_end(he_cv,ARR_MIN_END));
+
+          bool is_max_equal = traits->equal_curve_end_2_object()
+                                    (Curve_end(*p_cv,ARR_MAX_END),
+                                     Curve_end(he_cv,ARR_MAX_END));
+
+          CGAL_warning (is_min_equal || is_max_equal);
+          CGAL_USE(is_max_equal);
+
+          res = is_min_equal ?
+                  traits->compare_cw_around_point_2_object()
+                         (he_cv, is_curve_to_right(he_cv,p),
+                          *p_cv, is_curve_to_right(*p_cv,p), p)  :
+                  traits->compare_cw_around_point_2_object()
+                           (*p_cv, is_curve_to_right(*p_cv,p),
+                            he_cv, is_curve_to_right(he_cv,p), p ,false);
+
+          switch(res)
+          {
+           case LARGER:
+            curr_node = curr_node.right_child();
+          break;
+           case SMALLER:
+            curr_node = curr_node.left_child();
+            break;
+           case EQUAL:
+            switch(up)
+            {
+             case LARGER:
+              curr_node = curr_node.right_child();
+              break;
+             case SMALLER:
+              curr_node = curr_node.left_child();
+              break;
+             case EQUAL:
+              if (traits->is_active(curr_item))
+                return CURVE;
+              curr_node = curr_node.left_child();
+              break;
+            }
+            break;
+          }
+        }
+      }
+    }
+    else
+    {
+      // if is_degenerate() == 0, meaning: curr_item is a real trapezoid
+      if (traits->is_active(curr_item))
+      {
+        Td_active_trapezoid& tr = boost::get<Td_active_trapezoid>(curr_item);
+        return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID;
+      }
+      curr_node = curr_node.left_child();
+      continue;
+    }
+  }
+}
+
+
+
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Dag_node
+Trapezoidal_decomposition_2<Td_traits>
+::container2dag (Nodes_map& ar, int left, int right,
+                 int& num_of_new_nodes) const
+{
+  CGAL_warning(traits != NULL);
+
+  if (right > left)
+  {
+    int d = (int)std::floor((double(right+left))/2);
+    Dag_node& node(ar.find(d)->second);
+    Td_map_item item(node.get_data());
+    CGAL_assertion(traits->is_active(item));
+    CGAL_assertion(traits->is_td_trapezoid(item));
+    Dag_node& tr_node( ar.find(d)->second);
+    Td_active_trapezoid& tr( boost::get<Td_active_trapezoid>(tr_node.get_data()));
+    Vertex_const_handle v = tr.right();
+
+    Curve_end ce(traits->vtx_to_ce(v));
+    bool is_interior = traits->parameter_space_in_x_2_object()(ce.cv(), ce.ce())
+                      && traits->parameter_space_in_y_2_object()(ce.cv(), ce.ce());
+
+    Dag_node curr_node;
+    Dag_node left_child  (container2dag(ar,left,d,num_of_new_nodes));
+    Dag_node right_child (container2dag(ar,d+1,right,num_of_new_nodes));
+    if (is_interior)
+    {
+      curr_node.replace(Td_map_item(Td_active_vertex(v,m_empty_he_handle)),left_child, right_child);
+    }
+    else
+    {
+      curr_node.replace(Td_map_item(Td_active_fictitious_vertex(v,m_empty_he_handle)),left_child, right_child);
+    }
+
+    num_of_new_nodes++;
+    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())),curr_node.left_child().get_data());
+    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())),curr_node.right_child().get_data());
+    boost::apply_visitor(set_dag_node_visitor((Dag_node*)&curr_node),curr_node.get_data());
+    //curr_node.left_child()->set_dag_node(&curr_node.left_child());
+    //curr_node.right_child()->set_dag_node(&curr_node.right_child());
+    //curr_node->set_dag_node(&curr_node);// fake temporary node
+    deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted
+    boost::apply_visitor(set_dag_node_visitor((Dag_node*)NULL),curr_node.get_data());//curr_node->set_dag_node(0);
+
+    return curr_node;
+  }
+  else
+  {
+    return ar.find(left)->second;
+  }
+}
+
+template <class Td_traits>
+bool Trapezoidal_decomposition_2<Td_traits>
+::is_last_edge(Halfedge_const_handle he , Td_map_item& vtx_item)
+{
+  CGAL_precondition(traits->is_td_vertex(vtx_item));
+  CGAL_precondition(traits->is_active(vtx_item));
+
+  Vertex_const_handle v (boost::apply_visitor(vertex_for_active_vertex_visitor(), vtx_item));
+
+  typename Arrangement_on_surface_2::Halfedge_around_vertex_const_circulator first, second;
+  first = second = v->incident_halfedges();
+  ++second;
+  if (he->source() == v)
+    he = he->twin();
+  CGAL_assertion(he == first);
+  if (second == first) //if he is the only halfedge around v -> return true
+    return true;
+  return false;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+//  if Halfedge or twin already inserted the latter is returned.
+//  otherwise the left-low most edge-degenerate trapezoid that represents the
+//  input Halfedge is returned
+// Remark:
+//  Given an edge-degenerate trapezoid representing a Halfedge,
+//  all the other trapezoids representing the Halfedge can be extracted
+//  via moving continously to the left and right neighbours.
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item
+Trapezoidal_decomposition_2<Td_traits>
+::insert(Halfedge_const_handle he) //::insert_in_face_interior(Halfedge_const_handle he)
+{
+  //print_cv_data(he->curve());
+  if (m_with_guarantees)
+    update();
+
+  // locate the input Halfedge end points in the Td_map_item Dag
+
+  CGAL_assertion(traits != NULL);
+
+  //get the two vertices of the halfedge
+  Vertex_const_handle v1 = (he->direction() == ARR_LEFT_TO_RIGHT) ? he->source() : he->target();
+  Vertex_const_handle v2 = (he->direction() == ARR_LEFT_TO_RIGHT) ? he->target() : he->source();
+
+  //define the Curve end points (curve end = vertex)
+  const Curve_end ce1(he, ARR_MIN_END); //MICHAL: to be removed?
+  const Curve_end ce2(he, ARR_MAX_END); //MICHAL: to be removed?
+
+  // make sure that the two endpoints  are not the same point
+  CGAL_precondition(!traits->equal_curve_end_2_object()(ce1, ce2));
+
+  Locate_type lt1,lt2;
+
+  //should hold the trapezoids in which the edge endpoints should be located
+  Td_map_item item1;
+  Td_map_item item2;
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+  locate_optimization(ce1,item1,lt1);
+
+#else
+  //location of the left endpoint of the edge we're inserting
+  item1 = locate(ce1,lt1);
+
+#endif
+
+
+  //the inserted edge should not cut any existing edge
+  if (lt1 == CURVE)
+  {
+    CGAL_precondition_msg(lt1 != CURVE, "Input is not planar as\
+      one of the input point inside previously inserted Halfedge.");
+    return Td_map_item(0);
+  }
+
+  //if the edge starts at vertex, we should not insert it into the DAG,
+  //but we should update all the edges incident to the vertex.
+  //else if this is a new vertex - insert a node to the DAG that will represent the new vertex.
+  //the incident edges in this case is only the edge itself, and so it is a trivial operation.
+  Td_map_item p1_item = (lt1 == POINT) ?
+    update_vtx_with_new_edge(he,ce1,item1,lt1) :
+    insert_curve_at_vtx_using_dag(he,v1,item1,lt1);
+
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+  locate_optimization(ce2,item2,lt2);
+  locate_opt_empty();
+
+#else
+  // TODO(oren): locating the second endpoint. this is not necessary,
+  // and time consuming.
+  item2 = locate(ce2,lt2);
+
+#endif
+
+  if (lt2==CURVE)
+  {
+    CGAL_precondition_msg(lt2!=CURVE,"Input is not planar as\
+      one of the input point inside previously inserted Halfedge.");
+    return Td_map_item(0);
+  }
+
+  Td_map_item p2_item = (lt2 == POINT) ?
+    update_vtx_with_new_edge(he,ce2,item2,lt2) :
+    insert_curve_at_vtx_using_dag(he,v2,item2,lt2);
+
+  // locate and insert end points of the input halfedge to the Td_map_item
+  // Dag if needed
+  Dag_node p1_node(*(boost::apply_visitor(dag_node_visitor(), p1_item)));
+  //Dag_node p2_node(*(boost::apply_visitor(dag_node_visitor(), p2_item)));// Not in use
+
+  // create the Td_map_item iterator for traveling along the Trapezoids that
+  // intersect the input Halfedge, using left-low to right-high order
+  In_face_iterator it = follow_curve(p1_node,he,LARGER);
+  boost::optional<Td_active_trapezoid> curr_trp = boost::none;
+  Td_map_item prev = p1_item;
+  Td_map_item prev_bottom_tr = Td_map_item(0); //active_tr
+  Td_map_item prev_top_tr = Td_map_item(0); //active_tr
+  Td_map_item old_e = Td_map_item(0);
+  Td_map_item old_top_tr = Td_map_item(0); //active_tr
+  Td_map_item old_bottom_tr = Td_map_item(0); //active_tr
+
+  Dag_node* node = 0;
+  bool first_time = true;
+
+  CGAL_assertion(!traits->is_empty_item(*it) && traits->is_td_trapezoid(*it));
+
+  while(!!it) //this means as long as the iterator is valid
+  {
+    curr_trp = it.trp();
+    CGAL_assertion(curr_trp != boost::none);
+    prev_bottom_tr = (*curr_trp).lb();
+    prev_top_tr = (*curr_trp).lt();
+
+    // pass using it along cv
+    it++;             //this is the logic of the iterator.
+                      // the iterator goes to the next trapezoid right-high.
+    node = (*curr_trp).dag_node();
+    if(first_time)
+    {
+      Halfedge_const_handle top_he ((*curr_trp).top());
+      if((top_he == he) || (top_he == he->twin())) {
+        CGAL_warning((top_he != he) && (top_he != he->twin()));
+        return Td_map_item(0);
+      }
+    }
+    first_time = false;
+
+    CGAL_assertion(node != NULL);
+    split_trapezoid_by_halfedge (*node, old_e, old_bottom_tr, old_top_tr, he);
+
+
+
+    if (node->is_inner_node())
+    {
+      // merge adjacent trapezoids on input Halfedge's bottom side if possible
+      //   make sure we try to merge active trapezoids
+      //node->left_child() is active
+      Td_map_item new_btm_item = node->left_child().get_data();
+      CGAL_assertion(traits->is_td_trapezoid(new_btm_item) && traits->is_active(new_btm_item));
+      if(merge_if_possible(prev_bottom_tr, new_btm_item))
+      {
+        Dag_node* left_child_node = boost::apply_visitor(dag_node_visitor(),prev_bottom_tr);
+        node->set_left_child(*left_child_node);
+        old_bottom_tr = prev_bottom_tr;
+        m_number_of_dag_nodes--; //update number of nodes in the DAG after merge
+      }
+
+      // merge adjacent trapezoids on input Halfedge's top side if possible
+      //   make sure we try to merge active trapezoids
+      //node->right_child() is active
+      Td_map_item new_top_item = node->right_child().get_data();
+      CGAL_assertion(traits->is_td_trapezoid(new_top_item) && traits->is_active(new_top_item));
+      if(merge_if_possible(prev_top_tr, new_top_item))
+      {
+        Dag_node* right_child_node = boost::apply_visitor(dag_node_visitor(),
+                                                          prev_top_tr);
+        node->set_right_child(*right_child_node);
+        old_top_tr = prev_top_tr;
+        m_number_of_dag_nodes--; //update number of DAG nodes after merge
+      }
+      // update trapezoid's left/right neighbouring relations
+      //MICHAL: if the assertion below fails then we need to check why
+      CGAL_assertion(!traits->is_td_trapezoid(prev));
+      if(traits->is_td_trapezoid(prev))
+      {
+        //MICHAL: if we reach here ->then this need to be uncommented
+        //        I thought that prev is always a degenerate point
+        //curr_trp->set_lb(prev);
+        //curr_trp->set_lt(prev);
+        //prev->set_rb(curr_trp);
+        //prev->set_rt(curr_trp);
+      }
+    }
+    else
+    {
+
+#ifdef CGAL_TD_DEBUG
+
+      CGAL_assertion((*curr_trp).is_valid(traits));
+
+#endif
+
+      break;
+    }
+
+  }
+  m_number_of_curves++;
+
+#ifdef CGAL_TD_DEBUG
+  write(std::cout,*m_dag_root,*traits) << std::endl;
+  std::cout << "\nTD::insert() exited with data structure"
+            << is_valid(*m_dag_root) << std::endl;
+#endif
+
+  return old_e;
+}
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//
+// Remark:
+//  Assumes the map to be planar.
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::remove(Halfedge_const_handle he)
+{
+  //print_dag_addresses(*m_dag_root);
+
+  if (m_with_guarantees)
+    update();
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+  locate_opt_empty();
+#endif
+
+  CGAL_warning(traits != NULL);
+
+  //calculating leftmost and rightmost curve ends of he
+  const Curve_end leftmost(he,ARR_MIN_END);
+  const Curve_end rightmost(he,ARR_MAX_END);
+
+  //locating leftmost & rightmost curve ends
+  Locate_type lt1,lt2;
+  Td_map_item p1_item = locate(leftmost,lt1);
+  Td_map_item p2_item = locate(rightmost,lt2);
+
+  //both should be located on a point degenerate trapezoid
+  CGAL_warning(lt1==POINT && lt2==POINT);
+
+  if (lt1!=POINT || lt2!=POINT)
+    return;
+
+  CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != NULL);
+  CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != NULL);
+
+  //retrieve the Dag_nodes of the two point-degenerate trapezoid
+  Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item));//*t1.dag_node();
+  Dag_node& p2_node = *(boost::apply_visitor(dag_node_visitor(), p2_item));//*t2.dag_node();
+
+  //calculate the immediate lower, central and upper neighbourhood of
+  // the curve in the data structure
+  //In_face_iterator btm_it(follow_curve(tt1,he,SMALLER));
+  In_face_iterator btm_it(follow_curve(p1_node,he,SMALLER));
+  In_face_iterator mid_it(follow_curve(p1_node,he,EQUAL));
+  In_face_iterator top_it(follow_curve(p1_node,he,LARGER));
+
+  bool inc_btm = true; //true if btm_it should be be incremented (not top_it)
+  bool prev_inc_btm = false; //holds the inc_btm from previous iteration
+  bool end_reached = false; //true if this is the last iteration
+
+  //define the map of new DAG nodes of the new trapezoids
+  Nodes_map new_array;
+  int last_index[] = {0,0};
+  int sz = 0;
+
+  Td_active_trapezoid& btm_it_tr (btm_it.trp());
+  Td_active_trapezoid& top_it_tr (top_it.trp());
+  Vertex_const_handle left_v = btm_it_tr.left();
+  Vertex_const_handle right_v;
+  Td_map_item last_btm_tr_item = Td_map_item(0); //pointer to the last btm_it tr
+  Td_map_item last_top_tr_item = Td_map_item(0); //pointer to the last top_it tr
+  Td_map_item last_new_tr_item = Td_map_item(0); //last new trpz that was created
+  Td_map_item old_tr_item      = Td_map_item(0); //old trpz on which the new is based
+
+
+  CGAL_warning((top_it.trp()).left() == left_v);
+
+  //-----------------------------------
+  //1. remove adjacency at left end point
+  //  first_cv_tr is the first trapezoid representing he (type TD_EDGE)
+  Td_map_item first_edge_fragment_item (*mid_it);
+
+  //-----------------------------------
+  //2. update the map & the dag with new trapezoids which are merge of the
+  //  trapezaoids above and below the removed halfedge.
+  do {
+    btm_it_tr = btm_it.trp();
+    top_it_tr = top_it.trp();
+
+    // decide which of btm_it,top_it to increment
+    inc_btm = is_end_point_left_low(Curve_end(traits->vtx_to_ce(btm_it_tr.right())),
+                                    Curve_end(traits->vtx_to_ce(top_it_tr.right())));
+    // the current iterator that should be incremented
+    In_face_iterator& curr_it =  inc_btm ? btm_it : top_it;
+    Td_active_trapezoid& curr_it_tr (curr_it.trp());
+
+    // reference to the last curr_it tr
+    Td_map_item& last_tr_item (inc_btm ? last_btm_tr_item : last_top_tr_item);
+
+    //set the new trpz right end
+    right_v = curr_it_tr.right();
+
+    // create a new trapezoid (the merge of top_it and btm_it)
+    typename Nodes_map::value_type
+      pair(sz,
+           Dag_node(Td_active_trapezoid(left_v, right_v,
+                                        btm_it_tr.bottom(),top_it_tr.top()),
+                    (std::max)(btm_it_tr.dag_node()->depth(),
+                              top_it_tr.dag_node()->depth())));
+    new_array.insert(pair);
+    //copy trapezoid data from btm and top trapezoids
+    Dag_node& new_node = (new_array.find(sz))->second;
+    ++sz;
+    Td_active_trapezoid& tr(boost::get<Td_active_trapezoid>(new_node.get_data()));
+    tr.set_dag_node(&new_node);
+    tr.set_lb(btm_it_tr.lb());
+    tr.set_lt(top_it_tr.lt());
+    //new_node->set_dag_node(&new_node);
+    //new_node->set_lb(btm_it->lb());
+    //new_node->set_lt(top_it->lt());
+    if (!traits->is_empty_item(last_new_tr_item))
+    {
+      if (traits->is_trpz_top_equal(last_new_tr_item, new_node.get_data()))
+      {
+        tr.set_lt(last_new_tr_item); //new_node->set_lt(last_new_tr);
+      }
+
+      if (traits->is_trpz_bottom_equal(last_new_tr_item, new_node.get_data()))
+      {
+        tr.set_lb(last_new_tr_item); //new_node->set_lb(last_new_tr);
+      }
+    }
+    if (!traits->is_empty_item(tr.lb()))
+    {
+      Td_map_item lb_item = tr.lb();
+      Td_active_trapezoid& lb_tr(boost::get<Td_active_trapezoid>(lb_item));
+      lb_tr.set_rb(new_node.get_data());
+    }
+    if (!traits->is_empty_item(tr.lt()))
+    {
+      Td_map_item lt_item = tr.lt();
+      Td_active_trapezoid& lt_tr(boost::get<Td_active_trapezoid>(lt_item));
+      lt_tr.set_rt(new_node.get_data());
+    }
+
+    last_new_tr_item = new_node.get_data(); //new_node.operator->(); //get the last new trapezoid created
+
+    //update arguments for next iteration:
+    left_v = right_v; //new left is curr right
+    last_btm_tr_item = *btm_it;
+    last_top_tr_item = *top_it;
+
+    old_tr_item = *curr_it;  //the old trpz on which the new is based
+    curr_it++; //increment the iterator to the next trapezoid
+    //curr_it_tr  = *(curr_it.trp());
+    end_reached = !btm_it || !top_it;
+
+    //copy neighbouring trapezoids in case top/btm are not the same for the old
+    //  trapezoid and the next trapezoid after incrementing the old one
+    if (!btm_it ||
+        (inc_btm && !traits->is_trpz_bottom_equal(old_tr_item,*curr_it)))
+    {
+      Td_map_item rb (boost::apply_visitor(rb_visitor(),old_tr_item));
+      if (!traits->is_empty_item(rb))
+      {
+        boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr);
+        boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb);
+      }
+    }
+    if (!top_it ||
+        (!inc_btm && !traits->is_trpz_top_equal(old_tr_item,*curr_it)))
+    {
+      Td_map_item rt (boost::apply_visitor(rt_visitor(),old_tr_item));
+      if (!traits->is_empty_item(rt))
+      {
+        boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr);
+        boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt);
+      }
+    }
+
+    //set the no longer relevant trapezoids as removed and add the new nodes
+    //  as their replacement
+
+    Dag_node* last_tr_node (boost::apply_visitor(dag_node_visitor(), last_tr_item));
+
+    if (prev_inc_btm != inc_btm)
+    {
+      int num_of_new_nodes = 0;
+      Dag_node tmp =
+        container2dag (new_array, last_index[inc_btm ? 0 : 1],
+                        sz-1, num_of_new_nodes);
+
+      deactivate_trapezoid( *last_tr_node, &tmp); //last_tr->remove(&tmp);
+      m_number_of_dag_nodes += num_of_new_nodes; //new vertex nodes (rooted at tmp) were added
+      m_number_of_dag_nodes += 1; //new node (tmp) was added
+
+      last_index[inc_btm ? 0 : 1] = sz;
+      prev_inc_btm = inc_btm; //update for next iteration
+      //tmp is the root of a sub graph.
+      //The largest depth in this sub-graph may be the largest leaf depth
+      update_largest_leaf_depth( tmp.max_depth() );
+
+    }
+    else
+    {
+      int num_of_new_nodes = 0;
+      Dag_node tmp = container2dag (new_array, sz-1, sz-1, num_of_new_nodes);
+
+      deactivate_trapezoid( *last_tr_node, &tmp); //last_tr->remove(&tmp);
+      m_number_of_dag_nodes += 1; //new node (tmp) was added
+
+      last_index[inc_btm ? 0 : 1] = sz;
+      //tmp is a node with no children
+      update_largest_leaf_depth( tmp.max_depth() );
+    }
+
+    // update the dag node pointer in the trapezoid
+    const Dag_node* real = &last_tr_node->left_child();
+    boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real);
+  }
+  while(!end_reached);
+
+
+  // get the iterator (btm_it or top_it) that holds the trapezoid that was
+  //  not removed in the last iteration
+  In_face_iterator& it = !prev_inc_btm ? btm_it : top_it;
+  Td_active_trapezoid& tr (it.trp());
+  // remove the last trapezoid to remove and set the last new trapezoid
+  //  created as its replacement. update the relevant data
+  Td_map_item rb = tr.rb();
+  Td_map_item rt = tr.rt();
+
+  int num_of_new_nodes = 0;
+  Dag_node tmp =
+    container2dag(new_array, last_index[!inc_btm ? 0 : 1],
+                  static_cast<int>(new_array.size())-1, num_of_new_nodes);
+
+  deactivate_trapezoid( *(tr.dag_node()), &tmp);  //it->remove(&tmp);
+  //tmp is the root of a sub graph.
+  //The largest depth in this sub-graph may be the largest leaf depth
+  update_largest_leaf_depth( tmp.depth() );
+  m_number_of_dag_nodes += num_of_new_nodes; //new node (tmp) was added
+
+  const Dag_node* real = &tr.dag_node()->left_child();
+  boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real);
+
+  if (!traits->is_empty_item(rb))
+  {
+    boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb);
+    boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr);
+  }
+  if (!traits->is_empty_item(rt))
+  {
+    boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt);
+    boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr);
+  }
+
+  //-----------------------------------
+  //3. remove the trapezoids that represent the removed halfedge
+  boost::shared_ptr<X_monotone_curve_2> removed_cv_ptr (new X_monotone_curve_2(he->curve()));
+  Base_map_item_iterator last_edge_fragment_it = mid_it;//Base_trapezoid_iterator last_mid = mid_it;
+  Dag_node* e_node = NULL;
+  while(!!++mid_it)
+  {
+    e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
+    deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
+    last_edge_fragment_it = mid_it;
+  }
+
+  //-----------------------------------
+  //4. remove adjacency at right end point
+
+  //remove the final trapezoid representing the removed halfedge
+  e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
+  deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
+
+  //-----------------------------------
+  //5. if the halfedge vertices are now isolated, undo the split trapezoid
+  //  by point(vtx) operation
+  if (is_last_edge(he ,p1_item))
+    undo_split_trapezoid_by_vertex (p1_node, leftmost);
+
+  if (is_last_edge(he ,p2_item))
+    undo_split_trapezoid_by_vertex (p2_node, rightmost);
+
+  //-----------------------------------
+  //6. reevaluating number of curves
+  m_number_of_curves--;
+}
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//
+// preconditions:
+//  p is not on an edge or a vertex.
+template <class Td_traits>
+typename Trapezoidal_decomposition_2<Td_traits>::Td_map_item&
+Trapezoidal_decomposition_2<Td_traits>
+::vertical_ray_shoot(const Point & p,Locate_type & lt,
+                     const bool up_direction /*=true*/) const
+{
+#ifdef CGAL_TD_DEBUG
+  CGAL_assertion(traits);
+#endif
+
+  // We replace the following locate with a direct call to
+  // search_using_dag because we need to deal
+  // with cases where the source of shoot is a point/curve.
+  // reference t_p = locate(p,lt);
+
+  Dag_node curr = *m_dag_root;
+
+  lt = search_using_dag(curr, traits, p, m_empty_he_handle ,
+                                  up_direction ?
+                                  CGAL::LARGER : CGAL::SMALLER);
+
+  Td_map_item& item(curr.get_data());
+
+  if (traits->is_td_trapezoid(item))
+  {
+    CGAL_assertion(traits->is_active(item));
+    /* using exact traits, it may happen that p is on the
+       right side of the trapezoid directly under its
+       right point(analogouly directly above its left point).
+       with the trapezoid extending to the left.
+       In this case vertical ray shoot upwards(downwards)
+       doesn't returns c as output.
+
+       Example.
+       x---x
+       p
+       x------x
+    */
+    Td_active_trapezoid& tr (boost::get<Td_active_trapezoid>(item));
+
+    if ((up_direction && !tr.is_on_right_boundary() &&
+        (traits->compare_curve_end_x_2_object()
+          (p,traits->vtx_to_ce(tr.right())) == EQUAL) &&
+        (tr.is_on_left_boundary() ||
+          !traits->equal_curve_end_2_object()(traits->vtx_to_ce(tr.left()),
+                                              traits->vtx_to_ce(tr.right())))) ||
+        (!up_direction && !tr.is_on_left_boundary() &&
+        (traits->compare_curve_end_x_2_object()
+          (p,traits->vtx_to_ce(tr.left())) == EQUAL) &&
+        (tr.is_on_right_boundary() ||
+          !traits->equal_curve_end_2_object()(traits->vtx_to_ce(tr.left()),
+                                              traits->vtx_to_ce(tr.right())))))
+    {
+      // recalculate vertical ray shoot using locate on point
+      return up_direction ?
+          locate(traits->vtx_to_ce(tr.right()),lt) : locate(traits->vtx_to_ce(tr.left()),lt);
+    }
+
+    if (up_direction ? tr.is_on_top_boundary() : tr.is_on_bottom_boundary())
+      lt = UNBOUNDED_TRAPEZOID;
+    else
+      lt = TRAPEZOID;
+
+  }
+  return item;
+}
+
+//MICHAL: commented due to inefficient depth update, remove and insert instead
+//-----------------------------------------------------------------------------
+//// Description:
+////
+//template <class Td_traits>
+//void Trapezoidal_decomposition_2<Td_traits>
+//::before_split_edge(const X_monotone_curve_2& cv,
+//                   const X_monotone_curve_2& cv1,
+//                   const X_monotone_curve_2& cv2)
+//{
+//#ifdef MICHAL_DEBUG
+//  std::cout << "SPLITTING: --------------------------" << std::endl;
+//  std::cout << "cv before split" << std::endl;
+//  print_cv_data(cv);
+//  std::cout << "cv1 before split" << std::endl;
+//  print_cv_data(cv1);
+//  std::cout << "cv2 before split" << std::endl;
+//  print_cv_data(cv2);
+//#endif
+//
+//#ifdef CGAL_TD_DEBUG
+//  std::cout << "\nTD::before_split_edge(" << cv << "," << cv1 << "," << cv2
+//            << ") called with "
+//            << (is_valid(*m_dag_root) ? "valid" : "invalid")
+//            << " data structure" <<  std::endl;
+//  write(std::cout,*m_dag_root,*traits) << std::endl;
+//#endif
+//
+//  if (m_with_guarantees) update();
+//
+//#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+//
+//  locate_opt_empty();
+//
+//#endif
+//
+//#ifndef CGAL_TD_DEBUG
+//
+//  if (!traits)
+//  {
+//    CGAL_warning(traits != NULL);
+//    return;
+//  }
+//  if (!traits->are_mergeable_2_object()(cv1,cv2))
+//  {
+//    CGAL_warning(traits->are_mergeable_2_object()(cv1,cv2));
+//    return;
+//  }
+//
+//#else
+//
+//  if (!traits->are_mergeable_2_object()(cv1,cv2))
+//  {
+//    std::cerr << "\ncv " << cv;
+//    std::cerr << "\ncv1 " << cv1;
+//    std::cerr << "\ncv1 " << cv2 << std::endl;
+//  }
+//  CGAL_precondition(traits != NULL);
+//  CGAL_precondition(traits->are_mergeable_2_object()(cv1,cv2));
+//
+//#endif
+//
+//  // find the splitting point (curve end)
+//  Curve_end split_ce =
+//      traits->equal_curve_end_2_object()(Curve_end(cv1, ARR_MAX_END),
+//                                        Curve_end(cv2, ARR_MIN_END) ) ?
+//      Curve_end(cv1, ARR_MAX_END) : Curve_end(cv2, ARR_MAX_END);
+//
+//
+//
+//#ifndef CGAL_TD_DEBUG
+//
+//  CGAL_warning( is_end_point_left_low(Curve_end(cv,ARR_MIN_END),split_ce) );
+//
+//  CGAL_warning( is_end_point_right_top(Curve_end(cv,ARR_MAX_END),split_ce) );
+//
+//#else
+//
+//  CGAL_precondition( is_end_point_left_low(Curve_end(cv,ARR_MIN_END),split_ce) );
+//
+//  CGAL_precondition( is_end_point_right_top(Curve_end(cv,ARR_MAX_END),split_ce) );
+//
+//#endif
+//
+//  // find extremal points
+//  const Curve_end leftmost = (traits->equal_curve_end_2_object()
+//                                (Curve_end(cv1, ARR_MAX_END),
+//                                 Curve_end(cv2, ARR_MIN_END) ))?
+//                            Curve_end(cv1,ARR_MIN_END) :
+//                            Curve_end(cv2,ARR_MIN_END) ;
+//
+//  const Curve_end rightmost = (traits->equal_curve_end_2_object()
+//                                 (Curve_end(cv1, ARR_MAX_END),
+//                                  Curve_end(cv2, ARR_MIN_END) ))?
+//                            Curve_end(cv2,ARR_MAX_END) :
+//                            Curve_end(cv1,ARR_MAX_END) ;
+//
+//  CGAL_assertion(traits->equal_curve_end_2_object()
+//                              (Curve_end(cv,ARR_MIN_END), leftmost));
+//  CGAL_assertion(traits->equal_curve_end_2_object()
+//                              (Curve_end(cv,ARR_MAX_END), rightmost));
+//
+//  //locate the trapezoids of the extremal points
+//  Locate_type lt1,lt2;
+//
+//  // representing trapezoids for extremal points
+//  X_trapezoid& t1 = locate(leftmost,lt1);
+//  X_trapezoid& t2 = locate(rightmost,lt2);
+//
+//#ifndef CGAL_TD_DEBUG
+//
+//  CGAL_warning(lt1==POINT && lt2==POINT);
+//  CGAL_warning(t1.is_active() && t2.is_active());
+//
+//#else
+//
+//  CGAL_precondition(lt1==POINT && lt2==POINT);
+//  CGAL_precondition(t1.is_active() && t2.is_active());
+//  CGAL_warning(t1.dag_node() != NULL);
+//  CGAL_warning(t2.dag_node() != NULL);
+//
+//#endif
+//  m_before_split.m_cv_before_split = cv;
+//  //set iterators for below curve, on curve & above curve
+//  Dag_node& tt1 = *t1.dag_node();
+//  m_before_split.m_p_btm_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,SMALLER));
+//  m_before_split.m_p_mid_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,EQUAL));
+//  m_before_split.m_p_top_it = new In_face_iterator(follow_curve(tt1,m_before_split.m_cv_before_split,LARGER));
+//  //locate the splitting point in the trapezoidal map
+//  //  should be found on a degenerate trapezoid representing a curve
+//  Locate_type lt;
+//  X_trapezoid& old_t = locate(split_ce,lt);
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion(lt==CURVE);
+//  CGAL_precondition(old_t.is_active());
+//  CGAL_warning(old_t.dag_node());
+//
+//#endif
+//  //the DAG node of the curve trapezoid where the spiltting point is
+//  Dag_node& old_split_node = *old_t.dag_node();
+//
+//  CGAL_assertion(traits->equal_curve_end_2_object()
+//                  (traits->vtx_to_ce(old_t.left()),leftmost));
+//
+//  CGAL_assertion(traits->equal_curve_end_2_object()
+//                  (traits->vtx_to_ce(old_t.right()),rightmost));
+//
+//
+//
+//  m_before_split.m_p_old_t = &old_t;
+//  m_before_split.m_p_t1 = &t1;
+//  m_before_split.m_p_t2 = &t2;
+//
+//}
+
+//-----------------------------------------------------------------------------
+// Description:
+// Input:
+//  1 whole curves
+//  2 partial halfedge_handle-s
+// precondition:
+//  The two halfedges are valid
+//  The first input curve is the union of the two halfedges.
+//  The intersection of the latter is a point inside the
+//  interior of the former.
+//  The latter are ordered from left-down to right-up
+// postcondition:
+//  The first input curve is broken into two halfedges
+//  corresponding to the input.
+
+
+
+
+//MICHAL: commented due to inefficient depth update, remove and insert instead
+//template <class Td_traits>
+//void Trapezoidal_decomposition_2<Td_traits>
+//::split_edge(const X_monotone_curve_2& cv,Halfedge_const_handle he1,
+//               Halfedge_const_handle he2)
+//{
+//  //make sure both halfedges are valid
+//  CGAL_precondition_code(Halfedge_const_handle invalid_he);
+//  CGAL_precondition( he1 != invalid_he);
+//  CGAL_precondition( he2 != invalid_he);
+//
+//#ifdef CGAL_TD_DEBUG
+//  std::cout << "\nTD::split_edge(" << cv << "," << he1 << "," << he2
+//            << ") called with " << (is_valid(*m_dag_root) ? "valid" : "invalid")
+//            << " data structure" <<  std::endl;
+//  write(std::cout,*m_dag_root,*traits) << std::endl;
+//#endif
+//
+//
+//  // find the splitting point (vertex & curve end)
+//  Vertex_const_handle split_v =
+//      traits->equal_curve_end_2_object()(Curve_end(he1, ARR_MAX_END),
+//                                        Curve_end(he2, ARR_MIN_END) ) ?
+//      ((he1->direction()== ARR_LEFT_TO_RIGHT) ?
+//        he1->target() : he1->source())
+//     :((he2->direction()== ARR_LEFT_TO_RIGHT) ?
+//        he2->target() : he2->source());
+//
+//  Curve_end ce(traits->vtx_to_ce(split_v));
+//
+//  // find extremal points
+//  const Curve_end leftmost = (traits->equal_curve_end_2_object()
+//                                (Curve_end(he1, ARR_MAX_END),
+//                                 Curve_end(he2, ARR_MIN_END) ))?
+//                            Curve_end(he1,ARR_MIN_END) :
+//                            Curve_end(he2,ARR_MIN_END) ;
+//
+//  const Curve_end rightmost = (traits->equal_curve_end_2_object()
+//                                 (Curve_end(he1, ARR_MAX_END),
+//                                  Curve_end(he2, ARR_MIN_END) ))?
+//                            Curve_end(he2,ARR_MAX_END) :
+//                            Curve_end(he1,ARR_MAX_END) ;
+//
+//
+//  //MICHAL: new
+//  X_trapezoid& t1 = *m_before_split.m_p_t1;
+//  X_trapezoid& t2 = *m_before_split.m_p_t2;
+//  X_trapezoid& old_t = *m_before_split.m_p_old_t;
+//  In_face_iterator& bottom_it = *m_before_split.m_p_btm_it;
+//  In_face_iterator& mid_it = *m_before_split.m_p_mid_it;
+//  In_face_iterator& top_it = *m_before_split.m_p_top_it;
+//  //MICHAL: new end
+//
+//  //the DAG node of the curve trapezoid where the spiltting point is
+//  Dag_node& old_split_node = *old_t.dag_node();
+//
+//
+//  // previous left and right sons of this DAG node
+//  const Dag_node& old_left = old_split_node.left_child();
+//  const Dag_node& old_right= old_split_node.right_child();
+//
+//  //define the left halfedge and the right halfedge, according
+//  //  to the splitting point
+//  //Halfedge_const_handle* p_left_he  = NULL;
+//  //Halfedge_const_handle* p_right_he = NULL;
+//  Halfedge_const_handle left_he  = he2;
+//  Halfedge_const_handle right_he = he1;
+//
+//  if (traits->equal_curve_end_2_object() (Curve_end(he2,ARR_MIN_END), ce))
+//  {
+//    left_he  = he1; //p_left_he  = &he1;
+//    right_he = he2; //p_right_he = &he2;
+//  }
+//  //else
+//  //{
+//  //  p_left_he  = &he2;
+//  //  p_right_he = &he1;
+//  //}
+//
+//  CGAL_assertion(old_t.is_active());
+//
+//  //updating the data structure:
+//  //  the cv trpz where the splitting point is located will hold the point
+//  //  its new left will hold the left cv (left and right children as before)
+//  //  its new right will hold the right cv (left and right children asa before)
+//
+//  //defining the new left child node
+//  const Dag_node& new_left_node =
+//          Dag_node(X_trapezoid(old_t.left(), split_v,
+//                               left_he, left_he, //*p_left_he, *p_left_he,
+//                               X_trapezoid::TD_EDGE),
+//                   old_left, old_right);
+//
+//  //defining the new right child node
+//  const Dag_node& new_right_node =
+//          Dag_node(X_trapezoid(split_v, old_t.right(),
+//                               right_he, right_he, //*p_right_he, *p_right_he,
+//                               X_trapezoid::TD_EDGE),
+//                   old_left, old_right);
+//
+//  //defining the new parent node (which is the splitting point):
+//
+//  //split_v is the ARR_MAX_END of left_te, and ARR_MIN_END of right_te.
+//  //need to send the halfedge whose source is split_v.
+//  Halfedge_const_handle btm_he = left_he;
+//  if (btm_he->direction() == ARR_LEFT_TO_RIGHT)
+//    btm_he = btm_he->twin();
+//  //Halfedge_const_handle* p_btm = p_left_he;
+//  //if ((*p_btm)->direction() == ARR_LEFT_TO_RIGHT)
+//  //  p_btm = &(*p_btm)->twin();
+//
+//  Halfedge_const_handle top_he = right_he;
+//  if (top_he->direction() == ARR_RIGHT_TO_LEFT)
+//    top_he = top_he->twin();
+//  //Halfedge_const_handle* p_top = p_right_he;
+//  //if ((*p_top)->direction() == ARR_RIGHT_TO_LEFT)
+//  //  p_top = &(*p_top)->twin();
+//
+//
+//  const Dag_node& new_pnt_node =
+//          Dag_node(X_trapezoid(split_v, split_v, btm_he, top_he, //*p_btm, *p_top,
+//                               X_trapezoid::TD_VERTEX),
+//                   new_left_node, new_right_node);
+//
+//  X_trapezoid& new_left_t = *new_left_node;
+//  X_trapezoid& new_right_t= *new_right_node;
+//  X_trapezoid& new_t      = *new_pnt_node;
+//
+//  // locate trapezoid trees that correspond to the closest
+//  //   trapezoids above and below ce
+//  X_trapezoid* left_top_t   = top_it.operator->();
+//  X_trapezoid* left_bottom_t= bottom_it.operator->();
+//
+//  while(is_end_point_left_low(traits->vtx_to_ce(left_top_t->right()),ce))
+//    left_top_t = left_top_t->rb();
+//
+//  while(is_end_point_left_low(traits->vtx_to_ce(left_bottom_t->right()),ce))
+//    left_bottom_t = left_bottom_t->rt();
+//
+//  Dag_node left_top    = *left_top_t->dag_node();
+//  Dag_node left_bottom = *left_bottom_t->dag_node();
+//
+//  //replace the old curve cv with the new curves in the leftmost
+//  //  and rightmost end points.
+//  //the curve end ce belongs to cv interior
+//  set_trp_params_after_split_halfedge_update (left_he , t1, he1, he2);
+//  set_trp_params_after_split_halfedge_update (right_he, t2, he1, he2);
+//
+//  //set the point's lb() which is:
+//  //     the first halfedge adjacent to the point emanating toward up
+//  //     or right sweeped using a counter clockwise sweep
+//  //     starting from up direction not including.
+//  //set the point's rt() which is:
+//  //     the first halfedge adjacent to the point emanating toward bottom
+//  //     or left sweeped using a counter clockwise sweep
+//  //     starting from bottom direction not including.
+//  new_t.set_rt (&new_left_t);
+//  new_t.set_lb (&new_right_t);
+//
+//  //set lb() and rt(0 of the two halfedges trapezoids
+//  // rt() is the next clockwise degenerate_curve around
+//  //      rightmost end_point (possibly himself)
+//  // lb() is the next clockwise degenerate_curve around
+//  //      leftmost end_point (possibly himself)
+//  new_left_t.set_lb ((old_t.lb() != &old_t) ? old_t.lb() : &new_left_t);
+//  new_left_t.set_rt (&new_right_t);
+//  new_right_t.set_lb(&new_left_t);
+//  new_right_t.set_rt((old_t.rt() != &old_t)? old_t.rt() : &new_right_t);
+//
+//  // update geometric boundary for trapezoids representing cv
+//  // first update the trapezoids of the new left curve
+//  X_trapezoid* prev = 0;
+//  while(*mid_it != old_t)
+//  {
+//    mid_it->set_top(left_he);
+//    mid_it->set_bottom(left_he);
+//    mid_it->set_right(split_v);
+//
+//    //MICHAL: added this assertion just to be sure:
+//    CGAL_assertion(mid_it->type() == X_trapezoid::TD_EDGE); //MICHAL: won't work, I removed the type() method
+//
+//    //MICHAL: who is prev?
+//    prev = mid_it.operator->();
+//    mid_it++;
+//  }
+//  if (prev)
+//  {
+//    prev->set_rb(&new_left_t); //MICHAL: I don't understand this
+//  }
+//  else // new_left_t is leftmost representative for he
+//  {
+//    //set_neighbours_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing
+//  }
+//  if (t1.rt()==&old_t) t1.set_rt(&new_left_t);
+//  if (t1.lb()==&old_t) t1.set_lb(&new_left_t);
+//  mid_it++;
+//  new_right_t.set_rb(mid_it.operator->()); //MICHAL: what does it do?
+//
+//  prev = 0;
+//  while(!!mid_it)
+//  {
+//    mid_it->set_top(right_he);
+//    mid_it->set_bottom(right_he);
+//    mid_it->set_left(split_v);
+//
+//    //MICHAL: added this assertion just to be sure:
+//    CGAL_assertion(mid_it->type() == X_trapezoid::TD_EDGE);
+//
+//    prev = mid_it.operator->();
+//    mid_it++;
+//  }
+//  if (prev)
+//  {
+//    new_right_t.set_rb(old_t.rb()); //MICHAL: I don't understand this
+//  }
+//  else // new_right_t is rightmost representative for te
+//  {
+//    //set_neighbours_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing
+//  }
+//  if (t2.rt()==&old_t) t2.set_rt(&new_right_t);
+//  if (t2.lb()==&old_t) t2.set_lb(&new_right_t);
+//
+//  // update geometric boundary for trapezoids below te
+//  while (*bottom_it != *left_bottom)
+//  {
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//    CGAL_assertion (traits->equal_2_object()(bottom_it->top()->curve(), cv));
+//
+//#endif
+//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
+//    CGAL_assertion (bottom_it->type() == X_trapezoid::TD_TRAPEZOID);
+//
+//    bottom_it->set_top(left_he);
+//    bottom_it++;
+//  }
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion (*bottom_it==*left_bottom);
+//
+//#endif
+//
+//  Dag_node& bottom_tt = *bottom_it->dag_node();
+//  bottom_it++;
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion(traits->is_in_closure (*bottom_tt, ce));
+//
+//#endif
+//
+//  split_trapezoid_by_vertex (bottom_tt, split_v, btm_he, top_he); //*p_btm, *p_top);
+//  // set the splitting trapezoid to be the same one that splits the
+//  // X_curve'like trapezoid
+//  *bottom_tt = new_t;
+//  // update top curves
+//  bottom_tt.left_child()->set_top(left_he);
+//  bottom_tt.right_child()->set_top(right_he);
+//  // left and right are not neighbours.
+//  bottom_tt.left_child()->set_rt(0);
+//  bottom_tt.right_child()->set_lt(0);
+//
+//
+//  while(!!bottom_it)
+//  {
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//    CGAL_assertion(traits->equal_2_object() (bottom_it->top()->curve(), cv));
+//
+//#endif
+//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
+//    CGAL_assertion(bottom_it->type() == X_trapezoid::TD_TRAPEZOID);
+//
+//    bottom_it->set_top(right_he);
+//    bottom_it++;
+//  }
+//
+//  // update geometric boundary for trapezoids above cv
+//  while (*top_it != *left_top)
+//  {
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//    CGAL_assertion(traits->equal_2_object() (top_it->bottom()->curve(), cv));
+//
+//#endif
+//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
+//    CGAL_assertion(top_it->type() == X_trapezoid::TD_TRAPEZOID);
+//
+//    top_it->set_bottom(left_he);
+//    top_it++;
+//  }
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion(*top_it == *left_top);
+//
+//#endif
+//
+//  Dag_node &top_tt = *top_it->dag_node();
+//  top_it++;
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion(traits->is_in_closure (*top_tt, ce));
+//
+//#endif
+//
+//  split_trapezoid_by_vertex (top_tt, split_v, btm_he, top_he);// left_he, right_he);
+//  // set the splitting trapezoid to be the same one that splits the
+//  // X_curve'like trapezoid
+//  *top_tt = new_t;
+//  // update bottom side
+//  top_tt.left_child()->set_bottom(left_he);
+//  top_tt.right_child()->set_bottom(right_he);
+//  // left and right aren't neighbours
+//  top_tt.left_child()->set_rb(0);
+//  top_tt.right_child()->set_lb(0);
+//
+//  while(!!top_it)
+//  {
+//
+//#ifndef CGAL_TD_DEBUG
+//
+//    CGAL_warning(traits->equal_2_object()(top_it->bottom()->curve(), cv));
+//
+//#else
+//
+//    if (!traits->equal_2_object()(top_it->bottom()->curve(), cv))
+//      std::cout << "\ntop_it->bottom()->curve() "<< top_it->bottom()->curve()
+//                << "\t cv= " << cv;
+//    CGAL_assertion(traits->equal_2_object()(top_it->bottom()->curve() ,cv));
+//
+//#endif
+//    //MICHAL: added this assertion to see if it fails (if we reach an edge_end)
+//    CGAL_assertion(top_it->type() == X_trapezoid::TD_TRAPEZOID);
+//
+//    top_it->set_bottom(right_he);
+//    top_it++;
+//  }
+//
+//  // mark inactive trapezoids
+//  //  depth of new_pnt_node is updated here (in the remove operation)
+//  //   and also depth of the sub-DAG rooted at it
+//  old_t.remove((Dag_node*)&new_pnt_node);
+//  update_largest_leaf_depth( new_pnt_node.max_depth() ); //MICHAL: this is a recursive call for the sub-DAG --EXPENSIVE!
+//  //adding nodes for the splitting-point and the two parts of the split curve
+//  m_number_of_dag_nodes += 3;
+//  old_t.set_curve_for_rem_he(m_before_split.m_cv_before_split); //MICHAL: added this so the trpz will hold the original curve before the split
+//
+//  const Dag_node* p_new       = &old_t.dag_node()->left_child();
+//  const Dag_node* p_new_left  = &p_new->left_child();
+//  const Dag_node* p_new_right = &p_new->right_child();
+//  const Dag_node* p_old_left  = &p_new_left->left_child();
+//  const Dag_node* p_old_right = &p_new_left->right_child();
+//
+//  (*p_new)->set_dag_node ((Dag_node*)p_new);
+//  (*p_new_left)->set_dag_node ((Dag_node*)p_new_left);
+//  (*p_new_right)->set_dag_node ((Dag_node*)p_new_right);
+//  (*p_old_left)->set_dag_node ((Dag_node*)p_old_left);
+//  (*p_old_right)->set_dag_node ((Dag_node*)p_old_right);
+//
+//#ifdef CGAL_TD_DEBUG
+//
+//  CGAL_assertion (old_split_node->is_valid(traits));
+//  CGAL_assertion (new_pnt_node->is_valid(traits));
+//  CGAL_assertion ((*p_new)->is_valid(traits));
+//  CGAL_assertion ((*p_new_left)->is_valid(traits));
+//  CGAL_assertion ((*p_new_right)->is_valid(traits));
+//  CGAL_assertion ((*p_old_left)->is_valid(traits));
+//  CGAL_assertion ((*p_old_right)->is_valid(traits));
+//  CGAL_assertion (top_tt->is_valid(traits));
+//  CGAL_assertion (bottom_tt->is_valid(traits));
+//  CGAL_assertion (old_left->is_valid(traits));
+//  CGAL_assertion (old_right->is_valid(traits));
+//  CGAL_assertion (traits->is_degenerate_point(**p_new));
+//  CGAL_assertion (traits->is_degenerate_curve(**p_new_left));
+//  CGAL_assertion (traits->is_degenerate_curve(**p_new_right));
+//  CGAL_assertion (traits->equal_curve_end_2_object()
+//                  (Curve_end((*p_new_right)->bottom(), ARR_MIN_END),
+//                   (*p_new)->right()) );
+//  CGAL_assertion (traits->equal_curve_end_2_object()
+//                  (Curve_end((*p_new_left)->top(), ARR_MAX_END),
+//                   (*p_new)->left()) );
+//#endif
+//
+//  // reevaluating number of curves
+//  m_number_of_curves++;
+//
+//#ifdef CGAL_TD_DEBUG
+//  std::cout << "\nTD::split_edge() exited with data structure"
+//            << is_valid(*m_dag_root) << std::endl;
+//  write(std::cout,*m_dag_root,*traits) << std::endl;
+//#endif
+//}
+//
+
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//
+template <class Td_traits>
+void Trapezoidal_decomposition_2<Td_traits>
+::merge_edge (Halfedge_const_handle he1,
+              Halfedge_const_handle he2,
+              const X_monotone_curve_2& cv)
+{
+  //make sure the halfedge is valid
+  CGAL_precondition_code(Halfedge_const_handle invalid_he);
+  CGAL_precondition( he1 != invalid_he);
+  CGAL_precondition( he2 != invalid_he);
+
+#ifdef CGAL_TD_DEBUG
+  std::cout << "\nTD::merge_edge(" << he1->curve() << "," << he2->curve()
+            << "," << cv
+            << ") called with " << (is_valid(*m_dag_root) ? "valid" : "invalid")
+            << " data structure" <<  std::endl;
+  write(std::cout,*m_dag_root,*traits) << std::endl;
+#endif
+
+  if (m_with_guarantees)
+    update();
+
+#ifndef CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION
+
+  locate_opt_empty();
+
+#endif
+
+  const X_monotone_curve_2& cv1 = he1->curve();
+  const X_monotone_curve_2& cv2 = he2->curve();
+
+  if (!traits)
+  {
+    CGAL_warning(traits != NULL);
+    return;
+  }
+  if (!traits->are_mergeable_2_object() (cv1, cv2))
+  {
+    CGAL_warning(traits->are_mergeable_2_object() (cv1, cv2));
+    return;
+  }
+
+  // Calculate the common/merged point (Curve_end) of cv1 and cv2.
+  // There should be one!
+  Curve_end ce = traits->equal_curve_end_2_object()
+                    (Curve_end(cv1,ARR_MAX_END),Curve_end(cv2,ARR_MIN_END)) ?
+                  Curve_end(cv1,ARR_MAX_END) :
+    // [-- cv1 -->] p [-- cv2 -->] or [<-- cv2 --] p [<-- cv1 --]
+                 traits->equal_curve_end_2_object()
+                    (Curve_end(cv1,ARR_MIN_END),Curve_end(cv2,ARR_MAX_END)) ?
+    // [<-- cv1 --] p [<-- cv2 --] or [-- cv2 -->] p [-- cv1 -->]
+                  Curve_end(cv1,ARR_MIN_END) : //
+                 traits->equal_curve_end_2_object()
+                    (Curve_end(cv1,ARR_MIN_END),Curve_end(cv2,ARR_MIN_END)) ?
+    // [<-- cv1 --] p [-- cv2 -->]
+                  Curve_end(cv1,ARR_MIN_END) :
+    // [-- cv1 -->] p [<-- cv2 --]
+                  Curve_end(cv1,ARR_MAX_END);
+
+  //find the halfedge that will contain the merged curve
+  // [<-- cv1 --] p [<-- cv2 --] or [<-- cv1 --] p [-- cv2 -->]-> he1->twin()
+  // [-- cv1 -->] p [-- cv2 -->] or [-- cv1 -->] p [<-- cv2 --]-> he1
+  //  Notice the curve cv is not yet updated
+  Halfedge_const_handle merged_he =
+            (traits->equal_curve_end_2_object()
+                (Curve_end(cv1, ARR_MIN_END), Curve_end(cv2, ARR_MAX_END)) ||
+             traits->equal_curve_end_2_object()
+                (Curve_end(cv1, ARR_MIN_END), Curve_end(cv2, ARR_MIN_END)) )
+             ? he1->twin() :  he1;
+
+#ifdef CGAL_TD_DEBUG
+  // ce is interior to the union curve
+  CGAL_precondition(
+        is_end_point_left_low (Curve_end(cv, ARR_MIN_END), ce));
+  CGAL_precondition(
+        is_end_point_right_top (Curve_end(cv, ARR_MAX_END), ce));
+
+#endif
+
+  //get the leftmost & rightmost Curve_end-s
+
+  Curve_end leftmost  (cv, ARR_MIN_END);
+  Curve_end rightmost (cv, ARR_MAX_END);
+
+  //locate the leftmost, rightmost and the merged point in the data structure
+  Locate_type lt1,lt2,lt;
+  Td_map_item leftp_item  = locate (leftmost, lt1);
+  Td_map_item rightp_item = locate (rightmost, lt2);
+  Td_map_item mrgp_item   = locate (ce, lt);
+
+
+  //varifying that all trapezoids are not NULL and are of type POINT
+  CGAL_warning (boost::apply_visitor(dag_node_visitor(),leftp_item) != NULL);
+  CGAL_warning (boost::apply_visitor(dag_node_visitor(),rightp_item)!= NULL);
+  CGAL_warning (boost::apply_visitor(dag_node_visitor(),mrgp_item)  != NULL);
+
+
+
+  //define the left curve and the right curve, according
+  //  to the common point (that is merged)
+  const X_monotone_curve_2* p_left_cv  = &cv2;
+  const X_monotone_curve_2* p_right_cv = &cv1;
+  Halfedge_const_handle left_he = he2;
+  Halfedge_const_handle right_he = he1;
+  if (traits->equal_curve_end_2_object() (Curve_end (cv2, ARR_MIN_END), ce))
+  {
+    p_left_cv  = &cv1;
+    p_right_cv = &cv2;
+    left_he = he1;
+    right_he = he2;
+  }
+
+#ifdef CGAL_TD_DEBUG
+
+  //CGAL_assertion (traits->equal_curve_end_2_object()
+  //                (leftp_item.left(), leftmost));
+  //CGAL_assertion (traits->equal_curve_end_2_object()
+  //                (rightp_item.left(), rightmost));
+
+  CGAL_assertion (is_end_point_left_low(leftmost, ce));
+  CGAL_assertion (is_end_point_left_low(ce, rightmost));
+  //compare left cv min with leftmost
+  CGAL_assertion (traits->equal_curve_end_2_object()
+                  (Curve_end(*p_left_cv, ARR_MIN_END), leftmost));
+  //compare left cv max with ce
+  CGAL_assertion (traits->equal_curve_end_2_object()
+                  (Curve_end(*p_left_cv, ARR_MAX_END), ce));
+  //compare right cv min with ce
+  CGAL_assertion (traits->equal_curve_end_2_object()
+                  (Curve_end(*p_right_cv, ARR_MIN_END), ce));
+  //compare right cv max with rightmost
+  CGAL_assertion (traits->equal_curve_end_2_object()
+                  (Curve_end(*p_right_cv, ARR_MAX_END), rightmost));
+
+#endif
+
+  //get the nodes of leftmost point and merge point
+  Dag_node& leftp_node  = *(boost::apply_visitor(dag_node_visitor(),leftp_item));
+  Dag_node& mrgp_node = *(boost::apply_visitor(dag_node_visitor(),mrgp_item));
+
+  //set iterators for below left curve, on left curve & above left curve
+  In_face_iterator
+    btm_left_it (follow_curve (leftp_node, *p_left_cv, SMALLER)),
+    mid_left_it (follow_curve (leftp_node, *p_left_cv, EQUAL)),
+    top_left_it (follow_curve (leftp_node, *p_left_cv, LARGER));
+
+  //set iterators for below right curve, on right curve & above right curve
+  In_face_iterator
+    btm_right_it (follow_curve (mrgp_node, *p_right_cv, SMALLER)),
+    mid_right_it (follow_curve (mrgp_node, *p_right_cv, EQUAL)),
+    top_right_it (follow_curve (mrgp_node, *p_right_cv, LARGER));
+
+
+#ifdef CGAL_TD_DEBUG
+
+  CGAL_assertion (btm_left_it.operator->());
+  CGAL_assertion (mid_left_it.operator->());
+  CGAL_assertion (top_left_it.operator->());
+  CGAL_assertion (btm_right_it.operator->());
+  CGAL_assertion (mid_right_it.operator->());
+  CGAL_assertion (top_right_it.operator->());
+  CGAL_assertion (traits->is_active(*btm_left_it.operator->()));
+  CGAL_assertion (traits->is_active(*mid_left_it.operator->()));
+  CGAL_assertion (traits->is_active(*top_left_it.operator->()));
+  CGAL_assertion (traits->is_active(*btm_right_it.operator->()));
+  CGAL_assertion (traits->is_active(*mid_right_it.operator->()));
+  CGAL_assertion (traits->is_active(*top_right_it.operator->()));
+
+#endif
+
+  //replacing old curves with the new merged halfedge
+
+  Td_map_item  left_cv_fraction_item = *mid_left_it;
+  Td_map_item  on_cv_left            = Td_map_item(0);
+  Td_map_item  on_cv_right           = *mid_right_it;
+  Td_map_item  above_cv_left         = Td_map_item(0);
+  Td_map_item  above_cv_right        = *top_right_it;
+  Td_map_item  below_cv_left         = Td_map_item(0);
+  Td_map_item  below_cv_right        = *btm_right_it;
+  Td_map_item  right_cv_fraction_item= Td_map_item(0);
+  Td_map_item  dummy1                = Td_map_item(0);
+  Td_map_item  dummy2                = Td_map_item(0);
+
+  Vertex_const_handle leftmost_v  =
+    (left_he->direction() == ARR_LEFT_TO_RIGHT) ? left_he->source() :
+                                                  left_he->target();
+  Vertex_const_handle rightmost_v =
+    (right_he->direction() == ARR_LEFT_TO_RIGHT) ? right_he->target() :
+                                                   right_he->source();
+  //replacing the given curve with a new Halfedge_handle along the trapezoids
+  // starting at the iterator, until the end (last parameter) is reached.
+  // updating the last param as the last updated trapzoid
+  update_map_items_after_merge (mid_left_it, left_he, merged_he,
+                                leftmost_v, rightmost_v, on_cv_left);
+  update_map_items_after_merge (mid_right_it, right_he, merged_he,
+                                leftmost_v, rightmost_v, right_cv_fraction_item);
+  update_map_items_after_merge (top_left_it, left_he, merged_he,
+                                leftmost_v, rightmost_v, above_cv_left);
+  update_map_items_after_merge (top_right_it, right_he, merged_he,
+                                leftmost_v, rightmost_v, dummy1);
+  update_map_items_after_merge (btm_left_it, left_he, merged_he,
+                                leftmost_v, rightmost_v, below_cv_left);
+  update_map_items_after_merge (btm_right_it, right_he, merged_he,
+                                leftmost_v, rightmost_v, dummy2);
+
+
+  // merge trapezoids that were split by the upward and downward
+  // vertical extensions from ce (the merged point)
+
+  // make sure only active trapezoids are merged
+  CGAL_assertion( traits->is_active(above_cv_left) && traits->is_active(above_cv_right) );
+  CGAL_assertion( traits->is_active(below_cv_left) && traits->is_active(below_cv_right) );
+
+  merge_if_possible (above_cv_left, above_cv_right);
+  merge_if_possible (below_cv_left, below_cv_right);
+
+  // mark older trapezoids as inactive - nodes depth are updated here
+  Dag_node* above_cv_right_node (boost::apply_visitor(dag_node_visitor(),above_cv_right));
+  Dag_node* above_cv_left_node  (boost::apply_visitor(dag_node_visitor(),above_cv_left));
+  deactivate_trapezoid( *above_cv_right_node, above_cv_left_node); //above_cv_right->remove(above_cv_left->dag_node());
+  Dag_node* below_cv_right_node (boost::apply_visitor(dag_node_visitor(),below_cv_right));
+  Dag_node* below_cv_left_node  (boost::apply_visitor(dag_node_visitor(),below_cv_left));
+  deactivate_trapezoid( *below_cv_right_node, below_cv_left_node); //below_cv_right->remove(below_cv_left->dag_node());
+  update_largest_leaf_depth((std::max)(above_cv_left_node->depth(),
+                                       below_cv_left_node->depth()));
+  //no need to update m_number_of_dag_nodes because the number of nodes did not change.
+
+
+#ifdef CGAL_TD_DEBUG
+
+  CGAL_warning (!traits->is_empty_item(on_cv_left));
+  CGAL_warning (!traits->is_empty_item(on_cv_right));
+
+#endif
+
+  // make the merged point's representative inactive
+  deactivate_vertex(mrgp_node); //mrgp_node->remove();
+
+  CGAL_assertion(traits->is_td_edge(on_cv_left) && traits->is_active(on_cv_left));
+
+  Td_active_edge& e_left (boost::get<Td_active_edge>(on_cv_left));
+  e_left.set_next(on_cv_right);
+
+  CGAL_assertion(traits->is_td_edge(on_cv_right) && traits->is_active(on_cv_right));
+
+  //replacing the curve in the end points' trapezoids themselves (updating top/ bottom)
+  update_vtx_cw_he_after_merge (*p_left_cv, merged_he, leftp_item);
+  update_vtx_cw_he_after_merge (*p_right_cv, merged_he, rightp_item); //MICHAL: maybe I should pass the he1 & he2?
+
+#ifdef CGAL_TD_DEBUG
+
+  CGAL_warning(!traits->is_empty_item(left_cv_fraction_item));
+  CGAL_warning(!traits->is_empty_item(right_cv_fraction_item));
+
+#endif
+
+  // reevaluating number of curves
+  m_number_of_curves--;
+
+#ifdef CGAL_TD_DEBUG
+  std::cout << "\nTD::merge_edge() exited with data structure"
+            << is_valid(*m_dag_root) << std::endl;
+  write(std::cout,*m_dag_root,*traits) << std::endl;
+#endif
+
+}
+
+
+//-----------------------------------------------------------------------------
+// Description:
+//
+template <class Td_traits>
+unsigned long
+Trapezoidal_decomposition_2<Td_traits>
+::longest_query_path_length_rec(bool minus_inf, Dag_node& min_node,
+                                bool plus_inf, Dag_node& max_node,
+                                Dag_node& node)
+{
+  //if NULL
+  if (node.is_null())
+    return 0;
+
+  //if not valid range or empty return 0
+  if (!minus_inf && !plus_inf)
+  {
+    Td_map_item min_node_item(min_node.get_data());
+    if (traits->is_fictitious_vertex(min_node_item))
+    {
+      const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item)));
+
+      Td_map_item max_node_item(max_node.get_data());
+      if (traits->is_fictitious_vertex(max_node_item))
+      {
+        const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
+
+        //min-fict, max-fict
+        if (!is_end_point_left_low(min_ce, max_ce))
+          return 0;
+      }
+      else
+      {
+        const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
+
+        //min-fict, max-pt
+        //if smaller than the point represented by min_node
+        if (!is_end_point_left_low(min_ce, max_p))
+          return 0;
+      }
+    }
+    else
+    {
+      const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item));
+
+      Td_map_item max_node_item(max_node.get_data());
+      if (traits->is_fictitious_vertex(max_node_item))
+      {
+        const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
+
+        //min-pt, max-fict
+        if (!is_end_point_left_low(min_p, max_ce))
+          return 0;
+      }
+      else
+      {
+        const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
+
+        //min-pt, max-pt
+        //if smaller than the point represented by min_node
+        if (!is_end_point_left_low(min_p, max_p))
+          return 0;
+      }
+    }
+  }
+
+
+  //if node represents a trapezoid
+  if (traits->is_td_trapezoid(node.get_data()) )
+    return 1;
+
+  //if node represents a curve
+  if (!traits->is_td_vertex(node.get_data()) )
+    return (1 + (std::max)(
+                  longest_query_path_length_rec(minus_inf, min_node,
+                                                plus_inf, max_node,
+                                                node.left_child()) ,
+                  longest_query_path_length_rec(minus_inf, min_node,
+                                                plus_inf, max_node,
+                                                node.right_child()) ));
+
+  //if node represents a vertex
+  Td_map_item curr_item(node.get_data());
+  //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item);
+
+  //if node is smaller than min, use min in the next recursion min bound, otherwise use node
+  Dag_node new_min_node = node;
+  if (!minus_inf)
+  {
+    Td_map_item min_node_item(min_node.get_data());
+    if (traits->is_fictitious_vertex(min_node_item))
+    {
+      const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item)));
+      //if smaller than the point represented by min_node
+      //if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) ||
+      //    (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_ce) ))
+      if (is_end_point_right_top(min_ce, node))
+      {
+        new_min_node = min_node;
+      }
+    }
+    else
+    {
+      const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item));
+      //if smaller than the point represented by min_node
+      //if ((is_fict_vtx  && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) ||
+      //    (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_p) ))
+      if (is_end_point_right_top(min_p, node))
+      {
+        new_min_node = min_node;
+      }
+    }
+  }
+
+  //if node is larger than max, use max in the next recursion max bound, otherwise use node
+  Dag_node new_max_node = node;
+  if (!plus_inf)
+  {
+    Td_map_item max_node_item(max_node.get_data());
+    if (traits->is_fictitious_vertex(max_node_item))
+    {
+      const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item)));
+      //if larger than the point represented by max_node
+      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) ||
+      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_ce) ))
+      if (is_end_point_left_low(max_ce, node))
+      {
+        new_max_node = max_node;
+      }
+    }
+    else
+    {
+      const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(),max_node_item));
+      //if smaller than the point represented by min_node
+      //if ((is_fict_vtx  && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) ||
+      //    (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_p) ))
+      if (is_end_point_left_low(max_p, node))
+      {
+        new_max_node = max_node;
+      }
+    }
+  }
+  //o/w continue with updated parameters
+  return (1 + (std::max)(
+                  longest_query_path_length_rec(minus_inf, min_node,
+                                                false, new_max_node,
+                                                node.left_child()) ,
+                  longest_query_path_length_rec(false, new_min_node,
+                                                plus_inf, max_node,
+                                                node.right_child()) ));
+
+}
+
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_point_location_result.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_point_location_result.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_point_location_result.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_point_location_result.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_basic_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_basic_traits_2.h
new file mode 100644
index 0000000..38a7fb7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_basic_traits_2.h
@@ -0,0 +1,2713 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University(Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
+//                 Ron Wein  <wein at post.tau.ac.il>
+//                 Dror Atariah <dror.atariah at fu-berlin.de>
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_POLYCURVE_BASIC_TRAITS_2_H
+#define CGAL_ARR_POLYCURVE_BASIC_TRAITS_2_H
+
+/*! \file
+ * The traits-class for the general piece-wise (polycurve) type of curves of the
+ * arrangement package.
+ */
+
+#include <iterator>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_non_caching_segment_traits_2.h>
+#include <CGAL/Arr_geometry_traits/Polycurve_2.h>
+#include <CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+
+namespace CGAL {
+
+template <typename SubcurveTraits_2 = Arr_non_caching_segment_traits_2<> >
+class Arr_polycurve_basic_traits_2 {
+public:
+  typedef SubcurveTraits_2                                 Subcurve_traits_2;
+
+  /// \name Types and functors inherited from the subcurve geometry traits.
+  //@{
+
+  typedef typename Subcurve_traits_2::Has_left_category    Has_left_category;
+  typedef typename Subcurve_traits_2::Has_do_intersect_category
+    Has_do_intersect_category;
+
+  typedef typename Subcurve_traits_2::Left_side_category   Left_side_category;
+  typedef typename Subcurve_traits_2::Bottom_side_category Bottom_side_category;
+  typedef typename Subcurve_traits_2::Top_side_category    Top_side_category;
+  typedef typename Subcurve_traits_2::Right_side_category  Right_side_category;
+
+  typedef typename Arr_are_all_sides_oblivious_tag<Left_side_category,
+                                                   Bottom_side_category,
+                                                   Top_side_category,
+                                                   Right_side_category>::result
+    Are_all_sides_oblivious_tag;
+
+  typedef typename Subcurve_traits_2::Point_2              Point_2;
+  typedef typename Subcurve_traits_2::X_monotone_curve_2   X_monotone_subcurve_2;
+
+  //@}
+
+  // Backward compatibility:
+  typedef X_monotone_subcurve_2                            X_monotone_segment_2;
+
+private:
+  typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>  Self;
+
+  // Data members:
+  const Subcurve_traits_2* m_subcurve_traits;  // The base segment-traits class.
+  bool m_own_traits;
+
+protected:
+  enum { INVALID_INDEX = 0xffffffff };
+
+public:
+  /*! Construct default. */
+  Arr_polycurve_basic_traits_2() :
+    m_subcurve_traits(new Subcurve_traits_2()),
+    m_own_traits(true)
+  {}
+
+  /*! Construct from a subcurve traits.
+   * \param seg_traits an already existing subcurve tarits which is passed will
+   *        be used by the class.
+   */
+  Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) :
+    m_subcurve_traits(geom_traits), m_own_traits(false) {}
+
+  /*! Construct copy.
+   * If the 'other' polycurve traits owns its subcurve traits, then make
+   * this polycurve traits own its subcurve traits as well
+   * \param other the other traits.
+   */
+  Arr_polycurve_basic_traits_2(const Arr_polycurve_basic_traits_2& other)
+  {
+    m_subcurve_traits = (other.m_own_traits) ?
+      new Subcurve_traits_2() : other.m_subcurve_traits;
+    m_own_traits = other.m_own_traits;
+  }
+
+  /* Destructor
+   * Deletes the subcurve tarits class in case it was constructed during the
+   * construction of this.
+   */
+  ~Arr_polycurve_basic_traits_2()
+  { if (m_own_traits) delete m_subcurve_traits; }
+
+  /*! Obtain the subcurve traits.
+   * \return the subcurve traits.
+   */
+  const Subcurve_traits_2* subcurve_traits_2() const
+  { return m_subcurve_traits; }
+
+  /// \name Types and functors defined here, required by the
+  // ArrangementBasicTraits concept.
+  //@{
+
+  /*! An x monotone polycurve represents a continuous piecewise-linear
+   * curve which is either strongly x-monotone or vertical. Again,
+   * the polycurve is without degenerated subcurves.
+   */
+  typedef internal::X_monotone_polycurve_2<X_monotone_subcurve_2, Point_2>
+                                                           X_monotone_curve_2;
+  typedef typename X_monotone_curve_2::Size                Size;
+  typedef typename X_monotone_curve_2::size_type           size_type;
+
+
+  /*! Compare the x-coordinates of two points. */
+  class Compare_x_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_x_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the x-coordinates of two directional points.
+     * \param p1 the first directional point.
+     * \param p2 the second directional point.
+     * \return SMALLER - x(p1) < x(p2);
+     *         EQUAL   - x(p1) = x(p2);
+     *         LARGER  - x(p1) > x(p2).
+     * \pre p1 does not lie on the boundary.
+     * \pre p2 does not lie on the boundary.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    { return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); }
+
+    /*! Compare two ends of x-monotone curves in x.
+     * \param xs1 the first curve.
+     * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
+     *            ARR_MIN_END - the minimal end of xs1 or
+     *            ARR_MAX_END - the maximal end of xs1.
+     * \param p2 the second curve end.
+     */
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2)
+    { return operator()(xs1, ce1, p2, Are_all_sides_oblivious_tag()); }
+
+    /*! Compare two ends of x-monotone curves in x.
+     * \param xs1 the first curve.
+     * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
+     *            ARR_MIN_END - the minimal end of xs1 or
+     *            ARR_MAX_END - the maximal end of xs1.
+     * \param xs2 the second curve.
+     * \param ce2 the curve-end indicator of the second x-monoton curve xs2:
+     *            ARR_MIN_END - the minimal end of xs2 or
+     *            ARR_MAX_END - the maximal end of xs2.
+     */
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2)
+    { return operator()(xs1, ce1, xs2, ce2, Are_all_sides_oblivious_tag()); }
+
+  private:
+    // Oblivious implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      return geom_traits->compare_x_2_object()(p1, p2);
+    }
+
+    // Boundary implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+        geom_traits->parameter_space_in_x_2_object();
+      const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
+
+      if (ps_x1 != ARR_INTERIOR) {
+        if (ps_x1 == ARR_LEFT_BOUNDARY) return SMALLER;
+        if (ps_x1 == ARR_RIGHT_BOUNDARY) return LARGER;
+      }
+
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+        geom_traits->parameter_space_in_y_2_object();
+      const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
+      if (ps_y1 == ARR_INTERIOR) {
+        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs1) :
+          geom_traits->construct_min_vertex_2_object()(xs1);
+        return geom_traits->compare_x_2_object()(p1, p2);
+      }
+      typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+        geom_traits->compare_x_on_boundary_2_object();
+      return opposite(cmp_x_on_bnd(p2, xs1, ce1));
+    }
+
+    // Oblivious implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs2) :
+        geom_traits->construct_min_vertex_2_object()(xs2);
+      return geom_traits->compare_x_2_object()(p1, p2);
+    }
+
+    // Boundary implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+        geom_traits->parameter_space_in_x_2_object();
+      const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
+      const Arr_parameter_space ps_x2 = ps_x(xs2, ce2);
+
+      if (ps_x1 != ps_x2) {
+        if (ps_x1 == ARR_LEFT_BOUNDARY) return SMALLER;
+        if (ps_x1 == ARR_RIGHT_BOUNDARY) return LARGER;
+        if (ps_x2 == ARR_LEFT_BOUNDARY) return LARGER;
+        if (ps_x2 == ARR_RIGHT_BOUNDARY) return SMALLER;
+      }
+
+      // ps_x1 == ps_x2
+      if (ps_x1 != ARR_INTERIOR) return EQUAL;
+
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+        geom_traits->parameter_space_in_y_2_object();
+      const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
+      const Arr_parameter_space ps_y2 = ps_y(xs2, ce2);
+      if (ps_y1 == ARR_INTERIOR) {
+        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs1) :
+          geom_traits->construct_min_vertex_2_object()(xs1);
+        if (ps_y2 == ARR_INTERIOR) {
+          const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+            geom_traits->construct_max_vertex_2_object()(xs2) :
+            geom_traits->construct_min_vertex_2_object()(xs2);
+          return geom_traits->compare_x_2_object()(p1, p2);
+        }
+        typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+          geom_traits->compare_x_on_boundary_2_object();
+        return cmp_x_on_bnd(p1, xs2, ce2);
+      }
+      if (ps_y2 == ARR_INTERIOR) {
+        const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs2) :
+          geom_traits->construct_min_vertex_2_object()(xs2);
+        typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+          geom_traits->compare_x_on_boundary_2_object();
+        return opposite(cmp_x_on_bnd(p2, xs1, ce1));
+      }
+      return geom_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
+    }
+  };
+
+  /*! Obtain a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object() const
+  { return Compare_x_2(*this); }
+
+  /*! Compare two curve-ends or points lexigoraphically: by x, then by y. */
+  class Compare_xy_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_xy_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare two directional points lexigoraphically: by x, then by y.
+     * \param p1 the first enpoint directional point.
+     * \param p2 the second endpoint directional point.
+     * \return SMALLER - x(p1) < x(p2);
+     *         SMALLER - x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL   - x(p1) = x(p2) and y(p1) = y(p2);
+     *         LARGER  - x(p1) = x(p2) and y(p1) > y(p2);
+     *         LARGER  - x(p1) > x(p2).
+     * \pre p1 does not lie on the boundary.
+     * \pre p2 does not lie on the boundary.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    { return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); }
+
+    /*! Compare two ends of x-monotone curves lexicographically.
+     * \param xs1 the first curve.
+     * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
+     *            ARR_MIN_END - the minimal end of xs1 or
+     *            ARR_MAX_END - the maximal end of xs1.
+     * \param p2 the second curve end.
+     */
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2)
+    { return operator()(xs1, ce1, p2, Are_all_sides_oblivious_tag()); }
+
+    /*! Compare two ends of x-monotone curves lexicographically.
+     * \param xs1 the first curve.
+     * \param ce1 the curve-end indicator of the first x-monotone curve xs1:
+     *            ARR_MIN_END - the minimal end of xs1 or
+     *            ARR_MAX_END - the maximal end of xs1.
+     * \param xs2 the second curve.
+     * \param ce2 the curve-end indicator of the second x-monoton curve xs2:
+     *            ARR_MIN_END - the minimal end of xs2 or
+     *            ARR_MAX_END - the maximal end of xs2.
+     */
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2)
+    { return operator()(xs1, ce1, xs2, ce2, Are_all_sides_oblivious_tag()); }
+
+  private:
+    // Oblivious implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      return geom_traits->compare_xy_2_object()(p1, p2);
+    }
+
+    // Boundary implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const Point_2& p2,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+        geom_traits->parameter_space_in_x_2_object();
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+        geom_traits->parameter_space_in_y_2_object();
+      const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
+      const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
+
+      if (ps_x1 != ARR_INTERIOR) {
+        if (ps_x1 == ARR_LEFT_BOUNDARY) return SMALLER;
+        if (ps_x1 == ARR_RIGHT_BOUNDARY) return LARGER;
+      }
+
+      if (ps_y1 == ARR_INTERIOR) {
+        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs1) :
+          geom_traits->construct_min_vertex_2_object()(xs1);
+        return geom_traits->compare_xy_2_object()(p1, p2);
+      }
+
+      // EFEF: missing implementation for open boundary.
+      typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+        geom_traits->compare_x_on_boundary_2_object();
+      Comparison_result res = opposite(cmp_x_on_bnd(p2, xs1, ce1));
+      if (res != EQUAL) return res;
+      if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER;
+      CGAL_assertion(ps_y1 == ARR_BOTTOM_BOUNDARY);
+      return SMALLER;
+    }
+
+    // Oblivious implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs2) :
+        geom_traits->construct_min_vertex_2_object()(xs2);
+      return geom_traits->compare_xy_2_object()(p1, p2);
+    }
+
+    // Boundary implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_curve_end ce2,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+        geom_traits->parameter_space_in_x_2_object();
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+        geom_traits->parameter_space_in_y_2_object();
+      const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
+      const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
+      const Arr_parameter_space ps_x2 = ps_x(xs2, ce2);
+      const Arr_parameter_space ps_y2 = ps_y(xs2, ce2);
+
+      if (ps_x1 != ps_x2) {
+        if (ps_x1 == ARR_LEFT_BOUNDARY) return SMALLER;
+        if (ps_x1 == ARR_RIGHT_BOUNDARY) return LARGER;
+        if (ps_x2 == ARR_LEFT_BOUNDARY) return LARGER;
+        if (ps_x2 == ARR_RIGHT_BOUNDARY) return SMALLER;
+      }
+
+      if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) {
+        const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs1) :
+          geom_traits->construct_min_vertex_2_object()(xs1);
+        // ps1 == ARR_INTERIOR
+
+        if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) {
+          const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+            geom_traits->construct_max_vertex_2_object()(xs2) :
+            geom_traits->construct_min_vertex_2_object()(xs2);
+
+          // ps1 == ARR_INTERIOR
+          // ps2 == ARR_INTERIOR
+          return geom_traits->compare_xy_2_object()(p1, p2);
+        }
+
+        // The cases ps_x2 == ARR_{LEFT,RIGHT}_BOUNDARY are handled above
+
+        // ps1 == ARR_INTERIOR
+        // ps_x2 == ARR_INTERIOR
+        // ps_y2 != ARR_INTERIOR
+        CGAL_assertion(ps_x2 == ARR_INTERIOR);
+        // EFEF: missing implementation for open boundary.
+        typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+          geom_traits->compare_x_on_boundary_2_object();
+        Comparison_result res = cmp_x_on_bnd(p1, xs2, ce2);
+        if (res != EQUAL) return res;
+        if (ps_y2 == ARR_TOP_BOUNDARY) return SMALLER;
+        CGAL_assertion(ps_y2 == ARR_BOTTOM_BOUNDARY);
+        return LARGER;
+      }
+
+      // ps1 != ARR_INTERIOR
+      if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) {
+        const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+          geom_traits->construct_max_vertex_2_object()(xs2) :
+          geom_traits->construct_min_vertex_2_object()(xs2);
+
+        // The cases ps_x1 == ARR_{LEFT,RIGHT}_BOUNDARY are handled above
+
+        // ps_x1 == ARR_INTERIOR
+        // ps_y1 != ARR_INTERIOR
+        // ps2 == ARR_INTERIOR
+        CGAL_assertion(ps_x1 == ARR_INTERIOR);
+        typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd =
+          geom_traits->compare_x_on_boundary_2_object();
+        Comparison_result res = cmp_x_on_bnd(p2, xs1, ce1);
+        if (res != EQUAL) return opposite(res);
+        if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER;
+        CGAL_assertion(ps_y1 == ARR_BOTTOM_BOUNDARY);
+        return SMALLER;
+      }
+
+      // ps1 != ARR_INTERIOR
+      // ps2 != ARR_INTERIOR
+      // ps_x1 == ps_x2
+      if (ps_x1 == ARR_INTERIOR) {
+        // ps_y1 != ARR_INTERIOR
+        // ps_y2 != ARR_INTERIOR
+        Comparison_result res =
+          geom_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
+        if (res != EQUAL) return res;
+        if (ps_y1 == ps_y2) return EQUAL;
+        return (ps_y1 == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER;
+      }
+
+      CGAL_assertion(ce1 == ce2);
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      const Point_2& p2 = (ce2 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs2) :
+        geom_traits->construct_min_vertex_2_object()(xs2);
+      return geom_traits->compare_y_on_boundary_2_object()(p1, p2);
+    }
+  };
+
+  /*! Obtain a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object() const
+  { return Compare_xy_2(*this); }
+
+  class Construct_min_vertex_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /* Constructor. */
+    Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtain the left endpoint of the x-monotone polycurve.
+     * \todo: is it possible to make the return type const reference if the
+     *        return type of the subcurve traits is const reference?
+     * \param cv The polycurve curve.
+     * \return The left endpoint.
+     */
+    Point_2 operator()(const X_monotone_curve_2& cv) const
+    {
+      CGAL_assertion(cv.number_of_subcurves() > 0);
+
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+
+      if (geom_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER)
+        return geom_traits->construct_min_vertex_2_object()(cv[0]);
+      else
+        return geom_traits->
+          construct_min_vertex_2_object()(cv[cv.number_of_subcurves()-1]);
+    }
+  };
+
+  /*! Obtain a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object() const
+  { return Construct_min_vertex_2(*this); }
+
+  class Construct_max_vertex_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtain the right endpoint of the x-monotone polycurve.
+     * \todo: is it possible to make the return type const reference if the
+     *        return type of the subcurve traits is const reference?
+     * \param cv The polycurve.
+     * \return The right endpoint.
+     */
+    Point_2 operator()(const X_monotone_curve_2& cv) const
+    {
+      CGAL_assertion(cv.number_of_subcurves() > 0);
+
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+
+      if (geom_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER)
+        return geom_traits->
+          construct_max_vertex_2_object()(cv[cv.number_of_subcurves()-1]);
+      else
+        return geom_traits->construct_max_vertex_2_object()(cv[0]);
+    }
+  };
+
+  /*! Obtain a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object() const
+  { return Construct_max_vertex_2(*this); }
+
+  class Is_vertical_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+    Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Is_vertical_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment;(false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv) const
+    {
+      // An x-monotone polycurve can represent a vertical segment only if it
+      // is comprised of vertical segments. If the first subcurve is vertical,
+      // all subcurves are vertical in an x-monotone polycurve
+      return m_poly_traits.subcurve_traits_2()->is_vertical_2_object()(cv[0]);
+    }
+  };
+
+  /*! Obtain an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object() const
+  { return Is_vertical_2(*this); }
+
+  class Compare_y_at_x_2 {
+  private:
+    // Oblivious implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p = (ce1 == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs1) :
+        geom_traits->construct_min_vertex_2_object()(xs1);
+      return geom_traits->compare_y_at_x_2_object()(p, xs2);
+    }
+
+    // Boundary implementation
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+        geom_traits->parameter_space_in_x_2_object();
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+        geom_traits->parameter_space_in_y_2_object();
+      typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex =
+        geom_traits->construct_min_vertex_2_object();
+      typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex =
+        geom_traits->construct_max_vertex_2_object();
+
+      const Arr_parameter_space ps_x1 = ps_x(xs1, ce1);
+      const Arr_parameter_space ps_y1 = ps_y(xs1, ce1);
+
+      CGAL_assertion(((ce1 == ARR_MAX_END) && (ps_x1 != ARR_LEFT_BOUNDARY)) ||
+                     ((ce1 == ARR_MIN_END) && (ps_x1 != ARR_RIGHT_BOUNDARY)));
+
+      if (ps_x1 == ARR_INTERIOR) {
+        if (ps_y1 == ARR_TOP_BOUNDARY) {
+          typename Subcurve_traits_2::Equal_2 equal =
+            geom_traits->equal_2_object();
+          const Point_2& p = (ce1 == ARR_MAX_END) ?
+            max_vertex(xs1) : min_vertex(xs1);
+          if (equal(p, max_vertex(xs2))) return EQUAL;
+          if (equal(p, min_vertex(xs2))) return EQUAL;
+          return LARGER;
+        }
+        if (ps_y1 == ARR_BOTTOM_BOUNDARY) {
+          typename Subcurve_traits_2::Equal_2 equal =
+            geom_traits->equal_2_object();
+          const Point_2& p = (ce1 == ARR_MAX_END) ?
+            max_vertex(xs1) : min_vertex(xs1);
+          if (equal(p, max_vertex(xs2))) return EQUAL;
+          if (equal(p, min_vertex(xs2))) return EQUAL;
+          return SMALLER;
+        }
+        // ps_y1 == ARR_INTERIOR
+        const Point_2& p = (ce1 == ARR_MAX_END) ?
+          max_vertex(xs1) : min_vertex(xs1);
+        return geom_traits->compare_y_at_x_2_object()(p, xs2);
+      }
+      // ps_x1 == ARR_RIGHT_BOUNDARY || ARR_LEFT_BOUNDARY
+      const Point_2& p1 = (ce1 == ARR_MAX_END) ?
+        max_vertex(xs1) : min_vertex(xs1);
+      const Point_2& p2 = (ce1 == ARR_MAX_END) ?
+        max_vertex(xs2) : min_vertex(xs2);
+      return geom_traits->compare_y_on_boundary_2_object()(p1, p2);
+    }
+
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits) {}
+
+    /*! Obtain the location of the given point with respect to the input curve.
+     * \param p The point.
+     * \param xcv The polycurve curve.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2& xcv) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      if (! m_poly_traits.is_vertical_2_object()(xcv)) {
+        // Get the index of the subcurve in xcv containing p.
+        std::size_t i =
+          m_poly_traits.locate_impl(xcv, p, Are_all_sides_oblivious_tag());
+        CGAL_precondition(i != INVALID_INDEX);
+
+        // Compare the subcurve xcv[i] and p.
+        return geom_traits->compare_y_at_x_2_object()(p, xcv[i]);
+      }
+      // The curve is vertical
+      Comparison_result rc = geom_traits->compare_y_at_x_2_object()(p, xcv[0]);
+      if (rc == SMALLER) return SMALLER;
+      std::size_t n = xcv.number_of_subcurves();
+      rc = geom_traits->compare_y_at_x_2_object()(p, xcv[n-1]);
+      if (rc == LARGER) return LARGER;
+      return EQUAL;
+    }
+
+    /*! Obtain the location of the given curve_end with respect to the input
+     * curve.
+     * \param xcv The polycurve curve.
+     * \param ce the curve-end indicator of the x-monotone subcurve xl:
+     *            ARR_MIN_END - the minimal end of xl or
+     *            ARR_MAX_END - the maximal end of xl.
+     * \param xcv The polycurve curve.
+     * \pre the curve-end is in the x-range of xcv.
+     * \return SMALLER if if y(xs, ce) < cv(x(xs, ce)), i.e.  the curve-end
+     *           is below the curve xcv;
+     *         LARGER if y(xs, ce) > cv(x(xs, ce)), i.e. the curve-end is
+     *           above the curve xcv;
+     *         EQUAL if the curve-end lies on the curve xcv.
+     */
+    Comparison_result operator()(const X_monotone_subcurve_2& xs1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_subcurve_2& xs2) const
+    { return operator()(xs1, ce1, xs2, Are_all_sides_oblivious_tag()); }
+  };
+
+  /*! Obtain a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object() const
+  { return Compare_y_at_x_2(*this); }
+
+  class Compare_y_at_x_left_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first polycurve curve.
+     * \param cv2 The second polycurve curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined(lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv1,
+                                 const X_monotone_curve_2& cv2,
+                                 const Point_2& p) const
+    {
+      // Get the indices of the subcurves in cv1 and cv2 containing p and
+      // defined to its left.
+      std::size_t i1 = m_poly_traits.locate_side(cv1, p, false);
+      std::size_t i2 = m_poly_traits.locate_side(cv2, p, false);
+
+      CGAL_precondition(i1 != INVALID_INDEX);
+      CGAL_precondition(i2 != INVALID_INDEX);
+
+      // Compare cv1[i1] and cv2[i2] at p's left.
+      return m_poly_traits.subcurve_traits_2()->
+        compare_y_at_x_left_2_object()(cv1[i1], cv2[i2], p);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
+  { return Compare_y_at_x_left_2(*this); }
+
+  class Compare_y_at_x_right_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined(lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv1,
+                                 const X_monotone_curve_2& cv2,
+                                 const Point_2& p) const
+    {
+      // Get the indices of the subcurves in cv1 and cv2 containing p and
+      // defined to its right.
+      std::size_t i1=m_poly_traits.locate_side(cv1, p, true);
+      std::size_t i2=m_poly_traits.locate_side(cv2, p, true);
+
+      CGAL_precondition(i1 != INVALID_INDEX);
+      CGAL_precondition(i2 != INVALID_INDEX);
+
+      // Compare cv1[i1] and cv2[i2] at p's right.
+      return m_poly_traits.subcurve_traits_2()->
+        compare_y_at_x_right_2_object()(cv1[i1], cv2[i2], p);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_right_2 functor object.
+   */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
+  { return Compare_y_at_x_right_2(*this); }
+
+  class Equal_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {}
+
+    /*! Check whether the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same;(false) otherwise.
+     */
+    bool operator()(const Point_2& p1, const Point_2& p2) const
+    { return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); }
+
+    /*! Check whether the two x-monotone curves are the same (have the same
+     * graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return(true) if the two curves are the same;(false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2) const
+    {
+      // Check the pairwise equality of the contained subcurves.
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Equal_2 equal =
+        geom_traits->equal_2_object();
+      typename Subcurve_traits_2::Compare_x_2 compare_x =
+        geom_traits->compare_x_2_object();
+      typename Subcurve_traits_2::Compare_y_at_x_2 compare_y_at_x =
+        geom_traits->compare_y_at_x_2_object();
+      typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex =
+        geom_traits->construct_max_vertex_2_object();
+      typename Subcurve_traits_2::Compare_endpoints_xy_2 comp_endpt =
+        geom_traits->compare_endpoints_xy_2_object();
+      Is_vertical_2 is_vertical = m_poly_traits.is_vertical_2_object();
+      Construct_min_vertex_2 xpoly_min_v =
+        m_poly_traits.construct_min_vertex_2_object();
+      Construct_max_vertex_2 xpoly_max_v =
+        m_poly_traits.construct_max_vertex_2_object();
+
+      // The first and last points of the subcurves should be equal.
+      bool res = equal(xpoly_min_v(cv1), xpoly_min_v(cv2));
+      if (!res) return false;
+      res = equal(xpoly_max_v(cv1), xpoly_max_v(cv2));
+      if (!res) return false;
+
+      // If the first and last points are equal and the curves are vertical,
+      // it means that it is equal.
+      bool ver1 = is_vertical(cv1);
+      bool ver2 = is_vertical(cv2);
+      // both curves are vertical and therefore equal.
+      if (ver1 && ver2) return true;
+      // one is vertical and the other is not - hence not equal.
+      if (ver1 || ver2) return false;
+
+      // If we arrived here it means that the first and last point of the
+      // curve are equal.
+      std::size_t i = 0;
+      std::size_t j = 0;
+      std::size_t n1 = cv1.number_of_subcurves();
+      std::size_t n2 = cv2.number_of_subcurves();
+      Comparison_result is_cv1_left_to_right = comp_endpt(cv1[0]);
+      Comparison_result is_cv2_left_to_right = comp_endpt(cv2[0]);
+
+      while ((i < (n1-1)) || (j < (n2-1))) {
+        Point_2 point1, point2;
+        std::size_t cv1_seg_ind, cv2_seg_ind;
+        if (SMALLER == is_cv1_left_to_right) {
+          cv1_seg_ind = i;
+          point1 = max_vertex(cv1[cv1_seg_ind]);
+        }
+        else {
+          cv1_seg_ind = n1 - 1 - i;
+          point1 = max_vertex(cv1[cv1_seg_ind]);
+        }
+        if (SMALLER == is_cv2_left_to_right) {
+          cv2_seg_ind = j;
+          point2 = max_vertex(cv2[cv2_seg_ind]);
+        }
+        else {
+          cv2_seg_ind = n2 - 1 - j;
+          point2 = max_vertex(cv2[cv2_seg_ind]);
+        }
+
+        bool res = equal(point1, point2);
+        // Easy case - the two points are equal
+        if (res) {
+          ++i;
+          ++j;
+        }
+        else {
+          Comparison_result res_x = compare_x(point1,point2);
+          // Check if the different point is a collinear point situated on
+          // the line between its two neighbors.
+          if (SMALLER == res_x) {
+            Comparison_result res_y_at_x =
+              compare_y_at_x(point1, cv2[cv2_seg_ind]);
+            if (EQUAL == res_y_at_x) ++i;
+            else return false;
+          }
+          else if (LARGER == res_x) {
+            Comparison_result res_y_at_x =
+              compare_y_at_x(point2,cv1[cv1_seg_ind]);
+            if (EQUAL == res_y_at_x) ++j;
+            else return false;
+          }
+          else return false;
+        }
+      }
+      return true;
+    }
+  };
+
+  /*! Obtain an Equal_2 functor object. */
+  Equal_2 equal_2_object() const { return Equal_2(*this); }
+
+  class Compare_endpoints_xy_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the endpoints of an \(x\)-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is oriented left-to-right;
+     *         LARGER if the curve is oriented right-to-left.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xcv) const
+    {
+      return (m_poly_traits.subcurve_traits_2()->
+              compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) ?
+        (SMALLER) : (LARGER);
+    }
+  };
+  //@}
+
+  /// \name Types and functors defined here, required by the
+  // ArrangementDirectionalXMonotoneTraits_2 concept.
+  //@{
+
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  { return Compare_endpoints_xy_2(*this); }
+
+  class Construct_opposite_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor */
+    Construct_opposite_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Construct the reversed \(x\)-monotone polycurve of the input.
+     * Note that the functor constructs the opposites of _all_ subcurves
+     * constituting xcv.
+     * \param xcv the \(x\)-monotone polycurve to be reveres
+     * \pre xcv contains at least one subcurve
+     * \return An \(x\)-monotone polycurve with the same graph as the input xcv
+     *         only with a reverse orientation.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Construct_opposite_2 const_op =
+        geom_traits->construct_opposite_2_object();
+      std::vector<X_monotone_subcurve_2> rev_segs(xcv.number_of_subcurves());;
+      typename X_monotone_curve_2::Subcurve_const_iterator sit;
+      typename X_monotone_curve_2::Subcurve_iterator tit = rev_segs.begin();
+      for (sit = xcv.subcurves_begin(); sit != xcv.subcurves_end(); ++sit)
+        *tit++ = const_op(*sit);
+      return X_monotone_curve_2(rev_segs.rbegin(), rev_segs.rend());
+    }
+  };
+
+  Construct_opposite_2 construct_opposite_2_object() const
+  { return Construct_opposite_2(*this); }
+
+  ///@}
+
+  /// \name Types and functors defined here, required by the
+  // ArrangementLandmarkTraits concept.
+  //@{
+
+#if 0
+  // The following block assumes that the subcurve traits template parameter
+  // is a model of the ArrangementLandmarkTraits concept; in other words, it
+  // defines the nested types Approximate_number_type and Approximate_2 and
+  // the member function approximate_2_object(). It cannot be used as is if
+  // the subcurve traits does not model the ArrangementLandmarkTraits concept.
+  // The functor Construct_x_monotone_curve_2 is provided regardless of the
+  // subcurve traits.
+
+  typedef typename Subcurve_traits_2::Approximate_number_type
+  Approximate_number_type;
+  typedef typename Subcurve_traits_2::Approximate_2    Approximate_2;
+
+  /*! Obtain an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object() const
+  { return subcurve_traits_2()->approximate_2_object(); }
+#else
+  // The following block defines the nested types Approximate_number_type and
+  // Approximate_2 and the member function approximate_2_object() based on the
+  // corresponding types and function definitions of the subcurve traits. If
+  // the subcurve traits does not provide these definitions, they are defined
+  // as dummies. Essentially, the polycurve traits becomes a practical model of
+  // the ArrangementLandmarkTraits concept only if the subcurve traits is a
+  // model of this concept.
+  //
+  // The following implementation is inspired by
+  // http://stackoverflow.com/a/11816999/1915421
+
+  template <typename T>
+  struct Void {
+    typedef void type;
+  };
+
+  template <typename T, typename _ = void>
+  struct has_approximate_2 {
+    // Generic implementation
+    typedef void                        Approximate_number_type;
+    typedef void                        Approximate_2;
+  };
+
+  template <typename T>
+  struct has_approximate_2<T, typename Void<typename T::Approximate_2>::type>
+  {
+    // Specialization for types holding a nested type T::Approximate_2
+    typedef typename T::Approximate_number_type
+                                        Approximate_number_type;
+    typedef typename T::Approximate_2   Approximate_2;
+  };
+
+  typedef typename has_approximate_2<Subcurve_traits_2>::Approximate_number_type
+                                        Approximate_number_type;
+  typedef typename has_approximate_2<Subcurve_traits_2>::Approximate_2
+                                        Approximate_2;
+
+  /*! Obtain an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object_impl(boost::false_type) const
+  { return subcurve_traits_2()->approximate_2_object(); }
+
+  Approximate_2 approximate_2_object_impl(boost::true_type) const { }
+
+  Approximate_2 approximate_2_object() const
+  {
+    typedef typename boost::is_same<void, Approximate_2>::type      Is_void;
+    return approximate_2_object_impl(Is_void());
+  }
+#endif
+
+  class Construct_x_monotone_curve_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtain an x-monotone polycurve that consists of one given subcurve.
+     * \param seg input subcurve.
+     * \pre seg is not degenerated.
+     * \return An x-monotone polycurve with one subcurve.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const
+    {
+      CGAL_precondition_code
+        (
+         /* Test that the subcurve is not degenerated. We do this test
+          * independently from the subcurve traits in use, as we do not
+          * allow a polycurve with degenerated subcurves.
+          */
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+
+         CGAL_precondition_msg(!equal(get_min_v(seg),get_max_v(seg)),
+                               "Cannot construct a degenerated subcurve");
+         );
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      if (m_poly_traits.subcurve_traits_2()->
+          compare_endpoints_xy_2_object()(seg) == LARGER)
+        return X_monotone_subcurve_2(m_poly_traits.subcurve_traits_2()->
+                                    construct_opposite_2_object()(seg));
+#endif
+
+      return X_monotone_curve_2(seg);
+    }
+
+    /*! Construct an x-monotone polycurve which is well-oriented from a range of
+     * elements.
+     * \pre Range should from a continuous well-oriented x-monotone polycurve.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 operator()(ForwardIterator begin,
+                                  ForwardIterator end) const
+    {
+      typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
+      typedef typename boost::is_same<VT,Point_2>::type Is_point;
+
+      // Dispatch the range to the appropriate implementation.
+      return constructor_impl(begin, end, Is_point());
+    }
+
+    /*! Construct an x-monotone polycurve from a range of points.
+     * The polycurve may be oriented left-to-right or right-to-left
+     * depending on the lexicographical order of the points in the
+     * input.
+     * \pre Range contains at least two points.
+     * \pre No two consecutive points are the same.
+     * \pre The points form an continuous well-oriented x-monotone polycurve.
+     * \post By the construction the returned polycurve is well-oriented.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 constructor_impl(ForwardIterator /* begin */,
+                                        ForwardIterator /* end */,
+                                        boost::true_type) const
+    { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
+
+    /*! Obtain an x-monotone polycurve from a range of subcurves.
+     * \param begin An iterator pointing to the first subcurve in the range.
+     * \param end An iterator pointing to the past-the-end subcurve
+     * in the range.
+     * \pre The range contains at least one subcurve.
+     * \pre Subcurves correspond to a well-oriented polycurve. That
+     *      is, the target of the i-th subcurve is an source of the
+     *      (i+1)th subcurve.
+     * \pre The sequence of subcurves in the range forms a weak x-monotone
+     *      polycurve.
+     * \pre The container should support bidirectional iteration.
+     * \return A continuous, well-oriented x-monotone polycurve which
+     *         is directed either left-to-right or right-to-left
+     *         depending on the subcurves in the input.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 constructor_impl(ForwardIterator begin,
+                                        ForwardIterator end,
+                                        boost::false_type) const
+    {
+      CGAL_precondition_msg
+        (
+         begin != end,
+         "Input range of subcurves has to contain at least one subcurve"
+         );
+
+      CGAL_precondition_code
+        (
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+           geom_traits->compare_endpoints_xy_2_object();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+
+         ForwardIterator curr = begin;
+         ForwardIterator next = begin;
+         ++next;
+         );
+
+
+      CGAL_precondition_msg
+        (
+         (next != end) || !equal(get_max_v(*curr),get_min_v(*curr)),
+         "Cannot construct a polycurve with degenerated subcurve"
+         );
+
+      CGAL_precondition_code
+        (
+         // Range contains at least two subcurves
+
+         Comparison_result init_dir = cmp_seg_endpts(*curr);
+         while (next != end){
+           CGAL_precondition_msg
+             (!equal(get_min_v(*next),get_max_v(*next)),
+              "Cannot construct a polycurve with degenerated subcurve"
+              );
+           CGAL_precondition_msg
+             (
+              init_dir == cmp_seg_endpts(*next),
+              "Subcurves must form x-monotone polycurve"
+              );
+           if (init_dir == SMALLER){
+             CGAL_precondition_msg
+               (
+                equal(get_max_v(*curr),get_min_v(*next)),
+                "Subcurves should concatenate in source->target manner"
+                );
+           }
+           else{
+             CGAL_precondition_msg
+               (
+                equal(get_min_v(*curr),get_max_v(*next)),
+                "Subcurves should concatenate in source->target manner"
+                );
+           }
+           ++curr;
+           ++next;
+         }
+         );
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      if (m_poly_traits.subcurve_traits_2()->
+          compare_endpoints_xy_2_object()(*begin) == LARGER)
+      {
+        X_monotone_curve_2 xcv(begin, end);
+        return m_poly_traits.construct_opposite_2_object()(xcv);
+      }
+#endif
+
+      return X_monotone_curve_2(begin, end);
+    }
+  };
+
+  /*! Obtain a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
+  { return Construct_x_monotone_curve_2(*this); }
+
+  //@}
+
+  /// \name Types and functors defined here, required by the
+  // ArrangementOpenBoundaryTraits_2 concept.
+  //@{
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the x-axis
+   */
+  class Parameter_space_in_x_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtains the parameter space at the end of a curve along the x-axis .
+     * Note that if the curve-end coincides with a pole, then unless the curve
+     * coincides with the identification curve, the curve-end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the curve coincides with the identification curve, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the curve
+     * \param ce the curve-end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the curve xcv.
+     *   ARR_LEFT_BOUNDARY  - the curve approaches the identification curve
+     *                        from the right at the curve left end.
+     *   ARR_INTERIOR       - the curve does not approache the identification
+     *                        curve.
+     *   ARR_RIGHT_BOUNDARY - the curve approaches the identification curve
+     *                        from the left at the curve right end.
+     * \pre xcv does not coincide with the vertical identification curve.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
+                                   Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Comparison_result direction =
+        geom_traits->compare_endpoints_xy_2_object()(xcv[0]);
+      const X_monotone_subcurve_2& xs =
+        (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
+         ((direction == LARGER) && (ce == ARR_MIN_END))) ?
+        xcv[xcv.number_of_subcurves()-1] : xcv[0];
+      return geom_traits->parameter_space_in_x_2_object()(xs, ce);
+    }
+
+    /*! Obtains the parameter space at a point along the x-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     * \pre p does not lie on the vertical identification curve.
+     */
+    Arr_parameter_space operator()(const Point_2 p) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      return geom_traits->parameter_space_in_x_2_object()(p);
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_x_2 function object */
+  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
+  { return Parameter_space_in_x_2(*this); }
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the y-axis
+   */
+  class Parameter_space_in_y_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtains the parameter space at the end of an curve along the y-axis .
+     * Note that if the curve-end coincides with a pole, then unless the curve
+     * coincides with the identification curve, the curve-end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the curve coincides with the identification curve, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the curve
+     * \param ce the curve-end indicator:
+     *     ARR_MIN_END - the minimal end of xcv or
+     *     ARR_MAX_END - the maximal end of xcv
+     * \return the parameter space at the ce end of the curve xcv.
+     *   ARR_BOTTOM_BOUNDARY  - the curve approaches the south pole at the
+     *                          curve left end.
+     *   ARR_INTERIOR         - the curve does not approache a contraction
+     *                          point.
+     *   ARR_TOP_BOUNDARY     - the curve approaches the north pole at the
+     *                          curve right end.
+     * There are no horizontal identification curves!
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2& xcv,
+                                   Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Comparison_result direction =
+        geom_traits->compare_endpoints_xy_2_object()(xcv[0]);
+      const X_monotone_subcurve_2& xs =
+        (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
+         ((direction == LARGER) && (ce == ARR_MIN_END))) ?
+        xcv[xcv.number_of_subcurves()-1] : xcv[0];
+      return geom_traits->parameter_space_in_y_2_object()(xs, ce);
+    }
+
+    /*! Obtains the parameter space at a point along the y-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     * \pre p does not lie on the horizontal identification curve.
+     * There are no horizontal identification curves!
+     */
+    Arr_parameter_space operator()(const Point_2 p) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      return geom_traits->parameter_space_in_y_2_object()(p);
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_y_2 function object */
+  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
+  { return Parameter_space_in_y_2(*this); }
+
+  /*! A functor that compares the x-coordinate of curve-ends and points on the
+   * boundary of the parameter space.
+   */
+  class Compare_x_on_boundary_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the x-limit of a point with the x-coordinate of an
+     * x-curve-end on the boundary.
+     * \param point the point.
+     * \param xcv the x-curve, the endpoint of which is compared.
+     * \param ce the x-curve-end indicator:
+     *            ARR_MIN_END - the minimal end of xcv or
+     *            ARR_MAX_END - the maximal end of xcv.
+     * \return the comparison result:
+     *         SMALLER - x(p) < x(xcv, ce);
+     *         EQUAL   - x(p) = x(xcv, ce);
+     *         LARGER  - x(p) > x(xcv, ce).
+     * \pre p lies in the interior of the parameter space.
+     * \pre the ce end of the x-curve xcv lies on the top boundary.
+     * \pre xcv does not coincide with the vertical identification curve.
+     */
+    Comparison_result operator()(const Point_2& point,
+                                 const X_monotone_curve_2& xcv,
+                                 Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits =
+        m_poly_traits.subcurve_traits_2();
+      Comparison_result direction =
+        geom_traits->compare_endpoints_xy_2_object()(xcv[0]);
+      const X_monotone_subcurve_2& xs =
+        (((direction == SMALLER) && (ce == ARR_MAX_END)) ||
+         ((direction == LARGER) && (ce == ARR_MIN_END))) ?
+        xcv[0] : xcv[xcv.number_of_subcurves()-1];
+      return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce);
+    }
+
+    /*! Compare the x-coordinates of 2 curve-ends near the boundary of the
+     * parameter space.
+     * \param xcv1 the first curve.
+     * \param ce1 the first curve-end indicator:
+     *            ARR_MIN_END - the minimal end of xcv1 or
+     *            ARR_MAX_END - the maximal end of xcv1.
+     * \param xcv2 the second curve.
+     * \param ce2 the second  curve-end indicator:
+     *            ARR_MIN_END - the minimal end of xcv2 or
+     *            ARR_MAX_END - the maximal end of xcv2.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
+     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
+     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
+     * \pre the ce1 end of the curve xcv1 lies on a pole (implying ce1 is
+     *      vertical).
+     * \pre the ce2 end of the curve xcv2 lies on a pole (implying ce2 is
+     *      vertical).
+     * \pre xcv1 does not coincide with the vertical identification curve.
+     * \pre xcv2 does not coincide with the vertical identification curve.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xcv1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_curve_2& xcv2,
+                                 Arr_curve_end ce2) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Comparison_result direction1 =
+        geom_traits->compare_endpoints_xy_2_object()(xcv1[0]);
+      const X_monotone_subcurve_2& xs1 =
+        (((direction1 == SMALLER) && (ce1 == ARR_MAX_END)) ||
+         ((direction1 == LARGER) && (ce1 == ARR_MIN_END))) ?
+        xcv1[0] : xcv1[xcv1.number_of_subcurves()-1];
+      Comparison_result direction2 =
+        geom_traits->compare_endpoints_xy_2_object()(xcv2[0]);
+      const X_monotone_subcurve_2& xs2 =
+        (((direction2 == SMALLER) && (ce2 == ARR_MAX_END)) ||
+         ((direction2 == LARGER) && (ce2 == ARR_MIN_END))) ?
+        xcv2[0] : xcv2[xcv2.number_of_subcurves()-1];
+      return geom_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2);
+    }
+  };
+
+  /*! Obtain a Compare_x_on_boundary_2 function object. */
+  Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
+  { return Compare_x_on_boundary_2(*this); }
+
+  class Compare_x_at_limit_2{
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    Compare_x_at_limit_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    unsigned int get_curve_index (const X_monotone_curve_2& xcv,
+                                  const Arr_curve_end ce) const
+    {
+      //waqar:: dont know why it is opposite in Parameter_space_in_x...
+      // I think this is because of the way the subcurves are stored in the
+      // curve_vector.
+      // I am assuming that min end depends upon the direction and not the
+      // x-value.
+      // and also that min end subcurve is always placed at position 0 of the
+      // vector.
+      // Comfirm with Eric.
+      return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1;
+    }
+
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2& xcv,
+                                 Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Compare_x_at_limit_2 compare_x_at_limit =
+        geom_traits->compare_x_at_limit_2_object();
+
+      unsigned int index = this->get_curve_index(xcv, ce);
+      return compare_x_at_limit(p, xcv[index], ce );
+    }
+
+    Comparison_result operator()(const X_monotone_curve_2& xcv1,
+                                 Arr_curve_end ce1/* for xcv1 */,
+                                 const X_monotone_curve_2 & xcv2,
+                                 Arr_curve_end ce2/*! for xcv2 */) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Compare_x_at_limit_2 compare_x_at_limit =
+        geom_traits->compare_x_at_limit_2_object();
+
+      unsigned int index_1 = this->get_curve_index(xcv1, ce1);
+      unsigned int index_2 = this->get_curve_index(xcv2, ce2);
+
+      return compare_x_at_limit(xcv1[index_1], ce1, xcv2[index_2], ce2);
+    }
+
+    Comparison_result operator()(const X_monotone_curve_2& xcv,
+                                 Arr_curve_end ce1/* for xcv */,
+                                 const X_monotone_subcurve_2& xseg,
+                                 Arr_curve_end ce2/*! for xseg */) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Compare_x_at_limit_2
+        compare_x_at_limit = geom_traits->compare_x_at_limit_2_object();
+
+      unsigned int index = this->get_curve_index(xcv, ce1 );
+
+      return compare_x_at_limit(xcv[index], ce1, xseg, ce2 );
+    }
+  };
+
+  Compare_x_at_limit_2 compare_x_at_limit_2_object() const
+  { return Compare_x_at_limit_2(*this); }
+
+  class Compare_x_near_limit_2{
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    Compare_x_near_limit_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    unsigned int get_curve_index (const X_monotone_curve_2& xcv,
+                                  const Arr_curve_end ce) const
+    {
+      //waqar:: dont know why it is opposite in Parameter_space_in_x...
+      // I think this is because of the way the subcurves are stored in the
+      // curve_vector.
+      // I am assuming that min end depends upon the direction and not the
+      // x-value.
+      // and also that min end subcurve is always placed at position 0 of the
+      // vector.
+      // Comfirm with Eric.
+      unsigned int index =
+        (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1;
+      return index;
+    }
+
+    Comparison_result operator()(const X_monotone_curve_2 xcv1,
+                                 const X_monotone_curve_2 xcv2,
+                                 Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Compare_x_near_limit_2
+        cmp_x_near_limit = geom_traits->compare_x_near_limit_2_object();
+
+      unsigned int index_1 = this->get_curve_index(xcv1, ce);
+      unsigned int index_2 = this->get_curve_index(xcv2, ce);
+
+      return cmp_x_near_limit(xcv1[index_1], xcv2[index_2], ce);
+    }
+  };
+
+  Compare_x_near_limit_2 compare_x_near_limit_2_object() const
+  { return Compare_x_near_limit_2(*this); }
+
+  /*! A functor that compares the y-coordinate of two given points
+   * that lie on the vertical identification curve.
+   */
+  class Compare_y_on_boundary_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the y-coordinate of two given points that lie on the vertical
+     * identification curve.
+     * \param p1 the first point.
+     * \param p2 the second point.
+     * \return SMALLER - p1 is lexicographically smaller than p2;
+     *         EQUAL   - p1 and p2 coincides;
+     *         LARGER  - p1 is lexicographically larger than p2;
+     * \pre p1 lies on the vertical identification curve.
+     * \pre p2 lies on the vertical identification curve.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      return geom_traits->compare_y_on_boundary_2_object()(p1, p2);
+    }
+  };
+
+  /*! Obtain a Compare_y_on_boundary_2 function object */
+  Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
+  { return Compare_y_on_boundary_2(*this); }
+
+  /*! A functor that compares the y-coordinates of curve-ends near the
+   * boundary of the parameter space.
+   */
+  class Compare_y_near_boundary_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Compare the y-coordinates of 2 curves at their ends near the boundary
+     * of the parameter space.
+     * \param xcv1 the first curve.
+     * \param xcv2 the second curve.
+     * \param ce the curve-end indicator:
+     *     ARR_MIN_END - the minimal end or
+     *     ARR_MAX_END - the maximal end
+     * \return the second comparison result.
+     * \pre the ce ends of the curves xcv1 and xcv2 lie either on the left
+     *      boundary or on the right boundary of the parameter space (implying
+     *      that they cannot be vertical).
+     * There is no horizontal identification curve!
+     */
+    Comparison_result operator()(const X_monotone_curve_2& xcv1,
+                                 const X_monotone_curve_2& xcv2,
+                                 Arr_curve_end ce) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Comparison_result direction1 =
+        geom_traits->compare_endpoints_xy_2_object()(xcv1[0]);
+      const X_monotone_subcurve_2& xs1 =
+        (((direction1 == SMALLER) && (ce == ARR_MAX_END)) ||
+         ((direction1 == LARGER) && (ce == ARR_MIN_END))) ?
+        xcv1[0] : xcv1[xcv1.number_of_subcurves()-1];
+      Comparison_result direction2 =
+        geom_traits->compare_endpoints_xy_2_object()(xcv2[0]);
+      const X_monotone_subcurve_2& xs2 =
+        (((direction2 == SMALLER) && (ce == ARR_MAX_END)) ||
+         ((direction2 == LARGER) && (ce == ARR_MIN_END))) ?
+        xcv2[0] : xcv2[xcv2.number_of_subcurves()-1];
+      return geom_traits->compare_y_near_boundary_2_object()(xs1, xs2, ce);
+    }
+  };
+
+  /*! Obtain a Compare_y_near_boundary_2 function object */
+  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
+  { return Compare_y_near_boundary_2(*this); }
+
+  /*! A functor that indicates whether a geometric object lies on the
+   * vertical identification curve.
+   */
+  class Is_on_y_identification_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Determine whether a point lies in the vertical boundary.
+     * \param p the point.
+     * \return a Boolean indicating whether p lies in the vertical boundary.
+     */
+    bool operator()(const Point_2& p) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      return geom_traits->is_on_y_identification_2_object()(p);
+    }
+
+    /*! Determine whether an x-monotone curve lies in the vertical boundary.
+     * \param xcv the x-monotone curve.
+     * \return a Boolean indicating whether xcv lies in the vertical boundary.
+     */
+    bool operator()(const X_monotone_curve_2& xcv) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename X_monotone_curve_2::Subcurve_const_iterator it;
+      for (it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it)
+        if (! geom_traits->is_on_y_identification_2_object()(*it)) return false;
+      return true;
+    }
+  };
+
+  /*! Obtain a Is_on_y_identification_2 function object */
+  Is_on_y_identification_2 is_on_y_identification_2_object() const
+  { return Is_on_y_identification_2(*this); }
+
+  /*! A functor that indicates whether a geometric object lies on the
+   * horizontal identification curve.
+   */
+  class Is_on_x_identification_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Determine whether a point lies in the vertical boundary.
+     * \param p the point.
+     * \return a Boolean indicating whether p lies in the vertical boundary.
+     */
+    bool operator()(const Point_2& p) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      return geom_traits->is_on_x_identification_2_object()(p);
+    }
+
+    /*! Determine whether an x-monotone curve lies in the vertical boundary.
+     * \param xcv the x-monotone curve.
+     * \return a Boolean indicating whether xcv lies in the vertical boundary.
+     */
+    bool operator()(const X_monotone_curve_2& xcv) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename X_monotone_curve_2::Subcurve_const_iterator it;
+      for (it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it)
+        if (! geom_traits->is_on_x_identification_2_object()(*it)) return false;
+      return true;
+    }
+  };
+
+  /*! Obtain a Is_on_x_identification_2 function object */
+  Is_on_x_identification_2 is_on_x_identification_2_object() const
+  { return Is_on_x_identification_2(*this); }
+
+  //@}
+
+  /// \name Types and functors defined here not required by any concept.
+  //@{
+
+  /*! \class
+   * A functor that obtains the number of points of a polycurve.
+   */
+  class Number_of_points_2 {
+  public:
+    size_type operator()(const X_monotone_curve_2& cv) const
+    {
+      size_type num_seg = cv.number_of_subcurves();
+      return (num_seg == 0) ? 0 : num_seg + 1;
+    }
+  };
+
+  Number_of_points_2 number_of_points_2_object() const
+  { return Number_of_points_2(); }
+
+  /* Functor to augment a polycurve by adding a subcurve at the back.
+   * TODO: Test all the operator()'s. (Don't forget vertical cases!)
+   */
+  class Push_back_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Push_back_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Append a subcurve to an existing x-monotone polycurve at the back.
+     */
+    void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg)
+      const
+    { push_back_2_impl<void*>(xcv, seg, Are_all_sides_oblivious_tag()); }
+
+  private:
+    // Oblivious implementation
+    template<typename>
+    void push_back_2_impl(X_monotone_curve_2& xcv,
+                          const X_monotone_subcurve_2& seg,
+                          Arr_all_sides_oblivious_tag) const
+    {
+      CGAL_precondition_code
+        (
+         typedef typename X_monotone_curve_2::size_type size_type;
+         size_type num_seg = xcv.number_of_subcurves();
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+           geom_traits->compare_endpoints_xy_2_object();
+         Comparison_result dir = cmp_seg_endpts(seg);
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+         typename Subcurve_traits_2::Is_vertical_2 is_vertical =
+           geom_traits->is_vertical_2_object();
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               ((is_vertical(xcv[0]) && is_vertical(seg)) ||
+                                (!is_vertical(xcv[0]) && !is_vertical(seg))),
+                               "xcv is vertical and seg is not or vice versa!");
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               (cmp_seg_endpts(xcv[0]) == dir),
+                               "xcv and seg do not have the same orientation!");
+
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 !equal(get_min_v(seg), get_max_v(seg)),
+                                 "Seg degenerates to a point!");
+
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != SMALLER) ||
+                                   equal(get_max_v(xcv[num_seg-1]),
+                                         get_min_v(seg)))),
+                                 "Seg does not connect to the right!");
+
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != LARGER) ||
+                                   equal(get_min_v(xcv[num_seg-1]),
+                                         get_max_v(seg)))),
+                                 "Seg does not connect to the left!");
+         ); // precondition code ends
+
+      xcv.push_back(seg);
+    }
+
+    // Boundary implementation
+    template<typename>
+    void push_back_2_impl(X_monotone_curve_2& xcv,
+                          const X_monotone_subcurve_2& seg,
+                          Arr_not_all_sides_oblivious_tag) const
+    {
+      CGAL_precondition_code
+        (
+         typedef typename X_monotone_curve_2::size_type size_type;
+         size_type num_seg = xcv.number_of_subcurves();
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+           geom_traits->compare_endpoints_xy_2_object();
+         Comparison_result dir = cmp_seg_endpts(seg);
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+         typename Subcurve_traits_2::Is_vertical_2 is_vertical =
+           geom_traits->is_vertical_2_object();
+         typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+           geom_traits->parameter_space_in_x_2_object();
+         typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+           geom_traits->parameter_space_in_y_2_object();
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               ((is_vertical(xcv[0]) && is_vertical(seg)) ||
+                                (!is_vertical(xcv[0]) && !is_vertical(seg))),
+                               "xcv is vertical and seg is not or vice versa!");
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               (cmp_seg_endpts(xcv[0]) == dir),
+                               "xcv and seg do not have the same orientation!");
+
+         const Arr_parameter_space min_x_seg = ps_x(seg, ARR_MIN_END);
+         const Arr_parameter_space min_y_seg = ps_y(seg, ARR_MIN_END);
+         const Arr_parameter_space max_x_seg = ps_x(seg, ARR_MAX_END);
+         const Arr_parameter_space max_y_seg = ps_y(seg, ARR_MAX_END);
+
+         CGAL_precondition_code(const Arr_parameter_space min_x_cv =
+                                ((num_seg>0) ?
+                                 ps_x(xcv[num_seg-1], ARR_MIN_END) :
+                                 ARR_INTERIOR));
+         CGAL_precondition_code(const Arr_parameter_space min_y_cv =
+                                ((num_seg>0) ?
+                                 ps_y(xcv[num_seg-1], ARR_MIN_END) :
+                                 ARR_INTERIOR));
+         CGAL_precondition_code(const Arr_parameter_space max_x_cv =
+                                ((num_seg>0) ?
+                                 ps_x(xcv[num_seg-1], ARR_MAX_END) :
+                                 ARR_INTERIOR));
+         CGAL_precondition_code(const Arr_parameter_space max_y_cv =
+                                ((num_seg>0) ?
+                                 ps_y(xcv[num_seg-1], ARR_MAX_END) :
+                                 ARR_INTERIOR));
+
+         // A subcurve should not be pushed if the polycurve is directed to
+         // the right and reaches the boundary.
+         CGAL_precondition_msg(((dir != SMALLER) ||
+                                ((max_x_cv == ARR_INTERIOR) &&
+                                 (max_y_cv == ARR_INTERIOR))),
+                               "Polycurve reaches the boundary to the right."
+                               "Can not push back any subcurve further." );
+
+         // A subcurve should not be pushed if the polycurve is directed to
+         // the left and reaches the boundary.
+         CGAL_precondition_msg(((dir != LARGER) ||
+                                ((min_x_cv == ARR_INTERIOR) &&
+                                 (min_y_cv == ARR_INTERIOR))),
+                               "Polycurve reaches the boundary to the left."
+                               "Can not push back any subcurve further." );
+
+         // Something like a line should not be pushed if there is already a
+         // subcurve present in the polycurve.
+         CGAL_precondition_msg((((min_x_seg == ARR_INTERIOR) &&
+                                 (min_y_seg == ARR_INTERIOR)) ||
+                                ((max_x_seg == ARR_INTERIOR) &&
+                                 (max_y_seg == ARR_INTERIOR)) ||
+                                (num_seg == 0) ),
+                               "Subcurve reaching the boundary at both ends "
+                               "can not be pushed if there is already one or "
+                               "more subcurves present in the polycurve.");
+
+         if ((min_x_seg == ARR_INTERIOR) && (min_y_seg == ARR_INTERIOR) &&
+             (max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR))
+         {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 !equal(get_min_v(seg), get_max_v(seg)),
+                                 "Seg degenerates to a point!");
+         }
+
+         if ((min_x_seg == ARR_INTERIOR) && (min_y_seg == ARR_INTERIOR)) {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != SMALLER) ||
+                                   equal(get_max_v(xcv[num_seg-1]),
+                                         get_min_v(seg)))),
+                                 "Seg does not connect to the right!");
+         }
+
+         if ((max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR) ) {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != LARGER) ||
+                                   equal(get_min_v(xcv[num_seg-1]),
+                                         get_max_v(seg)))),
+                                 "Seg does not connect to the left!");
+         }
+         ); // precondition code ends
+
+      xcv.push_back(seg);
+    }
+  };
+
+  /*! Obtain a Push_back_2 functor object. */
+  Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
+
+  /* Functor to augment a polycurve by adding a subcurve at the front.
+   * TODO: Test all the operator()'s. (Don't forget vertical cases!)
+   */
+  class Push_front_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Push_front_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /* Append a subcurve `seg` to an existing polycurve `xcv` at the front. */
+    void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg)
+      const
+    { push_front_2_impl<void*>(xcv, seg, Are_all_sides_oblivious_tag()); }
+
+  private:
+    // Oblivious implementation
+    template<typename>
+    void push_front_2_impl(X_monotone_curve_2& xcv,
+                           const X_monotone_subcurve_2& seg,
+                           Arr_all_sides_oblivious_tag)
+      const
+    {
+      CGAL_precondition_code
+        (
+         typedef typename X_monotone_curve_2::size_type size_type;
+         size_type num_seg = xcv.number_of_subcurves();
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+           geom_traits->compare_endpoints_xy_2_object();
+         Comparison_result dir = cmp_seg_endpts(seg);
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+         typename Subcurve_traits_2::Is_vertical_2 is_vertical =
+           geom_traits->is_vertical_2_object();
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               ((is_vertical(xcv[0]) && is_vertical(seg)) ||
+                                (!is_vertical(xcv[0]) && !is_vertical(seg))),
+                               "xcv is vertical and seg is not or vice versa!");
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               (cmp_seg_endpts(xcv[0]) == dir),
+                               "xcv and seg do not have the same orientation!");
+
+
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 !equal(get_min_v(seg), get_max_v(seg)),
+                                 "Seg degenerates to a point!");
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != SMALLER) ||
+                                   equal(get_min_v(xcv[0]), get_max_v(seg)))),
+                                 "Seg does not connect to the left!");
+
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != LARGER) ||
+                                   equal(get_max_v(xcv[0]), get_min_v(seg)))),
+                                 "Seg does not connect to the right!");
+         ); // precondition code ends
+      xcv.push_front(seg);
+    }
+
+    // Boundary implementation
+    template<typename>
+    void push_front_2_impl(X_monotone_curve_2& xcv,
+                           const X_monotone_subcurve_2& seg,
+                           Arr_not_all_sides_oblivious_tag)
+      const
+    {
+      CGAL_precondition_code
+        (
+         typedef typename X_monotone_curve_2::size_type size_type;
+         size_type num_seg = xcv.number_of_subcurves();
+         const Subcurve_traits_2* geom_traits =
+           m_poly_traits.subcurve_traits_2();
+         typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+           geom_traits->compare_endpoints_xy_2_object();
+         Comparison_result dir = cmp_seg_endpts(seg);
+         typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+           geom_traits->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+           geom_traits->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           geom_traits->equal_2_object();
+         typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+           geom_traits->parameter_space_in_x_2_object();
+         typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+           geom_traits->parameter_space_in_y_2_object();
+         typename Subcurve_traits_2::Is_vertical_2 is_vertical =
+           geom_traits->is_vertical_2_object();
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               ((is_vertical(xcv[0]) && is_vertical(seg)) ||
+                                (!is_vertical(xcv[0]) && !is_vertical(seg))),
+                               "xcv is vertical and seg is not or vice versa!");
+
+         CGAL_precondition_msg((num_seg == 0) ||
+                               (cmp_seg_endpts(xcv[0]) == dir),
+                               "xcv and seg do not have the same orientation!");
+
+         const Arr_parameter_space min_x_seg = ps_x(seg, ARR_MIN_END);
+         const Arr_parameter_space min_y_seg = ps_y(seg, ARR_MIN_END);
+         const Arr_parameter_space max_x_seg = ps_x(seg, ARR_MAX_END);
+         const Arr_parameter_space max_y_seg = ps_y(seg, ARR_MAX_END);
+
+         // Something like line should not be pushed if there is already a
+         // subcurve present in the polycurve.
+         CGAL_precondition_msg((((min_x_seg == ARR_INTERIOR) &&
+                                 (min_y_seg == ARR_INTERIOR)) ||
+                                ((max_x_seg == ARR_INTERIOR) &&
+                                 (max_y_seg == ARR_INTERIOR)) ||
+                                (num_seg == 0)),
+                               "Subcurve reaching the boundary at both ends"
+                               "can not be pushed if there is already one "
+                               "or more subcurves present in the polycurve.");
+
+         // Something like Ray should not be pushed front if there
+         // is already one or more subcurves present in polycurve.
+         CGAL_precondition_msg((((dir == SMALLER) &&
+                                 (max_x_seg == ARR_INTERIOR) &&
+                                 (max_y_seg == ARR_INTERIOR)) ||
+                                ((dir == LARGER) &&
+                                 (min_x_seg == ARR_INTERIOR) &&
+                                 (min_y_seg == ARR_INTERIOR)) ||
+                                (num_seg == 0)),
+                               "Subcurve reaching the boundary at the "
+                               "connecting end can not be pushed ");
+
+         if ((min_x_seg == ARR_INTERIOR) && (min_y_seg == ARR_INTERIOR) &&
+             (max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR))
+         {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 !equal(get_min_v(seg), get_max_v(seg)),
+                                 "Seg degenerates to a point!");
+         }
+
+         if ((max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR)) {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != SMALLER) ||
+                                   equal(get_min_v(xcv[0]), get_max_v(seg)))),
+                                 "Seg does not connect to the left!");
+         }
+
+         if ((min_x_seg == ARR_INTERIOR) && (min_y_seg == ARR_INTERIOR)) {
+           CGAL_precondition_msg((num_seg == 0) ||
+                                 (((dir != LARGER) ||
+                                   equal(get_max_v(xcv[0]), get_min_v(seg)))),
+                                 "Seg does not connect to the right!");
+         }
+         ); // precondition code ends
+
+      xcv.push_front(seg);
+    }
+  };
+
+  /*! Obtain a Push_front_2 functor object. */
+  Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
+
+  class Trim_2 {
+  protected:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /* The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+    /*! \brief returns a trimmed version of the polycurve with src and tgt as
+     * end points.
+     */
+  public:
+    /*! Constructor. */
+    Trim_2(const Polycurve_basic_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
+                                  const Point_2& src,
+                                  const Point_2& tgt)const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Trim_2 trim = geom_traits->trim_2_object();
+
+      //check whether src and tgt lies on the polycurve/polycurve.
+      CGAL_precondition(m_poly_traits.compare_y_at_x_2_object()(src, xcv) ==
+                        EQUAL);
+      CGAL_precondition(m_poly_traits.compare_y_at_x_2_object()(tgt, xcv) ==
+                        EQUAL);
+
+      /* Check whether the source and the target conform with the
+       * direction of the polycurve.
+       * since the direction of the poly-line/curve should not be changed.
+       * we will interchange the source and the target.
+       */
+      Point_2 source = src;
+      Point_2 target = tgt;
+
+      // If curve is oriented from right to left but points are left to right.
+      if (m_poly_traits.compare_endpoints_xy_2_object()(xcv) == LARGER &&
+          m_poly_traits.compare_x_2_object()(src, tgt) == SMALLER )
+      {
+        source = tgt;
+        target = src;
+      }
+
+      /* If curve is oriented from left to right but points are from right
+       * to left.
+       */
+      else if (m_poly_traits.compare_endpoints_xy_2_object()(xcv) == SMALLER &&
+               m_poly_traits.compare_x_2_object()(src, tgt) == LARGER )
+      {
+        source = tgt;
+        target = src;
+      }
+
+      // std::cout << "**************the new sourc: " << source
+      //           << "the new target: " << target << std::endl;
+      /*
+       * Get the source and target subcurve numbers from the polycurve.
+       * The trimmed polycurve will have trimmed end subcurves(containing
+       * source and target) along with complete
+       * subcurves in between them.
+       */
+      std::size_t source_id = m_poly_traits.locate(xcv, source);
+      std::size_t target_id = m_poly_traits.locate(xcv, target);
+      // std::cout << "source number: " << source_id << "  Target number : "
+      //           << target_id << std::endl;
+      // std::cout << "target subcurve: " << xcv[target_id] << std::endl;
+
+      std::vector<X_monotone_subcurve_2> trimmed_subcurves;
+
+      Comparison_result orientation =
+        m_poly_traits.compare_endpoints_xy_2_object()(xcv);
+
+      Point_2 source_max_vertex =
+        geom_traits->construct_max_vertex_2_object()(xcv[source_id]);
+      Point_2 source_min_vertex =
+        geom_traits->construct_min_vertex_2_object()(xcv[source_id]);
+      Point_2 target_min_vertex =
+        geom_traits->construct_min_vertex_2_object()(xcv[target_id]);
+      Point_2 target_max_vertex =
+        geom_traits->construct_max_vertex_2_object()(xcv[target_id]);
+
+      //push the trimmed version of the source subcurve.
+      // if(sorientation == SMALLER && source != source_max_vertex)
+      if ((orientation == SMALLER) &&
+          ! geom_traits->equal_2_object()(source, source_max_vertex) )
+      {
+        if (source_id != target_id )
+          trimmed_subcurves.push_back(trim(xcv[source_id],
+                                           source, source_max_vertex));
+        else trimmed_subcurves.push_back(trim(xcv[source_id], source, target));
+      }
+      //else if(orientation == LARGER && source != source_min_vertex)
+      else if ((orientation == LARGER) &&
+               ! geom_traits->equal_2_object()(source, source_min_vertex))
+      {
+        if (source_id != target_id )
+          trimmed_subcurves.push_back(trim(xcv[source_id],
+                                          source, source_min_vertex));
+        else trimmed_subcurves.push_back(trim(xcv[source_id], source, target));
+      }
+
+      //push the middle subcurves as they are.
+      for (size_t i = source_id+1; i<target_id; ++i)
+        trimmed_subcurves.push_back(xcv[i] );
+
+      //push the appropriately trimmed target subcurve.
+      if (source_id != target_id) {
+        //if(orientation == SMALLER && target != target_min_vertex)
+        if ((orientation == SMALLER) &&
+            ! geom_traits->equal_2_object()(target, target_min_vertex))
+          trimmed_subcurves.push_back(trim(xcv[target_id],
+                                          target_min_vertex, target));
+
+        //else if (orientation == LARGER && target != target_max_vertex)
+        else if ((orientation == LARGER) &&
+                 ! geom_traits->equal_2_object()(target, target_max_vertex))
+          trimmed_subcurves.push_back(trim(xcv[target_id],
+                                          target_max_vertex, target));
+      }
+
+      return X_monotone_curve_2(trimmed_subcurves.begin(),
+                                trimmed_subcurves.end());
+    }
+  };
+
+  /*! Obtain a Trim_2 functor object. */
+  Trim_2 trim_2_object() const { return Trim_2(*this); }
+
+  ///@}
+
+protected:
+  /*
+   * Roadmap: locate() should return an iterator to the located subcurve
+   */
+
+  /*! Obtain the index of the subcurve in the polycurve that contains the
+   * point q in its x-range. The function performs a binary search, so if the
+   * point q is in the x-range of the polycurve with n subcurves, the subcurve
+   * containing it can be located in O(log n) operations.
+   * \param cv The polycurve curve.
+   * \param q The point.
+   * \return An index i such that q is in the x-range of cv[i].
+   *         If q is not in the x-range of cv, returns INVALID_INDEX.
+   */
+  template <typename Compare>
+  std::size_t locate_gen(const X_monotone_curve_2& cv, Compare compare) const
+  {
+    // The direction of cv. SMALLER means left-to-right and
+    // otherwise right-to-left
+    Comparison_result direction =
+      subcurve_traits_2()->compare_endpoints_xy_2_object()(cv[0]);
+    std::size_t from, to;
+    if (direction == SMALLER) {
+      from = 0;
+      to = cv.number_of_subcurves() - 1;
+    }
+    else {
+      from = cv.number_of_subcurves() - 1;
+      to = 0;
+    }
+
+    // Test if q is one of cv's end points
+    Comparison_result res_from = compare(cv[from], ARR_MIN_END);
+    if (res_from == EQUAL) return from;
+
+    Comparison_result res_to = compare(cv[to], ARR_MAX_END);
+    if (res_to == EQUAL) return to;
+
+    if (res_to == res_from) return INVALID_INDEX;
+
+    // Perform a binary search to locate the subcurve that contains q in its
+    // range:
+    while (((direction == SMALLER) && (to > from)) ||
+           ((direction == LARGER) && (to < from)))
+    {
+      std::size_t mid = (from + to) / 2;
+      if (((direction == SMALLER) && (mid > from)) ||
+          ((direction == LARGER) && (mid < from)))
+      {
+        Comparison_result res_mid = compare(cv[mid], ARR_MIN_END);
+        if (res_mid == EQUAL) {
+          // Ensure that the returned subcurve contains the query point
+          // on its right end (if possible)
+          if ((direction == SMALLER) && (mid > 0)) --mid;
+          else if ((direction == LARGER) &&
+                   ((mid + 1) < cv.number_of_subcurves()))
+            ++mid;
+          return mid;
+        }
+        if (res_mid == res_from) from = mid;
+        else to = (direction == SMALLER) ? mid - 1 : mid + 1;
+      }
+      else {
+        CGAL_assertion(((direction == SMALLER) && (mid < to)) ||
+                       ((direction == LARGER) && (mid > to)));
+        Comparison_result res_mid = compare(cv[mid], ARR_MAX_END);
+        if (res_mid == EQUAL) return mid;
+        if (res_mid == res_to) to = mid;
+        else from = (direction == SMALLER) ? mid + 1 : mid - 1;
+      }
+    }
+    // In case (from == to), and we know that the polycurve contains the q:
+    CGAL_assertion(from == to);
+    return from;
+  }
+
+  // A utility class that compare a curve-end with a point.
+  template <typename Comparer>
+  class Compare_points {
+  private:
+    typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2>
+      Polycurve_basic_traits_2;
+
+    /*! The polycurve traits (in case it has state). */
+    const Polycurve_basic_traits_2& m_poly_traits;
+
+    const Point_2& m_point;
+
+    Comparer m_compare;
+
+  public:
+    // Constructor
+    Compare_points(const Polycurve_basic_traits_2& traits, Comparer compare,
+                   const Point_2& p) :
+      m_poly_traits(traits),
+      m_point(p),
+      m_compare(compare)
+    {}
+
+    // Compare the given curve-end with the stored point.
+    Comparison_result operator()(const X_monotone_subcurve_2& xs,
+                                 Arr_curve_end ce)
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      const Point_2& p = (ce == ARR_MAX_END) ?
+        geom_traits->construct_max_vertex_2_object()(xs) :
+        geom_traits->construct_min_vertex_2_object()(xs);
+      return m_compare(p, m_point);
+    }
+  };
+
+  // A utility class that compares two curve-ends.
+  template <typename Comparer>
+  class Compare_point_curve_end {
+  private:
+    const Point_2& m_point;
+
+    Comparer m_compare;
+
+  public:
+    // Constructor
+    Compare_point_curve_end(Comparer compare, const Point_2& p) :
+      m_point(p),
+      m_compare(compare)
+    {}
+
+    // Compare a given curve-end with the stored point.
+    Comparison_result operator()(const X_monotone_subcurve_2& xs,
+                                 Arr_curve_end ce)
+    { return m_compare(xs, ce, m_point); }
+  };
+
+  // A utility class that compare two curve-ends.
+  template <typename Comparer>
+  class Compare_curve_ends {
+  private:
+    const X_monotone_subcurve_2& m_x_monotone_subcurve;
+
+    Arr_curve_end m_curve_end;
+
+    Comparer m_compare;
+
+  public:
+    // Constructor
+    Compare_curve_ends(Comparer compare,
+                       const X_monotone_subcurve_2& xs, Arr_curve_end ce) :
+      m_x_monotone_subcurve(xs),
+      m_curve_end(ce),
+      m_compare(compare)
+    {}
+
+    // Compare the given curve-end with the stored curve end.
+    Comparison_result operator()(const X_monotone_subcurve_2& xs,
+                                 Arr_curve_end ce)
+    { return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); }
+  };
+
+  /*! Locate the index of a curve in a polycurve that contains an endpoint
+   * of a curve.
+   * This implementation is used in the case where at least one side of the
+   * parameter space is not oblivious.
+   * \param xcv (in) the given polycurve.
+   * \param xs (in) the given curve.
+   * \param cd (in) the curve-end indicator.
+   */
+  std::size_t locate_impl(const X_monotone_curve_2& xcv,
+                          const X_monotone_subcurve_2& xs,
+                          Arr_curve_end ce,
+                          Arr_not_all_sides_oblivious_tag) const
+  {
+    const Subcurve_traits_2* geom_traits = subcurve_traits_2();
+    if (geom_traits->is_vertical_2_object()(xcv[0])) {
+      // Verify that q has the same x-coord as xcv (which is vertical)
+      Compare_x_2 compare_x = compare_x_2_object();
+      Comparison_result res = compare_x(xcv[0], ARR_MIN_END, xs, ce);
+      if (res != EQUAL) return INVALID_INDEX;
+
+      Compare_curve_ends<Compare_xy_2> compare(compare_xy_2_object(), xs, ce);
+      return locate_gen(xcv, compare);
+    }
+
+    Compare_curve_ends<Compare_x_2> compare(compare_x_2_object(), xs, ce);
+    return locate_gen(xcv, compare);
+  }
+
+  /*! Locate the index of a curve in a polycurve that contains an endpoint
+   * of a curve.
+   * This implementation is used in the case where all sides of the parameter
+   * space is oblivious.
+   * \param xcv (in) the given polycurve.
+   * \param xs (in) the given curve.
+   * \param cd (in) the curve-end indicator.
+   */
+  std::size_t locate_impl(const X_monotone_curve_2& xcv,
+                          const X_monotone_subcurve_2& xs,
+                          Arr_curve_end ce,
+                          Arr_all_sides_oblivious_tag) const
+  {
+    const Subcurve_traits_2* geom_traits = subcurve_traits_2();
+    const Point_2& p = (ce == ARR_MAX_END) ?
+      geom_traits->construct_max_vertex_2_object()(xs) :
+      geom_traits->construct_min_vertex_2_object()(xs);
+    return locate(xcv, p);
+  }
+
+  /*! Locate the index of a curve in a polycurve that contains an endpoint
+   * of a curve.
+   * This implementation is used in the case where at least one side of the
+   * parameter space is not oblivious.
+   * \param xcv (in) the given polycurve.
+   * \param p (in) the endpoint of a curve.
+   */
+  std::size_t locate_impl(const X_monotone_curve_2& xcv,
+                          const Point_2& p,
+                          Arr_not_all_sides_oblivious_tag) const
+  {
+    const Subcurve_traits_2* geom_traits = subcurve_traits_2();
+    if (geom_traits->is_vertical_2_object()(xcv[0])) {
+      // Verify that q has the same x-coord as xcv (which is vertical)
+      Compare_x_2 compare_x = compare_x_2_object();
+      Comparison_result res = compare_x(xcv[0], ARR_MIN_END, p);
+      if (res != EQUAL) return INVALID_INDEX;
+
+      Compare_point_curve_end<Compare_xy_2> compare(compare_xy_2_object(), p);
+      return locate_gen(xcv, compare);
+    }
+
+    Compare_point_curve_end<Compare_x_2> compare(compare_x_2_object(), p);
+    return locate_gen(xcv, compare);
+  }
+
+  /*! Locate the index of a curve in a polycurve that contains an endpoint
+   * of a curve.
+   * This implementation is used in the case where all sides of the parameter
+   * space is oblivious.
+   * \param xcv (in) the given polycurve.
+   * \param p (in) the endpoint of a curve.
+   */
+  std::size_t locate_impl(const X_monotone_curve_2& xcv, const Point_2& p,
+                          Arr_all_sides_oblivious_tag) const
+  { return locate(xcv, p); }
+
+  //
+  std::size_t locate(const X_monotone_curve_2& xcv, const Point_2& q) const
+  {
+    const Subcurve_traits_2* geom_traits = subcurve_traits_2();
+    if (geom_traits->is_vertical_2_object()(xcv[0])) {
+      // Verify that q has the same x-coord as cv (which is vertical)
+      typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex =
+        geom_traits->construct_min_vertex_2_object();
+      typename Subcurve_traits_2::Compare_x_2 compare_x =
+        geom_traits->compare_x_2_object();
+      Comparison_result res = compare_x(min_vertex(xcv[0]), q);
+      if (res != EQUAL) return INVALID_INDEX;
+
+      Compare_points<Compare_xy_2> compare(geom_traits,
+                                           compare_xy_2_object(), q);
+      return locate_gen(xcv, compare);
+    }
+
+    Compare_points<Compare_x_2> compare(geom_traits, compare_x_2_object(), q);
+    return locate_gen(xcv, compare);
+  }
+
+  /*! Find the index of the subcurve in the polycurve that is defined to the
+   * left(or to the right) of the point q.
+   * \param cv The polycurve curve.
+   * \param q The point.
+   * \param to_right(true) if we wish to locate a subcurve to the right of q,
+   *               (false) if we wish to locate a subcurve to its right.
+   * \return An index i such that subcurves[i] is defined to the left(or to the
+   *         right) of q, or INVALID_INDEX if no such subcurve exists.
+   */
+  std::size_t locate_side(const X_monotone_curve_2& cv,
+                          const Point_2& q, const bool& to_right) const
+  {
+    // First locate a subcurve subcurves[i] that contains q in its x-range.
+    std::size_t i = locate(cv, q);
+    if (i == INVALID_INDEX) return INVALID_INDEX;
+
+    typename Subcurve_traits_2::Equal_2 equal =
+      subcurve_traits_2()->equal_2_object();
+    typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+      subcurve_traits_2()->compare_endpoints_xy_2_object();
+    typename Subcurve_traits_2::Compare_x_2 comp_x =
+      subcurve_traits_2()->compare_x_2_object();
+    typename Subcurve_traits_2::Is_vertical_2 is_vert =
+      subcurve_traits_2()->is_vertical_2_object();
+    typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v =
+      subcurve_traits_2()->construct_max_vertex_2_object();
+    typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v =
+      subcurve_traits_2()->construct_min_vertex_2_object();
+
+    Comparison_result direction = cmp_seg_endpts(cv[i]);
+
+    if ((!is_vert(cv[0]) && (comp_x(get_min_v(cv[i]), q) == EQUAL)) ||
+        (is_vert(cv[0]) && equal(get_min_v(cv[i]), q))){
+      // q is the left endpoint of the i'th subcurve:
+      if (to_right) return i;
+      else {
+        // to_left
+        if (direction == SMALLER) {
+          if (i == 0) return INVALID_INDEX;
+          else return i - 1;
+        }
+        else {
+          if (i == cv.number_of_subcurves()-1) return INVALID_INDEX;
+          else return i+1;
+        }
+      }
+    }
+
+    if ((!is_vert(cv[0]) && (comp_x(get_max_v(cv[i]), q) == EQUAL)) ||
+        (is_vert(cv[0]) && equal(get_max_v(cv[i]), q)))
+    {
+      // q is the right endpoint of the i'th subcurve:
+      if (!to_right) return i;
+      else {
+        if (direction == SMALLER) {
+          if (i == (cv.number_of_subcurves() - 1)) return INVALID_INDEX;
+          else return i + 1;
+        }
+        else {
+          if (i == 0) return INVALID_INDEX;
+          else return i-1;
+        }
+      }
+    }
+
+    // In case q is in cv[i]'s interior:
+    return i;
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_traits_2.h
new file mode 100644
index 0000000..4bab942
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_polycurve_traits_2.h
@@ -0,0 +1,1184 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University(Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel <efif at post.tau.ac.il>
+//                 Ron Wein  <wein at post.tau.ac.il>
+//                 Dror Atariah <dror.atariah at fu-berlin.de>
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_POLYCURVE_TRAITS_2_H
+#define CGAL_ARR_POLYCURVE_TRAITS_2_H
+
+/*! \file
+ * The traits-class for the general piece-wise (polycurve) type of curves of the
+ * arrangement package.
+ */
+
+#include <iterator>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polycurve_basic_traits_2.h>
+#include <CGAL/Arr_geometry_traits/Polycurve_2.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+
+namespace CGAL {
+
+template <typename SubcurveTraits_2 = Arr_segment_traits_2<> >
+class Arr_polycurve_traits_2 :
+    public Arr_polycurve_basic_traits_2<SubcurveTraits_2>
+{
+public:
+  typedef SubcurveTraits_2                                Subcurve_traits_2;
+
+private:
+  typedef Arr_polycurve_basic_traits_2<Subcurve_traits_2> Base;
+
+public:
+  /// \name Types inherited from the polycurve basic traits class.
+  //@{
+  typedef typename Base::Has_left_category            Has_left_category;
+  typedef typename Base::Has_do_intersect_category
+    Has_do_intersect_category;
+
+  typedef typename Base::Left_side_category           Left_side_category;
+  typedef typename Base::Bottom_side_category         Bottom_side_category;
+  typedef typename Base::Top_side_category            Top_side_category;
+  typedef typename Base::Right_side_category          Right_side_category;
+
+  typedef typename Base::Are_all_sides_oblivious_tag
+    Are_all_sides_oblivious_tag;
+
+  typedef typename Base::X_monotone_subcurve_2        X_monotone_subcurve_2;
+  typedef typename Base::Size                         Size;
+  typedef typename Base::size_type                    size_type;
+
+  typedef typename Base::Point_2                      Point_2;
+  typedef typename Base::X_monotone_curve_2           X_monotone_curve_2;
+
+  typedef typename Base::Compare_x_2                  Compare_x_2;
+  typedef typename Base::Compare_xy_2                 Compare_xy_2;
+  typedef typename Base::Construct_min_vertex_2       Construct_min_vertex_2;
+  typedef typename Base::Construct_max_vertex_2       Construct_max_vertex_2;
+  typedef typename Base::Is_vertical_2                Is_vertical_2;
+  typedef typename Base::Compare_y_at_x_2             Compare_y_at_x_2;
+  typedef typename Base::Compare_y_at_x_left_2        Compare_y_at_x_left_2;
+  typedef typename Base::Compare_y_at_x_right_2       Compare_y_at_x_right_2;
+  typedef typename Base::Equal_2                      Equal_2;
+  typedef typename Base::Compare_endpoints_xy_2       Compare_endpoints_xy_2;
+  typedef typename Base::Construct_opposite_2         Construct_opposite_2;
+  typedef typename Base::Approximate_2                Approximate_2;
+  typedef typename Base::Construct_x_monotone_curve_2
+    Construct_x_monotone_curve_2;
+  typedef typename Base::Parameter_space_in_x_2       Parameter_space_in_x_2;
+  typedef typename Base::Parameter_space_in_y_2       Parameter_space_in_y_2;
+  typedef typename Base::Compare_x_on_boundary_2      Compare_x_on_boundary_2;
+  typedef typename Base::Compare_x_at_limit_2         Compare_x_at_limit_2;
+  typedef typename Base::Compare_x_near_limit_2       Compare_x_near_limit_2;
+  typedef typename Base::Compare_y_on_boundary_2      Compare_y_on_boundary_2;
+  typedef typename Base::Compare_y_near_boundary_2    Compare_y_near_boundary_2;
+  typedef typename Base::Is_on_y_identification_2     Is_on_y_identification_2;
+  typedef typename Base::Is_on_x_identification_2     Is_on_x_identification_2;
+
+  typedef typename Base::Trim_2                       Trim_2;
+
+  //@}
+
+  /// \name Types and functors inherited from the subcurve geometry traits.
+  //@{
+
+  typedef typename Subcurve_traits_2::Has_merge_category  Has_merge_category;
+  typedef typename Subcurve_traits_2::Multiplicity        Multiplicity;
+  typedef typename Subcurve_traits_2::Curve_2             Subcurve_2;
+
+  //@}
+
+  // Backward compatibility:
+  typedef Subcurve_2                                      Segment_2;
+
+private:
+  typedef Arr_polycurve_traits_2<Subcurve_traits_2>       Self;
+
+public:
+  /*! Default constructor */
+  Arr_polycurve_traits_2() : Base() {}
+
+  /*! Constructor with given subcurve traits
+   * \param seg_traits an already existing subcurve tarits which is passed will
+   *        be used by the class.
+   */
+  Arr_polycurve_traits_2(const Subcurve_traits_2* geom_traits) :
+    Base(geom_traits)
+  {}
+
+  /*! A polycurve represents a general continuous piecewise-linear
+   * curve, without degenerated subcurves.
+   */
+  typedef internal::Polycurve_2<Subcurve_2, Point_2>      Curve_2;
+
+  /// \name Basic predicate functors(based on the subcurve traits).
+  //@{
+
+  /*! \class
+   * A functor that obtains the number of points of a polycurve.
+   */
+  class Number_of_points_2 : public Base::Number_of_points_2 {
+  public:
+    size_type operator()(const Curve_2& cv) const
+    {
+      size_type num_seg = cv.number_of_subcurves();
+      return (num_seg == 0) ? 0 : num_seg + 1;
+    }
+  };
+
+  /*! Obtain a number_of_points_2 functor object. */
+  Number_of_points_2 number_of_points_2_object() const
+  { return Number_of_points_2(); }
+
+  ///@}
+
+  /// \name Construction functors(based on the subcurve traits).
+  //@{
+
+  /*! \class
+   * A functor that divides an arc into x-monotone arcs. That are, arcs that
+   * do not cross the identification arc.
+   */
+  class Make_x_monotone_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>     Polycurve_traits_2;
+    /*! The traits (in case it has state) */
+    const Polycurve_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Make_x_monotone_2(const Polycurve_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Cut the given curve into x-monotone sub-curves and insert them into the
+     * given output iterator.
+     *
+     * \pre if `cv` is not empty then it must be continuous and well-oriented.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The output
+     *           object is a wrapper of a X_monotone_curve_2.
+     * \return The past-the-end iterator.
+     */
+  private:
+    template <typename OutputIterator>
+    OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi,
+                                 Arr_all_sides_oblivious_tag) const
+    {
+       typedef typename Curve_2::Subcurve_const_iterator const_seg_iterator;
+
+      // If the polycurve is empty, return.
+      if (cv.number_of_subcurves() == 0) return oi;
+
+      Construct_x_monotone_curve_2 ctr_x_curve =
+        m_poly_traits.construct_x_monotone_curve_2_object();
+
+      typename Subcurve_traits_2::Make_x_monotone_2 make_seg_x_monotone =
+        m_poly_traits.subcurve_traits_2()->make_x_monotone_2_object();
+
+      typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        m_poly_traits.subcurve_traits_2()->compare_endpoints_xy_2_object();
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      typename Subcurve_traits_2::Construct_opposite_2 ctr_seg_opposite =
+        m_poly_traits.subcurve_traits_2()->construct_opposite_2_object();
+#endif
+
+      // Convert the input polycurve to a sequence of CGAL objects, such
+      // that each Object wraps an x-monotone subcurve.
+      std::vector<Object> x_seg_objects;
+      const_seg_iterator it_segs;
+      for (it_segs = cv.subcurves_begin(); it_segs != cv.subcurves_end();
+           ++it_segs)
+        make_seg_x_monotone(*it_segs, std::back_inserter(x_seg_objects));
+      typename std::vector<Object>::iterator it = x_seg_objects.begin();
+      X_monotone_subcurve_2 x_seg;
+#if defined (CGAL_NO_ASSERTIONS)
+      CGAL::assign(x_seg, *it);
+#else
+      bool assign_res = CGAL::assign(x_seg, *it);
+      CGAL_assertion(assign_res);
+#endif
+
+      // If the polycurve consists of a single x-monotone subcurve, return.
+      if (x_seg_objects.size() == 1) {
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+        if (cmp_seg_endpts(x_seg) == LARGER)
+          x_seg = ctr_seg_opposite(x_seg);
+#endif
+        *oi++ = make_object(ctr_x_curve(x_seg));
+        x_seg_objects.clear();
+        return oi;
+      }
+
+      CGAL_precondition_code
+        (
+         // To be used in order to verify continuity and well-orientedness
+         // of the input curve cv.
+         typename Subcurve_traits_2::Construct_min_vertex_2 min_seg_v =
+           m_poly_traits.subcurve_traits_2()->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Construct_max_vertex_2 max_seg_v =
+           m_poly_traits.subcurve_traits_2()->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           m_poly_traits.subcurve_traits_2()->equal_2_object();
+         Point_2 last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
+           max_seg_v(x_seg) : min_seg_v(x_seg);
+         Point_2 next_src;
+         );
+
+      // The polycurve consists of at least 2 x-monotone subcurves:
+      Push_back_2 push_back = m_poly_traits.push_back_2_object();
+      typename Subcurve_traits_2::Is_vertical_2 is_seg_vertical =
+        m_poly_traits.subcurve_traits_2()->is_vertical_2_object();
+
+      bool is_start_vertical = is_seg_vertical(x_seg);
+      Comparison_result start_dir = cmp_seg_endpts(x_seg);
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      Push_front_2 push_front = m_poly_traits.push_front_2_object();
+      if (cmp_seg_endpts(x_seg) == LARGER) x_seg = ctr_seg_opposite(x_seg);
+#endif
+      X_monotone_curve_2 x_polycurve = ctr_x_curve(x_seg);
+
+      for (++it; it != x_seg_objects.end(); ++it){
+        X_monotone_subcurve_2 x_seg;
+#if defined (CGAL_NO_ASSERTIONS)
+        CGAL::assign(x_seg, *it);
+#else
+        bool assign_res = CGAL::assign(x_seg, *it);
+        CGAL_assertion(assign_res);
+#endif
+
+        // Test that cv is continuous and well-oriented.
+        CGAL_precondition_code
+          (
+           next_src = (cmp_seg_endpts(x_seg) == SMALLER) ?
+             min_seg_v(x_seg) : max_seg_v(x_seg);
+           );
+        CGAL_precondition_msg
+          (
+           equal(last_target, next_src),
+             "cv must form a continuous and well oriented curve."
+           );
+        CGAL_precondition_code
+          (
+           last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
+             max_seg_v(x_seg) : min_seg_v(x_seg);
+           );
+
+        if ((cmp_seg_endpts(x_seg) != start_dir) ||
+            (is_seg_vertical(x_seg) != is_start_vertical))
+        {
+            // Construct an x-monotone curve from the sub-range which was found
+          *oi++ = make_object(x_polycurve);
+          is_start_vertical = is_seg_vertical(x_seg);
+          start_dir = cmp_seg_endpts(x_seg);
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+          if (cmp_seg_endpts(x_seg) == LARGER) x_seg = ctr_seg_opposite(x_seg);
+#endif
+          x_polycurve = ctr_x_curve(x_seg);
+        }
+        else {
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+          if (cmp_seg_endpts(x_seg) == LARGER) {
+            x_seg = ctr_seg_opposite(x_seg);
+              push_front(x_polycurve, x_seg);
+          }
+          else
+            push_back(x_polycurve, x_seg);
+#else
+          push_back(x_polycurve, x_seg);
+#endif
+        }
+
+      } // for loop
+      if (x_polycurve.number_of_subcurves() != 0)
+        *oi++ = make_object(x_polycurve);
+      x_seg_objects.clear();
+      return oi;
+    }
+    template <typename OutputIterator>
+    OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi,
+                                 Arr_not_all_sides_oblivious_tag) const
+    {
+      typedef typename Curve_2::Subcurve_const_iterator const_seg_iterator;
+
+      // If the polycurve is empty, return.
+      if (cv.number_of_subcurves() == 0) return oi;
+
+      Construct_x_monotone_curve_2 ctr_x_curve =
+        m_poly_traits.construct_x_monotone_curve_2_object();
+
+      typename Subcurve_traits_2::Make_x_monotone_2 make_seg_x_monotone =
+        m_poly_traits.subcurve_traits_2()->make_x_monotone_2_object();
+
+      typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        m_poly_traits.subcurve_traits_2()->compare_endpoints_xy_2_object();
+
+      typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x =
+           m_poly_traits.subcurve_traits_2()->parameter_space_in_x_2_object();
+      typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y =
+           m_poly_traits.subcurve_traits_2()->parameter_space_in_y_2_object();
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      typename Subcurve_traits_2::Construct_opposite_2 ctr_seg_opposite =
+        m_poly_traits.subcurve_traits_2()->construct_opposite_2_object();
+#endif
+
+      // Convert the input polycurve to a sequence of CGAL objects, such
+      // that each Object wraps an x-monotone subcurve.
+      std::vector<Object> x_seg_objects;
+      const_seg_iterator it_segs;
+      for (it_segs = cv.subcurves_begin(); it_segs != cv.subcurves_end();
+           ++it_segs)
+        make_seg_x_monotone(*it_segs, std::back_inserter(x_seg_objects));
+      typename std::vector<Object>::iterator it = x_seg_objects.begin();
+      X_monotone_subcurve_2 x_seg;
+#if defined (CGAL_NO_ASSERTIONS)
+      CGAL::assign(x_seg, *it);
+#else
+      bool assign_res = CGAL::assign(x_seg, *it);
+      CGAL_assertion(assign_res);
+#endif
+
+      // If the polycurve consists of a single x-monotone subcurve, return.
+      if (x_seg_objects.size() == 1) {
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+        if (cmp_seg_endpts(x_seg) == LARGER)
+          x_seg = ctr_seg_opposite(x_seg);
+#endif
+        *oi++ = make_object(ctr_x_curve(x_seg));
+        x_seg_objects.clear();
+        return oi;
+      }
+
+      CGAL_precondition_code
+        (
+         // To be used in order to verify continuity and well-orientedness
+         // of the input curve cv.
+         typename Subcurve_traits_2::Construct_min_vertex_2 min_seg_v =
+           m_poly_traits.subcurve_traits_2()->construct_min_vertex_2_object();
+         typename Subcurve_traits_2::Construct_max_vertex_2 max_seg_v =
+           m_poly_traits.subcurve_traits_2()->construct_max_vertex_2_object();
+         typename Subcurve_traits_2::Equal_2 equal =
+           m_poly_traits.subcurve_traits_2()->equal_2_object();
+         Point_2 last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
+           max_seg_v(x_seg) : min_seg_v(x_seg);
+         Point_2 next_src;
+         );
+
+      // The polycurve consists of at least 2 x-monotone subcurves:
+      Push_back_2 push_back = m_poly_traits.push_back_2_object();
+      typename Subcurve_traits_2::Is_vertical_2 is_seg_vertical =
+        m_poly_traits.subcurve_traits_2()->is_vertical_2_object();
+
+      bool is_start_vertical = is_seg_vertical(x_seg);
+      Comparison_result start_dir = cmp_seg_endpts(x_seg);
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      Push_front_2 push_front = m_poly_traits.push_front_2_object();
+      if (cmp_seg_endpts(x_seg) == LARGER) x_seg = ctr_seg_opposite(x_seg);
+#endif
+      X_monotone_curve_2 x_polycurve = ctr_x_curve(x_seg);
+
+      for (++it; it != x_seg_objects.end(); ++it){
+        X_monotone_subcurve_2 x_seg;
+#if defined (CGAL_NO_ASSERTIONS)
+        CGAL::assign(x_seg, *it);
+#else
+        bool assign_res = CGAL::assign(x_seg, *it);
+        CGAL_assertion(assign_res);
+#endif
+
+        // Test that cv is continuous and well-oriented.
+        CGAL_precondition_code
+          (
+           next_src = (cmp_seg_endpts(x_seg) == SMALLER) ?
+             min_seg_v(x_seg) : max_seg_v(x_seg);
+           );
+        CGAL_precondition_msg
+          (
+           equal(last_target, next_src),
+             "cv must form a continuous and well oriented curve."
+           );
+        CGAL_precondition_code
+          (
+           last_target = (cmp_seg_endpts(x_seg) == SMALLER) ?
+             max_seg_v(x_seg) : min_seg_v(x_seg);
+           );
+
+          Arr_curve_end polycurve_target =
+            (cmp_seg_endpts(x_polycurve[0]) == SMALLER) ?
+            ARR_MAX_END : ARR_MIN_END;
+          Arr_curve_end seg_source = (cmp_seg_endpts(x_seg) == SMALLER) ?
+            ARR_MIN_END : ARR_MAX_END;
+          unsigned int num_segs = x_polycurve.number_of_subcurves();
+
+        if ((cmp_seg_endpts(x_seg) != start_dir) ||
+            (is_seg_vertical(x_seg) != is_start_vertical))
+        {
+            // Construct an x-monotone curve from the sub-range which was found
+          *oi++ = make_object(x_polycurve);
+          is_start_vertical = is_seg_vertical(x_seg);
+          start_dir = cmp_seg_endpts(x_seg);
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+          if (cmp_seg_endpts(x_seg) == LARGER) x_seg = ctr_seg_opposite(x_seg);
+#endif
+          x_polycurve = ctr_x_curve(x_seg);
+        }
+        else if (ps_x(x_polycurve[num_segs-1], polycurve_target) !=
+                 ARR_INTERIOR ||
+                 ps_x(x_seg, seg_source) != ARR_INTERIOR)
+        {
+          *oi++ = make_object(x_polycurve);
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+          if (cmp_seg_endpts(x_seg) == LARGER) x_seg = ctr_seg_opposite(x_seg);
+#endif
+            x_polycurve = ctr_x_curve(x_seg);
+        }
+
+        else {
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+          if (cmp_seg_endpts(x_seg) == LARGER) {
+            x_seg = ctr_seg_opposite(x_seg);
+            push_front(x_polycurve, x_seg);
+          }
+          else
+            push_back(x_polycurve, x_seg);
+#else
+          push_back(x_polycurve, x_seg);
+#endif
+        }
+      } // for loop
+      if (x_polycurve.number_of_subcurves() != 0)
+        *oi++ = make_object(x_polycurve);
+      x_seg_objects.clear();
+      return oi;
+    }
+public:
+    template <typename OutputIterator>
+    OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const
+    { return operator_impl(cv, oi, Are_all_sides_oblivious_tag()); }
+  };
+
+  /*! Obtain a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object() const
+  { return Make_x_monotone_2(*this); }
+
+  /* Functor to augment a polycurve by either adding a vertex or a subcurve
+   * at the back.
+   * TODO: Test all the operator()'s. (Don't forget vertical cases!)
+   */
+  class Push_back_2 : public Base::Push_back_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>   Polycurve_traits_2;
+
+  public:
+    /*! Constructor. */
+    Push_back_2(const Polycurve_traits_2& traits) :
+      Base::Push_back_2(traits)
+    {}
+
+    // Normally, the moment the compiler finds a name, it stops looking. In
+    // other words, the compiler first finds the operator() in the current
+    // class and stops looking, never finding the one in the base class.
+    // Explicitly bring the base operator() into scope, unnecesitating the
+    // code below.
+    using Base::Push_back_2::operator();
+
+    // /*! Append a subcurve to an existing x-monotone polycurve at the back.
+    //  */
+    // void operator()(X_monotone_curve_2& xcv,
+    //                 const X_monotone_subcurve_2& seg)
+    //   const
+    // { Base::Push_back_2::operator()(xcv, seg); }
+
+    /* Append a subcurve to an existing polycurve at the back.
+     * If the polycurve is empty, the subcurve will be its only subcurve.
+     */
+    void operator()(Curve_2& cv, const Subcurve_2& seg) const
+    { cv.push_back(seg); }
+  };
+
+  /*! Obtain a Push_back_2 functor object. */
+  Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
+
+  /* Functor to augment a polycurve by either adding a vertex or a subcurve
+   * at the front.
+   * TODO: Test all the operator()'s. (Don't forget vertical cases!)
+   */
+  class Push_front_2 : public Base::Push_front_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>     Polycurve_traits_2;
+
+  public:
+    /*! Constructor. */
+    Push_front_2(const Polycurve_traits_2& traits) :
+      Base::Push_front_2(traits)
+    {}
+
+    // Normally, the moment the compiler finds a name, it stops looking. In
+    // other words, the compiler first finds the operator() in the current
+    // class and stops looking, never finding the one in the base class.
+    // Explicitly bring the base operator() into scope, unnecesitating the
+    // code below.
+    using Base::Push_front_2::operator();
+
+    // /*! Append a subcurve to an existing x-monotone polycurve at the front.
+    //  */
+    // void operator()(X_monotone_curve_2& xcv,
+    //                 const X_monotone_subcurve_2& seg)
+    //   const
+    // { Base::Push_front_2::operator()(xcv, seg); }
+
+    /* Append a subcurve to an existing polycurve at the front. */
+    void operator()(Curve_2& cv, const Subcurve_2& seg) const
+    { cv.push_front(seg); }
+  };
+
+  /*! Obtain a Push_front_2 functor object. */
+  Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
+
+  class Split_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>       Polycurve_traits_2;
+    /*! The polycurve traits (in case it has state) */
+    const Polycurve_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Split_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {}
+
+  public:
+    /*! Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve(p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve(p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator()(const X_monotone_curve_2& xcv, const Point_2& p,
+                    X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex =
+        geom_traits->construct_min_vertex_2_object();
+      typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex =
+        geom_traits->construct_max_vertex_2_object();
+      typename Subcurve_traits_2::Equal_2 equal =
+        geom_traits->equal_2_object();
+      typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        geom_traits->compare_endpoints_xy_2_object();
+
+      // Make sure the split point is not one of the curve endpoints.
+      CGAL_precondition((!equal(m_poly_traits.
+                                construct_min_vertex_2_object()(xcv), p)));
+      CGAL_precondition((!equal(m_poly_traits.
+                                construct_max_vertex_2_object()(xcv), p)));
+
+      CGAL_precondition_msg(xcv.number_of_subcurves() > 0,
+                            "Cannot split a polycurve of length zero.");
+
+      Comparison_result dir = cmp_seg_endpts(xcv[0]);
+
+      // Locate the subcurve on the polycurve xcv that contains p.
+      std::size_t i = m_poly_traits.locate(xcv, p);
+
+      CGAL_precondition(i != Polycurve_traits_2::INVALID_INDEX);
+
+      // Clear the output curves.
+      xcv1.clear();
+      xcv2.clear();
+
+      // Push all subcurves labeled(0, 1, ... , i-1) into xcv1.
+      for (std::size_t j = 0; j < i; ++j) xcv1.push_back(xcv[j]);
+
+      if (dir == SMALLER){
+        // Check whether the split point is xcv[i]'s source or target.
+        if (equal(max_vertex(xcv[i]), p)) {
+          // The entire i'th subcurve belongs to xcv1:
+          xcv1.push_back(xcv[i]);
+        }
+        else if (equal(min_vertex(xcv[i]), p)) {
+          // The entire i'th subcurves belongs to xcv2:
+          xcv2.push_back(xcv[i]);
+        }
+        else {
+          // The i'th subcurve should be split: The left part(seg1)
+          // goes to xcv1, and the right part(seg2) goes to xcv2.
+          X_monotone_subcurve_2 seg1, seg2;
+          m_poly_traits.subcurve_traits_2()->split_2_object()(xcv[i], p,
+                                                              seg1, seg2);
+
+          xcv1.push_back(seg1);
+          xcv2.push_back(seg2);
+        }
+      }
+      else {
+        if (equal(min_vertex(xcv[i]), p)) {
+          xcv1.push_back(xcv[i]);
+        }
+        else if (equal(max_vertex(xcv[i]), p)) {
+          xcv2.push_back(xcv[i]);
+        }
+        else {
+          X_monotone_subcurve_2 seg1, seg2;
+          m_poly_traits.subcurve_traits_2()->
+            split_2_object()(xcv[i], p, seg1, seg2);
+
+          if (cmp_seg_endpts(seg2) == LARGER){
+            xcv1.push_back(seg2);
+          }
+          else {
+            // seg2 has to be reversed
+            seg2 = m_poly_traits.subcurve_traits_2()->
+              construct_opposite_2_object()(seg2);
+            xcv1.push_back(seg2);
+          }
+
+          if (cmp_seg_endpts(seg1) == LARGER){
+            xcv2.push_back(seg1);
+          }
+          else {
+            // seg2 has to be reversed
+            seg1 = m_poly_traits.subcurve_traits_2()->
+              construct_opposite_2_object()(seg1);
+            xcv1.push_back(seg1);
+          }
+        }
+      }
+
+      // Push all subcurves labeled(i+1, i+2, ... , n-1) into xcv1.
+      std::size_t n = xcv.number_of_subcurves();
+
+      for (std::size_t j = i+1; j < n; ++j) xcv2.push_back(xcv[j]);
+
+      if (dir != SMALLER) std::swap(xcv1, xcv2);
+    }
+  };
+
+  /*! Obtain a Split_2 functor object. */
+  Split_2 split_2_object() const { return Split_2(*this); }
+
+  class Intersect_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>       Polycurve_traits_2;
+    /*! The polycurve traits (in case it has state) */
+    const Polycurve_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Intersect_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {}
+
+    /*! Find the intersections of the two given curves and insert them into the
+     * given output iterator. As two subcurves may itersect only once, only a
+     * single intersection will be contained in the iterator.
+     * Note: If the intersection yields an overlap then it will be oriented
+     *       from left-to-right.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template <typename OutputIterator>
+    OutputIterator
+    operator()(const X_monotone_curve_2& cv1,
+               const X_monotone_curve_2& cv2,
+               OutputIterator oi) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Compare_y_at_x_2 cmp_y_at_x = m_poly_traits.compare_y_at_x_2_object();
+      typename Subcurve_traits_2::Equal_2 equal =
+        geom_traits->equal_2_object();
+      typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex =
+        geom_traits->construct_min_vertex_2_object();
+      typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex =
+        geom_traits->construct_max_vertex_2_object();
+      typename Subcurve_traits_2::Intersect_2 intersect =
+        geom_traits->intersect_2_object();
+      typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        geom_traits->compare_endpoints_xy_2_object();
+      typename Subcurve_traits_2::Construct_opposite_2 construct_opposite =
+        geom_traits->construct_opposite_2_object();
+
+      typedef std::pair<Point_2,Multiplicity> Point_2_pair;
+
+      Comparison_result dir1 = cmp_seg_endpts(cv1[0]);
+      Comparison_result dir2 = cmp_seg_endpts(cv2[0]);
+
+      const std::size_t n1 = cv1.number_of_subcurves();
+      const std::size_t n2 = cv2.number_of_subcurves();
+
+      std::size_t i1 = (dir1 == SMALLER) ? 0 : n1-1;
+      std::size_t i2 = (dir2 == SMALLER) ? 0 : n2-1;
+
+      X_monotone_curve_2 ocv;           // Used to represent overlaps.
+
+      Compare_xy_2 compare_xy = m_poly_traits.compare_xy_2_object();
+      Comparison_result left_res =
+        compare_xy(cv1[i1], ARR_MIN_END, cv2[i2], ARR_MIN_END);
+
+      if (left_res == SMALLER) {
+        // cv1's left endpoint is to the left of cv2's left endpoint:
+        // Locate the index i1 of the subcurve in cv1 which contains cv2's
+        // left endpoint.
+        i1 = m_poly_traits.locate_impl(cv1, cv2[i2], ARR_MIN_END,
+                                       Are_all_sides_oblivious_tag());
+        if (i1 == Polycurve_traits_2::INVALID_INDEX) return oi;
+
+        if (equal(max_vertex(cv1[i1]), min_vertex(cv2[i2]))) {
+          if (((dir1 == SMALLER) && (i1 == n1-1)) ||
+              ((dir1 == LARGER) && (i1 == 0))){
+            // cv1's right endpoint equals cv2's left endpoint
+            // Thus we can return this single(!) intersection point
+            std::pair<Point_2, Multiplicity>  p(max_vertex(cv1[i1]), 0);
+            *oi++ = make_object(p);
+            return oi;
+          }
+          dir1 == SMALLER ?
+            ++i1 : (i1 != 0) ? --i1 : (std::size_t) Polycurve_traits_2::INVALID_INDEX;
+          left_res = EQUAL;
+        }
+      }
+      else if (left_res == LARGER) {
+        // cv1's left endpoint is to the right of cv2's left endpoint:
+        // Locate the index i2 of the subcurve in cv2 which contains cv1's
+        // left endpoint.
+        i2 = m_poly_traits.locate_impl(cv2, cv1[i1], ARR_MIN_END,
+                                       Are_all_sides_oblivious_tag());
+        if (i2 == Polycurve_traits_2::INVALID_INDEX) return oi;
+
+        if (equal(max_vertex(cv2[i2]), min_vertex(cv1[i1]))) {
+          if (((dir2 == SMALLER) && (i2 == n2-1)) ||
+              ((dir2 == LARGER) && (i2 == 0))){
+            // cv2's right endpoint equals cv1's left endpoint
+            // Thus we can return this single(!) intersection point
+            std::pair<Point_2, Multiplicity>  p(max_vertex(cv2[i2]), 0);
+            *oi++ = make_object(p);
+            return oi;
+          }
+
+          dir2 == SMALLER ?
+            ++i2 : (i2 != 0) ? --i2 : (std::size_t) Polycurve_traits_2::INVALID_INDEX;
+          left_res = EQUAL;
+        }
+      }
+
+      // Check if the the left endpoint lies on the other polycurve.
+      bool left_coincides = (left_res == EQUAL);
+      bool left_overlap = false;
+
+      if (left_res == SMALLER)
+        left_coincides = (cmp_y_at_x(cv2[i2], ARR_MIN_END, cv1[i1]) == EQUAL);
+      else if (left_res == LARGER)
+        left_coincides = (cmp_y_at_x(cv1[i1], ARR_MIN_END, cv2[i2]) == EQUAL);
+
+      // The main loop: Go simultaneously over both polycurves.
+      Comparison_result right_res = left_res;
+      bool right_coincides = left_coincides;
+      bool right_overlap = false;
+
+      while (((dir1 == SMALLER) && (dir2 == SMALLER) &&
+              (i1 < n1) && (i2 < n2)) ||
+             ((dir1 != SMALLER) && (dir2 == SMALLER) &&
+              (i1 != Polycurve_traits_2::INVALID_INDEX) && (i2 < n2)) ||
+             ((dir1 == SMALLER) && (dir2 != SMALLER) && (i1 < n1) &&
+              (i2 != Polycurve_traits_2::INVALID_INDEX)) ||
+             ((dir1 != SMALLER) && (dir2 != SMALLER) &&
+              (i1 != Polycurve_traits_2::INVALID_INDEX) &&
+              (i2 != Polycurve_traits_2::INVALID_INDEX)))
+      {
+        right_res = compare_xy(cv1[i1], ARR_MAX_END, cv2[i2], ARR_MAX_END);
+
+        right_coincides = (right_res == EQUAL);
+        if (right_res == SMALLER)
+          right_coincides =
+            (cmp_y_at_x(cv1[i1], ARR_MAX_END, cv2[i2]) == EQUAL);
+        else if (right_res == LARGER)
+          right_coincides =
+            (cmp_y_at_x(cv2[i2], ARR_MAX_END, cv1[i1]) == EQUAL);
+
+        right_overlap = false;
+
+        if (!right_coincides && !left_coincides) {
+          // Non of the endpoints of the current subcurve of one polycurve
+          // coincides with the curent subcurve of the other polycurve:
+          // Output the intersection if exists.
+          oi = intersect(cv1[i1], cv2[i2], oi);
+        }
+        else if (right_coincides && left_coincides) {
+          // An overlap exists between the current subcurves of the
+          // polycurves: Output the overlapping subcurve.
+          right_overlap = true;
+
+          std::vector<CGAL::Object> int_seg;
+          intersect(cv1[i1], cv2[i2], std::back_inserter(int_seg));
+
+          for (size_t i = 0; i < int_seg.size(); ++i) {
+            const X_monotone_subcurve_2* x_seg =
+              CGAL::object_cast<X_monotone_subcurve_2> (&(int_seg[i]));
+            if (x_seg != NULL) {
+              X_monotone_subcurve_2 seg = *x_seg;
+
+              // If for some reason the subcurve intersection
+              // results in left oriented curve.
+              if ( cmp_seg_endpts(seg) == LARGER)
+                seg = construct_opposite(seg);
+              ocv.push_back(seg);
+            }
+
+            const Point_2_pair* p_ptr =
+              CGAL::object_cast<Point_2_pair>(&(int_seg[i]));
+            if (p_ptr != NULL) {
+              // Any point that is not equal to the max_vertex of the
+              // subcurve should be inserted into oi.
+              // The max_vertex of the current subcurve (if intersecting)
+              // will be taken care of as the min_vertex of in the next
+              // iteration.
+              if (!equal(p_ptr->first, max_vertex(cv1[i1])))
+                *oi++ = make_object(*p_ptr);
+            }
+          }
+        }
+
+        else if (left_coincides && !right_coincides) {
+          // std::cout << "Left is coinciding but right is not." << std::endl;
+          // The left point of the current subcurve of one polycurve
+          // coincides with the current subcurve of the other polycurve.
+          if (left_overlap) {
+            // An overlap occured at the previous iteration:
+            // Output the overlapping polycurve.
+            CGAL_assertion(ocv.number_of_subcurves() > 0);
+            *oi++ = make_object(ocv);
+            ocv.clear();
+          }
+          else {
+            // The left point of the current subcurve of one
+            // polycurve coincides with the current subcurve of the
+            // other polycurve, and no overlap occured at the
+            // previous iteration: Output the intersection
+            // point. The derivative of at least one of the
+            // polycurves is not defined at this point, so we give
+            // it multiplicity 0.
+            if (left_res == SMALLER) {
+              std::pair<Point_2, Multiplicity> p(min_vertex(cv2[i2]), 0);
+              *oi++ = make_object(p);
+            }
+            else {
+              std::pair<Point_2, Multiplicity> p(min_vertex(cv1[i1]), 0);
+              *oi++ = make_object(p);
+            }
+          }
+        }
+
+        // Proceed forward.
+        if (right_res != SMALLER) {
+          if (dir2 == SMALLER) ++i2;
+          else {
+            if (i2 == 0) i2 = Polycurve_traits_2::INVALID_INDEX;
+            else --i2;
+          }
+        }
+        if (right_res != LARGER) {
+          if (dir1 == SMALLER)
+            ++i1;
+          else {
+            if (i1 == 0) i1 = Polycurve_traits_2::INVALID_INDEX;
+            else --i1;
+          }
+        }
+        left_res = (right_res == SMALLER) ? LARGER :
+          (right_res == LARGER) ? SMALLER : EQUAL;
+
+        left_coincides = right_coincides;
+        left_overlap = right_overlap;
+      } // END of while loop
+
+        // Output the remaining overlapping polycurve, if necessary.
+      if (ocv.number_of_subcurves() > 0) {
+        *oi++ = make_object(ocv);
+      }
+      else if (right_coincides) {
+        typedef std::pair<Point_2,Multiplicity> return_point;
+        return_point ip;
+        if (right_res == SMALLER) {
+          ip = (dir1 == SMALLER) ?
+            return_point(max_vertex(cv1[i1-1]), 0) :
+            (i1 != Polycurve_traits_2::INVALID_INDEX) ?
+            return_point(max_vertex(cv1[i1+1]), 0) :
+            return_point(max_vertex(cv1[0]), 0);
+          *oi++ = make_object(ip);
+        }
+        else if (right_res == LARGER) {
+          ip = (dir2 == SMALLER) ?
+            return_point(max_vertex(cv2[i2-1]), 0) :
+            (i2 != Polycurve_traits_2::INVALID_INDEX) ?
+            return_point(max_vertex(cv2[i2+1]), 0) :
+            return_point(max_vertex(cv2[0]), 0);
+          *oi++ = make_object(ip);
+        }
+        else if (((i1 > 0) && (dir1 == SMALLER)) ||
+                 ((i1 < n1) && (dir1 != SMALLER)) ||
+                 ((i1 == Polycurve_traits_2::INVALID_INDEX) &&
+                  (dir1 != SMALLER)))
+        {
+          ip = (dir1 == SMALLER) ?
+            return_point(max_vertex(cv1[i1-1]), 0) :
+            (i1 != Polycurve_traits_2::INVALID_INDEX) ?
+            return_point(max_vertex(cv1[i1+1]), 0) :
+            return_point(max_vertex(cv1[0]), 0);
+          *oi++ = make_object(ip);
+        }
+        else {
+          CGAL_assertion_msg((dir2 == SMALLER && i2 > 0) ||
+                             (dir2 != SMALLER && i2 < n2) ||
+                             (dir2 != SMALLER &&
+                              ((i1 == Polycurve_traits_2::INVALID_INDEX) ||
+                               (i2 == Polycurve_traits_2::INVALID_INDEX))),
+                             "Wrong index for xcv2 in Intersect_2 of "
+                             "polycurves.");
+          ip = (dir2 == SMALLER) ?
+            return_point(max_vertex(cv2[i2-1]), 0) :
+            (i2 != Polycurve_traits_2::INVALID_INDEX) ?
+            return_point(max_vertex(cv2[i2+1]), 0) :
+            return_point(max_vertex(cv2[0]), 0);
+          *oi++ = make_object(ip);
+        }
+      }
+
+      return oi;
+    }
+  };
+
+  /*! Obtain an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object() const
+  { return Intersect_2(*this); }
+
+  class Are_mergeable_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>       Polycurve_traits_2;
+    /*! The polycurve traits (in case it has state) */
+    const Polycurve_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Are_mergeable_2(const Polycurve_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return(true) if the two curves are mergeable, that is, they share a
+     * common endpoint and the same orientation;(false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2) const
+    {
+      const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2();
+      Construct_min_vertex_2 min_vertex =
+        m_poly_traits.construct_min_vertex_2_object();
+      Construct_max_vertex_2 max_vertex =
+        m_poly_traits.construct_max_vertex_2_object();
+      typename Subcurve_traits_2::Equal_2 equal =
+        geom_traits->equal_2_object();
+      typename Subcurve_traits_2::Is_vertical_2 is_seg_vertical =
+        geom_traits->is_vertical_2_object();
+
+      Comparison_result dir1 =
+        m_poly_traits.compare_endpoints_xy_2_object()(cv1);
+      Comparison_result dir2 =
+        m_poly_traits.compare_endpoints_xy_2_object()(cv2);
+
+      if (dir1 != dir2)
+        return false;
+
+      bool ver1 = is_seg_vertical(cv1[0]);
+      bool ver2 = is_seg_vertical(cv2[0]);
+
+      return (((// Both are directed from left-to-right
+                (dir1 == SMALLER) &&
+                ((equal(max_vertex(cv1),min_vertex(cv2))) ||
+                 (equal(max_vertex(cv2),min_vertex(cv1))))) ||
+               (// Both are directed from right-to-left
+                (dir1 == LARGER) &&
+                ((equal(min_vertex(cv1),max_vertex(cv2))) ||
+                 (equal(max_vertex(cv1),min_vertex(cv2))))
+                )) &&
+              (// Either both should be vertical or both should
+               // be NOT vertical.
+               (ver1 && ver2) || (!ver1 && !ver2)));
+    }
+  };
+
+  /*! Obtain an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object() const
+  { return Are_mergeable_2(*this); }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone curves into one.
+   */
+  /* Roadmap: Allow merging of overlapping polycurves. This means also
+   *          changing the subcurve traits class.
+   */
+  class Merge_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>     Geometry_traits;
+    /*! The traits (in case it has state) */
+    const Geometry_traits& m_poly_traits;
+
+  public:
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Geometry_traits& traits) : m_poly_traits(traits) {}
+
+    /*! Merge two given x-monotone curves into a single curve(segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2,
+                    X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_poly_traits.are_mergeable_2_object()(cv1, cv2));
+
+      Construct_min_vertex_2 get_min_v =
+        m_poly_traits.construct_min_vertex_2_object();
+      Construct_max_vertex_2 get_max_v =
+        m_poly_traits.construct_max_vertex_2_object();
+      Compare_endpoints_xy_2 cmp_seg_endpts =
+        m_poly_traits.compare_endpoints_xy_2_object();
+      Equal_2 equal = m_poly_traits.equal_2_object();
+
+      c.clear();
+      if (// Either both are left-to-right and cv2 is to the right of cv1
+          ((cmp_seg_endpts(cv1)==SMALLER) &&
+           (equal(get_max_v(cv1),get_min_v(cv2)))) ||
+          // or both are right-to-left and cv2 is to the left of cv1
+          ((cmp_seg_endpts(cv1)==LARGER) &&
+           (equal(get_min_v(cv1), get_max_v(cv2)))))
+      {
+        const std::size_t n1 = cv1.number_of_subcurves();
+        const std::size_t n2 = cv2.number_of_subcurves();
+        std::size_t i;
+
+        // cv2 extends cv1 to the right:
+        for (i = 0; i < n1 - 1; ++i) c.push_back(cv1[i]);
+
+        // Try to merge the to contiguous line subcurves:
+        if (m_poly_traits.subcurve_traits_2()->
+            are_mergeable_2_object()(cv1[n1 - 1], cv2[0]))
+        {
+          X_monotone_subcurve_2 seg;
+          m_poly_traits.subcurve_traits_2()->
+            merge_2_object()(cv1[n1 - 1], cv2[0], seg);
+          c.push_back(seg);
+        }
+        else {
+          c.push_back(cv1[n1 - 1]);
+          c.push_back(cv2[0]);
+        }
+
+        for (i = 1; i < n2; ++i) c.push_back(cv2[i]);
+      }
+      else
+        return this->operator()(cv2,cv1,c);
+    }
+  };
+
+  /*! Obtain a Merge_2 functor object. */
+  Merge_2 merge_2_object() const { return Merge_2(*this); }
+  ///@}
+
+  /*! \class
+   * A functor that constructs a (general) polycurve.
+   */
+  class Construct_curve_2 {
+  protected:
+    typedef Arr_polycurve_traits_2<Subcurve_traits_2>       Polycurve_traits_2;
+    /*! The polycurve traits (in case it has state) */
+    const Polycurve_traits_2& m_poly_traits;
+
+  public:
+    /*! Constructor. */
+    Construct_curve_2(const Polycurve_traits_2& traits) :
+      m_poly_traits(traits)
+    {}
+
+    /*! Obtain a polycurve that consists of one given subcurve. */
+    Curve_2 operator()(const Subcurve_2& seg) const { return Curve_2(seg); }
+
+    /* Construct a well-oriented polycurve from a range of either
+     * `SubcurveTraits::Point_2` or `SubcurveTraits::Subcurve_2`.
+     */
+    template <typename ForwardIterator>
+    Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
+    {
+      typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
+      typedef typename boost::is_same<VT, Point_2>::type Is_point;
+      // Dispatch the range to the appropriate implementation.
+      return constructor_impl(begin, end, Is_point());
+    }
+
+    /*! Construction of a polycurve from a range of points.
+     * \pre The range contains at least two points
+     * \pre Consecutive points are disjoint.
+     * \return Well-oriented polycurve connecting the given
+     *         points. The order of the vertices is determined by
+     *         their order in the range.  Furthermore, the
+     *         orientation of the polycurve is induced by their
+     *         order.
+     */
+    template <typename ForwardIterator>
+    Curve_2 constructor_impl(ForwardIterator /* begin */,
+                             ForwardIterator /* end */,
+                             boost::true_type) const
+    {  CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
+
+    /*! Construction implementation from a range of subcurves.
+     *  Note that the subcurves in the range are NOT necessarily x-monotone,
+     *  thus it is impossible to test (even in precondition) whether the input
+     *  forms a continuous and well oriented polycurve.
+     *  \pre Range should contain at least one subcurve.
+     */
+    template <typename ForwardIterator>
+    Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
+                             boost::false_type) const
+    {
+      // Range has to contain at least one subcurve
+      CGAL_precondition(begin != end);
+      return Curve_2(begin, end);
+    }
+  };
+
+  /*! Obtain a Construct_curve_2 functor object. */
+  Construct_curve_2 construct_curve_2_object() const
+  { return Construct_curve_2(*this); }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_polyline_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_polyline_traits_2.h
new file mode 100644
index 0000000..d491668
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_polyline_traits_2.h
@@ -0,0 +1,600 @@
+// Copyright (c) 2000-2014
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_POLYLINE_TRAITS_2_H
+#define CGAL_ARR_POLYLINE_TRAITS_2_H
+
+/*! \file
+ * The traits-class for the linear piece-wiese(polyline) type of curves of the
+ * arrangement package.
+ */
+
+#include <list>
+#include <iterator>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polycurve_traits_2.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+
+namespace CGAL {
+
+// If no template instantiation is provided, it will be instantiated
+// with Arr_segment_traits.
+template <typename SegmentTraits_2 = Arr_segment_traits_2<> >
+class Arr_polyline_traits_2 : public Arr_polycurve_traits_2<SegmentTraits_2> {
+public:
+  typedef SegmentTraits_2                             Segment_traits_2;
+
+private:
+  typedef Arr_polyline_traits_2<Segment_traits_2>     Self;
+  typedef Arr_polycurve_traits_2<Segment_traits_2>    Base;
+
+public:
+  /// \name Types inherited from the polycurve traits class.
+  //@{
+
+  // Tag definitions:
+  typedef typename Base::Has_left_category            Has_left_category;
+  typedef typename Base::Has_merge_category           Has_merge_category;
+  typedef typename Base::Has_do_intersect_category
+    Has_do_intersect_category;
+
+  typedef typename Base::Left_side_category           Left_side_category;
+  typedef typename Base::Bottom_side_category         Bottom_side_category;
+  typedef typename Base::Top_side_category            Top_side_category;
+  typedef typename Base::Right_side_category          Right_side_category;
+
+  typedef typename Base::Are_all_sides_oblivious_tag
+    Are_all_sides_oblivious_tag;
+
+  typedef typename Base::X_monotone_subcurve_2         X_monotone_subcurve_2;
+  typedef typename Base::Subcurve_2                   Subcurve_2;
+
+  typedef typename Base::Point_2                      Point_2;
+  typedef typename Base::Curve_2                      Curve_2;
+  typedef typename Base::X_monotone_curve_2           X_monotone_curve_2;
+
+  typedef typename Base::Multiplicity                 Multiplicity;
+
+  typedef typename Base::Compare_x_2                  Compare_x_2;
+  typedef typename Base::Compare_xy_2                 Compare_xy_2;
+  typedef typename Base::Construct_min_vertex_2       Construct_min_vertex_2;
+  typedef typename Base::Construct_max_vertex_2       Construct_max_vertex_2;
+  typedef typename Base::Is_vertical_2                Is_vertical_2;
+  typedef typename Base::Compare_y_at_x_2             Compare_y_at_x_2;
+  typedef typename Base::Compare_y_at_x_left_2        Compare_y_at_x_left_2;
+  typedef typename Base::Compare_y_at_x_right_2       Compare_y_at_x_right_2;
+  typedef typename Base::Equal_2                      Equal_2;
+  typedef typename Base::Compare_endpoints_xy_2       Compare_endpoints_xy_2;
+  typedef typename Base::Construct_opposite_2         Construct_opposite_2;
+  typedef typename Base::Approximate_2                Approximate_2;
+  typedef typename Base::Parameter_space_in_x_2       Parameter_space_in_x_2;
+  typedef typename Base::Parameter_space_in_y_2       Parameter_space_in_y_2;
+  typedef typename Base::Compare_x_on_boundary_2      Compare_x_on_boundary_2;
+  typedef typename Base::Compare_x_at_limit_2         Compare_x_at_limit_2;
+  typedef typename Base::Compare_x_near_limit_2       Compare_x_near_limit_2;
+  typedef typename Base::Compare_y_on_boundary_2      Compare_y_on_boundary_2;
+  typedef typename Base::Compare_y_near_boundary_2    Compare_y_near_boundary_2;
+  typedef typename Base::Is_on_y_identification_2     Is_on_y_identification_2;
+  typedef typename Base::Is_on_x_identification_2     Is_on_x_identification_2;
+
+  typedef typename Base::Split_2                      Split_2;
+  typedef typename Base::Intersect_2                  Intersect_2;
+  typedef typename Base::Are_mergeable_2              Are_mergeable_2;
+  typedef typename Base::Merge_2                      Merge_2;
+
+  typedef typename Base::Number_of_points_2           Number_of_points_2;
+  typedef typename Base::Trim_2                       Trim_2;
+
+  //@}
+
+public:
+  /*! Construct default. */
+  Arr_polyline_traits_2() : Base() {}
+
+  /*! Construct from a segment traits
+   * \param geom_traits an already existing segment tarits which is passed will
+   *        be used by the class.
+   */
+  Arr_polyline_traits_2(const Segment_traits_2* geom_traits) :
+    Base(geom_traits)
+  {}
+
+  /// \name Types and functors defined here.
+  //@{
+
+  /* Functor to augment a polyline by either adding a vertex or a segment
+   * at the back.
+   */
+  class Push_back_2 : public Base::Push_back_2 {
+  protected:
+    typedef Arr_polyline_traits_2<SegmentTraits_2>     Polyline_traits_2;
+
+  public:
+    /*! Constructor. */
+    Push_back_2(const Polyline_traits_2& traits) :
+      Base::Push_back_2(traits)
+    {}
+
+    // Normally, the moment the compiler finds a name, it stops looking. In
+    // other words, the compiler first finds the operator() in the current
+    // class and stops looking, never finding the one in the base class.
+    // Explicitly bring the base operator() into scope, unnecesitating the
+    // code below.
+    using Base::Push_back_2::operator();
+
+    // /*! Append a segment `seg` to an existing polyline `cv` at the back. */
+    // void operator()(Curve_2& cv, const Segment_2& seg) const
+    // { Base::Push_back_2::operator() (cv, seg); }
+
+    // /* Append a segment `seg` to an existing polyline `xcv` at the back. */
+    // void operator()(X_monotone_curve_2& xcv,
+    //                 const X_monotone_subcurve_2& seg) const
+    // { Base::Push_back_2::operator()(xcv, seg); }
+
+    /* Append a point `p` to an existing polyline `cv` at the back. */
+    void operator()(Curve_2& cv, const Point_2& p) const
+    {
+      typedef typename Curve_2::size_type size_type;
+      size_type num_seg = cv.number_of_subcurves();
+      CGAL_precondition(num_seg > 0);
+      int last_seg = num_seg-1;
+
+      const Segment_traits_2* seg_traits =
+        this->m_poly_traits.subcurve_traits_2();
+      typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        seg_traits->compare_endpoints_xy_2_object();
+
+      /* Since it is desired to maintain `cv` well-oriented, we have
+       * to append the segment [cv[last_seg].target(),p]. The
+       * following test determines which end of the last segment is
+       * the target, i.e. the actual end of `cv`.
+       */
+      if (cmp_seg_endpts(cv[last_seg]) == SMALLER) {
+        typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
+          seg_traits->construct_max_vertex_2_object();
+        cv.push_back(Subcurve_2(get_max_v(cv[last_seg]), p));
+      }
+      else {
+        typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
+          seg_traits->construct_min_vertex_2_object();
+        cv.push_back(Subcurve_2(get_min_v(cv[last_seg]), p));
+      }
+    }
+
+    /* Append a point `p` to an existing polyline `xcv` at the back. */
+    void operator()(X_monotone_curve_2& xcv, const Point_2& p) const
+    {
+      typedef typename X_monotone_curve_2::size_type size_type;
+      size_type num_seg = xcv.number_of_subcurves();
+      CGAL_precondition(num_seg > 0);
+
+      const Segment_traits_2* seg_traits =
+        this->m_poly_traits.subcurves_traits_2();
+      CGAL_precondition_code
+        (
+         typename Segment_traits_2::Compare_x_2 comp_x =
+           seg_traits->compare_x_2_object();
+         typename Segment_traits_2::Compare_xy_2 comp_xy =
+           seg_traits->compare_xy_2_object();
+         typename Base::Is_vertical_2 is_vertical =
+           this->m_poly_traits.is_vertical_2_object();
+         );
+
+      if (seg_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) {
+        // xcv is oriented left-to-right
+        typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
+          seg_traits->construct_max_vertex_2_object();
+        CGAL_precondition
+          (
+           (!is_vertical(xcv) &&
+            (comp_x(get_max_v(xcv[num_seg-1]), p) == SMALLER)) ||
+           (is_vertical(xcv) &&
+            (comp_x(get_max_v(xcv[num_seg-1]), p) == EQUAL) &&
+            (comp_xy(get_max_v(xcv[num_seg-1]), p) == SMALLER))
+           );
+        xcv.push_back(X_monotone_subcurve_2(get_max_v(xcv[num_seg-1]), p));
+      }
+      else {
+        // xcv is oriented right-to-left
+        typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
+          seg_traits->construct_min_vertex_2_object();
+        CGAL_precondition
+          (
+           (!is_vertical(xcv) &&
+            (comp_x(get_min_v(xcv[num_seg-1]), p) == LARGER)) ||
+           (is_vertical(xcv) &&
+            (comp_x(get_min_v(xcv[num_seg-1]), p) == EQUAL) &&
+            (comp_xy(get_min_v(xcv[num_seg-1]), p) == LARGER))
+           );
+        xcv.push_back(X_monotone_subcurve_2(get_min_v(xcv[num_seg-1]), p));
+      }
+    }
+  };
+
+  /*! Obtain a Push_back_2 functor object. */
+  Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
+
+  /* Functor to augment a polyline by either adding a vertex or a segment
+   * at the front.
+   * TODO: Test all the operator()'s. (Don't forget vertical cases!)
+   */
+  class Push_front_2 : public Base::Push_front_2 {
+  protected:
+    typedef Arr_polyline_traits_2<SegmentTraits_2>     Polyline_traits_2;
+
+  public:
+    /*! Constructor. */
+    Push_front_2(const Polyline_traits_2& traits) :
+      Base::Push_front_2(traits)
+    {}
+
+    // Normally, the moment the compiler finds a name, it stops looking. In
+    // other words, the compiler first finds the operator() in the current
+    // class and stops looking, never finding the one in the base class.
+    // Explicitly bring the base operator() into scope, unnecesitating the
+    // code below.
+    using Base::Push_front_2::operator();
+
+    // /*! Append a segment `seg` to an existing polyline `cv` at the front. */
+    // void operator()(Curve_2& cv, const Subcurve_2& seg) const
+    // { Base::Push_front_2::operator()(cv, seg); }
+
+    // /*! Append a segment `seg` to an existing polyline `xcv` at the front. */
+    // void operator()(X_monotone_curve_2& xcv,
+    //                 const X_monotone_subcurve_2& seg) const
+    // { Base::Push_front_2::operator()(xcv, seg); }
+
+    /* Append a point `p` to an existing polyline `cv` at the front. */
+    void operator()(Curve_2& cv, const Point_2& p) const
+    {
+      CGAL_precondition_code
+        (
+         typedef typename Curve_2::size_type size_type;
+         size_type num_seg = cv.number_of_subcurves();
+         );
+      CGAL_precondition(num_seg > 0);
+
+      const Segment_traits_2* geom_traits =
+        this->m_poly_traits.subcurve_traits_2();
+      typename Segment_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts =
+        geom_traits->compare_endpoints_xy_2_object();
+
+      if (cmp_seg_endpts(cv[0]) == SMALLER) {
+        typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
+          geom_traits->construct_min_vertex_2_object();
+        cv.push_front(Subcurve_2(p, get_min_v(cv[0])));
+      }
+      else {
+        typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
+          geom_traits->construct_max_vertex_2_object();
+        cv.push_front(Subcurve_2(p, get_max_v(cv[0])));
+      }
+    }
+
+    /*! Append a point `p` to an existing polyline `xcv` at the front. */
+    void operator()(const X_monotone_curve_2& xcv, Point_2& p) const
+    {
+      const SegmentTraits_2* geom_traits =
+        this->m_poly_traits.subcurve_traits_2();
+      CGAL_precondition_code
+        (
+         typedef typename X_monotone_curve_2::size_type size_type;
+         size_type num_seg = xcv.number_of_subcurves();
+         typename Segment_traits_2::Compare_x_2 comp_x =
+         geom_traits->compare_x_2_object();
+         typename Segment_traits_2::Compare_xy_2 comp_xy =
+         geom_traits->compare_xy_2_object();
+         typename Base::Is_vertical_2 is_vertical =
+           this->m_poly_traits.is_vertical_2_object();
+         );
+      CGAL_precondition(num_seg > 0);
+
+      if (geom_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) {
+        // xcv is oriented left-to-right
+        typename Segment_traits_2::Construct_max_vertex_2 get_max_v =
+          geom_traits->construct_max_vertex_2_object();
+        CGAL_precondition
+          (
+           (!is_vertical(xcv) &&
+            (comp_x(get_max_v(xcv[0]), p) == LARGER)) ||
+           (is_vertical(xcv) &&
+            (comp_x(get_max_v(xcv[0]), p) == EQUAL) &&
+            (comp_xy(get_max_v(xcv[0]), p) == LARGER))
+           );
+        xcv.push_front(X_monotone_subcurve_2(p, get_max_v(xcv[0])));
+      }
+      else {
+        // xcv is oriented right-to-left
+        typename Segment_traits_2::Construct_min_vertex_2 get_min_v =
+          geom_traits->construct_min_vertex_2_object();
+        CGAL_precondition
+          (
+           (!is_vertical(xcv) &&
+            (comp_x(get_min_v(xcv[0]), p) == SMALLER)) ||
+           (is_vertical(xcv) &&
+            (comp_x(get_min_v(xcv[0]), p) == EQUAL) &&
+            (comp_xy(get_min_v(xcv[0]), p) == SMALLER))
+           );
+        xcv.push_front(X_monotone_subcurve_2(p, get_min_v(xcv[0])));
+      }
+    }
+  };
+
+  /*! Obtain a Push_front_2 functor object. */
+  Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
+
+  /*! Construct a general curve. */
+  class Construct_curve_2 : public Base::Construct_curve_2 {
+  protected:
+    typedef Arr_polyline_traits_2<Segment_traits_2>         Polyline_traits_2;
+
+  public:
+    /*! Constructor.
+     */
+    Construct_curve_2(const Polyline_traits_2& traits) :
+      Base::Construct_curve_2(traits)
+    {}
+
+    /* Obtain an polyline connecting two given endpoints.
+     */
+    Curve_2 operator()(const Point_2& p, const Point_2& q) const
+    { return Curve_2(Subcurve_2(p, q)); }
+
+    /* Obtain a polyline consists of one given segment.
+     */
+    Curve_2 operator()(const Subcurve_2& seg) const
+    { return Base::Construct_curve_2::operator()(seg); }
+
+    /* Construct a well-oriented polyline from a range of either
+     * `Segment_traits::Point_2` or `Segment_traits::Subcurve_2`.
+     */
+    template <typename ForwardIterator>
+    Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
+    {
+      typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
+      typedef typename boost::is_same<VT, Point_2>::type Is_point;
+      // Dispatch the range to the appropriate implementation.
+      return constructor_impl(begin, end, Is_point());
+    }
+
+    /*! Construction implementation from a range of segments.
+     *  Note that the segments in the range are NOT necessarily x-monotone,
+     *  thus it is impossible to test (even in precondition) whether the input
+     *  forms a continuous and well oriented polyline.
+     *  \pre Range should contain at least one segment.
+     */
+    template <typename ForwardIterator>
+    Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
+                             boost::false_type) const
+    { return Base::Construct_curve_2::operator()(begin, end); }
+
+    /*! Construction of a polyline from a range of points.
+     * \pre The range contains at least two points
+     * \pre Consecutive points are disjoint.
+     * \return Well-oriented polyline connecting the given points. The order
+     *         of the vertices is determined by their order in the range.
+     *         Furthermore, the orientation of the polyline is induced by
+     *         their order.
+     */
+    template <typename ForwardIterator>
+    Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
+                             boost::true_type) const
+    {
+      // The range must contain at least two points.
+      CGAL_precondition_msg(std::distance(begin, end) > 1,
+                            "Range of points must contain at least 2 points");
+
+      // Container of the segments to be constructed from the range of points
+      std::list<Subcurve_2> segs;
+
+      CGAL_precondition_code
+        (
+         typename Segment_traits_2::Equal_2 equal =
+         this->m_poly_traits.subcurve_traits_2()->equal_2_object();
+         );
+
+      // Check whether there are no points in the range:
+      ForwardIterator next = begin;
+      ForwardIterator curr = next++;
+
+      // Construct a segment from each two adjacent points.
+      Curve_2 cv;
+      while (next != end) {
+        CGAL_precondition_msg(!equal(*curr,*next),
+                              "Cannot construct a degenerated segment");
+        segs.push_back(Subcurve_2(*curr, *next));
+        curr = next++;
+      }
+
+      return operator()(segs.begin(), segs.end());
+    }
+  };
+
+  /*! Obtain a Construct_curve_2 functor object. */
+  Construct_curve_2 construct_curve_2_object() const
+  { return Construct_curve_2(*this); }
+
+  /*! Construct an x-monotone curve. */
+  class Construct_x_monotone_curve_2 :
+    public Base::Construct_x_monotone_curve_2
+  {
+  protected:
+    typedef Arr_polyline_traits_2<Segment_traits_2>     Polyline_traits_2;
+
+  public:
+    /*! Constructor.
+     */
+    Construct_x_monotone_curve_2(const Polyline_traits_2& traits) :
+      Base::Construct_x_monotone_curve_2(traits)
+    {}
+
+    /*! Obtain an x-monotone polyline connecting two given endpoints.
+     * \param p The first point.
+     * \param q The second point.
+     * \pre p and q must not be the same.
+     * \return A segment connecting p and q.
+     */
+    X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const
+    {
+      CGAL_precondition_msg
+        (!this->m_poly_traits.subcurve_traits_2()->equal_2_object()(p,q),
+         "Cannot construct a degenerated segment as a polyline");
+      X_monotone_subcurve_2 seg =  this->m_poly_traits.subcurve_traits_2()->
+        construct_x_monotone_curve_2_object()(p, q);
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      if (this->m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p,q) ==
+          LARGER)
+        seg = m_poly_traits.subcurve_traits_2()->
+          construct_opposite_2_object()(seg);
+#endif
+
+      return X_monotone_curve_2(seg);
+    }
+
+    /*! Obtain an x-monotone polyline that consists of one given segment.
+     * \param seg input segment.
+     * \pre seg is not degenerated.
+     * \return An x-monotone polyline with one segment.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const
+    { return Base::Construct_x_monotone_curve_2::operator()(seg); }
+
+    /*! Construct an x-monotone polyline from a range of elements.
+     * \pre Range should from a continuous well-oriented x-monotone polyline.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 operator()(ForwardIterator begin, ForwardIterator end)
+      const
+    {
+      typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
+      typedef typename boost::is_same<VT, Point_2>::type Is_point;
+      // Dispatch the range to the appropriate implementation.
+      return constructor_impl(begin, end, Is_point());
+    }
+
+    /*! Construction implementation from a range of segments.
+     * \param begin An iterator pointing to the first segment in the range.
+     * \param end An iterator pointing to the past-the-end segment
+     * in the range.
+     * \pre The range contains at least one segment.
+     * \pre Segments correspond to a well-oriented polyline. That
+     *      is, the target of the i-th segment is an source of the
+     *      (i+1)th segment.
+     * \pre The sequence of segments in the range forms a weak x-monotone
+     *      polyline.
+     * \pre The container should support bidirectional iteration.
+     * \return A continuous, well-oriented x-monotone polyline which
+     *         is directed either left-to-right or right-to-left
+     *         depending on the segments in the input.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 constructor_impl(ForwardIterator begin,
+                                        ForwardIterator end,
+                                        boost::false_type) const
+    { return Base::Construct_x_monotone_curve_2::operator()(begin, end); }
+
+    /*! Construction of an x-monotone polyline from a range of points.
+     * The polyline may be oriented left-to-right or right-to-left
+     * depending on the lexicographical order of the points in the
+     * input.
+     * \pre Range contains at least two points.
+     * \pre No two consecutive points are the same.
+     * \pre The points form an continuous well-oriented x-monotone polyline.
+     * \post By the construction the returned polyline is well-oriented.
+     */
+    template <typename ForwardIterator>
+    X_monotone_curve_2 constructor_impl(ForwardIterator begin,
+                                        ForwardIterator end,
+                                        boost::true_type) const
+    {
+      // The range must contain at least two points.
+      CGAL_precondition_msg(std::distance(begin, end) > 1,
+                            "Range of points must contain at least 2 points");
+
+      // Container of the segments to be constructed from the range of points
+      std::list<X_monotone_subcurve_2> segs;
+      // Make sure the range of points contains at least two points.
+      ForwardIterator next = begin;
+      ForwardIterator curr = next++;
+
+      CGAL_precondition_code
+        (
+         const Segment_traits_2* geom_traits =
+           this->m_poly_traits.subcurve_traits_2();
+         // Initialize two comparison functors
+         typename Segment_traits_2::Compare_x_2 compare_x =
+           geom_traits->compare_x_2_object();
+         typename Segment_traits_2::Compare_xy_2 compare_xy =
+           geom_traits->compare_xy_2_object();
+         // Make sure there is no changed of directions.
+         // Saves the comp_x between the first two points
+         const Comparison_result cmp_x_res = compare_x(*curr, *next);
+         // Save the comp_xy between the first two points
+         const Comparison_result cmp_xy_res = compare_xy(*curr, *next);
+         );
+
+      // Assure that the first two points are not the same.
+      // Note that this also assures that non of the consecutive
+      // points are equal in the whole range.
+      CGAL_precondition(cmp_xy_res != EQUAL);
+
+      while (next != end) {
+        CGAL_precondition(compare_xy(*curr, *next) == cmp_xy_res);
+        CGAL_precondition(compare_x(*curr, *next) == cmp_x_res);
+
+        segs.push_back(X_monotone_subcurve_2(*curr, *next));
+        curr = next++;
+      }
+
+#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT
+      if (m_poly_traits.subcurve_traits_2()->
+          compare_endpoints_xy_2_object()(*segs.begin()) == LARGER)
+      {
+        X_monotone_curve_2 xcv(segs.begin(), segs.end());
+        return m_poly_traits.construct_opposite_2_object()(xcv);
+      }
+#endif
+
+      return operator()(segs.begin(), segs.end());
+    }
+  };
+
+  /*! Obtain a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
+  { return Construct_x_monotone_curve_2(*this); }
+
+  /*! Deprecated!
+   * Obtain the segment traits.
+   * \return the segment traits.
+   */
+  CGAL_DEPRECATED const Segment_traits_2* segment_traits_2() const
+  { return this->subcurve_traits_2(); }
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Algebraic_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Algebraic_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Algebraic_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Algebraic_point_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h
new file mode 100644
index 0000000..83548ec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h
@@ -0,0 +1,125 @@
+// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
+//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
+
+#ifndef CGAL_BASE_RATIONAL_ARC_DS_D_1_H
+#define CGAL_BASE_RATIONAL_ARC_DS_D_1_H
+
+#include <vector>
+#include <ostream>
+#include <CGAL/Arr_enums.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+
+#include <CGAL/Fraction_traits.h>
+#include <CGAL/Arithmetic_kernel.h>
+#include <CGAL/Algebraic_kernel_d_1.h>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+namespace Arr_rational_arc {
+
+template <typename Algebraic_kernel_ >
+class Base_rational_arc_ds_1
+{
+public:
+  typedef Algebraic_kernel_                             Algebraic_kernel;
+  typedef Base_rational_arc_ds_1<Algebraic_kernel>      Self;
+
+  //typedef typename Algebraic_kernel::Multiplicity_type  Multiplicity;
+  typedef unsigned int                                  Multiplicity;
+  typedef typename Algebraic_kernel::Coefficient        Coefficient;
+  
+  typedef typename Get_arithmetic_kernel<Coefficient>::Arithmetic_kernel
+                                                        Arithmetic_kernel;
+  typedef typename Arithmetic_kernel::Rational          Rational; 
+  typedef typename Arithmetic_kernel::Integer           Integer;
+  typedef typename Algebraic_kernel::Algebraic_real_1   Algebraic_real_1;
+  
+  typedef typename Algebraic_kernel::Polynomial_1       Polynomial_1;
+  typedef Polynomial_traits_d<Polynomial_1>             Polynomial_traits_1;
+  typedef Fraction_traits<Rational>                     FT_rat_1;
+  typedef typename Algebraic_kernel::Solve_1            Solve_1;
+  typedef typename Algebraic_kernel::Bound              Bound;
+  typedef Algebraic_structure_traits<Polynomial_1>      AT_poly;
+  
+  typedef Polynomial<Rational>                          Poly_rat_1;
+  typedef Polynomial_traits_d<Poly_rat_1>               PT_rat_1;
+  typedef Fraction_traits <Poly_rat_1>                  FT_poly_rat_1;
+  typedef std::vector<Algebraic_real_1>                 Algebraic_vector;
+  typedef std::vector<Multiplicity>                     Multiplicity_vector;
+  typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
+                                                        Root_multiplicity_vector;
+
+  CGAL_static_assertion((boost::is_same<Integer,Coefficient>::value));
+  CGAL_static_assertion((boost::is_same<Polynomial_1,
+                       typename FT_poly_rat_1::Numerator_type>::value));
+
+public:
+   
+  //---------------------------------------------------------------------
+  // Print a polynomial nicely.
+
+  static std::ostream& print_polynomial(std::ostream& os,
+                                        const Polynomial_1& poly,
+                                        char var) 
+  {
+    // Get the degree.
+    const int    deg = CGAL::degree(poly);
+   
+    Integer     coeff;
+    CGAL::Sign  sgn;
+    int         k;
+
+    if (deg < 0)
+    {
+      os << '0';
+      return (os);
+    }
+
+    for (k = deg; k >= 0; k--)
+    { 
+      //coeff = pt::Get_coefficient()(poly, k);
+      coeff = CGAL::get_coefficient(poly, k);
+  
+      if (k == deg)
+        os << coeff;
+      else if ((sgn = CGAL::sign (coeff)) == POSITIVE)
+        os << " + " << coeff;
+      else if (sgn == NEGATIVE)
+        os << " - " << -coeff;
+      else
+        continue;
+     
+      if (k > 1)
+        os << '*' << var << '^' << k;
+      else if (k == 1)
+        os << '*' << var;
+    }
+
+    return (os);
+  }
+
+}; //Base_rational_arc_ds_1
+
+}   // namespace Arr_rational_arc
+}   //namespace CGAL {
+
+#endif //CGAL_BASE_RATIONAL_ARC_DS_D_1_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Cache.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Cache.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Cache.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Cache.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h
new file mode 100644
index 0000000..7f0b553
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h
@@ -0,0 +1,2606 @@
+// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
+//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
+
+
+#ifndef CGAL_RATIONAL_ARC_D_1_H
+#define CGAL_RATIONAL_ARC_D_1_H
+
+#include <vector>
+#include <list>
+#include <ostream>
+#include <CGAL/Arr_enums.h>
+#include <CGAL/tags.h>
+#include <CGAL/Arr_tags.h>
+
+#include <CGAL/Fraction_traits.h>
+#include <CGAL/Arithmetic_kernel.h>
+#include <CGAL/Algebraic_kernel_d_1.h>
+
+#include <CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h>
+#include <CGAL/Arr_rat_arc/Algebraic_point_2.h>
+#include <CGAL/Arr_rat_arc/Cache.h>
+#include <CGAL/Arr_rat_arc/Rational_function.h>
+#include <CGAL/Arr_rat_arc/Rational_function_pair.h>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+namespace Arr_rational_arc {
+
+//--------------------------------------------------------------------------//
+//   class Base_rational_arc_d_1
+//Representation of an segment of a rational function, given as:
+//
+//        Numerator(x)
+//   y = -------------              x_l <= x <= x_r
+//        Denominator(x)
+//
+// where Numerator and Denominator are polynomial with integer (or rational) coefficients.
+// The class is templated with two parameters: 
+// Algebraic_kernel: An algebraic kernel for the intersection points of the curves
+//
+// This class serves as the base for the classes:
+// Rational_arc_d_1 (a general, not necessarily continuous arc) 
+// Continuous_rational_arc_d_1 (a continuous portion of a rational function).
+//--------------------------------------------------------------------------//
+
+template <typename Algebraic_kernel_>
+class Base_rational_arc_d_1
+{
+public:
+  typedef Algebraic_kernel_                                 Algebraic_kernel;
+  typedef Base_rational_arc_d_1<Algebraic_kernel>           Self;
+
+  typedef CGAL::Arr_rational_arc::Base_rational_arc_ds_1<Algebraic_kernel>
+    Base_rational_arc_ds_1;
+  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel>
+                                                            Rational_function;
+  typedef CGAL::Arr_rational_arc::Rational_function_pair<Algebraic_kernel>
+    Rational_function_pair;
+  typedef CGAL::Arr_rational_arc::Algebraic_point_2<Algebraic_kernel>
+                                                            Algebraic_point_2;
+
+  typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel>   Cache;
+
+  typedef typename Base_rational_arc_ds_1::Multiplicity     Multiplicity;
+  typedef typename Base_rational_arc_ds_1::Polynomial_1     Polynomial_1;
+  typedef typename Base_rational_arc_ds_1::Coefficient      Coefficient;
+  typedef typename Base_rational_arc_ds_1::Arithmetic_kernel
+                                                            Arithmetic_kernel;
+  typedef typename Base_rational_arc_ds_1::Rational         Rational; 
+  typedef typename Base_rational_arc_ds_1::Integer          Integer;
+  typedef typename Base_rational_arc_ds_1::Algebraic_real_1 Algebraic_real_1;
+  typedef typename Base_rational_arc_ds_1::Algebraic_vector Algebraic_vector;
+  typedef typename Base_rational_arc_ds_1::Multiplicity_vector
+                                                            Multiplicity_vector;
+  
+  typedef std::vector<Rational>                             Rat_vector;
+
+  typedef Polynomial_traits_d<Polynomial_1>                 Polynomial_traits_1;
+  typedef typename Base_rational_arc_ds_1::FT_rat_1         FT_rat_1;
+  typedef typename Base_rational_arc_ds_1::Solve_1          Solve_1;
+  typedef typename Algebraic_kernel::Bound                  Bound;
+  typedef Algebraic_structure_traits<Polynomial_1>          AT_poly;
+  
+  typedef Polynomial<Rational>                              Poly_rat_1;
+  typedef Polynomial_traits_d<Poly_rat_1>                   PT_rat_1;
+  typedef Fraction_traits <Poly_rat_1>                      FT_poly_rat_1;
+
+  typedef Algebraic_point_2                                 Point_2;
+  
+  CGAL_static_assertion((boost::is_same<Integer, Coefficient>::value));
+  CGAL_static_assertion((boost::is_same<Polynomial_1,
+                       typename FT_poly_rat_1::Numerator_type>::value));
+
+public:
+  const Rational_function& get_rational_function(const Polynomial_1& numerator,
+                                                 const Polynomial_1& denominator,
+                                                 const Cache& cache) const
+  {
+    return cache.get_rational_function(numerator, denominator);
+  }
+  const Rational_function& get_rational_function(const Rational& rat,
+                                                 const Cache& cache) const
+  {
+    return cache.get_rational_function(rat);
+  }
+  const Rational_function_pair get_rational_pair(const Rational_function& f, 
+                                                 const Rational_function& g,
+                                                 const Cache& cache) const
+  {
+    CGAL_precondition(f.id() != g.id());
+    return cache.get_rational_pair(f, g);
+  }
+
+public:
+  //------------------------------
+  //Base_rational_arc_d_1 members
+  //------------------------------
+  enum
+  {
+    SRC_AT_X_MINUS_INFTY = 1,
+    SRC_AT_X_PLUS_INFTY = 2,
+    SRC_AT_Y_MINUS_INFTY = 4,
+    SRC_AT_Y_PLUS_INFTY = 8,
+
+    SRC_INFO_BITS = SRC_AT_X_MINUS_INFTY + SRC_AT_X_PLUS_INFTY +
+    SRC_AT_Y_MINUS_INFTY + SRC_AT_Y_PLUS_INFTY,
+
+    TRG_AT_X_MINUS_INFTY = 16,
+    TRG_AT_X_PLUS_INFTY = 32,
+    TRG_AT_Y_MINUS_INFTY = 64,
+    TRG_AT_Y_PLUS_INFTY = 128,
+
+    TRG_INFO_BITS = TRG_AT_X_MINUS_INFTY + TRG_AT_X_PLUS_INFTY +
+    TRG_AT_Y_MINUS_INFTY + TRG_AT_Y_PLUS_INFTY,
+
+    IS_DIRECTED_RIGHT = 256,
+    IS_CONTINUOUS = 512,
+    IS_VALID = 1024
+  };
+ 
+  Rational_function _f;    // The rational function 
+  Algebraic_point_2   _ps;   // The source point.
+  Algebraic_point_2   _pt;   // The target point.
+  int     _info;   // A set of Boolean flags. 
+
+public:
+  //------------
+  //Constructors
+  //------------
+
+  //---------------------------------------------------------------------------
+  //default constructor
+  Base_rational_arc_d_1() :
+    _info(0)
+  {}
+ 
+  //---------------------------------------------------------------------------
+  // Constructor of a whole polynomial curve defined by pcoeffs - the rational
+  // coefficients of the polynomial p(x).
+  
+  Base_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
+    _info(0)
+  {
+    _init(P, Integer(1), cache);
+  }
+
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
+    _info(0)
+  {
+    // Set the numerator & denominator polynomials.
+    Polynomial_1 _numer;
+    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                                 pcoeffs.end()));
+    Integer denom_int;
+    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
+        
+    _init(_numer,denom_int,cache);
+  }
+
+  void _init(const Polynomial_1& P,const Integer& Q_int,const Cache& cache)
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_int));
+    //set rational function 
+    Polynomial_1 Q= typename Polynomial_traits_1::Construct_polynomial()(Q_int);
+    _f = get_rational_function(P, Q, cache);
+
+    //Mark that the endpoints of the polynomial are unbounded
+    //(the source is at x = -oo and the target is at x = +oo).
+    _info = (_info | SRC_AT_X_MINUS_INFTY);
+    _info = (_info | TRG_AT_X_PLUS_INFTY);
+    _info = (_info | IS_DIRECTED_RIGHT);
+
+    // Check whether the end points lie at y = -oo or at y = +oo.
+    const int    deg_num(CGAL::degree(P));
+    Integer lead_coeff(CGAL::leading_coefficient(Q));
+    CGAL::Sign   lead_sign(CGAL::sign(lead_coeff));
+  
+    if (deg_num > 0)
+    {
+      // Check if the degree is even or odd and check the sign of the leading
+      // coefficient of the polynomial.
+   
+      CGAL_assertion(lead_sign != CGAL::ZERO);
+
+      if (deg_num % 2 == 0)
+      {
+        // Polynomial of an even degree.
+        if (lead_sign == CGAL::NEGATIVE) 
+          _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_MINUS_INFTY);
+        else
+          _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_PLUS_INFTY);
+      }
+      else
+      {
+        // Polynomial of an odd degree.
+        if (lead_sign == CGAL::NEGATIVE)
+          _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_MINUS_INFTY);
+        else
+          _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY);
+      }
+    }
+    else
+    {
+      // In the case of a constant polynomial it is possible to set a finite
+      // y-coordinate for the source and target points.
+      //x coordinate is 0 although in practice is +-oo
+      _ps = Algebraic_point_2(_f,Algebraic_real_1());
+      //x coordinate is 0 although in practice is +-oo
+      _pt = Algebraic_point_2(_f,Algebraic_real_1());
+    }
+
+    // Mark that the arc is continuous and valid.
+    _info = (_info | IS_CONTINUOUS);
+    _info = (_info | IS_VALID);
+
+  }  
+
+  //---------------------------------------------------------------------------
+  //Constructor of a polynomial ray, defined by y = p(x), 
+  //for x_s <= x if the ray is directed to the right, or
+  //for x_s >= x if it is directed to the left.
+  //param pcoeffs The rational coefficients of the polynomial p(x).
+  //param x_s The x-coordinate of the source point.
+  //param dir_right Is the ray directed to the right (to +oo) or to the left
+  //(to -oo).
+
+  Base_rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s,
+                        bool dir_right, const Cache& cache) :
+    _info(0)
+  {
+    _init(P, Polynomial_1(1), x_s, dir_right, cache);
+  }
+
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs,const Algebraic_real_1& x_s,
+                        bool dir_right, const Cache& cache) :
+    _info(0)
+  {
+    // Set the numerator & denominator polynomials.
+    Polynomial_1 _numer;
+    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                                 pcoeffs.end()));
+    Integer denom_int;
+    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
+    
+    _init(_numer, denom_int, x_s, dir_right, cache);
+  }
+
+  void _init(const Polynomial_1& P,const Integer& Q_int,
+             const Algebraic_real_1& x_s, bool dir_right,const Cache& cache)
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_int));
+    //set rational function 
+    Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int);
+    _f = get_rational_function(P,Q,cache);
+
+    // Mark that the target points of the polynomial is unbounded.
+    if (dir_right)
+    {
+      _info = (_info | TRG_AT_X_PLUS_INFTY);
+      _info = (_info | IS_DIRECTED_RIGHT);
+    }
+    else
+    {
+      _info = (_info | TRG_AT_X_MINUS_INFTY);
+    }
+
+    // Set the source point.
+    _ps=Algebraic_point_2(_f,x_s);
+
+    // Check whether the target point lies at y = -oo or at y = +oo.
+    const int   deg_num(CGAL::degree(P));
+    Integer     lead_coeff(CGAL::leading_coefficient(P));
+    CGAL::Sign  lead_sign(CGAL::sign(lead_coeff));
+
+    if (deg_num > 0)
+    {
+      //Check if the degree is even or odd and check the sign of the leading
+      // coefficient of the polynomial.
+      CGAL_assertion(lead_sign != CGAL::ZERO);
+
+      if (dir_right)
+      {
+        // The target is at x= +oo, thus:
+        if (lead_sign == CGAL::POSITIVE)
+          _info = (_info | TRG_AT_Y_PLUS_INFTY);
+        else
+          _info = (_info | TRG_AT_Y_MINUS_INFTY);
+      }
+      else
+      {
+        // The target is at x= -oo, thus:
+        if ((deg_num % 2 == 0 && lead_sign == CGAL::POSITIVE) ||
+            (deg_num % 2 == 1 && lead_sign == CGAL::NEGATIVE))
+          _info = (_info | TRG_AT_Y_PLUS_INFTY);
+        else
+          _info = (_info | TRG_AT_Y_MINUS_INFTY);
+      }
+    }
+    else
+    {
+      // In the case of a constant polynomial it is possible to set a finite
+      // y-coordinate for the target point.
+      // x coordinate is 0 although in practice is +-oo
+      _pt = Algebraic_point_2(get_rational_function(P, Q, cache), 
+                              Algebraic_real_1());
+    }
+
+    // Mark that the arc is continuous and valid.
+    _info = (_info | IS_CONTINUOUS);
+    _info = (_info | IS_VALID);
+  }
+
+  //---------------------------------------------------------------------------
+  //Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
+  //for x_s <= x if the ray is directed to the right, or
+  //for x_s >= x if it is directed to the left.
+  //param pcoeffs The rational coefficients of the polynomial p(x).
+  //param x_s The x-coordinate of the source point.
+  //param x_t The x-coordinate of the target point.
+  //precondition: The two x-coordinates must not be equal.
+  Base_rational_arc_d_1(const Polynomial_1& P,
+                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+                        const Cache& cache):
+    _info(0)
+  {
+    _init(P,Integer(1), x_s, x_t, cache);
+  }
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs,
+                        const Algebraic_real_1& x_s,const Algebraic_real_1& x_t,
+                        const Cache& cache):
+    _info(0)
+  {    
+    // Set the numerator & denominator polynomials.
+    Polynomial_1 _numer;
+    Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                                 pcoeffs.end()));
+    Integer denom_int;
+    typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int);
+    
+    _init(_numer, denom_int, x_s, x_t, cache);
+  }    
+
+  void _init(const Polynomial_1& P,const Integer& Q_int,
+             const Algebraic_real_1& x_s,const Algebraic_real_1& x_t,
+             const Cache& cache)
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_int));
+    //set rational function 
+    Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int);
+    _f = get_rational_function(P, Q, cache);
+
+    // Compare the x-coordinates and determine the direction.
+    Comparison_result   x_res = CGAL::compare(x_s, x_t);
+
+    CGAL_precondition(x_res != EQUAL);
+
+    if (x_res == SMALLER)
+      _info = (_info | IS_DIRECTED_RIGHT);
+
+    // Set the endpoints.
+    _ps=Algebraic_point_2(_f,x_s);
+    _pt=Algebraic_point_2(_f,x_t);
+    
+    // Mark that the arc is continuous and valid.
+    _info = (_info | IS_CONTINUOUS);
+    _info = (_info | IS_VALID);
+    return;
+  }
+
+  //---------------------------------------------------------------------------
+  //Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
+  //param pcoeffs The rational coefficients of the polynomial p(x).
+  //param qcoeffs The rational coefficients of the polynomial q(x).
+  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
+                        const Cache& cache) :
+    _info(0)
+  {
+    _init(P,Q,cache);
+  }
+
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                        const Cache& cache) :
+    _info(0)
+  {
+    Polynomial_1 _numer;
+    Polynomial_1 _denom;
+    Poly_rat_1 numer_rat(typename
+                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                          pcoeffs.end()));
+    Poly_rat_1 denom_rat(typename
+                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
+                                                          qcoeffs.end()));
+    Integer denom_numer_int,denom_denom_int;
+    typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int);
+    typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int);
+    _numer *= denom_denom_int;
+    _denom *= denom_numer_int;
+
+    _init(_numer,_denom,cache);
+  }
+  void _init(const Polynomial_1& P_, const Polynomial_1& Q_, const Cache& cache) 
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_));
+    //set rational function 
+    // Set the numerator & denominator polynomials.
+
+    Polynomial_1 P;
+    Polynomial_1 Q;
+    _canonicalize(P_, Q_, P, Q);
+                     
+    _f = get_rational_function(P, Q, cache);
+
+    // Mark that the endpoints of the rational functions are unbounded (the
+    // source is at x = -oo and the target is at x = +oo).
+    _info = (_info | SRC_AT_X_MINUS_INFTY);
+    _info = (_info | TRG_AT_X_PLUS_INFTY);
+    _info = (_info | IS_DIRECTED_RIGHT);
+
+    
+    // Analyze the bahaviour of the rational function at x = -oo (the source).
+    Algebraic_real_1          y0;
+    const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0);
+
+    if (inf_s == ARR_BOTTOM_BOUNDARY)
+      _info = (_info | SRC_AT_Y_MINUS_INFTY);
+    else if (inf_s == ARR_TOP_BOUNDARY)
+      _info = (_info | SRC_AT_Y_PLUS_INFTY);
+    else // if (inf_s == ARR_INTERIOR)
+      _ps = Algebraic_point_2();   //the point is a dummy
+    //Analyze the bahaviour of the rational function at x = +oo (the target).
+    const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0);
+
+    if (inf_t == ARR_BOTTOM_BOUNDARY)
+      _info = (_info | TRG_AT_Y_MINUS_INFTY);
+    else if (inf_t == ARR_TOP_BOUNDARY)
+      _info = (_info | TRG_AT_Y_PLUS_INFTY);
+    else // if (inf_t == ARR_INTERIOR)
+      _pt =  Algebraic_point_2();   //the point is a dummy
+
+    // Mark that the arc is valid. As it may have poles, we mark it
+    // as continuous only if the denominator has no roots.
+    _info = ( _info | ( this->_is_continuous() ?
+            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
+  }
+
+  //---------------------------------------------------------------------------
+  //Constructor of a ray of a rational function, defined by y = p(x)/q(x),
+  //for x_s <= x if the ray is directed to the right, or 
+  //for x_s >= x if the ray is directed to the left.
+  //param pcoeffs The rational coefficients of the polynomial p(x).
+  //param qcoeffs The rational coefficients of the polynomial q(x).
+  //param x_s The x-coordinate of the source point.
+  //param dir_right Is the ray directed to the right (to +oo) or to the left
+  //(to -oo).
+  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
+                        const Algebraic_real_1& x_s, bool dir_right,
+                        const Cache& cache) :
+    _info(0)
+  {
+    _init(P, Q, x_s, dir_right, cache);
+  }
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                        const Algebraic_real_1& x_s, bool dir_right,
+                        const Cache& cache) :
+    _info(0)
+  {
+    // Set the numerator and denominator polynomials.
+    Polynomial_1 _numer;
+    Polynomial_1 _denom;
+    Poly_rat_1 numer_rat(typename
+                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                          pcoeffs.end()));
+    Poly_rat_1 denom_rat(typename
+                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
+                                                          qcoeffs.end()));
+    Integer denom_numer_int,denom_denom_int;
+    typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int);
+    typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int);
+    _numer *= denom_denom_int;
+    _denom *= denom_numer_int;
+
+    _init(_numer,_denom, x_s, dir_right, cache);
+  }
+
+  void _init(const Polynomial_1& P_, const Polynomial_1& Q_,
+             const Algebraic_real_1& x_s, bool dir_right,
+             const Cache& cache) 
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_));
+    //set rational function 
+    Polynomial_1 P;
+    Polynomial_1 Q;
+    _canonicalize(P_,Q_,P,Q);
+    _f = get_rational_function(P, Q, cache);
+
+    // Mark that the target points of the polynomial is unbounded.
+    if (dir_right)
+    {
+      _info = (_info | TRG_AT_X_PLUS_INFTY);
+      _info = (_info | IS_DIRECTED_RIGHT);
+    }
+    else
+    {
+      _info = (_info | TRG_AT_X_MINUS_INFTY);
+    }
+
+
+    //The source point has a bounded x-coordinate. 
+    _ps = Algebraic_point_2(_f, x_s);
+    //check if the source point lies next to a pole.
+    if (typename Algebraic_kernel::Sign_at_1()(Q, x_s) != CGAL::ZERO)
+    {
+      // We have a nomral endpoint.
+      //nothing to do....
+    }
+    else
+    {
+      // The y-coodinate is unbounded, but we can set its sign.
+      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_s);
+      const CGAL::Sign sign_s = (dir_right ? signs.second : signs.first);
+
+      _info = (sign_s == CGAL::NEGATIVE) ?
+        (_info | SRC_AT_Y_MINUS_INFTY) : (_info | SRC_AT_Y_PLUS_INFTY);
+    }
+
+    // Set the properties of the target.
+    Algebraic_real_1    y0;
+    Arr_parameter_space inf_t;
+    if (dir_right)
+    {
+      // The target point is at x = +oo.
+      inf_t=_analyze_at_plus_infinity(P, Q, y0);
+    }
+    else
+    {
+      // The target point is at x = -oo.
+      inf_t =_analyze_at_minus_infinity(P, Q, y0);
+    }
+  
+    if (inf_t == ARR_BOTTOM_BOUNDARY) 
+      _info = (_info | TRG_AT_Y_MINUS_INFTY);
+    else if (inf_t == ARR_TOP_BOUNDARY)
+      _info = (_info | TRG_AT_Y_PLUS_INFTY);
+    else // if (inf_t == ARR_INTERIOR)
+      _pt = Algebraic_point_2( ); //the point is a dummy
+
+    // Mark that the arc is valid. As it may have poles, we mark it
+    // as continuous only if the denominator has no roots.
+    _info = ( _info | ( this->_is_continuous() ?
+            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
+  }
+  //---------------------------------------------------------------------------
+  //Constructor of a ray of a rational function, defined by y = p(x)/q(x),
+  //where: x_min <= x <= x_max
+  //param pcoeffs The rational coefficients of the polynomial p(x).
+  //param qcoeffs The rational coefficients of the polynomial q(x).
+  //param x_s The x-coordinate of the source point.
+  //param x_t The x-coordinate of the target point.
+  //precondition: The two x-coordinates must not be equal.
+  Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
+                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+                        const Cache& cache):
+    _info(0)
+  {
+    _init(P, Q, x_s, x_t, cache);
+  }
+
+  Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                        const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+                        const Cache& cache):
+    _info(0)
+  {
+    Polynomial_1 _numer;
+    Polynomial_1 _denom;
+    Poly_rat_1 numer_rat(typename
+                         PT_rat_1::Construct_polynomial()(pcoeffs.begin(),
+                                                          pcoeffs.end()));
+    Poly_rat_1 denom_rat(typename
+                         PT_rat_1::Construct_polynomial()(qcoeffs.begin(),
+                                                          qcoeffs.end()));
+    Integer denom_numer_int,denom_denom_int;
+    typename FT_poly_rat_1::Decompose()(numer_rat,_numer,denom_numer_int);
+    typename FT_poly_rat_1::Decompose()(denom_rat,_denom,denom_denom_int);
+    _numer *= denom_denom_int;
+    _denom *= denom_numer_int;
+
+    _init(_numer,_denom,x_s,x_t,cache);
+  }
+
+  void _init(const Polynomial_1& P_, const Polynomial_1& Q_,
+             const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+             const Cache& cache)
+  {
+    CGAL_precondition(!CGAL::is_zero(Q_));
+    //set rational function 
+    Polynomial_1 P;
+    Polynomial_1 Q;
+    _canonicalize(P_, Q_, P, Q);
+    _f = get_rational_function(P, Q, cache);
+
+    // Compare the x-coordinates and determine the direction.
+    Comparison_result   x_res = CGAL::compare(x_s, x_t);
+    CGAL_precondition(x_res != EQUAL);
+
+    if (x_res == SMALLER)
+      _info = (_info | IS_DIRECTED_RIGHT);
+
+        //Set the source point and check if it lies next to a pole.
+    _ps = Algebraic_point_2(_f, x_s);
+
+    //check if source point lies next to a pole.
+    if (typename Algebraic_kernel::Sign_at_1()(Q,x_s) != CGAL::ZERO)
+    {
+      // We have a nomral endpoint.
+      //nothing to do ..
+    }
+    else
+    {
+      // The y-coodinate is unbounded, but we can set its sign.
+      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_s);
+      const CGAL::Sign sign_s =
+        ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.second : signs.first;
+   
+      if (sign_s == CGAL::NEGATIVE)
+        _info = (_info | SRC_AT_Y_MINUS_INFTY);
+      else
+        _info = (_info | SRC_AT_Y_PLUS_INFTY);
+    }
+
+    //Set the target point and check if it lies next to a pole.
+    _pt=Algebraic_point_2(_f,x_t);
+
+    //check if target point lies next to a pole.
+    if (typename Algebraic_kernel::Sign_at_1()(Q,x_t) != CGAL::ZERO)
+    {
+      // We have a nomral endpoint.
+      //nothing to do ..
+    }
+    else
+    {
+      // The y-coodinate is unbounded, but we can set its sign.
+      std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x_t);
+      const CGAL::Sign sign_t =
+        ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.first : signs.second;
+
+      if (sign_t == CGAL::NEGATIVE)
+        _info = (_info | TRG_AT_Y_MINUS_INFTY);
+      else
+        _info = (_info | TRG_AT_Y_PLUS_INFTY);
+    }
+
+    //Mark that the arc is valid. As it may have poles, we mark it
+    //as continuous only if the denominator has no roots.
+    _info = ( _info | ( this->_is_continuous() ?
+            (IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
+
+  }
+
+  //-----------------------------
+  // Accessing the arc properties
+  //-----------------------------
+ 
+  //-----------------------------------------------------------------
+  //Get the numerator polynomial of the underlying rational function.
+  const Polynomial_1& numerator() const
+  {
+    return(_f.numer());
+  }
+
+  //------------------------------------------------------------------
+  //Get the denominator polynomial of the underlying rational function
+  const Polynomial_1& denominator() const
+  {
+    return(_f.denom());
+  }
+
+  //---------------------------------------------------------
+  //Check if the x-coordinate of the source point is infinite
+  Arr_parameter_space source_parameter_space_in_x() const
+  {
+    return
+      ((_info & SRC_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY :
+      ((_info & SRC_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY :
+      ARR_INTERIOR;
+  }
+
+  //---------------------------------------------------------
+  //Check if the y-coordinate of the source point is infinite
+  Arr_parameter_space source_parameter_space_in_y() const
+  {
+    return
+      ((_info & SRC_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY :
+      ((_info & SRC_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY :
+      ARR_INTERIOR;
+  }
+
+  //---------------------------------------------------------
+  //Check if the x-coordinate of the target point is infinite
+  Arr_parameter_space target_boundary_in_x() const
+  {
+    return
+      ((_info & TRG_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY :
+      ((_info & TRG_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY :
+      ARR_INTERIOR;
+  }
+
+  //---------------------------------------------------------
+  //Check if the y-coordinate of the target point is infinite
+  Arr_parameter_space target_boundary_in_y() const
+  {
+    return ((_info & TRG_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY :
+      ((_info & TRG_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY :
+      ARR_INTERIOR;
+  }
+
+  //--------------------
+  //Get the source point
+  const Algebraic_point_2& source() const
+  {
+    CGAL_precondition((_info & IS_VALID) != 0 &&
+                      source_parameter_space_in_x() == ARR_INTERIOR &&
+                      source_parameter_space_in_y() == ARR_INTERIOR);
+    return (_ps);
+  }
+
+  //----------------------------------------
+  //Get the x-coordinate of the source point
+  Algebraic_real_1 source_x() const
+  {
+    CGAL_precondition((_info & IS_VALID) != 0 &&
+                      source_parameter_space_in_x() == ARR_INTERIOR);
+    return (_ps.x());
+  }
+
+  //----------------------------------------
+  //Get the y-coordinate of the source point
+  //TODO: should we eliminate the function???
+  //Algebraic source_y () const
+  //{
+  // CGAL_precondition ((_info & IS_VALID) != 0 &&
+  //        source_parameter_space_in_y() == ARR_INTERIOR);
+  // return (_ps.y());
+  //}
+
+  //--------------------
+  //Get the target point
+  const Algebraic_point_2& target() const
+  {
+    CGAL_precondition((_info & IS_VALID) != 0 &&
+                      target_boundary_in_x() == ARR_INTERIOR &&
+                      target_boundary_in_y() == ARR_INTERIOR);
+    return (_pt);
+  }
+
+  //----------------------------------------
+  //Get the x-coordinate of the target point
+  Algebraic_real_1 target_x() const
+  {
+    CGAL_precondition((_info & IS_VALID) != 0 &&
+                      target_boundary_in_x() == ARR_INTERIOR);
+    return (_pt.x());
+  }
+
+  //----------------------------------------
+  //Get the y-coordinate of the target point
+  //TODO: should we eliminate the function???
+  //Algebraic target_y () const
+  //{
+  // CGAL_precondition ((_info & IS_VALID) != 0 &&
+  //        target_boundary_in_y() == ARR_INTERIOR);
+  // return (_pt.y());
+  //}
+
+  //-------------------------------------------------------
+  //Check if the x-coordinate of the left point is infinite
+  Arr_parameter_space left_parameter_space_in_x() const
+  {
+    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
+      source_parameter_space_in_x() : target_boundary_in_x();
+  }
+
+  //-------------------------------------------------------
+  //Check if the y-coordinate of the left point is infinite
+  Arr_parameter_space left_parameter_space_in_y() const
+  {
+    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
+      source_parameter_space_in_y() : target_boundary_in_y();
+  }
+  //--------------------------------------------------------
+  //Check if the x-coordinate of the right point is infinite
+  Arr_parameter_space right_parameter_space_in_x() const
+  {
+    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
+      target_boundary_in_x() : source_parameter_space_in_x();
+  }
+
+  //--------------------------------------------------------
+  //Check if the y-coordinate of the right point is infinite
+  Arr_parameter_space right_parameter_space_in_y() const
+  {
+    return ((_info & IS_DIRECTED_RIGHT) != 0) ?
+      target_boundary_in_y() : source_parameter_space_in_y();
+  }
+
+  //------------------------------------
+  //Get the x_value of the left endpoint
+  const Algebraic_real_1& left_x() const
+  {
+    CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR);
+    return ((_info & IS_DIRECTED_RIGHT) ? _ps.x() : _pt.x());
+  }
+
+  //------------------------------------
+  //Get the x_value of the right endpoint
+  const Algebraic_real_1& right_x() const
+  {
+    CGAL_precondition((_info & IS_VALID) != 0 &&
+        right_parameter_space_in_x() == ARR_INTERIOR );
+    return ((_info & IS_DIRECTED_RIGHT) ? _pt.x() : _ps.x());
+  }
+  //---------------------
+  //Get the left endpoint
+  const Algebraic_point_2& left() const
+  {
+    CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR &&
+        left_parameter_space_in_y() == ARR_INTERIOR);
+    return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt);
+  }
+
+  //----------------------
+  //Get the right endpoint
+  const Algebraic_point_2& right() const
+  {
+    CGAL_precondition(right_parameter_space_in_x() == ARR_INTERIOR &&
+        right_parameter_space_in_y() == ARR_INTERIOR);
+    return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps);
+  }
+
+  //-------------------------
+  //Check if the arc is valid
+  bool is_valid() const
+  {
+    return ((_info & IS_VALID) != 0);
+  }
+
+  //------------------------------
+  //Check if the arc is continuous
+  bool is_continuous() const
+  {
+    return ((_info & IS_CONTINUOUS) != 0);
+  }
+
+  //----------------------------------
+  //Check if the arc is directed right
+  bool is_directed_right() const
+  {
+    return ((_info & IS_DIRECTED_RIGHT) != 0);
+  }
+
+  //--------------
+  //name Modifiers
+  //---------------
+
+  //--------------------------------
+  //Mark the arc as being continuous
+  void set_continuous()
+  {
+    _info = (_info | IS_CONTINUOUS);
+  }
+
+  //-----------------------------
+  //Mark the arc as being invalid
+  void set_invalid()
+  {
+    _info = (_info & ~IS_VALID);
+  }
+
+//   bool is_intersecting(Self& arc)
+//   {
+//     Arr_parameter_space left_parameter_space = ( (left_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.left_parameter_space_in_x() != ARR_INTERIOR) ) ?
+//       ARR_LEFT_BOUNDARY :
+//       ARR_INTERIOR;
+//     Arr_parameter_space right_parameter_space = ( (right_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.right_parameter_space_in_x()!= ARR_INTERIOR) ) ?
+//       ARR_RIGHT_BOUNDARY :
+//       ARR_INTERIOR;
+//     Algebraic_real_1 left,right;
+//     if (left_parameter_space == ARR_INTERIOR)
+//       left = 
+//         (left_parameter_space_in_x()!= ARR_INTERIOR)     ? arc.left_x():
+//         (arc.left_parameter_space_in_x()!= ARR_INTERIOR) ? left_x() :
+//         (arc.left_x() < left_x())                 ? left_x() :
+//         arc.left_x();
+//     if (right_parameter_space == ARR_INTERIOR)
+//       right = (right_parameter_space_in_x()!= ARR_INTERIOR)  ? arc.right_x():
+//         (arc.right_parameter_space_in_x()!= ARR_INTERIOR) ? right_x() :
+//         (arc.right_x() < right_x())     ? right_x() :
+//         arc.right_x();
+//     if (left > right)
+//       return false;
+  
+//     //check if the base functions are equal
+//     if (_has_same_base (arc))
+//       return true;
+//     Rational_function_pair rat_pair = get_rational_pair(get_rational_function(this->_numer,this->_denom),
+//         get_rational_function(arc._numer,arc._denom));
+//     return rat_pair.is_intersecting_in_range(left_parameter_space,left,right_parameter_space,right);
+//   }
+  
+  //--------------------------------------------------------
+  //Split the arc into two at a given pole. 
+  //The function returns the sub-arc to the left of the pole 
+  //and sets (*this) to be the right sub-arc.
+  //param x0 The x-coordinate of the pole.
+  //precondition x0 lies in the interior of the arc.
+  //return The sub-arc to the left of the pole.
+   
+  Self split_at_pole(const Algebraic_real_1& x0)
+  {
+    // Analyze the behaviour of the function near the given pole.
+    const std::pair<CGAL::Sign, CGAL::Sign>  signs = _analyze_near_pole(x0);
+    const CGAL::Sign    sign_left = signs.first;
+    const CGAL::Sign    sign_right = signs.second;
+
+    // Create a fictitious point that represents the x-coordinate of the pole.
+    Algebraic_point_2 p0(_f, x0);
+
+    // Make a copy of the current arc.
+    Self       c1 = *this;
+
+    // Split the arc, such that c1 lies to the left of the pole and (*this)
+    // to its right.
+    if ((_info & IS_DIRECTED_RIGHT) != 0)
+    {
+      c1._pt = p0;
+      c1._info = (c1._info & ~TRG_INFO_BITS);
+      if (sign_left == CGAL::NEGATIVE)
+        c1._info = (c1._info | TRG_AT_Y_MINUS_INFTY);
+      else
+        c1._info = (c1._info | TRG_AT_Y_PLUS_INFTY);
+
+      this->_ps = p0;
+      this->_info = (this->_info & ~SRC_INFO_BITS);
+      if (sign_right == CGAL::NEGATIVE)
+        this->_info = (this->_info | SRC_AT_Y_MINUS_INFTY);
+      else
+        this->_info = (this->_info | SRC_AT_Y_PLUS_INFTY);
+    }
+    else
+    {
+      c1._ps = p0;
+      c1._info = (c1._info & ~SRC_INFO_BITS);
+      if (sign_left == CGAL::NEGATIVE)
+        c1._info = (c1._info | SRC_AT_Y_MINUS_INFTY);
+      else
+        c1._info = (c1._info | SRC_AT_Y_PLUS_INFTY);
+  
+      this->_pt = p0;
+      this->_info = (this->_info & ~TRG_INFO_BITS);
+      if (sign_right == CGAL::NEGATIVE)
+        this->_info = (this->_info | TRG_AT_Y_MINUS_INFTY);
+      else
+        this->_info = (this->_info | TRG_AT_Y_PLUS_INFTY);
+    }
+
+    // Mark the sub-arc c1 as continuous.
+    c1._info = (c1._info | IS_CONTINUOUS);
+
+    return (c1);
+  }
+  
+  //---------------
+  //name Predicates
+  //---------------
+ 
+
+  //---------------------------------------------------------------------------
+  //Get the relative position of the point with respect to the rational arc.
+  //param p The query point.
+  //precondition: p is in the x-range of the arc.
+  //    both p's supporting curve and the rational arc are continous
+  //return SMALLER if the point is below the arc;
+  //       LARGER if the point is above the arc;
+  //       EQUAL if p lies on the arc.
+  Comparison_result point_position(const Algebraic_point_2& p,
+                                   const Cache& cache) const
+  {
+    // Make sure that p is in the x-range of the arc and check whether it
+    // has the same x-coordinate as one of the endpoints.
+    CGAL_precondition(is_continuous());
+    CGAL_precondition(_is_in_true_x_range(p.x()));
+    if (p.rational_function() == _f)
+      return EQUAL;
+    Rational_function_pair rat_pair(get_rational_pair(p.rational_function(), _f,
+                                                      cache));
+    return rat_pair.compare_f_g_at(p.x());
+  }
+  //---------------------------------------------------------------------------
+  //Compare the x-coordinate of a vertical asymptote of the arc 
+  //(one of its ends) and the given point.
+  Comparison_result compare_end(Arr_curve_end ce,
+                                const Algebraic_point_2& p) const
+  {
+    Algebraic_real_1 x0;
+
+    if (ce == ARR_MIN_END) {
+      CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR &&
+                     left_parameter_space_in_y() != ARR_INTERIOR);
+      if ((_info & IS_DIRECTED_RIGHT) != 0)
+        x0 = _ps.x();
+      else
+        x0 = _pt.x();
+    }
+    else
+    {
+      CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR &&
+                     right_parameter_space_in_y() != ARR_INTERIOR);
+      if ((_info & IS_DIRECTED_RIGHT) != 0)
+        x0 = _pt.x();
+      else
+        x0 = _ps.x();
+    }
+
+    // Compare the x-coordinates.
+    const Comparison_result  res = CGAL::compare(x0, p.x());
+
+    if (res != EQUAL)
+      return (res);
+
+    return ((ce == ARR_MIN_END) ?  LARGER : SMALLER);
+  }
+  
+  //------------------------------------------------------------------
+  //Compare the x-coordinate of a vertical asymptotes of the two arcs.
+  //approaching from the same direction
+  Comparison_result compare_near_end(const Self& arc, Arr_curve_end ce,
+                                     const Cache& cache) const
+  {
+    CGAL_precondition_code(
+      if (ce == ARR_MIN_END)
+      {
+        CGAL_precondition(this->left_parameter_space_in_y() != ARR_INTERIOR);
+        CGAL_precondition(arc.left_parameter_space_in_y() != ARR_INTERIOR);
+        CGAL_precondition(this->left_parameter_space_in_y() ==
+                          arc.left_parameter_space_in_y());
+      }
+      else // (ce == ARR_MAX_END)
+      {
+        CGAL_precondition(this->right_parameter_space_in_y() != ARR_INTERIOR);
+        CGAL_precondition(arc.right_parameter_space_in_y() != ARR_INTERIOR);
+        CGAL_precondition(this->right_parameter_space_in_y() ==
+                          arc.right_parameter_space_in_y());
+      }
+      );
+
+    // Get the x-coordinates of the vertical asymptote.
+    Algebraic_real_1 x((ce == ARR_MIN_END)? this->left_x() : this->right_x());
+    CGAL_assertion(CGAL::compare(x, (ce == ARR_MIN_END)?
+                                 arc.left_x () : arc.right_x()) == EQUAL);
+
+    //both arcs have vertical asymptotes and come from the same side of the
+    //x-axis compare value of functions close to the root on the correct side
+    if (_has_same_base(arc))
+      return CGAL::EQUAL;
+    Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache);
+    
+    CGAL::Comparison_result comp_f_g_y =
+      rat_pair.compare_f_g_at(x,ce == ARR_MAX_END ?
+                              CGAL::NEGATIVE : CGAL::POSITIVE);
+    if (ce == ARR_MAX_END)
+    {
+      return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
+        comp_f_g_y : -comp_f_g_y;
+    }
+    else
+    {
+      return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
+        -comp_f_g_y : comp_f_g_y;
+    }
+  }
+
+  //------------------------------------------------------------------
+  //Compare the x-coordinate of a vertical asymptotes of the two arcs.   
+  Comparison_result compare_ends(Arr_curve_end ind1,const Self& arc, 
+                                 Arr_curve_end ind2, const Cache& cache) const
+  {
+    // Get the x-coordinates of the first vertical asymptote.
+    Algebraic_real_1             x1;
+
+    if (ind1 == ARR_MIN_END)
+    {
+      CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR &&
+                     left_parameter_space_in_y() != ARR_INTERIOR);
+      if ((_info & IS_DIRECTED_RIGHT) != 0)
+        x1 = _ps.x();
+      else
+        x1 = _pt.x();
+    }
+    else
+    {
+      CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR &&
+                     right_parameter_space_in_y() != ARR_INTERIOR);
+      if ((_info & IS_DIRECTED_RIGHT) != 0)
+        x1 = _pt.x();
+      else
+        x1 = _ps.x();
+    }
+
+    // Get the x-coordinates of the second vertical asymptote.
+    Algebraic_real_1                x2;
+
+    if (ind2 == ARR_MIN_END)
+    {
+      CGAL_assertion(arc.left_parameter_space_in_x() == ARR_INTERIOR &&
+                     arc.left_parameter_space_in_y() != ARR_INTERIOR);
+      if ((arc._info & IS_DIRECTED_RIGHT) != 0)
+        x2 = arc._ps.x();
+      else
+        x2 = arc._pt.x();
+    }
+    else
+    {
+      CGAL_assertion(arc.right_parameter_space_in_x() == ARR_INTERIOR &&
+                     arc.right_parameter_space_in_y() != ARR_INTERIOR);
+      if ((arc._info & IS_DIRECTED_RIGHT) != 0)
+        x2 = arc._pt.x();
+      else
+        x2 = arc._ps.x();
+    }
+
+    // Compare the x-coordinates. In case they are not equal we are done.
+    const Comparison_result  res = CGAL::compare(x1, x2);
+
+    if (res != EQUAL)
+      return (res);
+
+    // If the x-coordinates of the asymptote are equal, but one arc is
+    // defined to the left of the vertical asymptote and the other to its
+    // right, we can easily determine the comparison result.
+    if (ind1 == ARR_MAX_END && ind2 == ARR_MIN_END)
+      return (SMALLER);
+    else if (ind1 == ARR_MIN_END && ind2 == ARR_MAX_END)
+      return (LARGER);
+
+    //both arcs have vertical asymptotes and come from the same side of the x-axis
+    //compare value of functions close to the root on the correct side
+    if (_has_same_base(arc))
+      return CGAL::EQUAL;
+    Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache);
+    
+    CGAL::Comparison_result comp_f_g_y =
+      rat_pair.compare_f_g_at(x1, ind1 == ARR_MAX_END ?
+                              CGAL::NEGATIVE : CGAL::POSITIVE);
+    if( ind1 == ARR_MAX_END)
+    {
+      CGAL_postcondition(ind2 == ARR_MAX_END); 
+      CGAL_postcondition(right_parameter_space_in_y() ==
+                         arc.right_parameter_space_in_y());
+      return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
+        comp_f_g_y : -comp_f_g_y;
+    }
+    else
+    {
+      CGAL_postcondition(ind2 == ARR_MIN_END); 
+      CGAL_postcondition(left_parameter_space_in_y() ==
+                         arc.left_parameter_space_in_y());
+      return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ?
+        -comp_f_g_y : comp_f_g_y;
+    }
+  }
+
+  //------------------------------------------------------------------
+  // Compare the slopes of the arc with another given arc 
+  // at their given intersection point.
+  // param cv The given arc.
+  // param p The intersection point.
+  // param mult Output: The mutiplicity of the intersection point.
+  // return SMALLER if (*this) slope is less than cv's;
+  //      EQUAL if the two slopes are equal;
+  //         LARGER if (*this) slope is greater than cv's.
+  //Comparison_result compare_slopes (const Self& arc,const Algebraic_point_2& p,unsigned int& mult) const
+  //
+  // deleted!!!
+
+  //------------------------------------------------------------------
+  // Compare the two arcs at a given intersection point 
+  // param arc The given arc
+  // param p  The intersection point
+  // param to_left to check to the left or to the right of intersection point
+  // precondition: Both arcs intersect at p
+  // return SMALLER if (*this) lies below the other arc;
+  //   EQUAL if the two supporting functions are equal;
+  //   LARGER if (*this) lies above the other arc.
+
+  Comparison_result compare_at_intersection(const Self& arc,
+                                            const Algebraic_point_2& p,
+                                            bool to_left, const Cache& cache) const
+  {
+    CGAL_precondition(this->point_position(p,cache) == CGAL::EQUAL &&
+                      arc.point_position(p,cache)   == CGAL::EQUAL);
+
+    //check if the base functions are equal
+    if (_has_same_base(arc))
+      return CGAL::EQUAL;
+
+    Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f,cache);
+    return rat_pair.compare_f_g_at(p.x(),
+                                   to_left ? CGAL::SMALLER : CGAL::LARGER);
+  }
+
+  //------------------------------------------------------------------
+  // Compare the two arcs at x = -oo.
+  // param arc The given arc
+  // precondition: Both arcs have a left end which is unbounded in x.
+  // return SMALLER if (*this) lies below the other arc;
+  //   EQUAL if the two supporting functions are equal;
+  //   LARGER if (*this) lies above the other arc.
+
+  Comparison_result compare_at_minus_infinity(const Self& arc,
+                                              const Cache& cache) const
+  {
+    CGAL_precondition(left_parameter_space_in_x() == ARR_LEFT_BOUNDARY &&
+                      arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY);
+
+    //check if the base functions are equal
+    if (_has_same_base(arc))
+      return CGAL::EQUAL;
+
+    Rational_function_pair rat_pair =
+      get_rational_pair(this->_f, arc._f, cache);
+    return rat_pair.compare_f_g_at(ARR_LEFT_BOUNDARY);
+  }
+
+  //------------------------------------------------------------------
+  //Compare the two arcs at x = +oo.
+  //param arc The given arc.
+  //pre Both arcs are have a right end which is unbounded in x.
+  //return SMALLER if (*this) lies below the other arc;
+  //       EQUAL if the two supporting functions are equal;
+  //       LARGER if (*this) lies above the other arc.
+
+  Comparison_result compare_at_plus_infinity(const Self& arc,
+                                             const Cache& cache) const
+  {
+    CGAL_precondition(right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY &&
+                      arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY);
+
+    //check if the base functions are equal
+    if (_has_same_base(arc))
+      return CGAL::EQUAL;
+
+    Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f, cache);
+    return rat_pair.compare_f_g_at(ARR_RIGHT_BOUNDARY);
+  }
+
+  //----------------------------------------------------------
+  // Check whether the two arcs are equal (have the same graph).
+  //param arc The compared arc.
+  //return true if the two arcs have the same graph; false otherwise.
+  bool equals(const Self& arc) const
+  {
+    // The two arc must have the same base rational function.
+    CGAL_precondition(is_valid());
+    CGAL_precondition(arc.is_valid());
+    if (! _has_same_base(arc))
+      return false;
+
+    // Check that the arc left endpoints are the same.
+    Arr_parameter_space inf1 = left_parameter_space_in_x();
+    Arr_parameter_space inf2 = arc.left_parameter_space_in_x();
+
+    if (inf1 != inf2)
+      return false;
+
+    if (inf1 == ARR_INTERIOR)
+    {
+      inf1 = left_parameter_space_in_y();
+      inf2 = arc.left_parameter_space_in_y();
+
+      if (inf1 != inf2)
+        return false;
+    }
+
+    if (inf1 == ARR_INTERIOR &&
+        CGAL::compare(left().x(), arc.left().x()) != EQUAL)
+    {
+      return false;
+    }
+
+    // Check that the arc right endpoints are the same.
+    inf1 = right_parameter_space_in_x();
+    inf2 = arc.right_parameter_space_in_x();
+
+    if (inf1 != inf2)
+      return false;
+
+    if (inf1 == ARR_INTERIOR)
+    {
+        inf1 = right_parameter_space_in_y();
+        inf2 = arc.right_parameter_space_in_y();
+
+        if (inf1 != inf2)
+          return false;
+    }
+
+    if (inf1 == ARR_INTERIOR &&
+        CGAL::compare(right().x(), arc.right().x()) != EQUAL)
+      return false;
+
+    // If we reached here, the two arc are equal:
+    return true;
+  }
+
+  //----------------------------------------------------------
+  //Check whether it is possible to merge the arc with the given arc.
+  //param arc The query arc.
+  //return true if it is possible to merge the two arcs;
+  //   false otherwise.
+  bool can_merge_with(const Self& arc) const
+  {
+    // In order to merge the two arcs, they should have the same base
+    // rational function.
+    CGAL_precondition(is_valid());
+    CGAL_precondition(arc.is_valid());
+    if (! _has_same_base(arc))
+      return false;
+
+    // Check if the left endpoint of one curve is the right endpoint of
+    // the other.
+
+    return ((right_parameter_space_in_x() == ARR_INTERIOR &&
+             right_parameter_space_in_y() == ARR_INTERIOR &&
+             arc.left_parameter_space_in_x() == ARR_INTERIOR &&
+             arc.left_parameter_space_in_y() == ARR_INTERIOR &&
+             //CGAL::equal(right_x() ,arc.left_x() )) ||
+             (right_x() == arc.left_x() )) ||
+            (left_parameter_space_in_x() == ARR_INTERIOR &&
+             left_parameter_space_in_y() == ARR_INTERIOR &&
+             arc.right_parameter_space_in_x() == ARR_INTERIOR &&
+             arc.right_parameter_space_in_y() == ARR_INTERIOR &&
+             //CGAL::equal(left_x(), arc.right_x())));  
+             (left_x() == arc.right_x())));  
+  }
+  //------------------------------------
+  //Constructions of points and curves
+  //------------------------------------
+
+  //------------------------------------
+  // Flip the arc (swap its source and target).
+  // return The flipped arc.
+  Self flip() const
+  {
+    CGAL_precondition(is_valid());
+
+    // Create the flipped arc.
+    Self   arc;
+
+    arc._f = _f;
+    arc._ps = _pt;
+    arc._pt = _ps;
+
+    // Manipulate the information bits.
+    int    src_info = (_info & SRC_INFO_BITS);
+    int    trg_info = (_info & TRG_INFO_BITS);
+    arc._info = (src_info << 4) | (trg_info >> 4) | IS_VALID;
+
+    if ((_info & IS_DIRECTED_RIGHT) == 0)
+      arc._info = (arc._info | IS_DIRECTED_RIGHT);
+
+    if ((_info & IS_CONTINUOUS) != 0)
+      arc._info = (arc._info | IS_CONTINUOUS);
+     
+    return (arc);
+  }
+
+  //------------------------
+  // Print the rational arc.
+  std::ostream& print(std::ostream& os) const
+  {    
+    // Print y as a rational function of x.
+    os << "y = (";    
+    Base_rational_arc_ds_1::print_polynomial(os, this->numerator(), 'x');
+    os << ") / (";
+    Base_rational_arc_ds_1::print_polynomial(os, this->denominator(), 'x');
+    os << ") on ";
+
+    // Print the definition range.
+    Arr_parameter_space      inf_x = source_parameter_space_in_x();
+    if (inf_x == ARR_LEFT_BOUNDARY) 
+      os << "(-oo";
+    else if (inf_x == ARR_RIGHT_BOUNDARY)
+      os << "(+oo";
+    else if (source_parameter_space_in_y() != ARR_INTERIOR)
+      os << '(' << CGAL::to_double(source_x());
+    else
+      os << '[' << CGAL::to_double(source().x());
+
+    os << ", ";
+
+    inf_x = target_boundary_in_x();
+    if (inf_x == ARR_LEFT_BOUNDARY) 
+      os << "-oo)";
+    else if (inf_x == ARR_RIGHT_BOUNDARY)
+      os << "+oo)";
+    else if (target_boundary_in_y() != ARR_INTERIOR)
+      os << CGAL::to_double(target_x()) << ')';
+    else
+      os << CGAL::to_double(target().x()) << ']';
+
+    return (os);
+  }
+
+protected:
+
+ 
+  //-------------------------------
+  //Auxiliary (protected) functions.
+  //-------------------------------
+
+  //--------------------------------------------------------------------------
+  // Cannonicalize numerator and denominator such that:
+  //  There are no common devisor
+  //  If negative sign exists, it is in the numerator
+  void _canonicalize(const Polynomial_1& P,const Polynomial_1& Q,
+                     Polynomial_1& P_new  ,Polynomial_1& Q_new)
+  {
+    Polynomial_1 gcd = CGAL::gcd(P,Q);
+    if (gcd != 1)
+    {
+      P_new=CGAL::integral_division(P,gcd);
+      Q_new=CGAL::integral_division(Q,gcd);
+    }
+    else
+    {
+      P_new=P;
+      Q_new=Q;
+    }
+
+    if (typename AT_poly::Unit_part()(Q_new) == -1) //leading coefficient sign
+    {
+      P_new*=-1;
+      Q_new*=-1;
+    }
+    return;
+  }
+  
+  //--------------------------------------------------------------------------
+  // Check if the given x-value is in the x-range of the arc.
+  // param x The x-value.
+  // param eq_src Output: Is this value equal to the x-coordinate of the
+  //                       source point.
+  // param eq_trg Output: Is this value equal to the x-coordinate of the
+  //                       target point.
+   
+  bool _is_in_x_range(const Algebraic_real_1& x, bool& eq_src,
+                      bool& eq_trg) const
+  {
+    Comparison_result  res1;
+
+    eq_src = eq_trg = false;
+    if ((_info & IS_DIRECTED_RIGHT) != 0)
+    {
+      // Compare to the left endpoint (the source in this case).
+      if ((_info & SRC_AT_X_MINUS_INFTY) != 0)
+      {
+        res1 = LARGER;
+      }
+      else
+      {
+        res1 = CGAL::compare(x, _ps.x());
+
+        if (res1 == SMALLER)
+          return false;
+         
+        if (res1 == EQUAL)
+        {
+          eq_src = true;
+          return true;
+        }
+      }
+       
+      // Compare to the right endpoint (the target in this case).
+      if ((_info & TRG_AT_X_PLUS_INFTY) != 0)
+        return true;
+
+      const Comparison_result  res2 = CGAL::compare(x, _pt.x());
+       
+      if (res2 == LARGER)
+        return false;
+        
+      if (res2 == EQUAL)
+        eq_trg = true;
+
+      return true;
+    }
+     
+    // Compare to the left endpoint (the target in this case).
+    if ((_info & TRG_AT_X_MINUS_INFTY) != 0)
+    {
+      res1 = LARGER;
+    }
+    else
+    {
+      res1 = CGAL::compare(x, _pt.x());
+
+      if (res1 == SMALLER)
+        return false;
+         
+      if (res1 == EQUAL)
+      {
+        eq_trg = true;
+        return true;
+      }
+    }
+       
+    // Compare to the right endpoint (the source in this case).
+    if ((_info & SRC_AT_X_PLUS_INFTY) != 0)
+      return true;
+
+    const Comparison_result  res2 = CGAL::compare(x, _ps.x());
+       
+    if (res2 == LARGER)
+      return false;
+        
+    if (res2 == EQUAL)
+      eq_src = true;
+     
+    return true;
+  }
+
+  //----------------------------------------------------------
+  // Check if the given x-value is in the x-range of the arc, 
+  // excluding its open ends.
+  bool _is_in_true_x_range(const Algebraic_real_1& x) const
+  {
+    bool          eq_src, eq_trg;
+    const bool    is_in_x_range_closure = _is_in_x_range(x, eq_src, eq_trg);
+
+    if (! is_in_x_range_closure)
+      return false;
+
+    // Check if we have a vertical asymptote at the source point.
+    if (eq_src && (_info & (SRC_AT_Y_MINUS_INFTY | SRC_AT_Y_PLUS_INFTY)) != 0)
+      return false;
+
+    // Check if we have a vertical asymptote at the target point.
+    if (eq_trg && (_info & (TRG_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY)) != 0)
+      return false;
+
+    // If we reached here, the value is in the true x-range of the arc.
+    return true;
+  }
+ 
+  //------------------------------------------------------------------------
+  // Check if the underlying rational function is the same in the given arc.
+  //  param arc The given arc.
+  //   return true if arc's underlying rational function is the same
+  //       as of *this; 
+  //   false otherwise.
+
+  bool _has_same_base(const Self& arc) const
+  {
+    return (this->_f == arc._f);
+  }
+  //bool operator == (const Self& arc) const
+  //{
+  //  if (this == &arc)
+  //    return true;
+  //  if ((_info ==arc._info) &&(_has_same_base(arc) ))
+  //    {
+  //      bool same_source(true);
+  //      bool same_target(true);
+  //      if (  (this->source_parameter_space_in_x () == ARR_INTERIOR) && 
+  //          (this->source_parameter_space_in_y () == ARR_INTERIOR) )
+  //        same_source = (this->source() == arc.source());
+  //      if (  (this->target_boundary_in_x () == ARR_INTERIOR) && 
+  //          (this->target_boundary_in_y () == ARR_INTERIOR) )
+  //        same_target = (this->target() == arc.target());
+  //      return (same_source && same_target);
+  //    }
+  //  return false;
+  //}
+
+  //---------------------------------------------------------------------
+  //Compute infinity type of the rational function P(x)/Q(x) at x = -oo.
+  // param y Output: The value of the horizontal asymptote (if exists).
+  // return The infinity type for the y-coordinate at x = -oo.
+
+  Arr_parameter_space _analyze_at_minus_infinity(const Polynomial_1& P,
+                                                 const Polynomial_1& Q,
+                                                 Algebraic_real_1& y) const
+  {
+    // Get the degree of the polynomials.
+    const int    deg_p(CGAL::degree(P));
+    const int    deg_q(CGAL::degree(Q));
+
+    if (deg_p <= 0 || deg_p <= deg_q)
+      {
+        // We have a zero polynomial or a zero asymptote.
+        y = 0;
+        return (ARR_INTERIOR);
+      }
+    // Get the leading coefficients.
+    Integer p_lead(CGAL::leading_coefficient(P));
+    Integer q_lead(CGAL::leading_coefficient(Q));
+
+    if (deg_p == deg_q)
+      {
+        // We have a horizontal asymptote.
+        y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead));
+        return (ARR_INTERIOR);
+      }
+
+    // We have a tendency to infinity.
+    const int    def_diff = deg_p - deg_q;
+
+    return (CGAL::sign(p_lead) == CGAL::sign (q_lead)) ?
+      ((def_diff % 2 == 0) ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY) :
+      ((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
+  }
+
+  //---------------------------------------------------------------------
+  //Compute infinity type of the rational function P(x)/Q(x) at x = +oo.
+  // param y Output: The value of the horizontal asymptote (if exists).
+  // return The infinity type for the y-coordinate at x = +oo.
+
+  Arr_parameter_space _analyze_at_plus_infinity(const Polynomial_1& P,
+                                                const Polynomial_1& Q,
+                                                Algebraic_real_1& y) const
+  {
+    // Get the degree of the polynomials.
+    const int    deg_p(CGAL::degree(P));
+    const int    deg_q(CGAL::degree(Q));
+
+    if (deg_p <= 0 || deg_p <= deg_q)
+      {
+        // We have a zero polynomial or a zero asymptote.
+        y = 0;
+        return (ARR_INTERIOR);
+      }
+
+    // Get the leading coefficients.
+    Integer p_lead(CGAL::leading_coefficient(P));
+    Integer q_lead(CGAL::leading_coefficient(Q));
+     
+    if (deg_p == deg_q)
+      {
+        // We have a horizontal asymptote.
+        y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead));
+        return (ARR_INTERIOR);
+      }
+
+    // We have a tendency to infinity.
+    return (CGAL::sign(p_lead) == CGAL::sign(q_lead)) ?
+      ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY;
+  }
+
+  //---------------------------------------------------------------------
+  //Compute all zeros of the denominator polynomial that lie within the
+  // x-range of the arc
+
+  template <typename OutputIterator>
+  OutputIterator _denominator_roots(OutputIterator oi, bool& root_at_ps,
+                                    bool& root_at_pt) const
+  {
+    root_at_ps = root_at_pt = false;
+
+    if (CGAL::degree(this->denominator()) == 0)
+      return (oi);
+
+    // Compute the roots of the denominator polynomial.
+    std::list<Algebraic_real_1>                    q_roots;
+    bool                                           eq_src, eq_trg;
+    typename std::list<Algebraic_real_1>::const_iterator  x_iter;
+
+    //solve for roots without caring for multiplicity 
+    //hence the usage of the bool var
+
+    std::copy(_f.poles().begin(),_f.poles().end(),std::back_inserter (q_roots));
+  
+    // Go over the roots and check whether they lie in the x-range of the arc.
+    for (x_iter = q_roots.begin(); x_iter != q_roots.end(); ++x_iter)
+    {
+      if (_is_in_x_range (*x_iter, eq_src, eq_trg))
+      {
+        if (eq_src)
+        {
+          root_at_ps = true;
+        }
+        else if (eq_trg)
+        {
+          root_at_pt = true;
+        }
+        else
+        {
+          // The root lies in the interior of the arc.
+          *oi++ = *x_iter;
+        }
+      }
+    }
+
+    return (oi);
+  }
+
+  //---------------------------------------------------------------------
+  // Check whether the arc is continuous. 
+  bool _is_continuous()
+  {
+    // Compute the roots of the denominator polynomial, and make sure
+    // there are none in the range of definition.
+    std::list<Algebraic_real_1>          q_roots;
+    bool                                 root_at_ps, root_at_pt;
+
+    this->_denominator_roots(std::back_inserter(q_roots),
+        root_at_ps, root_at_pt);
+
+    return (q_roots.empty());
+  }
+
+  //---------------------------------------------------------------------
+  //Determine the signs of the rational functions infinitisimally to the left
+  //   and to the right of the given pole.
+  //   param x0 The x-coordinate of the pole.
+  //   pre x0 lies in the interior of the arc.
+  //   return The signs to the left and to the right of x0.
+  std::pair<CGAL::Sign, CGAL::Sign>
+  _analyze_near_pole(const Algebraic_real_1& x0) const
+  {
+    return std::make_pair( _f.sign_at(x0,CGAL::NEGATIVE),
+        _f.sign_at(x0,CGAL::POSITIVE));
+  }
+
+  //---------------------------------------------------------------------
+  // Print a polynomial nicely.
+
+  //std::ostream& _print_polynomial (std::ostream& os,
+  //    const Polynomial_1& poly,
+  //    char var) const
+  //{
+  //  // Get the degree.
+  //  const int    deg = CGAL::degree(poly);
+  // 
+  //  Integer     coeff;
+  //  CGAL::Sign  sgn;
+  //  int         k;
+
+  //  if (deg < 0)
+  //    {
+  //      os << '0';
+  //      return (os);
+  //    }
+
+  //  for (k = deg; k >= 0; k--)
+  //    { 
+  //      //coeff = pt::Get_coefficient()(poly, k);
+  //      coeff = CGAL::get_coefficient(poly, k);
+  //
+  //      if (k == deg)
+  //        os << coeff;
+  //      else if ((sgn = CGAL::sign (coeff)) == POSITIVE)
+  //        os << " + " << coeff;
+  //      else if (sgn == NEGATIVE)
+  //        os << " - " << -coeff;
+  //      else
+  //        continue;
+  //   
+  //      if (k > 1)
+  //        os << '*' << var << '^' << k;
+  //      else if (k == 1)
+  //        os << '*' << var;
+  //    }
+
+  //  return (os);
+  //}
+
+};
+
+//-------------------------------
+//! Exporter for rational arcs.
+template <typename Algebraic_kernel_>
+std::ostream& operator<<(std::ostream& os, 
+                         const Base_rational_arc_d_1<Algebraic_kernel_> & arc)
+{
+  return (arc.print(os));
+}
+
+/*! \class Continuous_rational_arc_d_1
+ * Representation of a continuous portion of a rational function.
+ */
+template <typename Algebraic_kernel_>
+class Continuous_rational_arc_d_1:
+    public Base_rational_arc_d_1<Algebraic_kernel_>
+{
+public:
+  bool is_left_to_right() const
+  { return (this->_info && Base::IS_DIRECTED_RIGHT); }
+
+public:
+  typedef Algebraic_kernel_                             Algebraic_kernel;
+  
+  typedef Continuous_rational_arc_d_1<Algebraic_kernel> Self;
+  typedef Base_rational_arc_d_1<Algebraic_kernel>       Base;
+
+  typedef typename Base::Integer                        Integer;
+  typedef typename Base::Rational                       Rational; 
+  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
+  typedef typename Base::Algebraic_point_2              Algebraic_point_2;
+  typedef typename Base::Polynomial_1                   Polynomial_1;
+  typedef typename Base::Multiplicity                   Multiplicity;
+  typedef typename Base::Rational_function              Rational_function;
+  typedef typename Base::Rational_function_pair         Rational_function_pair;
+
+  typedef typename Base::Rat_vector                     Rat_vector;
+  typedef typename Base::Algebraic_vector               Algebraic_vector;
+  typedef typename Base::Multiplicity_vector            Multiplicity_vector;
+
+  typedef typename Base::Cache                          Cache;
+
+  typedef std::pair<Algebraic_point_2, Multiplicity>    Intersection_point_2;
+  //typedef std::pair<Algebraic_point_2, unsigned int>  Intersection_point_2;
+
+
+  /// \name Constrcution methods.
+  //@{
+
+  /*!
+   * Default constructor.
+   */
+  Continuous_rational_arc_d_1() :
+    Base()
+  {}
+
+  /*!
+   * Constrcutor from a base arc.
+   */
+  Continuous_rational_arc_d_1(const Base& arc) :
+    Base(arc)
+  {
+    CGAL_precondition(arc.is_continuous());
+  }
+
+  /*!
+   * Constructor of a whole polynomial curve.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
+    Base(P, cache)
+  {}
+
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
+    Base(pcoeffs, cache)
+  {}
+
+  /*!
+   * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
+   * ray is directed to the right, or for x_s >= x if it is directed to the
+   * left.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param dir_right Is the ray directed to the right (to +oo)
+   *                  or to the left (to -oo).
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P,
+                              const Algebraic_real_1& x_s, 
+                              bool dir_right, const Cache& cache) :
+    Base(P, x_s, dir_right,cache)
+  {}
+
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
+                              const Algebraic_real_1& x_s, 
+                              bool dir_right, const Cache& cache) :
+    Base(pcoeffs, x_s, dir_right,cache)
+  {}
+
+
+  /*!
+   * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param x_t The x-coordinate of the target point.
+   * \pre The two x-coordinates must not be equal.
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P,
+                              const Algebraic_real_1& x_s,
+                              const Algebraic_real_1& x_t, const Cache& cache) :
+    Base(P, x_s, x_t,cache)
+  {}
+
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
+                              const Algebraic_real_1& x_s,
+                              const Algebraic_real_1& x_t, const Cache& cache) :
+    Base(pcoeffs, x_s, x_t,cache)
+  {}
+
+  /*!
+   * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   * \pre The denominator polynomial q(x) does not have any roots.
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q,
+                              const Cache& cache) :
+    Base(P, Q,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
+                              const Rat_vector& qcoeffs, const Cache& cache) :
+    Base(pcoeffs, qcoeffs,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+
+  /*!
+   * Constructor of a ray of a rational function, defined by y = p(x)/q(x),
+   * for x_s <= x if the ray is directed to the right, or for x_s >= x if it
+   * is directed to the left.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param dir_right Is the ray directed to the right (to +oo)
+   *                  or to the left (to -oo).
+   * \pre The denominator polynomial q(x) does not have any roots in the
+   *      x-range of definition.
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
+                              const Algebraic_real_1& x_s, bool dir_right,
+                              const Cache& cache) :
+    Base(P, Q, x_s, dir_right,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
+                              const Rat_vector& qcoeffs,
+                              const Algebraic_real_1& x_s, bool dir_right,
+                              const Cache& cache) :
+    Base(pcoeffs, qcoeffs, x_s, dir_right,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+
+  /*!
+   * Constructor of a bounded rational arc, defined by y = p(x)/q(x), 
+   * where: x_min <= x <= x_max.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param x_t The x-coordinate of the target point.
+   * \pre The two x-coordinates must not be equal.
+   * \pre The denominator polynomial q(x) does not have any roots in the
+   *      x-range of definition (x_min, x_max).
+   */
+  Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
+                              const Algebraic_real_1& x_s,
+                              const Algebraic_real_1& x_t,const Cache& cache) :
+    Base(P, Q, x_s, x_t,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+  Continuous_rational_arc_d_1(const Rat_vector& pcoeffs,
+                              const Rat_vector& qcoeffs,
+                              const Algebraic_real_1& x_s,
+                              const Algebraic_real_1& x_t, const Cache& cache) :
+    Base(pcoeffs, qcoeffs, x_s, x_t,cache)
+  {
+    if (!this->_is_continuous())
+    {
+      // Invalid arc, as it is not continuous.
+      this->set_invalid();
+    }
+  }
+
+  //@}
+
+  /// \name Constructions of points and curves.
+  //@{
+      
+  /*!
+   * Compute the intersections with the given arc.
+   * \param arc The given intersecting arc.
+   * \param oi The output iterator.
+   * \return The past-the-end iterator.
+   */
+  template <typename OutputIterator>
+  OutputIterator intersect(const Self& arc, OutputIterator oi,
+                           const Cache& cache) const
+  {
+    CGAL_precondition(this->is_valid() && this->is_continuous());
+    CGAL_precondition(arc.is_valid() && arc.is_continuous());
+
+    if (this->equals(arc))
+    {
+      Self      overlap_arc(*this);
+      *oi++ = make_object(overlap_arc);
+      return (oi);
+    }
+
+    if (this->_has_same_base(arc))
+    {      
+      // Get the left and right endpoints of (*this) and their information
+      // bits.
+      const Algebraic_point_2&   left1 = (this->is_directed_right() ? 
+                                          this->_ps : this->_pt);
+      const Algebraic_point_2&   right1 = (this->is_directed_right() ? 
+                                           this->_pt : this->_ps);
+      int      info_left1, info_right1;
+
+      if (this->is_directed_right())
+      {
+        info_left1 = (this->_info & this->SRC_INFO_BITS);
+        info_right1 = ((this->_info & this->TRG_INFO_BITS) >> 4);
+      }
+      else
+      {
+        info_right1 = (this->_info & this->SRC_INFO_BITS);
+        info_left1 = ((this->_info & this->TRG_INFO_BITS) >> 4);
+      }
+
+      // Get the left and right endpoints of the other arc and their
+      // information bits.
+      const Algebraic_point_2& left2 =
+        (arc.is_directed_right() ? arc._ps : arc._pt);
+      const Algebraic_point_2& right2 =
+        (arc.is_directed_right() ? arc._pt : arc._ps);
+      int      info_left2, info_right2;
+
+      if (arc.is_directed_right())
+      {
+        info_left2 = (arc._info & this->SRC_INFO_BITS);
+        info_right2 = ((arc._info & this->TRG_INFO_BITS) >> 4);
+      }
+      else
+      {
+        info_right2 = (arc._info & this->SRC_INFO_BITS);
+        info_left2 = ((arc._info & this->TRG_INFO_BITS) >> 4);
+      }
+
+      // Locate the left curve-end with larger x-coordinate.
+      bool                 at_minus_infinity = false;
+      Arr_parameter_space  inf_l1 = this->left_parameter_space_in_x();
+      Arr_parameter_space  inf_l2 = arc.left_parameter_space_in_x();
+      Algebraic_point_2    p_left;
+      int                  info_left;
+
+      if (inf_l1 == ARR_INTERIOR && inf_l2 == ARR_INTERIOR)
+      {
+        // Let p_left be the rightmost of the two left endpoints.
+        if (left1.x() > left2.x())
+        {
+          p_left = left1;
+          info_left = info_left1;
+        }
+        else
+        {
+          p_left = left2;
+          info_left = info_left2;
+        }
+      }
+      else if (inf_l1 == ARR_INTERIOR)
+      {
+        // Let p_left be the left endpoint of (*this).
+        p_left = left1;
+        info_left = info_left1;
+      }
+      else if (inf_l2 == ARR_INTERIOR)
+      {
+        // Let p_left be the left endpoint of the other arc.
+        p_left = left2;
+        info_left = info_left2;
+      }
+      else
+      {
+        // Both arcs are defined at x = -oo.
+        at_minus_infinity = true;
+        info_left = info_left1;
+      }
+
+      // Locate the right curve-end with smaller x-coordinate.
+      bool                 at_plus_infinity = false;
+      Arr_parameter_space  inf_r1 = this->right_parameter_space_in_x();
+      Arr_parameter_space  inf_r2 = arc.right_parameter_space_in_x();
+      Algebraic_point_2    p_right;
+      int                  info_right;
+      
+      if (inf_r1 == ARR_INTERIOR && inf_r2 == ARR_INTERIOR)
+      {
+        // Let p_right be the rightmost of the two right endpoints.
+        if (right1.x() < right2.x())
+        {
+          p_right = right1;
+          info_right = info_right1;
+        }
+        else
+        {
+          p_right = right2;
+          info_right = info_right2;
+        }
+      }
+      else if (inf_r1 == ARR_INTERIOR)
+      {
+        // Let p_right be the right endpoint of (*this).
+        p_right = right1;
+        info_right = info_right1;
+      }
+      else if (inf_r2 == ARR_INTERIOR)
+      {
+        // Let p_right be the right endpoint of the other arc.
+        p_right = right2;
+        info_right = info_right2;
+      }
+      else
+      {
+        // Both arcs are defined at x = +oo.
+        at_plus_infinity = true;
+        info_right = info_right2;
+      }
+
+      // Check the case of two bounded (in x) ends.
+      if (! at_minus_infinity && ! at_plus_infinity)
+      {
+        Comparison_result res = CGAL::compare(p_left.x(), p_right.x());
+        if (res == LARGER)
+        {
+          // The x-range of the overlap is empty, so there is no overlap.
+          return (oi);
+        }
+        else if (res == EQUAL)
+        {
+          // We have a single overlapping point. Just make sure this point
+          // is not at y = -/+ oo.
+          if (info_left && 
+              (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0 &&
+              info_right && 
+              (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0)
+          {
+            Intersection_point_2  ip(p_left, 0);
+
+            *oi++ = make_object(ip);
+          }
+
+          return (oi);
+        }
+      }
+
+      // Create the overlapping portion of the rational arc by properly setting
+      // the source (left) and target (right) endpoints and their information
+      // bits.
+      Self      overlap_arc(*this);
+
+      overlap_arc._ps = p_left;
+      overlap_arc._pt = p_right;
+
+      overlap_arc._info = ((info_left) | (info_right << 4) |
+                           this->IS_DIRECTED_RIGHT | this->IS_CONTINUOUS | 
+                           this->IS_VALID);
+
+      *oi++ = make_object(overlap_arc);
+      return (oi);
+    }
+    
+    // We wish to find the intersection points between:
+    //
+    //   y = p1(x)/q1(x)    and     y = p2(x)/q2(x)
+    //
+    // It is clear that the x-coordinates of the intersection points are
+    // the roots of the polynomial: ip(x) = p1(x)*q2(x) - p2(x)*q1(x).
+
+    Rational_function_pair rat_pair =
+      this->get_rational_pair(this->_f, arc._f, cache);
+    
+    typename Algebraic_vector::const_iterator  x_iter;
+    typename Multiplicity_vector::const_iterator  m_iter;
+
+    // Go over the x-values we obtained. For each value produce an
+    // intersection point if it is contained in the x-range of both curves.
+    CGAL_precondition(rat_pair.roots().size() ==
+                      rat_pair.multiplicities().size());
+    for (x_iter = rat_pair.roots().begin(),
+           m_iter = rat_pair.multiplicities().begin();
+         x_iter != rat_pair.roots().end();
+         ++x_iter, ++m_iter)
+    {
+      if (this->_is_in_true_x_range(*x_iter) && arc._is_in_true_x_range(*x_iter))
+      {
+        // Compute the intersection point and obtain its multiplicity.
+        Algebraic_point_2   p(this->_f, *x_iter);
+        // Output the intersection point:
+        Intersection_point_2  ip(p, *m_iter);
+
+        *oi++ = make_object(ip);
+      }
+    }
+
+    return (oi);
+  }
+  
+  /*!
+   * Split the arc into two at a given split point.
+   * \param p The split point.
+   * \param c1 Output: The first resulting arc, lying to the left of p.
+   * \param c2 Output: The first resulting arc, lying to the right of p.
+   * \pre p lies in the interior of the arc (not one of its endpoints).
+   */
+  void split(const Algebraic_point_2& p, Self& c1, Self& c2, const Cache& CGAL_assertion_code(cache)) const
+  {
+    CGAL_precondition(this->is_valid() && this->is_continuous());
+
+    // Make sure that p lies on the interior of the arc.
+    CGAL_precondition(this->point_position(p,cache) == EQUAL &&
+                      (this->source_parameter_space_in_x() != ARR_INTERIOR ||
+                       this->source_parameter_space_in_y() != ARR_INTERIOR ||
+                       (p.x() != this->_ps.x()))  &&
+                      (this->target_boundary_in_x() != ARR_INTERIOR ||
+                       this->target_boundary_in_y() != ARR_INTERIOR ||
+                       (p.x() != this->_pt.x())));
+
+    // Make copies of the current arc.
+    c1 = *this;
+    c2 = *this;
+
+    // Split the arc, such that c1 lies to the left of c2.
+    if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
+    {
+      c1._pt = p;
+      c1._info = (c1._info & ~this->TRG_INFO_BITS);
+      c2._ps = p;
+      c2._info = (c2._info & ~this->SRC_INFO_BITS);
+    }
+    else
+    {
+      c1._ps = p;
+      c1._info = (c1._info & ~this->SRC_INFO_BITS);
+      c2._pt = p;
+      c2._info = (c2._info & ~this->TRG_INFO_BITS);
+    }
+  }
+
+  /*!
+   * Merge the current arc with the given arc.
+   * \param arc The arc to merge with.
+   * \pre The two arcs are mergeable.
+   */
+  void merge(const Self& arc)
+  {
+    CGAL_precondition(this->is_valid() && this->is_continuous());
+    CGAL_precondition(arc.is_valid() && arc.is_continuous());
+    CGAL_precondition(this->can_merge_with(arc));
+
+    // Check if we should extend the arc to the left or to the right.
+    if (this->right_parameter_space_in_x() == ARR_INTERIOR &&
+        this->right_parameter_space_in_y() == ARR_INTERIOR &&
+        arc.left_parameter_space_in_x() == ARR_INTERIOR &&
+        arc.left_parameter_space_in_y() == ARR_INTERIOR &&
+        (this->right().x() == arc.left().x()))
+    {
+      // Extend the arc to the right.
+      if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
+      {
+        if (arc.right_parameter_space_in_x() == ARR_INTERIOR &&
+            arc.right_parameter_space_in_y() == ARR_INTERIOR)
+        {
+          this->_pt = arc.right();
+        }
+        else
+        {
+          if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY);
+          else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY);
+          
+          if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY);
+          else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY);
+
+          this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps;
+        }
+      }
+      else
+      {
+        if (arc.right_parameter_space_in_x() == ARR_INTERIOR &&
+            arc.right_parameter_space_in_y() == ARR_INTERIOR)
+        {
+          this->_ps = arc.right();
+        }
+        else
+        {
+          if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY);
+          else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY);
+
+          if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY);
+          else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY);
+
+          this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps;
+        }
+      }
+    }
+    else
+    {
+      CGAL_precondition(this->left_parameter_space_in_x() == ARR_INTERIOR &&
+                        this->left_parameter_space_in_y() == ARR_INTERIOR &&
+                        arc.right_parameter_space_in_x() == ARR_INTERIOR &&
+                        arc.right_parameter_space_in_y() == ARR_INTERIOR &&
+                        (this->left().x() == arc.right().x()));
+
+      // Extend the arc to the left.
+      if ((this->_info & this->IS_DIRECTED_RIGHT) != 0)
+      {
+        if (arc.left_parameter_space_in_x() == ARR_INTERIOR &&
+            arc.left_parameter_space_in_y() == ARR_INTERIOR)
+        {
+          this->_ps = arc.left();
+        }
+        else
+        {
+          if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY);
+          else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY);
+
+          if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY);
+          else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY)
+            this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY);
+
+          this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt;
+        }
+      }
+      else
+      {
+        if (arc.left_parameter_space_in_x() == ARR_INTERIOR &&
+            arc.left_parameter_space_in_y() == ARR_INTERIOR)
+        {
+          this->_pt = arc.left();
+        }
+        else
+        {
+          if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY);
+          else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY);
+
+          if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY);
+          else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY)
+            this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY);
+
+          this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt;
+        }
+      }
+    }
+  }
+  //@}
+
+  
+};
+
+//*! \class Rational_arc_2
+  // * Representation of a generic, not necessarily continuous, portion of a
+  // * rational function.
+  // */
+template <typename Algebraic_kernel_>
+class Rational_arc_d_1 : public Base_rational_arc_d_1<Algebraic_kernel_>
+{
+public:
+  typedef Algebraic_kernel_                             Algebraic_kernel;
+  
+  typedef Rational_arc_d_1<Algebraic_kernel>            Self;
+  typedef Base_rational_arc_d_1<Algebraic_kernel>       Base;
+  typedef Continuous_rational_arc_d_1<Algebraic_kernel> Continuous_arc;
+
+  typedef typename Base::Integer                        Integer;
+  typedef typename Base::Rational                       Rational; 
+  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
+  typedef typename Base::Algebraic_point_2              Algebraic_point_2;
+  typedef typename Base::Polynomial_1                   Polynomial_1;
+ 
+  typedef typename Base::Rat_vector                     Rat_vector;
+ 
+  typedef typename Base::Cache                          Cache;
+
+  /// \name Constrcution methods.
+  //@{
+
+  /*!
+   * Default constructor.
+   */
+  Rational_arc_d_1() :
+    Base()
+  {}
+
+  /*!
+   * Constructor of a whole polynomial curve.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   */
+  Rational_arc_d_1(const Polynomial_1& P, const Cache& cache) :
+    Base(P, cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) :
+    Base(pcoeffs, cache)
+  {}
+
+  /*!
+   * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
+   * ray is directed to the right, or for x_s >= x if it is directed to the
+   * left.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param dir_right Is the ray directed to the right (to +oo)
+   *                  or to the left (to -oo).
+   */
+  Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, 
+                   bool dir_right, const Cache& cache) :
+    Base(P, x_s, dir_right,cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, 
+                   bool dir_right, const Cache& cache) :
+    Base(pcoeffs, x_s, dir_right,cache)
+  {}
+
+
+  /*!
+   * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param x_t The x-coordinate of the target point.
+   * \pre The two x-coordinates must not be equal.
+   */
+  Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, 
+                   const Algebraic_real_1& x_t, const Cache& cache) :
+    Base(P, x_s, x_t, cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, 
+                   const Algebraic_real_1& x_t,const Cache& cache) :
+    Base(pcoeffs, x_s, x_t, cache)
+  {}
+
+  /*!
+   * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   */
+  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, const Cache& cache) :
+    Base(P, Q,cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                   const Cache& cache) :
+    Base(pcoeffs, qcoeffs, cache)
+  {}
+
+  /*!
+   * Constructor of a ray of a rational function, defined by y = p(x)/q(x),
+   * for x_s <= x if the ray is directed to the right, or for x_s >= x if it
+   * is directed to the left.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param dir_right Is the ray directed to the right (to +oo)
+   *                  or to the left (to -oo).
+   */
+  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
+                   const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) :
+    Base(P, Q, x_s, dir_right, cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                   const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) :
+    Base(pcoeffs, qcoeffs, x_s, dir_right, cache)
+  {}
+  
+  /*!
+   * Constructor of a bounded rational arc, defined by y = p(x)/q(x), 
+   * where: x_min <= x <= x_max.
+   * \param pcoeffs The rational coefficients of the polynomial p(x).
+   * \param qcoeffs The rational coefficients of the polynomial q(x).
+   * \param x_s The x-coordinate of the source point.
+   * \param x_t The x-coordinate of the target point.
+   * \pre The two x-coordinates must not be equal.
+   */
+  Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q,
+                   const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+                   const Cache& cache) :
+    Base(P, Q, x_s, x_t, cache)
+  {}
+
+  Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,
+                   const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,
+                   const Cache& cache) :
+    Base(pcoeffs, qcoeffs, x_s, x_t, cache)
+  {}
+  //@}
+
+  /*!
+   * Subdivide the given portion of a rational function into continuous
+   * sub-arcs, splitting it at the roots of the denominator polynomial.
+   * \param oi An output iterator of Continuous_rational_arc_d_1 objects.
+   */
+  template <typename OutputIterator>
+  OutputIterator make_continuous(OutputIterator oi) const
+  {
+    // Compute the roots of the denominator polynomial.
+    std::list<Algebraic_real_1>          q_roots;
+    bool                                 root_at_ps, root_at_pt;
+
+    if ((this->_info & this->IS_CONTINUOUS) == 0)
+      this->_denominator_roots(std::back_inserter(q_roots),
+                               root_at_ps, root_at_pt);
+
+    // Check the case of a continuous arc:
+    Base    arc = *this;
+
+    if (q_roots.empty())
+    {
+      arc.set_continuous();
+      *oi++ = Continuous_arc(arc);
+      return (oi);
+    }
+
+    // The denominator has roots: split the arc accordingly.
+    typename std::list<Algebraic_real_1>::const_iterator iter;
+
+    for (iter = q_roots.begin(); iter != q_roots.end(); ++iter)
+    {
+      *oi++ = Continuous_arc(arc.split_at_pole(*iter));
+    }
+
+    // Add the final x-monotone sub-arc.
+    arc.set_continuous();
+    *oi++ = Continuous_arc(arc);
+
+    return (oi);
+  }
+};
+
+}   //name_space Arr_rational_arc
+}       //namespace CGAL {
+
+#endif //CGAL_RATIONAL_ARC_D_1_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
new file mode 100644
index 0000000..e3dec64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
@@ -0,0 +1,510 @@
+// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
+//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
+
+#ifndef CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
+#define CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
+
+#include <CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h>
+#include <CGAL/Arr_rat_arc/Rational_function.h>
+#include <CGAL/Handle_with_policy.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+namespace Arr_rational_arc {
+
+template <typename AlgebraicKernel_d_1>
+class Rational_function_canonicalized_pair_rep:
+    public Base_rational_arc_ds_1<AlgebraicKernel_d_1>
+{
+public:
+  typedef AlgebraicKernel_d_1                           Algebraic_kernel_d_1;
+  typedef Base_rational_arc_ds_1<Algebraic_kernel_d_1>  Base;
+
+  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel_d_1>
+                                                        Rational_function;
+  typedef typename Base::Polynomial_1                   Polynomial_1;
+  typedef typename Base::Algebraic_real_1               Algebraic_real_1;
+  typedef typename Base::Algebraic_vector               Algebraic_vector;
+  typedef typename Base::Multiplicity                   Multiplicity;
+  typedef typename Base::Multiplicity_vector            Multiplicity_vector;
+  typedef typename Base::Root_multiplicity_vector       Root_multiplicity_vector;
+  typedef typename Base::Solve_1                        Solve_1;
+  typedef typename Base::Bound                          Bound;
+  typedef typename Base::Coefficient                    Coefficient;
+ 
+public:
+  Rational_function_canonicalized_pair_rep(const Rational_function& f, 
+                                           const Rational_function& g,
+                                           Algebraic_kernel_d_1* ak_ptr)
+    :_f(f),_g(g),_ak_ptr(ak_ptr)
+  {
+    CGAL_precondition(_ak_ptr != NULL);
+    //canonicalized representation
+    if ( !(f.id() < g.id()) ) 
+      std::swap(_f,_g);
+    _resultant  = (_f.numer() * _g.denom() - _f.denom() * _g.numer());
+
+    //f and g are not the same...
+    CGAL_precondition(CGAL::is_zero(_resultant) == false);
+                
+    Solve_1 solve_1(_ak_ptr->solve_1_object());   
+    Root_multiplicity_vector rm_vec;
+    
+#if 1
+    solve_1(_resultant,std::back_inserter(rm_vec));
+#else
+    CGAL_assertion(false);
+    // don't use this code yet since g and resultant/g may still have a
+    // common root
+    if( CGAL::internal::may_have_common_factor(_f.denom(),_g.denom())){
+      Polynomial_1 g = CGAL::gcd(_f.denom(), _g.denom());
+      solve_1(CGAL::integral_division(_resultant, g),
+              std::back_inserter(rm_vec));
+      solve_1(g, std::back_inserter(rm_vec));
+      std::sort(rm_vec.begin(), rm_vec.end());
+    }else{
+      solve_1(_resultant, std::back_inserter(rm_vec));
+    }
+#endif
+
+    _roots.reserve(rm_vec.size());
+    _multiplicities.reserve(rm_vec.size());
+  
+    for (typename Root_multiplicity_vector::iterator it = rm_vec.begin();
+         it != rm_vec.end() ; 
+         ++it)
+    {
+      _roots.push_back(it->first);
+      _multiplicities.push_back(it->second);
+    }
+
+    Algebraic_vector tmp;
+    tmp.reserve(_f.poles().size() + _g.poles().size());
+    _event_roots.reserve(rm_vec.size() + _f.poles().size() + _g.poles().size());
+    //merge the roots of f,g & resultant
+    std::merge( _f.poles().begin(), _f.poles().end(),
+                _g.poles().begin(), _g.poles().end(),
+                std::back_inserter(tmp));
+    std::merge(tmp.begin(), tmp.end(),
+               _roots.begin(), _roots.end(),
+               std::back_inserter(_event_roots));
+  
+    //remove duplicate entries
+    typename Algebraic_vector::iterator new_end,old_end;
+    new_end = std::unique(_event_roots.begin(), old_end=_event_roots.end());
+    _event_roots.erase(new_end,old_end);
+
+    //compute the values of _is_above
+    bool curr_is_above = get_is_above_near_minus_infinity();
+    _is_above.push_back(curr_is_above);
+
+    // TBD: is_sorted is provided both by stl and boost. The interface of
+    // boost version changed, and as of version ? it accepts a single
+    // argument, that is a model of the SinglePassRange concept. The stl
+    // version, on the other hand, is on it's way out.
+    // (The name is wrong-should be is_ordered).
+    //
+    // CGAL_precondition(std::is_sorted(_f.poles().begin(),_f.poles().end()));
+    // CGAL_precondition(std::is_sorted(_g.poles().begin(),_g.poles().end()));
+    // CGAL_precondition(std::is_sorted(_roots.begin(),_roots.end()));
+
+    typename Algebraic_vector ::const_iterator it_f_pole = _f.poles().begin();
+    typename Multiplicity_vector::const_iterator it_f_mult =
+      _f.pole_multiplicities().begin();
+    typename Algebraic_vector ::const_iterator it_g_pole = _g.poles().begin();
+    typename Multiplicity_vector::const_iterator it_g_mult =
+      _g.pole_multiplicities().begin();
+    typename Algebraic_vector ::const_iterator it_r_root = _roots.begin();
+    typename Multiplicity_vector::const_iterator it_r_mult =
+      _multiplicities.begin() ; 
+    while ( (it_f_pole != _f.poles().end()) || 
+        (it_g_pole != _g.poles().end()) || 
+        (it_r_root != _roots.end()))
+    {
+      //std::cout << "_f._poles.size() " << _f._poles.size() <<std::endl;
+      //std::cout << "_g._poles.size() " << _g._poles.size()<< std::endl;
+      //std::cout << "_roots.size()    " << _roots.size() << std::endl;
+      //if current event is only a pole of f
+      if ((it_f_pole != _f.poles().end())         && 
+          ((it_g_pole == _g.poles().end()) || (*it_f_pole < *it_g_pole)) &&
+          ((it_r_root == _roots.end()) || (*it_f_pole < *it_r_root)))
+      {
+        if (*it_f_mult % 2 == 1)
+          curr_is_above = (curr_is_above == true ) ? false : true;
+        _is_above.push_back(curr_is_above);
+        ++it_f_pole;
+        ++it_f_mult;
+      }
+      //if current event is only a pole of g
+      else if ((it_g_pole != _g.poles().end())         && 
+               ((it_f_pole == _f.poles().end()) || (*it_g_pole < *it_f_pole)) &&
+               ((it_r_root == _roots.end()) || (*it_g_pole < *it_r_root)))
+      {
+        if (*it_g_mult % 2 == 1)
+          curr_is_above = (curr_is_above == true ) ? false : true;
+        _is_above.push_back(curr_is_above);
+        ++it_g_pole;
+        ++it_g_mult;
+      }
+      //if current event is only a pole of r
+      else if ((it_r_root != _roots.end())         && 
+               ((it_f_pole == _f.poles().end()) || (*it_r_root < *it_f_pole)) &&
+               ((it_g_pole == _g.poles().end()) || (*it_r_root < *it_g_pole)))
+      {
+        if (*it_r_mult % 2 == 1)
+          curr_is_above = (curr_is_above == true ) ? false : true;
+        _is_above.push_back(curr_is_above);
+        ++it_r_root;
+        ++it_r_mult;
+      }
+      //if current event is a pole of f g and r
+      else if ( (it_f_pole != _f.poles().end()) && 
+                (it_g_pole != _g.poles().end()) && 
+                (it_r_root != _roots.end()) &&
+                (*it_r_root == *it_f_pole)    && 
+                (*it_r_root == *it_g_pole))
+      {
+        //both functions switch signs
+        if (_f.sign_at(*it_r_root, CGAL::NEGATIVE) ==
+            _g.sign_at(*it_r_root, CGAL::NEGATIVE))
+          curr_is_above = !curr_is_above;
+        if (*it_r_mult % 2 == 1)
+          curr_is_above = !curr_is_above;
+        if (_f.sign_at(*it_r_root, CGAL::POSITIVE) ==
+            _g.sign_at(*it_r_root, CGAL::POSITIVE))
+          curr_is_above = !curr_is_above;
+        _is_above.push_back(curr_is_above);
+        ++it_f_pole;
+        ++it_f_mult;
+        ++it_g_pole;
+        ++it_g_mult;
+        ++it_r_root;
+        ++it_r_mult;
+      }
+      else
+      {
+        //should not be reached
+        CGAL_postcondition_msg(false,"invalid case in computing _is_above");
+      }
+    }
+    //std::cout << "_is_above.size()            " << _is_above.size() <<std::endl;
+    //std::cout << " _event_roots.size() + 1    " <<  _event_roots.size() + 1 << std::endl;
+    CGAL_postcondition(_is_above.size() == _event_roots.size() + 1);
+    //check for validity using explicit computation
+    CGAL_postcondition_code(std::vector<bool> tmp_is_above =
+                            compute_is_above_explicitly();
+                            );
+    CGAL_postcondition(_is_above == tmp_is_above);   
+  }
+
+  Comparison_result compare_f_g_at(const Algebraic_real_1& x,
+                                   CGAL::Sign epsilon = CGAL::ZERO) const
+  {
+    //f and g must be different 
+    CGAL_precondition(!CGAL::is_zero(_resultant));
+
+    //find interval 
+    typename Algebraic_vector::const_iterator iter =
+      std::lower_bound(_event_roots.begin(), _event_roots.end(),x);
+  
+    //case of a value larger than largest root
+    if (iter == _event_roots.end())
+      return (_is_above.back() ? CGAL:: LARGER : CGAL::SMALLER);
+
+    typename Algebraic_vector::iterator::difference_type dist =
+      iter - _event_roots.begin();
+
+    //if x is not a root, ignore epsilons 
+    if (*iter != x){
+      return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER);
+    }
+
+    //x is a root 
+    if (epsilon == CGAL::ZERO){
+      CGAL_precondition(_f.poles().end() ==
+                        std::find(_f.poles().begin(), _f.poles().end(),x));
+      CGAL_precondition(_g.poles().end() ==
+                        std::find(_g.poles().begin(), _g.poles().end(),x));
+      return (CGAL::EQUAL);
+    }
+    
+    if (epsilon == CGAL::NEGATIVE)
+      return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER);
+    else // CGAL::POSITIVE
+      return (_is_above[dist+1] ? CGAL:: LARGER : CGAL::SMALLER);
+  }
+  Comparison_result compare_f_g_at(Arr_parameter_space boundary) const
+  {
+    CGAL_precondition((boundary == ARR_LEFT_BOUNDARY) ||
+        (boundary == ARR_RIGHT_BOUNDARY) );
+  
+    //f and g are the same...
+    if (CGAL::is_zero(_resultant))
+      return CGAL::EQUAL;
+
+    if (boundary == ARR_LEFT_BOUNDARY)
+      return _is_above.front() ? CGAL::LARGER : CGAL::SMALLER ;
+    else //  boundary = ARR_RIGHT_BOUNDARY
+      return _is_above.back()  ? CGAL::LARGER : CGAL::SMALLER ;
+  }
+
+  bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space,
+                                const Algebraic_real_1 left,
+                                const Arr_parameter_space right_parameter_space,
+                                const Algebraic_real_1 right) const
+  {
+    //the two function intersect iff the left index and the right index
+    //of the array _is_above are different
+
+    //get left index
+    typename Algebraic_vector::const_iterator left_index =
+      (left_parameter_space == ARR_LEFT_BOUNDARY) ? 
+      _event_roots.begin():
+      std::lower_bound(_event_roots.begin(), _event_roots.end(),left);
+    //check if intersect at left index
+    if (*left_index == left) 
+      return true;
+
+    //get right index
+    typename Algebraic_vector::const_iterator right_index =
+      (right_parameter_space == ARR_RIGHT_BOUNDARY) ? 
+      _event_roots.begin():
+      std::lower_bound(_event_roots.begin(), _event_roots.end(),right);
+    //check if intersect at right index
+    if (*right_index == right) 
+      return true;
+  
+    //check if indices are the same
+    return (left_index == right_index);
+  }
+
+  const Rational_function& f() const 
+  {
+    return _f;
+  }
+
+  const Rational_function& g() const 
+  {
+    return _g;
+  }
+
+  const Algebraic_vector & roots() const
+  {
+    return _roots;
+  }
+
+  const Multiplicity_vector & multiplicities() const
+  {
+    return _multiplicities;
+  }
+
+private:
+  bool get_is_above_near_minus_infinity()
+  {
+    bool r = _get_is_above_near_minus_infinity();
+    CGAL_postcondition(r == __get_is_above_near_minus_infinity());
+    return r; 
+  }
+
+  bool _get_is_above_near_minus_infinity()
+  {
+    int f_deg = CGAL::degree(_f.numer()) - CGAL::degree(_f.denom());
+    int g_deg = CGAL::degree(_g.numer()) - CGAL::degree(_g.denom());
+
+    if (f_deg > g_deg)  //f is stronger than g
+      {
+        CGAL::Sign sign = _f.sign_near_minus_infinity();
+        return  (sign == CGAL::NEGATIVE) ? false  :
+          (sign == CGAL::POSITIVE) ? true   :
+          (_g.sign_near_minus_infinity() == CGAL::NEGATIVE);  // _f == zero;
+      }
+    if (f_deg < g_deg)  //g is stronger than f
+      {
+        CGAL::Sign sign = _g.sign_near_minus_infinity();
+        return  (sign == CGAL::NEGATIVE) ? true  :
+          (sign == CGAL::POSITIVE) ? false   :
+          (_f.sign_near_minus_infinity() == CGAL::POSITIVE);  // _g == zero;
+      }
+            
+    //both have the same degree difference, 
+    //check who's leading coeeficient ratio is larger
+    Coefficient lead_coeff_ratio =
+      CGAL::abs(CGAL::leading_coefficient(_f.numer())) *
+      CGAL::leading_coefficient(_g.denom()) -
+      CGAL::abs(CGAL::leading_coefficient(_g.numer())) *
+      CGAL::leading_coefficient(_f.denom());
+    if (lead_coeff_ratio > 0)//f is stronger than g
+      return (_f.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? false : true;
+    if (lead_coeff_ratio < 0)  //g is stronger than f
+      return (_g.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? true : false;
+
+    //ratio is the same, instead of continuing with taylor expansion,
+    //compute explicitly
+
+    return __get_is_above_near_minus_infinity();
+  }
+
+  bool __get_is_above_near_minus_infinity()
+  {
+    Bound b;
+    if (_event_roots.empty())
+      b = Bound(0);
+    else
+      {
+        b = (_ak_ptr->approximate_relative_1_object()(_event_roots.front(), 0)).first - 1;  //lower bound of first root
+      }
+    return is_above_at(b);
+  }
+
+  bool is_above_at(const Bound& b)
+  {
+    //return true if f is above g at b which means return (sign  == positive) of :
+    //
+    //  numer_f * denom _g - numer_f * denom _g
+    //f-g= -------------------------------------- at b
+    //    denom _f  * denom _g 
+
+    //TODO: unnescecary construction of real
+    Algebraic_real_1 x(_ak_ptr->construct_algebraic_real_1_object()(b));
+  
+    CGAL::Sign   numer = _ak_ptr->sign_at_1_object()(_resultant, x);
+    CGAL::Sign   denom_f = _ak_ptr->sign_at_1_object()(_f.denom(),x);
+    CGAL::Sign   denom_g = _ak_ptr->sign_at_1_object()(_g.denom(),x);
+    CGAL::Sign   denom = denom_f * denom_g ;
+    CGAL::Sign   s = numer*denom;
+
+    CGAL_precondition(s != CGAL::ZERO);
+
+    return (s == CGAL::POSITIVE);
+  }
+  std::vector<bool> compute_is_above_explicitly()
+  {
+    std::vector<bool> tmp_is_above;
+    if (_event_roots.size()== 0)
+    {
+      Bound b = 1; //all bound are legal, choose 1 for simplicity
+      tmp_is_above.push_back(is_above_at(b));  
+      return tmp_is_above;
+    }
+  
+    tmp_is_above.reserve(_event_roots.size()+1);  
+    //left boundary
+    Bound b  = (_ak_ptr->approximate_relative_1_object()
+      (_event_roots.front(),0)).first - 1;  //lower bound of first root
+    tmp_is_above.push_back(is_above_at(b));  
+  
+    //mid intervals
+    typename Algebraic_vector::size_type i;
+    for (i = 0; i < _event_roots.size()-1; ++i)
+    {
+      b = _ak_ptr->bound_between_1_object()(_event_roots[i],_event_roots[i+1]);
+      tmp_is_above.push_back(is_above_at(b));      
+    }
+
+    //right boundary
+    b = (_ak_ptr->approximate_relative_1_object()(_event_roots.back(), 0)).second + 1;  //lower bound of last root
+    tmp_is_above.push_back(is_above_at(b));
+    return tmp_is_above;
+  }
+   
+private:   
+  Rational_function _f,_g;
+  Polynomial_1  _resultant;
+  Algebraic_vector _roots;
+  //roots of resultant merged with roots of f & g's denomenators
+  Algebraic_vector _event_roots;
+  Multiplicity_vector _multiplicities;
+  //is f above g in the interval induced by index i of _roots
+  std::vector<bool> _is_above;
+  Algebraic_kernel_d_1* _ak_ptr;
+}; // Rational_function_canonicalized_pair_rep
+
+template <typename Algebraic_kernel_>
+class Rational_function_canonicalized_pair:
+    public Handle_with_policy<Rational_function_canonicalized_pair_rep
+                              <Algebraic_kernel_> >
+{
+public:
+  typedef Algebraic_kernel_                           Algebraic_kernel_d_1;
+  typedef Rational_function_canonicalized_pair_rep<Algebraic_kernel_d_1>
+                                                      Rep;
+  typedef Handle_with_policy<Rep>                     Base;
+  typedef Rational_function_canonicalized_pair<Algebraic_kernel_d_1>
+                                                      Self;
+  typedef typename Rep::Rational_function             Rational_function;
+  typedef typename Rep::Algebraic_real_1              Algebraic_real_1;
+  typedef typename Rep::Polynomial_1                  Polynomial_1;
+  typedef typename Rep::Algebraic_vector              Algebraic_vector;
+  typedef typename Rep::Multiplicity_vector           Multiplicity_vector;
+  typedef typename Rep::Root_multiplicity_vector      Root_multiplicity_vector;
+
+  Rational_function_canonicalized_pair(const Rational_function& f, 
+                                       const Rational_function& g,
+                                       Algebraic_kernel_d_1* ak_ptr) :
+    Base(f, g, ak_ptr) {}
+  //used to solve VS bug...
+  Rational_function_canonicalized_pair(const Self & p) :
+    Base(static_cast<const Base &> (p)) {}
+
+  Comparison_result compare_f_g_at(const Algebraic_real_1& x,
+                                   CGAL::Sign epsilon = CGAL::ZERO) const
+  {
+    return this->ptr()->compare_f_g_at(x,epsilon);
+  }
+
+  Comparison_result compare_f_g_at(Arr_parameter_space boundary) const
+  {
+    return this->ptr()->compare_f_g_at(boundary);
+  }
+
+  bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space,
+                                const Algebraic_real_1 left,
+                                const Arr_parameter_space right_parameter_space,
+                                const Algebraic_real_1 right) const
+  {
+    return this->ptr()->is_intersecting_in_range(left_parameter_space, left,
+                                                 right_parameter_space, right);
+  }
+    
+  const Rational_function& f() const 
+  {
+    return this->ptr()->f();
+  }
+    
+  const Rational_function& g() const 
+  {
+    return this->ptr()->g();
+  }
+
+  const Algebraic_vector & roots() const
+  {
+    return this->ptr()->roots();
+  }
+
+  const Multiplicity_vector & multiplicities() const
+  {
+    return this->ptr()->multiplicities();
+  }
+};  //Rational_function_canonicalized_pair
+
+}   //namespace Arr_rational_arc
+}   //namespace CGAL {   
+
+#endif //CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_pair.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_rat_arc/Rational_function_pair.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Rational_function_pair.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Singleton.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Singleton.h
new file mode 100644
index 0000000..3d41d72
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_rat_arc/Singleton.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
+//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
+
+
+
+#ifndef CGAL_SINGLETON_H_
+#define SINGLETON_H_
+
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+namespace Arr_rational_arc {
+template <class T>
+class Singleton
+{
+public:
+  static T* instance() 
+  {
+    if(!m_pInstance) 
+      m_pInstance = new T;
+    CGAL_assertion(m_pInstance !=NULL);
+    return m_pInstance;
+  }
+      
+  static void DestroyInstance()
+  {
+    delete m_pInstance;
+    m_pInstance = NULL;
+  };
+private:
+  Singleton();          // ctor hidden
+  ~Singleton();          // dtor hidden
+private:
+  static T* m_pInstance;
+};
+
+template <class T> T* Singleton<T>::m_pInstance=NULL;
+
+}   // namespace Arr_rational_arc
+}   //namespace CGAL { 
+#endif // CGAL_SINGLETON_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_rational_function_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_rational_function_traits_2.h
new file mode 100644
index 0000000..0ffeec9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_rational_function_traits_2.h
@@ -0,0 +1,1315 @@
+// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Oren Salzman <orenzalz at post.tau.ac.il >
+//                 Michael Hemmer <Michael.Hemmer at sophia.inria.fr>
+
+#ifndef CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
+#define CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
+
+#include <CGAL/assertions.h>
+#include <CGAL/tags.h>
+#include <CGAL/Fraction_traits.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arithmetic_kernel.h>
+#include <CGAL/Algebraic_kernel_d_1.h>
+#include <CGAL/Arr_rat_arc/Rational_arc_d_1.h>
+#include <CGAL/Arr_rat_arc/Cache.h>
+
+
+
+namespace CGAL {
+
+/*! \class
+ * A traits class for maintaining an arrangement of bounded arcs (segments) of
+ * rational functions of arbitrary degree.
+ *
+ * The class is templated with two parameters: 
+ * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type
+ *            for the coordinates of arrangement vertices, which are algebraic
+ *            numbers (defined by Nt_traits::Algebraic).
+ * Nt_traits A traits class for performing various operations on the integer,
+ *           rational and algebraic types. 
+ */
+ 
+template <typename AlgebraicKernel_d_1>
+class Arr_rational_function_traits_2
+{
+public:
+  typedef AlgebraicKernel_d_1                           Algebraic_kernel_d_1;
+ 
+  typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1>
+                                                        Self;
+  typedef Arr_rational_arc::Base_rational_arc_ds_1<Algebraic_kernel_d_1>
+                                                        Base_rational_arc_ds_1;
+
+  // Traits objects:
+  typedef Arr_rational_arc::Base_rational_arc_d_1<Algebraic_kernel_d_1>
+                                                              Base_curve_2;
+  typedef Arr_rational_arc::Continuous_rational_arc_d_1<Algebraic_kernel_d_1>
+                                                              X_monotone_curve_2;
+  typedef Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_d_1>
+                                                              Curve_2;
+  typedef Arr_rational_arc::Algebraic_point_2<Algebraic_kernel_d_1>
+                                                              Point_2;
+
+  typedef typename Base_rational_arc_ds_1::Algebraic_real_1   Algebraic_real_1;
+  typedef typename Base_rational_arc_ds_1::Multiplicity       Multiplicity;
+  typedef typename Base_curve_2::Rat_vector                   Rat_vector;
+
+  typedef typename Base_rational_arc_ds_1::Integer            Integer;
+  typedef typename Base_rational_arc_ds_1::Rational           Rational; 
+  typedef typename Base_rational_arc_ds_1::Polynomial_1       Polynomial_1; 
+  typedef typename Base_rational_arc_ds_1::Coefficient        Coefficient; 
+
+  typedef typename Base_rational_arc_ds_1::FT_rat_1           FT_rat_1; 
+  typedef typename Base_rational_arc_ds_1::Polynomial_traits_1
+    Polynomial_traits_1;
+  
+  typedef typename Algebraic_kernel_d_1::Bound                Bound; 
+  typedef Bound
+    Approximate_number_type; 
+  
+  typedef CGAL::Arr_rational_arc::Rational_function<Algebraic_kernel_d_1>
+                                                              Rational_function;
+  typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1> Cache;
+
+  //Category tags:
+  typedef Tag_true Has_left_category;
+  typedef Tag_true Has_merge_category;
+  typedef Tag_true Has_do_intersect_category;
+
+  typedef Tag_true Has_vertical_segment_category;
+
+  typedef Arr_open_side_tag          Left_side_category;
+  typedef Arr_open_side_tag          Bottom_side_category;
+  typedef Arr_open_side_tag          Top_side_category;
+  typedef Arr_open_side_tag          Right_side_category;
+
+private:
+  mutable Cache                   _cache;
+  mutable Algebraic_kernel_d_1*   _ak_ptr;
+  bool                            delete_ak;
+
+public:
+  Algebraic_kernel_d_1* algebraic_kernel_d_1() const {return _ak_ptr;}
+
+  bool delete_ak_internal_flag() const
+  {
+    return delete_ak;
+  } 
+  // Algebraic_kernel_d_1& algebraic_kernel_d_1()             {return _ak;}
+
+public:
+  const Cache& cache() const {return _cache;}
+
+public:
+  //------------
+  //Constructors
+  //------------
+
+  //---------------------
+  // Default constructor.
+  Arr_rational_function_traits_2() : delete_ak(true)
+  {
+    _ak_ptr = new Algebraic_kernel_d_1;
+    _cache.initialize(_ak_ptr);
+  }
+
+  Arr_rational_function_traits_2(Algebraic_kernel_d_1* ak_ptr) :
+    _ak_ptr(ak_ptr),delete_ak(false)
+  {
+    _cache.initialize(_ak_ptr);
+  }
+
+  Arr_rational_function_traits_2(const Self& other)
+    :delete_ak(other.delete_ak_internal_flag())
+  {
+    //copy kernel
+    if (delete_ak)
+      _ak_ptr = new Algebraic_kernel_d_1(*other.algebraic_kernel_d_1());
+    else
+      _ak_ptr = other.algebraic_kernel_d_1();    
+
+    //copy cache
+    _cache.initialize(other.cache(), _ak_ptr);
+  }
+
+  ~Arr_rational_function_traits_2()
+  {
+    if (delete_ak)
+      delete (_ak_ptr);
+  }
+
+  /*! A functor that constructs an x_monotone curve */
+  class Construct_x_monotone_curve_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
+    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
+
+    /*! The traits */
+    const Traits* _traits;
+
+    /*! Constructor
+     * \param traits the traits
+     */
+    Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+    
+  public:
+    typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; 
+    typedef typename Base_rational_arc_ds_1::Algebraic_real_1
+                                                          Algebraic_real_1;
+    typedef Arr_rational_arc::Continuous_rational_arc_d_1<Algebraic_kernel_d_1>
+                                                          X_monotone_curve_2;
+    typedef Polynomial_1                                  argument_type;
+    typedef Polynomial_1                                  first_argument_type;
+    typedef Polynomial_1                                  second_argument_type;
+    typedef X_monotone_curve_2                            result_type;
+    
+    X_monotone_curve_2 operator()( const Polynomial_1& P) const
+    {
+      return X_monotone_curve_2(P, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()( InputIterator begin, InputIterator end) const
+    {
+      Rat_vector rat_vec(begin,end);
+      return X_monotone_curve_2(rat_vec, _traits->cache());
+    }
+
+    X_monotone_curve_2 operator()(const Polynomial_1& P,
+                                  const Algebraic_real_1& x_s,
+                                  bool dir_right) const
+    {
+      return X_monotone_curve_2(P, x_s, dir_right, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()(InputIterator begin, InputIterator end,
+                                  const Algebraic_real_1& x_s,
+                                  bool dir_right) const
+    {
+      Rat_vector rat_vec(begin,end);
+      return X_monotone_curve_2(rat_vec, x_s, dir_right, _traits->cache());
+    }
+
+    X_monotone_curve_2 operator()(const Polynomial_1& P,
+                                  const Algebraic_real_1& x_s,
+                                  const Algebraic_real_1& x_t) const
+    {
+      return X_monotone_curve_2(P, x_s, x_t, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()(InputIterator begin, InputIterator end,
+                                  const Algebraic_real_1& x_s,
+                                  const Algebraic_real_1& x_t) const
+    {
+      Rat_vector rat_vec(begin,end);
+      return X_monotone_curve_2(rat_vec, x_s, x_t, _traits->cache());
+    }
+
+    X_monotone_curve_2 operator()(const Polynomial_1& P,
+                                  const Polynomial_1& Q) const 
+    {
+      return X_monotone_curve_2(P, Q, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()(InputIterator begin_numer,
+                                  InputIterator end_numer,
+                                  InputIterator begin_denom,
+                                  InputIterator end_denom) const 
+    {
+      Rat_vector rat_vec_numer(begin_numer,end_numer);
+      Rat_vector rat_vec_denom(begin_denom,end_denom);
+      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, _traits->cache());
+    }
+
+    X_monotone_curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
+                                  const Algebraic_real_1& x_s,
+                                  bool dir_right) const
+    {
+      return X_monotone_curve_2(P, Q, x_s, dir_right, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()(InputIterator begin_numer,
+                                  InputIterator end_numer,
+                                  InputIterator begin_denom,
+                                  InputIterator end_denom,
+                                  const Algebraic_real_1& x_s,
+                                  bool dir_right) const
+    {
+      Rat_vector rat_vec_numer(begin_numer,end_numer);
+      Rat_vector rat_vec_denom(begin_denom,end_denom);
+      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s,dir_right,
+                                _traits->cache());
+    }
+
+    X_monotone_curve_2 operator()(const Polynomial_1& P,
+                                  const Polynomial_1& Q,
+                                  const Algebraic_real_1& x_s,
+                                  const Algebraic_real_1& x_t) const
+    {
+      return X_monotone_curve_2(P, Q, x_s, x_t, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    X_monotone_curve_2 operator()(InputIterator begin_numer,
+                                  InputIterator end_numer,
+                                  InputIterator begin_denom,
+                                  InputIterator end_denom,
+                                  const Algebraic_real_1& x_s,
+                                  const Algebraic_real_1& x_t) const
+    {
+      Rat_vector rat_vec_numer(begin_numer, end_numer);
+      Rat_vector rat_vec_denom(begin_denom, end_denom);
+      return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t,
+                                _traits->cache());
+    }
+  };
+
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
+  {
+    return Construct_x_monotone_curve_2(this);
+  }
+
+  /*! A functor that constructs an arbitrary curve */
+  class Construct_curve_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
+    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
+
+    /*! The traits */
+    const Traits* _traits;
+
+    /*! Constructor
+     * \param traits the traits
+     */
+    Construct_curve_2(const Traits* traits) : _traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+    
+  public:
+    typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; 
+    typedef typename Base_rational_arc_ds_1::Algebraic_real_1
+                                                          Algebraic_real_1;
+    typedef Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_d_1>
+                                                          Curve_2;
+    typedef Polynomial_1                                  argument_type;
+    typedef Polynomial_1                                  first_argument_type;
+    typedef Polynomial_1                                  second_argument_type;
+    typedef Curve_2                                       result_type;
+    
+    Curve_2 operator()(const Polynomial_1& P) const
+    {
+      return Curve_2(P, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin, InputIterator end) const
+    {
+      Rat_vector rat_vec(begin, end);
+      return Curve_2(rat_vec, _traits->cache());
+    }
+
+    Curve_2 operator()(const Polynomial_1& P,
+                       const Algebraic_real_1& x_s, bool dir_right) const
+    {
+      return Curve_2(P, x_s, dir_right, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin, InputIterator end,
+                       const Algebraic_real_1& x_s, bool dir_right) const
+    {
+      Rat_vector rat_vec(begin, end);
+      return Curve_2(rat_vec, x_s, dir_right, _traits->cache());
+    }
+
+    Curve_2 operator()(const Polynomial_1& P,
+                       const Algebraic_real_1& x_s,
+                       const Algebraic_real_1& x_t) const
+    {
+      return Curve_2(P, x_s, x_t, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin, InputIterator end,
+                       const Algebraic_real_1& x_s,
+                       const Algebraic_real_1& x_t) const
+    {
+      Rat_vector rat_vec(begin,end);
+      return Curve_2(rat_vec, x_s, x_t, _traits->cache());
+    }
+
+    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q) const 
+    {
+      return Curve_2(P, Q, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
+                       InputIterator begin_denom, InputIterator end_denom) const 
+    {
+      Rat_vector rat_vec_numer(begin_numer, end_numer);
+      Rat_vector rat_vec_denom(begin_denom, end_denom);
+      return Curve_2(rat_vec_numer, rat_vec_denom, _traits->cache());
+    }
+
+    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
+                       const Algebraic_real_1& x_s, bool dir_right) const
+    {
+      return Curve_2(P, Q, x_s, dir_right, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
+                       InputIterator begin_denom, InputIterator end_denom,
+                       const Algebraic_real_1& x_s, bool dir_right) const
+    {
+      Rat_vector rat_vec_numer(begin_numer,end_numer);
+      Rat_vector rat_vec_denom(begin_denom,end_denom);
+      return Curve_2(rat_vec_numer, rat_vec_denom, x_s, dir_right,
+                     _traits->cache());
+    }
+
+    Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q,
+                       const Algebraic_real_1& x_s,
+                       const Algebraic_real_1& x_t) const
+    {
+      return Curve_2(P, Q, x_s, x_t, _traits->cache());
+    }
+
+    template <typename InputIterator>
+    Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer,
+                       InputIterator begin_denom, InputIterator end_denom,
+                       const Algebraic_real_1& x_s,
+                       const Algebraic_real_1& x_t) const
+    {
+      Rat_vector rat_vec_numer(begin_numer,end_numer);
+      Rat_vector rat_vec_denom(begin_denom,end_denom);
+      return Curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t, _traits->cache());
+    }
+  };
+
+  Construct_curve_2 construct_curve_2_object() const
+  {
+    return Construct_curve_2(this);
+  }
+
+  /*! Construct a point */
+  class Construct_point_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
+    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
+
+    /*! The traits */
+    const Traits* _traits;
+
+    /*! Constructor
+     * \param traits the traits
+     */
+    Construct_point_2(const Traits* traits) : _traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+    
+  public:
+    Point_2 operator()(const Rational_function& rational_function,
+                       const Algebraic_real_1& x_coordinate)
+    { 
+      return Point_2(rational_function, x_coordinate);
+    }
+
+    Point_2 operator()(const Rational& x, const Rational& y)
+    { 
+      Integer  y_numer,y_denom;
+      typename FT_rat_1::Decompose()(y,y_numer,y_denom);
+      
+      return Point_2(_traits->cache().get_rational_function(Rational(y_numer,
+                                                                     y_denom)),
+                     _traits->algebraic_kernel_d_1()->
+                       construct_algebraic_real_1_object()(x));
+    }
+    Point_2 operator()(const Algebraic_real_1& x, const Rational& y)
+    {   
+      Integer  y_numer;
+      Integer  y_denom;
+      typename FT_rat_1::Decompose()(y, y_numer, y_denom);
+      return Point_2(_traits->cache().get_rational_function(Rational(y_numer,
+                                                                     y_denom)),
+                     x);
+    }
+  }; //Construct_point
+
+  Construct_point_2 construct_point_2_object() const
+  {
+    return Construct_point_2(this);
+  }
+
+//   class Construct_vertical_segment
+//   {
+//   private:
+//     Cache& _cache;
+
+//   public:
+//     Construct_vertical_segment(Cache& cache) : _cache(cache) {}
+
+//     Vertical_segment operator()(const Point_2& p) const
+//     { 
+//       return Vertical_segment(p);
+//     }
+
+//     Vertical_segment operator()(const Point_2& p, bool is_directed_up) const
+//     { 
+//       return Vertical_segment(p, is_directed_up);
+//     }
+
+//     Vertical_segment operator()(const Point_2& p1,const Point_2& p2) const
+//     {       
+//       return Vertical_segment(p1, p2, _cache);
+//     }
+//   }; //Construct_vertical_segment
+
+//   Construct_vertical_segment construct_vertical_segment_object() const
+//   {
+//     return Construct_vertical_segment(_cache);
+//   }
+
+  //------------------------
+  //Functor definitions.
+  //------------------------
+
+  //---------------------------------------------------------------
+  //A functor that compares the x-coordinates of two points 
+  class Compare_x_2
+  {
+  public:
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const
+    {
+      Comparison_result comp = CGAL::compare(p1.x(), p2.x());
+      return (comp);
+    }
+  };
+
+  /*! Obtain a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object() const
+  {
+    return Compare_x_2();
+  }
+
+  /*! A functor that compares two points lexigoraphically: by x, then by y. */
+  class Compare_xy_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
+    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
+
+    /*! The traits */
+    const Traits* _traits;
+
+    /*! Constructor
+     * \param traits the traits
+     */
+    Compare_xy_2(const Traits* traits) : _traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+
+  public:
+    /*!
+     * Compares two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const 
+    {
+      return p1.compare_xy_2(p2, _traits->cache());
+    }
+  };
+
+  /*! Obtain a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object() const
+  {
+    return Compare_xy_2(this);
+  }
+
+  /*! A functor that obtains the left endpoint of a curve. */
+  class Construct_min_vertex_2
+  {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The left endpoint.
+     */
+    const Point_2& operator()(const X_monotone_curve_2 & cv) const
+    {
+      return (cv.left());
+    }
+  };
+
+  /*! Obtain a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object() const
+  {
+    return Construct_min_vertex_2();
+  }
+
+  /*! A functor that obtains the right endpoint of a curve. */
+  class Construct_max_vertex_2
+  {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2& cv) const
+    {
+      return (cv.right());
+    }
+  };
+
+  /*! Obtain a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object() const
+  {
+    return Construct_max_vertex_2();
+  }
+
+  /*! A functor that checks whether a given curve is vertical. */
+  class Is_vertical_2
+  {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2&) const
+    {
+      // A rational function can never be vertical.
+      return false;
+    }
+  };
+
+  /*! Obtain an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object() const
+  {
+    return Is_vertical_2();
+  }
+
+  /*! A functor that compares the y-coordinates of a point and a curve at
+   * the point x-coordinate.
+   */
+  class Compare_y_at_x_2
+  {
+  private:
+    Cache& _cache;
+  public:
+    Compare_y_at_x_2(Cache& cache) : _cache(cache) {}
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2& cv) const
+    {
+      return (cv.point_position(p,_cache));
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object () const
+  {
+    return Compare_y_at_x_2(_cache);
+  }
+
+  /*! A functor that compares compares the y-coordinates of two curves
+   * immediately to the left of their intersection point.
+   */
+  class Compare_y_at_x_left_2
+  {
+  private:
+    Cache& _cache;
+
+  public:
+    Compare_y_at_x_left_2(Cache& cache) :_cache(cache) {}
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition(cv1.point_position(p,_cache) == EQUAL &&
+                        cv2.point_position(p,_cache) == EQUAL);
+
+      CGAL_precondition((cv1.left_parameter_space_in_x() != ARR_INTERIOR ||
+                         cv1.left_parameter_space_in_y() != ARR_INTERIOR ||
+                         (p.x() > cv1.left().x())) &&
+                        (cv2.left_parameter_space_in_x() != ARR_INTERIOR ||
+                         cv2.left_parameter_space_in_y() != ARR_INTERIOR ||
+                         (p.x() > cv2.left().x())));
+
+      // Compare the two arcs.
+      return cv1.compare_at_intersection (cv2,p,true,_cache);}
+  };
+
+  /*! Obtain a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
+  {
+    return Compare_y_at_x_left_2(_cache);
+  }
+
+  /*! A functor that compares compares the y-coordinates of two curves
+   * immediately to the right of their intersection point.
+   */
+  class Compare_y_at_x_right_2
+  {
+  private:
+    Cache& _cache;
+
+  public:
+    Compare_y_at_x_right_2(Cache& cache) :_cache(cache) {}
+    /*!
+     * Compares the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv1,
+                                  const X_monotone_curve_2& cv2,
+                                  const Point_2& p) const
+    {
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition(cv1.point_position (p,_cache) == EQUAL &&
+                        cv2.point_position (p,_cache) == EQUAL);
+
+
+      CGAL_precondition((cv1.right_parameter_space_in_x() != ARR_INTERIOR ||
+                         cv1.right_parameter_space_in_y() != ARR_INTERIOR ||
+                         (p.x() < cv1.right().x())) &&
+                        (cv2.right_parameter_space_in_x() != ARR_INTERIOR ||
+                         cv2.right_parameter_space_in_y() != ARR_INTERIOR ||
+                         (p.x() < cv2.right().x())));
+
+ 
+      // Compare the two arcs.
+      return cv1.compare_at_intersection (cv2,p,false,_cache);
+    }
+  };
+
+  /*! Obtain a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
+  {
+    return Compare_y_at_x_right_2(_cache);
+  }
+
+  /*! A functor that checks whether two points and two curves are identical. */
+  class Equal_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1> Traits;
+    typedef CGAL::Arr_rational_arc::Cache<Algebraic_kernel_d_1>  Cache;
+    /*! The traits */
+    const Traits* _traits;
+
+    /*! Constructor
+     * \param traits the traits
+     */
+    Equal_2(const Traits* traits) : _traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+    
+  public:
+    /*!
+     * Check if the two x-monotone curves are the same (have the same graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator() (const X_monotone_curve_2& cv1,
+                     const X_monotone_curve_2& cv2) const
+    {
+      if (&cv1 == &cv2)
+        return true;
+
+      return (cv1.equals(cv2));
+    }
+
+    /*!
+     * Check if the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      if (&p1 == &p2)
+        return true;
+
+      return
+        (p1.compare_xy_2(p2, _traits->cache()) == CGAL::EQUAL) ?
+         true : false;
+    }
+  };
+
+  /*! Obtain an Equal_2 functor object. */
+  Equal_2 equal_2_object() const
+  {
+    return Equal_2(this);
+  }
+
+  /*! A functor that divides a curve into continues (x-monotone) curves. */
+  class Make_x_monotone_2
+  {
+  public:
+
+    /*!
+     * Cut the given conic curve (or conic arc) into x-monotone subcurves 
+     * and insert them to the given output iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object. The returned
+     *           objects is a wrapper for an X_monotone_curve_2 object.
+     * \return The past-the-end iterator.
+     */
+    template<typename OutputIterator>
+    OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const 
+    {
+      // Make the rational arc continuous.
+      std::list<X_monotone_curve_2>                           arcs;
+
+      cv.make_continuous(std::back_inserter(arcs));
+
+      // Create objects.
+      typename std::list<X_monotone_curve_2>::const_iterator  iter;
+
+      for (iter = arcs.begin(); iter != arcs.end(); ++iter)
+      {
+        *oi = make_object (*iter);
+        ++oi;
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Obtain a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object() const
+  {
+    return Make_x_monotone_2();
+  }
+
+  /*! A functor that splits a curve at a point. */
+  class Split_2
+  {
+  private:
+    Cache& _cache;
+
+  public:
+    Split_2(Cache& cache) : _cache(cache) {}
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator()(const X_monotone_curve_2& cv, const Point_2 & p,
+                    X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      cv.split(p, c1, c2, _cache);
+    }
+  };
+
+  /*! Obtain a Split_2 functor object. */
+  Split_2 split_2_object() const
+  {
+    return Split_2(_cache);
+  }
+
+  /*! A functor that computes intersections between two curves. */
+  class Intersect_2
+  {
+  private:
+    Cache& _cache;
+  public:
+    Intersect_2(Cache& cache) : _cache(cache) {}
+    /*!
+     * Find the intersections of the two given curves and insert them to the
+     * given output iterator. As two segments may itersect only once, only a
+     * single will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template <typename OutputIterator>
+    OutputIterator operator()(const X_monotone_curve_2& cv1,
+                              const X_monotone_curve_2& cv2,
+                              OutputIterator oi)  const
+    {
+      return (cv1.intersect (cv2, oi,_cache));
+    }
+  };
+
+  /*! Obtain an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object() const
+  {
+    return Intersect_2(_cache);
+  }
+
+  /*! A functor that tests whether two curves can be merged. */
+  class Are_mergeable_2
+  {
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable - if they are supported
+     *         by the same line and share a common endpoint; (false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2) const
+    {
+      return (cv1.can_merge_with(cv2));
+    }
+  };
+
+  /*! Obtain an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object() const
+  {
+    return Are_mergeable_2();
+  }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2
+  {
+  protected:
+    typedef Arr_rational_function_traits_2<Algebraic_kernel_d_1>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits* m_traits;
+    
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits* traits) : m_traits(traits) {}
+
+    friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve (segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2,
+                    X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1));
+
+      c = cv1;
+      c.merge(cv2);
+    }
+  };
+
+  /*! Obtain a Merge_2 functor object. */
+  Merge_2 merge_2_object() const
+  {
+    return Merge_2(this);
+  }
+
+  //@}
+
+  /// \name Functor definitions to handle boundaries
+  //@{
+
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the x-axis
+   */
+  class Parameter_space_in_x_2 {
+  public:
+    /*! Obtains the parameter space at the end of a line along the x-axis.
+     * \param xcv the line
+     * \param ce the line end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the line xcv.
+     *   ARR_LEFT_BOUNDARY  - the line approaches the identification arc from
+     *                        the right at the line left end.
+     *   ARR_INTERIOR       - the line does not approache the identification arc.
+     *   ARR_RIGHT_BOUNDARY - the line approaches the identification arc from
+     *                        the left at the line right end.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
+        Arr_curve_end ce) const
+    {
+      return (ce == ARR_MIN_END) ?
+        xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x();
+    }
+
+    /*! Obtains the parameter space at a point along the x-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     */
+    Arr_parameter_space operator()(const Point_2 ) const
+    {
+      return ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_x_2 function object */
+  Parameter_space_in_x_2 parameter_space_in_x_2_object() const
+  { return Parameter_space_in_x_2(); }
+  
+  /*! A function object that obtains the parameter space of a geometric
+   * entity along the y-axis
+   */
+  class Parameter_space_in_y_2 {
+  public:
+    /*! Obtains the parameter space at the end of a line along the y-axis .
+     * Note that if the line end coincides with a pole, then unless the line
+     * coincides with the identification arc, the line end is considered to
+     * be approaching the boundary, but not on the boundary.
+     * If the line coincides with the identification arc, it is assumed to
+     * be smaller than any other object.
+     * \param xcv the line
+     * \param ce the line end indicator:
+     *     ARR_MIN_END - the minimal end of xc or
+     *     ARR_MAX_END - the maximal end of xc
+     * \return the parameter space at the ce end of the line xcv.
+     *   ARR_BOTTOM_BOUNDARY  - the line approaches the south pole at the line
+     *                          left end.
+     *   ARR_INTERIOR         - the line does not approache a contraction point.
+     *   ARR_TOP_BOUNDARY     - the line approaches the north pole at the line
+     *                          right end.
+     */
+    Arr_parameter_space operator()(const X_monotone_curve_2 & xcv,
+        Arr_curve_end ce) const
+    {
+      return (ce == ARR_MIN_END) ?
+        xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y();
+    }
+
+    /*! Obtains the parameter space at a point along the y-axis.
+     * \param p the point.
+     * \return the parameter space at p.
+     */
+    Arr_parameter_space operator()(const Point_2 ) const
+    {
+      return ARR_INTERIOR;
+    }
+  };
+
+  /*! Obtain a Parameter_space_in_y_2 function object */
+  Parameter_space_in_y_2 parameter_space_in_y_2_object() const
+  { return Parameter_space_in_y_2(); }
+
+  /*! A function object that compares the x-coordinates of arc ends near the
+   * boundary of the parameter space
+   */
+  class Compare_x_near_boundary_2 {
+  public:
+    /*! Compare the x-coordinate of a point with the x-coordinate of
+     * a line end near the boundary at y = +/- oo.
+     * \param p the point direction.
+     * \param xcv the line, the endpoint of which is compared.
+     * \param ce the line-end indicator -
+     *            ARR_MIN_END - the minimal end of xc or
+     *            ARR_MAX_END - the maximal end of xc.
+     * \return the comparison result:
+     *         SMALLER - x(p) < x(xc, ce);
+     *         EQUAL   - x(p) = x(xc, ce);
+     *         LARGER  - x(p) > x(xc, ce).     
+     * \pre p lies in the interior of the parameter space.
+     * \pre the ce end of the line xcv lies on a boundary.
+     */
+    Comparison_result operator()(const Point_2 & p,
+                                 const X_monotone_curve_2 & xcv,
+                                 Arr_curve_end ce) const
+    {
+      Comparison_result r = xcv.compare_end(ce, p);
+      if (r == EQUAL) 
+        return EQUAL; 
+      return (r == NEGATIVE) ? POSITIVE : NEGATIVE ; 
+    }
+
+    /*! Compare the x-coordinates of 2 arcs ends near the boundary of the
+     * parameter space at y = +/- oo.
+     * \param xcv1 the first arc.
+     * \param ce1 the first arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv1 or
+     *            ARR_MAX_END - the maximal end of xcv1.
+     * \param xcv2 the second arc.
+     * \param ce2 the second arc end indicator -
+     *            ARR_MIN_END - the minimal end of xcv2 or
+     *            ARR_MAX_END - the maximal end of xcv2.
+     * \return the second comparison result:
+     *         SMALLER - x(xcv1, ce1) < x(xcv2, ce2);
+     *         EQUAL   - x(xcv1, ce1) = x(xcv2, ce2);
+     *         LARGER  - x(xcv1, ce1) > x(xcv2, ce2).
+     * \pre the ce1 end of the line xcv1 lies on a boundary.
+     * \pre the ce2 end of the line xcv2 lies on a boundary.
+     */
+    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
+                                 Arr_curve_end ce1,
+                                 const X_monotone_curve_2 & xcv2,
+                                 Arr_curve_end ce2) const
+    {
+      return xcv1.compare_ends(ce1, xcv2, ce2);
+    }
+  };
+
+  /*! Obtain a Compare_x_near_boundary_2 function object */
+  Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
+  { return Compare_x_near_boundary_2(); }
+    
+
+  /*! A function object that compares the y-coordinates of arc ends near the
+   * boundary of the parameter space.
+   */
+  class Compare_y_near_boundary_2 
+  {
+  private:
+    Cache& _cache;
+
+  public:
+    /*! Compare the y-coordinates of 2 lines at their ends near the boundary
+     * of the parameter space at x = +/- oo.
+     * \param xcv1 the first arc.
+     * \param xcv2 the second arc.
+     * \param ce the line end indicator.
+     * \return the second comparison result.
+     * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left
+     * boundary or on the right boundary of the parameter space.
+     */
+    Compare_y_near_boundary_2(Cache& cache) : _cache(cache) {}
+    Comparison_result operator()(const X_monotone_curve_2 & xcv1,
+        const X_monotone_curve_2 & xcv2,
+        Arr_curve_end ce) const
+    {
+      return (ce == ARR_MIN_END) ?
+        xcv1.compare_at_minus_infinity(xcv2,_cache) :
+        xcv1.compare_at_plus_infinity(xcv2,_cache);
+    }
+  };
+
+  /*! Obtain a Compare_y_near_boundary_2 function object */
+  Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
+  { return Compare_y_near_boundary_2(_cache); }
+
+ 
+  /*! A function object that compares at limit
+   */
+  //new functor
+  class Compare_x_at_limit_2
+  {
+   public:
+    /*! Compares the x coordinate of p with the curve end
+     * of xcv that is defined by ce at its limit. 
+     * Returns SMALLER, EQUAL, or LARGER accordingly.
+     */
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2&  xcv, 
+                                 Arr_curve_end ce)
+    {
+      CGAL_precondition(Parameter_space_in_x_2()(xcv,ce) == ARR_INTERIOR);
+      CGAL_precondition(Parameter_space_in_y_2()(xcv,ce) != ARR_INTERIOR);
+      return CGAL::compare(p.x(),
+                           (ce == ARR_MIN_END) ? xcv.left_x() : xcv.right_x());
+    }
+    /*! Compares the curve end of  xcv1 that is defined by ce1 
+     *  with the curve end of xcv2 that is defined by ce2
+     * at their limits in x. 
+     * Returns SMALLER, EQUAL, or LARGER accordingly.
+     */
+    Comparison_result operator()(const X_monotone_curve_2&  xcv1, 
+                                 Arr_curve_end ce1,
+                                 const X_monotone_curve_2&  xcv2, 
+                                 Arr_curve_end ce2)
+    {
+      CGAL_precondition(Parameter_space_in_x_2()(xcv1,ce1) == ARR_INTERIOR);
+      CGAL_precondition(Parameter_space_in_y_2()(xcv1,ce1) != ARR_INTERIOR);
+      CGAL_precondition(Parameter_space_in_x_2()(xcv2,ce2) == ARR_INTERIOR);
+      CGAL_precondition(Parameter_space_in_y_2()(xcv2,ce2) != ARR_INTERIOR);
+
+      return CGAL::compare((ce1 == ARR_MIN_END) ? xcv1.left_x() : xcv1.right_x(),
+                           (ce2 == ARR_MIN_END) ? xcv2.left_x() : xcv2.right_x());
+    }
+
+  }; //Compare_x_at_limit_2
+
+  /*! Obtain a Compare_x_at_limit_2 function object */
+  Compare_x_at_limit_2 compare_x_at_limit_2_object() const
+  { return Compare_x_at_limit_2(); }
+  //@}
+  
+  /// \name Functor definitions for the Boolean set-operation traits.
+  //@{
+ 
+  //new functor
+  class Compare_x_near_limit_2
+  {
+  private:
+    Cache& _cache;
+
+  public:
+    Compare_x_near_limit_2(Cache& cache) : _cache(cache) {}
+    /*! Compares the curve end of  xcv1 that is defined by ce1 
+     *  with the curve end of xcv2 that is defined by ce2
+     * at their limits in x. 
+     * Returns SMALLER, EQUAL, or LARGER accordingly.
+     */
+    Comparison_result operator()( const X_monotone_curve_2& xcv1, 
+                                  const X_monotone_curve_2& xcv2, 
+                                  Arr_curve_end ce) const
+    {
+      return xcv1.compare_near_end(xcv2,ce,_cache);
+    }
+  }; //Compare_x_near_limit_2
+
+  /*! Obtain a Compare_x_near_limit_2 function object */
+  Compare_x_near_limit_2 compare_x_near_limit_2_object() const
+  { return Compare_x_near_limit_2(_cache); }
+
+  class Compare_endpoints_xy_2
+  {
+  public:
+
+    /*!
+     * Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv)
+    {
+      if (cv.is_directed_right())
+        return (SMALLER);
+      else
+        return (LARGER);
+    }
+  };
+
+  /*! Obtain a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  {
+    return Compare_endpoints_xy_2();
+  }
+
+  class Construct_opposite_2
+  {
+  public:
+
+    /*!
+     * Construct an opposite x-monotone (with swapped source and target).
+     * \param cv The curve.
+     * \return The opposite curve.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& cv)
+    {
+      return (cv.flip());
+    }
+  };
+
+  /*! Obtain a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  {
+    return Construct_opposite_2();
+  }
+
+  //@}
+
+  class Approximate_2{
+    Approximate_number_type approx_x(const Point_2& p){
+      return Approximate_number_type(p.x().lower());
+    } 
+    Approximate_number_type approx_y(const Point_2& p){
+      typedef typename Algebraic_kernel_d_1::Polynomial_1 Polynomial_1;
+      typename CGAL::Coercion_traits<Polynomial_1,Bound>::Cast cast;  
+      return
+        cast(p.rational_function().numer()).evaluate(p.x().lower())/
+        cast(p.rational_function().denom()).evaluate(p.x().lower());
+    }
+  public:
+    Approximate_number_type operator()(const Point_2& p, int i){
+      if(i==0) return approx_x(p); 
+      if(i==1) return approx_y(p);
+      CGAL_assertion(false);
+      return Approximate_number_type(0);
+    }
+  };
+  
+  Approximate_2 approximate_2_object() const { return Approximate_2(); }
+
+  void cleanup_cache() const
+  {
+    _cache.cleanup();
+  }
+}; //Arr_rational_function_traits_2
+
+}   //namespace CGAL {
+
+
+#endif  //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_segment_traits_2.h
new file mode 100644
index 0000000..3732015
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_segment_traits_2.h
@@ -0,0 +1,1172 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+//                 Efi Fogel         <efif at post.tau.ac.il>
+//                 Waqar Khan        <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_ARR_SEGMENT_TRAITS_2_H
+#define CGAL_ARR_SEGMENT_TRAITS_2_H
+
+/*! \file
+ * The segment traits-class for the arrangement package.
+ */
+
+#include <CGAL/tags.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_geometry_traits/Segment_assertions.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Arr_enums.h>
+#include <fstream>
+
+namespace CGAL {
+
+template <class Kernel_ = Exact_predicates_exact_constructions_kernel>
+class Arr_segment_2;
+
+/*!
+ * \class A traits class for maintaining an arrangement of segments, aoviding
+ * cascading of computations as much as possible.
+ *
+ * The class is derived from the parameterized kernel to extend the traits
+ * with all the types and operations supported by the kernel. This makes it
+ * possible to use the traits class for data structures that extends the
+ * Arrangement_2 type and require objects and operations supported by the
+ * kernel, but not defined in this derived class.
+ */
+template <typename Kernel_ = Exact_predicates_exact_constructions_kernel>
+class Arr_segment_traits_2 : public Kernel_ {
+  friend class Arr_segment_2<Kernel_>;
+
+public:
+  typedef Kernel_                         Kernel;
+  typedef typename Kernel::FT             FT;
+
+  typedef typename Algebraic_structure_traits<FT>::Is_exact
+                                          Has_exact_division;
+
+  // Category tags:
+  typedef Tag_true                        Has_left_category;
+  typedef Tag_true                        Has_merge_category;
+  typedef Tag_false                       Has_do_intersect_category;
+
+  typedef Arr_oblivious_side_tag          Left_side_category;
+  typedef Arr_oblivious_side_tag          Bottom_side_category;
+  typedef Arr_oblivious_side_tag          Top_side_category;
+  typedef Arr_oblivious_side_tag          Right_side_category;
+
+  typedef typename Kernel::Line_2         Line_2;
+  typedef CGAL::Segment_assertions<Arr_segment_traits_2<Kernel> >
+                                          Segment_assertions;
+
+  /*! \class Representation of a segement with cached data.
+   */
+  class _Segment_cached_2 {
+  public:
+    typedef typename Kernel::Line_2                Line_2;
+    typedef typename Kernel::Segment_2             Segment_2;
+    typedef typename Kernel::Point_2               Point_2;
+
+  protected:
+    Line_2    l;                // The line that supports the segment.
+    Point_2   ps;               // The source point of the segment.
+    Point_2   pt;               // The target point of the segment.
+    bool      is_pt_max;        // Is the target (lexicographically) larger
+                                // than the source.
+    bool      is_vert;          // Is this a vertical segment.
+    bool      is_degen;         // Is the segment degenerate (a single point).
+
+  public:
+    /*! Default constructor. */
+    _Segment_cached_2() : is_vert(false), is_degen(true) {}
+
+    /*! Constructor from a segment.
+     * \param seg The segment.
+     * \pre The segment is not degenerate.
+     */
+    _Segment_cached_2(const Segment_2& seg)
+    {
+      Kernel   kernel;
+
+      typename Kernel_::Construct_vertex_2
+        construct_vertex = kernel.construct_vertex_2_object();
+
+      ps = construct_vertex(seg, 0);
+      pt = construct_vertex(seg, 1);
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+      is_degen = (res == EQUAL);
+      is_pt_max = (res == SMALLER);
+
+      CGAL_precondition_msg (! is_degen,
+                             "Cannot construct a degenerate segment.");
+
+      l = kernel.construct_line_2_object()(seg);
+      is_vert = kernel.is_vertical_2_object()(seg);
+    }
+
+    /*!
+     * Construct a segment from two end-points.
+     * \param source The source point.
+     * \param target The target point.
+     * \param The two points must not be equal.
+     */
+    _Segment_cached_2(const Point_2& source, const Point_2& target) :
+      ps(source),
+      pt(target)
+    {
+      Kernel   kernel;
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+      is_degen = (res == EQUAL);
+      is_pt_max = (res == SMALLER);
+
+      CGAL_precondition_msg(! is_degen,
+                            "Cannot construct a degenerate segment.");
+
+      l = kernel.construct_line_2_object()(source, target);
+      is_vert = kernel.is_vertical_2_object()(l);
+    }
+
+    /*!
+     * Construct a segment from two end-points on a supporting line.
+     * \param supp_line The supporting line.
+     * \param source The source point.
+     * \param target The target point.
+     * \pre The two endpoints are not the same and both lie on the given line.
+     */
+    _Segment_cached_2(const Line_2& supp_line,
+                      const Point_2& source, const Point_2& target) :
+      l(supp_line),
+      ps(source),
+      pt(target)
+    {
+      Kernel   kernel;
+
+      CGAL_precondition(
+        Segment_assertions::_assert_is_point_on(source, l,
+                                                Has_exact_division()) &&
+        Segment_assertions::_assert_is_point_on(target,l,
+                                                Has_exact_division())
+        );
+
+      is_vert = kernel.is_vertical_2_object()(l);
+
+      Comparison_result  res = kernel.compare_xy_2_object()(ps, pt);
+      is_degen = (res == EQUAL);
+      is_pt_max = (res == SMALLER);
+
+      CGAL_precondition_msg(! is_degen,
+                            "Cannot contruct a degenerate segment.");
+    }
+
+    /*!
+     * Assignment operator.
+     * \param seg the source segment to copy from
+     * \pre The segment is not degenerate.
+     */
+    const _Segment_cached_2& operator= (const Segment_2& seg)
+    {
+      Kernel   kernel;
+
+      typename Kernel_::Construct_vertex_2
+        construct_vertex = kernel.construct_vertex_2_object();
+
+      ps = construct_vertex(seg, 0);
+      pt = construct_vertex(seg, 1);
+
+      Comparison_result res = kernel.compare_xy_2_object()(ps, pt);
+      is_degen = (res == EQUAL);
+      is_pt_max = (res == SMALLER);
+
+      CGAL_precondition_msg(! is_degen,
+                            "Cannot contruct a degenerate segment.");
+
+      l = kernel.construct_line_2_object()(seg);
+      is_vert = kernel.is_vertical_2_object()(seg);
+
+      return (*this);
+    }
+
+    /*! Obtain the (lexicographically) left endpoint.
+     */
+    const Point_2& left() const { return (is_pt_max ? ps : pt); }
+
+    /*! Set the (lexicographically) left endpoint.
+     * \param p The point to set.
+     * \pre p lies on the supporting line to the left of the right endpoint.
+     */
+    void set_left(const Point_2& p)
+    {
+      CGAL_precondition (! is_degen);
+      CGAL_precondition_code (
+        Kernel    kernel;
+      );
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, l,
+                                                  Has_exact_division()) &&
+         kernel.compare_xy_2_object() (p, right()) == SMALLER);
+
+      if (is_pt_max) ps = p;
+      else pt = p;
+    }
+
+    /*! Obtain the (lexicographically) right endpoint.
+     */
+    const Point_2& right() const { return (is_pt_max ? pt : ps); }
+
+    /*! Set the (lexicographically) right endpoint.
+     * \param p The point to set.
+     * \pre p lies on the supporting line to the right of the left endpoint.
+     */
+    void set_right(const Point_2& p)
+    {
+      CGAL_precondition(! is_degen);
+      CGAL_precondition_code(
+        Kernel    kernel;
+      );
+      CGAL_precondition
+        (Segment_assertions::_assert_is_point_on (p, l,
+                                                  Has_exact_division()) &&
+         kernel.compare_xy_2_object() (p, left()) == LARGER);
+
+      if (is_pt_max) pt = p;
+      else ps = p;
+    }
+
+    /*! Obtain the supporting line.
+     */
+    const Line_2& line() const
+    {
+      CGAL_precondition(! is_degen);
+      return (l);
+    }
+
+    /*! Determine whether the curve is vertical.
+     */
+    bool is_vertical() const
+    {
+      CGAL_precondition(! is_degen);
+      return (is_vert);
+    }
+
+    /*! Determine whether the curve is directed lexicographic from left to right
+     */
+    bool is_directed_right() const { return (is_pt_max); }
+
+    /*! Determine whether the given point is in the x-range of the segment.
+     * \param p The query point.
+     * \return (true) is in the x-range of the segment; (false) if it is not.
+     */
+    bool is_in_x_range(const Point_2& p) const
+    {
+      Kernel                          kernel;
+      typename Kernel_::Compare_x_2   compare_x = kernel.compare_x_2_object();
+      const Comparison_result         res1 = compare_x(p, left());
+
+      if (res1 == SMALLER) return (false);
+      else if (res1 == EQUAL) return (true);
+
+      const Comparison_result res2 = compare_x(p, right());
+      return (res2 != LARGER);
+    }
+
+    /*! Determine whether the given point is in the y-range of the segment.
+     * \param p The query point.
+     * \return (true) is in the y-range of the segment; (false) if it is not.
+     */
+    bool is_in_y_range(const Point_2& p) const
+    {
+      Kernel                          kernel;
+      typename Kernel_::Compare_y_2   compare_y = kernel.compare_y_2_object();
+      const Comparison_result         res1 = compare_y (p, left());
+
+      if (res1 == SMALLER) return (false);
+      else if (res1 == EQUAL) return (true);
+
+      const Comparison_result res2 = compare_y (p, right());
+      return (res2 != LARGER);
+    }
+  };
+
+public:
+  // Traits objects
+  typedef typename Kernel::Point_2        Point_2;
+  typedef Arr_segment_2<Kernel>           X_monotone_curve_2;
+  typedef Arr_segment_2<Kernel>           Curve_2;
+  typedef unsigned int                    Multiplicity;
+
+public:
+  /*! Default constructor. */
+  Arr_segment_traits_2() {}
+
+  /// \name Basic functor definitions.
+  //@{
+
+  class Compare_x_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_x_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Compare the x-coordinates of two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2);
+     *         SMALLER if x(p1) < x(p2);
+     *         EQUAL if x(p1) = x(p2).
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      const Kernel& kernel = m_traits;
+
+      return (kernel.compare_x_2_object()(p1, p2));
+    }
+  };
+
+  /*! Get a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
+
+  class Compare_xy_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_xy_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Compare two points lexigoraphically: by x, then by y.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
+     *         SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2);
+     *         EQUAL if the two points are equal.
+     */
+    Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      const Kernel& kernel = m_traits;
+      return (kernel.compare_xy_2_object()(p1, p2));
+    }
+  };
+
+  /*! Get a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
+
+  class Construct_min_vertex_2 {
+  public:
+    /*!
+     * Get the left endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The left endpoint.
+     */
+    const Point_2& operator()(const X_monotone_curve_2& cv) const
+    { return (cv.left()); }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object() const
+  { return Construct_min_vertex_2(); }
+
+  class Construct_max_vertex_2 {
+  public:
+    /*!
+     * Get the right endpoint of the x-monotone curve (segment).
+     * \param cv The curve.
+     * \return The right endpoint.
+     */
+    const Point_2& operator() (const X_monotone_curve_2& cv) const
+    { return (cv.right()); }
+  };
+
+  /*! Get a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object() const
+  { return Construct_max_vertex_2(); }
+
+  class Is_vertical_2 {
+  public:
+    /*!
+     * Check whether the given x-monotone curve is a vertical segment.
+     * \param cv The curve.
+     * \return (true) if the curve is a vertical segment; (false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv) const
+    { return (cv.is_vertical()); }
+  };
+
+  /*! Get an Is_vertical_2 functor object. */
+  Is_vertical_2 is_vertical_2_object () const
+  { return Is_vertical_2(); }
+
+  class Compare_y_at_x_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Return the location of the given point with respect to the input curve.
+     * \param cv The curve.
+     * \param p The point.
+     * \pre p is in the x-range of cv.
+     * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
+     *         LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
+     *         EQUAL if p lies on the curve.
+     */
+    Comparison_result operator()(const Point_2& p,
+                                 const X_monotone_curve_2& cv) const
+    {
+      CGAL_precondition (cv.is_in_x_range(p));
+
+      const Kernel& kernel = m_traits;
+
+      if (! cv.is_vertical()) {
+        // Compare p with the segment's supporting line.
+        return (kernel.compare_y_at_x_2_object()(p, cv.line()));
+      }
+      else {
+        // Compare with the vertical segment's end-points.
+        typename Kernel::Compare_y_2  compare_y = kernel.compare_y_2_object();
+        Comparison_result res1 = compare_y(p, cv.left());
+        Comparison_result res2 = compare_y(p, cv.right());
+
+        return (res1 == res2) ? res1 : EQUAL;
+      }
+    }
+  };
+
+  /*! Get a Compare_y_at_x_2 functor object. */
+  Compare_y_at_x_2 compare_y_at_x_2_object() const
+  { return Compare_y_at_x_2(*this); }
+
+  class Compare_y_at_x_left_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Compare the y value of two x-monotone curves immediately to the left
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its left.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the left of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv1,
+                                 const X_monotone_curve_2& cv2,
+                                 const Point_2& CGAL_assertion_code(p)) const
+    {
+      const Kernel& kernel = m_traits;
+
+      // Make sure that p lies on both curves, and that both are defined to its
+      // left (so their left endpoint is lexicographically smaller than p).
+      CGAL_precondition_code(
+        typename Kernel::Compare_xy_2 compare_xy =
+          kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition(
+         (m_traits.compare_y_at_x_2_object()(p, cv1) == EQUAL) &&
+         (m_traits.compare_y_at_x_2_object()(p, cv2) == EQUAL));
+
+      CGAL_precondition(compare_xy(cv1.left(), p) == SMALLER &&
+                        compare_xy(cv2.left(), p) == SMALLER);
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+      // Notice we use the supporting lines in order to compare the slopes,
+      // and that we swap the order of the curves in order to obtain the
+      // correct result to the left of p.
+      return (kernel.compare_slope_2_object()(cv2.line(), cv1.line()));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_left_2 functor object. */
+  Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
+  { return Compare_y_at_x_left_2(*this); }
+
+  class Compare_y_at_x_right_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Compare the y value of two x-monotone curves immediately to the right
+     * of their intersection point.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param p The intersection point.
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographically) to its right.
+     * \return The relative position of cv1 with respect to cv2 immdiately to
+     *         the right of p: SMALLER, LARGER or EQUAL.
+     */
+    Comparison_result operator()(const X_monotone_curve_2& cv1,
+                                 const X_monotone_curve_2& cv2,
+                                 const Point_2& CGAL_assertion_code(p)) const
+    {
+      const Kernel& kernel = m_traits;
+
+      // Make sure that p lies on both curves, and that both are defined to its
+      // right (so their right endpoint is lexicographically larger than p).
+      CGAL_precondition_code (
+        typename Kernel::Compare_xy_2 compare_xy =
+          kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition(
+        (m_traits.compare_y_at_x_2_object()(p, cv1) == EQUAL) &&
+        (m_traits.compare_y_at_x_2_object()(p, cv2) == EQUAL));
+
+      CGAL_precondition(compare_xy(cv1.right(), p) == LARGER &&
+                        compare_xy(cv2.right(), p) == LARGER);
+
+      // Compare the slopes of the two segments to determine thir relative
+      // position immediately to the left of q.
+      // Notice we use the supporting lines in order to compare the slopes.
+      return (kernel.compare_slope_2_object()(cv1.line(), cv2.line()));
+    }
+  };
+
+  /*! Get a Compare_y_at_x_right_2 functor object. */
+  Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
+  { return Compare_y_at_x_right_2(*this); }
+
+  class Equal_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Equal_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Check if the two x-monotone curves are the same (have the same graph).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are the same; (false) otherwise.
+     */
+    bool operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2) const
+    {
+      const Kernel& kernel = m_traits;
+      typename Kernel::Equal_2  equal = kernel.equal_2_object();
+
+      return (equal(cv1.left(), cv2.left()) &&
+              equal(cv1.right(), cv2.right()));
+    }
+
+    /*! Detemine whether the two points are the same.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \return (true) if the two point are the same; (false) otherwise.
+     */
+    bool operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      const Kernel& kernel = m_traits;
+      return (kernel.equal_2_object()(p1, p2));
+    }
+  };
+
+  /*! Get an Equal_2 functor object. */
+  Equal_2 equal_2_object() const { return Equal_2(*this); }
+  //@}
+
+  /// \name Functor definitions for supporting intersections.
+  //@{
+
+  class Make_x_monotone_2 {
+  public:
+    /*!
+     * Cut the given curve into x-monotone subcurves and insert them into the
+     * given output iterator. As segments are always x_monotone, only one
+     * object will be contained in the iterator.
+     * \param cv The curve.
+     * \param oi The output iterator, whose value-type is Object.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const
+    {
+      // Wrap the segment with an object.
+      *oi = make_object (cv);
+      ++oi;
+      return (oi);
+    }
+  };
+
+  /*! Get a Make_x_monotone_2 functor object. */
+  Make_x_monotone_2 make_x_monotone_2_object() const
+  { return Make_x_monotone_2(); }
+
+  class Split_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Split_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     * \param cv The curve to split
+     * \param p The split point.
+     * \param c1 Output: The left resulting subcurve (p is its right endpoint).
+     * \param c2 Output: The right resulting subcurve (p is its left endpoint).
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void operator()(const X_monotone_curve_2& cv, const Point_2& p,
+                    X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      // Make sure that p lies on the interior of the curve.
+      CGAL_precondition_code (
+        const Kernel& kernel = m_traits;
+        typename Kernel::Compare_xy_2 compare_xy =
+          kernel.compare_xy_2_object();
+      );
+
+      CGAL_precondition(
+        (m_traits.compare_y_at_x_2_object()(p, cv) == EQUAL) &&
+        compare_xy(cv.left(), p) == SMALLER &&
+        compare_xy(cv.right(), p) == LARGER);
+
+      // Perform the split.
+      c1 = cv;
+      c1.set_right (p);
+
+      c2 = cv;
+      c2.set_left (p);
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const { return Split_2(*this); }
+
+  class Intersect_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Intersect_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Find the intersections of the two given curves and insert them into the
+     * given output iterator. As two segments may itersect only once, only a
+     * single intersection will be contained in the iterator.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param oi The output iterator.
+     * \return The past-the-end iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      // Intersect the two supporting lines.
+      const Kernel& kernel = m_traits;
+      CGAL::Object obj = kernel.intersect_2_object()(cv1.line(), cv2.line());
+
+      if (obj.is_empty()) {
+        // The supporting line are parallel lines and do not intersect:
+        return (oi);
+      }
+
+      // Check if we have a single intersection point.
+      const Point_2  *ip = object_cast<Point_2> (&obj);
+
+      if (ip != NULL) {
+        // Check if the intersection point ip lies on both segments.
+        const bool    ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
+                                                      cv1.is_in_x_range(*ip);
+
+        if (ip_on_cv1) {
+          const bool  ip_on_cv2 = cv2.is_vertical() ? cv2.is_in_y_range(*ip) :
+                                                      cv2.is_in_x_range(*ip);
+
+          if (ip_on_cv2) {
+            // Create a pair representing the point with its multiplicity,
+            // which is always 1 for line segments.
+            std::pair<Point_2, Multiplicity>   ip_mult (*ip, 1);
+            *oi = make_object (ip_mult);
+            oi++;
+          }
+        }
+        return (oi);
+      }
+
+      // In this case, the two supporting lines overlap.
+      // The overlapping segment is therefore [p_l,p_r], where p_l is the
+      // rightmost of the two left endpoints and p_r is the leftmost of the
+      // two right endpoints.
+      typename Kernel::Compare_xy_2  compare_xy = kernel.compare_xy_2_object();
+      Point_2                        p_l, p_r;
+
+      if (compare_xy (cv1.left(), cv2.left()) == SMALLER) p_l = cv2.left();
+      else p_l = cv1.left();
+
+      if (compare_xy (cv1.right(), cv2.right()) == SMALLER) p_r = cv1.right();
+      else p_r = cv2.right();
+
+      // Examine the resulting segment.
+      const Comparison_result        res = compare_xy (p_l, p_r);
+
+      if (res == SMALLER) {
+        // We have discovered an overlapping segment:
+        if (cv1.is_directed_right() == cv2.is_directed_right()) {
+          // cv1 and cv2 have the same directions, maintain this direction
+          // in the overlap segment
+          if (cv1.is_directed_right()) {
+            X_monotone_curve_2  overlap_seg(cv1.line(), p_l, p_r);
+            *oi++ = make_object(overlap_seg);
+          }
+          else {
+            X_monotone_curve_2  overlap_seg(cv1.line(), p_r, p_l);
+            *oi++ = make_object(overlap_seg);
+          }
+        }
+        else {
+          // cv1 and cv2 have opposite directions, the overlap segment
+          // will be directed from left to right
+          X_monotone_curve_2  overlap_seg(cv1.line(), p_l, p_r);
+          *oi++ = make_object(overlap_seg);
+        }
+      }
+      else if (res == EQUAL) {
+        // The two segment have the same supporting line, but they just share
+        // a common endpoint. Thus we have an intersection point, but we leave
+        // the multiplicity of this point undefined.
+        std::pair<Point_2, Multiplicity> ip_mult(p_r, 0);
+        *oi++ = make_object(ip_mult);
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
+
+  class Are_mergeable_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Are_mergeable_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Check whether it is possible to merge two given x-monotone curves.
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \return (true) if the two curves are mergeable, that is, if they are
+     *         supported by the same line; (false) otherwise.
+     * \pre cv1 and cv2 share a common endpoint.
+     */
+    bool operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2) const
+    {
+      if (!m_traits.equal_2_object()(cv1.right(), cv2.left()) &&
+          !m_traits.equal_2_object()(cv2.right(), cv1.left()))
+        return false;
+
+      // Check whether the two curves have the same supporting line.
+      const Kernel& kernel = m_traits;
+      typename Kernel::Equal_2 equal = kernel.equal_2_object();
+      return (equal(cv1.line(), cv2.line()) ||
+              equal(cv1.line(),
+                    kernel.construct_opposite_line_2_object()(cv2.line())));
+    }
+  };
+
+  /*! Get an Are_mergeable_2 functor object. */
+  Are_mergeable_2 are_mergeable_2_object() const
+  { return Are_mergeable_2(*this); }
+
+  /*! \class Merge_2
+   * A functor that merges two x-monotone arcs into one.
+   */
+  class Merge_2 {
+  protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state) */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Merge_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+  public:
+    /*!
+     * Merge two given x-monotone curves into a single curve (segment).
+     * \param cv1 The first curve.
+     * \param cv2 The second curve.
+     * \param c Output: The merged curve.
+     * \pre The two curves are mergeable.
+     */
+    void operator()(const X_monotone_curve_2& cv1,
+                    const X_monotone_curve_2& cv2,
+                    X_monotone_curve_2& c) const
+    {
+      CGAL_precondition(m_traits.are_mergeable_2_object()(cv1, cv2));
+
+      Equal_2 equal = m_traits.equal_2_object();
+
+      // Check which curve extends to the right of the other.
+      if (equal(cv1.right(), cv2.left())) {
+        // cv2 extends cv1 to the right.
+        c = cv1;
+        c.set_right(cv2.right());
+      }
+      else {
+        CGAL_precondition(equal(cv2.right(), cv1.left()));
+
+        // cv1 extends cv2 to the right.
+        c = cv2;
+        c.set_right(cv1.right());
+      }
+    }
+  };
+
+  /*! Get a Merge_2 functor object. */
+  Merge_2 merge_2_object() const { return Merge_2(*this); }
+  //@}
+
+  /// \name Functor definitions for the landmarks point-location strategy.
+  //@{
+  typedef double                          Approximate_number_type;
+
+  class Approximate_2 {
+  public:
+    /*!
+     * Return an approximation of a point coordinate.
+     * \param p The exact point.
+     * \param i The coordinate index (either 0 or 1).
+     * \pre i is either 0 or 1.
+     * \return An approximation of p's x-coordinate (if i == 0), or an
+     *         approximation of p's y-coordinate (if i == 1).
+     */
+    Approximate_number_type operator()(const Point_2& p, int i) const
+    {
+      CGAL_precondition((i == 0) || (i == 1));
+      return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
+    }
+  };
+
+  /*! Get an Approximate_2 functor object. */
+  Approximate_2 approximate_2_object() const { return Approximate_2(); }
+
+  class Construct_x_monotone_curve_2 {
+  public:
+    /*!
+     * Return an x-monotone curve connecting the two given endpoints.
+     * \param p The first point.
+     * \param q The second point.
+     * \pre p and q must not be the same.
+     * \return A segment connecting p and q.
+     */
+    X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const
+    { return (X_monotone_curve_2(p, q)); }
+  };
+
+  /*! Get a Construct_x_monotone_curve_2 functor object. */
+  Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
+  { return Construct_x_monotone_curve_2(); }
+  //@}
+
+  /// \name Functor definitions for the Boolean set-operation traits.
+  //@{
+
+  class Trim_2 {
+   protected:
+    typedef Arr_segment_traits_2<Kernel>        Traits;
+
+    /*! The traits (in case it has state). */
+    const Traits& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Trim_2(const Traits& traits) : m_traits(traits) {}
+
+    friend class Arr_segment_traits_2<Kernel>;
+
+    /*! Obtain a trimmed version of a line.
+     * \param xseg The x-mnotone segmet.
+     * \param src the new start endpoint.
+     * \param tgt the new end endpoint.
+     * \return The trimmed x-monotone segment.
+     * \pre src != tgt
+     * \pre both points must lie on segment
+     */
+  public:
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
+                                  const Point_2& src,
+                                  const Point_2& tgt)const
+    {
+      CGAL_precondition_code(Equal_2 equal = m_traits.equal_2_object());
+      CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x =
+                             m_traits.compare_y_at_x_2_object());
+      Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
+
+      // check whether source and taget are two distinct points and they lie
+      // on the line.
+      CGAL_precondition(!equal(src, tgt));
+      CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL);
+      CGAL_precondition(compare_y_at_x(tgt, xcv) == EQUAL);
+
+      // exchange src and tgt IF they do not conform with the direction
+      X_monotone_curve_2 trimmed_segment;
+
+      if (xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER)
+        trimmed_segment = X_monotone_curve_2(tgt, src);
+      else if (!xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER )
+        trimmed_segment = X_monotone_curve_2(tgt, src);
+      else trimmed_segment = X_monotone_curve_2(src, tgt);
+      return (trimmed_segment);
+    }
+  };
+
+  //get a Trim_2 functor object
+  Trim_2 trim_2_object() const { return Trim_2(*this); }
+
+  class Compare_endpoints_xy_2
+  {
+  public:
+    /*!
+     * Compare the endpoints of an $x$-monotone curve lexicographically.
+     * (assuming the curve has a designated source and target points).
+     * \param cv The curve.
+     * \return SMALLER if the curve is directed right;
+     *         LARGER if the curve is directed left.
+     */
+    Comparison_result operator() (const X_monotone_curve_2& cv) const
+    { return (cv.is_directed_right()) ? (SMALLER) : (LARGER); }
+  };
+
+  /*! Get a Compare_endpoints_xy_2 functor object. */
+  Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
+  { return Compare_endpoints_xy_2(); }
+
+  class Construct_opposite_2 {
+  public:
+    /*!
+     * Construct an opposite x-monotone (with swapped source and target).
+     * \param cv The curve.
+     * \return The opposite curve.
+     */
+    X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const
+    { return (cv.flip()); }
+  };
+
+  /*! Get a Construct_opposite_2 functor object. */
+  Construct_opposite_2 construct_opposite_2_object() const
+  { return Construct_opposite_2(); }
+  //@}
+};
+
+/*!
+ * \class A representation of a segment, as used by the Arr_segment_traits_2
+ * traits-class.
+ */
+template <class Kernel_>
+class Arr_segment_2 :
+    public Arr_segment_traits_2<Kernel_>::_Segment_cached_2
+{
+  typedef Kernel_                                                  Kernel;
+  typedef typename Arr_segment_traits_2<Kernel>::_Segment_cached_2 Base;
+  typedef typename Kernel::Segment_2                               Segment_2;
+  typedef typename Kernel::Point_2                                 Point_2;
+  typedef typename Kernel::Line_2                                  Line_2;
+
+public:
+  /*! Default constructor. */
+  Arr_segment_2() : Base() {}
+
+  /*! Constructor from a "kernel" segment.
+   * \param seg The segment.
+   * \pre The segment is not degenerate.
+   */
+  Arr_segment_2(const Segment_2& seg) : Base(seg) {}
+
+  /*! Construct a segment from two end-points.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre The two points are not the same.
+   */
+  Arr_segment_2(const Point_2& source, const Point_2& target) :
+    Base(source,target)
+  {}
+
+  /*! Construct a segment from a line and two end-points.
+   * \param line The supporting line.
+   * \param source The source point.
+   * \param target The target point.
+   * \pre Both source and target must be on the supporting line.
+   * \pre The two points are not the same.
+   */
+  Arr_segment_2(const Line_2& line,
+                const Point_2& source, const Point_2& target) :
+    Base(line,source,target)
+  {}
+
+  /*! Cast to a segment.
+   */
+  operator Segment_2() const
+  {
+    Kernel kernel;
+    Segment_2 seg = kernel.construct_segment_2_object()(this->ps, this->pt);
+    return (seg);
+  }
+
+  /*! Create a bounding box for the segment.
+   */
+  Bbox_2 bbox() const
+  {
+    Kernel kernel;
+    Segment_2 seg = kernel.construct_segment_2_object()(this->ps, this->pt);
+    return (kernel.construct_bbox_2_object() (seg));
+  }
+
+  /*! Obtain the segment source.
+   */
+  const Point_2& source() const { return (this->ps); }
+
+  /*! Obtain the segment target.
+   */
+  const Point_2& target() const { return (this->pt); }
+
+  /*! Flip the segment (swap its source and target).
+   */
+  Arr_segment_2 flip() const
+  {
+    Arr_segment_2   opp;
+    opp.l = this->l;
+    opp.ps = this->pt;
+    opp.pt = this->ps;
+    opp.is_pt_max = !(this->is_pt_max);
+    opp.is_vert = this->is_vert;
+    opp.is_degen = this->is_degen;
+
+    return (opp);
+  }
+};
+
+/*! Exporter for the segment class used by the traits-class.
+ */
+template <class Kernel, class OutputStream>
+OutputStream& operator<<(OutputStream& os, const Arr_segment_2<Kernel>& seg)
+{
+  os << static_cast<typename Kernel::Segment_2>(seg);
+  return (os);
+}
+
+/*! Importer for the segment class used by the traits-class.
+ */
+template <class Kernel, class InputStream>
+InputStream& operator>>(InputStream& is, Arr_segment_2<Kernel>& seg)
+{
+  typename Kernel::Segment_2   kernel_seg;
+  is >> kernel_seg;
+  seg = kernel_seg;
+  return (is);
+}
+
+} //namespace CGAL
+
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_simple_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_simple_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_simple_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_simple_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_topology_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_topology_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_spherical_topology_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_spherical_topology_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_tags.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
new file mode 100644
index 0000000..0515c37
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
@@ -0,0 +1,889 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Efi Fogel         <efif at post.tau.ac.il>
+//                 Ron Wein          <wein at post.tau.ac.il>
+
+#ifndef CGAL_ARR_SPHERICAL_TOPOLOGY_TRAITS_2_IMPL_H
+#define CGAL_ARR_SPHERICAL_TOPOLOGY_TRAITS_2_IMPL_H
+
+/*! \file
+ * Member-function definitions for the
+ * Arr_spherical_topology_traits_2<GeomTraits> class.
+ */
+
+namespace CGAL {
+
+/*! \brief constructs default */
+template <typename GeomTraits, typename Dcel>
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+Arr_spherical_topology_traits_2() :
+  m_spherical_face(NULL),
+  m_north_pole(NULL),
+  m_south_pole(NULL),
+  m_own_geom_traits(true)
+{
+  m_geom_traits = new Traits_adaptor_2;
+  m_boundary_vertices = Vertex_map(Vertex_key_comparer(m_geom_traits));
+}
+
+/*! \brief constructs from a geometry-traits object. */
+template <typename GeomTraits, typename Dcel>
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+Arr_spherical_topology_traits_2(const Geometry_traits_2* traits) :
+  m_spherical_face(NULL),
+  m_north_pole(NULL),
+  m_south_pole(NULL),
+  m_own_geom_traits(false)
+{
+  m_geom_traits = static_cast<const Traits_adaptor_2*>(traits);
+  m_boundary_vertices = Vertex_map(Vertex_key_comparer(m_geom_traits));
+}
+
+/*! \brief destructs */
+template <typename GeomTraits, typename Dcel>
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+~Arr_spherical_topology_traits_2()
+{
+  // Clear the DCEL.
+  m_dcel.delete_all();
+
+  if (m_own_geom_traits && (m_geom_traits != NULL)) {
+    delete m_geom_traits;
+    m_geom_traits = NULL;
+  }
+}
+
+/*! \brief assigns the contents of another topology-traits class */
+template <typename GeomTraits, typename Dcel>
+void Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+assign(const Self& other)
+{
+  // Clear the current DCEL and duplicate the other DCEL.
+  m_dcel.delete_all();
+  m_dcel.assign(other.m_dcel);
+
+  // Take care of the traits object.
+  if (m_own_geom_traits && m_geom_traits != NULL) {
+    delete m_geom_traits;
+    m_geom_traits = NULL;
+  }
+
+  if (other.m_own_geom_traits) {
+    m_geom_traits = new Traits_adaptor_2;
+    m_own_geom_traits = true;
+  }
+  else {
+    m_geom_traits = other.m_geom_traits;
+    m_own_geom_traits = false;
+  }
+
+  // Update the rest of the properties.
+  dcel_updated();
+}
+
+/*! \brief initializes an empty DCEL structure. */
+template <typename GeomTraits_, typename Dcel_>
+void Arr_spherical_topology_traits_2<GeomTraits_, Dcel_>::dcel_updated()
+{
+  typedef Dcel_                                         Dcel;
+
+  // Go over the DCEL vertices and locate the south and north pole (if any)
+  // and any other vertex on the line of discontinuity.
+
+  m_north_pole = NULL;
+  m_south_pole = NULL;
+  m_boundary_vertices.clear();
+
+  typename Dcel::Vertex_iterator vit = this->m_dcel.vertices_begin();
+  for (; vit != this->m_dcel.vertices_end(); ++vit) {
+    Arr_parameter_space bx = vit->parameter_space_in_x();
+    Arr_parameter_space by = vit->parameter_space_in_y();
+
+    if (by == ARR_BOTTOM_BOUNDARY) m_south_pole = &(*vit);
+    else if (by == ARR_TOP_BOUNDARY) m_north_pole = &(*vit);
+    else if (bx != ARR_INTERIOR) {
+      const Point_2& key = vit->point();
+      m_boundary_vertices.insert(Vertex_value(key, &(*vit)));
+    }
+  }
+
+  // Go over the DCEL faces and locate the spherical face, which is the only
+  // face with no outer CCB.
+
+  m_spherical_face = NULL;
+  typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
+  for (; fit != this->m_dcel.faces_end(); ++fit) {
+    if (fit->number_of_outer_ccbs() == 0) {
+      CGAL_assertion(m_spherical_face == NULL);
+
+      m_spherical_face = &(*fit);
+      break;
+    }
+  }
+  CGAL_assertion(m_spherical_face != NULL);
+}
+
+/*! \brief initializes an empty DCEL structure. */
+template <typename GeomTraits, typename Dcel>
+void Arr_spherical_topology_traits_2<GeomTraits, Dcel>::init_dcel()
+{
+  // std::cout << "init_dcel()" << std::endl;
+  // Clear the current DCEL.
+  m_dcel.delete_all();
+  m_boundary_vertices.clear();
+
+  // Create the face.
+  m_spherical_face = this->m_dcel.new_face();
+  m_spherical_face->set_unbounded(false);
+  m_spherical_face->set_fictitious(false);
+
+  m_north_pole = NULL;
+  m_south_pole = NULL;
+}
+
+/*! \brief determines whether a point lies in the interior of a given face. */
+template <typename GeomTraits, typename Dcel>
+bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
+{
+  // std::cout << "is_in_face()" << std::endl;
+  CGAL_precondition((v == NULL) || !v->has_null_point());
+  CGAL_precondition((v == NULL) ||
+                    m_geom_traits->equal_2_object()(p, v->point()));
+
+  /* There is always one face that contains everything else. It has no
+   * outer CCB's. When a new face is constructed, we make sure that the
+   * face that contains everything also contains the north pole. (In the
+   * degenerate case, where a vertex coincides with the north pole, the face
+   * that contains everything is incident to the north pole.)
+   * If the face has no outer ccb's, it contains everything:
+   */
+#if 0
+  std::cout << "p: " << p
+            << ", f->number_of_outer_ccbs(): " << f->number_of_outer_ccbs()
+            << std::endl;
+#endif
+  if (f->number_of_outer_ccbs() == 0) return true;
+  if (((v != NULL) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
+      (m_geom_traits->parameter_space_in_y_2_object()(p) == ARR_TOP_BOUNDARY))
+    return false;
+
+  /*! \todo a temporary test
+   * if (((v != NULL) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
+   *   (p.is_min_boundary()))
+   * return false;
+   */
+
+  typename Traits_adaptor_2::Parameter_space_in_x_2 ps_x_op =
+    m_geom_traits->parameter_space_in_x_2_object();
+  typename Traits_adaptor_2::Parameter_space_in_y_2 ps_y_op =
+    m_geom_traits->parameter_space_in_y_2_object();
+  typename Traits_adaptor_2::Compare_x_2 cmp_x_op =
+    m_geom_traits->compare_x_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_2 cmp_y_at_x_op =
+    m_geom_traits->compare_y_at_x_2_object();
+  typename Traits_adaptor_2::Compare_x_point_curve_end_2 cmp_x_pt_ce =
+    m_geom_traits->compare_x_point_curve_end_2_object();
+
+  // Process the input point.
+  bool p_is_interior_x = !(m_geom_traits->is_on_y_identification_2_object()(p));
+
+  /* Maintain a counter of the number of x-monotone curves that intersect an
+   * upward vertical ray emanating from p. Handle degenerate cases as
+   * explained below).
+   */
+  unsigned int num_intersections = 0;
+
+  /* Traverse all outer CCBs of the face. For each boundary component go over
+   * all its halfedges, and count those which are above p.
+   */
+  typename Face::Outer_ccb_const_iterator oit;
+  for (oit = f->outer_ccbs_begin(); oit != f->outer_ccbs_end(); ++oit) {
+    const Halfedge* first = *oit;
+    const Halfedge* curr = first;
+
+    /* Compare p to the source vertex of the first halfedge. If p coincides
+     * with this vertex, p is obviously not in the interior of the face.
+     */
+    if (curr->opposite()->vertex() == v) return false;
+
+    /*! We identify 2 main cases:
+     * 1. The vertical ray intersects the boundary at a halfedge. In this
+     * case the x-possition of p is strictly larger than the x-possition of
+     * the current-curve source, and strictly smaller than x-possition of
+     * the current-curve target, or vise versa.
+     * 2. The vertical ray intersects the boundary at a vertex. In this case:
+     * a. the x-possition of p is strictly smaller than the x-position of the
+     * current-curve source, and equal to the x-position of the current-curve
+     * target, and
+     * b. the x-possition of p is equal to the x-position of the next-curve
+     * source (not counting vertical curves in between), and strictly larger
+     * than the x-possition of the next-curve target, or vise verase (that is,
+     * the "smaller" and "larger" interchanged).
+     */
+
+    /* Indicates that a change between the x-position of p and the x-position
+     * of the current-curve source, and the x-position of p and the x-position
+     * of the current-curve target is pending. Used to handle case (2) above.
+     */
+    bool change_pending = false;
+
+    /*! Indicates that the conditions described in (2.b) above are met during
+     * the 1st iteration in the loop, which implies that the last curve must be
+     * checked.
+     */
+    bool last_pending = false;
+
+    Comparison_result res_pending = EQUAL, res_last = EQUAL,
+      res_source = EQUAL, res_target;
+    Arr_parameter_space ps_x_pending = ARR_INTERIOR, ps_x_last = ARR_INTERIOR,
+      ps_x_source, ps_x_target = ARR_INTERIOR,
+      ps_y_source, ps_y_target;
+
+    do {
+      /* Compare p to the target vertex of the current halfedge. If the
+       * vertex v is on the boundary of the component, p is not in the interior
+       * the face.
+       */
+      if (curr->vertex() == v) return false;
+
+      // Ignore vertical curves:
+      bool is_vertical = m_geom_traits->is_vertical_2_object()(curr->curve());
+      if (is_vertical) {
+        /* If this outer ccb chain contains the north pole, and our point
+         * lies horizontaly between the two vertical curves that meet at
+         * the north pole, increase the intersection counter
+         */
+        if (curr->direction() == ARR_LEFT_TO_RIGHT) {
+          Arr_parameter_space ps_y_1 = ps_y_op(curr->curve(), ARR_MAX_END);
+          Arr_parameter_space ps_y_2 = ps_y_op(curr->next()->curve(),
+                                               ARR_MAX_END);
+          if ((ps_y_1 == ARR_TOP_BOUNDARY) && (ps_y_2 == ARR_TOP_BOUNDARY)) {
+            // Compare the x-coordinates:
+            Comparison_result rc1 =
+              cmp_x_pt_ce(p, curr->curve(), ARR_MAX_END);
+            Comparison_result rc2 =
+              cmp_x_pt_ce(p, curr->next()->curve(), ARR_MAX_END);
+            if (rc1 == opposite(rc2)) ++num_intersections;
+          }
+        }
+        curr = curr->next();
+        continue;
+      }
+
+      /* If the current halfedge belongs to an "antenna". Namely, its
+       * incident face is the same as its twin's, skip it to avoid counting
+       * it twice.
+       */
+      const Face* curr_face = (curr->is_on_inner_ccb()) ?
+        curr->inner_ccb()->face() : curr->outer_ccb()->face();
+      const Halfedge* opp_he = curr->opposite();
+      const Face* opp_curr_face = (opp_he->is_on_inner_ccb()) ?
+        opp_he->inner_ccb()->face() : opp_he->outer_ccb()->face();
+
+      if (curr_face == opp_curr_face) {
+        curr = curr->next();
+        continue;
+      }
+
+      Arr_curve_end ind_source, ind_target;
+      if (curr->direction() == ARR_LEFT_TO_RIGHT) {
+        ind_source = ARR_MIN_END;
+        ind_target = ARR_MAX_END;
+      }
+      else {
+        ind_source = ARR_MAX_END;
+        ind_target = ARR_MIN_END;
+      }
+
+      ps_x_source = ps_x_op(curr->curve(), ind_source);
+      ps_x_target = ps_x_op(curr->curve(), ind_target);
+
+      ps_y_source = ps_y_op(curr->curve(), ind_source);
+      ps_y_target = ps_y_op(curr->curve(), ind_target);
+
+      if (!p_is_interior_x) {
+        if (ps_x_source == ps_x_target) {
+          curr = curr->next();
+          continue;
+        }
+
+        if (ps_x_target != ARR_INTERIOR) {
+          change_pending = true;
+          ps_x_pending = (ps_x_target == ARR_LEFT_BOUNDARY) ?
+            ARR_RIGHT_BOUNDARY : ARR_LEFT_BOUNDARY;
+        }
+        if (ps_x_source != ARR_INTERIOR) {
+          if (change_pending) {
+            change_pending = false;
+            if (ps_x_pending == ps_x_source) {
+              Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
+              if (res_y_at_x == EQUAL) return false;
+              if (res_y_at_x == SMALLER) num_intersections++;
+            }
+          } else {
+            // This must be the first curve. Remember to check the last curve
+            ps_x_last = (ps_x_source == ARR_LEFT_BOUNDARY) ?
+              ARR_RIGHT_BOUNDARY : ARR_LEFT_BOUNDARY;
+            last_pending = true;
+          }
+        }
+        curr = curr->next();
+        continue;
+      }
+
+      res_source = (ps_x_source == ARR_LEFT_BOUNDARY) ? LARGER :
+        (ps_x_source == ARR_RIGHT_BOUNDARY) ? SMALLER :
+        (ps_y_source == ARR_INTERIOR) ?
+        cmp_x_op(p, curr->opposite()->vertex()->point()) :
+        cmp_x_pt_ce(p, curr->curve(), ind_source);
+
+      res_target = (ps_x_target == ARR_LEFT_BOUNDARY) ? LARGER :
+        (ps_x_target == ARR_RIGHT_BOUNDARY) ? SMALLER :
+        (ps_y_target == ARR_INTERIOR) ?
+        cmp_x_op(p, curr->vertex()->point()) :
+        cmp_x_pt_ce(p, curr->curve(), ind_target);
+
+      /* If a vertical ray is shot from p upward, the x-monotone curve
+       * associated with curr is hit once.
+       */
+      if (res_source == res_target) {
+        curr = curr->next();
+        continue;
+      }
+
+      if (res_source != EQUAL) {
+        change_pending = true;
+        res_pending = (res_source == SMALLER) ? LARGER : SMALLER;
+      }
+      if (res_target != EQUAL) {
+        if (change_pending) {
+          change_pending = false;
+          if (res_pending == res_target) {
+            Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
+            if (res_y_at_x == EQUAL) return false;
+            if (res_y_at_x == SMALLER) num_intersections++;
+          }
+        } else {
+          // This must be the first curve. Remember to check the last curve
+          res_last = (res_target == SMALLER) ? LARGER : SMALLER;
+          last_pending = true;
+        }
+      }
+
+      /* Proceed to the next halfedge along the component boundary.
+       * Note that the source vertex of this halfedge is the current target.
+       */
+      curr = curr->next();
+    } while (curr != first);
+
+    if (last_pending) {
+      if (!p_is_interior_x) {
+        if (ps_x_last == ps_x_target) {
+          Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
+          if (res_y_at_x == EQUAL) return false;
+          if (res_y_at_x == SMALLER) num_intersections++;
+        }
+        continue;
+      }
+
+      if (res_last == res_source) {
+        Comparison_result res_y_at_x = cmp_y_at_x_op(p, curr->curve());
+        if (res_y_at_x == EQUAL) return false;
+        if (res_y_at_x == SMALLER) num_intersections++;
+      }
+    }
+  }
+  /* The query point lies inside the connected components if the face does
+   * not contain the north pole, and the vertical ray intersects the
+   * boundaries an odd number of times. As mentioned above, if the face does
+   * contain the north pole, then it contains everything, (and has no outer
+   * CCB's at all).
+   */
+  return (num_intersections& 0x1);
+}
+
+/*! \brief compares the relative y-position of a point and a halfedge */
+template <typename GeomTraits, typename Dcel>
+Comparison_result
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+compare_y_at_x(const Point_2& p, const Halfedge* he) const
+{
+  // std::cout << "compare_y_at_x(Point_2&,Halfedge*)" << std::endl;
+  return m_geom_traits->compare_y_at_x_2_object()(p, he->curve());
+}
+
+/*! \brief determine whether a vertex is associated with a curve end */
+template <typename GeomTraits, typename Dcel>
+bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+are_equal(const Vertex* v,
+          const X_monotone_curve_2& xc, Arr_curve_end ind,
+          Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
+{
+#if 0
+  std::cout << "are_equal"
+            << ", v: " << v->point()
+            << ", xc: " << xc << ", " << ind
+            << std::endl;
+#endif
+  CGAL_precondition(ps_x == ARR_LEFT_BOUNDARY || ps_x == ARR_RIGHT_BOUNDARY ||
+                    ps_y == ARR_BOTTOM_BOUNDARY || ps_y == ARR_TOP_BOUNDARY);
+
+  // If the given boundary conditions do not match those of the given
+  // vertex, v cannot represent the curve end.
+  if (ps_y != v->parameter_space_in_y()) return false;
+
+  if (ps_y != ARR_INTERIOR) return (ps_y == v->parameter_space_in_y());
+
+  if (((ps_x == ARR_INTERIOR) && (v->parameter_space_in_x() != ARR_INTERIOR)) ||
+      ((ps_x != ARR_INTERIOR) && (v->parameter_space_in_x() == ARR_INTERIOR)))
+    return false;
+
+  CGAL_assertion(ps_x != ARR_INTERIOR);
+  /* Both vertices have the same x boundary conditions =>
+   * comapare their y-position.
+   */
+  const Point_2& p1 = v->point();
+  const Point_2& p2 = (ind == ARR_MIN_END) ?
+    m_geom_traits->construct_min_vertex_2_object()(xc) :
+    m_geom_traits->construct_max_vertex_2_object()(xc);
+  return (m_geom_traits->compare_y_on_boundary_2_object()(p1, p2) == EQUAL);
+}
+
+/*! \brief receives a notification on the creation of a new boundary vertex */
+template <typename GeomTraits, typename Dcel>
+void
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+notify_on_boundary_vertex_creation(Vertex* v,
+                                   const X_monotone_curve_2& xc,
+                                   Arr_curve_end ind,
+                                   Arr_parameter_space
+                                     CGAL_assertion_code(ps_x),
+                                   Arr_parameter_space ps_y)
+{
+  // std::cout << "notify_on_boundary_vertex_creation()" << std::endl;
+  if (ps_y == ARR_BOTTOM_BOUNDARY) {
+    m_south_pole = v;
+    return;
+  }
+  if (ps_y == ARR_TOP_BOUNDARY) {
+    m_north_pole = v;
+    return;
+  }
+  CGAL_assertion(ps_x != ARR_INTERIOR);
+  const Point_2& key = (ind == ARR_MIN_END) ?
+    m_geom_traits->construct_min_vertex_2_object()(xc) :
+    m_geom_traits->construct_max_vertex_2_object()(xc);
+  m_boundary_vertices.insert(Vertex_value(key, v));
+}
+
+template <typename GeomTraits, typename Dcel>
+bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+let_me_decide_the_outer_ccb(std::pair< CGAL::Sign, CGAL::Sign> signs1,
+                            std::pair< CGAL::Sign, CGAL::Sign> signs2,
+                            bool& swap_predecessors) const
+{
+  // no perimetric in top-bottom for first loop
+  CGAL_precondition(signs1.second == CGAL::ZERO);
+
+  // no perimetric in top-bottom for second loop
+  CGAL_precondition(signs2.second == CGAL::ZERO);
+
+  // choose prev1 to define outer ccb of new face if it is a non-perimetric loop,
+  // otherwise choose prev2
+  // TODO what if both are non-zero? does it occur?
+  // TODO EBEB check this!!!!
+  swap_predecessors = (signs2.first != CGAL::POSITIVE);
+
+  // but only if the at least one of the loops is perimetric, otherwise return
+  // false to let leftmost-vertex decide which becomes part of the new outer ccb
+  return (signs1.first != CGAL::ZERO) || (signs2.first != CGAL::ZERO);
+}
+
+/*! \brief given a curve end with boundary conditions and a face that contains
+ * the interior of the curve, find a place for a boundary vertex that will
+ * represent the curve end along the face boundary */
+template <typename GeomTraits, typename Dcel>
+CGAL::Object
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+place_boundary_vertex(Face* /* f */,
+                      const X_monotone_curve_2& xc, Arr_curve_end ind,
+                      Arr_parameter_space
+#if !defined(CGAL_NO_ASSERTIONS)
+                      ps_x
+#endif
+                      ,
+                      Arr_parameter_space ps_y)
+{
+  // std::cout << "place_boundary_vertex()" << std::endl;
+  if (ps_y == ARR_BOTTOM_BOUNDARY) {
+    if (m_south_pole == NULL) return Object();
+    return CGAL::make_object(m_south_pole);
+  }
+
+  if (ps_y == ARR_TOP_BOUNDARY) {
+    if (m_north_pole == NULL) return Object();
+    return CGAL::make_object(m_north_pole);
+  }
+
+  CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
+
+  const Point_2& key = (ind == ARR_MIN_END) ?
+    m_geom_traits->construct_min_vertex_2_object()(xc) :
+    m_geom_traits->construct_max_vertex_2_object()(xc);
+  typename Vertex_map::iterator it = m_boundary_vertices.find(key);
+
+  if (it != m_boundary_vertices.end()) {
+    Vertex* v = it->second;
+    return CGAL::make_object(v);
+  }
+
+  // The vertex hasn't been created yet, return a null object:
+  return Object();
+}
+
+/*! \brief locate the predecessor halfedge for the given curve around a given
+ * vertex with boundary conditions. */
+template <typename GeomTraits, typename Dcel>
+typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
+Arr_spherical_topology_traits_2<GeomTraits,Dcel>::
+locate_around_boundary_vertex(Vertex* v,
+                              const X_monotone_curve_2& xc,
+                              Arr_curve_end ind,
+                              Arr_parameter_space
+#if !defined(CGAL_NO_ASSERTIONS)
+                              ps_x
+#endif
+                              ,
+                              Arr_parameter_space ps_y) const
+{
+  // std::cout << "locate_around_boundary_vertex()" << std::endl;
+  if (ps_y == ARR_BOTTOM_BOUNDARY) {
+    CGAL_assertion(v == m_south_pole);
+    return (_locate_around_pole(m_south_pole, xc, ind));
+  }
+
+  if (ps_y == ARR_TOP_BOUNDARY) {
+    CGAL_assertion(v == m_north_pole);
+    return (_locate_around_pole(m_north_pole, xc, ind));
+  }
+
+  CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
+
+  return (_locate_around_vertex_on_discontinuity(v, xc, ind));
+}
+
+/*! \brief locates a DCEL feature that contains a given curve end. */
+template <typename GeomTraits, typename Dcel>
+CGAL::Object Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
+                 Arr_parameter_space
+#if !defined(CGAL_NO_ASSERTIONS)
+                 ps_x
+#endif
+                 ,
+                 Arr_parameter_space ps_y)
+{
+  // Act according to the boundary conditions.
+  if (ps_y == ARR_TOP_BOUNDARY) {
+    // In case the curve end coincides with the north pole, return the vertex
+    // representing the north pole, if one exists. Otherwise, return the face
+    // containing this pole (the spherical face).
+    if (m_north_pole != NULL) return CGAL::make_object(m_north_pole);
+    return CGAL::make_object(m_spherical_face);
+  }
+
+  typename Vertex_map::iterator it;
+  Vertex* v = NULL;
+
+  if (ps_y == ARR_BOTTOM_BOUNDARY) {
+    // In case the curve end coincides with the south pole, return the vertex
+    // representing the south pole, if one exists. Otherwise, search for the
+    // face containing this pole.
+    if (m_south_pole != NULL) return CGAL::make_object(m_south_pole);
+    it = m_boundary_vertices.begin();
+  }
+  else {
+    CGAL_assertion((ps_x == ARR_LEFT_BOUNDARY) || (ps_x == ARR_RIGHT_BOUNDARY));
+
+    // Check if the given curve end is incident to a vertex on the line of
+    // discontinuity. If so, return this vertex. Otherwise, locate the first
+    // vertex above it.
+    const Point_2& key = (ind == ARR_MIN_END) ?
+      m_geom_traits->construct_min_vertex_2_object()(xc) :
+      m_geom_traits->construct_max_vertex_2_object()(xc);
+    it = m_boundary_vertices.find(key);
+    if (it != m_boundary_vertices.end()) {
+      v = it->second;
+      return CGAL::make_object(v);
+    }
+
+    it = m_boundary_vertices.lower_bound(key);
+  }
+
+  // At this point, the iterator it points to a vertex on the line of
+  // discontinuity that is strictly above the curve end. If there is none,
+  // we know the curve end is contained in the spherical face. Otherwise,
+  // we return the face that lies below the vertex v.
+  if (it == m_boundary_vertices.end())
+    return CGAL::make_object(m_spherical_face);
+
+  v = it->second;
+  return CGAL::make_object(_face_below_vertex_on_discontinuity(v));
+}
+
+/*! \brief determines whether a given boundary vertex is redundant */
+template <typename GeomTraits, typename Dcel>
+bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+is_redundant(const Vertex* v) const
+{ return (v->halfedge() == NULL); }
+
+/* \brief erases a given redundant vertex */
+template <typename GeomTraits, typename Dcel>
+typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+erase_redundant_vertex(Vertex* v)
+{
+  const Arr_parameter_space ps_y = v->parameter_space_in_y();
+  if (ps_y == ARR_BOTTOM_BOUNDARY) {
+    m_south_pole = NULL;
+    return NULL;
+  }
+  if (ps_y == ARR_TOP_BOUNDARY) {
+    m_north_pole = NULL;
+    return NULL;
+  }
+  CGAL_assertion_code(Arr_parameter_space ps_x = v->parameter_space_in_x());
+  CGAL_assertion(ps_x != ARR_INTERIOR);
+  m_boundary_vertices.erase(v->point());
+  return NULL;
+}
+
+/*! \brief obtains the curve associated with a boundary vertex */
+template <typename GeomTraits, typename Dcel>
+const typename
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::X_monotone_curve_2&
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+_curve(const Vertex* v, Arr_curve_end& ind) const
+{
+  // std::cout << "curve()" << std::endl;
+  const Halfedge* he = v->halfedge();
+  ind = (he->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+  return he->curve();
+}
+
+/*! \brief returns the halfedge, the target vertex of which is given, that is
+ * the predecessor of a halfedge, the curve of which is given, that is about
+ * to be inserted into the dcel.
+ */
+template <typename GeomTraits, typename Dcel>
+typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+_locate_around_vertex_on_discontinuity(Vertex* v,
+                                       const X_monotone_curve_2& xc,
+                                       Arr_curve_end ind) const
+{
+  // If the vertex is isolated, there is no predecssor halfedge.
+  if (v->is_isolated()) return NULL;
+
+  // Get the first incident halfedge around v and the next halfedge.
+  Halfedge* first = v->halfedge();
+  Halfedge* curr = first;
+  CGAL_assertion(curr != NULL);
+  Halfedge* next = curr->next()->opposite();
+
+  // If is only one halfedge incident to v, return this halfedge as xc's
+  // predecessor:
+  if (curr == next) return curr;
+
+  // Otherwise, we traverse the halfedges around v until we find the pair
+  // of adjacent halfedges between which we should insert xc.
+  typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
+    m_geom_traits->is_between_cw_2_object();
+  bool eq_curr, eq_next;
+
+  while (!is_between_cw(xc, (ind == ARR_MIN_END), curr->curve(),
+                        (curr->direction() == ARR_RIGHT_TO_LEFT), next->curve(),
+                        (next->direction() == ARR_RIGHT_TO_LEFT), v->point(),
+                        eq_curr, eq_next))
+  {
+    // The curve must not be equal to one of the curves already incident to v.
+    CGAL_assertion(!eq_curr && !eq_next);
+
+    // Move to the next pair of incident halfedges.
+    curr = next;
+    next = curr->next()->opposite();
+
+    // Make sure we have not completed a full traversal around v without
+    // locating a place for the new curve xc.
+    CGAL_assertion(curr != first);
+  }
+
+  // Return the halfedge we have located.
+  return curr;
+}
+
+/*! \brief returns the halfedge, the target vertex of which is a given pole,
+ * that is the predecessor of a halfedge, the curve of which is given, that
+ * is about to be inserted into the dcel.
+ */
+template <typename GeomTraits, typename Dcel>
+typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Halfedge*
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+_locate_around_pole(Vertex* v,
+                    const X_monotone_curve_2& xc, Arr_curve_end ind) const
+{
+  CGAL_assertion((v == m_south_pole) || (v == m_north_pole));
+
+  // std::cout << "locate_around_pole() " << ind << std::endl;
+  // If the vertex is isolated, return a null halfedge:
+  if (v->is_isolated()) return NULL;
+
+  // Get the first incident halfedge around v and the next halfedge:
+  Halfedge* first = v->halfedge();
+  Halfedge* curr = first;
+  CGAL_assertion(curr != NULL);
+  Halfedge* next = curr->next()->opposite();
+
+  // If there is only one halfedge, it is the predecessor, return it:
+  if (curr == next) return curr;
+
+  // If we compare a curve and its successor around the south (resp. north)
+  // pole, the result LARGER (resp. SMALLER) indicates that the line of
+  // discontinuity is located in between the two curves.
+  const Comparison_result cross_res = (v == m_south_pole) ? LARGER : SMALLER;
+
+  // Traverse all other halfedges, and compare their x-positions next to the
+  // pole with the query curve xc.
+  typename Traits_adaptor_2::Compare_x_curve_ends_2 cmp_x_curve_ends =
+    m_geom_traits->compare_x_curve_ends_2_object();
+  Arr_curve_end curr_end, next_end;
+  Comparison_result curr_res, next_res;
+  Comparison_result curr_next_res;
+
+  curr_end =
+    (curr->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END;
+  curr_res = cmp_x_curve_ends(xc, ind, curr->curve(), curr_end);
+  do {
+    next_end =
+      (next->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END;
+    next_res = cmp_x_curve_ends(xc, ind, next->curve(), next_end);
+    curr_next_res =
+      cmp_x_curve_ends(curr->curve(), curr_end, next->curve(), next_end);
+    if (curr_next_res == cross_res) {
+      // The line of discontinuity must lie between curr and next, so the
+      // comparison result of xc with the two curves should be equal:
+      if (curr_res == next_res) return curr;
+    }
+    else {
+      // The line of discontinuity does not lie between curr and next, so the
+      // comparison results must be different if xc lies in between.
+      if (curr_res != next_res) return curr;
+    }
+
+    // Move to the next halfedge around the pole.
+    curr = next;
+    curr_end = next_end;
+    curr_res = next_res;
+    next = curr->next()->opposite();
+  } while (curr != first);
+
+  // We sould never reach here:
+  CGAL_error();
+  return NULL;
+}
+
+/*! \brief Return the face that lies below the given vertex, which lies
+ * on the line of discontinuity.
+ */
+template <typename GeomTraits, typename Dcel>
+typename Arr_spherical_topology_traits_2<GeomTraits, Dcel>::Face*
+Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
+_face_below_vertex_on_discontinuity(Vertex* v) const
+{
+  // If the vertex is isolated, just return the face that contains it.
+  if (v->is_isolated()) return (v->isolated_vertex()->face());
+
+  // Get the first incident halfedge around v and the next halfedge.
+  Halfedge* first = v->halfedge();
+  Halfedge* curr = first;
+  CGAL_assertion(curr != NULL);
+  Halfedge* next = curr->next()->opposite();
+
+  // If there is only one halfedge incident to v, return its incident face.
+  if (curr == next)
+    return ((curr->is_on_inner_ccb()) ?
+            curr->inner_ccb()->face() : curr->outer_ccb()->face());
+
+  // Otherwise, we traverse the halfedges around v and locate the first
+  // halfedge we encounter if we go from "6 o'clock" clockwise.
+  // First locate the lower left and the top right halfedges around v.
+  typename Traits_adaptor_2::Compare_y_at_x_right_2 cmp_y_at_x_op_right =
+    m_geom_traits->compare_y_at_x_right_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_left_2  cmp_y_at_x_op_left =
+    m_geom_traits->compare_y_at_x_left_2_object();
+
+  Halfedge* lowest_left = NULL;
+  Halfedge* top_right = NULL;
+
+  do {
+    // Check whether the current halfedge is defined to the left or to the
+    // right of the given vertex.
+    if (curr->direction() == ARR_LEFT_TO_RIGHT) {
+      // The curve associated with the current halfedge is defined to the left
+      // of v.
+      if (lowest_left == NULL ||
+          cmp_y_at_x_op_left(curr->curve(), lowest_left->curve(), v->point())
+          == SMALLER)
+      {
+        lowest_left = curr;
+      }
+    }
+    else {
+      // The curve associated with the current halfedge is defined to the right
+      // of v.
+      if (top_right == NULL ||
+          cmp_y_at_x_op_right(curr->curve(), top_right->curve(), v->point()) ==
+          LARGER)
+      {
+        top_right = curr;
+      }
+    }
+
+    // Move to the next halfedge around the vertex.
+    curr = curr->next()->opposite();
+  } while (curr != first);
+
+  // The first halfedge we encounter is the lowest to the left, but if there
+  // is no edge to the left, we first encounter the topmost halfedge to the
+  // right. Note that as the halfedge we located has v as its target, we now
+  // have to return its twin.
+  first =
+    (lowest_left != NULL) ? lowest_left->opposite() : top_right->opposite();
+  // std::cout << "first: " << first->opposite()->vertex()->point() << " => "
+  //           << first->vertex()->point() << std::endl;
+
+  // Face* f = (first->is_on_inner_ccb()) ?
+  //   first->inner_ccb()->face() : first->outer_ccb()->face();
+  // std::cout << "outer: " << f->number_of_outer_ccbs() << std::endl;
+  // std::cout << "inner: " << f->number_of_inner_ccbs() << std::endl;
+  // Return the incident face.
+  return ((first->is_on_inner_ccb()) ?
+          first->inner_ccb()->face() : first->outer_ccb()->face());
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_tracing_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_tracing_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_tracing_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_tracing_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_trapezoid_ric_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_trapezoid_ric_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_trapezoid_ric_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_trapezoid_ric_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_triangulation_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_triangulation_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_triangulation_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_triangulation_point_location.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arr_unb_planar_topology_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_unb_planar_topology_traits_2.h
new file mode 100644
index 0000000..71feb80
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arr_unb_planar_topology_traits_2.h
@@ -0,0 +1,638 @@
+// Copyright (c) 2006,2007,2008,2009,2010,2011,2012,2013 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
+//                 Efi Fogel  <efif at post.tau.ac.il>
+
+#ifndef CGAL_ARR_UNB_PLANAR_TOPOLOGY_TRAITS_2_H
+#define CGAL_ARR_UNB_PLANAR_TOPOLOGY_TRAITS_2_H
+
+/*! \file
+ * Definition of the Arr_unb_planar_topology_traits_2<GeomTraits> class.
+ */
+
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h>
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h>
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h>
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h>
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h>
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h>
+#include <CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+// Forward declaration:
+template <typename GeomTraits_, typename TopTraits_>
+class Arrangement_on_surface_2;
+
+/*! \class Arr_unb_planar_topology_traits_2
+ * A topology-traits class that encapsulates the embedding of 2D arrangements
+ * of unbounded curves on the plane.
+ */
+template <typename GeomTraits_,
+          typename Dcel_ = Arr_default_dcel<GeomTraits_> >
+class Arr_unb_planar_topology_traits_2 :
+  public Arr_planar_topology_traits_base_2<GeomTraits_, Dcel_>
+{
+private:
+  typedef Arr_planar_topology_traits_base_2<GeomTraits_, Dcel_>
+                                                          Base;
+
+public:
+  ///! \name The geometry-traits types.
+  //@{
+  typedef GeomTraits_                                     Geometry_traits_2;
+  typedef typename Base::Point_2                          Point_2;
+  typedef typename Base::X_monotone_curve_2               X_monotone_curve_2;
+  //@}
+
+  ///! \name The DCEL types.
+  //@{
+  typedef Dcel_                                           Dcel;
+  typedef typename Base::Size                             Size;
+  typedef typename Base::Vertex                           Vertex;
+  typedef typename Base::Halfedge                         Halfedge;
+  typedef typename Base::Face                             Face;
+  typedef typename Base::Outer_ccb                        Outer_ccb;
+  typedef typename Base::Inner_ccb                        Inner_ccb;
+  typedef typename Base::Isolated_vertex                  Isolated_vertex;
+  //@}
+
+  //! \name Arrangement types
+  //!@{
+  typedef Arr_unb_planar_topology_traits_2<Geometry_traits_2, Dcel> Self;
+  typedef Arr_traits_basic_adaptor_2<Geometry_traits_2>   Traits_adaptor_2;
+  //!@}
+
+  ///! \name The side tags
+  //@{
+  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
+  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
+  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
+  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
+
+  BOOST_MPL_ASSERT(
+      (boost::mpl::or_<
+       boost::is_same< Left_side_category, Arr_oblivious_side_tag >,
+       boost::is_same< Left_side_category, Arr_open_side_tag > >
+      )
+  );
+  BOOST_MPL_ASSERT(
+      (boost::mpl::or_<
+       boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >,
+       boost::is_same< Bottom_side_category, Arr_open_side_tag > >
+      )
+  );
+  BOOST_MPL_ASSERT(
+      (boost::mpl::or_<
+       boost::is_same< Top_side_category, Arr_oblivious_side_tag >,
+       boost::is_same< Top_side_category, Arr_open_side_tag > >
+      )
+  );
+  BOOST_MPL_ASSERT(
+      (boost::mpl::or_<
+       boost::is_same< Right_side_category, Arr_oblivious_side_tag >,
+       boost::is_same< Right_side_category, Arr_open_side_tag > >
+      )
+  );
+  //@}
+
+  /*! \struct
+   * An auxiliary structure for rebinding the topology traits with a new
+   * geometry-traits class and a new DCEL class.
+   */
+  template <typename T, typename D>
+  struct rebind {
+    typedef Arr_unb_planar_topology_traits_2<T, D> other;
+  };
+
+protected:
+  // Data members:
+  Vertex* v_bl;         // A fictitious vertex at (-oo,-oo).
+  Vertex* v_tl;         // A fictitious vertex at (-oo,+oo).
+  Vertex* v_br;         // A fictitious vertex at (-oo,+oo).
+  Vertex* v_tr;         // A fictitious vertex at (+oo,+oo).
+  Size n_inf_verts;     // Number of vertices at infinity.
+  Face* fict_face;      // The fictitious DCEL face.
+
+  // Copy constructor and assignment operator - not supported.
+  Arr_unb_planar_topology_traits_2(const Self&);
+  Self& operator=(const Self&);
+
+public:
+  ///! \name Construction methods.
+  //@{
+
+  /*! Default constructor. */
+  Arr_unb_planar_topology_traits_2();
+
+  /*! Constructor with a geometry-traits class. */
+  Arr_unb_planar_topology_traits_2(const Geometry_traits_2* tr);
+
+  /*! Assign the contents of another topology-traits class. */
+  void assign(const Self& other);
+  //@}
+
+  ///! \name Accessing the DCEL and constructing iterators.
+  //@{
+
+  /*! Determine whether the DCEL reprsenets an empty structure. */
+  bool is_empty_dcel() const
+  {
+    // An empty arrangement contains just two four vertices at infinity
+    // and eight fictitious halfedges connecting them.
+    return (this->m_dcel.size_of_vertices() == 4 &&
+            this->m_dcel.size_of_halfedges() == 8);
+  }
+
+  /*! Check if the given vertex is concrete (associated with a point). */
+  bool is_concrete_vertex(const Vertex* v) const
+  {
+    return (! v->has_null_point());
+  }
+
+  /*! Get the number of concrete vertices. */
+  Size number_of_concrete_vertices() const
+  {
+    // All vertices not lying at infinity are concrete.
+    return (this->m_dcel.size_of_vertices() - n_inf_verts);
+  }
+
+  /*! Check if the given vertex is valid (not a fictitious one). */
+  bool is_valid_vertex(const Vertex* v) const
+  {
+    return (! v->has_null_point() ||
+            (v != v_bl && v != v_tl && v != v_br && v != v_tr));
+  }
+
+  /*! Get the number of valid vertices. */
+  Size number_of_valid_vertices() const
+  {
+    // All vertices, except the four fictitious one, are valid.
+    return (this->m_dcel.size_of_vertices() - 4);
+  }
+
+  /*! Check if the given halfedge is valid (not a fictitious one). */
+  bool is_valid_halfedge(const Halfedge* he) const
+  {
+    return (! he->has_null_curve());
+  }
+
+  /*! Get the number of valid halfedges. */
+  Size number_of_valid_halfedges() const
+  {
+    // Note that we do not count fictitious halfedges (each vertex at infinity
+    // induces two fictitious halfedges).
+    return (this->m_dcel.size_of_halfedges() - 2*n_inf_verts);
+  }
+
+  /*! Check if the given face is valid (not a fictitious one). */
+  bool is_valid_face (const Face* f) const
+  {
+    return (! f->is_fictitious());
+  }
+
+  /*! Get the number of valid faces. */
+  Size number_of_valid_faces() const
+  {
+    // We do not count the ficitious DCEL face.
+    return (this->m_dcel.size_of_faces() - 1);
+  }
+  //@}
+
+private:
+  /// \name Auxiliary type definitions.
+  //@{
+  typedef Arrangement_on_surface_2<Geometry_traits_2, Self>    Arr;
+
+  // Type definition for the constuction sweep-line visitor.
+  typedef Arr_construction_subcurve<Geometry_traits_2>         CSubcurve;
+  typedef Arr_construction_event<Geometry_traits_2, CSubcurve, Arr>
+                                                               CEvent;
+  typedef Arr_unb_planar_construction_helper<Geometry_traits_2,
+                                             Arr,
+                                             CEvent,
+                                             CSubcurve>        CHelper;
+
+  // Type definition for the basic insertion sweep-line visitor.
+  typedef Arr_basic_insertion_traits_2<Geometry_traits_2, Arr> BInsTraits;
+  typedef Arr_construction_subcurve<BInsTraits>                BISubcurve;
+  typedef Arr_construction_event<BInsTraits, BISubcurve, Arr>
+                                                               BIEvent;
+  typedef Arr_unb_planar_insertion_helper<BInsTraits, Arr, BIEvent, BISubcurve>
+                                                               BIHelper;
+
+  // Type definition for the insertion sweep-line visitor.
+  typedef Arr_insertion_traits_2<Geometry_traits_2, Arr>       InsTraits;
+  typedef Arr_construction_subcurve<InsTraits>                 ISubcurve;
+  typedef Arr_construction_event<InsTraits, ISubcurve, Arr>
+                                                               IEvent;
+  typedef Arr_unb_planar_insertion_helper<InsTraits, Arr, IEvent, ISubcurve>
+                                                               IHelper;
+
+  // Type definition for the batched point-location sweep-line visitor.
+  typedef Arr_batched_point_location_traits_2<Arr>             BplTraits;
+  typedef Arr_unb_planar_batched_pl_helper<BplTraits, Arr>     BplHelper;
+
+  // Type definition for the vertical decomposition sweep-line visitor.
+  typedef Arr_batched_point_location_traits_2<Arr>             VdTraits;
+  typedef Arr_unb_planar_vert_decomp_helper<VdTraits, Arr>     VdHelper;
+
+  // Type definition for the overlay sweep-line visitor.
+  template <class ExGeomTraits_, class ArrangementA_, class ArrangementB_>
+  struct _Overlay_helper : public Arr_unb_planar_overlay_helper
+      <ExGeomTraits_, ArrangementA_, ArrangementB_, Arr,
+       Arr_construction_event<ExGeomTraits_,
+                              Arr_overlay_subcurve<ExGeomTraits_>,
+                              Arr>,
+       Arr_overlay_subcurve<ExGeomTraits_> >
+  {
+    typedef Arr_unb_planar_overlay_helper
+              <ExGeomTraits_, ArrangementA_, ArrangementB_, Arr,
+               Arr_construction_event<ExGeomTraits_,
+                                      Arr_overlay_subcurve<ExGeomTraits_>,
+                                      Arr>,
+               Arr_overlay_subcurve<ExGeomTraits_> >     Base;
+
+    typedef typename Base::Traits_2                      Traits_2;
+    typedef typename Base::Arrangement_red_2             Arrangement_red_2;
+    typedef typename Base::Arrangement_blue_2            Arrangement_blue_2;
+    typedef typename Base::Arrangement_2                 Arrangement_2;
+    typedef typename Base::Event                         Event;
+    typedef typename Base::Subcurve                      Subcurve;
+    typedef typename Base::Construction_helper           Construction_helper;
+
+    _Overlay_helper(const ArrangementA_* arrA, const ArrangementB_* arrB) :
+      Base(arrA, arrB) {}
+  };
+  //@}
+
+public:
+  ///! \name Visitor types.
+  //@{
+
+  typedef Arr_construction_sl_visitor<CHelper>
+    Sweep_line_construction_visitor;
+
+  typedef Arr_insertion_sl_visitor<IHelper>
+    Sweep_line_insertion_visitor;
+
+  typedef Sweep_line_construction_visitor
+    Sweep_line_non_intersecting_construction_visitor;
+
+  typedef Arr_basic_insertion_sl_visitor<BIHelper>
+    Sweep_line_non_intersecting_insertion_visitor;
+
+  template <class OutputIterator_>
+  struct Sweep_line_batched_point_location_visitor :
+    public Arr_batched_pl_sl_visitor<BplHelper, OutputIterator_>
+  {
+    typedef OutputIterator_                                   Output_iterator;
+
+    typedef Arr_batched_pl_sl_visitor<BplHelper, Output_iterator>   Base;
+    typedef typename Base::Traits_2                                 Traits_2;
+    typedef typename Base::Event                                    Event;
+    typedef typename Base::Subcurve                                 Subcurve;
+
+    Sweep_line_batched_point_location_visitor(const Arr* arr,
+                                              Output_iterator& oi) :
+      Base(arr, oi)
+    {}
+  };
+
+  template <class OutputIterator_>
+  struct Sweep_line_vertical_decomposition_visitor :
+    public Arr_vert_decomp_sl_visitor<VdHelper, OutputIterator_>
+  {
+    typedef OutputIterator_                                   Output_iterator;
+    typedef Arr_vert_decomp_sl_visitor<VdHelper, Output_iterator>
+                                                             Base;
+
+    typedef typename Base::Traits_2                           Traits_2;
+    typedef typename Base::Event                              Event;
+    typedef typename Base::Subcurve                           Subcurve;
+
+    Sweep_line_vertical_decomposition_visitor(const Arr* arr,
+                                              Output_iterator* oi) :
+      Base(arr, oi) {}
+  };
+
+  template <class ArrangementA_, class ArrangementB_, class OverlayTraits_>
+  struct Sweep_line_overlay_visitor :
+    public Arr_overlay_sl_visitor
+        <_Overlay_helper<Arr_overlay_traits_2<Geometry_traits_2,
+                                              ArrangementA_,
+                                              ArrangementB_>,
+                         ArrangementA_,
+                         ArrangementB_>,
+         OverlayTraits_>
+  {
+    typedef ArrangementA_                            ArrangementA_2;
+    typedef ArrangementB_                            ArrangementB_2;
+    typedef Arr                                      Arrangement_result_2;
+    typedef OverlayTraits_                           Overlay_traits;
+
+    typedef Arr_overlay_traits_2<Geometry_traits_2,
+                                 ArrangementA_2,
+                                 ArrangementB_2>     Geom_ovl_traits_2;
+
+    typedef _Overlay_helper<Geom_ovl_traits_2,
+                            ArrangementA_2,
+                            ArrangementB_2>          Ovl_helper;
+
+    typedef Arr_overlay_sl_visitor<Ovl_helper,
+                                   Overlay_traits>   Base;
+
+    typedef typename Base::Traits_2                  Traits_2;
+    typedef typename Base::Event                     Event;
+    typedef typename Base::Subcurve                  Subcurve;
+
+    Sweep_line_overlay_visitor(const ArrangementA_2* arrA,
+                               const ArrangementB_2* arrB,
+                               Arrangement_result_2* arr_res,
+                               Overlay_traits* overlay_tr) :
+      Base(arrA, arrB, arr_res, overlay_tr)
+    {}
+  };
+
+  typedef Arr_inc_insertion_zone_visitor<Arr>
+                                        Zone_insertion_visitor;
+
+  typedef Arr_walk_along_line_point_location<Arr>
+                                        Default_point_location_strategy;
+
+  typedef Arr_walk_along_line_point_location<Arr>
+                                        Default_vertical_ray_shooting_strategy;
+  //@}
+
+  ///! \name Topology-traits methods.
+  //@{
+
+  /*!
+   * Initialize an empty DCEL structure.
+   */
+  void init_dcel();
+
+  /*!
+   * Make the necessary updates after the DCEL structure have been updated.
+   */
+  void dcel_updated();
+
+  /*!
+   * Check if the given vertex is associated with the given curve end.
+   * \param v The vertex.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \pre The curve has a boundary condition in either x or y.
+   * \return Whether v represents the given curve end.
+   */
+  bool are_equal(const Vertex* v,
+                 const X_monotone_curve_2& cv, Arr_curve_end ind,
+                 Arr_parameter_space ps_x, Arr_parameter_space ps_y) const;
+
+  /*!
+   * Given a curve end with boundary conditions and a face that contains the
+   * interior of the curve, find a place for a boundary vertex that will
+   * represent the curve end along the face boundary.
+   * \param f The face.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \pre The curve has a boundary condition in either x or y.
+   * \return An object that contains the curve end.
+   *         In our case this object always wraps a fictitious edge.
+   */
+  CGAL::Object place_boundary_vertex(Face* f,
+                                     const X_monotone_curve_2& cv,
+                                     Arr_curve_end ind,
+                                     Arr_parameter_space ps_x,
+                                     Arr_parameter_space ps_y);
+
+  /*!
+   * Locate the predecessor halfedge for the given curve around a given
+   * vertex with boundary conditions.
+   * \param v The vertex.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \pre The curve has a boundary condition in either x or y, and should be
+   *      incident to the vertex v.
+   * \return An object that contains the curve end.
+   */
+  Halfedge*
+  locate_around_boundary_vertex(Vertex* /* v */,
+                                const X_monotone_curve_2& /* cv */,
+                                Arr_curve_end /* ind */,
+                                Arr_parameter_space /* ps_x */,
+                                Arr_parameter_space /* ps_y */) const
+  {
+    CGAL_error();
+    return (NULL);
+  }
+
+  /*!
+   * Locate a DCEL feature that contains the given unbounded curve end.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \pre The curve end is unbounded in either x or y.
+   * \return An object that contains the curve end.
+   *         In our case this object may either wrap an unbounded face,
+   *         or an edge with an end-vertex at infinity (in case of an overlap).
+   */
+  CGAL::Object locate_curve_end(const X_monotone_curve_2& cv,
+                                Arr_curve_end ind,
+                                Arr_parameter_space ps_x,
+                                Arr_parameter_space ps_y);
+
+  /*!
+   * Split a fictitious edge using the given vertex.
+   * \param e The edge to split (one of the pair of halfedges).
+   * \param v The split vertex.
+   * \pre e is a fictitious halfedge.
+   * \return A halfedge whose direction is the same as e's and whose target is
+   *         the split vertex v.
+   */
+  Halfedge* split_fictitious_edge(Halfedge* e, Vertex* v);
+
+  /*!
+   * Determine whether the given face is unbounded.
+   * \param f The face.
+   * \return Whether f is unbounded.
+   */
+  bool is_unbounded(const Face* f) const;
+
+  /*!
+   * Determine whether the given boundary vertex is redundant.
+   * \param v The vertex.
+   * \return Whether v is redundant, and should be erased.
+   */
+  bool is_redundant(const Vertex* v) const;
+
+  /*!
+   * Erase the given redundant vertex by merging a fictitious edge.
+   * The function does not free the vertex v itself.
+   * \param v The vertex.
+   * \pre v is a redundant vertex.
+   * \return One of the pair of halfedges that form the merged edge.
+   */
+  Halfedge* erase_redundant_vertex(Vertex* v);
+
+    //! reference_face (const version).
+  /*! The function returns a reference face of the arrangement.
+      All reference faces of arrangements of the same type have a common
+      point.
+      \return A pointer to the reference face.
+  */
+  const Face* reference_face() const
+  {
+    CGAL_assertion(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT);
+    return v_tr->halfedge()->outer_ccb()->face();
+  }
+
+  //! reference_face (non-const version).
+  /*! The function returns a reference face of the arrangement.
+      All reference faces of arrangements of the same type have a common
+      point.
+      \return A pointer to the reference face.
+  */
+  Face* reference_face()
+  {
+    CGAL_assertion(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT);
+    return v_tr->halfedge()->outer_ccb()->face();
+  }
+
+  //@}
+
+  /// \name Additional accessors, specialized for this topology-traits class.
+  //@{
+
+  /*! This function is used by the "walk" point-location strategy. */
+  const Face* initial_face() const { return fict_face; }
+
+  /*! Get the fictitious face (const version). */
+  const Face* fictitious_face() const { return fict_face; }
+
+  /*! Get the fictitious face (non-const version). */
+  Face* fictitious_face() { return fict_face; }
+
+  /*! Get the bottom-left fictitious vertex (const version). */
+  const Vertex* bottom_left_vertex() const { return (v_bl); }
+
+  /*! Get the bottom-left fictitious vertex (non-const version). */
+  Vertex* bottom_left_vertex() { return (v_bl); }
+
+  /*! Get the top-left fictitious vertex (const version). */
+  const Vertex* top_left_vertex() const { return (v_tl); }
+
+  /*! Get the top-left fictitious vertex (non-const version). */
+  Vertex* top_left_vertex() { return (v_tl); }
+
+  /*! Get the bottom-right fictitious vertex (const version). */
+  const Vertex* bottom_right_vertex() const { return (v_br); }
+
+  /*! Get the bottom-right fictitious vertex (non-const version). */
+  Vertex* bottom_right_vertex() { return (v_br); }
+
+  /*! Get the top-right fictitious vertex (const version). */
+  const Vertex* top_right_vertex() const { return (v_tr); }
+
+  /*! Get the top-right fictitious vertex (non-const version). */
+  Vertex* top_right_vertex() { return (v_tr); }
+  //@}
+
+  /// \name Additional predicates, specialized for this topology-traits class.
+  //@{
+
+  /*!
+   * Compare the given vertex (which may lie at infinity) and the given point.
+   * \param p The point.
+   * \param v The vertex.
+   * \return The result of the comparison of the x-coordinates of p and v.
+   */
+  virtual Comparison_result compare_x(const Point_2& p,
+                                      const Vertex* v) const;
+
+  /*!
+   * Compare the given vertex (which may lie at infinity) and the given point.
+   * \param p The point.
+   * \param v The vertex.
+   * \return The result of the xy-lexicographic comparison of p and v.
+   */
+  virtual Comparison_result compare_xy(const Point_2& p,
+                                       const Vertex* v) const;
+
+  /*!
+   * Compare the relative y-position of the given point and the given edge
+   * (which may be fictitious).
+   * \param p The point.
+   * \param he The edge (one of the pair of halfedges).
+   * \pre p should lie in the x-range of the given edge.
+   * \return The relative y-position of the point p and the edge.
+   */
+  virtual Comparison_result compare_y_at_x(const Point_2& p,
+                                           const Halfedge* he) const;
+  //@}
+
+protected:
+
+  /// \name Auxiliary functions.
+  //@{
+
+  /*!
+   * Get the curve associated with a boundary vertex.
+   * \param v The vertex as infinity.
+   * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
+   *                    ARR_MAX_END if it is induced by the curve's maximal end.
+   * \pre v is a valid (not fictitious) boundary.
+   * \return The curve that induces v, or NULL if v has no incident curves yet.
+   */
+  const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
+
+  /*!
+   * Check whether the given infinite curve end lies on the given fictitious
+   * halfedge.
+   * \param cv The curve.
+   * \param ind Whether we refer to the minimal or maximal end of cv.
+   * \param ps_x The boundary condition of the curve end in x.
+   * \param ps_y The boundary condition of the curve end in y.
+   * \param he The fictitious halfedge.
+   * \param eq_source Output: Whether the curve coincides with he's source.
+   * \param eq_target Output: Whether the curve coincides with he's target.
+   * \return Whether the curve end lies on the fictitious halfedge.
+   */
+  bool _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
+                               Arr_parameter_space ps_x,
+                               Arr_parameter_space ps_y,
+                               const Halfedge* he,
+                               bool& eq_source, bool& eq_target);
+  //@}
+};
+
+} //namespace CGAL
+
+#include <CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_vertex_index_map.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_vertex_index_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_vertex_index_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_vertex_index_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_vertex_map.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_vertex_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_vertex_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_vertex_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_vertical_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_vertical_decomposition_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_vertical_decomposition_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_vertical_decomposition_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arr_walk_along_line_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Arr_walk_along_line_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arr_walk_along_line_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arr_walk_along_line_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_default_planar_topology.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_default_planar_topology.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_default_planar_topology.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_default_planar_topology.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_with_history_accessor.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_with_history_accessor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arr_with_history_accessor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arr_with_history_accessor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_2_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_2_iterators.h
new file mode 100644
index 0000000..61ccd26
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_2_iterators.h
@@ -0,0 +1,663 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+
+#ifndef CGAL_ARRANGEMENT_2_ITERATORS_H
+#define CGAL_ARRANGEMENT_2_ITERATORS_H
+
+#include <functional>
+
+/*! \file
+ * Definitions of auxiliary iterator adaptors.
+ */
+
+namespace CGAL {
+
+/*!
+ * \class
+ * An iterator adaptor for dereferencing the value-type of the iterator class
+ * (given as Iterator_), which is supposed to be a pointer, and handle it as
+ * the value-type given by Value_.
+ */
+template <class Iterator_, class Value_, class Diff_, class Category_>
+class I_Dereference_iterator
+{
+public:
+
+  // Type definitions:
+  typedef Iterator_                               Iterator;
+  typedef I_Dereference_iterator<Iterator_,
+				 Value_,
+				 Diff_,
+				 Category_>       Self;
+
+  typedef Category_                               iterator_category;
+  typedef Value_                                  value_type;
+  typedef value_type&                             reference;
+  typedef value_type*                             pointer;
+  typedef Diff_                                   difference_type;
+
+protected:
+
+  Iterator        iter;           // The internal iterator.
+
+public:
+
+  /// \name Construction
+  //@{
+  I_Dereference_iterator ()
+  {}
+
+  I_Dereference_iterator (Iterator it) :
+    iter(it)
+  {}
+  //@}
+
+  /// \name Basic operations.
+  //@{
+  bool operator== (const Self& it) const
+  {
+    return (iter == it.iter);
+  }
+    
+  bool operator!= (const Self& it) const
+  {
+    return (!(iter == it.iter));
+  }
+    
+  Iterator current_iterator () const
+  {
+    return (iter);
+  }
+    
+  pointer ptr () const
+  {
+    return (static_cast<value_type *> (*iter));
+  }
+
+  reference operator* () const
+  {
+    return (*(ptr()));
+  }
+
+  pointer operator-> () const
+  {
+    return (ptr());
+  }
+  //@}
+    
+  /// \name Incremernt operations (forward category).
+  //@{
+  Self& operator++()
+  {
+    ++iter;
+    return (*this);
+  }
+
+  Self operator++ (int )
+  {
+    Self tmp = *this;
+    ++iter;
+    return (tmp);
+  }
+  //@}
+
+  /// \name Decremernt operations (bidirectional category).
+  //@{
+  Self& operator-- ()
+  {
+    --iter;
+    return (*this);
+  }
+
+  Self operator-- (int )
+  {
+    Self tmp = *this;
+    --iter;
+    return (tmp);
+  }
+  //@}
+};
+
+/*!
+ * \class
+ * An iterator adaptor for dereferencing the value-type of the const iterator
+ * class (given as CIterator_), which is supposed to be a pointer, and handle
+ * it as the value-type given by Value_.
+ */
+template <class CIterator_, class MIterator_, 
+	  class Value_, class Diff_, class Category_>
+class I_Dereference_const_iterator
+{
+public:
+
+  // Type definitions:
+  typedef CIterator_                              Const_iterator;
+  typedef MIterator_                              Mutable_iterator;
+  typedef I_Dereference_const_iterator<CIterator_,
+				       MIterator_,
+				       Value_,
+				       Diff_,
+				       Category_> Self;
+
+  typedef Category_                               iterator_category;
+  typedef Value_                                  value_type;
+  typedef const value_type&                       reference;
+  typedef const value_type*                       pointer;
+  typedef Diff_                                   difference_type;
+
+protected:
+
+  Const_iterator        iter;           // The internal iterator.
+
+public:
+
+  /// \name Construction
+  //@{
+  I_Dereference_const_iterator ()
+  {}
+
+  I_Dereference_const_iterator (Const_iterator it) :
+    iter(it)
+  {}
+
+  I_Dereference_const_iterator (Mutable_iterator it) :
+    iter (Const_iterator (&(*it)))
+  {}
+
+  //@}
+
+  /// \name Basic operations.
+  //@{
+  bool operator== (const Self& it) const
+  {
+    return (iter == it.iter);
+  }
+    
+  bool operator!= (const Self& it) const
+  {
+    return (!(iter == it.iter));
+  }
+    
+  Const_iterator current_iterator () const
+  {
+    return (iter);
+  }
+    
+  pointer ptr () const
+  {
+    return (static_cast<const value_type *> (*iter));
+  }
+
+  reference operator* () const
+  {
+    return (*(ptr()));
+  }
+
+  pointer operator-> () const
+  {
+    return (ptr());
+  }
+  //@}
+    
+  /// \name Incremernt operations (forward category).
+  //@{
+  Self& operator++()
+  {
+    ++iter;
+    return (*this);
+  }
+
+  Self operator++ (int )
+  {
+    Self tmp = *this;
+    ++iter;
+    return (tmp);
+  }
+  //@}
+
+  /// \name Decremernt operations (bidirectional category).
+  //@{
+  Self& operator-- ()
+  {
+    --iter;
+    return (*this);
+  }
+
+  Self operator-- (int )
+  {
+    Self tmp = *this;
+    --iter;
+    return (tmp);
+  }
+  //@}
+};
+
+/*!
+ * \class
+ * An iterator adaptor for the filtering a DCEL iterator (given as Iterator_)
+ * using a given filter functor (Filter_).
+ */
+template <class Iterator_, class Filter_,
+          class Value_, class Diff_, class Category_>
+class I_Filtered_iterator
+{
+public:
+
+  typedef Iterator_                       Iterator;
+  typedef Filter_                         Filter; 
+  typedef I_Filtered_iterator<Iterator_,
+                              Filter_,
+                              Value_,
+                              Diff_,
+                              Category_>  Self;
+
+  typedef Category_                       iterator_category;
+  typedef Value_                          value_type;
+  typedef value_type&                     reference;
+  typedef value_type*                     pointer;
+  typedef Diff_                           difference_type;
+
+protected:
+
+  Iterator        nt;       // The internal iterator (this member should not
+                            // be renamed in order to comply with the
+                            // HalfedgeDS circulators that refer to it).
+  Iterator        iend;     // A past-the-end iterator.        
+  Filter          filt;     // The filter functor.
+
+public:
+
+  /*! Constructors. */
+  I_Filtered_iterator()
+  {}
+
+  I_Filtered_iterator (Iterator it) :
+    nt (it),
+    iend (nt)
+  {}
+
+  I_Filtered_iterator (Iterator it, Iterator end) :
+    nt (it),
+    iend (end)
+  {
+    while (nt != iend && ! filt (*nt))
+      ++nt;
+  }
+
+  I_Filtered_iterator (Iterator it, Iterator end, Filter f) :
+    nt (it),
+    iend (end),
+    filt (f)
+  {
+    while (nt != iend && ! filt (*nt))
+      ++nt;
+  }
+
+  /*! Access operations. */
+  Iterator current_iterator() const
+  {
+    return (nt);
+  }
+
+  Iterator past_the_end () const
+  {
+    return (iend);
+  }
+
+  Filter filter () const
+  {
+    return (filt);
+  }
+
+  pointer ptr() const
+  {
+    return static_cast<pointer>(&(*nt));
+  }
+
+  /*! Equality operators. */
+  bool operator== (const Self& it) const
+  {
+    return (nt == it.nt);
+  }
+  
+  bool operator!= (const Self& it) const 
+  {
+    return !(*this == it);
+  }
+  
+  bool operator< (const Self& it) const
+  {
+    return &(**this) < (&*it);
+  }
+
+  /*! Dereferencing operators. */
+  reference operator*() const
+  {
+    return (*(ptr()));
+  }
+  
+  pointer operator->() const
+  {
+    return ptr();
+  }
+
+  /*! Increment operators. */
+  Self& operator++ ()
+  {
+    do
+    {
+      ++nt;
+    } while (!(nt == iend) && ! filt (*nt));
+
+    return (*this);
+  }
+   
+  Self operator++ (int)
+  {
+    Self tmp = *this;
+    ++(*this);
+    return tmp;
+  }
+
+  /*! Decrement operators. */
+  Self& operator-- ()
+  {
+    do
+    {
+      --nt;
+    } while (!(nt == iend) && ! filt (*nt));
+
+    return (*this);
+  }
+
+  Self operator-- (int)
+  {
+    Self tmp = *this;
+    --(*this);
+    return tmp;
+  }
+};
+
+/*!
+ * \class
+ * An iterator adaptor for the filtering a DCEL const iterator (given as
+ * CIterator_) using a given filter functor (Filter_).
+ */
+template <class CIterator_, class Filter_, class MIterator_,
+          class Value_, class Diff_, class Category_>
+class I_Filtered_const_iterator
+{
+public:
+
+  typedef CIterator_                             Iterator;
+  typedef Filter_                                Filter;
+  typedef I_Filtered_const_iterator<CIterator_,
+                                    Filter_,
+                                    MIterator_,
+                                    Value_,
+                                    Diff_,
+                                    Category_>   Self;
+
+  typedef Category_                              iterator_category;
+  typedef Value_                                 value_type;
+  typedef const value_type&                      reference;
+  typedef const value_type*                      pointer;
+  typedef Diff_                                  difference_type;
+
+  typedef I_Filtered_iterator<MIterator_, Filter_,
+                              Value_, Diff_,
+                              Category_>         mutable_iterator;
+
+protected:
+
+  Iterator       nt;       // The internal iterator (this member should not
+                           // be renamed in order to comply with the
+                           // HalfedgeDS circulators that refer to it).
+  Iterator       iend;     // A past-the-end iterator.        
+  Filter         filt;     // The filter functor.
+
+public:
+
+  /*! Constructors. */
+  I_Filtered_const_iterator()
+  {}
+
+  I_Filtered_const_iterator (Iterator it) :
+    nt (it),
+    iend (it)
+  {}
+
+  I_Filtered_const_iterator (Iterator it, Iterator end) :
+    nt (it),
+    iend (end)
+  {
+    while (nt != iend && ! filt (*nt))
+      ++nt;
+  }
+
+  I_Filtered_const_iterator (Iterator it, Iterator end, Filter f) :
+    nt (it),
+    iend (end),
+    filt (f)
+  {
+    while (nt != iend && ! filt (*nt))
+      ++nt;
+  }
+
+  I_Filtered_const_iterator (mutable_iterator it) :
+    nt (it.current_iterator()),
+    iend (it.past_the_end()),
+    filt (it.filter())
+  {
+    //    while (nt != iend && ! filt (*nt))
+    //      ++nt;
+  }
+
+  /*! Access operations. */
+  Iterator current_iterator() const
+  {
+    return (nt);
+  }
+
+  Iterator past_the_end () const
+  {
+    return (iend);
+  }
+
+  Filter filter () const
+  {
+    return (filt);
+  }
+
+  pointer ptr() const
+  {
+    return static_cast<pointer>(&(*nt));
+  }
+
+  /*! Equality operators. */
+  bool operator== (const Self& it) const
+  {
+    return (nt == it.nt);
+  }
+  
+  bool operator!= (const Self& it) const 
+  {
+    return !(*this == it);
+  }
+  
+  bool operator< (const Self& it) const
+  {
+    return &(**this) < (&*it);
+  }
+
+  /*! Dereferencing operators. */
+  reference operator*() const
+  {
+    return (*(ptr()));
+  }
+  
+  pointer operator->() const
+  {
+    return ptr();
+  }
+
+  /*! Increment operators. */
+  Self& operator++ ()
+  {
+    do
+    {
+      ++nt;
+    } while (!(nt == iend) && ! filt (*nt));
+
+    return (*this);
+  }
+   
+  Self operator++ (int)
+  {
+    Self tmp = *this;
+    ++(*this);
+    return tmp;
+  }
+
+  /*! Decrement operators. */
+  Self& operator-- ()
+  {
+    do
+    {
+      --nt;
+    } while (!(nt == iend) && ! filt (*nt));
+
+    return (*this);
+  }
+
+  Self operator-- (int)
+  {
+    Self tmp = *this;
+    --(*this);
+    return tmp;
+  }
+};
+
+} //namespace CGAL
+
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+  
+template <class CIterator_, class Filter_, class MIterator_,
+          class Value_, class Diff_, class Category_>
+struct hash<CGAL::I_Filtered_const_iterator<CIterator_,
+                                            Filter_,
+                                            MIterator_,
+                                            Value_,
+                                            Diff_,
+                                            Category_> > {
+
+  typedef CGAL::I_Filtered_const_iterator<CIterator_,
+                                          Filter_,
+                                          MIterator_,
+                                          Value_,
+                                          Diff_,
+                                          Category_>  I;
+
+    std::size_t operator()(const I& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(Value_);
+    }
+  };
+
+  template <class Iterator_, class Filter_,
+          class Value_, class Diff_, class Category_>
+  struct hash<CGAL::I_Filtered_iterator<Iterator_,
+                                        Filter_,
+                                        Value_,
+                                        Diff_,
+                                        Category_> > {
+  typedef CGAL::I_Filtered_iterator<Iterator_,
+                                    Filter_,
+                                    Value_,
+                                    Diff_,
+                                    Category_>  I;
+
+    std::size_t operator()(const I& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(typename I::value_type);
+    }
+  };
+
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+namespace  boost {
+  template <typename T> struct hash;
+
+template <class CIterator_, class Filter_, class MIterator_,
+          class Value_, class Diff_, class Category_>
+struct hash<CGAL::I_Filtered_const_iterator<CIterator_,
+                                            Filter_,
+                                            MIterator_,
+                                            Value_,
+                                            Diff_,
+                                            Category_> > {
+
+  typedef CGAL::I_Filtered_const_iterator<CIterator_,
+                                          Filter_,
+                                          MIterator_,
+                                          Value_,
+                                          Diff_,
+                                          Category_>  I;
+
+    std::size_t operator()(const I& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(Value_);
+    }
+  };
+
+  template <class Iterator_, class Filter_,
+          class Value_, class Diff_, class Category_>
+  struct hash<CGAL::I_Filtered_iterator<Iterator_,
+                                        Filter_,
+                                        Value_,
+                                        Diff_,
+                                        Category_> > {
+  typedef CGAL::I_Filtered_iterator<Iterator_,
+                                    Filter_,
+                                    Value_,
+                                    Diff_,
+                                    Category_>  I;
+
+    std::size_t operator()(const I& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(typename I::value_type);
+    }
+  };
+
+} // namespace boost
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
new file mode 100644
index 0000000..94d2eb4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
@@ -0,0 +1,5492 @@
+// Copyright (c) 2005,2006,2007,2008,2009,2010,2011,2012,2013 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ron Wein          <wein at post.tau.ac.il>
+//                 Efi Fogel         <efif at post.tau.ac.il>
+//                 Eric Berberich    <eric.berberich at cgal.org>
+//                 (based on old version by: Iddo Hanniel,
+//                                           Eyal Flato,
+//                                           Oren Nechushtan,
+//                                           Ester Ezra,
+//                                           Shai Hirsch,
+//                                           and Eugene Lipovetsky)
+//
+
+#ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_IMPL_H
+#define CGAL_ARRANGEMENT_ON_SURFACE_2_IMPL_H
+
+#ifndef CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+#define CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE 0
+#endif
+
+/*! \file
+ * Member-function definitions for the Arrangement_2<GeomTraits, TopTraits>
+ * class-template.
+ */
+
+#include <CGAL/function_objects.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+//-----------------------------------------------------------------------------
+// Default constructor.
+//
+template <typename GeomTraits, typename TopTraits>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::Arrangement_on_surface_2() :
+  m_topol_traits()
+{
+  typedef has_Left_side_category<GeomTraits> Cond_left;
+  typedef internal::Validate_left_side_category<GeomTraits, Cond_left::value>
+    Validate_left_side_category;
+  void (Validate_left_side_category::*pleft)(void) =
+    &Validate_left_side_category::template missing__Left_side_category<int>;
+  (void)pleft;
+
+  typedef has_Bottom_side_category<GeomTraits> Cond_bottom;
+  typedef internal::Validate_bottom_side_category<GeomTraits,
+                                                  Cond_bottom::value>
+    Validate_bottom_side_category;
+  void (Validate_bottom_side_category::*pbottom)(void) =
+    &Validate_bottom_side_category::template missing__Bottom_side_category<int>;
+  (void)pbottom;
+
+  typedef has_Top_side_category<GeomTraits> Cond_top;
+  typedef internal::Validate_top_side_category<GeomTraits, Cond_top::value>
+    Validate_top_side_category;
+  void (Validate_top_side_category::*ptop)(void) =
+    &Validate_top_side_category::template missing__Top_side_category<int>;
+  (void)ptop;
+
+  typedef has_Right_side_category<GeomTraits> Cond_right;
+  typedef internal::Validate_right_side_category<GeomTraits, Cond_right::value>
+    Validate_right_side_category;
+  void (Validate_right_side_category::*pright)(void) =
+    &Validate_right_side_category::template missing__Right_side_category<int>;
+  (void)pright;
+
+  // Initialize the DCEL structure to represent an empty arrangement.
+  m_topol_traits.init_dcel();
+
+  // Allocate the traits.
+  m_geom_traits = new Traits_adaptor_2;
+  m_own_traits = true;
+}
+
+//-----------------------------------------------------------------------------
+// Copy constructor.
+//
+template <typename GeomTraits, typename TopTraits>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+Arrangement_on_surface_2(const Self& arr) :
+  m_geom_traits(NULL),
+  m_own_traits(false)
+{
+  assign(arr);
+}
+
+//-----------------------------------------------------------------------------
+// Constructor given a traits object.
+//
+template <typename GeomTraits, typename TopTraits>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+Arrangement_on_surface_2(const Geometry_traits_2* geom_traits) :
+  m_topol_traits(geom_traits)
+{
+  typedef has_Left_side_category<GeomTraits> Cond_left;
+  typedef internal::Validate_left_side_category<GeomTraits, Cond_left::value>
+    Validate_left_side_category;
+  void (Validate_left_side_category::*pleft)(void) =
+    &Validate_left_side_category::template missing__Left_side_category<int>;
+  (void)pleft;
+
+  typedef has_Bottom_side_category<GeomTraits> Cond_bottom;
+  typedef internal::Validate_bottom_side_category<GeomTraits,
+                                                  Cond_bottom::value>
+    Validate_bottom_side_category;
+  void (Validate_bottom_side_category::*pbottom)(void) =
+    &Validate_bottom_side_category::template missing__Bottom_side_category<int>;
+  (void)pbottom;
+
+  typedef has_Top_side_category<GeomTraits> Cond_top;
+  typedef internal::Validate_top_side_category<GeomTraits, Cond_top::value>
+    Validate_top_side_category;
+  void (Validate_top_side_category::*ptop)(void) =
+    &Validate_top_side_category::template missing__Top_side_category<int>;
+  (void)ptop;
+
+  typedef has_Right_side_category<GeomTraits> Cond_right;
+  typedef internal::Validate_right_side_category<GeomTraits, Cond_right::value>
+    Validate_right_side_category;
+  void (Validate_right_side_category::*pright)(void) =
+    &Validate_right_side_category::template missing__Right_side_category<int>;
+  (void)pright;
+
+  // Initialize the DCEL structure to represent an empty arrangement.
+  m_topol_traits.init_dcel();
+
+  // Set the traits.
+  m_geom_traits = static_cast<const Traits_adaptor_2*>(geom_traits);
+  m_own_traits = false;
+}
+
+//-----------------------------------------------------------------------------
+// Assignment operator.
+//
+template <typename GeomTraits, typename TopTraits>
+Arrangement_on_surface_2<GeomTraits, TopTraits>&
+Arrangement_on_surface_2<GeomTraits, TopTraits>::operator=(const Self& arr)
+{
+  if (this == &arr) return (*this);     // handle self-assignment
+  assign(arr);
+  return (*this);
+}
+
+//-----------------------------------------------------------------------------
+// Assign an arrangement.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::assign(const Self& arr)
+{
+  // Clear the current contents of the arrangement.
+  clear();
+
+  // Notify the observers that an assignment is to take place.
+  _notify_before_assign(arr);
+
+  // Assign the topology-traits object.
+  m_topol_traits.assign(arr.m_topol_traits);
+
+  // Go over the vertices and create duplicates of the stored points.
+  Point_2* dup_p;
+  DVertex* p_v;
+
+  typename Dcel::Vertex_iterator vit;
+  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit) {
+    p_v = &(*vit);
+
+    if (! p_v->has_null_point()) {
+      // Create the duplicate point and store it in the points container.
+      dup_p = _new_point(p_v->point());
+
+      // Associate the vertex with the duplicated point.
+      p_v->set_point(dup_p);
+    }
+  }
+
+  // Go over the edge and create duplicates of the stored curves.
+  typename Dcel::Edge_iterator eit;
+  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit) {
+    DHalfedge* p_e = &(*eit);
+
+    if (! p_e->has_null_curve()) {
+      // Create the duplicate curve and store it in the curves container.
+      X_monotone_curve_2* dup_cv = _new_curve(p_e->curve());
+
+      // Associate the halfedge (and its twin) with the duplicated curve.
+      p_e->set_curve(dup_cv);
+    }
+  }
+
+  // Take care of the traits object.
+  if (m_own_traits && (m_geom_traits != NULL)) {
+    delete m_geom_traits;
+    m_geom_traits = NULL;
+  }
+
+  m_geom_traits = (arr.m_own_traits) ? new Traits_adaptor_2 : arr.m_geom_traits;
+  m_own_traits = arr.m_own_traits;
+
+  // Notify the observers that the assignment has been performed.
+  _notify_after_assign();
+}
+
+//-----------------------------------------------------------------------------
+// Destructor.
+//
+template <typename GeomTraits, typename TopTraits>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::~Arrangement_on_surface_2()
+{
+  // Free all stored points.
+  typename Dcel::Vertex_iterator vit;
+  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit)
+    if (! vit->has_null_point())
+      _delete_point(vit->point());
+
+  // Free all stores curves.
+  typename Dcel::Edge_iterator eit;
+  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit)
+    if (! eit->has_null_curve())
+      _delete_curve(eit->curve());
+
+  // Free the traits object, if necessary.
+  if (m_own_traits && (m_geom_traits != NULL)) {
+    delete m_geom_traits;
+    m_geom_traits = NULL;
+  }
+
+  // Detach all observers still attached to the arrangement.
+  Observers_iterator  iter = m_observers.begin();
+  Observers_iterator  next;
+  Observers_iterator  end = m_observers.end();
+
+  while (iter != end) {
+    next = iter;
+    ++next;
+    (*iter)->detach();
+    iter = next;
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Clear the arrangement.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::clear()
+{
+  // Notify the observers that we are about to clear the arragement.
+  _notify_before_clear();
+
+  // Free all stored points.
+  typename Dcel::Vertex_iterator vit;
+  for (vit = _dcel().vertices_begin(); vit != _dcel().vertices_end(); ++vit)
+    if (! vit->has_null_point()) _delete_point(vit->point());
+
+  // Free all stores curves.
+  typename Dcel::Edge_iterator eit;
+  for (eit = _dcel().edges_begin(); eit != _dcel().edges_end(); ++eit)
+    if (! eit->has_null_curve()) _delete_curve(eit->curve());
+
+  // Clear the DCEL and construct an empty arrangement.
+  _dcel().delete_all();
+  m_topol_traits.init_dcel();
+
+  // Notify the observers that we have just cleared the arragement.
+  _notify_after_clear();
+}
+
+//-----------------------------------------------------------------------------
+// Insert a point as an isolated vertex in the interior of a given face.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_in_face_interior(const Point_2& p, Face_handle f)
+{
+  DFace* p_f = _face(f);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: insert_in_face_interior (interface)" << std::endl;
+  std::cout << "pt   : " << p << std::endl;
+  std::cout << "face : " << &(*f) << std::endl;
+#endif
+
+  // Create a new vertex associated with the given point.
+  // We assume the point has no boundary conditions.
+  DVertex* v = _create_vertex(p);
+  Vertex_handle vh(v);
+
+  // Insert v as an isolated vertex inside the given face.
+  _insert_isolated_vertex(p_f, v);
+
+  // Return a handle to the new isolated vertex.
+  return vh;
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement as a new hole (inner
+// component) inside the given face.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: insert_in_face_interior (interface)" << std::endl;
+  std::cout << "cv   : " << cv << std::endl;
+  std::cout << "face : " << &(*f) << std::endl;
+#endif
+
+  DFace* p_f = _face(f);
+
+  // Check if cv's left end has boundary conditions, and obtain a vertex v1
+  // that corresponds to this end.
+  const Arr_parameter_space  ps_x1 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+  const Arr_parameter_space  ps_y1 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+  DHalfedge* fict_prev1 = NULL;
+
+  DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
+    // The curve has a valid left endpoint: Create a new vertex associated
+    // with the curve's left endpoint.
+    _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv)) :
+    // Locate the DCEL features that will be used for inserting the curve's
+    // left end.
+    _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
+
+  // Check if cv's right end has boundary conditions, and obtain a vertex v2
+  // that corresponds to this end.
+  const Arr_parameter_space  ps_x2 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
+  const Arr_parameter_space  ps_y2 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
+  DHalfedge* fict_prev2 = NULL;
+
+  DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
+    // The curve has a valid right endpoint: Create a new vertex associated
+    // with the curve's right endpoint.
+    _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv)) :
+    // Locate the DCEL features that will be used for inserting the curve's
+    // right end.
+    _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
+
+  // Create the edge connecting the two vertices (note we know v1 is
+  // lexicographically smaller than v2).
+  DHalfedge* new_he;
+
+  if ((fict_prev1 == NULL) && (fict_prev2 == NULL))
+    // Both vertices represent valid points.
+    new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
+  else if ((fict_prev1 == NULL) && (fict_prev2 != NULL)) {
+    // v1 represents a valid point and v2 is inserted using its predecessor.
+    new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
+    new_he = new_he->opposite();
+  }
+  else if ((fict_prev1 != NULL) && (fict_prev2 == NULL))
+    // v1 is inserted using its predecessor and v2 represents a valid point.
+    new_he = _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
+  else {
+    // Both vertices are inserted using their predecessor halfedges.
+
+    // Comment:
+    // In case the inserted curve has two vertical asymptotes at the top
+    // it happens that fict_prev1 is split by the max end and becomes the
+    // prev edge, which is fict_prev2. Since both pointers are equal they
+    // both point to the max end. Thus, we advance fict_prev1 by one
+    // such that it points to the min end again.
+    // Note that this only happens at the top. At the bottom everything
+    // goes fine since the insertion order is reverted with respect to the
+    // orientation of the edges.
+    //
+    // In the other function such a fix is not needed, as at most one
+    // curve-end reaches the boundary. It is also not possible to delay
+    // it to _insert_at_vertices, as that expects the two predecessor
+    // halfedges as input. An early detecting is also not possible
+    // (i.e.~in _place_and_set_curve_end), as that needs to know to be
+    // called from here!
+    if (fict_prev1 == fict_prev2) fict_prev1 = fict_prev1->next();
+
+    // Note that in this case we may create a new face.
+    bool new_face_created = false;
+    bool check_swapped_predecessors = false;
+    new_he = _insert_at_vertices(fict_prev1, cv, ARR_LEFT_TO_RIGHT,
+                                 fict_prev2->next(), new_face_created,
+                                 check_swapped_predecessors);
+    // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minumum so far
+    CGAL_assertion(!check_swapped_predecessors);
+    // usually one would expect to have an new_he (and its twin) lying on the
+    // same _inner_ CCB ...
+
+    if (new_face_created) {
+      // ... but in case that a new face got created new_he should lie on an
+      // outer CCB
+      CGAL_assertion(new_he->is_on_outer_ccb());
+      // Note! new_he is not needed to define the new outer CCB of the new face
+      // Here, it can be the outer ccb of the old face, as there is also not
+      // swapping taking place!
+
+      // In case a new face has been created (pointed by the new halfedge we
+      // obtained), we have to examine the holes and isolated vertices in the
+      // existing face (pointed by the twin halfedge) and move the relevant
+      // holes and isolated vertices into the new face.
+      _relocate_in_new_face(new_he);
+    }
+  }
+
+  // Return a handle to the new halfedge directed from left to right.
+  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that its left
+// endpoint corresponds to a given arrangement vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_from_left_vertex(const X_monotone_curve_2& cv,
+                        Vertex_handle v,
+                        Face_handle f)
+{
+  CGAL_precondition_code
+    (const bool at_obnd1 =
+     !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END));
+  CGAL_precondition_msg
+    ((! at_obnd1 &&
+      m_geom_traits->equal_2_object()
+      (v->point(),
+       m_geom_traits->construct_min_vertex_2_object()(cv))) ||
+     (at_obnd1 && v->is_at_open_boundary()),
+     "The input vertex should be the left curve end.");
+
+  // Check if cv's right end has boundary conditions. If not, create a vertex
+  // that corresponds to the right endpoint.
+  const Arr_parameter_space  ps_x2 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
+  const Arr_parameter_space  ps_y2 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
+  DVertex* v2 = NULL;
+  DHalfedge* fict_prev2 = NULL;
+
+  if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR))
+    // The curve has a valid right endpoint: Create a new vertex associated
+    // with the curve's right endpoint.
+    v2 = _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv));
+
+  // Check if the given vertex, corresponding to the left curve end, has no
+  // incident edges.
+  if (v->degree() == 0) {
+    // The given vertex is an isolated one: We should in fact insert the curve
+    // in the interior of the face containing this vertex.
+    DVertex* v1 = _vertex(v);
+    DIso_vertex* iv = NULL;
+    DFace* p_f = NULL;
+
+    if (v->is_isolated()) {
+      // Obtain the face from the isolated vertex.
+      iv = v1->isolated_vertex();
+      p_f = iv->face();
+    }
+    else {
+      // In this case the face that contains v should be provided by the user.
+      CGAL_precondition(f != Face_handle());
+      p_f = _face(f);
+    }
+
+    // If the vertex that corresponds to cv's right end has boundary
+    // conditions, create it now.
+    if (v2 == NULL)
+      // Locate the DCEL features that will be used for inserting the curve's
+      // right end.
+      v2 = _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2,
+                                    &fict_prev2);
+
+    if (iv != NULL) {
+      // Remove the isolated vertex v1, as it will not be isolated any more.
+      p_f->erase_isolated_vertex(iv);
+      _dcel().delete_isolated_vertex(iv);
+    }
+
+    // Create the edge connecting the two vertices (note that we know that
+    // v1 is smaller than v2).
+    DHalfedge* new_he;
+    if (fict_prev2 == NULL)
+      new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
+    else {
+      new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
+      new_he = new_he->opposite();
+    }
+
+    // Return a handle to the new halfedge directed from v1 to v2.
+    CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
+    return (Halfedge_handle(new_he));
+  }
+
+  // Go over the incident halfedges around v and find the halfedge after
+  // which the new curve should be inserted.
+  DHalfedge* prev1 = _locate_around_vertex(_vertex(v), cv, ARR_MIN_END);
+  CGAL_assertion_msg
+    (prev1 != NULL,
+     "The inserted curve cannot be located in the arrangement.");
+
+  DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
+    prev1->outer_ccb()->face();
+
+  // If the vertex that corresponds to cv's right end has boundary conditions,
+  // create it now.
+  if (v2 == NULL)
+    // Locate the DCEL features that will be used for inserting the curve's
+    // right end.
+    v2 =
+      _place_and_set_curve_end(f1, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
+
+  // Perform the insertion (note that we know that prev1->vertex is smaller
+  // than v2).
+  DHalfedge* new_he;
+
+  if (fict_prev2 == NULL)
+    // Insert the halfedge given the predecessor halfedge of v1.
+    new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
+  else {
+    // Insert the halfedge given the two predecessor halfedges.
+    // Note that in this case we may create a new face.
+    bool new_face_created = false;
+    bool check_swapped_predecessors = false;
+    new_he = _insert_at_vertices(prev1, cv, ARR_LEFT_TO_RIGHT,
+                                 fict_prev2->next(),
+                                 new_face_created, check_swapped_predecessors);
+    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
+    // merges the CCB as an "interior" extension into an outer CCB of a face
+    // incident the parameter space's boundary.
+    CGAL_assertion(!check_swapped_predecessors);
+
+    if (new_face_created) {
+      CGAL_assertion(new_he->is_on_outer_ccb());
+      // Note! new_he is not needed to define the new outer CCB of the new face
+      // Here, it can be the outer ccb of the old face, as there is also not
+      // swapping taking place!
+
+      // In case a new face has been created (pointed by the new halfedge we
+      // obtained), we have to examine the holes and isolated vertices in the
+      // existing face (pointed by the twin halfedge) and move the relevant
+      // holes and isolated vertices into the new face.
+      _relocate_in_new_face(new_he);
+    }
+  }
+
+  // Return a handle to the halfedge directed toward the new vertex v2.
+  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that one its left
+// endpoint corresponds to a given arrangement vertex, given the exact place
+// for the curve in the circular list around this vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: insert_from_left_vertex (interface)" << std::endl;
+  std::cout << "cv   : " << cv << std::endl;
+  if (!prev->is_fictitious()) {
+    std::cout << "prev : " << prev ->curve() << std::endl;
+  } else {
+    std::cout << "prev : fictitious" << std::endl;
+  }
+  std::cout << "dir  : " << prev->direction() << std::endl;
+#endif
+
+  CGAL_precondition_code
+    (const bool at_obnd1 =
+     !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END));
+  CGAL_precondition_msg
+    ((! at_obnd1 &&
+      m_geom_traits->equal_2_object()
+      (prev->target()->point(),
+       m_geom_traits->construct_min_vertex_2_object()(cv))) ||
+     (at_obnd1 && prev->target()->is_at_open_boundary()),
+     "The target of the input halfedge should be the left curve end.");
+
+  CGAL_precondition_msg
+    (at_obnd1 || _locate_around_vertex(_vertex(prev->target()),
+                                       cv, ARR_MIN_END) == _halfedge(prev),
+     "In the clockwise order of curves around the vertex, "
+     " cv must succeed the curve of prev.");
+
+  // Get the predecessor halfedge for the insertion of the left curve end.
+  DHalfedge* prev1 = _halfedge(prev);
+  DFace* f1 = _face(prev->face());
+
+  // Check if cv's right end has boundary conditions, and obtain a vertex
+  // that corresponds to this end.
+  const Arr_parameter_space  ps_x2 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
+  const Arr_parameter_space  ps_y2 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
+  DHalfedge* fict_prev2 = NULL;
+
+  DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
+    // The curve has a valid right endpoint: Create a new vertex associated
+    // with the curve's right endpoint.
+    _create_vertex(m_geom_traits->construct_max_vertex_2_object()(cv)) :
+    // Locate the DCEL features that will be used for inserting the curve's
+    // right end.
+    _place_and_set_curve_end(f1, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2);
+
+  // Perform the insertion (note that we know that prev1->vertex is smaller
+  // than v2).
+  DHalfedge* new_he;
+
+  if (fict_prev2 == NULL)
+    // Insert the halfedge given the predecessor halfedge of the left vertex.
+    new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
+  else {
+    // Insert the halfedge given the two predecessor halfedges.
+    // Note that in this case we may create a new face.
+    bool new_face_created = false;
+    bool check_swapped_predecessors = false;
+    new_he = _insert_at_vertices(prev1, cv, ARR_LEFT_TO_RIGHT,
+                                 fict_prev2->next(), new_face_created,
+                                 check_swapped_predecessors);
+    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
+    // merges the CCB as an "interior" extension into an outer CCB of a face
+    // incident the parameter space's boundary.
+    CGAL_assertion(!check_swapped_predecessors);
+
+    if (new_face_created) {
+      CGAL_assertion(new_he->is_on_outer_ccb());
+      // Note! new_he is not needed to define the new outer CCB of the new face
+      // Here, it can be the outer ccb of the old face, as there is also not
+      // swapping taking place!
+
+      // In case a new face has been created (pointed by the new halfedge we
+      // obtained), we have to examine the holes and isolated vertices in the
+      // existing face (pointed by the twin halfedge) and move the relevant
+      // holes and isolated vertices into the new face.
+      _relocate_in_new_face(new_he);
+    }
+  }
+
+  // Return a handle to the halfedge directed toward the new vertex v2.
+  CGAL_postcondition(new_he->direction() == ARR_LEFT_TO_RIGHT);
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that its right
+// endpoint corresponds to a given arrangement vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_from_right_vertex(const X_monotone_curve_2& cv,
+                         Vertex_handle v, Face_handle f)
+{
+  CGAL_precondition_code
+    (const bool at_obnd2 =
+     !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END));
+  CGAL_precondition_msg
+    ((! at_obnd2 &&
+      m_geom_traits->equal_2_object()
+      (v->point(),
+       m_geom_traits->construct_max_vertex_2_object()(cv))) ||
+     (at_obnd2 && v->is_at_open_boundary()),
+     "The input vertex should be the right curve end.");
+
+  // Check if cv's left end has boundary conditions. If not, create a vertex
+  // that corresponds to the left endpoint.
+  const Arr_parameter_space  ps_x1 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+  const Arr_parameter_space  ps_y1 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+  DVertex* v1 = NULL;
+  DHalfedge* fict_prev1 = NULL;
+
+  if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR))
+    // The curve has a valid left endpoint: Create a new vertex associated
+    // with the curve's left endpoint.
+    v1 = _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv));
+
+  // Check if the given vertex, corresponding to the right curve end, has no
+  // incident edges.
+  if (v->degree() == 0) {
+    // The given vertex is an isolated one: We should in fact insert the curve
+    // in the interior of the face containing this vertex.
+    DVertex* v2 = _vertex(v);
+    DIso_vertex* iv = NULL;
+    DFace* p_f = NULL;
+
+    if (v->is_isolated()) {
+      // Obtain the face from the isolated vertex.
+      iv = v2->isolated_vertex();
+      p_f = iv->face();
+    }
+    else {
+      // In this case the face that contains v should be provided by the user.
+      CGAL_precondition(f != Face_handle());
+      p_f = _face(f);
+    }
+
+    // If the vertex that corresponds to cv's left end has boundary
+    // conditions, create it now.
+    if (v1 == NULL)
+      // Locate the DCEL features that will be used for inserting the curve's
+      // left end.
+      v1 = _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1,
+                                    &fict_prev1);
+
+    if (iv != NULL) {
+      // Remove the isolated vertex v2, as it will not be isolated any more.
+      p_f->erase_isolated_vertex(iv);
+      _dcel().delete_isolated_vertex(iv);
+    }
+
+    // Create the edge connecting the two vertices (note that we know that
+    // v1 is smaller than v2).
+    DHalfedge* new_he = (fict_prev1 == NULL) ?
+      _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2) :
+      _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
+
+    // Return a handle to the new halfedge whose target is the new vertex v1.
+    CGAL_postcondition(new_he->opposite()->direction() == ARR_RIGHT_TO_LEFT);
+    return (Halfedge_handle(new_he->opposite()));
+  }
+
+  // Go over the incident halfedges around v and find the halfedge after
+  // which the new curve should be inserted.
+  DHalfedge* prev2 = _locate_around_vertex(_vertex(v), cv, ARR_MAX_END);
+  CGAL_assertion_msg
+    (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
+
+  DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
+    prev2->outer_ccb()->face();
+
+  // If the vertex that corresponds to cv's left end has boundary conditions,
+  // create it now.
+  if (v1 == NULL)
+    // Locate the DCEL features that will be used for inserting the curve's
+    // left end.
+    v1 =
+      _place_and_set_curve_end(f2, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
+
+  // Perform the insertion (note that we know that prev2->vertex is larger
+  // than v1).
+  DHalfedge* new_he;
+
+  if (fict_prev1 == NULL)
+    // Insert the halfedge given the predecessor halfedge of v2.
+    new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
+  else {
+    // Insert the halfedge given the two predecessor halfedges.
+    // Note that in this case we may create a new face.
+    bool new_face_created = false;
+    bool check_swapped_predecessors = false;
+    new_he = _insert_at_vertices(prev2, cv, ARR_RIGHT_TO_LEFT,
+                                 fict_prev1->next(), new_face_created,
+                                 check_swapped_predecessors);
+    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
+    // merges the CCB as an "interior" extension into an outer CCB of a face
+    // incident the parameter space's boundary.
+    CGAL_assertion(!check_swapped_predecessors);
+
+    if (new_face_created) {
+      CGAL_assertion(new_he->is_on_outer_ccb());
+      // Note! new_he is not needed to define the new outer CCB of the new face
+      // Here, it can be the outer ccb of the old face, as there is also not
+      // swapping taking place!
+
+      // In case a new face has been created (pointed by the new halfedge we
+      // obtained), we have to examine the holes and isolated vertices in the
+      // existing face (pointed by the twin halfedge) and move the relevant
+      // holes and isolated vertices into the new face.
+      _relocate_in_new_face(new_he);
+    }
+
+  }
+
+  // Return a handle to the halfedge directed toward the new vertex v1.
+  CGAL_postcondition(new_he->direction() == ARR_RIGHT_TO_LEFT);
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that its right
+// endpoint corresponds to a given arrangement vertex, given the exact place
+// for the curve in the circular list around this vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_from_right_vertex(const X_monotone_curve_2& cv,
+                         Halfedge_handle prev)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: insert_from_right_vertex (interface)" << std::endl;
+  std::cout << "cv   : " << cv << std::endl;
+  if (!prev->is_fictitious())
+    std::cout << "prev : " << prev ->curve() << std::endl;
+  else
+    std::cout << "prev : fictitious" << std::endl;
+  std::cout << "dir  : " << prev->direction() << std::endl;
+#endif
+
+  CGAL_precondition_code
+    (const bool at_obnd2 =
+     !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END));
+  CGAL_precondition_msg
+    ((! at_obnd2 &&
+      m_geom_traits->equal_2_object()
+      (prev->target()->point(),
+       m_geom_traits->construct_max_vertex_2_object()(cv))) ||
+     (at_obnd2 && prev->target()->is_at_open_boundary()),
+     "The input vertex should be the right curve end.");
+
+  CGAL_precondition_msg
+    (at_obnd2 ||
+     (_locate_around_vertex(_vertex(prev->target()), cv, ARR_MAX_END) ==
+      _halfedge(prev)),
+     "In the clockwise order of curves around the vertex, "
+     " cv must succeed the curve of prev.");
+
+  // Get the predecessor halfedge for the insertion of the right curve end.
+  DHalfedge* prev2 = _halfedge(prev);
+  DFace* f2 = _face(prev->face());
+
+  // Check if cv's left end has boundary conditions, and obtain a vertex v1
+  // that corresponds to this end.
+  const Arr_parameter_space  ps_x1 =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+  const Arr_parameter_space  ps_y1 =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+  DHalfedge* fict_prev1 = NULL;
+
+  DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
+    // The curve has a valid left endpoint: Create a new vertex associated
+    // with the curve's left endpoint.
+    _create_vertex(m_geom_traits->construct_min_vertex_2_object()(cv)) :
+    // Locate the DCEL features that will be used for inserting the curve's
+    // left end.
+    _place_and_set_curve_end(f2, cv, ARR_MIN_END, ps_x1, ps_y1, &fict_prev1);
+
+  // Perform the insertion (note that we know that prev2->vertex is larger
+  // than v1).
+  DHalfedge* new_he;
+
+  if (fict_prev1 == NULL)
+    // Insert the halfedge given the predecessor halfedge of the right vertex.
+    new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
+  else {
+    // Insert the halfedge given the two predecessor halfedges.
+    // Note that in this case we may create a new face.
+    bool new_face_created = false;
+    bool check_swapped_predecessors = false;
+    new_he = _insert_at_vertices(prev2, cv, ARR_RIGHT_TO_LEFT,
+                                 fict_prev1->next(), new_face_created,
+                                 check_swapped_predecessors);
+    // Comment EBEB 2012-10-21: Swapping does not take place as the insertion
+    // merges the CCB as an "interior" extension into an outer CCB of a face
+    // incident the parameter space's boundary.
+    CGAL_assertion(!check_swapped_predecessors);
+
+    if (new_face_created) {
+      CGAL_assertion(new_he->is_on_outer_ccb());
+      // Note! new_he is not needed to define the new outer CCB of the new face
+      // Here, it can be the outer ccb of the old face, as there is also not
+      // swapping taking place!
+
+      // In case a new face has been created (pointed by the new halfedge we
+      // obtained), we have to examine the holes and isolated vertices in the
+      // existing face (pointed by the twin halfedge) and move the relevant
+      // holes and isolated vertices into the new face.
+      _relocate_in_new_face(new_he);
+    }
+  }
+
+  // Return a handle to the halfedge directed toward the new vertex v1.
+  CGAL_postcondition(new_he->direction() == ARR_RIGHT_TO_LEFT);
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that both its
+// endpoints corresponds to a given arrangement vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_at_vertices(const X_monotone_curve_2& cv,
+                   Vertex_handle v1, Vertex_handle v2,
+                   Face_handle f)
+{
+  CGAL_USE(f);
+
+  // Determine which one of the given vertices matches the left end of the
+  // given curve.
+  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
+  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
+
+  Arr_curve_end ind1;
+  Arr_curve_end ind2;
+
+  if (! at_obnd1) {
+    CGAL_precondition_code(Vertex_handle v_right);
+
+    if (! v1->is_at_open_boundary() &&
+        m_geom_traits->equal_2_object()
+        (v1->point(),
+         m_geom_traits->construct_min_vertex_2_object()(cv)))
+    {
+      ind1 = ARR_MIN_END;
+      ind2 = ARR_MAX_END;
+      CGAL_precondition_code(v_right = v2);
+    }
+    else {
+      CGAL_precondition_msg
+        (! v2->is_at_open_boundary() &&
+         m_geom_traits->equal_2_object()
+         (v2->point(),
+          m_geom_traits->construct_min_vertex_2_object()(cv)),
+         "One of the input vertices should be the left curve end.");
+
+      ind1 = ARR_MAX_END;
+      ind2 = ARR_MIN_END;
+      CGAL_precondition_code(v_right = v1);
+    }
+
+    CGAL_precondition_msg
+      ((! at_obnd2 &&
+        m_geom_traits->equal_2_object()
+        (v_right->point(),
+         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
+       (at_obnd2 && v_right->is_at_open_boundary()),
+       "One of the input vertices should be the right curve end.");
+  }
+  else {
+    if (! at_obnd2) {
+      CGAL_precondition_code(Vertex_handle v_left);
+
+      if (! v1->is_at_open_boundary() &&
+          m_geom_traits->equal_2_object()
+          (v1->point(),
+           m_geom_traits->construct_max_vertex_2_object()(cv)))
+      {
+        ind1 = ARR_MAX_END;
+        ind2 = ARR_MIN_END;
+        CGAL_precondition_code(v_left = v2);
+      }
+      else {
+        CGAL_precondition_msg
+          (! v2->is_at_open_boundary() &&
+           m_geom_traits->equal_2_object()
+           (v2->point(),
+            m_geom_traits->construct_max_vertex_2_object()(cv)),
+           "One of the input vertices should be the right curve end.");
+
+        ind1 = ARR_MIN_END;
+        ind2 = ARR_MAX_END;
+        CGAL_precondition_code(v_left = v1);
+      }
+
+      CGAL_precondition_msg
+        (at_obnd1 && v_left->is_at_open_boundary(),
+         "One of the input vertices should be the left curve end.");
+    }
+    else {
+      Arr_parameter_space  ps_x1 =
+        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+      Arr_parameter_space  ps_y1 =
+        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+
+      // Check which vertex should be associated with the minimal curve-end
+      // (so the other is associated with the maximal curve-end).
+      if (m_topol_traits.are_equal(_vertex(v1), cv, ARR_MIN_END, ps_x1, ps_y1))
+      {
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(v2), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        ind1 = ARR_MIN_END;
+        ind2 = ARR_MAX_END;
+      }
+      else {
+        CGAL_assertion(m_topol_traits.are_equal
+                       (_vertex(v2), cv, ARR_MIN_END, ps_x1, ps_y1));
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(v1), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        ind1 = ARR_MAX_END;
+        ind2 = ARR_MIN_END;
+      }
+    }
+  }
+
+  // Check whether one of the vertices has no incident halfedges.
+  if (v1->degree() == 0) {
+    // Get the face containing the isolated vertex v1.
+    DVertex* p_v1 = _vertex(v1);
+    DIso_vertex* iv1 = NULL;
+    DFace* f1 = NULL;
+
+    if (p_v1->is_isolated()) {
+      // Obtain the containing face from the isolated vertex record.
+      iv1 = p_v1->isolated_vertex();
+      f1 = iv1->face();
+
+      // Remove the isolated vertex v1, as it will not be isolated any more.
+      f1->erase_isolated_vertex(iv1);
+      _dcel().delete_isolated_vertex(iv1);
+    }
+
+    // Check whether the other vertex also has no incident halfedges.
+    if (v2->degree() == 0) {
+      // Both end-vertices are isolated. Make sure they are contained inside
+      // the same face.
+      DVertex* p_v2 = _vertex(v2);
+      DIso_vertex* iv2 = NULL;
+      DFace* f2 = NULL;
+
+      if (p_v2->is_isolated()) {
+        // Obtain the containing face from the isolated vertex record.
+        iv2 = p_v2->isolated_vertex();
+        f2 = iv2->face();
+
+        CGAL_assertion_msg
+          ((f1 == NULL) || (f1 == f2),
+           "The two isolated vertices must be located inside the same face.");
+
+        // Remove the isolated vertex v2, as it will not be isolated any more.
+        f2->erase_isolated_vertex(iv2);
+        _dcel().delete_isolated_vertex(iv2);
+      }
+      else if (f1 == NULL)
+        // In this case the containing face must be given by the user.
+        CGAL_precondition(f != Face_handle());
+
+      // Perform the insertion.
+      Arr_halfedge_direction cv_dir =
+        (ind1 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
+      DHalfedge* new_he = _insert_in_face_interior(f1, cv, cv_dir, p_v1, p_v2);
+
+      return (Halfedge_handle(new_he));
+    }
+
+    // Go over the incident halfedges around v2 and find the halfedge after
+    // which the new curve should be inserted.
+    DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
+    CGAL_assertion_msg
+      (prev2 != NULL,
+       "The inserted curve cannot be located in the arrangement.");
+
+    CGAL_assertion_code
+      (DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
+       prev2->outer_ccb()->face());
+
+    CGAL_assertion_msg
+      ((f1 == NULL) || (f1 == f2),
+       "The inserted curve should not intersect the existing arrangement.");
+
+    // Perform the insertion. Note that the returned halfedge is directed
+    // toward v1 (and not toward v2), so we return its twin.
+    Arr_halfedge_direction cv_dir =
+      (ind2 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
+    DHalfedge* new_he = _insert_from_vertex(prev2, cv, cv_dir, p_v1);
+
+    return (Halfedge_handle(new_he->opposite()));
+  }
+  else if (v2->degree() == 0) {
+    // Get the face containing the isolated vertex v2.
+    DVertex* p_v2 = _vertex(v2);
+    DIso_vertex* iv2 = NULL;
+    DFace* f2 = NULL;
+
+    if (v2->is_isolated()) {
+      // Obtain the containing face from the isolated vertex record.
+      iv2 = p_v2->isolated_vertex();
+      f2 = iv2->face();
+
+      // Remove the isolated vertex v2, as it will not be isolated any more.
+      f2->erase_isolated_vertex(iv2);
+      _dcel().delete_isolated_vertex(iv2);
+    }
+
+    // Go over the incident halfedges around v1 and find the halfedge after
+    // which the new curve should be inserted.
+    DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
+    CGAL_assertion_msg
+      (prev1 != NULL,
+       "The inserted curve cannot be located in the arrangement.");
+
+    CGAL_assertion_code
+      (DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
+       prev1->outer_ccb()->face());
+
+    CGAL_assertion_msg
+      ((f2 == NULL) || (f2 == f1),
+       "The inserted curve should not intersect the existing arrangement.");
+
+    // Perform the insertion.
+    Arr_halfedge_direction cv_dir =
+      (ind1 == ARR_MIN_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
+    DHalfedge* new_he = _insert_from_vertex(prev1, cv, cv_dir, p_v2);
+
+    return (Halfedge_handle(new_he));
+  }
+
+  // Go over the incident halfedges around v1 and v2 and find the two
+  // halfedges after which the new curve should be inserted, respectively.
+  DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
+  DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
+
+  CGAL_assertion_msg
+    (((prev1 != NULL) && (prev2 != NULL)),
+     "The inserted curve cannot be located in the arrangement.");
+
+  // Perform the insertion.
+  return insert_at_vertices(cv, Halfedge_handle(prev1), Halfedge_handle(prev2));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that both its
+// endpoints correspond to given arrangement vertices, given the exact
+// place for the curve in one of the circular lists around a vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_at_vertices(const X_monotone_curve_2& cv,
+                   Halfedge_handle prev1,
+                   Vertex_handle v2)
+{
+  // Determine which one of the given vertices mathces the left end of the
+  // given curve.
+  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
+  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
+
+  Arr_curve_end      ind2;
+
+  if (! at_obnd1) {
+    CGAL_precondition_code(Vertex_handle  v_right);
+
+    if (! prev1->target()->is_at_open_boundary() &&
+        m_geom_traits->equal_2_object()
+        (prev1->target()->point(),
+         m_geom_traits->construct_min_vertex_2_object()(cv)))
+    {
+      ind2 = ARR_MAX_END;
+      CGAL_precondition_code(v_right = v2);
+    }
+    else {
+      CGAL_precondition_msg
+        (! v2->is_at_open_boundary() &&
+         m_geom_traits->equal_2_object()
+         (v2->point(),
+          m_geom_traits->construct_min_vertex_2_object()(cv)),
+         "One of the input vertices should be the left curve end.");
+
+      ind2 = ARR_MIN_END;
+      CGAL_precondition_code(v_right = prev1->target());
+    }
+
+    CGAL_precondition_msg
+      ((! at_obnd2 &&
+        m_geom_traits->equal_2_object()
+        (v_right->point(),
+         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
+       (at_obnd2 && v_right->is_at_open_boundary()),
+       "One of the input vertices should be the right curve end.");
+  }
+  else {
+    if (! at_obnd2) {
+      CGAL_precondition_code(Vertex_handle v_left);
+
+      if (! prev1->target()->is_at_open_boundary() &&
+          m_geom_traits->equal_2_object()
+          (prev1->target()->point(),
+           m_geom_traits->construct_max_vertex_2_object()(cv)))
+      {
+        ind2 = ARR_MIN_END;
+        CGAL_precondition_code(v_left = v2);
+      }
+      else {
+        CGAL_precondition_msg
+          (! v2->is_at_open_boundary() &&
+           m_geom_traits->equal_2_object()
+           (v2->point(),
+            m_geom_traits->construct_max_vertex_2_object()(cv)),
+           "One of the input vertices should be the right curve end.");
+
+        ind2 = ARR_MAX_END;
+        CGAL_precondition_code(v_left = prev1->target());
+      }
+
+      CGAL_precondition_msg
+        (at_obnd1 && v_left->is_at_open_boundary(),
+         "One of the input vertices should be the left curve end.");
+    }
+    else {
+      Arr_parameter_space  ps_x1 =
+        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+      Arr_parameter_space  ps_y1 =
+        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+
+      // Check which vertex should be associated with the minimal curve-end
+      // (so the other is associated with the maximal curve-end).
+      if (m_topol_traits.are_equal(_vertex(prev1->target()),
+                                   cv, ARR_MIN_END, ps_x1, ps_y1))
+      {
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(v2), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        ind2 = ARR_MAX_END;
+      }
+      else {
+        CGAL_assertion(m_topol_traits.are_equal
+                       (_vertex(v2), cv, ARR_MIN_END, ps_x1, ps_y1));
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(prev1->target()), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        ind2 = ARR_MIN_END;
+      }
+    }
+  }
+
+  // Check whether v2 is has no incident edges.
+  if (v2->degree() == 0) {
+    // Get the face containing the isolated vertex v2.
+    DVertex* p_v2 = _vertex(v2);
+    DIso_vertex* iv2 = NULL;
+    DFace* f2 = NULL;
+
+    if (v2->is_isolated()) {
+      iv2 = p_v2->isolated_vertex();
+      f2 = iv2->face();
+
+      CGAL_assertion_msg
+        (f2 == _face(prev1->face()),
+         "The inserted curve should not intersect the existing arrangement.");
+
+      // Remove the isolated vertex v2, as it will not be isolated any more.
+      f2->erase_isolated_vertex(iv2);
+      _dcel().delete_isolated_vertex(iv2);
+    }
+
+    // Perform the insertion.
+    Arr_halfedge_direction cv_dir =
+      (ind2 == ARR_MAX_END) ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT;
+    DHalfedge* new_he = _insert_from_vertex(_halfedge(prev1), cv, cv_dir, p_v2);
+
+    return (Halfedge_handle(new_he));
+  }
+
+  // Go over the incident halfedges around v2 and find the halfedge after
+  // which the new curve should be inserted.
+  DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
+  CGAL_assertion_msg
+    (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
+
+  // Perform the insertion.
+  return (insert_at_vertices(cv, prev1, Halfedge_handle(prev2)));
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that both its
+// endpoints correspond to given arrangement vertices, given the exact
+// place for the curve in both circular lists around these two vertices.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+insert_at_vertices(const X_monotone_curve_2& cv,
+                   Halfedge_handle prev1,
+                   Halfedge_handle prev2)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: insert_at_vertices (interface)" << std::endl;
+  std::cout << "cv   : " << cv << std::endl;
+  if (!prev1->is_fictitious())
+    std::cout << "prev1: " << prev1->curve() << std::endl;
+  else
+    std::cout << "prev1: fictitious" << std::endl;
+  std::cout << "dir1 : " << prev1->direction() << std::endl;
+  if (!prev2->is_fictitious())
+    std::cout << "prev2: " << prev2->curve() << std::endl;
+  else
+    std::cout << "prev2: fictitious" << std::endl;
+  std::cout << "dir2 : " << prev2->direction() << std::endl;
+#endif
+
+  // Determine which one of the given vertices (the target vertices of the
+  // given halfedges) mathces the left end of the given curve.
+  // Thus, we can determine the comparison result between prev1->target()
+  // and prev2->target().
+  const bool at_obnd1 = !m_geom_traits->is_closed_2_object()(cv, ARR_MIN_END);
+  const bool at_obnd2 = !m_geom_traits->is_closed_2_object()(cv, ARR_MAX_END);
+  Comparison_result  res;
+
+  if (! at_obnd1) {
+    CGAL_precondition_code(Vertex_handle  v_right);
+
+    if (! prev1->target()->is_at_open_boundary() &&
+        m_geom_traits->equal_2_object()
+        (prev1->target()->point(),
+         m_geom_traits->construct_min_vertex_2_object()(cv)))
+    {
+      res = SMALLER;
+      CGAL_precondition_code(v_right = prev2->target());
+    }
+    else {
+      CGAL_precondition_msg
+        (! prev2->target()->is_at_open_boundary() &&
+         m_geom_traits->equal_2_object()
+         (prev2->target()->point(),
+          m_geom_traits->construct_min_vertex_2_object()(cv)),
+         "One of the input vertices should be the left curve end.");
+
+      res = LARGER;
+      CGAL_precondition_code(v_right = prev1->target());
+    }
+
+    CGAL_precondition_msg
+      ((! at_obnd2 &&
+        m_geom_traits->equal_2_object()
+        (v_right->point(),
+         m_geom_traits->construct_max_vertex_2_object()(cv))) ||
+       (at_obnd2 && v_right->is_at_open_boundary()),
+       "One of the input vertices should be the right curve end.");
+  }
+  else {
+    if (! at_obnd2) {
+      CGAL_precondition_code(Vertex_handle  v_left);
+
+      if (! prev1->target()->is_at_open_boundary() &&
+          m_geom_traits->equal_2_object()
+          (prev1->target()->point(),
+           m_geom_traits->construct_max_vertex_2_object()(cv)))
+      {
+        res = LARGER;
+        CGAL_precondition_code(v_left = prev2->target());
+      }
+      else {
+        CGAL_precondition_msg
+          (! prev2->target()->is_at_open_boundary() &&
+           m_geom_traits->equal_2_object()
+           (prev2->target()->point(),
+            m_geom_traits->construct_max_vertex_2_object()(cv)),
+           "One of the input vertices should be the right curve end.");
+
+        res = SMALLER;
+        CGAL_precondition_code(v_left = prev1->target());
+      }
+
+      CGAL_precondition_msg
+        (at_obnd1 && v_left->is_at_open_boundary(),
+         "One of the input vertices should be the left curve end.");
+    }
+    else {
+      Arr_parameter_space ps_x1 =
+        m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
+      Arr_parameter_space ps_y1 =
+        m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
+      // Check which vertex should be associated with the minimal curve-end
+      // (so the other is associated with the maximal curve-end), and
+      // determine the comparison result of the two vertices accordingly.
+      if (m_topol_traits.are_equal(_vertex(prev1->target()),
+                                   cv, ARR_MIN_END, ps_x1, ps_y1))
+      {
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(prev2->target()), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        res = SMALLER;
+      }
+      else {
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(prev2->target()), cv, ARR_MIN_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END)));
+        CGAL_assertion
+          (m_topol_traits.are_equal
+           (_vertex(prev1->target()), cv, ARR_MAX_END,
+            m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END),
+            m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END)));
+
+        res = LARGER;
+      }
+    }
+  }
+
+  // Check if e1 and e2 are on the same connected component.
+  DHalfedge* p_prev1 = _halfedge(prev1);
+  DHalfedge* p_prev2 = _halfedge(prev2);
+
+  // Note that in this case we may create a new face.
+  bool new_face_created = false;
+  bool swapped_predecessors = false;
+  DHalfedge* new_he =
+    _insert_at_vertices(p_prev1, cv,
+                        (res == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                        p_prev2->next(), new_face_created,
+                        swapped_predecessors);
+
+  if (new_face_created)
+    // Comment EBEB 2012-10-21: Here we allow swapping, as there might be
+    // a local minima (or other needs), and thus new_he can lie on an inner CCB.
+    // In fact we cannot expect new_he to lie on an inner or on an outer CCB.
+
+    // In case a new face has been created (pointed by the new halfedge we
+    // obtained), we have to examine the holes and isolated vertices in the
+    // existing face (pointed by the twin halfedge) and move the relevant
+    // holes and isolated vertices into the new face.
+    _relocate_in_new_face(new_he);
+
+  // Return a handle to the new halfedge directed from prev1's target to
+  // prev2's target. Note that this may be the twin halfedge of the one
+  // returned by _insert_at_vertices();
+  if (swapped_predecessors) new_he = new_he->opposite();
+
+  return (Halfedge_handle(new_he));
+}
+
+//-----------------------------------------------------------------------------
+// Replace the point associated with the given vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+modify_vertex(Vertex_handle vh, const Point_2& p)
+{
+  CGAL_precondition_msg
+    (! vh->is_at_open_boundary(),
+     "The modified vertex must not lie on open boundary.");
+  CGAL_precondition_msg(m_geom_traits->equal_2_object()(vh->point(), p),
+                        "The new point is different from the current one.");
+
+  // Modify the vertex.
+  _modify_vertex(_vertex(vh), p);
+
+  // Return a handle to the modified vertex.
+  return vh;
+}
+
+//-----------------------------------------------------------------------------
+// Remove an isolated vertex from the interior of a given face.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+remove_isolated_vertex(Vertex_handle v)
+{
+  CGAL_precondition(v->is_isolated());
+
+  // Get the face containing v.
+  DVertex* p_v = _vertex(v);
+  DIso_vertex* iv = p_v->isolated_vertex();
+  DFace* p_f = iv->face();
+  Face_handle f = Face_handle(p_f);
+
+  // Notify the observers that we are abount to remove a vertex.
+  _notify_before_remove_vertex(v);
+
+  // Remove the isolated vertex from the face that contains it.
+  p_f->erase_isolated_vertex(iv);
+  _dcel().delete_isolated_vertex(iv);
+
+  // Delete the vertex.
+  _delete_point(p_v->point());
+  _dcel().delete_vertex(p_v);
+
+  // Notify the observers that the vertex has been removed.
+  _notify_after_remove_vertex();
+
+  // Return a handle for the face that used to contain the deleted vertex.
+  return f;
+}
+
+//-----------------------------------------------------------------------------
+// Replace the x-monotone curve associated with the given edge.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv)
+{
+  CGAL_precondition_msg(! e->is_fictitious(),
+                        "The edge must be a valid one.");
+  CGAL_precondition_msg(m_geom_traits->equal_2_object()(e->curve(), cv),
+                        "The new curve is different from the current one.");
+
+  // Modify the edge.
+  _modify_edge(_halfedge(e), cv);
+
+  // Return a handle to the modified halfedge.
+  return e;
+}
+
+//-----------------------------------------------------------------------------
+// Split a given edge into two, and associate the given x-monotone
+// curves with the split edges.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+split_edge(Halfedge_handle e,
+           const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
+{
+  CGAL_precondition_msg(! e->is_fictitious(), "The edge must be a valid one.");
+
+  // Get the split halfedge and its twin, its source and target.
+  DHalfedge* he1 = _halfedge(e);
+  DHalfedge* he2 = he1->opposite();
+  DVertex* source = he2->vertex();
+  CGAL_precondition_code(DVertex* target = he1->vertex());
+
+  // Determine the point where we split the halfedge. We also determine which
+  // curve should be associated with he1 (and he2), which is the curve who
+  // has an endpoint that equals e's source, and which should be associated
+  // with the new pair of halfedges we are about to split (the one who has
+  // an endpoint which equals e's target).
+  if ((m_geom_traits->parameter_space_in_x_2_object()(cv1, ARR_MAX_END) ==
+       ARR_INTERIOR) &&
+      (m_geom_traits->parameter_space_in_y_2_object()(cv1, ARR_MAX_END) ==
+       ARR_INTERIOR))
+  {
+    const Point_2 & cv1_right =
+      m_geom_traits->construct_max_vertex_2_object()(cv1);
+
+    if ((m_geom_traits->parameter_space_in_x_2_object()(cv2, ARR_MIN_END) ==
+         ARR_INTERIOR) &&
+        (m_geom_traits->parameter_space_in_y_2_object()(cv2, ARR_MIN_END) ==
+         ARR_INTERIOR) &&
+        m_geom_traits->equal_2_object()(m_geom_traits->
+                                        construct_min_vertex_2_object()(cv2),
+                                        cv1_right))
+    {
+      // cv1's right endpoint and cv2's left endpoint are equal, so this should
+      // be the split point. Now we check whether cv1 is incident to e's source
+      // and cv2 to its target, or vice versa.
+      if (_are_equal(source, cv1, ARR_MIN_END)) {
+        CGAL_precondition_msg
+          (_are_equal(target, cv2, ARR_MAX_END),
+           "The subcurve endpoints must match e's end vertices.");
+
+        return (Halfedge_handle(_split_edge(he1, cv1_right, cv1, cv2)));
+      }
+
+      CGAL_precondition_msg
+        (_are_equal(source, cv2, ARR_MAX_END) &&
+         _are_equal(target, cv1, ARR_MIN_END),
+         "The subcurve endpoints must match e's end vertices.");
+
+      return (Halfedge_handle(_split_edge(he1, cv1_right, cv2, cv1)));
+    }
+  }
+
+  if ((m_geom_traits->parameter_space_in_x_2_object()(cv1, ARR_MIN_END) ==
+       ARR_INTERIOR) &&
+      (m_geom_traits->parameter_space_in_y_2_object()(cv1, ARR_MIN_END) ==
+       ARR_INTERIOR))
+  {
+    const Point_2 & cv1_left =
+      m_geom_traits->construct_min_vertex_2_object()(cv1);
+
+    if ((m_geom_traits->parameter_space_in_x_2_object()(cv2, ARR_MAX_END) ==
+         ARR_INTERIOR) &&
+        (m_geom_traits->parameter_space_in_y_2_object()(cv2, ARR_MAX_END) ==
+         ARR_INTERIOR) &&
+        m_geom_traits->equal_2_object()(m_geom_traits->
+                                        construct_max_vertex_2_object()(cv2),
+                                        cv1_left))
+    {
+      // cv1's left endpoint and cv2's right endpoint are equal, so this should
+      // be the split point. Now we check whether cv1 is incident to e's source
+      // and cv2 to its target, or vice versa.
+      if (_are_equal(source, cv2, ARR_MIN_END)) {
+        CGAL_precondition_msg
+          (_are_equal(target, cv1, ARR_MAX_END),
+           "The subcurve endpoints must match e's end vertices.");
+
+        return (Halfedge_handle(_split_edge(he1, cv1_left, cv2, cv1)));
+      }
+
+      CGAL_precondition_msg
+        (_are_equal(source, cv1, ARR_MAX_END) &&
+         _are_equal(target, cv2, ARR_MIN_END),
+         "The subcurve endpoints must match e's end vertices.");
+
+      return (Halfedge_handle(_split_edge(he1, cv1_left, cv1, cv2)));
+    }
+  }
+
+  CGAL_error_msg("The two subcurves must have a common endpoint.");
+  return Halfedge_handle();
+}
+
+//-----------------------------------------------------------------------------
+// Merge two edges to form a single edge, and associate the given x-monotone
+// curve with the merged edge.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+merge_edge(Halfedge_handle e1, Halfedge_handle e2,
+           const X_monotone_curve_2& cv)
+{
+  CGAL_precondition_msg(! e1->is_fictitious() && ! e2->is_fictitious(),
+                        "The edges must be a valid.");
+
+  // Assign pointers to the existing halfedges, such that we have:
+  //
+  //            he1      he3
+  //         -------> ------->
+  //       (.)      (.)v     (.)
+  //         <------- <-------
+  //            he2      he4
+  //
+  DHalfedge* _e1 = _halfedge(e1);
+  DHalfedge* _e2 = _halfedge(e2);
+  DHalfedge* he1 = NULL;
+  DHalfedge* he2 = NULL;
+  DHalfedge* he3 = NULL;
+  DHalfedge* he4 = NULL;
+
+  if (_e1->vertex() == _e2->opposite()->vertex()) {
+    he1 = _e1;
+    he2 = he1->opposite();
+    he3 = _e2;
+    he4 = he3->opposite();
+  }
+  else if (_e1->opposite()->vertex() == _e2->opposite()->vertex()) {
+    he2 = _e1;
+    he1 = he2->opposite();
+    he3 = _e2;
+    he4 = he3->opposite();
+  }
+  else if (_e1->vertex() == _e2->vertex()) {
+    he1 = _e1;
+    he2 = he1->opposite();
+    he4 = _e2;
+    he3 = he4->opposite();
+  }
+  else if (_e1->opposite()->vertex() == _e2->vertex()) {
+    he2 = _e1;
+    he1 = he2->opposite();
+    he4 = _e2;
+    he3 = he4->opposite();
+  }
+  else {
+    CGAL_precondition_msg(false,
+                          "The input edges do not share a common vertex.");
+    return Halfedge_handle();
+  }
+
+  // The vertex we are about to delete is now he1's target vertex.
+  // Make sure that he1 and he4 are the only halfedges directed to v.
+  DVertex* v = he1->vertex();
+
+  CGAL_precondition_msg
+    (! v->has_null_point(),
+     "The vertex removed by the merge must not lie on open boundary.");
+  CGAL_precondition_msg
+    (he1->next()->opposite() == he4 &&
+     he4->next()->opposite() == he1,
+     "The degree of the deleted vertex is greater than 2.");
+
+  // Make sure the curve ends match the end vertices of the merged edge.
+  CGAL_precondition_msg
+    ((_are_equal(he2->vertex(), cv, ARR_MIN_END) &&
+      _are_equal(he3->vertex(), cv, ARR_MAX_END)) ||
+     (_are_equal(he3->vertex(), cv, ARR_MIN_END) &&
+      _are_equal(he2->vertex(), cv, ARR_MAX_END)),
+     "The endpoints of the merged curve must match the end vertices.");
+
+  // Keep pointers to the components that contain two halfedges he3 and he2,
+  // pointing at the end vertices of the merged halfedge.
+  DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
+  DOuter_ccb* oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
+
+  DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
+  DOuter_ccb* oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
+
+  // Notify the observers that we are about to merge an edge.
+  _notify_before_merge_edge(e1, e2, cv);
+
+  // As he1 and he2 will evetually represent the merged edge, while he3 and he4
+  // will be deleted, check if the deleted halfedges are represantatives of a
+  // the CCBs they belong to. If so, replace he3 by he1 and he4 by he2. Note
+  // that as we just change the component representatives, we do not have to
+  // notify the observers on the change.
+  if (oc1 != NULL && oc1->halfedge() == he3)
+    oc1->set_halfedge(he1);
+  else if (ic1 != NULL && ic1->halfedge() == he3)
+    ic1->set_halfedge(he1);
+
+  if (oc2 != NULL && oc2->halfedge() == he4)
+    oc2->set_halfedge(he2);
+  else if (ic2 != NULL && ic2->halfedge() == he4)
+    ic2->set_halfedge(he2);
+
+  // If he3 is the incident halfedge to its target, replace it by he1.
+  if (he3->vertex()->halfedge() == he3)
+    he3->vertex()->set_halfedge(he1);
+
+  // Disconnect he3 and he4 from the edge list.
+  if (he3->next() == he4) {
+    // he3 and he4 form an "antenna", so he1 and he2 must be connected
+    // together.
+    he1->set_next(he2);
+  }
+  else {
+    he1->set_next(he3->next());
+    he4->prev()->set_next(he2);
+  }
+
+  // Note that he1 (and its twin) is going to represent the merged edge while
+  // he3 (and its twin) is going to be removed. We therefore associate the
+  // merged curve with he1 and delete the curve associated with he3.
+  he1->curve() = cv;
+  _delete_curve(he3->curve());
+
+  // Set the properties of the merged edge.
+  he1->set_vertex(he3->vertex());
+
+  // Notify the observers that we are about to delete a vertex.
+  _notify_before_remove_vertex(Vertex_handle(v));
+
+  // Delete the point associated with the merged vertex.
+  _delete_point(v->point());
+
+  // Delete the merged vertex.
+  _dcel().delete_vertex(v);
+
+  // Notify the observers that the vertex has been deleted.
+  _notify_after_remove_vertex();
+
+  // Delete the redundant halfedge pair.
+  _dcel().delete_edge(he3);
+
+  // Create a handle for one of the merged halfedges.
+  Halfedge_handle hh(he1);
+
+  // Notify the observers that the edge has been merge.
+  _notify_after_merge_edge(hh);
+
+  // Return a handle for one of the merged halfedges.
+  return hh;
+}
+
+//-----------------------------------------------------------------------------
+// Remove an edge from the arrangement.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+remove_edge(Halfedge_handle e, bool remove_source, bool remove_target)
+{
+  // Comment EBEB 2012-08-06: this has become a simple forwarding function
+  // the intelligence of wether to swap he with he->opposite()
+  // has been moved to _remove_edge itself, as additional computed
+  // data is reused there
+
+  CGAL_precondition_msg(! e->is_fictitious(),
+                        "The edge must be a valid one.");
+
+  DHalfedge* he1 = _halfedge(e);
+  DFace* f = _remove_edge(he1, remove_source, remove_target);
+  return Face_handle(f);
+}
+
+//-----------------------------------------------------------------------------
+// Protected member functions (for internal use).
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// Locate the place for the given curve around the given vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_locate_around_vertex(DVertex* v,
+                      const X_monotone_curve_2& cv, Arr_curve_end ind) const
+{
+  // Check if the given curve-end has boundary conditions.
+  const Arr_parameter_space ps_x =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ind);
+  const Arr_parameter_space ps_y =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ind);
+
+  if ((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR))
+    // Use the topology-traits class to locate the predecessor halfedge for
+    // cv around the given vertex.
+    return m_topol_traits.locate_around_boundary_vertex(v, cv, ind, ps_x, ps_y);
+
+  // In case of a non-boundary vertex, we look for the predecessor around v.
+  // Get the first incident halfedge around v and the next halfedge.
+  DHalfedge* first = v->halfedge();
+  DHalfedge* curr = first;
+
+  if (curr == NULL) return NULL;
+
+  DHalfedge* next = curr->next()->opposite();
+
+  // In case there is only one halfedge incident to v, return this halfedge.
+  if (curr == next) return curr;
+
+  // Otherwise, we traverse the halfedges around v until we find the pair
+  // of adjacent halfedges between which we should insert cv.
+  typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
+    m_geom_traits->is_between_cw_2_object();
+
+  bool eq_curr, eq_next;
+  while (! is_between_cw(cv, (ind == ARR_MIN_END),
+                         curr->curve(),
+                         (curr->direction() == ARR_RIGHT_TO_LEFT),
+                         next->curve(),
+                         (next->direction() == ARR_RIGHT_TO_LEFT),
+                         v->point(), eq_curr, eq_next))
+  {
+    // If cv equals one of the curves associated with the halfedges, it is
+    // an illegal input curve, as it already exists in the arrangement.
+    if (eq_curr || eq_next) return NULL;
+
+    // Move to the next pair of incident halfedges.
+    curr = next;
+    next = curr->next()->opposite();
+
+    // If we completed a full traversal around v without locating the
+    // place for cv, it follows that cv overlaps and existing curve.
+    if (curr == first) return NULL;
+  }
+
+  // Return the halfedge we have located.
+  return curr;
+}
+
+//-----------------------------------------------------------------------------
+// Compute the distance (in halfedges) between two halfedges.
+//
+template <typename GeomTraits, typename TopTraits>
+unsigned int
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_halfedge_distance(const DHalfedge* e1, const DHalfedge* e2) const
+{
+  CGAL_precondition(e1 != e2);
+  if (e1 == e2) return (0);
+
+  // Traverse the halfedge chain from e1 until reaching e2.
+  const DHalfedge* curr = e1->next();
+  unsigned int dist = 1;
+
+  while (curr != e2) {
+    // If we have returned to e1, e2 is not reachable from e1.
+    if (curr == e1) {
+      CGAL_error();
+      return (0);
+    }
+
+    curr = curr->next();
+    ++dist;
+  }
+
+  // We have located e2 along the boundary of e1's component - return the
+  // distance (number of halfedges) between e1 and e2.
+  return (dist);
+}
+
+//-----------------------------------------------------------------------------
+//Compare the length of the induced paths from e1 to e2 and from e2 to e1.
+// return SMALLER if e1 to e2 is shorter, EQUAL if paths lengths are equal,
+//  o/w LARGER
+//
+template <typename GeomTraits, typename TopTraits>
+Comparison_result
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compare_induced_path_length(const DHalfedge* e1, const DHalfedge* e2) const
+{
+  CGAL_precondition(e1 != e2);
+  if (e1 == e2) return EQUAL;
+
+  // Traverse the halfedge chain from e1 until reaching e2.
+  const DHalfedge* curr1 = e1->next();
+  // Traverse the halfedge chain from e2 until reaching e1.
+  const DHalfedge* curr2 = e2->next();
+
+  while ((curr1 != e2) && (curr2 != e1)) {
+    // If we have returned to e1, e2 is not reachable from e1.
+    if (curr1 == e1) {
+      CGAL_error();
+      return EQUAL;
+    }
+
+    // If we have returned to e2, e1 is not reachable from e2.
+    if (curr2 == e2) {
+      CGAL_error();
+      return EQUAL;
+    }
+
+    curr1 = curr1->next();
+    curr2 = curr2->next();
+  }
+
+  // Return SMALLER if e1 to e2 is shorter than e2 to e1,
+  //  EQUAL if their lengths are equal, or LARGER if e2 to e1 is longer.
+  Comparison_result res =
+    (curr1 == e2) ? ((curr2 != e1) ? SMALLER : EQUAL) : LARGER;
+
+  CGAL_postcondition_code(int dist1 = _halfedge_distance(e1,e2));
+  CGAL_postcondition_code(int dist2 = _halfedge_distance(e2,e1));
+  CGAL_postcondition(((dist1 < dist2) && (res == SMALLER)) ||
+                     ((dist1 == dist2) && (res == EQUAL)) ||
+                     ((dist1 > dist2) && (res == LARGER)));
+
+  return res;
+}
+
+//-----------------------------------------------------------------------------
+// Move a given outer CCB from one face to another.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he)
+{
+  // Get the DCEL record that represents the outer CCB.
+  DOuter_ccb* oc = he->outer_ccb();
+
+  CGAL_assertion(oc->face() == from_face);
+
+  // Notify the observers that we are about to move an outer CCB.
+  Ccb_halfedge_circulator circ = (Halfedge_handle(he))->ccb();
+
+  _notify_before_move_outer_ccb(Face_handle(from_face), Face_handle(to_face),
+                                circ);
+
+  // Remove the hole from the current face.
+  from_face->erase_outer_ccb(oc);
+
+  // Modify the component that represents the hole.
+  oc->set_face(to_face);
+  to_face->add_outer_ccb(oc, he);
+
+  // Notify the observers that we have moved the outer CCB.
+  _notify_after_move_outer_ccb(circ);
+}
+
+//-----------------------------------------------------------------------------
+// Move a given inner CCB (hole) from one face to another.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_move_inner_ccb(DFace* from_face, DFace* to_face, DHalfedge* he)
+{
+  // Get the DCEL record that represents the inner CCB.
+  DInner_ccb* ic = he->inner_ccb();
+
+  CGAL_assertion(ic->face() == from_face);
+
+  // Notify the observers that we are about to move an inner CCB.
+  Ccb_halfedge_circulator   circ = (Halfedge_handle(he))->ccb();
+
+  _notify_before_move_inner_ccb(Face_handle(from_face), Face_handle(to_face),
+                                circ);
+
+  // Remove the hole from the current face.
+  from_face->erase_inner_ccb(ic);
+
+  // Modify the component that represents the hole.
+  ic->set_face(to_face);
+  to_face->add_inner_ccb(ic, he);
+
+  // Notify the observers that we have moved the inner CCB.
+  _notify_after_move_inner_ccb(circ);
+}
+
+//-----------------------------------------------------------------------------
+// Move all inner CCBs (holes) from one face to another.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_move_all_inner_ccb(DFace* from_face, DFace* to_face)
+{
+  // Comment EFEF 2015-09-28: The following loop and the loop at the end of this
+  // function should be replaced with a pair of notifiers, respectively,
+  // function_notify_before_move_all_inner_ccb();
+  // function_notify_after_move_all_inner_ccb();
+  DInner_ccb_iter ic_it = from_face->inner_ccbs_begin();
+  while (ic_it != from_face->inner_ccbs_end()) {
+    DHalfedge* he = *ic_it++;
+    Ccb_halfedge_circulator circ = (Halfedge_handle(he))->ccb();
+    _notify_before_move_inner_ccb(Face_handle(from_face), Face_handle(to_face),
+                                  circ);
+  }
+  ic_it = to_face->splice_inner_ccbs(*from_face);
+  while (ic_it != to_face->inner_ccbs_end()) {
+    DHalfedge* he = *ic_it++;
+    Ccb_halfedge_circulator circ = (Halfedge_handle(he))->ccb();
+    _notify_after_move_inner_ccb(circ);
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Insert the given vertex as an isolated vertex inside the given face.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_insert_isolated_vertex(DFace* f, DVertex* v)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: _insert_isolated_vertex (internal)" << std::endl;
+  if (!v->has_null_point())
+    std::cout << "v->point: " << v->point() << std::endl;
+  std::cout << "face   : " << f << std::endl;
+#endif
+
+  Face_handle fh(f);
+  Vertex_handle vh(v);
+
+  // Notify the observers that we are about to insert an isolated vertex
+  // inside f.
+  _notify_before_add_isolated_vertex(fh, vh);
+
+  // Create an isolated vertex-information object,
+  DIso_vertex* iv = _dcel().new_isolated_vertex();
+
+  // Set a pointer to the face containing the vertex.
+  iv->set_face(f);
+
+  // Initiate a new hole inside the given face.
+  f->add_isolated_vertex(iv, v);
+
+  // Associate the information with the vertex.
+  v->set_isolated_vertex(iv);
+
+  // Notify the observers that we have formed a new isolated vertex.
+  _notify_after_add_isolated_vertex(vh);
+}
+
+//-----------------------------------------------------------------------------
+// Move a given isolated vertex from one face to another.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v)
+{
+  // Get the DCEL isolated-vertex record.
+  DIso_vertex* iv = v->isolated_vertex();
+
+  // Notify the observers that we are about to move an isolated vertex.
+  Vertex_handle vh(v);
+
+  _notify_before_move_isolated_vertex(Face_handle(from_face),
+                                      Face_handle(to_face), vh);
+
+  // Set the new face is the isolated vertex-information object.
+  iv->set_face(to_face);
+
+  // Move the isolated vertex from the first face to the other.
+  from_face->erase_isolated_vertex(iv);
+  to_face->add_isolated_vertex(iv, v);
+
+  // Notify the observers that we have moved the isolated vertex.
+  _notify_after_move_isolated_vertex(vh);
+}
+
+//-----------------------------------------------------------------------------
+// Move all isolated vertices from one face to another.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_move_all_isolated_vertices(DFace* from_face, DFace* to_face)
+{
+  // Comment EFEF 2015-09-28: The following loop and the loop at the end of this
+  // function should be replaced with a pair of notifiers, respectively,
+  // function_notify_before_move_all_isolated_vertices();
+  // function_notify_after_move_all_isolated_vertices();
+  DIso_vertex_iter iv_it = from_face->isolated_vertices_begin();
+  while (iv_it != from_face->isolated_vertices_end()) {
+    DVertex* v = &(*iv_it++);
+    Vertex_handle vh(v);
+    _notify_before_move_isolated_vertex(Face_handle(from_face),
+                                        Face_handle(to_face),
+                                        vh);
+  }
+  iv_it = to_face->splice_isolated_vertices(*from_face);
+  while (iv_it != to_face->isolated_vertices_end()) {
+    DVertex* v = &(*iv_it++);
+    Vertex_handle vh(v);
+    _notify_after_move_isolated_vertex(vh);
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Create a new vertex and associate it with the given point.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_create_vertex(const Point_2& p)
+{
+  // Notify the observers that we are about to create a new vertex.
+  Point_2* p_p = _new_point(p);
+
+  _notify_before_create_vertex(*p_p);
+
+  // Create a new vertex and associate it with the given point.
+  DVertex* v = _dcel().new_vertex();
+
+  v->set_point(p_p);
+  v->set_boundary(ARR_INTERIOR, ARR_INTERIOR);
+
+  // Notify the observers that we have just created a new vertex.
+  Vertex_handle   vh(v);
+  _notify_after_create_vertex(vh);
+
+  return v;
+}
+
+//-----------------------------------------------------------------------------
+// Create a new vertex on boundary
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_create_boundary_vertex(const X_monotone_curve_2& cv, Arr_curve_end ind,
+                        Arr_parameter_space ps_x, Arr_parameter_space ps_y)
+{
+  CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
+
+  // Notify the observers that we are about to create a new boundary vertex.
+  _notify_before_create_boundary_vertex(cv, ind, ps_x, ps_y);
+
+  // Create a new vertex and set its boundary conditions.
+  DVertex* v = _dcel().new_vertex();
+
+  v->set_boundary(ps_x, ps_y);
+
+  // Act according to the boundary type if there is one:
+  if (is_open(ps_x, ps_y))
+    // The curve-end lies on open boundary so the vertex is not associated
+    // with a valid point.
+    v->set_point(NULL);
+  else {
+    // Create a boundary vertex associated with a valid point.
+    Point_2* p_p = (ind == ARR_MIN_END) ?
+      _new_point(m_geom_traits->construct_min_vertex_2_object()(cv)) :
+      _new_point(m_geom_traits->construct_max_vertex_2_object()(cv));
+
+    v->set_point(p_p);
+  }
+
+  // Notify the observers that we have just created a new boundary vertex.
+  Vertex_handle   vh(v);
+  _notify_after_create_boundary_vertex(vh);
+
+  return v;
+}
+
+//-----------------------------------------------------------------------------
+// Locate the DCEL features that will be used for inserting the given curve
+// end, which has a boundary condition, and set the proper vertex there.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DVertex*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_place_and_set_curve_end(DFace* f,
+                         const X_monotone_curve_2& cv, Arr_curve_end ind,
+                         Arr_parameter_space ps_x, Arr_parameter_space ps_y,
+                         DHalfedge** p_pred)
+{
+  // Use the topology traits to locate the DCEL feature that contains the
+  // given curve end.
+  CGAL::Object obj =
+    m_topol_traits.place_boundary_vertex(f, cv, ind, ps_x, ps_y);
+  DVertex* v;
+  DHalfedge* fict_he;
+
+  // Act according to the result type.
+  if (CGAL::assign(fict_he, obj)) {
+    // The curve end is located on a fictitious edge. We first create a new
+    // vertex that corresponds to the curve end.
+    v = _create_boundary_vertex(cv, ind, ps_x, ps_y);
+
+    // Split the fictitious halfedge at the newly created vertex.
+    // The returned halfedge is the predecessor for the insertion of the curve
+    // end around v.
+    _notify_before_split_fictitious_edge(Halfedge_handle(fict_he),
+                                         Vertex_handle(v));
+
+    *p_pred = m_topol_traits.split_fictitious_edge(fict_he, v);
+
+    _notify_after_split_fictitious_edge(Halfedge_handle(*p_pred),
+                                        Halfedge_handle((*p_pred)->next()));
+  }
+  else if (CGAL::assign(v, obj)) {
+    // In this case we are given an existing vertex that represents the curve
+    // end. We now have to locate the predecessor edge for the insertion of cv
+    // around this vertex.
+    *p_pred =
+      m_topol_traits.locate_around_boundary_vertex(v, cv, ind, ps_x, ps_y);
+  }
+  else {
+    CGAL_assertion(obj.is_empty());
+
+    // In this case we have to create a new vertex that reprsents the given
+    // curve end.
+    v = _create_boundary_vertex(cv, ind, ps_x, ps_y);
+
+    // Notify the topology traits on the creation of the boundary vertex.
+    m_topol_traits.notify_on_boundary_vertex_creation(v, cv, ind, ps_x, ps_y);
+
+    // There are no edges incident to v, therefore no predecessor halfedge.
+    *p_pred = NULL;
+  }
+
+  // Return the vertex that represents the curve end.
+  return v;
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that both its
+// endpoints correspond to free arrangement vertices (newly created vertices
+// or existing isolated vertices), so a new inner CCB is formed in the face
+// that contains the two vertices.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_insert_in_face_interior(DFace* f,
+                         const X_monotone_curve_2& cv,
+                         Arr_halfedge_direction cv_dir,
+                         DVertex* v1, DVertex* v2)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: _insert_in_face_interior (internal)" << std::endl;
+  std::cout << "face  : " << f << std::endl;
+  std::cout << "cv    : " << cv << std::endl;
+  std::cout << "cv_dir: " << cv_dir << std::endl;
+  if (!v1->has_null_point())
+    std::cout << "v1->point: " << v1->point() << std::endl;
+  if (!v2->has_null_point())
+    std::cout << "v2->point: " << v2->point() << std::endl;
+#endif
+
+  // Notify the observers that we are about to create a new edge.
+  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
+
+  // Create a pair of twin halfedges connecting the two vertices,
+  // and link them together to form a new connected component, a hole in f.
+  DHalfedge* he1 = _dcel().new_edge();
+  DHalfedge* he2 = he1->opposite();
+  DInner_ccb* ic = _dcel().new_inner_ccb();
+  X_monotone_curve_2* dup_cv = _new_curve(cv);
+
+  ic->set_face(f);
+  he1->set_curve(dup_cv);
+
+  he1->set_next(he2);
+  he1->set_vertex(v1);
+  he1->set_inner_ccb(ic);
+
+  he2->set_next(he1);
+  he2->set_vertex(v2);
+  he2->set_inner_ccb(ic);
+
+  // Assign the incident halfedges of the two new vertices.
+  v1->set_halfedge(he1);
+  v2->set_halfedge(he2);
+
+  // Set the direction of the halfedges
+  he2->set_direction(cv_dir);
+
+  // Create a handle to the new halfedge pointing at the curve target.
+  Halfedge_handle hh(he2);
+
+  // Notify the observers that we have created a new edge.
+  _notify_after_create_edge(hh);
+
+  // Notify the observers that we are about to form a new inner CCB inside f.
+  _notify_before_add_inner_ccb(Face_handle(f), hh);
+
+  // Initiate a new inner CCB inside the given face.
+  f->add_inner_ccb(ic, he2);
+
+  // Notify the observers that we have formed a new inner CCB.
+  _notify_after_add_inner_ccb(hh->ccb());
+
+  return he2;
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, such that one of its
+// endpoints corresponds to a given arrangement vertex, given the exact
+// place for the curve in the circular list around this vertex. The other
+// endpoint corrsponds to a free vertex (a newly created vertex or an
+// isolated vertex).
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
+                    Arr_halfedge_direction cv_dir,
+                    DVertex* v)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: _insert_from_vertex (internal)" << std::endl;
+  if (!he_to->has_null_curve())
+    std::cout << "he_to: " << he_to->curve() << std::endl;
+  else
+    std::cout << "he_to: fictitious" << std::endl;
+  std::cout << "f_to: " << (he_to->is_on_inner_ccb() ?
+                            he_to->inner_ccb()->face() :
+                            he_to->outer_ccb()->face()) << std::endl;
+  std::cout << "cv    : " << cv << std::endl;
+  std::cout << "cv_dir: " << cv_dir << std::endl;
+  if (!v->has_null_point())
+    std::cout << "v->point: " << v->point() << std::endl;
+#endif
+
+  // Get the incident face of the previous halfedge. Note that this will also
+  // be the incident face of the two new halfedges we are about to create.
+  DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : NULL;
+  DOuter_ccb* oc = (ic == NULL) ? he_to->outer_ccb() : NULL;
+
+  // The first vertex is the one that the he_to halfedge points to.
+  // The second vertex is given by v.
+  DVertex* v1 = he_to->vertex();
+  DVertex* v2 = v;
+
+  // Notify the observers that we are about to create a new edge.
+  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
+
+  // Create a pair of twin halfedges connecting the two vertices,
+  // and associate them with the given curve.
+  DHalfedge* he1 = _dcel().new_edge();
+  DHalfedge* he2 = he1->opposite();
+  X_monotone_curve_2* dup_cv = _new_curve(cv);
+
+  he1->set_curve(dup_cv);
+
+  he1->set_vertex(v1);
+  he2->set_vertex(v2);
+
+  // Set the component for the new halfedge pair.
+  if (oc != NULL) {
+    // On an outer component:
+    he1->set_outer_ccb(oc);
+    he2->set_outer_ccb(oc);
+  }
+  else {
+    // On an inner component:
+    he1->set_inner_ccb(ic);
+    he2->set_inner_ccb(ic);
+  }
+
+  // Associate the incident halfedge of the new vertex.
+  v2->set_halfedge(he2);
+
+  // Link the new halfedges around the existing vertex v1.
+  he2->set_next(he1);
+  he1->set_next(he_to->next());
+
+  he_to->set_next(he2);
+
+  // Set the direction of the halfedges
+  he2->set_direction(cv_dir);
+
+  // Notify the observers that we have created a new edge.
+  _notify_after_create_edge(Halfedge_handle(he2));
+
+  // Return a pointer to the new halfedge whose target is the free vertex v.
+  return he2;
+}
+
+//-----------------------------------------------------------------------------
+// Insert an x-monotone curve into the arrangement, where the end vertices
+// are given by the target points of two given halfedges.
+// The two halfedges should be given such that in case a new face is formed,
+// it will be the incident face of the halfedge directed from the first
+// vertex to the second vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_insert_at_vertices(DHalfedge* he_to,
+                    const X_monotone_curve_2& cv,
+                    Arr_halfedge_direction cv_dir,
+                    DHalfedge* he_away,
+                    bool& new_face,
+                    bool& swapped_predecessors,
+                    bool allow_swap_of_predecessors /* = true */)
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "_insert_at_vertices: " << cv << std::endl;
+#endif
+  // Comment: This is how the situation looks
+  //    ----to--->  >>cv_dir>>  ---away--->
+  //               o ===cv=== 0
+  //    <-tonext--              <-awaynext-
+  // or to be read from right to left ...
+  // this way, he_to and he_away lie
+  // BEFORE insertion on the same inner ccb and
+  // AFTER insertion on the same outer ccb
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: _insert_at_vertices (internal)" << std::endl;
+
+  if (!he_to->has_null_curve())
+    std::cout << "he_to: " << he_to->curve() << std::endl;
+  else
+    std::cout << "he_to: fictitious" << std::endl;
+  std::cout << "dir1 : " << he_to->direction() << std::endl;
+  std::cout << "f_to : " << (he_to->is_on_inner_ccb() ?
+                            he_to->inner_ccb()->face() :
+                            he_to->outer_ccb()->face()) << std::endl;
+  std::cout << "cv    : " << cv << std::endl;
+  std::cout << "cv_dir: " << cv_dir << std::endl;
+  if (!he_away->has_null_curve())
+    std::cout << "he_away: " << he_away->curve() << std::endl;
+  else
+    std::cout << "he_away: fictitious" << std::endl;
+  std::cout << "dir 2 : " << he_away->direction() << std::endl;
+  std::cout << "f_away: " << (he_away->is_on_inner_ccb() ?
+                             he_away->inner_ccb()->face() :
+                             he_away->outer_ccb()->face()) << std::endl;
+#endif
+
+  CGAL_precondition(he_to != NULL);
+  CGAL_precondition(he_away != NULL);
+
+  // TODO EBEB 2012-10-21 rewrite the code in terms of he_to and he_away instead of prev1 and prev2
+  // the remainder of the function we deal with this situation adds he1 and
+  // he2 in this way:
+  //    ----prev1---> ( --he2--> ) ---p2next--->
+  //                  o ===cv=== 0
+  //    <---p1next--- ( <--he1-- ) <---prev2----
+  DHalfedge* prev1 = he_to;
+  DHalfedge* prev2 = he_away->prev();
+
+  CGAL_precondition(prev1 != NULL);
+  CGAL_precondition(prev2 != NULL);
+  CGAL_precondition(prev1 != prev2);
+
+  // in general we do not swap ...
+  swapped_predecessors = false;
+
+  // default values for signs
+  std::pair<Sign, Sign> signs1(ZERO, ZERO);
+  std::pair<Sign, Sign> signs2(ZERO, ZERO);
+  // Remark: signs1 and signs2 are only used later when hole1==hole2
+
+  // Comment: This also checks which is the 'cheaper' (previously the
+  //          'shorter') way to insert the curve. Now cheaper means checking
+  //          less local minima!
+  if (allow_swap_of_predecessors) {
+    bool swap_predecessors = false;
+
+    // Comment EBEB 2012-08-05 hole1/hole2 appear later as ic1/ic2, but we keep
+    // them here, as the usage is rather local to decide swapping
+    DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
+    DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
+
+    if ((hole1 == hole2) && (hole1 != NULL)) {
+      // .. only in this special case, we have to check wether swapping should
+      // take place
+
+      // EBEB 2012-07-26 the following code enables optimizations:
+      // - avoid length-test
+      // - search only local minima to find leftmost vertex
+      // - re-use of signs of ccbs
+      // signs1/2 are only used when hole1 == hole2,
+      // thus we have to init them now
+      Arr_halfedge_direction cv_dir1 = cv_dir;
+      std::list<std::pair<const DHalfedge*, int> > local_mins1;
+      signs1 =
+        _compute_signs_and_local_minima(prev1, cv, cv_dir1, prev2->next(),
+                                        std::back_inserter(local_mins1));
+
+      Arr_halfedge_direction cv_dir2 = (cv_dir == ARR_LEFT_TO_RIGHT) ?
+        CGAL::ARR_RIGHT_TO_LEFT : CGAL::ARR_LEFT_TO_RIGHT;
+      std::list< std::pair< const DHalfedge*, int > > local_mins2;
+      signs2 =
+        _compute_signs_and_local_minima(prev2, cv, cv_dir2, prev1->next(),
+                                        std::back_inserter(local_mins2));
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "signs1.x: " << signs1.first << std::endl;
+      std::cout << "signs1.y: " << signs1.second << std::endl;
+      std::cout << "signs2.x: " << signs2.first << std::endl;
+      std::cout << "signs2.y: " << signs2.second << std::endl;
+      std::cout << "#local_mins1: " << local_mins1.size() << std::endl;
+      std::cout << "#local_mins2: " << local_mins2.size() << std::endl;
+#endif
+
+      if (!m_topol_traits.let_me_decide_the_outer_ccb(signs1, signs2,
+                                                      swap_predecessors))
+      {
+        // COMMENT: The previous solution needed O(min(length1, length2)) steps
+        //          to determine which path is shorter and the search for the
+        //          leftmost vertex on a path needs O(#local_mins) geometric
+        //          comparison. This solution saves the initial loop to
+        //          determine the shorter path and will only need O(min(#local
+        //          _mins1, #local_mins2)) geometric comparisons to determine
+        //          the leftmost vertex on a path.
+
+        // If there are no local minima in one the paths, it is expected
+        // that the topology traits (or its adapter) do decide the outer ccb.
+        CGAL_assertion(local_mins1.size() > 0);
+        CGAL_assertion(local_mins2.size() > 0);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+        std::cout << "decide swap" << std::endl;
+#endif
+
+        swap_predecessors =
+          !((local_mins1.size() < local_mins2.size()) ?
+            (  _defines_outer_ccb_of_new_face(prev1, cv, prev2->next(),
+                                              local_mins1.begin(),
+                                              local_mins1.end())) :
+            (! _defines_outer_ccb_of_new_face(prev2, cv, prev1->next(),
+                                              local_mins2.begin(),
+                                              local_mins2.end())));
+      }
+
+      // perform the swap
+      if (swap_predecessors) {
+        std::swap(prev1, prev2);
+        cv_dir = (cv_dir == ARR_LEFT_TO_RIGHT) ?
+          CGAL::ARR_RIGHT_TO_LEFT : CGAL::ARR_LEFT_TO_RIGHT;
+        std::swap(signs1, signs2);
+        std::swap(local_mins1, local_mins2);
+
+        // and store the value
+        swapped_predecessors = true;
+      }
+    }
+
+    // EBEB: For now, local_mins1/2 are local to this pre-check
+    // Idea: Use it later, however, this spoils uses of _insert_at_vertices
+    //       where allow_swap = false
+    //       On the other hand: this would allow to set representative
+    //       halfedge of ccbs to point to minimal vertex
+
+  } // allow_swap_of_predecessors
+
+  // Get the vertices that match cv's endpoints.
+  DVertex* v1 = prev1->vertex();
+  DVertex* v2 = prev2->vertex();
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "Aos_2: _insert_at_vertices (internal)" << std::endl;
+
+  std::cout << "cv   : " << cv << std::endl;
+  if (!prev1->has_null_curve())
+    std::cout << "prev1: " << prev1->curve() << std::endl;
+  else
+    std::cout << "prev1: fictitious" << std::endl;
+  std::cout << "dir1 : " << prev1->direction() << std::endl;
+  std::cout << "pref: " << (prev1->is_on_inner_ccb() ?
+                            prev1->inner_ccb()->face() :
+                            prev1->outer_ccb()->face()) << std::endl;
+  if (!prev2->has_null_curve())
+    std::cout << "prev2: " << prev2->curve() << std::endl;
+  else
+    std::cout << "prev2: fictitious" << std::endl;
+  std::cout << "dir 2: " << prev2->direction() << std::endl;
+  std::cout << "pref2: " << (prev2->is_on_inner_ccb() ?
+                             prev2->inner_ccb()->face() :
+                             prev2->outer_ccb()->face()) << std::endl;
+  std::cout << "cv_dir: " << cv_dir << std::endl;
+#endif
+
+  // Get the components containing the two previous halfedges and the incident
+  // face (which should be the same for the two components).
+  DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
+  DOuter_ccb* oc1 = (ic1 == NULL) ? prev1->outer_ccb() : NULL;
+  DFace* f = (ic1 != NULL) ? ic1->face() : oc1->face();
+  DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
+  DOuter_ccb* oc2 = (ic2 == NULL) ? prev2->outer_ccb() : NULL;
+
+  CGAL_precondition_code(DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face());
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "ic1: " << ic1 << std::endl;
+  std::cout << "ic2: " << ic2 << std::endl;
+  std::cout << "oc1: " << oc1 << std::endl;
+  std::cout << "oc2: " << oc2 << std::endl;
+  std::cout << "f1: " << &(*f) << std::endl;
+
+#if 0
+  DHalfedge* curr = prev1;
+  if (curr != curr->next()) {
+    curr = curr->next();
+    while (curr != prev1) {
+      if (!curr->has_null_curve())
+        std::cout << "curr: " << curr->curve() << std::endl;
+      else
+        std::cout << "curr: fictitious" << std::endl;
+      std::cout << "dir: "
+                << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ?
+                    "L2R" : "R2L")
+                << std::endl;
+      curr = curr->next();
+    }
+  } else {
+    std::cout << "only prev1" << std::endl;
+  }
+#endif
+
+  CGAL_precondition_code(std::cout << "f2: " << &(*f2) << std::endl);
+
+#if 0
+  curr = prev2;
+  if (curr != curr->next()) {
+    curr = curr->next();
+    while (curr != prev2) {
+      if (!curr->has_null_curve())
+        std::cout << "curr: " << curr->curve() << std::endl;
+      else
+        std::cout << "curr: fictitious" << std::endl;
+      std::cout << "dir: "
+                << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ?
+                    "L2R" : "R2L")
+                << std::endl;
+      curr = curr->next();
+    }
+  } else
+    std::cout << "only prev2" << std::endl;
+#endif
+#endif // CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+
+  CGAL_precondition_msg
+    (f == f2, "The two halfedges must share the same incident face.");
+
+  // In case the two previous halfedges lie on the same inner component inside
+  // the face f, we use the topology-traits class to determine whether we have
+  // to create a new face by splitting f, and if so - whether new face is
+  // contained in the existing face or just adjacent to it.
+  bool split_new_face = true;
+  bool is_split_face_contained = false;
+
+  if ((ic1 != NULL) && (ic1 == ic2)) {
+
+    // EBEB 2012-08-06:
+    // This is new code. It relies on the (computed) signs and replaces to
+    // trace the ccb again (in particular for torical arrangements)
+    // TODO EBEB 2012-08-06:
+    // Check what to do here, when allow_swap_of_predecessors = false and thus
+    // signs1 and signs2 set to DEFAULT (=ZERO) values.
+    // swapping is currently only disabled when _insert_at_vertices is called
+    // from Arr_construction_sl_visitor, which however uses the
+    // 'swap_predecessors' member of the topology traits' construction helper.
+    // So it's questionable whether we can combine the light-weigth swap
+    // information with the slightly more expensive sign computations, to keep
+    // efficient translated code after compile-time.
+    std::pair<bool, bool> res =
+      m_topol_traits.face_split_after_edge_insertion(signs1, signs2);
+
+    split_new_face = res.first;
+    is_split_face_contained = res.second;
+
+    // The result <false, true> is illegal:
+    CGAL_assertion(split_new_face || ! is_split_face_contained);
+  }
+
+  // Notify the observers that we are about to create a new edge.
+  _notify_before_create_edge(cv, Vertex_handle(v1), Vertex_handle(v2));
+
+  // Create a pair of twin halfedges connecting v1 and v2 and associate them
+  // with the given curve.
+  DHalfedge* he1 = _dcel().new_edge();
+  DHalfedge* he2 = he1->opposite();
+  X_monotone_curve_2* dup_cv = _new_curve(cv);
+
+  he1->set_curve(dup_cv);
+
+  he1->set_vertex(v1);
+  he2->set_vertex(v2);
+
+  // Connect the new halfedges to the existing halfedges around the two
+  // incident vertices.
+  he1->set_next(prev1->next());
+  he2->set_next(prev2->next());
+
+  prev1->set_next(he2);
+  prev2->set_next(he1);
+
+  he2->set_direction(cv_dir);
+
+  // Check the various cases of insertion (in the design document: the
+  // various sub-cases of case 3 in the insertion procedure).
+  if (((ic1 != NULL) || (ic2 != NULL)) && (ic1 != ic2)) {
+    // In case we have to connect two disconnected components, no new face
+    // is created.
+    new_face = false;
+
+    // Check whether both halfedges are inner components (holes) in the same
+    // face, or whether one is a hole and the other is on the outer boundary
+    // of the face.
+    Face_handle fh(f);
+
+    if ((ic1 != NULL) && (ic2 != NULL)) {
+      // In this case (3.1) we have to connect to inner CCBs (holes) inside f.
+      // Notify the observers that we are about to merge two holes in the face.
+      _notify_before_merge_inner_ccb(fh,
+                                     (Halfedge_handle(prev1))->ccb(),
+                                     (Halfedge_handle(prev2))->ccb(),
+                                     Halfedge_handle(he1));
+
+      // Remove the inner component prev2 belongs to, and unite it with the
+      // inner component that prev1 belongs to.
+      f->erase_inner_ccb(ic2);
+
+      // Set the merged component for the two new halfedges.
+      he1->set_inner_ccb(ic1);
+      he2->set_inner_ccb(ic1);
+
+      // Make all halfedges along ic2 to point to ic1.
+      DHalfedge* curr;
+
+      for (curr = he2->next(); curr != he1; curr = curr->next())
+        curr->set_inner_ccb(ic1);
+
+      // Delete the redundant inner CCB.
+      _dcel().delete_inner_ccb(ic2);
+
+      // Notify the observers that we have merged the two inner CCBs.
+      _notify_after_merge_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
+    }
+    else {
+      // In this case (3.2) we connect a hole (inner CCB) with an outer CCB
+      // of the face that contains it. We remove the hole and associate the
+      // pair of new halfedges with the outer boundary of the face f.
+      DInner_ccb* del_ic;
+      DOuter_ccb* oc;
+      DHalfedge* ccb_first;
+      DHalfedge* ccb_last;
+
+      if (ic1 != NULL) {
+        // We remove the inner CCB ic1 and merge in with the outer CCB oc2.
+        del_ic = ic1;
+        oc = oc2;
+        ccb_first = he1->next();
+        ccb_last = he2;
+      }
+      else {
+        // We remove the inner CCB ic2 and merge in with the outer CCB oc1.
+        del_ic = ic2;
+        oc = oc1;
+        ccb_first = he2->next();
+        ccb_last = he1;
+      }
+
+      he1->set_outer_ccb(oc);
+      he2->set_outer_ccb(oc);
+
+      // Notify the observers that we are about to remove an inner CCB from
+      // the face.
+      _notify_before_remove_inner_ccb(fh, (Halfedge_handle(ccb_first))->ccb());
+
+      // Remove the inner CCB from the face, as we have just connected it to
+      // the outer boundary of its incident face.
+      f->erase_inner_ccb(del_ic);
+
+      // Make all halfedges along the inner CCB to point to the outer CCB of f.
+      DHalfedge* curr;
+      for (curr = ccb_first; curr != ccb_last; curr = curr->next())
+        curr->set_outer_ccb(oc);
+
+      // Delete the redundant hole.
+      _dcel().delete_inner_ccb(del_ic);
+
+      // Notify the observers that we have removed an inner ccb.
+      _notify_after_remove_inner_ccb(fh);
+    }
+  }
+  else if (! split_new_face) {
+    // RWRW: NEW!
+    CGAL_assertion((ic1 == ic2) && (ic1 != NULL));
+
+    // Handle the special case where we close an inner CCB, such that
+    // we form two outer CCBs of the same face.
+    Face_handle fh(f);
+
+    // Notify the obserers we are about to remove an inner CCB from f.
+    _notify_before_remove_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
+
+    // Erase the inner CCB from the incident face and delete the
+    // corresponding component.
+    f->erase_inner_ccb(ic1);
+
+    _dcel().delete_inner_ccb(ic1);
+
+    // Notify the observers that the inner CCB has been removed.
+    _notify_after_remove_inner_ccb(fh);
+
+    // Handle the first split outer CCB (the one containing he1):
+    // Notify the obserers we are about to add an outer CCB to f.
+    _notify_before_add_outer_ccb(fh, Halfedge_handle(he1));
+
+    // Create a new outer CCB that for the face f, and make he1 the
+    // representative halfedge of this component.
+    DOuter_ccb* f_oc1 = _dcel().new_outer_ccb();
+
+    f->add_outer_ccb(f_oc1, he1);
+    f_oc1->set_face(f);
+    he1->set_outer_ccb(f_oc1);
+
+    // Set the component of all halfedges that used to belong to he1's CCB.
+    DHalfedge* curr;
+
+    for (curr = he1->next(); curr != he1; curr = curr->next())
+      curr->set_outer_ccb(f_oc1);
+
+    // Notify the observers that we have added an outer CCB to f.
+    _notify_after_add_outer_ccb((Halfedge_handle(he1))->ccb());
+
+    // Handle the second split outer CCB (the one containing he2):
+    // Notify the obserers we are about to add an outer CCB to f.
+    _notify_before_add_outer_ccb(fh, Halfedge_handle(he2));
+
+    // Create a new outer CCB that for the face f, and make he2 the
+    // representative halfedge of this component.
+    DOuter_ccb* f_oc2 = _dcel().new_outer_ccb();
+
+    f->add_outer_ccb(f_oc2, he2);
+    f_oc2->set_face(f);
+    he2->set_outer_ccb(f_oc2);
+
+    // Set the component of all halfedges that used to belong to he2's CCB.
+    for (curr = he2->next(); curr != he2; curr = curr->next())
+      curr->set_outer_ccb(f_oc2);
+
+    // Notify the observers that we have added an outer CCB to f.
+    _notify_after_add_outer_ccb((Halfedge_handle(he2))->ccb());
+
+    // Mark that in this case no new face is created:
+    new_face = false;
+  }
+  else if ((ic1 == ic2) && (oc1 == oc2)) {
+    // In this case we created a pair of halfedge that connect halfedges that
+    // already belong to the same component. This means we have to cretae a
+    // new face by splitting the existing face f.
+    // Notify the observers that we are about to split a face.
+    Face_handle fh(f);
+
+    _notify_before_split_face(fh, Halfedge_handle(he1));
+
+    // Create the new face and create a single outer component which should
+    // point to he2.
+    DFace* new_f = _dcel().new_face();
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+    std::cout << "new face: " << new_f << std::endl;
+#endif
+
+    DOuter_ccb* new_oc = _dcel().new_outer_ccb();
+
+    new_face = true;
+    new_f->add_outer_ccb(new_oc, he2);
+    new_oc->set_face(new_f);
+
+    // Set the components of the new halfedge he2, which should be the new
+    // outer comoponent of the new face.
+    // Note that there are several cases for setting he1's component, so we
+    // do not do it yet.
+    he2->set_outer_ccb(new_oc);
+
+    // Set the component of all halfedges that used to belong to he2's CCB.
+    DHalfedge* curr;
+
+    for (curr = he2->next(); curr != he2; curr = curr->next())
+      curr->set_outer_ccb(new_oc);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+    std::cout << "(=> prev1=" << &(*prev1) << ") he2= " << &(*he2)
+              << "  defines new outer CCB" << std::endl;
+    std::cout << "he2dir  : " << he2->direction() << std::endl;
+    std::cout << "prev1->face(): " << (prev1->is_on_inner_ccb() ?
+                                       prev1->inner_ccb()->face() :
+                                       prev1->outer_ccb()->face())
+              << std::endl;
+    std::cout << "signs1: " << signs1.first  << "," << signs1.second
+              << std::endl;
+#endif
+
+    // Check whether the two previous halfedges lie on the same innder CCB
+    // or on the same outer CCB (distinguish case 3.3 and case 3.4).
+    bool   is_hole;
+
+    if (ic1 != NULL) {
+      // In this case (3.3) we have two distinguish two sub-cases.
+      if (is_split_face_contained) {
+        // Comment: This is true for all non-identification topologies
+
+        // The halfedges prev1 and prev2 belong to the same inner component
+        // (hole) inside the face f, such that the new edge creates a new
+        // face that is contained in f (case 3.3.1).
+        is_hole = true;
+
+        // In this case, he1 lies on an inner CCB of f.
+        he1->set_inner_ccb(ic1);
+
+        // Note that the current representative of the inner CCB may not
+        // belong to the hole any more. In this case we replace the hole
+        // representative by he1.
+        if (! ic1->halfedge()->is_on_inner_ccb())
+          ic1->set_halfedge(he1);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+        std::cout << "(=> prev2=" << &(*prev2) << ") he1= " << &(*he1)
+                  << "  defines new inner CCB" << std::endl;
+        std::cout << "he1dir  : " << he1->direction() << std::endl;
+        std::cout << "prev2->face(): " << (prev2->is_on_inner_ccb() ?
+                                           prev2->inner_ccb()->face() :
+                                           prev2->outer_ccb()->face())
+                  << std::endl;
+        std::cout << "signs2: " << signs2.first  << "," << signs2.second
+                  << std::endl;
+#endif
+      }
+      else {
+        // Comment: This case can only occur in identification topologies
+
+        // The new face we have created should be adjacent to the existing
+        // face (case 3.3.2).
+        is_hole = false;
+
+        // Notify the obserers we are about to add an outer CCB to f.
+        _notify_before_add_outer_ccb(fh, Halfedge_handle(he1));
+
+        // Create a new outer CCB that for the face f, and make he1 the
+        // representative halfedge of this component.
+        DOuter_ccb* f_oc = _dcel().new_outer_ccb();
+
+        f->add_outer_ccb(f_oc, he1);
+        f_oc->set_face(f);
+        he1->set_outer_ccb(f_oc);
+
+        // Set the component of all halfedges that used to belong to he1's
+        // CCB.
+        for (curr = he1->next(); curr != he1; curr = curr->next())
+          curr->set_outer_ccb(f_oc);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+        std::cout << "(=> prev2=" << &(*prev2) << ") he1= " << &(*he1) << "  defines new outer CCB" << std::endl;
+        std::cout << "he1dir  : " << he1->direction() << std::endl;
+        std::cout << "prev2->face(): " << (prev2->is_on_inner_ccb() ?
+                                           prev2->inner_ccb()->face() :
+                                           prev2->outer_ccb()->face())
+                  << std::endl;
+        std::cout << "signs2: " << signs2.first  << "," << signs2.second
+                  << std::endl;
+#endif
+
+        // Notify the observers that we have added an outer CCB to f.
+        _notify_after_add_outer_ccb((Halfedge_handle(he1))->ccb());
+
+        // Go over all other outer CCBs of f and check whether they should be
+        // moved to be outer CCBs of the new face.
+        DOuter_ccb_iter  oc_it = f->outer_ccbs_begin();
+        DOuter_ccb_iter  oc_to_move;
+
+
+        while (oc_it != f->outer_ccbs_end()) {
+          // Use the topology traits to determine whether the representative
+          // of the current outer CCB should belong to the same face as he2
+          // (which is on the outer boundary of the new face).
+          bool increment = true;
+          if (*oc_it != he1) {
+
+            // he2 is supposed to be a perimetric path and so all of the oc_its,
+            // we only have to detect which one. We do so by comparing signs of
+            // ccbs:
+            // IDEA EBEB 2012-07-28
+            // store signs of CCB with CCB in DCEL and use them here
+            // *oc_it is already closed, so we do a full round
+            // (default = false)
+            std::pair<Sign, Sign> signs_oc =
+              _compute_signs(*oc_it, Has_identified_sides_category());
+
+            bool move = false;
+
+            // TODO EBEB 2013-07-15 refactor into own function
+            // TODO EBEB 2012-08-07 this either compares signs in left-right
+            // direction OR signs in bottom-top direction, which will probably
+            // not work for torus!
+            if ((signs2.first != CGAL::ZERO) && (signs_oc.first != CGAL::ZERO))
+            {
+              if (signs2.first != signs_oc.first) move = true;
+            }
+            else if ((signs2.second != CGAL::ZERO) &&
+                     (signs_oc.second != CGAL::ZERO))
+            {
+              if (signs2.second != signs_oc.second) move = true;
+            }
+
+            if (move) {
+              // We increment the itrator before moving the outer CCB, because
+              // this operation invalidates the iterator.
+              increment = false;
+              oc_to_move = oc_it;
+              ++oc_it;
+
+              _move_outer_ccb(f, new_f, *oc_to_move);
+            }
+          }
+
+          if (increment) ++oc_it;
+        }
+      }
+    }
+    else {
+      // In this case the face f is simply split into two (case 3.4).
+      is_hole = false;
+
+      // In this case, he1 lies on an outer CCB of f.
+      he1->set_outer_ccb(oc1);
+
+      // As the outer component of the exisitng face f may associated with
+      // one of the halfedges along the boundary of the new face, we set it
+      // to be he1.
+      oc1->set_halfedge(he1);
+    }
+
+    // Check whether we should mark the original face and the new face as
+    // bounded or as unbounded faces.
+    if (! f->is_unbounded())
+      // The original face is bounded, so the new face split from it is
+      // obviously bounded.
+      new_f->set_unbounded(false);
+    else if (is_hole)
+      // The new face is a hole inside the original face, so it must be
+      // bounded.
+      new_f->set_unbounded(false);
+    else {
+      // Use the topology traits to determine whether each of the split
+      // faces is unbounded. Note that if the new face is bounded, then f
+      // obviously reamins unbounded and there is no need for further checks.
+      new_f->set_unbounded(m_topol_traits.is_unbounded(new_f));
+
+      if (new_f->is_unbounded())
+        f->set_unbounded(m_topol_traits.is_unbounded(f));
+    }
+
+    // Notify the observers that we have split the face.
+    _notify_after_split_face(fh, Face_handle(new_f), is_hole);
+  }
+  else {
+    CGAL_assertion((oc1 != NULL) && (oc2 != NULL) && (oc1 != oc2));
+
+    // In case prev1 and prev2 belong to different outer CCBs of the same
+    // face f (case 3.5), we have to merge this ccbs into one. Note that we
+    // do not create a new face.
+    new_face = false;
+
+    // Notify the observers that we are about to merge two outer CCBs.
+    Face_handle fh(f);
+
+    _notify_before_merge_outer_ccb(fh,
+                                   (Halfedge_handle(prev1))->ccb(),
+                                   (Halfedge_handle(prev2))->ccb(),
+                                   Halfedge_handle(he1));
+
+    // Remove the outer component prev2 belongs to, and unite it with the
+    // outer component that prev1 belongs to.
+    f->erase_outer_ccb(oc2);
+
+    // Set the merged component for the two new halfedges.
+    he1->set_outer_ccb(oc1);
+    he2->set_outer_ccb(oc1);
+
+    // Make all halfedges along oc2 to point to oc1.
+    DHalfedge* curr;
+
+    for (curr = he2->next(); curr != he1; curr = curr->next())
+      curr->set_outer_ccb(oc1);
+
+    // Delete the redundant outer CCB.
+    _dcel().delete_outer_ccb(oc2);
+
+    // Notify the observers that we have merged the two CCBs.
+    _notify_after_merge_outer_ccb(fh, (Halfedge_handle(he1))->ccb());
+  }
+
+  // Notify the observers that we have created a new edge.
+  _notify_after_create_edge(Halfedge_handle(he2));
+
+  // TODO EBEB 2012-08-08 add postcondition that checks sanity
+#if 0
+  {
+    DHalfedge* he1 = he2->opposite();
+    DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
+    DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
+    DFace* f1 = (ic1 != NULL) ? ic1->face() : oc1->face();
+    DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+    DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+    DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face();
+    CGAL_postcondition((ic1 != ic2) || (f1 == f2));
+  }
+#endif
+
+  // Return the halfedge directed from v1 to v2.
+  return he2;
+}
+
+//-----------------------------------------------------------------------------
+// Relocate all inner CCBs (holes) to their proper position,
+// immediately after a face has split due to the insertion of a new halfedge.
+//
+template <typename GeomTraits, typename TopTraits>
+void  Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_relocate_inner_ccbs_in_new_face(DHalfedge* new_he)
+{
+  // The given halfedge points to the new face, while its twin points to the
+  // old face (the one that has just been split).
+  DFace* new_face = (new_he->is_on_inner_ccb()) ?
+    new_he->inner_ccb()->face() : new_he->outer_ccb()->face();
+  DHalfedge* opp_he = new_he->opposite();
+  const bool opp_on_inner_ccb = opp_he->is_on_inner_ccb();
+  DFace* old_face = opp_on_inner_ccb ? opp_he->inner_ccb()->face() :
+    opp_he->outer_ccb()->face();
+
+  CGAL_assertion(new_face != old_face);
+
+  // Examine the inner CCBs inside the existing old face and move the relevant
+  // ones into the new face.
+  DInner_ccb_iter ic_it = old_face->inner_ccbs_begin();
+  while (ic_it != old_face->inner_ccbs_end()) {
+    // In case the new edge represents the current component in the old face
+    // (note we take the opposite halfedge, as it is incident to the old face),
+    // then the new face already forms a hole in the old face, and we do not
+    // need to move it.
+    CGAL_assertion((*ic_it)->is_on_inner_ccb());
+
+    if (opp_on_inner_ccb && ((*ic_it)->inner_ccb() == opp_he->inner_ccb())) {
+      ++ic_it;
+      continue;
+    }
+
+    // Check whether the current inner CCB is inside new face (we actually
+    // check if a representative vertex is located in the new face).
+    if (m_topol_traits.is_in_face(new_face, (*ic_it)->vertex()->point(),
+                                  (*ic_it)->vertex()))
+    {
+      // We store the current iterator which get then incremented before it
+      // gets moved, as the move operation invalidates the iterator.
+      DInner_ccb_iter ic_to_move = ic_it;
+      ++ic_it;
+      _move_inner_ccb(old_face, new_face, *ic_to_move); // move the hole
+    }
+    else
+      ++ic_it;
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Relocate all isolated vertices to their proper position,
+// immediately after a face has split due to the insertion of a new halfedge.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_relocate_isolated_vertices_in_new_face(DHalfedge* new_he)
+{
+  // The given halfedge points to the new face, while its twin points to the
+  // old face (the one that has just been split).
+  DFace* new_face = (new_he->is_on_inner_ccb()) ?
+    new_he->inner_ccb()->face() :
+    new_he->outer_ccb()->face();
+  DHalfedge* opp_he = new_he->opposite();
+  DFace* old_face = (opp_he->is_on_inner_ccb()) ?
+    opp_he->inner_ccb()->face() :
+    opp_he->outer_ccb()->face();
+
+  CGAL_assertion(new_face != old_face);
+
+  // Examine the isolated vertices inside the existing old face and move the
+  // relevant ones into the new face.
+  DIso_vertex_iter    iv_it;
+  DIso_vertex_iter    iv_to_move;
+
+  iv_it = old_face->isolated_vertices_begin();
+  while (iv_it != old_face->isolated_vertices_end()) {
+    // Check whether the isolated vertex lies inside the new face.
+    if (m_topol_traits.is_in_face(new_face, iv_it->point(), &(*iv_it))) {
+      // We increment the isolated vertices itrator before moving the vertex,
+      // because this operation invalidates the iterator.
+      iv_to_move  = iv_it;
+      ++iv_it;
+
+      // Move the isolated vertex.
+      _move_isolated_vertex(old_face, new_face, &(*iv_to_move));
+    }
+    else
+      ++iv_it;
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Relocate all holes (inner CCBs) and isolated vertices to their proper
+// position, immediately after a face has split due to the insertion of a new
+// halfedge.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_relocate_in_new_face(DHalfedge* new_he)
+{
+  _relocate_inner_ccbs_in_new_face(new_he);
+  _relocate_isolated_vertices_in_new_face(new_he);
+}
+
+//-----------------------------------------------------------------------------
+// Replace the point associated with the given vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_modify_vertex(DVertex* v, const Point_2& p)
+{
+  // Notify the observers that we are about to modify a vertex.
+  Vertex_handle vh(v);
+  _notify_before_modify_vertex(vh, p);
+
+  // Modify the point associated with the vertex.
+  v->point() = p;
+
+  // Notify the observers that we have modified the vertex.
+  _notify_after_modify_vertex(vh);
+}
+
+//-----------------------------------------------------------------------------
+// Replace the x-monotone curve associated with the given edge.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_modify_edge(DHalfedge* he, const X_monotone_curve_2& cv)
+{
+  // Notify the observers that we are about to modify an edge.
+  Halfedge_handle e(he);
+  _notify_before_modify_edge(e, cv);
+
+  // Modify the curve associated with the halfedge.
+  he->curve() = cv;
+
+  // Notify the observers that we have modified the edge.
+  _notify_after_modify_edge(e);
+}
+
+//-----------------------------------------------------------------------------
+// Check if the given vertex represents one of the ends of a given curve.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_are_equal(const DVertex* v,
+           const X_monotone_curve_2& cv, Arr_curve_end ind) const
+{
+  // In case the given curve end has boundary conditions, use the topology
+  // traits to determine whether it is equivalent to v.
+  const Arr_parameter_space ps_x =
+    m_geom_traits->parameter_space_in_x_2_object()(cv, ind);
+  const Arr_parameter_space ps_y =
+    m_geom_traits->parameter_space_in_y_2_object()(cv, ind);
+
+  if ((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR))
+    return (m_topol_traits.are_equal(v, cv, ind, ps_x, ps_y));
+
+  // Otherwise, the curve end is a valid endpoint. Check that v is also
+  // associated with a valid point that equals this endpoint.
+  if (v->has_null_point()) return false;
+
+  return (ind == ARR_MIN_END) ?
+    (m_geom_traits->equal_2_object()
+     (m_geom_traits->construct_min_vertex_2_object()(cv), v->point())) :
+    (m_geom_traits->equal_2_object()
+     (m_geom_traits->construct_max_vertex_2_object()(cv), v->point()));
+}
+
+//-----------------------------------------------------------------------------
+// Split a given edge into two at a given point, and associate the given
+// x-monotone curves with the split edges.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_split_edge(DHalfedge* e, const Point_2& p,
+            const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
+{
+  // Allocate a new vertex and associate it with the split point.
+  // Note that this point must not have any boundary conditions.
+  DVertex* v = _create_vertex(p);
+
+  // Split the edge from the given vertex.
+  return (_split_edge(e, v, cv1, cv2));
+}
+
+//-----------------------------------------------------------------------------
+// Split a given edge into two at a given vertex, and associate the given
+// x-monotone curves with the split edges.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DHalfedge*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_split_edge(DHalfedge* e, DVertex* v,
+            const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2)
+{
+  // Get the split halfedge and its twin, its source and target.
+  DHalfedge* he1 = e;
+  DHalfedge* he2 = he1->opposite();
+  DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
+  DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
+  DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+  DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+
+  // Notify the observers that we are about to split an edge.
+  _notify_before_split_edge(Halfedge_handle(e), Vertex_handle(v), cv1, cv2);
+
+  // Allocate a pair of new halfedges.
+  DHalfedge* he3 = _dcel().new_edge();
+  DHalfedge* he4 = he3->opposite();
+
+  // Connect the new halfedges:
+  //
+  //            he1      he3
+  //         -------> ------->
+  //       (.)      (.)v     (.)
+  //         <------- <-------
+  //            he2      he4
+  //
+  v->set_halfedge(he4);
+
+  if (he1->next() != he2) {
+    // Connect e3 between e1 and its successor.
+    he3->set_next(he1->next());
+
+    // Insert he4 between he2 and its predecessor.
+    he2->prev()->set_next(he4);
+  }
+  else
+    // he1 and he2 form an "antenna", so he4 becomes he3's successor.
+    he3->set_next(he4);
+
+  if (oc1 != NULL)
+    he3->set_outer_ccb(oc1);
+  else
+    he3->set_inner_ccb(ic1);
+
+  he3->set_vertex(he1->vertex());
+  he4->set_vertex(v);
+  he4->set_next(he2);
+
+  if (oc2 != NULL)
+    he4->set_outer_ccb(oc2);
+  else
+    he4->set_inner_ccb(ic2);
+
+  if (he1->vertex()->halfedge() == he1)
+    // If he1 is the incident halfedge to its target, he3 replaces it.
+    he1->vertex()->set_halfedge(he3);
+
+  // Update the properties of the twin halfedges we have just split.
+  he1->set_next(he3);
+  he1->set_vertex(v);
+
+  // The direction of he3 is the same as he1's (and the direction of he4 is
+  // the same as he2).
+  he3->set_direction(he1->direction());
+
+  // Associate cv1 with he1 (and its twin). We allocate a new curve for cv2
+  // and associate it with he3 (and its twin).
+  X_monotone_curve_2* dup_cv2 = _new_curve(cv2);
+
+  he1->curve() = cv1;
+  he3->set_curve(dup_cv2);
+
+  // Notify the observers that we have split an edge into two.
+  _notify_after_split_edge(Halfedge_handle(he1), Halfedge_handle(he3));
+
+  // Return a handle for one of the existing halfedge that is incident to the
+  // split point.
+  return he1;
+}
+
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_indices(Arr_parameter_space /* ps_x_curr */,
+                 Arr_parameter_space /* ps_y_curr */,
+                 Arr_parameter_space /* ps_x_next */,
+                 Arr_parameter_space /* ps_y_next */,
+                 int& /* x_index */, int& /* y_index */,
+                 boost::mpl::bool_<false>) const
+{ /* nothing if no identification */ }
+
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
+                 Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
+                 int& x_index, int& y_index,  boost::mpl::bool_<true>) const
+{
+  // If we cross the identification curve in x, then we must update the
+  // x_index. Note that a crossing takes place in the following cases:
+  //                .                                  .
+  //                .                                  .
+  //                .                                  .
+  //                . v    he                   he     . v
+  //       <-------(.)<---------             -------->(.)------->
+  //                .                                  .
+  //       (BEFORE) .    (AFTER)              (BEFORE) .  (AFTER)
+  //       x_index-1.    x_index              x_index  .  x_index+1
+  //
+  if ((ps_x_curr == ARR_LEFT_BOUNDARY) && (ps_x_next == ARR_RIGHT_BOUNDARY)) {
+    CGAL_assertion(is_identified(Left_side_category()) &&
+                   is_identified(Right_side_category()));
+    --x_index; // in "negative" u-direction
+  }
+  else if ((ps_x_curr == ARR_RIGHT_BOUNDARY) &&
+           (ps_x_next == ARR_LEFT_BOUNDARY))
+  {
+    CGAL_assertion(is_identified(Left_side_category()) &&
+                   is_identified(Right_side_category()));
+    ++x_index; // in "positive" u-direction
+  }
+
+  // Check if we cross the identification curve in y.
+  if ((ps_y_curr == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_TOP_BOUNDARY)) {
+    CGAL_assertion(is_identified(Bottom_side_category()) &&
+                   is_identified(Top_side_category()));
+    --y_index; // in "negative" v-direction
+  }
+  else if ((ps_y_curr == ARR_TOP_BOUNDARY) &&
+           (ps_y_next == ARR_BOTTOM_BOUNDARY))
+  {
+    CGAL_assertion(is_identified(Bottom_side_category()) &&
+                   is_identified(Top_side_category()));
+    ++y_index; // in "positive" v-direction
+  }
+}
+
+// Computes signs and locale minima of an open path to be closed by a
+// newly inserted curve.
+//
+// Precondition The OutputIterator must be a back inserter.
+// Precondition The traveresed ccb is an inner ccb; thus, it cannot be
+//              on an open boundary.
+// Postcondition If NULL is a local minimum, it is inserted first.
+//                No other local minima can be NULL.
+template <typename GeomTraits, typename TopTraits>
+template <typename OutputIterator>
+std::pair<Sign, Sign>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_signs_and_local_minima(const DHalfedge* he_to,
+                                const X_monotone_curve_2& cv,
+                                Arr_halfedge_direction cv_dir,
+                                const DHalfedge* he_away,
+                                OutputIterator local_mins_it) const
+{
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "he_to: " << he_to->opposite()->vertex()->point()
+            << " => " << he_to->vertex()->point() << std::endl;
+  std::cout << "cv: " << cv << std::endl;
+  std::cout << "cv_dir: " << cv_dir << std::endl;
+  std::cout << "he_away: " << he_away->opposite()->vertex()->point()
+            << " => " << he_away->vertex()->point() << std::endl;
+#endif
+
+  // We go over the sequence of vertices, starting from he_away's target
+  // vertex, until reaching he_to's source vertex, and find the leftmost
+  // one. Note that we do this carefully, keeping track of the number of
+  // times we crossed the identification curve in x or in y (if they exist).
+  // Note that the path must not be incident to any vertex on open boundary.
+  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
+    m_geom_traits->parameter_space_in_x_2_object();
+  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
+    m_geom_traits->parameter_space_in_y_2_object();
+
+  // TODO 2012-09-20 check "correction" here too (as in "other" function of this kind
+  int x_index = 0;
+  int y_index = 0;
+
+  // Obtain the parameter space pair of cv.
+  Arr_curve_end cv_to_end =
+    (cv_dir == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
+  Arr_parameter_space ps_x_cv_to = parameter_space_in_x(cv, cv_to_end);
+  Arr_parameter_space ps_y_cv_to = parameter_space_in_y(cv, cv_to_end);
+  Arr_curve_end cv_away_end =
+    (cv_dir == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+  Arr_parameter_space ps_x_cv_away = parameter_space_in_x(cv, cv_away_end);
+  Arr_parameter_space ps_y_cv_away = parameter_space_in_y(cv, cv_away_end);
+
+  // Obtain the parameter space pair of he_to and he_away
+  Arr_curve_end he_to_tgt_end =
+    (he_to->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+  Arr_parameter_space ps_x_he_to =
+    parameter_space_in_x(he_to->curve(), he_to_tgt_end);
+  Arr_parameter_space ps_y_he_to =
+    parameter_space_in_y(he_to->curve(), he_to_tgt_end);
+  Arr_curve_end he_away_src_end =
+    (he_away->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
+  Arr_parameter_space ps_x_he_away =
+    parameter_space_in_x(he_away->curve(), he_away_src_end);
+  Arr_parameter_space ps_y_he_away =
+    parameter_space_in_y(he_away->curve(), he_away_src_end);
+  Arr_curve_end he_away_tgt_end =
+    (he_away->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+  Arr_parameter_space ps_x_he_away_tgt =
+    parameter_space_in_x(he_away->curve(), he_away_tgt_end);
+  Arr_parameter_space ps_y_he_away_tgt =
+    parameter_space_in_y(he_away->curve(), he_away_tgt_end);
+
+  Arr_parameter_space ps_x_curr, ps_y_curr;
+  Arr_parameter_space ps_x_next, ps_y_next;
+  Arr_parameter_space ps_x_save, ps_y_save;
+
+  ps_x_curr = ps_x_cv_away;
+  ps_y_curr = ps_y_cv_away;
+  ps_x_next = ps_x_he_away;
+  ps_y_next = ps_y_he_away;
+  ps_x_save = ps_x_he_away_tgt;
+  ps_y_save = ps_y_he_away_tgt;
+
+  CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
+  CGAL_assertion(!is_open(ps_x_next, ps_y_next));
+
+  if ((cv_dir == ARR_RIGHT_TO_LEFT) &&
+      (he_away->direction() == ARR_LEFT_TO_RIGHT)) {
+    const DHalfedge* null_he = NULL;
+    *local_mins_it++ = std::make_pair(null_he, x_index);
+  }
+
+  _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
+                   x_index, y_index, Has_identified_sides_category());
+
+  const DHalfedge* he = he_away;
+  while (he != he_to) {
+    ps_x_curr = ps_x_save;
+    ps_y_curr = ps_y_save;
+    CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
+
+    Arr_curve_end he_next_src_end, he_next_tgt_end;
+    if (he->next()->direction() == ARR_LEFT_TO_RIGHT) {
+      he_next_src_end = ARR_MIN_END;
+      he_next_tgt_end = ARR_MAX_END;
+    }
+    else {
+      he_next_src_end = ARR_MAX_END;
+      he_next_tgt_end = ARR_MIN_END;
+    }
+
+    ps_x_next = parameter_space_in_x(he->next()->curve(), he_next_src_end);
+    ps_y_next = parameter_space_in_y(he->next()->curve(), he_next_src_end);
+    CGAL_assertion(!is_open(ps_x_next, ps_y_next));
+
+    ps_x_save = parameter_space_in_x(he->next()->curve(), he_next_tgt_end);
+    ps_y_save = parameter_space_in_y(he->next()->curve(), he_next_tgt_end);
+
+    // If the halfedge is directed from right to left and its successor is
+    // directed from left to right, the target vertex might be the smallest:
+    if ((he->direction() == ARR_RIGHT_TO_LEFT) &&
+        (he->next()->direction() == ARR_LEFT_TO_RIGHT))
+      *local_mins_it++  = std::make_pair(he, x_index);
+
+    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
+                     x_index, y_index, Has_identified_sides_category());
+
+    // Move to the next halfedge.
+    he = he->next();
+  }
+
+  ps_x_curr = ps_x_he_to;
+  ps_y_curr = ps_y_he_to;
+  ps_x_next = ps_x_cv_to;
+  ps_y_next = ps_y_cv_to;
+
+  CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
+  CGAL_assertion(!is_open(ps_x_next, ps_y_next));
+
+  if ((he_to->direction() == ARR_RIGHT_TO_LEFT) &&
+      (cv_dir == ARR_LEFT_TO_RIGHT))
+    *local_mins_it++  = std::make_pair(he_to, x_index);
+
+  _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next, x_index, y_index,
+                   Has_identified_sides_category());
+
+  return (std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index)));
+}
+
+// Computes the signs of a closed ccb (loop) when deleting he_anchor and its
+// opposite belonging to different faces for the case where non of the
+// boundaries is identified, thus, return the pair (ZERO, ZERO)
+template <typename GeomTraits, typename TopTraits>
+std::pair<Sign, Sign>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_signs(const DHalfedge* /* he_anchor */, boost::mpl::bool_<false>) const
+{ return (std::make_pair(ZERO, ZERO)); }
+
+  // Computes the signs of a closed ccb (loop) when deleting he_anchor and its
+// opposite belonging to different faces.
+template <typename GeomTraits, typename TopTraits>
+std::pair<Sign, Sign>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_signs(const DHalfedge* he_anchor, boost::mpl::bool_<true>) const
+{
+  // We go over the sequence of vertices, starting from he_before's target
+  // vertex, until reaching he_after's source vertex, and find the leftmost
+  // one. Note that we do this carefully, keeping track of the number of
+  // times we crossed the identification curve in x or in y (if they exist).
+  // Note that the path must not be incident to any vertex on open boundary.
+  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
+    m_geom_traits->parameter_space_in_x_2_object();
+  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
+    m_geom_traits->parameter_space_in_y_2_object();
+  // typename Traits_adaptor_2::Compare_y_at_x_right_2 compare_y_at_x_right_2 =
+  //   m_geom_traits->compare_y_at_x_right_2_object();
+
+  // IDEA EBEB 2012-07-28 store indices of local_minima with CCB in DCEL:
+  // - determine values upon insertion of a curve
+  // - or if this is not possible, perform the following computation
+  //   on-demand only
+
+  // init with edges at first link
+  // assuming that he_anchor has been removed
+  const DHalfedge* he_curr = he_anchor;
+  CGAL_assertion(! he_curr->has_null_curve());
+  const DHalfedge* he_next = he_anchor->next();
+  // init edge where loop should end
+  const DHalfedge* he_end = he_anchor;
+
+  int x_index = 0;
+  int y_index = 0;
+
+  // obtain the parameter space pair of he_curr
+  Arr_curve_end he_curr_tgt_end =
+    (he_curr->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+  Arr_parameter_space ps_x_save =
+    parameter_space_in_x(he_curr->curve(), he_curr_tgt_end);
+  Arr_parameter_space ps_y_save =
+    parameter_space_in_y(he_curr->curve(), he_curr_tgt_end);
+
+  Arr_parameter_space ps_x_curr, ps_y_curr;
+  Arr_parameter_space ps_x_next, ps_y_next;
+
+  // start loop
+  do {
+    ps_x_curr = ps_x_save;
+    ps_y_curr = ps_y_save;
+    CGAL_assertion(!is_open(ps_x_curr, ps_y_curr));
+
+    Arr_curve_end he_next_src_end =
+      (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
+    ps_x_next = parameter_space_in_x(he_next->curve(), he_next_src_end);
+    ps_y_next = parameter_space_in_y(he_next->curve(), he_next_src_end);
+    CGAL_assertion(!is_open(ps_x_next, ps_y_next));
+
+    Arr_curve_end he_next_tgt_end =
+      (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+    ps_x_save = parameter_space_in_x(he_next->curve(), he_next_tgt_end);
+    ps_y_save = parameter_space_in_y(he_next->curve(), he_next_tgt_end);
+
+    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
+                     x_index, y_index, Has_identified_sides_category());
+
+    // iterate
+    he_curr = he_next;
+    he_next = he_next->next();
+  } while (he_curr != he_end);
+
+  // Return the leftmost vertex and its x_index (with respect to he_before).
+  return (std::make_pair(sign(x_index), sign(y_index)));
+}
+
+// Computes the halfedge that points at the smallest vertex in a closed ccb
+// when deleting he_anchor and its opposite belonging to same face
+// (loop-about-to-split).
+template <typename GeomTraits, typename TopTraits>
+std::pair<std::pair<Sign, Sign>,
+          const typename Arrangement_on_surface_2<GeomTraits,
+                                                  TopTraits>::DHalfedge*>
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_compute_signs_and_min(const DHalfedge* he_anchor,
+                       Arr_parameter_space& ps_x_min,
+                       Arr_parameter_space& ps_y_min,
+                       int& index_min) const
+{
+  // Initialize
+  const DHalfedge* he_min = NULL;
+  ps_x_min = ARR_INTERIOR;
+  ps_y_min = ARR_INTERIOR;
+  index_min = 0;
+
+  // We go over the sequence of vertices, starting from he_before's target
+  // vertex, until reaching he_after's source vertex, and find the leftmost
+  // one. Note that we do this carefully, keeping track of the number of
+  // times we crossed the identification curve in x or in y (if they exist).
+  // Note that the path must not be incident to any vertex on open boundary.
+  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
+    m_geom_traits->parameter_space_in_x_2_object();
+  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
+    m_geom_traits->parameter_space_in_y_2_object();
+
+  // init with edges at first link.
+  // assuming that he_anchor has been removed
+  const DHalfedge* he_curr = he_anchor->opposite()->prev();
+  const DHalfedge* he_next = he_anchor->next();
+  // init edge where loop should end
+  const DHalfedge* he_end = he_anchor->opposite();
+
+  int x_index = 0;
+  int y_index = 0;
+
+  // obtain the parameter space pair of he_curr
+  Arr_parameter_space ps_x_save, ps_y_save;
+  if (he_curr->has_null_curve()) {
+    ps_x_save = he_curr->vertex()->parameter_space_in_x();
+    ps_y_save = he_curr->vertex()->parameter_space_in_y();
+  }
+  else {
+    Arr_curve_end he_curr_tgt_end =
+      (he_curr->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+    ps_x_save = parameter_space_in_x(he_curr->curve(), he_curr_tgt_end);
+    ps_y_save = parameter_space_in_y(he_curr->curve(), he_curr_tgt_end);
+  }
+
+  // TODO EBEB 2012-09-20 check whether this fix is correct
+  // EBEB 2012-08-22 the 'start' of one (out of two) loops might
+  // be directed towards the identification.
+  // In this cases, we have to adapt the index:
+  int x_correction = 0;
+  if (ps_x_save == ARR_RIGHT_BOUNDARY) {
+    x_correction--;
+  }
+
+  Arr_parameter_space ps_x_curr, ps_y_curr;
+  Arr_parameter_space ps_x_next, ps_y_next;
+
+  // Start loop
+  do {
+    ps_x_curr = ps_x_save;
+    ps_y_curr = ps_y_save;
+
+    if (he_next->has_null_curve()) {
+      ps_x_next = he_next->opposite()->vertex()->parameter_space_in_x();
+      ps_y_next = he_next->opposite()->vertex()->parameter_space_in_y();
+      ps_x_save = he_next->vertex()->parameter_space_in_x();
+      ps_y_save = he_next->vertex()->parameter_space_in_y();
+    }
+    else {
+      Arr_curve_end he_next_src_end =
+        (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END;
+      ps_x_next = parameter_space_in_x(he_next->curve(), he_next_src_end);
+      ps_y_next = parameter_space_in_y(he_next->curve(), he_next_src_end);
+
+      Arr_curve_end he_next_tgt_end =
+        (he_next->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END;
+      ps_x_save = parameter_space_in_x(he_next->curve(), he_next_tgt_end);
+      ps_y_save = parameter_space_in_y(he_next->curve(), he_next_tgt_end);
+    }
+
+    // If the halfedge is directed from right to left and its successor is
+    // directed from left to right, the target vertex might be the smallest:
+    if ((he_curr->direction() == ARR_RIGHT_TO_LEFT) &&
+        (he_next->direction() == ARR_LEFT_TO_RIGHT))
+    {
+      const int index_curr = x_index + x_correction;
+
+      // Test the halfedge incident to the leftmost vertex.
+      // Note that we may visit the same vertex several times.
+
+      if ((he_min == NULL) ||
+          (index_curr < index_min) ||
+          ((index_curr == index_min) &&
+           ((he_curr->vertex() != he_min->vertex()) &&
+            _is_smaller(he_curr, ps_x_curr, ps_y_curr,
+                        he_min, ps_x_min, ps_y_min,
+                        Are_all_sides_oblivious_category()))))
+      {
+        index_min = index_curr;
+        ps_x_min = ps_x_curr;
+        ps_y_min = ps_y_curr;
+        he_min = he_curr;
+      }
+    }
+
+    _compute_indices(ps_x_curr, ps_y_curr, ps_x_next, ps_y_next,
+                     x_index, y_index, Has_identified_sides_category());
+
+    // iterate
+    he_curr = he_next;
+    he_next = he_next->next();
+
+    CGAL_assertion(he_curr != he_anchor);
+
+  } while (he_next != he_end);
+
+  // Return the leftmost vertex and the signs.
+  return std::make_pair(std::make_pair(sign(x_index), sign(y_index)), he_min);
+}
+
+/* This is the implementation for the case where all 4 boundary sides are
+ * oblivious.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller(const DHalfedge* he1,
+            Arr_parameter_space /* ps_x1 */, Arr_parameter_space /* ps_y1 */,
+            const DHalfedge* he2,
+            Arr_parameter_space /* ps_x2 */, Arr_parameter_space /* ps_y2 */,
+            Arr_all_sides_oblivious_tag) const
+{
+  CGAL_precondition(he1->direction() == ARR_RIGHT_TO_LEFT);
+  CGAL_precondition(he2->direction() == ARR_RIGHT_TO_LEFT);
+  CGAL_precondition(he1->vertex() != he2->vertex());
+  return
+    (m_geom_traits->compare_xy_2_object()(he1->vertex()->point(),
+                                          he2->vertex()->point()) == SMALLER);
+}
+
+/* This is a wrapper for the case where any boundary side is not
+ * necessarily oblivious.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller(const DHalfedge* he1,
+            Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+            const DHalfedge* he2,
+            Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+            Arr_not_all_sides_oblivious_tag tag) const
+{
+  CGAL_precondition(he1->direction() == ARR_RIGHT_TO_LEFT);
+  CGAL_precondition(he2->direction() == ARR_RIGHT_TO_LEFT);
+  CGAL_precondition(he1->vertex() != he2->vertex());
+
+  /* If he1 points to a vertex on the left or the bottom boundary, then it
+   * is the smaller.
+   */
+  if ((ps_x1 == ARR_LEFT_BOUNDARY) || (ps_y1 == ARR_BOTTOM_BOUNDARY))
+    return true;
+
+  /* If he2 points to a vertex on the left or the bottom boundary, then it
+   * is the smaller.
+   */
+  if ((ps_x2 == ARR_LEFT_BOUNDARY) || (ps_y2 == ARR_BOTTOM_BOUNDARY))
+    return false;
+
+  return _is_smaller(he1->curve(), he1->vertex()->point(), ps_x1, ps_y1,
+                     he2->curve(), he2->vertex()->point(), ps_x2, ps_y2, tag);
+}
+
+/* This is the implementation for the case where all 4 boundary sides are
+ * oblivious.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller(const X_monotone_curve_2& /* cv1 */, const Point_2& p1,
+            Arr_parameter_space /* ps_x1 */, Arr_parameter_space /* ps_y1 */,
+            const X_monotone_curve_2& /* cv2 */, const Point_2& p2,
+            Arr_parameter_space /* ps_x2 */, Arr_parameter_space /* ps_y2 */,
+            Arr_all_sides_oblivious_tag) const
+{
+  CGAL_precondition(! m_geom_traits->equal_2_object()(p1, p2));
+  return (m_geom_traits->compare_xy_2_object()(p1, p2) == SMALLER);
+}
+
+/*! This is the implementation for the case where any boundary side is not
+ * necessarily oblivious.
+ * This can be further refined as the combination of LEFT and LEFT can occur
+ * only when the right and left boundary sides are identified.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
+            Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+            const X_monotone_curve_2& cv2, const Point_2& p2,
+            Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+            Arr_not_all_sides_oblivious_tag) const
+{
+  CGAL_precondition(! m_geom_traits->equal_2_object()(p1, p2));
+
+  if (ps_x2 == ARR_INTERIOR) {
+    if (ps_x1 == ARR_INTERIOR) {
+      if (ps_y2 == ARR_INTERIOR) {
+        if (ps_y1 == ARR_INTERIOR)
+          return (m_geom_traits->compare_xy_2_object()(p1,p2) == SMALLER);
+
+        // ps1 == {INTERIOR, !INTERIOR}, ps2 == {INTERIOR,INTERIOR},
+        Comparison_result res =
+          m_geom_traits->compare_x_on_boundary_2_object()(p2, cv1, ARR_MIN_END);
+        return
+          (res == EQUAL) ? (ps_y1 == ARR_BOTTOM_BOUNDARY) : (res == LARGER);
+      }
+
+      if (ps_y1 == ARR_INTERIOR) {
+        // ps1 == {INTERIOR,INTERIOR}, ps2 == {INTERIOR,!INTERIOR}
+        Comparison_result res =
+          m_geom_traits->compare_x_on_boundary_2_object()(p1, cv2, ARR_MIN_END);
+        return (res == EQUAL) ? (ps_y2 == ARR_TOP_BOUNDARY) : (res == SMALLER);
+      }
+
+      // ps1 == {INTERIOR,!INTERIOR}, ps2 == {INTERIOR,!INTERIOR}
+      Comparison_result res =
+        m_geom_traits->compare_x_on_boundary_2_object()(cv1, ARR_MIN_END,
+                                                        cv2, ARR_MIN_END);
+      return (res == EQUAL) ?
+        ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) :
+        (res == SMALLER);
+    }
+
+    // ps_x2 == ARR_INTERIOR, ps_x == ARR_LEFT_BOUNDARY
+    CGAL_assertion(ps_x1 == ARR_LEFT_BOUNDARY);
+    return true;
+  }
+  if (ps_x1 == ARR_INTERIOR)
+    // ps_x2 == ARR_LEFT_BOUNDARY, ps_x == ARR_INTERIOR
+    return false;
+
+  // ps_x2 == ARR_LEFT_BOUNDARY, ps_x == ARR_LEFT_BOUNDARY
+  Comparison_result res =
+    m_geom_traits->compare_y_on_boundary_2_object()(p1, p2);
+  return (res == SMALLER);
+}
+
+/* This is the implementation for the case where all 4 boundary sides are
+ * oblivious.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller_near_right(const X_monotone_curve_2& cv1,
+                       const X_monotone_curve_2& cv2,
+                       const Point_2& p,
+                       Arr_parameter_space /* ps_x */,
+                       Arr_parameter_space /* ps_y */,
+                       Arr_all_sides_oblivious_tag) const
+{
+  return
+    (m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == SMALLER);
+}
+
+/*! This is the implementation for the case where any one of the 4 boundary
+ * sides can be of any type.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_smaller_near_right(const X_monotone_curve_2& cv1,
+                       const X_monotone_curve_2& cv2,
+                       const Point_2& p,
+                       Arr_parameter_space ps_x, Arr_parameter_space ps_y,
+                       Arr_not_all_sides_oblivious_tag) const
+{
+  CGAL_precondition((ps_x == ARR_INTERIOR) || (ps_x == ARR_LEFT_BOUNDARY));
+  CGAL_precondition((ps_y == ARR_INTERIOR) || (ps_x == ARR_BOTTOM_BOUNDARY));
+
+  if ((ps_x == ARR_INTERIOR) && (ps_y == ARR_INTERIOR))
+    return
+      (m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == SMALLER);
+  return
+    (m_geom_traits->compare_y_near_boundary_2_object()(cv1, cv2, ARR_MIN_END) ==
+     SMALLER);
+}
+
+//-----------------------------------------------------------------------------
+// Determine whether a given subsequence (halfedge, curve, halfedge)
+// lies in the interior of a new face we are about to create
+// Comment: This is how the situation looks
+//    ----to--->  >>cv_dir>>  ---away--->
+//               o ===cv=== 0
+//    <-tonext--              <-awaynext-
+// or to be read from right to left ... this way, he_to and he_away lie
+// BEFORE insertion on the same inner ccb and
+// AFTER insertion on the same outer ccb
+//
+// Precondition: The range of local minima [lm_begin,lm_end) is greater than 0.
+//   That is, there is at least one local minimum, which might be the leftend
+//   of cv itself.
+// Precondition: If the leftend of cv is a local minimum, it must be the first
+//   in the range.
+template <typename GeomTraits, typename TopTraits>
+template <typename InputIterator>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_defines_outer_ccb_of_new_face(const DHalfedge* he_to,
+                               const X_monotone_curve_2& cv,
+                               const DHalfedge* he_away,
+                               InputIterator lm_begin,
+                               InputIterator lm_end) const
+{
+  // Search for the leftmost vertex among the local minima
+  typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x =
+    m_geom_traits->parameter_space_in_x_2_object();
+  typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y =
+    m_geom_traits->parameter_space_in_y_2_object();
+
+  // check all reported local minima
+  InputIterator lm_it = lm_begin;
+
+  int index_min = lm_it->second;
+  const DHalfedge* he_min = lm_it->first;
+  const DVertex* v_min =
+    (he_min == NULL) ? he_away->opposite()->vertex() : he_min->vertex();
+  const X_monotone_curve_2* cv_min =
+    (he_min == NULL) ? &cv : &(he_min->curve());
+  Arr_parameter_space ps_x_min = parameter_space_in_x(*cv_min, ARR_MIN_END);
+  Arr_parameter_space ps_y_min = parameter_space_in_y(*cv_min, ARR_MIN_END);
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "1 set global min to " << *cv_min << std::endl;
+#endif
+
+  for (++lm_it; lm_it != lm_end; ++lm_it) {
+    const DHalfedge* he = lm_it->first;
+    CGAL_assertion(he->direction() == CGAL::ARR_RIGHT_TO_LEFT);
+    int index = lm_it->second;
+    Arr_parameter_space ps_x_he_min =
+      parameter_space_in_x(he->curve(), ARR_MIN_END);
+    Arr_parameter_space ps_y_he_min =
+      parameter_space_in_y(he->curve(), ARR_MIN_END);
+
+    // If the following condition is met, the vertex is indeed the smallest:
+    // The current x_index is smaller than the x_index of the smallest
+    // recorded, or
+    // The current x_index is equivalent to the recorded x_index, and
+    //   - No smallest has bin recorded so far, or
+    //   - The current target vertex and the recorded vertex are the same and
+    //       * The current curve is smaller than the recorded curve, or
+    //   - The current curve end is smaller then the recorded curve end.
+    // smaller than its source, so we should check whether it is also smaller
+    // Note that we compare the vertices lexicographically: first by the
+    // indices, then by x, then by y.
+
+    if ((index < index_min) ||
+        ((index == index_min) &&
+         ((v_min == he->vertex()) ?
+          _is_smaller_near_right(he->curve(), *cv_min,
+                                 v_min->point(), ps_x_min, ps_y_min,
+                                 Are_all_sides_oblivious_category()) :
+          _is_smaller(he->curve(), he->vertex()->point(),
+                      ps_x_he_min, ps_y_he_min,
+                      *cv_min, v_min->point(), ps_x_min, ps_y_min,
+                      Are_all_sides_oblivious_category()))))
+    {
+      index_min = index;
+      cv_min = &(he->curve());
+      ps_x_min = ps_x_he_min;
+      ps_y_min = ps_y_he_min;
+      he_min = he;
+      v_min = he->vertex();
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "2 set global min to " << *cv_min << std::endl;
+#endif
+    }
+  }
+
+  CGAL_assertion(v_min != NULL);
+  CGAL_assertion(!v_min->has_null_point());
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+  std::cout << "v_min: " << v_min->point() << std::endl;
+  std::cout << "he_min: ";
+  if (he_min)
+    std::cout << he_min->opposite()->vertex()->point()
+              << " => " << he_min->vertex()->point();
+  else std::cout << "NULL";
+  std::cout << std::endl;
+#endif
+
+  CGAL_assertion(! he_min || (he_min->direction() == ARR_RIGHT_TO_LEFT));
+
+  // Note that the curves of the leftmost edge and its successor are defined
+  // to the right of the leftmost vertex. We compare them to the right of this
+  // point to determine whether he_to (the curve) and he_away are incident to
+  // the hole to be created or not.
+  const X_monotone_curve_2& cv_next = (he_min == NULL) ?
+    he_away->curve() : ((he_min == he_to) ? cv : he_min->next()->curve());
+  return _is_above(*cv_min, cv_next, v_min->point(), ps_y_min,
+                   Top_or_bottom_sides_category());
+}
+
+// Is the first given x-monotone curve above the second given?
+// This function is invoked when the bottom and top boundaries are neither
+// identified nor contracted
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
+          const Point_2& point,
+          Arr_parameter_space /* ps_y1 */,
+          Arr_boundary_cond_tag) const
+{
+  return (m_geom_traits->compare_y_at_x_right_2_object()(xcv1, xcv2, point) ==
+          LARGER);
+}
+
+// Is the first given x-monotone curve above the second given?
+// This function is invoked when the bottom and top boundaries are identified
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
+          const Point_2& point,
+          Arr_parameter_space ps_y1,
+          Arr_has_identified_side_tag) const
+{
+  // Check whether the vertex lies on the identification curve in y,
+  // in which case special care must be taken.
+  if ((ps_y1 == ARR_BOTTOM_BOUNDARY) || (ps_y1 == ARR_TOP_BOUNDARY)) {
+    // TODO EBEB 2010-10-08 is this code really executed or should it be part
+    // of top traits?
+
+    // Both current and next curves are incident to the identification curve.
+    // As v_min is the leftmost vertex, we know that their left ends must have
+    // a boundary condition of type identification in y.
+    Arr_parameter_space  ps_y2 =
+      m_geom_traits->parameter_space_in_y_2_object()(xcv2, ARR_MIN_END);
+
+    // Check if the curves lie on opposite sides of the identification curve.
+    if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY))
+      // In this case the current curve is "above" the next one to the right
+      // of v_min, in a cyclic order around the identification curve.
+      return true;
+
+    if ((ps_y1 == ARR_TOP_BOUNDARY) && (ps_y2 == ARR_BOTTOM_BOUNDARY))
+      // In this case the current curve is "below" the next one to the right
+      // of v_min, in a cyclic order around the identification curve.
+      return false;
+
+    // If both curves are on the same side of the identification curve, we
+    // continue to compare them to the right of v_min.
+    CGAL_assertion(((ps_y1 == ARR_BOTTOM_BOUNDARY) &&
+                    (ps_y2 == ARR_BOTTOM_BOUNDARY)) ||
+                   ((ps_y1 == ARR_TOP_BOUNDARY) &&
+                    (ps_y2 == ARR_TOP_BOUNDARY)));
+  }
+
+  return _is_above(xcv1, xcv2, point, ps_y1, Arr_all_sides_oblivious_tag());
+}
+
+// Is the first given x-monotone curve above the second given?
+// This function is invoked when the bottom or top boundaries are contracted
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_above(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2,
+          const Point_2& point,
+          Arr_parameter_space ps_y1,
+          Arr_has_contracted_side_tag) const
+{
+  // Check whether the leftmost vertex is a contraction point in y,
+  // in which case special care must be taken.
+  if (((ps_y1 == ARR_TOP_BOUNDARY) && is_contracted(Bottom_side_category())) ||
+      ((ps_y1 == ARR_BOTTOM_BOUNDARY) && is_contracted(Top_side_category())))
+  {
+    // Compare the horizontal position of the two curve-ends at the point
+    // of contraction.
+    Comparison_result x_res =
+      m_geom_traits->compare_x_curve_ends_2_object()(xcv1, ARR_MIN_END,
+                                                     xcv2, ARR_MIN_END);
+
+    // Observe that if x_res == EQUAL the given subsequence is always exterior.
+    return (((ps_y1 == ARR_BOTTOM_BOUNDARY) && (x_res == SMALLER)) ||
+            ((ps_y1 == ARR_TOP_BOUNDARY) && (x_res == LARGER)));
+  }
+
+  return _is_above(xcv1, xcv2, point, ps_y1, Arr_all_sides_oblivious_tag());
+}
+
+
+//-----------------------------------------------------------------------------
+// Remove a pair of twin halfedges from the arrangement.
+// In case the removal causes the creation of a new hole, the given halfedge
+// should point at this hole.
+//
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::DFace*
+Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
+{
+  // Obtain the pair of twin edges to be removed, the connected components they
+  // belong to and their incident faces.
+  DHalfedge* he1 = e;
+  DHalfedge* he2 = e->opposite();
+  DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
+  DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
+  DFace* f1 = (oc1 != NULL) ? oc1->face() : ic1->face();
+  DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+  DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+  DFace* f2 = (oc2 != NULL) ? oc2->face() : ic2->face();
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+#if 0
+  std::cout << "before swap" << std::endl;
+  std::cout << "he1c: " << he1->curve() <<  ", " << he1->direction()
+            << std::endl;
+  std::cout << "he2c: " << he2->curve() <<  ", " << he2->direction()
+            << std::endl;
+  std::cout << "he1: " << he1 << std::endl;
+  std::cout << "he2: " << he2 << std::endl;
+  std::cout << "ic1: " << ic1 << std::endl;
+  std::cout << "ic2: " << ic2 << std::endl;
+  std::cout << "oc1: " << oc1 << std::endl;
+  std::cout << "oc2: " << oc2 << std::endl;
+  std::cout << "f1 : " << f1 << std::endl;
+  std::cout << "f2 : " << f2 << std::endl;
+#endif
+#endif
+
+  // will be used for "_hole_creation_on_edge_removal"
+  std::pair< CGAL::Sign, CGAL::Sign > signs1(ZERO, ZERO);
+  std::pair< CGAL::Sign, CGAL::Sign > signs2(ZERO, ZERO);
+
+  bool swap_he1_he2 = false;
+  if (f1 != f2) {
+    // If f1 != f2, the removal of he1 (and its twin halfedge) will cause
+    // the two incident faces to merge. Thus, swapping is not needed. However,
+    // it is more efficient to retain the face that has a larger number of
+    // inner ccbs.
+
+    // f1 is the face to be kept by default. If f2 has more holes it is more
+    // efficient to kept f2
+    if (f1->number_of_inner_ccbs() < f2->number_of_inner_ccbs())
+      swap_he1_he2 = true;
+  }
+  else {
+    // If f1 == f2 (same_face-case), then we consider two loops that occur when
+    // he1 and he2 get removed; if f1 != f2, then he1 and he2 seperates the two
+    // faces that will be merged upon their removal---here both he1 and he2
+    // belong to a full cycle, and THAT IS WHY we give the f1 == f2 test to
+    // determine whether end of loop should be he1->opposite() and
+    // he2->opposite(), respectively.
+
+    // If the removal of he1 (and its twin halfedge) form an "antenna", there
+    // is neither a need to compute signs and nor swapping of the halfedges
+    if ((he1->next() != he2) && (he2->next() != he1)) {
+
+      // In this case one of the following can happen: (a) a new hole will be
+      // created by the removal of the edge (case 3.2.1 of the removal
+      // procedure), or (b) an outer CCB will be split into two (case 3.2.2).
+      // We begin by locating the leftmost vertex along the path from he1 to its
+      // twin he2 and the leftmost vertex point along the path from the twin to
+      // he1 (both paths do not include he1 and he2 themselves).
+
+      // Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
+      // signs2 out of this scope (for the non-planar case), the code must be
+      // dispatched, so that the planar case is not affected.
+
+      // Compute signs of ccbs for he1 and he2 used later for
+      // _hole_creation_on_edge_removal
+
+      // Compute the signs and minimum along ccb of he1:
+      Arr_parameter_space ps_x_min1, ps_y_min1;
+      int index_min1;
+      std::pair<std::pair<Sign, Sign>, const DHalfedge*> res1 =
+        _compute_signs_and_min(he1, ps_x_min1, ps_y_min1, index_min1);
+      signs1 = res1.first;
+      const DHalfedge* he_min1 = res1.second;
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "signs1.x: " << signs1.first << std::endl;
+      std::cout << "signs1.y: " << signs1.second << std::endl;
+      if (! he_min1->is_fictitious())
+        std::cout << "he_min1: " << he_min1->curve() << std::endl;
+      else std::cout << "he_min1 fictitious" << std::endl;
+#endif
+
+      // Compute the signs and minimum along ccb of he2:
+      Arr_parameter_space ps_x_min2, ps_y_min2;
+      int index_min2;
+      std::pair<std::pair<Sign, Sign>, const DHalfedge*> res2 =
+        _compute_signs_and_min(he2, ps_x_min2, ps_y_min2, index_min2);
+      signs2 = res2.first;
+      const DHalfedge* he_min2 = res2.second;
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "signs2.x: " << signs2.first << std::endl;
+      std::cout << "signs2.y: " << signs2.second << std::endl;
+      if (! he_min2->is_fictitious())
+        std::cout << "he_min2: " << he_min2->curve() << std::endl;
+      else std::cout << "he_min2 fictitious" << std::endl;
+#endif
+
+      // TODO EBEB 2012-07-29
+      // is this the right thing to do for torus, or let TopTraits decide?
+      bool is_perimetric1 = signs1.first || signs1.second;
+      bool is_perimetric2 = signs2.first || signs2.second;
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << std::endl
+                << "index 1: " << index_min1
+                << ", ps_x_min1: " << ps_x_min1
+                << ", ps_y_min1: " << ps_y_min1
+                << ", is_perimetric1: " << is_perimetric1
+                << std::endl;
+
+      std::cout << "index 2: " << index_min2
+                << ", ps_x_min2: " << ps_x_min2
+                << ", ps_y_min2: " << ps_y_min2
+                << ", is_perimetric2: " << is_perimetric2
+                << std::endl;
+#endif
+
+      if (is_perimetric1 || is_perimetric2) {
+#if 1 // this is old code
+        swap_he1_he2 =
+          (! is_perimetric1) ? false :
+          ((! is_perimetric2) ? true : false);
+          // We are in case (a) and he1 is directed to the new hole to be
+          // created or
+          // We are in case (a) and he2 is directed to the new hole to be
+          // created.
+        // Both paths are perimetric; thus, we are in case (b).
+#else // THIS IS NEW CODE 2012-08-06 which is much easier to read
+        swap_he1_he2 = !is_perimetric2;
+#endif
+      }
+      else {
+        // const DVertex* v_min1 = he_min1->vertex(); const DVertex* v_min2 =
+        // he_min2->vertex(); Both paths from he1 to he2 and back from he2 to
+        // he1 are not perimetric, so we are in case (a). As we want to
+        // determine which halfedge points to the new hole to be created (he1
+        // or he2), we have to compare the two leftmost vertices
+        // lexicographically, first by the indices then by x and y. v_min2
+        // lies to the left of v_min1 if and only if he1 points at the hole we
+        // are about to create.
+        //
+        //         +---------------------+
+        //         |                     |
+        //         |   he1    +----+     |
+        //         +--------->+    |     |
+        //         |          +----+     |
+        //         |      v_min1         |
+        //         |                     |
+        //  v_min2 +---------------------+
+        //
+        // Note that if one of the paths we have examined ends at a boundary
+        // side of the parameter space (and only of the paths may end at a
+        // boundary side of the parameter space), then the other path becomes
+        // a hole in a face bounded by the parameter-space boundary.
+
+        // TODO EBEB 2012-08-22 check whether this fix is correct
+        // EBEB 2012-08-22 the 'start' of the two loops might lie
+        // on different sides of the identification, which is only
+        // problematic when either he1 or he2 points to the
+        // identification. In these cases, we have to adapt the indices:
+        typename Traits_adaptor_2::Parameter_space_in_x_2
+          parameter_space_in_x =
+          m_geom_traits->parameter_space_in_x_2_object();
+
+        Arr_curve_end he1_tgt_end =
+          (he1->direction() == ARR_LEFT_TO_RIGHT ? ARR_MAX_END : ARR_MIN_END);
+        Arr_parameter_space ps_x_he1_tgt =
+          parameter_space_in_x(he1->curve(), he1_tgt_end);
+        if (ps_x_he1_tgt == ARR_RIGHT_BOUNDARY) index_min2 -= 1;
+
+        Arr_curve_end he2_tgt_end =
+          (he2->direction() == ARR_LEFT_TO_RIGHT ? ARR_MAX_END : ARR_MIN_END);
+        Arr_parameter_space ps_x_he2_tgt =
+          parameter_space_in_x(he2->curve(), he2_tgt_end);
+        if (ps_x_he2_tgt == ARR_RIGHT_BOUNDARY) index_min1 -= 1;
+
+        swap_he1_he2 =
+          (index_min1 > index_min2) ? false :
+          ((index_min1 < index_min2) ? true :
+           _is_smaller(he_min1, ps_x_min1, ps_y_min1,
+                       he_min2, ps_x_min2, ps_y_min2,
+                       Are_all_sides_oblivious_category()));
+      }
+    }
+  }
+  // swapping?
+  if (swap_he1_he2) {
+    // swap all entries
+    std::swap(he1, he2);
+    std::swap(ic1, ic2);
+    std::swap(oc1, oc2);
+    std::swap(f1 , f2);
+    // not needed below here std::swap(local_mins1, local_mins2);
+    std::swap(signs1, signs2);
+  }
+
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+#if 0
+  std::cout << "after swap" << std::endl;
+  std::cout << "he1c: " << he1->curve() <<  ", " << he1->direction()
+            << std::endl;
+  std::cout << "he1c: " << he2->curve() <<  ", " << he2->direction()
+            << std::endl;
+  std::cout << "he1: " << he1 << std::endl;
+  std::cout << "he2: " << he2 << std::endl;
+  std::cout << "ic1: " << ic1 << std::endl;
+  std::cout << "ic2: " << ic2 << std::endl;
+  std::cout << "oc1: " << oc1 << std::endl;
+  std::cout << "oc2: " << oc2 << std::endl;
+  std::cout << "f1 : " << f1 << std::endl;
+  std::cout << "f2 : " << f2 << std::endl;
+#endif
+#endif
+
+  // Now the real removal starts.
+  DHalfedge* prev1 = NULL;
+  DHalfedge* prev2 = NULL;
+
+  // Notify the observers that we are about to remove an edge.
+  Halfedge_handle  hh(e);
+
+  _notify_before_remove_edge(hh);
+
+  // Check if the two incident faces are equal, in which case no face will be
+  // merged and deleted (and a hole may be created).
+  if (f1 == f2) {
+    // Check whether the two halfedges are successors along the face boundary.
+    if ((he1->next() == he2) && (he2->next() == he1)) {
+      CGAL_assertion((ic1 != NULL) && (ic1 == ic2));
+
+      // The two halfedges form a "singleton" hole inside the incident face
+      // (case 1 of the removal procedure, as detailed in the design document),
+      // so we simply have to remove it.
+      // First notify the observers that we are about to remove this hole
+      // (inner CCB).
+      Face_handle fh(f1);
+
+      _notify_before_remove_inner_ccb(fh, (Halfedge_handle(he1))->ccb());
+
+      // Erase the inner CCB from the incident face and delete the
+      // corresponding component.
+      f1->erase_inner_ccb(ic1);
+
+      _dcel().delete_inner_ccb(ic1);
+
+      // Notify the observers that the inner CCB has been removed.
+      _notify_after_remove_inner_ccb(fh);
+
+      // Remove the end-vertices, if necessary.
+      if (remove_target) {
+        if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+            (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+        {
+          he1->vertex()->set_halfedge(NULL);    // disconnect the end vertex
+          _remove_vertex_if_redundant(he1->vertex(), f1);
+        }
+        else {
+          // Delete the he1's target vertex and its associated point.
+          _notify_before_remove_vertex(Vertex_handle(he1->vertex()));
+
+          _delete_point(he1->vertex()->point());
+          _dcel().delete_vertex(he1->vertex());
+
+          _notify_after_remove_vertex();
+        }
+      }
+      else
+        // The remaining target vertex now becomes an isolated vertex inside
+        // the containing face:
+        _insert_isolated_vertex(f1, he1->vertex());
+
+      if (remove_source) {
+        if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+            (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+        {
+          he2->vertex()->set_halfedge(NULL);    // disconnect the end vertex
+          _remove_vertex_if_redundant(he2->vertex(), f1);
+        }
+        else {
+          // Delete the he1's source vertex and its associated point.
+          _notify_before_remove_vertex(Vertex_handle(he2->vertex()));
+
+          _delete_point(he2->vertex()->point());
+          _dcel().delete_vertex(he2->vertex());
+
+          _notify_after_remove_vertex();
+        }
+      }
+      else
+        // The remaining source vertex now becomes an isolated vertex inside
+        // the containing face:
+        _insert_isolated_vertex(f1, he2->vertex());
+
+      // Delete the curve associated with the edge to be removed.
+      _delete_curve(he1->curve());
+      _dcel().delete_edge(he1);
+
+      // Notify the observers that an edge has been deleted.
+      _notify_after_remove_edge();
+
+      // Return the face that used to contain the hole.
+      return f1;
+    }
+    else if ((he1->next() == he2) || (he2->next() == he1)) {
+      CGAL_assertion((oc1 == oc2) && (ic1 == ic2));
+
+      // In this case the two halfedges form an "antenna" (case 2).
+      // Make he1 point at the tip of this "antenna" (swap the pointer if
+      // necessary).
+      bool remove_tip_vertex = remove_target;
+
+      if (he2->next() == he1) {
+        he1 = he2;
+        he2 = he1->opposite();
+        remove_tip_vertex = remove_source;
+      }
+
+      // Remove the two halfedges from the boundary chain by connecting
+      // he1's predecessor with he2's successor.
+      prev1 = he1->prev();
+      prev1->set_next(he2->next());
+
+      // In case the halfedges to be deleted are represantatives of their
+      // CCB (note that noth should belong to the same CCB, be it an outer
+      // CCB or an inner one), make prev1 the components representative.
+      if ((oc1 != NULL) &&
+          ((oc1->halfedge() == he1) || (oc1->halfedge() == he2)))
+        oc1->set_halfedge(prev1);
+      else if ((ic1 != NULL) &&
+               ((ic1->halfedge() == he1) || (ic1->halfedge() == he2)))
+        ic1->set_halfedge(prev1);
+
+      // In case he2 is the representative halfedge of its target vertex,
+      // replace it by prev1 (which also points at this vertex).
+      if (he2->vertex()->halfedge() == he2)
+        he2->vertex()->set_halfedge(prev1);
+
+      // Try to temove the base vertex, in case it has boundary conditions.
+      if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+          (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+        _remove_vertex_if_redundant(he2->vertex(), f1);
+
+      // Remove the redundant tip vertex, if necessary.
+      if (remove_tip_vertex) {
+        if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+            (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+        {
+          he1->vertex()->set_halfedge(NULL);    // disconnect the end vertex
+          _remove_vertex_if_redundant(he1->vertex(), f1);
+        }
+        else {
+          // Delete the vertex that forms the tip of the "antenna".
+          _notify_before_remove_vertex(Vertex_handle(he1->vertex()));
+
+          _delete_point(he1->vertex()->point());
+          _dcel().delete_vertex(he1->vertex());
+
+          _notify_after_remove_vertex();
+        }
+      }
+      else
+        // The remaining "antenna" tip now becomes an isolated vertex inside
+        // the containing face:
+        _insert_isolated_vertex(f1, he1->vertex());
+
+      // Delete the curve associated with the edge to be removed.
+      _delete_curve(he1->curve());
+      _dcel().delete_edge(he1);
+
+      // Notify the observers that an edge has been deleted.
+      _notify_after_remove_edge();
+
+      // Return the incident face.
+      return f1;
+    }
+
+    // In this case the degree of both end-vertices is at least 2, so we
+    // can use the two predecessor halfedges of he1 and he2.
+    bool        add_inner_ccb = false;
+
+    prev1 = he1->prev();
+    prev2 = he2->prev();
+
+    if ((ic1 != NULL) && (ic1 == ic2)) {
+      // If both halfedges lie on the same inner component (hole) inside the
+      // face (case 3.1), we have to split this component into two holes.
+      //
+      //    +-----------------------------+
+      //    |           prev1             |
+      //    |   +----+ /    +----+        |
+      //    |   |    +......+    |        |
+      //    |   +----+      +----+        |
+      //    |                             |
+      //    +-----------------------------+
+      //
+      // Notify the observers we are about to split an inner CCB.
+      _notify_before_split_inner_ccb(Face_handle(f1),
+                                     (Halfedge_handle
+                                      (*(ic1->iterator())))->ccb(),
+                                     Halfedge_handle(he1));
+
+      // We first make prev1 the new representative halfedge of the first
+      // inner CCB.
+      ic1->set_halfedge(prev1);
+
+      // Create a new component that represents the new hole we split.
+      DInner_ccb* new_ic = _dcel().new_inner_ccb();
+      f1->add_inner_ccb(new_ic, prev2);
+      new_ic->set_face(f1);
+
+      // Associate all halfedges along the hole boundary with the new inner
+      // component.
+      DHalfedge* curr;
+      for (curr = he1->next(); curr != he2; curr = curr->next())
+        curr->set_inner_ccb(new_ic);
+
+      // Notify the observers that the hole has been split.
+      _notify_after_split_inner_ccb(Face_handle(f1),
+                                    (Halfedge_handle(prev1))->ccb(),
+                                    (Halfedge_handle(prev2))->ccb());
+    }
+    else if (oc1 != oc2) {
+      // RWRW: NEW!
+      CGAL_assertion((oc1 != NULL) && (oc2 != NULL));
+
+      // In case both halfegdes he1 and he2 are incident to the same face
+      // but lie on different outer CCBs of this face, removing this pair of
+      // halfedge causes the two components two merge and to become an
+      // inner CCB in the face.
+      // We first remove the outer CCB oc1 from f, and inform the observers
+      // on doing so.
+      Face_handle fh(f1);
+
+      _notify_before_remove_outer_ccb(fh, (Halfedge_handle(he1))->ccb());
+
+      f1->erase_outer_ccb(oc1);
+      _dcel().delete_outer_ccb(oc1);
+
+      _notify_after_remove_outer_ccb(fh);
+
+      // We now remove the outer CCBs oc2 from f, and inform the observers
+      // on doing so.
+      _notify_before_remove_outer_ccb(fh, (Halfedge_handle(he2))->ccb());
+
+      f2->erase_outer_ccb(oc2);
+      _dcel().delete_outer_ccb(oc2);
+
+      _notify_after_remove_outer_ccb(fh);
+
+      // Mark that we should eventually add a new inner CCB inside the face.
+      add_inner_ccb = true;
+    }
+    else {
+      CGAL_assertion((oc1 != NULL) && (oc1 == oc2));
+
+      // If both halfedges are incident to the same outer CCB of their
+      // face (case 3.2), we have to distinguish two sub-cases:
+      // TODO EBEB 2012-07-30 replace with signs
+      if (_hole_creation_on_edge_removal(signs1, signs2, true)) {
+        // We have to create a new hole in the interior of the incident face
+        // (case 3.2.1):
+        //
+        //    +-----------------------------+
+        //    | prev1                       |
+        //    v         +----+              |
+        //    +........>+    |              |
+        //    |   he1   +----+              |
+        //    |                             |
+        //    +-----------------------------+
+        //
+        // Note that it is guaranteed that he1 points at this new hole, while
+        // he2 points at the boundary of the face that contains this hole.
+        // First notify the observers we are about to form a new inner
+        // CCB inside f1.
+        _notify_before_add_inner_ccb(Face_handle(f1),
+                                     Halfedge_handle(he1->next()));
+
+        // Create a new component that represents the new hole.
+        DInner_ccb* new_ic = _dcel().new_inner_ccb();
+
+        f1->add_inner_ccb(new_ic, he1->next());
+        new_ic->set_face(f1);
+
+        // Associate all halfedges along the hole boundary with the new inner
+        // component.
+        DHalfedge* curr;
+        for (curr = he1->next(); curr != he2; curr = curr->next())
+          curr->set_inner_ccb(new_ic);
+
+        // As the outer CCB of f1 may be represented by any of the
+        // halfedges in between he1 -> ... -> he2 (the halfedges in between
+        // represent the outer boundary of the new hole that is formed),
+        // We represent the outer boundary of f1 by prev1, which definitely
+        // stays on the outer boundary.
+        oc1->set_halfedge(prev1);
+
+        // Notify the observers that a new hole has been formed.
+        Ccb_halfedge_circulator hccb = (Halfedge_handle(he1->next()))->ccb();
+
+        _notify_after_add_inner_ccb(hccb);
+      }
+      else {
+        // We have to split the outer CCB into two outer components
+        // (case 3.2.2), such that the number of outer CCBs of the face is
+        // incremented.
+        //
+        //    +----------------------------+
+        //    |                            |
+        //    |            prev1           |
+        //    +<........+<.................|
+        //    |         |                  |
+        //    |         |                  |
+        //    |         |                  |
+        //    |         |                  |
+        //    |  prev2  |                  |
+        //    +........>+..................|
+        //    |                            |
+        //    +----------------------------+
+        //
+
+        // First we notify the observers that we are about to split an outer
+        // component.
+        _notify_before_split_outer_ccb(Face_handle(f1),
+                                       Halfedge_handle(he1)->ccb(),
+                                       Halfedge_handle(he1));
+
+        // Create a new outer component.
+        DOuter_ccb* new_oc = _dcel().new_outer_ccb();
+
+        f1->add_outer_ccb(new_oc, he1->next());
+        new_oc->set_face(f1);
+
+        // Associate all halfedges from he1 until he2 with the new CCB.
+        DHalfedge* curr;
+
+        for (curr = he1->next(); curr != he2; curr = curr->next())
+          curr->set_outer_ccb(new_oc);
+
+        // As the outer CCB of f1 may be represented by any of the
+        // halfedges in between he1 -> ... -> he2 (the halfedges in between
+        // are on the new outer CCB we have just created), we represent the
+        // former outer CCB by prev1, which definately stays on it.
+        oc1->set_halfedge(prev1);
+
+        // Notify the observers that a new outer CCB has been formed.
+        _notify_after_split_outer_ccb(Face_handle(f1),
+                                      Halfedge_handle(he1->next())->ccb(),
+                                      Halfedge_handle(prev1)->ccb());
+      }
+    }
+
+    // Disconnect the two halfedges we are about to delete from the edge list.
+    prev1->set_next(he2->next());
+    prev2->set_next(he1->next());
+
+    // If one of these edges is an incident halfedge of its target vertex,
+    // replace it by the appropriate predecessor.
+    if (he1->vertex()->halfedge() == he1)
+      he1->vertex()->set_halfedge(prev2);
+
+    if (he2->vertex()->halfedge() == he2)
+      he2->vertex()->set_halfedge(prev1);
+
+    // Remove the end vertices, in case they become redundant.
+    if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+        (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+      _remove_vertex_if_redundant(he1->vertex(), f1);
+
+    if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+        (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+      _remove_vertex_if_redundant(he2->vertex(), f1);
+
+    // Delete the curve associated with the edge to be removed.
+    _delete_curve(he1->curve());
+
+    // Delete the pair of halfedges.
+    _dcel().delete_edge(he1);
+
+    // RWRW: NEW!
+    // In case we have to create a new inner CCB inside the face (new removal
+    // case), do it now.
+    if (add_inner_ccb) {
+      // Notify the observers that we are about to create a new inner CCB
+      // inside the merged face.
+      Halfedge_handle hh(prev1);
+
+      _notify_before_add_inner_ccb(Face_handle(f1), hh);
+
+      // Initiate a new inner CCB inside the given face.
+      DInner_ccb* new_ic = _dcel().new_inner_ccb();
+
+      f1->add_inner_ccb(new_ic, prev1);
+      new_ic->set_face(f1);
+
+      // Set the innser CCB of the halfedges along the component boundary.
+      DHalfedge* curr = prev1;
+
+      do {
+        curr->set_inner_ccb(new_ic);
+        curr = curr->next();
+      } while (curr != prev1);
+
+      // Notify the observers that we have formed a new inner CCB.
+      _notify_after_add_inner_ccb(hh->ccb());
+    }
+
+    // Notify the observers that an edge has been deleted.
+    _notify_after_remove_edge();
+
+    // Return the incident face.
+    return f1;
+  }
+
+  CGAL_assertion(f1 != f2);
+
+  // The two incident faces are not the same - in this case, the edge we are
+  // about to delete separates these two faces. We therefore have to delete
+  // one of these faces and merge it with the other face.
+  // First notify the observers we are about to merge the two faces.
+  _notify_before_merge_face(Face_handle(f1), Face_handle(f2),
+                            Halfedge_handle(he1));
+
+  // We begin by checking whether one of the faces is a hole inside the other
+  // face.
+  DHalfedge* curr;
+
+  prev1 = he1->prev();
+  prev2 = he2->prev();
+
+  CGAL_assertion((ic1 == NULL) || (ic2 == NULL));
+
+  if ((ic1 == NULL) && (ic2 == NULL)) {
+    bool add_inner_ccb = false;
+
+    // Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
+    // signs2 out of this scope (for the non-planar case), the code must be
+    // dispatched, so that the planar case is not affected.
+
+    // Compute the signs of the ccbs for he1 and he2.
+    // The signs are computed here, a sub case of (f1 != f2), in addition to
+    // the case (f1 == f2) above. This way unnecessary computations of the
+    // signs are avoided.
+
+    // EFEF 2013-07-29. The call to _compute_signs() is dispatched.
+    // Currently, only 2 cases are supported, namely, the case where non of
+    // the boundaries are identified and the case where at least one pair of
+    // opposite boundaries are identified. However, the code for the latter
+    // assumes that non of the (other) boundaries is open. A 3rd version
+    // that supports the remaining case, (for example the cylinder), should
+    // be developed and used.
+    signs1 = _compute_signs(he1, Has_identified_sides_category());
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "signs1.x: " << signs1.first << std::endl;
+      std::cout << "signs1.y: " << signs1.second << std::endl;
+#endif
+
+      signs2 = _compute_signs(he2, Has_identified_sides_category());
+#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
+      std::cout << "signs2.x: " << signs2.first << std::endl;
+      std::cout << "signs2.y: " << signs2.second << std::endl;
+#endif
+
+    // Both halfedges lie on the outer boundary of their incident faces
+    // (case 3.4). We have to distinguish two possible sub-cases.
+      // TODO EBEB 2012-07-30 replace with signs
+    if (_hole_creation_on_edge_removal(signs1, signs2, false)) {
+      // We have to remove the outer CCBs of f1 and f2 that he1 and he2 lie
+      // on, and create a new hole in the merged face (case 3.4.2).
+      // We first remove the outer CCB oc1 from f1, and inform the observers
+      // on doing so.
+      _notify_before_remove_outer_ccb(Face_handle(f1),
+                                      (Halfedge_handle(he1))->ccb());
+
+      f1->erase_outer_ccb(oc1);
+      _dcel().delete_outer_ccb(oc1);
+
+      _notify_after_remove_outer_ccb(Face_handle(f1));
+
+      // We now remove the outer CCBs oc2 from f2, and inform the observers
+      // on doing so.
+      _notify_before_remove_outer_ccb(Face_handle(f2),
+                                      (Halfedge_handle(he2))->ccb());
+
+      f2->erase_outer_ccb(oc2);
+      _dcel().delete_outer_ccb(oc2);
+
+      _notify_after_remove_outer_ccb(Face_handle(f2));
+
+      // Mark that we should eventually add a new inner CCB in the merged face.
+      add_inner_ccb = true;
+    }
+    else {
+      // f1 and f2 are two adjacent faces (case 3.4.1), so we simply merge
+      // them.
+      // We first set the connected component of f2's outer-boundary halfedges
+      // to be the same as f1's outer component.
+      for (curr = he2->next(); curr != he2; curr = curr->next())
+        curr->set_outer_ccb(oc1);
+    }
+
+    _move_all_inner_ccb(f2, f1);        // move all inner CCBs from f2 to f1
+
+    // In case he1, which is about to be deleted, is a representative
+    // halfedge of outer component of f1, we replace it by its predecessor.
+    if (oc1->halfedge() == he1)
+      oc1->set_halfedge(prev1);
+
+    _move_all_isolated_vertices(f2, f1); // move all iso vertices from f2 to f1
+
+    // If he1 or he2 are the incident halfedges to their target vertices,
+    // we replace them by the appropriate predecessors.
+    if (he1->vertex()->halfedge() == he1)
+      he1->vertex()->set_halfedge(prev2);
+
+    if (he2->vertex()->halfedge() == he2)
+      he2->vertex()->set_halfedge(prev1);
+
+    // Disconnect the two halfedges we are about to delete from the edge
+    // list.
+    prev1->set_next(he2->next());
+    prev2->set_next(he1->next());
+
+    // Delete the curve associated with the edge to be removed.
+    _delete_curve(he1->curve());
+
+    // If the face f2 we have just merged with f1 is unbounded, then the
+    // merged face is also unbounded.
+    if (f2->is_unbounded())
+      f1->set_unbounded(true);
+
+    // Delete the face f2.
+    _dcel().delete_face(f2);
+
+    // Notify the observers that the faces have been merged.
+    _notify_after_merge_face(Face_handle(f1));
+
+    // Remove the end vertices, in case they become redundant.
+    if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+        (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+      _remove_vertex_if_redundant(he1->vertex(), f1);
+
+    if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+        (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+      _remove_vertex_if_redundant(he2->vertex(), f1);
+
+    // Delete the pair of halfedges.
+    _dcel().delete_edge(he1);
+
+    // In case we have to create a new inner CCB inside the merged face
+    // (case 3.4.1), do it now.
+    if (add_inner_ccb) {
+      // Notify the observers that we are about to create a new inner CCB
+      // inside the merged face.
+      Halfedge_handle hh(prev1);
+
+      _notify_before_add_inner_ccb(Face_handle(f1), hh);
+
+      // Initiate a new inner CCB inside the given face.
+      DInner_ccb* new_ic = _dcel().new_inner_ccb();
+
+      f1->add_inner_ccb(new_ic, prev1);
+      new_ic->set_face(f1);
+
+      // Set the innser CCB of the halfedges along the component boundary.
+      curr = prev1;
+      do {
+        curr->set_inner_ccb(new_ic);
+        curr = curr->next();
+      } while (curr != prev1);
+
+      // Notify the observers that we have formed a new inner CCB.
+      _notify_after_add_inner_ccb(hh->ccb());
+    }
+
+    // Notify the observers that an edge has been deleted.
+    _notify_after_remove_edge();
+
+    // Return the merged face.
+    return f1;
+  }
+
+  // In this case we merge a face with another face that now forms a hole
+  // inside it (case 3.3). We first make sure that f1 contains the hole f2, so
+  // we can merge f2 with it (we swap roles between the halfedges if
+  // necessary).
+  if (ic2 != NULL) {
+    he1 = he2;
+    he2 = he1->opposite();
+
+    ic1 = ic2;
+    ic2 = NULL;
+
+    oc2 = oc1;
+    oc1 = NULL;
+
+    DFace* tf = f1;
+    f1 = f2;
+    f2 = tf;
+
+    prev1 = he1->prev();
+    prev2 = he2->prev();
+  }
+
+  // By removing the edge we open a closed face f2 contained in f1. By doing
+  // this, the outer boundary of f2 unites with the hole boundary that ic1
+  // represents. We therefore have to set the component of all halfedges
+  // along the boundary of f2 to be ic1.
+  for (curr = he2->next(); curr != he2; curr = curr->next())
+    curr->set_inner_ccb(ic1);
+
+  _move_all_inner_ccb(f2, f1);          // move the inner CCBs from f2 to f1
+  _move_all_isolated_vertices(f2, f1);  // move all iso vertices from f2 to f1
+
+  // Notice that f2 will be merged with f1, but its boundary will still be
+  // a hole inside this face. In case he1 is a represantative of this hole,
+  // replace it by its predecessor.
+  if (ic1->halfedge() == he1)
+    ic1->set_halfedge(prev1);
+
+  // If he1 or he2 are the incident halfedges to their target vertices,
+  // we replace them by the appropriate predecessors.
+  if (he1->vertex()->halfedge() == he1)
+    he1->vertex()->set_halfedge(prev2);
+
+  if (he2->vertex()->halfedge() == he2)
+    he2->vertex()->set_halfedge(prev1);
+
+  // Disconnect the two halfedges we are about to delete from the edge
+  // list.
+  prev1->set_next(he2->next());
+  prev2->set_next(he1->next());
+
+  // Delete the curve associated with the edge to be removed.
+  _delete_curve(he1->curve());
+
+  // If the face f2 we have just merged with f1 is unbounded, then the merged
+  // face is also unbounded.
+  if (f2->is_unbounded())
+    f1->set_unbounded(true);
+
+  // Delete the face f2.
+  _dcel().delete_face(f2);
+
+  // Notify the observers that the faces have been merged.
+  _notify_after_merge_face(Face_handle(f1));
+
+  // Remove the end vertices, in case they become redundant.
+  if ((he1->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+      (he1->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+    _remove_vertex_if_redundant(he1->vertex(), f1);
+
+  if ((he2->vertex()->parameter_space_in_x() != ARR_INTERIOR) ||
+      (he2->vertex()->parameter_space_in_y() != ARR_INTERIOR))
+    _remove_vertex_if_redundant(he2->vertex(), f1);
+
+  // Delete the pair of halfedges.
+  _dcel().delete_edge(he1);
+
+  // Notify the observers that an edge has been deleted.
+  _notify_after_remove_edge();
+
+  // Return the merged face.
+  return f1;
+
+  // TODO EBEB 2012-08-06 it seems that a torus case is missing
+}
+
+// Decide whether a hole is created
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_hole_creation_on_edge_removal(std::pair< CGAL::Sign, CGAL::Sign > signs1,
+                               std::pair< CGAL::Sign, CGAL::Sign > signs2,
+                               bool same_face) {
+  // EBEB 2013-07-16 Remark: For tiled surfaces, this function has to respect the
+  // topology of the tiled surface
+
+  // TODO EBEB 2013-07-16 Add code for torus (double identification)
+  CGAL::Sign sign1 = signs1.first;
+  CGAL::Sign sign2 = signs2.first;
+
+  if (same_face) return true;
+  return ((CGAL::ZERO != sign1) && (sign1 == opposite(sign2)));
+}
+
+//-----------------------------------------------------------------------------
+// Remove a vertex in case it becomes redundant after the deletion of an
+// incident edge.
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_remove_vertex_if_redundant(DVertex* v, DFace* f)
+{
+  CGAL_precondition((v->parameter_space_in_x() != ARR_INTERIOR) ||
+                    (v->parameter_space_in_y() != ARR_INTERIOR));
+
+  // In case the vertex has no incident halfedges, remove it if it is
+  // redundant. Otherwise, make it an isolated vertex.
+  if (v->halfedge() == NULL) {
+    if (m_topol_traits.is_redundant(v)) {
+      // Remove the vertex and notify the observers on doing so.
+      _notify_before_remove_vertex(Vertex_handle(v));
+
+      m_topol_traits.erase_redundant_vertex(v);
+
+      // Note the topology traits do not free the vertex - we now do it.
+      if (! v->has_null_point())
+        _delete_point(v->point());
+      _dcel().delete_vertex(v);
+
+      _notify_after_remove_vertex();
+    }
+    else
+      // Keep the vertex as an isolated one.
+      _insert_isolated_vertex(f, v);
+    return;
+  }
+
+  // Get the first two incident halfedges of v.
+  DHalfedge* he1 = v->halfedge();
+  DHalfedge* he2 = he1->next()->opposite();
+
+  if (he2->next()->opposite() != he1)
+    // In this case there are more than two incident edges, so v obviously
+    // cannot be removed.
+    return;
+
+  if (! he1->has_null_curve() || ! he2->has_null_curve())
+    // We can only merge fictitious halfedges.
+    return;
+
+  // Now check if the vertex is redundant. If it is, remove it by merging
+  // its two incident fictitious halfedges.
+  if (m_topol_traits.is_redundant(v)) {
+    // Use the topology traits to merge the two fictitious halfedges.
+    _notify_before_merge_fictitious_edge(Halfedge_handle(he1),
+                                         Halfedge_handle(he2));
+
+    he1 = m_topol_traits.erase_redundant_vertex(v);
+
+    _notify_after_merge_fictitious_edge(Halfedge_handle(he1));
+
+    // Note the topology traits do not free the vertex - we now do it.
+    _notify_before_remove_vertex(Vertex_handle(v));
+
+    if (! v->has_null_point())
+      _delete_point(v->point());
+    _dcel().delete_vertex(v);
+
+    _notify_after_remove_vertex();
+  }
+}
+
+//-----------------------------------------------------------------------------
+// Remove an isolated vertex from the interior of a given face (but not from
+// the DCEL).
+//
+template <typename GeomTraits, typename TopTraits>
+void Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_remove_isolated_vertex(DVertex* v)
+{
+  // Remove the isolated vertex from the face and delete its record.
+  DIso_vertex* iv = v->isolated_vertex();
+  DFace* f = iv->face();
+
+  f->erase_isolated_vertex(iv);
+  _dcel().delete_isolated_vertex(iv);
+}
+
+//---------------------------------------------------------------------------
+// Check whether the arrangement is valid. In particular, check the
+// validity of each vertex, halfedge, and face.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::is_valid() const
+{
+  Vertex_const_iterator vit;
+  bool is_vertex_valid;
+  for (vit = vertices_begin(); vit != vertices_end(); ++vit) {
+    is_vertex_valid = _is_valid(vit);
+    if (!is_vertex_valid) {
+      CGAL_warning_msg(is_vertex_valid, "Invalid vertex.");
+      return false;
+    }
+  }
+
+  Halfedge_const_iterator heit;
+  bool is_halfedge_valid;
+  for (heit = halfedges_begin(); heit != halfedges_end(); ++heit) {
+    is_halfedge_valid = _is_valid(heit);
+    if (! is_halfedge_valid) {
+      CGAL_warning_msg(is_halfedge_valid, "Invalid halfedge.");
+      return false;
+    }
+  }
+
+  Face_const_iterator     fit;
+  bool                    is_face_valid;
+
+  for (fit = faces_begin(); fit != faces_end(); ++fit) {
+    is_face_valid = _is_valid(fit);
+    if (! is_face_valid) {
+      CGAL_warning_msg(is_face_valid, "Invalid face.");
+      return false;
+    }
+  }
+
+  bool  are_vertices_unique = _are_vertices_unique();
+  if (! are_vertices_unique) {
+    CGAL_warning_msg(are_vertices_unique,
+                     "Found two vertices with the same geometric point.");
+    return false;
+  }
+
+  // If we reached here, the arrangement is valid.
+  return true;
+}
+
+//---------------------------------------------------------------------------
+// Check the validity of a vertex.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_valid(Vertex_const_handle v) const
+{
+  // Do not check isolated vertices, as they have no incident halfedges.
+  if (v->is_isolated()) return true;
+
+  // Make sure that the vertex is the target of all its incident halfedges.
+  Halfedge_around_vertex_const_circulator circ = v->incident_halfedges();
+  Halfedge_around_vertex_const_circulator start = circ;
+
+  do {
+    if (circ->target() != v) return false;
+    ++circ;
+  } while (circ != start);
+
+  // In case of a non-boundary vertex, make sure the curves are correctly
+  // ordered around this vertex.
+  if ((v->parameter_space_in_x() == ARR_INTERIOR) &&
+      (v->parameter_space_in_y() == ARR_INTERIOR))
+  {
+    if (! _are_curves_ordered_cw_around_vertrex(v)) return false;
+  }
+
+  return true;
+}
+
+//---------------------------------------------------------------------------
+// Check the validity of a halfedge.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_valid(Halfedge_const_handle he) const
+{
+  // Check relations with the previous and the next halfedges.
+  if (he->prev()->target() != he->source()) return false;
+
+  if (he->target() != he->next()->source()) return false;
+
+  // Check relations with the twin.
+  if (he != he->twin()->twin()) return false;
+
+  if (he->source() != he->twin()->target() ||
+      he->target() != he->twin()->source())
+    return false;
+
+  if (he->direction() == he->twin()->direction()) return false;
+
+  // Stop here in case of a fictitious edge.
+  if (he->is_fictitious()) return true;
+
+  // Check that the end points of the curve associated with the halfedge
+  // really equal the source and target vertices of this halfedge.
+  const X_monotone_curve_2& cv = he->curve();
+  const DVertex* source = _vertex(he->source());
+  const DVertex* target = _vertex(he->target());
+  Comparison_result res = ((source->parameter_space_in_x() == ARR_INTERIOR) &&
+                           (source->parameter_space_in_y() == ARR_INTERIOR) &&
+                           (target->parameter_space_in_x() == ARR_INTERIOR) &&
+                           (target->parameter_space_in_y() == ARR_INTERIOR)) ?
+    m_geom_traits->compare_xy_2_object()(source->point(), target->point()) :
+    ((he->direction() == ARR_LEFT_TO_RIGHT) ? SMALLER : LARGER);
+
+  if (res == SMALLER) {
+    if (he->direction() != ARR_LEFT_TO_RIGHT)
+      return false;
+
+    return (_are_equal(_vertex(he->source()), cv, ARR_MIN_END) &&
+            _are_equal(_vertex(he->target()), cv, ARR_MAX_END));
+  }
+  else if (res == LARGER) {
+    if (he->direction() != ARR_RIGHT_TO_LEFT)
+      return false;
+
+    return (_are_equal(_vertex(he->source()), cv, ARR_MAX_END) &&
+            _are_equal(_vertex(he->target()), cv, ARR_MIN_END));
+  }
+
+  // In that case, the source and target of the halfedge are equal.
+  return false;
+}
+
+//---------------------------------------------------------------------------
+// Check the validity of a face.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_valid(Face_const_handle f) const
+{
+  // Check if all outer components of the face refer to f.
+  const DFace* p_f = _face(f);
+  DOuter_ccb_const_iter oc_it;
+  const DHalfedge* he;
+  const DOuter_ccb* oc;
+  for (oc_it = p_f->outer_ccbs_begin(); oc_it != p_f->outer_ccbs_end(); ++oc_it)
+  {
+    he = *oc_it;
+    if (he->is_on_inner_ccb()) return false;
+
+    oc = he->outer_ccb();
+    if (oc->face() != p_f) return false;
+
+    if (! _is_outer_ccb_valid(oc, he)) return false;
+  }
+
+  // Check if all inner components of the face refer to f.
+  DInner_ccb_const_iter ic_it;
+  const DInner_ccb* ic;
+
+  for (ic_it = p_f->inner_ccbs_begin(); ic_it != p_f->inner_ccbs_end(); ++ic_it)
+  {
+    he = *ic_it;
+    if (! he->is_on_inner_ccb()) return false;
+
+    ic = he->inner_ccb();
+    if (ic->face() != p_f) return false;
+
+    if (! _is_inner_ccb_valid(ic, he)) return false;
+  }
+
+  // Check if all isolated vertices inside the face refer to f.
+  DIso_vertex_const_iter iv_it;
+  const DVertex* v;
+  const DIso_vertex* iv;
+  for (iv_it = p_f->isolated_vertices_begin();
+       iv_it != p_f->isolated_vertices_end(); ++iv_it)
+  {
+    v = &(*iv_it);
+    if (! v->is_isolated()) return false;
+
+    iv = v->isolated_vertex();
+    if (iv->face() != p_f) return false;
+  }
+
+  // If we reached here, the face is valid.
+  return true;
+}
+
+//---------------------------------------------------------------------------
+// Check the validity of an outer CCB.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const
+{
+  // Make sure that all halfedges along the CCB refer to the same component.
+  const DHalfedge* curr = first;
+  bool found_rep = false;
+
+  do {
+    if (curr->is_on_inner_ccb()) return false;
+
+    if (oc != curr->outer_ccb()) return false;
+
+    if (! found_rep && oc->halfedge() == curr) found_rep = true;
+
+    curr = curr->next();
+  } while (curr != first);
+
+  // Return if we found the CCB representative along the outer CCB.
+  return found_rep;
+}
+
+//---------------------------------------------------------------------------
+// Check the validity of an inner CCB.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const
+{
+  // Make sure that all halfedges along the CCB refer to the same component.
+  const DHalfedge* curr = first;
+  bool found_rep = false;
+
+  do {
+    if (! curr->is_on_inner_ccb()) return false;
+
+    if (ic != curr->inner_ccb()) return false;
+
+    if (! found_rep && ic->halfedge() == curr) found_rep = true;
+
+    curr = curr->next();
+  } while (curr != first);
+
+  // Return if we found the CCB representative along the inner CCB.
+  return found_rep;
+}
+
+//---------------------------------------------------------------------------
+// Check that all vertices are unique (no two vertices with the same
+// geometric point).
+//
+template <typename GeomTraits, typename TopTraits>
+bool
+Arrangement_on_surface_2<GeomTraits, TopTraits>::_are_vertices_unique() const
+{
+  if (number_of_vertices() < 2) return true;
+
+  // Store all points associated with non-boundary vertices.
+  std::vector<Point_2>  points_vec(number_of_vertices());
+  Vertex_const_iterator vit;
+  unsigned int          i = 0;
+
+  for (vit = vertices_begin(); vit != vertices_end(); ++vit) {
+    if ((vit->parameter_space_in_x() == ARR_INTERIOR) &&
+        (vit->parameter_space_in_y() == ARR_INTERIOR))
+    {
+      points_vec[i] = vit->point();
+      ++i;
+    }
+  }
+  points_vec.resize(i);
+
+  // Sort the vector of points and make sure no two adjacent points in the
+  // sorted vector are equal.
+  typedef typename Traits_adaptor_2::Compare_xy_2       Compare_xy_2;
+  typedef typename Traits_adaptor_2::Equal_2            Equal_2;
+
+  Equal_2       equal = m_geom_traits->equal_2_object();
+  Compare_xy_2  compare_xy = m_geom_traits->compare_xy_2_object();
+  Compare_to_less<Compare_xy_2> cmp = compare_to_less(compare_xy);
+
+  std::sort(points_vec.begin(), points_vec.end(), cmp);
+  for (i = 1; i < points_vec.size(); ++i) {
+    if (equal(points_vec[i-1], points_vec[i])) return false;
+  }
+
+  return true;
+}
+
+//---------------------------------------------------------------------------
+// Check that the curves around a given vertex are ordered clockwise.
+//
+template <typename GeomTraits, typename TopTraits>
+bool Arrangement_on_surface_2<GeomTraits, TopTraits>::
+_are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const
+{
+  if (v->degree() < 3) return true;
+
+  typename Traits_adaptor_2::Is_between_cw_2  is_between_cw =
+    m_geom_traits->is_between_cw_2_object();
+
+  Halfedge_around_vertex_const_circulator circ = v->incident_halfedges();
+  Halfedge_around_vertex_const_circulator first = circ;
+  Halfedge_around_vertex_const_circulator prev, next;
+  bool eq1, eq2;
+
+  do {
+    prev = circ; --prev;
+    next = circ; ++next;
+
+    if (!is_between_cw(circ->curve(), (circ->direction() == ARR_RIGHT_TO_LEFT),
+                       prev->curve(), (prev->direction() == ARR_RIGHT_TO_LEFT),
+                       next->curve(), (next->direction() == ARR_RIGHT_TO_LEFT),
+                       v->point(), eq1, eq2))
+      return false;
+
+    if (eq1 || eq2) return false;
+
+    ++circ;
+  } while (circ != first);
+
+  return true;
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Open_hash.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Open_hash.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/Open_hash.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/Open_hash.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/arrangement_type_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/arrangement_type_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_2/arrangement_type_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_2/arrangement_type_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Arrangement_on_surface_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_on_surface_2.h
new file mode 100644
index 0000000..cfa701c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_on_surface_2.h
@@ -0,0 +1,2938 @@
+// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s): Ron Wein          <wein at post.tau.ac.il>
+//            Efi Fogel         <efif at post.tau.ac.il>
+//            Eric Berberich    <ericb at post.tau.ac.il>
+//            (based on old version by: Iddo Hanniel,
+//                                      Eyal Flato,
+//                                      Oren Nechushtan,
+//                                      Ester Ezra,
+//                                      Shai Hirsch,
+//                                      and Eugene Lipovetsky)
+#ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
+#define CGAL_ARRANGEMENT_ON_SURFACE_2_H
+
+/*! \file
+ * The header file for the Arrangement_on_surface_2<Traits,Dcel> class.
+ */
+
+#include <map>
+#include <vector>
+#include <algorithm>
+#include <boost/mpl/assert.hpp>
+
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_enums.h>
+#include <CGAL/HalfedgeDS_iterator.h>
+#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
+#include <CGAL/In_place_list.h>
+#include <CGAL/Arr_default_dcel.h>
+#include <CGAL/Arr_observer.h>
+#include <CGAL/Arr_accessor.h>
+#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Iterator_transform.h>
+
+namespace CGAL {
+
+/*! \class Arrangement_on_surface_2
+ * The arrangement class, representing 2-dimensional subdivisions induced on
+ * an arbitrary surface by a set of arbitrary planar.
+ * The GeomTraits parameter corresponds to a geometry-traits class that
+ * is defines the Point_2 and X_monotone_curve_2 types and implements the
+ * geometric predicates and constructions for the family of curves it defines.
+ * The TopTraits parameter corresponds to a topology-traits class that defines
+ * the topological structure of the surface. Note that the geometry traits
+ * class should also be aware of the kind of surface on which its curves and
+ * points are defined.
+ */
+template <typename GeomTraits_, typename TopTraits_>
+class Arrangement_on_surface_2 {
+public:
+  typedef GeomTraits_                                     Geometry_traits_2;
+  typedef TopTraits_                                      Topology_traits;
+
+  // first define adaptor ...
+  typedef Arr_traits_basic_adaptor_2<Geometry_traits_2>   Traits_adaptor_2;
+
+  // .. as it completes (potentially) missing side tags
+  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
+  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
+  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
+  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
+
+  BOOST_MPL_ASSERT(
+                   (typename
+                    Arr_sane_identified_tagging<Left_side_category,
+                    Bottom_side_category,
+                    Top_side_category,
+                    Right_side_category>::result)
+                   );
+
+public:
+  typedef Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
+  Self;
+
+  typedef typename Geometry_traits_2::Point_2             Point_2;
+  typedef typename Geometry_traits_2::X_monotone_curve_2  X_monotone_curve_2;
+
+  // maybe remove this in a future version (that supports complete handling
+  // of all sides)
+  typedef typename Arr_are_all_sides_oblivious_tag<Left_side_category,
+                                                   Bottom_side_category,
+                                                   Top_side_category,
+                                                   Right_side_category>::result
+    Are_all_sides_oblivious_category;
+
+  typedef typename Arr_has_identified_sides<Left_side_category,
+                                            Bottom_side_category>::result
+    Has_identified_sides_category;
+
+  typedef typename Arr_two_sides_category<Bottom_side_category,
+                                          Top_side_category>::result
+    Top_or_bottom_sides_category;
+
+public:
+  typedef typename Topology_traits::Dcel            Dcel;
+  typedef typename Dcel::Size                       Size;
+
+protected:
+  friend class Arr_observer<Self>;
+  friend class Arr_accessor<Self>;
+
+  // Internal DCEL types:
+  typedef typename Dcel::Vertex                     DVertex;
+  typedef typename Dcel::Halfedge                   DHalfedge;
+  typedef typename Dcel::Face                       DFace;
+  typedef typename Dcel::Outer_ccb                  DOuter_ccb;
+  typedef typename Dcel::Inner_ccb                  DInner_ccb;
+  typedef typename Dcel::Isolated_vertex            DIso_vertex;
+
+  typedef typename Dcel::difference_type            DDifference;
+  typedef typename Dcel::iterator_category          DIterator_category;
+
+  typedef typename Dcel::Vertex_iterator            DVertex_iter;
+  typedef typename Dcel::Vertex_const_iterator      DVertex_const_iter;
+
+  typedef typename Dcel::Halfedge_iterator          DHalfedge_iter;
+  typedef typename Dcel::Halfedge_const_iterator    DHalfedge_const_iter;
+
+  typedef typename Dcel::Edge_iterator              DEdge_iter;
+  typedef typename Dcel::Edge_const_iterator        DEdge_const_iter;
+
+  typedef typename Dcel::Face_iterator              DFace_iter;
+  typedef typename Dcel::Face_const_iterator        DFace_const_iter;
+
+  typedef typename DFace::Outer_ccb_iterator        DOuter_ccb_iter;
+  typedef typename DFace::Outer_ccb_const_iterator  DOuter_ccb_const_iter;
+
+  typedef typename DFace::Inner_ccb_iterator        DInner_ccb_iter;
+  typedef typename DFace::Inner_ccb_const_iterator  DInner_ccb_const_iter;
+
+  typedef typename DFace::Isolated_vertex_iterator  DIso_vertex_iter;
+  typedef typename DFace::Isolated_vertex_const_iterator
+                                                    DIso_vertex_const_iter;
+
+protected:
+  /*! \class
+   * A functor for filtering DCEL vertices at infinity.
+   */
+  class _Is_concrete_vertex {
+  private:
+    const Topology_traits* m_topol_traits;
+
+  public:
+    _Is_concrete_vertex() : m_topol_traits(NULL) {}
+
+    _Is_concrete_vertex(const Topology_traits* topol_traits) :
+      m_topol_traits(topol_traits)
+    {}
+
+    bool operator()(const DVertex& v) const
+    {
+      if (m_topol_traits == NULL)
+        return true;
+
+      return (m_topol_traits->is_concrete_vertex(&v));
+    }
+  };
+
+  /*! \class
+   * A functor for filtering fictitious DCEL vertices.
+   */
+  class _Is_valid_vertex {
+  private:
+    const Topology_traits* m_topol_traits;
+
+  public:
+    _Is_valid_vertex() : m_topol_traits(NULL) {}
+
+    _Is_valid_vertex(const Topology_traits* topol_traits) :
+      m_topol_traits(topol_traits)
+    {}
+
+    bool operator()(const DVertex& v) const
+    {
+      if (m_topol_traits == NULL)
+        return true;
+
+      return (m_topol_traits->is_valid_vertex(&v));
+    }
+  };
+
+  /*! \struct
+   * A functor for filtering fictitious DCEL halfedges.
+   */
+  class _Is_valid_halfedge {
+  private:
+    const Topology_traits* m_topol_traits;
+
+  public:
+    _Is_valid_halfedge() : m_topol_traits(NULL) {}
+
+    _Is_valid_halfedge(const Topology_traits* topol_traits) :
+      m_topol_traits(topol_traits)
+    {}
+
+    bool operator()(const DHalfedge& he) const
+    {
+      if (m_topol_traits == NULL)
+        return true;
+
+      return (m_topol_traits->is_valid_halfedge(&he));
+    }
+  };
+
+  /*! \struct
+   * A functor for filtering the fictitious faces.
+   */
+  class _Is_valid_face {
+  private:
+    const Topology_traits* m_topol_traits;
+
+  public:
+    _Is_valid_face() : m_topol_traits(NULL) {}
+
+    _Is_valid_face(const Topology_traits* topol_traits) :
+      m_topol_traits(topol_traits)
+    {}
+
+    bool operator()(const DFace& f) const
+    {
+      if (m_topol_traits == NULL)
+        return true;
+
+      return (m_topol_traits->is_valid_face(&f));
+    }
+  };
+
+  /*! \struct
+   * A functor for filtering bounded faces.
+   */
+  class _Is_unbounded_face {
+  private:
+    const Topology_traits* m_topol_traits;
+
+  public:
+    _Is_unbounded_face() : m_topol_traits(NULL) {}
+
+    _Is_unbounded_face(const Topology_traits* topol_traits) :
+      m_topol_traits(topol_traits)
+    {}
+
+    const Topology_traits* topology_traits() const { return m_topol_traits; }
+
+    bool operator()(const DFace& f) const
+    {
+      return (m_topol_traits->is_valid_face(&f) &&
+              m_topol_traits->is_unbounded(&f));
+    }
+  };
+
+public:
+  // Forward declerations:
+  class Vertex;
+  class Halfedge;
+  class Face;
+
+  // Definition of the halfedge data-structure itereators and circulators:
+  typedef I_Filtered_iterator<DVertex_iter, _Is_concrete_vertex,
+                              Vertex, DDifference, DIterator_category>
+    Vertex_iterator;
+
+  typedef I_Filtered_const_iterator<DVertex_const_iter, _Is_concrete_vertex,
+                                    DVertex_iter, Vertex, DDifference,
+                                    DIterator_category>
+    Vertex_const_iterator;
+
+  typedef I_Filtered_iterator<DHalfedge_iter, _Is_valid_halfedge,
+                              Halfedge, DDifference, DIterator_category>
+    Halfedge_iterator;
+
+  typedef I_Filtered_const_iterator<DHalfedge_const_iter, _Is_valid_halfedge,
+                                    DHalfedge_iter, Halfedge, DDifference,
+                                    DIterator_category>
+    Halfedge_const_iterator;
+
+  /*! \class
+   * Edges iterator - defined as a derived class to make it assignable
+   * to the halfedge iterator type.
+   */
+  class Edge_iterator :
+    public I_Filtered_iterator<DEdge_iter, _Is_valid_halfedge,
+                               Halfedge, DDifference, DIterator_category>
+  {
+    typedef I_Filtered_iterator<DEdge_iter, _Is_valid_halfedge,
+                                Halfedge, DDifference, DIterator_category>
+    Base;
+
+  public:
+    Edge_iterator() {}
+
+    Edge_iterator(DEdge_iter iter, DEdge_iter iend,
+                  const _Is_valid_halfedge& pred) :
+      Base(iter, iend, pred)
+    {}
+
+    // Casting to a halfedge iterator.
+    operator Halfedge_iterator() const
+    {
+      return (Halfedge_iterator(DHalfedge_iter(this->current_iterator())));
+    }
+
+    operator Halfedge_const_iterator() const
+    {
+      return (Halfedge_const_iterator
+              (DHalfedge_const_iter(this->current_iterator())));
+    }
+  };
+
+  class Edge_const_iterator :
+    public I_Filtered_const_iterator<DEdge_const_iter, _Is_valid_halfedge,
+                                     DEdge_iter, Halfedge, DDifference,
+                                     DIterator_category>
+  {
+    typedef I_Filtered_const_iterator<DEdge_const_iter, _Is_valid_halfedge,
+                                      DEdge_iter, Halfedge, DDifference,
+                                      DIterator_category>    Base;
+
+  public:
+    Edge_const_iterator() {}
+
+    Edge_const_iterator(Edge_iterator iter) :
+      Base(iter.current_iterator(), iter.past_the_end(), iter.filter())
+    {}
+
+    Edge_const_iterator(DEdge_const_iter iter, DEdge_const_iter iend,
+                        const _Is_valid_halfedge& pred) :
+      Base(iter, iend, pred)
+    {}
+
+    // Casting to a halfedge iterator.
+    operator Halfedge_const_iterator() const
+    {
+      return (Halfedge_const_iterator
+              (DHalfedge_const_iter(this->current_iterator())));
+    }
+  };
+
+  typedef I_Filtered_iterator<DFace_iter, _Is_valid_face,
+                              Face, DDifference,
+                              DIterator_category>     Face_iterator;
+
+  typedef I_Filtered_const_iterator<DFace_const_iter, _Is_valid_face,
+                                    DFace_iter, Face,
+                                    DDifference, DIterator_category>
+    Face_const_iterator;
+
+  typedef _HalfedgeDS_vertex_circ<Halfedge, Halfedge_iterator,
+                                  Bidirectional_circulator_tag>
+    Halfedge_around_vertex_circulator;
+
+  typedef _HalfedgeDS_vertex_const_circ<Halfedge, Halfedge_const_iterator,
+                                        Bidirectional_circulator_tag>
+    Halfedge_around_vertex_const_circulator;
+
+  typedef _HalfedgeDS_facet_circ<Halfedge, Halfedge_iterator,
+                                 Bidirectional_circulator_tag>
+    Ccb_halfedge_circulator;
+
+  typedef _HalfedgeDS_facet_const_circ<Halfedge, Halfedge_const_iterator,
+                                       Bidirectional_circulator_tag>
+    Ccb_halfedge_const_circulator;
+
+  /*! \class
+   * Unbounded faces iterator - defined as a derived class to make it
+   * assignable to the face iterator type.
+   */
+  class Unbounded_face_iterator :
+    public I_Filtered_iterator<DFace_iter, _Is_unbounded_face,
+                               Face, DDifference, DIterator_category>
+  {
+    typedef I_Filtered_iterator<DFace_iter, _Is_unbounded_face,
+                                Face, DDifference, DIterator_category>
+      Base;
+
+  public:
+    Unbounded_face_iterator() {}
+
+    Unbounded_face_iterator(DFace_iter iter, DFace_iter iend,
+                            const _Is_unbounded_face& is_unbounded) :
+      Base(iter, iend, is_unbounded)
+    {}
+
+    // Casting to a face iterator.
+    operator Face_iterator() const
+    {
+      return (Face_iterator(DFace_iter(this->current_iterator()),
+                            DFace_iter(this->past_the_end()),
+                            _Is_valid_face(this->filter().topology_traits())));
+    }
+
+    operator Face_const_iterator() const
+    {
+      return (Face_const_iterator
+              (DFace_const_iter(this->current_iterator()),
+               DFace_const_iter(this->past_the_end()),
+               _Is_valid_face(this->filter().topology_traits())));
+    }
+  };
+
+  class Unbounded_face_const_iterator :
+    public I_Filtered_const_iterator<DFace_const_iter, _Is_unbounded_face,
+                                     DFace_iter, Face, DDifference,
+                                     DIterator_category>
+  {
+    typedef I_Filtered_const_iterator<DFace_const_iter, _Is_unbounded_face,
+                                      DFace_iter, Face, DDifference,
+                                      DIterator_category>   Base;
+
+  public:
+    Unbounded_face_const_iterator() {}
+
+    Unbounded_face_const_iterator(Unbounded_face_iterator iter) : Base(iter) {}
+
+    Unbounded_face_const_iterator(DFace_const_iter iter,
+                                  DFace_const_iter iend,
+                                  const _Is_unbounded_face& is_unbounded) :
+      Base(iter, iend, is_unbounded)
+    {}
+
+    // Casting to a face iterator.
+    operator Face_const_iterator() const
+    {
+      return (Face_const_iterator(DFace_const_iter(this->current_iterator()),
+                                  DFace_const_iter(this->past_the_end())));
+    }
+  };
+
+protected:
+  struct _Halfedge_to_ccb_circulator {
+    typedef DHalfedge*               argument_type;
+    typedef Ccb_halfedge_circulator  result_type;
+
+    result_type operator()(argument_type s) const
+    { return Ccb_halfedge_circulator(Halfedge_iterator(s)); }
+  };
+
+  struct _Const_halfedge_to_ccb_circulator {
+    typedef const DHalfedge*               argument_type;
+    typedef Ccb_halfedge_const_circulator  result_type;
+
+    result_type operator()(argument_type s) const
+    { return Ccb_halfedge_const_circulator(Halfedge_const_iterator(s)); }
+  };
+
+  typedef Cast_function_object<DVertex, Vertex>   _Vertex_to_vertex;
+
+public:
+  typedef Iterator_transform<DOuter_ccb_iter, _Halfedge_to_ccb_circulator>
+                                      Outer_ccb_iterator;
+
+  typedef Iterator_transform<DOuter_ccb_const_iter,
+                             _Const_halfedge_to_ccb_circulator>
+                                      Outer_ccb_const_iterator;
+
+  typedef Iterator_transform<DInner_ccb_iter, _Halfedge_to_ccb_circulator>
+                                      Inner_ccb_iterator;
+
+  typedef Iterator_transform<DInner_ccb_const_iter,
+                             _Const_halfedge_to_ccb_circulator>
+                                      Inner_ccb_const_iterator;
+
+  /*! \class
+   * Isolated vertices iterator - defined as a class to make it assignable
+   * to the vertex iterator type.
+   */
+  class Isolated_vertex_iterator :
+    public Iterator_project<DIso_vertex_iter, _Vertex_to_vertex>
+  {
+    typedef Iterator_project<DIso_vertex_iter, _Vertex_to_vertex>       Base;
+
+  public:
+    Isolated_vertex_iterator() {}
+
+    Isolated_vertex_iterator(DIso_vertex_iter iter) : Base(iter) {}
+
+    // Casting to a vertex iterator.
+    operator Vertex_iterator() const
+    { return (Vertex_iterator(DVertex_iter(this->ptr()))); }
+
+    operator Vertex_const_iterator() const
+    { return (Vertex_const_iterator(DVertex_const_iter(this->ptr()))); }
+  };
+
+  class Isolated_vertex_const_iterator :
+    public Iterator_project<DIso_vertex_const_iter, _Vertex_to_vertex>
+  {
+    typedef Iterator_project<DIso_vertex_const_iter, _Vertex_to_vertex>  Base;
+
+  public:
+    Isolated_vertex_const_iterator() {}
+
+    Isolated_vertex_const_iterator(Isolated_vertex_iterator iter) :
+      Base(iter)
+    {}
+
+    Isolated_vertex_const_iterator(DIso_vertex_const_iter iter) :
+      Base(iter)
+    {}
+
+    // Casting to a vertex iterator.
+    operator Vertex_const_iterator() const
+    { return (Vertex_const_iterator(DVertex_const_iter(this->ptr()))); }
+  };
+
+protected:
+  class _Valid_vertex_iterator :
+    public I_Filtered_iterator<DVertex_iter, _Is_valid_vertex, Vertex,
+                               DDifference, DIterator_category>
+  {
+    typedef I_Filtered_iterator<DVertex_iter, _Is_valid_vertex, Vertex,
+                                DDifference, DIterator_category> Base;
+
+  public:
+    _Valid_vertex_iterator() {}
+
+    _Valid_vertex_iterator(DVertex_iter iter, DVertex_iter iend,
+                           const _Is_valid_vertex& pred) :
+      Base(iter, iend, pred)
+    {}
+
+    // Casting to a vertex iterator.
+    operator Vertex_iterator() const
+    { return (Vertex_iterator(DVertex_iter(this->current_iterator()))); }
+
+    operator Vertex_const_iterator() const
+    {
+      return (Vertex_const_iterator(DVertex_const_iter
+                                    (this->current_iterator())));
+    }
+  };
+
+public:
+  // Definition of handles (equivalent to iterators):
+  typedef Vertex_iterator              Vertex_handle;
+  typedef Halfedge_iterator            Halfedge_handle;
+  typedef Face_iterator                Face_handle;
+
+  typedef Vertex_const_iterator        Vertex_const_handle;
+  typedef Halfedge_const_iterator      Halfedge_const_handle;
+  typedef Face_const_iterator          Face_const_handle;
+
+  /*! \class
+   * The arrangement vertex class.
+   */
+  class Vertex : public DVertex {
+    typedef DVertex                     Base;
+
+  public:
+    /*! Default constrcutor. */
+    Vertex() {}
+
+    /*! Check whether the vertex lies on an open boundary. */
+    bool is_at_open_boundary() const { return (Base::has_null_point()); }
+
+    /*! Get the vertex degree (number of incident edges). */
+    Size degree() const
+    {
+      if (this->is_isolated())
+        return (0);
+
+      // Go around the vertex and count the incident halfedges.
+      const DHalfedge* he_first = Base::halfedge();
+      const DHalfedge* he_curr = he_first;
+      Size n = 0;
+
+      if (he_curr != NULL) {
+        do {
+          ++n;
+          he_curr = he_curr->next()->opposite();
+        } while (he_curr != he_first);
+      }
+      return (n);
+    }
+
+    /*!
+     * Get the incident halfedges (non-const version).
+     * \pre The vertex is not isolated.
+     */
+    Halfedge_around_vertex_circulator incident_halfedges()
+    {
+      CGAL_precondition(! this->is_isolated());
+      return Halfedge_around_vertex_circulator
+        (DHalfedge_iter(Base::halfedge()));
+    }
+
+    /*!
+     * Get the incident halfedges (const version).
+     * \pre The vertex is not isolated.
+     */
+    Halfedge_around_vertex_const_circulator incident_halfedges() const
+    {
+      CGAL_precondition(! this->is_isolated());
+      return Halfedge_around_vertex_const_circulator
+        (DHalfedge_const_iter(Base::halfedge()));
+    }
+
+    /*!
+     * Get the face that contains the vertex (non-const version).
+     * \pre The vertex is isolated.
+     */
+    Face_handle face()
+    {
+      CGAL_precondition(this->is_isolated());
+      return (DFace_iter(Base::isolated_vertex()->face()));
+    }
+
+    /*!
+     * Get the face that contains the vertex (const version).
+     * \pre The vertex is isolated.
+     */
+    Face_const_handle face() const
+    {
+      CGAL_precondition(this->is_isolated());
+      return (DFace_const_iter(Base::isolated_vertex()->face()));
+    }
+
+
+  private:
+    // Blocking access to inherited functions from the Dcel::Vertex.
+    bool has_null_point() const;
+    void set_point(Point_2* );
+    void set_boundary(Arr_parameter_space , Arr_parameter_space );
+    const DHalfedge* halfedge() const;
+    DHalfedge* halfedge();
+    void set_halfedge(DHalfedge* );
+    const DIso_vertex* isolated_vertex() const;
+    DIso_vertex* isolated_vertex();
+    void set_isolated_vertex(DIso_vertex* );
+  };
+
+  /*!
+   * \class The arrangement halfedge class.
+   */
+  class Halfedge : public DHalfedge {
+    typedef DHalfedge             Base;
+
+  public:
+    /*! Default constrcutor. */
+    Halfedge() {}
+
+    /*! Check whether the halfedge is fictitious. */
+    bool is_fictitious() const
+    { return (Base::has_null_curve()); }
+
+    /*! Get the source vertex (non-const version). */
+    Vertex_handle source()
+    { return (DVertex_iter(Base::opposite()->vertex())); }
+
+    /*! Get the source vertex (const version). */
+    Vertex_const_handle source() const
+    { return (DVertex_const_iter(Base::opposite()->vertex())); }
+
+    /*! Get the target vertex (non-const version). */
+    Vertex_handle target()
+    { return (DVertex_iter(Base::vertex())); }
+
+    /*! Get the target vertex (const version). */
+    Vertex_const_handle target() const
+    { return (DVertex_const_iter(Base::vertex())); }
+
+    /*! Get the incident face (non-const version). */
+    Face_handle face()
+    {
+      return (! Base::is_on_inner_ccb()) ?
+        DFace_iter(Base::outer_ccb()->face()) :
+        DFace_iter(Base::inner_ccb()->face());
+    }
+
+    /*! Get the incident face (const version). */
+    Face_const_handle face() const
+    {
+      return (! Base::is_on_inner_ccb()) ?
+        DFace_const_iter(Base::outer_ccb()->face()) :
+        DFace_const_iter(Base::inner_ccb()->face());
+    }
+
+    /*! Get the twin halfedge (non-const version). */
+    Halfedge_handle twin()
+    { return (DHalfedge_iter(Base::opposite())); }
+
+    /*! Get the twin halfedge (const version). */
+    Halfedge_const_handle twin() const
+    { return (DHalfedge_const_iter(Base::opposite())); }
+
+    /*! Get the previous halfegde in the chain (non-const version). */
+    Halfedge_handle prev()
+    { return (DHalfedge_iter(Base::prev())); }
+
+    /*! Get the previous halfegde in the chain (const version). */
+    Halfedge_const_handle prev() const
+    { return (DHalfedge_const_iter(Base::prev())); }
+
+    /*! Get the next halfegde in the chain (non-const version). */
+    Halfedge_handle next()
+    { return (DHalfedge_iter(Base::next())); }
+
+    /*! Get the next halfegde in the chain (const version). */
+    Halfedge_const_handle next() const
+    { return (DHalfedge_const_iter(Base::next())); }
+
+    /*! Get the connected component of the halfedge (non-const version). */
+    Ccb_halfedge_circulator ccb()
+    { return Ccb_halfedge_circulator(DHalfedge_iter(this)); }
+
+    /*! Get the connected component of the halfedge (const version). */
+    Ccb_halfedge_const_circulator ccb() const
+    { return Ccb_halfedge_const_circulator(DHalfedge_const_iter(this)); }
+
+  private:
+
+    // Blocking access to inherited functions from the Dcel::Halfedge.
+    bool has_null_curve() const;
+    void set_curve(X_monotone_curve_2* );
+    const DHalfedge* opposite() const;
+    DHalfedge* opposite();
+    void set_opposite(DHalfedge* );
+    void set_direction(Arr_halfedge_direction );
+    void set_prev(DHalfedge* );
+    void set_next(DHalfedge* );
+    const DVertex* vertex() const ;
+    DVertex* vertex();
+    void set_vertex(DVertex* );
+    const DOuter_ccb* outer_ccb() const;
+    DOuter_ccb* outer_ccb();
+    void set_outer_ccb(DOuter_ccb* );
+    const DInner_ccb* inner_ccb() const;
+    DInner_ccb* inner_ccb();
+    void set_inner_ccb(DInner_ccb* );
+  };
+
+  /*!
+   * \class The arrangement face class.
+   */
+  class Face : public DFace {
+    typedef DFace                 Base;
+
+  public:
+    /*! Default constrcutor. */
+    Face() {}
+
+    /*! Get an iterator for the outer CCBs of the face (non-const version). */
+    Outer_ccb_iterator outer_ccbs_begin()
+    { return (DOuter_ccb_iter(Base::outer_ccbs_begin())); }
+
+    /*! Get an iterator for the outer CCBs the face (const version). */
+    Outer_ccb_const_iterator outer_ccbs_begin() const
+    { return (DOuter_ccb_const_iter(Base::outer_ccbs_begin())); }
+
+    /*! Get a past-the-end iterator for the outer CCBs (non-const version). */
+    Outer_ccb_iterator outer_ccbs_end()
+    { return (DOuter_ccb_iter(Base::outer_ccbs_end())); }
+
+    /*! Get a past-the-end iterator for the outer CCBs (const version). */
+    Outer_ccb_const_iterator outer_ccbs_end() const
+    { return (DOuter_ccb_const_iter(Base::outer_ccbs_end())); }
+
+    /*! Get an iterator for the inner CCBs of the face (non-const version). */
+    Inner_ccb_iterator inner_ccbs_begin()
+    { return (DInner_ccb_iter(Base::inner_ccbs_begin())); }
+
+    /*! Get an iterator for the inner CCBs the face (const version). */
+    Inner_ccb_const_iterator inner_ccbs_begin() const
+    { return (DInner_ccb_const_iter(Base::inner_ccbs_begin())); }
+
+    /*! Get a past-the-end iterator for the inner CCBs (non-const version). */
+    Inner_ccb_iterator inner_ccbs_end()
+    { return (DInner_ccb_iter(Base::inner_ccbs_end())); }
+
+    /*! Get a past-the-end iterator for the inner CCBs (const version). */
+    Inner_ccb_const_iterator inner_ccbs_end() const
+    { return (DInner_ccb_const_iter(Base::inner_ccbs_end())); }
+
+    /*! Get an iterator for the isolated_vertices inside the face
+     * (non-const version).
+     */
+    Isolated_vertex_iterator isolated_vertices_begin()
+    { return (DIso_vertex_iter(Base::isolated_vertices_begin())); }
+
+    /*! Get an iterator for the isolated_vertices inside the face
+     * (const version).
+     */
+    Isolated_vertex_const_iterator isolated_vertices_begin() const
+    { return (DIso_vertex_const_iter(Base::isolated_vertices_begin())); }
+
+    /*! Get a past-the-end iterator for the isolated_vertices
+     * (non-const version).
+     */
+    Isolated_vertex_iterator isolated_vertices_end()
+    { return (DIso_vertex_iter(Base::isolated_vertices_end())); }
+
+    /*! Get a past-the-end iterator for the isolated_vertices
+     * (const version).
+     */
+    Isolated_vertex_const_iterator isolated_vertices_end() const
+    { return (DIso_vertex_const_iter(Base::isolated_vertices_end())); }
+
+    /// \name These functions are kept for Arrangement_2 compatibility:
+    //@{
+
+    /*!
+     * Check whether the face has an outer CCB.
+     */
+    bool has_outer_ccb() const
+    { return (Base::number_of_outer_ccbs() > 0); }
+
+    /*!
+     * Get a circulator for the outer boundary (non-const version).
+     * \pre The face has a single outer CCB.
+     */
+    Ccb_halfedge_circulator outer_ccb()
+    {
+      CGAL_precondition(Base::number_of_outer_ccbs() == 1);
+
+      DOuter_ccb_iter iter = Base::outer_ccbs_begin();
+      DHalfedge* he = *iter;
+      return Ccb_halfedge_circulator(DHalfedge_iter(he));
+    }
+
+    /*!
+     * Get a circulator for the outer boundary (const version).
+     * \pre The face has a single outer CCB.
+     */
+    Ccb_halfedge_const_circulator outer_ccb() const
+    {
+      CGAL_precondition(Base::number_of_outer_ccbs() == 1);
+
+      DOuter_ccb_const_iter iter = Base::outer_ccbs_begin();
+      const DHalfedge* he = *iter;
+      return Ccb_halfedge_const_circulator(DHalfedge_const_iter(he));
+    }
+
+    /*! Get the number of holes (inner CCBs) inside the face. */
+    Size number_of_holes() const
+    { return (Base::number_of_inner_ccbs()); }
+
+    /*! Get an iterator for the holes inside the face (non-const version). */
+    Inner_ccb_iterator holes_begin()
+    { return (this->inner_ccbs_begin()); }
+
+    /*! Get an iterator for the holes inside the face (const version). */
+    Inner_ccb_const_iterator holes_begin() const
+    { return (this->inner_ccbs_begin()); }
+
+    /*! Get a past-the-end iterator for the holes (non-const version). */
+    Inner_ccb_iterator holes_end()
+    { return (this->inner_ccbs_end()); }
+
+    /*! Get a past-the-end iterator for the holes (const version). */
+    Inner_ccb_const_iterator holes_end() const
+    { return (this->inner_ccbs_end()); }
+    //@}
+
+  private:
+    // Blocking access to inherited functions from the Dcel::Face.
+    void set_unbounded(bool);
+    void set_fictitious(bool);
+    void add_outer_ccb(DOuter_ccb*, Halfedge*);
+    void erase_outer_ccb(DOuter_ccb*);
+    void add_inner_ccb(DInner_ccb*, Halfedge*);
+    void erase_inner_ccb(DInner_ccb*);
+    void add_isolated_vertex(DIso_vertex*, DVertex*);
+    void erase_isolated_vertex(DIso_vertex*);
+  };
+
+protected:
+  typedef CGAL_ALLOCATOR(Point_2)                 Points_alloc;
+  typedef CGAL_ALLOCATOR(X_monotone_curve_2)      Curves_alloc;
+
+  typedef Arr_observer<Self>                      Observer;
+  typedef std::list<Observer*>                    Observers_container;
+  typedef typename Observers_container::iterator  Observers_iterator;
+
+  typedef typename Observers_container::reverse_iterator
+                                                  Observers_rev_iterator;
+
+  // Data members:
+  Topology_traits         m_topol_traits;  // the topology traits.
+  Points_alloc            m_points_alloc;  // allocator for the points.
+  Curves_alloc            m_curves_alloc;  // allocator for the curves.
+  Observers_container     m_observers;     // pointers to existing observers.
+  const Traits_adaptor_2* m_geom_traits;   // the geometry-traits adaptor.
+  bool                    m_own_traits;    // inidicates whether the geometry
+                                           // traits should be freed up.
+
+public:
+  /// \name Constructors.
+  //@{
+
+  /*! Default constructor. */
+  Arrangement_on_surface_2();
+
+  /*! Copy constructor. */
+  Arrangement_on_surface_2(const Self & arr);
+
+  /*! Constructor given a traits object. */
+  Arrangement_on_surface_2(const Geometry_traits_2* geom_traits);
+  //@}
+
+  /// \name Assignment functions.
+  //@{
+
+  /*! Assignment operator. */
+  Self& operator=(const Self& arr);
+
+  /*! Assign an arrangement. */
+  void assign(const Self& arr);
+  //@}
+
+  /// \name Destruction functions.
+  //@{
+
+  /*! Destructor. */
+  virtual ~Arrangement_on_surface_2();
+
+  /*! Clear the arrangement. */
+  virtual void clear();
+  //@}
+
+  /// \name Access the traits-class objects.
+  //@{
+
+  /*! Access the geometry-traits object (const version). */
+  inline const Traits_adaptor_2* traits_adaptor() const
+  { return (m_geom_traits); }
+
+  /*! Access the geometry-traits object (const version). */
+  inline const Geometry_traits_2* geometry_traits() const
+  { return (m_geom_traits); }
+
+  /*! Access the topology-traits object (non-const version). */
+  inline Topology_traits* topology_traits()
+  { return (&m_topol_traits); }
+
+  /*! Access the topology-traits object (const version). */
+  inline const Topology_traits* topology_traits() const
+  { return (&m_topol_traits); }
+  //@}
+
+  /// \name Access the arrangement dimensions.
+  //@{
+
+  /*! Check whether the arrangement is empty. */
+  bool is_empty() const
+  { return (m_topol_traits.is_empty_dcel()); }
+
+  /*!
+   * Check whether the arrangement is valid. In particular, check the
+   * validity of each vertex, halfedge and face, their incidence relations
+   * and the geometric properties of the arrangement.
+   */
+  bool is_valid() const;
+
+  /*! Get the number of arrangement vertices. */
+  Size number_of_vertices() const
+  { return (m_topol_traits.number_of_concrete_vertices()); }
+
+  /*! Get the number of isolated arrangement vertices. */
+  Size number_of_isolated_vertices() const
+  { return (_dcel().size_of_isolated_vertices()); }
+
+  /*! Get the number of arrangement halfedges (the result is always even). */
+  Size number_of_halfedges() const
+  { return (m_topol_traits.number_of_valid_halfedges()); }
+
+  /*! Get the number of arrangement edges. */
+  Size number_of_edges() const
+  { return (m_topol_traits.number_of_valid_halfedges() / 2); }
+
+  /*! Get the number of arrangement faces. */
+  Size number_of_faces() const
+  { return (m_topol_traits.number_of_valid_faces()); }
+
+  /*! Get the number of unbounded faces in the arrangement. */
+  Size number_of_unbounded_faces() const
+  {
+    Unbounded_face_const_iterator iter = unbounded_faces_begin();
+    Unbounded_face_const_iterator end = unbounded_faces_end();
+    Size n_unb = 0;
+
+    while (iter != end) {
+      ++n_unb;
+      ++iter;
+    }
+
+    return (n_unb);
+  }
+  //@}
+
+  /// \name Traversal functions for the arrangement vertices.
+  //@{
+
+  /*! Get an iterator for the first vertex in the arrangement. */
+  Vertex_iterator vertices_begin()
+  {
+    return (Vertex_iterator(_dcel().vertices_begin(), _dcel().vertices_end(),
+                            _Is_concrete_vertex(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end iterator for the arrangement vertices. */
+  Vertex_iterator vertices_end()
+  {
+    return (Vertex_iterator(_dcel().vertices_end(), _dcel().vertices_end(),
+                            _Is_concrete_vertex(&m_topol_traits)));
+  }
+
+  /*! Get a const iterator for the first vertex in the arrangement. */
+  Vertex_const_iterator vertices_begin() const
+  {
+    return (Vertex_const_iterator(_dcel().vertices_begin(),
+                                  _dcel().vertices_end(),
+                                  _Is_concrete_vertex(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end const iterator for the arrangement vertices. */
+  Vertex_const_iterator vertices_end() const
+  {
+    return (Vertex_const_iterator(_dcel().vertices_end(),
+                                  _dcel().vertices_end(),
+                                  _Is_concrete_vertex(&m_topol_traits)));
+  }
+  //@}
+
+  /// \name Traversal functions for the arrangement halfedges.
+  //@{
+
+  /*! Get an iterator for the first halfedge in the arrangement. */
+  Halfedge_iterator halfedges_begin()
+  {
+    return (Halfedge_iterator(_dcel().halfedges_begin(),
+                              _dcel().halfedges_end(),
+                              _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end iterator for the arrangement halfedges. */
+  Halfedge_iterator halfedges_end()
+  {
+    return (Halfedge_iterator(_dcel().halfedges_end(),
+                              _dcel().halfedges_end(),
+                              _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a const iterator for the first halfedge in the arrangement. */
+  Halfedge_const_iterator halfedges_begin() const
+  {
+    return (Halfedge_const_iterator(_dcel().halfedges_begin(),
+                                    _dcel().halfedges_end(),
+                                    _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end const iterator for the arrangement halfedges. */
+  Halfedge_const_iterator halfedges_end() const
+  {
+    return (Halfedge_const_iterator(_dcel().halfedges_end(),
+                                    _dcel().halfedges_end(),
+                                    _Is_valid_halfedge(&m_topol_traits)));
+  }
+  //@}
+
+  /// \name Traversal functions for the arrangement edges.
+  //@{
+
+  /*! Get an iterator for the first edge in the arrangement. */
+  Edge_iterator edges_begin()
+  {
+    return (Edge_iterator(_dcel().edges_begin(), _dcel().edges_end(),
+                          _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end iterator for the arrangement edges. */
+  Edge_iterator edges_end()
+  {
+    return (Edge_iterator(_dcel().edges_end(), _dcel().edges_end(),
+                          _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a const iterator for the first edge in the arrangement. */
+  Edge_const_iterator edges_begin() const
+  {
+    return (Edge_const_iterator(_dcel().edges_begin(), _dcel().edges_end(),
+                                _Is_valid_halfedge(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end const iterator for the arrangement edges. */
+  Edge_const_iterator edges_end() const
+  {
+    return (Edge_const_iterator(_dcel().edges_end(), _dcel().edges_end(),
+                                _Is_valid_halfedge(&m_topol_traits)));
+  }
+  //@}
+
+  /// \name Traversal functions for the arrangement faces.
+  //@{
+
+  /*! Get an iterator for the first face in the arrangement. */
+  Face_iterator faces_begin()
+  {
+    return (Face_iterator(_dcel().faces_begin(), _dcel().faces_end(),
+                          _Is_valid_face(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end iterator for the arrangement faces. */
+  Face_iterator faces_end()
+  {
+    return (Face_iterator(_dcel().faces_end(), _dcel().faces_end(),
+                          _Is_valid_face(&m_topol_traits)));
+  }
+
+  /*! Get a const iterator for the first face in the arrangement. */
+  Face_const_iterator faces_begin() const
+  {
+    return (Face_const_iterator(_dcel().faces_begin(), _dcel().faces_end(),
+                                _Is_valid_face(&m_topol_traits)));
+  }
+
+  /*! Get a past-the-end const iterator for the arrangement faces. */
+  Face_const_iterator faces_end() const
+  {
+    return (Face_const_iterator(_dcel().faces_end(), _dcel().faces_end(),
+                                _Is_valid_face(&m_topol_traits)));
+  }
+
+  //! reference_face (const version).
+  /*! The function returns a reference face of the arrangement.
+   * All reference faces of arrangements of the same type have a common
+   * point.
+   * \return A const handle to the reference face.
+   */
+  Face_const_handle reference_face() const
+  {
+    return _const_handle_for(this->topology_traits()->reference_face());
+  }
+
+  //! reference_face (non-const version).
+  /*! The function returns a reference face of the arrangement.
+    All reference faces of arrangements of the same type have a common
+    point.
+    \return A handle to the reference face.
+  */
+  Face_handle reference_face()
+  { return _handle_for(this->topology_traits()->reference_face()); }
+
+  //@}
+
+  /// \name Traversal functions for the unbounded faces of the arrangement.
+  //@{
+
+  /*! Get an iterator for the first unbounded face in the arrangement. */
+  Unbounded_face_iterator unbounded_faces_begin()
+  {
+    return Unbounded_face_iterator(_dcel().faces_begin(), _dcel().faces_end(),
+                                   _Is_unbounded_face(&m_topol_traits));
+  }
+
+  /*! Get a past-the-end iterator for the unbounded arrangement faces. */
+  Unbounded_face_iterator unbounded_faces_end()
+  {
+    return Unbounded_face_iterator(_dcel().faces_end(), _dcel().faces_end(),
+                                   _Is_unbounded_face(&m_topol_traits));
+  }
+
+  /*! Get a const iterator for the first unbounded face in the arrangement. */
+  Unbounded_face_const_iterator unbounded_faces_begin() const
+  {
+    return Unbounded_face_const_iterator(_dcel().faces_begin(),
+                                         _dcel().faces_end(),
+                                         _Is_unbounded_face(&m_topol_traits));
+  }
+
+  /*! Get a past-the-end const iterator for the unbounded arrangement faces. */
+  Unbounded_face_const_iterator unbounded_faces_end() const
+  {
+    return Unbounded_face_const_iterator(_dcel().faces_end(),
+                                         _dcel().faces_end(),
+                                         _Is_unbounded_face(&m_topol_traits));
+  }
+
+  /*! Get the fictitious face (non-const version). */
+  Face_handle fictitious_face()
+  {
+    // The fictitious contains all other faces in a single hole inside it.
+    return
+      Face_handle(const_cast<DFace*>(this->topology_traits()->initial_face()));
+  }
+
+  /*!
+   * Get the unbounded face (const version).
+   * The fictitious contains all other faces in a single hole inside it.
+   */
+  Face_const_handle fictitious_face() const
+  { return DFace_const_iter(this->topology_traits()->initial_face()); }
+  //@}
+
+  /// \name Casting away constness for handle types.
+  //@{
+  Vertex_handle non_const_handle(Vertex_const_handle vh)
+  {
+    DVertex* p_v = (DVertex*)&(*vh);
+    return (Vertex_handle(p_v));
+  }
+
+  Halfedge_handle non_const_handle(Halfedge_const_handle hh)
+  {
+    DHalfedge* p_he = (DHalfedge*)&(*hh);
+    return (Halfedge_handle(p_he));
+  }
+
+  Face_handle non_const_handle(Face_const_handle fh)
+  {
+    DFace* p_f = (DFace*) &(*fh);
+    return (Face_handle(p_f));
+  }
+  //@}
+
+  /// \name Specilaized insertion functions.
+  //@{
+
+  /*!
+   * Insert a point that forms an isolated vertex in the interior of a given
+   * face.
+   * \param p The given point.
+   * \param f The face into which we insert the new isolated vertex.
+   * \return A handle for the isolated vertex that has been created.
+   */
+  Vertex_handle insert_in_face_interior(const Point_2& p, Face_handle f);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement as a new hole (inner
+   * component) inside the given face.
+   * \param cv The given x-monotone curve.
+   * \param f The face into which we insert the new hole.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve, directed (lexicographically) from left to right.
+   */
+  Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv,
+                                          Face_handle f);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that its left
+   * endpoint corresponds to a given arrangement vertex.
+   * \param cv The given x-monotone curve.
+   * \param v The given vertex.
+   * \param f The face that contains v (in case it has no incident edges).
+   * \pre The left endpoint of cv is incident to the vertex v.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve, whose target is the new vertex.
+   */
+  Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv,
+                                          Vertex_handle v,
+                                          Face_handle f = Face_handle());
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that its left
+   * endpoints corresponds to a given arrangement vertex, given the exact
+   * place for the curve in the circular list around this vertex.
+   * \param cv The given x-monotone curve.
+   * \param prev The reference halfedge. We should represent cv as a pair
+   *             of edges, one of them should become prev's successor.
+   * \pre The target vertex of prev is cv's left endpoint.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve, whose target is the new vertex that was created.
+   */
+  Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv,
+                                          Halfedge_handle prev);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that its right
+   * endpoint corresponds to a given arrangement vertex.
+   * \param cv The given x-monotone curve.
+   * \param v The given vertex.
+   * \param f The face that contains v (in case it has no incident edges).
+   * \pre The right endpoint of cv is incident to the vertex v.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve, whose target is the new vertex.
+   */
+  Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv,
+                                           Vertex_handle v,
+                                           Face_handle f = Face_handle());
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that its right
+   * endpoints corresponds to a given arrangement vertex, given the exact
+   * place for the curve in the circular list around this vertex.
+
+   * \param cv The given x-monotone curve.
+   * \param prev The reference halfedge. We should represent cv as a pair
+   *             of edges, one of them should become prev's successor.
+   * \pre The target vertex of prev is cv's right endpoint.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve, whose target is the new vertex that was created.
+   */
+  Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv,
+                                           Halfedge_handle prev);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that both its
+   * endpoints correspond to given arrangement vertices.
+   * \param cv The given x-monotone curve.
+   * \param v1 The first vertex.
+   * \param v2 The second vertex.
+   * \param f The face that contains v1 and v2
+   *          (in case both have no incident edges).
+   * \pre v1 and v2 corresponds to cv's endpoints.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve directed from v1 to v2.
+   */
+  Halfedge_handle insert_at_vertices(const X_monotone_curve_2& cv,
+                                     Vertex_handle v1,
+                                     Vertex_handle v2,
+                                     Face_handle f = Face_handle());
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that both its
+   * endpoints correspond to given arrangement vertices, given the exact
+   * place for the curve in one of the circular lists around a vertex.
+   * \param cv The given x-monotone curve.
+   * \param prev1 The reference halfedge for the first vertex.
+   * \param v2 The second vertex.
+   * \pre The target vertex of prev1 and v2 corresponds to cv's endpoints.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve directed from prev1 to v2.
+   */
+  Halfedge_handle insert_at_vertices(const X_monotone_curve_2& cv,
+                                     Halfedge_handle prev1,
+                                     Vertex_handle v2);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that both its
+   * endpoints correspond to given arrangement vertices, given the exact
+   * place for the curve in both circular lists around these two vertices.
+   * \param cv the given curve.
+   * \param prev1 The reference halfedge for the first vertex.
+   * \param prev2 The reference halfedge for the second vertex.
+   * \pre The target vertices of prev1 and prev2 are cv's endpoints.
+   * \return A handle for one of the halfedges corresponding to the inserted
+   *         curve directed from prev1's target to prev2's target.
+   */
+  Halfedge_handle insert_at_vertices(const X_monotone_curve_2 & cv,
+                                     Halfedge_handle prev1,
+                                     Halfedge_handle prev2);
+
+  //@}
+
+  /// \name Vertex manipulation functions.
+  //@{
+
+  /*!
+   * Replace the point associated with the given vertex.
+   * \param v The vertex to modify.
+   * \param p The point that should be associated with the edge.
+   * \pre p is geometrically equivalent to the current point
+   *      associated with v.
+   * \return A handle for a the modified vertex (same as v).
+   */
+  Vertex_handle modify_vertex(Vertex_handle v, const Point_2& p);
+
+  /*!
+   * Remove an isolated vertex from the interior of a given face.
+   * \param v The vertex to remove.
+   * \pre v is an isolated vertex (it has no incident halfedges).
+   * \return A handle for the face containing v.
+   */
+  Face_handle remove_isolated_vertex(Vertex_handle v);
+
+  ///@}
+
+  /// \name Halfedge manipulation functions.
+  //@{
+
+  /*!
+   * Replace the x-monotone curve associated with the given edge.
+   * \param e The edge to modify.
+   * \param cv The curve that should be associated with the edge.
+   * \pre cv is geometrically equivalent to the current curve
+   *      associated with e.
+   * \return A handle for a the modified halfedge (same as e).
+   */
+  Halfedge_handle modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv);
+
+  /*!
+   * Split a given edge into two, and associate the given x-monotone
+   * curves with the split edges.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param cv1 The curve that should be associated with the first split edge.
+   * \param cv2 The curve that should be associated with the second split edge.
+
+   * \pre cv1's source and cv2's target equal the endpoints of the curve
+   *      currently assoicated with e (respectively), and cv1's target equals
+   *      cv2's target, and this is the split point (ot vice versa).
+   * \return A handle for the halfedge whose source is the source of the the
+   *         original halfedge e, and whose target is the split point.
+   */
+  Halfedge_handle split_edge(Halfedge_handle e,
+                             const X_monotone_curve_2& cv1,
+                             const X_monotone_curve_2& cv2);
+
+  /*!
+   * Merge two edges to form a single edge, and associate the given x-monotone
+   * curve with the merged edge.
+   * \param e1 The first edge to merge (one of the pair of twin halfegdes).
+   * \param e2 The second edge to merge (one of the pair of twin halfegdes).
+   * \param cv The curve that should be associated with merged edge.
+   * \return A handle for the merged halfedge.
+   */
+  Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2,
+                             const X_monotone_curve_2& cv);
+
+  /*!
+   * Remove an edge from the arrangement.
+   * \param e The edge to remove (one of the pair of twin halfegdes).
+   * \param remove_source Should the source vertex of e be removed if it
+   *                      becomes isolated (true by default).
+   * \param remove_target Should the target vertex of e be removed if it
+   *                      becomes isolated (true by default).
+   * \return A handle for the remaining face.
+   */
+  Face_handle remove_edge(Halfedge_handle e,
+                          bool remove_source = true,
+                          bool remove_target = true);
+
+  //@}
+
+protected:
+  /// \name Determining the boundary-side conditions.
+  //@{
+
+  /*! Determines whether a boundary-side categoty indicates an open side.
+   */
+  inline bool is_open(Arr_boundary_side_tag) const { return false; }
+  inline bool is_open(Arr_open_side_tag) const { return true; }
+
+  /*! Determines whether the given x and y parameter spaces are open.
+   * These parameter spaces are typically associated with a particular curve
+   * end.
+   * \param ps_x The parameter space in x.
+   * \param ps_y The parameter space in y.
+   */
+  inline bool is_open(Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
+  {
+    return
+      (((ps_x == ARR_LEFT_BOUNDARY) && is_open(Left_side_category())) ||
+       ((ps_x == ARR_RIGHT_BOUNDARY) && is_open(Right_side_category())) ||
+       ((ps_y == ARR_BOTTOM_BOUNDARY) && is_open(Bottom_side_category())) ||
+       ((ps_y == ARR_TOP_BOUNDARY) && is_open(Top_side_category())));
+
+  }
+
+  /*! Determines whether a boundary-side categoty indicates a constracted side.
+   */
+  inline bool is_contracted(Arr_boundary_side_tag) const { return false; }
+  inline bool is_contracted(Arr_contracted_side_tag) const { return true; }
+
+  /*! Determines whether a boundary-side categoty indicates a constracted side.
+   */
+  inline bool is_identified(Arr_boundary_side_tag) const { return false; }
+  inline bool is_identified(Arr_identified_side_tag) const { return true; }
+  //@}
+
+  /// \name Allocating and de-allocating points and curves.
+  //@{
+
+  /*! Allocate a new point. */
+  Point_2*_new_point(const Point_2& pt)
+  {
+    Point_2* p_pt = m_points_alloc.allocate(1);
+
+    m_points_alloc.construct(p_pt, pt);
+    return (p_pt);
+  }
+
+  /*! De-allocate a point. */
+  void _delete_point(Point_2& pt)
+  {
+    Point_2* p_pt = &pt;
+
+    m_points_alloc.destroy(p_pt);
+    m_points_alloc.deallocate(p_pt, 1);
+  }
+
+  /*! Allocate a new curve. */
+  X_monotone_curve_2* _new_curve(const X_monotone_curve_2& cv)
+  {
+    X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1);
+    m_curves_alloc.construct(p_cv, cv);
+    return (p_cv);
+  }
+
+  /*! De-allocate a curve. */
+  void _delete_curve(X_monotone_curve_2& cv)
+  {
+    X_monotone_curve_2* p_cv = &cv;
+
+    m_curves_alloc.destroy(p_cv);
+    m_curves_alloc.deallocate(p_cv, 1);
+  }
+  //@}
+
+  /// \name Converting handles to pointers (for the arrangement accessor).
+  //@{
+  /*! Access the DCEL (non-const version). */
+  inline Dcel& _dcel() { return (m_topol_traits.dcel()); }
+  /*! Access the DCEL (const version). */
+  inline const Dcel& _dcel() const
+  { return (m_topol_traits.dcel()); }
+
+  /*! Convert a vertex handle to a pointer to a DCEL vertex. */
+  inline DVertex* _vertex(Vertex_handle vh) const
+  { return (&(*vh)); }
+
+  /*! Convert a constant vertex handle to a pointer to a DCEL vertex. */
+  inline const DVertex* _vertex(Vertex_const_handle vh) const
+  { return (&(*vh)); }
+
+  /*! Convert a halfedge handle to a pointer to a DCEL halfedge. */
+  inline DHalfedge* _halfedge(Halfedge_handle hh) const
+  { return (&(*hh)); }
+
+  /*! Convert a constant halfedge handle to a pointer to a DCEL halfedge. */
+  inline const DHalfedge* _halfedge(Halfedge_const_handle hh) const
+  { return (&(*hh)); }
+
+  /*! Convert a face handle to a pointer to a DCEL face. */
+  inline DFace* _face(Face_handle fh) const
+  { return (&(*fh)); }
+
+  /*! Convert a constant face handle to a pointer to a DCEL face. */
+  inline const DFace* _face(Face_const_handle fh) const
+  { return (&(*fh)); }
+  //@}
+
+  /// \name Converting pointers to handles (for the arrangement accessor).
+  //@{
+
+  /*! Convert a pointer to a DCEL vertex to a vertex handle. */
+  Vertex_handle _handle_for(DVertex* v)
+  { return (Vertex_handle(v)); }
+
+  /*! Convert a pointer to a DCEL vertex to a constant vertex handle. */
+  Vertex_const_handle _const_handle_for(const DVertex* v) const
+  { return (Vertex_const_handle(v)); }
+
+  /*! Convert a pointer to a DCEL halfedge to a halfedge handle. */
+  Halfedge_handle _handle_for(DHalfedge* he)
+  { return (Halfedge_handle(he)); }
+
+
+  /*! Convert a pointer to a DCEL halfedge to a constant halfedge handle. */
+  Halfedge_const_handle _const_handle_for(const DHalfedge* he) const
+  { return (Halfedge_const_handle(he)); }
+
+  /*! Convert a pointer to a DCEL face to a face handle. */
+  Face_handle _handle_for(DFace* f)
+  { return (Face_handle(f)); }
+
+  /*! Convert a pointer to a DCEL face to a constant face handle. */
+  Face_const_handle _const_handle_for(const DFace* f) const
+  { return (Face_const_handle(f)); }
+  //@}
+
+  /// \name Auxiliary (protected) functions.
+  //@{
+
+  /*! Is the vertex incident to a given halfedge lexicographically smaller than
+   * the vertex incident to another given halfedge. Recall that the incident
+   * vertex is the target vertex. This function is used, for example, in the
+   * search for lexicographically smallest vertex in a CCB, when an edge is
+   * about to be removed from the DCEL.
+   *
+   * This is the implementation for the case where all 4 boundary sides are
+   * oblivious.
+   *
+   * \param he1 the given first halfedge
+   * \param ps_x1 the parameter space in x of the vertex incident to he1
+   * \param ps_y1 the parameter space in y of the vertex incident to he1
+   * \param he2 the given second halfedge
+   * \param ps_x2 the parameter space in x of the vertex incident to he2
+   * \param ps_y2 the parameter space in y of the vertex incident to he2
+   * \precondition he1 is directed from right to left
+   * \precondition he2 is directed from right to left
+   * \precondition the vertex incident to he1 (he1->vertex()) is different
+   *        than the vertex incident to he1 (he2->vertex()), and thus their
+   *        geometric mappings (he1->vertex()->point() and
+   *        he2->vertex()->point()) are not equal.
+   */
+  bool _is_smaller(const DHalfedge* he1,
+                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+                   const DHalfedge* he2,
+                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+                   Arr_all_sides_oblivious_tag) const;
+
+  /*! This is a wrapper for the case where any boundary side is not
+   * necessarily oblivious.
+   */
+  bool _is_smaller(const DHalfedge* he1,
+                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+                   const DHalfedge* he2,
+                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+                   Arr_not_all_sides_oblivious_tag) const;
+
+  /*! Is the lexicographically minimal vertex of a given x-monotone curve
+   * lexicographically smaller than the lexicographically minimal vertex of
+   * another given x-monotone curve. This function is used, for example, when
+   * a new curve is to be inserted into the arrangement. In this case the
+   * search is conducted over the curves that will comprise a new CCB.
+   *
+   * This is the implementation for the case where all 4 boundary sides are
+   * oblivious.
+   *
+   * \param cv1 the given first x-monotone curve
+   * \param ps_x1 the parameter space in x of the minimal point of cv1
+   * \param ps_y1 the parameter space in y of the minimal point of cv1
+   * \param cv2 the given second x-monotone curve
+   * \param ps_x2 the parameter space in x of the minimal point of cv2
+   * \param ps_y2 the parameter space in y of the minimal point of cv2
+   * \precondition the minimal points of cv1 and cv2 are not equal.
+   */
+  bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
+                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+                   const X_monotone_curve_2& cv2, const Point_2& p2,
+                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+                   Arr_all_sides_oblivious_tag) const;
+
+  /*! This is the implementation for the case where any one of the 4 boundary
+   * sides can be of any type.
+   */
+  bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1,
+                   Arr_parameter_space ps_x1, Arr_parameter_space ps_y1,
+                   const X_monotone_curve_2& cv2, const Point_2& p2,
+                   Arr_parameter_space ps_x2, Arr_parameter_space ps_y2,
+                   Arr_not_all_sides_oblivious_tag) const;
+
+  /*! Given two x-monotone curves that share their minimal end point.
+   * The function return true if the y-coordinate of the first curve curve
+   * near its minimal end smaller than the y-coordinate of the second curve
+   * (near its minimal end). This function is used, for example, when
+   * a new curve is to be inserted into the arrangement. In this case the
+   * search is conducted over the curves that will comprise a new CCB.
+   *
+   * This is the implementation for the case where all 4 boundary sides are
+   * oblivious.
+   *
+   * \param cv1 the given first x-monotone curve
+   * \param cv2 the given second x-monotone curve
+   * \param p the shared minimal point of cv1 and cv2
+   * \param ps_x the parameter space in x of the minimal point of cv1
+   * \param ps_y the parameter space in y of the minimal point of cv1
+   * \precondition the minimal points of cv1 and cv2 are equal.
+   */
+  bool _is_smaller_near_right(const X_monotone_curve_2& cv1,
+                              const X_monotone_curve_2& cv2,
+                              const Point_2& p,
+                              Arr_parameter_space ps_x,
+                              Arr_parameter_space ps_y,
+                              Arr_all_sides_oblivious_tag) const;
+
+  /*! This is the implementation for the case where any one of the 4 boundary
+   * sides can be of any type.
+   */
+  bool _is_smaller_near_right(const X_monotone_curve_2& cv1,
+                              const X_monotone_curve_2& cv2,
+                              const Point_2& p,
+                              Arr_parameter_space ps_x,
+                              Arr_parameter_space ps_y,
+                              Arr_not_all_sides_oblivious_tag) const;
+
+  /*!
+   * Locate the place for the given curve around the given vertex.
+   * \param v The given arrangement vertex.
+   * \param cv The given x-monotone curve.
+   * \param ind Whether we refer to the minimal or maximal end of cv.
+   * \return A pointer to a halfedge whose target is v, where cv should be
+   *         inserted between this halfedge and the next halfedge around this
+   *         vertex (in a clockwise order).
+   *         A NULL return value indicates a precondition violation.
+   */
+  DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv,
+                                   Arr_curve_end ind) const;
+
+  /*!
+   * Compute the distance (in halfedges) between two halfedges.
+   * \param e1 The source halfedge.
+   * \param e2 The destination halfedge.
+   * \pre e1 and e2 belong to the same connected component
+   * \return The number of halfedges along the component boundary between the
+   *         two halfedges.
+   */
+  unsigned int _halfedge_distance(const DHalfedge* e1,
+                                  const DHalfedge* e2) const;
+
+  /*!
+   * Compare the length of the induced paths from e1 to e2 and
+   *  from e2 to e1.
+   * \pre e1 and e2 belong to the same connected component
+   * \return The comparison result
+   */
+  Comparison_result _compare_induced_path_length(const DHalfedge* e1,
+                                                 const DHalfedge* e2) const;
+
+  /*
+   * Updates the indices according to boundary locations
+   */
+  void
+  _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
+                   Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
+                   int& x_index, int& y_index,  boost::mpl::bool_<true>) const;
+
+  /*
+   * Updates the indices according to boundary locations (i.e. does nothing)
+   */
+  void
+  _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
+                   Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next,
+                   int& x_index, int& y_index,  boost::mpl::bool_<false>) const;
+
+  /*
+   * Is the first given x-monotone curve above the second given?
+   * \param xcv1 the first given curve
+   * \param ps_y1 the parameter space in y of xcv1
+   * \param xcv2 the second given curve
+   * \param Arr_identified_side_tag used for dispatching to ensure that this
+   *        function is invoked when the bottom and top boundaries are
+   *        identified
+   */
+  bool _is_above(const X_monotone_curve_2& xcv1,
+                 const X_monotone_curve_2& xcv2,
+                 const Point_2& point,
+                 Arr_parameter_space ps_y1,
+                 Arr_has_identified_side_tag) const;
+
+  /*
+   * Is the first given x-monotone curve above the second given?
+   * \param xcv1 the first given curve
+   * \param ps_y1 the parameter space in y of xcv1
+   * \param xcv2 the second given curve
+   * \param Arr_contracted_side_tag used for dispatching to ensure that this
+   *        function is invoked when the bottom or top boundaries are
+   *        contracted
+   */
+  bool _is_above(const X_monotone_curve_2& xcv1,
+                 const X_monotone_curve_2& xcv2,
+                 const Point_2& point,
+                 Arr_parameter_space ps_y1,
+                 Arr_has_contracted_side_tag) const;
+
+  /*
+   * Is the first given x-monotone curve above the second given?
+   * \param xcv1 the first given curve
+   * \param ps_y1 the parameter space in y of xcv1
+   * \param xcv2 the second given curve
+   * \param Arr_oblivious_side_tag used for dispatching to ensure that this
+   *        function is invoked when the bottom and top boundaries are neither
+   *        identified nor contracted
+   */
+  bool _is_above(const X_monotone_curve_2& xcv1,
+                 const X_monotone_curve_2& xcv2,
+                 const Point_2& point,
+                 Arr_parameter_space ps_y1,
+                 Arr_boundary_cond_tag) const;
+
+  /*!
+   * Computes the signs (in left/right and bottom/top) of a path
+   * induced by the sequence he_to=>cv,cv_dir=>he_away, and reports
+   * as side-effect the halfedges pointing to local minima copied
+   * to an outputiterator.
+   * \param he_to The predecessor halfedge.
+   * \param cv The x-monotone curve we use to connect he_to's target and
+   *           he_away's source vertex.
+   * \param cv_dir the direction of the curve between he_to and he_away
+   * \param he_away The succcessor halfedge.
+   * \param local_mins_it the outputiterator
+   * (value_type = std::pair< DHalfedge*, int >, where the int denotes the
+   * index) to report the halfedges pointing to local minima (<-shaped
+   * situation)
+   * \return A pair of signs for the induced path (ZERO if non-perimetric,
+   * POSITIVE if perimetric ccb is oriented in positive direction,
+   * NEGATIVE if perimetric ccb is oriented in negative direction).
+   */
+  template <typename OutputIterator>
+  std::pair<Sign, Sign>
+  _compute_signs_and_local_minima(const DHalfedge* he_to,
+                                  const X_monotone_curve_2& cv,
+                                  Arr_halfedge_direction cv_dir,
+                                  const DHalfedge* he_away,
+                                  OutputIterator local_mins_it) const;
+
+  /*!
+   * Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
+   * represented by a given halfedge, and the halfedge pointing to the smallest
+   * vertex on the ccb.
+   * \param he The representative halfedge on the ccb.
+   * \param ps_x_min The parameter space in x of the smallest vertex.
+   * \param ps_y_min The parameter space in y of the smallest vertex.
+   * \param index_min The index of the smallest vertex.
+   * \return A pair of, a pair of signs for the induced path, and the halfedge
+   *     pointing to the smallest vertex.
+   *     A sign ZERO is if the ccb is non-perimetric,
+   *     POSITIVE if the ccb is perimetric and oriented in positive direction,
+   *     NEGATIVE if the ccb is perimetric and oriented in negative direction).
+   */
+  std::pair<std::pair<Sign, Sign>,  const DHalfedge*>
+  _compute_signs_and_min(const DHalfedge* he,
+                         Arr_parameter_space& ps_x_min,
+                         Arr_parameter_space& ps_y_min,
+                         int& index_min) const;
+
+  /*!
+   * Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
+   * represented by a given halfedge.
+   * \param he The representative halfedge on the ccb.
+   * \return A pair of signs for the induced path.
+   *     A sign ZERO is if the ccb is non-perimetric,
+   *     POSITIVE if the ccb is perimetric and oriented in positive direction,
+   *     NEGATIVE if the ccb is perimetric and oriented in negative direction).
+   */
+  std::pair<Sign, Sign> _compute_signs(const DHalfedge* he,
+                                       boost::mpl::bool_<true>) const;
+
+  /*! Compute the signs (in left/right and bottom/top) of a closed ccb (loop)
+   * represented by a given halfedge for the case where non of the boundaries
+   * is identified.
+   * \return the pair (ZERO, ZERO)
+   */
+  std::pair<Sign, Sign> _compute_signs(const DHalfedge* he,
+                                       boost::mpl::bool_<false>) const;
+
+  /*!
+   * Given two predecessor halfedges that will be used for inserting a
+   * new halfedge pair (he_to is the predecessor of the directed curve
+   * cv, cv_dir and he_away will be the successor), such that the
+   * insertion will create a new face that forms a hole inside an existing
+   * face, determine whether he_to=>cv,cv_dir=>he_away will be part
+   * of the new outer ccb of the new face.
+   * \param he_to The predecessor halfedge.
+   * \param cv The x-monotone curve we use to connect he_to's target and
+   *           he_away's source vertex.
+   * \param cv_dir the direction of the curve between he_to and he_away
+   * \param he_away The succcessor halfedge.
+   * \pre he_to and he_away belong to the same inner CCB.
+   * \return true if he_to=>cv,cv_dir=>he_away lie in the interior of the face we
+   *         are about to create (i.e.~are part of the new outer ccb),
+   *         false otherwise - in which case the subsequence
+   *         he_away->next()=>cv,opposite(cv_dir)=>he_to->next()
+   *         must be incident to this new face (i.e.~are part
+   *         of the new outer ccb).
+   */
+  template <typename InputIterator>
+  bool _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
+                                      const X_monotone_curve_2& cv,
+                                      const DHalfedge* he_away,
+                                      InputIterator lm_begin,
+                                      InputIterator lm_end) const;
+
+  /*!
+   * Move a given outer CCB from one face to another.
+   * \param from_face The face currently containing the component.
+   * \param to_face The face into which we should move the component.
+   * \param he A halfedge lying on the outer component.
+   */
+  void _move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he);
+
+  /*!
+   * Move a given inner CCB (hole) from one face to another.
+   * \param from_face The face currently containing the component.
+   * \param to_face The face into which we should move the component.
+   * \param he A halfedge lying on the inner component.
+   */
+  void _move_inner_ccb(DFace* from_face, DFace* to_face, DHalfedge* he);
+
+  /*!
+   * Move all inner CCBs (holes) from one face to another.
+   * \param from_face The face currently containing the components.
+   * \param to_face The face into which we should move the components.
+   */
+  void _move_all_inner_ccb(DFace* from_face, DFace* to_face);
+
+  /*!
+   * Insert the given vertex as an isolated vertex inside the given face.
+   * \param f The face that should contain the isolated vertex.
+   * \param v The isolated vertex.
+   */
+  void _insert_isolated_vertex(DFace* f, DVertex* v);
+
+  /*!
+   * Move a given isolated vertex from one face to another.
+   * \param from_face The face currently containing the isolated vertex.
+   * \param to_face The face into which we should move the isolated vertex.
+   * \param v The isolated vertex.
+   */
+  void _move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v);
+
+  /*!
+   * Move all isolated vertices from one face to another.
+   * \param from_face The face currently containing the isolated vertices.
+   * \param to_face The face into which we should move the isolated vertices.
+   */
+  void _move_all_isolated_vertices(DFace* from_face, DFace* to_face);
+
+  /*!
+   * Create a new vertex and associate it with the given point.
+   * \param p The point.
+   * \return A pointer to the newly created vertex.
+   */
+  DVertex* _create_vertex(const Point_2& p);
+
+  /*!
+   * Create a new boundary vertex.
+   * \param cv The curve incident to the boundary.
+   * \param ind The relevant curve-end.
+   * \param bx The boundary condition in x.
+   * \param by The boundary condition in y.
+   * \pre Either bx or by does not equal ARR_INTERIOR.
+   * \return A pointer to the newly created vertex.
+   */
+  DVertex* _create_boundary_vertex(const X_monotone_curve_2& cv,
+                                   Arr_curve_end ind,
+                                   Arr_parameter_space bx,
+                                   Arr_parameter_space by);
+
+  /*!
+   * Locate the DCEL features that will be used for inserting the given curve
+   * end, which has a boundary condition, and set a proper vertex there.
+   * \param f The face that contains the curve end.
+   * \param cv The x-monotone curve.
+   * \param ind The curve end.
+   * \param bx The boundary condition at the x-coordinate.
+   * \param by The boundary condition at the y-coordinate.
+   * \param p_pred Output: The predecessor halfedge around this vertex
+   *                       (may be NULL, if no such halfedge exists).
+   * \return The vertex that corresponds to the curve end.
+   */
+  DVertex* _place_and_set_curve_end(DFace* f,
+                                    const X_monotone_curve_2& cv,
+                                    Arr_curve_end ind,
+                                    Arr_parameter_space bx,
+                                    Arr_parameter_space by,
+                                    DHalfedge** p_pred);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that both its
+   * endpoints correspond to free arrangement vertices (newly created vertices
+   * or existing isolated vertices), so a new inner CCB is formed in the face
+   * that contains the two vertices.
+   * \param f The face containing the two end vertices.
+   * \param cv The given x-monotone curve.
+   * \param cv_dir The direction of the curve
+   * \param v1 The free vertex that corresponds to the left endpoint of cv.
+   * \param v2 The free vertex that corresponds to the right endpoint of cv.
+   * \return A pointer to one of the halfedges corresponding to the inserted
+   *         curve, directed from v1 to v2.
+   */
+  DHalfedge* _insert_in_face_interior(DFace* f,
+                                      const X_monotone_curve_2& cv,
+                                      Arr_halfedge_direction cv_dir,
+                                      DVertex* v1, DVertex* v2);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, such that one of its
+   * endpoints corresponds to a given arrangement vertex, given the exact
+   * place for the curve in the circular list around this vertex. The other
+   * endpoint corrsponds to a free vertex (a newly created vertex or an
+   * isolated vertex).
+   * \param he_to The reference halfedge. We should represent cv as a pair
+   *              of edges, one of them should become he_to's successor.
+   * \param cv The given x-monotone curve.
+   * \param cv_dir The direction of cv.
+   * \param v The free vertex that corresponds to the other endpoint.
+   * \return A pointer to one of the halfedges corresponding to the inserted
+   *         curve, whose target is the vertex v.
+   */
+  DHalfedge* _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
+                                 Arr_halfedge_direction cv_dir,
+                                 DVertex* v);
+
+  /*!
+   * Insert an x-monotone curve into the arrangement, where the end vertices
+   * are given by the target points of two given halfedges.
+   * The two halfedges should be given such that in case a new face is formed,
+   * it will be the incident face of the halfedge directed from the first
+   * vertex to the second vertex.
+   * \param he_to The reference halfedge pointing to the insertion vertex
+   * \param cv the given curve.
+   * \param cv_dir the direction of the curve
+   * \param he_away the reference halfedge for the second vertex.
+   * \param res the comparison result of the points associated with prev1's
+   *            target vertex and prev2's target vertex.
+   * \param new_face (Output) indicates whether a new face has been created.
+   * \param swapped_predecessors (Output) indicates whether roles of prev1 and
+   *                                      prev2 have been switched
+   * \param allow_swap_of_predecessors set to false if no swapping should
+   *                                   take place at all
+   * \return A pointer to one of the halfedges corresponding to the inserted
+   *         curve directed from prev1's target to prev2's target.
+   *         In case a new face has been created, it is given as the incident
+   *         face of this halfedge.
+   */
+  DHalfedge* _insert_at_vertices(DHalfedge* he_to,
+                                 const X_monotone_curve_2& cv,
+                                 Arr_halfedge_direction cv_dir,
+                                 DHalfedge* he_away,
+                                 bool& new_face,
+                                 bool& swapped_predecessors,
+                                 bool allow_swap_of_predecessors = true);
+
+  /*!
+   * Relocate all inner CCBs and isolated vertices to their proper position,
+   * immediately after a face has split due to the insertion of a new halfedge.
+   * \param new_he The new halfedge that caused the split, such that the new
+   *               face lies to its left and the old face to its right.
+   */
+  void _relocate_in_new_face(DHalfedge* new_he);
+
+  /*!
+   * Relocate all inner CCBs to their proper position,
+   * immediately after a face has split due to the insertion of a new halfedge.
+   * \param new_he The new halfedge that caused the split, such that the new
+   *               face lies to its left and the old face to its right.
+   */
+  void _relocate_inner_ccbs_in_new_face(DHalfedge* new_he);
+
+  /*!
+   * Relocate all  vertices to their proper position,
+   * immediately after a face has split due to the insertion of a new halfedge.
+   * \param new_he The new halfedge that caused the split, such that the new
+   *               face lies to its left and the old face to its right.
+   */
+  void _relocate_isolated_vertices_in_new_face(DHalfedge* new_he);
+
+  /*!
+   * Replace the point associated with the given vertex.
+   * \param v The vertex to modify.
+   * \param p The point that should be associated with the edge.
+   */
+  void _modify_vertex(DVertex* v, const Point_2& p);
+
+  /*!
+   * Replace the x-monotone curve associated with the given edge.
+   * \param e The edge to modify.
+   * \param cv The curve that should be associated with the edge.
+   */
+  void _modify_edge(DHalfedge* he, const X_monotone_curve_2& cv);
+
+  /*!
+   * Check if the given vertex represents one of the ends of a given curve.
+   * \param v The vertex.
+   * \param cv The curve.
+   * \param ind Indicates whether the minimal or the maximal end of cv is
+   *            refereed to.
+   * \return Whether v represents the left (or right) end of cv.
+   */
+  bool _are_equal(const DVertex* v,
+                  const X_monotone_curve_2& cv, Arr_curve_end ind) const;
+
+  /*!
+   * Split a given edge into two at a given point, and associate the given
+   * x-monotone curves with the split edges.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param p The split point.
+   * \param cv1 The curve that should be associated with the first split edge,
+   *            whose source equals e's source and its target is p.
+   * \param cv2 The curve that should be associated with the second split edge,
+   *            whose source is p and its target equals e's target.
+   * \return A pointer to the first split halfedge, whose source equals the
+   *         source of e, and whose target is the split point.
+   */
+  DHalfedge* _split_edge(DHalfedge* e, const Point_2& p,
+                         const X_monotone_curve_2& cv1,
+                         const X_monotone_curve_2& cv2);
+
+  /*!
+   * Split a given edge into two at a given vertex, and associate the given
+   * x-monotone curves with the split edges.
+   * \param e The edge to split (one of the pair of twin halfegdes).
+   * \param v The split vertex.
+   * \param cv1 The curve that should be associated with the first split edge,
+   *            whose source equals e's source and its target is v.
+   * \param cv2 The curve that should be associated with the second split edge,
+   *            whose source is v and its target equals e's target.
+   * \return A pointer to the first split halfedge, whose source equals the
+   *         source of e, and whose target is v.
+   */
+  DHalfedge* _split_edge(DHalfedge* e, DVertex* v,
+                         const X_monotone_curve_2& cv1,
+                         const X_monotone_curve_2& cv2);
+
+  /*!
+   * Remove a pair of twin halfedges from the arrangement.
+   * \param e One of the halfedges to be removed.
+   * \param remove_source Should the source vertex of e be removed if it
+   *                      becomes isolated.
+   * \param remove_target Should the target vertex of e be removed if it
+   *                      becomes isolated.
+   * \pre In case the removal causes the creation of a new inner CCB (hole),
+   *      e should point at this hole.
+   * \return A pointer to the remaining face.
+   */
+  DFace* _remove_edge(DHalfedge* e, bool remove_source, bool remove_target);
+
+  /*!
+   * Decides whether a hole is created when an edge is removed.
+   *
+   * \param signs1 signs of future ccb1
+   * \param signs2 signs of future ccb2
+   * \param same_face to he and he->opposite() belong to same face
+   * return true, in case a new hole is created, false otherwise
+   */
+  bool _hole_creation_on_edge_removal(std::pair< CGAL::Sign, CGAL::Sign > signs1,
+                                      std::pair< CGAL::Sign, CGAL::Sign > signs2,
+                                      bool same_face);
+
+  /*!
+   * Remove a vertex in case it becomes redundant after the deletion of an
+   * incident edge.
+   * \param v The vertex.
+   * \param f The face that contains v (in case it becomes isolated).
+   */
+  void _remove_vertex_if_redundant(DVertex* v, DFace* f);
+
+  /*!
+   * Remove an isolated vertex from the interior of its face (but not from
+   * the DCEL).
+   * \param v The isolated vertex to remove.
+   */
+  void _remove_isolated_vertex(DVertex* v);
+  //@}
+
+  /// \name Auxiliary (protected) functions for validity checking.
+  //@{
+
+  /*! Check the validity of a given vertex. */
+  bool _is_valid(Vertex_const_handle v) const;
+
+  /*! Check the validity of a given halfedge. */
+  bool _is_valid(Halfedge_const_handle he) const;
+
+  /*! Check the validity of a given face. */
+  bool _is_valid(Face_const_handle f) const;
+
+  /*! Check the validity of an outer CCB. */
+  bool _is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const;
+
+  /*! Check the validity of an inner CCB. */
+  bool _is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const;
+
+  /*!
+   * Check that all vertices are unique (no two vertices with the same
+   * geometric point.
+   */
+  bool _are_vertices_unique() const;
+
+  /*! Check that the curves around a given vertex are ordered clockwise. */
+  bool _are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const;
+
+  //@}
+
+protected:
+  /// \name Managing and notifying the arrangement observers.
+  //@{
+
+  /*!
+   * Register a new observer (so it starts receiving notifications).
+   * \param p_obs A pointer to the observer object.
+   */
+  void _register_observer(Observer* p_obs) { m_observers.push_back(p_obs); }
+
+  /*!
+   * Unregister a new observer (so it stops receiving notifications).
+   * \param p_obs A pointer to the observer object.
+   * \return Whether the observer was successfully unregistered.
+   */
+  bool _unregister_observer(Observer* p_obs)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+
+    for (iter = m_observers.begin(); iter != end; ++iter) {
+      if ((*iter) == p_obs) {
+        // Remove the p_ob pointer from the list of observers.
+        m_observers.erase (iter);
+        return true;
+      }
+    }
+
+    // If we reached here, the observer was not registered.
+    return false;
+  }
+
+protected:
+  /* Notify the observers on global arrangement operations: */
+
+  void _notify_before_assign(const Self& arr)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_assign(arr);
+  }
+
+  void _notify_after_assign()
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_assign();
+  }
+
+  void _notify_before_clear()
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_clear();
+  }
+
+  void _notify_after_clear()
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_clear();
+  }
+
+  void _notify_before_global_change()
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_global_change();
+  }
+
+  void _notify_after_global_change()
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_global_change();
+  }
+
+  /* Notify the observers on local changes in the arrangement: */
+
+  void _notify_before_create_vertex(const Point_2& p)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_create_vertex(p);
+  }
+
+  void _notify_after_create_vertex(Vertex_handle v)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_create_vertex(v);
+  }
+
+  void _notify_before_create_boundary_vertex(const X_monotone_curve_2& cv,
+                                             Arr_curve_end ind,
+                                             Arr_parameter_space bx,
+                                             Arr_parameter_space by)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_create_boundary_vertex(cv, ind, bx, by);
+  }
+
+  void _notify_after_create_boundary_vertex(Vertex_handle v)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_create_boundary_vertex(v);
+  }
+
+  void _notify_before_create_edge(const X_monotone_curve_2& c,
+                                  Vertex_handle v1, Vertex_handle v2)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_create_edge(c, v1, v2);
+  }
+
+  void _notify_after_create_edge(Halfedge_handle e)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_create_edge(e);
+  }
+
+  void _notify_before_modify_vertex(Vertex_handle v, const Point_2& p)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_modify_vertex(v, p);
+  }
+
+  void _notify_after_modify_vertex(Vertex_handle v)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_modify_vertex(v);
+  }
+
+  void _notify_before_modify_edge(Halfedge_handle e,
+                                  const X_monotone_curve_2& c)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_modify_edge(e, c);
+  }
+
+  void _notify_after_modify_edge(Halfedge_handle e)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_modify_edge(e);
+  }
+
+  void _notify_before_split_edge(Halfedge_handle e, Vertex_handle v,
+                                 const X_monotone_curve_2& c1,
+                                 const X_monotone_curve_2& c2)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_split_edge(e, v, c1, c2);
+  }
+
+  void _notify_after_split_edge(Halfedge_handle e1, Halfedge_handle e2)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_split_edge(e1, e2);
+  }
+
+  void _notify_before_split_fictitious_edge(Halfedge_handle e, Vertex_handle v)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_split_fictitious_edge(e, v);
+  }
+
+  void _notify_after_split_fictitious_edge(Halfedge_handle e1,
+                                           Halfedge_handle e2)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_split_fictitious_edge(e1, e2);
+  }
+
+  void _notify_before_split_face(Face_handle f, Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_split_face(f, e);
+  }
+
+  void _notify_after_split_face(Face_handle f, Face_handle new_f, bool is_hole)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_split_face(f, new_f, is_hole);
+  }
+
+  void _notify_before_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h,
+                                      Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_split_outer_ccb(f, h, e);
+  }
+
+  void _notify_after_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h1,
+                                     Ccb_halfedge_circulator h2)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_split_outer_ccb(f, h1, h2);
+  }
+
+  void _notify_before_split_inner_ccb(Face_handle f, Ccb_halfedge_circulator h,
+                                      Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_split_inner_ccb(f, h, e);
+  }
+
+  void _notify_after_split_inner_ccb(Face_handle f,
+                                     Ccb_halfedge_circulator h1,
+                                     Ccb_halfedge_circulator h2)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_split_inner_ccb(f, h1, h2);
+  }
+
+  void _notify_before_add_outer_ccb(Face_handle f, Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_add_outer_ccb(f, e);
+  }
+
+  void _notify_after_add_outer_ccb(Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_add_outer_ccb(h);
+  }
+
+  void _notify_before_add_inner_ccb(Face_handle f, Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_add_inner_ccb(f, e);
+  }
+
+  void _notify_after_add_inner_ccb(Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_add_inner_ccb(h);
+  }
+
+  void _notify_before_add_isolated_vertex(Face_handle f, Vertex_handle v)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_add_isolated_vertex(f, v);
+  }
+
+  void _notify_after_add_isolated_vertex(Vertex_handle v)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_add_isolated_vertex(v);
+  }
+
+  void _notify_before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
+                                 const X_monotone_curve_2& c)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_merge_edge(e1, e2, c);
+  }
+
+  void _notify_after_merge_edge(Halfedge_handle e)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_merge_edge(e);
+  }
+
+  void _notify_before_merge_fictitious_edge(Halfedge_handle e1,
+                                            Halfedge_handle e2)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_merge_fictitious_edge(e1, e2);
+  }
+
+  void _notify_after_merge_fictitious_edge(Halfedge_handle e)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_merge_fictitious_edge(e);
+  }
+
+  void _notify_before_merge_face(Face_handle f1, Face_handle f2,
+                                 Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_merge_face(f1, f2, e);
+  }
+
+  void _notify_after_merge_face(Face_handle f)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_merge_face(f);
+  }
+
+  void _notify_before_merge_outer_ccb(Face_handle f,
+                                      Ccb_halfedge_circulator h1,
+                                      Ccb_halfedge_circulator h2,
+                                      Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_merge_outer_ccb(f, h1, h2, e);
+  }
+
+  void _notify_after_merge_outer_ccb(Face_handle f,
+                                     Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_merge_outer_ccb(f, h);
+  }
+
+  void _notify_before_merge_inner_ccb(Face_handle f,
+                                      Ccb_halfedge_circulator h1,
+                                      Ccb_halfedge_circulator h2,
+                                      Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_merge_inner_ccb(f, h1, h2, e);
+  }
+
+  void _notify_after_merge_inner_ccb(Face_handle f,
+                                     Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_merge_inner_ccb(f, h);
+  }
+
+  void _notify_before_move_outer_ccb(Face_handle from_f,
+                                     Face_handle to_f,
+                                     Ccb_halfedge_circulator h)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_move_outer_ccb(from_f, to_f, h);
+  }
+
+  void _notify_after_move_outer_ccb(Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_move_outer_ccb(h);
+  }
+
+  void _notify_before_move_inner_ccb(Face_handle from_f,
+                                     Face_handle to_f,
+                                     Ccb_halfedge_circulator h)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_move_inner_ccb(from_f, to_f, h);
+  }
+
+  void _notify_after_move_inner_ccb(Ccb_halfedge_circulator h)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_move_inner_ccb(h);
+  }
+
+  void _notify_before_move_isolated_vertex(Face_handle from_f,
+                                           Face_handle to_f,
+                                           Vertex_handle v)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_move_isolated_vertex(from_f, to_f, v);
+  }
+
+
+  void _notify_after_move_isolated_vertex(Vertex_handle v)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_move_isolated_vertex(v);
+  }
+
+  void _notify_before_remove_vertex(Vertex_handle v)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_remove_vertex(v);
+  }
+
+  void _notify_after_remove_vertex()
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_remove_vertex();
+  }
+
+  void _notify_before_remove_edge(Halfedge_handle e)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_remove_edge(e);
+  }
+
+  void _notify_after_remove_edge()
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_remove_edge();
+  }
+
+  void _notify_before_remove_outer_ccb(Face_handle f, Ccb_halfedge_circulator h)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_remove_outer_ccb(f, h);
+  }
+
+  void _notify_after_remove_outer_ccb(Face_handle f)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_remove_outer_ccb(f);
+  }
+
+  void _notify_before_remove_inner_ccb(Face_handle f, Ccb_halfedge_circulator h)
+  {
+    Observers_iterator iter;
+    Observers_iterator end = m_observers.end();
+    for (iter = m_observers.begin(); iter != end; ++iter)
+      (*iter)->before_remove_inner_ccb(f, h);
+  }
+
+  void _notify_after_remove_inner_ccb(Face_handle f)
+  {
+    Observers_rev_iterator iter;
+    Observers_rev_iterator end = m_observers.rend();
+    for (iter = m_observers.rbegin(); iter != end; ++iter)
+      (*iter)->after_remove_inner_ccb(f);
+  }
+  //@}
+};
+
+//-----------------------------------------------------------------------------
+// Declarations of the various global insertion and removal functions.
+//-----------------------------------------------------------------------------
+
+// In some compilers there is a template deduction disambiguity between this
+// function and the following function receiving two InputIterator.
+// For now the solution is to add a dummy variable at the end (referring
+// to point-location). Maybe the proper solution is to use boost::enable_if
+// together with appropriate tag.
+/*!
+ * Insert a curve or x-monotone curve into the arrangement (incremental
+ * insertion).
+ * The inserted curve can be x-monotone (or not) and may intersect the
+ * existing arrangement.
+ * \param arr The arrangement.
+ * \param cv The curve to be inserted.
+ * \param pl A point-location object associated with the arrangement.
+ */
+template <typename GeomTraits, typename TopTraits, typename Curve,
+          typename PointLocation>
+void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+            const Curve& c, const PointLocation& pl,
+            typename PointLocation::Point_2* = 0);
+
+/*!
+ * Insert a curve or x-monotone curve into the arrangement (incremental
+ * insertion).
+ * The inserted curve can be x-monotone (or not) and may intersect the
+ * existing arrangement. The default "walk" point-location strategy is used
+ * for the curve insertion.
+ * \param arr The arrangement.
+ * \param cv The curve to be inserted.
+ */
+template <typename GeomTraits, typename TopTraits, typename Curve>
+void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+            const Curve& c);
+
+/*!
+ * Insert a range of curves or x-monotone curves into the arrangement
+ * (aggregated insertion).
+ * The inserted curves may intersect one another and may also intersect the
+ * existing arrangement.
+ * \param arr The arrangement.
+ * \param begin An iterator for the first curve in the range.
+ * \param end A past-the-end iterator for the curve range.
+ * \pre The value type of the iterators must be Curve_2.
+ */
+template <typename GeomTraits, typename TopTraits, typename InputIterator>
+void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+            InputIterator begin, InputIterator end);
+
+/*!
+ * Insert an x-monotone curve into the arrangement (incremental insertion)
+ * when the location of the left endpoint of the curve is known and is
+ * given as an isertion hint.
+ * The inserted x-monotone curve may intersect the existing arrangement.
+ * \param arr The arrangement.
+ * \param cv The x-monotone curve to be inserted.
+ * \param obj An object that represents the location of cv's left endpoint
+ *            in the arrangement.
+ */
+
+template <typename GeomTraits, typename TopTraits>
+void insert(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+            const typename GeomTraits::X_monotone_curve_2& c,
+            const Object& obj);
+
+/*!
+ * Insert an x-monotone curve into the arrangement, such that the curve
+ * interior does not intersect with any existing edge or vertex in the
+ * arragement (incremental insertion).
+ * \param arr The arrangement.
+ * \param c The x-monotone curve to be inserted.
+ * \param pl A point-location object associated with the arrangement.
+ * \pre The interior of c does not intersect any existing edge or vertex.
+ * \return A handle for one of the new halfedges corresponding to the
+ *         inserted curve, directed (lexicographically) from left to right.
+ */
+template <typename GeomTraits, typename TopTraits, typename PointLocation>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+insert_non_intersecting_curve
+(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+ const typename GeomTraits::X_monotone_curve_2& c,
+ const PointLocation& pl);
+
+/*!
+ * Insert an x-monotone curve into the arrangement, such that the curve
+ * interior does not intersect with any existing edge or vertex in the
+ * arragement (incremental insertion). The default point-location strategy
+ * is used for the curve insertion.
+ * \param arr The arrangement.
+ * \param c The x-monotone curve to be inserted.
+ * \pre The interior of c does not intersect any existing edge or vertex.
+ * \return A handle for one of the new halfedges corresponding to the inserted
+ *         curve, directed (lexicographically) from left to right.
+ */
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Halfedge_handle
+insert_non_intersecting_curve
+(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+ const typename GeomTraits::X_monotone_curve_2& c);
+
+/*!
+ * Insert a range of pairwise interior-disjoint x-monotone curves into
+ * the arrangement, such that the curve interiors do not intersect with
+ * any existing edge or vertex in the arragement (aggregated insertion).
+ * \param arr The arrangement.
+ * \param begin An iterator for the first x-monotone curve in the range.
+ * \param end A past-the-end iterator for the x-monotone curve range.
+ * \pre The value type of the iterators must be X_monotone_curve_2.
+ *      The curves in the range are pairwise interior-disjoint, and their
+ *      interiors do not intersect any existing edge or vertex.
+ */
+template <typename GeomTraits, typename TopTraits, typename InputIterator>
+void insert_non_intersecting_curves
+(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+ InputIterator begin, InputIterator end);
+
+/*!
+ * Remove an edge from the arrangement. In case it is possible to merge
+ * the edges incident to the end-vertices of the removed edge after its
+ * deletion, the function performs these merges as well.
+ * \param arr The arrangement.
+ * \param e The edge to remove (one of the pair of twin halfegdes).
+ * \return A handle for the remaining face.
+ */
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Face_handle
+remove_edge(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+            typename Arrangement_on_surface_2<GeomTraits,
+                                              TopTraits>::Halfedge_handle e);
+
+/*!
+ * Insert a vertex that corresponds to a given point into the arrangement.
+ * The inserted point may lie on any existing arrangement feature.
+ * \param arr The arrangement.
+ * \param p The point to be inserted.
+ * \param pl A point-location object associated with the arrangement.
+ * \return A handle to the vertex that corresponds to the given point.
+ */
+template <typename GeomTraits, typename TopTraits, typename PointLocation>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
+insert_point(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+             const typename GeomTraits::Point_2& p,
+             const PointLocation& pl);
+
+/*!
+ * Insert a vertex that corresponds to a given point into the arrangement.
+ * The inserted point may lie on any existing arrangement feature.
+ * \param arr The arrangement.
+ * \param p The point to be inserted.
+ * \return A handle to the vertex that corresponds to the given point.
+ */
+template <typename GeomTraits, typename TopTraits>
+typename Arrangement_on_surface_2<GeomTraits, TopTraits>::Vertex_handle
+insert_point(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+             const typename GeomTraits::Point_2& p);
+
+/*!
+ * Remove a vertex from the arrangement.
+ * \param arr The arrangement.
+ * \param v The vertex to remove.
+ * \return Whether the vertex has been removed or not.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool
+remove_vertex(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+              typename Arrangement_on_surface_2<GeomTraits,
+                                                TopTraits>::Vertex_handle v);
+
+
+/*!
+ * Check the validity of the arrangement. In particular, check that the
+ * edegs are disjoint-interior, and the holes are located in their proper
+ * position.
+ * \param arr The arrangement.
+ * \return Whether the arrangement is valid.
+ */
+template <typename GeomTraits, typename TopTraits>
+bool is_valid(const Arrangement_on_surface_2<GeomTraits, TopTraits>& arr);
+
+/*!
+ * Compute the zone of the given x-monotone curve in the existing arrangement.
+ * Meaning, it output the arrangment's vertices, edges and faces that the
+ * x-monotone curve intersects.
+ * \param arr The arrangement.
+ * \param c The x-monotone curve that its zone was computed.
+ * \param oi Output iterator of CGAL::Object to insert the zone elements to.
+ * \param pi The point location strategy that is used to locate the starting
+ * point.
+ * \return The output iterator that the curves were inserted to.
+ */
+template <typename GeomTraits, typename TopTraits,
+          typename OutputIterator, typename PointLocation>
+OutputIterator zone(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+                    const typename GeomTraits::X_monotone_curve_2& c,
+                    OutputIterator oi,
+                    const PointLocation& pl);
+
+/*!
+ * Compute the zone of the given x-monotone curve in the existing arrangement.
+ * Overloaded version with no point location object - the walk point-location
+ * strategy is used as default.
+ * \param arr The arrangement.
+ * \param c The x-monotone curve that its zone was computed.
+ * \param oi Output iterator of CGAL::Object to insert the zone elements to.
+ * \return The output iterator that the curves were inserted to.
+ */
+template <typename GeomTraits, typename TopTraits, typename OutputIterator>
+OutputIterator zone(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+                    const typename GeomTraits::X_monotone_curve_2& c,
+                    OutputIterator oi);
+
+/*!
+ * Checks if the given curve/x-monotone curve intersects the existing
+ * arrangement.
+ * \param arr The arrangement.
+ * \param c The curve/x-monotone curve.
+ * \param pi The point location strategy that is used to locate the starting
+ * point.
+ * \return True if the curve intersect the arrangement, false otherwise.
+ */
+template <typename GeomTraits, typename TopTraits, typename Curve,
+          typename PointLocation>
+bool do_intersect(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+                  const Curve& c, const PointLocation& pl);
+
+/*!
+ * Checks if the given curve/x-monotone curve intersects the existing
+ * arrangement.
+ * Overloaded version with no point location object - the walk point-location
+ * strategy is used as default.
+ * \param arr The arrangement.
+ * \param c The x-monotone curve/curve.
+ * \return True if the curve intersect the arrangement, false otherwise.
+ */
+template <typename GeomTraits, typename TopTraits, typename Curve>
+bool do_intersect(Arrangement_on_surface_2<GeomTraits, TopTraits>& arr,
+                  const Curve& c);
+
+} //namespace CGAL
+
+// The function definitions can be found under:
+#include <CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h>
+#include <CGAL/Arrangement_2/Arrangement_on_surface_2_global.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_on_surface_with_history_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_on_surface_with_history_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_on_surface_with_history_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_on_surface_with_history_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_with_history_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_with_history_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_with_history_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_with_history_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Arrangement_zone_2.h b/3rdparty/CGAL-4.8/include/CGAL/Arrangement_zone_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Arrangement_zone_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Arrangement_zone_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Barycentric_mapping_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_mapping_parameterizer_3.h
new file mode 100644
index 0000000..2ba0d2a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Barycentric_mapping_parameterizer_3.h
@@ -0,0 +1,180 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
+#define CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
+
+#include <CGAL/Fixed_border_parameterizer_3.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+#include <CGAL/Eigen_solver_traits.h>
+
+/// \file Barycentric_mapping_parameterizer_3.h
+
+namespace CGAL {
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class Barycentric_mapping_parameterizer_3 implements <i>Tutte Barycentric Mapping algorithm</i> \cgalCite{t-hdg-63}.
+/// This algorithm is also called <i>Tutte Uniform Weights</i> by other authors.
+///
+/// One-to-one mapping is guaranteed if the surface's border is mapped to a convex polygon.
+///
+/// This class is used by the main
+/// parameterization algorithm Fixed_border_parameterizer_3::parameterize().
+/// - It provides default BorderParameterizer_3 and SparseLinearAlgebraTraits_d template
+///   parameters that make sense.
+/// - It implements compute_w_ij() to compute `w_ij = (i,j)` coefficient of matrix A
+///   for `j` neighbor vertex of `i` based on Tutte Barycentric Mapping method.
+/// - It implements an optimized version of is_one_to_one_mapping().
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+///
+/// \tparam ParameterizationMesh_3       3D surface mesh.
+/// \tparam BorderParameterizer_3        Strategy to parameterize the surface border.
+/// \tparam SparseLinearAlgebraTraits_d  Traits class to solve a sparse linear system.
+///        Note: the system is *not* symmetric because `Fixed_border_parameterizer_3`
+///        does not remove (yet) border vertices from the system.
+
+/*!
+\sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+\sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+\sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+\sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+\sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3>`
+\sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+ */
+
+template
+<
+    class ParameterizationMesh_3,
+    class BorderParameterizer_3
+                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+    class SparseLinearAlgebraTraits_d
+                = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >
+>
+class Barycentric_mapping_parameterizer_3
+    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+{
+// Private types
+private:
+    // Superclass
+    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    typedef BorderParameterizer_3           Border_param;
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+    /// @endcond
+
+// Private types
+private:
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+// Public operations
+public:
+    /// Constructor
+    Barycentric_mapping_parameterizer_3(Border_param border_param = Border_param(),
+                                        ///< object that maps the surface's border to 2D space.
+                                        Sparse_LA sparse_la = Sparse_LA())
+                                        ///< Traits object to access a sparse linear system.
+    :   Fixed_border_parameterizer_3<Adaptor,
+                                   Border_param,
+                                   Sparse_LA>(border_param, sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+// Protected operations
+protected:
+    /// Compute w_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
+    virtual NT compute_w_ij(const Adaptor& /* mesh */,
+			  Vertex_const_handle /* main_vertex_v_i */,
+			  Vertex_around_vertex_const_circulator /* neighbor_vertex_v_j */ )
+    {
+        /// Tutte Barycentric Mapping algorithm is the most simple one:
+        /// w_ij = 1 for j neighbor vertex of i.
+        return 1;
+    }
+
+    /// Check if 3D -> 2D mapping is one-to-one.
+    virtual bool  is_one_to_one_mapping (const Adaptor& /* mesh */,
+				       const Matrix& /* A */,
+				       const Vector& /* Bu */,
+				       const Vector& /* Bv */)
+    {
+        /// Theorem: one-to-one mapping is guaranteed if all w_ij coefficients
+        ///          are > 0 (for j vertex neighbor of i) and if the surface
+        ///          border is mapped onto a 2D convex polygon.
+        /// All w_ij coefficients = 1 (for j vertex neighbor of i), thus mapping
+        /// is guaranteed if the surface border is mapped onto a 2D convex polygon.
+        return Base::get_border_parameterizer().is_border_convex ();
+    }
+};
+
+
+} //namespace CGAL
+
+#endif //CGAL_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Basic_sweep_line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Basic_sweep_line_2.h
new file mode 100644
index 0000000..a911e69
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Basic_sweep_line_2.h
@@ -0,0 +1,533 @@
+// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 (based on old version by Tali Zvi)
+
+#ifndef CGAL_BASIC_SWEEP_LINE_2_H
+#define CGAL_BASIC_SWEEP_LINE_2_H
+
+/*! \file
+ * Definition of the Basic_sweep_line_2 class.
+ */
+
+#include <boost/mpl/assert.hpp>
+#include <CGAL/assertions.h>
+#include <CGAL/memory.h>
+#include <CGAL/Sweep_line_2/Sweep_line_functors.h>
+#include <CGAL/Sweep_line_2/Sweep_line_subcurve.h>
+#include <CGAL/Sweep_line_2/Sweep_line_event.h>
+#include <CGAL/Multiset.h>
+#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
+#include <CGAL/Arr_tags.h>
+#include <vector>
+#include <algorithm>
+#include <iterator>
+
+#ifndef CGAL_SL_VERBOSE
+
+#define CGAL_SL_DEBUG(a)
+#define CGAL_PRINT_INSERT(a)
+#define CGAL_PRINT_ERASE(a)
+#define CGAL_PRINT_NEW_EVENT(p, e)
+#define CGAL_PRINT_UPDATE_EVENT(p, e)
+#define CGAL_PRINT(a)
+
+#else
+
+#include <iostream>
+
+#define CGAL_SL_DEBUG(a)  {a;}
+#define CGAL_PRINT_INSERT(a) { std::cout << "+++ inserting "; \
+                          (a)->Print(); \
+                          std::cout << "    currentPos = "; \
+                          this->PrintEvent(this->m_currentEvent); \
+                          std::cout << std::endl; \
+                          }
+#define CGAL_PRINT_ERASE(a)  { std::cout << "--- erasing "; \
+                          (a)->Print(); }
+#define CGAL_PRINT_NEW_EVENT(p, e) \
+{ std::cout << "%%% a new event was created at " << (p) << std::endl; \
+  (e)->Print(); }
+#define CGAL_PRINT_UPDATE_EVENT(p, e) \
+{ std::cout << "%%% an event was updated at " << (p) << std::endl; \
+  (e)->Print(); }
+#define CGAL_PRINT(a) { std::cout << a; }
+
+#endif
+
+namespace CGAL {
+
+/*! \class Basic_Sweep_line_2
+ * A class that implements the sweep line algorithm for general x-monotone
+ * curves that are pairwise disjoint in their interiors (an additional set
+ * of isolated points may also be supplied).
+ * The x-montone curve type and the point type are defined by the traits class
+ * that is one of the template parameters.
+ */
+template <typename Traits_,
+          typename Visitor_,
+          typename Subcurve_ = Sweep_line_subcurve<Traits_>,
+          typename Event_ = Sweep_line_event<Traits_, Subcurve_>,
+          typename Allocator_ = CGAL_ALLOCATOR(int)>
+class Basic_sweep_line_2 {
+public:
+  typedef Traits_                                         Traits_2;
+  typedef Visitor_                                        Visitor;
+  typedef Event_                                          Event;
+  typedef Subcurve_                                       Subcurve;
+  typedef Allocator_                                      Allocator;
+
+  typedef Arr_traits_basic_adaptor_2<Traits_2>            Traits_adaptor_2;
+  typedef typename Traits_adaptor_2::Point_2              Point_2;
+  typedef typename Traits_adaptor_2::X_monotone_curve_2   X_monotone_curve_2;
+
+  typedef typename Traits_adaptor_2::Left_side_category   Left_side_category;
+  typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
+  typedef typename Traits_adaptor_2::Top_side_category    Top_side_category;
+  typedef typename Traits_adaptor_2::Right_side_category  Right_side_category;
+
+  BOOST_MPL_ASSERT(
+      (typename
+       Arr_sane_identified_tagging< Left_side_category, Bottom_side_category,
+       Top_side_category, Right_side_category >::result)
+  );
+
+protected:
+  typedef typename Arr_are_all_sides_oblivious_tag<
+                     Left_side_category, Bottom_side_category,
+                     Top_side_category, Right_side_category >::result
+    Are_all_sides_oblivious_category;
+
+public:
+  typedef CGAL::Compare_events<Traits_adaptor_2, Event> Compare_events;
+  typedef Multiset<Event*, Compare_events, Allocator>   Event_queue;
+  typedef typename Event_queue::iterator                Event_queue_iterator;
+
+  typedef typename Event::Subcurve_iterator
+    Event_subcurve_iterator;
+
+  typedef Sweep_line_event<Traits_2, Subcurve>          Base_event;
+  typedef typename Base_event::Attribute                Attribute;
+
+  typedef Sweep_line_subcurve<Traits_2>                 Base_subcurve;
+  typedef class Curve_comparer<Traits_2, Base_subcurve> Compare_curves;
+  typedef Multiset<Base_subcurve*,
+                   Compare_curves,
+                   Allocator>                           Status_line;
+  typedef typename Status_line::iterator                Status_line_iterator;
+
+  typedef typename Allocator::template rebind<Event>    Event_alloc_rebind;
+  typedef typename Event_alloc_rebind::other            Event_alloc;
+
+  typedef typename Allocator::template rebind<Subcurve> Subcurve_alloc_rebind;
+  typedef typename Subcurve_alloc_rebind::other         Subcurve_alloc;
+
+protected:
+  /*! \struct
+   * An auxiliary functor for comparing event pointers.
+   */
+  struct CompEventPtr {
+    Comparison_result operator()(Event *e1, Event *e2) const
+    {
+      if (e1 < e2) return (SMALLER);
+      if (e1 > e2) return (LARGER);
+      return (EQUAL);
+    }
+  };
+
+  typedef Multiset<Event*, CompEventPtr>           Allocated_events_set;
+  typedef typename Allocated_events_set::iterator  Allocated_events_iterator;
+
+  // Data members:
+  const Traits_adaptor_2* m_traits;  // A traits-class object.
+  bool m_traitsOwner;                // Whether this object was allocated by
+                                     // this class (and thus should be freed).
+
+  Event* m_currentEvent;             // The current event.
+
+  Compare_curves m_statusLineCurveLess;
+                                     // Comparison functor for the status line.
+
+  Compare_events m_queueEventLess;   // Comparison functor for the event queue.
+
+  Event_queue* m_queue;              // The event queue (the X-structure).
+
+  Subcurve* m_subCurves;             // An array of the subcurves.
+  Status_line m_statusLine;          // The status line (the Y-structure).
+
+  Allocated_events_set m_allocated_events;
+                                     // The events that have been allocated
+                                     // (and have not yet been deallocated).
+
+  Status_line_iterator m_status_line_insert_hint;
+                                     // An iterator of the status line, which
+                                     // is used as a hint for insertions.
+
+  bool m_is_event_on_above;          // Indicates if the current event is on
+                                     // the interior of existing curve. This
+                                     // may happen only with events that are
+                                     // associated with isolated query points.
+
+  Event_alloc m_eventAlloc;          // An allocator for the events objects.
+  Subcurve_alloc m_subCurveAlloc;    // An allocator for the subcurve objects.
+
+  Event m_masterEvent;               // A master Event (created once by the
+                                     // constructor) for the allocator's usage.
+
+  Subcurve m_masterSubcurve;         // A master Subcurve (created once by the
+                                     // constructor) for the allocator's usage.
+
+  //! \todo m_num_of_subCurves should be a size_t for "huge" data sets
+  unsigned int m_num_of_subCurves;   // Number of subcurves.
+
+  Visitor* m_visitor;                // The sweep-line visitor that will be
+                                     // notified during the sweep.
+
+public:
+  /*! Constructor.
+   * \param visitor A pointer to a sweep-line visitor object.
+   */
+  Basic_sweep_line_2(Visitor* visitor);
+
+  /*! Constructor with a traits class.
+   * \param traits A pointer to a sweep-line traits object.
+   * \param visitor A pointer to a sweep-line visitor object.
+   */
+  Basic_sweep_line_2(const Traits_2* traits, Visitor* visitor);
+
+  /*! Destrcutor. */
+  virtual ~Basic_sweep_line_2();
+
+  /*! Run the sweep-line algorithm on a given range of x-monotone curves.
+   * \param curves_begin An iterator for the first curve in the range.
+   * \param curves_end A past-the-end iterator for the range.
+   * \pre The value-type of CurveInputIterator is X_monotone_curve_2.
+   */
+  template <typename CurveInputIterator>
+  void sweep(CurveInputIterator curves_begin,
+             CurveInputIterator curves_end)
+  {
+    m_visitor->before_sweep();
+    _init_sweep(curves_begin, curves_end);
+    //m_visitor ->after_init();
+    _sweep();
+    _complete_sweep();
+    m_visitor ->after_sweep();
+  }
+
+  /*! Run the sweep-line algorithm on a range of x-monotone curves and a range
+   * of action event points (if a curve passed through an action point, it will
+   * be split).
+   * \param curves_begin  An iterator for the first x-monotone curve in the
+   *                      range.
+   * \param curves_end A past-the-end iterator for this range.
+   * \param points_begin An iterator for the first point in the range.
+   * \param points_end A past-the-end iterator for this range.
+   * \pre The value-type of XCurveInputIterator is the traits-class
+   *      X_monotone_curve_2, and the value-type of PointInputIterator is the
+   *      traits-class Point_2.
+   */
+  template <typename CurveInputIterator, class PointInputIterator>
+  void sweep(CurveInputIterator curves_begin,
+             CurveInputIterator curves_end,
+             PointInputIterator action_points_begin,
+             PointInputIterator action_points_end)
+  {
+    m_visitor->before_sweep();
+    _init_sweep(curves_begin, curves_end);
+    _init_points(action_points_begin, action_points_end, Base_event::ACTION);
+    //m_visitor ->after_init();
+    _sweep();
+    _complete_sweep();
+    m_visitor ->after_sweep();
+  }
+
+  /*! Run the sweep-line alogrithm on a range of x-monotone curves, a range
+   * of action event points (if a curve passed through an action point, it will
+   * be split) and a range of query points (if a curve passed through a
+   * query point,it will not be splitted).
+   * \param curves_begin An iterator for the first x-monotone curve in the
+   *                     range.
+   * \param curves_end A past-the-end iterator for this range.
+   * \param points_begin An iterator for the first point in the range.
+   * \param points_end A past-the-end iterator for this range.
+   * \pre The value-type of XCurveInputIterator is the traits-class
+   *      X_monotone_curve_2, and the value-type of PointInputIterator is the
+   *      traits-class Point_2.
+   */
+  template <typename CurveInputIterator, typename ActionPointItr,
+            typename QueryPointItr>
+  void sweep(CurveInputIterator curves_begin,
+             CurveInputIterator curves_end,
+             ActionPointItr action_points_begin,
+             ActionPointItr action_points_end,
+             QueryPointItr query_points_begin,
+             QueryPointItr query_points_end)
+  {
+    m_visitor->before_sweep();
+    _init_sweep(curves_begin, curves_end);
+    _init_points(action_points_begin, action_points_end, Base_event::ACTION);
+    _init_points(query_points_begin, query_points_end, Base_event::QUERY);
+    //m_visitor ->after_init();
+    _sweep();
+    _complete_sweep();
+    m_visitor->after_sweep();
+  }
+
+  /*! Get an iterator for the first subcurve in the status line. */
+  Status_line_iterator status_line_begin()
+  { return (m_statusLine.begin()); }
+
+  /*! Get a past-the-end iterator for the subcurves in the status line. */
+  Status_line_iterator status_line_end()
+  { return (m_statusLine.end()); }
+
+  /*! Get the status line size. */
+  unsigned int status_line_size() const
+  { return (m_statusLine.size()); }
+
+  /*! Check if the status line is empty. */
+  bool is_status_line_empty() const
+  { return (m_statusLine.empty()); }
+
+  /*! Get an iterator for the first event in event queue. */
+  Event_queue_iterator event_queue_begin()
+  { return (m_queue->begin()); }
+
+  /*! Get a past-the-end iterator for the events in the in event queue. */
+  Event_queue_iterator event_queue_end()
+  { return (m_queue->end()); }
+
+   /*! Get the event queue size. */
+  unsigned int event_queue_size() const
+  { return (m_queue->size()); }
+
+  /*! Check if the event queue is empty. */
+  bool is_event_queue_empty() const
+  { return (m_queue->empty()); }
+
+  /*! Stop the sweep by erasing the event queue (except for the current event).
+   * This function may called by the visitor during 'arter_handle_event' in
+   * order to stop the sweep-line process.
+   */
+  void stop_sweep();
+
+  /*! Deallocate event object.
+   * This method is made public to allow the visitor to manage the events
+   * deallocation (as necessary).
+   */
+  void deallocate_event(Event* event);
+
+  /*! Get the current event */
+  Event* current_event() { return m_currentEvent; }
+
+  /*! Get the traits object */
+  const Traits_2* traits() { return m_traits; }
+
+protected:
+  /*! Perform the main sweep-line loop. */
+  void _sweep();
+
+  /*! Create an event object for each input point. */
+  template <typename PointInputIterator>
+  void _init_points(PointInputIterator points_begin,
+                    PointInputIterator points_end,
+                    Attribute type)
+  {
+    for (PointInputIterator pit = points_begin; pit != points_end; ++pit)
+      _init_point(*pit, type);
+  }
+
+  /*! Create a Subcurve object and two Event objects for each curve. */
+  template <typename CurveInputIterator>
+  void _init_curves(CurveInputIterator curves_begin,
+                    CurveInputIterator curves_end)
+  {
+    CurveInputIterator cit;
+    unsigned int index = 0;
+    for (cit = curves_begin; cit != curves_end; ++cit, ++index)
+      _init_curve(*cit, index);
+  }
+
+  /*! Initiliaze the sweep algorithm. */
+  template <typename CurveInputIterator>
+  void _init_sweep(CurveInputIterator curves_begin,
+                   CurveInputIterator curves_end)
+  {
+    m_num_of_subCurves =
+      static_cast<unsigned int>(std::distance(curves_begin, curves_end));
+    _init_structures();
+    _init_curves(curves_begin, curves_end);     // initialize the curves
+  }
+
+  /*! Initialize the data structures for the sweep-line algorithm. */
+  virtual void _init_structures();
+
+  /*! Complete the sweep (complete data strcures). */
+  virtual void _complete_sweep();
+
+  /*! Initialize an event associated with a point.
+   * \param p The given point.
+   * \param type The event type.
+   */
+  void _init_point(const Point_2& pt, Attribute type);
+
+  /*! Initialize the events associated with an x-monotone curve.
+   * \param curve The given x-monotone curve.
+   * \param index Its unique index.
+   */
+  void _init_curve(const X_monotone_curve_2& curve, unsigned int index);
+
+  /*! Initialize an event associated with an x-monotone curve end.
+   * \param cv The given x-monotone curve.
+   * \param ind Its end (ARR_MIN_END or ARR_MAX_END).
+   * \param sc The subcurve corresponding to cv.
+   */
+  void _init_curve_end(const X_monotone_curve_2& cv, Arr_curve_end ind,
+                       Subcurve* sc);
+
+  /*! Handle the subcurves that are to the left of the event point (i.e.,
+   * subcurves that we are done with).
+   */
+  virtual void _handle_left_curves();
+
+  /*! Handle an event that does not have any incident left curves.
+   * Such an event is usually the left endpoint of its incident right
+   * subcurves, and we locate thei position in the status line.
+   */
+  void _handle_event_without_left_curves();
+
+  /*! Sort the left subcurves of an event point according to their order in
+   * their status line (no geometric comprasions are needed).
+   */
+  void _sort_left_curves();
+
+  /*! Handle the subcurves to the right of the current event point. */
+  virtual void _handle_right_curves();
+
+  /*! Add a subcurve to the right of an event point.
+   * \param event The event point.
+   * \param curve The subcurve to add.
+   * \return (true) if an overlap occured; (false) otherwise.
+   */
+  virtual bool _add_curve_to_right(Event* event, Subcurve* curve,
+                                   bool overlap_exist = false);
+
+  /*! Remove a curve from the status line. */
+  void _remove_curve_from_status_line(Subcurve *leftCurve);
+
+  /*! Allocate an event object associated with a given point.
+   * \param pt The point.
+   * \param type The event type.
+   * \param ps_x The location of the point in x.
+   * \param ps_y The location of the point in y.
+   * \pre Neither one of the boundary conditions is +/-oo.
+   * \return The created event.
+   */
+  Event* _allocate_event(const Point_2& pt, Attribute type,
+                         Arr_parameter_space ps_x, Arr_parameter_space ps_y);
+
+  /*! Allocate an event at open boundary,
+   * which is not associated with a valid point.
+   * \param type The event type.
+   * \param ps_x The location of the point in x.
+   * \param ps_y The location of the point in y.
+   * \param At least one of the boundary conditions is +/-oo.
+   * \return The created event.
+   */
+  Event* _allocate_event_at_open_boundary(Attribute type,
+                                          Arr_parameter_space ps_x,
+                                          Arr_parameter_space ps_y);
+
+  /*! Push a finite event point into the event queue.
+   * \param pt The point associated with the event.
+   * \param type The event type.
+   * \param ps_x The location of the point in x.
+   * \param ps_y The location of the point in y.
+   * \param sc A subcurve that the new event represents on of its endpoints.
+   * \return A pair that comprises a pointer to the event, and a flag
+   *         indicating whether this is a new event (if false, the event
+   *         was in the queue and we just updated it).
+   */
+  std::pair<Event*, bool> _push_event(const Point_2& pt, Attribute type,
+                                      Arr_parameter_space ps_x,
+                                      Arr_parameter_space ps_y,
+                                      Subcurve* sc = NULL);
+
+  /*! Push an event point associated with a curve end into the event queue.
+   * \param cv The x-monotone curve.
+   * \param ind The relevant curve end.
+   * \param type The event type.
+   * \param ps_x The location of the point in x.
+   * \param ps_y The location of the point in y.
+   * \param sc A subcurve that the new event represents on of its endpoints.
+   * \return A pair that comprises a pointer to the event, and a flag
+   *         indicating whether this is a new event (if false, the event
+   *         was in the queue and we just updated it).
+   */
+  std::pair<Event*, bool> _push_event(const X_monotone_curve_2& cv,
+                                      Arr_curve_end ind,
+                                      Attribute type,
+                                      Arr_parameter_space ps_x,
+                                      Arr_parameter_space ps_y,
+                                      Subcurve* sc = NULL);
+
+  void _update_event_at_open_boundary(Event* e,
+                                      const X_monotone_curve_2& cv,
+                                      Arr_curve_end ind,
+                                      bool is_new)
+  {
+    _update_event_at_open_boundary(e, cv, ind, is_new,
+                                   Are_all_sides_oblivious_category());
+  }
+
+  void _update_event_at_open_boundary(Event* e,
+                                      const X_monotone_curve_2& cv,
+                                      Arr_curve_end ind,
+                                      bool is_new,
+                                      Arr_not_all_sides_oblivious_tag)
+  { m_visitor->update_event(e, cv, ind, is_new); }
+
+  void _update_event_at_open_boundary(Event* /* e */,
+                                      const X_monotone_curve_2& /* cv */,
+                                      Arr_curve_end /* ind */,
+                                      bool /* is_new */,
+                                      Arr_all_sides_oblivious_tag)
+  { CGAL_error(); }
+
+#ifdef CGAL_SL_VERBOSE
+  void PrintEventQueue();
+  void PrintSubCurves();
+  void PrintStatusLine();
+  void PrintOpenBoundaryType(Arr_parameter_space x, Arr_parameter_space y);
+  void PrintEvent(const Event* e);
+#endif
+
+};
+
+//DEBUG UTILITIES
+#ifdef CGAL_SL_VERBOSE
+  #include <CGAL/Sweep_line_2/Sweep_line_2_debug.h>
+#endif
+
+} //namespace CGAL
+
+#include <CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Bbox_2.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2.h
new file mode 100644
index 0000000..8b7bcbf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2.h
@@ -0,0 +1,245 @@
+// Copyright (c) 1999,2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_BBOX_2_H
+#define CGAL_BBOX_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/kernel_assertions.h>
+#include <CGAL/IO/io.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template < typename T >
+struct Simple_cartesian;
+
+class Bbox_2
+{
+  typedef cpp11::array<double, 4>            BBox_rep_2;
+
+  BBox_rep_2 rep;
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef Simple_cartesian<double>  R;
+
+  Bbox_2()
+    : rep(CGAL::make_array(std::numeric_limits<double>::infinity(),
+                           std::numeric_limits<double>::infinity(),
+                           - std::numeric_limits<double>::infinity(),
+                           - std::numeric_limits<double>::infinity() ))
+  {}
+
+  Bbox_2(double x_min, double y_min,
+         double x_max, double y_max)
+    : rep(CGAL::make_array(x_min, y_min, x_max, y_max))
+{}
+
+  inline bool       operator==(const Bbox_2 &b) const;
+  inline bool       operator!=(const Bbox_2 &b) const;
+
+  inline int        dimension() const;
+  inline double     xmin() const;
+  inline double     ymin() const;
+  inline double     xmax() const;
+  inline double     ymax() const;
+
+  inline double     max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
+  inline double     min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
+
+  inline Bbox_2     operator+(const Bbox_2 &b) const;
+  inline Bbox_2&     operator+=(const Bbox_2 &b);
+
+};
+
+inline
+double
+Bbox_2::xmin() const
+{ return rep[0]; }
+
+inline
+double
+Bbox_2::ymin() const
+{ return rep[1]; }
+
+inline
+double
+Bbox_2::xmax() const
+{ return rep[2]; }
+
+inline
+double
+Bbox_2::ymax() const
+{ return rep[3]; }
+
+inline
+bool
+Bbox_2::operator==(const Bbox_2 &b) const
+{
+  return    xmin() == b.xmin() && xmax() == b.xmax()
+         && ymin() == b.ymin() && ymax() == b.ymax();
+}
+
+inline
+bool
+Bbox_2::operator!=(const Bbox_2 &b) const
+{
+  return ! (b == *this);
+}
+
+inline
+int
+Bbox_2::dimension() const
+{ return 2; }
+
+inline
+double
+Bbox_2::min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
+{
+  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) );
+  if(i == 0) { return xmin(); }
+  return ymin();
+}
+
+inline
+double
+Bbox_2::max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
+{
+  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) );
+  if(i == 0) { return xmax(); }
+  return ymax();
+}
+
+inline
+Bbox_2
+Bbox_2::operator+(const Bbox_2 &b) const
+{
+  return Bbox_2((std::min)(xmin(), b.xmin()),
+                (std::min)(ymin(), b.ymin()),
+                (std::max)(xmax(), b.xmax()),
+                (std::max)(ymax(), b.ymax()));
+}
+
+inline
+Bbox_2&
+Bbox_2::operator+=(const Bbox_2& b)
+{
+  rep[0] = (std::min)(xmin(), b.xmin());
+  rep[1] = (std::min)(ymin(), b.ymin());
+  rep[2] = (std::max)(xmax(), b.xmax());
+  rep[3] = (std::max)(ymax(), b.ymax());
+  return *this;
+}
+
+inline
+bool
+do_overlap(const Bbox_2 &bb1, const Bbox_2 &bb2)
+{
+    // check for emptiness ??
+    if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
+        return false;
+    if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
+        return false;
+    return true;
+}
+
+inline
+std::ostream&
+operator<<(std::ostream &os, const Bbox_2 &b)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        os << b.xmin() << ' ' << b.ymin() << ' '
+           << b.xmax() << ' ' << b.ymax();
+        break;
+    case IO::BINARY :
+        write(os, b.xmin());
+        write(os, b.ymin());
+        write(os, b.xmax());
+        write(os, b.ymax());
+        break;
+    case IO::PRETTY :
+    default:
+        os << "Bbox_2(" << b.xmin() << ", " << b.ymin() << ", "
+                        << b.xmax() << ", " << b.ymax() << ")";
+        break;
+    }
+    return os;
+}
+
+inline
+std::istream&
+operator>>(std::istream &is, Bbox_2 &b)
+{
+    double xmin = 0;
+    double ymin = 0;
+    double xmax = 0;
+    double ymax = 0;
+    
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(xmin) >> iformat(ymin) >> iformat(xmax) >> iformat(ymax);
+        break;
+    case IO::BINARY :
+        read(is, xmin);
+        read(is, ymin);
+        read(is, xmax);
+        read(is, ymax);
+        break;
+    case IO::PRETTY :
+        break;
+    }
+    if (is)
+      b = Bbox_2(xmin, ymin, xmax, ymax);
+    return is;
+}
+
+template <class Input_iterator, class Traits>
+Bbox_2 bbox_2(Input_iterator begin, Input_iterator end, const Traits& traits)
+{
+  if (begin==end) return Bbox_2();
+  typename Traits::Construct_bbox_2 get_bbox = traits.construct_bbox_2_object();
+  Bbox_2 res = get_bbox( *begin );
+  for (++begin; begin!=end; ++begin)
+    res += get_bbox( *begin );
+  return res;
+}
+
+template <class Input_iterator>
+Bbox_2 bbox_2(Input_iterator begin, Input_iterator end)
+{
+  if (begin==end) return Bbox_2();
+  Bbox_2 res = begin->bbox();
+  for (++begin; begin!=end; ++begin)
+    res += begin->bbox();
+  return res;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_BBOX_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection.h
new file mode 100644
index 0000000..f9f15e7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection.h
@@ -0,0 +1,103 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman
+
+
+#ifndef CGAL_BBOX_2_LINE_2_INTERSECTION_H
+#define CGAL_BBOX_2_LINE_2_INTERSECTION_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Line_2.h>
+//#include <CGAL/Segment_2.h>
+//#include <CGAL/Point_2.h>
+#include <CGAL/kernel_assertions.h>
+#include <CGAL/number_utils.h>
+
+namespace CGAL {
+
+class Bbox_2_Line_2_pair_impl;
+
+class CGAL_EXPORT Bbox_2_Line_2_pair {
+public:
+    enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT};
+    Bbox_2_Line_2_pair() ;
+    Bbox_2_Line_2_pair(Bbox_2_Line_2_pair const &);
+    Bbox_2_Line_2_pair(Bbox_2 const &bbox,
+                            double line_a, double line_b, double line_c);
+    ~Bbox_2_Line_2_pair() ;
+    Bbox_2_Line_2_pair &operator=(Bbox_2_Line_2_pair const &o);
+    // set_bbox(Bbox_2 const &bbox);
+    // set_line(double line_a, double line_b, double line_c);
+    Intersection_results intersection_type() const;
+    bool intersection(double &x, double &y) const;
+    bool intersection(double &x1, double &y1, double &x2, double &y2) const;
+protected:
+    Bbox_2_Line_2_pair_impl *pimpl;
+};
+
+template <class Line>
+Bbox_2_Line_2_pair intersection_computer_line_2(
+    Bbox_2 const &bbox, Line const &line)
+{
+    return Bbox_2_Line_2_pair(bbox, to_double(line->a()),
+        to_double(line->b()), to_double(line->c()));
+}
+
+inline bool do_intersect_line_2(
+    const Bbox_2 &box, double line_a, double line_b, double line_c)
+{
+    Bbox_2_Line_2_pair pair(box, line_a, line_b, line_c);
+    return pair.intersection_type() != Bbox_2_Line_2_pair::NO_INTERSECTION;
+}
+
+template <class Line>
+bool do_intersect_line_2(
+    Bbox_2 const &bbox, Line const &line)
+{
+    return do_intersect_line_2(bbox, to_double(line->a()),
+        to_double(line->b()), to_double(line->c()));
+}
+
+template <class Line>
+bool do_intersect_line_2(
+    Line const &line, Bbox_2 const &bbox)
+{
+    return do_intersect_line_2(bbox, to_double(line->a()),
+        to_double(line->b()), to_double(line->c()));
+}
+
+template <class R>
+inline bool do_intersect(
+    const Line_2<R> &line,
+    const Bbox_2 &box)
+{
+    return do_intersect(box, line);
+}
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Bbox_2_Line_2_intersection_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection_impl.h
new file mode 100644
index 0000000..241ca50
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Line_2_intersection_impl.h
@@ -0,0 +1,210 @@
+// Copyright (c) 2000
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Geert-Jan Giezeman
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Simple_cartesian.h>
+typedef CGAL::Simple_cartesian<double> Lcart;
+
+
+namespace CGAL {
+
+class Bbox_2_Line_2_pair_impl
+{
+public:
+    Bbox_2_Line_2_pair_impl() {}
+    Bbox_2_Line_2_pair_impl(Bbox_2 const &bb, Lcart::Line_2 const &line)
+        : _bbox(bb), _line(line), _known(false) {}
+    Bbox_2 _bbox;
+    Lcart::Line_2 _line;
+    mutable bool                     _known;
+    mutable Bbox_2_Line_2_pair::Intersection_results     _result;
+    mutable double                   _min, _max;
+};
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair::~Bbox_2_Line_2_pair()
+{
+    delete pimpl;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair::Bbox_2_Line_2_pair()
+{
+    pimpl = new Bbox_2_Line_2_pair_impl;
+    pimpl->_known = false;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair::Bbox_2_Line_2_pair(Bbox_2_Line_2_pair const &o)
+{
+    pimpl = new Bbox_2_Line_2_pair_impl(*o.pimpl);
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair::Bbox_2_Line_2_pair(
+    Bbox_2 const &bbox, double line_a, double line_b, double line_c)
+{
+    pimpl = new Bbox_2_Line_2_pair_impl(bbox,
+              Lcart::Line_2(line_a, line_b, line_c));
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair &
+Bbox_2_Line_2_pair::operator=(Bbox_2_Line_2_pair const &o)
+{
+    *pimpl = *o.pimpl;
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Line_2_pair::Intersection_results
+Bbox_2_Line_2_pair::intersection_type() const
+{
+    if (pimpl->_known)
+        return pimpl->_result;
+    // The non const this pointer is used to cast away const.
+    pimpl->_known = true;
+    const Lcart::Point_2 &ref_point = pimpl->_line.point();
+    const Lcart::Vector_2 &dir =
+                               pimpl->_line.direction().to_vector();
+    bool to_infinity = true;
+// first on x value
+    if (dir.x() == 0.0) {
+        if (ref_point.x() < pimpl->_bbox.xmin()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        if (ref_point.x() > pimpl->_bbox.xmax()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+    } else {
+        double newmin, newmax;
+        if (dir.x() > 0.0) {
+            newmin = (pimpl->_bbox.xmin()-ref_point.x())/dir.x();
+            newmax = (pimpl->_bbox.xmax()-ref_point.x())/dir.x();
+        } else {
+            newmin = (pimpl->_bbox.xmax()-ref_point.x())/dir.x();
+            newmax = (pimpl->_bbox.xmin()-ref_point.x())/dir.x();
+        }
+        if (to_infinity) {
+            pimpl->_min = newmin;
+            pimpl->_max = newmax;
+        } else {
+            if (newmin > pimpl->_min)
+                pimpl->_min = newmin;
+            if (newmax < pimpl->_max)
+                pimpl->_max = newmax;
+            if (pimpl->_max < pimpl->_min) {
+                pimpl->_result = NO_INTERSECTION;
+                return pimpl->_result;
+            }
+        }
+        to_infinity = false;
+    }
+// now on y value
+    if (dir.y() == 0.0) {
+        if (ref_point.y() < pimpl->_bbox.ymin()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        if (ref_point.y() > pimpl->_bbox.ymax()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+    } else {
+        double newmin, newmax;
+        if (dir.y() > 0.0) {
+            newmin = (pimpl->_bbox.ymin()-ref_point.y())/dir.y();
+            newmax = (pimpl->_bbox.ymax()-ref_point.y())/dir.y();
+        } else {
+            newmin = (pimpl->_bbox.ymax()-ref_point.y())/dir.y();
+            newmax = (pimpl->_bbox.ymin()-ref_point.y())/dir.y();
+        }
+        if (to_infinity) {
+            pimpl->_min = newmin;
+            pimpl->_max = newmax;
+        } else {
+            if (newmin > pimpl->_min)
+                pimpl->_min = newmin;
+            if (newmax < pimpl->_max)
+                pimpl->_max = newmax;
+            if (pimpl->_max < pimpl->_min) {
+                pimpl->_result = NO_INTERSECTION;
+                return pimpl->_result;
+            }
+        }
+        to_infinity = false;
+    }
+    CGAL_kernel_assertion(!to_infinity);
+    if (pimpl->_max == pimpl->_min) {
+        pimpl->_result = POINT;
+        return pimpl->_result;
+    }
+    pimpl->_result = SEGMENT;
+    return pimpl->_result;
+}
+
+CGAL_INLINE_FUNCTION
+bool
+Bbox_2_Line_2_pair::intersection(
+    double &x1, double &y1, double &x2, double &y2) const
+{
+    if (!pimpl->_known)
+        intersection_type();
+    if (pimpl->_result != SEGMENT)
+        return false;
+    Lcart::Point_2 p1(pimpl->_line.point()
+                + pimpl->_min*pimpl->_line.direction().to_vector());
+    Lcart::Point_2 p2(pimpl->_line.point()
+                + pimpl->_max*pimpl->_line.direction().to_vector());
+    x1 = p1.x();
+    y1 = p1.y();
+    x2 = p2.x();
+    y2 = p2.y();
+    return true;
+}
+
+CGAL_INLINE_FUNCTION
+bool
+Bbox_2_Line_2_pair::intersection(
+    double &x, double &y) const
+{
+    if (!pimpl->_known)
+        intersection_type();
+    if (pimpl->_result != POINT)
+        return false;
+    Lcart::Point_2 pt(pimpl->_line.point()
+        + pimpl->_min*pimpl->_line.direction().to_vector());
+    x = pt.x();
+    y = pt.y();
+    return true;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Bbox_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Bbox_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bbox_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Bbox_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Bbox_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Bbox_3.h b/3rdparty/CGAL-4.8/include/CGAL/Bbox_3.h
new file mode 100644
index 0000000..062dfab
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Bbox_3.h
@@ -0,0 +1,277 @@
+// Copyright (c) 1999,2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_BBOX_3_H
+#define CGAL_BBOX_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/IO/io.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template < typename T >
+struct Simple_cartesian;
+
+class Bbox_3
+{
+  cpp11::array<double, 6>   rep;
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<3>  Feature_dimension;
+
+  typedef Simple_cartesian<double>  R;
+
+  Bbox_3()
+    : rep(CGAL::make_array( std::numeric_limits<double>::infinity(),
+                            std::numeric_limits<double>::infinity(),
+                            std::numeric_limits<double>::infinity(),
+                            - std::numeric_limits<double>::infinity(),
+                            - std::numeric_limits<double>::infinity(),
+                            - std::numeric_limits<double>::infinity() ))
+  {}
+
+  Bbox_3(double x_min, double y_min, double z_min,
+         double x_max, double y_max, double z_max)
+    : rep(CGAL::make_array(x_min, y_min, z_min, x_max, y_max, z_max))
+  {}
+
+  inline bool operator==(const Bbox_3 &b) const;
+  inline bool operator!=(const Bbox_3 &b) const;
+
+  inline int dimension() const;
+  double  xmin() const;
+  double  ymin() const;
+  double  zmin() const;
+  double  xmax() const;
+  double  ymax() const;
+  double  zmax() const;
+
+  inline double min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
+  inline double max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const;
+
+  Bbox_3  operator+(const Bbox_3& b) const;
+  Bbox_3& operator+=(const Bbox_3& b);
+};
+
+inline
+double
+Bbox_3::xmin() const
+{ return rep[0]; }
+
+inline
+double
+Bbox_3::ymin() const
+{ return rep[1]; }
+
+inline
+double
+Bbox_3::zmin() const
+{ return rep[2]; }
+
+inline
+double
+Bbox_3::xmax() const
+{ return rep[3]; }
+
+inline
+double
+Bbox_3::ymax() const
+{ return rep[4]; }
+
+inline
+double
+Bbox_3::zmax() const
+{ return rep[5]; }
+
+inline
+bool
+Bbox_3::operator==(const Bbox_3 &b) const
+{
+  return xmin() == b.xmin() && xmax() == b.xmax()
+      && ymin() == b.ymin() && ymax() == b.ymax()
+      && zmin() == b.zmin() && zmax() == b.zmax();
+}
+
+inline
+bool
+Bbox_3::operator!=(const Bbox_3 &b) const
+{
+  return ! (b == *this);
+}
+
+inline
+int
+Bbox_3::dimension() const
+{ return 3; }
+
+inline
+double
+Bbox_3::min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
+{
+  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) || ( i == 2) );
+  if (i == 0) { return xmin(); }
+  if (i == 1) { return ymin(); }
+  return zmin();
+}
+
+inline
+double
+Bbox_3::max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const
+{
+  CGAL_kernel_precondition( (i == 0 ) || ( i == 1 ) || ( i == 2 ) );
+  if (i == 0) { return xmax(); }
+  if (i == 1) { return ymax(); }
+  return zmax();
+}
+
+inline
+Bbox_3
+Bbox_3::operator+(const Bbox_3& b) const
+{
+  return Bbox_3((std::min)(xmin(), b.xmin()),
+                (std::min)(ymin(), b.ymin()),
+                (std::min)(zmin(), b.zmin()),
+                (std::max)(xmax(), b.xmax()),
+                (std::max)(ymax(), b.ymax()),
+                (std::max)(zmax(), b.zmax()));
+}
+
+inline
+Bbox_3&
+Bbox_3::operator+=(const Bbox_3& b)
+{
+  rep[0] = (std::min)(xmin(), b.xmin());
+  rep[1] = (std::min)(ymin(), b.ymin());
+  rep[2] = (std::min)(zmin(), b.zmin());
+  rep[3] = (std::max)(xmax(), b.xmax());
+  rep[4] = (std::max)(ymax(), b.ymax());
+  rep[5] = (std::max)(zmax(), b.zmax());
+  return *this;
+}
+
+inline
+bool
+do_overlap(const Bbox_3& bb1, const Bbox_3& bb2)
+{
+    // check for emptiness ??
+    if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin())
+        return false;
+    if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin())
+        return false;
+    if (bb1.zmax() < bb2.zmin() || bb2.zmax() < bb1.zmin())
+        return false;
+    return true;
+}
+
+
+inline
+std::ostream&
+operator<<(std::ostream &os, const Bbox_3& b)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin()
+		  << ' ' << b.xmax() << ' ' << b.ymax() << ' ' << b.zmax();
+    case IO::BINARY :
+        write(os, b.xmin());
+        write(os, b.ymin());
+        write(os, b.zmin());
+        write(os, b.xmax());
+        write(os, b.ymax());
+        write(os, b.zmax());
+        return os;
+    case IO::PRETTY :
+    default:
+        os << "Bbox_3((" << b.xmin()
+           << ", "       << b.ymin()
+           << ", "       << b.zmin() << "), (";
+        os <<               b.xmax()
+           << ", "       << b.ymax()
+           << ", "       << b.zmax() << "))";
+        return os;
+  }
+}
+
+inline
+std::istream&
+operator>>(std::istream &is, Bbox_3& b)
+{
+    double xmin = 0;
+    double ymin = 0;
+    double zmin = 0;
+    double xmax = 0;
+    double ymax = 0;
+    double zmax = 0;
+
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+      is >> iformat(xmin) >> iformat(ymin) >> iformat(zmin)
+         >> iformat(xmax) >> iformat(ymax) >> iformat(zmax);
+        break;
+    case IO::BINARY :
+        read(is, xmin);
+        read(is, ymin);
+        read(is, zmin);
+        read(is, xmax);
+        read(is, ymax);
+        read(is, zmax);
+        break;
+    case IO::PRETTY :
+      break;
+  }
+  if (is)
+    b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax);
+  return is;
+}
+
+template <class Input_iterator, class Traits>
+Bbox_3 bbox_3(Input_iterator begin, Input_iterator end, const Traits& traits)
+{
+  if (begin==end) return Bbox_3();
+  typename Traits::Construct_bbox_3 get_bbox = traits.construct_bbox_3_object();
+  Bbox_3 res = get_bbox( *begin );
+  for (++begin; begin!=end; ++begin)
+    res += get_bbox( *begin );
+  return res;
+}
+
+template <class Input_iterator>
+Bbox_3 bbox_3(Input_iterator begin, Input_iterator end)
+{
+  if (begin==end) return Bbox_3();
+  Bbox_3 res = begin->bbox();
+  for (++begin; begin!=end; ++begin)
+    res += begin->bbox();
+  return res;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_BBOX_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Bigfloat_interval_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Bigfloat_interval_traits.h
new file mode 100644
index 0000000..54686ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Bigfloat_interval_traits.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
+//                 Ron Wein         <wein at post.tau.ac.il>
+
+
+#ifndef CGAL_BIGFLOAT_INTERVAL_TRAITS_H
+#define CGAL_BIGFLOAT_INTERVAL_TRAITS_H
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+// TODO: rename this into MPFI_traits ? 
+// add a better rounding control 
+
+template<typename BigfloatInterval> class Bigfloat_interval_traits;
+
+template<typename BFI> inline long get_significant_bits(BFI bfi) {
+  typename Bigfloat_interval_traits<BFI>::Relative_precision relative_precision;
+  return  zero_in(bfi) ? -1 : (std::max)(long(0),relative_precision(bfi));
+}
+
+template<typename BFI> inline long set_precision(BFI,long prec) {
+    typename Bigfloat_interval_traits<BFI>::Set_precision set_precision;
+    return set_precision(prec);
+}
+
+template<typename BFI> inline long get_precision(BFI) {
+    typename Bigfloat_interval_traits<BFI>::Get_precision get_precision;
+    return get_precision();
+}
+
+template<typename BFI> inline long relative_precision(const BFI& bfi) {
+    typename Bigfloat_interval_traits<BFI>::Relative_precision 
+      relative_precision;
+    return relative_precision(bfi);
+}
+} //namespace CGAL
+
+#endif // CGAL_BIGFLOAT_INTERVAL_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h
new file mode 100644
index 0000000..b0bf603
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h
@@ -0,0 +1,297 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$ $Date$
+// 
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Ron Wein        <wein at post.tau.ac.il>
+
+#ifndef CGAL_GSP_AGG_OP_SWEEP_H
+#define CGAL_GSP_AGG_OP_SWEEP_H
+
+#include <CGAL/Sweep_line_2.h>
+#include <CGAL/Unique_hash_map.h>
+
+namespace CGAL {
+
+template <class Arrangement_,
+          class MetaTraits_,
+          class SweepVisitor,
+          class CurveWrap,
+          class SweepEvent,
+          typename Allocator = CGAL_ALLOCATOR(int) >
+class Gps_agg_op_sweep_line_2 :
+  public Sweep_line_2<MetaTraits_,
+                      SweepVisitor,
+                      CurveWrap,
+                      SweepEvent,
+                      Allocator>
+{
+public:
+
+  typedef Arrangement_                            Arrangement_2;
+  typedef MetaTraits_                             Traits_2;
+  typedef typename Traits_2::Point_2              Point_2;
+  typedef typename Traits_2::X_monotone_curve_2   X_monotone_curve_2;
+
+  typedef typename Arrangement_2::Vertex_handle       Vertex_handle;
+  typedef typename Arrangement_2::Halfedge_handle     Halfedge_handle;
+
+  typedef std::pair<Arrangement_2 *,
+                    std::vector<Vertex_handle> *>     Arr_entry;
+
+  typedef Sweep_line_2<Traits_2,
+                       SweepVisitor,
+                       CurveWrap,
+                       SweepEvent,
+                       Allocator>                 Base;
+
+  typedef SweepEvent                              Event;
+
+
+  typedef typename Base::Event_queue_iterator     EventQueueIter;
+  typedef typename Event::Subcurve_iterator       EventCurveIter;
+
+  typedef typename Base::Base_event               Base_event;
+  typedef typename Base_event::Attribute          Attribute;
+
+  typedef typename Base::Base_subcurve            Base_subcurve;
+  
+  typedef CurveWrap                               Subcurve;
+
+  typedef std::list<Subcurve*>                    SubCurveList;
+  typedef typename SubCurveList::iterator         SubCurveListIter; 
+
+
+  typedef typename Base::Status_line_iterator     StatusLineIter;
+
+public:
+
+  /*!
+   * Constructor.
+   * \param visitor A pointer to a sweep-line visitor object.
+   */
+  Gps_agg_op_sweep_line_2 (SweepVisitor* visitor) : 
+    Base (visitor)
+  {}
+
+  /*!
+   * Constructor.
+   * \param traits A pointer to a sweep-line traits object.
+   * \param visitor A pointer to a sweep-line visitor object.
+   */
+  Gps_agg_op_sweep_line_2 (Traits_2 *traits, SweepVisitor* visitor) :
+    Base(traits, visitor)
+  {}
+
+  /*! Perform the sweep. */
+  template<class CurveInputIterator>
+  void sweep (CurveInputIterator curves_begin,
+              CurveInputIterator curves_end,
+              unsigned int lower,
+              unsigned int upper,
+              unsigned int jump,
+              std::vector<Arr_entry>& arr_vec)
+  {
+    CGAL_assertion (this->m_queue->empty() && 
+                    this->m_statusLine.size() == 0);
+
+    typedef Unique_hash_map<Vertex_handle, Event *>    Vertices_map;
+    typedef typename Traits_2::Compare_xy_2            Compare_xy_2;
+
+    this->m_visitor->before_sweep();
+    // Allocate all of the Subcurve objects as one block.
+    this->m_num_of_subCurves = static_cast<unsigned int>(std::distance (curves_begin, curves_end));
+    if (this->m_num_of_subCurves > 0)
+      this->m_subCurves =
+        this->m_subCurveAlloc.allocate (this->m_num_of_subCurves);
+
+    this->m_curves_pair_set.resize (2 * this->m_num_of_subCurves);
+
+    // Initialize the event queue using the vertices vectors. Note that these
+    // vertices are already sorted, we simply have to merge them
+    Vertices_map       vert_map;
+    Vertex_handle      vh;
+    Vertex_handle      invalid_v;
+    unsigned int       i = lower;
+    unsigned int       n = static_cast<unsigned int>((arr_vec[i].second)->size());
+    unsigned int       j;
+    EventQueueIter     q_iter;
+    bool               first = true;
+    Attribute          event_type;
+    Event             *event;
+
+    for (j = 0;
+         j < n && (vh = (*(arr_vec[i].second))[j]) != invalid_v;
+         j++)
+    {
+      // Insert the vertices of the first vector one after the other.
+      event_type = _type_of_vertex (vh);
+      if (event_type == Base_event::DEFAULT)
+        continue;
+
+      event = this->_allocate_event (vh->point(), event_type,
+                                     ARR_INTERIOR, ARR_INTERIOR);
+      // \todo When the boolean set operations are exteneded to support
+      //       unbounded curves, we will need here a special treatment.
+
+      #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
+        event->set_finite();
+      #endif
+      
+      if (! first)
+      {
+        q_iter = this->m_queue->insert_after (q_iter, event);
+      }
+      else
+      {
+        q_iter = this->m_queue->insert (event);
+        first = false;
+      }
+
+      vert_map[vh] = event;
+    }
+
+    Comparison_result  res = LARGER;
+    Compare_xy_2       comp_xy = this->m_traits->compare_xy_2_object();
+    EventQueueIter     q_end = this->m_queue->end();
+
+    for (i += jump; i <= upper; i += jump)
+    {
+      // Merge the vertices of the other vectors into the existing queue.
+      q_iter = this->m_queue->begin();
+      n = static_cast<unsigned int>((arr_vec[i].second)->size());
+
+      for (j = 0;
+           j < n && (vh = (*(arr_vec[i].second))[j]) != invalid_v;
+           j++)
+      {
+        event_type = _type_of_vertex (vh);
+        if (event_type == Base_event::DEFAULT)
+          continue;
+
+        while (q_iter != q_end &&
+               (res = comp_xy (vh->point(), (*q_iter)->point())) == LARGER)
+        {
+          ++q_iter;
+        }
+
+        if (res == SMALLER || q_iter == q_end)
+        {
+          event = this->_allocate_event (vh->point(), event_type,
+                                         ARR_INTERIOR, ARR_INTERIOR);
+          // \todo When the boolean set operations are exteneded to support
+          //       unbounded curves, we will need here a special treatment.
+          
+          #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H
+             event->set_finite();
+          #endif
+
+          this->m_queue->insert_before (q_iter, event);
+          vert_map[vh] = event;
+        }
+        else if (res == EQUAL)
+        {
+          // In this case q_iter points to an event already associated with
+          // the vertex, so we just update the map:
+          vert_map[vh] = *q_iter;
+        }
+      }
+    }
+
+    // Go over all curves (which are associated with halfedges) and associate
+    // them with the events we have just created.
+    unsigned int           index = 0;
+    CurveInputIterator     iter;
+    Halfedge_handle        he;
+    Event                 *e_left;
+    Event                 *e_right;
+
+    for (iter = curves_begin; iter != curves_end; ++iter, index++)
+    {
+      // Get the events associated with the end-vertices of the current
+      // halfedge.
+      he = iter->data().halfedge();
+
+      CGAL_assertion (vert_map.is_defined (he->source()));
+      CGAL_assertion (vert_map.is_defined (he->target()));
+
+      if ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT)
+      {
+        e_left = vert_map[he->source()];
+        e_right = vert_map[he->target()];
+      }
+      else
+      {
+        e_left = vert_map[he->target()];
+        e_right = vert_map[he->source()];
+      }
+
+      // Create the subcurve object.
+      this->m_subCurveAlloc.construct (this->m_subCurves + index,
+                                       this->m_masterSubcurve);
+
+      (this->m_subCurves + index)->init (*iter);
+      (this->m_subCurves + index)->set_left_event(e_left);
+      (this->m_subCurves + index)->set_right_event(e_right);
+    
+      e_right->add_curve_to_left (this->m_subCurves + index);  
+      this->_add_curve_to_right (e_left, this->m_subCurves + index);
+    }
+
+    // Perform the sweep:
+    this->_sweep();
+    this->_complete_sweep();
+    this->m_visitor->after_sweep();
+
+    return;
+  }
+    
+private:
+   
+  /*!
+   * Check if the given vertex is an endpoint of an edge we are going
+   * to use in the sweep.
+   */
+  Attribute _type_of_vertex (Vertex_handle v)
+  {
+    typename Arrangement_2::Halfedge_around_vertex_circulator  first, circ;
+
+    circ = first = v->incident_halfedges();
+    do
+    {
+      // Check if the current edge separates two faces with unequal
+      // containment flags (otherwise we will simply not keep it).
+      if (circ->face()->contained() != circ->twin()->face()->contained())
+      {
+        if ((Arr_halfedge_direction)circ->direction() == ARR_LEFT_TO_RIGHT)
+          return (Base_event::RIGHT_END);
+        else
+          return (Base_event::LEFT_END);
+      }
+      ++circ;
+
+    } while (circ != first);
+
+    // If we reached here, we should not keep this vertex.
+    return (Base_event::DEFAULT);
+  }
+};
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h
new file mode 100644
index 0000000..77d7bc3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h
@@ -0,0 +1,155 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+
+#ifndef CGAL_GPS_DEFAULT_DCEL_H
+#define CGAL_GPS_DEFAULT_DCEL_H
+
+/*! \file
+ * This class is the default \dcel{} class used by the General_polygon_set_2
+ * and Polygon_set_2} class-templates to represent the undelying internal
+ * Arrangement_2 data structure.
+ */
+
+#include <CGAL/Arr_default_dcel.h>
+
+namespace CGAL {
+
+template <class X_monotone_curve_2>
+class Gps_halfedge_base : public Arr_halfedge_base<X_monotone_curve_2>
+{
+  int _flag;
+public:
+
+  typedef Arr_halfedge_base<X_monotone_curve_2> Base;
+  Gps_halfedge_base()
+    : Base()
+    , _flag(-1)
+  {}
+
+  int flag() const {
+    return _flag;
+  }
+
+  void set_flag(int i) {
+    _flag=i;
+  }
+};
+
+class Gps_face_base : public Arr_face_base
+{
+protected:
+  mutable char m_info;
+  enum
+  {
+    CONTAINED = 1,
+    VISITED   = 2
+  };
+  std::size_t _id;
+
+public:
+  //Constructor
+  Gps_face_base() :
+    Arr_face_base(),
+    m_info(0),
+    _id(-1)
+  {}
+
+   /*! Assign from another face. */
+  virtual void assign (const Arr_face_base& f)
+  {
+    Arr_face_base::assign (f);
+
+    const Gps_face_base & ex_f = static_cast<const Gps_face_base&>(f);
+    m_info = ex_f.m_info;
+  }
+  
+  bool contained() const
+  {
+    return (m_info & CONTAINED) != 0;
+  }
+
+  void set_contained(bool b)
+  {
+    if (b)
+      m_info |= CONTAINED;
+    else
+      m_info &= ~CONTAINED;
+  }
+
+  bool visited() const
+  {
+    return (m_info & VISITED) != 0;
+  }
+
+  void set_visited(bool b) const
+  {
+    if (b)
+      m_info |= VISITED;
+    else
+      m_info &= ~VISITED;
+  }
+
+  Arr_face_base::Outer_ccbs_container&
+  _outer_ccbs()
+  {
+    return this->outer_ccbs;
+  }
+
+  Arr_face_base::Inner_ccbs_container&
+  _inner_ccbs()
+  {
+    return this->inner_ccbs;
+  }
+
+  std::size_t id() const {
+    return _id;
+  }
+
+  bool id_not_set() const {
+    return _id==std::size_t(-1);
+  }
+
+  void set_id(std::size_t i) {
+    _id=i;
+  }
+
+  void reset_id()
+  {
+    _id=std::size_t(-1);
+  }
+};
+
+template <class Traits_>
+class Gps_default_dcel :
+  public Arr_dcel_base<Arr_vertex_base<typename Traits_::Point_2>,
+                       Gps_halfedge_base<typename Traits_::X_monotone_curve_2>,
+                       Gps_face_base >
+{
+public:
+  /*! Default constructor. */
+  Gps_default_dcel() {}
+};
+
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_merge.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_merge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_merge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_merge.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h
new file mode 100644
index 0000000..063b8a0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h
@@ -0,0 +1,1737 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
+//                 Guy Zucker <guyzucke at post.tau.ac.il>
+
+
+#ifndef CGAL_GPS_ON_SURFACE_BASE_2_H
+#define CGAL_GPS_ON_SURFACE_BASE_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Object.h>
+#include <CGAL/enum.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Arrangement_on_surface_2.h>
+#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
+
+#include <CGAL/Arr_overlay_2.h>
+#include <CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_intersection_functor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_join_functor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_difference_functor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_merge.h>
+#include <CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h>
+#include <CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h>
+#include <CGAL/Union_find.h>
+
+#include <boost/foreach.hpp>
+
+/*!
+  \file   Gps_on_surface_base_2.h
+  \brief  A class that allows Boolean set operations.
+  This class is the base class for General_polygon_set_on_surface_2 and
+  recieves extra template parameter which allows different validation
+  policies. If you do not want validation then use the default validation
+  policy. A different validation policy example can be found in
+  General_polygon_set_on_surface_2.
+*/
+
+
+namespace CGAL {
+
+namespace Boolean_set_operation_2_internal
+{
+  struct NoValidationPolicy
+  {
+   /*! is_valid - Checks if a Traits::Polygon_2 OR
+    * Traits::Polygon_with_holes_2 are valid.
+    * In this validation policy we do NOT do anything.
+    */
+    template <class Polygon, class Traits>
+    inline static void is_valid(const Polygon&, const Traits&) {}
+  };
+}
+
+//! General_polygon_set_on_surface_2
+/*! This class is the base class for General_polygon_set_on_surface_2 and
+    recieves extra template parameter which allows different validation
+    policies. If you do not want validation then use the default validation
+    policy. A different validation policy example can be found in
+    General_polygon_set_on_surface_2.
+ */
+template <class Traits_, class TopTraits_,
+          class ValidationPolicy =
+          Boolean_set_operation_2_internal::NoValidationPolicy>
+class Gps_on_surface_base_2
+{
+public:
+  typedef Traits_                                      Traits_2;
+  typedef TopTraits_                                   Topology_traits;
+  typedef typename Traits_2::Polygon_2                 Polygon_2;
+  typedef typename Traits_2::Polygon_with_holes_2      Polygon_with_holes_2;
+  typedef CGAL::Arrangement_on_surface_2<Traits_2, Topology_traits>
+                                                       Arrangement_on_surface_2;
+  typedef typename Arrangement_on_surface_2::Size      Size;
+
+private:
+  typedef Arrangement_on_surface_2                     Aos_2;
+
+  typedef Gps_on_surface_base_2 <
+    Traits_2, Topology_traits, ValidationPolicy>       Self;
+  typedef typename Traits_2::Point_2                   Point_2;
+  typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
+
+  typedef typename Polygon_with_holes_2::Hole_const_iterator
+    GP_Holes_const_iterator;
+  typedef typename Traits_2::Curve_const_iterator      Curve_const_iterator;
+  typedef typename Traits_2::Compare_endpoints_xy_2
+                                                       Compare_endpoints_xy_2;
+  typedef typename Traits_2::Construct_opposite_2      Construct_opposite_2;
+
+  typedef typename Aos_2::Face_const_iterator          Face_const_iterator;
+  typedef typename Aos_2::Halfedge_const_iterator      Halfedge_const_iterator;
+  typedef typename Aos_2::Vertex_const_iterator        Vertex_const_iterator;
+  typedef typename Aos_2::Edge_const_iterator          Edge_const_iterator;
+  typedef typename Aos_2::Outer_ccb_const_iterator     Outer_ccb_const_iterator;
+  typedef typename Aos_2::Inner_ccb_const_iterator     Inner_ccb_const_iterator;
+  typedef typename Aos_2::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Aos_2::Face_iterator                Face_iterator;
+  typedef typename Aos_2::Halfedge_iterator            Halfedge_iterator;
+  typedef typename Aos_2::Vertex_iterator              Vertex_iterator;
+  typedef typename Aos_2::Edge_iterator                Edge_iterator;
+  typedef typename Aos_2::Outer_ccb_iterator           Outer_ccb_iterator;
+  typedef typename Aos_2::Inner_ccb_iterator           Inner_ccb_iterator;
+  typedef typename Aos_2::Ccb_halfedge_circulator      Ccb_halfedge_circulator;
+  typedef typename Aos_2::Face_handle                  Face_handle;
+  typedef typename Aos_2::Halfedge_handle              Halfedge_handle;
+  typedef typename Aos_2::Vertex_handle                Vertex_handle;
+
+  typedef typename Aos_2::Face_const_handle            Face_const_handle;
+  typedef typename Aos_2::Halfedge_const_handle        Halfedge_const_handle;
+  typedef typename Aos_2::Vertex_const_handle          Vertex_const_handle;
+
+  typedef typename Aos_2::Halfedge_around_vertex_const_circulator
+    Halfedge_around_vertex_const_circulator;
+
+  typedef std::pair<Aos_2 *,
+                    std::vector<Vertex_handle> *>      Arr_entry;
+
+  typedef typename Arrangement_on_surface_2::
+    Topology_traits::Default_point_location_strategy   Point_location;
+
+protected:
+
+  // Traits* should be removed and only m_traits should be used.
+  // If you, who reads this text, have time, replace m_traits
+  // with m_traits_adaptor and try to do something about m_traits_owner.
+  const Traits_2* m_traits;
+  CGAL::Arr_traits_adaptor_2<Traits_2>       m_traits_adaptor;
+  bool                                       m_traits_owner;
+
+  // the underlying arrangement
+  Aos_2*        m_arr;
+
+public:
+
+  // default costructor
+  Gps_on_surface_base_2() : m_traits(new Traits_2()),
+                            m_traits_adaptor(*m_traits),
+                            m_traits_owner(true),
+                            m_arr(new Aos_2(m_traits))
+  {}
+
+
+  // constructor with traits object
+  Gps_on_surface_base_2(const Traits_2& tr) : m_traits(&tr),
+                                        m_traits_adaptor(*m_traits),
+                                        m_traits_owner(false),
+                                        m_arr(new Aos_2(m_traits))
+  {}
+
+  // Copy constructor
+  Gps_on_surface_base_2(const Self& ps) :
+    m_traits(new Traits_2(*(ps.m_traits))),
+    m_traits_adaptor(*m_traits),
+    m_traits_owner(true),
+    m_arr(new Aos_2(*(ps.m_arr)))
+  {}
+
+  // Asignment operator
+  Gps_on_surface_base_2& operator=(const Self& ps)
+  {
+    if (this == &ps)
+      return (*this);
+
+    if (m_traits_owner)
+      delete m_traits;
+    delete m_arr;
+    m_traits = new Traits_2(*(ps.m_traits));
+    m_traits_adaptor = CGAL::Arr_traits_adaptor_2<Traits_2>(*m_traits);
+    m_traits_owner = true;
+    m_arr = new Aos_2(*(ps.m_arr));
+    return (*this);
+  }
+
+  // Constructor
+  explicit Gps_on_surface_base_2(const Polygon_2& pgn) :
+    m_traits(new Traits_2()),
+    m_traits_adaptor(*m_traits),
+    m_traits_owner(true),
+    m_arr(new Aos_2(m_traits))
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _insert(pgn, *m_arr);
+  }
+
+  // Constructor
+  explicit Gps_on_surface_base_2(const Polygon_2& pgn, const Traits_2& tr) :
+    m_traits(&tr),
+    m_traits_adaptor(*m_traits),
+    m_traits_owner(false),
+    m_arr(new Aos_2(m_traits))
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _insert(pgn, *m_arr);
+  }
+
+  // Constructor
+  explicit Gps_on_surface_base_2(const Polygon_with_holes_2& pgn_with_holes) :
+    m_traits(new Traits_2()),
+    m_traits_adaptor(*m_traits),
+    m_traits_owner(true),
+    m_arr(new Aos_2(m_traits))
+  {
+    ValidationPolicy::is_valid(pgn_with_holes,*m_traits);
+    _insert(pgn_with_holes, *m_arr);
+  }
+
+  // Constructor
+  explicit Gps_on_surface_base_2(const Polygon_with_holes_2& pgn_with_holes,
+                                 const Traits_2& tr) :
+    m_traits(&tr),
+    m_traits_adaptor(*m_traits),
+    m_traits_owner(false),
+    m_arr(new Aos_2(m_traits))
+  {
+    ValidationPolicy::is_valid(pgn_with_holes,*m_traits);
+    _insert(pgn_with_holes, *m_arr);
+  }
+
+protected:
+  Gps_on_surface_base_2(Aos_2* arr) : m_traits(new Traits_2()),
+                                              m_traits_adaptor(*m_traits),
+                                              m_traits_owner(true),
+                                              m_arr(arr)
+   {}
+
+public:
+  //destructor
+  virtual ~Gps_on_surface_base_2()
+  {
+    delete m_arr;
+
+    if (m_traits_owner)
+      delete m_traits;
+  }
+
+  void simplify(const Polygon_2& pgn, Polygon_with_holes_2& res)
+  {
+    typedef Gps_polygon_simplifier<Aos_2>  Simplifier;
+
+    Aos_2*  arr = new Aos_2();
+
+    Simplifier simp(*arr, *m_traits);
+    simp.simplify(pgn);
+    _remove_redundant_edges(arr);
+    Self gps(arr);
+    gps._reset_faces();
+
+    typedef Oneset_iterator<Polygon_with_holes_2>    OutputItr;
+    OutputItr oi (res);
+    gps.polygons_with_holes(oi);
+  }
+
+  // insert a simple polygon
+  void insert(const Polygon_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _insert(pgn, *m_arr);
+  }
+
+  // insert a polygon with holes
+  void insert(const Polygon_with_holes_2& pgn_with_holes)
+  {
+    ValidationPolicy::is_valid(pgn_with_holes, *m_traits);
+    _insert(pgn_with_holes, *m_arr);
+  }
+
+  // insert a range of polygons that can be either simple polygons
+  // or polygons with holes
+  // precondition: the polygons are disjoint and simple
+  template <typename PolygonIterator>
+  void insert(PolygonIterator pgn_begin, PolygonIterator pgn_end);
+
+
+  // insert two ranges of : the first one for simple polygons,
+  // the second one for polygons with holes
+  // precondition: the first range is disjoint simple polygons
+  //               the second range is disjoint polygons with holes
+  template <typename PolygonIterator, typename PolygonWithHolesIterator>
+  void insert(PolygonIterator pgn_begin, PolygonIterator pgn_end,
+              PolygonWithHolesIterator pgn_with_holes_begin,
+              PolygonWithHolesIterator pgn_with_holes_end);
+
+  // test for intersection with a simple polygon
+  bool do_intersect(const Polygon_2& pgn) const
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    Self other(pgn, *m_traits);
+    return (do_intersect(other));
+  }
+
+  // test for intersection with a polygon with holes
+  bool do_intersect(const Polygon_with_holes_2& pgn_with_holes) const
+  {
+    ValidationPolicy::is_valid(pgn_with_holes, *m_traits);
+    Self other(pgn_with_holes, *m_traits);
+    return (do_intersect(other));
+  }
+
+  //test for intersection with another Gps_on_surface_base_2 object
+  bool do_intersect(const Self& other) const
+  {
+    if (this->is_empty() || other.is_empty()) return false;
+    if (this->is_plane() || other.is_plane()) return true;
+    Aos_2 res_arr;
+    Gps_do_intersect_functor<Aos_2>  func;
+    overlay(*m_arr, *(other.m_arr), res_arr, func);
+    return func.found_reg_intersection();
+  }
+
+  // intersection with a simple polygon
+  void intersection(const Polygon_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _intersection(pgn);
+  }
+
+  // intersection with a polygon with holes
+  void intersection(const Polygon_with_holes_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _intersection(pgn);
+  }
+
+  //intersection with another Gps_on_surface_base_2 object
+  void intersection(const Self& other)
+  {
+    _intersection(other);
+  }
+
+  void intersection(const Self& gps1, const Self& gps2)
+  {
+    this->clear();
+    _intersection(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
+  }
+
+
+  // join with a simple polygon
+  void join(const Polygon_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _join(pgn);
+  }
+
+  // join with a polygon with holes
+  void join(const Polygon_with_holes_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _join(pgn);
+  }
+
+  //join with another Gps_on_surface_base_2 object
+  void join(const Self& other)
+  {
+    _join(other);
+  }
+
+  void join(const Self& gps1, const Self& gps2)
+  {
+    this->clear();
+    _join(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
+  }
+
+  // difference with a simple polygon
+  void difference (const Polygon_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _difference(pgn);
+  }
+
+  // difference with a polygon with holes
+  void difference (const Polygon_with_holes_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _difference(pgn);
+  }
+
+  //difference with another Gps_on_surface_base_2 object
+  void difference (const Self& other)
+  {
+    _difference(other);
+  }
+
+  void difference(const Self& gps1, const Self& gps2)
+  {
+    this->clear();
+    _difference(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
+  }
+
+
+  // symmetric_difference with a simple polygon
+  void symmetric_difference(const Polygon_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _symmetric_difference(pgn);
+  }
+
+  // symmetric_difference with a polygon with holes
+  void symmetric_difference(const Polygon_with_holes_2& pgn)
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    _symmetric_difference(pgn);
+  }
+
+  //symmetric_difference with another Gps_on_surface_base_2 object
+  void symmetric_difference(const Self& other)
+  {
+    _symmetric_difference(other);
+  }
+
+  void symmetric_difference(const Self& gps1, const Self& gps2)
+  {
+    this->clear();
+    _symmetric_difference(*(gps1.m_arr), *(gps2.m_arr), *(this->m_arr));
+  }
+
+
+  void complement()
+  {
+    this->_complement(m_arr);
+  }
+
+  void complement(const Self& other)
+  {
+    *(this->m_arr) = *(other.m_arr);
+    this->complement();
+  }
+
+  void fix_curves_direction()
+  {
+    _fix_curves_direction(*m_arr);
+  }
+
+  Size number_of_polygons_with_holes() const;
+
+  // Traits_2& traits()
+  // {
+  //   return *m_traits;
+  // }
+
+  const Traits_2& traits() const { return *m_traits; }
+
+  bool is_empty() const
+  {
+    // We have to check that all the faces of an empty arrangement are not
+    // conained in the polygon set (there can be several faces in an empty
+    // arrangement, dependant on the topology traits.
+    // The point is that if the arrangement is "empty" (meaning that no curve
+    // or point were inserted and that it is in its original state) then
+    // all the faces (created by the topology traits) should have the same
+    // result for contained() --- from Boolean operations point of view there
+    // can not be an empty arrangement which has serveral faces with different
+    // attributes.
+    return (m_arr->is_empty() && !m_arr->faces_begin()->contained());
+  }
+
+  bool is_plane() const
+  {
+    // Same comment as in "is_empty" above, just with adjustments.
+    return (m_arr->is_empty() &&  m_arr->faces_begin()->contained());
+  }
+
+  void clear()
+  {
+    m_arr->clear();
+  }
+
+
+  Oriented_side oriented_side(const Point_2& q) const
+  {
+    Point_location pl(*m_arr);
+
+    Object obj = pl.locate(q);
+    Face_const_iterator f;
+    if (CGAL::assign(f, obj))
+    {
+      if (f->contained())
+        return ON_POSITIVE_SIDE;
+
+      return ON_NEGATIVE_SIDE ;
+    }
+    return ON_ORIENTED_BOUNDARY ;
+  }
+
+  Oriented_side oriented_side(const Polygon_2& pgn) const
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    Self other(pgn);
+    return (oriented_side(other));
+  }
+
+  Oriented_side oriented_side(const Polygon_with_holes_2& pgn) const
+  {
+    ValidationPolicy::is_valid(pgn, *m_traits);
+    Self other(pgn);
+    return (oriented_side(other));
+  }
+
+  Oriented_side oriented_side(const Self& other) const
+  {
+    if (this->is_empty() || other.is_empty())
+      return ON_NEGATIVE_SIDE;
+
+    if (this->is_plane() || other.is_plane())
+      return ON_POSITIVE_SIDE;
+
+    Aos_2 res_arr;
+
+    Gps_do_intersect_functor<Aos_2>  func;
+    overlay(*m_arr, *(other.m_arr), res_arr, func);
+    if (func.found_reg_intersection())
+      return ON_POSITIVE_SIDE;
+
+    if (func.found_boundary_intersection())
+      return ON_ORIENTED_BOUNDARY;
+
+    return ON_NEGATIVE_SIDE;
+  }
+
+
+  // returns the location of the query point
+  bool locate(const Point_2& q, Polygon_with_holes_2& pgn) const;
+
+  /*! Obtain a const reference to the underlying arrangement
+   * \return the underlying arrangement.
+   */
+  const Aos_2& arrangement() const
+  {
+    return *m_arr;
+  }
+
+  /*! Obtain a reference to the underlying arrangement
+   * \return the underlying arrangement.
+   */
+  Aos_2& arrangement()
+  {
+    return *m_arr;
+  }
+
+protected:
+
+  bool _is_valid(Aos_2& arr) {
+    if (!CGAL::is_valid(arr))
+      return false;
+
+    Compare_endpoints_xy_2 cmp_endpoints =
+      m_traits->compare_endpoints_xy_2_object();
+
+    for (Edge_const_iterator eci = arr.edges_begin();
+         eci != arr.edges_end();
+         ++eci)
+    {
+      Halfedge_const_handle he = eci;
+      if (he->face() == he->twin()->face())
+      {
+        return false;
+      }
+      if (he->face()->contained() == he->twin()->face()->contained())
+      {
+        return false;
+      }
+
+      const X_monotone_curve_2&  cv = he->curve();
+      const bool                 is_cont = he->face()->contained();
+      const Comparison_result    he_res =
+        ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT) ?
+        SMALLER : LARGER;
+      const bool                 has_same_dir = (cmp_endpoints(cv) == he_res);
+
+      if ((is_cont && !has_same_dir) || (!is_cont && has_same_dir)) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+public:
+
+  /*! */
+  bool is_valid()
+  {
+    return _is_valid(*this->m_arr);
+  }
+
+  // get the simple polygons, takes O(n)
+  template <typename OutputIterator>
+  OutputIterator polygons_with_holes(OutputIterator out) const;
+
+  // test for intersection of a range of polygons
+  template <typename InputIterator>
+  bool do_intersect(InputIterator begin, InputIterator end, unsigned int k = 5)
+  {
+    Self other(*this);
+    other.intersection(begin, end, k);
+    return (other.is_empty());
+  }
+
+  template <typename InputIterator1, typename InputIterator2>
+  bool do_intersect(InputIterator1 begin1, InputIterator1 end1,
+                    InputIterator2 begin2, InputIterator2 end2,
+                    unsigned int k = 5)
+  {
+    Self other(*this);
+    other.intersection(begin1, end1, begin2, end2, k);
+    return (other.is_empty());
+  }
+
+  // join a range of polygons
+  template <typename InputIterator>
+  void join(InputIterator begin, InputIterator end, unsigned int k = 5)
+  {
+    typename std::iterator_traits<InputIterator>::value_type pgn;
+    this->join(begin, end, pgn, k);
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+  // join range of simple polygons
+  // 5 is the magic number in which we switch to a sweep-based algorithm
+  // instead of a D&C algorithm. This point should be further studies, as
+  // it is hard to believe that this is the best value for all applications.
+  template <typename InputIterator>
+  inline void join(InputIterator begin, InputIterator end, Polygon_2&,
+                   unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+    for (InputIterator itr = begin; itr != end; ++itr, ++i)
+    {
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Join_merge<Aos_2> join_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+  //join range of polygons with holes (see previous comment about k=5).
+  template <typename InputIterator>
+  inline void join(InputIterator begin, InputIterator end,
+                   Polygon_with_holes_2&, unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+    arr_vec[0].first = this->m_arr;
+
+    unsigned int i = 1;
+    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
+    {
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Join_merge<Aos_2> join_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+  // (see previous comment about k=5).
+  template <typename InputIterator1, typename InputIterator2>
+  inline void join(InputIterator1 begin1, InputIterator1 end1,
+                   InputIterator2 begin2, InputIterator2 end2,
+                   unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
+                                    std::distance(begin2, end2)+1);
+
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
+    {
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr1, *(arr_vec[i].first));
+    }
+
+    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
+    {
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr2, *(arr_vec[i].first));
+    }
+
+    Join_merge<Aos_2> join_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, join_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+
+  // intersect range of polygins (see previous comment about k=5).
+  template <typename InputIterator>
+  inline void intersection(InputIterator begin, InputIterator end,
+                           unsigned int k = 5)
+  {
+    typename std::iterator_traits<InputIterator>::value_type pgn;
+    this->intersection(begin, end, pgn, k);
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+
+  // intersect range of simple polygons
+  template <typename InputIterator>
+  inline void intersection(InputIterator begin, InputIterator end,
+                           Polygon_2&, unsigned int k)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
+    {
+      ValidationPolicy::is_valid((*itr), *m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Intersection_merge<Aos_2> intersection_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+  //intersect range of polygons with holes
+  template <typename InputIterator>
+  inline void intersection(InputIterator begin, InputIterator end,
+                           Polygon_with_holes_2&, unsigned int k)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
+    {
+      ValidationPolicy::is_valid((*itr), *m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Intersection_merge<Aos_2> intersection_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+
+  template <typename InputIterator1, typename InputIterator2>
+  inline void intersection(InputIterator1 begin1, InputIterator1 end1,
+                           InputIterator2 begin2, InputIterator2 end2,
+                           unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
+                                    std::distance(begin2, end2)+1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
+    {
+      ValidationPolicy::is_valid(*itr1, *m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr1, *(arr_vec[i].first));
+    }
+
+    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
+    {
+      ValidationPolicy::is_valid(*itr2,*m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr2, *(arr_vec[i].first));
+    }
+
+    Intersection_merge<Aos_2> intersection_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, intersection_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+
+
+  // symmetric_difference of a range of polygons (similar to xor)
+  // (see previous comment about k=5).
+  template <typename InputIterator>
+    inline void symmetric_difference(InputIterator begin, InputIterator end,
+                                     unsigned int k = 5)
+  {
+    typename std::iterator_traits<InputIterator>::value_type pgn;
+    this->symmetric_difference(begin, end, pgn, k);
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+
+  // intersect range of simple polygons (see previous comment about k=5).
+  template <typename InputIterator>
+  inline void symmetric_difference(InputIterator begin, InputIterator end,
+                                   Polygon_2&, unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
+    {
+      ValidationPolicy::is_valid(*itr,*m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Xor_merge<Aos_2> xor_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+  //intersect range of polygons with holes (see previous comment about k=5).
+  template <typename InputIterator>
+    inline void symmetric_difference(InputIterator begin, InputIterator end,
+                                     Polygon_with_holes_2&, unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin, end) + 1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator itr = begin; itr!=end; ++itr, ++i)
+    {
+      ValidationPolicy::is_valid(*itr,*m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr, *(arr_vec[i].first));
+    }
+
+    Xor_merge<Aos_2> xor_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+  }
+
+  // (see previous comment about k=5).
+  template <typename InputIterator1, typename InputIterator2>
+  inline void symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
+                                   InputIterator2 begin2, InputIterator2 end2,
+                                   unsigned int k = 5)
+  {
+    std::vector<Arr_entry> arr_vec (std::distance(begin1, end1)+
+                                    std::distance(begin2, end2)+1);
+    arr_vec[0].first = this->m_arr;
+    unsigned int i = 1;
+
+    for (InputIterator1 itr1 = begin1; itr1!=end1; ++itr1, ++i)
+    {
+      ValidationPolicy::is_valid(*itr1, *m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr1, *(arr_vec[i].first));
+    }
+
+    for (InputIterator2 itr2 = begin2; itr2!=end2; ++itr2, ++i)
+    {
+      ValidationPolicy::is_valid(*itr2, *m_traits);
+      arr_vec[i].first = new Aos_2(m_traits);
+      _insert(*itr2, *(arr_vec[i].first));
+    }
+
+    Xor_merge<Aos_2> xor_merge;
+    _build_sorted_vertices_vectors (arr_vec);
+    _divide_and_conquer(0, static_cast<unsigned int>(arr_vec.size()-1), arr_vec, k, xor_merge);
+
+    //the result arrangement is at index 0
+    this->m_arr = arr_vec[0].first;
+    delete arr_vec[0].second;
+    this->remove_redundant_edges();
+    this->_reset_faces();
+  }
+
+  static void construct_polygon(Ccb_halfedge_const_circulator ccb,
+                                Polygon_2 & pgn, const Traits_2* tr);
+
+  bool is_hole_of_face(Face_const_handle f, Halfedge_const_handle he) const;
+
+  Ccb_halfedge_const_circulator
+  get_boundary_of_polygon(Face_const_iterator f) const;
+
+  void remove_redundant_edges()
+  {
+    this->_remove_redundant_edges(m_arr);
+  }
+
+protected:
+
+  bool is_redundant(Halfedge_handle he)
+  {
+    return he->face()->contained() == he->twin()->face()->contained();
+  }
+
+  typename Aos_2::Dcel::Halfedge*
+  _halfedge(Halfedge_handle h)
+  {
+    return &(*h);
+  }
+
+  void set_flag_of_halfedges_of_final_argt(Halfedge_handle h, int flag)
+  {
+    Halfedge_handle start=h;
+    do{
+      h->set_flag(flag);
+      h=h->next();
+      while (is_redundant(h))
+        h=h->twin()->next();
+    } while(start!=h);
+  }
+
+  void _remove_redundant_edges(Aos_2* arr)
+  {
+    // const integer for handling the status of halfedges
+    // during the flooding algorithm to tag halfedges as
+    // on an inner or outer ccb in the final arrangement
+    static const int ON_INNER_CCB=0;
+    static const int ON_OUTER_CCB=1;
+    static const int NOT_VISITED=-1;
+    static const int NEW_CCB_ASSIGNED=2;
+
+    // Consider the faces incident to a redundant edge and use a union-find
+    // algorithm to group faces in set that will be merged by the removal
+    // of redundant edges. Then only the master of the set will be kept.
+    // Here we also collect edges that needs to be removed.
+    typedef Union_find<typename Aos_2::Dcel::Face*> UF_faces;
+    std::vector<typename UF_faces::handle> face_handles;
+    UF_faces uf_faces;
+    std::vector< typename Aos_2::Dcel::Halfedge* > edges_to_remove;
+    bool all_edges_are_redundant=true;
+
+    for (Edge_iterator itr = arr->edges_begin(); itr != arr->edges_end(); ++itr)
+    {
+      Halfedge_handle he = itr;
+      he->set_flag(NOT_VISITED);
+      he->twin()->set_flag(NOT_VISITED);
+
+      // put in the same set faces that will be merged when removing redundant edges
+      if ( is_redundant(he) )
+      {
+        typename Aos_2::Dcel::Face* f1=&(*he->face()),
+                                  * f2=&(*he->twin()->face());
+        if (f1->id_not_set()){
+          f1->set_id(face_handles.size());
+          face_handles.push_back( uf_faces.make_set( f1 ) );
+        }
+        if (f2->id_not_set()){
+          f2->set_id(face_handles.size());
+          face_handles.push_back( uf_faces.make_set( f2 ) );
+        }
+
+        uf_faces.unify_sets(face_handles[f1->id()], face_handles[f2->id()]);
+        edges_to_remove.push_back( _halfedge(he) );
+      }
+      else
+        all_edges_are_redundant=false;
+    }
+    // the code in this function assumes there is only one unbounded face
+    // (in the if below and in the part to keep the unbounded face even if
+    //  not the master of its set)
+    CGAL_assertion(std::distance(arr->unbounded_faces_begin(),
+                                 arr->unbounded_faces_end()) == 1);
+
+    if (all_edges_are_redundant){
+      bool is_contained=arr->unbounded_faces_begin()->contained();
+      arr->clear();
+      arr->unbounded_faces_begin()->set_contained(is_contained);
+      return;
+    }
+
+    // nothing needs to be done
+    if (edges_to_remove.empty() ) return;
+
+  // Start tagging ccbs
+    // For all halfedge that is part of a face that will be subject to a merge
+    // due to the removal of redundant edges, we now flag whether the halfedge
+    // will be part of an outer ccb or an inner ccb in the final arrangement
+    // (i.e. the arrangement after the removal of redundant edges).
+    // We use the following invariant:
+    //  - a halfedge on an inner ccb will be on an inner ccb in the final argt
+    //  - the twin of a halfedge on an inner ccb will be on an outer ccb in the final argt
+    //  - there is only one outer ccb per bounded face
+    //  - the unbounded face has no ccb
+
+    // first collect all non-redundant halfedges
+    std::vector<Halfedge_handle> halfedges_that_was_on_an_outer_ccb;
+    // bitset indicating if the outer_ccb of a face was already set
+    std::vector<bool> face_outer_ccb_set(face_handles.size(),false);
+    for (Halfedge_iterator itr = arr->halfedges_begin(); itr != arr->halfedges_end(); ++itr)
+    {
+      Halfedge_handle h = itr;
+      if (is_redundant(h))
+      {
+        // mark redundant edges as we will reuse ccb, thus breaking the function is_redundant()
+        // needed for "update halfedge ccb pointers"
+        h->set_flag(NEW_CCB_ASSIGNED);
+        h->twin()->set_flag(NEW_CCB_ASSIGNED);
+      }
+      else{
+        // tag halfedges of modified faces that are on an inner ccb
+        // or twin of a halfedge on an inner ccb.
+        if (h->flag()!=NOT_VISITED) continue;
+        if(h->is_on_inner_ccb())
+        {
+          //visit inner ccb of h in the final arrangement
+          if (!h->face()->id_not_set())
+            set_flag_of_halfedges_of_final_argt(h,ON_INNER_CCB);
+          CGAL_assertion(h->twin()->is_on_outer_ccb());
+          if ( h->twin()->flag()!=NOT_VISITED ||
+               h->twin()->face()->id_not_set()) continue;
+          //visit outer ccb of h in the final arrangement
+          set_flag_of_halfedges_of_final_argt(h->twin(),ON_OUTER_CCB);
+          std::size_t master_id=
+            (*uf_faces.find(face_handles[h->twin()->face()->id()]))->id();
+          face_outer_ccb_set[master_id]=true;
+        }
+        else{
+          if (!h->face()->id_not_set())
+            halfedges_that_was_on_an_outer_ccb.push_back(h);
+        }
+      }
+    }
+
+    bool something_was_updated;
+    // iterative step to propagate changes layer by layer
+    do{
+      something_was_updated=false;
+      // update the bitset using the bit value of the master set
+      // and also set the bit of the unbounded cc to 1 (as it has no unbounded ccb)
+      for(typename UF_faces::iterator it=uf_faces.begin(),
+                                      it_end=uf_faces.end(); it!=it_end; ++it)
+      {
+        if (face_outer_ccb_set[(*it)->id()]) continue;
+        typename UF_faces::handle master=uf_faces.find(it);
+        //remove faces that are not the master of their set (but the unbounded face)
+        if ((*it)->is_unbounded())
+          face_outer_ccb_set[(*master)->id()]=true;
+        if ( master!=it)
+          face_outer_ccb_set[(*it)->id()]=face_outer_ccb_set[(*master)->id()];
+      }
+
+      // update halfedge flag according to the flag of the twin halfedge
+      // or if the outer ccb of the cc was set
+      BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb)
+      {
+        if (h->flag()!=NOT_VISITED) continue;
+        std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id();
+        if (h->twin()->flag()==ON_INNER_CCB){
+          set_flag_of_halfedges_of_final_argt(h,ON_OUTER_CCB);
+          face_outer_ccb_set[face_master_id]=true;
+          something_was_updated=true;
+        }
+        else
+        {
+          if (face_outer_ccb_set[face_master_id]){
+            set_flag_of_halfedges_of_final_argt(h,ON_INNER_CCB);
+            something_was_updated=true;
+          }
+        }
+      }
+    }
+    while(something_was_updated);
+    // at this position there might be some bits in face_outer_ccb_set not set
+    // but they are corresponding to the unbounded face
+  // End tagging ccbs
+
+    // update the next/prev relationship around vertices kept incident
+    // to at least one edge to remove. We link non redundant halfedges together.
+    //We also collect vertices to remove at the same time.
+    std::vector< typename Aos_2::Dcel::Vertex* > vertices_to_remove;
+    for(Vertex_iterator vi=arr->vertices_begin(), vi_end=arr->vertices_end(); vi!=vi_end; ++vi)
+    {
+      typename Aos_2::Dcel::Vertex* v_ptr=&(*vi);
+      Halfedge_handle h_start=vi->incident_halfedges(), h=h_start;
+
+      std::vector<Halfedge_handle> non_redundant_edges;
+      bool found_no_redundant=true;
+      do{
+        if( !is_redundant(h) )
+          non_redundant_edges.push_back(h);
+        else{
+          found_no_redundant=false;
+        }
+        h=h->next()->twin();
+      }while(h!=h_start);
+
+      // if only redundant edges are incident to the vertex, then the
+      // vertex will be removed and nothing needs to be done.
+      if (non_redundant_edges.empty()){
+        vertices_to_remove.push_back(v_ptr);
+        continue;
+      }
+      //if the vertex neighbor is already correct, then continue
+      if (found_no_redundant) continue;
+
+      std::size_t nb_edges=non_redundant_edges.size();
+      CGAL_assertion( nb_edges >= 2);
+
+      non_redundant_edges.push_back(non_redundant_edges.front());
+
+      //update vertex halfedge
+      v_ptr->set_halfedge(_halfedge(non_redundant_edges.back()));
+      for (std::size_t i=0; i<nb_edges; ++i)
+      {
+        Halfedge_handle h1 = non_redundant_edges[i], h2=non_redundant_edges[i+1];
+        if ( h1->next()->twin()!=h2)
+          _halfedge(h1)->set_next(_halfedge(h2->twin()));
+      }
+    }
+
+    //collect faces to remove and update unbounded face flag
+    std::vector< typename Aos_2::Dcel::Face*> faces_to_remove;
+    std::vector< typename Aos_2::Dcel::Outer_ccb* > outer_ccbs_to_remove;
+    std::vector< typename Aos_2::Dcel::Inner_ccb* > inner_ccbs_to_remove;
+    for(typename UF_faces::iterator it=uf_faces.begin(),
+                                    it_end=uf_faces.end(); it!=it_end; ++it)
+    {
+      typename UF_faces::handle master=uf_faces.find(it);
+      //remove faces that are not the master of their set (but the unbounded face)
+      if ( master!=it)
+      {
+        // force to keep the unbounded face
+        if ((*it)->is_unbounded())
+        {
+          face_handles[(*master)->id()]=it;
+          faces_to_remove.push_back(*master);
+        }
+        else
+          faces_to_remove.push_back(*it);
+      }
+
+      //collect for reuse/removal all inner and outer ccbs
+      BOOST_FOREACH(void* ptr, (*it)->_outer_ccbs())
+        outer_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->outer_ccb() );
+      BOOST_FOREACH(void* ptr, (*it)->_inner_ccbs())
+        inner_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->inner_ccb() );
+      (*it)->_outer_ccbs().clear();
+      (*it)->_inner_ccbs().clear();
+    }
+
+    // accessor for  low-level arrangement fonctionalities
+    CGAL::Arr_accessor<Aos_2> accessor(*arr);
+    // update halfedge ccb pointers
+    for (Halfedge_iterator itr = arr->halfedges_begin(); itr != arr->halfedges_end(); ++itr)
+    {
+      Halfedge_handle h = itr;
+      if (h->face()->id_not_set()) continue;
+      CGAL_assertion(h->flag()!=NOT_VISITED);
+
+      // either a redundant edge or an edge of an already handled ccb
+      if ( h->flag()==NEW_CCB_ASSIGNED ) continue;
+
+      CGAL_assertion( h->flag()==ON_INNER_CCB || h->flag()==ON_OUTER_CCB );
+
+      typename Aos_2::Dcel::Face* f=&(*h->face());
+
+      if (!f->id_not_set())
+      {
+        // we use the master of the set as face, but we force to keep the unbounded face,
+        // thus this hack
+        f = *(face_handles[
+                (*uf_faces.find(face_handles[f->id()]))->id()
+              ]);
+        if (h->flag()==ON_INNER_CCB || h->flag()==NOT_VISITED)
+        {
+          typename Aos_2::Dcel::Inner_ccb* inner_ccb = inner_ccbs_to_remove.empty()?
+            accessor.new_inner_ccb():inner_ccbs_to_remove.back();
+          if ( !inner_ccbs_to_remove.empty() ) inner_ccbs_to_remove.pop_back();
+
+          Halfedge_handle hstart=h;
+          do{
+            _halfedge(h)->set_inner_ccb(inner_ccb);
+            h->set_flag(NEW_CCB_ASSIGNED);
+            h=h->next();
+          }while(hstart!=h);
+          f->add_inner_ccb(inner_ccb,_halfedge(h));
+          inner_ccb->set_halfedge(_halfedge(h));
+          inner_ccb->set_face(f);
+        }
+        else{
+          CGAL_assertion(!outer_ccbs_to_remove.empty());
+          typename Aos_2::Dcel::Outer_ccb* outer_ccb = outer_ccbs_to_remove.back();
+          outer_ccbs_to_remove.pop_back();
+          Halfedge_handle hstart=h;
+          do{
+            _halfedge(h)->set_outer_ccb(outer_ccb);
+            h->set_flag(NEW_CCB_ASSIGNED);
+            h=h->next();
+          }while(hstart!=h);
+          f->add_outer_ccb(outer_ccb,_halfedge(h));
+          outer_ccb->set_halfedge(_halfedge(h));
+          outer_ccb->set_face(f);
+        }
+      }
+    }
+
+    //remove no longer used edges, vertices and faces
+    accessor.delete_vertices( vertices_to_remove );
+    accessor.delete_edges( edges_to_remove );
+    accessor.delete_faces( faces_to_remove );
+    accessor.delete_outer_ccbs( outer_ccbs_to_remove );
+    accessor.delete_inner_ccbs( inner_ccbs_to_remove );
+
+    for (typename Aos_2::Face_iterator fit=arr->faces_begin(),
+                                       end=arr->faces_end();
+                                       fit!=end; ++fit)
+    {
+      fit->reset_id(); // reset the id that will be no longer used for this face
+    }
+  }
+
+
+  class Less_vertex_handle
+  {
+    typename Traits_2::Compare_xy_2     comp_xy;
+
+  public:
+
+    Less_vertex_handle (const typename Traits_2::Compare_xy_2& cmp) :
+    comp_xy (cmp)
+    {}
+
+    bool operator() (Vertex_handle v1, Vertex_handle v2) const
+    {
+      return (comp_xy (v1->point(), v2->point()) == SMALLER);
+    }
+  };
+
+
+  void _complement(Aos_2* arr)
+  {
+    for (Face_iterator fit = arr->faces_begin();
+         fit != arr->faces_end();
+         ++fit)
+    {
+      fit->set_contained(!fit->contained());
+    }
+
+    Construct_opposite_2 ctr_opp = m_traits->construct_opposite_2_object();
+    for (Edge_iterator eit = arr->edges_begin();
+         eit != arr->edges_end();
+         ++eit)
+    {
+      Halfedge_handle he = eit;
+      const X_monotone_curve_2& cv = he->curve();
+      arr->modify_edge(he, ctr_opp(cv));
+    }
+  }
+
+  //fix the directions of the curves (given correct marked face)
+  // it should be called mostly after  symmetric_difference.
+  void _fix_curves_direction(Aos_2& arr)
+  {
+    Compare_endpoints_xy_2 cmp_endpoints =
+      arr.geometry_traits()->compare_endpoints_xy_2_object();
+    Construct_opposite_2 ctr_opp =
+      arr.geometry_traits()->construct_opposite_2_object();
+
+    for (Edge_iterator eit = arr.edges_begin();
+         eit != arr.edges_end();
+         ++eit)
+    {
+      Halfedge_handle            he = eit;
+      const X_monotone_curve_2&  cv = he->curve();
+      const bool                 is_cont = he->face()->contained();
+      const Comparison_result    he_res =
+        ((Arr_halfedge_direction)he->direction() == ARR_LEFT_TO_RIGHT) ?
+        SMALLER : LARGER;
+      const bool                 has_same_dir = (cmp_endpoints(cv) == he_res);
+
+      if ((is_cont && !has_same_dir) || (!is_cont && has_same_dir)) {
+        arr.modify_edge(he, ctr_opp(cv));
+      }
+    }
+  }
+
+  void _build_sorted_vertices_vectors (std::vector<Arr_entry>& arr_vec)
+  {
+    Less_vertex_handle    comp (m_traits->compare_xy_2_object());
+    Aos_2                 *p_arr;
+    Vertex_iterator       vit;
+    const std::size_t     n = arr_vec.size();
+    std::size_t           i, j;
+
+    for (i = 0; i < n; i++)
+    {
+      // Allocate a vector of handles to all vertices in the current
+      // arrangement.
+      p_arr = arr_vec[i].first;
+      arr_vec[i].second = new std::vector<Vertex_handle>;
+      arr_vec[i].second->resize (p_arr->number_of_vertices());
+
+      for (j = 0, vit = p_arr->vertices_begin();
+           vit != p_arr->vertices_end();
+           j++, ++vit)
+      {
+        (*(arr_vec[i].second))[j] = vit;
+      }
+
+      // Sort the vector.
+      std::sort (arr_vec[i].second->begin(), arr_vec[i].second->end(), comp);
+    }
+  }
+
+  template <class Merge>
+  void _divide_and_conquer (unsigned int lower, unsigned int upper,
+                            std::vector<Arr_entry>& arr_vec,
+                            unsigned int k, Merge merge_func)
+  {
+    if ((upper - lower) < k)
+    {
+      merge_func(lower, upper, 1, arr_vec);
+      return;
+    }
+
+    unsigned int sub_size = ((upper - lower + 1) / k);
+    unsigned int i = 0;
+    unsigned int curr_lower = lower;
+
+    for (; i<k-1; ++i, curr_lower += sub_size )
+    {
+      _divide_and_conquer(curr_lower, curr_lower + sub_size-1, arr_vec, k,
+                          merge_func);
+    }
+    _divide_and_conquer (curr_lower, upper,arr_vec, k, merge_func);
+    merge_func (lower, curr_lower, sub_size ,arr_vec);
+
+    return;
+  }
+
+  // mark all faces as non-visited
+  void _reset_faces() const
+  {
+    _reset_faces(m_arr);
+  }
+
+  void _reset_faces(Aos_2* arr) const
+  {
+    Face_const_iterator fit = arr->faces_begin();
+    for ( ; fit != arr->faces_end(); ++fit)
+    {
+      fit->set_visited(false);
+    }
+  }
+
+
+  void _insert(const Polygon_2& pgn, Aos_2& arr);
+
+  // The function below is public because
+  // are_holes_and_boundary_pairwise_disjoint of Gps_polygon_validation is
+  // using it.
+  // I have tried to define it as friend function, but with no success
+  // (probably did something wrong with templates and friend.) Besides,
+  // it was like this before I touched it, so I did not have the energy.
+public:
+  void _insert(const Polygon_with_holes_2& pgn, Aos_2& arr);
+
+protected:
+  template<typename PolygonIter>
+  void _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_2& pgn);
+
+  template<typename PolygonIter>
+  void _insert(PolygonIter p_begin, PolygonIter p_end,
+               Polygon_with_holes_2& pgn);
+
+  template <typename OutputIterator>
+  void _construct_curves(const Polygon_2& pgn, OutputIterator oi);
+
+  template <typename OutputIterator>
+  void _construct_curves(const Polygon_with_holes_2& pgn, OutputIterator oi);
+
+
+  bool _is_empty(const Polygon_2& pgn) const
+  {
+    const std::pair<Curve_const_iterator, Curve_const_iterator>& itr_pair =
+      m_traits->construct_curves_2_object()(pgn);
+    return (itr_pair.first == itr_pair.second);
+  }
+
+  bool _is_empty(const Polygon_with_holes_2& ) const
+  {
+    return (false);
+  }
+
+  bool _is_plane(const Polygon_2& ) const
+  {
+    return (false);
+  }
+
+  bool _is_plane(const Polygon_with_holes_2& pgn) const
+  {
+    //typedef typename  Traits_2::Is_unbounded  Is_unbounded;
+    bool unbounded = m_traits->construct_is_unbounded_object()(pgn);
+    std::pair<GP_Holes_const_iterator,
+      GP_Holes_const_iterator> pair =
+      m_traits->construct_holes_object()(pgn);
+    return (unbounded && (pair.first == pair.second));
+    //used to return
+    //  (pgn.is_unbounded() && (pgn.holes_begin() == pgn.holes_end()))
+  }
+
+  void _intersection(const Aos_2& arr)
+  {
+    Aos_2* res_arr = new Aos_2(m_traits);
+    Gps_intersection_functor<Aos_2> func;
+    overlay(*m_arr, arr, *res_arr, func);
+    delete m_arr; // delete the previous arrangement
+
+    m_arr = res_arr;
+    remove_redundant_edges();
+    //fix_curves_direction(); // not needed for intersection
+    CGAL_assertion(is_valid());
+  }
+
+  void _intersection(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res)
+  {
+    Gps_intersection_functor<Aos_2> func;
+    overlay(arr1, arr2, res, func);
+    _remove_redundant_edges(&res);
+    //_fix_curves_direction(res); // not needed for intersection
+    CGAL_assertion(_is_valid(res));
+  }
+
+  template <class Polygon_>
+  void _intersection(const Polygon_& pgn)
+  {
+    if (_is_empty(pgn))
+      this->clear();
+    if (_is_plane(pgn)) return;
+    if (this->is_empty()) return;
+    if (this->is_plane())
+    {
+      Aos_2* arr = new Aos_2(m_traits);
+      _insert(pgn, *arr);
+      delete (this->m_arr);
+      this->m_arr = arr;
+      return;
+    }
+
+    Aos_2 second_arr;
+    _insert(pgn, second_arr);
+    _intersection(second_arr);
+  }
+
+  void _intersection(const Self& other)
+  {
+    if (other.is_empty())
+    {
+      m_arr->clear();
+      return;
+    }
+    if (other.is_plane()) return;
+    if (this->is_empty()) return;
+    if (this->is_plane())
+    {
+      *(this->m_arr) = *(other.m_arr);
+      return;
+    }
+
+    _intersection(*(other.m_arr));
+  }
+
+  void _join(const Aos_2& arr)
+  {
+    Aos_2* res_arr = new Aos_2(m_traits);
+    Gps_join_functor<Aos_2> func;
+    overlay(*m_arr, arr, *res_arr, func);
+    delete m_arr; // delete the previous arrangement
+
+    m_arr = res_arr;
+    remove_redundant_edges();
+    //fix_curves_direction(); // not needed for join
+    CGAL_assertion(is_valid());
+  }
+
+  void _join(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res)
+  {
+    Gps_join_functor<Aos_2> func;
+    overlay(arr1, arr2, res, func);
+    _remove_redundant_edges(&res);
+    //_fix_curves_direction(res); // not needed for join
+    CGAL_assertion(_is_valid(res));
+  }
+
+  template <class Polygon_>
+  void _join(const Polygon_& pgn)
+  {
+    if (_is_empty(pgn)) return;
+    if (_is_plane(pgn))
+    {
+      this->clear();
+
+      // Even in an empty arrangement there can be several faces
+      // (because of the topology traits).
+      for (Face_iterator fit = this->m_arr->faces_begin();
+           fit != this->m_arr->faces_end(); ++fit)
+        fit->set_contained(true);
+      return;
+    }
+    if (this->is_empty())
+    {
+      Aos_2* arr = new Aos_2(m_traits);
+      _insert(pgn, *arr);
+      delete (this->m_arr);
+      this->m_arr = arr;
+      return;
+    }
+    if (this->is_plane()) return;
+
+    Aos_2 second_arr;
+    _insert(pgn, second_arr);
+    _join(second_arr);
+  }
+
+
+  void _join(const Self& other)
+  {
+    if (other.is_empty()) return;
+    if (other.is_plane())
+    {
+      this->clear();
+
+      // Even in an empty arrangement there can be several faces
+      // (because of the topology traits).
+      for (Face_iterator fit = this->m_arr->faces_begin();
+           fit != this->m_arr->faces_end(); ++fit)
+        fit->set_contained(true);
+      return;
+    }
+    if (this->is_empty())
+    {
+      *(this->m_arr) = *(other.m_arr);
+      return;
+    }
+    if (this->is_plane()) return;
+    _join(*(other.m_arr));
+  }
+
+  void _difference(const Aos_2& arr)
+  {
+    Aos_2* res_arr = new Aos_2(m_traits);
+    Gps_difference_functor<Aos_2> func;
+    overlay(*m_arr, arr, *res_arr, func);
+    delete m_arr; // delete the previous arrangement
+
+    m_arr = res_arr;
+    remove_redundant_edges();
+    fix_curves_direction();
+    CGAL_assertion(is_valid());
+  }
+
+  void _difference(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res)
+  {
+    Gps_difference_functor<Aos_2> func;
+    overlay(arr1, arr2, res, func);
+    _remove_redundant_edges(&res);
+    _fix_curves_direction(res);
+    CGAL_assertion(_is_valid(res));
+  }
+
+  template <class Polygon_>
+  void _difference(const Polygon_& pgn)
+  {
+    if (_is_empty(pgn)) return;
+    if (_is_plane(pgn))
+    {
+      this->clear();
+      return;
+    }
+    if (this->is_empty()) return;
+    if (this->is_plane())
+    {
+      Aos_2* arr = new Aos_2(m_traits);
+      _insert(pgn, *arr);
+      delete (this->m_arr);
+      this->m_arr = arr;
+      this->complement();
+      return;
+    }
+
+    Aos_2 second_arr;
+    _insert(pgn, second_arr);
+    _difference(second_arr);
+  }
+
+
+  void _difference(const Self& other)
+  {
+    if (other.is_empty()) return;
+    if (other.is_plane())
+    {
+      this->clear();
+      return;
+    }
+    if (this->is_empty()) return;
+    if (this->is_plane())
+    {
+      *(this->m_arr) = *(other.m_arr);
+      this->complement();
+      return;
+    }
+
+    _difference(*(other.m_arr));
+  }
+
+  void _symmetric_difference(const Aos_2& arr)
+  {
+    Aos_2* res_arr = new Aos_2(m_traits);
+    Gps_sym_diff_functor<Aos_2> func;
+    overlay(*m_arr, arr, *res_arr, func);
+    delete m_arr; // delete the previous arrangement
+
+    m_arr = res_arr;
+    remove_redundant_edges();
+    fix_curves_direction();
+    CGAL_assertion(is_valid());
+  }
+
+  void _symmetric_difference(const Aos_2& arr1, const Aos_2& arr2, Aos_2& res)
+  {
+    Gps_sym_diff_functor<Aos_2> func;
+    overlay(arr1, arr2, res, func);
+    _remove_redundant_edges(&res);
+    _fix_curves_direction(res);
+    CGAL_assertion(_is_valid(res));
+  }
+
+  template <class Polygon_>
+  void _symmetric_difference(const Polygon_& pgn)
+  {
+    if (_is_empty(pgn)) return;
+
+    if (_is_plane(pgn))
+    {
+      this->complement();
+      return;
+    }
+    if (this->is_empty())
+    {
+      Aos_2* arr = new Aos_2(m_traits);
+      _insert(pgn, *arr);
+      delete (this->m_arr);
+      this->m_arr = arr;
+      return;
+    }
+
+    if (this->is_plane())
+    {
+      Aos_2* arr = new Aos_2(m_traits);
+      _insert(pgn, *arr);
+      delete (this->m_arr);
+      this->m_arr = arr;
+      this->complement();
+      return;
+    }
+
+    Aos_2 second_arr;
+    _insert(pgn, second_arr);
+    _symmetric_difference(second_arr);
+  }
+
+
+  void _symmetric_difference(const Self& other)
+  {
+    if (other.is_empty()) return;
+
+    if (other.is_plane())
+    {
+      this->complement();
+      return;
+    }
+    if (this->is_empty())
+    {
+      *(this->m_arr) = *(other.m_arr);
+      return;
+    }
+
+    if (this->is_plane())
+    {
+      *(this->m_arr) = *(other.m_arr);
+      this->complement();
+      return;
+    }
+
+    _symmetric_difference(*(other.m_arr));
+  }
+};
+
+#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h>
+
+} //namespace CGAL
+
+#endif // CGAL_GPS_ON_SURFACE_BASE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h
new file mode 100644
index 0000000..a2c0ea7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h
@@ -0,0 +1,790 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
+//                 Guy Zucker <guyzucke at post.tau.ac.il>
+
+#ifndef CGAL_GPS_ON_SURFACE_BASE_2_IMPL_H
+#define CGAL_GPS_ON_SURFACE_BASE_2_IMPL_H
+
+#include <CGAL/iterator.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/circulator.h>
+#include <CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h>
+#include <CGAL/Arr_accessor.h>
+
+#include <queue>
+#include <list>
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+void Gps_on_surface_base_2<Traits_, TopTraits_,ValidationPolicy>::
+construct_polygon(Ccb_halfedge_const_circulator ccb, Polygon_2 & pgn,
+                  const Traits_* tr)
+{
+  typedef CGAL::Ccb_curve_iterator<Arrangement_on_surface_2>
+    Ccb_curve_iterator;
+  Ccb_curve_iterator begin(ccb, false);
+  Ccb_curve_iterator end(ccb, true);
+
+  tr->construct_polygon_2_object()(begin, end, pgn);
+}
+
+// The comments below was written after trying to understand what the visitors
+// do. There was no comment by the author of this class.
+// This class is used afterwards to extract polygons from the representing
+// arrangement.
+// This scanner is not the same as the Gps_bfs_scanner. In this file, the
+// Gps_bfs_scanner is used with Init_faces_visitor to init the faces of the
+// representing arrangement.
+// It seems that Gps_bfs_scanner is used for a regular bfs scan on the faces
+// of the arrangements, with comparison to Arr_bfs_scanner that cares about
+// inner ccbs and outer ccbs (it treats them differently).
+// If this is the case, we should unite Gps_bfs_scanner with the regular
+// adaptation of arrangement to boost graph.
+template <class Arrangement, class OutputIterator>
+class Arr_bfs_scanner
+{
+public:
+  typedef typename Arrangement::Geometry_traits_2       Gps_traits;
+  typedef typename Arrangement::Topology_traits         Gps_top_traits;
+  typedef typename Gps_traits::Polygon_2                Polygon_2;
+  typedef typename Gps_traits::Polygon_with_holes_2     Polygon_with_holes_2;
+  typedef typename Arrangement::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Arrangement::Face_const_iterator     Face_const_iterator;
+  typedef typename Arrangement::Halfedge_const_iterator Halfedge_const_iterator;
+  typedef typename Arrangement::Outer_ccb_const_iterator
+    Outer_ccb_const_iterator;
+  typedef typename Arrangement::Inner_ccb_const_iterator
+    Inner_ccb_const_iterator;
+
+
+protected:
+  const Gps_traits* m_traits;
+  std::queue<Face_const_iterator> m_holes_q;
+  std::list<Polygon_2> m_pgn_holes;
+  OutputIterator m_oi;
+
+public:
+  /*! Constructor */
+  Arr_bfs_scanner(const Gps_traits* tr, OutputIterator oi) :
+    m_traits(tr),
+    m_oi(oi)
+  {}
+
+  void scan(Arrangement& arr)
+  {
+    Face_const_iterator   ubf;
+    for (ubf = arr.faces_begin(); ubf != arr.faces_end(); ++ubf)
+    {
+      if (ubf->number_of_outer_ccbs() != 0)
+        continue;
+      if (ubf->visited())
+        continue;
+
+      Inner_ccb_const_iterator  holes_it;
+      if (!ubf->contained())
+      {
+        ubf->set_visited(true);
+        for (holes_it = ubf->inner_ccbs_begin();
+             holes_it != ubf->inner_ccbs_end(); ++holes_it)
+        {
+          scan_ccb (*holes_it);
+        }
+      }
+      else
+      {
+        // ubf is contained -> unbounded polygon !!
+        scan_contained_ubf(ubf);
+
+      }
+
+      while(!m_holes_q.empty())
+      {
+        Face_const_iterator top_f = m_holes_q.front();
+        m_holes_q.pop();
+        top_f->set_visited(true);
+        for (holes_it = top_f->inner_ccbs_begin();
+             holes_it != top_f->inner_ccbs_end(); ++holes_it)
+        {
+          scan_ccb(*holes_it);
+        }
+
+        //scan_uncontained_face(top_f->outer_ccb());
+      }
+    }
+
+    Face_const_iterator   fit;
+    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+    {
+      fit->set_visited(false);
+    }
+  }
+
+  OutputIterator output_iterator() const
+  {
+    return m_oi;
+  }
+
+  void scan_ccb(Ccb_halfedge_const_circulator ccb)
+  {
+
+    Polygon_2 pgn_boundary;
+    Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
+      construct_polygon(ccb, pgn_boundary, m_traits);
+
+    Ccb_halfedge_const_circulator ccb_end = ccb;
+    do
+    {
+      Halfedge_const_iterator he = ccb;
+      if (!he->twin()->face()->visited())
+        all_incident_faces(he->twin()->face());
+      ++ccb;
+    }
+    while(ccb != ccb_end);
+    Polygon_with_holes_2 pgn =
+      m_traits->construct_polygon_with_holes_2_object()(pgn_boundary,
+                                                        m_pgn_holes.begin(),
+                                                        m_pgn_holes.end());
+    /*Polygon_with_holes_2 pgn(pgn_boundary,
+                             m_pgn_holes.begin(),
+                             m_pgn_holes.end());*/
+    *m_oi = pgn;
+    ++m_oi;
+    m_pgn_holes.clear();
+  }
+
+  void scan_contained_ubf(Face_const_iterator ubf)
+  {
+    CGAL_assertion(ubf->number_of_outer_ccbs() == 0 && ubf->contained());
+    // ubf is contained -> unbounded polygon !!
+    all_incident_faces(ubf);
+    Polygon_2 boundary;
+    Polygon_with_holes_2 pgn =
+      m_traits->construct_polygon_with_holes_2_object()(boundary,
+                                                        m_pgn_holes.begin(),
+                                                        m_pgn_holes.end());
+    /*Polygon_with_holes_2 pgn(boundary,
+                             m_pgn_holes.begin(),
+                             m_pgn_holes.end());*/
+    *m_oi = pgn;
+    ++m_oi;
+    m_pgn_holes.clear();
+  }
+
+
+  void all_incident_faces(Face_const_iterator f)
+  {
+    CGAL_assertion(!f->visited());
+    f->set_visited(true);
+    if (f->number_of_outer_ccbs() != 0)
+    {
+      if (!f->contained())
+      {
+        for (Outer_ccb_const_iterator oci = f->outer_ccbs_begin();
+             oci != f->outer_ccbs_end(); ++oci)
+        {
+          m_pgn_holes.push_back(Polygon_2());
+          Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
+            construct_polygon(*oci, m_pgn_holes.back(), m_traits);
+        }
+
+        m_holes_q.push(f);
+      }
+
+
+      for (Outer_ccb_const_iterator oci = f->outer_ccbs_begin();
+           oci != f->outer_ccbs_end(); ++oci)
+      {
+        Ccb_halfedge_const_circulator ccb_end = *oci;
+        Ccb_halfedge_const_circulator ccb_circ = ccb_end;
+        do
+        {
+          //get the current halfedge on the face boundary
+          Halfedge_const_iterator he  = ccb_circ;
+          Face_const_iterator new_f = he->twin()->face();
+          if (!new_f->visited())
+          {
+            all_incident_faces(new_f);
+          }
+          ++ccb_circ;
+        }
+        while(ccb_circ != ccb_end);
+      }
+    }
+
+    if (f->contained())
+    {
+      Inner_ccb_const_iterator hit;
+      for(hit = f->inner_ccbs_begin(); hit != f->inner_ccbs_end(); ++hit)
+      {
+        Ccb_halfedge_const_circulator ccb_of_hole = *hit;
+        Halfedge_const_iterator he = ccb_of_hole;
+        if (is_single_face(ccb_of_hole))
+        {
+          CGAL_assertion(!he->twin()->face()->contained());
+
+          m_pgn_holes.push_back(Polygon_2());
+          Gps_on_surface_base_2<Gps_traits, Gps_top_traits>::
+            construct_polygon(he->twin()->face()->outer_ccb(),
+                              m_pgn_holes.back(), m_traits);
+          m_holes_q.push(he->twin()->face());
+        }
+        else
+        {
+          Ccb_halfedge_const_circulator ccb_end = ccb_of_hole;
+          do
+          {
+            Halfedge_const_iterator he = ccb_of_hole;
+            if (!he->twin()->face()->visited())
+              all_incident_faces(he->twin()->face());
+            ++ccb_of_hole;
+          }
+          while(ccb_of_hole != ccb_end);
+        }
+      }
+    }
+  }
+
+  bool is_single_face(Ccb_halfedge_const_circulator ccb)
+  {
+    Ccb_halfedge_const_circulator ccb_end = ccb;
+    Ccb_halfedge_const_circulator ccb_circ = ccb_end;
+    Halfedge_const_iterator he = ccb;
+    Face_const_iterator curr_f = he->twin()->face();
+    do
+    {
+      //get the current halfedge on the face boundary
+      Halfedge_const_iterator he  = ccb_circ;
+      if (he->twin()->face() != curr_f)
+        return false;
+      if (he->twin()->target()->degree() != 2)
+        return false;
+      ++ccb_circ;
+    }
+    while(ccb_circ != ccb_end);
+    return true;
+  }
+};
+
+
+template <class Arrangement>
+class Init_faces_visitor
+{
+  typedef typename Arrangement::Face_iterator             Face_iterator;
+  typedef typename Arrangement::Halfedge_iterator         Halfedge_iterator;
+
+public:
+
+  //! discovered_face
+/*! discovered_face is called by Gps_bfs_scanner when it reveals a new face
+    during a BFS scan. It is important to say that I have a strong suspition
+    that this place is the reason why discovered_face was once called
+    "flip_face" (WTF?)
+  \param old_f The face that was already revealed
+  \param new_f The face that we have just now revealed
+*/
+  void discovered_face(Face_iterator old_f,
+                       Face_iterator new_f,
+                       Halfedge_iterator /*he*/)
+  {
+    new_f->set_contained(!old_f->contained());
+  }
+};
+
+//! _insert
+/*! The function inserts a polygon into an arrangement, assuming that the
+    polygon is contained in one face of the arrangement.
+  \param pgn The polygon to be inserted to the arrangement. pgn must be
+             completely disjoint from the arrangement
+  \param arr The arrangement to insert the polygon to.
+*/
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+void Gps_on_surface_base_2<Traits_, TopTraits_,ValidationPolicy>::
+_insert(const Polygon_2& pgn, Arrangement_on_surface_2 & arr)
+{
+  typedef Arr_accessor<Arrangement_on_surface_2>                  Arr_accessor;
+
+  Arr_accessor  accessor(arr);
+  Compare_endpoints_xy_2  cmp_ends = m_traits->compare_endpoints_xy_2_object();
+
+  std::pair<Curve_const_iterator, Curve_const_iterator> itr_pair =
+    m_traits->construct_curves_2_object()(pgn);
+
+  if (itr_pair.first == itr_pair.second)
+    return;
+
+  Curve_const_iterator curr = itr_pair.first;
+  Curve_const_iterator end  = itr_pair.second;
+
+  const Arr_parameter_space  ps_x =
+    m_traits_adaptor.parameter_space_in_x_2_object()(*curr, ARR_MIN_END);
+  const Arr_parameter_space  ps_y =
+    m_traits_adaptor.parameter_space_in_y_2_object()(*curr, ARR_MIN_END);
+
+  Object obj_f;
+  if ((ps_x == ARR_INTERIOR) && (ps_y == ARR_INTERIOR))
+  {
+    Point_location pl(arr);
+    obj_f = pl.locate(m_traits->construct_min_vertex_2_object()(*curr));
+  }
+  else
+  {
+    obj_f = accessor.locate_curve_end(*curr, ARR_MIN_END, ps_x, ps_y);
+  }
+
+  Face_const_handle const_f;
+  // face should not be contained as the pgn is completly disjoint of the
+  // arrangement.
+  CGAL_assertion(CGAL::assign(const_f, obj_f) && !const_f->contained());
+  CGAL::assign(const_f, obj_f);
+  Face_iterator f = arr.non_const_handle(const_f);
+
+  Halfedge_handle first_he =
+    arr.insert_in_face_interior(*curr, f);
+  //first_he is directed from left to right (see insert_in_face_interior)
+
+  Halfedge_handle curr_he;
+  if (cmp_ends(*curr) == CGAL::SMALLER)
+  {
+    // curr curve and first_he have the same direction
+    curr_he = first_he;
+    first_he = first_he->twin();
+  }
+  else
+  {
+    // curr curve and first_he have opposite directions
+    CGAL_assertion(cmp_ends(*curr) == CGAL::LARGER);
+    curr_he = first_he->twin();
+  }
+
+  Curve_const_iterator temp = curr;
+  ++temp;
+  if (temp == end) // a polygon with circular arcs may have only
+                  // two edges (full circle for example)
+  {
+    /*Halfedge_handle he =
+      arr.insert_at_vertices(*temp, curr_he, first_he);*/
+    bool new_face_created = false;
+    bool dummy_swapped_predecessors = false;
+    Halfedge_handle he = accessor.insert_at_vertices_ex (curr_he,
+                                                         *temp, (cmp_ends(*temp) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                         first_he->next(),
+                                                         new_face_created,
+                                                         dummy_swapped_predecessors);
+    // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
+    // or do we have to disallow swapping?
+
+    CGAL_assertion(new_face_created);
+    CGAL_assertion((he->face() != he->twin()->face()));
+
+    he->face()->set_contained(true);
+    return;
+  }
+
+  //The polygon has 3 or more edges
+  Curve_const_iterator last = end;
+  --last;
+  for(++curr ; curr != last; ++curr)
+  {
+    const X_monotone_curve_2& curr_cv = *curr;
+    if (cmp_ends(curr_cv) == CGAL::SMALLER)
+      curr_he = arr.insert_from_left_vertex(curr_cv, curr_he);
+    else
+    {
+      CGAL_assertion(cmp_ends(curr_cv) == CGAL::LARGER);
+      curr_he = arr.insert_from_right_vertex(curr_cv, curr_he);
+    }
+  }
+
+  const X_monotone_curve_2& last_cv = *last;
+  /*Halfedge_handle last_he =
+    arr.insert_at_vertices(last_cv, curr_he, first_he); */
+  bool new_face_created = false;
+  bool dummy_swapped_predecessors = false;
+  Halfedge_handle last_he =
+    accessor.insert_at_vertices_ex (curr_he,
+                                    last_cv, ( cmp_ends(last_cv) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                    first_he->next(),
+                                    new_face_created,
+                                    dummy_swapped_predecessors);
+  // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
+  // or do we have to disallow swapping?
+
+  CGAL_assertion(new_face_created);
+  CGAL_assertion((last_he->face() != last_he->twin()->face()));
+
+  last_he->face()->set_contained(true);
+}
+
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template<class PolygonIter >
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  insert(PolygonIter p_begin, PolygonIter p_end)
+{
+  typename std::iterator_traits<PolygonIter>::value_type pgn;
+  //check validity of all polygons
+  for( ; p_begin != p_end; ++p_begin)
+  {
+    ValidationPolicy::is_valid(*p_begin, *m_traits);
+  }
+
+  _insert(p_begin, p_end, pgn);
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template<class PolygonIter, class PolygonWithHolesIter>
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  insert(PolygonIter p_begin, PolygonIter p_end,
+         PolygonWithHolesIter pwh_begin, PolygonWithHolesIter pwh_end)
+{
+  typedef std::list<X_monotone_curve_2>                  XCurveList;
+  typedef Init_faces_visitor<Arrangement_on_surface_2>              My_visitor;
+  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor>     Arr_bfs_scanner;
+
+  XCurveList xcurve_list;
+
+  for( ; p_begin != p_end; ++p_begin)
+  {
+    ValidationPolicy::is_valid(*p_begin, *m_traits);
+    _construct_curves(*p_begin, std::back_inserter(xcurve_list));
+  }
+
+  bool is_unbounded = false;
+  for( ; pwh_begin != pwh_end; ++pwh_begin)
+  {
+    ValidationPolicy::is_valid(*pwh_begin, *m_traits);
+    is_unbounded = (is_unbounded || m_traits->construct_is_unbounded_object()(*pwh_begin));
+    // is_unbounded = (is_unbounded || pwh_begin->is_unbounded());
+    _construct_curves(*pwh_begin, std::back_inserter(xcurve_list));
+  }
+  insert_non_intersecting_curves(*m_arr, xcurve_list.begin(), xcurve_list.end());
+
+  if (is_unbounded)
+  {
+    for (Face_iterator fit = m_arr->faces_begin();
+         fit != m_arr->faces_end(); ++fit)
+    {
+      if (fit->number_of_outer_ccbs() == 0)
+        fit->set_contained(true);
+    }
+  }
+
+  My_visitor v;
+  Arr_bfs_scanner scanner(v);
+  scanner.scan(*m_arr);
+  _reset_faces(m_arr);
+}
+
+//insert a range of simple polygons to the arrangement
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template<class PolygonIter>
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_2 & /*pgn*/)
+{
+  for(PolygonIter pitr = p_begin; pitr != p_end; ++pitr)
+  {
+    this->_insert(*pitr, *m_arr);
+  }
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template<class PolygonIter>
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  _insert(PolygonIter p_begin, PolygonIter p_end, Polygon_with_holes_2 & /*pgn*/)
+{
+  typedef std::list<X_monotone_curve_2>                  XCurveList;
+  typedef Init_faces_visitor<Arrangement_on_surface_2>              My_visitor;
+  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor>     Arr_bfs_scanner;
+
+  XCurveList xcurve_list;
+  bool is_unbounded = false;
+  for( ; p_begin != p_end; ++p_begin)
+  {
+    // is_unbounded = (is_unbounded || p_begin->is_unbounded());
+    is_unbounded = (is_unbounded || m_traits->construct_is_unbounded_object()(*p_begin));
+    _construct_curves(*p_begin, std::back_inserter(xcurve_list));
+
+  }
+  insert_non_intersecting_curves(*m_arr, xcurve_list.begin(), xcurve_list.end());
+
+  if (is_unbounded)
+  {
+    for (Face_iterator fit = m_arr->faces_begin();
+         fit != m_arr->faces_end(); ++fit)
+    {
+      if (fit->number_of_outer_ccbs() == 0)
+        fit->set_contained(true);
+    }
+  }
+
+  My_visitor v;
+  Arr_bfs_scanner scanner(v);
+  scanner.scan(*m_arr);
+  _reset_faces(m_arr);
+}
+
+//insert non-sipmle poloygons with holes (non incident edges may have
+// common vertex,  but they dont intersect at their interior
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  _insert(const Polygon_with_holes_2 & pgn, Arrangement_on_surface_2 & arr)
+{
+ // inner function not exposed to user - no validation
+ // ValidationPolicy::is_valid(pgn, *m_traits);
+
+  typedef std::list<X_monotone_curve_2>                  XCurveList;
+  typedef Init_faces_visitor<Arrangement_on_surface_2>          My_visitor;
+  typedef Gps_bfs_scanner<Arrangement_on_surface_2, My_visitor> Arr_bfs_scanner;
+
+  XCurveList xcurve_list;
+  _construct_curves(pgn, std::back_inserter(xcurve_list));
+  insert_non_intersecting_curves(arr, xcurve_list.begin(), xcurve_list.end());
+
+  //if (pgn.is_unbounded())
+  if (m_traits->construct_is_unbounded_object()(pgn))
+  {
+    for (Face_iterator fit = arr.faces_begin();
+         fit != arr.faces_end(); ++fit)
+    {
+      if (fit->number_of_outer_ccbs() == 0)
+        fit->set_contained(true);
+    }
+  }
+
+  My_visitor v;
+  Arr_bfs_scanner scanner(v);
+  scanner.scan(arr);
+  _reset_faces(&arr);
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template <class OutputIterator>
+  void
+  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  _construct_curves(const Polygon_2 & pgn, OutputIterator oi)
+{
+  std::pair<Curve_const_iterator, Curve_const_iterator> itr_pair =
+    m_traits->construct_curves_2_object()(pgn);
+  std::copy (itr_pair.first, itr_pair.second, oi);
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template <class OutputIterator>
+  void Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  _construct_curves(const Polygon_with_holes_2 & pgn, OutputIterator oi)
+{
+  //if (!pgn.is_unbounded())
+  if (!m_traits->construct_is_unbounded_object()(pgn))
+  {
+    const Polygon_2& pgn_boundary =
+      m_traits->construct_outer_boundary_object()(pgn);
+    std::pair<Curve_const_iterator, Curve_const_iterator> itr_pair =
+      m_traits->construct_curves_2_object()(pgn_boundary);
+    std::copy (itr_pair.first, itr_pair.second, oi);
+  }
+  std::pair<GP_Holes_const_iterator, GP_Holes_const_iterator> hpair =
+    m_traits->construct_holes_object()(pgn);
+  GP_Holes_const_iterator hit;
+  for (hit = hpair.first; hit != hpair.second; ++hit)
+  {
+    const Polygon_2& pgn_hole = *hit;
+    std::pair<Curve_const_iterator, Curve_const_iterator> itr_pair =
+      m_traits->construct_curves_2_object()(pgn_hole);
+    std::copy (itr_pair.first, itr_pair.second, oi);
+  }
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  template <class OutputIterator>
+  OutputIterator
+  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  polygons_with_holes(OutputIterator out) const
+{
+  typedef Arr_bfs_scanner<Arrangement_on_surface_2, OutputIterator>     Arr_bfs_scanner;
+  Arr_bfs_scanner scanner(this->m_traits, out);
+  scanner.scan(*(this->m_arr));
+  return (scanner.output_iterator());
+}
+
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  typename Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::Size
+  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  number_of_polygons_with_holes() const
+{
+
+  typedef Arr_bfs_scanner<Arrangement_on_surface_2, Counting_output_iterator>
+    Arr_bfs_scanner;
+  //counting_output_operator CTOR reqires a parameter
+  std::size_t cc = 0;
+  Arr_bfs_scanner scanner(this->m_traits, Counting_output_iterator(&cc));
+  scanner.scan(*(this->m_arr));
+  return (scanner.output_iterator().current_counter());
+}
+
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  bool Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  locate(const Point_2& q, Polygon_with_holes_2& pgn) const
+{
+  Point_location pl(*m_arr);
+
+  Object obj = pl.locate(q);
+  Face_const_iterator f;
+  if (CGAL::assign(f, obj))
+  {
+    if (!f->contained())
+      return false;
+  }
+  else
+  {
+    Halfedge_const_handle he;
+    if (CGAL::assign(he, obj))
+    {
+      if (he->face()->contained())
+        f = he->face();
+      else
+      {
+        CGAL_assertion(he->twin()->face()->contained());
+        f = he->twin()->face();
+      }
+    }
+    else
+    {
+      Vertex_const_handle v;
+      CGAL_assertion(CGAL::assign(v, obj));
+      CGAL::assign(v, obj);
+      Halfedge_around_vertex_const_circulator hav = v->incident_halfedges();
+      Halfedge_const_handle he = hav;
+      if (he->face()->contained())
+        f = he->face();
+      else
+      {
+        CGAL_assertion(he->twin()->face()->contained());
+        f = he->twin()->face();
+      }
+    }
+  }
+
+  typedef Oneset_iterator<Polygon_with_holes_2>    OutputItr;
+  typedef Arr_bfs_scanner<Arrangement_on_surface_2, OutputItr>     Arr_bfs_scanner;
+
+  OutputItr oi (pgn);
+  Arr_bfs_scanner scanner(this->m_traits, oi);
+
+
+  Ccb_halfedge_const_circulator ccb_of_pgn = get_boundary_of_polygon(f);
+  this->_reset_faces();
+  if (ccb_of_pgn == Ccb_halfedge_const_circulator())
+  {
+    // the polygon has no boundary
+
+    // f is unbounded
+    for (Face_iterator fit = m_arr->faces_begin(); fit != m_arr->faces_end();
+         ++fit)
+    {
+      if (fit->number_of_outer_ccbs() == 0)
+        scanner.scan_contained_ubf(fit);
+    }
+  }
+  else
+  {
+    Halfedge_const_handle he_of_pgn = ccb_of_pgn;
+    this->_reset_faces();
+    he_of_pgn->face()->set_visited(true);
+    scanner.scan_ccb(ccb_of_pgn);
+  }
+
+  this->_reset_faces();
+  return true;
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  typename Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::Ccb_halfedge_const_circulator
+  Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  get_boundary_of_polygon(Face_const_iterator f) const
+{
+  CGAL_assertion(!f->visited());
+  f->set_visited(true);
+
+  if (f->number_of_outer_ccbs() == 0) // (f->is_unbounded())
+  {
+    return Ccb_halfedge_const_circulator();
+  }
+
+  // We assume that a polygon has only one outer_ccb. This code does not handle
+  // the case where there are more than 1 outer ccbs. If this is the case, we
+  // need to devise a method to convert the outer ccbs to inner ccbs so we
+  // will have only one outer ccb.
+  if (f->number_of_outer_ccbs() > 1)
+    CGAL_error_msg("Not implemented yet.");
+
+	// Some compilers (VC 9) do not like that we directly access the ccb_circ. So we have
+	// to pass through the iterator.
+  Outer_ccb_const_iterator oci_temp = f->outer_ccbs_begin();
+  Ccb_halfedge_const_circulator ccb_end = *oci_temp;
+  Ccb_halfedge_const_circulator ccb_circ = ccb_end;
+  do
+  {
+    //get the current halfedge on the face boundary
+    Halfedge_const_iterator he  = ccb_circ;
+    Face_const_iterator new_f = he->twin()->face();
+    if (!new_f->visited())
+    {
+      if (is_hole_of_face(new_f, he) && !new_f->contained())
+        return (he->twin());
+      return (get_boundary_of_polygon(new_f));
+    }
+    ++ccb_circ;
+  }
+  while(ccb_circ != ccb_end);
+  CGAL_error();
+  return Ccb_halfedge_const_circulator();
+
+}
+
+template <class Traits_, class TopTraits_, class ValidationPolicy>
+  bool Gps_on_surface_base_2<Traits_, TopTraits_, ValidationPolicy>::
+  is_hole_of_face(Face_const_handle f, Halfedge_const_handle he) const
+{
+  Inner_ccb_const_iterator   holes_it;
+  for (holes_it = f->inner_ccbs_begin();
+       holes_it != f->inner_ccbs_end(); ++holes_it)
+  {
+    Ccb_halfedge_const_circulator ccb = *holes_it;
+    Ccb_halfedge_const_circulator ccb_end = ccb;
+    do
+    {
+      Halfedge_const_handle he_inside_hole = ccb;
+      he_inside_hole = he_inside_hole->twin();
+      if (he == he_inside_hole)
+        return true;
+
+      ++ccb;
+    }
+    while(ccb != ccb_end);
+  }
+
+  return false;
+}
+
+#endif // CGAL_GPS_UTILS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
new file mode 100644
index 0000000..6344629
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
@@ -0,0 +1,165 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_GPS_POLYGON_SIMPILFIER_H
+#define CGAL_GPS_POLYGON_SIMPILFIER_H
+
+#include <CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h>
+#include <CGAL/Sweep_line_2.h>
+#include <CGAL/Sweep_line_2/Arr_construction_subcurve.h>
+#include <CGAL/Sweep_line_2/Arr_construction_event.h>
+
+#include <CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h>
+#include <CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h>
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Arr_accessor.h>
+#include <CGAL/iterator.h>
+
+namespace CGAL {
+
+template <class Arrangement_>
+class Gps_polygon_simplifier
+{
+  typedef Arrangement_                                Arrangement_2;
+  typedef typename Arrangement_2::Geometry_traits_2   Traits_2;
+  typedef typename Traits_2::Curve_const_iterator     Curve_const_iterator;
+  typedef typename Traits_2::Polygon_2                Polygon_2;
+  typedef typename Traits_2::Polygon_with_holes_2     Polygon_with_holes_2;
+  typedef typename Traits_2::Construct_curves_2       Construct_curves_2;
+
+  typedef Gps_simplifier_traits<Traits_2>             Meta_traits;
+  typedef typename Meta_traits::Curve_data            Curve_data;
+  typedef typename Meta_traits::X_monotone_curve_2    Meta_X_monotone_curve_2;
+  typedef typename Arrangement_2::Halfedge_handle     Halfedge_handle;
+  typedef typename Arrangement_2::Halfedge_iterator   Halfedge_iterator;
+  typedef typename Arrangement_2::Face_handle         Face_handle;
+  typedef typename Arrangement_2::Face_iterator       Face_iterator;
+  typedef typename Arrangement_2::Edge_iterator       Edge_iterator;
+  typedef typename Arrangement_2::Vertex_handle       Vertex_handle;
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Arrangement_2::Ccb_halfedge_circulator
+                                                      Ccb_halfedge_circulator;
+  typedef Arr_construction_subcurve<Meta_traits>      Subcurve;
+  typedef Arr_construction_event<Meta_traits,
+                                 Subcurve,
+                                 Arrangement_2>       Event;
+
+  typedef Gps_agg_op_base_visitor<Meta_traits,
+                                  Arrangement_2,
+                                  Event,
+                                  Subcurve>           Visitor;
+
+  typedef CGAL::Sweep_line_2<Meta_traits,
+                             Visitor,
+                             Subcurve,
+                             Event>                   Sweep_line_2;
+
+  typedef Unique_hash_map<Halfedge_handle,
+                          unsigned int>               Edges_hash;
+
+  typedef Unique_hash_map<Face_handle,
+                          unsigned int>               Faces_hash;
+  typedef Gps_bfs_join_visitor<Arrangement_2>         Bfs_visitor;
+  typedef Gps_bfs_scanner<Arrangement_2, Bfs_visitor> Bfs_scanner;
+
+protected:
+  Arrangement_2* m_arr;
+  const Meta_traits* m_traits;
+  bool                 m_own_traits;
+  Visitor              m_visitor;
+  Sweep_line_2         m_sweep_line;
+  Edges_hash           m_edges_hash; // maps halfedge to its BC (boundary counter)
+  Faces_hash           m_faces_hash;  // maps face to its IC (inside count)
+
+public:
+   /*! Constructor. */
+  Gps_polygon_simplifier(Arrangement_2& arr, const Traits_2& tr) :
+    m_arr(&arr),
+    m_traits(new Meta_traits(tr)),
+    m_own_traits(true),
+    m_visitor(&arr, &m_edges_hash),
+    m_sweep_line(m_traits, &m_visitor)
+  {}
+
+  /*! Destructor. */
+  ~Gps_polygon_simplifier()
+  {
+    if (m_own_traits && (m_traits != NULL)) {
+      delete m_traits;
+      m_traits = NULL;
+    }
+  }
+
+  void simplify(const Polygon_2& pgn)
+  {
+    Construct_curves_2 ctr_curves =
+      reinterpret_cast<const Traits_2*>(m_traits)->construct_curves_2_object();
+
+    std::list<Meta_X_monotone_curve_2> curves_list;
+
+    std::pair<Curve_const_iterator,
+              Curve_const_iterator>  itr_pair = ctr_curves(pgn);
+
+    unsigned int index = 0;
+    for(Curve_const_iterator itr = itr_pair.first;
+        itr != itr_pair.second;
+        ++itr, ++index)
+    {
+      Curve_data cv_data(1, 0, index);
+      curves_list.push_back(Meta_X_monotone_curve_2(*itr, cv_data));
+    }
+    m_traits->set_polygon_size(static_cast<unsigned int>(curves_list.size()));
+
+    m_sweep_line.sweep(curves_list.begin(), curves_list.end());
+
+    // we use the first face with out outer ccbs. This assumpsion should
+    // be fixed when we can make a face with no outer ccb to a face with
+    // outer ccb.
+    Face_iterator it;
+    for (it = m_arr->faces_begin(); it != m_arr->faces_end(); ++it)
+      if (it->number_of_outer_ccbs() == 0)
+        break;
+    CGAL_assertion(it != m_arr->faces_end());
+
+    m_faces_hash[it] = 0;
+    Bfs_visitor visitor(&m_edges_hash, &m_faces_hash, 1);
+    visitor.visit_ubf(it, 0);
+    Bfs_scanner scanner(visitor);
+    scanner.scan(*m_arr);
+    visitor.after_scan(*m_arr);
+  }
+
+  const Arrangement_2& arrangement() const
+  {
+    return (*m_arr);
+  }
+
+  Arrangement_2& arrangement()
+  {
+    return (*m_arr);
+  }
+
+};
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h
new file mode 100644
index 0000000..aa21ddc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h
@@ -0,0 +1,800 @@
+// Copyright (c) 2008  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s): Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Ron Wein        <wein at post.tau.ac.il>
+//                 Boris Kozorovitzky <boriskoz at post.tau.ac.il>
+//                 Guy Zucker <guyzucke at post.tau.ac.il>
+
+#ifndef CGAL_GPS_POLYGON_VALIDATION_2_H
+#define CGAL_GPS_POLYGON_VALIDATION_2_H
+
+#include <CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h>
+#include <CGAL/Boolean_set_operations_2/Gps_default_dcel.h>
+#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h>
+
+#include <CGAL/Arrangement_2/Arr_default_planar_topology.h>
+#include <CGAL/Sweep_line_2.h>
+#include <CGAL/Sweep_line_2/Sweep_line_event.h>
+#include <CGAL/Sweep_line_2/Sweep_line_subcurve.h>
+#include <CGAL/Sweep_line_empty_visitor.h>
+#include <CGAL/Arr_default_overlay_traits.h>
+#include <CGAL/Arr_naive_point_location.h>
+
+
+#include <iostream>
+#include <list>
+#include <iterator>
+
+
+namespace CGAL {
+
+/*Arrangement is templated with extended face dcel*/
+template <typename Arrangement_2>
+class ValidationOverlayTraits :
+  public CGAL::Arr_default_overlay_traits<Arrangement_2>
+{
+public:
+  typedef CGAL::Arr_default_overlay_traits<Arrangement_2>       Base;
+  typedef typename Base::Face_handle_A                          Face_handle_A;
+  typedef typename Base::Face_handle_B                          Face_handle_B;
+  typedef typename Base::Face_handle_R                          Face_handle_R;
+
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Arrangement_2::Halfedge_const_handle
+    Halfedge_const_handle;
+  typedef typename Arrangement_2::Face_const_handle
+    Face_const_handle;
+  typedef typename Arrangement_2::Inner_ccb_const_iterator
+    Inner_ccb_const_iterator;
+
+  /* red faces source is the arrangement of holes. The blue faces (face) are
+   * caused by the PWH's outer boundary
+   */
+  virtual void create_face(Face_handle_A red_face, Face_handle_B blue_face,
+                           Face_handle_R /*r_face*/) const
+  {
+    if ((red_face->contained()==true) && (blue_face->contained()==false)) {
+      hole_overlap = true;
+    }
+  }
+
+public:
+  ValidationOverlayTraits() : hole_overlap(false) {}
+  bool getHoleOverlap() {
+    return hole_overlap;
+  }
+  void setHoleOverlap(bool b) {
+    hole_overlap = b;
+    return;
+  }
+private:
+  mutable bool hole_overlap;
+};
+
+/*! \class
+ * A visitor used for checking whether the edges of a polygon are
+ * non-intersecting.
+ */
+template <class ArrTraits_>
+class Gps_polygon_validation_visitor :
+  public Sweep_line_empty_visitor<ArrTraits_>
+{
+private:
+  typedef ArrTraits_                                   Traits_2;
+  typedef Gps_polygon_validation_visitor<Traits_2>     Self;
+  typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
+  typedef typename Traits_2::Point_2                   Point_2;
+
+  typedef Sweep_line_empty_visitor<Traits_2>           Base;
+  typedef typename Base::Event                         Event;
+  typedef typename Base::Subcurve                      Subcurve;
+  typedef typename Base::Status_line_iterator          SL_iterator;
+
+  typedef Basic_sweep_line_2<Traits_2, Self>           Sweep_line;
+
+public:
+  enum Error_code {
+    ERROR_NONE = 0,
+    ERROR_EDGE_INTERSECTION,
+    ERROR_EDGE_VERTEX_INTERSECTION,
+    ERROR_EDGE_OVERLAP,
+    ERROR_VERTEX_INTERSECTION
+  };
+
+  Gps_polygon_validation_visitor(bool is_s_simple = true) :
+    m_is_valid(true),
+    m_is_s_simple(is_s_simple),
+    m_error_code(ERROR_NONE)
+  {}
+
+  template <class XCurveIterator>
+  void sweep(XCurveIterator begin, XCurveIterator end)
+  {
+    //Perform the sweep
+    reinterpret_cast<Sweep_line*>(this->m_sweep_line)->sweep(begin, end);
+  }
+
+  bool after_handle_event(Event* event, SL_iterator, bool)
+  {
+    if (event->is_intersection()) {
+      m_error_code = ERROR_EDGE_INTERSECTION;
+      m_is_valid = false;
+      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
+    }
+    else if (event->is_weak_intersection()) {
+      m_error_code = ERROR_EDGE_VERTEX_INTERSECTION;
+      m_is_valid = false;
+      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
+    }
+    else if (event->is_overlap()) {
+      m_error_code = ERROR_EDGE_OVERLAP;
+      m_is_valid = false;
+      reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
+    } else {
+      if (m_is_s_simple &&
+          (event->number_of_right_curves() + event->number_of_left_curves()) !=
+          2)
+      {
+        m_error_code = ERROR_VERTEX_INTERSECTION;
+        m_is_valid = false;
+        reinterpret_cast<Sweep_line*>(this->m_sweep_line)->stop_sweep();
+      }
+    }
+    return true;
+  }
+
+  bool is_valid() const { return m_is_valid; }
+  Error_code error_code() const { return m_error_code; }
+
+protected:
+  bool m_is_valid;
+  bool m_is_s_simple; // is strictly simple
+
+private:
+  Error_code m_error_code;
+};
+
+
+//Traits_2 templates the General_polygon_set_2 Traits.
+//These include types for polygon and PWH.
+template <typename Traits_2>
+bool is_closed_polygon(const typename Traits_2::Polygon_2& pgn,
+                       const Traits_2& traits)
+{
+  typedef Gps_traits_adaptor<Traits_2>                  Traits_adapter_2;
+  typedef typename Traits_2::Curve_const_iterator       Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+  typedef typename Traits_adapter_2::Construct_vertex_2 Construct_vertex_2;
+
+  Cci_pair itr_pair = traits.construct_curves_2_object()(pgn);
+  Curve_const_iterator begin = itr_pair.first;
+  Curve_const_iterator end = itr_pair.second;
+
+  if (begin == end) return true;  // An empty polygon is valid.
+
+  Traits_adapter_2 traits_adapter(traits);
+  typename Traits_2::Equal_2 equal_func = traits.equal_2_object();
+  Curve_const_iterator curr, next;
+  Construct_vertex_2 construct_vertex_func =
+    traits_adapter.construct_vertex_2_object();
+  curr = next = begin;
+  ++next;
+
+  if (next == end)
+    return false; // A polygon cannot have just a single edge.
+
+  while (next != end) {
+    // Make sure that the current target equals the next source.
+    if (equal_func(construct_vertex_func(*curr, 0),
+                   construct_vertex_func(*curr, 1)))
+      return false;
+
+    if (! equal_func(construct_vertex_func(*curr, 1),
+                     construct_vertex_func(*next, 0)))
+      return false;
+
+    // Move to the next pair of edges.
+    curr = next;
+    ++next;
+  }
+
+  // Make sure that the last target equals the first source.
+  if (equal_func (construct_vertex_func (*curr, 0),
+                  construct_vertex_func (*curr, 1)))
+    return false;
+
+  if (! equal_func (construct_vertex_func (*curr, 1),
+                    construct_vertex_func (*begin, 0)))
+    return false;
+
+  return true;
+}
+
+// Previously known as is_strictly_simple
+template <typename Traits_2>
+bool is_simple_polygon(const typename Traits_2::Polygon_2& pgn,
+                       const Traits_2& traits)
+{
+  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+
+  // Sweep the boundary curves and look for intersections.
+  typedef Gps_polygon_validation_visitor<Traits_2>  Visitor;
+  typedef Sweep_line_2<Traits_2, Visitor>           Sweep_line;
+
+  Cci_pair              itr_pair = traits.construct_curves_2_object()(pgn);
+  Visitor               visitor;
+  Sweep_line            sweep_line (&traits, &visitor);
+
+  visitor.sweep(itr_pair.first, itr_pair.second);
+  if (!visitor.is_valid()) {
+    switch (visitor.error_code()) {
+     case Visitor::ERROR_NONE: break;
+     case Visitor::ERROR_EDGE_INTERSECTION:
+      CGAL_warning_msg(false, "The polygon boundary self intersects at edges.");
+      break;
+
+     case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
+      CGAL_warning_msg(false, "The polygon boundary self (weakly) intersects.");
+      break;
+
+     case Visitor::ERROR_EDGE_OVERLAP:
+      CGAL_warning_msg(false, "The polygon boundary self overlaps.");
+      break;
+
+     case Visitor::ERROR_VERTEX_INTERSECTION:
+      CGAL_warning_msg(false, "The polygon boundary intersects at vertices.");
+      break;
+    }
+    return false;
+  }
+  return true;
+}
+
+template <typename Traits_2>
+bool has_valid_orientation_polygon(const typename Traits_2::Polygon_2& pgn,
+                                   const Traits_2& traits)
+{
+
+  typedef Gps_traits_adaptor<Traits_2>              Traits_adapter_2;
+  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+
+  Cci_pair         itr_pair = traits.construct_curves_2_object()(pgn);
+  Traits_adapter_2 traits_adapter(traits);
+
+  if(itr_pair.first == itr_pair.second)
+    return true; // empty polygon
+
+  return
+    (traits_adapter.orientation_2_object()(itr_pair.first, itr_pair.second) ==
+     COUNTERCLOCKWISE);
+}
+
+/* A valid polygon is :
+ * 1 - Closed or empty polygon
+ * 2 - Simple (previously known as strictly simple)
+ * 3 - Counterclockwise oriented
+ */
+template <typename Traits_2>
+bool is_valid_polygon(const typename Traits_2::Polygon_2& pgn,
+                      const Traits_2& traits)
+{
+  bool closed = is_closed_polygon(pgn,traits);
+  CGAL_warning_msg (closed, "The polygon's boundary is not closed.");
+  if (! closed)
+    return false;
+
+  bool simple = is_simple_polygon(pgn,traits);
+  CGAL_warning_msg (simple, "The polygon is not simple.");
+  if (!simple)
+    return false;
+
+  bool valid_orientation = has_valid_orientation_polygon(pgn,traits);
+  CGAL_warning_msg (valid_orientation,
+                    "The polygon has a wrong orientation.");
+  if (! valid_orientation)
+    return false;
+
+  return true;
+}
+
+
+template <typename Traits_2>
+bool
+is_closed_polygon_with_holes(const typename Traits_2::Polygon_with_holes_2& pgn,
+                             const Traits_2& traits)
+{
+  typedef typename Traits_2::Polygon_with_holes_2       Polygon_with_holes_2;
+  if (! is_closed_polygon(pgn.outer_boundary(),traits)) return false;
+
+  typename Polygon_with_holes_2::Hole_const_iterator    itr;
+  for (itr = pgn.holes_begin(); itr != pgn.holes_end(); ++itr) {
+    if (! is_closed_polygon(*itr,traits)) return false;
+  }
+  return true;
+}
+
+// templated point location version
+template<class Traits_2, class PointLocation>
+bool
+is_crossover_outer_boundary(const typename Traits_2::Polygon_with_holes_2& pgn,
+                            const Traits_2& traits, PointLocation& pl)
+{
+  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+
+  typedef typename Traits_2::Point_2                 Point_2;
+  typedef typename Traits_2::Compare_endpoints_xy_2  Compare_endpoints_xy_2;
+  typedef typename Traits_2::Construct_min_vertex_2  Construct_min_vertex_2;
+  typedef typename Traits_2::Construct_max_vertex_2  Construct_max_vertex_2;
+  typedef CGAL::Gps_default_dcel<Traits_2>           Dcel;
+
+  // IMPORTATNT! TODO!
+  // Currently the topology traits is the bounded planar traits. This
+  // should be replaced with a templated topology traits!
+  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
+                                                     Topology_traits;
+  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits>
+    Polygon_set_2;
+
+  typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2;
+  typedef typename Arrangement_2::Halfedge_handle          Halfedge_handle;
+  typedef typename Arrangement_2::Vertex_handle            Vertex_handle;
+  typedef typename Arrangement_2::Vertex_const_handle      Vertex_const_handle;
+  typedef typename Traits_2::Curve_const_iterator          Curve_const_iterator;
+
+  typename std::list<Halfedge_handle>           he_path;
+  typename std::list<Halfedge_handle>::iterator he_itr;
+  //functors used throughout the function
+  Construct_min_vertex_2 min_functor = traits.construct_min_vertex_2_object();
+  Construct_max_vertex_2 max_functor = traits.construct_max_vertex_2_object();
+  Compare_endpoints_xy_2 cmp_endpoints =  traits.compare_endpoints_xy_2_object();
+
+  Cci_pair itr_pair = traits.construct_curves_2_object()(pgn.outer_boundary());
+  Curve_const_iterator  begin = itr_pair.first;
+  Curve_const_iterator  end = itr_pair.second;
+  if (begin == end) return true;  // An empty polygon is valid.
+  // handles to consecutive curves
+  Curve_const_iterator curr, next;
+  curr = next = begin;
+  // handles to vertices for insert. one maintains the current curve (already
+  // inserted) and next curve's joint vertex.
+  // the other maintains the next curve's second vertex if it already exists in
+  // the arrangement.
+  Vertex_handle joint_ver, second_ver;
+  // closed check guarantees polygon has more than 1 curve
+  ++next;
+  // halfedge handle whose target is always the joint vertex between next and
+  // curr.
+  Halfedge_handle last_he;
+
+  Polygon_set_2 gps(traits);
+  Arrangement_2& arr = gps.arrangement();
+  pl.attach(arr);
+
+  // insert first edge lexicographically to arrangement
+  // compute the joint vertex and insert to the path list a halfedge whose
+  // target is the joint vertex
+  last_he = CGAL::insert_non_intersecting_curve(arr, *curr);
+  if  (cmp_endpoints(*curr) == SMALLER) {
+    // polygon's boundary first curve is in lexicographic direction
+    joint_ver = last_he->target();
+    he_path.push_back(last_he);
+  }
+  else { // polygon's boundary first curve not lexicographic
+    joint_ver = last_he->source();
+    he_path.push_back(last_he->twin());
+  }
+
+  /* insert the rest of the curves to the arrangement efficiently the previous
+   * closed polygon check guarantees equal_func
+   * (construct_vertex_func (*curr, 1), construct_vertex_func (*next, 0)))
+   */
+  while (next != end) {
+    CGAL::Object obj;
+    Vertex_const_handle cver;
+    Point_2 second_point;
+    if (cmp_endpoints(*next) == SMALLER) {
+      // next curve's minimum is the joint vertex. Look if it's max exists in
+      // the arrangement and insert lexicographically
+      second_point = max_functor(*next);
+      obj = pl.locate(second_point);
+      if (CGAL::assign (cver, obj)) {
+        // insert where both vertices exist
+        second_ver = arr.non_const_handle(cver);
+        last_he = arr.insert_at_vertices( *next, joint_ver, second_ver);
+      }
+      else // insert from left vertex
+        last_he = arr.insert_from_left_vertex ( *next,joint_ver) ;
+    } else {
+      // next curve's maximum vertex is the joint vertex. try to locate the
+      // min vertex, and insert from right or from both vertices
+      second_point = min_functor(*next);
+      obj = pl.locate(second_point);
+      if (CGAL::assign (cver, obj))  {
+        // insert where both vertices exist
+        second_ver = arr.non_const_handle(cver);
+        last_he = arr.insert_at_vertices( *next, joint_ver, second_ver);
+      }
+      else  // insert from right vertex
+        last_he = arr.insert_from_right_vertex ( *next,joint_ver) ;
+    }
+    // Move to the next pair of edges.
+    he_path.push_back(last_he);
+    joint_ver=last_he->target();
+    curr = next;
+    ++next;
+  } //end of while
+
+  /* We created a path of halfedges that circulates the polygon
+   * counterclockwise. The polygon should lay on the left of each of these
+   * half edges. If the boundary is invalid, the unbounded face should be
+   * on the left of one of more than one of the halfedges.
+   * The unbounded face is always to the right of the halfedges. We check if
+   * all faces that lay on the right of the halfedges are equal (to the
+   *"unbounded" face).
+   */
+  typename Arrangement_2::Face_handle fh = (*he_path.begin())->twin()->face();
+  for (he_itr = he_path.begin(); he_itr != he_path.end(); he_itr++) {
+    if ((*he_itr)->twin()->face() != fh)
+      return false;
+  }
+  return true;
+}
+
+template<typename Traits_2>
+bool is_crossover_outer_boundary
+(const typename Traits_2::Polygon_with_holes_2& pgn, const Traits_2& traits)
+{
+
+  typedef CGAL::Gps_default_dcel<Traits_2>                      Dcel;
+  // IMPORTATNT! TODO!
+  // Currently the topology traits is the bounded planar traits. This
+  // should be replaced with a templated topology traits!
+  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
+                                                                Topology_traits;
+
+  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits>
+                                                                Polygon_set_2;
+  typedef typename Polygon_set_2::Arrangement_on_surface_2      Arrangement_2;
+  typedef CGAL::Arr_naive_point_location<Arrangement_2>         Naive_pl;
+
+  Naive_pl pl;
+  return is_crossover_outer_boundary(pgn, traits, pl);
+}
+
+// previously known as Simple
+template <typename Traits_2>
+bool is_relatively_simple_polygon_with_holes
+(const typename Traits_2::Polygon_with_holes_2& pgn, const Traits_2& traits)
+{
+  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+  typedef typename Traits_2::Construct_curves_2    Construct_curves_2;
+
+  typedef typename Traits_2::X_monotone_curve_2     X_monotone_curve_2;
+  typedef Gps_polygon_validation_visitor<Traits_2>  Visitor;
+  typedef Sweep_line_2<Traits_2, Visitor>           Sweep_line;
+  typedef typename Traits_2::Polygon_with_holes_2   Polygon_with_holes_2;
+
+  Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
+  // Construct a container of all outer boundary curves.
+  Cci_pair         itr_pair = construct_curves_func (pgn.outer_boundary());
+  std::list<X_monotone_curve_2>  outer_curves;
+  std::copy (itr_pair.first, itr_pair.second,
+             std::back_inserter(outer_curves));
+  // Create visitor and sweep to verify outer boundary is relatively simple
+  Visitor      relative_visitor(false);
+  Sweep_line   sweep_line (&traits, &relative_visitor);
+  relative_visitor.sweep (outer_curves.begin(), outer_curves.end());
+  if (!relative_visitor.is_valid()) {
+    switch (relative_visitor.error_code()) {
+     case Visitor::ERROR_NONE: break;
+     case Visitor::ERROR_EDGE_INTERSECTION:
+      CGAL_warning_msg(false, "The outer boundary self intersects at edges.");
+      break;
+
+     case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
+      CGAL_warning_msg(false, "The outer boundary self (weakly) intersects.");
+      break;
+
+     case Visitor::ERROR_EDGE_OVERLAP:
+      CGAL_warning_msg(false, "The outer boundary self overlaps.");
+      break;
+
+     case Visitor::ERROR_VERTEX_INTERSECTION:
+      CGAL_warning_msg(false, "The outer boundary self intersects at vertices.");
+      break;
+    }
+    return false;
+  }
+
+  // Verify every hole is simple
+  typename Polygon_with_holes_2::Hole_const_iterator  hoit;
+  std::list<X_monotone_curve_2>  hole_curves;
+  for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
+    bool simple_hole = is_simple_polygon(*hoit, traits);
+    if (!simple_hole)
+      return false;
+  }
+  return true;
+}
+
+template <typename Traits_2>
+bool has_valid_orientation_polygon_with_holes
+(const typename Traits_2::Polygon_with_holes_2& pgn, const Traits_2& traits)
+{
+  typedef Gps_traits_adaptor<Traits_2>                  Traits_adapter_2;
+  typedef typename Traits_2::Curve_const_iterator       Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+  typedef typename Traits_2::Construct_curves_2         Construct_curves_2;
+
+  typedef typename Traits_adapter_2::Orientation_2      Check_orientation_2;
+  typedef typename Traits_2::Polygon_with_holes_2       Polygon_with_holes_2;
+
+  Traits_adapter_2 traits_adapter(traits);
+
+  Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
+  Check_orientation_2 check_orientation_func =
+    traits_adapter.orientation_2_object();
+  // Check the orientation of the outer boundary.
+  Cci_pair itr_pair = construct_curves_func (pgn.outer_boundary());
+
+  if ((itr_pair.first != itr_pair.second) &&
+      (check_orientation_func (itr_pair.first, itr_pair.second) !=
+       COUNTERCLOCKWISE))
+  {
+    return false;
+  }
+
+  // Check the orientation of each of the holes.
+  typename Polygon_with_holes_2::Hole_const_iterator    hoit;
+
+  for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
+    itr_pair = construct_curves_func (*hoit);
+
+    if ((itr_pair.first != itr_pair.second) &&
+        (check_orientation_func (itr_pair.first, itr_pair.second) != CLOCKWISE))
+    {
+      return false;
+    }
+  }
+  return true;
+}
+
+/* Verify holes do not intersect between themselves as well with the outer
+ * boundary (except intersection on a vertex which is allowed).
+ *
+ * This efficient implementation utilizes the general poygon set for aggregated
+ * join operations for N holes which should result in a GPS that contains N
+ * independent PWH.
+ * Executing a difference(gps, outer boundary) should result in an empty set if
+ * no holes intersect the boundary.
+ *
+ * An iterative use of the difference free function while iterating over the
+ * holes may have an advantage in case there are numerous holes that intersect
+ * the boundary and the iterative loop will be stopped after a small number of
+ * iterations.
+ */
+template <class Traits_2>
+bool are_holes_and_boundary_pairwise_disjoint
+(const typename Traits_2::Polygon_with_holes_2& pwh, Traits_2& traits)
+{
+  typedef typename Traits_2::Curve_const_iterator    Curve_const_iterator;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>    Cci_pair;
+  typedef typename Traits_2::Construct_curves_2    Construct_curves_2;
+
+  typedef CGAL::Gps_default_dcel<Traits_2>                 Dcel;
+  // IMPORTATNT! TODO!
+  // Currently the topology traits is the bounded planar traits. This
+  // should be replaced with a templated topology traits!
+  typedef typename Default_planar_topology<Traits_2, Dcel>::Traits
+                                                           Topology_traits;
+
+  typedef CGAL::Gps_on_surface_base_2<Traits_2, Topology_traits>
+    Polygon_set_2;
+  typedef typename Polygon_set_2::Size                     Size;
+  typedef  typename Traits_2::Polygon_2                    Polygon_2;
+  typedef typename Traits_2::Polygon_with_holes_2          Polygon_with_holes_2;
+  typedef typename Polygon_with_holes_2::Hole_const_iterator
+    Hole_const_iterator;
+  typedef typename Traits_2::X_monotone_curve_2            X_monotone_curve_2;
+  typedef std::pair<Curve_const_iterator,Curve_const_iterator>
+                                                           Cci_pair;
+  typedef typename Traits_2::Construct_curves_2            Construct_curves_2;
+  typedef typename Traits_2::Construct_general_polygon_with_holes_2
+    Construct_polygon_with_holes_2;
+
+  typedef Gps_polygon_validation_visitor<Traits_2>         Visitor;
+  typedef Sweep_line_2<Traits_2, Visitor>                  Sweep_line ;
+  typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2;
+
+  /* Should be perfored more efficeintly  than using sweep and than
+   * difference().
+   *
+   * Use sweep to find intersections on the interior of curves (not on vertices)
+   * and overlapping edges which are not allowed (note that 0/1 dimension
+   * intersections are not detectes by do_intersect() which only returns the
+   * 2D intersection polygon if exists)
+   * Note that using this sweep alone allows for a hole and an edge to share
+   * a vertex and intersect (like illegal input pgn_w_overlap_hole.dat in
+   * validation_example)
+   */
+  Hole_const_iterator hoit;
+  // Construct a container of all boundary curves.
+  Polygon_2 pgn2 = traits.construct_outer_boundary_object()(pwh);
+  Construct_curves_2    construct_curves_func;
+  Cci_pair itr_pair = construct_curves_func(pgn2);
+
+  std::list<X_monotone_curve_2>  curves;
+  std::copy(itr_pair.first, itr_pair.second, std::back_inserter(curves));
+
+  std::pair<Hole_const_iterator, Hole_const_iterator> pair =
+    traits.construct_holes_object()(pwh);
+  //for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit)
+  for (hoit = pair.first; hoit!=pair.second; ++hoit) {
+    itr_pair = construct_curves_func (*hoit);
+    std::copy (itr_pair.first, itr_pair.second, std::back_inserter(curves));
+  }
+
+  // Perform the sweep and check for curve  intersections on the interior.
+  // Traits_2     traits; moved to top, needed also for boundary.
+  Visitor visitor(false);
+  Sweep_line sweep_line(&traits, &visitor);
+  visitor.sweep(curves.begin(), curves.end());
+  if (!visitor.is_valid()) return false;
+
+  Polygon_set_2 gps(traits);
+  // check for 2D  intersections of holes (holes must be disjoint except for
+  // vertices)
+  Size num_of_holes = 0;
+  // functors for creating a pwh needed for inserting pgns into the arrangement
+  // quickly
+  Construct_polygon_with_holes_2 construct_pwh_functor =
+    traits.construct_polygon_with_holes_2_object() ;
+  for (hoit = pwh.holes_begin(); hoit != pwh.holes_end(); ++hoit) {
+    Polygon_2 hole(*hoit);
+    hole.reverse_orientation();
+    /* gps.join() and gps.insert()requires that the polyon insrted is valid,
+     * and therfore hole orientation must be reversed
+     */
+    bool intersect = gps.do_intersect(hole);
+    if (intersect) return false;
+    else {
+      /* to use gps.insert(hole) it is required that the set coponents and the
+       * new holes  do not intersect.
+       * because the sweep detects shared edges and the do_intersect query
+       * detects 2D intersections we can safely use the insert(pwh) function
+       * whose performance is better than the join(pgn)
+       */
+      Polygon_with_holes_2 empty_pwh = construct_pwh_functor(hole);
+      // traits.Construct_general_polygon_with_holes_2 (hole);
+      // Polygon_with_holes_2 empty_pwh(hole);
+      gps.insert(empty_pwh);
+      num_of_holes++;
+    }
+  }
+  /* not good - doesn't work if intersection at vertices is legal.
+   * Size arr_num_of_holes = gps.number_of_polygons_with_holes();
+   * if (num_of_holes != arr_num_of_holes)
+   *   return false;
+   */
+
+  // check for intersection of holes with the outer boundary
+
+  /* outer boundary can be relatively simple. Execution of
+   * do_intersect(hole, boundary) or difference(hole,boundary) relies on
+   * implementation of General polygon set which has a precondition that
+   * requires valid polygon or PWH to be inserted (not just a simple polygon).
+   * This helper function is utilized after checking for the PWH closure,
+   * relative simplicity and orientation. Therefore it is safe to assume the
+   * outer boundary is  valid PWH with no holes. We can't assume it is a valid
+   * (simple) polygon.
+   */
+
+  //Polygon_with_holes_2 boundary(pwh.outer_boundary(), fit, fit);
+ Polygon_with_holes_2 boundary =  construct_pwh_functor(pwh.outer_boundary());
+  // Unbounded outer boundaries contain all the holes and the holes were checked
+  // and are OK.
+  if (boundary.is_unbounded()) return true;
+
+  /* do_intersect predicate will not suffice as hole can be completely outside
+   * the outer boundary in an (extremely strange) case
+   * The gps now contains all the holes. the difference between the boundary
+   * and a union of all the holes should be the empty set. For performance
+   * reasons, we use a customized overlay traits and perform an arrangement
+   * overlay instead of difference
+   */
+  ValidationOverlayTraits<Arrangement_2> valOverlayTraits;
+  valOverlayTraits.setHoleOverlap(false);
+  Polygon_set_2 gps2(traits);
+
+  Arrangement_2& boundary_arr = gps2.arrangement();
+  gps2._insert(boundary,boundary_arr);
+  Arrangement_2& holes_arr = gps.arrangement();
+  Arrangement_2 output_arr(holes_arr.geometry_traits());
+  overlay(holes_arr, boundary_arr, output_arr, valOverlayTraits);
+  if (valOverlayTraits.getHoleOverlap()) return false;
+
+  /* old code that works less efficiently than the new overly traits
+   * gps.validation_difference(boundary);
+   * if gps is not empty at least one hole intersected the boundary
+   * if (!gps.is_empty())
+   *   return false;
+   */
+  return true;
+}
+
+/* A valid polygon with holes is :
+ * 1 - Has empty or closed boundary and all the holes are closed
+ * 2 - The PWH is relatively simple polygon (holes are simple...)
+ * 3 - Has it's boundary oriented counterclockwise and the holes oriented
+ *     clockwise
+ * 4 - All the segments (boundry and holes) do not cross or intersect in their
+ *     relative interior
+ * 5 - The holes are on the interior of the boundary polygon if the boundary
+ *     is not empty
+ */
+template <typename Traits_2>
+bool
+is_valid_polygon_with_holes(const typename Traits_2::Polygon_with_holes_2& pgn,
+                            const Traits_2& traits)
+{
+  bool closed = is_closed_polygon_with_holes(pgn, traits);
+  CGAL_warning_msg(closed,
+                   "The polygon's boundary or one of its holes is not closed.");
+  if (! closed) return false;
+
+  bool relatively_simple = is_relatively_simple_polygon_with_holes(pgn, traits);
+  CGAL_warning_msg (relatively_simple, "The polygon is not relatively simple.");
+  if (! relatively_simple) return false;
+
+  bool no_cross = is_crossover_outer_boundary(pgn, traits);
+  CGAL_warning_msg (no_cross, "The polygon has a crossover.");
+  if (!no_cross) return false;
+
+  bool valid_orientation = has_valid_orientation_polygon_with_holes(pgn, traits);
+  CGAL_warning_msg (valid_orientation, "The polygon has a wrong orientation.");
+  if (! valid_orientation) return false;
+
+  bool holes_disjoint = are_holes_and_boundary_pairwise_disjoint(pgn, traits);
+  CGAL_warning_msg
+    (holes_disjoint,
+     "Holes of the PWH intersect amongst themselves or with outer boundary");
+  if (! holes_disjoint) return false;
+
+  return true;
+}
+
+template <typename Traits_2>
+bool
+is_valid_unknown_polygon(const typename Traits_2::Polygon_with_holes_2& pgn,
+                         const Traits_2& traits)
+{ return is_valid_polygon_with_holes(pgn, traits); }
+
+template <typename Traits_2>
+bool is_valid_unknown_polygon(const typename Traits_2::Polygon_2& pgn,
+                              const Traits_2& traits)
+{ return is_valid_polygon(pgn, traits); }
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
new file mode 100644
index 0000000..8e1c41f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
@@ -0,0 +1,478 @@
+// Copyright (c) 1997  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_GPS_SIMPLIFIER_TRAITS_H
+#define CGAL_GPS_SIMPLIFIER_TRAITS_H
+
+#include <CGAL/Boolean_set_operations_2/Gps_traits_decorator.h>
+
+namespace CGAL {
+
+class Gps_simplifier_curve_data
+{
+protected:
+  unsigned int m_bc;
+  unsigned int m_twin_bc;
+  unsigned int m_index;
+
+public:
+  Gps_simplifier_curve_data()
+  {}
+
+  Gps_simplifier_curve_data(unsigned int bc,
+                            unsigned int twin_bc,
+                            unsigned int index):
+    m_bc(bc),
+    m_twin_bc(twin_bc),
+    m_index(index)
+  {}
+
+  unsigned int bc() const
+  {
+    return m_bc;
+  }
+
+  unsigned int twin_bc() const
+  {
+    return m_twin_bc;
+  }
+
+  unsigned int index() const
+  {
+    return m_index;
+  }
+
+  unsigned int& index()
+  {
+    return m_index;
+  }
+
+  unsigned int& twin_bc()
+  {
+    return m_twin_bc;
+  }
+
+  void set_bc(unsigned int bc)
+  {
+    m_bc = bc;
+  }
+
+  void set_twin_bc(unsigned int twin_bc)
+  {
+    m_twin_bc = twin_bc;
+  }
+
+  void set_index(unsigned int index)
+  {
+    m_index = index;
+  }
+};
+
+struct Gps_simplifier_point_data
+{
+protected:
+  unsigned int m_index;
+
+public:
+  Gps_simplifier_point_data()
+  {}
+
+  Gps_simplifier_point_data(unsigned int index) : m_index(index)
+  {}
+
+  unsigned int index() const
+  {
+    return m_index;
+  }
+
+  void set_index(unsigned int index)
+  {
+    m_index = index;
+  }
+};
+
+template <class Traits_>
+class Gps_simplifier_traits :
+  public Gps_traits_decorator<Traits_,
+                              Gps_simplifier_curve_data,
+                              Gps_simplifier_point_data>
+{
+public:
+  typedef Traits_    Traits;
+  typedef Gps_traits_decorator<Traits_,
+                               Gps_simplifier_curve_data,
+                               Gps_simplifier_point_data>    Base;
+  typedef Gps_simplifier_traits<Traits>                      Self;
+  typedef typename Traits::X_monotone_curve_2     Base_X_monotone_curve_2;
+  typedef typename Traits::Point_2                Base_Point_2;
+  typedef typename Traits::Construct_min_vertex_2 Base_Construct_min_vertex_2;
+  typedef typename Traits::Construct_max_vertex_2 Base_Construct_max_vertex_2;
+  typedef typename Traits::Compare_endpoints_xy_2 Base_Compare_endpoints_xy_2;
+  typedef typename Traits::Compare_xy_2           Base_Compare_xy_2;
+  typedef typename Traits::Compare_y_at_x_right_2 Base_Compare_y_at_x_right_2;
+  typedef typename Traits::Compare_y_at_x_2       Base_Compare_y_at_x_2;
+  typedef typename Traits::Intersect_2            Base_Intersect_2;
+  typedef typename Traits::Split_2                Base_Split_2;
+
+protected:
+  mutable unsigned int m_pgn_size;
+
+
+public:
+
+  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
+  typedef typename Base::Point_2                  Point_2;
+  typedef typename Base::Multiplicity             Multiplicity;
+
+  typedef typename Base::Curve_data               Curve_data;
+  typedef typename Base::Point_data               Point_data;
+
+  Gps_simplifier_traits()
+  {}
+
+  Gps_simplifier_traits(const Traits & tr) : Base(tr)
+  {}
+
+  unsigned int polygon_size() const
+  {
+    return m_pgn_size;
+  }
+
+  void set_polygon_size(unsigned int pgn_size) const
+  {
+    m_pgn_size = pgn_size;
+  }
+
+  bool is_valid_index(unsigned int index) const
+  {
+    return (index < m_pgn_size);
+  }
+
+  unsigned int invalid_index() const
+  {
+    return (m_pgn_size);
+  }
+
+
+  class Intersect_2
+  {
+  private:
+
+    Base_Intersect_2             m_base;
+    Base_Compare_endpoints_xy_2  m_base_cmp_endpoints;
+    Base_Compare_xy_2            m_base_cmp_xy;
+    Base_Construct_min_vertex_2  m_ctr_min_v;
+    const Self * m_self_tr;
+
+  public:
+
+    /*! Constructor. */
+    Intersect_2 (const Base_Intersect_2& base,
+                 const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
+                 const Base_Compare_xy_2& base_cmp_xy,
+                 const Base_Construct_min_vertex_2& ,
+                 const Self*  tr) :
+      m_base(base),
+      m_base_cmp_endpoints(base_cmp_endpoints),
+      m_base_cmp_xy(base_cmp_xy),
+      m_self_tr(tr)
+    {}
+
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      //// if the two curves are incident, do not intersect them
+      //if(m_self_tr->is_valid_index(cv1.data().index()) &&
+      //   m_self_tr->is_valid_index(cv2.data().index()))
+      //{
+      //  unsigned int index_diff =
+      //    (cv1.data().index() > cv2.data().index()) ?
+      //    (cv1.data().index() - cv2.data().index()):
+      //    (cv2.data().index() - cv1.data().index());
+
+      //  if(index_diff == 1 ||index_diff == m_self_tr->polygon_size() -1)
+      //  {
+      //    return (oi);
+      //  }
+      //}
+      const std::pair<Base_Point_2, Multiplicity>   *base_pt;
+      const Base_X_monotone_curve_2                 *overlap_cv;
+      OutputIterator oi_end;
+      if(m_base_cmp_xy(m_ctr_min_v(cv1.base()),
+                       m_ctr_min_v(cv2.base())) == LARGER)
+        oi_end = m_base(cv1.base(), cv2.base(), oi);
+      else
+        oi_end = m_base(cv2.base(), cv1.base(), oi);
+
+      // convert objects that are associated with Base_X_monotone_curve_2 to
+      // the extenede X_monotone_curve_2
+      for(; oi != oi_end; ++oi)
+      {
+        base_pt = object_cast<std::pair<Base_Point_2, Multiplicity> >(&(*oi));
+
+        if (base_pt != NULL)
+        {
+          Point_data pt_data(m_self_tr->invalid_index());
+          Point_2 point_plus (base_pt->first, pt_data); // the extended point
+          *oi = CGAL::make_object(std::make_pair(point_plus,
+                                                 base_pt->second));
+        }
+        else
+        {
+          overlap_cv = object_cast<Base_X_monotone_curve_2> (&(*oi));
+
+          if (overlap_cv != NULL)
+          {
+            unsigned int ov_bc;
+            unsigned int ov_twin_bc;
+            if(m_base_cmp_endpoints(cv1) == m_base_cmp_endpoints(cv2))
+            {
+              // cv1 and cv2 have the same directions
+              ov_bc = cv1.data().bc() + cv2.data().bc();
+              ov_twin_bc = cv1.data().twin_bc() + cv2.data().twin_bc();
+            }
+            else
+            {
+              // cv1 and cv2 have opposite directions
+              ov_bc = cv1.data().bc() + cv2.data().twin_bc();
+              ov_twin_bc = cv1.data().twin_bc() + cv2.data().bc();
+            }
+
+            if(m_base_cmp_endpoints(*overlap_cv) != m_base_cmp_endpoints(cv1))
+            {
+              // overlap_cv, cv1 have opposite directions
+              std::swap(ov_bc, ov_twin_bc);
+            }
+
+            Curve_data cv_data(ov_bc, ov_twin_bc, m_self_tr->invalid_index());
+            *oi = CGAL::make_object (X_monotone_curve_2 (*overlap_cv, cv_data));
+          }
+        }
+      }
+      //return past-end iterator
+      return oi_end;
+    }
+  };
+
+   /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return Intersect_2(this->m_base_tr->intersect_2_object(),
+                       this->m_base_tr->compare_endpoints_xy_2_object(),
+                       this->m_base_tr->compare_xy_2_object(),
+                       this->m_base_tr->construct_min_vertex_2_object(),
+                       this);
+  }
+
+  class Split_2
+  {
+  private:
+    Base_Split_2      m_base_split;
+    const Self * m_self_tr;
+
+  public:
+
+    /*! Constructor. */
+    Split_2 (const Base_Split_2& base, const Self* tr) :
+      m_base_split(base),
+      m_self_tr(tr)
+    {}
+
+    void operator() (const X_monotone_curve_2& cv, const Point_2 & p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      m_base_split(cv.base(),
+                   p.base(),
+                   c1.base(),
+                   c2.base());
+      const Curve_data& cv_data = cv.data();
+      c1.set_data(Curve_data(cv_data.bc(),
+                             cv_data.twin_bc(),
+                             m_self_tr->invalid_index()));
+
+      c2.set_data(Curve_data(cv_data.bc(),
+                             cv_data.twin_bc(),
+                             m_self_tr->invalid_index()));
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return Split_2(this->m_base_tr->split_2_object(), this);
+  }
+
+  class Construct_min_vertex_2
+  {
+  private:
+    Base_Construct_min_vertex_2 m_base;
+    Base_Compare_endpoints_xy_2 m_base_cmp_endpoints;
+    const Self * m_self_tr;
+
+  public:
+
+    Construct_min_vertex_2(const Base_Construct_min_vertex_2& base,
+                          const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
+                          const Self * tr):
+      m_base(base),
+      m_base_cmp_endpoints(base_cmp_endpoints),
+      m_self_tr(tr)
+    {}
+
+    /*!
+      * Get the left endpoint of the x-monotone curve (segment).
+      * \param cv The curve.
+      * \return The left endpoint.
+      */
+    Point_2 operator() (const X_monotone_curve_2 & cv) const
+    {
+      if(!m_self_tr->is_valid_index(cv.data().index()))
+      {
+        return Point_2 (m_base(cv.base()), m_self_tr->invalid_index());
+      }
+
+      Comparison_result res = m_base_cmp_endpoints(cv);
+      Point_data pt_data;
+      if(res == SMALLER)
+      {
+        // min vertex is the source
+        pt_data.set_index(cv.data().index());
+      }
+      else
+      {
+        // min vertex is the target
+        pt_data.set_index((cv.data().index() + 1) % m_self_tr->polygon_size());
+      }
+      return Point_2 (m_base(cv.base()), pt_data);
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return Construct_min_vertex_2
+      (this->m_base_tr->construct_min_vertex_2_object(),
+       this->m_base_tr->compare_endpoints_xy_2_object(),
+       this);
+  }
+
+
+  class Construct_max_vertex_2
+  {
+  private:
+    Base_Construct_max_vertex_2      m_base;
+    Base_Compare_endpoints_xy_2      m_base_cmp_endpoints;
+    const Self * m_self_tr;
+
+  public:
+
+    Construct_max_vertex_2(const Base_Construct_max_vertex_2& base,
+                          const Base_Compare_endpoints_xy_2& base_cmp_endpoints,
+                          const Self * tr):
+      m_base(base),
+      m_base_cmp_endpoints(base_cmp_endpoints),
+      m_self_tr(tr)
+    {}
+
+    /*!
+      * Get the right endpoint of the x-monotone curve (segment).
+      * \param cv The curve.
+      * \return The left endpoint.
+      */
+    Point_2 operator() (const X_monotone_curve_2 & cv) const
+    {
+      if(!m_self_tr->is_valid_index(cv.data().index()))
+      {
+        return Point_2 (m_base(cv.base()), m_self_tr->invalid_index());
+      }
+      Comparison_result res = m_base_cmp_endpoints(cv);
+      Point_data pt_data;
+      if(res == SMALLER)
+      {
+        // min vertex is the target
+        pt_data.set_index((cv.data().index() + 1) % m_self_tr->polygon_size());
+      }
+      else
+      {
+        // min vertex is the source
+        pt_data.set_index(cv.data().index());
+      }
+      return Point_2 (m_base(cv.base()), pt_data);
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return Construct_max_vertex_2
+      (this->m_base_tr->construct_max_vertex_2_object(),
+       this->m_base_tr->compare_endpoints_xy_2_object(),
+       this);
+  }
+
+  class Compare_xy_2
+  {
+  private:
+    Base_Compare_xy_2       m_base;
+    const Self * m_self_tr;
+
+  public:
+    Compare_xy_2(const Base_Compare_xy_2& base,
+                 const Self * tr):
+      m_base(base),
+      m_self_tr(tr)
+    {}
+
+
+    /*!
+      * Get the left endpoint of the x-monotone curve (segment).
+      * \param cv The curve.
+      * \return The left endpoint.
+      */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      //if one of the indexes is invalid, compare p1 and p2
+      if(! m_self_tr->is_valid_index(p1.data().index()) ||
+        ! m_self_tr->is_valid_index(p2.data().index()))
+        return (m_base(p1.base(), p2.base()));
+
+      // if the two point has the same index, return EQUAL
+      if(p1.data().index() == p2.data().index())
+      {
+        return EQUAL;
+      }
+
+      return (m_base(p1.base(), p2.base()));
+    }
+  };
+
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return Compare_xy_2(this->m_base_tr->compare_xy_2_object(), this);
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h
new file mode 100644
index 0000000..1945f31
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h
@@ -0,0 +1,178 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_GPS_TRAITS_ADAPTOR_H
+#define CGAL_GPS_TRAITS_ADAPTOR_H
+
+#include <CGAL/enum.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+template <typename Traits_>
+class Gps_traits_adaptor : public Traits_ {
+  typedef Traits_                     Base;
+  typedef Gps_traits_adaptor<Base>    Self;
+
+public:
+  typedef typename Base::X_monotone_curve_2      X_monotone_curve_2;
+  typedef typename Base::Point_2                 Point_2;
+  typedef typename Base::Compare_xy_2            Compare_xy_2;
+  typedef typename Base::Compare_y_at_x_right_2  Compare_y_at_x_right_2;
+  typedef typename Base::Compare_endpoints_xy_2  Compare_endpoints_xy_2;
+  typedef typename Base::Construct_min_vertex_2  Construct_min_vertex_2;
+  typedef typename Base::Construct_max_vertex_2  Construct_max_vertex_2;
+
+  /*! Default constructor. */
+  Gps_traits_adaptor() : Base() {}
+
+  /*! Constructor from a base-traits class. */
+  Gps_traits_adaptor(const Base& traits) : Base (traits) {}
+
+  class Construct_vertex_2 {
+  protected:
+    typedef Gps_traits_adaptor<Base>        Traits_adaptor;
+
+    /*! The traits (in case it has state) */
+    const Traits_adaptor& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Construct_vertex_2(const Traits_adaptor& traits) : m_traits(traits) {}
+
+    friend class Gps_traits_adaptor<Base>;
+
+  public:
+    Point_2 operator()(const X_monotone_curve_2& cv, int i) const
+    {
+      const Base& tr = m_traits;
+      Compare_endpoints_xy_2 cmp_endpoints =
+        tr.compare_endpoints_xy_2_object();
+      Construct_min_vertex_2 ctr_min_v = tr.construct_min_vertex_2_object();
+      Construct_max_vertex_2 ctr_max_v = tr.construct_max_vertex_2_object();
+      i %= 2;
+      if (i == 0) {
+        // return the source
+        if (cmp_endpoints(cv) == SMALLER) return (ctr_min_v(cv));
+
+        return (ctr_max_v(cv));
+      }
+
+      // else i==1 (return the target)
+      if (cmp_endpoints(cv) == SMALLER) return (ctr_max_v(cv));
+
+      return (ctr_min_v(cv));
+    }
+  };
+
+  Construct_vertex_2 construct_vertex_2_object() const
+  { return Construct_vertex_2(*this); }
+
+  class Orientation_2 {
+  protected:
+    typedef Gps_traits_adaptor<Base>        Traits_adaptor;
+
+    /*! The traits (in case it has state) */
+    const Traits_adaptor& m_traits;
+
+    /*! Constructor
+     * \param traits the traits (in case it has state)
+     */
+    Orientation_2(const Traits_adaptor& traits) : m_traits(traits) {}
+
+    friend class Gps_traits_adaptor<Base>;
+
+  public:
+    template <class CurveInputIteraor>
+    Orientation operator()(CurveInputIteraor begin,
+                           CurveInputIteraor end) const
+    {
+      Compare_xy_2 cmp_xy = m_traits.compare_xy_2_object();
+      Compare_y_at_x_right_2 cmp_y_at_x_right =
+        m_traits.compare_y_at_x_right_2_object();
+      Construct_vertex_2 ctr_v = m_traits.construct_vertex_2_object();
+
+      CurveInputIteraor from_left_most = begin;
+      CurveInputIteraor into_left_most = end;
+
+      Point_2 left_most_v = ctr_v(*from_left_most, 0);
+
+      --into_left_most;
+
+      CurveInputIteraor ci = from_left_most;
+
+      for (++ci ; ci != end; ++ci) {
+        Comparison_result res_xy = cmp_xy( ctr_v(*ci, 0), left_most_v);
+        if (res_xy == LARGER) continue;
+        if (res_xy == SMALLER) {
+          left_most_v =  ctr_v(*ci, 0);
+          from_left_most = into_left_most = ci;
+          --into_left_most;
+        }
+        else {
+          // res_xy == EQUAL
+          CurveInputIteraor tmp_from_left_most = ci;
+          CurveInputIteraor tmp_into_left_most = ci;
+          --tmp_into_left_most;
+
+          Comparison_result res_from = cmp_y_at_x_right(*from_left_most,
+                                                        *tmp_from_left_most,
+                                                        left_most_v);
+
+          Comparison_result res_to = cmp_y_at_x_right(*into_left_most,
+                                                      *tmp_into_left_most,
+                                                      left_most_v);
+
+          CGAL_assertion(res_from != EQUAL && res_to != EQUAL);
+          if(res_from == LARGER && res_to == SMALLER)
+          {
+            if(cmp_y_at_x_right(*tmp_from_left_most,
+                                *into_left_most,
+                                left_most_v) == LARGER)
+            {
+              from_left_most = tmp_from_left_most;
+              into_left_most = tmp_into_left_most;
+            }
+          }
+          else
+            if (res_from == SMALLER && res_to == LARGER) {
+              if (cmp_y_at_x_right(*tmp_into_left_most,
+                                   *from_left_most,
+                                   left_most_v) == LARGER)
+              {
+                from_left_most = tmp_from_left_most;
+                into_left_most = tmp_into_left_most;
+              }
+            }
+        }
+      }// end for
+      Comparison_result res = cmp_y_at_x_right(*into_left_most,
+                                              *from_left_most,
+                                              left_most_v);
+      CGAL_assertion(res != EQUAL);
+      if(res == SMALLER)
+        return (CLOCKWISE);
+      return (COUNTERCLOCKWISE);
+    }
+  };
+
+  Orientation_2 orientation_2_object() const { return Orientation_2(*this); }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Bounded_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Bounded_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Bounded_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Bounded_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_d.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_with_handle_d.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_with_handle_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_with_handle_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_with_handle_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_with_info_d.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_with_info_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/Box_with_info_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/Box_with_info_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/box_limits.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/box_limits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/box_limits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/box_limits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/segment_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/segment_tree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Box_intersection_d/segment_tree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Box_intersection_d/segment_tree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CC_safe_handle.h b/3rdparty/CGAL-4.8/include/CGAL/CC_safe_handle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CC_safe_handle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CC_safe_handle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base.h b/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CGAL_Ipelet_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v6.h b/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v6.h
new file mode 100644
index 0000000..6464f2f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v6.h
@@ -0,0 +1,1031 @@
+// Copyright (c) 2005-2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sebastien Loriot, Sylvain Pion
+
+
+#ifndef CGAL_IPELET_BASE_H
+#define CGAL_IPELET_BASE_H
+
+// Ipe headers use uint which is not standard.
+#ifdef __APPLE__
+typedef unsigned int uint;
+#endif
+
+#include <ipelib.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Weighted_point.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/grabbers.h>
+#include <CGAL/iterator.h>
+#include <CGAL/tuple.h>
+#include<CGAL/Exact_circular_kernel_2.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/assertions.h>
+
+#include <boost/utility.hpp>
+
+namespace CGAL{
+
+  template <class Kernel,int nbf>
+  class Ipelet_base : public Ipelet {
+  private:  
+    const std::string* SubLab;
+    const std::string* HMsg;
+    std::string Name;
+    IpePage* _page;
+    IpeletHelper* _helper;
+  
+  public:
+    
+    //typedefs
+    typedef typename Kernel::FT                                               FT;
+    typedef typename CGAL::Point_2<Kernel>                                    Point_2;
+    typedef typename CGAL::Weighted_point<Point_2,FT>                         Weighted_point_2;
+    typedef typename Kernel::Segment_2                                        Segment_2;
+    typedef typename Kernel::Ray_2                                            Ray_2;
+    typedef typename Kernel::Line_2                                           Line_2;
+    typedef typename Kernel::Iso_rectangle_2                                  Iso_rectangle_2;
+    typedef typename Kernel::Triangle_2                                       Triangle_2;
+    //~ typedef typename CGAL::Polygon_2<Kernel,std::list<Point_2> >              Polygon_2;
+    typedef typename CGAL::Polygon_2<Kernel>              Polygon_2;
+  
+    typedef typename Kernel::Circle_2                                         Circle_2;
+    typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign>           Circular_arc_2;
+  
+  
+    Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
+      :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),_page(NULL),_helper(NULL){};
+    
+    
+    IpePage* get_IpePage() const {return _page;}
+    IpeletHelper* get_IpeletHelper() const {return _helper;}
+    int IpelibVersion() const { return IPELIB_VERSION; }
+    int NumFunctions() const { return nbf; }
+    virtual const char *Label() const{ return &Name[0]; }
+    const char *About() const {return "http://www.cgal.org";};
+    virtual const char *SubLabel(int function) const {return &SubLab[function][0];};
+    virtual const char *HelpMsg(int function) const{return &HMsg[function][0];};
+    void Run (int i, IpePage *page, IpeletHelper *helper) {
+      _page=page;
+      _helper=helper;
+      try{
+        protected_run(i);
+      }
+      catch(...){
+        helper->MessageBox("Error : Save your page in a file and submit it to \n http://www.cgal.org/bug_report.html","OK",NULL,NULL);
+      }
+    };
+
+    virtual void protected_run(int)=0;
+    
+    void group_selected_objects_() const {
+      get_IpePage()->Group(get_IpeletHelper()->CurrentLayer());    
+    }
+    
+    void transform_selected_objects_(const IpeMatrix& tfm) const {
+      for (IpePage::iterator it = get_IpePage() -> begin();it!=get_IpePage() -> end(); ++it)
+        if (it->Select()) it->Transform(tfm);
+    }    
+    
+    void show_help(bool gen=true) const{
+      std::string hmsg;
+      hmsg="<qt><h1>"+Name+"</h1><ul>";
+      if (gen)
+        for(int i=0;i<nbf-1;++i)
+          hmsg=hmsg+"<li><i>"+SubLab[i]+"</i>: "+HMsg[i]+"</li>";
+      else
+        hmsg=hmsg+"<li>"+HMsg[0]+"</li>";
+      _helper->MessageBox(&hmsg[0],"OK",NULL,NULL);
+      return;
+    }
+
+    
+    //grabbers
+    
+    template <class output_iterator>
+    struct Point_grabber:public internal::Point_grabber<Kernel,output_iterator>{
+      Point_grabber(output_iterator it):internal::Point_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Point_grabber<output_iterator> >
+    point_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Point_grabber<output_iterator>(it));
+    }
+    
+
+    template <class output_iterator>
+    struct Segment_grabber:public internal::Segment_grabber<Kernel,output_iterator>{
+      Segment_grabber(output_iterator it):internal::Segment_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Segment_grabber<output_iterator> >
+    segment_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Segment_grabber<output_iterator>(it));
+    }
+    
+    template <class output_iterator>
+    struct Wpoint_grabber:public internal::Wpoint_grabber<Kernel,output_iterator>{
+      Wpoint_grabber(output_iterator it):internal::Wpoint_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Wpoint_grabber<output_iterator> >
+    wpoint_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Wpoint_grabber<output_iterator>(it));
+    }     
+    
+    //Interaction functions
+    //------------------------------
+    
+    void 
+    print_error_message(const char* s) const
+    {
+      _helper->Message(s);
+    }
+    
+    template <class T>
+    std::pair<int,T> 
+    request_value_from_user(std::string msg) const
+    {
+      IpeString str;
+      std::pair<int,T> ret_val=std::make_pair(-1,T());
+      if (_helper-> GetString(msg.c_str(),str)){
+        if (!str.empty()){
+          IpeLex lex(str);
+          lex >> ret_val.second;
+          ret_val.first=1;
+        }
+        else
+          ret_val.first=0;
+      }
+      return ret_val;
+    }
+
+    //Conversion functions
+    //------------------------------
+    Point_2 
+    segment_endpoint(const IpePathSegment& segment,IpePath* obj_ipe,int i) const
+    {
+      CGAL_precondition(i<2);
+      IpeVector pt_ipe = obj_ipe -> Matrix() * segment.CP(i);
+      return Point_2((double)(pt_ipe.iX),(double)(pt_ipe.iY));//conversion into CGAL point
+    }
+
+    Point_2 
+    to_point_2(IpeObject*  object) const
+    {
+      IpeVector pt_ipe = object-> Matrix() * object-> AsMark() -> Position();
+      return Point_2((double)(pt_ipe.iX),(double)(pt_ipe.iY));//conversion into CGAL point
+    }    
+
+    Circle_2 
+    to_circle_2(IpePath* obj_ipe,int subpath=0) const 
+    {
+      const IpeEllipse* ell_ipe = obj_ipe -> SubPath(subpath) -> AsEllipse();
+      IpeMatrix mat_ipe = obj_ipe -> Matrix() * ell_ipe -> Matrix();
+      FT radius = (mat_ipe*IpeVector(1,0)-mat_ipe.Translation()).Len();
+      IpeVector pt_ipe = mat_ipe.Translation();
+      return Circle_2(Point_2(pt_ipe.iX,pt_ipe.iY),radius*radius);
+    }
+
+    
+    //Picking functions
+    //------------------------------
+
+    bool 
+    is_only_rotated_or_scaled(const IpeMatrix& m) const 
+    {
+      return (m.iA[0]==m.iA[3] && m.iA[1]==-m.iA[2]);
+    }
+
+    bool 
+    is_IPE_circle(IpeObject* object,int subpath=0) const 
+    {
+      return ( object -> AsPath() && object -> AsPath() -> SubPath(subpath) -> AsEllipse() 
+        && is_only_rotated_or_scaled(object ->AsPath()->Matrix()));
+    }
+
+    
+private:
+    //declaration
+    template< class multi_output_iterator >
+    bool read_one_active_object( IpeObject* object,
+      multi_output_iterator it_out) const;
+
+public:    
+
+    template< class V,class O>
+    Iso_rectangle_2 
+    read_active_objects (
+      CGAL::Dispatch_or_drop_output_iterator<V,O> it_out,
+      bool deselect_all=true,
+      bool delete_selected_objects=false) const 
+    {
+      IpeRect bbox_ipe;
+      
+      if (!_page->HasSelection()) {
+        return Iso_rectangle_2();
+      }
+      
+      for(IpePage::iterator it = get_IpePage() -> begin(); it!=get_IpePage() -> end(); ++it){
+        if ( !it->Select() )
+          continue;
+        
+        bbox_ipe.AddRect(it->BBox());
+        
+        //Test one function for segments, circles, circle arcs and polygons
+        bool desel_it=read_one_active_object(it->Object(),it_out);
+        if ( delete_selected_objects && desel_it  )
+          it->SetSelect(IpePgObject::ENone);
+      }
+      
+      if (delete_selected_objects)
+        _page -> Delete();
+      
+      if (deselect_all)
+        _page->DeselectAll();
+      
+      Iso_rectangle_2 bbox_cgal(
+        static_cast<double>(bbox_ipe.Min().iX),static_cast<double>(bbox_ipe.Min().iY),
+        static_cast<double>(bbox_ipe.Max().iX),static_cast<double>(bbox_ipe.Max().iY)
+      );
+        
+        return bbox_cgal;
+    }
+    
+    //drawing functions
+    //------------------------------
+
+    void 
+    copy_attributes(IpeAllAttributes& AAttr,IpeObject* obj_ipe) const 
+    {
+      AAttr.iStroke = obj_ipe -> Stroke();
+      
+      if (obj_ipe->AsFillable()){
+        AAttr.iFill = obj_ipe->AsFillable() -> Fill();
+        AAttr.iLineWidth = obj_ipe->AsFillable() -> LineWidth();
+        AAttr.iDashStyle = obj_ipe->AsFillable() -> DashStyle();
+      }  
+      if (obj_ipe->AsPath()){
+        AAttr.iForwardArrow = obj_ipe->AsPath() -> ForwardArrow();
+        AAttr.iBackwardArrow = obj_ipe->AsPath() -> BackwardArrow();
+      }
+    }
+    
+    
+    void 
+    create_polygon_with_holes(bool delete_underlying_polygons=false) const
+    {
+      std::list<IpeSubPath*> SSPqu;
+      for(IpePage::iterator it=get_IpePage()->begin();it!=get_IpePage()->end();++it){
+        if(it->Select() && it->Object()->AsPath()->SubPath(0)->Closed()){
+          IpeSubPath* ssp=it->Object()->AsPath()->SubPath(0)->Transform(it->Object()->AsPath()->Matrix());
+          SSPqu.push_back(ssp);
+        }
+      }
+      if (!delete_underlying_polygons)
+        get_IpePage() -> DeselectAll();
+      IpePath* obj_ipe = new IpePath(get_IpeletHelper() -> Attributes());// create new objects with current attributes
+      for (std::list<IpeSubPath*>::iterator it=SSPqu.begin();it!=SSPqu.end();++it)  
+        obj_ipe->AddSubPath(*it);
+      if (delete_underlying_polygons)
+        get_IpePage()->Delete();
+      get_IpePage()->push_back(IpePgObject(IpePgObject::ESecondary,get_IpeletHelper()->CurrentLayer(),obj_ipe));    
+    }    
+    
+    void 
+    center_selection_in_page() const 
+    {
+      IpeVector paper_size=get_paper_size();
+      IpeMatrix tfm (1,0,0,1,paper_size.iX/2.,paper_size.iY/2.);
+      for (IpePage::iterator it = get_IpePage()->begin(); it != get_IpePage()->end(); ++it)
+        if (it->Select())
+          it->Transform(tfm);
+    }
+    
+    template<class iterator>
+    IpeSegmentSubPath* 
+    create_polyline(const iterator first, const iterator last,bool setclose=false) const 
+    {
+      if (boost::next(first)!=last){
+        IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
+        IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
+        for (iterator it = boost::next(first);it!=last;++it){
+          IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
+          SSP_ipe -> AppendSegment(Prev_pt,Cur_pt);
+          Prev_pt=Cur_pt;
+        }
+        if (setclose)
+          SSP_ipe->SetClosed(true);
+        return SSP_ipe;
+      }
+      return NULL;
+    }
+    
+    
+    template<class iterator>
+    IpePath* 
+    draw_polyline_in_ipe(const iterator first, const iterator last,
+                         bool setclose=false,bool deselect_all=false,
+                         bool blackfill=false,
+                         typename boost::enable_if<
+                                    boost::is_same<
+                                      typename std::iterator_traits<iterator>::value_type,
+                                      Point_2
+                                    > 
+                                  >::type* =NULL) const 
+    {
+      IpeSegmentSubPath* SSP_ipe=create_polyline(first,last,setclose);
+      if (SSP_ipe!=NULL){
+        IpePath* obj_ipe = new IpePath(_helper->Attributes());
+        obj_ipe->AddSubPath(SSP_ipe);
+        if (blackfill)
+          obj_ipe->SetFill(IpeAttribute::Black());
+        _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
+        if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+        return obj_ipe;
+      }
+      return NULL;  
+    }
+    
+    void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
+      IpeEllipse *ellipse = new IpeEllipse(IpeMatrix(sqrt(CGAL::to_double(C.squared_radius())),0,
+                                                     0,sqrt(CGAL::to_double(C.squared_radius())),
+                                                     to_double(C.center().x()),to_double(C.center().y())
+                                           )
+                                );
+      IpePath *path = new IpePath(_helper->Attributes());
+      path->AddSubPath(ellipse);
+      _page->push_back(IpePgObject(IpePgObject::EPrimary,_helper->CurrentLayer(), path));
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+ 
+    void
+    draw_in_ipe(const Point_2& P,bool deselect_all=false) const 
+    {
+      IpeMark *mark = new IpeMark(_helper->Attributes(), IpeVector(CGAL::to_double(P.x()),CGAL::to_double(P.y())));
+      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),mark));
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+    
+    void 
+    draw_in_ipe(const Segment_2& S,bool deselect_all=false) const 
+    {
+      IpeSegment seg_ipe;
+      seg_ipe.iP = IpeVector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y()));
+      seg_ipe.iQ = IpeVector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y()));
+      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),new IpePath(_helper->Attributes(),seg_ipe)));
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+    
+    template<class Container>
+    void 
+    draw_in_ipe(const CGAL::Polygon_2<Kernel,Container>& poly,bool deselect_all=false) const 
+    {
+      std::list<Point_2> LP;
+      for (typename CGAL::Polygon_2<Kernel,Container>::iterator it=poly.vertices_begin();it!= poly.vertices_end();++it)
+        LP.push_back(*it);
+      draw_polyline_in_ipe(LP.begin(),LP.end(),true,deselect_all,false);
+    }
+
+    void 
+    draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const 
+    {
+      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath;
+      IpeVector ipeS=IpeVector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()),
+                                CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format
+      IpeVector ipeT=IpeVector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()),
+                                CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format
+      SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0,
+                                   0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
+                                     sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),
+                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()),
+                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())),
+                                   ipeS,ipeT);
+      IpePath* obj_ipe = new IpePath(_helper->Attributes());
+      obj_ipe->AddSubPath(SSP_ipe);
+      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+
+
+    void
+    draw_in_ipe(const Triangle_2& t,bool deselect_all=false) const 
+    {
+      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
+      IpeVector P0=IpeVector(t[0].x(),t[0].y());
+      IpeVector P1=IpeVector(t[1].x(),t[1].y());
+      IpeVector P2=IpeVector(t[2].x(),t[2].y());
+      SSP_ipe->AppendSegment(P0,P1);
+      SSP_ipe->AppendSegment(P1,P2);
+      SSP_ipe->AppendSegment(P2,P0);
+      SSP_ipe->SetClosed(true);
+      IpePath* obj_ipe = new IpePath(_helper->Attributes());
+      obj_ipe->AddSubPath(SSP_ipe);
+      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+    
+    void 
+    draw_in_ipe(const Iso_rectangle_2& r,bool deselect_all=false)
+    {
+      IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
+      IpeVector P0=IpeVector(r[0].x(),r[0].y());
+      IpeVector P1=IpeVector(r[1].x(),r[1].y());
+      IpeVector P2=IpeVector(r[2].x(),r[2].y());
+      IpeVector P3=IpeVector(r[3].x(),r[3].y());
+      SSP_ipe->AppendSegment(P0,P1);
+      SSP_ipe->AppendSegment(P1,P2);
+      SSP_ipe->AppendSegment(P2,P3);
+      SSP_ipe->AppendSegment(P3,P0);
+      SSP_ipe->SetClosed(true);
+      IpePath* obj_ipe = new IpePath(_helper->Attributes());
+      obj_ipe->AddSubPath(SSP_ipe);
+      _page->push_back(IpePgObject(IpePgObject::ESecondary,_helper->CurrentLayer(),obj_ipe));      
+      if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
+    }
+    
+    
+    //Drawing function with bbox : global version
+    template <class T>
+    void 
+    draw_in_ipe(const T& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      Segment_2 s;
+      bool success=cast_into_seg(object,bbox,&s);
+      if (success)
+        draw_in_ipe(s,deselect_all);
+    }
+  private:
+    enum Type_circ_arc{SRC,TRG,OSRC,OTRG};
+  public:  
+    void 
+    draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      std::vector<Circular_arc_2> arc_list;
+      const Circle_2& circle=CGAL::cpp11::get<0>(object);
+      restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
+      if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
+        draw_in_ipe(object,deselect_all);
+        return;
+      }
+      
+      const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
+                            &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object);
+      const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
+                            &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object);
+      std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
+      typedef  typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
+      Map_theta_iterator s_it=map_theta.insert(
+                                std::make_pair(get_theta(*source,circle),std::make_pair(OSRC,source)));
+      /*Map_theta_iterator t_it=*/map_theta.insert(
+                                std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
+      
+      for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
+        const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
+                             &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc);
+        const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
+                             &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc);        
+        map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
+        map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
+      }
+      
+      Map_theta_iterator next_s=s_it;
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      switch (next_s->second.first){
+        case TRG:
+          draw_in_ipe(Circular_arc_2(circle,*source,*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+          break;
+        case OSRC:
+	  CGAL_error();
+        case SRC:{
+          Map_theta_iterator current=next_s;
+          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+          draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+          if(next_s->second.first==OTRG) return;
+          break;
+        }
+        case OTRG:
+          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.end();
+          if (next_s->second.first==TRG){
+            draw_in_ipe(object);
+            return;
+          }
+          else
+            return;
+      }
+      
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      Map_theta_iterator current=next_s;
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      do{
+        if (current->second.first==OTRG) return;
+        CGAL_assertion(current->second.first==SRC);
+        draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+        if (next_s->second.first==OTRG) return;
+        CGAL_assertion(next_s->second.first==TRG);
+        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+        current=next_s;
+        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      }while(true);
+      
+    }
+    
+    
+    void
+    draw_in_ipe(const Circle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      std::vector<Circular_arc_2> arc_list;
+      restrict_circle_to_bbox(object,bbox,std::back_inserter(arc_list));
+      if (arc_list.empty() && bbox.has_on_bounded_side(object.center()) )
+        draw_in_ipe(object,deselect_all);
+      else
+        draw_in_ipe(arc_list.begin(),arc_list.end(),false,deselect_all);
+    }
+      
+    
+    void 
+    draw_in_ipe(const Triangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+       for (unsigned int i=0;i!=3;++i)
+        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all);
+    }
+      
+    void 
+    draw_in_ipe(const Iso_rectangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      for (unsigned int i=0;i!=4;++i)
+        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all); 
+    }
+      
+    void 
+    draw_in_ipe(const Polygon_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      for (typename Polygon_2::Edge_const_iterator it=object.edges_begin();it!=object.edges_end();++it)
+        draw_in_ipe(*it,bbox,deselect_all);
+    }
+      
+      
+      
+    template<class GT,class TDS>
+    void 
+    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
+      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
+      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
+      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
+        draw_in_ipe(tri.segment(*it),bbox);
+      if (deselect_all)
+        _page->DeselectAll();
+    }
+    
+    void
+    draw_in_ipe(const Line_2& line,bool deselect_all=false) const 
+    {
+      IpeVector paper_size=get_paper_size();
+      Iso_rectangle_2 bbox(0,0,paper_size.iX,paper_size.iY);
+      draw_in_ipe(line,bbox,deselect_all);
+    }
+      
+    void
+    draw_in_ipe(const Ray_2& ray,bool deselect_all=false)
+    {
+      IpeVector paper_size=get_paper_size();
+      Iso_rectangle_2 bbox(0,0,paper_size.iX,paper_size.iY);
+      draw_in_ipe(ray,bbox,deselect_all);      
+    }
+    
+    template<class GT,class TDS>
+    void
+    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,bool deselect_all=false,bool make_grp=true) const 
+    {
+      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
+      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
+      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
+      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
+        draw_in_ipe(tri.segment(*it));
+      if (make_grp)
+        _page->Group(_helper->CurrentLayer());
+      if (deselect_all)
+        _page->DeselectAll();
+    }
+    
+    template<class iterator>
+    void 
+    draw_in_ipe(const iterator begin,const iterator end,bool make_grp=true,bool deselect_all=false) const
+    {
+      for (iterator it=begin;it!=end;++it)
+        draw_in_ipe(*it);
+      if (make_grp and ++iterator(begin)!=end)
+        _page->Group(_helper->CurrentLayer());
+      if (deselect_all)
+        _page->DeselectAll();      
+    }
+
+    template<class iterator>
+    void
+    draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false,
+     typename boost::enable_if<  boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Point_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Segment_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circle_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circular_arc_2> ,
+                                                  boost::is_same<typename std::iterator_traits<iterator>::value_type,Polygon_2>
+                                                > > > >
+                    >::type* = NULL) const
+    {
+      for (iterator it=begin;it!=end;++it)
+        draw_in_ipe(*it,bbox);
+      if (make_grp and ++iterator(begin)!=end)
+        _page->Group(_helper->CurrentLayer());
+      if (deselect_all)
+        _page->DeselectAll();      
+    }
+    
+    private:
+    
+    IpeVector 
+    get_paper_size() const {
+      if (IPELIB_VERSION >=  60028)
+        return get_IpeletHelper()->StyleSheet()->findLayout().iPaperSize;
+      else
+        return IpeVector(595,842);
+    }
+    
+    struct Voronoi_from_tri{  //Class using stream to get the voronoi diagram
+      std::list<Ray_2> ray_list;
+      std::list<Line_2> line_list;
+      std::list<Segment_2> seg_list;
+
+      void operator<<(const Ray_2& p){ray_list.push_back(p);}
+      void operator<<(const Line_2& p){line_list.push_back(p);}
+      void operator<<(const Segment_2& p){seg_list.push_back(p);}
+
+    };
+    
+    template <class T,class output_iterator>
+    bool 
+    cast_into_seg(const T& obj,const Iso_rectangle_2& bbox,output_iterator out_it) const{
+      CGAL::Object obj_cgal = CGAL::intersection(obj,bbox);
+      Segment_2 s;
+      bool ret=CGAL::assign(s, obj_cgal);
+      if (ret) *out_it++=s;
+      return ret;
+    }
+    
+    //Convert infinite objects into drawable segments
+    template<class iterator,class output_iterator>
+    void 
+    cast_into_seg(const iterator first,const iterator end,
+                  const Iso_rectangle_2& bbox, output_iterator out_it) const
+    {
+      for (iterator it=first;it!=end;++it)
+        cast_into_seg(*it,bbox,out_it);
+    }
+
+    
+    
+    void 
+    draw_dual_(Voronoi_from_tri& v_recup,const Iso_rectangle_2& bbox,bool makegrp) const
+    {
+      std::vector<Segment_2> seg_cont;
+      //filter degenerate segments
+      for(typename std::list<Segment_2>::iterator iteS = v_recup.seg_list.begin();iteS!=v_recup.seg_list.end();){
+        typename std::list<Segment_2>::iterator itc=iteS++;
+        if (itc->is_degenerate())
+          v_recup.seg_list.erase(itc);
+      }
+      
+      cast_into_seg(v_recup.ray_list.begin(),v_recup.ray_list.end(),bbox,std::back_inserter(seg_cont));//cast rays into segments in bbox
+      cast_into_seg(v_recup.line_list.begin(),v_recup.line_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
+      cast_into_seg(v_recup.seg_list.begin(),v_recup.seg_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
+      draw_in_ipe(seg_cont.begin(), seg_cont.end(),makegrp);
+    }
+    
+    public:
+    template<class Triangulation>
+    void 
+    draw_dual_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,bool makegrp=true,bool deselect_all=false) const
+    {
+    //~ template<class GT,class TDS>
+    //~ void draw_dual_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{
+      Voronoi_from_tri v_recup;
+      T.draw_dual(v_recup);
+      draw_dual_(v_recup,bbox,makegrp);
+      if (deselect_all) _page->DeselectAll();
+    }
+
+    template<class Triangulation>
+    void
+    draw_skeleton_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,
+                         bool makegrp=true,bool deselect_all=false) const
+    {
+    //~ template<class GT,class TDS>
+    //~ void draw_skeleton_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{    
+      Voronoi_from_tri v_recup;
+      T.draw_skeleton(v_recup);
+      draw_dual_(v_recup,bbox,makegrp);
+      if (deselect_all) _page->DeselectAll();
+    }
+    
+    //Circle restriction
+  private:
+    inline double get_theta(const Point_2& point, const Circle_2& circle) const {
+      return atan2(CGAL::to_double(point.y()-circle.center().y()),CGAL::to_double(point.x()-circle.center().x()));
+    }
+  
+    //SK objects
+    typedef CGAL::Exact_circular_kernel_2 SK;
+    typedef SK::Circle_2                  Exact_circle_2;
+    typedef SK::Point_2                   Exact_point_2;
+    typedef SK::Circular_arc_point_2      Circular_arc_point_2;
+
+
+
+    //s and t are given such that if center of exact_circle is inside bbox then turn COUNTERCLOCKWISE
+    Circular_arc_2 
+    build_arc(const Exact_circle_2& exact_circle,const SK::Circular_arc_point_2& s,
+              const SK::Circular_arc_point_2& t,bool sign_known=false) const 
+    {
+      Point_2 sd=Point_2(CGAL::to_double(s.x()),CGAL::to_double(s.y()));
+      Point_2 td=Point_2(CGAL::to_double(t.x()),CGAL::to_double(t.y()));
+      Point_2 center(CGAL::to_double(exact_circle.center().x()),CGAL::to_double(exact_circle.center().y()));
+      CGAL::Cartesian_converter<SK,Kernel> conv;
+      Circle_2 approx_circle=conv(exact_circle);  
+      if (!sign_known){
+        CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
+        return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign);
+      }
+      return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
+    }
+
+    void 
+    get_pair_indices(int* array,int* pair) const {
+      for (int i=0;i<8;++i)
+        if (array[i]!=-1) *pair++=i;
+    }
+
+    void 
+    set_done(int* array,int index) const {
+      for (int i =0;i<8;++i)
+        if (array[i]==index) array[i]=-1;
+    }
+
+
+    bool 
+    indices_are_on_opposite_side(int* array) const {
+        if (array[0]!=-1 || array[5]!=-1)
+          return array[2]!=-1 || array[7]!=-1;
+        if (array[1]!=-1 || array[6]!=-1)
+          return array[3]!=-1 || array[4]!=-1;
+        return false;
+    }
+
+    int 
+    count_points(int* array) const {
+      int ret=0;
+      for (int i =0;i<8;++i)
+        if (array[i]!=-1) ++ret;
+      return ret;
+    }
+
+  public:
+    //
+    // .-----7---------2-------.
+    // |                       |
+    // 3                       6
+    // |     indices           |
+    // 4                       1
+    // |                       |
+    // .-----0---------5-------.
+    template <class Output_iterator>
+    void 
+    restrict_circle_to_bbox(const Circle_2& approx_circle,
+                            const Iso_rectangle_2& bbox,Output_iterator out) const
+    {
+      CGAL::Cartesian_converter<Kernel,SK> conv;
+      Exact_circle_2 exact_circle=conv(approx_circle);
+
+      SK::Intersect_2 inter=SK().intersect_2_object();
+      std::vector< std::pair<Circular_arc_point_2,unsigned> > points;
+      points.reserve(8);
+      
+      std::vector<CGAL::Object> ints;
+      ints.reserve(2);
+      std::pair<Circular_arc_point_2,unsigned> tmp_pt;
+      
+      int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1};
+      
+      for (unsigned i=0;i!=4;++i){
+        ints.clear();
+        SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4]));
+        inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints));
+        unsigned index=0;
+        bool ok=true;
+        switch (ints.size()){
+          case 1:
+            ok=CGAL::assign(tmp_pt,ints[0]);
+            CGAL_assertion(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[i]=index;
+            indices[(i+1)%4+4]=index;
+            break;
+          case 2:
+            int right_ind=i<2?0:1;
+            ok=CGAL::assign(tmp_pt,ints[right_ind]);
+            CGAL_assertion(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[i]=index;
+            ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]);
+            CGAL_assertion(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[(i+1)%4+4]=index;      
+            break;
+        }
+      }
+
+      //corner case
+      for (unsigned i=0;i!=4;++i){
+        if (indices[i]!=-1 && indices[i+4]!=-1){
+          *out++=build_arc(exact_circle,points[ indices[i+4] ].first,points[ indices[i] ].first);
+          if (points[ indices[i] ].second==1) set_done(indices,indices[i]);
+          else indices[i]=-1;      
+          if (points[ indices[i+4] ].second==1) set_done(indices,indices[i+4]);
+          else indices[i+4]=-1;
+        }
+      }
+      int rem_pt=count_points(indices);
+      if (rem_pt==4){
+        //double opposite
+        if (indices[0]!=-1){
+          *out++=build_arc(exact_circle,points[ indices[7] ].first,points[ indices[0] ].first);
+          if (indices[7]!=indices[2] && indices[0]!=indices[5])
+            *out++=build_arc(exact_circle,points[ indices[5] ].first,points[ indices[2] ].first);
+        }
+        else{
+          *out++=build_arc(exact_circle,points[ indices[6] ].first,points[ indices[3] ].first);
+          if (indices[6]!=indices[1] && indices[3]!=indices[4])
+            *out++=build_arc(exact_circle,points[ indices[4] ].first,points[ indices[1] ].first);      
+        }
+        return;  
+      }
+      
+      if (rem_pt==2){
+        int pair[2];
+        get_pair_indices(indices,pair);
+        if (!indices_are_on_opposite_side(indices))
+          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first,true);
+        else
+          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first);
+        return;
+      }
+      CGAL_assertion (rem_pt==0);
+    }
+  };
+  
+  
+  //definition
+  template <class Kernel,int nbf>
+  template< class multi_output_iterator >
+  bool 
+  Ipelet_base<Kernel,nbf>::read_one_active_object(IpeObject* object,
+                                                  multi_output_iterator it_out) const 
+  {
+    if (object->AsGroup()){
+      bool deselect_grp=false;
+      for (IpeGroup::const_iterator it=object->AsGroup()->begin();
+                                    it!=object->AsGroup()->end();++it)
+      {
+        IpeObject *obj = (*it)->Clone();
+        obj->SetMatrix(obj->Matrix()*object->Matrix());
+        bool cur=read_one_active_object(obj,it_out);
+        deselect_grp=deselect_grp || cur;
+      }
+      return deselect_grp;
+    }
+    
+    //detect Points
+    if( object->AsMark() ){
+      if ( !CGAL::Is_in_tuple<Point_2,typename multi_output_iterator::Value_type_tuple>::value ) 
+        return true;
+      it_out++=to_point_2(object);
+      return false;
+    }
+    bool to_deselect=true;
+    //Test one function for segments, circles, circle arcs and polygons
+    if (object->AsPath()){
+      //iterate on each subpath
+      to_deselect=false;
+      for (int i=0;i<object->AsPath()->NumSubPaths();++i){
+        if(object->AsPath()-> SubPath(i)->AsSegs()){
+          std::list<Segment_2> seg_list;
+          bool is_polygon=object-> AsPath() -> SubPath(i)->Closed();
+          
+          const IpeSegmentSubPath* SSP_ipe = object -> AsPath() -> SubPath(i) -> AsSegs();
+          for(int j=0; j< SSP_ipe->NumSegments();++j){
+            if (SSP_ipe -> Segment(j).Type()==IpePathSegment::ESegment){
+              //TODO depending on if current_it  is  a polygon or not do not do the same thing
+              seg_list.push_back(Segment_2(segment_endpoint(SSP_ipe -> Segment(j),object -> AsPath(),0),
+                                  segment_endpoint(SSP_ipe -> Segment(j),object -> AsPath(),1)));
+            }
+            else{
+              //retrieve circle arcs
+              if(SSP_ipe -> Segment(j).Type()==IpePathSegment::EArc &&
+                 is_only_rotated_or_scaled(object->AsPath()->Matrix()))
+              {//retreve circle arcs
+                if ( !CGAL::Is_in_tuple<Circular_arc_2,typename multi_output_iterator::Value_type_tuple>::value ){
+                  to_deselect=true;
+                  continue;
+                }
+                is_polygon=false;
+                IpePath* obj_ipe=object->AsPath();
+                IpeMatrix mat=obj_ipe->Matrix() * SSP_ipe->Segment(j).Matrix();
+                IpeVector ipe_center=IpeVector(mat.iA[4],mat.iA[5]);
+                IpeVector ipe_first=obj_ipe->Matrix() * SSP_ipe->Segment(j).CP(0);
+                IpeVector ipe_last=obj_ipe->Matrix() * SSP_ipe->Segment(j).Last();
+                //TODO Check how object is defined
+                Circular_arc_2 arc(
+                            Circle_2(Point_2(ipe_center.iX,ipe_center.iY),(ipe_first-ipe_center).Len()*(ipe_first-ipe_center).Len()),
+                            Point_2(ipe_first.iX,ipe_first.iY),
+                            Point_2(ipe_last.iX,ipe_last.iY),
+                            mat.iA[0]*mat.iA[3]-mat.iA[1]*mat.iA[2]<0?CGAL::CLOCKWISE:CGAL::COUNTERCLOCKWISE
+                          );
+                it_out++=arc;
+              }
+              else
+                to_deselect=true;
+            }
+          }
+          if (object->AsPath() -> SubPath(i)->Closed() && 
+              (SSP_ipe -> Segment(0).CP(0)-SSP_ipe -> Segment(SSP_ipe->NumSegments()-1).CP(1)).Len()!=0 ){ //for close polygon, seg
+            seg_list.push_back( Segment_2(
+                              segment_endpoint(SSP_ipe -> Segment(SSP_ipe->NumSegments()-1),object-> AsPath(),1),
+                              segment_endpoint(SSP_ipe -> Segment(0),object-> AsPath(),0)
+                              ));
+          }
+          //~ if (seg_list.empty())
+            //~ to_deselect=true;
+          
+          if (is_polygon){
+            if (  !CGAL::Is_in_tuple<Polygon_2,typename multi_output_iterator::Value_type_tuple>::value  )
+              to_deselect=true;
+            else{
+              Polygon_2 polygon;
+              typename std::list<Segment_2>::iterator its=seg_list.begin();
+              for (;its!=seg_list.end();++its)
+                polygon.push_back(its->source());
+              it_out++=polygon;
+            }
+          }
+          else{
+            if (  !CGAL::Is_in_tuple<Segment_2,typename multi_output_iterator::Value_type_tuple>::value  )
+              to_deselect=true;
+            else{
+              for (typename std::list<Segment_2>::iterator its=seg_list.begin();its!=seg_list.end();++its)
+                it_out++=*its;
+            }
+          }
+        }
+        else
+          if (is_IPE_circle(object,i)){
+            if (  !CGAL::Is_in_tuple<Circle_2,typename multi_output_iterator::Value_type_tuple>::value )
+              to_deselect=true;
+            else{
+              Circle_2 C=to_circle_2(object -> AsPath(),i);
+              it_out++=C;
+            }
+          }
+          else
+            to_deselect=true; // avoid deleting no handled objects
+      }
+    }
+    return to_deselect;
+  }
+
+} //CGAL
+
+#define CGAL_IPELET(T) IPELET_DECLARE Ipelet *NewIpelet(){ return new T; }
+
+#endif //CGAL_IPELET_BASE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v7.h b/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v7.h
new file mode 100644
index 0000000..d2202a0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CGAL_Ipelet_base_v7.h
@@ -0,0 +1,1037 @@
+// Copyright (c) 2005-2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sebastien Loriot, Sylvain Pion
+
+
+#ifndef CGAL_IPELET_BASE_H
+#define CGAL_IPELET_BASE_H
+
+// Ipe headers use uint which is not standard.
+#ifdef __APPLE__
+typedef unsigned int uint;
+#endif
+
+#include <ipelib.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Weighted_point.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/grabbers.h>
+#include <CGAL/iterator.h>
+#include <CGAL/tuple.h>
+#include<CGAL/Exact_circular_kernel_2.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+
+#include <boost/utility.hpp>
+
+#define CURRENTLAYER get_IpeletData()->iLayer
+#define CURRENTATTRIBUTES get_IpeletData()->iAttributes
+
+namespace CGAL{
+
+  template <class Kernel,int nbf>
+  class Ipelet_base : public ipe::Ipelet {
+  private:  
+    const std::string* SubLab;
+    const std::string* HMsg;
+    std::string Name;
+    ipe::IpeletData* data_;
+    ipe::IpeletHelper* helper_;
+
+  public:
+    
+    typedef ipe::Vector IpeVector; //ipe6 compatibility
+    typedef ipe::Curve  IpeSegmentSubPath;//ipe6 compatibility
+    typedef ipe::Matrix IpeMatrix;//ipe6 compatibility
+    typedef ipe::Path   IpePath;//ipe6 compatibility
+    //indicates if the selection should be primary or secondary. Exactly one primary selection should exist
+    ipe::TSelect get_selection_type() const { return get_IpePage()->primarySelection()==-1 ? ipe::EPrimarySelected : ipe::ESecondarySelected;}  
+    //ipe6 compatibility
+    void transform_selected_objects_(const IpeMatrix& tfm) const {
+      for (int i=0;i<get_IpePage()->count();++i)
+        if (get_IpePage()->select(i)!=ipe::ENotSelected)
+          get_IpePage()->transform(i,tfm);      
+    }
+ 
+    void delete_selected_objects_() const {
+      for (unsigned i=get_IpePage()->count();i>0;--i)
+        if (get_IpePage()->select(i-1)!=ipe::ENotSelected)
+          get_IpePage()->remove(i-1);
+    }  
+    
+    void group_selected_objects_() const {
+      ipe::Group* grp=new ipe::Group();
+      for (unsigned i=get_IpePage()->count();i>0;--i)
+        if (get_IpePage()->select(i-1)!=ipe::ENotSelected){
+          grp->push_back( get_IpePage()->object(i-1)->clone() );      
+          //~ grp->push_back( get_IpePage()->object(i-1) );      
+          get_IpePage()->remove(i-1);      
+        }
+      get_IpePage()->append(get_selection_type(),CURRENTLAYER,grp);    
+    }
+    
+  
+    
+    //typedefs
+    typedef typename Kernel::FT                                               FT;
+    typedef typename CGAL::Point_2<Kernel>                                    Point_2;
+    typedef typename CGAL::Weighted_point<Point_2,FT>                         Weighted_point_2;
+    typedef typename Kernel::Segment_2                                        Segment_2;
+    typedef typename Kernel::Ray_2                                            Ray_2;
+    typedef typename Kernel::Line_2                                           Line_2;
+    typedef typename Kernel::Iso_rectangle_2                                  Iso_rectangle_2;
+    typedef typename Kernel::Triangle_2                                       Triangle_2;
+    //~ typedef typename CGAL::Polygon_2<Kernel,std::list<Point_2> >              Polygon_2;
+    typedef CGAL::Polygon_2<Kernel>                                           Polygon_2;
+  
+    typedef typename Kernel::Circle_2                                         Circle_2;
+    typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign>           Circular_arc_2;
+  
+  
+    Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
+      :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),data_(NULL),helper_(NULL){};
+    
+    
+    ipe::Page* get_IpePage() const {return data_->iPage;}
+    ipe::IpeletData* get_IpeletData() const {return data_;}
+    ipe::IpeletHelper* get_IpeletHelper() const {return helper_;}
+    int ipelibVersion() const { return ipe::IPELIB_VERSION; }
+    int NumFunctions() const { return nbf; }
+    virtual const char *Label() const{ return &Name[0]; }
+    const char *About() const {return "http://www.cgal.org";};
+    virtual const char *SubLabel(int function) const {return &SubLab[function][0];};
+    virtual const char *HelpMsg(int function) const{return &HMsg[function][0];};
+    bool run (int i, ipe::IpeletData* data, ipe::IpeletHelper* helper) {
+      data_=data;
+      helper_=helper;
+      try{
+        protected_run(i);
+        return true;
+      }
+      catch(...){
+        helper->messageBox("Error : Save your page in a file and submit it to \n http://www.cgal.org/bug_report.html",NULL,ipe::IpeletHelper::EOkCancelButtons);
+        return false;
+      }
+    };
+
+    virtual void protected_run(int)=0;
+    
+    void show_help(bool gen=true) const{
+      std::string hmsg;
+      hmsg="<qt><h1>"+Name+"</h1><ul>";
+      if (gen)
+        for(int i=0;i<nbf-1;++i)
+          hmsg=hmsg+"<li><i>"+SubLab[i]+"</i>: "+HMsg[i]+"</li>";
+      else
+        hmsg=hmsg+"<li>"+HMsg[0]+"</li>";
+      get_IpeletHelper()->messageBox(&hmsg[0],NULL,ipe::IpeletHelper::EOkCancelButtons);
+      return;
+    }
+
+    
+    //grabbers
+    
+    template <class output_iterator>
+    struct Point_grabber:public internal::Point_grabber<Kernel,output_iterator>{
+      Point_grabber(output_iterator it):internal::Point_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Point_grabber<output_iterator> >
+    point_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Point_grabber<output_iterator>(it));
+    }
+    
+
+    template <class output_iterator>
+    struct Segment_grabber:public internal::Segment_grabber<Kernel,output_iterator>{
+      Segment_grabber(output_iterator it):internal::Segment_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Segment_grabber<output_iterator> >
+    segment_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Segment_grabber<output_iterator>(it));
+    }
+    
+    template <class output_iterator>
+    struct Wpoint_grabber:public internal::Wpoint_grabber<Kernel,output_iterator>{
+      Wpoint_grabber(output_iterator it):internal::Wpoint_grabber<Kernel,output_iterator>(it){}
+    };
+      
+    template<class output_iterator>
+    boost::function_output_iterator<Wpoint_grabber<output_iterator> >
+    wpoint_grabber(output_iterator it){
+      return boost::make_function_output_iterator(Wpoint_grabber<output_iterator>(it));
+    }     
+    
+    //Interaction functions
+    //------------------------------
+    
+    void 
+    print_error_message(const char* s) const
+    {
+      get_IpeletHelper()->message(s);
+    }
+    
+    template <class T>
+    std::pair<int,T> 
+    request_value_from_user(std::string msg) const
+    {
+      ipe::String str;
+      std::pair<int,T> ret_val=std::make_pair(-1,T());
+      if (get_IpeletHelper()-> getString(msg.c_str(),str)){
+        if (!str.empty()){
+          ipe::Lex lex(str);
+          lex >> ret_val.second;
+          ret_val.first=1;
+        }
+        else
+          ret_val.first=0;
+      }
+      return ret_val;
+    }
+
+    //Conversion functions
+    //------------------------------
+    Point_2 
+    segment_endpoint(const ipe::CurveSegment& segment,ipe::Path* obj_ipe,int i) const
+    {
+      CGAL_precondition(i<2);
+      ipe::Vector pt_ipe = obj_ipe -> matrix() * segment.cp(i);
+      return Point_2((double)(pt_ipe.x),(double)(pt_ipe.y));//conversion into CGAL point
+    }
+
+    Point_2 
+    to_point_2(ipe::Object*  object) const
+    {
+      ipe::Vector pt_ipe = object-> matrix() * object-> asReference() -> position();
+      return Point_2((double)(pt_ipe.x),(double)(pt_ipe.y));//conversion into CGAL point
+    }    
+
+    Circle_2 
+    to_circle_2(ipe::Path* obj_ipe,int subpath=0) const 
+    {
+      const ipe::Ellipse* ell_ipe = obj_ipe -> shape().subPath(subpath) -> asEllipse();
+      ipe::Matrix mat_ipe = obj_ipe -> matrix() * ell_ipe -> matrix();
+      FT radius = (mat_ipe*ipe::Vector(1,0)-mat_ipe.translation()).len();
+      ipe::Vector pt_ipe = mat_ipe.translation();
+      return Circle_2(Point_2(pt_ipe.x,pt_ipe.y),radius*radius);
+    }
+
+    
+    //Picking functions
+    //------------------------------
+
+    bool 
+    is_only_rotated_or_scaled(const ipe::Matrix& m) const 
+    {
+      return (m.a[0]==m.a[3] && m.a[1]==-m.a[2]);
+    }
+
+    bool 
+    is_IPE_circle(ipe::Object* object,int subpath=0) const 
+    {
+      return ( object -> asPath() && object -> asPath() -> shape().subPath(subpath) -> asEllipse() 
+        && is_only_rotated_or_scaled(object ->asPath()->matrix()));
+    }
+
+    
+public:
+    //declaration
+    template< class multi_output_iterator >
+    bool read_one_active_object( ipe::Object* object,
+      multi_output_iterator it_out) const;
+
+public:    
+
+    template< class V,class O>
+    Iso_rectangle_2 
+    read_active_objects (
+      CGAL::Dispatch_or_drop_output_iterator<V,O> it_out,
+      bool deselect_all=true,
+      bool delete_selected_objects=false) const 
+    {
+      ipe::Rect bbox_ipe;
+      
+      if (!get_IpePage()->hasSelection()) {
+        return Iso_rectangle_2();
+      }
+      
+      for (int i=0;i<get_IpePage()->count();++i){
+        if (get_IpePage()->select(i)==ipe::ENotSelected)
+          continue;
+        
+        bbox_ipe.addRect(get_IpePage()->bbox(i));
+        
+        //Test one function for segments, circles, circle arcs and polygons
+        bool desel_it=read_one_active_object(get_IpePage()->object(i),it_out);
+        if ( delete_selected_objects && desel_it  )
+          get_IpePage()->setSelect(i,ipe::ENotSelected);
+      }
+      
+      if (delete_selected_objects)
+        delete_selected_objects_();
+      
+      if (deselect_all)
+        get_IpePage()->deselectAll();
+      
+      Iso_rectangle_2 bbox_cgal(
+        static_cast<double>(bbox_ipe.bottomLeft().x),static_cast<double>(bbox_ipe.bottomLeft().y),
+        static_cast<double>(bbox_ipe.topRight().x),static_cast<double>(bbox_ipe.topRight().y)
+      );
+        
+        return bbox_cgal;
+    }
+    
+    //drawing functions
+    //------------------------------
+    void 
+    create_polygon_with_holes(bool delete_underlying_polygons=false) const
+    {
+      std::list<ipe::SubPath*> SSPqu;
+      for (int i=0;i<get_IpePage()->count();++i){
+        if (get_IpePage()->select(i)!=ipe::ENotSelected && get_IpePage()->object(i)->asPath()->shape().subPath(0)->closed() ){
+          ipe::SubPath* ssp=new ipe::Curve(*get_IpePage()->object(i)->asPath()->shape().subPath(0)->asCurve());
+          SSPqu.push_back(ssp);
+        }  
+      }
+      if (!delete_underlying_polygons)
+        get_IpePage() -> deselectAll();
+      ipe::Shape shape;// create new objects with current attributes
+      for (std::list<ipe::SubPath*>::iterator it=SSPqu.begin();it!=SSPqu.end();++it)  
+        shape.appendSubPath(*it);
+      if (delete_underlying_polygons)
+        delete_selected_objects_();
+      get_IpePage()->append(get_selection_type(),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));    
+    }
+    
+    void 
+    center_selection_in_page() const 
+    {
+      ipe::Vector paper_size=get_paper_size();
+      ipe::Matrix tfm (1,0,0,1,paper_size.x/2.,paper_size.y/2.);
+      for (int i=0;i<get_IpePage()->count();++i)
+        if (get_IpePage()->select(i)!=ipe::ENotSelected )
+          get_IpePage()->transform(i,tfm);
+    }
+    
+    template<class iterator>
+    ipe::Curve* 
+    create_polyline(const iterator first, const iterator last,bool setclose=false) const 
+    {
+      if (boost::next(first)!=last){
+        ipe::Curve* SSP_ipe = new ipe::Curve();
+        ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
+        for (iterator it = boost::next(first);it!=last;++it){
+          ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
+          SSP_ipe -> appendSegment(Prev_pt,Cur_pt);
+          Prev_pt=Cur_pt;
+        }
+        if (setclose)
+          SSP_ipe->setClosed(true);
+        return SSP_ipe;
+      }
+      return NULL;
+    }
+    
+    
+    template<class iterator>
+    ipe::Path* 
+    draw_polyline_in_ipe(const iterator first, const iterator last,
+                         bool setclose=false,bool deselect_all=false,
+                         bool blackfill=false,
+                         typename boost::enable_if<
+                                    boost::is_same<
+                                      typename std::iterator_traits<iterator>::value_type,
+                                      Point_2
+                                    > 
+                                  >::type* =NULL) const 
+    {
+      ipe::Curve* SSP_ipe=create_polyline(first,last,setclose);
+      if (SSP_ipe!=NULL){
+        ipe::Shape shape;
+        shape.appendSubPath(SSP_ipe);
+        ipe::Path* obj_ipe=new ipe::Path(CURRENTATTRIBUTES,shape);
+        if (blackfill){
+          obj_ipe->setPathMode(ipe::EStrokedAndFilled);
+          obj_ipe->setFill(ipe::Attribute::BLACK());
+        }
+        get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,obj_ipe);
+        return obj_ipe;
+      }
+      return NULL;  
+    }
+    
+    void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
+      ipe::Ellipse *ellipse = new ipe::Ellipse(ipe::Matrix(sqrt(CGAL::to_double(C.squared_radius())),0,
+                                                     0,sqrt(CGAL::to_double(C.squared_radius())),
+                                                     to_double(C.center().x()),to_double(C.center().y())
+                                           )
+                                );
+      ipe::Shape shape;
+      shape.appendSubPath(ellipse);
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
+    }
+ 
+    void
+    draw_in_ipe(const Point_2& P,bool deselect_all=false) const 
+    {
+      ipe::Reference *mark = new ipe::Reference(CURRENTATTRIBUTES,CURRENTATTRIBUTES.iMarkShape, ipe::Vector(CGAL::to_double(P.x()),CGAL::to_double(P.y())));
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,mark);      
+    }
+    
+    void 
+    draw_in_ipe(const Segment_2& S,bool deselect_all=false) const 
+    {
+      ipe::Segment seg_ipe;
+      seg_ipe.iP = ipe::Vector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y()));
+      seg_ipe.iQ = ipe::Vector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y()));
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe)));      
+    }
+    
+    template<class Container>
+    void 
+    draw_in_ipe(const CGAL::Polygon_2<Kernel,Container>& poly,bool deselect_all=false) const 
+    {
+      std::list<Point_2> LP;
+      for (typename CGAL::Polygon_2<Kernel,Container>::iterator it=poly.vertices_begin();it!= poly.vertices_end();++it)
+        LP.push_back(*it);
+      draw_polyline_in_ipe(LP.begin(),LP.end(),true,deselect_all,false);
+    }
+
+    void 
+    draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const 
+    {
+      ipe::Curve* SSP_ipe = new ipe::Curve;
+      ipe::Vector ipeS=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()),
+                                CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format
+      ipe::Vector ipeT=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()),
+                                CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format
+      SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0,
+                                   0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
+                                     sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),
+                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()),
+                                   CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())),
+                                   ipeS,ipeT);
+      ipe::Shape shape;
+      shape.appendSubPath(SSP_ipe);
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
+    }
+
+
+    void
+    draw_in_ipe(const Triangle_2& t,bool deselect_all=false) const 
+    {
+      ipe::Curve* SSP_ipe = new ipe::Curve();
+      ipe::Vector P0=ipe::Vector(t[0].x(),t[0].y());
+      ipe::Vector P1=ipe::Vector(t[1].x(),t[1].y());
+      ipe::Vector P2=ipe::Vector(t[2].x(),t[2].y());
+      SSP_ipe->appendSegment(P0,P1);
+      SSP_ipe->appendSegment(P1,P2);
+      SSP_ipe->appendSegment(P2,P0);
+      SSP_ipe->setClosed(true);
+      ipe::Shape shape;
+      shape.appendSubPath(SSP_ipe);
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
+    }
+    
+    void 
+    draw_in_ipe(const Iso_rectangle_2& r,bool deselect_all=false)
+    {
+      ipe::Curve* SSP_ipe = new ipe::Curve();
+      ipe::Vector P0=ipe::Vector(r[0].x(),r[0].y());
+      ipe::Vector P1=ipe::Vector(r[1].x(),r[1].y());
+      ipe::Vector P2=ipe::Vector(r[2].x(),r[2].y());
+      ipe::Vector P3=ipe::Vector(r[3].x(),r[3].y());
+      SSP_ipe->appendSegment(P0,P1);
+      SSP_ipe->appendSegment(P1,P2);
+      SSP_ipe->appendSegment(P2,P3);
+      SSP_ipe->appendSegment(P3,P0);
+      SSP_ipe->setClosed(true);
+      ipe::Shape shape;
+      shape.appendSubPath(SSP_ipe);
+      get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
+    }
+    
+    
+    //Drawing function with bbox : global version
+    template <class T>
+    void 
+    draw_in_ipe(const T& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      Segment_2 s;
+      bool success=cast_into_seg(object,bbox,&s);
+      if (success)
+        draw_in_ipe(s,deselect_all);
+    }
+  private:
+    enum Type_circ_arc{SRC,TRG,OSRC,OTRG};
+  public:  
+    void 
+    draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      std::vector<Circular_arc_2> arc_list;
+      const Circle_2& circle=CGAL::cpp11::get<0>(object);
+      restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
+      if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
+        draw_in_ipe(object,deselect_all);
+        return;
+      }
+      
+      const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
+                            &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object);
+      const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
+                            &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object);
+      std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
+      typedef  typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
+      Map_theta_iterator s_it=map_theta.insert(
+                                std::make_pair(get_theta(*source,circle),std::make_pair(OSRC,source)));
+      /* Map_theta_iterator t_it=*/
+                              map_theta.insert(
+                                std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
+      
+      for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
+        const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
+                             &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc);
+        const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
+                             &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc);        
+        map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
+        map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
+      }
+      
+      Map_theta_iterator next_s=s_it;
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      switch (next_s->second.first){
+        case TRG:
+          draw_in_ipe(Circular_arc_2(circle,*source,*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+          break;
+        case OSRC:
+	  CGAL_error();
+        case SRC:{
+          Map_theta_iterator current=next_s;
+          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+          draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+          if(next_s->second.first==OTRG) return;
+          break;
+        }
+        case OTRG:
+          ++next_s; if (next_s==map_theta.end()) next_s=map_theta.end();
+          if (next_s->second.first==TRG){
+            draw_in_ipe(object);
+            return;
+          }
+          else
+            return;
+      }
+      
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      Map_theta_iterator current=next_s;
+      ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      do{
+        if (current->second.first==OTRG) return;
+        CGAL_assertion(current->second.first==SRC);
+        draw_in_ipe(Circular_arc_2(circle,*(current->second.second),*(next_s->second.second),CGAL::COUNTERCLOCKWISE));
+        if (next_s->second.first==OTRG) return;
+        CGAL_assertion(next_s->second.first==TRG);
+        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+        current=next_s;
+        ++next_s; if (next_s==map_theta.end()) next_s=map_theta.begin();
+      }while(true);
+      
+    }
+    
+    
+    void
+    draw_in_ipe(const Circle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      std::vector<Circular_arc_2> arc_list;
+      restrict_circle_to_bbox(object,bbox,std::back_inserter(arc_list));
+      if (arc_list.empty() && bbox.has_on_bounded_side(object.center()) )
+        draw_in_ipe(object,deselect_all);
+      else
+        draw_in_ipe(arc_list.begin(),arc_list.end(),false,deselect_all);
+    }
+      
+    
+    void 
+    draw_in_ipe(const Triangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+       for (unsigned int i=0;i!=3;++i)
+        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all);
+    }
+      
+    void 
+    draw_in_ipe(const Iso_rectangle_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      for (unsigned int i=0;i!=4;++i)
+        draw_in_ipe(Segment_2(object.vertex(i),object.vertex(i+1)),bbox,deselect_all); 
+    }
+      
+    void 
+    draw_in_ipe(const Polygon_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      for (typename Polygon_2::Edge_const_iterator it=object.edges_begin();it!=object.edges_end();++it)
+        draw_in_ipe(*it,bbox,deselect_all);
+    }
+      
+      
+      
+    template<class GT,class TDS>
+    void 
+    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,const Iso_rectangle_2& bbox,bool deselect_all=false) const 
+    {
+      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
+      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
+      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
+      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
+        draw_in_ipe(tri.segment(*it),bbox);
+      if (deselect_all)
+        get_IpePage()->deselectAll();
+    }
+    
+    void
+    draw_in_ipe(const Line_2& line,bool deselect_all=false) const 
+    {
+      ipe::Vector paper_size=get_paper_size();
+      Iso_rectangle_2 bbox(0,0,paper_size.x,paper_size.y);
+      draw_in_ipe(line,bbox,deselect_all);
+    }
+      
+    void
+    draw_in_ipe(const Ray_2& ray,bool deselect_all=false)
+    {
+      ipe::Vector paper_size=get_paper_size();
+      Iso_rectangle_2 bbox(0,0,paper_size.x,paper_size.y);
+      draw_in_ipe(ray,bbox,deselect_all);      
+    }
+    
+    template<class GT,class TDS>
+    void
+    draw_in_ipe(const CGAL::Triangulation_2<GT,TDS>& tri,bool deselect_all=false,bool make_grp=true) const 
+    {
+      typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
+      typename Triangulation::Finite_edges_iterator first=tri.finite_edges_begin();
+      typename Triangulation::Finite_edges_iterator last=tri.finite_edges_end();
+      for(typename Triangulation::Finite_edges_iterator it=first;it!=last;++it)
+        draw_in_ipe(tri.segment(*it));
+      if (make_grp)
+        group_selected_objects_();
+      if (deselect_all)
+        get_IpePage()->deselectAll();
+    }
+    
+    template<class iterator>
+    void 
+    draw_in_ipe(const iterator begin,const iterator end,bool make_grp=true,bool deselect_all=false) const
+    {
+      for (iterator it=begin;it!=end;++it)
+        draw_in_ipe(*it);
+      if (make_grp and ++iterator(begin)!=end)
+        group_selected_objects_();
+      if (deselect_all)
+        get_IpePage()->deselectAll();
+    }
+
+    template<class iterator>
+    void
+    draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false,
+     typename boost::enable_if<  boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Point_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Segment_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circle_2> ,
+                                 boost::mpl::or_< boost::is_same<typename std::iterator_traits<iterator>::value_type,Circular_arc_2> ,
+                                                  boost::is_same<typename std::iterator_traits<iterator>::value_type,Polygon_2>
+                                                > > > >
+                    >::type* = NULL) const
+    {
+      for (iterator it=begin;it!=end;++it)
+        draw_in_ipe(*it,bbox);
+      if (make_grp and ++iterator(begin)!=end)
+        group_selected_objects_();
+      if (deselect_all)
+        get_IpePage()->deselectAll();      
+    }
+    
+    private:
+    
+    ipe::Vector 
+    get_paper_size() const {
+        return data_->iDoc->cascade()->findLayout()->iPaperSize;
+    }
+    
+    struct Voronoi_from_tri{  //Class using stream to get the voronoi diagram
+      std::list<Ray_2> ray_list;
+      std::list<Line_2> line_list;
+      std::list<Segment_2> seg_list;
+
+      void operator<<(const Ray_2& p){ray_list.push_back(p);}
+      void operator<<(const Line_2& p){line_list.push_back(p);}
+      void operator<<(const Segment_2& p){seg_list.push_back(p);}
+
+    };
+    
+    template <class T,class output_iterator>
+    bool 
+    cast_into_seg(const T& obj,const Iso_rectangle_2& bbox,output_iterator out_it) const{
+      CGAL::Object obj_cgal = CGAL::intersection(obj,bbox);
+      Segment_2 s;
+      bool ret=CGAL::assign(s, obj_cgal);
+      if (ret) *out_it++=s;
+      return ret;
+    }
+    
+    //Convert infinite objects into drawable segments
+    template<class iterator,class output_iterator>
+    void 
+    cast_into_seg(const iterator first,const iterator end,
+                  const Iso_rectangle_2& bbox, output_iterator out_it) const
+    {
+      for (iterator it=first;it!=end;++it)
+        cast_into_seg(*it,bbox,out_it);
+    }
+
+    
+    
+    void 
+    draw_dual_(Voronoi_from_tri& v_recup,const Iso_rectangle_2& bbox,bool makegrp) const
+    {
+      std::vector<Segment_2> seg_cont;
+      //filter degenerate segments
+      for(typename std::list<Segment_2>::iterator iteS = v_recup.seg_list.begin();iteS!=v_recup.seg_list.end();){
+        typename std::list<Segment_2>::iterator itc=iteS++;
+        if (itc->is_degenerate())
+          v_recup.seg_list.erase(itc);
+      }
+      
+      cast_into_seg(v_recup.ray_list.begin(),v_recup.ray_list.end(),bbox,std::back_inserter(seg_cont));//cast rays into segments in bbox
+      cast_into_seg(v_recup.line_list.begin(),v_recup.line_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
+      cast_into_seg(v_recup.seg_list.begin(),v_recup.seg_list.end(),bbox,std::back_inserter(seg_cont));//cast lines into segments in bbox
+      draw_in_ipe(seg_cont.begin(), seg_cont.end(),makegrp);
+    }
+    
+    public:
+    template<class Triangulation>
+    void 
+    draw_dual_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,bool makegrp=true,bool deselect_all=false) const
+    {
+    //~ template<class GT,class TDS>
+    //~ void draw_dual_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{
+      Voronoi_from_tri v_recup;
+      T.draw_dual(v_recup);
+      draw_dual_(v_recup,bbox,makegrp);
+      if (deselect_all) get_IpePage()->deselectAll();
+    }
+
+    template<class Triangulation>
+    void
+    draw_skeleton_in_ipe(Triangulation& T,const Iso_rectangle_2& bbox,
+                         bool makegrp=true,bool deselect_all=false) const
+    {
+    //~ template<class GT,class TDS>
+    //~ void draw_skeleton_in_ipe(const CGAL::Triangulation_2<GT,TDS>& T,const Iso_rectangle_2& bbox) const{    
+      Voronoi_from_tri v_recup;
+      T.draw_skeleton(v_recup);
+      draw_dual_(v_recup,bbox,makegrp);
+      if (deselect_all) get_IpePage()->deselectAll();
+    }
+    
+    //Circle restriction
+  private:
+    inline double get_theta(const Point_2& point, const Circle_2& circle) const {
+      return atan2(CGAL::to_double(point.y()-circle.center().y()),CGAL::to_double(point.x()-circle.center().x()));
+    }
+  
+    //SK objects
+    typedef CGAL::Exact_circular_kernel_2 SK;
+    typedef SK::Circle_2                  Exact_circle_2;
+    typedef SK::Point_2                   Exact_point_2;
+    typedef SK::Circular_arc_point_2      Circular_arc_point_2;
+
+
+
+    //s and t are given such that if center of exact_circle is inside bbox then turn COUNTERCLOCKWISE
+    Circular_arc_2 
+    build_arc(const Exact_circle_2& exact_circle,const SK::Circular_arc_point_2& s,
+              const SK::Circular_arc_point_2& t,bool sign_known=false) const 
+    {
+      Point_2 sd=Point_2(CGAL::to_double(s.x()),CGAL::to_double(s.y()));
+      Point_2 td=Point_2(CGAL::to_double(t.x()),CGAL::to_double(t.y()));
+      Point_2 center(CGAL::to_double(exact_circle.center().x()),CGAL::to_double(exact_circle.center().y()));
+      CGAL::Cartesian_converter<SK,Kernel> conv;
+      Circle_2 approx_circle=conv(exact_circle);  
+      if (!sign_known){
+        CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
+        return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign);
+      }
+      return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
+    }
+
+    void 
+    get_pair_indices(int* array,int* pair) const {
+      for (int i=0;i<8;++i)
+        if (array[i]!=-1) *pair++=i;
+    }
+
+    void 
+    set_done(int* array,int index) const {
+      for (int i =0;i<8;++i)
+        if (array[i]==index) array[i]=-1;
+    }
+
+
+    bool 
+    indices_are_on_opposite_side(int* array) const {
+        if (array[0]!=-1 || array[5]!=-1)
+          return array[2]!=-1 || array[7]!=-1;
+        if (array[1]!=-1 || array[6]!=-1)
+          return array[3]!=-1 || array[4]!=-1;
+        return false;
+    }
+
+    int 
+    count_points(int* array) const {
+      int ret=0;
+      for (int i =0;i<8;++i)
+        if (array[i]!=-1) ++ret;
+      return ret;
+    }
+
+  public:
+    //
+    // .-----7---------2-------.
+    // |                       |
+    // 3                       6
+    // |     indices           |
+    // 4                       1
+    // |                       |
+    // .-----0---------5-------.
+    template <class Output_iterator>
+    void 
+    restrict_circle_to_bbox(const Circle_2& approx_circle,
+                            const Iso_rectangle_2& bbox,Output_iterator out) const
+    {
+      CGAL::Cartesian_converter<Kernel,SK> conv;
+      Exact_circle_2 exact_circle=conv(approx_circle);
+
+      SK::Intersect_2 inter=SK().intersect_2_object();
+      std::vector< std::pair<Circular_arc_point_2,unsigned> > points;
+      points.reserve(8);
+      
+      std::vector<CGAL::Object> ints;
+      ints.reserve(2);
+      std::pair<Circular_arc_point_2,unsigned> tmp_pt;
+      
+      int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1};
+      
+      for (unsigned i=0;i!=4;++i){
+        ints.clear();
+        SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4]));
+        inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints));
+        unsigned index=0;
+        bool ok=true;
+        switch (ints.size()){
+          case 1:
+            ok=CGAL::assign(tmp_pt,ints[0]);
+            CGAL_assertion(ok); CGAL_USE(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[i]=index;
+            indices[(i+1)%4+4]=index;
+            break;
+          case 2:
+            int right_ind=i<2?0:1;
+            ok=CGAL::assign(tmp_pt,ints[right_ind]);
+            CGAL_assertion(ok); CGAL_USE(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[i]=index;
+            ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]);
+            CGAL_assertion(ok); CGAL_USE(ok);
+            points.push_back(tmp_pt);
+            index=points.size()-1;
+            indices[(i+1)%4+4]=index;      
+            break;
+        }
+      }
+
+      //corner case
+      for (unsigned i=0;i!=4;++i){
+        if (indices[i]!=-1 && indices[i+4]!=-1){
+          *out++=build_arc(exact_circle,points[ indices[i+4] ].first,points[ indices[i] ].first);
+          if (points[ indices[i] ].second==1) set_done(indices,indices[i]);
+          else indices[i]=-1;      
+          if (points[ indices[i+4] ].second==1) set_done(indices,indices[i+4]);
+          else indices[i+4]=-1;
+        }
+      }
+      int rem_pt=count_points(indices);
+      if (rem_pt==4){
+        //double opposite
+        if (indices[0]!=-1){
+          *out++=build_arc(exact_circle,points[ indices[7] ].first,points[ indices[0] ].first);
+          if (indices[7]!=indices[2] && indices[0]!=indices[5])
+            *out++=build_arc(exact_circle,points[ indices[5] ].first,points[ indices[2] ].first);
+        }
+        else{
+          *out++=build_arc(exact_circle,points[ indices[6] ].first,points[ indices[3] ].first);
+          if (indices[6]!=indices[1] && indices[3]!=indices[4])
+            *out++=build_arc(exact_circle,points[ indices[4] ].first,points[ indices[1] ].first);      
+        }
+        return;  
+      }
+      
+      if (rem_pt==2){
+        int pair[2];
+        get_pair_indices(indices,pair);
+        if (!indices_are_on_opposite_side(indices))
+          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first,true);
+        else
+          *out++=build_arc(exact_circle,points[ indices[pair[1]] ].first,points[ indices[pair[0]] ].first);
+        return;
+      }
+      CGAL_assertion (rem_pt==0);
+    }
+  };
+  
+  
+  //definition
+  template <class Kernel,int nbf>
+  template< class multi_output_iterator >
+  bool 
+  Ipelet_base<Kernel,nbf>::read_one_active_object(ipe::Object* object,
+                                                  multi_output_iterator it_out) const 
+  {
+    if (object->asGroup()){
+      bool deselect_grp=false;
+      for (ipe::Group::const_iterator it=object->asGroup()->begin();
+                                    it!=object->asGroup()->end();++it)
+      {
+        ipe::Object *obj = (*it)->clone();
+        obj->setMatrix(obj->matrix()*object->matrix());
+        bool cur=read_one_active_object(obj,it_out);
+        deselect_grp=deselect_grp || cur;
+      }
+      return deselect_grp;
+    }
+    
+    //detect Points
+    if( object->asReference() ){
+      if ( !CGAL::Is_in_tuple<Point_2,typename multi_output_iterator::Value_type_tuple>::value ) 
+        return true;
+      it_out++=to_point_2(object);
+      return false;
+    }
+    bool to_deselect=true;
+    //Test one function for segments, circles, circle arcs and polygons
+    if (object->asPath()){
+      //iterate on each subpath
+      to_deselect=false;
+      for (int i=0;i<object->asPath()->shape().countSubPaths();++i){
+        if(object->asPath()-> shape().subPath(i)->asCurve()){
+          std::list<Segment_2> seg_list;
+          bool is_polygon=object-> asPath() -> shape().subPath(i)->closed();
+          
+          const ipe::Curve* SSP_ipe = object -> asPath() -> shape().subPath(i) -> asCurve();
+          for(int j=0; j< SSP_ipe->countSegments();++j){
+            if (SSP_ipe -> segment(j).type()==ipe::CurveSegment::ESegment){
+              //TODO depending on if current_it  is  a polygon or not do not do the same thing
+              seg_list.push_back(Segment_2(segment_endpoint(SSP_ipe -> segment(j),object -> asPath(),0),
+                                  segment_endpoint(SSP_ipe -> segment(j),object -> asPath(),1)));
+            }
+            else{
+              //retrieve circle arcs
+              if(SSP_ipe -> segment(j).type()==ipe::CurveSegment::EArc &&
+                 is_only_rotated_or_scaled(object->asPath()->matrix()))
+              {//retreve circle arcs
+                if ( !CGAL::Is_in_tuple<Circular_arc_2,typename multi_output_iterator::Value_type_tuple>::value ){
+                  to_deselect=true;
+                  continue;
+                }
+                is_polygon=false;
+                ipe::Path* obj_ipe=object->asPath();
+                ipe::Matrix mat=obj_ipe->matrix() * SSP_ipe->segment(j).matrix();
+                ipe::Vector ipe_center=ipe::Vector(mat.a[4],mat.a[5]);
+                ipe::Vector ipe_first=obj_ipe->matrix() * SSP_ipe->segment(j).cp(0);
+                ipe::Vector ipe_last=obj_ipe->matrix() * SSP_ipe->segment(j).last();
+                //TODO Check how object is defined
+                Circular_arc_2 arc(
+                            Circle_2(Point_2(ipe_center.x,ipe_center.y),(ipe_first-ipe_center).len()*(ipe_first-ipe_center).len()),
+                            Point_2(ipe_first.x,ipe_first.y),
+                            Point_2(ipe_last.x,ipe_last.y),
+                            mat.a[0]*mat.a[3]-mat.a[1]*mat.a[2]<0?CGAL::CLOCKWISE:CGAL::COUNTERCLOCKWISE
+                          );
+                it_out++=arc;
+              }
+              else
+                to_deselect=true;
+            }
+          }
+          if (object->asPath() -> shape().subPath(i)->closed() && 
+              (SSP_ipe -> segment(0).cp(0)-SSP_ipe -> segment(SSP_ipe->countSegments()-1).cp(1)).len()!=0 ){ //for close polygon, seg
+            seg_list.push_back( Segment_2(
+                              segment_endpoint(SSP_ipe -> segment(SSP_ipe->countSegments()-1),object-> asPath(),1),
+                              segment_endpoint(SSP_ipe -> segment(0),object-> asPath(),0)
+                              ));
+          }
+          //~ if (seg_list.empty())
+            //~ to_deselect=true;
+          
+          if (is_polygon){
+            if (  !CGAL::Is_in_tuple<Polygon_2,typename multi_output_iterator::Value_type_tuple>::value  )
+              to_deselect=true;
+            else{
+              Polygon_2 polygon;
+              typename std::list<Segment_2>::iterator its=seg_list.begin();
+              for (;its!=seg_list.end();++its)
+                polygon.push_back(its->source());
+              it_out++=polygon;
+            }
+          }
+          else{
+            if (  !CGAL::Is_in_tuple<Segment_2,typename multi_output_iterator::Value_type_tuple>::value  )
+              to_deselect=true;
+            else{
+              for (typename std::list<Segment_2>::iterator its=seg_list.begin();its!=seg_list.end();++its)
+                it_out++=*its;
+            }
+          }
+        }
+        else
+          if (is_IPE_circle(object,i)){
+            if (  !CGAL::Is_in_tuple<Circle_2,typename multi_output_iterator::Value_type_tuple>::value )
+              to_deselect=true;
+            else{
+              Circle_2 C=to_circle_2(object -> asPath(),i);
+              it_out++=C;
+            }
+          }
+          else
+            to_deselect=true; // avoid deleting no handled objects
+      }
+    }
+    return to_deselect;
+  }
+
+} //CGAL
+
+#define CGAL_IPELET(T) IPELET_DECLARE ipe::Ipelet *newIpelet(){ return new T; }
+
+#endif //CGAL_IPELET_BASE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat.h
new file mode 100644
index 0000000..c199c5d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat.h
@@ -0,0 +1,635 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org);
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigFloat.h
+ * Synopsis: 
+ * 		An implementation of BigFloat numbers with error bounds.
+ * 
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_BIGFLOAT_H_
+#define _CORE_BIGFLOAT_H_
+
+#include <CGAL/CORE/BigFloatRep.h>
+#include <CGAL/assertions.h>
+
+namespace CORE { 
+
+class Expr;
+
+/// \class BigFloat BigFloat.h
+/// \brief BigFloat is a class of Float-Point number with error bounds.
+typedef RCImpl<BigFloatRep> RCBigFloat;
+
+class CGAL_CORE_EXPORT BigFloat : public RCBigFloat {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  BigFloat() : RCBigFloat(new BigFloatRep()) {}
+  /// constructor for <tt>short</tt>
+  BigFloat(short i) : RCBigFloat(new BigFloatRep(i)) {}
+  /// constructor for <tt>float</tt>
+  BigFloat(float i) : RCBigFloat(new BigFloatRep(i)) {}
+  /// constructor for <tt>int</tt>
+  BigFloat(int i) : RCBigFloat(new BigFloatRep(i)) {}
+  /// constructor for <tt>long</tt>
+  BigFloat(long l) : RCBigFloat(new BigFloatRep(l)) {}
+  /// constructor for <tt>double</tt>
+  BigFloat(double d) : RCBigFloat(new BigFloatRep(d)) {}
+  /// constructor for <tt>const char* </tt>(default base = 10)
+  BigFloat(const char* s) : RCBigFloat(new BigFloatRep(s)) {}
+  /// constructor for <tt>std::string</tt>(default base = 10)
+  BigFloat(const std::string& s) : RCBigFloat(new BigFloatRep(s)) {}
+
+  /// constructor for <tt>int</tt> and <tt>long</tt>
+  //     This is a hack because in Sturm, we need to approximate any
+  //     coefficient type NT to a BigFloat, and it would complain if we
+  //     do not have this method explicitly:
+  BigFloat(int& i, const extLong& /*r*/, const extLong& /*a*/)
+      : RCBigFloat(new BigFloatRep(i)) {}
+  BigFloat(long& x, const extLong& /*r*/, const extLong& /*a*/)
+      : RCBigFloat(new BigFloatRep(x)) {}
+  /// constructor from <tt>BigInt</tt>, error and exponent values
+  BigFloat(const BigInt& I, unsigned long er, long ex)
+      : RCBigFloat(new BigFloatRep(I, er, ex)) {}
+  /// constructor from <tt>BigInt</tt>, exponent values
+  BigFloat(const BigInt& I, long ex)
+      : RCBigFloat(new BigFloatRep(I, ex)) {}
+  BigFloat(const BigInt& I)
+      : RCBigFloat(new BigFloatRep(I)) {}
+  /// constructor for <tt>BigRat</tt>
+  BigFloat(const BigRat& R, const extLong& r = get_static_defRelPrec(),
+           const extLong& a = get_static_defAbsPrec())
+      : RCBigFloat(new BigFloatRep()) {
+    rep->approx(R, r, a);
+  }
+
+  // REMARK: it is somewhat against our principles to have BigFloat
+  // know about Expr, but BigFloat has a special role in our system!
+  // ===============================
+  /// constructor for <tt>Expr</tt>
+  explicit BigFloat(const Expr& E, const extLong& r = get_static_defRelPrec(),
+           const extLong& a = get_static_defAbsPrec());
+
+  //Dummy
+  explicit BigFloat(const BigFloat& E, const extLong& ,
+           const extLong&): RCBigFloat(E) {
+    rep->incRef();
+  }
+
+  /// constructor for <tt>BigFloatRep</tt>
+  explicit BigFloat(BigFloatRep* r) : RCBigFloat(new BigFloatRep()) {
+    rep = r;
+  }
+
+  // constructor for exp2
+  explicit BigFloat(BigFloatRep* r, bool) : RCBigFloat(r) {
+  }
+
+
+  //@}
+
+  /// \name Copy-Assignment-Destructor
+  //@{
+  /// copy constructor
+  BigFloat(const BigFloat& rhs) : RCBigFloat(rhs) {
+    rep->incRef();
+  }
+  /// assignment operator
+  BigFloat& operator=(const BigFloat& rhs) {
+    if (this != &rhs) {
+      rep->decRef();
+      rep = rhs.rep;
+      rep->incRef();
+    }
+    return *this;
+  }
+  /// destructor
+  ~BigFloat() {
+    rep->decRef();
+  }
+  //@}
+
+  /// \name Compound Assignment Operators
+  //@{
+  /// operator+=
+  BigFloat& operator+= (const BigFloat& x) {
+    BigFloat z;
+    z.rep->add(*rep, *x.rep);
+    *this = z;
+    return *this;
+  }
+  /// operator-=
+  BigFloat& operator-= (const BigFloat& x) {
+    BigFloat z;
+    z.rep->sub(*rep, *x.rep);
+    *this = z;
+    return *this;
+  }
+  /// operator*=
+  BigFloat& operator*= (const BigFloat& x) {
+    BigFloat z;
+    z.rep->mul(*rep, *x.rep);
+    *this = z;
+    return *this;
+  }
+  /// operator/=
+  BigFloat& operator/= (const BigFloat& x) {
+    BigFloat z;
+    z.rep->div(*rep, *x.rep, get_static_defBFdivRelPrec());
+    *this = z;
+    return *this;
+  }
+  //@}
+
+  /// \name Unary Minus Operator
+  //@{
+  /// unary plus
+  BigFloat operator+() const {
+    return BigFloat(*this);
+  }
+  /// unary minus
+  BigFloat operator-() const {
+    return BigFloat(-rep->m, rep->err, rep->exp);
+  }
+  //@}
+
+  /// \name String Conversion Functions
+  //@{
+  /// set value from <tt>const char*</tt> (base = 10)
+  void fromString(const char* s, const extLong& p=get_static_defBigFloatInputDigits()) {
+    rep->fromString(s, p);
+  }
+  /// convert to <tt>std::string</tt> (base = 10)
+  std::string toString(long prec=get_static_defBigFloatOutputDigits(), bool sci=false) const {
+    return rep->toString(prec, sci);
+  }
+  std::string str() const {
+    return toString();
+  }
+  //@}
+
+  /// \name Conversion Functions
+  //@{
+  /// return int value
+  int intValue() const {
+    return static_cast<int>(rep->toLong());
+  }
+  /// return long value
+  long longValue() const {
+    long l = rep->toLong();
+    if ((l == LONG_MAX) || (l == LONG_MIN))
+      return l; // return the overflown value.
+    if ((sign() < 0) && (cmp(BigFloat(l)) != 0)) {
+      // a negative value not exactly rounded.
+      l--; // rounded to floor.
+    }
+    return l;
+  }
+  /// return float value
+  float floatValue() const {
+    return static_cast<float>(rep->toDouble());
+  }
+  /// return double value
+  double doubleValue() const {
+    return rep->toDouble();
+  }
+  /// return BigInt value
+  BigInt BigIntValue() const {
+    return rep->toBigInt();
+  }
+  /// return BigRat value
+  BigRat BigRatValue() const {
+    return rep->BigRatize();
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  /// Has Exact Division
+  static bool hasExactDivision() {
+    return false;
+  }
+  
+  //CONSTANTS
+  /// return BigFloat(0)
+  static const BigFloat& getZero();
+  /// return BigFloat(1)
+  static const BigFloat& getOne();
+
+  /// sign function
+  /** \note This is only the sign of the mantissa, it can be taken to be
+      the sign of the BigFloat only if !(isZeroIn()). */
+  int sign() const {
+    CGAL_assertion((err() == 0 && m() == 0) || !(isZeroIn()));
+    return rep->signM();
+  }
+  /// check whether contains zero
+  /** \return true if contains zero, otherwise false */
+  bool isZeroIn() const {
+    return rep->isZeroIn();
+  }
+  /// absolute value function
+  BigFloat abs() const {
+    return (sign()>0) ? +(*this) : -(*this);
+  }
+  ///  comparison function
+  int cmp(const BigFloat& x) const {
+    return rep->compareMExp(*x.rep);
+  }
+
+  /// get mantissa
+  const BigInt& m() const {
+    return rep->m;
+  }
+  /// get error bits
+  unsigned long err() const {
+    return rep->err;
+  }
+  /// get exponent
+  long exp() const {
+    return rep->exp;
+  }
+
+  /// check whether err == 0
+  /** \return true if err == 0, otherwise false */
+  bool isExact() const {
+    return rep->err == 0;
+  }
+  /// set err to 0
+  /** \return an exact BigFloat, see Tutorial for why this is useful! */
+  BigFloat& makeExact() {
+    makeCopy();
+    rep->err =0;
+    return *this;
+  }
+  /// set err to 0, but first add err to the mantissa (m)
+  /** \return the ceiling exact BigFloat, variant of makeExact */
+  BigFloat& makeCeilExact() {
+    makeCopy();
+    rep->m += rep->err;
+    rep->err =0;
+    return *this;
+  }
+  /// set err to 0, but subtract err from the mantissa (m)
+  /** \return the floor exact BigFloat, variant of makeExact */
+  BigFloat& makeFloorExact() {
+    makeCopy();
+    rep->m -= rep->err;
+    rep->err =0;
+    return *this;
+  }
+  /// set err to 1
+  /** \return an inexact BigFloat, see Tutorial for why this is useful! */
+  BigFloat& makeInexact() {
+    makeCopy();
+    rep->err =1;
+    return *this;
+  }
+
+  /// return lower bound of Most Significant Bit
+  extLong lMSB() const {
+    return rep->lMSB();
+  }
+  /// return upper bound of Most Significant Bit
+  extLong uMSB() const {
+    return rep->uMSB();
+  }
+  /// return Most Significant Bit
+  extLong MSB() const {
+    return rep->MSB();
+  }
+
+  /// floor of Lg(err)
+  extLong flrLgErr() const {
+    return rep->flrLgErr();
+  }
+  /// ceil of Lg(err)
+  extLong clLgErr() const {
+    return rep->clLgErr();
+  }
+
+  /// division with relative precsion <tt>r</tt>
+  BigFloat div(const BigFloat& x, const extLong& r) const {
+    BigFloat y;
+    y.rep->div(*rep, *x.rep, r);
+    return y;
+  }
+  /// exact division by 2
+  BigFloat div2() const {
+    BigFloat y;
+    y.rep->div2(*rep);
+    return y;
+  }
+
+  /// squareroot
+  BigFloat sqrt(const extLong& a) const {
+    BigFloat x;
+    x.rep->sqrt(*rep, a);
+    return x;
+  }
+  /// squareroot with initial approximation <tt>init</tt>
+  BigFloat sqrt(const extLong& a, const BigFloat& init) const {
+    BigFloat x;
+    x.rep->sqrt(*rep, a, init);
+    return x;
+  }
+  //@}
+
+  /// \name Utility Functions
+  //@{
+  /// approximate BigInt number
+  void approx(const BigInt& I, const extLong& r, const extLong& a) {
+    makeCopy();
+    rep->trunc(I, r, a);
+  }
+  /// approximate BigFloat number
+  void approx(const BigFloat& B, const extLong& r, const extLong& a) {
+    makeCopy();
+    rep->approx(*B.rep, r, a);
+  }
+  /// approximate BigRat number
+  void approx(const BigRat& R, const extLong& r, const extLong& a) {
+    makeCopy();
+    rep->approx(R, r, a);
+  }
+  /// dump internal data
+  void dump() const {
+    rep->dump();
+  }
+  //@}
+
+  /// returns a BigFloat of value \f$ 2^e \f$
+  static BigFloat exp2(int e) {
+    return BigFloat(BigFloatRep::exp2(e),true);
+  }
+
+}; // class BigFloat
+
+//@} // For compatibility with BigInt
+
+/// \name File I/O Functions
+//@{
+/// read from file
+void readFromFile(BigFloat& bf, std::istream& in, long maxLength = 0);
+/// write to file
+void writeToFile(const BigFloat& bf, std::ostream& in,
+		int base=10, int charsPerLine=80);
+
+/// IO stream operator<<
+inline std::ostream& operator<< (std::ostream& o, const BigFloat& x) {
+  x.getRep().operator<<(o);
+  return o;
+}
+/// IO stream operator>>
+inline std::istream& operator>> (std::istream& i, BigFloat& x) {
+  x.makeCopy();
+  x.getRep().operator>>(i);
+  return i;
+}
+//@}
+
+/// operator+
+inline BigFloat operator+ (const BigFloat& x, const BigFloat& y) {
+  BigFloat z;
+  z.getRep().add(x.getRep(), y.getRep());
+  return z;
+}
+/// operator-
+inline BigFloat operator- (const BigFloat& x, const BigFloat& y) {
+  BigFloat z;
+  z.getRep().sub(x.getRep(), y.getRep());
+  return z;
+}
+/// operator*
+inline BigFloat operator* (const BigFloat& x, const BigFloat& y) {
+  BigFloat z;
+  z.getRep().mul(x.getRep(), y.getRep());
+  return z;
+}
+/// operator/
+inline BigFloat operator/ (const BigFloat& x, const BigFloat& y) {
+  BigFloat z;
+  z.getRep().div(x.getRep(),y.getRep(),get_static_defBFdivRelPrec());
+  return z;
+}
+
+/// operator==
+inline bool operator== (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) == 0;
+}
+/// operator!=
+inline bool operator!= (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) != 0;
+}
+/// operator>=
+inline bool operator>= (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) >= 0;
+}
+/// operator>
+inline bool operator> (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) > 0;
+}
+/// operator<=
+inline bool operator<= (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) <= 0;
+}
+/// operator<
+inline bool operator< (const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y) < 0;
+}
+
+/// sign
+inline int sign(const BigFloat& x) {
+  return x.sign();
+}
+/// div2
+inline BigFloat div2(const BigFloat& x){
+  return x.div2();
+}
+/// abs
+inline BigFloat abs(const BigFloat& x) {
+  return x.abs();
+}
+/// cmp
+inline int cmp(const BigFloat& x, const BigFloat& y) {
+  return x.cmp(y);
+}
+/// pow
+CGAL_CORE_EXPORT BigFloat pow(const BigFloat&, unsigned long);
+/// power
+inline BigFloat power(const BigFloat& x, unsigned long p) {
+  return pow(x, p);
+}
+/// root(x,k,prec,xx) returns the k-th root of x to precision prec.
+///   The argument x is an initial approximation.
+BigFloat root(const BigFloat&, unsigned long k, const extLong&, const BigFloat&);
+inline BigFloat root(const BigFloat& x, unsigned long k) {
+  return root(x, k, get_static_defBFsqrtAbsPrec(), x);
+}
+
+/// sqrt to defAbsPrec:
+inline BigFloat sqrt(const BigFloat& x) {
+  return x.sqrt(get_static_defBFsqrtAbsPrec());
+}
+
+/// convert an BigFloat Interval to a BigFloat with error bits
+inline BigFloat centerize(const BigFloat& a, const BigFloat& b) {
+  BigFloat z;
+  z.getRep().centerize(a.getRep(), b.getRep());
+  return z;
+}
+
+/// minStar(m,n) returns the min-star of m and n
+inline long minStar(long m, long n) {
+  if (m*n <= 0) return 0;
+  if (m>0) 
+    return core_min(m, n);
+  else 
+    return core_max(m, n);
+}
+/// \name Functions for Compatibility with BigInt (needed by Poly, Curves)
+//@{
+/// isDivisible(a,b) = "is a divisible by b"
+/** 	Assuming that a and  b are in coanonized forms.
+	Defined to be true if mantissa(b) | mantissa(a) && 
+	exp(b) = min*(exp(b), exp(a)).
+ *      This concepts assume a and b are exact BigFloats.
+ */
+inline bool isDivisible(const BigFloat& a, const BigFloat& b) {
+  // assert: a and b are exact BigFloats.
+  if (sign(a.m()) == 0) return true;
+  if (sign(b.m()) == 0) return false;
+  unsigned long bin_a = getBinExpo(a.m());
+  unsigned long bin_b = getBinExpo(b.m());
+  
+  BigInt m_a = a.m() >> bin_a;
+  BigInt m_b = b.m() >> bin_b;
+  long e_a = bin_a + BigFloatRep::bits(a.exp());
+  long e_b = bin_b + BigFloatRep::bits(b.exp());
+  long dx = minStar(e_a, e_b);
+
+  return isDivisible(m_a, m_b) && (dx == e_b); 
+}
+
+inline bool isDivisible(double x, double y) {
+  //Are these exact?
+  return isDivisible(BigFloat(x), BigFloat(y)); 
+}
+
+/// div_exact(x,y) returns the BigFloat quotient of x divided by y
+/**	This is defined only if isDivisible(x,y).
+ */
+// Chee (8/1/2004)   The definition of div_exact(x,y) 
+//   ensure that Polynomials<NT> works with NT=BigFloat and NT=double.
+//Bug: We should first normalize the mantissas of the Bigfloats and
+//then do the BigInt division. For e.g. 1 can be written as 2^{14}*2{-14}.
+//Now if we divide 2 by one using this representation of one and without
+// normalizing it then we get zero.
+inline BigFloat div_exact(const BigFloat& x, const BigFloat& y) {
+  BigInt z;
+  CGAL_assertion (isDivisible(x,y));
+  unsigned long bin_x = getBinExpo(x.m());
+  unsigned long bin_y = getBinExpo(y.m());
+
+  BigInt m_x = x.m() >> bin_x;
+  BigInt m_y = y.m() >> bin_y;
+  long e_x = bin_x + BigFloatRep::bits(x.exp());
+  long e_y = bin_y + BigFloatRep::bits(y.exp());
+  //Since y divides x, e_y = minstar(e_x, e_y)
+  z = div_exact(m_x, m_y);
+
+  //  mpz_divexact(z.get_mp(), x.m().get_mp(), y.m().get_mp()); THIS WAS THE BUG
+  // assert: x.exp() - y.exp() does not under- or over-flow.
+  return BigFloat(z, e_x - e_y);  
+}
+
+inline BigFloat div_exact(double x, double y) {
+  return div_exact(BigFloat(x), BigFloat(y));
+}
+// Remark: there is another notion of "exact division" for BigFloats,
+// 	and that is to make the division return an "exact" BigFloat
+// 	i.e., err()=0.  
+
+/// gcd(a,b) =  BigFloat(gcd(a.mantissa,b.matissa), min(a.exp(), b.exp()) )
+inline BigFloat gcd(const BigFloat& a, const BigFloat& b) {
+  if (sign(a.m()) == 0) return core_abs(b);
+  if (sign(b.m()) == 0) return core_abs(a);
+
+  BigInt r;
+  long dx;
+  unsigned long bin_a = getBinExpo(a.m());
+  unsigned long bin_b = getBinExpo(b.m());
+
+/* THE FOLLOWING IS ALTERNATIVE CODE, for GCD using base B=2^{14}:
+ *std::cout << "bin_a=" << bin_a << ",bin_b=" << bin_b << std::endl;
+  std::cout << "a.exp()=" << a.exp() << ",b.exp()=" << b.exp() << std::endl;
+  long chunk_a = BigFloatRep::chunkFloor(bin_a);
+  long chunk_b = BigFloatRep::chunkFloor(bin_b);
+  BigInt m_a = BigFloatRep::chunkShift(a.m(), chunk_a);
+  BigInt m_b = BigFloatRep::chunkShift(b.m(), chunk_b);
+
+  r = gcd(m_a, m_b);
+  dx = minStar(chunk_a + a.exp(), chunk_b + b.exp());
+*/
+  BigInt m_a = a.m() >> bin_a;
+  BigInt m_b = b.m() >> bin_b;
+  r = gcd(m_a, m_b);
+  dx = minStar(bin_a + BigFloatRep::bits(a.exp()),
+		  bin_b + BigFloatRep::bits(b.exp()));
+
+  long chunks = BigFloatRep::chunkFloor(dx);
+  r <<= (dx - BigFloatRep::bits(chunks));
+  dx = chunks;
+
+  return BigFloat(r, 0, dx);
+}
+
+// Not needed for now:
+/// div_rem
+// inline void div_rem(BigFloat& q, BigFloat& r,
+// 	const BigFloat& a, const BigFloat& b) {
+  //q.makeCopy();
+  //r.makeCopy();
+  //mpz_tdiv_qr(q.get_mp(), r.get_mp(), a.get_mp(), b.get_mp());
+//}//
+
+
+// constructor BigRat from BigFloat
+inline BigRat::BigRat(const BigFloat& f) : RCBigRat(new BigRatRep()){
+  *this = f.BigRatValue();
+}
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/BigFloat_impl.h>
+#include <CGAL/CORE/CoreIO_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_BIGFLOAT_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloatRep.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloatRep.h
new file mode 100644
index 0000000..43d44f8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloatRep.h
@@ -0,0 +1,449 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org);
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigFloatRep.h
+ * Synopsis: 
+ * 		Internal Representation BigFloat.
+ * 
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_BIGFLOATREP_H_
+#define _CORE_BIGFLOATREP_H_
+
+#include <CGAL/CORE/BigRat.h>
+#include <CGAL/CORE/CoreAux.h>
+#include <CGAL/CORE/CoreDefs.h>
+#include <CGAL/CORE/extLong.h>
+
+namespace CORE { 
+
+//  forward reference
+class BigFloat;
+
+//  class BigFloatRep (internal representation for BigFloat)
+class CGAL_CORE_EXPORT BigFloatRep : public RCRepImpl<BigFloatRep> {
+public:
+  static long chunkCeil(long bits);  //inline
+  static long chunkFloor(long bits); //inline
+  static long bits(long chunks);     //inline
+  static BigInt chunkShift(const BigInt& x, long s); //inline
+  static double lg10(BigInt x);      //inline
+  static long floorlg10(BigInt x);   //inline
+
+  /// exp2(e) returns 2^e : called by BigFloat::exp2(e)
+  /** e can be negative */
+  static BigFloatRep* exp2(int e);
+
+  struct DecimalOutput;
+
+  friend class BigFloat;
+
+  BigInt        m;
+  unsigned long err;
+  long          exp;
+
+public:
+  //  constructors
+  BigFloatRep(int=0);           //inline
+  BigFloatRep(short);           //inline
+  BigFloatRep(float);           //inline
+  BigFloatRep(long);          //inline
+  BigFloatRep(double);        //inline
+  BigFloatRep(const BigInt& I, unsigned long u, long l); //inline
+  BigFloatRep(const BigInt& I, long l); //inline
+  BigFloatRep(const BigInt& I); //inline
+  BigFloatRep(const char *);  //inline
+
+  BigRat BigRatize() const;   //inline
+
+  //  the destructor
+  ~BigFloatRep(); //inline
+
+  CORE_NEW(BigFloatRep)    // allocate the memory pool, unless
+  CORE_DELETE(BigFloatRep) // memory pool feature is disabled.
+
+  //  approximation
+  void trunc(const BigInt&, const extLong&, const extLong&);
+  void truncM(const BigFloatRep&, const extLong&, const extLong&);
+  void approx(const BigFloatRep&, const extLong&, const extLong&);
+
+  void div(const BigInt&, const BigInt&, const extLong&, const extLong&);
+  void approx(const BigRat&, const extLong&, const extLong&); //inline
+
+  //  error-normalization
+  void eliminateTrailingZeroes(); //inline
+  void normal();
+  void bigNormal(BigInt&);
+
+  //  arithmetics
+public:
+  void add(const BigFloatRep&, const BigFloatRep&);
+  void sub(const BigFloatRep&, const BigFloatRep&);
+  void mul(const BigFloatRep&, const BigFloatRep&);
+  void div(const BigFloatRep&, const BigFloatRep&, const extLong&);
+  void div2(const BigFloatRep&); ///< exact division by 2
+  /// Converts a pair of BigFloatReps into one with error bounds
+  void centerize(const BigFloatRep&, const BigFloatRep&);
+private:
+  //  squareroot
+  //    arguments:      r = value whose square root we want
+  //                    a = absolute precision of the desired result
+  //                    init = initial approx. to the square root (for Newton)
+  void sqrt(const BigInt& r, const extLong& a);
+  /// sqrt(r,a,rr) -- compute sqrt(r) to absolute precision a,
+  ///      starting from initial approximation of rr.
+  void sqrt(const BigInt& r, const extLong& a, const BigFloat& init);
+  void sqrt(const BigFloatRep& r, const extLong& a);
+  /// sqrt(r,a,rr) -- compute sqrt(r) to absolute precision a,
+  ///      starting from initial approximation of rr.
+  void sqrt(const BigFloatRep& r, const extLong& a, const BigFloat& init);
+
+  //  comparison
+  int compareMExp(const BigFloatRep&) const;
+
+  //  builtin functions
+  extLong lMSB() const;      //inline
+  extLong uMSB() const;      //inline
+  extLong MSB() const;       //inline
+  extLong flrLgErr() const;  //inline
+  extLong clLgErr() const;   //inline
+
+  bool    isZeroIn() const;  //inline
+  int     signM() const;     //inline
+
+  //  cast functions
+  double toDouble() const;
+  long toLong() const;
+  BigInt toBigInt() const;
+
+  //  conversion
+
+  // toString() Joaquin Grech 31/5/2003
+  std::string toString(long prec=get_static_defBigFloatOutputDigits(), bool sci=false) const;
+  std::string round(std::string inRep, long& L10, unsigned int width) const;
+  DecimalOutput toDecimal(unsigned int width=get_static_defBigFloatOutputDigits(),
+                          bool Scientific=false) const;
+  void fromString(const char *p, const extLong & prec = get_static_defBigFloatInputDigits());
+
+  void dump() const;  //inline
+  long adjustE(long E, BigInt M, long e) const;
+
+public:
+  //  stream operators
+  std::ostream& operator <<(std::ostream&) const; //inline
+  std::istream& operator >>(std::istream&);
+};//class BigFloatRep
+
+////////////////////////////////////////////////////////////
+//  Implementations
+////////////////////////////////////////////////////////////
+
+struct BigFloatRep::DecimalOutput {
+  std::string rep;    // decimal output string
+  int sign;           // 0, +1 or -1
+  bool isScientific;  // false=positional notation
+  int noSignificant;  // number of significant digits
+  //   -1 means this information is not explicitly
+  //   given, and must be determined from rep, etc.
+  bool isExact;       //
+  int errorCode;      // 0 = no error
+                      // 1 = sign of number is unknown (e.g., mantissa
+                      //  is smaller than error)
+
+  DecimalOutput() : rep(""), sign(1), isScientific(false),
+                    noSignificant(0), isExact(false), errorCode(0) {}
+};//DecimalOutput
+
+// constants used by BigFloatRep
+//	NOTES:  CHUNK_BIT is the number of bits in each Chunk
+//	Since LONG_BIT = 32 or 64, then CHUNK_BIT = 14 or 30.
+//	We have:  0 <= err < 4 * 2^{CHUNK_BIT}
+
+const long CHUNK_BIT = (long)(LONG_BIT / 2 - 2); 	//  chunks
+const long HALF_CHUNK_BIT = (CHUNK_BIT + 1) / 2;
+const long DBL_MAX_CHUNK = (DBL_MAX_EXP - 1) / CHUNK_BIT + 1;
+const double lgTenM = 3.321928094887362;
+
+inline long BigFloatRep::chunkCeil(long bits) {
+  if (bits > 0)
+    return (bits - 1) / CHUNK_BIT + 1;
+  else
+    return - (- bits) / CHUNK_BIT;
+}//chunkCeil
+
+inline long BigFloatRep::chunkFloor(long bits) {
+  if (bits >= 0)
+    return bits / CHUNK_BIT;
+  else
+    return - (- bits - 1) / CHUNK_BIT - 1;
+}//chunkFloor
+
+// bits(c) returns the number of bits in c chunks:
+inline long BigFloatRep::bits(long chunks) {
+  return CHUNK_BIT * chunks;
+}
+
+inline BigInt BigFloatRep::chunkShift(const BigInt& x, long s) {
+  if (!s || sign(x) == 0)
+    return x;
+  else if (s > 0)
+    //  shift left
+    if (sign(x) > 0)
+      return x << static_cast<unsigned long>(bits(s));
+    else //  x < 0
+      return - ((-x) << static_cast<unsigned long>(bits(s)));
+  else //  shift right
+    if (sign(x) > 0)
+      return x >> static_cast<unsigned long>(bits(-s));
+    else //  x < 0
+      return - ((-x) >> static_cast<unsigned long>(bits(-s)));
+}//chunkShift
+
+inline BigFloatRep* BigFloatRep::exp2(int e) {
+  long ee;  // this is going to be the exponent
+  if (e >= 0)
+    ee = e/CHUNK_BIT;
+  else
+    ee = - ((-e + CHUNK_BIT -1)/CHUNK_BIT);
+
+  int rem = e - (ee * CHUNK_BIT);     // Assert: 0 <= rem < CHUNK_BIT
+
+  return new BigFloatRep((1<<rem), 0, ee);
+  // Here, we assume CHUNK_BIT is less than int width
+}
+
+//  constructors
+inline BigFloatRep::BigFloatRep(short n)
+  : m(n), err(0), exp(0) {}
+
+inline BigFloatRep::BigFloatRep(float n)
+  : m(n), err(0), exp(0) {}
+
+//  Chee (8/8/04) -- introduced constructor from int
+inline BigFloatRep::BigFloatRep(int n)
+  : m(n), err(0), exp(0) {}
+
+//  Chee (8/8/04) -- introduced constructor from long
+inline BigFloatRep::BigFloatRep(long n)
+  : m(n), err(0), exp(0) {}
+
+//  Chee (8/8/04) -- introduced constructor from double
+/* This turns out to be an alternative implementation of the
+ * original one in BigFloat.cpp!!
+inline BigFloatRep::BigFloatRep(double d)
+	    : m(IntMantissa(d)), err(0), exp(0) {
+     BigFloatRep * bfr = exp2(IntExponent(d));  // take care of the exponent
+     m *= bfr->m;
+     exp = bfr->exp;
+}
+*/
+
+inline BigFloatRep::BigFloatRep(const BigInt& I, unsigned long er, long ex)
+  : m(I), err(er), exp(ex) {}
+
+inline BigFloatRep::BigFloatRep(const BigInt& I)
+  : m(I), err(0), exp(0) {}
+
+//Constructs the BigFloat representing I*2^{ex}.
+//If ex >=0 then it is clear how to do it.
+//Otherwise, let |ex| = CHUNK_BIT * q + r. Then
+//I*2^{ex} = I*2^{CHUNK_BIT -r} 2^{-CHUNK_BIT * (q+1)}
+inline BigFloatRep::BigFloatRep(const BigInt& I, long ex) {
+  err=0;
+  exp = chunkFloor(ex);
+  if(ex >= 0)
+    m = I<<(ex - bits(exp));
+  else{//ex < 0
+    exp = chunkFloor(abs(ex));
+    m = I << (CHUNK_BIT - (-ex - bits(exp)));
+    exp = -1*(1 + exp);
+  }
+}
+
+inline BigFloatRep::BigFloatRep(const char *str) : m(0), err(0), exp(0) {
+  fromString(str);
+}
+
+inline BigRat BigFloatRep::BigRatize() const {
+  if (exp >= 0)
+    return BigRat(chunkShift(m, exp), 1);
+  else
+    return BigRat(m, chunkShift(1, - exp));
+}
+
+//  the destructor
+inline BigFloatRep::~BigFloatRep() {}
+
+inline void BigFloatRep::approx(const BigRat& R, const extLong& r, const extLong& a) {
+  div(numerator(R), denominator(R), r, a);
+}
+
+//  eliminate trailing zeroes
+inline void BigFloatRep::eliminateTrailingZeroes() {
+  // eliminate trailing 0's    -- IP 10/9/98
+  /*if (err == 0 && m != 0) {
+    while ((m & ((1 << CHUNK_BIT) - 1)) == 0) {
+      m >>= CHUNK_BIT;
+      exp++;
+    }
+  }*/
+  // new code, much faster, Zilin Du (Nov, 2003)
+  if (err == 0 && sign(m) != 0) {
+    int r = getBinExpo(m) / CHUNK_BIT;
+    m >>= (r * CHUNK_BIT);
+    exp += r;
+  }
+}
+
+//  bultin functions
+inline extLong BigFloatRep::lMSB() const {
+  if (!isZeroIn())
+    return extLong(floorLg(abs(m) - err)) + bits(exp);
+  else
+    return extLong(CORE_negInfty);
+}
+
+/// uMSB() returns an upper bound on log_2(abs(*this)).
+/** Returns -1 if (*this)=0.  
+ * Not well-defined if zero is in the interval. 
+ */
+inline extLong BigFloatRep::uMSB() const {
+  return extLong(floorLg(abs(m) + err)) + bits(exp);
+}
+
+inline extLong BigFloatRep::MSB() const {
+  // Note : MSB is undefined if it's not exact.
+  if (sign(m))          // sign(m) is non-zero
+    return extLong(floorLg(m)) + bits(exp);
+  else
+    return extLong(CORE_negInfty);
+}
+
+inline extLong BigFloatRep::flrLgErr() const {
+  if (err)
+    return extLong(flrLg(err)) + bits(exp);
+  else
+    return extLong(CORE_negInfty);
+}
+
+inline extLong BigFloatRep::clLgErr() const {
+  if (err)
+    return extLong(clLg(err)) + bits(exp);
+  else
+    return extLong(CORE_negInfty);
+}
+
+// isZero() = true iff zero is inside the interval of BigFloat:
+inline bool BigFloatRep::isZeroIn() const {
+  if (err == 0){
+    return (m == 0);	//Nov 6, 2002: bug fix!
+  }
+  long lm = bitLength(m);
+  if (lm > CHUNK_BIT+2) {
+    return false;   // since err < 4 * 2^{CHUNK_BIT}
+  } else {
+    return (abs(m) <= BigInt(err));
+  }
+}
+
+inline int BigFloatRep::signM() const {
+  return sign(m);
+}
+
+inline double BigFloatRep::lg10(BigInt x) {
+  if (x == 0)
+    return 0;
+
+  BigInt t(abs(x));
+  long l = -1;
+  double d = 0;
+
+  while (t > 0) {
+    l++;
+    d /= 10;
+    d += ulongValue(t%10);
+    t /= 10;
+  }
+  return std::log10(d) + l;
+}
+
+// this is a simpler form of lg10()
+inline long BigFloatRep::floorlg10(BigInt x) {
+  if (x == 0)
+    return 0;
+  BigInt t(abs(x));
+  long l = -1;
+
+  while (t > 0) {
+    l++;
+    t /= 10;
+  }
+  return l;
+}
+
+inline std::ostream& BigFloatRep::operator<<(std::ostream& o) const {
+  bool sci = (o.flags() & std::ios::scientific) > 0;
+  BigFloatRep::DecimalOutput r = toDecimal(o.precision(), sci);
+  if (r.sign == -1)
+    o << "-";
+  o << r.rep;
+  return o;
+}
+
+/* Returns a std::string with precision and format specified
+   Works as cout << with the exception that if the output
+   contains any error it returns a NULL
+   Joaquin Grech 31/5/03
+   */
+inline std::string BigFloatRep::toString(long prec, bool sci) const {
+  BigFloatRep::DecimalOutput r = toDecimal(prec, sci);
+
+  if (r.errorCode == 0) {
+    if (r.sign < 0)
+      return std::string("-")+r.rep;
+    else
+      return r.rep;
+  }
+  return NULL;
+}
+
+inline void BigFloatRep::dump() const {
+  std::cout << "---- BFRep: " << this << " ----" << std::endl;
+  std::cout << "  BF value: ";
+  this->operator<<(std::cout);
+  std::cout <<  std::endl;
+  std::cout << "  m = " << m << std::endl;
+  std::cout << "  err = " << err << std::endl;
+  std::cout << "  exp = " << exp << std::endl;
+  std::cout << " -- End of BFRep " << this << " -- " << std::endl;
+}
+
+
+
+} //namespace CORE
+#endif // _CORE_BIGFLOATREP_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat_impl.h
new file mode 100644
index 0000000..75c33c8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigFloat_impl.h
@@ -0,0 +1,1327 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigFloat.cpp
+ * Synopsis:
+ *       BigFloat numbers with error bounds 
+ *
+ *       EXACTNESS PROPERTY:
+ *       ==================
+ *       For BigFloats that are exact (i.e., error=0),
+ *       addition/subtraction and multiplication return the
+ *       exact result (i.e., error=0).  We also introduce the operation
+ *       div2(), which simply divides a BigFloat by 2,
+ *       but this again preserves exactness.  Such exactness
+ *       properties are used in our Newton iteration/Sturm Sequences.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <ctype.h>
+#include <CGAL/CORE/BigFloat.h>
+#include <CGAL/CORE/Expr.h>
+
+namespace CORE { 
+
+
+////////////////////////////////////////////////////////////
+// Misc Helper Functions
+////////////////////////////////////////////////////////////
+
+CGAL_INLINE_FUNCTION
+BigInt FiveTo(unsigned long exp) {
+  if (exp == 0)
+    return BigInt(1);
+  else if (exp == 1)
+    return BigInt(5);
+  else {
+    BigInt x = FiveTo(exp / 2);
+
+    x = x * x;
+
+    if (exp & 1)
+      x *= 5;
+
+    return x;
+  }
+}
+
+////////////////////////////////////////////////////////////
+//  class BigFloat
+////////////////////////////////////////////////////////////
+
+// STATIC BIGFLOAT CONSTANTS
+// ZERO
+CGAL_INLINE_FUNCTION
+const BigFloat& BigFloat::getZero() {
+  static BigFloat Zero(0);
+  return Zero;
+}
+// ONE
+CGAL_INLINE_FUNCTION
+const BigFloat& BigFloat::getOne() {
+  static BigFloat One(1);
+  return One;
+}
+
+// A special constructor for BigFloat from Expr
+// -- this method is somewhat of an anomaly (we normally do not expect
+//    BigFloats to know about Expr).
+CGAL_INLINE_FUNCTION
+BigFloat::BigFloat(const Expr& E, const extLong& r, const extLong& a)
+  : RCBigFloat(new BigFloatRep()) {
+  *this = E.approx(r, a).BigFloatValue(); // lazy implementaion, any other way?
+}
+
+////////////////////////////////////////////////////////////
+//  class BigFloatRep
+////////////////////////////////////////////////////////////
+
+CGAL_INLINE_FUNCTION
+BigFloatRep::BigFloatRep(double d) : m(0), err(0), exp(0) {
+  if (d != 0.0) {
+    int isNegative = 0;
+
+    if (d < 0.0) {
+      isNegative = 1;
+      d          = - d;
+    }
+
+    int    binExp;
+    double f = frexp(d, &binExp);
+
+    exp = chunkFloor(binExp);
+
+    long s = binExp - bits(exp);
+
+    long   stop = 0;
+    double intPart;
+
+    // convert f into a BigInt
+    while (f != 0.0 && stop < DBL_MAX_CHUNK) {
+      f =   ldexp(f, (int)CHUNK_BIT);
+      f =   modf(f, &intPart);
+      m <<= CHUNK_BIT;
+      m +=  (long)intPart;
+      exp--;
+      stop++;
+    }
+#ifdef CORE_DEBUG
+    assert (s >= 0);
+#endif
+
+    if (s)
+      m <<= s;
+    if (isNegative)
+      negate(m);
+  }
+}//BigFloatRep constructor
+
+//  approximation
+CGAL_INLINE_FUNCTION
+void BigFloatRep::trunc(const BigInt& I, const extLong& r, const extLong& a) {
+  if (sign(I)) {
+    long tr = chunkFloor((- r + bitLength(I)).asLong());
+    long ta = chunkFloor(- a.asLong());
+    long t;
+
+    if (r.isInfty() || a.isTiny())
+      t = ta;
+    else if (a.isInfty())
+      t = tr;
+    else
+      t = ta < tr ? tr : ta;
+
+    if (t > 0) {  // BigInt remainder;
+      m   = chunkShift(I, - t);
+      err = 1;
+      exp = t;
+    } else { //  t <= 0
+      m   = I;
+      err = 0;
+      exp = 0;
+    }
+  } else {//  I == 0
+    m   = 0;
+    err = 0;
+    exp = 0;
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void BigFloatRep :: truncM(const BigFloatRep& B, const extLong& r, const extLong& a) {
+  if (sign(B.m)) {
+    long tr = chunkFloor((- 1 - r + bitLength(B.m)).asLong());
+    long ta = chunkFloor(- 1 - a.asLong()) - B.exp;
+    long t;
+
+    if (r.isInfty() || a.isTiny())
+      t = ta;
+    else if (a.isInfty())
+      t = tr;
+    else
+      t = ta < tr ? tr : ta;
+
+    if (t >= chunkCeil(clLg(B.err))) {
+      m   = chunkShift(B.m, - t);
+      err = 2;
+      exp = B.exp + t;
+    } else //  t < chunkCeil(clLg(B.err))
+      core_error(std::string("BigFloat error: truncM called with stricter")
+	  + "precision than current error.", __FILE__, __LINE__, true);
+  } else {//  B.m == 0
+    long t = chunkFloor(- a.asLong()) - B.exp;
+
+    if (t >= chunkCeil(clLg(B.err))) {
+      m   = 0;
+      err = 1;
+      exp = B.exp + t;
+    } else //  t < chunkCeil(clLg(B.err))
+      core_error(std::string("BigFloat error: truncM called with stricter")
+	  + "precision than current error.", __FILE__, __LINE__, true);
+  }
+}
+
+// This is the main approximation function
+// REMARK: would be useful to have a self-modifying version
+// 		of this function (e.g., for Newton).
+CGAL_INLINE_FUNCTION
+void BigFloatRep::approx(const BigFloatRep& B,
+              const extLong& r, const extLong& a) {
+  if (B.err) {
+    if (1 + clLg(B.err) <= bitLength(B.m))
+      truncM(B, r + 1, a);
+    else //  1 + clLg(B.err) > lg(B.m)
+      truncM(B, CORE_posInfty, a);
+  } else {//  B.err == 0
+    trunc(B.m, r, a - bits(B.exp));
+    exp += B.exp;
+  }
+  // Call normalization globally     -- IP 10/9/98
+  normal();
+}
+
+CGAL_INLINE_FUNCTION
+void BigFloatRep::div(const BigInt& N, const BigInt& D,
+              const extLong& r, const extLong& a) {
+  if (sign(D)) {
+    if (sign(N)) {
+      long tr = chunkFloor((- r + bitLength(N) - bitLength(D) - 1).asLong());
+      long ta = chunkFloor(- a.asLong());
+
+      if (r.isInfty() || a.isTiny())
+        exp = ta;
+      else if (a.isInfty())
+        exp = tr;
+      else
+        exp = ta < tr ? tr : ta;
+
+      BigInt remainder;
+
+      // divide(chunkShift(N, - exp), D, m, remainder);
+      div_rem(m, remainder, chunkShift(N, - exp), D);
+
+      if (exp <= 0 && sign(remainder) == 0)
+        err = 0;
+      else
+        err = 1;
+    } else {//  N == 0
+      m   = 0;
+      err = 0;
+      exp = 0;
+    }
+  } else //  D == 0
+    core_error( "BigFloat error: zero divisor.", __FILE__, __LINE__, true);
+
+  // Call normalization globally     -- IP 10/9/98
+  normal();
+}//div
+
+//  error-normalization
+CGAL_INLINE_FUNCTION
+void BigFloatRep::normal() {
+  long le = flrLg(err);
+
+  if (le >= CHUNK_BIT + 2) { // so we do not carry more than 16 = CHUNK_BIT + 2
+	                     // bits of error
+    long f = chunkFloor(--le); // f is roughly equal to floor(le/CHUNK_BIT)
+    long bits_f = bits(f);   // f chunks will have bits_f many bits
+#ifdef CORE_DEBUG
+    assert (bits_f >= 0);
+#endif
+
+    m   >>= bits_f;  // reduce mantissa by bits_f many bits
+    err >>= bits_f;  // same for err
+    err +=  2;       // why 2?
+    exp +=  f;       
+  }
+  if (err == 0)      // unlikely, if err += 2 above
+    eliminateTrailingZeroes();
+}
+
+// bigNormal(err) 
+//     convert a bigInt error value (=err) into an error that fits into
+//     a long number.  This is done by
+//     by increasing the exponent, and corresponding decrease
+//     in the bit lengths of the mantissa and error.
+//
+CGAL_INLINE_FUNCTION
+void BigFloatRep::bigNormal(BigInt& bigErr) {
+  long le = bitLength(bigErr);
+
+  if (le < CHUNK_BIT + 2) {
+    err = ulongValue(bigErr);
+  } else {
+    long f = chunkFloor(--le);
+    long bits_f = bits(f);
+#ifdef CORE_DEBUG
+    assert(bits_f >= 0);
+#endif
+
+    m      >>= bits_f;
+    bigErr >>= bits_f;
+    err    = ulongValue(bigErr) + 2; // you need to add "2" because "1" comes
+    		// from truncation error in the mantissa, and another
+		// "1" comes from the truncation error in the bigErr.
+		// (But there is danger of overflow...)
+    exp    += f;
+  }
+
+  if (err == 0)
+    eliminateTrailingZeroes();
+}
+
+// ARITHMETIC:
+//  Addition
+CGAL_INLINE_FUNCTION
+void BigFloatRep::add(const BigFloatRep& x, const BigFloatRep& y) {
+  long expDiff = x.exp - y.exp;
+
+  if (expDiff > 0) {//  x.exp > y.exp
+    if (!x.err) {
+      m   = chunkShift(x.m, expDiff) + y.m;
+      err = y.err;
+      exp = y.exp;
+    } else {//  x.err > 0
+      m   = x.m + chunkShift(y.m, - expDiff); // negative shift!
+      err = x.err + 5; // To account for y.err (but why 5?)
+      exp = x.exp;     // 
+      // normal();
+    }
+  } else if (!expDiff) {//  x.exp == y.exp
+    m   = x.m + y.m;
+    err = x.err + y.err;
+    exp = x.exp;
+    // normal();
+  } else {//  x.exp < y.exp
+    if (!y.err) {
+      m   = x.m + chunkShift(y.m, - expDiff);
+      err = x.err;
+      exp = x.exp;
+    } else {//  y.err > 0
+      m   = chunkShift(x.m, expDiff) + y.m;
+      err = y.err + 5;
+      exp = y.exp;
+      // normal();
+    }
+  }
+  // Call normalization globally     -- IP 10/9/98
+  normal();
+}
+
+//  Subtraction
+CGAL_INLINE_FUNCTION
+void BigFloatRep::sub(const BigFloatRep& x, const BigFloatRep& y) {
+  long expDiff = x.exp - y.exp;
+
+  if (expDiff > 0) {//  x.exp > y.exp
+    if (!x.err) {
+      m   = chunkShift(x.m, expDiff) - y.m;
+      err = y.err;
+      exp = y.exp;
+    } else {//  x.err > 0
+      m   = x.m - chunkShift(y.m, - expDiff);
+      err = x.err + 5;
+      exp = x.exp;
+      // normal();
+    }
+  } else if (!expDiff) {
+    m   = x.m - y.m;
+    err = x.err + y.err;
+    exp = x.exp;
+    // normal();
+  } else { //  x.exp < y.exp
+    if (!y.err) {
+      m   = x.m - chunkShift(y.m, - expDiff);
+      err = x.err;
+      exp = x.exp;
+    } else {//  y.err > 0
+      m   = chunkShift(x.m, expDiff) - y.m;
+      err = y.err + 5;
+      exp = y.exp;
+      // normal();
+    }
+  }
+  // Call normalization globally     -- IP 10/9/98
+  normal();
+}
+
+CGAL_INLINE_FUNCTION
+void BigFloatRep::mul(const BigFloatRep& x, const BigFloatRep& y) {
+  m = x.m * y.m;
+  exp = x.exp + y.exp;
+  // compute error (new code, much faster. Zilin Du, Nov 2003)
+  if (x.err == 0 && y.err == 0) {
+    err = 0;
+    eliminateTrailingZeroes();
+  } else {
+    BigInt bigErr(0);
+    if (y.err != 0)
+      bigErr += abs(x.m)*y.err;
+    if (x.err != 0)
+      bigErr += abs(y.m)*x.err;
+    if (x.err !=0 && y.err != 0)
+      bigErr += x.err*y.err;
+    bigNormal(bigErr);
+  }
+}
+// BigFloat div2 will half the value of x, exactly with NO error
+// 	REMARK: should generalize this to dividing by any power of 2
+// 	We need this in our use of BigFloats to maintain isolation
+// 	intervals (e.g., in Sturm sequences)	--Chee/Vikram 4/2003
+//
+CGAL_INLINE_FUNCTION
+void BigFloatRep :: div2(const BigFloatRep& x) {
+  if (isEven(x.m)) {
+    m = (x.m >> 1);
+    exp = x.exp ;
+  } else {
+    m = (x.m << static_cast<unsigned long>(CHUNK_BIT-1));
+    exp = x.exp -1;
+  }
+}
+
+// Converts a BigFloat interval into one BigFloat with almost same error bound
+// This routine ignores the errors in inputs a and b.
+// But you cannot really ignore them since, they are taken into account
+// when you compute "r.sub(a,b)"...
+CGAL_INLINE_FUNCTION
+void BigFloatRep::centerize(const BigFloatRep& a, const BigFloatRep& b) {
+  if ((a.m == b.m) && (a.err == b.err) && (a.exp == b.exp)) {
+    m = a.m;
+    err = a.err;
+    exp = a.exp;
+    return;
+  }
+
+  BigFloatRep r;
+  r.sub(a, b);
+  r.div2(r);
+
+  //setup mantissa and exponent, but not error bits
+  // But this already sets the error bits? Chee
+  add(a,b);
+  div2(*this);
+  // error bits = ceil ( B^{-exp}*|a-b|/2 )
+
+  // bug fixed: possible overflow on converting
+  // Zilin & Vikram, 08/24/04
+  // err = 1 + longValue(chunkShift(r.m, r.exp - exp));
+  BigInt E = chunkShift(r.m, r.exp - exp);
+  bigNormal(E);
+}
+
+// BigFloat Division, computing x/y:
+//      Unlike +,-,*, this one takes a relative precision bound R
+//	Note that R is only used when x and y are error-free!
+//	(This remark means that we may be less efficient than we could be)
+//
+//  	Assert( R>0  && R< CORE_Infty )
+//
+CGAL_INLINE_FUNCTION
+void BigFloatRep :: div(const BigFloatRep& x, const BigFloatRep& y,
+                        const extLong& R) {
+  if (!y.isZeroIn()) { //  y.m > y.err, so we are not dividing by 0
+    if (!x.err && !y.err) {
+      if (R < 0 || R.isInfty()) //Oct 9, 2002: fixed major bug! [Zilin/Chee]
+        div(x.m, y.m, get_static_defBFdivRelPrec(), CORE_posInfty);
+      else
+        div(x.m, y.m, R, CORE_posInfty);
+      exp += x.exp - y.exp; // chen: adjust exp.
+    } else {//  x.err > 0 or y.err > 0
+      BigInt bigErr, errRemainder;
+
+      if (x.isZeroIn()) { //  x.m <= x.err
+        m   = 0;
+        exp = x.exp - y.exp;
+
+        div_rem(bigErr, errRemainder, abs(x.m) + static_cast<long>(x.err),
+                abs(y.m) - static_cast<long>(y.err));
+      } else { //  x.m > x.err
+        long lx = bitLength(x.m);
+        long ly = bitLength(y.m);
+        long r;
+
+        if (!x.err) //  x.err == 0 and y.err > 0
+          r = ly + 2;
+        else if(!y.err)  //  x.err > 0 and y.err == 0
+          r = lx + 2;
+        else  //  x.err > 0 and y.err > 0
+          r = lx < ly ? lx + 2: ly + 2;
+
+        long   t = chunkFloor(- r + lx - ly - 1);
+        BigInt remainder;
+
+        div_rem(m, remainder, chunkShift(x.m, - t), y.m);
+        exp = t + x.exp - y.exp;
+
+        long delta = ((t > 0) ? 2 : 0);
+
+        // Chen Li: 9/9/99
+        // here again, it use ">>" operator with a negative
+        // right operand. So the result is not well defined.
+        // Erroneous code:
+        //   divide(abs(remainder) + (static_cast<long>(x.err) >> bits(t))
+        //                     + delta + static_cast<long>(y.err) * abs(m),
+        //                     abs(y.m) - static_cast<long>(y.err),
+        //                     bigErr,
+        //                     errRemainder);
+        // New code:
+        BigInt errx_over_Bexp = x.err;
+        long bits_Bexp = bits(t);
+        if (bits_Bexp >= 0) {
+          errx_over_Bexp >>= bits_Bexp;
+        } else {
+          errx_over_Bexp <<= (-bits_Bexp);
+        }
+
+        // divide(abs(remainder) + errx_over_Bexp
+        //        + delta + static_cast<long>(y.err) * abs(m),
+        //        abs(y.m) - static_cast<long>(y.err),
+        //        bigErr,
+        //        errRemainder);
+        div_rem(bigErr, errRemainder,
+                abs(remainder) + errx_over_Bexp + delta + static_cast<long>(y.err) * abs(m),
+                abs(y.m) - static_cast<long>(y.err));
+      }
+
+      if (sign(errRemainder))
+        ++bigErr;
+
+      bigNormal(bigErr);
+    }
+  } else {//  y.m <= y.err
+    core_error("BigFloat error: possible zero divisor.",
+		    __FILE__, __LINE__, true);
+  }
+
+  // Call normalization globally     -- IP 10/9/98
+  // normal(); -- Chen: after calling bigNormal, this call is redundant.
+}// BigFloatRep::div
+
+//  squareroot for BigInt argument, without initial approximation
+//  sqrt(x,a) computes sqrt of x to absolute precision a.
+//      -- this is where Newton is applied
+//      -- this is called by BigFloatRep::sqrt(BigFloat, extLong)
+CGAL_INLINE_FUNCTION
+void BigFloatRep::sqrt(const BigInt& x, const extLong& a) {
+  sqrt(x, a, BigFloat(x, 0, 0));
+} // sqrt(BigInt x, extLong a) , without initial approx
+
+//  sqrt(x,a,A) where
+//      x = bigInt whose sqrt is to be computed
+//      a = absolute precision bound
+//      A = initial approximation in BigFloat
+//  -- this is where Newton is applied
+//  -- it is called by BigFloatRep::sqrt(BigFloatRep, extLong, BigFloat)
+CGAL_INLINE_FUNCTION
+void BigFloatRep::sqrt(const BigInt& x, const extLong& a, const BigFloat& A) {
+  if (sign(x) == 0) {
+    m = 0;
+    err = 0;
+    exp = 0;
+  } else if (x == 1) {
+    m = 1;
+    err = 0;
+    exp = 0;
+  } else  {// main case
+    // here is where we use the initial approximation
+    m = A.m();
+    err = 0;
+    exp = A.exp();
+
+    BigFloatRep q, z;
+    extLong     aa;
+    // need this to make sure that in case the
+    // initial approximation A is less than sqrt(x)
+    // then Newton iteration will still proceed at
+    // least one step.
+    bool firstTime = true;
+    for (;;) {
+      aa    = a - bits(exp);
+      q.div(x, m, CORE_posInfty, aa);
+      q.err = 0;
+      q.exp -= exp;
+
+      z.sub(*this, q);  // this=current approximation, so z = this - q
+      /*if (sign(z.m) <= 0 || z.MSB() < - a)  // justification: see Koji's
+          break;                              // thesis (p. 28) which states
+                                              // that we can exit when
+                                              // " (*this) <= q + 2**(-a)"
+      */
+      // The preceding code is replaced by what follows:
+      if (z.MSB() < -a)
+        break;
+      if (sign(z.m) <= 0) {
+        if (firstTime)
+          firstTime = false;
+        else
+          break;
+      }
+
+      z.add(*this, q);
+      // Chen Li: a bug fixed here.
+      //      m   = z.m >> 1;
+      //      err = 0;
+      //      exp = z.exp;
+      if ((z.m > 1) && isEven(z.m)) {
+        m = z.m >> 1;               // exact division by 2
+        err = 0;
+        exp = z.exp;
+      } else {                      // need to shift left before division by 2
+        m = chunkShift(z.m, 1) >> 1;
+        err = 0;
+        exp = z.exp - 1;
+      }//else
+    }//for
+  }//else
+} // sqrt of BigInt, with initial approx
+
+// MAIN ENTRY INTO SQRT FUNCTION (BIGFLOAT ARGUMENT, WITHOUT INITIAL APPROX)
+CGAL_INLINE_FUNCTION
+void BigFloatRep::sqrt(const BigFloatRep& x, const extLong& a) {
+  sqrt(x, a, BigFloat(x.m, 0, x.exp));
+} //sqrt(BigFloat, extLong a)
+
+// MAIN ENTRY INTO SQRT FUNCTION (BIGFLOAT ARGUMENT WITH INITIAL APPROXIMATION)
+CGAL_INLINE_FUNCTION
+void BigFloatRep::sqrt(const BigFloatRep& x, const extLong& a, const BigFloat& A) {
+  // This computes the sqrt of x to absolute precision a, starting with
+  // the initial approximation A
+  if (sign(x.m) >= 0) {          //  x.m >= 0
+    int delta = x.exp & 1;    // delta=0 if x.exp is even, otherwise delta=1
+
+    if (x.isZeroIn()) {         //  x.m <= x.err
+      m = 0;
+      if (!x.err)
+        err = 0;
+      else {                  //  x.err > 0
+        err = (long)(std::sqrt((double)x.err));
+        err++;
+        err <<= 1;
+        if (delta)
+          err <<= HALF_CHUNK_BIT;
+      }
+      exp = x.exp >> 1;
+      normal();
+    } else {
+      long aExp = A.exp() - (x.exp >> 1);
+      BigFloat AA( chunkShift(A.m(), delta), 0, aExp);
+
+      if (!x.err) {             //  x.m > x.err = 0 (ERROR FREE CASE)
+        BigFloatRep z;
+        extLong ppp;
+        if (a.isInfty())        //Oct 9, 2002: fixed major bug! [Zilin/Chee]
+          ppp = get_static_defBFsqrtAbsPrec();
+        else
+          ppp = a + EXTLONG_ONE;
+        extLong absp  = ppp + bits(x.exp >> 1);
+
+        z.sqrt(chunkShift(x.m, delta), absp, AA); // call sqrt(BigInt, a, AA)
+
+        long p = (absp + bits(z.exp)).asLong();
+
+        // Next, normalize the error:
+        if (p <= 0) {
+          m = z.m;
+          // Chen Li: a bug fixed
+          //    BigInt bigErr = 1 << (-p);
+          BigInt bigErr(1);
+          bigErr = bigErr << static_cast<unsigned long>(-p);
+          exp = z.exp + (x.exp >> 1);
+          bigNormal(bigErr);
+        } else {                  //  p > 0
+          m = chunkShift(z.m, chunkCeil(p));
+          long r = CHUNK_BIT - 1 - (p + CHUNK_BIT - 1) % CHUNK_BIT;
+#ifdef CORE_DEBUG
+          assert(r >= 0);
+#endif
+
+          err = 1 >> r;
+          exp = - chunkCeil(ppp.asLong());
+          normal();
+        }
+      } else {                      //  x.m > x.err > 0 (mantissa has error)
+        BigFloatRep z;
+        extLong absp=-flrLg(x.err)+bitLength(x.m)-(bits(delta) >> 1)+EXTLONG_FOUR;
+
+        z.sqrt(chunkShift(x.m, delta), absp, AA);
+
+        long qqq = - 1 + (bitLength(x.m) >> 1) - delta * HALF_CHUNK_BIT;
+        long qq  = qqq - clLg(x.err);
+        long q   = qq + bits(z.exp);
+
+        if (q <= 0) {
+          m = z.m;
+          long   qqqq   = - qqq - bits(z.exp);
+          // Chen Li (09/08/99), a bug fixed here:
+          //        BigInt bigErr = x.err << - qqqq;
+          // when (-qqqq) is negative, the result is not correct.
+          // how "<<" and ">>" process negative second operand is
+          // not well defined. Seems it just take it as a unsigned
+          // integer and extract the last few bits.
+          // x.err is a long number which easily overflows.
+          // From page 22 of Koji's paper, I think the exponent is
+          // wrong here. So I rewrote it as:
+          BigInt bigErr = x.err;
+          if (qqqq >= 0) {
+            bigErr <<= qqqq;
+          } else {
+            bigErr >>= (-qqqq);
+            ++bigErr; // we need to keep its ceiling.
+          }
+
+          exp = z.exp + (x.exp >> 1);
+          bigNormal(bigErr);
+        } else {         //  q > 0
+          m = chunkShift(z.m, chunkCeil(q));
+          long r = CHUNK_BIT - 1 - (q + CHUNK_BIT - 1) % CHUNK_BIT;
+#ifdef CORE_DEBUG
+          assert(r >= 0);
+#endif
+
+          err = 1 >> r;
+          exp = (x.exp >> 1) - chunkCeil(qq);
+          normal();
+        }
+      }  // end of case with error in mantissa
+    }//else
+  } else
+    core_error("BigFloat error: squareroot called with negative operand.",
+		    __FILE__, __LINE__, true);
+} //sqrt with initial approximation
+
+//  compareMExp(x)
+//    returns  1 if *this > x
+//             0 if *this = x,
+//            -1 if *this < x,
+//
+//      Main comparison method for BigFloat
+//      This is called by BigFloat::compare()
+//      BE CAREFUL:  The error bits are ignored!
+//      Need another version if we want to take care of error bits
+
+CGAL_INLINE_FUNCTION
+int BigFloatRep :: compareMExp(const BigFloatRep& x) const {
+  int st = sign(m);
+  int sx = sign(x.m);
+
+  if (st > sx)
+    return 1;
+  else if (st == 0 && sx == 0)
+    return 0;
+  else if (st < sx)
+    return - 1;
+  else { //  need to compare m && exp
+    long expDiff = exp - x.exp;
+
+    if (expDiff > 0) //  exp > x.exp
+      return cmp(chunkShift(m, expDiff), x.m);
+    else if (!expDiff)
+      return cmp(m, x.m);
+    else  //  exp < x.exp
+      return cmp(m, chunkShift(x.m, - expDiff));
+  }
+}
+
+// 3/6/2000:
+// This is a private function used by BigFloatRep::operator<<
+// to get the exact value
+// of floor(log10(M * 2^ e)) where E is an initial guess.
+// We will return the correct E which satisfies
+//              10^E <= M * 2^e < 10^{E+1}
+// But we convert this into
+//              mm <= M < 10.mm
+
+CGAL_INLINE_FUNCTION
+long BigFloatRep :: adjustE( long E, BigInt M, long ee) const {
+  if (M<0)
+    M=-M;
+  BigInt mm(1);
+  if (ee > 0)
+    M = (M<<static_cast<unsigned long>(ee));
+  else
+    mm = (mm << static_cast<unsigned long>(-ee));
+  if (E > 0)
+    mm *= (FiveTo(E)<< static_cast<unsigned long>(E));
+  else
+    M *= (FiveTo(-E) << static_cast<unsigned long>(-E));
+
+  if (M < mm) {
+    do {
+      E--;
+      M *= 10;
+    } while (M < mm);
+  } else if (M >= 10*mm) {
+    mm *= 10;
+    do {
+      E++;
+      mm *= 10;
+    } while (M >= mm);
+  }
+  return E;
+}
+
+CGAL_INLINE_FUNCTION
+BigFloatRep::DecimalOutput
+BigFloatRep::toDecimal(unsigned int width, bool Scientific) const {
+  BigFloatRep::DecimalOutput decOut;                // to be returned
+  if (err > 0) {
+    decOut.isExact = false;
+  } else { // err == 0
+    decOut.isExact = true;
+  }
+
+  if (err > 0 && err >= abs(m)) {
+    // if err is larger than mantissa, sign and significant values
+    // can not be determined.
+    core_error("BigFloat error: Error is too big!",
+		    __FILE__, __LINE__, false);
+    decOut.rep = "0.0e0";          // error is too big
+    decOut.isScientific = false;
+    decOut.noSignificant = 0;
+    decOut.errorCode = 1;          // sign of this number is unknown
+    return decOut;
+  }
+
+  decOut.sign = sign(m);
+  decOut.errorCode = 0;
+
+  BigInt M(m);                  // temporary mantissa
+  long lm = bitLength(M);       // binary length of mantissa
+  long e2 = bits(exp);          // binary shift length represented by exponent
+  long le = clLg(err);          // binary length of err
+  if (le == -1)
+    le = 0;
+
+  long L10 = 0;
+  if (M != 0) {
+    L10 = (long)std::floor((lm + e2) / lgTenM);
+    L10 = adjustE(L10, m, e2);     // L10: floor[log10(M 2^(e2))], M != 0
+  } else {
+    L10 = 0;
+  }
+  // Convention: in the positional format, when the output is
+  // the following string of 8 characters:
+  //             (d0, d1, d2, d3, ".", d4, d5, d6, d7)
+  // then the decimal point is said to be in the 4th position.
+  // E.g., (d0, ".", d1, d2) has the decimal point in the 1st position.
+  // The value of L10 says that the decimal point of output should be at
+  // the (L10 + 1)st position. This is
+  // true regardingless of whether M = 0 or not. For zero, we output
+  // {0.0*} so L10=0.  In general, the |value| is less than 10
+  // if and only if L10 is 0 and the
+  // decimal point is in the 1st place.  Note that L10 is defined even if
+  // the output is an integer (in which case it does not physically appear
+  // but conceptually terminates the sequence of digits).
+
+  // First, get the decimal representaion of (m * B^(exp)).
+  if (e2 < 0) {
+    M *= FiveTo(-e2); // M = x * 10^(-e2)
+  } else if (e2 > 0) {
+    M <<= e2;         // M = x * 2^(e2)
+  }
+
+  std::string decRep = M.get_str();
+  // Determine the "significant part" of this string, i.e. the part which
+  // is guaranteed to be correct in the presence of error,
+  // except that the last digit which might be subject to +/- 1.
+
+  if (err != 0) {     // valid = number of significant digits
+    unsigned long valid = floorlg10(m) - (long)std::floor(std::log10(float(err)));
+    if (decRep.length() > valid) {
+      decRep.erase(valid);
+    }
+  }
+
+  // All the digits in decM are correct, except the last one might
+  // subject to an error +/- 1.
+
+  if ((decRep[0] == '+') || (decRep[0] == '-')) {
+    decRep.erase(0, 1);
+  }
+
+  // Second, make choice between positional representation
+  // and scientific notation.  Use scientific notation when:
+  // 0) if scientific notation flag is on
+  // 1) err * B^exp >= 1, the error contribute to the integral part.
+  // 2) (1 + L10) >= width, there is not have enough places to hold the
+  //    positional representation, not including decimal point.
+  // 3) The distance between the first significant digit and decimal
+  //    point is too large for the width limit. This is equivalent to
+  //            Either ((L10 >= 0 and (L10 + 1) > width))
+  //            Or  ((L10 < 0) and (-L10 + 1) > width).
+
+  if (Scientific ||
+      ((err > 0) && (le + e2) >= 0) ||          // if err*B^exp >= 1
+      ((L10 >= 0) && (L10 + 1 >= (long)width )) ||
+      ((L10 < 0) && (-L10 + 1 > (long)width ))) {
+    // use scientific notation
+    decRep = round(decRep, L10, width);
+    decOut.noSignificant = width;
+    decRep.insert(1, ".");
+    if (L10 != 0) {
+      decRep += 'e';
+      if (L10 > 0) {
+        decRep += '+';
+      } else { // L10 < 0
+        decRep += '-';
+      }
+      char eBuf[48]; // enought to hold long number L10
+      int ne = 0;
+      if ((ne = sprintf(eBuf, "%ld", labs(L10))) >= 0) {
+        eBuf[ne] = '\0';
+      } else {
+        //perror("BigFloat.cpp: Problem in outputing the exponent!");
+        core_error("BigFloat error: Problem in outputing the exponent",
+			__FILE__, __LINE__, true);
+      }
+      decRep += eBuf;
+      decOut.isScientific = true;
+    }
+  } else {
+    // use conventional positional notation.
+    if (L10 >= 0) { // x >= 1 or x == 0 and L10 + 1 <= width
+      // round when necessary
+      if (decRep.length() > width ) {
+        decRep = round(decRep, L10, width );
+        if (decRep.length() > width ) {
+          // overflow happens! use scientific notation
+          return toDecimal(width, true);
+        }
+      }
+      decOut.noSignificant = decRep.length();
+      if (L10 + 1 < (long)width ) {
+        decRep.insert(L10 + 1, ".");
+      } else { // L10 + 1 == width
+        // do nothing
+      }
+    } else { // L10 < 0, 0 < x < 1
+      // (-L10) leading zeroes, including one to the left of decimal dot
+      // need to be added in beginning.
+      decRep = std::string(-L10, '0') + decRep;
+      // then round when necessary
+      if (decRep.length() > width ) {
+        decRep = round(decRep, L10, width );
+        // cannot overflow since there are L10 leading zeroes.
+      }
+      decOut.noSignificant = decRep.length() - (-L10);
+      decRep.insert(1, ".");
+    }
+    decOut.isScientific = false;
+  }
+#ifdef CORE_DEBUG
+  assert(decOut.noSignificant >= 0);
+#endif
+
+  decOut.rep = decRep;
+  return decOut;
+}//toDecimal
+
+CGAL_INLINE_FUNCTION
+std::string BigFloatRep::round(std::string inRep, long& L10, unsigned int width) const {
+  // round inRep so that the length would not exceed width.
+  if (inRep.length() <= width)
+    return inRep;
+
+  int i = width; // < length
+  bool carry = false;
+
+  if ((inRep[i] >= '5') && (inRep[i] <= '9')) {
+    carry = true;
+    i--;
+    while ((i >= 0) && carry) {
+      if (carry) {
+        inRep[i] ++;
+        if (inRep[i] > '9') {
+          inRep[i] = '0';
+          carry = true;
+        } else {
+          carry = false;
+        }
+      }
+      i-- ;
+    }
+
+    if ((i < 0) && carry) { // overflow
+      inRep.insert(inRep.begin(), '1');
+      L10 ++;
+      width ++;
+    }
+  }
+
+  return inRep.substr(0, width);
+}//round(string,width)
+
+
+// This function fromString(str, prec) is similar to the
+//      constructor Real(char * str, extLong prec)
+// See the file Real.cc for the differences
+
+CGAL_INLINE_FUNCTION
+void BigFloatRep :: fromString(const char *str, const extLong & prec ) {
+  // NOTE: prec defaults to get_static_defBigFloatInputDigits() (see BigFloat.h)
+  // check that prec is not INFTY
+  if (prec.isInfty())
+    core_error("BigFloat error: infinite precision not allowed",
+			__FILE__, __LINE__, true);
+
+  const char *e = strchr(str, 'e');
+  int dot = 0;
+  long e10 = 0;
+  if (e != NULL)
+    e10 = atol(e+1);    // e10 is decimal precision of the input string
+  // i.e., input is A/10^{e10}.
+  else {
+    e = str + strlen(str);
+#ifdef CORE_DEBUG
+    assert(*e == '\0');
+#endif
+
+  }
+
+  const char *p = str;
+  if (*p == '-' || *p == '+')
+    p++;
+  m = 0;
+  exp = 0;
+
+  for (; p < e; p++) {
+    if (*p == '.') {
+      dot = 1;
+      continue;
+    }
+    m = m * 10 + (*p - '0');
+    if (dot)
+      e10--;
+  }
+
+  BigInt one = 1;
+  long t = (e10 < 0) ? -e10 : e10;
+  BigInt ten = FiveTo(t) * (one << static_cast<unsigned long>(t));
+
+  // HERE IS WHERE WE USE THE SYSTEM CONSTANT
+  //           defBigFloatInputDigits
+  // Note: this constant is rather similar to defInputDigits which
+  //     is used by Real and Expr for controlling
+  //     input accuracy.  The difference is that defInputDigits can
+  //     be CORE_INFTY, but defBigFloatInputDigits must be finite.
+
+  if (e10 < 0)
+    div(m, ten, CORE_posInfty, 4 * prec);
+  else
+    m *= ten;
+  if (*str == '-')
+    m = -m;
+}//BigFloatRep::fromString
+
+CGAL_INLINE_FUNCTION
+std::istream& BigFloatRep :: operator >>(std::istream& i) {
+  int size = 20;
+  char *str = new char[size];
+  char *p = str;
+  char c;
+  int d = 0, e = 0, s = 0;
+  // d=1 means dot is found
+  // e=1 means 'e' or 'E' is found
+  //  int done = 0;
+
+  // Chen Li: fixed a bug, the original statement is
+  //  for (i.get(c); c == ' '; i.get(c));
+  // use isspace instead of testing c == ' ', since it must also
+  // skip tab, catridge/return, etc.
+  // Change to:
+  //  int status;
+  do {
+    c = i.get();
+  } while (isspace(c)); /* loop if met end-of-file, or
+                               char read in is white-space. */
+  // Chen Li, "if (c == EOF)" is unsafe since c is of char type and
+  // EOF is of int tyep with a negative value -1
+  if (i.eof()) {
+    i.clear(std::ios::eofbit | std::ios::failbit);
+    return i;
+  }
+
+  // the current content in "c" should be the first non-whitespace char
+  if (c == '-' || c == '+') {
+    *p++ = c;
+    i.get(c);
+  }
+
+  for (; isdigit(c) || (!d && c=='.') ||
+       (!e && ((c=='e') || (c=='E'))) || (!s && (c=='-' || c=='+')); i.get(c)) {
+    if (!e && (c == '-' || c == '+'))
+      break;
+    // Chen Li: put one more rule to prohibite input like
+    //  xxxx.xxxe+xxx.xxx:
+    if (e && (c == '.'))
+      break;
+    if (p - str == size) {
+      char *t = str;
+      str = new char[size*2];
+      memcpy(str, t, size);
+      delete [] t;
+      p = str + size;
+      size *= 2;
+    }
+#ifdef CORE_DEBUG
+    assert((p-str) < size);
+#endif
+
+    *p++ = c;
+    if (c == '.')
+      d = 1;
+    // Chen Li: fix a bug -- the sign of exponent can not happen before
+    // the character "e" appears! It must follow the "e' actually.
+    //    if (e || c == '-' || c == '+') s = 1;
+    if (e)
+      s = 1;
+    if ((c == 'e') || (c=='E'))
+      e = 1;
+  }
+
+  // chenli: make sure that the p is still in the range
+  if (p - str >= size) {
+    int len = p - str;
+    char *t = str;
+    str = new char[len + 1];
+    memcpy(str, t, len);
+    delete [] t;
+    p = str + len;
+  }
+
+#ifdef CORE_DEBUG
+  assert(p - str < size);
+#endif
+
+  *p = '\0';
+  i.putback(c);
+  fromString(str);
+  delete [] str;
+  return i;
+}//operator >>
+
+
+// BigFloatRep::toDouble()
+//      converts the BigFloat to a machine double
+//      This is a dangerous function as the method
+//      is silent when it does not fit into a machine double!
+// ToDo: fix this by return a machine NaN, +/- Infinity, +/- 0,
+//      when appropriate.
+//      Return NaN when error is larger than mantissa
+//      Return +/- Infinity if BigFloat is too big
+//      Return +/- 0 if BigFloat is too small
+#ifdef _MSC_VER
+#pragma warning(disable: 4723)
+#endif
+CGAL_INLINE_FUNCTION
+double BigFloatRep :: toDouble() const {
+  if (m == 0)
+    return (sign(m) * 0.0);
+
+  long e2 = bits(exp);
+  long le = clLg(err);  // if err=0, le will be -1
+  if (le == -1)
+    le = 0;
+
+  BigInt M = m >> static_cast<unsigned long>(le);// remove error bits in mantissa
+
+  // Below, we want to return NaN by computing 0.0/0.0.
+  // To avoid compiler warnings about divide by zero, we do this:
+
+  double foolCompilerZero;
+  foolCompilerZero = 0.0;
+
+  // COMMENT: we should directly store the
+  //    special IEEE values NaN, +/-Infinity, +/-0 in the code!!
+
+  if (M == 0)
+    return ( 0.0/foolCompilerZero ) ; // return NaN
+
+  e2 += le;             // adjust exponent corresponding to error bits
+
+  int len = bitLength(M) - 53;  // this is positive if M is too large
+
+  if (len > 0) {
+    M >>= len;
+    e2 += len;
+  }
+
+  double tt = doubleValue(M);
+
+  int ee = e2 + bitLength(M) - 1; // real exponent.
+
+  if (ee >= 1024)       // overflow!
+    return (  sign(m)/foolCompilerZero  );      // return a signed infinity
+
+  if (ee <= -1075)      // underflow!
+    // NOTE: if (-52 < ee <= 0) get denormalized number
+    return ( sign(m) * 0.0 );  // return signed zero.
+
+  // Execute this loop if e2 < 0;
+  for (int i = 0; i > e2; i--)
+    tt /= 2;
+
+  // Execute this loop if e2 > 0;
+  for (int j = 0; j < e2; j++)
+    tt *= 2;
+
+  return tt;
+}//toDouble
+#ifdef _MSC_VER
+#pragma warning(default: 4723)
+#endif
+CGAL_INLINE_FUNCTION
+BigInt BigFloatRep::toBigInt() const {
+  long e2 = bits(exp);
+  long le = clLg(err);
+  if (le == -1)
+    le = 0;
+#ifdef CORE_DEBUG
+  assert (le >= 0);
+#endif
+
+  BigInt M = m >> static_cast<unsigned long>(le); // discard the contaminated bits.
+  e2 += le;           // adjust the exponent
+
+  if (e2 < 0)
+    return M >> static_cast<unsigned long>(-e2);
+  else if (e2 > 0)
+    return M << static_cast<unsigned long>(e2);
+  else
+    return M;
+}
+
+CGAL_INLINE_FUNCTION
+long BigFloatRep :: toLong() const {
+  // convert a BigFloat to a long integer, rounded toward -\infty.
+  long e2 = bits(exp);
+  long le = clLg(err);
+#ifdef CORE_DEBUG
+  assert (le >= 0);
+#endif
+
+  BigInt M = m >> static_cast<unsigned long>(le); // discard the contaminated bits.
+  e2 += le;           // adjust the exponent
+  long t;
+  if (e2 < 0)
+    t = ulongValue(M >> static_cast<unsigned long>(-e2));
+  else if (e2 > 0)
+    t = ulongValue(M << static_cast<unsigned long>(e2));
+  else
+    t = ulongValue(M);
+  // t = M.as_long();
+  // Note: as_long() will return LONG_MAX in case of overflow.
+
+  return t;
+}
+
+// pow(r,n) function for BigFloat
+// Note: power(r,n) calls pow(r,n)
+CGAL_INLINE_FUNCTION
+BigFloat pow(const BigFloat& r, unsigned long n) {
+  if (n == 0)
+    return BigFloat(1);
+  else if (n == 1)
+    return r;
+  else {
+    BigFloat x = r;
+    while ((n % 2) == 0) { // n is even
+      x *= x;
+      n >>= 1;
+    }
+    BigFloat u = x;
+    while (true) {
+      n >>= 1;
+      if (n == 0)
+        return u;
+      x *= x;
+      if ((n % 2) == 1) // n is odd
+        u *= x;
+    }
+    //return u; // unreachable
+  }
+}//pow
+
+// experimental
+CGAL_INLINE_FUNCTION
+BigFloat root(const BigFloat& x, unsigned long k,
+         const extLong& a, const BigFloat& A) {
+  if (x.sign() == 0) {
+    return BigFloat(0);
+  } else if (x == 1) {
+    return BigFloat(1);
+  } else  {
+    BigFloat q, del, zz;
+    BigFloat z = A;
+    BigFloat bk = long(k);
+    for (; ;) {
+      zz = pow(z, k-1);
+      q = x.div(zz, a);
+      q.makeExact();
+      del = z - q;
+      del.makeExact();
+      if (del.MSB() < -a)
+        break;
+      z = ((bk-1)*z + q).div(bk, a);
+          // newton's iteration: z_{n+1}=((k-1)z_n+x/z_n^{k-1})/k
+      z.makeExact();
+    }
+    return z;
+  }
+}//root
+
+  CORE_MEMORY_IMPL(BigFloatRep)
+
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/BigInt.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigInt.h
new file mode 100644
index 0000000..6469b7b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigInt.h
@@ -0,0 +1,566 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigInt.h
+ * Synopsis: 
+ * 		a wrapper class for mpz from GMP
+ * 
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+#ifndef _CORE_BIGINT_H_
+#define _CORE_BIGINT_H_
+
+#include <CGAL/CORE/Gmp.h>
+#include <CGAL/CORE/RefCount.h>
+#include <CGAL/CORE/MemoryPool.h>
+#include <string>
+
+namespace CORE { 
+
+
+class BigIntRep : public RCRepImpl<BigIntRep> {
+public:
+  BigIntRep() {
+    mpz_init(mp);
+  }
+  // Note : should the copy-ctor be alloed at all ? [Sylvain Pion]
+  BigIntRep(const BigIntRep& z) : RCRepImpl<BigIntRep>() {
+    mpz_init_set(mp, z.mp);
+  }
+  BigIntRep(signed char c) {
+    mpz_init_set_si(mp, c);
+  }
+  BigIntRep(unsigned char c) {
+    mpz_init_set_ui(mp, c);
+  }
+  BigIntRep(signed int i) {
+    mpz_init_set_si(mp, i);
+  }
+  BigIntRep(unsigned int i) {
+    mpz_init_set_ui(mp, i);
+  }
+  BigIntRep(signed short int s) {
+    mpz_init_set_si(mp, s);
+  }
+  BigIntRep(unsigned short int s) {
+    mpz_init_set_ui(mp, s);
+  }
+  BigIntRep(signed long int l) {
+    mpz_init_set_si(mp, l);
+  }
+  BigIntRep(unsigned long int l) {
+    mpz_init_set_ui(mp, l);
+  }
+  BigIntRep(float f) {
+    mpz_init_set_d(mp, f);
+  }
+  BigIntRep(double d) {
+    mpz_init_set_d(mp, d);
+  }
+  BigIntRep(const char* s, int base=0) {
+    mpz_init_set_str(mp, s, base);
+  }
+  BigIntRep(const std::string& s, int base=0) {
+    mpz_init_set_str(mp, s.c_str(), base);
+  }
+  explicit BigIntRep(mpz_srcptr z) {
+    mpz_init_set(mp, z);
+  }
+  ~BigIntRep() {
+    mpz_clear(mp);
+  }
+
+  CGAL_CORE_EXPORT CORE_NEW(BigIntRep)
+  CGAL_CORE_EXPORT CORE_DELETE(BigIntRep)
+
+  mpz_srcptr get_mp() const {
+    return mp;
+  }
+  mpz_ptr get_mp() {
+    return mp;
+  }
+private:
+  mpz_t mp;
+};
+
+typedef RCImpl<BigIntRep> RCBigInt;
+class CGAL_CORE_EXPORT BigInt : public RCBigInt {
+public:
+  /// \name Constructors
+  //@{
+  /// default constructor
+  BigInt() : RCBigInt(new BigIntRep()) {}
+  /// constructor for <tt>signed char</tt>
+  BigInt(signed char x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>unsigned char</tt>
+  BigInt(unsigned char x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>signed short int</tt>
+  BigInt(signed short int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>unsigned short int</tt>
+  BigInt(unsigned short int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>signed int</tt>
+  BigInt(signed int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>unsigned int</tt>
+  BigInt(unsigned int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>signed long int</tt>
+  BigInt(signed long int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>unsigned long int</tt>
+  BigInt(unsigned long int x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>float</tt>
+  BigInt(float x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>double</tt>
+  BigInt(double x) : RCBigInt(new BigIntRep(x)) {}
+  /// constructor for <tt>const char*</tt> with base
+  BigInt(const char* s, int base=0) : RCBigInt(new BigIntRep(s, base)) {}
+  /// constructor for <tt>std::string</tt> with base
+  BigInt(const std::string& s, int base=0) : RCBigInt(new BigIntRep(s, base)) {}
+  /// constructor for <tt>mpz_srcptr</tt>
+  explicit BigInt(mpz_srcptr z) : RCBigInt(new BigIntRep(z)) {}
+  //@}
+
+  /// \name Copy-Assignment-Destructor
+  //@{
+  /// copy constructor
+  BigInt(const BigInt& rhs) : RCBigInt(rhs) {
+    rep->incRef();
+  }
+  /// assignment operator
+  BigInt& operator=(const BigInt& rhs) {
+    if (this != &rhs) {
+      rep->decRef();
+      rep = rhs.rep;
+      rep->incRef();
+    }
+    return *this;
+  }
+  /// destructor
+  ~BigInt() {
+    rep->decRef();
+  }
+  //@}
+
+  /// \name Overloaded operators
+  //@{
+  BigInt& operator +=(const BigInt& rhs) {
+    makeCopy();
+    mpz_add(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator -=(const BigInt& rhs) {
+    makeCopy();
+    mpz_sub(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator *=(const BigInt& rhs) {
+    makeCopy();
+    mpz_mul(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator /=(const BigInt& rhs) {
+    makeCopy();
+    mpz_tdiv_q(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator %=(const BigInt& rhs) {
+    makeCopy();
+    mpz_tdiv_r(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator &=(const BigInt& rhs) {
+    makeCopy();
+    mpz_and(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator |=(const BigInt& rhs) {
+    makeCopy();
+    mpz_ior(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator ^=(const BigInt& rhs) {
+    makeCopy();
+    mpz_xor(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigInt& operator <<=(unsigned long ul) {
+    makeCopy();
+    mpz_mul_2exp(get_mp(), get_mp(), ul);
+    return *this;
+  }
+  BigInt& operator >>=(unsigned long ul) {
+    makeCopy();
+    mpz_tdiv_q_2exp(get_mp(), get_mp(), ul);
+    return *this;
+  }
+  //@}
+
+  /// \name unary, increment, decrement operators
+  //@{
+  BigInt operator+() const {
+    return BigInt(*this);
+  }
+  BigInt operator-() const {
+    BigInt r;
+    mpz_neg(r.get_mp(), get_mp());
+    return r;
+  }
+  BigInt& operator++() {
+    makeCopy();
+    mpz_add_ui(get_mp(), get_mp(), 1);
+    return *this;
+  }
+  BigInt& operator--() {
+    makeCopy();
+    mpz_sub_ui(get_mp(), get_mp(), 1);
+    return *this;
+  }
+  BigInt operator++(int) {
+    BigInt r(*this);
+    ++(*this);
+    return r;
+  }
+  BigInt operator--(int) {
+    BigInt r(*this);
+    --(*this);
+    return r;
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  /// Has Exact Division
+  static bool hasExactDivision() {
+    return false;
+  }
+  /// get mpz pointer (const)
+  mpz_srcptr get_mp() const {
+    return rep->get_mp();
+  }
+  /// get mpz pointer
+  mpz_ptr get_mp() {
+    return rep->get_mp();
+  }
+  //@}
+
+  /// \name String Conversion Functions
+  //@{
+  /// set value from <tt>const char*</tt>
+  int set_str(const char* s, int base = 0) {
+    makeCopy();
+    return mpz_set_str(get_mp(), s, base);
+  }
+  /// convert to <tt>std::string</tt>
+  std::string get_str(int base = 10) const {
+    int n = mpz_sizeinbase (get_mp(), base) + 2;
+    char *buffer = new char[n];
+    mpz_get_str(buffer, base, get_mp());
+    std::string result(buffer);
+    delete [] buffer;
+    return result;
+  }
+  //@}
+
+  /// \name Conversion Functions
+  //@{
+  /// intValue
+  int intValue() const {
+    return static_cast<int>(mpz_get_si(get_mp()));
+  }
+  /// longValue
+  long longValue() const {
+    return mpz_get_si(get_mp());
+  }
+  /// ulongValue
+  unsigned long ulongValue() const {
+    return mpz_get_ui(get_mp());
+  }
+  /// doubleValue
+  double doubleValue() const {
+    return mpz_get_d(get_mp());
+  }
+  //@}
+};
+
+inline BigInt operator+(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_add(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator-(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_sub(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator*(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_mul(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator/(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_tdiv_q(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator%(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_tdiv_r(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator&(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_and(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator|(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_ior(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator^(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_xor(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigInt operator<<(const BigInt& a, unsigned long ul) {
+  BigInt r;
+  mpz_mul_2exp(r.get_mp(), a.get_mp(), ul);
+  return r;
+}
+inline BigInt operator>>(const BigInt& a, unsigned long ul) {
+  BigInt r;
+  mpz_tdiv_q_2exp(r.get_mp(), a.get_mp(), ul);
+  return r;
+}
+
+inline int cmp(const BigInt& x, const BigInt& y) {
+  return mpz_cmp(x.get_mp(), y.get_mp());
+}
+inline bool operator==(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) == 0;
+}
+inline bool operator!=(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) != 0;
+}
+inline bool operator>=(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) >= 0;
+}
+inline bool operator>(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) > 0;
+}
+inline bool operator<=(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) <= 0;
+}
+inline bool operator<(const BigInt& a, const BigInt& b) {
+  return cmp(a, b) < 0;
+}
+
+inline std::ostream& operator<<(std::ostream& o, const BigInt& x) {
+  //return CORE::operator<<(o, x.get_mp());
+  return CORE::io_write(o, x.get_mp());
+}
+inline std::istream& operator>>(std::istream& i, BigInt& x) {
+  x.makeCopy();
+  //return CORE::operator>>(i, x.get_mp());
+  return CORE::io_read(i, x.get_mp());
+}
+
+/// sign
+inline int sign(const BigInt& a) {
+  return mpz_sgn(a.get_mp());
+}
+/// abs
+inline BigInt abs(const BigInt& a) {
+  BigInt r;
+  mpz_abs(r.get_mp(), a.get_mp());
+  return r;
+}
+/// neg
+inline BigInt neg(const BigInt& a) {
+  BigInt r;
+  mpz_neg(r.get_mp(), a.get_mp());
+  return r;
+}
+/// negate
+inline void negate(BigInt& a) {
+  a.makeCopy();
+  mpz_neg(a.get_mp(), a.get_mp());
+}
+/// cmpabs
+inline int cmpabs(const BigInt& a, const BigInt& b) {
+  return mpz_cmpabs(a.get_mp(), b.get_mp());
+}
+
+/// \name Conversion Functions
+//@{
+/// longValue
+inline long longValue(const BigInt& a) {
+  return a.longValue();
+}
+/// ulongValue
+inline unsigned long ulongValue(const BigInt& a) {
+  return a.ulongValue();
+}
+/// doubleValue
+inline double doubleValue(const BigInt& a) {
+  return a.doubleValue();
+}
+//@}
+
+/// \name File I/O Functions
+//@{
+/// read from file
+void readFromFile(BigInt& z, std::istream& in, long maxLength = 0);
+/// write to file
+void writeToFile(const BigInt& z, std::ostream& in, int base=10, int charsPerLine=80);
+//@}
+
+/// \name Misc Functions
+//@{
+/// isEven
+inline bool isEven(const BigInt& z) {
+  return mpz_even_p(z.get_mp());
+}
+/// isOdd
+inline bool isOdd(const BigInt& z) {
+  return mpz_odd_p(z.get_mp());
+}
+
+/// get exponent of power 2
+inline unsigned long getBinExpo(const BigInt& z) {
+  return mpz_scan1(z.get_mp(), 0);
+}
+/// get exponent of power k
+inline void getKaryExpo(const BigInt& z, BigInt& m, int& e, unsigned long k) {
+  mpz_t f;
+  mpz_init_set_ui(f, k);
+  m.makeCopy();
+  e = mpz_remove(m.get_mp(), z.get_mp(), f);
+  mpz_clear(f);
+}
+
+/// divisible(x,y) = "x | y"
+inline bool isDivisible(const BigInt& x, const BigInt& y) {
+  return mpz_divisible_p(x.get_mp(), y.get_mp()) != 0;
+}
+inline bool isDivisible(int x, int y) {
+  return x % y == 0;
+}
+inline bool isDivisible(long x, long y) {
+  return x % y == 0;
+}
+/// exact div
+inline void divexact(BigInt& z, const BigInt& x, const BigInt& y) {
+  z.makeCopy();
+  mpz_divexact(z.get_mp(), x.get_mp(), y.get_mp());
+}
+// Chee (1/12/2004)   The definition of div_exact(x,y) next
+//   ensure that in Polynomials<NT> works with both NT=BigInt and NT=int:
+inline BigInt div_exact(const BigInt& x, const BigInt& y) {
+  BigInt z;	     // precodition: isDivisible(x,y)
+  divexact(z, x, y); // z is set to x/y;
+  return z;
+}
+inline int div_exact(int x, int y) {
+  return x/y;  // precondition: isDivisible(x,y)
+}
+inline long div_exact(long x, long y) {
+  return x/y;  // precondition: isDivisible(x,y)
+}
+
+
+/// gcd
+inline BigInt gcd(const BigInt& a, const BigInt& b) {
+  BigInt r;
+  mpz_gcd(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+/// div_rem
+inline void div_rem(BigInt& q, BigInt& r, const BigInt& a, const BigInt& b) {
+  q.makeCopy();
+  r.makeCopy();
+  mpz_tdiv_qr(q.get_mp(), r.get_mp(), a.get_mp(), b.get_mp());
+}
+/// power
+inline void power(BigInt& c, const BigInt& a, unsigned long ul) {
+  c.makeCopy();
+  mpz_pow_ui(c.get_mp(), a.get_mp(), ul);
+}
+
+// pow
+inline BigInt pow(const BigInt& a, unsigned long ui) {
+  BigInt r;
+  power(r, a, ui);
+  return r;
+}
+
+// bit length
+inline int bitLength(const BigInt& a) {
+  return mpz_sizeinbase(a.get_mp(), 2);
+}
+/// floorLg -- floor of log_2(a)
+/** Convention: a=0, floorLg(a) returns -1. 
+ *  This makes sense for integer a.
+ */
+inline long floorLg(const BigInt& a) {
+  return (sign(a) == 0) ? (-1) : (bitLength(a)-1);
+}
+/// ceilLg -- ceiling of log_2(a) where a=BigInt, int or long
+/** Convention: a=0, ceilLg(a) returns -1. 
+ *  This makes sense for integer a.
+ */
+inline long ceilLg(const BigInt& a) {
+  if (sign(a) == 0)
+    return -1;
+  unsigned long len = bitLength(a);
+  return (mpz_scan1(a.get_mp(), 0) == len-1) ? (len-1) : len;
+}
+inline long ceilLg(long a) { // need this for Polynomial<long>
+  return ceilLg(BigInt(a));
+}
+inline long ceilLg(int a) { // need this for Polynomial<int>
+  return ceilLg(BigInt(a));
+}
+
+
+// return a gmp_randstate_t structure
+extern gmp_randstate_t* getRandstate();
+/// seed function
+inline void seed(const BigInt& a) {
+  gmp_randseed(*getRandstate(), a.get_mp());
+}
+/// randomize function
+inline BigInt randomize(const BigInt& a) {
+  BigInt r;
+  mpz_urandomm(r.get_mp(), *getRandstate(), a.get_mp());
+  return r;
+}
+//@}
+
+
+
+} //namespace CORE
+
+#endif // _CORE_BIGINT_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/BigRat.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigRat.h
new file mode 100644
index 0000000..0dd7247
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/BigRat.h
@@ -0,0 +1,491 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigRat.h
+ * Synopsis: 
+ * 		a wrapper class for mpq from GMP
+ * 
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_BIGRAT_H_
+#define _CORE_BIGRAT_H_
+
+#include <CGAL/CORE/BigInt.h>
+
+namespace CORE { 
+
+class BigRatRep : public RCRepImpl<BigRatRep> {
+public:
+  BigRatRep() {
+    mpq_init(mp);
+  }
+  // Note : should the copy-ctor be alloed at all ? [Sylvain Pion]
+  BigRatRep(const BigRatRep& z)  : RCRepImpl<BigRatRep>() {
+    mpq_init(mp);
+    mpq_set(mp, z.mp);
+  }
+  BigRatRep(signed char c) {
+    mpq_init(mp);
+    mpq_set_si(mp, c, 1);
+  }
+  BigRatRep(unsigned char c) {
+    mpq_init(mp);
+    mpq_set_ui(mp, c, 1);
+  }
+  BigRatRep(signed int i) {
+    mpq_init(mp);
+    mpq_set_si(mp, i, 1);
+  }
+  BigRatRep(unsigned int i) {
+    mpq_init(mp);
+    mpq_set_ui(mp, i, 1);
+  }
+  BigRatRep(signed short int s) {
+    mpq_init(mp);
+    mpq_set_si(mp, s, 1);
+  }
+  BigRatRep(unsigned short int s) {
+    mpq_init(mp);
+    mpq_set_ui(mp, s, 1);
+  }
+  BigRatRep(signed long int l) {
+    mpq_init(mp);
+    mpq_set_si(mp, l, 1);
+  }
+  BigRatRep(unsigned long int l) {
+    mpq_init(mp);
+    mpq_set_ui(mp, l, 1);
+  }
+  BigRatRep(float f) {
+    mpq_init(mp);
+    mpq_set_d(mp, f);
+  }
+  BigRatRep(double d) {
+    mpq_init(mp);
+    mpq_set_d(mp, d);
+  }
+  BigRatRep(const char* s) {
+    mpq_init(mp);
+    mpq_set_str(mp, s, 0);
+  }
+  BigRatRep(const std::string& s) {
+    mpq_init(mp);
+    mpq_set_str(mp, s.c_str(), 0);
+  }
+  explicit BigRatRep(mpq_srcptr q) {
+    mpq_init(mp);
+    mpq_set(mp, q);
+  }
+  BigRatRep(mpz_srcptr z) {
+    mpq_init(mp);
+    mpq_set_z(mp, z);
+  }
+  BigRatRep(mpz_srcptr n, mpz_srcptr d) {
+    mpq_init(mp);
+    mpz_set(mpq_numref(mp), n);
+    mpz_set(mpq_denref(mp), d);
+    mpq_canonicalize(mp);
+  }
+  ~BigRatRep() {
+    mpq_clear(mp);
+  }
+
+  CGAL_CORE_EXPORT CORE_NEW(BigRatRep)
+  CGAL_CORE_EXPORT CORE_DELETE(BigRatRep)
+
+  mpq_srcptr get_mp() const {
+    return mp;
+  }
+  mpq_ptr get_mp() {
+    return mp;
+  }
+private:
+  mpq_t mp;
+}; //BigRatRep
+
+class BigFloat;
+
+typedef RCImpl<BigRatRep> RCBigRat;
+class BigRat : public RCBigRat {
+public:
+  /// \name Constructors
+  //@{
+  /// default constructor
+  BigRat() : RCBigRat(new BigRatRep()) {}
+  /// constructor for <tt>signed char</tt>
+  BigRat(signed char x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>unsigned char</tt>
+  BigRat(unsigned char x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>signed short int</tt>
+  BigRat(signed short int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>unsigned short int</tt>
+  BigRat(unsigned short int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>signed int</tt>
+  BigRat(signed int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>unsigned int</tt>
+  BigRat(unsigned int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>signed long int</tt>
+  BigRat(signed long int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>unsigned long int</tt>
+  BigRat(unsigned long int x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>float</tt>
+  BigRat(float x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>double</tt>
+  BigRat(double x) : RCBigRat(new BigRatRep(x)) {}
+  /// constructor for <tt>const char*</tt> with base
+  BigRat(const char* s) : RCBigRat(new BigRatRep(s)) {}
+  /// constructor for <tt>std::string</tt> with base
+  BigRat(const std::string& s) : RCBigRat(new BigRatRep(s)) {}
+  /// constructor for <tt>mpq_srcptr</tt>
+  explicit BigRat(mpq_srcptr z) : RCBigRat(new BigRatRep(z)) {}
+  /// constructor for <tt>BigInt</tt>
+  BigRat(const BigInt& z) : RCBigRat(new BigRatRep(z.get_mp())) {}
+  /// constructor for two <tt>BigInts</tt>
+  BigRat(const BigInt& n, const BigInt& d)
+      : RCBigRat(new BigRatRep(n.get_mp(), d.get_mp())) {}
+  /// constructor for <tt>BigFloat</tt>
+  BigRat(const BigFloat&);
+  //@}
+
+  /// \name Copy-Assignment-Destructor
+  //@{
+  /// copy constructor
+  BigRat(const BigRat& rhs) : RCBigRat(rhs) {
+    rep->incRef();
+  }
+  /// assignment operator
+  BigRat& operator=(const BigRat& rhs) {
+    if (this != &rhs) {
+      rep->decRef();
+      rep = rhs.rep;
+      rep->incRef();
+    }
+    return *this;
+  }
+  /// destructor
+  ~BigRat() {
+    rep->decRef();
+  }
+  //@}
+
+  /// \name Overloaded operators
+  //@{
+  BigRat& operator +=(const BigRat& rhs) {
+    makeCopy();
+    mpq_add(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigRat& operator -=(const BigRat& rhs) {
+    makeCopy();
+    mpq_sub(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigRat& operator *=(const BigRat& rhs) {
+    makeCopy();
+    mpq_mul(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigRat& operator /=(const BigRat& rhs) {
+    makeCopy();
+    mpq_div(get_mp(), get_mp(), rhs.get_mp());
+    return *this;
+  }
+  BigRat& operator <<=(unsigned long ul) {
+    makeCopy();
+    mpq_mul_2exp(get_mp(), get_mp(), ul);
+    return *this;
+  }
+  BigRat& operator >>=(unsigned long ul) {
+    makeCopy();
+    mpq_div_2exp(get_mp(), get_mp(), ul);
+    return *this;
+  }
+  //@}
+
+  /// \name div2, unary, increment, decrement operators
+  //@{
+
+  /// exact division by 2 (this method is provided for compatibility)
+  BigRat div2() const {
+    BigRat r; BigRat t(2);     // probably not most efficient way
+    mpq_div(r.get_mp(), get_mp(), t.get_mp());
+    return r;
+  }
+  BigRat operator+() const {
+    return BigRat(*this);
+  }
+  BigRat operator-() const {
+    BigRat r;
+    mpq_neg(r.get_mp(), get_mp());
+    return r;
+  }
+  BigRat& operator++() {
+    makeCopy();
+    mpz_add(get_num_mp(),get_num_mp(),get_den_mp());
+    return *this;
+  }
+  BigRat& operator--() {
+    makeCopy();
+    mpz_sub(get_num_mp(),get_num_mp(),get_den_mp());
+    return *this;
+  }
+  BigRat operator++(int) {
+    BigRat r(*this);
+    ++(*this);
+    return r;
+  }
+  BigRat operator--(int) {
+    BigRat r(*this);
+    --(*this);
+    return r;
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  /// Canonicalize
+  void canonicalize() {
+    makeCopy();
+    mpq_canonicalize(get_mp());
+  } 
+  /// Has Exact Division
+  static bool hasExactDivision() {
+    return true;
+  }
+
+  /// return mpz pointer of numerator (const)
+  mpz_srcptr get_num_mp() const {
+    return mpq_numref(get_mp());
+  }
+  /// return mpz pointer of numerator
+  mpz_ptr get_num_mp() {
+    return mpq_numref(get_mp());
+  }
+  /// return mpz pointer of denominator
+  mpz_srcptr get_den_mp() const {
+    return mpq_denref(get_mp());
+  }
+  /// return mpz pointer of denominator
+  mpz_ptr get_den_mp() {
+    return mpq_denref(get_mp());
+  }
+
+  /// get mpq pointer (const)
+  mpq_srcptr get_mp() const {
+    return rep->get_mp();
+  }
+  /// get mpq pointer
+  mpq_ptr get_mp() {
+    return rep->get_mp();
+  }
+  //@}
+
+  /// \name String Conversion Functions
+  //@{
+  /// set value from <tt>const char*</tt>
+  int set_str(const char* s, int base = 0) {
+    makeCopy();
+    return mpq_set_str(get_mp(), s, base);
+  }
+  /// convert to <tt>std::string</tt>
+  std::string get_str(int base = 10) const {
+    int n = mpz_sizeinbase(mpq_numref(get_mp()), base) + mpz_sizeinbase(mpq_denref(get_mp()), base)+ 3;
+    char *buffer = new char[n];
+    mpq_get_str(buffer, base, get_mp());
+    std::string result(buffer);
+    delete [] buffer;
+    return result;
+  }
+  //@}
+
+  /// \name Conversion Functions
+  //@{
+  /// intValue
+  int intValue() const {
+    return static_cast<int>(doubleValue());
+  }
+  /// longValue
+  long longValue() const {
+    return static_cast<long>(doubleValue());
+  }
+  /// doubleValue
+  double doubleValue() const {
+    return mpq_get_d(get_mp());
+  }
+  /// BigIntValue
+  BigInt BigIntValue() const {
+    BigInt r;
+    mpz_tdiv_q(r.get_mp(), get_num_mp(), get_den_mp());
+    return r;
+  }
+  //@}
+}; //BigRat class
+
+inline BigRat operator+(const BigRat& a, const BigRat& b) {
+  BigRat r;
+  mpq_add(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigRat operator-(const BigRat& a, const BigRat& b) {
+  BigRat r;
+  mpq_sub(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigRat operator*(const BigRat& a, const BigRat& b) {
+  BigRat r;
+  mpq_mul(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+inline BigRat operator/(const BigRat& a, const BigRat& b) {
+  BigRat r;
+  mpq_div(r.get_mp(), a.get_mp(), b.get_mp());
+  return r;
+}
+// Chee (3/19/2004):
+//   The following definitions of div_exact(x,y) and gcd(x,y)
+//   ensures that in Polynomial<NT>
+/// divisible(x,y) = "x | y"
+inline BigRat div_exact(const BigRat& x, const BigRat& y) {
+	BigRat z;
+	mpq_div(z.get_mp(), x.get_mp(), y.get_mp());
+	return z;
+}
+/// numerator
+inline BigInt numerator(const BigRat& a) {
+  return BigInt(a.get_num_mp());
+}
+/// denominator
+inline BigInt denominator(const BigRat& a) {
+  return BigInt(a.get_den_mp());
+}
+
+inline BigRat gcd(const BigRat& x, const BigRat& y) {
+  //	return BigRat(1);  // Remark: we may want replace this by
+			   // the definition of gcd of a quotient field
+			   // of a UFD [Yap's book, Chap.3]
+  //Here is one possible definition: gcd of x and y is just the
+  //gcd of the numerators of x and y divided by the gcd of the
+  //denominators of x and y.
+  BigInt n = gcd(numerator(x), numerator(y));
+  BigInt d = gcd(denominator(x), denominator(y));
+  return BigRat(n,d);
+		
+}
+// Chee: 8/8/2004: need isDivisible to compile Polynomial<BigRat>
+// A trivial implementation is to return true always. But this
+// caused tPolyRat to fail.
+// So we follow the definition of
+// Expr::isDivisible(e1, e2) which checks if e1/e2 is an integer.  
+inline bool isInteger(const BigRat& x) {
+  return BigInt(x.get_den_mp()) == 1;
+}
+inline bool isDivisible(const BigRat& x, const BigRat& y) {
+  BigRat r;
+  mpq_div(r.get_mp(), x.get_mp(), y.get_mp());
+  return isInteger(r);
+}
+inline BigRat operator<<(const BigRat& a, unsigned long ul) {
+  BigRat r;
+  mpq_mul_2exp(r.get_mp(), a.get_mp(), ul);
+  return r;
+}
+inline BigRat operator>>(const BigRat& a, unsigned long ul) {
+  BigRat r;
+  mpq_div_2exp(r.get_mp(), a.get_mp(), ul);
+  return r;
+}
+
+inline int cmp(const BigRat& x, const BigRat& y) {
+  return mpq_cmp(x.get_mp(), y.get_mp());
+}
+inline bool operator==(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) == 0;
+}
+inline bool operator!=(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) != 0;
+}
+inline bool operator>=(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) >= 0;
+}
+inline bool operator>(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) > 0;
+}
+inline bool operator<=(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) <= 0;
+}
+inline bool operator<(const BigRat& a, const BigRat& b) {
+  return cmp(a, b) < 0;
+}
+
+inline std::ostream& operator<<(std::ostream& o, const BigRat& x) {
+  //return CORE::operator<<(o, x.get_mp());
+  return CORE::io_write(o, x.get_mp());
+}
+inline std::istream& operator>>(std::istream& i, BigRat& x) {
+  x.makeCopy();
+  //return CORE::operator>>(i, x.get_mp());
+  return CORE::io_read(i, x.get_mp());
+}
+
+/// sign
+inline int sign(const BigRat& a) {
+  return mpq_sgn(a.get_mp());
+}
+/// abs
+inline BigRat abs(const BigRat& a) {
+  BigRat r;
+  mpq_abs(r.get_mp(), a.get_mp());
+  return r;
+}
+/// neg
+inline BigRat neg(const BigRat& a) {
+  BigRat r;
+  mpq_neg(r.get_mp(), a.get_mp());
+  return r;
+}
+/// div2
+inline BigRat div2(const BigRat& a) {
+  BigRat r(a);
+  return r.div2();
+}
+/// longValue
+inline long longValue(const BigRat& a) {
+  return a.longValue();
+}
+/// doubleValue
+inline double doubleValue(const BigRat& a) {
+  return a.doubleValue();
+}
+/// return BigInt value
+inline BigInt BigIntValue(const BigRat& a) {
+  return a.BigIntValue();
+}
+
+
+} //namespace CORE
+#endif // _CORE_BIGRAT_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CORE.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CORE.h
new file mode 100644
index 0000000..455fac1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CORE.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CORE.h
+ * Synopsis:
+ *      The main inclusion file for the Core Library system.
+ *      All "Core programs" must include this file.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_CORE_H_
+#define _CORE_CORE_H_
+
+#include <CGAL/CORE/CoreDefs.h>
+#include <CGAL/CORE/Timer.h>
+
+// User can still access machine types:
+typedef double machine_double;
+typedef long machine_long;
+
+#ifndef CORE_LEVEL
+#   define CORE_LEVEL  DEFAULT_CORE_LEVEL
+#endif
+
+#if CORE_LEVEL  == 1
+#   define Real double
+#   define Expr double
+#elif CORE_LEVEL  == 2
+#   include <CGAL/CORE/Real.h>
+#   undef long
+#   undef double
+#   define long Real
+#   define double Real
+#   define Expr Real
+#elif CORE_LEVEL  == 3
+#   include <CGAL/CORE/Expr.h>
+#   undef long
+#   undef double
+#   define long Expr
+#   define double Expr
+#   define Real Expr
+#elif CORE_LEVEL == 4
+#   include <CGAL/CORE/Expr.h>
+#endif
+
+#endif // _CORE_CORE_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Config.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Config.h
new file mode 100644
index 0000000..c24639c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Config.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_CONFIG_H_
+#define _CORE_CONFIG_H_
+
+// disable debug
+//#define CORE_DISABLE_DEBUG
+
+// disable inline functions
+//#define CORE_DISABLE_INLINE
+
+// disable memory pool
+//#define CORE_DISABLE_MEMPOOL
+
+// debug reference counting
+//#define CORE_RC_DEBUG 1
+
+#include <CGAL/auto_link/CORE.h>
+
+#include <CGAL/export/CORE.h>
+
+#endif // _CORE_CONFIG_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux.h
new file mode 100644
index 0000000..37eb1e3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreAux.h
+ * Synopsis:
+ *      Auxilliary functions
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_COREAUX_H_
+#define _CORE_COREAUX_H_
+
+#include <iostream>
+#include <fstream>
+#include "CGAL/CORE/Impl.h"
+
+namespace CORE { 
+
+#ifndef LONG_BIT // such as in Linux
+  #define LONG_BIT (sizeof(long) * 8)
+#endif
+
+/// CORE_EPS is unit roundoff for IEEE standard double, i.e., 2^{-53}.
+// NOTES:
+// (1) CORE_EPS is used in our Floating Point Filter (Filter.h)
+// (2) 2^{-53} is called "unit roundoff" and
+// 	is the roundoff error for numbers in the range [1,2).
+//  	"Machine epsilon" is 2*CORE_EPS = 2^{-52}.  It is the
+//  	smallest gap between two normal machine numbers  --Chee 8/2003
+//
+// const double eps = (ldexp(1.0, -53)); // fails to link on SunPro
+#define CORE_EPS ((1.0/(1<<30))/(1<<23))
+// 
+#define CORE_MACHINE_EPS ((1.0/(1<<30))/(1<<22))
+
+/// relEps is relative error for IEEE standard double, 1+2^{-52}.
+const double relEps = (1.0 + std::ldexp(1.0, -52));
+
+/// CORE_DIAGFILE is used for all warning and error messages
+extern const char* CORE_DIAGFILE;
+
+/// template function returns the maximum value of two
+template <class T>
+inline const T& core_max(const T& a, const T& b) {
+  return ((a > b) ? a : b);
+}
+
+/// template function returns the minimum value of two
+template <class T>
+inline const T& core_min(const T& a, const T& b) {
+  return ((a < b) ? a : b);
+}
+
+/// template function returns the maximum value of three
+template <class T>
+inline const T& core_max(const T& a, const T& b, const T& c) {
+  return ((a > b) ? core_max(a, c) : core_max(b, c));
+}
+
+/// template function swaps two values
+template <class T>
+inline  void core_swap(T& a, T& b) {
+  T tmp;
+  tmp = a;
+  a = b;
+  b = tmp;
+}
+
+/// template function rotate three values
+template <class T>
+inline  void core_rotate(T& a, T& b, T& c) {
+  T tmp;
+  tmp = a;
+  a = b;
+  b = c;
+  c = tmp;
+}
+
+/// template function returns the minimum value of three
+template <class T>
+inline const T& core_min(const T& a, const T& b, const T& c) {
+  return ((a < b) ? core_min(a, c) : core_min(b, c));
+}
+
+/// template function returns the absolute value
+template <class T>
+inline const T core_abs(const T& a) {
+  return ((a < T(0)) ? -a : a);
+}
+
+/// returns floor log base 2 of abs(x)
+/**  CONVENTION: lg(0) = -1 */
+CGAL_CORE_EXPORT int flrLg(long x);
+
+/// returns floor log base 2 of unsigned long x
+/**  CONVENTION: lg(0) = -1 */
+CGAL_CORE_EXPORT int flrLg(unsigned long x);
+
+/// returns ceiling log base 2 of abs(x)
+/**  CONVENTION: lg(0) = -1 */
+CGAL_CORE_EXPORT int clLg(long x);
+
+/// returns ceiling log base 2 of unsigned long x
+/**  CONVENTION: lg(0) = -1 */
+CGAL_CORE_EXPORT int clLg(unsigned long x);
+
+/// gcd for machine type long
+CGAL_CORE_EXPORT long gcd(long m, long n);
+
+/// abs for int type
+inline int abs(int x) {
+  return (x>=0) ? x : (-x);
+}
+
+/// abs for long type
+inline long abs(long x) {
+  return (x>=0) ? x : (-x);
+}
+
+/// sign for int type
+inline int sign(int x) {
+  return (x==0) ? 0 : ((x>0) ? 1 : (-1));
+}
+
+/// sign for long type
+inline long sign(long x) {
+  return (x==0) ? 0 : ((x>0) ? 1 : (-1));
+}
+
+/// overloaded << to print out std::string
+inline std::ostream& operator<< (std::ostream& o, const std::string& s) {
+  o << s.c_str();
+  return o;
+}
+
+/// implements the "integer mantissa" function
+//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
+CGAL_CORE_EXPORT double IntMantissa(double d);
+
+/// implements the "integer exponent" function
+//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
+CGAL_CORE_EXPORT int IntExponent(double d);
+
+/// Writes out an error or warning message in the local file CORE_DIAGFILE
+/** If last argument (err) is TRUE, then this is considered an error 
+ *  (not just warning).  In this case, the message is also printed in
+ *  std::cerr, using std::perror(). 
+ *  */
+CGAL_CORE_EXPORT void core_error(std::string msg, std::string file, int lineno, bool err);
+
+/// This is for debugging messages
+inline void core_debug(std::string msg){
+  std::cout << __FILE__ << "::" << __LINE__ << ": " << msg
+	    << std::endl;
+}
+
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/CoreAux_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_COREAUX_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux_impl.h
new file mode 100644
index 0000000..cfb72ec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreAux_impl.h
@@ -0,0 +1,229 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreAux.cpp
+ * Synopsis:
+ *       Auxiliary routines such as ceiling of log_2, etc. 
+ *       they are not specific to any Core classes.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/CORE/CoreAux.h>
+#include <gmp.h>
+
+namespace CORE { 
+
+////////////////////////////////////////////////////////////
+//  More useful functions to implement:
+//
+//  To convert digits into bits:
+//      given X, compute X * log_2(10)
+//  To convert bits into digits:
+//      given X, compute X * log_10(2)
+//
+////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// flrLg(x)
+//      returns floor log base 2 of abs(x)
+// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
+////////////////////////////////////////////////////////////
+CGAL_INLINE_FUNCTION
+int flrLg(long x) {
+  if (x == LONG_MIN) {
+    // special treatment as -LONG_MIN would be not representable as "long"
+    return LONG_BIT - 1;
+  } else {
+    //  1 <= |x| <= LONG_MAX
+    if (x < 0)
+      x = - x;
+
+    int lg = -1;
+    while (x > 0) {
+      lg++;
+      x >>= 1;
+    }
+    return lg;
+  }
+}
+
+////////////////////////////////////////////////////////////
+// floor log base 2 of unsigned long x
+// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
+////////////////////////////////////////////////////////////
+CGAL_INLINE_FUNCTION
+int flrLg(unsigned long x) {
+  int lg = -1;
+  while (x > 0) {
+    lg++;
+    x >>= 1;
+  }
+  return lg;
+}
+
+////////////////////////////////////////////////////////////
+// ceiling log base 2 of abs(x)
+// CONVENTION lg(0) = -1	(Slight improvement, Zilin/Chee 8/5/02)
+////////////////////////////////////////////////////////////
+CGAL_INLINE_FUNCTION
+int clLg(long x) {
+  if (x == LONG_MIN)
+    return LONG_BIT - 1;
+  if (x < 0)
+    x = -x; 		// use absolute value
+  if (x > (LONG_MAX >> 1)) 	// the leading data bit is 1
+    return (LONG_BIT - 1);	// exclude the sign bit
+  if (x >= 2)
+    return flrLg((unsigned long)((x << 1) - 1));
+  // SINCE ceilLog_2(x) = floorLog_2(2x-1) for x>=2
+  if (x == 1)
+    return 0;
+  return -1;			// x must be 0 here
+}
+
+////////////////////////////////////////////////////////////
+// ceiling log base 2 of unsigned long x
+// CONVENTION lg(0) = -1
+////////////////////////////////////////////////////////////
+CGAL_INLINE_FUNCTION
+int clLg(unsigned long x) {
+  if (x > (ULONG_MAX >> 1))	// the leading bit is 1
+    return LONG_BIT;
+  if (x >= 2)
+    return flrLg((x << 1) - 1);
+  // SINCE ceilLog_2(x) = floorLog_2(2x-1) for x>=2.
+  if (x == 1)
+    return 0;
+  return -1;	// x must be equal to 0
+}
+
+/// gcd for machine type long
+/** This is needed when we construct Polynomials with int or long coefficients */
+CGAL_INLINE_FUNCTION
+long gcd(long m, long n) {
+  if (m == 0)
+    return core_abs(n);
+  if (n == 0)
+    return core_abs(m);
+  long p = core_abs(m);
+  long q = core_abs(n);
+  if (p<q)
+    core_swap(p, q);
+  while (q>0) {
+    long r = p % q;
+    p = q;
+    q = r;
+  }
+  return p;
+}
+
+// return a gmp_randstate_t structure
+CGAL_INLINE_FUNCTION
+gmp_randstate_t* getRandstate() {
+  static gmp_randstate_t rstate;
+  static bool initialized = false;
+  if (!initialized) {
+    gmp_randinit(rstate, GMP_RAND_ALG_DEFAULT, 32L);
+    initialized = true;
+  }
+  return &rstate;
+}
+
+// char* core_itoa(int n, char* buffer)
+//      returns a pointer to the null-terminated string in buffer
+// NOTES:
+// 0. Buffer size should be 17 bytes (resp., 33 bytes, 65 bytes) on 16-bit
+//      (resp., 32-bit, 64-bit) machines.  Formula: 1+sizeof(int)*8 bytes.
+// 1. itoa(...) is available on some stdlib.h, but it is
+//      not defined by ANSI-C and so not all compilers support it.
+// 2. Our use of sprintf(...) to do the job is known to
+//      be inefficient, but this is hardly critical for our usage.
+// 3. A more general program should take a 3rd argument (the radix of
+//      output number).  We assume radix 10.
+CGAL_INLINE_FUNCTION
+char * core_itoa(int n, char* buffer) {
+	std::sprintf(buffer, "%d", n);
+	return buffer;
+}
+
+/// implements the "integer mantissa" function
+//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
+CGAL_INLINE_FUNCTION
+double IntMantissa(double d) {
+	int e;
+	return std::ldexp(std::frexp(d, &e), 53);
+}
+
+/// implements the "integer exponent" function
+//      (See CORE_PATH/progs/ieee/frexp.cpp for details)
+CGAL_INLINE_FUNCTION
+int IntExponent(double d) {
+	int e;
+	std::frexp(d, &e);
+	return e-53;
+}
+
+/// CORE_DIAGFILE is file name for core_error(..) output.
+const char* CORE_DIAGFILE = "Core_Diagnostics";  // global file name 
+
+/// core_error is the method to write Core Library warning or error messages
+/** 	Both warnings and errors are written to a file called CORE_DIAGFILE.
+ *	But errors are also written on std:cerr (similar to std::perror()).
+ * */
+// Usage: core_error(message, file_with_error, line_number, err_type)
+//   where err_type=0 means WARNING, error_type=0 means ERROR
+CGAL_INLINE_FUNCTION 
+void core_error(std::string msg, std::string file, int lineno, bool err) {
+  std::ofstream outFile(CORE_DIAGFILE, std::ios::app);  // open to append
+  if (!outFile) {
+     // perror("CORE ERROR: cannot open Core Diagnostics file");
+     std::cerr << "CORE ERROR: can't open Core Diagnostics file"<<std::endl;
+     std::exit(1); //Note: do not call abort()
+  }
+  outFile << "CORE " << (err? "ERROR" : "WARNING")
+     << " (at " << file << ": " << lineno << "): "
+     << msg << std::endl;
+  outFile.close();
+  if (err) {
+     char buf[65];
+     // perror((std::string("CORE ERROR") + " (file " + file + ", line "
+     //        + core_itoa(lineno,buf) +"):" + msg + "\n").c_str());
+     std::cerr << (std::string("CORE ERROR") + " (file " + file + ", line "
+             + core_itoa(lineno,buf) +"):" + msg + "\n").c_str();
+     std::exit(1); //Note: do not call abort()
+  }
+}
+
+
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs.h
new file mode 100644
index 0000000..46c43e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs.h
@@ -0,0 +1,278 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreDefs.h
+ * Synopsis:
+ *       This contains useful Core Library global parameters which
+ *       users may modify at runtime or compile time
+ *       For each parameter, we provide corresponding methods to
+ *       modify or examine the values.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_COREDEFS_H_
+#define _CORE_COREDEFS_H_
+
+#include <CGAL/CORE/extLong.h>
+
+#ifdef CGAL_HEADER_ONLY
+  
+  #define CGAL_GLOBAL_STATE_VAR(TYPE, NAME, VALUE)  \
+    inline TYPE & get_static_##NAME()               \
+    {                                               \
+      static TYPE NAME = VALUE;                     \
+      return NAME;                                  \
+    }
+  
+#else // CGAL_HEADER_ONLY
+
+  #define CGAL_GLOBAL_STATE_VAR(TYPE, NAME, VALUE)  \
+    CGAL_CORE_EXPORT extern TYPE NAME;                   \
+    inline TYPE& get_static_##NAME()                \
+    {                                               \
+      return NAME;                                  \
+    }
+
+#endif // CGAL_HEADER_ONLY
+
+namespace CORE { 
+
+//////////////////////////////////////////////////////////////
+// defined constants
+//////////////////////////////////////////////////////////////
+
+/// default accuracy level
+#define DEFAULT_CORE_LEVEL 3
+
+/// short hand for positive infinity
+#define CORE_INFTY  (CORE_posInfty)
+
+//////////////////////////////////////////////////////////////
+// global precision parameters
+//////////////////////////////////////////////////////////////
+
+/// Abort Flag -- default value is true
+/** The normal behavior is to abort when an invalid expression
+ * is constructed.  This flag can be used to turn off this abort.
+ * In any case, an error message will be printed */
+CGAL_GLOBAL_STATE_VAR(bool, AbortFlag, true)
+
+/// Invalid Flag -- initiallly value is non-negative
+/** If the Abort Flag is false, then the Invalid flag will be set to
+ *  a negative value whenever an invalid expression is constructed.
+ *  It is the user's responsibility to check this flag and to make
+ *  it non-negative again. */
+CGAL_GLOBAL_STATE_VAR(int, InvalidFlag, 0)
+
+/// Escape Precision in bits
+CGAL_GLOBAL_STATE_VAR(extLong, EscapePrec, CORE_posInfty)
+
+/// current ur when EscapePrec triggered
+/** this flag becomes negative when default EscapePrec is applied */
+CGAL_GLOBAL_STATE_VAR(long, EscapePrecFlag, 0)
+
+/// Escape Precision Warning Flag
+/** this flag is true by default, and will cause a warning to be printed
+    when EscapePrec is reached */
+CGAL_GLOBAL_STATE_VAR(bool, EscapePrecWarning, true)
+
+// These following two values determine the precision of computing
+// approximations in Expr.
+
+/// default Relative Precision in bits
+CGAL_GLOBAL_STATE_VAR(extLong, defRelPrec, 60)
+/// default Absolute Precision in bits
+CGAL_GLOBAL_STATE_VAR(extLong, defAbsPrec, CORE_posInfty)
+
+/// default # of decimal digits for conversion from a BF to string.
+/** This value cannot be CORE_INFTY.
+    See also defOutputDigits. 
+    */
+/*  QUESTION: the following comment seems to contradict the above comment:
+	"controls the printout precision of std::cout for BigFloat"
+    Perhaps, we should merge defOutputDigits and defBigFloatOutputDigits?
+    */
+CGAL_GLOBAL_STATE_VAR(long, defBigFloatOutputDigits, 10)
+
+/// default input precision in digits for converting a string to a Real or Expr
+/** This value can be CORE_INFTY */
+CGAL_GLOBAL_STATE_VAR(extLong, defInputDigits, CORE_posInfty)
+
+/// controls the printout precision of std::cout for Real and Expr
+/** This value cannot be CORE_INFTY
+    See also defBigFloatOutputDigits. 
+    (it really should be an int, as in std::cout.setprecision(int)). */
+CGAL_GLOBAL_STATE_VAR(long, defOutputDigits, get_static_defBigFloatOutputDigits())
+
+/// default input precision in digits for converting a string to a BigFloat
+/** This value cannot be CORE_INFTY. */
+CGAL_GLOBAL_STATE_VAR(long, defBigFloatInputDigits, 16)
+
+/// default BigFloat Division Relative Precision
+CGAL_GLOBAL_STATE_VAR(extLong, defBFdivRelPrec, 54)
+/// default BigFloat Sqrt Absolute Precision
+CGAL_GLOBAL_STATE_VAR(extLong, defBFsqrtAbsPrec, 54)
+
+//////////////////////////////////////////////////////////////
+// Mode parameters: incremental, progressive, filters
+//////////////////////////////////////////////////////////////
+
+/// floating point filter flag
+CGAL_GLOBAL_STATE_VAR(bool, fpFilterFlag, true)
+/// if true, evaluation of expressions would be incremental
+CGAL_GLOBAL_STATE_VAR(bool, incrementalEvalFlag, true)
+/// progressive evaluation flag
+CGAL_GLOBAL_STATE_VAR(bool, progressiveEvalFlag, true)
+/// rational reduction flag
+CGAL_GLOBAL_STATE_VAR(bool, rationalReduceFlag, false)
+/// default initial (bit) precision for AddSub Progressive Evaluation
+CGAL_GLOBAL_STATE_VAR(long, defInitialProgressivePrec, 64)
+
+//////////////////////////////////////////////////////////////
+// methods for setting global precision parameters
+// 	including: scientific vs. positional format
+//	All the set methods return the previous global value if any
+//////////////////////////////////////////////////////////////
+
+/// set default composite precision [defAbsPrec, defRelPrec]
+/** It determines the precision to which an Expr evaluates its
+    (exact, implicit) constant value. */
+inline void setDefaultPrecision(const extLong &r, const extLong &a) {
+  get_static_defRelPrec() = r;
+  get_static_defAbsPrec() = a;
+}
+
+/// set default relative precision
+inline extLong setDefaultRelPrecision(const extLong &r) {
+  extLong old = get_static_defRelPrec();
+  get_static_defRelPrec() = r;
+  return old;
+}
+
+/// set default absolute precision
+inline extLong setDefaultAbsPrecision(const extLong &a) {
+  extLong old = get_static_defAbsPrec();
+  get_static_defAbsPrec() = a;
+  return old;
+}
+
+/// set default input digits (for Expr, Real)
+/** it controls the absolute error */
+inline extLong setDefaultInputDigits(const extLong &d) {
+  extLong old = get_static_defInputDigits();
+  get_static_defInputDigits() = d;
+  return old;
+}
+
+/// set default output digits (for Expr, Real)
+inline long setDefaultOutputDigits(long d = get_static_defOutputDigits(),
+                                   std::ostream& o = std::cout) {
+  long old = get_static_defOutputDigits();
+  get_static_defOutputDigits() = d;
+  o.precision(d);
+  return old;
+}
+
+/// set default input digits for BigFloat
+inline long setDefaultBFInputDigits(long d) {
+  long old = get_static_defBigFloatInputDigits();
+  get_static_defBigFloatInputDigits() = d;
+  return old;
+}
+
+/// set default output digits for BigFloat
+inline long setDefaultBFOutputDigits(long d) {
+  long old = get_static_defBigFloatOutputDigits();
+  get_static_defBigFloatOutputDigits() = d;
+  return old;
+}
+
+/// turn floating-point filter on/off
+inline bool setFpFilterFlag(bool f) {
+  bool oldf = get_static_fpFilterFlag();
+  get_static_fpFilterFlag() = f;
+  return oldf;
+}
+
+/// turn incremental evaluation flag on/off
+inline bool setIncrementalEvalFlag(bool f) {
+  bool oldf = get_static_incrementalEvalFlag();
+  get_static_incrementalEvalFlag() = f;
+  return oldf;
+}
+
+/// turn progressive evaluation flag on/off
+inline bool setProgressiveEvalFlag(bool f) {
+  bool oldf = get_static_progressiveEvalFlag();
+  get_static_progressiveEvalFlag() = f;
+  return oldf;
+}
+
+/// set initial bit precision for progressive evaluation:
+inline long setDefInitialProgressivePrec(long n) {
+  long oldn = get_static_defInitialProgressivePrec();
+  get_static_defInitialProgressivePrec() = n;
+  return oldn;
+}
+
+/// turn rational reduction flag on/off
+inline bool setRationalReduceFlag(bool f) {
+  bool oldf = get_static_rationalReduceFlag();
+  get_static_rationalReduceFlag() = f;
+  return oldf;
+}
+
+/// CORE_init(..) is the CORE initialization function.
+/** We recommend calling it before anything else.  Originally motivated
+    by need to get around gnu's compiler bug in which the variable 
+    "defAbsPrec" was not properly initialized.  But it has other uses,
+    e.g., overriding the default std::cout precision (most systems 
+    initializes this value to 6) to our own */
+inline void CORE_init(long d) {
+  get_static_defAbsPrec() = CORE_posInfty;
+  get_static_defOutputDigits() = d;
+  std::setprecision(get_static_defOutputDigits());
+}
+
+/// change to scientific output format
+inline void setScientificFormat(std::ostream& o = std::cout) {
+  o.setf(std::ios::scientific, std::ios::floatfield);
+}
+
+/// change to positional output format
+inline void setPositionalFormat(std::ostream& o = std::cout) {
+  o.setf(std::ios::fixed, std::ios::floatfield);
+}
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/CoreDefs_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_COREDEFS_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs_impl.h
new file mode 100644
index 0000000..6c87f31
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreDefs_impl.h
@@ -0,0 +1,163 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreDefs.cpp
+ * Synopsis:
+ *	 Useful parameters for Core Library which users may change
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#include "CGAL/CORE/CoreDefs.h"
+
+namespace CORE { 
+
+//  Default Values
+
+/* ************************************************************
+ * ERROR FLAGS
+ * ************************************************************ */
+
+#ifndef CGAL_HEADER_ONLY
+
+/** I/O error flag (Default value 0, indicating no error)
+ *  User's responsibility to check and reset value to 0. */
+// This is currently used in geom2d/points2d.cpp for I/O of points
+
+// Note from 2014: does not seem to be used anywhere, and it is not declared 
+// in CoreDefs.h so it is not accessible
+// Left here for compatibilty when CGAL_HEADER_ONLY is not defined
+
+int IOErrorFlag = 0;
+
+/**
+ * If AbortFlag is true when invalid expression is constructed, system will abort
+ */
+
+bool AbortFlag = true;
+
+/**
+ * InvalidFlag is set to negative whenever an invalid expression is constructed.
+ * The user has the responsibility to reset to non-negative value.
+ */
+
+int InvalidFlag = 0;
+
+/* ************************************************************
+ * PRECISION PARAMETERS 
+ * ************************************************************ */
+
+/**
+ *  Default BigFloat Division Relative Precision
+ *  -- this is used by BigFloat division when the arguments are error-free.
+ */
+
+extLong defBFdivRelPrec = 54;
+
+/**
+ *  Default BigFloat Sqrt Absolute Precision
+ *  -- this is used by BigFloat sqrt when the argument is error-free.
+ */
+
+extLong defBFsqrtAbsPrec = 54;
+
+/**
+ * Escape Precision 
+ *   -- we will not compare a number to precision higher than this
+ *   -- if this is infinity, there there is no escape precision */
+extLong EscapePrec  = CORE_posInfty;
+
+/** this flag becomes negative if the EscapePrec is used. */
+long EscapePrecFlag = 0;
+
+/// Escape Precision Warning Flag
+/** this flag is true by default, and will cause a warning to be printed
+    when EscapePrec is reached */
+bool EscapePrecWarning = true;
+
+/** The Composite Precision [defAbsPrec, defRelPrec]
+ *  determines the precision to which an Expr evaluates its 
+ *  (exact, implicit) constant value. */
+
+/**  absolute precision  = 2^31 - 1 */
+extLong defAbsPrec = CORE_posInfty;
+/** default relative precision is 60 relative bits.
+ *  Why 60?  We would really like this to be 54, so that the default
+ *  conversion duplicates the IEEE double precision.  But it turns out
+ *  (see README file under BUGS), we need 59 to ensure this.
+ *  Chee Yap (7/1/01) */
+extLong defRelPrec = 60;
+
+/**  number of BigFloat digits to print out */
+long defBigFloatOutputDigits = 10;
+
+/**  NORMALLY, we like to make this equal to defBigFloatOutputDigits
+  *  8/3/01, Chee: re-introduced this parameter */
+long defOutputDigits = defBigFloatOutputDigits;
+
+/** String Input Precision */
+
+/** Set this to 16 if you want machine precision. This controls the
+ *  absolute error in string decimal inputs to Real or Expr.
+ *  If defInputDigits is finite, then the absolute error will be 
+ *  at most 10^{-defInputDigits}.  Otherwise, the input is exactly 
+ *  represented by some BigFloat or BigRat value. */
+extLong defInputDigits = CORE_posInfty;
+
+/** This controls the absolute error in converting from string to BigFloat
+ *  The absolute error will be at most 10^{-defInputDigits} */
+long defBigFloatInputDigits = 16;
+
+/* ************************************************************
+ * EVALUATION FLAGS
+ * ************************************************************ */
+
+/** Floating Point filter
+ *  true = turn on floating point filter */
+bool fpFilterFlag = true;
+
+/** IncrementaL evaluation flag
+ *  incremental evaluation is requested, This means, we try to use previous
+ *  approximate values to improve an approximation */
+bool incrementalEvalFlag = true;
+
+/** Progressive evaluation flag
+ *  true = turn on progressive evaluation flag */
+bool progressiveEvalFlag = true;
+
+/** Initial progressive evaluation precision
+ *  Used by AddSubRep */
+long defInitialProgressivePrec = 64;
+
+/** RATIONAL REDUCTION FLAG
+ *  true = turn on rational reduction */
+bool rationalReduceFlag = false;
+
+#endif // CGAL_HEADER_ONLY
+
+} //namespace CORE
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreIO_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreIO_impl.h
new file mode 100644
index 0000000..7f57e27
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/CoreIO_impl.h
@@ -0,0 +1,482 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreIO.cpp
+ *
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _COREIO_IMPL_H_
+#define _COREIO_IMPL_H_
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/CORE/BigFloatRep.h>
+#include <CGAL/CORE/BigFloat.h>
+#include <CGAL/CORE/BigInt.h>
+
+namespace CORE { 
+
+CGAL_INLINE_FUNCTION
+void core_io_error_handler(const char *f, const char *m) {
+  std::cout << "\n error_handler";
+  std::cout << "::" << f << "::" << m << "\n";
+  std::cout.flush();
+  std::abort();
+}
+
+CGAL_INLINE_FUNCTION
+void core_io_memory_handler(char *t, const char *f, const char *m) {
+  if (t == NULL) {
+    std::cout << "\n memory_handler";
+    std::cout << "::" << f << "::" << m;
+    std::cout << "memory exhausted\n";
+    std::cout.flush();
+    std::abort();
+  }
+}
+
+// s has size old_size and will be resized to new_size.
+CGAL_INLINE_FUNCTION
+void allocate (char * &s, int old_size, int new_size) {
+  if (old_size > new_size)
+    old_size = new_size;
+
+  if (s == NULL)
+    old_size = 0;
+
+  char *t = new char[new_size];
+  core_io_memory_handler(t, "CoreIO", "allocate::out of memory error");
+
+  int i;
+  for (i = 0; i < old_size; i++)
+    t[i] = s[i];
+
+  delete[] s;
+  s = t;
+}
+
+// appends c to s at position pos.
+// sz is the size of s
+CGAL_INLINE_FUNCTION
+void append_char (char * &s, int & sz, int pos, char c) {
+  if (pos > sz)
+    core_io_error_handler("CoreIO", "append_char::invalid argument");
+
+  if (pos == sz) {
+    allocate(s, sz, 2*sz);
+    sz *= 2;
+  }
+
+  s[pos] = c;
+}
+
+// skip blanks, tabs, line breaks and comment lines
+CGAL_INLINE_FUNCTION
+int skip_comment_line (std::istream & in) {
+  int c;
+
+  do {
+    c = in.get();
+    while ( c == '#' ) {
+      do {
+        c = in.get();
+      } while ( c != '\n' );
+      c = in.get();
+    }
+  } while (c == ' ' || c == '\t' || c == '\n');
+
+  if (c == EOF)
+    core_io_error_handler("CoreIO::read_from_file()","unexpected end of file.");
+
+  in.putback(c);
+  return c;
+}
+
+// skips '\\' followed by '\n'
+CGAL_INLINE_FUNCTION
+int skip_backslash_new_line (std::istream & in) {
+  int c = in.get();
+
+  while (c == '\\') {
+    c = in.get();
+
+    if (c == '\n')
+      c = in.get();
+    else
+      core_io_error_handler("CoreIO::operator>>", "\\ must be immediately followed by new line.");
+  }
+
+  return c;
+}
+
+CGAL_INLINE_FUNCTION
+void read_string(std::istream& in, char* &buffer, int sz) {
+  int c, pos=0;
+  skip_comment_line(in);
+
+  while ( (c = in.get()) != EOF ) {
+    if ( c == ' ' || c == '\t' || c == '\n' || c == '#')
+      break;
+    else
+      append_char(buffer, sz, pos++, c);
+  }
+  append_char(buffer, sz, pos, '\0');
+}
+
+CGAL_INLINE_FUNCTION
+void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) {
+  char *buffer;
+  int size, offset;
+  int base;
+  bool is_negate;
+
+  int c, pos = 0;
+  skip_comment_line(in);
+
+  // read sign
+  c = in.get();
+  if (c == '-') {
+    is_negate = true;
+    c = in.get();
+  } else
+    is_negate = false;
+
+  // read base and compute digits
+  if (c == '0') {
+    c = in.get();
+    if (c == 'b') {
+      base = 2;
+      size = (maxBits == 0 || maxBits > length) ? length : maxBits;
+      offset = length - size;
+    } else if (c == 'x') {
+      base = 16;
+      size = (maxBits == 0) ? length : (maxBits+3) >> 2;
+      size = (size > length) ? length : size;
+      offset = (length - size) << 2;
+    } else {
+      base = 8;
+      size = (maxBits == 0) ? length : (maxBits+2) / 3;
+      size = (size > length) ? length : size;
+      offset = (length - size) * 3;
+      in.putback(c);
+    }
+  } else {
+    base = 10;
+    size = (maxBits == 0) ? length : (int)std::ceil(maxBits*std::log(2.0)/std::log(10.0));
+    size = (size > length) ? length : size;
+    offset = length - size;
+    in.putback(c);
+  }
+
+  buffer = new char[size+2];
+  // read digits
+  for (int i=0; (i<size)&&((c=skip_backslash_new_line(in)) != EOF ); i++) {
+    if (c != ' ' && c != '\t' && c != '\n')
+      append_char(buffer, size, pos++, c);
+  }
+  if (base == 10) {
+    for(int j=0; j<offset; j++)
+      append_char(buffer, size, pos++, '0');
+  }
+  append_char(buffer, size, pos, '\0');
+
+  // convert string to bigint.
+  if (m.set_str(buffer, base) < 0)
+    core_io_error_handler("CoreIO::read_from_file()","bad big number format.");
+  delete[] buffer;
+
+  // shift left if neccessary
+  if (offset > 0 && base != 10) {
+    m <<= offset;
+  }
+
+  if (is_negate)
+    negate(m);
+}
+
+
+CGAL_INLINE_FUNCTION
+void write_base_number(std::ostream& out, char* buffer, int length, int base, int charsPerLine) {
+  // write big number in a format that gmp's mpz_set_str() can
+  // automatically recognize with argument base = 0.
+  if (base == 2)
+    out << "0b";
+  else if (base == 16)
+    out << "0x";
+  else if (base == 8)
+    out << '0';
+
+  // write big number in charsPerLine.
+  char* start, *end, c;
+  for (int i=0; i<length; i += charsPerLine) {
+    start = buffer + i;
+    if (i + charsPerLine >= length)
+      out << start;
+    else {
+      end = start + charsPerLine;
+      c = *end;
+      *end = '\0';
+
+      out << start << "\\\n";
+      *end = c;
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void readFromFile(BigInt& z, std::istream& in, long maxLength) {
+  char *buffer;
+  long length;
+
+  // check type name whether it is Integer or not.
+  buffer = new char[8];
+  read_string(in, buffer, sizeof(buffer));
+  if ( std::strcmp(buffer, "Integer") != 0)
+    core_io_error_handler("BigInt::read_from_file()","type name expected.");
+  delete[] buffer;
+
+  // read the bit length field.
+  buffer = new char[100];
+  read_string(in, buffer, sizeof(buffer));
+  length = std::atol(buffer);
+  delete[] buffer;
+
+  // read bigint
+  read_base_number(in, z, length, maxLength);
+}
+
+CGAL_INLINE_FUNCTION
+void writeToFile(const BigInt& z, std::ostream& out, int base, int charsPerLine) {
+  BigInt c = abs(z);
+
+  // get the absoulte value string
+  char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2];
+  mpz_get_str(buffer, base, c.get_mp());
+  int length = std::strlen(buffer);
+
+  // write type name of big number and length
+  //out << "# This is an experimental big number format.\n";
+  out << "Integer " << length << "\n";
+
+  // if bigint is negative, then write an sign '-'.
+  if ( sign(z) < 0  )
+    out << '-';
+
+  write_base_number(out, buffer, length, base, charsPerLine);
+  out << "\n";
+  delete[] buffer;
+}
+
+CGAL_INLINE_FUNCTION
+void readFromFile(BigFloat& bf, std::istream& in, long maxLength) {
+  char *buffer;
+  long length;
+  long exponent;
+  BigInt mantissa;
+
+  // check type name whether it is Float
+  buffer = new char[6];
+  read_string(in, buffer, sizeof(buffer));
+  if (std::strcmp(buffer, "Float") != 0)
+    core_io_error_handler("BigFloat::read_from_file()", "type name expected");
+  delete[] buffer;
+
+  // read base (default is 16384)
+  buffer = new char[8];
+  read_string(in, buffer, sizeof(buffer));
+  if (std::strcmp(buffer, "(16384)") != 0)
+    core_io_error_handler("BigFloat::read_from_file()", "base expected");
+  delete[] buffer;
+
+  // read the bit length field.
+  buffer = new char[100];
+  read_string(in, buffer, sizeof(buffer));
+  length = std::atol(buffer);
+  delete[] buffer;
+
+  // read exponent
+  buffer = new char[100];
+  read_string(in, buffer, sizeof(buffer));
+  exponent = std::atol(buffer);
+  delete[] buffer;
+
+  // read mantissa
+  read_base_number(in, mantissa, length, maxLength);
+
+  // construct BigFloat
+  bf = BigFloat(mantissa, 0, exponent);
+}
+
+CGAL_INLINE_FUNCTION
+void writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLine) {
+  BigInt c(CORE::abs(bf.m()));
+
+  // get the absoulte value string
+  char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2];
+  mpz_get_str(buffer, base, c.get_mp());
+  int length = std::strlen(buffer);
+
+
+  // write type name, base, length
+  //out << "# This is an experimental Big Float format." << std::endl;
+  out << "Float (16384) " << length << std::endl;
+  // write exponent
+  out << bf.exp() << std::endl;
+
+  // write mantissa
+  if ( CORE::sign(bf.m()) < 0 )
+    out << '-';
+
+  write_base_number(out, buffer, length, base, charsPerLine);
+  out << '\n';
+  delete[] buffer;
+}
+
+/* Underconstruction ----
+void BigFloat::read_from_file2(std::istream& in, long maxLength) {
+  long length = 1024;
+  char *buffer;
+  
+  // check type name whether it is Float
+  buffer = new char[7];
+  BigInt::read_string(in, buffer, sizeof(buffer));
+  if (strcmp(buffer, "NFloat") != 0)
+    core_io_error_handler("BigFloat::read_from_file2()", "type name expected");
+  delete[] buffer;
+ 
+  // read base (default is 16) 
+  buffer = new char[5];
+  BigInt::read_string(in, buffer, sizeof(buffer));
+  if (strcmp(buffer, "(16)") != 0)
+    core_io_error_handler("BigFloat::read_from_file2()", "base expected");
+  delete[] buffer;
+  
+  // read length field
+  buffer = new char[100];
+  BigInt::read_string(in, buffer, sizeof(buffer));
+  
+  // get the length field if it is not null.
+  if (buffer[0] != '\0') {
+    length = atol(buffer);
+    if (maxLength > 0 && length >= maxLength)
+      length = maxLength;
+  }
+  delete[] buffer;
+ 
+  // read exponent
+  buffer = new char[100];
+  BigInt::read_string(in, buffer, sizeof(buffer));
+  long exp16 = atol(buffer);
+  delete[] buffer;
+ 
+  // read mantissa
+  buffer = new char[length+2];
+  //BigInt::read_base_number(in, buffer, length);
+ 
+  BigInt m16(buffer);
+  delete[] buffer;
+  
+  // convert to base CHUNK_BIT
+  exp16 = exp16 - length + 1; 
+  if ( m16.is_negative() )
+    exp16 ++;
+ 
+  long tmp_exp = exp16 * 4;
+  long q = tmp_exp / CHUNK_BIT;
+  long r = tmp_exp % CHUNK_BIT;
+  if ( r < 0 ) {
+    r += CHUNK_BIT;
+    q --;
+  }
+  
+  BigInt mantissa = m16 << r;
+  long exponent = q;
+ 
+  // construct BigFloat
+  if (--rep->refCount == 0)
+    delete rep;
+  
+  rep = new BigFloatRep(mantissa, 0, exponent);
+  rep->refCount++;
+  
+}
+ 
+// write normal float
+// now it assumed to write in hex base, i.e. B=2^4=16
+// (note: our default base B=2^(CHUNK_BIT)=2^14=16384
+void BigFloat::write_to_file2(std::ostream& out, int base, int charsPerLine) {
+  // convert to base 16.
+  long new_base = 4; // 2^4 = 16
+  long tmp_exp = (rep->exp) * CHUNK_BIT;
+  long q = tmp_exp / new_base;
+  long r = tmp_exp % new_base;
+  std::cout << "CORE_DEBUG: q=" << q << ", r=" << r << std::endl;
+  if ( r < 0 ) {
+    r += new_base;
+    q--;
+  }
+  std::cout << "CORE_DEBUG: q=" << q << ", r=" << r << std::endl;
+  
+  BigInt m16 = (rep->m) << r;
+ 
+  int size = mpz_sizeinbase(m16.I, base) + 2;
+  std::cout << "size=" << size << std::endl;
+  char* buffer = new char[size];
+ 
+  int length = bigint_to_string(m16, buffer, base);
+  std::cout << "length=" << length << std::endl;
+ 
+  long exp16 = q + length - 1; 
+  if ( m16.is_negative() )
+    exp16 --;
+ 
+  // write type name, base, length
+  out << "# This is an experimental Big Float format." << std::endl;
+  out << "NFloat (16) " << length << std::endl;
+  
+  // write exponent
+  out << exp16 << std::endl;
+  
+  // write mantissa
+  if ( m16.is_negative() ) {
+    out << '-';
+    buffer ++;
+  }
+  
+  BigInt::write_base_number(out, buffer, length, base, charsPerLine);
+  out << '\n';
+  delete[] buffer;
+}
+*/
+
+} //namespace CORE
+
+#endif // _COREIO_IMPL_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr.h
new file mode 100644
index 0000000..6768c64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr.h
@@ -0,0 +1,561 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Expr.h
+ * Synopsis: a class of Expression in Level 3
+ * 
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *       Vikram Sharma<sharma at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+// We need to include BigFloat.h here because there is a circular dependency
+// between Expr and BigFloat.
+#include <CGAL/CORE/BigFloat.h>
+
+#ifndef _CORE_EXPR_H_
+#define _CORE_EXPR_H_
+
+#include <CGAL/CORE/ExprRep.h>
+#include <CGAL/assertions.h>
+
+namespace CORE { 
+
+/// \class Expr Expr.h
+/// \brief Expr is a class of Expression in Level 3
+typedef RCImpl<ExprRep> RCExpr;
+
+class Expr : public RCExpr {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  Expr() : RCExpr(new ConstDoubleRep()) {}
+  /// constructor for <tt>int</tt>
+  Expr(int i) : RCExpr(new ConstDoubleRep(i)) {}
+  /// constructor for <tt>short</tt>
+  Expr(short i) : RCExpr(new ConstDoubleRep(i)) {}
+  /// constructor for <tt>unsigned int</tt>
+  Expr(unsigned int ui) : RCExpr(new ConstDoubleRep(ui)) {}
+
+  /// constructor for <tt>long</tt>
+  Expr(long l) : RCExpr(new ConstRealRep(Real(l))) {}
+  /// constructor for <tt>unsigned long</tt>
+  Expr(unsigned long ul) : RCExpr(new ConstRealRep(Real(ul))) {}
+
+  /// constructor for <tt>float</tt>
+  /** \note the results of this constructor may appear unpredictable to the 
+   *  user.  E.g.,  one may assume that new Expr(.1) is exactly equal to .1,
+   *  but it will be print as
+   *      .1000000000000000055511151231257827021181583404541015625.
+   *  This is so because .1 cannot be represented exactly as a double
+   *  (or, for that matter, as a binary fraction of any finite length). 
+   *  The value is the closest double value determined by the compiler.
+   */
+  Expr(float f) : RCExpr(NULL) { // check for valid numbers
+    // (i.e., not infinite and not NaN)
+    if (! CGAL_CORE_finite(f)) {
+      std::cerr << " ERROR : constructed an invalid float! " << std::endl;
+      if (get_static_AbortFlag())
+        abort();
+      get_static_InvalidFlag() = -1;
+    }
+    rep = new ConstDoubleRep(f);
+  }
+  /// constructor for <tt>double</tt>
+  Expr(double d) : RCExpr(NULL) { // check for valid numbers
+    // (i.e., not infinite and not NaN)
+    if (! CGAL_CORE_finite(d)) {
+      std::cerr << " ERROR : constructed an invalid double! " << std::endl;
+      if (get_static_AbortFlag())
+        abort();
+      get_static_InvalidFlag() = -2;
+    }
+    rep = new ConstDoubleRep(d);
+  }
+
+  /// constructor for <tt>BigInt</tt>
+  Expr(const BigInt& I) : RCExpr(new ConstRealRep(Real(I))) {}
+  /// constructor for <tt>BigRat</tt>
+  Expr(const BigRat& R) : RCExpr(new ConstRealRep(Real(R))) {}
+
+  /// constructor for <tt>BigFloat</tt>
+  Expr(const BigFloat& F) : RCExpr(new ConstRealRep(Real(F))) {}
+
+  /// constructor for <tt>const char*</tt>
+  /** construct Expr from a string representation \a s
+   * with precision \a prec. It is perfectly predictable:
+   * new Expr(".1") is exactly equal to .1, as one would expect. Therefore,
+   * it is generally recommended that the (String) constructor be used in
+   * preference to the (double) constructor.
+   */
+  Expr(const char *s, const extLong& p = get_static_defInputDigits())
+      : RCExpr(new ConstRealRep(Real(s, p))) {}
+
+  /// constructor for <tt>std::string</tt>
+  Expr(const std::string& s, const extLong& p = get_static_defInputDigits())
+      : RCExpr(new ConstRealRep(Real(s, p))) {}
+
+  /// constructor for <tt>Real</tt>
+  Expr(const Real &r) : RCExpr(new ConstRealRep(r)) {}
+
+  /// constructor for Polynomial node (n-th root)
+  /** default value n=0 means the first positive root */
+  template <class NT>
+  Expr(const Polynomial<NT>& p, int n = 0)
+      : RCExpr(new ConstPolyRep<NT>(p, n)) {}
+
+  /// constructor for Polynomial node (root in Interval <tt>I</tt>)
+  template <class NT>
+  Expr(const Polynomial<NT>& p, const BFInterval& I)
+      : RCExpr(new ConstPolyRep<NT>(p, I)) {}
+
+  /// constructor for ExprRep
+  Expr(ExprRep* p) : RCExpr(p) {}
+  //@}
+
+  /// \name Copy-Assignment-Destructors
+  //@{
+  /// copy constructor
+  Expr(const Expr& rhs) : RCExpr(rhs) {
+    rep->incRef();
+  }
+
+  /// = operator
+  Expr& operator=(const Expr& rhs) {
+    if (this != &rhs) {
+      rep->decRef();
+      rep = rhs.rep;
+      rep->incRef();
+    }
+    return *this;
+  }
+  /// destructor
+  ~Expr() {
+    rep->decRef();
+  }
+  //@}
+
+  /// \name Compound Assignment Operators
+  //@{
+  /// += operator
+  Expr& operator+=(const Expr& e) {
+    *this = new AddRep(rep, e.rep);
+    return *this;
+  }
+  /// -= operator
+  Expr& operator-=(const Expr& e) {
+    *this = new SubRep(rep, e.rep);
+    return *this;
+  }
+  /// *= operator
+  Expr& operator*=(const Expr& e) {
+    *this = new MultRep(rep, e.rep);
+    return *this;
+  }
+  /// /= operator
+  Expr& operator/=(const Expr& e) {
+    if ((e.rep)->getSign() == 0) {
+      std::cerr << " ERROR : division by zero ! " << std::endl;
+      if (get_static_AbortFlag())
+        abort();
+      get_static_InvalidFlag() = -3;
+    }
+    *this = new DivRep(rep, e.rep);
+    return *this;
+  }
+  //@}
+
+  /// \name Unary Minus, Increment and Decrement Operators
+  //@{
+  /// unary plus
+  Expr operator+() const {
+    return Expr(*this);
+  }
+  /// unary minus
+  Expr operator-() const {
+    return Expr(new NegRep(rep));
+  }
+  /// left increment operator (++i)
+  Expr& operator++() {
+    *this += 1;
+    return *this;
+  }
+  /// right increment operator (i++)
+  Expr operator++(int) {
+    Expr t(*this);
+    *this += 1;
+    return t;
+  }
+  /// left decrement operator (--i)
+  Expr& operator--() {
+    *this -= 1;
+    return *this;
+  }
+  /// right deccrement operator (i--)
+  Expr operator--(int) {
+    Expr t(*this);
+    *this -= 1;
+    return t;
+  }
+  //@}
+
+  /// \name String Conversion Functions
+  //@{
+  /// set value from <tt>const char*</tt>
+  void fromString(const char* s, const extLong& prec = get_static_defInputDigits()) {
+    *this = Expr(s, prec);
+  }
+  /// convert to <tt>std::string</tt>
+  /** give decimal string representation */
+  std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) const {
+    return rep->toString(prec, sci);
+  }
+  //@}
+  //
+
+  /// \name Conversion Functions
+  //@{
+  /// convert to \c int
+  int intValue() const {
+    return approx(64, 1024).intValue();
+  }
+  /// convert to \c long
+  long longValue() const {
+    return approx(64, 1024).longValue();
+  }
+  /// convert to \c float
+  float floatValue() const {
+    return approx(53, 1024).floatValue();
+  }
+  /// convert to \c double
+  /** chen: - use equivalent precision (rel:53, abs: 1024)
+    as in IEEE double. enforce an evaluation in case
+    before this has been done before casting. */
+  double doubleValue() const {
+    return approx(53, 1024).doubleValue();
+  }
+  /// convert to an interval defined by a pair of \c double
+  /** If value is exact, the two \c double will coincide
+   */
+  CGAL_CORE_EXPORT void doubleInterval(double & lb, double & ub) const;
+  /// convert to \c BigInt (approximate it first!)
+  BigInt BigIntValue() const {
+    return rep->BigIntValue();
+  }
+  /// convert to \c BigRat (approximate it first!)
+  BigRat BigRatValue() const {
+    return rep->BigRatValue();
+  }
+  /// convert to \c BigFloat (approximate it first!)
+  /** Ought to allow BigFloatValue() take an optional precision argument */
+  BigFloat BigFloatValue() const {
+    return rep->BigFloatValue();
+  }
+  //@}
+
+  /// \name Approximation Function
+  //@{
+  /// Compute approximation to combined precision [\a r, \a a].
+  /** Here is the definition of what this means:
+       If e is the exact value and ee is the approximate value,
+       then  |e - ee| <= 2^{-a} or  |e - ee| <= 2^{-r} |e|. */
+  const Real & approx(const extLong& relPrec = get_static_defRelPrec(),
+                      const extLong& absPrec = get_static_defAbsPrec()) const {
+    return rep->getAppValue(relPrec, absPrec);
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  //CONSTANTS:
+  /// return Expr(0)
+  CGAL_CORE_EXPORT static const Expr& getZero();
+
+  /// return Expr(1)
+  CGAL_CORE_EXPORT static const Expr& getOne();
+
+  /// Has Exact Division
+  static bool hasExactDivision() {
+    return true;
+  }
+
+  /// get the sign
+  int sign() const {
+    return rep->getSign();
+  }
+  /// is zero?
+  bool isZero() const {
+    return sign() == 0;
+  }
+  /// absolute value
+  Expr abs() const {
+    return (sign() >= 0) ? +(*this) : -(*this);
+  }
+
+  /// compare function
+  int cmp(const Expr& e) const {
+    return rep == e.rep ? 0 : SubRep(rep, e.rep).getSign();
+  }
+
+  /// return the internal representation
+  ExprRep* Rep() const {
+    return rep;
+  }
+  /// get exponent of current approximate value
+  long getExponent() const {
+    return BigFloatValue().exp();
+  }
+  /// get mantissa of current approximate value
+  BigInt getMantissa() const {
+    return BigFloatValue().m();
+  }
+  //@}
+
+public:
+  /// \name Debug Helper Function
+  //@{
+  /// debug function
+  void  debug(int mode = TREE_MODE, int level = DETAIL_LEVEL,
+              int depthLimit = INT_MAX) const;
+  //@}
+  /// debug information levels
+  enum {LIST_MODE, TREE_MODE, SIMPLE_LEVEL, DETAIL_LEVEL};
+};// class Expr
+
+#define CORE_EXPR_ZERO Expr::getZero()
+
+/// I/O Stream operator<<
+inline std::ostream& operator<<(std::ostream& o, const Expr& e) {
+  o << *(const_cast<ExprRep*>(&e.getRep()));
+  return o;
+}
+/// I/O Stream operator>>
+inline std::istream& operator>>(std::istream& i, Expr& e) {
+  Real rVal;
+  i >> rVal; // precision is = get_static_defInputDigits()
+  if (i)
+    e = rVal;		// only assign when reading is successful.
+  return i;
+}
+
+/// floor function
+CGAL_CORE_EXPORT BigInt floor(const Expr&, Expr&);
+/// power function
+CGAL_CORE_EXPORT Expr pow(const Expr&, unsigned long);
+
+/// addition
+inline Expr operator+(const Expr& e1, const Expr& e2) {
+  return Expr(new AddRep(e1.Rep(), e2.Rep()));
+}
+/// substraction
+inline Expr operator-(const Expr& e1, const Expr& e2) {
+  return Expr(new SubRep(e1.Rep(), e2.Rep()));
+}
+/// multiplication
+inline Expr operator*(const Expr& e1, const Expr& e2) {
+  return Expr(new MultRep(e1.Rep(), e2.Rep()));
+}
+/// division
+inline Expr operator/(const Expr& e1, const Expr& e2) {
+  if (e2.sign() == 0) {
+    std::cerr << " ERROR : division by zero ! " << std::endl;
+    if (get_static_AbortFlag())
+      abort();
+    get_static_InvalidFlag() = -4;
+  }
+  return Expr(new DivRep(e1.Rep(), e2.Rep()));
+}
+/// modulo operator
+inline Expr operator%(const Expr& e1, const Expr& e2) {
+  Expr result;
+  floor(e1/e2, result);
+  return result;
+}
+
+/// operator ==
+/** this is inefficient if you compare to zero:
+ *  e.g., if (e != 0) {...} use e.isZero() instead */
+inline bool operator==(const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) == 0;
+}
+/// operator !=
+inline bool operator!=(const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) != 0;
+}
+/// operator <
+inline bool operator< (const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) < 0;
+}
+/// operator <=
+inline bool operator<=(const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) <= 0;
+}
+/// operator <
+inline bool operator> (const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) > 0;
+}
+/// operator >=
+inline bool operator>=(const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2) >= 0;
+}
+
+/// return sign
+inline int sign(const Expr& e) {
+  return e.sign();
+}
+/// is zero?
+inline bool isZero(const Expr& e) {
+  return e.isZero();
+}
+/// compare
+/** compare two Expr \a e1 and \a e2, return
+ * \retval -1 if e1 < e2,
+ * \retval 0 if e1 = e2,
+ * \retval 1 if e1 > e2. */
+inline int cmp(const Expr& e1, const Expr& e2) {
+  return e1.cmp(e2);
+}
+/// absolute value
+inline Expr abs(const Expr& x) {
+  return x.abs();
+}
+/// absolute value (same as abs)
+inline Expr fabs(const Expr& x) {
+  return abs(x);
+}
+/// floor
+inline BigInt floor(const Expr& e) {
+  Expr tmp;
+  return floor(e, tmp);
+}
+/// ceiling
+inline BigInt ceil(const Expr& e) {
+  return -floor(-e);
+}
+/// floorLg
+inline long floorLg(const Expr& e) {
+  Expr tmp;
+  return floorLg(floor(e));
+}
+/// ceilLg
+inline long ceilLg(const Expr& e) {
+  Expr tmp;
+  return ceilLg(ceil(e));
+}
+/// power
+inline Expr power(const Expr& e, unsigned long p) {
+  return pow(e, p);
+}
+
+/// divisibility predicate
+/** We do not check if e2 is 0.
+ * */
+// NOTE:  The name "isDivisible" is not consistent
+// 		with the analogous "divisible" predicate in BigInt!
+inline bool isDivisible(const Expr& e1, const Expr& e2) {
+  Expr result;
+  floor(e1/e2, result);
+  return (result.sign() == 0);
+}
+
+/// square root
+inline Expr sqrt(const Expr& e) {
+  if (e.sign() < 0) {
+    std::cerr << " ERROR : sqrt of negative value ! " << std::endl;
+    if (get_static_AbortFlag())
+      abort();
+    get_static_InvalidFlag() = -5;
+  }
+  return Expr(new SqrtRep(e.Rep()));
+}
+
+//Following two have been added to make NT=Expr work for Polynomial<NT>
+/// gcd
+inline Expr gcd(const Expr& /*a*/, const Expr& /*b*/) {
+  return Expr(1);
+}
+inline Expr div_exact(const Expr& x, const  Expr& y) {
+  return x/y - x%y;
+}
+
+/// helper function for constructing Polynomial node (n-th node)
+template <class NT>
+inline Expr rootOf(const Polynomial<NT>& p, int n = 0) {
+  return Expr(p, n);
+}
+
+/// helper function for constructing Polynomial node witb BFInterval
+template <class NT>
+inline Expr rootOf(const Polynomial<NT>& p, const BFInterval& I) {
+  return Expr(p, I);
+}
+/// helper function for constructing Polynomial node with pair of BigFloats
+template <class NT>
+inline Expr rootOf(const Polynomial<NT>& p, const BigFloat& x,
+		const BigFloat& y) {
+  return Expr(p, BFInterval(x, y) );
+}
+/// helper function for constructing Polynomial node with pair of doubles
+template <class NT>
+inline Expr rootOf(const Polynomial<NT>& p, double x, double y) {
+  return Expr(p, BFInterval(BigFloat(x), BigFloat(y)) );
+}
+/// helper function for constructing Polynomial node with pair of ints
+template <class NT>
+inline Expr rootOf(const Polynomial<NT>& p, int x, int y) {
+  return Expr(p, BFInterval(BigFloat(x), BigFloat(y)) );
+}
+
+/// constructor for Polynomial node of the form x^m - n (i.e., radicals)
+/** We assume that n >= 0 and m >= 1
+ * */
+template <class NT>
+inline Expr radical(const NT& n, int m) {
+  CGAL_assertion(n>=0 && m>=1);
+  if (n == 0 || n == 1 || m == 1)
+    return Expr(n);
+  Polynomial<NT> Q(m);
+  Q.setCoeff(0, -n);
+  Q.setCoeff(m, 1);
+  return Expr(Q, 0);
+}
+
+// We include this file here and not from inside Poly.h,
+// because otherwise VC++.net2003 can't compile Expr.cpp
+#include <CGAL/CORE/poly/Poly.tcc>
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/Expr_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_EXPR_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/ExprRep.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/ExprRep.h
new file mode 100644
index 0000000..497d844
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/ExprRep.h
@@ -0,0 +1,1340 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: ExprRep.h
+ * Synopsis: Internal Representation of Expr.
+ * 
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *       Vikram Sharma<sharma at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_EXPRREP_H_
+#define _CORE_EXPRREP_H_
+
+#include <CGAL/CORE/Real.h>
+#include <CGAL/CORE/Filter.h>
+#include <CGAL/CORE/poly/Sturm.h>
+
+namespace CORE { 
+
+#if defined(CORE_DEBUG_BOUND) && !defined(CGAL_HEADER_ONLY)
+// These counters are incremented each time each bound is recognized as equal
+// to the best one in computeBound().
+extern unsigned int BFMSS_counter;
+extern unsigned int Measure_counter;
+// extern unsigned int Cauchy_counter;
+extern unsigned int LiYap_counter;
+// These counters are incremented each time each bound is recognized as equal
+// to the best one in computeBound(), and it's strictly the best.
+extern unsigned int BFMSS_only_counter;
+extern unsigned int Measure_only_counter;
+// extern unsigned int Cauchy_only_counter;
+extern unsigned int LiYap_only_counter;
+// This counter is incremented each time the precision needed matches the
+// root bound.
+extern unsigned int rootBoundHitCounter;
+#endif
+
+const extLong EXTLONG_BIG = (1L << 30);
+const extLong EXTLONG_SMALL = -(1L << 30);
+
+const double log_5 = log(double(5))/log(double(2));
+
+// Returns the ceil of log_2(5^a).
+inline extLong ceilLg5(const extLong & a) {
+#if defined (_MSC_VER)
+  return (int) ::ceil(log_5 * a.toLong());
+#else
+  return (int) std::ceil(log_5 * a.toLong());
+#endif
+}
+
+/// \struct NodeInfo
+/// \brief store information of a node
+struct NodeInfo {
+  Real     appValue;		///< current approximate value
+  bool     appComputed;  	///< true if the approx value been computed
+  bool     flagsComputed;  	///< true if rootBound parameters have been computed
+  extLong  knownPrecision; 	///< Precision achieved by current approx value
+
+#ifdef CORE_DEBUG
+  extLong relPrecision;
+  extLong absPrecision;
+  unsigned long numNodes;
+#endif
+
+  /// d_e bounds the degree of the minimal polynomial of a DAG expression
+  /** Basically, d_e is equal to 2^k where k is the number of square-root nodes
+   *   in the DAG.  If there are other kinds of non-linear nodes, this is
+   *   generalized accordingly.   */
+  extLong d_e;
+
+  bool visited;   	///< flag in counting # of sqrts
+  int sign; 		///< sign of the value being represented.
+
+  extLong  uMSB; ///< upper bound of the position of Most Significant Bit
+  extLong  lMSB; ///< lower bound of the position of Most Significant Bit
+
+  // For the degree-length method mentioned in Chee's book.
+  /* the degree of defining polynomial P(X) obtained from Resultant calculus
+   * (deprecated now) */
+  // extLong degree;
+
+  // extLong length; ///< length is really lg(|| P(X) ||)
+  extLong measure; ///< measure is really lg(Measure)
+
+  // For our new bound.
+  /// 2^{high(E)} is an UPPER bound for the moduli of ALL conjugates of E.
+  /** In our papers, high is equal to log_2(\overline{\mu(E)}). */
+  extLong high;
+  /// 2^{-low(E)} is LOWER bound on the moduli of ALL NON_ZERO conjugate of E.
+  /** BE CAREFUL!  NOTE THAT UNLIKE "high", the sign of low is negated here!
+      In our papers, low is equal to -log_2(\underline{\nu(E)})  */
+  extLong low;
+  /// \brief upper bound of the leading coefficient of minimal defining
+  ///        polynomial of $E$.
+  extLong lc;
+  /// \brief upper bound of the last non-zero coefficient of minimal defining
+  ///        polynomial of $E$.
+  extLong tc;
+
+  // For the 2-ary BFMSS bound.
+  extLong v2p, v2m;
+  // For the 5-ary BFMSS bound.
+  extLong v5p, v5m;
+  /// 2^u25 is an upper bound for the moduli of all the conjugates of U(E)
+  /** where E = 2^v2*5^v5*U(E)/L(E), U(E) and L(E) are division-free. */
+  extLong u25;
+  /// 2^l25 is an upper bound for the moduli of all the conjugates of L(E)
+  /** where E = 2^v2*5^v5*U(E)/L(E), U(E) and L(E) are division-free. */
+  extLong l25;
+
+  int ratFlag;		///< rational flag
+  BigRat* ratValue;	///< rational value
+
+  /// default constructor
+  CGAL_CORE_EXPORT NodeInfo();
+};//NodeInfo struct
+
+//  forward reference
+// class Expr;
+
+/// \class ExprRep
+/// \brief The sharable, internal representation of expressions
+//  Members: private: int refCount,
+//            public:  NodeInfo* nodeInfo,
+//                     filteredFp ffVal.
+class ExprRep {
+public:
+  /// \name Constructor and Destructor
+  //@{
+  /// default constructor
+  CGAL_CORE_EXPORT ExprRep();
+  /// virtual destructor for this base class
+  virtual ~ExprRep() {
+    if (nodeInfo != NULL) // This check is only for optimization.
+      delete nodeInfo;
+  }
+  //@}
+
+  /// \name Reference Counting
+  //@{
+  /// increase reference counter
+  void incRef() {
+    ++refCount;
+  }
+  /// decrease reference counter
+  void decRef() {
+    if (--refCount == 0)
+      delete this;
+  }
+  /// return reference counter
+  int getRefCount() const {
+    return refCount;
+  }
+  /// check whether reference counter == 1
+  int isUnique() const {
+    return refCount == 1;
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  /// Get the approximate value
+  CGAL_CORE_EXPORT const Real & getAppValue(const extLong& relPrec = get_static_defRelPrec(),
+                                            const extLong& absPrec = get_static_defAbsPrec());
+  /// Get the sign.
+  int getSign();
+  int getExactSign();
+
+  const Real& appValue() const {
+    return nodeInfo->appValue;
+  }
+  Real& appValue() {
+    return nodeInfo->appValue;
+  }
+
+  const bool& appComputed() const {
+    return nodeInfo->appComputed;
+  }
+  bool& appComputed() {
+    return nodeInfo->appComputed;
+  }
+
+  const bool& flagsComputed() const {
+    return nodeInfo->flagsComputed;
+  }
+  bool& flagsComputed() {
+    return nodeInfo->flagsComputed;
+  }
+
+  const extLong& knownPrecision() const {
+    return nodeInfo->knownPrecision;
+  }
+  extLong& knownPrecision() {
+    return nodeInfo->knownPrecision;
+  }
+
+#ifdef CORE_DEBUG
+  const extLong& relPrecision() const {
+    return nodeInfo->relPrecision;
+  }
+  extLong& relPrecision() {
+    return nodeInfo->relPrecision;
+  }
+
+  const extLong& absPrecision() const {
+    return nodeInfo->absPrecision;
+  }
+  extLong& absPrecision() {
+    return nodeInfo->absPrecision;
+  }
+
+  const unsigned long& numNodes() const {
+    return nodeInfo->numNodes;
+  }
+  unsigned long& numNodes() {
+    return nodeInfo->numNodes;
+  }
+#endif
+
+  const extLong& d_e() const {
+    return nodeInfo->d_e;
+  }
+  extLong& d_e() {
+    return nodeInfo->d_e;
+  }
+
+  const bool& visited() const {
+    return nodeInfo->visited;
+  }
+  bool& visited() {
+    return nodeInfo->visited;
+  }
+
+  const int& sign() const {
+    return nodeInfo->sign;
+  }
+  int& sign() {
+    return nodeInfo->sign;
+  }
+
+  const extLong& uMSB() const {
+    return nodeInfo->uMSB;
+  }
+  extLong& uMSB() {
+    return nodeInfo->uMSB;
+  }
+
+  const extLong& lMSB() const {
+    return nodeInfo->lMSB;
+  }
+  extLong& lMSB() {
+    return nodeInfo->lMSB;
+  }
+
+  //  const extLong& length() const { return nodeInfo->length; }
+  //  extLong& length() { return nodeInfo->length; }
+
+  const extLong& measure() const {
+    return nodeInfo->measure;
+  }
+  extLong& measure() {
+    return nodeInfo->measure;
+  }
+
+  const extLong& high() const {
+    return nodeInfo->high;
+  }
+  extLong& high() {
+    return nodeInfo->high;
+  }
+
+  const extLong& low() const {
+    return nodeInfo->low;
+  }
+  extLong& low() {
+    return nodeInfo->low;
+  }
+
+  const extLong& lc() const {
+    return nodeInfo->lc;
+  }
+  extLong& lc() {
+    return nodeInfo->lc;
+  }
+
+  const extLong& tc() const {
+    return nodeInfo->tc;
+  }
+  extLong& tc() {
+    return nodeInfo->tc;
+  }
+
+  const extLong& v2p() const {
+    return nodeInfo->v2p;
+  }
+  extLong& v2p() {
+    return nodeInfo->v2p;
+  }
+
+  const extLong& v2m() const {
+    return nodeInfo->v2m;
+  }
+  extLong& v2m() {
+    return nodeInfo->v2m;
+  }
+
+  extLong v2() const {
+    return v2p()-v2m();
+  }
+
+  const extLong& v5p() const {
+    return nodeInfo->v5p;
+  }
+  extLong& v5p() {
+    return nodeInfo->v5p;
+  }
+
+  const extLong& v5m() const {
+    return nodeInfo->v5m;
+  }
+  extLong& v5m() {
+    return nodeInfo->v5m;
+  }
+
+  extLong v5() const {
+    return v5p()-v5m();
+  }
+
+  const extLong& u25() const {
+    return nodeInfo->u25;
+  }
+  extLong& u25() {
+    return nodeInfo->u25;
+  }
+
+  const extLong& l25() const {
+    return nodeInfo->l25;
+  }
+  extLong& l25() {
+    return nodeInfo->l25;
+  }
+
+  const int& ratFlag() const {
+    return nodeInfo->ratFlag;
+  }
+  int& ratFlag() {
+    return nodeInfo->ratFlag;
+  }
+
+  const BigRat* ratValue() const {
+    return nodeInfo->ratValue;
+  }
+  BigRat*& ratValue() {
+    return nodeInfo->ratValue;
+  }
+
+  /// Get BigFloat
+  BigInt BigIntValue();
+  BigRat BigRatValue();
+  BigFloat BigFloatValue();
+  /// represent as a string in decimal value
+  // toString() Joaquin Grech 31/5/2003
+  std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) {
+    return (getAppValue(get_static_defRelPrec(), get_static_defAbsPrec())).toString(prec,sci);
+  }
+  //@}
+
+  /// \name Debug functions
+  //@{
+  /// dump the contents in this DAG node
+  const std::string dump(int = OPERATOR_VALUE) const;
+  /// print debug information in list mode
+  virtual void debugList(int level, int depthLimit) const = 0;
+  /// print debug information in tree mode
+  virtual void debugTree(int level, int indent, int depthLimit) const = 0;
+  //@}
+
+  /// \name I/O Stream
+  //@{
+  CGAL_CORE_EXPORT friend std::ostream& operator<<(std::ostream&, ExprRep&);
+  //@}
+
+private:
+  int refCount;    // reference count
+
+public:
+  enum {OPERATOR_ONLY, VALUE_ONLY, OPERATOR_VALUE, FULL_DUMP};
+
+  NodeInfo* nodeInfo;	///< node information
+  filteredFp ffVal;	///< filtered value
+
+  /// \name Approximation Functions
+  //@{
+  /// initialize nodeInfo
+  virtual void initNodeInfo() = 0;
+  /// compute the sign, uMSB, lMSB, etc.
+  virtual void computeExactFlags() = 0;
+  /// compute the minimal root bound
+  CGAL_CORE_EXPORT extLong computeBound();
+  /// driver function to approximate
+  CGAL_CORE_EXPORT void approx(const extLong& relPrec, const extLong& absPrec);
+  /// compute an approximate value satifying the specified precisions
+  virtual void computeApproxValue(const extLong&, const extLong&) = 0;
+  /// Test whether the current approx. value satisfies [relPrec, absPrec]
+  CGAL_CORE_EXPORT bool withinKnownPrecision(const extLong&, const extLong&);
+  //@}
+
+  /// \name Misc Functions
+  //@{
+  /// reduce current node
+  CGAL_CORE_EXPORT void reduceToBigRat(const BigRat&);
+  /// reduce current node
+  CGAL_CORE_EXPORT void reduceTo(const ExprRep*);
+  /// reduce current node to zero
+  CGAL_CORE_EXPORT void reduceToZero();
+  /// return operator string
+  virtual const std::string op() const {
+    return "UNKNOWN";
+  }
+  //@}
+
+  /// \name Degree Bound Functions
+  //@{
+  /// compute "d_e" based on # of sqrts
+  CGAL_CORE_EXPORT extLong degreeBound();
+  /// count actually computes the degree bound of current node.
+  virtual extLong count() = 0;
+  /// reset the flag "visited"
+  virtual void clearFlag() = 0;
+  //@}
+#ifdef CORE_DEBUG
+  virtual unsigned long dagSize() = 0;
+  virtual void fullClearFlag() = 0;
+#endif
+};//ExprRep
+
+/// \class ConstRep
+/// \brief constant node
+class ConstRep : public ExprRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  ConstRep() {}
+  /// destructor
+  virtual ~ConstRep() {}
+  //@}
+
+  /// \name Debug Functions
+  //@{
+  /// print debug information in list mode
+  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
+  /// print debug information in tree mode
+  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
+  //@}
+protected:
+  /// initialize nodeInfo
+  CGAL_CORE_EXPORT virtual void initNodeInfo();
+  /// return operator in string
+  const std::string op() const {
+    return "C";
+  }
+  /// count returns the degree of current node
+  //extLong count() { return d_e(); }
+  CGAL_CORE_EXPORT extLong count();
+  /// clear visited flag
+  void clearFlag() {
+    visited() = false;
+  }
+#ifdef CORE_DEBUG
+  unsigned long dagSize();
+  void fullClearFlag();
+#endif
+};
+
+/// \class ConstDoubleRep
+/// \brief constant node
+class ConstDoubleRep : public ConstRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  ConstDoubleRep() {}
+  /// constructor for all \c double type
+  ConstDoubleRep(double d) {
+    ffVal = d;
+  }
+  /// destructor
+  ~ConstDoubleRep() {}
+  //@}
+  CGAL_CORE_EXPORT CORE_NEW(ConstDoubleRep)
+  CGAL_CORE_EXPORT CORE_DELETE(ConstDoubleRep)
+protected:
+  /// compute sign and MSB
+  CGAL_CORE_EXPORT void computeExactFlags();
+  /// compute approximation value
+  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
+};
+
+/// \class ConstRealRep
+/// \brief constant node
+class ConstRealRep : public ConstRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  ConstRealRep() : value(CORE_REAL_ZERO) { }
+  /// constructor for all \c Real type
+  CGAL_CORE_EXPORT ConstRealRep(const Real &);
+  /// destructor
+  ~ConstRealRep() {}
+  //@}
+  CGAL_CORE_EXPORT CORE_NEW(ConstRealRep)
+  CGAL_CORE_EXPORT CORE_DELETE(ConstRealRep)
+private:
+  Real value; ///< internal representation of node
+protected:
+  /// compute sign and MSB
+  void computeExactFlags();
+  /// compute approximation value
+  void computeApproxValue(const extLong&, const extLong&);
+};
+
+/// \class Constant Polynomial Node
+/// \brief template class where NT is supposed to be some number type
+template <class NT>
+class ConstPolyRep : public ConstRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// default constructor
+  ConstPolyRep() { }
+
+  /// constructor for Polynomial
+  ConstPolyRep(const Polynomial<NT>& p, int n) : ss(p) {
+    // isolate roots using Sturm Sequences
+    I = ss.isolateRoot(n);
+    // check whether n-th root exists
+    if (I.first == 1 && I.second == 0) {
+      core_error("CORE ERROR! root index out of bound",
+		      __FILE__, __LINE__, true);
+      abort();
+    }
+    // test if the root isolated in I is 0:
+    if ((I.first == 0)&&(I.second == 0))
+      ffVal = 0;
+    else
+      ffVal = computeFilteredValue();	// silly to use a filter here!
+    					// since sign is known.
+  }
+
+  /// constructor for Polynomial
+  ConstPolyRep(const Polynomial<NT>& p, const BFInterval& II)
+	  : ss(p), I(II) {
+    BFVecInterval v;
+    ss.isolateRoots(I.first, I.second, v);
+    I = v.front();
+    if (v.size() != 1) {
+      core_error("CORE ERROR! non-isolating interval",
+		      __FILE__, __LINE__, true);
+      abort();
+    }
+    ffVal = computeFilteredValue(); // Chee: this line seems unnecessary
+  }
+
+  /// destructor
+  ~ConstPolyRep() {}
+  //@}
+  
+  CGAL_CORE_EXPORT void *operator new( size_t size){
+    return MemoryPool<ConstPolyRep>::global_allocator().allocate(size);
+  }
+ 
+   CGAL_CORE_EXPORT void operator delete( void *p, size_t ){
+    MemoryPool<ConstPolyRep>::global_allocator().free(p);
+  }
+
+private:
+  Sturm<NT> ss; ///< internal Sturm sequences
+  BFInterval I; ///< current interval contains the real value
+  		// IMPORTANT: I.first and I.second are exact BigFloats
+  filteredFp computeFilteredValue() {
+    // refine initial interval to absolute error of 2^(lMSB(k)-54) where
+    // 	  k is a lower bound on the root (use Cauchy Lower Bound).
+    //    Hence, the precision we pass to refine should be 54-lMSB(k).
+
+    // refine with newton (new method)
+    // ss.seq[0] could be zero!!
+    // I=ss.newtonRefine(I,
+    //            54-(ss.seq[0].CauchyLowerBound()).lMSB().asLong());
+    extLong lbd = ss.seq[0].CauchyLowerBound().lMSB();
+
+    if (lbd.isTiny())
+      I = ss.newtonRefine(I, 54);
+    else
+      I = ss.newtonRefine(I, 54-lbd.asLong()); // is this necessary?
+
+    //return I.first.doubleValue(); // NOTE:  This is not quite right!
+    // It should be "centralized" to set
+    // the error bit correctly.
+    // E.g., otherwise, radical(4,2) will print wrongly.
+    if ((I.first == 0) && (I.second == 0))	// Checkfor zero value
+      return filteredFp(0);
+    BigFloat x = centerize(I.first, I.second);
+    double val = x.doubleValue();
+    double max = core_max(core_abs(I.first), core_abs(I.second)).doubleValue();
+    int ind = 1;
+    /*
+    long ee = x.exp()*CHUNK_BIT;
+    unsigned long err = ee > 0 ? (x.err() << ee) : (x.err() >> (-ee));
+    double max = core_abs(val) + err;
+    int ind = longValue((BigInt(x.err()) << 53) / (x.m() + x.err())); 
+    */
+    return filteredFp(val, max, ind); // Aug 8, 2004, Comment from Chee:
+       // I think we should get rid of filters here!  Given the interval I,
+       // we either know the sign (I.first >=0) or (I.second <=0)
+       // or we don't.  We don't need to compute all the index stuff.
+       // In fact, you have lost the sign in the above computation...
+       // ALSO, why bother to use filter?
+  }//computeFilteredValue
+
+protected:
+  void initNodeInfo() {
+    nodeInfo = new NodeInfo();
+    d_e() = ss.seq[0].getTrueDegree(); // return degree of the polynomial
+  }
+  /// compute sign and MSB
+  void computeExactFlags() {
+
+    if ((I.first == 0) && (I.second == 0)) {
+      reduceToZero();
+      return;
+    } else if (I.second > 0) {
+      uMSB() = I.second.uMSB();
+      lMSB() = I.first.lMSB();
+      sign() = 1;
+    } else { // we know that I.first < 0
+      lMSB() = I.second.lMSB();
+      uMSB() = I.first.uMSB();
+      sign() = -1;
+    }
+    // length() = 1+ ss.seq[0].length().uMSB();
+    measure() = 1+ ss.seq[0].length().uMSB();	// since measure<= length
+
+    // compute u25, l25, v2p, v2m, v5p, v5m
+    v2p() = v2m() = v5p() = v5m() = 0;
+    u25() = 1+ss.seq[0].CauchyUpperBound().uMSB();
+    l25() = ceilLg(ss.seq[0].getLeadCoeff());  // assumed coeff is integer!!
+    		// ceilLg(BigInt) and ceilLg(Expr) are defined. But if
+    		// NT=int, ceilLg(int) is ambiguous!  Added ceilLg(int)
+		// under BigInt.h
+
+    // compute high, low, lc, tc
+    high() = u25();
+    low() = - (ss.seq[0].CauchyLowerBound().lMSB()); // note the use of negative
+    lc() = l25();
+    tc() = ceilLg(ss.seq[0].getTailCoeff());
+
+    // no rational reduction
+    if (get_static_rationalReduceFlag())
+      ratFlag() = -1;
+
+    flagsComputed() = true;
+    appValue()=centerize(I.first, I.second);// set an initial value for appValue
+  }
+  /// compute approximation value
+  void computeApproxValue(const extLong& relPrec, const extLong& absPrec) {
+    extLong pr = -lMSB() + relPrec;
+    extLong p = pr < absPrec ? pr : absPrec;
+
+    // bisection sturm (old method)
+    //I = ss.refine(I, p.asLong()+1);
+
+    // refine with newton (new method)
+    I = ss.newtonRefine(I, p.asLong()+1);
+    appValue() = centerize(I.first, I.second);
+  }
+};
+
+
+/// \class UnaryOpRep
+/// \brief unary operator node
+class UnaryOpRep : public ExprRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  UnaryOpRep(ExprRep* c) : child(c)  {
+    child->incRef();
+  }
+  /// destructor
+  virtual ~UnaryOpRep() {
+    child->decRef();
+  }
+  //@}
+
+  /// \name Debug Functions
+  //@{
+  /// print debug information in list mode
+  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
+  /// print debug information in tree mode
+  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
+  //@}
+protected:
+  ExprRep* child; ///< pointer to its child node
+  /// initialize nodeInfo
+  CGAL_CORE_EXPORT virtual void initNodeInfo();
+  /// clear visited flag
+  CGAL_CORE_EXPORT void clearFlag();
+#ifdef CORE_DEBUG
+  unsigned long dagSize();
+  void fullClearFlag();
+#endif
+};
+
+/// \class NegRep
+/// \brief unary minus operator node
+class NegRep : public UnaryOpRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  NegRep(ExprRep* c) : UnaryOpRep(c) {
+    ffVal = - child->ffVal;
+  }
+  /// destructor
+  ~NegRep() {}
+  //@}
+
+  CGAL_CORE_EXPORT CORE_NEW(NegRep)
+  CGAL_CORE_EXPORT CORE_DELETE(NegRep)
+protected:
+  /// compute sign and MSB
+  CGAL_CORE_EXPORT void computeExactFlags();
+  /// compute approximation value
+  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
+  /// return operator in string
+  const std::string op() const {
+    return "Neg";
+  }
+  /// count computes the degree of current node, i.e., d_e().
+  /** This is now a misnomer, but historically accurate.
+   */
+  CGAL_CORE_EXPORT extLong count();
+};
+
+/// \class SqrtRep
+/// \brief squartroot operator node
+class SqrtRep : public UnaryOpRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  SqrtRep(ExprRep* c) : UnaryOpRep(c) {
+    ffVal = (child->ffVal).sqrt();
+  }
+  /// destructor
+  ~SqrtRep() {}
+  //@}
+
+  CGAL_CORE_EXPORT CORE_NEW(SqrtRep)
+  CGAL_CORE_EXPORT CORE_DELETE(SqrtRep)
+protected:
+  /// compute sign and MSB
+  CGAL_CORE_EXPORT void computeExactFlags();
+  /// compute approximation value
+  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
+  /// return operator in string
+  const std::string op() const {
+    return "Sqrt";
+  }
+  /// count computes the degree of current node, i.e., d_e().
+  /** This is now a misnomer, but historically accurate.
+   */
+  CGAL_CORE_EXPORT extLong count();
+};
+
+/// \class BinOpRep
+/// \brief binary operator node
+class BinOpRep : public ExprRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  BinOpRep(ExprRep* f, ExprRep* s) : first(f), second(s) {
+    first->incRef();
+    second->incRef();
+  }
+  /// destructor
+  virtual ~BinOpRep() {
+    first->decRef();
+    second->decRef();
+  }
+  //@}
+
+  /// \name Debug Functions
+  //@{
+  /// print debug information in list mode
+  CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const;
+  /// print debug information in tree mode
+  CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const;
+  //@}
+protected:
+  ExprRep* first;  ///< first operand
+  ExprRep* second; ///< second operand
+
+  /// initialize nodeInfo
+  CGAL_CORE_EXPORT virtual void initNodeInfo();
+  /// clear visited flags
+  CGAL_CORE_EXPORT void clearFlag();
+  /// count computes the degree of current node, i.e., d_e().
+  /** This is now a misnomer, but historically accurate.
+   */
+  CGAL_CORE_EXPORT extLong count();
+#ifdef CORE_DEBUG
+  CGAL_CORE_EXPORT unsigned long dagSize();
+  CGAL_CORE_EXPORT void fullClearFlag();
+#endif
+};
+
+/// \struct Add
+/// \brief "functor" class used as parameter to AddSubRep<>
+struct Add {
+  /// name
+#ifndef CGAL_HEADER_ONLY
+  CGAL_CORE_EXPORT static const char* name;
+#endif
+  static const char* get_name() {
+    return "+";
+  }
+
+  /// unary operator
+  template <class T>
+  const T& operator()(const T& t) const {
+    return t;
+  }
+
+  /// binary operator
+  template <class T>
+  T operator()(const T& a, const T& b) const {
+    return a+b;
+  }
+};
+
+/// \struct Sub
+/// \brief "functor" class used as parameter to AddSubRep<>
+struct Sub {
+  /// name
+#ifndef CGAL_HEADER_ONLY
+  CGAL_CORE_EXPORT static const char* name;
+#endif
+  static const char* get_name() {
+    return "-";
+  }
+
+  /// unary operator
+  template <class T>
+  T operator()(const T& t) const {
+    return -t;
+  }
+
+  /// binary operator
+  template <class T>
+  T operator()(const T& a, const T& b) const {
+    return a-b;
+  }
+};
+
+/// \class AddSubRep
+/// \brief template class where operator is supposed to be Add or Sub
+template <class Operator>
+class AddSubRep : public BinOpRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  AddSubRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
+    ffVal = Op(first->ffVal, second->ffVal);
+  }
+  /// destructor
+  ~AddSubRep() {}
+  //@}
+
+  CGAL_CORE_EXPORT CORE_NEW(AddSubRep)
+  CGAL_CORE_EXPORT CORE_DELETE(AddSubRep)
+protected:
+  /// compute sign and MSB
+   void computeExactFlags();
+  /// compute approximation value
+   void computeApproxValue(const extLong&, const extLong&);
+  /// return operator in string
+  const std::string op() const {
+    return Operator::get_name();
+  }
+private:
+  static Operator Op;
+};//AddSubRep class
+
+template <class Operator>
+Operator AddSubRep<Operator>::Op;
+
+  /// AddSubRep<Op>::computeExactFlags()
+  ///     This function is the heart of Expr class,
+  ///     and hence the heart of Core Library!
+  /// Here is where we use the root bounds.
+template <class Operator>
+void AddSubRep<Operator>::computeExactFlags() {
+  if (!first->flagsComputed())
+    first->computeExactFlags();
+  if (!second->flagsComputed())
+    second->computeExactFlags();
+
+  int sf = first->sign();
+  int ss = second->sign();
+
+  if ((sf == 0) && (ss == 0)) { // the node is zero
+    reduceToZero();
+    return;
+  } else if (sf == 0) { // first operand is zero
+    reduceTo(second);
+    sign() = Op(ss);
+    appValue() = Op(appValue());
+    if (get_static_rationalReduceFlag() && ratFlag() > 0)
+      *(ratValue()) = Op(*(ratValue()));
+    return;
+  } else if (ss == 0) { // second operand is zero
+    reduceTo(first);
+    return;
+  }
+  // rational node
+  if (get_static_rationalReduceFlag()) {
+    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
+      BigRat val=Op(*(first->ratValue()), *(second->ratValue()));
+      reduceToBigRat(val);
+      ratFlag() = first->ratFlag() + second->ratFlag();
+      return;
+    } else
+      ratFlag() = -1;
+  }
+
+  // neither operand is zero
+  extLong df    = first->d_e();
+  extLong ds    = second->d_e();
+  // extLong md    = df < ds ? df : ds;
+  // extLong l1    = first->length();
+  // extLong l2    = second->length();
+  extLong m1    = first->measure();
+  extLong m2    = second->measure();
+
+  // length() = df * l2 + ds * l1 + d_e() + md;
+  measure() = m1 * ds + m2 * df + d_e();
+
+  // BFMSS[2,5] bound.
+  v2p() = core_min(first->v2p() + second->v2m(),
+		  first->v2m() + second->v2p());
+  v2m() = first->v2m() + second->v2m();
+  v5p() = core_min(first->v5p() + second->v5m(),
+		  first->v5m() + second->v5p());
+  v5m() = first->v5m() + second->v5m();
+
+  if (v2p().isInfty() || v5p().isInfty())
+    u25() = CORE_INFTY;
+  else
+    u25() = EXTLONG_ONE + core_max(first->v2p() + second->v2m()
+	    - v2p() + ceilLg5(first->v5p() + second->v5m() - v5p())
+            + first->u25() + second->l25(),
+                                   first->v2m() + second->v2p() - v2p()
+            + ceilLg5(first->v5m() + second->v5p() - v5p())
+            + first->l25() + second->u25());
+  l25() = first->l25() + second->l25();
+
+  lc() = ds * first->lc() + df * second->lc();
+  tc() = measure();
+
+  high() = core_max(first->high(),second->high())+EXTLONG_ONE;
+  // The following is a subset of the minimization in computeBound().
+  low() = core_min(measure(), (d_e()-EXTLONG_ONE)*high() + lc());
+
+  extLong lf = first->lMSB();
+  extLong ls = second->lMSB();
+  extLong uf = first->uMSB();
+  extLong us = second->uMSB();
+
+  extLong l  = core_max(lf, ls);
+  extLong u  = core_max(uf, us);
+
+#ifdef CORE_TRACE
+  std::cout << "INSIDE Add/sub Rep: " << std::endl;
+#endif
+
+  if (Op(sf, ss) != 0) {     // can't possibly cancel out
+#ifdef CORE_TRACE
+    std::cout << "Add/sub Rep:  Op(sf, ss) non-zero" << std::endl;
+#endif
+
+    uMSB() = u + EXTLONG_ONE;
+    lMSB() = l;            // lMSB = core_min(lf, ls)+1 better
+    sign() = sf;
+  } else {               // might cancel out
+#ifdef CORE_TRACE
+    std::cout << "Add/sub Rep:  Op(sf, ss) zero" << std::endl;
+#endif
+
+    uMSB() = u + EXTLONG_ONE;
+    uMSB() = u;
+    if (lf >= us + EXTLONG_TWO) {// one is at least 1 order of magnitude larger
+#ifdef CORE_TRACE
+      std::cout << "Add/sub Rep:  Can't cancel" << std::endl;
+#endif
+
+      lMSB() = lf - EXTLONG_ONE;     // can't possibly cancel out
+      sign() = sf;
+    } else if (ls >= uf + EXTLONG_TWO) {
+#ifdef CORE_TRACE
+      std::cout << "Add/sub Rep:  Can't cancel" << std::endl;
+#endif
+
+      lMSB() = ls - EXTLONG_ONE;
+      sign() = Op(ss);
+    } else if (ffVal.isOK()) {// begin filter computation
+#ifdef CORE_TRACE
+      std::cout << "Add/sub Rep:  filter used" << std::endl;
+#endif
+#ifdef CORE_DEBUG_FILTER
+      std::cout << "call filter in " << op() << "Rep" << std::endl;
+#endif
+      sign() = ffVal.sign();
+      lMSB() = ffVal.lMSB();
+      uMSB() = ffVal.uMSB();
+    } else {			// about the same size, might cancel out
+#ifdef CORE_TRACE
+      std::cout << "Add/sub Rep:  iteration start" << std::endl;
+#endif
+
+      extLong lowBound = computeBound();
+      /* Zilin 06/11/2003
+       * as BFMSS[2] might be a negative number, lowBound can be negative.
+       * In this case, we just set it to 1 since we need at least one bit
+       * to get the sign.  In the future, we may need to improve this.
+       */
+      if (lowBound <= EXTLONG_ZERO)
+        lowBound = EXTLONG_ONE;
+
+      if (!get_static_progressiveEvalFlag()) {
+        // convert the absolute error requirement "lowBound" to
+        // a relative error requirement "ur", s.t.
+        //    |x|*2^(-ur) <= 2^(-lowBound).
+        // ==> r >= a + lg(x) >= a + (uMSB + 1);
+        //	    extLong  rf = lowBound + (uf + 1);
+        //	    extLong  rs = lowBound + (us + 1);
+        //	    first->approx(rf, CORE_INFTY);
+        //	    second->approx(rs, CORE_INFTY);
+        // Chen: considering the uMSB is also an approximate bound.
+        // we choose to use absolute precision up-front.
+        Real newValue = Op(first->getAppValue(CORE_INFTY,
+				lowBound + EXTLONG_ONE),
+                           second->getAppValue(CORE_INFTY,
+				   lowBound + EXTLONG_ONE));
+        if (!newValue.isZeroIn()) { // Op(first, second) != 0
+          lMSB() = newValue.lMSB();
+          uMSB() = newValue.uMSB();   // chen: to get tighers value.
+          sign() = newValue.sign();
+        } else if (lowBound.isInfty()) {//check if rootbound is too big
+          core_error("AddSubRep:root bound has exceeded the maximum size\n \
+            but we still cannot decide zero.\n", __FILE__, __LINE__, false);
+        } else {               // Op(first, second) == 0
+          lMSB() = CORE_negInfty;
+          sign() = 0;
+        }
+      } else {  // else do progressive evaluation
+#ifdef CORE_TRACE
+        std::cout << "Add/sub Rep:  progressive eval" << std::endl;
+#endif
+        // Oct 30, 2002: fixed a bug here!  Old versions used relative
+        // precision bounds, but one should absolute precision for addition!
+        // Moreover, this is much more efficient.
+
+        // ua is the upper bound on the absolute precision in our iteration
+	// Chee, Aug 8, 2004: it is important that ua be strictly
+	//     larger than lowBound AND the defaultInitialProgressivePrec,
+	//     so that we do at least one iteration of the for-loop. So:
+	// i is the variable for iteration.
+        extLong i = core_min(get_static_defInitialProgressivePrec(), lowBound.asLong());
+        extLong ua = lowBound.asLong() + EXTLONG_ONE;
+        //   NOTE: ua is allowed to be CORE_INFTY
+	
+#ifdef CORE_DEBUG_BOUND
+        std::cout << "DebugBound:" << "ua = " << ua << std::endl;
+#endif
+        // We initially set the lMSB and sign as if the value is zero:
+        lMSB() = CORE_negInfty;
+        sign() = 0;
+
+        get_static_EscapePrecFlag() = 0;	// reset the Escape Flag
+
+        // Now we try to determine the real lMSB and sign,
+        // in case it is not really zero:
+#ifdef CORE_TRACE
+        std::cout << "Upper bound (ua) for iteration is " << ua << std::endl;
+	std::cout << "Starting iteration at i = " << i << std::endl;
+#endif
+
+        for ( ; i<ua; i*=EXTLONG_TWO) {
+          // relative bits = i
+	  //
+	  // PROBLEM WITH NEXT LINE: you must ensure that
+	  // first and second are represented by BigFloats...
+	  //
+          Real newValue = Op(first->getAppValue(CORE_INFTY, i),
+                             second->getAppValue(CORE_INFTY, i));
+
+#ifdef CORE_TRACE
+	  if (newValue.getRep().ID() == REAL_BIGFLOAT) 
+	  std::cout << "BigFloat! newValue->rep->ID() = "
+		  << newValue.getRep().ID() << std::endl;
+	  else 
+	  std::cout << "ERROR, Not BigFloat! newValue->rep->ID() ="
+		  << newValue.getRep().ID() << std::endl;
+	  std::cout << "newValue = Op(first,second) = "
+		  << newValue << std::endl;
+	  std::cout << "first:appVal, appComputed, knownPrec, sign ="
+		  << first->appValue() << ","
+		  << first->appComputed() << ","
+		  << first->knownPrecision() << ","
+		  << first->sign() << std::endl;
+	  std::cout << "second:appVal, appComputed, knownPrec, sign ="
+		  << second->appValue() << ","
+		  << second->appComputed() << ","
+		  << second->knownPrecision() << ","
+		  << second->sign() << std::endl;
+#endif
+          if (!newValue.isZeroIn()) {   // Op(first, second) != 0
+            lMSB() = newValue.lMSB();
+            uMSB() = newValue.uMSB();
+            sign() = newValue.sign();
+#ifdef CORE_DEBUG_BOUND
+            std::cout << "DebugBound(Exit Loop): " << "i=" << i << std::endl;
+#endif
+#ifdef CORE_TRACE
+	    std::cout << "Zero is not in, lMSB() = " << lMSB()
+		    << ", uMSB() = " << uMSB()
+		    << ", sign() = " << sign() << std::endl;
+	    std::cout << "newValue = " << newValue << std::endl;
+#endif
+
+            break; // assert -- this must happen in the loop if nonzero!
+          }
+          //8/9/01, Chee: implement escape precision here:
+          if (i> get_static_EscapePrec()) {
+            get_static_EscapePrecFlag() = -i.asLong();//negative means EscapePrec is used
+	    core_error("Escape precision triggered at",
+            		 __FILE__, __LINE__, false);
+            if (get_static_EscapePrecWarning())
+              std::cout<< "Escape Precision triggered at "
+		      << get_static_EscapePrec() << " bits" << std::endl;
+#ifdef CORE_DEBUG
+            std::cout << "EscapePrecFlags=" << get_static_EscapePrecFlag() << std::endl;
+            std::cout << "ua =" << ua  << ",lowBound=" << lowBound << std::endl;
+#endif
+            break;
+          }// if
+        }// for (long i=1...)
+
+#if defined(CORE_DEBUG_BOUND) && !defined(CGAL_HEADER_ONLY)
+        rootBoundHitCounter++;
+#endif
+
+        if (sign() == 0 && ua .isInfty()) {
+          core_error("AddSubRep: root bound has exceeded the maximum size\n \
+            but we still cannot decide zero.\n", __FILE__, __LINE__, true);
+        } // if (sign == 0 && ua .isInfty())
+      }// else do progressive
+    }
+  }
+  flagsComputed() = true;
+}// AddSubRep::computeExactFlags
+
+template <class Operator>
+void AddSubRep<Operator>::computeApproxValue(const extLong& relPrec,
+    const extLong& absPrec) {
+  // Nov 13, 2002: added the analog of "reduceTo(first)" and "reduceTo(second)"
+  //  that is found in computeExactFlags.  This is more efficient, but
+  //  it also removes a NaN warning in subsequent logic!
+  //  E.g., if first=0, then first->uMSB and first->lMSB are -infty, and
+  //  subtracting them creates NaN.  Chee and Zilin.
+  if (first->sign() == 0) {
+    appValue() = Op(second->getAppValue(relPrec, absPrec));
+    return;
+  }
+  if (second->sign() == 0) {
+    appValue() = first->getAppValue(relPrec, absPrec);
+    return;
+  }
+  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
+    extLong rf = first->uMSB()-lMSB()+relPrec+EXTLONG_FOUR;  // 2 better
+    if (rf < EXTLONG_ZERO)
+      rf = EXTLONG_ZERO;  // from Koji's thesis P63: Proposition 26
+    extLong rs = second->uMSB()-lMSB()+relPrec+EXTLONG_FOUR; // 2 better
+    if (rs < EXTLONG_ZERO)
+      rs = EXTLONG_ZERO;  // from Koji's thesis P63: Proposition 26
+    extLong  a  = absPrec + EXTLONG_THREE;                      // 1 better
+    appValue() = Op(first->getAppValue(rf, a), second->getAppValue(rs, a));
+  } else {
+    std::cerr << "lMSB = " << lMSB() << std::endl; // should be in core_error
+    core_error("CORE WARNING: a huge lMSB in AddSubRep",
+	 	__FILE__, __LINE__, false);
+  }
+}
+
+/// \typedef AddRep
+/// \brief AddRep for easy of use
+typedef AddSubRep<Add> AddRep;
+
+/// \typedef SubRep
+/// \brief SuRep for easy of use
+typedef AddSubRep<Sub> SubRep;
+
+/// \class MultRep
+/// \brief multiplication operator node
+class MultRep : public BinOpRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  MultRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
+    ffVal = first->ffVal * second->ffVal;
+  }
+  /// destructor
+  ~MultRep() {}
+  //@}
+  
+  CGAL_CORE_EXPORT CORE_NEW(MultRep)
+  CGAL_CORE_EXPORT CORE_DELETE(MultRep)
+  protected:
+  /// compute sign and MSB
+  CGAL_CORE_EXPORT void computeExactFlags();
+  /// compute approximation value
+  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
+  /// return operator in string
+  const std::string op() const {
+    return "*";
+  }
+};
+
+/// \class DivRep
+/// \brief division operator node
+class DivRep : public BinOpRep {
+public:
+  /// \name Constructors and Destructor
+  //@{
+  /// constructor
+  DivRep(ExprRep* f, ExprRep* s) : BinOpRep(f, s) {
+    ffVal = first->ffVal / second->ffVal;
+  }
+  /// destructor
+  ~DivRep() {}
+  //@}
+
+  CGAL_CORE_EXPORT CORE_NEW(DivRep)
+  CGAL_CORE_EXPORT CORE_DELETE(DivRep)
+protected:
+  /// compute sign and MSB
+  CGAL_CORE_EXPORT void computeExactFlags();
+  /// compute approximation value
+  CGAL_CORE_EXPORT void computeApproxValue(const extLong&, const extLong&);
+  /// return operator in string
+  const std::string op() const {
+    return "/";
+  }
+};
+
+// inline functions
+inline int ExprRep::getExactSign() {
+  if (!nodeInfo)
+    initNodeInfo();
+
+  if (!flagsComputed()) {
+    degreeBound();
+#ifdef CORE_DEBUG
+    dagSize();
+    fullClearFlag();
+#endif
+    computeExactFlags();
+  }
+  return sign();
+}
+
+// Chee, 7/17/02: degreeBound() function is now
+// taken out of "computeExactFlags()
+inline int ExprRep::getSign() {
+  if (ffVal.isOK())
+    return ffVal.sign();
+  else
+    return getExactSign();
+}
+
+// you need force to approximate before call these functions!!
+inline BigInt ExprRep::BigIntValue() {
+  return getAppValue().BigIntValue();
+}
+
+inline BigRat ExprRep::BigRatValue() {
+  return getAppValue().BigRatValue();
+}
+
+inline BigFloat ExprRep::BigFloatValue() {
+  return getAppValue().BigFloatValue();
+}
+
+} //namespace CORE
+#endif // _CORE_EXPRREP_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr_impl.h
new file mode 100644
index 0000000..5cd7a68
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Expr_impl.h
@@ -0,0 +1,1255 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Expr.cpp
+ *
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/CORE/Expr.h>
+#include <cmath>
+
+namespace CORE { 
+
+#if defined(CORE_DEBUG_BOUND) && !defined(CGAL_HEADER_ONLY)
+unsigned int BFMSS_counter = 0;
+unsigned int BFMSS_only_counter = 0;
+unsigned int Measure_counter = 0;
+unsigned int Measure_only_counter = 0;
+unsigned int Cauchy_counter = 0;
+unsigned int Cauchy_only_counter = 0;
+unsigned int LiYap_counter = 0;
+unsigned int LiYap_only_counter = 0;
+unsigned int rootBoundHitCounter = 0;
+unsigned int computeBoundCallsCounter = 0;
+#endif
+
+#ifndef CGAL_HEADER_ONLY
+const char* Add::name = "+";
+const char* Sub::name = "-";
+#endif
+
+/********************************************************
+ *  class Expr
+ ********************************************************/
+CGAL_INLINE_FUNCTION
+const Expr& Expr::getZero() {
+  static Expr Zero(0);
+  return Zero;
+}
+CGAL_INLINE_FUNCTION
+const Expr& Expr::getOne() {
+  static Expr One(1);
+  return One;
+}
+
+// computes an interval comprising a pair of doubles
+// Note:
+//
+// This function returns are two consecutive representable binary
+// IEEE double values whichs contain the real value, but when you print out
+// them, you might be confused by the decimal represention due to round.
+//
+CGAL_INLINE_FUNCTION
+void Expr::doubleInterval(double & lb, double & ub) const {
+  double d = doubleValue();
+  if (! CGAL_CORE_finite(d)) {	// if overflow, underflow or NaN
+    lb = ub = d;
+    return;
+  }
+  int sign = ((* this) -Expr(d)).sign();
+  // Seems like doubleValue() always give a lower bound,
+  // 	so sign = 0 or 1 (never -1).
+  //std::cout << "Sign = " << sign << std::endl;
+  if (sign == 0) {
+    lb = ub = d;
+    return;
+  }
+  int exp;
+  frexp(d, & exp);  	// get the exponent of d
+  exp--;		// the exp from frexp satisfies
+  //     2^{exp-1} <= d < 2^{exp}
+  // But, we want exp to satisfy
+  //     2^{exp} <= d < 2^{exp+1}
+  if (sign > 0) {
+    lb = d;
+    ub = d + ldexp(1.0, -52+exp);
+    return;
+  } else {
+    ub = d;
+    lb = d - ldexp(1.0, -52+exp);
+    return;
+  }
+}
+
+// floor(e, sub) returns the floor(e), and puts the
+//      remainder into sub.
+CGAL_INLINE_FUNCTION
+BigInt floor(const Expr& e, Expr &sub) {
+  if (e==0) {
+	  return 0;
+  }
+  BigInt f = e.approx(CORE_INFTY, 2).BigIntValue();
+  sub = e-f;
+  // Adjustment
+  if (sub<0)
+    ++sub, --f;
+  if (sub>=1)
+    --sub, ++f;
+  assert(sub >=0 && sub<1); // got an assertion error? (Chee 3/24/04)
+  return f;
+}
+
+// Chenli: implemented algorithm from Goldberg's article.
+// 7/01: Thanks to Serge Pashkov for fixing infinite loop when n=0.
+CGAL_INLINE_FUNCTION
+Expr pow(const Expr& e, unsigned long n) {
+  if (n == 0)
+    return Expr(1);
+  else if (n == 1)
+    return e;
+  else {
+    Expr x = e;
+    while ((n % 2) == 0) { // n is even
+      x *= x;
+      n >>= 1;
+    }
+    Expr u = x;
+    while (true) {
+      n >>= 1;
+      if (n == 0)
+        return u;
+      x *= x;
+      if ((n % 2) == 1) // n is odd
+        u *= x;
+    }
+    //return u; // unreachable
+  }
+}//pow
+
+CGAL_INLINE_FUNCTION
+NodeInfo::NodeInfo() : appValue(CORE_REAL_ZERO), appComputed(false),
+    flagsComputed(false), knownPrecision(CORE_negInfty),
+#ifdef CORE_DEBUG
+    relPrecision(EXTLONG_ZERO), absPrecision(CORE_negInfty), numNodes(0),
+#endif
+    // Most of the following data members don't need to be
+    // initialized here.
+    d_e(EXTLONG_ZERO), visited(false), sign(0),
+    uMSB(CORE_negInfty), lMSB(CORE_negInfty),
+    // length(0),
+    measure(EXTLONG_ZERO), high(EXTLONG_ZERO), low(EXTLONG_ONE),
+    lc(EXTLONG_ZERO), tc(EXTLONG_ZERO),
+    v2p(EXTLONG_ZERO), v2m(EXTLONG_ZERO),
+    v5p(EXTLONG_ZERO), v5m(EXTLONG_ZERO),
+    u25(EXTLONG_ZERO), l25(EXTLONG_ZERO),
+    ratFlag(0), ratValue(NULL) { }
+
+/********************************************************
+ *  class ExprRep
+ ********************************************************/
+//  constructor
+CGAL_INLINE_FUNCTION
+ExprRep::ExprRep() : refCount(1), nodeInfo(NULL), ffVal(0.0) { }
+
+// Computes the root bit bound of the expression.
+// In effect, computeBound() returns the current value of low.
+CGAL_INLINE_FUNCTION
+extLong ExprRep::computeBound() {
+  extLong measureBd = measure();
+  // extLong cauchyBd = length();
+  extLong ourBd = (d_e() - EXTLONG_ONE) * high() + lc();
+  // BFMSS[2,5] bound.
+  extLong bfmsskBd;
+  if (v2p().isInfty() || v2m().isInfty())
+    bfmsskBd = CORE_INFTY;
+  else
+    bfmsskBd = l25() + u25() * (d_e() - EXTLONG_ONE) - v2() - ceilLg5(v5());
+
+  // since we might compute \infty - \infty for this bound
+  if (bfmsskBd.isNaN())
+    bfmsskBd = CORE_INFTY;
+
+  extLong bd = core_min(measureBd,
+                        // core_min(cauchyBd,
+                        core_min(bfmsskBd, ourBd));
+#ifdef CORE_SHOW_BOUNDS
+    std::cout << "Bounds (" << measureBd <<
+                    "," << bfmsskBd << ", " << ourBd << "),  ";
+    std::cout << "MIN = " << bd << std::endl;
+    std::cout << "d_e= " << d_e() << std::endl;
+#endif
+
+#if defined(CORE_DEBUG_BOUND) && !defined(CGAL_HEADER_ONLY)
+  // Some statistics about which one is/are the winner[s].
+  computeBoundCallsCounter++;
+  int number_of_winners = 0;
+  std::cerr << " New contest " << std::endl;
+  if (bd == bfmsskBd) {
+    BFMSS_counter++;
+    number_of_winners++;
+    std::cerr << " BFMSS is the winner " << std::endl;
+  }
+  if (bd == measureBd) {
+    Measure_counter++;
+    number_of_winners++;
+    std::cerr << " measureBd is the winner " << std::endl;
+  }
+  /*  if (bd == cauchyBd) {
+      Cauchy_counter++;
+      number_of_winners++;
+      std::cerr << " cauchyBd is the winner " << std::endl;
+    }
+   */
+  if (bd == ourBd) {
+    LiYap_counter++;
+    number_of_winners++;
+    std::cerr << " ourBd is the winner " << std::endl;
+  }
+
+  assert(number_of_winners >= 1);
+
+  if (number_of_winners == 1) {
+    if (bd == bfmsskBd) {
+      BFMSS_only_counter++;
+      std::cerr << " BFMSSBd is the only winner " << std::endl;
+    } else if (bd == measureBd) {
+      Measure_only_counter++;
+      std::cerr << " measureBd is the only winner " << std::endl;
+    }
+    /* else if (bd == cauchyBd) {
+      Cauchy_only_counter++;
+      std::cerr << " cauchyBd is the only winner " << std::endl;
+    } */
+    else if (bd == ourBd) {
+      LiYap_only_counter++;
+      std::cerr << " ourBd is the only winner " << std::endl;
+    }
+  }
+#endif
+
+  return bd;
+}//computeBound()
+
+CGAL_INLINE_FUNCTION
+void ExprRep::reduceToBigRat(const BigRat& rat) {
+  Real value(rat);
+
+  //appValue() = value;
+  appComputed() = false; // since appValue is not assigned until approx() is called
+  flagsComputed() = true;
+  knownPrecision() = CORE_negInfty;
+
+#ifdef CORE_DEBUG
+  relPrecision() = EXTLONG_ZERO;
+  absPrecision() = CORE_negInfty;
+  //numNodes() = numNodes();
+#endif
+
+  d_e() = EXTLONG_ONE;
+  //visited() = e->visited();
+  sign() = value.sign();
+  uMSB() = value.MSB();
+  lMSB() = value.MSB();
+  // length() = value.length(); 	// fixed? original = 1
+  measure() = value.height();		// measure <= height for rational value
+
+  // BFMSS[2,5] bound.
+  value.ULV_E(u25(), l25(), v2p(), v2m(), v5p(), v5m());
+
+  extLong u_e = u25() + v2p();
+  extLong l_e = l25() + v2m();
+
+  u_e = u_e + ceilLg5(v5p());
+  l_e = l_e + ceilLg5(v5m());
+
+  if (l_e == EXTLONG_ZERO) {           // no divisions introduced
+    high() = u_e;
+    low() = EXTLONG_ONE - u_e; // - (u_e - 1)
+  } else {
+    high() = u_e - l_e + EXTLONG_ONE;
+    low() = 2 - high();
+  }
+
+  lc() = l_e;
+  tc() = u_e;
+
+  if (ratValue() == NULL)
+    ratValue() = new BigRat(rat);
+  else
+    *(ratValue()) = rat;
+}
+
+// This only copies the current information of the argument e to
+// 	*this ExprRep.
+CGAL_INLINE_FUNCTION
+void ExprRep::reduceTo(const ExprRep *e) {
+  if (e->appComputed()) {
+    appValue() = e->appValue();
+    appComputed() = true;
+    flagsComputed() = true;
+    knownPrecision() = e->knownPrecision();
+#ifdef CORE_DEBUG
+    relPrecision() = e->relPrecision();
+    absPrecision() = e->absPrecision();
+    numNodes() = e->numNodes();
+#endif
+
+  }
+  d_e() = e->d_e();
+  //visited() = e->visited();
+  sign() = e->sign();
+  uMSB() = e->uMSB();
+  lMSB() = e->lMSB();
+  // length() = e->length(); 	// fixed? original = 1
+  measure() = e->measure();
+
+  // BFMSS[2,5] bound.
+  u25() = e->u25();
+  l25() = e->l25();
+  v2p() = e->v2p();
+  v2m() = e->v2m();
+  v5p() = e->v5p();
+  v5m() = e->v5m();
+
+  high() = e->high();
+  low() = e->low();		// fixed? original = 0
+  lc() = e->lc();
+  tc() = e->tc();
+
+  // Chee (Mar 23, 2004), Notes on ratFlag():
+  // ===============================================================
+  // For more information on the use of this flag, see progs/pentagon.
+  // This is an integer valued member of the NodeInfo class.
+  // Its value is used to determine whether
+  // we can ``reduce'' an Expression to a single node containing
+  // a BigRat value.  This reduction is done if the global variable
+  // get_static_rationalReduceFlag()=true.  The default value is false.
+  // This is the intepretation of ratFlag:
+  //	ratFlag < 0 means irrational
+  //	ratFlag = 0 means not initialized
+  //	ratFlag > 0 means rational
+  // Currently, ratFlag>0 is an upper bound on the size of the expression,
+  // since we recursively compute
+  // 		ratFlag(v) = ratFlag(v.lchild)+ratFlag(v.rchild) + 1.
+  // PROPOSAL: if ratFlag() > RAT_REDUCE_THRESHHOLD
+  // 	then we automatically do a reduction.  We must determine
+  // 	an empirical value for RAT_REDUCE_THRESHOLD
+
+  if (get_static_rationalReduceFlag()) {
+    ratFlag() = e->ratFlag();
+
+    if (e->ratFlag() > 0 && e->ratValue() != NULL) {
+      ratFlag() ++;
+      if (ratValue() == NULL)
+        ratValue() = new BigRat(*(e->ratValue()));
+      else
+        *(ratValue()) = *(e->ratValue());
+    } else
+      ratFlag() = -1;
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void ExprRep::reduceToZero() {
+  appValue() = CORE_REAL_ZERO;
+  appComputed() = true;
+  flagsComputed() = true;
+  knownPrecision() = CORE_negInfty;
+#ifdef CORE_DEBUG
+  relPrecision() = EXTLONG_ZERO;
+  absPrecision() = CORE_negInfty;
+  //  numNodes() = 0;
+#endif
+
+  d_e() = EXTLONG_ONE;
+  visited() = false;
+  sign() = 0;
+  uMSB() = CORE_negInfty;
+  lMSB() = CORE_negInfty;
+  // length() = 0; 	// fixed? original = 1
+  measure() = EXTLONG_ZERO;
+
+  // BFMSS[2,5] bound.
+  u25() = l25() = v2p() = v2m() = v5p() = v5m() = EXTLONG_ZERO;
+
+  low() = EXTLONG_ONE;		// fixed? original = 0
+  high() = lc() = tc() = EXTLONG_ZERO;
+
+  if (get_static_rationalReduceFlag()) {
+    if (ratFlag() > 0) {
+      ratFlag() ++;
+      if (ratValue() == NULL)
+        ratValue() = new BigRat(0);
+      else
+        *(ratValue()) = 0;
+    } else
+      ratFlag() = 1;
+  }
+}
+
+////////////////////////////////////////////////////////////
+//  Test whether the current approximate value satisfies
+//  the composite precision requirements [relPrec, absPrec].
+////////////////////////////////////////////////////////////
+
+CGAL_INLINE_FUNCTION
+bool ExprRep::withinKnownPrecision(const extLong& relPrec,
+                                   const extLong& absPrec) {
+  if (appComputed()) { // an approximate value has been evaluated.
+    if (appValue().isExact()) {
+      return true;
+    } else { // approximation has certain error.
+      // decide to which position it is required to compute correctly.
+      extLong required = core_max(-absPrec, appValue().lMSB()-relPrec);
+      // see whether the existing error is smaller than the requirement.
+      return (knownPrecision() <= required);
+    }
+  } else
+    return false;
+}//withinKnownPrecision(a, r)
+
+// approximate the expression to certain precisions when
+// necessary (either no approximate value available or
+// the existing one is not accurate enough).
+CGAL_INLINE_FUNCTION
+void ExprRep::approx(const extLong& relPrec = get_static_defRelPrec(),
+                     const extLong& absPrec = get_static_defAbsPrec()) {
+  if (!getSign())
+    return; // if it is exactly zero...
+
+  // NOTE: The Filter might give a precise enough approximation already.
+  if (!getExactSign())
+    return;
+
+  if (!appComputed() || (!withinKnownPrecision(relPrec, absPrec))) {
+    // it's necessary to re-evaluate.
+    // to avoid huge lMSB which would cause long time and problems.
+
+    // if it is a rational node
+    if (get_static_rationalReduceFlag() && ratFlag() > 0 && ratValue() != NULL)
+      appValue() = Real(*(ratValue())).approx(relPrec, absPrec); //< shouldn't
+                         // this case be done by computeApproxValue()?
+    else
+      computeApproxValue(relPrec, absPrec);
+
+    // update flags
+    appComputed() = true;
+    knownPrecision() = appValue().clLgErr();
+#ifdef CORE_DEBUG
+    if (relPrecision() < relPrec)
+      relPrecision() = relPrec;
+    if (absPrecision() < absPrec)
+      absPrecision() = absPrec;
+#endif
+
+  }
+}
+
+// return an approximate value to certain precision.
+CGAL_INLINE_FUNCTION
+const Real& ExprRep::getAppValue(const extLong& relPrec,
+		const extLong& absPrec) {
+  if (getSign()) {
+    approx(relPrec, absPrec);
+    return appValue();
+  } else
+    return CORE_REAL_ZERO;
+}
+
+CGAL_INLINE_FUNCTION
+std::ostream& operator<<(std::ostream& o, ExprRep& rep) {
+  if (rep.getSign()) {
+    rep.approx(get_static_defRelPrec(), get_static_defAbsPrec());
+    o << rep.appValue();
+  } else {
+    o << "0";
+  }
+  return o;
+}
+
+// Chee, Zilin: July 17, 2002
+//  Original algorithm is wrongly implemented, and can take time
+//	 exponential in the size of the dag.
+//
+//  METHOD:
+//	Inductively assume that all "visited" flags are false.
+//	This calls for a reimplementation of "count()" and "clearFlag()".
+//	Actually, we did not have to fix the count() function.
+//
+//  (1) First recursively compute d_e for each node
+//		by calling the count() function.
+//	Important thing is count() will turn the "visited" flags
+//		to be true, so that there is no double counting.
+//	Furthermore, if d_e had already been computed, the
+//		arithmetic for d_e can be avoided (in this case,
+//		it is only the setting of "visited" flag that we
+//		are interested in!
+//  (2) At the end of count(), we have set all reachable nodes
+//		to "visited", and their d_e have been computed.
+//  (3) Now, call clearFlag() to recursively clear all reachable
+//		nodes.  NOTE THAT PREVIOUSLY, clearFlag() was called
+//		first!  This obvious is wrong
+
+CGAL_INLINE_FUNCTION
+extLong ExprRep::degreeBound() {
+  if (d_e() == EXTLONG_ONE) // no radical nodes below
+    return EXTLONG_ONE;
+  count();
+  clearFlag();
+  return d_e();
+}
+//  class ConstRealRep
+//  constructor
+CGAL_INLINE_FUNCTION
+ConstRealRep::ConstRealRep(const Real & r) : value(r) {
+  if (!value.isExact()) {
+    // clone the BigFloat and set its error to zero.
+    value = value.BigFloatValue().makeExact();
+  }
+  ffVal = filteredFp(value);
+}
+
+// initialize nodeInfo
+CGAL_INLINE_FUNCTION
+void ConstRep::initNodeInfo() {
+  nodeInfo = new NodeInfo();
+  d_e() = EXTLONG_ONE;
+}
+CGAL_INLINE_FUNCTION
+void UnaryOpRep::initNodeInfo() {
+  if (child->nodeInfo == NULL)
+    child->initNodeInfo();
+  nodeInfo = new NodeInfo();
+}
+CGAL_INLINE_FUNCTION
+void BinOpRep::initNodeInfo() {
+  if (first->nodeInfo == NULL)
+    first->initNodeInfo();
+  if (second->nodeInfo == NULL)
+    second->initNodeInfo();
+  nodeInfo = new NodeInfo();
+}
+
+#ifdef CORE_DEBUG
+CGAL_INLINE_FUNCTION
+unsigned long ConstRep::dagSize() {
+  if (!visited()) {
+    visited() = true;
+    numNodes() = 1;
+  } else
+    numNodes() = 0;
+  return numNodes();
+}
+
+CGAL_INLINE_FUNCTION
+unsigned long UnaryOpRep::dagSize() {
+  if (!visited()) {
+    visited() = true;
+    numNodes() = child->dagSize() + 1;
+  } else
+    numNodes() = 0;
+  return numNodes();
+}
+
+CGAL_INLINE_FUNCTION
+unsigned long BinOpRep::dagSize() {
+  if (!visited()) {
+    visited() = true;
+    numNodes() = first->dagSize() + second->dagSize() + 1;
+  } else
+    numNodes() = 0;
+  return numNodes();
+}
+
+CGAL_INLINE_FUNCTION
+void ConstRep::fullClearFlag() {
+  if (visited())
+    visited() = false;
+}
+
+CGAL_INLINE_FUNCTION
+void UnaryOpRep::fullClearFlag() {
+  if (visited()) {
+    child->fullClearFlag();
+    visited() = false;
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void BinOpRep::fullClearFlag() {
+  if (visited()) {
+    first->fullClearFlag();
+    second->fullClearFlag();
+    visited() = false;
+  }
+}
+#endif
+
+//
+// clear visited flag
+//
+/* see Expr.h
+  void ConstRep::clearFlag()
+  { visited = false; }
+*/
+CGAL_INLINE_FUNCTION
+void UnaryOpRep::clearFlag() {
+  if (d_e() == EXTLONG_ONE)
+    return; // no radicals below.
+  if (visited()) {
+    visited() = false;
+    child->clearFlag();
+  }
+}
+//  class BinOpRep
+CGAL_INLINE_FUNCTION
+void BinOpRep::clearFlag() {
+  if (d_e() == EXTLONG_ONE)
+    return; // rational below
+  if (visited()) {
+    visited() = false;
+    first->clearFlag();
+    second->clearFlag();
+  }
+}
+
+//
+// count # of squareroot
+//
+CGAL_INLINE_FUNCTION
+extLong ConstRep::count() {
+  if (visited())
+    return EXTLONG_ONE;
+  visited() = true;
+  return d_e();
+}
+
+CGAL_INLINE_FUNCTION
+extLong NegRep::count() {
+  if (d_e() == EXTLONG_ONE)
+    return EXTLONG_ONE;
+  if (visited())
+    return EXTLONG_ONE;
+  visited() = true;
+  d_e() = child->count();
+  return d_e();
+}
+
+CGAL_INLINE_FUNCTION
+extLong SqrtRep::count() {
+  if (d_e() == EXTLONG_ONE)
+    return EXTLONG_ONE;
+  if (visited())
+    return EXTLONG_ONE;
+  visited() = true;
+  d_e() = child->count() * EXTLONG_TWO;
+  return d_e();
+}
+
+CGAL_INLINE_FUNCTION
+extLong BinOpRep::count() {
+  if (d_e() == EXTLONG_ONE)
+    return EXTLONG_ONE;
+  if (visited())
+    return EXTLONG_ONE;
+  visited() = true;
+  d_e() = first->count() * second->count();
+  return d_e();
+}
+
+//
+// compute exact flags functions
+//
+//  exact value
+
+CGAL_INLINE_FUNCTION
+void computeExactFlags_temp(ConstRep* t, const Real &value) {
+  // Chen Li: the following is incorrect:
+  //    uMSB = lMSB = value.MSB();
+  // because the value could be a BigFloat which is an interval.
+  if (value.isExact()) {
+    t->uMSB() = t->lMSB() = value.MSB();
+  } else {
+    t->uMSB() = value.uMSB();
+    t->lMSB() = value.lMSB();
+    core_error("Leaves in DAG is not exact!", __FILE__, __LINE__, true);
+  }
+
+  t->sign() = value.sign();
+  // t->length() = value.length();
+  t->measure() = value.height(); // for rationals and integers,
+  // measure = height.
+
+  // BFMSS[2,5] bound.
+  value.ULV_E(t->u25(), t->l25(), t->v2p(), t->v2m(), t->v5p(), t->v5m());
+
+  // The original BFMSS parameters can be set from the BFMSS[2,5] parameters.
+  // Here we just need them locally.
+  extLong u_e = t->u25() + t->v2p() + ceilLg5(t->v5p());
+  extLong l_e = t->l25() + t->v2m() + ceilLg5(t->v5m());
+
+#ifdef ORIGINAL_BFMSS
+  // To go back to the original BFMSS :
+  t->u25() = u_e;
+  t->l25() = l_e;
+  t->v2p() = t->v2m() = t->v5p() = t->v5m() = EXTLONG_ZERO;
+#elif defined BFMSS_2_ONLY
+  // To go back to BFMSS[2] only :
+  t->u25() = t->u25() + ceilLg5(t->v5p());
+  t->l25() = t->l25() + ceilLg5(t->v5m());
+  t->v5p() = t->v5m() = EXTLONG_ZERO;
+#endif
+
+  if (l_e == EXTLONG_ZERO) {           // no divisions introduced
+    t->high() = u_e;
+    t->low() = EXTLONG_ONE - u_e; // - (u_e - 1)
+  } else {
+    t->high() = u_e - l_e + EXTLONG_ONE;
+    t->low() = EXTLONG_TWO - t->high();
+  }
+
+  t->lc() = l_e;
+  t->tc() = u_e;
+
+  // set BigRat value
+  if (get_static_rationalReduceFlag()) {
+    t->ratFlag() = 1;
+    t->ratValue() = new BigRat(value.BigRatValue());
+  }
+
+  t->flagsComputed() = true;
+}
+
+CGAL_INLINE_FUNCTION
+void ConstDoubleRep::computeExactFlags() {// can be made more efficient
+  computeExactFlags_temp(this, Real(ffVal.getValue()));
+}
+
+CGAL_INLINE_FUNCTION
+void ConstRealRep::computeExactFlags() {
+  computeExactFlags_temp(this, value);
+}
+
+CGAL_INLINE_FUNCTION
+void NegRep::computeExactFlags() {
+  if (!child->flagsComputed())
+    child->computeExactFlags();
+
+  if (child->sign() == 0) {
+    reduceToZero();
+    return;
+  }
+
+  if (get_static_rationalReduceFlag()) {
+    if (child->ratFlag()>0 && child->ratValue() != NULL) {
+      BigRat val = -(*(child->ratValue()));
+      reduceToBigRat(val);
+      ratFlag() = child->ratFlag()+1;
+      return;
+    } else
+      ratFlag() = -1;
+  }
+
+  sign() = -child->sign();
+  uMSB() = child->uMSB();
+  lMSB() = child->lMSB();
+
+  // length() = child->length();
+  measure() = child->measure();
+  u25() = child->u25();
+  l25() = child->l25();
+  v2p() = child->v2p();
+  v2m() = child->v2m();
+  v5p() = child->v5p();
+  v5m() = child->v5m();
+  high() = child->high();
+  low() = child->low();
+  lc()  = child->lc();
+  tc()  = child->tc();
+  flagsComputed() = true;
+}//NegRep::computeExactFlags
+
+CGAL_INLINE_FUNCTION
+void SqrtRep::computeExactFlags() {
+  if (!child->flagsComputed())
+    child->computeExactFlags();
+
+  if (get_static_rationalReduceFlag())
+    ratFlag() = -1;
+
+  sign() = child->sign();
+  if (sign() < 0)
+    core_error("squareroot is called with negative operand.",
+               __FILE__, __LINE__, true);
+
+  uMSB() = child->uMSB() / EXTLONG_TWO;
+  lMSB() = child->lMSB() / EXTLONG_TWO;
+
+  // length() = child->length();
+  measure() = child->measure();
+
+  // BFMSS[2,5] bound.
+  if (child->v2p() + ceilLg5(child->v5p()) + child->u25() >=
+      child->v2m() + ceilLg5(child->v5m()) + child->l25()) {
+    extLong vtilda2 = child->v2p() + child->v2m();
+    v2p() = vtilda2 / EXTLONG_TWO;
+    v2m() = child->v2m();
+    extLong vmod2;
+    if (v2p().isInfty())
+      vmod2 = CORE_INFTY;
+    else
+      vmod2 = vtilda2 - EXTLONG_TWO*v2p(); // == vtilda2 % 2
+    extLong vtilda5 = child->v5p() + child->v5m();
+    v5p() = vtilda5 / EXTLONG_TWO;
+    v5m() = child->v5m();
+    extLong vmod5;
+    if (v5p().isInfty())
+      vmod5 = CORE_INFTY;
+    else
+      vmod5 = vtilda5 - EXTLONG_TWO*v5p(); // == vtilda5 % 2
+    u25() = (child->u25() + child->l25() + vmod2 + ceilLg5(vmod5) + EXTLONG_ONE) / EXTLONG_TWO;
+    l25() = child->l25();
+  } else {
+    extLong vtilda2 = child->v2p() + child->v2m();
+    v2p() = child->v2p();
+    v2m() = vtilda2 / EXTLONG_TWO;
+    extLong vmod2;
+    if (v2m().isInfty())
+      vmod2 = CORE_INFTY;
+    else
+      vmod2 = vtilda2 - EXTLONG_TWO*v2m(); // == vtilda2 % 2
+    extLong vtilda5 = child->v5p() + child->v5m();
+    v5p() = child->v5p();
+    v5m() = vtilda5 / EXTLONG_TWO;
+    u25() = child->u25();
+    extLong vmod5;
+    if (v5m().isInfty())
+      vmod5 = CORE_INFTY;
+    else
+      vmod5 = vtilda5 - EXTLONG_TWO*v5m(); // == vtilda5 % 2
+    l25() = (child->u25() + child->l25() + vmod2 + ceilLg5(vmod5) + EXTLONG_ONE) / EXTLONG_TWO;
+  }
+
+  high() = (child->high() +EXTLONG_ONE)/EXTLONG_TWO;
+  low() = child->low() / EXTLONG_TWO;
+  lc() = child->lc();
+  tc() = child->tc();
+  flagsComputed() = true;
+}// SqrtRep::computeExactFlags
+
+CGAL_INLINE_FUNCTION
+void MultRep::computeExactFlags() {
+  if (!first->flagsComputed())
+    first->computeExactFlags();
+  if (!second->flagsComputed())
+    second->computeExactFlags();
+
+  if ((!first->sign()) || (!second->sign())) {
+    // value must be exactly zero.
+    reduceToZero();
+    return;
+  }
+  // rational node
+  if (get_static_rationalReduceFlag()) {
+    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
+      BigRat val = (*(first->ratValue()))*(*(second->ratValue()));
+      reduceToBigRat(val);
+      ratFlag() = first->ratFlag() + second->ratFlag();
+      return;
+    } else
+      ratFlag() = -1;
+  }
+
+  // value is irrational.
+  uMSB() = first->uMSB() + second->uMSB() + EXTLONG_ONE;
+  lMSB() = first->lMSB() + second->lMSB();
+  sign() = first->sign() * second->sign();
+
+  extLong df = first->d_e();
+  extLong ds = second->d_e();
+  // extLong lf = first->length();
+  // extLong ls = second->length();
+
+  // length() = df * ls + ds * lf;
+  measure() = (first->measure()) * ds+(second->measure()) * df;
+
+  // BFMSS[2,5] bound.
+  v2p() = first->v2p() + second->v2p();
+  v2m() = first->v2m() + second->v2m();
+  v5p() = first->v5p() + second->v5p();
+  v5m() = first->v5m() + second->v5m();
+  u25() = first->u25() + second->u25();
+  l25() = first->l25() + second->l25();
+
+  high() = first->high() + second->high();
+  low() = first->low() + second->low();
+
+  lc() = ds * first->lc() + df * second->lc();
+  tc() = core_min(ds * first->tc() + df * second->tc(), measure());
+
+  flagsComputed() = true;
+}// MultRep::computeExactFlags
+
+CGAL_INLINE_FUNCTION
+void DivRep::computeExactFlags() {
+  if (!first->flagsComputed())
+    first->computeExactFlags();
+  if (!second->flagsComputed())
+    second->computeExactFlags();
+
+  if (!second->sign())
+    core_error("zero divisor.", __FILE__, __LINE__, true);
+
+  if (!first->sign()) {// value must be exactly zero.
+    reduceToZero();
+    return;
+  }
+
+  // rational node
+  if (get_static_rationalReduceFlag()) {
+    if (first->ratFlag() > 0 && second->ratFlag() > 0) {
+      BigRat val = (*(first->ratValue()))/(*(second->ratValue()));
+      reduceToBigRat(val);
+      ratFlag() = first->ratFlag() + second->ratFlag();
+      return;
+    } else
+      ratFlag() = -1;
+  }
+
+  // value is irrational.
+  uMSB() = first->uMSB() - second->lMSB();
+  lMSB() = first->lMSB() - second->uMSB() - EXTLONG_ONE;
+  sign() = first->sign() * second->sign();
+
+  extLong df = first->d_e();
+  extLong ds = second->d_e();
+  // extLong lf = first->length();
+  // extLong ls = second->length();
+
+  // length() = df * ls + ds * lf;
+  measure() = (first->measure())*ds + (second->measure())*df;
+
+  // BFMSS[2,5] bound.
+  v2p() = first->v2p() + second->v2m();
+  v2m() = first->v2m() + second->v2p();
+  v5p() = first->v5p() + second->v5m();
+  v5m() = first->v5m() + second->v5p();
+  u25() = first->u25() + second->l25();
+  l25() = first->l25() + second->u25();
+
+  high() = first->high() + second->low();
+  low() = first->low() + second->high();
+
+  lc() = ds * first->lc() + df * second->tc();
+  tc() = core_min(ds * first->tc() + df * second->lc(), measure());
+
+  flagsComputed() = true;
+}
+
+//
+//  approximation functions
+//
+CGAL_INLINE_FUNCTION
+void ConstDoubleRep::computeApproxValue(const extLong& /*relPrec*/,
+                                        const extLong& /*absPrec*/)
+// can ignore precision bounds since ffVal.getValue() returns exact value
+{
+  appValue() = Real(ffVal.getValue());
+}
+
+CGAL_INLINE_FUNCTION
+void ConstRealRep::computeApproxValue(const extLong& relPrec,
+                                      const extLong& absPrec) {
+  appValue() = value.approx(relPrec, absPrec);
+}
+
+CGAL_INLINE_FUNCTION
+void NegRep::computeApproxValue(const extLong& relPrec,
+                                const extLong& absPrec) {
+  appValue() = -child->getAppValue(relPrec, absPrec);
+}
+
+CGAL_INLINE_FUNCTION
+void SqrtRep::computeApproxValue(const extLong& relPrec,
+                                 const extLong& absPrec) {
+  extLong r = relPrec + relPrec + EXTLONG_EIGHT; // chenli: ???
+  extLong a = absPrec + absPrec + EXTLONG_EIGHT;
+  extLong pr = - lMSB() + r;
+  extLong p  = pr < a ? pr : a;
+
+  Real val = child->getAppValue(r, a);
+  if (get_static_incrementalEvalFlag()) {
+    if (appValue() == CORE_REAL_ZERO)
+      appValue() = val;
+    appValue() = val.sqrt(p, appValue().BigFloatValue());
+  } else
+    appValue() = val.sqrt(p);
+}
+
+CGAL_INLINE_FUNCTION
+void MultRep::computeApproxValue(const extLong& relPrec,
+                                 const extLong& absPrec) {
+  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
+    extLong r   = relPrec + EXTLONG_FOUR;
+    extLong  afr = - first->lMSB() + EXTLONG_ONE;
+    extLong  afa = second->uMSB() + absPrec + EXTLONG_FIVE;
+    extLong  af  = afr > afa ? afr : afa;
+    extLong  asr = - second->lMSB() + EXTLONG_ONE;
+    extLong  asa = first->uMSB() + absPrec + EXTLONG_FIVE;
+    extLong  as  = asr > asa ? asr : asa;
+    appValue() = first->getAppValue(r, af)*second->getAppValue(r, as);
+  } else {
+    std::cerr << "lMSB = " << lMSB() << std::endl;
+    core_error("a huge lMSB in MulRep", __FILE__, __LINE__, false);
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void DivRep::computeApproxValue(const extLong& relPrec,
+                                const extLong& absPrec) {
+  if (lMSB() < EXTLONG_BIG && lMSB() > EXTLONG_SMALL) {
+    extLong rr  = relPrec + EXTLONG_SEVEN;		// These rules come from
+    extLong ra  = uMSB() + absPrec + EXTLONG_EIGHT;	// Koji's Master Thesis, page 65
+    extLong ra2 = core_max(ra, EXTLONG_TWO);
+    extLong r   = core_min(rr, ra2);
+    extLong  af  = - first->lMSB() + r;
+    extLong  as  = - second->lMSB() + r;
+
+    extLong pr = relPrec + EXTLONG_SIX;
+    extLong pa = uMSB() + absPrec + EXTLONG_SEVEN;
+    extLong p  = core_min(pr, pa);	// Seems to be an error:
+    // p can be negative here!
+    // Also, this does not conform to
+    // Koji's thesis which has a default
+    // relative precision (p.65).
+
+    appValue() = first->getAppValue(r, af).div(second->getAppValue(r, as), p);
+  } else {
+    std::cerr << "lMSB = " << lMSB() << std::endl;
+    core_error("a huge lMSB in DivRep", __FILE__, __LINE__, false);
+  }
+}
+
+//
+// Debug Help Functions
+//
+CGAL_INLINE_FUNCTION
+void Expr::debug(int mode, int level, int depthLimit) const {
+  std::cout << "-------- Expr debug() -----------" << std::endl;
+  std::cout << "rep = " << rep << std::endl;
+  if (mode == Expr::LIST_MODE)
+    rep->debugList(level, depthLimit);
+  else if (mode == Expr::TREE_MODE)
+    rep->debugTree(level, 0, depthLimit);
+  else
+    core_error("unknown debugging mode", __FILE__, __LINE__, false);
+  std::cout << "---- End Expr debug(): " << std::endl;
+}
+
+
+CGAL_INLINE_FUNCTION
+const std::string ExprRep::dump(int level) const {
+  std::ostringstream ost;
+  if (level == OPERATOR_ONLY) {
+    ost << op();
+  } else if (level == VALUE_ONLY) {
+    ost << appValue();
+  } else if (level == OPERATOR_VALUE) {
+    ost << op() << "[val: " << appValue() << "]";
+  } else if (level == FULL_DUMP) {
+    ost << op()
+    << "[val: "  << appValue() << "; "
+    << "kp: " << knownPrecision() << "; "
+#ifdef CORE_DEBUG
+    << "r: " << relPrecision() << "; "
+    << "a: " << absPrecision() << "; "
+#endif
+    << "lMSB: " << lMSB() << "; "
+    << "uMSB: " << uMSB() << "; "
+    << "sign: " << sign() << "; "
+    // << "length: " << length() << "; "
+    << "measure: " << measure() << "; "
+    << "d_e: " << d_e() << "; "
+    << "u25: " << u25() << "; "
+    << "l25: " << l25() << "; "
+    << "v2p: " << v2p() << "; "
+    << "v2m: " << v2m() << "; "
+    << "v5p: " << v5p() << "; "
+    << "v5m: " << v5m() << "; "
+    << "high: " << high() << "; "
+    << "low: " << low() << "; "
+    << "lc: " << lc() << "; "
+    << "tc: " << tc()
+    << "]";
+  }
+  return std::string(ost.str());
+  // note that str() return an array not properly terminated!
+}
+
+
+CGAL_INLINE_FUNCTION
+void UnaryOpRep::debugList(int level, int depthLimit) const {
+  if (depthLimit <= 0)
+    return;
+  if (level == Expr::SIMPLE_LEVEL) {
+    std::cout << "(" << dump(OPERATOR_VALUE);
+    child->debugList(level, depthLimit - 1);
+    std::cout << ")";
+  } else if (level == Expr::DETAIL_LEVEL) {
+    std::cout << "(" << dump(FULL_DUMP);
+    child->debugList(level, depthLimit - 1);
+    std::cout << ")";
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void UnaryOpRep::debugTree(int level, int indent, int depthLimit) const {
+  if (depthLimit <= 0)
+    return;
+  for (int i = 0; i<indent; i++ )
+    std::cout << "  ";
+  std::cout << "|_";
+  if (level == Expr::SIMPLE_LEVEL)
+    std::cout << dump(OPERATOR_VALUE);
+  else if (level == Expr::DETAIL_LEVEL)
+    std::cout << dump(FULL_DUMP);
+  std::cout << std::endl;
+  child->debugTree(level, indent + 2, depthLimit - 1);
+}
+
+CGAL_INLINE_FUNCTION
+void ConstRep::debugList(int level, int depthLimit) const {
+  if (depthLimit <= 0)
+    return;
+  if (level == Expr::SIMPLE_LEVEL) {
+    std::cout << "(" << dump(OPERATOR_VALUE) << ")";
+  } else if (level == Expr::DETAIL_LEVEL) {
+    std::cout << "(" << dump(FULL_DUMP) << ")";
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void ConstRep::debugTree(int level, int indent, int depthLimit) const {
+  if (depthLimit <= 0)
+    return;
+  for (int i=0; i<indent; i++)
+    std::cout << "  ";
+  std::cout << "|_";
+  if (level == Expr::SIMPLE_LEVEL)
+    std::cout << dump(OPERATOR_VALUE);
+  else if (level == Expr::DETAIL_LEVEL)
+    std::cout << dump(FULL_DUMP);
+  std::cout << std::endl;
+}
+
+CGAL_INLINE_FUNCTION
+void BinOpRep::debugList(int level, int depthLimit) const {
+  if (depthLimit <= 0 )
+    return;
+  std::cout << "(";
+  if (level == Expr::SIMPLE_LEVEL) {
+    std::cout << dump(OPERATOR_VALUE);
+  } else if (level == Expr::DETAIL_LEVEL) {
+    std::cout << dump(FULL_DUMP);
+  }
+  first->debugList(level, depthLimit - 1);
+  std::cout << ", ";
+  second->debugList(level, depthLimit - 1);
+  std::cout << ")" ;
+}
+
+CGAL_INLINE_FUNCTION
+void BinOpRep::debugTree(int level, int indent, int depthLimit) const {
+  if (depthLimit <= 0)
+    return;
+  for (int i=0; i<indent; i++)
+    std::cout << "  ";
+  std::cout << "|_";
+  if (level == Expr::SIMPLE_LEVEL) {
+    std::cout << dump(OPERATOR_VALUE);
+  } else if (level == Expr::DETAIL_LEVEL) {
+    std::cout << dump(FULL_DUMP);
+  }
+  std::cout << std::endl;
+  first->debugTree(level, indent + 2, depthLimit - 1);
+  second->debugTree(level, indent + 2, depthLimit - 1);
+}
+
+CORE_MEMORY_IMPL(BigIntRep)
+CORE_MEMORY_IMPL(BigRatRep)
+CORE_MEMORY_IMPL(ConstDoubleRep)
+CORE_MEMORY_IMPL(ConstRealRep)
+
+CORE_MEMORY_IMPL(NegRep)
+CORE_MEMORY_IMPL(SqrtRep)
+
+CORE_MEMORY_IMPL(MultRep)
+CORE_MEMORY_IMPL(DivRep)
+
+template <typename O>
+void * AddSubRep<O>::operator new( size_t size)
+{ return MemoryPool<AddSubRep<O> >::global_allocator().allocate(size); }
+
+template <typename O>
+void AddSubRep<O>::operator delete( void *p, size_t )
+{ MemoryPool<AddSubRep<O> >::global_allocator().free(p); }
+
+
+
+template <class T>
+void * Realbase_for<T>::operator new( size_t size)
+{ return MemoryPool<Realbase_for<T> >::global_allocator().allocate(size); }
+
+template <class T>
+void Realbase_for<T>::operator delete( void *p, size_t )
+{ MemoryPool<Realbase_for<T> >::global_allocator().free(p); }
+
+ template class AddSubRep<Add>;
+ template class AddSubRep<Sub>;
+
+template class Realbase_for<long>;
+template class Realbase_for<double>;
+template class Realbase_for<BigInt>;
+template class Realbase_for<BigRat>;
+template class Realbase_for<BigFloat>;
+
+ template class ConstPolyRep<Expr>;
+ template class ConstPolyRep<BigFloat>;
+ template class ConstPolyRep<BigInt>;
+ template class ConstPolyRep<BigRat>;
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Filter.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Filter.h
new file mode 100644
index 0000000..b2147bd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Filter.h
@@ -0,0 +1,195 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Filter.h
+ * Synopsis:
+ *      This is a simple filtered floating point number,
+ *      represented by the main class, FilterFp.
+ *      based on the Burnikel-Funke-Schirra (BFS) filter scheme.
+ *      We do not use IEEE exception mechanism here.
+ *      It is used by the Expr class.
+ * 
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_FILTER_H_
+#define _CORE_FILTER_H_
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+#include <CGAL/CORE/Real.h>
+#include <cmath>
+
+#if !defined CGAL_CFG_NO_CPP0X_ISFINITE
+  #define CGAL_CORE_finite(x)	std::isfinite(x)
+#elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW
+  #define CGAL_CORE_finite(x)	_finite(x)
+  #define ilogb(x)	(int)_logb(x)
+#else
+  #define CGAL_CORE_finite(x)	finite(x)
+#endif
+
+#if defined(sun) || defined(__sun)
+  #include <ieeefp.h>
+#endif
+
+namespace CORE { 
+
+const int POWTWO_26 = (1 << 26);  ///< constant 2^26
+
+/// \class filteredFp Filter.h
+/// \brief filteredFp represents filtered floating point
+///        numbers, based on BFS filter
+class filteredFp {
+  double fpVal;         // approximate double value for some "real value"
+  double maxAbs;        // if (|fpVal| > maxAbs * ind * 2^{-53}) then
+  int ind;              // sign of value is sign(fpVal).  Else, don't know.
+  // REFERENCE: Burnikel, Funke, Schirra (BFS) filter
+  // Chee: in isOK(), you used the test "|fpVal| >= maxAbs * ind * 2^{-53}" 
+  // which seems to be correct (i.e., not |fpVal| > maxAbs * ind * 2^{-53})
+public:
+  /// \name Constructors
+  //@{
+  /// constructor
+  filteredFp (double val = 0.0)
+      : fpVal(val), maxAbs(core_abs(val)), ind(0) {}
+  /// constructor
+  filteredFp (double val, double m, int i)
+      : fpVal(val), maxAbs(m), ind(i) {}
+
+  /// construct a filteredFp from Real v.
+  /** if v causes an overflow, fpVal = +/- Infty
+      if v causes an underflow, fpVal = ...? */
+  filteredFp (const Real & value) : fpVal(0.0), maxAbs(0.0), ind(0) {
+    if (value != CORE_REAL_ZERO) {
+      ind = 1;
+      fpVal = value.doubleValue();
+      if (value.MSB() <= -1075)
+	maxAbs = 1;
+      else	
+      	maxAbs = core_abs(fpVal); // NaN are propagated correctly by core_abs.
+    }
+  }
+  //@}
+
+  /// \name Help Functions
+  //@{
+  /// return filtered value (for debug)
+  double getValue() const {
+    return fpVal;
+  }
+  /// check whether the sign (!) of the filtered value is OK
+  bool isOK() const {
+    return (get_static_fpFilterFlag()  && // To disable filter
+            CGAL_CORE_finite(fpVal) && // Test for infinite and NaNs
+            (core_abs(fpVal) >= maxAbs*ind*CORE_EPS));
+  }
+  /// return the sign of fitered value.
+  /** (Note: must call isOK() to check whether the sign is ok
+      before call this function.) */
+  int sign() const {
+#ifdef CORE_DEBUG
+    CGAL_assertion(isOK());
+#endif
+    if (fpVal == 0.0)
+      return 0;
+    else
+      return fpVal > 0.0 ? 1: -1;
+  }
+  /// lower bound on MSB
+  /** defined to be cel(lg(real value));
+      ilogb(x) is floor(log_2(|x|)). 
+      Also, ilogb(0) = -INT_MAX.  ilogb(NaN) = ilogb(+/-Inf) = INT_MAX */
+  extLong lMSB() const {
+    return extLong(ilogb(core_abs(fpVal)-maxAbs*ind*CORE_EPS));
+  }
+  /// upper bound on MSB
+  extLong uMSB() const {
+    return extLong(ilogb(core_abs(fpVal)+maxAbs*ind*CORE_EPS));
+  }
+  //@}
+
+  /// \name Operators
+  //@{
+  /// unary minus
+  filteredFp operator -() const {
+    return filteredFp(-fpVal, maxAbs, ind);
+  }
+  /// addition
+  filteredFp operator+ (const filteredFp& x) const {
+    return filteredFp(fpVal+x.fpVal, maxAbs+x.maxAbs, 1+core_max(ind, x.ind));
+  }
+  /// subtraction
+  filteredFp operator- (const filteredFp& x) const {
+    return filteredFp(fpVal-x.fpVal, maxAbs+x.maxAbs, 1+core_max(ind, x.ind));
+  }
+  /// multiplication
+  filteredFp operator* (const filteredFp& x) const {
+    return filteredFp(fpVal*x.fpVal, maxAbs*x.maxAbs+DBL_MIN, 1+ind+x.ind);
+  }
+  /// division
+  filteredFp operator/ (const filteredFp& x) const {
+    if (x.fpVal == 0.0)
+      core_error("possible zero divisor!", __FILE__, __LINE__, false);
+    double xxx = core_abs(x.fpVal) / x.maxAbs - (x.ind+1)*CORE_EPS + DBL_MIN;
+    if (xxx > 0) {
+      double val =  fpVal / x.fpVal;
+      double maxVal = ( core_abs(val) + maxAbs / x.maxAbs) / xxx + DBL_MIN;
+      return filteredFp(val, maxVal, 1 + core_max(ind, x.ind + 1));
+    } else
+      return filteredFp(getDoubleInfty(), 0.0, 0);
+  }
+  /// square root
+  filteredFp sqrt () const {
+    if (fpVal < 0.0)
+      core_error("possible negative sqrt!", __FILE__, __LINE__, false);
+    if (fpVal > 0.0) {
+      double val = std::sqrt(fpVal);
+      return filteredFp(val,  ( maxAbs / fpVal ) * val, 1 + ind);
+    } else
+      return filteredFp(0.0, std::sqrt(maxAbs) * POWTWO_26, 1 + ind);
+  }
+
+  /// dump function
+  void dump (std::ostream&os) const {
+    os << "Filter=[fpVal=" << fpVal << ",maxAbs=" << maxAbs << ",ind=" << ind << "]";
+  }
+
+  /// helper function (to avoid warning under some compilers)
+  static double getDoubleInfty() {
+    static double d = DBL_MAX;
+    return 2*d;
+  }
+  //@}
+}; //filteredFp class
+
+inline std::ostream & operator<< (std::ostream & os, const filteredFp& fp) {
+  fp.dump(os);
+  return os;
+}
+
+} //namespace CORE
+#endif // _CORE_FILTER_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp.h
new file mode 100644
index 0000000..cfa7574
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+// CORE LIBRARY FILE
+#ifndef _CORE_GMP_H_
+#define _CORE_GMP_H_
+
+#include <CGAL/CORE/Impl.h>
+#include <gmp.h>
+
+namespace CORE { 
+
+CGAL_CORE_EXPORT std::ostream& io_write (std::ostream &, mpz_srcptr);
+CGAL_CORE_EXPORT std::ostream& io_write (std::ostream &, mpq_srcptr);
+CGAL_CORE_EXPORT std::istream& io_read (std::istream &, mpz_ptr);
+CGAL_CORE_EXPORT std::istream& io_read (std::istream &, mpq_ptr);
+//std::ostream& operator<< (std::ostream &, mpz_srcptr);
+//std::ostream& operator<< (std::ostream &, mpq_srcptr);
+//std::istream& operator>> (std::istream &, mpz_ptr);
+//std::istream& operator>> (std::istream &, mpq_ptr);
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/Gmp_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_GMP_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp_impl.h
new file mode 100644
index 0000000..32cec37
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Gmp_impl.h
@@ -0,0 +1,280 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * file: GmpIO.cpp
+ * 		Adapted from multi-files under /cxx in GMP's source distribution
+ *
+ * Zilin Du, 2003
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+/* Auxiliary functions for C++-style input of GMP types. 
+
+Copyright 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+MA 02110-1301, USA. */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/CORE/Gmp.h>
+#include <cctype>
+#include <iostream>
+#include <string>
+#include <cstdio>
+
+using namespace std;
+
+namespace CORE { 
+
+CGAL_INLINE_FUNCTION
+int
+__gmp_istream_set_base (istream &i, char &c, bool &zero, bool &showbase)
+{
+  int base;
+
+  zero = showbase = false;
+  switch (i.flags() & ios::basefield)
+    {
+    case ios::dec:
+      base = 10;
+      break;
+    case ios::hex:
+      base = 16;
+      break;
+    case ios::oct:
+      base = 8;
+      break;
+    default:
+      showbase = true; // look for initial "0" or "0x" or "0X"
+      if (c == '0')
+	{
+	  if (! i.get(c))
+	    c = 0; // reset or we might loop indefinitely
+
+	  if (c == 'x' || c == 'X')
+	    {
+	      base = 16;
+	      i.get(c);
+	    }
+	  else
+	    {
+	      base = 8;
+	      zero = true; // if no other digit is read, the "0" counts
+	    }
+	}
+      else
+	base = 10;
+      break;
+    }
+
+  return base;
+}
+
+CGAL_INLINE_FUNCTION
+void
+__gmp_istream_set_digits (string &s, istream &i, char &c, bool &ok, int base)
+{
+  switch (base)
+    {
+    case 10:
+      while (isdigit(c))
+	{
+	  ok = true; // at least a valid digit was read
+	  s += c;
+	  if (! i.get(c))
+	    break;
+	}
+      break;
+    case 8:
+      while (isdigit(c) && c != '8' && c != '9')
+	{
+	  ok = true; // at least a valid digit was read
+	  s += c;
+	  if (! i.get(c))
+	    break;
+	}
+      break;
+    case 16:
+      while (isxdigit(c))
+	{
+	  ok = true; // at least a valid digit was read
+	  s += c;
+	  if (! i.get(c))
+	    break;
+	}
+      break;
+    }
+}
+
+CGAL_INLINE_FUNCTION
+istream &
+//operator>> (istream &i, mpz_ptr z)
+io_read (istream &i, mpz_ptr z)
+{
+  int base;
+  char c = 0;
+  string s;
+  bool ok = false, zero, showbase;
+
+  i.get(c); // start reading
+
+  if (i.flags() & ios::skipws) // skip initial whitespace
+    while (isspace(c) && i.get(c))
+      ;
+
+  if (c == '-' || c == '+') // sign
+    {
+      if (c == '-') // mpz_set_str doesn't accept '+'
+	s = "-";
+      i.get(c);
+    }
+
+  while (isspace(c) && i.get(c)) // skip whitespace
+    ;
+
+  base = __gmp_istream_set_base(i, c, zero, showbase); // select the base
+  __gmp_istream_set_digits(s, i, c, ok, base);         // read the number
+
+  if (i.good()) // last character read was non-numeric
+    i.putback(c);
+  else if (i.eof() && (ok || zero)) // stopped just before eof
+    i.clear();
+
+  if (ok)
+    mpz_set_str(z, s.c_str(), base); // extract the number
+  else if (zero)
+    mpz_set_ui(z, 0);
+  else
+    i.setstate(ios::failbit); // read failed
+
+  return i;
+}
+
+CGAL_INLINE_FUNCTION
+istream &
+//operator>> (istream &i, mpq_ptr q)
+io_read (istream &i, mpq_ptr q)
+{
+  int base;
+  char c = 0;
+  string s;
+  bool ok = false, zero, showbase;
+
+  i.get(c); // start reading
+
+  if (i.flags() & ios::skipws) // skip initial whitespace
+    while (isspace(c) && i.get(c))
+      ;
+
+  if (c == '-' || c == '+') // sign
+    {
+      if (c == '-')
+	s = "-";
+      i.get(c);
+    }
+
+  while (isspace(c) && i.get(c)) // skip whitespace
+    ;
+
+  base = __gmp_istream_set_base(i, c, zero, showbase); // select the base
+  __gmp_istream_set_digits(s, i, c, ok, base);         // read the numerator
+
+  if (! ok && zero) // the only digit read was "0"
+    {
+      base = 10;
+      s += '0';
+      ok = true;
+    }
+
+  if (i.flags() & ios::skipws)
+    while (isspace(c) && i.get(c)) // skip whitespace
+      ;
+
+  if (c == '/') // there's a denominator
+    {
+      bool zero2 = false;
+      int base2 = base;
+
+      s += '/';
+      ok = false; // denominator is mandatory
+      i.get(c);
+
+      while (isspace(c) && i.get(c)) // skip whitespace
+	;
+
+      if (showbase) // check base of denominator
+	base2 = __gmp_istream_set_base(i, c, zero2, showbase);
+
+      if (base2 == base || base2 == 10) // read the denominator
+	__gmp_istream_set_digits(s, i, c, ok, base);
+
+      if (! ok && zero2) // the only digit read was "0"
+	{                // denominator is 0, but that's your business
+	  s += '0';
+	  ok = true;
+	}
+    }
+
+  if (i.good()) // last character read was non-numeric
+    i.putback(c);
+  else if (i.eof() && ok) // stopped just before eof
+    i.clear();
+
+  if (ok)
+    mpq_set_str(q, s.c_str(), base); // extract the number
+  else
+    i.setstate(ios::failbit); // read failed
+
+  return i;
+}
+
+CGAL_INLINE_FUNCTION
+ostream&
+//operator<< (ostream &o, mpz_srcptr z)
+io_write (ostream &o, mpz_srcptr z)
+{ 
+  char *str = new char [mpz_sizeinbase(z,10) + 2];
+  str = mpz_get_str(str, 10, z);
+  o << str ;
+  delete[] str;
+  return o; 
+}
+
+CGAL_INLINE_FUNCTION
+ostream&
+//operator<< (ostream &o, mpq_srcptr q)
+io_write (ostream &o, mpq_srcptr q)
+{ 
+  // size according to GMP documentation
+  char *str = new char [mpz_sizeinbase(mpq_numref(q), 10) +
+                        mpz_sizeinbase (mpq_denref(q), 10) + 3];
+  str = mpq_get_str(str, 10, q);
+  o << str ;
+  delete[] str;
+  return o;
+}
+
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Impl.h
new file mode 100644
index 0000000..57d47a3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Impl.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_IMPL_H_
+#define _CORE_IMPL_H_
+
+#include <CGAL/CORE/Config.h>
+
+// The following lines only for MS Visual C++
+#ifdef _MSC_VER
+  #pragma warning(disable: 4291) // no matching operator delete found
+  #pragma warning(disable: 4146) 
+  #pragma warning(disable: 4267)
+  #pragma warning(disable: 4244) 
+#endif
+
+// condition preprocessor for inline function
+#ifndef CORE_DISABLE_INLINE
+  #define CORE_INLINE inline
+#else
+  #define CORE_INLINE
+#endif
+
+// Macros for memory pool
+#ifdef CORE_DISABLE_MEMORY_POOL
+  #define CORE_NEW(T)
+  #define CORE_DELETE(T)
+  #define CORE_MEMORY_IMPL(T)
+#else
+  #include <CGAL/CORE/MemoryPool.h>
+  #define CORE_NEW(T)  void *operator new( size_t size);
+  #define CORE_DELETE(T)  void operator delete( void *p, size_t );
+
+  #define CORE_MEMORY_IMPL(T)                                            \
+    void *T::operator new( size_t size)                                  \
+    { return MemoryPool<T>::global_allocator().allocate(size); }         \
+    void T::operator delete( void *p, size_t )                           \
+    { MemoryPool<T>::global_allocator().free(p); }
+#endif
+
+// include some common header files
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cmath>
+#include <cfloat>
+#include <cassert>
+#include <cctype>
+#include <climits>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <string>
+
+#endif // _CORE_IMPL_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/MemoryPool.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/MemoryPool.h
new file mode 100644
index 0000000..4bb17e2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/MemoryPool.h
@@ -0,0 +1,138 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: MemoryPool.h
+ * Synopsis:
+ *      a memory pool template class.
+ * 
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+#ifndef _CORE_MEMORYPOOL_H_
+#define _CORE_MEMORYPOOL_H_
+
+#include <new>           // for placement new
+#include <cassert>
+#include <CGAL/assertions.h>
+#include <vector>
+
+namespace CORE { 
+
+#define CORE_EXPANSION_SIZE 1024
+template< class T, int nObjects = CORE_EXPANSION_SIZE >
+class MemoryPool {
+private:
+   struct Thunk {
+      T object;
+      Thunk* next;
+   };
+
+public:
+   MemoryPool() : head( 0 ) {}
+
+  ~MemoryPool()
+  {
+    //CGAL_warning_code(
+      std::size_t count = 0;
+      Thunk* t = head;
+      while(t!=0){
+	++count;
+	t = t->next;
+      }
+    //);
+    //CGAL_warning_msg(count ==  nObjects * blocks.size(),
+    //                 "Cannot delete memory as there are cyclic references");
+
+    if(count ==  nObjects * blocks.size()){
+      for(std::size_t i=0; i < blocks.size();i++){
+        ::operator delete(blocks[i]);
+      }
+    }
+  }
+
+
+   void* allocate(std::size_t size);
+   void free(void* p);
+
+  // Access the corresponding static global allocator.
+  static MemoryPool<T>& global_allocator() {
+    return memPool;
+  }
+ 
+private:
+   Thunk* head; // next available block in the pool
+  std::vector<void*> blocks;
+
+private:
+  // Static global allocator.
+  static MemoryPool<T, nObjects> memPool;   
+};
+
+template <class T, int nObjects >
+MemoryPool<T, nObjects> MemoryPool<T, nObjects>::memPool;
+
+template< class T, int nObjects >
+void* MemoryPool< T, nObjects >::allocate(std::size_t) {
+   if ( head == 0 ) { // if no more memory in the pool
+      const int last = nObjects - 1;
+
+      // use the global operator new to allocate a block for the pool
+      Thunk* pool = reinterpret_cast<Thunk*>(
+	 ::operator new(nObjects * sizeof(Thunk)));
+
+      blocks.push_back(pool);
+      // initialize the chain (one-directional linked list)
+      head = pool;
+      for (int i = 0; i < last; ++i ) {
+	 pool[i].next = &pool[i+1];
+      }
+      pool[last].next = 0;
+   }
+
+   // set head to point to the next object in the list
+   Thunk* currentThunk = head;
+   head = currentThunk->next;
+
+   return currentThunk;
+}
+
+template< class T, int nObjects >
+void MemoryPool< T, nObjects >::free(void* t) {
+   CGAL_assertion(t != 0);     
+   if (t == 0) return; // for safety
+   if(blocks.empty()){
+     std::cerr << typeid(T).name() << std::endl;
+   }
+   assert (! blocks.empty());
+
+   // recycle the object memory, by putting it back into the chain
+   reinterpret_cast<Thunk*>(t)->next = head;
+   head = reinterpret_cast<Thunk*>(t);
+}
+
+} //namespace CORE
+
+#endif // _CORE_MEMORYPOOL_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Promote.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Promote.h
new file mode 100644
index 0000000..f730759
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Promote.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Expr.h
+ * Synopsis: a class of Expression in Level 3
+ *
+ * Written by
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu>
+ *       Vikram Sharma<sharma at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Source: /home/exact/cvsroot/exact/corelib/inc/CORE/Promote.h,v $
+ * $Revision$ $Date$
+ ***************************************************************************/
+
+#ifndef __PROMOTE_H__
+#define __PROMOTE_H__
+
+#include <CGAL/CORE/Impl.h>
+
+namespace CORE { 
+
+/// hasExactDivision()
+///   CHECKING if NT has exact division
+///   NOTE: it is important that the compiler does not try to
+///   prove theorems about arithmetic identities like "x*(y/x) == y"
+///   USAGE:  If you want to check if a number type NT has exact division, do for example,
+///            if (hasExactDivision< NT >::check()) ...
+///   		We use this in Polynomial<NT> class.
+template < class NT >
+struct hasExactDivision {
+  static bool check() {		// This default function is supposed to work for NT other than BigRat or Expr
+     return false;
+  }
+};
+
+template<> struct hasExactDivision<Expr> {
+  static bool check() {
+     return true;
+  }
+};
+template<> struct hasExactDivision<BigRat> {
+  static bool check() {
+     return true;
+  }
+};
+
+template<typename T1, typename T2>
+class Promotion;
+
+template<typename T>
+class Promotion<T, T> {
+  public:
+    typedef T ResultT;
+};
+
+#define MAX_TYPE(T1, T2)		\
+  typename Promotion<T1, T2>::ResultT
+
+#define DEFINE_MAX_TYPE(T1, T2, Tr)	\
+  template<> class Promotion<T1, T2> {	\
+    public:				\
+      typedef Tr ResultT;		\
+  };					\
+  template<> class Promotion<T2, T1> {	\
+    public:				\
+      typedef Tr ResultT;		\
+  };
+
+/*
+ * For example:
+ *
+ * DEFINE_MAX_TYPE(BigInt, BigRat, BigRat)   	// define the promotion
+ *
+ * template<typename T1, typename T2> 		// define function f with type templates
+ *   MAX_TYPE(T1, T2) f(T1& , T2& );
+ *
+ * or
+ *
+ * template<typename T1, typename T2> 		// define function f with type templates
+ *   const MAX_TYPE(T1, T2)& f(T1& , T2& );
+ *
+ * BigInt  a  =  1;
+ * BigRat  b  = "1/3";
+ * BigRat  c  =  f(a, b);			// or, typename Promotion<BigInt, BigRat>::ResultT c = f(a,b);
+ *
+ * REMARK: this mechanism is used by the eval function for polynomial evaluation (see Poly.tcc)
+ * where the two types are NT (type of coefficients) and N (type of evaluation point).
+ */
+
+/* 
+ * primary types: (11)
+ *
+ * 	bool, 
+ *	char, unsigned char, 
+ *	short, unsigned short,
+ * 	int, unsigned int, 
+ *	long, unsigned long, 
+ *	float, double
+ *
+ * CORE types: (5)
+ *
+ * 	BigInt < BigFloat < BigRat < Real < Expr
+ *
+ *      (NOTE: BigFloat here must be error-free)
+ *
+ */
+
+class BigInt;
+class BigFloat;
+class BigRat;
+class Expr;
+
+DEFINE_MAX_TYPE(long, BigInt, BigInt)
+DEFINE_MAX_TYPE(long, BigFloat, BigFloat)
+DEFINE_MAX_TYPE(long, BigRat, BigRat)
+DEFINE_MAX_TYPE(long, Expr, Expr)
+
+DEFINE_MAX_TYPE(int, BigInt, BigInt)
+DEFINE_MAX_TYPE(int, BigFloat, BigFloat)
+DEFINE_MAX_TYPE(int, BigRat, BigRat)
+DEFINE_MAX_TYPE(int, Expr, Expr)
+
+DEFINE_MAX_TYPE(BigInt, BigFloat, BigFloat)
+DEFINE_MAX_TYPE(BigInt, BigRat, BigRat)
+DEFINE_MAX_TYPE(BigInt, Expr, Expr)
+
+DEFINE_MAX_TYPE(BigFloat, BigRat, BigRat)
+DEFINE_MAX_TYPE(BigFloat, Expr, Expr)
+
+DEFINE_MAX_TYPE(BigRat, Expr, Expr)
+
+} //namespace CORE
+
+#endif //__PROMOTE_H__
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Real.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Real.h
new file mode 100644
index 0000000..9c6d146
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Real.h
@@ -0,0 +1,502 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Real.h
+ * 
+ * Synopsis: The Real class is a superclass for all the number 
+ *           systems in the Core Library (int, long, float, double,
+ *           BigInt, BigRat, BigFloat, etc)
+ * 
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+#ifndef _CORE_REAL_H_
+#define _CORE_REAL_H_
+#include "RealRep.h"
+
+namespace CORE { 
+// class Real
+typedef RCImpl<RealRep> RCReal;
+class Real : public RCReal {
+public:
+  Real(int i=0) : RCReal(new RealLong(i)) {}
+  Real(unsigned int ui) : RCReal(NULL) {
+    (ui<=INT_MAX) ? (rep=new RealLong(static_cast<int>(ui))) : (rep=new RealBigInt(ui));
+  }
+  Real(long l) : RCReal(new RealLong(l)) {}
+  Real(unsigned long ul) : RCReal(NULL) {
+    (ul<=LONG_MAX) ? (rep=new RealLong(static_cast<long>(ul))) : (rep=new RealBigInt(ul));
+  }
+  Real(float f) : RCReal(new RealDouble(f)) {}
+  Real(double d) : RCReal(new RealDouble(d)) {}
+  Real(const BigInt& I) : RCReal(new RealBigInt(I)) {}
+  Real(const BigRat& R) : RCReal(new RealBigRat(R)) {}
+  Real(const BigFloat& F) : RCReal(new RealBigFloat(F)) {}
+  Real(const char* s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL) {
+    constructFromString(s, prec);
+  }
+  Real(const std::string& s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL){
+    constructFromString(s.c_str(), prec);
+  }
+
+  /// \name Copy-Assignment-Destructor
+  //@{
+  /// copy constructor
+  Real(const Real& rhs) : RCReal(rhs) {
+    rep->incRef();
+  }
+  /// assignment operator
+  Real& operator=(const Real& rhs) {
+    if (this != &rhs) {
+      rep->decRef();
+      rep = rhs.rep;
+      rep->incRef();
+    }
+    return *this;
+  }
+  /// destructor
+  ~Real() {
+    rep->decRef();
+  }
+  //@}
+
+  /// \name Compound Assignment Operators
+  //@{
+  /// operator+=
+  Real& operator+=(const Real& x);
+  /// operator-=
+  Real& operator-=(const Real& x);
+  /// operator*=
+  Real& operator*=(const Real& x);
+  /// operator/=
+  Real& operator/=(const Real& x);
+  //@}
+
+  /// \name Unary Minus, Increment and Decrement Operators
+  //@{
+  /// unary plus
+  Real operator+() const {
+    return Real(*this);
+  }
+  /// unary minus
+  Real operator-() const {
+    return -(*rep);
+  }
+  /// left increment operator (++i)
+  Real& operator++() {
+    *this += 1;
+    return *this;
+  }
+  /// left decrement operator (--i)
+  Real& operator--() {
+    *this -= 1;
+    return *this;
+  }
+  /// right increment operator (i++)
+  Real operator++(int) {
+    Real t(*this);
+    *this += 1;
+    return t;
+  }
+  /// right deccrement operator (i--)
+  Real operator--(int) {
+    Real t(*this);
+    *this -= 1;
+    return t;
+  }
+  //@}
+
+  /// \name String Conversion Functions
+  //@{
+  /// set value from <tt>const char*</tt>
+  void fromString(const char* s, const extLong& prec = get_static_defInputDigits()) {
+    *this = Real(s, prec);
+  }
+  /// convert to <tt>std::string</tt>
+  /** give decimal string representation */
+  std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) const {
+    return rep->toString(prec, sci);
+  }
+  //@}
+
+  /// \name Conversion Functions
+  //@{
+  /// convert to \c int
+  int intValue() const {
+    return static_cast<int>(longValue());
+  }
+  /// convert to \c long
+  long longValue() const {
+    return rep->longValue();
+  }
+  /// convert to \c float
+  float floatValue() const {
+    return static_cast<float>(doubleValue());
+  }
+  /// convert to \c double
+  double doubleValue() const {
+    return rep->doubleValue();
+  }
+  /// convert to \c BigInt
+  BigInt BigIntValue() const {
+    return rep->BigIntValue();
+  }
+  /// convert to \c BigRat
+  BigRat BigRatValue() const {
+    return rep->BigRatValue();
+  }
+  /// convert to \c BigFloat (approximate it first!)
+  BigFloat BigFloatValue() const {
+    return rep->BigFloatValue();
+  }
+  //@}
+
+  /// \name Aprroximation Function
+  //@{
+  /// approximation
+  Real approx(const extLong& r=get_static_defRelPrec(), 
+              const extLong& a=get_static_defAbsPrec()) const {
+    return rep->approx(r, a);
+  }
+  //@}
+
+  /// \name Helper Functions
+  //@{
+  /// sign function
+  int sign() const {
+    return rep->sgn();
+  }
+  /// isZero function
+  bool isZero() const {
+    return sign() == 0;
+  }
+  /// return true if interval contains zero
+  bool isZeroIn() const {
+    return rep->isZeroIn();
+  }
+  /// absolute value function
+  Real abs() const {
+    return (sign() >= 0) ? +(*this) : -(*this);
+  }
+
+  /// get mantissa of current approximate value
+  BigInt getMantissa() const {
+    return BigFloatValue().m();
+  }
+  /// get exponent of current approximate value
+  long getExponent() const {
+    return BigFloatValue().exp();
+  }
+
+  /// return true if error free otherwise return false;
+  bool  isExact() const {
+    return rep->isExact();
+  }
+
+  /// low bound of MSB
+  extLong lMSB() const {
+    return isExact() ? MSB():(rep->BigFloatValue()).lMSB();
+  }
+  /// upper bound of MSB
+  extLong uMSB() const {
+    return isExact() ? MSB():(rep->BigFloatValue()).uMSB();
+  }
+  /// MSB - Most Significant Bit
+  extLong MSB() const {
+    return rep->mostSignificantBit;
+  }
+
+  /// floor of log_2 of Error
+  extLong flrLgErr() const {
+    return rep->flrLgErr();
+  }
+  /// ceil of log_2 of Error
+  extLong clLgErr() const {
+    return rep->clLgErr();
+  }
+
+  /// division with desired precision
+  Real div(const Real& x, const extLong& r) const;
+  /// squareroot
+  Real sqrt(const extLong& x) const {
+    return rep->sqrt(x);
+  }
+  /// squareroot with initial approximation
+  Real sqrt(const extLong& x, const BigFloat& A) const {
+    return rep->sqrt(x, A);
+  }
+
+  /// correspond to the variables "u25, l25, v2p, v2m, v5p, v5m" in Expr
+  void ULV_E(extLong &up, extLong &lp, extLong &v2p, extLong &v2m,
+             extLong &v5p, extLong &v5m) const {
+    rep->ULV_E(up, lp, v2p, v2m, v5p, v5m);
+  }
+
+  /// degree of polynomial P(x)
+  unsigned long degree() const {
+    return rep->degree();
+  }
+  /// \f$ lg(|| P(X) ||_2) \f$
+  unsigned long length() const {
+    return rep->length();
+  }
+  /// \f$ lg(|| P(X) ||_\infty) \f$
+  unsigned long height() const {
+    return rep->height();
+  }
+  //@}
+
+  /// return Real(0)
+  CGAL_CORE_EXPORT static const Real& getZero();
+private:
+  CGAL_CORE_EXPORT void constructFromString(const char *str, const extLong& prec);
+};
+
+#define CORE_REAL_ZERO Real::getZero()
+
+const long halfLongMax = LONG_MAX /2;
+const long halfLongMin = LONG_MIN /2;
+
+struct _real_add {
+  template <class T>
+  static Real eval(const T& a, const T& b) {
+    return a+b;
+  }
+  // specialized for two long values
+  static Real eval(long a, long b) {
+    if ((a > halfLongMax && b > halfLongMax) || (a < halfLongMin && b < halfLongMin))
+      return BigInt(a)+BigInt(b);
+    else
+      return a+b;
+  }
+};
+
+struct _real_sub {
+  template <class T>
+  static Real eval(const T& a, const T& b) {
+    return a-b;
+  }
+  // specialized for two long values
+  static Real eval(long a, long b) {
+    if ((a > halfLongMax && b < halfLongMin) || (a < halfLongMin && b > halfLongMax))
+      return BigInt(a)-BigInt(b);
+    else
+      return a-b;
+  }
+};
+
+struct _real_mul {
+  template <class T>
+  static Real eval(const T& a, const T& b) {
+    return a*b;
+  }
+  // specialized for two long values
+  static Real eval(long a, long b) {
+    if (flrLg(a) + flrLg(b) >= static_cast<int>(LONG_BIT-2))
+      return BigInt(a)*BigInt(b);
+    else
+      return a*b;
+  }
+};
+
+template <class Op>
+struct _real_binary_op {
+  static Real eval(const RealRep& a, const RealRep& b) {
+    if (a.ID() == REAL_BIGRAT || b.ID() == REAL_BIGRAT) {
+      if (!a.isExact()) { // a must be a BigFloat and b must be a BigRat
+        BigFloat bf_a = a.BigFloatValue(), bf_b;
+        bf_b.approx(b.BigRatValue(), CORE_posInfty, -bf_a.flrLgErr());
+        return Op::eval(bf_a, bf_b);
+      } else if (!b.isExact()) { // a must be a BigRat and b must be a BigFloat
+        BigFloat bf_a, bf_b = b.BigFloatValue();
+        bf_a.approx(a.BigRatValue(), CORE_posInfty, -bf_b.flrLgErr());
+        return Op::eval(bf_a, bf_b);
+      } else // both are BigRat
+        return Op::eval(a.BigRatValue(), b.BigRatValue());
+    } else if (a.ID() == REAL_BIGFLOAT || b.ID() == REAL_BIGFLOAT
+               || a.ID() == REAL_DOUBLE || b.ID() == REAL_DOUBLE) {
+      return Op::eval(a.BigFloatValue(), b.BigFloatValue());
+    } else if (a.ID() == REAL_BIGINT || b.ID() == REAL_BIGINT) {
+      return Op::eval(a.BigIntValue(), b.BigIntValue());
+    } else { // a.ID() == REAL_LONG && b.ID() == REAL_LONG
+      return Op::eval(a.longValue(), b.longValue());
+    }
+  }
+};
+
+typedef _real_binary_op<_real_add> real_add;
+typedef _real_binary_op<_real_sub> real_sub;
+typedef _real_binary_op<_real_mul> real_mul;
+
+struct real_div {
+  static Real eval(const RealRep& a, const RealRep& b, const extLong& r) {
+    if (a.ID() == REAL_BIGRAT || b.ID() == REAL_BIGRAT) {
+      if (!a.isExact()) { // a must be a BigFloat and b must be a BigRat
+        BigFloat bf_a = a.BigFloatValue(), bf_b;
+        bf_b.approx(b.BigRatValue(), bf_a.MSB() - bf_a.flrLgErr() + 1, CORE_posInfty);
+        return bf_a.div(bf_b, r);
+      } else if (!b.isExact()) { // a must be a BigRat and b must be a BigFloat
+        BigFloat bf_a, bf_b = b.BigFloatValue();
+        bf_a.approx(a.BigRatValue(), bf_b.MSB() - bf_b.flrLgErr() + 1, CORE_posInfty);
+        return bf_a.div(bf_b, r);
+      } else // both are BigRat
+        return a.BigRatValue()/b.BigRatValue();
+    } else if (a.ID() == REAL_BIGFLOAT || b.ID() == REAL_BIGFLOAT
+               || a.ID() == REAL_DOUBLE || b.ID() == REAL_DOUBLE) {
+      return a.BigFloatValue().div(b.BigFloatValue(), r);
+    } else if (a.ID() == REAL_BIGINT || b.ID() == REAL_BIGINT) {
+      return BigRat(a.BigIntValue(), b.BigIntValue());
+    } else { // a.ID() == REAL_LONG && b.ID() == REAL_LONG
+      return BigRat(a.longValue(), b.longValue());
+    }
+  }
+};
+
+CGAL_CORE_EXPORT std::istream& operator>>(std::istream& i, Real& r);
+
+inline std::ostream& operator<<(std::ostream& o, const Real& r) {
+  return r.getRep().operator<<(o);
+}
+
+inline Real& Real::operator+=(const Real& rhs) {
+  *this = real_add::eval(getRep(), rhs.getRep());
+  return *this;
+}
+inline Real& Real::operator-=(const Real& rhs) {
+  *this = real_sub::eval(getRep(), rhs.getRep());
+  return *this;
+}
+inline Real& Real::operator*=(const Real& rhs) {
+  *this = real_mul::eval(getRep(), rhs.getRep());
+  return *this;
+}
+inline Real& Real::operator/=(const Real& rhs) {
+  *this = real_div::eval(getRep(), rhs.getRep(), get_static_defRelPrec());
+  return *this;
+}
+
+// operator+
+inline Real operator+(const Real& x, const Real& y) {
+  return real_add::eval(x.getRep(), y.getRep());
+}
+// operator-
+inline Real operator-(const Real& x, const Real& y) {
+  return real_sub::eval(x.getRep(), y.getRep());
+}
+// operator*
+inline Real operator*(const Real& x, const Real& y) {
+  return real_mul::eval(x.getRep(), y.getRep());
+}
+// operator/
+inline Real operator/(const Real& x, const Real& y) {
+  return real_div::eval(x.getRep(), y.getRep(), get_static_defRelPrec());
+}
+// div w/ precision
+inline Real Real::div(const Real& x, const extLong& r) const {
+  return real_div::eval(getRep(), x.getRep(), r);
+}
+
+inline int cmp(const Real& x, const Real& y) {
+  return (x-y).sign();
+}
+inline bool operator==(const Real& x, const Real& y) {
+  return cmp(x, y) == 0;
+}
+inline bool operator!=(const Real& x, const Real& y) {
+  return cmp(x, y) != 0;
+}
+inline bool operator>=(const Real& x, const Real& y) {
+  return cmp(x, y) >= 0;
+}
+inline bool operator>(const Real& x, const Real& y) {
+  return cmp(x, y) > 0;
+}
+inline bool operator<=(const Real& x, const Real& y) {
+  return cmp(x, y) <= 0;
+}
+inline bool operator<(const Real& x, const Real& y) {
+  return cmp(x, y) < 0;
+}
+
+/// floor function
+CGAL_CORE_EXPORT BigInt floor(const Real&, Real&);
+/// power function
+CGAL_CORE_EXPORT Real pow(const Real&, unsigned long);
+
+/// return sign
+inline int sign(const Real& r) {
+  return r.sign();
+}
+/// is zero?
+inline bool isZero(const Real& r) {
+  return r.sign() == 0;
+}
+/// absolute value
+inline Real abs(const Real& x) {
+  return x.abs();
+}
+/// absolute value (same as abs)
+inline Real fabs(const Real& x) {
+  return abs(x);
+}
+/// floor
+inline BigInt floor(const Real& r) {
+  Real tmp;
+  return floor(r, tmp);
+}
+/// ceiling
+inline BigInt ceil(const Real& r) {
+  return -floor(-r);
+}
+/// power
+inline Real power(const Real& r, unsigned long p) {
+  return pow(r, p);
+}
+/// square root
+inline Real sqrt(const Real& x) {
+  return x.sqrt(get_static_defAbsPrec());
+}
+
+// class Realbase_for (need defined after Real)
+// unary minus operator
+template <class T>
+inline Real Realbase_for<T>::operator-() const {
+  return -ker;
+}
+template <>
+inline Real RealLong::operator-() const {
+  return ker < -LONG_MAX ? -BigInt(ker) : -ker;
+}
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/Real_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_REAL_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/RealRep.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/RealRep.h
new file mode 100644
index 0000000..9aa4868
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/RealRep.h
@@ -0,0 +1,517 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: RealRep.h
+ * Synopsis: 
+ * 		Internal Representation for Real
+ *
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ * 
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+#ifndef _CORE_REALREP_H_
+#define _CORE_REALREP_H_
+#include "BigFloat.h"
+
+namespace CORE { 
+
+class Real;
+
+class RealRep {
+public:
+  extLong mostSignificantBit;
+public:
+  RealRep() : refCount(1) {}
+  virtual ~RealRep() {}
+  virtual int ID() const = 0;
+
+  virtual long longValue() const = 0;
+  virtual double doubleValue() const = 0;
+  virtual BigInt BigIntValue() const = 0;
+  virtual BigRat BigRatValue() const = 0;
+  virtual BigFloat BigFloatValue() const = 0;
+
+  virtual BigFloat approx(const extLong&, const extLong&) const = 0;
+  virtual Real operator-() const = 0;
+
+  virtual bool isExact() const = 0;
+  virtual int sgn() const = 0;
+  virtual bool isZeroIn() const = 0;
+
+  virtual BigFloat sqrt(const extLong&) const = 0;
+  virtual BigFloat sqrt(const extLong&, const BigFloat&) const = 0;
+
+  virtual void ULV_E(extLong &, extLong&, extLong&,
+		  extLong&, extLong&, extLong&) const = 0;
+  virtual extLong flrLgErr() const = 0;
+  virtual extLong clLgErr() const = 0;
+  virtual unsigned long degree() const = 0;
+  virtual unsigned long length() const = 0;
+  virtual unsigned long height() const = 0;
+
+  virtual std::string toString(long prec, bool sci) const = 0;
+  virtual std::ostream& operator<<(std::ostream& o) const = 0;
+public:
+  void incRef() {
+    ++refCount;
+  }
+  void decRef() {
+    if (--refCount == 0)
+      delete this;
+  }
+  int getRefCount() const {
+    return refCount;
+  }
+private:
+  int refCount;
+};//realRep class
+
+template <class T>
+class Realbase_for : public RealRep {
+public:
+
+  CGAL_CORE_EXPORT CORE_NEW(Realbase_for)
+  CGAL_CORE_EXPORT CORE_DELETE(Realbase_for)
+
+  Realbase_for(const T& k);
+  ~Realbase_for() {}
+  int ID() const;
+
+  long longValue() const {
+    return ker.longValue();
+  }
+  double doubleValue() const {
+    return ker.doubleValue();
+  }
+  BigInt BigIntValue() const {
+    return BigInt(ker);
+  }
+  BigRat BigRatValue() const {
+    return BigRat(ker);
+  }
+  BigFloat BigFloatValue() const {
+    return BigFloat(ker);
+  }
+
+  BigFloat approx(const extLong&, const extLong&) const;
+  Real operator-() const;
+
+  bool isExact() const {
+    return true;
+  }
+  int sgn() const {
+    return ker > 0.0 ? 1 : ( ker == 0.0 ? 0 : -1);
+  }
+  bool isZeroIn() const {
+    return ker == 0.0;
+  }
+
+  BigFloat sqrt(const extLong&) const;
+  BigFloat sqrt(const extLong&, const BigFloat&) const;
+
+  void ULV_E(extLong &, extLong&, extLong&, extLong&, extLong&, extLong&) const;
+  extLong flrLgErr() const {
+    return CORE_negInfty;
+  }
+  extLong clLgErr() const {
+    return CORE_negInfty;
+  }
+  unsigned long degree() const {
+    return 1;
+  }
+  unsigned long length() const;
+  unsigned long height() const;
+
+  std::string toString(long, bool) const {
+    std::stringstream st;
+    st << ker;
+    return st.str();
+  }
+  std::ostream& operator<<(std::ostream& o) const {
+    return o << ker;
+  }
+private:
+  T ker;
+};//Realbase_for class
+
+typedef Realbase_for<long> RealLong;
+typedef Realbase_for<double> RealDouble;
+typedef Realbase_for<BigInt> RealBigInt;
+typedef Realbase_for<BigRat> RealBigRat;
+typedef Realbase_for<BigFloat> RealBigFloat;
+
+enum { REAL_LONG, REAL_DOUBLE, REAL_BIGINT, REAL_BIGRAT, REAL_BIGFLOAT };
+
+// constructors
+template<>
+inline RealLong::Realbase_for(const long& l) : ker(l) {
+  mostSignificantBit = (ker != 0 ) ? extLong(flrLg(ker)) : CORE_negInfty;
+}
+template<>
+inline RealDouble::Realbase_for(const double& d) : ker(d) {
+  mostSignificantBit = BigFloat(ker).MSB();
+}
+template<>
+inline RealBigInt::Realbase_for(const BigInt& l) : ker(l) {
+  mostSignificantBit = (sign(ker)) ? extLong(floorLg(ker)) : CORE_negInfty;
+}
+template<>
+inline RealBigRat::Realbase_for(const BigRat& l) : ker(l) {
+  mostSignificantBit = BigFloat(ker).MSB();
+}
+template<>
+inline RealBigFloat::Realbase_for(const BigFloat& l) : ker(l) {
+  mostSignificantBit = ker.MSB();
+}
+
+// ID()
+template<>
+inline int RealLong::ID() const {
+  return REAL_LONG;
+}
+template<>
+inline int RealDouble::ID() const {
+  return REAL_DOUBLE;
+}
+template<>
+inline int RealBigInt::ID() const {
+  return REAL_BIGINT;
+}
+template<>
+inline int RealBigRat::ID() const {
+  return REAL_BIGRAT;
+}
+template<>
+inline int RealBigFloat::ID() const {
+  return REAL_BIGFLOAT;
+}
+
+// cast functions
+template<>
+inline long RealLong::longValue() const {
+  return ker;
+}
+template<>
+inline long RealDouble::longValue() const {
+  return static_cast<long>(ker);
+}
+template<>
+inline double RealLong::doubleValue() const {
+  return static_cast<double>(ker);
+}
+template<>
+inline double RealDouble::doubleValue() const {
+  return ker;
+}
+template<>
+inline BigInt   RealBigInt::BigIntValue() const {
+  return ker;
+}
+template<>
+inline BigInt   RealBigRat::BigIntValue() const {
+  return ker.BigIntValue();
+}
+template<>
+inline BigInt RealBigFloat::BigIntValue() const {
+  return ker.BigIntValue();
+}
+template<>
+inline BigRat   RealBigRat::BigRatValue() const {
+  return ker;
+}
+template<>
+inline BigRat RealBigFloat::BigRatValue() const {
+  return ker.BigRatValue();
+}
+template<>
+inline BigFloat RealBigFloat::BigFloatValue() const {
+  return ker;
+}
+
+// isExact()
+template<>
+inline bool RealBigFloat::isExact() const {
+  return ker.isExact();
+}
+
+// sign()
+template<>
+inline int RealBigInt::sgn() const {
+  return sign(ker);
+}
+template<>
+inline int RealBigRat::sgn() const {
+  return sign(ker);
+}
+template<>
+inline int RealBigFloat::sgn() const {
+  return ker.sign();
+}
+
+// isZeroIn()
+template<>
+inline bool RealBigInt::isZeroIn() const {
+  return sign(ker) == 0;
+}
+template<>
+inline bool RealBigRat::isZeroIn() const {
+  return sign(ker) == 0;
+}
+template<>
+inline bool RealBigFloat::isZeroIn() const {
+  return ker.isZeroIn();
+}
+
+// approx
+template <class T>
+inline BigFloat Realbase_for<T>::approx(const extLong& r, const extLong& a) const {
+  BigFloat x;
+  x.approx(ker, r, a);
+  return x;
+}
+template <>
+inline BigFloat RealLong::approx(const extLong& r, const extLong& a) const {
+  BigFloat x;
+  x.approx(BigInt(ker), r, a);
+  return x;
+}
+template <>
+inline BigFloat RealDouble::approx(const extLong& r, const extLong& a) const {
+  BigFloat x;
+  x.approx(BigRat(ker), r, a);
+  return x;
+}
+
+// sqrt
+template <class T>
+inline BigFloat Realbase_for<T>::sqrt(const extLong& a) const {
+  return BigFloat(ker).sqrt(a);
+}
+template <class T>
+inline BigFloat Realbase_for<T>::sqrt(const extLong& a, const BigFloat& A) const {
+  return BigFloat(ker).sqrt(a, A);
+}
+
+// ULV_E()
+template<>
+inline void RealLong::ULV_E(extLong &up, extLong &lp, extLong &v2p,
+                            extLong &v2m, extLong &v5p, extLong &v5m) const {
+  // TODO : extract the power of 5.
+  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
+  if (ker == 0)
+    return;
+
+  // Extract the power of 2.
+  unsigned long exp = 0;
+  unsigned long tmp_ker = ker;
+  while ((tmp_ker&1) != 0) {
+    tmp_ker = tmp_ker/2;
+    ++exp;
+  }
+  up = clLg(tmp_ker);
+  lp = 0;
+  v2p = exp;
+}
+template<>
+inline void RealDouble::ULV_E(extLong &up, extLong &lp, extLong &v2p,
+                              extLong &v2m, extLong &v5p, extLong &v5m) const {
+  // TODO : can probably be made faster using frexp() or such.
+  // TODO : extract the power of 5.
+  BigRat R = BigRat(ker);
+  up  = ceilLg(numerator(R));
+  v2m = ceilLg(denominator(R));
+  lp = v2p = v5m = v5p = EXTLONG_ZERO;
+}
+template<>
+inline void RealBigInt::ULV_E(extLong &up, extLong &lp, extLong &v2p,
+                              extLong &v2m, extLong &v5p, extLong &v5m) const {
+  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
+  if (ker == 0)
+    return;
+
+  // Extract power of 5.
+  int exp5;
+  BigInt remainder5;
+  getKaryExpo(ker, remainder5, exp5, 5);
+  v5p = exp5;
+  // Extract power of 2.
+  int exp2 = getBinExpo(remainder5);
+  up = ceilLg(remainder5) - exp2;
+  v2p = exp2;
+}
+template<>
+inline void RealBigRat::ULV_E(extLong &up, extLong &lp, extLong &v2p,
+                              extLong &v2m, extLong &v5p, extLong &v5m) const {
+  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
+  if (ker == 0)
+    return;
+
+  // Extract power of 5.
+  int exp5;
+  BigInt num5, den5;
+  getKaryExpo(numerator(ker), num5, exp5, 5);
+  if (exp5 != 0) {
+    v5p = exp5;
+    den5 = denominator(ker);
+  } else {
+    getKaryExpo(denominator(ker), den5, exp5, 5);
+    v5m = exp5;
+  }
+
+  // Now we work with num5/den5.
+  int exp2 = getBinExpo(num5);
+  if (exp2 != 0) {
+    v2p = exp2;
+  } else {
+    exp2 = getBinExpo(den5);
+    v2m = exp2;
+  }
+
+  up = ceilLg(num5) - v2p;
+  lp = ceilLg(den5) - v2m;
+}
+template<>
+inline void RealBigFloat::ULV_E(extLong &up, extLong &lp, extLong &v2p,
+                                extLong &v2m, extLong &v5p, extLong &v5m) const {
+  // TODO : extract power of 5.
+  up = lp = v2p = v2m = v5p = v5m = EXTLONG_ZERO;
+  BigRat R = ker.BigRatValue();
+  up  = ceilLg(numerator(R));
+  v2m = ceilLg(denominator(R));
+}
+
+// flrLgErr && clLgErr
+template<>
+inline extLong RealBigFloat::flrLgErr() const {
+  return ker.flrLgErr();
+}
+template<>
+inline extLong RealBigFloat::clLgErr() const {
+  return ker.clLgErr();
+}
+
+// height && length
+template<>
+inline unsigned long RealLong::length() const {
+  return clLg(1+ core_abs(ker));
+}	// length is (log_2(1+ker^2)) /2.
+
+template<>
+inline unsigned long RealLong::height() const {
+  return clLg(core_max(1L, core_abs(ker)));
+}	// height is max{1, |ker|}
+
+template<>
+inline unsigned long RealDouble::length() const {
+  BigRat R  = BigRat(ker);
+  long ln = 1 + ceilLg(numerator(R));
+  long ld = 1 + ceilLg(denominator(R));
+  return (ln>ld) ? ln : ld; ///< an upper bound on log_2(sqrt(num^2+den^2))
+}
+
+template<>
+inline unsigned long RealDouble::height() const {
+  BigRat R  = BigRat(ker);
+  long ln = ceilLg(numerator(R));
+  long ld = ceilLg(denominator(R));
+  return (ln>ld) ? ln : ld; ///< an upper bound on log_2(max(|num|, |den|))
+}
+template<>
+inline unsigned long RealBigInt::length() const {
+  return ceilLg(1 + abs(ker));
+}
+
+template<>
+inline unsigned long RealBigInt::height() const {
+  BigInt r(abs(ker));
+  if (r<1)
+    r = 1;
+  return ceilLg(r);
+}
+
+template<>
+inline unsigned long RealBigFloat::length() const {
+  // Chen Li: A bug fixed.
+  // The statement in the older version with the bug was:
+  //   BigRat R  = BigRat(ker);
+  // The BigRat(BigFloat) actually is a
+  // conversion operator (defined in BigFloat.h), _NOT_
+  // an ordinary class constructor! The C++ language
+  // specify that an intialization is not an assignment
+  // but a constructor operation!
+  // Considering that BigRat(BigFloat) is a conversion
+  // operator not really a constructor. The programmer's
+  // intent is obvious to do an assignment.
+  // However, the g++ seems to be confused by the above
+  // initialization.
+  BigRat R  = ker.BigRatValue();
+  long   ln = 1 + ceilLg(numerator(R));
+  long   ld = 1 + ceilLg(denominator(R));
+  return ( ln > ld ) ? ln : ld;
+}
+
+template<>
+inline unsigned long RealBigFloat::height() const {
+  // Chen Li: A bug fixed. The old statement with the bug was:
+  //   BigRat R  = BigRat(ker);
+  // Detailed reasons see above (in RealBigFloat::length()!
+  BigRat R  = ker.BigRatValue();
+  long     ln = ceilLg(numerator(R));
+  long     ld = ceilLg(denominator(R));
+  return   ( ln > ld ) ? ln : ld;
+}
+
+template<>
+inline unsigned long RealBigRat::length() const {
+  long ln = 1 + ceilLg(numerator(ker));
+  long ld = 1 + ceilLg(denominator(ker));
+  return ( ln > ld ) ? ln : ld;
+}
+
+template<>
+inline unsigned long RealBigRat::height() const {
+  long ln = ceilLg(numerator(ker));
+  long ld = ceilLg(denominator(ker));
+  return (ln > ld ) ? ln : ld;
+}
+
+// toString()
+template<>
+inline std::string RealBigInt::toString(long, bool) const {
+  return ker.get_str();
+}
+template<>
+inline std::string RealBigRat::toString(long, bool) const {
+  return ker.get_str();
+}
+template<>
+inline std::string RealBigFloat::toString(long prec, bool sci) const {
+  return ker.toString(prec, sci);
+}
+
+} //namespace CORE
+#endif // _CORE_REALREP_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Real_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Real_impl.h
new file mode 100644
index 0000000..8da773d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Real_impl.h
@@ -0,0 +1,292 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Real.cpp
+ * Synopsis: The Real class is a superclass for all the number 
+ *           systems in the Core Library (int, long, float, double,
+ *           BigInt, BigRat, BigFloat, etc)
+ *           
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <ctype.h>
+#include <CGAL/CORE/Real.h>
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/BigFloat.h> // for FiveTo
+#endif
+
+namespace CORE { 
+
+CGAL_INLINE_FUNCTION
+const Real& Real::getZero() {
+  static Real Zero(0);
+  return Zero;
+}
+
+CGAL_INLINE_FUNCTION
+BigInt floor(const Real& r, Real &sub) {
+  BigInt f = r.approx(CORE_INFTY, 2).BigIntValue();
+  sub = r-f;
+  // Adjustment
+  if (sub<0)
+    ++sub, --f;
+  if (sub>=1)
+    --sub, ++f;
+  assert(sub >=0 && sub<1);
+  return f;
+}
+
+// pow(r,n) and power(r, n) are the same function
+//
+CGAL_INLINE_FUNCTION
+Real pow(const Real& r, unsigned long n) {
+  if (n == 0)
+    return Real(1);
+  else if (n == 1)
+    return r;
+  else {
+    Real x = r;
+    while ((n % 2) == 0) { // n is even
+      x *= x;
+      n >>= 1;
+    }
+    Real u = x;
+    while (true) {
+      n >>= 1;
+      if (n == 0)
+        return u;
+      x *= x;
+      if ((n % 2) == 1) // n is odd
+        u *= x;
+    }
+    //return u; // unreachable
+  }
+}//pow
+
+extern BigInt FiveTo(unsigned long exp);
+
+// Construct Real from String
+// Note:
+// 	-- Zilin Du: 06/03/2003
+// 	-- Original it is the code for Real's constructor for "const char*".
+// 	   I change it to a function so that two constrcutors can share the code.
+// 	   now it is private and no default value.
+//
+//   --Default value of the argument "prec" is get_static_defInputDigits()
+//   --If prec is CORE_posInfty, then the input is
+//	read in exactly.  Otherwise, we convert to a RealBigFloat
+//	with absolute error at most 10^{-prec}
+
+// Constructor Real( char *str, extLong& prec)
+//	is very similar to
+//		BigFloatRep::fromString( char *str, extLong& prec);
+// Differences:
+//	In BigFloat(str, prec), the value of prec cannot be infinity, and
+//		it defaults to defBigFloatInputDigits;
+//	In Real(str, prec), the value of prec is allowed to be infinity, and
+//		it defaults to defInputDigits.
+//
+// Why do we have the two versions?  It allows us to use the BigFloat class
+//	directly, without relying on Real class.
+
+CGAL_INLINE_FUNCTION
+void Real::constructFromString(const char *str, const extLong& prec )
+// NOTE: prec defaults to get_static_defInputDigits() (see Real.h)
+{
+  //	8/8/01, Chee and Zilin: add a new rational string format:
+  //		this format is indicated by the presence of a slash "/"
+  //		Moreover, the value of prec is ignored (basically
+  //		assumed to be infinity).
+
+  if (std::strchr(str, '/') != NULL) {	// this is a rational number
+    rep = new RealBigRat(BigRat(str));
+    return;
+  }
+
+  const char *e = std::strchr(str, 'e');
+  int dot = 0;
+  long e10 = 0;
+  if (e != NULL)
+    e10 = std::atol(e+1);	// e10 is decimal precision of the input string
+  // i.e., input is A/10^{e10}.
+  else {
+    e = str + std::strlen(str);
+#ifdef CORE_DEBUG
+    assert(*e == '\0');
+#endif
+  }
+
+  const char *p = str;
+  if (*p == '-' || *p == '+')
+    p++;
+  BigInt m(0);
+
+  for (; p < e; p++) {
+    if (*p == '.') {
+      dot = 1;
+      continue;
+    }
+    m = m * 10 + (*p - '0');
+    if (dot)
+      e10--;
+  }
+
+  long t = (e10 < 0) ? -e10 : e10;
+  BigInt one(1);
+  BigInt ten = FiveTo(t) * (one << static_cast<unsigned long>(t));
+  if (*str == '-')
+    m = -m;
+  if (e10 >= 0) {
+    // convert exactly from integer numbers
+    m *= ten;
+    rep = new RealBigInt(m);
+  } else { // e10 < 0,  fractional numbers
+    // HERE IS WHERE WE USE THE SYSTEM CONSTANT
+    //	       get_static_defInputDigits()
+    // Note: get_static_defInputDigits() should be at least log_2(10).
+    //       We default get_static_defInputDigits() to 4.
+    //std::cout << "(m,ten)=" << m << "," << ten << std::endl;
+    BigRat r(m, ten);
+    if (prec.isInfty()) { // convert exactly! to a big rational
+      rep = new RealBigRat(r);
+    } else {
+      // convert approximately, to a BigFloat within the
+      // specified precision:
+      // BigFloat bf(r, CORE_posInfty, prec * lgTenM) ;
+      BigFloat bf(r, CORE_posInfty, prec * 4) ;
+      rep = new RealBigFloat(bf);
+    }
+  }
+}// Real(str, prec)
+
+// The operator >>(i,x) calls the constructor Real(char*)
+CGAL_INLINE_FUNCTION
+std::istream& operator >>(std::istream& i, Real& x) {
+  int size = 20;
+  char *str = new char[size];
+  char *p = str;
+  char c;
+  int d = 0, e = 0, s = 0;
+  //  int done = 0;
+
+  // Chen Li: fixed a bug, the original statement is
+  //  for (i.get(c); c == ' '; i.get(c));
+  // use isspace instead of testing c == ' ', since it must also
+  // skip tab, catridge/return, etc.
+  // Change to:
+  //  int status;
+  do {
+    i.get(c);
+  } while (!i.eof() && isspace(c)); /* loop if met end-of-file, or
+  			   char read in is white-space. */
+  // Chen Li,
+  // original "if (c == EOF) ..." is unsafe since c is of char type and
+  // EOF is of int tyep with a negative value -1
+
+  if (i.eof()) {
+    i.clear(std::ios::eofbit | std::ios::failbit);
+    delete [] str;
+    return i;
+  }
+
+  // the current content in "c" should be the first non-whitespace char
+  if (c == '-' || c == '+') {
+    *p++ = c;
+    i.get(c);
+  }
+
+  for (; isdigit(c) || (!d && c=='.') ||
+       (!e && c=='e') || (!s && (c=='-' || c=='+')); i.get(c)) {
+    if (!i) break;
+    if (!e && (c == '-' || c == '+'))
+      break;
+    // Chen Li: put one more rule to prohibite input like
+    //  xxxx.xxxe+xxx.xxx:
+    if (e && (c == '.'))
+      break;
+    if (p - str == size) {
+      char *t = str;
+      str = new char[size*2];
+      std::memcpy(str, t, size);
+      delete [] t;
+      p = str + size;
+      size *= 2;
+    }
+#ifdef CORE_DEBUG
+    assert((p-str) < size);
+#endif
+
+    *p++ = c;
+    if (c == '.')
+      d = 1;
+    // Chen Li: fix a bug -- the sign of exponent can not happen before
+    // the character "e" appears! It must follow the "e' actually.
+    //    if (e || c == '-' || c == '+') s = 1;
+    if (e)
+      s = 1;
+    if (c == 'e')
+      e = 1;
+  }
+
+  if (!i && !i.eof()) {
+    delete [] str;
+    return i;
+  }
+  // chenli: make sure that the p is still in the range
+  if (p - str >= size) {
+    int len = p - str;
+    char *t = str;
+    str = new char[len + 1];
+    std::memcpy(str, t, len);
+    delete [] t;
+    p = str + len;
+  }
+
+#ifdef CORE_DEBUG
+  assert(p - str < size);
+#endif
+
+  *p = '\0';
+  i.putback(c);
+  i.clear();
+  // old: x = Real(str, i.precision()); // use precision of input stream.
+  x = Real(str);  // default precision = get_static_defInputDigits()
+  delete [] str;
+  return i;
+}//operator >> (std::istream&, Real&)
+
+
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/RefCount.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/RefCount.h
new file mode 100644
index 0000000..73cc9d9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/RefCount.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: RefCount.h
+ * Synopsis: 
+ *     1. This file defines two templated classes:
+ *               RCRepImpl<class N>
+ *     to create Reps of the class N.  The basic functions provided by
+ *     this class is reference counting.   The other class is
+ *               RCImpl<class T>
+ *     for implementing the envelop-letter paradigm for a class whose Rep
+ *     is the class T.  So, T is the "letter", and RCImpl<T> the "envelop".
+ *
+ *     2. All Rep classes (BigIntRep, BigFloatRep, BigRatRep, ExprRep, etc)
+ *     are derived from RCRepImpl<N>.  E.g.,
+ *
+ *         class BigRatRep : public RCRepImp<BigRatRep> {
+ *         ...
+ *         }
+ *     (Note the recursive use of "BigRatRep").
+ *
+ *     3. All Number classes (BigInt, BigFloat, BigRat, Expr, etc)
+ *     are derived from RCImpl<T>.  E.g.
+ *
+ *         typedef RCImpl<BigRatRep> RCBigRat;
+ *         class BigRat : public RCBigRat {
+ *         ...
+ *         }
+ * 
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+
+#ifndef _CORE_REFCOUNT_H_
+#define _CORE_REFCOUNT_H_
+
+namespace CORE { 
+
+template<class Deriving>
+class RCRepImpl {
+public:
+  RCRepImpl() : refCount(1) {}
+  void incRef() {
+    ++refCount;
+  }
+  // Without static_cast this to Deriving*,
+  // the destructor of Deriving class will never been called.
+  // this is an example of simulating dynamic binding from ATL.
+  void decRef() {
+    if (--refCount == 0)
+      delete static_cast<Deriving*>(this);
+  }
+  int getRefCount() const {
+    return refCount;
+  }
+private:
+  int refCount;
+};
+
+template<class T>
+class RCImpl {
+protected:
+  RCImpl(T* p) : rep(p) {}
+  RCImpl(const RCImpl& x) : rep(x.rep) {}
+  T* rep; ///<= rep is the actual representation
+public:
+  /// get rep (const)
+  const T& getRep() const {
+    return *rep;
+  }
+  /// get rep (non-const)
+  T& getRep() {
+    return *rep;
+  }
+
+  
+  /// clone data
+  void makeCopy() {
+    if (rep->getRefCount() > 1) {
+      T* oldValue = rep;
+      rep->decRef(); // safe since rep has been referred at least once.
+      rep = oldValue ? new T(*oldValue) : 0; 
+    }
+  }
+ 
+#ifdef CORE_RC_DEBUG
+  /// get counter
+  int getRefCount() const {
+    return rep->getRefCount();
+  }
+#endif
+};
+
+} //namespace CORE
+#endif // _CORE_REFCOUNT_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/Timer.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/Timer.h
new file mode 100644
index 0000000..a4528a6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/Timer.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Timer.h
+ * Synopsis:
+ *      Timer is a class to provide simple timing functions:
+ *
+ *      Here is an example of how to use it:
+ *
+ *		Timer timer;
+ *
+ *              timer.start();
+ *              .. do some tasks for timing ..
+ *              timer.stop();
+ *
+ *              long clock = timer.getClocks();     // get CPU clocks
+ *              long seconds = time.getSeconds();   // get seconds
+ *
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_TIMER_H_
+#define _CORE_TIMER_H_
+
+#include <CGAL/CORE/Impl.h>
+#include <ctime>
+
+namespace CORE { 
+
+class Timer {
+private:
+  long startClock;
+  long clocks;
+
+public:
+  Timer() : startClock(0), clocks(0) {}
+
+  void start() {
+    startClock = clock();
+  }
+
+  void stop() {
+    clocks = clock() - startClock;
+  }
+
+  long getClocks() {
+    return clocks;
+  }
+
+  float getSeconds() {
+    return (float)clocks / CLOCKS_PER_SEC;
+  }
+};
+
+} //namespace CORE
+#endif // _CORE_TIMER_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong.h
new file mode 100644
index 0000000..b42e5a4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong.h
@@ -0,0 +1,302 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: extLong.h
+ * Synopsis: 
+ * 		An extended class for long
+ *
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>,
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>,
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef _CORE_EXTLONG_H_
+#define _CORE_EXTLONG_H_
+
+#include <CGAL/CORE/Impl.h>
+#include <CGAL/CORE/CoreAux.h>
+
+namespace CORE { 
+
+#ifndef LONG_MAX
+#error "haven't define LONG_MAX"
+#endif
+
+#ifndef LONG_MIN
+#error "haven't define LONG_MIN"
+#endif
+
+// LONG_MAX and LONG_MIN is assumed in this class:
+
+const long EXTLONG_MAX = LONG_MAX;
+const long EXTLONG_MIN = LONG_MIN + 1;
+const long EXTLONG_NAN = LONG_MIN;
+const unsigned long U_EXTLONG_MAX = LONG_MAX;
+
+/// \class extLong
+/// \brief extended long integer
+class CGAL_CORE_EXPORT extLong {
+private:
+  long val;  ///< internal representation
+  int  flag; ///< flags
+  /**<  0 -- Normal;
+        1 -- Overflow (positive);
+       -1 -- Overflow (negative);
+        2 -- NaN (sign can not be determined) */
+
+  static void add(extLong& z, long x, long y);
+
+public:
+
+  /// \name Constructors
+  //@{
+  /// default constructor
+  extLong();
+  /// constructor for \c bool
+  extLong(bool isNaN);
+  /// constructor for \c int
+  extLong(int);
+  /// constructor for \c unsigned int
+  extLong(unsigned int);
+  /// constructor for \c long
+  extLong(long);
+  /// constructor for \c unsigned long
+  extLong(unsigned long);
+  //@}
+
+  /// \name Arithmetic and assignment operators
+  //@{
+  extLong& operator +=(const extLong&);
+  extLong& operator -=(const extLong&);
+  extLong& operator *=(const extLong&);
+  extLong& operator /=(const extLong&);
+  //@}
+
+  /// \name Incremental, Decremental, Unary minus operators
+  //@{
+  extLong& operator++();
+  extLong  operator++(int);
+  extLong& operator--();
+  extLong  operator--(int);
+  extLong  operator-() const;
+  //@}
+
+  /// \name Conversion Function
+  //@{
+  std::string toString() const {
+    std::stringstream st;
+    st << (*this);
+    return st.str();
+  }    
+  long toLong() const;
+  //@}
+
+  /// \name Builtin functions
+  //@{
+  long asLong() const;
+  bool isInfty() const;
+  bool isTiny() const;
+  bool isNaN() const;
+  int  sign() const;
+  /// comparison
+  int cmp(const extLong &) const;
+  //@}
+
+  /// \name I/O Stream
+  ///@{
+  friend  CGAL_CORE_EXPORT std::ostream& operator <<(std::ostream&, const extLong&);
+  //@}
+
+  static const extLong& getNaNLong();
+  static const extLong& getPosInfty();
+  static const extLong& getNegInfty();
+};
+
+
+
+// constants (Globally)
+#define CORE_NaNLong extLong::getNaNLong()
+#define CORE_posInfty extLong::getPosInfty()
+#define CORE_negInfty extLong::getNegInfty()
+
+const extLong EXTLONG_ZERO(0);
+const extLong EXTLONG_ONE(1);
+const extLong EXTLONG_TWO(2);
+const extLong EXTLONG_THREE(3);
+const extLong EXTLONG_FOUR(4);
+const extLong EXTLONG_FIVE(5);
+const extLong EXTLONG_SIX(6);
+const extLong EXTLONG_SEVEN(7);
+const extLong EXTLONG_EIGHT(8);
+
+// inline functions
+
+//  private comparison function
+inline int extLong::cmp(const extLong& x) const {
+  if (isNaN() || x.isNaN()) {
+    core_error("Two extLong NaN's cannot be compared!",
+               __FILE__, __LINE__, false);
+  }
+  return (val == x.val) ? 0 : ((val > x.val) ? 1 : -1);
+}
+
+// default constructor (cheapest one)
+inline extLong::extLong() : val(0), flag(0) {}
+
+inline extLong::extLong(int i) : val(i), flag(0) {
+  if (val == EXTLONG_MAX)
+    flag = 1;
+  else if (val <= EXTLONG_MIN)
+    flag = -1;
+}
+
+inline extLong::extLong(unsigned int ui) : val(ui), flag(0) {
+  if (val >= EXTLONG_MAX) {
+    val  = EXTLONG_MAX;
+    flag = 1;
+  }
+}
+
+inline extLong::extLong(long l) : val(l), flag(0) {
+  if (val >= EXTLONG_MAX)
+    flag = 1;
+  else if (val <= EXTLONG_MIN)
+    flag = -1;
+}
+
+inline extLong::extLong(unsigned long u) {
+  if (u >= U_EXTLONG_MAX) {
+    val  = EXTLONG_MAX;
+    flag = 1;
+  } else {
+    val = static_cast<long>(u);
+    flag = 0;
+  }
+}
+
+// isNaN defaults to false
+inline extLong::extLong(bool isNaN) : val(0), flag(0) {
+  if (isNaN) {
+    val = EXTLONG_NAN;
+    flag = 2;
+  }
+}
+
+// comparison operators
+inline bool operator== (const extLong& x, const extLong& y) {
+  return x.cmp(y) == 0;
+}
+
+inline bool operator!= (const extLong& x, const extLong& y) {
+  return x.cmp(y) != 0;
+}
+
+inline bool operator< (const extLong& x, const extLong& y) {
+  return x.cmp(y) < 0;
+}
+
+inline bool operator<= (const extLong& x, const extLong& y) {
+  return x.cmp(y) <= 0;
+}
+
+inline bool operator> (const extLong& x, const extLong& y) {
+  return x.cmp(y) > 0;
+}
+
+inline bool operator>= (const extLong& x, const extLong& y) {
+  return x.cmp(y) >= 0;
+}
+
+//  arithmetic operators
+inline extLong operator+ (const extLong& x, const extLong& y) {
+  return extLong(x)+=y;
+}
+
+inline extLong operator- (const extLong& x, const extLong& y) {
+  return extLong(x)-=y;
+}
+
+inline extLong operator* (const extLong& x, const extLong& y) {
+  return extLong(x)*=y;
+}
+
+inline extLong operator/ (const extLong& x, const extLong& y) {
+  return extLong(x)/=y;
+}
+
+inline extLong& extLong::operator++ () {
+  *this += 1;
+  return *this;
+}
+
+inline extLong extLong::operator++ (int) {
+  extLong r(*this);
+  *this += 1;
+  return r;
+}
+
+inline extLong& extLong::operator-- () {
+  *this -= 1;
+  return *this;
+}
+
+inline extLong extLong::operator-- (int) {
+  extLong r(*this);
+  *this -= 1;
+  return r;
+}
+
+//  conversion to long
+inline long extLong::toLong() const {
+  return val;
+}
+
+// builtin functions
+inline long extLong::asLong() const {
+  return val;
+}
+
+inline bool extLong::isInfty() const {
+  return (flag == 1);
+}
+
+inline bool extLong::isTiny() const {
+  return (flag == -1);
+}
+
+inline bool extLong::isNaN() const {
+  return (flag == 2);
+}
+
+} //namespace CORE
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/CORE/extLong_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // _CORE_EXTLONG_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong_impl.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong_impl.h
new file mode 100644
index 0000000..b70943d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/extLong_impl.h
@@ -0,0 +1,212 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: extLong.cpp
+ * Synopsis:
+ *      The class extLong is basically a wrapper around the machine
+ *      type long.  It is an important class to provide several
+ *      additional facilities to detect overflows and undefined values.
+ *      Future development includes extensions to level arithmetic
+ *      (i.e., if a number overflows level i, we will go to level i+1).
+ *      Level i representation of a number n is just i iterations
+ *      of log_2 applied to n.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/CORE/extLong.h>
+
+namespace CORE { 
+
+CGAL_INLINE_FUNCTION
+const extLong& extLong::getNaNLong() {
+  static extLong NaNLong(true);
+  return NaNLong;
+}
+
+CGAL_INLINE_FUNCTION
+const extLong& extLong::getPosInfty() {
+  static extLong posInfty(EXTLONG_MAX);
+  return posInfty;
+}
+
+CGAL_INLINE_FUNCTION
+const extLong& extLong::getNegInfty() {
+  static extLong negInfty(EXTLONG_MIN);
+  return negInfty;
+}
+
+CGAL_INLINE_FUNCTION
+void extLong::add(extLong& z, long x, long y) {
+  if (x > 0 && y > 0 && x >= EXTLONG_MAX - y) {
+    z.val = EXTLONG_MAX;
+    z.flag = 1;
+  } else if (x < 0 && y < 0 && x <= EXTLONG_MIN - y) {
+    z.val = EXTLONG_MIN;
+    z.flag = -1;
+  } else {
+    z.val = x + y;
+    z.flag = 0;
+  }
+}
+
+//  arithmetic and assignment operators
+CGAL_INLINE_FUNCTION
+extLong& extLong::operator+= (const extLong& y) {
+  if (flag == 2 || y.flag == 2 || (flag * y.flag < 0)) {
+#ifdef CORE_DEBUG
+    if (flag * y.flag < 0) //want a message at the first creation of NaN
+      core_error("extLong NaN Error in addition.", __FILE__, __LINE__, false);
+#endif
+
+    *this = CORE_NaNLong;
+  } else if (flag == 1 || y.flag == 1) { // one of them is +Inf
+    *this = CORE_posInfty;
+  } else if (flag == -1 || y.flag == -1) { // one of them is -Inf
+    *this = CORE_negInfty;
+  } else { // x and y are normal now
+    add(*this, val, y.val);
+  }
+  return *this;
+}
+
+CGAL_INLINE_FUNCTION
+extLong& extLong::operator-= (const extLong& y) {
+  if (flag == 2 || y.flag == 2 || (flag * y.flag > 0)) {
+#ifdef CORE_DEBUG
+    if (flag * y.flag > 0) //want a message at the first creation of NaN
+      core_error("extLong NaN Error in subtraction.", __FILE__, __LINE__, false);
+#endif
+
+    *this = CORE_NaNLong;
+  } else if (flag == 1 || y.flag == -1) {
+    *this = CORE_posInfty;
+  } else if (flag == -1 || y.flag == 1) {
+    *this = CORE_negInfty;
+  } else {
+    add(*this, val, -y.val);
+  }
+  return *this;
+}
+
+CGAL_INLINE_FUNCTION
+extLong& extLong::operator*= (const extLong& y) {
+  if (flag == 2 || y.flag == 2) {
+    *this = CORE_NaNLong;
+  } else if ((flag != 0) || (y.flag != 0)) {
+    if (sign() * y.sign() > 0)
+      *this = CORE_posInfty;
+    else
+      *this = CORE_negInfty;
+  } else { // flag == 0 and y.flag == 0
+    double d = double(val) * double(y.val);
+    long   p = val * y.val;
+    if (std::fabs(d - p) <= std::fabs(d) * relEps) {
+      val = p;
+      flag = 0;
+    } else if (d > EXTLONG_MAX) {
+      *this = CORE_posInfty;
+    } else if (d < EXTLONG_MIN) {
+      *this = CORE_negInfty;
+    } else {
+#ifdef CORE_DEBUG
+      core_error("extLong NaN Error in multiplication.",__FILE__,__LINE__,false);
+#endif
+      *this = CORE_NaNLong;
+    }
+  }
+  return *this;
+}
+
+CGAL_INLINE_FUNCTION
+extLong& extLong::operator/= (const extLong& y) {
+  if (flag==2 || y.flag==2 || ((flag != 0) && (y.flag != 0)) || (y.val == 0)) {
+#ifdef CORE_DEBUG
+    if (y.val == 0)
+      core_error("extLong NaN Error, Divide by Zero.", __FILE__, __LINE__, false);
+    else if ((flag !=0) && (y.flag !=0))
+      core_error("extLong NaN Error, +/-Inf/Inf.", __FILE__, __LINE__, false);
+#endif
+
+    *this = CORE_NaNLong;
+  } else if ((flag != 0) || (y.flag != 0)) { // y.flag == 0 now and y != 0
+    if (sign() * y.sign() > 0)
+      *this = CORE_posInfty;
+    else
+      *this = CORE_negInfty;
+  } else { // flag == 0 and y.flag == 0
+    val /= y.val; // no overflow in divisions
+    flag = 0;
+  }
+  return *this;
+}
+
+//  unary minus
+CGAL_INLINE_FUNCTION
+extLong extLong::operator- () const {
+  if (flag == 0)
+    return extLong(-val);
+  else if (flag == 1)
+    return CORE_negInfty;
+  else if (flag == -1)
+    return CORE_posInfty;
+  else // NaN
+    return CORE_NaNLong;
+}
+
+// sign
+//    You should check "flag" before calling this, otherwise
+//    you cannot interprete the returned value!
+CGAL_INLINE_FUNCTION
+int extLong::sign() const {
+  if (flag == 2)
+    core_error("NaN Sign can not be determined!", __FILE__, __LINE__, false);
+  return ((val == 0) ? 0 : ((val > 0) ? 1 : -1));
+}
+
+//  stream operators
+CGAL_INLINE_FUNCTION
+std::ostream& operator<< (std::ostream& o, const extLong& x) {
+  if (x.flag == 1)
+    o << " infty ";
+  else if (x.flag == - 1)
+    o << " tiny ";
+  else if (x.flag == 2)
+    o << " NaN ";
+  else
+    o << x.val;
+  return o;
+}
+
+} //namespace CORE
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/circle2d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/circle2d.h
new file mode 100644
index 0000000..d217901
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/circle2d.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: circle2d.h
+ * Synopsis:
+ *      Basic 2-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _CIRCLE2D_H
+#define _CIRCLE2D_H
+
+#include <CGAL/CORE/geom2d/point2d.h>
+#include <CGAL/CORE/geom2d/line2d.h>
+
+class Circle2d : public GeomObj {
+
+   /* An instance C of the data type circle is an oriented circle 
+      in the plane passing through three points p1, p2, p3. The 
+      orientation of C is equal to the orientation of the three defining
+      points. i.e. orientation(p1, p2, p3).
+      If \Labs{\{p1, p2, p3\}} = 1, C is the empty circle with center p1.
+      If p1, p2 and p3 are collinear, C is a straight line passing through
+      p1, p2 and p3 in this order and the center of C is undefined.    
+    */
+
+private:
+ 
+   Point2d p1;  // the 3 points defining the circle
+   Point2d p2;
+   Point2d p3;
+
+   int orient;  //orientation(p1, p2, p3)
+
+   Point2d* cp;  //pointer to center
+   double * rp;  //pointer to radius
+
+public:
+
+   Circle2d( const Point2d& p1, const Point2d& p2,  const Point2d& p3);
+   //initialized to the oriented circle through points p1, p2, p3 
+
+   Circle2d(const Point2d& a, const Point2d& b0);
+   //initialized to the counter-clockwise oriented circle with center a 
+   //passing through b0 
+
+   Circle2d(const Point2d& p);
+   //initialized to the trivial circle with center p
+
+   Circle2d();
+   //initialized to the trivial circle with center (0,0)
+
+   Circle2d(const Point2d& c, double r);
+   //initialized to the circle with center c and radius r with positive
+   //(i.e. counter-clockwise) orientation
+
+   Circle2d(const Circle2d& c);
+   //copy constructor 
+
+   virtual ~Circle2d(); 
+
+   Circle2d& operator=(const Circle2d& C);
+
+   //operations
+
+   Point2d center();
+   //return the center of the circle
+
+   double radius();
+   //returns the radius. 
+   //precond: the orientation of the circle is not 0
+
+   Point2d point1() const { return p1; }
+   Point2d point2() const { return p2; }
+   Point2d point3() const { return p3; }
+
+//   Point2d point_on_circle(float alpha);
+   //returns a point p on the circle with angle of alpha
+
+   bool is_degerate() const { return orient == 0; }
+   //returns true if the defining points are collinear
+
+   bool is_trivial() const {return p1 == p2; }
+   //returns true if radius is zero
+
+   int orientation() const { return orient; }
+
+   int side_of(const Point2d& p) const; 
+   // returns -1, +1 or 0 if p lies right of, left of or on the circle
+   // respectively
+
+   bool inside(const Point2d& p);
+   //returns true if p lies inside of the circle
+
+   bool outside(const Point2d& p); 
+   
+   bool contains(const Point2d& p) const ;
+   //returns true if p lies on the circle, false otherwise
+
+   double distance(const Point2d& p);
+   //returns the distance between p and the circle: distance to center - radius
+
+   double distance(const Line2d& l);
+   //returns the distance between l and the circle
+   //distance from center to l minus radius
+
+   double distance(Circle2d& D);
+   //returns the distance between this circle and circle D
+   //distance between two centers minus two radius
+
+   bool operator==(const Circle2d& D) const ;
+   bool operator!=(const Circle2d& D) const 
+	{ return !operator==(D); }
+
+   friend std::ostream& operator<<(std::ostream& out, Circle2d& c);
+   friend std::istream& operator>>(std::istream& in, Circle2d c); //?? Circle2d &
+
+}; // class Circle2d
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/line2d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/line2d.h
new file mode 100644
index 0000000..be81637
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/line2d.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: line2d.h
+ * Synopsis:
+ *      Basic 2-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _LINE2D_H_
+#define _LINE2D_H_
+
+#include <CGAL/CORE/geom2d/point2d.h>
+
+class Line2d : public GeomObj {
+
+  /* An instance l of the data type $line$ is a directed straight line
+     in the two dimensional plane. The angle between a right oriented 
+     horizontal line and $l$ is called the direction of $l$.
+   */
+  /* member Vector is not used in this class, it's intended for use in
+       the operator+,- etc 
+     need to do: assure p0 != p1
+   */
+private:
+
+  Point2d p0;
+  Point2d p1;
+  Vector V;
+
+public:
+
+  /*************************************************************
+   *  constructors
+   *************************************************************/
+
+  Line2d(const Point2d & p, const Vector &v);
+  // line initialized to pass through points p and p+v
+
+  Line2d(const Point2d &p, const Point2d &q);
+  //line is initialized to pass through points p and q directed from p to q
+
+//  Line2d(const point& p, double alpha);
+  //line passes through point p with direction alpha
+
+  Line2d(const double& a, const double& b, const double& c);
+
+  Line2d(const Line2d &);
+
+  Line2d();
+  //line passes through the origin with direction 0.
+
+  virtual ~Line2d() {}
+  /*************************************************************
+   *   member functions
+   *************************************************************/
+
+  Vector direction() const { return p1-p0; }
+   // returns the direction as a vector 
+
+  Point2d startPt() const { return p0; }  
+  Point2d stopPt() const  { return p1; }
+
+  double distance(Point2d q) const;
+   // returns the Euclidean distance between this line and point q
+
+  Point2d projection(const Point2d& p) const;
+   // returns the projection of p on this line
+
+  int orientation( const Point2d& p ) const;
+   // orientation of p0, p1 and p
+
+   // the sine/cosine of the angle made with positive x-direction
+  double sine() const { return (p1.Y() - p0.Y()) / p0.distance(p1); }
+  double cosine() const { return (p1.X() - p0.X()) / p0.distance(p1); }
+
+  Line2d rotate90( const Point2d& q)
+  { return Line2d(startPt().rotate90(q), stopPt().rotate90(q)); }
+
+  double y_abs() const;
+  // returns the y-abscissa of the line 
+
+  double slope() const ;    
+  //precond: is not vertical
+
+  /*************************************************************
+   *   predicates
+   *************************************************************/
+
+  bool isVertical() const { return p0.X() == p1.X(); }
+  bool isHorizontal() const { return p0.Y() == p1.Y(); }
+  bool is_trivial() const {return p0 == p1; }   //meaning for a line?
+
+  bool contains( const Point2d& p) const { 
+          return orientation2d(p0, p1, p) == 0; }
+  bool isCoincident( const Line2d& g) const { 
+          return contains(g.p0) && contains(g.p1); }  
+  bool isParallel(const Line2d& l) const {
+    return det(V, l.direction()) == 0; }
+
+  bool operator==( const Line2d& g ) const { return isCoincident(g); }
+  bool operator!=( const Line2d& g ) const { return !operator==(g); }
+
+  /*************************************************************
+   *   intersection
+   *************************************************************/
+
+  int intersects(const Line2d& t) const;
+   // decides whether *this and t intersects
+   // return dim of intersection. 
+   // return -1 if no intersection
+
+  GeomObj* intersection(const Line2d& g) const;
+   //if this line and g intersect in a single point, this point is 
+   // assigned to p and the result is true, otherwise the result is false
+
+  /*************************************************************
+   *   angles and others
+   *************************************************************/
+  friend int orientation2d( const Line2d& l, const Point2d& p);
+  // computes the orientation (a, b, p), where a!=b and a and b appear 
+  // in this order on line l
+
+  friend int cmp_slopes(const Line2d& l1, const Line2d& l2) 
+  //l1.slope > l2.slope: +1; equal: 0; otherwise: -1
+  {
+     if (l1.slope() == l2.slope())
+         return 0;
+     else
+         return (l1.slope() > l2.slope()) ? +1 : -1;
+  } 
+  
+  /*************************************************************
+   *   I/O
+   *************************************************************/
+
+  friend std::istream& operator>>(std::istream& in, Line2d& l);
+  friend std::ostream &operator<<(std::ostream & out, const Line2d & l);
+}; // class Line2d
+
+extern Line2d p_bisector(const Point2d& p, const Point2d& q);
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/point2d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/point2d.h
new file mode 100644
index 0000000..7da45b8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/point2d.h
@@ -0,0 +1,187 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: point2d.h
+ * Synopsis:
+ *      Basic 2-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+
+#ifndef _POINT2D_H
+#define _POINT2D_H
+
+#ifndef CORE_LEVEL
+#  define CORE_LEVEL 3
+#endif
+
+#include <CGAL/CORE/CORE.h>
+#include <CGAL/CORE/linearAlgebra.h>
+#include <CGAL/CORE/geombase.h>
+
+class Point2d : public GeomObj {
+
+private:
+  double x, y;
+
+public:
+ 
+  //CONSTRUCTORS
+  //
+  Point2d();  //initialized to origin(0,0)
+  Point2d(double, double);
+  Point2d(const Point2d &);
+  Point2d(Vector v);
+  //create a point initialized to the point $(v[0], v[1])$ 
+  //precondition: v.dim() = 2
+
+  //DESTRUCTOR
+  virtual ~Point2d() {}
+
+  //ASSIGNMENT AND QUERY
+  //
+  Point2d& operator=(const Point2d&);
+  
+  double X() const { return x; }
+  double Y() const { return y; } 
+  void setX( const double a){ x = a; }
+  void setY( const double a){ y = a; } 
+  void set( const double a, const double b){ x = a; y = b;} 
+  
+  int dim() const { return 2; }
+
+  //CONVERSION
+  //
+  Vector toVector() const { return Vector(X(), Y()); } 
+
+  //DISTANCES
+  //
+  double distance(const Point2d) const;
+  // returns the Euclidean distance between p and this
+
+  double distance() const { return distance(Point2d(0, 0)); }
+  // returns distance between this and origin
+
+  //VECTOR OPERATIONS
+  //
+  Vector operator-(const Point2d &) const;
+  Point2d operator+(const Vector &) const;
+
+  //TRANSFORMATIONS
+  //
+  Point2d rotate90( const Point2d& q);
+  // returns the point rotated about q by angle of 90 degrees
+
+  //COMPARISONS
+  //
+  bool operator==(const Point2d&) const;
+  bool operator!=(const Point2d& p) const {return !operator==(p); }
+  
+  //INPUT-OUTPUT
+  //
+  friend std::ostream& operator<< (std::ostream&, const Point2d);
+  // write point p to output stream
+  // The format is, e.g.,  Point2d(1.0, 23)
+
+  friend std::istream& operator>> (std::istream&, Point2d&);
+  // reads the x and y coordinates of point p from the input stream
+  // The format is " ( x , y ) " where the white spaces are optional.
+  // Even the comma and the "(" and ")" are optional.
+  // The comment char '#' is allowed, and the rest of
+  // the line is then treated as white space.
+  // However, you must not use other kinds of parenthesis
+  // E.g., the following are all equivalent:
+  // 	1.0 -0.2 # comment
+  // 	( +1.0, -0.2)
+  // 	1.0, -.2 
+
+  friend int readPoints(std::istream &iS,
+		  Point2d *pA, int MaxN = 1000, int N = 0);
+  // reads a sequence of points from input stream iS into Point2d array pA.
+  // The input stream constains a sequence of 2K+1 numbers of the form
+  //     [NN]   ( x1 ,  y1 )  ( x2 , y2 )  ... ( xK , yK )
+  // The i-th point is (xi, yi). 
+  //    (0) NN is optional if N is given as argument (then N is set to NN)
+  //    (1) Any of the "(", "," and ")" are optional
+  //    (2) Newlines, extra white spaces, '#' are all ignored.
+  //    (3) Also, everything after '#' is discarded.
+  // If N > MaxN, nothing is read and 0 is returned.  
+  // Returns the number of points actually read, i.e, min(K, N).
+  
+}; //Point2d Class
+
+// //////////////////////////////////////////////////
+// AUXILLIARY FUNCTIONS:
+// //////////////////////////////////////////////////
+
+Point2d midPoint(const Point2d& a, const Point2d& b); 
+// returns midpoint between a and b
+
+Point2d aCenter(const Point2d& a, const Point2d& b, machine_double alpha =0.5); 
+// returns the "asymmetric Center" point 
+// that is alpha-fraction of the distance from a to b
+
+double area(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns twice (!) the signed area of triangle (a,b,c)
+  
+int orientation2d(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns sign of area(a,b,c)
+  
+bool leftTurn(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns true iff orientation2d(a,b,c) = +1
+  
+bool rightTurn(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns true iff orientation2d(a,b,c) = -1
+
+bool collinear(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns true iff orientation2d(a,b,c) = 0
+  
+bool between(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns true iff orientation2d(a,b,c) = 0 and b is strictly
+  //    between a and c.
+
+//variant of between:
+bool betweenVar(const Point2d& a, const Point2d& b, const Point2d& c);
+  // returns true iff the scalar product (a-b, c-b) is positive.
+  //    In case orientation2d(a,b,c)=0, then this is equivalent to
+  //    b being strictly between a and c.
+
+// THE FOLLOWING ARE CALLED by
+// 	operator>>(..) and readPoints(..)
+// bool getToNum( std::istream& in, char mark, bool strict=false) ;
+// bool getToChar( std::istream& in, char mark) ;
+// bool startNum(char c) ;
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/segment2d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/segment2d.h
new file mode 100644
index 0000000..973f1bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom2d/segment2d.h
@@ -0,0 +1,196 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: segment2d.h
+ * Synopsis:
+ *      Basic 2-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+
+#ifndef _SEGMENT2D_H_
+#define _SEGMENT2D_H_
+
+#include <CGAL/CORE/geom2d/point2d.h>
+#include <CGAL/CORE/geom2d/line2d.h>
+
+/************************************************************
+ *  Class Segment2d:
+ *
+ *  An instance s of Segment2d is a finite or infinite line segment
+ *  in the two dimensional plane, defined by a start point
+ *  s.startPt() and a stop point s.stopPt().  It can be regarded
+ *  as an open or a closed segment (default: open), and directed
+ *  or not (default: directed).
+ *
+ *  We do not necessarily assume that startPt() != stopPt().
+ ************************************************************/
+
+class Segment2d : public GeomObj {
+
+private:
+
+  Point2d p0;
+  Point2d p1;
+  bool directed;  // segments can be directed or not (default is directed)
+  bool open;     // segments can be open or closed (default is open)
+
+public:
+
+  /************************************************************
+   *   constructors
+   ************************************************************/
+
+  Segment2d(const Segment2d &);
+
+  Segment2d(const Point2d &p, const Point2d &q);
+  	//finite segment with endpoints p and q
+
+  Segment2d(const Point2d & p, const Vector & v);
+	//ray segment
+
+  Segment2d();
+  	//unit segment from (0,0) to (1,0) 
+
+  virtual ~Segment2d() {}
+  /*************************************************************
+   *   member functions
+   *************************************************************/
+
+  Point2d startPt() const { return p0; }  
+  Point2d stopPt() const { return p1; }
+
+  void reverse() { Point2d pTmp = p0; p0=p1; p1=pTmp; }
+   //  reverses the direction of the segment
+
+  Line2d toLine() const { return Line2d(p0,p1); }
+ 
+  double length() const { return p0.distance(p1); }
+    //length of segment
+
+  double distance( const Point2d& p ) const;
+   // returns the Euclidean distance between this segment and point q
+
+  Point2d nearPt( const Point2d& p ) const;
+   // returns the point on segment closest to q;
+
+  void setDirected( bool _directed ) { directed = _directed; }
+  void setOpen( bool _open ) { directed = open; }
+
+   // orientation of p0, p1 and p
+  int orientation( const Point2d& p ) const {
+    return toLine().orientation(p); }
+
+  /*************************************************************
+   *   predicates
+   *************************************************************/
+  bool isOpen() const {return open; }
+  bool isDirected() const {return directed; }
+  bool isTrivial() const {return p0 == p1; }  
+  bool isVertical() const { return p0.X() == p1.X(); }
+  bool isHorizontal() const { return p0.Y() == p1.Y(); }
+  bool isCollinear( Point2d& p ) const { return toLine().contains(p); }
+  bool isCoincident( const Segment2d& s) const;
+  bool isParallel( const Segment2d& s ) {
+    return toLine().isParallel( s.toLine() );  }
+
+  bool contains( const Point2d& p ) const;
+  bool contains( const Segment2d& s ) const { 
+     return contains(s.startPt()) && contains(s.stopPt()); }  
+
+  bool operator==(const Segment2d& s) const { return isCoincident(s); }
+
+  bool operator!=(const Segment2d& s) const { return !isCoincident(s); }
+
+  /*************************************************************
+   *   intersection
+   *************************************************************/
+
+  int intersects( const Line2d& l ) const;
+   //decides whether *this and t intersect in one point
+   // return dim of intersetion
+  
+  int intersects( const Segment2d& s ) const;
+   //decides whether *this and t intersect in one point
+   // return dim of intersetion
+
+  GeomObj* intersection( const Line2d& l ) const;
+   // return intersection point if this segment and l intersect at a single point
+   // the intersection point is returned 
+  
+  GeomObj* intersection( const Segment2d& s ) const;
+   // return intersection point if this segment and s intersect at a single point
+   // the intersection point is returned 
+ 
+  /*************************************************************
+   *   angles
+   *************************************************************/
+
+   // the sine/cosine of the angle made with positive x-direction
+  double sine() const { return (p1.Y() - p0.Y()) / length() ; }
+  double cosine() const { return (p1.X() - p0.X()) / length() ; }
+
+  Line2d rotate90(const Point2d& q)
+  { return Line2d(startPt().rotate90(q), stopPt().rotate90(q)); }
+
+   // computes the orientation (a, b, p), where a!=b and a and b appear 
+   // in this order on segment l
+  friend int orientation2d( const Segment2d& s, const Point2d& p) {
+    return orientation2d( s.toLine(), p ); 
+  }
+
+  friend int cmp_slopes( const Segment2d& s1, const Segment2d& s2) 
+   //l1.slope > l2.slope: +1; equal: 0; otherwise: -1
+  {
+     Line2d l1 = s1.toLine();
+     Line2d l2 = s2.toLine();
+     if (l1.slope() == l2.slope())
+         return 0;
+     else
+         return (l1.slope() > l2.slope()) ? +1 : -1;
+  } 
+  
+  /*************************************************************
+   *   I/O
+   *************************************************************/
+
+
+  friend std::istream& operator>>(std::istream& in, Segment2d& l);
+  friend std::ostream &operator<<(std::ostream & out, const Segment2d & l);
+   // syntax: {[} p {===} q {]}
+
+}; //class Segment2d
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/line3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/line3d.h
new file mode 100644
index 0000000..df3bccc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/line3d.h
@@ -0,0 +1,140 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: line3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+ 
+#ifndef _LINE3D_H_
+#define _LINE3D_H_
+
+#include <CGAL/CORE/geom3d/point3d.h>
+
+class Line3d : public GeomObj{
+
+ /************************************************************
+  *  An instance l of the class Line3d is a directed line
+  *  in the three dimensional plane. The angle between a right oriented 
+  *  horizontal line and $l$ is called the direction of $l$.
+  *  We assume that l is defined by two points, l.startPt()
+  *  and l.stopPt().  We do not assure that these points are distinct.
+  *  So the line could be "improper".  But most operators assume
+  *  that lines are proper (it is the user's responsibility to check).
+  *
+  *  In the future, we may generalize this to allow the dual 
+  *  representation in terms of a linear equation.
+  *
+  *  Member Vector is not used in this class. It is intended for use in
+  *  the operator+/-, etc.
+  ************************************************************/
+private:
+
+  Point3d p0; // = startPt
+  Point3d p1; // = stopPt
+  Vector V;   // = stopPt - startPt
+
+public:
+
+  /************************************************************
+   *   constructors
+   ************************************************************/
+
+  Line3d(const Point3d & p, const Vector &v);
+  // line initialized to pass through points p and p+v
+
+  Line3d(const Point3d &p, const Point3d &q);
+  //line is initialized to pass through points p and q directed from p to q
+
+  Line3d(const Line3d &l);
+  //copy constructor
+
+  //Line3d(const Segment3d & s): p0(s.startPt()), p1(s.stopPt()), V(s.direction()) {}
+  //construct from a segment
+
+  Line3d();
+  //horizontal line passes through the origin with direction 0.
+
+  virtual ~Line3d() {}
+  /************************************************************
+   *   MEMBERS
+   ************************************************************/
+
+  virtual int dim() const { return 1; }
+
+  Point3d startPt() const { return p0; }  
+  Point3d stopPt() const { return p1; }
+  const Vector direction() const { return V; }
+  
+  double distance(const Point3d& q) const;
+  // returns the Euclidean distance between this line and point q
+  
+  Point3d projection(const Point3d& p) const;
+  // returns the projection of p on this line
+
+  /************************************************************
+   *   PREDICATES
+   ************************************************************/
+
+  bool isProper() {return p0 == p1; }   
+  bool contains(const Point3d& p) const;
+
+  bool isCoincident(const Line3d& g) const;
+  bool isParallel(const Line3d& g) const;  // same slope
+  bool isSkew(const Line3d& l2) const;
+
+  bool operator==(const Line3d& g) const { return isCoincident(g); }
+  bool operator!=(const Line3d& g) { return !operator==(g); }
+
+  int intersects(const Line3d& g ) const;
+    // return the dimension of the intersection of g with this line:
+    // 	-1 if disjoint (i.e., parallel but distinct lines)
+    //  1  if coincident
+    //  0  if intersect in a point.  In this case, the
+    //		intersection point is assigned to p if this is available.
+
+  GeomObj* intersection(const Line3d &l) const;
+
+  /************************************************************
+   *   I/O 
+   ************************************************************/
+
+  friend std::istream& operator>>(std::istream& in, Line3d& l);
+  friend std::ostream& operator<<(std::ostream & out, const Line3d & l);
+
+}; //class Line3d
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/plane3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/plane3d.h
new file mode 100644
index 0000000..c251db7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/plane3d.h
@@ -0,0 +1,159 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: plane3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _PLANE3D_H_
+#define _PLANE3D_H_
+
+#include <CGAL/CORE/geom3d/point3d.h>
+#include <CGAL/CORE/geom3d/line3d.h>
+
+class Segment3d;
+
+class Plane3d : public GeomObj{
+
+private:
+
+  // ax + by + cz + d = 0
+  double a; 
+  double b; 
+  double c; 
+  double d; 
+  Vector n;
+
+public:
+  /************************************************************
+   *   constructors
+   ************************************************************/
+
+  Plane3d(): a(0.0), b(0.0), c(0.0), d(0.0), n(0.0, 0.0, 0.0) {}
+  //trivial plane
+
+  Plane3d(const Plane3d & plane);
+  //copy constructor
+
+  Plane3d(const Point3d & p, const Vector &v);
+  // plane with direction v passes through point p 
+
+  Plane3d(const Point3d &p1, const Point3d &p2, const Point3d &p3);
+  //plane passes through points p1, p2, p3
+
+  Plane3d(const Point3d &p, const Line3d &l);
+  //plane passes through point p and line l
+
+  Plane3d(const Point3d &p, const Segment3d &s);
+  //plane passes through point p and segment s
+
+  Plane3d(const Vector &v1, double d1);
+  // plane determined by vector and displacement
+
+  // plane determined by equation
+  Plane3d(double a1, double b1, double c1, double d1);  
+  
+  virtual ~Plane3d() {}
+/************************************************************
+  *   member functions
+ ************************************************************/
+
+  virtual int dim() const { return 2; }
+  
+  double* coeffients() const;
+  double A() const { return a; }
+  double B() const { return b; }
+  double C() const { return c; }
+  double displacement() const { return d; }
+  const Vector& normal() const { return n; }
+
+   // test if plane is trivial
+  bool isTrivial() const { return a==double(0) && b==double(0) && c==double(0); }
+
+   // apply equation of plane to a point
+  double apply( const Point3d& p ) const { return a*p.X()+b*p.Y()+c*p.Z()+d; }
+  
+   // plane against plane predicates
+  bool isCoincident(const Plane3d& pl) const;
+  bool isParallel(const Plane3d& pl) const; 
+   // test parallel
+  bool isParallel(const Line3d& l) const; 
+
+  bool contains( const Point3d& p ) const;
+  bool contains( const Line3d& l ) const;
+  bool contains( const Segment3d& s ) const;
+
+   // returns the projection of p on this line
+  Point3d projection(const Point3d& p) const;
+
+   /** be careful of line(segment) projection
+    *  It could be a line(segment) or point
+    *  The function returns degenerated line(segment) in point case
+    **/
+  Line3d projection(const Line3d& l) const;
+  Segment3d projection(const Segment3d& s) const;
+
+   //distance
+  double distance( const Point3d& p ) const;
+  double distance( const Line3d& l ) const;
+  double distance( const Segment3d& s ) const;
+
+   /** intersect predicates
+    * later implementation may return like this:
+    * return dimension of intersection 
+    * return -1 if not intersect 
+    * return 0 if intersect on a point ... and so on.
+    **/
+  int intersects( const Line3d& l ) const;
+  int intersects( const Point3d& p ) const;
+  int intersects( const Segment3d& s ) const;
+  int intersects( const Plane3d& pl ) const;
+
+   // return intersection 
+  GeomObj* intersection( const Line3d& l ) const;
+  GeomObj* intersection( const Segment3d& s ) const;
+  GeomObj* intersection( const Plane3d& pl ) const;
+
+  bool operator==(const Plane3d& pl) const { return isCoincident(pl); }
+  bool operator!=(const Plane3d& pl) { return !operator==(pl); }
+
+  friend std::istream& operator>>(std::istream& in, Plane3d& pl);
+  friend std::ostream& operator<<(std::ostream& out, const Plane3d& pl);
+
+}; //class Plane3d
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/point3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/point3d.h
new file mode 100644
index 0000000..0630de8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/point3d.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: point3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _POINT3D_H
+#define _POINT3D_H
+
+#include <CGAL/CORE/CORE.h>
+#include <CGAL/CORE/linearAlgebra.h>
+#include <CGAL/CORE/geombase.h>
+
+ // class defination for 3d points
+class Point3d : public GeomObj{
+
+private:
+  double x, y, z;
+ 
+public:
+ 
+  /************************************************************
+   * constructors and destructors
+   ************************************************************/
+  Point3d();  //initialized to origin(0,0,0)
+  Point3d(double x, double y, double z);
+  Point3d(const Point3d & p);
+  Point3d(const Vector& v);
+    //create a point initialized to the point $(v[0], v[1], v[2])$ 
+    //precondition: v.dim() >= 3 (only the first 3 components are used)
+
+  //destructor
+  virtual ~Point3d() {}
+
+  /************************************************************
+   * Methods
+   ************************************************************/
+  Point3d& operator=(const Point3d&);
+  
+  double X() const { return x; }
+  double Y() const { return y; } 
+  double Z() const { return z; } 
+
+  Vector toVector() const { return Vector(x, y, z); } 
+
+  virtual int dim() const { return 0; }
+
+  double distance(const Point3d& p) const;
+    // returns the Euclidean distance between p and this
+
+  double distance() const { return distance(Point3d(0, 0, 0)); }
+    // returns distance between this and origin
+
+  Point3d negate() const { return Point3d(-x, -y, -z); }
+  Vector operator-(const Point3d &p) const;
+  Point3d operator+(const Vector &v) const;
+  Point3d operator-(const Vector &v) const;
+  Point3d operator*(const double& d) const;
+ 
+ /************************************************************
+   * predicates
+   ************************************************************/
+
+  bool operator==(const Point3d&) const;
+  bool operator!=(const Point3d& p) const {return !operator==(p); }
+  
+  /************************************************************
+   * I/O, debugging
+   ************************************************************/
+  friend std::ostream& operator<< (std::ostream&, const Point3d&);
+    // write point p to output stream
+
+  friend std::istream& operator>>(std::istream&, Point3d&);
+    // reads the x and y coordinates of point p from the input stream
+
+  // routines to display point:
+  void dump() const {
+    std::cout << "(" << x <<", " << y << z << ")" ; // simply outputs "(x, y)"
+  }
+
+  void dump(const char* s) const {
+    std::cout << s << "(" << x <<", " << y << z << ")" ; // s is the prefix message
+  }
+
+  void dump(const char* s, const char* ss) const {
+    std::cout << s << "(" << x <<", " << y << z << ss ; // ss is the suffix message
+  }
+
+   // compute signed volume of a tetrahedron
+  friend double signed_volume(const Point3d& a, const Point3d& b, 
+                     const Point3d& c, const Point3d& d);
+
+};//class Point3d
+
+
+/************************************************************
+ *	Inline implementation and some 3d predicates
+ ************************************************************/
+// removed inline implementation for compile under visual c++
+// Zilin Du
+
+// midPt(p, q) returns (p+q)/2:
+Point3d midPt3d ( Point3d& a, Point3d& b);
+
+/* orientation3d(a, b, c, d) 
+ *   computes the orientation of points a, b, c, d as the sign
+ *   of the determinant
+ *              | ax  ay  az 1 |
+ *              | bx  by  bz 1 |
+ *              | cx  cy  cz 1 |
+ *              | dx  dy  dz 1 |
+ *   i.e., it returns +1 if d lies in the opposite side w.r.t. the 
+ *   counter-clockwise side of plane formed by a, b, c
+ */
+int orientation3d(const Point3d& a, const Point3d& b, 
+                         const Point3d& c, const Point3d& d); 
+
+/* area(a, b, c) returns 1/2 times the determinant of orientation(a,b,c)
+ * above.  This is the signed area of the triangle determined by a, b, c,
+ * positive if orientation(a,b,c) > 0, and negative otherwise.  */
+
+double volume(const Point3d& a, const Point3d& b, 
+                     const Point3d& c, const Point3d& d);
+
+
+/* returns true if points a, b, c and d are coplanar, i.e.,
+ * orientation(a, b, c, d) = 0, and false otherwise. 
+ */
+bool coplanar(const Point3d& a, const Point3d& b, 
+                     const Point3d& c, const Point3d& d);
+
+/************************************************************
+ *  CONSTANTS 
+ ************************************************************/
+
+static Point3d ORIGIN_3D(0.0, 0.0, 0.0);
+static Point3d X_UNIT_3D(1.0, 0.0, 0.0);
+static Point3d Y_UNIT_3D(0.0, 1.0, 0.0);
+static Point3d Z_UNIT_3D(0.0, 0.0, 1.0);
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/polygon3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/polygon3d.h
new file mode 100644
index 0000000..56f3f12
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/polygon3d.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: polygon3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _POLYGON3D_H_
+#define _POLYGON3D_H_
+
+#include <CGAL/CORE/geom3d/point3d.h>
+#include <CGAL/CORE/geom3d/segment3d.h>
+#include <CGAL/CORE/geom3d/plane3d.h>
+#include <CGAL/CORE/geom3d/line3d.h>
+
+class Polygon3d : public GeomObj {
+
+private:
+  class PointNode {
+    public:
+      Point3d  *p;
+      PointNode *prev;
+      PointNode *next;
+
+      PointNode( const Point3d& _p ) { p = new Point3d(_p); prev=NULL; next=NULL; }
+      ~PointNode()  { delete p; }
+  };
+
+  PointNode* headN;       //head of linked list
+  int size;               //length of the list
+
+public:
+  class Iterator;
+  friend class Iterator;
+  class Iterator {
+    private:
+      PointNode* pointer;
+
+    public:
+      Iterator( PointNode* node ) { pointer = node; }
+
+      PointNode* getPointer() { return pointer; }
+      //bool hasNext() { return pointer->next != Polygon3d::headN; }
+      //Point3d* nextPoint() { pointer=pointer->next; return pointer->prev->p; }
+
+      Iterator& operator =(Iterator & it) { pointer=it.getPointer(); return *this; }
+
+       // postfix only
+      Iterator& operator ++(int) { pointer = pointer->next; return *this; }
+      Iterator& operator --(int) { pointer = pointer->prev; return *this; } 
+      Point3d* getPoint() { return pointer->p; }
+
+       // remove current node
+      void remove( )      { 
+          PointNode* temp = pointer;
+          pointer->next->prev = pointer->prev;
+          pointer->prev->next = pointer->next;
+          pointer = pointer->prev;
+          delete temp;
+      }
+
+  };
+
+   // default
+  Polygon3d();
+
+  // initialize given a triangle
+  // not included, use Polygon3d::toPolygon() instead
+  //Polygon3d(const Triangle3d& T);
+  
+
+
+ //copy constructor
+  Polygon3d(const Polygon3d& plg);
+
+  virtual ~Polygon3d();
+
+  /************************************************************
+   *   member functions
+   ************************************************************/
+
+   // view a polygon as a surface
+  virtual int dim() const { return 2; }
+   
+  int getSize() const { return size; }
+
+  Iterator getIterator() { return Iterator(headN); }
+
+  bool searchPoint( const Point3d& p ) const;
+  Point3d* getPoint( int index ) const;
+   // append to the end of list
+  void addPoint( const Point3d& p );  
+
+   // remove point at given position
+  void removePoint( int index );
+   // return false if point doesn't exist
+  bool removePoint( const Point3d& p );
+  void removeAllPoints();
+  
+   // get next point of p
+   // return NULL if p doesn't exist
+  Point3d* nextPoint( const Point3d& p ) const;
+
+   // get previous point of p
+   // return NULL if p doesn't exist
+  Point3d* prevPoint( const Point3d& p ) const;
+
+   //operators
+  Point3d* operator []( int index ) const { return getPoint(index); }
+  Polygon3d& operator =(const Polygon3d& plg);
+
+   // test identity
+  bool operator ==(Polygon3d& plg) const;
+  bool operator !=(Polygon3d& plg) const  { return !(*this == plg); }
+
+   // verify if polygon is valid
+  bool verify();
+   
+   // test coplanarity 
+  bool isCoplanar( const Point3d& p ) const;
+  bool isCoplanar( const Segment3d& s )  const { 
+         return isCoplanar(s.startPt()) && isCoplanar(s.stopPt()); }
+  bool isCoplanar( const Line3d& l )     const { 
+         return isCoplanar(l.startPt()) && isCoplanar(l.stopPt()); }
+
+  bool isCoplanar( const Plane3d& pl ) const;
+
+   // test if p is on any edge
+  bool isOnEdge( const Point3d& p ) const;
+ 
+protected:  
+  void freeMemory();      // delete the point list
+
+   // copy point list from other polygon
+   // make sure old list has been deleted before calling this
+  void copy( const Polygon3d& plg );
+
+  /************************************************************
+   *   I/O 
+   ************************************************************/
+
+  friend std::ostream& operator<<(std::ostream& in, const Polygon3d& plg);
+  
+}; //class Polygon3d
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/segment3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/segment3d.h
new file mode 100644
index 0000000..de9203c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/segment3d.h
@@ -0,0 +1,177 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: segment3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef _SEGMENT3D_H_
+#define _SEGMENT3D_H_
+
+#include <CGAL/CORE/geom3d/point3d.h>
+#include <CGAL/CORE/geom3d/line3d.h>
+
+/************************************************************
+ *  Class Segment3d:
+ *
+ *  An instance s of Segment3d is a finite or infinite line segment
+ *  in the three dimensional plane, defined by a start point
+ *  s.startPt() and a stop point s.stopPt().  It can be regarded
+ *  as an open or a closed segment (default: open), and directed
+ *  or not (default: directed).
+ *
+ *  We do not necessarily assume that startPt() != stopPt().
+ ************************************************************/
+
+#define S_TYPE_FINITE 0
+#define S_TYPE_RAY    1
+#define S_TYPE_LINE   2
+
+class Plane3d;
+
+class Segment3d : public GeomObj{
+
+private:
+
+  Point3d p0;
+  Point3d p1;
+  bool directed;     // segments can be directed or not (default is directed)
+  bool open;        // segments can be open or closed (default is open)
+  //int finite;     // 0=finite, 1=ray, 2=line (default is 0)
+
+public:
+
+  /************************************************************
+   *   constructors
+   ************************************************************/
+
+  Segment3d(const Segment3d &s);
+
+  Segment3d(const Point3d &p, const Point3d &q);
+  	//finite segment with endpoints p and q
+
+  Segment3d(const Point3d & p, const Vector & v);
+	//ray segment
+
+  Segment3d();
+  	//trivial segment from (0,0) to (0,0) 
+
+  virtual ~Segment3d() {}
+  /*************************************************************
+   *   member functions
+   *************************************************************/
+  
+  virtual int dim() const { return 1; }
+
+  Point3d startPt() const { return p0; }  
+  Point3d stopPt()  const { return p1; }
+  Vector direction() const { return p1 - p0; }
+
+  void reverse();
+  //  reverses the direction of the segment
+
+  void setDirected( bool beDirected ) { directed = beDirected; }
+  void setOpen(  bool beOpen ) { open = beOpen; }
+  
+  void setStartPt( Point3d& p ) { p0 = p; }
+  void setStopPt ( Point3d& p ) { p1 = p; }
+
+  double length() const { return p0.distance(p1); }
+    //length of segment
+    
+  Line3d toLine() const { return Line3d(p0,p1); }
+ 
+  double distance( const Point3d& p ) const;
+  // returns the Euclidean distance between this segment and point q
+
+  Point3d nearPt( const Point3d& q ) const;
+   // returns the point on segment closest to q;
+
+  /*************************************************************
+   *   predicates
+   *************************************************************/
+
+  bool isDirected() const { return directed; }
+  bool isOpen() const {return open; }
+  bool isTrivial() const {return p0 == p1; }  
+  bool isCollinear( const Point3d& p ) const {return toLine().contains(p); }
+  bool contains( const Segment3d& s ) const { return contains(s.startPt()) && contains(s.stopPt()); }
+  bool isCoincident( const Segment3d& s) const;
+  
+  bool isCoplanar( const Line3d& s) const;
+  bool isCoplanar( const Segment3d& s) const;
+  
+  bool contains( const Point3d& p ) const;
+  
+  bool operator==( const Segment3d& s ) { return isCoincident( s ); }
+
+  bool operator!=( const Segment3d& s ) { return !operator==(s); }
+
+  /*************************************************************
+   *   intersection
+   *************************************************************/
+
+  int intersects( const Line3d& l ) const;
+  //decides whether *this and t intersect in one point
+  // return dim of intersetion
+  
+  int intersects( const Segment3d& s ) const;
+  //decides whether *this and t intersect in one point
+  // return dim of intersetion
+
+  GeomObj* intersection( const Line3d& l ) const;
+  // return intersection point if this segment and l intersect at a single point
+  // the intersection point is returned 
+  
+  GeomObj* intersection( const Segment3d& s ) const;
+  // return intersection point if this segment and s intersect at a single point
+  // the intersection point is returned 
+ 
+  Plane3d bisect_plane() const;
+   // return bisector plane
+   
+  /*************************************************************
+   *   I/O
+   *************************************************************/
+
+  friend std::istream& operator>>(std::istream& in, Segment3d& l);
+  friend std::ostream& operator<<(std::ostream& out, const Segment3d& l);
+
+}; //class Segment3d
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/triangle3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/triangle3d.h
new file mode 100644
index 0000000..bcf459d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geom3d/triangle3d.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/*****************************************************************
+ * File: triangle3d.h
+ * Synopsis:
+ *      Basic 3-dimensional geometry
+ * Author: Shubin Zhao (shubinz at cs.nyu.edu), 2001.
+ *
+ *****************************************************************
+ * CORE Library Version 1.4 (July 2001)
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * Copyright (c) 1995, 1996, 1998, 1999, 2000, 2001 Exact Computation Project
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+
+#ifndef _TRIANGLE3D_H_
+#define _TRIANGLE3D_H_
+
+#include <CGAL/CORE/geom3d/point3d.h>
+#include <CGAL/CORE/geom3d/line3d.h>
+#include <CGAL/CORE/geom3d/segment3d.h>
+#include <CGAL/CORE/geom3d/plane3d.h>
+#include <CGAL/CORE/geom3d/polygon3d.h>
+
+class Triangle3d : public GeomObj{
+
+private:
+  
+  // three vertices
+  Point3d p0; 
+  Point3d p1; 
+  Point3d p2;
+
+public:
+
+  /************************************************************
+   *   constructors
+   ************************************************************/
+
+  Triangle3d(const Point3d& v1, const Point3d& v2, const Point3d& v3);
+  // given three vertices
+
+  Triangle3d(const Triangle3d& T);
+  // given a triangle
+
+  Triangle3d(): p0(ORIGIN_3D), p1(ORIGIN_3D), p2(ORIGIN_3D) {}
+  //trivial triangle
+
+  virtual ~Triangle3d() {}
+  /************************************************************
+   *   member functions
+   ************************************************************/
+
+   // view a triangle as a surface
+  virtual int dim() const { return 2; }
+   
+  Point3d V1() const { return p0; }
+  Point3d V2() const { return p1; }
+  Point3d V3() const { return p2; }
+  
+  Vector normal() const { return (p1 - p0).cross( p2 - p0); }
+  // return normal of the plane containing this triangle
+
+  Plane3d toPlane() const { return Plane3d(p0,p1,p2); }  
+ 
+  Polygon3d* toPolygon() const;
+  /************************************************************
+   *   predicates
+   ************************************************************/
+   
+  inline bool isCoplanar( const Point3d& p ) const   { 
+                return orientation3d(p0, p1, p2, p) == 0; }
+  inline bool isCoplanar( const Segment3d& s ) const { 
+                return isCoplanar(s.startPt()) && isCoplanar(s.stopPt()); }
+  inline bool isCoplanar( const Line3d& l )   const  { 
+                return isCoplanar(l.startPt()) && isCoplanar(l.stopPt()); }
+  inline bool isCoplanar( const Triangle3d& T ) const {
+                return isCoplanar(T.V1()) && isCoplanar(T.V2()) && isCoplanar(T.V3()); }
+  inline bool isCoplanar( const Plane3d& pl )  const { 
+                return pl.contains(p0) && pl.contains(p1) && pl.contains(p2); }
+
+   // test if p is on triangle 
+  bool contains( const Point3d& p ) const;
+   // test if s is on triangle 
+  inline bool contains( const Segment3d& s ) const  {
+               return contains( s.startPt() ) && contains( s.stopPt() ); }
+
+  // test if T is on triangle 
+  inline bool contains( const Triangle3d& T ) const  {
+               return contains( T.V1() ) && contains( T.V2() ) && contains( T.V3() ); }
+
+
+  bool isOnEdge( const Point3d& p ) const;
+  // test if p is on the edge
+
+  bool inside( const Point3d& p ) const;
+  // test if p is inside the triangle
+  
+  /************************************************************
+   *  Intersection
+   ************************************************************/
+
+  /** all intersect predicates return the dimension of the intersection 
+    * -1 if disjoint (i.e., parallel but distinct lines)
+    * 0  if coincident
+    * 0  if intersect in a point.  In this case, the
+    *
+    // 	-1 if disjoint (i.e., parallel but distinct lines)
+    //  1  if coincident
+    //  0  if intersect in a point.  In this case, the
+    //		intersection point is assigned to p if this is available.
+  **/
+  
+   // intersect predicates
+  bool do_intersect( const Segment3d& s ) const;
+  bool do_intersect( const Line3d& l ) const;
+  bool do_intersect( const Plane3d& pl ) const;
+  bool do_intersect( const Triangle3d& t ) const;
+  
+   // these are consistent with other classes
+   // they return the dimension of the intersection
+   // return -1 if no intersection
+  int  intersects( const Segment3d& s ) const;
+  int  intersects( const Line3d& l ) const;
+  int  intersects( const Plane3d& pl ) const;
+  int  intersects( const Triangle3d& T ) const;
+
+   // general intersections
+  GeomObj* intersection( const Segment3d& s ) const;
+  GeomObj* intersection( const Line3d& l ) const;
+  GeomObj* intersection( const Plane3d& pl ) const;
+  GeomObj* intersection( const Triangle3d& t ) const;
+
+   // coplanar intersections
+  GeomObj* coplanar_intersection( const Segment3d& s ) const;
+  GeomObj* coplanar_intersection( const Line3d& l ) const;
+  GeomObj* coplanar_intersection( const Triangle3d& T ) const;
+
+  Polygon3d* in_half_plane( const Point3d& pa, 
+                           const Point3d& pb, 
+                           const Point3d& pSide,
+                           Polygon3d& plg ) const;
+
+  int coplanar_orientation( const Point3d& pa, const Point3d& pb, 
+                            const Point3d& ps, const Point3d& p ) const;
+  /************************************************************
+   *   I/O 
+   ************************************************************/
+
+  friend std::istream& operator>>(std::istream& in, Triangle3d& T);
+  friend std::ostream& operator<<(std::ostream & out, const Triangle3d & T);
+  
+}; //class Triangle3d
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geombase.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geombase.h
new file mode 100644
index 0000000..de4e576
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geombase.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/******************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2002 Exact Computation Project
+ * 
+ * File: geombase.h
+ * Synopsis:
+ *      Code that is common to (and included by) geometry2d.h 
+ *      and geometry3d.h
+ *
+ * Written by
+ *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef CORE_GEOMETRY_H
+#define CORE_GEOMETRY_H
+
+#include <CGAL/CORE/CORE.h>
+
+
+//base class for geom2d and geom3d classes
+class GeomObj {
+
+public:
+
+  // Exceptions
+
+  class Exception {
+  	public:
+  	  virtual void print_message( char* msg ) { std::cerr << msg <<std::endl; }
+  };
+
+  class NoIntersection : public Exception { };
+
+  class IllegalOperation : public Exception { };
+
+  virtual int dim() const { return -1; }
+
+}; //class GeomObj
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry2d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry2d.h
new file mode 100644
index 0000000..eea5f61
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry2d.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/******************************************************************
+ * Core Library Version 1.5, August 2002
+ * Copyright (c) 1995-2002 Exact Computation Project
+ * 
+ * File: geometry2d.h
+ * Synopsis:
+ *      Basic 2-dimensional geometry
+ *
+ * Written by
+ *      Yaping Yuan (yqy0522 at cs.nyu.edu), 1999.
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef CORE_GEOMETRY2D_H
+#define CORE_GEOMETRY2D_H
+
+#ifndef CORE_LEVEL
+#  define CORE_LEVEL 3
+#endif
+
+#include <CGAL/CORE/geom2d/point2d.h>
+#include "CGAL/CORE/geom2d/line2d.h"
+#include "CGAL/CORE/geom2d/circle2d.h"
+#include "CGAL/CORE/geom2d/segment2d.h"
+
+// automaticall link necessary static library under visual c++
+#ifdef _MSC_VER
+	#if CORE_LEVEL == 1
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level1.lib")
+		#else
+			#pragma comment(lib, "corex_level1.lib")
+		#endif
+	#elif CORE_LEVEL == 2
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level2.lib")
+		#else
+			#pragma comment(lib, "corex_level2.lib")
+		#endif
+	#elif CORE_LEVEL == 3
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level3.lib")
+		#else
+			#pragma comment(lib, "corex_level3.lib")
+		#endif
+	#endif
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry3d.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry3d.h
new file mode 100644
index 0000000..5487ed4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/geometry3d.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/******************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2002 Exact Computation Project
+ * 
+ * File: geometry3d.h
+ *
+ * Written by
+ *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef CORE_GEOMETRY3D_H
+#define CORE_GEOMETRY3D_H
+
+#ifndef CORE_LEVEL
+#  define CORE_LEVEL 3
+#endif
+
+#include <CGAL/CORE/linearAlgebra.h>
+
+class Point3d;
+class Line3d;
+class Segment3d;
+class Plane3d;
+class Triangle3d;
+class Polygon3d;
+
+#include <CGAL/CORE/geom3d/point3d.h>
+#include <CGAL/CORE/geom3d/line3d.h>
+#include <CGAL/CORE/geom3d/segment3d.h>
+#include <CGAL/CORE/geom3d/plane3d.h>
+#include <CGAL/CORE/geom3d/triangle3d.h>
+#include <CGAL/CORE/geom3d/polygon3d.h>
+
+// automaticall link necessary static library under visual c++
+#ifdef _MSC_VER
+	#if CORE_LEVEL == 1
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level1.lib")
+		#else
+			#pragma comment(lib, "corex_level1.lib")
+		#endif
+	#elif CORE_LEVEL == 2
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level2.lib")
+		#else
+			#pragma comment(lib, "corex_level2.lib")
+		#endif
+	#elif CORE_LEVEL == 3
+		#ifdef _DEBUG
+			#pragma comment(lib, "corexDebug_level3.lib")
+		#else
+			#pragma comment(lib, "corex_level3.lib")
+		#endif
+	#endif
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/linearAlgebra.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/linearAlgebra.h
new file mode 100644
index 0000000..fcea0b6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/linearAlgebra.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004                                     
+ * Copyright (c) 1995-2004 Exact Computation Project                         
+ * All rights reserved.                                                      
+ *                                                                           
+ * This file is part of CGAL (www.cgal.org).                
+ * You can redistribute it and/or modify it under the terms of the GNU       
+ * Lesser General Public License as published by the Free Software Foundation,      
+ * either version 3 of the License, or (at your option) any later version.   
+ *                                                                           
+ * Licensees holding a valid commercial license may use this file in         
+ * accordance with the commercial license agreement provided with the        
+ * software.                                                                 
+ *                                                                           
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
+ *                                                                           
+ *                                                                           
+ * $URL$                                                                     
+ * $Id$                                                                      
+ ***************************************************************************/
+/******************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2002 Exact Computation Project
+ * 
+ * File: LinearAlgebra.h
+ * Synopsis:
+ *      Linear Algebra Extension of Core Library introducing
+ *              class Vector
+ *              class Matrix
+ *
+ * Written by
+ *       Shubin Zhao (shubinz at cs.nyu.edu) (2001)
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $Id$
+ *****************************************************************/
+
+#ifndef CORE_LINEAR_ALGEBRA_H
+#define CORE_LINEAR_ALGEBRA_H
+
+#ifndef CORE_LEVEL
+#  define CORE_LEVEL 3
+#endif
+
+#include <cstdarg>
+#include <CGAL/CORE/CORE.h>
+
+class Vector;
+class Matrix;
+
+////////////////////////////////////////////////////////////////////////
+//  Class Vector
+//     Generic vectors
+//     Operations implemented:  addition, subtraction, dot product
+////////////////////////////////////////////////////////////////////////
+
+class Vector {
+private:
+   int     dim;
+   double* _rep;
+public:
+   class RangeException { };
+   class ArithmeticException { };
+
+   explicit Vector(int);
+   Vector();
+   Vector(double, double);
+   Vector(double, double, double);
+   Vector(const Vector&);
+   Vector(int, double *);
+   ~Vector();
+
+   const Vector& operator=(const Vector&);
+
+   bool operator==(const Vector&);
+   bool operator!=(const Vector&);
+   const Vector& operator+=(const Vector&);
+   const Vector& operator-=(const Vector&);
+   const Vector& operator*=(double);
+
+   const double& operator[](int) const;
+   double& operator[](int);
+
+   double norm() const;
+   double maxnorm() const;
+   double infnorm() const;
+   double dimension() const {return dim;}
+   bool isZero() const;
+   Vector cross(const Vector &v) const; 
+   static Vector crossProduct(int, ...);
+
+   friend Vector operator+(const Vector&, const Vector&);
+   friend Vector operator-(const Vector&, const Vector&);
+   friend Vector operator-(const Vector&);
+   friend Vector operator*(const Vector&, double);
+   friend Vector operator*(double, const Vector&);
+   friend Vector operator*(const Matrix&, const Vector&);
+   friend Vector operator*(const Vector&, const Matrix&);
+   friend double dotProduct(const Vector&, const Vector&);
+
+   friend std::istream& operator>>(std::istream&, Vector&);
+   friend std::ostream& operator<<(std::ostream&, const Vector&);
+};
+
+////////////////////////////////////////////////////////////////////////
+//  Class Matrix
+//     Generic matrices
+//     Operations implemented:  addition, subtraction, multiplication
+////////////////////////////////////////////////////////////////////////
+
+class Matrix {
+private:
+   int dim1, dim2;
+   double* _rep;
+
+public:
+   class RangeException { };
+   class ArithmeticException { };
+
+   explicit Matrix(int);
+   Matrix(int, int);
+   Matrix(int, int, double *);
+   Matrix(double, double,
+          double, double);
+   Matrix(double, double, double,
+          double, double, double,
+          double, double, double);
+   Matrix(const Matrix&);
+   ~Matrix();
+
+   Matrix& operator=(const Matrix&);
+
+   bool operator==(const Matrix&);
+   bool operator!=(const Matrix&);
+
+   const Matrix& operator+=(const Matrix&);
+   const Matrix& operator-=(const Matrix&);
+   const Matrix& operator*=(double);
+
+   const double& operator()(int, int) const;
+   double& operator()(int, int);
+
+   // added by chen li
+   //   const Vector& row(int i) const;
+   //   const Vector& col(int i) const;
+   Matrix matrixAlgebraRemainder(int, int) const;
+   double valueAlgebraRemainder(int, int) const;
+   const Matrix& transpose();
+
+   double determinant() const;
+
+   int dimension_1() const { return dim1; }
+   int dimension_2() const { return dim2; }
+
+   friend Matrix operator+(const Matrix&, const Matrix&);
+   friend Matrix operator-(const Matrix&, const Matrix&);
+   friend Matrix operator*(const Matrix&, double);
+   friend Matrix operator*(double, const Matrix&);
+   friend Vector operator*(const Vector&, const Matrix&);
+   friend Vector operator*(const Matrix&, const Vector&);
+   friend Matrix operator*(const Matrix&, const Matrix&);
+   friend Matrix transpose(const Matrix&);
+
+   friend double det(const double a, const double b,
+                const double c, const double d);
+   friend double det(const Vector u, const Vector & v);  // u,v are 2d vectors
+   
+   friend std::istream& operator>>(std::istream&, Matrix&);
+   friend std::ostream& operator<<(std::ostream&, const Matrix&);
+
+}; //Matrix
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.h
new file mode 100644
index 0000000..dd364a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.h
@@ -0,0 +1,527 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Curves.h
+ *
+ * Description: 
+ * 	Two templated classes are defined here:
+ *		Curve and BiPoly
+ *	These classes are parametrized by the number type
+ *		(called NT) which represents the
+ *		domain of the coefficients of the underlying
+ *		polynomials.  Standard default is NT=BigInt, but
+ *		we will allow NT=int, NT=BigRat, NT=BigFloat, NT=Expr.
+ *	BiPoly represents the class of bivariate polynomials,
+ *		i.e.,  each BiPoly object is an element of NT[X,Y].
+ *		We store each BiPoly as a list of polynomials in X.
+ *	Curve represents the class of plane curves whose equation
+ *		is A(X,Y)=0, for some BiPoly A(X,Y).
+ *	Features:
+ *		--Constructor from strings such as
+ *			"3 x^2 + 7 xy^2 - 4 x + 13".
+ *		--Basic plot functions
+ *
+ *	To Do:
+ *	  --Dump should produce human readable strings like
+ *	  	"3 x^2 + 7 xy^2 - 4 x + 13".
+ *	  --String constructor generalizations:
+ *	  	(1) allow one "=" sign (e.g., "3 x^2 = y^2 - xy")(DONE)
+ *		(2) allow general parenthesis
+ *		(3) allow X and Y (DONE)
+ *	  --We should be able to read/write
+ *	  	curve definitions from/to files
+ *	  --Plot should be more efficient (use previous roots
+ *	  	to help find the next roots, there should be
+ *	  	a "plot structure" that is persistent)
+ *	  --Plot should refine in both x- and y-increments.
+ *	  --Plot should have some option to show the
+ *	  	x- and y-axes, and to label some points.
+ *	  --verticalIntersect(...) should be implemented using
+ *	        Polynomial<BigFloat>, not Polynomial<Expr> for efficiency
+ *	  --the plot parameters (eps,xmin,xmax,ymin,ymax) must be
+ *	        made part of the Curve class (static members).
+ *	        Incorporate the "setParams" method into class.
+ *
+ *  Author:  Vikram Sharma and Chee Yap
+ *  Date:    April 12, 2004
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+
+#ifndef CORE_CURVES_H
+#define CORE_CURVES_H
+
+#include <fstream>
+#include <list>
+#include "CGAL/CORE/poly/Poly.h"
+
+namespace CORE { 
+
+// ==================================================
+// Curve Class
+// ==================================================
+
+//typedef BigInt NT;
+//typedef Expr   NT;
+//typedef Polynomial<NT>        PolyNT;
+//typedef std::vector<Expr>	VecExpr;
+//typedef std::vector<BigInt>	VecBigInt;
+//typedef std::vector<NT>       VecNT;
+//typedef std::vector<Polynomial<NT> >	VecPoly;
+
+template <class NT>
+class Monomial{
+  //Helper class to store the coefficients for given x-deg and y-deg 
+  //Used by string input routines
+ public:
+  NT coeff;
+  int xdeg;
+  int ydeg;
+
+  Monomial(){
+  }
+
+  Monomial(NT& cf, int& dx, int& dy){
+    coeff = cf;
+    xdeg = dx;
+    ydeg = dy;
+  }
+
+  void dump(){
+    std::cout << coeff << "X^" << xdeg << " Y^" << ydeg;
+  }
+};
+
+
+//Class of Bivariate polynomials
+//	Viewed as a polynomial in Y with
+//	coefficients which are polynomials in X
+template <class NT>
+class BiPoly{
+ private:
+  //The following are used in the constructor from strings.
+  //For more details see the related constructor.
+  void constructFromString(string& s, char myX='x', char myY='y');
+  void constructX(int n, BiPoly<NT>& P);
+  void constructY(int n, BiPoly<NT>& P);
+  int getnumber(const char* c, int i, unsigned int len, BiPoly<NT> & P);
+  bool isint(char c);
+  int getint(const char* c, int i, unsigned int len, int & n);
+  int matchparen(const char* cstr, int start);
+  int getbasicterm(string s, BiPoly<NT> & P);
+  int getterm(string s, BiPoly<NT> & P);
+
+ public:
+  int ydeg; //Y-degree of the polynomial
+  std::vector<Polynomial<NT> > coeffX; //vector of (1+ydeg) polynomials in X
+	// If ydeg = d, then the polynomial is F(X,Y) =
+        //   (Y^d * coeffX[d]) + (Y^{d-1} * coeffX[d-1]) +...+ (coeffX[0]).
+
+  ////////////////////////////////////////////////////////
+  //Constructors
+  ////////////////////////////////////////////////////////
+
+  //BiPoly()
+  BiPoly(); // zero polynomial
+
+  //BiPoly(n)
+  BiPoly(int n);// creates a BiPoly with nominal y-degree equal to n.
+
+  //BiPoly(vp)
+  BiPoly(std::vector<Polynomial<NT> > vp); // From vector of Polynomials
+
+  //BiPoly(p, flag):
+  //	if true, it converts polynomial p(X) into P(Y)
+  // 	if false, it creates the polynomial Y-p(X)
+  BiPoly(Polynomial<NT> p, bool flag=false);
+  
+  //BiPoly(deg, d[], C[]):
+  //	Takes in a list of list of coefficients.
+  //	Each cofficient list represents a polynomial in X
+  //
+  //  deg - ydeg of the bipoly
+  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
+  //  C[] - list of coefficients, we use array d to select the
+  //      coefficients
+  BiPoly(int deg, int *d, NT *C);
+
+  //BiPoly(String s, char myX, char myY)
+  //  myX and myY are names of the two variables.
+  //  Default values of myX and myY are 'x' and 'y'.
+  //  The string s has the form "3 x^2 + 7 xy^2 - 4 x + 13"
+  //
+  //  For now, we assume no parentheses, * or =.
+  
+  BiPoly(const string& s, char myX='x', char myY='y');
+  BiPoly(const char* s, char myX='x', char myY='y');
+
+  // copy constructor
+  BiPoly(const BiPoly<NT>&);
+
+  //Destructor
+  ~BiPoly();
+  //Destructor helper
+  void deleteCoeffX();
+
+
+  ////////////////////////////////////////////////////////
+  // METHODS
+  ////////////////////////////////////////////////////////
+  
+  // filedump (msg, ofs, com, com2)
+  // 	where msg, com, com2 are strings.
+  // 	msg is an message and com, com2 are the strings
+  // 	preceding each output line
+  // 	(e.g., msg="BiVariate Polynomial"  and com=com2="# ")
+  // This is called by the other dump functions
+  void dump(std::ostream & os, std::string msg = "",
+      std::string com="# ", std::string com2 = "# ") const;
+  // dump(ofs, msg, com) -- dump to file
+  //void dump(std::ofstream & ofs, std::string msg,
+  //    std::string com="# ", std::string com2="# ") const;
+
+  // dump(msg, com) -- dump to std output
+  void dump(std::string msg="", std::string com="",
+      std::string com2="") const;
+
+  /*Cannot work with these two functions right now.
+    BiPoly as per now can only handle BigInt and int since
+    Expr cannot be handled by Polynomial class.*/
+  
+  // yPolynomial(x) 
+  //   returns the polynomial (in Y) when we substitute X=x
+  
+  /* BiPoly<NT> yPolynomial(const Expr & x) {
+
+    VecExpr vE;
+
+    for (int i=0; i<= ydeg; i++) {
+      vE.push_back(coeffX[i].eval(x));
+    }
+    
+    return BiPoly<NT>(vE);
+  }//yPolynomial
+  */
+
+  Polynomial<NT> yPolynomial(const NT & x);
+
+  // Expr version of yPoly (temporary hack)
+  Polynomial<Expr> yExprPolynomial(const Expr & x);
+
+  // BF version of yPoly (temporary hack)
+  Polynomial<BigFloat> yBFPolynomial(const BigFloat & x);
+
+  // xPolynomial(y) 
+  //   returns the polynomial (in X) when we substitute Y=y
+  //   
+  //   N.B. May need the
+  //   		Polynomial<Expr> xExprPolynomial(Expr y)
+  //   version too...
+  //
+  Polynomial<NT> xPolynomial(const NT & y) ;
+  
+  // getYdegree()
+  int getYdegree() const;
+  
+  // getXdegree()
+  int getXdegree();
+
+  // getTrueYdegree
+  int getTrueYdegree();
+
+  //eval(x,y)
+  Expr eval(Expr x, Expr y);//Evaluate the polynomial at (x,y)
+
+  ////////////////////////////////////////////////////////
+  // Polynomial arithmetic (these are all self-modifying)
+  ////////////////////////////////////////////////////////
+  
+  // Expands the nominal y-degree to n;
+  //	Returns n if nominal y-degree is changed to n
+  //	Else returns -2
+
+  int expand(int n);
+
+  // contract() gets rid of leading zero polynomials
+  //	and returns the new (true) y-degree;
+  //	It returns -2 if this is a no-op
+
+  int contract();
+
+  // Self-assignment
+  BiPoly<NT> & operator=( const BiPoly<NT>& P);
+
+  // Self-addition
+  BiPoly<NT> & operator+=( BiPoly<NT>& P);
+   
+  // Self-subtraction
+  BiPoly<NT> & operator-=( BiPoly<NT>& P);
+
+  // Self-multiplication
+  BiPoly<NT> & operator*=( BiPoly<NT>& P);
+  
+  // Multiply by a polynomial in X
+  BiPoly<NT> & mulXpoly( Polynomial<NT> & p);
+
+  //Multiply by a constant
+  BiPoly<NT> & mulScalar( NT & c);
+
+  // mulYpower: Multiply by Y^i (COULD be a divide if i<0)
+  BiPoly<NT> & mulYpower(int s);
+  
+  // Divide by a polynomial in X.
+  // We replace the coeffX[i] by the pseudoQuotient(coeffX[i], P)
+  BiPoly<NT> & divXpoly( Polynomial<NT> & p);
+  
+  //Using the standard definition of pseudRemainder operation.
+  //	--No optimization!
+  BiPoly<NT>  pseudoRemainderY (BiPoly<NT> & Q);
+
+  //Partial Differentiation
+  //Partial Differentiation wrt Y
+  BiPoly<NT> & differentiateY();
+
+  BiPoly<NT> & differentiateX();
+  BiPoly<NT> & differentiateXY(int m, int n);//m times wrt X and n times wrt Y
+
+  //Represents the bivariate polynomial in (R[X])[Y] as a member
+  //of (R[Y])[X].
+  //But since our polynomials in X can only have NT coeff's thus
+  // to represent the above polynomial we switch X and Y once
+  // the conversion has been done.
+  //NOTE: This is different from replacing X by Y which was
+  //      done in the case of the constructor from a polynomial in X
+  //Need to calculate resultant wrt X.
+  BiPoly<NT> & convertXpoly();
+
+  //Set Coeffecient to the polynomial passed as a parameter
+  bool setCoeff(int i, Polynomial<NT> p);
+
+  void reverse();
+  Polynomial<NT> replaceYwithX();
+
+  //Binary-power operator
+  BiPoly<NT>& pow(unsigned int n);
+
+  //Returns a Bipoly corresponding to s, which is supposed to
+  //contain as place-holders the chars 'x' and 'y'.
+  BiPoly<NT> getbipoly(string s);
+};//BiPoly Class
+
+  ////////////////////////////////////////////////////////
+  // Helper Functions
+  ////////////////////////////////////////////////////////
+//Experimental version of constructor from strings containing general 
+//parentheses
+
+
+// zeroPinY(P)
+//	checks whether a Bi-polynomial is a zero Polynomial
+template <class NT>
+bool zeroPinY(BiPoly<NT> & P);
+
+// gcd(P,Q)
+//   This gcd is based upon the subresultant PRS to avoid
+//   exponential coeffecient growth and gcd computations, both of which 
+//   are expensive since the coefficients are polynomials
+
+template <class NT>
+BiPoly<NT> gcd( BiPoly<NT>& P ,BiPoly<NT>& Q);
+
+// resY(P,Q):
+//      Resultant of Bi-Polys P and Q w.r.t. Y.
+//      So the resultant is a polynomial in X
+template <class NT>
+Polynomial<NT>  resY( BiPoly<NT>& P ,BiPoly<NT>& Q);
+
+// resX(P,Q):
+//      Resultant of Bi-Polys P and Q w.r.t. X.
+//      So the resultant is a polynomial in Y
+//	We first convert P, Q to polynomials in X. Then 
+// 	call resY and then turn it back into a polynomial in Y
+//	QUESTION: is this last switch really necessary???
+template <class NT>
+BiPoly<NT>  resX( BiPoly<NT>& P ,BiPoly<NT>& Q);
+
+//Equality operator for BiPoly
+template <class NT>
+bool operator==(const BiPoly<NT>& P, const BiPoly<NT>& Q);
+
+//Addition operator for BiPoly
+template <class NT>
+ BiPoly<NT> operator+(const BiPoly<NT>& P, const BiPoly<NT>& Q);
+
+//Subtraction operator for BiPoly
+template <class NT>
+ BiPoly<NT> operator-(const BiPoly<NT>& P, const BiPoly<NT>& Q);
+
+//Multiplication operator for BiPoly
+template <class NT>
+ BiPoly<NT> operator*(const BiPoly<NT>& P, const BiPoly<NT>& Q);
+
+
+  ////////////////////////////////////////////////////////
+  //Curve Class
+  //  	extends BiPoly Class
+  ////////////////////////////////////////////////////////
+
+template < class NT >
+class Curve : public BiPoly<NT> {
+public:
+  // Colors for plotting curves
+
+  static const int NumColors=7;
+  static double red_comp(int i){
+  	static double RED_COMP[] = {0.9, 0.8, 0.7, 0.6, 0.8, 0.8, 0.7};
+	return RED_COMP[i % NumColors];
+  }
+  static double green_comp(int i){
+  	static double GREEN_COMP[] = {0.5, 0.9, 0.3, 0.9, 0.7, 0.55, 0.95};
+	return GREEN_COMP[i % NumColors];
+  }
+  static double blue_comp(int i){
+  	static double BLUE_COMP[] = {0.8, 0.3, 0.8, 0.5, 0.4, 0.85, 0.35};
+	return BLUE_COMP[i % NumColors];
+  }
+
+  Curve(); // zero polynomial
+  
+  //Curve(vp):
+  //    construct from a vector of polynomials
+  Curve(std::vector<Polynomial<NT> > vp);
+  //	  : BiPoly<NT>(vp){
+  //}
+  
+  //Curve(p):
+  //	Converts a polynomial p(X) to a BiPoly in one of two ways:
+  // 	    (1) if flag is false, the result is Y-p(X) 
+  // 	    (2) if flag is true, the result is p(Y) 
+  //    The default is (1) because we usually want to plot the
+  //        graph of the polynomial p(X)
+  Curve(Polynomial<NT> p, bool flag=false);
+  //	  : BiPoly<NT>(p, flag){
+  //}
+
+  //Curve(deg, d[], C[]):
+  //	Takes in a list of list of coefficients.
+  //	Each cofficient list represents a polynomial in X
+  //
+  //  deg - ydeg of the bipoly
+  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
+  //  C[] - list of coefficients, we use array d to select the
+  //      coefficients
+  Curve(int deg, int *d, NT *C);
+  //	  : BiPoly<NT>(deg, d, C){
+  //}
+
+  Curve(const BiPoly<NT> &P);
+  //	  : BiPoly<NT>(P){
+  //}
+
+  //Curve(n) -- the nominal y-degree is n
+  Curve(int n);
+
+  //Creates a curve from a string (no parentheses, no *, no =)
+  Curve(const string & s, char myX='x', char myY='y');
+  Curve(const char* s, char myX='x', char myY='y');
+
+  /////////////////////////////////////////////////////////////////////////
+  // verticalIntersections(x, vecI, aprec=0):
+  //    The list vecI is passed an isolating intervals for y's such that (x,y)
+  //    lies on the curve.
+  //    If aprec is non-zero (!), the intervals have with < 2^{-aprec}.
+  //    Return is -2 if curve equation does not depend on Y
+  //    	-1 if infinitely roots at x,
+  //    	0 if no roots at x
+  //    	1 otherwise
+
+  int verticalIntersections(const BigFloat & x, BFVecInterval & vI,
+			    int aprec=0);
+  
+  // TO DO: 
+  // 		horizontalIntersections(...)
+  
+  /////////////////////////////////////////////////////////////////////////
+  // plot(eps, x1, y1, x2, y2)
+  //
+  // 	All parameters have defaults
+  //
+  //    Gives the points on the curve at resolution "eps".  Currently,
+  //    eps is viewed as delta-x step size (but it could change).
+  //    The display is done in the rectangale 
+  //    defined by [(x1, y1), (x2, y2)].
+  //    The output is written into a file in the format specified
+  //    by our drawcurve function (see COREPATH/ext/graphics).
+  //
+  //    Heuristic: the open polygonal lines end when number of roots
+  //    changes...
+  //
+  int  plot( BigFloat eps=0.1, BigFloat x1=-1.0,
+	     BigFloat y1=-1.0, BigFloat x2=1.0, BigFloat y2=1.0, int fileNo=1);
+
+// selfIntersections():
+//   this should be another member function that lists
+//   all the self-intersections of a curve
+//
+//  template <class NT>
+//  void selfIntersections(BFVecInterval &vI){
+//  ...
+//  }
+
+};// Curve class
+
+
+  ////////////////////////////////////////////////////////
+  // Curve helper functions
+  ////////////////////////////////////////////////////////
+
+
+//Xintersections(C, D, vI):
+//  returns the list vI of x-ccordinates of possible intersection points.
+//  Assumes that C & D are quasi-monic.(or generally aligned)
+template <class NT>
+void  Xintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI);
+
+//Yintersections(C, D, vI):
+//	similar to Xintersections
+template <class NT>
+void  Yintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI);
+
+// Display Intervals
+template <class NT>
+void showIntervals(char* s, BFVecInterval &vI);
+
+// Set Display Parameters
+// ...
+
+////////////////////////////////////////////////////////
+// IMPLEMENTATIONS ARE FOUND IN Curves.tcc
+////////////////////////////////////////////////////////
+#include <CGAL/CORE/poly/Curves.tcc>
+
+
+} //namespace CORE
+#endif
+/*************************************************************************** */
+// END
+/*************************************************************************** */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.tcc b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.tcc
new file mode 100644
index 0000000..9e89be0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Curves.tcc
@@ -0,0 +1,1429 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ *  File: Curves.tcc
+ *
+ *  Description: 
+ *  	This file contains the implementations of
+ *		functions defined by Curves.h
+ *	It is included through Curves.h
+ *  	Please see Curves.h for more details.
+ *
+ *  Author:  Vikram Sharma and Chee Yap
+ *  Date:    April 12, 2004
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+
+//CONSTRUCTORS FOR THE BIPOLY CLASS
+  ////////////////////////////////////////////////////////
+  //Constructors
+  ////////////////////////////////////////////////////////
+
+template <class NT>
+BiPoly<NT>::BiPoly(){ // zero polynomial
+    ydeg = -1;
+  }
+  
+  //BiPoly(n)
+
+template <class NT>
+BiPoly<NT>::BiPoly(int n){// creates a BiPoly with nominal y-degree equal to n.
+
+     // To support this constructor, you need functions
+     // that are equivalent to "setCoeff(i, PolyNT q)" in the Poly Class
+     // You also want "getCoeff(i)" functions.
+     // E.g. BiPoly<NT> p(10);
+     //      PolyNT q(3, {1,2,3,4});
+     //      p.setCoeff(10, q);
+     //      p.setCoeff(0, PolyNT());
+     //
+    ydeg = n;
+    if (n<0) return; // coeffX not needed
+    for(int i=0; i<= ydeg; i++){
+      Polynomial<NT> temp;
+      coeffX.push_back(temp);      
+    }
+  }
+
+  //BiPoly(vp)
+template <class NT>
+BiPoly<NT>::BiPoly(std::vector<Polynomial<NT> > vp){ 
+    // From vector of Polynomials
+    ydeg = vp.size() - 1;
+    if(ydeg >=0){
+      coeffX = vp;
+    }
+  }
+  
+  //BiPoly(p, flag):
+  //	if true, it converts polynomial p(X) into P(Y)
+  // 	if false, it creates the polynomial Y-p(X)
+
+template <class NT>
+BiPoly<NT>::BiPoly(Polynomial<NT> p, bool flag){
+    if (flag){
+      ydeg = p.getTrueDegree();
+      if(ydeg >=0){
+        for(int i=0; i<=ydeg; i++){
+	  Polynomial<NT> temp(0);
+	  temp.setCoeff(0, p.getCoeffi(i));
+	  coeffX.push_back(temp);	// does STL make a copy of temp?
+        }//for
+      }//if
+    } else {
+      ydeg = 1;
+      coeffX.push_back(p);
+      coeffX.push_back(Polynomial<NT>::polyUnity());
+    }//else
+  }//BiPoly(p)
+
+
+  //BiPoly(deg, d[], C[]):
+  //	Takes in a list of list of coefficients.
+  //	Each cofficient list represents a polynomial in X
+  //
+  //  deg - ydeg of the bipoly
+  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
+  //  C[] - list of coefficients, we use array d to select the
+  //      coefficients
+
+template <class NT>
+BiPoly<NT>::BiPoly(int deg, int *d, NT *C){
+
+    ydeg = deg;
+    Polynomial<NT> temp;
+    int max=0;
+    for(int i=0; i <=deg; i++)
+      max = core_max(d[i],max);
+
+    NT *c = new NT[max];
+
+    for(int i=0; i<= deg; i++){
+      for(int j=0; j <=d[i]; j++)
+	c[j] = C[i+j];
+      temp = Polynomial<NT>(d[i],c);
+      coeffX.push_back(temp);      
+    }
+    delete[] c;
+  }//BiPoly(deg,d[],C[])
+
+
+//The BNF syntax is the following:-
+//    [bipoly] -> [term]| [term] +/- [bipoly]
+//    [term] -> [basic term]|[basic term] [term]|[basic term]*[term]
+//    [basic term] -> [number]|'x'|'y'|[basic term]'^'[number]
+//                    | '(' [bipoly]')'|'-'
+//Unary minus is treated as a basic term
+template <class NT>
+BiPoly<NT>::BiPoly(const char * s, char myX, char myY){
+	string ss(s);
+	constructFromString(ss, myX, myY);
+}
+template <class NT>
+BiPoly<NT>::BiPoly(const string & s, char myX, char myY){
+	string ss(s);
+	constructFromString(ss, myX, myY);
+}
+template <class NT>
+void BiPoly<NT>::constructFromString(string & s, char myX, char myY){
+  if((myX != 'x' || myX != 'X') && (myY != 'y' || myY != 'Y')){
+    //Replace myX with 'x' and myY with 'y' in s.
+    unsigned int loc = s.find(myX, 0);
+    while(loc != string::npos){
+      s.replace(loc,1,1,'x');
+      loc = s.find(myX, loc+1);
+    }
+    loc = s.find(myY, 0);
+    while(loc != string::npos){
+      s.replace(loc,1,1,'y');
+      loc = s.find(myY, loc+1);
+    }
+  }
+  (*this) =  (*this).getbipoly(s);
+
+}
+
+//Constructor from another BiPoly
+template <class NT>
+BiPoly<NT>::BiPoly(const BiPoly<NT> &P) : ydeg(P.ydeg), coeffX(P.coeffX) {
+}
+
+  //Destructor
+template <class NT>
+void BiPoly<NT>::deleteCoeffX(){
+  coeffX.clear();
+}
+
+template <class NT>
+BiPoly<NT>::~BiPoly(){
+  if (ydeg >= 0)
+    deleteCoeffX();
+}
+
+
+
+
+  ////////////////////////////////////////////////////////
+  // METHODS USED BY STRING CONSTRUCTOR ABOVE
+  ////////////////////////////////////////////////////////
+
+
+//Sets the input BiPoly to X^n
+template <class NT>
+void BiPoly<NT>::constructX(int n, BiPoly<NT>& P){
+  CGAL_assertion(n>= -1);
+  P.deleteCoeffX();//Clear the present coeffecients
+  Polynomial<NT> q(n);//Nominal degree n
+  q.setCoeff(n,NT(1)); 
+  if (n>0) q.setCoeff(0,NT(0));
+  P.coeffX.push_back(q);
+  P.ydeg = 0;
+}
+
+//Sets the input BiPoly to Y^n
+template <class NT>
+void BiPoly<NT>::constructY(int n, BiPoly<NT>& P){
+  P.ydeg = 0;
+  P.deleteCoeffX();//Clear the present coeffecients
+  NT cs[] = {1};
+  Polynomial<NT> q(0, cs);
+  P.coeffX.push_back(q);//P is the unit bipoly. Now we just multiply Y^n
+  P.mulYpower(n);
+}
+
+//Returns in P the coeffecient starting from start
+template <class NT>
+int BiPoly<NT>::getnumber(const char* c, int start, unsigned int len,
+			  BiPoly<NT> & P){
+  int j=0;
+  char *temp = new char[len];
+  while(isint(c[j+start])){
+    temp[j]=c[j+start];j++;
+  }
+  temp[j] = '\0';
+  NT cf = NT(temp);
+  P.deleteCoeffX();
+  Polynomial<NT> q(0);
+  q.setCoeff(0, cf);
+  P.coeffX.push_back(q);
+  P.ydeg = 0;
+  delete[] temp;
+
+  return (j-1+start);//Exactly the length of the number
+}
+
+template <class NT>
+bool BiPoly<NT>::isint(char c){
+  if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
+     c == '5' || c == '6' || c == '7' || c == '8' || c == '9')
+    return true;
+  else
+    return false;
+}
+
+
+//Returns as integer the number starting from start in c
+template <class NT>
+int BiPoly<NT>::getint(const char* c, int start, unsigned int len,
+			  int & n){
+  int j=0;
+  char *temp = new char[len];
+  while(isint(c[j+start])){
+    temp[j]=c[j+start];j++;
+  }
+  temp[j] = '\n';
+  n = atoi(temp);
+  delete[] temp;
+
+  return (j-1+start);//Exactly the length of the number
+}
+
+//Given a string starting with an open parentheses returns the place
+// which marks the end of the corresponding closing parentheses.
+//Strings of the form (A).
+template <class NT>
+int BiPoly<NT>::matchparen(const char* cstr, int start){
+  int count = 0;
+  int j=start;
+  
+  do{
+    if(cstr[j] == '('){
+      count++;
+    }
+    if(cstr[j] == ')'){
+      count--;
+    }
+    j++;      
+  }while(count != 0 );//j is one more than the matching ')'
+  
+  return j-1;
+}
+
+
+template <class NT>
+int BiPoly<NT>::getbasicterm(string s, BiPoly<NT> & P){
+  const char * cstr = s.c_str();
+  unsigned int len = s.length();
+  int i=0;
+  //BiPoly<NT> * temp = new BiPoly<NT>();
+
+  if(isint(cstr[i])){
+    i = getnumber(cstr, i, len, P);
+  }else if(cstr[i] == 'x'||cstr[i] == 'X'){
+    constructX(1, P);
+  }else if(cstr[i] == 'y'||cstr[i] == 'Y'){
+    constructY(1, P);
+  }else if(cstr[i] =='('){
+    int oldi = i;
+    i = matchparen(cstr, i);
+    string t = s.substr(oldi+1, i -oldi -1);
+    P = getbipoly(t);
+  }else if(cstr[i] == '-'){//Unary Minus
+    P.ydeg = 0;
+    P.deleteCoeffX();//Clear the present coeffecients
+    NT cs[] = {-1};
+    Polynomial<NT> q(0, cs);
+    P.coeffX.push_back(q);
+  }else{
+    std::cout <<"ERROR IN PARSING BASIC TERM" << std::endl;
+  }
+  //i+1 points to the beginning of next syntaxtic object in the string.
+ if(cstr[i+1] == '^'){
+    int n;
+    i = getint(cstr, i+2, len, n);
+    P.pow(n);
+  }
+  return i;
+}
+
+
+template <class NT>
+int BiPoly<NT>::getterm(string s, BiPoly<NT> & P){
+  unsigned int len = s.length();
+  if(len == 0){// Zero BiPoly
+    P = BiPoly<NT>();
+    return 0;
+  }
+  unsigned int ind, oind;
+  const char* cstr =s.c_str();
+  string t;
+  //P will be used to accumulate the product of basic terms.
+  ind = getbasicterm(s, P);
+  while(ind != len-1 && cstr[ind + 1]!='+' && cstr[ind + 1]!='-' ){
+    //Recursively get the basic terms till we reach the end or see
+    // a '+' or '-' sign.
+    if(cstr[ind + 1] == '*'){
+      t = s.substr(ind + 2, len - ind -2);
+      oind = ind + 2;
+    }else{
+      t = s.substr(ind + 1, len -ind -1);
+      oind = ind + 1;
+    }
+
+    BiPoly<NT> R;
+    ind = oind + getbasicterm(t, R);//Because the second term is the offset in
+                                     //t
+    P *= R;
+  }
+
+  return ind;
+}
+
+template <class NT>
+BiPoly<NT> BiPoly<NT>::getbipoly(string s){
+
+    //Remove white spaces from the string
+    unsigned int cnt=s.find(' ',0);
+    while(cnt != string::npos){
+      s.erase(cnt, 1);
+      cnt = s.find(' ', cnt);
+    }
+
+    unsigned int len = s.length();
+    if(len <= 0){//Zero Polynomial
+      return BiPoly<NT>();
+    }
+
+    //To handle the case when there is one '=' sign
+    //Suppose s is of the form s1 = s2. Then we assign s to
+    //s1 + (-1)(s2) and reset len
+    unsigned int loc;
+    if((loc=s.find('=',0)) != string::npos){
+      s.replace(loc,1,1,'+');
+      string s3 = "(-1)(";
+      s.insert(loc+1, s3);
+      len = s.length();
+      s.insert(len, 1, ')');
+    }
+    len = s.length();
+
+    const char *cstr = s.c_str();
+    string t;
+    BiPoly<NT> P;
+    // P will be the polynomial in which we accumulate the
+    //sum and difference of the different terms.
+    unsigned int ind;
+
+    if(cstr[0] == '-'){
+      t = s.substr(1, len);
+      ind = getterm(t,P) + 1;
+      NT negone(-1);
+      P.mulScalar(negone);
+    }else{
+      ind = getterm(s, P);
+    }
+
+    unsigned int oind =0;//the string between oind and ind is a term
+    while(ind != len -1){
+      BiPoly<NT> R;
+      t = s.substr(ind + 2, len -ind -2);
+      oind = ind;
+      ind = oind + 2 + getterm(t, R);
+      if(cstr[oind + 1] == '+')
+	P += R;
+      else if(cstr[oind + 1] == '-')
+	P -= R;
+      else
+	std::cout << "ERROR IN PARSING BIPOLY! " << std::endl;
+    }
+
+    return P;
+}
+
+  ////////////////////////////////////////////////////////
+  // METHODS
+  ////////////////////////////////////////////////////////
+  
+  // filedump (msg, ofs, com, com2)
+  // 	where msg and com are strings.
+  // 	msg is an message and com is the character preceding each line
+  // 	(e.g., msg=""  and com=com2="# ")
+  // This is called by the other dump functions
+template <class NT>
+void BiPoly<NT>::dump(std::ostream & os, std::string msg,
+    std::string com, std::string com2) const {
+    if (msg != "")
+      os << msg << std::endl;
+    if(ydeg == -1) {
+      os << com << " Zero Polynomial" << std::endl;
+      return;
+    }
+    bool first = true;
+    os << com;
+    for (int i=0; i <= ydeg; i++){
+      if (!zeroP(coeffX[i])){
+	if (i % 3 == 0) os << std::endl << com2 ;  // output 3 coefficients per line
+	if (first) first = false;
+	else os << " + ";
+	os << "[";
+	coeffX[i].filedump(os,"","",com2); // Note: first comment string is ""
+	os << "]";
+        if (i > 0) os <<" * y^"<< i ;
+      }
+    }
+  }//dump
+
+  // dump(ofs, msg, com, com2) -- dump to file
+  //
+/*
+template <class NT>
+void BiPoly<NT>::dump(std::ofstream & ofs, std::string msg,
+              std::string com, std::string com2) const {
+    dump(ofs, msg, com, com2);
+  }
+*/
+  // dump(msg, com) -- dump to std output
+template <class NT>
+void BiPoly<NT>::dump(std::string msg, std::string com,
+    std::string com2) const {
+    dump(std::cout, msg, com, com2);
+  }
+
+  /* ***********************************************************
+    We want to substitute X or Y with a general Expression or BigFloat
+    into a BiPoly.  E.g., the following produces a Y-polynomial
+    after replacing X by x:
+
+  BiPoly<NT> yPolynomial(const Expr & x) {
+
+    VecExpr vE;
+    for (int i=0; i<= ydeg; i++) {
+        vE.push_back(coeffX[i].eval(x));
+    }
+    return Polynomial<Expr>(vE);
+  }//yPolynomial
+    
+    But this has many problems.
+    Solution below is to have special yExprPolynomial(x).
+    *********************************************************** */
+  
+template <class NT>
+Polynomial<NT> BiPoly<NT>::yPolynomial(const NT & x) {
+    NT coeffVec[ydeg+1];
+    int d=-1;
+    for(int i=ydeg; i >= 0 ; i--){
+      coeffVec[i] = coeffX[i].eval(x);
+      if ((d < 0) && (coeffVec[i] != 0))
+	      d = i;
+    }
+    return Polynomial<NT>(d, coeffVec);
+  }
+
+  // Specialized version of yPolynomial for Expressions
+template <class NT>
+  Polynomial<Expr> BiPoly<NT>::yExprPolynomial(const Expr & x) {
+    Expr coeffVec[ydeg+1];
+    int d=-1;
+    for(int i=ydeg; i >= 0 ; i--){
+      coeffVec[i] = coeffX[i].eval(x);
+      if ((d < 0) && (coeffVec[i] != 0))
+	      d = i;
+    }
+    return Polynomial<Expr>(d, coeffVec);
+  }
+
+  // Specialized version of yPolynomial for BigFloat
+  // ASSERTION: BigFloat x is exact
+template <class NT>
+  Polynomial<BigFloat> BiPoly<NT>::yBFPolynomial(const BigFloat & x) {
+    BigFloat coeffVec[ydeg+1];
+    int d=-1;
+    for(int i=ydeg; i >= 0 ; i--){
+      coeffVec[i] = coeffX[i].eval(x);
+      if ((d < 0) && (coeffVec[i] != 0))
+	      d = i;
+    }
+    return Polynomial<BigFloat>(d, coeffVec);
+  }
+
+  // xPolynomial(y) 
+  //   returns the polynomial (in X) when we substitute Y=y
+  //   
+  //   N.B. May need the
+  //   		Polynomial<Expr> xExprPolynomial(Expr y)
+  //   version too...
+  //
+
+template <class NT>
+Polynomial<NT> BiPoly<NT>::xPolynomial(const NT & y) {
+    Polynomial<NT> res = coeffX[0];
+    NT yPower(y);
+    for(int i=1; i <= ydeg ; i++){
+      res += coeffX[i].mulScalar(yPower);
+      yPower *= y;
+    }
+    return res;
+  }//xPolynomial
+  
+
+  // getYdegree()
+template <class NT>
+int BiPoly<NT>::getYdegree() const {
+    return ydeg;
+  }
+  
+  // getXdegree()
+template <class NT>
+int BiPoly<NT>::getXdegree(){
+    int deg=-1;
+    for(int i=0; i <=ydeg; i++)
+      deg = max(deg, coeffX[i].getTrueDegree());
+    return deg;
+  }
+
+  // getTrueYdegree
+template <class NT>
+int BiPoly<NT>::getTrueYdegree(){
+    for (int i=ydeg; i>=0; i--){
+      coeffX[i].contract();
+      if (!zeroP(coeffX[i]))
+	return i;
+    }
+    return -1;	// Zero polynomial
+  }//getTrueYdegree
+
+
+  //eval(x,y)
+template <class NT>
+Expr BiPoly<NT>::eval(Expr x, Expr y){//Evaluate the polynomial at (x,y)
+    Expr e = 0;
+
+    for(int i=0; i <=ydeg; i++){
+      e += coeffX[i].eval(x)*pow(y,i);
+    }
+    return e;
+  }//eval
+
+  ////////////////////////////////////////////////////////
+  // Polynomial arithmetic (these are all self-modifying)
+  ////////////////////////////////////////////////////////
+  
+  // Expands the nominal y-degree to n;
+  //	Returns n if nominal y-degree is changed to n
+  //	Else returns -2
+
+template <class NT>
+int BiPoly<NT>::expand(int n) {
+    if ((n <= ydeg)||(n < 0))
+      return -2;
+    
+    for(int i=ydeg+1; i <=n ;i++)
+      coeffX.push_back(Polynomial<NT>::polyZero());
+    
+    ydeg = n;
+    return n;
+  }//expand
+
+  // contract() gets rid of leading zero polynomials
+  //	and returns the new (true) y-degree;
+  //	It returns -2 if this is a no-op
+
+template <class NT>
+int BiPoly<NT>::contract() {
+    int d = getTrueYdegree();
+    if (d == ydeg)
+      return (-2);  // nothing to do
+    else{
+      for (int i = ydeg; i> d; i--)
+	coeffX.pop_back();
+      ydeg = d;
+    }
+    return d;
+  }//contract
+
+  // Self-assignment
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::operator=( const BiPoly<NT>& P) {
+  if (this == &P)
+    return *this;	// self-assignment
+  ydeg = P.getYdegree();
+  coeffX = P.coeffX;
+  return *this;
+  }//operator=
+
+
+  // Self-addition
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::operator+=( BiPoly<NT>& P) { // +=
+
+    int d = P.getYdegree();
+    if (d > ydeg)
+      expand(d);
+    for (int i = 0; i<=d; i++)
+      coeffX[i] += P.coeffX[i];
+
+  return *this;
+  }//operator+=
+   
+  // Self-subtraction
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::operator-=( BiPoly<NT>& P) { // -=
+    int d = P.getYdegree();
+    if (d > ydeg)
+      expand(d);
+  for (int i = 0; i<=d; i++)
+    coeffX[i] -= P.coeffX[i];
+
+  return *this;
+  }//operator-=
+
+  // Self-multiplication
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::operator*=( BiPoly<NT>& P) { // *=
+    int d = ydeg + P.getYdegree();
+
+    std::vector<Polynomial<NT> > vP;
+
+    Polynomial<NT>* c = new Polynomial<NT> [d + 1];
+    for(int i=0; i <=d; i++)
+      c[i] = Polynomial<NT>();
+    
+    for (int i = 0; i<=P.getYdegree(); i++)
+      for (int j = 0; j<=ydeg; j++) {
+	if(!zeroP(P.coeffX[i]) && !zeroP(coeffX[j]))
+	  c[i+j] += P.coeffX[i] * coeffX[j];
+      }
+
+    for(int i=0; i <= d; i++)
+      vP.push_back(c[i]);
+
+    delete[] c;
+    coeffX.clear();
+    coeffX = vP;
+    ydeg = d;
+    return *this;
+  }//operator*=
+  
+  // Multiply by a polynomial in X
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::mulXpoly( Polynomial<NT> & p) {
+    contract();
+    if (ydeg == -1)
+      return *this;
+
+    for (int i = 0; i<=ydeg ; i++)
+      coeffX[i] *= p;
+    return *this;
+  }//mulXpoly
+
+  //Multiply by a constant
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::mulScalar( NT & c) {
+    for (int i = 0; i<=ydeg ; i++)
+      coeffX[i].mulScalar(c);
+    return *this;
+  }//mulScalar
+
+  // mulYpower: Multiply by Y^i (COULD be a divide if i<0)
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::mulYpower(int s) {
+  // if s >= 0, then this is equivalent to
+  // multiplying by Y^s;  if s < 0, to dividing by Y^s
+  if (s==0)
+    return *this;
+  int d = s+getTrueYdegree();
+  if (d < 0) {
+    ydeg = -1;
+    deleteCoeffX();
+    return *this;
+  }
+
+  std::vector<Polynomial<NT> > vP;
+  if(s > 0){
+    for(int i=0; i < s; i ++)
+      vP.push_back(Polynomial<NT>::polyZero());
+    for(int i=s; i<=d; i++)
+      vP.push_back(coeffX[i-s]);
+  }
+
+  if (s < 0) {
+    for (int j=-1*s; j <= d-s; j++)
+      vP.push_back(coeffX[j]);
+  }
+
+  coeffX = vP;
+  ydeg= d;
+  return *this;
+  }//mulYpower
+
+
+  
+  // Divide by a polynomial in X.
+  // We replace the coeffX[i] by the pseudoQuotient(coeffX[i], P)
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::divXpoly( Polynomial<NT> & p) {
+    contract();
+    if (ydeg == -1)
+      return *this;
+
+    for (int i = 0; i<=ydeg ; i++)
+      coeffX[i] = coeffX[i].pseudoRemainder(p);
+
+    return *this;
+  }// divXpoly
+
+
+  
+  //Using the standard definition of pseudRemainder operation.
+  //	--No optimization!
+template <class NT>
+BiPoly<NT> BiPoly<NT>::pseudoRemainderY (BiPoly<NT> & Q){
+    contract();
+    Q.contract();
+    int qdeg = Q.getYdegree();
+    Polynomial<NT> LC(Q.coeffX[qdeg]), temp1(LC), temp;
+    BiPoly<NT> P(Q);
+
+    std::vector<Polynomial<NT> > S;//The quotient in reverse order
+    if(ydeg < qdeg){
+      return (*this);
+    }
+    (*this).mulXpoly(temp1.power(ydeg - qdeg +1));
+
+    while(ydeg >= qdeg){
+      temp1 = coeffX[ydeg];
+      temp = temp1.pseudoRemainder(LC);
+      S.push_back(temp);
+      P.mulXpoly(temp);
+      P.mulYpower(ydeg - qdeg);
+      *this -= P;
+      contract();
+      P = Q;//P is used as a temporary since mulXpower and mulYpower are
+            // self modifying
+    }
+
+    //Correct the order of S
+    std::vector<Polynomial<NT> > vP;
+
+    for(int i= S.size()-1; i>=0; i--)
+      vP.push_back(S[i]);
+
+
+    return BiPoly<NT>(vP);
+    
+  }//pseudoRemainder
+
+  //Partial Differentiation
+  //Partial Differentiation wrt Y
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::differentiateY() {	
+  if (ydeg >= 0) {
+    for (int i=1; i<=ydeg; i++)
+      coeffX[i-1] = coeffX[i].mulScalar(i);
+    ydeg--;
+  }
+  return *this;
+  }// differentiation wrt Y
+
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::differentiateX() {	
+    if (ydeg >= 0)
+      for (int i=0; i<=ydeg; i++)
+	coeffX[i].differentiate();
+    
+    return *this;
+  }// differentiation wrt X
+
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::differentiateXY(int m, int n) {//m times wrt X and n times wrt Y
+    CGAL_assertion(m >=0); CGAL_assertion(n >=0);
+    for(int i=1; i <=m; i++)
+      (*this).differentiateX();
+    for(int i=1; i <=n; i++)
+      (*this).differentiateY();
+    
+    return *this;
+  }
+
+  //Represents the bivariate polynomial in (R[X])[Y] as a member
+  //of (R[Y])[X].
+  //But since our polynomials in X can only have NT coeff's thus
+  // to represent the above polynomial we switch X and Y once
+  // the conversion has been done.
+  //NOTE: This is different from replacing X by Y which was
+  //      done in the case of the constructor from a polynomial in X
+  //Need to calculate resultant wrt X.
+template <class NT>
+BiPoly<NT> & BiPoly<NT>::convertXpoly(){
+    getTrueYdegree();
+    if(ydeg == -1) return (*this);
+    NT *cs = new NT[ydeg +1];
+    int xdeg = getXdegree();
+    std::vector<Polynomial<NT> > vP;
+
+    for(int i=0; i<=xdeg; i++){
+      for(int j=0; j<=ydeg; j++){
+	cs[j] = coeffX[j].getCoeffi(i);
+      }
+      
+      vP.push_back(Polynomial<NT>(ydeg, cs));
+    }
+    delete[] cs;
+      
+    ydeg = xdeg;
+    coeffX = vP;
+    return (*this);
+  }
+
+  //Set Coeffecient to the polynomial passed as a parameter
+template <class NT>
+bool BiPoly<NT>::setCoeff(int i, Polynomial<NT> p){
+    if(i < 0 || i > ydeg)
+      return false;
+    coeffX[i] = p;
+    return true;
+  }
+  
+template <class NT>
+void BiPoly<NT>::reverse() {
+    Polynomial<NT> tmp;
+    for (int i=0; i<= ydeg/2; i++) {
+      tmp = coeffX[i];
+      coeffX[i] =   coeffX[ydeg-i];
+      coeffX[ydeg-i] = tmp;
+    }
+  }//reverse
+
+  //replaceYwithX()
+  //   used used when the coeffX in BiPoly are constants,
+  //   to get the corresponding univariate poly in X
+  //   E.g., Y^2+2*Y+9 will be converted to X^2+2*X+9
+template <class NT>
+Polynomial<NT>  BiPoly<NT>::replaceYwithX(){
+    int m = getTrueYdegree();
+    NT *cs = new NT[m+1];
+    for(int i=0; i <= m ; i++)
+      cs[i]=coeffX[i].getCoeffi(0);
+    delete[] cs;
+
+    return Polynomial<NT>(m,cs);
+  }//replaceYwithX
+  
+template <class NT>
+BiPoly<NT>&  BiPoly<NT>::pow(unsigned int n){
+
+  if (n == 0) {
+    ydeg = 0;
+    deleteCoeffX();
+    Polynomial<NT> unity(0);
+    coeffX.push_back(unity);
+  }else if(n == 1){
+
+  }else{
+    BiPoly<NT> x(*this);
+
+    while ((n % 2) == 0) { // n is even
+      x *= x;
+      n >>= 1;
+    }
+    BiPoly<NT> u(x);
+    while (true) {
+      n >>= 1;
+      if (n == 0){
+	(*this) = u;
+	return (*this);
+      }
+      x *= x;
+      if ((n % 2) == 1) // n is odd
+        u *= x;
+    }
+    (*this) = u;
+  }
+  return (*this);
+}//pow
+
+
+
+  ////////////////////////////////////////////////////////
+  // Helper Functions
+  ////////////////////////////////////////////////////////
+
+// isZeroPinY(P)
+//	checks whether a Bi-polynomial is a zero Polynomial
+template <class NT>
+bool isZeroPinY(BiPoly<NT> & P){
+    if(P.getTrueYdegree() == -1)
+      return true;
+    return false;
+}
+
+// gcd(P,Q)
+//   This gcd is based upon the subresultant PRS to avoid
+//   exponential coeffecient growth and gcd computations, both of which 
+//   are expensive since the coefficients are polynomials
+
+template <class NT>
+BiPoly<NT> gcd( BiPoly<NT>& P ,BiPoly<NT>& Q){
+    int m = P.getTrueYdegree();
+    int n = Q.getTrueYdegree();
+
+    //If both Bi-Polys are zero then return zero
+    if( m==-1 && n==-1){
+      return BiPoly<NT>();//Had to do this for the type of
+                          //return value o/w causes problem in
+    }                    //assignment operation
+
+    if(m < n) {
+      return gcd(Q, P);
+    }
+
+    //If one of the Bi-Polys are zero then return the other
+    if(n==-1)
+      return P;
+
+    //When the two BiPolys are just univariate Polynomials in X
+    if(m==0 && n==0){
+      std::vector<Polynomial<NT> > vP;
+      vP.push_back(gcd(P.coeffX[0], Q.coeffX[0]));
+      return BiPoly<NT>(vP);//Had to do this for the type of
+                            //return value
+      }
+    
+    int delta = m - n;
+    Polynomial<NT> a(Q.coeffX[n]);
+    std::vector<NT> vN;
+    vN.push_back(pow(BigInt(-1),delta + 1));
+    Polynomial<NT> beta(vN);
+    Polynomial<NT> phi(power(a, delta)), t;
+    m = n;
+    BiPoly<NT> temp;
+    P.pseudoRemainderY(Q);
+
+    while(!isZeroPinY(P)){
+      P.divXpoly(beta);
+      n = P.getTrueYdegree();
+      delta = m - n;
+      beta = power(phi, delta)*a.mulScalar(pow(BigInt(-1),delta+1));
+      a = P.coeffX[n];
+      t = power(phi, delta -1);
+      phi = power(a,delta).pseudoRemainder(t);
+      m = n;
+      temp = Q;//Swapping the pseudo-remainder for the next step
+      Q = P;
+      P = temp;
+      P.pseudoRemainderY(Q);
+  }
+    return Q;
+}//gcd
+
+// resY(P,Q):
+//      Resultant of Bi-Polys P and Q w.r.t. Y.
+//      So the resultant is a polynomial in X
+template <class NT>
+Polynomial<NT>  resY( BiPoly<NT>& P ,BiPoly<NT>& Q){
+
+  int m = P.getTrueYdegree();
+  int n = Q.getTrueYdegree();
+
+  //If either polynomial is zero, return zero
+  if( m == -1 || n == -1) return Polynomial<NT>();//::polyZero();
+
+  if(n > m)
+    return resY(Q, P);
+
+  Polynomial<NT> b(Q.coeffX[n]);
+  Polynomial<NT> lc(P.coeffX[m]), C, temp;
+  BiPoly<NT> r;
+  
+  r = P.pseudoRemainderY(Q);
+  C = b * r.coeffX[r.getTrueYdegree()];
+  C = C.pseudoRemainder(lc);
+
+  if(isZeroPinY(P) && n > 0)
+    return Polynomial<NT>();//::polyZero();
+
+  if(Q.getTrueYdegree() == 0 && isZeroPinY(P))
+    return power(Q.coeffX[0], m);
+
+  int l = P.getTrueYdegree();
+
+  temp = power(b, m-l).mulScalar(pow(BigInt(-1),m*n))*resY(Q,P);
+  temp = temp.pseudoRemainder(power(C,n));
+  return temp;
+
+}//resY
+
+// resX(P,Q):
+//      Resultant of Bi-Polys P and Q w.r.t. X.
+//      So the resultant is a polynomial in Y
+//	We first convert P, Q to polynomials in X. Then 
+// 	call resY and then turns it back into a polynomial in Y
+//	QUESTION: is this last switch really necessary???
+template <class NT>
+BiPoly<NT>  resX( BiPoly<NT>& P ,BiPoly<NT>& Q){
+  P.convertXpoly();
+  Q.convertXpoly();
+
+  // Polynomial<NT> p(resY(P,Q));
+  // return BiPoly<NT>(p);
+  return(resY(P,Q)); // avoid the switch back
+}//resX
+
+
+//Equality operator for BiPoly
+template <class NT>
+bool operator==(const BiPoly<NT>& P, const BiPoly<NT>& Q) {	// ==
+  BiPoly<NT> P1(P);
+  BiPoly<NT> Q1(Q);
+  P1.contract();
+  Q1.contract();
+  if(P1.getYdegree() != Q1.getYdegree())
+    return false;
+  else{
+    for(int i=0; i <= P1.getYdegree() ; i++){
+      if(P1.coeffX[i] != Q1.coeffX[i])
+	return false;
+    }
+  }
+  return true;
+}
+
+  // Addition P + Q
+template <class NT>
+BiPoly<NT> operator+(const BiPoly<NT>& P, const BiPoly<NT>& Q ) { // +
+  return BiPoly<NT>(P) += Q;
+}
+  // Subtraction P - Q
+template <class NT>
+BiPoly<NT> operator-(const  BiPoly<NT>& P,const  BiPoly<NT>& Q ) { // +
+  return BiPoly<NT>(P) -= Q;
+}
+
+  // Multiplication P * Q
+template <class NT>
+BiPoly<NT> operator*(const  BiPoly<NT>& P, const BiPoly<NT>& Q ) { // +
+  return BiPoly<NT>(P) *= Q;
+}
+
+
+  ////////////////////////////////////////////////////////
+  //Curve Class
+  //  	extends BiPoly Class
+  ////////////////////////////////////////////////////////
+
+template < class NT >
+Curve<NT>::Curve(){} // zero polynomial
+  
+  //Curve(vp):
+  //    construct from a vector of polynomials
+template < class NT >
+Curve<NT>::Curve(std::vector<Polynomial<NT> > vp)
+	  : BiPoly<NT>(vp){
+  }
+  
+  //Curve(p):
+  //	Converts a polynomial p(X) to a BiPoly in one of two ways:
+  // 	    (1) if flag is false, the result is Y-p(X) 
+  // 	    (2) if flag is true, the result is p(Y) 
+  //    The default is (1) because we usually want to plot the
+  //        graph of the polynomial p(X)
+template < class NT >
+Curve<NT>::Curve(Polynomial<NT> p, bool flag)
+	  : BiPoly<NT>(p, flag){
+  }
+
+  //Curve(deg, d[], C[]):
+  //	Takes in a list of list of coefficients.
+  //	Each cofficient list represents a polynomial in X
+  //
+  //  deg - ydeg of the bipoly
+  //  d[] - array containing the degrees of each coefficient (i.e., X poly)
+  //  C[] - list of coefficients, we use array d to select the
+  //      coefficients
+template < class NT >
+Curve<NT>::Curve(int deg, int *d, NT *C)
+	  : BiPoly<NT>(deg, d, C){
+  }
+
+template < class NT >
+Curve<NT>::Curve(const BiPoly<NT> &P)
+	  : BiPoly<NT>(P){
+  }
+
+  //Curve(n)
+template < class NT >
+Curve<NT>::Curve(int n)
+	  : BiPoly<NT>(n){// creates a Curve with nominal y-degree equal to n
+  }
+
+  //Creates a curve from a string (no parentheses, no *)
+template < class NT >
+Curve<NT>::Curve(const string & s, char myX, char myY)
+	  : BiPoly<NT>(s, myX, myY){
+  }
+template < class NT >
+Curve<NT>::Curve(const char * s, char myX, char myY)
+	  : BiPoly<NT>(s, myX, myY){
+  }
+
+
+  // verticalIntersections(x, vecI, aprec=0):
+  //
+  //    The list vecI is passed an isolating intervals for y's such that (x,y)
+  //    lies on the curve.
+  //    If aprec is non-zero (!), the intervals have with < 2^{-aprec}.
+  //    Return is -2 if curve equation does not depend on Y
+  //    	-1 if infinitely roots at x,
+  //    	0 if no roots at x
+  //    	1 otherwise
+  //
+  //    ASSERTION: x is an exact BigFloat
+
+template < class NT >
+int Curve<NT>::verticalIntersections(const BigFloat & x, BFVecInterval & vI,
+	int aprec) {
+    int d= Curve<NT>::getTrueYdegree();
+    if(d <= 0) return(-2);
+    	   // This returns a NULL vI, which should be caught by caller
+	
+    Polynomial<Expr> PY = this->yExprPolynomial(x); // should be replaced
+    // CGAL_assertion(x.isExact());
+    // Polynomial<BigFloat> PY = yBFPolynomial(x); // unstable still
+
+    d = PY.getTrueDegree();
+    if(d <= 0) return(d);
+
+    Sturm<Expr> Ss(PY); // should be replaced by BigFloat version
+    // Sturm<BigFloat> Ss(PY); // unstable still
+    Ss.isolateRoots(vI);
+
+    int s = vI.size();
+    if ((aprec != 0) && (s>0))
+	Ss.newtonRefineAllRoots(vI, aprec);
+    
+    return s;
+  }
+  
+  // plot(eps, x1, y1, x2, y2)
+  //
+  // 	All parameters have defaults
+  //
+  //    Gives the points on the curve at resolution "eps".  Currently,
+  //    eps is viewed as delta-x step size (but it could change).
+  //    The display is done in the rectangale 
+  //    defined by [(x1, y1), (x2, y2)].
+  //    The output is written into a file in the format specified
+  //    by our drawcurve function (see COREPATH/ext/graphics).
+  //
+  //    Heuristic: the open polygonal lines end when number of roots
+  //    changes...
+  //
+  //    TO DO:
+  //       (1) need to automatically readjust x- and y-scales
+  //              independently
+  //       (2) reorder parameters in this order: x1, x2, y1, y2
+  //            [Then y1, y2 can be automatically determined]
+  //       (3) should allow the ability to look for interesting
+  //             features
+  //
+  //    ASSERTION: all input BigFloats are exact
+  //
+template < class NT >
+int Curve<NT>::plot( BigFloat eps, BigFloat x1,
+	BigFloat y1, BigFloat x2, BigFloat y2, int fileNo){
+
+  const char* filename[] = {"data/input", "data/plot", "data/plot2"};
+
+  CGAL_assertion(eps.isExact()); // important for plotting...
+  CGAL_assertion(x1.isExact());
+  CGAL_assertion(y1.isExact());
+
+  ofstream outFile;
+  outFile.open(filename[fileNo]); // ought to check if open is successful!
+  outFile << "########################################\n";
+  outFile << "# Curve equation: \n";
+  this->dump(outFile,"", "# ");
+  outFile << std::endl;
+  outFile << "# Plot parameters:  step size (eps) = " << eps << std::endl;
+  outFile << "#                   x1 = " << x1 << ",\t y1 = " << y1 << std::endl;
+  outFile << "#                   x2 = " << x2 << ",\t y2 = " << y2 << std::endl;
+  outFile << "########################################\n";
+  outFile << "# X-axis " << std::endl;
+  outFile << "o 2" << std::endl;
+  outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
+  outFile << x1 << "\t" << 0 << std::endl;
+  outFile << x2 << "\t" << 0 << std::endl;
+  outFile << "########################################\n";
+  outFile << "# Y-axis " << std::endl;
+  outFile << "o 2" << std::endl;
+  outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
+  outFile << 0 << "\t" << y1 << std::endl;
+  outFile << 0 << "\t" << y2 << std::endl;
+  // CGAL_assertion(eps>0)
+  int aprec = -(eps.lMSB()).toLong(); // By definition, eps.lMSB() <= lg(eps)
+
+  BigFloat xCurr = x1;
+  BigFloat xLast = x1;
+  unsigned int numRoots=0;
+  unsigned int numPoints=0;
+  BFVecInterval vI;
+
+cout <<"Current value of x " << xCurr << endl;
+  //===================================================================
+  // FIRST locate the first x-value where there are roots for plotting
+  //===================================================================
+  do {
+    vI.clear();
+    if (verticalIntersections(xCurr, vI, aprec) > 0) {
+      numRoots = vI.size();
+cout <<"Number of roots at " << xCurr << " are " << numRoots<<endl;
+    }
+    xCurr += eps;
+
+  } while ((numRoots == 0) && (xCurr < x2));//numRoots <= ydeg
+
+  if (numRoots == 0 && x2 <= xCurr) {//if numRoots > 0 then there exists a
+                                     //valid point for plotting
+	  return -1; // nothing to plot!
+  }
+
+  int limit = ((x2 - xCurr + eps)/eps).intValue()+1;
+  //std::cout << "Limit = " << limit << std::endl;
+  machine_double plotCurves[this->getTrueYdegree()][limit];//plot buffer 
+  machine_double yval;
+
+  for (unsigned int i=0; i< numRoots; i++) {
+     yval = (vI[i].first + vI[i].second).doubleValue()/2;
+     if (yval < y1) plotCurves[i][numPoints] = y1.doubleValue();
+     else if (yval > y2) plotCurves[i][numPoints] = y2.doubleValue();
+     else plotCurves[i][numPoints] = yval;
+  }
+
+  vI.clear();
+  xLast = xCurr - eps;  // -eps to compensate for the forward value of xCurr
+  numPoints = 1;
+
+  //===================================================================
+  // Get all the curves in a main loop
+  // 	-- dump the curves when an x-interval is discovered
+  // 	We define an "x-interval" to be a maximal interval
+  // 	where the number of curves is constant (this is a heuristic!)
+  // 	Note that this includes the special case where number is 0.
+  //===================================================================
+
+  BigFloat tmp; // used to step from xLast to xCurr in loops
+
+  while (xCurr < x2) { //main loop
+    //std::cout << "Doing verticalintersec at " << xCurr << std::endl;
+    verticalIntersections(xCurr, vI, aprec);
+    if (vI.size() != numRoots) { // an x-interval discovered!
+	// write previous x-interval to output file
+        outFile << "########################################\n";
+        outFile << "# New x-interval with " << numRoots << " roots\n";
+	for (unsigned int i=0; i< numRoots; i++) {
+          outFile << "#=======================================\n";
+          outFile << "# Curve No. " << i+1 << std::endl;
+	  outFile << "o " << numPoints << std::endl;
+	  outFile << red_comp(i) << "\t"
+		  << green_comp(i)  << "\t"
+		  << blue_comp(i) << std::endl;
+	  tmp = xLast;
+	  for (unsigned int j=0; j< numPoints; j++) {
+
+		  outFile << tmp << "	\t\t"
+			  << plotCurves[i][j] << "\n";
+		  tmp += eps;
+	  }//for j
+	}//for i
+	numPoints = 0;          // reset
+	numRoots = vI.size();   // reset
+	xLast = xCurr;		// reset
+    }//if vI.size() !=
+    if (numRoots>0){ // record curr. vertical intersections if numRoots>0
+      for (unsigned int i=0; i< numRoots; i++) {
+         yval = (vI[i].first + vI[i].second).doubleValue()/2;
+	 // HERE SHOULD BE A LOOP TO OUTPUT MORE POINTS IN CASE THE slope IS LARGE
+	 // Idea: let previous value of yval be yval-old.  
+	 //
+	 // Two cases:
+	 // (1) When i=0:
+	 // 	you need to search backwards and forwards
+	 // 	(yval-old is not defined in this case)
+	 //
+	 // (2) When i>0:
+	 // 	If  |yval-old - yval| > 2eps, we must plot using horizontalIntersection()
+	 // 	We must start from
+	 // 		y = yval-old until
+	 // 			EITHER (y = (vI[i+1].first + vI[i+1].second)/2)
+	 // 			OR (sign of slope changes)
+	 // 			OR (hit the ymax or ymin boundary)
+	 //
+         if (yval < y1) plotCurves[i][numPoints] = y1.doubleValue();
+         else if (yval > y2) plotCurves[i][numPoints] = y2.doubleValue();
+         else plotCurves[i][numPoints] = yval;
+      }//for i
+      vI.clear();  //Should clear the intersection points
+      numPoints++;
+    }//if
+    xCurr += eps;
+if (!xCurr.isExact()) std::cout<<"xCurr has error! xCurr=" << xCurr << std::endl;
+   }//main while loop
+
+   // Need to flush out the final x-interval:
+   if ((numRoots>0) && (numPoints >0)) { 
+	// write to output file
+        outFile << "########################################\n";
+        outFile << "# New x-interval with " << numRoots << " roots\n";
+	for (unsigned int i=0; i< numRoots; i++) {
+          outFile << "#=======================================\n";
+          outFile << "# Curve No. " << i+1 << std::endl;
+	  outFile << "o " << numPoints << std::endl;
+	  outFile << red_comp(i) << "\t"
+		  << green_comp(i)  << "\t"
+		  << blue_comp(i) << std::endl;
+	  tmp = xLast;
+	  for (unsigned int j=0; j< numPoints; j++) {
+
+		  outFile << tmp << "	\t\t"
+			  << plotCurves[i][j] << "\n";
+		  tmp += eps;
+	  }//for j
+	}//for i
+    }//if
+
+    // Put out the final frame (this hides the artificial cut-off of curves
+    outFile << "########################################\n";
+    outFile << "# FRAME around our figure " << std::endl;
+    outFile << "p 4" << std::endl;
+    outFile << "0.99 \t 0.99 \t 0.99" << std::endl;
+    outFile << x1 << "\t" << y1 << std::endl;
+    outFile << x2 << "\t" << y1 << std::endl;
+    outFile << x2 << "\t" << y2 << std::endl;
+    outFile << x1 << "\t" << y2 << std::endl;
+    outFile << "######### End of File ##################\n";
+
+    outFile.close();
+    return 0;
+  }//plot
+
+// selfIntersections():
+//   this should be another member function that lists
+//   all the self-intersections of a curve
+//
+//  template <class NT>
+//  void selfIntersections(BFVecInterval &vI){
+//  ...
+//  }
+
+
+
+  ////////////////////////////////////////////////////////
+  // Curve helper functions
+  ////////////////////////////////////////////////////////
+
+
+//Xintersections(C, D, vI):
+//  returns the list vI of x-ccordinates of possible intersection points.
+//  Assumes that C & D are quasi-monic.(or generally aligned)
+template <class NT>
+void  Xintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI){
+  Sturm<NT> Ss(resY(P, Q));
+  Ss.isolateRoots(vI);
+}
+
+//Yintersections(C, D, vI):
+//	similar to Xintersections
+template <class NT>
+void  Yintersections( Curve<NT>& P ,Curve<NT>& Q, BFVecInterval &vI){
+  Sturm<NT> Ss(resX(P, Q));
+  Ss.isolateRoots(vI);
+}
+
+// Display Intervals
+// 
+template <class NT>//DO I NEED THIS OVERHERE AS WELL?
+void showIntervals(char* s, BFVecInterval &vI) {
+   std::cout << s;
+   for (unsigned int i=0; i< vI.size(); i++) {
+   	std::cout << "[ " << vI[i].first << ", " 
+   		<< vI[i].second << " ],  " ;
+   }
+   std::cout << std::endl;
+}
+
+
+/*************************************************************************** */
+// END
+/*************************************************************************** */
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.h
new file mode 100644
index 0000000..3e1d85e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.h
@@ -0,0 +1,437 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Poly.h
+ *  
+ * Description: simple polynomial class
+ * 
+ *	REPRESENTATION:
+ *	--Each polynomial has a nominal "degree" (this
+ *		is an upper bound on the true degree, which
+ *		is determined by the first non-zero coefficient).
+ *	--coefficients are parametrized by some number type "NT".
+ *	--coefficients are stored in the "coeff" array of
+ *		length "degree + 1".  
+ *		CONVENTION: coeff[i] is the coefficient of X^i.  So, a
+ *			    coefficient list begins with the constant term.
+ *	--IMPORTANT CONVENTION:
+ *		the zero polynomial has degree -1
+ *		while nonzero constant polynomials have degree 0.
+ * 
+ *	FUNCTIONALITY:
+ *	--Polynomial Ring Operations (+,-,*)
+ *	--Power
+ *	--Evaluation
+ *	--Differentiation
+ *	--Remainder, Quotient 
+ *      --GCD
+ *	--Resultant, Discriminant (planned)
+ *	--Polynomial Composition (planned)
+ *	--file I/O (planned)
+ *	
+ * Author: Chee Yap 
+ * Date:   May 28, 2002
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CORE_POLY_H
+#define CORE_POLY_H
+
+#include <CGAL/CORE/BigFloat.h>
+#include <CGAL/CORE/Promote.h>
+#include <vector>
+#include <CGAL/assertions.h>
+
+namespace CORE { 
+using namespace std;
+class Expr;
+// ==================================================
+// Typedefs
+// ==================================================
+
+//typedef std::vector<Expr>	VecExpr;
+//typedef std::pair<Expr, Expr>	Interval;
+//typedef std::vector<Interval>	VecInterval;
+typedef std::pair<BigFloat, BigFloat>	BFInterval;
+// NOTE: an error condition is indicated by
+// the special interval (1, 0)
+typedef std::vector<BFInterval>	BFVecInterval;
+
+
+// ==================================================
+// Polynomial Class
+// ==================================================
+
+template <class NT>
+class Polynomial {
+ private:
+  //The following are used in the constructor from strings.
+  //For more details see the related constructor.
+
+public:
+  typedef std::vector<NT> VecNT;
+  typedef NT coeffType;
+
+  int degree;	// This is the nominal degree (an upper bound
+  // on the true degree)
+  NT * coeff;	// coeff is an array of size degree+1;
+  //	This remark holds even when degree = -1.
+  // Notes:
+  // (1) coeff[i] is the coefficient of x^i
+  // (2) The Zero Polynomial has degree -1
+  // (3) Nonzero Constant Polynomials has degree 0
+
+  // STATIC MEMBERS
+  // static NT ccc_; // THIS IS A TEMPORARY HACK
+  static  int COEFF_PER_LINE;		// pretty print parameters
+  static const char * INDENT_SPACE;		// pretty print parameters
+
+  static const Polynomial<NT> & polyZero();
+  static const Polynomial<NT> & polyUnity();
+  static Polynomial polyWilkinson;	      // a sample polynomial
+  static int NT_TYPE; // NT_TYPE = 1 if NT is integer type (int,long,BigInt)
+                      // NT_TYPE = 2 if NT is BigFloat 
+                      // NT_TYPE = 3 if NT is BigRat 
+                      // NT_TYPE = 4 if NT is Expr 
+                      // Hack?  NT_TYPE is needed for root bounds, etc.
+
+  // Constructors:
+  Polynomial(void);	// the Zero Polynomial
+  Polynomial(int n);	// construct the Unit Polynomial of nominal deg n>=0
+  Polynomial(int n, const NT * coef);
+  Polynomial(const Polynomial &);
+  Polynomial(const VecNT &);
+  Polynomial(int n, const char* s[]);
+  Polynomial(const string & s, char myX='x');
+  Polynomial(const char* s, char myX='x');
+  ~Polynomial();
+
+  private:
+  void constructX(int n, Polynomial<NT>& P);
+  void constructFromString(string & s, char myX='x');
+  int getnumber(const char* c, int i, unsigned int len, Polynomial<NT> & P);
+  bool isint(char c);
+  int getint(const char* c, int i, unsigned int len, int & n);
+  int matchparen(const char* cstr, int start);
+  int getbasicterm(string & s, Polynomial<NT> & P);
+  int getterm(string & s, Polynomial<NT> & P);
+
+
+  public:
+  //Returns a Polynomial corresponding to s, which is supposed to
+  //contain as place-holders the chars 'x' and 'y'.
+  Polynomial<NT> getpoly(string & s);
+
+  // Assignment:
+  Polynomial & operator=(const Polynomial&);
+
+  // Expand and Contract
+  //  -- they are semi-inverses: i.e., Contract(expand(p))=p
+  int expand(int n);	// Change the current degree to n
+  // Helper function for polynomial arithmetic
+  int contract();	// get rid of leading zeros
+
+  // Polynomial arithmetic (these are all self-modifying):
+  Polynomial & operator+=(const Polynomial&);	// +=
+  Polynomial & operator-=(const Polynomial&);	// -=
+  Polynomial & operator*=(const Polynomial&);	// *=
+  Polynomial & operator-();			// unary minus
+  Polynomial & power (unsigned int n) ;		// power (*this is changed!)
+
+  Polynomial & mulScalar (const NT & c);	// return (*this) * (c)
+  Polynomial & mulXpower(int i); // If i >= 0, then this is equivalent
+                                 // to multiplying by X^i.
+                                 // If i < 0 to dividing by X^i
+  Polynomial pseudoRemainder (const Polynomial& B, NT& C); // C = return value
+  Polynomial pseudoRemainder (const Polynomial& B);        // no C version
+  // The pseudo quotient of (*this) mod B
+  //	is returned, but (*this) is transformed
+  //	into the pseudo remainder.  If the argument C is provided,
+  //	Then C*(*this) = B*pseudo-quotient + pseudo-remainder.
+  Polynomial & negPseudoRemainder (const Polynomial& B);  // negative remainder
+  Polynomial reduceStep (const Polynomial& B ); //helper for pseudoRemainder
+  // One step of pseudo remainder
+  // What is returned is a special polynomial C + X*M  (not "C+M")
+  //    telling us the initial constant C and
+  //    the quotient M of C*(THIS) divided by p.
+  Polynomial testReduceStep(const Polynomial& A, const Polynomial& B); //helper
+
+  // Get functions
+  int getDegree() const;        // nominal degree
+  int getTrueDegree() const;    // true degree
+  NT getCoeffi(int i) const;
+  const NT & getLeadCoeff() const;      // get TRUE leading coefficient
+  const NT & getTailCoeff() const;      // get last non-zero coefficient
+  NT** getCoeffs() ;		// get all coefficients
+  const NT& getCoeff(int i) const;      // Get single coefficient of X^i
+                                        // NULL pointer if invalid i
+  // Set functions
+  bool setCoeff(int i, const NT & cc);  // Make cc the coefficient of X^i
+                                        // Return FALSE if invalid i
+                                        // !! User's responsibility to
+                                        // delete the old coefficient if
+                                        // necessary !!
+  // Helper Functions:
+  /// Reverse reverses the coefficients
+  void reverse();		
+  /// Negation of a polynomial (multiplication by -1)
+  /// Useful for Sturm
+  Polynomial & negate();	
+  /// Suppressing Zero Roots
+  /// It amounts to dividing (*this) by X^k, so that the
+  /// the tail coeff is non-zero. Returns the value of k.
+  int makeTailCoeffNonzero();
+
+  // Evaluation Functions:
+  /// Polynomial evaluation where the coefficients are approximated first
+  /// Returns a BigFloat with error that contains the value
+  BigFloat evalApprox(const BigFloat& f, 
+    const extLong& r=get_static_defRelPrec(), 
+    const extLong& a=get_static_defAbsPrec()) const;
+  /// Polynomial evaluation at a BigFloat value.
+  /// The returned BigFloat (with error) has the exact sign.  
+  /// In particular, if the value is 0, we return 0.
+  /// @param oldMSB is any estimate of the negative log of the evaluation
+  BigFloat evalExactSign(const BigFloat& val, const extLong& oldMSB=54) const;
+  /// Polynomial evaluation that return the same type as its argument
+  /// Caution: The type T must be greater or equal to the type NT
+  /// 	NOTE: Eventually, we will remove this restriction by
+  /// 	introduce MaxType(NT,T) for the return type.
+  template <class T>
+  MAX_TYPE(NT, T) eval(const T&) const;	
+
+  // Bounds
+  BigFloat CauchyUpperBound() const;  // Cauchy Root Upper Bound
+  BigFloat CauchyLowerBound() const;  // Cauchy Root Lower Bound
+  BigInt CauchyBound() const;  // Cauchy Root Bound from Erich Kaltofen
+  BigInt UpperBound() const;  // Another Cauchy Root Bound; an improvement over
+                               //Erich Kaltofen
+  BigFloat sepBound() const;	// separation bound (multiple roots allowed)
+  BigFloat height() const;	// height return type BigFloat
+  BigFloat length() const;	// length return type BigFloat
+
+  // Differentiation
+  Polynomial & differentiate() ;		// self-differentiation
+  Polynomial & differentiate(int n) ;		// multi self-differentiation
+
+  // Reductions of polynomials (NT must have gcd function)
+  Polynomial sqFreePart(); // Square free part of P is P/gcd(P,P'). Return gcd
+  Polynomial & primPart();   // Primitive Part of *this (which is changed)
+
+  //////////////////////////////////////////////////////////////////
+  // Resultant and discriminant
+  // NT & resultant() ;				// resultant
+  // NT & discriminant() ;			// discriminant
+
+  // Composition of Polynomials:
+  // NOT yet implemented
+
+  //////////////////////////////////////////////////////////////////
+  // Polynomial Dump
+  void dump(std::ofstream & ofs, std::string msg="",
+         std::string com="# ", std::string com2="# ") const;  // dump to file
+  void dump(std::string msg="", std::string com="# ",
+	 std::string com2="# ") const; // dump to cout
+  void filedump(std::ostream & os, std::string msg="", std::string com="# ",
+	 std::string com2="# ") const; // dump workhorse (called by dump())
+  void mapleDump() const;              // dump of maple code for Polynomial
+
+}; //Polynomial Class
+
+// template < class NT >
+//     NT Polynomial<NT>::ccc_;
+
+// ==================================================
+// Static Constants
+//	Does this belong here?
+// ==================================================
+
+template < class NT >
+CORE_INLINE
+const Polynomial<NT> & Polynomial<NT>::polyZero() {
+  static Polynomial<NT> zeroP;
+  return zeroP;
+}
+
+template < class NT >
+CORE_INLINE
+const Polynomial<NT> & Polynomial<NT>::polyUnity() {
+  static NT c[] = {1};
+  static Polynomial<NT> unityP(0, c);
+  return unityP;
+}
+
+// ==================================================
+// Useful functions for Polynomial class
+// ==================================================
+
+// polynomial arithmetic:
+template < class NT >
+Polynomial<NT> operator+(const Polynomial<NT>&, const Polynomial<NT>&);// +
+template < class NT >
+Polynomial<NT> operator-(const Polynomial<NT>&, const Polynomial<NT>&);// -
+template < class NT >
+Polynomial<NT> operator*(const Polynomial<NT>&, const Polynomial<NT>&);// *
+template < class NT >
+Polynomial<NT> power(const Polynomial<NT>&, int n);		// power
+template < class NT >
+Polynomial<NT> differentiate(const Polynomial<NT>&);		// differentiate
+template < class NT >
+Polynomial<NT> differentiate(const Polynomial<NT>&, int n);	// multi-differ.
+//Content of a Polynomial
+template < class NT >
+NT content(const Polynomial<NT>& p);
+
+template <class NT>
+bool isDivisible(Polynomial<NT> p, Polynomial<NT> q);
+
+// GCD of two polynomials
+template < class NT >
+Polynomial<NT> gcd(const Polynomial<NT>& p, const Polynomial<NT>& q);
+
+//Resultant of two polynomials
+template < class NT >
+NT res( Polynomial<NT> p,  Polynomial<NT> q);
+
+//Principal Subresultant Coefficient (psc) of two polynomials
+template < class NT >
+NT psc(int i, Polynomial<NT> p,  Polynomial<NT> q);
+
+//Returns the polynomial which contains only the real roots
+//of P which have multiplicity d
+template < class NT >
+Polynomial<NT> factorI(Polynomial<NT> p, int d);
+
+// comparisons
+template < class NT >
+bool operator==(const Polynomial<NT>&, const Polynomial<NT>&); // ==
+template < class NT >
+bool operator!=(const Polynomial<NT>&, const Polynomial<NT>&); // !=
+template < class NT >
+bool zeroP(const Polynomial <NT>&);			// =Zero Poly?
+template < class NT >
+bool unitP(const Polynomial <NT>&);			// =Unit Poly?
+
+// stream i/o
+template < class NT >
+std::ostream& operator<<(std::ostream&, const Polynomial<NT>&);
+template < class NT >
+std::istream& operator>>(std::istream&, Polynomial<NT>&);
+
+// ==================================================
+// Inline Functions
+// ==================================================
+
+// friend polynomial arithmetic:
+template < class NT >
+CORE_INLINE
+Polynomial<NT> operator+(const Polynomial<NT>& p1,
+                         const Polynomial<NT>& p2) {	// +
+  return Polynomial<NT>(p1) += p2;
+}
+template < class NT >
+CORE_INLINE
+Polynomial<NT> operator-(const Polynomial<NT>& p1,
+                         const Polynomial<NT>& p2) {	// -
+  return Polynomial<NT>(p1) -= p2;
+}
+template < class NT >
+CORE_INLINE
+Polynomial<NT> operator*(const Polynomial<NT>& p1,
+                         const Polynomial<NT>& p2) {	// *
+  return Polynomial<NT> (p1) *= p2;
+}
+template < class NT >
+CORE_INLINE
+Polynomial<NT> power(const Polynomial<NT>& p, int n) {				// power
+  return Polynomial<NT>(p).power(n);
+}
+
+// equal to zero poly?
+template < class NT >
+CORE_INLINE
+bool zeroP(const Polynomial <NT>& p) {			// =Zero Poly?
+  return (p.getTrueDegree()== -1);
+}
+template < class NT >
+CORE_INLINE
+bool unitP(const Polynomial <NT>& p) {			// =Unit Poly?
+  int d = p.getTrueDegree();
+  return ((d == 0) && p.coeff[0]==1 );
+}
+
+// get functions
+template < class NT >
+CORE_INLINE
+int Polynomial<NT>::getDegree() const {
+  return degree;
+}
+// get TRUE leading coefficient
+template < class NT >
+CORE_INLINE
+const NT & Polynomial<NT>::getLeadCoeff() const {
+  return getCoeff(getTrueDegree());
+}
+
+// get last non-zero coefficient
+template < class NT >
+CORE_INLINE
+const NT & Polynomial<NT>::getTailCoeff() const {
+  for (int i = 0; i<= getTrueDegree(); i++)
+    if (coeff[i] != 0)
+      return coeff[i];
+  // This ought to be an error (user should check this) :
+  NT * zero = new NT(0);
+  return *zero;
+}
+
+template < class NT >
+CORE_INLINE
+NT** Polynomial<NT>::getCoeffs() {
+  return &coeff;
+}
+template < class NT >
+CORE_INLINE
+const NT& Polynomial<NT>::getCoeff(int i) const {
+  //if (i > degree) return NULL;
+  CGAL_assertion(i <= degree);
+  return coeff[i];
+}
+// set functions
+template < class NT >
+CORE_INLINE
+bool Polynomial<NT>::setCoeff(int i, const NT & cc) {
+  if ((i<0) || (i > degree))
+    return false;
+  coeff[i] = cc;
+  return true;
+}
+
+// IMPLEMENTATIONS ARE FOUND IN
+//#include <CGAL/CORE/poly/Poly.tcc>
+//
+// We include this file from CORE/Expr.h, AFTER the definition
+// of class Expr, because otherwise VC++.net2003 can'y compile Expr.cpp
+
+} //namespace CORE
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.tcc b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.tcc
new file mode 100644
index 0000000..8112417
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Poly.tcc
@@ -0,0 +1,1560 @@
+/*
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Poly.tcc
+ * Purpose: 
+ *	Template implementations of the functions
+ *	of the Polynomial<NT> class (found in Poly.h)
+ * 
+ * OVERVIEW:  
+ *	Each polynomial has a nominal "degree" (this
+ *		is an upper bound on the true degree, which
+ *		is determined by the first non-zero coefficient).
+ *	Coefficients are parametrized by some number type "NT".
+ *	Coefficients are stored in the "coeff" array of
+ *		length "degree + 1".  
+ *	IMPORTANT CONVENTION: the zero polynomial has degree -1
+ *		while nonzero constant polynomials have degree 0.
+ *	
+ * Bugs:
+ *	Currently, coefficient number type NT only accept
+ *			NT=BigInt and NT=int
+ * 
+ *	To see where NT=Expr will give trouble,
+ *			look for NOTE_EXPR below.
+ * 
+ * Author: Chee Yap, Sylvain Pion and Vikram Sharma
+ * Date:   May 28, 2002
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+
+template <class NT>
+int Polynomial<NT>::COEFF_PER_LINE  = 4;           // pretty print parameters
+template <class NT>
+const char* Polynomial<NT>::INDENT_SPACE ="   ";  // pretty print parameters
+
+// ==================================================
+// Polynomial Constructors
+// ==================================================
+
+template <class NT>
+Polynomial<NT>::Polynomial(void) {
+  degree = -1; 	// this is the zero polynomial!
+  coeff = NULL;
+}
+
+//Creates a polynomial with nominal degree n
+template <class NT>
+Polynomial<NT>::Polynomial(int n) {
+  CGAL_assertion(n>= -1);
+  degree = n;
+  if (n == -1)
+    return;	// return the zero polynomial!
+  if (n>=0)
+    coeff = new NT[n+1];
+  coeff[0]=1;			// otherwise, return the unity polynomial
+  for (int i=1; i<=n; i++)
+    coeff[i]=0;
+}
+
+template <class NT>
+Polynomial<NT>::Polynomial(int n, const NT * c) {
+  //CGAL_assertion("array c has n+1 elements");
+  degree = n;
+  if (n >= 0) {
+    coeff = new NT[n+1];
+    for (int i = 0; i <= n; i++)
+      coeff[i] = c[i];
+  }
+}
+
+//
+// Constructor from a vector of NT's
+///////////////////////////////////////
+template <class NT>
+Polynomial<NT>::Polynomial(const VecNT & vN) {
+  degree = vN.size()-1;
+  if (degree >= 0) {
+    coeff = new NT[degree+1];
+    for (int i = 0; i <= degree; i++)
+      coeff[i] = vN[i];
+  }
+}
+
+template <class NT>
+Polynomial<NT>::Polynomial(const Polynomial<NT> & p):degree(-1) { 
+  //degree must be initialized to -1 otherwise delete is called on coeff in operator=
+  coeff = NULL;//WHY?
+  *this = p;	// reduce to assignment operator=
+}
+
+// Constructor from a Character string of coefficients
+///////////////////////////////////////
+template <class NT>
+Polynomial<NT>::Polynomial(int n, const char * s[]) {
+  //CGAL_assertion("array s has n+1 elements");
+  degree = n;
+  if (n >= 0) {
+    coeff = new NT[n+1];
+    for (int i = 0; i <= n; i++)
+      coeff[i] = s[i];
+  }
+}
+
+//The BNF syntax is the following:-
+//    [poly] -> [term]| [term] '+/-' [poly] |
+//    		'-' [term] | '-' [term] '+/-' [poly]
+//    [term] -> [basic term] | [basic term] [term] | [basic term]*[term]
+//    [basic term] -> [number] | 'x' | [basic term] '^' [number]
+//                    | '(' [poly] ')' 
+//COMMENT: 
+//  [number] is assumed to be a BigInt; in the future, we probably
+//  want to generalize this to BigFloat, etc.
+//
+template <class NT>
+Polynomial<NT>::Polynomial(const string & s, char myX) {
+   string ss(s);
+   constructFromString(ss, myX);
+}
+template <class NT>
+Polynomial<NT>::Polynomial(const char * s, char myX) {
+   string ss(s);
+   constructFromString(ss, myX);
+}
+template <class NT>
+void Polynomial<NT>::constructFromString(string & s, char myX) {
+  if(myX != 'x' || myX != 'X'){
+    //Replace myX with 'x'.
+    string::size_type loc = s.find(myX, 0);
+    while(loc != string::npos){
+      s.replace(loc,1,1,'x');
+      loc = s.find(myX, loc+1);
+    }
+  }
+
+  coeff = NULL;//Did this to ape the constructor from polynomial above
+  *this = getpoly(s);
+}
+
+template <class NT>
+Polynomial<NT>::~Polynomial() {
+  if(degree >= 0)
+    delete[] coeff;
+}
+
+  ////////////////////////////////////////////////////////
+  // METHODS USED BY STRING CONSTRUCTOR ABOVE
+  ////////////////////////////////////////////////////////
+
+
+//Sets the input Polynomial to X^n
+template <class NT>
+void Polynomial<NT>::constructX(int n, Polynomial<NT>& P){
+  Polynomial<NT> q(n);//Nominal degree n
+  q.setCoeff(n,NT(1));
+  if (n>0) q.setCoeff(0,NT(0));
+  P = q;
+}
+
+//Returns in P the coeffecient starting from start
+template <class NT>
+int Polynomial<NT>::getnumber(const char* c, int start, unsigned int len,
+			  Polynomial<NT> & P){
+  int j=0;
+  char *temp = new char[len];
+  while(isint(c[j+start])){
+    temp[j]=c[j+start];j++;
+  }
+  temp[j] = '\0';
+  NT cf = NT(temp);
+  Polynomial<NT> q(0);
+  q.setCoeff(0, cf);
+  P = q;
+  delete[] temp;
+  return (j-1+start);//Exactly the length of the number
+}
+
+template <class NT>
+bool Polynomial<NT>::isint(char c){
+  if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
+     c == '5' || c == '6' || c == '7' || c == '8' || c == '9')
+    return true;
+  else
+    return false;
+}
+
+
+//Returns as integer the number starting from start in c
+template <class NT>
+int Polynomial<NT>::getint(const char* c, int start, unsigned int len,
+			  int & n){
+  int j=0;
+  char *temp = new char[len];
+  while(isint(c[j+start])){
+    temp[j]=c[j+start];j++;
+  }
+  temp[j] = '\n';
+  n = atoi(temp);
+  delete[] temp;
+  return (j-1+start);//Exactly the length of the number
+}
+
+//Given a string starting with an open parentheses returns the place
+// which marks the end of the corresponding closing parentheses.
+//Strings of the form (A).
+template <class NT>
+int Polynomial<NT>::matchparen(const char* cstr, int start){
+  int count = 0;
+  int j=start;
+  
+  do{
+    if(cstr[j] == '('){
+      count++;
+    }
+    if(cstr[j] == ')'){
+      count--;
+    }
+    j++;      
+  }while(count != 0 );//j is one more than the matching ')'
+  
+  return j-1;
+}
+
+
+template <class NT>
+int Polynomial<NT>::getbasicterm(string & s, Polynomial<NT> & P){
+  const char * cstr = s.c_str();
+  unsigned int len = s.length();
+  int i=0;
+  //Polynomial<NT> * temp = new Polynomial<NT>();
+
+  if(isint(cstr[i])){
+    i = getnumber(cstr, i, len, P);
+  }else if(cstr[i] == 'x'||cstr[i] == 'X'){
+    constructX(1, P);
+  }else if(cstr[i] =='('){
+    int oldi = i;
+    i = matchparen(cstr, i);
+    string t = s.substr(oldi+1, i -oldi -1);
+    P = getpoly(t);
+  }else{
+    std::cout <<"ERROR IN PARSING BASIC TERM" << std::endl;
+  }
+  //i+1 points to the beginning of next syntactic object in the string.
+ if(cstr[i+1] == '^'){
+    int n;
+    i = getint(cstr, i+2, len, n);
+    P.power(n);
+  }
+  return i;
+}
+
+
+template <class NT>
+int Polynomial<NT>::getterm(string & s, Polynomial<NT> & P){
+  unsigned int len = s.length();
+  if(len == 0){// Zero Polynomial
+    P=Polynomial<NT>();
+    return 0;
+  }
+  unsigned int ind, oind;
+  const char* cstr =s.c_str();
+  string t;
+  //P will be used to accumulate the product of basic terms.
+  ind = getbasicterm(s, P);
+  while(ind != len-1 && cstr[ind + 1]!='+' && cstr[ind + 1]!='-' ){
+    //Recursively get the basic terms till we reach the end or see
+    // a '+' or '-' sign.
+    if(cstr[ind + 1] == '*'){
+      t = s.substr(ind + 2, len - ind -2);
+      oind = ind + 2;
+    }else{
+      t = s.substr(ind + 1, len -ind -1);
+      oind = ind + 1;
+    }
+
+    Polynomial<NT> R;
+    ind = oind + getbasicterm(t, R);//Because the second term is the offset in
+                                     //t
+    P *= R;
+  }
+
+  return ind;
+}
+
+template <class NT>
+Polynomial<NT> Polynomial<NT>::getpoly(string & s){
+
+    //Remove white spaces from the string
+    string::size_type cnt=s.find(' ',0);
+    while(cnt != string::npos){
+      s.erase(cnt, 1);
+      cnt = s.find(' ', cnt);
+    }
+
+    unsigned int len = s.length();
+    if(len <= 0){//Zero Polynomial
+      return Polynomial<NT>();
+    }
+
+    //To handle the case when there is one '=' sign
+    //Suppose s is of the form s1 = s2. Then we assign s to
+    //s1 + (-1)(s2) and reset len
+    string::size_type loc;
+    if((loc=s.find('=',0)) != string::npos){
+      s.replace(loc,1,1,'+');
+      string s3 = "(-1)(";
+      s.insert(loc+1, s3);
+      len = s.length();
+      s.insert(len, 1, ')');
+    }
+    len = s.length();
+
+    const char *cstr = s.c_str();
+    string t;
+    Polynomial<NT> P;
+    // P will be the polynomial in which we accumulate the
+    //sum and difference of the different terms.
+    unsigned int ind;
+    if(cstr[0] == '-'){
+      t = s.substr(1, len);
+      ind = getterm(t,P) + 1;
+      P.negate();
+    }else{
+      ind = getterm(s, P);
+    }
+    unsigned int oind =0;//the string between oind and ind is a term
+    while(ind != len -1){
+      Polynomial<NT> R;
+      t = s.substr(ind + 2, len -ind -2);
+      oind = ind;
+      ind = oind + 2 + getterm(t, R);
+      if(cstr[oind + 1] == '+')
+		P += R;
+      else if(cstr[oind + 1] == '-')
+		P -= R;
+      else
+	std::cout << "ERROR IN PARSING POLY! " << std::endl;
+    }
+
+    return (P);
+}
+
+  ////////////////////////////////////////////////////////
+  // METHODS
+  ////////////////////////////////////////////////////////
+
+// assignment:
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::operator=(const Polynomial<NT>& p) {
+  if (this == &p)
+    return *this;	// self-assignment
+  if (degree >=0)  delete[] coeff;
+  degree = p.getDegree();
+  if (degree < 0) return *this;
+  coeff = new NT[degree +1];
+  for (int i = 0; i <= degree; i++)
+    coeff[i] = p.coeff[i];
+  return *this;
+}
+
+// getTrueDegree
+template <class NT>
+int Polynomial<NT>::getTrueDegree() const {
+  for (int i=degree; i>=0; i--) {
+    if (sign(coeff[i]) != 0)
+      return i;
+  }
+  return -1;	// Zero polynomial
+}
+
+//get i'th Coeff. We check whether i is not greater than the
+// true degree and if not then return coeff[i] o/w 0
+template <class NT>
+NT Polynomial<NT>::getCoeffi(int i) const {
+  int deg = getTrueDegree();
+  if(i > deg)
+      return NT(0);
+  return coeff[i];
+}
+
+// ==================================================
+// polynomial arithmetic
+// ==================================================
+
+// Expands the nominal degree to n;
+//	Returns n if nominal degree is changed to n
+//	Else returns -2
+template <class NT>
+int Polynomial<NT>::expand(int n) {
+  if ((n <= degree)||(n < 0))
+    return -2;
+  int i;
+  NT * c = coeff;
+  coeff = new NT[n+1];
+  for (i = 0; i<= degree; i++)
+    coeff[i] = c[i];
+  for (i = degree+1; i<=n; i++)
+    coeff[i] = 0;
+  delete[] c;
+  degree = n;
+  return n;
+}
+
+// contract() gets rid of leading zero coefficients
+//	and returns the new (true) degree;
+//	It returns -2 if this is a no-op
+template <class NT>
+int Polynomial<NT>::contract() {
+  int d = getTrueDegree();
+  if (d == degree)
+    return (-2);  // nothing to do
+  else
+    degree = d;
+  NT * c = coeff;
+  if (degree !=-1){
+    coeff = new NT[d+1];
+    for (int i = 0; i<= d; i++)
+      coeff[i] = c[i];
+  }
+  delete[] c;
+  return d;
+}
+
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::operator+=(const Polynomial<NT>& p) { // +=
+  int d = p.getDegree();
+  if (d > degree)
+    expand(d);
+  for (int i = 0; i<=d; i++)
+    coeff[i] += p.coeff[i];
+
+  return *this;
+}
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::operator-=(const Polynomial<NT>& p) { // -=
+  int d = p.getDegree();
+  if (d > degree)
+    expand(d);
+  for (int i = 0; i<=d; i++)
+    coeff[i] -= p.coeff[i];
+  return *this;
+}
+
+// SELF-MULTIPLICATION
+// This is quadratic time multiplication!
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::operator*=(const Polynomial<NT>& p) { // *=
+  if (degree==-1) return *this;
+  if (p.getDegree()==-1){
+    degree=-1;
+    delete[] coeff;
+    return *this;
+  }
+  int d = degree + p.getDegree();
+  NT * c = new NT[d+1];
+  for (int i = 0; i<=d; i++)
+    c[i] = 0;
+
+  for (int i = 0; i<=p.getDegree(); i++)
+    for (int j = 0; j<=degree; j++) {
+      c[i+j] += p.coeff[i] * coeff[j];
+    }
+  degree = d;
+  delete[] coeff;
+  coeff = c;
+  return *this;
+}
+
+// Multiply by a scalar
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::mulScalar( const NT & c) {
+  for (int i = 0; i<=degree ; i++)
+    coeff[i] *= c;
+  return *this;
+}
+
+// mulXpower: Multiply by X^i (COULD be a divide if i<0)
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::mulXpower(int s) {
+  // if s >= 0, then this is equivalent to
+  // multiplying by X^s;  if s < 0, to dividing by X^s
+  if (s==0)
+    return *this;
+  int d = s+getTrueDegree();
+  if (d < 0) {
+    degree = -1;
+    delete[] coeff;
+    coeff = NULL;
+    return *this;
+  }
+  NT * c = new NT[d+1];
+  if (s>0)
+    for (int j=0;  j <= d; j++) {
+      if (j <= degree)
+        c[d-j] = coeff[d-s-j];
+      else
+        c[d-j] = 0;
+    }
+  if (s<0) {
+    for (int j=0; j <= d; j++)
+      c[d-j] = coeff[d-s-j];  // since s<0, (d-s-j) > (d-j) !!
+  }
+  delete[] coeff;
+  coeff = c;
+  degree = d;
+  return *this;
+}//mulXpower
+
+// REDUCE STEP (helper for PSEUDO-REMAINDER function)
+// Let THIS=(*this) be the current polynomial, and P be the input
+//	argument for reduceStep.  Let R be returned polynomial.
+//	R has the special form as a binomial,
+//		R = C + X*M
+//	where C is a constant and M a monomial (= coeff * some power of X).
+//	Moreover, THIS is transformed to a new polynomial, THAT, which
+//	is given by
+// 		(C * THIS) = M * P  + THAT
+//	MOREOVER: deg(THAT) < deg(THIS) unless deg(P)>deg(Q).
+//	Basically, C is a power of the leading coefficient of P.
+//	REMARK: R is NOT defined as C+M, because in case M is
+//	a constant, then we cannot separate C from M.
+//	Furthermore, R.mulScalar(-1) gives us M.
+template <class NT>
+Polynomial<NT> Polynomial<NT>::reduceStep (
+  const Polynomial<NT>& p) {
+  // 	Chee: Omit the next 2 contractions as unnecessary
+  // 	since reduceStep() is only called by pseudoRemainder().
+  // 	Also, reduceStep() already does a contraction before returning.
+  // p.contract();	
+  // contract();	// first contract both polynomials
+  Polynomial<NT> q(p);		// q is initially a copy of p
+  //	but is eventually M*P
+  int pDeg  = q.degree;
+  int myDeg = degree;
+  if (pDeg == -1)
+    return *(new Polynomial());  // Zero Polynomial
+  // NOTE: pDeg=-1 (i.e., p=0) is really an error condition!
+  if (myDeg < pDeg)
+    return *(new Polynomial(0));  // Unity Polynomial
+  // i.e., C=1, M=0.
+  // Now (myDeg >= pDeg).  Start to form the Return Polynomial R=C+X*M
+  Polynomial<NT> R(myDeg - pDeg + 1);  // deg(M)= myDeg - pDeg
+  q.mulXpower(myDeg - pDeg);  	 // q is going to become M*P
+
+  NT myLC = coeff[myDeg];	  // LC means "leading coefficient"
+  NT qLC = q.coeff[myDeg];  // p also has degree "myDeg" (qLC non-zero)
+  NT LC;
+
+  //  NT must support
+  //  isDivisible(x,y), gcd(x,y), div_exact(x,y) in the following:
+  //  ============================================================
+  if (isDivisible(myLC, qLC)) { // myLC is divisible by qLC
+    LC = div_exact(myLC, qLC);	 
+    R.setCoeff(0, 1);  		 //  C = 1,
+
+    R.setCoeff(R.degree, LC); //  M = LC * X^(myDeg-pDeg)
+    q.mulScalar(LC); 	  //  q = M*P. 
+  }
+  else if (isDivisible(qLC, myLC)) { // qLC is divisible by myLC
+    LC = div_exact(qLC, myLC);	 //
+    if ((LC != 1) && (LC != -1)) { // IMPORTANT: unlike the previous
+      // case, we need an additional condition
+      // that LC != -1.  THis is because
+      // if (LC = -1), then we have qLC and
+      // myLC are mutually divisible, and
+      // we would be updating R twice!
+      R.setCoeff(0, LC); 	   // C = LC, 
+      R.setCoeff(R.degree, 1);     // M = X^(myDeg-pDeg)(THIS WAS NOT DONE)
+      mulScalar(LC); 	   	   // THIS => THIS * LC
+
+    }
+  } else {  			// myLC and qLC are not mutually divisible
+    NT g = gcd(qLC, myLC); 	// This ASSUMES gcd is defined in NT !!
+    //NT g = 1;  			// In case no gcd is available
+    if (g == 1) {
+      R.setCoeff(0, qLC);	  	// C = qLC
+      R.setCoeff(R.degree, myLC);	 // M = (myLC) * X^{myDeg-pDeg}
+      mulScalar(qLC);	 		// forming  C * THIS
+      q.mulScalar(myLC);		// forming  M * P
+    } else {
+      NT qLC1= div_exact(qLC,g);
+      NT myLC1= div_exact(myLC,g);
+      R.setCoeff(0, qLC1);	  	// C = qLC/g
+      R.setCoeff(R.degree, myLC1);	// M = (myLC/g) * X^{myDeg-pDeg}
+      mulScalar(qLC1);	 	// forming  C * THIS
+      q.mulScalar(myLC1);		// forming  M * P
+    }
+  }
+  (*this) -= q;		// THAT = (C * THIS) - (M * P)
+
+  contract();
+
+  return R;		// Returns R = C + X*M
+}// reduceStep
+
+// For internal use only:
+// Checks that c*A = B*m + AA 
+// 	where A=(*oldthis) and AA=(*newthis)
+template <class NT>
+Polynomial<NT> Polynomial<NT>::testReduceStep(const Polynomial<NT>& A, 
+	const Polynomial<NT>& B) {
+std::cout << "+++++++++++++++++++++TEST REDUCE STEP+++++++++++++++++++++\n";
+  Polynomial<NT> cA(A);
+  Polynomial<NT> AA(A);
+  Polynomial<NT> quo;
+  quo = AA.reduceStep(B);	        // quo = c + X*m  (m is monomial, c const)
+                                // where c*A = B*m + (*newthis)
+std::cout << "A = " << A << std::endl;
+std::cout << "B = " << B << std::endl;
+  cA.mulScalar(quo.coeff[0]);    // A -> c*A
+  Polynomial<NT> m(quo);
+  m.mulXpower(-1);            // m's value is now m
+std::cout << "c = " << quo.coeff[0] << std::endl;
+std::cout << "c + xm = " << quo << std::endl;
+std::cout << "c*A = " << cA << std::endl;
+std::cout << "AA = " << AA << std::endl;
+std::cout << "B*m = " << B*m << std::endl;
+std::cout << "B*m + AA = " << B*m + AA << std::endl;
+  if (cA == (B*m + AA))
+	  std::cout << "CORRECT inside testReduceStep" << std::endl;
+  else
+	  std::cout << "ERROR inside testReduceStep" << std::endl;
+std::cout << "+++++++++++++++++END TEST REDUCE STEP+++++++++++++++++++++\n";
+  return quo;
+}
+
+// PSEUDO-REMAINDER and PSEUDO-QUOTIENT:
+// Let A = (*this) and B be the argument polynomial.
+// Let Quo be the returned polynomial, 
+// and let the final value of (*this) be Rem.
+// Also, C is the constant that we maintain.
+// We are computing A divided by B.  The relation we guarantee is 
+// 		(C * A) = (Quo * B)  + Rem
+// where deg(Rem) < deg(B).  So Rem is the Pseudo-Remainder
+// and Quo is the Pseudo-Quotient.
+// Moreover, C is uniquely determined (we won't spell it out)
+// except to note that
+//	C divides D = (LC)^{deg(A)-deg(B)+1}
+//	where LC is the leading coefficient of B.
+// NOTE: 1. Normally, Pseudo-Remainder is defined so that C = D
+// 	 So be careful when using our algorithm.
+// 	 2. We provide a version of pseudoRemainder which does not
+// 	 require C as argument.  [For efficiency, we should provide this
+//	 version directly, instead of calling the other version!]
+
+template <class NT>
+Polynomial<NT> Polynomial<NT>::pseudoRemainder (
+  const Polynomial<NT>& B) {
+	NT temp;	// dummy argument to be discarded
+	return pseudoRemainder(B, temp);
+}//pseudoRemainder
+
+template <class NT>
+Polynomial<NT> Polynomial<NT>::pseudoRemainder (
+  const Polynomial<NT>& B, NT & C) { 
+  contract();         // Let A = (*this).  Contract A.
+  Polynomial<NT> tmpB(B);
+  tmpB.contract();    // local copy of B
+  C = NT(1);  // Initialized to C=1.
+  if (B.degree == -1)  {
+    std::cout << "ERROR in Polynomial<NT>::pseudoRemainder :\n" <<
+    "    -- divide by zero polynomial" << std::endl;
+    return Polynomial(0);  // Unit Polynomial (arbitrary!)
+  }
+  if (B.degree > degree) {
+    return Polynomial(); // Zero Polynomial
+    // CHECK: 1*THIS = 0*B + THAT,  deg(THAT) < deg(B)
+  }
+
+  Polynomial<NT> Quo;  // accumulate the return polynomial, Quo
+  Polynomial<NT> tmpQuo;
+  while (degree >= B.degree) {  // INVARIANT: C*A = B*Quo + (*this)
+    tmpQuo = reduceStep(tmpB);  // Let (*this) be (*oldthis), which
+			        // is transformed into (*newthis). Then,
+                                //     c*(*oldthis) = B*m + (*newthis)
+                                // where tmpQuo = c + X*m
+    // Hence,   C*A =   B*Quo +   (*oldthis)      -- the old invariant
+    //        c*C*A = c*B*Quo + c*(*oldthis)
+    //              = c*B*Quo + (B*m + (*newthis))
+    //              = B*(c*Quo + m)  + (*newthis)
+    // i.e, to update invariant, we do C->c*C,  Quo --> c*Quo + m.
+    C *= tmpQuo.coeff[0];	    // C = c*C
+    Quo.mulScalar(tmpQuo.coeff[0]); // Quo -> c*Quo
+    tmpQuo.mulXpower(-1);           // tmpQuo is now equal to m
+    Quo += tmpQuo;                  // Quo -> Quo + m 
+  }
+
+  return Quo;	// Quo is the pseudo-quotient
+}//pseudoRemainder
+
+// Returns the negative of the pseudo-remainder
+// 	(self-modification)
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::negPseudoRemainder (
+  const Polynomial<NT>& B) {
+	NT temp;	// dummy argument to be discarded
+	pseudoRemainder(B, temp);
+	if (temp < 0) return (*this);
+	return negate();
+}
+
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::operator-() {	// unary minus
+  for (int i=0; i<=degree; i++)
+    coeff[i] *= -1;
+  return *this;
+}
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::power(unsigned int n) {	// self-power
+  if (n == 0) {
+    degree = 0;
+    delete [] coeff;
+    coeff = new NT[1];
+    coeff[0] = 1;
+  } else {
+    Polynomial<NT> p = *this;
+    for (unsigned int i=1; i<n; i++)
+      *this *= p;		// Would a binary power algorithm be better?
+  }
+  return *this;
+}
+
+// evaluation of BigFloat value
+//   NOTE: we think of the polynomial as an analytic function in this setting
+//      If the coefficients are more general than BigFloats,
+//      then we may get inexact outputs, EVEN if the input value f is exact.
+//      This is because we would have to convert these coefficients into
+//      BigFloats, and this conversion precision is controlled by the
+//      global variables defRelPrec and defAbsPrec.
+//   
+/*
+template <class NT>
+BigFloat Polynomial<NT>::eval(const BigFloat& f) const {	// evaluation
+  if (degree == -1)
+    return BigFloat(0);
+  if (degree == 0)
+    return BigFloat(coeff[0]);
+  BigFloat val(0);
+  for (int i=degree; i>=0; i--) {
+    val *= f;
+    val += BigFloat(coeff[i]);	
+  }
+  return val;
+}//eval
+*/
+
+/// Evaluation Function (generic version, always returns the exact value)
+///
+///  This evaluation function is easy to use, but may not be efficient
+///  when you have BigRat or Expr values.
+///
+/// User must be aware that the return type of eval is Max of Types NT and T.
+///
+/// E.g., If NT is BigRat, and T is Expr then Max(NT,T)=Expr. 
+/// 	
+/// REMARK: If NT is BigFloat, it is assumed that the BigFloat is error-free.  
+
+template <class NT>
+template <class T>
+MAX_TYPE(NT, T) Polynomial<NT>::eval(const T& f) const {	// evaluation
+  typedef MAX_TYPE(NT, T) ResultT;
+  if (degree == -1)
+    return ResultT(0);
+  if (degree == 0)
+    return ResultT(coeff[0]);
+  ResultT val(0);
+  for (int i=degree; i>=0; i--) {
+    val *= ResultT(f);
+    val += ResultT(coeff[i]);	
+  }
+  return val;
+}//eval
+
+
+/// Approximate Evaluation of Polynomials
+/// 	the coefficients of the polynomial are approximated to some
+///	specified composite precision (r,a).
+/// @param  f evaluation point 
+/// @param  r relative precision to which the coefficients are evaluated
+/// @param  a absolute precision to which the coefficients are evaluated
+/// @return a BigFloat with error containing value of the polynomial.
+///     If zero is in this BigFloat interval, then we don't know the sign.
+//
+// 	ASSERT: NT = BigRat or Expr
+//
+template <class NT>
+BigFloat Polynomial<NT>::evalApprox(const BigFloat& f, 
+	const extLong& r, const extLong& a) const {	// evaluation
+  if (degree == -1)
+    return BigFloat(0);
+  if (degree == 0)
+    return BigFloat(coeff[0], r, a);
+
+  BigFloat val(0), c;
+  for (int i=degree; i>=0; i--) {
+    c = BigFloat(coeff[i], r, a);	
+    val *= f; 
+    val += c;
+  }
+  return val;
+}//evalApprox
+
+// This BigInt version of evalApprox should never be called...
+template <>
+CORE_INLINE
+BigFloat Polynomial<BigInt>::evalApprox(const BigFloat& /*f*/,
+	const extLong& /*r*/, const extLong& /*a*/) const {	// evaluation
+  CGAL_assertion(0);
+  return BigFloat(0);
+}
+
+
+
+/**
+ * Evaluation at a BigFloat value
+ * using "filter" only when NT is BigRat or Expr.
+ * Using filter means we approximate the polynomials
+ * coefficients using BigFloats.  If this does not give us
+ * the correct sign, we will resort to an "exact" evaluation
+ * using Expr.
+ *
+ * If NT <= BigFloat, we just call eval().
+ *
+   We use the following heuristic estimates of precision for coefficients:
+
+      r = 1 + lg(|P|_\infty) + lg(d+1)  		if f <= 1
+      r = 1 + lg(|P|_\infty) + lg(d+1) + d*lg|f| 	if f > 1
+      
+   if the filter fails, then we use Expr to do evaluation.
+
+   This function is mainly called by Newton iteration (which
+   has some estimate for oldMSB from previous iteration).
+
+   @param p polynomial to be evaluated
+   @param val the evaluation point
+   @param oldMSB an rough estimate of the lg|p(val)|
+   @return bigFloat interval contain p(val), with the correct sign
+
+ ***************************************************/
+template <class NT>
+BigFloat Polynomial<NT>::evalExactSign(const BigFloat& val,
+	 const extLong& oldMSB) const {
+    CGAL_assertion(val.isExact());
+    if (getTrueDegree() == -1)
+      return BigFloat(0);
+  
+    extLong r;
+    r = 1 + BigFloat(height()).uMSB() + clLg(long(getTrueDegree()+1));
+    if (val > 1)
+      r += getTrueDegree() * val.uMSB();
+    r += core_max(extLong(0), -oldMSB);
+  
+    if (hasExactDivision<NT>::check()) { // currently, only to detect NT=Expr and NT=BigRat
+        BigFloat rVal = evalApprox(val, r);
+        if (rVal.isZeroIn()) {
+	  Expr eVal = eval(Expr(val));	// eval gives exact value
+	  eVal.approx(54,CORE_INFTY);  // if value is 0, we get exact 0
+	  return eVal.BigFloatValue();
+	} else 
+          return rVal;
+    } else
+	return BigFloat(eval(val));
+
+   //return 0; // unreachable
+  }//evalExactSign
+  
+
+//============================================================
+// Bounds
+//============================================================
+
+// Cauchy Upper Bound on Roots
+// -- ASSERTION: NT is an integer type
+template < class NT >
+BigFloat Polynomial<NT>::CauchyUpperBound() const {
+  if (zeroP(*this))
+    return BigFloat(0);
+  NT mx = 0;
+  int deg = getTrueDegree();
+  for (int i = 0; i < deg; ++i) {
+    mx = core_max(mx, abs(coeff[i]));
+  }
+  Expr e = mx;
+  e /= Expr(abs(coeff[deg]));
+  e.approx(CORE_INFTY, 2);
+  // get an absolute approximate value with error < 1/4
+  return (e.BigFloatValue().makeExact() + 2);
+}
+
+//============================================================
+// An iterative version of computing Cauchy Bound from Erich Kaltofen.
+// See the writeup under collab/sep/.
+//============================================================
+template < class NT >
+BigInt Polynomial<NT>::CauchyBound() const {
+  int deg = getTrueDegree();
+  BigInt B(1);
+  BigFloat lhs(0), rhs(1);
+  while (true) {
+    /* compute \sum_{i=0}{deg-1}{|a_i|B^i} */
+    lhs = 0;
+    for (int i=deg-1; i>=0; i--) {
+      lhs *= B;
+      lhs += abs(coeff[i]);
+    }
+    lhs /= abs(coeff[deg]);
+    lhs.makeFloorExact();
+    /* compute B^{deg} */
+    if (rhs <= lhs) {
+      B <<= 1;
+      rhs *= (BigInt(1)<<deg);
+    } else
+      break;
+  }
+  return B;
+}
+
+//====================================================================
+//Another iterative bound which is at least as good as the above bound
+//by Erich Kaltofen.
+//====================================================================
+template < class NT >
+BigInt Polynomial<NT>::UpperBound() const {
+  int deg = getTrueDegree();
+
+  BigInt B(1);
+  BigFloat lhsPos(0), lhsNeg(0), rhs(1);
+  while (true) {
+    /* compute \sum_{i=0}{deg-1}{|a_i|B^i} */
+    lhsPos = lhsNeg = 0;
+    for (int i=deg-1; i>=0; i--) {
+      if (coeff[i]>0) {
+      	lhsPos = lhsPos * B + coeff[i];
+      	lhsNeg = lhsNeg * B;
+      } else {
+      	lhsNeg = lhsNeg * B - coeff[i];
+      	lhsPos = lhsPos * B;
+      } 
+    }
+    lhsNeg /= abs(coeff[deg]);
+    lhsPos /= abs(coeff[deg]);
+    lhsPos.makeCeilExact();
+    lhsNeg.makeCeilExact();
+
+    /* compute B^{deg} */
+    if (rhs <= max(lhsPos,lhsNeg)) {
+      B <<= 1;
+      rhs *= (BigInt(1)<<deg);
+    } else
+      break;
+  }
+  return B;
+}
+
+// Cauchy Lower Bound on Roots
+// -- ASSERTION: NT is an integer type
+template < class NT >
+BigFloat Polynomial<NT>::CauchyLowerBound() const {
+  if ((zeroP(*this)) || coeff[0] == 0)
+    return BigFloat(0);
+  NT mx = 0;
+  int deg = getTrueDegree();
+  for (int i = 1; i <= deg; ++i) {
+    mx = core_max(mx, abs(coeff[i]));
+  }
+  Expr e = Expr(abs(coeff[0]))/ Expr(abs(coeff[0]) + mx);
+  e.approx(2, CORE_INFTY);
+  // get an relative approximate value with error < 1/4
+  return (e.BigFloatValue().makeExact().div2());
+}
+
+// Separation bound for polynomials that may have multiple roots.
+// We use the Rump-Schwartz bound.
+//
+//    ASSERT(the return value is an exact BigFloat and a Lower Bound)
+//
+template < class NT >
+BigFloat Polynomial<NT>::sepBound() const {
+  BigInt d;
+  BigFloat e;
+  int deg = getTrueDegree();
+
+  CORE::power(d, BigInt(deg), ((deg)+4)/2);
+  e = CORE::power(height()+1, deg);
+  e.makeCeilExact(); // see NOTE below
+  return (1/(e*2*d)).makeFloorExact();
+        // BUG fix: ``return 1/e*2*d'' was wrong
+        // NOTE: the relative error in this division (1/(e*2*d))
+        //   is defBFdivRelPrec (a global variable), but
+        //   since this is always positive, we are OK.
+        //   But to ensure that defBFdivRelPrec is used,
+        //   we must make sure that e and d are exact.
+        // Finally, using "makeFloorExact()" is OK because
+        //   the mantissa minus error (i.e., m-err) will remain positive
+        //   as long as the relative error (defBFdivRelPrec) is >1.
+}
+
+/// height function
+/// @return a BigFloat with error
+template < class NT >
+BigFloat Polynomial<NT>::height() const {
+  if (zeroP(*this))
+    return BigFloat(0);
+  int deg = getTrueDegree();
+  NT ht = 0;
+  for (int i = 0; i< deg; i++)
+    if (ht < abs(coeff[i]))
+      ht = abs(coeff[i]);
+  return BigFloat(ht);
+}
+
+/// length function
+/// @return a BigFloat with error
+template < class NT >
+BigFloat Polynomial<NT>::length() const {
+  if (zeroP(*this))
+    return BigFloat(0);
+  int deg = getTrueDegree();
+  NT length = 0;
+  for (int i = 0; i< deg; i++)
+    length += abs(coeff[i]*coeff[i]);
+  return sqrt(BigFloat(length));
+}
+
+//============================================================
+// differentiation
+//============================================================
+
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::differentiate() {	// self-differentiation
+  if (degree >= 0) {
+    NT * c = new NT[degree];
+    for (int i=1; i<=degree; i++)
+      c[i-1] = coeff[i] * i;
+    degree--;
+    delete[] coeff;
+    coeff = c;
+  }
+  return *this;
+}// differentiation
+
+// multi-differentiate
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::differentiate(int n) {
+  CGAL_assertion(n >= 0);
+  for (int i=1; i<=n; i++)
+    this->differentiate();
+  return *this;
+} // multi-differentiate
+
+
+// ==================================================
+// GCD, content, primitive and square-free parts
+// ==================================================
+
+/// divisibility predicate for polynomials
+// isDivisible(P,Q) returns true iff Q divides P
+// To FIX: the predicate name is consistent with Expr.h but not with BigInt.h
+template <class NT>
+bool isDivisible(Polynomial<NT> p, Polynomial<NT> q) {
+  if(zeroP(p))
+    return true;
+  if(zeroP(q))
+    return false;  // We should really return error!
+  if(p.getTrueDegree() < q.getTrueDegree())
+    return false;
+  p.pseudoRemainder(q);
+  if(zeroP(p))
+    return true;
+  else
+    return false;
+}//isDivisible
+
+//Content of a polynomial P
+//      -- content(P) is just the gcd of all the coefficients
+//      -- REMARK: by definition, content(P) is non-negative
+//                 We rely on the fact that NT::gcd always
+//                 return a non-negative value!!!
+template <class NT>
+NT content(const Polynomial<NT>& p) {
+  if(zeroP(p))
+    return 0;
+  int d = p.getTrueDegree();
+  if(d == 0){
+    if(p.coeff[0] > 0)
+      return p.coeff[0];
+    else
+      return -p.coeff[0];
+  }
+
+  NT content = p.coeff[d];
+  for (int i=d-1; i>=0; i--) {
+    content = gcd(content, p.coeff[i]);
+    if(content == 1) break;   // remark: gcd is non-negative, by definition
+  }
+  //if (p.coeff[0] < 0) return -content;(BUG!)
+  return content;
+}//content
+
+// Primitive Part:  (*this) is transformed to primPart and returned
+//	-- primPart(P) is just P/content(P)
+//	-- Should we return content(P) instead? [SHOULD IMPLEMENT THIS]
+// IMPORTANT: we require that content(P)>0, hence
+// 	the coefficients of primPart(P) does 
+// 	not change sign; this is vital for use in Sturm sequences
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::primPart() {
+  // ASSERT: GCD must be provided by NT
+  int d = getTrueDegree();
+  CGAL_assertion (d >= 0);
+  if (d == 0) {
+    if (coeff[0] > 0) coeff[0] = 1;
+    else coeff[0] = -1;
+    return *this;
+  }
+
+  NT g = content(*this);
+  if (g == 1 && coeff[d] > 0)
+     return (*this);  
+  for (int i=0; i<=d; i++) {
+     coeff[i] =  div_exact(coeff[i], g);
+  }
+  return *this;
+}// primPart
+
+//GCD of two polynomials.
+//   --Assumes that the coeffecient ring NT has a gcd function
+//   --Returns the gcd with a positive leading coefficient (*)
+//     otherwise division by gcd causes a change of sign affecting
+//     Sturm sequences.
+//   --To Check: would a non-recursive version be much better?
+template <class NT>
+Polynomial<NT> gcd(const Polynomial<NT>& p, const Polynomial<NT>& q) {
+
+  // If the first polynomial has a smaller degree then the second,
+  // then change the order of calling
+  if(p.getTrueDegree() < q.getTrueDegree())
+    return gcd(q,p);
+
+  // If any polynomial is zero then the gcd is the other polynomial
+  if(zeroP(q)){
+    if(zeroP(p))
+       return p;
+    else{
+       if(p.getCoeffi(p.getTrueDegree()) < 0){
+         return Polynomial<NT>(p).negate();
+       }else
+         return p;	// If q<>0, then we know p<>0
+   }
+  }
+  Polynomial<NT> temp0(p);
+  Polynomial<NT> temp1(q);
+
+  // We want to compute:
+  // gcd(p,q) = gcd(content(p),content(q)) * gcd(primPart(p), primPart(q))
+
+  NT cont0 = content(p);	// why is this temporary needed?
+  NT cont1 = content(q);
+  NT cont = gcd(cont0,cont1);
+  temp0.primPart();
+  temp1.primPart();
+
+  temp0.pseudoRemainder(temp1);
+  return (gcd(temp1, temp0).mulScalar(cont));
+}//gcd
+
+// sqFreePart()
+// 	-- this is a self-modifying operator!
+// 	-- Let P =(*this) and Q=square-free part of P.
+// 	-- (*this) is transformed into P, and gcd(P,P') is returned
+// NOTE: The square-free part of P is defined to be P/gcd(P, P')
+template <class NT>
+Polynomial<NT>  Polynomial<NT>::sqFreePart() {
+
+  int d = getTrueDegree();
+  if(d <= 1) // linear polynomials and constants are square-free
+    return *this;
+
+  Polynomial<NT> temp(*this);
+  Polynomial<NT> R = gcd(*this, temp.differentiate()); // R = gcd(P, P')
+
+  // If P and P' have a constant gcd, then P is squarefree
+  if(R.getTrueDegree() == 0)
+    return (Polynomial<NT>(0)); // returns the unit polynomial as gcd
+
+  (*this)=pseudoRemainder(R); // (*this) is transformed to P/R, the sqfree part
+  //Note: This is up to multiplication by units
+  return (R); // return the gcd
+}//sqFreePart()
+
+
+// ==================================================
+// Useful member functions
+// ==================================================
+
+// reverse:
+// 	reverses the list of coefficients
+template <class NT>
+void Polynomial<NT>::reverse() {
+  NT tmp;
+  for (int i=0; i<= degree/2; i++) {
+    tmp = coeff[i];
+    coeff[i] =   coeff[degree-i];
+    coeff[degree-i] = tmp;
+  }
+}//reverse
+
+// negate: 
+// 	multiplies the polynomial by -1
+// 	Chee: 4/29/04 -- added negate() to support negPseudoRemainder(B)
+template <class NT>
+Polynomial<NT> & Polynomial<NT>::negate() {
+  for (int i=0; i<= degree; i++) 
+    coeff[i] *= -1;  	// every NT must be able to construct from -1
+  return *this;
+}//negate
+
+// makeTailCoeffNonzero
+// 	Divide (*this) by X^k, so that the tail coeff becomes non-zero.
+//	The value k is returned.  In case (*this) is 0, return k=-1.
+//	Otherwise, if (*this) is unchanged, return k=0.
+template <class NT>
+int Polynomial<NT>::makeTailCoeffNonzero() {
+  int k=-1;
+  for (int i=0; i <= degree; i++) {
+    if (coeff[i] != 0) {
+      k=i;
+      break;
+    }
+  }
+  if (k <= 0)
+    return k;	// return either 0 or -1
+  degree -=k;		// new (lowered) degree
+  NT * c = new NT[1+degree];
+  for (int i=0; i<=degree; i++)
+    c[i] = coeff[i+k];
+  delete[] coeff;
+  coeff = c;
+  return k;
+}//
+
+// filedump(string msg, ostream os, string com, string com2):
+//      Dumps polynomial to output stream os
+//      msg is any message
+//      NOTE: Default is com="#", which is placed at start of each 
+//            output line. 
+template <class NT>
+void Polynomial<NT>::filedump(std::ostream & os,
+                          std::string msg,
+			  std::string commentString,
+                          std::string commentString2) const {
+  int d= getTrueDegree();
+  if (msg != "") os << commentString << msg << std::endl;
+  int i=0;
+  if (d == -1) { // if zero polynomial
+    os << commentString << "0";
+    return;
+  }
+  for (; i<=d;  ++i)	// get to the first non-zero coeff
+    if (coeff[i] != 0)
+      break;
+  int termsInLine = 1;
+
+  // OUTPUT the first nonzero term
+  os << commentString;
+  if (coeff[i] == 1) {			// special cases when coeff[i] is
+    if (i>1) os << "x^" << i;	// either 1 or -1 
+    else if (i==1) os << "x" ;
+    else os << "1";
+  } else if (coeff[i] == -1) {
+    if (i>1) os << "-x^" << i;
+    else if (i==1) os << "-x" ;
+    else os << "-1";
+  } else {				// non-zero coeff
+    os << coeff[i];
+    if (i>1) os << "*x^" << i;
+    else if (i==1) os << "x" ;
+  } 
+  // OUTPUT the remaining nonzero terms
+  for (i++ ; i<= getTrueDegree(); ++i) {
+    if (coeff[i] == 0) 
+      continue;
+    termsInLine++;
+    if (termsInLine % Polynomial<NT>::COEFF_PER_LINE == 0) {
+      os << std::endl;
+      os << commentString2;
+    }
+    if (coeff[i] == 1) {		// special when coeff[i] = 1
+      if (i==1) os << " + x";
+      else os << " + x^" << i;
+    } else if (coeff[i] == -1) {	// special when coeff[i] = -1
+      if (i==1) os << " - x";
+      else os << " -x^" << i;
+    } else {				// general case
+      if(coeff[i] > 0){	
+	os << " + ";
+        os << coeff[i];
+      }else
+        os << coeff[i];
+
+      if (i==1) os << "*x";
+      else os << "*x^" << i;
+    } 
+  }
+}//filedump
+
+// dump(message, ofstream, commentString) -- dump to file
+template <class NT>
+void Polynomial<NT>::dump(std::ofstream & ofs,
+		std::string msg,
+		std::string commentString,
+                std::string commentString2) const {
+  filedump(ofs, msg, commentString, commentString2);
+}
+
+// dump(message) 	-- to std output
+template <class NT>
+void Polynomial<NT>::dump(std::string msg, std::string com,
+		std::string com2) const {
+  filedump(std::cout, msg, com, com2);
+}
+
+// Dump of Maple Code for Polynomial
+template <class NT>
+void Polynomial<NT>::mapleDump() const {
+  if (zeroP(*this)) {
+    std::cout << 0 << std::endl;
+    return;
+  }
+  std::cout << coeff[0];
+  for (int i = 1; i<= getTrueDegree(); ++i) {
+    std::cout << " + (" << coeff[i] << ")";
+    std::cout << "*x^" << i;
+  }
+  std::cout << std::endl;
+}//mapleDump
+
+// ==================================================
+// Useful friend functions for Polynomial<NT> class
+// ==================================================
+
+// friend differentiation
+template <class NT>
+Polynomial<NT> differentiate(const Polynomial<NT> & p) {	  // differentiate
+  Polynomial<NT> q(p);
+  return q.differentiate();
+}
+
+// friend multi-differentiation
+template <class NT>
+Polynomial<NT> differentiate(const Polynomial<NT> & p, int n) {//multi-differentiate
+  Polynomial<NT> q(p);
+  CGAL_assertion(n >= 0);
+  for (int i=1; i<=n; i++)
+    q.differentiate();
+  return q;
+}
+
+// friend equality comparison
+template <class NT>
+bool operator==(const Polynomial<NT>& p, const Polynomial<NT>& q) {	// ==
+  int d, D;
+  Polynomial<NT> P(p);
+  P.contract();
+  Polynomial<NT> Q(q);
+  Q.contract();
+  if (P.degree < Q.degree) {
+    d = P.degree;
+    D = Q.degree;
+    for (int i = d+1; i<=D; i++)
+      if (Q.coeff[i] != 0)
+        return false;	// return false
+  } else {
+    D = P.degree;
+    d = Q.degree;
+    for (int i = d+1; i<=D; i++)
+      if (P.coeff[i] != 0)
+        return false;	// return false
+  }
+  for (int i = 0; i <= d; i++)
+    if (P.coeff[i] != Q.coeff[i])
+      return false;	// return false
+  return true; 	// return true
+}
+
+// friend non-equality comparison
+template <class NT>
+bool operator!=(const Polynomial<NT>& p, const Polynomial<NT>& q) {	// !=
+  return (!(p == q));
+}
+
+// stream i/o
+template <class NT>
+std::ostream& operator<<(std::ostream& o, const Polynomial<NT>& p) {
+  o <<   "Polynomial<NT> ( deg = " << p.degree ;
+  if (p.degree >= 0) {
+    o << "," << std::endl;
+    o << ">  coeff c0,c1,... = " << p.coeff[0];
+    for (int i=1; i<= p.degree; i++)
+      o << ", " <<  p.coeff[i] ;
+  }
+  o << ")" << std::endl;
+  return o;
+}
+
+// fragile version...
+template <class NT>
+std::istream& operator>>(std::istream& is, Polynomial<NT>& p) {
+  is >> p.degree;
+  // Don't you need to first do  "delete[] p.coeff;"  ??
+  p.coeff = new NT[p.degree+1];
+  for (int i=0; i<= p.degree; i++)
+    is >> p.coeff[i];
+  return is;
+}
+
+// ==================================================
+// Simple test of poly
+// ==================================================
+
+template <class NT>
+bool testPoly() {
+  int c[] = {1, 2, 3};
+  Polynomial<NT> p(2, c);
+  std::cout << p;
+
+  Polynomial<NT> zeroP;
+  std::cout << "zeroP  : " << zeroP << std::endl;
+
+  Polynomial<NT> P5(5);
+  std::cout << "Poly 5 : " << P5 << std::endl;
+
+  return 0;
+}
+
+
+//Resultant of two polynomials.
+//Since we use pseudoRemainder we have to modify the original algorithm.
+//If C * P = Q * R + S, where C is a constant and S = prem(P,Q), m=deg(P),
+// n=deg(Q) and l = deg(S).
+//Then res(P,Q) = (-1)^(mn) b^(m-l) res(Q,S)/C^(n)
+//The base case being res(P,Q) = Q^(deg(P)) if Q is a constant, zero otherwise
+template <class NT>
+NT res(Polynomial<NT> p, Polynomial<NT> q) {
+
+  int m, n;
+  m = p.getTrueDegree();
+  n = q.getTrueDegree();
+
+  if(m == -1 || n == -1) return 0;  // this definition is not certified
+  if(m == 0 && n == 0) return 1;    // this definition is at variance from
+                                    // Yap's book (but is OK for purposes of
+                                    // checking the vanishing of resultants
+  if(n > m) return (res(q, p));
+
+  NT b = q.coeff[n];//Leading coefficient of Q
+  NT lc = p.coeff[m], C;
+
+  p.pseudoRemainder(q, C);
+
+  if(zeroP(p) && n ==0)
+     return (pow(q.coeff[0], m));	
+
+  int l = p.getTrueDegree();
+
+  return(pow(NT(-1), m*n)*pow(b,m-l)*res(q,p)/pow(C,n));
+}
+
+//i^th Principal Subresultant Coefficient (psc) of two polynomials.
+template <class NT>
+NT psc(int i,Polynomial<NT> p, Polynomial<NT> q) {
+
+  CGAL_assertion(i >= 0);
+  if(i == 0)
+     return res(p,q);
+
+  int m = p.getTrueDegree();
+  int n = q.getTrueDegree();
+
+  if(m == -1 || n == -1) return 0;
+  if(m < n) return psc(i, q, p);
+
+  if ( i == n) //This case occurs when i > degree of gcd
+     return pow(q.coeff[n], m - n);
+
+  if(n < i && i <= m)
+     return 0;
+
+  NT b = q.coeff[n];//Leading coefficient of Q
+  NT lc = p.coeff[m], C;	
+
+
+  p.pseudoRemainder(q, C);
+
+  if(zeroP(p) && i < n)//This case occurs when i < deg(gcd)
+     return 0;
+
+  if(zeroP(p) && i == n)//This case occurs when i=deg(gcd) might be constant
+     return pow(q.coeff[n], m - n);
+
+  int l = p.getTrueDegree();
+  return pow(NT(-1),(m-i)*(n-i))*pow(b,m-l)*psc(i,q,p)/pow(C, n-i);
+
+}
+
+//factorI(p,m)
+//    computes the polynomial q which containing all roots
+//    of multiplicity m of a given polynomial P
+//    Used to determine the nature of intersection of two algebraic curves
+//    The algorithm is given in Wolperts Thesis
+template <class NT>
+Polynomial<NT> factorI(Polynomial<NT> p, int m){
+  int d=p.getTrueDegree();
+  Polynomial<NT> *w = new Polynomial<NT>[d+1];
+  w[0] = p;
+  Polynomial<NT> temp;
+
+  for(int i = 1; i <=d ; i ++){
+     temp = w[i-1];
+     w[i] = gcd(w[i-1],temp.differentiate());
+  }
+
+  Polynomial<NT> *u = new Polynomial<NT>[d+1];
+  u[d] = w[d-1];
+  for(int i = d-1; i >=m; i--){
+	temp = power(u[i+1],2);
+     for(int j=i+2; j <=d; j++){
+        temp *= power(u[j],j-i+1);
+     }
+     u[i] = w[i-1].pseudoRemainder(temp);//i-1 since the array starts at 0
+  } 
+	
+	delete[] w;
+  return u[m];
+}
+
+// ==================================================
+// End of Polynomial<NT>
+// ==================================================
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Sturm.h b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Sturm.h
new file mode 100644
index 0000000..28024e9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE/poly/Sturm.h
@@ -0,0 +1,1150 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ *  File: Sturm.h
+ * 
+ *  Description: 
+ *  The templated class Sturm implements Sturm sequences.
+ *  Basic capabilities include:
+ *     counting number of roots in an interval, 
+ *     isolating all roots in an interval
+ *     isolating the i-th largest (or smallest) root in interval
+ *  It is based on the Polynomial class.
+ * 
+ *   BigFloat intervals are used for this (new) version.
+ *   It is very important that the BigFloats used in these intervals
+ *   have no error at the beginning, and this is maintained
+ *   by refinement.  Note that if x, y are error-free BigFloats,
+ *   then (x+y)/2 may not be error-free (in current implementaion.
+ *   We have to call a special "exact divide by 2" method,
+ *   (x+y).div2() for this purpose.
+ *
+ *   CONVENTION: an interval defined by a pair of BigFloats x, y
+ *   has this interpretation:
+ *       (1) if x>y,  it represents an invalid interval.
+ *       (2) if x=y,  it represents a unique point x.
+ *       (3) if x<y,  it represents the open interval (x,y).
+ *           In this case, we always may sure that x, y are not zeros.
+ * 
+ *   TODO LIST and Potential Bugs:
+ *   (1) Split an isolating interval to give definite sign (done)
+ *   (2) Should have a test for square-free polynomials (done)
+ * 
+ *  Author:  Chee Yap and Sylvain Pion, Vikram Sharma
+ *  Date:    July 20, 2002
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+
+#ifndef CORE_STURM_H
+#define CORE_STURM_H
+
+#include <CGAL/assertions.h>
+#include "CGAL/CORE/BigFloat.h"
+#include "CGAL/CORE/Expr.h"
+#include "CGAL/CORE/poly/Poly.h"
+
+namespace CORE { 
+
+// ==================================================
+// Sturm Class
+// ==================================================
+
+template < class NT >
+class Sturm {
+public:
+  int len;      // len is 1 less than the number of non-zero entries in array seq.
+  		//     I.e., len + 1 = length of the Sturm Sequence
+                // N.B. When len = -1 or len = 0 are special,
+                //     the array seq is not used!
+                //     Hence, one must test these special cases
+  Polynomial<NT> * seq;      // array of polynomials of length "len+1"
+  Polynomial<NT> g;//GCD of input polynomial P and it's derivative P'
+  NT cont;//Content of the square-free part of input polynomial P
+  //Thus P = g * cont * seq[0]
+  static int N_STOP_ITER;    // Stop IterE after this many iterations. This
+  // is initialized below, outside the Newton class
+  bool NEWTON_DIV_BY_ZERO;   // This is set to true when there is divide by
+  // zero in Newton iteration (at critical value)
+  // User is responsible to check this and to reset.
+  typedef Polynomial<NT> PolyNT;
+
+  // ===============================================================
+  // CONSTRUCTORS
+  // ===============================================================
+  // Null Constructor
+  Sturm() : len(0), NEWTON_DIV_BY_ZERO(false) {}
+
+  // Constructor from a polynomial
+  Sturm(Polynomial<NT> pp) : NEWTON_DIV_BY_ZERO(false) {
+    len = pp.getTrueDegree();
+    if (len <= 0) return; // hence, seq is not defined in these cases
+    seq = new Polynomial<NT> [len+1];
+    seq[0] = pp;
+    g = seq[0].sqFreePart();
+    cont = content(seq[0]);
+    seq[0].primPart();
+    seq[1] = differentiate(seq[0]);
+    int i;
+    for (i=2; i <= len; i++) {
+      seq[i] = seq[i-2];
+      seq[i].negPseudoRemainder(seq[i-1]);
+      if (zeroP(seq[i])){
+	len = i-1;//Since len is one less than the number of non-zero entries.
+        break;
+      }
+      seq[i].primPart(); // Primitive part is important to speed
+      // up large polynomials! However, for first 2 polymials,
+      // we MUST NOT take primitive part, because we
+      // want to use them in Newton Iteration
+    }
+  }
+
+  // Chee: 7/31/04
+  // 	We need BigFloat version of Sturm(Polynomial<NT>pp) because
+  // 	of curve verticalIntersection() ... .  We also introduce
+  // 	various support methods in BigFloat.h (exact_div, gcd, etc).
+  // Constructor from a BigFloat polynomial 
+  //	Need the fake argument to avoid compiler overloading errors
+  Sturm(Polynomial<BigFloat> pp, bool /* fake */) : NEWTON_DIV_BY_ZERO(false) {
+    len = pp.getTrueDegree();
+    if (len <= 0) return; // hence, seq is not defined in these cases
+    seq = new Polynomial<NT> [len+1];
+    seq[0] = pp;
+    g = seq[0].sqFreePart();
+    cont = content(seq[0]);
+    seq[0].primPart();
+    seq[1] = differentiate(seq[0]);
+    int i;
+    for (i=2; i <= len; i++) {
+      seq[i] = seq[i-2];
+      seq[i].negPseudoRemainder(seq[i-1]);
+      if (zeroP(seq[i])){
+	len = i-1;//Since len is one less than the number of non-zero entries.
+	//len = i;
+        break;
+      }
+      seq[i].primPart(); // Primitive part is important to speed
+      // up large polynomials! However, for first 2 polymials,
+      // we DO NOT take primitive part, because we
+      // want to use them in Newton Iteration
+    }
+  }
+
+  // Constructor from an array of NT's
+  //   -- this code is identical to constructing from a polynomial...
+  Sturm(int n, NT * c) : NEWTON_DIV_BY_ZERO(false) {
+    Polynomial<NT> pp(n, c); // create the polynomial pp first and call the
+    (*this) = Sturm<NT>(pp);//constructor from a polynomial
+  }
+
+  // copy constructor
+  Sturm(const Sturm&s) : len(s.len), NEWTON_DIV_BY_ZERO(s.NEWTON_DIV_BY_ZERO) {
+    if (len <= 0) return;
+    seq = new Polynomial<NT> [len+1];
+    for (int i=0; i<=len; i++)
+      seq[i] = s.seq[i];
+  }
+
+  // assignment operator
+  const Sturm& operator=(const Sturm& o) {
+    if (this == &o)
+      return *this;
+    if (len > 0)
+      delete[] seq;
+    NEWTON_DIV_BY_ZERO = o.NEWTON_DIV_BY_ZERO;
+    len = o.len;
+    if (len > 0) {
+      seq = new Polynomial<NT>[len+1];
+      for (int i=0; i<=len; i++)
+        seq[i] = o.seq[i];
+    }
+    return *this;
+  }
+
+  // destructor
+  ~Sturm() {
+    if (len != 0)
+      delete[] seq;
+  }
+
+  // METHODS
+
+  // dump functions
+  void dump(std::string msg) const {
+    std::cerr << msg << std::endl;
+    if (len <= 0) std::cerr << " len = " << len << std::endl;
+    else
+       for (int i=0; i<=len; i++)
+         std::cerr << " seq[" << i << "] = " << seq[i] << std::endl;
+  }
+  void dump() const {
+    dump("");
+  }
+
+  // signVariations(x, sx)
+  //   where sx = sign of evaluating seq[0] at x
+  //   PRE-CONDITION: sx != 0  and len > 0
+  int signVariations(const BigFloat & x, int sx) const {
+    CGAL_assertion((sx != 0) && (len >0));
+    int cnt = 0;
+    int last_sign = sx;
+    for (int i=1; i<=len; i++) {// Chee (4/29/04): Bug fix,
+        // should start iteration at i=1, not i=0.  Potential error
+        // if seq[0].eval(x)=0 (though not in our usage).
+      int sgn = sign(seq[i].evalExactSign(x));
+      if (sgn*last_sign < 0) {
+        cnt++;
+        last_sign *= -1;
+      }
+    }
+    return cnt;
+  }
+
+  // signVariations(x)
+  //   --the first polynomial eval is not yet done
+  //   --special return value of -1, indicating x is root!
+  int signVariations(const BigFloat & x) const {
+    if (len <= 0) return len; 
+    int signx = sign(seq[0].evalExactSign(x));
+    if (signx == 0)
+      return (-1);    // THIS indicates that x is a root...
+    		      // REMARK: in our usage, this case does not arise
+    return signVariations(x, signx);
+  }//signVariations(x)
+
+  // signVariation at +Infinity
+  int signVariationsAtPosInfty() const {
+    if (len <= 0) return len;
+    int cnt = 0;
+    int last_sign = sign(seq[0].coeff[seq[0].getTrueDegree()]);
+    CGAL_assertion(last_sign != 0);
+    for (int i=1; i<=len; i++) {
+      int sgn = sign(seq[i].coeff[seq[i].getTrueDegree()]);
+      if (sgn*last_sign < 0)
+        cnt++;
+      if (sgn != 0)
+        last_sign = sgn;
+    }
+    return cnt;
+  }
+
+  // signVariation at -Infinity
+  int signVariationsAtNegInfty() const {
+    if (len <= 0) return len;
+    int cnt = 0;
+    int last_sign = sign(seq[0].coeff[seq[0].getTrueDegree()]);
+    if (seq[0].getTrueDegree() % 2 != 0)
+      last_sign *= -1;
+    CGAL_assertion(last_sign != 0);
+    for (int i=1; i<=len; i++) {
+      int parity = (seq[i].getTrueDegree() % 2 == 0) ? 1 : -1;
+      int sgn = parity * sign(seq[i].coeff[seq[i].getTrueDegree()]);
+      if (sgn*last_sign < 0)
+        cnt++;
+      if (sgn != 0)
+        last_sign = sgn;
+    }
+    return cnt;
+  }
+
+  // numberOfRoots(x,y):
+  //   COUNT NUMBER OF ROOTS in the close interval [x,y]
+  //   IMPORTANT: Must get it right even if x, y are roots
+  //   Assert("x and y are exact")
+  //       [If the user is unsure of this assertion, do
+  //        "x.makeExact(); y.makeExact()" before calling].
+  ///////////////////////////////////////////
+  int numberOfRoots(const BigFloat &x, const BigFloat &y) const {
+    CGAL_assertion(x <= y);   // we allow x=y
+    if (len <= 0) return len;  // return of -1 means infinity of roots!
+    int signx = sign(seq[0].evalExactSign(x));
+    if (x == y) return ((signx == 0) ? 1 : 0);
+    int signy = sign(seq[0].evalExactSign(y));
+    // easy case: THIS SHOULD BE THE OVERWHELMING MAJORITY
+
+    if (signx != 0 && signy != 0)
+      return (signVariations(x, signx) - signVariations(y, signy));
+    // harder case: THIS SHOULD BE VERY INFREQUENT
+    BigFloat sep = (seq[0].sepBound()).div2();
+    BigFloat newx, newy;
+    if (signx == 0)
+      newx = x - sep;
+    else
+      newx = x;
+    if (signy == 0)
+      newy = y + sep;
+    else
+      newy = y;
+    return (signVariations(newx, sign(seq[0].evalExactSign(newx)))
+            - signVariations(newy, sign(seq[0].evalExactSign(newy))) );
+  }//numberOfRoots
+
+  // numberOfRoots():
+  //   Counts the number of real roots of a polynomial
+  ///////////////////////////////////////////
+  int numberOfRoots() const {
+    if (len <= 0) return len;  // return of -1 means infinity of roots!
+    //    BigFloat bd = seq[0].CauchyUpperBound();
+    //    return numberOfRoots(-bd, bd);
+    return signVariationsAtNegInfty() - signVariationsAtPosInfty();
+  }
+
+  // numberOfRoots above or equal to x:
+  //   Default value x=0 (i.e., number of positive roots)
+  //   assert(len >= 0)
+  ///////////////////////////////////////////
+  int numberOfRootsAbove(const BigFloat &x = 0) const {
+    if (len <= 0) return len;  // return of -1 means infinity of roots!
+    int signx = sign(seq[0].evalExactSign(x));
+    if (signx != 0)
+      return signVariations(x, signx) - signVariationsAtPosInfty();
+    BigFloat newx = x - (seq[0].sepBound()).div2();
+    return signVariations(newx, sign(seq[0].evalExactSign(newx)))
+           - signVariationsAtPosInfty();
+  }
+
+  // numberOfRoots below or equal to x:
+  //   Default value x=0 (i.e., number of negative roots)
+  //   assert(len >= 0)
+  ///////////////////////////////////////////
+  int numberOfRootsBelow(const BigFloat &x = 0) const {
+    if (len <= 0) return len;  // return of -1 means infinity of roots!
+    int signx = sign(seq[0].evalExactSign(x));
+    if (signx != 0)
+      return signVariationsAtNegInfty() - signVariations(x, signx);
+    BigFloat newx = x + (seq[0].sepBound()).div2();
+    return signVariationsAtNegInfty()
+           - signVariations(newx, sign(seq[0].evalExactSign(newx)));
+  }
+
+
+  /// isolateRoots(x, y, v)
+  ///             Assertion(x, y are exact BigFloats)
+  ///   isolates all the roots in [x,y] and returns them in v.
+  /**   v is a list of intervals
+   *    [x,y] is the initial interval to be isolated
+   *
+   *    Properties we guarantee in the return values:
+   *
+   *    (0) All the intervals have exact BigFloats as endpoints
+   *    (1) If 0 is a root, the corresponding isolating interval will be
+   *        exact, i.e., we return [0,0].
+   *    (2) If an interval is [0,x], it contains a positive root
+   *    (3) If an interval is [y,0], it contains a negative root
+   */
+  void isolateRoots(const BigFloat &x, const BigFloat &y,
+                    BFVecInterval &v) const {
+    CGAL_assertion(x<=y);
+
+    int n = numberOfRoots(x,y);
+    if (n == 0) return;
+    if (n == 1) {
+      if ((x > 0) || (y < 0)) // usual case: 0 is not in interval
+        v.push_back(std::make_pair(x, y));
+      else { // if 0 is inside our interval (this extra
+	     // service is not strictly necessary!)
+        if (seq[0].coeff[0] == 0)
+          v.push_back(std::make_pair(BigFloat(0), BigFloat(0)));
+        else if (numberOfRoots(0,y) == 0)
+          v.push_back(std::make_pair(x, BigFloat(0)));
+        else
+          v.push_back(std::make_pair(BigFloat(0), y));
+      }
+    } else { // n > 1
+      BigFloat mid = (x+y).div2(); // So mid is exact.
+      if (sign(seq[0].evalExactSign(mid)) != 0)  { // usual case: mid is non-root
+      	isolateRoots(x, mid, v);
+      	isolateRoots(mid, y, v); 
+      } else { // special case: mid is a root
+	BigFloat tmpEps = (seq[0].sepBound()).div2();  // this is exact!
+	if(mid-tmpEps > x )//Since otherwise there are no roots in (x,mid)
+	  isolateRoots(x, (mid-tmpEps).makeCeilExact(), v);
+	v.push_back(std::make_pair(mid, mid));
+	if(mid+tmpEps < y)//Since otherwise there are no roots in (mid,y)
+	  isolateRoots((mid+tmpEps).makeFloorExact(), y, v);
+      }
+    }
+  }//isolateRoots(x,y,v)
+
+  // isolateRoots(v)
+  ///   isolates all roots and returns them in v
+  /**   v is a vector of isolated intervals
+   */
+  void isolateRoots(BFVecInterval &v) const {
+    if (len <= 0) {
+       v.clear(); return;
+    }
+    BigFloat bd = seq[0].CauchyUpperBound();
+    // Note: bd is an exact BigFloat (this is important)
+    isolateRoots(-bd, bd, v);
+  }
+
+  // isolateRoot(i)
+  ///   Isolates the i-th smallest root 
+  ///         If i<0, isolate the (-i)-th largest root
+  ///   Defaults to i=0 (i.e., the smallest positive root a.k.a. main root)
+  BFInterval isolateRoot(int i = 0) const {
+    if (len <= 0) 
+       return BFInterval(1,0);   // ERROR CONDITION
+    if (i == 0)
+      return mainRoot();
+    BigFloat bd = seq[0].CauchyUpperBound();
+    return isolateRoot(i, -bd, bd);
+  }
+
+  // isolateRoot(i, x, y)
+  ///   isolates the i-th smallest root in [x,y]
+  /**   If i is negative, then we want the i-th largest root in [x,y]
+   *    We assume i is not zero.
+   */
+  BFInterval isolateRoot(int i, BigFloat x, BigFloat y) const {
+    int n = numberOfRoots(x,y);
+    if (i < 0) {//then we want the n-i+1 root
+      i += n+1;
+      if (i <= 0)
+        return BFInterval(1,0); // ERROR CONDITION
+    }
+    if (n < i)
+      return BFInterval(1,0);  // ERROR CONDITION INDICATED
+    //Now 0< i <= n
+    if (n == 1) {
+      if ((x>0) || (y<0)) return BFInterval(x, y);
+      if (seq[0].coeff[0] == NT(0)) return BFInterval(0,0);
+      if (numberOfRoots(0, y)==0) return BFInterval(x,0);
+      return BFInterval(0,y);
+    }
+    BigFloat m = (x+y).div2();
+    n = numberOfRoots(x, m);
+    if (n >= i)
+	    return isolateRoot(i, x, m);
+    // Now (n < i) but we have to be careful if m is a root
+    if (sign(seq[0].evalExactSign(m)) != 0)   // usual case
+      return isolateRoot(i-n, m, y);
+    else
+      return isolateRoot(i-n+1, m, y);
+  }
+
+  // same as isolateRoot(i).
+  BFInterval diamond(int i) const {
+    return isolateRoot(i);
+  }
+
+  // First root above
+  BFInterval firstRootAbove(const BigFloat &e) const {
+    if (len <= 0)
+       return BFInterval(1,0);   // ERROR CONDITION
+    return isolateRoot(1, e, seq[0].CauchyUpperBound());
+  }
+
+  // Main root (i.e., first root above 0)
+  BFInterval mainRoot() const {
+    if (len <= 0)
+       return BFInterval(1,0);   // ERROR CONDITION
+    return isolateRoot(1, 0, seq[0].CauchyUpperBound());
+  }
+
+  // First root below
+  BFInterval firstRootBelow(const BigFloat &e) const {
+    if (len <= 0)
+       return BFInterval(1,0);   // ERROR CONDITION
+    BigFloat bd = seq[0].CauchyUpperBound(); // bd is exact
+    int n = numberOfRoots(-bd, e);
+    if (n <= 0)
+      return BFInterval(1,0);
+    BigFloat bdBF = BigFloat(ceil(bd));
+    if (n == 1)
+      return BFInterval(-bdBF, e);
+    return isolateRoot(n, -bdBF, e);
+  }
+
+  // Refine an interval I to absolute precision 2^{-aprec}
+  //   THIS USES bisection only!  Use only for debugging (it is too slow)
+  //
+  BFInterval refine(const BFInterval& I, int aprec) const {
+    // assert( There is a unique root in I )
+    // We repeat binary search till the following holds
+    //      width/2^n <= eps             (eps = 2^(-aprec))
+    //   => log(width/eps) <= n
+    //   => n = ceil(log(width/eps)) this many steps of binary search
+    //   will work.
+    // At each step we verify
+    //   seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) < 0
+
+    BigFloat width = I.second - I.first;
+    if (width <= 0) return I;  // Nothing to do if the
+                               //   interval I is exact or inconsistent
+    BigFloat eps = BigFloat::exp2(-aprec);   //  eps = 2^{-aprec}
+    extLong n =  width.uMSB() + (extLong)aprec;
+
+
+    BFInterval J = I;           // Return value is the Interval J
+    BigFloat midpoint;
+    while(n >= 0) {
+      midpoint = (J.second + J.first).div2();
+      BigFloat m = seq[0].evalExactSign(midpoint);
+      if (m == 0) {
+        J.first = J.second = midpoint;
+        return J;
+      }
+      if (seq[0].evalExactSign(J.first) * m < 0) {
+        J.second = midpoint;
+      } else {
+        J.first = midpoint;
+      }
+
+      n--;
+    }
+
+    return J;
+  }//End Refine
+
+  // Refine First root above
+  BFInterval refinefirstRootAbove(const BigFloat &e, int aprec) const {
+    BFInterval I = firstRootAbove(e);
+    return refine(I,aprec);
+  }
+
+  // Refine First root below
+  BFInterval refinefirstRootBelow(const BigFloat &e, int aprec) const {
+    BFInterval I = firstRootBelow(e);
+    return refine(I,aprec);
+  }
+
+  // refineAllRoots(v, aprec)
+  //     will modify v so that v is a list of isolating intervals for
+  //     the roots of the polynomial in *this.  The size of these intervals
+  //     are at most 2^{-aprec}.
+  // If v is non-null, we assume it is a list of initial isolating intervals.
+  // If v is null, we will first call isolateRoots(v) to set this up.
+  void refineAllRoots( BFVecInterval &v, int aprec) {
+    BFVecInterval v1;
+    BFInterval  J;
+    if (v.empty())
+      isolateRoots(v);
+
+    for (BFVecInterval::const_iterator it = v.begin();
+         it != v.end(); ++it) {        // Iterate through all the intervals
+      //refine them to the given precision aprec
+      J = refine(BFInterval(it->first, it->second), aprec);
+      v1.push_back(std::make_pair(J.first, J.second));
+    }
+    v.swap(v1);
+  }//End of refineAllRoots
+
+  // This is the new version of "refineAllRoots"
+  //    	based on Newton iteration
+  // It should be used instead of refineAllRoots!
+  void newtonRefineAllRoots( BFVecInterval &v, int aprec) {
+
+    BFVecInterval v1;
+    BFInterval  J;
+
+    if (v.empty())
+      isolateRoots(v);
+    for (BFVecInterval::iterator it = v.begin();
+         it != v.end(); ++it) {        // Iterate through all the intervals
+      //refine them to the given precision aprec
+      J = newtonRefine(*it, aprec);
+
+      if (NEWTON_DIV_BY_ZERO) {
+        J.first = 1;
+        J.second = 0;   // indicating divide by zero
+      }
+      v1.push_back(std::make_pair(J.first, J.second));
+    }
+    v.swap(v1);
+  }//End of newtonRefineAllRoots
+
+  /** val = newtonIterN(n, bf, del, err, fuMSB, ffuMSB)
+   * 
+   *    val is the root after n iterations of Newton
+   *       starting from initial value of bf and is exact.
+   *    fuMSB and ffuMSB are precision parameters for the approximating
+   *		the coefficients of the underlyinbg polynomial, f(x).
+   *    	THEY are used ONLY if the coefficients of the polynomial
+   *		comes from a field (in particular, Expr or BigRat).
+   *		We initially approximate the coefficients of f(x) to fuMSB 
+   *		relative bits, and f'(x) to ffuMSB relative bits.
+   *		The returned values of fuMSB and ffuMSB are the final
+   *		precision used by the polynomial evaluation algorithm.
+   *    Return by reference, "del" (difference between returned val and value
+   *       in the previous Newton iteration)
+   *
+   *    Also, "err" is returned by reference and bounds the error in "del".
+   *
+   *    IMPORTANT: we assume that when x is an exact BigFloat,
+   *    then Polynomial<NT>::eval(x) will be exact!
+   *    But current implementation of eval() requires NT <= BigFloat.
+   * ****************************************************/    
+
+  BigFloat newtonIterN(long n, const BigFloat& bf, BigFloat& del,
+	unsigned long & err, extLong& fuMSB, extLong& ffuMSB) {
+    if (len <= 0) return bf;   // Nothing to do!  User must
+                               // check this possibility!
+    BigFloat val = bf;  
+    // val.makeExact();    // val is exact
+
+    // newton iteration
+    for (int i=0; i<n; i++) {
+      ////////////////////////////////////////////////////
+      // Filtered Eval
+      ////////////////////////////////////////////////////
+      BigFloat ff = seq[1].evalExactSign(val, 3*ffuMSB); //3 is a slight hack
+      ffuMSB = ff.uMSB();
+      //ff is guaranteed to have the correct sign as the exact evaluation.
+      ////////////////////////////////////////////////////
+
+      if (ff == 0) {
+        NEWTON_DIV_BY_ZERO = true;
+        del = 0;
+        core_error("Zero divisor in Newton Iteration",
+                __FILE__, __LINE__, false);
+        return 0;
+      }
+
+      ////////////////////////////////////////////////////
+      // Filtered Eval
+      ////////////////////////////////////////////////////
+      BigFloat f= seq[0].evalExactSign(val, 3*fuMSB); //3 is a slight hack
+      fuMSB = f.uMSB();
+      ////////////////////////////////////////////////////
+
+      if (f == 0) {
+        NEWTON_DIV_BY_ZERO = false;
+        del = 0;    // Indicates that we have reached the exact root
+		    //    This is because eval(val) is exact!!!
+        return val; // val is the exact root, before the last iteration
+      }
+      del = f/ff; // But the accuracy of "f/ff" must be controllable
+		    // by the caller...
+      err = del.err();
+      del.makeExact(); // makeExact() is necessary
+      val -= del;
+      // val.makeExact();  // -- unnecessary...
+    }
+    return val;
+  }//newtonIterN
+
+  //Another version of newtonIterN which does not return the error 
+  //and passing the uMSB as arguments; it is easier for the user to call
+  //this.
+  BigFloat newtonIterN(long n, const BigFloat& bf, BigFloat& del){
+    unsigned long err;
+    extLong fuMSB=0, ffuMSB=0;
+    return newtonIterN(n, bf, del, err, fuMSB, ffuMSB);
+  }
+
+  // v = newtonIterE(prec, bf, del, fuMSB, ffuMSB)
+  //
+  //    return the value v which is obtained by Newton iteration
+  //    until del.uMSB < -prec, starting from initial value of bf.
+  //    Returned value is an exact BigFloat.
+  //    We guarantee at least one Newton step (so del is defined).
+  //
+  //	   The parameters fuMSB and ffuMSB are precision parameters for
+  //	   evaluating coefficients of f(x) and f'(x), used similarly
+  //	   as described above for newtonIterN(....)
+  //
+  //    Return by reference "del" (difference between returned val and value
+  //       in the previous Newton iteration).  This "del" is an upper bound
+  //       on the last (f/f')-value in Newton iteration.
+  //
+  //    IN particular, if v is in the Newton zone of a root z^*, then z^* is
+  //       guaranteed to lie inside [v-del, v+del].
+  //
+  //    Note that this is dangerous unless you know that bf is already
+  //       in the Newton zone.  So we use the global N_STOP_ITER to
+  //       prevent infinite loop.
+
+  BigFloat newtonIterE(int prec, const BigFloat& bf, BigFloat& del, 
+	extLong& fuMSB, extLong& ffuMSB) {
+    // usually, prec is positive
+    int count = N_STOP_ITER; // upper bound on number of iterations
+    int stepsize = 1;
+    BigFloat val = bf;
+    unsigned long err = 0;
+
+    do {
+      val = newtonIterN(stepsize, val, del, err, fuMSB, ffuMSB);
+      count -= stepsize;
+      stepsize++; // heuristic
+    } while ((del != 0) && ((del.uMSB() >= -prec) && (count >0))) ;
+
+    if (count == 0) core_error("newtonIterE: reached count=0",
+		    	__FILE__, __LINE__, true);
+    del = BigFloat(core_abs(del.m()), err, del.exp() );
+    del.makeCeilExact();
+    return val;
+  }
+
+  //Another version of newtonIterE which avoids passing the uMSB's.
+  BigFloat newtonIterE(int prec, const BigFloat& bf, BigFloat& del){
+    extLong fuMSB=0, ffuMSB=0;
+    return newtonIterE(prec, bf, del, fuMSB, ffuMSB);
+  }
+  // A Smale bound which is an \'a posteriori condition. Applying 
+  // Newton iteration to any point z satisfying this condition we are 
+  // sure to converge to the nearest root in a certain interval of z.
+  // The condition is for all k >= 2,
+  //    | \frac{p^(k)(z)}{k!p'(z)} |^{1\(k-1)} < 1/8 * |\frac{p'(z)}{p(z)}|
+  // Note: code below has been streamlined (Chee)
+  /*
+    bool smaleBound(const Polynomial<NT> * p, BigFloat z){
+    int deg = p[0].getTrueDegree();
+    BigFloat max, temp, temp1, temp2;
+    temp2 = p[1].eval(z);
+    temp = core_abs(temp2/p[0].eval(z))/8;
+    BigInt fact_k = 2;
+    for(int k = 2; k <= deg; k++){
+      temp1 = core_abs(p[k].eval(z)/(fact_k*temp2)); 
+      if(k-1 == 2)
+	temp1 = sqrt(temp1);
+      else
+	temp1 = root(temp1, k-1);
+      if(temp1 >= temp) return false; 
+    }
+    return true;
+    }
+   */
+
+  //An easily computable Smale's point estimate for Newton as compared to the
+  //one above. The criterion is
+  //
+  // ||f||_{\infty} * \frac{|f(z)|}{|f'(z)|^2} 
+  //                * \frac{\phi'(|z|)^2}{\phi(|z|)}  < 0.03
+  // where
+  //           \phi(r) = \sum_{i=0}{m}r^i,
+  //           m = deg(f)
+  //
+  //It is given as Theorem B in [Smale86].
+  //Reference:- Chapter 8 in Complexity and Real Computation, by
+  //            Blum, Cucker, Shub and Smale
+  //
+  //For our implementation we calculate an upper bound on
+  //the second fraction in the inequality above.  For r>0,
+  //
+  //    \phi'(r)^2     m^2 (r^m + 1)^2
+  //     ---------  <  -------------------          (1)
+  //    \phi(r)        (r-1) (r^{m+1} - 1)
+  //
+  // Alternatively, we have
+  // 
+  //    \phi'(r)^2     (mr^{m+1} + 1)^2
+  //     ---------  <  -------------------          (2)
+  //    \phi(r)        (r-1)^3 (r^{m+1} - 1)
+  //
+  // The first bound is better when r > 1.
+  // The second bound is better when r << 1.
+  // Both bounds (1) and (2) assumes r is not equal to 1.
+  // When r=1, the exact value is
+  //
+  //    \phi'(r)^2     m^2 (m + 1)
+  //     ---------  =  -----------                  (3)
+  //    \phi(r)            4
+  // 
+  // REMARK: smaleBoundTest(z) actually computes an upper bound
+  // 	on alpha(f,z), and compares it to 0.02 (then our theory
+  // 	says that z is a robust approximate zero).
+  //
+  bool smaleBoundTest(const BigFloat& z){
+    CGAL_assertion(z.isExact());   // the bound only makes sense for exact z
+
+#ifdef CORE_DEBUG
+    std::cout <<"Computing Smale's bound = " <<  std::endl;
+#endif
+
+    if(seq[0].evalExactSign(z) == 0)// Reached the exact root.
+      return true;
+
+    BigFloat fprime = core_abs(seq[1].evalExactSign(z));
+    fprime.makeFloorExact();
+    if (fprime == 0) return false;  // z is a critical value!
+    BigFloat temp =        // evalExactSign(z) may have error.
+      core_abs(seq[0].evalExactSign(z));
+    temp = (temp.makeCeilExact()/power(fprime, 2)).makeCeilExact();
+    temp = temp*seq[0].height();  // remains exact
+    //Thus, temp >=  ||f||_{\infty} |\frac{f(z)}{f'(z)^2}|
+
+    int m = seq[0].getTrueDegree();    
+    BigFloat x = core_abs(z);
+    if (x==1)   // special case, using (3)
+	    return (temp * BigFloat(m*m*(m+1)).div2().div2() < 0.02);
+
+    BigFloat temp1;
+    if (x>1) { // use formula (1)
+      temp1 = power(m* (power(x, m)+1), 2);          // m^2*(x^m + 1)^2
+      temp1 /= ((x - 1)*(power(x, m+1) - 1));        // formula (1)
+    } else {  // use formula (2)
+      temp1 = power(m*(power(x, m+1) +1), 2);        // (m*x^{m+1} + 1)^2
+      temp1 /= (power(x - 1,3)*(power(x, m+1) -1));  // formula (2)
+    }
+
+#ifdef CORE_DEBUG
+    std::cout <<"Value returned by Smale bound = " << temp * temp1.makeCeilExact() << std::endl;
+#endif
+
+    if(temp * temp1.makeCeilExact() < 0.03)          // make temp1 exact!
+      return true;
+    else
+      return false;
+  }//smaleBoundTest
+
+
+  // yapsBound(p)
+  // 	returns a bound on size of isolating interval of polynomial p
+  // 	which is guaranteed to be in the Newton Zone.
+  //    N.B. p MUST be square-free
+  //
+  //   Reference: Theorem 6.37, p.184 of Yap's book
+  //   	   [Fundamental Problems of Algorithmic Algebra]
+
+  BigFloat yapsBound(const Polynomial<NT> & p) const {
+    int deg = p.getTrueDegree();
+    return  1/(1 + pow(BigFloat(deg), 3*deg+9)
+               *pow(BigFloat(2+p.height()),6*deg));
+  }
+
+  //newtonRefine(J, a) 
+  //
+  //    ASSERT(J is an isolating interval for some root x^*)
+  //
+  //    ASSERT(J.first and J.second are exact BigFloats)
+  //
+  //    Otherwise, the boundaries of the interval are not well defined.
+  //    We will return a refined interval with exact endpoints,
+  //    still called J, containing x^* and
+  //
+  // 			|J| < 2^{-a}.
+  //
+  // 	TO DO: write a version of newtonRefine(J, a, sign) where
+  // 	sign=J.first.sign(), since you may already know the sign
+  // 	of J.first.  This will skip the preliminary stuff in the
+  // 	current version.
+  //
+  BFInterval newtonRefine(BFInterval &J, int aprec) {
+
+#ifdef CORE_DEBUG_NEWTON
+std::cout << "In newtonRefine, input J=" << J.first
+	<< ", " << J.second << " precision = " << aprec << std::endl;
+#endif
+
+    if (len <= 0) return J;   // Nothing to do!  User must
+                               // check this possibility!
+      
+
+    if((J.second - J.first).uMSB() < -aprec){
+      return (J);
+    }
+    int xSign, leftSign, rightSign;
+
+    leftSign = sign(seq[0].evalExactSign(J.first));
+    if (leftSign == 0) {
+      J.second = J.first;
+      return J;
+    }
+
+    rightSign = sign(seq[0].evalExactSign(J.second));
+    if (rightSign == 0) {
+      J.first = J.second;
+      return J;
+    }
+
+    CGAL_assertion( leftSign * rightSign < 0 );
+
+    //N is number of times Newton is called without checking
+    // whether the result is still in the interval or not
+    #define NO_STEPS 2
+    // REMARK: NO_STEPS=1 is incorrect, as it may lead to
+    //      linear convergence (it is somewhat similar to Dekker-Brent's
+    //      idea of guaranteeing that bisection does not
+    //	    destroy the superlinear convergence of Newton.
+    int N = NO_STEPS;
+
+    BigFloat x, del, olddel, temp;
+    unsigned long err;
+    BigFloat yap = yapsBound(seq[0]);
+
+    BigFloat old_width = J.second - J.first;
+    x = (J.second + J.first).div2();
+
+    // initial estimate for the evaluation of filter to floating point precision
+    extLong fuMSB=54, ffuMSB=54;
+
+    //MAIN WHILE LOOP. We ensure that J always contains the root
+
+    while ( !smaleBoundTest(x) && 
+	    (J.second - J.first) > yap &&
+	   (J.second - J.first).uMSB() >= -aprec) {
+      x = newtonIterN(N, x, del, err, fuMSB, ffuMSB);
+      if ((del == 0)&&(NEWTON_DIV_BY_ZERO == false)) {  // reached exact root!
+        J.first = J.second = x;
+        return J;
+      }
+
+      BigFloat left(x), right(x);
+      if (del>0) {
+      	left -= del; right += del;
+      } else {
+      	left += del; right -= del;
+      }
+
+      // update interval
+      if ((left > J.first)&&(left <J.second)) {
+	  int lSign = sign(seq[0].evalExactSign(left));
+          if (lSign == leftSign)  // leftSign=sign of J.first
+            J.first = left;
+	  else if (lSign == 0) {
+            J.first = J.second = left;
+            return J;
+          } else {
+	    J.second = left;
+          }	
+      }
+      if ((right < J.second)&&(right >J.first)) {
+	  int rSign = sign(seq[0].evalExactSign(right));
+          if (rSign == rightSign)
+            J.second = right;
+	  else if (rSign == 0) {
+            J.first = J.second = right;
+            return J;
+          } else {
+            J.first = right;
+          }
+      }
+      BigFloat width = J.second - J.first;
+
+      //left and right are exact, since x is exact.
+      if (width*2 <= old_width && !NEWTON_DIV_BY_ZERO) {
+                                  // we can get a better root:
+
+	// No, it is not necessary to update x to
+	// the midpoint of the new interval J.
+	// REASON: basically, it is hard to be smarter than Newton's method!
+	// Newton might bring x very close to one endpoint, but it can be
+	// because the root is near there!  In any case,
+	// by setting x to the center of J, you only gain at most
+	// one bit of accuracy, but you stand to loose an
+	// arbitrary amount of bits of accuracy if you are unlucky!
+	// So I will comment out the next line.  --Chee (Aug 9, 2004).
+	// 
+	// x = (J.second + J.first).div2();
+	if (J.first > x || J.second < x)
+	  x = (J.second + J.first).div2();
+
+	old_width = width; // update width
+
+        N ++;      // be more confident or aggressive
+	           //  (perhaps we should double N)
+		   //
+      } else {// Either NEWTON_DIV_BY_ZERO=true
+	      // Or width has not decreased sufficiently
+	x = (J.second + J.first).div2();//Reset x to midpoint since it was the
+	                                //value from a failed Newton step
+	xSign = sign(seq[0].evalExactSign(x));
+	if (xSign == rightSign) {
+	  J.second = x;
+	} else if (xSign == leftSign) {
+	  J.first = x;
+	} else { // xSign must be 0
+	  J.first = J.second = x; return J;
+	}
+	x = (J.second + J.first).div2();
+
+	old_width = old_width.div2(); // update width
+	
+	// reduce value of N:
+	N = core_max(N-1, NO_STEPS);   // N must be at least NO_STEPS
+      }
+    }//MAIN WHILE LOOP
+
+    if((J.second - J.first).uMSB() >= -aprec){ // The interval J
+                    //still hasn't reached the required precision.
+                    //But we know the current value of x (call it x_0)
+		    //is in the strong Newton basin of the
+		    //root x^* (because it passes Smale's bound)
+      //////////////////////////////////////////////////////////////////
+      //Both x_0 and the root x^* are in the interval J.
+      //Let NB(x^*) be the strong Newton basin of x^*.  By definition,
+      //x_0 is in NB(x^*) means that:
+      //
+      //    x_0 is in NB(x^*) iff |x_n-x^*| \le 2^{-2^{n}+1} |x_0-x^*|
+      //    
+      // where x_n is the n-th iterate of Newton.  
+      //    
+      //  LEMMA 1: if x_0  \in NB(x^*) then 
+      //               |x_0 - x^*| <= 2|del|      (*)
+      //  and
+      //               |x_1 - x^*| <= |del|       (**)
+      //
+      //  where del = -f(x_0)/f'(x_0) and x_1 = x_0 + del
+      //Proof:
+      //Since x_0 is in the strong Newton basin, we have
+      //         |x_1-x^*| <= |x_0-x^*|/2.        (***)
+      //The bound (*) is equivalent to
+      //         |x_0-x^*|/2 <= |del|.
+      //This is equivalent to
+      //         |x_0-x^*| - |del| <= |x_0-x^*|/2,
+      //which follows from
+      //         |x_0-x^* + del| <= |x_0-x^*|/2,
+      //which is equivalent to (***).  
+      //The bound (**) follows from (*) and (***).
+      //QED
+      //
+      //  COMMENT: the above derivation refers to the exact values,
+      //  but what we compute is X_1 where X_1 is an approximation to
+      //  x_1.  However, let us write X_1 = x_0 - DEL, where DEL is
+      //  an approximation to del.  
+      //
+      //  LEMMA 2:  If |DEL| >= |del|,
+      //  then (**) holds with X_1 and DEL in place of x_1 and del.
+      //  
+      //  NOTE: We implemented this DEL in newtonIterE.   
+
+#ifdef CORE_DEBUG
+      std::cout << "Inside Newton Refine: Refining Part " << std::endl;
+
+      if((J.second - J.first) > yap)
+	std::cout << "Smales Bound satisfied " << std::endl;
+      else
+	std::cout << "Chees Bound satisfied " << std::endl;
+#endif
+      xSign = sign(seq[0].evalExactSign(x));
+      if(xSign == 0){
+	J.first = J.second = x; 
+	return J; // missing before!
+      }
+
+      //int k = clLg((-(J.second - J.first).lMSB() + aprec).asLong());
+      x = newtonIterE(aprec, x, del, fuMSB, ffuMSB);
+      xSign = sign(seq[0].evalExactSign(x));
+
+      if(xSign == leftSign){//Root is greater than x
+	J.first = x;
+	J.second = x + del;  // justified by Lemma 2 above
+      }else if(xSign == rightSign){//Root is less than x
+	J.first = x - del;   // justified by Lemma 2 above
+	J.second = x ;
+      }else{//x is the root
+	J.first = J.second = x;
+      }
+    }
+
+
+
+#ifdef CORE_DEBUG
+    std::cout << " Returning from Newton Refine: J.first = " << J.first
+	      << " J.second = " << J.second << " aprec = " << aprec
+	      << " Sign at the interval endpoints = " 
+	      << sign(seq[0].evalExactSign(J.first))
+	      << " : " << sign(seq[0].evalExactSign(J.second)) << " Err at starting = " 
+	      << J.first.err() << " Err at end = " << J.second.err() << std::endl;
+#endif
+
+    CGAL_assertion( (seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) <= 0) );
+
+#ifdef CORE_DEBUG_NEWTON
+    if (seq[0].evalExactSign(J.first) * seq[0].evalExactSign(J.second) > 0)
+      std::cout <<" ERROR! Root is not in the Interval " << std::endl;
+    if(J.second - J.first >  BigFloat(1).exp2(-aprec))
+      std::cout << "ERROR! Newton Refine failed to achieve the desired precision" << std::endl;
+#endif
+
+      return(J);
+ }//End of newton refine
+
+};// Sturm class
+
+// ==================================================
+// Static initialization
+// ==================================================
+template <class NT>
+int Sturm<NT>:: N_STOP_ITER = 10000;   // stop IterE after this many loops
+// Reset this as needed
+
+// ==================================================
+// Helper Functions 
+// ==================================================
+
+// isZeroIn(I):
+//          returns true iff 0 is in the closed interval I
+CORE_INLINE bool isZeroIn(BFInterval I) {
+	return ((I.first <= 0.0) && (I.second >= 0.0));
+}
+
+/////////////////////////////////////////////////////////////////
+//  DIAGNOSTIC TOOLS
+/////////////////////////////////////////////////////////////////
+// Polynomial tester:   P is polynomial to be tested
+//          prec is the bit precision for root isolation
+//          n is the number of roots predicted
+
+template<class NT>
+CORE_INLINE void testSturm(const Polynomial<NT>&P, int prec, int n = -1) {
+  Sturm<NT> Ss (P);
+  BFVecInterval v;
+  Ss.refineAllRoots(v, prec);
+  std::cout << "   Number of roots is " << v.size() <<std::endl;
+  if ((n >= 0) & (v.size() == (unsigned)n))
+    std::cout << " (CORRECT!)" << std::endl;
+  else
+    std::cout << " (ERROR!) " << std::endl;
+  int i = 0;
+  for (BFVecInterval::const_iterator it = v.begin();
+       it != v.end(); ++it) {
+    std::cout << ++i << "th Root is in ["
+    << it->first << " ; " << it->second << "]" << std::endl;
+  }
+}// testSturm
+
+// testNewtonSturm( Poly, aprec, n)
+//   will run the Newton-Sturm refinement to isolate the roots of Poly
+//         until absolute precision aprec.
+//   n is the predicated number of roots
+//      (will print an error message if n is wrong)
+template<class NT>
+CORE_INLINE void testNewtonSturm(const Polynomial<NT>&P, int prec, int n = -1) {
+  Sturm<NT> Ss (P);
+  BFVecInterval v;
+  Ss.newtonRefineAllRoots(v, prec);
+  std::cout << "   Number of roots is " << v.size();
+  if ((n >= 0) & (v.size() == (unsigned)n))
+    std::cout << " (CORRECT!)" << std::endl;
+  else
+    std::cout << " (ERROR!) " << std::endl;
+
+  int i = 0;
+  for (BFVecInterval::iterator it = v.begin();
+       it != v.end(); ++it) {
+    std::cout << ++i << "th Root is in ["
+    << it->first << " ; " << it->second << "]" << std::endl;
+    if(it->second - it->first <= (1/power(BigFloat(2), prec)))
+      std::cout << " (CORRECT!) Precision attained" << std::endl;
+    else
+      std::cout << " (ERROR!) Precision not attained" << std::endl;
+  }
+}// testNewtonSturm
+
+} //namespace CORE
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE_BigFloat.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_BigFloat.h
new file mode 100644
index 0000000..2488af7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE_BigFloat.h
@@ -0,0 +1,550 @@
+// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
+//============================================================================
+
+#ifndef CGAL_CORE_BIGFLOAT_H
+#define CGAL_CORE_BIGFLOAT_H
+
+#include <CGAL/basic.h>
+#include <CGAL/number_type_basic.h>
+#include <CGAL/CORE/BigFloat.h>
+#include <CGAL/CORE_coercion_traits.h>
+#include <CGAL/Interval_traits.h> 
+#include <CGAL/Bigfloat_interval_traits.h> 
+
+namespace CGAL {
+
+// ######### Interval_traits 
+
+template<> 
+class Interval_traits<CORE::BigFloat> 
+    : public internal::Interval_traits_base<CORE::BigFloat>{
+    typedef CORE::BigFloat Interval;
+public: 
+    typedef Interval_traits<CORE::BigFloat> Self; 
+    typedef CORE::BigFloat Type;
+    typedef CORE::BigFloat Bound;
+    typedef CGAL::Tag_true Is_interval; 
+    typedef CGAL::Tag_true Is_bigfloat_interval; 
+  
+ 
+    struct Lower :public std::unary_function<Interval,Bound>{
+        Bound operator() ( Interval x ) const {   
+            CORE::BigFloat result = ::CORE::BigFloat(x.m()-x.err(),0,x.exp());
+            CGAL_postcondition(result <= x);
+            return result; 
+        }
+    };
+    
+    struct Upper :public std::unary_function<Interval,Bound>{
+        Bound operator() ( Interval x ) const {     
+            CORE::BigFloat result = ::CORE::BigFloat(x.m()+x.err(),0,x.exp());
+            CGAL_postcondition(result >= x);
+            return result; 
+        }
+    };
+
+    struct Width :public std::unary_function<Interval,Bound>{
+         
+        Bound operator() ( Interval x ) const {    
+            unsigned long err = 2*x.err();
+            return Bound(CORE::BigInt(err),0,x.exp());
+        }
+    };
+
+    struct Median :public std::unary_function<Interval,Bound>{
+         
+        Bound operator() ( Interval x ) const {   
+            return Bound(x.m(),0,x.exp());
+        }
+    };
+
+    struct Norm :public std::unary_function<Interval,Bound>{
+        Bound operator() ( Interval x ) const {
+          BOOST_USING_STD_MAX();
+          return max BOOST_PREVENT_MACRO_SUBSTITUTION (Upper()(x).abs(),Lower()(x).abs());
+        }
+    };
+    
+    struct Zero_in :public std::unary_function<Interval,bool>{
+        bool operator() ( Interval x ) const {      
+            return x.isZeroIn(); 
+        }
+    };
+
+    struct In :public std::binary_function<Bound,Interval,bool>{  
+        bool operator()( Bound x, const Interval& a ) const {    
+            CGAL_precondition(CGAL::singleton(x));
+            return (Lower()(a) <= x && x <= Upper()(a));
+        }
+    };
+
+    struct Equal :public std::binary_function<Interval,Interval,bool>{  
+        bool operator()( const Interval& a, const Interval& b ) const { 
+            return (Upper()(a) == Upper()(b) &&  Lower()(a) == Lower()(b));
+        }
+    };
+    
+    struct Subset :public std::binary_function<Interval,Interval,bool>{  
+        bool operator()( const Interval& a, const Interval& b ) const {   
+            return Lower()(b) <= Lower()(a) && Upper()(a) <= Upper()(b);
+        }
+    };
+    
+    struct Proper_subset :public std::binary_function<Interval,Interval,bool>{ 
+        bool operator()( const Interval& a, const Interval& b ) const { 
+            return Subset()(a,b) && (!Equal()(a,b));
+        }
+    };
+    
+    struct Intersection :public std::binary_function<Interval,Interval,Interval>{ 
+      Interval operator()( const Interval& a, const Interval& b ) const {
+            BOOST_USING_STD_MAX();
+            BOOST_USING_STD_MIN();
+            // std::cout <<"a= (" << a.m() << "+-" << a.err() << ")*2^" << a.exp() << std::endl;
+            Bound l(max BOOST_PREVENT_MACRO_SUBSTITUTION (Lower()(a),Lower()(b)));
+            Bound u(min BOOST_PREVENT_MACRO_SUBSTITUTION (Upper()(a),Upper()(b)));
+
+            if(u < l ) throw Exception_intersection_is_empty();
+            return Construct()(l,u);
+        }
+    };
+ 
+
+    struct Overlap :public std::binary_function<Interval,Interval,bool>{
+        bool operator() ( Interval x, Interval y ) const {       
+            Self::Zero_in Zero_in;
+            bool result = Zero_in(x-y);
+            return result;
+        }
+    };
+   
+    struct Hull :public std::binary_function<Interval,Interval,Interval>{
+
+      // for debugging
+/*      void print_bf(CORE::BigFloat bf, std::string s) const {
+        
+        std::cout << s << ".m()=" << bf.m() << ","
+                  << s << ".err()=" << bf.err() << ","
+                  << s << ".exp()=" << bf.exp() << ","
+                  << "td=" << bf << std::endl;
+      }
+*/
+
+        Interval operator() ( Interval x, Interval y ) const {
+            BOOST_USING_STD_MAX();
+            BOOST_USING_STD_MIN();
+#if 0
+            // this is not possible since CORE::centerize has a bug.
+            Interval result = CORE::centerize(x,y);
+#else 
+
+            //print_bf(x,"x");
+            //print_bf(y,"y");
+            
+             CORE::BigFloat result;
+             
+            // Unfortunately, CORE::centerize(x,y) has bugs. 
+            if ((x.m() == y.m()) && (x.err() == y.err()) && (x.exp() == y.exp())) { 
+                return x;
+            }
+                         
+            CORE::BigFloat lower = min BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::lower(x), CGAL::lower(y));
+            CORE::BigFloat upper = max BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::upper(x), CGAL::upper(y));
+
+            CORE::BigFloat mid = (lower + upper)/2;
+             
+            //print_bf(lower,"lower");
+            //print_bf(upper,"upper");
+            //print_bf(mid,"mid");
+
+            // Now we have to compute the error. The problem is that .err() is just a long
+            CORE::BigFloat err = (upper - lower)/CORE::BigFloat(2);
+                   
+            //print_bf(err,"err");
+
+            //std::cout << "lower    " << lower << std::endl;
+            //std::cout << "upper    " << upper << std::endl;
+            //std::cout << "mid      " << mid << std::endl;
+            //std::cout << "err I    " << err << std::endl;
+            
+            // shift such that err.m()+err.err() fits into long 
+            int digits_long = std::numeric_limits<long>::digits;
+            if(::CORE::bitLength(err.m()+err.err()) >= digits_long){
+                long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ; 
+                //std::cout << "shift " << shift<< std::endl;
+                long new_err = ((err.m()+err.err()) >> shift).longValue()+1; 
+                err = CORE::BigFloat(0,new_err,0) * CORE::BigFloat::exp2(err.exp()*CORE::CHUNK_BIT+shift);
+            }else{           
+                err = CORE::BigFloat(0,err.m().longValue()+err.err(),err.exp());
+            }
+            //print_bf(err,"new_err");
+
+            // TODO: This is a workaround for a bug in operator+ 
+            // of CORE::Bigfloat. If the exponent difference is too big,
+            // this might cause problems, since the error is a long
+            if(mid.exp() > err.exp()) {
+                long mid_err = mid.err();
+                CORE::BigInt mid_m = mid.m();
+                mid_err = mid_err << (mid.exp()-err.exp())*CORE::CHUNK_BIT;
+                mid_m = mid_m << (mid.exp()-err.exp())*CORE::CHUNK_BIT;
+                mid = CORE::BigFloat(mid_m,mid_err,err.exp());
+                //print_bf(mid,"corr_mid");
+            }
+            
+            //print_bf(result,"result");        
+
+            result = mid + err;  
+             
+#endif 
+
+            CGAL_postcondition( 
+                    CGAL::lower(result) 
+                    <=  min BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::lower(x), CGAL::lower(y)));
+            CGAL_postcondition( 
+                    CGAL::upper(result) 
+                    >= max BOOST_PREVENT_MACRO_SUBSTITUTION (CGAL::upper(x), CGAL::upper(y)));
+
+            
+
+            return result ;
+        }
+    };
+
+    struct Singleton :public std::unary_function<Interval,bool> {
+        bool operator() ( Interval x ) const {       
+            return (x.err() == 0); 
+        }
+    };
+
+    struct Construct :public std::binary_function<Bound,Bound,Interval>{
+        Interval operator()( const Bound& l,const Bound& r) const {
+            CGAL_precondition( l < r ); 
+            return Hull()(l,r);
+        }
+    };
+};
+
+
+// ########### Bigfloat_interval_traits 
+
+
+// template<typename BFI> long relative_precision(BFI bfi);
+namespace internal{
+
+CORE::BigFloat 
+inline 
+round(const CORE::BigFloat& x, long rel_prec = CORE::get_static_defRelPrec().toLong() ){
+    CGAL_postcondition(rel_prec >= 0);   
+
+    // since there is not rel prec defined if Zero_in(x)
+    if (x.isZeroIn()) return x; 
+    // if (CGAL::get_significant_bits(x) <= rel_prec) return x;
+   
+// if 1 
+//    CORE::BigFloat xr;
+//    xr.approx(x,rel_prec,1024);
+//    typedef CORE::BigFloat BF; 
+// else       
+    typedef CORE::BigFloat BF; 
+    BF xr;
+   
+    CORE::BigInt m = x.m();
+    long         err = x.err();
+    long         exp = x.exp(); 
+   
+
+//    std::cout <<"(" << m << "+-" <<err << ")*2^"<<(CORE::CHUNK_BIT*exp) << std::endl; 
+//    if (err != 0) 
+//      std::cout <<"current prec: " <<  CGAL::relative_precision(x) << std::endl;
+//    else 
+//      std::cout <<"current prec: " << " SINGLETON " << std::endl;
+//    std::cout <<"desired prec: " << rel_prec << std::endl; 
+//    std::cout <<"bitLength: " << CORE::bitLength(m) << std::endl; 
+//    long shift = ::CORE::bitLength(m) - rel_prec - 1;
+   
+    long shift ;
+    if (err == 0)
+      shift = ::CORE::bitLength(m) - rel_prec - 3;
+    else      
+      shift = CGAL::relative_precision(x) - rel_prec -1; 
+    
+    if( shift > 0 ){    
+      m   >>= shift ; 
+      err >>= shift; 
+      xr = BF(m,err+1,0)*BF::exp2(exp*CORE::CHUNK_BIT+shift);     
+    }else{    // noting to do
+        xr = x; 
+    }
+
+//    std::cout <<"(" <<m << "+-" <<err+1 << ")*2^"<<(CORE::CHUNK_BIT*exp) << std::endl; 
+//    if (xr.err() != 0) 
+//      std::cout <<"current prec: " <<  CGAL::relative_precision(xr) << std::endl;
+//    else 
+//      std::cout <<"current prec: " << " SINGLETON "<< std::endl;
+//    std::cout <<"desired prec: " << rel_prec << std::endl; 
+    
+// endif     
+    CGAL_postcondition(singleton(xr) || CGAL::relative_precision(xr) - rel_prec >= 0); 
+    CGAL_postcondition(singleton(xr) || CGAL::relative_precision(xr) - rel_prec <= 32);   
+    CGAL_postcondition(BF(xr.m()-xr.err(),0,xr.exp()) <= BF(x.m()-x.err(),0,x.exp()));
+    CGAL_postcondition(BF(xr.m()+xr.err(),0,xr.exp()) >= BF(x.m()+x.err(),0,x.exp()));
+    return xr;     
+}
+}
+
+template<> class Bigfloat_interval_traits<CORE::BigFloat> 
+:public Interval_traits<CORE::BigFloat>
+{
+
+    typedef CORE::BigFloat NT;
+    typedef CORE::BigFloat BF;
+public:
+  typedef Bigfloat_interval_traits<NT> Self;
+  
+   struct Relative_precision {
+        // type for the \c AdaptableUnaryFunction concept.
+        typedef NT  argument_type;
+        // type for the \c AdaptableUnaryFunction concept.
+        typedef long  result_type;
+
+        long operator()( NT x) const { 
+          CGAL_precondition(!Singleton()(x));
+          CGAL_precondition(!CGAL::zero_in(x));
+          
+          x = x.abs();
+          NT w = Width()(x);
+          w /= ::CORE::BigFloat(x.m()-x.err(),0,x.exp());    
+          w = w.abs();
+          return -(CORE::ceilLg(w.m()+w.err())+w.exp()*CORE::CHUNK_BIT);
+        }
+    };
+       
+    struct Set_precision {
+        // type for the \c AdaptableUnaryFunction concept.
+        typedef long  argument_type;
+        // type for the \c AdaptableUnaryFunction concept.
+        typedef long  result_type;  
+     
+        long operator() ( long prec ) const {    
+            long result =  ::CORE::get_static_defRelPrec().toLong();
+            ::CORE::get_static_defRelPrec() = prec; 
+            ::CORE::get_static_defBFdivRelPrec() = prec;
+            return result; 
+        }
+    };
+     
+    struct Get_precision {
+        // type for the \c AdaptableGenerator concept.
+        typedef long  result_type;  
+     
+        long operator() () const {
+            return  ::CORE::get_static_defRelPrec().toLong(); 
+        }
+    };
+};
+
+
+
+
+//
+// Algebraic structure traits
+//
+template <> class Algebraic_structure_traits< CORE::BigFloat >
+  : public Algebraic_structure_traits_base< CORE::BigFloat,
+                                            Field_with_kth_root_tag >  {
+  public:
+    typedef Tag_false          Is_exact;
+    typedef Tag_true           Is_numerical_sensitive;
+
+    class Sqrt
+      : public std::unary_function< Type, Type > {
+      public:
+        Type operator()( const Type& x ) const {
+            // What I want is a sqrt computed with 
+            // ::CORE::get_static_defRelPrec() bits.
+            // And not ::CORE::defBFsqrtAbsPrec as CORE does. 
+            
+            CGAL_precondition(::CORE::get_static_defRelPrec().toLong() > 0);
+            CGAL_precondition(x > 0);
+            
+            Type a = CGAL::internal::round(
+              x, ::CORE::get_static_defRelPrec().toLong()*2);
+            CGAL_postcondition(a > 0); 
+
+            Type tmp1 = CORE::BigFloat(
+                a.m(),0,0).sqrt(::CORE::get_static_defRelPrec().toLong());
+            Type err  =  
+                Type(0,long(std::sqrt(double(a.err()))),0) 
+                * CORE::BigFloat::exp2(a.exp()*7);
+            Type result = tmp1*CORE::BigFloat::exp2(a.exp()*7) + err;
+           
+            CGAL_postcondition(result >= 0);
+            CGAL_postcondition(CGAL::lower(result*result) <= CGAL::lower(x));
+            CGAL_postcondition(CGAL::upper(result*result) >= CGAL::upper(x));
+
+            return result;
+        }
+    };
+
+    class Kth_root
+      : public std::binary_function<int, Type, Type> {
+      public:
+        Type operator()( int k,
+                                        const Type& x) const {
+            CGAL_precondition_msg( k > 0, "'k' must be positive for k-th roots");
+            // CORE::radical isn't implemented for negative values of x, so we
+            //  have to handle this case separately
+            if( x < 0 && k%2 != 0) {
+              return Type(-CORE::radical( -x, k ) );
+            }
+
+            return Type( CORE::radical( x, k ) );
+        }
+    };
+};
+
+//
+// Real embeddable traits
+//
+template <> class Real_embeddable_traits< CORE::BigFloat >
+  : public INTERN_RET::Real_embeddable_traits_base< CORE::BigFloat , CGAL::Tag_true  > {
+  public:
+    class Abs
+      : public std::unary_function< Type, Type > {
+      public:
+        Type operator()( const Type& x ) const {
+            Type result; 
+          
+            if(x.isZeroIn()){
+                CORE::BigInt m; 
+                if(x.m() < 0 ){
+                    m = -(x.m()-x.err());
+                }else{
+                    m =  x.m()+x.err();
+                }
+                if(m % 2 == 1) m += 1;
+                
+                Type upper(m,0,x.exp());
+                result = CORE::centerize(CORE::BigFloat(0),upper);
+                
+                CGAL_postcondition(result.m()-result.err() <= 0); 
+                if(result.m()-result.err() != 0){
+                    result = this->operator()(result);
+                }
+                CGAL_postcondition(result.m()-result.err() == 0); 
+            }else{
+                result = CORE::abs(x);
+            }
+            CGAL_postcondition(result.m()-result.err() >= 0); 
+            CGAL_postcondition(Type(result.m()+result.err(),0,result.exp()) 
+                         >= Type(x.m()+x.err(),0,x.exp()));       
+            return result;
+        }
+    };
+
+    class Sgn
+      : public std::unary_function< Type, ::CGAL::Sign > {
+      public:
+        ::CGAL::Sign operator()( const Type& x ) const {
+            ::CGAL::Sign result =  sign( x.sign());
+            return result; 
+        }
+    };
+
+    class Compare
+      : public std::binary_function< Type, Type,
+                                Comparison_result > {
+      public:
+        Comparison_result operator()( const Type& x,
+                                            const Type& y ) const {
+          return (Comparison_result) sign( (x-y).sign());
+        }
+        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type, 
+                Comparison_result )
+    };
+
+    class To_double
+      : public std::unary_function< Type, double > {
+      public:
+        double operator()( const Type& x ) const {
+          // this call is required to get reasonable values for the double
+          // approximation
+          return x.doubleValue();
+        }
+    };
+
+    class To_interval
+      : public std::unary_function< Type, std::pair< double, double > > {
+    public:
+        std::pair<double, double> operator()( const Type& x ) const {
+                        
+            double lb,ub;
+           
+            Type x_lower = CGAL::lower(CGAL::internal::round(CGAL::lower(x),50));
+            Type x_upper = CGAL::upper(CGAL::internal::round(CGAL::upper(x),50));
+            
+            // since matissa has 50 bits only, conversion to double is exact 
+            lb = x_lower.doubleValue();
+            CGAL_postcondition(lb == x_lower);
+            ub = x_upper.doubleValue();
+            CGAL_postcondition(ub == x_upper);             
+            
+            std::pair<double, double> result(lb,ub);
+            CGAL_postcondition( result.first  <=  CORE::Expr(CGAL::lower(x)));
+            CGAL_postcondition( result.second >=  CORE::Expr(CGAL::upper(x)));
+            return result;      
+        }
+    };
+};
+
+} //namespace CGAL
+
+//since types are included by CORE_coercion_traits.h:
+#include <CGAL/CORE_Expr.h>
+#include <CGAL/CORE_BigInt.h>
+#include <CGAL/CORE_BigRat.h>
+#include <CGAL/CORE_BigFloat.h>
+#include <CGAL/CORE_arithmetic_kernel.h>
+
+namespace Eigen {
+  template<class> struct NumTraits;
+  template<> struct NumTraits<CORE::BigFloat>
+  {
+    typedef CORE::BigFloat Real;
+    typedef CORE::BigFloat NonInteger;
+    typedef CORE::BigFloat Nested;
+
+    static inline Real epsilon() { return 0; }
+    static inline Real dummy_precision() { return 0; }
+
+    enum {
+      IsInteger = 0,
+      IsSigned = 1,
+      IsComplex = 0,
+      RequireInitialization = 1,
+      ReadCost = 6,
+      AddCost = 60,
+      MulCost = 60
+    };
+  };
+}
+
+#endif // CGAL_CORE_BIGFLOAT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_BigInt.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_BigInt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CORE_BigInt.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CORE_BigInt.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_BigRat.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_BigRat.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CORE_BigRat.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CORE_BigRat.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_Expr.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_Expr.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CORE_Expr.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CORE_Expr.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_algebraic_number_traits.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_algebraic_number_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CORE_algebraic_number_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CORE_algebraic_number_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/CORE_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/CORE_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/CORE_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/CORE_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/CORE_coercion_traits.h
new file mode 100644
index 0000000..d1ebbc6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/CORE_coercion_traits.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
+
+
+#ifndef CGAL_CORE_COERCION_TRAITS_H
+#define CGAL_CORE_COERCION_TRAITS_H 1
+
+#include <CGAL/number_type_basic.h>
+
+#ifdef CGAL_USE_CORE
+
+#ifndef CORE_LEVEL
+#define CORE_LEVEL 4
+#endif
+
+#include <CGAL/CORE/CORE.h>
+
+//#include <NiX/Coercion_traits.h>
+
+namespace CGAL {
+
+//CORE internal coercions:
+
+
+// The following definitions reflect the interaction of the CORE number types
+// with the built in types,
+// CORE BigInt:
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,::CORE::BigInt)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,::CORE::BigInt)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,::CORE::BigInt)
+
+
+// CORE BigRat:
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::BigRat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::BigRat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::BigRat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::BigRat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::BigRat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigInt,::CORE::BigRat)
+
+// CORE Expr:
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigInt,::CORE::Expr)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(::CORE::BigRat,::CORE::Expr)
+
+
+
+// NOTE that CORE::BigFloat counts as an interval ! 
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short         ,::CORE::BigFloat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int           ,::CORE::BigFloat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long          ,::CORE::BigFloat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float         ,::CORE::BigFloat)
+    CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double        ,::CORE::BigFloat)
+
+template <> 
+struct Coercion_traits<CORE::BigFloat , ::CORE::BigInt>{
+    typedef Tag_true  Are_explicit_interoperable;
+    typedef Tag_false Are_implicit_interoperable;
+    typedef CORE::BigFloat Type;
+    
+    struct Cast{
+        typedef Type result_type;
+        Type operator()(const CORE::BigFloat& x)  const { return x;}
+        Type operator()(const ::CORE::BigInt x) const {
+            CORE::BigFloat result;
+            result.approx(x,CORE::get_static_defRelPrec().toLong(),LONG_MAX);
+            // Do not use MakeFloorExact as it changes the Bigfloat
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
+            return result; 
+        }
+    };
+};
+
+template <> 
+struct Coercion_traits<CORE::BigFloat , ::CORE::BigRat>{
+    typedef Tag_true  Are_explicit_interoperable;
+    typedef Tag_false Are_implicit_interoperable;
+    typedef CORE::BigFloat Type;
+    
+    struct Cast{
+        typedef Type result_type;
+        Type operator()(const CORE::BigFloat& x)  const { return x;}
+        Type operator()(const ::CORE::BigRat x) const {
+            
+	  CORE::BigFloat result(x,CORE::get_static_defRelPrec().toLong(),LONG_MAX);
+            // Do not use MakeFloorExact as it changes the Bigfloat
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
+            return result; 
+        }
+    };
+};
+
+template <> 
+struct Coercion_traits<CORE::BigFloat , ::CORE::Expr>{
+    typedef Tag_true  Are_explicit_interoperable;
+    typedef Tag_false Are_implicit_interoperable;
+    typedef CORE::BigFloat Type;
+    
+    struct Cast{
+        typedef Type result_type;
+        Type operator()(const CORE::BigFloat& x)  const { return x;}
+        Type operator()(const ::CORE::Expr x) const {
+            CORE::BigFloat result(x, CORE::get_static_defRelPrec().toLong(),LONG_MAX);
+            // Do not use MakeFloorExact as it changes the Bigfloat
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()-result.err(),0,result.exp())) <= x );
+            CGAL_postcondition( ::CORE::BigRat(::CORE::BigFloat(result.m()+result.err(),0,result.exp())) >= x );
+            return result; 
+        }
+    };
+};
+
+template <> struct Coercion_traits< ::CORE::BigInt, CORE::BigFloat >
+    :public Coercion_traits< CORE::BigFloat , ::CORE::BigInt >{}; 
+
+template <> struct Coercion_traits< ::CORE::BigRat, CORE::BigFloat >
+    :public Coercion_traits< CORE::BigFloat , ::CORE::BigRat >{}; 
+
+template <> struct Coercion_traits< ::CORE::Expr, CORE::BigFloat >
+    :public Coercion_traits< CORE::BigFloat , ::CORE::Expr>{};        
+        
+
+
+
+
+
+// not provieded by CORE
+// Note that this is not symmetric to LEDA
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigInt)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigRat)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::BigRat)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::BigFloat)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::BigFloat)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long  ,::CORE::Expr)
+//CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long double,::CORE::Expr)
+
+} //namespace CGAL
+
+#endif // CGAL_USE_CORE
+#endif //CGAL_CORE_COERCION_TRAITS_H 1
+//EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cache.h b/3rdparty/CGAL-4.8/include/CGAL/Cache.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cache.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cache.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_rep_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_rep_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_rep_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_rep_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_rep_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_rep_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Aff_transformation_rep_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Aff_transformation_rep_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Cartesian_base.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Cartesian_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Cartesian_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Cartesian_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_2.h
new file mode 100644
index 0000000..70ccd71
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_2.h
@@ -0,0 +1,82 @@
+// Copyright (c) 1997-2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_CIRCLE_2_H
+#define CGAL_CARTESIAN_CIRCLE_2_H
+
+#include <CGAL/Cartesian/predicates_on_points_2.h>
+#include <boost/tuple/tuple.hpp>
+
+namespace CGAL {
+
+template <class R_ >
+class CircleC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::RT                   RT;
+  typedef typename R_::Circle_2             Circle_2;
+  typedef typename R_::Point_2              Point_2;
+
+  typedef boost::tuple<Point_2, FT, Orientation>   Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  CircleC2() {}
+
+  explicit CircleC2(const Point_2 &center, const FT &squared_radius = FT(0),
+           const Orientation &orient = COUNTERCLOCKWISE) // Is this new?
+  {
+    CGAL_kernel_precondition( ( squared_radius >= FT(0) ) &
+                              ( orient    != COLLINEAR) );
+
+    base = Rep(center, squared_radius, orient);
+  }
+ 
+  bool           operator==(const CircleC2 &s) const;
+  bool           operator!=(const CircleC2 &s) const;
+
+  const Point_2 & center() const
+  {
+    return get_pointee_or_identity(base).template get<0>();
+  }
+
+  const FT & squared_radius() const
+  {
+    return get_pointee_or_identity(base).template get<1>();
+  }
+
+  Orientation orientation() const
+  {
+    return get_pointee_or_identity(base).template get<2>();
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_3.h
new file mode 100644
index 0000000..f7b4a10
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Circle_3.h
@@ -0,0 +1,299 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s)     : Monique Teillaud, Pedro Machado, Sebastien Loriot
+
+#ifndef CGAL_CARTESIAN_CIRCLEC3_H
+#define CGAL_CARTESIAN_CIRCLEC3_H
+
+#include <CGAL/Interval_nt.h>
+
+namespace CGAL {
+
+template <class R_ >
+class CircleC3 {
+  typedef typename R_::Sphere_3                 Sphere_3;
+  typedef typename R_::Plane_3                  Plane_3;
+  typedef typename R_::Point_3                  Point_3;
+  typedef typename R_::Vector_3                 Vector_3;
+  typedef typename R_::Direction_3              Direction_3;
+  typedef typename R_::FT                       FT;
+
+  typedef std::pair<Sphere_3, Plane_3>             Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+  Base base;  
+
+public:
+  typedef R_                                     R;
+
+  CircleC3() {}
+
+  CircleC3(const Point_3& center, const FT& squared_r, const Direction_3& d)
+  {
+    CGAL_kernel_assertion(squared_r >= FT(0));
+    // non-degenerated Direction
+    CGAL_kernel_assertion((d.dx() != FT(0)) || (d.dy() != FT(0)) || (d.dz() != FT(0)));
+    base = Rep(Sphere_3(center,squared_r),
+                plane_from_point_direction(center, d));
+  }
+
+  CircleC3(const Point_3& center, const FT& squared_r, const Vector_3& normal) 
+  {
+    CGAL_kernel_assertion(squared_r >= FT(0));
+    // non-degenerated Vector
+    CGAL_kernel_assertion((normal.x() != FT(0)) ||
+                          (normal.y() != FT(0)) ||
+                          (normal.z() != FT(0)));
+    base = Rep(Sphere_3(center,squared_r),
+                Plane_3(center, normal.direction()));
+  }
+
+  CircleC3(const Point_3& center, const FT& squared_r, const Plane_3& p)
+  {
+    // the plane contains the center and it is not degenerate
+    CGAL_kernel_assertion(!R().is_degenerate_3_object()(p));
+    CGAL_kernel_assertion((p.a() * center.x() +
+                           p.b() * center.y() +
+                           p.c() * center.z() +
+                           p.d()) == CGAL::ZERO);
+    CGAL_kernel_assertion(squared_r >= FT(0));
+    base = Rep(Sphere_3(center,squared_r), p);
+  }
+
+  CircleC3(const Sphere_3 &s1, const Sphere_3 &s2) {
+    Object obj = R().intersect_3_object()(s1, s2);
+    // s1,s2 must intersect
+    CGAL_kernel_precondition(!(obj.is_empty()));
+    const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
+    if(circle_ptr!=NULL)
+      base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
+    else {
+      const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
+      CGAL_kernel_precondition(point!=NULL);
+      CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
+      base = Rep(circle.diametral_sphere(), circle.supporting_plane());
+    }
+  }
+
+  CircleC3(const Plane_3 &p, const Sphere_3 &s, int) : base(s, p) {}
+
+  CircleC3(const Plane_3 &p, const Sphere_3 &s) {
+    Object obj = R().intersect_3_object()(p, s);
+    // s1,s2 must intersect
+    CGAL_kernel_precondition(!(obj.is_empty()));
+    const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
+    if(circle_ptr!=NULL)
+      base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
+    else {
+      const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
+      CGAL_kernel_precondition(point!=NULL);
+      CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
+      base = Rep(circle.diametral_sphere(), circle.supporting_plane());
+    }
+  }
+
+  CircleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) {
+	  // p, q, r are not collinear
+	  CGAL_kernel_precondition(!R().collinear_3_object()(p, q, r));
+		Plane_3 p1 = R().construct_plane_3_object()(p, q, r);
+    Plane_3 p2 = R().construct_bisector_3_object()(p, q);
+    Plane_3 p3 = R().construct_bisector_3_object()(p, r);
+    Object obj = R().intersect_3_object()(p1, p2, p3);
+    // must be a point, otherwise they are collinear
+    const Point_3& center=*object_cast<Point_3>(&obj);
+		FT sqr = R().compute_squared_distance_3_object()(center, r);
+		Sphere_3 s = R().construct_sphere_3_object()(center, sqr);
+		base = Rep(s, p1);
+  }
+
+  const Plane_3& supporting_plane() const
+  {
+    return get_pointee_or_identity(base).second;
+  }
+
+  const Sphere_3& supporting_sphere() const
+  {
+    return diametral_sphere();
+  }
+
+  Point_3 center() const
+  {
+    return diametral_sphere().center();
+  }
+
+  FT squared_radius() const
+  {
+    return diametral_sphere().squared_radius();
+  }
+
+  const Sphere_3& diametral_sphere() const
+  {
+    return get_pointee_or_identity(base).first;
+  }
+
+  double approximate_area() const
+  {
+    return CGAL_PI * to_double(squared_radius());
+  }
+
+  double approximate_squared_length() const
+  {
+    return CGAL_PI * CGAL_PI * 4.0 * to_double(squared_radius());
+  }
+
+  FT area_divided_by_pi() const
+  {
+    return squared_radius();
+  }
+
+  FT squared_length_divided_by_pi_square() const
+  {
+    return 4 * squared_radius();
+  }
+
+  // this bbox function
+  // can be optimize by doing different cases
+  // for each variable = 0 (cases with is_zero)
+  CGAL::Bbox_3 bbox() const
+  {
+    typedef CGAL::Interval_nt<false> Interval;
+    CGAL::Interval_nt<false>::Protector ip;
+    const Sphere_3 &s = diametral_sphere();
+    const FT &sq_r = s.squared_radius();
+    const Point_3 &p = s.center();
+    if(sq_r == FT(0)) return p.bbox();
+    const Plane_3 &plane = supporting_plane();
+    const Interval a = CGAL::to_interval(plane.a());
+    const Interval b = CGAL::to_interval(plane.b());
+    const Interval c = CGAL::to_interval(plane.c());
+    const Interval x = CGAL::to_interval(p.x());
+    const Interval y = CGAL::to_interval(p.y());
+    const Interval z = CGAL::to_interval(p.z());
+    const Interval r2 = CGAL::to_interval(sq_r);
+    const Interval r = CGAL::sqrt(r2); // maybe we can work with r2
+                                       // in order to save this operation
+                                       // but if the coefficients are to high
+                                       // the multiplication would lead to inf
+                                       // results
+    const Interval a2 = CGAL::square(a);
+    const Interval b2 = CGAL::square(b);
+    const Interval c2 = CGAL::square(c);
+    const Interval sqr_sum = a2 + b2 + c2;
+    const Interval mx = r * CGAL::sqrt((sqr_sum - a2)/sqr_sum);
+    const Interval my = r * CGAL::sqrt((sqr_sum - b2)/sqr_sum);
+    const Interval mz = r * CGAL::sqrt((sqr_sum - c2)/sqr_sum);
+    return CGAL::Bbox_3((x-mx).inf(),(y-my).inf(),(z-mz).inf(),
+                        (x+mx).sup(),(y+my).sup(),(z+mz).sup());
+  }
+
+  bool operator==(const CircleC3 &) const;
+  bool operator!=(const CircleC3 &) const;
+
+  bool has_on(const Point_3 &p) const;
+  bool has_on_bounded_side(const Point_3 &p) const;
+  bool has_on_unbounded_side(const Point_3 &p) const;
+  Bounded_side bounded_side(const Point_3 &p) const;
+
+  bool is_degenerate() const
+  {
+    return diametral_sphere().is_degenerate();
+  }
+
+};
+
+template < class R >
+inline
+bool
+CircleC3<R>::
+has_on(const typename CircleC3<R>::Point_3 &p) const
+{
+  return R().has_on_3_object()(diametral_sphere(),p) &&
+         R().has_on_3_object()(supporting_plane(),p);
+}
+
+template < class R >
+inline
+bool
+CircleC3<R>::
+has_on_bounded_side(const typename CircleC3<R>::Point_3 &p) const
+{
+  CGAL_kernel_precondition(R().has_on_3_object()(supporting_plane(), p));
+  return squared_distance(center(),p) < squared_radius();
+}
+
+template < class R >
+inline
+bool
+CircleC3<R>::
+has_on_unbounded_side(const typename CircleC3<R>::Point_3 &p) const
+{
+  CGAL_kernel_precondition(R().has_on_3_object()(supporting_plane(), p));
+  return squared_distance(center(),p) > squared_radius();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+Bounded_side
+CircleC3<R>::
+bounded_side(const typename CircleC3<R>::Point_3 &p) const
+{
+  CGAL_kernel_precondition(is_degenerate() || R().has_on_3_object()(supporting_plane(), p));
+  return diametral_sphere().bounded_side(p);
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+CircleC3<R>::operator==(const CircleC3<R> &t) const
+{
+  if (CGAL::identical(base, t.base))
+    return true;
+  if(!(center() == t.center() &&
+       squared_radius() == t.squared_radius())) return false;
+
+  const typename R::Plane_3 p1 = supporting_plane();
+  const typename R::Plane_3 p2 = t.supporting_plane();
+
+  if(is_zero(p1.a())) {
+    if(!is_zero(p2.a())) return false;
+    if(is_zero(p1.b())) {
+      if(!is_zero(p2.b())) return false;
+      return p1.c() * p2.d() == p1.d() * p2.c();
+    }
+    return (p2.c() * p1.b() == p1.c() * p2.b()) &&
+           (p2.d() * p1.b() == p1.d() * p2.b());
+  }
+  return (p2.b() * p1.a() == p1.b() * p2.a()) &&
+         (p2.c() * p1.a() == p1.c() * p2.a()) &&
+         (p2.d() * p1.a() == p1.d() * p2.a());
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+CircleC3<R>::operator!=(const CircleC3<R> &t) const
+{
+  return !(*this == t);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_CIRCLEC3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Data_accessor_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Data_accessor_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Data_accessor_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Data_accessor_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_2.h
new file mode 100644
index 0000000..d515825
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_2.h
@@ -0,0 +1,104 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_DIRECTION_2_H
+#define CGAL_CARTESIAN_DIRECTION_2_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template < class R_ >
+class DirectionC2
+{
+  typedef DirectionC2<R_>                   Self;
+  typedef typename R_::FT                   FT;
+  typedef FT                                RT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Vector_2             Vector_2;
+  typedef typename R_::Line_2               Line_2;
+  typedef typename R_::Ray_2                Ray_2;
+  typedef typename R_::Segment_2            Segment_2;
+  typedef typename R_::Direction_2          Direction_2;
+
+  typedef cpp11::array<FT, 2>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef R_                                     R;
+
+  DirectionC2() {}
+ 
+  DirectionC2(const FT &x, const FT &y)
+    : base(CGAL::make_array(x, y)) {}
+
+  bool operator==(const DirectionC2 &d) const;
+  bool operator!=(const DirectionC2 &d) const;
+
+  Vector_2 to_vector() const;
+
+  const RT & dx() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const RT & dy() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+};
+
+template < class R >
+inline
+bool
+DirectionC2<R>::operator==(const DirectionC2<R> &d) const
+{
+  if (CGAL::identical(base, d.base))
+      return true;
+  return equal_direction(*this, d);
+}
+
+template < class R >
+inline
+bool
+DirectionC2<R>::operator!=(const DirectionC2<R> &d) const
+{
+  return !( *this == d );
+}
+
+
+template < class R >
+inline
+typename DirectionC2<R>::Vector_2
+DirectionC2<R>::to_vector() const
+{
+  return Vector_2(dx(), dy());
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_3.h
new file mode 100644
index 0000000..862d95b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Direction_3.h
@@ -0,0 +1,136 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_DIRECTION_3_H
+#define CGAL_CARTESIAN_DIRECTION_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/predicates/kernel_ftC3.h>
+
+namespace CGAL {
+
+template < class R_ >
+class DirectionC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Ray_3                Ray_3;
+  typedef typename R_::Segment_3            Segment_3;
+  typedef typename R_::Direction_3          Direction_3;
+
+  typedef cpp11::array<FT, 3>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef R_                                R;
+
+  DirectionC3() {}
+
+  explicit DirectionC3(const Vector_3 &v)
+    : base(CGAL::make_array(v.x(), v.y(), v.z())) {}
+  // { *this = v.direction(); }
+
+  explicit DirectionC3(const Line_3 &l)
+  { *this = l.rep().direction(); }
+
+  explicit DirectionC3(const Ray_3 &r)
+  { *this = r.direction(); }
+
+  explicit DirectionC3(const Segment_3 &s)
+  { *this = s.direction(); }
+
+  DirectionC3(const FT &x, const FT &y, const FT &z)
+    : base(CGAL::make_array(x, y, z)) {}
+
+  typename R::Boolean   operator==(const DirectionC3 &d) const;
+  typename R::Boolean   operator!=(const DirectionC3 &d) const;
+
+  Vector_3       to_vector() const;
+  Vector_3       vector() const { return to_vector(); }
+
+  const FT & dx() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const FT & dy() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  const FT & dz() const
+  {
+      return get_pointee_or_identity(base)[2];
+  }
+
+  const FT & hdx() const
+  {
+      return dx();
+  }
+  const FT & hdy() const
+  {
+      return dy();
+  }
+  const FT & hdz() const
+  {
+      return dz();
+  }
+  FT hw() const
+  {
+      return FT(1);
+  }
+};
+
+template < class R >
+inline
+typename R::Boolean
+DirectionC3<R>::operator==(const DirectionC3<R> &d) const
+{
+  if (CGAL::identical(base, d.base))
+      return true;
+  return equal_directionC3(dx(), dy(), dz(), d.dx(), d.dy(), d.dz());
+}
+
+template < class R >
+inline
+typename R::Boolean
+DirectionC3<R>::operator!=(const DirectionC3<R> &d) const
+{
+  return !(*this == d);
+}
+
+template < class R >
+inline
+typename DirectionC3<R>::Vector_3
+DirectionC3<R>::to_vector() const
+{
+  return Vector_3(dx(), dy(), dz());
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_cuboid_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_cuboid_3.h
new file mode 100644
index 0000000..634136c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_cuboid_3.h
@@ -0,0 +1,338 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_ISO_CUBOID_3_H
+#define CGAL_CARTESIAN_ISO_CUBOID_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Cartesian/predicates_on_points_3.h>
+
+namespace CGAL {
+
+template < class R_ >
+class Iso_cuboidC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Iso_cuboid_3         Iso_cuboid_3;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+  typedef typename R_::Construct_point_3    Construct_point_3;
+
+  typedef cpp11::array<Point_3, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                R;
+
+  Iso_cuboidC3() {}
+
+  Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int)
+    : base(CGAL::make_array(p, q))
+  {
+    // I have to remove the assertions, because of Cartesian_converter.
+    // CGAL_kernel_assertion(p.x()<=q.x());
+    // CGAL_kernel_assertion(p.y()<=q.y());
+    // CGAL_kernel_assertion(p.z()<=q.z());
+  }
+
+  Iso_cuboidC3(const Point_3 &p, const Point_3 &q)
+  {
+    Construct_point_3 construct_point_3;
+    FT minx, maxx, miny, maxy, minz, maxz;
+    if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); }
+    else               { minx = q.x(); maxx = p.x(); }
+    if (p.y() < q.y()) { miny = p.y(); maxy = q.y(); }
+    else               { miny = q.y(); maxy = p.y(); }
+    if (p.z() < q.z()) { minz = p.z(); maxz = q.z(); }
+    else               { minz = q.z(); maxz = p.z(); }
+    base = Rep(CGAL::make_array(construct_point_3(minx, miny, minz),
+	                         construct_point_3(maxx, maxy, maxz)));
+  }
+
+  Iso_cuboidC3(const Point_3 &left,   const Point_3 &right,
+               const Point_3 &bottom, const Point_3 &top,
+               const Point_3 &far_,   const Point_3 &close)
+    : base(CGAL::make_array(Construct_point_3()(left.x(),  bottom.y(), far_.z()),
+                             Construct_point_3()(right.x(), top.y(),    close.z())))
+  {
+    CGAL_kernel_precondition(!less_x(right, left));
+    CGAL_kernel_precondition(!less_y(top, bottom));
+    CGAL_kernel_precondition(!less_z(close, far_));
+  }
+
+  Iso_cuboidC3(const FT& min_x, const FT& min_y, const FT& min_z,
+               const FT& max_x, const FT& max_y, const FT& max_z)
+    : base(CGAL::make_array(Construct_point_3()(min_x, min_y, min_z),
+	                     Construct_point_3()(max_x, max_y, max_z)))
+  {
+    CGAL_kernel_precondition(min_x <= max_x);
+    CGAL_kernel_precondition(min_y <= max_y);
+    CGAL_kernel_precondition(min_z <= max_z);
+  }
+
+  Iso_cuboidC3(const FT& min_hx, const FT& min_hy, const FT& min_hz,
+               const FT& max_hx, const FT& max_hy, const FT& max_hz, 
+               const FT& hw)
+  {
+    if (hw == FT(1))
+       base = Rep(CGAL::make_array(Construct_point_3()(min_hx, min_hy, min_hz),
+		                    Construct_point_3()(max_hx, max_hy, max_hz)));
+    else
+       base = Rep(CGAL::make_array(Construct_point_3()(min_hx/hw, min_hy/hw, min_hz/hw),
+                                    Construct_point_3()(max_hx/hw, max_hy/hw, max_hz/hw)));
+  }
+
+  typename R::Boolean   operator==(const Iso_cuboidC3& s) const;
+  typename R::Boolean   operator!=(const Iso_cuboidC3& s) const;
+
+  const Point_3 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const Point_3 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  Point_3 vertex(int i) const;
+  Point_3 operator[](int i) const;
+
+  Iso_cuboid_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Iso_cuboidC3(t.transform((this->min)()), t.transform((this->max)()));
+  }
+
+  Bounded_side bounded_side(const Point_3& p) const;
+  typename R::Boolean           has_on(const Point_3& p) const;
+  typename R::Boolean           has_on_boundary(const Point_3& p) const;
+  typename R::Boolean           has_on_bounded_side(const Point_3& p) const;
+  typename R::Boolean           has_on_unbounded_side(const Point_3& p) const;
+  typename R::Boolean           is_degenerate() const;
+  const FT &   xmin() const;
+  const FT &   ymin() const;
+  const FT &   zmin() const;
+  const FT &   xmax() const;
+  const FT &   ymax() const;
+  const FT &   zmax() const;
+  const FT &   min_coord(int i) const;
+  const FT &   max_coord(int i) const;
+
+  FT           volume() const;
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+Iso_cuboidC3<R>::operator==(const Iso_cuboidC3<R>& r) const
+{ // FIXME : predicate
+  if (CGAL::identical(base, r.base))
+      return true;
+  return (this->min)() == (r.min)() && (this->max)() == (r.max)();
+}
+
+template < class R >
+inline
+typename R::Boolean
+Iso_cuboidC3<R>::operator!=(const Iso_cuboidC3<R>& r) const
+{
+  return !(*this == r);
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::xmin() const
+{
+  return (this->min)().x();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::ymin() const
+{
+  return (this->min)().y();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::zmin() const
+{
+  return (this->min)().z();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::xmax() const
+{
+  return (this->max)().x();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::ymax() const
+{
+  return (this->max)().y();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::zmax() const
+{
+  return (this->max)().z();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::min_coord(int i) const
+{
+  CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
+  if (i == 0)
+     return xmin();
+  else if (i == 1)
+     return ymin();
+  else 
+     return zmin();
+}
+
+template < class R >
+inline
+const typename Iso_cuboidC3<R>::FT &
+Iso_cuboidC3<R>::max_coord(int i) const
+{
+  CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
+  if (i == 0)
+     return xmax();
+  else if (i == 1)
+     return ymax();
+  else 
+     return zmax();
+}
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+typename Iso_cuboidC3<R>::Point_3
+Iso_cuboidC3<R>::vertex(int i) const
+{
+  Construct_point_3 construct_point_3;
+  switch (i%8)
+  {
+    case 0: return (this->min)();
+    case 1: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->min)().hz());
+    case 2: return construct_point_3((this->max)().hx(), (this->max)().hy(), (this->min)().hz());
+    case 3: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->min)().hz());
+    case 4: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->max)().hz());
+    case 5: return construct_point_3((this->min)().hx(), (this->min)().hy(), (this->max)().hz());
+    case 6: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->max)().hz());
+    default: // case 7:
+        return (this->max)();
+  }
+}
+
+template < class R >
+inline
+typename Iso_cuboidC3<R>::Point_3
+Iso_cuboidC3<R>::operator[](int i) const
+{
+  return vertex(i);
+}
+
+template < class R >
+inline
+typename Iso_cuboidC3<R>::FT
+Iso_cuboidC3<R>::volume() const
+{
+  return (xmax()-xmin()) * (ymax()-ymin()) * (zmax()-zmin());
+}
+
+template < class R >
+CGAL_KERNEL_MEDIUM_INLINE
+Bounded_side
+Iso_cuboidC3<R>::
+bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
+{
+  if (strict_dominance(p, (this->min)()) && strict_dominance((this->max)(), p) )
+    return ON_BOUNDED_SIDE;
+  if (dominance(p, (this->min)()) && dominance((this->max)(), p))
+    return ON_BOUNDARY;
+  return ON_UNBOUNDED_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+Iso_cuboidC3<R>::
+has_on_boundary(const typename Iso_cuboidC3<R>::Point_3& p) const
+{
+  return bounded_side(p) == ON_BOUNDARY;
+}
+
+template < class R >
+inline
+typename R::Boolean
+Iso_cuboidC3<R>::
+has_on(const typename Iso_cuboidC3<R>::Point_3& p) const
+{
+  return bounded_side(p) == ON_BOUNDARY;
+}
+
+template < class R >
+inline
+typename R::Boolean
+Iso_cuboidC3<R>::
+has_on_bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
+{
+  return bounded_side(p) == ON_BOUNDED_SIDE;
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+Iso_cuboidC3<R>::
+has_on_unbounded_side(const typename Iso_cuboidC3<R>::Point_3& p)
+    const
+{
+  return bounded_side(p) == ON_UNBOUNDED_SIDE;
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+Iso_cuboidC3<R>::is_degenerate() const
+{ // FIXME : predicate
+  return (this->min)().hx() == (this->max)().hx()
+      || (this->min)().hy() == (this->max)().hy()
+      || (this->min)().hz() == (this->max)().hz();
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_ISO_CUBOID_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_rectangle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_rectangle_2.h
new file mode 100644
index 0000000..0754475
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Iso_rectangle_2.h
@@ -0,0 +1,73 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_ISO_RECTANGLE_2_H
+#define CGAL_CARTESIAN_ISO_RECTANGLE_2_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template <class R_>
+class Iso_rectangleC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Iso_rectangle_2      Iso_rectangle_2;
+  typedef typename R_::Construct_point_2    Construct_point_2;
+
+  typedef cpp11::array<Point_2, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  Iso_rectangleC2() {}
+
+  // Iso_rectangleC2(const Point_2 &p, const Point_2 &q)
+  //  : base(p, q) {}
+
+  Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int)
+    : base(CGAL::make_array(p, q))
+  {
+    // I have to remove the assertions, because of Cartesian_converter.
+    // CGAL_kernel_assertion(p<=q);
+  }
+
+  const Point_2 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const Point_2 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_ISO_RECTANGLE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_2.h
new file mode 100644
index 0000000..52b946a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_2.h
@@ -0,0 +1,97 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_LINE_2_H
+#define CGAL_CARTESIAN_LINE_2_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/predicates/kernel_ftC2.h>
+
+namespace CGAL {
+
+template < class R_ >
+class LineC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Direction_2          Direction_2;
+  typedef typename R_::Vector_2             Vector_2;
+  typedef typename R_::Ray_2                Ray_2;
+  typedef typename R_::Segment_2            Segment_2;
+  typedef typename R_::Line_2               Line_2;
+
+  typedef cpp11::array<FT, 3>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef R_                                     R;
+
+  LineC2() {}
+
+  LineC2(const FT &a, const FT &b, const FT &c)
+    : base(CGAL::make_array(a, b, c)) {}
+  
+  typename R_::Boolean   operator==(const LineC2 &l) const;
+  typename R_::Boolean   operator!=(const LineC2 &l) const;
+
+  const FT & a() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const FT & b() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  const FT & c() const
+  {
+      return get_pointee_or_identity(base)[2];
+  }
+
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+LineC2<R>::operator==(const LineC2<R> &l) const
+{
+  if (CGAL::identical(base, l.base))
+      return true;
+  return equal_lineC2(a(), b(), c(), l.a(), l.b(), l.c());
+}
+
+template < class R >
+inline
+typename R::Boolean
+LineC2<R>::operator!=(const LineC2<R> &l) const
+{
+  return ! (*this == l);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_LINE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_3.h
new file mode 100644
index 0000000..64ece9a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Line_3.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_LINE_3_H
+#define CGAL_CARTESIAN_LINE_3_H
+
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template < class R_ >
+class LineC3
+{
+  typedef typename R_::RT                   RT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Ray_3                Ray_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Segment_3            Segment_3;
+
+  struct Rep
+  {
+    Point_3 first;
+    Vector_3 second;
+    Rep () : first(), second() { }
+    Rep (const Point_3& p, const Vector_3& v) : first(p), second(v) { }
+  };
+
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  LineC3() {}
+
+  LineC3(const Point_3 &p, const Point_3 &q)
+  { *this = R().construct_line_3_object()(p, q); }
+
+  explicit LineC3(const Segment_3 &s)
+  { *this = R().construct_line_3_object()(s); }
+
+  explicit LineC3(const Ray_3 &r)
+  { *this = R().construct_line_3_object()(r); }
+
+  LineC3(const Point_3 &p, const Vector_3 &v)
+    : base(p, v) {}
+
+  LineC3(const Point_3 &p, const Direction_3 &d)
+  { *this = R().construct_line_3_object()(p, d); }
+
+  bool        operator==(const LineC3 &l) const;
+  bool        operator!=(const LineC3 &l) const;
+
+  Plane_3     perpendicular_plane(const Point_3 &p) const;
+  Line_3      opposite() const;
+
+  const Point_3 &     point() const
+  {
+      return get_pointee_or_identity(base).first;
+  }
+
+  const Vector_3 & to_vector() const
+  {
+      return get_pointee_or_identity(base).second;
+  }
+
+  Direction_3 direction() const
+  {
+      return Direction_3(to_vector());
+  }
+
+  Point_3     point(int i) const;
+
+  bool        has_on(const Point_3 &p) const;
+  bool        is_degenerate() const;
+};
+
+template < class R >
+inline
+bool
+LineC3<R>::operator==(const LineC3<R> &l) const
+{
+  if (CGAL::identical(base, l.base))
+      return true;
+  return has_on(l.point()) && (direction() == l.direction());
+}
+
+template < class R >
+inline
+bool
+LineC3<R>::operator!=(const LineC3<R> &l) const
+{
+  return !(*this == l);
+}
+
+template < class R >
+inline
+typename LineC3<R>::Point_3
+LineC3<R>::point(int i) const
+{ return point() + to_vector()*RT(i); }
+
+template < class R >
+inline
+typename LineC3<R>::Plane_3
+LineC3<R>::
+perpendicular_plane(const typename LineC3<R>::Point_3 &p) const
+{
+  return Plane_3(p, to_vector());
+}
+
+template < class R >
+inline
+typename LineC3<R>::Line_3
+LineC3<R>::opposite() const
+{
+  return Line_3(point(), -to_vector());
+}
+
+template < class R >
+inline
+bool
+LineC3<R>::
+has_on(const typename LineC3<R>::Point_3 &p) const
+{
+  return collinear(point(), point()+to_vector(), p);
+}
+
+template < class R >
+inline
+bool
+LineC3<R>::is_degenerate() const
+{
+  return to_vector() == NULL_VECTOR;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/MatrixC33.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/MatrixC33.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/MatrixC33.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/MatrixC33.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Plane_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Plane_3.h
new file mode 100644
index 0000000..8b78a3e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Plane_3.h
@@ -0,0 +1,311 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_PLANE_3_H
+#define CGAL_CARTESIAN_PLANE_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Cartesian/solve_3.h>
+#include <CGAL/Cartesian/plane_constructions_3.h>
+
+namespace CGAL {
+
+template <class R_>
+class PlaneC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Ray_3                Ray_3;
+  typedef typename R_::Segment_3            Segment_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Circle_3             Circle_3;
+  typedef typename R_::Construct_point_3    Construct_point_3;
+  typedef typename R_::Construct_point_2    Construct_point_2;
+
+  typedef cpp11::array<FT, 4>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef R_                                     R;
+
+  PlaneC3() {}
+
+  PlaneC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
+  { *this = plane_from_points<R>(p, q, r); }
+
+  PlaneC3(const Point_3 &p, const Direction_3 &d)
+  { *this = plane_from_point_direction<R>(p, d); }
+
+  PlaneC3(const Point_3 &p, const Vector_3 &v)
+  { *this = plane_from_point_direction<R>(p, v.direction()); }
+
+  PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d)
+    : base(CGAL::make_array(a, b, c, d)) {}
+
+  PlaneC3(const Line_3 &l, const Point_3 &p)
+  { *this = plane_from_points<R>(l.point(),
+	                      l.point()+l.direction().to_vector(),
+			      p); }
+
+  PlaneC3(const Segment_3 &s, const Point_3 &p)
+  { *this = plane_from_points<R>(s.start(), s.end(), p); }
+
+  PlaneC3(const Ray_3 &r, const Point_3 &p)
+  { *this = plane_from_points<R>(r.start(), r.second_point(), p); }
+
+  typename R::Boolean   operator==(const PlaneC3 &p) const;
+  typename R::Boolean   operator!=(const PlaneC3 &p) const;
+
+  const FT & a() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const FT & b() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  const FT & c() const
+  {
+      return get_pointee_or_identity(base)[2];
+  }
+  const FT & d() const
+  {
+      return get_pointee_or_identity(base)[3];
+  }
+
+  Line_3       perpendicular_line(const Point_3 &p) const;
+  Plane_3      opposite() const;
+
+  Point_3      point() const;
+  Point_3      projection(const Point_3 &p) const;
+  Vector_3     orthogonal_vector() const;
+  Direction_3  orthogonal_direction() const;
+  Vector_3     base1() const;
+  Vector_3     base2() const;
+
+  Point_3      to_plane_basis(const Point_3 &p) const;
+
+  Point_2      to_2d(const Point_3 &p) const;
+  Point_3      to_3d(const Point_2 &p) const;
+
+  typename R::Oriented_side     oriented_side(const Point_3 &p) const;
+  typename R::Boolean           has_on_positive_side(const Point_3 &l) const;
+  typename R::Boolean           has_on_negative_side(const Point_3 &l) const;
+  typename R::Boolean           has_on(const Point_3 &p) const
+  {
+    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
+  }
+  typename R::Boolean           has_on(const Line_3 &l) const
+  {
+    return has_on(l.point())
+       &&  has_on(l.point() + l.direction().to_vector());
+  }
+  typename R::Boolean           has_on(const Circle_3 &circle) const
+  {
+    if(circle.squared_radius() != FT(0)) {
+      const Plane_3& p = circle.supporting_plane();
+      if(is_zero(a())) {
+        if(!is_zero(p.a())) return false;
+        if(is_zero(b())) {
+          if(!is_zero(p.b())) return false;
+          return c() * p.d() == d() * p.c();
+        }
+        return (p.c() * b() == c() * p.b()) &&
+               (p.d() * b() == d() * p.b());
+      }
+      return (p.b() * a() == b() * p.a()) &&
+             (p.c() * a() == c() * p.a()) &&
+             (p.d() * a() == d() * p.a());
+    } else return has_on(circle.center());
+  }
+
+  typename R::Boolean           is_degenerate() const;
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+PlaneC3<R>::operator==(const PlaneC3<R> &p) const
+{
+  if (CGAL::identical(base, p.base))
+      return true;
+  return equal_plane(*this, p);
+}
+
+template < class R >
+inline
+typename R::Boolean
+PlaneC3<R>::operator!=(const PlaneC3<R> &p) const
+{
+  return !(*this == p);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Point_3
+PlaneC3<R>::point() const
+{
+  return point_on_plane(*this);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Point_3
+PlaneC3<R>::
+projection(const typename PlaneC3<R>::Point_3 &p) const
+{
+  return projection_plane(p, *this);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Vector_3
+PlaneC3<R>::orthogonal_vector() const
+{
+  return R().construct_orthogonal_vector_3_object()(*this);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Direction_3
+PlaneC3<R>::orthogonal_direction() const
+{
+  return Direction_3(a(), b(), c());
+}
+
+template < class R >
+typename PlaneC3<R>::Vector_3
+PlaneC3<R>::base1() const
+{
+  return R().construct_base_vector_3_object()(*this, 1);
+}
+
+template < class R >
+typename PlaneC3<R>::Vector_3
+PlaneC3<R>::base2() const
+{
+  return R().construct_base_vector_3_object()(*this, 2);
+}
+
+template < class R >
+typename PlaneC3<R>::Point_3
+PlaneC3<R>::
+to_plane_basis(const typename PlaneC3<R>::Point_3 &p) const
+{
+  FT alpha, beta, gamma;
+  Construct_point_3 construct_point_3;
+  Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(),
+	alpha, beta, gamma);
+
+  return construct_point_3(alpha, beta, gamma);
+}
+
+template < class R >
+typename PlaneC3<R>::Point_2
+PlaneC3<R>::
+to_2d(const typename PlaneC3<R>::Point_3 &p) const
+{
+  FT alpha, beta, gamma;
+  Construct_point_2 construct_point_2;
+
+  Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(),
+	alpha, beta, gamma);
+
+  return construct_point_2(alpha, beta);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Point_3
+PlaneC3<R>::
+to_3d(const typename PlaneC3<R>::Point_2 &p) const
+{
+  return R().construct_lifted_point_3_object()(*this, p);
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Line_3
+PlaneC3<R>::
+perpendicular_line(const typename PlaneC3<R>::Point_3 &p) const
+{
+  return Line_3(p, orthogonal_direction());
+}
+
+template < class R >
+inline
+typename PlaneC3<R>::Plane_3
+PlaneC3<R>::opposite() const
+{
+  return PlaneC3<R>(-a(), -b(), -c(), -d());
+}
+
+template < class R >
+inline
+typename R::Oriented_side
+PlaneC3<R>::
+oriented_side(const typename PlaneC3<R>::Point_3 &p) const
+{
+  return side_of_oriented_plane(*this, p);
+}
+
+template < class R >
+inline
+typename R::Boolean
+PlaneC3<R>::
+has_on_positive_side(const  typename PlaneC3<R>::Point_3 &p) const
+{
+  return oriented_side(p) == ON_POSITIVE_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+PlaneC3<R>::
+has_on_negative_side(const  typename PlaneC3<R>::Point_3 &p) const
+{
+  return oriented_side(p) == ON_NEGATIVE_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+PlaneC3<R>::
+is_degenerate() const
+{ // FIXME : predicate
+  return CGAL_NTS is_zero(a()) && CGAL_NTS is_zero(b()) &&
+         CGAL_NTS is_zero(c());
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_PLANE_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_2.h
new file mode 100644
index 0000000..514c62d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_2.h
@@ -0,0 +1,107 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_POINT_2_H
+#define CGAL_CARTESIAN_POINT_2_H
+
+#include <CGAL/Origin.h>
+
+namespace CGAL {
+
+template < class R_ >
+class PointC2
+{
+  typedef PointC2<R_>                       Self;
+  typedef typename R_::FT                   FT;
+// http://doc.cgal.org/latest/Manual/devman_code_format.html#secprogramming_conventions
+  typedef typename R_::Vector_2             Vector_2_;
+  typedef typename R_::Point_2              Point_2;
+
+  // We do not use reference counting here as it is done at the Vector_2 level.
+  Vector_2_ base;
+
+public:
+
+  typedef typename Vector_2_::Cartesian_const_iterator Cartesian_const_iterator;
+  
+  typedef R_                                R;
+
+  PointC2() {}
+
+  PointC2(const Origin &)
+    : base(NULL_VECTOR) {}
+
+  PointC2(const FT &x, const FT &y)
+    : base(x, y) {}
+
+  PointC2(const FT &hx, const FT &hy, const FT &hw)
+    : base(hx, hy, hw) {}
+
+  const FT& x() const
+  {
+      return base.x();
+  }
+  
+  const FT& y() const
+  {
+      return base.y();
+  }
+
+  const FT& hx() const
+  {
+      return base.hx();
+  }
+  const FT& hy() const
+  {
+      return base.hy();
+  }
+  const FT& hw() const
+  {
+      return base.hw();
+  }
+
+  Cartesian_const_iterator cartesian_begin() const 
+  {
+    return base.cartesian_begin(); 
+  }
+
+  Cartesian_const_iterator cartesian_end() const 
+  {
+    return base.cartesian_end(); 
+  }
+
+  typename R_::Boolean   operator==(const PointC2 &p) const
+  {
+      return base == p.base;
+  }
+  typename R_::Boolean   operator!=(const PointC2 &p) const
+  {
+      return !(*this == p);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_POINT_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_3.h
new file mode 100644
index 0000000..336115e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Point_3.h
@@ -0,0 +1,139 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri and Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_POINT_3_H
+#define CGAL_CARTESIAN_POINT_3_H
+
+#include <CGAL/Origin.h>
+
+namespace CGAL {
+
+template < class R_ >
+class PointC3
+{
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+  // We do not use reference counting here as it is done at the Vector_3 level.
+  Vector_3 base;
+
+public:
+  typedef typename Vector_3::Cartesian_const_iterator Cartesian_const_iterator;
+  typedef R_                                R;
+  typedef typename R_::FT                   FT;
+
+  PointC3() {}
+
+  PointC3(const Origin &)
+    : base(NULL_VECTOR) {}
+
+  PointC3(const FT &x, const FT &y, const FT &z)
+    : base(x, y, z) {}
+
+  PointC3(const FT &x, const FT &y, const FT &z, const FT &w)
+    : base(x, y, z, w) {}
+
+  const FT & x() const
+  {
+      return base.x();
+  }
+  const FT & y() const
+  {
+      return base.y();
+  }
+  const FT & z() const
+  {
+      return base.z();
+  }
+
+  const FT & hx() const
+  {
+      return base.hx();
+  }
+  const FT & hy() const
+  {
+      return base.hy();
+  }
+  const FT & hz() const
+  {
+      return base.hz();
+  }
+  const FT & hw() const
+  {
+      return base.hw();
+  }
+
+  const FT & cartesian(int i) const;
+  const FT & operator[](int i) const;
+  const FT & homogeneous(int i) const;
+
+  Cartesian_const_iterator cartesian_begin() const 
+  {
+    return base.cartesian_begin(); 
+  }
+
+  Cartesian_const_iterator cartesian_end() const 
+  {
+    return base.cartesian_end();
+  }
+
+  int dimension() const
+  {
+      return base.dimension();
+  }
+
+  Point_3 transform(const Aff_transformation_3 &t) const
+  {
+    return t.transform(*this);
+  }
+};
+
+template < class R >
+inline
+const typename PointC3<R>::FT &
+PointC3<R>::cartesian(int i) const
+{
+  return base.cartesian(i);
+}
+
+template < class R >
+inline
+const typename PointC3<R>::FT &
+PointC3<R>::operator[](int i) const
+{
+  return base[i];
+}
+
+template < class R >
+inline
+const typename PointC3<R>::FT &
+PointC3<R>::homogeneous(int i) const
+{
+  return base.homogeneous(i);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_POINT_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_2.h
new file mode 100644
index 0000000..4af8dc0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_2.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_RAY_2_H
+#define CGAL_CARTESIAN_RAY_2_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template < class R_ >
+class RayC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Ray_2                Ray_2;
+
+  typedef cpp11::array<Point_2, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  RayC2() 
+  {}
+
+  RayC2(const Point_2 &sp, const Point_2 &secondp)
+    : base(CGAL::make_array(sp, secondp)) 
+  {}
+
+
+  const Point_2&
+  source() const
+  {
+    return get_pointee_or_identity(base)[0];
+  }
+
+  const Point_2 &
+  second_point() const
+  {
+    return get_pointee_or_identity(base)[1];
+  }
+
+  typename R_::Boolean   is_degenerate() const
+  {
+    return source() == second_point();
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_RAY_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_3.h
new file mode 100644
index 0000000..7278255
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Ray_3.h
@@ -0,0 +1,192 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_RAY_3_H
+#define CGAL_CARTESIAN_RAY_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template < class R_ >
+class RayC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Ray_3                Ray_3;
+
+  typedef cpp11::array<Point_3, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  RayC3() {}
+
+  RayC3(const Point_3 &sp, const Point_3 &secondp)
+    : base(CGAL::make_array(sp, secondp)) {}
+
+  RayC3(const Point_3 &sp, const Vector_3 &v)
+    : base(CGAL::make_array(sp, sp + v)) {}
+
+  RayC3(const Point_3 &sp, const Direction_3 &d)
+    : base(CGAL::make_array(sp, sp + d.to_vector())) {}
+
+  RayC3(const Point_3 &sp, const Line_3 &l)
+    : base(CGAL::make_array(sp, sp + l.to_vector())) {}
+
+  typename R::Boolean          operator==(const RayC3 &r) const;
+  typename R::Boolean          operator!=(const RayC3 &r) const;
+
+  const Point_3 &   source() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const Point_3 &   second_point() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  Point_3     point(int i) const;
+
+  Direction_3 direction() const;
+  Vector_3    to_vector() const;
+  Line_3      supporting_line() const;
+  Ray_3       opposite() const;
+
+  typename R::Boolean          is_degenerate() const;
+  typename R::Boolean          has_on(const Point_3 &p) const;
+  typename R::Boolean          collinear_has_on(const Point_3 &p) const;
+};
+
+template < class R >
+inline
+typename R::Boolean
+RayC3<R>::operator==(const RayC3<R> &r) const
+{
+    if (CGAL::identical(base, r.base))
+	return true;
+    return source() == r.source() && direction() == r.direction();
+}
+
+template < class R >
+inline
+typename R::Boolean
+RayC3<R>::operator!=(const RayC3<R> &r) const
+{
+  return !(*this == r);
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename RayC3<R>::Point_3
+RayC3<R>::point(int i) const
+{
+  CGAL_kernel_precondition( i >= 0 );
+  if (i == 0) return source();
+  if (i == 1) return second_point();
+  return source() + FT(i) * (second_point() - source());
+}
+
+template < class R >
+inline
+typename RayC3<R>::Vector_3
+RayC3<R>::to_vector() const
+{
+  return second_point() - source();
+}
+
+template < class R >
+inline
+typename RayC3<R>::Direction_3
+RayC3<R>::direction() const
+{
+  return Direction_3( second_point() - source() );
+}
+
+template < class R >
+inline
+typename RayC3<R>::Line_3
+RayC3<R>::supporting_line() const
+{
+  return Line_3(*this);
+}
+
+template < class R >
+inline
+typename RayC3<R>::Ray_3
+RayC3<R>::opposite() const
+{
+  return RayC3<R>( source(), - direction() );
+}
+
+template < class R >
+typename R::Boolean
+RayC3<R>::
+has_on(const typename RayC3<R>::Point_3 &p) const
+{
+  return (p == source()) ||
+         ( collinear(source(), p, second_point())
+           && ( Direction_3(p - source()) == direction() ));
+}
+
+template < class R >
+inline
+typename R::Boolean
+RayC3<R>::is_degenerate() const
+{
+  return source() == second_point();
+}
+
+template < class R >
+inline
+typename R::Boolean
+RayC3<R>::
+collinear_has_on(const typename RayC3<R>::Point_3 &p) const
+{
+  CGAL_kernel_exactness_precondition( collinear(source(), p, second_point()) );
+
+  typename R::Comparison_result cx = compare_x(source(), second_point());
+  if (cx != EQUAL)
+    return cx != compare_x(p, source());
+
+  typename R::Comparison_result cy = compare_y(source(), second_point());
+  if (cy != EQUAL)
+    return cy != compare_y(p, source());
+
+  typename R::Comparison_result cz = compare_z(source(), second_point());
+  if (cz != EQUAL)
+    return cz != compare_z(p, source());
+
+  return true; // p == source()
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_RAY_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Rotation_rep_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Rotation_rep_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Rotation_rep_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Rotation_rep_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Scaling_rep_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Scaling_rep_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Scaling_rep_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Scaling_rep_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Scaling_rep_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Scaling_rep_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Scaling_rep_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Scaling_rep_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_2.h
new file mode 100644
index 0000000..1ae21c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_2.h
@@ -0,0 +1,69 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_SEGMENT_2_H
+#define CGAL_CARTESIAN_SEGMENT_2_H
+
+#include <CGAL/array.h>
+#include <CGAL/Cartesian/predicates_on_points_2.h>
+
+namespace CGAL {
+template < class R_ >
+class SegmentC2
+{
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Segment_2            Segment_2;
+
+  typedef cpp11::array<Point_2, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  SegmentC2() 
+  {}
+
+  SegmentC2(const Point_2 &sp, const Point_2 &ep)
+    : base(CGAL::make_array(sp, ep))
+  {}
+
+  const Point_2 &   
+  source() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  
+  const Point_2 &   
+  target() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_SEGMENT_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_3.h
new file mode 100644
index 0000000..ecf0d05
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Segment_3.h
@@ -0,0 +1,221 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_SEGMENT_3_H
+#define CGAL_CARTESIAN_SEGMENT_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template < class R_ >
+class SegmentC3
+{
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Segment_3            Segment_3;
+
+  typedef cpp11::array<Point_3, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  SegmentC3() {}
+
+  SegmentC3(const Point_3 &sp, const Point_3 &ep)
+    : base(CGAL::make_array(sp, ep)) {}
+
+  bool        has_on(const Point_3 &p) const;
+  bool        collinear_has_on(const Point_3 &p) const;
+
+  bool        operator==(const SegmentC3 &s) const;
+  bool        operator!=(const SegmentC3 &s) const;
+
+  const Point_3 &   source() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const Point_3 &   target() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+
+  const Point_3 &   start() const;
+  const Point_3 &   end() const;
+
+  const Point_3 &   min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  const Point_3 &   max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  const Point_3 &   vertex(int i) const;
+  const Point_3 &   point(int i) const;
+  const Point_3 &   operator[](int i) const;
+
+  Direction_3 direction() const;
+  Vector_3    to_vector() const;
+  Line_3      supporting_line() const;
+  Segment_3   opposite() const;
+
+  bool        is_degenerate() const;
+};
+
+template < class R >
+inline
+bool
+SegmentC3<R>::operator==(const SegmentC3<R> &s) const
+{
+  if (CGAL::identical(base, s.base))
+      return true;
+  return source() == s.source() && target() == s.target();
+}
+
+template < class R >
+inline
+bool
+SegmentC3<R>::operator!=(const SegmentC3<R> &s) const
+{
+  return !(*this == s);
+}
+
+template < class R >
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::start() const
+{
+  return source();
+}
+
+template < class R >
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::end() const
+{
+  return target();
+}
+
+template < class R >
+inline
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  return lexicographically_xyz_smaller(source(),target()) ? source()
+                                                          : target();
+}
+
+template < class R >
+inline
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  return lexicographically_xyz_smaller(source(),target()) ? target()
+                                                          : source();
+}
+
+template < class R >
+inline
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::vertex(int i) const
+{
+  return (i%2 == 0) ? source() : target();
+}
+
+template < class R >
+inline
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::point(int i) const
+{
+  return vertex(i);
+}
+
+template < class R >
+inline
+const typename SegmentC3<R>::Point_3 &
+SegmentC3<R>::operator[](int i) const
+{
+  return vertex(i);
+}
+
+template < class R >
+inline
+typename SegmentC3<R>::Vector_3
+SegmentC3<R>::to_vector() const
+{
+  return target() - source();
+}
+
+template < class R >
+inline
+typename SegmentC3<R>::Direction_3
+SegmentC3<R>::direction() const
+{
+  return Direction_3( target() - source() );
+}
+
+template < class R >
+inline
+typename SegmentC3<R>::Line_3
+SegmentC3<R>::supporting_line() const
+{
+  return Line_3(*this);
+}
+
+template < class R >
+inline
+typename SegmentC3<R>::Segment_3
+SegmentC3<R>::opposite() const
+{
+  return SegmentC3<R>(target(), source());
+}
+
+template < class R >
+inline
+bool
+SegmentC3<R>::is_degenerate() const
+{
+  return source() == target();
+}
+
+template < class R >
+inline
+bool
+SegmentC3<R>::
+has_on(const typename SegmentC3<R>::Point_3 &p) const
+{
+  return are_ordered_along_line(source(), p, target());
+}
+
+template < class R >
+inline
+bool
+SegmentC3<R>::
+collinear_has_on(const typename SegmentC3<R>::Point_3 &p) const
+{
+  return collinear_are_ordered_along_line(source(), p, target());
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_SEGMENT_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Sphere_3.h
new file mode 100644
index 0000000..99dd58f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Sphere_3.h
@@ -0,0 +1,294 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_SPHERE_3_H
+#define CGAL_CARTESIAN_SPHERE_3_H
+
+#include <CGAL/Handle_for.h>
+#include <CGAL/Interval_nt.h>
+#include <boost/tuple/tuple.hpp>
+#include <CGAL/Kernel/global_functions_3.h>
+
+namespace CGAL {
+
+template <class R_>
+class SphereC3
+{
+  typedef typename R_::FT                   FT;
+// http://doc.cgal.org/latest/Manual/devman_code_format.html#secprogramming_conventions
+  typedef typename R_::Point_3              Point_3_;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Sphere_3             Sphere_3;
+  typedef typename R_::Circle_3             Circle_3;
+
+  typedef boost::tuple<Point_3_, FT, Orientation>   Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  SphereC3() {}
+
+  SphereC3(const Point_3_ &center, const FT &squared_radius,
+           const Orientation &o = COUNTERCLOCKWISE)
+  {
+    CGAL_kernel_precondition( (squared_radius >= FT(0)) &
+                              (o != COLLINEAR) );
+
+    base = Rep(center, squared_radius, o);
+  }
+
+  // Sphere passing through and oriented by p,q,r,s
+  SphereC3(const Point_3_ &p, const Point_3_ &q,
+           const Point_3_ &r, const Point_3_ &s)
+  {
+    Orientation orient = make_certain(CGAL::orientation(p, q, r, s));
+    Point_3_ center = CGAL::circumcenter(p, q, r, s);
+    FT      squared_radius = squared_distance(p, center);
+
+    base = Rep(center, squared_radius, orient);
+  }
+
+  // Sphere with great circle passing through p,q,r, oriented by o
+  SphereC3(const Point_3_ &p, const Point_3_ &q, const Point_3_ &r,
+	   const Orientation &o = COUNTERCLOCKWISE)
+  {
+    CGAL_kernel_precondition(o != COLLINEAR);
+
+    Point_3_ center = CGAL::circumcenter(p, q, r);
+    FT      squared_radius = squared_distance(p, center);
+
+    base = Rep(center, squared_radius, o);
+  }
+
+  // Sphere with diameter pq and orientation o
+  SphereC3(const Point_3_ &p, const Point_3_ &q,
+           const Orientation &o = COUNTERCLOCKWISE)
+  {
+    CGAL_kernel_precondition(o != COLLINEAR);
+
+    Point_3_ center = midpoint(p, q);
+    FT      squared_radius = squared_distance(p, center);
+
+    base = Rep(center, squared_radius, o);
+  }
+
+  explicit SphereC3(const Point_3_ &center,
+           const Orientation& o = COUNTERCLOCKWISE)
+  {
+    CGAL_kernel_precondition(o != COLLINEAR);
+
+    base = Rep(center, FT(0), o);
+  }
+
+  typename R::Boolean   operator==(const SphereC3 &) const;
+  typename R::Boolean   operator!=(const SphereC3 &) const;
+
+  const Point_3_ & center() const
+  {
+      return get_pointee_or_identity(base).template get<0>();
+  }
+  const FT & squared_radius() const
+  {
+      // Returns the square of the radius (instead of the radius itself,
+      // which would require square roots)
+      return get_pointee_or_identity(base).template get<1>();
+  }
+  Orientation orientation() const
+  {
+      return get_pointee_or_identity(base).template get<2>();
+  }
+
+  // A circle is degenerate if its (squared) radius is null or negative
+  typename R::Boolean   is_degenerate() const;
+
+  // Returns a circle with opposite orientation
+  Sphere_3 opposite() const;
+
+  typename R_::Oriented_side  oriented_side(const Point_3_ &p) const;
+  //! precond: ! x.is_degenerate() (when available)
+  // Returns R::ON_POSITIVE_SIDE, R::ON_ORIENTED_BOUNDARY or
+  // R::ON_NEGATIVE_SIDE
+  typename R::Boolean   has_on(const Circle_3 &p) const;
+  typename R::Boolean   has_on(const Point_3_ &p) const;
+  typename R::Boolean   has_on_boundary(const Point_3_ &p) const;
+  typename R::Boolean   has_on_positive_side(const Point_3_ &p) const;
+  typename R::Boolean   has_on_negative_side(const Point_3_ &p) const;
+
+  typename R_::Bounded_side bounded_side(const Point_3_ &p) const;
+  //! precond: ! x.is_degenerate() (when available)
+  // Returns R::ON_BOUNDED_SIDE, R::ON_BOUNDARY or R::ON_UNBOUNDED_SIDE
+  typename R::Boolean   has_on_bounded_side(const Point_3_ &p) const;
+  typename R::Boolean   has_on_unbounded_side(const Point_3_ &p) const;
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+SphereC3<R>::operator==(const SphereC3<R> &t) const
+{
+  if (CGAL::identical(base, t.base))
+      return true;
+  return center() == t.center() &&
+         squared_radius() == t.squared_radius() &&
+         orientation() == t.orientation();
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::operator!=(const SphereC3<R> &t) const
+{
+  return !(*this == t);
+}
+
+template < class R >
+CGAL_KERNEL_MEDIUM_INLINE
+typename R::Oriented_side
+SphereC3<R>::
+oriented_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+  return enum_cast<Oriented_side>(bounded_side(p)) * orientation();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Bounded_side
+SphereC3<R>::
+bounded_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+  return enum_cast<Bounded_side>(compare(squared_radius(),
+                                         squared_distance(center(), p)));
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+has_on(const typename SphereC3<R>::Circle_3 &c) const
+{
+  typedef typename SphereC3<R>::Point_3_ Point_3_;
+  typedef typename SphereC3<R>::FT      FT;
+  Point_3_ proj = c.supporting_plane().projection(center());
+  if(!(proj == c.center())) return false;
+  const FT d2 = squared_distance(center(),c.center());
+  return ((squared_radius() - d2) == c.squared_radius());
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+has_on(const typename SphereC3<R>::Point_3_ &p) const
+{
+  return has_on_boundary(p);
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+has_on_boundary(const typename SphereC3<R>::Point_3_ &p) const
+{
+    // FIXME: it's a predicate...
+  return squared_distance(center(),p) == squared_radius();
+  // NB: J'ai aussi trouve ailleurs :
+  // return oriented_side(p)==ON_ORIENTED_BOUNDARY;
+  // a voir...
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+SphereC3<R>::
+has_on_negative_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+  if (orientation() == COUNTERCLOCKWISE)
+    return has_on_unbounded_side(p);
+  return has_on_bounded_side(p);
+  // NB: J'ai aussi trouve ailleurs :
+  // return oriented_side(p)==ON_NEGATIVE_SIDE;
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Boolean
+SphereC3<R>::
+has_on_positive_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+  if (orientation() == COUNTERCLOCKWISE)
+    return has_on_bounded_side(p);
+  return has_on_unbounded_side(p);
+  // NB: J'ai aussi trouve ailleurs :
+  // return oriented_side(p)==ON_POSITIVE_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+has_on_bounded_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+    // FIXME: it's a predicate...
+  return squared_distance(center(),p) < squared_radius();
+  // NB: J'ai aussi trouve ailleurs :
+  // return bounded_side(p)==ON_BOUNDED_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+has_on_unbounded_side(const typename SphereC3<R>::Point_3_ &p) const
+{
+    // FIXME: it's a predicate...
+  return squared_distance(center(),p) > squared_radius();
+  // NB: J'ai aussi trouve ailleurs :
+  // return bounded_side(p)==ON_UNBOUNDED_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+SphereC3<R>::
+is_degenerate() const
+{
+    // FIXME: it's a predicate (?)
+  return CGAL_NTS is_zero(squared_radius());
+}
+
+template < class R >
+inline
+typename SphereC3<R>::Sphere_3
+SphereC3<R>::opposite() const
+{
+  return SphereC3<R>(center(), squared_radius(),
+                               CGAL::opposite(orientation()) );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_SPHERE_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Tetrahedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Tetrahedron_3.h
new file mode 100644
index 0000000..654f0c2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Tetrahedron_3.h
@@ -0,0 +1,224 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_TETRAHEDRON_3_H
+#define CGAL_CARTESIAN_TETRAHEDRON_3_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/enum.h>
+#include <vector>
+#include <functional>
+
+namespace CGAL {
+
+template <class R_>
+class TetrahedronC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Tetrahedron_3        Tetrahedron_3;
+
+  typedef cpp11::array<Point_3, 4>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  TetrahedronC3() {}
+
+  TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r,
+                const Point_3 &s)
+    : base(CGAL::make_array(p, q, r, s)) {}
+
+  const Point_3 &    vertex(int i) const;
+  const Point_3 &    operator[](int i) const;
+
+  typename R::Boolean         operator==(const TetrahedronC3 &t) const;
+  typename R::Boolean         operator!=(const TetrahedronC3 &t) const;
+
+  typename R::Orientation    orientation() const;
+  typename R::Oriented_side  oriented_side(const Point_3 &p) const;
+  typename R::Bounded_side   bounded_side(const Point_3 &p) const;
+
+  typename R::Boolean         has_on_boundary(const Point_3 &p) const;
+  typename R::Boolean         has_on_positive_side(const Point_3 &p) const;
+  typename R::Boolean         has_on_negative_side(const Point_3 &p) const;
+  typename R::Boolean         has_on_bounded_side(const Point_3 &p) const;
+  typename R::Boolean         has_on_unbounded_side(const Point_3 &p) const;
+
+  typename R::Boolean         is_degenerate() const;
+};
+
+template < class R >
+typename R::Boolean
+TetrahedronC3<R>::
+operator==(const TetrahedronC3<R> &t) const
+{
+  if (CGAL::identical(base, t.base))
+      return true;
+  if (orientation() != t.orientation())
+      return false;
+
+  std::vector< Point_3 > V1;
+  std::vector< Point_3 > V2;
+  typename std::vector< Point_3 >::iterator uniq_end1;
+  typename std::vector< Point_3 >::iterator uniq_end2;
+  int k;
+  for ( k=0; k < 4; k++) V1.push_back( vertex(k));
+  for ( k=0; k < 4; k++) V2.push_back( t.vertex(k));
+  typename R::Less_xyz_3 Less_object = R().less_xyz_3_object();
+  std::sort(V1.begin(), V1.end(), Less_object);
+  std::sort(V2.begin(), V2.end(), Less_object);
+  uniq_end1 = std::unique( V1.begin(), V1.end());
+  uniq_end2 = std::unique( V2.begin(), V2.end());
+  V1.erase( uniq_end1, V1.end());
+  V2.erase( uniq_end2, V2.end());
+  return V1 == V2;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::
+operator!=(const TetrahedronC3<R> &t) const
+{
+  return !(*this == t);
+}
+
+template < class R >
+const typename TetrahedronC3<R>::Point_3 &
+TetrahedronC3<R>::
+vertex(int i) const
+{
+  if (i<0) i=(i%4)+4;
+  else if (i>3) i=i%4;
+  switch (i)
+    {
+    case 0: return get_pointee_or_identity(base)[0];
+    case 1: return get_pointee_or_identity(base)[1];
+    case 2: return get_pointee_or_identity(base)[2];
+    default: return get_pointee_or_identity(base)[3];
+    }
+}
+
+template < class R >
+inline
+const typename TetrahedronC3<R>::Point_3 &
+TetrahedronC3<R>::
+operator[](int i) const
+{
+  return vertex(i);
+}
+
+template < class R >
+typename R::Orientation
+TetrahedronC3<R>::
+orientation() const
+{
+  return R().orientation_3_object()(vertex(0), vertex(1),
+                                    vertex(2), vertex(3));
+}
+
+template < class R >
+typename R::Oriented_side
+TetrahedronC3<R>::
+oriented_side(const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  typename R::Orientation o = orientation();
+  if (o != ZERO)
+    return enum_cast<Oriented_side>(bounded_side(p)) * o;
+
+  CGAL_kernel_assertion (!is_degenerate());
+  return ON_ORIENTED_BOUNDARY;
+}
+
+template < class R >
+typename R::Bounded_side
+TetrahedronC3<R>::
+bounded_side(const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return R().bounded_side_3_object()
+               (static_cast<const typename R::Tetrahedron_3&>(*this), p);
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::has_on_boundary
+  (const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return oriented_side(p) == ON_ORIENTED_BOUNDARY;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::has_on_positive_side
+  (const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return oriented_side(p) == ON_POSITIVE_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::has_on_negative_side
+  (const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return oriented_side(p) == ON_NEGATIVE_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::has_on_bounded_side
+  (const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return bounded_side(p) == ON_BOUNDED_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::has_on_unbounded_side
+  (const typename TetrahedronC3<R>::Point_3 &p) const
+{
+  return bounded_side(p) == ON_UNBOUNDED_SIDE;
+}
+
+template < class R >
+inline
+typename R::Boolean
+TetrahedronC3<R>::is_degenerate() const
+{
+  return orientation() == COPLANAR;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_TETRAHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Translation_rep_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Translation_rep_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Translation_rep_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Translation_rep_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/Translation_rep_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Translation_rep_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/Translation_rep_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/Translation_rep_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_2.h
new file mode 100644
index 0000000..1a28b00
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_2.h
@@ -0,0 +1,75 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_TRIANGLE_2_H
+#define CGAL_CARTESIAN_TRIANGLE_2_H
+
+#include <CGAL/Cartesian/predicates_on_points_2.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template <class R_>
+class TriangleC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Vector_2             Vector_2;
+  typedef typename R_::Triangle_2           Triangle_2;
+
+  typedef cpp11::array<Point_2, 3>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                    R;
+
+  TriangleC2() {}
+
+  TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
+    : base(CGAL::make_array(p, q, r)) {}
+
+
+  const Point_2 &
+  vertex(int i) const
+  {
+    if (i>2) i = i%3;
+    else if (i<0) i = (i%3) + 3;
+    return (i==0) ? get_pointee_or_identity(base)[0] :
+      (i==1) ? get_pointee_or_identity(base)[1] :
+      get_pointee_or_identity(base)[2];
+  }
+  
+  const Point_2 &
+  operator[](int i) const
+  {
+    return vertex(i);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_TRIANGLE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_3.h
new file mode 100644
index 0000000..3f5e7f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Triangle_3.h
@@ -0,0 +1,146 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_TRIANGLE_3_H
+#define CGAL_CARTESIAN_TRIANGLE_3_H
+
+#include <CGAL/Handle_for.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template <class R_>
+class TriangleC3
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Triangle_3           Triangle_3;
+
+  typedef cpp11::array<Point_3, 3>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                     R;
+
+  TriangleC3() {}
+
+  TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
+    : base(CGAL::make_array(p, q, r)) {}
+
+  bool       operator==(const TriangleC3 &t) const;
+  bool       operator!=(const TriangleC3 &t) const;
+
+  Plane_3    supporting_plane() const;
+
+  bool       has_on(const Point_3 &p) const;
+  bool       is_degenerate() const;
+
+  const Point_3 & vertex(int i) const;
+  const Point_3 & operator[](int i) const;
+
+  FT         squared_area() const;
+};
+
+template < class R >
+bool
+TriangleC3<R>::operator==(const TriangleC3<R> &t) const
+{
+  if (CGAL::identical(base, t.base))
+      return true;
+
+  int i;
+  for(i=0; i<3; i++)
+    if ( vertex(0) == t.vertex(i) )
+       break;
+
+  return (i<3) && vertex(1) == t.vertex(i+1) && vertex(2) == t.vertex(i+2);
+}
+
+template < class R >
+inline
+bool
+TriangleC3<R>::operator!=(const TriangleC3<R> &t) const
+{
+  return !(*this == t);
+}
+
+template < class R >
+const typename TriangleC3<R>::Point_3 &
+TriangleC3<R>::vertex(int i) const
+{
+  if (i<0) i=(i%3)+3;
+  else if (i>2) i=i%3;
+  return (i==0) ? get_pointee_or_identity(base)[0] :
+         (i==1) ? get_pointee_or_identity(base)[1] :
+                  get_pointee_or_identity(base)[2];
+}
+
+template < class R >
+inline
+const typename TriangleC3<R>::Point_3 &
+TriangleC3<R>::operator[](int i) const
+{
+  return vertex(i);
+}
+
+template < class R >
+CGAL_KERNEL_MEDIUM_INLINE
+typename TriangleC3<R>::FT
+TriangleC3<R>::squared_area() const
+{
+  return internal::squared_area(vertex(0), vertex(1), vertex(2), R());
+}
+
+template < class R >
+inline
+typename TriangleC3<R>::Plane_3
+TriangleC3<R>::supporting_plane() const
+{
+  return Plane_3(vertex(0), vertex(1), vertex(2));
+}
+
+template < class R >
+inline
+bool
+TriangleC3<R>::
+has_on(const typename TriangleC3<R>::Point_3 &p) const
+{
+  return R().has_on_3_object()
+               (static_cast<const typename R::Triangle_3&>(*this), p);
+}
+
+template < class R >
+bool
+TriangleC3<R>::is_degenerate() const
+{
+  return collinear(vertex(0),vertex(1),vertex(2));
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_TRIANGLE_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_2.h
new file mode 100644
index 0000000..cbaae74
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_2.h
@@ -0,0 +1,153 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann
+
+#ifndef CGAL_CARTESIAN_VECTOR_2_H
+#define CGAL_CARTESIAN_VECTOR_2_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/array.h>
+#include <CGAL/constant.h>
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template < class R_ >
+class VectorC2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Vector_2             Vector_2;
+  typedef typename R_::Segment_2            Segment_2;
+  typedef typename R_::Ray_2                Ray_2;
+  typedef typename R_::Line_2               Line_2;
+  typedef typename R_::Direction_2          Direction_2;
+
+  typedef cpp11::array<FT, 2>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef typename Rep::const_iterator      Cartesian_const_iterator;
+
+  typedef R_                                R;
+
+  VectorC2() {}
+ 
+  VectorC2(const FT &x, const FT &y)
+    : base(CGAL::make_array(x, y)) {}
+
+  VectorC2(const FT &hx, const FT &hy, const FT &hw)
+    : base( hw != FT(1) ? CGAL::make_array(hx/hw, hy/hw)
+                        : CGAL::make_array(hx, hy) ) {}
+
+  const FT & x() const
+  {
+      return CGAL::get_pointee_or_identity(base)[0];
+  }
+
+  const FT & y() const
+  {
+      return CGAL::get_pointee_or_identity(base)[1];
+  }
+
+  const FT & hx() const
+  {
+      return x();
+  }
+
+  const FT & hy() const
+  {
+      return y();
+  }
+
+  const FT& hw() const
+  {
+    return constant<FT, 1>();
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return CGAL::get_pointee_or_identity(base).begin();
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return CGAL::get_pointee_or_identity(base).end();
+  }
+
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool 
+operator==(const VectorC2<R> &v, const VectorC2<R> &w)
+{
+  return w.x() == v.x() && w.y() == v.y();
+}
+
+template < class R >
+inline
+bool 
+operator!=(const VectorC2<R> &v, const VectorC2<R> &w)
+{
+  return !(v == w);
+}
+
+template < class R >
+inline
+bool
+operator==(const VectorC2<R> &v, const Null_vector &)
+{
+  return CGAL_NTS is_zero(v.x()) && CGAL_NTS is_zero(v.y());
+}
+
+template < class R >
+inline
+bool
+operator==(const Null_vector &n, const VectorC2<R> &v)
+{
+  return v == n;
+}
+
+template < class R >
+inline
+bool
+operator!=(const VectorC2<R> &v, const Null_vector &n)
+{
+  return !(v == n);
+}
+
+template < class R >
+inline
+bool
+operator!=(const Null_vector &n, const VectorC2<R> &v)
+{
+  return !(v == n);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_VECTOR_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_3.h
new file mode 100644
index 0000000..1580d3d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/Vector_3.h
@@ -0,0 +1,266 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author        : Andreas Fabri
+
+#ifndef CGAL_CARTESIAN_VECTOR_3_H
+#define CGAL_CARTESIAN_VECTOR_3_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/array.h>
+#include <CGAL/constant.h>
+
+namespace CGAL {
+
+template < class R_ >
+class VectorC3
+{
+// http://doc.cgal.org/latest/Manual/devman_code_format.html#secprogramming_conventions
+  typedef typename R_::FT                   FT_;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Ray_3                Ray_3;
+  typedef typename R_::Segment_3            Segment_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Direction_3          Direction_3;
+
+  typedef cpp11::array<FT_, 3>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef typename Rep::const_iterator      Cartesian_const_iterator;
+
+  typedef R_                                R;
+
+  VectorC3() {}
+
+  VectorC3(const Null_vector &n)
+  { *this = R().construct_vector_3_object()(n); }
+
+  VectorC3(const Point_3 &a, const Point_3 &b)
+  { *this = R().construct_vector_3_object()(a, b); }
+
+  explicit VectorC3(const Segment_3 &s)
+  { *this = R().construct_vector_3_object()(s); }
+
+  explicit VectorC3(const Ray_3 &r)
+  { *this = R().construct_vector_3_object()(r); }
+
+  explicit VectorC3(const Line_3 &l)
+  { *this = R().construct_vector_3_object()(l); }
+
+  VectorC3(const FT_ &x, const FT_ &y, const FT_ &z)
+    : base(CGAL::make_array(x, y, z)) {}
+
+  VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
+    : base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
+                       : CGAL::make_array(x, y, z) ) {}
+
+  const FT_ & x() const
+  {
+      return get_pointee_or_identity(base)[0];
+  }
+  const FT_ & y() const
+  {
+      return get_pointee_or_identity(base)[1];
+  }
+  const FT_ & z() const
+  {
+      return get_pointee_or_identity(base)[2];
+  }
+
+  const FT_ & hx() const
+  {
+      return x();
+  }
+  const FT_ & hy() const
+  {
+      return y();
+  }
+  const FT_ & hz() const
+  {
+      return z();
+  }
+  const FT_ & hw() const
+  {
+      return constant<FT_, 1>();
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return get_pointee_or_identity(base).begin();
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return get_pointee_or_identity(base).end();
+  }
+
+  const FT_ & cartesian(int i) const;
+  const FT_ & operator[](int i) const;
+  const FT_ & homogeneous(int i) const;
+
+  int dimension() const
+  {
+      return 3;
+  }
+
+  Vector_3 operator+(const VectorC3 &w) const;
+  Vector_3 operator-(const VectorC3 &w) const;
+  Vector_3 operator-() const;
+  Vector_3 operator/(const FT_ &c) const;
+  FT_ squared_length() const;
+  Direction_3 direction() const;
+};
+
+template < class R >
+inline
+bool
+operator==(const VectorC3<R> &v, const VectorC3<R> &w)
+{
+  return w.x() == v.x() && w.y() == v.y() && w.z() == v.z();
+}
+
+template < class R >
+inline
+bool
+operator!=(const VectorC3<R> &v, const VectorC3<R> &w)
+{
+  return !(v == w);
+}
+
+template < class R >
+inline
+bool
+operator==(const VectorC3<R> &v, const Null_vector &) 
+{
+  return CGAL_NTS is_zero(v.x()) && CGAL_NTS is_zero(v.y()) &&
+         CGAL_NTS is_zero(v.z());
+}
+
+template < class R >
+inline
+bool
+operator==(const Null_vector &n, const VectorC3<R> &v) 
+{
+  return v == n;
+}
+
+template < class R >
+inline
+bool
+operator!=(const VectorC3<R> &v, const Null_vector &n)
+{
+  return !(v == n);
+}
+
+template < class R >
+inline
+bool
+operator!=(const Null_vector &n, const VectorC3<R> &v)
+{
+  return !(v == n);
+}
+
+template < class R >
+inline
+const typename VectorC3<R>::FT_ &
+VectorC3<R>::cartesian(int i) const
+{
+  CGAL_kernel_precondition( (i>=0) & (i<3) );
+  if (i==0) return x();
+  if (i==1) return y();
+  return z();
+}
+
+template < class R >
+inline
+const typename VectorC3<R>::FT_ &
+VectorC3<R>::operator[](int i) const
+{
+  return cartesian(i);
+}
+
+template < class R >
+const typename VectorC3<R>::FT_ &
+VectorC3<R>::homogeneous(int i) const
+{
+  if (i==3) return hw();
+  return cartesian(i);
+}
+
+template < class R >
+inline
+typename VectorC3<R>::Vector_3
+VectorC3<R>::
+operator+(const VectorC3<R> &w) const
+{
+  return VectorC3<R>(x() + w.x(), y() + w.y(), z() + w.z());
+}
+
+template < class R >
+inline
+typename VectorC3<R>::Vector_3
+VectorC3<R>::operator-(const VectorC3<R> &w) const
+{
+  return VectorC3<R>(x() - w.x(), y() - w.y(), z() - w.z());
+}
+
+template < class R >
+inline
+typename VectorC3<R>::Vector_3
+VectorC3<R>::operator-() const
+{
+  return R().construct_opposite_vector_3_object()(*this);
+}
+
+template < class R >
+inline
+typename VectorC3<R>::FT_
+VectorC3<R>::squared_length() const
+{
+  return CGAL_NTS square(x()) + CGAL_NTS square(y()) + CGAL_NTS square(z());
+}
+
+template < class R >
+inline
+typename VectorC3<R>::Vector_3
+VectorC3<R>::
+operator/(const typename VectorC3<R>::FT_ &c) const
+{
+  return VectorC3<R>(x()/c, y()/c, z()/c);
+}
+
+template < class R >
+inline
+typename VectorC3<R>::Direction_3
+VectorC3<R>::direction() const
+{
+  return Direction_3(*this);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CARTESIAN_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/basic_constructions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/basic_constructions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/basic_constructions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/basic_constructions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/basic_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/basic_constructions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/basic_constructions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/basic_constructions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/ft_constructions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/ft_constructions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/ft_constructions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/ft_constructions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/ft_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/ft_constructions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/ft_constructions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/ft_constructions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/function_objects.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/line_constructions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/line_constructions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/line_constructions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/line_constructions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/plane_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/plane_constructions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/plane_constructions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/plane_constructions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/point_constructions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/point_constructions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/point_constructions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/point_constructions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/point_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/point_constructions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/point_constructions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/point_constructions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_directions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_directions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_directions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_directions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_planes_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_planes_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_planes_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_planes_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_points_2.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_points_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_points_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_points_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_points_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_points_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/predicates_on_points_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/predicates_on_points_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian/solve_3.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian/solve_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian/solve_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian/solve_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian_d.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cartesian_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Cartesian_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cartesian_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cartesian_matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cell_attribute.h b/3rdparty/CGAL-4.8/include/CGAL/Cell_attribute.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cell_attribute.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cell_attribute.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cell_attribute_with_point.h b/3rdparty/CGAL-4.8/include/CGAL/Cell_attribute_with_point.h
new file mode 100644
index 0000000..ede3dd3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cell_attribute_with_point.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_CELL_ATTRIBUTE_WITH_POINT_H
+#define CGAL_CELL_ATTRIBUTE_WITH_POINT_H 1
+
+#include <CGAL/Cell_attribute.h>
+
+namespace CGAL {
+
+  /** @file Cell_attribute_with_point.h
+   * Definition of cell attribute with point, with or without info.
+   */
+
+  /// Point associated with a cell.
+  template < class Point >
+  class Point_for_cell
+  {
+  public:
+    /// Contructor without parameter.
+    Point_for_cell()
+    {}
+
+    /// Contructor with a point in parameter.
+    Point_for_cell(const Point& apoint) : mpoint(apoint)
+    {}
+
+    /// Get the point associated with the cell.
+    Point& point()
+    { return mpoint; }
+
+    /// Get the point associated with the cell.
+    const Point& point() const
+    { return mpoint; }
+
+  protected:
+    /// The point associated with the cell.
+    Point mpoint;
+  };
+
+  /// Attribute associated with a point and an info.
+  template < class LCC, class Info_=void, class Tag=Tag_true,
+             class Functor_on_merge_=Null_functor,
+             class Functor_on_split_=Null_functor >
+  class Cell_attribute_with_point :
+    public Cell_attribute<LCC, Info_, Tag,
+                          Functor_on_merge_, Functor_on_split_>,
+    public Point_for_cell<typename LCC::Point>
+  {
+    template < unsigned int, class, class, class, class >
+    friend class Combinatorial_map_base;
+
+    template <class, class, class, class>
+    friend class Compact_container;
+
+  public:
+    typedef Cell_attribute_with_point<LCC, Info_, Tag, Functor_on_merge_,
+                                      Functor_on_split_> Self;
+
+    typedef Cell_attribute<LCC, Info_, Tag,
+                           Functor_on_merge_, Functor_on_split_> Base1;
+    typedef Point_for_cell<typename LCC::Point> Base2;
+
+    typedef typename LCC::Point             Point;
+    typedef typename LCC::Dart_handle       Dart_handle;
+    typedef typename LCC::Dart_const_handle Dart_const_handle;
+
+    typedef Info_                Info;
+    typedef Functor_on_merge_    Functor_on_merge;
+    typedef Functor_on_split_    Functor_on_split;
+
+    using Base1::info;
+
+    bool operator==(const Self& other) const
+    { return Base1::operator==(other) && this->point()==other.point(); }
+
+    bool operator!=(const Self& other) const
+    { return !operator==(other); }
+
+    // protected:
+    /// Default contructor.
+    Cell_attribute_with_point()
+    {}
+
+    /// Contructor with a point in parameter.
+    Cell_attribute_with_point(const Point& apoint) : Base2(apoint)
+    {}
+
+    /// Contructor with a point and an attribute in parameters.
+    Cell_attribute_with_point(const Point& apoint, const Info& ainfo) :
+      Base1(ainfo),
+      Base2(apoint)
+    {}
+  };
+
+  /// Attribute associated with a point and without info.
+  template < class LCC, class Tag,
+             class Functor_on_merge_,
+             class Functor_on_split_ >
+  class Cell_attribute_with_point<LCC, void, Tag,
+                                  Functor_on_merge_, Functor_on_split_> :
+    public Cell_attribute<LCC, void, Tag, Functor_on_merge_, Functor_on_split_>,
+    public Point_for_cell<typename LCC::Point>
+  {
+    template < unsigned int, class, class, class, class  >
+    friend class Combinatorial_map_base;
+
+    template <class, class, class, class>
+    friend class Compact_container;
+
+  public:
+    typedef Cell_attribute<LCC, void, Tag,
+                           Functor_on_merge_, Functor_on_split_> Base1;
+    typedef Point_for_cell<typename LCC::Point> Base2;
+
+    typedef void                            Info;
+    typedef typename LCC::Point             Point;
+    typedef typename LCC::Dart_handle       Dart_handle;
+    typedef typename LCC::Dart_const_handle Dart_const_handle;
+
+    typedef Functor_on_merge_ Functor_on_merge;
+    typedef Functor_on_split_ Functor_on_split;
+
+    bool operator==(const Cell_attribute_with_point& other) const
+    { return Base1::operator==(other) && this->point()==other.point(); }
+
+    bool operator!=(const Cell_attribute_with_point& other) const
+    { return !operator==(other); }
+
+    template<typename Cellattr>
+    bool operator==(const Cellattr&) const
+    { return false; }
+
+    //  protected:
+    /// Default contructor.
+    Cell_attribute_with_point()
+    {}
+
+    /// Contructor with a point in parameter.
+    Cell_attribute_with_point(const Point& apoint) : Base2(apoint)
+    {}
+  };
+} // namespace CGAL
+
+#endif // CGAL_CELL_ATTRIBUTE_WITH_POINT_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Cell_const_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Cell_const_iterators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Cell_const_iterators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Cell_const_iterators.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Cell_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Cell_iterators.h
new file mode 100644
index 0000000..fb5e9b7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Cell_iterators.h
@@ -0,0 +1,453 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_CELL_ITERATORS_H
+#define CGAL_CELL_ITERATORS_H 1
+
+#include <CGAL/Dart_iterators.h>
+#include <CGAL/Combinatorial_map_basic_operations.h>
+
+#include <boost/type_traits/is_same.hpp>
+
+// TODO do all the orbit iterator of any orbit ?
+
+namespace CGAL {
+
+  /** @file Cell_iterators.h
+   * All the cell iterators. Not commented in doxygen to avoid too much
+   * classes in the documentation.
+   * There are 3 classes:
+   *  - CMap_cell_iterator<Map,Ite,i,dim>: "tools" class used for the
+   *    two following iterators.
+   * * - CMap_one_dart_per_incident_cell_iterator<Map,Ite,i,dim>
+   * * - CMap_one_dart_per_cell_iterator<Map,Ite,i,dim>
+   */
+
+  //****************************************************************************
+  template <typename Map_,typename Ite, unsigned int i,
+            unsigned int dim=Map_::dimension,bool Const=false,
+            typename Use_mark=typename Ite::Use_mark>
+  class CMap_cell_iterator;
+  //****************************************************************************
+  /* Class CMap_cell_iterator<Map,Ite,i,dim,Tag_true>: to iterate onto the
+   * cells incident to the given iterator which uses mark.
+   */
+  template <typename Map_,typename Ite,unsigned int i,
+            unsigned int dim,bool Const>
+  class CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_true>: public Ite
+  {
+  public:
+    typedef CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_true> Self;
+    typedef Ite Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+  protected:
+    /// Unmark all the marked darts during the iterator.
+    void unmark_treated_darts()
+    {
+      if (this->mmap->is_whole_map_unmarked(mcell_mark_number)) return;
+
+      this->mmap->negate_mark(this->mmark_number);
+      this->mmap->negate_mark(mcell_mark_number);
+
+      Ite::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this),
+                           mcell_mark_number);
+
+      while (this->mmap->number_of_unmarked_darts(mcell_mark_number) > 0 ||
+             this->mmap->number_of_unmarked_darts(this->mmark_number) > 0)
+      {
+        this->operator++();
+      }
+
+      this->mmap->negate_mark(mcell_mark_number);
+      this->mmap->negate_mark(this->mmark_number);
+
+      CGAL_assertion(this->mmap->is_whole_map_unmarked(this->mmark_number));
+      CGAL_assertion(this->mmap->is_whole_map_unmarked(mcell_mark_number));
+    }
+
+  public:
+    /// Main constructor.
+    CMap_cell_iterator(Map& amap, Dart_handle adart):
+      Ite(amap, adart, amap.get_new_mark()),
+      mcell_mark_number(amap.get_new_mark())
+    {
+      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
+                              Tag_true>::value) );
+      CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number));
+
+      mark_cell<Map,i,dim>(amap, adart, mcell_mark_number);
+    }
+
+    /// Destructor.
+    ~CMap_cell_iterator()
+    {
+      if (this->mmap->get_number_of_times_mark_reserved(mcell_mark_number)==1)
+        unmark_treated_darts();
+      this->mmap->free_mark(mcell_mark_number);
+      this->mmap->free_mark(this->mmark_number);
+      this->mcell_mark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+      this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+    }
+
+    /// Copy constructor.
+    CMap_cell_iterator(const Self& aiterator):
+      Ite(aiterator),
+      mcell_mark_number(aiterator.mcell_mark_number)
+    {
+      this->mmap->share_a_mark(this->mmark_number);
+      this->mmap->share_a_mark(this->mcell_mark_number);
+    }
+
+    /// Assignment operator.
+    Self& operator=(const Self& aiterator)
+    {
+      if (this != &aiterator)
+      {
+        Ite::operator=(aiterator);
+        this->mmap->share_a_mark(this->mmark_number);
+        this->mmap->share_a_mark(mcell_mark_number);
+      }
+      return *this;
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      unmark_treated_darts();
+      Ite::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this), mcell_mark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      do
+      {
+        Ite::operator++();
+      }
+      while (this->cont() &&
+             this->mmap->is_marked((*this), mcell_mark_number));
+
+      if (this->cont())
+      {
+        mark_cell<Map,i,dim>(*this->mmap, (*this),
+                             mcell_mark_number);
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  private:
+    /// A mark used to mark treated cells.
+    typename Map::size_type mcell_mark_number;
+  };
+  //****************************************************************************
+  /* Class CMap_cell_iterator<Map,Ite,i,dim,Tag_false>: to iterate onto the
+   * cells incident to the given iterator which does not use mark.
+   */
+  template <typename Map_,typename Ite, unsigned int i,
+            unsigned int dim,bool Const>
+  class CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_false>: public Ite
+  {
+  public:
+    typedef CMap_cell_iterator<Map_,Ite,i,dim,Const,Tag_false> Self;
+    typedef Ite Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+  protected:
+    /// Unmark all the marked darts during the iterator.
+    void unmark_treated_darts()
+    {
+      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
+
+      this->mmap->negate_mark(mmark_number);
+
+      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
+
+      Ite::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this),
+                           mmark_number);
+      while (this->mmap->number_of_unmarked_darts(mmark_number) > 0)
+        this->operator++();
+      this->mmap->negate_mark(mmark_number);
+      CGAL_assertion(this->mmap->is_whole_map_unmarked(mmark_number));
+    }
+
+  public:
+    /// Main constructor.
+    CMap_cell_iterator(Map& amap, Dart_handle adart):
+      Ite(amap, adart),
+      mmark_number(amap.get_new_mark())
+    {
+      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
+                              Tag_true>::value) );
+      CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
+      mark_cell<Map,i,dim>(amap, adart, mmark_number);
+    }
+
+    /// Destructor.
+    ~CMap_cell_iterator()
+    {
+      if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
+        unmark_treated_darts();
+      this->mmap->free_mark(mmark_number);
+      this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+    }
+
+    /// Copy constructor.
+    CMap_cell_iterator(const Self& aiterator):
+      Ite(aiterator),
+      mmark_number(aiterator.mmark_number)
+    { this->mmap->share_a_mark(mmark_number); }
+
+    /// Assignment operator.
+    Self& operator=(const Self & aiterator)
+    {
+      if (this != &aiterator)
+      {
+        Ite::operator=(aiterator);
+        mmark_number = aiterator.mmark_number;
+        this->mmap->share_a_mark(mmark_number);
+      }
+      return *this;
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      unmark_treated_darts();
+      Ite::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      do
+      {
+        Ite::operator++();
+      }
+      while (this->cont() &&
+             this->mmap->is_marked((*this), mmark_number));
+
+      if (this->cont())
+        mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
+      return *this;
+    }
+
+  private:
+    /// A mark used to mark treated cells.
+    typename Map::size_type mmark_number;
+  };
+  //****************************************************************************
+  /* Class CMap_cell_iterator<Map,CMap_dart_iterator_basic_of_all<Map>,
+     i,dim,Tag_false>: specialization to iterate onto
+     * all the cells of the map.
+     */
+  template <typename Map_,unsigned int i,unsigned int dim,bool Const>
+  class CMap_cell_iterator<Map_,CMap_dart_iterator_basic_of_all<Map_,Const>,
+                           i,dim,Const,Tag_false>:
+    public CMap_dart_iterator_basic_of_all<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_all<Map_,Const> Base;
+    typedef CMap_cell_iterator<Map_,Base,i,dim,Const,Tag_false> Self;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+  protected:
+    /// Unmark all the marked darts during the iterator.
+    void unmark_treated_darts()
+    {
+      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
+
+      this->mmap->negate_mark(mmark_number);
+
+      if (this->mmap->is_whole_map_unmarked(mmark_number)) return;
+
+      Base::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this),
+                           mmark_number);
+      while (this->mmap->number_of_unmarked_darts(mmark_number) > 0)
+        this->operator++();
+      this->mmap->negate_mark(mmark_number);
+      CGAL_assertion(this->mmap->is_whole_map_unmarked(mmark_number));
+    }
+
+  public:
+    /// Main constructor.
+    CMap_cell_iterator(Map& amap):
+      Base(amap),
+      mmark_number(amap.get_new_mark())
+    {
+      CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
+                              Tag_true>::value) );
+      CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
+      mark_cell<Map,i,dim>(amap, (*this), mmark_number);
+    }
+
+   /// Constructor with a dart in parameter (for end iterator).
+    CMap_cell_iterator(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mmark_number(amap.get_new_mark())
+    {
+      if (adart!=this->mmap->null_handle)
+        mark_cell<Map,i,dim>(amap, (*this), mmark_number);
+    }
+
+    /// Destructor.
+    ~CMap_cell_iterator()
+    {
+      if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
+        unmark_treated_darts();
+      this->mmap->free_mark(mmark_number);
+      this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+    }
+
+    /// Copy constructor.
+    CMap_cell_iterator(const Self& aiterator):
+      Base(aiterator),
+      mmark_number(aiterator.mmark_number)
+    { this->mmap->share_a_mark(mmark_number); }
+
+    /// Assignment operator.
+    Self& operator=(const Self& aiterator)
+    {
+      if (this != &aiterator)
+      {
+        Base::operator=(aiterator);
+        mmark_number = aiterator.mmark_number;
+        this->mmap->share_a_mark(mmark_number);
+      }
+      return *this;
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      unmark_treated_darts();
+      Base::rewind();
+      mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      do
+      {
+        Base::operator++();
+      }
+      while (this->cont() &&
+             this->mmap->is_marked((*this), mmark_number));
+
+      if (this->cont())
+        mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
+      return *this;
+    }
+
+  private:
+    /// A mark used to mark treated cells.
+    typename Map::size_type mmark_number;
+  };
+  //****************************************************************************
+  /* Class CMap_one_dart_per_incident_cell_iterator<Map,i,j,dim>: to iterate
+   * onto one dart per i-cell incident to the given j-cell.
+   */
+  template <typename Map_,unsigned int i,unsigned int j,
+            unsigned int dim=Map_::dimension,bool Const=false>
+  class CMap_one_dart_per_incident_cell_iterator:
+    public CMap_cell_iterator<Map_,
+                              CMap_dart_iterator_basic_of_cell
+                              <Map_,j,dim,Const>, i,dim,Const>
+  {
+  public:
+    typedef CMap_one_dart_per_incident_cell_iterator<Map_,i,j,dim,Const> Self;
+    typedef CMap_cell_iterator<Map_,
+                               CMap_dart_iterator_basic_of_cell<Map_,j,
+                                                                dim,Const>,
+                               i,dim,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+    typedef Tag_false Use_mark;
+    typedef Tag_false Basic_iterator;
+
+    /// Main constructor.
+    CMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  /* Class CMap_one_dart_per_cell_iterator<Map,i,dim>: to iterate onto the
+   * i-cells incident of the map (one dart by each i-cell).
+   */
+  template <typename Map_,unsigned int i,unsigned int dim=Map_::dimension,
+            bool Const=false>
+  class CMap_one_dart_per_cell_iterator:
+    public CMap_cell_iterator<Map_,CMap_dart_iterator_basic_of_all<Map_,Const>,
+                              i,dim,Const>
+  {
+  public:
+    typedef CMap_one_dart_per_cell_iterator<Map_,i,dim,Const> Self;
+    typedef CMap_cell_iterator<Map_,
+                               CMap_dart_iterator_basic_of_all<Map_,Const>,
+                               i,dim,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+    typedef Tag_false Use_mark;
+    typedef Tag_false Basic_iterator;
+
+    /// Main constructor.
+    CMap_one_dart_per_cell_iterator(Map& amap): Base(amap)
+    {}
+    /// Constructor with a dart in parameter (for end iterator).
+    CMap_one_dart_per_cell_iterator(Map& amap, Dart_handle adart):
+	     Base(amap, adart)
+    {}
+  };
+//****************************************************************************
+//****************************************************************************
+} // namespace CGAL
+//******************************************************************************
+#endif // CGAL_CELL_ITERATORS_H
+//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Chinese_remainder_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Chinese_remainder_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Chinese_remainder_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Chinese_remainder_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circle_2.h
new file mode 100644
index 0000000..b12ccb6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circle_2.h
@@ -0,0 +1,302 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+//                 Sven Schoenherr
+
+#ifndef CGAL_CIRCLE_2_H
+#define CGAL_CIRCLE_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Circle_2 : public R_::Kernel_base::Circle_2
+{
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_2               Point_2;
+  typedef typename R_::Kernel_base::Circle_2 RCircle_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+
+  typedef Circle_2                           Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Circle_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef RCircle_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Circle_2() {}
+
+  Circle_2(const RCircle_2& t)
+    : RCircle_2(t) {}
+
+  Circle_2(const Point_2 &center, const FT &squared_radius,
+	   const Orientation &orientation)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, orientation)) {}
+
+  Circle_2(const Point_2 &center, const FT &squared_radius)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, COUNTERCLOCKWISE)) {}
+
+  Circle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, r)) {}
+
+  Circle_2(const Point_2 & p, const Point_2 & q,
+	   const Orientation &orientation)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, orientation)) {}
+
+  Circle_2(const Point_2 & p, const Point_2 & q)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, COUNTERCLOCKWISE)) {}
+
+  Circle_2(const Point_2 & p, const Point_2 & q, const FT &bulge)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, bulge)) {}
+
+  Circle_2(const Point_2 & center, const Orientation& orientation)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), orientation)) {}
+
+  Circle_2(const Point_2 & center)
+    : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), COUNTERCLOCKWISE)) {}
+
+  typename cpp11::result_of<typename R::Construct_center_2(Circle_2)>::type
+  center() const
+  {
+    return R().construct_center_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_squared_radius_2(Circle_2)>::type
+  squared_radius() const
+  {
+    return R().compute_squared_radius_2_object()(*this);
+  }
+
+  Orientation orientation() const
+  {
+    // This make_certain(), the uncertain orientation of circles, the orientation
+    // of circles, are all yucky.
+    return make_certain(R().orientation_2_object()(*this));
+  }
+
+
+  typename R::Bounded_side
+  bounded_side(const Point_2 &p) const
+  {
+    return R().bounded_side_2_object()(*this, p);
+  }
+
+  typename R::Oriented_side
+  oriented_side(const Point_2 &p) const
+  {
+    return R().oriented_side_2_object()(*this, p);
+  }
+
+  typename R::Boolean
+  has_on_boundary(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_BOUNDARY;
+  }
+
+  typename R::Boolean
+  has_on_bounded_side(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_BOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_unbounded_side(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_UNBOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_negative_side(const Point_2 &p) const
+  {
+    if (orientation() == COUNTERCLOCKWISE)
+      return has_on_unbounded_side(p);
+    return has_on_bounded_side(p);
+  }
+
+  typename R::Boolean
+  has_on_positive_side(const Point_2 &p) const
+  {
+    if (orientation() == COUNTERCLOCKWISE)
+      return has_on_bounded_side(p);
+    return has_on_unbounded_side(p);
+  }
+
+  typename R::Boolean
+  is_degenerate() const
+  {
+    return CGAL_NTS is_zero(squared_radius());
+  }
+
+  Circle_2
+  opposite() const
+  {
+    //return R().construct_opposite_circle_2_object()(*this);
+    return Circle_2(center(),
+		    squared_radius(),
+		    CGAL::opposite(orientation()) );
+  }
+
+  Bbox_2
+  bbox() const
+  {
+    return R().construct_bbox_2_object()(*this);
+  }
+
+  typename R::Boolean
+  operator==(const Circle_2 &c) const
+  {
+    return R().equal_2_object()(*this, c);
+  }
+
+  typename R::Boolean
+  operator!=(const Circle_2 &c) const
+  {
+    return !(*this == c);
+  }
+
+  Circle_2 transform(const Aff_transformation_2 &t) const
+  {
+    return t.transform(*this);
+  }
+
+  Circle_2 orthogonal_transform(const Aff_transformation_2 &t) const;
+
+
+};
+
+template <class R_>
+Circle_2<R_>
+Circle_2<R_>::
+orthogonal_transform(const typename R_::Aff_transformation_2& t) const
+{
+  typedef typename  R_::RT  RT;
+  typedef typename  R_::FT  FT;
+  typedef typename  R_::Vector_2  Vector_2;
+
+  Vector_2 vec(RT(1), RT(0) );   // unit vector // AF: was FT
+  vec = vec.transform(t);             // transformed
+  FT sq_scale = vec.squared_length();       // squared scaling factor
+
+  return Circle_2(t.transform(center()),
+                               sq_scale * squared_radius(),
+                               t.is_even() ? orientation()
+                                           : CGAL::opposite(orientation()));
+}
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Circle_2<R>& c)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        os << c.center() << ' ' << c.squared_radius() << ' '
+           << static_cast<int>(c.orientation());
+        break;
+    case IO::BINARY :
+        os << c.center();
+        write(os, c.squared_radius());
+        write(os, static_cast<int>(c.orientation()));
+        break;
+    default:
+        os << "Circle_2(" << c.center() <<  ", " << c.squared_radius() ;
+        switch (c.orientation()) {
+        case CLOCKWISE:
+            os << ", clockwise)";
+            break;
+        case COUNTERCLOCKWISE:
+            os << ", counterclockwise)";
+            break;
+        default:
+            os << ", collinear)";
+            break;
+        }
+        break;
+    }
+    return os;
+}
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Circle_2<R> &c)
+{
+  return insert(os, c);
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Circle_2<R>& c)
+{
+    typename R::Point_2 center;
+    typename R::FT squared_radius;
+    int o;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> center >> iformat(squared_radius) >> o;
+        break;
+    case IO::BINARY :
+        is >> center;
+        read(is, squared_radius);
+        is >> o;
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+	c = Circle_2<R>(center, squared_radius, static_cast<Orientation>(o));
+    return is;
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Circle_2<R> &c)
+{
+  return extract(is,c);
+}
+
+} //namespace CGAL
+
+#endif  // CGAL_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circle_2_Circle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Circle_2_Circle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circle_2_Circle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circle_2_Circle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circle_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Circle_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circle_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circle_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circle_type.h b/3rdparty/CGAL-4.8/include/CGAL/Circle_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circle_type.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circle_type.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_arc_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_arc_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_arc_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_arc_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_arc_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_arc_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_arc_point_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_arc_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_arc_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_arc_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_arc_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_border_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_border_parameterizer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_border_parameterizer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_border_parameterizer_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Circular_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Circular_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Circular_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Circular_arc_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h
new file mode 100644
index 0000000..c67f812
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h
@@ -0,0 +1,164 @@
+// Copyright (c) 2003-2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Monique Teillaud, Sylvain Pion, Pedro Machado
+
+// Partially supported by the IST Programme of the EU as a Shared-cost
+// RTD (FET Open) Project under Contract No  IST-2000-26473 
+// (ECG - Effective Computational Geometry for Curves and Surfaces) 
+// and a STREP (FET Open) Project under Contract No  IST-006413 
+// (ACS -- Algorithms for Complex Shapes)
+
+#ifndef CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
+#define CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
+
+#include <iostream>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Interval_nt.h>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+namespace internal {
+
+  template <class CK >
+  class Circular_arc_point_2_base
+  {
+    typedef typename CK::FT                      FT;
+    typedef typename CK::Root_of_2               Root_of_2;
+    typedef typename CK::Point_2                 Point_2;
+    
+  public: // fixme ?
+    typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
+    typedef typename CK::template Handle<Root_for_circles_2_2>::type  Base;
+    
+    Circular_arc_point_2_base() 
+    {}
+    
+    Circular_arc_point_2_base(const Root_for_circles_2_2 & np)
+      :  _p(np)
+    {}
+
+    Circular_arc_point_2_base(const Point_2 & p)
+      :  _p(p.x(),p.y()/*,1,1,-p.x()-p.y()*/)
+    {}
+
+    const Root_of_2 & x() const 
+    { return get_pointee_or_identity(_p).x(); }
+    
+    const Root_of_2 & y() const 
+    { return get_pointee_or_identity(_p).y(); }
+    
+    CGAL::Bbox_2 bbox() const
+    {
+      return get_pointee_or_identity(_p).bbox();
+    }
+
+    const Root_for_circles_2_2 & coordinates() const 
+    { return get_pointee_or_identity(_p); }
+
+    bool equal_ref(const Circular_arc_point_2_base &p) const
+    {
+      return CGAL::identical(_p, p._p);      
+    }
+
+  private:
+    Base _p;
+  };
+
+  template < typename CK >
+  std::ostream &
+  print(std::ostream & os, const Circular_arc_point_2_base<CK> &p)
+  {
+    return os << "CirclArcEndPoint_2(" << std::endl
+	      << p.x() << ", " << p.y() << ')';
+  }
+
+template < typename BK, typename Base_CK >
+class Filtered_bbox_circular_arc_point_2_base
+  : public Base_CK::Circular_arc_point_2
+{
+public:
+  typedef Filtered_bbox_circular_arc_point_2_base<BK,Base_CK> Self;
+  typedef typename Base_CK::Circular_arc_point_2 P_point;
+
+  typedef typename BK::Point_2               Point_2;
+  typedef typename BK::Root_for_circles_2_2  Root_for_circles_2_2;
+
+  ////Construction/////
+  Filtered_bbox_circular_arc_point_2_base()
+    : P_point(), bb(NULL)
+  {}
+
+  Filtered_bbox_circular_arc_point_2_base(const P_point& pt)
+    : P_point(pt), bb(NULL)
+  {}
+
+  explicit Filtered_bbox_circular_arc_point_2_base(const Root_for_circles_2_2 & np)
+    : P_point(np), bb(NULL)
+  {}
+
+  explicit Filtered_bbox_circular_arc_point_2_base(const Point_2 & p)
+    : P_point(p), bb(NULL)
+  {}
+
+  Filtered_bbox_circular_arc_point_2_base(const Self &c) 
+    : P_point(c), bb(c.bb ? new Bbox_2(*(c.bb)) : NULL)
+  {}
+
+  Filtered_bbox_circular_arc_point_2_base&
+  operator=(const Self& c) {
+    if(this != &c)
+    {
+      this->P_point::operator=(c);
+
+      if (bb != NULL){ 
+        delete bb;
+      }
+      bb = c.bb ? new Bbox_2(*(c.bb)) : NULL;
+    }
+    return *this;
+  }
+	
+  ~Filtered_bbox_circular_arc_point_2_base() {
+    if(bb) {
+      delete bb; 
+      bb = 0;
+    }
+  }
+
+  ////Bbox related accessors////
+  
+  bool has_no_bbox() const
+  { return (bb==NULL);}
+
+  Bbox_2  bbox() const
+  { 
+    if(this->has_no_bbox())
+      bb= new Bbox_2(P_point::bbox());
+              
+    return *bb;     
+  }
+
+private:
+  mutable Bbox_2         *bb;
+}; // end class Filtered_bbox_circular_arc_point_2_base
+
+
+} // namespace internal
+} // namespace CGAL
+
+#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_POINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Intersection_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Intersection_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Intersection_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Intersection_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Line_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Line_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/Line_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/Line_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/interface_macros.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/interface_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/interface_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/interface_macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_3.h
new file mode 100644
index 0000000..0b534be
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_3.h
@@ -0,0 +1,323 @@
+// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
+//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
+
+// Partially supported by the IST Programme of the EU as a 
+// STREP (FET Open) Project under Contract No  IST-006413 
+// (ACS -- Algorithms for Complex Shapes)
+
+#ifndef CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_3_H
+#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_3_H
+
+#include <CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h>
+#include <CGAL/Circular_kernel_3/Intersection_traits.h>
+#include <boost/tuple/tuple.hpp>
+
+namespace CGAL {
+  namespace internal{
+    template < class SK >
+    class Circular_arc_3 {
+      typedef typename SK::Plane_3              Plane_3;
+      typedef typename SK::Circle_3             Circle_3;
+      typedef typename SK::Sphere_3             Sphere_3;
+      typedef typename SK::Point_3              Point_3;
+      typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
+      typedef typename SK::Line_3               Line_3;
+      typedef typename SK::FT                   FT;
+
+    private:
+
+      typedef boost::tuple<Circle_3, Circular_arc_point_3, 
+                               Circular_arc_point_3> Rep;
+      typedef typename SK::template Handle<Rep>::type Base;
+
+      Base base;
+      mutable bool _full;
+      // It is the sign of the cross product 
+      // of the vector (Center -> S) x (Center -> T)
+      // it saves execution time for the has_on functor
+      Sign _sign_cross_product;
+
+    public:
+
+      const Sphere_3& reference_sphere(){
+        return get_ref_sphere(get_pointee_or_identity(base).template get<0>());
+      };
+
+        
+      Circular_arc_3()
+      {}
+
+      // The arc of circle goes from s to t in counterclockwise orientation
+      // in relation to the normal vector N of the supporting plane
+      // such that 
+      // if N.x != 0 then N.x > 0
+      // else if N.y != 0 -> N.y > 0
+      // else N.z > 0
+      // Interesting thing is that if _sign_cross_product is negative
+      // the arc is the bigger one (angle > pi)
+      Circular_arc_3(const Circle_3 &c, 
+                     const Circular_arc_point_3 &s,
+                     const Circular_arc_point_3 &t) 
+      : _full(false)
+      {
+        // l must pass through s and t, and s != t
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
+        CGAL_kernel_precondition(s != t);
+        base = Rep(c,s,t);
+        // we can optimize the computations of the sign (for the has_on functor), 
+        // by computing the vector s-c and t-s, in order to use them directly on 
+        // another compute_sign_of_cross_product function
+        // we can save time computing the substractions
+        // the problem is: more memory space is needed
+        _sign_cross_product =
+          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
+      }
+
+      Circular_arc_3(const Circle_3 &c, 
+                     const Point_3 &s,
+                     const Circular_arc_point_3 &t) 
+      : _full(false)
+      {
+        // l must pass through s and t, and s != t
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
+        CGAL_kernel_precondition(Circular_arc_point_3(s) != t);
+        base = Rep(c,s,t);
+        _sign_cross_product = 
+          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
+      }
+
+      Circular_arc_3(const Circle_3 &c, 
+                     const Circular_arc_point_3 &s,
+                     const Point_3 &t) 
+      : _full(false)
+      {
+        // l must pass through s and t, and s != t
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
+        CGAL_kernel_precondition(s != Circular_arc_point_3(t));
+        base = Rep(c,s,t);
+        _sign_cross_product = 
+          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
+      }
+
+      Circular_arc_3(const Circle_3 &c, 
+                     const Point_3 &s,
+                     const Point_3 &t) 
+      : _full(false)
+      {
+        // l must pass through s and t, and s != t
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,s));
+        CGAL_kernel_precondition(SK().has_on_3_object()(c,t));
+        CGAL_kernel_precondition(Circular_arc_point_3(s) != 
+                                 Circular_arc_point_3(t));
+        base = Rep(c,s,t);
+        _sign_cross_product = 
+          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>(s,t,c.center());
+      }
+
+      // This is the one of the two cases we want that s == t
+      // that makes the is_full() correct and complete
+      Circular_arc_3(const Circle_3 &c)
+      : _full(true)
+      {
+        const Plane_3 &p = c.supporting_plane();
+        if(is_zero(p.b()) && is_zero(p.c())) {
+          const Circular_arc_point_3 v = 
+	    SphericalFunctors::y_extremal_point<SK>(c,true);
+          base = Rep(c,v,v);
+        } else {
+          const Circular_arc_point_3 v = 
+	    SphericalFunctors::x_extremal_point<SK>(c,true);
+          base = Rep(c,v,v);
+        }
+        /* don't matter
+        _sign_cross_product = 0;
+        */
+      }
+
+      // This is the second case where we want that s == t
+      // that makes the is_full() correct and complete
+      Circular_arc_3(const Circle_3 &c,const Circular_arc_point_3& point)
+      : base(Rep(c,point,point)),_full(true)
+      {CGAL_kernel_precondition(SK().has_on_3_object()(c,point));}
+      
+      Circular_arc_3(const Circle_3 &c, 
+                     const Sphere_3 &s1, bool less_xyz_s1,
+                     const Sphere_3 &s2, bool less_xyz_s2) 
+      {
+         typedef typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type result_type;
+         std::vector<result_type> sols1, sols2;
+         // The spheres must not include the circle
+         CGAL_kernel_precondition(!SK().has_on_3_object()(s1,c));
+         CGAL_kernel_precondition(!SK().has_on_3_object()(s2,c));
+         SK().intersect_3_object()(c, s1, std::back_inserter(sols1));
+         SK().intersect_3_object()(c, s2, std::back_inserter(sols2));
+         // l must intersect s1 and s2
+         CGAL_kernel_precondition(sols1.size() > 0);
+         CGAL_kernel_precondition(sols2.size() > 0);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
+            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
+              &sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]
+            );
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
+            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
+              &sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]
+            );        
+         // the source and target must be different
+         CGAL_kernel_precondition(pair1.first != pair2.first);
+         *this = Circular_arc_3(c, pair1.first, pair2.first);
+      }
+
+      Circular_arc_3(const Circle_3 &c, 
+                     const Plane_3 &p1, bool less_xyz_p1,
+                     const Plane_3 &p2, bool less_xyz_p2) 
+      {
+        typedef typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type result_type;
+         std::vector<result_type> sols1, sols2;
+         // The planes must not include the circle
+         CGAL_kernel_precondition(!SK().has_on_3_object()(p1,c));
+         CGAL_kernel_precondition(!SK().has_on_3_object()(p2,c));
+         SK().intersect_3_object()(c, p1, std::back_inserter(sols1));
+         SK().intersect_3_object()(c, p2, std::back_inserter(sols2));
+         // l must intersect s1 and s2
+         CGAL_kernel_precondition(sols1.size() > 0);
+         CGAL_kernel_precondition(sols2.size() > 0);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
+           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
+              &sols1[(sols1.size()==1)?(0):(less_xyz_p1?0:1)]
+            );
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
+           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(
+              &sols2[(sols2.size()==1)?(0):(less_xyz_p2?0:1)]
+            );                
+         // the source and target must be different
+         CGAL_kernel_precondition(pair1.first != pair2.first);
+         *this = Circular_arc_3(c, pair1.first, pair2.first);
+      }
+
+      Circular_arc_3(const Point_3 &begin,
+		     const Point_3 &middle,
+		     const Point_3 &end)
+      {
+	CGAL_kernel_precondition(!typename SK::Collinear_3()(begin, middle, end));
+	const Circle_3 c = Circle_3(begin, middle, end);
+	base = Rep(c,begin,end);
+        _sign_cross_product =
+          CGAL::SphericalFunctors::compute_sign_of_cross_product<SK>
+	         (begin,end,c.center());
+      }
+
+      const Circle_3& supporting_circle() const 
+      {
+        return get_pointee_or_identity(base).template get<0>();
+      }
+
+      const Circular_arc_point_3& source() const 
+      {
+        return get_pointee_or_identity(base).template get<1>();
+      }
+
+      const Circular_arc_point_3& target() const 
+      {
+        return get_pointee_or_identity(base).template get<2>();
+      }
+
+      Plane_3 supporting_plane() const {
+        return supporting_circle().supporting_plane();
+      }
+
+      Point_3 center() const {
+        return supporting_circle().center();
+      }
+
+      FT squared_radius() const {
+        return supporting_circle().squared_radius();
+      }
+
+      Sphere_3 diametral_sphere() const {
+        return supporting_circle().diametral_sphere();
+      }
+
+      bool is_full() const {
+        return _full;
+      }
+
+      Sign sign_cross_product() const {
+        return _sign_cross_product;
+      }
+
+      double approximate_angle() const {
+        if(is_full()) return 2.0*CGAL_PI;
+        const double x1 = to_double(source().x());
+        const double y1 = to_double(source().y());
+        const double z1 = to_double(source().z());
+        const double x2 = to_double(target().x());
+        const double y2 = to_double(target().y());
+        const double z2 = to_double(target().z());
+        const double dx = x2-x1;
+        const double dy = y2-y1;
+        const double dz = z2-z1;
+        const double d_sq = dx*dx + dy*dy + dz*dz;
+        const double r_sq = to_double(squared_radius());
+        const double ap_ang = 2.0 * std::asin(0.5 * std::sqrt(d_sq / r_sq));
+        if(sign_cross_product() == NEGATIVE) return 2.0 * CGAL_PI - ap_ang;
+        else return ap_ang;
+      }
+
+      double approximate_squared_length() const {
+        const double ang = approximate_angle();
+        return ang * ang * to_double(squared_radius());
+      }
+
+      // It is of course possible to increase the precision
+      // maybe it will be done after
+      CGAL::Bbox_3 bbox() const {
+        return supporting_circle().bbox();
+      }
+
+      bool operator==(const Circular_arc_3 &) const;
+      bool operator!=(const Circular_arc_3 &) const;
+
+    };
+
+    template < class SK >
+    CGAL_KERNEL_INLINE
+    bool
+    Circular_arc_3<SK>::operator==(const Circular_arc_3<SK> &t) const
+    {
+      if (CGAL::identical(base, t.base))
+        return true;		
+      return CGAL::SphericalFunctors::non_oriented_equal<SK>(*this, t);
+    }
+
+    template < class SK >
+    CGAL_KERNEL_INLINE
+    bool
+    Circular_arc_3<SK>::operator!=(const Circular_arc_3<SK> &t) const
+    {
+      return !(*this == t);
+    }
+
+  }
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h
new file mode 100644
index 0000000..8cea92f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h
@@ -0,0 +1,255 @@
+// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
+//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
+
+// Partially supported by the IST Programme of the EU as a 
+// STREP (FET Open) Project under Contract No  IST-006413 
+// (ACS -- Algorithms for Complex Shapes)
+
+#ifndef CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
+#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
+
+#include <iostream>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Handle.h>
+#include <CGAL/Circular_kernel_3/Intersection_traits.h>
+//#include <CGAL/global_functions_on_roots_and_polynomials_2_2.h> 
+// fixme, devrait
+// appeler fonction de global_functions_on_circular_arcs
+
+namespace CGAL {
+  namespace internal {
+
+template <class SK >
+class Circular_arc_point_3
+{
+  typedef typename SK::FT                         FT;
+  typedef typename SK::Root_of_2                  Root_of_2;
+  typedef typename SK::Point_3                    Point_3;
+  typedef typename SK::Algebraic_kernel           Algebraic_kernel;
+  typedef typename Algebraic_kernel::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
+  typedef typename Algebraic_kernel::Polynomial_1_3             Polynomial_1_3;
+  typedef typename Algebraic_kernel::Polynomials_for_line_3     Polynomials_for_line_3;
+  typedef typename SK::Line_3                     Line_3;
+  typedef typename SK::Plane_3                    Plane_3;
+  typedef typename SK::Sphere_3                   Sphere_3;
+  typedef typename SK::Circle_3                   Circle_3;
+  typedef typename SK::Root_for_spheres_2_3       Root_for_spheres_2_3;
+
+  typedef Root_for_spheres_2_3  Rep__;
+  typedef typename SK::template Handle<Rep__>::type  Base;
+
+  Base base;
+
+public: 
+
+  Circular_arc_point_3() {}
+	
+  Circular_arc_point_3(const Root_of_2 & x,
+                       const Root_of_2 & y,
+                       const Root_of_2 & z)
+  : base(x,y,z){}
+
+  Circular_arc_point_3(const Root_for_spheres_2_3 & np)
+  : base(np){}
+
+  Circular_arc_point_3(const Point_3 & p)
+  : base(p.x(),p.y(),p.z()){}
+
+  Circular_arc_point_3(const Sphere_3 &s1, 
+                       const Sphere_3 &s2,
+                       const Sphere_3 &s3,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Sphere_3, Sphere_3, Sphere_3>::type> sols;
+    SK().intersect_3_object()(s1, s2, s3, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);
+      *this = pair->first.rep();
+    } 
+  }
+
+  Circular_arc_point_3(const Plane_3 &p, 
+                       const Sphere_3 &s1,
+                       const Sphere_3 &s2,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Plane_3, Sphere_3, Sphere_3>::type> sols;
+    SK().intersect_3_object()(p, s1, s2, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);
+      *this = pair->first.rep();
+    } 
+  }
+
+  Circular_arc_point_3(const Plane_3 &p1, 
+                       const Plane_3 &p2,
+                       const Sphere_3 &s,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Plane_3, Plane_3, Sphere_3>::type> sols;
+    SK().intersect_3_object()(p1, p2, s, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);      
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    }
+  }
+
+  Circular_arc_point_3(const Line_3 &l,
+                       const Sphere_3 &s,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
+    SK().intersect_3_object()(l, s, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    }
+  }
+
+  Circular_arc_point_3(const Circle_3 &c,
+                       const Plane_3 &p,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type> sols;
+    SK().intersect_3_object()(c, p, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    }
+  }
+
+  Circular_arc_point_3(const Circle_3 &c,
+                       const Sphere_3 &s,
+                       const bool less_xyz = true) {
+    std::vector<typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type> sols;
+    SK().intersect_3_object()(c, s, std::back_inserter(sols));
+    // s1,s2,s3 must intersect
+    CGAL_kernel_precondition(sols.size() != 0);
+    if(sols.size() == 1) {
+      // the intersection must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    } else {
+      // the intersections must be a point
+      const std::pair<typename SK::Circular_arc_point_3, unsigned>* pair=
+        boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[less_xyz?0:1]);
+      CGAL_kernel_precondition(pair!=NULL);            
+      *this = pair->first.rep();
+    }
+  }
+
+  const Root_of_2 & x() const { return get_pointee_or_identity(base).x(); }
+  const Root_of_2 & y() const { return get_pointee_or_identity(base).y(); }
+  const Root_of_2 & z() const { return get_pointee_or_identity(base).z(); }
+	  
+  const Root_for_spheres_2_3 & coordinates() const { return get_pointee_or_identity(base); }
+
+  const CGAL::Bbox_3 bbox() const {
+    return get_pointee_or_identity(base).bbox();
+  }
+
+  bool operator==(const Circular_arc_point_3 &) const;
+  bool operator!=(const Circular_arc_point_3 &) const;
+
+};
+
+template < class SK >
+CGAL_KERNEL_INLINE
+bool
+Circular_arc_point_3<SK>::operator==(const Circular_arc_point_3<SK> &t) const
+{
+  if (CGAL::identical(base, t.base))
+      return true;
+  return x() == t.x() &&
+         y() == t.y() &&
+         z() == t.z();
+}
+
+template < class SK >
+CGAL_KERNEL_INLINE
+bool
+Circular_arc_point_3<SK>::operator!=(const Circular_arc_point_3<SK> &t) const
+{
+  return !(*this == t);
+}
+    
+template < typename SK >
+std::ostream &
+print(std::ostream & os, const Circular_arc_point_3<SK> &p)
+{
+  return os << "CirclArcEndPoint_3(" << p.x() << ", " << p.y() << ')' << std::endl;
+}
+
+  } // namespace internal
+} // namespace CGAL
+
+#endif // CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Intersection_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Intersection_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/Intersection_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Intersection_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Line_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Line_arc_3.h
new file mode 100644
index 0000000..1ee15c1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/Line_arc_3.h
@@ -0,0 +1,206 @@
+// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
+//             Sebastien Loriot, Julien Hazebrouck, Damien Leroy
+
+// Partially supported by the IST Programme of the EU as a 
+// STREP (FET Open) Project under Contract No  IST-006413 
+// (ACS -- Algorithms for Complex Shapes)
+
+#ifndef CGAL_SPHERICAL_KERNEL_LINE_ARC_3_H
+#define CGAL_SPHERICAL_KERNEL_LINE_ARC_3_H
+
+#include <CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h>
+#include <CGAL/Circular_kernel_3/Intersection_traits.h>
+#include <boost/tuple/tuple.hpp>
+
+namespace CGAL {
+  namespace internal{
+    template <class SK> class Line_arc_3 {
+
+      typedef typename SK::Plane_3              Plane_3;
+      typedef typename SK::Sphere_3             Sphere_3;
+      typedef typename SK::Point_3              Point_3;
+      typedef typename SK::Segment_3            Segment_3;
+      typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
+      typedef typename SK::Line_3               Line_3;
+      typedef typename SK::FT                   FT;
+
+    private:
+      typedef boost::tuple<Line_3, Circular_arc_point_3, 
+                             Circular_arc_point_3>  Rep;
+      typedef typename SK::template Handle<Rep>::type  Base;
+
+      Base base;
+      mutable unsigned char begin_less_xyz_than_end_flag;
+
+      bool begin_less_xyz_than_end() const {
+        if(begin_less_xyz_than_end_flag == 0) {
+          if(SK().compare_xyz_3_object()(source(), target()) < 0)
+            begin_less_xyz_than_end_flag = 2;
+          else begin_less_xyz_than_end_flag = 1;
+        } return begin_less_xyz_than_end_flag == 2;
+      }
+
+    public:
+      Line_arc_3()
+      : begin_less_xyz_than_end_flag(0) 
+      {}
+
+      Line_arc_3(const Line_3 &l, 
+                 const Circular_arc_point_3 &s,
+                 const Circular_arc_point_3 &t) 
+      : begin_less_xyz_than_end_flag(0)
+      {
+        // l must pass through s and t, and s != t
+        CGAL_kernel_precondition(SK().has_on_3_object()(l,s));
+        CGAL_kernel_precondition(SK().has_on_3_object()(l,t));
+        CGAL_kernel_precondition(s != t);
+        base = Rep(l,s,t);
+      }
+
+      Line_arc_3(const Segment_3 &s) 
+      : begin_less_xyz_than_end_flag(0)
+      {
+        base = Rep(s.supporting_line(),
+                   s.source(),
+                   s.target());
+      }
+
+      Line_arc_3(const Point_3 &s,
+                 const Point_3 &t) 
+      : begin_less_xyz_than_end_flag(0)
+      {
+        CGAL_kernel_precondition(s != t);
+        base = Rep(SK().construct_line_3_object()(s,t),s,t);
+      }
+
+      Line_arc_3(const Line_3 &l, 
+                 const Sphere_3 &s,
+                 bool less_xyz_first = true) 
+      {
+        std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
+         SK().intersect_3_object()(l, s, std::back_inserter(sols));
+         // l must intersect s in 2 points 
+         CGAL_kernel_precondition(sols.size() == 2);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
+           *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[0]);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
+            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols[1]);
+         if(less_xyz_first) {
+           *this = Line_arc_3(l, pair1.first, pair2.first);
+         } else {
+           *this = Line_arc_3(l, pair2.first, pair1.first);
+         } 
+      }
+
+      Line_arc_3(const Line_3 &l, 
+                 const Sphere_3 &s1, bool less_xyz_s1,
+                 const Sphere_3 &s2, bool less_xyz_s2) 
+      {
+        std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols1, sols2;
+         SK().intersect_3_object()(l, s1, std::back_inserter(sols1));
+         SK().intersect_3_object()(l, s2, std::back_inserter(sols2));
+         // l must intersect s1 and s2
+         CGAL_kernel_precondition(sols1.size() > 0);
+         CGAL_kernel_precondition(sols2.size() > 0);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair1=
+            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]);
+         const std::pair<typename SK::Circular_arc_point_3, unsigned>& pair2=
+            *boost::get<std::pair<typename SK::Circular_arc_point_3, unsigned> >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]);
+         // the source and target must be different
+         CGAL_kernel_precondition(pair1.first != pair2.first);
+         *this = Line_arc_3(l, pair1.first, pair2.first);
+      }
+
+      Line_arc_3(const Line_3 &l, 
+                 const Plane_3 &p1,
+                 const Plane_3 &p2) 
+      {
+         // l must not be on p1 or p2
+         CGAL_kernel_precondition(!SK().has_on_3_object()(p1,l));
+         CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
+         // l must intersect p1 and p2
+         typedef typename SK3_Intersection_traits<SK, Line_3, Plane_3>::type Intersection;
+         Intersection i1 = SK().intersect_3_object()(l, p1);
+         Intersection i2 = SK().intersect_3_object()(l, p2);
+         const typename SK::Point_3* point1=boost::get<typename SK::Point_3>( & *i1 );
+         const typename SK::Point_3* point2=boost::get<typename SK::Point_3>( & *i2 );
+         CGAL_assertion(point1!=NULL);
+         CGAL_assertion(point2!=NULL);
+         // the source and target must be different
+         CGAL_kernel_precondition(*point1 != *point2);
+         *this = Line_arc_3(l, *point1, *point2);
+      }
+
+      const Line_3& supporting_line() const 
+      {
+        return get_pointee_or_identity(base).template get<0>();
+      }
+
+      const Circular_arc_point_3& source() const 
+      {
+        return get_pointee_or_identity(base).template get<1>();
+      }
+
+      const Circular_arc_point_3& target() const 
+      {
+        return get_pointee_or_identity(base).template get<2>();
+      }
+
+      const Circular_arc_point_3& lower_xyz_extremity() const
+      {
+        return begin_less_xyz_than_end() ? source() : target();
+      }
+
+      const Circular_arc_point_3& higher_xyz_extremity() const
+      {
+        return begin_less_xyz_than_end() ? target() : source();
+      }
+
+      const CGAL::Bbox_3 bbox() const {
+        return source().bbox() + target().bbox();
+      }
+
+      bool operator==(const Line_arc_3 &) const;
+      bool operator!=(const Line_arc_3 &) const;
+
+    };
+
+    template < class SK >
+    CGAL_KERNEL_INLINE
+    bool
+    Line_arc_3<SK>::operator==(const Line_arc_3<SK> &t) const
+    {
+      if (CGAL::identical(base, t.base))
+        return true;
+      return CGAL::SphericalFunctors::non_oriented_equal<SK>(*this, t);
+    }
+
+    template < class SK >
+    CGAL_KERNEL_INLINE
+    bool
+    Line_arc_3<SK>::operator!=(const Line_arc_3<SK> &t) const
+    {
+      return !(*this == t);
+    }
+
+  }
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/interface_macros.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/interface_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/interface_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/interface_macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_intersections.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_intersections.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_intersections.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_intersections.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_type_equality_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_type_equality_wrapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circular_kernel_type_equality_wrapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circular_kernel_type_equality_wrapper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circulator/Circulator_adapters.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator/Circulator_adapters.h
new file mode 100644
index 0000000..eae2fde
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circulator/Circulator_adapters.h
@@ -0,0 +1,701 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+
+#ifndef CGAL_CIRCULATOR_IMPL_H
+#define CGAL_CIRCULATOR_IMPL_H 1
+
+#include <CGAL/circulator.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+template < class  S>
+class Forward_circulator_over_struct
+    : public Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
+public:
+
+// DEFINITION
+//
+// Given a structure `S' that have a data member `S* next' that realizes a
+// ring like data structure the adaptor
+// `Forward_circulator_over_struct< S>' provides a forward circulator
+// for it. If the structure `S' has additionally a second data member of
+// type `S* prev' that realizes the reverse direction the adaptor
+// `Bidirectional_circulator_over_struct< S>' provides a bidirectional
+// circulator for it. In addition, adaptors for const circulators are
+// provided with the names `Forward_const_circulator_over_struct< S>'
+// and `Bidirectional_const_circulator_over_struct< S>'. A circulator
+// becomes invalid whenever the object it refers to gets deleted from the
+// data structure.
+
+    typedef Forward_circulator_over_struct<S> Self;
+    typedef Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t> Base1;
+    typedef typename Base1::reference reference;
+    typedef typename Base1::pointer   pointer;
+
+// CREATION
+//
+// New creation variable is: `circ'
+
+    Forward_circulator_over_struct() {}
+        // a circulator `circ' with singular value.
+
+    Forward_circulator_over_struct( S* ptr)
+        : Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>( ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    reference  operator*()             const { return *(S*)this->_ptr;}
+    pointer    operator->()            const { return  (S*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = ((S*)this->_ptr)->next;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+};
+
+
+template < class  S>
+class Forward_const_circulator_over_struct
+    : public Forward_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
+public:
+
+    typedef Forward_const_circulator_over_struct<S> Self;
+    typedef const S&  reference;
+    typedef const S*  pointer;
+
+// CREATION
+
+    Forward_const_circulator_over_struct() {}
+        // a circulator `circ' with singular value.
+
+    Forward_const_circulator_over_struct( const S* ptr)
+        : Forward_circulator_ptrbase<S,std::ptrdiff_t,
+                                     std::size_t>((void*)ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    reference  operator*()             const { return *(const S*)this->_ptr;}
+    pointer    operator->()            const { return  (const S*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = ((S*)this->_ptr)->next;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+};
+
+
+template < class  S>
+class Bidirectional_circulator_over_struct
+  : public Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
+public:
+
+    typedef Bidirectional_circulator_over_struct<S> Self;
+    typedef Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,
+                                             std::size_t> Base1;
+    typedef typename Base1::reference reference;
+    typedef typename Base1::pointer   pointer;
+
+// CREATION
+//
+// New creation variable is: `circ'
+
+    Bidirectional_circulator_over_struct() {}
+        // a circulator `circ' with singular value.
+
+    Bidirectional_circulator_over_struct( S* ptr)
+        : Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,
+                                           std::size_t>( ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    reference  operator*()             const { return *(S*)this->_ptr;}
+    pointer    operator->()            const { return  (S*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = ((S*)this->_ptr)->next;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        this->_ptr = ((S*)this->_ptr)->prev;
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+};
+
+
+template < class  S>
+class Bidirectional_const_circulator_over_struct
+  : public Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>{
+public:
+
+    typedef Bidirectional_const_circulator_over_struct<S> Self;
+    typedef const S&  reference;
+    typedef const S*  pointer;
+
+// CREATION
+
+    Bidirectional_const_circulator_over_struct() {}
+        // a circulator `circ' with singular value.
+
+    Bidirectional_const_circulator_over_struct( const S* ptr)
+        : Bidirectional_circulator_ptrbase<S,std::ptrdiff_t,std::size_t>(
+            (void*)ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    reference  operator*()             const { return *(const S*)this->_ptr;}
+    pointer    operator->()            const { return  (const S*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = ((S*)this->_ptr)->next;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        this->_ptr = ((S*)this->_ptr)->prev;
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+};
+template < class  C>
+class Forward_circulator_over_class
+    : public Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
+public:
+    typedef Forward_circulator_over_class<C> Self;
+
+// DEFINITION
+//
+// Given a class `C' that has a member function `C* next()' that realizes
+// a ring like data structure the adaptor
+// `Forward_circulator_over_class<C>' provides a forward circulator
+// for it. If the class `C' has additionally a second member function `C*
+// prev()' that realizes the reverse direction the adaptor
+// `Bidirectional_circulator_over_class<C>' provides a bidirectional
+// circulator for it. In addition, adaptors for const circulators are
+// provided with the names `Forward_const_circulator_over_class<C>'
+// and `Bidirectional_const_circulator_over_class<C>'. A circulator
+// becomes invalid whenever the object it refers to gets deleted from the
+// data structure.
+
+    Forward_circulator_over_class() {}
+        // a circulator `circ' with a singular value.
+
+    Forward_circulator_over_class( C* ptr)
+        : Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>( ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+//
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    C&   operator*()                   const { return *(C*)this->_ptr;}
+    C*   operator->()                  const { return  (C*)this->_ptr;}
+    Self& operator++() {
+        this->_ptr = ((C*)this->_ptr)->next();
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+};
+
+template < class  C>
+class Forward_const_circulator_over_class
+    : public Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
+public:
+    typedef Forward_const_circulator_over_class<C> Self;
+
+    Forward_const_circulator_over_class() {}
+        // a circulator `circ' with singular value.
+
+    Forward_const_circulator_over_class( const C* ptr)
+        : Forward_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>
+            ((void*)ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+//
+// OPERATIONS
+
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    const C&  operator*()              const { return *(C*)this->_ptr;}
+    const C*  operator->()             const { return  (C*)this->_ptr;}
+    Self& operator++() {
+        this->_ptr = (void*)(((C*)this->_ptr)->next());
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+};
+
+template < class  C>
+class Bidirectional_circulator_over_class
+  : public Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
+public:
+    typedef Bidirectional_circulator_over_class<C> Self;
+
+    Bidirectional_circulator_over_class() {}
+        // a circulator `circ' with singular value.
+
+    Bidirectional_circulator_over_class( C* ptr)
+        : Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>
+            (ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+//
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    C&   operator*()                   const { return *(C*)this->_ptr;}
+    C*   operator->()                  const { return  (C*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = ((C*)this->_ptr)->next();
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        this->_ptr = ((C*)this->_ptr)->prev();
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+};
+
+template < class  C>
+class Bidirectional_const_circulator_over_class
+  : public Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>{
+public:
+    typedef Bidirectional_const_circulator_over_class<C> Self;
+//
+// CREATION
+
+    Bidirectional_const_circulator_over_class() {}
+        // a circulator `circ' with singular value.
+
+    Bidirectional_const_circulator_over_class( const C* ptr)
+        : Bidirectional_circulator_ptrbase<C,std::ptrdiff_t,std::size_t>(
+            (void*)ptr) {}
+        // a circulator `circ' initialized to point to the element `*ptr'.
+
+//
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return this->_ptr == NULL;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c)    const { return this->_ptr == c._ptr; }
+    bool operator!=( const Self& c)    const { return !(*this == c); }
+    const C&  operator*()              const { return *(C*)this->_ptr;}
+    const C*  operator->()             const { return  (C*)this->_ptr;}
+
+    Self& operator++() {
+        this->_ptr = (void*)(((C*)this->_ptr)->next());
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        this->_ptr = (void*)(((C*)this->_ptr)->prev());
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+};
+template < class A, class T, class U, class I>
+class Circulator_over_array
+    : public Random_access_circulator_ptrbase<T,I,U>{
+    U _size;
+    U _i;
+public:
+
+// DEFINITION
+//
+// Given a data structure `A' that provides random access with an index of
+// type `U' to its sequence of stored elements of type `T' with the member
+// function `operator[]' the adaptor `Circulator_over_array< A, T, U,
+// I>' provides a random access circulator for `A'. The corresponding
+// const circulator is `Const_circulator_over_array< A, T, U, I>'. All
+// circulators for an array `a' become invalid whenever `a' changes its
+// size (due to deletions or insertions).
+//
+// `A' is a random access data structure and `T' its value type. `U' is
+// the unsigned integral type carrying the size of the array and the
+// actual index within the container. `I' is the signed integral type used
+// as distance type and as index type in the random access circulator.
+
+// TYPES
+
+    typedef A                              Array;
+    typedef Circulator_over_array<A,T,U,I> Self;
+
+// CREATION
+
+    Circulator_over_array() : _size(0), _i(0) {}
+        // a circulator `circ' with singular value.
+
+    Circulator_over_array( A& array, U size, U start = 0)
+        : Random_access_circulator_ptrbase<T,I,U>( &array),
+          _size( size), _i(start) {}
+        // a circulator `circ' initialized to refer to the element
+        // `(array.*access)(start)'. The circulator `circ' contains a
+        // singular value if `start >= size'. Precondition: The
+        // expressions `(array.*access)(i)' are valid in the range
+        // 0 <= i < `size' .
+
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return _i >= _size;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c) const {
+        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
+        CGAL_assertion( _size == c._size); // same size when instantiated ?
+        return _i == c._i;
+    }
+    bool operator!=( const Self& c) const { return !(*this == c); }
+    T&  operator*() const {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        return ((A*)this->_ptr)->operator[](_i);
+    }
+    T*  operator->() const {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        return &(((A*)this->_ptr)->operator[](_i));
+    }
+    Self& operator++() {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        ++ _i;
+        if ( _i >= _size)
+            _i = 0;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        if ( _i <= 0)
+            _i = _size - 1;
+        else
+            -- _i;
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+    Self& operator+=( I n);
+    Self  operator+( I n) const {
+        Self tmp = *this;
+        return tmp += n;
+    }
+    Self& operator-=( I n) { return operator+=( -n); }
+    Self  operator-( I n) const {
+        Self tmp = *this;
+        return tmp += -n;
+    }
+    I     operator-( const Self& c) const {
+        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
+        CGAL_assertion( _size == c._size); // same size when instantiated ?
+        return _i - c._i;
+    }
+    T&    operator[](I n) const {
+        Self tmp = *this;
+        tmp += n;
+        return tmp.operator*();
+    }
+    Self  min_circulator() {
+        return Self( *((A*)this->_ptr), _size);
+    }
+    // no relational ordering
+};
+
+template < class Dist, class  A, class  T, class U, class  I>
+inline
+Circulator_over_array< A, T, U, I>
+operator+( Dist n, const Circulator_over_array< A, T, U, I>& circ) {
+    Circulator_over_array< A, T, U, I> tmp = circ;
+    return tmp += I(n);
+}
+
+template < class A, class T, class U, class I>
+Circulator_over_array< A, T, U, I>&
+Circulator_over_array< A, T, U, I>::
+operator+=( I n) {
+    CGAL_assertion( this->_ptr != NULL);
+    CGAL_assertion( _i < _size);
+    _i = non_negative_mod( (I)(_i) + n, _size);
+    CGAL_assertion( _i < _size);
+    return *this;
+}
+
+template < class  A, class  T, class U, class  I>
+class Const_circulator_over_array
+    : public Random_access_circulator_ptrbase<T,I,U> {
+    U _size;
+    U _i;
+public:
+
+// TYPES
+
+    typedef A                                    Array;
+    typedef Const_circulator_over_array<A,T,U,I> Self;
+
+// New creation variable is: `circ'
+//
+// CREATION
+
+    Const_circulator_over_array() : _size(0), _i(0) {}
+        // a const circulator `circ' with singular value.
+
+    Const_circulator_over_array( const A& array, U size, U start = 0)
+        : Random_access_circulator_ptrbase<T,I,U>(
+              (void*)(&array)), _size( size), _i(start) {}
+        // a const circulator `circ' initialized to refer to the element
+        // `(array.*access)(start)'. The circulator `circ' contains a
+        // singular value if `start >= size'. Precondition: The
+        // expressions `(array.*access)(i)' are valid in the range
+        // 0 <= i < `size' .
+
+//
+// OPERATIONS
+
+    bool operator==( Nullptr_t p) const {
+        CGAL_assertion( p == NULL);
+        CGAL_USE(p);
+        return _i >= _size;
+    }
+    bool operator!=( Nullptr_t p) const { return !(*this == p); }
+    bool operator==( const Self& c) const {
+        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
+        CGAL_assertion( _size == c._size); // same size when instantiated ?
+        return _i == c._i;
+    }
+    bool operator!=( const Self& c) const { return !(*this == c); }
+    const T&  operator*() const {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        return ((const A*)this->_ptr)->operator[](_i);
+    }
+    const T*  operator->() const {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        return &(((const A*)this->_ptr)->operator[](_i));
+    }
+    Self& operator++() {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        ++ _i;
+        if ( _i >= _size)
+            _i = 0;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+    Self& operator--() {
+        CGAL_assertion( this->_ptr != NULL);
+        CGAL_assertion( _i < _size);
+        if ( _i <= 0)
+            _i = _size - 1;
+        else
+            -- _i;
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+    Self& operator+=( I n);
+
+    Self  operator+( I n) const {
+        Self tmp = *this;
+        return tmp += n;
+    }
+    Self& operator-=( I n) {
+        return operator+=( -n);
+    }
+    Self  operator-( I n) const {
+        Self  tmp = *this;
+        return tmp += -n;
+    }
+    I
+    operator-( const Self& c)  const {
+        CGAL_assertion( this->_ptr  == c._ptr);  // belong to the same array?
+        CGAL_assertion( _size == c._size); // same size when instantiated ?
+        return _i - c._i;
+    }
+    const T&  operator[](I n) const {
+        Self tmp = *this;
+        tmp += n;
+        return tmp.operator*();
+    }
+    Self  min_circulator() {
+        return Self( *((const A*)this->_ptr), _size);
+    }
+    // no relational ordering
+};
+
+template < class Dist, class  A, class  T, class U, class  I>
+inline
+Const_circulator_over_array< A, T, U, I>
+operator+( Dist n, const Const_circulator_over_array<A,T,U,I>& circ) {
+    Const_circulator_over_array< A, T, U, I> tmp = circ;
+    return tmp += I(n);
+}
+
+template < class A, class T, class U, class I>
+Const_circulator_over_array< A, T, U, I>&
+Const_circulator_over_array< A, T, U, I>::
+operator+=( I n) {
+    CGAL_assertion( this->_ptr != NULL);
+    CGAL_assertion( _i < _size);
+    _i = non_negative_mod( (I)(_i) + n, _size);
+    CGAL_assertion( _i < _size);
+    return *this;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CIRCULATOR_IMPL_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator/Circulator_concepts.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator/Circulator_concepts.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circulator/Circulator_concepts.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circulator/Circulator_concepts.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator/Safe_circulator_from_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator/Safe_circulator_from_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circulator/Safe_circulator_from_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circulator/Safe_circulator_from_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circulator_identity.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator_identity.h
new file mode 100644
index 0000000..918732b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circulator_identity.h
@@ -0,0 +1,145 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+//                 Sylvain Pion
+
+#ifndef CGAL_CIRCULATOR_IDENTITY_H
+#define CGAL_CIRCULATOR_IDENTITY_H 1
+
+#include <CGAL/circulator.h>
+
+namespace CGAL {
+
+template < class C,
+           class Ref = typename C::reference,
+           class Ptr = typename C::pointer>
+class Circulator_identity {
+protected:
+  C        nt;    // The internal circulator.
+public:
+  typedef C  Circulator;
+  typedef Circulator_identity<C,Ref,Ptr> Self;
+
+  typedef typename  C::iterator_category   iterator_category;
+  typedef typename  C::value_type          value_type;
+  typedef typename  C::difference_type     difference_type;
+  typedef typename  C::size_type           size_type;
+  typedef typename  C::reference           reference;
+  typedef typename  C::pointer             pointer;
+
+  // CREATION
+  // --------
+
+  Circulator_identity() {}
+  Circulator_identity( Circulator j) : nt(j) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+  Circulator  current_circulator() const { return nt;}
+
+  bool operator==( Nullptr_t p) const {
+    CGAL_assertion( p == 0);
+    CGAL_USE(p);
+    return ( nt == 0);                                    //###//
+  }
+  bool operator!=( Nullptr_t p) const {
+    return !(*this == p);
+  }
+  bool operator==( const Self& i) const {
+    return ( nt == i.nt);                                    //###//
+  }
+  bool operator!=( const Self& i) const {
+    return !(*this == i);
+  }
+  Ref  operator*() const {
+    return *nt;                                              //###//
+  }
+  Ptr  operator->() const {
+    return nt.operator->();                                  //###//
+  }
+  Self& operator++() {
+    ++nt;                                                    //###//
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  // OPERATIONS Bidirectional Category
+  // ---------------------------------
+
+  Self& operator--() {
+    --nt;                                                    //###//
+    return *this;
+  }
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+
+  // OPERATIONS Random Access Category
+  // ---------------------------------
+
+  Self  min_circulator() const {
+    return Self( nt.min_circulator());                       //###//
+  }
+  Self& operator+=( difference_type n) {
+    nt += n;                                                 //###//
+    return *this;
+  }
+  Self  operator+( difference_type n) const {
+    Self tmp = *this;
+    return tmp += n;
+  }
+  Self& operator-=( difference_type n) {
+    return operator+=( -n);
+  }
+  Self  operator-( difference_type n) const {
+    Self tmp = *this;
+    return tmp += -n;
+  }
+  difference_type  operator-( const Self& i) const {
+    return nt - i.nt;                                        //###//
+  }
+  Ref  operator[]( difference_type n) const {
+    Self tmp = *this;
+    tmp += n;
+    return tmp.operator*();
+  }
+};
+
+template < class Dist, class C, class Ref, class Ptr>
+inline
+Circulator_identity<C,Ref,Ptr>
+operator+( Dist n, Circulator_identity<C,Ref,Ptr> i) {
+  return i += n;
+}
+
+} //namespace CGAL
+#endif // CGAL_CIRCULATOR_IDENTITY_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Circulator_on_node.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator_on_node.h
new file mode 100644
index 0000000..4da45bc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Circulator_on_node.h
@@ -0,0 +1,102 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+//                 Sylvain Pion
+
+#ifndef CGAL_CIRCULATOR_ON_NODE_H
+#define CGAL_CIRCULATOR_ON_NODE_H 1
+
+#include <CGAL/circulator.h>
+
+namespace CGAL {
+
+template < class Node,
+           class Next,
+           class Prev,
+           class Ref = Node&,
+           class Ptr = Node*,
+           class Ctg = Bidirectional_circulator_tag>
+class Circulator_on_node {
+protected:
+  Ptr      nt;    // The internal node ptr.
+public:
+  typedef  Circulator_on_node<Node,Next,Prev,Ref,Ptr,Ctg> Self;
+
+  typedef  Ctg                iterator_category;
+  typedef  Node               value_type;
+  typedef  std::ptrdiff_t     difference_type;
+  typedef  std::size_t        size_type;
+  typedef  Ref                reference;
+  typedef  Ptr                pointer;
+
+  // CREATION
+  // --------
+
+  Circulator_on_node() : nt(0) {}
+  Circulator_on_node( Ptr p) : nt(p) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+  Ptr  ptr() const { return nt;}
+
+  bool operator==( Nullptr_t p) const {
+    CGAL_assertion( p == 0);
+    CGAL_USE(p);
+    return ( nt == 0);
+  }
+  bool  operator!=( Nullptr_t p) const { return !(*this == p); }
+  bool  operator==( const Self& i) const { return ( nt == i.nt); }
+  bool  operator!=( const Self& i) const { return !(*this == i); }
+  Ref   operator*()  const { return *nt; }
+  Ptr   operator->() const { return nt; }
+  Self& operator++() {
+    Next next;
+    nt = next(nt);
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  // OPERATIONS Bidirectional Category
+  // ---------------------------------
+
+  Self& operator--() {
+    Prev prev;
+    nt = prev(nt);
+    return *this;
+  }
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+};
+
+} //namespace CGAL
+#endif // CGAL_CIRCULATOR_ON_NODE_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Circulator_project.h b/3rdparty/CGAL-4.8/include/CGAL/Circulator_project.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Circulator_project.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Circulator_project.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combination_enumerator.h b/3rdparty/CGAL-4.8/include/CGAL/Combination_enumerator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Combination_enumerator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Combination_enumerator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map.h
new file mode 100644
index 0000000..c4089b3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map.h
@@ -0,0 +1,3814 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_H
+#define CGAL_COMBINATORIAL_MAP_H 1
+
+#include <CGAL/Compact_container.h>
+#include <CGAL/internal/Combinatorial_map_utility.h>
+#include <CGAL/internal/Combinatorial_map_group_functors.h>
+#include <CGAL/internal/Combinatorial_map_copy_functors.h>
+#include <CGAL/internal/Combinatorial_map_sewable.h>
+#include <CGAL/Combinatorial_map_functors.h>
+#include <CGAL/Combinatorial_map_min_items.h>
+#include <CGAL/Dart_const_iterators.h>
+#include <CGAL/Cell_const_iterators.h>
+#include <CGAL/Combinatorial_map_basic_operations.h>
+#include <CGAL/Combinatorial_map_storages.h>
+#include <CGAL/Unique_hash_map.h>
+#include <bitset>
+#include <vector>
+#include <deque>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <CGAL/config.h>
+
+#if defined( __INTEL_COMPILER )
+// Workarounf for warning in function basic_link_beta_0
+#pragma warning disable 1017
+#endif
+
+namespace CGAL {
+
+  /** @file Combinatorial_map.h
+   * Definition of generic dD Combinatorial map.
+   */
+
+
+  /** Generic definition of combinatorial map in dD.
+   * The Combinatorial_map class describes an dD combinatorial map. It allows
+   * mainly to create darts, to use marks onto these darts, to get and set
+   * the beta links, and to manage enabled attributes.
+   */
+  template < unsigned int d_, class Refs,
+             class Items_=Combinatorial_map_min_items<d_>,
+             class Alloc_=CGAL_ALLOCATOR(int),
+             class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_> >
+  class Combinatorial_map_base: public Storage_
+  {
+    template<typename CMap,unsigned int i,typename Enabled>
+    friend struct CGAL::internal::Call_merge_functor;
+    template<typename CMap,unsigned int i,typename Enabled>
+    friend struct CGAL::internal::Call_split_functor;
+    template<class Map, unsigned int i, unsigned int nmi>
+    friend struct Remove_cell_functor;
+    template<class Map, unsigned int i>
+    friend struct Contract_cell_functor;
+    template <typename CMap, typename Attrib>
+    friend struct internal::Reverse_orientation_of_map_functor;
+    template <typename CMap, typename Attrib>
+    friend struct internal::Reverse_orientation_of_connected_component_functor;
+    template<typename CMap>
+    friend struct internal::Init_attribute_functor;
+
+  public:
+    template < unsigned int A, class B, class I, class D, class S >
+    friend class Combinatorial_map_base;
+
+    /// Types definition
+    typedef Storage_                                                    Storage;
+    typedef Storage                                                     Base;
+    typedef Combinatorial_map_base<d_, Refs, Items_, Alloc_, Storage_ > Self;
+
+    typedef typename Base::Dart Dart;
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Dart_const_handle Dart_const_handle;
+    typedef typename Base::Dart_container Dart_container;
+    typedef typename Base::Dart_wrapper Dart_wrapper;
+    typedef typename Base::size_type size_type;
+    typedef typename Base::Helper Helper;
+    typedef typename Base::Attributes Attributes;
+    typedef typename Base::Items Items;
+    typedef typename Base::Alloc Alloc;
+    typedef typename Base::Use_index Use_index;
+
+    static const size_type NB_MARKS = Base::NB_MARKS;
+    static const size_type INVALID_MARK = NB_MARKS;
+
+    static const unsigned int dimension = Base::dimension;
+
+    typedef typename Base::Null_handle_type Null_handle_type;
+
+    using Base::null_handle;
+    using Base::null_dart_handle;
+    using Base::mdarts;
+    using Base::get_beta;
+    using Base::is_free;
+    using Base::set_dart_mark;
+    using Base::get_dart_mark;
+    using Base::flip_dart_mark;
+    using Base::set_dart_marks;
+    using Base::get_dart_marks;
+    using Base::dart_link_beta;
+    using Base::dart_unlink_beta;
+    using Base::attribute;
+    using Base::mattribute_containers;
+    using Base::get_attribute;
+    using Base::dart_of_attribute;
+    using Base::set_dart_of_attribute;
+    using Base::info_of_attribute;
+    using Base::info;
+    using Base::dart;
+
+    /// Typedef for Dart_range, a range through all the darts of the map.
+    typedef Dart_container       Dart_range;
+    typedef const Dart_container Dart_const_range;
+
+    /// Typedef for attributes
+    template<int i>
+    struct Attribute_type: public Base::template Attribute_type<i>
+    {};
+    template<int i>
+    struct Attribute_handle: public Base::template Attribute_handle<i>
+    {};
+    template<int i>
+    struct Attribute_const_handle:
+      public Base::template Attribute_const_handle<i>
+    {};
+    template<int i>
+    struct Attribute_range: public Base::template Attribute_range<i>
+    {};
+    template<int i>
+    struct Attribute_const_range:
+      public Base::template Attribute_const_range<i>
+    {};
+
+    class Exception_no_more_available_mark {};
+
+  public:
+    /** Default Combinatorial_map constructor.
+     * The map is empty.
+     */
+    Combinatorial_map_base()
+    {
+      CGAL_static_assertion_msg(Dart::dimension==dimension,
+                  "Dimension of dart different from dimension of map");
+
+      CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1,
+                  "Too many attributes in the tuple Attributes_enabled");
+      this->init_storage();
+
+      this->mnb_used_marks = 0;
+      this->mmask_marks.reset();
+
+      for ( size_type i = 0; i < NB_MARKS; ++i)
+      {
+        this->mfree_marks_stack[i]        = i;
+        this->mindex_marks[i]             = i;
+        this->mnb_marked_darts[i]         = 0;
+        this->mnb_times_reserved_marks[i] = 0;
+      }
+
+      this->automatic_attributes_management = true;
+
+      init_dart(null_dart_handle);
+
+      CGAL_assertion(number_of_darts()==0);
+    }
+
+    /** Copy the given combinatorial map into *this.
+     *  Note that both CMap can have different dimensions and/or non void attributes.
+     *  @param amap the combinatorial map to copy.
+     *  @post *this is valid.
+     */
+    template <typename CMap2, typename Converters, typename Pointconverter>
+    void copy(const CMap2& amap, const Converters& converters,
+              const Pointconverter& pointconverter)
+    {
+      this->clear();
+
+      this->mnb_used_marks = amap.mnb_used_marks;
+      this->mmask_marks    = amap.mmask_marks;
+
+      for (size_type i = 0; i < NB_MARKS; ++i)
+      {
+        this->mfree_marks_stack[i]        = amap.mfree_marks_stack[i];
+        this->mindex_marks[i]             = amap.mindex_marks[i];
+        this->mnb_marked_darts[i]         = amap.mnb_marked_darts[i];
+        this->mnb_times_reserved_marks[i] = amap.mnb_times_reserved_marks[i];
+      }
+
+      init_dart(null_dart_handle, amap.get_marks(amap.null_dart_handle));
+
+      // Create an mapping between darts of the two maps (originals->copies).
+      // TODO: replace the std::map by a boost::unordered_map
+      // (here we cannot use CGAL::Unique_hash_map because it does not provide
+      // iterators...
+      std::map<typename CMap2::Dart_const_handle, Dart_handle> dartmap;
+
+      for (typename CMap2::Dart_const_range::const_iterator
+             it=amap.darts().begin(), itend=amap.darts().end();
+           it!=itend; ++it)
+      {
+        dartmap[it]=mdarts.emplace();
+        init_dart(dartmap[it], amap.get_marks(it));
+      }
+
+      unsigned int min_dim=(dimension<amap.dimension?dimension:amap.dimension);
+
+      typename std::map<typename CMap2::Dart_const_handle,Dart_handle>
+        ::iterator dartmap_iter, dartmap_iter_end=dartmap.end();
+      for (dartmap_iter=dartmap.begin(); dartmap_iter!=dartmap_iter_end;
+           ++dartmap_iter)
+      {
+        for (unsigned int i=0; i<=min_dim; i++)
+        {
+          if (!amap.is_free(dartmap_iter->first,i) &&
+              (dartmap_iter->first)<(amap.beta(dartmap_iter->first,i)))
+          {
+            basic_link_beta(dartmap_iter->second,
+                            dartmap[amap.beta(dartmap_iter->first,i)], i);
+          }
+        }
+      }
+
+      /** Copy attributes */
+      for (dartmap_iter=dartmap.begin(); dartmap_iter!=dartmap_iter_end;
+           ++dartmap_iter)
+      {
+        Helper::template Foreach_enabled_attributes
+          < internal::Copy_attributes_functor <CMap2, Refs, Converters,
+            Pointconverter> >::
+          run(&amap, static_cast<Refs*>(this),
+              dartmap_iter->first, dartmap_iter->second,
+              converters, pointconverter);
+      }
+
+      CGAL_assertion (is_valid () == 1);
+    }
+
+    template <typename CMap2>
+    void copy(const CMap2& amap)
+    {
+      CGAL::cpp11::tuple<> converters;
+      Default_converter_cmap_0attributes_with_point<CMap2, Refs> pointconverter;
+      return copy< CMap2, CGAL::cpp11::tuple<>,
+          Default_converter_cmap_0attributes_with_point<CMap2, Refs> >
+          (amap, converters, pointconverter);
+    }
+
+    template <typename CMap2, typename Converters>
+    void copy(const CMap2& amap, const Converters& converters)
+    {
+      Default_converter_cmap_0attributes_with_point<CMap2, Refs> pointconverter;
+      return copy< CMap2, Converters,
+          Default_converter_cmap_0attributes_with_point<CMap2, Refs> >
+          (amap, converters, pointconverter);
+    }
+
+    // Copy constructor from a map having exactly the same type.
+    Combinatorial_map_base (const Self & amap)
+    { copy<Self>(amap); }
+
+    // "Copy constructor" from a map having different type.
+    template <typename CMap2>
+    Combinatorial_map_base(const CMap2& amap)
+    { copy<CMap2>(amap); }
+
+    // "Copy constructor" from a map having different type.
+    template <typename CMap2, typename Converters>
+    Combinatorial_map_base(const CMap2& amap, Converters& converters)
+    { copy<CMap2,Converters>(amap, converters); }
+
+    // "Copy constructor" from a map having different type.
+    template <typename CMap2, typename Converters, typename Pointconverter>
+    Combinatorial_map_base(const CMap2& amap, Converters& converters,
+                           const Pointconverter& pointconverter)
+    { copy<CMap2,Converters, Pointconverter>
+          (amap, converters, pointconverter); }
+
+    /** Affectation operation. Copies one map to the other.
+     * @param amap a combinatorial map.
+     * @return A copy of that combinatorial map.
+     */
+    Self & operator= (const Self & amap)
+    {
+      if (this!=&amap)
+      {
+        Self tmp(amap);
+        this->swap(tmp);
+      }
+      return *this;
+    }
+
+    /** Swap this combinatorial map with amap, a second combinatorial map.
+     * Note that the two maps have exactly the same type.
+     * @param amap a combinatorial map.
+     */
+    void swap(Self & amap)
+    {
+      if (this!=&amap)
+      {
+        amap.mdarts.swap(mdarts);
+
+        std::swap_ranges(mnb_times_reserved_marks,
+                         mnb_times_reserved_marks+NB_MARKS,
+                         amap.mnb_times_reserved_marks);
+        std::swap(mmask_marks,amap.mmask_marks);
+        std::swap(mnb_used_marks, amap.mnb_used_marks);
+        std::swap_ranges(mindex_marks,mindex_marks+NB_MARKS,
+                         amap.mindex_marks);
+        std::swap_ranges(mfree_marks_stack, mfree_marks_stack+NB_MARKS,
+                         amap.mfree_marks_stack);
+        std::swap_ranges(mused_marks_stack,mused_marks_stack+NB_MARKS,
+                         amap.mused_marks_stack);
+        std::swap_ranges(mnb_marked_darts,mnb_marked_darts+NB_MARKS,
+                         amap.mnb_marked_darts);
+        mattribute_containers.swap(amap.mattribute_containers);
+#ifndef CGAL_CMAP_DEPRECATED
+        std::swap(null_dart_handle, amap.null_dart_handle);
+        this->mnull_dart_container.swap(amap.mnull_dart_container);
+#endif // CGAL_CMAP_DEPRECATED
+      }
+    }
+
+    /** Clear the combinatorial map. Remove all darts and all attributes.
+     *  Note that reserved marks are not free.
+     */
+    void clear()
+    {
+      mdarts.clear();
+      for ( size_type i = 0; i < NB_MARKS; ++i)
+        this->mnb_marked_darts[i]  = 0;
+
+      internal::Clear_all::run(mattribute_containers);
+      this->init_storage();
+      init_dart(null_dart_handle);
+    }
+
+    /** Test if the map is empty.
+     *  @return true iff the map is empty.
+     */
+    bool is_empty() const
+    { return mdarts.empty(); }
+
+    friend std::ostream& operator<< (std::ostream& os, const Self& amap)
+    {
+      save_combinatorial_map(amap, os);
+      return os;
+    }
+
+    friend std::ifstream& operator>> (std::ifstream& is, Self& amap)
+    {
+      load_combinatorial_map(is, amap);
+      return is;
+    }
+
+    /** Create a new dart and add it to the map.
+     * The marks of the darts are initialised with mmask_marks, i.e. the dart
+     * is unmarked for all the marks.
+     * @return a Dart_handle on the new dart.
+     */
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    template < typename... Args >
+    Dart_handle create_dart(const Args&... args)
+    {
+      Dart_handle res=mdarts.emplace(args...);
+      init_dart(res);
+      return res;
+    }
+#else
+    Dart_handle create_dart()
+    {
+      Dart_handle res=mdarts.emplace();
+      init_dart(res);
+      return res;
+    }
+    template < typename T1 >
+    Dart_handle create_dart(const T1 &t1)
+    {
+      Dart_handle res=mdarts.emplace(t1);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4, typename T5 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4, const T5 &t5)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4, typename T5,
+               typename T6 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4, const T5 &t5, const T6 &t6)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4, typename T5,
+               typename T6, typename T7 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4, const T5 &t5, const T6 &t6,
+                            const T7 &t7)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4, typename T5,
+               typename T6, typename T7, typename T8 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4, const T5 &t5, const T6 &t6,
+                            const T7 &t7, const T8 &t8)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8);
+      init_dart(res);
+      return res;
+    }
+    template < typename T1, typename T2, typename T3, typename T4, typename T5,
+               typename T6, typename T7, typename T8, typename T9 >
+    Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3,
+                            const T4 &t4, const T5 &t5, const T6 &t6,
+                            const T7 &t7, const T8 &t8, const T9 &t9)
+    {
+      Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9);
+      init_dart(res);
+      return res;
+    }
+#endif
+
+    /** Erase a dart from the list of darts.
+     * @param adart the dart to erase.
+     */
+    void erase_dart(Dart_handle adart)
+    {
+      // 1) We update the number of marked darts.
+      for ( size_type i = 0; i < mnb_used_marks; ++i)
+      {
+        if (is_marked(adart, mused_marks_stack[i]))
+          --mnb_marked_darts[mused_marks_stack[i]];
+      }
+
+      // 2) We update the attribute_ref_counting.
+      Helper::template Foreach_enabled_attributes
+        <internal::Decrease_attribute_functor<Self> >::run(this,adart);
+
+      // 3) We erase the dart.
+      mdarts.erase(adart);
+    }
+
+    /// @return true if dh points to a used dart (i.e. valid).
+    bool is_dart_used(Dart_const_handle dh) const
+    { return mdarts.is_used(dh); }
+
+    /// @return a Dart_range (range through all the darts of the map).
+    Dart_range& darts()             { return mdarts;}
+    Dart_const_range& darts() const { return mdarts; }
+
+    /** Get the first dart of this map.
+     * @return the first dart.
+     */
+    Dart_handle first_dart()
+    {
+      if (darts().begin() == darts().end()) return null_handle;
+      return mdarts.begin();
+    }
+    Dart_const_handle first_dart() const
+    {
+      if (darts().begin() == darts().end()) return null_handle;
+      return mdarts.begin();
+    }
+
+    /// @return the Dart_handle corresponding to the given dart.
+    Dart_handle dart_handle(Dart& adart)
+    { return mdarts.iterator_to(adart); }
+    Dart_const_handle dart_handle(const Dart& adart) const
+    { return mdarts.iterator_to(adart); }
+
+    /** Return the highest dimension for which dh is not free.
+     * @param dh a dart handle
+     * @return the dimension d such that dh is not d-free but k-free for
+     *         all k>d. -1 if the dart is free for all d in {0..n}
+     */
+    int highest_nonfree_dimension(Dart_const_handle dh) const
+    {
+      for (int i=(int)dimension; i>=0; --i)
+      { if ( !is_free(dh, i) ) return i; }
+      return -1;
+    }
+
+    /** Return a dart belonging to the same edge and to the second vertex
+     * of the current edge (NULL if such a dart does not exist).
+     * @return An handle to the opposite dart.
+     */
+    Dart_handle opposite(Dart_handle dh)
+    {
+      for (unsigned int i = 2; i <= dimension; ++i)
+        if (!is_free(dh, i)) return beta(dh, i);
+      return null_handle;
+    }
+    Dart_const_handle opposite(Dart_const_handle dh) const
+    {
+      for (unsigned int i = 2; i <= dimension; ++i)
+        if (!is_free(dh, i)) return beta(dh, i);
+      return null_handle;
+    }
+
+    /** Return a dart incident to the other extremity of the current edge,
+     *  but contrary to opposite, non necessary to the same edge
+     *  (NULL if such a dart does not exist).
+     * @return An handle to the opposite dart.
+     */
+    Dart_handle other_extremity(Dart_handle dh)
+    {
+      for (unsigned int i = 1; i <= dimension; ++i)
+        if (!is_free(dh, i)) return beta(dh, i);
+      return null_handle;
+    }
+    Dart_const_handle other_extremity(Dart_const_handle dh) const
+    {
+      for (unsigned int i = 1; i <= dimension; ++i)
+        if (!is_free(dh, i)) return beta(dh, i);
+      return null_handle;
+    }
+
+    // Set the handle on the i th attribute
+    template<unsigned int i>
+    void set_dart_attribute(Dart_handle dh,
+                            typename Attribute_handle<i>::type ah)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                     "set_dart_attribute<i> called but i-attributes are disabled.");
+
+      if ( this->template attribute<i>(dh)==ah ) return;
+
+      if ( this->template attribute<i>(dh)!=null_handle )
+      {
+        this->template get_attribute<i>(this->template attribute<i>(dh)).
+          dec_nb_refs();
+        if ( this->template get_attribute<i>(this->template attribute<i>(dh)).
+             get_nb_refs()==0 )
+          this->template erase_attribute<i>(this->template attribute<i>(dh));
+      }
+
+      this->template basic_set_dart_attribute<i>(dh, ah);
+
+      if ( ah!=null_handle )
+      {
+        this->template set_dart_of_attribute<i>(ah, dh);
+        this->template get_attribute<i>(ah).inc_nb_refs();
+      }
+    }
+
+  protected:
+    /// Marks can be modified even for const handle; otherwise it is not
+    /// possible to iterate through const combinatorial maps.
+
+    // Initialize a given dart: all beta to null_dart_handle and all
+    // attributes to null, all marks unmarked.
+    void init_dart(Dart_handle adart)
+    {
+      set_dart_marks(adart, mmask_marks);
+
+      for (unsigned int i = 0; i <= dimension; ++i)
+        dart_unlink_beta(adart, i);
+
+      Helper::template Foreach_enabled_attributes
+          <internal::Init_attribute_functor<Self> >::run(this, adart);
+    }
+    // Initialize a given dart: all beta to null_dart_handle and all
+    // attributes to null, marks are given.
+    void init_dart(Dart_handle adart,
+                   const std::bitset<NB_MARKS>& amarks)
+    {
+      set_marks(adart, amarks);
+
+      for (unsigned int i = 0; i <= dimension; ++i)
+        dart_unlink_beta(adart, i);
+
+      Helper::template Foreach_enabled_attributes
+          <internal::Init_attribute_functor<Self> >::run(this, adart);
+    }
+
+  public:
+
+    /// @return the betas of ADart (beta are used in the same order than
+    ///         they are given as parameters)
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    template<typename ...Betas>
+    Dart_handle beta(Dart_handle ADart, Betas... betas)
+    { return CGAL::internal::Beta_functor<Self, Dart_handle, Betas...>::
+        run(this, ADart, betas...); }
+    template<typename ...Betas>
+    Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const
+    { return CGAL::internal::Beta_functor<const Self, Dart_const_handle, Betas...>::
+        run(this, ADart, betas...); }
+    template<int... Betas>
+    Dart_handle beta(Dart_handle ADart)
+    { return CGAL::internal::Beta_functor_static<Self, Dart_handle, Betas...>::
+        run(this, ADart); }
+    template<int... Betas>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return CGAL::internal::Beta_functor_static<const Self, Dart_const_handle, Betas...>::
+        run(this, ADart); }
+#else
+    Dart_handle beta(Dart_handle ADart, int B1)
+    { return this->get_beta(ADart, B1); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2)
+    { return beta(beta(ADart, B1), B2); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3)
+    { return beta(beta(ADart, B1), B2, B3); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4)
+    { return beta(beta(ADart, B1), B2, B3, B4); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5)
+    { return beta(beta(ADart, B1), B2, B3, B4, B5); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6)
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7)
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7, int B8)
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); }
+    Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7, int B8, int B9)
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); }
+
+    template<int B1>
+    Dart_handle beta(Dart_handle ADart)
+    { return this->template get_beta<B1>(ADart); }
+    template<int B1, int B2>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4, B5>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4, B5, B6>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+             int B7>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4, B5, B6, B7>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+             int B7, int B8>
+    Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4, B5, B6, B7, B8>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+             int B7, int B8, int B9>
+     Dart_handle beta(Dart_handle ADart)
+    { return beta<B2, B3, B4, B5, B6, B7, B8, B9>(beta<B1>(ADart)); }
+
+    Dart_const_handle beta(Dart_const_handle ADart, int B1) const
+    { return this->get_beta(ADart, B1); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2) const
+    { return beta(beta(ADart, B1), B2); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3) const
+    { return beta(beta(ADart, B1), B2, B3); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4) const
+    { return beta(beta(ADart, B1), B2, B3, B4); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5) const
+    { return beta(beta(ADart, B1), B2, B3, B4, B5); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6) const
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7) const
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7, int B8) const
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); }
+    Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3,
+                           int B4, int B5, int B6, int B7, int B8, int B9) const
+    { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); }
+
+    template<int B1>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return this->template get_beta<B1>(ADart); }
+    template<int B1, int B2>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4, B5>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4, B5, B6>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+              int B7>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4, B5, B6, B7>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+              int B7, int B8>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4, B5, B6, B7, B8>(beta<B1>(ADart)); }
+    template<int B1, int B2, int B3, int B4, int B5, int B6,
+              int B7, int B8, int B9>
+    Dart_const_handle beta(Dart_const_handle ADart) const
+    { return beta<B2, B3, B4, B5, B6, B7, B8, B9>(beta<B1>(ADart)); }
+#endif
+
+    /** Count the number of used marks.
+     * @return the number of used marks.
+     */
+    size_type number_of_used_marks() const
+    { return mnb_used_marks; }
+
+    /** Test if a given mark is reserved.
+     *  @return true iff the mark is reserved (ie in used).
+     */
+    bool is_reserved(size_type amark) const
+    {
+      CGAL_assertion(amark<NB_MARKS);
+
+      return (mnb_times_reserved_marks[amark]!=0);
+    }
+
+    /**  Count the number of marked darts for a given mark.
+     * @param amark the mark index.
+     * @return the number of marked darts for amark.
+     */
+    size_type number_of_marked_darts(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+      return mnb_marked_darts[amark];
+    }
+
+    /**  Count the number of unmarked darts for a given mark.
+     * @param amark the mark index.
+     * @return the number of unmarked darts for amark.
+     */
+    size_type number_of_unmarked_darts(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+      return number_of_darts() - number_of_marked_darts(amark);
+    }
+
+    /** Test if all the darts are unmarked for a given mark.
+     * @param amark the mark index.
+     * @return true iff all the darts are unmarked for amark.
+     */
+    bool is_whole_map_unmarked(size_type amark) const
+    { return number_of_marked_darts(amark) == 0; }
+
+    /** Test if all the darts are marked for a given mark.
+     * @param amark the mark index.
+     * @return true iff all the darts are marked for amark.
+     */
+    bool is_whole_map_marked(size_type amark) const
+    {  return number_of_marked_darts(amark) == number_of_darts(); }
+
+    /** Reserve a new mark.
+     * Get a new free mark and return its index.
+     * All the darts are unmarked for this mark.
+     * @return the index of the new mark.
+     * @pre mnb_used_marks < NB_MARKS
+     */
+    size_type get_new_mark() const
+    {
+      if (mnb_used_marks == NB_MARKS)
+      {
+        std::cerr << "Not enough Boolean marks: "
+          "increase NB_MARKS in item class." << std::endl;
+        std::cerr << "  (exception launched)" << std::endl;
+        throw Exception_no_more_available_mark();
+      }
+
+      size_type m = mfree_marks_stack[mnb_used_marks];
+      mused_marks_stack[mnb_used_marks] = m;
+
+      mindex_marks[m] = mnb_used_marks;
+      mnb_times_reserved_marks[m]=1;
+
+      ++mnb_used_marks;
+      CGAL_assertion(is_whole_map_unmarked(m));
+
+      return m;
+    }
+
+    /** Increase the number of times a mark is reserved.
+     *  @param amark the mark to share.
+     */
+    void share_a_mark(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+      ++mnb_times_reserved_marks[amark];
+    }
+
+    /** @return the number of times a mark is reserved.
+     *  @param amark the mark to share.
+     */
+    size_type get_number_of_times_mark_reserved(size_type amark) const
+    {
+      CGAL_assertion( amark<NB_MARKS );
+
+      return mnb_times_reserved_marks[amark];
+    }
+
+    /** Negate the mark of all the darts for a given mark.
+     * After this call, all the marked darts become unmarked and all the
+     * unmarked darts become marked (in constant time operation).
+     * @param amark the mark index
+     */
+    void negate_mark(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+      mnb_marked_darts[amark] = number_of_darts() - mnb_marked_darts[amark];
+
+      mmask_marks.flip(amark);
+    }
+
+    /** Test if a given dart is marked for a given mark.
+     * @param adart the dart to test.
+     * @param amark the given mark.
+     * @return true iff adart is marked for the mark amark.
+     */
+    bool is_marked(Dart_const_handle adart, size_type amark) const
+    {
+      // CGAL_assertion( adart != null_dart_handle );
+      CGAL_assertion( is_reserved(amark) );
+
+      return get_dart_mark(adart, amark)!=mmask_marks[amark];
+    }
+
+    /** Set the mark of a given dart to a state (on or off).
+     * @param adart the dart.
+     * @param amark the given mark.
+     * @param astate the state of the mark (on or off).
+     */
+    void set_mark_to(Dart_const_handle adart, size_type amark,
+                     bool astate) const
+    {
+      CGAL_assertion( adart != null_dart_handle );
+      CGAL_assertion( is_reserved(amark) );
+
+      if (is_marked(adart, amark) != astate)
+      {
+        if (astate) ++mnb_marked_darts[amark];
+        else --mnb_marked_darts[amark];
+
+        flip_dart_mark(adart, amark);
+      }
+    }
+
+    /** Mark the given dart.
+     * @param adart the dart.
+     * @param amark the given mark.
+     */
+    void mark(Dart_const_handle adart, size_type amark) const
+    {
+      CGAL_assertion( adart != null_dart_handle );
+      CGAL_assertion( is_reserved(amark) );
+
+      if (is_marked(adart, amark)) return;
+
+      ++mnb_marked_darts[amark];
+      flip_dart_mark(adart, amark);
+    }
+
+    /** Unmark the given dart.
+     * @param adart the dart.
+     * @param amark the given mark.
+     */
+    void unmark(Dart_const_handle adart, size_type amark) const
+    {
+      CGAL_assertion( adart != null_dart_handle );
+      CGAL_assertion( is_reserved(amark) );
+
+      if (!is_marked(adart, amark)) return;
+
+      --mnb_marked_darts[amark];
+      flip_dart_mark(adart, amark);
+    }
+
+    /** Mark null_dart (used as a sentinel in iterators).
+     * As null dart does not belong to the set of darts, it is not counted
+     * as number of marked darts.
+     * @param amark the given mark.
+     */
+    void mark_null_dart(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+#ifdef CGAL_CMAP_DEPRECATED
+      if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+        set_dart_mark(null_dart_handle, amark, !mmask_marks[amark]);
+    }
+
+    /** Unmark null_dart.
+     * @param amark the given mark.
+     */
+    void unmark_null_dart(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+#ifdef CGAL_CMAP_DEPRECATED
+      if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+        set_dart_mark(null_dart_handle, amark, mmask_marks[amark]);
+    }
+
+    /** Unmark all the darts of the map for a given mark.
+     * If all the darts are marked or unmarked, this operation takes O(1)
+     * operations, otherwise it traverses all the darts of the map.
+     * @param amark the given mark.
+     */
+    void unmark_all(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+      if ( is_whole_map_marked(amark) )
+      {
+        negate_mark(amark);
+      }
+      else if ( !is_whole_map_unmarked(amark) )
+      {
+        for ( typename Dart_range::const_iterator it(darts().begin()),
+               itend(darts().end()); it!=itend; ++it)
+          unmark(it, amark);
+      }
+      CGAL_assertion(is_whole_map_unmarked(amark));
+      unmark_null_dart(amark);
+    }
+
+    /** Free a given mark, previously calling unmark_all_darts.
+     * @param amark the given mark.
+     */
+    void free_mark(size_type amark) const
+    {
+      CGAL_assertion( is_reserved(amark) );
+
+      if ( mnb_times_reserved_marks[amark]>1 )
+      {
+        --mnb_times_reserved_marks[amark];
+        return;
+      }
+
+      unmark_all(amark);
+
+      // 1) We remove amark from the array mused_marks_stack by
+      //    replacing it with the last mark in this array.
+      mused_marks_stack[mindex_marks[amark]] =
+        mused_marks_stack[--mnb_used_marks];
+      mindex_marks[mused_marks_stack[mnb_used_marks]] =
+        mindex_marks[amark];
+
+      // 2) We add amark in the array mfree_marks_stack and update its index.
+      mfree_marks_stack[ mnb_used_marks ] = amark;
+      mindex_marks[amark] = mnb_used_marks;
+
+      mnb_times_reserved_marks[amark]=0;
+    }
+
+    /** Test if this map is without boundary for a given dimension.
+     * @param i the dimension.
+     * @return true iff all the darts are not i-free.
+     * @pre 1<=i<=n
+     */
+    bool is_without_boundary(unsigned int i) const
+    {
+      CGAL_assertion(1<=i && i<=dimension);
+      for ( typename Dart_const_range::const_iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; ++it)
+        if (is_free(it, i)) return false;
+      return true;
+    }
+
+    /** Test if this map is without boundary for all the dimensions.
+     * @return true iff all the darts are non free.
+     */
+    bool is_without_boundary() const
+    {
+      for ( typename Dart_const_range::const_iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; ++it)
+        for ( unsigned int i = 1; i<=dimension; ++i)
+          if (is_free(it, i)) return false;
+      return true;
+    }
+
+    /** Close the combinatorial map for a given dimension.
+     *  @param i the dimension to close
+     *  @return the number of new darts.
+     *  @pre 2<=i<=n (TODO case i==1)
+     *  @TODO move into Combinatorial_map_operations ?
+     */
+    template<unsigned int i>
+    unsigned int close()
+    {
+      CGAL_assertion( 2<=i && i<=dimension );
+      unsigned int res = 0;
+      Dart_handle d, d2;
+
+      for ( typename Dart_range::iterator it(darts().begin());
+           it!=darts().end(); ++it)
+      {
+        if ( this->template is_free<i>(it) )
+        {
+          d = create_dart();
+          ++res;
+
+          link_beta_for_involution<i>(it, d);
+
+          // Special cases for 0 and 1
+          if ( !this->template is_free<1>(it) && !this->template is_free<i>(beta<1>(it)) )
+            link_beta<1>(beta<1,i>(it),d);
+          if ( !this->template is_free<0>(it) && !this->template is_free<i>(beta<0>(it)) )
+            link_beta<0>(beta<0,i>(it),d);
+          // General case for 2...dimension
+          for ( unsigned int j=2; j<=dimension; ++j)
+          {
+            if ( j+1!=i && j!=i && j!=i+1 &&
+                 !is_free(it,j) && !this->template is_free<i>(beta(it, j)) )
+            {
+              basic_link_beta_for_involution(beta(it, j, i), d, j);
+            }
+          }
+
+          d2 = it;
+          while (d2 != null_dart_handle && !this->template is_free<i-1>(d2))
+          { d2 = beta<i-1, i>(d2); }
+          if (d2 != null_dart_handle)
+          {
+            if (i==2) basic_link_beta<1>(d2, d);
+            else basic_link_beta_for_involution<i-1>(d2, d);
+          }
+        }
+      }
+      return res;
+    }
+
+    /** Test if the map is valid.
+     * @return true iff the map is valid.
+     */
+    bool is_valid() const
+    {
+      bool valid = true;
+      unsigned int i = 0, j = 0;
+      std::vector<size_type> marks(dimension+1);
+      for ( i=0; i<=dimension; ++i)
+        marks[i] = INVALID_MARK;
+
+      Helper::template
+        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
+          run(this,&marks);
+
+      for ( typename Dart_range::const_iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; ++it)
+      {
+        if ( !valid )
+        { // We continue the traversal to mark all the darts.
+          for ( i=0; i<=dimension; ++i)
+            if (marks[i]!=INVALID_MARK) mark(it,marks[i]);
+        }
+        else
+        {
+          // beta0 must be the inverse of beta1
+          if ((!is_free(it, 0) && beta(it, 0, 1)!=it) ||
+              (!is_free(it, 1) && beta(it, 1, 0)!=it ))
+          {
+            std::cerr << "Map not valid: beta(0) "
+              "is not the inverse of beta(1) for "
+                      <<&(*it) << std::endl;
+            valid = false;
+          }
+
+          // Each beta(i>=2) must be an involution
+          for ( i = 2; i <= dimension; ++i)
+            if (!is_free(it, i) && beta(it, i, i)!=it)
+            {
+              std::cerr << "Map not valid: beta(" << i
+                        << ") is not an involution for "
+                        <<&(*it) << std::endl;
+              valid = false;
+            }
+
+          // beta1 o betai and beta0 o betai (i>=3) must be involutions
+          if (!is_free(it, 0))
+          {
+            for ( i = 3; i <= dimension; ++i)
+              if ((is_free(it, i) != is_free(beta(it, 0), i)) ||
+                  (!is_free(it, i) && beta(it, 0, i)!=beta(it, i, 1)))
+              {
+                std::cerr << "Map not valid: beta(0) o beta(" << i
+                          << ") is not an involution for "
+                          <<&(*it) << std::endl;
+                valid = false;
+              }
+          }
+          if (!is_free(it, 1))
+          {
+            for ( i = 3; i <= dimension; ++i)
+              if ((is_free(it, i) != is_free(beta(it, 1), i)) ||
+                  (!is_free(it, i) && beta(it, 1, i)!=beta(it, i, 0)))
+              {
+                std::cerr << "Map not valid: beta(1) o beta(" << i
+                          << ") is not an involution for "
+                          <<&(*it)<< std::endl;
+                valid = false;
+              }
+          }
+
+          // beta(i>=2) o beta(j>=i+2) must be an involution
+          for ( i = 2; i <= dimension; ++i)
+          {
+            if (!is_free(it, i))
+            {
+              for ( j = i + 2; j <= dimension; ++j)
+                if ((is_free(it, j)!=is_free(beta(it, i), j)) ||
+                    (!is_free(it, j) && beta(it, i, j)!=beta(it, j, i)))
+                {
+                  std::cerr << "Map not valid: beta(" << i
+                            << ") o beta(" << j
+                            << ") is not an involution for "
+                            << &(*it)<< std::endl;
+                  valid = false;
+                }
+            }
+          }
+          Helper::template Foreach_enabled_attributes
+            <internal::Test_is_valid_attribute_functor<Self> >::
+            run(this,it,&marks,&valid);
+        }
+      }
+      for ( i=0; i<=dimension; ++i)
+        if ( marks[i]!=INVALID_MARK )
+        {
+          CGAL_assertion( is_whole_map_marked(marks[i]) );
+          free_mark(marks[i]);
+        }
+
+      return valid;
+    }
+
+    /// correct invalid attributes in the map
+    void correct_invalid_attributes()
+    {
+      std::vector<size_type> marks(dimension+1);
+      for ( unsigned int i=0; i<=dimension; ++i)
+        marks[i] = INVALID_MARK;
+
+      Helper::template
+        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
+          run(this,&marks);
+
+      for ( typename Dart_range::iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; ++it)
+      {
+        Helper::template Foreach_enabled_attributes
+          <internal::Correct_invalid_attributes_functor<Self> >::
+          run(this,it,&marks);
+      }
+
+      for ( unsigned int i=0; i<=dimension; ++i)
+        if ( marks[i]!=INVALID_MARK )
+        {
+          CGAL_assertion( is_whole_map_marked(marks[i]) );
+          free_mark(marks[i]);
+        }
+    }
+
+    /// @return the number of darts.
+    size_type number_of_darts() const
+    { return mdarts.size(); }
+
+    /// @return an estimation of the bytes used by the combinatorial map.
+    size_type bytes() const
+    {
+      return mdarts.capacity() * sizeof(Dart) +
+        internal::Count_bytes_all_attributes_functor<Self>::run(*this);
+    }
+
+    /** Write the content of the map: each dart and each beta links.
+     * @param os the ostream.
+     * @return the ostream.
+     */
+    std::ostream& display_darts(std::ostream & os, bool attribs=false) const
+    {
+      unsigned int nb = 0;
+      for ( typename Dart_range::const_iterator it=darts().begin();
+           it!=darts().end(); ++it)
+      {
+        os << " dart " << &(*it) << "; beta[i]=";
+        for ( unsigned int i=0; i<=dimension; ++i)
+        {
+          os << &(*it->beta(i)) << ",\t";
+          if (it->is_free(i)) os << "\t";
+        }
+        if ( attribs )
+        {
+          Helper::template Foreach_enabled_attributes
+              <Display_attribute_functor<Self> >::run(this, it);
+        }
+        os << std::endl;
+        ++nb;
+      }
+      os << "Number of darts: " << nb <<"(sizeofdarts="
+         <<number_of_darts()<<")" << std::endl;
+      return os;
+    }
+
+    /** Write the content of each given orbit of the map.
+     * @param aos the ostream.
+     * @return the ostream.
+     */
+    template < class Ite >
+    std::ostream& display_orbits(std::ostream & aos) const
+    {
+      CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
+                              Tag_true>::value) );
+      unsigned int nb = 0;
+      size_type amark = get_new_mark();
+      for ( typename Dart_range::const_iterator it1(darts().begin()),
+             itend(darts().end()); it1!=itend; ++it1)
+      {
+        if ( !is_marked(it1, amark) )
+        {
+          ++nb;
+          for ( Ite it2(*this, it1, amark); it2.cont(); ++it2 )
+          {
+            aos << &(**it2) << " - " << std::flush;
+            mark(*it2, amark);
+          }
+          aos << std::endl;
+        }
+      }
+      CGAL_assertion( is_whole_map_marked(amark) );
+      free_mark(amark);
+      aos << "Number of orbits: " << nb << std::endl;
+      return aos;
+    }
+
+    /** Write the content of each i-cell of the map.
+     * @param aos the ostream.
+     * @return the ostream.
+     */
+    template < unsigned int i >
+    std::ostream& display_cells(std::ostream & aos) const
+    {
+      return display_orbits<CMap_dart_const_iterator_basic_of_cell<Self,i> >
+        (aos);
+    }
+
+    /** Write the number of darts and cells of the map into a given ostream.
+     * @param os the ostream.
+     * @return the ostream.
+     */
+    std::ostream& display_characteristics(std::ostream & os) const
+    {
+      std::vector<unsigned int> cells(dimension+2);
+      for ( unsigned int i=0; i<=dimension+1; ++i)
+      { cells[i]=i; }
+
+      std::vector<unsigned int> res = count_cells(cells);
+
+      os << "#Darts=" << number_of_darts();
+      for ( unsigned int i=0; i<=dimension; ++i)
+        os<<", #"<<i<<"-cells="<<res[i];
+      os<<", #ccs="<<res[dimension+1];
+
+      return os;
+    }
+
+    /// Create a new attribute.
+    /// @return a handle on the new attribute.
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    template<unsigned int i, typename ...Args>
+    typename Attribute_handle<i>::type create_attribute(const Args&... args)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+     typename Attribute_handle<i>::type res=
+       CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(args...);
+     // Reinitialize the ref counting of the new attribute. This is normally
+     // not required except if create_attribute is used as "copy contructor".
+     this->template get_attribute<i>(res).mrefcounting = 0;
+     return res;
+    }
+#else
+    template<unsigned int i>
+    typename Attribute_handle<i>::type
+    create_attribute()
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace();
+    }
+    template<unsigned int i, typename T1>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+     typename Attribute_handle<i>::type res=
+       CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1);
+     this->template get_attribute<i>(res).mrefcounting = 0;
+     return res;
+    }
+    template<unsigned int i, typename T1, typename T2>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
+             typename T5>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+                     const T5 &t5)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4, t5);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+                     const T5 &t5, const T6 &t6)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+                     const T5 &t5, const T6 &t6, const T7 &t7)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7, typename T8>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+                     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8);
+    }
+    template<unsigned int i, typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7, typename T8, typename T9>
+    typename Attribute_handle<i>::type
+    create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+                     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8,
+                     const T9 &t9)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "create_attribute<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9);
+    }
+#endif
+
+    /// Erase an attribute.
+    /// @param h a handle to the attribute to erase.
+    template<unsigned int i>
+    void erase_attribute(typename Attribute_handle<i>::type h)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "erase_attribute<i> but i-attributes are disabled");
+      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).erase(h);
+    }
+
+    /// @return true if ah points to a used i-attribute (i.e. valid).
+    template<unsigned int i>
+    bool is_attribute_used(typename Attribute_const_handle< i >::type ah) const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                                "is_attribute_used<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).is_used(ah);
+    }
+
+    /// @return the number of attributes.
+    template <unsigned int i>
+    size_type number_of_attributes() const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "number_of_attributes<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers).size();
+    }
+
+    /** Set the i th attribute of all the darts of a given i-cell.
+     * @param adart a dart of the i-cell.
+     * @param ah the vertex to set.
+     */
+    template<unsigned int i>
+    void set_attribute(Dart_handle dh,
+                       typename Attribute_handle<i>::type ah)
+    {
+      CGAL_static_assertion(i<=dimension);
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                  "set_attribute<i> but i-attributes are disabled");
+      for ( typename Dart_of_cell_range<i>::iterator it(*this, dh);
+            it.cont(); ++it)
+      {
+        this->template set_dart_attribute<i>(it, ah);
+      }
+    }
+
+    /// @return a Attributes_range<i> (range through all the
+    /// attributes<i> of the map).
+    template<unsigned int i>
+    typename Attribute_range<i>::type & attributes()
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                                "attributes<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers);
+    }
+
+    template<unsigned int i>
+    typename Attribute_const_range<i>::type & attributes() const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                                "attributes<i> but i-attributes are disabled");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_containers);
+    }
+
+    // Get the ith dynamic onsplit functor (by reference so that we can
+    // modify it directly).
+    template<int i>
+    boost::function<void(typename Attribute_type<i>::type&,
+                         typename Attribute_type<i>::type&)>&
+    onsplit_functor()
+    {
+      CGAL_static_assertion_msg
+          (Helper::template Dimension_index<i>::value>=0,
+           "onsplit_functor<i> but "
+           "i-attributes are disabled");
+
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (m_onsplit_functors);
+    }
+
+    // Get the ith dynamic onsplit functor (by reference so that we can
+    // modify it directly).
+    template<int i>
+    const boost::function<void(typename Attribute_type<i>::type&,
+                               typename Attribute_type<i>::type&)>&
+    onsplit_functor() const
+    {
+      CGAL_static_assertion_msg
+          (Helper::template Dimension_index<i>::value>=0,
+           "onsplit_functor<i> but "
+           "i-attributes are disabled");
+
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (m_onsplit_functors);
+    }
+
+    // Get the ith dynamic onmerge functor (by reference so that we can
+    // modify it directly).
+    template<int i>
+    boost::function<void(typename Attribute_type<i>::type&,
+                               typename Attribute_type<i>::type&)>&
+    onmerge_functor()
+    {
+      CGAL_static_assertion_msg
+          (Helper::template Dimension_index<i>::value>=0,
+           "onsplit_functor<i> but "
+           "i-attributes are disabled");
+
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (m_onmerge_functors);
+    }
+    // Get the ith dynamic onmerge functor (by reference so that we can
+    // modify it directly).
+    template<int i>
+    const boost::function<void(typename Attribute_type<i>::type&,
+                               typename Attribute_type<i>::type&)>&
+    onmerge_functor() const
+    {
+      CGAL_static_assertion_msg
+          (Helper::template Dimension_index<i>::value>=0,
+           "onsplit_functor<i> but "
+           "i-attributes are disabled");
+
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (m_onmerge_functors);
+    }
+
+    /** Double link a dart with beta 0 to a second dart.
+     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
+     * with \em adart1. Attributes are not updated, thus we can obtain
+     * a non-valid map with darts belonging to a same orbit and having
+     * different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    void basic_link_beta_0(Dart_handle adart1, Dart_handle adart2)
+    {
+      // Intel warning #1017: name following "template" must be a template
+      this->template dart_link_beta<0>(adart1, adart2);
+      this->template dart_link_beta<1>(adart2, adart1);
+    }
+
+    /** Double link a dart with beta 0 to a second dart.
+     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
+     * with \em adart1. Attributes are not updated, thus we can obtain
+     * a non-valid map with darts belonging to a same orbit and having
+     * different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    void basic_link_beta_1(Dart_handle adart1, Dart_handle adart2)
+    {
+      this->template dart_link_beta<1>(adart1, adart2);
+      this->template dart_link_beta<0>(adart2, adart1);
+    }
+
+    /** Double link a dart with beta i to a second dart, when i>=2.
+     * \em adart1 is i-linked to \em adart2 and \em adart2 is i-linked
+     * with \em adart1. Attributes are not updated, thus we can obtain
+     * a non-valid map with darts belonging to a same orbit and having
+     * different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     * @param i the dimension of the beta.
+     */
+    template<unsigned int i>
+    void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( i>=2 && i<=dimension );
+      this->template dart_link_beta<i>(adart1, adart2);
+      this->template dart_link_beta<i>(adart2, adart1);
+    }
+    void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2,
+                                        unsigned int i)
+    {
+      CGAL_assertion( i>=2 && i<=dimension );
+      CGAL_assertion( i>=2 && i<=dimension );
+      dart_link_beta(adart1, adart2, i);
+      dart_link_beta(adart2, adart1, i);
+    }
+
+    /** Double link a dart with betai to a second dart.
+     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
+     * with \em adart1. Attributes are not updated, thus we can obtain
+     * a non-valid map with darts belonging to a same orbit and having
+     * different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    template<unsigned int i>
+    void basic_link_beta(Dart_handle adart1, Dart_handle adart2)
+    {
+      if ( i==0 ) basic_link_beta_0(adart1, adart2);
+      else if ( i==1 ) basic_link_beta_1(adart1, adart2);
+      else basic_link_beta_for_involution<i>(adart1, adart2);
+    }
+    void basic_link_beta(Dart_handle adart1, Dart_handle adart2,
+                         unsigned int i)
+    {
+      if ( i==0 ) basic_link_beta_0(adart1, adart2);
+      else if ( i==1 ) basic_link_beta_1(adart1, adart2);
+      else basic_link_beta_for_involution(adart1, adart2, i);
+    }
+
+    /** Double link two darts, and update the NULL attributes.
+     * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
+     * with \em adart1. The NULL attributes of \em adart1 are updated to
+     * non NULL attributes associated to \em adart2, and vice-versa.
+     * If both darts have an attribute, the attribute of adart1 is
+     * associated to adart2.
+     * We can obtain a non-valid map with darts belonging to a same cell
+     * and having different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    void link_beta_0(Dart_handle adart1, Dart_handle adart2)
+    {
+      Helper::template Foreach_enabled_attributes_except
+        <internal::Group_attribute_functor_of_dart<Self, 0>, 1>::
+        run(this,adart1,adart2);
+      this->template dart_link_beta<0>(adart1, adart2);
+      this->template dart_link_beta<1>(adart2, adart1);
+    }
+
+    /** Double link two darts, and update the NULL attributes.
+     * \em adart1 is 1-linked to \em adart2 and \em adart2 is 0-linked
+     * with \em adart1. The NULL attributes of \em adart1 are updated to
+     * non NULL attributes associated to \em adart2, and vice-versa.
+     * If both darts have an attribute, the attribute of adart1 is
+     * associated to adart2.
+     * We can obtain a non-valid map with darts belonging to a same cell
+     * and having different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    void link_beta_1(Dart_handle adart1, Dart_handle adart2)
+    {
+      Helper::template Foreach_enabled_attributes_except
+        <internal::Group_attribute_functor_of_dart<Self, 1>, 1>::
+        run(this,adart1,adart2);
+      this->template dart_link_beta<1>(adart1, adart2);
+      this->template dart_link_beta<0>(adart2, adart1);
+    }
+
+    /** Double link two darts, and update the NULL attributes.
+     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
+     * with \em adart1. The NULL attributes of \em adart1 are updated to
+     * non NULL attributes associated to \em adart2, and vice-versa.
+     * If both darts have an attribute, the attribute of adart1 is
+     * associated to adart2.
+     * We can obtain a non-valid map with darts belonging to a same cell
+     * and having different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     * @param i the dimension of the beta.
+     * @pre 2<=i<=dimension.
+     */
+    template<unsigned int i>
+    void link_beta_for_involution(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( 2<=i && i<=dimension );
+      Helper::template Foreach_enabled_attributes_except
+        <internal::Group_attribute_functor_of_dart<Self, i>, i>::
+        run(this,adart1,adart2);
+      this->template dart_link_beta<i>(adart1, adart2);
+      this->template dart_link_beta<i>(adart2, adart1);
+    }
+
+    /** Double link two darts, and update the NULL attributes.
+     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
+     * with \em adart1. The NULL attributes of \em adart1 are updated to
+     * non NULL attributes associated to \em adart2, and vice-versa.
+     * If both darts have an attribute, the attribute of adart1 is
+     * associated to adart2.
+     * We can obtain a non-valid map with darts belonging to a same cell
+     * and having different attributes.
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     */
+    template<unsigned int i>
+    void link_beta(Dart_handle adart1, Dart_handle adart2)
+    {
+      if ( are_attributes_automatically_managed() )
+      {
+        if ( i==0 ) link_beta_0(adart1, adart2);
+        else if ( i==1 ) link_beta_1(adart1, adart2);
+        else link_beta_for_involution<i>(adart1, adart2);
+      }
+      else basic_link_beta<i>(adart1, adart2);
+    }
+
+    /** Double link a dart with betai to a second dart.
+     * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
+     * with \em adart1. The NULL attributes of \em adart1 are updated to
+     * non NULL attributes associated to \em adart2, and vice-versa,
+     * if both darts have an attribute, the attribute of adart1 is
+     * associated to adart2 (only if update_attributes==true).
+     * @param adart1 a first dart.
+     * @param adart2 a second dart.
+     * @param update_attributes a boolean to update the enabled attributes.
+     *         (deprecated, now we use are_attributes_automatically_managed())
+     */
+    template<unsigned int i>
+    void link_beta(Dart_handle adart1, Dart_handle adart2,
+                   bool update_attributes)
+    {
+      if ( update_attributes ) link_beta<i>(adart1, adart2);
+      else basic_link_beta<i>(adart1, adart2);
+    }
+
+    /** Double unlink a dart with beta 0.
+     * beta0(\em adart) is 1-unlinked and \em adart is 0-unlinked.
+     * The attributes are not updated, thus we can obtain a non-valid map
+     * with darts belonging to different orbits and having the same
+     * attributes.
+     * @param adart a dart.
+     */
+    void unlink_beta_0(Dart_handle adart)
+    {
+      CGAL_assertion(!this->template is_free<0>(adart));
+      this->template dart_unlink_beta<1>(beta<0>(adart));
+      this->template dart_unlink_beta<0>(adart);
+    }
+
+    /** Double unlink a dart with beta 1.
+     * beta1(\em adart) is 0-unlinked and \em adart is 1-unlinked.
+     * The attributes are not updated, thus we can obtain a non-valid map
+     * with darts belonging to different orbits and having the same
+     * attributes.
+     * @param adart a dart.
+     */
+    void unlink_beta_1(Dart_handle adart)
+    {
+      CGAL_assertion(!this->template is_free<1>(adart));
+      this->template dart_unlink_beta<0>(beta<1>(adart));
+      this->template dart_unlink_beta<1>(adart);
+    }
+
+    /** Double unlink a dart with beta i, for i>=2.
+     * betai(\em adart) is i-unlinked and \em adart is i-unlinked.
+     * The attributes are not updated, thus we can obtain a non-valid map
+     * with darts belonging to different orbits and having the same
+     * attributes.
+     * @param adart a dart.
+     * @param i the dimension of the beta.
+     */
+    template<unsigned int i>
+    void unlink_beta_for_involution(Dart_handle adart)
+    {
+      CGAL_assertion(!this->template is_free<i>(adart));
+      CGAL_assertion(2<=i && i<=dimension);
+      this->template dart_unlink_beta<i>(beta<i>(adart));
+      this->template dart_unlink_beta<i>(adart);
+    }
+    void unlink_beta_for_involution(Dart_handle adart, unsigned int i)
+    {
+      CGAL_assertion(!is_free(adart,i));
+      CGAL_assertion(2<=i && i<=dimension);
+      dart_unlink_beta(beta(adart, i), i);
+      dart_unlink_beta(adart, i);
+    }
+
+    /** Double unlink a dart with beta i.
+     * betai(\em adart) is i-1-unlinked and \em adart is i-unlinked.
+     * The attributes are not updated, thus we can obtain a non-valid map
+     * with darts belonging to different orbits and having the same
+     * attributes.
+     * @param adart a dart.
+     * @param i the dimension of the beta.
+     */
+    template<unsigned int i>
+    void unlink_beta(Dart_handle adart)
+    {
+      if ( i==0 ) unlink_beta_0(adart);
+      else if ( i==1 ) unlink_beta_1(adart);
+      else unlink_beta_for_involution<i>(adart);
+    }
+    void unlink_beta(Dart_handle adart, unsigned int i)
+    {
+      if ( i==0 ) unlink_beta_0(adart);
+      else if ( i==1 ) unlink_beta_1(adart);
+      else unlink_beta_for_involution(adart, i);
+    }
+
+    /** Test if it is possible to sew by betai the two given darts
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @return true iff \em adart1 can be i-sewn with \em adart2.
+     */
+    template<unsigned int i>
+    bool is_sewable(Dart_const_handle adart1, Dart_const_handle adart2) const
+    {
+      return CGAL::internal::
+          Is_sewable_functor<Self, i>::run(this, adart1, adart2);
+    }
+
+    /** Topological sew by beta1 the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<1>(adart1, adart2).
+     */
+    void topo_sew_1(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( (is_sewable<1>(adart1,adart2)) );
+
+      if ( adart1==adart2 )
+      {
+        for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart1);
+              it.cont(); ++it )
+        {
+          basic_link_beta_1(it, it);
+        }
+      }
+      else
+      {
+        size_type m = get_new_mark();
+        std::deque<Dart_handle> dartv;
+        for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0>
+              it(*this, adart1, m); it.cont(); ++it )
+        {
+          mark(it,m);
+          dartv.push_back(it);
+        }
+
+        CGAL::CMap_dart_iterator_of_involution<Self,1>     I1(*this, adart1);
+        CGAL::CMap_dart_iterator_of_involution_inv<Self,1> I2(*this, adart2);
+        for ( ; I1.cont(); ++I1, ++I2 )
+        {
+          if ( is_marked(I1,m) ) basic_link_beta_1(I1, I2);
+          else                   basic_link_beta_0(I1, I2);
+        }
+
+        for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
+              it!=dartv.end(); ++it)
+        { unmark(*it,m); }
+        CGAL_assertion( is_whole_map_unmarked(m) );
+        free_mark(m);
+      }
+    }
+
+    /** Topological sew by beta0 two given darts plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<0>(adart1, adart2).
+     */
+    void topo_sew_0(Dart_handle adart1, Dart_handle adart2)
+    { topo_sew_1(adart2, adart1); }
+
+    /** Topological sew by betai two given darts plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre 2<=i<=dimension.
+     * @pre is_sewable<i>(adart1, adart2).
+     */
+    template<unsigned int i>
+    void topo_sew_for_involution(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( 2<=i && i<=Self::dimension );
+      CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
+
+      CGAL::CMap_dart_iterator_of_involution<Self,i>     I1(*this, adart1);
+      CGAL::CMap_dart_iterator_of_involution_inv<Self,i> I2(*this, adart2);
+      for ( ; I1.cont();  ++I1, ++I2 )
+      {
+        basic_link_beta_for_involution<i>(I1, I2);
+      }
+    }
+
+    /** Topological sew by betai two given darts plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<i>(adart1, adart2).
+     */
+    template<unsigned int i>
+    void topo_sew(Dart_handle adart1, Dart_handle adart2)
+    {
+      if ( i==0 ) topo_sew_1(adart2, adart1);
+      else if ( i==1 ) topo_sew_1(adart1, adart2);
+      else topo_sew_for_involution<i>(adart1, adart2);
+    }
+
+    /** Sew by beta0 the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity, and updates enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<0>(adart1, adart2).
+     * @post is_valid()
+     */
+    void sew_0(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( (is_sewable<0>(adart1,adart2)) );
+
+      if ( adart1==adart2 )
+      {
+        for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart1);
+              it.cont(); ++it )
+        {
+          basic_link_beta_1(it, it);
+        }
+        return;
+      }
+
+      size_type m = get_new_mark();
+      std::deque<Dart_handle> dartv;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
+            it(*this, adart1, m); it.cont(); ++it )
+      {
+        mark(it,m);
+        dartv.push_back(it);
+      }
+
+      size_type mark = get_new_mark();
+
+      CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
+          I1(*this, adart1, mark);
+      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, 1>
+          I2(*this, adart2, mark);
+
+      // This first loop do not modify the map, but only the attributes
+      // (by calling when required the onmerge functors).
+      for ( ; I1.cont(); ++I1, ++I2 )
+      {
+        if ( is_marked(I1,m) )
+          Helper::template Foreach_enabled_attributes_except
+              <CGAL::internal::Group_attribute_functor<Self, 0>, 1>::
+              run(this, I1, I2);
+        else
+          Helper::template Foreach_enabled_attributes_except
+              <CGAL::internal::Group_attribute_functor<Self, 1>, 1>::
+              run(this, I1, I2);
+      }
+
+      // Now we update the beta links.
+      negate_mark( mark );
+      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
+      {
+        if ( is_marked(I1,m) ) basic_link_beta_0(I1, I2);
+        else                   basic_link_beta_1(I1, I2);
+      }
+
+      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
+            it!=dartv.end(); ++it )
+      { unmark(*it,m); }
+      CGAL_assertion( is_whole_map_unmarked(m) );
+      free_mark(m);
+
+      negate_mark( mark );
+      CGAL_assertion( is_whole_map_unmarked(mark) );
+      free_mark(mark);
+    }
+
+    /** Sew by beta1 the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity, and updates enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<1>(adart1, adart2).
+     * @post is_valid()
+     */
+    void sew_1(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( (is_sewable<1>(adart1,adart2)) );
+
+      if ( adart1==adart2 )
+      {
+        for ( CGAL::CMap_dart_iterator_of_involution<Self, 1>
+              it(*this, adart1); it.cont(); ++it )
+        {
+          basic_link_beta_1(it, it);
+        }
+        return;
+      }
+
+      size_type m = get_new_mark();
+      std::deque<Dart_handle> dartv;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
+            it(*this, adart1, m); it.cont(); ++it )
+      {
+        mark(it,m);
+        dartv.push_back(it);
+      }
+
+      size_type mark = get_new_mark();
+
+      CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
+          I1(*this, adart1, mark);
+      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, 1>
+          I2(*this, adart2, mark);
+
+      // This first loop do not modify the map, but only the attributes
+      // (by calling when required the onmerge functors).
+      for ( ; I1.cont(); ++I1, ++I2 )
+      {
+        CGAL_assertion( I2.cont() );
+        if ( is_marked(I1,m) )
+          Helper::template Foreach_enabled_attributes_except
+              <internal::Group_attribute_functor<Self, 1>, 1>::
+              run(this, I1, I2);
+        else
+          Helper::template Foreach_enabled_attributes_except
+              <internal::Group_attribute_functor<Self, 0>, 1>::
+              run(this, I1, I2);
+      }
+
+      // Now we update the beta links.
+      negate_mark( mark );
+      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
+      {
+        if ( is_marked(I1,m) ) basic_link_beta_1(I1, I2);
+        else                   basic_link_beta_0(I1, I2);
+      }
+
+      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
+            it!=dartv.end(); ++it )
+      { unmark(*it,m); }
+      CGAL_assertion( is_whole_map_unmarked(m) );
+      free_mark(m);
+
+      negate_mark( mark );
+      CGAL_assertion( is_whole_map_unmarked(mark) );
+      free_mark(mark);
+    }
+
+    /** Sew by betai the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity, and updates enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<i>(adart1, adart2).
+     * @pre 2<=i<=dimension.
+     * @post is_valid()
+     */
+    template<unsigned int i>
+    void sew_for_involution(Dart_handle adart1, Dart_handle adart2)
+    {
+      CGAL_assertion( 2<=i && i<=dimension );
+      CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
+
+      size_type mark=get_new_mark();
+
+      CGAL::CMap_dart_iterator_basic_of_involution<Self, i>
+          I1(*this, adart1, mark);
+      CGAL::CMap_dart_iterator_basic_of_involution_inv<Self, i>
+          I2(*this, adart2, mark);
+
+      // This first loop do not modify the map, but only the attributes
+      // (by calling when required the onmerge functors).
+      for ( ; I1.cont(); ++I1, ++I2 )
+      {
+        Helper::template Foreach_enabled_attributes_except
+            <CGAL::internal::Group_attribute_functor<Self, i>, i>::
+            run(this, I1, I2);
+      }
+
+      // Now we update the beta links.
+      negate_mark( mark );
+      for ( I1.rewind(), I2.rewind(); I1.cont(); ++I1, ++I2 )
+      {
+        basic_link_beta_for_involution<i>(I1, I2);
+      }
+
+      negate_mark( mark );
+      CGAL_assertion( is_whole_map_unmarked(mark) );
+      free_mark(mark);
+    }
+
+    /** Sew by betai the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity, and updates enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @pre is_sewable<i>(adart1, adart2).
+     * @post is_valid()
+     */
+    template<unsigned int i>
+    void sew(Dart_handle adart1, Dart_handle adart2)
+    {
+      if ( are_attributes_automatically_managed() )
+      {
+        if ( i==0 ) sew_0(adart1, adart2);
+        else if ( i==1 ) sew_1(adart1, adart2);
+        else sew_for_involution<i>(adart1, adart2);
+      }
+      else topo_sew<i>(adart1, adart2);
+    }
+
+    /** Sew by betai the two given darts plus all the required darts
+     * to satisfy the combinatorial map validity. Enabled attributes
+     * are updated only if update_attributes==true.
+     * @param adart1 the first dart.
+     * @param adart2 the second dart.
+     * @param update_attributes a boolean to update the enabled attributes
+     *         (deprecated, now we use are_attributes_automatically_managed())
+     * @pre is_sewable<i>(adart1, adart2).
+     */
+    template<unsigned int i>
+    void sew(Dart_handle adart1, Dart_handle adart2, bool update_attributes)
+    {
+      if ( update_attributes ) sew<i>(adart1, adart2);
+      else topo_sew<i>(adart1, adart2);
+    }
+
+    /** Topological unsew by beta1 the given dart plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid
+     * @param adart first dart.
+     * @pre !adart->is_free(1).
+     */
+    void topo_unsew_1(Dart_handle adart)
+    {
+      CGAL_assertion( !this->template is_free<1>(adart) );
+
+      size_type m = get_new_mark();
+      std::deque<Dart_handle> dartv;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0> it(*this, adart, m);
+            it.cont(); ++it )
+      {
+        mark(it,m);
+        dartv.push_back(it);
+      }
+
+      for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
+            it.cont(); ++it )
+      {
+        if ( is_marked(it,m) ) unlink_beta_1(it);
+        else unlink_beta_0(it);
+      }
+
+      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
+            it!=dartv.end(); ++it )
+      { unmark(*it,m); }
+      CGAL_assertion( is_whole_map_unmarked(m) );
+      free_mark(m);
+    }
+
+    /** Topological unsew by beta0 the given dart plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid
+     * @param adart first dart.
+     * @pre !adart->is_free(0).
+     */
+    void topo_unsew_0(Dart_handle adart)
+    {
+      CGAL_assertion( !this->template is_free<0>(adart) );
+      topo_unsew_1( adart->template beta<0>() );
+    }
+
+    /** Topological unsew by betai the given dart plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid
+     * @param adart first dart.
+     * @pre !adart->is_free(i).
+     * @pre 2<=i<=dimension.
+     */
+    template<unsigned int i>
+    void topo_unsew_for_involution(Dart_handle adart)
+    {
+      CGAL_assertion( !this->template is_free<i>(adart) );
+      CGAL_assertion( 2<=i && i<=Self::dimension );
+
+      for ( CGAL::CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
+            it.cont(); ++it )
+      { unlink_beta<i>(it); }
+    }
+
+    /** Topological unsew by betai the given dart plus all the required darts
+     * to satisfy the combinatorial map validity: but do not update attributes
+     * thus the map can be non valid
+     * @param adart first dart.
+     * @pre !adart->is_free(i).
+     */
+    template<unsigned int i>
+    void topo_unsew(Dart_handle adart)
+    {
+      if ( i==0 ) topo_unsew_0(adart);
+      else if ( i==1 ) topo_unsew_1(adart);
+      else topo_unsew_for_involution<i>(adart);
+    }
+
+    /** Unsew by beta0 the given dart plus all the required darts
+     * to satisfy the combinatorial map validity, and update enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart first dart.
+     * @pre !adart->is_free(0).
+     * @post is_valid()
+     */
+    void unsew_0(Dart_handle adart)
+    {
+      CGAL_assertion( !this->template is_free<0>(adart) );
+
+      size_type m=get_new_mark();
+      std::deque<Dart_handle> dartv;
+      std::deque<Dart_handle> modified_darts;
+      std::deque<Dart_handle> modified_darts2;
+
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0> it(*this, adart, m);
+            it.cont(); ++it )
+      {
+        mark(it, m);
+        dartv.push_back(it);
+      }
+
+      for ( CGAL::CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
+            it.cont(); ++it )
+      {
+        if ( is_marked(it, m) )
+        {
+          modified_darts.push_back(it);
+          modified_darts2.push_back(beta<0>(it));
+          unlink_beta_0(it);
+        }
+        else
+        {
+          modified_darts2.push_back(it);
+          modified_darts.push_back(beta<1>(it));
+          unlink_beta_1(it);
+        }
+      }
+
+      for ( typename std::deque<Dart_handle>::iterator it=dartv.begin();
+            it!=dartv.end(); ++it )
+      { unmark(*it,m); }
+
+      CGAL_assertion( is_whole_map_unmarked(m) );
+      free_mark(m);
+
+      // We test the split of all the incident cells for all the non
+      // void attributes.
+      Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<Self,0>, 1>::
+          run(this, modified_darts, modified_darts2);
+    }
+
+    /** Unsew by beta1 the given dart plus all the required darts
+     * to satisfy the combinatorial map validity, and update enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart first dart.
+     * @pre !adart->is_free(1).
+     * @post is_valid()
+     */
+    void unsew_1(Dart_handle adart)
+    {
+      CGAL_assertion( !this->template is_free<1>(adart) );
+
+      size_type m = get_new_mark();
+      std::deque<Dart_handle> dartv;
+      std::deque<Dart_handle> modified_darts;
+      std::deque<Dart_handle> modified_darts2;
+
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0>
+            it(*this, adart, m); it.cont(); ++it)
+      {
+        mark(it, m);
+        dartv.push_back(it);
+      }
+
+      for ( CGAL::CMap_dart_iterator_of_involution<Self, 1> it(*this, adart);
+            it.cont(); ++it )
+      {
+        if ( is_marked(it, m) )
+        {
+          modified_darts2.push_back(it);
+          modified_darts.push_back(beta<1>(it));
+          unlink_beta_1(it);
+        }
+        else
+        {
+          modified_darts.push_back(it);
+          modified_darts2.push_back(beta<0>(it));
+          unlink_beta_0(it);
+        }
+      }
+
+      for ( typename std::deque<Dart_handle>::iterator
+             it=dartv.begin(); it!=dartv.end(); ++it)
+      { unmark(*it, m); }
+      CGAL_assertion( is_whole_map_unmarked(m) );
+      free_mark(m);
+
+      // We test the split of all the incident cells for all the non
+      // void attributes.
+      Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<Self,1>, 1>::
+          run(this, modified_darts, modified_darts2);
+    }
+
+    /** Unsew by betai the given dart plus all the required darts
+     * to satisfy the combinatorial map validity, and update enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart first dart.
+     * @pre !adart->is_free(i).
+     * @post is_valid()
+     * @pre 2<=i<=dimension
+     */
+    template<unsigned int i>
+    void unsew_for_involution(Dart_handle adart)
+    {
+      CGAL_assertion(2<=i && i<=Self::dimension);
+      CGAL_assertion( !this->template is_free<i>(adart) );
+
+      std::deque<Dart_handle> modified_darts;
+
+      for ( CGAL::CMap_dart_iterator_of_involution<Self, i> it(*this, adart);
+            it.cont(); ++it )
+      {
+        modified_darts.push_back(it);
+        modified_darts.push_back(beta<i>(it));
+        unlink_beta_for_involution<i>(it);
+      }
+
+      // We test the split of all the incident cells for all the non
+      // void attributes.
+      Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<Self, i>, i>::
+          run(this, modified_darts);
+    }
+
+    /** Unsew by betai the given dart plus all the required darts
+     * to satisfy the combinatorial map validity, and update enabled
+     * attributes when necessary so that the final map is valid.
+     * @param adart first dart.
+     * @pre !adart->is_free(i).
+     * @post is_valid()
+     */
+    template<unsigned int i>
+    void unsew(Dart_handle adart)
+    {
+      if ( are_attributes_automatically_managed() )
+      {
+        if ( i==0 ) unsew_0(adart);
+        else if ( i==1 ) unsew_1(adart);
+        else unsew_for_involution<i>(adart);
+      }
+      else topo_unsew<i>(adart);
+    }
+
+    /** Unsew by betai the given dart plus all the required darts
+     * to satisfy the combinatorial map validity. Enabled attributes
+     * are updated only if update_attributes==true.
+     * @param adart first dart.
+     * @param update_attributes a boolean to update the enabled attributes
+     *         (deprecated, now we use are_attributes_automatically_managed())
+     * @pre !adart->is_free(i).
+     */
+    template<unsigned int i>
+    void unsew(Dart_handle adart, bool update_attributes)
+    {
+      if ( update_attributes ) unsew<i>(adart);
+      else topo_unsew<i>(adart);
+    }
+
+    /** Reverse the orientation (swap beta 0 & 1 links) of the entire map.
+     * A valid map after this operation remains valid.
+     * @param none
+     * @return none
+     */
+    void reverse_orientation()
+    {
+      internal::Reverse_orientation_of_map_functor<Self>::run(this);
+    }
+
+    /** Reverse the orientation (swap beta 0 & 1 links) of the connected
+     * component containing the given dart.
+     * A valid map after this operation remains valid.
+     * @param adart handle to a dart
+     * @return none
+     */
+    void reverse_orientation_connected_component (Dart_handle adart)
+    {
+      internal::Reverse_orientation_of_connected_component_functor<Self>::
+          run(this, adart);
+    }
+
+    /** Count the marked cells (at least one marked dart).
+     * @param amark the mark to consider.
+     * @param avector containing the dimensions of the cells to count.
+     * @return a vector containing the number of cells.
+     */
+    std::vector<unsigned int>
+    count_marked_cells(size_type amark, const std::vector<unsigned int>& acells) const
+    {
+      std::vector<unsigned int> res(dimension+2);
+      std::vector<size_type> marks(dimension+2);
+
+      // Initialization of the result
+      for ( unsigned int i=0; i<dimension+2; ++i)
+      {
+        res[i]=0;
+        marks[i]=INVALID_MARK;
+      }
+
+      // Mark reservation
+      for ( unsigned int i=0; i<acells.size(); ++i)
+      {
+        CGAL_assertion(acells[i]<=dimension+1);
+        if ( marks[acells[i]]==INVALID_MARK )
+        {
+          marks[acells[i]] = get_new_mark();
+        }
+      }
+
+      // Counting and marking cells
+      for ( typename Dart_range::const_iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; ++it)
+      {
+        if ( is_marked(it, amark) )
+        {
+          CGAL::internal::Foreach_static
+            <CGAL::internal::Count_cell_functor<Self>,dimension+1>::
+            run(this, it, &marks, &res);
+        }
+      }
+
+      // Unmarking darts
+      std::vector<size_type> tounmark;
+      for ( unsigned int i=0; i<acells.size(); ++i)
+      {
+        if ( is_whole_map_marked(marks[acells[i]]) ||
+             is_whole_map_unmarked(marks[acells[i]]))
+        {
+          free_mark(marks[acells[i]]);
+        }
+        else
+        {
+          tounmark.push_back(marks[acells[i]]);
+        }
+      }
+
+      if ( tounmark.size() > 0 )
+      {
+        for ( typename Dart_range::const_iterator it(darts().begin()),
+               itend(darts().end()); it!=itend; ++it)
+        {
+          for ( unsigned int i=0; i<tounmark.size(); ++i)
+            unmark(it, tounmark[i]);
+        }
+        for ( unsigned int i=0; i<tounmark.size(); ++i)
+        {
+          CGAL_assertion(is_whole_map_unmarked(tounmark[i]));
+          free_mark(tounmark[i]);
+        }
+      }
+
+      return res;
+    }
+
+    /** Count the number of given cells
+     * @param avector containing the dimensions of the cells to count.
+     * @return a vector containing the number of cells.
+     */
+    std::vector<unsigned int>
+    count_cells(const std::vector<unsigned int>& acells) const
+    {
+      std::vector<unsigned int> res;
+      size_type m = get_new_mark();
+      negate_mark(m); // We mark all the cells.
+
+      res = count_marked_cells(m, acells);
+
+      negate_mark(m); // We unmark the cells
+      free_mark(m);
+
+      return res;
+    }
+
+    /** Count the number of cells in each dimension.
+     * @return a vector containing the number of cells.
+     */
+    std::vector<unsigned int> count_all_cells() const
+    {
+      std::vector<unsigned int> dim(dimension+2);
+
+      for ( unsigned int i=0; i<dimension+2; ++i)
+        dim[i]=i;
+
+      return count_cells(dim);
+    }
+
+  protected:
+    /** Set simultaneously all the marks of a given dart.
+     * @param adart the dart.
+     * @param amarks the marks to set.
+     */
+    void set_marks(Dart_const_handle adart,
+                   const std::bitset<NB_MARKS> & amarks) const
+    { set_dart_marks(adart, amarks ^ mmask_marks); }
+
+    /** Get simultaneously all the marks of a given dart.
+     * @param adart the dart.
+     * @return allt the marks of adart.
+     */
+    std::bitset<NB_MARKS> get_marks(Dart_const_handle adart) const
+    { return get_dart_marks(adart) ^ mmask_marks; }
+
+    /** Get the mask associated to a given mark.
+     * @param amark the mark.
+     * @return the mask associated to mark amark.
+     */
+    bool get_mask_mark(size_type amark) const
+    {
+      CGAL_assertion(amark>=0 && amark<NB_MARKS);
+      return mmask_marks[amark];
+    }
+
+  public:
+    /** Erase marked darts from the map.
+     * Marked darts are unlinked before to be removed, thus surviving darts
+     * are correctly linked, but the map is not necessarily valid depending
+     * on the configuration of removed darts. User must check carefully marked
+     * darts before calling this method.
+     * @param amark the mark of darts to erase.
+     * @return the number of removed darts.
+     */
+    unsigned int erase_marked_darts(size_type amark)
+    {
+      unsigned int res = 0, i = 0;
+      Dart_handle d;
+      for ( typename Dart_range::iterator it(darts().begin()),
+             itend(darts().end()); it!=itend; )
+      {
+        d = it++;
+        if (is_marked(d, amark))
+        {
+          for ( i = 0; i <= dimension; ++i)
+          { if (!d->is_free(i)) unlink_beta(d, i); }
+          erase_dart(d); ++res;
+        }
+      }
+      return res;
+    }
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    //**************************************************************************
+    // Dart_of_orbit_basic_range
+    template<unsigned int ... Beta>
+    struct Dart_of_orbit_basic_range : public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
+     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
+       CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> > Base;
+
+      Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK):
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_basic_const_range
+    template<unsigned int ... Beta>
+    struct Dart_of_orbit_basic_const_range : public CGAL::CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
+    {
+      typedef CGAL::CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> >
+      Base;
+
+      Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle
+                                      adart, size_type amark=INVALID_MARK):
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_range
+    template<unsigned int ... Beta>
+    struct Dart_of_orbit_range : public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_of_orbit<Self,Beta...>,
+     CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_of_orbit<Self,Beta...>,
+       CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> > Base;
+
+      Dart_of_orbit_range(Self &amap, Dart_handle adart) : Base(amap,adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_const_range
+    template<unsigned int ... Beta>
+    struct Dart_of_orbit_const_range : public CGAL::CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> >
+    {
+      typedef CGAL::CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,Beta...> > Base;
+
+      Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart):
+        Base(amap,adart)
+      {}
+    };
+    //**************************************************************************
+    /// @return a range on all the darts of the given orbit
+    template<unsigned int ... Beta>
+    Dart_of_orbit_range<Beta...> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<Beta...>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int ... Beta>
+    Dart_of_orbit_const_range<Beta...>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<Beta...>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int ... Beta>
+    Dart_of_orbit_basic_range<Beta...> darts_of_orbit_basic(Dart_handle adart,
+                                                            size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<Beta...>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int ... Beta>
+    Dart_of_orbit_basic_const_range<Beta...>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<Beta...>(*this,adart,amark); }
+    //**************************************************************************
+#else
+    //**************************************************************************
+    // Dart_of_orbit_basic_range
+    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
+             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+    struct Dart_of_orbit_basic_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+        B8,B9>,
+     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+        B8,B9> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+      B8,B9>,
+       CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,
+                                               B6,B7,B8,B9> > Base;
+
+      Dart_of_orbit_basic_range(Self &amap, Dart_handle adart,
+                                size_type /*amark*/=INVALID_MARK):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_basic_const_range
+    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
+             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+    struct Dart_of_orbit_basic_const_range: public CMap_const_range
+    <Self,
+     CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+        B8,B9> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_basic_of_orbit
+       <Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
+
+      Dart_of_orbit_basic_const_range(const Self &amap,
+                                      Dart_const_handle adart, size_type amark=INVALID_MARK):
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_range
+    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
+             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+    struct Dart_of_orbit_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9>,
+     CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+      B8,B9>,
+       CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+      B8,B9> >
+      Base;
+
+      Dart_of_orbit_range(Self &amap, Dart_handle adart):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_orbit_const_range
+    template<int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1,
+             int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+    struct Dart_of_orbit_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_of_orbit<Self,B1,B2,B3,B4,B5,B6,B7,
+        B8,B9> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_of_orbit
+       <Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
+
+      Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    /// @return a range on all the darts of the given orbit
+    Dart_of_orbit_range<> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1>
+    Dart_of_orbit_range<B1> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2>
+    Dart_of_orbit_range<B1,B2> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3>
+    Dart_of_orbit_range<B1,B2,B3> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
+    Dart_of_orbit_range<B1,B2,B3,B4> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5>
+    Dart_of_orbit_range<B1,B2,B3,B4,B5> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4,B5>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6>
+    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7>
+    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
+    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
+    (Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
+              unsigned int B9>
+    Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+    darts_of_orbit(Dart_handle adart)
+    { return Dart_of_orbit_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>(*this,adart); }
+    //--------------------------------------------------------------------------
+    // Const versions.
+    Dart_of_orbit_const_range<> darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1>
+    Dart_of_orbit_const_range<B1> darts_of_orbit(Dart_const_handle
+                                                 adart) const
+    { return Dart_of_orbit_const_range<B1>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2>
+    Dart_of_orbit_const_range<B1,B2> darts_of_orbit(Dart_const_handle
+                                                    adart) const
+    { return Dart_of_orbit_const_range<B1,B2>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3>
+    Dart_of_orbit_const_range<B1,B2,B3> darts_of_orbit
+    (Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
+    Dart_of_orbit_const_range<B1,B2,B3,B4>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5>
+    Dart_of_orbit_const_range<B1,B2,B3,B4,B5>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6>
+    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7>
+    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
+    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
+              unsigned int B9>
+    Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+    darts_of_orbit(Dart_const_handle adart) const
+    { return Dart_of_orbit_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+        (*this,adart); }
+    //--------------------------------------------------------------------------
+    // Basic versions
+    Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart,
+                                                     size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    Dart_of_orbit_basic_const_range<> darts_of_orbit_basic
+    (Dart_const_handle adart,size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1>
+    Dart_of_orbit_basic_range<B1> darts_of_orbit_basic(Dart_handle adart,
+                                                       size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1>
+    Dart_of_orbit_basic_const_range<B1> darts_of_orbit_basic
+    (Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2>
+    Dart_of_orbit_basic_range<B1,B2> darts_of_orbit_basic(Dart_handle adart,
+                                                          size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2>
+    Dart_of_orbit_basic_const_range<B1,B2> darts_of_orbit_basic
+    (Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3>
+    Dart_of_orbit_basic_range<B1,B2,B3> darts_of_orbit_basic(Dart_handle adart,
+                                                             size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3>
+    Dart_of_orbit_basic_const_range<B1,B2,B3> darts_of_orbit_basic
+    (Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4> darts_of_orbit_basic
+    (Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5> darts_of_orbit_basic
+    (Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6> darts_of_orbit_basic
+    (Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit_basic
+    (Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
+    (Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
+              unsigned int B9>
+    Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+    darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
+              unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
+              unsigned int B9>
+    Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+    darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
+        (*this,adart,amark); }
+    //**************************************************************************
+#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    //**************************************************************************
+    // Dart_of_cell_basic_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_cell_basic_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
+
+      Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK) :
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_cell_basic_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_cell_basic_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
+
+      Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart,
+                                     size_type amark=INVALID_MARK) :
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_cell_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_cell_range: public CGAL::CMap_range
+    <Self,CMap_dart_iterator_of_cell<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self,CMap_dart_iterator_of_cell<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> > Base;
+
+      Dart_of_cell_range(Self &amap, Dart_handle adart) :
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_cell_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_cell_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_of_cell<Self,i,dim> > Base;
+
+      Dart_of_cell_const_range(const Self &amap, Dart_const_handle adart) :
+        Base(amap, adart)
+      {}
+    };
+    //--------------------------------------------------------------------------
+    /// @return a range on all the darts of the given i-cell
+    template<unsigned int i, int dim>
+    Dart_of_cell_basic_range<i,dim> darts_of_cell_basic(Dart_handle adart,
+                                                        size_type amark=INVALID_MARK)
+    { return Dart_of_cell_basic_range<i,dim>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, int dim>
+    Dart_of_cell_basic_const_range<i,dim> darts_of_cell_basic
+    (Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_cell_basic_const_range<i,dim>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_cell_basic_range<i,Self::dimension>
+    darts_of_cell_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_cell_basic_const_range<i,Self::dimension>
+    darts_of_cell_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, int dim>
+    Dart_of_cell_range<i,dim> darts_of_cell(Dart_handle adart)
+    { return Dart_of_cell_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, int dim>
+    Dart_of_cell_const_range<i,dim> darts_of_cell(Dart_const_handle adart) const
+    { return Dart_of_cell_const_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_cell_range<i,Self::dimension> darts_of_cell(Dart_handle adart)
+    { return darts_of_cell<i,Self::dimension>(adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_cell_const_range<i,Self::dimension>
+    darts_of_cell(Dart_const_handle adart) const
+    { return darts_of_cell<i,Self::dimension>(adart); }
+    //**************************************************************************
+    // Dart_of_involution_basic_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_basic_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_basic_of_involution<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_basic_of_involution<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> > Base;
+
+      Dart_of_involution_basic_range(Self &amap, Dart_handle adart,
+                                     size_type amark=INVALID_MARK):
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_involution_basic_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_basic_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> >
+      Base;
+
+      Dart_of_involution_basic_const_range(const Self &amap,
+                                           Dart_const_handle adart,
+                                           size_type amark=INVALID_MARK) :
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    template<unsigned int i,int dim>
+    Dart_of_involution_basic_range<i,dim>
+    darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_involution_basic_range<i,dim>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i,int dim>
+    Dart_of_involution_basic_const_range<i,dim>
+    darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_involution_basic_const_range<i,dim>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_basic_range<i,Self::dimension>
+    darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_involution_basic_range<i,Self::dimension>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_basic_const_range<i,Self::dimension>
+    darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_involution_basic_const_range<i,Self::dimension>
+        (*this,adart,amark); }
+    //**************************************************************************
+    // Dart_of_involution_inv_basic_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_inv_basic_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_basic_of_involution_inv<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_basic_of_involution_inv<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
+      Base;
+
+      Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart,
+                                         size_type amark=INVALID_MARK):
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_involution_inv_basic_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_inv_basic_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_basic_of_involution_inv<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_basic_of_involution_inv
+      <Self,i,dim> >
+      Base;
+
+      Dart_of_involution_inv_basic_const_range(const Self &amap,
+                                               Dart_const_handle adart,
+                                               size_type amark=INVALID_MARK) :
+        Base(amap, adart, amark)
+      {}
+    };
+    //**************************************************************************
+    template<unsigned int i,int dim>
+    Dart_of_involution_inv_basic_range<i,dim>
+    darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_involution_inv_basic_range<i,dim>(*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i,int dim>
+    Dart_of_involution_inv_basic_const_range<i,dim>
+    darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_involution_inv_basic_const_range<i,dim>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_inv_basic_range<i,Self::dimension>
+    darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK)
+    { return Dart_of_involution_inv_basic_range<i,Self::dimension>
+        (*this,adart,amark); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_inv_basic_const_range<i,Self::dimension>
+    darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const
+    { return Dart_of_involution_inv_basic_const_range<i,Self::dimension>
+        (*this,adart,amark); }
+    //**************************************************************************
+    // Dart_of_involution_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_of_involution<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_of_involution<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> > Base;
+
+      Dart_of_involution_range(Self &amap, Dart_handle adart) :
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_involution_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_of_involution<Self,i,dim> > Base;
+
+      Dart_of_involution_const_range(const Self &amap,
+                                     Dart_const_handle adart):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    template<unsigned int i,int dim>
+    Dart_of_involution_range<i,dim>
+    darts_of_involution(Dart_handle adart)
+    { return Dart_of_involution_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i,int dim>
+    Dart_of_involution_const_range<i,dim>
+    darts_of_involution(Dart_const_handle adart) const
+    { return Dart_of_involution_const_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_range<i,Self::dimension>
+    darts_of_involution(Dart_handle adart)
+    { return Dart_of_involution_range<i,Self::dimension>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_const_range<i,Self::dimension>
+    darts_of_involution(Dart_const_handle adart) const
+    { return Dart_of_involution_const_range<i,Self::dimension>(*this,adart); }
+    //**************************************************************************
+    // Dart_of_involution_inv_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_inv_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_dart_iterator_of_involution_inv<Self,i,dim>,
+     CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_dart_iterator_of_involution_inv<Self,i,dim>,
+       CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> > Base;
+
+      Dart_of_involution_inv_range(Self &amap, Dart_handle adart) :
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // Dart_of_involution_inv_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct Dart_of_involution_inv_const_range: public CMap_const_range
+    <Self, CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_dart_const_iterator_of_involution_inv<Self,i,dim> >
+      Base;
+
+      Dart_of_involution_inv_const_range(const Self &amap,
+                                         Dart_const_handle adart):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    template<unsigned int i,int dim>
+    Dart_of_involution_inv_range<i,dim>
+    darts_of_involution_inv(Dart_handle adart)
+    { return Dart_of_involution_inv_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i,int dim>
+    Dart_of_involution_inv_const_range<i,dim>
+    darts_of_involution_inv(Dart_const_handle adart) const
+    { return Dart_of_involution_inv_const_range<i,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_inv_range<i,Self::dimension>
+    darts_of_involution_inv(Dart_handle adart)
+    { return Dart_of_involution_inv_range<i,Self::dimension>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    Dart_of_involution_inv_const_range<i,Self::dimension>
+    darts_of_involution_inv(Dart_const_handle adart) const
+    { return Dart_of_involution_inv_const_range<i,Self::dimension>
+        (*this,adart); }
+    //**************************************************************************
+    // Dart_basic_range
+    struct Dart_basic_range {
+      typedef CGAL::CMap_dart_iterator_basic_of_all<Self> iterator;
+      typedef CGAL::CMap_dart_const_iterator_basic_of_all<Self> const_iterator;
+      Dart_basic_range(Self &amap) : mmap(amap)
+      {}
+      iterator begin() { return iterator(mmap); }
+      iterator end()   { return iterator(mmap,mmap.null_handle); }
+      const_iterator begin() const { return const_iterator(mmap); }
+      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+      size_type size() const
+      { return mmap.number_of_darts(); }
+      bool empty() const
+      { return mmap.is_empty(); }
+    private:
+      Self & mmap;
+    };
+    //**************************************************************************
+    // Dart_basic_const_range
+    struct Dart_basic_const_range {
+      typedef CGAL::CMap_dart_const_iterator_basic_of_all<Self> const_iterator;
+      Dart_basic_const_range(Self &amap) : mmap(amap)
+      {}
+      const_iterator begin() const { return const_iterator(mmap); }
+      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+      size_type size() const
+      { return mmap.number_of_darts(); }
+      bool empty() const
+      { return mmap.is_empty(); }
+    private:
+      const Self & mmap;
+    };
+    //**************************************************************************
+    Dart_basic_range darts_basic()
+    { return Dart_basic_range(*this); }
+    //--------------------------------------------------------------------------
+    Dart_basic_const_range darts_basic() const
+    { return Dart_basic_const_range(*this); }
+    //**************************************************************************
+    // One_dart_per_incident_cell_range
+    template<unsigned int i,unsigned int j,int dim=Self::dimension>
+    struct One_dart_per_incident_cell_range: public CGAL::CMap_range
+    <Self, CGAL::CMap_one_dart_per_incident_cell_iterator<Self,i,j,dim>,
+     CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
+    {
+      typedef CGAL::CMap_range
+      <Self, CGAL::CMap_one_dart_per_incident_cell_iterator<Self,i,j,dim>,
+       CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
+      Base;
+
+      One_dart_per_incident_cell_range(Self &amap, Dart_handle adart):
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // One_dart_per_incident_cell_const_range
+    template<unsigned int i,unsigned int j,int dim=Self::dimension>
+    struct One_dart_per_incident_cell_const_range: public CMap_const_range
+    <Self, CGAL::CMap_one_dart_per_incident_cell_const_iterator<Self,i,j,dim> >
+    {
+      typedef CMap_const_range
+      <Self, CGAL::CMap_one_dart_per_incident_cell_const_iterator
+      <Self,i,j,dim> > Base;
+
+      One_dart_per_incident_cell_const_range(const Self &amap,
+                                             Dart_const_handle adart) :
+        Base(amap, adart)
+      {}
+    };
+    //**************************************************************************
+    // One_dart_per_cell_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct One_dart_per_cell_range {
+      typedef CGAL::CMap_one_dart_per_cell_iterator<Self,i,dim> iterator;
+      typedef CGAL::CMap_one_dart_per_cell_const_iterator<Self,i,dim>
+      const_iterator;
+      One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0)
+      {}
+      iterator begin() { return iterator(mmap); }
+      iterator end()   { return iterator(mmap,mmap.null_handle); }
+      const_iterator begin() const { return const_iterator(mmap); }
+      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+      size_type size() const
+      {
+        if (msize==0)
+          for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
+            ++msize;
+        return msize;
+      }
+      bool empty() const
+      { return mmap.is_empty(); }
+    private:
+      Self & mmap;
+      mutable size_type msize;
+    };
+    //**************************************************************************
+    // One_dart_per_cell_const_range
+    template<unsigned int i,int dim=Self::dimension>
+    struct One_dart_per_cell_const_range {
+      typedef CGAL::CMap_one_dart_per_cell_const_iterator<Self,i,dim>
+      const_iterator;
+      One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0)
+      {}
+      const_iterator begin() const { return const_iterator(mmap); }
+      const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+      size_type size() const
+      {
+        if (msize==0)
+          for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
+            ++msize;
+        return msize;
+      }
+      bool empty() const
+      { return mmap.is_empty(); }
+    private:
+      const Self & mmap;
+      mutable size_type msize;
+    };
+    //**************************************************************************
+    /// @return a range on the i-cells incindent to the given j-cell.
+    template<unsigned int i, unsigned int j, int dim>
+    One_dart_per_incident_cell_range<i,j,dim>
+    one_dart_per_incident_cell(Dart_handle adart)
+    { return One_dart_per_incident_cell_range<i,j,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, unsigned int j, int dim>
+    One_dart_per_incident_cell_const_range<i,j,dim>
+    one_dart_per_incident_cell(Dart_const_handle adart) const
+    { return One_dart_per_incident_cell_const_range<i,j,dim>(*this,adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, unsigned int j>
+    One_dart_per_incident_cell_range<i,j,Self::dimension>
+    one_dart_per_incident_cell(Dart_handle adart)
+    { return one_dart_per_incident_cell<i,j,Self::dimension>(adart); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, unsigned int j>
+    One_dart_per_incident_cell_const_range<i,j,Self::dimension>
+    one_dart_per_incident_cell(Dart_const_handle adart) const
+    { return one_dart_per_incident_cell<i,j,Self::dimension>(adart); }
+    //--------------------------------------------------------------------------
+    /// @return a range on all the i-cells
+    template<unsigned int i, int dim>
+    One_dart_per_cell_range<i,dim> one_dart_per_cell()
+    { return One_dart_per_cell_range<i,dim>(*this); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i, int dim>
+    One_dart_per_cell_const_range<i,dim> one_dart_per_cell() const
+    { return One_dart_per_cell_const_range<i,dim>(*this); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    One_dart_per_cell_range<i,Self::dimension> one_dart_per_cell()
+    { return one_dart_per_cell<i,Self::dimension>(); }
+    //--------------------------------------------------------------------------
+    template<unsigned int i>
+    One_dart_per_cell_const_range<i,Self::dimension> one_dart_per_cell() const
+    { return one_dart_per_cell<i,Self::dimension>(); }
+    //--------------------------------------------------------------------------
+
+  public:
+
+    /** Compute the dual of a Combinatorial_map.
+     * @param amap the cmap in which we build the dual of this map.
+     * @param adart a dart of the initial map, NULL by default.
+     * @return adart of the dual map, the dual of adart if adart!=NULL,
+     *         any dart otherwise.
+     * As soon as we don't modify this map and amap map, we can iterate
+     * simultaneously through all the darts of the two maps and we have
+     * each time of the iteration two "dual" darts.
+     */
+    Dart_handle dual(Self& amap, Dart_handle adart=null_handle)
+    {
+      CGAL_assertion( is_without_boundary(dimension) );
+
+      CGAL::Unique_hash_map< Dart_handle, Dart_handle,
+        typename Self::Hash_function > dual;
+      Dart_handle d, d2, res = amap.null_handle;
+
+      // We clear amap. TODO return a new amap ?
+      amap.clear();
+
+      // We create a copy of all the dart of the map.
+      for ( typename Dart_range::iterator it=darts().begin();
+            it!=darts().end(); ++it)
+      {
+        dual[it] = amap.create_dart();
+        if ( it==adart && res==amap.null_handle ) res = dual[it];
+      }
+
+      // Then we link the darts by using the dual formula :
+      // G(B,b1,b2,...,bn-1,bn) =>
+      //    dual(G)=(B, b(n-1)obn, b(n-2)obn,...,b1obn, bn)
+      // We suppose darts are run in the same order for both maps.
+      typename Dart_range::iterator it2=amap.darts().begin();
+      for ( typename Dart_range::iterator it=darts().begin();
+            it!=darts().end(); ++it, ++it2)
+      {
+        d = it2; // The supposition on the order allows to avoid d=dual[it];
+        CGAL_assertion( it2==dual[it] );
+
+        // First case outside the loop since we need to use link_beta1
+        if ( amap.template is_free<1>(d) &&
+             beta<dimension, dimension-1>(it)!=null_dart_handle )
+          amap.basic_link_beta_1(d, dual[beta<dimension, dimension-1>(it)]);
+
+        // and during the loop we use link_beta(d1,d2,i)
+        for ( unsigned int i=dimension-2; i>=1; --i)
+        {
+          if ( amap.is_free(d,dimension-i) &&
+               beta(it, dimension, i)!=null_dart_handle )
+            amap.basic_link_beta(d, dual[beta(it, dimension, i)], dimension-i);
+        }
+        if ( amap.template is_free<dimension>(d) )
+        {
+          CGAL_assertion ( !this->template is_free<dimension>(it) );
+          amap.basic_link_beta(d, dual[beta<dimension>(it)], dimension);
+        }
+      }
+
+      //  CGAL_postcondition(amap2.is_valid());
+
+      if ( res==amap.null_handle ) res = amap.darts().begin();
+      return res;
+    }
+
+
+    /** Test if the connected component of cmap containing dart dh1 is
+     *  isomorphic to the connected component of map2 containing dart dh2,
+     *  starting from dh1 and dh2.
+     * @param dh1  initial dart for this map
+     * @param map2 the second combinatorial map
+     * @param dh2  initial dart for map2
+     * @param testAttributes Boolean to test the equality of attributes (true)
+     *                       or not (false)
+     * @return true iff the cc of map is isomorphic to the cc of map2 starting
+     *     from dh1 and dh2; by testing the equality of attributes if
+     *     testAttributes is true
+     */
+    template <unsigned int d2, typename Refs2, typename Items2, class Alloc2,
+              class Storage2>
+    bool are_cc_isomorphic(Dart_const_handle dh1,
+                           const Combinatorial_map_base
+                           <d2,Refs2,Items2,Alloc2, Storage2>& map2,
+                           typename Combinatorial_map_base
+                           <d2,Refs2,Items2,Alloc2, Storage2>::Dart_const_handle dh2,
+                           bool testAttributes=true) const
+    {
+      // CGAL_assertion(dimension==map2.dimension);
+      typedef Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2> Map2;
+
+      bool match = true;
+
+      // Two stacks used to run through the two maps.
+      std::deque< Dart_const_handle > toTreat1;
+      std::deque< typename Map2::Dart_const_handle > toTreat2;
+
+      size_type m1 = get_new_mark();
+      size_type m2 = map2.get_new_mark();
+
+      toTreat1.push_back(dh1);
+      toTreat2.push_back(dh2);
+
+      Dart_const_handle current;
+      typename Map2::Dart_const_handle other;
+
+      unsigned int i = 0;
+      CGAL::Unique_hash_map<Dart_const_handle,
+                            typename Map2::Dart_const_handle,
+                            typename Self::Hash_function> bijection;
+
+      if ( testAttributes )
+      {
+        internal::Test_is_same_attribute_functor<Self, Map2>::
+            value = true;
+        internal::Test_is_same_attribute_functor<Map2, Self>::
+            value = true;
+      }
+
+      while (match && !toTreat1.empty())
+      {
+        // Next dart
+        current = toTreat1.front();
+        toTreat1.pop_front();
+        other = toTreat2.front();
+        toTreat2.pop_front();
+
+        if (!is_marked(current, m1))
+        {
+          if (map2.is_marked(other, m2))
+            match=false;
+          else
+          {
+            bijection[current] = other;
+
+            mark(current, m1);
+            map2.mark(other, m2);
+
+            if (testAttributes)
+            {
+              // We need to test in both direction because
+              // Foreach_enabled_attributes only test non void attributes
+              // of Self.
+              Helper::template Foreach_enabled_attributes
+                < internal::Test_is_same_attribute_functor<Self, Map2> >::
+                run(this,&map2,current, other);
+              Map2::Helper::template Foreach_enabled_attributes
+                < internal::Test_is_same_attribute_functor<Map2, Self> >::
+                run(&map2,this,other, current);
+              if ( !internal::Test_is_same_attribute_functor<Self, Map2>::
+                   value ||
+                   !internal::Test_is_same_attribute_functor<Map2, Self>::
+                   value )
+                match=false;
+            }
+
+            // We test if the injection is valid with its neighboors.
+            // We go out as soon as it is not satisfied.
+            for (i = 0; match && i <= dimension; ++i)
+            {
+              if ( i>map2.dimension )
+              {
+                if (!is_free(current,i)) match=false;
+              }
+              else
+              {
+                if (is_free(current,i))
+                {
+                  if (!map2.is_free(other,i))
+                    match = false;
+                }
+                else
+                {
+                  if (map2.is_free(other,i))
+                    match = false;
+                  else
+                  {
+                    if (is_marked(beta(current,i), m1) !=
+                        map2.is_marked(map2.beta(other,i), m2))
+                      match = false;
+                    else
+                    {
+                      if (!is_marked(beta(current,i), m1))
+                      {
+                        toTreat1.push_back(beta(current,i));
+                        toTreat2.push_back(map2.beta(other,i));
+                      }
+                      else
+                      {
+                        if (bijection[beta(current,i)]!=map2.beta(other,i))
+                          match = false;
+                      }
+                    }
+                  }
+                }
+              }
+            }
+            // Now we test if the second map has more beta links than the first
+            for ( i=dimension+1; match && i<=map2.dimension; ++i )
+            {
+              if (!map2.is_free(other,i)) match=false;
+            }
+          }
+        }
+        else
+        {
+          if (!map2.is_marked(other, m2))
+            match = false;
+        }
+      }
+
+      // Here we test if both queue are empty
+      if ( !toTreat1.empty() || !toTreat2.empty() ) match = false;
+
+      // Here we unmark all the marked darts.
+      toTreat1.clear();
+      toTreat2.clear();
+
+      toTreat1.push_back(dh1);
+      toTreat2.push_back(dh2);
+
+      while (!toTreat1.empty())
+      {
+        current = toTreat1.front();
+        toTreat1.pop_front();
+        other = toTreat2.front();
+        toTreat2.pop_front();
+
+        unmark(current, m1);
+        map2.unmark(other, m2);
+
+        for (i = 0; match && i <= dimension; ++i)
+        {
+          if (!is_free(current,i) && is_marked(beta(current,i), m1))
+          {
+            CGAL_assertion(!map2.is_free(other,i) &&
+                           map2.is_marked(map2.beta(other,i), m2));
+            toTreat1.push_back(beta(current,i));
+            toTreat2.push_back(map2.beta(other,i));
+          }
+        }
+      }
+
+      free_mark(m1);
+      map2.free_mark(m2);
+
+      return match;
+    }
+
+    /** Test if this cmap is isomorphic to map2.
+     * @pre cmap is connected.
+     * @param map2 the second combinatorial map
+     * @param testAttributes Boolean to test the equality of attributes (true)
+     *                       or not (false)
+     * @return true iff this map is isomorphic to map2, testing the equality
+     *         of attributes if testAttributes is true
+     */
+    template <unsigned int d2, typename Refs2, typename Items2, class Alloc2,
+              class Storage2>
+    bool is_isomorphic_to(const Combinatorial_map_base
+                          <d2,Refs2,Items2,Alloc2, Storage2>& map2,
+                          bool testAttributes=true)
+    {
+      // if ( dimension!=map2.dimension ) return false;
+
+      Dart_const_handle d1=darts().begin();
+
+      for (typename Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2>::
+             Dart_range::const_iterator it(map2.darts().begin()),
+             itend(map2.darts().end()); it!=itend; ++it)
+      {
+        if (are_cc_isomorphic(d1, map2, it, testAttributes))
+        {
+          return true;
+        }
+      }
+
+      return false;
+    }
+
+    /** Test if the attributes of this map are automatically updated.
+     * @return true iff the boolean automatic_attributes_management is set to true.
+     */
+    bool are_attributes_automatically_managed() const
+    {
+      return automatic_attributes_management;
+    }
+
+    /** Sets the automatic_attributes_management boolean.
+     */
+    void set_automatic_attributes_management(bool newval)
+    {
+      if (this->automatic_attributes_management == false && newval == true)
+      {
+        correct_invalid_attributes();
+      }
+
+      this->automatic_attributes_management = newval;
+    }
+
+  protected:
+    /// Number of times each mark is reserved. 0 if the mark is free.
+    mutable size_type mnb_times_reserved_marks[NB_MARKS];
+
+    /// Mask marks to know the value of unmark dart, for each index i.
+    mutable std::bitset<NB_MARKS> mmask_marks;
+
+    /// Number of used marks.
+    mutable size_type mnb_used_marks;
+
+    /// Index of each mark, in mfree_marks_stack or in mfree_marks_stack.
+    mutable size_type mindex_marks[NB_MARKS];
+
+    /// "Stack" of free marks.
+    mutable size_type mfree_marks_stack[NB_MARKS];
+
+    /// "Stack" of used marks.
+    mutable size_type mused_marks_stack[NB_MARKS];
+
+    /// Number of marked darts for each used marks.
+    mutable size_type mnb_marked_darts[NB_MARKS];
+
+    /// Automatic management of the attributes:
+    /// true means attributes are always maintained updated during operations.
+    bool automatic_attributes_management;
+
+    /// Tuple of unary and binary functors (for all non void attributes).
+    typename Helper::Split_functors m_onsplit_functors;
+    typename Helper::Merge_functors m_onmerge_functors;
+  };
+
+  template < unsigned int d_,
+             class Items_=Combinatorial_map_min_items<d_>,
+             class Alloc_=CGAL_ALLOCATOR(int),
+             class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_> >
+  class Combinatorial_map :
+    public Combinatorial_map_base<d_,
+                                  Combinatorial_map<d_,Items_,Alloc_, Storage_>,
+                                  Items_, Alloc_, Storage_ >
+  {
+  public:
+    typedef Combinatorial_map<d_, Items_,Alloc_, Storage_>  Self;
+    typedef Combinatorial_map_base<d_, Self, Items_, Alloc_, Storage_> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Dart_const_handle Dart_const_handle;
+    typedef typename Base::Alloc Alloc;
+    typedef typename Base::Exception_no_more_available_mark
+    Exception_no_more_available_mark;
+
+    Combinatorial_map() : Base()
+    {}
+
+    Combinatorial_map(const Self & amap) : Base()
+    { Base::template copy<Self>(amap); }
+
+    template < class CMap >
+    Combinatorial_map(const CMap & amap)
+    { Base::template copy<CMap>(amap); }
+
+    template < class CMap, typename Converters >
+    Combinatorial_map(const CMap & amap, const Converters& converters)
+    { Base::template copy<CMap, Converters>
+          (amap, converters); }
+
+    template < class CMap, typename Converters, typename Pointconverter >
+    Combinatorial_map(const CMap & amap, const Converters& converters,
+                      const Pointconverter& pointconverter)
+    { Base::template copy<CMap, Converters, Pointconverter>
+          (amap, converters, pointconverter); }
+  };
+
+} // namespace CGAL
+
+
+#endif // CGAL_COMBINATORIAL_MAP_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_basic_operations.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_basic_operations.h
new file mode 100644
index 0000000..ae57c78
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_basic_operations.h
@@ -0,0 +1,359 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H
+#define CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H 1
+
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/tags.h>
+
+namespace CGAL
+{
+  /** @file Combinatorial_map_basic_operations.h
+   * Basic operations on a combinatorial map.
+   */
+
+  /** Test if the two given darts belong to the same given orbit.
+   * @param amap a combinatorial map.
+   * @param adart1 the first dart.
+   * @param adart2 the second dart.
+   * @return true iff the two darts belong to the same orbit.
+   */
+  template < class Map, class Iterator >
+  bool belong_to_same_orbit(const Map & amap, 
+                            typename Map::Dart_const_handle adart1,
+                            typename Map::Dart_const_handle adart2)
+  {
+    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
+                                           Tag_false>::value) );
+    bool found=false;
+
+    for (Iterator it(amap, adart1); !found && it.cont(); ++it)
+    {
+      if (it == adart2) found = true;
+    }
+
+    return found;
+  }
+
+  /** Test if all the darts of a given orbit are marked.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the orbit.
+   * @param amark the mark.
+   * @return true iff all the darts are marked.
+   */
+  template < class Map, class Iterator >
+  bool is_whole_orbit_marked(const Map & amap, 
+                             typename Map::Dart_const_handle adart,
+                             typename Map::size_type amark)
+  {
+    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
+                                           Tag_false>::value) );
+    bool res=true;
+
+    for ( Iterator it(amap, adart); res && it.cont(); ++it )
+    {
+      if (!amap.is_marked(it, amark)) res = false;
+    }
+
+    return res;
+  }
+
+  /** Test if all the darts of a given orbit are unmarked.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the orbit.
+   * @param amark the mark.
+   * @return true iff all the darts are unmarked.
+   */
+  template < class Map, class Iterator >
+  bool is_whole_orbit_unmarked(const Map & amap, 
+                               typename Map::Dart_const_handle adart,
+                               typename Map::size_type amark)
+  {
+    amap.negate_mark(amark);
+    bool res=CGAL::is_whole_orbit_marked<Map,Iterator>(amap, adart, amark);
+    amap.negate_mark(amark);
+    return res;
+  }
+
+  /** Mark a given orbit with a given mark.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the orbit.
+   * @param amark the mark.
+   * @return the number of darts of the marked orbit.
+   * @pre The whole orbit must be unmarked.
+   */
+  template < class Map, class Iterator >
+  typename Map::size_type mark_orbit(const Map & amap,
+                                     typename Map::Dart_const_handle adart,
+                                     typename Map::size_type amark)
+  {
+    CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
+                            Tag_true>::value) );
+    CGAL_assertion( (is_whole_orbit_unmarked<Map,
+                     CMap_non_basic_iterator<Map,Iterator> >
+                     (amap, adart, amark)) );
+    typename Map::size_type res=0;
+
+    for (Iterator it(amap, adart, amark); it.cont(); ++it)
+    {
+      amap.mark(it, amark);
+      ++res;
+    }
+
+    return res;
+  }
+
+  /** Unmark a given orbit with a given mark.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the orbit.
+   * @param amark the mark.
+   * @return the number of darts of the unmarked orbit.
+   * @pre The whole orbit must be marked.
+   */
+  template < class Map, class Iterator >
+  typename Map::size_type unmark_orbit(const Map & amap, 
+                                       typename Map::Dart_const_handle adart,
+                                       typename Map::size_type amark)
+  {
+    amap.negate_mark(amark);
+    typename Map::size_type
+        res=CGAL::mark_orbit<Map, Iterator>(amap, adart, amark);
+    amap.negate_mark(amark);
+    return res;
+  }
+
+  /** Test if the two given darts belong to the same cell.
+   * @param amap a combinatorial map.
+   * @param adart1 the first dart.
+   * @param adart2 the second dart.
+   * @return true iff the two darts belong to the same cell.
+   */
+  template < class Map, unsigned int i, unsigned int d>
+  bool belong_to_same_cell(const Map & amap, 
+                           typename Map::Dart_const_handle adart1,
+                           typename Map::Dart_const_handle adart2)
+  {
+    return CGAL::belong_to_same_orbit<Map,
+        typename Map::template Dart_of_cell_range<i,d>::const_iterator>
+        (amap, adart1, adart2);
+  }
+
+  template < class Map, unsigned int i>
+  bool belong_to_same_cell(const Map & amap, 
+                           typename Map::Dart_const_handle adart1,
+                           typename Map::Dart_const_handle adart2)
+  {
+    return CGAL::belong_to_same_cell<Map,i,Map::dimension>(amap,adart1,adart2);
+  }
+
+
+  /** Test if all the darts of a given cell are marked.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the cell.
+   * @param amark the mark.
+   * @return true iff all the darts are marked.
+   */
+  template < class Map, unsigned int i, unsigned int d>
+  bool is_whole_cell_marked(const Map & amap, 
+                            typename Map::Dart_const_handle adart,
+                            typename Map::size_type amark)
+  {  
+    return CGAL::is_whole_orbit_marked<Map,
+        typename Map::template Dart_of_cell_range<i,d>::const_iterator>
+        (amap, adart, amark);
+  }
+
+  template < class Map, unsigned int i>
+  bool is_whole_cell_marked(const Map & amap, 
+                            typename Map::Dart_const_handle adart,
+                            typename Map::size_type amark)
+  {  
+    return CGAL::is_whole_cell_marked<Map,i,Map::dimension>(amap,adart,amark);
+  }
+
+  /** Test if all the darts of a given cell are unmarked.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the cell.
+   * @param amark the mark.
+   * @return true iff all the darts are marked.
+   */
+  template < class Map, unsigned int i, unsigned int d >
+  bool is_whole_cell_unmarked(const Map & amap, 
+                              typename Map::Dart_const_handle adart,
+                              typename Map::size_type amark)
+  {  
+    return CGAL::is_whole_orbit_unmarked<Map,
+        typename Map::template Dart_of_cell_range<i,d>::iterator>
+        (amap, adart, amark);
+  }
+
+  template < class Map, unsigned int i>
+  bool is_whole_cell_unmarked(const Map & amap, 
+                              typename Map::Dart_const_handle adart,
+                              typename Map::size_type amark)
+  {  
+    return CGAL::is_whole_cell_unmarked<Map,i,Map::dimension>
+        (amap,adart,amark);
+  }
+
+  /** Mark a given cell with a given mark.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the cell.
+   * @param amark the mark.
+   * @return the number of darts of the marked cell.
+   * @pre The whole cell must be unmarked.
+   */
+  template < class Map, unsigned int i, unsigned int d >
+  typename Map::size_type mark_cell(const Map & amap, 
+                                    typename Map::Dart_const_handle adart,
+                                    typename Map::size_type amark)
+  { return CGAL::mark_orbit<Map,
+        typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
+        (amap, adart, amark); }
+     
+  template < class Map, unsigned int i>
+  typename Map::size_type mark_cell(const Map & amap, 
+                                    typename Map::Dart_const_handle adart,
+                                    typename Map::size_type amark)
+  { return CGAL::mark_cell<Map,i,Map::dimension>(amap, adart, amark);}
+
+  /** Unmark a given orbit with a given mark.
+   * @param amap a combinatorial map.
+   * @param adart a dart of the cell.
+   * @param amark the mark.
+   * @return the number of darts of the unmarked cell.
+   * @pre The whole cell must be marked.
+   */
+  template < class Map, unsigned int i, unsigned int d >
+  typename Map::size_type unmark_cell(const Map & amap, 
+                                      typename Map::Dart_handle adart,
+                                      typename Map::size_type amark)
+  { return CGAL::unmark_orbit<Map,
+        typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
+        (amap, adart, amark);}
+
+  template < class Map, unsigned int i >
+  typename Map::size_type unmark_cell(const Map & amap, 
+                                      typename Map::Dart_handle adart,
+                                      typename Map::size_type amark)
+  { return CGAL::unmark_cell<Map,i,Map::dimension>(amap, adart, amark); }
+     
+  /** Compute the degree of a given i-cell c.
+   * The degree is the number of distinct i+1 cells incident to c.
+   * @param amap a combinatorial map. 
+   * @param adart a dart of the cell.
+   * @return the degree of the cell.
+   */
+  template < class Map, unsigned int i >
+  typename Map::size_type degree( const Map & amap, 
+                                  typename Map::Dart_handle adart )
+  {
+    CGAL_assertion(adart != NULL);
+  
+    typename Map::size_type nbIncident = 0;
+    typename Map::size_type mark;
+    typename Map::size_type treated;
+    mark = amap.get_new_mark();
+    treated = amap.get_new_mark();
+
+    typename Map::template
+      Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
+    for ( ;it.cont(); ++it )
+    {
+      if (!amap.is_marked(*it, treated))
+      {
+        ++nbIncident;
+        CGAL::mark_cell<Map,i+1>(amap, *it, treated);
+      }
+      amap.mark(*it,mark);
+    }
+  
+    amap.negate_mark(mark);
+    for (it.rewind(); it.cont(); ++it)
+    {
+      if (amap.is_marked(*it, treated))
+        CGAL::unmark_cell<Map,i+1>(amap, *it, treated);
+      amap.mark(*it,mark);
+    }
+  
+    amap.negate_mark(mark);
+    CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+    CGAL_assertion( amap.is_whole_map_unmarked(treated) );
+
+    amap.free_mark(mark);
+    amap.free_mark(treated);
+  
+    CGAL_assertion(nbIncident != 0);
+    return nbIncident;
+  }
+
+  /** Compute the co-degree of a given i-cell c.
+   * The co-degree is the number of distinct i-1 cells incident to c.
+   * @param amap a combinatorial map. 
+   * @param adart a dart of the cell.
+   * @return the co-degree of the cell.
+   */
+  template < class Map, unsigned int i >
+  typename Map::size_type codegree(const Map & amap, 
+                                   typename Map::Dart_handle adart)
+  {
+    CGAL_assertion(adart != NULL);
+  
+    typename Map::size_type nbIncident = 0;
+    typename Map::size_type mark;
+    typename Map::size_type treated;
+    mark = amap.get_new_mark();
+    treated = amap.get_new_mark();
+
+    typename Map::template
+      Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
+    for ( ; it.cont(); ++it)
+    {
+      if (!amap.is_marked(*it, treated))
+      {
+        ++nbIncident;
+        CGAL::mark_cell<Map,i-1>(amap, *it, treated);
+      }
+      amap.mark(*it,mark);
+    }
+  
+    amap.negate_mark(mark);
+    for (it.rewind(); it.cont(); ++it)
+    {
+      if (amap.is_marked(*it, treated))      
+        CGAL::unmark_cell<Map,i-1>(amap, *it, treated);
+      amap.mark(*it,mark);
+    }
+
+    amap.negate_mark(mark);
+    CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+    CGAL_assertion( amap.is_whole_map_unmarked(treated) );
+
+    amap.free_mark(mark);
+    amap.free_mark(treated);
+  
+    CGAL_assertion(nbIncident != 0);
+    return nbIncident;
+  }
+
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_BASIC_OPERATIONS_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_constructors.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_constructors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_constructors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_constructors.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_functors.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_functors.h
new file mode 100644
index 0000000..527728e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_functors.h
@@ -0,0 +1,173 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_FUNCTORS_H
+#define CGAL_COMBINATORIAL_MAP_FUNCTORS_H
+
+#include <CGAL/Dart_const_iterators.h>
+#include <CGAL/Combinatorial_map_basic_operations.h>
+#include <CGAL/internal/Combinatorial_map_internal_functors.h>
+#include <vector>
+#include <boost/mpl/has_xxx.hpp>
+
+/* Definition of functors used to manage attributes (we need functors as
+ * attributes are stored in tuple, thus all the access must be done at
+ * compiling time). Some of these functors are used with
+ * Foreach_enabled_attributes to iterate through all the non void attribs.
+ * Functors allowing to group/ungroup attributes are defined in
+ * Combinatorial_map_group_functors.h. Some internal functors are defined
+ * in internal/Combinatorial_map_internal_functors.h.
+ *
+ * Reserve_mark_functor<CMap> to reserve one mark, used with
+ *   Foreach_enabled_attributes to reserve a mark for each non void attribute.
+ *
+ * Display_attribute_functor<CMap> to display the address of the i-attribute
+ *   of a given dart (can be used with Foreach_enabled_attributes)
+ *
+ * Set_i_attribute_functor<CMap, i> to set the i-attribute of a given
+ *   i-cell.
+ *
+ * Test_is_valid_attribute_functor<CMap> to test if an attribute is valid
+ *    (used with Foreach_enabled_attributes)
+ *
+ * Is_attribute_has_non_void_info<Attr> to test if the attribute
+ *   Attr is non Void and has an non void Info as inner type
+ *
+ * Is_attribute_has_point<Attr> to test if the attribute
+ *   Attr is non Void and has a Point inner type
+ *
+ */
+
+namespace CGAL
+{
+/** @file Combinatorial_map_functors.h
+ * Definition of functors used for dD Combinatorial map.
+ */
+// ****************************************************************************
+/// Functor used to reserve one mark, used with Foreach_enabled_attributes
+/// to reserve a mark for each enabled attribute.
+template<typename CMap>
+struct Reserve_mark_functor
+{
+  typedef typename CMap::size_type size_type;
+
+  template <unsigned int i>
+  static void run(const CMap* amap, std::vector<size_type>* marks)
+  { (*marks)[i] = amap->get_new_mark(); }
+};
+// ****************************************************************************
+/// Functor used to display the address of the i-cell attribute. Can be used
+/// with Foreach_enabled_attributes.
+template<typename CMap>
+struct Display_attribute_functor
+{
+  template <unsigned int i>
+  static void run(const CMap* /*amap*/,
+                  typename CMap::Dart_const_handle adart)
+  {
+    if ( adart->template attribute<i>()==NULL )
+      std::cout<<"NULL";
+    else
+      std::cout<<&*(adart->template attribute<i>());
+  }
+};
+// ****************************************************************************
+/// Functor used to test if a cell is valid
+template<typename CMap>
+struct Test_is_valid_attribute_functor
+{
+  template <unsigned int i>
+  static bool run(const CMap* amap,
+                  typename CMap::Dart_const_handle adart)
+  {
+    typedef typename CMap::size_type size_type;
+
+    size_type mark=amap->get_new_mark();
+    bool res = true;
+    CGAL::internal::Test_is_valid_attribute_functor<CMap>::
+        run<i>(amap, adart, mark, &res);
+
+    amap->negate_mark(mark);
+    if ( !amap->is_whole_map_marked(mark) )
+    {
+      for ( CGAL::CMap_dart_const_iterator_basic_of_cell<CMap,i>
+            it(*amap, adart, mark); it.cont(); ++it )
+        amap->unmark(it, mark);
+    }
+    CGAL_assertion ( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+
+    return res;
+  }
+};
+// ****************************************************************************
+/// Functor used to set the i-attribute of a given i-cell.
+/// We can use any range as Range type, by default we use
+/// Dart_of_cell_range<i>
+template<typename CMap, unsigned int i,
+         typename T=typename CMap::template Attribute_type<i>::type>
+struct Set_i_attribute_functor
+{
+  static void run( CMap* amap, typename CMap::Dart_handle dh,
+                   typename CMap::template Attribute_handle<i>::type ah )
+  {
+    amap->template set_attribute<i>(dh, ah);
+  }
+};
+/// Specialization for void attributes.
+template<typename CMap, unsigned int i>
+struct Set_i_attribute_functor<CMap,i,CGAL::Void>
+{
+  static void run( CMap*, typename CMap::Dart_handle,
+                   typename CMap::template Attribute_handle<i>::type)
+  {}
+};
+// ****************************************************************************
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_point,Point,false)
+
+template<typename Attr, typename Info=typename Attr::Info>
+struct Is_nonvoid_attribute_has_non_void_info
+{
+  static const bool value=true;
+};
+template<typename Attr>
+struct Is_nonvoid_attribute_has_non_void_info<Attr, void>
+{
+  static const bool value=false;
+};
+
+template<typename Attr>
+struct Is_attribute_has_non_void_info
+{
+  static const bool value=Is_nonvoid_attribute_has_non_void_info<Attr>::value;
+};
+template<>
+struct Is_attribute_has_non_void_info<CGAL::Void>
+{
+  static const bool value=false;
+};
+// ****************************************************************************
+template<typename Attr>
+struct Is_attribute_has_point
+{ static const bool value=Has_point<Attr>::value; };
+// ****************************************************************************
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_FUNCTORS_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_insertions.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_insertions.h
new file mode 100644
index 0000000..613188a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_insertions.h
@@ -0,0 +1,729 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_INSERTIONS_H
+#define CGAL_COMBINATORIAL_MAP_INSERTIONS_H
+
+#include <deque>
+
+namespace CGAL
+{
+/** @file Combinatorial_map_insertions.h
+ * Insertion operations on combinatorial map.
+ */
+
+/** Insert a vertex in a given edge.
+ * @param amap the used combinatorial map.
+ * @param adart a dart of the edge (!=NULL && !=null_dart_handle).
+ * @param update_attributes a boolean to update the enabled attributes
+ *        (deprecated, now we use are_attributes_automatically_managed())
+ * @return a dart of the new vertex.
+ */
+template<class CMap>
+typename CMap::Dart_handle
+insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
+                         typename CMap::template
+                         Attribute_handle<0>::type ah=CMap::null_handle,
+                         bool update_attributes=true )
+{
+  typename CMap::Dart_handle d1, d2;
+  typename CMap::size_type  mark=amap.get_new_mark();
+
+  // 1) We store all the darts of the edge.
+  std::deque<typename CMap::Dart_handle> vect;
+  typename CMap::size_type m=amap.get_new_mark();
+  {
+    for ( typename CMap::template Dart_of_cell_basic_range<1>::iterator
+          it=amap.template darts_of_cell_basic<1>(adart, m).begin();
+          it != amap.template darts_of_cell_basic<1>(adart, m).end(); ++it )
+      vect.push_back(it);
+  }
+
+  // 2) For each dart of the cell, we modify link of neighbors.
+  typename std::deque<typename CMap::Dart_handle>::iterator it = vect.begin();
+  for (; it != vect.end(); ++it)
+  {
+    d1 = amap.create_dart();
+
+    if (!amap.template is_free<1>(*it))
+    { amap.basic_link_beta_1(d1, amap.template beta<1>(*it)); }
+
+    for ( unsigned int dim=2; dim<=CMap::dimension; ++dim )
+    {
+      if (!amap.is_free(*it, dim) && amap.is_marked(amap.beta(*it, dim), mark))
+      {
+        amap.basic_link_beta_for_involution(amap.beta(*it, dim), d1, dim);
+        amap.basic_link_beta_for_involution(*it, amap.beta(*it, dim, 1), dim);
+      }
+    }
+
+    amap.basic_link_beta_1(*it, d1);
+
+    if (amap.are_attributes_automatically_managed() && update_attributes)
+    {
+      // We copy all the attributes except for dim=0
+      CMap::Helper::template Foreach_enabled_attributes_except
+        <CGAL::internal::Group_attribute_functor_of_dart<CMap>, 0>::
+        run(&amap,*it,d1);
+    }
+    if (ah != CMap::null_handle)
+    {
+      // We initialise the 0-atttrib to ah
+      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+          run(&amap, d1, ah);
+    }
+    amap.mark(*it, mark);
+  }
+
+  for (it = vect.begin(); it != vect.end(); ++it)
+  {
+    amap.unmark(*it, m);
+    amap.unmark(*it, mark);
+  }
+
+  CGAL_assertion(amap.is_whole_map_unmarked(m));
+  CGAL_assertion(amap.is_whole_map_unmarked(mark));
+
+  amap.free_mark(m);
+  amap.free_mark(mark);
+
+  if (amap.are_attributes_automatically_managed() && update_attributes)
+  {
+    CGAL::internal::Degroup_attribute_functor_run<CMap, 1>::
+      run(&amap, adart, amap.template beta<1>(adart));
+  }
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+  CGAL_assertion( amap.is_valid() );
+#endif
+
+  return amap.template beta<1>(adart);
+}
+
+/** Insert a vertex in the given 2-cell which is splitted in triangles,
+ * once for each inital edge of the facet.
+ * @param amap the used combinatorial map.
+ * @param adart a dart of the facet to triangulate.
+ * @param update_attributes a boolean to update the enabled attributes
+ *        (deprecated, now we use are_attributes_automatically_managed())
+ * @return A dart incident to the new vertex.
+ */
+template < class CMap >
+typename CMap::Dart_handle
+insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
+                         typename CMap::template
+                         Attribute_handle<0>::type ah=CMap::null_handle,
+                         bool update_attributes=true )
+{
+  CGAL_assertion(adart!=amap.null_dart_handle);
+
+  typename CMap::Dart_handle first=adart, prev=amap.null_handle,
+    cur=amap.null_handle, next=amap.null_handle,
+    n1=amap.null_handle, n2=amap.null_handle,
+    nn1=amap.null_handle, nn2=amap.null_handle;
+
+  // If the facet is open, we search the dart 0-free
+  while ( !amap.template is_free<0>(first) &&
+          amap.template beta<0>(first)!=adart )
+    first = amap.template beta<0>(first);
+
+  // Mark used to mark darts already treated.
+  typename CMap::size_type treated = amap.get_new_mark();
+
+  // Stack of marked darts
+  std::deque<typename CMap::Dart_handle> tounmark;
+
+  // Now we run through the facet
+  cur = first;
+  do
+  {
+    next = amap.template beta<1>(cur);
+    amap.mark(cur, treated);
+    tounmark.push_back(cur);
+
+    if (!amap.template is_free<0>(cur))
+    {
+      n1=amap.create_dart();
+      amap.link_beta_0(cur, n1);
+    }
+    else n1 = amap.null_handle;
+
+    if (!amap.template is_free<1>(cur))
+    {
+      n2 = amap.create_dart();
+      amap.link_beta_1(cur, n2);
+    }
+    else n2 = amap.null_handle;
+
+    if ( n1!=amap.null_handle )
+    {
+      if ( n2!=amap.null_handle )
+        amap.basic_link_beta_0(n1, n2);
+
+      if ( prev!=amap.null_handle )
+        amap.template basic_link_beta_for_involution<2>(prev, n1);
+
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+            run(&amap, n1, ah);
+      }
+    }
+
+    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
+    {
+      if ( !amap.is_free(adart, dim) )
+      {
+        if ( !amap.is_marked(amap.beta(cur, dim), treated) )
+        {
+          if (n1!=amap.null_handle)
+          {
+            nn1=amap.create_dart();
+            amap.link_beta_1(amap.beta(cur, dim), nn1);
+            amap.basic_link_beta_for_involution(n1, nn1, dim);
+          }
+          else nn1=amap.null_handle;
+
+          if (n2!=amap.null_handle)
+          {
+            nn2=amap.create_dart();
+            amap.link_beta_0(amap.beta(cur, dim), nn2);
+            amap.basic_link_beta_for_involution(n2, nn2, dim);
+            if (amap.are_attributes_automatically_managed() && update_attributes)
+            {
+              CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+                  run(&amap, nn2, ah);
+            }
+          }
+          else nn2=amap.null_handle;
+
+          if (nn1 != amap.null_handle && nn2 != amap.null_handle)
+            amap.basic_link_beta_1(nn1, nn2);
+
+          if (nn1 != amap.null_handle && prev != amap.null_handle)
+            amap.template basic_link_beta_for_involution<2>
+              (nn1, amap.beta(prev, dim));
+
+          amap.mark(amap.beta(cur, dim), treated);
+        }
+        else
+        {
+          if ( n1!=amap.null_handle )
+            amap.basic_link_beta_for_involution(n1,
+                                                amap.beta(cur, dim, 1), dim);
+          if ( n2!=amap.null_handle )
+            amap.basic_link_beta_for_involution(n2,
+                                                amap.beta(cur, dim, 0), dim);
+        }
+      }
+    }
+
+    prev = n2;
+    cur = next;
+  }
+  while(cur!=first && cur!=amap.null_dart_handle);
+
+  if (n2 != amap.null_handle)
+  {
+    amap.template basic_link_beta_for_involution<2>
+        (amap.template beta<0>(first), n2);
+    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
+    {
+      if ( !amap.is_free(adart, dim) )
+      {
+        amap.template basic_link_beta_for_involution<2>
+          (amap.beta(first, 0, dim), amap.beta(n2, dim));
+      }
+    }
+  }
+
+  // Now we unmark all marked darts, and we degroup the new faces with the
+  // initial one (if 2-attributes are non void).
+  for ( typename std::deque<typename CMap::Dart_handle>::iterator
+        itd=tounmark.begin(); itd!=tounmark.end(); ++itd )
+  {
+    amap.unmark(*itd, treated);
+    for (unsigned int dim=3; dim<=CMap::dimension; ++dim)
+    {
+      if ( !amap.is_free(*itd, dim) )
+        amap.unmark(amap.beta(*itd, dim), treated);
+    }
+    if ( *itd!=adart )
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        CGAL::internal::Degroup_attribute_functor_run<CMap, 2>::
+            run(&amap, adart, *itd);
+      }
+  }
+
+  CGAL_assertion(amap.is_whole_map_unmarked(treated));
+  amap.free_mark(treated);
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+  CGAL_assertion( amap.is_valid() );
+#endif
+
+  return n1;
+}
+/** Insert a dangling edge in a 2-cell between given by a dart.
+ * @param amap the used combinatorial map.
+ * @param adart1 a first dart of the facet (!=NULL && !=null_dart_handle).
+ * @param update_attributes a boolean to update the enabled attributes
+ *        (deprecated, now we use are_attributes_automatically_managed())
+ * @return a dart of the new edge, not incident to the vertex of adart1.
+ */
+template<class CMap>
+typename CMap::Dart_handle
+insert_dangling_cell_1_in_cell_2( CMap& amap,
+                                  typename CMap::Dart_handle adart1,
+                                  typename CMap::template
+                                  Attribute_handle<0>::type ah=CMap::null_handle,
+                                  bool update_attributes=true )
+{
+  typename CMap::size_type mark1 = amap.get_new_mark();
+  std::deque<typename CMap::Dart_handle> to_unmark;
+  {
+    for ( CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
+          it.cont(); ++it )
+    {
+      to_unmark.push_back(it);
+      amap.mark(it,mark1);
+    }
+  }
+
+  typename CMap::Dart_handle d1 = amap.null_handle;
+  typename CMap::Dart_handle d2 = amap.null_handle;
+  unsigned int s1 = 0;
+
+  typename CMap::size_type treated=amap.get_new_mark();
+
+  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1>
+      it1(amap, adart1, treated);
+
+  for ( ; it1.cont(); ++it1)
+  {
+    d1 = amap.create_dart();
+    d2 = amap.create_dart();
+
+    if ( amap.is_marked(it1, mark1) ) s1 = 0;
+    else s1 = 1;
+
+    if ( !amap.is_free(it1, s1) )
+    {
+      if ( s1==0 )
+        amap.link_beta_1(amap.template beta<0>(it1), d2);
+      else
+        amap.link_beta_0(amap.template beta<1>(it1), d2);
+    }
+
+    if (s1==0)
+    {
+      amap.link_beta_0(it1, d1);
+      amap.link_beta_0(d1, d2);
+    }
+    else
+    {
+      amap.link_beta_1(it1, d1);
+      amap.link_beta_1(d1, d2);
+    }
+
+    amap.template basic_link_beta_for_involution<2>(d1, d2);
+
+    for ( unsigned int dim=3; dim<=CMap::dimension; ++dim)
+    {
+      if ( !amap.is_free(it1, dim) &&
+           amap.is_marked(amap.beta(it1, dim), treated) )
+      {
+        amap.basic_link_beta_for_involution
+          (amap.beta(it1, dim, CGAL_BETAINV(s1)), d1, dim);
+        amap.basic_link_beta_for_involution
+          (amap.beta(it1, dim, CGAL_BETAINV(s1), 2), d2, dim);
+      }
+    }
+    if (amap.are_attributes_automatically_managed() && update_attributes)
+    {
+      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+          run(&amap, d1, ah);
+    }
+    amap.mark(it1, treated);
+  }
+
+  amap.negate_mark(treated);
+  for ( it1.rewind(); it1.cont(); ++it1 )
+  { amap.mark(it1, treated); }
+
+  CGAL_assertion( amap.is_whole_map_marked(treated) );
+  amap.free_mark(treated);
+
+  for ( typename std::deque<typename CMap::Dart_handle>::iterator
+        it=to_unmark.begin(); it!=to_unmark.end(); ++it)
+  { amap.unmark(*it, mark1); }
+
+  CGAL_assertion( amap.is_whole_map_unmarked(mark1) );
+  amap.free_mark(mark1);
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+  CGAL_assertion( amap.is_valid() );
+#endif
+
+  return amap.template beta<0>(adart1);
+}
+
+/** Test if an edge can be inserted onto a 2-cell between two given darts.
+ * @param amap the used combinatorial map.
+ * @param adart1 a first dart.
+ * @param adart2 a second dart.
+ * @return true iff an edge can be inserted between adart1 and adart2.
+ */
+template < class CMap >
+bool is_insertable_cell_1_in_cell_2(const CMap& amap,
+                                    typename CMap::Dart_const_handle adart1,
+                                    typename CMap::Dart_const_handle adart2)
+{
+  if ( adart1==adart2 ) return false;
+  for ( CGAL::CMap_dart_const_iterator_of_orbit<CMap,1> it(amap,adart1);
+        it.cont(); ++it )
+  {
+    if ( it==adart2 )  return true;
+  }
+  return false;
+}
+
+/** Insert an edge in a 2-cell between two given darts.
+ * @param amap the used combinatorial map.
+ * @param adart1 a first dart of the facet (!=NULL && !=null_dart_handle).
+ * @param adart2 a second dart of the facet. If NULL insert a dangling edge.
+ * @param update_attributes a boolean to update the enabled attributes
+ *        (deprecated, now we use are_attributes_automatically_managed())
+ * @return a dart of the new edge, and not incident to the
+ *         same vertex than adart1.
+ */
+template<class CMap>
+typename CMap::Dart_handle
+insert_cell_1_in_cell_2(CMap& amap,
+                        typename CMap::Dart_handle adart1,
+                        typename CMap::Dart_handle adart2,
+                        bool update_attributes=true)
+{
+  if ( adart2==amap.null_handle )
+    return insert_dangling_cell_1_in_cell_2(amap,adart1);
+
+  CGAL_assertion(is_insertable_cell_1_in_cell_2<CMap>(amap, adart1, adart2));
+
+  typename CMap::size_type m1=amap.get_new_mark();
+  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it1(amap, adart1, m1);
+
+  typename CMap::size_type m2=amap.get_new_mark();
+  CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it2(amap, adart2, m2);
+
+  typename CMap::size_type mark1=amap.get_new_mark();
+  std::deque<typename CMap::Dart_handle> to_unmark;
+  {
+    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
+          it.cont(); ++it )
+    {
+      to_unmark.push_back(it);
+      amap.mark(it, mark1);
+    }
+  }
+
+  typename CMap::Dart_handle d1=amap.null_handle;
+  typename CMap::Dart_handle d2=amap.null_handle;
+  unsigned int s1=0;
+
+  typename CMap::size_type treated=amap.get_new_mark();
+
+  for ( ; it1.cont(); ++it1, ++it2)
+  {
+    CGAL_assertion (it2.cont() );
+    d1 = amap.create_dart();
+    d2 = amap.create_dart();
+
+    if ( amap.is_marked(it1, mark1) ) s1 = 0;
+    else s1 = 1;
+
+    if ( !amap.is_free(it1, s1) )
+    {
+      if ( s1==0 ) amap.link_beta_1(amap.template beta<0>(it1), d2);
+      else amap.link_beta_0(amap.template beta<1>(it1), d2);
+    }
+
+    if ( !amap.is_free(it2, s1) )
+    {
+      if ( s1==0 ) amap.link_beta_1(amap.template beta<0>(it2), d1);
+      else amap.link_beta_0(amap.template beta<1>(it2), d1);
+    }
+
+    if ( s1==0 )
+    {
+      amap.link_beta_0(it1, d1);
+      amap.link_beta_0(it2, d2);
+    }
+    else
+    {
+      amap.link_beta_1(it1, d1);
+      amap.link_beta_1(it2, d2);
+    }
+    amap.template basic_link_beta_for_involution<2>(d2, d1);
+
+    for ( unsigned int dim=3; dim<=CMap::dimension; ++dim)
+    {
+      if ( !amap.is_free(it1, dim) &&
+           amap.is_marked(amap.beta(it1, dim), treated) )
+      {
+        amap.basic_link_beta_for_involution
+          (amap.beta(it1, dim, CGAL_BETAINV(s1)), d1, dim);
+        amap.basic_link_beta_for_involution
+          (amap.beta(it1, dim, CGAL_BETAINV(s1), 2), d2, dim);
+      }
+    }
+
+    amap.mark(it1,treated);
+  }
+
+  if (amap.are_attributes_automatically_managed() && update_attributes)
+  {
+    CGAL::internal::Degroup_attribute_functor_run<CMap, 2>::run(&amap, d1, d2);
+  }
+
+  amap.negate_mark(m1);
+  amap.negate_mark(m2);
+  it1.rewind(); it2.rewind();
+  for ( ; it1.cont(); ++it1, ++it2)
+  {
+    amap.mark(it1,m1);
+    amap.unmark(it1,treated);
+    amap.mark(it2,m2);
+  }
+  amap.negate_mark(m1);
+  amap.negate_mark(m2);
+  CGAL_assertion( amap.is_whole_map_unmarked(m1) );
+  CGAL_assertion( amap.is_whole_map_unmarked(m2) );
+  CGAL_assertion( amap.is_whole_map_unmarked(treated) );
+  amap.free_mark(m1);
+  amap.free_mark(m2);
+  amap.free_mark(treated);
+
+  typename std::deque<typename CMap::Dart_handle>::iterator it =
+    to_unmark.begin();
+  for (; it != to_unmark.end(); ++it)
+  { amap.unmark(*it, mark1); }
+  CGAL_assertion( amap.is_whole_map_unmarked(mark1) );
+  amap.free_mark(mark1);
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+  CGAL_assertion( amap.is_valid() );
+#endif
+
+  return amap.template beta<0>(adart1);
+}
+
+/** Test if a 2-cell can be inserted onto a given 3-cell along
+ * a path of edges.
+ * @param amap the used combinatorial map.
+ * @param afirst iterator on the begining of the path.
+ * @param alast  iterator on the end of the path.
+ * @return true iff a 2-cell can be inserted along the path.
+ */
+template <class CMap, class InputIterator>
+bool is_insertable_cell_2_in_cell_3(const CMap& amap,
+                                    InputIterator afirst,
+                                    InputIterator alast)
+{
+  CGAL_assertion( CMap::dimension>= 3 );
+
+  // The path must have at least one dart.
+  if (afirst==alast) return false;
+  typename CMap::Dart_const_handle prec = amap.null_handle;
+  typename CMap::Dart_const_handle od = amap.null_handle;
+
+  for (InputIterator it(afirst); it!=alast; ++it)
+  {
+    // The path must contain only non empty darts.
+    if (*it == amap.null_handle || *it==amap.null_dart_handle) return false;
+
+    // Two consecutive darts of the path must belong to two edges
+    // incident to the same vertex of the same volume.
+    if (prec != amap.null_handle)
+    {
+      od = amap.other_extremity(prec);
+      if ( od==amap.null_handle ) return false;
+
+      // of and *it must belong to the same vertex of the same volume
+      if ( !CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *it) )
+        return false;
+    }
+    prec = *it;
+  }
+
+  // The path must be closed.
+  od = amap.other_extremity(prec);
+  if ( od==amap.null_handle ) return false;
+
+  if (!CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *afirst))
+    return false;
+
+  return true;
+}
+
+/** Insert a 2-cell in a given 3-cell along a path of darts.
+ * @param amap the used combinatorial map.
+ * @param afirst iterator on the begining of the path.
+ * @param alast  iterator on the end of the path.
+ * @param update_attributes a boolean to update the enabled attributes
+ *        (deprecated, now we use are_attributes_automatically_managed())
+ * @return a dart of the new 2-cell.
+ */
+template<class CMap, class InputIterator>
+typename CMap::Dart_handle
+insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast,
+                        bool update_attributes=true)
+{
+  CGAL_assertion(is_insertable_cell_2_in_cell_3(amap,afirst,alast));
+
+  typename CMap::Dart_handle prec = amap.null_handle, d = amap.null_handle,
+    dd = amap.null_handle, first = amap.null_handle;
+  bool withBeta3 = false;
+
+  {
+    for (InputIterator it(afirst); !withBeta3 && it!=alast; ++it)
+    {
+      if (!amap.template is_free<2>(*it)) withBeta3 = true;
+    }
+  }
+
+  {
+    for (InputIterator it(afirst); it!=alast; ++it)
+    {
+      d = amap.create_dart();
+      if ( withBeta3 )
+        dd = amap.create_dart();
+
+      if (prec != amap.null_handle)
+      {
+        amap.basic_link_beta_0(prec, d);
+        if (withBeta3)
+          amap.basic_link_beta_1(amap.template beta<3>(prec), dd);
+      }
+      else first = d;
+
+      if ( !amap.template is_free<2>((*it)) )
+        amap.template basic_link_beta_for_involution<2>
+            (amap.template beta<2>(*it), dd);
+
+      amap.template link_beta_for_involution<2>(*it, d);
+      if ( withBeta3 )
+        amap.template link_beta_for_involution<3>(d, dd);
+
+      prec = d;
+    }
+  }
+
+  amap.basic_link_beta_0(prec, first);
+  if ( withBeta3 )
+  {
+    amap.basic_link_beta_1(amap.template beta<3>(prec),
+                           amap.template beta<3>(first));
+  }
+
+  // Make copies of the new facet for dimension >=4
+  for ( unsigned int dim=4; dim<=CMap::dimension; ++dim )
+  {
+    if ( !amap.is_free(first, dim) )
+    {
+      typename CMap::Dart_handle first2 = amap.null_handle;
+      prec = amap.null_handle;
+      for ( CMap_dart_iterator_basic_of_orbit<CMap, 1> it(amap, first);
+            it.cont(); ++it )
+      {
+        d = amap.create_dart();
+        amap.basic_link_beta_for_involution(amap.template beta<2>(it), d, dim);
+        if ( withBeta3 )
+        {
+          dd = amap.create_dart();
+          amap.basic_link_beta_for_involution
+            (amap.template beta<2,3>(it), dd, dim);
+          amap.template basic_link_beta_for_involution<3>(d, dd);
+        }
+        if ( prec!=amap.null_handle )
+        {
+          amap.link_beta_0(prec, d);
+          if ( withBeta3 )
+          {
+            amap.basic_link_beta_1(amap.template beta<3>(prec), dd);
+          }
+        }
+        else first2 = prec;
+
+        // We consider dim2=2 out of the loop to use link_beta instead of
+        // basic _link_beta (to modify non void attributes only once).
+        if ( !amap.template is_free<2>(it) &&
+             amap.is_free(amap.template beta<2>(it), dim) )
+          amap.template link_beta_for_involution<2>
+            (amap.beta(it,2,dim), d);
+        if ( withBeta3 &&
+             !amap.template is_free<2>(amap.template beta<3>(it)) &&
+             amap.is_free(amap.template beta<3,2>(it), dim) )
+          amap.template link_beta_for_involution<2>(amap.beta(it,3,2,dim), dd);
+
+        for ( unsigned int dim2=3; dim2<=CMap::dimension; ++dim2 )
+        {
+          if ( dim2+1!=dim && dim2!=dim && dim2!=dim+1 )
+          {
+            if ( !amap.is_free(it, dim2) && amap.is_free(amap.beta(it, dim2), dim) )
+              amap.basic_link_beta_for_involution(amap.beta(it, dim2, dim),
+                                                  d, dim2);
+            if ( withBeta3 && !amap.is_free(amap.template beta<3>(it), dim2) &&
+                 amap.is_free(amap.beta(it, 3, dim2), dim) )
+              amap.basic_link_beta_for_involution
+                (amap.beta(it, 3, dim2, dim), dd, dim2);
+          }
+        }
+        prec = d;
+      }
+      amap.basic_link_beta_0( prec, first2 );
+      if ( withBeta3 )
+      {
+        amap.basic_link_beta_1( amap.template beta<3>(prec),
+                                amap.template beta<3>(first2) );
+      }
+    }
+  }
+
+  // Degroup the attributes
+  if ( withBeta3 )
+  { // Here we cannot use Degroup_attribute_functor_run as new darts do not
+    // have their 3-attribute
+    if (amap.are_attributes_automatically_managed() && update_attributes)
+    {
+      CGAL::internal::Degroup_attribute_functor_run<CMap, 3>::
+          run(&amap, first, amap.template beta<3>(first));
+    }
+  }
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+  CGAL_assertion( amap.is_valid() );
+#endif
+
+  return first;
+}
+
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_INSERTIONS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_iterators_base.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_iterators_base.h
new file mode 100644
index 0000000..4ad8b8c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_iterators_base.h
@@ -0,0 +1,616 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH
+#define CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH 1
+
+#include <CGAL/Compact_container.h>
+#include <queue>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+
+  /** @file Combinatorial_map_iterators_base.h
+   * Basic classes that serve as tools for definition of iterators.
+   There are 3 classes:
+   *  - CMap_dart_iterator<Map,Const> is the basic generic class defining
+   *    what is an interator on darts.
+   *  - CMap_extend_iterator<Map,Ite,Bi> to extend the given iterator by adding
+   *    the involution Bi.
+   *  - CMap_non_basic_iterator<Map_,Ite> to transform the basic iterator Ite
+   *    into the corresponding non basic iterator.
+   *  - CMap_range<Map,It,ConstIt,BasicIt> generic definition of a range
+   *    given an iterator and its const version
+   *  - CMap_const_range<Map,It,ConstIt,BasicIt> generic definition of a const
+   *    range given an iterator and its const version
+   */
+  //****************************************************************************
+  /// OperationState: type to keep the last operation used by the previous ++.
+  typedef char OperationState;
+
+  /// Enum of all the possible operations used by the ++ operator.
+  enum
+  {
+    OP_NONE = -1, ///< Beginning of the iterator (there is not yet operator++).
+    OP_BETAI,     ///< Previous op was the first beta.
+    OP_BETAI_INV, ///< Previous op was the inverse of the first beta.
+    OP_BETAJ,     ///< Previous op was the second beta.
+    OP_BETAK,     ///< Previous op was the third beta.
+    OP_BETA0I,    ///< Previous op was beta0 o the first beta.
+    OP_BETAI1,    ///< Previous op was the first beta o beta1.
+    OP_BETAIJ,    ///< Previous op was the composition of two beta.
+    OP_BETAJI,    ///< Previous op was the composition of two beta.
+    OP_BETA21,     ///< Previous op was beta21.
+    OP_JUMP,      ///< Previous op was a jump .
+    OP_POP,       ///< Previous op pop a dart from a stack or a queue.
+    OP_END        ///< Previous op go out of the iterator.
+  };
+  //****************************************************************************
+  /** Generic class of iterator onto darts.
+   * Class CMap_dart_iterator is a generic iterator. All the combinatorial
+   * map iterator classes inherit from this class (or one of its subclass).
+   */
+  template < typename Map_,bool Const=false >
+  class CMap_dart_iterator: public boost::mpl::if_c< Const,
+      typename Map_::Dart_container::const_iterator,
+      typename Map_::Dart_container::iterator>::type
+    //public internal::CC_iterator<typename Map_::Dart_container,Const>
+  {
+  public:
+    typedef CMap_dart_iterator<Map_,Const> Self;
+
+    typedef typename boost::mpl::if_c< Const,
+          typename Map_::Dart_container::const_iterator,
+          typename Map_::Dart_container::iterator>::type Base;
+
+    typedef typename boost::mpl::if_c< Const,
+                                       typename Map_::Dart_const_handle,
+                                       typename Map_::Dart_handle>::type
+                                     Dart_handle;
+    typedef typename boost::mpl::if_c< Const, const Map_,
+                                       Map_>::type Map;
+
+    typedef std::input_iterator_tag iterator_category;
+    typedef typename Base::value_type value_type;
+    typedef typename Base::difference_type difference_type;
+    typedef typename Base::pointer pointer;
+    typedef typename Base::reference reference;
+
+    /// true iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+    typedef typename Map::size_type size_type;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator(Map& amap, Dart_handle adart):
+      Base(adart),
+      mmap(&amap),
+      mfirst_dart(adart),
+      mprev_op(OP_NONE)
+    {}
+
+    /// == operator.
+    bool operator==(const Self& aiterator) const
+    {
+      return ( ((*this==mmap->null_handle) && (aiterator==mmap->null_handle)) ||
+               (mfirst_dart == aiterator.mfirst_dart &&
+               static_cast<const Base&>(*this)==
+                static_cast<const Base&>(aiterator)) );
+    }
+
+    /// != operator.
+    bool operator!=(const Self& aiterator) const
+    { return !operator==(aiterator); }
+
+    /// Accessor to the initial dart of the iterator.
+    Dart_handle get_first_dart() const { return mfirst_dart; }
+
+    /// Accessor to the combinatorial map.
+    Map* get_combinatorial_map() const { return mmap; }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    { set_current_dart(mfirst_dart); mprev_op = OP_NONE; }
+
+    /// Test if the iterator is at its end.
+    bool cont() const
+    { return static_cast<const Base&>(*this)!=mmap->null_handle; }
+
+    /// Get the previous operation used for the last ++.
+    OperationState prev_operation()  const { return mprev_op; }
+
+  protected:
+    /// Set the current dart to a given dart
+    void set_current_dart(Dart_handle adart)
+    { Base::operator=(adart); }
+
+  private:
+    /// operator -- in private to invalidate the base operator.
+    Self& operator--()
+    { return *this; }
+    /// operator -- in private to invalidate the base operator.
+    Self operator--(int)
+    { return *this; }
+
+  protected:
+    /// test if adart->beta(ai) exists and is not marked for amark
+    bool is_unmarked(Dart_handle adart, unsigned int ai, size_type amark) const
+    { return
+#ifdef CGAL_CMAP_DEPRECATED
+        !mmap->is_free(adart,ai) && // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+        !mmap->is_marked(mmap->beta(adart,ai), amark);
+    }
+
+    /// test if adart->beta(ai)->beta(aj) exists
+    bool exist_betaij(Dart_handle adart, unsigned int ai, unsigned int aj) const
+    { return !mmap->is_free(adart, ai) && !mmap->is_free(mmap->beta(adart, ai), aj); }
+
+    /// test if adart->beta(ai)->beta(aj) exists and is not marked for amark
+    bool is_unmarked2(Dart_handle adart, unsigned int ai, unsigned int aj,
+                      typename Map::size_type amark) const
+    { return
+#ifdef CGAL_CMAP_DEPRECATED
+         exist_betaij(adart, ai, aj) && // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+        !mmap->is_marked(mmap->beta(adart, ai, aj), amark);
+    }
+
+  protected:
+    /// The map containing the darts to iterate on.
+    Map* mmap;
+
+    /// The initial dart of the iterator.
+    Dart_handle mfirst_dart;
+
+    /// The last operation used for the ++ operator.
+    OperationState mprev_op;
+  };
+  //****************************************************************************
+  /* Class CMap_extend_iterator<Map,Ite,Bi> which extend a given iterator by
+   * adding Bi and by using a stack and a mark.
+   * General case when Ite does not have already a stack.
+   */
+  template <typename Map_,typename Ite,int Bi,
+            typename Ite_has_stack=typename Ite::Use_mark>
+  class CMap_extend_iterator: public Ite
+  {
+  public:
+    typedef CMap_extend_iterator<Map_,Ite,Bi, Ite_has_stack> Self;
+    typedef Ite Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+    typedef Tag_true Use_mark;
+
+    typedef typename Map::size_type size_type;
+
+    CGAL_static_assertion( (Bi<=Map::dimension &&
+                            boost::is_same<Ite_has_stack,Tag_false>::value) );
+
+  public:
+    /// Main constructor.
+    CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark):
+      Base(amap, adart),
+      mmark_number(amark),
+      minitial_dart(adart)
+    {
+      if ( minitial_dart!=amap.null_handle )
+      {
+        this->mmap->mark_null_dart(mmark_number);
+        this->mmap->mark(minitial_dart, mmark_number);
+        if (!this->mmap->is_free(minitial_dart, Bi) &&
+            this->mmap->beta(minitial_dart, Bi)!=minitial_dart )
+        {
+          mto_treat.push(this->mmap->beta(minitial_dart, Bi));
+        }
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::operator= ( Base(*this->mmap,minitial_dart) );
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark(minitial_dart, mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+      if (!this->mmap->is_free(minitial_dart, Bi) &&
+          this->mmap->beta(minitial_dart, Bi)!=minitial_dart)
+      {
+        mto_treat.push(this->mmap->beta(minitial_dart, Bi));
+      }
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      do
+      {
+        Base::operator++();
+      }
+      while ( this->cont() &&
+              this->mmap->is_marked(*this, mmark_number) );
+
+      if ( !this->cont() )
+      {
+        while ( !mto_treat.empty() &&
+                this->mmap->is_marked(mto_treat.front(), mmark_number))
+        {
+          mto_treat.pop();
+        }
+
+        if ( !mto_treat.empty() )
+        {
+          Base::operator= ( Base(*this->mmap,mto_treat.front()) );
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+          CGAL_assertion( !this->mmap->is_marked((*this), mmark_number) );
+          this->mmap->mark((*this), mmark_number);
+
+          if (
+#ifdef CGAL_CMAP_DEPRECATED
+        !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+               !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) )
+          {
+            mto_treat.push(this->mmap->beta(*this, Bi));
+          }
+        }
+      }
+      else
+      {
+        this->mmap->mark((*this), mmark_number);
+        if (
+#ifdef CGAL_CMAP_DEPRECATED
+        !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+             !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) )
+        {
+          mto_treat.push(this->mmap->beta(*this, Bi));
+        }
+      }
+
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+
+    /// Initial dart
+    Dart_handle minitial_dart;
+  };
+  //****************************************************************************
+  /* Class CMap_extend_iterator<Map,Ite,Bi> which extend a given iterator by
+   * adding Bi and by using a stack and a mark.
+   * Specialization when Ite has already a stack.
+   */
+  template <typename Map_,typename Ite,int Bi>
+  class CMap_extend_iterator<Map_,Ite,Bi,Tag_true>: public Ite
+  {
+  public:
+    typedef CMap_extend_iterator<Map_,Ite,Bi,Tag_true> Self;
+    typedef Ite Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+
+    typedef Tag_true Use_mark;
+
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark):
+      Base(amap, adart, amark)
+    {
+      if ( this->minitial_dart!=amap.null_handle &&
+           !this->mmap->is_free(this->minitial_dart, Bi) &&
+           this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
+      {
+        this->mto_treat.push(this->mmap->beta(this->minitial_dart, Bi));
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(this->mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      if ( !this->mmap->is_free(this->minitial_dart, Bi) &&
+           this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
+      {
+        this->mto_treat.push(this->mmap->beta(this->minitial_dart, Bi));
+      }
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      Base::operator++();
+
+      if ( this->cont() )
+      {
+        CGAL_assertion( this->mmap->is_marked(*this, this->mmark_number) );
+
+        if (
+#ifdef CGAL_CMAP_DEPRECATED
+            !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows
+#endif // CGAL_CMAP_DEPRECATED
+            !this->mmap->is_marked(this->mmap->beta(*this, Bi), this->mmark_number) )
+        {
+          this->mto_treat.push(this->mmap->beta(*this, Bi));
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+  };
+  //****************************************************************************
+  //* Class CMap_non_basic_iterator allows to transform a basic_iterator onto
+  //* a non basic one, depending if the basic iterator uses mark or not.
+  template <typename Map_,typename Basic_iterator,
+            typename Use_mark=typename Basic_iterator::Use_mark>
+  class CMap_non_basic_iterator;
+  //****************************************************************************
+  template <typename Map_,typename Base_>
+  class CMap_non_basic_iterator<Map_,Base_,Tag_true>:
+    public Base_
+  {
+  public:
+    typedef CMap_non_basic_iterator<Map_,Base_,Tag_true> Self;
+    typedef Base_ Base;
+
+    typedef typename Base::Map Map;
+    typedef typename Base::Dart_handle Dart_handle;
+
+    /// True iff this iterator is basic
+    typedef Tag_false Basic_iterator;
+
+    typedef typename Map::size_type size_type;
+
+    CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
+                            Tag_true>::value) );
+
+    /// Main constructor.
+    CMap_non_basic_iterator(Map& amap, Dart_handle adart1):
+      Base(amap, adart1, amap.get_new_mark())
+    {}
+
+    /// Destructor.
+    ~CMap_non_basic_iterator() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
+    {
+      CGAL_destructor_assertion( this->mmark_number!=Map::INVALID_MARK );
+      if (this->mmap->get_number_of_times_mark_reserved
+          (this->mmark_number)==1)
+        unmark_treated_darts();
+      this->mmap->free_mark(this->mmark_number);
+      this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+    }
+
+    /// Copy constructor.
+    CMap_non_basic_iterator(const Self& aiterator):
+      Base(aiterator)
+    { this->mmap->share_a_mark(this->mmark_number); }
+
+    /// Assignment operator.
+    Self& operator=(const Self& aiterator)
+    {
+      if (this != &aiterator)
+      {
+        if (this->mmap->get_number_of_times_mark_reserved
+            (this->mmark_number)==1)
+          unmark_treated_darts();
+        this->mmap->free_mark(this->mmark_number);
+        this->mmark_number = Map::INVALID_MARK;
+
+        Base::operator=(aiterator);
+        this->mmap->share_a_mark(this->mmark_number);
+      }
+      return *this;
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      unmark_treated_darts();
+      Base::rewind();
+    }
+
+    using Base::operator++;
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Unmark all the marked darts during the iterator.
+    void unmark_treated_darts()
+    {
+      if (this->mmap->is_whole_map_unmarked(this->mmark_number)) return;
+
+      this->mmap->negate_mark(this->mmark_number);
+
+      if (this->mmap->is_whole_map_unmarked(this->mmark_number)) return;
+
+      Base::rewind();
+      while (this->mmap->number_of_unmarked_darts(this->mmark_number) > 0)
+        this->operator++();
+      this->mmap->negate_mark(this->mmark_number);
+      CGAL_assertion(this->mmap->is_whole_map_unmarked(this->mmark_number));
+    }
+  };
+  //****************************************************************************
+  template <typename Map_,typename Base_>
+  class CMap_non_basic_iterator<Map_,Base_,Tag_false>:
+    public Base_
+  {
+  public:
+    typedef CMap_non_basic_iterator<Map_,Base_,Tag_false> Self;
+    typedef Base_ Base;
+
+    typedef typename Base::Map Map;
+    typedef typename Base::Dart_handle Dart_handle;
+
+    /// True iff this iterator is basic
+    typedef Tag_false Basic_iterator;
+
+    CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
+                            Tag_true>::value) );
+
+    /// Main constructor.
+    CMap_non_basic_iterator(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  template <typename Map_, typename It, typename Const_it,
+            typename Basic_iterator=typename It::Basic_iterator>
+  struct CMap_range
+  {
+    typedef It iterator;
+    typedef Const_it const_iterator;
+    CMap_range(Map_ &amap, typename Map_::Dart_handle adart) :
+      mmap(amap), mdart(adart), msize(0)
+    {}
+    iterator begin()             { return iterator(mmap,mdart); }
+    iterator end()               { return iterator(mmap,mmap.null_handle); }
+    const_iterator begin() const { return const_iterator(mmap,mdart); }
+    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+    typename Map_::size_type size() const
+    {
+      if (msize==0)
+        for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
+          ++msize;
+      return msize;
+    }
+    bool empty() const
+    { return mmap.is_empty(); }
+  private:
+    Map_ & mmap;
+    typename Map_::Dart_handle mdart;
+    mutable typename Map_::size_type msize;
+  };
+  //****************************************************************************
+  template <typename Map_, typename It, typename Const_it>
+  struct CMap_range<Map_,It,Const_it,Tag_true>
+  {
+    typedef CMap_range<Map_,It,Const_it,Tag_true> Base_cmap_range;
+    typedef It iterator;
+    typedef Const_it const_iterator;
+
+    typedef typename Map_::size_type size_type;
+
+    CMap_range(Map_ &amap, typename Map_::Dart_handle adart, size_type amark=Map_::INVALID_MARK):
+      mmap(amap), mdart(adart), msize(0), mmark(amark)
+    {}
+    iterator begin()             { return iterator(mmap,mdart,mmark); }
+    iterator end()               { return iterator(mmap,mmap.null_handle,mmark); }
+    const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
+    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle,mmark); }
+    typename Map_::size_type size() const
+    {
+      if (msize==0)
+        for ( CMap_non_basic_iterator<Map_,const_iterator> it(mmap,mdart);
+              it.cont(); ++it )
+          ++msize;
+      return msize;
+    }
+    bool empty() const
+    { return mmap.is_empty(); }
+  private:
+    Map_ & mmap;
+    typename Map_::Dart_handle mdart;
+    mutable typename Map_::size_type msize;
+    size_type mmark;
+  };
+  //****************************************************************************
+  template <typename Map_, typename Const_it,
+            typename Basic_iterator=typename Const_it::Basic_iterator>
+  struct CMap_const_range
+  {
+    typedef Const_it const_iterator;
+    CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart):
+      mmap(amap), mdart(adart), msize(0)
+    {}
+    const_iterator begin() const { return const_iterator(mmap,mdart); }
+    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle); }
+    typename Map_::size_type size() const
+    {
+      if (msize==0)
+        for ( const_iterator it=begin(), itend=end(); it!=itend; ++it)
+          ++msize;
+      return msize;
+    }
+    bool empty() const
+    { return mmap.is_empty(); }
+  private:
+    const Map_ & mmap;
+    typename Map_::Dart_const_handle mdart;
+    mutable typename Map_::size_type msize;
+  };
+  //****************************************************************************
+  template <typename Map_, typename Const_it>
+  struct CMap_const_range<Map_,Const_it,Tag_true>
+  {
+    typedef Const_it const_iterator;
+    typedef typename Map_::size_type size_type;
+    CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart,
+                     size_type amark=Map_::INVALID_MARK):
+      mmap(amap), mdart(adart), msize(0), mmark(amark)
+    {}
+    const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
+    const_iterator end() const   { return const_iterator(mmap,mmap.null_handle,mmark); }
+    typename Map_::size_type size() const
+    {
+      if (msize==0)
+        for ( CMap_non_basic_iterator<Map_,const_iterator> it(mmap,mdart);
+              it.cont(); ++it )
+          ++msize;
+      return msize;
+    }
+    bool empty() const
+    { return mmap.is_empty(); }
+  private:
+    const Map_ & mmap;
+    typename Map_::Dart_const_handle mdart;
+    mutable typename Map_::size_type msize;
+    size_type mmark;
+  };
+  //****************************************************************************
+} // namespace CGAL
+//******************************************************************************
+#endif // CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH
+//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_min_items.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_min_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Combinatorial_map_min_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_min_items.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_operations.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_operations.h
new file mode 100644
index 0000000..4481c2e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_operations.h
@@ -0,0 +1,809 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_OPERATIONS_H
+#define CGAL_COMBINATORIAL_MAP_OPERATIONS_H 1
+
+#include <CGAL/Combinatorial_map_basic_operations.h>
+#include <CGAL/Combinatorial_map_insertions.h>
+#include <deque>
+#include <stack>
+
+namespace CGAL
+{
+  /** @file Combinatorial_map_operations.h
+   * Some operations to modify a combinatorial map.
+   */
+
+  /** Test if an i-cell can be removed.
+   *  An i-cell can be removed if i==CMap::dimension or i==CMap::dimension-1,
+   *     or if there are at most two (i+1)-cell incident to it.
+   * @param adart a dart of the i-cell.
+   * @return true iff the i-cell can be removed.
+   */
+  template <class CMap, unsigned int i, unsigned int nmi=CMap::dimension-i>
+  struct Is_removable_functor
+  {
+    static bool run(const CMap& amap, typename CMap::Dart_const_handle adart)
+    {
+      // TODO? Optimisation for dim-2, and to not test all the darts of the cell?
+      bool res = true;
+      for ( CGAL::CMap_dart_const_iterator_of_cell<CMap,i> it(amap, adart);
+            res && it.cont(); ++it )
+      {
+        if ( amap.template beta<i+2,i+1>(it)!=
+             amap.template beta<CGAL_BETAINV(i+1),i+2>(it) )
+          res = false;
+      }
+      return res;
+    }
+  };
+  // Specialization for i=CMap::dimension
+  template <class CMap, unsigned int i>
+  struct Is_removable_functor<CMap, i, 0>
+  {
+    static bool run(const CMap&, typename CMap::Dart_const_handle)
+    { return true; }
+  };
+  // Specialization for i=CMap::dimension-1
+  template <class CMap, unsigned int i>
+  struct Is_removable_functor<CMap, i, 1>
+  {
+    static bool run(const CMap&, typename CMap::Dart_const_handle)
+    { return true; }
+  };
+  /** Test if an i-cell can be removed.
+   *  An i-cell can be removed if i==CMap::dimension or i==CMap::dimension-1,
+   *     or if there are at most two (i+1)-cell incident to it.
+   * @param adart a dart of the i-cell.
+   * @return true iff the i-cell can be removed.
+   */
+  template < class CMap, unsigned int i >
+  bool is_removable(const CMap& amap, typename CMap::Dart_const_handle adart)
+  { return CGAL::Is_removable_functor<CMap, i>::run(amap,adart); }
+
+  /** Remove an i-cell, 0<i<dimension, and merge eventually both incident
+   *  (i+1)-cells.
+   *  @param amap the used combinatorial map.
+   *  @param adart a dart of the i-cell to remove.
+   *  @param update_attributes a boolean to update the enabled attributes
+   *         (deprecated, now we use are_attributes_automatically_managed())
+   *  @return the number of deleted darts.
+   */
+  template<class CMap, unsigned int i, unsigned int nmi>
+  struct Remove_cell_functor
+  {
+    static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes)
+    {
+      CGAL_static_assertion ( 1<=i && i<CMap::dimension );
+      CGAL_assertion( (is_removable<CMap,i>(amap, adart)) );
+
+      size_t res = 0;
+
+      typename CMap::Dart_handle d1, d2;
+      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
+
+      typename CMap::size_type mark = amap.get_new_mark();
+      typename CMap::size_type mark_modified_darts = amap.get_new_mark();
+
+      std::deque<typename CMap::Dart_handle> to_erase;
+
+      const int iinv = CGAL_BETAINV(i);
+
+      // First we store and mark all the darts of the i-cell to remove.
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i> it(amap,adart,mark);
+            it.cont(); ++it )
+      {
+        to_erase.push_back(it);
+        if ( !amap.template is_free<i+1>(it) && dg1==amap.null_handle )
+        { dg1=it; dg2=amap.template beta<i+1>(it); }
+        amap.mark(it, mark);
+        ++res;
+      }
+
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        // We group the two (i+1)-cells incident if they exist.
+        if ( dg1!=amap.null_handle )
+          CGAL::internal::Group_attribute_functor_run<CMap, i+1>::
+              run(&amap, dg1, dg2);
+      }
+
+      // During the operation, we store in modified_darts the darts modified
+      // to test after the loop the non void attributes that are split.
+      std::deque<typename CMap::Dart_handle> modified_darts;
+
+      // If i==1, we modify beta1, thus in modified_darts we store all
+      // the darts having beta0 modified, and in modified_darts2 all the
+      // darts having beta1 modified. For i>1 all the modified darts are
+      // stored in modified_darts.
+      std::deque<typename CMap::Dart_handle> modified_darts2;
+      std::deque<typename CMap::Dart_handle> &first_modified_darts=
+          (i==1?modified_darts2:modified_darts);
+
+      // For each dart of the i-cell, we modify i-links of neighbors.
+      typename std::deque<typename CMap::Dart_handle>::iterator it =
+          to_erase.begin();
+      for ( ; it!=to_erase.end(); ++it )
+      {
+        d1=amap.template beta<iinv>(*it);
+        while ( d1!=amap.null_dart_handle && amap.is_marked(d1, mark) )
+        {
+          d1=amap.template beta<i+1, iinv>(d1);
+          if ( d1==amap. template beta<iinv>(*it) ) d1=amap.null_dart_handle;
+        }
+
+        if ( !amap.is_marked(d1, mark_modified_darts) )
+        {
+          d2=amap.template beta<i+1,i>(*it);
+          while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) )
+          {
+            d2=amap.template beta<i+1,i>(d2);
+            if ( d2==amap.template beta<i+1,i>(*it) )
+              d2=amap.null_dart_handle;
+          }
+
+          if ( !amap.is_marked(d2, mark_modified_darts) )
+          {
+            if ( d1!=amap.null_dart_handle )
+            {
+              if ( d2!=amap.null_dart_handle && d1!=d2 )
+              {
+                //d1->basic_link_beta(d2, i);
+                amap.template basic_link_beta<i>(d1, d2);
+                amap.mark(d1, mark_modified_darts);
+                amap.mark(d2, mark_modified_darts);
+                first_modified_darts.push_back(d1);
+                modified_darts.push_back(d2);
+                // TODO push only one out of two dart ?
+
+                /*if ( i==1 )
+                {
+                  d2->basic_link_beta(d1, 0);
+                  modified_darts.push_back(d2);
+                }*/
+                //            modified_darts2.push_back(d1);
+              }
+              else
+              {
+                if ( !amap.template is_free<i>(d1) )
+                {
+                  amap.template unlink_beta<i>(d1);
+                  CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
+                  amap.mark(d1, mark_modified_darts);
+                  first_modified_darts.push_back(d1);
+                }
+              }
+            }
+            else if ( d2!=amap.null_dart_handle )
+            {
+              if ( !amap.template is_free<iinv>(d2) )
+              {
+                amap.template unlink_beta<iinv>(d2);
+                CGAL_assertion( !amap.is_marked(d2, mark_modified_darts) );
+                amap.mark(d2, mark_modified_darts);
+                modified_darts.push_back(d2);
+              }
+            }
+          }
+        }
+        if ( amap.template is_free<i+1>(*it) &&
+             !amap.template is_free<i>(*it) )
+        {
+          d1 = amap.template beta<i>(*it);
+          if ( !amap.template is_free<iinv>(d1) )
+          {
+            amap.template unlink_beta<iinv>(d1);
+            CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
+            amap.mark(d1, mark_modified_darts);
+            modified_darts.push_back(d1);
+          }
+        }
+      }
+
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        // We test the split of all the incident cells for all the non
+        // void attributes.
+        if ( i==1 )
+          CMap::Helper::template Foreach_enabled_attributes_except
+              <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
+              run(&amap, modified_darts, modified_darts2,
+                  mark_modified_darts);
+        else
+          CMap::Helper::template Foreach_enabled_attributes_except
+              <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
+              run(&amap, modified_darts, mark_modified_darts);
+      }
+
+      // We remove all the darts of the i-cell.
+      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
+      { amap.erase_dart(*it); }
+
+      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+      amap.free_mark(mark);
+
+      // If no attribute is enabled (or if only i-attributes are enabled),
+      // the darts are not unmark by Foreach_enabled_attributes_except.
+      // Thus we unmark them now.
+      if ( !amap.is_whole_map_unmarked(mark_modified_darts) )
+      {
+        for ( typename std::deque<typename CMap::Dart_handle>::
+                iterator it=modified_darts.begin();
+              it!=modified_darts.end(); ++it )
+          amap.unmark(*it, mark_modified_darts);
+        if ( i==1 )
+        {
+          for ( typename std::deque<typename CMap::Dart_handle>::
+                  iterator it=modified_darts2.begin();
+                it!=modified_darts2.end(); ++it )
+            amap.unmark(*it, mark_modified_darts);
+        }
+      }
+
+      CGAL_assertion ( amap.is_whole_map_unmarked(mark_modified_darts) );
+      amap.free_mark(mark_modified_darts);
+
+#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
+      CGAL_assertion( amap.is_valid() );
+#endif
+
+      return res;
+    }
+  };
+
+  /** Remove a d-cell, in a d-map (special case).
+   *  @param amap the used combinatorial map.
+   *  @param adart a dart of the volume to remove.
+   *  @param update_attributes a boolean to update the enabled attributes
+   *         (deprecated, now we use are_attributes_automatically_managed())
+   *  @return the number of deleted darts.
+   */
+  template<class CMap,unsigned int i>
+  struct Remove_cell_functor<CMap,i,0>
+  {
+    static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes)
+    {
+      typename CMap::size_type mark = amap.get_new_mark();
+      std::deque<typename CMap::Dart_handle> to_erase;
+      size_t res = 0;
+
+      std::deque<typename CMap::Dart_handle> modified_darts;
+
+      // We mark all the darts of the d-cell.
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,CMap::dimension>
+            it(amap,adart,mark); it.cont(); ++it )
+      {
+        to_erase.push_back(it);
+        amap.mark(it,mark);
+        ++res;
+      }
+
+      // We unlink all the darts of the volume for beta-d.
+      typename std::deque<typename CMap::Dart_handle>::iterator
+        it = to_erase.begin();
+      for ( it = to_erase.begin(); it != to_erase.end(); ++it )
+      {
+        if ( !amap.template is_free<CMap::dimension>(*it) &&
+             !amap.is_marked(amap.template beta<CMap::dimension>(*it), mark) )
+        {
+          if (amap.are_attributes_automatically_managed() && update_attributes)
+          {
+            modified_darts.push_back(amap.template beta<CMap::dimension>(*it));
+          }
+          amap.template unlink_beta_for_involution<CMap::dimension>(*it);
+        }
+      }
+
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        // We test the split of all the incident cells for all the non
+        // void attributes.
+        CMap::Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<CMap,i>,
+           CMap::dimension>::run(&amap, modified_darts);
+      }
+
+      // We remove all the darts of the d-cell.
+      for ( it = to_erase.begin(); it != to_erase.end(); ++it )
+      { amap.erase_dart(*it); }
+
+      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+      amap.free_mark(mark);
+
+#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
+      CGAL_assertion( amap.is_valid() );
+#endif
+
+      return res;
+    }
+  };
+
+  /** Remove a vertex, and merge eventually both incident edges.
+   * @param amap the used combinatorial map.
+   * @param adart a dart of the vertex to remove.
+   * @param update_attributes a boolean to update the enabled attributes
+   *        (deprecated, now we use are_attributes_automatically_managed())
+   * @return the number of deleted darts.
+   */
+  template<class CMap,unsigned int nmi>
+  struct Remove_cell_functor<CMap,0,nmi>
+  {
+    static size_t run(CMap& amap, typename CMap::Dart_handle adart,
+                      bool update_attributes)
+    {
+      CGAL_assertion( (is_removable<CMap,0>(amap,adart)) );
+
+      size_t res = 0;
+
+      typename CMap::Dart_handle d1, d2;
+      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
+
+      typename CMap::size_type mark = amap.get_new_mark();
+
+      // First we store and mark all the darts of the 0-cell to remove.
+      std::deque<typename CMap::Dart_handle> to_erase;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart,mark);
+            it.cont(); ++it )
+      {
+        to_erase.push_back(it);
+        if ( !amap.template is_free<0>(it) && dg1==amap.null_handle )
+        { dg1=it; dg2=amap.template beta<0>(it); }
+        amap.mark(it, mark);
+        ++res;
+      }
+
+      if (amap.are_attributes_automatically_managed() && update_attributes )
+      {
+        // We group the two edges incident if they exist.
+        if ( dg1!=amap.null_handle )
+          CGAL::internal::Group_attribute_functor_run<CMap, 1>::
+              run(&amap, dg1, dg2);
+      }
+
+      // During the operation, we store in modified_darts the darts modified
+      // by beta0 to test after the loop non void attributes that are split.
+      std::deque<typename CMap::Dart_handle> modified_darts;
+      // And we store in modified_darts2 all the darts having beta1 modified.
+      std::deque<typename CMap::Dart_handle> modified_darts2;
+
+      // For each dart of the vertex, we modify 0 and 1-links of neighbors.
+      typename std::deque<typename CMap::Dart_handle>::iterator it =
+          to_erase.begin();
+      for ( ; it != to_erase.end(); ++it)
+      {
+        if ( !amap.template is_free<0>(*it) )
+        {
+          if ( !amap.template is_free<1>(*it) &&
+               amap.template beta<0>(*it)!=(*it) )
+          {
+            amap.basic_link_beta_1(amap.template beta<0>(*it),
+                                   amap.template beta<1>(*it));
+            if (amap.are_attributes_automatically_managed() && update_attributes)
+            {
+              modified_darts.push_back(amap.template beta<0>(*it));
+              modified_darts2.push_back(amap.template beta<1>(*it));
+              // TODO push only one out of two dart ?
+            }
+          }
+          else
+          {
+            amap.template dart_unlink_beta<1>(amap.template beta<0>(*it));
+            if (amap.are_attributes_automatically_managed() && update_attributes)
+            {
+              modified_darts.push_back(amap.template beta<0>(*it));
+            }
+          }
+
+          for ( unsigned int j=2; j<=CMap::dimension; ++j )
+          {
+            if ( !amap.is_free(*it,j) )
+            {
+              amap.basic_link_beta(amap.template beta<0>(*it),
+                                   amap.beta(*it,j), j);
+            //((*it)->beta(0))->basic_link_beta((*it)->beta(j),j);
+            }
+          }
+        }
+        else
+        {
+          if ( !amap.template is_free<1>(*it) )
+          {
+            amap.template dart_unlink_beta<0>(amap.template beta<1>(*it));
+            if (amap.are_attributes_automatically_managed() && update_attributes)
+            {
+              modified_darts2.push_back(amap.template beta<1>(*it));
+            }
+          }
+
+          for ( unsigned int j=2; j<=CMap::dimension; ++j )
+          {
+            if ( !amap.is_free(*it,j) )
+            { amap.unlink_beta(*it, j); }
+          }
+        }
+      }
+
+      if (amap.are_attributes_automatically_managed() && update_attributes)
+      {
+        // We test the split of all the incident cells for all the non
+        // void attributes.
+        CMap::Helper::template Foreach_enabled_attributes_except
+            <CGAL::internal::Test_split_attribute_functor<CMap,0>, 1>::
+            run(&amap,modified_darts, modified_darts2);
+      }
+
+      // We remove all the darts of the 0-cell.
+      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
+      { amap.erase_dart(*it); }
+
+      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+      amap.free_mark(mark);
+
+#ifdef CGAL_CMAP_TEST_VALID_REMOVALS
+      CGAL_assertion( amap.is_valid() );
+#endif
+
+      return res;
+    }
+  };
+
+  /** Remove an i-cell, 0<=i<=dimension.
+   * @param amap the used combinatorial map.
+   * @param adart a dart of the i-cell to remove.
+   * @param update_attributes a boolean to update the enabled attributes
+   * @return the number of deleted darts.
+   */
+  template < class CMap, unsigned int i >
+  size_t remove_cell(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes = true)
+  {
+    return
+        CGAL::Remove_cell_functor<CMap,i,CMap::dimension-i>::run(amap,adart,update_attributes);
+  }
+
+  /** Test if an i-cell can be contracted.
+   *  An i-cell can be contracted if i==1
+   *     or if there are at most two (i-1)-cell incident to it.
+   * @param adart a dart of the i-cell.
+   * @return true iff the i-cell can be contracted.
+   */
+  template <class CMap, unsigned int i>
+  struct Is_contractible_functor
+  {
+    static bool run(const CMap& amap, typename CMap::Dart_const_handle adart)
+    {
+      // TODO ? Optimisation possible to not test all the darts of the cell ?
+      bool res = true;
+      for ( CGAL::CMap_dart_const_iterator_of_cell<CMap,i> it(amap, adart);
+            res && it.cont(); ++it )
+      {
+        if ( amap.template beta<i-2,i-1>(it)!=
+             amap.template beta<i-1,CGAL_BETAINV(i-2)>(it) )
+          res = false;
+      }
+      return res;
+    }
+  };
+  // Specialization for i=0
+  template <class CMap>
+  struct Is_contractible_functor<CMap, 0>
+  {
+    static bool run(const CMap&, typename CMap::Dart_const_handle)
+    { return false; }
+  };
+  // Specialization for i=1
+  template <class CMap>
+  struct Is_contractible_functor<CMap, 1>
+  {
+    static bool run(const CMap&, typename CMap::Dart_const_handle)
+    { return true; }
+  };
+  /** Test if an i-cell can be contracted.
+   *  An i-cell can be contracted if i==1
+   *     or if there are at most two (i-1)-cell incident to it.
+   * @param adart a dart of the i-cell.
+   * @return true iff the i-cell can be contracted.
+   */
+  template < class CMap, unsigned int i >
+  bool is_contractible(const CMap& amap, typename CMap::Dart_const_handle adart)
+  { return CGAL::Is_contractible_functor<CMap, i>::run(amap,adart); }
+
+  /** Contract an i-cell, 1<i<=dimension, and merge eventually both incident
+   *  (i-1)-cells.
+   * @param amap the used combinatorial map.
+   * @param adart a dart of the i-cell to contract.
+   * @return the number of deleted darts.
+   */
+  template<class CMap, unsigned int i>
+  struct Contract_cell_functor
+  {
+    static size_t run(CMap& amap, typename CMap::Dart_handle adart)
+    {
+      CGAL_static_assertion ( 2<=i && i<=CMap::dimension );
+      CGAL_assertion( (is_contractible<CMap,i>(amap, adart)) );
+
+      size_t res = 0;
+
+      typename CMap::Dart_handle d1, d2;
+      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
+
+      typename CMap::size_type mark = amap.get_new_mark();
+      typename CMap::size_type mark_modified_darts = amap.get_new_mark();
+
+      const int imuinv = CGAL_BETAINV(i-1);
+
+      // First we store and mark all the darts of the i-cell to contract.
+      std::deque<typename CMap::Dart_handle> to_erase;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i> it(amap,adart,mark);
+            it.cont(); ++it )
+      {
+        to_erase.push_back(it);
+        if ( !amap.template is_free<i-1>(it) && dg1==amap.null_handle )
+        { dg1=it; dg2=amap.template beta<i-1>(it); }
+        amap.mark(it, mark);
+        ++res;
+      }
+
+      if ( amap.are_attributes_automatically_managed() )
+      {
+        // We group the two (i+1)-cells incident if they exist.
+        if ( dg1!=amap.null_handle )
+          CGAL::internal::Group_attribute_functor_run<CMap,i-1>::
+            run(&amap, dg1, dg2);
+      }
+
+      // During the operation, we store in modified_darts the darts modified
+      // to test after the loop the non void attributes that are split.
+      std::deque<typename CMap::Dart_handle> modified_darts;
+
+      // For each dart of the i-cell, we modify i-links of neighbors.
+      typename std::deque<typename CMap::Dart_handle>::iterator it =
+          to_erase.begin();
+      for ( ; it!=to_erase.end(); ++it )
+      {
+        d1 = amap.template beta<i>(*it);
+        while ( d1!=amap.null_dart_handle && amap.is_marked(d1, mark) )
+        {
+          d1 = amap.template beta<imuinv,i>(d1);
+          if (d1 == amap.template beta<i>(*it)) d1 = amap.null_dart_handle;
+        }
+
+        if ( !amap.is_marked(d1, mark_modified_darts) )
+        {
+          d2 = amap.template beta<i-1,i>(*it);
+          while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) )
+          {
+            d2 = amap.template beta<i-1,i>(d2);
+            if ( d2==amap.template beta<i-1,i>(*it) )
+              d2=amap.null_dart_handle;
+          }
+
+          if ( !amap.is_marked(d2, mark_modified_darts) )
+          {
+            if (d1 != amap.null_dart_handle)
+            {
+              if (d2 != amap.null_dart_handle && d1!=d2 )
+              {
+                amap.template basic_link_beta_for_involution<i>(d1, d2);
+                amap.mark(d1, mark_modified_darts);
+                amap.mark(d2, mark_modified_darts);
+                modified_darts.push_back(d1);
+                modified_darts.push_back(d2);
+                // TODO push only one out of two dart ?
+              }
+              else
+              {
+                if ( !amap.template is_free<i>(d1) )
+                {
+                  amap.template unlink_beta<i>(d1);
+                  CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
+                  amap.mark(d1, mark_modified_darts);
+                  modified_darts.push_back(d1);
+                }
+              }
+            }
+            else if (d2 != amap.null_dart_handle)
+            {
+              if ( !amap.is_free(d2,i) )
+              {
+                amap.template unlink_beta<i>(d2);
+                CGAL_assertion( !amap.is_marked(d2, mark_modified_darts) );
+                amap.mark(d2, mark_modified_darts);
+                modified_darts.push_back(d2);
+              }
+            }
+          }
+        }
+        if (amap.is_free(*it,i-1) && !amap.is_free(*it,i))
+        {
+          d1 = amap.beta(*it,i);
+          if ( !amap.is_free(d1,i) )
+          {
+            amap.template unlink_beta<i>(d1);
+            CGAL_assertion( !amap.is_marked(d1, mark_modified_darts) );
+            amap.mark(d1, mark_modified_darts);
+            modified_darts.push_back(d1);
+          }
+        }
+      }
+
+      if ( amap.are_attributes_automatically_managed() )
+      {
+        // We test the split of all the incident cells for all the non
+        // void attributes.
+        CMap::Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<CMap,i>, i>::
+          run(&amap, modified_darts, mark_modified_darts);
+      }
+
+      // We remove all the darts of the i-cell.
+      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
+      { amap.erase_dart(*it); }
+
+      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+      amap.free_mark(mark);
+
+      // If no attribute is enabled (or if only i-attributes are enabled),
+      // the darts are not unmark by Foreach_enabled_attributes_except.
+      // Thus we unmark them now.
+      if ( !amap.is_whole_map_unmarked(mark_modified_darts) )
+      {
+        for ( typename std::deque<typename CMap::Dart_handle>::
+              iterator it=modified_darts.begin();
+              it!=modified_darts.end(); ++it )
+          amap.unmark(*it, mark_modified_darts);
+      }
+
+      CGAL_assertion ( amap.is_whole_map_unmarked(mark_modified_darts) );
+      amap.free_mark(mark_modified_darts);
+
+#ifdef CGAL_CMAP_TEST_VALID_CONTRACTIONS
+      CGAL_assertion( amap.is_valid() );
+#endif
+
+      return res;
+    }
+  };
+
+  /** Contract an edge, and merge eventually both incident vertices.
+   * @param amap the used combinatorial map.
+   * @param adart a dart of the edge to contract.
+   * @return the number of deleted darts.
+   */
+  template<class CMap>
+  struct Contract_cell_functor<CMap,1>
+  {
+    static size_t run(CMap& amap, typename CMap::Dart_handle adart)
+    {
+      CGAL_assertion( (is_contractible<CMap,1>(amap,adart)) );
+
+      size_t res = 0;
+
+      typename CMap::Dart_handle d1, d2;
+      typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
+
+      typename CMap::size_type mark = amap.get_new_mark();
+
+      // First we store and mark all the darts of the 1-cell to contract.
+      std::deque<typename CMap::Dart_handle> to_erase;
+      for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,1> it(amap,adart,mark);
+            it.cont(); ++it )
+      {
+        to_erase.push_back(it);
+        if ( dg1==amap.null_handle && !amap.template is_free<0>(it) &&
+             !amap.template is_free<1>(it) )
+        { dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); }
+        amap.mark(it, mark);
+        ++res;
+      }
+
+      if ( amap.are_attributes_automatically_managed() )
+      {
+        // We group the two vertices incident if they exist.
+        if ( dg1!=amap.null_handle )
+          CGAL::internal::Group_attribute_functor_run<CMap, 0, 1>::
+            run(&amap, dg1, dg2);
+      }
+
+      // During the operation, we store in modified_darts the darts modified
+      // by beta0 to test after the loop non void attributes that are split.
+      std::deque<typename CMap::Dart_handle> modified_darts;
+      // And we store in modified_darts2 all the darts having beta1 modified.
+      std::deque<typename CMap::Dart_handle> modified_darts2;
+
+      // For each dart of the cell, we modify link of neighbors.
+      typename std::deque<typename CMap::Dart_handle>::iterator it =
+        to_erase.begin();
+      for ( ; it!=to_erase.end(); ++it )
+      {
+        if ( !amap.template is_free<0>(*it) )
+        {
+          if ( !amap.template is_free<1>(*it) )
+          {
+            if ( amap.template beta<1>(*it)!=*it )
+            {
+               /*modified_darts2.push_back((*it)->template beta<0>());
+              if ( (*it)->beta(0)!=(*it)->beta(1) )*/
+              if ( amap.are_attributes_automatically_managed() )
+              {
+                modified_darts.push_back(amap.template beta<1>(*it));
+              }
+              amap.basic_link_beta_1(amap.template beta<0>(*it),
+                                     amap.template beta<1>(*it));
+            }
+          }
+          else
+          {
+            if ( amap.are_attributes_automatically_managed() )
+            {
+              modified_darts2.push_back(amap.template beta<0>(*it));
+            }
+            amap.template dart_unlink_beta<1>(amap.template beta<0>(*it));
+          }
+        }
+        else
+        {
+          if ( !amap.template is_free<1>(*it) )
+          {
+            if ( amap.are_attributes_automatically_managed() )
+            {
+              modified_darts.push_back(amap.template beta<1>(*it));
+            }
+            amap.template dart_unlink_beta<0>(amap.template beta<1>(*it));
+          }
+        }
+      }
+
+      // We remove all the darts of the cell.
+      for ( it=to_erase.begin(); it!=to_erase.end(); ++it )
+      { amap.erase_dart(*it); }
+
+      CGAL_assertion( amap.is_whole_map_unmarked(mark) );
+      amap.free_mark(mark);
+
+      if ( amap.are_attributes_automatically_managed() )
+      {
+        // We test the split of all the incident cells for all the non
+        // void attributes.
+        CMap::Helper::template Foreach_enabled_attributes_except
+          <CGAL::internal::Test_split_attribute_functor<CMap,1>, 1>::
+          run(&amap, modified_darts, modified_darts2);
+      }
+
+#ifdef CGAL_CMAP_TEST_VALID_CONTRACTIONS
+      CGAL_assertion( amap.is_valid() );
+#endif
+
+      return res;
+    }
+  };
+
+  /** Contract an i-cell, 1<=i<=dimension.
+   * @param amap the used combinatorial map.
+   * @param adart a dart of the i-cell to remove.
+   * @return the number of deleted darts.
+   */
+  template < class CMap, unsigned int i >
+  size_t contract_cell(CMap& amap, typename CMap::Dart_handle adart)
+  { return CGAL::Contract_cell_functor<CMap,i>::run(amap,adart); }
+
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_OPERATIONS_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_save_load.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_save_load.h
new file mode 100644
index 0000000..6650724
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_save_load.h
@@ -0,0 +1,800 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//                 Guillaume Castano <guillaume.castano at gmail.com>
+//                 Pascal Khieu <pascal.khieu at gmail.com>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H
+#define CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H
+
+#include <boost/foreach.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/lexical_cast.hpp>
+
+#include <CGAL/Combinatorial_map.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Cell_attribute_with_point.h>
+
+#include <algorithm>
+#include <map>
+#include <vector>
+#include <cstdlib>
+#include <iostream>
+#include <typeinfo>
+
+namespace CGAL {
+
+    typedef Exact_predicates_inexact_constructions_kernel::Point_3 RPoint_3;
+    typedef Exact_predicates_exact_constructions_kernel::Point_3 EPoint_3;
+
+  // Tags used in xml tree:
+  // For darts:
+  //  <darts>
+  //    <d> // new dart
+  //        <b i="1"> neighbor dart index for beta1 </b>
+  //        ...
+  //        <v> value of dart (optional) </v>
+  //    </d>
+  //  ...
+  // </darts>
+  // For attributes:
+  // <attributes>
+  //   <dimension index="1"> // new type of non void attribute
+  //   <type>type of the info associated</type>
+  //   <a> // new attribute
+  //    <d> dart index </d>
+  //    <v> value of attribute </v>
+  //   </a>
+  //   ...
+  // </attributes>
+
+  // Here T is a Dart_const_handle so we don't need &
+  template<typename T>
+  void write_cmap_dart_node(boost::property_tree::ptree & /*node*/, T)
+  {}
+
+  template<typename T>
+  void write_cmap_attribute_node(boost::property_tree::ptree & /*node*/, const T&)
+  {}
+  
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       char val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       unsigned char val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       short int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       unsigned short int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       unsigned int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       long int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       unsigned long int val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       float val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       double val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       long double val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       bool val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                       const std::string& val)
+  {node.add("v",val);}
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                                 const RPoint_3& val)
+  {
+    node.add("p.x",val.x());
+    node.add("p.y",val.y());
+    node.add("p.z",val.z());
+  }
+  inline
+  void write_cmap_attribute_node(boost::property_tree::ptree & node,
+                                 const EPoint_3& val)
+  {
+    node.add("p.x",CGAL::to_double(val.x()));
+    node.add("p.y",CGAL::to_double(val.y()));
+    node.add("p.z",CGAL::to_double(val.z()));
+  }
+
+  template<typename CMap, unsigned int i,
+           bool WithInfo=CGAL::Is_attribute_has_non_void_info
+                          <typename CMap::template Attribute_type<i>::type>::value,
+           bool WithPoint=CGAL::Is_attribute_has_point
+                          <typename CMap::template Attribute_type<i>::type >::value >
+  struct My_functor_cmap_save_one_attrib;
+
+  // An attrib with point and with info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_save_one_attrib<CMap, i, true, true>
+  {
+    static void run(const CMap* amap, boost::property_tree::ptree* ptree,
+                    std::map<typename CMap::Dart_const_handle, typename CMap::size_type>* myDarts)
+    {
+      // to check all i-cells of the map
+      typename CMap::template Attribute_range<i>::type::const_iterator
+        it_attrib, itend_attrib;
+      it_attrib=amap->template attributes<i>().begin();
+      itend_attrib=amap->template attributes<i>().end();
+
+      // add dimension & type
+      boost::property_tree::ptree & ndim = ptree->add("dimension", "");
+      ndim.put("<xmlattr>.index", i);
+      ndim.add("type", typeid(typename CMap::template Attribute_type<i>::type::Info).name());
+      ndim.add("type_point", typeid(RPoint_3).name());
+
+      // for every attribute of the dimension
+      for (; it_attrib!=itend_attrib; ++it_attrib)
+      {
+        // make composant, dart and property node
+        boost::property_tree::ptree & nattr = ndim.add("a", "");
+        /* boost::property_tree::ptree & ndarts = */
+          nattr.add("d", (*myDarts)[it_attrib->dart()]);
+
+        // update property node to add a value node (from basic or custom type
+        write_cmap_attribute_node(nattr, it_attrib->info());
+        write_cmap_attribute_node(nattr, it_attrib->point());
+      }
+    }
+  };
+
+  // An attribute with point and without info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_save_one_attrib<CMap, i, false, true>
+  {
+    static void run(const CMap* amap, boost::property_tree::ptree* ptree,
+                    std::map<typename CMap::Dart_const_handle, typename CMap::size_type>* myDarts)
+    {
+      // to check all i-cells of the map
+      typename CMap::template Attribute_range<i>::type::const_iterator
+        it_attrib, itend_attrib;
+      it_attrib=amap->template attributes<i>().begin();
+      itend_attrib=amap->template attributes<i>().end();
+
+      // add dimension & type
+      boost::property_tree::ptree & ndim = ptree->add("dimension", "");
+      ndim.put("<xmlattr>.index", i);
+      ndim.add("type", "void");
+      ndim.add("type_point", typeid(RPoint_3).name());
+
+      // for every attribute of the dimension
+      for (; it_attrib!=itend_attrib; ++it_attrib)
+      {
+        // make composant, dart and property node
+        boost::property_tree::ptree & nattr = ndim.add("a", "");
+        /* boost::property_tree::ptree & ndarts = */
+          nattr.add("d", (*myDarts)[it_attrib->dart()]);
+
+        // update property node to add a value node (from basic or custom type
+        write_cmap_attribute_node(nattr, it_attrib->point());
+      }
+    }
+  };
+
+  // An attribute without point and with info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_save_one_attrib<CMap, i, true, false>
+  {
+    static void run(const CMap* amap, boost::property_tree::ptree* ptree,
+                    std::map<typename CMap::Dart_const_handle, typename CMap::size_type>* myDarts)
+    {
+      // to check all i-cells of the map
+      typename CMap::template Attribute_range<i>::type::const_iterator
+        it_attrib, itend_attrib;
+      it_attrib=amap->template attributes<i>().begin();
+      itend_attrib=amap->template attributes<i>().end();
+
+      // add dimension & type
+      boost::property_tree::ptree & ndim = ptree->add("dimension", "");
+      ndim.put("<xmlattr>.index", i);
+      ndim.add("type", typeid(typename CMap::template Attribute_type<i>::type::Info).name());
+      ndim.add("type_point", "void");
+
+      // for every attribute of the dimension
+      for (; it_attrib!=itend_attrib; ++it_attrib)
+      {
+        // make composant, dart and property node
+        boost::property_tree::ptree & nattr = ndim.add("a", "");
+        /* boost::property_tree::ptree & ndarts = */
+          nattr.add("d", (*myDarts)[it_attrib->dart()]);
+
+        // update property node to add a value node (from basic or custom type
+        write_cmap_attribute_node(nattr, it_attrib->info());
+      }
+    }
+  };
+
+  // An attrib without point and without info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_save_one_attrib<CMap, i, false, false>
+  {
+    static void run(const CMap* amap, boost::property_tree::ptree* ptree,
+                    std::map<typename CMap::Dart_const_handle, typename CMap::size_type>* myDarts)
+    {
+      // to check all i-cells of the map
+      typename CMap::template Attribute_range<i>::type::const_iterator
+        it_attrib, itend_attrib;
+      it_attrib=amap->template attributes<i>().begin();
+      itend_attrib=amap->template attributes<i>().end();
+
+      // add dimension & type
+      boost::property_tree::ptree & ndim = ptree->add("dimension", "");
+      ndim.put("<xmlattr>.index", i);
+      ndim.add("type", "void");
+      ndim.add("type_point", "void");
+
+      // for every attribute of the dimension
+      for (; it_attrib!=itend_attrib; ++it_attrib)
+      {
+        // make composant, dart and property node
+        boost::property_tree::ptree & nattr = ndim.add("a", "");
+        /* boost::property_tree::ptree & ndarts = */
+          nattr.add("d", (*myDarts)[it_attrib->dart()]);
+      }
+    }
+  };
+
+  template<typename CMap>
+  struct My_functor_cmap_save_attrib
+  {
+    template <unsigned int i>
+    static void run(const CMap* amap, boost::property_tree::ptree* ptree,
+                    std::map<typename CMap::Dart_const_handle, typename CMap::size_type>* myDarts)
+    {
+        My_functor_cmap_save_one_attrib<CMap, i>::run(amap, ptree, myDarts);
+    }
+  };
+
+  template < class CMap >
+  boost::property_tree::ptree cmap_save_darts
+  (const CMap& amap, std::map<typename CMap::Dart_const_handle, typename CMap::size_type>& myDarts)
+  {
+    CGAL_assertion( myDarts.empty() );
+    
+    // First we numbered each dart by using the std::map.
+    typename CMap::Dart_range::const_iterator it(amap.darts().begin());
+    for(typename CMap::size_type num=1; num<=amap.number_of_darts();
+        ++num, ++it)
+    {
+      myDarts[it] = num;
+    }
+
+    // make a tree
+    using boost::property_tree::ptree;
+    ptree pt;
+
+    // Now we save each dart, and its neighbors.
+    it=amap.darts().begin();
+    for(typename CMap::size_type num=0; num<amap.number_of_darts(); ++num, ++it)
+    {
+      // make a dart node
+      ptree & ndart = pt.add("d", "");
+
+      // the beta, only for non free sews
+      for(unsigned int dim=1; dim<=amap.dimension; dim++)
+      {
+        if(!amap.is_free(it, dim))
+        {
+          ptree & currentNext = ndart.add("b", myDarts[amap.beta(it, dim)]);
+          currentNext.put("<xmlattr>.i", dim);
+        }
+      }
+
+      // update property node to add a value node (if user defined its own
+      // function)
+      write_cmap_dart_node(ndart, it);
+    }
+    
+    return pt;
+  }
+
+  template < class CMap >
+  boost::property_tree::ptree cmap_save_attributes
+  (const CMap& amap, std::map<typename CMap::Dart_const_handle, typename CMap::size_type>& myDarts)
+  {
+    using boost::property_tree::ptree;
+    ptree pt;
+
+    // update pt adding nodes containing attributes informations
+    CMap::Helper::template Foreach_enabled_attributes
+      <My_functor_cmap_save_attrib<CMap> >::run(&amap, &pt, &myDarts);
+
+    return pt;
+  }
+
+  template < class CMap >
+  bool save_combinatorial_map(const CMap& amap, std::ostream & output)
+  {
+    using boost::property_tree::ptree;
+    ptree data;
+
+    // map dart => number
+    std::map<typename CMap::Dart_const_handle, typename CMap::size_type> myDarts;
+
+    // Get darts
+    ptree pt_darts;
+    pt_darts = cmap_save_darts(amap, myDarts);
+    data.add_child("data.darts",pt_darts);
+
+    // Get attributes
+    ptree pt_attr;
+    pt_attr = cmap_save_attributes(amap, myDarts);
+    data.add_child("data.attributes", pt_attr);
+
+    // save data in output
+    write_xml(output, data);
+
+    return true;
+  }
+
+  template < class CMap >
+  bool save_combinatorial_map(const CMap& amap, const char* filename)
+  {
+    std::ofstream output(filename);
+    if (!output) return false;
+    return save_combinatorial_map(amap, output);
+  }
+  
+  // Here T is a Dart_handle so no need of &
+  template<typename T>
+  void read_cmap_dart_node
+  (const boost::property_tree::ptree::value_type &/*v*/, T /*val*/)
+  {}
+  template<typename T>
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &/*v*/, T &/*val*/)
+  {}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,char &val)
+  {val=boost::lexical_cast< char >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,unsigned char &val)
+  {val=boost::lexical_cast< unsigned char >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,short int &val)
+  {val=boost::lexical_cast< short int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,unsigned short int &val)
+  {val=boost::lexical_cast< unsigned short int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,int &val)
+  {val=boost::lexical_cast< int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,unsigned int &val)
+  {val=boost::lexical_cast< unsigned int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,long int &val)
+  {val=boost::lexical_cast< long int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,unsigned long int &val)
+  {val=boost::lexical_cast< unsigned long int >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,float &val)
+  {val=boost::lexical_cast< float >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,double &val)
+  {val=boost::lexical_cast< double >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,long double &val)
+  {val=boost::lexical_cast< long double >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,bool &val)
+  {val=boost::lexical_cast< bool >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,std::string &val)
+  {val=boost::lexical_cast< std::string >(v.second.data());}
+  template<> inline
+  void read_cmap_attribute_node
+  (const boost::property_tree::ptree::value_type &v,RPoint_3 &val)
+  {
+    double x=v.second.get<double>("x");
+    double y=v.second.get<double>("y");
+    double z=v.second.get<double>("z");
+    val = RPoint_3(x,y,z);
+  }
+
+  template<typename CMap, unsigned int i,
+           bool WithInfo=CGAL::Is_attribute_has_non_void_info
+                          <typename CMap::template Attribute_type<i>::type>::value,
+           bool WithPoint=CGAL::Is_attribute_has_point
+                          <typename CMap::template Attribute_type<i>::type >::value >
+  struct My_functor_cmap_load_one_attrib;
+
+  // An attrib with point and with info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_load_one_attrib<CMap, i, true, true>
+  {
+      static void run(const boost::property_tree::ptree& pt, CMap* amap,
+                          const std::vector<typename CMap::Dart_handle>& myDarts)
+      {
+          BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0,
+                         pt.get_child("data.attributes") )
+          {
+            // <dimension>
+            if (v0.first == "dimension")
+            {
+              int dimension=v0.second.get("<xmlattr>.index", -1);
+
+              // if map.dimension == dimension saved in the xml file
+              if (dimension==i)
+              {
+                unsigned int id_dart_cellule=0;
+                std::string type =  v0.second.get<std::string>("type");
+                std::string type_map=std::string
+                  (typeid(typename CMap::template Attribute_type<i>::type::Info).name());
+
+                std::string ptype =  v0.second.get<std::string>("type_point");
+                std::string ptype_map= std::string
+                  (typeid(typename CMap::template Attribute_type<i>::type::Point).name());
+
+                //  std::cout<<"ptype="<<ptype<<"  and type_map="<<type_map<<std::endl;
+                /* if(type!=type_map && ptype!=ptype_map)
+                {
+                  //  std::cout<<"Not loaded."<<std::endl;
+                  return;
+                  }*/
+
+                BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1,
+                              v0.second )
+                {
+                  if( v1.first == "a" )
+                  {
+                    id_dart_cellule=v1.second.get<unsigned int>("d")-1;
+
+                    BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2,
+                                  v1.second )
+                    {
+                      if( type==type_map && v2.first == "v" )
+                      {
+                        if (myDarts[id_dart_cellule]->
+                            template attribute<i>()==NULL )
+                          amap->template set_attribute<i>
+                              (myDarts[id_dart_cellule],
+                               amap->template create_attribute<i>());
+                        read_cmap_attribute_node
+                            (v2,
+                             myDarts[id_dart_cellule]->
+                             template attribute<i>()->info());
+                      }
+                      if( ptype==ptype_map && v2.first == "p" )
+                      {
+                        if (myDarts[id_dart_cellule]->
+                            template attribute<i>()==NULL )
+                          amap->template set_attribute<i>
+                              (myDarts[id_dart_cellule],
+                               amap->template create_attribute<i>());
+                        read_cmap_attribute_node
+                            (v2,
+                             myDarts[id_dart_cellule]->
+                             template attribute<i>()->point());
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+      }
+  };
+
+  // An attribute with point and without info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_load_one_attrib<CMap, i, false, true>
+  {
+      static void run(const boost::property_tree::ptree& pt, CMap* amap,
+                          const std::vector<typename CMap::Dart_handle>& myDarts)
+      {
+          BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0,
+                         pt.get_child("data.attributes") )
+          {
+            // <dimension>
+            if (v0.first == "dimension")
+            {
+              int dimension=v0.second.get("<xmlattr>.index", -1);
+
+              // if map.dimension == dimension saved in the xml file
+              if (dimension==i)
+              {
+                unsigned int id_dart_cellule=0;
+                std::string ptype =  v0.second.get<std::string>("type_point");
+                std::string type_map= typeid
+                  (typename CMap::template Attribute_type<i>::type::Point).name();
+                //  std::cout<<"ptype="<<ptype<<"  and type_map="<<type_map<<std::endl;
+                /*                if(ptype!=type_map)
+                {
+                  //  std::cout<<"Not loaded."<<std::endl;
+                  return;
+                  }*/
+
+                BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1,
+                              v0.second )
+                {
+                  if( v1.first == "a" )
+                  {
+                    id_dart_cellule=v1.second.get<unsigned int>("d")-1;
+
+                    BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2,
+                                  v1.second )
+                    {
+                      if( v2.first == "p" )
+                      {
+                        if (myDarts[id_dart_cellule]->
+                            template attribute<i>()==NULL )
+                          amap->template set_attribute<i>
+                            (myDarts[id_dart_cellule],
+                             amap->template create_attribute<i>());
+
+                        read_cmap_attribute_node
+                          (v2,
+                           myDarts[id_dart_cellule]->
+                           template attribute<i>()->point());
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+      }
+  };
+
+  // An attribute without point and with info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_load_one_attrib<CMap, i, true, false>
+  {
+      static void run(const boost::property_tree::ptree& pt, CMap* amap,
+                          const std::vector<typename CMap::Dart_handle>& myDarts)
+      {
+          BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0,
+                         pt.get_child("data.attributes") )
+          {
+            // <dimension>
+            if (v0.first == "dimension")
+            {
+              int dimension=v0.second.get("<xmlattr>.index", -1);
+
+              // if map.dimension == dimension saved in the xml file
+              if (dimension==i)
+              {
+                unsigned int id_dart_cellule=0;
+                std::string ptype =  v0.second.get<std::string>("type");
+                std::string type_map= typeid
+                  (typename CMap::template Attribute_type<i>::type::Info).name();
+                //  std::cout<<"ptype="<<ptype<<"  and type_map="<<type_map<<std::endl;
+                /*      if(ptype!=type_map)
+                {
+                  //  std::cout<<"Not loaded."<<std::endl;
+                  return;
+                  } */
+
+                BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1,
+                              v0.second )
+                {
+                  if( v1.first == "a" )
+                  {
+                    id_dart_cellule=v1.second.get<unsigned int>("d")-1;
+
+                    BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2,
+                                  v1.second )
+                    {
+                      if( v2.first == "v" )
+                      {
+                        if (myDarts[id_dart_cellule]->
+                            template attribute<i>()==NULL )
+                          amap->template set_attribute<i>
+                            (myDarts[id_dart_cellule],
+                             amap->template create_attribute<i>());
+                        read_cmap_attribute_node
+                          (v2,
+                           myDarts[id_dart_cellule]->
+                           template attribute<i>()->info());
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+  };
+
+  // An attribute without point and without info
+  template<typename CMap, unsigned int i>
+  struct My_functor_cmap_load_one_attrib<CMap, i, false, false>
+  {
+          static void run(const boost::property_tree::ptree& pt, CMap* amap,
+                              const std::vector<typename CMap::Dart_handle>& myDarts)
+      {
+              BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0,
+                             pt.get_child("data.attributes") )
+              {
+                // <dimension>
+                if (v0.first == "dimension")
+                {
+                  int dimension=v0.second.get("<xmlattr>.index", -1);
+
+                  // if map.dimension == dimension saved in the xml file
+                  if (dimension==i)
+                  {
+                    unsigned int id_dart_cellule=0;
+
+                    BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1,
+                                  v0.second )
+                    {
+                      if( v1.first == "a" )
+                      {
+                        id_dart_cellule=v1.second.get<unsigned int>("d")-1;
+
+                        if (myDarts[id_dart_cellule]->
+                            template attribute<i>()==NULL )
+                          amap->template set_attribute<i>
+                            (myDarts[id_dart_cellule],
+                             amap->template create_attribute<i>());
+                        }
+                      }
+                    }
+                  }
+                }
+      }
+  };
+
+  /** Functor called to load i-attributes.
+   *  @param pt a boost::property_tree::ptree load from an xml file
+   *  @param amap a pointer to the map to load into
+   *  @param myDarts an array of Dart_handle st myDarts[i] is the ith dart.
+   */
+  template<class CMap>
+  struct My_functor_cmap_load_attrib
+  {
+    template <unsigned int i>
+    static void run(const boost::property_tree::ptree& pt, CMap* amap,
+                    const std::vector<typename CMap::Dart_handle>& myDarts)
+    {
+       My_functor_cmap_load_one_attrib<CMap, i>::run(pt, amap, myDarts);
+    }
+  };
+
+  template < class CMap >
+  bool cmap_load_darts(boost::property_tree::ptree &pt, CMap& amap,
+                       std::vector<typename CMap::Dart_handle>& myDarts)
+  {
+    // use a boost::property_tree
+    using boost::property_tree::ptree;
+
+    // make darts
+    BOOST_FOREACH( const ptree::value_type &v, pt.get_child("data.darts") )
+    {
+      if( v.first == "d" )
+        myDarts.push_back(amap.create_dart());
+    }
+
+    // update beta links
+    unsigned int index;
+    unsigned int currentDartInt = 0;
+    unsigned int nextDartInt;
+
+    BOOST_FOREACH( const ptree::value_type &v, pt.get_child("data.darts") )
+    {
+      if( v.first == "d" )
+      {
+        BOOST_FOREACH( const ptree::value_type &v2, v.second )
+        {
+          if (v2.first == "b")
+          {
+            index = v2.second.get("<xmlattr>.i", 0);
+            nextDartInt = boost::lexical_cast< int >(v2.second.data())-1;
+            
+            if ( index<=amap.dimension )
+            {
+              // A->B
+              amap.basic_link_beta(myDarts[currentDartInt],
+                                   myDarts[nextDartInt],
+                                   index);
+
+              //B->A
+              amap.basic_link_beta(myDarts[nextDartInt],
+                                   myDarts[currentDartInt],
+                                   CGAL_BETAINV(index));
+            }
+          }
+          else if (v2.first=="v")
+            read_cmap_dart_node(v2,myDarts[currentDartInt]);
+        }
+      }
+      ++currentDartInt;
+    }
+
+    return true;
+  }
+
+  template < class CMap >
+  void cmap_load_attributes(const boost::property_tree::ptree& pt, CMap& amap,
+                            const std::vector<typename CMap::Dart_handle>& myDarts)
+  {
+    CMap::Helper::template Foreach_enabled_attributes
+      <My_functor_cmap_load_attrib<CMap> >::run(pt,&amap,myDarts);
+  }
+
+  template < class CMap >
+  bool load_combinatorial_map(std::ifstream & input, CMap& amap)
+  {
+    using boost::property_tree::ptree;
+    ptree pt;
+    read_xml(input, pt);
+    std::vector<typename CMap::Dart_handle> myDarts;
+    cmap_load_darts(pt,amap,myDarts);
+    cmap_load_attributes(pt,amap,myDarts);
+    return true;
+  }
+  
+  template < class CMap >
+  bool load_combinatorial_map(const char* filename, CMap& amap)
+  {
+    std::ifstream input(filename);
+    if (!input) return false;
+    return load_combinatorial_map(input, amap);
+  }
+
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_storages.h b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_storages.h
new file mode 100644
index 0000000..643dd99
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Combinatorial_map_storages.h
@@ -0,0 +1,419 @@
+// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_STORAGES_H
+#define CGAL_COMBINATORIAL_MAP_STORAGES_H 1
+
+#include <CGAL/Handle_hash_function.h>
+
+#include <CGAL/Compact_container.h>
+
+#include <boost/config.hpp>
+#if  (BOOST_GCC >= 50000)
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Warray-bounds\"")
+#endif
+
+namespace CGAL {
+
+  /** @file Combinatorial_map_storages.h
+   * Definition of storages for dD Combinatorial map.
+   */
+
+  struct Index_hash_function {
+    typedef std::size_t result_type;
+    template <class H>
+    std::size_t operator() (const H& h) const {
+      return h;
+    }
+  };
+
+  // Storage of darts with compact container, beta with handles
+  template<unsigned int d_, class Items_, class Alloc_ >
+  class Combinatorial_map_storage_1
+  {
+  public:
+    typedef Combinatorial_map_storage_1<d_, Items_, Alloc_> Self;
+    typedef CGAL::Tag_false Use_index;
+
+    typedef internal::Combinatorial_map_helper<Self> Helper;
+
+    typedef typename Items_::template Dart_wrapper<Self>  Dart_wrapper;
+    typedef typename Dart_wrapper::Dart                   Dart;
+    typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
+
+    typedef Compact_container<Dart,Dart_allocator>  Dart_container;
+
+    typedef typename Dart_container::iterator       Dart_handle;
+    typedef typename Dart_container::const_iterator Dart_const_handle;
+    typedef typename Dart_container::size_type      size_type;
+
+    typedef CGAL::Void* Null_handle_type;
+    static const Null_handle_type null_handle;
+
+    typedef Items_ Items;
+    typedef Alloc_ Alloc;
+
+    template <typename T>
+    struct Container_for_attributes :
+        public Compact_container<T, typename Alloc_::template rebind<T>::other>
+    {};
+
+    /// Typedef for attributes
+    typedef typename Dart_wrapper::Attributes Attributes;
+
+    template<int i>
+    struct Attribute_type: public Helper::template Attribute_type<i>
+    {};
+    template<int i>
+    struct Attribute_handle: public Helper::template Attribute_handle<i>
+    {};
+    template<int i>
+    struct Attribute_const_handle:
+      public Helper::template Attribute_const_handle<i>
+    {};
+    template<int i>
+    struct Attribute_range: public Helper::template Attribute_range<i>
+    {};
+    template<int i>
+    struct Attribute_const_range:
+      public Helper::template Attribute_const_range<i>
+    {};
+
+    /// Number of marks
+    static const size_type NB_MARKS = 32;
+
+    /// The dimension of the combinatorial map.
+    static const unsigned int dimension = d_;
+
+    typedef Handle_hash_function Hash_function;
+
+    // Init
+    void init_storage()
+    {
+#ifdef CGAL_CMAP_DEPRECATED
+      // We must do this ony once, but problem because null_dart_handle
+      // is static !
+      if ( mnull_dart_container.empty() )
+#endif // CGAL_CMAP_DEPRECATED
+      { // emplace null_dart; initialized in Combinatorial_map class
+        null_dart_handle = mnull_dart_container.emplace();
+      }
+    }
+
+   /** Return if this dart is free for adimension.
+     * @param dh a dart handle
+     * @param i the dimension.
+     * @return true iff dh is linked with NULL for \em adimension.
+     */
+    template<unsigned int i>
+    bool is_free(Dart_const_handle dh) const
+    {
+      CGAL_assertion( dh!=NULL );
+      CGAL_assertion(i <= dimension);
+      return dh->mbeta[i]==null_dart_handle;
+    }
+    bool is_free(Dart_const_handle dh, unsigned int i) const
+    {
+      CGAL_assertion( dh!=NULL );
+      CGAL_assertion(i <= dimension);
+      return dh->mbeta[i]==null_dart_handle;
+    }
+
+    /// Set simultaneously all the marks of this dart to a given value.
+    void set_dart_marks(Dart_const_handle ADart,
+                        const std::bitset<NB_MARKS>& amarks) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->set_marks(amarks);
+    }
+    /// Return all the marks of a dart.
+    std::bitset<NB_MARKS> get_dart_marks(Dart_const_handle ADart) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      return ADart->get_marks();
+    }
+    /// Return the mark value of dart a given mark number.
+    bool get_dart_mark(Dart_const_handle ADart, size_type amark) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      return ADart->get_mark(amark);
+    }
+
+    /// Set the mark of a given mark number to a given value.
+    void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->set_mark(amark, avalue);
+    }
+
+    /// Flip the mark of a given mark number to a given value.
+    void flip_dart_mark(Dart_const_handle ADart, size_type amark) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->flip_mark(amark);
+    }
+
+    // Access to beta maps
+    Dart_handle get_beta(Dart_handle ADart, int B1)
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return ADart->mbeta[B1];
+    }
+    Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+    template<int B1>
+    Dart_handle get_beta(Dart_handle ADart)
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+    template<int B1>
+    Dart_const_handle get_beta(Dart_const_handle ADart) const
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+
+    // return a handle on the i-attribute
+    template<unsigned int i>
+    typename Attribute_handle<i>::type attribute(Dart_handle ADart)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                     "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (ADart->mattribute_handles);
+    }
+    template<unsigned int i>
+    typename Attribute_const_handle<i>::type
+    attribute(Dart_const_handle ADart) const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                     "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (ADart->mattribute_handles);
+    }
+
+    // get the attribute given its handle
+    template<unsigned int i>
+    typename Attribute_type<i>::type&
+    get_attribute(typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type&
+    get_attribute(typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+
+    Dart & get_dart(Dart_handle ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+    const Dart & get_dart(Dart_const_handle ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+
+    // Get the dart of the given attribute
+    template<unsigned int i>
+    Dart_handle dart_of_attribute(typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->dart();
+    }
+    template<unsigned int i>
+    Dart_const_handle
+    dart_of_attribute(typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->dart();
+    }
+
+    // Set the dart of the given attribute
+    template<unsigned int i>
+    void set_dart_of_attribute(typename Attribute_handle<i>::type ah,
+                               Dart_handle adart)
+    {
+      CGAL_assertion( ah!=NULL );
+      ah->set_dart(adart);
+    }
+
+    // Get the info of the given attribute
+    template<unsigned int i>
+    typename Attribute_type<i>::type::Info &
+    info_of_attribute(typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->info();
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type::Info &
+    info_of_attribute(typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->info();
+    }
+
+    // Get the info of the i-cell attribute associated with the given dart
+    template<unsigned int i>
+    typename Attribute_type<i>::type::Info & info(Dart_handle adart)
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return info_of_attribute<i>(attribute<i>(adart));
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type::Info &
+    info(Dart_const_handle adart) const
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return info_of_attribute<i>(attribute<i>(adart));
+    }
+
+    // Get the dart of the i-cell attribute associated with the given dart
+    template<unsigned int i>
+    Dart_handle & dart(Dart_handle adart)
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return dart_of_attribute<i>(attribute<i>(adart));
+    }
+    template<unsigned int i>
+    Dart_const_handle dart(Dart_const_handle adart) const
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return dart_of_attribute<i>(attribute<i>(adart));
+    }
+
+    void display_dart(Dart_const_handle ADart) const
+    { std::cout<<&*ADart; }
+
+    template<unsigned int i>
+    void display_attribute(typename Attribute_const_handle<i>::type ah) const
+    { std::cout<<&*ah; }
+
+  protected:
+    // Set the handle on the i th attribute
+    template<unsigned int i>
+    void basic_set_dart_attribute(Dart_handle dh,
+                                  typename Attribute_handle<i>::type ah)
+    {
+      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (dh->mattribute_handles) = ah;
+    }
+
+    /** Link a dart with a given dart for a given dimension.
+     * @param adart the dart to link.
+     * @param adart2 the dart to link with.
+     * @param i the dimension.
+     */
+    template<unsigned int i>
+    void dart_link_beta(Dart_handle adart, Dart_handle adart2)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(adart!=NULL && adart2!=NULL);
+      CGAL_assertion(adart!=null_dart_handle);
+      adart->mbeta[i] = adart2;
+    }
+    void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(adart!=NULL && adart2!=NULL);
+      CGAL_assertion(adart!=null_dart_handle);
+      adart->mbeta[i] = adart2;
+    }
+
+    /** Unlink a dart for a given dimension.
+     * @param adart a dart.
+     * @param i the dimension.
+     */
+    template<unsigned int i>
+    void dart_unlink_beta(Dart_handle adart)
+    {
+      CGAL_assertion(adart!=NULL && i <= dimension);
+      adart->mbeta[i] = null_dart_handle;
+    }
+    void dart_unlink_beta(Dart_handle adart, unsigned int i)
+    {
+      CGAL_assertion(adart!=NULL && i <= dimension);
+      adart->mbeta[i] = null_dart_handle;
+    }
+
+  public:
+    /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle.
+#ifdef CGAL_CMAP_DEPRECATED
+    static
+#endif // CGAL_CMAP_DEPRECATED
+    Dart_handle null_dart_handle; // Todo Dart_const_handle ??
+
+  protected:
+    /// Dart container.
+    Dart_container mdarts;
+
+    /// Container for the null_dart_handle, static data member.
+#ifdef CGAL_CMAP_DEPRECATED
+    static
+#endif // CGAL_CMAP_DEPRECATED
+    Dart_container mnull_dart_container;
+
+    /// Tuple of attributes containers
+    typename Helper::Attribute_containers mattribute_containers;
+  };
+
+  /// null_handle
+  template < unsigned int d_, class Items_, class Alloc_ >
+  const typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_handle_type
+  Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle = NULL;
+
+#ifdef CGAL_CMAP_DEPRECATED
+  /// Allocation of static data members
+  /// mnull_dart_container
+  template<unsigned int d_, class Items_, class Alloc_ >
+  typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_container
+  Combinatorial_map_storage_1<d_, Items_, Alloc_>::mnull_dart_container;
+
+  /// null_dart_handle
+  template < unsigned int d_, class Items_, class Alloc_ >
+  typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_handle
+  Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_dart_handle;
+  // =  mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
+  // Does not work on windows => segfault
+  // Thus we initialize null_dart_handle in the Combinatorial_map constructor
+#endif // CGAL_CMAP_DEPRECATED
+
+} // namespace CGAL
+
+
+#if  (BOOST_GCC >= 50000)
+ _Pragma("GCC diagnostic pop")
+#endif
+#endif // CGAL_COMBINATORIAL_MAP_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Compact_container.h b/3rdparty/CGAL-4.8/include/CGAL/Compact_container.h
new file mode 100644
index 0000000..5dbdd5b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Compact_container.h
@@ -0,0 +1,1207 @@
+// Copyright (c) 2003,2004,2007-2010  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2014  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_COMPACT_CONTAINER_H
+#define CGAL_COMPACT_CONTAINER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Default.h>
+
+#include <iterator>
+#include <algorithm>
+#include <vector>
+#include <cstring>
+#include <functional>
+
+#include <CGAL/memory.h>
+#include <CGAL/iterator.h>
+#include <CGAL/CC_safe_handle.h>
+#include <CGAL/Time_stamper.h>
+
+#include <boost/mpl/if.hpp>
+
+// An STL like container with the following properties :
+// - to achieve compactness, it requires access to a pointer stored in T,
+//   specified by a traits.  This pointer is supposed to be 4 bytes aligned
+//   when the object is alive, otherwise, the container uses the 2 least
+//   significant bits to store information in the pointer.
+// - Ts are allocated in arrays of increasing size, which are linked together
+//   by their first and last element.
+// - the iterator looks at the famous 2 bits to know if it has to deal with
+//   a free/used/boundary element.
+
+// TODO :
+// - Add .resize() (and proper copy of capacity_).
+// - Add preconditions in input that real pointers need to have clean bits.
+//   Also for the allocated memory alignment, and sizeof().
+// - Do a benchmark before/after.
+// - Check the end result with Valgrind.
+// - The bit squatting mechanism will be reused for the conflict flag, maybe
+//   it could be put out of the class.
+
+// TODO low priority :
+// - rebind<> the allocator
+// - Exception safety guarantees
+// - Thread safety guarantees
+// - std requirements on iterators says all defined operations are constant
+//   time amortized (it's not true here, maybe it could be with some work...)
+// - all this is expected especially when there are not so many free objects
+//   compared to the allocated elements.
+// - Should block_size be selectable/hintable by .reserve() ?
+// - would be nice to have a temporary_free_list (still active elements, but
+//   which are going to be freed soon).  Probably it prevents compactness.
+// - eventually something to copy this data structure, providing a way to
+//   update the pointers (give access to a hash_map, at least a function that
+//   converts an old pointer to the new one ?).  Actually it doesn't have to
+//   be stuck to a particular DS, because for a list it's useful too...
+// - Currently, end() can be invalidated on insert() if a new block is added.
+//   It would be nice to fix this.  We could insert the new block at the
+//   beginning instead ?  That would drop the property that iterator order
+//   is preserved.  Maybe it's not a problem if end() is not preserved, after
+//   all nothing is going to dereference it, it's just for comparing with
+//   end() that it can be a problem.
+//   Another way would be to have end() point to the end of an always
+//   empty block (containing no usable element), and insert new blocks just
+//   before this one.
+//   Instead of having the blocks linked between them, the start/end pointers
+//   could point back to the container, so that we can do more interesting
+//   things (e.g. freeing empty blocks automatically) ?
+
+namespace CGAL {
+
+#define CGAL_GENERATE_MEMBER_DETECTOR(X)                                             \
+template<typename T> class has_##X {                                          \
+    struct Fallback { int X; };                                               \
+    struct Derived : T, Fallback { };                                         \
+                                                                              \
+    template<typename U, U> struct Check;                                     \
+                                                                              \
+    typedef char ArrayOfOne[1];                                               \
+    typedef char ArrayOfTwo[2];                                               \
+                                                                              \
+    template<typename U> static ArrayOfOne & func(                            \
+                                            Check<int Fallback::*, &U::X> *); \
+    template<typename U> static ArrayOfTwo & func(...);                       \
+  public:                                                                     \
+    typedef has_##X type;                                                     \
+    enum { value = sizeof(func<Derived>(0)) == 2 };                           \
+} // semicolon is after the macro call
+
+#define CGAL_INIT_COMPACT_CONTAINER_BLOCK_SIZE 14
+#define CGAL_INCREMENT_COMPACT_CONTAINER_BLOCK_SIZE 16
+
+template<unsigned int first_block_size_, unsigned int block_size_increment>
+struct Addition_size_policy
+{
+  static const unsigned int first_block_size = first_block_size_;
+
+  template<typename Compact_container>
+  static void increase_size(Compact_container& cc)
+  { cc.block_size += block_size_increment; }
+
+  template<typename Compact_container>
+  static void get_index_and_block(typename Compact_container::size_type i,
+                                  typename Compact_container::size_type& index,
+                                  typename Compact_container::size_type& block)
+  {
+    typedef typename Compact_container::size_type ST;
+    const ST TWO_M_N = 2*first_block_size_ - block_size_increment;
+    ST delta = TWO_M_N*TWO_M_N + 8*block_size_increment*i;
+    block= (static_cast<ST>(std::sqrt(static_cast<double>(delta))) - TWO_M_N)
+      / (2*block_size_increment);
+
+    if ( block==0 )
+    { index = i + 1; }
+    else
+    {
+      const typename Compact_container::size_type first_element_in_block =
+        block*(first_block_size_+ (block_size_increment*(block - 1))/2);
+
+      index=i - first_element_in_block + 1;
+    }
+  }
+};
+
+template<unsigned int k>
+struct Constant_size_policy
+{
+  static const unsigned int first_block_size = k;
+
+  template<typename Compact_container>
+  static void increase_size(Compact_container& /*cc*/)
+  {}
+
+  template<typename Compact_container>
+  static void get_index_and_block(typename Compact_container::size_type i,
+                                  typename Compact_container::size_type& index,
+                                  typename Compact_container::size_type& block)
+  {
+    block=i/k;
+    index=(i%k)+1;
+  }
+};
+
+// The following base class can be used to easily add a squattable pointer
+// to a class (maybe you loose a bit of compactness though).
+// TODO : Shouldn't adding these bits be done automatically and transparently,
+//        based on the traits class info ?
+class Compact_container_base
+{
+  void * p;
+public:
+  Compact_container_base()
+  : p(NULL) {}
+  void *   for_compact_container() const { return p; }
+  void * & for_compact_container()       { return p; }
+};
+
+// The traits class describes the way to access the pointer.
+// It can be specialized.
+template < class T >
+struct Compact_container_traits {
+  static void *   pointer(const T &t) { return t.for_compact_container(); }
+  static void * & pointer(T &t)       { return t.for_compact_container(); }
+};
+
+namespace internal {
+  template < class DSC, bool Const >
+  class CC_iterator;
+
+  CGAL_GENERATE_MEMBER_DETECTOR(increment_erase_counter);
+
+  // A basic "no erase counter" strategy
+  template <bool Has_erase_counter_tag>
+  class Erase_counter_strategy {
+  public:
+    // Do nothing
+    template <typename Element>
+    static unsigned int erase_counter(const Element &) { return 0; }
+    template <typename Element>
+    static void set_erase_counter(Element &, unsigned int) {}
+    template <typename Element>
+    static void increment_erase_counter(Element &) {}
+  };
+
+
+  // A strategy managing an internal counter
+  template <>
+  class Erase_counter_strategy<true>
+  {
+  public:
+    template <typename Element>
+    static unsigned int erase_counter(const Element &e)
+    {
+      return e.erase_counter();
+    }
+
+    template <typename Element>
+    static void set_erase_counter(Element &e, unsigned int c)
+    {
+      e.set_erase_counter(c);
+    }
+
+    template <typename Element>
+    static void increment_erase_counter(Element &e)
+    {
+      e.increment_erase_counter();
+    }
+  };
+}
+
+template < class T,
+           class Allocator_ = Default,
+           class Increment_policy_ = Default,
+           class TimeStamper_ = Default >
+class Compact_container
+{
+  typedef Allocator_                                Al;
+  typedef typename Default::Get< Al, CGAL_ALLOCATOR(T) >::type Allocator;
+  typedef Increment_policy_                         Ip;
+  typedef typename Default::Get< Ip, 
+            Addition_size_policy<CGAL_INIT_COMPACT_CONTAINER_BLOCK_SIZE,
+                             CGAL_INCREMENT_COMPACT_CONTAINER_BLOCK_SIZE> 
+          >::type                                   Increment_policy;
+  typedef TimeStamper_                              Ts;
+  typedef Compact_container <T, Al, Ip, Ts>         Self;
+  typedef Compact_container_traits <T>              Traits;
+public:
+  typedef typename Default::Get< TimeStamper_,
+                                 CGAL::Time_stamper_impl<T> >::type
+                                                    Time_stamper_impl;
+
+  typedef T                                         value_type;
+  typedef Allocator                                 allocator_type;
+  typedef typename Allocator::reference             reference;
+  typedef typename Allocator::const_reference       const_reference;
+  typedef typename Allocator::pointer               pointer;
+  typedef typename Allocator::const_pointer         const_pointer;
+  typedef typename Allocator::size_type             size_type;
+  typedef typename Allocator::difference_type       difference_type;
+  typedef internal::CC_iterator<Self, false> iterator;
+  typedef internal::CC_iterator<Self, true>  const_iterator;
+  typedef std::reverse_iterator<iterator>           reverse_iterator;
+  typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
+
+  friend class internal::CC_iterator<Self, false>;
+  friend class internal::CC_iterator<Self, true>;
+
+  template<unsigned int first_block_size_, unsigned int block_size_increment>
+    friend struct Addition_size_policy;
+  template<unsigned int k> friend struct Constant_size_policy;
+
+  explicit Compact_container(const Allocator &a = Allocator())
+  : alloc(a)
+  , time_stamper(new Time_stamper_impl())
+  {
+    init ();
+  }
+
+  template < class InputIterator >
+  Compact_container(InputIterator first, InputIterator last,
+                    const Allocator & a = Allocator())
+  : alloc(a)
+  , time_stamper(new Time_stamper_impl())
+  {
+    init();
+    std::copy(first, last, CGAL::inserter(*this));
+  }
+
+  // The copy constructor and assignment operator preserve the iterator order
+  Compact_container(const Compact_container &c)
+  : alloc(c.get_allocator())
+  , time_stamper(new Time_stamper_impl())
+  {
+    init();
+    block_size = c.block_size;
+    *time_stamper = *c.time_stamper;
+    std::copy(c.begin(), c.end(), CGAL::inserter(*this));
+  }
+
+  Compact_container & operator=(const Compact_container &c)
+  {
+    if (&c != this) {
+      Self tmp(c);
+      swap(tmp);
+    }
+    return *this;
+  }
+
+  ~Compact_container()
+  {
+    clear();
+    delete time_stamper;
+  }
+
+  bool is_used(const_iterator ptr) const
+  {
+    return (type(&*ptr)==USED);
+  }
+
+  bool is_used(size_type i) const
+  {
+    typename Self::size_type block_number, index_in_block;
+    Increment_policy::template get_index_and_block<Self>(i,
+                                                         index_in_block,
+                                                         block_number);
+    return (type(&all_items[block_number].first[index_in_block])
+                 == USED);
+  }
+
+  const T& operator[] (size_type i) const
+  {
+    CGAL_assertion( is_used(i) );
+
+    typename Self::size_type block_number, index_in_block;
+    Increment_policy::template get_index_and_block<Self>(i,
+                                                         index_in_block,
+                                                         block_number);
+    return all_items[block_number].first[index_in_block];
+  }
+
+  T& operator[] (size_type i)
+  {
+    CGAL_assertion( is_used(i) );
+
+    typename Self::size_type block_number, index_in_block;
+    Increment_policy::template get_index_and_block<Self>(i,
+                                                         index_in_block,
+                                                         block_number);
+    return all_items[block_number].first[index_in_block];
+  }
+
+  void swap(Self &c)
+  {
+    std::swap(alloc, c.alloc);
+    std::swap(capacity_, c.capacity_);
+    std::swap(size_, c.size_);
+    std::swap(block_size, c.block_size);
+    std::swap(first_item, c.first_item);
+    std::swap(last_item, c.last_item);
+    std::swap(free_list, c.free_list);
+    all_items.swap(c.all_items);
+    std::swap(time_stamper, c.time_stamper);
+  }
+
+  iterator begin() { return iterator(first_item, 0, 0); }
+  iterator end()   { return iterator(last_item, 0); }
+
+  const_iterator begin() const { return const_iterator(first_item, 0, 0); }
+  const_iterator end()   const { return const_iterator(last_item, 0); }
+
+  reverse_iterator rbegin() { return reverse_iterator(end()); }
+  reverse_iterator rend()   { return reverse_iterator(begin()); }
+
+  const_reverse_iterator
+  rbegin() const { return const_reverse_iterator(end()); }
+  const_reverse_iterator
+  rend()   const { return const_reverse_iterator(begin()); }
+
+  // Boost.Intrusive interface
+  iterator iterator_to(reference value) const {
+    return iterator(&value, 0);
+  }
+  const_iterator iterator_to(const_reference value) const {
+    return const_iterator(&value, 0);
+  }
+  static iterator s_iterator_to(reference value) {
+    return iterator(&value, 0);
+  }
+  static const_iterator s_iterator_to(const_reference value) {
+    return const_iterator(&value, 0);
+  }
+
+  // Special insert methods that construct the objects in place
+  // (just forward the arguments to the constructor, to optimize a copy).
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template < typename... Args >
+  iterator
+  emplace(const Args&... args)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(args...);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+#else
+  // inserts a default constructed item.
+  iterator emplace()
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type();
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1 >
+  iterator
+  emplace(const T1 &t1)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3, t4);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4, typename T5 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3, t4, t5);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6, const T7 &t7)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7, typename T8 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+  iterator insert(const T &t)
+  {
+    if (free_list == NULL)
+      allocate_new_block();
+
+    pointer ret = free_list;
+    free_list = clean_pointee(ret);
+    alloc.construct(ret, t);
+    CGAL_assertion(type(ret) == USED);
+    ++size_;
+    time_stamper->set_time_stamp(ret);
+    return iterator(ret, 0);
+  }
+
+  template < class InputIterator >
+  void insert(InputIterator first, InputIterator last)
+  {
+    for (; first != last; ++first)
+      insert(*first);
+  }
+
+  template < class InputIterator >
+  void assign(InputIterator first, InputIterator last)
+  {
+    clear(); // erase(begin(), end()); // ?
+    insert(first, last);
+  }
+
+  void erase(iterator x)
+  {
+    typedef internal::Erase_counter_strategy<
+      internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
+
+    CGAL_precondition(type(&*x) == USED);
+    EraseCounterStrategy::increment_erase_counter(*x);
+    alloc.destroy(&*x);
+/*#ifndef CGAL_NO_ASSERTIONS
+    std::memset(&*x, 0, sizeof(T));
+#endif*/
+    put_on_free_list(&*x);
+    --size_;
+  }
+
+  void erase(iterator first, iterator last) {
+    while (first != last)
+      erase(first++);
+  }
+
+  void clear();
+
+  // Merge the content of d into *this.  d gets cleared.
+  // The complexity is O(size(free list = capacity-size)).
+  void merge(Self &d);
+
+  size_type size() const
+  {
+    CGAL_expensive_assertion(size_ ==
+                             (size_type) std::distance(begin(), end()));
+    return size_;
+  }
+
+  size_type max_size() const
+  {
+    return alloc.max_size();
+  }
+
+  size_type capacity() const
+  {
+    return capacity_;
+  }
+
+  // void resize(size_type sz, T c = T()); // TODO  makes sense ???
+
+  bool empty() const
+  {
+    return size_ == 0;
+  }
+
+  allocator_type get_allocator() const
+  {
+    return alloc;
+  }
+
+  // Returns whether the iterator "cit" is in the range [begin(), end()].
+  // Complexity : O(#blocks) = O(sqrt(capacity())).
+  // This function is mostly useful for purposes of efficient debugging at
+  // higher levels.
+  bool owns(const_iterator cit) const
+  {
+    // We use the block structure to provide an efficient version :
+    // we check if the address is in the range of each block,
+    // and then test whether it is valid (not a free element).
+
+    if (cit == end())
+      return true;
+
+    const_pointer c = &*cit;
+
+    for (typename All_items::const_iterator it = all_items.begin(), itend = all_items.end();
+         it != itend; ++it) {
+      const_pointer p = it->first;
+      size_type s = it->second;
+
+      // Are we in the address range of this block (excluding first and last
+      // elements) ?
+      if (c <= p || (p+s-1) <= c)
+        continue;
+
+      CGAL_assertion_msg( (c-p)+p == c, "wrong alignment of iterator");
+
+      return type(c) == USED;
+    }
+    return false;
+  }
+
+  bool owns_dereferencable(const_iterator cit) const
+  {
+    return cit != end() && owns(cit);
+  }
+
+  /** Reserve method to ensure that the capacity of the Compact_container be
+   * greater or equal than a given value n.
+   */
+  void reserve(size_type n)
+  {
+    if ( capacity_>=n ) return;
+
+    size_type lastblock = all_items.size();
+
+    while ( capacity_<n )
+    { // Pb because the order of free list is no more the order of
+      // allocate_new_block();
+      pointer new_block = alloc.allocate(block_size + 2);
+      all_items.push_back(std::make_pair(new_block, block_size + 2));
+      capacity_ += block_size;
+      // We insert this new block at the end.
+      if (last_item == NULL) // First time
+      {
+        first_item = new_block;
+        last_item  = new_block + block_size + 1;
+        set_type(first_item, NULL, START_END);
+      }
+      else
+      {
+        set_type(last_item, new_block, BLOCK_BOUNDARY);
+        set_type(new_block, last_item, BLOCK_BOUNDARY);
+        last_item = new_block + block_size + 1;
+      }
+      set_type(last_item, NULL, START_END);
+      // Increase the block_size for the next time.
+      Increment_policy::increase_size(*this);
+    }
+
+    // Now we put all the new elements on freelist, starting from the last block
+    // inserted and mark them free in reverse order, so that the insertion order
+    // will correspond to the iterator order...
+    // We don't touch the first and the last one.
+    size_type curblock=all_items.size();
+    do
+    {
+      --curblock; // We are sure we have at least create a new block
+      pointer new_block = all_items[curblock].first;
+      for (size_type i = all_items[curblock].second-2; i >= 1; --i)
+        put_on_free_list(new_block + i);
+    }
+    while ( curblock>lastblock );
+  }
+
+private:
+
+  void allocate_new_block();
+
+  void put_on_free_list(pointer x)
+  {
+    set_type(x, free_list, FREE);
+    free_list = x;
+  }
+
+  // Definition of the bit squatting :
+  // =================================
+  // ptr is composed of a pointer part and the last 2 bits.
+  // Here is the meaning of each of the 8 cases.
+  //
+  //                          value of the last 2 bits as "Type"
+  // pointer part     0              1                2              3
+  //         NULL     user elt       unused           free_list end  start/end
+  //      != NULL     user elt       block boundary   free elt       unused
+  //
+  // meaning of ptr : user stuff     next/prev block  free_list      unused
+
+  enum Type { USED = 0, BLOCK_BOUNDARY = 1, FREE = 2, START_END = 3 };
+
+  // The bit squatting is implemented by casting pointers to (char *), then
+  // subtracting to NULL, doing bit manipulations on the resulting integer,
+  // and converting back.
+
+  static char * clean_pointer(char * p)
+  {
+    return ((p - (char *) NULL) & ~ (std::ptrdiff_t) START_END) + (char *) NULL;
+  }
+
+  // Returns the pointee, cleaned up from the squatted bits.
+  static pointer clean_pointee(const_pointer ptr)
+  {
+    return (pointer) clean_pointer((char *) Traits::pointer(*ptr));
+  }
+
+  // Get the type of the pointee.
+  static Type type(const_pointer ptr)
+  {
+    char * p = (char *) Traits::pointer(*ptr);
+    return (Type) (p - clean_pointer(p));
+  }
+
+  // Sets the pointer part and the type of the pointee.
+  static void set_type(pointer ptr, void * p, Type t)
+  {
+    // This out of range compare is always true and causes lots of
+    // unnecessary warnings.
+    // CGAL_precondition(0 <= t && t < 4);
+    Traits::pointer(*ptr) = (void *) ((clean_pointer((char *) p)) + (int) t);
+  }
+
+  // We store a vector of pointers to all allocated blocks and their sizes.
+  // Knowing all pointers, we don't have to walk to the end of a block to reach
+  // the pointer to the next block.
+  // Knowing the sizes allows to deallocate() without having to compute the size
+  // by walking through the block till its end.
+  // This opens up the possibility for the compiler to optimize the clear()
+  // function considerably when has_trivial_destructor<T>.
+  typedef std::vector<std::pair<pointer, size_type> >  All_items;
+
+  void init()
+  {
+    block_size = Increment_policy::first_block_size;
+    capacity_  = 0;
+    size_      = 0;
+    free_list  = NULL;
+    first_item = NULL;
+    last_item  = NULL;
+    all_items  = All_items();
+    time_stamper->reset();
+  }
+
+  allocator_type   alloc;
+  size_type        capacity_;
+  size_type        size_;
+  size_type        block_size;
+  pointer          free_list;
+  pointer          first_item;
+  pointer          last_item;
+  All_items        all_items;
+
+  // This is a pointer, so that the definition of Compact_container does
+  // not require a complete type `T`.
+  Time_stamper_impl* time_stamper;
+};
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+void Compact_container<T, Allocator, Increment_policy, TimeStamper>::merge(Self &d)
+{
+  CGAL_precondition(&d != this);
+
+  // Allocators must be "compatible" :
+  CGAL_precondition(get_allocator() == d.get_allocator());
+
+  // Concatenate the free_lists.
+  if (free_list == NULL) {
+    free_list = d.free_list;
+  } else if (d.free_list != NULL) {
+    pointer p = free_list;
+    while (clean_pointee(p) != NULL)
+      p = clean_pointee(p);
+    set_type(p, d.free_list, FREE);
+  }
+  // Concatenate the blocks.
+  if (last_item == NULL) { // empty...
+    first_item = d.first_item;
+    last_item  = d.last_item;
+  } else if (d.last_item != NULL) {
+    set_type(last_item, d.first_item, BLOCK_BOUNDARY);
+    set_type(d.first_item, last_item, BLOCK_BOUNDARY);
+    last_item = d.last_item;
+  }
+  all_items.insert(all_items.end(), d.all_items.begin(), d.all_items.end());
+  // Add the sizes.
+  size_ += d.size_;
+  // Add the capacities.
+  capacity_ += d.capacity_;
+  // It seems reasonnable to take the max of the block sizes.
+  block_size = (std::max)(block_size, d.block_size);
+  // Clear d.
+  d.init();
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+void Compact_container<T, Allocator, Increment_policy, TimeStamper>::clear()
+{
+  for (typename All_items::iterator it = all_items.begin(), itend = all_items.end();
+       it != itend; ++it) {
+    pointer p = it->first;
+    size_type s = it->second;
+    for (pointer pp = p + 1; pp != p + s - 1; ++pp) {
+      if (type(pp) == USED)
+      {
+        alloc.destroy(pp);
+        set_type(pp, NULL, FREE);
+      }
+    }
+    alloc.deallocate(p, s);
+  }
+  init();
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+void Compact_container<T, Allocator, Increment_policy, TimeStamper>::allocate_new_block()
+{
+  typedef internal::Erase_counter_strategy<
+    internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
+
+  pointer new_block = alloc.allocate(block_size + 2);
+  all_items.push_back(std::make_pair(new_block, block_size + 2));
+  capacity_ += block_size;
+  // We don't touch the first and the last one.
+  // We mark them free in reverse order, so that the insertion order
+  // will correspond to the iterator order...
+  for (size_type i = block_size; i >= 1; --i)
+  {
+    EraseCounterStrategy::set_erase_counter(*(new_block + i), 0);
+    put_on_free_list(new_block + i);
+  }
+  // We insert this new block at the end.
+  if (last_item == NULL) // First time
+  {
+      first_item = new_block;
+      last_item  = new_block + block_size + 1;
+      set_type(first_item, NULL, START_END);
+  }
+  else
+  {
+      set_type(last_item, new_block, BLOCK_BOUNDARY);
+      set_type(new_block, last_item, BLOCK_BOUNDARY);
+      last_item = new_block + block_size + 1;
+  }
+  set_type(last_item, NULL, START_END);
+  // Increase the block_size for the next time.
+  Increment_policy::increase_size(*this);
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator==(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return lhs.size() == rhs.size() &&
+    std::equal(lhs.begin(), lhs.end(), rhs.begin());
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator!=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return ! (lhs == rhs);
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator< (const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return std::lexicographical_compare(lhs.begin(), lhs.end(),
+                                      rhs.begin(), rhs.end());
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator> (const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return rhs < lhs;
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator<=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return ! (lhs > rhs);
+}
+
+template < class T, class Allocator, class Increment_policy, class TimeStamper >
+inline
+bool operator>=(const Compact_container<T, Allocator, Increment_policy, TimeStamper> &lhs,
+                const Compact_container<T, Allocator, Increment_policy, TimeStamper> &rhs)
+{
+  return ! (lhs < rhs);
+}
+
+namespace internal {
+
+  template < class DSC, bool Const >
+  class CC_iterator
+  {
+    typedef typename DSC::iterator                    iterator;
+    typedef CC_iterator<DSC, Const>                   Self;
+  public:
+    typedef typename DSC::value_type                  value_type;
+    typedef typename DSC::size_type                   size_type;
+    typedef typename DSC::difference_type             difference_type;
+    typedef typename boost::mpl::if_c< Const, const value_type*,
+                                       value_type*>::type pointer;
+    typedef typename boost::mpl::if_c< Const, const value_type&,
+                                       value_type&>::type reference;
+    typedef std::bidirectional_iterator_tag           iterator_category;
+
+    // the initialization with NULL is required by our Handle concept.
+    CC_iterator()
+    {
+      m_ptr.p = NULL;
+    }
+
+    // Either a harmless copy-ctor,
+    // or a conversion from iterator to const_iterator.
+    CC_iterator (const iterator &it)
+    {
+      m_ptr.p = &(*it);
+    }
+
+    // Same for assignment operator (otherwise MipsPro warns)
+    CC_iterator & operator= (const iterator &it)
+    {
+      m_ptr.p = &(*it);
+      return *this;
+    }
+
+    // Construction from NULL
+    CC_iterator (Nullptr_t CGAL_assertion_code(n))
+    {
+      CGAL_assertion (n == NULL);
+      m_ptr.p = NULL;
+    }
+
+  private:
+
+    typedef typename DSC::Time_stamper_impl           Time_stamper_impl;
+
+    union {
+      pointer      p;
+      void        *vp;
+    } m_ptr;
+
+    // Only Compact_container should access these constructors.
+    friend class Compact_container<value_type,
+                                   typename DSC::Al,
+                                   typename DSC::Ip,
+                                   typename DSC::Ts>;
+
+
+    // For begin()
+    CC_iterator(pointer ptr, int, int)
+    {
+      m_ptr.p = ptr;
+      if (m_ptr.p == NULL) // empty container.
+        return;
+
+      ++(m_ptr.p); // if not empty, p = start
+      if (DSC::type(m_ptr.p) == DSC::FREE)
+        increment();
+    }
+
+    // Construction from raw pointer and for end().
+    CC_iterator(pointer ptr, int)
+    {
+      m_ptr.p = ptr;
+    }
+
+    // NB : in case empty container, begin == end == NULL.
+    void increment()
+    {
+      // It's either pointing to end(), or valid.
+      CGAL_assertion_msg(m_ptr.p != NULL,
+         "Incrementing a singular iterator or an empty container iterator ?");
+      CGAL_assertion_msg(DSC::type(m_ptr.p) != DSC::START_END,
+         "Incrementing end() ?");
+
+      // If it's not end(), then it's valid, we can do ++.
+      do {
+        ++(m_ptr.p);
+        if (DSC::type(m_ptr.p) == DSC::USED ||
+            DSC::type(m_ptr.p) == DSC::START_END)
+          return;
+
+        if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY)
+          m_ptr.p = DSC::clean_pointee(m_ptr.p);
+      } while (true);
+    }
+
+    void decrement()
+    {
+      // It's either pointing to end(), or valid.
+      CGAL_assertion_msg(m_ptr.p != NULL,
+         "Decrementing a singular iterator or an empty container iterator ?");
+      CGAL_assertion_msg(DSC::type(m_ptr.p - 1) != DSC::START_END,
+         "Decrementing begin() ?");
+
+      // If it's not begin(), then it's valid, we can do --.
+      do {
+        --m_ptr.p;
+        if (DSC::type(m_ptr.p) == DSC::USED ||
+            DSC::type(m_ptr.p) == DSC::START_END)
+          return;
+
+        if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY)
+          m_ptr.p = DSC::clean_pointee(m_ptr.p);
+      } while (true);
+    }
+
+  public:
+
+    Self & operator++()
+    {
+      CGAL_assertion_msg(m_ptr.p != NULL,
+         "Incrementing a singular iterator or an empty container iterator ?");
+      /* CGAL_assertion_msg(DSC::type(m_ptr.p) == DSC::USED,
+         "Incrementing an invalid iterator."); */
+      increment();
+      return *this;
+    }
+
+    Self & operator--()
+    {
+      CGAL_assertion_msg(m_ptr.p != NULL,
+         "Decrementing a singular iterator or an empty container iterator ?");
+      /*CGAL_assertion_msg(DSC::type(m_ptr.p) == DSC::USED
+                      || DSC::type(m_ptr.p) == DSC::START_END,
+                      "Decrementing an invalid iterator.");*/
+      decrement();
+      return *this;
+    }
+
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+
+    reference operator*() const { return *(m_ptr.p); }
+
+    pointer   operator->() const { return (m_ptr.p); }
+
+    // For std::less...
+    bool operator<(const CC_iterator& other) const
+    {
+      return Time_stamper_impl::less(m_ptr.p, other.m_ptr.p);
+    }
+
+    bool operator>(const CC_iterator& other) const
+    {
+      return Time_stamper_impl::less(other.m_ptr.p, m_ptr.p);
+    }
+
+    bool operator<=(const CC_iterator& other) const
+    {
+      return Time_stamper_impl::less(m_ptr.p, other.m_ptr.p)
+          || (*this == other);
+    }
+
+    bool operator>=(const CC_iterator& other) const
+    {
+      return Time_stamper_impl::less(other.m_ptr.p, m_ptr.p)
+          || (*this == other);
+    }
+
+    // Can itself be used for bit-squatting.
+    void *   for_compact_container() const { return (m_ptr.vp); }
+    void * & for_compact_container()       { return (m_ptr.vp); }
+  };
+
+  template < class DSC, bool Const1, bool Const2 >
+  inline
+  bool operator==(const CC_iterator<DSC, Const1> &rhs,
+                  const CC_iterator<DSC, Const2> &lhs)
+  {
+    return rhs.operator->() == lhs.operator->();
+  }
+
+  template < class DSC, bool Const1, bool Const2 >
+  inline
+  bool operator!=(const CC_iterator<DSC, Const1> &rhs,
+                  const CC_iterator<DSC, Const2> &lhs)
+  {
+    return rhs.operator->() != lhs.operator->();
+  }
+
+  // Comparisons with NULL are part of CGAL's Handle concept...
+  template < class DSC, bool Const >
+  inline
+  bool operator==(const CC_iterator<DSC, Const> &rhs,
+                  Nullptr_t CGAL_assertion_code(n))
+  {
+    CGAL_assertion( n == NULL);
+    return rhs.operator->() == NULL;
+  }
+
+  template < class DSC, bool Const >
+  inline
+  bool operator!=(const CC_iterator<DSC, Const> &rhs,
+                  Nullptr_t CGAL_assertion_code(n))
+  {
+    CGAL_assertion( n == NULL);
+    return rhs.operator->() != NULL;
+  }
+
+  template <class DSC, bool Const>
+  std::size_t hash_value(const CC_iterator<DSC, Const>&  i)
+  {
+    return reinterpret_cast<std::size_t>(&*i) / sizeof(typename DSC::value_type);
+  }
+
+} // namespace internal
+
+} //namespace CGAL
+
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+  
+  template < class DSC, bool Const >
+  struct hash<CGAL::internal::CC_iterator<DSC, Const> >
+    : public std::unary_function<CGAL::internal::CC_iterator<DSC, Const>, std::size_t> {
+
+    std::size_t operator()(const CGAL::internal::CC_iterator<DSC, Const>& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(typename DSC::value_type);
+    }
+  };
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+#endif // CGAL_COMPACT_CONTAINER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Compact_mesh_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Compact_mesh_cell_base_3.h
new file mode 100644
index 0000000..65ed83c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Compact_mesh_cell_base_3.h
@@ -0,0 +1,713 @@
+// Copyright (c) 2006-2007  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008,2011 GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h $
+// $Id: Compact_mesh_cell_base_3.h 70288 2012-07-05 10:09:48Z jtournoi $
+//
+//
+// Author(s)     : Laurent Rineau, Stephane Tayeb, Andreas Fabri
+
+
+#ifndef CGAL_COMPACT_MESH_CELL_BASE_3_H
+#define CGAL_COMPACT_MESH_CELL_BASE_3_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/basic.h>
+#include <CGAL/array.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/internal/Dummy_tds_3.h>
+#include <CGAL/tags.h>
+#include <CGAL/Has_timestamp.h>
+
+#include <CGAL/Regular_triangulation_cell_base_3.h>
+#include <CGAL/Mesh_3/io_signature.h>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/atomic.h>
+#endif
+
+namespace CGAL {
+
+// Class Compact_mesh_cell_base_3_base
+// Base for Compact_mesh_cell_base_3, with specializations
+// for different values of Concurrency_tag
+// Sequential
+template <typename GT, typename Concurrency_tag>
+class Compact_mesh_cell_base_3_base
+{
+  typedef typename GT::Point_3 Point;
+
+protected:
+  Compact_mesh_cell_base_3_base()
+    : bits_(0)
+    , circumcenter_(NULL)
+  {}
+
+public:
+#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
+ || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
+
+  // Erase counter (cf. Compact_container)
+  unsigned int erase_counter() const
+  {
+    return this->m_erase_counter;
+  }
+  void set_erase_counter(unsigned int c)
+  {
+    this->m_erase_counter = c;
+  }
+  void increment_erase_counter()
+  {
+    ++this->m_erase_counter;
+  }
+#endif
+
+  /// Marks \c facet as visited
+  void set_facet_visited (const int facet)
+  {
+    CGAL_precondition(facet>=0 && facet <4);
+    bits_ |= (1 << facet);
+  }
+
+  /// Marks \c facet as not visited
+  void reset_visited (const int facet)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    bits_ &= (15 & ~(1 << facet));
+  }
+
+  /// Returns \c true if \c facet is marked as visited
+  bool is_facet_visited (const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return ( (bits_ & (1 << facet)) != 0 );
+  }
+
+  /// Precondition circumcenter_ == NULL
+  void try_to_set_circumcenter(Point *cc) const
+  {
+    CGAL_precondition(circumcenter_ == NULL);
+    circumcenter_ = cc;
+  }
+
+private:
+  char bits_;
+
+#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
+ || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
+
+  typedef unsigned int              Erase_counter_type;
+  Erase_counter_type                m_erase_counter;
+#endif
+
+protected:
+  mutable Point * circumcenter_;
+};
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Class Compact_mesh_cell_base_3_base
+// Specialization for parallel
+template <typename GT>
+class Compact_mesh_cell_base_3_base<GT, Parallel_tag>
+{
+  typedef typename GT::Point_3 Point;
+
+protected:
+  Compact_mesh_cell_base_3_base()
+  {
+    bits_ = 0;
+    circumcenter_ = NULL;
+  }
+
+public:
+  // Erase counter (cf. Compact_container)
+  unsigned int erase_counter() const
+  {
+    return this->m_erase_counter;
+  }
+  void set_erase_counter(unsigned int c)
+  {
+    this->m_erase_counter = c;
+  }
+  void increment_erase_counter()
+  {
+    ++this->m_erase_counter;
+  }
+
+  /// Marks \c facet as visited
+  void set_facet_visited (const int facet)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    char current_bits = bits_;
+    while (bits_.compare_and_swap(current_bits | (1 << facet), current_bits) != current_bits)
+    {
+      current_bits = bits_;
+    }
+  }
+
+  /// Marks \c facet as not visited
+  void reset_visited (const int facet)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    char current_bits = bits_;
+    while (bits_.compare_and_swap(current_bits & (15 & ~(1 << facet)), current_bits) != current_bits)
+    {
+      current_bits = bits_;
+    }
+  }
+
+  /// Returns \c true if \c facet is marked as visited
+  bool is_facet_visited (const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return ( (bits_ & (1 << facet)) != 0 );
+  }
+
+  /// If the circumcenter is already set (circumcenter_ != NULL),
+  /// this function "deletes" cc
+  void try_to_set_circumcenter(Point *cc) const
+  {
+    if (circumcenter_.compare_and_swap(cc, NULL) != NULL)
+      delete cc;
+  }
+
+private:
+  typedef tbb::atomic<unsigned int> Erase_counter_type;
+  Erase_counter_type                m_erase_counter;
+  /// Stores visited facets (4 first bits)
+  tbb::atomic<char> bits_;
+
+protected:
+  mutable tbb::atomic<Point*> circumcenter_;
+};
+
+#endif // CGAL_LINKED_WITH_TBB
+
+
+// Class Compact_mesh_cell_base_3
+// Cell base class used in 3D meshing process.
+// Adds information to Cb about the cell of the input complex containing it
+template< class GT,
+          class MD,
+          class TDS = void >
+class Compact_mesh_cell_base_3
+  : public Compact_mesh_cell_base_3_base<GT, typename TDS::Concurrency_tag>
+{
+  typedef typename GT::FT FT;
+  typedef Compact_mesh_cell_base_3_base<GT,typename TDS::Concurrency_tag> Base;
+  using Base::circumcenter_;
+
+public:
+  typedef TDS                          Triangulation_data_structure;
+  typedef typename TDS::Vertex_handle  Vertex_handle;
+  typedef typename TDS::Cell_handle    Cell_handle;
+  typedef typename TDS::Vertex         Vertex;
+  typedef typename TDS::Cell           Cell;
+  typedef typename TDS::Cell_data      TDS_data;
+
+
+  template <typename TDS2>
+  struct Rebind_TDS {
+    typedef Compact_mesh_cell_base_3<GT, MD, TDS2> Other;
+  };
+
+
+  // Index Type
+  typedef typename MD::Subdomain_index      Subdomain_index;
+  typedef typename MD::Surface_patch_index  Surface_patch_index;
+  typedef typename MD::Index                Index;
+
+  typedef GT                   Geom_traits;
+  typedef typename GT::Point_3 Point;
+
+  typedef Point*           Point_container;
+  typedef Point*           Point_iterator;
+  typedef const Point*     Point_const_iterator;
+
+public:
+  void invalidate_circumcenter() const
+  {
+    if (circumcenter_) {
+      delete circumcenter_;
+      circumcenter_ = NULL;
+    }
+  }
+
+public:
+  // Constructors
+  Compact_mesh_cell_base_3()
+    : surface_index_table_()
+    , surface_center_table_()
+#ifdef CGAL_INTRUSIVE_LIST
+    , next_intrusive_()
+    , previous_intrusive_()
+#endif
+    , time_stamp_(-1)
+    , surface_center_index_table_()
+    , sliver_value_(FT(0.))
+    , subdomain_index_()  
+    , sliver_cache_validity_(false)
+  {}
+
+  Compact_mesh_cell_base_3(const Compact_mesh_cell_base_3& rhs)
+    : N(rhs.N)
+    , V(rhs.V)
+#ifdef CGAL_INTRUSIVE_LIST
+    , next_intrusive_(rhs.next_intrusive_)
+    , previous_intrusive_(rhs.previous_intrusive_)
+#endif
+    , time_stamp_(rhs.time_stamp_)
+    , sliver_value_(rhs.sliver_value_)
+    , subdomain_index_(rhs.subdomain_index_)
+    , sliver_cache_validity_(false)
+  {
+    for(int i=0; i <4; i++){
+      surface_index_table_[i] = rhs.surface_index_table_[i];
+      surface_center_table_[i]= rhs.surface_center_table_[i];
+      surface_center_index_table_[i] = rhs.surface_center_index_table_[i];
+    }
+  }
+
+  Compact_mesh_cell_base_3 (Vertex_handle v0,
+                            Vertex_handle v1,
+                            Vertex_handle v2,
+                            Vertex_handle v3)
+    : surface_index_table_()
+    , surface_center_table_()
+    , V(CGAL::make_array(v0, v1, v2, v3))
+#ifdef CGAL_INTRUSIVE_LIST
+    , next_intrusive_()
+    , previous_intrusive_()
+#endif
+    , time_stamp_(-1)
+    , surface_center_index_table_()
+    , sliver_value_(FT(0.))
+    , subdomain_index_()
+    , sliver_cache_validity_(false)
+  {
+  }
+
+
+  Compact_mesh_cell_base_3 (Vertex_handle v0,
+                            Vertex_handle v1,
+                            Vertex_handle v2,
+                            Vertex_handle v3,
+                            Cell_handle n0,
+                            Cell_handle n1,
+                            Cell_handle n2,
+                            Cell_handle n3)
+    : surface_index_table_()
+    , surface_center_table_()
+    , N(CGAL::make_array(n0, n1, n2, n3))
+    , V(CGAL::make_array(v0, v1, v2, v3))
+#ifdef CGAL_INTRUSIVE_LIST
+    , next_intrusive_()
+    , previous_intrusive_()
+#endif
+    , time_stamp_(-1)
+    , surface_center_index_table_()
+    , sliver_value_(FT(0.))
+    , subdomain_index_()
+    , sliver_cache_validity_(false)
+  {
+  }
+
+  ~Compact_mesh_cell_base_3()
+  {
+    if(circumcenter_ != NULL){
+      delete circumcenter_;
+    }
+  }
+
+  // ACCESS FUNCTIONS
+
+  Vertex_handle vertex(int i) const
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3 );
+    return V[i];
+  }
+
+  bool has_vertex(Vertex_handle v) const
+  {
+    return (V[0] == v) || (V[1] == v) || (V[2]== v) || (V[3]== v);
+  }
+
+  bool has_vertex(Vertex_handle v, int & i) const
+  {
+    if (v == V[0]) { i = 0; return true; }
+    if (v == V[1]) { i = 1; return true; }
+    if (v == V[2]) { i = 2; return true; }
+    if (v == V[3]) { i = 3; return true; }
+    return false;
+  }
+
+  int index(Vertex_handle v) const
+  {
+    if (v == V[0]) { return 0; }
+    if (v == V[1]) { return 1; }
+    if (v == V[2]) { return 2; }
+    CGAL_triangulation_assertion( v == V[3] );
+    return 3;
+  }
+
+  Cell_handle neighbor(int i) const
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    return N[i];
+  }
+
+  bool has_neighbor(Cell_handle n) const
+  {
+    return (N[0] == n) || (N[1] == n) || (N[2] == n) || (N[3] == n);
+  }
+
+  bool has_neighbor(Cell_handle n, int & i) const
+  {
+    if(n == N[0]){ i = 0; return true; }
+    if(n == N[1]){ i = 1; return true; }
+    if(n == N[2]){ i = 2; return true; }
+    if(n == N[3]){ i = 3; return true; }
+    return false;
+  }
+
+  int index(Cell_handle n) const
+  {
+    if (n == N[0]) return 0;
+    if (n == N[1]) return 1;
+    if (n == N[2]) return 2;
+    CGAL_triangulation_assertion( n == N[3] );
+    return 3;
+  }
+
+  // SETTING
+
+
+  void set_neighbor(int i, Cell_handle n)
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    CGAL_triangulation_precondition( this != &*n );
+    N[i] = n;
+  }
+
+
+  void set_neighbors()
+  {
+    N[0] = N[1] = N[2] = N[3] = Cell_handle();
+  }
+
+  void set_neighbors(Cell_handle n0, Cell_handle n1,
+                     Cell_handle n2, Cell_handle n3)
+  {
+    CGAL_triangulation_precondition( this != &*n0 );
+    CGAL_triangulation_precondition( this != &*n1 );
+    CGAL_triangulation_precondition( this != &*n2 );
+    CGAL_triangulation_precondition( this != &*n3 );
+    N[0] = n0;
+    N[1] = n1;
+    N[2] = n2;
+    N[3] = n3;
+  }
+
+  // CHECKING
+
+  // the following trivial is_valid allows
+  // the user of derived cell base classes
+  // to add their own purpose checking
+  bool is_valid(bool = false, int = 0) const
+  { return true; }
+
+  // For use by Compact_container.
+  void * for_compact_container() const { return N[0].for_compact_container(); }
+  void * & for_compact_container()     { return N[0].for_compact_container(); }
+
+  // TDS internal data access functions.
+        TDS_data& tds_data()       { return _tds_data; }
+  const TDS_data& tds_data() const { return _tds_data; }
+
+
+  Point_iterator hidden_points_begin() const { return hidden_points_end(); }
+  Point_iterator hidden_points_end() const { return NULL; }
+  void hide_point (const Point &) const { }
+
+
+  // We must override the functions that modify the vertices.
+  // And if the point inside a vertex is modified, we fail,
+  // but there's not much we can do for this now.
+  void set_vertex(int i, Vertex_handle v)
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    invalidate_circumcenter();
+    V[i] = v;
+  }
+
+  void set_vertices()
+  {
+    invalidate_circumcenter();
+    V[0] = V[1] = V[2] = V[3] = Vertex_handle();
+  }
+
+  void set_vertices(Vertex_handle v0, Vertex_handle v1,
+                    Vertex_handle v2, Vertex_handle v3)
+  {
+    invalidate_circumcenter();
+    V[0] = v0;
+    V[1] = v1;
+    V[2] = v2;
+    V[3] = v3;
+  }
+
+  const Point &
+  weighted_circumcenter(const Geom_traits& gt = Geom_traits()) const
+  {
+    if (circumcenter_ == NULL) {
+      this->try_to_set_circumcenter(
+        new Point(gt.construct_weighted_circumcenter_3_object()
+                  (this->vertex(0)->point(),
+                   this->vertex(1)->point(),
+                   this->vertex(2)->point(),
+                   this->vertex(3)->point())));
+    } else {
+      CGAL_expensive_assertion(gt.construct_weighted_circumcenter_3_object()
+                                (this->vertex(0)->point(),
+                                 this->vertex(1)->point(),
+                                 this->vertex(2)->point(),
+                                 this->vertex(3)->point()) == *circumcenter_);
+    }
+    return *circumcenter_;
+  }
+
+
+  // Returns the index of the cell of the input complex that contains the cell
+  Subdomain_index subdomain_index() const { return subdomain_index_; }
+
+  // Sets the index of the cell of the input complex that contains the cell
+  void set_subdomain_index(const Subdomain_index& index)
+  { subdomain_index_ = index; }
+
+  void set_sliver_value(const FT& value)
+  {
+    sliver_cache_validity_ = true;
+    sliver_value_ = value;
+  }
+
+  const FT& sliver_value() const
+  {
+    CGAL_assertion(is_cache_valid());
+    return sliver_value_;
+  }
+
+  bool is_cache_valid() const { return sliver_cache_validity_; }
+  void reset_cache_validity() const { sliver_cache_validity_ = false;  }
+
+  /// Set surface index of \c facet to \c index
+  void set_surface_patch_index(const int facet, const Surface_patch_index& index)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    surface_index_table_[facet] = index;
+  }
+
+  /// Returns surface index of facet \c facet
+  Surface_patch_index surface_patch_index(const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return surface_index_table_[facet];
+  }
+
+  /// Sets surface center of \c facet to \c point
+  void set_facet_surface_center(const int facet, const Point& point)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    surface_center_table_[facet] = point;
+  }
+
+  /// Returns surface center of \c facet
+  Point get_facet_surface_center(const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return surface_center_table_[facet];
+  }
+
+  /// Sets surface center index of \c facet to \c index
+  void set_facet_surface_center_index(const int facet, const Index& index)
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    surface_center_index_table_[facet] = index;
+  }
+
+  /// Returns surface center of \c facet
+  Index get_facet_surface_center_index(const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return surface_center_index_table_[facet];
+  }
+
+  /// Returns true if facet lies on a surface patch
+  bool is_facet_on_surface(const int facet) const
+  {
+    CGAL_precondition(facet>=0 && facet<4);
+    return ( !( Surface_patch_index() == surface_index_table_[facet] ));
+  }
+
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+
+  void set_surface_index(const int facet, const Surface_index& index)
+  { set_surface_patch_index(facet,index); }
+
+  /// Returns surface index of facet \c facet
+  Surface_index surface_index(const int facet) const
+  { return surface_patch_index(facet); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+  static
+  std::string io_signature()
+  {
+    return
+      Get_io_signature<Subdomain_index>()() + "+" +
+      Get_io_signature<Regular_triangulation_cell_base_3<Geom_traits> >()()
+      + "+(" + Get_io_signature<Surface_patch_index>()() + ")[4]";
+  }
+
+#ifdef CGAL_INTRUSIVE_LIST
+public:
+  Cell_handle next_intrusive() const { return next_intrusive_; }
+  void set_next_intrusive(Cell_handle c)
+  { 
+    next_intrusive_ = c; 
+  }
+
+  Cell_handle previous_intrusive() const { return previous_intrusive_; }
+  void set_previous_intrusive(Cell_handle c)
+  { 
+    previous_intrusive_ = c; 
+  }
+#endif // CGAL_INTRUSIVE_LIST
+
+  /// For the determinism of Compact_container iterators
+  ///@{
+  typedef Tag_true Has_timestamp;
+
+  std::size_t time_stamp() const {
+    return time_stamp_;
+  }
+  void set_time_stamp(const std::size_t& ts) {
+    time_stamp_ = ts;
+  }
+  ///@}
+
+private:
+
+
+  /// Stores surface_index for each facet of the cell
+  CGAL::cpp11::array<Surface_patch_index, 4> surface_index_table_;
+  /// Stores surface center of each facet of the cell
+  CGAL::cpp11::array<Point, 4> surface_center_table_;
+  /// Stores surface center index of each facet of the cell
+
+  CGAL::cpp11::array<Cell_handle, 4> N;
+  CGAL::cpp11::array<Vertex_handle, 4> V;
+
+#ifdef CGAL_INTRUSIVE_LIST
+  Cell_handle next_intrusive_, previous_intrusive_;
+#endif
+  std::size_t time_stamp_;
+
+  CGAL::cpp11::array<Index, 4> surface_center_index_table_;
+  /// Stores visited facets (4 first bits)
+
+  //  Point_container _hidden;
+
+  FT sliver_value_;
+
+  // The index of the cell of the input complex that contains me
+  Subdomain_index subdomain_index_;
+
+  TDS_data      _tds_data;
+  mutable bool sliver_cache_validity_;
+
+
+};  // end class Compact_mesh_cell_base_3
+
+template < class GT, class MT, class Cb >
+std::istream&
+operator>>(std::istream &is,
+           Compact_mesh_cell_base_3<GT, MT, Cb> &c)
+{
+  typename Compact_mesh_cell_base_3<GT, MT, Cb>::Subdomain_index index;
+  if(is_ascii(is))
+    is >> index;
+  else
+    read(is, index);
+  if(is) {
+    c.set_subdomain_index(index);
+    for(int i = 0; i < 4; ++i)
+    {
+      typename Compact_mesh_cell_base_3<GT, MT, Cb>::Surface_patch_index i2;
+      if(is_ascii(is))
+        is >> i2;
+      else
+      {
+        read(is, i2);
+      }
+      c.set_surface_patch_index(i, i2);
+    }
+  }
+  return is;
+}
+
+template < class GT, class MT, class Cb >
+std::ostream&
+operator<<(std::ostream &os,
+           const Compact_mesh_cell_base_3<GT, MT, Cb> &c)
+{
+  if(is_ascii(os))
+     os << c.subdomain_index();
+  else
+    write(os, c.subdomain_index());
+  for(int i = 0; i < 4; ++i)
+  {
+    if(is_ascii(os))
+      os << ' ' << c.surface_patch_index(i);
+    else
+      write(os, c.surface_patch_index(i));
+  }
+  return os;
+}
+
+
+// Specialization for void.
+template <typename GT, typename MD>
+class Compact_mesh_cell_base_3<GT, MD, void>
+{
+public:
+  typedef internal::Dummy_tds_3                         Triangulation_data_structure;
+  typedef Triangulation_data_structure::Vertex_handle   Vertex_handle;
+  typedef Triangulation_data_structure::Cell_handle     Cell_handle;
+  template <typename TDS2>
+  struct Rebind_TDS { typedef Compact_mesh_cell_base_3<GT, MD, TDS2> Other; };
+};
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_COMPACT_MESH_CELL_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Complexity_tags.h b/3rdparty/CGAL-4.8/include/CGAL/Complexity_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Complexity_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Complexity_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Compute_anchor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Compute_anchor_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Compute_anchor_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Compute_anchor_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Concatenate_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Concatenate_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Concatenate_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Concatenate_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Concurrent_compact_container.h b/3rdparty/CGAL-4.8/include/CGAL/Concurrent_compact_container.h
new file mode 100644
index 0000000..6f85eb0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Concurrent_compact_container.h
@@ -0,0 +1,1061 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL:  $
+// $Id:  $
+//
+// Author(s)     : Clement Jamin
+
+#ifdef CGAL_LINKED_WITH_TBB
+
+#ifndef CGAL_CONCURRENT_COMPACT_CONTAINER_H
+#define CGAL_CONCURRENT_COMPACT_CONTAINER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Default.h>
+
+#include <iterator>
+#include <algorithm>
+#include <vector>
+#include <cstring>
+
+#include <CGAL/memory.h>
+#include <CGAL/iterator.h>
+#include <CGAL/CC_safe_handle.h>
+
+#include <tbb/tbb.h>
+
+#include <boost/mpl/if.hpp>
+
+namespace CGAL {
+
+#define CGAL_GENERATE_MEMBER_DETECTOR(X)                                           \
+template<typename T> class has_##X {                                          \
+    struct Fallback { int X; };                                               \
+    struct Derived : T, Fallback { };                                         \
+                                                                              \
+    template<typename U, U> struct Check;                                     \
+                                                                              \
+    typedef char ArrayOfOne[1];                                               \
+    typedef char ArrayOfTwo[2];                                               \
+                                                                              \
+    template<typename U> static ArrayOfOne & func(                            \
+                                            Check<int Fallback::*, &U::X> *); \
+    template<typename U> static ArrayOfTwo & func(...);                       \
+  public:                                                                     \
+    typedef has_##X type;                                                     \
+    enum { value = sizeof(func<Derived>(0)) == 2 };                           \
+} // semicolon is after the macro call
+
+#define CGAL_INIT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE 14
+#define CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE 16
+
+// The traits class describes the way to access the pointer.
+// It can be specialized.
+template < class T >
+struct Concurrent_compact_container_traits {
+  static void *   pointer(const T &t) { return t.for_compact_container(); }
+  static void * & pointer(T &t)       { return t.for_compact_container(); }
+};
+
+namespace CCC_internal {
+  template < class CCC, bool Const >
+  class CCC_iterator;
+  
+  CGAL_GENERATE_MEMBER_DETECTOR(increment_erase_counter);
+  
+  // A basic "no erase counter" strategy
+  template <bool Has_erase_counter_tag>
+  class Erase_counter_strategy {
+  public:
+    // Do nothing
+    template <typename Element>
+    static unsigned int erase_counter(const Element &) { return 0; }
+    template <typename Element>
+    static void set_erase_counter(Element &, unsigned int) {}
+    template <typename Element>
+    static void increment_erase_counter(Element &) {}
+  };
+
+
+  // A strategy managing an internal counter
+  template <>
+  class Erase_counter_strategy<true>
+  {
+  public:
+    template <typename Element>
+    static unsigned int erase_counter(const Element &e)
+    {
+      return e.erase_counter();
+    }
+
+    template <typename Element>
+    static void set_erase_counter(Element &e, unsigned int c)
+    {
+      e.set_erase_counter(c);
+    }
+
+    template <typename Element>
+    static void increment_erase_counter(Element &e)
+    {
+      e.increment_erase_counter();
+    }
+  };
+}
+
+// Free list (head and size)
+template< typename pointer, typename size_type, typename CCC >
+class Free_list {
+public:
+  Free_list() : m_head(NULL), m_size(0) {}
+
+  void init()                { m_head = NULL; m_size = 0; }
+  pointer head() const       { return m_head; }
+  void set_head(pointer p)   { m_head = p; }
+  size_type size() const     { return m_size; }
+  void set_size(size_type s) { m_size = s; }
+  void inc_size()            { ++m_size; }
+  void dec_size()            { --m_size; }
+  bool empty()               { return size() == 0; }
+  // Warning: copy the pointer, not the data!
+  Free_list& operator= (const Free_list& other)
+  {
+    m_head = other.m_head;
+    m_size = other.m_size;
+    return *this;
+  }
+
+  void merge(Free_list &other)
+  {
+    if (m_head == NULL) {
+      *this = other;
+    }
+    else if (!other.empty())
+    {
+      pointer p = m_head;
+      while (CCC::clean_pointee(p) != NULL)
+        p = CCC::clean_pointee(p);
+      CCC::set_type(p, other.m_head, CCC::FREE);
+      m_size += other.m_size;
+    }
+    other.init(); // clear other
+  }
+
+protected:
+  pointer   m_head;  // the free list head pointer
+  size_type m_size;  // the free list size
+};
+
+// Class Concurrent_compact_container
+//
+// Safe concurrent "insert" and "erase".
+// Do not parse the container while others are modifying it.
+//
+template < class T, class Allocator_ = Default >
+class Concurrent_compact_container
+{
+  typedef Allocator_                                                Al;
+  typedef typename Default::Get<Al, CGAL_ALLOCATOR(T) >::type       Allocator;
+  typedef Concurrent_compact_container <T, Al>                      Self;
+  typedef Concurrent_compact_container_traits <T>                   Traits;
+
+public:
+  typedef T                                         value_type;
+  typedef Allocator                                 allocator_type;
+  typedef typename Allocator::reference             reference;
+  typedef typename Allocator::const_reference       const_reference;
+  typedef typename Allocator::pointer               pointer;
+  typedef typename Allocator::const_pointer         const_pointer;
+  typedef typename Allocator::size_type             size_type;
+  typedef typename Allocator::difference_type       difference_type;
+  typedef CCC_internal::CCC_iterator<Self, false>   iterator;
+  typedef CCC_internal::CCC_iterator<Self, true>    const_iterator;
+  typedef std::reverse_iterator<iterator>           reverse_iterator;
+  typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
+
+private:
+  typedef Free_list<pointer, size_type, Self>       FreeList;
+  typedef tbb::enumerable_thread_specific<FreeList> Free_lists;
+
+  // FreeList can access our private function (clean_pointee...)
+  friend class Free_list<pointer, size_type, Self>;
+
+public:
+  friend class CCC_internal::CCC_iterator<Self, false>;
+  friend class CCC_internal::CCC_iterator<Self, true>;
+
+  explicit Concurrent_compact_container(const Allocator &a = Allocator())
+  : m_alloc(a)
+  {
+    init ();
+  }
+
+  template < class InputIterator >
+  Concurrent_compact_container(InputIterator first, InputIterator last,
+                    const Allocator & a = Allocator())
+  : m_alloc(a)
+  {
+    init();
+    std::copy(first, last, CGAL::inserter(*this));
+  }
+
+  // The copy constructor and assignment operator preserve the iterator order
+  Concurrent_compact_container(const Concurrent_compact_container &c)
+  : m_alloc(c.get_allocator())
+  {
+    init();
+    m_block_size = c.m_block_size;
+    std::copy(c.begin(), c.end(), CGAL::inserter(*this));
+  }
+
+  Concurrent_compact_container & operator=(const Concurrent_compact_container &c)
+  {
+    if (&c != this) {
+      Self tmp(c);
+      swap(tmp);
+    }
+    return *this;
+  }
+
+  ~Concurrent_compact_container()
+  {
+    clear();
+  }
+
+  bool is_used(const_iterator ptr) const
+  {
+    return (type(&*ptr)==USED);
+  }
+
+  void swap(Self &c)
+  {
+    std::swap(m_alloc, c.m_alloc);
+    std::swap(m_capacity, c.m_capacity);
+    std::swap(m_block_size, c.m_block_size);
+    std::swap(m_first_item, c.m_first_item);
+    std::swap(m_last_item, c.m_last_item);
+    std::swap(m_free_lists, c.m_free_lists);
+    m_all_items.swap(c.m_all_items);
+  }
+
+  iterator begin() { return iterator(m_first_item, 0, 0); }
+  iterator end()   { return iterator(m_last_item, 0); }
+
+  const_iterator begin() const { return const_iterator(m_first_item, 0, 0); }
+  const_iterator end()   const { return const_iterator(m_last_item, 0); }
+
+  reverse_iterator rbegin() { return reverse_iterator(end()); }
+  reverse_iterator rend()   { return reverse_iterator(begin()); }
+
+  const_reverse_iterator
+  rbegin() const { return const_reverse_iterator(end()); }
+  const_reverse_iterator
+  rend()   const { return const_reverse_iterator(begin()); }
+
+  // Boost.Intrusive interface
+  iterator iterator_to(reference value) const {
+    return iterator(&value, 0);
+  }
+  const_iterator iterator_to(const_reference value) const {
+    return const_iterator(&value, 0);
+  }
+  static iterator s_iterator_to(reference value) {
+    return iterator(&value, 0);
+  }
+  static const_iterator s_iterator_to(const_reference value) {
+    return const_iterator(&value, 0);
+  }
+
+  // Special insert methods that construct the objects in place
+  // (just forward the arguments to the constructor, to optimize a copy).
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template < typename... Args >
+  iterator
+  emplace(const Args&... args)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(args...);
+    return finalize_insert(ret, fl);
+  }
+#else
+  // inserts a default constructed item.
+  iterator emplace()
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type();
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1 >
+  iterator
+  emplace(const T1 &t1)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3, t4);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4, typename T5 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+    const T5 &t5)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3, t4, t5);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6, const T7 &t7)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7);
+    return finalize_insert(ret, fl);
+  }
+
+  template < typename T1, typename T2, typename T3, typename T4,
+             typename T5, typename T6, typename T7, typename T8 >
+  iterator
+  emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4,
+          const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8);
+    return finalize_insert(ret, fl);
+  }
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+  iterator insert(const T &t)
+  {
+    FreeList * fl = get_free_list();
+    pointer ret = init_insert(fl);
+    m_alloc.construct(ret, t);
+    return finalize_insert(ret, fl);
+  }
+
+  template < class InputIterator >
+  void insert(InputIterator first, InputIterator last)
+  {
+    for (; first != last; ++first)
+      insert(*first);
+  }
+
+  template < class InputIterator >
+  void assign(InputIterator first, InputIterator last)
+  {
+    clear(); // erase(begin(), end()); // ?
+    insert(first, last);
+  }
+
+private:
+  void erase(iterator x, FreeList * fl)
+  {
+    typedef CCC_internal::Erase_counter_strategy<
+      CCC_internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
+
+    CGAL_precondition(type(x) == USED);
+    EraseCounterStrategy::increment_erase_counter(*x);
+    m_alloc.destroy(&*x);
+/* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER
+#ifndef CGAL_NO_ASSERTIONS
+    std::memset(&*x, 0, sizeof(T));
+#endif*/
+    put_on_free_list(&*x, fl);
+  }
+public:
+
+  void erase(iterator x)
+  {
+    erase(x, get_free_list());
+  }
+
+  void erase(iterator first, iterator last) {
+    while (first != last)
+      erase(first++);
+  }
+
+  void clear();
+
+  // Merge the content of d into *this.  d gets cleared.
+  // The complexity is O(size(free list = capacity-size)).
+  void merge(Self &d);
+
+  // Do not call this function while others are inserting/erasing elements
+  size_type size() const
+  {
+    size_type size = m_capacity;
+    for( typename Free_lists::iterator it_free_list = m_free_lists.begin() ;
+         it_free_list != m_free_lists.end() ;
+         ++it_free_list )
+    {
+      size -= it_free_list->size();
+    }
+    return size;
+  }
+
+  size_type max_size() const
+  {
+    return m_alloc.max_size();
+  }
+
+  size_type capacity() const
+  {
+    return m_capacity;
+  }
+
+  // void resize(size_type sz, T c = T()); // TODO  makes sense ???
+
+  bool empty() const
+  {
+    return size() == 0;
+  }
+
+  allocator_type get_allocator() const
+  {
+    return m_alloc;
+  }
+
+  // Returns whether the iterator "cit" is in the range [begin(), end()].
+  // Complexity : O(#blocks) = O(sqrt(capacity())).
+  // This function is mostly useful for purposes of efficient debugging at
+  // higher levels.
+  bool owns(const_iterator cit) const
+  {
+    // We use the block structure to provide an efficient version :
+    // we check if the address is in the range of each block,
+    // and then test whether it is valid (not a free element).
+
+    if (cit == end())
+      return true;
+
+    const_pointer c = &*cit;
+
+    Mutex::scoped_lock lock(m_mutex);
+
+    for (typename All_items::const_iterator it = m_all_items.begin(), itend = m_all_items.end();
+         it != itend; ++it) {
+      const_pointer p = it->first;
+      size_type s = it->second;
+
+      // Are we in the address range of this block (excluding first and last
+      // elements) ?
+      if (c <= p || (p+s-1) <= c)
+        continue;
+
+      CGAL_assertion_msg( (c-p)+p == c, "wrong alignment of iterator");
+
+      return type(c) == USED;
+    }
+    return false;
+  }
+
+  bool owns_dereferencable(const_iterator cit) const
+  {
+    return cit != end() && owns(cit);
+  }
+
+  /** Reserve method to ensure that the capacity of the Concurrent_compact_container be
+   * greater or equal than a given value n.
+   */
+  // TODO?
+  //void reserve(size_type n)
+  //{
+    // Does it really make sense: it will reserve size for the current
+    // thread only!
+    /*Mutex::scoped_lock lock;
+    if ( m_capacity >= n ) return;
+    size_type tmp = m_block_size;
+    // TODO: use a tmpBlockSize instead of m_block_size
+    m_block_size = (std::max)( n - m_capacity, m_block_size );
+    allocate_new_block(free_list());
+    m_block_size = tmp + CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;*/
+  //}
+
+private:
+
+  FreeList*       get_free_list()       { return & m_free_lists.local(); }
+  const FreeList* get_free_list() const { return & m_free_lists.local(); }
+
+  // Two helper functions for the emplace() methods
+
+  // allocate new space if needed get the pointer from
+  // the free list and then clean it
+  pointer init_insert(FreeList * fl)
+  {
+    pointer fl2 = fl->head();
+    if (fl2 == NULL) {
+      allocate_new_block(fl);
+      fl2 = fl->head();
+    }
+    pointer ret = fl2;
+    fl->set_head(clean_pointee(ret));
+    return ret;
+  }
+
+  // get verify the return pointer increment size and
+  // return as iterator
+  iterator finalize_insert(pointer ret, FreeList * fl)
+  {
+    CGAL_assertion(type(ret) == USED);
+    fl->dec_size();
+    return iterator(ret, 0);
+  }
+
+  void allocate_new_block(FreeList *fl);
+
+  void put_on_free_list(pointer x, FreeList * fl)
+  {
+    set_type(x, fl->head(), FREE);
+    fl->set_head(x);
+    fl->inc_size();
+  }
+
+  // Definition of the bit squatting :
+  // =================================
+  // ptr is composed of a pointer part and the last 2 bits.
+  // Here is the meaning of each of the 8 cases.
+  //
+  //                          value of the last 2 bits as "Type"
+  // pointer part     0              1                2              3
+  //         NULL     user elt       unused           free_list end  start/end
+  //      != NULL     user elt       block boundary   free elt       unused
+  //
+  // meaning of ptr : user stuff     next/prev block  free_list      unused
+
+  enum Type { USED = 0, BLOCK_BOUNDARY = 1, FREE = 2, START_END = 3 };
+
+  // The bit squatting is implemented by casting pointers to (char *), then
+  // subtracting to NULL, doing bit manipulations on the resulting integer,
+  // and converting back.
+
+  static char * clean_pointer(char * p)
+  {
+    return ((p - (char *) NULL) & ~ (std::ptrdiff_t) START_END) + (char *) NULL;
+  }
+
+  // Returns the pointee, cleaned up from the squatted bits.
+  static pointer clean_pointee(const_pointer ptr)
+  {
+    return (pointer) clean_pointer((char *) Traits::pointer(*ptr));
+  }
+
+  // Get the type of the pointee.
+  static Type type(const_pointer ptr)
+  {
+    char * p = (char *) Traits::pointer(*ptr);
+    return (Type) (p - clean_pointer(p));
+  }
+
+  static Type type(const_iterator ptr)
+  {
+    return type(&*ptr);
+  }
+
+  // Sets the pointer part and the type of the pointee.
+  static void set_type(pointer p_element, void * pointer, Type t)
+  {
+    CGAL_precondition(0 <= t && (int) t < 4);
+    Traits::pointer(*p_element) =
+      (void *) ((clean_pointer((char *) pointer)) + (int) t);
+  }
+
+  typedef tbb::queuing_mutex Mutex;
+
+  // We store a vector of pointers to all allocated blocks and their sizes.
+  // Knowing all pointers, we don't have to walk to the end of a block to reach
+  // the pointer to the next block.
+  // Knowing the sizes allows to deallocate() without having to compute the size
+  // by walking through the block till its end.
+  // This opens up the possibility for the compiler to optimize the clear()
+  // function considerably when has_trivial_destructor<T>.
+  typedef std::vector<std::pair<pointer, size_type> >  All_items;
+
+
+  void init()
+  {
+    m_block_size = CGAL_INIT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;
+    m_capacity  = 0;
+    for( typename Free_lists::iterator it_free_list = m_free_lists.begin() ;
+         it_free_list != m_free_lists.end() ;
+         ++it_free_list )
+    {
+      it_free_list->set_head(0);
+      it_free_list->set_size(0);
+    }
+    m_first_item = NULL;
+    m_last_item  = NULL;
+    m_all_items  = All_items();
+  }
+
+  allocator_type    m_alloc;
+  size_type         m_capacity;
+  size_type         m_block_size;
+  Free_lists        m_free_lists;
+  pointer           m_first_item;
+  pointer           m_last_item;
+  All_items         m_all_items;
+  mutable Mutex     m_mutex;
+};
+
+template < class T, class Allocator >
+void Concurrent_compact_container<T, Allocator>::merge(Self &d)
+{
+  CGAL_precondition(&d != this);
+
+  // Allocators must be "compatible" :
+  CGAL_precondition(get_allocator() == d.get_allocator());
+
+  // Concatenate the free_lists.
+  // Iterates over TLS free lists of "d". Note that the number of TLS freelists
+  // may be different.
+  typename Free_lists::iterator it_free_list = m_free_lists.begin();
+  if (it_free_list == m_free_lists.end())
+  {
+    // No free list at all? Create our local one... empty.
+    get_free_list()->set_head(0);
+    get_free_list()->set_size(0);
+    // Now there is one TLS free list: ours!
+    it_free_list = m_free_lists.begin();
+  }
+  for( typename Free_lists::iterator it_free_list_d = d.m_free_lists.begin() ;
+       it_free_list_d != d.m_free_lists.end() ;
+       ++it_free_list_d, ++it_free_list )
+  {
+    // If we run out of TLS free lists in *this, let's start again from "begin"
+    if (it_free_list == m_free_lists.end())
+      it_free_list = m_free_lists.begin();
+
+    it_free_list->merge(*it_free_list_d);
+  }
+  // Concatenate the blocks.
+  if (m_last_item == NULL) { // empty...
+    m_first_item = d.m_first_item;
+    m_last_item  = d.m_last_item;
+  } else if (d.m_last_item != NULL) {
+    set_type(m_last_item, d.m_first_item, BLOCK_BOUNDARY);
+    set_type(d.m_first_item, m_last_item, BLOCK_BOUNDARY);
+    m_last_item = d.m_last_item;
+  }
+  m_all_items.insert(m_all_items.end(), d.m_all_items.begin(), d.m_all_items.end());
+  // Add the capacities.
+  m_capacity += d.m_capacity;
+  // It seems reasonnable to take the max of the block sizes.
+  m_block_size = (std::max)(m_block_size, d.m_block_size);
+  // Clear d.
+  d.init();
+}
+
+template < class T, class Allocator >
+void Concurrent_compact_container<T, Allocator>::clear()
+{
+  for (typename All_items::iterator it = m_all_items.begin(), itend = m_all_items.end();
+       it != itend; ++it) {
+    pointer p = it->first;
+    size_type s = it->second;
+    for (pointer pp = p + 1; pp != p + s - 1; ++pp) {
+      if (type(pp) == USED)
+        m_alloc.destroy(pp);
+    }
+    m_alloc.deallocate(p, s);
+  }
+  init();
+}
+
+template < class T, class Allocator >
+void Concurrent_compact_container<T, Allocator>::
+  allocate_new_block(FreeList * fl)
+{
+  typedef CCC_internal::Erase_counter_strategy<
+    CCC_internal::has_increment_erase_counter<T>::value> EraseCounterStrategy;
+
+  size_type old_block_size;
+  pointer new_block;
+
+  {
+    Mutex::scoped_lock lock(m_mutex);
+    old_block_size = m_block_size;
+    new_block = m_alloc.allocate(old_block_size + 2);
+    m_all_items.push_back(std::make_pair(new_block, old_block_size + 2));
+    m_capacity += old_block_size;
+
+    // We insert this new block at the end.
+    if (m_last_item == NULL) // First time
+    {
+        m_first_item = new_block;
+        m_last_item  = new_block + old_block_size + 1;
+        set_type(m_first_item, NULL, START_END);
+    }
+    else
+    {
+        set_type(m_last_item, new_block, BLOCK_BOUNDARY);
+        set_type(new_block, m_last_item, BLOCK_BOUNDARY);
+        m_last_item = new_block + old_block_size + 1;
+    }
+    set_type(m_last_item, NULL, START_END);
+    // Increase the m_block_size for the next time.
+    m_block_size += CGAL_INCREMENT_CONCURRENT_COMPACT_CONTAINER_BLOCK_SIZE;
+  }
+
+  // We don't touch the first and the last one.
+  // We mark them free in reverse order, so that the insertion order
+  // will correspond to the iterator order...
+  for (size_type i = old_block_size; i >= 1; --i)
+  {
+    EraseCounterStrategy::set_erase_counter(*(new_block + i), 0);
+    put_on_free_list(new_block + i, fl);
+  }
+}
+
+template < class T, class Allocator >
+inline
+bool operator==(const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return lhs.size() == rhs.size() &&
+    std::equal(lhs.begin(), lhs.end(), rhs.begin());
+}
+
+template < class T, class Allocator >
+inline
+bool operator!=(const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return ! (lhs == rhs);
+}
+
+template < class T, class Allocator >
+inline
+bool operator< (const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return std::lexicographical_compare(lhs.begin(), lhs.end(),
+                                      rhs.begin(), rhs.end());
+}
+
+template < class T, class Allocator >
+inline
+bool operator> (const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return rhs < lhs;
+}
+
+template < class T, class Allocator >
+inline
+bool operator<=(const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return ! (lhs > rhs);
+}
+
+template < class T, class Allocator >
+inline
+bool operator>=(const Concurrent_compact_container<T, Allocator> &lhs,
+                const Concurrent_compact_container<T, Allocator> &rhs)
+{
+  return ! (lhs < rhs);
+}
+
+namespace CCC_internal {
+
+  template < class CCC, bool Const >
+  class CCC_iterator
+  {
+    typedef typename CCC::iterator                    iterator;
+    typedef CCC_iterator<CCC, Const>                   Self;
+  public:
+    typedef typename CCC::value_type                  value_type;
+    typedef typename CCC::size_type                   size_type;
+    typedef typename CCC::difference_type             difference_type;
+    typedef typename boost::mpl::if_c< Const, const value_type*,
+                                       value_type*>::type pointer;
+    typedef typename boost::mpl::if_c< Const, const value_type&,
+                                       value_type&>::type reference;
+    typedef std::bidirectional_iterator_tag           iterator_category;
+
+    // the initialization with NULL is required by our Handle concept.
+    CCC_iterator()
+    {
+      m_ptr.p = NULL;
+    }
+
+    // Either a harmless copy-ctor,
+    // or a conversion from iterator to const_iterator.
+    CCC_iterator (const iterator &it)
+    {
+      m_ptr.p = &(*it);
+    }
+
+    // Same for assignment operator (otherwise MipsPro warns)
+    CCC_iterator & operator= (const iterator &it)
+    {
+      m_ptr.p = &(*it);
+      return *this;
+    }
+
+    // Construction from NULL
+    CCC_iterator (Nullptr_t CGAL_assertion_code(n))
+    {
+      CGAL_assertion (n == NULL);
+      m_ptr.p = NULL;
+    }
+
+  private:
+
+    union {
+      pointer      p;
+      void        *vp;
+    } m_ptr;
+
+    // Only Concurrent_compact_container should access these constructors.
+    friend class Concurrent_compact_container<value_type, typename CCC::Al>;
+
+    // For begin()
+    CCC_iterator(pointer ptr, int, int)
+    {
+      m_ptr.p = ptr;
+      if (m_ptr.p == NULL) // empty container.
+        return;
+
+      ++(m_ptr.p); // if not empty, p = start
+      if (CCC::type(m_ptr.p) == CCC::FREE)
+        increment();
+    }
+
+    // Construction from raw pointer and for end().
+    CCC_iterator(pointer ptr, int)
+    {
+      m_ptr.p = ptr;
+    }
+
+    // NB : in case empty container, begin == end == NULL.
+    void increment()
+    {
+      // It's either pointing to end(), or valid.
+      CGAL_assertion_msg(m_ptr.p != NULL,
+        "Incrementing a singular iterator or an empty container iterator ?");
+      CGAL_assertion_msg(CCC::type(m_ptr.p) != CCC::START_END,
+        "Incrementing end() ?");
+
+      // If it's not end(), then it's valid, we can do ++.
+      do {
+        ++(m_ptr.p);
+        if (CCC::type(m_ptr.p) == CCC::USED ||
+            CCC::type(m_ptr.p) == CCC::START_END)
+          return;
+
+        if (CCC::type(m_ptr.p) == CCC::BLOCK_BOUNDARY)
+          m_ptr.p = CCC::clean_pointee(m_ptr.p);
+      } while (true);
+    }
+
+    void decrement()
+    {
+      // It's either pointing to end(), or valid.
+      CGAL_assertion_msg(m_ptr.p != NULL,
+        "Decrementing a singular iterator or an empty container iterator ?");
+      CGAL_assertion_msg(CCC::type(m_ptr.p - 1) != CCC::START_END,
+        "Decrementing begin() ?");
+
+      // If it's not begin(), then it's valid, we can do --.
+      do {
+        --m_ptr.p;
+        if (CCC::type(m_ptr.p) == CCC::USED ||
+            CCC::type(m_ptr.p) == CCC::START_END)
+          return;
+
+        if (CCC::type(m_ptr.p) == CCC::BLOCK_BOUNDARY)
+          m_ptr.p = CCC::clean_pointee(m_ptr.p);
+      } while (true);
+    }
+
+  public:
+
+    Self & operator++()
+    {
+      CGAL_assertion_msg(m_ptr.p != NULL,
+   "Incrementing a singular iterator or an empty container iterator ?");
+      /* CGAL_assertion_msg(CCC::type(m_ptr.p) == CCC::USED,
+         "Incrementing an invalid iterator."); */
+      increment();
+      return *this;
+    }
+
+    Self & operator--()
+    {
+      CGAL_assertion_msg(m_ptr.p != NULL,
+   "Decrementing a singular iterator or an empty container iterator ?");
+      /* CGAL_assertion_msg(CCC::type(m_ptr.p) == CCC::USED
+          || CCC::type(m_ptr.p) == CCC::START_END,
+          "Decrementing an invalid iterator."); */
+      decrement();
+      return *this;
+    }
+
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+
+    reference operator*() const { return *(m_ptr.p); }
+
+    pointer   operator->() const { return (m_ptr.p); }
+
+    // For std::less...
+    bool operator<(const CCC_iterator& other) const
+    {
+      return (m_ptr.p < other.m_ptr.p);
+    }
+
+    bool operator>(const CCC_iterator& other) const
+    {
+      return (m_ptr.p > other.m_ptr.p);
+    }
+
+    bool operator<=(const CCC_iterator& other) const
+    {
+      return (m_ptr.p <= other.m_ptr.p);
+    }
+
+    bool operator>=(const CCC_iterator& other) const
+    {
+      return (m_ptr.p >= other.m_ptr.p);
+    }
+
+    // Can itself be used for bit-squatting.
+    void *   for_compact_container() const { return (m_ptr.vp); }
+    void * & for_compact_container()       { return (m_ptr.vp); }
+  };
+
+  template < class CCC, bool Const1, bool Const2 >
+  inline
+  bool operator==(const CCC_iterator<CCC, Const1> &rhs,
+                  const CCC_iterator<CCC, Const2> &lhs)
+  {
+    return rhs.operator->() == lhs.operator->();
+  }
+
+  template < class CCC, bool Const1, bool Const2 >
+  inline
+  bool operator!=(const CCC_iterator<CCC, Const1> &rhs,
+                  const CCC_iterator<CCC, Const2> &lhs)
+  {
+    return rhs.operator->() != lhs.operator->();
+  }
+
+  // Comparisons with NULL are part of CGAL's Handle concept...
+  template < class CCC, bool Const >
+  inline
+  bool operator==(const CCC_iterator<CCC, Const> &rhs,
+                  Nullptr_t CGAL_assertion_code(n))
+  {
+    CGAL_assertion( n == NULL);
+    return rhs.operator->() == NULL;
+  }
+
+  template < class CCC, bool Const >
+  inline
+  bool operator!=(const CCC_iterator<CCC, Const> &rhs,
+      Nullptr_t CGAL_assertion_code(n))
+  {
+    CGAL_assertion( n == NULL);
+    return rhs.operator->() != NULL;
+  }
+
+  template <class CCC, bool Const>
+  std::size_t hash_value(const CCC_iterator<CCC, Const>&  i)
+  {
+    return reinterpret_cast<std::size_t>(&*i) / sizeof(typename CCC::value_type);
+  }
+} // namespace CCC_internal
+
+} //namespace CGAL
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+  
+  template < class CCC, bool Const >
+  struct hash<CGAL::CCC_internal::CCC_iterator<CCC, Const> >
+    : public std::unary_function<CGAL::CCC_internal::CCC_iterator<CCC, Const>, std::size_t> {
+
+    std::size_t operator()(const CGAL::CCC_internal::CCC_iterator<CCC, Const>& i) const
+    {
+      return reinterpret_cast<std::size_t>(&*i) / sizeof(typename CCC::value_type);
+    }
+  };
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+#endif // CGAL_CONCURRENT_COMPACT_CONTAINER_H
+
+#endif // CGAL_LINKED_WITH_TBB
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ConicCPA2.h b/3rdparty/CGAL-4.8/include/CGAL/ConicCPA2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ConicCPA2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ConicCPA2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ConicHPA2.h b/3rdparty/CGAL-4.8/include/CGAL/ConicHPA2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ConicHPA2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ConicHPA2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Conic_2.h b/3rdparty/CGAL-4.8/include/CGAL/Conic_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Conic_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Conic_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Conic_misc.h b/3rdparty/CGAL-4.8/include/CGAL/Conic_misc.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Conic_misc.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Conic_misc.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_2.h
new file mode 100644
index 0000000..752b86f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_2.h
@@ -0,0 +1,982 @@
+// Copyright (c) 1997  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Mariette Yvinec, Jean Daniel Boissonnat
+ 
+#ifndef CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
+#define CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
+
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Constrained_triangulation_2.h>
+#include <CGAL/Triangulation_2/insert_constraints.h>
+
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+#include <CGAL/Spatial_sort_traits_adapter_2.h>
+#include <CGAL/internal/info_check.h>
+#include <CGAL/is_iterator.h>
+
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/mpl/and.hpp>
+
+namespace CGAL {
+
+namespace internal{
+
+template <class T,bool has_info=is_iterator<T>::value>
+struct Get_iterator_value_type{
+ struct type{};
+};
+
+template <class T>
+struct Get_iterator_value_type<T,true>{
+ typedef typename std::iterator_traits<T>::value_type type;
+};
+
+} } //namespace CGAL::internal
+#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+
+
+namespace CGAL {
+
+
+template <class Gt, 
+          class Tds = Triangulation_data_structure_2 <
+                      Triangulation_vertex_base_2<Gt>,
+		      Constrained_triangulation_face_base_2<Gt> >,
+	  class Itag = No_intersection_tag >		
+class Constrained_Delaunay_triangulation_2
+  : public  Constrained_triangulation_2<Gt, Tds, Itag> 
+{
+public:
+  typedef Constrained_triangulation_2<Gt,Tds,Itag>             Ctr;
+  typedef Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>    CDt;
+  typedef typename Ctr::Geom_traits      Geom_traits;
+  typedef typename Ctr::Intersection_tag Intersection_tag;
+
+  typedef typename Ctr::Constraint    Constraint;
+  typedef typename Ctr::Vertex_handle Vertex_handle;
+  typedef typename Ctr::Face_handle   Face_handle;
+  typedef typename Ctr::Edge          Edge;
+  typedef typename Ctr::Finite_faces_iterator Finite_faces_iterator;
+  typedef typename Ctr::Face_circulator       Face_circulator;
+  typedef typename Ctr::size_type             size_type;
+  typedef typename Ctr::Locate_type           Locate_type;
+ 
+  typedef typename Ctr::List_edges List_edges;  
+  typedef typename Ctr::List_faces List_faces;
+  typedef typename Ctr::List_vertices  List_vertices;
+  typedef typename Ctr::List_constraints List_constraints;
+  typedef typename Ctr::Less_edge less_edge;
+  typedef typename Ctr::Edge_set Edge_set;
+
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
+  using Ctr::geom_traits;
+  using Ctr::number_of_vertices;
+  using Ctr::finite_faces_begin;
+  using Ctr::finite_faces_end;
+  using Ctr::dimension;
+  using Ctr::cw;
+  using Ctr::ccw;
+  using Ctr::infinite_vertex;
+  using Ctr::side_of_oriented_circle;
+  using Ctr::is_infinite;
+  using Ctr::collinear_between;
+  using Ctr::are_there_incident_constraints;
+  using Ctr::make_hole;
+  // The next using statement makes trouble for VC++ with the version
+  // of the method that is templated with PointIterator
+  // VC++ cannot disambiguate between this method and the method of the base class
+  // using Ctr::insert_constraint;
+  using Ctr::locate;
+  using Ctr::test_dim_down;
+  using Ctr::fill_hole_delaunay;
+  using Ctr::update_constraints;
+  using Ctr::delete_vertex;
+  using Ctr::push_back;
+#endif
+
+  typedef typename Geom_traits::Point_2  Point;
+
+  Constrained_Delaunay_triangulation_2(const Geom_traits& gt=Geom_traits()) 
+    : Ctr(gt) { }
+
+  Constrained_Delaunay_triangulation_2(const CDt& cdt)
+    : Ctr(cdt) {}
+
+  Constrained_Delaunay_triangulation_2(List_constraints& lc, 
+				       const Geom_traits& gt=Geom_traits())
+    : Ctr(gt) 
+    {   
+      typename List_constraints::iterator itc = lc.begin();
+      for( ; itc != lc.end(); ++itc) {
+	insert((*itc).first, (*itc).second);
+      }
+      CGAL_triangulation_postcondition( is_valid() );
+    }
+
+  template<class InputIterator>
+  Constrained_Delaunay_triangulation_2(InputIterator it,
+				       InputIterator last,
+				       const Geom_traits& gt=Geom_traits() )
+    : Ctr(gt) 
+    {
+      for ( ; it != last; it++) {
+      	insert((*it).first, (*it).second);
+      }
+      CGAL_triangulation_postcondition( is_valid() );
+    }
+
+  virtual ~Constrained_Delaunay_triangulation_2() {}
+  
+
+  // FLIPS
+  bool is_flipable(Face_handle f, int i, bool perturb = true) const;
+  void flip(Face_handle& f, int i);
+  void flip_around(Vertex_handle va);
+  void flip_around(List_vertices & new_vertices);
+#ifndef CGAL_CDT2_USE_RECURSIVE_PROPAGATING_FLIP
+  void non_recursive_propagating_flip(Face_handle f,int i);
+  void propagating_flip(Face_handle f,int i, int depth=0);
+#else
+  void propagating_flip(Face_handle f,int i);
+#endif
+  void propagating_flip(List_edges & edges);
+
+  // CONFLICTS
+  bool test_conflict(Face_handle fh, const Point& p) const; //deprecated
+  bool test_conflict(const Point& p, Face_handle fh) const;
+  void find_conflicts(const Point& p, std::list<Edge>& le,  //deprecated
+		      Face_handle hint= Face_handle()) const;
+  //  //template member functions, declared and defined at the end 
+  // template <class OutputItFaces, class OutputItBoundaryEdges> 
+  // std::pair<OutputItFaces,OutputItBoundaryEdges>
+  // get_conflicts_and_boundary(const Point  &p, 
+  // 		                OutputItFaces fit, 
+  // 		                OutputItBoundaryEdges eit,
+  // 		                Face_handle start) const;
+  // template <class OutputItFaces>
+  // OutputItFaces
+  // get_conflicts (const Point  &p, 
+  //                OutputItFaces fit, 
+  // 		    Face_handle start ) const;
+  // template <class OutputItBoundaryEdges>
+  // OutputItBoundaryEdges
+  // get_boundary_of_conflicts(const Point  &p, 
+  // 			       OutputItBoundaryEdges eit, 
+  // 			       Face_handle start ) const;
+
+  // INSERTION-REMOVAL
+  Vertex_handle insert(const Point & a, Face_handle start = Face_handle());
+  Vertex_handle insert(const Point& p,
+		       Locate_type lt,
+		       Face_handle loc, int li );
+  Vertex_handle push_back(const Point& a);
+//   template < class InputIterator >
+//   std::ptrdiff_t insert(InputIterator first, InputIterator last);
+
+  void remove(Vertex_handle v);
+  void remove_incident_constraints(Vertex_handle v);
+  void remove_constrained_edge(Face_handle f, int i);
+//  template <class OutputItFaces>
+//  OutputItFaces
+//  remove_constrained_edge(Face_handle f, int i, OutputItFaces out)
+ 
+  //for backward compatibility
+  void insert(Point a, Point b) { insert_constraint(a, b);}
+
+  void insert(Vertex_handle va, Vertex_handle  vb) {insert_constraint(va,vb);}
+
+  void insert_constraint(Vertex_handle va, Vertex_handle  vb)
+  {
+    ((Ctr*)this)->insert_constraint(va,vb);
+  }
+
+  void
+  insert_constraint(const Point& a, const Point& b)
+  {
+    ((Ctr*)this)->insert_constraint(a,b);
+  }
+
+  template <class PointIterator>
+  void insert_constraint(PointIterator first, PointIterator last, bool close=false)
+  {
+    if(first == last){
+      return;
+    }
+    const Point& p0 = *first;
+    Point p = p0;
+    Vertex_handle v0 = insert(p0), v(v0), w(v0);
+    ++first;
+    for(; first!=last; ++first){
+      const Point& q = *first;
+      if(p != q){
+        w = insert(q);
+        insert_constraint(v,w);
+        v = w;
+        p = q;
+      }
+    }
+    if(close && (p != p0)){
+      insert(w,v0);
+    }
+  }
+
+
+  void remove_constraint(Face_handle f, int i){remove_constrained_edge(f,i);}
+
+  // CHECK
+  bool is_valid(bool verbose = false, int level = 0) const;
+ 
+protected:
+  virtual Vertex_handle virtual_insert(const Point & a, 
+				       Face_handle start = Face_handle());
+  virtual Vertex_handle virtual_insert(const Point& a,
+				       Locate_type lt,
+				       Face_handle loc, 
+				       int li );
+//Vertex_handle special_insert_in_edge(const Point & a, Face_handle f, int i);
+  void remove_2D(Vertex_handle v );
+  virtual void triangulate_hole(List_faces& intersected_faces,
+				List_edges& conflict_boundary_ab,
+				List_edges& conflict_boundary_ba);
+
+public:
+  // MESHING 
+  // suppressed meshing functions from here
+
+  //template member functions
+public:
+  template < class InputIterator >
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+  std::ptrdiff_t
+  insert( InputIterator first, InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+                typename internal::Get_iterator_value_type< InputIterator >::type,
+                Point
+            >
+          >::type* = NULL
+  )
+#else
+#if defined(_MSC_VER)
+  std::ptrdiff_t insert(InputIterator first, InputIterator last, int i = 0)
+#else
+    std::ptrdiff_t insert(InputIterator first, InputIterator last) 
+#endif
+#endif
+    {
+      size_type n = number_of_vertices();
+
+      std::vector<Point> points (first, last);
+      spatial_sort (points.begin(), points.end(), geom_traits());
+      Face_handle f;
+      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+              p != end; ++p)
+          f = insert (*p, f)->face();
+
+      return number_of_vertices() - n;
+    }
+
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+private:
+  //top stands for tuple-or-pair
+  template <class Info>
+  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
+  template <class Info>
+  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
+  template <class Info>
+  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
+  template <class Info>
+  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
+
+  template <class Tuple_or_pair,class InputIterator>
+  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
+  {
+    size_type n = this->number_of_vertices();
+    std::vector<std::ptrdiff_t> indices;
+    std::vector<Point> points;
+    std::vector<typename Tds::Vertex::Info> infos;
+    std::ptrdiff_t index=0;
+    for (InputIterator it=first;it!=last;++it){
+      Tuple_or_pair value=*it;
+      points.push_back( top_get_first(value)  );
+      infos.push_back ( top_get_second(value) );
+      indices.push_back(index++);
+    }
+
+    typedef Spatial_sort_traits_adapter_2<Geom_traits,Point*> Search_traits;
+
+    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
+
+    Vertex_handle v_hint;
+    Face_handle hint;
+    for (typename std::vector<std::ptrdiff_t>::const_iterator
+      it = indices.begin(), end = indices.end();
+      it != end; ++it){
+      v_hint = insert(points[*it], hint);
+      if (v_hint!=Vertex_handle()){
+        v_hint->info()=infos[*it];
+        hint=v_hint->face();
+      }
+    }
+
+    return this->number_of_vertices() - n;
+  }
+
+public:
+
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first,
+          InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+              typename internal::Get_iterator_value_type< InputIterator >::type,
+              std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type>
+            >
+          >::type* =NULL
+  )
+  {
+    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
+  }
+
+  template <class  InputIterator_1,class InputIterator_2>
+  std::ptrdiff_t
+  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
+          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
+          typename boost::enable_if<
+            boost::mpl::and_<
+              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
+              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Tds::Vertex>::type >
+            >
+          >::type* =NULL
+  )
+  {
+    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
+  }
+#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+
+  template <class PointIterator, class IndicesIterator>
+  std::size_t insert_constraints(PointIterator points_first,
+                                 PointIterator points_beyond,
+                                 IndicesIterator indices_first,
+                                 IndicesIterator indices_beyond)
+  {
+    std::vector<Point> points(points_first, points_beyond);
+    return internal::insert_constraints(*this,points, indices_first, indices_beyond);
+  }
+
+
+ template <class ConstraintIterator>
+  std::size_t insert_constraints(ConstraintIterator first,
+                                 ConstraintIterator beyond)
+  {
+    return internal::insert_constraints(*this,first,beyond);
+  }
+
+
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  get_conflicts_and_boundary(const Point  &p, 
+			     OutputItFaces fit, 
+			     OutputItBoundaryEdges eit,
+			     Face_handle start = Face_handle()) const {
+    CGAL_triangulation_precondition( dimension() == 2);
+    int li;
+    Locate_type lt;
+    Face_handle fh = locate(p,lt,li, start);
+    switch(lt) {
+    case Ctr::OUTSIDE_AFFINE_HULL:
+    case Ctr::VERTEX:
+      return std::make_pair(fit,eit);
+    case Ctr::FACE:
+    case Ctr::EDGE:
+    case Ctr::OUTSIDE_CONVEX_HULL:
+      *fit++ = fh; //put fh in OutputItFaces
+      std::pair<OutputItFaces,OutputItBoundaryEdges>
+	pit = std::make_pair(fit,eit);
+      pit = propagate_conflicts(p,fh,0,pit);
+      pit = propagate_conflicts(p,fh,1,pit);
+      pit = propagate_conflicts(p,fh,2,pit);
+      return pit;
+    }
+    CGAL_triangulation_assertion(false);
+    return std::make_pair(fit,eit);
+  } 
+
+  template <class OutputItFaces>
+  OutputItFaces
+  get_conflicts (const Point  &p, 
+		 OutputItFaces fit, 
+		 Face_handle start= Face_handle()) const {
+    std::pair<OutputItFaces,Emptyset_iterator> pp = 
+      get_conflicts_and_boundary(p,fit,Emptyset_iterator(),start);
+    return pp.first;
+  }
+
+  template <class OutputItBoundaryEdges> 
+  OutputItBoundaryEdges
+  get_boundary_of_conflicts(const Point  &p, 
+			    OutputItBoundaryEdges eit, 
+			    Face_handle start= Face_handle()) const {
+    std::pair<Emptyset_iterator, OutputItBoundaryEdges> pp = 
+      get_conflicts_and_boundary(p,Emptyset_iterator(),eit,start);
+    return pp.second;
+  }
+
+
+public:
+// made  public for the need of Mesh_2
+// but not documented
+#ifdef CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  propagate_conflicts (const Point  &p,
+                      Face_handle fh, 
+                      int i,
+                      std::pair<OutputItFaces,OutputItBoundaryEdges>  pit)  const 
+  {
+     Face_handle fn = fh->neighbor(i);
+     
+     if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
+       *(pit.second)++ = Edge(fn, fn->index(fh));
+     } else {
+       *(pit.first)++ = fn;
+       int j = fn->index(fh);
+       pit = propagate_conflicts(p,fn,ccw(j),pit);
+       pit = propagate_conflicts(p,fn,cw(j), pit);
+     }
+     return pit;
+  }
+#else // NO CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  non_recursive_propagate_conflicts (const Point  &p,
+                                     Face_handle fh, 
+                                     int i,
+                                     std::pair<OutputItFaces,OutputItBoundaryEdges>  pit)  const 
+  {
+    std::stack<std::pair<Face_handle, int> > stack;
+    stack.push(std::make_pair(fh, i));
+    while(!stack.empty()) {
+      const Face_handle fh = stack.top().first;
+      const int i = stack.top().second;
+      stack.pop();
+      const Face_handle fn = fh->neighbor(i);
+      if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
+        *(pit.second)++ = Edge(fn, fn->index(fh));
+      } else {
+        *(pit.first)++ = fn;
+        int j = fn->index(fh);
+        stack.push(std::make_pair(fn, cw(j)));
+        stack.push(std::make_pair(fn,ccw(j)));
+      }
+    }
+    return pit;
+  }
+
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  propagate_conflicts (const Point  &p,
+                      Face_handle fh, 
+                      int i,
+                      std::pair<OutputItFaces,OutputItBoundaryEdges>  pit,
+                      int depth=0)  const 
+  {
+    if ( depth==100) return non_recursive_propagate_conflicts(p,fh,i,pit);
+    Face_handle fn = fh->neighbor(i);
+ 
+    if ( fh->is_constrained(i) || ! test_conflict(p,fn)) {
+      *(pit.second)++ = Edge(fn, fn->index(fh));
+    } else {
+      *(pit.first)++ = fn;
+      int j = fn->index(fh);
+      pit = propagate_conflicts(p,fn,ccw(j),pit,depth+1);
+      pit = propagate_conflicts(p,fn,cw(j), pit,depth+1);
+    }
+     return pit;
+  }
+#endif // NO CGAL_CDT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+
+
+
+
+public:
+ template <class OutputItFaces>
+ OutputItFaces
+ propagating_flip(List_edges & edges, 
+		  OutputItFaces out = Emptyset_iterator()) {
+  // makes the triangulation Delaunay by flipping 
+  // List edges contains an initial list of edges to be flipped
+  // Precondition : the output triangulation is Delaunay if the list 
+  // edges contains all edges of the input triangulation that need to be
+  // flipped (plus possibly others)
+  int i, ii, indf, indn;
+  Face_handle ni, f,ff;
+  Edge ei,eni; 
+  typename Ctr::Edge_set edge_set;
+  typename Ctr::Less_edge less_edge;
+  Edge e[4];
+  typename List_edges::iterator itedge=edges.begin();
+
+  // initialization of the set of edges to be flip
+  while (itedge != edges.end()) {
+    f=(*itedge).first;
+    i=(*itedge).second;
+    if (is_flipable(f,i)) {
+      eni=Edge(f->neighbor(i),this->mirror_index(f,i));
+      if (less_edge(*itedge,eni)) edge_set.insert(*itedge);
+      else edge_set.insert(eni);
+    }
+    ++itedge;
+  }
+
+  // flip edges and updates the set of edges to be flipped
+  while (!(edge_set.empty())) {
+    f=(*(edge_set.begin())).first;
+    indf=(*(edge_set.begin())).second;
+ 
+    // erase from edge_set the 4 edges of the wing of the edge to be
+    // flipped (edge_set.begin) , i.e. the edges of the faces f and
+    // f->neighbor(indf) that are distinct from the edge to be flipped
+
+    ni = f->neighbor(indf); 
+    indn=this->mirror_index(f,indf);
+    ei= Edge(f,indf);
+    edge_set.erase(ei);
+    e[0]= Edge(f,cw(indf));
+    e[1]= Edge(f,ccw(indf));
+    e[2]= Edge(ni,cw(indn));
+    e[3]= Edge(ni,ccw(indn));
+
+    for(i=0;i<4;i++) { 
+      ff=e[i].first;
+      ii=e[i].second;
+      eni=Edge(ff->neighbor(ii),this->mirror_index(ff,ii));
+      if (less_edge(e[i],eni)) {edge_set.erase(e[i]);}
+      else { edge_set.erase(eni);} 
+    } 
+
+    // here is the flip 
+    *out++ = f;
+    *out++ = f->neighbor(indf);
+    flip(f, indf); 
+    
+
+    //insert in edge_set the 4 edges of the wing of the edge that
+    //have been flipped 
+    e[0]= Edge(f,indf);
+    e[1]= Edge(f,cw(indf));
+    e[2]= Edge(ni,indn);
+    e[3]= Edge(ni,cw(indn));
+
+    for(i=0;i<4;i++) { 
+      ff=e[i].first;
+      ii=e[i].second;
+      if (is_flipable(ff,ii)) {
+	eni=Edge(ff->neighbor(ii),this->mirror_index(ff,ii));
+	if (less_edge(e[i],eni)) { 
+	  edge_set.insert(e[i]);}
+	else {
+	  edge_set.insert(eni);} 
+      }
+    } 
+  }
+  return out;
+ }
+
+ template <class OutputItFaces>
+ OutputItFaces
+ remove_constrained_edge(Face_handle f, int i, OutputItFaces out) {
+  Ctr::remove_constrained_edge(f,i);
+  if(dimension() == 2) {
+    List_edges le;
+    le.push_back(Edge(f,i));
+    propagating_flip(le,out);
+  }
+  return out;  
+ }
+ 
+};
+
+
+template < class Gt, class Tds, class Itag >
+bool 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+is_flipable(Face_handle f, int i, bool perturb /* = true */) const
+  // determines if edge (f,i) can be flipped 
+{
+  Face_handle ni = f->neighbor(i); 
+  if (is_infinite(f) || is_infinite(ni)) return false; 
+  if (f->is_constrained(i)) return false;
+  return (side_of_oriented_circle(ni, f->vertex(i)->point(), perturb) 
+                                        == ON_POSITIVE_SIDE);
+}
+
+template < class Gt, class Tds, class Itag >
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+flip (Face_handle& f, int i)
+{
+  Face_handle g = f->neighbor(i);
+  int j = this->mirror_index(f,i);
+
+  // save wings neighbors to be able to restore contraint status
+  Face_handle f1 = f->neighbor(cw(i));
+  int i1 = this->mirror_index(f,cw(i));
+  Face_handle f2 = f->neighbor(ccw(i));
+  int i2 = this->mirror_index(f,ccw(i));
+  Face_handle f3 = g->neighbor(cw(j));
+  int i3 = this->mirror_index(g,cw(j));
+  Face_handle f4 = g->neighbor(ccw(j));
+  int i4 = this->mirror_index(g,ccw(j));
+
+  // The following precondition prevents the test suit 
+  // of triangulation to work on constrained Delaunay triangulation
+  //CGAL_triangulation_precondition(is_flipable(f,i));
+  this->_tds.flip(f, i);
+   
+  // restore constraint status
+  f->set_constraint(f->index(g), false);
+  g->set_constraint(g->index(f), false);
+  f1->neighbor(i1)->set_constraint(this->mirror_index(f1,i1),
+				   f1->is_constrained(i1));
+  f2->neighbor(i2)->set_constraint(this->mirror_index(f2,i2),
+				   f2->is_constrained(i2));
+  f3->neighbor(i3)->set_constraint(this->mirror_index(f3,i3),
+				   f3->is_constrained(i3));
+  f4->neighbor(i4)->set_constraint(this->mirror_index(f4,i4),
+				   f4->is_constrained(i4));
+  return;
+}
+
+template < class Gt, class Tds, class Itag >
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+flip_around(Vertex_handle va)
+  // makes the triangles incident to vertex va Delaunay using flips
+{
+  if (dimension() <= 1) return;
+  Face_handle f=va->face();
+  Face_handle next;    
+  Face_handle start(f);
+  int i;
+  do {
+    i = f->index(va); // FRAGILE : DIM 1
+    next = f->neighbor(ccw(i));  // turns ccw around a
+    propagating_flip(f,i);
+    f=next;
+  } while(next != start);
+}
+
+template < class Gt, class Tds, class Itag >
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+flip_around(List_vertices& new_vertices)
+{
+  typename List_vertices::iterator itv=new_vertices.begin();
+  for( ; itv != new_vertices.end(); itv++) {
+    flip_around(*itv);
+  }
+  return;
+}
+
+
+#ifndef CGAL_CDT2_USE_RECURSIVE_PROPAGATING_FLIP
+template <class Gt, class Tds, class Itag >
+void
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+non_recursive_propagating_flip(Face_handle f , int i)
+{
+  std::stack<Edge> edges;
+  const Vertex_handle& vp = f->vertex(i);
+  edges.push(Edge(f,i));
+
+  while(! edges.empty()){
+    const Edge& e = edges.top();
+    f = e.first;
+    i = e.second;
+
+    Face_handle ni = f->neighbor(i);
+    flip(f,i);
+    if ( !is_flipable(f,i) ) edges.pop();
+
+    i = ni->index(vp);
+    if ( is_flipable(ni,i) ) edges.push( Edge(ni,i) );
+  }
+}
+
+template <class Gt, class Tds, class Itag >
+void
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+propagating_flip(Face_handle f,int i, int depth)
+{
+  if (!is_flipable(f,i)) return;
+#ifdef CGAL_CDT2_IMMEDIATELY_NON_RECURSIVE_PROPAGATING_FLIP
+  non_recursive_propagating_flip(f,i);
+#else
+  int max_depth = 100;
+  if(depth==max_depth){
+    non_recursive_propagating_flip(f,i);
+    return;
+  }
+
+  Face_handle ni = f->neighbor(i);
+  flip(f, i); // flip for constrained triangulations
+  propagating_flip(f,i);
+  i = ni->index(f->vertex(i));
+  propagating_flip(ni,i);
+#endif
+}
+#else 
+template < class Gt, class Tds, class Itag >
+void
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+propagating_flip(Face_handle f,int i)
+// similar to the corresponding function in Delaunay_triangulation_2.h
+{
+  if (!is_flipable(f,i)) return;
+  Face_handle ni = f->neighbor(i);
+  flip(f, i); // flip for constrained triangulations
+  propagating_flip(f,i);
+  i = ni->index(f->vertex(i));
+  propagating_flip(ni,i);
+}
+#endif
+
+ template < class Gt, class Tds, class Itag > 
+ void
+ Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>:: 
+ propagating_flip(List_edges & edges) {
+    propagating_flip(edges,Emptyset_iterator());
+ }
+
+
+template < class Gt, class Tds, class Itag >
+inline bool
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+test_conflict(const Point& p, Face_handle fh) const
+  // true if point P lies inside the circle circumscribing face fh
+{
+  // return true  if P is inside the circumcircle of fh
+  // if fh is infinite, return true when p is in the positive
+  // halfspace or on the boundary and in the  finite edge of fh
+  Oriented_side os = side_of_oriented_circle(fh,p,true);
+  if (os == ON_POSITIVE_SIDE) return true;
+ 
+  if (os == ON_ORIENTED_BOUNDARY && is_infinite(fh)) {
+    int i = fh->index(infinite_vertex());
+    return collinear_between(fh->vertex(cw(i))->point(), p,
+			     fh->vertex(ccw(i))->point() );
+  }
+
+  return false;
+}
+
+template < class Gt, class Tds, class Itag >
+inline bool
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+test_conflict(Face_handle fh, const Point& p) const
+  // true if point P lies inside the circle circumscribing face fh
+{
+  return test_conflict(p,fh);
+}
+
+template < class Gt, class Tds, class Itag >    
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+find_conflicts(const Point& p, std::list<Edge>& le, Face_handle hint) const
+{
+  // sets in le the counterclocwise list of the edges of the boundary of the 
+  // union of the faces in conflict with p
+  // an edge is represented by the incident face that is not in conflict with p
+  get_boundary_of_conflicts(p, std::back_inserter(le), hint);
+}
+  
+template < class Gt, class Tds, class Itag >  
+inline 
+typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+virtual_insert(const Point & a, Face_handle start)
+  // virtual version of the insertion
+{
+  return insert(a,start);
+}
+
+template < class Gt, class Tds, class Itag >  
+inline 
+typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+virtual_insert(const Point& a,
+	       Locate_type lt,
+	       Face_handle loc, 
+	       int li )
+// virtual version of insert
+{
+  return insert(a,lt,loc,li);
+}
+
+template < class Gt, class Tds, class Itag >  
+inline 
+typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+insert(const Point & a, Face_handle start)
+ // inserts a in the triangulation
+// constrained edges are updated
+// Delaunay property is restored
+{
+  Vertex_handle va= Ctr::insert(a, start);
+  flip_around(va); 
+  return va;
+}
+
+template < class Gt, class Tds, class Itag >
+typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+insert(const Point& a, Locate_type lt, Face_handle loc, int li)
+// insert a point p, whose localisation is known (lt, f, i)
+// constrained edges are updated
+// Delaunay property is restored
+{
+  Vertex_handle va= Ctr::insert(a,lt,loc,li);
+  flip_around(va); 
+  return va;
+}
+
+template < class Gt, class Tds, class Itag >
+inline
+typename Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+push_back(const Point &p)
+{
+  return insert(p);
+}
+
+template < class Gt, class Tds, class Itag >
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+triangulate_hole(List_faces& intersected_faces,
+		 List_edges& conflict_boundary_ab,
+		 List_edges& conflict_boundary_ba)
+{
+  List_edges new_edges;
+  Ctr::triangulate_hole(intersected_faces,
+		       conflict_boundary_ab,
+		       conflict_boundary_ba,
+		       new_edges);
+  propagating_flip(new_edges);
+  return;
+}
+
+
+template < class Gt, class Tds, class Itag >  
+inline void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+remove(Vertex_handle v)
+  // remove a vertex and updates the constrained edges of the new faces
+  // precondition : there is no incident constraints
+{
+  CGAL_triangulation_precondition( v != Vertex_handle() );
+  CGAL_triangulation_precondition( ! is_infinite(v));
+  CGAL_triangulation_precondition( ! are_there_incident_constraints(v));
+  if  (dimension() <= 1)    Ctr::remove(v);
+  else  remove_2D(v);
+  return;
+}
+
+// template < class Gt, class Tds, class Itag >  
+// typename
+// Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::Vertex_handle
+// Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+// special_insert_in_edge(const Point & a, Face_handle f, int i)
+//   // insert  point p in edge(f,i)
+//   // bypass the precondition for point a to be in edge(f,i)
+//   // update constrained status
+//   // this member fonction is not robust with exact predicates 
+//   // and approximate construction. Should be removed 
+// {
+//   Vertex_handle vh=Ctr::special_insert_in_edge(a,f,i);
+//   flip_around(vh);
+//   return vh;
+// }
+
+template < class Gt, class Tds, class Itag >  
+void 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+remove_2D(Vertex_handle v)
+{
+ if (test_dim_down(v)) {  this->_tds.remove_dim_down(v);  }
+  else {
+     std::list<Edge> hole;
+    make_hole(v, hole);
+    std::list<Edge> shell=hole; //because hole will be emptied by fill_hole
+    fill_hole_delaunay(hole);
+    update_constraints(shell);
+    delete_vertex(v);
+  }
+  return;
+}
+
+template < class Gt, class Tds, class Itag >
+void
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+remove_incident_constraints(Vertex_handle v)
+{
+   List_edges iconstraints;
+   if (are_there_incident_constraints(v,
+				      std::back_inserter(iconstraints))) {
+     Ctr::remove_incident_constraints(v);
+     if (dimension()==2) propagating_flip(iconstraints);
+   }
+   return;
+}
+
+template < class Gt, class Tds, class Itag >
+void
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+remove_constrained_edge(Face_handle f, int i)
+{
+  remove_constrained_edge(f,i,Emptyset_iterator());
+  return;  
+}
+
+
+template < class Gt, class Tds, class Itag >  
+bool 
+Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
+is_valid(bool verbose, int level) const
+{
+  bool result = Ctr::is_valid(verbose, level);
+  CGAL_triangulation_assertion( result );
+
+    Finite_faces_iterator fit= finite_faces_begin();
+    for (; fit != finite_faces_end(); fit++) {
+      for(int i=0;i<3;i++) {
+	result = result && !is_flipable(fit,i, false);
+	CGAL_triangulation_assertion( result );
+      }
+    }
+    return result;
+}
+
+
+
+} //namespace CGAL
+#endif // CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h
new file mode 100644
index 0000000..00554b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h
@@ -0,0 +1,121 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Jane Tournois, Raul Gallegos
+//
+
+#ifndef CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_FACE_BASE_2_H
+#define CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_FACE_BASE_2_H
+
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Constrained_triangulation_face_base_2.h>
+
+namespace CGAL {
+
+template <typename Kernel,
+          class Fb = CGAL::Constrained_triangulation_face_base_2<Kernel> >
+class Constrained_Delaunay_triangulation_face_base_2
+  : public Fb
+{
+public:
+  typedef Fb Base;
+  typedef typename Base::Vertex_handle  Vertex_handle;
+  typedef typename Base::Face_handle    Face_handle;
+  typedef std::pair<Face_handle, int>   Edge_cdt;
+  typedef Constrained_Delaunay_triangulation_face_base_2 CDT_face_base;
+
+  typedef typename Kernel::Point_2      Point;
+  typedef typename Kernel::Segment_2    Segment;
+
+  struct Edge
+  {
+    Face_handle face;
+    int index;
+    Edge()
+      : face(), index(-1)
+    {}
+    Edge(Face_handle face_, int index_)
+      : face(face_), index(index_)
+    {}
+  };
+
+private:
+  bool m_blind;
+  Edge m_blinding_constraint;
+
+public:
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Base::template Rebind_TDS<TDS2>::Other Fb2;
+    typedef Constrained_Delaunay_triangulation_face_base_2<Kernel,Fb2>
+      Other;
+  };
+
+public:
+  Constrained_Delaunay_triangulation_face_base_2()
+    : Base(),
+      m_blind(false)
+  {
+  }
+  Constrained_Delaunay_triangulation_face_base_2( Vertex_handle v1,
+                                                  Vertex_handle v2,
+                                                  Vertex_handle v3)
+    : Base(v1,v2,v3),
+      m_blind(false)
+  {
+  }
+  Constrained_Delaunay_triangulation_face_base_2( Vertex_handle v1,
+                                                  Vertex_handle v2,
+                                                  Vertex_handle v3,
+                                                  Face_handle f1,
+                                                  Face_handle f2,
+                                                  Face_handle f3)
+    : Base(v1,v2,v3,f1,f2,f3),
+      m_blind(false)
+  {
+  }
+  Constrained_Delaunay_triangulation_face_base_2(Face_handle f)
+    : Base(f),
+      m_blind(false)
+  {
+  }
+
+  // sees its circumcenter or not?
+  bool is_blind() const { return m_blind; }
+  void set_blind(const bool b){ m_blind = b; }
+
+  // if blind, the constrained edge that prevents the face
+  // to see its circumcenter 
+  Edge_cdt blinding_constraint() const
+  {
+    CGAL_precondition(this->is_blind());
+    return std::make_pair(m_blinding_constraint.face,
+                          m_blinding_constraint.index);
+  }
+  void set_blinding_constraint(const Edge_cdt& e)
+  {
+    CGAL_precondition(this->is_blind());
+    CGAL_precondition(e.first->is_constrained(e.second));
+    m_blinding_constraint.face = e.first;
+    m_blinding_constraint.index = e.second;
+  }
+};
+
+} //namespace CGAL 
+
+#endif //CGAL_CONSTRAINED_DELAUNAY_TRIANGULATION_FACE_BASE_2_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Constrained_triangulation_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_face_base_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_plus_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_plus_2.h
new file mode 100644
index 0000000..21db1b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Constrained_triangulation_plus_2.h
@@ -0,0 +1,1233 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Mariette Yvinec
+
+#ifndef CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
+#define CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
+
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Polyline_constraint_hierarchy_2.h>
+#include <boost/tuple/tuple.hpp>
+
+#include <CGAL/Default.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Triangulation_2/insert_constraints.h>
+
+#if defined(BOOST_MSVC) && (BOOST_VERSION == 105500)
+#include <set>
+#else
+#include <boost/container/flat_set.hpp>
+#endif
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4355)
+//warning C4355: 'this' : used in base member initializer list
+#endif
+
+namespace CGAL {
+
+// Comparison functor that compares two Vertex_handle.
+// Used as 'Compare' functor for the constraint hierarchy.
+template < class Tr >
+class Pct2_vertex_handle_less_xy {
+  const Tr* tr_p;
+
+public:
+  Pct2_vertex_handle_less_xy(const Tr* tr_p) : tr_p(tr_p) {}
+
+  typedef typename Tr::Vertex_handle Vertex_handle;
+
+  bool operator()(const Vertex_handle& va,
+                  const Vertex_handle& vb) const
+  {
+    return tr_p->compare_xy(va->point(), vb->point()) == SMALLER;
+  }
+}; // end class template Pct2_vertex_handle_less_xy
+
+// Tr the base triangulation class 
+// Tr has to be Constrained or Constrained_Delaunay with Constrained_triangulation_plus_vertex_base
+
+template < class Tr_ = Default >
+class Constrained_triangulation_plus_2  
+  : public  
+Default::Get< Tr_, Constrained_Delaunay_triangulation_2< 
+                      Exact_predicates_inexact_constructions_kernel
+                      , Triangulation_data_structure_2< 
+                            Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
+                          , Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
+                          >
+                      , CGAL::Exact_predicates_tag
+                      > >::type
+{
+  typedef typename 
+  Default::Get< Tr_, Constrained_Delaunay_triangulation_2< 
+                  Exact_predicates_inexact_constructions_kernel
+                  , Triangulation_data_structure_2< 
+                        Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
+                      , Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
+                      >
+                  , CGAL::Exact_predicates_tag
+                  > >::type Tr;
+
+
+  template<class CDT>
+  class Face_container
+  {
+    typedef typename CDT::Vertex_handle Vertex_handle;
+    typedef typename CDT::Face_handle Face_handle;
+  private:
+    typedef boost::tuple<Vertex_handle, Vertex_handle, Vertex_handle> TFace; 
+    std::vector<TFace> faces;
+    CDT& cdt;
+
+  public:
+    typedef Face_handle value_type;
+    typedef Face_handle& reference;
+    typedef const Face_handle& const_reference;
+
+    Face_container(CDT& cdt_ ) : cdt(cdt_) {}
+
+    void push_back(Face_handle fh)
+    {
+      faces.push_back(boost::make_tuple(fh->vertex(0),
+                                        fh->vertex(1),
+                                        fh->vertex(2)));
+    }
+
+    template <class OutputIterator>
+    void
+    write_faces(OutputIterator out)
+    {
+      for(typename std::vector<TFace>::reverse_iterator 
+            it = faces.rbegin(); it != faces.rend(); ++it) { 
+        Face_handle fh;
+        if(cdt.is_face(boost::get<0>(*it), boost::get<1>(*it), boost::get<2>(*it), fh)){
+          *out++ = fh;
+        }
+      }
+    }
+  };
+
+public:
+  typedef Tr                                   Triangulation;
+  typedef typename Tr::Intersection_tag        Intersection_tag;
+  typedef Constrained_triangulation_plus_2<Tr_> Self;
+  typedef Tr                                   Base;
+
+  typedef typename Triangulation::Edge             Edge;
+  typedef typename Triangulation::Vertex           Vertex;
+  typedef typename Triangulation::Vertex_handle    Vertex_handle;
+  typedef typename Triangulation::Face_handle      Face_handle;
+  typedef typename Triangulation::Face_circulator  Face_circulator ;
+  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
+  typedef typename Triangulation::Vertex_circulator  Vertex_circulator;
+  typedef typename Triangulation::Locate_type      Locate_type;
+  typedef typename Triangulation::Line_face_circulator Line_face_circulator;
+  typedef typename Triangulation::Geom_traits      Geom_traits;
+  typedef typename Geom_traits::Point_2            Point;
+  typedef typename Geom_traits::Segment_2          Segment;
+  typedef typename Triangulation::Constraint       Constraint;
+  typedef typename Triangulation::size_type        size_type;
+
+  typedef typename Triangulation::List_edges       List_edges;
+  typedef typename Triangulation::List_faces       List_faces;
+  typedef typename Triangulation::List_vertices    List_vertices;
+  typedef typename Triangulation::List_constraints List_constraints;
+
+  typedef Pct2_vertex_handle_less_xy<Self>         Vh_less_xy;
+  typedef Polyline_constraint_hierarchy_2<Vertex_handle, Vh_less_xy, Point>
+                                                   Constraint_hierarchy;
+public:
+  typedef Tag_true                                Constraint_hierarchy_tag;
+
+  // for user interface with the constraint hierarchy
+
+  typedef typename Constraint_hierarchy::Vertex_it 
+                                            Vertices_in_constraint_iterator;
+  
+  typedef typename Constraint_hierarchy::Point_it
+                                            Points_in_constraint_iterator;
+
+  typedef typename Constraint_hierarchy::Context      Context;
+  typedef typename Constraint_hierarchy::Context_iterator  Context_iterator;
+  typedef typename Constraint_hierarchy::C_iterator   Constraint_iterator;
+  typedef typename Constraint_hierarchy::Subconstraint_iterator  Subconstraint_iterator;
+  typedef typename Constraint_hierarchy::Constraint_id Constraint_id;   
+                                            
+  typedef std::pair<Vertex_handle, Vertex_handle> Subconstraint;
+  
+  //for backward compatibility
+  typedef Vertices_in_constraint_iterator     Vertices_in_constraint;
+
+  using Triangulation::geom_traits;
+  using Triangulation::cw;
+  using Triangulation::ccw;
+  using Triangulation::incident_faces;
+
+protected:
+  Constraint_hierarchy hierarchy;
+ 
+public:
+  Constraint_hierarchy& hierarchy_ref()
+  {
+    return hierarchy;
+  }
+
+  Constrained_triangulation_plus_2(const Geom_traits& gt=Geom_traits()) 
+    : Triangulation(gt)
+    , hierarchy(Vh_less_xy(this))
+  { }
+
+  Constrained_triangulation_plus_2(const Constrained_triangulation_plus_2& ctp)
+    : Triangulation()
+    , hierarchy(Vh_less_xy(this))
+  { copy_triangulation(ctp);}
+
+  virtual ~Constrained_triangulation_plus_2() {}
+
+  Constrained_triangulation_plus_2 & operator=(const Constrained_triangulation_plus_2& ctp)
+  {
+    copy_triangulation(ctp);
+    return *this;
+  }
+
+  template<class InputIterator>
+  Constrained_triangulation_plus_2(InputIterator first,
+				   InputIterator last,
+				   const Geom_traits& gt=Geom_traits() )
+     : Triangulation(gt)
+     , hierarchy(Vh_less_xy(this))
+  {
+    insert_constraints(first, last);
+    CGAL_triangulation_postcondition( this->is_valid() );
+  }
+
+
+  Constrained_triangulation_plus_2(std::list<std::pair<Point,Point> > constraints,
+				   const Geom_traits& gt=Geom_traits() )
+    : Triangulation(gt)
+     , hierarchy(Vh_less_xy(this))
+  {
+    insert_constraints(constraints.begin(), constraints.end());
+    CGAL_triangulation_postcondition( this->is_valid() );
+  }
+  //Helping
+  void clear() { Base::clear(); hierarchy.clear(); }
+  void copy_triangulation(const Constrained_triangulation_plus_2 &ctp);
+  void swap(Constrained_triangulation_plus_2 &ctp);
+
+  // INSERTION
+  Vertex_handle insert(const Point& a, 
+		       Face_handle start = Face_handle() );
+  Vertex_handle insert(const Point& p,
+		       Locate_type lt,
+		       Face_handle loc, int li );
+  
+  Constraint_id insert_constraint(const Point& a, const Point& b)
+  {
+    Vertex_handle va= insert(a);
+    // If the segment is "short" it is a good idea to start the next insertion
+    // close to point a
+    // Otherwise, to start here is as good as elsewhere
+    Vertex_handle vb = insert(b, va->face());
+    return insert_constraint(va, vb); 
+  }
+
+  Constraint_id insert_constraint(const Constraint& c) 
+  {
+    return insert_constraint(c.first, c.second);
+  }
+  
+  Constraint_id insert_constraint(Vertex_handle va, Vertex_handle vb)
+  {
+    // protects against inserting a zero length constraint
+    if(va == vb){
+    return Constraint_id(NULL);
+    }
+    // protects against inserting twice the same constraint
+    Constraint_id cid = hierarchy.insert_constraint(va, vb);
+    if (va != vb && (cid != Constraint_id(NULL)) )  insert_subconstraint(va,vb); 
+
+    return cid;
+  }
+
+  template < class InputIterator>
+  Constraint_id insert_constraint(InputIterator first, InputIterator last, bool close=false)
+  {
+    return insert_constraint_seq_impl(first, last, close);
+  }
+
+  template<typename Range>
+  Constraint_id insert_constraint(const Range& r)
+  {
+    return insert_constraint_seq_impl(r.begin(), r.end(), false);
+  }
+
+  template < class PolygonTraits_2, class Container>
+  Constraint_id insert_constraint(const Polygon_2<PolygonTraits_2,Container>& polygon)
+  {
+    return insert_constraint_seq_impl(polygon.vertices_begin(), polygon.vertices_end(), true);
+  }
+  /*
+  template<typename InputIterator>
+  size_type insert_constraints(InputIterator first, InputIterator last)
+  {
+    size_type n = 0;
+
+    for(; first != last; ++first)
+    {
+      if(insert_constraint(*first))
+        ++n;
+    }
+    return n;
+  }
+  */
+  Vertex_handle push_back(const Point& p)
+  {
+    return insert(p);
+  }
+
+  Constraint_id push_back(const Constraint& c)
+  {
+    return insert_constraint(c.first, c.second);
+  }
+
+  // for backward compatibility
+  // not const Point&, because otherwise VC6/7 messes it up with 
+  // the insert that takes an iterator range
+  Constraint_id insert(Point a, Point b) { return insert_constraint(a, b); }
+  Constraint_id insert(Vertex_handle va, Vertex_handle  vb) { return insert_constraint(va,vb); }
+
+
+
+  template <class PointIterator, class IndicesIterator>
+  std::size_t insert_constraints(PointIterator points_first,
+                                 PointIterator points_beyond,
+                                 IndicesIterator indices_first,
+                                 IndicesIterator indices_beyond)
+  {
+    std::vector<Point> points(points_first, points_beyond);
+    return internal::insert_constraints(*this,points, indices_first, indices_beyond);
+  }
+
+
+ template <class ConstraintIterator>
+  std::size_t insert_constraints(ConstraintIterator first,
+                                 ConstraintIterator beyond)
+  {
+    return internal::insert_constraints(*this,first,beyond);
+  }
+
+
+  Vertices_in_constraint_iterator
+  insert_vertex_in_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
+			      Vertex_handle vh)
+  {
+    return insert_vertex_in_constraint(cid, pos, vh, Emptyset_iterator());
+  }
+
+  Vertices_in_constraint_iterator
+  remove_vertex_from_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos)
+  {
+    return remove_vertex_from_constraint(cid, pos, Emptyset_iterator());
+  }
+
+
+  template <class OutputIterator>
+  Vertices_in_constraint_iterator
+  remove_vertex_from_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
+				OutputIterator out)
+  {
+    if(pos == vertices_in_constraint_begin(cid)){
+      ++pos;
+      Constraint_id aux = hierarchy.split2(cid,pos);
+      remove_constraint(aux, out);
+      return pos;
+    }
+
+    Vertices_in_constraint_iterator it = vertices_in_constraint_end(cid);
+    it--;
+    if(pos == it){
+      --pos;
+      Constraint_id aux = hierarchy.split(cid, pos);
+      remove_constraint(aux, out);
+      return vertices_in_constraint_end(cid);
+    }
+
+    Vertices_in_constraint_iterator pp = pos;
+    --pp;
+    Vertex_handle a = *pp;
+    pp = pos;
+    ++pp;
+    Vertex_handle b = *pp;
+    --it;
+    Vertices_in_constraint_iterator beg = vertices_in_constraint_begin(cid);
+    ++beg;
+    Face_container<Constrained_triangulation_plus_2> fc(*this);
+
+    Constraint_id head = 0, tail = 0;
+    if(pos != beg){
+      // split off head
+      --pos;
+      head = hierarchy.split2(cid, pos);
+      ++pos;
+    }
+    if(pos != it){
+      // split off tail
+      ++pos;
+      tail = hierarchy.split(cid,pos);
+    }
+  
+    Constraint_id aux = insert_constraint(a, b, std::back_inserter(fc));
+    pos = vertices_in_constraint_end(aux);
+    --pos;
+    --pos; // this is not necessarily == vertices_in_constraint_begin(aux);
+    hierarchy.swap(cid, aux);
+    remove_constraint(aux, std::back_inserter(fc));
+
+    if(head.vl_ptr()){
+      hierarchy.concatenate2(head, cid);
+    }
+
+    if(tail.vl_ptr()){
+      hierarchy.concatenate(cid, tail);
+    }
+    fc.write_faces(out);
+    ++pos; // we went one too far back because the last vertex gets removed by concatenate
+    return pos;
+  }
+
+  // Inserts vh before pos
+  // Returns an iterator pointing on the newly inserted vertex
+  // Writes the modified faces to out
+  template <class OutputIterator>
+  Vertices_in_constraint_iterator
+  insert_vertex_in_constraint(Constraint_id cid, Vertices_in_constraint_iterator pos, 
+			      Vertex_handle vh, OutputIterator out)
+  {
+    // Insertion before the first vertex
+    if(pos == vertices_in_constraint_begin(cid)){
+      //std::cout << "insertion before first vertex" << std::endl;
+      Constraint_id head = insert_constraint(vh, *pos, out);
+      hierarchy.concatenate2(head, cid);
+      return vertices_in_constraint_begin(cid);
+    } 
+
+    // Insertion after the last vertex
+    if(pos == vertices_in_constraint_end(cid)){
+      //std::cout << "insertion after last vertex" << std::endl;
+      pos--;
+      Constraint_id tail = insert_constraint(*pos, vh, out);
+      pos = vertices_in_constraint_end(tail);
+      --pos;
+      hierarchy.concatenate(cid, tail);
+      return pos;
+    }
+    Vertex_handle b = *pos;
+    --pos;    
+    Vertex_handle a = *pos;
+    ++pos;
+    Face_container<Constrained_triangulation_plus_2> fc(*this);
+    Vertices_in_constraint_iterator beg = vertices_in_constraint_begin(cid), vcit;
+    ++beg;
+    vcit = beg;
+    ++beg;
+    // If the constraint consists only of a segment, and we want to insert
+    // in the middle 
+    if((pos == vcit) && (beg == vertices_in_constraint_end(cid))){
+      //std::cout << "insertion in constraint which is a segment" << std::endl;
+      Constraint_id aux1 = insert_constraint(a, vh, std::back_inserter(fc));
+      Constraint_id aux2 = insert_constraint(vh, b, std::back_inserter(fc));
+      pos = vertices_in_constraint_begin(aux2);
+      concatenate(aux1, aux2);
+      hierarchy.swap(cid, aux1);
+      remove_constraint(aux1, std::back_inserter(fc));
+      fc.write_faces(out);
+      return pos;
+      
+    }
+    Constraint_id head = 0, tail = 0;
+    Vertices_in_constraint_iterator bit = vertices_in_constraint_begin(cid);
+    Vertices_in_constraint_iterator pred = pos;
+    --pred;
+    ++bit;
+    if(pos != bit){
+      //std::cout << "split head" << std::endl;
+      head = split(cid, pred);
+      std::swap(head,cid); // split2 does the job
+      pred = vertices_in_constraint_begin(cid);
+      pos = pred;
+      ++pos;
+    }
+    Vertices_in_constraint_iterator eit = vertices_in_constraint_end(cid);
+    --eit;
+    if(pos != eit){
+      //std::cout << "split tail" << std::endl;
+      tail = split(cid, pos);    
+    }
+    
+    // make the new constraint
+    Constraint_id aux1 = insert_constraint(a, vh, std::back_inserter(fc));
+    Constraint_id aux2 = insert_constraint(vh, b, std::back_inserter(fc));
+    pos = vertices_in_constraint_begin(aux2);
+    concatenate(aux1, aux2);
+
+    if(head.vl_ptr()){
+      //std::cout << "concatenate head" << std::endl;
+      remove_constraint(cid, std::back_inserter(fc));
+      hierarchy.concatenate(head, aux1);
+    } else {
+      hierarchy.swap(cid, aux1);
+      remove_constraint(aux1, std::back_inserter(fc));
+      head = cid;
+    }
+
+    if(tail.vl_ptr()){
+      //std::cout << "concatenate tail" << std::endl;
+      concatenate(head, tail);
+    }
+    fc.write_faces(out);
+    return pos;
+  }
+
+  template < class InputIterator, class OutputIterator>
+  Constraint_id insert_constraint(InputIterator first, InputIterator last, OutputIterator out)
+  {
+    Face_handle hint;
+    Face_container<Constrained_triangulation_plus_2> fc(*this);
+    std::vector<Vertex_handle> vertices;
+    for(;first!= last; first++){
+      Vertex_handle vh = insert(*first, hint);
+      hint = vh->face();
+      // no duplicates
+      if(vertices.empty() || (vertices.back() != vh)){
+	vertices.push_back(vh);
+      }
+    }
+    int n = vertices.size();
+    if(n == 1){
+      return NULL;
+    }
+    Constraint_id ca = hierarchy.insert_constraint(vertices[0],vertices[1]);
+    insert_subconstraint(vertices[0],vertices[1], std::back_inserter(fc)); 
+
+    if(n>2){
+      for(int j=1; j<n-1; j++){
+	hierarchy.append_constraint(ca, vertices[j], vertices[j+1]);
+	insert_subconstraint(vertices[j], vertices[j+1], std::back_inserter(fc));
+      }
+    }
+    for(Vertices_in_constraint_iterator vcit = vertices_in_constraint_begin(ca);
+	vcit != vertices_in_constraint_end(ca);
+	vcit++){
+      insert_incident_faces(vcit, out);
+    }
+    //AF    vertices_in_constraint_begin(ca)->fixed() = true;
+    // Vertices_in_constraint_iterator end = boost::prior(vertices_in_constraint_end(ca));
+    // end->fixed() = true;
+    fc.write_faces(out);
+    
+    return ca;
+  }
+
+
+private:
+  template < class InputIterator>
+  Constraint_id insert_constraint_seq_impl(InputIterator first, InputIterator last, bool is_polygon)
+  {
+    Face_handle hint;
+    std::vector<Vertex_handle> vertices;
+    for(;first!= last; first++){
+      Vertex_handle vh = insert(*first, hint);
+      hint = vh->face();
+      // no duplicates
+      if(vertices.empty() || (vertices.back() != vh)){
+	vertices.push_back(vh);
+      }
+    }
+    if(is_polygon && (vertices.size()>1) && (vertices.front() != vertices.back())){
+      vertices.push_back(vertices.front());
+    }
+
+    std::size_t n = vertices.size();
+    if(n == 1){
+      return NULL;
+    }
+    CGAL_assertion(n >= 2);
+    
+    Constraint_id ca = hierarchy.insert_constraint(vertices[0],vertices[1]);
+    insert_subconstraint(vertices[0],vertices[1]); 
+
+    if(n>2){
+      for(std::size_t j=1; j<n-1; j++){
+	hierarchy.append_constraint(ca, vertices[j], vertices[j+1]);
+	insert_subconstraint(vertices[j], vertices[j+1]);
+      }
+    }
+ 
+    // fix first and last, one is redundant for is_polygon == true
+    // vertices.front()->fixed() = true;
+    // vertices.back()->fixed() = true;
+
+    return ca;
+  }
+public:
+  template <class OutputIterator>
+  typename Constrained_triangulation_plus_2<Tr>::Constraint_id
+  insert_constraint(Vertex_handle va, Vertex_handle vb, OutputIterator out)
+  {
+    // protects against inserting a zero length constraint
+    if(va == vb){
+    return Constraint_id(NULL);
+    }
+    // protects against inserting twice the same constraint
+    Constraint_id cid = hierarchy.insert_constraint(va, vb);
+    if (va != vb && (cid != NULL) )  insert_subconstraint(va,vb,out); 
+  
+    for(Vertices_in_constraint_iterator vcit = vertices_in_constraint_begin(cid);
+	vcit != vertices_in_constraint_end(cid);
+	vcit++){
+      insert_incident_faces(vcit, out);
+    }
+    return cid;
+  }
+
+  virtual Vertex_handle intersect(Face_handle f, int i, 
+			  Vertex_handle vaa,
+			  Vertex_handle vbb);
+  Vertex_handle intersect(Face_handle f, int i, 
+			  Vertex_handle vaa,
+			  Vertex_handle vbb,
+			  No_intersection_tag);
+  Vertex_handle intersect(Face_handle f, int i, 
+			  Vertex_handle vaa,
+			  Vertex_handle vbb,
+			  Exact_intersections_tag);
+  Vertex_handle intersect(Face_handle f, int i, 
+			  Vertex_handle vaa,
+			  Vertex_handle vbb,
+			  Exact_predicates_tag);
+ 
+  // REMOVAL
+
+  template <class OutputIterator>
+  void remove_constraint(Constraint_id cid, OutputIterator out)
+  {
+    std::list<Vertex_handle> vertices(hierarchy.vertices_in_constraint_begin(cid),
+				      hierarchy.vertices_in_constraint_end(cid));
+
+    hierarchy.remove_constraint(cid);
+    for(typename std::list<Vertex_handle>::iterator it = vertices.begin(), 
+	  succ = it; 
+	++succ != vertices.end(); 
+	++it){
+      if(! is_subconstraint(*it, *succ)){ // this checks whether other constraints pass
+	Face_handle fh;
+	int i;
+        CGAL_triangulation_assertion_code(bool b =)
+          Triangulation::is_edge(*it, *succ, fh, i);
+	CGAL_triangulation_assertion(b);
+	Triangulation::remove_constrained_edge(fh,i, out); // this does also flipping if necessary.
+      }
+    }
+  }
+  void remove_constraint(Constraint_id cid)
+  {
+    remove_constraint(cid, Emptyset_iterator());
+  }
+
+  void remove_constraint(Vertex_handle va, Vertex_handle vb)
+  {
+    hierarchy.remove_constraint(va,vb);
+  }
+
+  void simplify(Vertices_in_constraint_iterator v)
+  {
+    Vertices_in_constraint_iterator u = boost::prior(v);
+    Vertices_in_constraint_iterator w = boost::next(v);
+    hierarchy.simplify(u,v,w);
+    
+    Triangulation::remove_incident_constraints(*v);
+  
+    Triangulation::remove(*v);
+  
+    Triangulation::insert_constraint(*u, *w);
+  }
+
+  std::size_t remove_points_without_corresponding_vertex(Constraint_id cid)
+  {
+    return hierarchy.remove_points_without_corresponding_vertex(cid);
+  }
+  std::size_t remove_points_without_corresponding_vertex()
+  {
+    return hierarchy.remove_points_without_corresponding_vertex();
+  }
+
+
+  // CONCATENATE AND SPLIT
+
+  // concatenates two constraints
+  Constraint_id
+  concatenate(Constraint_id first, Constraint_id second);
+
+  // split a constraint in two constraints, so that vcit becomes the first
+  // vertex of the new constraint
+  // returns the new constraint 
+  Constraint_id
+  split(Constraint_id first, Vertices_in_constraint_iterator vcit);
+  
+  // Query of the constraint hierarchy
+  Constraint_iterator constraints_begin() const;
+  Constraint_iterator constraints_end()   const;
+  Subconstraint_iterator subconstraints_begin() const;
+  Subconstraint_iterator subconstraints_end() const;
+  Context   context(Vertex_handle va, Vertex_handle vb); //AF: const; 
+
+  bool is_subconstraint(Vertex_handle va, 
+			Vertex_handle vb);
+  size_type number_of_enclosing_constraints(Vertex_handle va, 
+                                            Vertex_handle vb) const;
+  Context_iterator   contexts_begin(Vertex_handle va, 
+				    Vertex_handle vb) const;
+  Context_iterator   contexts_end(Vertex_handle va, 
+				  Vertex_handle vb) const;
+
+  Vertices_in_constraint_iterator vertices_in_constraint_begin(Constraint_id cid) const;
+  Vertices_in_constraint_iterator vertices_in_constraint_end(Constraint_id cid) const ;  
+  Vertices_in_constraint_iterator vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const;
+  Vertices_in_constraint_iterator vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const ;
+  Points_in_constraint_iterator points_in_constraint_begin(Constraint_id cid) const;
+  Points_in_constraint_iterator points_in_constraint_end(Constraint_id cid) const ;
+
+
+  size_type number_of_constraints() {
+    return static_cast<size_type> (hierarchy.number_of_constraints());}
+  size_type number_of_subconstraints(){
+    return static_cast<size_type> (hierarchy.number_of_subconstraints());}
+
+  // public member, used by Mesh_2::Refine_edges
+  void split_constraint(Vertex_handle v1, Vertex_handle v2,
+                        Vertex_handle va) {
+    hierarchy.split_constraint(v1,v2,va);
+  }
+
+protected:
+  template <class OutputItertator>
+  void insert_incident_faces(Vertices_in_constraint_iterator vcit, OutputItertator out)
+  {
+    Vertex_handle vh = *vcit;
+    Face_circulator fc = incident_faces(vh), done = fc;
+    Face_circulator null ;
+    if ( fc != null )
+    {
+      do {
+        Face_handle fh = fc;
+        out = fh;
+        out++;
+        fc++;
+      }while(fc != done);
+    }
+  }  
+
+
+void
+insert_subconstraint(Vertex_handle vaa,
+		     Vertex_handle vbb)
+  {
+    insert_subconstraint(vaa,vbb,Emptyset_iterator());
+  }
+
+
+
+
+template <class OutputItertator>
+void
+insert_subconstraint(Vertex_handle vaa,
+		     Vertex_handle vbb,
+		     OutputItertator out)
+  // insert the subconstraint [vaa vbb] 
+  // it will eventually be splitted into several subconstraints
+{
+  CGAL_triangulation_precondition( vaa != vbb);
+  Vertex_handle vi;
+
+  Face_handle fr;
+  int i;
+  if(this->includes_edge(vaa,vbb,vi,fr,i)) {
+    this->mark_constraint(fr,i);
+    if (vi != vbb)  {
+      hierarchy.split_constraint(vaa,vbb,vi);
+      insert_subconstraint(vi,vbb, out);
+    }
+    return;
+  }
+      
+  List_faces intersected_faces;
+  List_edges conflict_boundary_ab, conflict_boundary_ba;
+     
+  bool intersection  = this->find_intersected_faces( 
+    vaa, vbb,
+    intersected_faces,
+    conflict_boundary_ab,
+    conflict_boundary_ba,
+    vi);
+
+  if ( intersection) {
+    if (vi != vaa && vi != vbb) {
+      hierarchy.split_constraint(vaa,vbb,vi);
+      insert_subconstraint(vaa,vi, out); 
+      insert_subconstraint(vi,vbb, out); 
+     }
+    else insert_subconstraint(vaa,vbb,out);  
+
+    
+    return;
+  }
+
+
+  //no intersection
+
+  List_edges edges(conflict_boundary_ab);
+  std::copy(conflict_boundary_ba.begin(), conflict_boundary_ba.end(), std::back_inserter(edges));
+
+  // edges may contain mirror edges. They no longer exist after triangulate_hole
+  // so we have to remove them before calling get_bounded_faces
+  if(! edges.empty()){
+
+#if defined(BOOST_MSVC) && (BOOST_VERSION == 105500)
+    std::set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
+#else
+    boost::container::flat_set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
+#endif
+    typename List_edges::iterator it2;
+    for(typename List_edges::iterator it = edges.begin(); it!= edges.end();){
+      if(faces.find(it->first) != faces.end()){
+        typename List_edges::iterator it2 = it;
+        ++it;
+        edges.erase(it2);
+      }else {
+        ++it;
+      }
+    }
+  }
+
+  this->triangulate_hole(intersected_faces,
+                         conflict_boundary_ab,
+                         conflict_boundary_ba);
+
+  this->get_bounded_faces(edges.begin(),
+                          edges.end(),
+                          out);
+
+  if (vi != vbb) {
+    hierarchy.split_constraint(vaa,vbb,vi);
+    insert_subconstraint(vi,vbb, out); 
+  }
+  return;
+}
+
+
+
+  //to debug
+public:
+  void print_hierarchy() { hierarchy.print(); }
+
+  //template member functions
+public:
+  template < class InputIterator >
+#if defined(_MSC_VER)
+  std::ptrdiff_t insert(InputIterator first, InputIterator last, int i = 0)
+#else
+    std::ptrdiff_t insert(InputIterator first, InputIterator last) 
+#endif
+  {
+    size_type n = this->number_of_vertices();
+
+    std::vector<Point> points (first, last);
+
+    spatial_sort (points.begin(), points.end(), geom_traits());
+
+    Face_handle hint;
+    for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+            p != end; ++p)
+        hint = insert (*p, hint)->face();
+
+    return this->number_of_vertices() - n;
+  }
+
+};
+
+template <class Tr>
+void
+Constrained_triangulation_plus_2<Tr>::
+copy_triangulation(const Constrained_triangulation_plus_2 &ctp)
+{
+  Base::copy_triangulation(ctp);
+  //the following assumes that the triangulation and its copy
+  // iterate on their vertices in the same order 
+  std::map<Vertex_handle,Vertex_handle> vmap;
+  Vertex_iterator vit = ctp.vertices_begin();
+  Vertex_iterator vvit = this->vertices_begin();
+  for( ; vit != ctp.vertices_end(); ++vit, ++vvit) {
+    CGAL_triangulation_assertion(vit->point() == vvit->point());
+    vmap[vit] = vvit;
+  }
+  hierarchy.copy(ctp.hierarchy, vmap);
+}
+
+template <class Tr>
+void
+Constrained_triangulation_plus_2<Tr>::
+swap(Constrained_triangulation_plus_2 &ctp)
+{
+  Base::swap(ctp);
+  hierarchy.swap(ctp.hierarchy);
+}
+
+template < class Tr >
+inline 
+typename Constrained_triangulation_plus_2<Tr>::Vertex_handle
+Constrained_triangulation_plus_2<Tr>::
+insert(const Point& a, Face_handle start)
+{
+  Locate_type lt;
+  int li;
+  Face_handle loc = this->locate(a, lt, li, start);
+  return insert(a,lt,loc,li);
+}
+
+template < class Tr>
+typename Constrained_triangulation_plus_2<Tr>::Vertex_handle
+Constrained_triangulation_plus_2<Tr>::
+insert(const Point& a, Locate_type lt, Face_handle loc, int li)
+{
+  Vertex_handle v1, v2;
+  bool insert_in_constrained_edge = false;
+
+  if ( lt == Triangulation::EDGE && loc->is_constrained(li) ){
+    insert_in_constrained_edge = true;
+    v1=loc->vertex(ccw(li)); //endpoint of the constraint
+    v2=loc->vertex(cw(li)); // endpoint of the constraint
+  }
+  Vertex_handle va = Triangulation::insert(a,lt,loc,li);
+  // update the hierarchy
+  if (insert_in_constrained_edge) {
+    hierarchy.split_constraint(v1,v2,va);
+  }
+  return va;
+}
+
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
+Constrained_triangulation_plus_2<Tr>::
+intersect(Face_handle f, int i, 
+	  Vertex_handle vaa,
+	  Vertex_handle vbb) 
+{
+  return intersect(f, i, vaa, vbb, Intersection_tag());
+}
+
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
+Constrained_triangulation_plus_2<Tr>::
+
+intersect(Face_handle , int , 
+	  Vertex_handle ,
+	  Vertex_handle ,
+	  No_intersection_tag)
+{
+  std::cerr << " sorry, this triangulation does not deal with" 
+	    <<    std::endl
+	    << " intersecting constraints" << std::endl;
+  CGAL_triangulation_assertion(false);
+  return Vertex_handle();
+}
+
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>:: Vertex_handle 
+Constrained_triangulation_plus_2<Tr>::
+intersect(Face_handle f, int i, 
+	  Vertex_handle vaa,
+	  Vertex_handle vbb,
+	  Exact_intersections_tag)
+// compute the intersection of the constraint edge (f,i) 
+// with the subconstraint (vaa,vbb) being inserted
+// insert the intersection point
+// (the  constraint edge (f,i) will be split in hierarchy by insert)
+// and return the Vertex_handle of the new Vertex
+{
+  Vertex_handle  vc, vd, va, vb;
+  Vertex_handle  vcc, vdd;
+  vcc = f->vertex(cw(i));
+  vdd = f->vertex(ccw(i));
+  CGAL_triangulation_assertion_code( bool b1 = )
+  hierarchy.enclosing_constraint(vcc,vdd,vc,vd);
+  CGAL_triangulation_assertion_code( bool b2 = )
+  hierarchy.enclosing_constraint(vaa,vbb,va,vb);
+  CGAL_triangulation_assertion(b1);
+  CGAL_triangulation_assertion(b2);
+
+  const Point& pa = va->point();
+  const Point& pb = vb->point();
+  const Point& pc = vc->point();
+  const Point& pd = vd->point();
+  Point pi;
+  Intersection_tag itag = Intersection_tag();
+  CGAL_triangulation_assertion_code( bool ok = )
+  intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
+  CGAL_triangulation_assertion(ok);
+
+  Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i);
+  return vi; 
+}
+
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>::Vertex_handle 
+Constrained_triangulation_plus_2<Tr>::
+intersect(Face_handle f, int i, 
+	  Vertex_handle vaa,
+	  Vertex_handle vbb,
+	  Exact_predicates_tag)
+{
+  Vertex_handle  vcc, vdd;
+  vcc = f->vertex(cw(i));
+  vdd = f->vertex(ccw(i));
+
+  const Point& pa = vaa->point();
+  const Point& pb = vbb->point();
+  const Point& pc = vcc->point();
+  const Point& pd = vdd->point();
+
+  Point pi; //creator for point is required here
+  Intersection_tag itag = Intersection_tag();
+  bool ok  = intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
+
+  Vertex_handle vi;
+  if ( !ok) {  //intersection detected but not computed
+    int i = limit_intersection(geom_traits(), pa, pb, pc, pd, itag);
+    switch(i){
+    case 0 : vi = vaa; break;
+    case 1 : vi = vbb; break;
+    case 2 : vi = vcc; break;
+    case 3 : vi = vdd; break; 
+    }
+    if(vi == vaa || vi == vbb) {
+      Triangulation::remove_constrained_edge(f, i);
+    }
+  }
+  else{ //computed
+    Triangulation::remove_constrained_edge(f, i);
+    vi = insert(pi, f);
+  }
+
+  // vi == vc or vi == vd may happen even if intersection==true
+  // due to approximate construction of the intersection
+  if (vi != vcc && vi != vdd) { 
+    hierarchy.split_constraint(vcc,vdd,vi);
+    insert_subconstraint(vcc,vi); 
+    insert_subconstraint(vi, vdd);
+  } 
+  else {
+    insert_subconstraint(vcc,vdd);
+  }
+  return vi; 
+}
+
+  // CONCATENATE AND SPLIT
+
+  // concatenates two constraints
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>::Constraint_id
+Constrained_triangulation_plus_2<Tr>::concatenate(Constraint_id first, Constraint_id second)
+{
+  return hierarchy.concatenate(first,second);
+}
+
+  // split a constraint in two constraints, so that vcit becomes the first
+  // vertex of the new constraint
+  // returns the new constraint 
+template <class Tr>
+typename Constrained_triangulation_plus_2<Tr>::Constraint_id
+Constrained_triangulation_plus_2<Tr>::split(Constraint_id first, Vertices_in_constraint_iterator vcit)
+{
+  return hierarchy.split(first, vcit);
+}
+
+
+template <class Tr>
+std::ostream &
+operator<<(std::ostream& os, 
+	   const Constrained_triangulation_plus_2<Tr> &ct)
+{
+  ct.file_output(os);
+  return os ;
+}
+
+// Constraint Hierarchy Queries
+
+template <class Tr>
+inline
+typename
+Constrained_triangulation_plus_2<Tr>::Constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+constraints_begin() const
+{
+  return hierarchy.c_begin();
+}
+
+template <class Tr>
+inline
+typename
+Constrained_triangulation_plus_2<Tr>::Constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+constraints_end() const
+{
+  return hierarchy.c_end();
+}
+
+template <class Tr>
+inline
+typename
+Constrained_triangulation_plus_2<Tr>::Subconstraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+subconstraints_begin() const
+{
+  return hierarchy.subconstraint_begin();
+}
+
+template <class Tr>
+inline
+typename
+Constrained_triangulation_plus_2<Tr>::Subconstraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+subconstraints_end() const
+{
+  return hierarchy.subconstraint_end();
+}
+
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Context
+Constrained_triangulation_plus_2<Tr>::
+context(Vertex_handle va, Vertex_handle vb) // AF: const
+{
+  return hierarchy.context(va,vb);
+}
+
+
+template <class Tr>
+inline 
+typename Constrained_triangulation_plus_2<Tr>::size_type
+Constrained_triangulation_plus_2<Tr>::
+number_of_enclosing_constraints(Vertex_handle va, Vertex_handle vb) const
+{
+ return static_cast<size_type> 
+   (hierarchy.number_of_enclosing_constraints(va,vb)); 
+}
+
+template <class Tr>
+inline bool
+Constrained_triangulation_plus_2<Tr>::
+is_subconstraint(Vertex_handle va, Vertex_handle vb)
+{
+ return hierarchy.is_subconstrained_edge(va,vb); 
+}
+
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Context_iterator
+Constrained_triangulation_plus_2<Tr>::
+contexts_begin(Vertex_handle va, Vertex_handle vb) const
+{
+  return hierarchy.contexts_begin(va,vb);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Context_iterator
+Constrained_triangulation_plus_2<Tr>::
+contexts_end(Vertex_handle va, Vertex_handle vb) const
+{
+  return hierarchy.contexts_end(va,vb);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+vertices_in_constraint_begin(Constraint_id cid) const
+{
+  return  hierarchy.vertices_in_constraint_begin(cid);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+vertices_in_constraint_end(Constraint_id cid) const
+{
+  return  hierarchy.vertices_in_constraint_end(cid);
+}
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const
+{
+  return  hierarchy.vertices_in_constraint_begin(va,vb);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Vertices_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const
+{
+  return  hierarchy.vertices_in_constraint_end(va,vb);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Points_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+points_in_constraint_begin(Constraint_id cid) const
+{
+  return  hierarchy.points_in_constraint_begin(cid);
+}
+
+template <class Tr>
+inline
+typename Constrained_triangulation_plus_2<Tr>::Points_in_constraint_iterator
+Constrained_triangulation_plus_2<Tr>::
+points_in_constraint_end(Constraint_id cid) const
+{
+  return  hierarchy.points_in_constraint_end(cid);
+}
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+#endif //CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Constrained_voronoi_diagram_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constrained_voronoi_diagram_2.h
new file mode 100644
index 0000000..c3dfdec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Constrained_voronoi_diagram_2.h
@@ -0,0 +1,514 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez
+//
+
+#ifndef CGAL_CONSTRAINED_VORONOI_DIAGRAM_2_H
+#define CGAL_CONSTRAINED_VORONOI_DIAGRAM_2_H
+
+#include <utility>
+
+namespace CGAL {
+
+template <class Cdt>
+class Cvd_cell_2
+{
+  typedef typename Cdt::Vertex_handle    Vertex_handle;
+
+public:
+  typedef typename Cdt::Geom_traits::Segment_2    Segment;
+  typedef typename Cdt::Geom_traits::Ray_2        Ray;
+  typedef typename Cdt::Geom_traits::Point_2      Point;
+  typedef CGAL::Dispatch_output_iterator<
+    CGAL::cpp11::tuple<Segment, Ray>,
+    CGAL::cpp11::tuple<std::back_insert_iterator<std::vector<Segment> >,
+                       std::back_insert_iterator<std::vector<Ray> > >
+    > Construction_dispatcher;
+
+private:
+  Vertex_handle m_vertex; //generator
+  std::vector<Segment> m_segments;
+  std::vector<Ray>     m_rays;
+  bool m_is_valid;
+  
+public:
+  Cvd_cell_2(Vertex_handle v)
+    : m_vertex(v)
+    , m_segments()
+    , m_rays()
+    , m_is_valid(false)
+  { }
+
+  bool operator<(const Cvd_cell_2& cell) const
+  {
+    return m_vertex < cell.vertex();
+  };
+
+  Vertex_handle vertex() const { return m_vertex; }
+
+  bool is_valid() const { return m_is_valid; }
+  bool& is_valid()      { return m_is_valid; }
+
+  bool is_infinite() const 
+  {
+    return !m_rays.empty();
+  }
+  bool is_empty() const
+  {
+    return m_rays.empty() && m_segments.empty();
+  }
+
+public:
+  //construction iterators
+  std::back_insert_iterator<std::vector<Segment> > segment_output_iterator()
+  {
+    return std::back_inserter(m_segments);
+  }
+  std::back_insert_iterator<std::vector<Ray> > ray_output_iterator()
+  {
+    return std::back_inserter(m_rays);
+  }
+
+public:
+  std::size_t number_of_vertices() const
+  {
+    return m_segments.size();
+  }
+
+  Point point(const std::size_t& i) const
+  {
+    CGAL_assertion(i >= 0 && i < m_segments.size());
+    return m_segments[i].source();
+  }
+
+public:
+  //access iterators
+  typedef typename std::vector<Segment>::iterator  segment_iterator;
+  typedef typename std::vector<Ray>::iterator      ray_iterator;
+  typedef typename std::vector<Segment>::const_iterator  const_segment_iterator;
+  typedef typename std::vector<Ray>::const_iterator      const_ray_iterator;
+
+  segment_iterator segments_begin()        { return m_segments.begin(); }
+  segment_iterator segments_end()          { return m_segments.end(); }
+  const_segment_iterator segments_cbegin() const { return m_segments.cbegin();}
+  const_segment_iterator segments_cend()   const { return m_segments.cend(); }
+
+  ray_iterator rays_begin()       { return m_rays.begin(); }
+  ray_iterator rays_end()         { return m_rays.end(); }
+  const_ray_iterator rays_cbegin() const { return m_rays.cbegin();}
+  const_ray_iterator rays_cend()   const { return m_rays.cend(); }
+
+  CGAL_assertion_code(
+public:
+  bool is_simply_ccw_oriented() const
+  {
+    typedef typename Cdt::Geom_traits::Vector_2 Vector;
+    const_segment_iterator sit = segments_cbegin();
+    Segment s1 = *sit++;
+    for(; sit != segments_cend(); ++sit)
+    {
+      Segment s2 = *sit;
+      if(s1.target() != s2.source())
+        return false;
+
+      Point p = vertex()->point();
+      Vector v1(p, s1.source());
+      Vector v2(p, s1.target());
+      Vector v3(p, s2.target());
+
+      if(CGAL::orientation(v1, v2) != CGAL::LEFT_TURN
+        || CGAL::orientation(v2, v3) != CGAL::LEFT_TURN)
+        return false;
+
+      s1 = s2;
+    }
+    return true;
+  }
+  );//end CGAL_assertion_code
+
+}; //end CLASS Cvd_cell_2
+
+
+// Cdt should be of the type Constrained_Delaunay_triangulation_2
+// and the face base shoul be Constrained_Delaunay_triangulation_face_base_2
+template <class Cdt>
+class Constrained_voronoi_diagram_2
+{
+public:
+  typedef Constrained_voronoi_diagram_2<Cdt>         Cvd;
+  typedef Cvd_cell_2<Cdt>                            Cvd_cell;
+  typedef typename Cvd_cell::Construction_dispatcher Construction_dispatcher;
+
+public:
+  // typedefs for basic primitives 
+  typedef typename Cdt::Geom_traits       Geom_traits;
+  typedef typename Cdt::Intersection_tag Intersection_tag;
+
+  typedef typename Cdt::Constraint             Constraint;
+  typedef typename Cdt::Vertex_handle          Vertex_handle;
+  typedef typename Cdt::Face_handle            Face_handle;
+  typedef typename Cdt::Edge                   Edge;
+  typedef typename Cdt::All_faces_iterator     All_faces_iterator;
+  typedef typename Cdt::Finite_faces_iterator  Finite_faces_iterator;
+  typedef typename Cdt::Finite_edges_iterator  Finite_edges_iterator;
+  typedef typename Cdt::Finite_vertices_iterator Finite_vertices_iterator;
+  typedef typename Cdt::Face_circulator        Face_circulator;
+  typedef typename Cdt::Edge_circulator        Edge_circulator;
+  typedef typename Cdt::size_type              size_type;
+  typedef typename Cdt::Locate_type            Locate_type;
+
+  typedef typename Geom_traits::FT                   FT;
+  typedef typename Geom_traits::Point_2              Point;
+  typedef typename Geom_traits::Vector_2             Vector;
+  typedef typename Geom_traits::Line_2               Line;
+  typedef typename Cdt::Segment                 Segment;
+  typedef typename Cdt::Triangle                Triangle;
+
+protected:
+  const Cdt& m_cdt;
+
+public:
+  Constrained_voronoi_diagram_2(const Cdt& cdt)
+    : m_cdt(cdt)
+  {
+  }
+
+  //----------------------------------------------------------------
+  //--------------------ABOUT FACES SIGHT---------------------------
+  //----------------------------------------------------------------
+
+public:
+  // blind = false IFF each face sees its circumcenter
+  void tag_all_faces_blind(const bool blind) 
+  {
+    for(All_faces_iterator f = m_cdt.all_faces_begin();
+         f != m_cdt.all_faces_end();
+         ++f)
+      f->set_blind(blind);
+  }
+
+  // blind test for each face
+  // if true, set corresponding barrier constraint
+  void tag_faces_blind()
+  {
+    if(m_cdt.dimension() < 2)
+      return;
+
+    tag_all_faces_blind(false);
+
+    // for each constrained edge, mark blinded triangles
+    for(Finite_edges_iterator e = m_cdt.finite_edges_begin();
+         e != m_cdt.finite_edges_end();
+         ++e)
+    {
+      Edge edge = *e;
+      if(m_cdt.is_constrained(edge))
+      {
+        tag_neighbors_blind(edge);
+        tag_neighbors_blind(m_cdt.mirror_edge(edge));
+      }
+    }
+  }
+
+private:
+  // test face for blindness with respect to the edge constraint
+  void tag_face_blind(Face_handle& f, const Edge& constraint)
+  {  
+    if(segment_hides_circumcenter(m_cdt.segment(constraint),
+                                  m_cdt.triangle(f)))
+    {
+      f->set_blind(true);
+      f->set_blinding_constraint(constraint);
+    }
+  }
+
+  // predicate: returns true if the triangle tr and its circumcenter
+  // are on the opposite side of the segment seg
+  bool segment_hides_circumcenter(const Segment& seg,
+                                  const Triangle& tr)
+  {
+    Point a = seg.source();
+    Point b = seg.target();
+    double dX = b.x() - a.x();
+    double dY = b.y() - a.y();
+
+    const Point& p0 = tr[0];
+    const Point& p1 = tr[1];
+    const Point& p2 = tr[2];
+    double R0 = p0.x()*p0.x() + p0.y()*p0.y();
+    double R1 = p1.x()*p1.x() + p1.y()*p1.y();
+    double R2 = p2.x()*p2.x() + p2.y()*p2.y();
+    double denominator = (p1.x()-p0.x())*(p2.y()-p0.y()) +
+                                   (p0.x()-p2.x())*(p1.y()-p0.y());
+
+    double det = 2*denominator * (a.x()*dY - a.y()*dX)
+                    - (R2-R1) * (p0.x()*dX + p0.y()*dY)
+                    - (R0-R2) * (p1.x()*dX + p1.y()*dY)
+                    - (R1-R0) * (p2.x()*dX + p2.y()*dY);
+    return (det <= 0);
+  }
+
+  // tags with their sights, with respect to the Edge constraint,
+  // seed and its neighbor faces, on the same side of Edge than seed.
+  void tag_neighbors_blind(const Edge& constraint)
+  {
+    CGAL_assertion(m_cdt.is_constrained(constraint));
+    Face_handle seed = constraint.first;
+
+    if(!m_cdt.is_infinite(seed) 
+       && !seed->is_blind() 
+       && !m_cdt.triangle(seed).is_degenerate() )
+       //to avoid flat triangles outside the domain
+    {
+      std::stack<Face_handle> faces;
+      faces.push(seed);
+
+      while(!faces.empty())
+      {
+        Face_handle f = faces.top();
+        faces.pop();
+        this->tag_face_blind(f, constraint);
+        if(f->is_blind())
+          this->push_unvisited_neighbors(f, faces);
+      }
+    }
+  }
+
+  // puts in the stack the unvisited (un-tagged) neighbor faces of f
+  void push_unvisited_neighbors(const Face_handle& f,
+                                std::stack<Face_handle>& faces) const
+  {
+    for(int i=0; i<3; ++i)
+    {
+      Face_handle fi = f->neighbor(i);
+      Edge edge_i = Edge(f, i);
+      if(!m_cdt.is_constrained(edge_i) &&
+          !fi->is_blind() &&
+          !m_cdt.is_infinite(fi)) 
+        faces.push(fi);
+    }
+  }
+
+  /*--------------------------------------------------------------
+  ---------------------- BVD CONSTRUCTION ------------------------
+  --------------------------------------------------------------*/
+
+public:
+  Cvd_cell cvd_cell(Vertex_handle v) const
+  {
+    Cvd_cell cell(v);
+    
+    typename Cvd_cell::Construction_dispatcher oit =
+      CGAL::dispatch_output<typename Cvd_cell::Segment,
+                            typename Cvd_cell::Ray>(
+                              cell.segment_output_iterator(),
+                              cell.ray_output_iterator());
+    cvd_cell(v, oit);
+    cell.is_valid() = true;
+
+    return cell;
+  }
+
+// assemble a cell of the bounded Voronoi diagram
+// incident to vertex v
+// OutputIterator should be able to collect Segments and Rays
+private:
+  template<typename OutputIterator>
+  OutputIterator cvd_cell(Vertex_handle v, OutputIterator oit) const
+  {
+    if(bvd_cell_is_infinite(v))
+      infinite_cvd_cell(v, oit);
+    else
+      finite_cvd_cell(v, oit);
+    return oit;
+  }
+
+private:
+  template <typename OutputIterator>
+  OutputIterator finite_cvd_cell(Vertex_handle v, OutputIterator oit) const
+  {
+    std::vector<Point> polygon;
+    
+    CGAL_assertion(!m_cdt.is_infinite(v));
+    Face_circulator face = m_cdt.incident_faces(v);
+    Face_circulator end = face;
+    Face_circulator next = face;
+
+    CGAL_For_all(face, end)
+    {
+      next++;
+      Line line(m_cdt.circumcenter(face), m_cdt.circumcenter(next));
+      Point intersect;
+
+      if(!face->is_blind()) //face sees
+      {
+        polygon.push_back(m_cdt.circumcenter(face));
+        if(next->is_blind())  //next doesn't
+        {
+          CGAL_assertion(do_intersect(line, m_cdt.segment(next->blinding_constraint())));
+          CGAL::assign(intersect,
+            CGAL::intersection(line, Line(m_cdt.segment(next->blinding_constraint()))));
+          polygon.push_back(intersect);
+        }
+      }
+      else //face doesn't see
+      {
+        if(!next->is_blind()) //next sees
+        {
+          CGAL_assertion(do_intersect(line, m_cdt.segment(face->blinding_constraint())));
+          CGAL::assign(intersect,
+            CGAL::intersection(line, Line(m_cdt.segment(face->blinding_constraint()))));
+          polygon.push_back(intersect);
+        }
+        else //next doesn't
+        {
+          if(face->blinding_constraint() != next->blinding_constraint()
+            && face->blinding_constraint() != m_cdt.mirror_edge(next->blinding_constraint()))
+            // the 2 blinding_constraints are different
+          {
+            CGAL_assertion(do_intersect(line, m_cdt.segment(face->blinding_constraint())));
+            CGAL::assign(intersect,
+              CGAL::intersection(line, Line(m_cdt.segment(face->blinding_constraint()))));
+            polygon.push_back(intersect);
+
+            Point intersection2;
+            CGAL_assertion(do_intersect(line, m_cdt.segment(next->blinding_constraint())));
+            CGAL::assign(intersection2,
+              CGAL::intersection(line, Line(m_cdt.segment(next->blinding_constraint()))));
+            polygon.push_back(intersection2);
+          }
+          //else: it's the same constraint--> do nothing
+        }
+      }
+    }//end CGAL_For_all
+
+    std::size_t nbp = polygon.size();
+    for(std::size_t i = 0; i < nbp; ++i)
+      *oit++ = Segment(polygon[i], polygon[(i+1)%nbp]);
+
+    return oit;
+  }
+
+  template <typename OutputIterator>
+  OutputIterator infinite_cvd_cell(Vertex_handle ,
+                                   OutputIterator oit) const
+  {
+    //TODO
+    return oit;
+  }
+
+  //returns true iff generators's cell is on the convex hull
+  bool bvd_cell_is_infinite(const Vertex_handle generator) const
+  {
+    Face_circulator face = m_cdt.incident_faces(generator);
+    Face_circulator begin = face;
+    CGAL_For_all(face, begin){
+      if(m_cdt.is_infinite(face))
+        return true;
+    }
+    return false;
+  }
+
+};// class Constrained_voronoi_diagram
+
+
+template<typename Tr>
+Cvd_cell_2<Tr> dual(const Tr& tr,
+                    const typename Tr::Vertex_handle& v)
+{
+  CGAL_triangulation_precondition( v != typename Tr::Vertex_handle());
+  CGAL_triangulation_precondition( !tr.is_infinite(v));
+
+  Constrained_voronoi_diagram_2<Tr> diagram(tr);
+  return diagram.cvd_cell(v);
+}
+
+// dual(v) implementation for Delaunay_triangulation_2
+//template<typename Tr, typename OutputIterator>
+//OutputIterator
+//dual(const Tr& tr,
+//     typename Tr::Vertex_handle v,
+//     OutputIterator oit)
+//{
+//  typedef Tr::Vertex_handle         Vertex_handle;
+//  typedef Tr::Face_handle           Face_handle;
+//  typedef Tr::Point                 Point;
+//  typedef Tr::Segment               Segment;
+//  typedef Tr::Geom_traits::Ray_2    Ray;
+//  typedef Tr::Geom_traits::Vector_2 Vector_2;
+//
+//  CGAL_triangulation_precondition( v != Vertex_handle());
+//  CGAL_triangulation_precondition( !tr.is_infinite(v));
+//
+//  // The Circulator moves ccw.
+//  std::vector<Segment> segments;
+//  std::vector<Ray> rays;
+//  Tr::Face_circulator fc = tr.incident_faces(v), done(fc);
+//  Point prev_cc;
+//  bool first_ = true;
+//  do
+//  {
+//    if(!tr.is_infinite(fc)) //finite edges (= segments)
+//    {
+//      if(first_)
+//        prev_cc = tr.circumcenter(fc);
+//      else
+//      {
+//        Point cc = tr.circumcenter(fc);
+//        *oit++ = Segment(cc, prev_cc);
+//        prev_cc = cc;
+//      }
+//      first_ = false;
+//    }
+//    else // infinite edges (= rays)
+//    {
+//      first_ = true;//for next segment
+//      //find the one finite edge
+//      for(int i = 0; i < 3; ++i)
+//      {
+//        if(!tr.is_infinite(fc,i))
+//        {
+//          Point m = CGAL::midpoint(fc->vertex(cw(i))->point(),
+//                                   fc->vertex(ccw(i))->point());
+//          Face_handle fn = fc->neighbor(i);
+//
+//          Point opp = fn->vertex(fn->index(fc))->point();
+//          double dot_prod = (m-cc)*(m-opp);
+//          if(dot_prod > 0.)      *oit++ = Ray(cc, m);
+//          else if(dot_prod < 0.) *oit++ = Ray(cc, Vector(m, cc));
+//          else //0. cc and m are the same point
+//          {
+//            Segment se = this->segment(Face_handle(fc,i));
+//            Vector_2 normal = se.supporting_line().perpendicular(m).to_vector();
+//            if(normal * (m - opp) > 0.)
+//              *oit++ = Ray(cc, normal);
+//            else
+//              *oit++ = Ray(cc, -normal);
+//          }
+//        }
+//      }
+//    }
+//  }
+//  while(++fc != done);
+//
+//  return oit;
+//}
+
+} //namespace CGAL
+#endif // CGAL_CONSTRAINED_VORONOI_DIAGRAM_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Constraint_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Constraint_hierarchy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Constraint_hierarchy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Constraint_hierarchy_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convertible_circulator_project.h b/3rdparty/CGAL-4.8/include/CGAL/Convertible_circulator_project.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convertible_circulator_project.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convertible_circulator_project.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convertible_filter_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Convertible_filter_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convertible_filter_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convertible_filter_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convertible_iterator_project.h b/3rdparty/CGAL-4.8/include/CGAL/Convertible_iterator_project.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convertible_iterator_project.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convertible_iterator_project.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Edge_sorter.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Edge_sorter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Edge_sorter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Edge_sorter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/External_structure_builder.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/External_structure_builder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/External_structure_builder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/External_structure_builder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/SFace_separator.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/SFace_separator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/SFace_separator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/SFace_separator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/SM_walls.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/SM_walls.h
new file mode 100644
index 0000000..72337e4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/SM_walls.h
@@ -0,0 +1,592 @@
+// Copyright (c) 2005-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$ 
+// $Id$
+// 
+//
+// Author(s)     :  Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+#ifndef CGAL_CD3_SM_WALLS_H
+#define CGAL_CD3_SM_WALLS_H
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 227
+#include <CGAL/Nef_2/debug.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+template<typename SMap>
+class SM_walls : SM_decorator<SMap> {
+
+  typedef SMap                            Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>  Base;
+  typedef Base                            SM_decorator;
+  typedef CGAL::SM_point_locator<Base>    SM_point_locator;
+  typedef typename Base::Sphere_point     Sphere_point;
+  typedef typename Base::Sphere_circle    Sphere_circle;
+  typedef typename Base::Sphere_direction Sphere_direction;
+  typedef typename Base::Sphere_segment   Sphere_segment;
+  
+  typedef typename Base::SVertex_handle   SVertex_handle;
+  typedef typename Base::SFace_handle     SFace_handle;
+  typedef typename Base::SHalfedge_handle SHalfedge_handle;
+  typedef typename Base::SHalfloop_handle SHalfloop_handle;
+  typedef typename Base::Object_handle    Object_handle;
+
+  typedef typename Sphere_point::Vector_3       Vector_3;
+  typedef typename Sphere_circle::Point_3        Point_3;
+  typedef typename Sphere_circle::Plane_3        Plane_3;
+  typedef typename Sphere_point::FT             FT;
+
+
+  typedef typename Base::SHalfedge_around_svertex_circulator 
+    SHalfedge_around_svertex_circulator ;
+  typedef typename Base::SHalfedge_around_sface_circulator 
+    SHalfedge_around_sface_circulator ;
+  typedef typename Base::SFace_cycle_iterator
+    SFace_cycle_iterator;
+  
+  using Base::new_svertex;
+  using Base::link_as_face_cycle;
+  using Base::unlink_as_face_cycle;
+  using Base::link_as_isolated_vertex;
+  using Base::unlink_as_isolated_vertex;
+  using Base::new_shalfedge_pair;
+  using Base::unlink_as_loop;
+  using Base::is_isolated;
+  using Base::is_sm_boundary_object;
+  using Base::delete_face;
+
+ public:
+  SM_walls(Sphere_map* M) : Base(M) {
+//   SM_decorator SD(sphere_map());
+//   SM_io_parser<SM_decorator>::dump(SD,std::cerr);
+  }
+
+  SHalfedge_handle find_cap(SVertex_handle sv, Sphere_point sp, Sphere_circle c) {
+    CGAL_USE(sp);
+    CGAL_NEF_TRACEN( "find_cap " << sv->source()->point() << ":" << sv->point() 
+	      << " , sp : " << sp );
+    /*
+    SHalfedge_handle se = sv->out_sedge();
+    if(se != SHalfedge_handle())
+      while(CGAL::spherical_orientation(cas(se)->twin()->source()->point(),
+					sp,
+					se->twin()->source()->point()) > 0)
+	se = cas(se);    
+
+    if(se != SHalfedge_handle()) {
+      CGAL_assertion(Sphere_circle(sv->point(),sp) != 
+		     Sphere_circle(sv->point(), se->twin()->source()->point()));
+    }
+    */
+    
+    SM_decorator SD(&*sv->source());
+    if( SD.is_isolated(sv))
+      return SHalfedge_handle();    
+
+    //    Sphere_circle c(sv->point(), sp);
+    CGAL_NEF_TRACEN( "sv    " << sv->point() );
+    CGAL_NEF_TRACEN( "c     " << c.orthogonal_vector() );
+    SHalfedge_around_svertex_circulator sh(sv->out_sedge()), send(sh);
+
+    Plane_3 pl(Point_3(0,0,0),Vector_3(sv->point()-CGAL::ORIGIN));
+    Sphere_circle cc(pl);
+
+    SHalfedge_around_svertex_circulator shnext(sh);      
+    ++shnext;
+    if(sh == shnext)
+      return sh;
+
+    CGAL_For_all(sh,send) {
+      shnext =sh;
+      ++shnext;
+
+      CGAL_NEF_TRACEN( "sh     " << sh->circle().orthogonal_vector() );
+      CGAL_NEF_TRACEN( "shnext " << shnext->circle().orthogonal_vector() );
+      Sphere_segment seg(sh->circle().orthogonal_vector(), shnext->circle().orthogonal_vector(),cc);
+      CGAL_NEF_TRACEN( "seg " << seg );
+      if(seg.has_on(c.orthogonal_vector()))
+	return sh;
+    }
+    CGAL_error_msg( "should not be executed");
+    return SHalfedge_handle();
+  }
+
+  void insert_new_svertex_into_sedge(SVertex_handle sv, SHalfedge_handle se) {
+    
+    CGAL_NEF_TRACEN( "insert new svertex into sedge " << sv->point() << " | " 
+	      << se->source()->point() << "->" << se->twin()->source()->point() );
+
+    CGAL_NEF_TRACEN( "double coords " << CGAL::to_double(sv->point().x())
+	      << ", " << CGAL::to_double(sv->point().y())
+	      << ", " << CGAL::to_double(sv->point().z()) );
+
+    //    SM_decorator SD(sphere_map());
+    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
+
+    CGAL_assertion(se->circle().has_on(sv->point()));
+
+    SHalfedge_handle se_new = this->new_shalfedge_pair();
+    SHalfedge_handle se_opp = se_new->twin();
+    se_new->source() = sv;
+    se_opp->source() = se->twin()->source();
+
+    se_new->circle() = se->circle();
+    CGAL_assertion(se_new->circle().has_on(se_new->source()->point()) &&
+		   se_new->circle().has_on(se_opp->source()->point()));
+    se_opp->circle() = se->twin()->circle();
+    se->twin()->source() = sv;
+    se_new->mark() = se_opp->mark() = se->mark();
+    se_new->incident_sface() = se->incident_sface();
+    se_opp->incident_sface() = se->twin()->incident_sface();
+
+    se_new->snext() = se->snext();
+    se->snext()->sprev() = se_new;
+    se->snext() = se_new;
+    se_new->sprev() = se;
+
+    se_opp->sprev() = se->twin()->sprev();
+    se->twin()->sprev()->snext() = se_opp;
+    se->twin()->sprev() = se_opp;
+    se_opp->snext() = se->twin();
+
+#ifndef CGAL_NEF_NO_INDEXED_ITEMS
+    se_new->set_index(se->get_index());
+    se_opp->set_index(se->twin()->get_index());
+#endif
+
+    se_new->source()->out_sedge() = se_new;
+    se_opp->source()->out_sedge() = se_opp;
+  }
+
+  void insert_new_svertex_into_sloop(SVertex_handle sv, SHalfloop_handle sl) {
+
+    SHalfedge_handle se = new_shalfedge_pair(sv, sv);
+    se->circle() = sl->circle();
+    se->twin()->circle() = sl->twin()->circle();
+    se->snext() = se->sprev() = se;
+    se->twin()->snext() = se->twin()->sprev() = se->twin();
+    se->incident_sface() = sl->incident_sface();
+    se->twin()->incident_sface() = sl->twin()->incident_sface();
+    se->mark() = se->twin()->mark() = sl->mark();
+
+#ifndef CGAL_NEF_NO_INDEXED_ITEMS
+    se->set_index(sl->get_index());
+    se->twin()->set_index(sl->twin()->get_index());
+#endif
+
+    unlink_as_loop(sl);
+    unlink_as_loop(sl->twin());
+
+    link_as_face_cycle(se,se->incident_sface());
+    link_as_face_cycle(se->twin(),se->twin()->incident_sface());
+
+    this->delete_loop_only();
+  }
+
+  bool legal_direction(Sphere_segment seg, Object_handle& o, Sphere_point& ip) {
+
+    CGAL_NEF_TRACEN( "legal_direction " << seg );
+    SM_point_locator P(this->sphere_map());
+    o = P.ray_shoot(seg, ip, false, false);
+
+    SVertex_handle sv;
+    if(assign(sv, o)) {
+      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
+      return true;
+    }
+
+    SHalfedge_handle se;
+    if(assign(se, o)) {
+      CGAL_NEF_TRACEN( "  found sedge " << ip );
+      return true;
+    }
+
+    SHalfloop_handle sl;
+    if(assign(sl, o)) {
+      CGAL_NEF_TRACEN( "  found sloop " << ip );
+      return true;
+    }
+
+    SFace_handle sf;
+    if(assign(sf, o))
+      CGAL_error_msg( "wrong handle");
+
+    CGAL_NEF_TRACEN("did not find anything");
+
+    ip = seg.target();
+    o = P.locate(seg.target());
+    /*
+    if(assign(sv, o)) {
+      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
+      if(is_isolated(sv))
+	return sv->incident_sface()->mark();
+      else {
+	bool collinear;
+	Sphere_direction d(seg.sphere_circle().opposite());
+	SHalfedge_handle e_res = P.out_wedge(sv, d, collinear);
+	if(collinear) {
+	  CGAL_NEF_TRACEN(" collinear ");
+	  o = Object_handle(e_res);
+	  return false;
+	} else {
+          if ( e_res->circle().has_on_negative_side(seg.source()) )
+            e_res = e_res->sprev();
+	  o = Object_handle(e_res->incident_sface());
+	  CGAL_NEF_TRACEN("  sface " << e_res->incident_sface()->mark());
+	  return e_res->incident_sface()->mark();
+	}
+      }
+    }
+    */
+    if(assign(sf, o)) {
+      CGAL_NEF_TRACEN( "  found sface" );
+      return sf->mark();
+    } 
+
+    /*    
+    if(assign(se,o))
+      CGAL_error_msg("wrong handle");
+
+    if(assign(sl,o))
+      CGAL_error_msg("wrong handle");
+    */
+    //    CGAL_NEF_SETDTHREAD(1);
+    return true;
+  }
+
+  bool need_to_shoot(Sphere_point sp, SVertex_handle& sv) {
+    //    CGAL_NEF_SETDTHREAD(47);
+    SM_point_locator pl(this->sphere_map());
+    Object_handle o = pl.locate(sp);
+    //        CGAL_NEF_SETDTHREAD(1);
+	
+    if(assign(sv, o))
+      return false;
+    
+    SHalfedge_handle se;
+    if(assign(se, o)) {
+      sv = new_svertex(sp);
+      sv->mark() = se->mark();
+      insert_new_svertex_into_sedge(sv, se);
+      return true;
+    }
+    
+    SFace_handle sf;
+    if(assign(sf, o)) {
+      if(sf->mark() == false)
+	return false;
+      sv = new_svertex(sp);
+      sv->mark() = sf->mark();
+      link_as_isolated_vertex(sv, sf);
+      return true;
+    }
+    
+    SHalfloop_handle sl;
+    if(assign(sl, o)) {
+      sv = new_svertex(sp);
+      sv->mark() = sl->mark();
+      insert_new_svertex_into_sloop(sv, sl);
+      return true;
+    }
+    
+    CGAL_error_msg( "wrong handle");
+    return false;
+  }
+  
+  SVertex_handle add_ray_svertex(Sphere_point sp) {
+
+    CGAL_NEF_TRACEN( "add_ray_svertex " << sp );
+
+    SM_point_locator P(this->sphere_map());
+
+    //    SM_decorator SD(this->sphere_map());
+    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
+
+    Object_handle o = P.locate(sp);
+
+    return add_svertex_into_object(sp,o);
+  }
+  
+  SVertex_handle add_svertex_into_object(Sphere_point sp, Object_handle o) {
+
+    CGAL_NEF_TRACEN( "add_svertex_into_object " << sp );
+
+    //    SM_decorator SD(this->sphere_map());
+    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
+
+    SVertex_handle sv;
+    SFace_handle sf;
+    if(assign(sf, o)) {
+      CGAL_NEF_TRACEN( "  found sface with mark " << sf->mark());
+      sv = new_svertex(sp);
+      sv->mark() = sf->mark();
+      sv->incident_sface() = sf;
+      link_as_isolated_vertex(sv,sf);
+      return sv;
+    }
+    
+    if(assign(sv, o)) {
+      CGAL_NEF_TRACEN( "  found svertex" );
+      return sv;
+    }
+
+    SHalfedge_handle se;
+    if(assign(se, o)) {
+      CGAL_NEF_TRACEN( "  found sedge");
+      sv = new_svertex(sp);
+      sv->mark() = se->mark();
+      insert_new_svertex_into_sedge(sv, se);
+      return sv;
+    }
+    
+    SHalfloop_handle sl;
+    if(assign(sl, o)) {
+      CGAL_NEF_TRACEN( " found sloop" );
+      sv = new_svertex(sp);
+      sv->mark() = sl->mark();
+      insert_new_svertex_into_sloop(sv,sl);
+      return sv;
+    }
+
+    CGAL_error_msg( "wrong handle");
+    return SVertex_handle();
+  }
+
+  SVertex_handle add_lateral_svertex(Sphere_segment sphere_ray, 
+				     bool compare_to_dir = false, 
+				     const Sphere_point& dir = Sphere_point()) {
+
+    CGAL_NEF_TRACEN( "add_lateral_svertex " << sphere_ray );
+
+    //    CGAL_assertion(sphere_ray.source() != dir);
+
+    Sphere_point sp1(sphere_ray.source());
+    Sphere_point sp2(sphere_ray.target());
+    CGAL_NEF_TRACEN( "double coords " << CGAL::to_double(sp1.x())
+	      << ", " << CGAL::to_double(sp1.y())
+	      << ", " << CGAL::to_double(sp1.z())
+	      << "->" << CGAL::to_double(sp2.x())
+	      << ", " << CGAL::to_double(sp2.y())
+	      << ", " << CGAL::to_double(sp2.z()) );
+
+    Sphere_point ip;
+    SM_point_locator P(this->sphere_map());
+    Object_handle o = P.ray_shoot(sphere_ray.source(), sphere_ray.sphere_circle(), ip);
+    if(compare_to_dir && dir != sphere_ray.source() && dir != ip) {
+      Sphere_segment test_seg(sphere_ray.source(), ip, sphere_ray.sphere_circle());
+      if(test_seg.has_on(dir)) {
+	SFace_handle sf;
+	o = P.locate(dir);
+	CGAL_assertion(assign(sf,o));
+	SVertex_handle sv = new_svertex(Sphere_point(dir));
+	sv->mark() = sf->mark();
+	link_as_isolated_vertex(sv, sf);
+	return sv;
+      }
+    }
+
+    SHalfedge_handle se;
+    if(assign(se,o)) {
+      CGAL_NEF_TRACEN( "  split sedge" );
+
+      SVertex_handle sv = new_svertex(ip);
+      sv->mark() = se->mark();
+      insert_new_svertex_into_sedge(sv,se);
+      return sv;    
+    }
+    
+    SVertex_handle sv;
+    if(assign(sv,o)) {
+      CGAL_NEF_TRACEN( "  found svertex " << sv->point() );
+      return sv;
+    }
+
+    SHalfloop_handle sl;
+    if(assign(sl,o)) {
+      CGAL_NEF_TRACEN( "  found sloop " );
+      SVertex_handle sv = new_svertex(ip);
+      sv->mark() = sl->mark();
+      insert_new_svertex_into_sloop(sv,sl);
+      /*
+      se = new_shalfedge_pair(sv, sv);
+      se->circle() = sl->circle();
+      se->twin()->circle() = sl->twin()->circle();
+      se->snext() = se->sprev() = se;
+      se->twin()->snext() = se->twin()->sprev() = se->twin();
+      se->incident_sface() = sl->incident_sface();
+      se->twin()->incident_sface() = sl->twin()->incident_sface();
+      se->mark() = se->twin()->mark() = sl->mark();
+      store_sm_boundary_object(se,se->incident_sface());
+      store_sm_boundary_object(se->twin(),se->twin()->incident_sface());
+
+      unlink_as_loop(sl);
+      unlink_as_loop(sl->twin());
+      delete_loop_only();
+      */
+      return sv;
+    }
+    
+    CGAL_error_msg( "wrong handle");
+    return SVertex_handle();
+  }
+
+#ifndef CGAL_NEF_NO_INDEXED_ITEMS
+  void add_sedge_between(SVertex_handle sv1, SVertex_handle sv2, 
+			 int& index1, int& index2,
+			 Sphere_circle c) {
+
+#else
+  void add_sedge_between(SVertex_handle sv1, SVertex_handle sv2, 
+			 Sphere_circle c) { // = Sphere_circle(sv1->point(),sv2->point())) {
+#endif
+    CGAL_NEF_TRACEN( "add sedges between " << sv1->point() 
+	      << ", " << sv2->point() 
+	      << " at " << sv1->source()->point() );
+
+    bool split_sface = true;
+
+    if(is_isolated(sv1)) {
+      split_sface = false;
+      if(!is_sm_boundary_object(sv1)) {
+	CGAL_NEF_TRACEN( "error " << sv1->point() << "at " << sv1->source()->point() );
+      }
+      unlink_as_isolated_vertex(sv1);
+    }
+    if(is_isolated(sv2)) {
+      split_sface = false;
+      if(!is_sm_boundary_object(sv2)) {
+	CGAL_NEF_TRACEN( "error " << sv2->point() << "at " << sv2->source()->point() );
+      }
+      unlink_as_isolated_vertex(sv2);
+    }
+
+    SHalfedge_handle cap1 = find_cap(sv1,sv2->point(),c);
+    if(cap1 != SHalfedge_handle()) CGAL_assertion(cap1->source()==sv1);
+    SHalfedge_handle cap2 = find_cap(sv2,sv1->point(),c.opposite());
+    if(cap2 != SHalfedge_handle()) CGAL_assertion(cap2->source()==sv2);
+
+    if(split_sface && 
+       cap1->incident_sface() == cap2->incident_sface()) {
+      SHalfedge_around_sface_circulator sfc(cap1), send(sfc);
+      CGAL_For_all(sfc,send)
+	if(is_sm_boundary_object(sfc))
+	  unlink_as_face_cycle(sfc);
+    }
+
+    /*
+     bool same_sface;
+     SHalfedge_handle entry;
+
+     if(split_sface) {      
+       same_sface = 
+	 cap1->incident_sface() == cap2->incident_sface();
+
+      std::cerr << "cap1 " << cap1->source()->point()
+		 << "->" << cap1->twin()->source()->point() << std::endl;
+       std::cerr << "cap2 " << cap2->source()->point()
+		 << "->" << cap2->twin()->source()->point() << std::endl;
+
+       if(same_sface) {
+	 SHalfedge_around_sface_circulator sfc(cap1), send(sfc);
+	 CGAL_For_all(sfc,send) {
+	   std::cerr << "check " << sfc->source()->point()
+		     << "->" << sfc->twin()->source()->point() << std::endl;
+	   if(is_sm_boundary_object(sfc))
+	     entry = sfc;
+	   if(sfc == cap2)
+	     same_sface = false;
+	 }
+       }
+     }
+    */
+    SHalfedge_handle se_new;
+    if(cap1 != SHalfedge_handle()) {
+      if(cap2 != SHalfedge_handle())
+	se_new = new_shalfedge_pair(cap1, cap2, this->AFTER, this->AFTER);
+      else 
+	se_new = new_shalfedge_pair(cap1, sv2, this->AFTER);
+      se_new->incident_sface() = se_new->twin()->incident_sface() = cap1->incident_sface();
+    } else {
+      if(cap2 != SHalfedge_handle()) {
+	se_new = new_shalfedge_pair(sv1, cap2, this->AFTER);
+	se_new->incident_sface() = se_new->twin()->incident_sface() = cap2->incident_sface();
+      } else {
+	se_new = new_shalfedge_pair(sv1, sv2);
+	se_new->incident_sface() = se_new->twin()->incident_sface() = sv1->incident_sface();
+      }
+    }
+    
+    se_new->mark() = se_new->twin()->mark() = se_new->incident_sface()->mark();
+#ifndef CGAL_NEF_NO_INDEXED_ITEMS
+    CGAL_assertion(index1==0 || index1!=index2);
+    if(index1==0) {
+      se_new->set_index();
+      se_new->twin()->set_index();
+      index1 = se_new->get_index();
+      index2 = se_new->twin()->get_index();
+    } else { 
+      se_new->set_index(index1);
+      se_new->twin()->set_index(index2);
+    }
+#endif 
+    CGAL_NEF_TRACEN( sv1->point() << "->" << sv2->point() << "==" 
+	      << se_new->source()->point() << "->" << se_new->twin()->source()->point() );
+
+    CGAL_assertion(sv1 == se_new->source() && 
+		   sv2 == se_new->twin()->source());
+
+    se_new->circle() = c;
+    se_new->twin()->circle() = c.opposite();
+
+    //    SM_decorator SD(this->sphere_map());
+    //    SM_io_parser<SM_decorator>::dump(SD,std::cerr);
+
+    if(split_sface) {
+      if(cap1->incident_sface() == cap2->incident_sface()) {
+	SFace_handle sf_new = this->new_sface();
+	SFace_handle sf_old = cap1->incident_sface();
+      
+	CGAL_NEF_TRACEN("sf_new->mark()=" << sf_old->mark());
+	sf_new->mark() = sf_old->mark();
+	CGAL_assertion(sf_old->mark());
+	link_as_face_cycle(se_new, sf_new);
+	link_as_face_cycle(se_new->twin(), sf_old);
+      } else {
+	/*
+	SHalfedge_handle se = cap2;
+	while(se->incident_sface() != cap1->incident_sface()) {
+	  se->incident_sface() = cap1->incident_sface();
+	  se=se->snext();
+	}
+	*/
+	SFace_handle sf1 = cap1->incident_sface();
+	delete_face(cap2->incident_sface());
+	// TODO: some relinkings are redundant
+	SHalfedge_around_sface_circulator hfc(cap1), hend(hfc);
+	CGAL_For_all(hfc,hend) hfc->incident_sface() = sf1;	
+      }
+    }
+
+    //    SM_decorator SD1(this->sphere_map());
+    //    SM_io_parser<SM_decorator>::dump(SD1,std::cerr);
+
+    // TODO: handle inner face cycles
+  }    
+};
+
+} //namespace CGAL
+#endif //CGAL_CD3_SM_WALLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_bykat_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_bykat_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_bykat_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_bykat_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_eddy_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_eddy_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_eddy_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_eddy_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_jarvis_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_jarvis_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_jarvis_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_jarvis_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_melkman_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_melkman_impl.h
new file mode 100644
index 0000000..8e4dffd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_melkman_impl.h
@@ -0,0 +1,129 @@
+// Copyright (c) 1999  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+#ifndef CGAL_CH_MELKMAN_IMPL_H
+#define CGAL_CH_MELKMAN_IMPL_H
+
+#ifndef CGAL_CH_NO_POSTCONDITIONS
+#include <CGAL/convexity_check_2.h>
+#endif // CGAL_CH_NO_POSTCONDITIONS
+
+#include <CGAL/Convex_hull_2/ch_assertions.h>
+#include <queue>
+#include <iterator>
+
+namespace CGAL {
+
+template <class InputIterator, class OutputIterator, class Traits>
+OutputIterator
+ch_melkman( InputIterator first, InputIterator last,
+            OutputIterator result, const Traits& ch_traits)
+{
+  typedef typename Traits::Point_2      Point;
+  typedef typename Traits::Equal_2      Equal_2;   
+  
+  typename Traits::Left_turn_2 left_turn  = ch_traits.left_turn_2_object();
+  Equal_2  equal_points = ch_traits.equal_2_object();
+  
+  CGAL_ch_assertion_code( \
+  typename Traits::Less_xy_2 less       = ch_traits.less_xy_2_object(); )
+  
+  std::deque< Point> Q;
+  
+  CGAL_ch_expensive_postcondition_code( std::deque< Point> IN; )
+  if (first == last) return result;           // 0 elements
+  Point p = *first;
+  CGAL_ch_expensive_postcondition_code( IN.push_back(p); )
+  if (++first == last)
+  { *result = p; ++result; return result; }   // 1 element
+  Point q = *first;
+  CGAL_ch_expensive_postcondition_code( IN.push_back(q); )
+  if (++first == last)                        // 2 elements
+  {
+    *result = p; ++result;
+    if (! equal_points(p,q))
+    { *result = q; ++result; }
+    return result;
+  }
+  Q.push_back( p);
+  
+  Point r;
+  while (first != last)
+  {
+    r = *first;
+    CGAL_ch_expensive_postcondition_code( IN.push_back(r); )
+    // visited input sequence =  p,..., q, r
+    if ( left_turn(p,q,r)) { Q.push_back( q);  break; }
+    if ( left_turn(q,p,r)) { Q.push_front( q); break; }
+    CGAL_ch_assertion( less( p, q) ? less (p, r) : less( r, p));
+    q = r;
+    ++first;
+  }
+  
+  
+  Point current = q;
+  if (first != last)           // non-collinear point r exists
+  {
+    
+    current = r;
+    // current, Q.front(), ..., Q.back()
+    // ccw convex hull of visited points
+    Point s;
+    while ( ++first != last)
+    {
+      r = *first;
+      CGAL_ch_expensive_postcondition_code( IN.push_back(r); )
+      if (left_turn( current, r, Q.front()) || 
+          left_turn( Q.back(), r, current))
+      // r outside cone Q.front(), current, Q.back() <=>
+      // right_turn( current, Q.front(), r) || 
+      // right_turn( Q.back(), current, r)
+      {
+        s = current;
+        while (!Q.empty() && !left_turn( r, s, Q.front()))
+        //      !left_turn( r, s, Q.front())
+        { s = Q.front(); Q.pop_front(); }
+        Q.push_front(s);
+        s = current;
+        while (!Q.empty() &&  !left_turn( s, r, Q.back()))
+        //     !right_turn( r, s, Q.back())
+        { s = Q.back(); Q.pop_back(); }
+        Q.push_back(s);
+        current = r;
+      }
+      
+    }
+    
+  }
+  
+  
+  Q.push_back( current);       // add last point to Q
+  CGAL_ch_postcondition( \
+  is_ccw_strongly_convex_2( Q.begin(), Q.end(), ch_traits));
+  CGAL_ch_expensive_postcondition( \
+  ch_brute_force_check_2( IN.begin(),IN.end(), Q.begin(),Q.end(), ch_traits));
+  std::copy( Q.begin(), Q.end(), result);
+  return result;
+  
+}
+
+} //namespace CGAL
+
+#endif // CGAL_CH_MELKMAN_IMPL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/convexity_check_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/convexity_check_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_2/convexity_check_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_2/convexity_check_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h
new file mode 100644
index 0000000..2db68b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h
@@ -0,0 +1,281 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jocelyn Meyron
+//
+
+#ifndef CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
+#define CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
+
+#include <CGAL/Convex_hull_3/dual/predicates.h>
+#include <CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h>
+#include <CGAL/Filtered_predicate.h>
+#include <CGAL/Cartesian_converter.h>
+
+// Traits class used during the computation of the dual convex
+// hull for the intersection of halfspaces.
+
+// This traits class base on the concept ConvexHullTraits_3
+
+namespace CGAL
+{
+  namespace Convex_hull_3
+  {
+    // Base traits class for dual predicates
+    template <class R_>
+      class Convex_hull_traits_base_dual_3
+      {
+        private:
+          // Origin : point inside the halfspaces intersection
+          typedef typename R_::Point_3 Primal_point_3;
+          Primal_point_3 origin;
+
+        public:
+
+          Convex_hull_traits_base_dual_3 (Primal_point_3 o =
+                                          Primal_point_3(0, 0, 0)) : origin(o)
+          {}
+
+          // Types
+          typedef R_                                     R;
+          typedef Convex_hull_traits_base_dual_3<R>      Self;
+          typedef typename R::RT                         RT;
+
+          // Dual
+          typedef typename R::Plane_3         Point_3;
+          typedef Plane_dual<R>               Plane_3;
+          typedef Segment_dual<R>             Segment_3;
+          typedef Plane_dual<R>               Triangle_3;
+
+          // Traits used by convex_hull_2
+          typedef typename CGAL::Convex_hull_3::Traits_xy_dual<R> Traits_xy_3;
+          typedef typename CGAL::Convex_hull_3::Traits_yz_dual<R> Traits_yz_3;
+          typedef typename CGAL::Convex_hull_3::Traits_xz_dual<R> Traits_xz_3;
+
+          // Construct objects
+          // Segment_3
+          class Construct_segment_3 {
+            public:
+              Segment_3 operator ()(const Point_3& p, const Point_3& q)
+              {
+                return Segment_3(p, q);
+              }
+          };
+
+          // Triangle_3
+          class Construct_triangle_3 {
+            public:
+              Triangle_3 operator ()(const Point_3& p,
+                                     const Point_3& q,
+                                     const Point_3& r)
+              {
+                return Triangle_3(p, q, r);
+              }
+          };
+
+          // Plane_3
+          class Construct_plane_3 {
+              public:
+                  Plane_3 operator ()(const Point_3& p,
+                                      const Point_3& q,
+                                      const Point_3& r)
+                  {
+                      return Plane_3(p,q,r);
+                  }
+          };
+
+          // Predicates
+          typedef Equal_3_dual_point<R>                     Equal_3;
+          typedef Collinear_3_dual_point<R>                 Collinear_3;
+          typedef Coplanar_3_dual_point<R>                  Coplanar_3;
+          typedef Has_on_positive_side_3_dual_point<R>      Has_on_positive_side_3;
+          typedef Less_distance_to_point_3_dual_point<R>    Less_distance_to_point_3;
+          typedef Less_signed_distance_to_plane_3_dual_point<R> Less_signed_distance_to_plane_3;
+
+          Construct_segment_3
+              construct_segment_3_object() const
+              { return Construct_segment_3(); }
+
+          Construct_plane_3
+              construct_plane_3_object() const
+              { return Construct_plane_3(); }
+
+          Construct_triangle_3
+              construct_triangle_3_object() const
+              { return Construct_triangle_3(); }
+
+          Collinear_3
+              collinear_3_object() const
+              { return Collinear_3(origin); }
+
+          Coplanar_3
+              coplanar_3_object() const
+              { return Coplanar_3(origin); }
+
+          Less_distance_to_point_3
+              less_distance_to_point_3_object() const
+              { return Less_distance_to_point_3(origin); }
+
+          Has_on_positive_side_3
+              has_on_positive_side_3_object() const
+              { return Has_on_positive_side_3(origin); }
+
+          Equal_3
+              equal_3_object() const
+              { return Equal_3(origin); }
+
+          Less_signed_distance_to_plane_3
+              less_signed_distance_to_plane_3_object() const
+              { return Less_signed_distance_to_plane_3(origin); }
+
+      };
+
+    // Non-filtered traits class
+    template <class R_, bool Has_filtered_predicates = R_::Has_filtered_predicates >
+        class Convex_hull_traits_dual_3
+        : public Convex_hull_traits_base_dual_3<R_>
+        {
+            private:
+                typedef typename R_::Point_3 Primal_point_3;
+
+            public:
+                Convex_hull_traits_dual_3 (Primal_point_3 o =
+                                           Primal_point_3(0, 0, 0)) : Convex_hull_traits_base_dual_3<R_>(o)
+                {}
+        } ;
+
+    // Converter for dual planes
+    template <class K1, class K2>
+        struct Cartesian_converter_dual : public Cartesian_converter<K1, K2>
+    {
+        using CGAL::Cartesian_converter<K1, K2>::operator();
+
+        Plane_dual<K2> operator() (const Plane_dual<K1> &in) const
+        {
+            return Plane_dual<K2>(operator()(in.p1),
+                                  operator()(in.p2),
+                                  operator()(in.p3));
+        }
+    };
+
+    // Filtered traits
+    template <typename R_>
+        class Convex_hull_filtered_traits_dual_3
+        : public Convex_hull_traits_base_dual_3<R_>
+        {
+            private:
+                // Origin
+                typedef typename R_::Point_3 Primal_point_3;
+                Primal_point_3 origin;
+
+            public:
+                Convex_hull_filtered_traits_dual_3 (Primal_point_3 o =
+                                                    Primal_point_3(0, 0, 0)) : origin(o)
+                {}
+
+                // Exact traits is based on the exact kernel.
+                typedef Convex_hull_traits_dual_3<typename R_::Exact_kernel>
+                    Exact_traits;
+
+                // Filtering traits is based on the filtering kernel.
+                typedef Convex_hull_traits_dual_3<typename R_::Approximate_kernel>
+                    Filtering_traits;
+
+                // Converters
+                typedef Cartesian_converter_dual<R_, typename R_::Exact_kernel>
+                    Converter_exact_dual;
+                typedef Cartesian_converter_dual<R_, typename R_::Approximate_kernel>
+                    Converter_approx_dual;
+
+                // Filtered predicates
+                typedef Filtered_predicate<
+                    typename Exact_traits::Equal_3,
+                    typename Filtering_traits::Equal_3,
+                    Converter_exact_dual ,
+                    Converter_approx_dual > Equal_3;
+
+                typedef Filtered_predicate<
+                    typename Exact_traits::Collinear_3,
+                    typename Filtering_traits::Collinear_3,
+                    Converter_exact_dual,
+                    Converter_approx_dual > Collinear_3;
+
+                typedef Filtered_predicate<
+                    typename Exact_traits::Coplanar_3,
+                    typename Filtering_traits::Coplanar_3,
+                    Converter_exact_dual,
+                    Converter_approx_dual > Coplanar_3;
+
+                typedef Filtered_predicate<
+                    typename Exact_traits::Less_distance_to_point_3,
+                    typename Filtering_traits::Less_distance_to_point_3,
+                    Converter_exact_dual,
+                    Converter_approx_dual > Less_distance_to_point_3;
+
+                typedef Filtered_predicate<
+                    typename Exact_traits::Has_on_positive_side_3,
+                    typename Filtering_traits::Has_on_positive_side_3,
+                    Converter_exact_dual,
+                    Converter_approx_dual > Has_on_positive_side_3;
+
+                typedef Filtered_predicate<
+                    typename Exact_traits::Less_signed_distance_to_plane_3,
+                    typename Filtering_traits::Less_signed_distance_to_plane_3,
+                    Converter_exact_dual,
+                    Converter_approx_dual > Less_signed_distance_to_plane_3;
+
+                Collinear_3 collinear_3_object() const
+                { return Collinear_3(origin); }
+
+                Coplanar_3 coplanar_3_object() const
+                { return Coplanar_3(origin); }
+
+                Less_distance_to_point_3 less_distance_to_point_3_object() const
+                { return Less_distance_to_point_3(origin); }
+
+                Equal_3 equal_3_object() const
+                { return Equal_3(origin); }
+
+                Has_on_positive_side_3 has_on_positive_side_3_object() const
+                { return Has_on_positive_side_3(origin); }
+
+                Less_signed_distance_to_plane_3
+                less_signed_distance_to_plane_3_object() const
+                { return Less_signed_distance_to_plane_3(origin); }
+
+                // Constructions are inherited
+        };
+
+    // Traits specialization
+    template <typename R_>
+        class Convex_hull_traits_dual_3<R_, true>
+        : public Convex_hull_filtered_traits_dual_3<R_>
+        {
+            private:
+                typedef typename R_::Point_3 Primal_point_3;
+
+            public:
+                Convex_hull_traits_dual_3 (Primal_point_3 o =
+                                           Primal_point_3(0, 0, 0)) : Convex_hull_filtered_traits_dual_3<R_>(o)
+                {}
+        } ;
+  } // namespace Convex_hull_3
+} // namespace CGAL
+
+#endif // CGAL_CONVEX_HULL_TRAITS_DUAL_3_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
new file mode 100644
index 0000000..49b9af6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
@@ -0,0 +1,306 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jocelyn Meyron
+//
+
+#ifndef CGAL_HALFSPACE_INTERSECTION_3_H
+#define CGAL_HALFSPACE_INTERSECTION_3_H
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h>
+#include <CGAL/Origin.h>
+#include <CGAL/convex_hull_3.h>
+#include <CGAL/intersections.h>
+#include <CGAL/assertions.h>
+
+// For interior_polyhedron_3
+#include <CGAL/Convex_hull_3/dual/interior_polyhedron_3.h>
+#include <CGAL/internal/Exact_type_selector.h>
+
+ #include <boost/type_traits/is_floating_point.hpp>
+
+namespace CGAL
+{
+    namespace Convex_hull_3
+    {
+        namespace internal
+        {
+            // Build the primal polyhedron associated to a dual polyhedron
+            // We also need the `origin` which represents a point inside the primal polyhedron
+            template <typename K, class Polyhedron_dual, class Polyhedron>
+                class Build_primal_polyhedron :
+                    public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS> {
+                        typedef typename Polyhedron::HalfedgeDS HDS;
+                        const Polyhedron_dual & _dual;
+
+                        // Origin
+                        typedef typename K::Point_3 Primal_point_3;
+                        Primal_point_3 origin;
+
+                        public:
+                        Build_primal_polyhedron (const Polyhedron_dual & dual,
+                                                 Primal_point_3 o =
+                                                 Primal_point_3(CGAL::ORIGIN)) : _dual (dual), origin(o)
+                        {}
+
+                        void operator () (HDS &hds)
+                        {
+                            typedef typename K::RT RT;
+                            typedef typename K::Point_3 Point_3;
+
+                            // Typedefs for dual
+                            typedef typename Polyhedron_dual::Facet Facet;
+                            typedef typename Polyhedron_dual::Facet_const_handle
+                                Facet_const_handle;
+                            typedef typename Polyhedron_dual::Facet_const_iterator
+                                Facet_const_iterator;
+                            typedef typename Polyhedron_dual::Vertex_const_iterator
+                                Vertex_const_iterator;
+
+                            // Typedefs for primal
+                            typename CGAL::Polyhedron_incremental_builder_3<HDS> B(hds, true);
+
+                            // Typedefs for intersection
+                            typedef typename K::Plane_3 Plane_3;
+                            typedef typename K::Line_3 Line_3;
+                            typedef boost::optional< boost::variant< Point_3,
+                                                                     Line_3,
+                                                                     Plane_3 > > result_inter;
+
+                            B.begin_surface(_dual.size_of_facets(),
+                                            _dual.size_of_vertices(),
+                                            _dual.size_of_halfedges());
+
+                            std::map <Facet_const_handle, size_t> primal_vertices;
+                            size_t n = 0;
+
+                            // First, computing the primal vertices
+                            for (Facet_const_iterator it = _dual.facets_begin();
+                                 it != _dual.facets_end(); ++it, ++n) {
+                                typename Facet::Halfedge_const_handle h = it->halfedge();
+                                // Build the dual plane corresponding to the current facet
+                                Plane_3 p1 = h->vertex()->point();
+                                Plane_3 p2 = h->next()->vertex()->point();
+                                Plane_3 p3 = h->next()->next()->vertex()->point();
+
+                                RT dp1 = p1.d() + origin.x() * p1.a()
+                                    + origin.y() * p1.b() + origin.z() * p1.c();
+                                RT dp2 = p2.d() + origin.x() * p2.a()
+                                    + origin.y() * p2.b() + origin.z() * p2.c();
+                                RT dp3 = p3.d() + origin.x() * p3.a()
+                                    + origin.y() * p3.b() + origin.z() * p3.c();
+
+                                Plane_3 pp1(p1.a(), p1.b(), p1.c(), dp1);
+                                Plane_3 pp2(p2.a(), p2.b(), p2.c(), dp2);
+                                Plane_3 pp3(p3.a(), p3.b(), p3.c(), dp3);
+
+                                // Compute the intersection
+                                result_inter result = CGAL::intersection(pp1, pp2, pp3);
+                                CGAL_assertion_msg(bool(result),
+                                                   "halfspace_intersection_3: no intersection");
+                                CGAL_assertion_msg(boost::get<Point_3>(& *result) != NULL,
+                                                   "halfspace_intersection_3: intersection is not a point");
+
+                                const Point_3* pp = boost::get<Point_3>(& *result);
+
+                                // Primal vertex associated to the current dual plane
+                                Point_3 ppp(origin.x() + pp->x(),
+                                            origin.y() + pp->y(),
+                                            origin.z() + pp->z());
+
+                                B.add_vertex(ppp);
+                                primal_vertices[it] = n;
+                            }
+
+                            // Then, add facets to the primal polyhedron
+                            // To do this, for each dual vertex, we circulate around this vertex
+                            // and we add an edge between each facet we encounter
+                            for (Vertex_const_iterator it = _dual.vertices_begin();
+                                 it != _dual.vertices_end(); ++it) {
+                                typename Polyhedron_dual::Halfedge_around_vertex_const_circulator
+                                    h0 = it->vertex_begin(), hf = h0;
+
+                                B.begin_facet();
+                                do {
+                                    B.add_vertex_to_facet(primal_vertices[hf->facet()]);
+                                } while (--hf != h0);
+                                B.end_facet();
+                            }
+
+                            B.end_surface();
+                        }
+                    };
+
+            // Test if a point is inside a convex polyhedron
+            template <class Polyhedron>
+            bool point_inside_convex_polyhedron (const Polyhedron &P,
+                                                 typename Polyhedron::Traits::Point_3 const& p) {
+                // Compute the equations of the facets of the polyhedron
+                typedef typename Polyhedron::Facet_const_iterator Facet_iterator;
+                for(Facet_iterator  fit=P.facets_begin(), fit_end=P.facets_end();
+                                    fit!=fit_end; ++fit)
+                {
+                  typename Polyhedron::Halfedge_const_handle h = fit->halfedge();
+                  typename Polyhedron::Traits::Point_3 const& p1=h->vertex()->point();
+                  typename Polyhedron::Traits::Point_3 const& p2=h->next()->vertex()->point();
+                  h=h->next()->next();
+                  typename Polyhedron::Traits::Point_3 p3 = h->vertex()->point();
+                  while( h!=fit->halfedge() && collinear(p1,p2,p3) )
+                  {
+                    h=h->next();
+                    p3 = h->vertex()->point();
+                  }
+                  if (h==fit->halfedge()) continue; //degenerate facet, skip it
+
+                  if ( orientation (p1, p2, p3, p) != CGAL::NEGATIVE ) return false;
+                }
+
+                return true;
+            }
+
+            template <class Plane>
+            bool collinear_plane (Plane u, Plane v) {
+                typedef typename Kernel_traits<Plane>::Kernel Kernel;
+                typedef typename Kernel::Vector_3 Vector;
+
+                Vector uu = u.orthogonal_vector();
+                Vector vv = v.orthogonal_vector();
+
+                return CGAL::cross_product(uu, vv) == Vector(0, 0, 0);
+            }
+
+            template <class Plane>
+            bool coplanar_plane (Plane u, Plane v, Plane w) {
+                typedef typename Kernel_traits<Plane>::Kernel Kernel;
+                typedef typename Kernel::Vector_3 Vector;
+
+                Vector uu = u.orthogonal_vector();
+                Vector vv = v.orthogonal_vector();
+                Vector ww = w.orthogonal_vector();
+
+                return CGAL::orientation(uu, vv, ww) == CGAL::COPLANAR;
+            }
+
+            // Checks if the dimension of intersection of the planes
+            // is a polyhedron (dimension == 3)
+            template <class InputPlaneIterator>
+            bool is_intersection_dim_3 (InputPlaneIterator begin,
+                                        InputPlaneIterator end) {
+                typedef typename std::iterator_traits<InputPlaneIterator>::value_type Plane;
+                typedef typename std::vector<Plane>::iterator PlaneIterator;
+
+                std::vector<Plane> planes(begin, end);
+                // Remove same planes
+                std::size_t size = planes.size();
+
+                // At least 4 points
+                if (size < 4)
+                    return false;
+
+                // Look for two non-parallel planes
+                PlaneIterator plane1_it = planes.begin();
+                PlaneIterator plane2_it = cpp11::next(planes.begin());
+
+                while (plane2_it != planes.end() &&
+                       collinear_plane(*plane1_it, *plane2_it)) {
+                    ++plane2_it;
+                }
+
+                if (plane2_it == planes.end()) return false;
+
+                PlaneIterator plane3_it = cpp11::next(plane2_it);
+
+                // Look for a triple of planes intersecting in a point
+                while (plane3_it != planes.end() &&
+                       coplanar_plane(*plane1_it, *plane2_it, *plane3_it)) {
+                    ++plane3_it;
+                }
+
+                if (plane3_it == planes.end()) return false;
+
+                return true;
+            }
+        } // namespace internal
+    } // namespace Convex_hull_3
+
+    // Compute the intersection of halfspaces.
+    // If the user gives an origin then the function used it, otherwise, it is
+    // computed using a linear program.
+    template <class PlaneIterator, class Polyhedron>
+    void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end,
+                                   Polyhedron &P,
+                                   boost::optional<typename Polyhedron::Vertex::Point_3> origin = boost::none) {
+        // Checks whether the intersection is a polyhedron
+        CGAL_assertion_msg(Convex_hull_3::internal::is_intersection_dim_3(begin, end), "halfspace_intersection_3: intersection not a polyhedron");
+
+        // Types
+        typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
+        typedef Convex_hull_3::Convex_hull_traits_dual_3<K> Hull_traits_dual_3;
+        typedef Polyhedron_3<Hull_traits_dual_3> Polyhedron_dual_3;
+        typedef Convex_hull_3::internal::Build_primal_polyhedron<K, Polyhedron_dual_3, Polyhedron> Builder;
+
+        // if a point inside is not provided find one using linear programming
+        if (!origin) {
+          // choose exact integral type
+          typedef typename internal::Exact_field_selector<void*>::Type ET;
+
+          // find a point inside the intersection
+          typedef Interior_polyhedron_3<K, ET> Interior_polyhedron;
+          Interior_polyhedron interior;
+          CGAL_assertion_code(bool interior_point_found = )
+          interior.find(begin, end);
+          CGAL_assertion_msg(interior_point_found, "halfspace_intersection_3: problem when determing a point inside the intersection");
+          origin = boost::make_optional(interior.inside_point());
+        }
+
+        // make sure the origin is on the negative side of all the planes
+        CGAL_assertion_code(for(PlaneIterator pit=begin;pit!=end;++pit))
+          CGAL_assertion(pit->has_on_negative_side(*origin));
+
+        // compute the intersection of the half-space using the dual formulation
+        Hull_traits_dual_3 dual_traits(*origin);
+        Polyhedron_dual_3 dual_convex_hull;
+        CGAL::convex_hull_3(begin, end, dual_convex_hull, dual_traits);
+        Builder build_primal(dual_convex_hull, *origin);
+        P.delegate(build_primal);
+
+        // Posterior check if the origin is inside the computed polyhedron
+        // The check is done only if the number type is not float or double because in that
+        // case we know the construction of dual points is not exact
+        CGAL_assertion_msg(
+          boost::is_floating_point<typename K::FT>::value ||
+          Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin),
+          "halfspace_intersection_3: origin not in the polyhedron"
+        );
+    }
+
+  #ifndef CGAL_NO_DEPRECATED_CODE
+  // Compute the intersection of halfspaces (an interior point is given.)
+  template <class PlaneIterator, class Polyhedron>
+  void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end,
+                                 Polyhedron &P,
+                                 typename Polyhedron::Vertex::Point_3 const& origin) {
+    halfspace_intersection_3(begin, end , P, boost::make_optional(origin));
+  }
+  #endif
+} // namespace CGAL
+
+#endif // CGAL_HALFSPACE_INTERSECTION_3_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h
new file mode 100644
index 0000000..51ab1b6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h
@@ -0,0 +1,179 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jocelyn Meyron
+//
+
+#ifndef CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
+#define CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Origin.h>
+#include <CGAL/convex_hull_3.h>
+#include <CGAL/assertions.h>
+
+// For interior_polyhedron_3
+#include <CGAL/Convex_hull_3/dual/interior_polyhedron_3.h>
+#include <CGAL/internal/Exact_type_selector.h>
+
+namespace CGAL
+{
+    namespace internal
+    {
+        template <class Polyhedron>
+        class Build_dual_polyhedron :
+                public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS>
+        {
+            typedef typename Polyhedron::HalfedgeDS HDS;
+            typedef typename Polyhedron::Traits::Point_3 Point_3;
+            const Polyhedron &_primal;
+            Point_3 origin;
+
+            public:
+            Build_dual_polyhedron (const Polyhedron & primal,
+                                   Point_3 o = Point_3(CGAL::ORIGIN)):
+                _primal (primal), origin(o)
+            {}
+
+            void operator () (HDS &hds)
+            {
+                typedef typename Polyhedron::Facet Facet;
+                typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
+                typedef typename Polyhedron::Facet_const_iterator Facet_const_iterator;
+                typedef typename Polyhedron::Vertex_const_iterator Vertex_const_iterator;
+                typename CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+
+                B.begin_surface(_primal.size_of_facets(),
+                                _primal.size_of_vertices(),
+                                _primal.size_of_halfedges());
+
+                // compute coordinates of extreme vertices in the dual polyhedron
+                // from primal faces
+                std::map<Facet_const_handle, size_t> extreme_points;
+                size_t n = 0;
+
+                for (Facet_const_iterator it = _primal.facets_begin();
+                     it != _primal.facets_end(); ++it, ++n)
+                {
+                    typename Facet::Halfedge_const_handle h = it->halfedge();
+                    typename Facet::Plane_3 p ( h->vertex()->point(),
+                                                h->next()->vertex()->point(),
+                                                h->next()->next()->vertex()->point());
+                    // translate extreme vertex
+                    Point_3 extreme_p = CGAL::ORIGIN + p.orthogonal_vector () / (-p.d());
+                    Point_3 translated_extreme_p(extreme_p.x() + origin.x(),
+                                                 extreme_p.y() + origin.y(),
+                                                 extreme_p.z() + origin.z());
+                    B.add_vertex(translated_extreme_p);
+                    extreme_points[it] = n;
+                }
+
+                // build faces
+                for (Vertex_const_iterator it = _primal.vertices_begin();
+                     it != _primal.vertices_end(); ++it)
+                {
+                    CGAL_assertion (it->is_bivalent() == false);
+
+                    typename Polyhedron::Halfedge_around_vertex_const_circulator
+                        h0 = it->vertex_begin(), hf = h0;
+
+                    B.begin_facet();
+                    do
+                    {
+                        B.add_vertex_to_facet(extreme_points[hf->facet()]);
+                    } while (--hf != h0);
+                    B.end_facet();
+                }
+
+                B.end_surface();
+            }
+        };
+    } // namespace internal
+
+    // Compute the intersection of halfspaces by constructing explicitly
+    // the dual points with the traits class for convex_hull_3 given
+    // as an argument
+    template <class PlaneIterator, class Polyhedron, class Traits>
+    void halfspace_intersection_with_constructions_3(PlaneIterator pbegin,
+                                                     PlaneIterator pend,
+                                                     Polyhedron &P,
+                                                     boost::optional<typename Polyhedron::Vertex::Point_3> const& origin,
+                                                     const Traits & ch_traits) {
+            typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
+            typedef typename K::Point_3 Point;
+            typedef typename K::Plane_3 Plane;
+            typedef typename CGAL::internal::Build_dual_polyhedron<Polyhedron> Builder;
+
+            Point p_origin;
+            
+            if (origin) {
+              p_origin = boost::get(origin);
+            } else {
+              // choose exact integral type
+              typedef typename internal::Exact_field_selector<void*>::Type ET;
+
+              // find a point inside the intersection
+              typedef Interior_polyhedron_3<K, ET> Interior_polyhedron;
+              Interior_polyhedron interior;
+              CGAL_assertion_code(bool res = )
+              interior.find(pbegin, pend);
+              CGAL_assertion_msg(res, "halfspace_intersection_with_constructions_3: problem when determing a point inside");
+              p_origin = interior.inside_point();
+            }
+
+            // construct dual points to apply the convex hull
+            std::vector<Point> dual_points;
+            for (PlaneIterator p = pbegin; p != pend; ++p) {
+                // make sure the origin is on the negative side of all the planes
+                CGAL_assertion(p->has_on_negative_side(p_origin));
+
+                // translate plane
+                Plane translated_p(p->a(),
+                                   p->b(),
+                                   p->c(),
+                                   p->d() + p_origin.x() * p->a() + p_origin.y() * p->b() + p_origin.z() * p->c());
+                dual_points.push_back(CGAL::ORIGIN + translated_p.orthogonal_vector () / (-translated_p.d()));
+            }
+
+            Polyhedron ch;
+            CGAL::convex_hull_3(dual_points.begin(), dual_points.end(), ch, ch_traits);
+
+            Builder build_dual (ch, p_origin);
+            P.delegate(build_dual);
+        }
+
+    // Compute the intersection of halfspaces by constructing explicitly
+    // the dual points with the default traits class for convex_hull_3.
+    template <class PlaneIterator, class Polyhedron>
+    void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin,
+                                                      PlaneIterator pend,
+                                                      Polyhedron &P,
+                                                      boost::optional<typename Polyhedron::Vertex::Point_3> const& origin = boost::none) {
+        typedef typename Kernel_traits<typename Polyhedron::Vertex::Point_3>::Kernel K;
+        typedef typename K::Point_3 Point_3;
+        typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
+
+        halfspace_intersection_with_constructions_3(pbegin, pend, P, origin, Traits());
+    }
+
+
+} // namespace CGAL
+
+#endif // CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h
new file mode 100644
index 0000000..64f4382
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jocelyn Meyron
+//                 Pierre Alliez
+//
+
+#ifndef INTERIOR_POLYHEDRON_3_H
+#define INTERIOR_POLYHEDRON_3_H
+
+// LP solver to compute an interior point of a polyhedron
+#include <CGAL/QP_functions.h>
+#include <CGAL/QP_models.h>
+#include <limits>
+#include <CGAL/number_utils.h>
+#include <CGAL/assertions.h>
+
+// Description taken from http://www.qhull.org/html/qhalf.htm
+
+// If you do not know an interior point for the halfspaces, use linear programming
+// to find one. Assume, n halfspaces defined by: aj*x1+bj*x2+cj*x3+dj>=0, j=1..n.
+// Perform the following linear program:
+//		max(x5) aj*x1+bj*x2+cj*x3+dj*x4-x5>=0, j=1..n
+
+// Then, if [x1,x2,x3,x4,x5] is an optimal m_solution with x4,x5>0 we get:
+//		aj*(x1/x4)+bj*(x2/x4)+cj*(x3/x4)+dj>=(x5/x4)>0, j=1..n
+// and conclude that the point [x1/x4,x2/x4,x3/x4] is in the interior of all
+// the halfspaces. Note that x5 is optimal, so this point is "way in" the
+// interior (good for precision errors).
+
+// After finding an interior point, the rest of the intersection algorithm is
+// from Preparata & Shamos ['85, p. 316, "A simple case ..."]. Translate the
+// halfspaces so that the interior point is the origin. Calculate the dual
+// polytope. The dual polytope is the convex hull of the vertices dual to the
+// original faces in regard to the unit sphere (i.e., halfspaces at distance
+// d from the origin are dual to vertices at distance 1/d). Then calculate
+// the resulting polytope, which is the dual of the dual polytope, and
+// translate the origin back to the interior point [S. Spitz and S. Teller].
+
+// NOTE here we change this to max(x4) under constraints aj*x1 + bj*x2 + cj*x3 + dj - x4 >= 0, j=1..n
+//  i.e. aj*x1 + bj*x2 + cj*x3 - x4 >= -dj, j=1..n
+// Then, if [x1,x2,x3,x4] is an optimal m_solution with x3 > 0 we pick
+// the point [x1,x2,x3] as inside point.
+
+template <class Kernel, class ET>
+class Interior_polyhedron_3 {
+        // 3D
+        typedef typename Kernel::FT FT;
+        typedef typename Kernel::Plane_3 Plane;
+        typedef typename Kernel::Point_3 Point;
+
+        // program and solution types
+        typedef CGAL::Quadratic_program<double> LP;
+        typedef typename CGAL::Quadratic_program_solution<ET> Solution;
+        typedef typename Solution::Variable_value_iterator Variable_value_iterator;
+        typedef CGAL::Real_embeddable_traits<typename Variable_value_iterator::value_type> RE_traits;
+        typename RE_traits::To_double to_double;
+        Solution m_solution;
+        Point m_inside_point;
+        Point m_optimal_point;
+
+    public:
+        Point& inside_point() { return m_inside_point; }
+        const Point& inside_point() const { return m_inside_point; }
+        Point& optimal_point() { return m_optimal_point; }
+        const Point& optimal_point() const { return m_optimal_point; }
+
+        // Determines if a value is infinite or not
+        template<typename T>
+        inline bool isinf(T value) {
+            return value == std::numeric_limits<T>::infinity();
+        }
+
+        // Find a point inside the polyhedron defined by a list of planes
+        // InputIterator::value_type = Plane
+        template < class InputIterator >
+        bool find(InputIterator begin, InputIterator end) {
+            // solve linear program
+            LP lp(CGAL::LARGER,false); // with constraints Ax >= b
+
+            // column indices
+            const int index_x1 = 0;
+            const int index_x2 = 1;
+            const int index_x3 = 2;
+            const int index_x4 = 3;
+
+            // assemble linear program
+            int j = 0; // row index
+            // iterate over segments
+            InputIterator it;
+            for(it = begin; it != end; ++it, j++) {
+                const Plane& plane = *it;
+                const double aj = CGAL::to_double(plane.a());
+                const double bj = CGAL::to_double(plane.b());
+                const double cj = CGAL::to_double(plane.c());
+                const double dj = CGAL::to_double(plane.d());
+
+                CGAL_assertion(!isinf(aj));
+                CGAL_assertion(!isinf(bj));
+                CGAL_assertion(!isinf(cj));
+                CGAL_assertion(!isinf(dj));
+
+                // plane defined the halfspace: aj * x1 + bj * x2 + cj * x3 + dj <= 0
+                // <=> - (aj * x1 + bj * x2 + cj * x3 + dj) >= 0
+                // j^th constraint: -(aj * x1 + bj * x2 + cj * x3 + x4) >= dj
+                lp.set_a(index_x1, j,   -aj);
+                lp.set_a(index_x2, j,   -bj);
+                lp.set_a(index_x3, j,   -cj);
+                lp.set_a(index_x4, j, -1.0);
+
+                // right hand side
+                lp.set_b(j, dj);
+            }
+
+            // objective function -> max x4 (negative sign set because
+            // the lp solver always minimizes an objective function)
+            lp.set_c(index_x4,-1.0);
+
+            // solve the linear program
+            m_solution = CGAL::solve_linear_program(lp, ET());
+
+            if(m_solution.is_infeasible())
+                return false;
+
+            if(!m_solution.is_optimal())
+                return false;
+
+            // get variables
+            Variable_value_iterator X = m_solution.variable_values_begin();
+
+            // solution if x4 > 0
+            double x4 = to_double(X[index_x4]);
+            if(x4 <= 0.0)
+                return false;
+
+            // define inside point as (x1;x2;x3)
+            double x1 = to_double(X[index_x1]);
+            double x2 = to_double(X[index_x2]);
+            double x3 = to_double(X[index_x3]);
+            m_inside_point = Point(x1,x2,x3);
+
+            return true;
+        }
+};
+
+#endif // INTERIOR_POLYHEDRON_3_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/predicates.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/predicates.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_3/dual/predicates.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_3/dual/predicates.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d_to_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d_to_polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d_to_polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d_to_polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_xy_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_xy_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_xy_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_xy_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_xz_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_xz_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_xz_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_xz_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_yz_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_yz_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_projective_yz_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_projective_yz_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Convex_hull_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Convex_hull_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Convex_hull_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Convex_hull_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Counted_number.h b/3rdparty/CGAL-4.8/include/CGAL/Counted_number.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Counted_number.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Counted_number.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Counting_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Counting_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Counting_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Counting_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
new file mode 100644
index 0000000..37af90e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
@@ -0,0 +1,3367 @@
+// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
+//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+
+#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
+#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
+
+/*!\file include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
+ *\brief Defines class \c Arc_2 that represents an arc on a curve that
+ * can be analyzed.
+ */
+
+#include <CGAL/config.h>
+#include <CGAL/Handle_with_policy.h>
+
+#include <iostream>
+#include <boost/optional.hpp>
+#include <boost/none.hpp>
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Arr_enums.h>
+
+#ifndef CGAL_CKvA_USE_CACHES
+#define CGAL_CKvA_USE_CACHES 1
+#endif
+
+#include <CGAL/Curved_kernel_via_analysis_2/Point_2.h>
+
+#include <CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h>
+
+namespace CGAL {
+
+namespace internal {
+
+#ifndef CKvA_CERR
+//#define CKvA_DEBUG_PRINT_CERR
+#ifdef CKvA_DEBUG_PRINT_CERR
+#define CKvA_CERR(x) std::cerr << x
+#else
+#define CKvA_CERR(x) static_cast<void>(0)
+#endif
+#endif
+
+/*!\brief
+ * Default representation class for Arc_2
+ */
+template < class CurvedKernelViaAnalysis_2 >
+class Arc_2_rep {
+
+public:
+    //!\name Public types
+    //!@{
+
+    //! this instance's first template parameter
+    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+
+    //! myself
+    typedef Arc_2_rep< Curved_kernel_via_analysis_2 > Self;
+
+    //! type of curve kernel
+    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
+    Curve_kernel_2;
+
+    //! type of curve that can be analzed
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+
+    //! type of a point on a point that can be analyzed
+    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
+
+    //! type of boundary value in x-range of an arc
+    typedef typename Curve_kernel_2::Bound Bound;
+
+    //!@}
+
+public:
+    //!\name Constructors
+    //!@{
+
+    //! default constructor
+    Arc_2_rep() :
+        _m_arcno(-1), _m_arcno_min(-1), _m_arcno_max(-1),
+        _m_is_vertical(false),
+        _m_left_to_right(1) {
+    }
+
+    //! copy constructor
+    Arc_2_rep(const Self& s):
+        _m_min(s._m_min), _m_max(s._m_max),
+        _m_support(s._m_support),
+        _m_arcno(s._m_arcno),
+        _m_arcno_min(s._m_arcno_min),
+        _m_arcno_max(s._m_arcno_max),
+        _m_is_vertical(s._m_is_vertical),
+        _m_left_to_right(s._m_left_to_right) {
+    }
+
+    //! standard constructor
+    Arc_2_rep(const Point_2& p, const Point_2& q, const Curve_analysis_2& c,
+              int arcno = -1, int arcno_p = -1, int arcno_q = -1,
+              bool is_vertical = false) :
+        _m_min(p), _m_max(q),
+        _m_support(c),
+        _m_arcno(arcno), _m_arcno_min(arcno_p), _m_arcno_max(arcno_q),
+        _m_is_vertical(is_vertical),
+        _m_left_to_right(1) {
+
+        // set end-point arcnos from segment's interior
+        if (_m_arcno_min == -1) {
+            _m_arcno_min = _m_arcno;
+        }
+        if (_m_arcno_max == -1) {
+            _m_arcno_max = _m_arcno;
+        }
+    }
+
+    //!@}
+
+public:
+    //!\name Data members
+    //!@{
+
+    //! minimal end-points of an arc
+    mutable Point_2 _m_min;
+
+    //! maximal end-points of an arc
+    mutable Point_2 _m_max;
+
+    //! supporting curve
+    mutable Curve_analysis_2 _m_support;
+
+    //! interior arcno
+    mutable int _m_arcno;
+
+    //! arcno at min
+    mutable int _m_arcno_min;
+
+    //! arcno at max
+    mutable int _m_arcno_max;
+
+    //! indicates whether arc is vertical
+    mutable bool _m_is_vertical;
+
+    //! stores a direction (left to right, right to left)
+    mutable bool _m_left_to_right;
+
+    //! stores the index of an interval this arc belongs to
+    mutable boost::optional<int> _m_interval_id;
+
+    //! stores boundary value in x-range of non-vertical interval
+    mutable boost::optional< Bound > _m_boundary_in_interval;
+
+    //! stores a bbox for an arc
+    mutable boost::optional< CGAL::Bbox_2 > _m_bbox;
+
+    //!@}
+};
+
+
+/*!\brief
+ * Class defines an arc on a curve that can be analyzed
+ *
+ * An arc is either non-vertical or vertical. If it is non-vertical,
+ * we can assign a constant arc number to its interior and we may can assign
+ * (non-identical) arc numbers to its end-points. It depends on whether
+ * the arc touches the boundary of the parameter space or not.
+ * If it is vertical, no arc number is available.
+ *
+ * We distinguish between interior arcs, rays, and branches. An interior arc
+ * lies completely in the interior of the parameter space,
+ * while a ray has one end that lies on the boundary of the parameter space,
+ * and a branch has two end that lie on the boundary.
+ *
+ */
+template < class CurvedKernelViaAnalysis_2, class Rep_ >
+class Arc_2 :
+        public CGAL::Handle_with_policy< Rep_ > {
+
+public:
+    //!\name Public types
+    //!@{
+
+    //! this instance's first template parameter
+    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+
+    //! this instance's second template parameter
+    typedef Rep_ Rep;
+
+    //! this instance itself
+    typedef Arc_2< Curved_kernel_via_analysis_2, Rep > Self;
+
+    //! type of curve kernel
+    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
+    Curve_kernel_2;
+
+    //! type of an x-coordinate
+    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
+
+    //! type of an xy-coordinate
+    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
+
+    //! type of "rational" value in x-range
+    typedef typename Curve_kernel_2::Bound Bound;
+
+    //! type of analysis of a pair of curves
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+
+    //! type of analysis of a pair of curves
+    typedef typename Curve_kernel_2::Curve_pair_analysis_2
+    Curve_pair_analysis_2;
+
+    //! type of a kernel point
+    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
+    // Remark: Point_2 is already Kernel_point_2 -> no need to introduce it
+
+    //! type of kernel arc
+    typedef typename Curved_kernel_via_analysis_2::Arc_2 Kernel_arc_2;
+
+    //! the handle superclass
+    typedef ::CGAL::Handle_with_policy< Rep > Base;
+
+    //!@}
+
+public:
+    //!\name Rebind
+    //!{
+
+    /*!\brief
+     * An auxiliary structure for rebinding the arc with a NewCKvA_2 and a
+     * NewRep
+     */
+    template < typename NewCKvA_2, typename NewRep >
+    class rebind
+    {
+    public:
+        //! this instance's first template parameter
+        typedef NewCKvA_2 New_curved_kernel_via_analysis_2;
+
+        //! this instance's second template parameter
+        typedef NewRep New_rep;
+
+        //! the rebound type
+        typedef Arc_2< New_curved_kernel_via_analysis_2, NewRep > Other;
+
+        //! surface point type
+        typedef typename Other::Point_2 New_point_2;
+
+        //! type of rebound arc
+        typedef typename New_curved_kernel_via_analysis_2::Arc_2 Rebound_arc_2;
+
+        /*!\brief
+         * Constructs supporting arc of type \c Rebound_arc_2 from the
+         * (possible unbounded) \c arc
+         * of type \c Self and replaces \c min and \c max point by the
+         * given instances.
+         *
+         * All known items of the base class rep will be copied.
+         *
+         * \param arc Input arc
+         * \param min New endpoint at min
+         * \param max New endpoint at max
+         * \return An arc of type \c Rebound_arc_2
+         */
+        Rebound_arc_2 operator()(const Self& arc,
+                                 const New_point_2& min,
+                                 const New_point_2& max) {
+            New_rep newrep;
+            newrep._m_min = min;
+            newrep._m_max = max;
+
+            copy_members(arc, newrep);
+
+            return Rebound_arc_2(newrep);
+        }
+
+        /*!\brief
+         * Gives direct access to minimal or maximal endpoint of an arc,
+         * even if it is not interior!
+         *
+         * \param arc Input arc
+         * \param ce Specifies which end is queried
+         * \return min or max point (might be not interior!)
+         */
+        Point_2 operator()(const Self& arc, CGAL::Arr_curve_end ce) {
+            if (ce == CGAL::ARR_MIN_END) {
+                return arc._minpoint();
+            }
+            // else
+            return arc._maxpoint();
+        }
+
+        // TODO move to SfA_2l
+        /*!\brief
+         * Reverse rebind, that is extracts original arc type from a
+         * rebound instance
+         *
+         * \param arc A rebound arc
+         * \return An arc of type \c Self extracted from \c arc
+         */
+        Self operator()(const Rebound_arc_2& arc) {
+            Rep rep;
+
+            rep._m_min = typename New_point_2::Rebind()(arc._minpoint());
+            rep._m_max = typename New_point_2::Rebind()(arc._maxpoint());
+
+            rep._m_support = arc.ptr()->_m_support;
+
+            rep._m_arcno = arc.ptr()->_m_arcno;
+            rep._m_arcno_min = arc.ptr()->_m_arcno_min;
+            rep._m_arcno_max = arc.ptr()->_m_arcno_max;
+
+            rep._m_is_vertical = arc.ptr()->_m_is_vertical;
+            rep._m_left_to_right = arc.ptr()->_m_left_to_right;
+
+            rep._m_interval_id = arc.ptr()->_m_interval_id;
+
+            rep._m_boundary_in_interval =
+                arc.ptr()->_m_boundary_in_interval;
+
+            return Self(rep);
+        }
+
+    protected:
+        /*!\brief
+         * copies main members to a rep
+         *
+         * \param arc Source arc
+         * \param newrep Destination representation
+         */
+        void copy_members(const Self& arc, New_rep& newrep) {
+
+            newrep._m_support = arc.ptr()->_m_support;
+
+            newrep._m_arcno = arc.ptr()->_m_arcno;
+            newrep._m_arcno_min = arc.ptr()->_m_arcno_min;
+            newrep._m_arcno_max = arc.ptr()->_m_arcno_max;
+
+            newrep._m_is_vertical = arc.ptr()->_m_is_vertical;
+            newrep._m_left_to_right = arc.ptr()->_m_left_to_right;
+
+            newrep._m_interval_id = arc.ptr()->_m_interval_id;
+
+            newrep._m_boundary_in_interval =
+                arc.ptr()->_m_boundary_in_interval;
+        }
+    };
+
+    //!}
+
+public:
+    //!\name basic constructors
+    //!@{
+
+    /*!\brief
+     * Default constructor
+     */
+    Arc_2() :
+        Base(Rep()) {
+    }
+
+    /*!\brief
+     * copy constructor
+     */
+    Arc_2(const Self& a) :
+        Base(static_cast<const Base&>(a)) {
+    }
+
+    //!@}
+
+public:
+    //!\name Constructors for non-vertical arcs
+    //!@{
+
+    /*!\brief
+     * Constructs an arc with two interior end-points (segment).
+     *
+     * \param p first endpoint
+     * \param q second endpoint
+     * \param c The supporting curve
+     * \param arcno The arcnumber wrt \c c in the interior of the arc
+     * \param arcno_p The arcnumber wrt \c c of the arc at \c p
+     * \param arcno_q The arcnumber wrt \c c of the arc at \c q
+     * \returns The constructed segment
+     *
+     * \pre p.x() != q.x()
+     *
+     */
+    Arc_2(const Point_2& p, const Point_2& q, const Curve_analysis_2& c,
+          int arcno, int arcno_p, int arcno_q) :
+        Base(Rep(p, q, c, arcno, arcno_p, arcno_q)) {
+
+        CGAL_precondition(!p.is_identical(q));
+        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
+                          compare_x_2_object()(p,q) != CGAL::EQUAL);
+        // preconditions for arc-numbers and event points (should the common
+        // parts be moved to a dedicated method ?)
+        CGAL_precondition(arcno >= 0);
+        CGAL_precondition(arcno_p >= 0);
+        CGAL_precondition(arcno_q >= 0);
+        // check end-points arcnos validity and coprimality condition
+        // for supporting curves
+        _check_pt_arcno_and_coprimality(p, arcno_p, c);
+        _check_pt_arcno_and_coprimality(q, arcno_q, c);
+        _fix_curve_ends_order(); // lexicographical order of curve ends
+    }
+
+   /*!\brief
+     * Constructs an arc with one interior end-point and another end
+     * at the left or right boundary of the parameter space (ray I).
+     *
+     * \param origin The interior end-point of the ray
+     * \param inf_end Defining whether the arcs emanates from the left or right
+     *        boundary
+     * \param c The supporting curve
+     * \param arcno The arcnumber wrt \c c in the interior of the arc
+     * \param arcno_o The arcnumber wrt \c c of the arc at \c origin
+     * \return The constructed ray
+     */
+    Arc_2(const Point_2& origin, CGAL::Arr_curve_end inf_end,
+          const Curve_analysis_2& c, int arcno, int arcno_o) :
+        Base(Rep(origin, Point_2(inf_end, c, arcno), c, arcno, arcno_o)) {
+
+        CGAL_precondition(arcno >= 0);
+        CGAL_precondition(arcno_o >= 0);
+        // check end-points arcnos validity and coprimality condition
+        // for supporting curves
+
+        _check_pt_arcno_and_coprimality(origin, arcno_o, c);
+        _fix_curve_ends_order(); // lexicographical order of curve ends
+    }
+
+
+    /*!\brief
+     * Constructs a non-vertical arc with one interior end-point and whose
+     * other end approaches a vertical asymptote (ray II)
+     *
+     * \param origin The interior end-point
+     * \param asympt_x The x-coordinate of the vertical asymptote
+     * \param inf_end Arc is approaching the bottom or top boundary
+     * \param c The supporting curve
+     * \param arcno The arcnumber wrt \c c in the interior of the arc
+     * \param arcno_o The arcnumber wrt \c c of the arc at \c origin
+     * \return The constructed ray
+     *
+     * \pre origin.x() != asympt_x
+     */
+    Arc_2(const Point_2& origin, const Coordinate_1& asympt_x,
+          CGAL::Arr_curve_end inf_end, const Curve_analysis_2& c, int arcno,
+          int arcno_o) :
+        Base(Rep(origin, Point_2(asympt_x, c, inf_end), c, arcno, arcno_o)) {
+
+        CGAL_precondition(
+                Curved_kernel_via_analysis_2::instance().
+                kernel().compare_1_object()(origin.x(), asympt_x)
+                != CGAL::EQUAL);
+        CGAL_precondition(arcno >= 0);
+        CGAL_precondition(arcno_o >= 0);
+        _check_pt_arcno_and_coprimality(origin, arcno_o, c);
+
+        _fix_curve_ends_order(); // lexicographical order of curve ends
+    }
+
+    /*!\brief
+     * Constructs a non-vertical arc with two non-interior ends at the
+     * left and right boundary (branch I)
+     *
+     * \param c The supporting curve
+     * \param arcno The arcnumber wrt to \c c in the interior of the arc
+     * \return The constructed branch
+     */
+    Arc_2(const Curve_analysis_2& c, int arcno) :
+        Base(Rep(Point_2(CGAL::ARR_MIN_END, c, arcno),
+                 Point_2(CGAL::ARR_MAX_END, c, arcno), c, arcno)) {
+
+        CGAL_precondition(arcno >= 0);
+        _fix_curve_ends_order();
+    }
+
+    /*!\brief
+     * Constructs a non-vertical arc with two ends approaching vertical
+     * asymptotes (branch II).
+     *
+     * \param asympt_x1 The x-coordinate of the first asymptote
+     * \param inf_end1 Arc is approaching the bottom or top boundary at
+     *                 \c asympt_x1
+     * \param asympt_x2 The x-coordinate of the second asymptote
+     * \param inf_end2 Arc is approaching the bottom or top boundary at
+     *                 \c asympt_x2
+     * \return The constructed branch
+     *
+     * \pre asympt_x1 != asympt_x2
+     */
+    Arc_2(const Coordinate_1& asympt_x1, CGAL::Arr_curve_end inf_end1,
+          const Coordinate_1& asympt_x2, CGAL::Arr_curve_end inf_end2,
+          const Curve_analysis_2& c, int arcno) :
+        Base(Rep(Point_2(asympt_x1, c, inf_end1),
+                 Point_2(asympt_x2, c, inf_end2),
+                 c, arcno)) {
+
+        CGAL_precondition(
+                Curved_kernel_via_analysis_2::instance().
+                kernel().compare_1_object()(asympt_x1, asympt_x2)
+                != CGAL::EQUAL);
+        CGAL_precondition(arcno >= 0);
+        _fix_curve_ends_order();
+    }
+
+    /*!\brief
+     * Construct a non-vertical arc with one left- or right-boundary end
+     * and one end that approaches a vertical asymptote (branch III)
+     *
+     * \param inf_endx Defining whether the arc emanates from the left or right
+     *        boundary
+     * \param asympt_x The x-coordinate of the asymptote
+     * \param inf_endy Arc is approaching the bottom or top boundary at
+     *                 asympt_x
+     * \return The constructed branch
+     */
+    Arc_2(CGAL::Arr_curve_end inf_endx, const Coordinate_1& asympt_x,
+          CGAL::Arr_curve_end inf_endy, const Curve_analysis_2& c, int arcno) :
+        Base(Rep(Point_2(inf_endx, c, arcno),
+                 Point_2(asympt_x, c, inf_endy), c, arcno)) {
+
+        CGAL_precondition(arcno >= 0);
+        _fix_curve_ends_order();
+    }
+
+    //!@}
+
+public:
+    //!\name Constructors for vertical arcs
+    //!@{
+
+    /*!\brief
+     * Constructs a vertical arc with two interior end-points
+     * (vertical segment)
+     *
+     * \param p The first end-point
+     * \param q The second end-point
+     * \param c The supporting curve
+     * \return The constructed arc
+     *
+     * \pre p != q && p.x() == q.x()
+     * \pre c must have a vertical component at this x
+     */
+    Arc_2(const Point_2& p, const Point_2& q, const Curve_analysis_2& c) :
+        Base(Rep(p, q, c, -1, -1, -1, true)) {
+
+        CGAL_precondition(!p.is_identical(q));
+        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
+                          compare_x_2_object()(p,q) == CGAL::EQUAL);
+        CGAL_precondition(Curved_kernel_via_analysis_2::instance().
+                          compare_xy_2_object()(p, q, true) != CGAL::EQUAL);
+        // check coprimality condition for supporting curves
+        _check_pt_arcno_and_coprimality(p, -1, c);
+        _check_pt_arcno_and_coprimality(p, -1, c);
+        _fix_curve_ends_order();
+    }
+
+    /*!\brief
+     * Constructs a vertical arc with one interior end-point and
+     * one that reaches the bottom or top boundary (vertical ray)
+     *
+     * \param origin The interior end-point
+     * \param inf_end Ray emanates from bottom or top boundary
+     * \return The constructed ray
+     *
+     * \pre c must have a vertical line component at this x
+     */
+    Arc_2(const Point_2& origin, CGAL::Arr_curve_end inf_end,
+          const Curve_analysis_2& c) :
+        Base(Rep(origin, Point_2(origin.x(), c, inf_end),
+                 c, -1, -1, -1, true)) {
+
+        // check coprimality condition for supporting curves
+        _check_pt_arcno_and_coprimality(origin, -1, c);
+        _fix_curve_ends_order();
+    }
+
+    /*!\brief
+     * Constructs a vertical arc that connects bottom with top boundary
+     * (vertical branch)
+     *
+     * \param x The x-coordinate of the arc
+     * \return The constructed branch
+     *
+     * \pre c must have a vertical line component at this x
+     */
+    Arc_2(const Coordinate_1& x, const Curve_analysis_2& c) :
+        Base(Rep(Point_2(x, c, CGAL::ARR_MIN_END),
+                 Point_2(x, c, CGAL::ARR_MAX_END), c, -1, -1, -1, true)) {
+
+        _fix_curve_ends_order();
+    }
+
+    //!@}
+
+protected:
+    //!\name Constructor for replace endpoints + rebind
+    //!@{
+
+    /*!\brief
+     * Constructs an arc from a given representation used in rebind
+     *
+     * \param rep Input representation
+     * \return The constructed arc
+     */
+    Arc_2(Rep rep) :
+        Base(rep) {
+    }
+
+    //!@}
+
+public:
+    //!\name Destructors (can be many ?)
+    //!@{
+
+    /*!\brief
+     * Standard destructor
+     */
+    virtual ~Arc_2() {
+    }
+
+    //!@}
+
+#define CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(X, Y) \
+    typename Curved_kernel_via_analysis_2::X Y = \
+         Curved_kernel_via_analysis_2::instance().Y##_object(); \
+
+
+public:
+    //!\name Parameter space
+    //!@{
+
+    /*!\brief
+     * location of arc's end
+     *
+     * \param ce The intended end
+     * \return The location of arc's \c ce in parameterspace
+     */
+    CGAL::Arr_parameter_space location(CGAL::Arr_curve_end ce) const {
+        if (ce == CGAL::ARR_MIN_END) {
+            return _minpoint().location();
+        }
+        return _maxpoint().location();
+    }
+
+    /*!\brief
+     *  Sets boundary type for an end of an arc
+     *
+     * It is supposed that the user thoroughly understands malicious
+     * consequences that may result from the misuse of the location
+     *
+     * \param ce The intended end
+     * \param loc The location to store
+     */
+    void set_location(CGAL::Arr_curve_end ce,
+                      CGAL::Arr_parameter_space loc) const {
+        (ce == CGAL::ARR_MIN_END ?
+         _minpoint().set_location(loc) : _maxpoint().set_location(loc));
+    }
+
+    //!@}
+
+    //!\name Access functions
+    //!@{
+
+    /*!\brief
+     * Is a curve-end finite?
+     *
+     * \param ce The intended end
+     * \return \c true, if finite, \c false, otherwise
+     */
+    bool is_finite(CGAL::Arr_curve_end ce) const {
+        const Point_2& pt =
+            (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint());
+        return pt.is_finite();
+    }
+
+    /*!\brief
+     * returns arc's interior curve end
+     *
+     * \param ce The intended end
+     * \return The minimal point of the arc, or the maximal point of the arc
+     *
+     *  \pre accessed curve end has finite coordinates
+     */
+    Point_2 curve_end(CGAL::Arr_curve_end ce) const {
+        const Point_2& pt =
+            (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint());
+#if !CGAL_ARRANGEMENT_ON_DUPIN_CYCLIDE
+        CGAL_precondition(pt.location() == CGAL::ARR_INTERIOR ||
+                          pt.is_finite());
+#endif
+        return pt;
+    }
+
+    /*!\brief
+     * returns x-coordinate of arc's curve end
+     *
+     * \param ce The intended end
+     * \return x-coordinate of arc's end at \c ce
+     *
+     * \pre accessed curve end has finite x-coordinate
+     */
+    inline
+    Coordinate_1 curve_end_x(CGAL::Arr_curve_end ce) const {
+        CGAL_precondition(
+                !(ce == CGAL::ARR_MIN_END ? _minpoint().is_on_left_right() :
+                  _maxpoint().is_on_left_right()));
+        return (ce == CGAL::ARR_MIN_END ? _minpoint().x() : _maxpoint().x());
+    }
+
+    /*!\brief
+     * supporting curve of the arc
+     *
+     * \return supporting curve of the arc
+     */
+    inline
+    const Curve_analysis_2& curve() const {
+        return this->ptr()->_m_support;
+    }
+
+    /*!\brief arc number in interior
+     *
+     * \return arc number
+     *
+     * \pre !is_vertical()
+     */
+    inline
+    int arcno() const {
+        CGAL_precondition(!is_vertical());
+        return this->ptr()->_m_arcno;
+    }
+
+    /*!\brief
+     * arc number of end of arc, which may be different from arc number in its
+     * interior
+     *
+     * \param ce The intended end
+     * \return Arc number of intended end
+     * \pre !is_vertical()
+     */
+    inline
+    int arcno(CGAL::Arr_curve_end ce) const {
+        CGAL_precondition(!is_vertical());
+        return (ce == CGAL::ARR_MIN_END ? this->ptr()->_m_arcno_min :
+                this->ptr()->_m_arcno_max);
+    }
+
+    /*!\brief
+     * arc number at given x-coordinate
+     *
+     * If \c x0 is equal to source's or target's x-coordinate,
+     * then the arc number of that point is returned.
+     * Otherwise the arc number of the interior is returned.
+     *
+     * \param x0 queried x-coordinate
+     * \returns arcnumber at \c x0
+     * \pre !is_vertical()
+     * \pre \c x0 must be within arcs's x-range.
+     */
+    inline
+    int arcno(const Coordinate_1& x0) const {
+        CGAL_precondition(!is_vertical());
+        CGAL_precondition(is_in_x_range(x0));
+
+        if (this->ptr()->_m_arcno_min != this->ptr()->_m_arcno &&
+            is_finite(CGAL::ARR_MIN_END) &&
+            Curved_kernel_via_analysis_2::instance().
+            kernel().compare_1_object()(x0, _minpoint().x()) ==
+            CGAL::EQUAL) {
+            return this->ptr()->_m_arcno_min;
+        }
+        if (this->ptr()->_m_arcno_max != this->ptr()->_m_arcno &&
+            is_finite(CGAL::ARR_MAX_END) &&
+            Curved_kernel_via_analysis_2::instance().
+            kernel().compare_1_object()(x0, _maxpoint().x()) ==
+            CGAL::EQUAL) {
+            return this->ptr()->_m_arcno_max;
+        }
+        return this->ptr()->_m_arcno;
+    }
+
+    /*!\brief
+     * checks if the arc is vertical
+     *
+     * \return \c true, if vertical, \c false, otherwise
+     */
+    inline
+    bool is_vertical() const {
+        return this->ptr()->_m_is_vertical;
+    }
+
+    /*!\brief
+     * returns x-coordinate of vertical arc
+     *
+     * \return x-coordinate of line that contains vertical arc
+     * \pre is_vertical
+     */
+    inline
+    const Coordinate_1& x() const {
+        CGAL_precondition(is_vertical());
+        return _minpoint().x();
+    }
+
+    //!@}
+
+    //!\name Direction
+    //!@{
+
+    /*!\brief
+     * checks if the arc is direction left-to-right (min-to-max)
+     *
+     * \return \c true, if directed left-to-right, \c false, otherwise
+     */
+    inline
+    bool is_left_to_right() const {
+      return this->ptr()->_m_left_to_right;
+    }
+
+    /*! Flip the arc . */
+    Arc_2 flip () const  {
+      Arc_2   opp(*this);
+      opp.copy_on_write();
+      opp.ptr()->_m_left_to_right = !this->ptr()->_m_left_to_right;
+
+      return opp;
+    }
+
+    //!@}
+
+    //!\name Intervals
+    //!@{
+
+    /*!\brief
+     * returns the index of an open interval between two events of the
+     * curve the arc belongs to
+     *
+     * \return interval id of supporting curve for this arc
+     * \pre !is_vertical()
+     */
+    inline
+    int interval_id() const {
+        CGAL_precondition(!is_vertical());
+        if(!this->ptr()->_m_interval_id)
+            this->ptr()->_m_interval_id = _compute_interval_id();
+        return *(this->ptr()->_m_interval_id);
+    }
+
+
+    /*!\brief
+     * returns boundary value in interior of x-range of non-vertical
+     * interval
+     *
+     * \return a rational x-coordinate in the interior of the arc's x-range
+     * \pre !is_vertical()
+     */
+    Bound boundary_in_x_range_interior() const {
+        CGAL_precondition(!is_vertical());
+        if(!this->ptr()->_m_boundary_in_interval) {
+            this->ptr()->_m_boundary_in_interval =
+                _compute_boundary_in_interval();
+            CGAL_postcondition_code(
+                    typename Curve_analysis_2::Status_line_1 cv_line =
+                    curve().status_line_at_exact_x(
+                            Coordinate_1(
+                                    *this->ptr()->_m_boundary_in_interval
+                            )
+                    );
+            );
+            CGAL_postcondition(cv_line.index() == interval_id());
+        }
+        return *(this->ptr()->_m_boundary_in_interval);
+    }
+
+    //!@}
+
+public:
+    //! \name Shortcuts for code readability
+    //!@{
+
+    //! tests whether this boundary type represents +/-oo
+    inline static bool is_infinite(/*CGAL::Arr_boundary_type bnd*/) {
+        return false; //(bnd == CGAL::ARR_UNBOUNDED);
+    }
+
+    //! tests whether this boundary type represents a singularity
+    inline static bool is_singular(/*CGAL::Arr_boundary_type bnd*/) {
+        return false; //(bnd == CGAL::ARR_CONTRACTION);
+    }
+
+    //! tests whether this boundary type represents lying on discontinuity
+    inline static bool is_on_disc(/*CGAL::Arr_boundary_type bnd*/) {
+        return false; //(bnd == CGAL::ARR_IDENTIFICATION);
+    }
+
+    //! returns true if a parameter encodes an entity in the interior
+    inline static bool is_interior(CGAL::Arr_parameter_space loc) {
+        return (loc == CGAL::ARR_INTERIOR);
+    }
+
+    //! returns true if a parameter encodes bottom or top boundary placement
+    inline static bool is_on_bottom_top(CGAL::Arr_parameter_space loc) {
+        return (loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+                loc == CGAL::ARR_TOP_BOUNDARY);
+    }
+
+    //! returns true if a parameter encodes left or right boundary placement
+    inline static bool is_on_left_right(CGAL::Arr_parameter_space loc) {
+        return (loc == CGAL::ARR_LEFT_BOUNDARY ||
+                loc == CGAL::ARR_RIGHT_BOUNDARY);
+    }
+
+    //!@}
+
+public:
+    //! \name Predicates
+    //!@{
+
+      /*!
+     * Compare the relative x-limits of a vertical line at an interior point
+     * and the arc's end on a bottom or top boundary
+     *
+     * \param p A reference point; we refer to a vertical line incident to p.
+     * \param ce ARR_MIN_END if we refer to the arc's minimal end,
+     *            ARR_MAX_END if we refer to its maximal end.
+     * \return CGAL::SMALLER if p lies to the left of the arc;
+     *         CGAL::LARGER  if p lies to the right of the arc;
+     *         CGAL::EQUAL   in case of an overlap.
+     *
+     * \pre the arc's relevant end is on bottom or top boundary
+     */
+    CGAL::Comparison_result compare_x_at_limit(
+            CGAL::Arr_curve_end ce,
+            const Point_2& p
+    ) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
+                                            compare_x_at_limit_2)
+        // compare with NULL, in order to avoid a performance warning with VC++
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_x_at_limit_2(
+                p, *dynamic_cast< const Kernel_arc_2* >(this), ce
+        );
+    }
+
+
+    /*!\brief
+     * Compare the relative x-limits of the curve end of \c *this
+     * and \c cv2
+     * \param ce1 ARR_MIN_END if we refer to this' minimal end,
+     *             ARR_MAX_END if we refer to this' maximal end.
+     * \param cv2 The second curve.
+     * \param ce2 ARR_MIN_END if we refer to its minimal end,
+     *             ARR_MAX_END if we refer to its maximal end.
+     * \return CGAL::SMALLER if \c this lies to the left of cv2;
+     *         CGAL::LARGER  if \c this lies to the right of cv2;
+     *         CGAL::EQUAL   in case of an overlap.
+     *
+     * \pre the curve ends lie on the bottom or top boundary
+     */
+    CGAL::Comparison_result compare_x_at_limit(
+            CGAL::Arr_curve_end ce1,
+            const Kernel_arc_2& cv2, CGAL::Arr_curve_end ce2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
+                                            compare_x_at_limit_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_x_at_limit_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2
+        );
+    }
+
+    /*!
+     * Compare the relative x-positions of an interior point
+     * and the arc's end on a bottom or top boundary
+     *
+     * \param p A reference point; we refer to a vertical line incident to p.
+     * \param ce ARR_MIN_END if we refer to the arc's minimal end,
+     *            ARR_MAX_END if we refer to its maximal end.
+     * \return CGAL::SMALLER if p lies to the left of the arc;
+     *         CGAL::LARGER  if p lies to the right of the arc;
+     *         CGAL::EQUAL   in case of an overlap.
+     *
+     * \pre the arc's relevant end is on bottom or top boundary
+     */
+    CGAL::Comparison_result compare_x_near_limit(
+            CGAL::Arr_curve_end ce,
+            const Point_2& p
+    ) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
+                                            compare_x_near_limit_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_x_near_limit_2(
+                p, *dynamic_cast< const Kernel_arc_2* >(this), ce
+        );
+    }
+
+    /*!\brief
+     * Compare the relative x-positions of the curve end of \c *this
+     * and \c cv2
+     * \param ce1 ARR_MIN_END if we refer to this' minimal end,
+     *             ARR_MAX_END if we refer to this' maximal end.
+     * \param cv2 The second curve.
+     * \param ce2 ARR_MIN_END if we refer to its minimal end,
+     *             ARR_MAX_END if we refer to its maximal end.
+     * \return CGAL::SMALLER if \c this lies to the left of cv2;
+     *         CGAL::LARGER  if \c this lies to the right of cv2;
+     *         CGAL::EQUAL   in case of an overlap.
+     *
+     * \pre the curve ends lie on the bottom or top boundary
+     */
+    CGAL::Comparison_result compare_x_near_limit(const Kernel_arc_2& cv2,
+                                                 CGAL::Arr_curve_end ce) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
+                                            compare_x_near_limit_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce);
+    }
+
+    /*!\brief
+     * Compare the relative y-positions of two arcs whose ends approach
+     * the left or right boundary from the same side
+     *
+     * \param cv2 The second arc
+     * \param ce ARR_MIN_END if we compare near left boundary
+     *            ARR_MAX_END if we compare near right boundary
+     * \return CGAL::SMALLER if this arc lies below cv2;
+     *         CGAL::LARGER if this arc lies above cv2;
+     *         CGAL::EQUAL in case of an overlap.
+     *
+     * \pre The ends are defined on left or right boundary
+     */
+    CGAL::Comparison_result compare_y_near_boundary(
+            const Kernel_arc_2& cv2,
+            CGAL::Arr_curve_end ce
+    ) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_near_boundary_2,
+                                            compare_y_near_boundary_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_y_near_boundary_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), cv2, ce
+        );
+    }
+
+    /*!\brief
+     * Compares the relative vertical alignment of a point with this arc
+     *
+     * \param p The point.
+     * \return
+     * CGAL::SMALLER if y(p) \< arc(x(p)), i.e. the point is below the arc;
+     * CGAL::LARGER if y(p) > arc(x(p)), i.e. the point is above the arc;
+     * CGAL::EQUAL if p lies on the arc.
+     *
+     * \pre p is in the x-range of the arc.
+     */
+    CGAL::Comparison_result compare_y_at_x(const Point_2& p) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_2,
+                                            compare_y_at_x_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_y_at_x_2(p, *dynamic_cast< const Kernel_arc_2* >(this));
+    }
+
+    /*!\brief
+     * Compares the relative vertical aligment of this arc with a second
+     * immediately to the left of one of their intersection points.
+     *
+     * If one of the curves is vertical (emanating downward from p),
+     * it is always considered to be below the other curve.
+     *
+     * \param cv2 The second arc
+     * \param p The intersection point
+     *
+     * \return The relative vertical alignment this arc with respect to cv2
+     *         immediately to the left of p: SMALLER, LARGER or EQUAL.
+     *
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographical) to their left.
+     */
+    CGAL::Comparison_result compare_y_at_x_left(const Kernel_arc_2& cv2,
+                                                const Point_2 &p) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_left_2,
+                                            compare_y_at_x_left_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_y_at_x_left_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), cv2, p
+        );
+    }
+
+    /*!\brief
+     * Compares the relative vertical aligment of this arc with a second
+     * immediately to the right of one of their intersection points.
+     *
+     * If one of the curves is vertical (emanating downward from p),
+     * it is always considered to be below the other curve.
+     *
+     * \param cv2 The second arc
+     * \param p The intersection point
+     *
+     * \return The relative vertical alignment this arc with respect to cv2
+     *         immediately to the right of p: SMALLER, LARGER or EQUAL.
+     *
+     * \pre The point p lies on both curves, and both of them must be also be
+     *      defined (lexicographical) to their right.
+     */
+    CGAL::Comparison_result compare_y_at_x_right(const Kernel_arc_2& cv2,
+                                                 const Point_2 &p) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_right_2,
+                                            compare_y_at_x_right_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return compare_y_at_x_right_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), cv2, p
+        );
+    }
+
+    /*!\brief
+     * Check if the given x-value is in the x-range of the arc inclusive.
+     *
+     * \param x The x-value.
+     * \param *eq_min Output: Is this value equal to the x-coordinate of the
+     *                       ARR_MIN_END point.
+     * \param *eq_max Output: Is this value equal to the x-coordinate of the
+     *                       ARR_MAX_END point.
+     * \return \c true, if p.x() is in x-range of arc, \c false otherwise
+     */
+    bool is_in_x_range(const Coordinate_1& x,
+                       bool *eq_min = NULL, bool *eq_max = NULL) const {
+
+        if (eq_min != NULL && eq_max != NULL) {
+            *eq_min = *eq_max = false;
+        }
+
+        if (is_vertical()) {
+            if (x == this->x()) {
+                if (eq_min != NULL) {
+                    *eq_min = true;
+                }
+                if (eq_max != NULL) {
+                    *eq_max = true;
+                }
+                return true;
+            }
+            // else
+            return false;
+        }
+
+        // precomputations:
+        CGAL::Comparison_result resmin = CGAL::LARGER;
+        CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
+        bool min_has_x =
+            (is_finite(CGAL::ARR_MIN_END) ||
+             min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+             min_loc == CGAL::ARR_TOP_BOUNDARY);
+        if (min_has_x) {
+            resmin = Curved_kernel_via_analysis_2::instance().
+                kernel().compare_1_object()(x, _minpoint().x());
+            if (eq_min != NULL) { // TODO asymptotic end in x-range?
+                *eq_min = (resmin == CGAL::EQUAL);
+            }
+        }
+
+        CGAL::Comparison_result resmax = CGAL::SMALLER;
+        CGAL::Arr_parameter_space max_loc = location(CGAL::ARR_MAX_END);
+        bool max_has_x =
+            (is_finite(CGAL::ARR_MAX_END) ||
+             max_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+             max_loc == CGAL::ARR_TOP_BOUNDARY);
+
+        if (max_has_x) {
+            resmax = Curved_kernel_via_analysis_2::instance().
+                kernel().compare_1_object()(x, _maxpoint().x());
+            if (eq_max != NULL) { // TODO asymptotic end in x-range?
+                *eq_max = (resmax == CGAL::EQUAL);
+            }
+        }
+
+        bool res =
+	    (resmin != CGAL::SMALLER && resmax != CGAL::LARGER);
+	return res;
+    }
+
+    /*!\brief
+     * Checks whether an x-coordinate lies in the interiors of this arc's
+     * x-range
+     *
+     * \param x The query coordinate
+     * \return \c true, if \c x lies in the interior of this arc's x-range,
+     * \c false otherwise
+     */
+    // TODO do we need this special method ?
+    bool is_in_x_range_interior(const Coordinate_1& x) const
+    {
+        bool eq_min, eq_max;
+        if (!is_in_x_range(x, &eq_min, &eq_max) || eq_min || eq_max) {
+            return false;
+        }
+        return true;
+    }
+
+    /*!\brief
+     * Checks whether a given arc is equal to this one
+     *
+     * \param cv2 The query arc
+     * \return \c true iff this arc is equal to \c cv, \c false otherwise
+     */
+    bool is_equal(const Kernel_arc_2& cv2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Equal_2,
+                                            equal_2)
+
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return equal_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
+    }
+
+    /*!\brief
+     * checks whether this arcs overlaps with another
+     *
+     * \param cv2 The query arc
+     * \return \c true, if both arcs have infinitely many intersection points,
+     *         \c false otherwise
+     */
+    bool do_overlap(const Kernel_arc_2& cv2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Do_overlap_2,
+                                            do_overlap_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return do_overlap_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
+    }
+
+    /*!\brief
+     * multiplicity of intersection
+     *
+     * The intersection multiplicity of \c *this and \c cv2 at point \c p is
+     * returned.
+     *
+     * \param cv2 The second arc
+     * \param p The intersection point
+     * \return The multiplicity of the intersection at \c p
+     * \pre \c p must be an intersection point.
+     */
+    int multiplicity_of_intersection(
+            const Kernel_arc_2& cv2, const Point_2& p) const {
+
+        // intersection point must lie in the interior of both arcs
+        CGAL_precondition_code( // because of macro stupidity one needs
+            bool eq_min1;       // to omit commas in declaration
+            bool eq_max1;
+            bool eq_min2;
+            bool eq_max2;
+        );
+        CGAL_precondition(is_in_x_range(p.x(), &eq_min1, &eq_max1));
+        CGAL_precondition(cv2.is_in_x_range(p.x(), &eq_min2, &eq_max2));
+        CGAL_precondition(is_vertical() || (!eq_min1 && !eq_max1));
+        CGAL_precondition(cv2.is_vertical() || (!eq_min2 && !eq_max2));
+
+        // there must be an intersection at this point (in_x_range is checked
+        // internally by compare_y_at_x() ?
+        CGAL_expensive_precondition(compare_y_at_x(p) == CGAL::EQUAL &&
+            cv2.compare_y_at_x(p) == CGAL::EQUAL);
+
+        Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
+        CGAL_precondition(!curve().is_identical(cv2.curve()));
+        if (is_vertical() || cv2.is_vertical()) {
+            CGAL_assertion(!(is_vertical() && cv2.is_vertical()));
+            return 1;
+        }
+
+        Curve_pair_analysis_2 cpa_2 =
+            Curved_kernel_via_analysis_2::instance().
+            kernel().construct_curve_pair_2_object()(curve(), cv2.curve());
+
+        typename Curve_pair_analysis_2::Status_line_1 cpv_line =
+                cpa_2.status_line_for_x(p.x());
+
+        CGAL_precondition(cpv_line.is_intersection());
+        int j = cpv_line.event_of_curve(arcno(p.x()), curve()),
+            mult = cpv_line.multiplicity_of_intersection(j);
+
+        CGAL_postcondition(mult > 0);
+        return mult;
+    }
+
+    //!@}
+
+    //!\name Constructing functions
+    //!@{
+
+    /*!\brief
+     * Find all intersections of this arc with another one and
+     * insert them to the output iterator.
+     *
+     * Type of output iterator is \c CGAL::Object. It either contains
+     * an \c Arc_2 object (overlap) or a
+     * <tt>std::pair\<Point_2, unsigned int></tt> (intersection point +
+     * multiplicity). A past-the-end iterator is returned.
+     *
+     * \param cv2 The second arc
+     * \param oi The outputiterator
+     * \return A past-the-end iterator of \c oi
+     */
+    template < class OutputIterator >
+    OutputIterator intersections(const Kernel_arc_2& cv2,
+                                 OutputIterator oi) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Intersect_2,
+                                            intersect_2)
+
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return intersect_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), cv2, oi
+        );
+    }
+
+    /*!\brief
+     * Computes the next intersection of \c *this and \c cv2 right of \c p
+     * in lexicographical order and returns it through \c intersection
+     * argument
+     *
+     * intersect_right_of_point is not called when using sweep_curves() with
+     * intersection dictionary and without validation of internal structures
+     * (as is standard). Hence we can be lazy here for the moment
+     * without losing performance.
+     *
+     * \param cv2 The second arc
+     * \param p The minimal bound point
+     * \param intersection The next intersection
+     * \return \c true, if there is a next intersection and
+     *         \c intersection has been set properly, \c false otherwise
+     * \pre The arcs are not allowed to overlap
+     */
+    bool intersect_right_of_point(const Kernel_arc_2& cv2, const Point_2& p,
+                                  Point_2& intersection) const {
+
+        CGAL_precondition(!this->do_overlap(cv2));
+
+        // TODO rewrite intersect_right_of_point (Pavel)
+        // use static member for Intersect, Left & Right
+        // with parameters for direction and where to stop
+        typedef std::vector<std::pair<Point_2, int> > Point_container;
+        Point_container tmp;
+        _intersection_points(
+                *dynamic_cast< const Kernel_arc_2*>(this), cv2,
+                back_inserter(tmp)
+        );
+        typename Point_container::const_iterator it;
+        for (it = tmp.begin(); it != tmp.end(); it++) {
+            if(it->first > p) {
+                intersection = it->first;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /*!\brief
+     * Computes the next intersection of \c *this and \c cv2 left of \c p
+     * in lexicographical order and returns it through \c intersection
+     * argument
+     *
+     * intersect_right_of_point is not called when using sweep_curves() with
+     * intersection dictionary and without validation of internal structures
+     * (as is standard). Hence we can be lazy here for the moment
+     * without losing performance.
+     *
+     * \param cv2 The second arc
+     * \param p The maximal bound point
+     * \param intersection The next intersection
+     * \return \c true, if there is a next intersection
+     *         and \c intersection has been set properly, \c false otherwise
+     * \pre The arcs are not allowed to overlap
+     */
+    bool intersect_left_of_point(const Kernel_arc_2& cv2, const Point_2& p,
+                                 Point_2& intersection) const {
+
+        CGAL_precondition(!this->do_overlap(cv2));
+
+        // TODO rewrite intersect_left_of_point (Pavel)
+        // use static member for Intersect, Left & Right
+        // with parameters for direction and where to stop
+        typedef std::vector<std::pair<Point_2, int> > Point_container;
+        Point_container tmp;
+        _intersection_points(
+                *dynamic_cast< const Kernel_arc_2*>(this), cv2,
+                back_inserter(tmp)
+        );
+        typename Point_container::const_reverse_iterator it;
+        for(it = tmp.rbegin(); it != tmp.rend(); it++) {
+            if(it->first < p) {
+                intersection = it->first;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /*!\brief
+     * Returns a trimmed version of an arc
+     *
+     * \param p the new first endpoint
+     * \param q the new second endpoint
+     * \return The trimmed arc
+     *
+     * \pre p != q
+     * \pre both points must be interior and must lie on \c cv
+     */
+    // do we need this method separetely ??
+    Kernel_arc_2 trim(const Point_2& p, const Point_2& q) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2)
+
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return trim_2(*dynamic_cast< const Kernel_arc_2* >(this), p, q);
+    }
+
+    /*!\brief
+     * Split an arc at a given point into two sub-arcs
+     *
+     * \param p The split point
+     * \param s1 Output: The left resulting sub-arc (p is its right endpoint)
+     * \param s2 Output: The right resulting sub-arc (p is its left endpoint)
+     *
+     * \pre p lies on cv but is not one of its end-points.
+     */
+    void split(const Point_2& p, Kernel_arc_2& s1, Kernel_arc_2& s2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2,
+                                            split_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        split_2(*dynamic_cast< const Kernel_arc_2* >(this), p, s1, s2);
+    }
+
+    /*!\brief
+     * Check whether this arc can be merged with a second
+     *
+     * \param cv2 The second arc
+     * \return \c true if the two arcs are mergeable, i.e., they are supported
+     * by the same curve and share a common endpoint; \c false otherwise.
+     */
+    bool are_mergeable(const Kernel_arc_2& cv2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Are_mergeable_2,
+                                            are_mergeable_2)
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        return are_mergeable_2(
+                *dynamic_cast< const Kernel_arc_2* >(this), cv2
+        );
+    }
+
+  /*!\brief
+     * Merges this arc with a second
+     *
+     * \param cv2 The second arc
+     * \return The resulting arc
+     *
+     * \pre The two arcs are mergeable, that is they are supported by the
+     *      same curve and share a common endpoint.
+     */
+    Kernel_arc_2 merge(const Kernel_arc_2& cv2) const {
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Merge_2, merge_2)
+        Kernel_arc_2 tmp;
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+        merge_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, tmp);
+        return tmp;
+    }
+
+    //!@}
+    //!\name Simplification
+    //!@{
+
+    /*! \brief
+     *  simplifies representation of \c cv and/or \c p in case they have
+     *  non-coprime supporting curves.
+     *
+     *  \return \c true if simplification took place, \c false otherwise
+     */
+    static bool simplify(const Kernel_arc_2& cv, const Coordinate_2& p) {
+
+        if (cv.curve().is_identical(p.curve())) {
+            return false;
+        }
+
+        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
+
+        if (Curved_kernel_via_analysis_2::instance().
+            kernel().decompose_2_object()(
+                    cv.curve(), p.curve(),
+                    std::back_inserter(parts_of_f),
+                    std::back_inserter(parts_of_g),
+                    std::back_inserter(common))) {
+
+            CGAL_assertion((parts_of_f.size() == 1 ||
+                            parts_of_g.size() == 1) && common.size() == 1);
+            if (parts_of_f.size() == 1) {
+                cv._simplify_by(
+                    Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (parts_of_f[0], common[0]));
+            }
+            if (parts_of_g.size() == 1) {
+                p.simplify_by(Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (parts_of_g[0], common[0]));
+            }
+            return true;
+        }
+        return false;
+    }
+
+    /*!\brief
+     * simplifies representation of \c cv1 and/or \c cv2 in case they have
+     * non-coprime supporting curves.
+     *
+     *  \return \c true if simplification took place, \c false otherwise
+     */
+    static bool simplify(const Kernel_arc_2& cv1, const Kernel_arc_2& cv2) {
+
+        if (cv1.curve().is_identical(cv2.curve())) {
+            return false;
+        }
+
+        std::vector<Curve_analysis_2> parts_of_f, parts_of_g, common;
+
+        if (Curved_kernel_via_analysis_2::instance().
+            kernel().decompose_2_object()(
+                    cv1.curve(), cv2.curve(),
+                    std::back_inserter(parts_of_f),
+                    std::back_inserter(parts_of_g),
+                    std::back_inserter(common))) {
+            CGAL_assertion((parts_of_f.size() == 1 ||
+                       parts_of_g.size() == 1) && common.size() == 1);
+            if (parts_of_f.size() == 1) {
+                cv1._simplify_by(Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (parts_of_f[0], common[0]));
+            }
+            if (parts_of_g.size() == 1) {
+                cv2._simplify_by(Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (parts_of_g[0], common[0]));
+            }
+            return true;
+        }
+        return false;
+    }
+
+protected:
+    //!\name Trimming
+    //!@{
+
+    /*!\brief
+     * Returns a trimmed version of an arc (internal version that does not use
+     * functor)
+     *
+     * \param p the new first endpoint
+     * \param q the new second endpoint
+     * \return The trimmed arc
+     *
+     * \pre p != q
+     * \pre both points must be interior and must lie on \c cv
+     */
+    // TODO implement in functor?
+    Kernel_arc_2 _trim(const Point_2& p, const Point_2& q) const {
+
+        if (p.location() == CGAL::ARR_INTERIOR &&
+            q.location() == CGAL::ARR_INTERIOR) {
+
+            return _replace_endpoints(p, q,
+                    (is_vertical() ? -1 : arcno(p.x())),
+                    (is_vertical() ? -1 : arcno(q.x()))).first;
+        }
+
+        if (p.location() != CGAL::ARR_INTERIOR &&
+            q.location() != CGAL::ARR_INTERIOR)
+            return static_cast<const Kernel_arc_2&>(*this);
+
+        Kernel_arc_2 left_arc, right_arc;
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2, split_2)
+
+        if (p.location() != CGAL::ARR_INTERIOR &&
+            q.location() == CGAL::ARR_INTERIOR) {
+
+            split_2(static_cast<const Kernel_arc_2&>(*this), q, left_arc,
+                    right_arc);
+            return left_arc;
+        }
+        // if (p.location() == CGAL::ARR_INTERIOR &&
+        //   q.location() != CGAL::ARR_INTERIOR)
+
+        split_2(static_cast<const Kernel_arc_2&>(*this), p, left_arc,
+                    right_arc);
+        return right_arc;
+    }
+
+public:
+
+    /*!\brief
+     * Trims this arc and \c cv2 to the common x-range, if it is non-trivial
+     *
+     * \param cv2 the second arc
+     * \param trimmed1 Output: trimmed version of \c *this to joint x-range of
+     *                 \c *this and \c cv2
+     * \param trimmed1 Output: trimmed version of \c cv2 to joint x-range of
+     *                 \c *this and \c cv2
+     * \return \c true, if \c *this and \c cv2 share a non-trivial
+     *         common x-range, \c false otherwise
+     */
+    bool trim_by_arc(const Kernel_arc_2& cv2, Kernel_arc_2& trimmed1,
+                     Kernel_arc_2& trimmed2) const {
+
+        CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+
+        const Kernel_arc_2& cv1 = static_cast< const Kernel_arc_2& >(*this);
+
+        Point_2 common_left, common_right;
+
+        bool joint = cv1._joint_x_range(cv2, common_left, common_right);
+
+        if (!joint) {
+            return false;
+        }
+
+        typename Curve_kernel_2::Compare_1 compare_x(
+                Curved_kernel_via_analysis_2::instance().
+                    kernel().compare_1_object());
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Construct_point_on_arc_2,
+                                            construct_point_on_arc_2)
+
+        Point_2 left1, left2;
+
+        if (common_left.location() != CGAL::ARR_LEFT_BOUNDARY) {
+            if ((cv1.location(CGAL::ARR_MIN_END) !=
+                 CGAL::ARR_LEFT_BOUNDARY)  &&
+                (compare_x(cv1.curve_end_x(CGAL::ARR_MIN_END),
+                           common_left.x()) == CGAL::EQUAL) ) {
+                left1 = cv1._minpoint();
+            } else {
+                left1 = construct_point_on_arc_2(common_left.x(),
+                                               cv1.curve(),
+                                               cv1.arcno(),
+                                               cv1);
+            }
+            if ((cv2.location(CGAL::ARR_MIN_END) !=
+                 CGAL::ARR_LEFT_BOUNDARY)  &&
+                (compare_x(cv2.curve_end_x(CGAL::ARR_MIN_END),
+                           common_left.x()) == CGAL::EQUAL) ) {
+                left2 = cv2._minpoint();
+            } else {
+                left2 = construct_point_on_arc_2(common_left.x(),
+                                               cv2.curve(),
+                                               cv2.arcno(),
+                                               cv2);
+            }
+        } else {
+            left1 = cv1._minpoint();
+            left2 = cv2._minpoint();
+        }
+
+
+        Point_2 right1, right2;
+
+        if (common_right.location() != CGAL::ARR_RIGHT_BOUNDARY) {
+
+            if ((cv1.location(CGAL::ARR_MAX_END) !=
+                 CGAL::ARR_RIGHT_BOUNDARY)  &&
+                (compare_x(cv1.curve_end_x(CGAL::ARR_MAX_END),
+                           common_right.x()) == CGAL::EQUAL) ) {
+                right1 = cv1._maxpoint();
+            } else {
+                right1 = construct_point_on_arc_2(common_right.x(),
+                                                cv1.curve(),
+                                                cv1.arcno(),
+                                                cv1);
+            }
+            if ((cv2.location(CGAL::ARR_MAX_END) !=
+                 CGAL::ARR_RIGHT_BOUNDARY)  &&
+                (compare_x(cv2.curve_end_x(CGAL::ARR_MAX_END),
+                           common_right.x()) == CGAL::EQUAL) ) {
+                right2 = cv2._maxpoint();
+            } else {
+                right2 = construct_point_on_arc_2(common_right.x(),
+                                                cv2.curve(),
+                                                cv2.arcno(),
+                                                cv2);
+            }
+
+        } else {
+            right1 = cv1._maxpoint();
+            right2 = cv2._maxpoint();
+        }
+
+        trimmed1 = cv1._trim(left1, right1);
+        trimmed2 = cv2._trim(left2, right2);
+
+        return joint;
+    }
+
+    //!@}
+
+protected:
+    //!\name Protected helper methods
+    //!@{
+
+    /*!\brief
+     * function to ensure lexicographical order of the curve ends
+     *
+     * must be called once from constructor
+     */
+    void _fix_curve_ends_order() {
+        CGAL::Comparison_result res =
+            _same_arc_compare_xy(_minpoint(), _maxpoint());
+        // curve ends cannot be identical
+        CGAL_precondition(res != CGAL::EQUAL);
+        if(res == CGAL::LARGER) { // swap curve ends and corresponding arcnos
+            std::swap(this->ptr()->_m_min, this->ptr()->_m_max);
+            std::swap(this->ptr()->_m_arcno_min, this->ptr()->_m_arcno_max);
+        }
+        // for non-vertical arcs check arcno constancy in the arc's interior
+        // for vertical arcs check that there are no intersection points
+        // between curve ends
+        _check_arc_interior();
+    }
+
+    // p.curve() <-> p.arcno()
+    // c <-> arcno_on_c
+    /*!\brief
+     * establishes preconditions that point \c pt lies on the curve
+     * \c c with arc number \c arcno_on_c, also checks that point's supporting
+     * curve and \c c are coprime
+     *
+     * \param pt Given point
+     * \param arcno_on_c Arcno on curve
+     * \param c Supporting curve
+     */
+  void _check_pt_arcno_and_coprimality(const Point_2&
+                                         CGAL_precondition_code(pt),
+                                       int CGAL_precondition_code(arcno_on_c),
+                                       const Curve_analysis_2&
+                                         CGAL_precondition_code(c)) const
+  {
+        CGAL_precondition_code(
+
+        if (!c.is_identical(pt.curve())) {
+            // -1 defines that no arcnos preconditions need to be established
+            if (arcno_on_c != -1) {
+                typename Curve_pair_analysis_2::Status_line_1
+                    cpv_line;
+                Curve_pair_analysis_2 cpa_2 =
+                    Curved_kernel_via_analysis_2::instance().
+                      kernel().construct_curve_pair_2_object()(pt.curve(), c);
+
+                cpv_line = cpa_2.status_line_for_x(pt.x());
+                CGAL_precondition(cpv_line.event_of_curve(pt.arcno(),
+                                                          pt.curve())
+                    == cpv_line.event_of_curve(arcno_on_c, c));
+            }
+            std::vector< Curve_analysis_2 > dummy[3];
+            // ensure that curves are not decomposable
+            CGAL_precondition(!Curved_kernel_via_analysis_2::instance().
+                              kernel().decompose_2_object()(
+                                      c, pt.curve(),
+                                      std::back_inserter(dummy[0]),
+                                      std::back_inserter(dummy[1]),
+                                      std::back_inserter(dummy[2]))
+            );
+        } else if (arcno_on_c != -1) {
+            CGAL_precondition(pt.arcno() == arcno_on_c);
+        }
+        );
+    }
+
+    /*!\brief
+     * establishes preconditions to ensure that there are no event
+     * points in the arc's interior (only at source and target) and its arc
+     * number is constant
+     *
+     * \pre before calling this method source and target must be sorted
+     * using \c _fix_curve_ends_order()
+     */
+    void _check_arc_interior() const {
+
+#if !(defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
+        || defined(NDEBUG))
+
+        if(is_vertical()) {
+            Coordinate_1 x0 = _minpoint().x();
+            typename Curve_analysis_2::Status_line_1 cv_line;
+            cv_line = curve().status_line_for_x(x0);
+            CGAL_precondition(cv_line.is_event());
+            CGAL_precondition(cv_line.covers_line());
+
+            // check that there are no intersections between min and max
+            // curve ends
+            bool inf_src =
+                (_minpoint().location() == CGAL::ARR_BOTTOM_BOUNDARY);
+            bool inf_tgt =
+                (_maxpoint().location() == CGAL::ARR_TOP_BOUNDARY);
+            // either no events over this line or the vertical line has at
+            // least one finite end
+            CGAL_precondition(cv_line.number_of_events() == 0 ||
+                !(inf_src && inf_tgt));
+
+            typename Curve_kernel_2::Compare_xy_2 cmp_xy(
+                Curved_kernel_via_analysis_2::instance().
+                    kernel().compare_xy_2_object());
+
+            for(int k = 0; k < cv_line.number_of_events(); k++) {
+            // TODO: replace by _compare_arc_numbers !! (Pavel)
+          // no way since _compare_arc_numbers compares only against *this arc
+
+              Coordinate_2 tmp(x0, curve(), k);
+                bool res1 = true, res2 = true;
+                if(!inf_src)
+                    res1 = (cmp_xy(_minpoint().xy(), tmp, true) ==
+                         CGAL::SMALLER);
+                if(!inf_tgt)
+                    res2 = (cmp_xy(tmp, _maxpoint().xy(), true) ==
+                         CGAL::SMALLER);
+                CGAL_precondition_msg(!(res1 && res2),
+                  "Events are not allowed in the interior of a vertical arc!");
+            }
+            return;
+        }
+
+        typename Curve_analysis_2::Status_line_1 src_line, tgt_line,
+            tmp;
+        bool inf_src = (_minpoint().location() == CGAL::ARR_LEFT_BOUNDARY),
+             inf_tgt = (_maxpoint().location() == CGAL::ARR_RIGHT_BOUNDARY);
+        src_line = (inf_src ? curve().status_line_of_interval(0) :
+            curve().status_line_for_x(_minpoint().x()));
+        tgt_line = (inf_tgt ? curve().status_line_of_interval(
+            curve().number_of_status_lines_with_event()) :
+            curve().status_line_for_x(_maxpoint().x()));
+
+        int src_idx = src_line.index(), tgt_idx = tgt_line.index(),
+            diff = tgt_idx - src_idx;
+        bool no_events_between = true;
+        // it's supposed that arcs are not degenerate but lexicographic
+        // order may not be established
+        if(src_line.is_event())
+            no_events_between = (tgt_line.is_event() ? (diff == 1) :
+                (diff == 0)||(diff == 1));
+        else
+            no_events_between = (tgt_line.is_event() ? (diff == 0)||
+                (diff == -1) : (diff == 0));
+
+        if(!no_events_between) {
+            // iterate through all events between source and target
+            // to check that all events points lie above our arc
+            int m_src_idx = src_idx + (src_line.is_event() ? 1 : 0),
+                m_tgt_idx = tgt_idx - 1, low = m_src_idx, high = m_tgt_idx;
+            int i, j;
+            if(low > high) // do we need to check it ?
+                std::swap(low, high);
+            std::pair<int, int> ipair;
+            for(i = low; i <= high; i++) {
+                tmp = curve().status_line_at_event(i);
+                for(j = 0; j < tmp.number_of_events(); j++) {
+                    ipair = tmp.number_of_incident_branches(j);
+                    if(ipair.first != 1||ipair.second != 1)
+                        break;
+                }
+                // there must be at least one event and arcno() is not LARGER
+                // than this event index
+                CGAL_precondition(j < tmp.number_of_events() && arcno() <= j);
+            }
+        }
+        // check validity of the curve-ends arcnos
+
+        const typename Curved_kernel_via_analysis_2::
+            Curve_interval_arcno_cache& map_interval_arcno =
+            Curved_kernel_via_analysis_2::instance().interval_arcno_cache();
+
+        if (src_line.is_event()) {
+            CGAL_precondition(map_interval_arcno(src_line, 0,
+                arcno()).first == this->ptr()->_m_arcno_min);
+        } else {
+            CGAL_precondition(arcno() == this->ptr()->_m_arcno_min);
+        }
+        if (tgt_line.is_event()) {
+            CGAL_precondition(map_interval_arcno(tgt_line, 1,
+                arcno()).first == this->ptr()->_m_arcno_max);
+        } else {
+            CGAL_precondition(arcno() == this->ptr()->_m_arcno_max);
+        }
+#endif
+    }
+
+    /*!\brief
+     * compares y-coordinates of two arcs over an open (or closed)
+     * interval or at exact x-coordinate
+     *
+     * \c where specifies whether to compare at negative/positive boundary or
+     * at finite point. if \c where = ARR_INTERIOR \c perturb defines to
+     * compare slightly to the left, on, or to the right of \c x0
+     *
+     * \param cv2 the second arc
+     * \param where the location in parameter space
+     * \param x0 The x-coordinate
+     * \param perturb determines whether to pertub slightly to the left/right
+     * \return the relative vertical alignment
+     *
+     * \pre !is_on_bottom_top(where)
+     */
+    CGAL::Comparison_result _compare_arc_numbers(
+            const Kernel_arc_2& cv2,
+            CGAL::Arr_parameter_space where,
+            Coordinate_1 x0 = Coordinate_1(),
+            CGAL::Sign perturb = CGAL::ZERO) const {
+
+        CGAL_precondition(!is_on_bottom_top(where));
+        CGAL_assertion(dynamic_cast< const Kernel_arc_2*>(this) != NULL);
+        Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
+        if(curve().is_identical(cv2.curve()))
+            return CGAL::sign(arcno() - cv2.arcno());
+        return _compare_coprime(cv2, where, x0, perturb);
+    }
+
+    /*!\brief
+     * computes vertical ordering of \c *this and \c cv2
+     * having coprime supporting curves
+     *
+     * \param cv2 the second arc
+     * \param where the location in parameter space
+     * \param x0 The x-coordinate
+     * \param perturb determines whether to pertub slightly to the left/right
+     * \return the relative vertical alignment
+     */
+     CGAL::Comparison_result _compare_coprime(
+            const Kernel_arc_2& cv2,
+            CGAL::Arr_parameter_space where,
+            Coordinate_1 x0,
+            CGAL::Sign perturb) const {
+
+#ifdef CKvA_DEBUG_PRINT_CERR
+        CKvA_CERR("\n_compare_coprime; this: "
+             << *dynamic_cast< const Kernel_arc_2*>(this)
+             << "; g: " << cv2.curve().polynomial_2()
+             << "; arcno_on_g: " << cv2.arcno() << "; where: " << where
+        );
+        if (where == CGAL::ARR_INTERIOR) {
+            CKvA_CERR("; x = " << CGAL::to_double(x0));
+        }
+        CKvA_CERR("\n");
+#endif
+
+        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
+        Curve_pair_analysis_2 cpa_2 = Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (curve(), cv2.curve());
+
+        if(where == CGAL::ARR_INTERIOR)
+            cpv_line = cpa_2.status_line_for_x(x0, perturb);
+        else
+            cpv_line = cpa_2.status_line_of_interval(
+                    // TODO don't mix up location (where) and finiteness!
+                    where == CGAL::ARR_LEFT_BOUNDARY ? 0 :
+                    cpa_2.number_of_status_lines_with_event());
+
+        CGAL::Sign res =
+            CGAL::sign(cpv_line.event_of_curve(arcno(), curve()) -
+                       cpv_line.event_of_curve(cv2.arcno(), cv2.curve()));
+        CKvA_CERR("result: " << res << "\n");
+        return res;
+    }
+
+    /*\brief
+     * internal comparison of two curve ends "lying" on the same arc
+     *
+     * since points are supposed to lie on the same arc, converging to the
+     * boundary implies equality
+     *
+     * \param p first endpoint
+     * \param q second endpint
+     * \param equal_x \c true indicates to skip the comparison by x
+     * \param only_x \c true indicates to report only the comparison by x
+     * \returns the result of the queried comparison
+     */
+    CGAL::Comparison_result _same_arc_compare_xy(
+            const Point_2& p,
+            const Point_2& q,
+            bool equal_x = false,
+            bool only_x = false) const {
+
+        CKvA_CERR("\n_same_arc_compare_xy; this: "
+             << *dynamic_cast< const Kernel_arc_2*>(this)
+             << "; p: " << p
+             << "; q: " << q
+             << "; equal_x: " << equal_x
+             << "; only_x: " << only_x
+             << "\n"
+        );
+
+        CGAL::Comparison_result res;
+
+        if (p.is_identical(q)) {
+            res = CGAL::EQUAL;
+            CKvA_CERR("result1: " << res << "\n");
+            return res;
+        }
+
+        CGAL::Arr_parameter_space locp = p.location(), locq = q.location();
+        if (!equal_x || only_x) {
+
+            if (!p.is_on_left_right() && !q.is_on_left_right()) {
+                // both xs are finite: require x-comparisons
+                res = Curved_kernel_via_analysis_2::instance().
+                    compare_x_2_object()(p, q);
+                if (res != CGAL::EQUAL) {
+                    CKvA_CERR("result2: " << res << "\n");
+                    return res;
+                }
+            } else if(locp != locq) {
+                CGAL_assertion(p.is_on_left_right() || q.is_on_left_right());
+                // at least one of the points lies at infty: suffice to cmp
+                // boundaries
+                if (locp == CGAL::ARR_LEFT_BOUNDARY) {
+                    res = CGAL::SMALLER;
+                    CKvA_CERR("result3: " << res << "\n");
+                    return res;
+                } else if (locp == CGAL::ARR_RIGHT_BOUNDARY) {
+                    res = CGAL::LARGER;
+                    CKvA_CERR("result4: " << res << "\n");
+                    return res;
+                } else if (locq == CGAL::ARR_LEFT_BOUNDARY) {
+                    res = CGAL::LARGER;
+                    CKvA_CERR("result5: " << res << "\n");
+                    return res;
+                } else if (locq == CGAL::ARR_RIGHT_BOUNDARY) {
+                    res = CGAL::SMALLER;
+                    CKvA_CERR("result6: " << res << "\n");
+                    return res;
+                }
+            } // else: proceed to y-comparison
+        }
+        if (only_x) {
+            res = CGAL::EQUAL;
+            CKvA_CERR("result7: " << res << "\n");
+            return res;
+        }
+        if (locp == locq) {
+            if(locp != CGAL::ARR_INTERIOR) {
+                res = CGAL::EQUAL; // both points are at the same inf in y
+                CKvA_CERR("result8: " << res << "\n");
+                return res;
+            }
+            // compare only y-values;
+            res = Curved_kernel_via_analysis_2::instance().
+                compare_xy_2_object()(p, q, true);
+            CKvA_CERR("result9: " << res << "\n");
+            return res;
+        }
+        // here: locp != locq && one of them is at inf y
+        if (locp == CGAL::ARR_INTERIOR) {
+            res = (locq == CGAL::ARR_BOTTOM_BOUNDARY ?
+                   CGAL::LARGER : CGAL::SMALLER);
+            CKvA_CERR("result10: " << res << "\n");
+            return res;
+        }
+        // here: locp != locq && locp is at infty
+        res = (locp == CGAL::ARR_BOTTOM_BOUNDARY ?
+               CGAL::SMALLER : CGAL::LARGER);
+        CKvA_CERR("result11: " << res << "\n");
+        return res;
+    }
+
+    /*!\brief
+     * min end-point of this arc (provided for code readability)
+     *
+     * \return min endpoint of arc (may lie on a boundary!)
+     */
+    inline
+    const Point_2& _minpoint() const {
+        return this->ptr()->_m_min;
+    }
+
+    /*!\brief
+     * max end-point of this arc (provided for code readability)
+     *
+     * \return max endpoint of arc (may lie on a boundary!)
+     */
+    inline
+    const Point_2& _maxpoint() const {
+        return this->ptr()->_m_max;
+    }
+
+    /*!\brief
+     * computes this arc's interval index
+     *
+     * \pre !is_vertical()
+     */
+    int _compute_interval_id() const {
+        CGAL_precondition(!is_vertical());
+        // we are interested in interval "to the right"
+        CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
+        bool min_has_x =
+            (is_finite(CGAL::ARR_MIN_END) ||
+             min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+             min_loc == CGAL::ARR_TOP_BOUNDARY);
+
+        if (!min_has_x) {
+            return 0;
+        }
+        // else
+        typename Curve_analysis_2::Status_line_1 cv_line =
+            curve().status_line_for_x(_minpoint().x(), CGAL::POSITIVE);
+        return cv_line.index();
+    }
+
+    /*!\brief
+     * computes this rational value in the interiors of the arc's x-range
+     *
+     * \pre !is_vertical()
+     */
+    Bound _compute_boundary_in_interval() const {
+        CGAL_precondition(!is_vertical());
+        // a curve end at negative boundary => 0th interval
+
+        Bound res(0);
+
+        typename Curve_kernel_2::Approximate_relative_1 approx_x;
+
+	typename Curve_kernel_2::Bound_between_1 bound_between_x;
+
+	CGAL::Arr_parameter_space min_loc = location(CGAL::ARR_MIN_END);
+	bool min_has_x =
+	  (is_finite(CGAL::ARR_MIN_END) ||
+	   min_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+	   min_loc == CGAL::ARR_TOP_BOUNDARY);
+
+	CGAL::Arr_parameter_space max_loc = location(CGAL::ARR_MAX_END);
+	bool max_has_x =
+	  (is_finite(CGAL::ARR_MAX_END) ||
+	   max_loc == CGAL::ARR_BOTTOM_BOUNDARY ||
+	   max_loc == CGAL::ARR_TOP_BOUNDARY);
+
+	if (min_has_x) {
+	  Coordinate_1 min_x = _minpoint().x();
+	  if (max_has_x) {
+	    Coordinate_1 max_x = _maxpoint().x();
+	    res = bound_between_x(min_x, max_x);
+	  } else {
+	    std::pair<Bound,Bound> min_pair=approx_x(min_x,4);
+	    res = min_pair.second + Bound(1);
+	  }
+	} else {
+	  if (max_has_x) {
+	    Coordinate_1 max_x = _maxpoint().x();
+	    std::pair<Bound,Bound> max_pair=approx_x(max_x,4);
+	    res = max_pair.first - Bound(1);
+	  } else {
+	    // res stays 0
+	  }
+        }
+        CGAL_postcondition(is_in_x_range_interior(Coordinate_1(res)));
+        return res;
+    }
+
+    /*!\brief
+     * Replaces this arc's end-points by \c p1 and \c p2 with arcnos
+     * \c arcno1 and \c arcno2.
+     *
+     * new curve ends are sorted lexicographical in case of need;
+     * all preconditions must be checked by the caller
+     *
+     * \param p1 new first endpoint
+     * \param p2 new second endpoint
+     * \param arcno1 new first arcno (at \c p1)
+     * \param arcno1 new second arcno (at \c p2)
+     * \return pair whose first entry represent the refined arc, and whose
+     *         second entry reports the lexicographic comparison of p1 and p2
+     */
+    std::pair< Kernel_arc_2, CGAL::Comparison_result >
+    _replace_endpoints(
+            const Point_2& p1, const Point_2& p2,
+            int arcno1 = -1, int arcno2 = -1) const {
+
+        CKvA_CERR("\n_replace_endpoints\n");
+
+        Rep rep(*(this->ptr()));
+        rep._m_min = p1;
+        rep._m_max = p2;
+        if (!is_vertical()) {
+            if (arcno1 >= 0) {
+                rep._m_arcno_min = arcno1;
+            }
+            if (arcno2 >= 0) {
+                rep._m_arcno_max = arcno2;
+            }
+        }
+
+        CGAL::Comparison_result cmp = _same_arc_compare_xy(p1,p2);
+        if (cmp == CGAL::LARGER) {
+            std::swap(rep._m_min, rep._m_max);
+            std::swap(rep._m_arcno_min, rep._m_arcno_max);
+        }
+        /* no need to recompute location since they are set during
+           construction of respective curve ends */
+        rep._m_is_vertical = this->ptr()->_m_is_vertical;
+	rep._m_left_to_right = this->ptr()->_m_left_to_right;
+
+	rep._m_interval_id = boost::none;
+	rep._m_boundary_in_interval = boost::none;
+
+        return std::make_pair(Kernel_arc_2(rep), cmp);
+    }
+
+    /*!\brief
+     * Simplifies representation of the arc !! DEPRECATED FUNCTION !!
+     *
+     * Given a decomposition of the arcs's supporting curve into a pair of two
+     * curves \c cpa_2, we search for a curve this arc lies on and reset arc's
+     * supporting curve and arcnos appropriately.
+     *
+     * \param cpa_2 analysis of curve pair that should be used
+     *              in simplification
+     * \pre \c cpa_2 must correspond to a decomposition of this arc's
+     * supporting curve
+     */
+    void _simplify_by(const Curve_pair_analysis_2& cpa_2) const {
+
+        typedef typename Curve_analysis_2::Polynomial_2 Polynomial_2;
+        Polynomial_2 f = curve().polynomial_2();
+        CGAL_precondition_code(
+             Polynomial_2 mult = cpa_2.curve_analysis(0).polynomial_2() *
+                    cpa_2.curve_analysis(1).polynomial_2();
+             typename CGAL::Polynomial_traits_d<Polynomial_2>::Total_degree
+                deg;
+        );
+        // common parts and full parts
+        CGAL_precondition(CGAL::resultant(mult, f).degree() < 1);
+        CGAL_precondition(mult.degree() == f.degree());
+        CGAL_precondition(deg(mult) == deg(f));
+
+        Coordinate_1 x0;
+        if(is_vertical()) {
+            // processing vertical arcs: search for supporting curve which has
+            // vertical line at this x0 (must be exactly 1 curve)
+            x0 = _minpoint().x();
+            Curve_analysis_2 ca_2(cpa_2.curve_analysis(0));
+            if(ca_2.status_line_for_x(x0).covers_line())
+                this->ptr()->_m_support = ca_2;
+            else {
+                ca_2 = cpa_2.curve_analysis(1);
+                CGAL_assertion(ca_2.status_line_for_x(x0).covers_line());
+                this->ptr()->_m_support = ca_2;
+            }
+            return;
+        }
+
+        // processing non-vertical arcs
+        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
+        std::pair<int, int> ipair;
+        // preserve original supporting curve
+        Curve_analysis_2 orig_curve(curve());
+
+        // TODO do we mean location of is_finite?
+        bool inf1_x = (_minpoint().location() == CGAL::ARR_LEFT_BOUNDARY);
+        bool curve_idx;
+        if(!inf1_x) {
+            x0 = _minpoint().x();
+            cpv_line = cpa_2.status_line_for_x(x0, CGAL::POSITIVE);
+        } else
+            cpv_line = cpa_2.status_line_of_interval(0);
+
+        CGAL_precondition_code(
+            typename Curve_analysis_2::Status_line_1
+                cv_line = (inf1_x ? orig_curve.status_line_of_interval(0) :
+                        orig_curve.status_line_for_x(x0, CGAL::POSITIVE));
+        );
+        CGAL_precondition(cpv_line.number_of_events() ==
+            cv_line.number_of_events());
+
+        { // search for new supporting curve and new arcno
+            // since supporting curve was decomposed in two parts, arcno
+            // represents y-position here
+            ipair = cpv_line.curves_at_event(arcno());
+            // this must be 1-curve event
+            CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
+            this->ptr()->_m_arcno = (ipair.first != -1 ? ipair.first :
+                ipair.second);
+            curve_idx = (ipair.first == -1);
+            this->ptr()->_m_support = cpa_2.curve_analysis(curve_idx);
+        }
+        // search for source arcno
+        /////////////// ATTENTION: this only holds for 2D plane topology !!
+        ///////////////////////////////////////////////////////////////////
+        // TODO do we mean location of is_finite?
+        if(_minpoint().location() == CGAL::ARR_INTERIOR)  {
+
+            cpv_line = cpa_2.status_line_for_x(x0);
+            CGAL_precondition(cpv_line.number_of_events() ==
+                    orig_curve.status_line_for_x(x0).number_of_events());
+            ipair = cpv_line.curves_at_event(this->ptr()->_m_arcno_min);
+            if(ipair.first != -1 && ipair.second != -1)
+                // choose simpler supporting curve
+
+              this->ptr()->_m_arcno_min = ((curve_idx) ?
+                                           ipair.second : ipair.first);
+            else {
+                CGAL_assertion(ipair.first != -1||ipair.second != -1);
+                this->ptr()->_m_arcno_min = (ipair.first != -1 ?
+                    ipair.first : ipair.second);
+            }
+        } else // for infinite curve end arcno equals to interior arcno
+            this->ptr()->_m_arcno_min = arcno();
+
+        // search for new target arcno
+        /////////////// ATTENTION: this only holds for 2D plane topology !!
+        ///////////////////////////////////////////////////////////////////
+        // TODO do we mean location of is_finite?
+        if(_maxpoint().location() == CGAL::ARR_INTERIOR) {
+
+            x0 = _maxpoint().x();
+            cpv_line = cpa_2.status_line_for_x(x0);
+            CGAL_precondition(cpv_line.number_of_events() ==
+                    orig_curve.status_line_for_x(x0).number_of_events());
+
+            ipair = cpv_line.curves_at_event(this->ptr()->_m_arcno_max);
+            if(ipair.first != -1 && ipair.second != -1)
+                // choose simpler supporting curve (the one which matches
+                //  interior arcno)
+                this->ptr()->_m_arcno_max = (curve_idx ?
+                    ipair.second : ipair.first);
+            else {
+                CGAL_assertion(ipair.first != -1||ipair.second != -1);
+                this->ptr()->_m_arcno_max = (ipair.first != -1 ?
+                    ipair.first : ipair.second);
+            }
+        } else // for infinite curve end arcno equals to interior arcno
+            this->ptr()->_m_arcno_max = arcno();
+
+        // invalidate curve-specific data
+        this->ptr()->_m_interval_id = boost::none;
+        this->ptr()->_m_boundary_in_interval = boost::none;
+    }
+    //!@}
+
+protected:
+    //!\name Protected intersection methods
+    //!@{
+
+    /*!\brief
+     * returns \c true if the two arcs \c *this and \c cv2 overlap,
+     * overlapping part(s) are inserted to the output iterator \c oi
+     * (of type \c Kernel_arc_2 ); if no overlapping parts found -
+     * returns \c false
+     *
+     * \param cv2 The second arc
+     * \param oi Report overlapping parts to this output iterator
+     * \return \c true, if there was an overlap, \c false otherwise
+     */
+    template < class OutputIterator >
+    bool _trim_if_overlapped(const Kernel_arc_2& cv2, OutputIterator oi) const
+    {
+
+        CKvA_CERR("\n_trim_if_overlapped: this: "
+             << *dynamic_cast< const Kernel_arc_2*>(this) << "; and "
+             << cv2 << "\n");
+        // one arc is vertical and the other one is not, or x-ranges are not
+        // overlapping => quit
+        if (is_vertical() != cv2.is_vertical()) {
+            return false;
+        }
+
+        if (is_vertical()) { // here process vertical case
+            // check for x-coordinates equality
+            if (Curved_kernel_via_analysis_2::instance().
+                compare_x_2_object()(
+                    _minpoint(),
+                    cv2._minpoint()) != CGAL::EQUAL) {
+                return false;
+            }
+            Kernel_arc_2::simplify(
+                    *dynamic_cast< const Kernel_arc_2*>(this), cv2
+            );
+            // coprime support => no overlaps
+            if(!curve().is_identical(cv2.curve()))
+                return false;
+
+            // LARGER source and smaller target
+            Point_2 src = (_same_arc_compare_xy(_minpoint(), cv2._minpoint(),
+                 true) == CGAL::LARGER ? _minpoint() : cv2._minpoint()),
+                    tgt = (_same_arc_compare_xy(_maxpoint(), cv2._maxpoint(),
+                 true)  == CGAL::SMALLER ? _maxpoint() : cv2._maxpoint());
+            // vertical arcs do not overlap
+            if(_same_arc_compare_xy(src, tgt, true) != CGAL::SMALLER)
+                return false;
+            // construct a common part
+            *oi++ = (_replace_endpoints(src, tgt, -1, -1).first);
+            return true;
+        }
+        // ask for joint x-range of two arcs
+        // (LARGER source & smaller target curve ends)
+        Point_2 src, tgt;
+        if (!_joint_x_range(cv2, src, tgt)) {
+            return false;
+        }
+
+        if (curve().is_identical(cv2.curve())) {
+            if(arcno() != cv2.arcno()) // arcnos are not equal => no overlaps
+                return false;
+            int a_min = (src.is_on_left_right() ? -1 : arcno(src.x())),
+                a_max = (tgt.is_on_left_right() ? -1 : arcno(tgt.x()));
+            // construct a common  part
+            *oi++ = _replace_endpoints(src, tgt, a_min, a_max).first;
+            return true;
+        }
+
+        // we are left with two non-vertical arcs whose supporting curves
+        // are different => look for overlapping parts of the curves
+        typedef std::vector<std::pair<Curve_analysis_2, int> >
+            Curve_arcno_container;
+        typedef std::vector<Curve_analysis_2> Curve_container;
+        Curve_container parts_f, parts_g, common;
+
+        if (!Curved_kernel_via_analysis_2::instance().
+            kernel().decompose_2_object()(
+                    curve(), cv2.curve(),
+                    std::back_inserter(parts_f),
+                    std::back_inserter(parts_g),
+                    std::back_inserter(common))) {
+            return false; // supporting curves are coprime => quit
+        }
+        Coordinate_1 x0;
+        bool yes = false, inf_x = src.is_on_left_right();
+        if(!inf_x) // choose a target x-coordinate from the joint x-range
+            x0 = src.x();
+        std::pair<int, int> ipair;
+        Curve_pair_analysis_2 cpa_2;
+        Curve_arcno_container found, overlaps;
+
+        CKvA_CERR("_trim_if_overlapped: non-coprime supporting curves\n");
+
+        typename Curve_pair_analysis_2::Status_line_1 cpv_line;
+        // iterate to find all overlapping parts
+        typename Curve_container::const_iterator it_parts, it_com;
+        for (it_com = common.begin(); it_com != common.end(); it_com++) {
+            for(it_parts = parts_f.begin(); it_parts != parts_f.end();
+                    it_parts++) {
+
+                cpa_2 = Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (*it_com, *it_parts);
+                cpv_line = (inf_x ? cpa_2.status_line_of_interval(0) :
+                    cpa_2.status_line_for_x(x0, CGAL::POSITIVE));
+                // no intersections at this curve pair => skip it
+                if(arcno() >= cpv_line.number_of_events())
+                    continue;
+                ipair = cpv_line.curves_at_event(arcno(),*it_com,*it_parts);
+                // this must be 1-curve event: is this true ???
+                CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
+                if(ipair.first != -1) // lies on a common part
+                    found.push_back(std::make_pair(*it_com, ipair.first));
+            }
+        }
+
+        // now iterate over all "suspicious" common parts to find real overlaps
+        typename Curve_arcno_container::const_iterator it_found;
+        for (it_found = found.begin(); it_found != found.end(); it_found++) {
+            for (it_parts = parts_g.begin(); it_parts != parts_g.end();
+                 it_parts++) {
+
+                cpa_2 = Curved_kernel_via_analysis_2::instance().
+                        kernel().construct_curve_pair_2_object()
+                            (it_found->first, *it_parts);
+
+                cpv_line = (inf_x ? cpa_2.status_line_of_interval(0) :
+                    cpa_2.status_line_for_x(x0, CGAL::POSITIVE));
+                // no intersections at this curve pair => skip it
+                if(cv2.arcno() >= cpv_line.number_of_events())
+                    continue;
+                ipair = cpv_line.curves_at_event(cv2.arcno(),
+                                                 it_found->first,
+                                                 *it_parts);
+                // this must be 1-curve event: is this true ???
+                CGAL_assertion(!(ipair.first != -1&&ipair.second != -1));
+                if(ipair.first == -1 || ipair.first == it_found->second)
+                    continue;
+                // lies on a common part and arcnos are the same: VUALA!!!
+                // here we need to "clip" [src.x(), tgt.x()] w.r.t. the
+                // defining x-range of a common part *it_found.. how ?
+                yes = true; // we've got it!
+                // now construct a common arc
+                Rep rep(*(this->ptr()));
+                rep._m_min = src;
+                rep._m_max = tgt;
+                rep._m_support = it_found->first;
+                rep._m_arcno = it_found->second;
+                rep._m_arcno_min = rep._m_arcno_max = rep._m_arcno;
+
+                if(!inf_x) {
+                    int a = arcno(src.x());
+                    if(a != arcno()) {
+                        cpv_line = cpa_2.status_line_for_x(src.x());
+                        ipair = cpv_line.curves_at_event(a,
+                                                         it_found->first,
+                                                         *it_parts);
+                        // should ultimately lie on the common curve ?
+                        CGAL_assertion(ipair.first != -1);
+                        rep._m_arcno_min = ipair.first;
+                    }
+                }
+                if(!tgt.is_on_left_right()) {
+                    int a = arcno(tgt.x());
+                    if(a != arcno()) {
+                        cpv_line = cpa_2.status_line_for_x(tgt.x());
+                        ipair = cpv_line.curves_at_event(a,
+                                                         it_found->first,
+                                                         *it_parts);
+                        // should ultimately lie on the common curve ?
+                        CGAL_assertion(ipair.first != -1);
+                        rep._m_arcno_max = ipair.first;
+                    }
+                }
+                *oi++ = Kernel_arc_2(rep);
+            }
+        }
+        return yes;
+    }
+
+    /*!\brief
+     * computes zero-dimensional intersections of \c cv1 with \c cv2.
+     *
+     * Intersection points
+     * are inserted to the output iterator \c oi as objects of type
+     * <tt>std::pair<Point_2, unsigned int></tt> (intersection point +
+     * multiplicity)
+     *
+     * \param cv1 the first arc
+     * \param cv2 the second arc
+     * \param oi reporting zero-dimensional intersections through this output
+     *        iterator
+     * \pre !cv1.do_overlap()
+     */
+    template < class OutputIterator >
+    static OutputIterator _intersection_points(
+            const Kernel_arc_2& cv1, const Kernel_arc_2& cv2,
+            OutputIterator oi) {
+
+        // handle a special case when two arcs are supported by the same
+        // curve => only end-point intersections
+
+        CKvA_CERR("\nintersection_points\n");
+        Kernel_arc_2::simplify(cv1, cv2);
+        if (cv1.curve().is_identical(cv2.curve())) {
+            return _intersect_at_endpoints(cv1, cv2, oi);
+        }
+
+        // else general case: distinct supporting curves
+        return _intersect_coprime_support(cv1, cv2, oi);
+    }
+
+    /*!\brief
+     * computes intersection of two arcs meeting only at their curve ends.
+     *
+     * Intersection points are returned in the output interator \c oi as object
+     * of type std::pair<Point_2, int> (intersection + multiplicity)
+     *
+     * \param cv1 the first arc
+     * \param cv2 the second arc
+     * \param oi reporting zero-dimensional intersections through this output
+     *        iterator
+     *
+     */
+    template < class OutputIterator >
+    static OutputIterator _intersect_at_endpoints(const Kernel_arc_2& cv1,
+                                                  const Kernel_arc_2& cv2,
+                                                  OutputIterator oi) {
+
+        CKvA_CERR("\n_intersect_at_endpoints\n");
+
+        CGAL_precondition(!cv1.do_overlap(cv2));
+        /* Since *this and cv2 do not overlap and cannot contain singularities
+         * in the interior, the only remaining candidates for intersections are
+         * their finite endpoints (if any), for vertical arcs as well.
+         */
+        /*CGAL::Bound_type bnd_x, bnd_y,
+            bnd1_x = cv2.boundary_in_x(CGAL::ARR_MIN_END),
+            bnd1_y = cv2.boundary_in_y(CGAL::ARR_MIN_END),
+            bnd2_x = cv2.boundary_in_x(CGAL::ARR_MAX_END),
+            bnd2_y = cv2.boundary_in_y(CGAL::ARR_MAX_END);*/
+
+        // TODO do we mean location of is_finite?
+        bool f2_min = (cv2._minpoint().location() == CGAL::ARR_INTERIOR),
+             f2_max = (cv2._maxpoint().location() == CGAL::ARR_INTERIOR);
+        if(!(f2_min || f2_max)) // neither of curve ends is finite =>
+            return oi;          // no intersections
+
+        Point_2 pt;
+
+        CGAL::Arr_curve_end end = CGAL::ARR_MIN_END;
+
+        while(1) {
+            CGAL::Arr_parameter_space loc = cv1.location(end);
+            //bnd_x = boundary_in_x(end), bnd_y = boundary_in_y(end);
+            if(loc != CGAL::ARR_INTERIOR)
+                goto Lendloop;
+            pt = cv1.curve_end(end);
+            // easy case: intersection at singularity doesn't require to
+            // compare x/y-coordinates
+            /*if(is_singular(bnd_x)) {
+                if(bnd1_x == bnd_x || bnd2_x == bnd_x)
+                    *oi++ = std::make_pair(pt, 0);
+
+            } else if(is_singular(bnd_y)) {
+                if(bnd1_y == bnd_y || bnd2_y == bnd_y)
+                    *oi++ = std::make_pair(pt, 0);
+
+            } else if(is_on_disc(bnd_x)) {
+
+    // CONFUSION: if bndx != bnd1_x should we compare ys at -oo
+    // or at +oo ? or is this true for discontinuity:
+    // 0th interval == the last interval ? (i.e. intervals are mirrored ?)
+    // what if both conditions are satisfied at a time ? duplicates ?
+                if(bnd1_x == CGAL::AFTER_DISCONTINUITY &&
+                    _compare_arc_numbers(cv2, bnd1_x) == CGAL::EQUAL)
+                    *oi++ = std::make_pair(pt, 0);
+
+                if(bnd2_x == CGAL::BEFORE_DISCONTINUITY &&
+                    _compare_arc_numbers(cv2, bnd2_x) == CGAL::EQUAL)
+                    *oi++ = std::make_pair(pt, 0);
+
+            } else if(is_on_disc(bnd_y)) {
+                  // disc in y: compare only x-coordinates !
+    // what if both conditions are satisfied at a time ? duplicates ?
+
+                if(bnd1_y == CGAL::AFTER_DISCONTINUITY &&
+                    kernel_2.compare_1_object()(pt.x(), _minpoint().x()) ==
+                        CGAL::EQUAL)
+                    *oi++ = std::make_pair(pt, 0);
+
+                if(bnd2_y == CGAL::BEFORE_DISCONTINUITY &&
+                    kernel_2.compare_1_object()(pt.x(), _maxpoint().x()) ==
+                        CGAL::EQUAL)
+                    *oi++ = std::make_pair(pt, 0);
+              // ordinar normal case:
+              // selection is exclusive since arcs cannot intersect twice
+              // at the same finite end-point
+              } else*/ if((f2_min && pt == cv2._minpoint()) ||
+                          (f2_max && pt == cv2._maxpoint())) {
+                  *oi++ = std::make_pair(pt, 0);
+              }
+        Lendloop:
+            if (end == CGAL::ARR_MAX_END) {
+                break;
+            }
+            end = CGAL::ARR_MAX_END;
+        }
+        return oi;
+    }
+
+    /*!\brief
+     * computes a joint x-range of two arcs and returns \c true
+     * if arcs' x-ranges overlap; otherwise returns \c false
+     *
+     * \param cv2 The second arc
+     * \param pt_low Output: Point indicating the lower bound of the the joint
+     *        x-range
+     * \param pt_high Output: Point indicating the upper bound of the the joint
+     *        x-range
+     * \return \c true, if arcs overlap, \c false otherwise
+     *
+     * \pre both arcs are not vertical
+     */
+    bool _joint_x_range(const Kernel_arc_2& cv2, Point_2& pt_low,
+                        Point_2& pt_high) const {
+
+        CKvA_CERR("\n_joint_x_range\n");
+
+        CGAL_precondition(!is_vertical());
+        CGAL_precondition(!cv2.is_vertical());
+
+        Point_2 pt1 = _minpoint(), pt2 = cv2._minpoint();
+        Point_2 low = pt2, high;
+        // find intersection x-range: larger source & smaller target
+        if (pt1.location() != CGAL::ARR_LEFT_BOUNDARY) {
+            if (pt2.location() != CGAL::ARR_LEFT_BOUNDARY) {
+                low = (Curved_kernel_via_analysis_2::instance().
+                       compare_x_2_object()(pt1, pt2) ==
+                       CGAL::LARGER ? pt1 : pt2);
+            } else {
+                low = pt1;
+            }
+        }
+        pt1 = _maxpoint(), pt2 = cv2._maxpoint(), high = pt2;
+        if (pt1.location() != CGAL::ARR_RIGHT_BOUNDARY) {
+            if(pt2.location() != CGAL::ARR_RIGHT_BOUNDARY) {
+                high = (Curved_kernel_via_analysis_2::instance().
+                        compare_x_2_object()(pt1, pt2) ==
+                        CGAL::SMALLER ? pt1 : pt2);
+            } else {
+                high = pt1;
+            }
+        }
+        if (!low.is_on_left_right() && !high.is_on_left_right() &&
+            Curved_kernel_via_analysis_2::instance().
+            compare_x_2_object()(low, high) !=
+            CGAL::SMALLER) {// disjoint x-ranges
+            return false;
+        }
+        pt_low = low;
+        pt_high = high;
+
+        return true;
+    }
+
+    /*!\brief
+     * computes zero-dimensional
+     * intersections of two arcs having coprime supporting curves
+     *
+     * intersection points are inserted to the output iterator \c oi as objects
+     * of type <tt>std::pair<Point_2, unsigned int></tt> (intersection point +
+     * multiplicity)
+     *
+     * \param cv1 the first arc
+     * \param cv2 the second arc
+     * \param oi reporting zero-dimensional intersections through this output
+     *        iterator
+     */
+    template <class OutputIterator>
+    static OutputIterator _intersect_coprime_support(const Kernel_arc_2& cv1,
+                                                     const Kernel_arc_2& cv2,
+                                                     OutputIterator oi) {
+        // vertical arcs: the interesting case is when only one of the arcs is
+        // vertical - otherwise there is no intersection (different x-coords),
+        // or they overlap (not allowed), or they touch at the end-points
+        // (already tested)
+
+        CKvA_CERR("\n_intersect_coprime_support: " << cv1 <<
+            " and " << cv2 << "\n");
+
+        if (cv1.is_vertical() || cv2.is_vertical()) {
+            CGAL_assertion(cv1.is_vertical() != cv2.is_vertical());
+            // due to coprimality condition, supporting curves are different =>
+            // they have no common vertical line therefore there is no
+            // intersection
+            const Kernel_arc_2& vert = (cv1.is_vertical() ? cv1 : cv2),
+                nonvert = (cv1.is_vertical() ? cv2 : cv1);
+            Coordinate_1 x = vert._minpoint().x();
+            // vertical arc does not lie within another arc's x-range => no
+            // intersections
+            if (!nonvert.is_in_x_range(x)) {
+                return oi;
+            }
+            typename Curved_kernel_via_analysis_2:: Construct_point_on_arc_2
+                construct_point_on_arc =
+                Curved_kernel_via_analysis_2::instance().
+                construct_point_on_arc_2_object();
+
+
+            Point_2 xy = construct_point_on_arc(
+                    x, nonvert.curve(), nonvert.arcno(x), nonvert
+            );
+            if (vert.compare_y_at_x(xy) == CGAL::EQUAL) {
+                *oi++ = std::make_pair(xy, 1);
+            }
+            return oi;
+        }
+
+        Point_2 low_x, high_x;
+        // x-ranges are disjoint => nothing to do
+        if (!cv1._joint_x_range(cv2, low_x, high_x)) {
+            return oi;
+        }
+        bool inf_low = low_x.is_on_left_right(),
+            inf_high = high_x.is_on_left_right();
+        Curve_analysis_2 f = cv1.curve(), g = cv2.curve();
+        Curve_pair_analysis_2 cpa_2 =
+            Curved_kernel_via_analysis_2::instance().
+                kernel().construct_curve_pair_2_object()(f, g);
+        int low_idx = 0,
+            high_idx = cpa_2.number_of_status_lines_with_event()-1;
+
+	bool index_at_event_min=false;
+	bool index_at_event_max=false;
+
+        typename Curve_pair_analysis_2::Status_line_1 line;
+        if(!inf_low) {
+            line = cpa_2.status_line_for_x(low_x.x());
+            low_idx = line.index();
+	    index_at_event_min=line.is_event();
+            if(index_at_event_min) {
+                if((cv1._minpoint().is_on_bottom_top() &&
+                    low_x.x() == cv1._minpoint().x()) ||
+                   (cv2._minpoint().is_on_bottom_top() &&
+                    low_x.x() == cv2._minpoint().x())) {
+                 // hack: no intersection with asymptotic end
+		  low_idx++;
+		  index_at_event_min=false;
+		}
+            }
+        }
+
+        if(!inf_high) {
+            line = cpa_2.status_line_for_x(high_x.x());
+            high_idx = line.index();
+	    index_at_event_max=line.is_event();
+            if(!index_at_event_max) {
+	      high_idx--;
+	    } else if((cv1._maxpoint().is_on_bottom_top() &&
+                high_x.x() == cv1._maxpoint().x()) ||
+                (cv2._maxpoint().is_on_bottom_top() &&
+		 high_x.x() == cv2._maxpoint().x())) {
+	      // hack: no intersection with asymptotic end
+	      high_idx--;
+	      index_at_event_max=false;
+	    }
+        }
+
+        // run over all event points within the joint x-range of two arcs
+        // looking whether a particular event is made of both curves, i.e.,
+        // grabbing all 2-curve events
+        std::pair<int, int> ipair;
+        int arcno1, arcno2, mult;
+
+        typename CGAL::Polynomial_traits_d<
+            typename Curve_kernel_2::Polynomial_2>::Total_degree deg;
+
+        bool which_curve = (deg(f.polynomial_2()) < deg(g.polynomial_2()));
+        for(int i = low_idx; i <= high_idx; i++) {
+            typename Curve_pair_analysis_2::Status_line_1 tmp =
+                cpa_2.status_line_at_event(i);
+            if(!tmp.is_intersection())
+                continue;
+
+            Coordinate_1 x0 = tmp.x();
+            if((i == low_idx && index_at_event_min) ||
+	       (i == high_idx && index_at_event_max)) {
+                arcno1 = cv1.arcno(x0);
+                arcno2 = cv2.arcno(x0);
+                mult = 0; // intersection at end-point
+            } else {
+                arcno1 = cv1.arcno();
+                arcno2 = cv2.arcno();
+                mult = -1; // need to compute
+            }
+
+            int pos = tmp.event_of_curve(arcno1, f);
+            if (pos != tmp.event_of_curve(arcno2, g)) {
+                continue;
+            }
+            if (mult == -1) {
+                mult = tmp.multiplicity_of_intersection(pos);
+            }
+
+            // pick up the curve with lower degree
+            typename Curved_kernel_via_analysis_2::Construct_point_on_arc_2
+                construct_point_on_arc =
+                Curved_kernel_via_analysis_2::instance().
+                construct_point_on_arc_2_object();
+
+            if (which_curve) {
+                Point_2 p = construct_point_on_arc(
+                        x0, cv1.curve(), arcno1, cv1
+                );
+                *oi++ = std::make_pair(p, mult);
+            } else {
+                Point_2 p = construct_point_on_arc(
+                        x0, cv2.curve(), arcno2, cv2
+                );
+                *oi++ = std::make_pair(p, mult);
+            }
+        }
+        return oi;
+    }
+
+    #undef CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC
+    //!@}
+
+
+    //!\name Approximation
+    //!@{
+
+private:
+
+  std::pair<double,double> y_interval_for_curve_end(
+      const Arc_2& arc,
+      CGAL::Arr_curve_end end,
+      long prec)
+    const {
+
+    double PINF = std::numeric_limits<double>::infinity();
+    double MINF = -PINF;
+
+    std::pair< Bound, Bound > y_approx;
+
+    switch (this->location(end)) {
+
+    case (CGAL::ARR_TOP_BOUNDARY): {
+      return std::make_pair(PINF, PINF); // early exit
+    }
+    case (CGAL::ARR_BOTTOM_BOUNDARY): {
+      return std::make_pair(MINF, MINF); // early exit
+    }
+    case(CGAL::ARR_LEFT_BOUNDARY):
+    case(CGAL::ARR_RIGHT_BOUNDARY): {
+
+      CGAL::Object obj = this->curve().asymptotic_value_of_arc(
+          this->location(end), this->arcno()
+      );
+
+      CGAL::Arr_parameter_space ps;
+      Coordinate_1 asym_info;
+
+      if (CGAL::assign(ps, obj)) {
+        if (ps == CGAL::ARR_BOTTOM_BOUNDARY) {
+          return std::make_pair(MINF, MINF); // early exit
+        } else {
+          CGAL_assertion(ps == CGAL::ARR_TOP_BOUNDARY);
+          return std::make_pair(PINF, PINF); // early exit
+        }
+
+      } else {
+
+        CGAL_assertion_code(bool check =)
+          CGAL::assign(asym_info, obj);
+        CGAL_assertion(check);
+
+        y_approx = Curved_kernel_via_analysis_2::instance().
+          kernel().approximate_absolute_1_object()(asym_info, prec);
+      }
+      break;
+    }
+    case (CGAL::ARR_INTERIOR): {
+
+      y_approx =
+        Curved_kernel_via_analysis_2::instance().
+        kernel().approximate_absolute_y_2_object()(
+            arc.curve_end(end).xy(), prec
+        );
+
+    }
+    } // switch
+
+    return std::make_pair(CGAL::to_double(y_approx.first),
+                          CGAL::to_double(y_approx.second));
+  }
+
+public:
+
+    /*!\brief
+     * bbounding box for arc
+     */
+    CGAL::Bbox_2 bbox() const {
+      if (!this->ptr()->_m_bbox) {
+
+        double PINF = std::numeric_limits<double>::infinity();
+        double MINF = -PINF;
+
+        double xmin;
+        double xmax;
+
+        double ymin = PINF; // correct as we modify shrink below
+        double ymax = MINF; // correct as we modify shrink below
+
+        // TODO choose precision
+        long prec = 53;
+
+        std::pair< double, double > y_dapprox;
+
+        // left end
+
+        // xmin for left
+        if (this->location(CGAL::ARR_MIN_END) == CGAL::ARR_INTERIOR ||
+            this->location(CGAL::ARR_MIN_END) == CGAL::ARR_BOTTOM_BOUNDARY ||
+            this->location(CGAL::ARR_MIN_END) == CGAL::ARR_TOP_BOUNDARY) {
+
+          std::pair< Bound, Bound > x_approx =
+            Curved_kernel_via_analysis_2::instance().
+            kernel().approximate_absolute_1_object()(
+                this->curve_end_x(CGAL::ARR_MIN_END), prec
+            );
+
+          xmin = CGAL::to_double(x_approx.first);
+
+        } else {
+
+          // left end can only lie on LEFT BOUNDARY
+          xmin = MINF;
+
+        }
+
+        // ymin/ymax for left
+        y_dapprox = y_interval_for_curve_end(*this, CGAL::ARR_MIN_END, prec);
+
+        // adapt y-interval
+        ymin = CGAL::min(ymin, y_dapprox.first);
+        ymax = CGAL::max(ymax, y_dapprox.second);
+
+        // right end
+
+        // xmax for right
+        if (this->location(CGAL::ARR_MAX_END) == CGAL::ARR_INTERIOR ||
+            this->location(CGAL::ARR_MAX_END) == CGAL::ARR_BOTTOM_BOUNDARY ||
+            this->location(CGAL::ARR_MAX_END) == CGAL::ARR_TOP_BOUNDARY) {
+
+          std::pair< Bound, Bound > x_approx =
+            Curved_kernel_via_analysis_2::instance().
+            kernel().approximate_absolute_1_object()(
+                this->curve_end_x(CGAL::ARR_MAX_END), prec
+            );
+
+          xmax = CGAL::to_double(x_approx.second);
+
+        } else {
+
+          // right end can only lie on RIGHT BOUNDARY
+          xmax = PINF;
+
+        }
+
+        // ymin/ymax for right
+        y_dapprox = y_interval_for_curve_end(*this, CGAL::ARR_MAX_END, prec);
+
+        // adapt y-interval
+        ymin = CGAL::min(ymin, y_dapprox.first);
+        ymax = CGAL::max(ymax, y_dapprox.second);
+
+        // search local extrema on a non-vertical arc
+
+        if (!this->is_vertical()) {
+
+          // TODO remove algebraic notation (Mult, Solve_2)
+
+          typedef typename Curve_kernel_2::Multiplicity_type Multiplicity_type;
+
+          std::vector< std::pair< Coordinate_2, Multiplicity_type > > pts;
+
+          // TODO can this->curve()->polynomial be not squarefree?
+          Curved_kernel_via_analysis_2::instance().
+            kernel().solve_2_object()(
+                this->curve(),
+                Curved_kernel_via_analysis_2::instance().
+                kernel().construct_curve_2_object()(
+                    CGAL::differentiate(this->curve().polynomial_2(),0)
+                    // ^^ f_x
+                ),
+                std::back_inserter(pts)
+            );
+
+          int n = static_cast<int>(pts.size());
+          CKvA_CERR("check candidates for y-extremal points: #" << n );
+          for (int i = 0; i < n; i++) {
+
+            const Coordinate_2& curr_xy = pts[i].first;
+
+
+#if 0
+            // EBEB: Disabled this test as curr_xy's curve
+            //       is not guaranteed to be wrt this->curve()
+
+            CKvA_CERR("check if arcnos match: " <<
+                 curr_xy << "; arc = " << *this << "\n\n");
+            // this is the simpler test, thus we evaluate it first
+            if (this->arcno() == curr_xy.arcno()) {
+              CKvA_CERR("check if x-coordinate lies in interior: " <<
+                   curr_xy << "; arc = " << *this << "\n\n");
+              // this is the more sophisticated test, thus second
+              if (this->is_in_x_range_interior(curr_xy.x())) {
+                CKvA_CERR("update y coordinates");
+
+                std::pair< Bound, Bound > xy_approx =
+                  Curved_kernel_via_analysis_2::instance().
+                  kernel().approximate_absolute_y_2_object()
+                  (curr_xy, prec);
+
+                // adapt y-interval
+                ymin = CGAL::min(ymin,
+                                 CGAL::to_double(xy_approx.first));
+                ymax = CGAL::max(ymax,
+                                 CGAL::to_double(xy_approx.second));
+              }
+            }
+#else
+            // this is the more sophisticated test, thus second
+            if (this->is_in_x_range_interior(curr_xy.x())) {
+              // TODO replace with is_on
+              Point_2 curr_pt =
+                Curved_kernel_via_analysis_2::instance().
+                construct_point_2_object()(curr_xy.x(),
+                                           curr_xy.curve(),
+                                           curr_xy.arcno());
+              if (this->compare_y_at_x(curr_pt) == CGAL::EQUAL) {
+
+                CKvA_CERR("update y coordinates");
+
+                std::pair< Bound, Bound > xy_approx =
+                  Curved_kernel_via_analysis_2::instance().
+                  kernel().approximate_absolute_y_2_object()
+                  (curr_xy, prec);
+
+                // adapt y-interval
+                ymin = CGAL::min(ymin,
+                                 CGAL::to_double(xy_approx.first));
+                ymax = CGAL::max(ymax,
+                                 CGAL::to_double(xy_approx.second));
+              }
+            }
+#endif
+          }
+        }
+        this->ptr()->_m_bbox = CGAL::Bbox_2(xmin, ymin, xmax, ymax);
+      }
+
+      return *(this->ptr()->_m_bbox);
+    }
+
+    //!}
+
+
+public:
+    //!\name IO
+    //!@{
+
+    /*!\brief
+     * output operator
+     *
+     * write arc to \c os
+     */
+    void write(std::ostream& os) const {
+
+        switch (::CGAL::get_mode(os)) {
+        case ::CGAL::IO::PRETTY:
+            os << "arc@" << this->id() << "[(sup@" << this->curve().id();
+            if (this->is_vertical()) {
+              os << ", VERTICAL at x = "
+                 << CGAL::to_double(curve_end_x(ARR_MAX_END)) ;
+            } else {
+                os << ", ARCNO=" << this->arcno(CGAL::ARR_MIN_END)
+                   << "," << this->arcno()
+                   << "," << this->arcno(CGAL::ARR_MAX_END);
+            }
+            os << "; l2r: " << this->is_left_to_right() << "); \n";
+            os <<"min: " << this->_minpoint() << ";\n";
+            os << "max: " << this->_maxpoint() << "]";
+
+            break;
+
+        case ::CGAL::IO::BINARY:
+          std::cerr << "BINARY format not yet implemented" << std::endl;
+        break;
+        default:
+          // ASCII
+          os << "Arc_2(";
+          os << this->ptr()->_m_min;
+          os << ",";
+          os << this->ptr()->_m_max;
+          os << ",";
+          os << this->ptr()->_m_support;
+          os << ",";
+          os << this->ptr()->_m_arcno;
+          os << ",";
+          os << this->ptr()->_m_arcno_min;
+          os << ",";
+          os << this->ptr()->_m_arcno_max;
+          os << ",";
+          os << this->ptr()->_m_is_vertical;
+          os << ",";
+          os << this->ptr()->_m_left_to_right;
+          os << ")";
+        }
+    }
+
+
+    /*!\brief
+     * input operator
+     *
+     * read arc from \c is
+     */
+    void read(std::istream& is) {
+
+      CGAL_precondition(CGAL::is_ascii(is));
+
+      Rep rep;
+
+      // read "Arc_2("
+      swallow(is, 'A');
+      swallow(is, 'r');
+      swallow(is, 'c');
+      swallow(is, '_');
+      swallow(is, '2');
+      swallow(is, '(');
+
+      Point_2 min, max;
+
+      // read values
+      is >> rep._m_min;
+      swallow(is, ',');
+      is >> rep._m_max;
+      swallow(is, ',');
+      is >> rep._m_support;
+      swallow(is, ',');
+      is >> rep._m_arcno;
+      swallow(is, ',');
+      is >> rep._m_arcno_min;
+      swallow(is, ',');
+      is >> rep._m_arcno_max;
+      swallow(is, ',');
+      is >> rep._m_is_vertical;
+      swallow(is, ',');
+      is >> rep._m_left_to_right;
+
+      // read the ')'
+      swallow(is, ')');
+
+      *this = Arc_2< Curved_kernel_via_analysis_2, Rep >(rep);
+    }
+
+    //!@}
+
+    //! equality
+    inline
+    bool operator == (const Kernel_arc_2& arc2) const {
+        return  is_equal(arc2);
+    }
+
+#if defined(_MSC_VER)
+    // befriending the kernel point
+    friend typename Curved_kernel_via_analysis_2::Point_2;
+
+    // befriending the kernel arc
+    friend typename Curved_kernel_via_analysis_2::Arc_2;
+
+    // befriending the functors
+#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
+    friend typename Curved_kernel_via_analysis_2::Z; \
+    friend typename Curved_kernel_via_analysis_2_Functors:: \
+        Z<Curved_kernel_via_analysis_2>
+#else // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
+    // befriending the kernel point
+    //friend class Curved_kernel_via_analysis_2::Point_2;
+
+    // befriending the kernel arc
+    //friend class Curved_kernel_via_analysis_2::Arc_2;
+
+    // befriending the functors
+#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
+    friend class Curved_kernel_via_analysis_2_Functors:: \
+        Z<Curved_kernel_via_analysis_2>
+#endif // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
+
+
+//Curved_kernel_via_analysis_2_functors<
+  //              Curved_kernel_via_analysis_2> >;
+
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_arc_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_vertical_2);
+
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_min_vertex_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_max_vertex_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_left_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_at_x_right_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_in_x_range_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Equal_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Do_overlap_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Intersect_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Trim_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Split_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Are_mergeable_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Merge_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Is_on_2);
+
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Parameter_space_in_x_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_near_boundary_2);
+
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Parameter_space_in_y_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_at_limit_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_near_limit_2);
+
+#undef CGAL_BEFRIEND_CKvA_2_FUNCTOR
+
+private:
+
+    // type of CurveSweepTraits model
+    typedef CGAL::Sweep_curves_adapter_2< Curved_kernel_via_analysis_2 > SCA_2;
+    // befriend segment for Self::_intersection_points
+    friend class internal::Generic_arc_2<SCA_2>;
+
+    /*
+    // befriend all functors
+#define CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Z) \
+    friend class CGAL::Sweep_curves_functors::Z< SCA_2 >; \
+
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_xy_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Less_xy_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_y_at_x_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Equal_y_at_x_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Multiplicity_of_intersection_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Compare_y_right_of_point_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Source_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Target_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Construct_segment_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Is_degenerate_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Do_overlap_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(New_endpoints_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(New_endpoints_opposite_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Intersect_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Intersect_right_of_point_2)
+    CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Make_x_monotone_2)
+
+    #undef CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR */
+
+}; // class Arc_2
+
+/*!\relates Arc_2
+ * \brief
+ * output operator
+ *
+ * writes \c arc to \c os
+ */
+template < class CurvedKernelViaAnalysis_2, class Rep_>
+inline
+std::ostream& operator<<(
+    std::ostream& os,
+    const Arc_2<CurvedKernelViaAnalysis_2, Rep_>& arc) {
+
+  arc.write(os);
+  return os;
+}
+
+
+//! \brief Reads the objects from stream.
+template < class CurvedKernelViaAnalysis_2, class Rep_ >
+std::istream& operator>> (
+    std::istream& is,
+    Arc_2< CurvedKernelViaAnalysis_2, Rep_ >& arc) {
+
+  CGAL_precondition(CGAL::is_ascii(is));
+
+  //typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+  //typedef Rep_ Rep;
+
+  arc.read(is);
+
+  return is;
+}
+
+
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
+// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
new file mode 100644
index 0000000..c1ef8eb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
@@ -0,0 +1,339 @@
+// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
+//                 Arno Eigenwillig <arno at mpi-inf.mpg.de>
+//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+//
+// ============================================================================
+
+#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
+#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
+
+/*!\file include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
+ * \brief Defines \c Make_x_monotone_2 functor
+ */
+
+#include <CGAL/config.h>
+#include <CGAL/Handle_with_policy.h>
+
+// TODO remove polynomial_traits
+#include <CGAL/Polynomial_traits_d.h>
+
+namespace CGAL {
+
+namespace internal {
+
+/*!\brief
+ * Splits a curve that can be analyzed
+ * into connected x-monotone sweepable arcs and isolated points.
+ *
+ * Arcs are stored as CurvedKernelViaAnalysis_2::Arc_2 objects, and
+ * each is either vertical or consists of an x-monotone piece
+ * of constant arc number wrt to the curve at every interior x-coordinate.
+ * Isolated points are stored as \c CurvedKernelViaAnalysis_2::Point_2 objects.
+ *
+ * The resulting arcs and points are written to the output iterator as
+ * polymorphic \c CGAL::Object. Past-the-end value of the iterator is returned.
+ */
+template < class CurvedKernelViaAnalysis_2,
+           class ConstructArc_2 =
+           typename CurvedKernelViaAnalysis_2::Construct_arc_2 >
+struct Make_x_monotone_2 :
+    public std::binary_function< typename CurvedKernelViaAnalysis_2::Curve_2,
+            std::iterator<std::output_iterator_tag, CGAL::Object>,
+            std::iterator<std::output_iterator_tag, CGAL::Object> > {
+
+    //!\name Public types
+    //!@{
+
+    //! this instance's first template parameter
+    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+
+    //! this instance's second template parameter
+    typedef ConstructArc_2 Construct_arc_2;
+
+    //! type of curve kernel
+    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
+    Curve_kernel_2;
+
+    //! type of x-coordinate
+    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
+
+    //! type of xy-coordinate
+    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
+
+    //! type of curve analysis
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+
+    //! type of vertical line
+    typedef typename Curve_analysis_2::Status_line_1 Status_line_1;
+
+    //! type of point on curve
+    typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2;
+
+    //! type of curve arc
+    typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2;
+
+    //! type of not necessarily x-monotone curve arc
+    typedef typename Curved_kernel_via_analysis_2::Non_x_monotone_arc_2
+        Non_x_monotone_arc_2;
+
+    //!@}
+
+    //!\name Constructors
+    //!@{
+
+    /*!\brief
+     * Standard constructor
+     *
+     * \param kernel The kernel instance to use
+     */
+    Make_x_monotone_2(Curved_kernel_via_analysis_2 *kernel) :
+        _m_curved_kernel(kernel) {
+        CGAL_assertion(kernel != NULL);
+    }
+
+    //!@}
+
+    //!\name Functor invokation
+    //!@{
+
+    // TODO add operator for non-x-monotone arc
+
+    /*!\brief
+     * Splits a curve into x-monotone arcs and isolated points
+     *
+     * \param curve The input curve
+     * \param oi Output iterator that stores CGAL::Object, which either
+     *           encapsulates Point_2 or Arc_2
+     * \return Past-the-end iterator of \c oi
+     */
+    template <class OutputIterator>
+    OutputIterator operator()(Curve_analysis_2 curve, OutputIterator oi) {
+
+        Construct_arc_2 construct_arc_2 =
+            _m_curved_kernel->construct_arc_2_object();
+        // use CGAL::Total_degree ?
+        if (typename CGAL::Polynomial_traits_d<
+            typename Curve_analysis_2::Polynomial_2 >::
+            Total_degree()(curve.polynomial_2()) < 1) {
+            return oi;
+        }
+
+        Status_line_1 evt_line1, evt_line2,
+            int_line = curve.status_line_of_interval(0);
+        int total_events = curve.number_of_status_lines_with_event();
+        // handle special case of a curve without any events
+        if(total_events == 0) {
+            for(int k = 0; k < int_line.number_of_events(); k++)
+                *oi++ = CGAL::make_object(construct_arc_2(curve, k));
+            return oi;
+        }
+        _m_curve = curve;
+        typedef typename Curved_kernel_via_analysis_2::
+            Curve_interval_arcno_cache CIA_cache;
+        const CIA_cache& map_interval_arcno =
+            _m_curved_kernel->interval_arcno_cache();
+
+        typename Curved_kernel_via_analysis_2::Construct_point_2
+            construct_point =
+            _m_curved_kernel->construct_point_2_object();
+
+        typename CIA_cache::result_type info1, info2;
+        std::vector<Point_2> min_pts, max_pts;
+        Coordinate_1 min_x, max_x;
+        int i, k, n;
+        Arc_2 arc;
+        // first handle segments before first event
+        evt_line1 = curve.status_line_at_event(0);
+        max_x = evt_line1.x();
+
+        for(k = 0; k < evt_line1.number_of_events(); k++)
+            max_pts.push_back(construct_point(max_x, curve, k));
+
+        //std::cout << "handling events over the 1st interval\n";
+        for(k = 0; k < int_line.number_of_events(); k++) {
+
+            info1 = map_interval_arcno(evt_line1, 1, k);
+            if (info1.second != CGAL::ARR_INTERIOR) {
+                arc = construct_arc_2(CGAL::ARR_MIN_END, max_x,
+                                      (info1.second ==
+                                       CGAL::ARR_BOTTOM_BOUNDARY ?
+                                       CGAL::ARR_MIN_END : CGAL::ARR_MAX_END),
+                                      curve, k);
+            } else {
+                arc = construct_arc_2(max_pts[info1.first], CGAL::ARR_MIN_END,
+                                      curve, k, info1.first
+                );
+            }
+            *oi++ = CGAL::make_object(arc);
+        }
+        min_pts = max_pts;
+        max_pts.clear();
+        min_x = max_x;
+
+        // next handle arcs between events, including isolated points
+        for (i = 0; i < total_events-1; i++) {
+            evt_line1 = curve.status_line_at_event(i);
+            evt_line2 = curve.status_line_at_event(i+1);
+            max_x = evt_line2.x();
+            oi = _handle_vertical_and_isolated(evt_line1, min_x, min_pts, oi);
+
+            n = evt_line2.number_of_events();
+            for(k = 0; k < n; k++)
+                max_pts.push_back(construct_point(max_x, curve, k));
+
+            n = curve.status_line_of_interval(i+1).number_of_events();
+            CGAL::Arr_curve_end inf1_end, inf2_end;
+            for (k = 0; k < n; k++) {
+
+                info1 = map_interval_arcno(evt_line1, 0, k);
+                info2 = map_interval_arcno(evt_line2, 1, k);
+                inf2_end = (info2.second == CGAL::ARR_BOTTOM_BOUNDARY ?
+                    CGAL::ARR_MIN_END : CGAL::ARR_MAX_END);
+
+                if (info1.second != CGAL::ARR_INTERIOR) {
+                    inf1_end = (info1.second == CGAL::ARR_BOTTOM_BOUNDARY ?
+                        CGAL::ARR_MIN_END : CGAL::ARR_MAX_END);
+                    if (info2.second != CGAL::ARR_INTERIOR) {
+                        arc = construct_arc_2(min_x, inf1_end, max_x, inf2_end,
+                                              curve, k);
+                    } else {
+                        arc = construct_arc_2(max_pts[info2.first], min_x,
+                                              inf1_end, curve, k, info2.first);
+                    }
+                } else if (info2.second != CGAL::ARR_INTERIOR) {
+                    arc = construct_arc_2(min_pts[info1.first],  max_x,
+                                          inf2_end, curve, k, info1.first);
+                } else {
+                    arc = construct_arc_2(min_pts[info1.first],
+                                          max_pts[info2.first],
+                                          curve, k, info1.first, info2.first);
+                }
+                *oi++ = CGAL::make_object(arc);
+            }
+            min_pts = max_pts;
+            max_pts.clear();
+            min_x = max_x;
+        }
+
+        // here: min_x/min_pts hold information about the last event line
+        // event_line2 - points to the last event line
+        // vertical line or isolated points at last event?
+        evt_line2 = curve.status_line_at_event(total_events-1);
+        min_x = evt_line2.x();
+        oi = _handle_vertical_and_isolated(evt_line2, min_x, min_pts, oi);
+
+        n = curve.status_line_of_interval(total_events).number_of_events();
+        for (k = 0; k < n; k++) {
+
+            info1 = map_interval_arcno(evt_line2, 0, k);
+            if (info1.second != CGAL::ARR_INTERIOR) {
+                arc = construct_arc_2(
+                        CGAL::ARR_MAX_END, min_x,
+                        (info1.second == CGAL::ARR_BOTTOM_BOUNDARY ?
+                         CGAL::ARR_MIN_END : CGAL::ARR_MAX_END), curve, k
+                );
+            } else {
+                arc = construct_arc_2(min_pts[info1.first],
+                                      CGAL::ARR_MAX_END, curve, k,
+                                      info1.first);
+            }
+            *oi++ = CGAL::make_object(arc);
+        }
+        return oi;
+    }
+    //!@}
+
+private:
+    //!\name Private members
+    //!@{
+
+    /*!\brief
+     * Constructs vertical arcs and isolated points at event line
+     *
+     * \param cv_line The event line in focus
+     * \param x x-coordinate of event
+     * \param pts Points at event line
+     * \param oi Output iterator that stores CGAL::Object, which either
+     *           encapsulates Point_2 or Arc_2
+     * \return Past-the-end iterator of \c oi
+     */
+    template <class OutputIterator>
+    OutputIterator _handle_vertical_and_isolated(
+            Status_line_1 cv_line,
+            Coordinate_1 x, std::vector<Point_2> pts,
+            OutputIterator oi) const {
+
+        Construct_arc_2 construct_arc_2 =
+            _m_curved_kernel->construct_arc_2_object();
+
+        int n = cv_line.number_of_events(), j;
+        if(cv_line.covers_line()) { // look for vertical arcs
+            if(n > 0) {
+                // the first vertical ray
+                *oi++ = CGAL::make_object(
+                        construct_arc_2(pts[0], CGAL::ARR_MIN_END, _m_curve)
+                );
+                for(j = 0; j < n-1; j++)  // interior bounded arcs
+                    *oi++ = CGAL::make_object(construct_arc_2(pts[j], pts[j+1],
+                                                              _m_curve));
+                // the last vertical ray
+                *oi++ = CGAL::make_object(construct_arc_2(pts[n-1], 
+                    CGAL::ARR_MAX_END, _m_curve));
+            } else // unbounded vertical line
+                *oi++ = CGAL::make_object(construct_arc_2(x, _m_curve));
+            return oi;
+        }
+        // look for isolated points
+        std::pair<int, int> ipair;
+        for(j = 0; j < n; j++) {
+            ipair = cv_line.number_of_incident_branches(j);
+            if(ipair.first == 0&&ipair.second == 0) {
+                //std::cout << "isolated point found\n";
+                typename Curved_kernel_via_analysis_2::Construct_point_2
+                    construct_point =
+                    _m_curved_kernel->construct_point_2_object();
+
+                *oi++ = CGAL::make_object(construct_point(x, _m_curve, j));
+            }
+        }
+        return oi;
+    }
+
+    //!@}
+
+    //!\name Private data
+    //!@{
+
+    //! pointer to \c Curved_kernel_via_analysis_2
+    Curved_kernel_via_analysis_2 *_m_curved_kernel;
+
+    //! to avoid passing curve as a parameter
+    Curve_analysis_2 _m_curve;
+
+    //!@}
+};  // struct Make_x_monotone
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
+//EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
new file mode 100644
index 0000000..3a96a56
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
@@ -0,0 +1,840 @@
+// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), 
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Eric Berberich <eric at mpi-inf.mpg.de>
+//                 Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+
+#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
+#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
+
+/*!\file include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
+ * \brief Defines class \c Point_2 that represents a point on a curve that can
+ * be analyzed.
+ */
+
+#include <CGAL/config.h>
+
+#include <boost/optional.hpp>
+#include <boost/optional/optional_io.hpp>
+
+#include <CGAL/Handle_with_policy.h>
+
+#include <CGAL/Arr_enums.h>
+
+#include <CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h>
+
+namespace CGAL {
+
+namespace internal {
+
+// forward class declaration
+template < class CurvedKernelViaAnalysis_2, class Rep_ > 
+class Point_2;
+
+// forward class declaration
+template < class CurvedKernelViaAnalysis_2 >
+class Arc_2_rep;
+
+// forward class declaration for befriending
+template < class CurvedKernelViaAnalysis_2,
+      class Rep_ = Arc_2_rep<CurvedKernelViaAnalysis_2> >
+class Arc_2;
+
+/*\!brief
+ * representation class for Point_2
+ */
+template < class CurvedKernelViaAnalysis_2 >
+class Point_2_rep 
+{
+public:
+    //! this instance's template parameter
+    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+    
+    //! the class itself
+    typedef Point_2_rep< Curved_kernel_via_analysis_2 > Self;
+
+    //! type of curve kernel
+    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2 
+    Curve_kernel_2;
+
+    //! type of x-coordinate
+    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
+    
+    //! type of a finite point on curve
+    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
+
+    //! type of curve analysis
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+        
+    //! default constructor
+    Point_2_rep() {
+    }
+    
+    //! constructs a "finite" point on curve,
+    //! implies CGAL::NO_BOUNDARY in x/y
+    Point_2_rep(const Coordinate_2& xy) : 
+        _m_xy(xy), _m_location(CGAL::ARR_INTERIOR) {
+    }
+
+    //! constructs a point at +/-oo in x
+    Point_2_rep(CGAL::Arr_curve_end inf_end, const Curve_analysis_2& c,
+                int arcno) :
+        _m_curve(c), 
+        _m_arcno(arcno) {
+        _m_location = (inf_end == CGAL::ARR_MIN_END ?
+                       CGAL::ARR_LEFT_BOUNDARY : CGAL::ARR_RIGHT_BOUNDARY);
+    }
+    
+    //! constructs a point on curve with y-coordinate at infinity
+    Point_2_rep(const Coordinate_1& x, const Curve_analysis_2& c, 
+                CGAL::Arr_curve_end inf_end) :
+        _m_x(x),
+        _m_curve(c) {
+        _m_location = (inf_end == CGAL::ARR_MIN_END ?
+                       CGAL::ARR_BOTTOM_BOUNDARY : CGAL::ARR_TOP_BOUNDARY);
+        
+    }
+
+    //! curve point finite coordinates. They are valid only if boundary in y 
+    //! is not set (CGAL::NO_BOUNDARY), otherwise only x-coordinate is
+    //! accessible, i.e., point is in interior
+    boost::optional< Coordinate_2 > _m_xy;
+        
+    //! x-coordinate of a curve point
+    boost::optional< Coordinate_1 > _m_x;
+
+    //! curve of point at boundary
+    boost::optional< Curve_analysis_2 > _m_curve;
+
+    //! arc of point at boundary
+    boost::optional< int > _m_arcno;
+
+    //! location of a point in parameter space
+    mutable CGAL::Arr_parameter_space _m_location;
+
+    //! store a double approximation of point
+    mutable boost::optional< std::pair< double, double > > _m_doubles;
+};
+
+/*!\brief 
+ * Class defines a point on a curve that can be analyzed
+ * 
+ * Only points with finite coordinates can be constructed explicitly 
+ * (by the user). Points on the boundary use special private constructors to
+ * to represent ends of curve arcs on the boundary.
+ */
+template <class CurvedKernelViaAnalysis_2, 
+          class Rep_ = internal::Point_2_rep<CurvedKernelViaAnalysis_2> >
+class Point_2 : 
+        public CGAL::Handle_with_policy< Rep_ > {
+public:
+    //!\name Public types
+    //!@{
+    
+    //! this instance's first template parameter
+    typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+
+    //! this instance's second template parameter
+    typedef Rep_ Rep;
+
+    //! this instance itself
+    typedef Point_2< Curved_kernel_via_analysis_2, Rep > Self;
+    
+    //! type of underlying curve kernel
+    typedef typename Curved_kernel_via_analysis_2::Curve_kernel_2
+        Curve_kernel_2;
+    
+    //! type of an x-coordinate
+    typedef typename Curve_kernel_2::Coordinate_1 Coordinate_1;
+    
+    //! type of an xy-coordinate
+    typedef typename Curve_kernel_2::Coordinate_2 Coordinate_2;
+    
+    //! type that analyzes a curve
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+    
+    //! the handle superclass
+    typedef ::CGAL::Handle_with_policy< Rep > Base;
+    
+    //! type of kernel point
+    typedef typename Curved_kernel_via_analysis_2::Point_2 Kernel_point_2;
+    
+    //!@}
+    
+public:
+    //!\name Rebind
+    //!@{
+    
+    /*!\brief
+     * An auxiliary structure for rebinding the point with a new rep
+     */
+    template < typename NewCKvA_2, typename NewRep >
+    class rebind
+    {
+    public:
+        //! this instance's first template parameter
+        typedef NewCKvA_2 New_curved_kernel_via_analysis_2;
+
+        //! this instance's second template parameter
+        typedef NewRep New_rep;
+
+        //! the rebound type
+        typedef Point_2< New_curved_kernel_via_analysis_2, NewRep > Other;
+        
+        //! the rebound point
+        typedef typename New_curved_kernel_via_analysis_2::Point_2 
+        Rebound_point_2;
+        
+        /*!\brief
+         * constructs a point of type \c Rebound_point_2 from the point \c pt 
+         * of type \c Self.
+         *
+         * All known items of the base class rep will be copied.
+         */
+        Rebound_point_2 operator()(const Self& pt) {
+            New_rep newrep;
+            newrep._m_xy = pt.ptr()->_m_xy;
+            newrep._m_x = pt.ptr()->_m_x;
+            newrep._m_curve = pt.ptr()->_m_curve;
+            newrep._m_arcno = pt.ptr()->_m_arcno;
+            newrep._m_location = pt.ptr()->_m_location;
+            return Rebound_point_2(newrep);
+        }
+
+        // TODO move to SfP_2l
+        /*!\brief
+         * reverse rebind, i.e., extracts original point type from a 
+         * rebound instance
+         */
+        Self operator()(const Rebound_point_2& pt) {
+            Rep rep;
+            rep._m_xy = pt.ptr()->_m_xy;
+            rep._m_x = pt.ptr()->_m_x;
+            rep._m_curve = pt.ptr()->_m_curve;
+            rep._m_arcno = pt.ptr()->_m_arcno;
+            if (pt.is_finite()) {
+                rep._m_location = CGAL::ARR_INTERIOR;
+            } else {
+                rep._m_location = pt.ptr()->_m_location;
+            }
+            return Self(rep);
+        }
+    };
+    
+public:
+    //!\name Standard constructors
+    //!@{
+
+    /*!\brief
+     * Default constructor
+     */
+    Point_2() : 
+        Base(Rep()) {   
+    }
+
+    /*!\brief
+     * copy constructor
+     */
+    Point_2(const Self& p) : 
+            Base(static_cast<const Base&>(p)) {  
+    }
+
+    //!@}
+
+public:
+    //!\name Usual constructors
+    //!@{
+    
+    /*!\brief 
+     * Constructs an interior point
+     *
+     * \param x The x-coordinate 
+     * \param c The supporting curve
+     * \param arcno Arcno of point on \c c
+     * \return The constructed point
+     */
+    Point_2(const Coordinate_1& x, const Curve_analysis_2& c, int arcno) :
+        Base(Rep(Coordinate_2(x, c, arcno))) {
+    }
+
+    template<typename T>
+    Point_2(const T& x, const T& y) :
+      // TODO use default kernel
+         Base(Rep(Curved_kernel_via_analysis_2::instance().kernel().
+		  construct_algebraic_real_2_object()(x,y)))
+    {
+    }
+
+
+
+    // FUTURE TODO allow to construct without curve, 
+    // i.e, isolated points on toric identifications -> do it also for arcs
+    // FUTURE TODO parameter space in x/y (full set of tasks)
+    
+    //!@}
+
+public: // was protected:
+    //!\name Special constructors for points on the boundary
+    //!@{
+    
+    /*!\brief 
+     * Constructs a point with x-coordinate at the left/right boundary
+     *
+     * \param inf_end Determines whether point is on left or right boundary
+     * \param c The supporting curve
+     * \param arcno Arcno of point on \c on left/right boundary
+     * \return The constructed point
+     */
+    Point_2(CGAL::Arr_curve_end inf_end, 
+            const Curve_analysis_2& c, int arcno) :
+        Base(Rep(inf_end, c, arcno)) {
+    }
+    
+    /*!\brief 
+     * Constructs a point on bottom or top boundary
+     * 
+     * \param x The x-coordinate of point
+     * \param c The supporting curve
+     * \param inf_end Defines whether point is on bottom or top boundary
+     * \return The constructed point
+     */
+    Point_2(const Coordinate_1& x, const Curve_analysis_2& c, 
+            CGAL::Arr_curve_end inf_end) :
+        Base(Rep(x, c, inf_end)) {
+    }
+    
+    //!@}
+
+protected:
+    //!\name Constructors for rebind
+    //!@{
+    
+    /*!\brief
+     * constructs from a given represenation
+     */
+    /*!\brief
+     * Constructor for for rebind
+     *
+     * \param rep The representation
+     * \return The constructed point
+     */
+    Point_2(Rep rep) : 
+        Base(rep) {  
+    }
+    
+    //!@}
+       
+public:
+    //!\name Destructors
+    //!@{
+
+    /*!\brief
+     * Virtual destructor
+     */
+    virtual ~Point_2() {
+    }
+    
+    //!@}
+
+public:
+    //!\name Access members
+    //!@{
+
+    /*!\brief 
+     * Access to the point's x-coordinate (y-coordinate can be undefined)
+     * 
+     * \return The stored x-coordinate
+     * \pre the point's x must be finite
+     */
+    inline 
+    const Coordinate_1& x() const {
+        CGAL_precondition_msg(
+                this->ptr()->_m_xy || this->ptr()->_m_x,
+                "Denied access to x-coordinate of the curve end \
+            lying at x-infinity");
+        return (is_finite() ?
+                (*(this->ptr()->_m_xy)).x() : *(this->ptr()->_m_x));
+    }
+    
+    /*!\brief 
+     * Access to underlying \c Coordinate_2 object
+     *
+     * \return The stored xy-coordinate
+     * \pre The xy-coordinates must be finite
+     */
+    inline 
+    const Coordinate_2& xy() const {
+        CGAL_precondition_msg(bool(this->ptr()->_m_xy),
+            "Denied access to the curve end lying at x/y-infinity");
+        return *(this->ptr()->_m_xy);
+    }
+
+    inline const Coordinate_1& y() const {
+      return this->xy().y();
+    }
+
+    /*!\brief
+     * supporting curve of point
+     *
+     * \return supporting curve of point
+     */
+    inline 
+    Curve_analysis_2 curve() const {
+        CGAL_precondition_msg(
+                this->ptr()->_m_xy || this->ptr()->_m_curve,
+                "Denied access to the curve end lying at y-infinity");
+        return (is_finite() ? 
+                (*(this->ptr()->_m_xy)).curve() : *(this->ptr()->_m_curve));
+    }
+    
+    /*!\brief
+     * Arc number of point on a curve
+     *
+     * \return arcno of point
+     * \pre Is not endpoint of a vertical ray or branch 
+     */ 
+    inline int arcno() const {
+        CGAL_precondition_msg(this->ptr()->_m_xy ||
+                              this->ptr()->_m_arcno,
+            "Denied access to the curve end lying at y-infinity");
+        return (is_finite() ? 
+                (*(this->ptr()->_m_xy)).arcno() : *(this->ptr()->_m_arcno));
+    }
+    
+    //!@}
+
+public: 
+    //!\name Methods for location
+    //!@{
+    
+    /*!\brief
+     * sets location of a point in parameter space to \c loc
+     *
+     * It is supposed that the user thoroughly understands malicious
+     * consequences that may result from the misuse of the location
+     */
+    inline
+    void set_location(CGAL::Arr_parameter_space loc) const {
+        this->ptr()->_m_location = loc;
+    }
+    
+    /*!\brief
+     * location of a point in parameter space
+     *
+     * \return location in parameter space
+     */
+    inline CGAL::Arr_parameter_space location() const { 
+        return this->ptr()->_m_location; 
+    } 
+    
+    /*!\brief
+     * checks if the point lies on left/right boundary
+     *
+     * \return \c true if it lies on left/right boundary, \c false otherwise
+     */
+    inline bool is_on_left_right() const {
+        return (location() == CGAL::ARR_LEFT_BOUNDARY ||
+                location() == CGAL::ARR_RIGHT_BOUNDARY);
+    }
+    
+    /*!\brief
+     * checks if the point lies on bottom/top boundary
+     *
+     * \return \c true if it lies on bottom/top boundary, \c false otherwise
+     */
+    inline bool is_on_bottom_top() const {
+        return (location() == CGAL::ARR_BOTTOM_BOUNDARY ||
+                location() == CGAL::ARR_TOP_BOUNDARY);
+    }
+
+    /*!\brief
+     * checks whether the point is finite
+     *
+     * \return \c true, if point is finite, \c false otherwise
+     */
+    inline 
+    bool is_finite() const {
+        return bool(this->ptr()->_m_xy);
+    }
+    
+    //!@}      
+    
+    //!\name Predicates
+    //!@{
+
+#define CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(X, Y) \
+    typename Curved_kernel_via_analysis_2::X Y = \
+         Curved_kernel_via_analysis_2::instance().Y##_object(); \
+
+    /*!\brief
+     * Compares x-coordinates of this point with \c q
+     * 
+     * \param q The other point
+     * \return CGAL::LARGER if x(*this) > x(q);
+     *         CGAL::SMALLER if x(*this) \< x(q);
+     *         CGAL::EQUAL if x(*this) = x(q).
+     * \pre compared points are in the interior of parameter space
+     */
+    inline
+    CGAL::Comparison_result compare_x(const Kernel_point_2& q) const {
+        CGAL_precondition(this->ptr()->_m_xy);
+        CGAL_precondition(q.ptr()->_m_xy);
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_x_2, compare_x_2)
+        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
+        return compare_x_2(*dynamic_cast< const Kernel_point_2* >(this), q);
+    }
+
+    /*!\brief 
+     * Compares this point with \c q lexicographically
+     * 
+     * \param q The other point
+     * \return CGAL::LARGER if x(*this) > x(q), 
+     *                      or if x(*this) = x(q) and y(*this) > y(q);
+     *         CGAL::SMALLER if x(*this) \< x(q), 
+     *                       or if x(*this) = x(q) and y(*this) \< y(q);
+     *         CGAL::EQUAL if the two points are equal.
+     * \pre Compared points are in the interior of parameter space
+     */
+    inline
+    CGAL::Comparison_result compare_xy(const Kernel_point_2& q, 
+                                       bool equal_x = false) const {
+        CGAL_precondition(bool(this->ptr()->_m_xy));
+        CGAL_precondition(bool(q.ptr()->_m_xy));
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2)
+        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
+        return compare_xy_2(
+                *dynamic_cast< const Kernel_point_2* >(this), q, equal_x
+        );
+    }
+
+    /*!\brief 
+     * Checks if a point lies on on a curve
+     *
+     * \param curve The curve to check
+     * \return \c true, if *this lies on \c curve, \c false otherwise
+     */
+    inline 
+    bool is_on(
+         const typename Curved_kernel_via_analysis_2::Curve_2& curve
+    ) const {
+        CGAL_precondition(bool(this->ptr()->_m_xy));
+
+        CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2)
+        CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL);
+        return is_on_2(*dynamic_cast< const Kernel_point_2* >(this), curve);
+    }
+
+#undef CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT
+    
+    //!@}
+
+    //!\name Comparison operators for points in the interior of parameter space
+    //!@{
+
+    //! equality
+    inline
+    bool operator == (const Kernel_point_2& q) const { 
+        return this->compare_xy(q) == CGAL::EQUAL;
+    }
+    
+    //! inequality
+    inline
+    bool operator != (const Kernel_point_2& q) const {
+        return this->compare_xy(q) != CGAL::EQUAL;
+    }
+    
+    //! less than in (x,y) lexicographic order
+    inline
+    bool operator <  (const Kernel_point_2& q) const {
+        return this->compare_xy(q) == CGAL::SMALLER;
+    }
+    
+    //! less-equal in (x,y) lexicographic order
+    inline
+    bool operator <= (const Kernel_point_2& q) const {
+        return this->compare_xy(q) != CGAL::LARGER;
+    }
+
+    //! greater than in (x,y) lexicographic order
+    inline
+    bool operator >  (const Kernel_point_2& q) const {
+        return this->compare_xy(q) == CGAL::LARGER;
+    }
+
+    //! greater-equal in (x,y) lexicographic order
+    inline
+    bool operator >= (const Kernel_point_2& q) const {
+        return this->compare_xy(q) != CGAL::SMALLER;
+    }
+    
+    //!@}
+
+    //!\name Approximation
+    //!@{
+  
+    /*!\brief 
+     * pair of doubles approximating the coordinates
+     */
+    std::pair< double, double > to_double() const {
+      CGAL_precondition(this->location() == CGAL::ARR_INTERIOR);
+      if (!this->ptr()->_m_doubles) {
+        this->ptr()->_m_doubles = this->xy().to_double();
+      }
+      return *(this->ptr()->_m_doubles);
+    }
+  
+    //!}
+
+
+public:
+    //!\name IO
+    //!@{
+    
+    /*!\brief
+     * writes point to \c os
+     */
+    void write(std::ostream& os) const {
+        
+        switch(::CGAL::get_mode(os)) {
+        case ::CGAL::IO::PRETTY:
+            os << "point@" << this->id() << "(";
+            os << "sup@" << this->curve().id() << "; ";
+            os << "loc=" << this->location() << "; ";
+            os << std::flush;
+            // write x value 
+            switch (this->location()) { 
+            case CGAL::ARR_TOP_BOUNDARY: 
+            case CGAL::ARR_BOTTOM_BOUNDARY: 
+            case CGAL::ARR_INTERIOR: {
+              os << "x=" << this->x().to_double()<< "; "; 
+              break;
+            } 
+            case CGAL::ARR_LEFT_BOUNDARY: {
+              os << "x=-oo; ";
+              break;
+            }
+            case CGAL::ARR_RIGHT_BOUNDARY: {
+              os << "x=+oo; ";
+              break;
+            }
+            default:{
+              // bogus location 
+              CGAL_assertion(false);
+            }}  
+            os << std::flush;
+            
+            // write y value 
+            switch (this->location()) {
+            case CGAL::ARR_INTERIOR: {
+              os << "y=" << this->xy().to_double().second<< "; "; ; 
+              break;
+            }  
+            case CGAL::ARR_TOP_BOUNDARY: {
+              os << "y=+oo; ";
+              break;
+            }
+            case CGAL::ARR_BOTTOM_BOUNDARY: {
+              os << "y=-oo; ";
+              break;
+            }
+            case CGAL::ARR_LEFT_BOUNDARY: 
+            case CGAL::ARR_RIGHT_BOUNDARY: {
+              CGAL::Object obj = 
+                this->curve().asymptotic_value_of_arc(
+                    this->location(), this->arcno()
+                );
+              CGAL::Arr_parameter_space ps;
+              if (CGAL::assign(ps, obj)) {
+                if (ps == CGAL::ARR_BOTTOM_BOUNDARY) {
+                  os << "y=-oo(asym)"<< "; "; 
+                } else {
+                  os << "y=+oo(asym)"<< "; "; 
+                }
+              } else {
+                Coordinate_1 y;
+                CGAL_assertion_code(bool check =)
+                  CGAL::assign(y, obj);
+                CGAL_assertion(check);
+                os << "y=" << CGAL::to_double(y) << "(asym)" << "; "; 
+              }
+              break;
+              os << "y=??; ";
+              break;
+            }
+            default:{
+              // bogus location 
+              CGAL_assertion(false);
+            }}  
+            os << std::flush;
+            if (this->ptr()->_m_xy || this->ptr()->_m_arcno) {
+                os << "ARCNO=" << this->arcno();
+            } else {
+                os << "ARCNO=n/a";
+            }
+            os << ")";
+            os << std::flush;
+            break;
+        case ::CGAL::IO::BINARY:
+            std::cerr << "BINARY format not yet implemented" << std::endl;
+            break;
+        default:
+          // ASCII 
+          os << "Point_2(";
+
+          os << this->ptr()->_m_xy;
+          os << ",";
+          os << this->ptr()->_m_x;
+          os << ",";
+          os << this->ptr()->_m_curve;
+          os << ",";
+          os << this->ptr()->_m_arcno;
+          os << ",";
+          os << this->ptr()->_m_location;
+
+          os << ")";
+
+        }
+    }
+
+
+  /*!\brief
+   * reads point from \c is
+   */
+  void read(std::istream& is) {
+    
+    CGAL_precondition(CGAL::is_ascii(is));
+    
+    Rep rep;
+    
+    // read "Point_2("
+    swallow(is, 'P');
+    swallow(is, 'o');
+    swallow(is, 'i');
+    swallow(is, 'n');
+    swallow(is, 't');
+    swallow(is, '_');
+    swallow(is, '2');
+    swallow(is, '(');
+
+    // read values
+    is >> rep._m_xy;
+#if BOOST_VERSION < 104300
+    // EBEB: This fixes a bug in optional_io.hpp, reported to Fernando on
+    //       April 27, 2010, don't know whether the fix makes it into
+    //       boost 1_43.
+    if (!rep._m_xy) {
+      swallow(is, '-');
+    }
+#endif
+    swallow(is, ',');
+    is >> rep._m_x;
+#if BOOST_VERSION < 104300
+    if (!rep._m_x) {
+      swallow(is, '-');
+    }
+#endif
+    swallow(is, ',');
+    is >> rep._m_curve;
+#if BOOST_VERSION < 104300
+    if (!rep._m_curve) {
+      swallow(is, '-');
+    }
+#endif
+    swallow(is, ',');
+    is >> rep._m_arcno;
+#if BOOST_VERSION < 104300
+    if (!rep._m_arcno) {
+      swallow(is, '-');
+    }
+#endif
+    swallow(is, ',');
+    is >> rep._m_location;
+
+    // read the ')'
+    swallow(is, ')');
+    
+    *this = Point_2< Curved_kernel_via_analysis_2, Rep >(rep);
+  }
+  
+  //!@}
+  
+    // friends ////////////////////////////////////////////////////////////////
+
+    //! befriending arc classes
+    friend class Arc_2< Curved_kernel_via_analysis_2 >;
+
+    //friend class Non_x_monotone_arc_2< Curved_kernel_via_analysis_2 >;
+
+    // befriending the functors
+    
+#if defined(_MSC_VER)
+#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
+  friend typename Curved_kernel_via_analysis_2::Z;  \
+  friend typename Curved_kernel_via_analysis_2_Functors::Z< Curved_kernel_via_analysis_2 >
+#else // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
+#define CGAL_BEFRIEND_CKvA_2_FUNCTOR(Z) \
+  friend class Curved_kernel_via_analysis_2_Functors::Z< Curved_kernel_via_analysis_2 > 
+#endif // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER)
+    
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Construct_point_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_2);
+    CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_xy_2);
+
+#undef CGAL_BEFRIEND_CKvA_2_FUNCTOR
+
+}; // class Point_2
+
+
+/*!\relates Point_2
+ * \brief 
+ * writes \c pt to \c os 
+ */
+template < class CurvedKernelViaAnalysis_2, class Rep_ >
+std::ostream& operator <<(std::ostream& os,
+    const Point_2< CurvedKernelViaAnalysis_2, Rep_ >& pt) {
+    
+  pt.write(os);
+  return os;
+}
+
+
+//! \brief Reads the objects from stream.
+template < class CurvedKernelViaAnalysis_2, class Rep_ >
+std::istream& operator>> (
+    std::istream& is, 
+    Point_2< CurvedKernelViaAnalysis_2, Rep_ >& pt) {
+
+  CGAL_precondition(CGAL::is_ascii(is));
+  
+  //typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
+  //typedef Rep_ Rep;
+  
+  pt.read(is);
+  
+  return is;
+}
+
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
+// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
new file mode 100644
index 0000000..06c3bca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
@@ -0,0 +1,1082 @@
+// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+//
+// ============================================================================
+
+/*!\file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
+ * \brief
+ * contains various low-level routines used by \c Curve_renderer_2 and
+ * \c Subdivision_1 
+ *
+ * provide caching for polynomials and polynomial evaluations; 1D range
+ * analysis using First Quadratic Affine Form (QF) and Modified Affine 
+ * Arithmetic (MAA), both equipped with recursive derivative information
+ */
+
+#ifndef CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
+#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H 1
+
+#include <vector>
+#include <stack>
+// #include <boost/multi_index_container.hpp>
+// #include <boost/multi_index/member.hpp>
+// #include <boost/multi_index/hashed_index.hpp>
+// #include <boost/multi_index/sequenced_index.hpp>
+#include <boost/functional.hpp>
+
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Polynomial/Real_embeddable_traits.h>
+
+#include <CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h>
+
+// using boost::multi_index::multi_index_container;
+// using boost::multi_index::get;
+// using boost::multi_index::project;
+
+namespace CGAL {
+
+namespace internal {
+
+#define CGAL_N_CACHES    2    // maximal number of cache instances
+
+#define CGAL_X_RANGE     0       // polynomial in x-range
+
+#define CGAL_Y_RANGE     1       // polynomial in y-range
+
+// defines subdivision level beyond which univariate polynomials are not
+// cached (if 0 cache is off)
+#define CGAL_MAX_POLY_CACHE_LEVEL   8 
+
+// maximal number of entries in univariate polynomial cache containers
+#define CGAL_POLY_CACHE_SIZE 1024*1024
+
+// maximal degree of the derivative taken into account during recursive 
+// derivative range analysis
+#define CGAL_RECURSIVE_DER_MAX_DEGREE  7
+
+// 8-pixel neighbouthood directions
+static const struct { int x; int y; } directions[] = {
+    { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1},
+    {-1, 0}, {-1,-1}, { 0,-1}, { 1,-1}};
+// map from rectangle sides to pixel directions
+// 0 - left side, 1 - right side, 2 - bottom side, 3 - top side
+static const int DIR_MAP[][3] =
+    {{5, 4, 3}, {7, 0, 1}, {5, 6, 7}, {3, 2, 1}};
+// map from 8 pixel directions to "left" (0) or "right" (1) direction of motion
+// vertical directions (2 and 6) are mapped to -1
+static const int DIR_TAKEN_MAP[] =
+    {1, 1, -1, 0, 0, 0, -1, 1};
+
+template <class Integer>
+struct Pixel_2_
+{
+    int x, y;             // pixel coordinates relative to the drawing area
+    unsigned level;       // subdivision level: 0 - for pixels, 
+                          // 1 - for 1/2 pixels, and so on)
+#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
+    double xv, yv; // double approximation of curve-pixel intersection point
+#endif
+
+    Integer sub_x, sub_y; // subpixel coordinates relative to pixel's boundary
+                          // (always 0 for pixels)
+        
+    Pixel_2_& operator =(const Pixel_2_& pix) {
+#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
+        memcpy(this, &pix, sizeof(int)*3 + sizeof(double)*2);
+#else
+        memcpy(this, &pix, sizeof(int)*3);
+#endif
+        sub_x = pix.sub_x;
+        sub_y = pix.sub_y;
+        return *this;
+    }
+
+    bool operator ==(const Pixel_2_& pix) const {
+        if(memcmp(this, &pix, sizeof(int)*3))
+            return false;
+        return (sub_x == pix.sub_x && sub_y == pix.sub_y);
+    }
+};
+
+// structure describing the seed point and backward direction, support for
+// multiple seed points
+template <class Integer>
+struct Seed_point_
+{
+    Seed_point_()
+    { }
+
+    Seed_point_(const Pixel_2_<Integer>& start_, int dir_,
+            int taken_, bool coincide_) : start(start_),
+        back_dir(dir_), direction_taken(taken_), 
+        branches_coincide(coincide_)
+    { }
+
+    Pixel_2_<Integer> start; // starting pixel
+    int back_dir; // backward direction
+    int direction_taken;
+    bool branches_coincide;
+};
+
+template <class Rational, class AlgebraicReal>
+struct Clip_point_ // describes a bottom/top clip point
+{
+    Clip_point_() { }
+    Clip_point_(Rational left_, Rational right_, int arcno_=-1) :
+        left(left_), right(right_), arcno(arcno_) { } 
+    Rational left, right;       // isolating interval boundaries
+    int arcno;          // arcno of a segment this point belongs to
+    AlgebraicReal alpha;   // this clip point event line
+};
+
+template <class Integer>
+std::ostream& operator <<(std::ostream& os, const Pixel_2_<Integer>& pix) 
+{
+    os << " (" << pix.x << "/" << pix.sub_x << "; " << pix.y << "/" << 
+        pix.sub_y << ") level = " << pix.level;
+    return os;
+}
+
+/*! \brief defines class \c Curve_renderer_internals
+ *  
+ * provides an interface to low-level range analysis and polynomials evaluation
+ * methods along with caching mechanism. \c Coeff_ defines internal polynomial
+ * coefficients used by the renderer.
+ * \c CurveKernel_2 specifies underlying 2D curve kernel
+ */
+template <class CurveKernel_2, class Coeff_>
+class Curve_renderer_internals
+{
+public:
+    //! \name typedefs 
+    //!@{
+    
+    //! this instance's first template argument
+    typedef CurveKernel_2 Curve_kernel_2;
+
+    //! this instance's second template argument
+    typedef Coeff_ Coeff;
+
+    //! type of 1-curve analysis
+    typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
+
+    //! type of supporting polynomial
+    typedef typename Curve_analysis_2::Polynomial_2 Polynomial_2;
+
+    //! underlying univariate polynomial type
+    typedef typename Polynomial_2::NT Poly_dst_1;
+
+    //! rational number type
+    typedef typename ::CGAL::Get_arithmetic_kernel<
+        typename Curve_kernel_2::Coefficient>::Arithmetic_kernel::Rational
+            Rational;
+
+    typedef Curve_renderer_traits<Coeff, Rational> Renderer_traits;
+
+    /// polynomial traits should be used whenever possible
+    typedef CGAL::Polynomial_traits_d<Polynomial_2> Polynomial_traits_2;
+
+    typedef CGAL::Coercion_traits<Rational,
+        typename Curve_kernel_2::Coefficient> Coercion;
+
+    //! coercion between rational and polynomial coefficients number type
+    typedef typename Coercion::Type Rat_coercion_type;
+    
+    //! base number type for all internal computations
+    typedef typename Renderer_traits::Float NT;
+    
+    //! instance of a univariate polynomial
+    typedef CGAL::Polynomial<Coeff> Poly_1;
+    //! instance of a bivariate polynomial
+    typedef CGAL::Polynomial<Poly_1> Poly_2;
+    //! container's const iterator (random access)
+    typedef typename Poly_1::const_iterator const_iterator_1; 
+    //! container's const iterator (random access)
+    typedef typename Poly_2::const_iterator const_iterator_2; 
+    
+    //! a univariate rational polynomial    
+    typedef CGAL::Polynomial<Rat_coercion_type> Rational_poly_1;
+    //! a bivariate rational polynomial
+    typedef CGAL::Polynomial<Rational_poly_1> Rational_poly_2;
+
+    //! conversion from \c Rational type to used number type
+    typename Renderer_traits::Rat_to_float rat2float;
+    //! conversion from the basic NT to \c Rational
+    typename Renderer_traits::Float_to_rat float2rat;
+    //! makes the result exact after inexact operation (applicable only for
+    //! exact number types
+    typename Renderer_traits::Make_exact make_exact;
+
+    //!@}
+private:
+    //!\name private typedefs
+    //!@{
+        
+    //! container to store derivative coefficients
+    typedef std::vector<NT> Derivative_1;
+    //! instance of polynomial derivatives type
+    typedef std::vector<CGAL::Polynomial<NT> > Derivative_2;
+    //! const_iterator_2 for polynomial derivatives
+    typedef typename Derivative_2::const_iterator der_iterator_2;
+    //! const_iterator_1 for polynomial derivatives
+    typedef typename std::vector<NT>::const_iterator der_iterator_1;
+    
+    //! hashed container element's type for univariate polynomials
+    typedef std::pair<NT, Poly_1> Poly_entry;
+    
+    //! hash function to cache univariate polynomials
+//     struct hash_func_poly {
+//         typename Renderer_traits::Hash_function hash;
+//         std::size_t operator()(const NT& key) const {
+//             return hash(key);
+//         }
+//     };
+//     
+    //! hash function to cache function evaluations
+//     struct hash_func_eval {
+//         typename Renderer_traits::Hash_function hash;
+//         std::size_t operator()(const Eval_hash_key& key) const {
+//             std::size_t h1 = hash(key.first), h2 = hash(key.second);
+//             return (h1 - h2);
+//         }
+//     };
+       
+    //! hashed map container with LRU capabilities used to store precomputed
+    //! univariate polynomials at fixed x or y coordinates
+//     typedef boost::multi_index::multi_index_container<
+//         Poly_entry,
+//         boost::multi_index::indexed_by<
+//             boost::multi_index::sequenced<>,
+//             boost::multi_index::hashed_unique<
+//                 BOOST_MULTI_INDEX_MEMBER(Poly_entry, NT, first),
+//                 hash_func_poly > > > 
+//     Poly_cache;
+    
+    //! hashed map used to store precomputed polynomial evaluations
+//     typedef boost::multi_index::multi_index_container<
+//         Eval_entry,
+//         boost::multi_index::indexed_by<
+//             boost::multi_index::sequenced<>,
+//             boost::multi_index::hashed_unique<
+//                 BOOST_MULTI_INDEX_MEMBER(Eval_entry, Eval_hash_key, first),
+//                 hash_func_eval > > > 
+//     Eval_cache;
+    
+    //!@}
+public:
+    //!\name public interface
+    //!@{
+    
+    //! default constructor
+    Curve_renderer_internals() : window(0.0, 0.0, 0.0, 0.0), res_w(0),
+         res_h(0) {
+    }
+         
+    //! \brief checks whether interval contains zero
+    inline bool is_zero(const NT& low, const NT& up)
+    {
+        return (low*up < 0); //(low < 0&&up > 0);
+    }
+    
+    //! \brief evalutates a certain polynomial derivative at x
+    //!
+    //! \c der_coeffs is a set of derivative coefficients, 
+    //! \c poly - polynomial coefficients
+    NT evaluate_der(const CGAL::Polynomial<NT>& der_coeffs, const Poly_1& poly,
+        const NT& x)
+    {   
+        typename Renderer_traits::Extract_eval extract;
+        const_iterator_1 poly_it = poly.end() - 1;
+        der_iterator_1 der_it = der_coeffs.end() - 1;
+        NT y(extract(*poly_it--) * (*der_it));
+        while((der_it--) != der_coeffs.begin()) {
+            y = y * x + extract(*poly_it--) * (*der_it);
+        }
+        return y;
+    }
+    
+    //! \brief the same as \c evaluate but arguments are passed by value
+    //! (needed to substitute variables in bivariate polynomial)
+    inline static NT binded_eval(Poly_1 poly, NT x)
+    {
+        return evaluate(poly, x);
+    }
+    
+    //! \brief evalutates a polynomial at certain x-coordinate
+    static NT evaluate(const Poly_1& poly, const NT& x, 
+        bool *error_bounds_ = NULL)
+    {
+        typename Renderer_traits::Extract_eval extract;
+        int n = poly.degree()+1, m = (n-1)>>1, odd = n&1;
+        if(error_bounds_ != NULL)
+            *error_bounds_ = false;
+        if(n == 1)
+            return extract(poly.lcoeff(), error_bounds_);
+        Coeff cc = static_cast<Coeff>(x);
+        const_iterator_1 it1 = poly.end()-1;
+        const_iterator_1 it2 = it1 - (n>>1);
+        // const_iterator_1 beg = poly.begin()+odd;
+        Coeff y1 = *it1, y2 = *it2, mul = cc, y;
+        // unrolled loop for better instruction pairing
+        while(m-- > odd) { 
+            it1--; it2--;
+            y1 = y1*cc + (*it1);
+            y2 = y2*cc + (*it2);
+            mul = mul*cc;
+        }
+        y = y2 + y1*mul;
+        if(odd)
+            y = poly[0] + y*cc;
+        //Gfx_OUT("eval results x = " << x << " res: [" << y.lower() <<
+              //  "; " << y.upper() << "\n");
+
+        return extract(y, error_bounds_);
+    }
+
+    //! \brief evaluates polynomial at a point (x; y)
+    //!
+    //! y is the outermost variable, x is the innermost
+    static Rat_coercion_type substitute_xy(
+        const Rational_poly_2& poly, const Rational& x, const Rational& y) {
+
+        typename Rational_poly_2::const_iterator rit = poly.end()-1;
+        Rat_coercion_type r = rit->evaluate(x),
+            yc = typename Coercion::Cast()(y);
+
+        while((rit--) != poly.begin())
+            r = r * yc + rit->evaluate(x);
+        return r;
+    }
+    
+    //! destructor    
+    ~Curve_renderer_internals()
+    {
+        clear_caches();
+    }
+    
+    //!@}    
+public:
+    //!\name public data (can be accessed from hosting curve renderer)
+    //!@{
+    
+    CGAL::Bbox_2 window;            //! drawing window 
+    NT x_min, x_max, y_min, y_max;  
+    NT pixel_w, pixel_h;            //! pixel dimensions w.r.t. resolution
+      
+    Rational x_min_r, y_min_r, x_max_r, y_max_r; //! rational versions
+    Rational pixel_w_r, pixel_h_r; 
+    
+    int res_w, res_h; //! pixel resolution
+    
+    Poly_2 *coeffs_x, *coeffs_y; //! f(x(y)) / f(y(x))
+    Derivative_2 *der_x, *der_y;  //! derivative coefficients df/dx (df/dy)
+    
+    //! caches of precomputed univariate polynomials in x and y directions
+    //Poly_cache *cached_x, *cached_y;
+        
+    Rational_poly_2 *rational_x, *rational_y;   //! poly with rational coeffs
+    
+    Rational_poly_2 *rational_fx, *rational_fy; //! partial derivatives
+    
+    //! 0 - the 1st (2nd) derivative does not have zero over an 
+    //! interval; 1 - does have 0; -1 - not computed
+    int first_der, second_der;  
+    bool sign_change;  //! detected a sign change over interval    
+    
+    bool zero_bounds;  //! indicates that the result of the last range 
+                       //! evaluation has at least one zero boundary
+                       
+   // static bool show_dump;    //! for debugging
+                       
+    //!@}
+private:
+    //!\name private members for caching support
+    //!@{
+        
+    //! data structures grouped into arrays to facilitate caching
+    Poly_2 coeffs_x_[CGAL_N_CACHES], coeffs_y_[CGAL_N_CACHES];
+    Derivative_2 der_x_[CGAL_N_CACHES], der_y_[CGAL_N_CACHES];
+    //Poly_cache cached_x_[CGAL_N_CACHES], cached_y_[CGAL_N_CACHES];
+    Rational_poly_2 rational_x_[CGAL_N_CACHES], rational_y_[CGAL_N_CACHES];
+    Rational_poly_2 rational_fx_[CGAL_N_CACHES], rational_fy_[CGAL_N_CACHES];
+        
+    //!@}
+public:
+    //! \name public methods
+    //!@{
+
+// template <class CurveKernel_2, class Coeff_>
+// bool Curve_renderer_internals<CurveKernel_2, Coeff_>::show_dump = false;
+
+//! sets up drawing window and pixel resolution
+//!
+//! returns \c false if parameters are incorrect
+bool setup(const CGAL::Bbox_2& box_, int res_w_, int res_h_) 
+{ 
+    window = box_;
+    x_min = static_cast<NT>(box_.xmin());
+    y_min = static_cast<NT>(box_.ymin());
+    x_max = static_cast<NT>(box_.xmax());
+    y_max = static_cast<NT>(box_.ymax());
+
+    res_w = res_w_; 
+    res_h = res_h_;
+    
+    if (x_min >= x_max) {
+      std::cerr << "Incorrect setup parameters: "
+                << "x_min = " << x_min << " >= " << x_max << " = x_max" 
+                << std::endl;
+      return false;
+    }
+    if (y_min >= y_max) {
+      std::cerr << "Incorrect setup parameters: "
+                << "y_min = " << y_min << " >= " << y_max << " = y_max" 
+                << std::endl;
+      return false;
+    }
+    if (res_w < 4) {
+      std::cerr << "Incorrect setup parameters: "
+                << "res_w = " << res_w << " < 4" 
+                << std::endl;
+      return false;
+    }
+    if (res_h < 4) {
+      std::cerr << "Incorrect setup parameters: "
+                << "res_h = " << res_h << " < 4" 
+                << std::endl;
+      return false;
+    }
+     if (res_w > 2048) {
+      std::cerr << "Incorrect setup parameters: "
+                << "res_w = " << res_w << " > 2048" 
+                << std::endl;
+      return false;
+    }
+    if (res_h > 2048) {
+      std::cerr << "Incorrect setup parameters: "
+                << "res_h = " << res_h << " > 2048" 
+                << std::endl;
+      return false;
+    }
+    
+    pixel_w = (x_max - x_min) / res_w;
+    pixel_h = (y_max - y_min) / res_h;
+
+    //srand(time(NULL));
+    // from 0.1 to 0.5
+    double rmin = 0.1, rmax = 0.5;
+    NT sx = pixel_w * static_cast<NT>(rmin + 
+            (static_cast<double>(rand()) / RAND_MAX) * (rmax - rmin));
+    NT sy = pixel_h * static_cast<NT>(rmin + 
+            (static_cast<double>(rand()) / RAND_MAX) * (rmax - rmin));
+
+    Gfx_OUT("---------------------- sx: " << (sx / pixel_w) << "; sy: " << 
+        (sy / pixel_h) << "\n");
+    x_min += sx, x_max += sx, y_min += sy, y_max += sy;   
+
+    x_min_r = Rational(x_min), y_min_r = Rational(y_min);
+    x_max_r = Rational(x_max), y_max_r = Rational(y_max);
+        
+    pixel_w_r = (x_max_r - x_min_r) / res_w;
+    pixel_h_r = (y_max_r - y_min_r) / res_h;
+        
+    pixel_w = rat2float(pixel_w_r);
+    pixel_h = rat2float(pixel_h_r);
+    make_exact(pixel_w);
+    make_exact(pixel_h);
+    
+    //show_dump = false;
+    return true;
+}   
+
+//! \brief computes a range of polynomial values \c f([lower,upper]) using
+//! the First Affine Form (AF1) with Recursive Derivative information
+bool get_range_AF1_1(int var, 
+    const NT& l_, const NT& r_, const NT& key, const Poly_1& poly, int check)
+{
+    Derivative_2 *der = (var == CGAL_X_RANGE ? der_x : der_y);
+    NT l(l_), r(r_), l1, r1, low, up;
+    NT v1, v2;
+    int eval1, eval2;
+    der_iterator_2 der_it_2 = der->end()-1; 
+    der_iterator_1 der_it, der_begin;
+    const_iterator_1 cache_it, begin;
+        
+    first_der = false, sign_change = false;
+    if(poly.degree() == 0) {
+        zero_bounds = false;
+        return (poly.lcoeff() == NT(0.0));
+    }
+    
+    if(l_ == r_) {
+        zero_bounds = false;
+        return false;
+    }
+    if(l > r) {
+        l = r_;
+        r = l_;
+    }
+    
+    eval1 = evaluate_generic(var, l, key, poly);
+    eval2 = evaluate_generic(var, r, key, poly);
+    bool sign_change = (eval1*eval2 < 0);
+    zero_bounds = ((eval1&eval2) == 0);
+
+    if((sign_change||zero_bounds)&&check==1)
+        return true;
+    if(var == CGAL_X_RANGE) {
+        l1 = x_min + l*pixel_w;
+        r1 = x_min + r*pixel_w;
+    } else {
+        l1 = y_min + l*pixel_h;
+        r1 = y_min + r*pixel_h;
+    }
+    
+    typename Renderer_traits::Extract_eval extract;
+    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE; 
+    if(index >= der->size()) {
+        low = up = extract(poly.lcoeff()) * (*der_it_2).lcoeff();
+    } else {
+        der_it_2 = der->begin() + index;
+        low = 1;
+        up = -1;
+    }
+    
+    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2; 
+    make_exact(x0);
+    make_exact(x1);
+    NT x0_abs = CGAL_ABS(x0), x1_abs = CGAL_ABS(x1);
+
+    while((der_it_2--) != der->begin()) {
+        // iterate through derivative coefficients
+        der_it = der_it_2->end() - 1; 
+        der_begin = der_it_2->begin();
+        cache_it = poly.end() - 1; // iterate through precomputed y-values
+        // if a derivative does not straddle zero we can 
+        // calculate the exact boundaries for f(x)      
+        if(low * up >= 0) {
+            v1 = v2 = extract(*cache_it--) * (*der_it);
+            // calculate the ith derivative at xa and xb
+            while((der_it--) != der_begin) {
+                NT cc1 = extract(*cache_it--) * (*der_it);
+                v1 = v1 * l1 + cc1;
+                v2 = v2 * r1 + cc1;
+            }
+            low = v1, up = v2;  
+        } else { // use affine arithmetic to compute bounds
+
+            NT y0 = extract(*cache_it) * (*der_it), y1(0), e1(0);
+            cache_it--;
+            while((der_it--)!=der_begin) {
+                e1 = x0_abs*e1 + x1_abs*(CGAL_ABS(y1) + CGAL_ABS(e1));
+                y1 = y1*x0 + x1*y0; 
+                y0 = x0*y0 + extract(*cache_it) * (*der_it);
+                cache_it--;
+            }
+            NT spread = CGAL_ABS(y1) + CGAL_ABS(e1);
+            low = y0 - spread, up = y0 + spread;
+        }
+        if(der_it_2 == der->begin() && check == 3) {
+            first_der = //(eval1*eval2 < 0);
+                    is_zero(low, up);
+            if(sign_change||zero_bounds) 
+                return true;
+        }
+    }
+    if(low * up < 0) {
+        cache_it = poly.end()-1;
+        begin = poly.begin();
+        
+        NT y0 = extract(*cache_it), y1(0), e1(0);
+        while((cache_it--) != begin) {
+            e1 = x0_abs*e1 + x1_abs*(CGAL_ABS(y1) + CGAL_ABS(e1));
+            y1 = y1*x0 + x1*y0; 
+            y0 = x0*y0 + extract(*cache_it);
+        }
+
+        NT spread = CGAL_ABS(y1) + CGAL_ABS(e1);
+        low = y0 - spread, up = y0 + spread;
+        
+        eval1 = CGAL_SGN(low), eval2 = CGAL_SGN(up);
+    }
+    zero_bounds = ((eval1 & eval2) == 0);
+    if(eval1 * eval2 < 0) {
+        //std::cerr << "eval1 = " << low << "; eval2 = " << up << std::endl;
+        return true;
+    } 
+    return false;
+}
+
+//! \brief evaluates a univariate polynomial over an interval using
+//! First Quadratic Affine Form
+bool get_range_QF_1(int var, const NT& l_, const NT& r_, const NT& key, 
+    const Poly_1& poly, int check = 1)
+{
+    Derivative_2 *der = (var == CGAL_X_RANGE ? der_x : der_y);
+    NT l(l_), r(r_), l1, r1, low, up;
+    NT v1, v2;
+    int eval1, eval2;
+    der_iterator_2 der_it_2 = der->end()-1; 
+    der_iterator_1 der_it, der_begin;
+    const_iterator_1 cache_it, begin;
+
+    first_der = false, sign_change = false;
+    if(poly.degree()==0) {
+        zero_bounds = false;
+        return (poly.lcoeff()==NT(0.0));
+    }
+    if(l_ == r_) {
+        zero_bounds = false;
+        return false;
+    }
+    if(l > r) {
+        l = r_;
+        r = l_;
+    }
+    
+    eval1 = evaluate_generic(var, l, key, poly);
+    eval2 = evaluate_generic(var, r, key, poly);
+    sign_change = (eval1*eval2 < 0);
+    
+    zero_bounds = ((eval1 & eval2) == 0);
+    if((sign_change || zero_bounds) && check==1)
+        return true;
+        
+    if(var == CGAL_X_RANGE) {
+        l1 = x_min + l*pixel_w;
+        r1 = x_min + r*pixel_w;
+    } else {
+        l1 = y_min + l*pixel_h;
+        r1 = y_min + r*pixel_h;
+    }
+    
+    typename Renderer_traits::Extract_eval extract;
+    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE;
+    if(index >= der->size()) {
+        low = up = extract(poly.lcoeff()) * (*der_it_2).lcoeff();
+    } else {
+        der_it_2 = der->begin() + index;
+        low = 1;
+        up = -1;
+    }
+    
+    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2; 
+    make_exact(x0);
+    make_exact(x1);
+    NT x0_abs = CGAL_ABS(x0), xsum_abs = CGAL_ABS(x1) + x0_abs;
+
+    while((der_it_2--)!=der->begin()) {
+
+        // iterate through derivative coefficients
+        der_it = (*der_it_2).end()-1; 
+        der_begin = (*der_it_2).begin();
+        cache_it = poly.end()-1; // iterate through precomputed y-values
+        
+        // if a derivative does not straddle zero we can obtain exact bounds
+        // by evaluating a polynomial at end-points
+        if(low * up >= 0) {
+            v1 = v2 = extract(*cache_it--)* (*der_it);
+            // calculate the ith derivative at xa and xb
+            while((der_it--) != der_begin) {
+                NT cc1 = extract(*cache_it--)* (*der_it);
+                v1 = v1 * l1 + cc1;
+                v2 = v2 * r1 + cc1;
+            }
+            low = v1; 
+            up = v2;  
+        } else { // use Quadratic Form to compute the bounds
+
+            NT y0 = extract(*cache_it) * (*der_it), y1(0), z1(0), e1(0);
+            cache_it--;
+            while((der_it--)!=der_begin) {
+                e1 = xsum_abs * e1 + CGAL_ABS(x1 * z1);
+                z1 = x0*z1 + x1*y1;
+                y1 = y1*x0 + x1*y0; 
+                y0 = x0*y0 + extract(*cache_it)*(*der_it);
+                cache_it--;
+            }
+            NT spread = CGAL_ABS(y1) + e1;
+            low = spread;
+            up = spread;
+            if(z1 > 0)
+                up = up + z1;
+            else
+                low = low - z1;
+            low = y0 - low;
+            up = y0 + up;
+        }
+        
+        if(der_it_2 == der->begin() && check==3) {
+            first_der = //(eval1*eval2 < 0);//
+                    is_zero(low, up);
+            if(sign_change||zero_bounds) 
+                return true;
+        }
+    }
+    
+    if(low * up < 0) {
+        cache_it = poly.end()-1;
+        begin = poly.begin();
+        NT y0 = extract(*cache_it), y1(0), z1(0), e1(0);
+        while((cache_it--) != begin) {
+            e1 = xsum_abs * e1 + CGAL_ABS(x1*z1);
+            z1 = x0*z1 + x1*y1;
+            y1 = y1*x0 + x1*y0; 
+            y0 = x0*y0 + extract(*cache_it);
+        }
+        NT spread = CGAL_ABS(y1) + e1;
+        low = spread;
+        up = spread;
+        if(z1 > 0)
+            up = up + z1;
+        else
+            low = low - z1;
+        low = y0 - low;
+        up = y0 + up;
+        eval1 = CGAL_SGN(low);
+        eval2 = CGAL_SGN(up);
+    }
+    //if(eval1*eval2 < 0)
+      //  std::cerr << "eval1 = " << low << "; eval2 = " << up << std::endl;
+    zero_bounds = ((eval1 & eval2) == 0);
+    return (eval1*eval2 < 0);
+}
+
+//! \brief evaluates a univariate polynomial over an interval using
+//! Modified Affine Arithmetic 
+bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, 
+    const Poly_1& poly, int check = 1)
+{
+    Derivative_2 *der = (var == CGAL_X_RANGE) ? der_x : der_y;
+    // stores precomputed polynomial derivatives and binominal coeffs
+    Derivative_1 der_cache
+        //(der->size()+1, NT(0))
+        , binom;//(der->size()+1, NT(0));
+    NT l(l_), r(r_), l1, r1, low = NT(1), up = NT(-1);
+    NT v1, v2, v;
+    int eval1, eval2;
+
+    first_der = false, sign_change = false;
+    if(poly.degree()==0) {
+        zero_bounds = false;
+        return (poly.lcoeff()==NT(0.0));
+    }
+    if(l_ == r_) {
+        first_der = false;
+        return false;
+    }
+    if(l > r) {
+        l = r_;
+        r = l_;
+    }
+    eval1 = evaluate_generic(var, l, key, poly);
+    eval2 = evaluate_generic(var, r, key, poly);
+    
+    sign_change = (eval1*eval2 < 0);
+    zero_bounds = ((eval1&eval2) == 0);
+    
+    if((sign_change || zero_bounds) && check == 1)
+        return true;
+    
+    if(var == CGAL_X_RANGE) {
+        l1 = x_min + l*pixel_w;
+        r1 = x_min + r*pixel_w;
+    } else {
+        l1 = y_min + l*pixel_h;
+        r1 = y_min + r*pixel_h;
+    }
+    NT x0 = (l1 + r1)/2, x1 = (r1 - l1)/2;
+    make_exact(x0);
+    make_exact(x1);
+    
+    int d = 0;
+    v1 = evaluate(poly, x0);
+    //der_cache[d] = v1; 
+    der_cache.push_back(v1);
+    v = x1, d++;
+    der_iterator_2 der_it_2;
+    for(der_it_2 = der->begin(); der_it_2 != der->end(); der_it_2++) {
+        v1 = evaluate_der((*der_it_2), poly, x0);
+        der_cache.push_back(v1);
+        //der_cache[d] = v1; // replace by push_backs ?
+        //binom[d] = v; 
+        binom.push_back(v);
+        d++;
+        //v *= x1/d; 
+        //make_exact(v);
+        v *= x1; // ONLY when derivative coefficients are normalized
+    }
+
+    typename Renderer_traits::Extract_eval extract;
+    unsigned index = CGAL_RECURSIVE_DER_MAX_DEGREE;
+    if(index >= der->size()) {
+        low = up = extract(poly.lcoeff()) * (der->end()-1)->lcoeff();
+    } else {
+        der_it_2 = der->begin()+index;
+        low = 1;
+        up = -1;
+    }
+    // assume we have an array of derivatives: 
+    // der_cache: {f^(0); f^(1); f^(2); ...}
+    // and binominal coefficients: [h; h^2/2; h^3/6; ... h^d/d!]
+    der_iterator_1 eval_it = der_cache.end()-1, local_it, binom_it,
+                   eval_end = der_cache.end();
+    d = poly.degree();
+    der_it_2 = der->end()-1;
+    while(1) {//der_it!=end) {
+        if(low * up < 0) {
+            v2 = *eval_it;
+            local_it = eval_it + 1;
+            binom_it = binom.begin();
+            low = v2, up = v2;
+            while((local_it) != eval_end) {// calculate derivative bounds
+                v1 = (*local_it++) * (*binom_it++);
+                if(v1 >= 0) { // derivative index is odd
+                    up += v1; 
+                    low -= v1; 
+                } else {     
+                    up -= v1; 
+                    low += v1; 
+                }
+                if(local_it == eval_end) 
+                    break;
+                // derivative index is even
+                v1 = (*local_it++) * (*binom_it++);
+                (v1 > 0) ? up += v1 : low += v1;
+            }
+            eval1 = CGAL_SGN(low);
+            eval2 = CGAL_SGN(up);
+       
+        } else if(d > 0) {
+            low = evaluate_der((*der_it_2), poly, l1);
+            up = evaluate_der((*der_it_2), poly, r1);
+            eval1 = CGAL_SGN(low);
+            eval2 = CGAL_SGN(up);
+            
+        } else if(d == 0)
+            ;//Gfx_DETAILED_OUT("MAA bounds: sign change\n");
+                        
+        if(d == 1 && check == 3) {
+            first_der = (eval1*eval2 < 0);
+            if(sign_change||zero_bounds) 
+                return true;
+        } else if(d == 0) {
+            
+            zero_bounds = ((eval1&eval2) == 0);
+            return (eval1*eval2 < 0);
+        }
+        d--; der_it_2--;
+        if((eval_it--) == der_cache.begin()) 
+            break;
+    }
+    return true;
+}
+
+//! \brief fixes one coordinate of a bivariate polynomial, uses caching
+//! if appropriate 
+void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly)
+{
+    NT key1;
+    //Poly_cache *cached = cached_x;
+    Poly_2 *coeffs = coeffs_x;
+    //typename boost::multi_index::nth_index_iterator<Poly_cache,1>::type it;
+    bool not_cached = true,
+            /*(level >= CGAL_MAX_POLY_CACHE_LEVEL)*/ not_found = false;
+    
+    if(var == CGAL_Y_RANGE) {
+        //cached = cached_y; 
+        coeffs = coeffs_y; 
+        key1 = x_min + key*pixel_w;
+    } else 
+        key1 = y_min + key*pixel_h;
+        
+//     if(!not_cached) {
+//         typename boost::multi_index::nth_index<Poly_cache,1>::type& 
+//             idx = cached->get<1>();
+//         it = idx.find(key1); //*4
+//         not_found = (it == idx.end());
+//     }
+    
+    if(not_cached||not_found) {
+        poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), 
+                            boost::bind2nd(std::ptr_fun(binded_eval), key1)),
+                      ::boost::make_transform_iterator(coeffs->end(),   
+                            boost::bind2nd(std::ptr_fun(binded_eval), key1)));
+        if(not_cached)
+            return;
+    // all available space consumed: drop the least recently used entry
+//         if(cached->size() >= CGAL_POLY_CACHE_SIZE)
+//             cached->pop_back();
+//         cached->push_front(Poly_entry(key1,poly)); //*4
+//         return;
+    } 
+//     cached->relocate(cached->begin(), cached->project<0>(it));
+//     poly = (*it).second;
+}
+
+//! \brief computes the sign of univariate polynomial at (x; y). 
+//!
+//! if computation with the current precision is not reliable, the sign is
+//! recomputed with modular or exact rational arithmetic
+int evaluate_generic(int var, const NT& c, const NT& key, const Poly_1& poly)
+{   
+    NT x = key, y = c, c1;
+    
+    if(var == CGAL_X_RANGE) {
+        x = c;
+        y = key;
+        c1 = x_min + c*pixel_w;
+    } else
+        c1 = y_min + c*pixel_h;
+
+    bool error_bounds_;
+    int sign;
+    NT res = evaluate(poly, c1, &error_bounds_);
+
+    if(error_bounds_) 
+        sign = evaluate_rational(var, c, key);
+    else
+        sign = CGAL_SGN(res);
+ 
+    return sign;
+}
+
+//! \brief evaluates a polynomial at (x, y) using exact rational arithmetic
+int evaluate_rational(int var, const NT& c, const NT& key)
+{
+    //Rational_poly_1 poly;
+    Rational c_r = float2rat(c), key_r = float2rat(key);
+    c_r = (var == CGAL_X_RANGE) ? (x_min_r + c_r*pixel_w_r) :
+        (y_min_r + c_r*pixel_h_r);
+        
+    Rational_poly_2 *rat = rational_x;
+    if(var == CGAL_Y_RANGE) {
+        rat = rational_y; 
+        key_r = x_min_r + key_r*pixel_w_r;
+    } else 
+        key_r = y_min_r + key_r*pixel_h_r;
+
+    Rat_coercion_type res = substitute_xy(*rat, key_r, c_r);
+    return CGAL_SGN(res);
+}
+
+//! precomputes polynomials and derivative coefficients
+void precompute(const Polynomial_2& in) {
+
+    typedef typename Polynomial_traits_2::Innermost_coefficient_type Coeff_src;
+    
+    Max_coeff<Coeff_src> max_coeff;
+    Coeff_src max_c = max_coeff(in);
+    /////// magic symbol ////////////
+    // somehow relates to double precision fix
+    std::cerr << ' ';
+
+    typedef Reduce_by<Rat_coercion_type, Coeff_src> Reduce_op;
+    Transform<Rational_poly_2, Polynomial_2, Reduce_op> transform;
+    Reduce_op op(max_c);
+    
+    typedef CGAL::Polynomial_traits_d<Rational_poly_2> RP_traits;
+    *rational_y = transform(in, op); // divides by maximal coefficient
+    *rational_x = typename RP_traits::Swap()(*rational_y, 0, 1);
+
+    // rational fx and fy must have y outermost var and x innermost
+    *rational_fx = typename RP_traits::Differentiate()(*rational_y, 0);
+    *rational_fy = typename RP_traits::Differentiate()(*rational_y, 1);
+
+    typename Renderer_traits::Convert_poly convert_poly;
+    ////////////////////////////////////////////////////////
+    /////// ATTENTION: need to call makeExact for bigfloats after conversion
+    ////////////////////////////////////////////////////////
+    *coeffs_y = convert_poly(*rational_y);
+    *coeffs_x = typename CGAL::Polynomial_traits_d<Poly_2>::
+            Swap()(*coeffs_y, 0, 1);
+
+    int degree_x = coeffs_x->degree(),
+        degree_y = coeffs_y->degree();
+/*    cached_x->clear(); 
+    cached_y->clear(); */
+    der_x->clear();
+    der_y->clear();
+    int i, j, maxdeg = (degree_x > degree_y ? degree_x : degree_y);
+    std::vector<NT> X(maxdeg, NT(0));
+    der_x->reserve(degree_x);
+    der_y->reserve(degree_y);
+
+    NT det(1.0);
+    for(i = 0; i < degree_x; i++) {
+        if(i != 0) 
+            det = X[0];
+        for(j = 1; j <= degree_x - i; j++) {
+            // divide by the lowest coefficient ?
+            X[j - 1] = (i == 0 ? NT(j) : X[j] * NT(j) / det);
+            make_exact(X[j-1]);
+        }
+        der_x->push_back(CGAL::Polynomial<NT>(X.begin(),
+            (X.begin() + degree_x - i)));
+    }
+
+    det = NT(1.0);
+    for(i = 0; i < degree_y; i++) {
+        if(i != 0) 
+            det = X[0];
+        for(j = 1; j <= degree_y - i; j++) {
+            // divide by the lowest coefficient ?
+            X[j - 1] = (i == 0 ? NT(j) : X[j] * NT(j) / det); 
+            make_exact(X[j-1]);
+        }
+        der_y->push_back(CGAL::Polynomial<NT>(X.begin(),
+                (X.begin() + degree_y - i)));
+    }
+}
+
+//! \brief activates the cache entry \c cache_id 
+void select_cache_entry(int cache_id)
+{
+    coeffs_x = coeffs_x_ + cache_id;
+    coeffs_y = coeffs_y_ + cache_id;
+    rational_x = rational_x_ + cache_id;
+    rational_y = rational_y_ + cache_id;
+    rational_fx = rational_fx_ + cache_id;
+    rational_fy = rational_fy_ + cache_id;
+    der_x = der_x_ + cache_id;
+    der_y = der_y_ + cache_id;
+/*    cached_x = cached_x_ + cache_id; 
+    cached_y = cached_y_ + cache_id;*/
+}
+
+//! \brief empties all cache instances
+void clear_caches() {
+
+    for(unsigned i = 0; i < CGAL_N_CACHES; i++) {
+/*        cached_x_[i].clear(); 
+        cached_y_[i].clear(); */
+        der_x_[i].clear();
+        der_y_[i].clear();
+    }
+}
+
+//!@}
+
+}; // Curve_renderer_internals
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
new file mode 100644
index 0000000..9750b1a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
@@ -0,0 +1,600 @@
+// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Pavel Emeliyanenko <asm at mpi-sb.mpg.de>
+//
+// ============================================================================
+
+#ifndef CGAL_CKVA_CURVE_RENDERER_TRAITS_H
+#define CGAL_CKVA_CURVE_RENDERER_TRAITS_H
+
+#include <CGAL/basic.h>
+#include <CGAL/function_objects.h>
+#include <boost/functional.hpp>
+
+/*! \file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
+ * \brief
+ * defines class Curve_renderer_traits.
+ * 
+ * provides specialisations of Curve_renderer_traits for different number
+ * types compatible with the curve renderer
+*/
+ 
+namespace CGAL {
+
+// transformation routine
+namespace internal {
+
+//! this exception is thrown whenever the precision of used number
+//! type is not sufficient
+class Insufficient_rasterize_precision_exception
+{  };
+
+#ifndef CGAL_MAX_COEFF_TRANSFORM
+#define CGAL_MAX_COEFF_TRANSFORM
+
+#ifndef CGAL_ABS
+#define CGAL_ABS(x) ((x) < 0 ? -(x): (x))
+#endif
+
+#ifndef CGAL_SGN
+#define CGAL_SGN(x) ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0))
+#endif
+
+template <class NT>
+struct Max_coeff
+{
+    template <class X>
+    NT operator()(const CGAL::Polynomial<X>& p) const
+    {
+        typename CGAL::Polynomial<X>::const_iterator it = p.begin();
+        Max_coeff<NT> max_coeff;
+        NT max(max_coeff(*it));
+        while(++it != p.end()) {
+            NT tmp(max_coeff(*it));
+            if(max < CGAL_ABS(tmp))
+                max = CGAL_ABS(tmp);
+        }
+        return max;
+    }
+    NT operator()(const NT& x) const
+    { return CGAL_ABS(x); }
+};
+
+/*!\brief
+ * divides an input value by a contant
+ *
+ * provided that there is a coercion between \c Input and \c Result types
+ */
+template <class Result, class Input>
+struct Reduce_by {
+
+    typedef Input argument_type;
+    typedef Result result_type;
+
+    Reduce_by(const Input& denom_) :
+        denom(cast(denom_)) {
+    }
+    
+    Result operator()(const Input& x) {
+        return (cast(x)/denom);
+    }
+
+    typename CGAL::Coercion_traits<Input, Result>::Cast cast;
+    Result denom;
+};
+
+/*!\brief
+ * transforms bivaritate polynomial of type \c InputPoly_2 to
+ * \c OutputPoly_2 by recursively applying operation \c Op to all of its
+ * coefficients
+ *
+ * <tt>Op: InputPoly_2::Inntermost_coefficient_type ->
+ *             OutputPoly_2::Inntermost_coefficient_type</tt>
+ */
+template <class OutputPoly_2, class InputPoly_2, class Op>
+struct Transform {
+
+    typedef InputPoly_2  first_argument_type;
+    typedef Op           second_argument_type;
+    typedef OutputPoly_2 result_type;
+
+    template <class X>
+    OutputPoly_2 operator()(const CGAL::Polynomial<X>& p, Op op = Op()) const {
+
+        Transform<typename OutputPoly_2::NT, typename InputPoly_2::NT, Op> tr;
+        return OutputPoly_2(
+            ::boost::make_transform_iterator(p.begin(), boost::bind2nd(tr, op)),
+            ::boost::make_transform_iterator(p.end(), boost::bind2nd(tr, op)));
+    }
+
+    OutputPoly_2 operator()(
+        const typename Innermost_coefficient_type<InputPoly_2>::Type& x, Op op)
+        const {
+        return static_cast<OutputPoly_2>(op(x));
+    }
+};
+
+#endif // CGAL_MAX_COEFF_TRANSFORM
+
+/*!\brief
+ * class template \c Curve_renderer_traits
+ *
+ * this traits class prodives various number type conversions for the
+ * curve renderer
+ */              
+
+template <class Coeff_, class Integer_, class Rational_>
+struct Curve_renderer_traits_base 
+{ 
+    //! type of innermost polynomial coefficients
+    typedef Coeff_ Coeff;
+    
+    //! an integer number type
+    typedef Integer_ Integer; 
+
+    typedef Rational_ Rational;
+
+    //! conversion from rational to floating-point
+    template <class Float>
+    struct Rat_to_float {
+        typedef Float result_type;
+
+        template <class X, class Y,class ACDE_TAG,class FP_TAG>
+        Float operator()(const Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>& x) const { 
+            typename CGAL::Coercion_traits<Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>, Float>::Cast
+                cast;        
+            return cast(x); 
+        }
+
+        Float operator()(const Rational& x) const { 
+            return static_cast<Float>(x); 
+        }
+    };
+   
+    //! provided for convenience when there exists an implicit coercion
+    //! between number types
+    template <class To>
+    struct Implicit_coercion {
+        typedef To result_type;
+        
+        template <class From> 
+        To operator()(const From& x) const {
+            return static_cast<To>(x);
+        }
+    };
+   
+    struct Float_to_int {
+        typedef int result_type;
+        
+        template <class Float>
+        int operator()(const Float& x) const
+        { return static_cast<int>(std::floor(CGAL::to_double(x))); }
+            //return static_cast<int>(std::floor(x)); }
+    };
+
+    /*!\brief
+     * conversion from bivariate polynomial over extended number type to
+     * polynomial with coefficients of type \c Coeff
+     *
+     * valid instantiations of \c Extended number type are \c Rational ,
+     * \c FieldWithSqrt , etc. Provided that there is a type coercion between
+     * \c Extended and \c Coeff
+     */
+    struct Convert_poly { 
+        typedef CGAL::Polynomial<CGAL::Polynomial<Coeff> > result_type;
+        
+        template <class Extended>
+        inline result_type operator()(const 
+            CGAL::Polynomial<CGAL::Polynomial<Extended> >& poly) const {
+            
+    //!@todo: use Rat_to_float functor instead of coercion traits ?
+    //! need some sort of polymorphism..
+
+            //std::cerr << "calling transform..\n";
+            typedef typename CGAL::Coercion_traits<Extended, Coeff>::Cast
+                Cast;
+            Transform<result_type,
+                    CGAL::Polynomial<CGAL::Polynomial<Extended> >, Cast>
+                transform;
+            return transform(poly);
+        }
+    };
+    
+    //! converts polynomial coefficients to floating-point representation
+    //! \c error_bounds is set if the result is not reliable
+    struct Extract_eval {
+        typedef Coeff argument_type;
+        typedef Coeff result_type;
+        
+        Coeff operator()(const Coeff& x, 
+            bool *error_bounds = NULL) const { 
+            if(error_bounds != NULL)
+                 *error_bounds = false;
+            return x;
+        }
+    };
+    
+    //! computes a 32-bit hash value from floating-point argument
+    struct Hash_function {
+        typedef std::size_t result_type;
+        struct long_long {
+            long low, high;
+        };
+        
+        template <class Float>
+        std::size_t operator()(const Float& key) const {
+            const long_long *hk = reinterpret_cast<const long_long *>(&key);
+            return (hk->low ^ hk->high);
+        }
+    };
+    
+    //! makes result exact after inexact operation such as div, sqrt, etc.
+    //! (required for multi-precision arithmetic)
+    struct Make_exact {
+        typedef void result_type;
+        
+        template <class Float>
+        void operator()(const Float& x) const
+        { }
+    };
+    
+    //! compares a given quantity with the precision limit a floating-point
+    //! number type, returns \c true if this limit is exceeded
+    struct Precision_limit {
+        typedef bool result_type;
+        
+        template <class Float>
+        bool operator()(const Float& x) const
+        { return false;/*(CGAL_ABS(x) <= 1e-16)*/; }
+    };
+    
+    //! maximum subdivision level for the curve renderer by exceeding which
+    //! an exception of type \c Insufficient_rasterize_precision_exception
+    //! will be thrown, this is also limited by \c Integer number type, since
+    //! the integer must be able to store numbers up to 2^MAX_SUBDIVISION_LEVEL
+    static const unsigned MAX_SUBDIVISION_LEVEL = 12;   
+};
+
+template <class Float, class Rational>
+struct Curve_renderer_traits 
+{  };
+
+#ifdef CGAL_USE_CORE
+//! Specialization for \c CGAL::Interval_nt<true>
+template <>
+struct Curve_renderer_traits<CGAL::Interval_nt<true>, CORE::BigRat > :
+        public Curve_renderer_traits_base<CGAL::Interval_nt<true>, int,
+            CORE::BigRat> {
+ 
+    typedef double Float;
+
+    struct Rat_to_float {
+        typedef Float result_type;
+                
+        template <class Extended>
+        Float operator()(const Extended& x) const {
+            return CGAL::to_double(x); 
+        }
+    };
+
+    typedef Implicit_coercion<double> Float_to_rat;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+
+        Integer operator()(const Rational& x) const {
+            return static_cast<int>(std::floor(CGAL::to_double(x)));
+        }
+    };
+
+    struct Extract_eval {
+        typedef Coeff argument_type;
+        typedef Float result_type;
+        
+        Float operator()(const Coeff& x, 
+                    bool *error_bounds = NULL) const { 
+            bool err_bnd;
+//             err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
+//                 ((l <= 0 && u >= 0));
+            Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
+            err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
+            if(error_bounds != NULL)
+                *error_bounds = err_bnd;
+//! ATTENTION!!! if smth is screwed up try to uncomment the line below
+//! this is very crucial for performance & stability
+            if(err_bnd)  // &&  ABS(mid) < 1E-15)
+                return 0; 
+//! ATTENTION!!!
+            return mid;
+        }
+    };
+
+    //! compares a given quantity with the precision limit a floating-point
+    //! number type, returns \c true if this limit is exceeded
+    struct Precision_limit {
+        typedef bool result_type;
+        
+        template <class Float>
+        bool operator()(const Float& x) const
+        { return (CGAL_ABS(x) <= 1e-16); }
+    };
+
+    static const unsigned MAX_SUBDIVISION_LEVEL = 12;
+};
+
+//! Specialization for \c CORE::BigFloat
+template <>
+struct Curve_renderer_traits<CORE::BigFloat, class CORE::BigRat> 
+         : public Curve_renderer_traits_base<CORE::BigFloat, CORE::BigInt,
+                CORE::BigRat> {
+
+    typedef CORE::BigFloat Float;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+        
+        Integer operator()(const Rational& x) const { 
+            return x.BigIntValue(); 
+        }
+    };
+
+    typedef Rat_to_float<Float> Rat_to_float;
+    
+    struct Float_to_rat {
+        typedef Float argument_type;
+        typedef Rational result_type;
+        
+        Rational operator()(const Float& x) const
+        { return x.BigRatValue(); }
+    };
+    
+    struct Hash_function {
+        typedef Float argument_type;
+        typedef std::size_t result_type;
+        
+        inline result_type operator()(const Float& key) const {
+            const CORE::BigFloatRep& rep = key.getRep();
+            std::size_t ret = reinterpret_cast<std::size_t>(&rep);
+            return ret;
+        }
+    };
+    
+    struct Make_exact {
+        typedef Float argument_type;
+        typedef void result_type;
+        
+        inline void operator()(Float& x) const
+        { x.makeExact(); }
+    };
+
+    static const unsigned MAX_SUBDIVISION_LEVEL = 12;
+};
+
+//! Specialization for \c CORE::BigRat
+template <>
+struct Curve_renderer_traits<CORE::BigRat, CORE::BigRat> : 
+    public Curve_renderer_traits_base<CORE::BigRat, CORE::BigInt,
+        CORE::BigRat> {
+
+    typedef CORE::BigRat Float;
+
+    typedef Rat_to_float<Float> Rat_to_float;
+
+    typedef Implicit_coercion<Float> Float_to_rat;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+        
+        Integer operator()(const Rational& x) const { 
+            return x.BigIntValue(); 
+        }
+    };
+    
+    struct Hash_function {
+        typedef Float argument_type;
+        typedef std::size_t result_type;
+        
+        inline result_type operator()(const Float& key) const {
+            const CORE::BigRatRep& rep = key.getRep();
+            std::size_t ret = reinterpret_cast<std::size_t>(&rep);
+            return ret;
+        }
+    };
+};
+#endif // CGAL_USE_CORE
+
+#ifdef CGAL_USE_LEDA
+template <>
+struct Curve_renderer_traits<CGAL::Interval_nt<true>, leda::rational > :
+        public Curve_renderer_traits_base<CGAL::Interval_nt<true>, int,
+            leda::rational> {
+ 
+    typedef double Float;
+
+    struct Rat_to_float {
+        typedef Float result_type;
+                
+        template <class Extended>
+        Float operator()(const Extended& x) const {
+            return CGAL::to_double(x); 
+        }
+    };
+
+    typedef Implicit_coercion<double> Float_to_rat;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+
+        Integer operator()(const Rational& x) const {
+            return static_cast<int>(std::floor(CGAL::to_double(x)));
+            //return static_cast<int>(x.to_double());
+        }
+    };
+
+    struct Extract_eval {
+        typedef Coeff argument_type;
+        typedef Float result_type;
+        
+        Float operator()(const Coeff& x, 
+                    bool *error_bounds = NULL) const { 
+            bool err_bnd;
+//             err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
+//                 ((l <= 0 && u >= 0));
+            Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
+            err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
+            if(error_bounds != NULL)
+                *error_bounds = err_bnd;
+//! ATTENTION!!! if smth is screwed up try to uncomment the line below
+//! this is very crucial for performance & stability
+            if(err_bnd)  // &&  ABS(mid) < 1E-15)
+                return 0; 
+//! ATTENTION!!!
+            return mid;
+        }
+    };
+
+    //! compares a given quantity with the precision limit a floating-point
+    //! number type, returns \c true if this limit is exceeded
+    struct Precision_limit {
+        typedef bool result_type;
+        
+        template <class Float>
+        bool operator()(const Float& x) const
+        { return (CGAL_ABS(x) <= 1e-16); }
+    };
+};
+
+//! Specialization for \c leda::bigfloat
+template <>
+struct Curve_renderer_traits<leda::bigfloat, class leda::rational> 
+         : public Curve_renderer_traits_base<leda::bigfloat, leda::integer,
+                leda::rational> {
+
+    typedef leda::bigfloat Float;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+        
+        Integer operator()(const Rational& x) const { 
+            return leda::floor(x); 
+        }
+    };
+
+    struct Rat_to_float {
+        typedef Float result_type;
+
+        template <class X, class Y,class ACDE_TAG,class FP_TAG>
+        Float operator()(const Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>& x) const { 
+            typename CGAL::Coercion_traits<Sqrt_extension<X, Y, ACDE_TAG, FP_TAG>, Float>::Cast
+                cast;        
+            return cast(x); 
+        }
+        // no implicit coercion between leda rational and floats, therefore
+        // decompose rational to compute the result
+        Float operator()(const Rational& x) const { 
+            return (static_cast<Float>(x.numerator()) / 
+                    static_cast<Float>(x.denominator())); 
+        }
+    };
+    
+    struct Float_to_rat {
+        typedef Float argument_type;
+        typedef Rational result_type;
+        
+        Rational operator()(const Float& x) const
+        { return x.to_rational(); }
+    };
+    
+    struct Convert_poly { 
+        typedef CGAL::Polynomial<CGAL::Polynomial<Coeff> > result_type;
+        
+        template <class Extended>
+        inline result_type operator()(const 
+            CGAL::Polynomial<CGAL::Polynomial<Extended> >& poly) const {
+            
+            Transform<result_type,
+                CGAL::Polynomial<CGAL::Polynomial<Extended> >,
+                    Rat_to_float> transform;
+            return transform(poly);
+        }
+    };
+    
+    struct Hash_function {
+        typedef Float argument_type;
+        typedef std::size_t result_type;
+        
+        inline result_type operator()(const Float& key) const {
+           return static_cast<std::size_t>(
+                    key.get_significant_length());
+        }
+    };
+};
+
+//! Specialization for \c leda::rational
+template <>
+struct Curve_renderer_traits<leda::rational, leda::rational> : 
+    public Curve_renderer_traits_base<leda::rational, leda::integer,
+        leda::rational> {
+
+    typedef leda::rational Float;
+
+    typedef Rat_to_float<Float> Rat_to_float;
+
+    typedef Implicit_coercion<Float> Float_to_rat;
+
+    struct Rat_to_integer {
+        typedef Rational argument_type;
+        typedef Integer result_type;
+        
+        Integer operator()(const Rational& x) const { 
+            return leda::floor(x);  
+        }
+    };
+    
+    struct Hash_function {
+        typedef Float argument_type;
+        typedef std::size_t result_type;
+        
+        inline result_type operator()(const Float& key) const {
+            std::size_t ret = reinterpret_cast<std::size_t>(
+                key.numerator().word_vector());
+            return ret;
+        }
+    };
+
+    struct Make_exact {
+        typedef Float argument_type;
+        typedef void result_type;
+        
+        inline void operator()(Float& x) const
+        { x.normalize(); }
+    };
+};
+
+#endif // CGAL_USE_LEDA
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_CKVA_CURVE_RENDERER_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h b/3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Dart.h b/3rdparty/CGAL-4.8/include/CGAL/Dart.h
new file mode 100644
index 0000000..c098057
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Dart.h
@@ -0,0 +1,343 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_DART_H
+#define CGAL_DART_H 1
+
+#include <CGAL/Compact_container.h>
+#include <CGAL/assertions.h>
+#include <bitset>
+
+namespace CGAL {
+
+  /** @file Dart.h
+   * Definition of nD dart.
+   */
+
+  namespace internal {
+    template <typename Map,unsigned int i>
+    struct basic_link_beta_functor;
+
+    template <typename CMap,unsigned int i>
+    struct link_beta_functor;
+  }
+
+#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
+
+  /** Definition of nD dart.
+   * The Dart class describes an nD dart (basic element of a
+   * combinatorial map). A dart is composed with handle towards its neighbors,
+   * a bitset containing Boolean marks, and handle towards enabled attributes.
+   * n is the dimension of the space (2 for 2D, 3 for 3D...)
+   * Refs the ref class
+   */
+  template <unsigned int d, typename Refs>
+  struct Dart
+  {
+    template < unsigned int, class, class, class, class >
+    friend class Combinatorial_map_base;
+
+    template<unsigned int, class, class>
+    friend class Combinatorial_map_storage_1;
+
+    template<unsigned int, class, class>
+    friend class Combinatorial_map_storage_2;
+
+    template<unsigned int, unsigned int, class, class, class>
+    friend class Linear_cell_complex_storage_1;
+
+    template<unsigned int, unsigned int, class, class, class>
+    friend class Linear_cell_complex_storage_2;
+
+    template <class, class, class, class>
+    friend class Compact_container;
+
+    template<class, unsigned int, unsigned int>
+    friend struct Remove_cell_functor;
+
+    template<class, unsigned int>
+    friend struct Contract_cell_functor;
+
+    template <typename,unsigned int>
+    friend struct internal::link_beta_functor;
+
+    template <typename, typename>
+    friend struct internal::Reverse_orientation_of_map_functor;
+
+    template <typename, typename>
+    friend struct internal::Reverse_orientation_of_connected_component_functor;
+
+  public:
+    typedef Dart<d,Refs>                     Self;
+    typedef typename Refs::Dart_handle       Dart_handle;
+    typedef typename Refs::size_type         size_type;
+    typedef typename Refs::Dart_const_handle Dart_const_handle;
+    typedef typename Refs::Helper            Helper;
+    /// Typedef for attributes
+    template<int i>
+    struct Attribute_handle: public Refs::template Attribute_handle<i>
+    {};
+    template<int i>
+    struct Attribute_const_handle:
+      public Refs::template Attribute_const_handle<i>
+    {};
+
+    /// The number of used marks.
+    static const size_type NB_MARKS = Refs::NB_MARKS;
+
+    /// The dimension of the combinatorial map.
+    static const unsigned int dimension = d;
+
+#ifdef CGAL_CMAP_DEPRECATED
+
+    /** Return if this dart is free for adimension.
+     * @param i the dimension.
+     * @return true iff the dart is linked with NULL for \em adimension.
+     */
+    template<unsigned int i>
+    bool is_free() const
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i] == Refs::null_dart_handle;
+    }
+    bool is_free(unsigned int i) const
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i] == Refs::null_dart_handle;
+    }
+
+    /** Return the highest dimension for which the dart is not free.
+     * @return the dimension d such that the dart is not d-free but k-free for
+     *         all k>d. -1 if the dart is free for all d in {0..n}
+     */
+    int highest_nonfree_dimension() const
+    {
+      for (int i=(int)dimension; i>=0; --i)
+      { if ( !is_free(i) ) return i; }
+      return -1;
+    }
+
+    /** Return a dart belonging to the same edge and to the second vertex
+     * of the current edge (NULL if such a dart does not exist).
+     * @return An handle to the opposite dart.
+     */
+    Dart_handle opposite()
+    {
+      for (unsigned int i = 2; i <= dimension; ++i)
+        if (!is_free(i)) return beta(i);
+      return NULL;
+    }
+    Dart_const_handle opposite() const
+    {
+      for (unsigned int i = 2; i <= dimension; ++i)
+        if (!is_free(i)) return beta(i);
+      return NULL;
+    }
+
+    /** Return a dart incident to the other extremity of the current edge,
+     *  but contrary to opposite, non necessary to the same edge
+     *  (NULL if such a dart does not exist).
+     * @return An handle to the opposite dart.
+     */
+    Dart_handle other_extremity()
+    {
+      for (unsigned int i = 1; i <= dimension; ++i)
+        if (!is_free(i)) return beta(i);
+      return NULL;
+    }
+    Dart_const_handle other_extremity() const
+    {
+      for (unsigned int i = 1; i <= dimension; ++i)
+        if (!is_free(i)) return beta(i);
+      return NULL;
+    }
+
+    /** Link this dart with a given dart for a given dimension.
+     * @param adart the dart to link with.
+     * @param i the dimension.
+     */
+    template<unsigned int i>
+    void basic_link_beta(Dart_handle adart)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(this!=&*Refs::null_dart_handle);
+      mbeta[i] = adart;
+    }
+    void basic_link_beta(Dart_handle adart, unsigned int i)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(this!=&*Refs::null_dart_handle);
+      mbeta[i] = adart;
+    }
+
+    /** Unlink this dart for a given dimension.
+     * @param i the dimension.
+     */
+    template<unsigned int i>
+    void unlink_beta()
+    {
+      CGAL_assertion(i <= dimension);
+      mbeta[i] = Refs::null_dart_handle;
+    }
+    void unlink_beta(unsigned int i)
+    {
+      CGAL_assertion(i <= dimension);
+      mbeta[i] = Refs::null_dart_handle;
+    }
+
+#endif // CGAL_CMAP_DEPRECATED
+
+    /** Return the beta of this dart for a given dimension.
+     * @param i the dimension.
+     * @return beta(\em i).
+     */
+    template<unsigned int i>
+    Dart_handle beta()
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i];
+    }
+    Dart_handle beta(unsigned int i)
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i];
+    }
+    template<unsigned int i>
+    Dart_const_handle beta() const
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i];
+    }
+    Dart_const_handle beta(unsigned int i) const
+    {
+      CGAL_assertion(i <= dimension);
+      return mbeta[i];
+    }
+
+    /** Return the beta inverse of this dart for a given dimension.
+     * @param i the dimension.
+     * @return beta^{-1}(\em i).
+     */
+    template<unsigned int i>
+    Dart_handle beta_inv()
+    { return beta<CGAL_BETAINV(i)>(); }
+    Dart_handle beta_inv(unsigned int i)
+    { return beta(CGAL_BETAINV(i)); }
+    template<unsigned int i>
+    Dart_const_handle beta_inv() const
+    { return beta<CGAL_BETAINV(i)>(); }
+    Dart_const_handle beta_inv(unsigned int i) const
+    { return beta(CGAL_BETAINV(i)); }
+
+    /// @return a handle on the i-attribute
+    template<int i>
+    typename Attribute_handle<i>::type attribute()
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                     "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_handles);
+    }
+    template<int i>
+    typename Attribute_const_handle<i>::type attribute() const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                     "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+        (mattribute_handles);
+    }
+
+    /** Return the mark value of a given mark number.
+     * @param amark the mark number.
+     * @return the value for this number.
+     */
+    bool get_mark(size_type amark) const
+    {
+      CGAL_assertion(amark>=0 && amark<NB_MARKS);
+      return mmarks[amark];
+    }
+
+    /** Set the mark of a given mark number to a given value.
+     * @param amark the mark number.
+     * @param AValue the value.
+     */
+    void set_mark(size_type amark, bool avalue) const
+    {
+      CGAL_assertion(amark>=0 && amark<NB_MARKS);
+      mmarks.set(amark, avalue);
+    }
+    /** Flip the mark of a given mark number.
+     * @param amark the mark number.
+     */
+    void flip_mark(size_type amark) const
+    {
+      CGAL_assertion(amark>=0 && amark<NB_MARKS);
+      mmarks.flip(amark);
+    }
+
+    /** Return all the marks of this dart.
+     * @return the marks.
+     */
+     std::bitset<NB_MARKS> get_marks() const
+    { return mmarks; }
+
+    /** Set simultaneously all the marks of this dart to a given value.
+     * @param amarks the value of the marks.
+     */
+     void set_marks(const std::bitset<NB_MARKS>& amarks) const
+    { mmarks = amarks; }
+
+  protected:
+    /** Default constructor: no real initialisation,
+     *  because this is done in the combinatorial map class.
+     */
+    Dart()
+    {}
+
+    /** Copy constructor:
+     * @param adart a dart.
+     */
+    Dart(const Dart& adart) : mmarks(adart.mmarks),
+    mattribute_handles(adart.mattribute_handles)
+    {
+      for (unsigned int i = 0; i <= dimension; ++i)
+        mbeta[i] = adart.mbeta[i];
+    }
+
+   public:
+    void * for_compact_container() const
+    { return mbeta[0].for_compact_container(); }
+    void * & for_compact_container()
+    { return mbeta[0].for_compact_container(); }
+
+  protected:
+    /// Beta for each dimension +1 (from 0 to dimension).
+    Dart_handle mbeta[dimension+1];
+
+    /// Values of Boolean marks.
+    mutable std::bitset<NB_MARKS> mmarks;
+
+    /// Attributes enabled
+    typename Helper::Attribute_handles mattribute_handles;
+  };
+
+} // namespace CGAL
+
+#endif // CGAL_DART_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Dart_const_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Dart_const_iterators.h
new file mode 100644
index 0000000..f438f19
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Dart_const_iterators.h
@@ -0,0 +1,338 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_DART_CONST_ITERATORS_HH
+#define CGAL_DART_CONST_ITERATORS_HH 1
+
+#include <CGAL/Dart_iterators.h>
+
+namespace CGAL {
+
+  /** @file Dart_const_iterators.h
+   * Definition of dart const iterators. There are 9 iterators:
+   *  - CMap_dart_const_iterator_basic_of_orbit<Map,Beta...>
+   *  - CMap_dart_const_iterator_basic_of_cell<Map,i,d>
+   *  - CMap_dart_const_iterator_basic_of_all<Map>
+   *  - CMap_dart_const_iterator_basic_of_involution<Map,i,d>
+   *  - CMap_dart_const_iterator_of_involution_inv<Map,i,d>
+   *  - CMap_dart_const_iterator_of_orbit<Map,Beta...>
+   *  - CMap_dart_const_iterator_of_cell<Map,i,d>
+   *  - CMap_dart_const_iterator_of_involution<Map,i,d>
+   *  - CMap_dart_const_iterator_basic_of_involution_inv<Map,i,d>
+   */
+  //****************************************************************************
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template<typename Map_,unsigned int...Beta>
+  class CMap_dart_const_iterator_basic_of_orbit: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,true,Beta...>
+  {
+  public:
+    typedef CMap_dart_const_iterator_basic_of_orbit<Map_,Beta...> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,true,Beta...> Base;
+
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
+                                            Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /// Main constructor.
+    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
+                                            Dart_const_handle adart,
+                                            size_type amark):
+      Base(amap,adart,amark)
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_orbit
+    (const CMap_dart_iterator_basic_of_orbit<Map_,Beta...>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart(),
+           it.mmark_number)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,unsigned int...Beta>
+  class CMap_dart_const_iterator_of_orbit: 
+    public CMap_dart_iterator_of_orbit_generic<Map_,true,Beta...>
+  {
+  public:
+    typedef CMap_dart_const_iterator_of_orbit<Map_,Beta...> Self;
+    typedef CMap_dart_iterator_of_orbit_generic<Map_,true,Beta...> Base;
+
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+
+    /// Main constructor.
+    CMap_dart_const_iterator_of_orbit(const Map_& amap,
+                                      Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_of_orbit
+    (const CMap_dart_iterator_of_orbit<Map_,Beta...>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+#else
+  //****************************************************************************
+  template<typename Map_,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
+           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_const_iterator_basic_of_orbit: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,true,B1,B2,B3,B4,
+                                                     B5,B6,B7,B8,B9>
+  {
+  public:
+    typedef CMap_dart_const_iterator_basic_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
+                                                    B7,B8,B9> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,true,B1,B2,B3,B4,
+                                                      B5,B6,B7,B8,B9> Base;
+
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
+                                            Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /// Main constructor.
+    CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
+                                            Dart_const_handle adart,
+                                            size_type amark):
+      Base(amap,adart,amark)
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_orbit
+    (const CMap_dart_iterator_basic_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
+     B7,B8,B9>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart(),
+           it.mmark_number)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
+           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_const_iterator_of_orbit: 
+    public CMap_dart_iterator_of_orbit_generic<Map_,true,B1,B2,B3,B4,
+                                               B5,B6,B7,B8,B9>
+  {
+  public:
+    typedef CMap_dart_const_iterator_of_orbit<Map_,B1,B2,B3,B4,B5,B6,
+                                              B7,B8,B9> Self;
+    typedef CMap_dart_iterator_of_orbit_generic<Map_,true,B1,B2,B3,B4,
+                                                B5,B6,B7,B8,B9> Base;
+
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+
+    /// Main constructor.
+    CMap_dart_const_iterator_of_orbit(const Map_& amap,
+                                      Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_of_orbit
+    (const CMap_dart_iterator_of_orbit<Map_,B1,B2,B3,B4,B5,B6,B7,B8,B9>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  //****************************************************************************
+  template<typename Map_>
+  class CMap_dart_const_iterator_basic_of_all:
+    public CMap_dart_iterator_basic_of_all<Map_,true>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_all<Map_,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_all(const Map_& amap, 
+                                          Dart_const_handle adart):
+      Base(amap,adart)
+    {}                                         
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_all(const Map_& amap,
+                                          Dart_const_handle adart,
+                                          size_type /*amark*/):
+      Base(amap,adart)
+    {}                                                         
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_all
+    (const CMap_dart_iterator_basic_of_all<Map_,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension>
+  class CMap_dart_const_iterator_basic_of_cell:
+    public CMap_dart_iterator_basic_of_cell<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_cell(const Map_& amap, 
+                                           Dart_const_handle adart):
+      Base(amap,adart)                               
+    {}                                                         
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_cell(const Map_& amap, 
+                                           Dart_const_handle adart,
+                                           size_type amark):
+      Base(amap,adart,amark)                               
+    {}                                                         
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_cell
+    (const CMap_dart_iterator_basic_of_cell<Map_,i,d,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_, int i, int d=Map_::dimension>
+  class CMap_dart_const_iterator_of_cell: 
+    public CMap_dart_iterator_of_cell<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_of_cell<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_of_cell(const Map_& amap, 
+                                     Dart_const_handle adart):
+      Base(amap,adart)                               
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_of_cell
+    (const CMap_dart_iterator_of_cell<Map_,i,d,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}                                       
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension>
+  class CMap_dart_const_iterator_basic_of_involution:
+    public CMap_dart_iterator_basic_of_involution<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
+                                                 Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /* Main constructor. */
+    CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
+                                                 Dart_const_handle adart,
+                                                 size_type amark):
+      Base(amap,adart,amark)
+    {}
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_involution
+    (const CMap_dart_iterator_basic_of_involution<Map_,i,d,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart(), it.mmark_number)
+    {}                                        
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension>
+  class CMap_dart_const_iterator_of_involution:
+    public CMap_dart_iterator_of_involution<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_of_involution<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_of_involution(const Map_& amap, 
+                                           Dart_const_handle adart):
+      Base(amap,adart)
+    {}                                                         
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_of_involution
+    (const CMap_dart_iterator_of_involution<Map_,i,d,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension>
+  class CMap_dart_const_iterator_basic_of_involution_inv:
+    public CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+    typedef typename Map_::size_type size_type;
+
+    /* Main constructor. */
+    CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, 
+                                                     Dart_const_handle adart):
+      Base(amap,adart)
+    {}
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, 
+                                                     Dart_const_handle adart,
+                                                     size_type amark):
+      Base(amap,adart,amark)
+    {}                                                         
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_basic_of_involution_inv
+    (const CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,false>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart(), it.mmark_number)
+    {}                                        
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension>
+  class CMap_dart_const_iterator_of_involution_inv:
+    public CMap_dart_iterator_of_involution_inv<Map_,i,d,true>
+  {
+  public:
+    typedef CMap_dart_iterator_of_involution_inv<Map_,i,d,true> Base;
+    typedef typename Map_::Dart_const_handle Dart_const_handle;
+
+    /* Main constructor. */                                       
+    CMap_dart_const_iterator_of_involution_inv(const Map_& amap, 
+                                               Dart_const_handle adart):
+      Base(amap,adart)
+    {}                                                         
+    /// Constructor from non const version.
+    CMap_dart_const_iterator_of_involution_inv
+    (const CMap_dart_iterator_of_involution_inv<Map_,i,d>& it):
+      Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
+           it.get_first_dart())
+    {}
+  };
+  //****************************************************************************
+} // namespace CGAL
+//******************************************************************************
+#endif // CGAL_DART_CONST_ITERATORS_HH
+//******************************************************************************
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Dart_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Dart_iterators.h
new file mode 100644
index 0000000..d020bb5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Dart_iterators.h
@@ -0,0 +1,2770 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_DART_ITERATORS_HH
+#define CGAL_DART_ITERATORS_HH 1
+
+#include <CGAL/Combinatorial_map_iterators_base.h>
+
+namespace CGAL {
+
+  /** @file Dart_iterators.h
+   * Definition of dart iterators. There are 9 iterators:
+   * - CMap_dart_iterator_basic_of_orbit<Map,Beta...>
+   * - CMap_dart_iterator_basic_of_cell<Map,i,d>
+   * - CMap_dart_iterator_basic_of_all
+   * - CMap_dart_iterator_basic_of_involution<Map,i,d>
+   * - CMap_dart_iterator_basic_of_involution_inv<Map,i,d>
+   * - CMap_dart_iterator_of_orbit<Map,Beta...>
+   * - CMap_dart_iterator_of_cell<Map,i,d>
+   * - CMap_dart_iterator_of_involution<Map,i,d>
+   * - CMap_dart_iterator_of_involution_inv<Map,i,d>
+   * but many specializations to optimize specific cases.
+   *
+   */
+  //****************************************************************************
+  //**********************BASIC ITERATORS***************************************
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_orbit<Map, Beta...>: to iterate
+   * on the darts of the orbit <Beta...>
+   */
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template<typename Map,bool Const,int... Beta>
+  class CMap_dart_iterator_basic_of_orbit_generic;
+#else
+  template <typename Map,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
+            int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_iterator_basic_of_orbit_generic;
+
+  template <typename Map,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
+            int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  struct Get_CMap_dart_iterator_basic_of_orbit;
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
+           int B7,int B8,int B9>
+  struct Get_CMap_dart_iterator_basic_of_orbit
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,
+                                                      B5,B6,B7,B8,B9> type;
+  };
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
+           int B7,int B8>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,B4,B5,B6,B7,B8,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,B5,
+                                                      B6,B7,B8> type;
+  };
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
+           int B7>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,B4,B5,B6,B7,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,
+                                                      B1,B2,B3,B4,B5,
+                                                      B6,B7> type;
+  };
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5,int B6>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,B4,B5,B6,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,B4,
+                                                      B5,B6> type;
+  };
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4,int B5>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,B4,B5,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,B1,B2,B3,B4,
+                                                      B5,Const> type;
+  };
+
+  template<typename Map,bool Const,int B1,int B2,int B3,int B4>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,B4,-1,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3,
+                                                      B4> type;
+  };
+
+  template<typename Map, int B1,int B2,int B3,bool Const>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,B3,-1,-1,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2,B3> type;
+  };
+
+  template<typename Map, int B1,int B2,bool Const>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,B2,-1,-1,-1,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1,B2> type;
+  };
+
+  template<typename Map, int B1,bool Const>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               B1,-1,-1,-1,-1,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const,B1> type;
+  };
+
+  template<typename Map,bool Const>
+  struct Get_CMap_dart_iterator_basic_of_orbit<Map,Const,
+                                               -1,-1,-1,-1,-1,-1,-1,-1,-1>
+  {
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,Const> type;
+  };
+#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  //****************************************************************************
+  // Case when Beta... is empty: iterator of self
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
+                                              size_type /*amark*/):
+      Base(amap, adart)
+    {}
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      this->set_current_dart(this->mmap->null_handle);
+      this->mprev_op = OP_END;
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_orbit<Map,0>: iterate onto orbit <beta0>.
+   * Begin by turning around the facet with beta0, then turn if
+   * necessary in the second direction by using beta1.
+   */
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
+                                              size_type /*amark*/):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Assignment operator.
+    Self& operator= (const Self & aiterator)
+    {
+      if (this != &aiterator)
+      {
+        Base::operator=(aiterator);
+        mfirst_dir = aiterator.mfirst_dir;
+      }
+      return *this;
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mfirst_dir = true;
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+
+      if (mfirst_dir && this->mmap->is_free(*this, 0))
+      {
+        this->set_current_dart(this->mfirst_dart);
+        mfirst_dir = false;
+        this->mprev_op = OP_JUMP;
+      }
+      else
+      {
+        this->mprev_op = OP_BETAI;
+      }
+
+      if (mfirst_dir)
+      {
+        CGAL_assertion(!this->mmap->is_free(*this, 0));
+        this->set_current_dart(this->mmap->beta(*this, 0));
+
+        if ((*this)==this->mfirst_dart)
+        {
+          this->set_current_dart(this->mmap->null_handle);
+          this->mprev_op = OP_END;
+        }
+      }
+      else
+      {
+        if (this->mmap->is_free(*this, 1))
+        {
+          this->set_current_dart(this->mmap->null_handle);
+          this->mprev_op = OP_END;
+        }
+        else
+        {
+          this->set_current_dart(this->mmap->beta(*this, 1));
+          this->mprev_op = OP_BETAI_INV;
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Boolean: true iff we turn in the first direction (i.e. using beta0).
+    bool mfirst_dir;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_orbit<Map,1>: iterate onto orbit <beta1>.
+   * Begin by turning around the facet with beta1, then turn if
+   * necessary in the second direction by using beta0.
+   */
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
+                                              size_type /*amark*/):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mfirst_dir = true;
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+
+      if (mfirst_dir && this->mmap->is_free(*this, 1))
+      {
+        this->set_current_dart(this->mfirst_dart);
+        mfirst_dir = false;
+        this->mprev_op = OP_JUMP;
+      }
+      else
+      {
+        this->mprev_op = OP_BETAI;
+      }
+
+      if (mfirst_dir)
+      {
+        CGAL_assertion(!this->mmap->is_free(*this, 1));
+        this->set_current_dart(this->mmap->beta(*this, 1));
+
+        if ((*this)==this->mfirst_dart)
+        {
+          this->set_current_dart(this->mmap->null_handle);
+          this->mprev_op = OP_END;
+        }
+      }
+      else
+      {
+        if (this->mmap->is_free(*this, 0))
+        {
+          this->set_current_dart(this->mmap->null_handle);
+          this->mprev_op = OP_END;
+        }
+        else
+        {
+          this->set_current_dart(this->mmap->beta(*this, 0));
+          this->mprev_op = OP_BETAI_INV;
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Boolean: true iff we turn in the first direction (i.e. using beta0).
+    bool mfirst_dir;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_orbit<Bi>: to iterate
+   * on the darts of the orbit <Bi> (2<=Bi<=dimension)
+   * (not for beta0 and beta1 which are special cases).
+   */
+  template <typename Map_,bool Const,int Bi>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); }
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
+                                              size_type /*amark*/):
+      Base(amap, adart)
+    { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Bi))
+      {
+        this->set_current_dart(this->mmap->null_handle);
+        this->mprev_op = OP_END;
+      }
+      else
+      {
+        this->set_current_dart(this->mmap->beta(*this, Bi));
+        this->mprev_op = OP_BETAI;
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * This general case if for Bi>1 and delta>1.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const,int Bi,unsigned int delta>
+  class CMap_dart_iterator_basic_of_two_beta :
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,delta> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    CGAL_static_assertion( Bi>1 && delta>1 && Bi+delta<=Map::dimension );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mcurdart(0)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
+                                         size_type /*amark*/):
+      Base(amap, adart),
+      mcurdart(0)
+    {}
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mcurdart=0;
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+
+      if (mcurdart==0)
+      {
+        if (!this->mmap->is_free(*this, Bi))
+        {
+          this->set_current_dart(this->mmap->beta(*this, Bi));
+          this->mprev_op = OP_BETAI;
+          mcurdart=1;
+        }
+        else
+        {
+          if (!this->mmap->is_free(*this, Bi+delta))
+          {
+            this->set_current_dart(this->mmap->beta(*this, Bi+delta));
+            this->mprev_op = OP_BETAJ;
+            mcurdart=3;
+          }
+          else
+          {
+            this->mprev_op = OP_END;
+            this->set_current_dart(this->mmap->null_handle);
+          }
+        }
+      }
+      else if (mcurdart==1)
+      {
+        if (!this->mmap->is_free(*this, Bi+delta))
+        {
+          this->set_current_dart(this->mmap->beta(*this, Bi+delta));
+          this->mprev_op = OP_BETAJ;
+          mcurdart=2;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+          this->set_current_dart(this->mmap->null_handle);
+        }
+      }
+      else if (mcurdart==2)
+      {
+        CGAL_assertion(!this->mmap->is_free(*this, Bi));
+        this->set_current_dart(this->mmap->beta(*this, Bi));
+        this->mprev_op = OP_BETAI;
+        mcurdart=3;
+      }
+      else 
+      {
+        CGAL_assertion (mcurdart==3);
+        this->mprev_op = OP_END;
+        this->set_current_dart(this->mmap->null_handle);
+      }
+
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  private:
+    /// mcurdart: number of the current dart (0,1,2 or 3).
+    char mcurdart;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * Special case for Bi==0 and delta==2.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,2> :
+    public CMap_extend_iterator
+  <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>, 2>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,2> Self;
+    typedef CMap_extend_iterator
+    <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>, 2> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    CGAL_static_assertion( 2<=Map::dimension );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
+                                         size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * Special case for Bi==1 and delta==1.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,1> :
+    public CMap_extend_iterator
+  <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>, 2>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,1> Self;
+    typedef CMap_extend_iterator
+    <Map_, CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>, 2> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    CGAL_static_assertion( 2<=Map::dimension );
+    
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
+                                         size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * Special case for Bi==0 and delta>2.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const, unsigned int delta>
+  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,delta> :
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,0,delta> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+    
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    CGAL_static_assertion( delta>1 && delta<=Map::dimension );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mit(amap, adart),
+      mexist_betaj(false),
+      mprev_betaj(false),
+      mfirst_border(true)
+    { if (adart!=this->mmap->null_handle)
+        mexist_betaj=!this->mmap->is_free(adart, delta); }
+    
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
+                                         size_type /*amark*/):
+      Base(amap, adart),
+      mit(amap, adart),
+      mexist_betaj(false),
+      mprev_betaj(false),
+      mfirst_border(true)
+    { if (adart!=this->mmap->null_handle)
+        mexist_betaj=!this->mmap->is_free(adart, delta); }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      if (mexist_betaj && !mprev_betaj)
+      {
+        mprev_betaj = true;
+        mfirst_border = ! mfirst_border;
+        this->set_current_dart(this->mmap->beta(*this, delta));
+        this->mprev_op = OP_BETAJ;
+      }
+      else
+      {
+        mprev_betaj = false;
+        ++mit;
+        this->mprev_op = mit.prev_operation();
+        if ( !mit.cont() ) 
+          this->set_current_dart(this->mmap->null_handle);
+        else
+        {          
+          if ( !mfirst_border ) 
+            this->set_current_dart(mit->beta(delta));
+          else
+            this->set_current_dart(mit);
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mit.rewind();
+      mprev_betaj   = false;
+      mfirst_border = true;
+    }
+
+  private:
+    /// Iterator on beta0
+    CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> mit;
+
+    /// Boolean: true iff there are two half facets.
+    bool mexist_betaj;
+
+    /// Boolean: true iff the last ++ used betaj.
+    bool mprev_betaj;
+
+    /// Boolean: true iff the current dart is on the first border.
+    bool mfirst_border;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * Special case for Bi==1 and delta>1.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const, unsigned int delta>
+  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,delta> :
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,1,delta> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+    
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    CGAL_static_assertion( delta>1 && delta+1<=Map::dimension );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):
+      Base(amap, adart),
+      mit(amap, adart),
+      mexist_betaj(false),
+      mprev_betaj(false),
+      mfirst_border(true)
+    { if (adart!=this->mmap->null_handle)
+        mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
+    
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, 
+                                         size_type /*amark*/):
+      Base(amap, adart),
+      mit(amap, adart),
+      mexist_betaj(false),
+      mprev_betaj(false),
+      mfirst_border(true)
+    { if (adart!=this->mmap->null_handle)
+        mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      if (mexist_betaj && !mprev_betaj)
+      {
+        mprev_betaj = true;
+        mfirst_border = ! mfirst_border;
+        this->set_current_dart(this->mmap->beta(*this, 1+delta));
+        this->mprev_op = OP_BETAJ;
+      }
+      else
+      {
+        mprev_betaj = false;
+        ++mit;
+        this->mprev_op = mit.prev_operation();
+        if ( !mit.cont() ) 
+          this->set_current_dart(this->mmap->null_handle);
+        else
+        {          
+          if ( !mfirst_border ) 
+            this->set_current_dart(this->mmap->beta(mit, 1+delta));
+          else
+            this->set_current_dart(mit);
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mit.rewind();
+      mprev_betaj   = false;
+      mfirst_border = true;
+    }
+
+  private:
+    /// Iterator on beta1
+    CMap_dart_iterator_basic_of_orbit_generic<Map_,Const, 1> mit;
+
+    /// Boolean: true iff there are two half facets.
+    bool mexist_betaj;
+
+    /// Boolean: true iff the last ++ used betaj.
+    bool mprev_betaj;
+
+    /// Boolean: true iff the current dart is on the first border.
+    bool mfirst_border;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_two_beta<Bi,delta>: to iterate
+   * on the darts of the orbit <Bi,Bi+delta>: Bi<Bi+delta<=dimension.
+   * Special case for Bi>1 and delta==1.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_two_beta.
+   */
+  template <typename Map_,bool Const, int Bi>
+  class CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,1> :
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,1> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+    
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart):    
+      Base(amap, adart),
+      mfirst_dir(true),
+      mnext_try_betai(true)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
+                                         size_type /*amark*/):
+      Base(amap, adart),
+      mfirst_dir(true),
+      mnext_try_betai(true)
+    {}
+    
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mfirst_dir = true;
+      mnext_try_betai   = true;
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+      
+      if (mfirst_dir)
+      {
+        if (mnext_try_betai)
+        {
+          if (this->mmap->is_free(*this, Bi))
+          {
+            mfirst_dir = false;
+            if (this->mmap->is_free(this->mfirst_dart, Bi+1))
+            {
+              this->mprev_op = OP_END;
+              this->set_current_dart(this->mmap->null_handle);
+            }
+            else
+            {
+              this->set_current_dart(this->mmap->beta(this->mfirst_dart, Bi+1));
+              this->mprev_op = OP_JUMP;
+            }
+          }
+          else
+          {
+            this->set_current_dart(this->mmap->beta(*this, Bi));
+            mnext_try_betai = false;
+            this->mprev_op = OP_BETAI;
+          }
+        }
+        else
+        {
+          if (this->mmap->is_free(*this, Bi+1))
+          {
+            mfirst_dir = false;
+            if (this->mmap->is_free(this->mfirst_dart, Bi+1))
+            {
+              this->mprev_op = OP_END;
+              this->set_current_dart(this->mmap->null_handle);
+            }
+            else
+            {
+              this->set_current_dart(this->mmap->beta(this->mfirst_dart, Bi+1));
+              mnext_try_betai = true;
+              this->mprev_op = OP_JUMP;
+            }
+          }
+          else
+          {
+            this->set_current_dart(this->mmap->beta(*this, Bi+1));
+            if ((*this)==this->mfirst_dart)
+            {
+              this->mprev_op = OP_END;
+              this->set_current_dart(this->mmap->null_handle);
+            }
+            else
+            {
+              mnext_try_betai = true;
+              this->mprev_op = OP_BETAJ;
+            }
+          }
+        }
+      }
+      else
+      {
+        if (mnext_try_betai)
+        {
+          if (this->mmap->is_free(*this, Bi))
+          {
+            this->mprev_op = OP_END;
+            this->set_current_dart(this->mmap->null_handle);
+          }
+          else
+          {
+            this->set_current_dart(this->mmap->beta(*this, Bi));
+            mnext_try_betai = false;
+            this->mprev_op = OP_BETAI;
+          }
+        }
+        else
+        {
+          if (this->mmap->is_free(*this, Bi+1))
+          {
+            this->mprev_op = OP_END;
+            this->set_current_dart(this->mmap->null_handle);
+          }
+          else
+          {
+            this->set_current_dart(this->mmap->beta(*this, Bi+1));
+            mnext_try_betai = true;
+            this->mprev_op = OP_BETAJ;
+          }
+        }
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  private:
+    /// Boolean: true iff we turn in the first direction (i.e. using betai).
+    bool mfirst_dir;
+
+    /// Boolean: true iff the next ++ must use betai.
+    bool mnext_try_betai;
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_orbit<Bi,Bj>: to iterate
+   * on the darts of the orbit <Bi,Bj>: Bi<Bj<=dimension.
+   * Basic classes do not guaranty correct marks (i.e. do not unmark darts in
+   * the destructor, possible problem with the rewind). If you are not sure,
+   * use CMap_dart_iterator_basic_of_orbit.
+   */
+  template <typename Map_,bool Const,int Bi,int Bj>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj>: 
+    public CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,Bj-Bi>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj> Self;
+    typedef CMap_dart_iterator_basic_of_two_beta<Map_,Const,Bi,Bj-Bi> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef typename Base::Use_mark Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart) :
+      Base(amap, adart)
+    {}    
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
+                                              size_type amark):
+      Base(amap, adart, amark)
+    {}    
+  };
+  //****************************************************************************
+  /* Generic nD version. 
+   */
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template <typename Map_,bool Const,int Bi,int Bj, int Bk, int... Beta>
+  class CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,Bi,Bj,Bk,Beta...>: 
+    public CMap_extend_iterator<Map_,
+                                CMap_dart_iterator_basic_of_orbit_generic
+                                <Map_,Const,Bi,Bj,Beta...>,
+                                Bk>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit_generic
+    <Map_,Const,Bi,Bj,Bk,Beta...> Self;
+    typedef CMap_extend_iterator<Map_,
+                                 CMap_dart_iterator_basic_of_orbit_generic
+                                 <Map_,Const,Bi,Bj,Beta...>,
+                                 Bk> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
+                                              size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+#else //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template <typename Map_,bool Const,int B1,int B2,int B3,int B4,int B5,int B6,
+            int B7,int B8,int B9>
+  class CMap_dart_iterator_basic_of_orbit_generic: 
+    public CMap_extend_iterator
+  <Map_,typename Get_CMap_dart_iterator_basic_of_orbit
+   <Map_,Const,B1,B2,B4,B5,B6,B7,B8,B9>::type, B3>
+  {
+  public:
+    typedef typename Get_CMap_dart_iterator_basic_of_orbit
+    <Map_,Const,B1,B2,B3,B4,B5,B6,B7,B8,B9>::type Self;
+
+    typedef CMap_extend_iterator
+    <Map_,typename Get_CMap_dart_iterator_basic_of_orbit
+     <Map_,Const,B1,B2,B4,B5,B6,B7,B8,B9>::type, B3> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, 
+                                              size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  //****************************************************************************
+  // TODO? we can optimize the iterators<Bi,Bj,Bk> when
+  // 1<Bi and Bi+2<=Bj and Bj+2<=Bk but there is no real interest...
+  //****************************************************************************
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template<typename Map,int...Beta>
+  class CMap_dart_iterator_basic_of_orbit: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map,false,Beta...>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit<Map,Beta...> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map,false,Beta...> Base;
+
+    typedef typename Map::Dart_handle Dart_handle;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
+      Base(amap,adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark):
+      Base(amap,adart,amark)
+    {}
+  };
+#else
+  //****************************************************************************
+  template<typename Map,int B1=-1,int B2=-1,int B3=-1,int B4=-1,int B5=-1, 
+           int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_iterator_basic_of_orbit: 
+    public Get_CMap_dart_iterator_basic_of_orbit<Map,false,B1,B2,B3,B4,
+                                                 B5,B6,B7,B8,B9>::type
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_orbit<Map,B1,B2,B3,B4,B5,B6,B7,B8,B9> 
+    Self;
+    typedef typename Get_CMap_dart_iterator_basic_of_orbit
+    <Map,false,B1,B2,B3,B4,B5,B6,B7,B8,B9>::type Base;
+
+    typedef typename Map::Dart_handle Dart_handle;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
+      Base(amap,adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark):
+      Base(amap,adart,amark)
+    {}
+  };
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_all: to iterate onto all the
+   * darts of the map.
+   */
+  template <typename Map_,bool Const=false>
+  class CMap_dart_iterator_basic_of_all: public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_all Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_all(Map& amap):
+      Base(amap, amap.darts().begin())
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_all(Map& amap, size_type /*amark*/):
+      Base(amap, amap.darts().begin())
+    {}
+
+    /// Constructor with a dart in parameter (for end iterator).
+    CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+    /// Constructor with a dart in parameter (for end iterator).
+    CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart,
+                                    size_type /*amark*/):
+      Base(amap, adart)
+    {}
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+
+      Base::operator++();
+      if ( (*this) != this->mmap->darts().end())
+      { this->mprev_op = OP_POP; }
+      else
+      {
+        this->set_current_dart(this->mmap->null_handle);
+        this->mprev_op = OP_END;
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+  };
+  //****************************************************************************
+  //***************************CELL*ITERATORS***********************************
+  //****************************************************************************
+  //****************************************************************************
+  // i-Cell iterator in combinatorial map of dimension d, i>1
+  // i<=Map::dimension+1 (for i==Map::dimension+1, iterate on the connected
+  // component)
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_basic_of_cell: public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    CGAL_static_assertion( i>1 && i<=Map::dimension+1 );
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    {
+      if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark_null_dart(mmark_number);
+        this->mmap->mark(adart, mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark(*this, mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+      Dart_handle nd = this->mmap->null_handle;
+      
+      for ( unsigned int k=0; k<i; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+      for ( unsigned int k=i+1; k<=d; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // i-Cell iterator in combinatorial map of dimension d, i==1.
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,1,d,Const>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,1,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    {
+      if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark((*this), mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+      
+      for ( unsigned int k=2; k<=d; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          CGAL_assertion(nd!=this->mmap->null_dart_handle);
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // 0-Cell iterator in combinatorial map of dimension d
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,0,d,Const>:
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,0,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    { if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }      
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark((*this), mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+
+      for ( unsigned int k=2; k<=d; ++k )
+      {
+        if ( this->is_unmarked2((*this), 0, k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, 0, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETA0I;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, 0, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, 0, k), mmark_number);
+        }
+        if ( this->is_unmarked2((*this), k, 1, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k, 1);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI1;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k, 1));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k, 1), mmark_number);
+        }
+        for ( unsigned int l=k+1; l<=d; ++l )
+        {
+          if ( this->is_unmarked2((*this), k, l, mmark_number) )
+          {
+            if (nd == this->mmap->null_handle)
+            {
+              nd = this->mmap->beta(*this, k, l);
+              CGAL_assertion(nd!=this->mmap->null_dart_handle);
+              this->mprev_op = OP_BETAIJ;
+            }
+            else
+            {
+              mto_treat.push(this->mmap->beta(*this, k, l));
+            }
+            this->mmap->mark(this->mmap->beta(*this, k, l), mmark_number);
+          }
+          if ( this->is_unmarked2((*this), l, k, mmark_number) )
+          {
+            if (nd == this->mmap->null_handle)
+            {
+              nd = this->mmap->beta(*this, l, k);
+              CGAL_assertion(nd!=this->mmap->null_dart_handle);
+              this->mprev_op = OP_BETAJI;
+            }
+            else
+            {
+              mto_treat.push(this->mmap->beta(*this, l, k));
+            }
+            this->mmap->mark(this->mmap->beta(*this, l, k), mmark_number);
+          }
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          CGAL_assertion(nd!=this->mmap->null_dart_handle);
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+   
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // Specialization for edge in 2D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,1,2,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,1,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart):
+      Base(amap, adart)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type /*amark*/):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for facet in 2D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,2,2,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,2,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart):
+      Base(amap, adart)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type /*amark*/):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for cc in 2D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,3,2,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,3,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for edge in 3D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,1,3,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2,3>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,1,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,2,3> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart):
+      Base(amap, adart)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type /*amark*/): Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for facet in 3D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,2,3,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,3>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,2,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,3> Base;
+    
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart):
+      Base(amap, adart)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type /*amark*/): Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for volume in 3D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,3,3,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,3,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+  //****************************************************************************
+  // Specialization for cc in 3D 
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,4,3,Const>: 
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2,3>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,4,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1,2,3> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap,
+                                     Dart_handle adart,
+                                     size_type amark):
+      Base(amap, adart, amark)
+    {}
+  };
+  //****************************************************************************
+  /* Class CMap_dart_iterator_basic_of_cell<Map,0,2>: to iterate onto the
+   * darts of the orbit vertex in 2D.
+   */
+  template <typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_cell<Map_,0,2,Const>: 
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,0,2,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap, 
+                                     Dart_handle adart):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_cell(Map& amap, 
+                                     Dart_handle adart,
+                                     size_type /*amark*/):
+      Base(amap, adart),
+      mfirst_dir(true)
+    {}
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      Base::rewind();
+      mfirst_dir = true;
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(this->cont());
+
+      if (mfirst_dir)
+      {
+        this->set_current_dart(this->mmap->beta(*this, 0, 2));
+        if ((*this)==this->mmap->null_dart_handle)
+        {
+          mfirst_dir = false;
+          this->set_current_dart(this->mmap->beta(this->mfirst_dart, 2, 1));
+          if ((*this)==this->mmap->null_dart_handle)
+          {
+            this->mprev_op = OP_END;
+            this->set_current_dart(this->mmap->null_handle);
+          }
+          else
+          {
+            this->mprev_op = OP_BETAI1;
+          }
+        }
+        else
+        {
+          if ((*this)==this->mfirst_dart)
+          {
+            this->mprev_op = OP_END;
+            this->set_current_dart(this->mmap->null_handle);
+          }
+          else
+            this->mprev_op = OP_BETA0I;
+        }
+      }
+      else
+      {
+        this->set_current_dart(this->mmap->beta(*this, 2, 1));
+        if ((*this) == this->mmap->null_dart_handle)
+        {
+          this->mprev_op = OP_END;
+          this->set_current_dart(this->mmap->null_handle);
+        }
+        else
+          this->mprev_op = OP_BETA21;
+      }
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Boolean: true iff we turn in the first direction (i.e. using beta02).
+    bool mfirst_dir;
+  };
+  //****************************************************************************
+  //*************************ITERATORS*NON*BASIC********************************
+  //****************************************************************************
+  //****************************************************************************
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template<typename Map_,bool Const,int...Beta>
+  class CMap_dart_iterator_of_orbit_generic: 
+    public  CMap_non_basic_iterator<Map_, 
+                                    CMap_dart_iterator_basic_of_orbit_generic
+                                    <Map_,Const,Beta...> >
+  {
+  public:
+    typedef CMap_dart_iterator_of_orbit_generic<Map_,Const,Beta...> Self;
+    typedef CMap_non_basic_iterator<Map_,
+                                    CMap_dart_iterator_basic_of_orbit_generic
+                                    <Map_,Const,Beta...> > Base;
+
+    typedef typename Base::Map Map;
+    typedef typename Base::Dart_handle Dart_handle;
+
+    /// Main constructor.
+    CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1):
+      Base(amap, adart1)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,unsigned int...Beta>
+  class CMap_dart_iterator_of_orbit: 
+    public CMap_dart_iterator_of_orbit_generic<Map_,false,Beta...>
+  {
+  public:
+    typedef CMap_dart_iterator_of_orbit<Map_,Beta...> Self;
+    typedef CMap_dart_iterator_of_orbit_generic<Map_,false,Beta...> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    
+    /// Main constructor.
+    CMap_dart_iterator_of_orbit(Map_& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+#else
+  //****************************************************************************
+  template<typename Map_,bool Const,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
+           int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_iterator_of_orbit_generic:
+    public CMap_non_basic_iterator<Map_,
+                                   typename 
+                                   Get_CMap_dart_iterator_basic_of_orbit
+                                   <Map_,Const,B1,B2,B3,B4,B5,
+                                    B6,B7,B8,B9>::type>
+  {
+  public:
+    typedef CMap_dart_iterator_of_orbit_generic<Map_,Const,B1,B2,B3,B4,B5,
+                                                B6,B7,B8,B9> Self;
+    typedef CMap_non_basic_iterator<Map_,
+                                    typename 
+                                    Get_CMap_dart_iterator_basic_of_orbit
+                                    <Map_,Const,B1,B2,B3,B4,B5,
+                                     B6,B7,B8,B9>::type> Base;
+
+    typedef typename Base::Map Map;
+    typedef typename Base::Dart_handle Dart_handle;
+
+    /// Main constructor.
+    CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1):
+      Base(amap, adart1)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map,int B1=-1,int B2=-1,int B3=-1,int B4=-1,
+           int B5=-1,int B6=-1,int B7=-1,int B8=-1,int B9=-1>
+  class CMap_dart_iterator_of_orbit: 
+    public CMap_dart_iterator_of_orbit_generic<Map,false,
+                                               B1,B2,B3,B4,B5,B6,B7,B8,B9>
+  {
+  public:
+    typedef CMap_dart_iterator_of_orbit<Map,B1,B2,B3,B4,B5,B6,B7,B8,B9> Self;
+    typedef CMap_dart_iterator_of_orbit_generic<Map,false,
+                                                B1,B2,B3,B4,B5,B6,B7,B8,B9> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    
+    /// Main constructor.
+    CMap_dart_iterator_of_orbit(Map& amap, Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_of_cell: 
+    public CMap_non_basic_iterator<Map_,CMap_dart_iterator_basic_of_cell
+                                   <Map_,i,d,Const> >
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,Const> Self;
+    typedef CMap_non_basic_iterator<Map_,
+                                    CMap_dart_iterator_basic_of_cell
+                                    <Map_,i,d,Const> > Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    
+    /// Main constructor.
+    CMap_dart_iterator_of_cell(Map& amap, Dart_handle adart1):
+      Base(amap, adart1)
+    {}
+  };
+  //****************************************************************************
+  //********************ITERATOR*INVOLUTION*************************************
+  //****************************************************************************
+  // i-involution iterator in combinatorial map of dimension d, 
+  // 2<i<=Map::dimension. Iterate by using all beta between 0 and d, 
+  // except beta(i-1), betai and beta(i+1)
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_basic_of_involution;
+
+  template<typename Map_,int i,int d,bool Const>
+  class CMap_dart_iterator_basic_of_involution: 
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,i,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+    
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    {
+      CGAL_assertion( d>=3 && d<=Map::dimension );
+      CGAL_assertion( i>=3 && i<=Map::dimension );
+      if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark((*this), mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+
+      for ( int k=0; k<2; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      for ( int k=2; k<=d; ++k )
+      {
+        if ( k!=i-1 && k!=i && k!=i+1 && 
+             this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // i-involution iterator in combinatorial map of dimension d, 
+  // 2<i<=Map::dimension. Iterate by using all beta between 0 and d, 
+  // except beta(i-1), betai and beta(i+1), by inversing order between
+  // beta0 and beta1
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_basic_of_involution_inv: 
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    {
+      CGAL_assertion( i>=3 && i<=Map::dimension );
+      if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark((*this), mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+
+      for ( int k=1; k>=0; --k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+      for ( int k=2; k<=d; ++k )
+      {
+        if ( k!=i-1 && k!=i && k!=i+1 && 
+             this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension d.
+  // Iterate by using all beta between 3 and d.
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,1,d,Const>:  
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,1,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    { if (adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark_null_dart(mmark_number);
+      this->mmap->mark((*this), mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+
+      for ( unsigned int k=3; k<=d; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension d.
+  // Iterate by using all beta between 3 and d.
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,d,Const>:  
+    public CMap_dart_iterator_basic_of_involution<Map_,1,d,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,d,Const> Self;
+    typedef CMap_dart_iterator_basic_of_involution<Map_,1,d,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type amark):
+      Base(amap, adart,amark)
+    {}
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension d.
+  // Iterate by using all beta between 4 and d.
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,2,d,Const>:  
+    public CMap_dart_iterator<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,2,d,Const> Self;
+    typedef CMap_dart_iterator<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type amark):
+      Base(amap, adart),
+      mmark_number(amark)
+    { if ( adart!=this->mmap->null_handle)
+      {
+        this->mmap->mark(adart, mmark_number);
+        this->mmap->mark_null_dart(mmark_number);
+      }
+    }
+
+    /// Rewind of the iterator to its beginning.
+    void rewind()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      Base::rewind();
+      mto_treat = std::queue<Dart_handle>();
+      this->mmap->mark((*this), mmark_number);
+      this->mmap->mark_null_dart(mmark_number);
+    }
+
+    /// Prefix ++ operator.
+    Self& operator++()
+    {
+      CGAL_assertion(mmark_number != Map::INVALID_MARK);
+      CGAL_assertion(this->cont());
+
+      Dart_handle nd = this->mmap->null_handle;
+
+      for ( unsigned int k=4; k<=d; ++k )
+      {
+        if ( this->is_unmarked((*this), k, mmark_number) )
+        {
+          if (nd == this->mmap->null_handle)
+          {
+            nd = this->mmap->beta(*this, k);
+            CGAL_assertion(nd!=this->mmap->null_dart_handle);
+            this->mprev_op = OP_BETAI;
+          }
+          else
+          {
+            mto_treat.push(this->mmap->beta(*this, k));
+          }
+          this->mmap->mark(this->mmap->beta(*this, k), mmark_number);
+        }
+      }
+
+      if (nd == this->mmap->null_handle)
+      {
+        if (!mto_treat.empty())
+        {
+          nd = mto_treat.front();
+          mto_treat.pop();
+          this->mprev_op = OP_POP;
+        }
+        else
+        {
+          this->mprev_op = OP_END;
+        }
+      }
+      
+      this->set_current_dart(nd);
+      return *this;
+    }
+
+    /// Postfix ++ operator.
+    Self operator++(int)
+    { Self res=*this; operator ++(); return res; }
+
+  protected:
+    /// Queue of darts to process.
+    std::queue<Dart_handle> mto_treat;
+
+    /// Index of the used mark.
+    size_type mmark_number;
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension d.
+  // Iterate by using all beta between 4 and d.
+  template<typename Map_,int d,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,d,Const>:  
+    public CMap_dart_iterator_basic_of_involution<Map_,2,d,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,d,Const> Self;
+    typedef CMap_dart_iterator_basic_of_involution<Map_,2,d,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_true Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type amark):
+      Base(amap, adart,amark)
+    {}
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 2.
+  // Empty iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,1,2,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,1,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 2.
+  // self iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,2,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension 2.
+  // self iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,2,2,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,2,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension 2.
+  // self iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,2,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,2,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 3.
+  // Beta3 iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,1,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,1,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+    
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart):
+      Base(amap, adart)
+    {}    
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 3.
+  // Beta3 iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,1,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,1,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,3> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension 3.
+  // Self iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,2,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,2,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type /* amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 2-involution iterator in combinatorial map of dimension 3.
+  // Self iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,2,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,2,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 3.
+  // Beta1 iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution<Map_,3,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution<Map_,3,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,1> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart,
+                                           size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution(Map& amap,
+                                           Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  // 1-involution iterator in combinatorial map of dimension 3.
+  // Beta0 iterator.
+  template<typename Map_,bool Const>
+  class CMap_dart_iterator_basic_of_involution_inv<Map_,3,3,Const>:  
+    public CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0>
+  {
+  public:
+    typedef CMap_dart_iterator_basic_of_involution_inv<Map_,3,3,Const> Self;
+    typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,Const,0> Base;
+
+    typedef typename Base::Dart_handle Dart_handle;
+    typedef typename Base::Map Map;
+    typedef typename Map::size_type size_type;
+
+    typedef Tag_false Use_mark;
+
+    /// True iff this iterator is basic
+    typedef Tag_true Basic_iterator;
+
+  public:
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart,
+                                               size_type /*amark*/):
+      Base(amap, adart)
+    {}
+    /// Main constructor.
+    CMap_dart_iterator_basic_of_involution_inv(Map& amap,
+                                               Dart_handle adart):
+      Base(amap, adart)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_of_involution:
+    public CMap_non_basic_iterator<Map_,
+                                   CMap_dart_iterator_basic_of_involution
+                                   <Map_,i,d,Const> >
+  {
+  public:
+    typedef CMap_dart_iterator_of_involution<Map_,i,d,Const> Self;
+    typedef CMap_non_basic_iterator<Map_,
+                                    CMap_dart_iterator_basic_of_involution
+                                    <Map_,i,d,Const> >  Base;
+
+    /// Main constructor.
+    CMap_dart_iterator_of_involution(typename Base::Map& amap, 
+                                     typename Base::Dart_handle adart1):
+      Base(amap, adart1)
+    {}
+  };
+  //****************************************************************************
+  template<typename Map_,int i,int d=Map_::dimension,bool Const=false>
+  class CMap_dart_iterator_of_involution_inv: 
+    public CMap_non_basic_iterator<Map_,
+                                   CMap_dart_iterator_basic_of_involution_inv
+                                   <Map_,i,d,Const> >
+  {
+  public:
+    typedef CMap_dart_iterator_of_involution_inv<Map_,i,d,Const> Self;
+    typedef CMap_non_basic_iterator<Map_,
+                                    CMap_dart_iterator_basic_of_involution_inv
+                                    <Map_,i,d,Const> >  Base;
+
+    /// Main constructor.
+    CMap_dart_iterator_of_involution_inv(typename Base::Map& amap,
+                                         typename Base::Dart_handle adart1):
+      Base(amap, adart1)
+    {}
+  };
+  //****************************************************************************
+} // namespace CGAL
+//******************************************************************************
+#endif // CGAL_DART_ITERATORS_HH
+//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Default.h b/3rdparty/CGAL-4.8/include/CGAL/Default.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Default.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Default.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Default_diagonalize_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Default_diagonalize_traits.h
new file mode 100644
index 0000000..9f50528
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Default_diagonalize_traits.h
@@ -0,0 +1,81 @@
+// Copyright (c) 2015 GeometryFactory (France), All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Simon Giraudot
+
+#ifndef CGAL_DEFAULT_DIAGONALIZE_TRAITS_H
+#define CGAL_DEFAULT_DIAGONALIZE_TRAITS_H
+
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_diagonalize_traits.h>
+#else
+#include <CGAL/Diagonalize_traits.h>
+#endif
+
+
+namespace CGAL {
+
+
+  // Wrapper class designed to automatically use
+  // Eigen_diagonalize_traits if Eigen is available and otherwise use
+  // the fallback Diagonalize_traits class.
+  
+template <typename FT, unsigned int dim = 3>
+class Default_diagonalize_traits{
+
+#ifdef CGAL_EIGEN3_ENABLED
+  typedef Eigen_diagonalize_traits<FT, dim> Base;
+#else
+  typedef Diagonalize_traits<FT, dim> Base;
+#endif
+
+public:
+
+  typedef cpp11::array<FT, dim> Vector;
+  typedef cpp11::array<FT, dim*dim> Matrix;
+  typedef cpp11::array<FT, (dim * (dim+1) / 2)> Covariance_matrix;
+  
+  static bool
+  diagonalize_selfadjoint_covariance_matrix(
+    const Covariance_matrix& cov,
+    Vector& eigenvalues)
+  {
+    return Base::diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues);
+  }
+
+  static bool
+  diagonalize_selfadjoint_covariance_matrix(
+    const Covariance_matrix& cov,
+    Vector& eigenvalues,
+    Matrix& eigenvectors)
+  {
+    return Base::diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors);
+  }
+
+  // Extract the eigenvector associated to the largest eigenvalue
+  static bool
+  extract_largest_eigenvector_of_covariance_matrix (
+    const Covariance_matrix& cov,
+    Vector& normal)
+  {
+    return Base::extract_largest_eigenvector_of_covariance_matrix (cov, normal);
+  }
+};
+
+
+} // namespace CGAL
+
+#endif // CGAL_DEFAULT_DIAGONALIZE_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h
new file mode 100644
index 0000000..3039bd6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h
@@ -0,0 +1,109 @@
+// Copyright (c) 2013  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
+// Copyright (c) 2013 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Gael Guennebaud and Ilker O. Yaz
+
+
+#ifndef CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
+#define CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
+
+#include <Eigen/Eigen>
+#include <Eigen/SVD>
+
+namespace CGAL {
+/// \ingroup PkgSurfaceMeshDeformation
+/// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
+/// The internal computation relies on `Eigen::JacobiSVD<>` solver.
+///
+/// \cgalModels `DeformationClosestRotationTraits_3`
+class Deformation_Eigen_closest_rotation_traits_3{
+public:
+
+  /// \cond SKIP_FROM_MANUAL
+  typedef Eigen::Matrix3d Matrix;
+  typedef Eigen::Vector3d Vector;
+
+  /// Equivalent to `result += w * (v1*v2^t)`
+  void add_scalar_t_vector_t_vector_transpose(Matrix& result, double w, const Vector& v1, const Vector& v2)
+  {
+    result += w * (v1*v2.transpose());
+  }
+
+  /// Equivalent to `result += (w1*m1 + w2*m2) * v`
+  void add__scalar_t_matrix_p_scalar_t_matrix__t_vector(Vector& result, double w1, const Matrix& m1, double w2, const Matrix& m2, const Vector& v)
+  {
+    result += (w1*m1 + w2*m2) * v;
+  }
+
+  /// Equivalent to `result += w * (m1 + m2 + m3) * v`
+  void add_scalar_t_matrix_sum_t_vector(Vector& result, double w, const Matrix& m1, const Matrix& m2, const Matrix& m3, const Vector& v)
+  {
+    result += w * (m1 + m2 + m3) * v;
+  }
+
+  /// Returns the squared norm of `v1 - m*v2`
+  double squared_norm_vector_scalar_vector_subs(const Vector& v1, const Matrix& m, const Vector& v2)
+  {
+    return (v1 - m*v2).squaredNorm();
+  }
+
+  /// Returns an identity matrix
+  Matrix identity_matrix()
+  {
+    return Matrix().setIdentity();
+  }
+
+  /// Returns a zero initialized matrix
+  Matrix zero_matrix()
+  {
+    return Matrix().setZero();
+  }
+
+  /// Returns vector initialized with parameters
+  Vector vector(double x, double y, double z)
+  {
+    return Vector(x, y, z);
+  }
+
+  /// Returns a coefficient of a vector
+  double vector_coordinate(const Vector& v, int i)
+  {
+    return v(i);
+  }
+
+  /// Computes the closest rotation to `m` and places it into `R`
+  void compute_close_rotation(const Matrix& m, Matrix& R)
+  {
+    Eigen::JacobiSVD<Eigen::Matrix3d> solver;
+    solver.compute( m, Eigen::ComputeFullU | Eigen::ComputeFullV );
+
+    const Matrix& u = solver.matrixU(); const Matrix& v = solver.matrixV();
+    R = v * u.transpose();
+
+    if( R.determinant() < 0 ) {
+      Matrix u_copy = u;
+      u_copy.col(2) *= -1;        // singular values sorted ascendingly
+      R = v * u_copy.transpose(); // re-extract rotation matrix
+    }
+  }
+
+  /// \endcond
+
+};
+
+}//namespace CGAL
+#endif // CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h
new file mode 100644
index 0000000..b6c0a6a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2013  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
+// Copyright (c) 2013 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Gael Guennebaud Ilker O. Yaz
+
+
+#ifndef CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
+#define CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
+
+#include <CGAL/Deformation_Eigen_closest_rotation_traits_3.h>
+#include <CGAL/FPU_extension.h>
+#include <CGAL/Profile_counter.h>
+
+namespace CGAL {
+  /// \ingroup PkgSurfaceMeshDeformation
+  /// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink.
+  /// The internal computation relies on a hybrid system using the solvers `Eigen::SelfAdjointEigenSolver<>`
+  /// and `Eigen::JacobiSVD<>` (polar decomposition).
+  ///
+  /// \cgalModels `DeformationClosestRotationTraits_3`
+  class Deformation_Eigen_polar_closest_rotation_traits_3 :
+    public Deformation_Eigen_closest_rotation_traits_3{
+  public:
+
+    /// \cond SKIP_FROM_MANUAL
+
+    /// Computes closest rotation to `m` and places it into `R`
+    void compute_close_rotation(const Matrix& m, Matrix& R)
+    {
+      CGAL_PROFILER(" times closest rotation is computed");
+      bool solved = polar_eigen(m, R);
+
+      if(!solved) {
+        CGAL_PROFILER(" times polar_eigen failed and SVD is called");
+        Deformation_Eigen_closest_rotation_traits_3::compute_close_rotation(m, R);
+      }
+    }
+
+  private:
+    // polar decomposition using Eigen, 5 times faster than SVD
+    bool polar_eigen(const Matrix& A, Matrix& R)
+    {
+      if(A.determinant() < 0)
+      { return false; }
+
+      typedef Matrix::Scalar Scalar;
+
+      const Scalar th = std::sqrt(Eigen::NumTraits<Scalar>::dummy_precision());
+
+      Eigen::SelfAdjointEigenSolver<Matrix> eig;
+      CGAL::feclearexcept(FE_UNDERFLOW);
+      eig.computeDirect(A.transpose()*A);
+      if(CGAL::fetestexcept(FE_UNDERFLOW) || eig.eigenvalues()(0)/eig.eigenvalues()(2)<th)
+      { return false; }
+
+      Vector S = eig.eigenvalues().cwiseSqrt();
+      R = A  * eig.eigenvectors() * S.asDiagonal().inverse()
+        * eig.eigenvectors().transpose();
+
+      if(std::abs(R.squaredNorm()-3.) > th || R.determinant() < 0)
+      { return false; }
+
+      R.transposeInPlace(); // the optimal rotation matrix should be transpose of decomposition result
+      return true;
+    }
+    /// \endcond
+
+  };
+}//namespace CGAL
+#endif // CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Delaunay_d.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_d.h
new file mode 100644
index 0000000..e25e19f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_d.h
@@ -0,0 +1,1072 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+//---------------------------------------------------------------------
+// file generated by notangle from delaunay.lw
+// please debug or modify LEDA web file
+// mails and bugs: Michael.Seel at mpi-sb.mpg.de
+// based on LEDA architecture by S. Naeher, C. Uhrig
+// coding: K. Mehlhorn, M. Seel
+// debugging and templatization: M. Seel
+//---------------------------------------------------------------------
+
+#ifndef CGAL_DELAUNAY_D_H
+#define CGAL_DELAUNAY_D_H
+#define CGAL_DEPRECATED_HEADER "<CGAL/Delaunay_d.h>"
+#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)"
+#include <CGAL/internal/deprecation_warning.h>
+
+/*{\Manpage {Delaunay_d}{R,Lifted_R}{Delaunay Triangulations}{DT}}*/
+/*{\Mdefinition 
+
+An instance |\Mvar| of type |\Mname| is the nearest and furthest
+site Delaunay triangulation of a set |S| of points in some
+$d$-dimensional space. We call |S| the underlying point set and $d$ or
+|dim| the dimension of the underlying space.  We use |dcur| to denote
+the affine dimension of |S|.  The data type supports incremental
+construction of Delaunay triangulations and various kind of query
+operations (in particular, nearest and furthest neighbor queries and
+range queries with spheres and simplices).
+
+A Delaunay triangulation is a simplicial complex. All simplices in
+the Delaunay triangulation have dimension |dcur|.  In the nearest site
+Delaunay triangulation the circumsphere of any simplex in the
+triangulation contains no point of $S$ in its interior. In the
+furthest site Delaunay triangulation the circumsphere of any simplex
+contains no point of $S$ in its exterior. If the points in $S$ are
+co-circular then any triangulation of $S$ is a nearest as well as a
+furthest site Delaunay triangulation of $S$. If the points in $S$ are
+not co-circular then no simplex can be a simplex of both
+triangulations. Accordingly, we view |\Mvar| as either one or two
+collection(s) of simplices. If the points in $S$ are co-circular there
+is just one collection: the set of simplices of some triangulation.
+If the points in $S$ are not co-circular there are two
+collections. One collection consists of the simplices of a nearest
+site Delaunay triangulation and the other collection consists of the
+simplices of a furthest site Delaunay triangulation.
+
+For each simplex of maximal dimension there is a handle of type
+|Simplex_handle| and for each vertex of the triangulation there is a
+handle of type |Vertex_handle|. Each simplex has |1 + dcur| vertices
+indexed from $0$ to |dcur|.  For any simplex $s$ and any index $i$,
+|DT.vertex_of(s,i)| returns the $i$-th vertex of $s$. There may or may
+not be a simplex $t$ opposite to the vertex of $s$ with index $i$.
+The function |DT.opposite_simplex(s,i)| returns $t$ if it exists and
+returns |Simplex_handle()| otherwise. If $t$ exists then $s$ and $t$
+share |dcur| vertices, namely all but the vertex with index $i$ of $s$
+and the vertex with index
+|DT.index_of_vertex_in_opposite_simplex(s,i)| of $t$.  Assume that $t
+= |DT.opposite_simplex(s,i)|$ exists and let $j =
+|DT.index_of_vertex_in_opposite_simplex(s,i)|$. Then |s =
+DT.opposite_simplex(t,j)| and |i =
+DT.index_of_vertex_in_opposite_simplex(t,j)|.  In general, a vertex
+belongs to many simplices.
+
+Any simplex of |\Mvar| belongs either to the nearest or to the
+furthest site Delaunay triangulation or both. The test
+|DT.simplex_of_nearest(dt_simplex s)| returns true if |s| belongs to
+the nearest site triangulation and the test
+|DT.simplex_of_furthest(dt_simplex s)| returns true if |s| belongs to
+the furthest site triangulation.
+}*/
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Convex_hull_d.h>
+
+namespace CGAL {
+
+template <typename R_, typename Lifted_R_ = R_>
+class Delaunay_d : public Convex_hull_d<Lifted_R_>
+{ 
+typedef Delaunay_d<R_,Lifted_R_> Self;
+typedef Convex_hull_d<Lifted_R_> Base;
+
+  using Base::origin_simplex_;
+
+public:
+
+  using Base::associate_vertex_with_simplex;
+  using Base::dcur;
+  using Base::hyperplane_supporting;
+  using Base::visited_mark;
+  using Base::is_bounded_simplex;
+  using Base::is_unbounded_simplex;
+  using Base::clear_visited_marks;
+  using Base::is_dimension_jump;
+  using Base::point_of_simplex;
+  using Base::point_of_facet;
+  using Base::vertex_of_facet;
+
+/*{\Mgeneralization Convex_hull_d<Lifted_R>}*/
+
+/*{\Mtypes 7}*/
+typedef R_ R;
+typedef Lifted_R_ Lifted_R;
+
+typedef typename Base::Simplex_handle Simplex_handle;
+/*{\Mtypemember handles to the simplices of the complex.}*/
+
+typedef typename Base::Vertex_handle Vertex_handle;
+/*{\Mtypemember handles to vertices of the complex.}*/
+
+typedef typename Base::Simplex_const_handle Simplex_const_handle;
+typedef typename Base::Vertex_const_handle Vertex_const_handle;
+
+class Simplex_iterator;
+class Simplex_const_iterator;
+friend class Simplex_iterator;
+friend class Simplex_const_iterator;
+
+typedef typename R::Point_d Point_d;
+/*{\Mtypemember the point type}*/
+typedef typename R::Sphere_d Sphere_d;
+/*{\Mtypemember the sphere type}*/
+typedef typename R::FT FT;
+
+typedef typename Lifted_R::Point_d Lifted_point_d;
+typedef typename Lifted_R::Vector_d Lifted_vector_d;
+typedef typename Lifted_R::Hyperplane_d Lifted_hyperplane_d;
+typedef typename Lifted_R::RT RT;
+
+enum Delaunay_voronoi_kind { NEAREST, FURTHEST };
+/*{\Menum interface flags}*/
+
+/*{\Mtext To use these types you can typedef them into the global
+scope after instantiation of the class. We use |Vertex_handle| instead
+of |\Mname::Vertex_handle| from now on. Similarly we use
+|Simplex_handle|.}*/
+private:
+  enum type_of_S { unknown, non_cocircular, cocircular };  
+  type_of_S ts;
+
+  const R& Delaunay_kernel_;
+
+  enum type_of_facet { lower_hull, upper_hull, vertical };
+
+  type_of_facet type_of(typename Base::Facet_const_handle f) const
+  /*{\Xop returns the type of the facet $f$.}*/
+  { typename Lifted_R::Orthogonal_vector_d ortho =
+      lifted_kernel().orthogonal_vector_d_object();
+    Lifted_vector_d normal = ortho(hyperplane_supporting(f));
+    typename Lifted_R::Component_accessor_d access =
+      lifted_kernel().component_accessor_d_object();
+    int d = CGAL_NTS sign( 
+      access.homogeneous(normal,access.dimension(normal)-1));
+    if (d > 0) return upper_hull;
+    if (d < 0) return lower_hull;
+    return vertical;
+  }
+
+  type_of_facet type_of(typename Base::Facet_handle f) const
+  { return type_of(static_cast<typename Base::Facet_const_handle>(f)); }
+
+
+  bool incident_simplex_search(Vertex_handle v, Simplex_handle s) const;
+
+public:
+  
+  typedef typename Base::Point_const_iterator Point_const_iterator;
+  /*{\Mtypemember the iterator for points.}*/
+
+  typedef typename Base::Vertex_iterator Vertex_iterator;
+  /*{\Mtypemember the iterator for vertices.}*/
+
+  typedef typename Base::Simplex_iterator CH_simplex_iterator;
+  typedef typename Base::Simplex_const_iterator CH_simplex_const_iterator;
+
+  class Simplex_iterator 
+  /*{\Mtypemember the iterator for simplices.}*/ 
+    : public CH_simplex_iterator 
+  {
+    typedef Delaunay_d<R,Lifted_R> Delaunay;
+    typedef CH_simplex_iterator Base_iterator;
+
+    Delaunay* DT;
+    type_of_facet tf;
+    Base_iterator base() { return Base_iterator(*this); }
+  public:
+    Simplex_iterator(Base_iterator y = Base_iterator()) : 
+      Base_iterator(y) {}
+
+    Simplex_iterator(Delaunay* x,  Base_iterator y, 
+      Delaunay_voronoi_kind z = NEAREST) : Base_iterator(y), DT(x) 
+    /* if the facet is not nil we set the current marker to
+       the facet and insert all it's neighbors into the
+       candidates stack */
+    { CGAL_assertion(base() != Base_iterator());
+      tf = (z == NEAREST ? lower_hull : upper_hull); 
+      bool cocirc = DT->is_S_cocircular();
+      // Note [Sylvain,2007-03-08] : I added some parentheses to fix a warning,
+      // I hope I got the logic right.
+      // Note: I have add a new pair of parentheses. Laurent Rineau, 2010/08/20
+      while ( base() != DT->simplices_end() &&
+              !( ( cocirc && DT->is_bounded_simplex(base()) ) ||
+                ( ( !cocirc && DT->is_unbounded_simplex(base()) ) && 
+                  DT->type_of(base()) == tf ) ) ) {
+         Base_iterator::operator++();
+      }
+    }
+
+    Simplex_iterator(const Simplex_iterator& it) : Base_iterator(it) {}
+
+    Simplex_iterator& operator++()
+    /* here we get a new candidate from the stack
+       and insert all its not-visited neighbors */
+    { 
+      bool cocirc = DT->is_S_cocircular();
+      do {
+        Base_iterator::operator++();
+      // Note [Sylvain,2007-03-08] : I added some parentheses to fix a warning,
+      // I hope I got the logic right.
+      // Note: I have add a new pair of parentheses. Laurent Rineau, 2010/08/20
+      } while ( base() != DT->simplices_end() &&
+                !( ( cocirc && DT->is_bounded_simplex(base()) ) ||
+                   ( ( !cocirc && DT->is_unbounded_simplex(base()) ) && 
+                   DT->type_of(base()) == tf ) ) );
+      return *this; 
+    }
+    Simplex_iterator  operator++(int) 
+    { Simplex_iterator tmp = *this; ++(*this); return tmp; }
+
+    // change modus:
+    typedef std::forward_iterator_tag iterator_category;
+  private:
+    Simplex_iterator  operator--(int);
+    Simplex_iterator& operator--();
+
+  }; // Simplex_iterator
+
+
+  class Simplex_const_iterator : public CH_simplex_const_iterator {
+    typedef Delaunay_d<R,Lifted_R> Delaunay;
+    typedef CH_simplex_const_iterator Base_iterator;
+
+    const Delaunay* DT;
+    type_of_facet tf;
+    Base_iterator base() { return Base_iterator(*this); }
+  public:
+    Simplex_const_iterator(Base_iterator y = Base_iterator()) : 
+      Base_iterator(y) {}
+
+    Simplex_const_iterator(const Delaunay* x,  Base_iterator y, 
+      Delaunay_voronoi_kind z = NEAREST) : Base_iterator(y), DT(x) 
+    /* if the facet is not nil we set the current marker to
+       the facet and insert all it's neighbors into the
+       candidates stack */
+    { CGAL_assertion(base() != Base_iterator());
+      tf = (z == NEAREST ? lower_hull : upper_hull); 
+      bool cocirc = const_cast<Delaunay*>(DT)->is_S_cocircular();
+      while ( (base() != DT->simplices_end()) &&
+              !( (cocirc && DT->is_bounded_simplex(base())) ||
+                 (!cocirc && DT->is_unbounded_simplex(base()) && 
+                  DT->type_of(base()) == tf ) ) ) {
+         Base_iterator::operator++();
+      }
+    }
+
+    Simplex_const_iterator(const Simplex_const_iterator& it) : 
+      Base_iterator(it) {}
+
+    Simplex_const_iterator& operator++()
+    /* here we get a new candidate from the stack
+       and insert all its not-visited neighbors */
+    { 
+      bool cocirc = const_cast<Delaunay*>(DT)->is_S_cocircular();
+      do {
+        Base_iterator::operator++();
+      } while ( (base() != DT->simplices_end()) &&
+                !( (cocirc && DT->is_bounded_simplex(base())) ||
+                   (!cocirc && DT->is_unbounded_simplex(base()) && 
+                    DT->type_of(base()) == tf ) ) ); 
+      return *this; 
+    }
+    Simplex_const_iterator  operator++(int) 
+    { Simplex_iterator tmp = *this; ++(*this); return tmp; }
+
+    // change modus:
+    typedef std::forward_iterator_tag iterator_category;
+  private:
+    Simplex_const_iterator  operator--(int);
+    Simplex_const_iterator& operator--();
+
+  }; // Simplex_iterator
+
+
+
+
+  void project(Regular_complex_d<R>& RC, int which = -1) const;
+  /*{\Xop projects the upper (|which = 1|) or lower (|which = -1|) hull
+  into regular complex |RC|. }*/
+
+    
+  bool is_S_cocircular();
+  /*{\Xop returns |true| if the points of |S| are cocircular and returns
+  |false| otherwise}*/
+
+  /*{\Mcreation 3}*/
+
+  Delaunay_d(int d, const R& k1 = R(), const Lifted_R& k2 = Lifted_R())
+  /*{\Mcreate creates an instance |\Mvar| of type |\Mtype|. The
+  dimension of the underlying space is $d$ and |S| is initialized to the
+  empty point set. The traits class |R| specifies the models of
+  all types and the implementations of all geometric primitives used by
+  the Delaunay class. The traits class |Lifted_R| specifies the models of
+  all types and the implementations of all geometric primitives used by
+  the base class of |\Mname|. The second template parameter defaults to
+  the first: |Delaunay_d<R> = Delaunay_d<R, Lifted_R = R >|.}*/
+   : Base(d+1,k2), Delaunay_kernel_(k1) { ts = unknown; }
+
+  /*{\Mtext Both template arguments have to be models that fit a
+  subset of requirements of the d-dimensional kernel. We list them at
+  the end of this manual page.}*/
+
+  const R& kernel() const { return Delaunay_kernel_; }
+  const R& lifted_kernel() const { return Base::kernel(); }
+
+  private:
+  /*{\Mtext The data type |\Mtype| offers neither copy constructor nor
+  assignment operator.}*/
+  Delaunay_d(const Self&); 
+  Self& operator=(const Self&);
+  public:
+
+
+  /*{\Moperations 3 3}*/
+  /*{\Mtext All operations below that take a point |x| as an argument
+  have the common precondition that $|x.dimension()| = |\Mvar.dimension()|$.}*/
+
+  int dimension() const 
+  /*{\Mop returns the dimension of ambient space}*/
+  { return (Base::dimension() - 1); } 
+
+  int current_dimension() const
+  /*{\Mop returns the affine dimension of the current point set, i.e.,
+  $-1$ is $S$ is empty, $0$ if $S$ consists of a single point,
+  $1$ if all points of $S$ lie on a common line, etcetera.}*/
+  { int d = Base::current_dimension();
+    if (d == -1) return d;
+    return ( const_cast<Self*>(this)->is_S_cocircular() ? d : d-1 );
+  }
+
+  bool is_simplex_of_nearest(Simplex_handle s) const
+  /*{\Mop returns true if |s| is a simplex of the nearest site 
+  triangulation.}*/
+  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
+    return ( type_of(s) == lower_hull );
+  }
+
+  bool is_simplex_of_furthest(Simplex_handle s) const
+  /*{\Mop returns true if |s| is a simplex of the furthest site 
+  triangulation.}*/
+  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
+    return (type_of(s) == upper_hull);
+  }  
+
+  bool is_simplex_of_nearest(Simplex_const_handle s) const
+  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
+    return ( type_of(s) == lower_hull );
+  }
+  bool is_simplex_of_furthest(Simplex_const_handle s) const
+  { if ( const_cast<Self*>(this)->is_S_cocircular() ) return true;
+    return (type_of(s) == upper_hull);
+  }  
+
+     
+  Vertex_handle vertex_of_simplex(Simplex_handle s, int i) const
+  /*{\Mop returns the vertex associated with the $i$-th node of $s$.
+  \precond $0 \leq i \leq |dcur|$. }*/
+  { if ( const_cast<Self*>(this)->is_S_cocircular() )
+      return Base::vertex_of_simplex(s,i);
+    else 
+     return Base::vertex_of_simplex(s,i+1);
+  }
+
+  Vertex_const_handle vertex_of_simplex(Simplex_const_handle s, 
+                                        int i) const
+  { if ( const_cast<Self*>(this)->is_S_cocircular() )
+      return Base::vertex_of_simplex(s,i);
+    else 
+      return Base::vertex_of_simplex(s,i+1);
+  }
+
+  Point_d associated_point(Vertex_handle v) const
+  /*{\Mop returns the point associated with vertex $v$.}*/
+  { typename Lifted_R::Project_along_d_axis_d project =
+      lifted_kernel().project_along_d_axis_d_object();
+    return project(Base::associated_point(v)); }
+
+  Point_d associated_point(Vertex_const_handle v) const
+  { typename Lifted_R::Project_along_d_axis_d project =
+      lifted_kernel().project_along_d_axis_d_object();
+    return project(Base::associated_point(v)); }
+
+  Point_d point_of_simplex(Simplex_handle s,int i) const
+  /*{\Mop returns the point associated with the $i$-th vertex of $s$.
+  \precond $0 \leq i \leq |dcur|$. }*/
+  { return associated_point(vertex_of_simplex(s,i)); }
+
+  Point_d point_of_simplex(Simplex_const_handle s,int i) const
+  { return associated_point(vertex_of_simplex(s,i)); }
+
+
+  Simplex_handle opposite_simplex(Simplex_handle s, int i) const
+  /*{\Mop returns the simplex opposite to the $i$-th vertex of $s$
+  (|Simplex_handle()| if there is no such simplex).
+  \precond $0 \leq i \leq |dcur|$. }*/
+  { 
+    if ( const_cast<Self*>(this)->is_S_cocircular() ) {
+      Simplex_handle f = Base::opposite_simplex(s,i);
+      return ( Base::is_unbounded_simplex(f) ? 
+	       Simplex_handle() : f );    
+    } else {
+      Simplex_handle f = Base::opposite_simplex(s,i+1);
+      return ( type_of(f) == type_of(s) ? f : Simplex_handle() );
+    }
+  }  
+
+  Simplex_const_handle opposite_simplex(Simplex_const_handle s, 
+                                        int i) const
+  { 
+    if ( const_cast<Self*>(this)->is_S_cocircular() ) {
+      Simplex_const_handle f = Base::opposite_simplex(s,i);
+      return ( Base::is_unbounded_simplex(f) ? 
+	       Simplex_const_handle() : f );    
+    } else {
+      Simplex_const_handle f = Base::opposite_simplex(s,i+1);
+      return ( type_of(f) == type_of(s) ? f : Simplex_const_handle() );
+    }
+  }  
+   
+  int index_of_vertex_in_opposite_simplex(Simplex_handle s,int i) const
+  /*{\Mop returns the index of the vertex opposite to the $i$-th vertex 
+  of $s$. \precond $0 \leq i \leq |dcur|$.}*/
+  { 
+    if ( const_cast<Self*>(this)->is_S_cocircular() ) 
+      return Base::index_of_vertex_in_opposite_simplex(s,i);
+    else
+      return Base::index_of_vertex_in_opposite_simplex(s,i+1) - 1; 
+  }  
+
+  int index_of_vertex_in_opposite_simplex(Simplex_const_handle s,
+                                          int i) const
+  { 
+    if ( const_cast<Self*>(this)->is_S_cocircular() ) 
+      return Base::index_of_vertex_in_opposite_simplex(s,i);
+    else
+      return Base::index_of_vertex_in_opposite_simplex(s,i+1) - 1; 
+  }  
+
+  Simplex_handle simplex(Vertex_handle v) const;
+  /*{\Mop returns a simplex of the nearest site triangulation incident 
+  to $v$.}*/
+
+  int index(Vertex_handle v) const;
+  /*{\Mop returns the index of $v$ in |\Mvar.simplex(v)|.}*/
+
+  bool  contains(Simplex_handle s, const Point_d& x) const;
+  /*{\Mop returns true if |x| is contained in the closure of simplex |s|.}*/
+
+  bool empty() const
+  /*{\Mop  decides whether |\Mvar| is empty.}*/
+  { return (current_dimension() == -1); }
+
+  void clear()
+  /*{\Mop reinitializes |\Mvar| to the empty Delaunay triangulation.}*/
+  { int d = dimension(); Base::clear(d + 1);
+    ts = unknown;
+  }
+
+
+  Vertex_handle insert(const Point_d& x)
+  /*{\Mop inserts point $x$ into |\Mvar| and returns the corresponding
+  |Vertex_handle|.  More precisely, if there is already a vertex |v| in
+  |\Mvar| positioned at $x$ (i.e., |associated_point(v)| is equal to
+  |x|) then |associated_point(v)| is changed to |x| (i.e.,
+  |associated_point(v)| is made identical to |x|) and if there is no
+  such vertex then a new vertex $v$ with |associated_point(v) = x| is
+  added to |\Mvar|.  In either case, $v$ is returned.}*/
+  { ts = unknown;
+    typename Lifted_R::Lift_to_paraboloid_d lift =
+      lifted_kernel().lift_to_paraboloid_d_object();
+    return Base::insert(lift(x));
+  }
+
+
+  Simplex_handle locate(const Point_d& x) const;
+  /*{\Mop returns a simplex of the nearest site triangulation
+  containing |x| in its closure (returns |Simplex_handle()| if |x| lies 
+  outside the convex hull of $S$).}*/
+
+
+  Vertex_handle lookup(const Point_d& x) const
+  /*{\Mop if |\Mvar| contains a vertex $v$ with |associated_point(v) = x| 
+  the result is $v$ otherwise the result is |Vertex_handle()|. }*/
+  { 
+    Simplex_handle s = locate(x);
+    if ( s == Simplex_handle() ) return Vertex_handle();
+    for (int i = 0; i <= current_dimension(); i++) {
+      Vertex_handle v = vertex_of_simplex(s,i);
+      if (v!=this->anti_origin_ && x == associated_point(v) ) return v;
+    }
+    return Vertex_handle();
+  }
+
+
+  Vertex_handle nearest_neighbor(const Point_d& x) const;
+  /*{\Mop computes a vertex $v$ of |\Mvar| that is closest to $x$,
+  i.e.,\\ $|dist(x,associated_point(v))| = \min \{ 
+  |dist(x, associated_point(u))| \mid u \in S\ \}$.}*/
+
+  /*{\Mtext \setopdims{5cm}{1cm}}*/
+  std::list<Vertex_handle> 
+  range_search(const Sphere_d& C) const;
+  /*{\Mop returns the list of all vertices contained in the closure of 
+  sphere $C$.}*/
+
+  std::list<Vertex_handle>
+  range_search(const std::vector<Point_d>& A) const;
+  /*{\Mop returns the list of all vertices contained in the closure of
+  the simplex whose corners are given by |A|.
+  \precond |A| must consist of $d+1$ affinely independent points
+  in base space.}*/
+
+
+  void all_vertices_below(const Lifted_hyperplane_d& h, 
+                          Simplex_handle s, 
+                          std::list<Vertex_handle>& result,
+                          Unique_hash_map<Vertex_handle,bool>& is_new,
+                          bool is_cocircular) const;
+
+
+  std::list<Simplex_handle> 
+  all_simplices(Delaunay_voronoi_kind k = NEAREST) const;
+  /*{\Mop returns a list of all simplices of either the nearest or the
+          furthest site Delaunay triangulation of |S|.}*/
+
+
+  std::list<Vertex_handle> 
+  all_vertices(Delaunay_voronoi_kind k = NEAREST) const;
+  /*{\Mop returns a list of all vertices of either the nearest or the
+  furthest site Delaunay triangulation of |S|.}*/
+
+  std::list<Point_d> all_points() const;
+  /*{\Mop returns $S$. }*/
+
+  Point_const_iterator points_begin() const
+  /*{\Mop returns the start iterator for points in |\Mvar|.}*/
+  { return Point_const_iterator(Base::points_begin()); }
+
+  Point_const_iterator points_end() const
+  /*{\Mop returns the past the end iterator for points in |\Mvar|.}*/
+  { return Point_const_iterator(Base::points_end()); }
+
+  Simplex_iterator simplices_begin(Delaunay_voronoi_kind k = NEAREST)
+  /*{\Mop returns the start iterator for simplices of |\Mvar|.}*/
+  { return Simplex_iterator(this,Base::simplices_begin(),k); }
+
+
+  Simplex_iterator simplices_end()
+  /*{\Mop returns the past the end iterator for simplices of |\Mvar|.}*/
+  { return Simplex_iterator(Base::simplices_end()); }
+
+
+  Simplex_const_iterator 
+  simplices_begin(Delaunay_voronoi_kind k = NEAREST) const
+  { return Simplex_const_iterator(this,Base::simplices_begin(),k); }
+
+  Simplex_const_iterator simplices_end() const
+  { return Simplex_const_iterator(Base::simplices_end()); }
+
+
+  /*{\Mimplementation The data type is derived from |Convex_hull_d| via
+  the lifting map. For a point $x$ in $d$-dimensional space let
+  |lift(x)| be its lifting to the unit paraboloid of revolution. There
+  is an intimate relationship between the Delaunay triangulation of a
+  point set $S$ and the convex hull of |lift(S)|: The nearest site
+  Delaunay triangulation is the projection of the lower hull and the
+  furthest site Delaunay triangulation is the upper hull.  For
+  implementation details we refer the reader to the implementation
+  report available from the CGAL server.
+
+  The space requirement is the same as for convex hulls. The time
+  requirement for an insert is the time to insert the lifted point
+  into the convex hull of the lifted points.}*/
+
+  /*{\Mexample 
+
+  The abstract data type |Delaunay_d| has a default instantiation by
+  means of the $d$-dimensional geometric kernel.
+
+  \begin{Mverb}
+  #include <CGAL/Homogeneous_d.h>
+  #include <CGAL/leda_integer.h>
+  #include <CGAL/Delaunay_d.h>
+
+  typedef leda_integer RT;
+  typedef CGAL::Homogeneous_d<RT> Kernel;
+  typedef CGAL::Delaunay_d<Kernel> Delaunay_d;
+  typedef Delaunay_d::Point_d Point;
+  typedef Delaunay_d::Simplex_handle Simplex_handle;
+  typedef Delaunay_d::Vertex_handle Vertex_handle;
+
+  int main()
+  {
+    Delaunay_d T(2);
+    Vertex_handle v1 = T.insert(Point_d(2,11));
+    ...
+  }
+  \end{Mverb}
+  }*/
+
+  /*{\Mtext\headerline{Traits requirements}
+
+  |\Mname| requires the following types from the kernel traits |Lifted_R|:
+  \begin{Mverb}
+    RT Point_d Vector_d Ray_d Hyperplane_d 
+  \end{Mverb}
+  and uses the following function objects from the kernel traits:
+  \begin{Mverb}
+    Construct_hyperplane_d
+    Construct_vector_d
+    Vector_to_point_d / Point_to_vector_d
+    Orientation_d
+    Orthogonal_vector_d
+    Oriented_side_d / Has_on_positive_side_d
+    Affinely_independent_d
+    Contained_in_simplex_d
+    Contained_in_affine_hull_d
+    Intersect_d
+    Lift_to_paraboloid_d / Project_along_d_axis_d
+    Component_accessor_d
+  \end{Mverb}
+  |\Mname| requires the following types from the kernel traits |R|:
+  \begin{Mverb}
+    FT Point_d Sphere_d 
+  \end{Mverb}
+  and uses the following function objects from the kernel traits |R|:
+  \begin{Mverb}
+    Construct_sphere_d
+    Squared_distance_d
+    Point_of_sphere_d
+    Affinely_independent_d
+    Contained_in_simplex_d
+  \end{Mverb}
+  }*/
+
+
+
+}; // Delaunay_d<R,Lifted_R>
+
+template <typename R, typename Lifted_R>
+void Delaunay_d<R,Lifted_R>::project(Regular_complex_d<R>& RC, int which) const
+{
+  RC.clear(dimension());
+  Delaunay_voronoi_kind k = (which == -1 ? NEAREST : FURTHEST);
+  Unique_hash_map<Simplex_const_handle, Simplex_handle > project_simps;
+  Unique_hash_map<Vertex_const_handle,  Vertex_handle >  project_verts;
+  int dc = current_dimension();
+  RC.set_current_dimension(dc);
+
+  Simplex_const_iterator f;
+  for(f =  simplices_begin(k); f != simplices_end(); ++f) {
+    Simplex_handle s = project_simps[f] = RC.new_simplex();
+    for (int i = 0; i <= dc; i++) {
+      Vertex_const_handle v = vertex_of_simplex(f,i);
+      Vertex_handle pv = project_verts[v];
+      if ( pv == Vertex_handle() ) {
+        Point_d x = associated_point(v);
+        pv = project_verts[v] = RC.new_vertex(x);
+      }
+      RC.associate_vertex_with_simplex(s,i,pv);
+    }
+  }
+
+  /* in a second pass we set up neighbor connections */
+  Simplex_iterator s,t;
+  for(f =  simplices_begin(k); f != simplices_end(); ++f) {
+    s = project_simps[f];
+    if ( s != Simplex_handle() ) {
+      for (int i = 0; i <= dc; i++) {
+        t = project_simps[opposite_simplex(f,i)];
+        if ( dc > 0 && t != Simplex_handle() ) {
+          RC.set_neighbor(s,i,t,
+                          index_of_vertex_in_opposite_simplex(f,i)); 
+        }
+      }
+    }
+  }
+}
+
+
+template <typename R, typename Lifted_R>
+bool Delaunay_d<R,Lifted_R>::is_S_cocircular() 
+{ 
+  if (ts == unknown) {
+    int d = Base::current_dimension();
+    std::vector<Lifted_point_d> A(d + 1);
+    typename Lifted_R::Project_along_d_axis_d project =
+      lifted_kernel().project_along_d_axis_d_object();
+    for (int i = 0; i <= d; i++)
+      A[i] = project( Base::point_of_simplex(origin_simplex_,i));
+
+    typename Lifted_R::Affinely_independent_d affinely_independent =
+      lifted_kernel().affinely_independent_d_object();
+    ts = ( affinely_independent(A.begin(),A.end()) ? 
+           cocircular : non_cocircular );
+    if ( d == -1 && ts != cocircular )
+      CGAL_error_msg(        "affinely independent works incorrectly for empty set");
+  }
+  return (ts == cocircular);
+}
+
+
+template <typename R, typename Lifted_R> 
+bool Delaunay_d<R,Lifted_R>::
+incident_simplex_search(Vertex_handle v, Simplex_handle s) const
+{ 
+  visited_mark(s) = true;
+  if ( const_cast<Self*>(this)->is_S_cocircular() == 
+       is_bounded_simplex(s) ) {
+    // we have found a simplex of the desired kind 
+    int low = ( is_unbounded_simplex(s) ? 1 : 0 );
+    for ( int i = low; i <= Base::current_dimension(); i++) {
+      if ( v == Base::vertex_of_simplex(s,i) ) {
+        const_cast<Self*>(this)->associate_vertex_with_simplex(s,i,v); 
+        return true;
+      }
+    }
+    CGAL_error_msg(      "Delaunay_d::incident_simplex_search: unreachable point.");
+  }
+
+  /* s does not have the desired kind; we visit all neighbors except
+     the one opposite v */
+
+  bool incident = false;
+  int j;
+  for (j = 0; j <= dcur; j++)
+    if ( Base::vertex_of_simplex(s,j) == v ) incident = true;
+  if ( !incident ) 
+    CGAL_error_msg("reached a simplex that is not incident to v");
+
+  for (j = 0; j <= Base::current_dimension(); j++) {
+    Simplex_handle t = Base::opposite_simplex(s,j);
+    if ( Base::vertex_of_simplex(s,j) != v && !visited_mark(t)  &&
+         incident_simplex_search(v,t) ) 
+      return true;    
+  }
+  return false;
+}
+
+template <typename R, typename Lifted_R> 
+typename Delaunay_d<R,Lifted_R>::Simplex_handle 
+Delaunay_d<R,Lifted_R>::simplex(Vertex_handle v) const
+{ 
+  Simplex_handle s = Base::simplex(v);
+  if ( Base::vertex_of_simplex(s,Base::index(v)) != v )
+    CGAL_error_msg("Delaunay_d::simplex: s is not incident to v.");
+  incident_simplex_search(v,s);
+  clear_visited_marks(s);
+  return Base::simplex(v);
+}
+
+template <typename R, typename Lifted_R>
+int Delaunay_d<R,Lifted_R>::index(Vertex_handle v) const
+{ simplex(v);
+  int i = Base::index(v);
+  return ( const_cast<Self*>(this)->is_S_cocircular() ?  i : i-1);
+}
+
+template <typename R, typename Lifted_R>
+bool Delaunay_d<R,Lifted_R>::
+contains(Simplex_handle s, const Point_d& x) const
+{ int d = current_dimension();
+  if (d < 0) return false;
+  std::vector<Point_d> A;
+  A.reserve(d + 1);
+  for (int i = 0; i <= d; i++){ 
+    Vertex_handle vh = vertex_of_simplex(s,i);
+    if (vh!=this->anti_origin_)
+      A.push_back( associated_point(vh) );
+  }
+  typename R::Contained_in_simplex_d contained_in_simplex =
+    kernel().contained_in_simplex_d_object();
+  return contained_in_simplex(A.begin(),A.end(),x);
+}
+
+
+template <typename R, typename Lifted_R>
+typename Delaunay_d<R,Lifted_R>::Simplex_handle
+Delaunay_d<R,Lifted_R>::
+locate(const Point_d& x) const
+{ 
+  int d = current_dimension();
+  if (d < 0) return Simplex_handle();
+  if ( d == 0 ) {
+    if ( x == point_of_simplex(origin_simplex_,0) )
+      return origin_simplex_;
+    else
+      return Simplex_handle();
+  }
+  typename Lifted_R::Lift_to_paraboloid_d lift =
+    lifted_kernel().lift_to_paraboloid_d_object();;
+  Lifted_point_d lp = lift(x);
+  if ( is_dimension_jump(lp) ) {
+    Simplex_iterator s;
+    for (s = const_cast<Self*>(this)->simplices_begin(NEAREST); 
+         s != const_cast<Self*>(this)->simplices_end(); ++s) 
+      if ( contains(s,x) ) return s;
+    return Simplex_handle();
+  }
+  // lift(p) is not a dimension jump
+  std::list<Simplex_handle> candidates;
+  std::size_t dummy1 = 0; 
+  int loc = -1; // intialization is important
+  Simplex_handle f;
+  this -> visibility_search(origin_simplex_,lp,candidates,dummy1,loc,f);
+  this -> clear_visited_marks(origin_simplex_);
+  //f and simplices in candidates are unbounded simplices only
+  if ( f != Simplex_handle() ){
+    return f;
+  }
+  typename std::list<Simplex_handle>::iterator it;
+  for(it = candidates.begin(); it != candidates.end(); ++it)
+    if ( contains(*it,x) ) return *it;
+
+  return Simplex_handle();
+}
+
+
+
+template <typename R, typename Lifted_R>
+typename Delaunay_d<R,Lifted_R>::Vertex_handle 
+Delaunay_d<R,Lifted_R>::
+nearest_neighbor(const Point_d& x) const
+{ 
+  int d = current_dimension();
+  if (d < 0) return Vertex_handle();
+  if (d == 0) 
+    return Base::vertex_of_simplex(origin_simplex_,0);
+  
+  typename Lifted_R::Lift_to_paraboloid_d lift =
+    lifted_kernel().lift_to_paraboloid_d_object();;
+  Lifted_point_d lp = lift(x);
+  std::list<Simplex_handle> candidates;
+ 
+  if ( is_dimension_jump(lp) )
+    candidates = all_simplices(NEAREST);
+  else {
+    // lift(x) is not a dimension jump
+    std::size_t dummy1 = 0; 
+    int location = -1;
+    typename Base::Facet_handle f;
+    this -> visibility_search(origin_simplex_,lp,candidates,dummy1,location,f);
+    this -> clear_visited_marks(origin_simplex_);
+    CGAL_assertion_msg( location != -1,
+      "Delaunay_d::nearest_neighbor: location cannot be -1");
+    if (location == 0) {
+      // x must be one of the corners of f
+      for (int i = 0; i < Base::current_dimension(); i++) {
+        if ( point_of_facet(f,i) == lp )  
+          return vertex_of_facet(f,i);
+      }
+      CGAL_error_msg("Delaunay_d::nearest_neighbor: \
+      if loc = 1 then lp must be corner of f");
+    }
+  }
+
+  /* search through the vertices of the candidate simplices */
+  if ( candidates.empty() ) 
+    CGAL_error_msg("Delaunay_d::nearest_neighbor: candidates is empty");
+  Vertex_handle nearest_v = 
+    vertex_of_simplex(*candidates.begin(),0);
+  typename R::Squared_distance_d sqr_dist =
+    kernel().squared_distance_d_object();
+  FT min_dist = sqr_dist(x,associated_point(nearest_v));
+
+  typename std::list<Simplex_handle>::iterator it;
+  for(it=candidates.begin(); it!=candidates.end(); ++it) {
+    for (int i = 0; i <= d ; i++) {
+      typename R::Squared_distance_d sqr_dist =
+        kernel().squared_distance_d_object();
+      FT sidist = sqr_dist(x,point_of_simplex(*it,i));
+      if ( sidist < min_dist ) {
+        min_dist = sidist ;
+        nearest_v = vertex_of_simplex(*it,i);
+      }
+    }
+  }
+  return nearest_v;
+}
+
+template <typename R, typename Lifted_R>
+void Delaunay_d<R,Lifted_R>::
+all_vertices_below(const Lifted_hyperplane_d& h, 
+                   Simplex_handle s, 
+                   std::list< Vertex_handle >& result,
+                   Unique_hash_map<Vertex_handle,bool>& is_new,
+                   bool is_cocircular) const
+{ 
+  visited_mark(s) = true;
+  bool some_vertex_on_or_below_h = false;
+  int i;
+  int low = (is_cocircular ? 0 : 1);
+  for (i = low; i <= Base::current_dimension(); i++) {
+    Vertex_handle v = Base::vertex_of_simplex(s,i);
+    typename Lifted_R::Oriented_side_d side =
+      lifted_kernel().oriented_side_d_object();
+    if ( !(side(h, Base::associated_point(v)) == ON_POSITIVE_SIDE) ) {
+      some_vertex_on_or_below_h = true;
+      if ( is_new[v] ) {
+        result.push_back(v);
+        is_new[v] = false;
+      }
+    }
+  }
+        
+  if ( !some_vertex_on_or_below_h ) return;
+  for (i = low; i <= Base::current_dimension(); i++) {
+    Simplex_handle t = Base::opposite_simplex(s,i);
+    if ( !visited_mark(t) && 
+         (!is_cocircular || is_bounded_simplex(t)) )
+      all_vertices_below(h,t,result,is_new,is_cocircular);
+  }
+}
+
+template <typename R, typename Lifted_R>
+std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
+Delaunay_d<R,Lifted_R>::
+range_search(const Sphere_d& C) const
+{ 
+  std::list<Vertex_handle> result;
+  int dc = current_dimension();
+  if ( dc < 0 ) 
+    return result;
+  Point_d c = C.center();
+  Vertex_handle v = nearest_neighbor(c);
+  if ( dc == 0 ) {
+    if ( C.has_on_bounded_side(associated_point(v)) ) 
+      result.push_back(v);
+    return result;
+  }
+  Simplex_handle s = simplex(v);
+  bool is_cocircular = const_cast<Self*>(this)->is_S_cocircular();
+  Unique_hash_map<Vertex_handle,bool> is_new(true);
+  int d = dimension();
+  std::vector<Lifted_point_d> P(d + 1);
+  typename Lifted_R::Lift_to_paraboloid_d lift =
+    lifted_kernel().lift_to_paraboloid_d_object();
+  typename R::Point_of_sphere_d point_of_sphere =
+    kernel().point_of_sphere_d_object();
+  for (int i = 0; i <= d; i++)  
+    P[i] = lift(point_of_sphere(C,i));
+  typedef typename Lifted_vector_d::Base_vector Base_vector;
+  Lifted_point_d o = P[0] - 
+    Lifted_vector_d(d+1,Base_vector(),d);
+  typename Lifted_R::Construct_hyperplane_d hyperplane_trough =
+    lifted_kernel().construct_hyperplane_d_object();
+  Lifted_hyperplane_d h = 
+    hyperplane_trough(P.begin(),P.end(),o,ON_NEGATIVE_SIDE);  
+  // below is negative
+  all_vertices_below(h,s,result,is_new,is_cocircular);
+  clear_visited_marks(s);
+  return result;
+}
+  
+
+template <typename R, typename Lifted_R>
+std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
+Delaunay_d<R,Lifted_R>::
+range_search(const std::vector<Point_d>& A) const
+{ 
+  CGAL_assertion_code( typename R::Affinely_independent_d affinely_independent =
+                       kernel().affinely_independent_d_object());
+  CGAL_assertion_msg( affinely_independent(A.begin(),A.end()),
+    "Delaunay_d::range_search: simplex must be affinely independent.");
+  typename R::Construct_sphere_d sphere_through =
+    kernel().construct_sphere_d_object();
+  Sphere_d C = sphere_through(dimension(),A.begin(),A.end());
+  std::list<Vertex_handle> result;
+  std::list<Vertex_handle> candidates = range_search(C);
+  typename R::Contained_in_simplex_d contained_in_simplex =
+    kernel().contained_in_simplex_d_object();
+  typename std::list<Vertex_handle>::iterator it;
+  for(it = candidates.begin(); it != candidates.end(); ++it) {
+    if ( contained_in_simplex(A.begin(),A.end(),associated_point(*it)) )
+      result.push_back(*it);
+  }
+  return result;
+}
+
+
+
+template <typename R, typename Lifted_R>
+std::list< typename Delaunay_d<R,Lifted_R>::Simplex_handle > 
+Delaunay_d<R,Lifted_R>::
+all_simplices(Delaunay_voronoi_kind k) const
+{ 
+  std::list<Simplex_handle> result;
+  if ( dcur < 0 ) return result;
+  Simplex_iterator s;
+  for (s = const_cast<Self*>(this)->simplices_begin(k); 
+       s != const_cast<Self*>(this)->simplices_end(); ++s) {
+    result.push_back(s); 
+  }
+  return result;
+}
+
+template <typename R, typename Lifted_R>
+std::list< typename Delaunay_d<R,Lifted_R>::Vertex_handle > 
+Delaunay_d<R,Lifted_R>::
+all_vertices(Delaunay_voronoi_kind k) const
+{ 
+  Unique_hash_map<Vertex_handle,bool> is_new_vertex(true);
+  std::list<Vertex_handle> result;
+  std::list<Simplex_handle> hull_simplices = all_simplices(k);
+  typename std::list<Simplex_handle>::iterator it;
+  for (it = hull_simplices.begin(); it != hull_simplices.end(); ++it) {
+    for (int i = 0; i <= current_dimension(); i++) {
+      Vertex_handle v = vertex_of_simplex(*it,i);
+      if ( is_new_vertex[v] ) {
+        is_new_vertex[v] = false;
+        result.push_back(v);
+      }
+    }
+  }
+  return result;
+}
+
+
+template <typename R, typename Lifted_R>
+std::list< typename Delaunay_d<R,Lifted_R>::Point_d > 
+Delaunay_d<R,Lifted_R>::
+all_points() const
+{ 
+  std::list<Point_d> result;
+  std::list<Vertex_handle> all_nearest_verts = all_vertices(NEAREST);
+  typename std::list<Vertex_handle>::iterator it;
+  for(it = all_nearest_verts.begin(); 
+      it != all_nearest_verts.end();
+      ++it) 
+    result.push_back(associated_point(*it));
+  return result;
+}
+
+
+} //namespace CGAL
+#endif // CGAL_DELAUNAY_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_area_criteria_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_area_criteria_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_area_criteria_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_area_criteria_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_criteria_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_criteria_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_criteria_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_criteria_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_face_base_2.h
new file mode 100644
index 0000000..5ff077b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_face_base_2.h
@@ -0,0 +1,79 @@
+// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef CGAL_DELAUNAY_FACE_BASE_2_H
+#define CGAL_DELAUNAY_FACE_BASE_2_H
+
+#include <CGAL/Constrained_Delaunay_triangulation_face_base_2.h>
+
+namespace CGAL {
+
+template <class Gt,
+          class Fb = Constrained_Delaunay_triangulation_face_base_2<Gt> >
+class Delaunay_mesh_face_base_2 : public Fb
+{
+public:
+  typedef Gt Geom_traits;
+  typedef typename Fb::Vertex_handle Vertex_handle;
+  typedef typename Fb::Face_handle Face_handle;
+
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
+    typedef Delaunay_mesh_face_base_2<Gt,Fb2> Other;
+  };
+
+protected:
+  bool in_domain;
+
+public:
+  Delaunay_mesh_face_base_2(): Fb(), in_domain(false) {}
+
+  Delaunay_mesh_face_base_2(Vertex_handle v0, 
+			    Vertex_handle v1, 
+			    Vertex_handle v2)
+    : Fb(v0,v1,v2), in_domain(false) {}
+
+  Delaunay_mesh_face_base_2(Vertex_handle v0, 
+			    Vertex_handle v1, 
+			    Vertex_handle v2,
+			    Face_handle n0, 
+			    Face_handle n1, 
+			    Face_handle n2)
+    : Fb(v0,v1,v2,n0,n1,n2), in_domain(false) {}
+
+  inline
+  bool is_in_domain() const { return in_domain; }
+
+  inline
+  void set_in_domain(const bool b) { in_domain=b; }
+
+  /** compatibility with CGAL-3.2 */
+  inline
+  bool is_marked() const { return in_domain; }
+
+  /** compatibility with CGAL-3.2 */
+  inline
+  void set_marked(const bool b) { in_domain=b; }
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_local_size_criteria_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_local_size_criteria_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_local_size_criteria_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_local_size_criteria_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_size_criteria_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_size_criteria_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesh_size_criteria_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_size_criteria_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_vertex_base_2.h
new file mode 100644
index 0000000..a9839e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesh_vertex_base_2.h
@@ -0,0 +1,73 @@
+// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_DELAUNAY_VERTEX_BASE_2_H
+#define CGAL_DELAUNAY_VERTEX_BASE_2_H
+
+#include <CGAL/Triangulation_vertex_base_2.h>
+
+namespace CGAL {
+
+template <class Gt,
+          class Vb = Triangulation_vertex_base_2<Gt> >
+class Delaunay_mesh_vertex_base_2 : public Vb
+{
+public:
+  typedef typename Gt::FT          FT;
+  typedef typename Vb::Point       Point;
+  typedef typename Vb::Face_handle Face_handle;
+
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
+    typedef Delaunay_mesh_vertex_base_2<Gt,Vb2> Other;
+  };
+
+protected:
+  FT sizing_info_;
+
+public:
+  Delaunay_mesh_vertex_base_2()
+    : Vb()
+    , sizing_info_(0.)
+  {}
+
+  Delaunay_mesh_vertex_base_2(Point p)
+    : Vb(p)
+    , sizing_info_(0.)
+  {}
+
+  Delaunay_mesh_vertex_base_2(Point p,
+                              Face_handle f)
+    : Vb(p, f)
+    , sizing_info_(0.)
+  {}
+
+  void set_sizing_info(const FT& s)
+  { 
+    sizing_info_ = s;
+  }
+  const FT& sizing_info() const { return sizing_info_; }
+
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesher_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesher_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesher_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesher_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_2.h
new file mode 100644
index 0000000..7d1500d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_2.h
@@ -0,0 +1,2485 @@
+// Copyright (c) 1997  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Mariette Yvinec
+//               : Olivier Devillers  (remove)
+//               : Pedro de Castro (displacement)
+
+
+
+#ifndef CGAL_DELAUNAY_TRIANGULATION_2_H
+#define CGAL_DELAUNAY_TRIANGULATION_2_H
+
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/iterator.h>
+
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+#include <CGAL/Spatial_sort_traits_adapter_2.h>
+#include <CGAL/internal/info_check.h>
+#include <CGAL/tss.h>
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/mpl/and.hpp>
+
+
+#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+namespace CGAL {
+
+template < class Gt, 
+           class Tds = Triangulation_data_structure_2 <
+                           Triangulation_vertex_base_2<Gt> > >
+class Delaunay_triangulation_2 : public Triangulation_2<Gt,Tds>
+{
+public:
+  typedef Gt Geom_traits;
+  typedef typename Geom_traits::Point_2       Point;
+  typedef typename Geom_traits::Segment_2     Segment;
+  typedef typename Geom_traits::Triangle_2    Triangle;
+
+  typedef typename Geom_traits::Orientation_2 Orientation_2;
+  typedef typename Geom_traits::Compare_x_2   Compare_x;
+  typedef typename Geom_traits::Compare_y_2   Compare_y;
+  typedef typename Geom_traits::Side_of_oriented_circle_2 
+                                              Side_of_oriented_circle;
+
+  
+  typedef Triangulation_2<Gt,Tds>                       Triangulation;
+  typedef typename Triangulation::size_type             size_type;
+  typedef typename Triangulation::Locate_type           Locate_type;
+  typedef typename Triangulation::Face_handle           Face_handle;
+  typedef typename Triangulation::Vertex_handle         Vertex_handle;
+  typedef typename Triangulation::Edge                  Edge;
+  typedef typename Triangulation::Edge_circulator       Edge_circulator;
+  typedef typename Triangulation::Face_circulator       Face_circulator;
+  typedef typename Triangulation::Vertex_circulator     Vertex_circulator;
+  typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;
+  typedef typename Triangulation::Finite_faces_iterator Finite_faces_iterator;
+  typedef typename Triangulation::Finite_vertices_iterator 
+                                                     Finite_vertices_iterator;
+  typedef typename Triangulation::All_faces_iterator    All_faces_iterator;
+ 
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
+  using Triangulation::side_of_oriented_circle;
+  using Triangulation::circumcenter;
+  using Triangulation::collinear_between;
+  using Triangulation::test_dim_down;
+  using Triangulation::make_hole;
+  using Triangulation::fill_hole_delaunay;
+  using Triangulation::delete_vertex;
+#endif
+
+ Delaunay_triangulation_2(const Gt& gt = Gt())
+  : Triangulation_2<Gt,Tds>(gt) {}
+  
+  Delaunay_triangulation_2(
+	       const Delaunay_triangulation_2<Gt,Tds> &tr)
+       : Triangulation_2<Gt,Tds>(tr)
+  {   CGAL_triangulation_postcondition( is_valid() );  }
+
+ template <class InputIterator>
+ Delaunay_triangulation_2(InputIterator first, InputIterator last,
+                          const Gt& gt = Gt())
+ : Triangulation_2<Gt,Tds>(gt)
+ {
+  insert(first,last);
+ }
+
+// CHECK -QUERY
+  bool is_valid(bool verbose = false, int level = 0) const;
+
+  Vertex_handle
+  nearest_vertex(const Point& p, Face_handle f= Face_handle()) const;
+  
+  bool does_conflict(const Point  &p, Face_handle fh) const;// deprecated
+  bool test_conflict(const Point  &p, Face_handle fh, bool strict = true) const;
+  bool find_conflicts(const Point  &p,                //deprecated
+		      std::list<Face_handle>& conflicts,
+		      Face_handle start= Face_handle() ) const;
+  //  //template member functions, declared and defined at the end 
+  // template <class OutputItFaces, class OutputItBoundaryEdges> 
+  // std::pair<OutputItFaces,OutputItBoundaryEdges>
+  // get_conflicts_and_boundary(const Point  &p, 
+  // 		                OutputItFaces fit, 
+  // 		                OutputItBoundaryEdges eit,
+  // 		                Face_handle start) const;
+  // template <class OutputItFaces>
+  // OutputItFaces
+  // get_conflicts (const Point  &p, 
+  //                OutputItFaces fit, 
+  // 		    Face_handle start ) const;
+  // template <class OutputItBoundaryEdges>
+  // OutputItBoundaryEdges
+  // get_boundary_of_conflicts(const Point  &p, 
+  // 			       OutputItBoundaryEdges eit, 
+  // 			       Face_handle start ) const;
+   
+ 
+  // DUAL
+  Point dual (Face_handle f) const;
+  Object dual(const Edge &e) const ;
+  Object dual(const Edge_circulator& ec) const;
+  Object dual(const Finite_edges_iterator& ei) const;
+
+  //INSERTION-REMOVAL
+  Vertex_handle insert(const Point  &p, 
+		       Face_handle start = Face_handle() );
+  Vertex_handle insert(const Point& p,
+		       Locate_type lt,
+		       Face_handle loc, int li );
+  Vertex_handle push_back(const Point &p);
+
+  void  remove(Vertex_handle v );
+
+  // DISPLACEMENT
+  void restore_Delaunay(Vertex_handle v);
+
+  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
+  Vertex_handle move(Vertex_handle v, const Point &p);
+
+protected: // some internal stuffs
+
+  template <class OutputItFaces>
+  Vertex_handle insert_and_give_new_faces(const Point  &p, 
+                                          OutputItFaces fit,
+                                          Face_handle start = Face_handle() );
+  template <class OutputItFaces>
+  Vertex_handle insert_and_give_new_faces(const Point& p,
+                                          Locate_type lt,
+                                          Face_handle loc, int li, 
+                                          OutputItFaces fit);
+
+  template <class OutputItFaces>
+  Vertex_handle move_if_no_collision_and_give_new_faces(Vertex_handle v, 
+                                                        const Point &p, 
+                                                        OutputItFaces fit);
+
+  template <class OutputItFaces>
+  void remove_and_give_new_faces(Vertex_handle v, 
+                                 OutputItFaces fit);
+public:
+
+  bool is_delaunay_after_displacement(Vertex_handle v, 
+                                      const Point &p) const;
+
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2  
+  using Triangulation::cw;
+  using Triangulation::ccw;
+  using Triangulation::geom_traits;
+#endif
+
+private:
+#ifndef CGAL_DT2_USE_RECURSIVE_PROPAGATING_FLIP
+  void non_recursive_propagating_flip(Face_handle f,int i);
+  void propagating_flip(const Face_handle& f,int i, int depth=0);
+#else
+  void propagating_flip(const Face_handle& f,int i);
+#endif
+
+
+// auxilliary functions for remove
+  void remove_degree_init(Vertex_handle v, std::vector<Face_handle> &f,
+         std::vector<Vertex_handle> &w, std::vector<int> &i,int&d,int&maxd);
+  void remove_degree_triangulate(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i,int d);
+  void remove_degree_d(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i,int d);
+  void remove_degree3(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree4(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree5(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i );
+  void remove_degree5_star   (Vertex_handle &v, 
+     Face_handle & ,Face_handle & ,Face_handle & ,Face_handle & ,Face_handle & ,
+     Vertex_handle&,Vertex_handle&,Vertex_handle&,Vertex_handle&,Vertex_handle&,
+     int           ,int           ,int           ,int           ,int );
+  void remove_degree6(Vertex_handle v , std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree6_star   (Vertex_handle &v,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      int           ,int           ,int           ,
+			      int           ,int           ,int );
+  void remove_degree6_N      (Vertex_handle &v,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      int           ,int           ,int           ,
+			      int           ,int           ,int  );
+  void remove_degree6_antiN  (Vertex_handle &v,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      int           ,int           ,int           ,
+			      int           ,int           ,int  );
+  void remove_degree6_diamond(Vertex_handle &v,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Face_handle & ,Face_handle & ,Face_handle & ,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      Vertex_handle&,Vertex_handle&,Vertex_handle&,
+			      int           ,int           ,int           ,
+			      int           ,int           ,int  );
+  void remove_degree7(Vertex_handle v,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  bool incircle(int x, int j, int, int l, std::vector<Face_handle> &f,
+		std::vector<Vertex_handle> &w, std::vector<int> &i){
+    // k is supposed to be j+1 modulo degree, x is supposed to be finite
+    //test if w[x] inside circle w[j]w[k]w[l] (f[j] has vertices w[j]w[k])
+    // THE FOLLOWING LINE IS TO BE REMOVED. JUST THERE FOR STUPID PRECONDITION
+    //if (geom_traits().orientation_2_object()(w[j]->point(),w[k]->point(),w[l]->point())!=POSITIVE) return true;
+    f[j]->set_vertex( i[j], w[l]) ; // change vertex v for another one
+    return (test_conflict( w[x]->point(), f[j]) );
+  }
+  void rotate7(int j, std::vector<Vertex_handle> &w, 
+	       std::vector<Face_handle> &f, std::vector<int> &i);
+  void remove_degree7_star      (Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree7_zigzag    (Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree7_leftdelta (Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree7_rightdelta(Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree7_leftfan   (Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+  void remove_degree7_rightfan  (Vertex_handle&,int,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i);
+// end of auxilliary functions for remove
+
+
+
+  Vertex_handle nearest_vertex_2D(const Point& p, Face_handle f) const;
+  Vertex_handle nearest_vertex_1D(const Point& p) const;
+
+  void  look_nearest_neighbor(const Point& p,
+			      Face_handle f,
+			      int i,
+			      Vertex_handle& nn) const;
+
+public:
+  template < class Stream>
+  Stream& draw_dual(Stream & ps)
+    {
+      Finite_edges_iterator eit= this->finite_edges_begin();
+      for (; eit != this->finite_edges_end(); ++eit) {
+	Object o = dual(eit);
+	typename Geom_traits::Line_2  l;
+	typename Geom_traits::Ray_2   r;
+	Segment s;
+	if (CGAL::assign(s,o)) ps << s;
+	if (CGAL::assign(r,o)) ps << r;
+	if (CGAL::assign(l,o)) ps << l;
+      }
+      return ps;
+    }
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first, InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+                typename std::iterator_traits<InputIterator>::value_type,
+                Point
+            >
+          >::type* = NULL
+  )
+#else
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert(InputIterator first, InputIterator last)
+#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO 
+    {
+      size_type n = this->number_of_vertices();
+
+      std::vector<Point> points (first, last);
+      spatial_sort (points.begin(), points.end(), geom_traits());
+      Face_handle f;
+      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+              p != end; ++p)
+          f = insert (*p, f)->face();
+
+      return this->number_of_vertices() - n;
+    }
+
+#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+private:  
+  //top stands for tuple-or-pair
+  template <class Info>
+  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
+  template <class Info>
+  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
+  template <class Info>
+  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
+  template <class Info>
+  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
+
+  template <class Tuple_or_pair,class InputIterator>
+  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
+  {
+    size_type n = this->number_of_vertices();
+    std::vector<std::ptrdiff_t> indices;
+    std::vector<Point> points;
+    std::vector<typename Tds::Vertex::Info> infos;
+    std::ptrdiff_t index=0;
+    for (InputIterator it=first;it!=last;++it){
+      Tuple_or_pair value=*it;
+      points.push_back( top_get_first(value)  );
+      infos.push_back ( top_get_second(value) );
+      indices.push_back(index++);
+    }
+
+    typedef Spatial_sort_traits_adapter_2<Geom_traits,Point*> Search_traits;
+    
+    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
+
+    Vertex_handle v_hint;
+    Face_handle hint;
+    for (typename std::vector<std::ptrdiff_t>::const_iterator
+      it = indices.begin(), end = indices.end();
+      it != end; ++it){
+      v_hint = insert(points[*it], hint);
+      if (v_hint!=Vertex_handle()){
+        v_hint->info()=infos[*it];
+        hint=v_hint->face();
+      }
+    }
+    
+    return this->number_of_vertices() - n;
+  }
+  
+public:
+
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first,
+          InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+              typename std::iterator_traits<InputIterator>::value_type,
+              std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type>
+            > >::type* =NULL
+  )
+  {
+    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
+  }
+
+  template <class  InputIterator_1,class InputIterator_2>
+  std::ptrdiff_t
+  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
+          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
+          typename boost::enable_if<
+            boost::mpl::and_<
+              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
+              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Tds::Vertex>::type >
+            >
+          >::type* =NULL
+  )
+  {
+    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Tds::Vertex>::type> >(first,last);
+  }
+#endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  get_conflicts_and_boundary(const Point  &p, 
+			     OutputItFaces fit, 
+			     OutputItBoundaryEdges eit,
+			     Face_handle start = Face_handle(),
+                             bool strict = true) const {
+    CGAL_triangulation_precondition( this->dimension() == 2);
+    int li;
+    Locate_type lt;
+    Face_handle fh = this->locate(p,lt,li, start);
+    switch(lt) {
+    case Triangulation::OUTSIDE_AFFINE_HULL:
+    case Triangulation::VERTEX:
+      return std::make_pair(fit,eit);
+    case Triangulation::FACE:
+    case Triangulation::EDGE:
+    case Triangulation::OUTSIDE_CONVEX_HULL:
+      *fit++ = fh; //put fh in OutputItFaces
+      std::pair<OutputItFaces,OutputItBoundaryEdges>
+	pit = std::make_pair(fit,eit);
+      pit = propagate_conflicts(p,fh,0,pit, strict);
+      pit = propagate_conflicts(p,fh,1,pit, strict);
+      pit = propagate_conflicts(p,fh,2,pit, strict);
+      return pit;    
+    }
+    CGAL_triangulation_assertion(false);
+    return std::make_pair(fit,eit);
+  } 
+
+  template <class OutputItFaces> 
+  OutputItFaces
+  get_conflicts (const Point  &p, 
+		 OutputItFaces fit, 
+		 Face_handle start= Face_handle(),
+                 bool strict = true) const {
+    std::pair<OutputItFaces,Emptyset_iterator> pp = 
+      get_conflicts_and_boundary(p,fit,Emptyset_iterator(),start, strict);
+    return pp.first;
+  }
+
+  template <class OutputItBoundaryEdges> 
+  OutputItBoundaryEdges
+  get_boundary_of_conflicts(const Point  &p, 
+			    OutputItBoundaryEdges eit, 
+			    Face_handle start= Face_handle(),
+                            bool strict = true) const {
+    std::pair<Emptyset_iterator, OutputItBoundaryEdges> pp = 
+      get_conflicts_and_boundary(p,Emptyset_iterator(),eit,start,strict);
+    return pp.second;
+  }
+
+private:
+  
+
+
+
+#ifdef CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  propagate_conflicts (const Point  &p,
+		       const Face_handle fh, 
+		       const int i,
+		       std::pair<OutputItFaces,OutputItBoundaryEdges>
+		       pit,
+                       bool strict = true)  const {
+    Face_handle fn = fh->neighbor(i);
+    if (! test_conflict(p,fn,strict)) {
+      *(pit.second)++ = Edge(fn, fn->index(fh));
+    } else {
+      *(pit.first)++ = fn;
+      int j = fn->index(fh);
+      pit = propagate_conflicts(p,fn,ccw(j),pit,strict);
+      pit = propagate_conflicts(p,fn,cw(j), pit,strict);
+    }
+    return pit;
+  }
+#else // NO CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  non_recursive_propagate_conflicts ( const Point  &p,
+                                      const Face_handle fh, 
+                                      const int i,
+		                      std::pair<OutputItFaces,OutputItBoundaryEdges> pit,
+                                      bool strict = true)  const 
+  {
+    std::stack<std::pair<Face_handle, int> > stack;
+    stack.push( std::make_pair(fh,i) );
+    while ( !stack.empty() )
+    {
+      const Face_handle fh=stack.top().first;
+      const int i=stack.top().second;
+      stack.pop();
+      Face_handle fn = fh->neighbor(i);
+      if (! test_conflict(p,fn,strict)) {
+        *(pit.second)++ = Edge(fn, fn->index(fh));
+      } else {
+        *(pit.first)++ = fn;
+        int j = fn->index(fh);
+        stack.push( std::make_pair(fn,ccw(j)) );
+        stack.push( std::make_pair(fn,cw(j)) );
+      }
+    }
+    return pit;
+  }
+
+  template <class OutputItFaces, class OutputItBoundaryEdges> 
+  std::pair<OutputItFaces,OutputItBoundaryEdges>
+  propagate_conflicts (const Point  &p,
+		       const Face_handle fh, 
+		       const int i,
+		       std::pair<OutputItFaces,OutputItBoundaryEdges>
+		       pit,
+                       bool strict = true,
+                       int depth=0)  const 
+  {
+    if (depth == 100)
+      return non_recursive_propagate_conflicts(p, fh, i, pit, strict);
+
+    Face_handle fn = fh->neighbor(i);
+    if (! test_conflict(p,fn,strict)) {
+      *(pit.second)++ = Edge(fn, fn->index(fh));
+    } else {
+      *(pit.first)++ = fn;
+      int j = fn->index(fh);
+      pit = propagate_conflicts(p,fn,ccw(j),pit, strict, depth+1);
+      pit = propagate_conflicts(p,fn,cw(j), pit, strict, depth+1);
+    }
+    return pit;
+  }
+#endif // NO CGAL_DT2_USE_RECURSIVE_PROPAGATE_CONFLICTS
+
+protected:
+
+  void restore_edges(Vertex_handle v)
+  {
+    std::list<Edge> edges;
+    Face_circulator fc = this->incident_faces(v), done(fc);
+    int degree = 0;
+    do {
+      if((++degree) > 3) break;
+    } while(++fc != done);
+    fc = this->incident_faces(v);
+    done = fc;
+    if(degree == 3) {
+      do {
+        int i = fc->index(v);
+        edges.push_back(Edge(fc, i));
+      } while(++fc != done);
+    } else {
+      do {
+        int i = fc->index(v);
+        edges.push_back(Edge(fc, i));
+        edges.push_back(Edge(fc, this->cw(i)));
+      } while(++fc != done);
+    }
+    while(!edges.empty()) {
+      const Edge &e = edges.front();
+      Face_handle f = e.first;
+      int i = e.second;
+      edges.pop_front();
+      if(this->is_infinite(f->vertex(i))) continue;
+      Face_handle fi = f->neighbor(i);
+      int mi = this->_tds.mirror_index(f, i);
+      Vertex_handle vm = this->_tds.mirror_vertex(f, i);
+      if(this->is_infinite(vm)) continue;
+      if(this->side_of_oriented_circle(f, vm->point(),true) == ON_POSITIVE_SIDE) {
+        this->_tds.flip(f, i);
+        edges.push_back(Edge(f, i));
+        edges.push_back(Edge(f, this->cw(i)));
+        edges.push_back(Edge(fi, this->cw(mi)));
+        edges.push_back(Edge(fi, mi));
+      }
+    }
+  }
+
+  void restore_edges(Vertex_handle v, std::set<Face_handle> &faces)
+  {
+    typedef std::list<Edge> Edges_list;	
+    Edges_list edges;
+    Face_circulator fc = this->incident_faces(v), done(fc);
+    int degree = 0;
+    do {
+      if((++degree) > 3) break;
+    } while(++fc != done);
+    fc = this->incident_faces(v);
+    done = fc;
+    if(degree == 3) {
+      do {
+        int i = fc->index(v);
+        edges.push_back(Edge(fc, i));
+      } while(++fc != done);
+    } else {
+      do {
+        int i = fc->index(v);
+        edges.push_back(Edge(fc, i));
+        edges.push_back(Edge(fc, this->cw(i)));
+      } while(++fc != done);
+    }
+    while(!edges.empty()) {
+      const Edge &e = edges.front();
+      Face_handle f = e.first;
+      int i = e.second;
+      edges.pop_front();
+      faces.insert(f);
+      if(this->is_infinite(f->vertex(i))) continue;
+      Face_handle fi = f->neighbor(i);
+      int mi = this->_tds.mirror_index(f, i);
+      Vertex_handle vm = this->_tds.mirror_vertex(f, i);
+      if(this->is_infinite(vm)) continue;
+      if(this->side_of_oriented_circle(f, vm->point()) == ON_POSITIVE_SIDE) {
+        this->_tds.flip(f, i);
+        edges.push_back(Edge(f, i));
+        edges.push_back(Edge(f, this->cw(i)));
+        edges.push_back(Edge(fi, this->cw(mi)));
+        edges.push_back(Edge(fi, mi));
+      }
+    }
+  }
+
+};
+
+template < class Gt, class Tds >
+inline bool
+Delaunay_triangulation_2<Gt,Tds>::
+test_conflict(const Point  &p, Face_handle fh, bool strict) const
+{
+  if(! strict){
+    Oriented_side os = side_of_oriented_circle(fh,p,false);
+    return os == ON_POSITIVE_SIDE;
+  }
+  // return true  if P is inside the circumcircle of fh
+  // if fh is infinite, return true when p is in the positive
+  // halfspace or on the boundary and in the  finite edge of fh
+  Oriented_side os = side_of_oriented_circle(fh,p,true);
+  if (os == ON_POSITIVE_SIDE) return true;
+ 
+  if (os == ON_ORIENTED_BOUNDARY && this->is_infinite(fh)) {
+    int i = fh->index(this->infinite_vertex());
+    return collinear_between(fh->vertex(cw(i))->point(), p,
+			     fh->vertex(ccw(i))->point() );
+  }
+
+  return false;
+}
+
+template < class Gt, class Tds >
+inline bool
+Delaunay_triangulation_2<Gt,Tds>::
+does_conflict(const Point  &p, Face_handle fh) const
+{
+  return test_conflict(p,fh);
+}
+
+template < class Gt, class Tds >
+inline bool
+Delaunay_triangulation_2<Gt,Tds>::
+find_conflicts(const Point  &p, 
+	       std::list<Face_handle>& conflicts,
+	       Face_handle start ) const
+{
+  get_conflicts(p, std::back_inserter(conflicts), start);
+  return (! conflicts.empty());
+}
+
+template < class Gt, class Tds >
+bool
+Delaunay_triangulation_2<Gt,Tds>::
+is_valid(bool verbose, int level) const
+{
+  bool result = Triangulation_2<Gt,Tds>::is_valid(verbose, level);
+
+  for( Finite_faces_iterator it = this->finite_faces_begin(); 
+       it != this->finite_faces_end() ; it++) {
+    for(int i=0; i<3; i++) {
+      if ( ! this->is_infinite( this->mirror_vertex(it,i))) {
+	result = result &&  ON_POSITIVE_SIDE != 
+	  side_of_oriented_circle( it, this->mirror_vertex(it,i)->point(), false);
+      }
+      CGAL_triangulation_assertion( result );
+    }
+  }
+  return result;
+}
+
+template < class Gt, class Tds >
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>:: 
+nearest_vertex(const Point  &p, Face_handle f) const
+{
+  switch (this->dimension()) {
+  case 0:
+    if (this->number_of_vertices() == 0) return Vertex_handle();
+    if (this->number_of_vertices() == 1) return this->finite_vertex();
+    //break;
+  case 1:
+    return nearest_vertex_1D(p);
+    //break;      
+  case 2:
+    return nearest_vertex_2D(p,f);
+    //break;
+  }
+  return Vertex_handle();
+}
+  
+template < class Gt, class Tds >
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>:: 
+nearest_vertex_2D(const Point& p, Face_handle f) const
+{
+  CGAL_triangulation_precondition(this->dimension() == 2);
+  f = this->locate(p,f);
+
+  typename Geom_traits::Compare_distance_2 
+    compare_distance =  this->geom_traits().compare_distance_2_object();
+  Vertex_handle nn =  !this->is_infinite(f->vertex(0)) ? f->vertex(0):f->vertex(1);
+  if ( !this->is_infinite(f->vertex(1)) && compare_distance(p,
+					    f->vertex(1)->point(),
+					    nn->point()) == SMALLER) 
+    nn=f->vertex(1);
+  if ( !this->is_infinite(f->vertex(2)) && compare_distance(p,
+					    f->vertex(2)->point(), 
+					    nn->point()) == SMALLER) 
+    nn=f->vertex(2);
+       
+  look_nearest_neighbor(p,f,0,nn);
+  look_nearest_neighbor(p,f,1,nn);
+  look_nearest_neighbor(p,f,2,nn);
+  return nn;
+}
+
+template < class Gt, class Tds >
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>:: 
+nearest_vertex_1D(const Point& p) const
+{
+  typename Geom_traits::Compare_distance_2 
+    compare_distance =  this->geom_traits().compare_distance_2_object();
+  Vertex_handle nn;
+  
+  Finite_vertices_iterator vit=this->finite_vertices_begin();
+  nn = vit;
+  for ( ; vit != this->finite_vertices_end(); ++vit){
+    if (compare_distance(p, vit->point(), nn->point()) == SMALLER) 
+      nn = vit;
+  } 
+  return nn;
+}
+  
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+look_nearest_neighbor(const Point& p,
+                      Face_handle f,
+		      int i,
+		      Vertex_handle& nn) const
+{
+  Face_handle  ni=f->neighbor(i);
+  if ( ON_POSITIVE_SIDE != side_of_oriented_circle(ni,p,true) ) return;
+
+  typename Geom_traits::Compare_distance_2 
+    compare_distance =  this->geom_traits().compare_distance_2_object();
+  i = ni->index(f);
+  if ( !this->is_infinite(ni->vertex(i)) &&
+       compare_distance(p, 
+	      ni->vertex(i)->point(),
+	      nn->point())  == SMALLER)  nn=ni->vertex(i);
+    
+  // recursive exploration of triangles whose circumcircle contains p
+  look_nearest_neighbor(p, ni, ccw(i), nn);
+  look_nearest_neighbor(p, ni, cw(i), nn);
+} 
+
+//DUALITY
+template<class Gt, class Tds>
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Point
+Delaunay_triangulation_2<Gt,Tds>::
+dual (Face_handle f) const
+{
+  CGAL_triangulation_precondition(this->_tds.is_face(f));
+  CGAL_triangulation_precondition (this->dimension()==2);
+  return circumcenter(f);
+}
+
+  
+template < class Gt, class Tds >
+Object
+Delaunay_triangulation_2<Gt,Tds>::
+dual(const Edge &e) const
+{
+  CGAL_triangulation_precondition(this->_tds.is_edge(e.first,e.second));
+  
+  typedef typename Geom_traits::Line_2        Line;
+  typedef typename Geom_traits::Ray_2         Ray;
+
+  CGAL_triangulation_precondition (!this->is_infinite(e));
+  if( this->dimension()== 1 ){
+    const Point& p = (e.first)->vertex(cw(e.second))->point();
+    const Point& q = (e.first)->vertex(ccw(e.second))->point();
+    Line l  = this->geom_traits().construct_bisector_2_object()(p,q);
+    return make_object(l);
+  }
+		    
+  // dimension==2
+  if( (!this->is_infinite(e.first)) &&
+      (!this->is_infinite(e.first->neighbor(e.second))) ) {
+    Segment s = this->geom_traits().construct_segment_2_object()
+                          (dual(e.first),dual(e.first->neighbor(e.second)));
+    return make_object(s);
+  } 
+  // one of the adjacent faces is infinite
+  Face_handle f; int i;
+  if (this->is_infinite(e.first)) {
+    f=e.first->neighbor(e.second); i=f->index(e.first);
+  }
+  else {
+    f=e.first; i=e.second;
+  }
+  const Point& p = f->vertex(cw(i))->point();
+  const Point& q = f->vertex(ccw(i))->point();
+  Line l = this->geom_traits().construct_bisector_2_object()(p,q);
+  Ray r = this->geom_traits().construct_ray_2_object()(dual(f), l);
+  return make_object(r);
+}
+  
+template < class Gt, class Tds >
+inline Object
+Delaunay_triangulation_2<Gt,Tds>::  
+dual(const Edge_circulator& ec) const
+{
+  return dual(*ec);
+}
+
+template < class Gt, class Tds >
+inline Object
+Delaunay_triangulation_2<Gt,Tds>::
+dual(const Finite_edges_iterator& ei) const
+{
+  return dual(*ei);
+}
+
+
+///////////////////////////////////////////////////////////////
+//  INSERT
+
+template < class Gt, class Tds >
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>::
+insert(const Point  &p,  Face_handle start)
+{
+  Locate_type lt;
+  int li;
+  Face_handle loc = this->locate (p, lt, li, start);
+  return insert(p, lt, loc, li);
+}
+  
+template < class Gt, class Tds >
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>::
+push_back(const Point &p)
+{
+  return insert(p);
+}
+  
+template < class Gt, class Tds >
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>::
+insert(const Point  &p, Locate_type lt, Face_handle loc, int li)
+{
+  Vertex_handle v = Triangulation_2<Gt,Tds>::insert(p,lt,loc,li);
+  restore_Delaunay(v);
+  return(v);
+}
+
+template < class Gt, class Tds >
+template < class OutputItFaces >
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
+Delaunay_triangulation_2<Gt,Tds>::
+insert_and_give_new_faces(const Point  &p, 
+                          OutputItFaces oif,
+                          Face_handle start)
+{
+  Vertex_handle v = insert(p, start);
+  int dimension = this->dimension();
+  if(dimension == 2)
+  {
+    Face_circulator fc = this->incident_faces(v), done(fc);
+    do {
+      *oif++ = fc;
+    } while(++fc != done);
+  }
+  else if(dimension == 1)
+  {
+    Face_handle c = v->face();
+    *oif++ = c;
+    *oif++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *oif++ = v->face(); // dimension == 0
+  return v;
+}
+		
+template < class Gt, class Tds >
+template < class OutputItFaces >
+inline
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
+Delaunay_triangulation_2<Gt,Tds>::
+insert_and_give_new_faces(const Point  &p,
+                          Locate_type lt,
+                          Face_handle loc, int li, 
+                          OutputItFaces oif)
+{
+  Vertex_handle v = insert(p, lt, loc, li);
+  int dimension = this->dimension();
+  if(dimension == 2)
+  {
+    Face_circulator fc = this->incident_faces(v), done(fc);
+    do {
+      *oif++ = fc;
+    } while(++fc != done);
+  }
+  else if(dimension == 1)
+  {
+    Face_handle c = v->face();
+    *oif++ = c;
+    *oif++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *oif++ = v->face(); // dimension == 0	
+  return v;	
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+restore_Delaunay(Vertex_handle v)
+{
+  if(this->dimension() <= 1) return;
+
+  Face_handle f=v->face();
+  Face_handle next;
+  int i;
+  Face_handle start(f);
+  do {
+    i = f->index(v);
+    next = f->neighbor(ccw(i));  // turn ccw around v
+    propagating_flip(f,i);
+    f=next;
+  } while(next != start);
+  return;
+}
+
+#ifndef CGAL_DT2_USE_RECURSIVE_PROPAGATING_FLIP
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+non_recursive_propagating_flip(Face_handle f , int i)
+{
+  std::stack<Edge> edges;
+  const Vertex_handle& vp = f->vertex(i);
+  const Point& p = vp->point();
+  edges.push(Edge(f,i));
+
+  while(! edges.empty()){
+    const Edge& e = edges.top();
+    f = e.first; 
+    i = e.second;
+    const Face_handle& n = f->neighbor(i);
+    
+    if ( ON_POSITIVE_SIDE != 
+         side_of_oriented_circle(n,  p, true) ) {
+      edges.pop();
+      continue;
+    }
+    this->flip(f, i);
+    // As we haven't popped it, we don't have to push it
+    edges.push(Edge(n,n->index(vp)));
+  }
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+propagating_flip(const Face_handle& f,int i, int depth)
+{
+#ifdef CGAL_DT2_IMMEDIATELY_NON_RECURSIVE_PROPAGATING_FLIP
+  non_recursive_propagating_flip(f,i);
+#else
+  int max_depth = 100;
+  if(depth==max_depth){
+    non_recursive_propagating_flip(f,i);
+    return;
+  }
+  Face_handle n = f->neighbor(i);
+      
+  if ( ON_POSITIVE_SIDE != 
+       side_of_oriented_circle(n,  f->vertex(i)->point(), true) ) {
+    return;
+  }
+  this->flip(f, i);
+  propagating_flip(f,i,depth+1);
+  i = n->index(f->vertex(i));
+  propagating_flip(n,i,depth+1);
+#endif
+}
+#else 
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+propagating_flip(const Face_handle& f,int i)
+{
+ 
+  Face_handle n = f->neighbor(i);
+      
+  if ( ON_POSITIVE_SIDE != 
+       side_of_oriented_circle(n,  f->vertex(i)->point(), true) ) {
+    return;
+  }
+  this->flip(f, i);
+  propagating_flip(f,i);
+  i = n->index(f->vertex(i));
+  propagating_flip(n,i);
+}
+#endif
+
+///////////////////////////////////////////////////////////////
+//  REMOVE    see INRIA RResearch Report 7104
+
+template < class Gt, class Tds >
+template <class OutputItFaces>
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
+{
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !this->is_infinite(v));
+    
+  if(this->number_of_vertices() == 1) this->remove_first(v);
+  else if(this->number_of_vertices() == 2) this->remove_second(v);
+  else if( this->dimension() == 1) 
+  {
+    Point p = v->point();
+    Triangulation::remove(v);
+    *fit++ = this->locate(p);
+  }
+  else if (this->test_dim_down(v)) {  
+    this->_tds.remove_dim_down(v);  
+    for(All_faces_iterator afi = this-> all_faces_begin(); 
+        afi != this->all_faces_end(); 
+        afi++) *fit++ = afi;
+  }
+  else {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Face_handle> , f, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<int>, i, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Vertex_handle>, w, maxd);
+
+    int d;
+    remove_degree_init(v,f,w,i,d,maxd);
+    remove_degree_triangulate(v,f,w,i,d);
+    this->delete_vertex(v);
+    Face_circulator fc(v[0]),done;
+    do *fit++ = fc++; while (fc!=done);
+  }
+  return;		
+}
+
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove(Vertex_handle v)
+{
+  int d;
+
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !this->is_infinite(v));
+
+  if ( this->dimension() <= 1) { Triangulation::remove(v); return; }
+
+  CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30);
+  CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Face_handle> , f, maxd);
+  CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<int>, i, maxd);
+  CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Vertex_handle>, w, maxd);
+
+  remove_degree_init(v,f,w,i,d,maxd);
+  if (d == 0) return; //  dim is going down
+  remove_degree_triangulate(v,f,w,i,d);
+  this->delete_vertex(v);
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree_init(Vertex_handle v, std::vector<Face_handle> &f,
+		   std::vector<Vertex_handle> &w, std::vector<int> &i,
+		   int &d, int &maxd)
+{
+  f[0] = v->face();d=0;
+  do{
+    i[d] = f[d]->index(v);
+    w[d] = f[d]->vertex( ccw(i[d]) );
+    if(this->is_infinite(w[d])) {
+      f[0] = f[d]; i[0]=i[d]; w[0]=w[d];
+      w[0]->set_face( f[0]->neighbor(i[0]));
+      f[1] = f[0]->neighbor( ccw(i[0]) );
+      i[1] = f[1]->index(v);
+      w[1] = f[1]->vertex( ccw(i[1]) );
+      if ( this->is_infinite( f[1]->neighbor( i[1] ) ) ){//otherwise dim remains 2
+	if ( this->test_dim_down(v) ) {
+	  d=0;
+	  this->tds().remove_dim_down(v);
+	  return; 
+	}
+      }
+      d=1;
+    }
+    w[d]->set_face( f[d]->neighbor(i[d]));//do no longer bother about set_face 
+    ++d;
+    if ( d==maxd) { maxd *=2; f.resize(maxd); w.resize(maxd); i.resize(maxd);}
+    f[d] = f[d-1]->neighbor( ccw(i[d-1]) );
+  } while(f[d]!=f[0]);
+  // all vertices finite but possibly w[0]
+}
+
+
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree_triangulate(Vertex_handle v,
+                          std::vector<Face_handle> &f,
+                          std::vector<Vertex_handle> &w, 
+                          std::vector<int> &i,int d)
+{
+  switch (d) {
+  case 3:
+    remove_degree3(v,f,w,i);    break;
+  case 4:
+    remove_degree4(v,f,w,i);    break;
+  case 5:
+    remove_degree5(v,f,w,i);    break;
+  case 6:
+    remove_degree6(v,f,w,i);    break;
+  case 7:
+    remove_degree7(v,f,w,i);    break;
+  default:
+    remove_degree_d(v,f,w,i,d);    break;
+  }
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree_d(Vertex_handle v, std::vector<Face_handle> &,
+                std::vector<Vertex_handle> &, 
+                std::vector<int> &,int)
+{
+  // removing a degree d vertex, (dim is not going down)
+  // this is the old removal procedure that is used now only if d > 7
+
+    std::list<Edge> hole;
+    make_hole(v, hole);
+    fill_hole_delaunay(hole);
+    return;
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree3(Vertex_handle, std::vector<Face_handle> &f,
+	       std::vector<Vertex_handle> &, std::vector<int> &i)
+{
+  // removing a degree 3 vertex
+  // only w[0] can be infinite
+
+  // modify the triangulation
+  Face_handle nn= f[1]->neighbor( i[1] );
+  this->tds().set_adjacency(f[0], ccw(i[0]) , nn , nn->index(f[1])  );
+  nn= f[2]->neighbor( i[2] );
+  this->tds().set_adjacency(f[0], cw(i[0]) , nn , nn->index(f[2])  );
+  f[0]->set_vertex  (            i[0] , f[1]->vertex( cw(i[1]) ) );
+  
+  // clean container
+  this->tds().delete_face(f[1]);
+  this->tds().delete_face(f[2]);
+  
+  return;
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree4(Vertex_handle, std::vector<Face_handle> &f,
+	       std::vector<Vertex_handle> &w, std::vector<int> &i )
+{
+  // removing a degree 4 vertex
+  // only w[0] can be infinite
+
+  Face_handle nn;
+  // modify f[0] f[1] for incircle test
+  f[0]->set_vertex( i[0], w[3] ); //w0 w1 w3
+
+  if ( !test_conflict( w[2]->point(), f[0]) )  {
+    // diagonal 1 3
+    f[1]->set_vertex( i[1], w[3] ); //w1 w2 w3
+    nn = f[3]->neighbor( i[3] );
+    this->tds().set_adjacency(f[0], cw(i[0]) , nn , nn->index(f[3])  );
+    nn = f[2]->neighbor( i[2] );
+    this->tds().set_adjacency(f[1], ccw(i[1]) , nn , nn->index(f[2]) );
+    // clean container
+    this->tds().delete_face(f[2]);
+    this->tds().delete_face(f[3]);
+  }else{
+    // diagonal 0 2
+    f[0]->set_vertex( i[0], w[2]); //w0 w1 w2
+    f[3]->set_vertex( i[3], w[2]); //w3 w0 w2
+    nn = f[1]->neighbor( i[1] );
+    this->tds().set_adjacency(f[0], ccw(i[0]) , nn , nn->index(f[1])  );
+    nn = f[2]->neighbor( i[2] );
+    this->tds().set_adjacency(f[3], cw(i[3]) , nn , nn->index(f[2])  );
+    // clean container
+    this->tds().delete_face(f[1]);
+    this->tds().delete_face(f[2]);
+  }
+
+  return;
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree5(Vertex_handle v, std::vector<Face_handle> &f,
+	       std::vector<Vertex_handle> &w, std::vector<int> &i )
+{  
+  // removing a degree 5 vertex
+  // only w[0] can be infinite
+
+  if (incircle(3,0,1,2,f,w,i)) {
+    if (incircle(4,0,1,3,f,w,i)) {
+      if (incircle(4,1,2,3,f,w,i)) {
+	// star from 4
+	remove_degree5_star(v,f[4],f[0],f[1],f[2],f[3],
+			      w[4],w[0],w[1],w[2],w[3],
+			      i[4],i[0],i[1],i[2],i[3]);
+      }else{
+	//star from 1
+	remove_degree5_star(v,f[1],f[2],f[3],f[4],f[0],
+			      w[1],w[2],w[3],w[4],w[0],
+			      i[1],i[2],i[3],i[4],i[0]);
+			      
+			      
+      }
+    }else{
+      // star from 3
+      remove_degree5_star(v,f[3],f[4],f[0],f[1],f[2],
+			    w[3],w[4],w[0],w[1],w[2],
+			    i[3],i[4],i[0],i[1],i[2]);
+    }
+  } else {
+    if (incircle(4,2,3,0,f,w,i)){
+      if (incircle(4,0,1,2,f,w,i)){
+	// star from 4
+	remove_degree5_star(v,f[4],f[0],f[1],f[2],f[3],
+			      w[4],w[0],w[1],w[2],w[3],
+			      i[4],i[0],i[1],i[2],i[3]);
+      }else{
+	//star from 2
+	remove_degree5_star(v,f[2],f[3],f[4],f[0],f[1],
+			      w[2],w[3],w[4],w[0],w[1],
+			      i[2],i[3],i[4],i[0],i[1]);
+      }
+    }else{
+      // star from 0
+      remove_degree5_star(v,f[0],f[1],f[2],f[3],f[4],
+			    w[0],w[1],w[2],w[3],w[4],
+			    i[0],i[1],i[2],i[3],i[4]);
+    }
+  }
+  
+  return;
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::remove_degree5_star
+(
+ Vertex_handle &,
+ Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
+ Face_handle &  f3, Face_handle &  f4,
+ Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
+ Vertex_handle &, Vertex_handle &,
+ int i0, int i1, int i2, int i3, int i4 )
+{ // removing a degree 5 vertex, staring from v0
+  Face_handle nn;
+  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
+  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
+  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
+  nn = f0->neighbor( i0 );
+  this->tds().set_adjacency(f1, cw(i1) , nn , nn->index(f0) );
+  nn = f4->neighbor( i4 );
+  this->tds().set_adjacency(f3, ccw(i3) , nn , nn->index(f4) );
+  this->tds().delete_face(f0);
+  this->tds().delete_face(f4);
+}
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree6(Vertex_handle v, std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i)
+{
+  // removing a degree 6 vertex
+  // only w[0] can be infinite
+
+  if(incircle(1,2,3,0,f,w,i)){
+    if(incircle(4,2,3,5,f,w,i)){
+      if(incircle(1,2,3,4,f,w,i)){
+	if(incircle(4,0,1,3,f,w,i)){
+	  if(incircle(5,0,1,4,f,w,i)){
+	    remove_degree6_star(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	  }else{
+	    remove_degree6_N(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	  }}else{
+	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	}}else{
+	if(incircle(5,1,2,4,f,w,i)){
+	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
+			   w[2],w[3],w[4],w[5],w[0],w[1],
+			   i[2],i[3],i[4],i[5],i[0],i[1]);
+	}else{
+	  if(incircle(5,0,1,4,f,w,i)){
+	    remove_degree6_antiN(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	  }else{
+	    remove_degree6_star(v,f[4],f[5],f[0],f[1],f[2],f[3],
+				w[4],w[5],w[0],w[1],w[2],w[3],
+				i[4],i[5],i[0],i[1],i[2],i[3]);
+	  }}}}else{
+      if(incircle(1,2,3,5,f,w,i)){
+	if(incircle(1,3,4,5,f,w,i)){
+	  if(incircle(4,0,1,3,f,w,i)){
+	    if(incircle(5,0,1,4,f,w,i)){
+	    remove_degree6_star(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	    }else{
+	    remove_degree6_N(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	    }}else{
+	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	  }}else{
+	  if(incircle(5,0,1,3,f,w,i)){
+	    remove_degree6_diamond(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	  }else{
+	    if(incircle(4,5,0,3,f,w,i)){
+	  remove_degree6_antiN(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	    }else{
+	    remove_degree6_star(v,f[3],f[4],f[5],f[0],f[1],f[2],
+				w[3],w[4],w[5],w[0],w[1],w[2],
+				i[3],i[4],i[5],i[0],i[1],i[2]);
+	    }}}}else{
+	    remove_degree6_star(v,f[5],f[0],f[1],f[2],f[3],f[4],
+				w[5],w[0],w[1],w[2],w[3],w[4],
+				i[5],i[0],i[1],i[2],i[3],i[4]);
+      }}}else{
+    if(incircle(4,2,3,5,f,w,i)){
+      if(incircle(4,2,3,0,f,w,i)){
+	if(incircle(4,0,1,2,f,w,i)){
+	  if(incircle(4,1,2,5,f,w,i)){
+	    if(incircle(4,0,1,5,f,w,i)){
+	    remove_degree6_star(v,f[4],f[5],f[0],f[1],f[2],f[3],
+				w[4],w[5],w[0],w[1],w[2],w[3],
+				i[4],i[5],i[0],i[1],i[2],i[3]);
+	    }else{
+	    remove_degree6_antiN(v,f[1],f[2],f[3],f[4],f[5],f[0],
+				w[1],w[2],w[3],w[4],w[5],w[0],
+				i[1],i[2],i[3],i[4],i[5],i[0]);
+	    }}else{
+	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
+			   w[2],w[3],w[4],w[5],w[0],w[1],
+			   i[2],i[3],i[4],i[5],i[0],i[1]);
+	  }}else{
+	  if(incircle(4,5,0,2,f,w,i)){
+	  remove_degree6_diamond(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	  }else{
+	    if(incircle(5,0,1,2,f,w,i)){
+	  remove_degree6_N(v,f[2],f[3],f[4],f[5],f[0],f[1],
+			   w[2],w[3],w[4],w[5],w[0],w[1],
+			   i[2],i[3],i[4],i[5],i[0],i[1]);
+	    }else{
+	  remove_degree6_star(v,f[2],f[3],f[4],f[5],f[0],f[1],
+			   w[2],w[3],w[4],w[5],w[0],w[1],
+			   i[2],i[3],i[4],i[5],i[0],i[1]);
+	    }}}}else{
+	  remove_degree6_star(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+      }}else{
+      if(incircle(5,2,3,0,f,w,i)){
+	if(incircle(5,0,1,2,f,w,i)){
+	  remove_degree6_star(v,f[5],f[0],f[1],f[2],f[3],f[4],
+			       w[5],w[0],w[1],w[2],w[3],w[4],
+			      i[5],i[0],i[1],i[2],i[3],i[4]);
+	}else{
+	  remove_degree6_antiN(v,f[2],f[3],f[4],f[5],f[0],f[1],
+			   w[2],w[3],w[4],w[5],w[0],w[1],
+			   i[2],i[3],i[4],i[5],i[0],i[1]);
+	}}else{
+	  if(incircle(4,5,0,3,f,w,i)){
+	  remove_degree6_star(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	  }else{
+	  remove_degree6_N(v,f[0],f[1],f[2],f[3],f[4],f[5],
+			       w[0],w[1],w[2],w[3],w[4],w[5],
+			       i[0],i[1],i[2],i[3],i[4],i[5]);
+	  }}}}
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::remove_degree6_star
+(
+ Vertex_handle &,
+ Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
+ Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
+ Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
+ Vertex_handle &, Vertex_handle &, Vertex_handle &,
+ int i0, int i1, int i2, int i3, int i4, int i5 )
+{ // removing a degree 6 vertex, staring from v0
+  Face_handle nn;
+  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
+  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
+  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
+  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
+  nn = f0->neighbor( i0 );
+  this->tds().set_adjacency(f1, cw(i1), nn, nn->index(f0));
+  nn = f5->neighbor( i5 );
+  this->tds().set_adjacency(f4, ccw(i4), nn,  nn->index(f5));
+  this->tds().delete_face(f0);
+  this->tds().delete_face(f5);
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::remove_degree6_N
+(
+ Vertex_handle &,
+ Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
+ Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
+ Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
+ Vertex_handle &v3, Vertex_handle &, Vertex_handle &,
+ int i0, int i1, int i2, int i3, int i4, int i5 )
+{ // removing a degree 6 vertex, N configuration with diagonal v0v3
+  Face_handle nn;
+  f1->set_vertex( i1, v0) ;  // f1 = v1v2v0
+  f2->set_vertex( i2, v0) ;  // f2 = v2v3v0
+  f4->set_vertex( i4, v3) ;  // f4 = v4v5v3
+  f5->set_vertex( i5, v3) ;  // f5 = v5v0v3
+  nn = f0->neighbor( i0 );
+  this->tds().set_adjacency(f1, cw(i1) , nn , nn->index(f0)  );
+  nn = f3->neighbor( i3 );
+  this->tds().set_adjacency(f4, cw(i4) , nn, nn->index(f3) );
+  this->tds().set_adjacency(f2, ccw(i2) , f5 , ccw(i5)  );
+  this->tds().delete_face(f0);
+  this->tds().delete_face(f3);
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::remove_degree6_antiN
+(
+ Vertex_handle &,
+ Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
+ Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
+ Vertex_handle &v0, Vertex_handle &, Vertex_handle &,
+ Vertex_handle &v3, Vertex_handle &, Vertex_handle &,
+ int i0, int i1, int i2, int i3, int i4, int i5 )
+{ // removing a degree 6 vertex, antiN configuration with diagonal v0v3
+  Face_handle nn;
+  f0->set_vertex( i0, v3) ;  // f0 = v0v1v3
+  f1->set_vertex( i1, v3) ;  // f1 = v1v2v3
+  f3->set_vertex( i3, v0) ;  // f3 = v3v4v0
+  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
+  nn = f2->neighbor( i2 );
+  this->tds().set_adjacency(f1, ccw(i1) , nn , nn->index(f2)  );
+  nn = f5->neighbor( i5 );
+  this->tds().set_adjacency(f4, ccw(i4) , nn , nn->index(f5) );
+  this->tds().set_adjacency(f0, cw(i0) , f3, cw(i3) );
+  this->tds().delete_face(f2);
+  this->tds().delete_face(f5);
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::remove_degree6_diamond
+(
+ Vertex_handle &,
+ Face_handle &  f0, Face_handle &  f1, Face_handle &  f2,
+ Face_handle &  f3, Face_handle &  f4, Face_handle &  f5,
+ Vertex_handle &v0, Vertex_handle &, Vertex_handle &v2,
+ Vertex_handle &, Vertex_handle &v4, Vertex_handle &,
+ int i0, int i1, int i2, int i3, int i4, int i5 )
+{ // removing a degree 6 vertex, with chords v0v2 v2v4 v4v0
+  Face_handle nn;
+  f0->set_vertex( i0, v2) ;  // f0 = v0v1v2
+  f2->set_vertex( i2, v4) ;  // f2 = v2v3v4
+  f4->set_vertex( i4, v0) ;  // f4 = v4v5v0
+  f1->set_vertex( i1, v4) ; 
+  f1->set_vertex( ccw(i1), v0) ;  // f1 = v0v2v4
+  nn = f1->neighbor( i1 );
+  this->tds().set_adjacency(f0, ccw(i0) , nn , nn->index(f1) );
+  nn = f3->neighbor( i3 );
+  this->tds().set_adjacency(f2, ccw(i2) , nn , nn->index(f3) );
+  nn = f5->neighbor( i5 );
+  this->tds().set_adjacency(f4, ccw(i4) , nn , nn->index(f5) );
+  this->tds().set_adjacency(f0, cw(i0) , f1 , i1  );
+  this->tds().set_adjacency(f4, cw(i4) , f1 , cw(i1) );
+
+  this->tds().delete_face(f3);
+  this->tds().delete_face(f5);
+}
+
+
+template < class Gt, class Tds >
+void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7(Vertex_handle v,std::vector<Face_handle> &f,
+		      std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ 
+  // removing a degree 7 vertex
+  // only w[0] can be infinite
+
+  if (incircle(2,0,1,3,f,w,i)) { // sweeping from above
+    if (incircle(2,3,4,0,f,w,i)) {
+      if (incircle(5,3,4,6,f,w,i)) {
+	if (incircle(5,3,4,2,f,w,i)) {
+	  if (incircle(6,2,3,5,f,w,i)) {
+	    if (incircle(6,0,1,2,f,w,i)) {
+	      remove_degree7_leftfan(v,  6  ,f,w,i);
+	    }else{
+	      remove_degree7_zigzag(v,  6  ,f,w,i);
+	    }}else{
+	    if (incircle(5,0,1,2,f,w,i)) {
+	      if (incircle(6,1,2,5,f,w,i)) {
+		remove_degree7_zigzag(v, 2   ,f,w,i);
+	      }else{
+		if (incircle(6,0,1,5,f,w,i)) {
+		  remove_degree7_rightfan(v, 5   ,f,w,i);
+		}else{
+		  remove_degree7_star(v,  5  ,f,w,i);
+		}}}else{
+	      if (incircle(2,5,6,0,f,w,i)) {
+		if (incircle(6,0,1,2,f,w,i)) {
+		  remove_degree7_zigzag(v,  2  ,f,w,i);
+		}else{
+		  remove_degree7_rightfan(v,  2  ,f,w,i);
+		}}else{
+		remove_degree7_rightdelta(v,  5  ,f,w,i);
+	      }}}}else{
+	  if (incircle(4,0,1,2,f,w,i)) {
+	    if (incircle(5,1,2,4,f,w,i)) {
+	      if (incircle(6,1,2,5,f,w,i)) {
+		remove_degree7_leftfan(v,  2  ,f,w,i);
+	      }else{
+		if (incircle(6,0,1,5,f,w,i)) {
+		  remove_degree7_zigzag(v,  5  ,f,w,i);
+		}else{
+		  remove_degree7_leftfan(v,  5  ,f,w,i);
+		}}}else{
+	      if (incircle(5,0,1,4,f,w,i)) {
+		if (incircle(6,0,1,5,f,w,i)) {
+		  remove_degree7_rightfan(v,  1  ,f,w,i);
+		}else{
+		  remove_degree7_zigzag(v,  1  ,f,w,i);
+		}}else{
+		remove_degree7_rightfan(v,  4  ,f,w,i);
+	      }}}else{
+	    if (incircle(2,4,5,0,f,w,i)) {
+	      if (incircle(5,0,1,2,f,w,i)) {
+		if (incircle(6,1,2,5,f,w,i)) {
+		  remove_degree7_leftfan(v,  2  ,f,w,i);
+		}else{
+		  if (incircle(6,0,1,5,f,w,i)) {
+		    remove_degree7_zigzag(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_leftfan(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(2,5,6,0,f,w,i)) {
+		  if (incircle(6,0,1,2,f,w,i)) {
+		    remove_degree7_leftfan(v,  2  ,f,w,i);
+		  }else{
+		    remove_degree7_star(v,  2  ,f,w,i);
+		  }}else{
+		  remove_degree7_leftdelta(v,  2  ,f,w,i);
+		}}}else{
+	      remove_degree7_rightdelta(v,  0  ,f,w,i);
+	    }}}}else{
+	if (incircle(6,3,4,2,f,w,i)) {
+	  if (incircle(6,0,1,2,f,w,i)) {
+	    remove_degree7_star(v,  6  ,f,w,i);
+	  }else{
+	    remove_degree7_rightfan(v,  6  ,f,w,i);
+	  }}else{
+	  if (incircle(4,0,1,2,f,w,i)) {
+	    if (incircle(2,4,5,6,f,w,i)) {
+	      if (incircle(5,1,2,4,f,w,i)) {
+		if (incircle(6,1,2,5,f,w,i)) {
+		  remove_degree7_leftfan(v,  2  ,f,w,i);
+		}else{
+		  if (incircle(6,0,1,5,f,w,i)) {
+		    remove_degree7_zigzag(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_leftfan(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(5,0,1,4,f,w,i)) {
+		  if (incircle(6,0,1,5,f,w,i)) {
+		    remove_degree7_rightfan(v,  1  ,f,w,i);
+		  }else{
+		    remove_degree7_zigzag(v,  1  ,f,w,i);
+		  }} else{
+		  remove_degree7_rightfan(v,  4  ,f,w,i);
+		}}} else {
+	      if (incircle(6,1,2,4,f,w,i)) {
+		remove_degree7_leftdelta(v,  6  ,f,w,i);
+	      }else{
+		if (incircle(1,4,5,6,f,w,i)) {
+		  if (incircle(1,4,5,0,f,w,i)) {
+		    if (incircle(6,0,1,5,f,w,i)) {
+		      remove_degree7_rightfan(v,  1  ,f,w,i);
+		    }else{
+		      remove_degree7_zigzag(v,  1  ,f,w,i);
+		    }}else{
+		    remove_degree7_rightfan(v,  4  ,f,w,i);
+		  }} else {
+		  if (incircle(6,0,1,4,f,w,i)) {
+		    remove_degree7_rightdelta(v,  4  ,f,w,i);
+		  }else{
+		    if (incircle(6,4,5,0,f,w,i)) {
+		      remove_degree7_star(v,  4  ,f,w,i);
+		    }else{
+		      remove_degree7_rightfan(v,  4  ,f,w,i);
+		    }}}}}}else{
+	    if (incircle(2,4,5,6,f,w,i)) {
+	      if (incircle(2,4,5,0,f,w,i)) {
+		if (incircle(5,0,1,2,f,w,i)) {
+		  if (incircle(6,1,2,5,f,w,i)) {
+		    remove_degree7_leftfan(v,  2  ,f,w,i);
+		  }else{
+		    if (incircle(6,0,1,5,f,w,i)) {
+		      remove_degree7_zigzag(v,  5  ,f,w,i);
+		    }else{
+		      remove_degree7_leftfan(v,  5  ,f,w,i);
+		    }}}else{
+		  if (incircle(2,5,6,0,f,w,i)) {
+		    if (incircle(6,0,1,2,f,w,i)) {
+		      remove_degree7_leftfan(v,  2  ,f,w,i);
+		    }else{
+		      remove_degree7_star(v,  2  ,f,w,i);
+		    }}else{
+		    remove_degree7_leftdelta(v,  2  ,f,w,i);
+		  }}}else{
+		remove_degree7_rightdelta(v,  0  ,f,w,i);
+	      }}else{
+	      if (incircle(2,6,0,4,f,w,i)) {
+		if (incircle(6,0,1,2,f,w,i)) {
+		  remove_degree7_leftdelta(v,  6  ,f,w,i);
+		}else{
+		  remove_degree7_rightdelta(v,  2  ,f,w,i);
+		}}else{
+		if (incircle(6,4,5,0,f,w,i)) {
+		  remove_degree7_leftdelta(v,  4  ,f,w,i);
+		}else{
+		  remove_degree7_rightdelta(v,  0  ,f,w,i);
+		}}}}}}} else{
+      if (incircle(5,3,4,6,f,w,i)) {
+	if (incircle(5,3,4,0,f,w,i)) {
+	  if (incircle(5,2,3,0,f,w,i)) {
+	    if (incircle(6,2,3,5,f,w,i)) {
+	      if (incircle(6,0,1,2,f,w,i)) {
+		remove_degree7_leftfan(v,  6  ,f,w,i);
+	      }else{
+		remove_degree7_zigzag(v,  6  ,f,w,i);
+	      }}else
+	      if (incircle(5,0,1,2,f,w,i)) {
+	  	if (incircle(6,1,2,5,f,w,i)) {
+		  remove_degree7_zigzag(v,  2  ,f,w,i);
+		}else{
+		  if (incircle(6,0,1,5,f,w,i)) {
+		    remove_degree7_rightfan(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_star(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(2,5,6,0,f,w,i)) {
+		  if (incircle(6,0,1,2,f,w,i)) {
+		    remove_degree7_zigzag(v,  2  ,f,w,i);
+		  }else{
+		    remove_degree7_rightfan(v,  2  ,f,w,i);
+		  }}else{
+		  remove_degree7_rightdelta(v,  5  ,f,w,i);
+		}}}else{
+	    if (incircle(3,5,6,0,f,w,i)) {
+	      if (incircle(6,2,3,0,f,w,i)) {
+		if (incircle(6,0,1,2,f,w,i)) {
+		  remove_degree7_leftfan(v,  6  ,f,w,i);
+		}else{
+		  remove_degree7_zigzag(v,  6  ,f,w,i);
+		}}else{
+		remove_degree7_leftfan(v,  3  ,f,w,i);
+	      }}else{
+	      remove_degree7_leftdelta(v,  0  ,f,w,i);
+	    }}}else{
+	  remove_degree7_star(v,  0  ,f,w,i);
+	}}else{
+	if (incircle(6,3,4,0,f,w,i)) {
+	  if (incircle(6,2,3,0,f,w,i)) {
+	    if (incircle(6,0,1,2,f,w,i)) {
+	      remove_degree7_star(v,  6  ,f,w,i);
+	    }else{
+	      remove_degree7_rightfan(v,  6  ,f,w,i);
+	    }}else{
+	    remove_degree7_zigzag(v,  3  ,f,w,i);
+	  }}else{
+	  if (incircle(6,4,5,0,f,w,i)) {
+	    remove_degree7_leftfan(v,  0  ,f,w,i);
+	  }else{
+	    remove_degree7_star(v,  0  ,f,w,i);
+	  }}}}}else{  //sweeping from below
+    if (incircle(1,6,0,3,f,w,i)) {
+      if (incircle(5,6,0,4,f,w,i)) {
+	if (incircle(5,6,0,1,f,w,i)) {
+	  if (incircle(4,0,1,5,f,w,i)) {
+	    if (incircle(4,2,3,1,f,w,i)) {
+	      remove_degree7_rightfan(v,  4  ,f,w,i);
+	    }else{
+	      remove_degree7_zigzag(v,  4  ,f,w,i);
+	    }}else{
+	    if (incircle(5,2,3,1,f,w,i)) {
+	      if (incircle(4,1,2,5,f,w,i)) {
+		remove_degree7_zigzag(v, 1   ,f,w,i);
+	      }else{
+		if (incircle(4,2,3,5,f,w,i)) {
+		  remove_degree7_leftfan(v, 5   ,f,w,i);
+		}else{
+		  remove_degree7_star(v,  5  ,f,w,i);
+		}}}else{
+	      if (incircle(1,4,5,3,f,w,i)) {
+		if (incircle(4,2,3,1,f,w,i)) {
+		  remove_degree7_zigzag(v,  1  ,f,w,i);
+		}else{
+		  remove_degree7_leftfan(v,  1  ,f,w,i);
+		}}else{
+		remove_degree7_leftdelta(v,  5  ,f,w,i);
+	      }}}}else{
+	  if (incircle(6,2,3,1,f,w,i)) {
+	    if (incircle(5,1,2,6,f,w,i)) {
+	      if (incircle(4,1,2,5,f,w,i)) {
+		remove_degree7_rightfan(v,  1  ,f,w,i);
+	      }else{
+		if (incircle(4,2,3,5,f,w,i)) {
+		  remove_degree7_zigzag(v,  5  ,f,w,i);
+		}else{
+		  remove_degree7_rightfan(v,  5  ,f,w,i);
+		}}}else{
+	      if (incircle(5,2,3,6,f,w,i)) {
+		if (incircle(4,2,3,5,f,w,i)) {
+		  remove_degree7_leftfan(v,  2  ,f,w,i);
+		}else{
+		  remove_degree7_zigzag(v,  2  ,f,w,i);
+		}}else{
+		remove_degree7_leftfan(v,  6  ,f,w,i);
+	      }}}else{
+	    if (incircle(1,5,6,3,f,w,i)) {
+	      if (incircle(5,2,3,1,f,w,i)) {
+		if (incircle(4,1,2,5,f,w,i)) {
+		  remove_degree7_rightfan(v,  1  ,f,w,i);
+		}else{
+		  if (incircle(4,2,3,5,f,w,i)) {
+		    remove_degree7_zigzag(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_rightfan(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(1,4,5,3,f,w,i)) {
+		  if (incircle(4,2,3,1,f,w,i)) {
+		    remove_degree7_rightfan(v,  1  ,f,w,i);
+		  }else{
+		    remove_degree7_star(v,  1  ,f,w,i);
+		  }}else{
+		  remove_degree7_rightdelta(v,  1  ,f,w,i);
+		}}}else{
+	      remove_degree7_leftdelta(v,  3  ,f,w,i);
+	    }}}}else{
+	if (incircle(4,6,0,1,f,w,i)) {
+	  if (incircle(4,2,3,1,f,w,i)) {
+	    remove_degree7_star(v,  4  ,f,w,i);
+	  }else{
+	    remove_degree7_leftfan(v,  4  ,f,w,i);
+	  }}else{
+	  if (incircle(6,2,3,1,f,w,i)) {
+	    if (incircle(1,5,6,4,f,w,i)) {
+	      if (incircle(5,1,2,6,f,w,i)) {
+		if (incircle(4,1,2,5,f,w,i)) {
+		  remove_degree7_rightfan(v,  1  ,f,w,i);
+		}else{
+		  if (incircle(4,2,3,5,f,w,i)) {
+		    remove_degree7_zigzag(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_rightfan(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(5,2,3,6,f,w,i)) {
+		  if (incircle(4,2,3,5,f,w,i)) {
+		    remove_degree7_leftfan(v,  2  ,f,w,i);
+		  }else{
+		    remove_degree7_zigzag(v,  2  ,f,w,i);
+		  }} else{
+		  remove_degree7_leftfan(v,  6  ,f,w,i);
+		}}} else {
+	      if (incircle(4,1,2,6,f,w,i)) {
+		remove_degree7_rightdelta(v,  4  ,f,w,i);
+	      }else{
+		if (incircle(2,5,6,4,f,w,i)) {
+		  if (incircle(2,5,6,3,f,w,i)) {
+		    if (incircle(4,2,3,5,f,w,i)) {
+		      remove_degree7_leftfan(v,  2  ,f,w,i);
+		    }else{
+		      remove_degree7_zigzag(v,  2  ,f,w,i);
+		    }}else{
+		    remove_degree7_leftfan(v,  6  ,f,w,i);
+		  }} else {
+		  if (incircle(4,2,3,6,f,w,i)) {
+		    remove_degree7_leftdelta(v,  6  ,f,w,i);
+		  }else{
+		    if (incircle(4,5,6,3,f,w,i)) {
+		      remove_degree7_star(v,  6  ,f,w,i);
+		    }else{
+		      remove_degree7_leftfan(v,  6  ,f,w,i);
+		    }}}}}}else{
+	    if (incircle(1,5,6,4,f,w,i)) {
+	      if (incircle(1,5,6,3,f,w,i)) {
+		if (incircle(5,2,3,1,f,w,i)) {
+		  if (incircle(4,1,2,5,f,w,i)) {
+		    remove_degree7_rightfan(v,  1  ,f,w,i);
+		  }else{
+		    if (incircle(4,2,3,5,f,w,i)) {
+		      remove_degree7_zigzag(v,  5  ,f,w,i);
+		    }else{
+		      remove_degree7_rightfan(v,  5  ,f,w,i);
+		    }}}else{
+		  if (incircle(1,4,5,3,f,w,i)) {
+		    if (incircle(4,2,3,1,f,w,i)) {
+		      remove_degree7_rightfan(v,  1  ,f,w,i);
+		    }else{
+		      remove_degree7_star(v,  1  ,f,w,i);
+		    }}else{
+		    remove_degree7_rightdelta(v,  1  ,f,w,i);
+		  }}}else{
+		remove_degree7_leftdelta(v,  3  ,f,w,i);
+	      }}else{
+	      if (incircle(1,3,4,6,f,w,i)) {
+		if (incircle(4,2,3,1,f,w,i)) {
+		  remove_degree7_rightdelta(v,  4  ,f,w,i);
+		}else{
+		  remove_degree7_leftdelta(v,  1  ,f,w,i);
+		}}else{
+		if (incircle(4,5,6,3,f,w,i)) {
+		  remove_degree7_rightdelta(v,  6  ,f,w,i);
+		}else{
+		  remove_degree7_leftdelta(v,  3  ,f,w,i);
+		}}}}}}} else{
+      if (incircle(5,6,0,4,f,w,i)) {
+	if (incircle(5,6,0,3,f,w,i)) {
+	  if (incircle(5,0,1,3,f,w,i)) {
+	    if (incircle(4,0,1,5,f,w,i)) {
+	      if (incircle(4,2,3,1,f,w,i)) {
+		remove_degree7_rightfan(v,  4  ,f,w,i);
+	      }else{
+		remove_degree7_zigzag(v,  4  ,f,w,i);
+	      }}else
+	      if (incircle(5,2,3,1,f,w,i)) {
+	  	if (incircle(4,1,2,5,f,w,i)) {
+		  remove_degree7_zigzag(v,  1  ,f,w,i);
+		}else{
+		  if (incircle(4,2,3,5,f,w,i)) {
+		    remove_degree7_leftfan(v,  5  ,f,w,i);
+		  }else{
+		    remove_degree7_star(v,  5  ,f,w,i);
+		  }}}else{
+		if (incircle(1,4,5,3,f,w,i)) {
+		  if (incircle(4,2,3,1,f,w,i)) {
+		    remove_degree7_zigzag(v,  1  ,f,w,i);
+		  }else{
+		    remove_degree7_leftfan(v,  1  ,f,w,i);
+		  }}else{
+		  remove_degree7_leftdelta(v,  5  ,f,w,i);
+		}}}else{
+	    if (! incircle(3,4,5,0,f,w,i)) {
+	      if (incircle(4,0,1,3,f,w,i)) {
+		if (incircle(4,2,3,1,f,w,i)) {
+		  remove_degree7_rightfan(v,  4  ,f,w,i);
+		}else{
+		  remove_degree7_zigzag(v,  4  ,f,w,i);
+		}}else{
+		remove_degree7_rightfan(v,  0  ,f,w,i);
+	      }}else{
+	      remove_degree7_rightdelta(v,  3  ,f,w,i);
+	    }}}else{
+	  remove_degree7_star(v,  3  ,f,w,i);
+	}}else{
+	if (incircle(4,6,0,3,f,w,i)) {
+	  if (incircle(4,0,1,3,f,w,i)) {
+	    if (incircle(4,2,3,1,f,w,i)) {
+	      remove_degree7_star(v,  4  ,f,w,i);
+	    }else{
+	      remove_degree7_leftfan(v,  4  ,f,w,i);
+	    }}else{
+	    remove_degree7_zigzag(v,  0  ,f,w,i);
+	  }}else{
+	  if (incircle(4,5,6,3,f,w,i)) {
+	    remove_degree7_rightfan(v,  3  ,f,w,i);
+	  }else{
+	    remove_degree7_star(v,  3  ,f,w,i);    
+	  }}}}}
+}
+
+
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+rotate7(int j,  std::vector<Vertex_handle> &w, 
+	       std::vector<Face_handle> &f, std::vector<int> &i)
+{
+  if (j==0) return;
+  Face_handle ff=f[0];
+  int ii=i[0],k=0,kk=(6*j)%7;
+  Vertex_handle ww=w[0];
+  for (int jj=0; k!=kk; jj=k) { // 7 is prime
+    k=(jj+j)%7;
+    w[jj]=w[k]; f[jj]=f[k]; i[jj]=i[k];
+  }
+  w[kk]=ww;f[kk]=ff;i[kk]=ii;
+}
+
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_star   (Vertex_handle &, int j,
+std::vector<Face_handle> &f, std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, staring from w[j]
+
+  rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[1]->set_vertex( i[1], w[0]) ;  // f1 = w1w2w0
+  f[2]->set_vertex( i[2], w[0]) ;  // f2 = w2w3w0
+  f[3]->set_vertex( i[3], w[0]) ;  // f3 = w3w4w0
+  f[4]->set_vertex( i[4], w[0]) ;  // f4 = w4w5w0
+  f[5]->set_vertex( i[5], w[0]) ;  // f5 = w5w6w0
+
+  nn = f[0]->neighbor( i[0] );
+  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0])  );
+  nn = f[6]->neighbor( i[6] );
+  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6]) );
+  this->tds().delete_face(f[0]);
+  this->tds().delete_face(f[6]);
+}
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_zigzag (Vertex_handle &, int j,
+ std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, zigzag, w[j] = middle point
+
+ rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[1]->set_vertex(    i[1] , w[3]) ;  // f1 = w1w2w3
+  f[2]->set_vertex(ccw(i[2]), w[1]) ;  
+  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w1w3w0
+  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
+  f[4]->set_vertex( cw(i[4]), w[6]) ;  
+  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w6w0
+  f[5]->set_vertex(    i[5] , w[4]) ;  // f5 = w5w6w4
+
+  nn = f[2]->neighbor( i[2] );
+  this->tds().set_adjacency(f[1], ccw(i[1]) , nn, nn->index(f[2]) );
+  nn = f[0]->neighbor( i[0] );
+  this->tds().set_adjacency(f[2], cw(i[2]) , nn , nn->index(f[0]) );
+  nn = f[6]->neighbor( i[6] );
+  this->tds().set_adjacency(f[4], ccw(i[4]) , nn , nn->index(f[6])  );
+  nn = f[4]->neighbor( i[4] );
+  this->tds().set_adjacency(f[5], cw(i[5]) , nn , nn->index(f[4])  );
+  this->tds().set_adjacency(f[1], cw(i[1]) , f[2] , i[2]   );
+  this->tds().set_adjacency(f[4], i[4]  , f[5] , ccw(i[5])  );
+
+  this->tds().delete_face(f[0]);
+  this->tds().delete_face(f[6]);
+}
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_leftdelta(Vertex_handle &, int j,
+ std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, left delta from w[j]
+ rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
+  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w2w3w0
+  f[3]->set_vertex( cw(i[3]), w[5]) ;  
+  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w5w0
+  f[4]->set_vertex(    i[4] , w[3]) ;  // f4 = w4w5w3
+  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
+
+  nn = f[0]->neighbor( i[0] );
+  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0])  );
+  nn = f[3]->neighbor( i[3] );
+  this->tds().set_adjacency(f[4], cw(i[4]) , nn , nn->index(f[3]) );
+  nn = f[6]->neighbor( i[6] );
+  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6])  );
+  this->tds().set_adjacency(f[3], i[3]  , f[4] , ccw(i[4])  );
+  this->tds().set_adjacency(f[3], ccw(i[3]) , f[5] ,  cw(i[5]) );
+
+  this->tds().delete_face(f[0]);
+  this->tds().delete_face(f[6]);
+}
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_rightdelta(Vertex_handle &, int j,
+ std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, right delta from w[j]
+  rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
+  f[2]->set_vertex(    i[2] , w[4]) ;  // f2 = w2w3w4
+  f[3]->set_vertex(ccw(i[3]), w[2]) ;  
+  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w2w4w0
+  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w5w0
+  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
+
+  nn = f[0]->neighbor( i[0] );
+  this->tds().set_adjacency(f[1], cw(i[1]) , nn , nn->index(f[0]) );
+  nn = f[3]->neighbor( i[3] );
+  this->tds().set_adjacency(f[2], ccw(i[2]) , nn, nn->index(f[3]) );
+  nn = f[6]->neighbor( i[6] );
+  this->tds().set_adjacency(f[5], ccw(i[5]) , nn , nn->index(f[6]) );
+  this->tds().set_adjacency(f[1], ccw(i[1]) , f[3], cw(i[3])  );
+  this->tds().set_adjacency(f[3], i[3]  , f[2], cw(i[2]) );
+
+  this->tds().delete_face(f[0]);
+  this->tds().delete_face(f[6]);
+}
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_leftfan(Vertex_handle &, int j,
+ std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, left fan from w[j]
+  rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[1]->set_vertex(    i[1] , w[0]) ;  // f1 = w1w2w0
+  f[2]->set_vertex(    i[2] , w[0]) ;  // f2 = w2w3w0
+  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
+  f[4]->set_vertex(    i[4] , w[6]) ;  // f4 = w4w5w6
+  f[6]->set_vertex(    i[6] , w[4]) ;  // f6 = w6w0w4
+
+  nn = f[0]->neighbor( i[0] );
+  this->tds().set_adjacency(f[1], cw(i[1]) , nn, nn->index(f[0]) );
+  nn = f[5]->neighbor( i[5] );
+  this->tds().set_adjacency(f[4], ccw(i[4]) , nn, nn->index(f[5]) );
+  this->tds().set_adjacency(f[3], ccw(i[3]) , f[6], ccw(i[6]) );
+  this->tds().set_adjacency(f[6], cw(i[6]) , f[4], cw(i[4]) );
+
+  this->tds().delete_face(f[0]);
+  this->tds().delete_face(f[5]);
+}
+template < class Gt, class Tds >
+inline void
+Delaunay_triangulation_2<Gt,Tds>::
+remove_degree7_rightfan(Vertex_handle &, int j,
+ std::vector<Face_handle> &f,std::vector<Vertex_handle> &w, std::vector<int> &i)
+{ // removing a degree 7 vertex, right fan from w[j]
+
+  rotate7(j,w,f,i);
+
+  Face_handle nn;
+  f[0]->set_vertex(    i[0] , w[3]) ;  // f0 = w0w1w3
+  f[2]->set_vertex(    i[2] , w[1]) ;  // f2 = w2w3w1
+  f[3]->set_vertex(    i[3] , w[0]) ;  // f3 = w3w4w0
+  f[4]->set_vertex(    i[4] , w[0]) ;  // f4 = w4w5w0
+  f[5]->set_vertex(    i[5] , w[0]) ;  // f5 = w5w6w0
+
+  nn = f[1]->neighbor( i[1] );
+  this->tds().set_adjacency(f[2], cw(i[2]) , nn, nn->index(f[1]) );
+  nn = f[6]->neighbor( i[6] );
+  this->tds().set_adjacency(f[5], ccw(i[5]) , nn, nn->index(f[6]) );
+  this->tds().set_adjacency(f[2], ccw(i[2]) , f[0], ccw(i[0])  );
+  this->tds().set_adjacency(f[0], cw(i[0]) , f[3] , cw(i[3]) );
+
+  this->tds().delete_face(f[1]);
+  this->tds().delete_face(f[6]);
+}
+
+
+
+
+///////////////////////////////////////////////////////////////
+//  DISPLACEMENT
+
+template <class Gt, class Tds >
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>::
+move_if_no_collision(Vertex_handle v, const Point &p) {
+  CGAL_triangulation_precondition(!this->is_infinite(v));
+  if(v->point() == p) return v;
+  const int dim = this->dimension();
+
+  if(dim == 2) {
+    Point ant = v->point();
+    v->set_point(p);
+		// This option optimizes only when most of the
+	  // displacements would not break the orientation
+	  // of the faces.. we will consider this as an a priori,
+	  // because otherwise it is pointless to just do
+	  // not rebuild from scratch.
+    if(this->well_oriented(v)) {
+      restore_edges(v);
+      return v;
+    }
+    v->set_point(ant);
+  }
+
+  Locate_type lt;
+  int li;
+  Vertex_handle inserted;
+  Face_handle loc = this->locate(p, lt, li, v->face());
+
+  if(lt == Triangulation_2<Gt,Tds>::VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->point() = p;
+    return v;
+  }
+
+  size_type n_vertices = this->tds().number_of_vertices();
+
+  if((lt == Triangulation::OUTSIDE_AFFINE_HULL) && 
+     (dim == 1) && (n_vertices == 3)) {
+    v->point() = p;
+    return v;
+  }
+
+  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+    if(loc->has_vertex(v)) {
+      v->point() = p;
+    } else {
+      inserted = insert(p, lt, loc, li);
+      Face_handle f = v->face();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Face_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_face(f);
+      this->delete_face(g);
+      Face_handle f_ins = inserted->face();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Face_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+    	v->set_point(p);
+      v->set_face(inserted->face());
+      this->delete_vertex(inserted);
+    }
+    return v;
+  }
+
+  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && this->test_dim_down(v)) {
+    // verify if p and two static vertices are collinear in this case
+    int iinf = 0;
+    Face_circulator finf = this->incident_faces(this->infinite_vertex()), 
+      fdone(finf);
+    do { 
+      if(!finf->has_vertex(v))
+      {
+        iinf = ~(finf->index(this->infinite_vertex()));
+        break;
+      }
+    } while(++finf != fdone);
+    if(this->orientation(finf->vertex(iinf&1)->point(),
+                         finf->vertex(iinf&2)->point(),
+                         p) == COLLINEAR)
+    {
+      v->point() = p;
+      this->tds().dim_down(loc, loc->index(v));
+      return v;
+    }
+  }
+
+  inserted = insert(p, lt, loc, li);
+
+  {
+    int d;
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Face_handle> , f, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<int>, i, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Vertex_handle>, w, maxd);
+
+    remove_degree_init(v,f,w,i,d,maxd);
+    remove_degree_triangulate(v,f,w,i,d);
+  }
+
+  // fixing pointer
+  Face_circulator fc = this->incident_faces(inserted), done(fc);
+  std::vector<Face_handle> faces_pt;
+  faces_pt.reserve(16);
+  do { faces_pt.push_back(fc); } while(++fc != done);
+  std::size_t ss = faces_pt.size();
+  for(std::size_t k=0; k<ss; k++)
+    {
+      Face_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+  
+  v->set_point(p);
+  v->set_face(inserted->face());
+  
+  this->delete_vertex(inserted);
+
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle
+Delaunay_triangulation_2<Gt,Tds>::
+move(Vertex_handle v, const Point &p) {
+  CGAL_triangulation_precondition(!this->is_infinite(v));
+  if(v->point() == p) return v;
+  Vertex_handle w = move_if_no_collision(v,p);
+  if(w != v) {
+    remove(v);
+    return w;
+  }
+  return v;
+}
+
+template <class Gt, class Tds >
+bool 
+Delaunay_triangulation_2<Gt,Tds>::
+is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
+{
+  CGAL_triangulation_precondition(!this->is_infinite(v));		
+  CGAL_triangulation_precondition(this->dimension() == 2);	
+  CGAL_triangulation_precondition(!this->test_dim_down(v));	
+	if(v->point() == p) return true;
+  Point ant = v->point();
+  v->set_point(p);
+  if(!this->well_oriented(v))
+  {
+    v->set_point(ant);
+    return false;
+  }
+  std::list<Edge> edges;
+  Face_circulator fc = this->incident_faces(v), done(fc);
+  int degree = 0;
+  do {
+    if((++degree) > 3) break;
+  } while(++fc != done);
+  fc = this->incident_faces(v);
+  done = fc;
+  if(degree == 3) {
+    do {
+      int i = fc->index(v);
+      edges.push_back(Edge(fc, i));
+    } while(++fc != done);
+  } else {
+    do {
+      int i = fc->index(v);
+      edges.push_back(Edge(fc, i));
+      edges.push_back(Edge(fc, this->cw(i)));
+    } while(++fc != done);
+  }
+  while(!edges.empty()) {
+    const Edge &e = edges.front();
+    Face_handle f = e.first;
+    int i = e.second;
+    edges.pop_front();
+    if(this->is_infinite(f->vertex(i))) continue;
+    Vertex_handle vm = this->_tds.mirror_vertex(f, i);
+    if(this->is_infinite(vm)) continue;
+    if(this->side_of_oriented_circle(f, vm->point()) == ON_POSITIVE_SIDE) {
+      v->set_point(ant);
+      return false;
+    }
+  }
+  v->set_point(ant);
+  return true;
+}
+
+template <class Gt, class Tds >
+template <class OutputItFaces>
+typename Delaunay_triangulation_2<Gt,Tds>::Vertex_handle 
+Delaunay_triangulation_2<Gt,Tds>::
+move_if_no_collision_and_give_new_faces(Vertex_handle v, 
+                                        const Point &p,
+                                        OutputItFaces oif)
+{
+  CGAL_triangulation_precondition(!this->is_infinite(v));	
+  if(v->point() == p) return v;
+
+  const int dim = this->dimension();
+
+  if(dim == 2) {
+    Point ant = v->point();
+    v->set_point(p);
+    // This option optimizes only when most of the
+    // displacements would not break the orientation
+    // of the faces.. we will consider this as an a priori,
+    // because otherwise it is pointless to just do
+    // not rebuild from scratch.
+    if(well_oriented(v)) {
+      std::set<Face_handle> faces_set;
+      restore_edges(v, faces_set);
+      for(typename std::set<Face_handle>::iterator ib = faces_set.begin(),
+            iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
+      return v;
+    }
+    v->set_point(ant);
+  }
+
+  Locate_type lt;
+  int li;
+  Vertex_handle inserted;
+  Face_handle loc = this->locate(p, lt, li, v->face());
+
+  if(lt == Triangulation::VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->point() = p;
+    return v;
+  }
+
+  size_type n_vertices = this->tds().number_of_vertices();
+
+  if((lt == Triangulation::OUTSIDE_AFFINE_HULL) && 
+     (dim == 1) && (n_vertices == 3)) {
+    v->point() = p;
+    for(All_faces_iterator afi = this-> all_faces_begin(); 
+        afi != this->all_faces_end(); 
+        afi++) *oif++ = afi;	
+    return v;
+  }
+
+  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+    if(loc->has_vertex(v)) {
+      v->point() = p;
+    } else {
+      inserted = insert(p, lt, loc, li);
+      Face_handle f = v->face();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Face_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_face(f);
+      this->delete_face(g);
+      *oif++ = f;
+      Face_handle f_ins = inserted->face();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Face_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+      v->set_face(inserted->face());
+    	v->set_point(p);
+      this->delete_vertex(inserted);
+    }
+    *oif++ = v->face();
+    if(v->face()->neighbor(0)->has_vertex(v)) 
+      *oif++ = v->face()->neighbor(0);
+    if(v->face()->neighbor(1)->has_vertex(v)) 
+      *oif++ = v->face()->neighbor(1);			
+    return v;
+  }
+
+  if((lt != Triangulation::OUTSIDE_AFFINE_HULL) && this->test_dim_down(v)) {
+    // verify if p and two static vertices are collinear in this case
+    int iinf;
+    Face_circulator finf = incident_faces(this->infinite_vertex()), 
+      fdone(finf);
+    do { 
+      if(!finf->has_vertex(v))
+      {
+        iinf = ~(finf->index(this->infinite_vertex()));
+        break;
+      }
+    } while(++finf != fdone);
+    if(this->orientation(finf->vertex(iinf&1)->point(),
+                         finf->vertex(iinf&2)->point(),
+                         p) == COLLINEAR)
+    {
+      v->point() = p;
+      this->tds().dim_down(loc, loc->index(v));
+      for(All_faces_iterator afi = this-> all_faces_begin(); 
+          afi != this->all_faces_end(); 
+          afi++) *oif++ = afi;
+      return v;
+    }
+  }
+
+  std::set<Face_handle> faces_set;
+  inserted = Delaunay_triangulation_2<Gt,Tds>::insert(p, lt, loc, li);
+  Face_circulator fc = this->incident_faces(inserted), done(fc);
+  do { faces_set.insert(fc); } while(++fc != done);
+
+
+  {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Face_handle> , f, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<int>, i, maxd);
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector<Vertex_handle>, w, maxd);
+
+    int d;
+    remove_degree_init(v,f,w,i,d,maxd);
+    remove_degree_triangulate(v,f,w,i,d);
+    this->delete_vertex(v);
+    Face_circulator fc(v[0]),done;
+    do *oif++ = fc++; while (fc!=done);    
+  }
+
+  fc = this->incident_faces(inserted), done(fc);
+  std::vector<Face_handle> faces_pt;
+  faces_pt.reserve(16);
+  do { faces_pt.push_back(fc); } while(++fc != done);
+  int ss = faces_pt.size();
+  for(int k=0; k<ss; k++)
+  {
+    Face_handle f = faces_pt[k];
+    int i = f->index(inserted);
+    f->set_vertex(i, v);
+  }
+  v->set_point(p);
+  v->set_face(inserted->face());
+  this->delete_vertex(inserted);
+
+  for(typename std::set<Face_handle>::const_iterator ib = faces_set.begin(),
+        iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
+
+  return v;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_3.h
new file mode 100644
index 0000000..2630dbd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_3.h
@@ -0,0 +1,2081 @@
+// Copyright (c) 1999-2004   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion
+//                 Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
+//                 Clement Jamin
+
+#ifndef CGAL_DELAUNAY_TRIANGULATION_3_H
+#define CGAL_DELAUNAY_TRIANGULATION_3_H
+
+#include <CGAL/basic.h>
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+# define CGAL_PROFILE
+# include <CGAL/Profile_counter.h>
+#endif
+
+#include <utility>
+#include <vector>
+
+#include <CGAL/Triangulation_3.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Location_policy.h>
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+# include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+#include <CGAL/Spatial_sort_traits_adapter_3.h>
+#include <CGAL/internal/info_check.h>
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/mpl/and.hpp>
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <CGAL/point_generators_3.h>
+# include <tbb/parallel_for.h>
+# include <tbb/enumerable_thread_specific.h>
+# include <tbb/concurrent_vector.h>
+#endif
+
+#ifdef CGAL_DELAUNAY_3_OLD_REMOVE
+#  error "The old remove() code has been removed.  Please report any issue you may have with the current one."
+#endif
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+#include <CGAL/point_generators_3.h>
+#endif
+
+namespace CGAL {
+
+// Here is the declaration of a class template with three arguments, one
+// having a default value. There is no definition of that class template.
+template < class Gt,
+           class Tds_ = Default,
+           class Location_policy = Default,
+           class Lock_data_structure_ = Default >
+class Delaunay_triangulation_3;
+
+// There is a specialization Delaunay_triangulation_3<Gt, Tds, Fast_location>
+// defined in <CGAL/internal/Delaunay_triangulation_hierarchy_3.h>.
+
+// Here is the specialization Delaunay_triangulation_3<Gt, Tds>, with two
+// arguments, that is if Location_policy being the default value 'Default'.
+template < class Gt, class Tds_,
+           class Lock_data_structure_ >
+class Delaunay_triangulation_3<Gt, Tds_, Default, Lock_data_structure_>
+  : public Triangulation_3<Gt, Tds_, Lock_data_structure_>
+{
+  typedef Delaunay_triangulation_3<Gt, Tds_, Default,
+                                   Lock_data_structure_> Self;
+  typedef Triangulation_3<Gt,Tds_,Lock_data_structure_>  Tr_Base;
+
+public:
+
+  typedef typename Tr_Base::Triangulation_data_structure
+                                     Triangulation_data_structure;
+  typedef Gt                         Geom_traits;
+  typedef Compact_location           Location_policy;
+
+  typedef typename Tr_Base::Lock_data_structure Lock_data_structure;
+
+  typedef typename Gt::Point_3       Point;
+  typedef typename Gt::Segment_3     Segment;
+  typedef typename Gt::Triangle_3    Triangle;
+  typedef typename Gt::Tetrahedron_3 Tetrahedron;
+
+  // types for dual:
+  typedef typename Gt::Line_3        Line;
+  typedef typename Gt::Ray_3         Ray;
+  //typedef typename Gt::Plane_3       Plane;
+  typedef typename Gt::Object_3      Object;
+
+  typedef typename Tr_Base::Cell_handle   Cell_handle;
+  typedef typename Tr_Base::Vertex_handle Vertex_handle;
+
+  typedef typename Tr_Base::Cell   Cell;
+  typedef typename Tr_Base::Vertex Vertex;
+  typedef typename Tr_Base::Facet  Facet;
+  typedef typename Tr_Base::Edge   Edge;
+
+  typedef typename Tr_Base::Cell_circulator  Cell_circulator;
+  typedef typename Tr_Base::Facet_circulator Facet_circulator;
+  typedef typename Tr_Base::Cell_iterator    Cell_iterator;
+  typedef typename Tr_Base::Facet_iterator   Facet_iterator;
+  typedef typename Tr_Base::Edge_iterator    Edge_iterator;
+  typedef typename Tr_Base::Vertex_iterator  Vertex_iterator;
+
+  typedef typename Tr_Base::Finite_vertices_iterator Finite_vertices_iterator;
+  typedef typename Tr_Base::Finite_cells_iterator    Finite_cells_iterator;
+  typedef typename Tr_Base::Finite_facets_iterator   Finite_facets_iterator;
+  typedef typename Tr_Base::Finite_edges_iterator    Finite_edges_iterator;
+
+  typedef typename Tr_Base::All_cells_iterator       All_cells_iterator;
+
+  typedef typename Tr_Base::size_type size_type;
+  typedef typename Tr_Base::Locate_type Locate_type;
+
+
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
+  using Tr_Base::cw;
+  using Tr_Base::ccw;
+  using Tr_Base::geom_traits;
+  using Tr_Base::number_of_vertices;
+  using Tr_Base::dimension;
+  using Tr_Base::finite_facets_begin;
+  using Tr_Base::finite_facets_end;
+  using Tr_Base::finite_vertices_begin;
+  using Tr_Base::finite_vertices_end;
+  using Tr_Base::finite_cells_begin;
+  using Tr_Base::finite_cells_end;
+  using Tr_Base::finite_edges_begin;
+  using Tr_Base::finite_edges_end;
+  using Tr_Base::tds;
+  using Tr_Base::infinite_vertex;
+  using Tr_Base::next_around_edge;
+  using Tr_Base::vertex_triple_index;
+  using Tr_Base::mirror_vertex;
+  using Tr_Base::coplanar;
+  using Tr_Base::coplanar_orientation;
+  using Tr_Base::orientation;
+  using Tr_Base::adjacent_vertices;
+  using Tr_Base::construct_segment;
+  using Tr_Base::incident_facets;
+  using Tr_Base::insert_in_conflict;
+  using Tr_Base::is_infinite;
+  using Tr_Base::is_valid_finite;
+  using Tr_Base::locate;
+  using Tr_Base::side_of_edge;
+  using Tr_Base::side_of_segment;
+  using Tr_Base::find_conflicts;
+#endif
+
+protected:
+
+  Oriented_side
+  side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
+         const Point &p3, const Point &t, bool perturb = false) const;
+
+  Bounded_side
+  coplanar_side_of_bounded_circle(const Point &p, const Point &q,
+                  const Point &r, const Point &s, bool perturb = false) const;
+
+  // for dual:
+  Point
+  construct_circumcenter(const Point &p, const Point &q, const Point &r) const
+  {
+      return geom_traits().construct_circumcenter_3_object()(p, q, r);
+  }
+
+  Line
+  construct_equidistant_line(const Point &p1, const Point &p2,
+                             const Point &p3) const
+  {
+      return geom_traits().construct_equidistant_line_3_object()(p1, p2, p3);
+  }
+
+  Ray
+  construct_ray(const Point &p, const Line &l) const
+  {
+      return geom_traits().construct_ray_3_object()(p, l);
+  }
+
+  Object
+  construct_object(const Point &p) const
+  {
+      return geom_traits().construct_object_3_object()(p);
+  }
+
+  Object
+  construct_object(const Segment &s) const
+  {
+      return geom_traits().construct_object_3_object()(s);
+  }
+
+  Object
+  construct_object(const Ray &r) const
+  {
+      return geom_traits().construct_object_3_object()(r);
+  }
+
+  bool
+  less_distance(const Point &p, const Point &q, const Point &r) const
+  {
+      return geom_traits().compare_distance_3_object()(p, q, r) == SMALLER;
+  }
+
+public:
+
+  Delaunay_triangulation_3(const Gt& gt = Gt(), Lock_data_structure *lock_ds = NULL)
+    : Tr_Base(gt, lock_ds)
+  {}
+
+  Delaunay_triangulation_3(Lock_data_structure *lock_ds, const Gt& gt = Gt())
+    : Tr_Base(lock_ds, gt)
+  {}
+
+  // Create a 3D triangulation from 4 points which must be well-oriented
+  // AND non-coplanar
+  Delaunay_triangulation_3(const Point &p0, const Point &p1,
+                           const Point &p2, const Point &p3,
+                           const Gt& gt = Gt(),
+                           Lock_data_structure *lock_ds = NULL)
+    : Tr_Base(p0, p1, p2, p3, gt, lock_ds)
+  {}
+
+
+  // copy constructor duplicates vertices and cells
+  Delaunay_triangulation_3(const Delaunay_triangulation_3 & tr)
+    : Tr_Base(tr)
+  {
+    CGAL_triangulation_postcondition( is_valid() );
+  }
+
+  template < typename InputIterator >
+  Delaunay_triangulation_3(InputIterator first, InputIterator last,
+                           const Gt& gt = Gt(), Lock_data_structure *lock_ds = NULL)
+    : Tr_Base(gt, lock_ds)
+  {
+      insert(first, last);
+  }
+
+  template < typename InputIterator >
+  Delaunay_triangulation_3(InputIterator first, InputIterator last,
+                           Lock_data_structure *lock_ds,
+                           const Gt& gt = Gt())
+    : Tr_Base(gt, lock_ds)
+  {
+      insert(first, last);
+  }
+
+private:
+  #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+  std::vector<Vertex_handle> 
+  add_temporary_points_on_far_sphere(const size_t num_points)
+  {
+      std::vector<Vertex_handle> far_sphere_vertices;
+
+      const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000;
+      if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
+      {
+          // Add temporary vertices on a "far sphere" to reduce contention on
+          // the infinite vertex
+
+          // Get bbox
+          const Bbox_3 &bbox = *this->get_bbox();
+          // Compute radius for far sphere
+          const double& xdelta = bbox.xmax() - bbox.xmin();
+          const double& ydelta = bbox.ymax() - bbox.ymin();
+          const double& zdelta = bbox.zmax() - bbox.zmin();
+          const double radius = 1.3 * 0.5 * std::sqrt(xdelta*xdelta +
+                                                      ydelta*ydelta +
+                                                      zdelta*zdelta);
+          // WARNING - TODO: this code has to be fixed because Vector_3 is not
+          // required by the traits concept
+          const typename Gt::Vector_3 center(
+                  bbox.xmin() + 0.5*xdelta,
+                  bbox.ymin() + 0.5*ydelta,
+                  bbox.zmin() + 0.5*zdelta);
+          Random_points_on_sphere_3<Point> random_point(radius);
+          const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
+                  tbb::task_scheduler_init::default_num_threads() * 3.5);
+          std::vector<Point> points_on_far_sphere;
+
+          points_on_far_sphere.reserve(NUM_PSEUDO_INFINITE_VERTICES);
+          far_sphere_vertices.reserve(NUM_PSEUDO_INFINITE_VERTICES);
+
+          for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
+              points_on_far_sphere.push_back(*random_point + center);
+
+          spatial_sort(points_on_far_sphere.begin(),
+                       points_on_far_sphere.end(),
+                       geom_traits());
+
+          typename std::vector<Point>::const_iterator it_p = points_on_far_sphere.begin();
+          typename std::vector<Point>::const_iterator it_p_end = points_on_far_sphere.end();
+
+          Vertex_handle hint;
+          for ( ; it_p != it_p_end ; ++it_p)
+          {
+              hint = insert(*it_p, hint);
+              far_sphere_vertices.push_back(hint);
+          }
+      }
+
+      return far_sphere_vertices;
+  }
+
+  void remove_temporary_points_on_far_sphere(
+    const std::vector<Vertex_handle> & far_sphere_vertices)
+  {
+      if(!far_sphere_vertices.empty())
+      {
+          // Remove the temporary vertices on far sphere
+          remove(far_sphere_vertices.begin(), far_sphere_vertices.end());
+      }
+  }
+  #endif
+
+public:
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first, InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+                typename std::iterator_traits<InputIterator>::value_type,
+                Point
+            >
+          >::type* = NULL
+  )
+#else
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first, InputIterator last)
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+  {
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+    WallClockTimer t;
+#endif
+
+    size_type n = number_of_vertices();
+    std::vector<Point> points (first, last);
+    spatial_sort (points.begin(), points.end(), geom_traits());
+
+    // Parallel
+#ifdef CGAL_LINKED_WITH_TBB
+    if (this->is_parallel())
+    {
+      size_t num_points = points.size();
+
+      Vertex_handle hint;
+      
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+      std::vector<Vertex_handle> far_sphere_vertices =
+        add_temporary_points_on_far_sphere(num_points);
+#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+      
+      size_t i = 0;
+      // Insert "num_points_seq" points sequentially
+      // (or more if dim < 3 after that)
+      size_t num_points_seq = (std::min)(num_points, (size_t)100);
+      while (dimension() < 3 || i < num_points_seq)
+      {
+        hint = insert(points[i], hint);
+        ++i;
+      }
+
+      tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint);
+      tbb::parallel_for(
+        tbb::blocked_range<size_t>( i, num_points ),
+        Insert_point<Self>(*this, points, tls_hint)
+      );
+      
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+      remove_temporary_points_on_far_sphere(far_sphere_vertices);
+#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+    }
+    // Sequential
+    else
+#endif // CGAL_LINKED_WITH_TBB
+    {
+      Vertex_handle hint;
+      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+              p != end; ++p)
+          hint = insert(*p, hint);
+    }
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+    std::cerr << "Triangulation computed in " << t.elapsed() << " seconds." << std::endl;
+#endif
+
+    return number_of_vertices() - n;
+  }
+
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+private:
+  //top stands for tuple-or-pair
+  template <class Info>
+  const Point& top_get_first(const std::pair<Point,Info>& pair) const { return pair.first; }
+  template <class Info>
+  const Info& top_get_second(const std::pair<Point,Info>& pair) const { return pair.second; }
+  template <class Info>
+  const Point& top_get_first(const boost::tuple<Point,Info>& tuple) const { return boost::get<0>(tuple); }
+  template <class Info>
+  const Info& top_get_second(const boost::tuple<Point,Info>& tuple) const { return boost::get<1>(tuple); }
+
+  template <class Tuple_or_pair,class InputIterator>
+  std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
+  {
+    size_type n = number_of_vertices();
+    std::vector<std::ptrdiff_t> indices;
+    std::vector<Point> points;
+    std::vector<typename Triangulation_data_structure::Vertex::Info> infos;
+    std::ptrdiff_t index=0;
+    for (InputIterator it=first;it!=last;++it){
+      Tuple_or_pair value=*it;
+      points.push_back( top_get_first(value)  );
+      infos.push_back ( top_get_second(value) );
+      indices.push_back(index++);
+    }
+
+    typedef Spatial_sort_traits_adapter_3<Geom_traits,Point*> Search_traits;
+
+    spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()));
+
+#ifdef CGAL_LINKED_WITH_TBB
+      if(this->is_parallel()){
+
+        size_t num_points = points.size();
+        Vertex_handle hint;
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+        std::vector<Vertex_handle> far_sphere_vertices =
+          add_temporary_points_on_far_sphere(num_points);
+#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+
+        size_t i = 0;
+        // Insert "num_points_seq" points sequentially
+        // (or more if dim < 3 after that)
+        size_t num_points_seq = (std::min)(num_points, (size_t)100);
+        while (dimension() < 3 || i < num_points_seq)
+        {
+          hint = insert(points[indices[i]], hint);
+          if (hint != Vertex_handle()) hint->info() = infos[indices[i]];
+          ++i;
+        }
+
+        tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint);
+        tbb::parallel_for(
+          tbb::blocked_range<size_t>( i, num_points ),
+          Insert_point_with_info<Self>(*this, points, infos, indices, tls_hint)
+        );
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+      remove_temporary_points_on_far_sphere(far_sphere_vertices);
+#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+
+      }
+      // Sequential
+      else
+#endif
+      {
+          Vertex_handle hint;
+          for (typename std::vector<std::ptrdiff_t>::const_iterator
+                       it = indices.begin(), end = indices.end();
+               it != end; ++it) {
+              hint = insert(points[*it], hint);
+              if (hint != Vertex_handle()) hint->info() = infos[*it];
+          }
+      }
+
+    return number_of_vertices() - n;
+  }
+
+public:
+
+  template < class InputIterator >
+  std::ptrdiff_t
+  insert( InputIterator first,
+          InputIterator last,
+          typename boost::enable_if<
+            boost::is_convertible<
+              typename std::iterator_traits<InputIterator>::value_type,
+              std::pair<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type>
+            > >::type* =NULL
+  )
+  {
+    return insert_with_info< std::pair<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);
+  }
+
+  template <class  InputIterator_1,class InputIterator_2>
+  std::ptrdiff_t
+  insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
+          boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
+          typename boost::enable_if<
+            boost::mpl::and_<
+              boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Point >,
+              boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type >
+            >
+          >::type* =NULL
+  )
+  {
+    return insert_with_info< boost::tuple<Point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);
+  }
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+  Vertex_handle insert(const Point & p, Vertex_handle hint,
+                       bool *could_lock_zone = NULL)
+  {
+    return insert(p, hint == Vertex_handle() ? this->infinite_cell() : hint->cell(),
+                  could_lock_zone);
+  }
+
+  Vertex_handle insert(const Point & p, Cell_handle start = Cell_handle(),
+                       bool *could_lock_zone = NULL);
+
+  Vertex_handle insert(const Point & p, Locate_type lt,
+                       Cell_handle c, int li, int,
+                 bool *could_lock_zone = NULL);
+
+public: // internal methods
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point  &p,
+                                          OutputItCells fit,
+                                          Cell_handle start = Cell_handle() );
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point& p,
+                                          OutputItCells fit,
+                                          Vertex_handle hint);
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point& p,
+                                          Locate_type lt,
+                                          Cell_handle c, int li, int lj,
+                                          OutputItCells fit);
+
+public:
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+  CGAL_DEPRECATED Vertex_handle move_point(Vertex_handle v, const Point & p);
+#endif
+
+  template <class OutputIteratorBoundaryFacets,
+            class OutputIteratorCells,
+            class OutputIteratorInternalFacets>
+  Triple<OutputIteratorBoundaryFacets,
+         OutputIteratorCells,
+         OutputIteratorInternalFacets>
+  find_conflicts(const Point &p, Cell_handle c,
+                 OutputIteratorBoundaryFacets bfit,
+                 OutputIteratorCells cit,
+                 OutputIteratorInternalFacets ifit,
+                 bool *could_lock_zone = NULL) const
+  {
+      CGAL_triangulation_precondition(dimension() >= 2);
+
+      std::vector<Cell_handle> cells;
+      cells.reserve(32);
+      std::vector<Facet> facets;
+      facets.reserve(64);
+
+      if (dimension() == 2) {
+          Conflict_tester_2 tester(p, this);
+          ifit = Tr_Base::find_conflicts
+            (c, tester,
+             make_triple(std::back_inserter(facets),
+                         std::back_inserter(cells),
+                         ifit), could_lock_zone).third;
+      }
+      else {
+          Conflict_tester_3 tester(p, this);
+          ifit = Tr_Base::find_conflicts
+            (c, tester,
+             make_triple(std::back_inserter(facets),
+                         std::back_inserter(cells),
+                         ifit), could_lock_zone).third;
+      }
+
+      // Reset the conflict flag on the boundary.
+      for(typename std::vector<Facet>::iterator fit=facets.begin();
+          fit != facets.end(); ++fit) {
+        fit->first->neighbor(fit->second)->tds_data().clear();
+        *bfit++ = *fit;
+      }
+
+      // Reset the conflict flag in the conflict cells.
+      for(typename std::vector<Cell_handle>::iterator ccit=cells.begin();
+        ccit != cells.end(); ++ccit) {
+        (*ccit)->tds_data().clear();
+        *cit++ = *ccit;
+      }
+      return make_triple(bfit, cit, ifit);
+  }
+
+  template <class OutputIteratorBoundaryFacets, class OutputIteratorCells>
+  std::pair<OutputIteratorBoundaryFacets, OutputIteratorCells>
+  find_conflicts(const Point &p, Cell_handle c,
+                 OutputIteratorBoundaryFacets bfit,
+                 OutputIteratorCells cit,
+                 bool *could_lock_zone = NULL) const
+  {
+      Triple<OutputIteratorBoundaryFacets,
+             OutputIteratorCells,
+             Emptyset_iterator> t = find_conflicts(p, c, bfit, cit,
+                                                   Emptyset_iterator(),
+                                                   could_lock_zone);
+      return std::make_pair(t.first, t.second);
+  }
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+  // Returns the vertices on the boundary of the conflict hole.
+  template <class OutputIterator>
+  OutputIterator
+  vertices_in_conflict(const Point&p, Cell_handle c, OutputIterator res) const
+  {
+    return vertices_on_conflict_zone_boundary(p, c, res);
+  }
+#endif // CGAL_NO_DEPRECATED_CODE
+
+  // Returns the vertices on the boundary of the conflict hole.
+  template <class OutputIterator>
+  OutputIterator
+  vertices_on_conflict_zone_boundary(const Point&p, Cell_handle c,
+                                     OutputIterator res) const
+  {
+      CGAL_triangulation_precondition(dimension() >= 2);
+
+      // Get the facets on the boundary of the hole.
+      std::vector<Facet> facets;
+      find_conflicts(p, c, std::back_inserter(facets),
+                     Emptyset_iterator(), Emptyset_iterator());
+
+      // Then extract uniquely the vertices.
+      std::set<Vertex_handle> vertices;
+      if (dimension() == 3) {
+          for (typename std::vector<Facet>::const_iterator i = facets.begin();
+               i != facets.end(); ++i) {
+              vertices.insert(i->first->vertex((i->second+1)&3));
+              vertices.insert(i->first->vertex((i->second+2)&3));
+              vertices.insert(i->first->vertex((i->second+3)&3));
+          }
+      } else {
+          for (typename std::vector<Facet>::const_iterator i = facets.begin();
+               i != facets.end(); ++i) {
+              vertices.insert(i->first->vertex(cw(i->second)));
+              vertices.insert(i->first->vertex(ccw(i->second)));
+          }
+      }
+
+      return std::copy(vertices.begin(), vertices.end(), res);
+  }
+
+  // REMOVE
+  void remove(Vertex_handle v);
+  // Concurrency-safe
+  // See Triangulation_3::remove for more information
+  bool remove(Vertex_handle v, bool *could_lock_zone);
+
+  // return new cells (internal)
+  template <class OutputItCells>
+  void remove_and_give_new_cells(Vertex_handle v,
+                                 OutputItCells fit);
+
+  template < typename InputIterator >
+  size_type remove(InputIterator first, InputIterator beyond)
+  {
+    CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond));
+    size_type n = number_of_vertices();
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+    WallClockTimer t;
+#endif
+
+    // Parallel
+#ifdef CGAL_LINKED_WITH_TBB
+    if (this->is_parallel())
+    {
+      // TODO: avoid that by asking for random-access iterators?
+      std::vector<Vertex_handle> vertices(first, beyond);
+      tbb::concurrent_vector<Vertex_handle> vertices_to_remove_sequentially;
+
+      tbb::parallel_for(
+        tbb::blocked_range<size_t>( 0, vertices.size()),
+        Remove_point<Self>(*this, vertices, vertices_to_remove_sequentially)
+      );
+
+      // Do the rest sequentially
+      for ( typename tbb::concurrent_vector<Vertex_handle>::const_iterator
+              it = vertices_to_remove_sequentially.begin(),
+              it_end = vertices_to_remove_sequentially.end()
+          ; it != it_end
+          ; ++it)
+      {
+        remove(*it);
+      }
+    }
+    // Sequential
+    else
+#endif // CGAL_LINKED_WITH_TBB
+    {
+      while (first != beyond) {
+        remove(*first);
+        ++first;
+      }
+    }
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+    double elapsed = t.elapsed();
+    std::cerr << "Points removed in " << elapsed << " seconds." << std::endl;
+#endif
+    return n - number_of_vertices();
+  }
+
+  template < typename InputIterator >
+  size_type remove_cluster(InputIterator first, InputIterator beyond)
+  {
+    Self tmp;
+    Vertex_remover<Self> remover (tmp);
+    return Tr_Base::remove(first, beyond, remover);
+  }
+
+  // MOVE
+  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
+
+  Vertex_handle move(Vertex_handle v, const Point &p);
+
+  // return new cells (internal)
+  template <class OutputItCells>
+  Vertex_handle move_if_no_collision_and_give_new_cells(Vertex_handle v,
+                                                        const Point &p,
+                                                        OutputItCells fit);
+
+private:
+
+  Bounded_side
+  side_of_sphere(Vertex_handle v0, Vertex_handle v1,
+                 Vertex_handle v2, Vertex_handle v3,
+                 const Point &p, bool perturb) const;
+public:
+
+  // Queries
+  Bounded_side
+  side_of_sphere(Cell_handle c, const Point & p,
+                 bool perturb = false) const
+  {
+      return side_of_sphere(c->vertex(0), c->vertex(1),
+                            c->vertex(2), c->vertex(3), p, perturb);
+  }
+
+  Bounded_side
+  side_of_circle( const Facet & f, const Point & p, bool perturb = false) const
+  {
+      return side_of_circle(f.first, f.second, p, perturb);
+  }
+
+  Bounded_side
+  side_of_circle( Cell_handle c, int i, const Point & p,
+                  bool perturb = false) const;
+
+  Vertex_handle
+  nearest_vertex_in_cell(const Point& p, Cell_handle c) const;
+
+  Vertex_handle
+  nearest_vertex(const Point& p, Cell_handle c = Cell_handle()) const;
+
+  bool is_Gabriel(Cell_handle c, int i) const;
+  bool is_Gabriel(Cell_handle c, int i, int j) const;
+  bool is_Gabriel(const Facet& f)const ;
+  bool is_Gabriel(const Edge& e) const;
+
+  bool is_delaunay_after_displacement(Vertex_handle v,
+                                      const Point &p) const;
+
+// Dual functions
+  Point dual(Cell_handle c) const;
+
+  Object dual(const Facet & f) const
+  { return dual( f.first, f.second ); }
+
+  Object dual(Cell_handle c, int i) const;
+
+  Line dual_support(Cell_handle c, int i) const;
+
+  bool is_valid(bool verbose = false, int level = 0) const;
+
+  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
+
+  template < class Stream>
+  Stream& draw_dual(Stream & os)
+    {
+      for (Finite_facets_iterator fit = finite_facets_begin(),
+                                  end = finite_facets_end();
+           fit != end; ++fit) {
+        Object o = dual(*fit);
+        if      (const Segment *s = object_cast<Segment>(&o)) os << *s;
+        else if (const Ray *r     = object_cast<Ray>(&o))     os << *r;
+        else if (const Point *p   = object_cast<Point>(&o))   os << *p;
+      }
+      return os;
+    }
+
+protected:
+
+  Vertex_handle
+  nearest_vertex(const Point &p, Vertex_handle v, Vertex_handle w) const
+  {
+      // In case of equality, v is returned.
+      CGAL_triangulation_precondition(v != w);
+
+      if (is_infinite(v))
+          return w;
+      if (is_infinite(w))
+          return v;
+      return less_distance(p, w->point(), v->point()) ? w : v;
+  }
+
+  class Conflict_tester_3
+  {
+      const Point &p;
+      const Self *t;
+
+  public:
+
+    Conflict_tester_3(const Point &pt, const Self *tr)
+      : p(pt), t(tr) {}
+
+    bool operator()(const Cell_handle c) const
+    {
+      return t->side_of_sphere(c, p, true) == ON_BOUNDED_SIDE;
+    }
+    Oriented_side compare_weight(const Point &, const Point &) const
+    {
+      return ZERO;
+    }
+    bool test_initial_cell(Cell_handle) const
+    {
+      return true;
+    }
+  };
+
+  class Conflict_tester_2
+  {
+      const Point &p;
+      const Self *t;
+
+  public:
+
+    Conflict_tester_2(const Point &pt, const Self *tr)
+      : p(pt), t(tr) {}
+
+    bool operator()(const Cell_handle c) const
+    {
+      return t->side_of_circle(c, 3, p, true) == ON_BOUNDED_SIDE;
+    }
+    Oriented_side compare_weight(const Point &, const Point &) const
+    {
+      return ZERO;
+    }
+    bool test_initial_cell(Cell_handle) const
+    {
+      return true;
+    }
+  };
+  class Hidden_point_visitor
+  {
+  public:
+
+    Hidden_point_visitor() {}
+
+    template <class InputIterator>
+    void process_cells_in_conflict(InputIterator, InputIterator) const {}
+    void reinsert_vertices(Vertex_handle ) {}
+    Vertex_handle replace_vertex(Cell_handle c, int index,
+                                 const Point &) {
+      return c->vertex(index);
+    }
+    void hide_point(Cell_handle, const Point &) {}
+  };
+
+  class Perturbation_order {
+      const Self *t;
+
+  public:
+      Perturbation_order(const Self *tr)
+          : t(tr) {}
+
+      bool operator()(const Point *p, const Point *q) const {
+          return t->compare_xyz(*p, *q) == SMALLER;
+      }
+  };
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Functor for parallel insert(begin, end) function
+  template <typename DT>
+  class Insert_point
+  {
+    typedef typename DT::Point                          Point;
+    typedef typename DT::Vertex_handle                  Vertex_handle;
+
+    DT                                                  & m_dt;
+    const std::vector<Point>                            & m_points;
+    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
+
+  public:
+    // Constructor
+    Insert_point(DT & dt,
+                 const std::vector<Point> & points,
+                 tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
+    : m_dt(dt), m_points(points), m_tls_hint(tls_hint)
+    {}
+
+    // Constructor
+    Insert_point(const Insert_point &ip)
+    : m_dt(ip.m_dt), m_points(ip.m_points), m_tls_hint(ip.m_tls_hint)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]");
+#endif
+
+      Vertex_handle &hint = m_tls_hint.local();
+      for( std::size_t i_point = r.begin() ; i_point != r.end() ; ++i_point)
+      {
+        bool success = false;
+        while(!success)
+        {
+          if (m_dt.try_lock_vertex(hint) && m_dt.try_lock_point(m_points[i_point]))
+          {
+            bool could_lock_zone;
+            Vertex_handle new_hint = m_dt.insert(
+              m_points[i_point], hint, &could_lock_zone);
+
+            m_dt.unlock_all_elements();
+
+            if (could_lock_zone)
+            {
+              hint = new_hint;
+              success = true;
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              ++bcounter;
+#endif
+            }
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            else
+            {
+              bcounter.increment_branch_1(); // THIS is a late withdrawal!
+            }
+#endif
+          }
+          else
+          {
+            m_dt.unlock_all_elements();
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+          }
+        }
+
+      }
+    }
+  };
+
+  // Functor for parallel insert_with_info(begin, end) function
+  template <typename DT>
+  class Insert_point_with_info
+  {
+    typedef typename DT::Point                                  Point;
+    typedef typename DT::Vertex_handle                          Vertex_handle;
+    typedef typename DT::Triangulation_data_structure::Vertex::Info Info;
+
+    DT                                                  & m_dt;
+    const std::vector<Point>                            & m_points;
+    const std::vector<Info>                             & m_infos;
+    const std::vector<std::ptrdiff_t>                   & m_indices;
+    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
+
+  public:
+    // Constructor
+    Insert_point_with_info(DT & dt,
+                 const std::vector<Point> & points,
+                 const std::vector<Info> & infos,
+                 const std::vector<std::ptrdiff_t> & indices,
+                 tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
+    : m_dt(dt), m_points(points), m_infos(infos), m_indices(indices), 
+      m_tls_hint(tls_hint)
+    {}
+
+    // Constructor
+    Insert_point_with_info(const Insert_point_with_info &ip)
+      : m_dt(ip.m_dt), m_points(ip.m_points), m_infos(ip.m_infos),
+      m_indices(ip.m_indices), m_tls_hint(ip.m_tls_hint)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert_with_info]");
+#endif
+
+      Vertex_handle &hint = m_tls_hint.local();
+      for( std::size_t i_idx = r.begin() ; i_idx != r.end() ; ++i_idx)
+      {
+        bool success = false;
+        std::ptrdiff_t i_point = m_indices[i_idx];
+        const Point &p = m_points[i_point];
+        while(!success)
+        {
+          if (m_dt.try_lock_vertex(hint) && m_dt.try_lock_point(p))
+          {
+            bool could_lock_zone;
+            Vertex_handle new_hint = m_dt.insert(
+              p, hint, &could_lock_zone);
+
+            m_dt.unlock_all_elements();
+
+            if (could_lock_zone)
+            {
+              hint = new_hint;
+              if (hint!=Vertex_handle()) hint->info()=m_infos[i_point];
+              success = true;
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              ++bcounter;
+#endif
+            }
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            else
+            {
+              bcounter.increment_branch_1(); // THIS is a late withdrawal!
+            }
+#endif
+          }
+          else
+          {
+            m_dt.unlock_all_elements();
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+          }
+        }
+
+      }
+    }
+  };
+
+  // Functor for parallel remove(begin, end) function
+  template <typename DT>
+  class Remove_point
+  {
+    typedef typename DT::Point                          Point;
+    typedef typename DT::Vertex_handle                  Vertex_handle;
+
+    DT                                    & m_dt;
+    const std::vector<Vertex_handle>      & m_vertices;
+    tbb::concurrent_vector<Vertex_handle> & m_vertices_to_remove_sequentially;
+
+  public:
+    // Constructor
+    Remove_point(DT & dt,
+                 const std::vector<Vertex_handle> & vertices,
+                 tbb::concurrent_vector<Vertex_handle> & 
+                   vertices_to_remove_sequentially)
+    : m_dt(dt), m_vertices(vertices), 
+      m_vertices_to_remove_sequentially(vertices_to_remove_sequentially)
+    {}
+
+    // Constructor
+    Remove_point(const Remove_point &rp)
+    : m_dt(rp.m_dt), m_vertices(rp.m_vertices),
+      m_vertices_to_remove_sequentially(rp.m_vertices_to_remove_sequentially)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+      for( size_t i_vertex = r.begin() ; i_vertex != r.end() ; ++i_vertex)
+      {
+        Vertex_handle v = m_vertices[i_vertex];
+        bool could_lock_zone, needs_to_be_done_sequentially;
+        do
+        {
+          needs_to_be_done_sequentially =
+            !m_dt.remove(v, &could_lock_zone);
+          m_dt.unlock_all_elements();
+        } while (!could_lock_zone);
+
+        if (needs_to_be_done_sequentially)
+          m_vertices_to_remove_sequentially.push_back(v);
+      }
+    }
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+  template < class DelaunayTriangulation_3 >
+  class Vertex_remover;
+
+  template < class DelaunayTriangulation_3 >
+  class Vertex_inserter;
+
+  friend class Perturbation_order;
+  friend class Conflict_tester_3;
+  friend class Conflict_tester_2;
+
+  Hidden_point_visitor hidden_point_visitor;
+};
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+insert(const Point & p, Cell_handle start, bool *could_lock_zone)
+{
+  Locate_type lt;
+  int li, lj;
+
+  // Parallel
+  if (could_lock_zone)
+  {
+    Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone);
+    if (*could_lock_zone)
+      return insert(p, lt, c, li, lj, could_lock_zone);
+    else
+      return Vertex_handle();
+  }
+  // Sequential
+  else
+  {
+    Cell_handle c = locate(p, lt, li, lj, start);
+    return insert(p, lt, c, li, lj);
+  }
+
+}
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+insert(const Point & p, Locate_type lt, Cell_handle c, int li, int lj,
+       bool *could_lock_zone)
+{
+  switch (dimension()) {
+  case 3:
+    {
+      Conflict_tester_3 tester(p, this);
+      Vertex_handle v = insert_in_conflict(p, lt, c, li, lj,
+                                           tester, hidden_point_visitor, could_lock_zone);
+      return v;
+    }// dim 3
+  case 2:
+    {
+      Conflict_tester_2 tester(p, this);
+      return insert_in_conflict(p, lt, c, li, lj,
+                                tester, hidden_point_visitor, could_lock_zone);
+    }//dim 2
+  default :
+    // dimension <= 1
+    // Do not use the generic insert.
+    return Tr_Base::insert(p, c);
+  }
+}
+
+template < class Gt, class Tds, class Lds >
+template <class OutputItCells>
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+insert_and_give_new_cells(const Point  &p,
+                          OutputItCells fit,
+                          Cell_handle start)
+{
+  Vertex_handle v = insert(p, start);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+template < class Gt, class Tds, class Lds >
+template <class OutputItCells>
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+insert_and_give_new_cells(const Point& p,
+                          OutputItCells fit,
+                          Vertex_handle hint)
+{
+  Vertex_handle v = insert(p, hint);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+template < class Gt, class Tds, class Lds >
+template <class OutputItCells>
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+insert_and_give_new_cells(const Point& p,
+                          Locate_type lt,
+                          Cell_handle c, int li, int lj,
+                          OutputItCells fit)
+{
+  Vertex_handle v = insert(p, lt, c, li, lj);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+move_point(Vertex_handle v, const Point & p)
+{
+    CGAL_triangulation_precondition(! is_infinite(v));
+    CGAL_triangulation_expensive_precondition(is_vertex(v));
+
+    // Dummy implementation for a start.
+
+    // Remember an incident vertex to restart
+    // the point location after the removal.
+    Cell_handle c = v->cell();
+    Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0);
+    CGAL_triangulation_assertion(old_neighbor != v);
+
+    remove(v);
+
+    if (dimension() <= 0)
+        return insert(p);
+    return insert(p, old_neighbor->cell());
+}
+#endif
+
+template <class Gt, class Tds, class Lds >
+template <class DelaunayTriangulation_3>
+class Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_remover {
+  typedef DelaunayTriangulation_3 Delaunay;
+public:
+  typedef Nullptr_t Hidden_points_iterator;
+
+  Vertex_remover(Delaunay &tmp_) : tmp(tmp_) {}
+
+  Delaunay &tmp;
+
+  void add_hidden_points(Cell_handle) {}
+  Hidden_points_iterator hidden_points_begin() { return NULL; }
+  Hidden_points_iterator hidden_points_end() { return NULL; }
+
+  Bounded_side side_of_bounded_circle(const Point &p, const Point &q,
+    const Point &r, const Point &s, bool perturb = false) const {
+    return tmp.coplanar_side_of_bounded_circle(p,q,r,s,perturb);
+  }
+};
+
+template <class Gt, class Tds, class Lds >
+template <class DelaunayTriangulation_3>
+class Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_inserter {
+  typedef DelaunayTriangulation_3 Delaunay;
+public:
+  typedef Nullptr_t Hidden_points_iterator;
+
+  Vertex_inserter(Delaunay &tmp_) : tmp(tmp_) {}
+
+  Delaunay &tmp;
+
+  void add_hidden_points(Cell_handle) {}
+  Hidden_points_iterator hidden_points_begin() { return NULL; }
+  Hidden_points_iterator hidden_points_end() { return NULL; }
+
+  Vertex_handle insert(const Point& p,
+                       Locate_type lt, Cell_handle c, int li, int lj) {
+    return tmp.insert(p, lt, c, li, lj);
+  }
+
+  Vertex_handle insert(const Point& p, Cell_handle c) {
+    return tmp.insert(p, c);
+  }
+
+  Vertex_handle insert(const Point& p) {
+    return tmp.insert(p);
+  }
+};
+
+template < class Gt, class Tds, class Lds >
+void
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+remove(Vertex_handle v)
+{
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  Tr_Base::remove(v, remover);
+
+  CGAL_triangulation_expensive_postcondition(is_valid());
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+remove(Vertex_handle v, bool *could_lock_zone)
+{
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  bool ret = Tr_Base::remove(v, remover, could_lock_zone);
+
+  CGAL_triangulation_expensive_postcondition(is_valid());
+  return ret;
+}
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+move_if_no_collision(Vertex_handle v, const Point &p)
+{
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  Vertex_inserter<Self> inserter (*this);
+  Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter);
+
+  CGAL_triangulation_expensive_postcondition(is_valid());
+        return res;
+}
+
+template <class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+move(Vertex_handle v, const Point &p) {
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  Vertex_inserter<Self> inserter (*this);
+        return Tr_Base::move(v,p,remover,inserter);
+}
+
+template < class Gt, class Tds, class Lds >
+template <class OutputItCells>
+void
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+remove_and_give_new_cells(Vertex_handle v, OutputItCells fit)
+{
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  Tr_Base::remove_and_give_new_cells(v,remover,fit);
+
+  CGAL_triangulation_expensive_postcondition(is_valid());
+}
+
+template < class Gt, class Tds, class Lds >
+template <class OutputItCells>
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point &p,
+  OutputItCells fit)
+{
+  Self tmp;
+  Vertex_remover<Self> remover (tmp);
+  Vertex_inserter<Self> inserter (*this);
+  Vertex_handle res =
+    Tr_Base::move_if_no_collision_and_give_new_cells(v,p,
+      remover,inserter,fit);
+
+  CGAL_triangulation_expensive_postcondition(is_valid());
+        return res;
+}
+
+template < class Gt, class Tds, class Lds >
+Oriented_side
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
+                        const Point &p3, const Point &p, bool perturb) const
+{
+    CGAL_triangulation_precondition( orientation(p0, p1, p2, p3) == POSITIVE );
+
+    Oriented_side os =
+        geom_traits().side_of_oriented_sphere_3_object()(p0, p1, p2, p3, p);
+
+    if (os != ON_ORIENTED_BOUNDARY || !perturb)
+        return os;
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    // We sort the points lexicographically.
+    const Point * points[5] = {&p0, &p1, &p2, &p3, &p};
+    std::sort(points, points+5, Perturbation_order(this) );
+
+    // We successively look whether the leading monomial, then 2nd monomial
+    // of the determinant has non null coefficient.
+    // 2 iterations are enough (cf paper)
+    for (int i=4; i>2; --i) {
+        if (points[i] == &p)
+            return ON_NEGATIVE_SIDE; // since p0 p1 p2 p3 are non coplanar
+                                     // and positively oriented
+        Orientation o;
+        if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
+            return o;
+        if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
+            return o;
+        if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
+            return o;
+        if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
+            return o;
+    }
+
+    CGAL_triangulation_assertion(false);
+    return ON_NEGATIVE_SIDE;
+}
+
+template < class Gt, class Tds, class Lds >
+Bounded_side
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+coplanar_side_of_bounded_circle(const Point &p0, const Point &p1,
+               const Point &p2, const Point &p, bool perturb) const
+{
+    // In dim==2, we should even be able to assert orient == POSITIVE.
+    CGAL_triangulation_precondition( coplanar_orientation(p0, p1, p2)
+                                     != COLLINEAR );
+
+    Bounded_side bs =
+      geom_traits().coplanar_side_of_bounded_circle_3_object()(p0, p1, p2, p);
+
+    if (bs != ON_BOUNDARY || !perturb)
+        return bs;
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    // We sort the points lexicographically.
+    const Point * points[4] = {&p0, &p1, &p2, &p};
+    std::sort(points, points+4, Perturbation_order(this) );
+
+    Orientation local = coplanar_orientation(p0, p1, p2);
+
+    // we successively look whether the leading monomial, then 2nd monimial,
+    // then 3rd monomial, of the determinant which has non null coefficient
+    // [syl] : TODO : Probably it can be stopped earlier like the 3D version
+    for (int i=3; i>0; --i) {
+        if (points[i] == &p)
+            return Bounded_side(NEGATIVE); // since p0 p1 p2 are non collinear
+                                   // but not necessarily positively oriented
+        Orientation o;
+        if (points[i] == &p2
+                && (o = coplanar_orientation(p0,p1,p)) != COLLINEAR )
+            // [syl] : TODO : I'm not sure of the signs here (nor the rest :)
+            return Bounded_side(o*local);
+        if (points[i] == &p1
+                && (o = coplanar_orientation(p0,p,p2)) != COLLINEAR )
+            return Bounded_side(o*local);
+        if (points[i] == &p0
+                && (o = coplanar_orientation(p,p1,p2)) != COLLINEAR )
+            return Bounded_side(o*local);
+    }
+
+    // case when the first non null coefficient is the coefficient of
+    // the 4th monomial
+    // moreover, the tests (points[] == &p) were false up to here, so the
+    // monomial corresponding to p is the only monomial with non-zero
+    // coefficient, it is equal to coplanar_orient(p0,p1,p2) == positive
+    // so, no further test is required
+    return Bounded_side(-local); //ON_UNBOUNDED_SIDE;
+}
+
+template < class Gt, class Tds, class Lds >
+Bounded_side
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+side_of_sphere(Vertex_handle v0, Vertex_handle v1,
+               Vertex_handle v2, Vertex_handle v3,
+               const Point &p, bool perturb) const
+{
+    CGAL_triangulation_precondition( dimension() == 3 );
+
+    if (is_infinite(v0)) {
+        Orientation o = orientation(v2->point(), v1->point(), v3->point(), p);
+        if (o != COPLANAR)
+            return Bounded_side(o);
+        return coplanar_side_of_bounded_circle(v2->point(), v1->point(), v3->point(), p, perturb);
+    }
+
+    if (is_infinite(v1)) {
+        Orientation o = orientation(v2->point(), v3->point(), v0->point(), p);
+        if (o != COPLANAR)
+            return Bounded_side(o);
+        return coplanar_side_of_bounded_circle(v2->point(), v3->point(), v0->point(), p, perturb);
+    }
+
+    if (is_infinite(v2)) {
+        Orientation o = orientation(v1->point(), v0->point(), v3->point(), p);
+        if (o != COPLANAR)
+            return Bounded_side(o);
+        return coplanar_side_of_bounded_circle(v1->point(), v0->point(), v3->point(), p, perturb);
+    }
+
+    if (is_infinite(v3)) {
+        Orientation o = orientation(v0->point(), v1->point(), v2->point(), p);
+        if (o != COPLANAR)
+            return Bounded_side(o);
+        return coplanar_side_of_bounded_circle(v0->point(), v1->point(), v2->point(), p, perturb);
+    }
+
+    return (Bounded_side) side_of_oriented_sphere(v0->point(), v1->point(), v2->point(), v3->point(), p, perturb);
+}
+
+template < class Gt, class Tds, class Lds >
+Bounded_side
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+side_of_circle(Cell_handle c, int i,
+               const Point & p, bool perturb) const
+  // precondition : dimension >=2
+  // in dimension 3, - for a finite facet
+  // returns ON_BOUNDARY if the point lies on the circle,
+  // ON_UNBOUNDED_SIDE when exterior, ON_BOUNDED_SIDE
+  // interior
+  // for an infinite facet, considers the plane defined by the
+  // adjacent finite facet of the same cell, and does the same as in
+  // dimension 2 in this plane
+  // in dimension 2, for an infinite facet
+  // in this case, returns ON_BOUNDARY if the point lies on the
+  // finite edge (endpoints included)
+  // ON_BOUNDED_SIDE for a point in the open half-plane
+  // ON_UNBOUNDED_SIDE elsewhere
+{
+  CGAL_triangulation_precondition( dimension() >= 2 );
+  int i3 = 5;
+
+  if ( dimension() == 2 ) {
+    CGAL_triangulation_precondition( i == 3 );
+    // the triangulation is supposed to be valid, ie the facet
+    // with vertices 0 1 2 in this order is positively oriented
+    if ( ! c->has_vertex( infinite_vertex(), i3 ) )
+      return coplanar_side_of_bounded_circle( c->vertex(0)->point(),
+                                              c->vertex(1)->point(),
+                                              c->vertex(2)->point(),
+                                              p, perturb);
+    // else infinite facet
+    // v1, v2 finite vertices of the facet such that v1,v2,infinite
+    // is positively oriented
+    Vertex_handle v1 = c->vertex( ccw(i3) ),
+                  v2 = c->vertex( cw(i3) );
+    CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
+                                 mirror_vertex(c, i3)->point()) == NEGATIVE);
+    Orientation o = coplanar_orientation(v1->point(), v2->point(), p);
+    if ( o != COLLINEAR )
+        return Bounded_side( o );
+    // because p is in f iff
+    // it does not lie on the same side of v1v2 as vn
+    int i_e;
+    Locate_type lt;
+    // case when p collinear with v1v2
+    return side_of_segment( p,
+                            v1->point(), v2->point(),
+                            lt, i_e );
+  }
+
+  // else dimension == 3
+  CGAL_triangulation_precondition( i >= 0 && i < 4 );
+  if ( ( ! c->has_vertex(infinite_vertex(),i3) ) || ( i3 != i ) ) {
+    // finite facet
+    // initialization of i0 i1 i2, vertices of the facet positively
+    // oriented (if the triangulation is valid)
+    int i0 = (i>0) ? 0 : 1;
+    int i1 = (i>1) ? 1 : 2;
+    int i2 = (i>2) ? 2 : 3;
+    CGAL_triangulation_precondition( coplanar( c->vertex(i0)->point(),
+                                               c->vertex(i1)->point(),
+                                               c->vertex(i2)->point(),
+                                               p ) );
+    return coplanar_side_of_bounded_circle( c->vertex(i0)->point(),
+                                            c->vertex(i1)->point(),
+                                            c->vertex(i2)->point(),
+                                            p, perturb);
+  }
+
+  //else infinite facet
+  // v1, v2 finite vertices of the facet such that v1,v2,infinite
+  // is positively oriented
+  Vertex_handle v1 = c->vertex( next_around_edge(i3,i) ),
+                v2 = c->vertex( next_around_edge(i,i3) );
+  Orientation o = (Orientation)
+                  (coplanar_orientation( v1->point(), v2->point(),
+                                         c->vertex(i)->point()) *
+                  coplanar_orientation( v1->point(), v2->point(), p ));
+  // then the code is duplicated from 2d case
+  if ( o != COLLINEAR )
+      return Bounded_side( -o );
+  // because p is in f iff
+  // it is not on the same side of v1v2 as c->vertex(i)
+  int i_e;
+  Locate_type lt;
+  // case when p collinear with v1v2
+  return side_of_segment( p,
+                          v1->point(), v2->point(),
+                          lt, i_e );
+}
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+nearest_vertex_in_cell(const Point& p, Cell_handle c) const
+// Returns the finite vertex of the cell c which is the closest to p.
+{
+    CGAL_triangulation_precondition(dimension() >= 0);
+
+    Vertex_handle nearest = nearest_vertex(p, c->vertex(0), c->vertex(1));
+    if (dimension() >= 2) {
+        nearest = nearest_vertex(p, nearest, c->vertex(2));
+        if (dimension() == 3)
+            nearest = nearest_vertex(p, nearest, c->vertex(3));
+    }
+    return nearest;
+}
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Vertex_handle
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+nearest_vertex(const Point& p, Cell_handle start) const
+{
+    if (number_of_vertices() == 0)
+        return Vertex_handle();
+
+    // Use a brute-force algorithm if dimension < 3.
+    if (dimension() < 3) {
+        Finite_vertices_iterator vit = finite_vertices_begin();
+        Vertex_handle res = vit;
+        ++vit;
+        for (Finite_vertices_iterator end = finite_vertices_end(); vit != end; ++vit)
+            res = nearest_vertex(p, res, vit);
+        return res;
+    }
+
+    Locate_type lt;
+    int li, lj;
+    Cell_handle c = locate(p, lt, li, lj, start);
+    if (lt == Tr_Base::VERTEX)
+        return c->vertex(li);
+
+    // - start with the closest vertex from the located cell.
+    // - repeatedly take the nearest of its incident vertices if any
+    // - if not, we're done.
+    Vertex_handle nearest = nearest_vertex_in_cell(p, c);
+    std::vector<Vertex_handle> vs;
+    vs.reserve(32);
+    while (true) {
+        Vertex_handle tmp = nearest;
+        adjacent_vertices(nearest, std::back_inserter(vs));
+        for (typename std::vector<Vertex_handle>::const_iterator
+                vsit = vs.begin(); vsit != vs.end(); ++vsit)
+            tmp = nearest_vertex(p, tmp, *vsit);
+        if (tmp == nearest)
+            break;
+        vs.clear();
+        nearest = tmp;
+    }
+
+    return nearest;
+}
+
+// This is not a fast version.
+// The optimized version needs an int for book-keeping in
+// tds() so as to avoiding the need to clear
+// the tds marker in each cell (which is an unsigned char)
+// Also the visitor in TDS could be more clever.
+// The Delaunay triangulation which filters displacements
+// will do these optimizations.
+template <class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
+{
+  CGAL_triangulation_precondition(!this->is_infinite(v));
+  CGAL_triangulation_precondition(this->dimension() == 2);
+  CGAL_triangulation_precondition(!this->test_dim_down(v));
+        if(v->point() == p) return true;
+  Point ant = v->point();
+  v->set_point(p);
+
+  std::size_t size;
+
+  // are incident cells well-oriented
+  std::vector<Cell_handle> cells;
+  cells.reserve(64);
+  this->incident_cells(v, std::back_inserter(cells));
+  size = cells.size();
+  for(std::size_t i=0; i<size; i++)
+  {
+    Cell_handle c = cells[i];
+    if(this->is_infinite(c)) continue;
+    if(this->orientation(c->vertex(0)->point(), c->vertex(1)->point(),
+                         c->vertex(2)->point(), c->vertex(3)->point())
+       != POSITIVE)
+    {
+      v->set_point(ant);
+      return false;
+    }
+  }
+
+  // are incident bi-cells Delaunay?
+  std::vector<Facet> facets;
+  facets.reserve(128);
+  this->incident_facets(v, std::back_inserter(facets));
+  size = facets.size();
+  for(std::size_t i=0; i<size; i++)
+  {
+    const Facet &f = facets[i];
+    Cell_handle c = f.first;
+    int j = f.second;
+    Cell_handle cj = c->neighbor(j);
+    int mj = this->mirror_index(c, j);
+    Vertex_handle h1 = c->vertex(j);
+    if(this->is_infinite(h1)) {
+      if(this->side_of_sphere(c, cj->vertex(mj)->point(), true)
+         != ON_UNBOUNDED_SIDE) {
+        v->set_point(ant);
+        return false;
+      }
+    } else {
+      if(this->side_of_sphere(cj, h1->point(), true) != ON_UNBOUNDED_SIDE) {
+        v->set_point(ant);
+        return false;
+      }
+    }
+  }
+
+  v->set_point(ant);
+  return true;
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_Gabriel(const Facet& f) const
+{
+  return is_Gabriel(f.first, f.second);
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_Gabriel(Cell_handle c, int i) const
+{
+  CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i));
+  typename Geom_traits::Side_of_bounded_sphere_3
+    side_of_bounded_sphere =
+    geom_traits().side_of_bounded_sphere_3_object();
+
+  if ((!is_infinite(c->vertex(i))) &&
+      side_of_bounded_sphere (
+        c->vertex(vertex_triple_index(i,0))->point(),
+        c->vertex(vertex_triple_index(i,1))->point(),
+        c->vertex(vertex_triple_index(i,2))->point(),
+        c->vertex(i)->point()) == ON_BOUNDED_SIDE ) return false;
+    Cell_handle neighbor = c->neighbor(i);
+  int in = neighbor->index(c);
+
+  if ((!is_infinite(neighbor->vertex(in))) &&
+      side_of_bounded_sphere(
+         c->vertex(vertex_triple_index(i,0))->point(),
+         c->vertex(vertex_triple_index(i,1))->point(),
+         c->vertex(vertex_triple_index(i,2))->point(),
+         neighbor->vertex(in)->point()) == ON_BOUNDED_SIDE ) return false;
+
+  return true;
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_Gabriel(const Edge& e) const
+{
+  return is_Gabriel(e.first, e.second, e.third);
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_Gabriel(Cell_handle c, int i, int j) const
+{
+  CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j));
+  typename Geom_traits::Side_of_bounded_sphere_3
+    side_of_bounded_sphere =
+    geom_traits().side_of_bounded_sphere_3_object();
+
+  Facet_circulator fcirc = incident_facets(c,i,j),
+                   fdone(fcirc);
+  Vertex_handle v1 = c->vertex(i);
+  Vertex_handle v2 = c->vertex(j);
+  do {
+      // test whether the vertex of cc opposite to *fcirc
+      // is inside the sphere defined by the edge e = (s, i,j)
+      Cell_handle cc = (*fcirc).first;
+      int ii = (*fcirc).second;
+      if (!is_infinite(cc->vertex(ii)) &&
+           side_of_bounded_sphere( v1->point(),
+                                   v2->point(),
+                                   cc->vertex(ii)->point())
+          == ON_BOUNDED_SIDE ) return false;
+  } while(++fcirc != fdone);
+  return true;
+}
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Point
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+dual(Cell_handle c) const
+{
+  CGAL_triangulation_precondition(dimension()==3);
+  CGAL_triangulation_precondition( ! is_infinite(c) );
+  return c->circumcenter(geom_traits());
+}
+
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Object
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+dual(Cell_handle c, int i) const
+{
+  CGAL_triangulation_precondition(dimension()>=2);
+  CGAL_triangulation_precondition( ! is_infinite(c,i) );
+
+  if ( dimension() == 2 ) {
+    CGAL_triangulation_precondition( i == 3 );
+    return construct_object( construct_circumcenter(c->vertex(0)->point(),
+                                                    c->vertex(1)->point(),
+                                                    c->vertex(2)->point()) );
+  }
+
+  // dimension() == 3
+  Cell_handle n = c->neighbor(i);
+  if ( ! is_infinite(c) && ! is_infinite(n) )
+    return construct_object(construct_segment( dual(c), dual(n) ));
+
+  // either n or c is infinite
+  int in;
+  if ( is_infinite(c) )
+    in = n->index(c);
+  else {
+    n = c;
+    in = i;
+  }
+  // n now denotes a finite cell, either c or c->neighbor(i)
+  int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
+  if ( (in&1) == 1 )
+      std::swap(ind[0], ind[1]);
+  // in=0: 1 2 3
+  // in=1: 3 2 0
+  // in=2: 3 0 1
+  // in=3: 1 0 2
+  const Point& p = n->vertex(ind[0])->point();
+  const Point& q = n->vertex(ind[1])->point();
+  const Point& r = n->vertex(ind[2])->point();
+
+  Line l = construct_equidistant_line( p, q, r );
+  return construct_object(construct_ray( dual(n), l));
+}
+
+
+
+template < class Gt, class Tds, class Lds >
+typename Delaunay_triangulation_3<Gt,Tds,Default,Lds>::Line
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+dual_support(Cell_handle c, int i) const
+{
+  CGAL_triangulation_precondition(dimension()>=2);
+  CGAL_triangulation_precondition( ! is_infinite(c,i) );
+
+  if ( dimension() == 2 ) {
+    CGAL_triangulation_precondition( i == 3 );
+    return construct_equidistant_line( c->vertex(0)->point(),
+                                       c->vertex(1)->point(),
+                                       c->vertex(2)->point() );
+  }
+
+  return construct_equidistant_line( c->vertex((i+1)&3)->point(),
+                                     c->vertex((i+2)&3)->point(),
+                                     c->vertex((i+3)&3)->point() );
+}
+
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_valid(bool verbose, int level) const
+{
+  if ( ! tds().is_valid(verbose,level) ) {
+    if (verbose)
+        std::cerr << "invalid data structure" << std::endl;
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+
+  if ( infinite_vertex() == Vertex_handle() ) {
+    if (verbose)
+        std::cerr << "no infinite vertex" << std::endl;
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+
+  switch ( dimension() ) {
+  case 3:
+    {
+      for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end(); it != end; ++it) {
+        is_valid_finite(it);
+        for(int i=0; i<4; i++ ) {
+          if ( !is_infinite
+               (it->neighbor(i)->vertex(it->neighbor(i)->index(it))) ) {
+            if ( side_of_sphere
+                 (it,
+                  it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point())
+                 == ON_BOUNDED_SIDE ) {
+              if (verbose)
+                std::cerr << "non-empty sphere " << std::endl;
+              CGAL_triangulation_assertion(false);
+              return false;
+            }
+          }
+        }
+      }
+      break;
+    }
+  case 2:
+    {
+      for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end(); it != end; ++it) {
+        is_valid_finite((*it).first);
+        for(int i=0; i<3; i++ ) {
+          if( !is_infinite
+              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
+                                                 ->index((*it).first))) ) {
+            if ( side_of_circle ( (*it).first, 3,
+                                  (*it).first->neighbor(i)->
+                                  vertex( (((*it).first)->neighbor(i))
+                                          ->index((*it).first) )->point() )
+                 == ON_BOUNDED_SIDE ) {
+              if (verbose)
+                std::cerr << "non-empty circle " << std::endl;
+              CGAL_triangulation_assertion(false);
+              return false;
+            }
+          }
+        }
+      }
+      break;
+    }
+  case 1:
+    {
+      for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end(); it != end; ++it)
+        is_valid_finite((*it).first);
+      break;
+    }
+  }
+  if (verbose)
+      std::cerr << "Delaunay valid triangulation" << std::endl;
+  return true;
+}
+
+template < class Gt, class Tds, class Lds >
+bool
+Delaunay_triangulation_3<Gt,Tds,Default,Lds>::
+is_valid(Cell_handle c, bool verbose, int level) const
+{
+  if ( ! Tr_Base::is_valid(c,verbose,level) ) {
+    if (verbose) {
+      std::cerr << "combinatorically invalid cell" ;
+      for (int i=0; i <= dimension(); i++ )
+        std::cerr << c->vertex(i)->point() << ", " ;
+      std::cerr << std::endl;
+    }
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+  switch ( dimension() ) {
+  case 3:
+    {
+      if ( ! is_infinite(c) ) {
+        is_valid_finite(c,verbose,level);
+        for (int i=0; i<4; i++ ) {
+          if (side_of_sphere(c, c->vertex((c->neighbor(i))->index(c))->point())
+              == ON_BOUNDED_SIDE ) {
+            if (verbose)
+                std::cerr << "non-empty sphere " << std::endl;
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+        }
+      }
+      break;
+    }
+  case 2:
+    {
+      if ( ! is_infinite(c,3) ) {
+        for (int i=0; i<2; i++ ) {
+          if (side_of_circle(c, 3, c->vertex(c->neighbor(i)->index(c))->point())
+               == ON_BOUNDED_SIDE ) {
+            if (verbose)
+                std::cerr << "non-empty circle " << std::endl;
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+        }
+      }
+      break;
+    }
+  }
+  if (verbose)
+      std::cerr << "Delaunay valid cell" << std::endl;
+  return true;
+}
+
+} //namespace CGAL
+
+#include <CGAL/internal/Delaunay_triangulation_hierarchy_3.h>
+
+#endif // CGAL_DELAUNAY_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Diagonalize_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Diagonalize_traits.h
new file mode 100644
index 0000000..16773f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Diagonalize_traits.h
@@ -0,0 +1,271 @@
+// Copyright (c) 2015 GeometryFactory (France), All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Simon Giraudot
+
+
+#ifndef CGAL_DIAGONALIZE_TRAITS_H
+#define CGAL_DIAGONALIZE_TRAITS_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+  /// A model of the concept `DiagonalizeTraits` 
+  /// \cgalModels `DiagonalizeTraits`
+
+template <typename FT, unsigned int dim = 3>
+class Diagonalize_traits{
+
+public:
+  
+    typedef cpp11::array<FT, dim> Vector;
+    typedef cpp11::array<FT, dim*dim> Matrix;
+    typedef cpp11::array<FT, (dim * (dim+1) / 2)> Covariance_matrix;
+
+    static bool
+    diagonalize_selfadjoint_covariance_matrix
+      (const Covariance_matrix& cov,
+       Vector& eigenvalues)
+    {
+      Matrix eigenvectors;
+      return diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors);
+    }
+
+    // Extract the eigenvector associated to the largest eigenvalue
+    static bool
+    extract_largest_eigenvector_of_covariance_matrix
+      (const Covariance_matrix& cov,
+       Vector& normal)
+    {
+      Vector eigenvalues;
+      Matrix eigenvectors;
+
+      diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors);
+
+      for (std::size_t i = 0; i < dim; ++ i)
+	normal[i] = static_cast<FT> (eigenvectors[(dim*(dim-1))+i]);
+
+      return true;
+    }
+
+    static bool diagonalize_selfadjoint_covariance_matrix
+       (const Covariance_matrix& mat,
+	Vector& eigen_values,
+	Matrix& eigen_vectors)
+    {
+      const int n = dim;
+      
+      const int MAX_ITER = 100;
+      static const FT EPSILON = (FT)0.00001;
+      
+      // number of entries in mat
+      int nn = (n*(n+1))/2;
+      
+      // copy matrix
+      FT *a = new FT[nn];
+      int ij;
+
+      // This function requires lower triangular, so we switch
+      for (int i = 0; i < n; ++ i)
+	for (int j = i; j < n; ++ j)
+	  a[(n * i) + j - ((i * (i+1)) / 2)]
+	    = mat[i + (j * (j+1) / 2)];
+
+      // Fortran-porting
+      a--;
+      
+      // init diagonalization matrix as the unit matrix
+      FT *v = new FT[n*n];
+      ij = 0;
+      int i;
+      for(i=0; i<n; i++)
+	for(int j=0; j<n; j++) 
+	  if(i==j)
+	    v[ij++] = 1.0;
+	  else
+	    v[ij++] = 0.0;
+      // Fortran-porting
+      v--;
+      
+      // compute weight of the non diagonal terms 
+      ij = 1;
+      FT a_norm = 0.0;
+      for(i=1; i<=n; i++)
+	for(int j=1; j<=i; j++) 
+	  {
+	    if( i!=j ) 
+	      {
+		FT a_ij = a[ij];
+		a_norm += a_ij * a_ij;
+	      }
+	    ij++;
+	  }
+      
+      if(a_norm != 0.0) 
+	{
+	  FT a_normEPS = a_norm * EPSILON;
+	  FT thr = a_norm;
+  
+	  // rotations
+	  int nb_iter = 0;
+	  while(thr > a_normEPS && nb_iter < MAX_ITER) 
+	    {
+	      nb_iter++;
+	      FT thr_nn = thr / nn;
+          
+	      for(int l=1; l< n; l++) 
+		{
+		  for(int m=l+1; m<=n; m++) 
+		    {
+		      // compute sinx and cosx 
+		      int lq = (l*l-l)/2;
+		      int mq = (m*m-m)/2;
+          
+		      int lm = l + mq;
+		      FT a_lm = a[lm];
+		      FT a_lm_2 = a_lm * a_lm;
+          
+		      if(a_lm_2 < thr_nn)
+			continue;
+          
+		      int ll   = l + lq;
+		      int mm   = m + mq;
+		      FT a_ll = a[ll];
+		      FT a_mm = a[mm];
+          
+		      FT delta = a_ll - a_mm;
+          
+		      FT x;
+		      if(delta == 0.0)
+			x = (FT) - CGAL_PI / 4; 
+		      else 
+			x = (FT)(- std::atan( (a_lm+a_lm) / delta ) / 2.0);
+
+		      FT sinx    = std::sin(x);
+		      FT cosx    = std::cos(x);
+		      FT sinx_2  = sinx * sinx;
+		      FT cosx_2  = cosx * cosx;
+		      FT sincos  = sinx * cosx;
+          
+		      // rotate L and M columns 
+		      int ilv = n*(l-1);
+		      int imv = n*(m-1);
+          
+		      int i;
+		      for( i=1; i<=n;i++ ) 
+			{
+			  if( (i!=l) && (i!=m) ) 
+			    {
+			      int iq = (i*i-i)/2;
+              
+			      int im;
+			      if( i<m )  
+				im = i + mq; 
+			      else
+				im = m + iq;
+			      FT a_im = a[im];
+              
+			      int il;
+			      if( i<l ) 
+				il = i + lq; 
+			      else 
+				il = l + iq;
+			      FT a_il = a[il];
+              
+			      a[il] = a_il * cosx - a_im * sinx;
+			      a[im] = a_il * sinx + a_im * cosx;
+			    }
+            
+			  ilv++;
+			  imv++;
+            
+			  FT v_ilv = v[ilv];
+			  FT v_imv = v[imv];
+            
+			  v[ilv] = cosx * v_ilv - sinx * v_imv;
+			  v[imv] = sinx * v_ilv + cosx * v_imv;
+			} 
+          
+		      x = a_lm * sincos; 
+		      x += x;
+          
+		      a[ll] =  a_ll * cosx_2 + a_mm * sinx_2 - x;
+		      a[mm] =  a_ll * sinx_2 + a_mm * cosx_2 + x;
+		      a[lm] =  0.0;
+          
+		      thr = CGAL::abs(thr - a_lm_2);
+		    }
+		}
+	    }         
+	}
+      
+      // convert indices and copy eigen values 
+      a++;
+      for(i=0; i<n; i++) 
+	{
+	  int k = i + (i*(i+1))/2;
+	  eigen_values[i] = a[k];
+	}
+      delete [] a;
+      
+      // sort eigen values and vectors 
+      int *index = new int[n];
+      for(i=0; i<n; i++)
+	index[i] = i;
+      
+      for(i=0; i<(n-1); i++)
+	{
+	  FT x = eigen_values[i];
+	  int k = i;
+        
+	  for(int j=i+1; j<n; j++) 
+	    if(x > eigen_values[j]) 
+	      {
+		k = j;
+		x = eigen_values[j];
+	      }
+        
+	  eigen_values[k] = eigen_values[i];
+	  eigen_values[i] = x;
+      
+	  int jj = index[k];
+	  index[k] = index[i];
+	  index[i] = jj;
+	}
+
+
+      // save eigen vectors 
+      v++; // back to C++
+      ij = 0;
+      for(int k=0; k<n; k++ ) 
+	{
+	  int ik = index[k]*n;
+	  for(int i=0; i<n; i++) 
+	    eigen_vectors[ij++] = v[ik++];
+	}
+  
+      delete [] v;
+      delete [] index;
+
+      return true;
+    }
+
+  };
+
+} // namespace CGAL
+
+#endif // CGAL_DIAGONALIZE_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dimension.h b/3rdparty/CGAL-4.8/include/CGAL/Dimension.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Dimension.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Dimension.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Direction_2.h b/3rdparty/CGAL-4.8/include/CGAL/Direction_2.h
new file mode 100644
index 0000000..bca7fa5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Direction_2.h
@@ -0,0 +1,282 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_DIRECTION_2_H
+#define CGAL_DIRECTION_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Direction_2 : public R_::Kernel_base::Direction_2
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Vector_2              Vector_2;
+  typedef typename R_::Line_2                Line_2;
+  typedef typename R_::Ray_2                 Ray_2;
+  typedef typename R_::Segment_2             Segment_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+  typedef typename R_::Kernel_base::Direction_2      RDirection_2;
+
+  typedef Direction_2                        Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef RDirection_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Direction_2() {}
+
+  Direction_2(const RDirection_2& d)
+    : RDirection_2(d) {}
+
+  explicit Direction_2(const Vector_2& v)
+    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), v)) {}
+
+  explicit Direction_2(const Line_2& l)
+    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), l)) {}
+
+  explicit Direction_2(const Ray_2& r)
+    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), r)) {}
+
+  explicit Direction_2(const Segment_2& s)
+    : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), s)) {}
+
+  Direction_2(const RT &x, const RT &y)
+    :  RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), x,y)) {}
+
+  typename R::Boolean
+  counterclockwise_in_between(const Direction_2 &d1,
+			      const Direction_2 &d2) const
+  {
+    return R().counterclockwise_in_between_2_object()(*this, d1, d2);
+  }
+
+  Direction_2 perpendicular(const Orientation &o) const
+  {
+    return R().construct_perpendicular_direction_2_object()(*this,o);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dx_2( Direction_2)>::type
+  dx() const
+  {
+    return R().compute_dx_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dy_2( Direction_2)>::type
+  dy() const
+  {
+    return R().compute_dy_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dx_2( Direction_2)>::type
+  delta(int i) const
+  {
+    CGAL_kernel_precondition( ( i == 0 ) || ( i == 1 ) );
+    return (i==0) ? dx() : dy();
+  }
+
+  typename R::Boolean
+  operator<(const Direction_2 &d) const
+  {
+    return R().compare_angle_with_x_axis_2_object()(*this, d) == SMALLER;
+  }
+
+
+  typename R::Boolean
+  operator>(const Direction_2 &d) const
+  {
+    return d < *this;
+  }
+
+
+  typename R::Boolean
+  operator>=(const Direction_2 &d) const
+  {
+    return R().compare_angle_with_x_axis_2_object()(*this, d) != SMALLER;
+  }
+
+
+  typename R::Boolean
+  operator<=(const Direction_2 &d) const
+  {
+    return R().compare_angle_with_x_axis_2_object()(*this, d) != LARGER;
+  }
+
+  Direction_2
+  operator-() const
+  {
+    return R().construct_opposite_direction_2_object()(*this);
+  }
+
+  Vector_2 vector() const
+  {
+    return R().construct_vector_2_object()(*this);
+  }
+
+  Vector_2 to_vector() const
+  {
+    return this->vector();
+  }
+
+  typename R::Boolean
+  operator==(const Direction_2& d) const
+  {
+    return R().equal_2_object()(*this, d);
+  }
+
+  typename R::Boolean
+  operator!=(const Direction_2& d) const
+  {
+    return !(*this == d);
+  }
+
+  Direction_2 transform(const Aff_transformation_2 &t) const
+  {
+    return t.transform(*this);
+  }
+
+};
+
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Direction_2<R>& d, const Cartesian_tag&)
+{
+    typename R::Vector_2 v = d.to_vector();
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << v.x() << ' ' << v.y();
+    case IO::BINARY :
+        write(os, v.x());
+        write(os, v.y());
+        return os;
+    default:
+        return os << "DirectionC2(" << v.x() << ", " << v.y() << ')';
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Direction_2<R>& d, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << d.dx() << ' ' << d.dy();
+    case IO::BINARY :
+        write(os, d.dx());
+        write(os, d.dy());
+        return os;
+    default:
+        return os << "DirectionH2(" << d.dx() << ", "
+                                    << d.dy() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Direction_2<R>& d)
+{
+  return insert(os, d, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Direction_2<R>& d, const Cartesian_tag&)
+{
+    typename R::FT x, y;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        break;
+    default:
+        std::cerr << std::endl << "Stream must be in ascii or binary mode"
+                  << std::endl;
+        break;
+    }
+    if (is)
+        d = Direction_2<R>(x, y);
+    return is;
+}
+
+template <class R >
+std::istream&
+extract(std::istream& is, Direction_2<R>& d, const Homogeneous_tag&)
+{
+  typename R::RT x, y;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  d = Direction_2<R>(x, y);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Direction_2<R>& d)
+{
+  return extract(is, d, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Direction_3.h b/3rdparty/CGAL-4.8/include/CGAL/Direction_3.h
new file mode 100644
index 0000000..eff1991
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Direction_3.h
@@ -0,0 +1,242 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+ 
+#ifndef CGAL_DIRECTION_3_H
+#define CGAL_DIRECTION_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Direction_3 : public R_::Kernel_base::Direction_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Line_3                Line_3;
+  typedef typename R_::Ray_3                 Ray_3;
+  typedef typename R_::Segment_3             Segment_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Direction_3                        Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Direction_3 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Direction_3() {}
+
+  Direction_3(const Rep& d)
+    : Rep(d) {}
+
+  explicit Direction_3(const Vector_3& v)
+    : Rep(typename R::Construct_direction_3()(Return_base_tag(), v)) {}
+
+  explicit Direction_3(const Line_3& l)
+    : Rep(typename R::Construct_direction_3()(Return_base_tag(), l)) {}
+
+  explicit Direction_3(const Ray_3& r)
+    : Rep(typename R::Construct_direction_3()(Return_base_tag(), r)) {}
+
+  explicit Direction_3(const Segment_3& s)
+    : Rep(typename R::Construct_direction_3()(Return_base_tag(), s)) {}
+
+  Direction_3(const RT& hx, const RT& hy, const RT& hz)
+    : Rep(typename R::Construct_direction_3()(Return_base_tag(), hx, hy, hz)) {}
+
+  Direction_3 transform(const Aff_transformation_3 &t) const
+  {
+    return t.transform(*this);
+  }
+ 
+  Direction_3
+  operator-() const
+  {
+    return R().construct_opposite_direction_3_object()(*this);
+  } 
+  
+  Vector_3 to_vector() const
+  {
+    return R().construct_vector_3_object()(*this);
+  }
+
+  Vector_3 vector() const { return to_vector(); }
+
+
+  typename cpp11::result_of<typename R::Compute_dx_3(Direction_3)>::type
+  dx() const
+  {
+    return R().compute_dx_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dy_3(Direction_3)>::type
+  dy() const
+  {
+    return R().compute_dy_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dz_3(Direction_3)>::type
+  dz() const
+  {
+    return R().compute_dz_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_dx_3(Direction_3)>::type
+  delta(int i) const
+  {
+    CGAL_kernel_precondition( i >= 0 && i <= 2 );
+    if (i==0) return dx();
+    if (i==1) return dy();
+    return dz();
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Direction_3<R>& d, const Cartesian_tag&) 
+{
+  typename R::Vector_3 v = d.to_vector();
+  switch(get_mode(os)) {
+    case IO::ASCII :
+      return os << v.x() << ' ' << v.y()  << ' ' << v.z();
+    case IO::BINARY :
+      write(os, v.x());
+      write(os, v.y());
+      write(os, v.z());
+      return os;
+    default:
+      os << "DirectionC3(" << v.x() << ", " << v.y() << ", " << v.z() << ")";
+      return os;
+  }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Direction_3<R>& d, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << d.dx() << ' ' << d.dy() << ' ' << d.dz();
+    case IO::BINARY :
+        write(os, d.dx());
+        write(os, d.dy());
+        write(os, d.dz());
+        return os;
+    default:
+        return os << "DirectionH3(" << d.dx() << ", "
+                                    << d.dy() << ", "
+                                    << d.dz() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Direction_3<R>& d)
+{
+  return insert(os, d, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Direction_3<R>& d, const Cartesian_tag&) 
+{
+  typename R::FT x, y, z;
+  switch(get_mode(is)) {
+    case IO::ASCII :
+      is >> iformat(x) >> iformat(y) >> iformat(z);
+      break;
+    case IO::BINARY :
+      read(is, x);
+      read(is, y);
+      read(is, z);
+      break;
+    default:
+      std::cerr << "" << std::endl;
+      std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+      break;
+  }
+  if (is)
+      d = Direction_3<R>(x, y, z);
+  return is;
+}
+
+template <class R >
+std::istream&
+extract(std::istream& is, Direction_3<R>& d, const Homogeneous_tag&) 
+{
+  typename R::RT x, y, z;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y) >> iformat(z);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        read(is, z);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  if (is)
+    d = Direction_3<R>(x, y, z);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Direction_3<R>& d)
+{
+  return extract(is, d, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Discrete_authalic_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Discrete_authalic_parameterizer_3.h
new file mode 100644
index 0000000..7ecaad0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Discrete_authalic_parameterizer_3.h
@@ -0,0 +1,188 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
+#define CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
+
+#include <CGAL/Fixed_border_parameterizer_3.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+#include <CGAL/Eigen_solver_traits.h>
+
+/// \file Discrete_authalic_parameterizer_3.h
+
+namespace CGAL {
+
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class `Discrete_authalic_parameterizer_3`
+/// implements the *Discrete Authalic Parameterization* algorithm \cgalCite{cgal:dma-ipsm-02}.
+/// This method is sometimes called <i>DAP</i> or just <i>Authalic parameterization</i>.
+///
+/// DAP is a weak area-preserving parameterization. It is a compromise between
+/// area-preserving and angle-preserving.
+///
+/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
+///
+/// This class is a Strategy \cgalCite{cgal:ghjv-dpero-95} called by the main
+/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
+/// `Discrete_authalic_parameterizer_3`:
+/// - It provides default `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
+///   parameters that make sense.
+/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
+///   for j neighbor vertex of i based on Discrete Authalic Parameterization algorithm.
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3>`
+/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+
+template
+<
+    class ParameterizationMesh_3,     ///< 3D surface mesh
+    class BorderParameterizer_3       ///< Strategy to parameterize the surface border
+                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+    class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system
+                =  Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >
+>
+class Discrete_authalic_parameterizer_3
+    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                          BorderParameterizer_3,
+                                          SparseLinearAlgebraTraits_d>
+{
+// Private types
+private:
+    // Superclass
+    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                         BorderParameterizer_3,
+                                         SparseLinearAlgebraTraits_d>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    typedef BorderParameterizer_3           Border_param;
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+    /// @endcond
+
+// Private types
+private:
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+    using Base::cotangent;
+
+// Public operations
+public:
+    /// Constructor
+    Discrete_authalic_parameterizer_3(Border_param border_param = Border_param(),
+                                        ///< Object that maps the surface's border to 2D space.
+                                      Sparse_LA sparse_la = Sparse_LA())
+                                        ///< Traits object to access a sparse linear system.
+    :   Fixed_border_parameterizer_3<Adaptor,
+                                     Border_param,
+                                     Sparse_LA>(border_param, sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+// Protected operations
+protected:
+    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
+    virtual NT compute_w_ij(const Adaptor& mesh,
+                            Vertex_const_handle main_vertex_v_i,
+                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
+    {
+        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
+        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
+
+        // Compute the square norm of v_j -> v_i vector
+        Vector_3 edge = position_v_i - position_v_j;
+        double square_len = edge*edge;
+
+        // Compute cotangent of (v_k,v_j,v_i) corner (i.e. cotan of v_j corner)
+        // if v_k is the vertex before v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
+        previous_vertex_v_k --;
+        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
+        double cotg_psi_ij  = cotangent(position_v_k, position_v_j, position_v_i);
+
+        // Compute cotangent of (v_i,v_j,v_l) corner (i.e. cotan of v_j corner)
+        // if v_l is the vertex after v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
+        next_vertex_v_l ++;
+        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
+        double cotg_theta_ij = cotangent(position_v_i, position_v_j, position_v_l);
+
+        double weight = 0.0;
+        CGAL_surface_mesh_parameterization_assertion(square_len != 0.0);    // two points are identical!
+        if(square_len != 0.0)
+            weight = (cotg_psi_ij+cotg_theta_ij)/square_len;
+
+        return weight;
+    }
+};
+
+
+} //namespace CGAL
+
+#endif //CGAL_DISCRETE_AUTHALIC_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Discrete_conformal_map_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Discrete_conformal_map_parameterizer_3.h
new file mode 100644
index 0000000..0e5f20c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Discrete_conformal_map_parameterizer_3.h
@@ -0,0 +1,186 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
+#define CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
+
+#include <CGAL/Fixed_border_parameterizer_3.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+#include <CGAL/Eigen_solver_traits.h>
+
+/// \file Discrete_conformal_map_parameterizer_3.h
+
+namespace CGAL {
+
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class Discrete_conformal_map_parameterizer_3
+/// implements the <i>Discrete Conformal Map (DCM)</i> parameterization \cgalCite{cgal:eddhls-maam-95}.
+/// This algorithm is also called <i>Discrete Conformal Parameterization (DCP)</i>,
+/// <i>Discrete Harmonic Map</i> or <i>Fixed Conformal Parameterization</i> by other authors.
+///
+/// This is a conformal parameterization, i.e. it attempts to preserve angles.
+///
+/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
+///
+/// This class is used by the main
+/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
+/// - It provides default `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
+///   parameters that make sense.
+/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
+///   for j neighbor vertex of i based on Discrete Conformal Map method.
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+///
+/// \param ParameterizationMesh_3       3D surface mesh.
+/// \param BorderParameterizer_3        Strategy to parameterize the surface border.
+/// \param SparseLinearAlgebraTraits_d  Traits class to solve a sparse linear system.
+///        Note: the system is *not* symmetric because `Fixed_border_parameterizer_3`
+///        does not remove (yet) border vertices from the system.
+///
+/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3>`
+/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+
+template
+<
+    class ParameterizationMesh_3,
+    class BorderParameterizer_3
+                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+    class SparseLinearAlgebraTraits_d
+                = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >
+>
+class Discrete_conformal_map_parameterizer_3
+    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+{
+// Private types
+private:
+    // Superclass
+    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    typedef BorderParameterizer_3           Border_param;
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+    /// @endcond
+
+// Private types
+private:
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+    using Base::cotangent;
+
+// Public operations
+public:
+    /// Constructor
+    Discrete_conformal_map_parameterizer_3(Border_param border_param = Border_param(),
+                                            ///< Object that maps the surface's border to 2D space.
+                                           Sparse_LA sparse_la = Sparse_LA())
+                                            ///< Traits object to access a sparse linear system.
+    :   Fixed_border_parameterizer_3<Adaptor,
+                                   Border_param,
+                                   Sparse_LA>(border_param, sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+// Protected operations
+protected:
+    /// Compute w_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
+    virtual NT compute_w_ij(const Adaptor& mesh,
+                            Vertex_const_handle main_vertex_v_i,
+                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
+    {
+        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
+        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
+
+        // Compute cotangent of (v_i,v_k,v_j) corner (i.e. cotan of v_k corner)
+        // if v_k is the vertex before v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
+        previous_vertex_v_k --;
+        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
+        double cotg_beta_ij  = cotangent(position_v_i, position_v_k, position_v_j);
+
+        // Compute cotangent of (v_j,v_l,v_i) corner (i.e. cotan of v_l corner)
+        // if v_l is the vertex after v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
+        next_vertex_v_l ++;
+        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
+        double cotg_alpha_ij = cotangent(position_v_j, position_v_l, position_v_i);
+
+        double weight = cotg_beta_ij+cotg_alpha_ij;
+        return weight;
+    }
+};
+
+
+} //namespace CGAL
+
+#endif //CGAL_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Distance_2.h b/3rdparty/CGAL-4.8/include/CGAL/Distance_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Distance_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Distance_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Double_map.h b/3rdparty/CGAL-4.8/include/CGAL/Double_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Double_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Double_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dummy_tds_2.h b/3rdparty/CGAL-4.8/include/CGAL/Dummy_tds_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Dummy_tds_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Dummy_tds_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Dynamic_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Dynamic_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Dynamic_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Dynamic_matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Edge_hash_function.h b/3rdparty/CGAL-4.8/include/CGAL/Edge_hash_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Edge_hash_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Edge_hash_function.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Eigen_diagonalize_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Eigen_diagonalize_traits.h
new file mode 100644
index 0000000..4065aae
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Eigen_diagonalize_traits.h
@@ -0,0 +1,158 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Jocelyn Meyron and Quentin Mérigot
+//
+
+#ifndef CGAL_EIGEN_DIAGONALIZE_TRAITS_H
+#define CGAL_EIGEN_DIAGONALIZE_TRAITS_H
+
+#include <Eigen/Dense>
+#include <Eigen/Eigenvalues>
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+/// A model of the concept `DiagonalizeTraits` using \ref thirdpartyEigen.
+/// \cgalModels `DiagonalizeTraits`
+
+template <typename FT, unsigned int dim = 3>
+class Eigen_diagonalize_traits{
+
+public:
+
+  typedef cpp11::array<FT, dim> Vector;
+  typedef cpp11::array<FT, dim*dim> Matrix;
+  typedef cpp11::array<FT, (dim * (dim+1) / 2)> Covariance_matrix;
+  
+private:
+
+  typedef Eigen::Matrix<FT, dim, dim> EigenMatrix;
+  typedef Eigen::Matrix<FT, dim, 1> EigenVector;
+  
+  // Construct the covariance matrix
+  static EigenMatrix
+  construct_covariance_matrix
+  (const Covariance_matrix& cov)  {
+    EigenMatrix m;
+
+    for (std::size_t i = 0; i < dim; ++ i)
+      for (std::size_t j = i; j < dim; ++ j)
+	{
+	  m(i,j) = static_cast<float>(cov[(dim * i) + j - ((i * (i+1)) / 2)]);
+	  if (i != j)
+	    m(j,i) = m(i,j);
+	}
+
+    return m;
+  }
+
+  // Diagonalize a selfadjoint matrix
+  static bool
+  diagonalize_selfadjoint_matrix (EigenMatrix& m,
+				  EigenMatrix& eigenvectors,
+                                  EigenVector& eigenvalues) {
+      Eigen::SelfAdjointEigenSolver<EigenMatrix> eigensolver(m);
+
+      if (eigensolver.info() != Eigen::Success) {
+          return false;
+      }
+
+      eigenvalues = eigensolver.eigenvalues();
+      eigenvectors = eigensolver.eigenvectors();
+
+      return true;
+  }
+
+public:
+
+  static bool
+  diagonalize_selfadjoint_covariance_matrix(
+    const Covariance_matrix& cov,
+    Vector& eigenvalues)
+  {
+    EigenMatrix m = construct_covariance_matrix(cov);
+
+    // Diagonalizing the matrix
+    EigenVector eigenvalues_;
+    EigenMatrix eigenvectors_;
+    bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_);
+
+    if (res)
+    {
+      for (std::size_t i = 0; i < dim; ++ i)
+	eigenvalues[i] = static_cast<FT>(eigenvalues_[i]);
+    }
+
+    return res;
+  }
+
+  static bool
+  diagonalize_selfadjoint_covariance_matrix(
+    const Covariance_matrix& cov,
+    Vector& eigenvalues,
+    Matrix& eigenvectors)
+  {
+    EigenMatrix m = construct_covariance_matrix(cov);
+
+    // Diagonalizing the matrix
+    EigenVector eigenvalues_;
+    EigenMatrix eigenvectors_;
+    bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_);
+
+    if (res)
+    {
+      for (std::size_t i = 0; i < dim; ++ i)
+	{
+	  eigenvalues[i] = static_cast<FT>(eigenvalues_[i]);
+
+	  for (std::size_t j = 0; j < dim; ++ j)
+	    eigenvectors[dim*i + j]=static_cast<FT>(eigenvectors_(j,i));
+	}
+    }
+
+    return res;
+  }
+
+  // Extract the eigenvector associated to the largest eigenvalue
+  static bool
+  extract_largest_eigenvector_of_covariance_matrix (
+    const Covariance_matrix& cov,
+    Vector& normal)
+  {
+      // Construct covariance matrix
+      EigenMatrix m = construct_covariance_matrix(cov);
+
+      // Diagonalizing the matrix
+      EigenVector eigenvalues;
+      EigenMatrix eigenvectors;
+      if (! diagonalize_selfadjoint_matrix(m, eigenvectors, eigenvalues)) {
+          return false;
+      }
+
+      // Eigenvalues are sorted by increasing order
+      for (unsigned int i = 0; i < dim; ++ i)
+	normal[i] = static_cast<FT> (eigenvectors(i,dim-1));
+
+      return true;
+  }
+};
+
+} // namespace CGAL
+
+#endif // CGAL_EIGEN_DIAGONALIZE_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Eigen_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Eigen_matrix.h
new file mode 100644
index 0000000..32b31bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Eigen_matrix.h
@@ -0,0 +1,285 @@
+// Copyright (c) 2012  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Gael Guennebaud
+
+#ifndef CGAL_EIGEN_MATRIX_H
+#define CGAL_EIGEN_MATRIX_H
+
+#include <CGAL/basic.h> // include basic.h before testing #defines
+
+#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
+#include <Eigen/Sparse>
+
+namespace CGAL {
+
+
+/// The class Eigen_sparse_matrix
+/// is a C++ wrapper around Eigen' matrix type SparseMatrix<>.
+///
+/// This kind of matrix can be either symmetric or not. Symmetric
+/// matrices store only the lower triangle.
+///
+/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
+///
+/// @heading Parameters:
+/// @param T Number type.
+
+template<class T>
+struct Eigen_sparse_matrix
+{
+// Public types
+public:
+
+	typedef Eigen::SparseMatrix<T> EigenType;
+  typedef T NT;
+
+// Public operations
+public:
+
+  /// Create a square matrix initialized with zeros.
+  Eigen_sparse_matrix(std::size_t  dim,                   ///< Matrix dimension.
+                      bool is_symmetric = false)  ///< Symmetric/hermitian?
+    : m_is_already_built(false), m_matrix(static_cast<int>(dim),static_cast<int>(dim))
+  {
+    CGAL_precondition(dim > 0);
+
+    m_is_symmetric = is_symmetric;
+    // reserve memory for a regular 3D grid
+    m_triplets.reserve(dim);
+  }
+
+  /// Create a square matrix initialized with zeros.
+  Eigen_sparse_matrix(int  dim,                   ///< Matrix dimension.
+                      bool is_symmetric = false)  ///< Symmetric/hermitian?
+    : m_is_already_built(false), m_matrix(dim,dim)
+  {
+    CGAL_precondition(dim > 0);
+
+    m_is_symmetric = is_symmetric;
+    // reserve memory for a regular 3D grid
+    m_triplets.reserve(dim);
+  }
+
+  /// Create a rectangular matrix initialized with zeros.
+  ///
+  /// @commentheading Precondition: rows == columns if is_symmetric is true.
+  Eigen_sparse_matrix(std::size_t  rows,                 ///< Number of rows.
+                      std::size_t  columns,              ///< Number of columns.
+                      bool is_symmetric = false) ///< Symmetric/hermitian?
+    : m_is_already_built(false), m_matrix(static_cast<int>(rows),static_cast<int>(columns))
+  {
+    CGAL_precondition(rows > 0);
+    CGAL_precondition(columns > 0);
+    if (m_is_symmetric) {
+        CGAL_precondition(rows == columns);
+    }
+
+    m_is_symmetric = is_symmetric;
+    // reserve memory for a regular 3D grid
+    m_triplets.reserve(rows);
+  }
+
+  /// Delete this object and the wrapped matrix.
+  ~Eigen_sparse_matrix()
+  {
+  }
+
+  /// Create a rectangular matrix initialized with zeros.
+  ///
+  /// @commentheading Precondition: rows == columns if is_symmetric is true.
+  Eigen_sparse_matrix(int  rows,                 ///< Number of rows.
+                      int  columns,              ///< Number of columns.
+                      bool is_symmetric = false) ///< Symmetric/hermitian?
+    : m_is_already_built(false), m_matrix(rows,columns)
+  {
+    CGAL_precondition(rows > 0);
+    CGAL_precondition(columns > 0);
+    if (is_symmetric) {
+        CGAL_precondition(rows == columns);
+    }
+
+    m_is_symmetric = is_symmetric;
+    // reserve memory for a regular 3D grid
+    m_triplets.reserve(rows);
+  }
+
+  /// Return the matrix number of rows
+  int row_dimension() const    { return m_matrix.rows(); }
+  /// Return the matrix number of columns
+  int column_dimension() const { return m_matrix.cols(); }
+
+
+  /// Write access to a matrix coefficient: a_ij <- val.
+  ///
+  /// Optimizations:
+  /// - For symmetric matrices, Eigen_sparse_matrix stores only the lower triangle
+  ///   set_coef() does nothing if (i, j) belongs to the upper triangle.
+  /// - Caller can optimize this call by setting 'new_coef' to true
+  ///   if the coefficient does not already exist in the matrix.
+  ///
+  /// @commentheading Preconditions:
+  /// - 0 <= i < row_dimension().
+  /// - 0 <= j < column_dimension().
+  void set_coef(std::size_t i_, std::size_t j_, T  val, bool new_coef = false)
+  {
+    int i = static_cast<int>(i_);
+    int j = static_cast<int>(j_);
+    CGAL_precondition(i < row_dimension());
+    CGAL_precondition(j < column_dimension());
+
+    if (m_is_symmetric && (j > i))
+      return;
+
+    if (m_is_already_built)
+      m_matrix.coeffRef(i,j)=val;
+    else
+    {
+      if ( new_coef == false )
+      {
+        assemble_matrix();
+        m_matrix.coeffRef(i,j)=val;
+      }
+      else
+        m_triplets.push_back(Triplet(i,j,val));
+    }
+  }
+
+  /// Write access to a matrix coefficient: a_ij <- a_ij+val.
+  ///
+  /// Optimizations:
+  /// - For symmetric matrices, Eigen_sparse_matrix stores only the lower triangle
+  ///   add_coef() does nothing if (i, j) belongs to the upper triangle.
+  ///
+  /// @commentheading Preconditions:
+  /// - 0 <= i < row_dimension().
+  /// - 0 <= j < column_dimension().
+  void add_coef(int i, int j, T  val)
+  {
+    CGAL_precondition(i < row_dimension());
+    CGAL_precondition(j < column_dimension());
+
+    if (m_is_symmetric && (j > i))
+      return;
+
+    if (m_is_already_built)
+      m_matrix.coeffRef(i,j)+=val;
+    else
+      m_triplets.push_back(Triplet(i,j,val));
+  }
+
+  void assemble_matrix() const
+  {
+    m_matrix.setFromTriplets(m_triplets.begin(), m_triplets.end());
+    m_is_already_built = true;
+    m_triplets.clear(); //the matrix is built and will not be rebuilt
+  }
+
+  const EigenType& eigen_object() const
+  {
+    if(!m_is_already_built) assemble_matrix();
+
+    // turns the matrix into compressed mode:
+    //  -> release some memory
+    //  -> required for some external solvers
+    m_matrix.makeCompressed();
+    return m_matrix;
+  }
+
+private:
+
+
+  /// Eigen_sparse_matrix cannot be copied (yet)
+  Eigen_sparse_matrix(const Eigen_sparse_matrix& rhs);
+  Eigen_sparse_matrix& operator=(const Eigen_sparse_matrix& rhs);
+
+// Fields
+private:
+  
+  mutable bool m_is_already_built;
+  typedef Eigen::Triplet<T,int> Triplet;
+  mutable std::vector<Triplet> m_triplets;
+
+  mutable EigenType m_matrix;
+
+  // Symmetric/hermitian?
+  bool m_is_symmetric;
+
+}; // Eigen_sparse_matrix
+
+
+
+/// The class Eigen_sparse_symmetric_matrix is a C++ wrapper
+/// around a Eigen sparse matrix (type Eigen::SparseMatrix).
+///
+/// Symmetric matrices store only the lower triangle.
+///
+/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
+///
+/// @heading Parameters:
+/// @param T Number type.
+
+template<class T>
+struct Eigen_sparse_symmetric_matrix
+  : public Eigen_sparse_matrix<T>
+{
+// Public types
+  typedef T NT;
+
+// Public operations
+
+  /// Create a square *symmetric* matrix initialized with zeros.
+  Eigen_sparse_symmetric_matrix(int  dim)                  ///< Matrix dimension.
+      : Eigen_sparse_matrix<T>(dim, true /* symmetric */)
+  {
+  }
+
+  /// Create a square *symmetric* matrix initialized with zeros.
+  ///
+  /// @commentheading Precondition: rows == columns.
+  Eigen_sparse_symmetric_matrix(int  rows,                 ///< Number of rows.
+                                int  columns)              ///< Number of columns.
+    : Eigen_sparse_matrix<T>(rows, columns, true /* symmetric */)
+  {
+  }
+};
+
+template <class FT>
+struct Eigen_matrix : public ::Eigen::Matrix<FT,::Eigen::Dynamic,::Eigen::Dynamic>
+{
+  typedef ::Eigen::Matrix<FT,::Eigen::Dynamic,::Eigen::Dynamic> EigenType;
+  
+  Eigen_matrix( std::size_t n1, std::size_t n2):EigenType(n1,n2){}
+  
+  std::size_t number_of_rows () const {return this->rows();}
+  
+  std::size_t number_of_columns () const {return this->cols();}
+  
+  FT operator()( std::size_t i , std::size_t j ) const {return this->operator()(i,j);}
+  
+  void set( std::size_t i, std::size_t j,FT value){
+    this->coeffRef(i,j)=value;
+  }
+
+  const EigenType& eigen_object() const{
+    return static_cast<const EigenType&>(*this);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_EIGEN_MATRIX_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Eigen_solver_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Eigen_solver_traits.h
new file mode 100644
index 0000000..b88689b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Eigen_solver_traits.h
@@ -0,0 +1,214 @@
+// Copyright (c) 2012  INRIA Bordeaux Sud-Ouest (France), All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Gael Guennebaud
+
+#ifndef CGAL_EIGEN_SOLVER_TRAITS_H
+#define CGAL_EIGEN_SOLVER_TRAITS_H
+
+#include <CGAL/config.h> // include basic.h before testing #defines
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+#include <Eigen/Sparse>
+#if EIGEN_VERSION_AT_LEAST(3, 1, 91)
+
+#include <Eigen/SparseLU>
+#endif
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#include <CGAL/Eigen_matrix.h>
+#include <CGAL/Eigen_vector.h>
+#include <boost/shared_ptr.hpp>
+
+namespace CGAL {
+
+
+namespace internal {
+  template <class EigenSolver,class FT>
+  struct Get_eigen_matrix{
+    typedef Eigen_sparse_matrix<FT> type;
+  };
+  
+  template <class FT,class EigenMatrix>
+  struct Get_eigen_matrix< ::Eigen::ConjugateGradient<EigenMatrix>,FT>{
+    typedef Eigen_sparse_symmetric_matrix<FT> type;
+  };
+
+  template <class FT,class EigenMatrix>
+  struct Get_eigen_matrix< ::Eigen::SimplicialCholesky<EigenMatrix>,FT>{
+    typedef Eigen_sparse_symmetric_matrix<FT> type;
+  };
+#if EIGEN_VERSION_AT_LEAST(3, 1, 91)
+  template <class FT, class EigenMatrix, class EigenOrdering>
+  struct Get_eigen_matrix< ::Eigen::SparseLU<EigenMatrix, EigenOrdering >, FT> {
+    typedef Eigen_sparse_matrix<FT> type;
+  };
+#endif
+} //internal 
+  
+/// The class Eigen_solver_traits
+/// is a generic traits class for solving asymmetric or symmetric positive definite (SPD)
+/// sparse linear systems using one of the Eigen solvers.
+/// The default solver is the iterative bi-congugate gradient stabilized solver
+/// <a href="http://eigen.tuxfamily.org/dox/classEigen_1_1BiCGSTAB.html">Eigen::BiCGSTAB</a> for double.
+///
+/// \cgalModels `SparseLinearAlgebraWithFactorTraits_d`.
+
+template<class EigenSolverT = Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> >
+class Eigen_solver_traits
+{
+  typedef typename EigenSolverT::Scalar Scalar;
+// Public types
+public:
+   typedef EigenSolverT Solver;
+   typedef Scalar                                                       NT;
+   typedef typename internal::Get_eigen_matrix<EigenSolverT,NT>::type   Matrix;
+   typedef Eigen_vector<Scalar>                                         Vector;
+   
+
+// Public operations
+public:
+
+   Eigen_solver_traits():m_mat(NULL), m_solver_sptr(new EigenSolverT)
+   {
+   }
+   
+   EigenSolverT& solver() { return *m_solver_sptr; }
+
+   /// Solve the sparse linear system "A*X = B".
+   /// Return true on success. The solution is then (1/D) * X.
+   ///
+   /// @commentheading Preconditions:
+   /// - A.row_dimension()    == B.dimension().
+   /// - A.column_dimension() == X.dimension().
+   bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D)
+   {
+      D = 1;          // Eigen does not support homogeneous coordinates
+
+      m_solver_sptr->compute(A.eigen_object());
+       
+      if(m_solver_sptr->info() != Eigen::Success)
+         return false;
+         
+      X = m_solver_sptr->solve(B);
+
+      return m_solver_sptr->info() == Eigen::Success;
+   }
+
+  bool factor (const Matrix& A, NT& D)
+  {
+    D = 1;
+    
+    m_mat = &A.eigen_object();
+    solver().compute(*m_mat);
+    return solver().info() == Eigen::Success;
+  }
+
+  bool linear_solver(const Vector& B, Vector& X)
+  {
+    CGAL_precondition(m_mat!=NULL); //factor should have been called first
+    X = solver().solve(B);
+    return solver().info() == Eigen::Success;
+  }
+
+// Solving the normal equation "At*A*X = At*B".
+// --
+  bool normal_equation_factor(const Matrix& A)
+  {
+    typename Matrix::EigenType At = A.eigen_object().transpose();
+    m_mat = &A.eigen_object();
+    solver().compute(At * A.eigen_object());
+    return solver().info() == Eigen::Success;
+  }
+
+  bool normal_equation_solver(const Vector& B, Vector& X)
+  {
+    CGAL_precondition(m_mat!=NULL); //non_symmetric_factor should have been called first
+    typename Vector::EigenType AtB = m_mat->transpose() * B.eigen_object();
+    X = solver().solve(AtB);
+    return solver().info() == Eigen::Success;
+  }
+
+  bool normal_equation_solver(const Matrix& A, const Vector& B, Vector& X)
+  {
+    if (!normal_equation_factor(A)) return false;
+    return normal_equation_solver(B, X);
+  }
+// --
+protected:
+  const typename Matrix::EigenType* m_mat;
+  boost::shared_ptr<EigenSolverT> m_solver_sptr;
+
+};
+
+//specialization of the solver for BiCGSTAB as for surface parameterization, the 
+//intializer should be a vector of one's (this was the case in 3.1-alpha but not in the official 3.1).
+template<>
+class Eigen_solver_traits< Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> >
+{
+  typedef Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType> EigenSolverT;
+  typedef EigenSolverT::Scalar Scalar;
+// Public types
+public:
+   typedef EigenSolverT Solver;
+   typedef Scalar                                                       NT;
+   typedef internal::Get_eigen_matrix<EigenSolverT,NT>::type   Matrix;
+   typedef Eigen_vector<Scalar>                                         Vector;
+   
+
+// Public operations
+public:
+
+   Eigen_solver_traits(): m_solver_sptr(new EigenSolverT)
+   {
+   }
+   
+   EigenSolverT& solver() { return *m_solver_sptr; }
+
+   /// Solve the sparse linear system "A*X = B".
+   /// Return true on success. The solution is then (1/D) * X.
+   ///
+   /// @commentheading Preconditions:
+   /// - A.row_dimension()    == B.dimension().
+   /// - A.column_dimension() == X.dimension().
+   bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D)
+   {
+      D = 1;          // Eigen does not support homogeneous coordinates
+
+      m_solver_sptr->compute(A.eigen_object());
+       
+      if(m_solver_sptr->info() != Eigen::Success)
+         return false;
+      
+      X.setOnes(B.rows());
+      X = m_solver_sptr->solveWithGuess(B,X);
+
+      return m_solver_sptr->info() == Eigen::Success;
+   }
+protected:
+  boost::shared_ptr<EigenSolverT> m_solver_sptr;
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_EIGEN_SOLVER_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Eigen_svd.h b/3rdparty/CGAL-4.8/include/CGAL/Eigen_svd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Eigen_svd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Eigen_svd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Eigen_vector.h b/3rdparty/CGAL-4.8/include/CGAL/Eigen_vector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Eigen_vector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Eigen_vector.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Enum_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Enum_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Enum_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Enum_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_default_diagram_1.h b/3rdparty/CGAL-4.8/include/CGAL/Env_default_diagram_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Env_default_diagram_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Env_default_diagram_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_plane_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Env_plane_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Env_plane_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Env_plane_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_sphere_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Env_sphere_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Env_sphere_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Env_sphere_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_surface_data_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Env_surface_data_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Env_surface_data_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Env_surface_data_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Env_tracing_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Env_tracing_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Env_tracing_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Env_tracing_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Env_triangle_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Env_triangle_traits_3.h
new file mode 100644
index 0000000..1b0340a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Env_triangle_traits_3.h
@@ -0,0 +1,1667 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michal Meyerovitch     <gorgymic at post.tau.ac.il>
+//                 Baruch Zukerman        <baruchzu at post.tau.ac.il>
+
+/*! \file CGAL/Envelope_triangles_traits_3.h
+ * \brief Model for CGAL's EnvelopeTraits_3 concept.
+ * \endlink
+ */
+
+#ifndef CGAL_ENV_TRIANGLE_TRAITS_3_H
+#define CGAL_ENV_TRIANGLE_TRAITS_3_H
+
+#include <CGAL/Object.h>
+#include <CGAL/enum.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Envelope_3/Envelope_base.h>
+
+#include <vector>
+
+namespace CGAL {
+
+template <class Kernel_> class Env_triangle_3;
+
+// this traits class supports both triagles and segments in 3d
+template <class Kernel_>
+class Env_triangle_traits_3 : public Arr_segment_traits_2<Kernel_>
+{
+public:
+  typedef Arr_segment_traits_2<Kernel_>             Traits_2;
+  typedef typename Traits_2::Point_2                Point_2;
+  typedef typename Traits_2::X_monotone_curve_2     X_monotone_curve_2;
+  typedef typename Traits_2::Multiplicity           Multiplicity;
+
+  typedef Kernel_                                   Kernel;
+  typedef Env_triangle_traits_3<Kernel>             Self;
+
+  typedef typename Kernel::Point_3                  Point_3;
+
+  /*!
+   * \class Representation of a 3d triangle with cached data.
+   */
+  class _Triangle_cached_3 
+  {
+  public:
+
+    typedef typename Kernel::Plane_3               Plane_3;
+    typedef typename Kernel::Triangle_3            Triangle_3;
+    typedef typename Kernel::Point_3               Point_3;
+    typedef typename Kernel::Segment_3             Segment_3;
+
+  protected:
+
+    Plane_3 pl;          // The plane that supports the triangle.
+    Point_3 vertices[3]; // The vertices of the triangle.
+    bool    is_vert;     // Is this a vertical triangle (or a segment).
+    bool    is_seg;  // Is this a segment.
+  public:
+
+    /*!
+     * Default constructor.
+     */
+    _Triangle_cached_3() :
+      is_vert(false),
+      is_seg(false)
+    {}
+
+    /*!
+     * Constructor from a non-degenerate triangle.
+     * \param tri The triangle.
+     * \pre The triangle is not degenerate.
+     */
+    _Triangle_cached_3(const Triangle_3 & tri)
+    {
+      Kernel   kernel;
+      CGAL_assertion(!kernel.is_degenerate_3_object()(tri));
+
+      typename Kernel::Construct_vertex_3
+        construct_vertex = kernel.construct_vertex_3_object();
+
+      vertices[0] = construct_vertex(tri, 0);
+      vertices[1] = construct_vertex(tri, 1);
+      vertices[2] = construct_vertex(tri, 2);
+
+      pl = kernel.construct_plane_3_object()(vertices[0],
+                                             vertices[1], vertices[2]);
+      Self self;
+      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
+                                            self.project(vertices[1]),
+                                            self.project(vertices[2]));
+      is_seg = false;
+    }
+
+    /*!
+     * Construct a triangle from three non-collinear end-points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \param p3 The third point.
+     * \pre The 3 endpoints are not the collinear.
+     */
+    _Triangle_cached_3(const Point_3 &p1, const Point_3 &p2,
+                       const Point_3 &p3)
+    {
+      Kernel   kernel;
+      CGAL_assertion(!kernel.collinear_3_object()(p1, p2, p3));
+      
+      vertices[0] = p1;
+      vertices[1] = p2;
+      vertices[2] = p3;
+
+      pl = kernel.construct_plane_3_object()(vertices[0],
+                                             vertices[1],
+                                             vertices[2]);
+      Self self;
+      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
+                                            self.project(vertices[1]),
+                                            self.project(vertices[2]));
+      is_seg = false;
+    }
+
+    /*!
+     * Construct a triangle from 3 end-points on a supporting plane.
+     * \param supp_plane The supporting plane.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \param p3 The third point.
+     * \pre The 3 endpoints are not the collinear and all lie on the given
+     *      plane.
+     */
+    _Triangle_cached_3(const Plane_3& supp_plane,
+                       const Point_3 &p1,
+                       const Point_3 &p2,
+                       const Point_3 &p3) :
+      pl(supp_plane)
+    {
+      Kernel   kernel;
+
+      CGAL_precondition(kernel.has_on_3_object() (pl, p1) &&
+                        kernel.has_on_3_object() (pl, p2) &&
+                        kernel.has_on_3_object() (pl, p3));      
+      CGAL_precondition(!kernel.collinear_3_object()(p1, p2, p3));
+
+      vertices[0] = p1;
+      vertices[1] = p2;
+      vertices[2] = p3;
+
+      Self self;
+      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
+                                            self.project(vertices[1]),
+                                            self.project(vertices[2]));
+      is_seg = false;
+    }
+
+    /*!
+     * Constructor from a segment.
+     * \param seg The segment.
+     * \pre The segment is not degenerate.
+     */
+    _Triangle_cached_3(const Segment_3 & seg)
+    {
+      Kernel   kernel;
+      CGAL_assertion(!kernel.is_degenerate_3_object()(seg));
+
+      typename Kernel::Construct_vertex_3
+        construct_vertex = kernel.construct_vertex_3_object();
+
+      vertices[0] = construct_vertex(seg, 0);
+      vertices[1] = construct_vertex(seg, 1);
+      vertices[2] = vertices[1];
+
+      is_vert = true;
+      is_seg = true;
+
+      // construct a vertical plane through the segment
+      Point_3 tmp(vertices[0].x(), vertices[0].y(), vertices[0].z()-1);
+      pl = kernel.construct_plane_3_object()(vertices[0],
+                                             vertices[1], tmp);
+
+    }
+
+    /*!
+     * Constructor from two points.
+     * \param p1 The first point.
+     * \param p2 The second point.
+     * \param seg The segment.
+     * \pre The segment between the points is not degenerate.
+     */
+    _Triangle_cached_3(const Point_3 &p1, const Point_3 &p2)
+    {
+      Kernel   kernel;
+      CGAL_assertion(!kernel.equal_3_object()(p1, p2));
+
+      vertices[0] = p1;
+      vertices[1] = p2;
+      vertices[2] = p2;
+
+      is_vert = true;
+      is_seg = true;
+
+      // construct a vertical plane through the segment
+      Point_3 tmp(vertices[0].x(), vertices[0].y(), vertices[0].z()-1);
+      pl = kernel.construct_plane_3_object()(vertices[0],
+                                             vertices[1], tmp);
+
+    }
+
+    /*!
+     * Assignment operator.
+     * \param tri the source triangle to copy from
+     */
+    const _Triangle_cached_3& operator=(const Triangle_3 &tri)
+    {
+      Kernel   kernel;
+      CGAL_assertion(!kernel.is_degenerate_3_object()(tri));
+
+      typename Kernel_::Construct_vertex_3
+        construct_vertex = kernel.construct_vertex_3_object();
+
+      vertices[0] = construct_vertex(tri, 0);
+      vertices[1] = construct_vertex(tri, 1);
+      vertices[2] = construct_vertex(tri, 2);
+
+      pl = kernel.construct_plane_3_object()(vertices[0],
+                                             vertices[1], vertices[2]);
+      Self self;
+      is_vert = kernel.collinear_2_object()(self.project(vertices[0]),
+                                            self.project(vertices[1]),
+                                            self.project(vertices[2]));
+      is_seg = false;
+      
+      return (*this);
+    }
+
+    /*!
+     * Get the ith endpoint.
+     */
+    const Point_3& vertex(unsigned int i) const
+    {
+      return vertices[i%3];
+    }
+
+    /*!
+     * Get the supporting plane.
+     */
+    const Plane_3& plane() const
+    {
+      return (pl);
+    }
+
+    /*!
+     * Check if the triangel is vertical.
+     */
+    bool is_vertical() const
+    {
+      return (is_vert);
+    }
+
+    /*!
+     * Check if the surface is a segment.
+     */
+    bool is_segment() const
+    {
+      return (is_seg);
+    }
+
+    /*!
+     * Check if the surface is xy-monotone (false, if it is a vertical
+     * triangle)
+     */
+    bool is_xy_monotone() const
+    {
+      return (!is_vertical() || is_segment());
+    }
+  };
+
+public:
+
+  // types for EnvelopeTraits_3 concept
+  //! type of xy-monotone surfaces
+  typedef Env_triangle_3<Kernel>                    Xy_monotone_surface_3;
+  //! type of surfaces
+  typedef Xy_monotone_surface_3                     Surface_3;
+
+  // we have a collision between the Kernel's Intersect_2 and the one
+  // from the segment traits
+  typedef typename Traits_2::Intersect_2            Intersect_2;
+
+protected:
+  typedef typename Kernel::FT                       FT;
+  typedef typename Kernel::Triangle_2               Triangle_2;
+  typedef typename Kernel::Segment_2                Segment_2;
+
+  typedef typename Kernel::Segment_3                Segment_3;
+  typedef typename Kernel::Triangle_3               Triangle_3;
+  typedef typename Kernel::Plane_3                  Plane_3;
+
+  typedef typename Kernel::Assign_2                 Assign_2;
+  typedef typename Kernel::Construct_vertex_2       Construct_vertex_2;
+
+  typedef typename Kernel::Assign_3                 Assign_3;
+  typedef typename Kernel::Intersect_3              Intersect_3;
+  typedef typename Kernel::Construct_vertex_3       Construct_vertex_3;
+
+
+  typedef typename Kernel::Line_2                   Line_2;
+  typedef typename Kernel::Direction_2              Direction_2;
+
+  typedef typename Kernel::Line_3                   Line_3;
+  typedef typename Kernel::Direction_3              Direction_3;
+
+  typedef std::pair<X_monotone_curve_2,
+                    Multiplicity>                   Intersection_curve;
+public:
+
+  /***************************************************************************/
+  // EnvelopeTraits_3 functors
+  /***************************************************************************/
+
+  /*!\brief
+   * Subdivide the given surface into envelope relevant xy-monotone 
+   * parts, and insert them into the output iterator.
+   * 
+   * The iterator value-type is Xy_monotone_surface_3
+   */
+  class Make_xy_monotone_3
+  {
+  protected:
+    const Self * parent;
+
+  public:
+    Make_xy_monotone_3(const Self * p) : parent(p)
+    {}
+    // create xy-monotone surfaces from a general surface
+    // return a past-the-end iterator
+    template <class OutputIterator>
+    OutputIterator operator()(const Surface_3& s,
+                              bool is_lower,
+                              OutputIterator o) const
+    {
+      m_is_lower = is_lower;
+
+      // a non-vertical triangle is already xy-monotone
+      if (!s.is_vertical())
+        *o++ = s;
+      else
+      {        
+        // split a vertical triangle into one or two segments
+        const Point_3 &a1 = s.vertex(0),
+                       a2 = s.vertex(1),
+                       a3 = s.vertex(2);
+        Point_2 b1 = parent->project(a1),
+                b2 = parent->project(a2),
+                b3 = parent->project(a3);
+        Kernel k;
+        if (k.collinear_are_ordered_along_line_2_object()(b1, b2, b3))
+        {
+          if (k.equal_2_object()(b1, b2))
+            // only one segment in the output - the vertical does not count
+            *o++ = Xy_monotone_surface_3(find_envelope_point(a1, a2), a3);
+          else if (k.equal_2_object()(b2, b3))
+            *o++ = Xy_monotone_surface_3(a1, find_envelope_point(a2, a3));
+          else
+            // check whether two or one segments appear on the envelope
+            return find_envelope_segments(a1, a2, a3, s.plane(), o);
+        }
+        else if (k.collinear_are_ordered_along_line_2_object()(b1, b3, b2))
+        {
+          if (k.equal_2_object()(b1, b3))
+            // only one segment in the output
+            *o++ = Xy_monotone_surface_3(find_envelope_point(a1, a3), a2);
+          else
+            // check whether two or one segments appear on the envelope
+            return find_envelope_segments(a1, a3, a2, s.plane(), o);
+        }
+        else
+        {
+          // check whether two or one segments appear on the envelope
+          return find_envelope_segments(a2, a1, a3, s.plane(), o);
+        }
+
+      }
+      return o;
+    }
+
+  protected:
+    // find the envelope point among the two points with same xy coordinates
+    const Point_3& find_envelope_point (const Point_3& p1,
+                                        const Point_3& p2) const
+    {
+      CGAL_precondition(p1.x() == p2.x() && p1.y() == p2.y());
+      Kernel k;
+      Comparison_result cr = k.compare_z_3_object()(p1, p2);
+      CGAL_assertion(cr != EQUAL);
+      if ((m_is_lower && cr == SMALLER) ||
+          (!m_is_lower && cr == LARGER))
+        return p1;
+      else
+        return p2;      
+    }
+
+    // get the three triangle coordinates (ordered along 2d-line) and find
+    // which segment(s) is(are) the envelope of this triangle
+    // "plane" is the vertical plane on which the triangle lies
+    template <class OutputIterator>
+    OutputIterator find_envelope_segments(const Point_3& p1,
+                                          const Point_3& p2,
+                                          const Point_3& p3,
+                                          const Plane_3& plane,
+                                          OutputIterator o) const
+    {
+      // our vertical plane is a*x + b*y + d = 0
+      FT a = plane.a(), b = plane.b();
+      CGAL_precondition(plane.c() == 0);
+
+      // if the plane was parallel to the yz-plane (i.e x = const),
+      // then it was enough to use the y,z coordinates as in the 2-dimensional
+      // case, to find whether a 2d point lies below/above/on a line
+      // this test is simply computing the sign of:
+      //    (1)    [(y3 - y1)(z2 - z1) - (z3 - z1)(y2 - y1)] * sign(y3 - y1)
+      // abd comparing to 0, where pi = (xi, yi, zi), and p2 is compared to the
+      // line formed by p1 and p3 (in the direction p1 -> p3)
+      //
+      // for general vertical plane, we change (x, y) coordinates to (v, w),
+      // (keeping the z-coordinate as is)
+      // so the plane is parallel to the wz-plane in the new coordinates
+      // (i.e v = const).
+      //
+      // ( v )  =  A ( x )    where A = (  a  b )
+      //   w           y                  -b  a
+      //
+      // so v =  a*x + b*y
+      //    w = -b*x + a*y
+      //
+      // Putting the new points coordinates in equation (1) we get:
+      //    (2)    (w3 - w1)(z2 - z1) - (z3 - z1)(w2 - w1) =
+      //           (-b*x3 + a*y3 + b*x1 - a*y1)(z2 - z1) - 
+      //                                 (z3 - z1)(-b*x2 + a*y2 + b*x1 - a*y1)
+      //
+      FT w1 = a*p1.y() - b*p1.x(),
+         w2 = a*p2.y() - b*p2.x(),
+         w3 = a*p3.y() - b*p3.x();
+      
+      Sign s1 = CGAL::sign((w3 - w1)*(p2.z() - p1.z()) - 
+                           (p3.z() - p1.z())*(w2 - w1));
+
+      // the points should not be collinear
+      CGAL_assertion(s1 != 0);
+
+      // should also take care for the original and trasformed direction of
+      // the segment
+      Sign s2 = CGAL_NTS sign(w3 - w1);
+      Sign s = CGAL_NTS sign(int(s1 * s2));
+                  
+      bool use_one_segment = true;
+      if ((m_is_lower  && s == NEGATIVE) ||
+          (!m_is_lower && s == POSITIVE))
+        use_one_segment = false;
+
+      if (use_one_segment)
+      {
+        *o++ = Xy_monotone_surface_3(p1, p3);
+      }
+      else
+      {
+        *o++ = Xy_monotone_surface_3(p1, p2);
+        *o++ = Xy_monotone_surface_3(p2, p3);
+      }
+      return o;
+    }
+
+    mutable bool m_is_lower;
+  };
+
+  /*! Get a Make_xy_monotone_3 functor object. */
+  Make_xy_monotone_3
+  make_xy_monotone_3_object() const
+  {
+    return Make_xy_monotone_3(this);
+  }
+
+  /*!\brief
+   * Insert all 2D curves, which form the boundary of the vertical
+   * projection of the surface onto the xy-plane, into the output iterator.
+   * The iterator value-type is X_monotone_curve_2.
+   */
+  class Construct_projected_boundary_2
+  {
+  protected:
+    const Self *parent;
+  public:
+
+    Construct_projected_boundary_2(const Self* p)
+      : parent(p)
+    {}
+
+    // insert into the OutputIterator all the (2d) curves of the boundary of
+    // the vertical projection of the surface on the xy-plane
+    // the OutputIterator value type is X_monotone_curve_2
+    template <class OutputIterator>
+    OutputIterator operator()(const Xy_monotone_surface_3& s,
+                              OutputIterator o) const
+    {
+      // the input xy-monotone surface should be either non-vertical or
+      // a segment
+      CGAL_assertion(s.is_xy_monotone());
+      
+      if (!s.is_vertical())
+      {
+        // the projection is a triangle
+        const Point_3 &a1 = s.vertex(0),
+                       a2 = s.vertex(1),
+                       a3 = s.vertex(2);
+        Point_2 b1 = parent->project(a1),
+                b2 = parent->project(a2),
+                b3 = parent->project(a3);
+
+        Kernel k;
+
+        X_monotone_curve_2 A(b1, b2);
+        X_monotone_curve_2 B(b2, b3);
+        X_monotone_curve_2 C(b3, b1);
+
+        const Line_2& l1 = 
+          (A.is_directed_right()) ? A.line() : A.line().opposite();
+        const Line_2& l2 = 
+          (B.is_directed_right()) ? B.line() : B.line().opposite();
+        const Line_2& l3 = 
+          (C.is_directed_right()) ? C.line() : C.line().opposite();
+
+        Oriented_side s1 = k.oriented_side_2_object()(l1, b3);
+        Oriented_side s2 = k.oriented_side_2_object()(l2, b1);
+        Oriented_side s3 = k.oriented_side_2_object()(l3, b2);
+
+        CGAL_assertion(s1 != ON_ORIENTED_BOUNDARY && 
+                       s2 != ON_ORIENTED_BOUNDARY &&
+                       s3 != ON_ORIENTED_BOUNDARY);
+        
+        *o++ = make_object(std::make_pair(A, s1));
+        *o++ = make_object(std::make_pair(B, s2));
+        *o++ = make_object(std::make_pair(C, s3));
+      }
+      else
+      {
+        // s is a segment, and so is its projection
+        // s shouldn't be a z-vertical segment
+        const Point_3 &a1 = s.vertex(0),
+                       a2 = s.vertex(1);
+        
+        Point_2 b1 = parent->project(a1),
+                b2 = parent->project(a2);
+        CGAL_assertion(b1 != b2);
+                
+        *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2), 
+                                          ON_ORIENTED_BOUNDARY));
+      }
+      return o;
+    }  
+  };  
+  
+  /*! Get a Construct_projected_boundary_curves_2 functor object. */
+  Construct_projected_boundary_2
+  construct_projected_boundary_2_object() const
+  {
+    return Construct_projected_boundary_2(this);
+  }
+
+  /*!\brief
+   * Insert all the 2D projections (onto the xy-plane) of the 
+   * intersection objects between s1 and s2 into the output iterator.
+   *
+   * The iterator value-type is Object. An Object may be:
+   * 1. A pair<X_monotone_curve_2,Intersection_type>, where the intersection 
+   * type is an enumeration that can take the values
+   * {Transversal, Tangency, Unknown}.
+   * 2. A Point_2 instance (in degenerate cases).
+   */
+  class Construct_projected_intersections_2
+  {
+  protected:
+    const Self *parent;
+  public:
+
+    Construct_projected_intersections_2(const Self* p)
+      : parent(p)
+    {}
+    
+    // insert into OutputIterator all the (2d) projections on the xy plane of
+    // the intersection objects between the 2 surfaces
+    // the data type of OutputIterator is Object
+    template <class OutputIterator>
+    OutputIterator operator()(const Xy_monotone_surface_3& s1,
+                              const Xy_monotone_surface_3& s2,
+                              OutputIterator o) const
+    {
+      CGAL_assertion(s1.is_xy_monotone() && s2.is_xy_monotone());
+      
+      Kernel k;
+      if (!parent->do_intersect(s1, s2))
+      {
+        return o;
+      }
+        
+      Object inter_obj = parent->intersection(s1,s2);
+      if (inter_obj.is_empty())
+      {
+        return o;
+      }
+
+      Point_3 point;
+      Segment_3 curve;
+      if (k.assign_3_object()(point, inter_obj))
+        *o++ = make_object(parent->project(point));
+      else
+      {
+        CGAL_assertion_code(bool b = )
+        k.assign_3_object()(curve, inter_obj);
+        CGAL_assertion(b);
+
+        Segment_2  proj_seg = parent->project(curve);
+        if (! k.is_degenerate_2_object() (proj_seg))
+        {
+          Intersection_curve inter_cv (proj_seg, 1);
+          *o++ = make_object(inter_cv);
+        }
+        else
+        {
+          const Point_2&  p = k.construct_point_on_2_object() (proj_seg, 0);
+          *o++ = make_object(p);
+        }
+      }
+
+      return o;
+    }  
+  };  
+
+  /*! Get a Construct_projected_intersections_2 functor object. */
+  Construct_projected_intersections_2
+  construct_projected_intersections_2_object() const
+  {
+    return Construct_projected_intersections_2(this);
+  }
+
+  /*!\brief
+   * Check if the surface s1 is closer/equally distanced/farther 
+   * from the envelope with respect to s2 at the xy-coordinates of p/c.
+   */
+  class Compare_z_at_xy_3
+  {
+  protected:
+    const Self *parent;
+
+  public:
+
+    Compare_z_at_xy_3(const Self* p)
+      : parent(p)
+    {}
+
+    // check which of the surfaces is closer to the envelope at the xy 
+    // coordinates of point
+    // (i.e. lower if computing the lower envelope, or upper if computing 
+    // the upper envelope)
+    // precondition: the surfaces are defined in point
+    Comparison_result operator()(const Point_2& p,
+                                 const Xy_monotone_surface_3& surf1,
+                                 const Xy_monotone_surface_3& surf2) const
+    {      
+      // we compute the points on the planes, and then compare their z 
+      // coordinates
+      const Plane_3& plane1 = surf1.plane();
+      const Plane_3& plane2 = surf2.plane();
+
+      // if the 2 triangles have the same supporting plane, and they are not 
+      // vertical, then they have the same z coordinate over this point
+      if ((plane1 == plane2 || plane1 == plane2.opposite()) &&
+          !surf1.is_vertical())
+      {
+        return EQUAL;
+      }
+
+      Kernel k;
+
+      // Compute the intersetion between the vertical line and the given 
+      // surfaces
+      Point_3 ip1 = parent->envelope_point_of_surface(p, surf1);
+      Point_3 ip2 = parent->envelope_point_of_surface(p, surf2);
+      
+      return k.compare_z_3_object()(ip1, ip2);
+    }
+
+    // check which of the surfaces is closer to the envelope at the xy 
+    // coordinates of cv
+    // (i.e. lower if computing the lower envelope, or upper if computing the
+    // upper envelope)
+    // precondition: the surfaces are defined in all points of cv, 
+    //               and the answer is the same for each of these points
+    Comparison_result operator()(const X_monotone_curve_2& cv,
+                                 const Xy_monotone_surface_3& surf1,
+                                 const Xy_monotone_surface_3& surf2) const
+    {      
+      // first try the endpoints, if cannot be sure, use the mid point
+      Comparison_result res;
+      res = parent->compare_z_at_xy_3_object()(cv.left(), surf1, surf2);
+
+      if (res == EQUAL)
+      {
+        res = parent->compare_z_at_xy_3_object()(cv.right(), surf1, surf2);
+        if (res == EQUAL)
+        {
+          Point_2 mid = parent->construct_middle_point(cv);
+          res = parent->compare_z_at_xy_3_object()(mid, surf1, surf2);
+        }
+      }
+      
+      return res;
+    }
+  
+  };
+   
+  /*! Get a Compare_z_at_xy_3 functor object. */
+  Compare_z_at_xy_3 
+  compare_z_at_xy_3_object() const
+  {
+    return Compare_z_at_xy_3(this);
+  }
+
+  /*!\brief 
+   * Check if the surface s1 is closer/equally distanced/farther 
+   * from the envelope with
+   * respect to s2 immediately above the curve c. 
+   */
+  class Compare_z_at_xy_above_3
+  {
+  protected:
+    const Self *parent;
+
+  public:
+
+    Compare_z_at_xy_above_3(const Self* p)
+      : parent(p)
+    {}
+    
+    // check which of the surfaces is closer to the envelope on the points 
+    // above the curve cv
+    // (i.e. lower if computing the lower envelope, or upper if computing the
+    // upper envelope)
+    // precondition: the surfaces are defined above cv (to the left of cv, 
+    //               if cv is directed from min point to max point)
+    //               the choise between surf1 and surf2 for the envelope is 
+    //               the same for every point in the infinitesimal region 
+    //               above cv 
+    //               the surfaces are EQUAL over the curve cv
+    Comparison_result
+    operator()(const X_monotone_curve_2& cv,
+               const Xy_monotone_surface_3& surf1,
+               const Xy_monotone_surface_3& surf2) const
+    {
+      // a vertical surface cannot be defined in the infinitesimal region above
+      // a curve
+      CGAL_precondition(!surf1.is_vertical());
+      CGAL_precondition(!surf2.is_vertical());
+
+      CGAL_precondition(parent->compare_z_at_xy_3_object()
+                              (cv, surf1, surf2) == EQUAL);
+      CGAL_precondition(parent->compare_z_at_xy_3_object()
+                              (cv.source(), surf1, surf2) == EQUAL);
+      CGAL_precondition(parent->compare_z_at_xy_3_object()
+                              (cv.target(), surf1, surf2) == EQUAL);
+
+      
+      if (parent->do_overlap(surf1, surf2))
+      {
+        return EQUAL;
+      }
+
+      // now we must have 2 different non-vertical planes:
+ 	    // plane1: a1*x + b1*y + c1*z + d1 = 0  , c1 != 0
+ 	    // plane2: a2*x + b2*y + c2*z + d2 = 0  , c2 != 0
+
+      const Plane_3& plane1 = surf1.plane();
+      const Plane_3& plane2 = surf2.plane();
+
+      FT a1 = plane1.a(), b1 = plane1.b(), c1 = plane1.c();
+      FT a2 = plane2.a(), b2 = plane2.b(), c2 = plane2.c();
+
+ 	    // our line is a3*x + b3*y + c3 = 0
+ 	    // it is assumed that the planes intersect over this line
+      const Line_2& line = cv.line(); 
+      FT a3 = line.a(), b3 = line.b(), c3 = line.c();
+
+      // if the line was parallel to the y-axis (i.e x = const),
+      // then it was enough to compare dz/dx of both planes
+      // for general line, we change coordinates to (v, w), preserving
+      // orientation, so the line is the w-axis in the new coordinates
+      // (i.e v = const).
+      //
+      // ( v )  =  A ( x )    where A = (  a3  b3 )
+      //   w           y                  -b3  a3
+      //
+      // so v =  a3*x + b3*y
+      //    w = -b3*x + a3*y
+      // preserving orientation since detA = a3^2 +b3^2 > 0
+      //
+      // We compute the planes equations in the new coordinates
+      // and compare dz/dv
+      //
+      // ( x )  =  A^(-1) ( v )    where A^(-1) = ( a3  -b3 ) * detA^(-1)
+      //   y                w                       b3   a3
+      // so x = (a3*v - b3*w)*(1/detA)
+      //    y = (b3*v + a3*w)*(1/detA)
+      // plane1 ==> (a1a3 + b1b3)v + (b1a3 - a1b3)w + (c1z + d1)*detA = 0
+      // plane2 ==> (a2a3 + b2b3)v + (b2a3 - a2b3)w + (c2z + d2)*detA = 0
+      //
+      // dz/dv(1) = (-a1a3 - b1b3) / c1*detA
+      // dz/dv(2) = (-a2a3 - b2b3) / c2*detA
+      // since detA>0 we can omit it.
+      //
+      Sign s1 = CGAL_NTS sign((a2*a3+b2*b3)/c2-(a1*a3+b1*b3)/c1);
+      
+      // We only need to make sure that w is in the correct direction
+      // (going from down to up)
+      // the original segment endpoints p1=(x1,y1) and p2=(x2,y2)
+      // are transformed to (v1,w1) and (v2,w2), so we need that w2 > w1
+      // (otherwise the result should be multiplied by -1)
+      
+      const Point_2& p1 = cv.left();
+      const Point_2& p2 = cv.right();
+      FT x1 = p1.x(), y1 = p1.y(), x2 = p2.x(), y2 = p2.y();
+
+      Sign s2 = CGAL_NTS sign(-b3*x1+a3*y1-(-b3*x2+a3*y2));
+      return s1 * s2;
+    }  
+  };
+
+
+  /*! Get a Compare_z_at_xy_above_3 functor object. */
+  Compare_z_at_xy_above_3
+  compare_z_at_xy_above_3_object() const
+  {
+    return Compare_z_at_xy_above_3(this);
+  }
+
+  /*!\brief 
+   * Check if the surface s1 is closer/equally distanced/farther 
+   * from the envelope with
+   * respect to s2 immediately below the curve c. 
+   */
+  class Compare_z_at_xy_below_3
+  {
+  protected:
+    const Self *parent;
+
+  public:
+
+    Compare_z_at_xy_below_3(const Self* p)
+      : parent(p)
+    {}
+    
+    Comparison_result
+    operator()(const X_monotone_curve_2& cv,
+               const Xy_monotone_surface_3& surf1,
+               const Xy_monotone_surface_3& surf2) const
+    {
+      Comparison_result left_res = 
+        parent->compare_z_at_xy_above_3_object()(cv, surf1, surf2);
+      return CGAL::opposite(left_res);
+
+      /*if (left_res == LARGER)
+        return SMALLER;
+      else if (left_res == SMALLER)
+        return LARGER;
+      else
+        return EQUAL;*/
+    }  
+  };
+
+  /*! Get a Compare_z_at_xy_below_3 functor object. */
+  Compare_z_at_xy_below_3
+  compare_z_at_xy_below_3_object() const
+  {
+    return Compare_z_at_xy_below_3(this);
+  }
+
+  /***************************************************************************/
+
+//  // checks if xy-monotone surface is vertical
+//  class Is_vertical_3
+//  {
+//  public:
+//
+//    bool operator()(const Xy_monotone_surface_3& s) const
+//    {
+//      return false;
+//    }
+//  };
+//
+//  /*! Get a Is_vertical_3 functor object. */
+//  Is_vertical_3 is_vertical_3_object() const
+//  {
+//    return Is_vertical_3();
+//  }
+  
+  /***************************************************************************/
+
+  // public method needed for testing
+
+  // checks if point is in the xy-range of surf
+  class Is_defined_over
+  {
+  public:
+    // checks if point is in the xy-range of surf
+    bool operator()(const Point_2& point, 
+		    const Xy_monotone_surface_3& surf) const
+
+    {
+      Kernel k;
+      Self parent;
+
+      // project the surface on the plane
+      Triangle_2 boundary = parent.project(surf);
+
+      // if surface is not vertical (i.e. boundary is not degenerate)
+      // check if the projected point is inside the projected boundary
+      if (!k.is_degenerate_2_object()(boundary))
+        return (!k.has_on_unbounded_side_2_object()(boundary, point));
+
+      // if surface is vertical, we check if the point is collinear
+      // with the projected vertices, and on one of the projected segments
+      // of the boundary
+      Point_2 v1 = k.construct_vertex_2_object()(boundary, 0);
+      Point_2 v2 = k.construct_vertex_2_object()(boundary, 1);
+      Point_2 v3 = k.construct_vertex_2_object()(boundary, 2);
+
+      if (!k.collinear_2_object()(v1, v2, point))
+        return false;
+
+      // enough to check 2 edges, because the 3rd is part of their union
+      return (k.collinear_are_ordered_along_line_2_object()(v1, point, v2) ||
+              k.collinear_are_ordered_along_line_2_object()(v2, point, v3));
+
+    }
+  };
+
+  /*! Get a Is_defined_over functor object. */
+  Is_defined_over is_defined_over_object() const
+  {
+    return Is_defined_over();
+  }
+
+  Segment_2 project (const Segment_3& seg) const
+  {
+    typedef typename Kernel::Construct_vertex_3 Construct_vertex_3;
+    
+    Kernel              k;
+    Construct_vertex_3  vertex_on = k.construct_vertex_3_object();
+
+    const Point_3      q0 = (vertex_on (seg, 0));
+    const Point_3      q1 = (vertex_on (seg, 1));
+    const Point_2      p0 (q0.x(), q0.y());
+    const Point_2      p1 (q1.x(), q1.y());
+    
+    return (k.construct_segment_2_object() (p0, p1));
+  }
+
+  Point_2 project(const Point_3& obj) const
+  {
+    return Point_2(obj.x(), obj.y());
+  }
+  
+  Triangle_2 project(const Xy_monotone_surface_3& triangle_3) const
+  {
+    const Point_3&  end1 = triangle_3.vertex(0),
+                    end2 = triangle_3.vertex(1),
+                    end3 = triangle_3.vertex(2);
+    Point_2 projected_end1(end1.x(), end1.y()),
+            projected_end2(end2.x(), end2.y()),
+
+            projected_end3(end3.x(), end3.y());
+    return Triangle_2(projected_end1, projected_end2, projected_end3);
+  }
+
+  // triangles overlap if they lie on the same plane and intersect on it.
+  // this test is only needed for non-vertical triangles
+  bool do_overlap(const Xy_monotone_surface_3& s1, 
+		              const Xy_monotone_surface_3& s2) const
+  {
+    CGAL_precondition(s1.is_xy_monotone() && !s1.is_vertical());
+    CGAL_precondition(s2.is_xy_monotone() && !s2.is_vertical());
+
+    Kernel k;
+    if (!k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
+                                   static_cast<Triangle_3>(s2)))
+      return false;
+
+    // check if they are coplanar
+    Point_3 a1 = s1.vertex(0),
+            b1 = s1.vertex(1),
+            c1 = s1.vertex(2);
+    Point_3 a2 = s2.vertex(0),
+            b2 = s2.vertex(1),
+            c2 = s2.vertex(2);
+    bool b = k.coplanar_3_object()(a1, b1, c1, a2);
+    if (!b) return false;
+
+    b = k.coplanar_3_object()(a1, b1, c1, b2);
+    if (!b) return false;
+
+    b = k.coplanar_3_object()(a1, b1, c1, c2);
+    return b;    
+  }
+
+  // check whethe two xy-monotone surfaces (3D-triangles or segments)
+  // intersect
+  bool do_intersect(const Xy_monotone_surface_3& s1,
+                    const Xy_monotone_surface_3& s2) const
+  {
+    CGAL_precondition(s1.is_xy_monotone());
+    CGAL_precondition(s2.is_xy_monotone());
+    Kernel k;
+    if (!s1.is_segment() && !s2.is_segment())
+      return k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
+                                       static_cast<Triangle_3>(s2));
+    else if (!s1.is_segment())
+      return k.do_intersect_3_object()(static_cast<Triangle_3>(s1),
+                                       static_cast<Segment_3>(s2));
+    else if (!s2.is_segment())
+      return k.do_intersect_3_object()(static_cast<Segment_3>(s1),
+                                       static_cast<Triangle_3>(s2));
+    else
+      // in case of two segments, we don't use easy do-intersect test
+      return true;
+  }
+  
+  // intersect two xy-monotone surfaces (3D-triangles or segments)
+  // if the triangles overlap, the result is empty
+  // the result can be a segment or a point
+  Object intersection(const Xy_monotone_surface_3& s1, 
+                      const Xy_monotone_surface_3& s2) const
+  {
+    CGAL_precondition(s1.is_xy_monotone());
+    CGAL_precondition(s2.is_xy_monotone());
+    Kernel k;
+
+    // first, try to intersect the bounding boxes of the triangles,
+    // efficiently return empty object when the triangles are faraway
+    if (!CGAL::do_overlap(s1.bbox(), s2.bbox()))
+      return Object();
+
+    // if intersecting two segment - alculate the intersection
+    // as in the case of dimention 2
+    if (s1.is_segment() && s2.is_segment())
+    {
+      Object res = intersection_of_segments(s1, s2);
+      return res;
+    }
+  
+    // if both triangles lie on the same (non-vertical) plane, they overlap
+    // we don't care about overlaps, because they are not passed to the
+    // algorithm anyway, so we save the costly computation
+    Plane_3 p1 = s1.plane();
+    Plane_3 p2 = s2.plane();
+    if  (p1 == p2 || p1 == p2.opposite())
+        return Object();
+
+    // calculate intersection between a triangle and the other triangle's 
+    // supporting plane
+    // if there is no intersection - then the triangles have no intersection 
+    // between them.
+    Object inter_obj = intersection(p1, s2);
+      
+    if (inter_obj.is_empty())
+      return Object();
+
+    // otherwise, if the intersection in a point, we should check if it lies
+    // inside the first triangle
+    Assign_3 assign_obj = k.assign_3_object();
+    Point_3 inter_point;
+    if (assign_obj(inter_point, inter_obj))
+    {
+      Object res = intersection_on_plane_3(p1, s1, inter_point);
+      return res;
+    }
+    else
+    {
+      // if the intersection is a segment, we check the intersection of the
+      // other plane-triangle pair
+      Segment_3 inter_seg;
+      CGAL_assertion(assign_obj(inter_seg, inter_obj));
+      assign_obj(inter_seg, inter_obj);
+
+      inter_obj = intersection(p2, s1);
+
+      // if there is no intersection - then the triangles have no intersection 
+      // between them.
+      if (inter_obj.is_empty())
+      	return Object();
+      
+      if (assign_obj(inter_point, inter_obj))
+      {
+      	// if the intersection is a point, which lies on the segment,
+      	// than it is the result,
+      	// otherwise, empty result
+      	 if (k.has_on_3_object()(inter_seg, inter_point))
+      	   return make_object(inter_point);
+      	 else
+      	   return Object();
+      }
+      else
+      {
+      	// both plane-triangle intersections are segments, which are collinear,
+      	// and lie on the line which is the intersection of the two supporting
+      	// planes
+        Segment_3 inter_seg2;
+      	CGAL_assertion(assign_obj(inter_seg2, inter_obj));
+      	assign_obj(inter_seg2, inter_obj);
+	
+      	Point_3 min1 = k.construct_min_vertex_3_object()(inter_seg),
+      	        max1 = k.construct_max_vertex_3_object()(inter_seg);
+      	Point_3 min2 = k.construct_min_vertex_3_object()(inter_seg2),
+      	        max2 = k.construct_max_vertex_3_object()(inter_seg2); 
+
+       	CGAL_assertion((k.collinear_3_object()(min1, min2, max1) &&
+                         k.collinear_3_object()(min1, max2, max1)));
+
+       	// we need to find the overlapping part, if exists
+       	Point_3 min, max;
+       	if (k.less_xyz_3_object()(min1, min2))
+       	  min = min2;
+       	else
+       	  min = min1;
+       	if (k.less_xyz_3_object()(max1, max2))
+       	  max = max1;
+       	else
+       	  max = max2;
+
+       	Object res;
+       	Comparison_result comp_res = k.compare_xyz_3_object()(min, max);
+       	if (comp_res == EQUAL)
+       	  res = make_object(min);
+       	else if (comp_res == SMALLER)
+       	  res = make_object(Segment_3(min, max));
+       	// else - empty result
+
+       	return res;
+      }
+    }
+  }
+
+  // calculate intersection between triangle & point on the same plane plane
+  Object intersection_on_plane_3(const Plane_3& plane,
+                                 const Xy_monotone_surface_3& triangle,
+                                 const Point_3& point) const
+  {
+    Kernel k;
+    CGAL_precondition( triangle.is_xy_monotone() );
+    CGAL_precondition( !k.is_degenerate_3_object()(plane) );
+    CGAL_precondition( triangle.plane() == plane ||
+                       triangle.plane() == plane.opposite());
+    CGAL_precondition( k.has_on_3_object()(plane, point) );
+    CGAL_USE(plane);
+
+    // if the point is inside the triangle, then the point is the intersection
+    // otherwise there is no intersection
+    bool has_on;
+    if (triangle.is_segment())
+      has_on = k.has_on_3_object()(static_cast<Segment_3>(triangle), point);
+    else
+      has_on = k.has_on_3_object()(static_cast<Triangle_3>(triangle), point);
+    if (has_on)
+      return make_object(point);
+    else
+      return Object();
+  }
+
+  // calculate intersection between 2 segments on the same vertical plane plane
+  Object intersection_of_segments(const Xy_monotone_surface_3& s1,
+                                  const Xy_monotone_surface_3& s2) const
+  {
+    Kernel k;
+    CGAL_precondition( s1.is_xy_monotone() && s1.is_segment());
+    CGAL_precondition( s2.is_xy_monotone() && s2.is_segment());
+
+    // if the segments are not coplanar, they cannot intersect
+    if (!k.coplanar_3_object()(s1.vertex(0), s1.vertex(1),
+                               s2.vertex(0), s2.vertex(1)))
+      return Object();
+
+    const Plane_3& plane = s1.plane();
+    if (s2.plane() != plane &&
+        s2.plane() != plane.opposite())
+      // todo: this case is not needed in the algorithm,
+      // so we don't implement it
+      return Object();
+
+    CGAL_precondition( !k.is_degenerate_3_object()(plane) );
+    CGAL_precondition( s2.plane() == plane ||
+                       s2.plane() == plane.opposite());
+
+    // for simplicity, we transform the segments to the xy-plane,
+    // compute the intersection there, and transform it back to the 3d plane.
+    Point_2 v1 = plane.to_2d(s1.vertex(0)),
+            v2 = plane.to_2d(s1.vertex(1));
+    Segment_2 seg1_t(v1, v2);
+
+  	Point_2 u1 = plane.to_2d(s2.vertex(0)),
+            u2 = plane.to_2d(s2.vertex(1));
+  	Segment_2 seg2_t(u1, u2);
+
+  	Object inter_obj = k.intersect_2_object()(seg1_t, seg2_t);
+  	Assign_2 assign_2 = k.assign_2_object();
+  	if (inter_obj.is_empty())
+  		return inter_obj;
+
+  	Point_2 inter_point;
+    Segment_2 inter_segment;
+
+    if (assign_2(inter_point, inter_obj))
+  	  return make_object(plane.to_3d(inter_point));
+    else
+    {
+      CGAL_assertion_code(bool b = )
+      assign_2(inter_segment, inter_obj);
+      CGAL_assertion(b);
+      
+      return make_object 
+        (Segment_3
+         (plane.to_3d(k.construct_vertex_2_object()(inter_segment, 0)),
+          plane.to_3d(k.construct_vertex_2_object()(inter_segment, 1))));
+    }
+
+  }
+
+  // calculate the intersection between a triangle/segment
+  // and a (non degenerate) plane in 3d
+  // the result object can be empty, a point, a segment or the original
+  // triangle
+  Object intersection(const Plane_3& pl, 
+		                  const Xy_monotone_surface_3& tri) const
+  {
+    Kernel k;
+    CGAL_precondition( tri.is_xy_monotone() );
+    CGAL_precondition( !k.is_degenerate_3_object()(pl) );
+
+    if (tri.is_segment())
+      return k.intersect_3_object()(pl, static_cast<Segment_3>(tri));
+      
+    // first, check for all 3 vertices of tri on which side of pl they lie on
+    int points_on_plane[3];    // contains the indices of vertices that lie 
+                               // on pl
+    int points_on_positive[3]; // contains the indices of vertices that lie on
+                               // the positive side of pl
+    int points_on_negative[3]; // contains the indices of vertices that lie on
+                               // the negative side of pl
+
+    int n_points_on_plane = 0;
+    int n_points_on_positive = 0;
+    int n_points_on_negative = 0;
+
+    Oriented_side side;
+    for (int i=0; i<3; ++i)
+    {
+      side = pl.oriented_side(tri.vertex(i));
+      if (side == ON_NEGATIVE_SIDE)
+        points_on_negative[n_points_on_negative++] = i;
+      else if (side == ON_POSITIVE_SIDE)
+        points_on_positive[n_points_on_positive++] = i;
+      else
+        points_on_plane[n_points_on_plane++] = i;
+    }
+
+    CGAL_assertion(n_points_on_plane + 
+            n_points_on_positive + n_points_on_negative == 3);
+
+    // if all vertices of tri lie on the same size (positive/negative) of pl,
+    // there is no intersection
+    if (n_points_on_positive == 3 || n_points_on_negative == 3)
+      return Object();
+
+    // if all vertices of tri lie on pl then we return tri
+    if (n_points_on_plane == 3)
+       return make_object(tri);
+
+    // if 2 vertices lie on pl, then return the segment between them
+    if (n_points_on_plane == 2)
+    {
+      int point_idx1 = points_on_plane[0], point_idx2 = points_on_plane[1];
+      return make_object (Segment_3(tri.vertex(point_idx1),
+                                    tri.vertex(point_idx2)));
+    }
+
+    // if only 1 lie on pl, should check the segment opposite to it on tri
+    if (n_points_on_plane == 1)
+    {
+      int point_on_plane_idx = points_on_plane[0];
+
+      // if the other 2 vertices are on the same side of pl,
+      // then the answer is just this vertex
+      if (n_points_on_negative == 2 || n_points_on_positive == 2)
+        return make_object(tri.vertex(point_on_plane_idx));
+
+      // now it is known that one vertex is on pl, and the segment of tri
+      // opposite to it should intersect pl
+
+      // the segment of tri opposite of tri[point_on_plane_idx]
+      Segment_3 tri_segment(tri.vertex(point_on_plane_idx+1),
+                            tri.vertex(point_on_plane_idx+2));
+
+      Object inter_result = k.intersect_3_object()(pl, tri_segment);
+      Point_3 inter_point;
+      CGAL_assertion( k.assign_3_object()(inter_point, inter_result) );
+      k.assign_3_object()(inter_point, inter_result);
+
+      // create the resulting segment
+      // (between tri[point_on_plane_idx] and inter_point)
+      return make_object(Segment_3(tri.vertex(point_on_plane_idx), 
+                                   inter_point));
+
+    }
+
+    CGAL_assertion( n_points_on_plane == 0 );
+    CGAL_assertion( n_points_on_positive + n_points_on_negative == 3 );
+    CGAL_assertion( n_points_on_positive != 0 );
+    CGAL_assertion( n_points_on_negative != 0 );
+
+    // now it known that there is an intersection between 2 segments of tri
+    // and pl, it is also known which segments are those.
+    Point_3 inter_points[2];
+    int pos_it, neg_it, n_inter_points = 0;
+    for(pos_it = 0; pos_it < n_points_on_positive; ++pos_it)
+      for(neg_it = 0; neg_it < n_points_on_negative; ++neg_it)
+      {
+        Segment_3 seg(tri.vertex(points_on_positive[pos_it]),
+                      tri.vertex(points_on_negative[neg_it]));
+        Object inter_result = k.intersect_3_object()(pl, seg);
+        Point_3 inter_point;
+        // the result of the intersection must be a point
+        CGAL_assertion( k.assign_3_object()(inter_point, inter_result) );
+        k.assign_3_object()(inter_point, inter_result);
+        inter_points[n_inter_points++] = inter_point;
+      }
+
+    CGAL_assertion( n_inter_points == 2 );
+    return make_object(Segment_3(inter_points[0], inter_points[1]));
+  }
+
+  // compare the value of s1 in p1 to the value of s2 in p2
+  Comparison_result
+  compare_z(const Point_2& p1,
+            const Xy_monotone_surface_3& s1,
+            const Point_2& p2,
+            const Xy_monotone_surface_3& s2)
+  {
+    CGAL_precondition(is_defined_over_object()(p1, s1));
+    CGAL_precondition(is_defined_over_object()(p2, s2));
+
+    Point_3 v1 = envelope_point_of_surface(p1, s1);
+    Point_3 v2 = envelope_point_of_surface(p2, s2);
+    Kernel k;
+    return k.compare_z_3_object()(v1, v2);
+  }
+  
+  // find the envelope point of the surface over the given point
+  // precondition: the surface is defined in point
+  Point_3
+  envelope_point_of_surface(const Point_2& p,
+                            const Xy_monotone_surface_3& s) const
+  {
+    CGAL_precondition(s.is_xy_monotone());
+    CGAL_precondition(is_defined_over_object()(p, s));
+
+    Point_3 point(p.x(), p.y(), 0);
+
+    // Compute the intersetion between the vertical line and the given surfaces
+    if (s.is_segment())
+      return envelope_point_of_segment(point, s);
+    else
+    {
+      // s is a non-vertical triangle
+      CGAL_assertion(!s.is_vertical());
+
+      // Construct a vertical line passing through point
+      Kernel k;
+      Direction_3 dir (0, 0, 1);
+      Line_3      vl = k.construct_line_3_object() (point, dir);
+
+      const Plane_3& plane = s.plane();
+      Object    res = k.intersect_3_object()(plane, vl);
+      CGAL_assertion(!res.is_empty());
+      Point_3 ip;
+      CGAL_assertion(k.assign_3_object()(ip, res));
+      k.assign_3_object()(ip, res);
+
+      return ip;
+    }
+  }
+
+  // find the envelope point of the surface over the given point
+  // precondition: the surface is defined in point and is a segment
+  Point_3 envelope_point_of_segment(const Point_3& point,
+                                    const Xy_monotone_surface_3& s) const
+  {
+    Kernel k;
+    CGAL_precondition(s.is_segment());
+    CGAL_precondition(is_defined_over_object()(project(point), s));
+
+    // this is the vertical plane through the segment
+    const Plane_3& plane = s.plane();
+
+    // Construct a vertical line passing through point
+    Direction_3 dir (0, 0, 1);
+    Line_3      vl = k.construct_line_3_object() (point, dir);
+    // we need 2 points on this line, to be transformed to 2d,
+    // and preserve the direction of the envelope
+    Point_3 vl_point1 = k.construct_point_on_3_object()(vl, 0),
+            vl_point2 = k.construct_point_on_3_object()(vl, 1);
+
+    // the surface and the line are on the same plane(plane),
+    // so we transform them to the xy-plane, compute the intersecting point
+    // and transform it back to plane.
+    const Point_3& v1 = s.vertex(0);
+    const Point_3& v2 = s.vertex(1);
+    
+    Point_2 t1 = plane.to_2d(v1);
+    Point_2 t2 = plane.to_2d(v2);
+
+    Point_2 tvl_point1 = plane.to_2d(vl_point1);
+    Point_2 tvl_point2 = plane.to_2d(vl_point2);
+    Line_2 l(tvl_point1, tvl_point2);
+
+    Segment_2 seg(t1, t2);
+    Object inter_obj = k.intersect_2_object()(seg, l);
+    Point_2 inter_point;
+    CGAL_assertion_code(bool is_inter_point =)
+    k.assign_2_object()(inter_point, inter_obj);
+    CGAL_assertion(is_inter_point);
+    return plane.to_3d(inter_point);
+  }
+
+  Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const
+  {
+    Kernel k;
+    return k.construct_midpoint_2_object()(p1, p2);
+  }
+
+  Point_2 construct_middle_point(const X_monotone_curve_2& cv) const
+  {
+    Kernel k;
+    return k.construct_midpoint_2_object()(cv.source(), cv.target());
+  }
+
+  /***************************************************************************/
+  // for vertical decomposition
+  /***************************************************************************/
+  
+  class Construct_vertical_2
+  {
+  public:
+    X_monotone_curve_2 operator()(const Point_2& p1, const Point_2& p2) const
+    {
+      return X_monotone_curve_2(p1, p2);
+
+    }
+  };
+
+  /*! Get a Construct_vertical_2 functor object. */
+  Construct_vertical_2 construct_vertical_2_object() const
+  {
+    return Construct_vertical_2();
+  }
+ 
+
+  Point_2 vertical_ray_shoot_2 (const Point_2& pt,
+                                const X_monotone_curve_2& cv) const
+  {
+    CGAL_precondition(!cv.is_vertical());
+
+    typename Kernel::Segment_2 seg = cv;
+    Kernel k;
+    // If the curve contains pt, return it.
+    if (k.has_on_2_object() (seg, pt))
+      return (pt);
+
+    // Construct a vertical line passing through pt.
+    typename Kernel::Direction_2  dir (0, 1);
+    typename Kernel::Line_2        vl = k.construct_line_2_object() (pt, dir);
+
+    // Compute the intersetion between the vertical line and the given curve.
+    Object    res = k.intersect_2_object()(seg, vl);
+    Point_2   ip;
+    bool      ray_shoot_successful = k.assign_2_object()(ip, res);
+
+    if (! ray_shoot_successful)
+      CGAL_assertion (ray_shoot_successful);
+
+    return (ip);
+  }
+};
+
+
+/*!
+ * \class A representation of a triangle, as used by the 
+ * Env_triangle_traits_3 traits-class.
+ */
+template <class Kernel_>
+class Env_triangle_3 :
+    public Env_triangle_traits_3<Kernel_>::_Triangle_cached_3
+{
+  typedef Kernel_                                                  Kernel;
+  typedef typename Kernel::Triangle_3                              Triangle_3;
+  typedef typename Kernel::Point_3                                 Point_3;
+  typedef typename Kernel::Plane_3                                 Plane_3;
+  typedef typename Kernel::Segment_3                               Segment_3;
+
+  typedef typename Env_triangle_traits_3<Kernel>::_Triangle_cached_3
+                                                                   Base;
+
+public:
+
+  /*!
+   * Default constructor.
+   */
+  Env_triangle_3() :
+    Base()
+  {}
+
+  /*!
+   * Constructor from a "kernel" triangle.
+   * \param seg The segment.
+   */
+  Env_triangle_3(const Triangle_3& tri) :
+    Base(tri)
+  {}
+
+  /*!
+   * Construct a triangle from 3 end-points.
+   * \param p1 The first point.
+   * \param p2 The second point.
+   * \param p3 The third point.
+   */
+    Env_triangle_3(const Point_3 &p1, const Point_3 &p2, const Point_3 &p3) :
+      Base(p1, p2, p3)
+  {}
+
+  /*!
+   * Construct a triangle from a plane and 3 end-points.
+   * \param pl The supporting plane.
+   * \param p1 The first point.
+   * \param p2 The second point.
+   * \param p3 The third point.
+   * \pre All points must be on the supporting plane.
+   */
+  Env_triangle_3(const Plane_3& pl,
+                 const Point_3 &p1,
+                 const Point_3 &p2,
+                 const Point_3 &p3) :
+    Base(pl, p1, p2, p3)
+
+  {}
+
+  /*!
+   * Construct a segment from 2 end-points.
+   * \param p1 The first point.
+   * \param p2 The second point.
+   */
+  Env_triangle_3(const Point_3 &p1, const Point_3 &p2) :
+    Base(p1, p2)
+  {}
+
+  /*!
+   * Cast to a triangle.
+   */
+  operator Triangle_3() const
+  {
+    return (Triangle_3(this->vertex(0), this->vertex(1), this->vertex(2)));
+  }
+
+  /*!
+   * Cast to a segment (only when possible).
+   */
+  operator Segment_3() const
+  {
+    CGAL_precondition(this->is_segment());
+    return (Segment_3(this->vertex(0), this->vertex(1)));
+  }
+
+  /*!
+   * Create a bounding box for the triangle.
+   */
+  Bbox_3 bbox() const
+  {
+    Triangle_3 tri(this->vertex(0), this->vertex(1), this->vertex(2));
+    return (tri.bbox());
+  }
+};
+
+template <class Kernel>
+bool
+operator<(const Env_triangle_3<Kernel> &a,
+          const Env_triangle_3<Kernel> &b)
+{
+  if (a.vertex(0) < b.vertex(0))
+    return true;
+  if (a.vertex(0) > b.vertex(0))
+    return false;
+  if (a.vertex(1) < b.vertex(1))
+    return true;
+  if (a.vertex(1) > b.vertex(1))
+    return false;
+  if (a.vertex(2) < b.vertex(2))
+    return true;
+  if (a.vertex(2) > b.vertex(2))
+    return false;
+
+  return false;
+}
+template <class Kernel>
+bool
+operator==(const Env_triangle_3<Kernel> &a,
+           const Env_triangle_3<Kernel> &b)
+{
+  return (a.vertex(0) == b.vertex(0) &&
+          a.vertex(1) == b.vertex(1) &&
+          a.vertex(2) == b.vertex(2));
+}
+
+/*!
+ * Exporter for the triangle class used by the traits-class.
+ */
+template <class Kernel, class OutputStream>
+OutputStream& operator<< (OutputStream& os, const Env_triangle_3<Kernel>& tri)
+{
+  os << static_cast<typename Kernel::Triangle_3>(tri);
+  if (tri.is_segment())
+    os << " (segment)";
+  return (os);
+}
+
+/*!
+ * Importer for the triangle class used by the traits-class.
+ */
+template <class Kernel, class InputStream>
+InputStream& operator>> (InputStream& is, Env_triangle_3<Kernel>& tri)
+{
+  typename Kernel::Triangle_3   kernel_tri;
+  is >> kernel_tri;
+  tri = kernel_tri;
+  return (is);
+}
+
+} //namespace CGAL
+
+#endif 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h
new file mode 100644
index 0000000..63bc991
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h
@@ -0,0 +1,1242 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Ron Wein   <wein at post.tau.ac.il>
+
+#ifndef CGAL_ENVELOPE_DIVIDE_AND_CONQUER_2_IMPL_H
+#define CGAL_ENVELOPE_DIVIDE_AND_CONQUER_2_IMPL_H
+
+/*! \file
+ * Definitions of the functions of the Envelope_divide_and_conquer_2 class.
+ */
+
+#include <boost/optional.hpp>
+
+namespace CGAL {
+
+// ---------------------------------------------------------------------------
+// Construct the lower/upper envelope of the given list of non-vertical curves.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_construct_envelope_non_vertical(Curve_pointer_iterator begin,
+                                 Curve_pointer_iterator end,
+                                 Envelope_diagram_1& out_d)
+{
+  out_d.clear();
+  
+  if (begin == end)
+    return;
+  
+  // Check if the range contains just a single curve.
+  Curve_pointer_iterator    iter = begin;
+  ++iter;
+  
+  if (iter == end)
+  {
+    // Construct a singleton diagram, which matches a single curve.
+    _construct_singleton_diagram(*(*begin), out_d);
+  }
+  else
+  {
+    // Divide the given range of curves into two.
+    std::size_t size = std::distance(begin, end);
+    Curve_pointer_iterator  div_it = begin;
+    std::advance(div_it, size / 2);
+    
+    // Construct the diagrams (envelopes) for the two sub-ranges recursively 
+    // and then merge the two diagrams to obtain the result.
+    Envelope_diagram_1   d1;
+    Envelope_diagram_1   d2;
+    
+    _construct_envelope_non_vertical(begin, div_it, d1);
+    
+    _construct_envelope_non_vertical(div_it, end, d2);
+
+    _merge_envelopes(d1, d2, out_d);
+
+    // Print the minimization diagram.
+    /* RWRW:
+    Edge_const_handle    e = out_d.leftmost();
+    Vertex_const_handle  v;
+
+    std::cout << "The diagram: ";
+    while (e != out_d.rightmost())
+    {
+      if (! e->is_empty())
+        std::cout << e->curve() << "  ";
+      else
+        std::cout << "[empty]" << "  ";
+
+      v = e->right();
+      std::cout << "(" << v->point() << ")  ";
+      
+      e = v->right();
+    }
+    std::cout << "[empty]" << std::endl;
+    */
+  }
+  
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Construct a singleton diagram, which matches a single curve.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_construct_singleton_diagram(const X_monotone_curve_2& cv,
+                             Envelope_diagram_1& out_d)
+{
+  CGAL_assertion(out_d.leftmost() == out_d.rightmost());
+  CGAL_assertion(out_d.leftmost()->is_empty());
+  
+  // Check if the given curve is bounded from the left and from the right.
+  if (traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END) != ARR_INTERIOR)
+  {
+    if (traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END) != ARR_INTERIOR)
+    {
+      // The curve is defined over (-oo, oo), so its diagram contains
+      // only a single edge.
+      out_d.leftmost()->add_curve(cv);
+      
+      return;
+    }
+
+    // The curve is defined over (-oo, x], where x is finite.
+    // Create a vertex and associate it with the right endpoint of cv.
+    CGAL_precondition
+      (traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END) == ARR_INTERIOR);
+    
+    Vertex_handle v =
+      out_d.new_vertex(traits->construct_max_vertex_2_object()(cv));
+    Edge_handle   e_right = out_d.new_edge();
+    
+    v->add_curve(cv);
+    v->set_left(out_d.leftmost());
+    v->set_right(e_right);
+    
+    // The leftmost edge is associated with cv, and the rightmost is empty.
+    out_d.leftmost()->add_curve(cv);
+    out_d.leftmost()->set_right(v);
+    
+    e_right->set_left(v);
+    out_d.set_rightmost(e_right);
+    
+    return;
+  }
+  
+  if (traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END) != ARR_INTERIOR)
+  {
+    // The curve is defined over [x, +oo), where x is finite.
+    // Create a vertex and associate it with the left endpoint of cv.
+    CGAL_precondition
+      (traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END) == ARR_INTERIOR);
+    
+    Vertex_handle  v = 
+      out_d.new_vertex(traits->construct_min_vertex_2_object()(cv));
+    Edge_handle    e_left = out_d.new_edge();
+    
+    v->add_curve(cv);
+    v->set_left(e_left);
+    v->set_right(out_d.rightmost());
+    
+    // The rightmost edge is associated with cv, and the leftmost is empty.
+    out_d.rightmost()->add_curve(cv);
+    out_d.rightmost()->set_left(v);
+    
+    e_left->set_right(v);
+    out_d.set_leftmost(e_left);
+    
+    return;
+  }
+  
+  // If we reached here, the curve is defined over a bounded x-range.
+  // We therefore create the following diagram:
+  //
+  //             (empty)    v1     e       v2   (empty)
+  //      -oo -------------(+)============(+)------------ +oo
+  //
+  CGAL_precondition
+    (traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END) == ARR_INTERIOR);
+  CGAL_precondition
+    (traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END) == ARR_INTERIOR);
+  
+  Vertex_handle  v1 = 
+    out_d.new_vertex(traits->construct_min_vertex_2_object()(cv));
+  Vertex_handle  v2 = 
+    out_d.new_vertex(traits->construct_max_vertex_2_object()(cv));
+  Edge_handle    e_left = out_d.new_edge();
+  Edge_handle    e_right = out_d.new_edge();
+  Edge_handle    e = out_d.leftmost();
+  
+  v1->add_curve(cv);
+  v1->set_left(e_left);
+  v1->set_right(e);
+  
+  v2->add_curve(cv);
+  v2->set_left(e);
+  v2->set_right(e_right);
+  
+  e->add_curve(cv);
+  e->set_left(v1);
+  e->set_right(v2);
+  
+  e_left->set_right(v1);
+  e_right->set_left(v2);
+  
+  out_d.set_leftmost(e_left);
+  out_d.set_rightmost(e_right);
+  
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Merge two minimization (or maximization) diagrams.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_merge_envelopes(const Envelope_diagram_1& d1,
+                 const Envelope_diagram_1& d2,
+                 Envelope_diagram_1& out_d)
+{
+  Edge_const_handle    e1 = d1.leftmost();
+  bool                 is_leftmost1 = true;
+  Vertex_const_handle  v1 = Vertex_const_handle();
+  Edge_const_handle    e2 = d2.leftmost();
+  bool                 is_leftmost2 = true;
+  Vertex_const_handle  v2 = Vertex_const_handle();
+  Vertex_const_handle  next_v = Vertex_const_handle();
+  bool                 next_exists = true;
+  Comparison_result    res_v = EQUAL;
+  bool                 same_x = false;
+
+  do
+  {
+    // Locate the vertex that has smaller x-coordinate between v1 and v2.
+    // If both have the same x-ccordinate, find the one that should be in
+    // the envelope.
+    same_x = false;
+    
+    if (e1 == d1.rightmost())
+    {
+      if (e2 == d2.rightmost())
+      {
+        // Both current edges do not have a vertex to their right.
+        next_exists = false;
+      }
+      else
+      {
+        // e1 is not bounded from the right while e2 is.
+        v2 = e2->right();
+        next_v = v2;
+        res_v = LARGER;
+      }
+    }
+    else if (e2 == d2.rightmost())
+    {
+      // e2 is not bounded from the right while e1 is.
+      v1 = e1->right();
+      next_v = v1;
+      res_v = SMALLER;
+    }
+    else
+    {
+      v1 = e1->right();
+      v2 = e2->right();
+      res_v = _compare_vertices(v1, v2, same_x);
+      next_v = (res_v == SMALLER) ? v1 : v2;
+    }
+    
+    // Check if the current edges represent empty intervals or not.
+    if (! e1->is_empty() && ! e2->is_empty())
+    {
+      // Both edges are not empty, and there are curves defined on them.
+      _merge_two_intervals(e1, is_leftmost1, e2, is_leftmost2,
+                           next_v, next_exists, res_v, out_d);
+      
+    }
+    else if (! e1->is_empty() && e2->is_empty())
+    {
+      // e1 is not empty but e2 is empty:
+      _merge_single_interval(e1, e2, next_v, next_exists, res_v, out_d);
+    }
+    else if (e1->is_empty() && ! e2->is_empty())
+    {
+      // e1 is empty and e2 is not empty:
+      _merge_single_interval(e2, e1, next_v, next_exists,
+                             CGAL::opposite(res_v), out_d);
+    }
+    else
+    {
+      // Both edges are empty: append an empty edge to out_d:
+      if (next_exists)
+      {
+        Vertex_handle  new_v = _append_vertex(out_d, next_v->point(), e1);
+        switch(res_v)
+        {
+        case SMALLER:
+          new_v->add_curves(v1->curves_begin(), v1->curves_end()); break;
+        case LARGER:
+          new_v->add_curves(v2->curves_begin(), v2->curves_end()); break;
+        case EQUAL:
+          new_v->add_curves(v1->curves_begin(), v1->curves_end());
+          new_v->add_curves(v2->curves_begin(), v2->curves_end());
+          break;
+        }
+      }
+    }
+    
+    // Proceed to the next diagram edge(s), if possible.
+    if (next_exists)
+    {
+      // Check if we should proceed on d1 or on d2.
+      // \todo: we do not need 3 cases, only two.
+      if (res_v == SMALLER)
+      {
+        e1 = v1->right();
+        is_leftmost1 = false;
+
+        if (same_x)
+        {
+          e2 = v2->right();
+          is_leftmost2 = false;
+        }
+      }
+      else if (res_v == LARGER)
+      {
+        e2 = v2->right();
+        is_leftmost2 = false;
+
+        if (same_x)
+        {
+          e1 = v1->right();
+          is_leftmost1 = false;
+        }
+      }
+      else
+      {
+        e1 = v1->right();
+        is_leftmost1 = false;
+                
+        e2 = v2->right();
+        is_leftmost2 = false;
+      }
+    }
+    
+  } while (next_exists);
+  
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Compare two diagram vertices.
+//
+template <class Traits, class Diagram>
+Comparison_result Envelope_divide_and_conquer_2<Traits,Diagram>::
+_compare_vertices(Vertex_const_handle v1,
+                  Vertex_const_handle v2,
+                  bool& same_x) const
+{
+  Comparison_result res =
+    traits->compare_x_2_object()(v1->point(), v2->point());
+  
+  if (res != EQUAL)
+  {
+    same_x = false;
+    return (res);
+  }
+  else
+  {
+    same_x = true;
+  }
+
+  // In case the x-coordinates of the two vertices are equal:
+  res = traits->compare_xy_2_object()(v1->point(), v2->point());
+
+  // In case of upper envlope we take the opposite result
+  if (env_type == UPPER)
+    return CGAL::opposite(res);
+  return res;
+}
+
+// ---------------------------------------------------------------------------
+// Deal with an interval which is non-empty in one of the merged diagrams and
+// empty in the other.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_merge_single_interval(Edge_const_handle e, Edge_const_handle other_edge,
+                       Vertex_const_handle v, bool v_exists,
+                       Comparison_result origin_of_v,
+                       Envelope_diagram_1& out_d)
+{
+  if (! v_exists)
+  {
+    // The non-empty edge e is unbounded from the right, so we simply have
+    // to update the rightmost edge in out_d.
+    out_d.rightmost()->add_curves(e->curves_begin(), e->curves_end());
+    return;
+  }
+  
+  Vertex_handle      new_v;
+  
+  if (origin_of_v == SMALLER)
+  {
+    // The non-empty edge ends at v, so we simply insert it to out_d.
+    new_v = _append_vertex(out_d, v->point(), e);
+    new_v->add_curves(v->curves_begin(), v->curves_end());
+    
+    return;
+  }
+
+  if (origin_of_v == EQUAL) // the edges have vertices at the same place.
+  {
+    new_v = _append_vertex(out_d, v->point(), e);
+    new_v->add_curves(e->right()->curves_begin(), e->right()->curves_end());
+    new_v->add_curves(other_edge->right()->curves_begin(), 
+                      other_edge->right()->curves_end());
+    return;
+  }
+
+  // If v is not on e, we should insert it to the merged diagram only if it
+  // is below (or above, in case of an upper envelope) the curves of e.
+  Comparison_result res =
+    traits->compare_y_at_x_2_object()(v->point(), e->curve());
+  
+  if ((res == EQUAL) ||
+      (env_type == LOWER && res == SMALLER) ||
+      (env_type == UPPER && res == LARGER))
+  {
+    new_v = _append_vertex(out_d, v->point(), e);
+    new_v->add_curves(v->curves_begin(), v->curves_end());
+
+    if (res == EQUAL)
+      {
+        // In case of equality, append e's curves to those of the new vertex.
+        new_v->add_curves(e->curves_begin(), e->curves_end());
+      }
+  }
+}
+
+//! \brief Functions that should be on Arr_traits_adaptor.
+/*@{*/
+
+//! Compare the $y$-coordinates of two curves at their endpoints
+/*! The function compares the $y$ values of two curves with a joint 
+  range of $x$ values, at the end of the joint range.
+  \param xcv1 The first curve
+  \param xcv2 The second curve
+  \param curve_end ARR_MIN_END - compare the $y$ value of the smaller 
+  endpoint, ARR_MAX_END - compare the $y$ value of the larger endpoint.
+  \pre The two $x$-monotone curves need to have a partially overlapping 
+  $x$-ranges.
+  \return 
+  \todo Move it to Arr_traits_adaptor ?
+*/
+template <class Traits, class Diagram>
+Comparison_result Envelope_divide_and_conquer_2<Traits,Diagram>::
+compare_y_at_end(const X_monotone_curve_2& xcv1,
+                 const X_monotone_curve_2& xcv2,
+                 Arr_curve_end curve_end) const
+{
+  CGAL_precondition(traits->is_in_x_range_2_object()(xcv1, xcv2));
+
+  typedef typename Traits::Compare_xy_2               Compare_xy_2;
+  typedef typename Traits::Compare_y_at_x_2           Compare_y_at_x_2;
+  typedef typename Traits::Construct_min_vertex_2     Construct_min_vertex_2;
+  typedef typename Traits::Construct_max_vertex_2     Construct_max_vertex_2;
+
+  Compare_y_at_x_2  compare_y_at_x = traits->compare_y_at_x_2_object();
+  Construct_min_vertex_2 min_vertex =
+    traits->construct_min_vertex_2_object();
+  Construct_max_vertex_2 max_vertex =
+    traits->construct_max_vertex_2_object();
+  
+  // First check whether any of the curves is defined at x boundary.
+  const Arr_parameter_space ps_x1 =
+    traits->parameter_space_in_x_2_object()(xcv1, curve_end);
+  const Arr_parameter_space ps_x2 =
+    traits->parameter_space_in_x_2_object()(xcv2, curve_end);
+  Comparison_result         res;
+  
+  if (ps_x1 != ARR_INTERIOR) {
+    if (ps_x2 != ARR_INTERIOR) {
+      // Compare the relative position of the curves at x boundary.
+      return (traits->compare_y_near_boundary_2_object()(xcv1, xcv2,
+                                                         curve_end));
+    }
+    
+    // Check if the left end of xcv2 lies at y boundary.
+    const Arr_parameter_space ps_y2 =
+      traits->parameter_space_in_y_2_object()(xcv2, curve_end);
+    
+    if (ps_y2 == ARR_BOTTOM_BOUNDARY)
+      return (LARGER);          // xcv2 is obviously below xcv1.
+    else if (ps_y2 == ARR_TOP_BOUNDARY)
+      return (SMALLER);         // xcv2 is obviously above xcv1.
+          
+    // Compare the position of the left end of xcv2 (which is a normal
+    // point) to xcv1.
+    res = (curve_end == ARR_MIN_END) ?
+      compare_y_at_x(min_vertex(xcv2), xcv1) :
+      compare_y_at_x(max_vertex(xcv2), xcv1);
+
+    // Swap the result.
+    return CGAL::opposite(res);
+  }
+  else if (ps_x2 != ARR_INTERIOR) {
+    // Check if the left end of xcv1 lies at y boundary.
+    const Arr_parameter_space ps_y1 =  traits->parameter_space_in_y_2_object()
+      (xcv1, curve_end);
+    
+    if (ps_y1 == ARR_BOTTOM_BOUNDARY)
+      return (SMALLER);         // xcv1 is obviously below xcv2.
+    else if (ps_y1 == ARR_TOP_BOUNDARY)
+      return (LARGER);          // xcv1 is obviously above xcv2.
+    
+    // Compare the position of the left end of xcv1 (which is a normal
+    // point) to xcv2.
+    res = (curve_end == ARR_MIN_END) ?
+      compare_y_at_x(min_vertex(xcv1), xcv2) :
+      compare_y_at_x(max_vertex(xcv1), xcv2);
+    return (res);
+  }
+  
+  // Check if the left curve end lies at y = +/- oo.
+  const Arr_parameter_space ps_y1 =
+    traits->parameter_space_in_y_2_object()(xcv1, curve_end);
+  const Arr_parameter_space ps_y2 =
+    traits->parameter_space_in_y_2_object()(xcv2, curve_end);
+  Comparison_result         l_res;
+  
+  if (ps_y1 != ARR_INTERIOR) {
+    if (ps_y2 != ARR_INTERIOR) {
+      // The curve ends have boundary conditions with oposite signs in y,
+      // we readily know their relative position (recall that they do not
+      // instersect).
+      if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY))
+        return (SMALLER);
+      else if ((ps_y1 == ARR_TOP_BOUNDARY) && (ps_y2 == ARR_BOTTOM_BOUNDARY))
+        return (LARGER);
+
+      // Both curves have vertical asymptotes with the same sign in y.
+      // Check which asymptote is the rightmost. Note that in this case
+      // the vertical asymptotes cannot be equal.
+      l_res = traits->compare_x_curve_ends_2_object()(xcv1, curve_end,
+                                                      xcv2, curve_end);
+      CGAL_assertion(l_res != EQUAL);
+      
+      if (ps_y1 == ARR_TOP_BOUNDARY)
+        return (l_res);
+      else
+        return CGAL::opposite(l_res);
+    }
+
+    // xcv1 has a vertical asymptote and xcv2 has a normal left endpoint.
+    // Compare the x-positions of this endpoint and the asymptote.
+    const Point_2& left2 =
+      (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2);
+        
+    l_res =
+      traits->compare_x_point_curve_end_2_object()(left2, xcv1, curve_end);
+    
+    if (l_res == LARGER) {
+      // left2 lies in the x-range of xcv1, so it is safe to compare:
+      res = compare_y_at_x(left2, xcv1);
+      return CGAL::opposite(res);
+    }
+    else
+      // xcv1 is below or above xcv2.
+      return ((ps_y1 == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER);
+  }
+  else if (ps_y2 != ARR_INTERIOR) {
+    // xcv2 has a vertical asymptote and xcv1 has a normal left endpoint.
+    // Compare the x-positions of this endpoint and the asymptote.
+    const Point_2&  left1 = 
+      (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1);
+        
+    l_res =
+      traits->compare_x_point_curve_end_2_object()(left1, xcv2, curve_end);
+    
+    return ((l_res == LARGER) ?
+            // left1 lies in the x-range of xcv2, so it is safe to compare:
+            (compare_y_at_x(left1, xcv2)) :
+            ((ps_y2 == ARR_BOTTOM_BOUNDARY) ? LARGER : SMALLER));
+  }
+
+  // In this case we compare two normal points.
+  Compare_xy_2            compare_xy = traits->compare_xy_2_object();
+
+  // Get the left endpoints of xcv1 and xcv2.
+  const Point_2&  left1 = 
+    (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1);
+  const Point_2&  left2 = 
+    (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2);
+
+  // Locate the rightmost point of left1 and left2 and compare its position
+  // to the other curve.
+  l_res = compare_xy(left1, left2);
+  
+  return ((l_res != SMALLER) ?
+    // left1 is in the x-range of xcv2:
+          compare_y_at_x(left1, xcv2) : 
+    // left2 is in the x-range of xcv1:
+          CGAL::opposite(compare_y_at_x(left2, xcv1)));
+}
+/*@}*/
+
+// ---------------------------------------------------------------------------
+// Merge two non-empty intervals into the merged diagram.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, 
+                     Edge_const_handle e2, bool is_leftmost2,
+                     Vertex_const_handle v, bool v_exists,
+                     Comparison_result origin_of_v,
+                     Envelope_diagram_1& out_d)
+{
+  typedef std::pair<Point_2, typename Traits::Multiplicity>  Intersection_point;
+
+  Comparison_result                current_res;
+  bool                             equal_at_v = false;
+ 
+  // Get the relative position of two curves associated with e1 and e2
+  // at the rightmost of the left endpoints of e1 and e2.
+  current_res = compare_y_at_end(e1->curve(), e2->curve(), ARR_MIN_END);
+  // Flip the result in case of an upper envelope.
+  if (env_type == UPPER)
+    current_res = CGAL::opposite(current_res);
+
+  // Use the current rightmost of the two left vertices as a reference point.
+  // This is the rightmost vertex in the current minimization diagram (out_d).
+  // The intersection points/curves that interest us are the ones in
+  // [v_leftmost, v].
+  // Without using make_optional we get a "maybe uninitialized" warning with gcc -Wall
+  boost::optional<Vertex_const_handle>  v_leftmost =
+    boost::make_optional(false, Vertex_const_handle());
+
+  if (is_leftmost1 == true) {
+    if (is_leftmost2 == false)
+      v_leftmost = e2->left();
+  }
+  else {
+    if (is_leftmost2 == true)
+      v_leftmost = e1->left();
+    else
+    {
+      if ((traits->compare_xy_2_object()(e1->left()->point(),
+                                         e2->left()->point()) == LARGER))
+        v_leftmost = e1->left();
+      else
+        v_leftmost = e2->left();
+    }
+  }
+
+  // Find the next intersection of the envelopes to the right of the current
+  // rightmost point in the merged diagram.
+  // \todo Use the faster object_cast.
+  std::list<CGAL::Object>           objects;
+  CGAL::Object                      obj;
+  const X_monotone_curve_2*         intersection_curve;
+  const Intersection_point*         intersection_point;
+  
+  traits->intersect_2_object()(e1->curve(), e2->curve(),
+                               std::back_inserter(objects));
+  
+  while (! objects.empty()) {
+    // Pop the xy-lexicographically smallest intersection object.
+    obj = objects.front();
+    objects.pop_front();
+    
+    if ((intersection_point = CGAL::object_cast<Intersection_point>(&obj)) !=
+        NULL)
+    {
+      // We have a simple intersection point.
+      bool is_in_x_range = true; // true if the intersection point is to the 
+                                 // right of v_leftmost.
+      // check if we are before the leftmost point.
+      if (v_leftmost &&
+          traits->compare_xy_2_object() (intersection_point->first, 
+                                         (*v_leftmost)->point()) != LARGER)
+      {
+        // The point is to the left of the current rightmost vertex in out_d,
+        // so we skip it and continue examining the next intersections.
+        // However, we update the last intersection point observed.
+        is_in_x_range = false;
+      }
+      
+      // check if we arrived at the rightmost point (stop if indeed we are
+      // there).
+      if (is_in_x_range && v_exists) {
+        Comparison_result res = traits->compare_xy_2_object() 
+          (intersection_point->first, v->point());
+        
+        // v is an intersection points, so both curves are equal there:
+        if (res == EQUAL)
+          equal_at_v = true;
+        
+        // We passed the next vertex, so we can stop here.
+        if (res == LARGER)
+          break;
+      }
+      
+      // Create a new vertex in the output diagram that corrsponds to the
+      // current intersection point.
+      if (is_in_x_range) {
+        CGAL_assertion(current_res != EQUAL);
+
+        Vertex_handle new_v = (current_res == SMALLER) ?
+          _append_vertex(out_d, intersection_point->first, e1) :
+          _append_vertex(out_d, intersection_point->first, e2);
+        
+        // if we are at v, then this is a special case that is handled after
+        // the loop. We need to add the curves from the original vertices.
+        if (equal_at_v == false) {
+          // Note that the new vertex is incident to all curves in e1 and in e2.
+          new_v->add_curves(e1->curves_begin(), e1->curves_end());
+          new_v->add_curves(e2->curves_begin(), e2->curves_end());
+        }
+        
+        // Update the handle to the rightmost vertex in the output diagram.
+        v_leftmost = new_v;
+      }
+
+      // Update the relative position of the two curves, which is their
+      // order immediately to the right of their last observed intersection
+      // point.
+      
+      // Get the curve order immediately to the right of the intersection
+      // point. Note that in case of even (non-zero) multiplicity the order
+      // remains the same.
+      if ((current_res != EQUAL) && (intersection_point->second % 2 == 1)) {
+        // Odd multiplicity: flip the current comparison result.
+        current_res = CGAL::opposite(current_res);
+      }
+      // if we are at v, then we may not be able to call compare_y_at_x_right_2.
+      else if (((intersection_point->second == 0) || (current_res == EQUAL)) &&
+               (equal_at_v == false))
+      {
+        // The multiplicity is unknown, so we have to compare the curves to
+        // the right of their intersection point.
+        current_res =
+          traits->compare_y_at_x_right_2_object()(e1->curve(), e2->curve(),
+                                                  intersection_point->first);
+        // Flip the result in case of an upper envelope.
+        if (env_type == UPPER)
+          current_res = CGAL::opposite (current_res);
+      }
+    }
+    else {
+      // We have an x-monotone curve representing an overlap of the two
+      // curves.
+      intersection_curve = CGAL::object_cast<X_monotone_curve_2>(&obj);
+      
+      if (intersection_curve == NULL)
+        CGAL_error_msg("unrecognized intersection object.");
+
+      // Get the endpoints of the overlapping curves.
+      const bool  has_left = 
+        (traits->parameter_space_in_x_2_object() 
+         (*intersection_curve, ARR_MIN_END) == ARR_INTERIOR);
+      const bool  has_right = 
+        (traits->parameter_space_in_x_2_object() 
+         (*intersection_curve, ARR_MAX_END) == ARR_INTERIOR);
+      Point_2     p_left, p_right;
+      
+      if (has_left)
+        p_left = traits->construct_min_vertex_2_object()(*intersection_curve);
+      
+      if (has_right)
+        p_right = traits->construct_max_vertex_2_object()(*intersection_curve);
+
+      bool is_in_x_range = true;
+      // Check if the overlapping curve is not relevant to our range.
+      if (v_leftmost && has_right &&
+          (traits->compare_xy_2_object()(p_right, (*v_leftmost)->point()) !=
+           LARGER))
+      {
+        // The right point of the overlappinf curve is to the left of the
+        // current rightmost vertex in out_d, so we skip it and continue
+        // examining the next intersections.
+        // However, we update the last intersection point observed.
+        is_in_x_range = false;
+      }
+      
+      if (is_in_x_range && v_exists && has_left) {
+        Comparison_result res =
+          traits->compare_xy_2_object()(p_left, v->point());
+        
+        // v is an intersection points, so both curves are equal there:
+        if (res == EQUAL)
+          equal_at_v = true;
+        
+        // We passed the next vertex, so we can stop here.
+        if (res == LARGER)
+          break;
+      }
+      
+      // There is an overlap between the range [u, v] and intersection_curve.
+      if (is_in_x_range && has_left && 
+          (! v_leftmost ||
+           (traits->compare_xy_2_object()(p_left, (*v_leftmost)->point()) ==
+            LARGER)))
+      {
+        // Create an output edge that represent the portion of [u, v] to the
+        // left of the overlapping curve.
+        CGAL_assertion(current_res != EQUAL);
+
+        Vertex_handle new_v = (current_res == SMALLER) ?
+          _append_vertex(out_d, p_left, e1) :
+          _append_vertex(out_d, p_left, e2);
+        
+        // if we are at v, then this is a special case that is handled after
+        // the loop. We need to add the curves from the original vertices.
+        if (equal_at_v == false) {
+          // Note that the new vertex is incident to all curves in e1 and
+          // in e2.
+          new_v->add_curves(e1->curves_begin(), e1->curves_end());
+          new_v->add_curves(e2->curves_begin(), e2->curves_end());
+        }
+        
+        // Update the handle to the rightmost vertex in the output diagram.
+        v_leftmost = new_v;
+      }
+      
+      if (is_in_x_range && has_right &&
+          (! v_exists ||
+           (traits->compare_xy_2_object()(p_right, v->point()) == SMALLER)))
+      {
+        // Create an edge that represents the overlapping curve.
+        Vertex_handle new_v = _append_vertex(out_d, p_right, e1);
+        new_v->left()->add_curves(e2->curves_begin(), e2->curves_end());
+        
+        // We are not at v becuase p_right is smaller than v.
+        // The special case that we are at v is handled in the next
+        // condition.
+        // If we were at v, then this was a special case that is handled
+        // later.
+        CGAL_assertion(equal_at_v == false);
+        new_v->add_curves(e1->curves_begin(), e1->curves_end());
+        new_v->add_curves(e2->curves_begin(), e2->curves_end());
+        
+        // Update the handle to the rightmost vertex in the output diagram.
+        v_leftmost = new_v;
+      }
+      
+      if (has_right == false || 
+          (v_exists && traits->compare_xy_2_object()(p_right, v->point()) !=
+           SMALLER))
+      {
+        // The overlapping curves reaches v.
+        if (v_exists) {
+          Vertex_handle new_v = _append_vertex(out_d, v->point(), e1);
+          new_v->left()->add_curves(e2->curves_begin(), e2->curves_end());
+        }
+        
+        equal_at_v = true;
+        current_res = EQUAL;
+        break;
+      }
+
+      // We arrive here only if we are not at v and the overlap has a right
+      // endpoint.
+      // Compare the curves to the right of p_right.
+      current_res =
+        traits->compare_y_at_x_right_2_object()(e1->curve(), e2->curve(),
+                                                p_right);
+      // Flip the result in case of an upper envelope.
+      if (env_type == UPPER)
+        current_res = CGAL::opposite (current_res);
+      
+    }
+  } // End of the traversal over the intersection objects.
+
+
+  // Handle the portion after the intersection objects.
+  if (equal_at_v) {
+    CGAL_assertion (v_exists);
+
+    // v_leftmost should be our vertex at v.
+    // In this case the two curves intersect (or overlap) at v.
+    // We need to add the correct curves to v_leftmost.
+
+    Vertex_handle v_to_be_updated = out_d.rightmost()->left();
+
+    if (origin_of_v == EQUAL) {
+      // If the vertices of the edge are the same, we have to get the 
+      // curves from there:
+      v_to_be_updated->add_curves(e1->right()->curves_begin(), 
+                                  e1->right()->curves_end());
+      v_to_be_updated->add_curves(e2->right()->curves_begin(), 
+                                  e2->right()->curves_end());
+    }
+    else {
+      // We add the curves from the original vertex and from the edge of the
+      // other diagram.
+      Edge_const_handle e = (origin_of_v == SMALLER) ? e2 : e1;
+
+      v_to_be_updated->add_curves (v->curves_begin(), v->curves_end());
+      v_to_be_updated->add_curves (e->curves_begin(), e->curves_end());
+    }
+    
+    return;
+  }
+  
+  if (! v_exists) {
+    // Both edges are unbounded from the right, so we simply have
+    // to update the rightmost edge in out_d.
+    switch (current_res)
+    {
+    case SMALLER:
+      out_d.rightmost()->add_curves(e1->curves_begin(), e1->curves_end());
+      return;
+    case LARGER:
+      out_d.rightmost()->add_curves(e2->curves_begin(), e2->curves_end());
+      return;
+    case EQUAL:
+      out_d.rightmost()->add_curves(e1->curves_begin(), e1->curves_end());
+      out_d.rightmost()->add_curves(e2->curves_begin(), e2->curves_end());
+      return;
+    default:
+      CGAL_error_msg("should not reach here.");
+      return;
+    }
+  }
+
+  // origin_of_v could be EQUAL but the curves do not intersect.
+  // This is because of the fact that v could be the endpoint of the NEXT
+  // curve (which is lower than the currrent curve. The second diagram, however,
+  // has a curve that ends at v.
+  // For example:
+  // First diagram is the segment: [(0, -1), (1, 0)]
+  // Second diagram of the two segments: [(0, 0), (1, 1)], [(1, 0), (2, 1)]
+  
+  // Check if we need to insert v into the diagram.
+  if (current_res == SMALLER) {    
+    // The final part of the interval is taken from e1.
+    Vertex_handle        new_v;
+
+    if (origin_of_v == SMALLER) {
+      // In case v is also from e1, append it to the merged diagram.
+      new_v = _append_vertex(out_d, v->point(), e1);
+      new_v->add_curves(v->curves_begin(), v->curves_end());
+    }
+    else {
+      // if origin_of_v is EQUAL then the two diagram have a vertex at
+      // exact same place.
+      if (origin_of_v == EQUAL) {
+        new_v = _append_vertex(out_d, v->point(), e1);
+        new_v->add_curves(v->curves_begin(), v->curves_end());
+        
+        // adding the curves of the vertex of the first diagram (vertices are
+        // equal...)
+        new_v->add_curves(e1->right()->curves_begin(), 
+                          e1->right()->curves_end());
+      }
+      else {
+        // If v is from e2, check if it below (or above, in case of an upper
+        // envelope) cv1 to insert it.
+        const Comparison_result  res = 
+          traits->compare_y_at_x_2_object()(v->point(), e1->curve());
+        
+        if (res == EQUAL ||
+            ((env_type == LOWER) && (res == SMALLER)) ||
+            ((env_type == UPPER) && (res == LARGER)))
+          {
+            new_v = _append_vertex(out_d, v->point(), e1);
+            new_v->add_curves(v->curves_begin(), v->curves_end());
+            
+            if (res == EQUAL)
+              new_v->add_curves(e1->curves_begin(), e1->curves_end());
+          }
+      }
+    }
+  }
+  else {
+    // The final part of the interval is taken from e2.
+    Vertex_handle        new_v;
+
+    if (origin_of_v != SMALLER) {
+      // In case v is also from e2, append it to the merged diagram.
+      new_v = _append_vertex(out_d, v->point(), e2);
+      new_v->add_curves(v->curves_begin(), v->curves_end());
+      
+      // if origin_of_v is EQUAL then the two diagram have a vertex at
+      // exact same place.
+      if (origin_of_v == EQUAL) {
+        // adding the curves of the vertex of the first diagram (vertices are
+        // equal...)
+        new_v->add_curves(e1->right()->curves_begin(),
+                          e1->right()->curves_end());
+      }
+    }
+    else {
+      // If v is from e1, check if it below (or above, in case of an upper
+      // envelope) cv2 to insert it.
+      const Comparison_result  res = 
+        traits->compare_y_at_x_2_object()(v->point(), e2->curve());
+      
+      if (res == EQUAL ||
+          ((env_type == LOWER) && (res == SMALLER)) ||
+          ((env_type == UPPER) && (res == LARGER)))
+      {
+        new_v = _append_vertex(out_d, v->point(), e2);
+        new_v->add_curves(v->curves_begin(), v->curves_end());
+        
+        if (res == EQUAL)
+          new_v->add_curves(e2->curves_begin(), e2->curves_end());
+      }
+    }
+  }
+
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Append a vertex to the given diagram.
+//
+template <class Traits, class Diagram>
+typename Envelope_divide_and_conquer_2<Traits,Diagram>::Vertex_handle
+Envelope_divide_and_conquer_2<Traits,Diagram>::
+_append_vertex(Envelope_diagram_1& diag,
+               const Point_2& p, Edge_const_handle e)
+{
+  // Create the new vertex and the new edge.
+  Vertex_handle   new_v = diag.new_vertex(p);
+  Edge_handle     new_e = diag.new_edge();
+  
+  if (! e->is_empty())
+    new_e->add_curves(e->curves_begin(), e->curves_end());
+  
+  // Connect the new vertex.
+  new_v->set_left(new_e);
+  new_v->set_right(diag.rightmost());
+  
+  if (diag.leftmost() != diag.rightmost()) {
+    // The diagram is not empty. Connect the new edge to the left of the
+    // rightmost edge of the diagram.
+    new_e->set_right(new_v);
+    new_e->set_left(diag.rightmost()->left());
+    diag.rightmost()->left()->set_right(new_e);
+    diag.rightmost()->set_left(new_v);
+  }
+  else {
+    // The diagram is empty: Make the new edge the leftmost.
+    new_e->set_right(new_v);
+    diag.set_leftmost(new_e);
+    diag.rightmost()->set_left(new_v);      
+  }
+  
+  return (new_v);
+}    
+
+// ---------------------------------------------------------------------------
+// Merge the vertical segments into the envelope given as a minimization
+// (or maximization) diagram.
+//
+template <class Traits, class Diagram>
+void Envelope_divide_and_conquer_2<Traits,Diagram>::
+_merge_vertical_segments(Curve_pointer_vector& vert_vec,
+                         Envelope_diagram_1& out_d)
+{
+  // Sort the vertical segments by their increasing x-coordinate.
+  Less_vertical_segment  les_vert(traits);
+
+  std::sort(vert_vec.begin(), vert_vec.end(), les_vert);
+
+  // Proceed on the diagram and on the sorted sequence of vertical segments
+  // and merge them into the diagram.
+  typename Traits_adaptor_2::Compare_x_2             comp_x =
+    traits->compare_x_2_object();
+  typename Traits_adaptor_2::Compare_xy_2            comp_xy =
+    traits->compare_xy_2_object();
+  typename Traits_adaptor_2::Compare_y_at_x_2        comp_y_at_x =
+    traits->compare_y_at_x_2_object();
+  typename Traits_adaptor_2::Construct_min_vertex_2  min_vertex =
+    traits->construct_min_vertex_2_object();
+  typename Traits_adaptor_2::Construct_max_vertex_2  max_vertex =
+    traits->construct_max_vertex_2_object();
+
+  Edge_handle             e = out_d.leftmost();
+  Vertex_handle           v = Vertex_handle();
+  Curve_pointer_iterator  iter = vert_vec.begin();
+  Curve_pointer_iterator  next;
+  Comparison_result       res;
+  bool                    in_e_range;
+  bool                    on_v;
+  Point_2                 p;
+
+  while (iter != vert_vec.end()) {
+    // Check if the current vertical segment is on the x-range of the current
+    // edge.
+    if (e != out_d.rightmost()) {
+      // The current edge is not the rightmost one: we compare the x-coordinate
+      // of the vertical segment to its right vertex.
+      v = e->right();
+
+      res = comp_x(min_vertex(**iter), v->point());
+      in_e_range = (res != LARGER);
+      on_v = (res == EQUAL);
+    }
+    else {
+      // This is the rightmost edge, so the vertical segment must lie on its
+      // x-range.
+      in_e_range = true;
+      on_v = false;
+    }
+    
+    // If the current vertical segment is not in the x-range of the current
+    // edge, we proceed to the next edge.
+    if (! in_e_range) {
+      e = v->right();
+      continue;
+    }
+
+    // Go over all vertical segments that share the same x-coordinate and
+    // find the one(s) with the smallest endpoint (or largest endpoint, if
+    // we construct an upper envelope). 
+    std::list<X_monotone_curve_2>    env_cvs;
+
+    env_cvs.push_back(**iter);
+    next = iter;
+    ++next;
+    while ((next != vert_vec.end()) &&
+           (comp_x(min_vertex(**iter), min_vertex(**next)) == EQUAL))
+    {
+      if (env_type == LOWER) {
+        // Compare the lower endpoints of both curves.
+        res = comp_xy(min_vertex(env_cvs.front()), min_vertex(**next));
+
+        // Update the list of vertical segments with minimal endpoints as
+        // necessary.
+        if (res == EQUAL) {
+          env_cvs.push_back(**next);
+        }
+        if (res == LARGER) {
+          env_cvs.clear();
+          env_cvs.push_back(**next);
+        }
+      }
+      else {
+        // Compare the upper endpoints of both curves.
+        res = comp_xy(max_vertex(env_cvs.front()), max_vertex(**next));
+
+        // Update the list of vertical segments with maximal endpoints as
+        // necessary.
+        if (res == EQUAL) {
+          env_cvs.push_back(**next);
+        }
+        if (res == SMALLER) {
+          env_cvs.clear();
+          env_cvs.push_back(**next);
+        }
+      }
+
+      ++next;
+    }
+
+    // Compare the endpoint to the diagram feature.
+    p = (env_type == LOWER) ?
+      min_vertex(env_cvs.front()) : max_vertex(env_cvs.front());
+
+    if (on_v) {
+      // Compare p to the current vertex.
+      res = comp_xy(p, v->point());
+
+      if (res == EQUAL) {
+        // Add curves to the current vertex.
+        v->add_curves(env_cvs.begin(), env_cvs.end());
+      }
+      else if ((env_type == LOWER && res == SMALLER) ||
+               (env_type == UPPER && res == LARGER))
+      {
+        // Replace the list of curves associated with the vertex.
+        v->clear_curves();
+        v->add_curves(env_cvs.begin(), env_cvs.end());
+      }
+    }
+    else
+    {
+      // p lies in the interior of the current edge.
+      Vertex_handle   new_v;
+
+      if (e->is_empty()) {
+        // Split the empty edge and associate the new vertex with the
+        // vertical segments.
+        new_v = _split_edge(out_d, p, e);
+        new_v->add_curves(env_cvs.begin(), env_cvs.end());
+      }
+      else {
+        // Compare p with the current curve.
+        res = comp_y_at_x(p, e->curve());
+        
+        if (((env_type == LOWER) && (res != LARGER)) ||
+            ((env_type == UPPER) && (res != SMALLER)))
+        {
+          new_v = _split_edge(out_d, p, e);
+          new_v->add_curves(env_cvs.begin(), env_cvs.end());
+
+          if (res == EQUAL)
+            new_v->add_curve(e->curve());
+        }
+      }
+    }
+
+    // Proceed to the next vertical segment with larger x-coordinate.
+    iter = next;
+  }
+
+  return;
+}
+
+// ---------------------------------------------------------------------------
+// Split a given diagram edge by inserting a vertex in its interior.
+//
+template <class Traits, class Diagram>
+typename Envelope_divide_and_conquer_2<Traits,Diagram>::Vertex_handle
+Envelope_divide_and_conquer_2<Traits,Diagram>::
+_split_edge(Envelope_diagram_1& diag, const Point_2& p, Edge_handle e)
+{
+  // Create the new vertex and the new edge.
+  Vertex_handle   new_v = diag.new_vertex(p);
+  Edge_handle     new_e = diag.new_edge();
+  
+  // Duplicate the curves container associated with e.
+  if (! e->is_empty())
+    new_e->add_curves(e->curves_begin(), e->curves_end());
+  
+  // Connect the new vertex between e and new_e.
+  new_v->set_left(e);
+  new_v->set_right(new_e);
+  
+  new_e->set_left(new_v);
+  if (e != diag.rightmost())
+    new_e->set_right(e->right());
+  else
+    diag.set_rightmost(new_e);
+
+  e->set_right(new_v);
+
+  // Return the new vertex.
+  return (new_v);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_base.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_element_visitor_3.h
new file mode 100644
index 0000000..19c67c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_element_visitor_3.h
@@ -0,0 +1,3220 @@
+// Copyright (c) 2005  Tel-viv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michal Meyerovitch     <gorgymic at post.tau.ac.il>
+//                 Baruch Zukerman        <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_ENVELOPE_ELEMENT_VISITOR_3_H
+#define CGAL_ENVELOPE_ELEMENT_VISITOR_3_H
+
+#include <CGAL/Object.h>
+#include <CGAL/enum.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Arr_tags.h>
+#include <CGAL/Arr_observer.h>
+#include <CGAL/Arr_accessor.h>
+#include <CGAL/Arr_walk_along_line_point_location.h>
+#include <CGAL/Arr_naive_point_location.h>
+#include <CGAL/utility.h>
+#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
+
+#include <vector>
+#include <algorithm>
+#include <iostream>
+#include <deque>
+
+namespace CGAL {
+
+// Return the comparison result of the halfedge's source and target vertices.
+#ifndef HE_COMP_RES
+#define HE_COMP_RES(he) (((he)->direction() == ARR_LEFT_TO_RIGHT) ? SMALLER : LARGER)
+#endif
+
+// this class does the resolving of edge and face in the divide & conquer
+// algorithm it should handle all faces (it supports holes in the face)
+
+template <class EnvelopeTraits_3, class MinimizationDiagram_2>
+class Envelope_element_visitor_3
+{
+public:
+  typedef EnvelopeTraits_3                             Traits;
+  typedef typename Traits::Multiplicity                Multiplicity;
+  typedef typename Traits::Surface_3                   Surface_3;
+  typedef typename Traits::Xy_monotone_surface_3       Xy_monotone_surface_3;
+  typedef typename Traits::Equal_2                     Equal_2;
+
+  typedef MinimizationDiagram_2                        Minimization_diagram_2;
+  typedef typename Traits::Point_2                     Point_2;
+  typedef typename Traits::X_monotone_curve_2          X_monotone_curve_2;
+  typedef typename Minimization_diagram_2::Are_all_sides_oblivious_category
+    Are_all_sides_oblivious_category;
+
+protected:
+  class Copied_face_zone_visitor;
+
+  typedef Envelope_element_visitor_3<Traits, Minimization_diagram_2> Self;
+  typedef typename Minimization_diagram_2::Halfedge_const_handle
+                                                        Halfedge_const_handle;
+  typedef typename Minimization_diagram_2::Halfedge_const_iterator
+                                                        Halfedge_const_iterator;
+  typedef typename Minimization_diagram_2::Halfedge_handle
+                                                        Halfedge_handle;
+  typedef typename Minimization_diagram_2::Halfedge_iterator
+                                                        Halfedge_iterator;
+  typedef typename Minimization_diagram_2::Face_const_handle
+                                                        Face_const_handle;
+  typedef typename Minimization_diagram_2::Face_handle
+                                                        Face_handle;
+  typedef typename Minimization_diagram_2::Face_iterator
+                                                        Face_iterator;
+  typedef typename Minimization_diagram_2::Vertex_const_handle
+                                                        Vertex_const_handle;
+  typedef typename Minimization_diagram_2::Vertex_handle
+                                                        Vertex_handle;
+  typedef typename Minimization_diagram_2::Vertex_iterator
+                                                        Vertex_iterator;
+  typedef typename Minimization_diagram_2::Ccb_halfedge_circulator
+    Ccb_halfedge_circulator;
+  typedef typename Minimization_diagram_2::Inner_ccb_iterator
+                                                        Inner_ccb_iterator;
+  typedef typename Minimization_diagram_2::Outer_ccb_iterator
+                                                        Outer_ccb_iterator;
+  typedef typename Minimization_diagram_2::Isolated_vertex_iterator
+    Isolated_vertex_iterator;
+  typedef typename Minimization_diagram_2::Topology_traits
+                                                        Topology_traits;
+  typedef typename Minimization_diagram_2::Dcel         Dcel;
+  typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
+                                                        Envelope_data_iterator;
+
+  typedef Arr_observer<Minimization_diagram_2>          Md_observer;
+  typedef Arr_accessor<Minimization_diagram_2>          Md_accessor;
+  
+  typedef typename Topology_traits::Default_point_location_strategy 
+    Md_point_location;
+  typedef typename Topology_traits::Zone_insertion_visitor
+    Md_insert_zone_visitor;
+  
+  typedef std::list<Halfedge_handle>                    Halfedges_list;
+  typedef typename std::list<Halfedge_handle>::iterator Halfedges_list_iterator;
+
+  typedef std::pair<Halfedge_handle, Multiplicity>      Halfedge_w_type;
+  typedef std::list<Halfedge_w_type>                    Halfedges_w_type_list;
+
+  typedef std::list<Vertex_handle>                      Vertices_list;
+  typedef typename std::list<Vertex_handle>::iterator   Vertices_list_iterator;
+
+  typedef std::list<Face_handle>                        Faces_list;
+  typedef typename std::list<Face_handle>::iterator     Faces_list_iterator;
+
+  typedef Unique_hash_map<Vertex_handle, bool>          Vertices_hash;
+  typedef Unique_hash_map<Halfedge_handle, bool>        Halfedges_hash;
+  typedef Unique_hash_map<Halfedge_handle, Multiplicity>
+                                                        Halfedges_hash_w_type;
+  typedef Unique_hash_map<Face_handle, bool>            Faces_hash;
+
+  typedef Unique_hash_map<Vertex_handle, Vertex_handle> Vertices_map;
+  typedef Unique_hash_map<Halfedge_handle, Halfedge_handle>
+                                                        Halfedges_map;
+  typedef Unique_hash_map<Face_handle, Face_handle>     Faces_map;
+
+  typedef Unique_hash_map<Vertex_handle, Halfedge_handle>
+                                                        Vertices_to_edges_map;
+  
+  typedef std::pair<X_monotone_curve_2, Multiplicity>   Intersection_curve;
+  typedef std::list<Object>                             Intersections_list;
+
+  // this is used in the resolve edge process
+  typedef Triple<Point_2, bool, bool>                   Point_2_with_info;
+  struct Points_compare
+  {
+  protected:
+    const Traits* p_traits;
+
+  public:
+    // Constructor
+    Points_compare(const Traits& geom_traits) : p_traits(&geom_traits) {}
+
+    bool operator()(const Point_2_with_info& p1,
+                     const Point_2_with_info& p2) const
+    {
+      // The original code seemed to presume that two Points are never equal
+      // This is not true, there are various counter examples. 
+      // e.g the intersection of surf1 and surf2 may have ending edge and 
+      // a starting edge on the to be resolved edge 
+      return 
+        p_traits->compare_xy_2_object()(p1.first, p2.first) == SMALLER;  
+    }
+  };
+  
+public:
+  // c'tor
+  Envelope_element_visitor_3(Envelope_type t = ENVELOPE_LOWER)
+  {
+    // Allocate the traits.
+    m_traits = new Traits;
+    own_traits = true;
+    type  = t;
+  }
+
+  Envelope_element_visitor_3(const Traits* tr,
+                             Envelope_type t = ENVELOPE_LOWER)
+  {
+    // Set the traits.
+    m_traits = tr;
+    own_traits = false;
+    type  = t;
+  }
+
+  // virtual destructor.
+  virtual ~Envelope_element_visitor_3()
+  {
+    // Free the traits object, if necessary.
+    if (own_traits)
+      delete m_traits;
+  }
+
+  // get a face with 2 surfaces defined over it, and compute the arrangement
+  // of the/ envelope of these surfaces over the face
+  void resolve(Face_handle face, Minimization_diagram_2& result)
+  {
+    CGAL_assertion(face->get_aux_is_set(0));
+    CGAL_assertion(face->get_aux_is_set(1));
+    
+    // we are interested with the envelope's shape over the current face,
+    // so we only need to check the first surface from each group, since
+    // all the surfaces in a group overlap over the current face.
+    const Xy_monotone_surface_3& surf1 = get_aux_surface(face, 0);
+    const Xy_monotone_surface_3& surf2 = get_aux_surface(face, 1);
+
+    // find the projected intersections of the surfaces. if none - we have
+    // a simple case:
+    // need only resolve non-intersecting and return
+    std::list<Object> inter_objs;
+    get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs));
+
+    if (inter_objs.size() == 0)
+    {
+      // here for resolve we can compare the surfaces over the edges only
+      // (no need for left/right versions)
+      Comparison_result cur_res = resolve_minimal_face(face);
+      copy_data_by_comparison_result(face, face, cur_res);
+      // check face boundary for "data from face" features
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      copy_data_to_face_boundary(face);
+#endif
+      return;
+    }
+    
+    // we insert all projected intersections into a temporary arrangement,
+    // with only the current face's curves, to find the arrangement of the
+    // lower envelope of the 2 surfaces over the current face
+    Minimization_diagram_2 copied_face_arr(m_traits);
+
+    // here we maintain a mapping between edges in the copied arrangement and
+    // their original generating edge from result
+    Halfedges_map map_copied_to_orig_halfedges;
+    // here we maintain a mapping between vertices in the copied arrangement
+    // and their original generating vertex from result
+    Vertices_map  map_copied_to_orig_vertices;
+    // here we maintain a mapping between faces in the copied arrangement and
+    // their corresponding face from result
+    Faces_map     map_copied_to_orig_faces;
+
+    // now, insert the face's boundary into the temporary minimization diagram
+    // the face is assumed to have outer boundary, and may also have holes,
+    // and isolated vertices
+    // we need to keep track of the original halfedges in the inserted halfedges
+    // we also need to have the face handle of the copied face in
+    // copied_face_arr
+    Face_handle copied_face = copy_face(face, result, copied_face_arr,
+                                        map_copied_to_orig_halfedges,
+                                        map_copied_to_orig_vertices);
+    CGAL_assertion(copied_face_arr.is_valid());
+    map_copied_to_orig_faces[copied_face] = face;
+    
+    
+    // insert the projected intersections into the temporary minimization diagram
+    Point_2 point;
+    Intersection_curve curve;
+    Object cur_obj;
+    
+    // we use our zone visitor, which only inserts into the arrangement the
+    // points and curves which are inside the copied face
+    // it updates the result arrangement at the same time (action after action
+    // using observer to the copied arrangement and accessor to result)
+    // the visitor is responsible for updating:
+    // 1. the collection of special edges. (these are (parts of) edges of the
+
+    //    original face's boundary that overlap with projected intersections
+    Halfedges_list result_special_edges;
+    // 2. the collection of newly added edges, each with the type of the
+    //    projected intersection that created it.
+    Halfedges_w_type_list result_new_edges;
+    // 3. the collection of faces that form the face before any insertion
+    Faces_list     result_face_parts;
+    // 4. the collection of special vertices, which contains:
+    //    - new vertices that were created inside the original face
+    //      (both isolated and not isolated)
+    //    - new vertices created by a split of a boundary edge which has
+    //      the property "data from face"
+    //    - original vertices of the boundary that consolidate with projected
+    //      intersections, and have common aux data with the face
+    //    all these vertices should have their data set as "EQUAL"
+    Vertices_list  result_special_vertices;
+
+    New_faces_observer new_faces_obs(result);    
+    Copied_face_zone_visitor zone_visitor(result,
+                                          copied_face_arr,
+                                          face,
+                                          copied_face,
+                                          map_copied_to_orig_halfedges,
+                                          map_copied_to_orig_vertices,
+                                          map_copied_to_orig_faces,
+                                          result_special_edges,
+                                          result_new_edges,
+                                          result_face_parts,
+                                          result_special_vertices,
+                                          this);
+
+    Md_point_location pl(copied_face_arr);
+    std::list<Object>::iterator inter_objs_it = inter_objs.begin();
+    for (; inter_objs_it != inter_objs.end(); ++inter_objs_it)
+    {
+      cur_obj = *inter_objs_it;
+      CGAL_assertion(!cur_obj.is_empty());
+      if (assign(point, cur_obj))
+      {
+        // intersection can be a point when the surfaces only touch each other.
+        // we are only interested in the points that are inside the face or
+        // on its boundary.
+        // we insert the point into the planar map as a vertex, with both
+        // surfaces over it.
+        // should use observer for split_edge
+        // if not in a sub-face of "face", shouldn't insert it
+        // the above information is available in zone_visitor
+        insert_point(copied_face_arr, point, pl, zone_visitor);
+      }
+      else if (assign(curve, cur_obj))
+      {
+        zone_visitor.set_current_intersection_type(curve.second);
+        insert(copied_face_arr, curve.first, pl, zone_visitor);
+        CGAL_assertion(copied_face_arr.is_valid());
+        CGAL_assertion(result.is_valid());
+      }
+      else
+        CGAL_error_msg( "wrong projected intersection type");
+    }
+
+    zone_visitor.finish();
+
+    // now determine the envelope data in result over the new faces
+    
+    // in order to use resolve_minimal_face with intersection halfedge, we
+    // go over the new edges, and set data over their faces
+    typename Halfedges_w_type_list::iterator new_edge_it;
+    for (new_edge_it = result_new_edges.begin();
+         new_edge_it != result_new_edges.end(); ++new_edge_it)
+    {
+      Halfedge_handle new_he = (*new_edge_it).first;
+      Halfedge_handle new_he_twin = new_he->twin();
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      Multiplicity itype = (*new_edge_it).second;
+#endif
+      // set sources of the new edge
+      new_he->set_aux_source(0, face->get_aux_source(0));
+      new_he->set_aux_source(1, face->get_aux_source(1));
+      new_he_twin->set_aux_source(0, face->get_aux_source(0));
+      new_he_twin->set_aux_source(1, face->get_aux_source(1));
+
+      // set data on new edges
+      new_he->set_decision(EQUAL);
+      new_he_twin->set_decision(EQUAL);
+      
+      // set data on the faces
+      // could be that the data is set for f2, and can use itype to conclude
+      // to f1, not only the opposite
+      Face_handle f1 = new_he->face(), f2 = new_he_twin->face();
+      Comparison_result res;
+      if (!f1->is_decision_set() && !f2->is_decision_set())
+      {
+        res = resolve_minimal_face(f1, &new_he);
+        copy_data_by_comparison_result(face, f1, res);
+      }
+
+      // now at least one of the faces f1,f2 has its decision set.      
+
+      // if the other face doesn't have its data, we resolve it using
+      // the former result and the intersection type (if exists)
+      if (!f2->is_decision_set())
+      {
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+        if (itype != 0)
+        {
+          res = convert_decision_to_comparison_result(f1->get_decision());
+          res = resolve_by_intersection_type(res, itype);
+          CGAL_expensive_assertion_code
+            (Comparison_result tmp_res =
+             resolve_minimal_face(f2, &new_he_twin););
+          CGAL_expensive_assertion(tmp_res == res);
+        }
+        else
+          res = resolve_minimal_face(f2, &new_he_twin);
+#else
+        res = resolve_minimal_face(f2, &new_he_twin);
+#endif
+        copy_data_by_comparison_result(face, f2, res);
+      }
+      if (!f1->is_decision_set())
+      {
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+        if (itype != 0)
+        {
+          res = convert_decision_to_comparison_result(f2->get_decision());
+          res = resolve_by_intersection_type(res, itype);
+          CGAL_expensive_assertion_code
+            (Comparison_result tmp_res = resolve_minimal_face(f1, &new_he));
+          CGAL_expensive_assertion(tmp_res == res);
+        }
+        else
+          res = resolve_minimal_face(f1, &new_he);
+#else
+        res = resolve_minimal_face(f1, &new_he);
+#endif
+        copy_data_by_comparison_result(face, f1, res);
+      }
+    }
+    
+    // we also need to check the faces incident to the halfedges in
+    // special_edges since the envelope data over them should be computed
+    // using compare_left/right versions
+    Halfedges_list_iterator special_edge_it;
+    for (special_edge_it = result_special_edges.begin();
+         special_edge_it != result_special_edges.end(); ++special_edge_it)
+    {
+      // we assume that the halfedge given points to the correct face
+      // (which is inside the original face)
+      Halfedge_handle special_he = *special_edge_it;
+      Face_handle f = special_he->face();
+      if (!f->is_decision_set())
+      {
+        Comparison_result res = resolve_minimal_face(f, &special_he);
+        copy_data_by_comparison_result(face, f, res);      
+      }
+
+      // take care for the edge, if necessary
+      if (!special_he->is_decision_set() &&
+          can_copy_decision_from_face_to_edge(special_he))
+      {
+        // if (!special_he->get_aux_is_set(0) || !special_he->get_aux_is_set(1))
+        // {
+        // // this can only happen when the edge is fake, since the edge is on 
+        //// the face's boundary
+        //      CGAL_assertion(special_he->get_is_fake());
+        //      special_he->set_aux_source(0, face->get_aux_source(0));
+        //      special_he->set_aux_source(1, face->get_aux_source(1));
+        //      special_he->twin()->set_aux_source(0, face->get_aux_source(0));
+        //      special_he->twin()->set_aux_source(1, face->get_aux_source(1));
+        //   }
+      	//if (special_he->get_is_fake())
+      	//{
+      	//  // this edge is not fake anymore, as it coincides with a projected
+      	//  // intersection
+      	//  special_he->set_is_fake(false);
+      	//  special_he->twin()->set_is_fake(false);
+        // }
+        special_he->set_decision(EQUAL);
+        special_he->twin()->set_decision(EQUAL);
+      }
+    }
+
+    // update data on special vertices
+    Vertices_list_iterator special_vertex_it;
+    for (special_vertex_it = result_special_vertices.begin();
+         special_vertex_it != result_special_vertices.end(); ++special_vertex_it)
+    {
+      Vertex_handle special_v = *special_vertex_it;
+      if (!special_v->is_decision_set())
+      {
+      
+        if (special_v->get_aux_is_set(0) && special_v->get_aux_is_set(1))
+          set_data_by_comparison_result(special_v, EQUAL);
+        else
+          // this is a new vertex inside the face, so we need to update its
+          // aux source information from face also (done in method)
+          copy_all_data_to_vertex(face, special_v);
+      } else
+        CGAL_assertion(special_v->get_aux_is_set(0) &&  \
+                       special_v->get_aux_is_set(1));
+    }
+    
+    // assert all new faces got data set, if not, then maybe no curve cuts
+    // the face, and should use regular resolve_minimal_face
+    typename std::list<Face_handle>::iterator new_face_it;
+    for (new_face_it = result_face_parts.begin();
+         new_face_it != result_face_parts.end(); ++new_face_it)
+    {
+      Face_handle new_face = *new_face_it;
+      if (!new_face->is_decision_set())
+      {
+        Comparison_result res = resolve_minimal_face(new_face);
+        copy_data_by_comparison_result(face, new_face, res);
+      }
+
+      // check face boundary for "data from face" features
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      copy_data_to_face_boundary(new_face);
+#endif
+    }
+  }    
+
+  // get an edge with 2 surfaces defined over it, and split it to get the shape
+  // of the envelope of these surfaces over the edge
+  void resolve(Halfedge_handle edge, Minimization_diagram_2& result)
+  {
+    const Xy_monotone_surface_3& surf1 = get_aux_surface(edge, 0);
+    const Xy_monotone_surface_3& surf2 = get_aux_surface(edge, 1);
+
+    // find the projected intersections
+    std::list<Object> inter_objs;
+    get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs));
+
+    if (inter_objs.size() == 0)
+    {
+      resolve_minimal_edge(edge, edge);
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      copy_data_to_edge_endpoints(edge);
+#endif
+      return;
+    }
+
+    const X_monotone_curve_2& original_cv = edge->curve();
+    
+    // we want to work on the halfedge going from left to right
+    // we use HE_COMP_RES so this code can compile both with Arr_2
+    // and with Aos_2.
+    if (HE_COMP_RES(edge) != SMALLER)
+      edge = edge->twin();
+      
+    Vertex_handle original_src = edge->source();
+    Vertex_handle original_trg = edge->target();
+    
+    // we should have a list of points where we should split the edge's curve
+    // we then will sort the list, and split the curve
+
+    // we should pay a special attension for overlaps, since we can get special
+    // edges
+
+    // we associate with every point 2 flags:
+    // 1. is the point a left endpoint of an overlapping segment
+    // 2. is the point a right endpoint of an overlapping segment
+    typedef std::vector<Point_2_with_info>      Points_vec;
+    Points_vec                                  split_points;
+    bool is_min_end_at_inf = false;
+    bool is_max_end_at_inf = false;
+
+    Point_2 point;
+    Intersection_curve icurve;
+    Object cur_obj;
+
+    std::list<Object>::iterator inter_objs_it = inter_objs.begin();
+    for (; inter_objs_it != inter_objs.end(); ++inter_objs_it)
+    {
+      cur_obj = *inter_objs_it; 
+      CGAL_assertion(!cur_obj.is_empty());
+      if (assign(point, cur_obj))
+      {
+        // if the point is on the curve, should add it the the split points
+        // list, otherwise, it is irrelevant and should be ignored
+        if (is_point_on_curve(point, original_cv))
+          split_points.push_back(Point_2_with_info(point, false, false));
+      }
+      else if (assign(icurve, cur_obj))
+      {
+        const X_monotone_curve_2& x_curve = icurve.first;
+
+        // find the intersection points and overlapping segments with the
+        // original curve and insert them to the list of split points
+        // intersect the x-monotone curve with the edge's curve
+        typedef std::pair<Point_2, unsigned int> Intersect_point_2;
+        std::list<Object> intersections_list;
+        const Intersect_point_2* ip;
+        const X_monotone_curve_2* icv;
+        
+        m_traits->intersect_2_object()(x_curve, original_cv,
+                                       std::back_inserter(intersections_list));
+
+        std::list<Object>::iterator inter_it = intersections_list.begin();
+        for (; inter_it != intersections_list.end(); ++inter_it)
+        {
+          ip = object_cast<Intersect_point_2>(&(*inter_it));
+          if (ip != NULL)
+          {
+            split_points.push_back(Point_2_with_info(ip->first, false, false));
+          }
+          else
+          {
+            icv = object_cast<X_monotone_curve_2>(&(*inter_it));
+            CGAL_assertion(icv != NULL);
+
+            // we will add the *icv end points to the split_points, unless
+            // but we should be carefull with infinite curves.
+            Arr_traits_adaptor_2<Traits> tr_adaptor(*m_traits);
+            if (tr_adaptor.parameter_space_in_y_2_object()
+                (*icv, ARR_MIN_END) == ARR_INTERIOR &&
+                tr_adaptor.parameter_space_in_x_2_object()
+                (*icv, ARR_MIN_END) == ARR_INTERIOR)
+              split_points.push_back
+                (Point_2_with_info
+                 (m_traits->construct_min_vertex_2_object()(*icv),
+                  true, false));
+            else
+              is_min_end_at_inf = true;
+
+            if (tr_adaptor.parameter_space_in_y_2_object()
+                (*icv, ARR_MAX_END) == ARR_INTERIOR &&
+                tr_adaptor.parameter_space_in_x_2_object()
+                (*icv, ARR_MAX_END) == ARR_INTERIOR)
+              split_points.push_back
+                (Point_2_with_info(m_traits->construct_max_vertex_2_object()
+                                   (*icv),
+                                   false, true));
+            else
+              is_max_end_at_inf = true;
+          }
+        }       
+      }
+     
+      else
+        CGAL_error_msg( "wrong projected intersection type");
+    }
+    
+    // if there aren't any split points, we can finish
+    if (split_points.empty())
+    {
+      resolve_minimal_edge(edge, edge);
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      copy_data_to_edge_endpoints(edge);
+#endif
+      return;
+    }
+   
+    // sort the split points from left to right
+    // and split the original edge in these points
+    Points_compare comp(*m_traits);
+    std::sort(split_points.begin(), split_points.end(), comp);
+ 
+    // if overlaps > 0 it will indicate that we are inside an overlapping
+    // segment meaning, we have a special edge
+    int overlaps = 0;    
+
+    // check if source is a special vertex (i.e. also a projected intersection)
+    // by checking the first point in the list
+    bool source_is_special = false;
+    CGAL_assertion(split_points.size() >= 1);
+    if ((!original_src->is_at_open_boundary() && 
+         m_traits->equal_2_object()(split_points[0].first,
+                                    original_src->point())) ||
+        (original_src->is_at_open_boundary() && is_min_end_at_inf))
+    {
+      source_is_special = true;
+      if (split_points.front().third == true)
+        overlaps++;
+    }
+    
+    // check if target is a special vertex, by checking the last point in
+    // the list
+    bool target_is_special = false;
+    if ((!original_trg->is_at_open_boundary() && 
+         m_traits->equal_2_object()(split_points[split_points.size()-1].first, 
+                                    original_trg->point())) ||
+        (original_trg->is_at_open_boundary() && is_max_end_at_inf))
+      target_is_special = true;
+
+    
+
+    // remember the envelope decision over the first & last parts, to
+    // be able to copy it to the original endpoints
+    // TODO: the initial value is only needed to shut up the compiler
+    // TODO: is this realy needed, or we can use the decision made on "edge"
+    // (is "edge" always the first part? )
+    Comparison_result first_part_res = EQUAL;
+    
+    // cur_part is the part of the original edge that might be split
+    Halfedge_handle cur_part = edge;
+
+    for (unsigned int i = 0; i < split_points.size(); ++i)
+    {
+      Point_2_with_info cur_p = split_points[i];
+      // if we get to the target vertex, we end the loop, since no more splits
+
+      // are needed
+      if (!original_trg->is_at_open_boundary() && 
+          m_traits->equal_2_object()(cur_p.first, original_trg->point()))
+        break;
+        
+      Vertex_handle cur_src_vertex = cur_part->source();
+
+      // check that the current split point is not already a vertex
+      if ((!cur_src_vertex->is_at_open_boundary() && 
+           !m_traits->equal_2_object()(cur_p.first, cur_src_vertex->point())) ||
+          cur_src_vertex->is_at_open_boundary())
+
+      {
+        // split the edge in this point
+        X_monotone_curve_2 a,b;
+
+        m_traits->split_2_object()(cur_part->curve(), cur_p.first, a, b);
+        // todo: can we use the internal split?
+        Halfedge_handle split_he = result.split_edge(cur_part, a, b);
+        // split always returns the halfedge with source = cur_part.source
+        CGAL_assertion(split_he->source() == cur_src_vertex);
+
+        // the new vertex is split_he->target(), we set envelope data on it
+        copy_all_data_to_vertex(edge, split_he->target());
+
+        // identify the part of the split edge that we are finished with
+        // (this is the one with cur_src_vertex),
+        // and the part that might be split again
+        Halfedge_handle finished_part = split_he;
+        cur_part = split_he->next();
+
+        // set the envelope data over the finished part
+        // if the finished part is a special edge, and no verticals are
+        // involved we can set both aux data on it. otherwise we should use
+        // the traits compare method.
+        Comparison_result finished_part_res;
+        if (overlaps > 0)
+          finished_part_res = EQUAL;
+        else
+          finished_part_res = resolve_minimal_edge(edge, finished_part);
+
+        finished_part->set_decision(finished_part_res);
+        finished_part->twin()->set_decision(finished_part_res);
+
+        if (finished_part == edge)
+          first_part_res = finished_part_res;
+      }
+
+      // check the overlaps indications
+      if (cur_p.second == true)
+        ++overlaps; // we start a new overlapping segment at this point
+      if (cur_p.third == true)
+        --overlaps; // we end an overlapping segment at this point
+              
+    }
+
+    // set envelope data on the last part (cur_part)
+    // if the last part is a special edge, and no verticals are involved
+    // we can set both aux data on it. otherwise we should use the traits
+    // compare method.
+
+    Comparison_result cur_part_res =
+      (overlaps > 0) ? EQUAL : resolve_minimal_edge(edge, cur_part);
+
+    cur_part->set_decision(cur_part_res);
+    cur_part->twin()->set_decision(cur_part_res);
+
+    if (cur_part == edge)
+      first_part_res = cur_part_res;
+      
+    // if the original source and target have same aux data as the edge
+    // we can set envelope data over them also
+    // if they are special vertices, we set both aux data. otherwise we copy
+    // from the incident edge part.
+
+
+    // the incident edge part to source should be edge (the first part)
+    CGAL_assertion(original_src == edge->source());
+    if (!original_src->is_decision_set() &&
+        can_copy_decision_from_edge_to_vertex(edge->twin()))
+    {
+      if (source_is_special)
+        set_data_by_comparison_result(original_src, EQUAL);
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      else
+        set_data_by_comparison_result(original_src, first_part_res);
+#endif
+
+    }
+    // the incident edge part to target should be cur_part (the last part)
+    CGAL_assertion(original_trg == cur_part->target());
+    if (!original_trg->is_decision_set() &&
+        can_copy_decision_from_edge_to_vertex(cur_part))
+    {
+      if (target_is_special)
+        set_data_by_comparison_result(original_trg, EQUAL);
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+      else
+        set_data_by_comparison_result(original_trg, cur_part_res);
+#endif
+    }
+
+  }
+  
+  // get a vertex with 2 surfaces defined over it and decide the envelope data
+  // on it between them
+  void resolve(Vertex_handle vertex)
+  {
+    // it is enough to compare only one surface from each group (because they
+    // all overlap over the vertex), but set all the group
+    const Xy_monotone_surface_3& surf1 = get_aux_surface(vertex, 0);
+    const Xy_monotone_surface_3& surf2 = get_aux_surface(vertex, 1);
+    const Point_2& point_2 = vertex->point();
+    Comparison_result cur_res =
+      compare_distance_to_envelope(point_2, surf1, surf2);
+    vertex->set_decision(cur_res);
+  }
+
+  /*! Access the traits object (const version). */
+  const Traits* traits() const { return (m_traits); }
+
+protected:
+
+  // The function locate p in arr, and calls the appropriate function in
+  // visitor.
+  Vertex_handle insert_point(Minimization_diagram_2& arr, const Point_2& p,
+                             const Md_point_location& pl, 
+                             Copied_face_zone_visitor& visitor)
+  {
+    const Face_const_handle* fh;
+    const Halfedge_const_handle* hh;
+    const Vertex_const_handle* vh;
+    Vertex_handle vh_for_p;
+
+    CGAL::Object obj = pl.locate(p);
+    visitor.init(&arr);
+  
+    if ((fh = object_cast<Face_const_handle>(&obj))
+        != NULL)
+    {
+      vh_for_p = visitor.found_point_in_face(p, arr.non_const_handle(*fh));
+    }
+    else if ((hh = object_cast<Halfedge_const_handle>(&obj)) != NULL)
+    {
+      vh_for_p = visitor.found_point_on_edge(p , arr.non_const_handle(*hh));
+    }
+    else
+    {
+      // In this case p lies on an existing vertex, so we just update this
+      // vertex.
+      vh = object_cast<Vertex_const_handle>(&obj);
+      CGAL_assertion(vh != NULL);
+      vh_for_p = visitor.found_point_on_vertex(p, arr.non_const_handle(*vh));
+    }
+
+    // Return a handle for the vertex associated with p.
+    return (vh_for_p);
+
+  }
+
+
+  // compute Comparison_result of surfaces over the face, assuming they get 
+  // the same answer for all points in face
+  // if we get a halfedge, it is assumed to be on the outer boundary of the 
+  // face, and its curve is assumed to be a projected intersection curve, 
+  // and we compare the surfaces to the left/right of it
+  // otherwise we compare the surfaces over an (arbitrary) edge of the face,
+  // assuming this is the correct answer for the face since the surfaces are 
+  // continous
+  // In either case, we try to copy decision from an incident face, is possible
+  // before asking the geometric question
+  Comparison_result resolve_minimal_face(Face_handle face, 
+                                         Halfedge_handle* he = NULL)
+  {
+    CGAL_precondition(he == NULL || (*he)->face() == face);
+    Comparison_result res = EQUAL;
+
+    bool success = false;
+#ifdef CGAL_ENVELOPE_SAVE_COMPARISONS
+    success = can_copy_decision_from_boundary_edge(face, res);
+#endif
+    
+    if (success)
+      return res;
+      
+    const Xy_monotone_surface_3& surf1 = get_aux_surface(face, 0);
+    const Xy_monotone_surface_3& surf2 = get_aux_surface(face, 1);
+
+    Ccb_halfedge_circulator hec;
+    if (he == NULL)
+    {
+      // compare the surfaces over arbitrary edge
+      bool found_edge = false;
+      Outer_ccb_iterator outer_ccb = face->outer_ccbs_begin();
+      for (; outer_ccb != face->outer_ccbs_end() && !found_edge; ++outer_ccb)
+      {
+        hec = *outer_ccb;
+        Ccb_halfedge_circulator curr = hec;
+        do
+        {
+          Halfedge_handle he = hec;
+          if(he->is_fictitious())
+            ++hec;
+          else
+          {
+            found_edge = true;
+            const X_monotone_curve_2& cv = hec->curve();
+            res = compare_distance_to_envelope(cv,surf1,surf2);
+
+            break;
+          }
+        }
+        while(curr != hec);
+      }
+
+      if(!found_edge)
+      {
+        // all edges are fictitous, we have two infinite surfaces.
+        // but still, there can be holes.
+        if(face->inner_ccbs_begin() != face->inner_ccbs_end())
+        {
+          Inner_ccb_iterator hit = face->inner_ccbs_begin();
+          hec = *hit;
+          CGAL_assertion(!hec->is_fictitious());
+          const X_monotone_curve_2& cv = hec->curve();
+          res = compare_distance_to_envelope(cv, surf1, surf2);
+        }
+        else
+        {
+          //two infinite surfaces, no outer boundary or holes. 
+          res =
+            compare_distance_to_envelope(surf1, surf2, 
+                                         Are_all_sides_oblivious_category());
+        }
+      }
+      
+      //assertion code begin
+      // check that result is equal on all edges
+      CGAL_assertion_code(Ccb_halfedge_circulator hec_begin = hec;
+                          ++hec;
+                          while (hec != hec_begin) {
+                            if(hec->is_fictitious()) {
+                              ++hec;
+                              continue;
+                            }
+                            Comparison_result tmp =
+                              compare_distance_to_envelope(hec->curve(),
+                                                           surf1, surf2);
+                            );
+      CGAL_assertion_msg(tmp == res, 
+                         "compare over curve returns non-consistent results");
+      CGAL_assertion_code(   ++hec;
+                          }
+                          );
+      //assertion code end
+      return res;
+    }
+    else
+    {
+      // compare the surfaces over the halfedge's curve
+      const X_monotone_curve_2& cv = (*he)->curve();
+
+      // a face is always to the left of its halfedge
+      // we use HE_COMP_RES so this code can compile both with Arr_2
+      // and with Aos_2.
+      if (HE_COMP_RES(*he) == SMALLER)
+      {
+        res = m_traits->compare_z_at_xy_above_3_object()(cv,surf1,surf2);
+        if(type == ENVELOPE_UPPER)
+          res = CGAL::opposite(res);
+      }
+      else
+      {
+        res = m_traits->compare_z_at_xy_below_3_object()(cv,surf1,surf2);
+        if(type == ENVELOPE_UPPER)
+          res = CGAL::opposite(res);
+
+      }
+    }
+    return res;
+  }
+
+  // use the Intersection type (Transversal/Tangent) and return the appropriate
+  // comparison result of the other side of the intersection curve, 
+  // if the first side has result "res"
+  Comparison_result resolve_by_intersection_type(Comparison_result res,
+                                                 Multiplicity itype)
+  {
+    itype %= 2;
+    if (itype == 1)
+    {
+      if (res == LARGER)
+        return SMALLER;
+      else if (res == SMALLER)
+        return LARGER;
+      else
+        return res;
+    }
+    else
+    {
+      CGAL_assertion(itype == 0);
+      return res;
+    }
+
+  }
+  
+  // find intersections between 2 xy-monotone surfaces
+  // use caching for repeating questions of same pair of surfaces
+  template <typename OutputIterator>
+  OutputIterator get_projected_intersections(const Xy_monotone_surface_3& s1,
+                                             const Xy_monotone_surface_3& s2,
+                                             OutputIterator o)
+  {
+    return m_traits->construct_projected_intersections_2_object()(s1, s2, o);
+  }
+
+  // Geometry can be a Point_2 or a X_monotone_curve_2
+  template <typename Geometry>
+  Comparison_result
+  compare_distance_to_envelope(Geometry& g,
+                               const Xy_monotone_surface_3& s1,
+                               const Xy_monotone_surface_3& s2)
+  {
+    Comparison_result res = m_traits->compare_z_at_xy_3_object()(g, s1, s2);
+    return ((type == ENVELOPE_LOWER) ? res : CGAL::opposite(res));
+  }
+  
+
+  // compare two infinite surfaces with no boundary or holes
+  Comparison_result
+  compare_distance_to_envelope(const Xy_monotone_surface_3& s1,
+                               const Xy_monotone_surface_3& s2,
+                               Arr_not_all_sides_oblivious_tag)
+  {
+    Comparison_result res = m_traits->compare_z_at_xy_3_object()(s1, s2);
+    return ((type == ENVELOPE_LOWER) ? res : CGAL::opposite(res));
+  }
+
+  // compare two infinite surfaces with no boundary or holes
+  Comparison_result compare_distance_to_envelope(const Xy_monotone_surface_3&,
+                                                 const Xy_monotone_surface_3&,
+                                                 Arr_all_sides_oblivious_tag)
+  {
+    CGAL_error(); // doesnt' suppose to reach here at all!!!
+    return SMALLER;
+  }
+
+  // helper method to get the surfaces we need to work on
+  template <typename FeatureHandle>
+  const Xy_monotone_surface_3& get_aux_surface(FeatureHandle fh,
+                                               unsigned int id)
+  {
+    const Object& o = fh->get_aux_source(id);
+    CGAL_assertion(!o.is_empty());
+    
+    // aux source of a face must be a face!
+    // aux source of a halfedge can be face or halfedge
+    // aux source of a vertex can be face, halfedge or vertex
+    // this is why we start with a check for a face, then halfedge
+    // and last vertex
+    Face_handle f;
+    if (assign(f, o)) 
+      return f->get_data();
+    
+    Halfedge_handle h;
+    if (assign(h, o))
+      return h->get_data();
+  	
+    Vertex_handle v;
+    CGAL_assertion_code(bool b =)
+      assign(v, o);
+    CGAL_assertion(b);
+    return v->get_data();
+  }
+                                  
+  bool can_copy_decision_from_face_to_edge(Halfedge_handle h)
+  {
+    // can copy decision from face to its incident edge if the aux
+    // envelopes are continous over the face and edge
+    return (h->get_has_equal_aux_data_in_face(0) &&
+            h->get_has_equal_aux_data_in_face(1));
+  }
+
+  bool can_copy_decision_from_edge_to_vertex(Halfedge_handle h)
+  {
+    // can copy decision from face to its incident edge if the aux
+    // envelopes are continous over the face and edge
+    return (h->get_has_equal_aux_data_in_target(0) &&
+            h->get_has_equal_aux_data_in_target(1));
+  }
+
+
+  // check the aux data on the edges & vertices of the boundary of the face,
+  // and if it equals the aux data on the face, copy it, to save calculations
+  // these features later
+  // also consider isolated vertices
+  // "res" is the decision made on the face
+  void copy_data_to_face_boundary(Face_handle face)
+  {
+    Ccb_halfedge_circulator ccb;
+
+    Outer_ccb_iterator outer_iter = face->outer_ccbs_begin();
+    for (; outer_iter != face->outer_ccbs_end(); ++outer_iter)
+    {
+      ccb = *outer_iter;
+      copy_data_to_face_boundary(face, ccb);
+    }
+
+    Inner_ccb_iterator inner_iter = face->inner_ccbs_begin();
+    for (; inner_iter != face->inner_ccbs_end(); ++inner_iter)
+    {
+      ccb = (*inner_iter);
+      copy_data_to_face_boundary(face, ccb);
+    }
+
+    Isolated_vertex_iterator iso_iter = face->isolated_vertices_begin();
+    for (; iso_iter != face->isolated_vertices_end(); ++iso_iter)
+    {
+      Vertex_handle vh = iso_iter;
+      if (!vh->is_decision_set() && has_equal_aux_data_with_face(vh))
+        // can copy the data from the face, since we already took care of
+        // the vertices of projected intersections
+        vh->set_decision(face->get_decision());
+    }
+  }
+
+  void copy_data_to_face_boundary(Face_handle face,
+                                  Ccb_halfedge_circulator hec)
+  {
+    Ccb_halfedge_circulator hec_begin = hec;
+    do {
+      Halfedge_handle hh = hec;
+      if(hh->is_fictitious())
+      {
+        ++hec;
+        continue;
+      }
+      CGAL_assertion(face == hh->face());
+      // if it is a vertical decomposition edge, copy data from face
+      /*if (!hh->is_decision_set() && hh->get_is_fake())
+        {
+        hh->set_decision(face->get_decision());
+        hh->twin()->set_decision(face->get_decision());
+        }*/
+      if (!hh->is_decision_set() && can_copy_decision_from_face_to_edge(hh))
+      {
+        // copy the decision from face to the edge
+        hh->set_decision(face->get_decision());
+        hh->twin()->set_decision(hh->get_decision());
+      }
+      // TODO: is this correct? shouldn't we split the edge first?
+      // I think it is correct, because there is no intersection (of
+      // the edges aux sources) over the edge, as if there was such
+      // intersection, there would also be intersection between the surfaces
+      // over the face, and we know now that there isn't.
+      
+      // if the first map is continous, but the second isn't (i.e. when we move
+      // from the face to the edge, the envelope goes closer), then if the
+      // second map wins on the face, it wins on the edge also
+      else if (!hh->is_decision_set() &&
+               face->get_decision() == DAC_DECISION_SECOND &&
+               hh->get_has_equal_aux_data_in_face(0) &&
+               !hh->get_has_equal_aux_data_in_face(1))
+      {
+        hh->set_decision(DAC_DECISION_SECOND);
+        hh->twin()->set_decision(DAC_DECISION_SECOND);
+
+      }
+      // if the second map is continous, but the first isn't, then if the
+      // first map wins on the face, it wins on the edge also
+      else if (!hh->is_decision_set() &&
+               face->get_decision() == DAC_DECISION_FIRST &&
+               !hh->get_has_equal_aux_data_in_face(0) &&
+               hh->get_has_equal_aux_data_in_face(1))
+      {
+        hh->set_decision(DAC_DECISION_FIRST);
+        hh->twin()->set_decision(DAC_DECISION_FIRST);
+      }
+
+      // conclude to the vertices
+      // we check both endpoints, since it can be possible that we cannot
+      // conclude from one edge, bt can conclude from the other
+      conclude_decision_to_vertex(hh->source(), hh->twin(), face, false);
+      conclude_decision_to_vertex(hh->target(), hh, face, true);
+                      
+      hec++;
+    } while(hec != hec_begin); 
+  }
+
+  // try to conclude the decision from the halfedge or the face to the vertex
+  // the method assumes that the vertex is an endpoint of the edge represented
+  // by "hh", which lies on the boundary of "fh"
+  // the last bool indicates whether to check if possible to conclude from
+  // face to vertex. it is only possible when hh->face == fh
+  void conclude_decision_to_vertex(Vertex_handle vh, Halfedge_handle hh,
+                                   Face_handle fh, bool try_vertex_face)
+  {
+    if (vh->is_decision_set())
+      return;
+
+
+    // first, we try to copy decision from edge, then from face
+    if (hh->is_decision_set() &&
+        can_copy_decision_from_edge_to_vertex(hh))
+    {
+      vh->set_decision(hh->get_decision());
+    }
+    // if the first map is continous, but the second isn't (i.e. when we move
+    // from the edge to the vertex, the envelope goes closer), then if the
+    // second map wins on the edge, it wins on the vertex also
+    else if (hh->get_decision() == DAC_DECISION_SECOND &&
+             hh->get_has_equal_aux_data_in_target(0) &&
+             !hh->get_has_equal_aux_data_in_target(1))
+    {
+      vh->set_decision(DAC_DECISION_SECOND);
+    }
+    // if the second map is continous, but the first isn't, then if the
+    // first map wins on the edge, it wins on the vertex also
+    else if (hh->get_decision() == DAC_DECISION_FIRST &&
+             !hh->get_has_equal_aux_data_in_target(0) &&
+             hh->get_has_equal_aux_data_in_target(1))
+    {
+      vh->set_decision(DAC_DECISION_FIRST);
+    }
+    // check if we can copy from the face
+    // todo: what if has_equal has 3 possible values? (and projected
+    // ersection vertices have unknown flags)
+    else if (try_vertex_face)
+    {
+      /*CGAL_assertion(has_equal_aux_data_in_target_and_face(hh) == 
+        has_equal_aux_data(vh, fh));*/
+      if (has_equal_aux_data_in_target_and_face(hh))
+      {
+
+        // can copy the data from the face, since we already took care of
+        // the vertices of projected intersections
+        vh->set_decision(fh->get_decision());
+      }
+    }
+  }
+  
+  // todo: this is for checking
+  template <typename InputIterator>
+  bool has_equal_data(const InputIterator& begin1,
+                      const InputIterator& end1,
+                      const InputIterator& begin2,
+                      const InputIterator& end2)
+  {
+    // insert the input data objects into a set
+    std::set<Xy_monotone_surface_3> first(begin1, end1);
+    std::set<Xy_monotone_surface_3> second(begin2, end2);
+    std::list<Xy_monotone_surface_3> intersection;
+    std::set_intersection(first.begin(), first.end(),
+                          second.begin(), second.end(),
+                          std::back_inserter(intersection));
+
+    return (intersection.size() > 0);
+  }
+  // todo: this is for checking
+  template <typename FeatureHandle>
+  void get_aux_data_iterators(unsigned int id, FeatureHandle fh,
+                              Envelope_data_iterator& begin,
+                              Envelope_data_iterator& end)
+  {
+    Halfedge_handle h;
+    Vertex_handle v;
+    Face_handle f;
+
+    const Object& o = fh->get_aux_source(id);
+    CGAL_assertion(!o.is_empty());
+
+    if (assign(v, o))
+    {
+      begin = v->begin_data();
+      end = v->end_data();
+    }
+    else if (assign(h, o))
+    {
+      begin = h->begin_data();
+      end = h->end_data();
+    }
+    else
+    {
+      CGAL_assertion(assign(f, o));
+      assign(f, o);
+      begin = f->begin_data();
+      end = f->end_data();
+    }
+  }
+
+  // todo: this is for checking
+  template <typename FeatureHandle1, typename FeatureHandle2>
+  bool has_equal_aux_data(unsigned int id, FeatureHandle1 fh1,
+                          FeatureHandle2 fh2)
+  {
+    Envelope_data_iterator begin1, end1, begin2, end2;
+    get_aux_data_iterators(id, fh1, begin1, end1);
+    get_aux_data_iterators(id, fh2, begin2, end2);
+    bool has_eq = has_equal_data(begin1, end1, begin2, end2);
+    return has_eq;
+  }
+
+  // todo: this is for checking
+  template <typename FeatureHandle1, typename FeatureHandle2>
+  bool has_equal_aux_data(FeatureHandle1 fh1, FeatureHandle2 fh2)
+  {
+    return (has_equal_aux_data(0, fh1, fh2) &&
+            has_equal_aux_data(1, fh1, fh2));
+  }
+
+
+  // check if we can copy the decision made on a boundary edge to the face
+  // if so, res will contain this decision's comparison result
+  bool can_copy_decision_from_boundary_edge(Face_handle face, 
+                                            Comparison_result& res)
+  {
+    bool result = false;
+    // check outer boundary
+    Ccb_halfedge_circulator hec, hec_begin;
+
+    // check outer boundary
+    Outer_ccb_iterator outer_ccb = face->outer_ccbs_begin();
+    for (; outer_ccb != face->outer_ccbs_end(); ++outer_ccb)
+    {
+      hec = *outer_ccb;
+      hec_begin = hec;
+      do 
+      {
+        Halfedge_handle hh = hec;
+        if(hh->is_fictitious())
+        {
+          ++hec;
+          continue;
+        }
+        if (can_copy_decision_from_face_to_edge(hh) &&
+            
+            hh->is_decision_set() &&
+            hh->get_decision() != DAC_DECISION_BOTH)
+        {
+          res = convert_decision_to_comparison_result(hh->get_decision());
+          result = true;
+        }
+        // if the first map is continous, but the second isn't (i.e. when we
+        // move from the edge to the face, the envelope goes farther), then
+        // if the first map wins on the edge, it wins on the face also
+        else if (hh->is_decision_set() &&
+                 hh->get_decision() == DAC_DECISION_FIRST &&
+                 hh->get_has_equal_aux_data_in_face(0) &&
+                 !hh->get_has_equal_aux_data_in_face(1))
+        {
+          res = convert_decision_to_comparison_result(DAC_DECISION_FIRST);
+          result = true;
+        } 
+        // if the second map is continous, but the first isn't, then if the
+        // second map wins on the edge, it wins on the face also
+        else if (hh->is_decision_set() &&
+                 hh->get_decision() == DAC_DECISION_SECOND &&
+                 !hh->get_has_equal_aux_data_in_face(0) &&
+                 hh->get_has_equal_aux_data_in_face(1))
+        {
+          res = convert_decision_to_comparison_result(DAC_DECISION_SECOND);
+          result = true;
+        }           
+        hec++;
+      } while(hec != hec_begin && !result);
+      if (result) 
+        return true;
+    }
+
+    // check inner boundaries
+    Inner_ccb_iterator hole_iter = face->inner_ccbs_begin();
+    for (; hole_iter != face->inner_ccbs_end(); ++hole_iter)
+    {
+      hec = (*hole_iter);
+      hec_begin = hec;
+
+      do {
+        Halfedge_handle hh = hec;
+        if (can_copy_decision_from_face_to_edge(hh) &&
+            hh->is_decision_set() &&
+            hh->get_decision() != DAC_DECISION_BOTH)
+        {
+          res = convert_decision_to_comparison_result(hh->get_decision());
+          result = true;
+        }
+        // if the first map is continous, but the second isn't (i.e. when we
+        // move from the edge to the face, the envelope goes farther), then
+        // if the first map wins on the edge, it wins on the face also
+        else if (hh->is_decision_set() &&
+                 hh->get_decision() == DAC_DECISION_FIRST &&
+                 hh->get_has_equal_aux_data_in_face(0) &&
+                 !hh->get_has_equal_aux_data_in_face(1))
+        {
+          res = convert_decision_to_comparison_result(DAC_DECISION_FIRST);
+
+          result = true;
+        }
+        // if the second map is continous, but the first isn't, then if the
+        // second map wins on the edge, it wins on the face also
+        else if (hh->is_decision_set() &&
+                 hh->get_decision() == DAC_DECISION_SECOND &&
+                 !hh->get_has_equal_aux_data_in_face(0) &&
+                 hh->get_has_equal_aux_data_in_face(1))
+        {
+          res = convert_decision_to_comparison_result(DAC_DECISION_SECOND);
+          result = true;
+        }
+  
+        hec++;
+      } while(hec != hec_begin && !result);
+      if (result) return true;
+    }
+
+    return result;
+  }
+
+  Comparison_result convert_decision_to_comparison_result(CGAL::Dac_decision d)
+  {
+    return enum_cast<Comparison_result>(d);
+    /*if (d == DAC_DECISION_FIRST)
+      return SMALLER;
+      else if (d == DAC_DECISION_SECOND)
+      return LARGER;
+      else
+      return EQUAL;*/
+  }
+  
+  bool has_equal_aux_data_with_face(Vertex_handle v)
+  {
+    CGAL_assertion(v->is_isolated());
+    return (v->get_has_equal_aux_data_in_face(0) &&
+            v->get_has_equal_aux_data_in_face(1));
+  }
+
+  bool has_equal_aux_data_in_target_and_face(Halfedge_handle h)
+  {
+    return (h->get_has_equal_aux_data_in_target_and_face(0) &&
+            h->get_has_equal_aux_data_in_target_and_face(1));
+  }
+
+  // check the aux data on the endpoint vertices of the edge
+  // and if it equals the aux data on the edge, copy it, to save calculations
+  // for these features later
+  void copy_data_to_edge_endpoints(Halfedge_handle edge)
+  {
+    // take care for source
+    if (!edge->source()->is_decision_set() &&
+        can_copy_decision_from_edge_to_vertex(edge->twin()))
+      // can copy the data from the edge, since we already took care of
+      // the vertices of projected intersections
+      edge->source()->set_decision(edge->get_decision());
+    // if the first map is continous, but the second isn't (i.e. when we move
+    // from the edge to the vertex, the envelope goes closer), then if the
+    // second map wins on the edge, it wins on the vertex also
+    else if (edge->get_decision() == DAC_DECISION_SECOND &&
+             edge->twin()->get_has_equal_aux_data_in_target(0) &&
+             !edge->twin()->get_has_equal_aux_data_in_target(1))
+    {
+      edge->source()->set_decision(DAC_DECISION_SECOND);
+    }
+    // if the second map is continous, but the first isn't, then if the
+    // first map wins on the edge, it wins on the vertex also
+    else if (edge->get_decision() == DAC_DECISION_FIRST &&
+             !edge->twin()->get_has_equal_aux_data_in_target(0) &&
+             edge->twin()->get_has_equal_aux_data_in_target(1))
+    {
+      edge->source()->set_decision(DAC_DECISION_FIRST);
+    }
+
+    // take care for target
+    if (!edge->target()->is_decision_set() &&
+        can_copy_decision_from_edge_to_vertex(edge))
+      // can copy the data from the edge, since we already took care of
+      // the vertices of projected intersections
+      edge->target()->set_decision(edge->get_decision());
+    // if the first map is continous, but the second isn't (i.e. when we move
+    // from the edge to the vertex, the envelope goes closer), then if the
+    // second map wins on the edge, it wins on the vertex also
+    else if (edge->get_decision() == DAC_DECISION_SECOND &&
+             edge->get_has_equal_aux_data_in_target(0) &&
+             !edge->get_has_equal_aux_data_in_target(1))
+    {
+      edge->target()->set_decision(DAC_DECISION_SECOND);
+    }
+    // if the second map is continous, but the first isn't, then if the
+    // first map wins on the edge, it wins on the vertex also
+    else if (edge->get_decision() == DAC_DECISION_FIRST &&
+             !edge->get_has_equal_aux_data_in_target(0) &&
+             edge->get_has_equal_aux_data_in_target(1))
+    {
+      edge->target()->set_decision(DAC_DECISION_FIRST);
+    }
+  }
+
+  // create vertices that correspond to the Halfedge vertices in case of 
+  // bounded traits.
+  template <typename Halfedge_handle>
+  Vertex_handle create_copied_vertex(Halfedge_handle hh, 
+                                     Md_accessor &to_accessor, 
+                                     bool source,
+                                     Arr_all_sides_oblivious_tag)
+  {
+    // create the 2 vertices and connect them with the edge
+    // copied_prev_he should be directed from copied_source to copied_target
+    Point_2* p_p =
+      (source) ? &(hh->source()->point()) : &(hh->target()->point());
+    
+    Point_2& p = *p_p;
+    return to_accessor.create_vertex(p);
+  }
+  
+  // create vertices that correspond to the Halfedge vertices in case of 
+  // bounded traits.
+  template <typename Halfedge_handle>
+  Vertex_handle create_copied_vertex(Halfedge_handle hh, 
+                                     Md_accessor& to_accessor, 
+                                     bool source,
+                                     Arr_not_all_sides_oblivious_tag)
+  {
+    typename Traits::Parameter_space_in_x_2 ps_x_op = 
+      this->m_traits->parameter_space_in_x_2_object ();
+    typename Traits::Parameter_space_in_y_2 ps_y_op = 
+      this->m_traits->parameter_space_in_y_2_object ();
+    
+    bool is_directed_right = hh->direction() == ARR_LEFT_TO_RIGHT;
+
+    Arr_curve_end ind =
+      ((is_directed_right && source) || (!is_directed_right && !source)) ?
+      ARR_MIN_END : ARR_MAX_END;
+
+    Arr_parameter_space ps_x = ps_x_op(hh->curve(), ind);
+    Arr_parameter_space ps_y = ps_y_op(hh->curve(), ind);
+    
+    if (ps_x != ARR_INTERIOR || ps_y != ARR_INTERIOR)
+      return to_accessor.create_boundary_vertex(hh->curve(), ind, ps_x, ps_y, 
+                                                true);
+    else
+    {
+      // create the 2 vertices and connect them with the edge
+      // copied_prev_he should be directed from copied_source to copied_target
+      Point_2* p_p =
+        (source) ? &(hh->source()->point()) : &(hh->target()->point());
+      
+      Point_2& p = *p_p;
+      return to_accessor.create_vertex(p);
+    }
+  }
+  
+  // copy the halfedges of a ccb (in from) to the md "to" inside the face
+  // inside_face
+  void copy_ccb(Ccb_halfedge_circulator hec, // the circulator to insert
+                Minimization_diagram_2&,     // the original arrangement
+                Face_handle inside_face,     // the face in which we insert it
+                Minimization_diagram_2& to,  // the target arrangement
+                Halfedges_map& map_copied_to_orig_halfedges,
+                Vertices_map&  map_copied_to_orig_vertices,
+                Halfedges_map& map_orig_to_copied_halfedges,
+                Vertices_map&  map_orig_to_copied_vertices,
+                bool is_outer_ccb) // do we copy an outer (or inner) ccb
+               
+  {
+    Md_accessor to_accessor(to);
+    // count the number of faces that are closed by this ccb
+    // (it can be more than 1 in degenerate cases, when closed area hangs
+    // on a boundary vertex)
+    int n_faces_closed = 0;
+    
+    Ccb_halfedge_circulator hec_begin = hec;
+    bool first_he = true;
+    Halfedge_handle copied_prev_he;
+    do 
+    {
+      Halfedge_handle hh = hec;
+
+      if (hh->twin()->face() == hh->face() &&
+          map_orig_to_copied_halfedges.is_defined(hh))
+      {
+        // this can happen in the case of antennas, when we get to the same
+        // antena halfedge from the other side
+        copied_prev_he = map_orig_to_copied_halfedges[hh];
+      }
+      else
+      {
+        const X_monotone_curve_2& current_cv = hh->curve();
+        if (first_he)
+        {
+          first_he = false;
+
+          // create the 2 vertices and connect them with the edge
+          // copied_prev_he should be directed from copied_source to
+          // copied_target
+          Vertex_handle copied_source = 
+            create_copied_vertex(hh, to_accessor, true, 
+                                 Are_all_sides_oblivious_category());
+          //to_accessor.create_vertex(hh->source()->point());
+          Vertex_handle copied_target = 
+            create_copied_vertex(hh, to_accessor, false, 
+                                 Are_all_sides_oblivious_category());
+          //to_accessor.create_vertex(hh->target()->point());
+          copied_prev_he =
+            to_accessor.insert_in_face_interior_ex(inside_face,
+                                                   current_cv, (HE_COMP_RES(hh) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                   copied_source,
+                                                   copied_target);
+
+          map_copied_to_orig_halfedges[copied_prev_he] = hh;
+          map_orig_to_copied_halfedges[hh] = copied_prev_he;
+          map_copied_to_orig_halfedges[copied_prev_he->twin()] = hh->twin();
+          map_orig_to_copied_halfedges[hh->twin()] = copied_prev_he->twin();
+
+          map_copied_to_orig_vertices[copied_prev_he->source()] = hh->source();
+          map_orig_to_copied_vertices[hh->source()] = copied_prev_he->source();
+          map_copied_to_orig_vertices[copied_prev_he->target()] = hh->target();
+          map_orig_to_copied_vertices[hh->target()] = copied_prev_he->target();
+        }          
+        else
+        {
+          CGAL_assertion(map_copied_to_orig_halfedges[copied_prev_he]->target()
+                         == hh->source());
+
+          // insert from vertex: prev_he->target()
+          // should check if hh->target is already a vertex in the copied face
+          // in which case we should use insert at vertices
+          bool use_2_vertices = false;
+          Vertex_handle copied_v2;
+          if (map_orig_to_copied_vertices.is_defined(hh->target()))
+          {
+            use_2_vertices = true;
+            copied_v2 = map_orig_to_copied_vertices[hh->target()];
+          }
+
+          Halfedge_handle copied_new_he;
+          if (!use_2_vertices)
+          {
+            // create vertex for the new target, and insert the new edge
+            Vertex_handle copied_target = 
+              create_copied_vertex(hh, to_accessor, false, 
+                                   Are_all_sides_oblivious_category());
+            //to_accessor.create_vertex(hh->target()->point());
+            copied_new_he = to_accessor.insert_from_vertex_ex
+              (copied_prev_he,
+               current_cv,
+               (HE_COMP_RES(hh) == CGAL::SMALLER ?
+                ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+               copied_target);
+
+            
+            // the target of copied_new_he is the new vertex, so it is directed
+            // the same way as hh in "from"
+
+            // update the vertices maps:
+            map_copied_to_orig_vertices[copied_new_he->target()] = hh->target();
+            map_orig_to_copied_vertices[hh->target()] = copied_new_he->target();
+          }
+          else
+          {
+            ++n_faces_closed;
+            
+            // in order to insert the new edge we should determine the prev
+            // halfedge of copied_v2 - this is done be going backwards on the
+            // ccb (in the copied arrangement) until finding the first halfedge
+            // with target copied_v2
+            // (note that going on twin()->next() is problematic in case that
+            // the inner boundary we traverse is made of several faces)
+            Halfedge_handle copied_prev_v2 = copied_prev_he;
+            while(copied_prev_v2->source() != copied_v2)
+              copied_prev_v2 = copied_prev_v2->prev();
+            copied_prev_v2 = copied_prev_v2->twin();
+
+            CGAL_assertion_code(Halfedge_handle tmp =
+                                to_accessor.locate_around_vertex(copied_v2,
+                                                                 current_cv);
+                                );
+            CGAL_assertion(tmp == copied_prev_v2);
+
+            bool new_face;
+            if (is_outer_ccb)
+            {
+              // if it is the first face created, and the last halfedge to
+              // insert, this is a regular outer ccb, with no special
+              // degeneracies (around the current vertices, at least)
+              // so we can use the accessor method
+              if (n_faces_closed == 1 &&
+                  map_orig_to_copied_halfedges.is_defined(hh->next()))
+              {
+                bool dummy_swapped_predecessors = false;
+                copied_new_he = to_accessor.insert_at_vertices_ex
+                  (copied_prev_he,
+                   current_cv, (HE_COMP_RES(hh) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                   copied_prev_v2->next(),
+                   new_face,
+                   dummy_swapped_predecessors);
+                // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
+                // or do we have to disallow swapping?
+
+                CGAL_assertion(new_face);
+              }
+              else
+              {
+                // TODO:can we use accessor method?
+                copied_new_he = to.insert_at_vertices(current_cv,
+                                                      copied_prev_he,
+                                                      copied_prev_v2);
+              }
+              // in order to use the accessor version, we need to identify
+              // the order in which to pass the halfedges
+              // (we should be careful in cases where more than one face is
+              // created by the outer ccb
+            }
+            else // copy inner boundary
+            {
+              // should always flip the side of the edge, because the face
+              // that we close is never the copied face, even in strane
+              // situations like this: (two faces touch in a vertex)
+              //     ------         |\  /|
+              //     | |\ |         | \/ |
+              //     | | \|         | /\ |
+              //     ---            |/  \|
+              //
+              //
+              bool dummy_swapped_predecessors = false;
+              copied_new_he =
+                to_accessor.insert_at_vertices_ex(copied_prev_v2,
+                                                  current_cv, (HE_COMP_RES(hh->twin()) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                  copied_prev_he->next(),
+                                                  new_face,
+                                                  dummy_swapped_predecessors);
+              // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
+              // or do we have to disallow swapping?
+              
+              CGAL_assertion(new_face);
+              copied_new_he = copied_new_he->twin();
+            }
+
+            CGAL_assertion(copied_new_he->target() == copied_v2);
+          }
+          // update the halfedges maps:
+          map_copied_to_orig_halfedges[copied_new_he] = hh;
+          map_copied_to_orig_halfedges[copied_new_he->twin()] = hh->twin();
+          map_orig_to_copied_halfedges[hh] = copied_new_he;
+          map_orig_to_copied_halfedges[hh->twin()] = copied_new_he->twin();
+
+          // update the previous he
+          copied_prev_he = copied_new_he;
+        }
+      }
+      hec++;
+    } while(hec != hec_begin);
+
+  }
+
+  void copy_ccb_unbounded(Ccb_halfedge_circulator hec,
+                          Minimization_diagram_2& from,
+                          Minimization_diagram_2& to,
+                          Halfedges_map& map_copied_to_orig_halfedges,
+                          Vertices_map&  map_copied_to_orig_vertices,
+                          Halfedges_map& map_orig_to_copied_halfedges,
+                          Vertices_map&  map_orig_to_copied_vertices)
+  {
+    // Find a non-fictitous edge (if there is such one) on the CCB.
+    Ccb_halfedge_circulator  hec_end = hec;
+    Halfedge_handle          non_fict;
+
+    do
+    {
+      if(!hec->is_fictitious())
+      {
+        non_fict = hec;
+        break;
+      }
+      ++hec;
+    } while(hec != hec_end);
+
+    // Find an anchor halfedge he_from along the original CCB and locate
+    // its image he_to in the target CCB.
+    Md_accessor      from_accessor (from);
+    Md_accessor      to_accessor (to);
+    Halfedge_handle  he_from;
+    Halfedge_handle  he_to;
+
+    if (non_fict == Halfedge_handle())
+    {
+      // In case all edges along the CCB are fictitious, this outer CCB
+      // belongs to the single unbounded face in the arrangement (as it
+      // contains no unbounded curves at current). In this case, we go
+      // over the outer CCB of the single unbounded face in the target
+      // arrangement (which is currently empty, thus contain a single
+      // unbounded face), and find a halfedge that matches hec.
+      CGAL_assertion_msg
+        ((to.number_of_faces() != 0),
+         "if all halfedges are fictitious then there should be only one face");
+      Face_handle              to_uf = to.faces_begin();
+      Ccb_halfedge_circulator  to_uf_hec = to_uf->outer_ccb();
+
+      he_from = hec;
+
+      he_to = to_uf_hec;
+      while (he_to->direction() != he_from->direction() ||
+             he_to->next()->direction() != he_from->next()->direction())
+      {
+        he_to = he_to->next();
+        CGAL_assertion (he_to != to_uf_hec);
+      }
+    }
+    else
+    {
+      // Use the non-fictitious halfedge as an "anchor": Insert its associated
+      // curve into the target arrangement, and keep track of the halfedge we
+      // obtained.
+      he_from = non_fict;
+
+      he_to = insert_non_intersecting_curve (to, he_from->curve());
+      if (he_to->direction() != he_from->direction())
+        he_to = he_to->twin();
+
+      // Go over all other halfedges along the copied CCB, and store all
+      // curves associated with non-fictitious halfedges.
+      Halfedge_handle                 he;
+      std::list<X_monotone_curve_2>   xcvs;
+
+      for (he = he_from->next(); he != he_from; he = he->next())
+      {
+        if (! he->is_fictitious())
+          xcvs.push_back (he->curve());
+      }
+
+      // Insert all curves into the target arrangement. By doing this, we
+      // obtain an unbounded face with the same structure as the copied face
+      // in the target arrangement.
+      insert_non_intersecting_curves (to, xcvs.begin(), xcvs.end());
+    }
+
+    // Map the halfedges and vertices along the two CCBs.
+    // Note that we make sure that the two CCBs are of the same size.
+    const Halfedge_handle   he_from_end = he_from;
+    CGAL_assertion_code(const Halfedge_handle   he_to_end = he_to;);
+
+    do
+    {
+      map_copied_to_orig_vertices[he_to->source()] = he_from->source();
+      map_orig_to_copied_vertices[he_from->source()] = he_to->source();
+
+      map_copied_to_orig_halfedges[he_to] = he_from;
+      map_copied_to_orig_halfedges[he_to->twin()] = he_from->twin();
+      map_orig_to_copied_halfedges[he_from] = he_to;
+      map_orig_to_copied_halfedges[he_from->twin()] = he_to->twin();
+
+      he_from = he_from->next();
+      he_to = he_to->next();
+
+    } while (he_from != he_from_end);
+
+    CGAL_assertion(he_to == he_to_end);
+    return;
+  }
+
+  // Copy the halfedges of the boundary of face (in from) to the md "to"
+  // return a handle to the copied face in "to".
+  Face_handle copy_face(Face_handle face, Minimization_diagram_2& from,
+                        Minimization_diagram_2& to,
+                        Halfedges_map& map_copied_to_orig_halfedges,
+                        Vertices_map&  map_copied_to_orig_vertices)
+  {
+    CGAL_precondition(from.is_valid());
+    CGAL_precondition(to.is_empty());
+    CGAL_assertion_msg(to.number_of_faces() == 1,
+                       "There should be one face in an empty arrangement");
+
+    // Initialize a mapping from the original vertices and halfedges to the
+    // ones in the copied arrangement. Also keep track of the unbounded face
+    // of the copied arrangement: Note that if the face we copy is bounded,
+    // then it forms a hole in the unbounded face.
+    Vertices_map  map_orig_to_copied_vertices;
+    Halfedges_map map_orig_to_copied_halfedges;
+    Face_handle   to_uf = to.faces_begin();
+
+    // Copy outer CCB of the face, if it has one.
+    Face_handle     copied_face;
+
+    if (face->number_of_outer_ccbs() > 0)
+    {
+      Ccb_halfedge_circulator  hec = face->outer_ccb();
+
+      if (face->is_unbounded())
+      {
+        copy_ccb_unbounded(hec, from, to,
+                           map_copied_to_orig_halfedges,
+                           map_copied_to_orig_vertices,
+                           map_orig_to_copied_halfedges,
+                           map_orig_to_copied_vertices);
+      }
+      else
+      {
+        copy_ccb(hec, from, to_uf, to,
+                 map_copied_to_orig_halfedges,
+                 map_copied_to_orig_vertices,
+                 map_orig_to_copied_halfedges,
+                 map_orig_to_copied_vertices,
+                 true);
+      }
+      CGAL_assertion(to.is_valid());
+
+      // Get a handle to the copied face, which is the incident face
+      // of the copy we created for hec.
+      CGAL_assertion (map_orig_to_copied_halfedges.is_defined(hec));
+      Halfedge_handle  hec_to = map_orig_to_copied_halfedges[hec];
+
+      copied_face = hec_to->face();
+    }
+    else
+    {
+      // In case the copied face has no outer CCB, then it must be the
+      // single unbounded face of the arrangement.
+      copied_face = to_uf;
+    }
+
+    // Copy the inner CCB (the holes inside the face).
+    Inner_ccb_iterator  iccb_it = face->inner_ccbs_begin();
+    for (; iccb_it != face->inner_ccbs_end(); ++iccb_it)
+    {
+      Ccb_halfedge_circulator  he = *iccb_it;
+
+      copy_ccb(he, from, copied_face, to,
+               map_copied_to_orig_halfedges,
+               map_copied_to_orig_vertices,
+               map_orig_to_copied_halfedges,
+               map_orig_to_copied_vertices,
+               false);
+      CGAL_assertion(to.is_valid());
+    }
+
+    // Copy the isolated vertices inside the given face.
+    Isolated_vertex_iterator    iv_it = face->isolated_vertices_begin();
+    for (; iv_it != face->isolated_vertices_end(); ++iv_it)
+    {
+      Vertex_handle     iso_v = iv_it;
+      Vertex_handle     copied_iso = 
+        to.insert_in_face_interior (iso_v->point(), copied_face);
+
+      map_copied_to_orig_vertices[copied_iso] = iso_v;
+      map_orig_to_copied_vertices[iso_v] = copied_iso;
+    }
+
+    // Return a handle to the copied face.
+    return (copied_face);
+  }
+    
+  // set envelope data in face "to" according to the comparison result of the
+  // aux data of face "from"
+  void copy_data_by_comparison_result(Face_handle from, Face_handle to,
+                                      Comparison_result res)
+  {
+    CGAL_assertion_msg(from->get_aux_is_set(0), "aux_data(0) is not set");
+    CGAL_assertion_msg(from->get_aux_is_set(1), "aux_data(1) is not set");
+    to->set_aux_source(0, from->get_aux_source(0));
+    to->set_aux_source(1, from->get_aux_source(1));
+    to->set_decision(res);
+  }
+
+  // set envelope data in vertex "v" according to the comparison result of the
+  // aux data of "v"
+  void set_data_by_comparison_result(Vertex_handle v, Comparison_result res)
+  {
+    CGAL_assertion_msg(v->get_aux_is_set(0), "aux_data(0) is not set");
+    CGAL_assertion_msg(v->get_aux_is_set(1), "aux_data(1) is not set");
+    v->set_decision(res);
+  }
+
+  // set envelope data in halfedge "h" according to the comparison result of
+  // the aux data of "h"
+  void set_data_by_comparison_result(Halfedge_handle h, Comparison_result res)
+  {
+    CGAL_assertion_msg(h->get_aux_is_set(0), "aux_data(0) is not set");
+    CGAL_assertion_msg(h->get_aux_is_set(1), "aux_data(1) is not set");
+    h->set_decision(res);
+  }
+
+  // set envelope data in vertex "to" according to the union of both
+  // aux data of the feature "from"
+  // FeatureHabdle should be a Face_handle, Halfedge_handle or 
+  // Vertex_handle
+  template <typename FeatureHabdle>
+  void copy_all_data_to_vertex(FeatureHabdle from, Vertex_handle to)
+  {
+    CGAL_assertion_msg(from->get_aux_is_set(0), "aux_data(0) is not set");
+    CGAL_assertion_msg(from->get_aux_is_set(1), "aux_data(1) is not set");
+    CGAL_assertion_msg(!to->is_decision_set(), "data is set in new vertex");
+    to->set_aux_source(0, from->get_aux_source(0));
+    to->set_aux_source(1, from->get_aux_source(1));
+    to->set_decision(EQUAL);
+  }
+
+  //   void deal_with_new_vertex(Halfedge_handle orig_he, Vertex_handle new_v)
+  //   {
+  //     const Xy_monotone_surface_3& surf1 = get_aux_surface(orig_he, 0);
+  //     const Xy_monotone_surface_3& surf2 = get_aux_surface(orig_he, 1);
+
+  //     const Point_2& p = new_v->point();
+  //     Comparison_result res = compare_distance_to_envelope(p, surf1, surf2);
+  //     new_v->set_aux_source(0, orig_he->get_aux_source(0));
+  //     new_v->set_aux_source(1, orig_he->get_aux_source(1));
+  //     new_v->set_decision(res);
+  //   }
+    
+  Comparison_result resolve_minimal_edge(Halfedge_handle orig_he, 
+                                         Halfedge_handle new_he)
+  {
+    // find and set the envelope data on the new edge
+    const Xy_monotone_surface_3& surf1 = get_aux_surface(orig_he, 0);
+    const Xy_monotone_surface_3& surf2 = get_aux_surface(orig_he, 1);
+    Comparison_result res = 
+      compare_distance_to_envelope(new_he->curve(), surf1, surf2);
+
+    // the observer keeps this information when splitting an edge
+    CGAL_assertion(new_he->get_aux_is_set(0) && new_he->get_aux_is_set(1));
+    CGAL_assertion(new_he->twin()->get_aux_is_set(0) && \
+                   new_he->twin()->get_aux_is_set(1));
+
+    new_he->set_decision(res);
+    new_he->twin()->set_decision(res);
+    return res;
+  }
+
+  // check if the point is on the curve.
+  // we use the traits adaptor since cv can be an infinite curve
+  bool is_point_on_curve(const Point_2& p, const X_monotone_curve_2& cv)
+  {
+    Arr_traits_adaptor_2<Traits> tr_adaptor(*m_traits);
+    return (tr_adaptor.is_in_x_range_2_object()(cv, p) && 
+            m_traits->compare_y_at_x_2_object()(p, cv) == EQUAL);
+  }
+  
+  // this observer is used in the process of resolving a face
+  // this observer should copy the faces' indication when a face is split
+  // so we can later identify all the faces that form the original given face
+  // it also should remember the edges of the face, that are also projected
+  // intersections
+  class Copied_face_observer : public Md_observer
+
+  {
+  public:
+    typedef typename Minimization_diagram_2::Face_handle     Face_handle;
+    typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
+    typedef typename Minimization_diagram_2::X_monotone_curve_2
+      X_monotone_curve_2;
+
+    Copied_face_observer(Halfedges_map& map_h) : map_halfedges(map_h) {}
+    
+    virtual ~Copied_face_observer() {}
+
+    void set_elements_collections(Halfedges_hash& boundary,
+                                  Halfedges_hash& specialh,
+                                  Halfedges_hash_w_type& newh,
+                                  Faces_hash& parts,
+                                  Vertices_hash& boundaryv,
+                                  Vertices_hash& specialv,
+                                  Vertices_to_edges_map& v_to_h)
+    {
+      boundary_halfedges = &boundary;
+      special_edges = &specialh;
+      new_edges = &newh;
+      face_parts = &parts;
+      boundary_vertices = &boundaryv;
+      special_vertices = &specialv;
+      vertices_to_halfedges = &v_to_h;
+    }
+  
+    virtual void after_split_face(Face_handle org_f,
+                                  Face_handle new_f, bool)
+    {
+      // keep track of the face parts
+      if (face_parts->is_defined(org_f))
+        (*face_parts)[new_f] = face_parts->default_value();
+    }
+
+    virtual void after_split_edge(Halfedge_handle org_he,
+                                  Halfedge_handle new_he)
+    {
+      // take care of special edges that were split
+      if (special_edges->is_defined(org_he))
+
+      {
+        // if original edge was in the set, then now both split parts should
+        // be in the set
+        (*special_edges)[new_he] = special_edges->default_value();
+        (*special_edges)[new_he->twin()] = special_edges->default_value();
+      }
+
+      // take care of new edges that were split
+      if (new_edges->is_defined(org_he))
+      {
+        (*new_edges)[new_he] = (*new_edges)[org_he];
+        (*new_edges)[new_he->twin()] = (*new_edges)[org_he];
+      }
+
+      // take care for boundary edges
+      if (boundary_halfedges->is_defined(org_he))
+      {
+        (*boundary_halfedges)[new_he] = boundary_halfedges->default_value();
+        (*boundary_halfedges)[new_he->twin()] =
+          boundary_halfedges->default_value();
+
+        // the new created vertex is a special vertex since it lies on the
+        // boundary of the face, and it is of a projected intersection
+        // we are interested in it only if the split halfedge is "data from
+        // face"
+        CGAL_assertion(map_halfedges.is_defined(org_he));
+        CGAL_assertion(org_he->target() == new_he->source());
+
+        if ((map_halfedges[org_he])->get_has_equal_aux_data_in_face(0) &&
+            (map_halfedges[org_he])->get_has_equal_aux_data_in_face(1))
+          (*special_vertices)[org_he->target()] =
+            special_vertices->default_value();
+
+
+        // update the boundary vertices collection
+        (*boundary_vertices)[org_he->target()] =
+          boundary_vertices->default_value();
+
+
+        // update the vertices to halfedges collection
+        Halfedge_handle correct_side_he;
+        if (face_parts->is_defined(org_he->face()))
+          correct_side_he = org_he;
+        else
+        {
+          CGAL_assertion(face_parts->is_defined(new_he->twin()->face()));
+          // new_he->twin() is directed as org_he, so on the boundary pointing
+          // inside the face, and has the new vertex as target
+          CGAL_assertion(org_he->target() == new_he->twin()->target());
+          correct_side_he = new_he->twin();
+        }
+        // set the new vertex
+        (*vertices_to_halfedges)[org_he->target()] = correct_side_he;
+
+        //BZBZ
+        /* CGAL_assertion(vertices_to_halfedges->is_defined(correct_side_he->source()) &&
+           vertices_to_halfedges->is_defined(correct_side_he->next()->target()));*/
+        (*vertices_to_halfedges)[correct_side_he->next()->target()] = correct_side_he->next();
+        
+        if (correct_side_he == org_he && 
+            face_parts->is_defined(org_he->twin()->face()))
+          (*vertices_to_halfedges)[org_he->source()] = org_he->twin();
+      }
+    }
+
+  protected:
+    Halfedges_hash* boundary_halfedges;
+    Halfedges_hash* special_edges;
+    Halfedges_hash_w_type* new_edges;
+    Faces_hash* face_parts;
+    Vertices_hash* boundary_vertices;
+    Vertices_hash* special_vertices;
+    Vertices_to_edges_map* vertices_to_halfedges;
+
+    Halfedges_map& map_halfedges;
+  };
+
+
+  // this observer is used in the process of resolving a face
+  // it listens to what happpens in the copied arrangement, and copies back
+  // the actions to result arrangements very efficiently
+  class Copy_observer : public Md_observer
+  {
+  public:
+    typedef typename Minimization_diagram_2::Face_handle       Face_handle;
+    typedef typename Minimization_diagram_2::Halfedge_handle   Halfedge_handle;
+    typedef typename Minimization_diagram_2::Vertex_handle     Vertex_handle;
+    typedef typename Minimization_diagram_2::Point_2           Point_2;
+    typedef typename Minimization_diagram_2::X_monotone_curve_2
+      X_monotone_curve_2;
+    typedef typename Minimization_diagram_2::Ccb_halfedge_circulator
+     Ccb_halfedge_circulator;
+
+    typedef typename Traits::Left_side_category             Left_side_category;
+    typedef typename Traits::Right_side_category            Right_side_category;
+    typedef typename Traits::Top_side_category              Top_side_category;
+    typedef typename Traits::Bottom_side_category           Bottom_side_category;
+    
+    Copy_observer(Minimization_diagram_2& small_,
+                  Minimization_diagram_2& big,
+                  Halfedges_map& map_h,
+                  Vertices_map&  map_v,
+                  Faces_map&     map_f)
+      : small_arr(small_), big_arr(big),
+        big_arr_accessor(big_arr),
+        map_halfedges(map_h),
+        map_vertices(map_v),
+        map_faces(map_f)
+    {}
+    
+    virtual ~Copy_observer() {}
+
+    virtual void before_create_vertex (const Point_2& /* p */)
+    {}
+
+    virtual void after_create_vertex (Vertex_handle v)
+    {      
+      // should create a new vertex with v->point() inside
+      Vertex_handle new_v = big_arr_accessor.create_vertex(v->point());
+
+      // save a mapping between the 2 vertices
+      map_vertices[v] = new_v;
+      // add indication of a new vertex (that is not connected to anything,
+      // and is also no isolated)
+      new_vertices.push_back(v);
+    }
+
+    void before_create_boundary_vertex (const X_monotone_curve_2& cv,
+                                        Arr_curve_end ind,
+                                        Arr_parameter_space in_ps_x,
+                                        Arr_parameter_space in_ps_y)
+    {
+      boundary_vertex_cv = cv;
+      boundary_vertex_ind = ind;
+      ps_x = in_ps_x;
+      ps_y = in_ps_y;
+    }
+
+    bool is_bounded_impl(Arr_open_side_tag) { return false; }
+    bool is_bounded_impl(Arr_boundary_side_tag) { return true; }
+    
+    bool is_bounded()
+    {
+      // This is the case of create boundary vertex.
+      CGAL_assertion((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
+      
+      if (ps_x == ARR_LEFT_BOUNDARY && !is_bounded_impl(Left_side_category()))
+        return false;
+      
+      if (ps_x == ARR_RIGHT_BOUNDARY && !is_bounded_impl(Right_side_category()))
+        return false;
+
+      if (ps_y == ARR_TOP_BOUNDARY && !is_bounded_impl(Top_side_category()))
+        return false;
+      
+      if (ps_y == ARR_BOTTOM_BOUNDARY && 
+          !is_bounded_impl(Bottom_side_category()))
+        return false;
+      
+      return true;
+    }
+
+    void after_create_boundary_vertex(Vertex_handle v)
+    {
+      CGAL_assertion(big_arr.is_valid());
+      Vertex_handle new_v = 
+        big_arr_accessor.create_boundary_vertex(boundary_vertex_cv,
+                                                boundary_vertex_ind,
+                                                ps_x, ps_y, true);
+      // add indication of a new vertex (that is not connected to anything,
+      // and is also not isolated)
+      if (is_bounded())
+        new_vertices.push_back(v);
+
+      map_vertices[v] = new_v;
+    }
+
+    void before_split_fictitious_edge(Halfedge_handle e,
+                                      Vertex_handle v)
+    {
+      split_fict_v = v;
+      split_fict_e = e;
+    }
+
+    void after_split_fictitious_edge(Halfedge_handle e1,
+                                     Halfedge_handle e2)
+    {
+      // find the corresponding split vertex in big_arr
+      CGAL_assertion(map_vertices.is_defined(split_fict_v));
+      Vertex_handle big_v = map_vertices[split_fict_v];
+
+      // find the edge to split in big_arr
+      CGAL_assertion(map_halfedges.is_defined(split_fict_e));
+      Halfedge_handle big_e = map_halfedges[split_fict_e];
+
+      // use the O(1) operation _split_edge      
+      Halfedge_handle big_e1 =
+        big_arr_accessor.split_fictitious_edge(big_e, big_v);
+
+      Halfedge_handle big_e2 = big_e1->next();
+      
+      // update mapping of new halfedges
+      // big_e1 is directed at big_v, as e1 is directed at split_v -
+      // these are supposed to be mapped
+      CGAL_assertion(map_halfedges.is_defined(e1) &&
+                     map_halfedges[e1] == big_e1); CGAL_USE(e1);
+      // should update the mapping of the second halfedge     
+      map_halfedges[e2] = big_e2;
+      map_halfedges[e2->twin()] = big_e2->twin();
+    }
+
+    virtual void before_create_edge(const X_monotone_curve_2& /* c */,
+                                    Vertex_handle v1,
+                                    Vertex_handle v2)
+    {
+      // save state for after_create_edge event
+      create_edge_v1 = v1;
+      create_edge_v2 = v2;
+
+      is_in_relocate = false;
+    }
+      
+    virtual void after_create_edge(Halfedge_handle e)
+
+    {
+      // a new edge e was created in small_arr, we should create a corresponing
+      // edge in big_arr
+      CGAL_assertion(map_vertices.is_defined(create_edge_v1));
+      CGAL_assertion(map_vertices.is_defined(create_edge_v2));
+      CGAL_assertion(new_vertices.size() <= 2);
+
+      Vertex_handle big_v1 = map_vertices[create_edge_v1];
+      Vertex_handle big_v2 = map_vertices[create_edge_v2];
+      
+      // should check if v1 and v2 are new or old
+      // if we have 2 new vertices, they must be new.
+      // if we have only one, we should check which is new
+      bool v1_is_new = false, v2_is_new = false;
+      if (new_vertices.size() == 1)
+      {
+        if (new_vertices.back() == create_edge_v1)
+          v1_is_new = true;
+        else
+        {
+          CGAL_assertion(new_vertices.back() == create_edge_v2);
+          v2_is_new = true;
+        }          
+      }
+      if (new_vertices.size() == 2)
+      {
+        v1_is_new = true;
+        v2_is_new = true;
+      }
+      new_vertices.clear();
+
+      // just to make sure we have the halfedge in the same direction as
+      // we got in the before event
+      CGAL_assertion(e->source() == create_edge_v1);
+      Halfedge_handle he = 
+        ((e->source() == create_edge_v1) ? e : e->twin());
+
+      // if an endpoint is not new, but is isolated, we should remove it from
+      // its face's isolated vertices list, and treat it as new
+      if (!v1_is_new && big_v1->is_isolated())
+      {
+        //Face_handle f = big_v1->face(); //big_arr.incident_face(big_v1);
+        //big_arr_accessor.find_and_erase_isolated_vertex(f, big_v1);
+        big_arr_accessor.remove_isolated_vertex_ex(big_v1);
+        v1_is_new = true;
+      }
+      if (!v2_is_new && big_v2->is_isolated())
+      {
+        //Face_handle f = big_v2->face(); //big_arr.incident_face(big_v2);
+        //big_arr_accessor.find_and_erase_isolated_vertex(f, big_v2);
+        big_arr_accessor.remove_isolated_vertex_ex(big_v2);
+        v2_is_new = true;
+      }
+
+      // now use the approppriate method to insert the new edge
+      if (v1_is_new && v2_is_new)
+      {
+        // if both vertices are new - use the O(1) operation
+        // _insert_in_face_interior (in the face mapped to by he->face())
+        CGAL_assertion(map_faces.is_defined(he->face()));
+
+        Face_handle big_face = map_faces[he->face()];
+        Halfedge_handle new_he =
+          big_arr_accessor.insert_in_face_interior_ex(big_face,
+                                                      he->curve(), (HE_COMP_RES(he) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                      big_v1, big_v2);
+
+        // update mapping of new edge
+        // new_he is directed from big_v1 to big_v2, and he is directed from
+        // create_edge_v1 to create_edge_v2, so he is mapped to new_he
+        map_halfedges[he] = new_he;
+        map_halfedges[he->twin()] = new_he->twin();
+      }
+      else if (!v1_is_new && !v2_is_new)
+      {
+        // if both vertices are old - use _insert_at_vertices
+        // this is a linear action by the size of the faces involved
+        // we can get relevant prev halfedges from he
+        Halfedge_handle prev1 = he->prev();
+        Halfedge_handle prev2 = he->twin()->prev();
+
+        CGAL_assertion(map_halfedges.is_defined(prev1));
+        CGAL_assertion(map_halfedges.is_defined(prev2));
+
+        Halfedge_handle big_prev1 = map_halfedges[prev1];
+        Halfedge_handle big_prev2 = map_halfedges[prev2];
+
+        bool new_face;
+        bool dummy_swapped_predecessors = false;
+        Halfedge_handle new_he =
+          big_arr_accessor.insert_at_vertices_ex(big_prev1, 
+                                                 he->curve(), (HE_COMP_RES(he) == CGAL::SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                 big_prev2->next(),
+                                                 new_face,
+                                                 dummy_swapped_predecessors);
+        // TODO EBEB 2012-08-06 do we have to care if order has been swapped,
+        // or do we have to disallow swapping?
+
+        // new_he should be directed as he
+        CGAL_assertion(map_vertices.is_defined(he->source()) &&
+                       map_vertices[he->source()] == new_he->source() &&
+                       map_vertices.is_defined(he->target()) &&
+                       map_vertices[he->target()] == new_he->target());
+
+        // update mapping of new edge
+        map_halfedges[he] = new_he;
+        map_halfedges[he->twin()] = new_he->twin();
+
+        // make sure that the old face is mapped already
+        CGAL_assertion(map_faces.is_defined(he->twin()->face()) &&
+                       map_faces[he->twin()->face()] == new_he->twin()->face());
+
+        // if a new face was created update its mapping too
+        // the new face is the incident face of he
+        if (new_face)
+        {
+          map_faces[he->face()] = new_he->face();
+          // save state for move_hole/move_isolated_vertex events
+          is_in_relocate = true;
+        }
+
+
+        // make sure the face is correctly mapped
+        CGAL_assertion(map_faces.is_defined(he->face()) &&
+                       map_faces[he->face()] == new_he->face());
+      }
+      else
+      {
+        // only one vertex is new - use the O(1) operation _insert_from_vertex
+        // we can get the relevant prev halfedge from e
+        Halfedge_handle prev = he->prev();
+        CGAL_assertion(map_halfedges.is_defined(prev));
+        Halfedge_handle big_prev = map_halfedges[prev];
+        Halfedge_handle new_he;
+        if (!v1_is_new)
+        {
+          new_he = big_arr_accessor.insert_from_vertex_ex(big_prev, 
+                                                          he->curve(), (HE_COMP_RES(he) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                          big_v2);
+
+          // update mapping of new edge
+          // new_he is directed from big_v1 to big_v2 as he
+          map_halfedges[he] = new_he;
+          map_halfedges[he->twin()] = new_he->twin();          
+        }
+        else
+        {
+          new_he =
+            big_arr_accessor.insert_from_vertex_ex(big_prev,
+                                                   he->curve(), (HE_COMP_RES(he->twin()) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
+                                                   big_v1);
+
+          // update mapping of new edge
+          // new_he is directed from big_v2 to big_v1 opposite of he
+          map_halfedges[he] = new_he->twin();
+          map_halfedges[he->twin()] = new_he;
+        }
+      }
+    }
+
+    virtual void before_split_edge(Halfedge_handle e,
+                                   Vertex_handle v,
+                                   const X_monotone_curve_2& /* c1 */,
+                                   const X_monotone_curve_2& /* c2 */)
+    {
+      // save state info for using _split_edge in after event
+      split_v = v;
+      split_e = e;
+    }
+    virtual void after_split_edge (Halfedge_handle e1,
+                                   Halfedge_handle e2)
+    {
+      // find the corresponding split vertex in big_arr
+      CGAL_assertion(map_vertices.is_defined(split_v));
+      Vertex_handle big_v = map_vertices[split_v];
+
+      // make sure it is the only new vertex right now
+      CGAL_assertion(new_vertices.size() == 1 &&
+                     new_vertices.back() == split_v);
+      new_vertices.pop_back();
+
+      // find the edge to split in big_arr
+      CGAL_assertion(map_halfedges.is_defined(split_e));
+      Halfedge_handle big_e = map_halfedges[split_e];
+
+      // use the O(1) operation _split_edge      
+      Halfedge_handle big_e1 =
+        big_arr_accessor.split_edge_ex(big_e, big_v, e1->curve(), e2->curve());
+
+      Halfedge_handle big_e2 = big_e1->next();
+      
+      // update mapping of new halfedges
+      // big_e1 is directed at big_v, as e1 is directed at split_v -
+      // these are supposed to be mapped
+      CGAL_assertion(map_halfedges.is_defined(e1) &&
+                     map_halfedges[e1] == big_e1);
+      // should update the mapping of the second halfedge     
+      map_halfedges[e2] = big_e2;
+      map_halfedges[e2->twin()] = big_e2->twin();
+    }
+
+    virtual void before_add_isolated_vertex(Face_handle f,
+                                            Vertex_handle /* v */)
+    {
+      saved_face = f;
+    }
+    virtual void after_add_isolated_vertex(Vertex_handle v)
+    {
+      // make sure it is the only new vertex right now
+      CGAL_assertion(new_vertices.size() == 1 &&
+                     new_vertices.back() == v);
+      new_vertices.pop_back();
+
+
+      CGAL_assertion(map_vertices.is_defined(v));
+      CGAL_assertion(map_faces.is_defined(saved_face));
+      
+      // find features in big_arr
+      Vertex_handle big_v = map_vertices[v];
+
+      Face_handle   big_face = map_faces[saved_face];
+      
+
+      // can use O(1) operation _insert_isolated_vertex
+      big_arr_accessor.insert_isolated_vertex(big_face, big_v);
+    }
+
+    virtual void before_move_inner_ccb(Face_handle from_f,
+                                       Face_handle to_f,
+                                       Ccb_halfedge_circulator )
+    {
+      // should be used after insert_at_vertices which creates a new face
+      CGAL_assertion(is_in_relocate);
+      move_from = from_f;
+      move_to = to_f;
+    }
+    virtual void after_move_inner_ccb(Ccb_halfedge_circulator h)
+    {
+      CGAL_assertion(map_faces.is_defined(move_from));
+      CGAL_assertion(map_faces.is_defined(move_to));
+      CGAL_assertion(map_halfedges.is_defined(h));
+
+      Face_handle big_from_f  = map_faces[move_from];
+      Face_handle big_to_f = map_faces[move_to];
+      Ccb_halfedge_circulator big_h = (map_halfedges[h])->ccb();
+
+      Ccb_halfedge_circulator big_ccb = big_h;
+      
+      big_arr_accessor.move_inner_ccb(big_from_f, big_to_f, big_ccb);
+
+    }
+
+    virtual void before_move_isolated_vertex(Face_handle from_f,
+                                             Face_handle to_f,
+                                             Vertex_handle )
+    {
+      // should be used after insert_at_vertices which creates a new face
+
+      CGAL_assertion(is_in_relocate);
+      move_from = from_f;
+      move_to = to_f;
+    }
+    virtual void after_move_isolated_vertex(Vertex_handle v)
+    {
+      CGAL_assertion(map_faces.is_defined(move_from));
+      CGAL_assertion(map_faces.is_defined(move_to));
+      CGAL_assertion(map_vertices.is_defined(v));
+
+      Face_handle big_from_f  = map_faces[move_from];
+      Face_handle big_to_f = map_faces[move_to];
+      Vertex_handle big_v = map_vertices[v];
+
+      big_arr_accessor.move_isolated_vertex(big_from_f, big_to_f, big_v);
+    }
+
+  protected:
+    Minimization_diagram_2& small_arr;
+    Minimization_diagram_2& big_arr;
+    Md_accessor             big_arr_accessor;
+
+    // mappings between small_arr features to big_arr features
+    Halfedges_map& map_halfedges;
+    Vertices_map&  map_vertices;
+    Faces_map&     map_faces;
+    std::deque<Vertex_handle> new_vertices;
+    
+    // state for actions
+    Vertex_handle create_edge_v1;
+    Vertex_handle create_edge_v2;
+    Vertex_handle split_v, split_fict_v;
+    Halfedge_handle split_e, split_fict_e;
+    Face_handle   saved_face;
+    Face_handle   move_from;
+    Face_handle   move_to;    
+
+    // for the create_vertex call-back
+    X_monotone_curve_2  boundary_vertex_cv;
+    Arr_curve_end           boundary_vertex_ind;
+    Arr_parameter_space ps_x;
+    Arr_parameter_space ps_y;
+    bool is_in_relocate;
+    
+  };
+
+  // A zone visitor for the Minimization Diagram which only inserts
+  // parts of the curve which are inside a given face
+  // it also remembers those parts which overlap the boundary of the original
+  // face
+  class Copied_face_zone_visitor
+  {
+  public:
+    typedef typename Minimization_diagram_2::Vertex_handle     Vertex_handle;
+    typedef typename Minimization_diagram_2::Halfedge_handle   Halfedge_handle;
+    typedef typename Minimization_diagram_2::Face_handle       Face_handle;
+
+    typedef typename Minimization_diagram_2::Point_2           Point_2;
+    typedef typename Minimization_diagram_2::X_monotone_curve_2
+      X_monotone_curve_2;
+
+    typedef std::pair<Halfedge_handle, bool>                   Result;
+
+    Copied_face_zone_visitor(Minimization_diagram_2& result,
+                             Minimization_diagram_2& copied,
+                             Face_handle orig_face,
+                             Face_handle copied_face,
+                             Halfedges_map& map_h,
+                             Vertices_map& map_v,
+                             Faces_map& map_f,
+                             Halfedges_list& se, // special edges
+                             Halfedges_w_type_list& new_edges,
+                             Faces_list& face_parts,
+                             Vertices_list& sv, // special vertices
+                             Self* p)
+      : copied_arr(copied),
+        result_arr(result),
+        result_original_face(orig_face),
+        map_halfedges(map_h),
+        map_vertices(map_v),
+        map_faces(map_f),
+        result_special_edges(se),
+        result_new_edges(new_edges),
+        result_face_parts(face_parts),
+        result_special_vertices(sv),
+        md_copy_observer(copied, result, map_h, map_v, map_f),
+        md_observer(map_h),
+        parent(p)
+    {
+      // init maps
+      copied_face_parts[copied_face] = copied_face_parts.default_value();
+
+      Halfedge_iterator hi = copied_arr.halfedges_begin();
+      for (; hi != copied_arr.halfedges_end(); ++hi)
+      {
+        copied_arr_boundary_halfedges[hi] =
+          copied_arr_boundary_halfedges.default_value();
+        if (hi->face() == copied_face && 
+            !hi->target()->is_at_open_boundary()) //BZBZ
+          copied_vertices_to_halfedges[hi->target()] = hi;
+      }
+                   
+      Vertex_iterator vi = copied_arr.vertices_begin();
+      for (; vi != copied_arr.vertices_end(); ++vi)
+      {
+        copied_arr_orig_vertices[vi] =
+          copied_arr_orig_vertices.default_value();
+        
+        if (vi->is_isolated())
+        {
+          CGAL_assertion(vi->face() == copied_face);
+          copied_vertices_to_halfedges[vi] = Halfedge_handle(NULL);
+        }
+        else
+          CGAL_assertion(copied_vertices_to_halfedges.is_defined(vi));
+      }
+
+      // init observers
+      md_copy_observer.attach(copied_arr);
+      
+      md_observer.set_elements_collections(copied_arr_boundary_halfedges,
+                                           copied_arr_special_edges,
+                                           copied_arr_new_edges,
+                                           copied_face_parts,
+                                           copied_arr_new_boundary_vertices,
+                                           copied_arr_special_vertices,
+                                           copied_vertices_to_halfedges);
+      md_observer.attach(copied_arr);
+    }
+
+    virtual ~Copied_face_zone_visitor() {}
+
+    // the zone visitor functions
+
+    /*! Initialize the visitor with an arrangement object. */
+    void init (Minimization_diagram_2* arr)
+    {
+      CGAL_assertion(&copied_arr == arr);
+      insert_visitor.init(arr);
+    }
+
+    /*!
+     * Handle the a subcurve located in the interior of a given face.
+     * \param cv The subcurve.
+     * \param face The face containing cv's interior.
+     * \param left_v The vertex that corresponds to the left endpoint of cv
+     *               (or an invalid handle if no such arrangement vertex
+     *               exists).
+     * \param left_he The halfedge that contains the left endpoint of cv
+     *               (or an invalid handle if no such halfedge exists).
+     * \param right_v The vertex that corresponds to the right endpoint of cv
+     *               (or an invalid handle if no such arrangement vertex
+     *               exists).
+     * \param right_he The halfedge that contains the right endpoint of cv
+     *                 (or an invalid handle if no such halfedge exists).
+     * \return A handle to the halfedge obtained from the insertion of the
+     *         subcurve into the arrangement.
+     */
+    Result found_subcurve(const X_monotone_curve_2& cv,
+                          Face_handle face,
+                          Vertex_handle left_v, Halfedge_handle left_he,
+                          Vertex_handle right_v, Halfedge_handle right_he)
+    {
+      // insert the curve only if the face is ok
+      if (is_face_ok(face))
+      {
+        CGAL_assertion(copied_arr.is_valid());
+        Result base_result = insert_visitor.found_subcurve(cv, face,
+                                                           left_v, left_he,
+                                                           right_v, right_he);
+        // update the collection of newly added edges
+        Halfedge_handle new_he = base_result.first;
+        copied_arr_new_edges[new_he] = itype;
+        copied_arr_new_edges[new_he->twin()] = itype;
+        
+        // take care for special vertices. the split vertices are always
+        // special, and this is taken care of in the after_split event.
+
+        // here we should update the original vertices that consolidate with
+        // the new subcurve
+        if (copied_arr_orig_vertices.is_defined(new_he->source()))
+          copied_arr_special_vertices[new_he->source()] =
+            copied_arr_special_vertices.default_value();
+
+        if (copied_arr_orig_vertices.is_defined(new_he->target()))
+          copied_arr_special_vertices[new_he->target()] =
+            copied_arr_special_vertices.default_value();
+
+        // we should set the halfedge-face, halfedge-target 
+        // and target-face aux flags on the new edge (of result)
+        Halfedge_handle result_new_he = map_halfedges[new_he];
+        // it is clear that the halfedge-face are all true
+        result_new_he->set_is_equal_aux_data_in_face(0, true);
+        result_new_he->set_is_equal_aux_data_in_face(1, true);
+
+        result_new_he->twin()->set_is_equal_aux_data_in_face(0, true);
+        result_new_he->twin()->set_is_equal_aux_data_in_face(1, true);
+        result_new_he->set_has_equal_aux_data_in_face(0, true);
+        result_new_he->set_has_equal_aux_data_in_face(1, true);
+        result_new_he->twin()->set_has_equal_aux_data_in_face(0, true);
+        result_new_he->twin()->set_has_equal_aux_data_in_face(1, true);
+        // for the halfedge-target flags, if the vertex is a boundary vertex
+        // we should use its boundary halfedge as intermediary between the face
+        // and the vertex (or the vertex info if it was isolated)
+        // otherwise, we set flags to true since it is a new vertex inside the
+        // original face, and have same aux data as all face parts
+        if (is_boundary_vertex(new_he->target()))
+        {
+          Vertex_handle cur_t = new_he->target();
+          CGAL_assertion(copied_vertices_to_halfedges.is_defined(cur_t));
+          Halfedge_handle copied_b_he = copied_vertices_to_halfedges[cur_t];
+          if (copied_b_he == Halfedge_handle(NULL))
+          {
+            // this was an isolated vertex, which we touch
+            // since we have in the new edge aux sources as in the face,
+            // we can copy the vertex-face flags from the vertex
+            result_new_he->set_is_equal_aux_data_in_target
+              (0, cur_t->get_is_equal_aux_data_in_face(0));
+            result_new_he->set_is_equal_aux_data_in_target
+              (1, cur_t->get_is_equal_aux_data_in_face(1));
+            result_new_he->set_has_equal_aux_data_in_target
+              (0, cur_t->get_has_equal_aux_data_in_face(0));
+            result_new_he->set_has_equal_aux_data_in_target
+              (1, cur_t->get_has_equal_aux_data_in_face(1));
+            result_new_he->set_has_equal_aux_data_in_target_and_face
+              (0, cur_t->get_has_equal_aux_data_in_face(0));
+            result_new_he->set_has_equal_aux_data_in_target_and_face
+              (1, cur_t->get_has_equal_aux_data_in_face(1));
+          }
+          else
+          {
+            CGAL_assertion(copied_b_he->target() == cur_t);
+            CGAL_assertion(is_boundary_edge(copied_b_he));
+            Halfedge_handle b_he = map_halfedges[copied_b_he];
+
+
+            bool flag;
+            flag = (b_he->get_is_equal_aux_data_in_face(0) &&
+                    b_he->get_is_equal_aux_data_in_target(0));
+            result_new_he->set_is_equal_aux_data_in_target(0, flag);
+            
+            flag = (b_he->get_is_equal_aux_data_in_face(1) &&
+                    b_he->get_is_equal_aux_data_in_target(1));
+            result_new_he->set_is_equal_aux_data_in_target(1, flag);
+
+            flag = b_he->get_has_equal_aux_data_in_target_and_face(0);
+            //CGAL_assertion(flag == parent->has_equal_aux_data(0, b_he->face(), b_he->target()));
+            result_new_he->set_has_equal_aux_data_in_target(0, flag);
+            result_new_he->set_has_equal_aux_data_in_target_and_face(0, flag);
+
+            flag = b_he->get_has_equal_aux_data_in_target_and_face(1);
+            //CGAL_assertion(flag == parent->has_equal_aux_data(1, b_he->face(), b_he->target()));
+            result_new_he->set_has_equal_aux_data_in_target(1, flag);
+            result_new_he->set_has_equal_aux_data_in_target_and_face(1, flag);
+
+          }
+        }
+        else // not a boundary vertex
+        {
+          result_new_he->set_is_equal_aux_data_in_target(0, true);
+          result_new_he->set_is_equal_aux_data_in_target(1, true);
+          // the face's data is not empty - so it is ok to set "true" here
+          result_new_he->set_has_equal_aux_data_in_target(0, true);
+          result_new_he->set_has_equal_aux_data_in_target(1, true);
+          result_new_he->set_has_equal_aux_data_in_target_and_face(0, true);
+          result_new_he->set_has_equal_aux_data_in_target_and_face(1, true);
+        }
+        
+        if (is_boundary_vertex(new_he->source()))
+        {
+          Vertex_handle cur_t = new_he->source();
+          CGAL_assertion(copied_vertices_to_halfedges.is_defined(cur_t));
+          Halfedge_handle copied_b_he = copied_vertices_to_halfedges[cur_t];
+          if (copied_b_he == Halfedge_handle(NULL))
+          {
+            // this was an isolated vertex, which we touch
+            // since we have in the new edge aux sources as in the face,
+            // we can copy the vertex-face flags from the vertex
+            result_new_he->twin()->set_is_equal_aux_data_in_target
+              (0, cur_t->get_is_equal_aux_data_in_face(0));
+            result_new_he->twin()->set_is_equal_aux_data_in_target
+              (1, cur_t->get_is_equal_aux_data_in_face(1));
+            result_new_he->twin()->set_has_equal_aux_data_in_target
+              (0, cur_t->get_has_equal_aux_data_in_face(0));
+            result_new_he->twin()->set_has_equal_aux_data_in_target
+              (1, cur_t->get_has_equal_aux_data_in_face(1));
+            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face
+              (0, cur_t->get_has_equal_aux_data_in_face(0));
+            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face
+              (1, cur_t->get_has_equal_aux_data_in_face(1));
+          }
+          else
+          {
+            CGAL_assertion(copied_b_he->target() == cur_t);
+            CGAL_assertion(is_boundary_edge(copied_b_he));
+            Halfedge_handle b_he = map_halfedges[copied_b_he];
+
+            bool flag;
+            flag = (b_he->get_is_equal_aux_data_in_face(0) &&
+                    b_he->get_is_equal_aux_data_in_target(0));
+            result_new_he->twin()->set_is_equal_aux_data_in_target(0, flag);
+            
+            flag = (b_he->get_is_equal_aux_data_in_face(1) &&
+                    b_he->get_is_equal_aux_data_in_target(1));
+            result_new_he->twin()->set_is_equal_aux_data_in_target(1, flag);
+
+            flag = b_he->get_has_equal_aux_data_in_target_and_face(0);
+            //CGAL_assertion(flag == parent->has_equal_aux_data(0, b_he->face(), b_he->target()));
+            result_new_he->twin()->set_has_equal_aux_data_in_target(0, flag);
+            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(0, flag);
+
+            flag = b_he->get_has_equal_aux_data_in_target_and_face(1);
+            //CGAL_assertion(flag == parent->has_equal_aux_data(1, b_he->face(), b_he->target()));
+            result_new_he->twin()->set_has_equal_aux_data_in_target(1, flag);
+            result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, flag);
+          }
+        }
+        else
+        {
+          result_new_he->twin()->set_is_equal_aux_data_in_target(0, true);
+          result_new_he->twin()->set_is_equal_aux_data_in_target(1, true);
+          result_new_he->twin()->set_has_equal_aux_data_in_target(0, true);
+          result_new_he->twin()->set_has_equal_aux_data_in_target(1, true);
+          result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(0, true);
+          result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, true);
+        }
+
+        return base_result;
+      }
+      else
+      {
+        // we don't insert the subcurve, but it might touch a vertex of the
+        // face's boundary - we need to check it and identify special vertices
+        if (left_v != Vertex_handle(NULL) &&
+            copied_arr_orig_vertices.is_defined(left_v))
+          copied_arr_special_vertices[left_v] =
+            copied_arr_special_vertices.default_value();
+
+        if (right_v != Vertex_handle(NULL) &&
+            copied_arr_orig_vertices.is_defined(right_v))
+          copied_arr_special_vertices[right_v] =
+            copied_arr_special_vertices.default_value();
+        
+        Halfedge_handle invalid_hh;
+        return Result (invalid_hh, false);
+      }
+    }
+
+    /*!
+     * Handle the a subcurve that overlaps a given edge.
+     * \param cv The overlapping subcurve.
+     * \param he The overlapped halfedge (directed from left to right).
+     * \param left_v The vertex that corresponds to the left endpoint of cv
+     *               (or an invalid handle if no such arrangement vertex
+     *               exists).
+     * \param right_v The vertex that corresponds to the right endpoint of cv
+     *               (or an invalid handle if no such arrangement vertex
+     *               exists).
+     * \return A handle to the halfedge obtained from the insertion of the
+     *         overlapping subcurve into the arrangement.
+     */
+    Result found_overlap(const X_monotone_curve_2& cv,
+                         Halfedge_handle he,
+                         Vertex_handle left_v, Vertex_handle right_v)
+    {
+      // check if the halfedge is the boundary of the original face
+      // (here we assume that this indication is dealt with in an observer
+      //  attached to the md, and implements split_edge)
+      bool is_boundary = is_boundary_edge(he);
+
+      // use insert_visitor to get the halfedge with the overlap
+      Result base_res = insert_visitor.found_overlap(cv, he, left_v, right_v);
+
+      Halfedge_handle overlap_he = base_res.first;
+
+      // take care for special vertices. the split vertices are always special,
+      // and this is taken care of in the after_split event.
+      // here we should update the original vertices that consolidate with the
+      // new subcurve
+      if (copied_arr_orig_vertices.is_defined(overlap_he->source()))
+        copied_arr_special_vertices[overlap_he->source()] =
+          copied_arr_special_vertices.default_value();
+
+      if (copied_arr_orig_vertices.is_defined(overlap_he->target()))
+        copied_arr_special_vertices[overlap_he->target()] =
+          copied_arr_special_vertices.default_value();
+
+      if (!is_boundary)
+        return base_res;
+
+      // if he is a boundary edge, it is a special edge
+      if (is_boundary)
+      {
+        copied_arr_special_edges[overlap_he] =
+          copied_arr_special_edges.default_value();
+        copied_arr_special_edges[overlap_he->twin()] =
+          copied_arr_special_edges.default_value();
+      }
+      return base_res;
+    }
+
+    /*!                                                   
+
+     * Handle point that lies inside a given face.
+     * \param p The point.
+     * \param face The face inside which the point lies.
+     * \return A handle to the new vertex obtained from the insertion of the
+     *         point into the face, or invalid handle if the point wasn't
+     *         inserted to the arrangement.
+     */
+    Vertex_handle found_point_in_face(const Point_2& p, Face_handle face)
+    {
+      // p lies inside a face: Insert it as an isolated vertex it the interior
+      // of this face.
+      Vertex_handle vh_for_p;
+      if (is_face_ok(face))
+      {
+        Arr_accessor<Minimization_diagram_2> arr_access (copied_arr);
+        arr_access.notify_before_global_change();
+        vh_for_p = copied_arr.insert_in_face_interior(p, face);
+        arr_access.notify_after_global_change();
+
+      	// now should set the is_equal and has_equal flags
+      	CGAL_assertion(map_vertices.is_defined(vh_for_p));
+      	Vertex_handle result_new_v = map_vertices[vh_for_p];
+      	result_new_v->set_is_equal_aux_data_in_face(0, true);
+      	result_new_v->set_is_equal_aux_data_in_face(1, true);
+        result_new_v->set_has_equal_aux_data_in_face(0, true);
+      	result_new_v->set_has_equal_aux_data_in_face(1, true);
+      }
+      return vh_for_p;
+    }
+
+    /*!
+     * Handle point that lies on a given edge.
+     * \param p The point.
+     * \param he The edge on which the point lies.
+     * \return A handle to the new vertex obtained from the insertion of the
+     *         point into the edge, or invalid handle if the point wasn't
+     *         inserted to the arrangement.
+     */
+    Vertex_handle found_point_on_edge(const Point_2& p, Halfedge_handle he)
+    {
+      // p lies in the interior of an edge: Split this edge to create a new
+      // vertex associated with p.
+      X_monotone_curve_2  sub_cv1, sub_cv2;
+      Halfedge_handle     split_he;
+      copied_arr.geometry_traits()->
+        split_2_object() (he->curve(), p, sub_cv1, sub_cv2);
+
+      Arr_accessor<Minimization_diagram_2> arr_access (copied_arr);
+      arr_access.notify_before_global_change();
+      split_he = copied_arr.split_edge (he, sub_cv1, sub_cv2);
+      arr_access.notify_after_global_change();
+
+      // if the edge is a boundary edge, then the new vertex is a special
+      // vertex and this is taken care of in the after_split event
+
+      // TODO: should we update some is_equal / has_equal flags? 
+      // I think that no, because it is handled in the after_split event
+
+      // The new vertex is the target of the returned halfedge.
+
+      return split_he->target();
+    }
+
+    /*!
+     * Handle point that lies on a given vertex.
+     * \param p The point.
+     * \param v The vertex on which the point lies.
+     * \return A handle to the new vertex obtained from the modifying
+     *         the existing vertex.
+     */
+    Vertex_handle found_point_on_vertex(const Point_2& p, Vertex_handle v)
+    {
+      // if the vertex is a boundary vertex, then it is a special vertex
+      // if it was created by split of a boundary edge, then it is already
+      // marked as special. we need to mark it as special if it is an original
+      // vertex
+      if (copied_arr_orig_vertices.is_defined(v))
+        copied_arr_special_vertices[v] =
+          copied_arr_special_vertices.default_value();
+
+      return copied_arr.modify_vertex (v, p);
+    }
+
+    /*!
+     * Update all the output collections using the internal data saved during
+     * the previous inserts.
+     * Should be called after all inserts have finished.
+     */
+    void finish()
+    {
+      // result_special_edges
+      // result_new_edges
+      Halfedge_iterator hi = copied_arr.halfedges_begin();
+      for (; hi != copied_arr.halfedges_end(); ++hi, ++hi)
+      {
+        Halfedge_handle h = hi;
+        CGAL_assertion(map_halfedges.is_defined(h) &&
+                       map_halfedges.is_defined(h->twin()));
+
+
+        // we need only one of the twin halfedges to represent the new edge
+        if (copied_arr_new_edges.is_defined(h))
+          result_new_edges.push_back(std::make_pair(map_halfedges[h],
+                                                    copied_arr_new_edges[h]));
+
+        if (copied_arr_special_edges.is_defined(h))
+        {
+          // we need the halfedge that its incident face is inside the original
+          // face
+          Face_handle f1 = h->face();
+          if (copied_face_parts.is_defined(f1))
+            result_special_edges.push_back(map_halfedges[h]);
+          else
+          {
+            CGAL_assertion_code(Face_handle f2 = h->twin()->face());
+            CGAL_assertion(copied_face_parts.is_defined(f2));
+            result_special_edges.push_back(map_halfedges[h->twin()]);
+          }
+        }
+      }
+
+      // result_face_parts
+      Face_iterator fi = copied_arr.faces_begin();
+      for (; fi != copied_arr.faces_end(); ++fi)
+      {
+        Face_handle f = fi;
+        if (copied_face_parts.is_defined(f))
+        {
+          CGAL_assertion(map_faces.is_defined(f));
+          result_face_parts.push_back(map_faces[f]);
+        }
+      }
+      
+      // result_special_vertices
+      Vertex_iterator vi = copied_arr.vertices_begin();
+      for (; vi != copied_arr.vertices_end(); ++vi)
+
+      {
+        Vertex_handle v = vi;
+        CGAL_assertion(map_vertices.is_defined(v));
+        Vertex_handle result_v = map_vertices[v];
+        
+        if (copied_arr_orig_vertices.is_defined(v))
+        {
+          // original vertex should be mapped to a boundary halfedge whose
+          // target is the vertex
+          CGAL_assertion(copied_vertices_to_halfedges.is_defined(v));
+          Halfedge_handle inc_he = copied_vertices_to_halfedges[v];
+          CGAL_assertion(copied_face_parts.is_defined(inc_he->face()));
+
+          Halfedge_handle result_inc_he = map_halfedges[inc_he];
+          CGAL_assertion(result_inc_he->target() == result_v);
+          CGAL_assertion(map_faces[inc_he->face()] == result_inc_he->face());
+
+          // original vertex is special if it appears in the special collection
+          // and its aux data share equal surfaces with the faces aux data
+          if (copied_arr_special_vertices.is_defined(v) &&
+              ((result_v->is_isolated() && 
+                parent->has_equal_aux_data_with_face(result_v)) ||
+               (!result_v->is_isolated() && 
+                parent->has_equal_aux_data_in_target_and_face(result_inc_he)))) 
+          {
+            //CGAL_assertion(parent->has_equal_aux_data(result_v, result_original_face));
+            result_special_vertices.push_back(result_v); 
+          }  
+        }
+        else
+        {
+          if (!copied_arr_new_boundary_vertices.is_defined(v))
+            // new vertex inside the face
+            result_special_vertices.push_back(result_v);
+          else if (copied_arr_special_vertices.is_defined(v))
+            result_special_vertices.push_back(result_v);
+        }
+      }
+    }
+
+    void set_current_intersection_type(Multiplicity t)
+    {
+      itype = t;
+    }
+  protected:
+
+    bool is_face_ok(Face_handle face)
+    {
+      // is this face a part of the original face?
+      // check in the copied_face_parts map
+      return (copied_face_parts.is_defined(face));
+    }
+
+    bool is_boundary_edge(Halfedge_handle he)
+    {
+      return (copied_arr_boundary_halfedges.is_defined(he));
+    }
+
+    bool is_original_boundary_vertex(Vertex_handle v)
+    {
+      return (copied_arr_orig_vertices.is_defined(v));
+    }
+    bool is_boundary_vertex(Vertex_handle v)
+    {
+      return (copied_arr_orig_vertices.is_defined(v) ||
+              copied_arr_new_boundary_vertices.is_defined(v));
+    }
+
+  protected:
+    // this zone visitor knows how to insert the given subcurves into the
+    // minimization diagram. we use it to insert the subcurves we want (which
+    // are in the given original face)
+    Md_insert_zone_visitor insert_visitor;
+
+    Minimization_diagram_2& copied_arr;
+    Minimization_diagram_2& result_arr;
+    Face_handle result_original_face;
+    
+    // mappings between features in the 2 arrangements
+    Halfedges_map& map_halfedges;
+    Vertices_map& map_vertices;
+    Faces_map& map_faces;
+
+    // output lists
+    Halfedges_list& result_special_edges;
+    Halfedges_w_type_list& result_new_edges;
+    Faces_list& result_face_parts;
+    Vertices_list& result_special_vertices;
+
+    // helper collections (for copied_arr features)
+    Halfedges_hash        copied_arr_boundary_halfedges;
+    Vertices_hash         copied_arr_orig_vertices;
+    Vertices_hash         copied_arr_new_boundary_vertices;
+    Vertices_to_edges_map copied_vertices_to_halfedges;    
+
+    Halfedges_hash        copied_arr_special_edges;
+    Halfedges_hash_w_type copied_arr_new_edges;
+    Faces_hash            copied_face_parts;
+    Vertices_hash         copied_arr_special_vertices;
+
+    // this observer will take care of the result arrangegment
+    Copy_observer        md_copy_observer;
+
+    // this observer will keep all our information in the helper collections
+    // during the insert process
+    // (the special features info, boundary info, new_edges)
+    Copied_face_observer md_observer;
+    
+    // for using its methods
+    Self* parent;
+
+    // current type of interection curve that is inserted
+    Multiplicity itype;
+  };
+
+  // this minimization diagram observer updates data in new faces created
+  class New_faces_observer : public Md_observer
+  {
+  public:
+    typedef typename Minimization_diagram_2::Face_handle Face_handle;
+
+    New_faces_observer(Minimization_diagram_2& arr) : Md_observer(arr) {}
+    
+    virtual ~New_faces_observer() {}
+
+    virtual void after_split_face(Face_handle org_f,
+                                  Face_handle new_f,
+                                  bool)
+    {
+      // update the new face's aux_data from original face
+      if (org_f->get_aux_is_set(0))
+        new_f->set_aux_source(0, org_f->get_aux_source(0));
+      if (org_f->get_aux_is_set(1))
+        new_f->set_aux_source(1, org_f->get_aux_source(1));
+    }
+
+  };
+
+  //! The geometry traits object.
+  const Traits* m_traits;
+
+  //! Indicates whether the geometry traits object should be freed up.
+  bool own_traits;
+
+  //! The type of envelope (ENVELOPE_LOWER or ENVELOPE_UPPER).
+  Envelope_type type; 
+};
+
+#undef HE_COMP_RES
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_overlay_2.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_overlay_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_overlay_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_overlay_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_overlay_functor.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_overlay_functor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_overlay_functor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_overlay_functor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_pm_dcel.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_pm_dcel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/Envelope_pm_dcel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/Envelope_pm_dcel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_3/set_dividors.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_3/set_dividors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_3/set_dividors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_3/set_dividors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Envelope_diagram_1.h b/3rdparty/CGAL-4.8/include/CGAL/Envelope_diagram_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Envelope_diagram_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Envelope_diagram_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Epick_d.h b/3rdparty/CGAL-4.8/include/CGAL/Epick_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Epick_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Epick_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Euclidean_distance.h b/3rdparty/CGAL-4.8/include/CGAL/Euclidean_distance.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Euclidean_distance.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Euclidean_distance.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Euclidean_distance_sphere_point.h b/3rdparty/CGAL-4.8/include/CGAL/Euclidean_distance_sphere_point.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Euclidean_distance_sphere_point.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Euclidean_distance_sphere_point.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Euler_integrator_2.h b/3rdparty/CGAL-4.8/include/CGAL/Euler_integrator_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Euler_integrator_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Euler_integrator_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_circular_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_circular_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exact_circular_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exact_circular_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_integer.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_integer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exact_integer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exact_integer.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel.h
new file mode 100644
index 0000000..5c2b92a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel.h
@@ -0,0 +1,98 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas, Sylvain Pion
+
+#ifndef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
+#define CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Lazy_exact_nt.h>
+#include <CGAL/Triangulation_structural_filtering_traits.h>
+#include <CGAL/internal/Exact_type_selector.h>
+
+#ifndef CGAL_DONT_USE_LAZY_KERNEL
+#  include <CGAL/Lazy_kernel.h>
+#endif
+
+namespace CGAL {
+
+// Epeck_ft is either Gmpq, or leda_rational, or Quotient<MP_float>
+typedef internal::Exact_field_selector<double>::Type Epeck_ft;
+
+// The following are redefined kernels instead of simple typedefs in order to shorten
+// template name length (for error messages, mangling...).
+
+#ifdef CGAL_DONT_USE_LAZY_KERNEL
+
+// Equivalent to Filtered_kernel<Simple_cartesian<Lazy_exact_nt<Epeck_ft> > >
+class Epeck
+  : public Filtered_kernel_adaptor<
+               Type_equality_wrapper< Simple_cartesian<Lazy_exact_nt<Epeck_ft> >::Base<Epeck>::Type, Epeck >,
+#ifdef CGAL_NO_STATIC_FILTERS
+               false >
+#else
+               true >
+#endif
+{}; // end class Epeck
+
+#else // no CGAL_DONT_USE_LAZY_KERNEL
+
+// Equivalent to Lazy_kernel<Simple_cartesian<Epeck_ft> >
+#ifdef CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
+class Epeck
+  : public internal::Static_filters<
+      Type_equality_wrapper<
+             Lazy_kernel_base< Simple_cartesian<Epeck_ft>,
+                               Simple_cartesian<Interval_nt_advanced>,
+	                       Cartesian_converter< Simple_cartesian<Epeck_ft>,
+                                                    Simple_cartesian<Interval_nt_advanced> >,
+                               Epeck>,
+             Epeck >, false>
+{};
+
+#else // no CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
+
+class Epeck
+  : public Type_equality_wrapper<
+             Lazy_kernel_base< Simple_cartesian<Epeck_ft>,
+                               Simple_cartesian<Interval_nt_advanced>,
+	                       Cartesian_converter< Simple_cartesian<Epeck_ft>,
+                                                    Simple_cartesian<Interval_nt_advanced> >,
+                               Epeck>,
+             Epeck >
+{};
+#endif // no CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT
+
+#endif // no CGAL_DONT_USE_LAZY_KERNEL
+
+typedef Epeck Exact_predicates_exact_constructions_kernel;
+
+template <>
+struct Triangulation_structural_filtering_traits<Epeck> {
+  typedef Tag_true Use_structural_filtering_tag;
+};
+
+} //namespace CGAL
+
+#endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h
new file mode 100644
index 0000000..0431fde
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hemmer
+
+#ifndef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_KTH_ROOT_H
+#define CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_KTH_ROOT_H
+
+#include <CGAL/Simple_cartesian.h>
+
+#ifdef CGAL_USE_LEDA
+#  include <CGAL/leda_real.h>
+#elif defined CGAL_USE_CORE
+#  include <CGAL/CORE_Expr.h>
+#else
+#  error "You need LEDA or CORE installed."
+#endif
+
+namespace CGAL {
+
+#ifdef CGAL_USE_LEDA
+typedef Simple_cartesian< leda_real >
+        Exact_predicates_exact_constructions_kernel_with_kth_root;
+#elif defined CGAL_USE_CORE
+typedef Simple_cartesian< CORE::Expr >
+        Exact_predicates_exact_constructions_kernel_with_kth_root;
+#endif
+
+} //namespace CGAL
+
+#endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_KTH_ROOT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h
new file mode 100644
index 0000000..13c3503
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hemmer
+
+#ifndef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_ROOT_OF_H
+#define CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_ROOT_OF_H
+
+#include <CGAL/Simple_cartesian.h>
+
+#ifdef CGAL_USE_LEDA
+#  include <CGAL/leda_real.h>
+#elif defined CGAL_USE_CORE
+#  include <CGAL/CORE_Expr.h>
+#else
+#  error "You need LEDA or CORE installed."
+#endif
+
+namespace CGAL {
+
+#ifdef CGAL_USE_LEDA
+typedef Simple_cartesian< leda_real >
+        Exact_predicates_exact_constructions_kernel_with_root_of;
+#elif defined CGAL_USE_CORE
+typedef Simple_cartesian< CORE::Expr >
+        Exact_predicates_exact_constructions_kernel_with_root_of;
+#endif
+
+} //namespace CGAL
+
+#endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_WITH_ROOT_OF_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_inexact_constructions_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_inexact_constructions_kernel.h
new file mode 100644
index 0000000..2b9df49
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Exact_predicates_inexact_constructions_kernel.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas, Sylvain Pion
+
+#ifndef CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
+#define CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Triangulation_structural_filtering_traits.h>
+
+namespace CGAL {
+
+// The following is equivalent to Filtered_kernel< Simple_cartesian<double> >,
+// but it's shorter in terms of template name length (for error messages, mangling...).
+
+class Epick
+  : public Filtered_kernel_adaptor<
+               Type_equality_wrapper< Simple_cartesian<double>::Base<Epick>::Type, Epick >,
+#ifdef CGAL_NO_STATIC_FILTERS
+               false >
+#else
+               true >
+#endif
+{};
+
+typedef Epick Exact_predicates_inexact_constructions_kernel;
+
+template <>
+struct Triangulation_structural_filtering_traits<Epick> {
+  typedef Tag_true Use_structural_filtering_tag;
+};
+
+} //namespace CGAL
+
+#endif // CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exact_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exact_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exact_spherical_kernel_3.h b/3rdparty/CGAL-4.8/include/CGAL/Exact_spherical_kernel_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exact_spherical_kernel_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exact_spherical_kernel_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Exponent_vector.h b/3rdparty/CGAL-4.8/include/CGAL/Exponent_vector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Exponent_vector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Exponent_vector.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Extended_cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/Extended_cartesian.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Extended_cartesian.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Extended_cartesian.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Extended_homogeneous.h b/3rdparty/CGAL-4.8/include/CGAL/Extended_homogeneous.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Extended_homogeneous.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Extended_homogeneous.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Extremal_polygon_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Extremal_polygon_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Extremal_polygon_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Extremal_polygon_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/FPU.h b/3rdparty/CGAL-4.8/include/CGAL/FPU.h
new file mode 100644
index 0000000..94bedba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/FPU.h
@@ -0,0 +1,539 @@
+// Copyright (c) 1998-2008
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_FPU_H
+#define CGAL_FPU_H
+
+#include <CGAL/assertions.h>
+
+#ifndef __INTEL_COMPILER
+#include <cmath> // for HUGE_VAL
+#endif
+
+// This file specifies some platform dependant functions, regarding the FPU
+// directed rounding modes.  There is only support for double precision.
+//
+// It also contains the definition of the Protect_FPU_rounding<> class,
+// which helps to protect blocks of code needing a particular rounding mode.
+
+#if defined __alpha__  && defined __linux__
+extern "C" {
+#  include <fenv.h>
+}
+#elif defined __SUNPRO_CC && defined __sun
+#  include <ieeefp.h>
+#elif defined __osf || defined __osf__
+#  ifdef __GNUG__
+     // GCC seems to remove (fixincludes) read_rnd/write_rnd...
+#    include "/usr/include/float.h"
+#  else
+#    include <cfloat>
+#  endif
+#elif defined _MSC_VER || defined __sparc__ || \
+     (defined __i386__ && !defined __PGI && !defined __SUNPRO_CC \
+      && !defined __SSE2__)
+   // Nothing to include.
+#else
+   // By default we use the ISO C99 version.
+#  include <fenv.h>
+#endif
+
+
+// Some useful constants
+
+#if defined CGAL_CFG_NO_LIMITS
+#  if defined CGAL_CFG_DENORMALS_COMPILE_BUG
+     // For compilers crashing when dealing with denormalized values.
+     // So we have to generate it at run time instead.
+#ifdef CGAL_HEADER_ONLY
+#    define CGAL_IA_MIN_DOUBLE (CGAL::internal::get_static_minimin())
+#else
+#    define CGAL_IA_MIN_DOUBLE (CGAL::internal::minimin)
+#endif // CGAL_HEADER_ONLY
+#  else
+#    define CGAL_IA_MIN_DOUBLE (5e-324)
+#  endif
+#  define CGAL_IA_MAX_DOUBLE (1.7976931348623157081e+308)
+#else
+#  include <limits>
+#  define CGAL_IA_MIN_DOUBLE std::numeric_limits<double>::denorm_min()
+#  define CGAL_IA_MAX_DOUBLE (std::numeric_limits<double>::max)()
+#endif
+
+
+// Pure and safe SSE2 mode (g++ -mfpmath=sse && (-msse2 || -march=pentium4))
+// can be detected by :
+// TODO : see what Intel and VC++ have to say about this.
+#if defined __FLT_EVAL_METHOD__ && defined __SSE2_MATH__ && \
+      (__FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 1)
+#  define CGAL_SAFE_SSE2
+#  include <xmmintrin.h>
+#endif
+
+// The CGAL_FPU_HAS_EXCESS_PRECISION macro is defined if some computations with
+// double can use more than the 53bits of precision of IEEE754, and/or if the
+// exponent has a wider range.  This can produce double rounding effects and
+// other bad things that we need to protect against.
+// The typical offender is the traditional FPU of x86 (SSE2-only mode is not affected).
+// Are there others, besides itanium and m68k?
+#if !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT && \
+  (((defined __i386__ || defined __x86_64__) && !defined CGAL_SAFE_SSE2) \
+   || defined __ia64__ \
+   || defined _M_IX86 || defined _M_X64 || defined _M_IA64 \
+   || (defined FLT_EVAL_METHOD && FLT_EVAL_METHOD != 0 && FLT_EVAL_METHOD != 1))
+#  define CGAL_FPU_HAS_EXCESS_PRECISION
+#endif
+
+// Presence of SSE2 (for explicit use)
+#if  defined(__SSE2__) \
+  || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) \
+  || defined(_M_X64)
+#  include <emmintrin.h>
+#  define CGAL_HAS_SSE2 1
+#endif
+
+// Only define CGAL_USE_SSE2 for 64 bits where malloc has a suitable
+// alignment, 32 bits is too dangerous.
+#if defined(CGAL_HAS_SSE2) && (defined(__x86_64__) || defined(_M_X64))
+#  define CGAL_USE_SSE2 1
+#endif
+
+#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Interval_arithmetic_impl.h> // To define get_static_minimin();
+#else // CGAL_HEADER_ONLY
+namespace CGAL {
+namespace internal {
+CGAL_EXPORT extern double minimin;
+}
+}
+#endif // CGAL_HEADER_ONLY
+
+#endif
+
+namespace CGAL {
+namespace internal {
+#ifdef __INTEL_COMPILER
+const double infinity = std::numeric_limits<double>::infinity();
+#else
+const double infinity = HUGE_VAL;
+#endif
+
+} // namespace internal
+
+// Inline function to stop compiler optimizations that shouldn't happen with
+// pragma fenv on.
+// - constant propagation
+// - migration of fesetround across floating point operations
+// - (-a)-b -> -(a+b)
+// - (-a)*b -> -(a*b)
+// etc
+inline double IA_opacify(double x)
+{
+#ifdef __llvm__
+  // LLVM's support for inline asm is completely messed up:
+  // http://llvm.org/bugs/show_bug.cgi?id=17958
+  // http://llvm.org/bugs/show_bug.cgi?id=17959
+  // etc.
+  // This seems to produce code that is ok (not optimal but better than
+  // volatile). In case of trouble, use volatile instead.
+# ifdef CGAL_HAS_SSE2
+  asm volatile ("" : "+x"(x) );
+# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__
+  // ARM
+  asm volatile ("" : "+w"(x) );
+# else
+  asm volatile ("" : "+m"(x) );
+# endif
+  return x;
+#elif defined __xlC__
+  // PowerPC - XL C++ (the z/OS version supposedly does not define this macro)
+  // If we give it an alternative "+fm", it gets confused and generates worse code.
+  asm volatile ("" : "+f"(x) );
+  return x;
+#elif defined __GNUG__
+  // Intel used not to emulate this perfectly, we'll see.
+  // If we create a version of IA_opacify for vectors, note that gcc < 4.8
+  // fails with "+g" and we need to use "+mx" instead.
+  // "+X" ICEs ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and
+  // may not be safe?
+  // The constraint 'g' doesn't include floating point registers ???
+  // Intel has a bug where -mno-sse still defines __SSE__ and __SSE2__
+  // (-mno-sse2 works though), no work-around for now.
+# if defined __SSE2_MATH__ || (defined __INTEL_COMPILER && defined __SSE2__)
+#  if __GNUC__ * 100 + __GNUC_MINOR__ >= 409
+  // ICEs in reload/LRA with older versions.
+  asm volatile ("" : "+gx"(x) );
+#  else
+  asm volatile ("" : "+mx"(x) );
+#  endif
+# elif (defined __i386__ || defined __x86_64__)
+  // "+f" doesn't compile on x86(_64)
+  // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 )
+  // Don't mix "t" with "g": http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180
+  // We can't put "t" with "x" either, prefer "x" for -mfpmath=sse,387.
+  // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 )
+  asm volatile ("" : "+mt"(x) );
+# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__
+  // ARM
+  asm volatile ("" : "+gw"(x) );
+# elif defined __powerpc__ || defined __POWERPC__
+  // PowerPC
+  asm volatile ("" : "+gd"(x) );
+# elif defined __sparc
+  // Sparc
+  asm volatile ("" : "+ge"(x) );
+# elif defined __ia64
+  // Itanium
+  asm volatile ("" : "+gf"(x) );
+# else
+  asm volatile ("" : "+g"(x) );
+# endif
+  return x;
+#else
+  volatile double e = x;
+  return e;
+#endif
+}
+
+// Inline function to drop excess precision before we forget the rounding mode,
+// and stop compiler optimizations at the same time.
+inline double IA_force_to_double(double x)
+{
+#ifndef CGAL_FPU_HAS_EXCESS_PRECISION
+  return IA_opacify (x);
+#else
+#if defined __GNUG__
+#  ifdef CGAL_HAS_SSE2
+  // For an explanation of volatile:
+  // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027
+  asm volatile ("" : "+mx"(x) );
+#  else
+  // Similar to writing to a volatile and reading back, except that calling
+  // it k times in a row only goes through memory once.
+  asm volatile ("" : "+m"(x) );
+#  endif
+  return x;
+#else
+  volatile double e = x;
+  return e;
+#endif
+#endif
+}
+
+// Interval arithmetic needs to protect against double-rounding effects
+// caused by excess FPU precision, even if it forces the 53bit mantissa
+// precision, because there is no way to fix the problem for the exponent
+// which has the same problem.  This affects underflow and overflow cases.
+// In case one does not care about such "extreme" situations, one can
+// set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT to pretend there is no excess
+// precision.
+#if defined CGAL_FPU_HAS_EXCESS_PRECISION
+#  define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_force_to_double(x)
+#elif 1
+// LLVM doesn't have -frounding-math so needs extra protection.
+// GCC also migrates fesetround calls over FP instructions, so protect
+// everyone.
+#  define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_opacify(x)
+#else
+// Unused, reserved to compilers without excess precision and pragma fenv on.
+// ??? Should we trust Visual Studio not to optimize too much and let it use
+// this when CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT?
+#  define CGAL_IA_FORCE_TO_DOUBLE(x) (x)
+#endif
+
+// We sometimes need to stop constant propagation,
+// because operations are done with a wrong rounding mode at compile time.
+#ifndef CGAL_IA_DONT_STOP_CONSTANT_PROPAGATION
+#  define CGAL_IA_STOP_CPROP(x)    CGAL::IA_opacify(x)
+#else
+#  define CGAL_IA_STOP_CPROP(x)    (x)
+#endif
+
+// std::sqrt(double) on VC++ and CygWin is buggy when not optimizing.
+#if defined ( _MSC_VER ) && ! defined ( _WIN64 )
+inline double IA_bug_sqrt(double d)
+{
+  _asm
+  {
+    fld d
+    fsqrt
+    fstp d
+  }
+  return d;
+}
+
+#  define CGAL_BUG_SQRT(d) IA_bug_sqrt(d)
+
+
+#elif defined __SSE2_MATH__
+// For SSE2, we need to call __builtin_sqrt() instead of libc's sqrt().
+#  define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
+#elif defined __CYGWIN__
+inline double IA_bug_sqrt(double d)
+{
+  double r;
+  asm volatile ("fsqrt" : "=t"(r) : "0"(d));
+  return r;
+}
+#  define CGAL_BUG_SQRT(d) IA_bug_sqrt(d)
+#else
+#  define CGAL_BUG_SQRT(d) std::sqrt(d)
+#endif
+
+// Here are the operator macros that make use of the above.
+// With GCC, we can do slightly better : test with __builtin_constant_p()
+// that both arguments are constant before stopping one of them.
+// Use inline functions instead ?
+#define CGAL_IA_ADD(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)+CGAL_IA_STOP_CPROP(b))
+#define CGAL_IA_SUB(a,b) CGAL_IA_FORCE_TO_DOUBLE(CGAL_IA_STOP_CPROP(a)-(b))
+#define CGAL_IA_MUL(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)*CGAL_IA_STOP_CPROP(b))
+#define CGAL_IA_DIV(a,b) CGAL_IA_FORCE_TO_DOUBLE((a)/CGAL_IA_STOP_CPROP(b))
+#define CGAL_IA_SQUARE(a) CGAL_IA_MUL(a,a)
+#define CGAL_IA_SQRT(a) \
+        CGAL_IA_FORCE_TO_DOUBLE(CGAL_BUG_SQRT(CGAL_IA_STOP_CPROP(a)))
+
+
+#if defined CGAL_SAFE_SSE2
+
+#define CGAL_IA_SETFPCW(CW) _MM_SET_ROUNDING_MODE(CW)
+#define CGAL_IA_GETFPCW(CW) CW = _MM_GET_ROUNDING_MODE()
+typedef unsigned int FPU_CW_t;
+#define CGAL_FE_TONEAREST    _MM_ROUND_NEAREST
+#define CGAL_FE_TOWARDZERO   _MM_ROUND_TOWARD_ZERO
+#define CGAL_FE_UPWARD       _MM_ROUND_UP
+#define CGAL_FE_DOWNWARD     _MM_ROUND_DOWN
+
+#elif defined __i386__ && !defined __PGI && !defined __SUNPRO_CC \
+      && !defined CGAL_HAS_SSE2
+// If we use both 387 and sse2, be safe and drop to fe[gs]etround.
+// Can we test CGAL_USE_SSE2 instead?
+
+// The GNU libc version (cf powerpc) is nicer, but doesn't work on libc 5 :(
+// This one also works with CygWin.
+// Note that the ISO C99 version may not be enough because of the extended
+// mantissa issue on x86 (may be required by some kinds of computation, but
+// as far as CGAL::Interval_nt<> is concerned, the double-rounding issues
+// are taking care of there).
+#define CGAL_IA_SETFPCW(CW) asm volatile ("fldcw %0" : :"m" (CW))
+#define CGAL_IA_GETFPCW(CW) asm volatile ("fnstcw %0" : "=m" (CW))
+typedef unsigned short FPU_CW_t;
+#define CGAL_FE_TONEAREST    (0x000 | 0x127f)
+#define CGAL_FE_TOWARDZERO   (0xc00 | 0x127f)
+#define CGAL_FE_UPWARD       (0x800 | 0x127f)
+#define CGAL_FE_DOWNWARD     (0x400 | 0x127f)
+
+#elif defined __SUNPRO_CC && defined __sun
+#define CGAL_IA_SETFPCW(CW) fpsetround(fp_rnd(CW))
+#define CGAL_IA_GETFPCW(CW) CW = fpgetround()
+typedef unsigned int FPU_CW_t;
+#define CGAL_FE_TONEAREST    FP_RN
+#define CGAL_FE_TOWARDZERO   FP_RZ
+#define CGAL_FE_UPWARD       FP_RP
+#define CGAL_FE_DOWNWARD     FP_RM
+
+#elif defined __sparc__
+#define CGAL_IA_SETFPCW(CW) asm volatile ("ld %0,%%fsr" : :"m" (CW))
+#define CGAL_IA_GETFPCW(CW) asm volatile ("st %%fsr,%0" : "=m" (CW))
+typedef unsigned int FPU_CW_t;
+#define CGAL_FE_TONEAREST    (0x0        | 0x20000000 | 0x1f)
+#define CGAL_FE_TOWARDZERO   (0x40000000 | 0x20000000 | 0x1f)
+#define CGAL_FE_UPWARD       (0x80000000 | 0x20000000 | 0x1f)
+#define CGAL_FE_DOWNWARD     (0xc0000000 | 0x20000000 | 0x1f)
+
+#elif defined __mips__
+#define CGAL_IA_SETFPCW(CW) asm volatile ("ctc1 %0,$31" : :"r" (CW))
+#define CGAL_IA_GETFPCW(CW) asm volatile ("cfc1 %0,$31" : "=r" (CW))
+typedef unsigned int FPU_CW_t;
+#define CGAL_FE_TONEAREST    (0x0)
+#define CGAL_FE_TOWARDZERO   (0x1)
+#define CGAL_FE_UPWARD       (0x2)
+#define CGAL_FE_DOWNWARD     (0x3)
+
+#elif defined __osf || defined __osf__  // Not yet supported.
+#define CGAL_IA_SETFPCW(CW) write_rnd(CW)
+#define CGAL_IA_GETFPCW(CW) CW = read_rnd()
+typedef unsigned int FPU_CW_t;
+#define CGAL_FE_TONEAREST    FP_RND_RN
+#define CGAL_FE_TOWARDZERO   FP_RND_RZ
+#define CGAL_FE_UPWARD       FP_RND_RP
+#define CGAL_FE_DOWNWARD     FP_RND_RM
+
+#elif defined ( _MSC_VER )
+#if ( _MSC_VER < 1400)
+#define CGAL_IA_SETFPCW(CW) _controlfp (CW, _MCW_RC )
+#define CGAL_IA_GETFPCW(CW) CW = _controlfp (0, 0 ) &  _MCW_RC
+typedef unsigned short FPU_CW_t;
+#else
+#define CGAL_IA_SETFPCW(CW) unsigned int dummy; _controlfp_s (&dummy, CW, _MCW_RC )
+#define CGAL_IA_GETFPCW(CW)_controlfp_s (&CW, 0, 0 ); CW  &=  _MCW_RC
+typedef unsigned int FPU_CW_t;
+#endif
+
+#define CGAL_FE_TONEAREST    _RC_NEAR
+#define CGAL_FE_TOWARDZERO   _RC_CHOP
+#define CGAL_FE_UPWARD       _RC_UP
+#define CGAL_FE_DOWNWARD     _RC_DOWN
+
+#else
+// This is a version following the ISO C99 standard, which aims at portability.
+// The drawbacks are speed on one hand, and also, on x86, it doesn't fix the
+// extended mantissa issue (this is not a problem for IA, but it is one for
+// some future modular computations).
+#define CGAL_IA_SETFPCW(CW)  fesetround(CW)
+#define CGAL_IA_GETFPCW(CW)  CW = fegetround()
+typedef int FPU_CW_t;
+#define CGAL_FE_TONEAREST    FE_TONEAREST
+#define CGAL_FE_TOWARDZERO   FE_TOWARDZERO
+#define CGAL_FE_UPWARD       FE_UPWARD
+#define CGAL_FE_DOWNWARD     FE_DOWNWARD
+#endif
+
+// User interface:
+
+inline
+FPU_CW_t
+FPU_get_cw (void)
+{
+    FPU_CW_t cw;
+    CGAL_IA_GETFPCW(cw);
+    return cw;
+}
+
+} // namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/test_FPU_rounding_mode_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+namespace CGAL {
+
+// User interface (cont):
+
+inline
+void
+FPU_set_cw (FPU_CW_t cw)
+{
+#ifndef CGAL_NDEBUG
+#ifdef CGAL_HEADER_ONLY
+  const Check_FPU_rounding_mode_is_restored & tmp = get_static_check_fpu_rounding_mode_is_restored();
+#endif
+#endif
+
+  CGAL_IA_SETFPCW(cw);
+}
+
+inline
+FPU_CW_t
+FPU_get_and_set_cw (FPU_CW_t cw)
+{
+    FPU_CW_t old = FPU_get_cw();
+    FPU_set_cw(cw);
+    return old;
+}
+
+
+// A class whose constructor sets the FPU mode to +inf, saves a backup of it,
+// and whose destructor resets it back to the saved state.
+
+template <bool Protected = true> struct Protect_FPU_rounding;
+
+template <>
+struct Protect_FPU_rounding<true>
+{
+  Protect_FPU_rounding(FPU_CW_t r = CGAL_FE_UPWARD)
+    : backup( FPU_get_and_set_cw(r) ) {}
+
+  ~Protect_FPU_rounding()
+  {
+     FPU_set_cw(backup);
+  }
+
+private:
+  FPU_CW_t backup;
+};
+
+template <>
+struct Protect_FPU_rounding<false>
+{
+  Protect_FPU_rounding() {}
+  Protect_FPU_rounding(FPU_CW_t /*= CGAL_FE_UPWARD*/) {}
+};
+
+
+// A wrapper on top of the Protect_FPU_rounding to add "expensive" checks
+// of the rounding mode.  It is used internally, to benefit from the
+// protector declarations to add checks in non-protected mode.
+
+template <bool Protected = true>
+struct Checked_protect_FPU_rounding
+  : Protect_FPU_rounding<Protected>
+{
+  Checked_protect_FPU_rounding()
+  {
+    CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_UPWARD);
+  }
+
+  Checked_protect_FPU_rounding(FPU_CW_t r)
+    : Protect_FPU_rounding<Protected>(r)
+  {
+    CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_UPWARD);
+  }
+};
+
+
+// The class Set_ieee_double_precision forces the double precision (53bit mantissa),
+// to protect from double rounding effects on x86 FPU.
+// ( Note that it also sets the rounding mode to nearest. )
+// Its destructor restores the FPU state as it was previously.
+// Note that this affects "long double" as well, and other potential side effects.
+// And note that it does not (cannot) "fix" the same problem for the exponent.
+
+struct Set_ieee_double_precision
+#ifdef CGAL_FPU_HAS_EXCESS_PRECISION
+  : public Protect_FPU_rounding<>
+{
+  Set_ieee_double_precision()
+    : Protect_FPU_rounding<>(CGAL_FE_TONEAREST) {}
+};
+#else
+{
+  Set_ieee_double_precision() {} // only to kill compiler warnings.
+};
+#endif
+
+
+// The following function serves the same goal as Set_ieee_double_precision but
+// does the change globally (no destructor resets the previous behavior).
+inline void force_ieee_double_precision()
+{
+#ifdef CGAL_FPU_HAS_EXCESS_PRECISION
+    FPU_set_cw(CGAL_FE_TONEAREST);
+#endif
+}
+
+} //namespace CGAL
+
+#endif // CGAL_FPU_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/FPU_extension.h b/3rdparty/CGAL-4.8/include/CGAL/FPU_extension.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/FPU_extension.h
rename to 3rdparty/CGAL-4.8/include/CGAL/FPU_extension.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/FPU_gcc_i386.h b/3rdparty/CGAL-4.8/include/CGAL/FPU_gcc_i386.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/FPU_gcc_i386.h
rename to 3rdparty/CGAL-4.8/include/CGAL/FPU_gcc_i386.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/FPU_gcc_i386_sse2.h b/3rdparty/CGAL-4.8/include/CGAL/FPU_gcc_i386_sse2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/FPU_gcc_i386_sse2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/FPU_gcc_i386_sse2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/FPU_msvc.h b/3rdparty/CGAL-4.8/include/CGAL/FPU_msvc.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/FPU_msvc.h
rename to 3rdparty/CGAL-4.8/include/CGAL/FPU_msvc.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/FaceGraph_to_Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/FaceGraph_to_Polyhedron_3.h
new file mode 100644
index 0000000..4981c4b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/FaceGraph_to_Polyhedron_3.h
@@ -0,0 +1,92 @@
+// Copyright (c) 2014  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+//
+
+
+#ifndef CGAL_FACEGRAPH_POLYHEDRON_3_H
+#define CGAL_FACEGRAPH_POLYHEDRON_3_H 1
+
+#include <CGAL/basic.h>
+#include <CGAL/Modifier_base.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/Kernel_traits.h>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+
+namespace CGAL {
+
+template < class FaceGraph, class PointPMap, class HDS, bool clear_target_before = true >
+class FaceGraph_to_Polyhedron_3 : public Modifier_base<HDS> {
+    FaceGraph& fg;
+    PointPMap ppmap;
+public:
+    typedef HDS  Halfedge_data_structure;
+    FaceGraph_to_Polyhedron_3(const FaceGraph& src, PointPMap map)
+    : fg(const_cast<FaceGraph&>(src))
+    , ppmap(map)
+    {}
+    void operator()( HDS& target);
+};
+
+template < class FaceGraph, class PointPMap, class HDS, bool clear_target_before>
+void
+FaceGraph_to_Polyhedron_3<FaceGraph, PointPMap, HDS, clear_target_before>::
+operator()(HDS& tgt)
+{
+  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+
+  Cartesian_converter<
+    typename Kernel_traits<typename boost::property_traits<PointPMap>::value_type>::Kernel,
+    typename Kernel_traits<typename HDS::Vertex::Point>::Kernel
+  > convert;
+
+  if ( clear_target_before )
+    tgt.clear();
+
+  Polyhedron_incremental_builder_3<HDS> B(tgt);
+  B.begin_surface( num_vertices(fg),
+                   num_faces(fg),
+                   num_halfedges(fg));
+  std::map<vertex_descriptor, std::size_t> indices;
+  std::size_t i=0;
+  BOOST_FOREACH(vertex_descriptor vd, vertices(fg) )
+  {
+    B.add_vertex( convert( get(ppmap, vd) ) );
+    indices[vd]=i++;
+  }
+
+  BOOST_FOREACH(face_descriptor fd, faces(fg))
+  {
+    B.begin_facet();
+    halfedge_descriptor hd=halfedge(fd, fg), first=hd;
+    do {
+        B.add_vertex_to_facet( indices[target(edge(hd,fg), fg)] );
+        hd=next(hd,fg);;
+    } while( hd != first);
+    B.end_facet();
+  }
+  B.end_surface();
+}
+
+} //namespace CGAL
+#endif // CGAL_FACEGRAPH_POLYHEDRON_3_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filter_circulator.h b/3rdparty/CGAL-4.8/include/CGAL/Filter_circulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filter_circulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filter_circulator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_construction.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_construction.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_construction.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_construction.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_extended_homogeneous.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_extended_homogeneous.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_extended_homogeneous.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_extended_homogeneous.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_d.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_d.h
new file mode 100644
index 0000000..3950f16
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_d.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)    : Samuel Hornus, Olivier Devillers
+
+#ifndef CGAL_FILTERED_KERNEL_D_H
+#define CGAL_FILTERED_KERNEL_D_H
+
+#include <CGAL/Filtered_predicate.h>
+#include <CGAL/internal/Exact_type_selector.h>
+#include <CGAL/Kernel_d/Cartesian_converter_d.h>
+
+namespace CGAL {
+
+template<typename Kernel> // a dD kernel we want to filter
+struct Filtered_kernel_d : public Cartesian_d<typename Kernel::FT>
+{
+    typedef typename Kernel::LA			LA;
+    typedef typename Kernel::RT			RT; // Ring type
+    typedef typename Kernel::FT			FT; // Field type
+
+    typedef Cartesian_d<FT>			Base;
+    typedef Filtered_kernel_d<Kernel>		Self;
+
+    // an exact number type
+    typedef typename internal::Exact_type_selector<RT>::Type	Exact_nt;
+    
+    // the corresponding exact kernel
+    //typedef Linear_algebraCd< Exact_nt, boost::pool_allocator<Exact_nt> > Exact_linalg;
+    typedef Linear_algebraCd< Exact_nt > Exact_linalg;
+    typedef Cartesian_d<Exact_nt, Exact_linalg>		Exact_kernel;
+    
+    // the kernel used for filtered predicates
+    typedef Interval_nt<false> IA;
+    //typedef Linear_algebraCd<IA, boost::pool_allocator<IA> > Interval_linalg;
+    typedef Linear_algebraCd<IA> Interval_linalg;
+    typedef Cartesian_d<IA, Interval_linalg >	Approximate_kernel;
+    
+    // the converter
+    typedef Cartesian_converter_d<Base, Exact_kernel>	C2E;
+    typedef Cartesian_converter_d<Base, Approximate_kernel>	C2F;
+
+    // we change the predicates.
+#define CGAL_Kernel_pred(P, Pf) \
+    typedef Filtered_predicate<typename Exact_kernel::P, typename Approximate_kernel::P, C2E, C2F> P; \
+    P Pf() const { return P(); }
+
+    // we don't touch the constructions.
+#define CGAL_Kernel_cons(Y,Z)
+
+#include <CGAL/Kernel_d/interface_macros_d.h>
+};
+
+} //namespace CGAL
+
+#endif // CGAL_FILTERED_KERNEL_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Filtered_kernel_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Filtered_kernel_fwd.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Filtered_predicate.h b/3rdparty/CGAL-4.8/include/CGAL/Filtered_predicate.h
new file mode 100644
index 0000000..c3da44c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Filtered_predicate.h
@@ -0,0 +1,424 @@
+// Copyright (c) 2001-2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_FILTERED_PREDICATE_H
+#define CGAL_FILTERED_PREDICATE_H
+
+#include <string>
+#include <CGAL/config.h>
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Uncertain.h>
+#include <CGAL/Profile_counter.h>
+
+namespace CGAL {
+
+// This template class is a wrapper that implements the filtering for any
+// predicate (dynamic filters with IA).
+
+// TODO :
+// - each predicate in the default kernel should define a tag that says if it
+//   wants to be filtered or not (=> all homogeneous predicate define this
+//   tag).  We could even test-suite that automatically.  It makes a strong
+//   new requirement on the kernel though...
+//   Could be done with a traits mechanism ?
+//   A default template could use the current IA, but other tags or whatever
+//   could specify no filtering at all, or static filtering...
+// - same thing for constructions => virtual operator() ?
+// - similarly, constructions should have a tag saying if they can throw or
+//   not, or we let all this up to the compiler optimizer to figure out ?
+// - Some caching could be done at the Point_2 level.
+
+
+template <class EP, class AP, class C2E, class C2A, bool Protection = true>
+class Filtered_predicate
+{
+  C2E c2e;
+  C2A c2a;
+  EP  ep;
+  AP  ap;
+
+  typedef typename AP::result_type  Ares;
+
+public:
+
+  typedef AP    Approximate_predicate;
+  typedef EP    Exact_predicate;
+  typedef C2E   To_exact_converter;
+  typedef C2A   To_approximate_converter;
+
+  typedef typename EP::result_type  result_type;
+  // AP::result_type must be convertible to EP::result_type.
+
+  Filtered_predicate()
+  {}
+
+  // These constructors are used for constructive predicates.
+  // You should try to avoid constructive predicates, as they will construct
+  // the exact values systematically (in the ctor), rather than lazily.
+  template <class O>
+  Filtered_predicate(const O &o1)
+    : c2e(), c2a(), ep(c2e(o1)), ap(c2a(o1))
+  {}
+
+  template <class O1, class O2>
+  Filtered_predicate(const O1 &o1, const O2 &o2)
+    : c2e(), c2a(), ep(c2e(o1), c2e(o2)), ap(c2a(o1), c2a(o2))
+  {}
+
+  explicit Filtered_predicate(const EP&  e, const AP&  a)
+    : ep(e), ap(a)
+  {}
+
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template <typename... Args>
+  result_type
+  operator()(const Args&... args) const;
+#else
+
+  template <class A1>
+  result_type
+  operator()(const A1 &a1) const;
+
+  template <class A1, class A2>
+  result_type
+  operator()(const A1 &a1, const A2 &a2) const;
+
+  template <class A1, class A2, class A3>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3) const;
+
+  template <class A1, class A2, class A3, class A4>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const;
+
+  template <class A1, class A2, class A3, class A4, class A5>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5) const;
+
+  template <class A1, class A2, class A3, class A4, class A5, class A6>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6) const;
+
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6, const A7 &a7) const;
+
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const;
+
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8, class A9>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
+             const A9 &a9) const;
+
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8, class A9, class A10>
+  result_type
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+             const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
+             const A9 &a9, const A10 &a10) const;
+
+  // Idem for more than 10 arguments.  Do it on demand.
+
+#endif
+};
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <typename... Args>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const Args&... args) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(args)...);
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(args)...);
+}
+
+#else
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  
+	  Ares res = ap(c2a(a1));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5, class A6>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6, const A7 &a7) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
+			c2a(a7));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
+			c2a(a7), c2a(a8));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
+              c2e(a8));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8, class A9>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
+             const A9 &a9) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
+			c2a(a7), c2a(a8), c2a(a9));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
+              c2e(a8), c2e(a9));
+}
+
+template <class EP, class AP, class C2E, class C2A, bool Protection>
+  template <class A1, class A2, class A3, class A4, class A5, class A6,
+            class A7, class A8, class A9, class A10>
+typename Filtered_predicate<EP,AP,C2E,C2A,Protection>::result_type
+Filtered_predicate<EP,AP,C2E,C2A,Protection>::
+  operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+	     const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8,
+             const A9 &a9, const A10 &a10) const
+{
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    {
+      Protect_FPU_rounding<Protection> p;
+      try
+	{
+	  Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
+			c2a(a7), c2a(a8), c2a(a9), c2a(a10));
+	  if (is_certain(res))
+	    return get_certain(res);
+	}
+      catch (Uncertain_conversion_exception) {}
+    }
+    CGAL_BRANCH_PROFILER_BRANCH(tmp);
+    Protect_FPU_rounding<!Protection> p(CGAL_FE_TONEAREST);
+    return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7),
+              c2e(a8), c2e(a9), c2e(a10));
+}
+
+#endif
+
+} //namespace CGAL
+
+#endif // CGAL_FILTERED_PREDICATE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_3.h b/3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fixed_alpha_shape_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fixed_alpha_shape_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Fixed_border_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Fixed_border_parameterizer_3.h
new file mode 100644
index 0000000..63aa56b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Fixed_border_parameterizer_3.h
@@ -0,0 +1,634 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_FIXED_BORDER_PARAMETERIZER_3_H
+#define CGAL_FIXED_BORDER_PARAMETERIZER_3_H
+
+#include <CGAL/circulator.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Eigen_solver_traits.h>
+
+
+#include <CGAL/Parameterizer_traits_3.h>
+#include <CGAL/Circular_border_parameterizer_3.h>
+#include <CGAL/Parameterization_mesh_feature_extractor.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+
+#include <iostream>
+
+/// \file Fixed_border_parameterizer_3.h
+
+namespace CGAL {
+
+
+// ------------------------------------------------------------------------------------
+// Declaration
+// ------------------------------------------------------------------------------------
+
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class `Fixed_border_parameterizer_3`
+/// is the base class of fixed border parameterization methods (Tutte, Floater, ...).
+///
+/// One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.
+///
+/// This class is a pure virtual class, thus cannot be instantiated.
+/// Anyway, it implements most of the parameterization algorithm `parameterize()`.
+/// Subclasses are Strategies that modify the behavior of this algorithm:
+/// - They provide `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
+///   parameters.
+/// - They implement `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
+///   for j neighbor vertex of i.
+/// - They may implement an optimized version of `is_one_to_one_mapping()`.
+///
+// @todo `Fixed_border_parameterizer_3` should remove border vertices
+/// from the linear systems in order to have a symmetric positive definite
+/// matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+///
+///
+/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+
+template
+<
+    class ParameterizationMesh_3,       ///< 3D surface mesh
+    class BorderParameterizer_3         ///< Strategy to parameterize the surface border
+                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+    class SparseLinearAlgebraTraits_d   ///< Traits class to solve a sparse linear system
+                = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > > >
+
+class Fixed_border_parameterizer_3
+    : public Parameterizer_traits_3<ParameterizationMesh_3>
+{
+// Private types
+private:
+    // Superclass
+    typedef Parameterizer_traits_3<ParameterizationMesh_3>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    /// @endcond
+
+    /// Export BorderParameterizer_3 template parameter.
+    typedef BorderParameterizer_3           Border_param;
+    /// Export SparseLinearAlgebraTraits_d template parameter.
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+
+// Private types
+private:
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+protected:
+    // Using statements needed for derived class
+    using Base::compute_angle_rad;
+    using Base::cotangent;
+
+// Public operations
+public:
+    /// Constructor
+    Fixed_border_parameterizer_3(Border_param border_param = Border_param(),
+                                    ///< Object that maps the surface's border to 2D space
+                               Sparse_LA sparse_la = Sparse_LA())
+                                    ///< Traits object to access a sparse linear system
+        : m_borderParameterizer(border_param), m_linearAlgebra(sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+    /// Compute a one-to-one mapping from a triangular 3D surface mesh
+    /// to a piece of the 2D space.
+    /// The mapping is linear by pieces (linear in each triangle).
+    /// The result is the (u,v) pair image of each vertex of the 3D surface.
+    ///
+    /// \pre `mesh` must be a surface with one connected component.
+    /// \pre `mesh` must be a triangular mesh.
+    /// \pre The mesh border must be mapped onto a convex polygon.
+    virtual Error_code  parameterize(Adaptor& mesh);
+
+// Protected operations
+protected:
+    /// Check parameterize() preconditions:
+    /// - `mesh` must be a surface with one connected component.
+    /// - `mesh` must be a triangular mesh.
+    /// - The mesh border must be mapped onto a convex polygon.
+    virtual Error_code  check_parameterize_preconditions(Adaptor& mesh);
+
+    /// Initialize A, Bu and Bv after border parameterization.
+    /// Fill the border vertices' lines in both linear systems:
+    /// "u = constant" and "v = constant".
+    ///
+    /// \pre Vertices must be indexed.
+    /// \pre A, Bu and Bv must be allocated.
+    /// \pre Border vertices must be parameterized.
+    void  initialize_system_from_mesh_border (Matrix& A, Vector& Bu, Vector& Bv,
+                                              const Adaptor& mesh);
+
+    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
+    /// Implementation note: Subclasses must at least implement compute_w_ij().
+    virtual NT compute_w_ij(const Adaptor& mesh,
+                            Vertex_const_handle main_vertex_v_i,
+                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
+    = 0;
+
+    /// Compute the line i of matrix A for i inner vertex:
+    /// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
+    /// - compute w_ii = - sum of w_ijs.
+    ///
+    /// \pre Vertices must be indexed.
+    /// \pre Vertex i musn't be already parameterized.
+    /// \pre Line i of A must contain only zeros.
+    virtual Error_code setup_inner_vertex_relations(Matrix& A,
+                                                    Vector& Bu,
+                                                    Vector& Bv,
+                                                    const Adaptor& mesh,
+                                                    Vertex_const_handle vertex);
+
+    /// Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
+    void  set_mesh_uv_from_system (Adaptor& mesh,
+                                   const Vector& Xu, const Vector& Xv);
+
+    /// Check parameterize() postconditions:
+    /// - 3D -> 2D mapping is one-to-one.
+    virtual Error_code check_parameterize_postconditions(const Adaptor& mesh,
+                                                         const Matrix& A,
+                                                         const Vector& Bu,
+                                                         const Vector& Bv);
+
+    /// Check if 3D -> 2D mapping is one-to-one.
+    /// The default implementation checks each normal.
+    virtual bool  is_one_to_one_mapping(const Adaptor& mesh,
+                                        const Matrix& A,
+                                        const Vector& Bu,
+                                        const Vector& Bv);
+
+// Protected accessors
+protected:
+    /// Get the object that maps the surface's border onto a 2D space.
+    Border_param&   get_border_parameterizer()    { return m_borderParameterizer; }
+
+    /// Get the sparse linear algebra (traits object to access the linear system).
+    Sparse_LA&      get_linear_algebra_traits() { return m_linearAlgebra; }
+
+// Fields
+private:
+    /// Object that maps the surface's border onto a 2D space.
+    Border_param    m_borderParameterizer;
+
+    /// Traits object to solve a sparse linear system
+    Sparse_LA       m_linearAlgebra;
+};
+
+
+// ------------------------------------------------------------------------------------
+// Implementation
+// ------------------------------------------------------------------------------------
+
+// Compute a one-to-one mapping from a triangular 3D surface mesh
+// to a piece of the 2D space.
+// The mapping is linear by pieces (linear in each triangle).
+// The result is the (u,v) pair image of each vertex of the 3D surface.
+//
+// Preconditions:
+// - `mesh` must be a surface with one connected component.
+// - `mesh` must be a triangular mesh.
+// - The mesh border must be mapped onto a convex polygon.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+parameterize(Adaptor& mesh)
+{
+#ifdef DEBUG_TRACE
+    // Create timer for traces
+    CGAL::Timer timer;
+    timer.start();
+#endif
+
+    // Check preconditions
+    Error_code status = check_parameterize_preconditions(mesh);
+#ifdef DEBUG_TRACE
+    std::cerr << "  parameterization preconditions: " << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // Count vertices
+    int nbVertices = mesh.count_mesh_vertices();
+
+    // Index vertices from 0 to nbVertices-1
+    mesh.index_mesh_vertices();
+
+    // Mark all vertices as *not* "parameterized"
+    Vertex_iterator vertexIt;
+    for (vertexIt = mesh.mesh_vertices_begin();
+        vertexIt != mesh.mesh_vertices_end();
+        vertexIt++)
+    {
+        mesh.set_vertex_parameterized(vertexIt, false);
+    }
+
+    // Compute (u,v) for border vertices
+    // and mark them as "parameterized"
+    status = get_border_parameterizer().parameterize_border(mesh);
+#ifdef DEBUG_TRACE
+    std::cerr << "  border vertices parameterization: " << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // Create two sparse linear systems "A*Xu = Bu" and "A*Xv = Bv" (one line/column per vertex)
+    Matrix A(nbVertices, nbVertices);
+    Vector Xu(nbVertices), Xv(nbVertices), Bu(nbVertices), Bv(nbVertices);
+
+    // Initialize A, Xu, Xv, Bu and Bv after border parameterization
+    // Fill the border vertices' lines in both linear systems:
+    // "u = constant" and "v = constant"
+    //
+    // @todo Fixed_border_parameterizer_3 should remove border vertices
+    // from the linear systems in order to have a symmetric positive definite
+    // matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
+    initialize_system_from_mesh_border (A, Bu, Bv, mesh);
+
+    // Fill the matrix for the inner vertices v_i: compute A's coefficient
+    // w_ij for each neighbor j; then w_ii = - sum of w_ijs
+    for (vertexIt = mesh.mesh_vertices_begin();
+         vertexIt != mesh.mesh_vertices_end();
+         vertexIt++)
+    {
+        CGAL_surface_mesh_parameterization_assertion(mesh.is_vertex_on_main_border(vertexIt)
+                                     == mesh.is_vertex_parameterized(vertexIt));
+
+        // inner vertices only
+        if( ! mesh.is_vertex_on_main_border(vertexIt) )
+        {
+            // Compute the line i of matrix A for i inner vertex
+            status = setup_inner_vertex_relations(A, Bu, Bv,
+                                                  mesh,
+                                                  vertexIt);
+            if (status != Base::OK)
+                return status;
+        }
+    }
+#ifdef DEBUG_TRACE
+    std::cerr << "  matrix filling (" << nbVertices << " x " << nbVertices << "): "
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+
+    // Solve "A*Xu = Bu". On success, solution is (1/Du) * Xu.
+    // Solve "A*Xv = Bv". On success, solution is (1/Dv) * Xv.
+    NT Du, Dv;
+    if ( !get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) ||
+         !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv) )
+    {
+        status = Base::ERROR_CANNOT_SOLVE_LINEAR_SYSTEM;
+    }
+#ifdef DEBUG_TRACE
+    std::cerr << "  solving two linear systems: "
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // WARNING: this package does not support homogeneous coordinates!
+    CGAL_surface_mesh_parameterization_assertion(Du == 1.0);
+    CGAL_surface_mesh_parameterization_assertion(Dv == 1.0);
+
+    // Copy Xu and Xv coordinates into the (u,v) pair of each vertex
+    set_mesh_uv_from_system (mesh, Xu, Xv);
+#ifdef DEBUG_TRACE
+    std::cerr << "  copy computed UVs to mesh :"
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+
+    // Check postconditions
+    status = check_parameterize_postconditions(mesh, A, Bu, Bv);
+#ifdef DEBUG_TRACE
+    std::cerr << "  parameterization postconditions: " << timer.time() << " seconds." << std::endl;
+#endif
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+
+// Check parameterize() preconditions:
+// - `mesh` must be a surface with one connected component.
+// - `mesh` must be a triangular mesh.
+// - The mesh border must be mapped onto a convex polygon.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+check_parameterize_preconditions(Adaptor& mesh)
+{
+    Error_code status = Base::OK;	    // returned value
+
+    // Helper class to compute genus or count borders, vertices, ...
+    typedef Parameterization_mesh_feature_extractor<Adaptor>
+                                            Mesh_feature_extractor;
+    Mesh_feature_extractor feature_extractor(mesh);
+
+    // Check that mesh is not empty
+    if (mesh.mesh_vertices_begin() == mesh.mesh_vertices_end())
+        status = Base::ERROR_EMPTY_MESH;
+    if (status != Base::OK)
+        return status;
+
+    // The whole surface parameterization package is restricted to triangular meshes
+    status = mesh.is_mesh_triangular() ? Base::OK
+                                       : Base::ERROR_NON_TRIANGULAR_MESH;
+    if (status != Base::OK)
+        return status;
+
+    // The whole package is restricted to surfaces: genus = 0,
+    // one connected component and at least one border
+    int genus = feature_extractor.get_genus();
+    int nb_borders = feature_extractor.get_nb_borders();
+    int nb_components = feature_extractor.get_nb_connex_components();
+    status = (genus == 0 && nb_borders >= 1 && nb_components == 1)
+           ? Base::OK
+           : Base::ERROR_NO_TOPOLOGICAL_DISC;
+    if (status != Base::OK)
+        return status;
+
+    // One-to-one mapping is guaranteed if all w_ij coefficients are > 0 (for j vertex neighbor of i)
+    // and if the surface border is mapped onto a 2D convex polygon
+    status = get_border_parameterizer().is_border_convex()
+           ? Base::OK
+           : Base::ERROR_NON_CONVEX_BORDER;
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+// Initialize A, Bu and Bv after border parameterization.
+// Fill the border vertices' lines in both linear systems: "u = constant" and "v = constant".
+//
+// Preconditions:
+// - Vertices must be indexed.
+// - A, Bu and Bv must be allocated.
+// - Border vertices must be parameterized.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+void Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+initialize_system_from_mesh_border (Matrix& A, Vector& Bu, Vector& Bv,
+                                    const Adaptor& mesh)
+{
+    for (Border_vertex_const_iterator it = mesh.mesh_main_border_vertices_begin();
+         it != mesh.mesh_main_border_vertices_end();
+         it++)
+    {
+        CGAL_surface_mesh_parameterization_assertion(mesh.is_vertex_parameterized(it));
+
+        // Get vertex index in sparse linear system
+        int index = mesh.get_vertex_index(it);
+
+        // Write a diagonal coefficient of A
+        A.set_coef(index, index, 1, true /*new*/);
+
+        // Write constant in Bu and Bv
+        Point_2 uv = mesh.get_vertex_uv(it);
+        Bu[index] = uv.x();
+        Bv[index] = uv.y();
+    }
+}
+
+// Compute the line i of matrix A for i inner vertex:
+// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
+// - compute w_ii = - sum of w_ijs.
+//
+// Preconditions:
+// - Vertices must be indexed.
+// - Vertex i musn't be already parameterized.
+// - Line i of A must contain only zeros.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+setup_inner_vertex_relations(Matrix& A,
+                             Vector& ,
+                             Vector& ,
+                             const Adaptor& mesh,
+                             Vertex_const_handle vertex)
+{
+    CGAL_surface_mesh_parameterization_assertion( ! mesh.is_vertex_on_main_border(vertex) );
+    CGAL_surface_mesh_parameterization_assertion( ! mesh.is_vertex_parameterized(vertex) );
+
+    int i = mesh.get_vertex_index(vertex);
+
+    // circulate over vertices around 'vertex' to compute w_ii and w_ijs
+    NT w_ii = 0;
+    int vertexIndex = 0;
+    Vertex_around_vertex_const_circulator v_j = mesh.vertices_around_vertex_begin(vertex);
+    Vertex_around_vertex_const_circulator end = v_j;
+    CGAL_For_all(v_j, end)
+    {
+        // Call to virtual method to do the actual coefficient computation
+        NT w_ij = -1.0 * compute_w_ij(mesh, vertex, v_j);
+
+        // w_ii = - sum of w_ijs
+        w_ii -= w_ij;
+
+        // Get j index
+        int j = mesh.get_vertex_index(v_j);
+
+        // Set w_ij in matrix
+        A.set_coef(i,j, w_ij, true /*new*/);
+
+        vertexIndex++;
+    }
+    if (vertexIndex < 2)
+        return Base::ERROR_NON_TRIANGULAR_MESH;
+
+    // Set w_ii in matrix
+    A.set_coef(i,i, w_ii, true /*new*/);
+
+    return Base::OK;
+}
+
+// Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+void Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+set_mesh_uv_from_system(Adaptor& mesh,
+                        const Vector& Xu, const Vector& Xv)
+{
+    Vertex_iterator vertexIt;
+    for (vertexIt = mesh.mesh_vertices_begin();
+        vertexIt != mesh.mesh_vertices_end();
+        vertexIt++)
+    {
+        int index = mesh.get_vertex_index(vertexIt);
+
+        NT u = Xu[index];
+        NT v = Xv[index];
+
+        // Fill vertex (u,v) and mark it as "parameterized"
+        mesh.set_vertex_uv(vertexIt, Point_2(u,v));
+        mesh.set_vertex_parameterized(vertexIt, true);
+    }
+}
+
+// Check parameterize() postconditions:
+// - 3D -> 2D mapping is one-to-one.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+check_parameterize_postconditions(const Adaptor& mesh,
+                                  const Matrix& A,
+                                  const Vector& Bu,
+                                  const Vector& Bv)
+{
+    Error_code status = Base::OK;
+
+    // Check if 3D -> 2D mapping is one-to-one
+    status = is_one_to_one_mapping(mesh, A, Bu, Bv)
+           ? Base::OK
+           : Base::ERROR_NO_1_TO_1_MAPPING;
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+// Check if 3D -> 2D mapping is one-to-one.
+// The default implementation checks each normal.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+bool Fixed_border_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+is_one_to_one_mapping(const Adaptor& mesh,
+                      const Matrix& ,
+                      const Vector& ,
+                      const Vector& )
+{
+    Vector_3 first_triangle_normal = NULL_VECTOR; // initialize to avoid warning
+
+    for (Facet_const_iterator facetIt = mesh.mesh_facets_begin();
+         facetIt != mesh.mesh_facets_end();
+         facetIt++)
+    {
+        // Get 3 vertices of the facet
+        Vertex_const_handle v0, v1, v2;
+        int vertexIndex = 0;
+        Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facetIt),
+                                             end = cir;
+        CGAL_For_all(cir, end)
+        {
+            if (vertexIndex == 0)
+                v0 = cir;
+            else if (vertexIndex == 1)
+                v1 = cir;
+            else if (vertexIndex == 2)
+                v2 = cir;
+
+            vertexIndex++;
+        }
+        CGAL_surface_mesh_parameterization_assertion(vertexIndex >= 3);
+
+        // Get the 3 vertices position IN 2D
+        Point_2 p0 = mesh.get_vertex_uv(v0) ;
+        Point_2 p1 = mesh.get_vertex_uv(v1) ;
+        Point_2 p2 = mesh.get_vertex_uv(v2) ;
+
+        // Compute the facet normal
+        Point_3 p0_3D(p0.x(), p0.y(), 0);
+        Point_3 p1_3D(p1.x(), p1.y(), 0);
+        Point_3 p2_3D(p2.x(), p2.y(), 0);
+        Vector_3 v01_3D = p1_3D - p0_3D;
+        Vector_3 v02_3D = p2_3D - p0_3D;
+        Vector_3 normal = CGAL::cross_product(v01_3D, v02_3D);
+
+        // Check that all normals are oriented the same way
+        // => no 2D triangle is flipped
+        if (cir == mesh.facet_vertices_begin(facetIt))
+        {
+            first_triangle_normal = normal;
+        }
+        else
+        {
+            if (first_triangle_normal * normal < 0)
+                return false;
+        }
+    }
+
+    return true;            // OK if we reach this point
+}
+
+
+} //namespace CGAL
+
+#endif //CGAL_FIXED_BORDER_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Flattening_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Flattening_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Flattening_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Flattening_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fourtuple.h b/3rdparty/CGAL-4.8/include/CGAL/Fourtuple.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fourtuple.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fourtuple.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fraction_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Fraction_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fraction_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fraction_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Fuzzy_iso_box.h b/3rdparty/CGAL-4.8/include/CGAL/Fuzzy_iso_box.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Fuzzy_iso_box.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Fuzzy_iso_box.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Fuzzy_sphere.h b/3rdparty/CGAL-4.8/include/CGAL/Fuzzy_sphere.h
new file mode 100644
index 0000000..0c00cdf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Fuzzy_sphere.h
@@ -0,0 +1,165 @@
+// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
+
+
+#ifndef CGAL_FUZZY_SPHERE_H
+#define CGAL_FUZZY_SPHERE_H
+#include <CGAL/Kd_tree_rectangle.h>
+#include <CGAL/Search_traits_adapter.h>
+
+#include <boost/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace CGAL {
+
+  namespace internal{
+    
+  template <class SearchTraits,class Point_d>
+  class Fuzzy_sphere_impl{
+    SearchTraits traits;
+    public:
+
+    typedef typename SearchTraits::FT FT;
+    typedef typename SearchTraits::Dimension Dimension;
+    private:
+
+    Point_d c;
+    FT r;
+    FT eps;
+
+    public:
+
+
+    	// default constructor
+    	Fuzzy_sphere_impl(const SearchTraits& traits_=SearchTraits()):traits(traits_) {}
+		
+
+	// constructor
+	Fuzzy_sphere_impl(const Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
+	traits(traits_),c(center), r(radius), eps(epsilon) 
+	{ 	// avoid problems if eps > r
+		if (eps>r) eps=r; 
+	}
+        	
+        bool contains(const typename SearchTraits::Point_d& p) const {
+		// test whether the squared distance 
+		// between P and c 
+		// is at most the squared_radius
+		FT squared_radius = r*r;
+		FT distance=FT(0);
+		typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
+                  traits.construct_cartesian_const_iterator_d_object();
+                typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
+		                                                  pit = construct_it(p),
+                                                                  end = construct_it(c, 0);
+		for (; cit != end
+                       && (distance <= squared_radius); ++cit, ++pit) {
+		  distance += 
+			((*cit)-(*pit))*((*cit)-(*pit));
+		}
+		
+		return (distance <= squared_radius); 
+        }
+
+        
+	bool inner_range_intersects(const Kd_tree_rectangle<FT,Dimension>& rectangle) const {                          
+                // test whether the interior of a sphere
+		// with radius (r-eps) intersects r, i.e.
+                // if the minimal distance of r to c is less than r-eps
+		FT distance = FT(0);
+		FT squared_radius = (r-eps)*(r-eps);
+		typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
+                  traits.construct_cartesian_const_iterator_d_object();
+                typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
+                                                                  end = construct_it(c, 0);
+		for (int i = 0; cit != end && (distance < squared_radius); ++cit, ++i) {
+			if ((*cit) < rectangle.min_coord(i))
+				distance += 
+				(rectangle.min_coord(i)-(*cit))*(rectangle.min_coord(i)-(*cit));
+			if ((*cit) > rectangle.max_coord(i))
+				distance += 
+				((*cit)-rectangle.max_coord(i))*((*cit)-rectangle.max_coord(i));
+		}
+		
+		return (distance <= squared_radius);
+	}
+
+
+	bool outer_range_contains(const Kd_tree_rectangle<FT,Dimension>& rectangle) const { 
+        // test whether the interior of a sphere
+	// with radius (r+eps) is contained by r, i.e.
+        // if the minimal distance of the boundary of r 
+        // to c is less than r+eps                         
+	FT distance=FT(0);
+	FT squared_radius = (r+eps)*(r+eps);	
+	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=
+          traits.construct_cartesian_const_iterator_d_object();
+	typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c),
+                                                          end = construct_it(c, 0);
+        for (int i = 0; cit != end && (distance < squared_radius) ; ++cit,++i) {
+		if ((*cit) <= (rectangle.min_coord(i)+rectangle.max_coord(i))/FT(2))
+			distance += 
+			(rectangle.max_coord(i)-(*cit))*(rectangle.max_coord(i)-(*cit));
+		else
+			distance += ((*cit)-rectangle.min_coord(i))*((*cit)-rectangle.min_coord(i));
+		}
+		
+		return (distance <= squared_radius);
+	}
+  }; // class Fuzzy_sphere_impl
+
+  }
+  
+  template <class SearchTraits>
+  class Fuzzy_sphere:
+    public internal::Fuzzy_sphere_impl<SearchTraits,typename SearchTraits::Point_d>
+  {
+    typedef internal::Fuzzy_sphere_impl<SearchTraits,typename SearchTraits::Point_d> Base;
+    typedef typename Base::FT FT;
+  public:
+    // constructors
+    Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):Base(traits_){};
+    Fuzzy_sphere(const typename SearchTraits::Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
+      Base(center,radius,epsilon,traits_) {}
+  };
+  
+  //specialization for Search_traits_adapter
+  template <class K,class PM,class Base_traits>
+  class Fuzzy_sphere< Search_traits_adapter<K,PM,Base_traits> > :
+    public internal::Fuzzy_sphere_impl<Search_traits_adapter<K,PM,Base_traits>,typename Base_traits::Point_d>
+  {
+    typedef Search_traits_adapter<K,PM,Base_traits> SearchTraits;
+    typedef internal::Fuzzy_sphere_impl<SearchTraits,typename Base_traits::Point_d> Base;
+    typedef typename Base_traits::FT FT;
+  public:
+    // constructors
+    Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):Base(traits_){};
+    Fuzzy_sphere(const typename Base_traits::Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : 
+      Base(center,radius,epsilon,traits_) {}
+    Fuzzy_sphere(const typename SearchTraits::Point_d& center, FT radius, FT epsilon=FT(0),
+                 const SearchTraits& traits_=SearchTraits(),
+                 typename boost::disable_if<
+                  boost::is_same<typename Base_traits::Point_d,
+                                 typename SearchTraits::Point_d> >::type* = 0)
+      : Base(get(traits_.point_property_map(),center),radius,epsilon,traits_) {}
+  };
+  
+} // namespace CGAL
+#endif // FUZZY_SPHERE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type.h
new file mode 100644
index 0000000..7099783
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type.h
@@ -0,0 +1,1087 @@
+// Copyright (c) 2007-2010 Inria Lorraine (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author: Luis Peñaranda <luis.penaranda at gmx.com>
+
+#ifndef CGAL_GMPFI_TYPE_H
+#define CGAL_GMPFI_TYPE_H
+
+#include <CGAL/config.h>
+#include <CGAL/gmp.h>
+#include <mpfr.h>
+#include <CGAL/GMP/Gmpfr_type.h>
+#include <mpfi.h>
+#include <boost/operators.hpp>
+#include <CGAL/Uncertain.h>
+#include <CGAL/tss.h>
+#include <CGAL/IO/io.h>
+
+#include <limits>
+#include <algorithm>
+
+namespace CGAL{
+
+class Gmpfi;
+
+Uncertain<bool> operator<(const Gmpfi&,const Gmpfi&);
+Uncertain<bool> operator==(const Gmpfi&,const Gmpfi&);
+
+Uncertain<bool> operator<(const Gmpfi&,const Gmpfr&);
+Uncertain<bool> operator>(const Gmpfi&,const Gmpfr&);
+Uncertain<bool> operator==(const Gmpfi&,const Gmpfr&);
+
+Uncertain<bool> operator<(const Gmpfi&,long);
+Uncertain<bool> operator>(const Gmpfi&,long);
+Uncertain<bool> operator==(const Gmpfi&,long);
+
+Uncertain<bool> operator<(const Gmpfi&,unsigned long);
+Uncertain<bool> operator>(const Gmpfi&,unsigned long);
+Uncertain<bool> operator==(const Gmpfi&,unsigned long);
+
+Uncertain<bool> operator<(const Gmpfi&,int);
+Uncertain<bool> operator>(const Gmpfi&,int);
+Uncertain<bool> operator==(const Gmpfi&,int);
+
+Uncertain<bool> operator<(const Gmpfi&,double);
+Uncertain<bool> operator>(const Gmpfi&,double);
+Uncertain<bool> operator==(const Gmpfi&,double);
+
+Uncertain<bool> operator<(const Gmpfi&,long double);
+Uncertain<bool> operator>(const Gmpfi&,long double);
+Uncertain<bool> operator==(const Gmpfi&,long double);
+
+Uncertain<bool> operator<(const Gmpfi&,const Gmpz&);
+Uncertain<bool> operator>(const Gmpfi&,const Gmpz&);
+Uncertain<bool> operator==(const Gmpfi&,const Gmpz&);
+
+Uncertain<bool> operator<(const Gmpfi&,const Gmpq&);
+Uncertain<bool> operator>(const Gmpfi&,const Gmpq&);
+Uncertain<bool> operator==(const Gmpfi&,const Gmpq&);
+
+// the default precision of Gmpfi is the size of a double's mantissa
+#ifdef IEEE_DBL_MANT_DIG
+#  define CGAL_GMPFI_DEFAULT_PRECISION IEEE_DBL_MANT_DIG
+#else
+#  define CGAL_GMPFI_DEFAULT_PRECISION 53
+#endif
+
+// the default precision is a variable local to each thread in multithreaded
+// environments, or a global variable otherwise
+
+
+
+class Gmpfi:
+        boost::ordered_euclidian_ring_operators1<Gmpfi,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpfr,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,long,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,unsigned long,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,int,
+        boost::totally_ordered2<Gmpfi,double,
+        boost::totally_ordered2<Gmpfi,long double,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpz,
+        boost::ordered_euclidian_ring_operators2<Gmpfi,Gmpq
+        > > > > > > > > >
+{
+        private:
+
+        // The endpoints of the interval are represented by two objects of
+        // type Gmpfr. To apply MPFI functions to this interval, the
+        // pointers to the data in _left and _right are copied to the
+        // _interval structure using the function mpfi(). After the
+        // operation, the function gather_bounds should be called to put
+        // back the result of the operation in _left and _right.
+        Gmpfr _left,_right;
+        mutable __mpfi_struct _interval;
+
+  static mp_prec_t&  default_precision()
+  {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(mp_prec_t, Gmpfi_default_precision, CGAL_GMPFI_DEFAULT_PRECISION);
+    return Gmpfi_default_precision;
+  }
+        
+
+        bool is_unique(){
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+                return true;
+#else
+                return(_left.is_unique()&&_right.is_unique());
+#endif
+        }
+
+        // swaps the contents of this object and another one
+        void swap(Gmpfi &fi){
+                std::swap(*this,fi);
+        }
+
+        // after calling a library function that modifies the data in the
+        // structure _interval, this function has to be called in order to
+        // copy the data in _interval to _left and _right
+        void gather_bounds(){
+                mpfr_custom_init_set(
+                        _left.fr(),
+                        mpfr_custom_get_kind(&_interval.left),
+                        mpfr_custom_get_exp(&_interval.left),
+                        mpfr_get_prec(&_interval.left),
+                        mpfr_custom_get_mantissa(&_interval.left));
+                mpfr_custom_init_set(
+                        _right.fr(),
+                        mpfr_custom_get_kind(&_interval.right),
+                        mpfr_custom_get_exp(&_interval.right),
+                        mpfr_get_prec(&_interval.right),
+                        mpfr_custom_get_mantissa(&_interval.right));
+        }
+
+        public:
+
+        typedef Gmpfr::Precision_type   Precision_type;
+
+        // access
+
+        mpfi_srcptr mpfi()const{
+                _interval.left=*_left.fr();
+                _interval.right=*_right.fr();
+                CGAL_assertion(mpfr_equal_p(_left.fr(),&_interval.left)!=0 &&
+                               mpfr_equal_p(_right.fr(),&_interval.right)!=0);
+                return &_interval;
+        }
+
+        mpfi_ptr mpfi(){
+                _interval.left=*_left.fr();
+                _interval.right=*_right.fr();
+                CGAL_assertion(mpfr_equal_p(_left.fr(),&_interval.left)!=0 &&
+                               mpfr_equal_p(_right.fr(),&_interval.right)!=0);
+                return &_interval;
+        }
+
+        mpfr_srcptr left_mpfr()const{
+                return _left.fr();
+        }
+
+        mpfr_srcptr right_mpfr()const{
+                return _right.fr();
+        }
+
+        Gmpfr inf()const{
+                return _left;
+        }
+
+        Gmpfr sup()const{
+                return _right;
+        }
+
+        // construction
+
+        Gmpfi(){}
+        ~Gmpfi(){}
+
+#define CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(_type) \
+        Gmpfi(const _type &t, \
+              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                _left=Gmpfr(t,std::round_toward_neg_infinity,p); \
+                _right=Gmpfr(t,std::round_toward_infinity,p); \
+                CGAL_assertion(_left<=t&&_right>=t); \
+        }
+
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(long);
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(unsigned long);
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(int);
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(double);
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(long double);
+CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz);
+
+#undef CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR
+
+        Gmpfi(const Gmpq &q,
+              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(0,p);
+                _right=Gmpfr(0,p);
+                mpfr_set_q(_left.fr(),q.mpq(),GMP_RNDD);
+                mpfr_set_q(_right.fr(),q.mpq(),GMP_RNDU);
+                CGAL_assertion(_left<=q&&_right>=q);
+        }
+
+        Gmpfi(mpfi_srcptr i){
+                _left=Gmpfr(&(i->left));
+                _right=Gmpfr(&(i->right));
+        }
+
+        Gmpfi(mpfi_srcptr i,Gmpfi::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(&(i->left),std::round_toward_neg_infinity,p);
+                _right=Gmpfr(&(i->right),std::round_toward_infinity,p);
+                CGAL_assertion(mpfr_cmp(_left.fr(),&(i->left))<=0 &&
+                               mpfr_cmp(_right.fr(),&(i->right))>=0);
+        }
+
+        Gmpfi(const Gmpfr &f,
+              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(f,std::round_toward_neg_infinity,p);
+                _right=Gmpfr(f,std::round_toward_infinity,p);
+                CGAL_assertion(_left<=f&&_right>=f);
+        }
+
+        Gmpfi(const Gmpfr &l,
+              const Gmpfr &r,
+              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(l,std::round_toward_neg_infinity,p);
+                _right=Gmpfr(r,std::round_toward_infinity,p);
+                CGAL_assertion(_left<=l||(_left.is_nan()&&l.is_nan()));
+                CGAL_assertion(_right>=l||(_right.is_nan()&&r.is_nan()));
+        }
+
+        Gmpfi(const std::pair<Gmpfr,Gmpfr> &bounds,
+              Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
+                _right=Gmpfr(bounds.second,std::round_toward_infinity,p);
+                CGAL_assertion(_left<=bounds.first||
+                               (_left.is_nan()&&bounds.first.is_nan()));
+                CGAL_assertion(_right>=bounds.second||
+                               (_right.is_nan()&&bounds.second.is_nan()));
+        }
+
+        template<class L,class R>
+        Gmpfi(const std::pair<L,R> &bounds,
+              Gmpfi::Precision_type p=get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
+                _right=Gmpfr(bounds.second,std::round_toward_infinity,p);
+                CGAL_assertion(_left<=bounds.first&&_right>=bounds.second);
+        }
+
+        // copy assignment operator
+        Gmpfi& operator=(const Gmpfi &a){
+                _left=a.inf();
+                _right=a.sup();
+                CGAL_assertion(_left==a.inf()||
+                               (_left.is_nan()&&a.inf().is_nan()));
+                CGAL_assertion(_right==a.sup()||
+                               (_right.is_nan()&&a.sup().is_nan()));
+                return *this;
+        }
+
+        // copy constructor without precision
+        Gmpfi(const Gmpfi &a){
+                _left=a.inf();
+                _right=a.sup();
+                CGAL_assertion(_left==a.inf()||
+                               (_left.is_nan()&&a.inf().is_nan()));
+                CGAL_assertion(_right==a.sup()||
+                               (_right.is_nan()&&a.sup().is_nan()));
+        }
+
+        // copy constructor with precision
+        Gmpfi(const Gmpfi &a,Gmpfi::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                _left=Gmpfr(a.inf(),std::round_toward_neg_infinity,p);
+                _right=Gmpfr(a.sup(),std::round_toward_infinity,p);
+                CGAL_assertion(_left<=a.inf()||
+                               (_left.is_nan()&&a.inf().is_nan()));
+                CGAL_assertion(_right>=a.sup()||
+                               (_right.is_nan()&&a.sup().is_nan()));
+        }
+
+        // default precision
+
+
+        static Gmpfi::Precision_type get_default_precision();
+        static Gmpfi::Precision_type set_default_precision(
+                                                Gmpfi::Precision_type prec);
+
+        // precision of a single Gmpfi object
+
+        Gmpfi::Precision_type get_precision()const;
+        Gmpfi round(Gmpfi::Precision_type)const;
+
+        // arithmetics
+
+        Gmpfi operator+()const;
+        Gmpfi operator-()const;
+
+#define CGAL_GMPFI_DECLARE_OPERATORS(_type) \
+        Gmpfi& operator+=(_type); \
+        Gmpfi& operator-=(_type); \
+        Gmpfi& operator*=(_type); \
+        Gmpfi& operator/=(_type);
+
+        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpfi&)
+        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpfr&)
+        CGAL_GMPFI_DECLARE_OPERATORS(long)
+        CGAL_GMPFI_DECLARE_OPERATORS(unsigned long)
+        CGAL_GMPFI_DECLARE_OPERATORS(int)
+        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpz&)
+        CGAL_GMPFI_DECLARE_OPERATORS(const Gmpq&)
+
+#undef CGAL_GMPFI_DECLARE_OPERATORS
+
+#define CGAL_GMPFI_DECLARE_STATIC_FUNCTION(_f,_t1,_t2) \
+        static Gmpfi _f (_t1,_t2,Gmpfi::Precision_type=0);
+
+#define CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(_t1,_t2) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(add,_t1,_t2) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(sub,_t1,_t2) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(mul,_t1,_t2) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTION(div,_t1,_t2)
+
+#define CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(_t) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(const Gmpfi&,_t) \
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(_t,const Gmpfi&)
+
+        CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS(const Gmpfi&,const Gmpfi&)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpfr&)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(long)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(unsigned long)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(int)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpz&)
+        CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS(const Gmpq&)
+
+#undef CGAL_GMPFI_DECLARE_STATIC_FUNCTION
+#undef CGAL_GMPFI_DECLARE_STATIC_FUNCTIONS
+#undef CGAL_GMPFI_DECLARE_TWO_WAY_STATIC_FUNCTIONS
+
+        Gmpfi abs(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
+        Gmpfi sqrt(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
+        Gmpfi cbrt(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
+        Gmpfi kthroot(int,
+                      Gmpfi::Precision_type=Gmpfi::get_default_precision()
+                     )const;
+        Gmpfi square(Gmpfi::Precision_type=Gmpfi::get_default_precision())const;
+
+        // comparison and query functions
+
+        bool is_point()const;
+        bool is_same(const Gmpfi&)const;
+        bool do_overlap(const Gmpfi&)const;
+        Uncertain<bool> is_zero()const;
+        Uncertain<bool> is_one()const;
+        bool is_nan()const;
+        bool is_inf()const;
+        bool is_number()const;
+        Uncertain<Sign> sign()const;
+        Uncertain<bool> is_positive()const;
+        Uncertain<bool> is_negative()const;
+        Uncertain<bool> is_square()const;
+        Uncertain<bool> is_square(Gmpfi&)const;
+        Uncertain<bool> divides(const Gmpfi&,
+                                Gmpfi&,
+                                Gmpfi::Precision_type=
+                                        Gmpfi::get_default_precision()
+                               )const;
+        Uncertain<Comparison_result> compare(const Gmpfi&)const;
+
+        // conversion functions
+
+        double to_double()const;
+        std::pair<double,double> to_interval()const;
+        std::pair<double,long> to_double_exp()const;
+        std::pair<std::pair<double,double>,long> to_interval_exp()const;
+};
+
+
+
+
+// --------------
+// implementation
+// --------------
+
+// default precision
+
+
+inline
+Gmpfi::Precision_type Gmpfi::get_default_precision(){
+
+  return default_precision();
+}
+
+inline
+Gmpfi::Precision_type Gmpfi::set_default_precision(Gmpfi::Precision_type prec){
+        Gmpfi::Precision_type old_prec= default_precision();
+        CGAL_assertion(prec>=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX);
+        default_precision() = prec;
+
+        return old_prec;
+}
+
+// precision of a single Gmpfi object
+
+inline
+Gmpfi::Precision_type Gmpfi::get_precision()const{
+        return (_left.get_precision()>_right.get_precision()?
+                (Gmpfi::Precision_type)_left.get_precision():
+                (Gmpfi::Precision_type)_right.get_precision());
+}
+
+inline
+Gmpfi Gmpfi::round(Gmpfi::Precision_type p)const{
+        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+        return Gmpfi(*this,p);
+}
+
+// arithmetics
+
+inline
+Gmpfi Gmpfi::operator+()const{
+        return(*this);
+}
+
+inline
+Gmpfi Gmpfi::operator-()const{
+        Gmpfi result (0, this->get_precision());
+        mpfi_neg (result.mpfi(), this->mpfi());
+        *(result._left.fr()) = result._interval.left;
+        *(result._right.fr()) = result._interval.right;
+        return result;
+}
+
+// CGAL_GMPFI_BALANCE_ENDPOINTS checks if both bounds of the interval have
+// the same precision. If not, it rounds the one with the smallest
+// precision.
+#define CGAL_GMPFI_BALANCE_ENDPOINTS \
+        if(_left.get_precision()<_right.get_precision()){ \
+                _left=Gmpfr(_left,_right.get_precision()); \
+        }else{ \
+                if(_right.get_precision()<_left.get_precision()){ \
+                        _right=Gmpfr(_right,_left.get_precision()); \
+                } \
+        }; \
+        CGAL_assertion_msg(_left.get_precision()==_right.get_precision(), \
+                           "error balancing bounds precision");
+
+// CGAL_GMPFI_OBJECT_BINARY_OPERATOR defines an overloaded binary operator
+// of the Gmpfi class, where the operated object belongs to another class,
+// which represents a point (as opposition to an interval). The operation
+// will be performed using the biggest precision of the bounds of this
+// Gmpfi object. That means that if bounds have different precision, one
+// of them (the one with the smallest precision) will be rounded. This is
+// not a problem when the object is not unique, since a new Gmpfi object
+// will be created with the bounds having the correct precision.
+#define CGAL_GMPFI_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
+        inline \
+        Gmpfi& Gmpfi::_op(const _class &b){ \
+                if(is_unique()){ \
+                        CGAL_GMPFI_BALANCE_ENDPOINTS \
+                        _fun(mpfi(),mpfi(),b._member); \
+                        gather_bounds(); \
+                }else{ \
+                        Gmpfi result (0, this->get_precision()); \
+                        _fun (result.mpfi(), this->mpfi(), b._member); \
+                        *(result._left.fr()) = result._interval.left; \
+                        *(result._right.fr()) = result._interval.right; \
+                        this->swap (result); \
+                } \
+                return(*this); \
+        }
+
+// CGAL_GMPFI_GMPFI_BINARY_OPERATOR defines an overloaded binary operator
+// of the Gmpfi class, where both operands are Gmpfi objects.  The
+// operation will be performed using the biggest precision of the bounds
+// of both intervals. The bounds of target object will be rounded
+// accordingly before the operation.
+#define CGAL_GMPFI_GMPFI_BINARY_OPERATOR(_op,_fun) \
+        inline \
+        Gmpfi& Gmpfi::_op(const Gmpfi &fi){ \
+                if(is_unique()){ \
+                        if(get_precision()<fi.get_precision()){ \
+                                Gmpfi result (0, fi.get_precision()); \
+                                _fun(result.mpfi(), this->mpfi(), fi.mpfi()); \
+                                *(result._left.fr()) = result._interval.left; \
+                                *(result._right.fr())= result._interval.right;\
+                                this->swap (result); \
+                        }else{ \
+                                CGAL_GMPFI_BALANCE_ENDPOINTS \
+                                _fun(mpfi(),mpfi(),fi.mpfi()); \
+                                gather_bounds(); \
+                        } \
+                }else{ \
+                        Gmpfi result(0, \
+                                     this->get_precision()<fi.get_precision()?\
+                                     fi.get_precision(): \
+                                     this->get_precision()); \
+                        _fun (result.mpfi(), this->mpfi(), fi.mpfi()); \
+                        *(result._left.fr()) = result._interval.left; \
+                        *(result._right.fr()) = result._interval.right; \
+                        this->swap (result); \
+                } \
+                return(*this); \
+  }
+
+// CGAL_GMPFI_TYPE_BINARY_OPERATOR defines an overloaded binary operator of
+// the Gmpfi class, where the operated number belongs to a c++ type.
+// Precision of the operation is defined in the same manner that in
+// CGAL_GMPFI_OBJECT_BINARY_OPERATOR.
+#define CGAL_GMPFI_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
+        inline \
+        Gmpfi& Gmpfi::_op(_type x){ \
+                if(is_unique()){ \
+                        CGAL_GMPFI_BALANCE_ENDPOINTS \
+                        _fun(mpfi(),mpfi(),x); \
+                        gather_bounds(); \
+                }else{ \
+                        Gmpfi result (0, this->get_precision()); \
+                        _fun (result.mpfi(), this->mpfi(), x); \
+                        *(result._left.fr()) = result._interval.left; \
+                        *(result._right.fr()) = result._interval.right; \
+                        this->swap (result); \
+                } \
+                return *this; \
+        }
+
+CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator+=,mpfi_add)
+CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator-=,mpfi_sub)
+CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator*=,mpfi_mul)
+CGAL_GMPFI_GMPFI_BINARY_OPERATOR(operator/=,mpfi_div)
+
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpfr,fr(),mpfi_add_fr)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpfr,fr(),mpfi_sub_fr)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpfr,fr(),mpfi_mul_fr)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpfr,fr(),mpfi_div_fr)
+
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,long,mpfi_add_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,long,mpfi_sub_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,long,mpfi_mul_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,long,mpfi_div_si)
+
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,unsigned long,mpfi_add_ui)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,unsigned long,mpfi_sub_ui)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,unsigned long,mpfi_mul_ui)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,unsigned long,mpfi_div_ui)
+
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator+=,int,mpfi_add_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator-=,int,mpfi_sub_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator*=,int,mpfi_mul_si)
+CGAL_GMPFI_TYPE_BINARY_OPERATOR(operator/=,int,mpfi_div_si)
+
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpz,mpz(),mpfi_add_z)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpz,mpz(),mpfi_sub_z)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpz,mpz(),mpfi_mul_z)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpz,mpz(),mpfi_div_z)
+
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator+=,Gmpq,mpq(),mpfi_add_q)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator-=,Gmpq,mpq(),mpfi_sub_q)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator*=,Gmpq,mpq(),mpfi_mul_q)
+CGAL_GMPFI_OBJECT_BINARY_OPERATOR(operator/=,Gmpq,mpq(),mpfi_div_q)
+
+#undef CGAL_GMPFI_BALANCE_ENDPOINTS
+#undef CGAL_GMPFI_GMPFI_BINARY_OPERATOR
+#undef CGAL_GMPFI_OBJECT_BINARY_OPERATOR
+#undef CGAL_GMPFI_TYPE_BINARY_OPERATOR
+
+// the static arithmetic functions are defined in a separate file
+#include <CGAL/GMP/Gmpfi_type_static.h>
+
+#define CGAL_GMPFI_ARITHMETIC_FUNCTION(_name,_fun) \
+        inline \
+        Gmpfi Gmpfi::_name (Gmpfi::Precision_type p)const{ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                Gmpfi result (0, p); \
+                _fun (result.mpfi(), this->mpfi()); \
+                *(result._left.fr()) = result._interval.left; \
+                *(result._right.fr()) = result._interval.right; \
+                return result; \
+        }
+
+CGAL_GMPFI_ARITHMETIC_FUNCTION(abs,mpfi_abs)
+CGAL_GMPFI_ARITHMETIC_FUNCTION(sqrt,mpfi_sqrt)
+
+inline
+Gmpfi Gmpfi::cbrt(Gmpfi::Precision_type p)const{
+        // MPFI does not provide a cubic root function
+        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+        Gmpfi result (0, p);
+        mpfr_cbrt(&(result.mpfi())->left, left_mpfr(), GMP_RNDD);
+        mpfr_cbrt(&(result.mpfi())->right,right_mpfr(),GMP_RNDU);
+        *(result._left.fr()) = result._interval.left;
+        *(result._right.fr()) = result._interval.right;
+        return result;
+}
+
+inline
+Gmpfi Gmpfi::kthroot(int k,Gmpfi::Precision_type p)const{
+        // MPFI does not provide k-th root functions
+        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+        Gmpfi result (0, p);
+        mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD);
+        mpfr_root(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU);
+        *(result._left.fr()) = result._interval.left;
+        *(result._right.fr()) = result._interval.right;
+        return result;
+}
+
+CGAL_GMPFI_ARITHMETIC_FUNCTION(square,mpfi_sqr)
+
+#undef CGAL_GMPFI_ARITHMETIC_FUNCTION
+
+// comparison and query functions
+
+inline
+bool Gmpfi::is_point()const{
+        return mpfr_equal_p(left_mpfr(),right_mpfr())!=0;
+}
+
+inline
+bool Gmpfi::is_same(const Gmpfi &b)const{
+        return(mpfr_equal_p(left_mpfr(),b.left_mpfr())!=0 &&
+                mpfr_equal_p(right_mpfr(),b.right_mpfr())!=0);
+}
+
+inline
+bool Gmpfi::do_overlap(const Gmpfi &b)const{
+        if(mpfr_lessequal_p(left_mpfr(),b.left_mpfr())!=0)
+                return mpfr_lessequal_p(b.left_mpfr(),right_mpfr())!=0;
+        else
+                return mpfr_lessequal_p(left_mpfr(),b.right_mpfr())!=0;
+}
+
+inline
+Uncertain<bool> Gmpfi::is_zero()const{
+        if(mpfr_zero_p(&mpfi()->left)!=0 && mpfr_zero_p(&mpfi()->right)!=0)
+                return true;
+        if(mpfi_has_zero(mpfi())!=0)
+                return Uncertain<bool>::indeterminate();
+        return false;
+}
+
+inline
+Uncertain<bool> Gmpfi::is_one()const{
+        if(mpfr_cmp_ui(left_mpfr(),1)==0 && mpfr_cmp_ui(right_mpfr(),1)==0)
+                return true;
+        if(mpfi_is_inside_ui(1,mpfi())!=0)
+                return Uncertain<bool>::indeterminate();
+        return false;
+}
+
+inline
+bool Gmpfi::is_nan()const{
+        return mpfi_nan_p(mpfi())!=0;
+}
+
+inline
+bool Gmpfi::is_inf()const{
+        return mpfi_inf_p(mpfi())!=0;
+}
+
+inline
+bool Gmpfi::is_number()const{
+        return mpfi_bounded_p(mpfi())!=0;
+}
+
+inline
+Uncertain<Sign> Gmpfi::sign()const{
+        int leftsign=mpfr_sgn(left_mpfr());
+        if(leftsign>0)
+                return POSITIVE;
+        if(leftsign==0){
+                if(mpfr_zero_p(right_mpfr())!=0)
+                        return ZERO;
+                else
+                        return Uncertain<Sign>::indeterminate();
+        }
+        if(mpfr_sgn(right_mpfr())<0)
+                return NEGATIVE;
+        return Uncertain<Sign>::indeterminate();
+}
+
+inline
+Uncertain<bool> Gmpfi::is_positive()const{
+        if(mpfr_sgn(left_mpfr())>0)
+                return true;
+        if(mpfr_sgn(right_mpfr())<=0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> Gmpfi::is_negative()const{
+        if(mpfr_sgn(right_mpfr())<0)
+                return true;
+        if(mpfr_sgn(left_mpfr())>=0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> Gmpfi::is_square()const{
+        if(mpfr_sgn(left_mpfr())>=0)
+                return true;
+        if(mpfr_sgn(right_mpfr())<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> Gmpfi::is_square(Gmpfi &y)const{
+        if(mpfr_sgn(left_mpfr())>=0){
+                y=sqrt();
+                return true;
+        }
+        if(mpfr_sgn(right_mpfr())<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> Gmpfi::divides(const Gmpfi &n,Gmpfi &c,Gmpfi::Precision_type p
+                              )const{
+        if(mpfr_zero_p(left_mpfr())!=0 && mpfr_zero_p(right_mpfr())!=0)
+                return false;
+        if(mpfi_has_zero(mpfi())!=0)
+                return Uncertain<bool>::indeterminate();
+        c=Gmpfi::div(n,*this,p);
+        return true;
+}
+
+inline
+Uncertain<Comparison_result> Gmpfi::compare(const Gmpfi& b)const{
+        if(mpfr_greater_p(left_mpfr(),b.right_mpfr())!=0)
+                return LARGER;
+        if(mpfr_greater_p(b.left_mpfr(),right_mpfr())!=0)
+                return SMALLER;
+        if(mpfr_equal_p(left_mpfr(),b.right_mpfr())!=0 &&
+                        mpfr_equal_p(b.left_mpfr(),right_mpfr())!=0)
+                return EQUAL;
+        return Uncertain<Comparison_result>::indeterminate();
+}
+
+// conversion functions
+
+inline
+double Gmpfi::to_double()const{
+        return mpfi_get_d(mpfi());
+}
+
+inline
+std::pair<double,double> Gmpfi::to_interval()const{
+        double d_low=mpfr_get_d(left_mpfr(),GMP_RNDD);
+        double d_upp=mpfr_get_d(right_mpfr(),GMP_RNDU);
+        CGAL_assertion(std::numeric_limits<double>::has_infinity);
+        // if a bound is finite and its double is infinity, we overflow
+        if(mpfr_inf_p(left_mpfr())==0&&
+                        d_low==std::numeric_limits<double>::infinity())
+                mpfr_set_underflow();
+        if(mpfr_inf_p(right_mpfr())==0&&
+                        d_upp==std::numeric_limits<double>::infinity())
+                mpfr_set_overflow();
+        return std::make_pair(d_low,d_upp);
+}
+
+inline
+std::pair<double,long> Gmpfi::to_double_exp()const{
+        mpfr_t middle;
+        long *e=NULL;
+        mpfr_init2(middle,53);
+        mpfi_get_fr(middle,mpfi());
+        double d=mpfr_get_d_2exp(e,middle,mpfr_get_default_rounding_mode());
+        mpfr_clear(middle);
+        return std::make_pair(d,*e);
+}
+
+inline
+std::pair<std::pair<double,double>,long> Gmpfi::to_interval_exp()const{
+        long *e1=NULL,*e2=NULL;
+        double d_low=mpfr_get_d_2exp(e1,left_mpfr(),GMP_RNDD);
+        double d_upp=mpfr_get_d_2exp(e2,right_mpfr(),GMP_RNDU);
+        if(e1<e2)
+                d_upp=d_upp/pow(2.,(double)((*e2)-(*e1)));
+        else if(e1>e2){
+                d_low=d_low/pow(2.,(double)((*e1)-(*e2)));
+                *e1=*e2;
+        }
+        return std::make_pair(std::make_pair(d_low,d_upp),*e1);
+}
+
+// input/output
+
+// This function reads an interval from the istream. It has the form
+// [inf,sup], where each one of inf and sup is read as a Gmpfr. Then, they
+// are rounded accordingly. The input may contain spaces between the
+// brackets and the numbers and the numbers and the comma. The result is
+// undefined when the input is malformed.
+inline
+std::istream& operator>>(std::istream& is,Gmpfi &f){
+        Gmpfr left,right;
+        std::istream::int_type c;
+        std::ios::fmtflags old_flags = is.flags();
+        is.unsetf(std::ios::skipws);
+        internal::eat_white_space(is);
+        c=is.get();
+        if(c!='['){
+                invalid_number:
+                is.setstate(std::ios_base::failbit);
+                is.flags(old_flags);
+                return is;
+        }
+        internal::eat_white_space(is);
+        is>>left;
+        c=is.get();
+        if(c!=',')
+                goto invalid_number;
+        is>>right;
+        internal::eat_white_space(is);
+        c=is.get();
+        if(c!=']')
+                goto invalid_number;
+        // Why is this done the following way? Because left and right can
+        // have different precision. Doing this with a constructor would
+        // force to create a Gmpfi where both endpoints have the same
+        // precision, what can give a wrong reconstruction of a previously
+        // outputted number. (This function will give a good reconstruction
+        // iff Gmpfr gives a good reconstruction.)
+        Gmpfi temp(0,(Gmpfi::Precision_type)MPFR_PREC_MIN);
+        mpfr_swap(left.fr(), temp.inf().fr());
+        mpfr_swap(right.fr(),temp.sup().fr());
+        f=temp;
+        return is;
+}
+
+inline
+std::ostream& operator<<(std::ostream& os,const Gmpfi &a){
+        return(os<<"["<<a.inf()<<","<<a.sup()<<"]");
+}
+
+// comparisons
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,const Gmpfi &b){
+        int c=mpfi_cmp(a.mpfi(),b.mpfi());
+        if(c<0)
+                return true;
+        if(c>0 || (a.is_point() && b.is_point()))
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,const Gmpfi &b){
+        if(mpfr_less_p(a.right_mpfr(),b.left_mpfr()) ||
+                        mpfr_less_p(b.right_mpfr(),a.left_mpfr()))
+                return false;
+        if(mpfr_equal_p(a.left_mpfr(),b.right_mpfr()) &&
+                        mpfr_equal_p(b.left_mpfr(),a.right_mpfr()))
+                return true;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,const Gmpfr &b){
+        if(mpfr_cmp(a.right_mpfr(),b.fr())<0)
+                return true;
+        if(mpfr_cmp(a.left_mpfr(),b.fr())>0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,const Gmpfr &b){
+        if(mpfr_cmp(a.left_mpfr(),b.fr())>0)
+                return true;
+        if(mpfr_cmp(a.right_mpfr(),b.fr())<0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,const Gmpfr &b){
+        if(a.is_point())
+                return(mpfr_cmp(a.left_mpfr(),b.fr())?false:true);
+        if(mpfr_cmp(a.left_mpfr(),b.fr())>0 ||
+                        mpfr_cmp(a.right_mpfr(),b.fr())<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,long b){
+        if(mpfr_cmp_si(a.right_mpfr(),b)<0)
+                return true;
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,long b){
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0)
+                return true;
+        if(mpfr_cmp_si(a.right_mpfr(),b)<0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,long b){
+        if(a.is_point())
+                return(mpfr_cmp_si(a.left_mpfr(),b)?false:true);
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || mpfr_cmp_si(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,unsigned long b){
+        if(mpfr_cmp_ui(a.right_mpfr(),b)<0)
+                return true;
+        if(mpfr_cmp_ui(a.left_mpfr(),b)>0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,unsigned long b){
+        if(mpfr_cmp_ui(a.left_mpfr(),b)>0)
+                return true;
+        if(mpfr_cmp_ui(a.right_mpfr(),b)<0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,unsigned long b){
+        if(a.is_point())
+                return(mpfr_cmp_ui(a.left_mpfr(),b)?false:true);
+        if(mpfr_cmp_ui(a.left_mpfr(),b)>0 || mpfr_cmp_ui(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,int b){
+        if(mpfr_cmp_si(a.right_mpfr(),b)<0)
+                return true;
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,int b){
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0)
+                return true;
+        if(mpfr_cmp_si(a.right_mpfr(),b)<0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,int b){
+        if(a.is_point())
+                return(mpfr_cmp_si(a.left_mpfr(),b)?false:true);
+        if(mpfr_cmp_si(a.left_mpfr(),b)>0 || mpfr_cmp_si(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,long double b){
+        if(mpfr_cmp_ld(a.right_mpfr(),b)<0)
+                return true;
+        if(mpfr_cmp_ld(a.left_mpfr(),b)>0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,long double b){
+        if(mpfr_cmp_ld(a.left_mpfr(),b)>0)
+                return true;
+        if(mpfr_cmp_ld(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,long double b){
+        if(a.is_point())
+                return(mpfr_cmp_ld(a.left_mpfr(),b)?false:true);
+        if(mpfr_cmp_ld(a.left_mpfr(),b)>0 || mpfr_cmp_ld(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,double b){
+        if(mpfr_cmp_d(a.right_mpfr(),b)<0)
+                return true;
+        if(mpfr_cmp_d(a.left_mpfr(),b)>0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,double b){
+        if(mpfr_cmp_d(a.left_mpfr(),b)>0)
+                return true;
+        if(mpfr_cmp_d(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,double b){
+        if(a.is_point())
+                return(mpfr_cmp_d(a.left_mpfr(),b)?false:true);
+        if(mpfr_cmp_d(a.left_mpfr(),b)>0 || mpfr_cmp_d(a.right_mpfr(),b)<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator<(const Gmpfi &a,const Gmpz &b){
+        if(mpfr_cmp_z(a.right_mpfr(),b.mpz())<0)
+                return true;
+        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator>(const Gmpfi &a,const Gmpz &b){
+        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0)
+                return true;
+        if(mpfr_cmp_z(a.right_mpfr(),b.mpz())<0 || a.is_point())
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<bool> operator==(const Gmpfi &a,const Gmpz &b){
+        if(a.is_point())
+                return(mpfr_cmp_z(a.left_mpfr(),b.mpz())?false:true);
+        if(mpfr_cmp_z(a.left_mpfr(),b.mpz())>0 ||
+                        mpfr_cmp_z(a.right_mpfr(),b.mpz())<0)
+                return false;
+        return Uncertain<bool>::indeterminate();
+}
+
+inline
+Uncertain<Gmpfi> min BOOST_PREVENT_MACRO_SUBSTITUTION
+                (const Gmpfi &x,const Gmpfi &y){
+        return (x<=y)?x:y;
+}
+
+inline
+Uncertain<Gmpfi> max BOOST_PREVENT_MACRO_SUBSTITUTION
+                (const Gmpfi &x,const Gmpfi &y){
+        return (x>=y)?x:y;
+}
+
+} // namespace CGAL
+
+
+#endif  // CGAL_GMPFI_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type_static.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type_static.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfi_type_static.h
rename to 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfi_type_static.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type.h
new file mode 100644
index 0000000..a4ea9eb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type.h
@@ -0,0 +1,1341 @@
+// Copyright (c) 2007-2010 Inria Lorraine (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author: Luis Peñaranda <luis.penaranda at gmx.com>
+
+#ifndef CGAL_GMPFR_TYPE_H
+#define CGAL_GMPFR_TYPE_H
+
+#include <CGAL/gmp.h>
+#include <mpfr.h>
+#include <boost/operators.hpp>
+#include <CGAL/Handle_for.h>
+#include <CGAL/GMP/Gmpz_type.h>
+#include <CGAL/GMP/Gmpzf_type.h>
+#include <limits>
+#include <CGAL/Uncertain.h>
+#include <CGAL/ipower.h>
+#include <CGAL/IO/io.h>
+
+#if MPFR_VERSION_MAJOR < 3
+        typedef mp_rnd_t mpfr_rnd_t;
+        typedef mp_prec_t mpfr_prec_t;
+        typedef mp_exp_t mpfr_exp_t;
+        #define MPFR_RNDN GMP_RNDN
+        #define MPFR_RNDZ GMP_RNDZ
+        #define MPFR_RNDU GMP_RNDU
+        #define MPFR_RNDD GMP_RNDD
+        #define CGAL_GMPFR_GET_Z_2EXP mpfr_get_z_exp
+#else
+        #define CGAL_GMPFR_GET_Z_2EXP mpfr_get_z_2exp
+#endif
+
+namespace CGAL{
+
+class Gmpfr;
+
+bool operator<(const Gmpfr&,const Gmpfr&);
+bool operator==(const Gmpfr&,const Gmpfr&);
+
+bool operator<(const Gmpfr&,long);
+bool operator>(const Gmpfr&,long);
+bool operator==(const Gmpfr&,long);
+
+bool operator<(const Gmpfr&,unsigned long);
+bool operator>(const Gmpfr&,unsigned long);
+bool operator==(const Gmpfr&,unsigned long);
+
+bool operator<(const Gmpfr&,int);
+bool operator>(const Gmpfr&,int);
+bool operator==(const Gmpfr&,int);
+
+bool operator<(const Gmpfr&,double);
+bool operator>(const Gmpfr&,double);
+bool operator==(const Gmpfr&,double);
+
+bool operator<(const Gmpfr&,long double);
+bool operator>(const Gmpfr&,long double);
+bool operator==(const Gmpfr&,long double);
+
+bool operator<(const Gmpfr&,const Gmpz&);
+bool operator>(const Gmpfr&,const Gmpz&);
+bool operator==(const Gmpfr&,const Gmpz&);
+
+struct Gmpfr_rep{
+        mpfr_t floating_point_number;
+        bool clear_on_destruction;
+        Gmpfr_rep():clear_on_destruction(true){}
+        ~Gmpfr_rep(){
+                if(clear_on_destruction)
+                        mpfr_clear(floating_point_number);
+        }
+};
+
+namespace internal{
+        template <>
+        struct Minmax_traits<mpfr_rnd_t>{
+                static const mpfr_rnd_t min=MPFR_RNDN;
+        #if MPFR_VERSION_MAJOR < 3
+                static const mpfr_rnd_t max=GMP_RND_MAX;
+        #else
+                static const mpfr_rnd_t max=MPFR_RNDF;
+        #endif
+        };
+} // namespace internal
+
+// The class Gmpfr is reference-counted using CGAL's handle mechanism. This
+// behavior may be changed, setting the flag CGAL_GMPFR_NO_REFCOUNT. A
+// non-reference-counted class is slightly more efficient in case the
+// implementation does not need to copy numbers (this is not usually the
+// case). Nevertheless, setting the flag may be useful for debugging
+// purposes.
+
+class Gmpfr:
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+        Gmpfr_rep,
+#else
+        Handle_for<Gmpfr_rep>,
+#endif
+        boost::ordered_euclidian_ring_operators1<Gmpfr,
+        boost::ordered_euclidian_ring_operators2<Gmpfr,long,
+        boost::ordered_euclidian_ring_operators2<Gmpfr,unsigned long,
+        boost::ordered_euclidian_ring_operators2<Gmpfr,int,
+        boost::totally_ordered2<Gmpfr,double,
+        boost::totally_ordered2<Gmpfr,long double,
+        boost::ordered_euclidian_ring_operators2<Gmpfr,Gmpz
+        > > > > > > >
+{
+        private:
+
+#ifndef CGAL_GMPFR_NO_REFCOUNT
+        typedef Handle_for<Gmpfr_rep>   Base;
+#endif
+
+        static Uncertain<mpfr_rnd_t> _gmp_rnd(std::float_round_style r){
+                switch(r){
+                        case std::round_toward_infinity: return MPFR_RNDU;
+                        case std::round_toward_neg_infinity: return MPFR_RNDD;
+                        case std::round_toward_zero: return MPFR_RNDZ;
+                        case std::round_to_nearest: return MPFR_RNDN;
+                        default: return Uncertain<mpfr_rnd_t>::indeterminate();
+                }
+        };
+
+        static std::float_round_style _cgal_rnd(mpfr_rnd_t r){
+                switch(r){
+                        case MPFR_RNDU: return std::round_toward_infinity;
+                        case MPFR_RNDD: return std::round_toward_neg_infinity;
+                        case MPFR_RNDZ: return std::round_toward_zero;
+                        case MPFR_RNDN: return std::round_to_nearest;
+                        default: return std::round_indeterminate;
+                }
+        };
+
+        public:
+
+        typedef mpfr_prec_t             Precision_type;
+
+        // access
+
+        mpfr_srcptr fr()const{
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+                return floating_point_number;
+#else
+                return Ptr()->floating_point_number;
+#endif
+        }
+
+        mpfr_ptr fr(){
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+                return floating_point_number;
+#else
+                return ptr()->floating_point_number;
+#endif
+        }
+
+        // The function dont_clear_on_destruction() is used to tell the
+        // object that the mpfr_t must not be cleared at object destruction
+        // (the destructor contrasts with that of the GMP types, where the
+        // structure is always cleared). The reason to do this is that,
+        // sometimes, the object is constructed from a mpfr_t structure and
+        // we know that the structure will be cleared somewhere else. The
+        // mpfr_t will not need to be cleared in case the object A is
+        // constructed from another Gmpfr object B, specifying the
+        // precision, and it happens that this precision is the same as the
+        // precision of A. In this case, a shallow copy is constructed.
+
+        void dont_clear_on_destruction(){
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+                clear_on_destruction=false;
+#else
+                ptr()->clear_on_destruction=false;
+#endif
+        }
+
+        bool is_unique(){
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+                return true;
+#else
+                return unique();
+#endif
+        }
+
+        // construction
+
+        Gmpfr(){
+                mpfr_init(fr());
+        }
+
+        Gmpfr(mpfr_srcptr f){
+                mpfr_custom_init_set(
+                        fr(),
+                        mpfr_custom_get_kind(f),
+                        mpfr_custom_get_exp(f),
+                        mpfr_get_prec(f),
+                        mpfr_custom_get_mantissa(f));
+                dont_clear_on_destruction();
+                CGAL_assertion((mpfr_nan_p(f)!=0 && mpfr_nan_p(fr())!=0) ||
+                               (mpfr_unordered_p(f,fr())==0 &&
+                                mpfr_equal_p(f,fr())!=0));
+        }
+
+        Gmpfr(mpfr_srcptr f,
+              std::float_round_style r,
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                if(p==mpfr_get_prec(f)){
+                        mpfr_custom_init_set(
+                                fr(),
+                                mpfr_custom_get_kind(f),
+                                mpfr_custom_get_exp(f),
+                                mpfr_get_prec(f),
+                                mpfr_custom_get_mantissa(f));
+                        dont_clear_on_destruction();
+                        CGAL_assertion((mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)||
+                                       (mpfr_unordered_p(f,fr())==0&&
+                                        mpfr_equal_p(f,fr())!=0));
+                }else{
+                        mpfr_init2(fr(),p);
+                        mpfr_set(fr(),f,_gmp_rnd(r));
+                        CGAL_assertion(mpfr_get_prec(fr())<mpfr_get_prec(f)||
+                                       mpfr_equal_p(fr(),f)!=0);
+                }
+        }
+
+        Gmpfr(mpfr_srcptr f,Gmpfr::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                if(p==mpfr_get_prec(f)){
+                        mpfr_custom_init_set(
+                                fr(),
+                                mpfr_custom_get_kind(f),
+                                mpfr_custom_get_exp(f),
+                                mpfr_get_prec(f),
+                                mpfr_custom_get_mantissa(f));
+                        dont_clear_on_destruction();
+                        CGAL_assertion((mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)||
+                                       (mpfr_unordered_p(f,fr())==0&&
+                                        mpfr_equal_p(f,fr())!=0));
+                }else{
+                        mpfr_init2(fr(),p);
+                        mpfr_set(fr(),f,mpfr_get_default_rounding_mode());
+                        CGAL_assertion(p<mpfr_get_prec(f)||
+                                       mpfr_equal_p(fr(),f)!=0);
+                }
+        }
+
+        Gmpfr(const Gmpzf &f,
+              std::float_round_style r,
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                mpfr_init2(fr(),p);
+                mpfr_set_z(fr(),f.man(),_gmp_rnd(r));
+                mpfr_mul_2si(fr(),fr(),f.exp(),_gmp_rnd(r));
+        }
+
+        Gmpfr(const Gmpzf &f,Gmpfr::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                mpfr_init2(fr(),p);
+                mpfr_set_z(fr(),f.man(),mpfr_get_default_rounding_mode());
+                mpfr_mul_2si(fr(),
+                             fr(),
+                             f.exp(),
+                             mpfr_get_default_rounding_mode());
+        }
+
+        Gmpfr(const Gmpzf &f){
+                mpfr_init2(fr(),
+                           static_cast<Gmpfr::Precision_type>(
+                                   mpz_sizeinbase(f.man(),2)<MPFR_PREC_MIN?
+                                   MPFR_PREC_MIN:
+                                   mpz_sizeinbase(f.man(),2)));
+                mpfr_set_z(fr(),f.man(),MPFR_RNDN);
+                CGAL_assertion_msg(mpfr_cmp_z(fr(),f.man())==0,
+                                   "inexact conversion of a Gmpzf mantissa");
+                CGAL_assertion_code(int inexact=)
+                mpfr_mul_2si(fr(),fr(),f.exp(),MPFR_RNDN);
+                CGAL_assertion_msg(inexact==0,"inexact conversion from Gmpzf");
+        }
+
+        Gmpfr(const std::pair<Gmpz,long> &intexp,
+              std::float_round_style r=Gmpfr::get_default_rndmode(),
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                mpfr_init2(fr(),p);
+                mpfr_set_z(fr(),intexp.first.mpz(),_gmp_rnd(r));
+                mpfr_mul_2si(fr(),fr(),intexp.second,_gmp_rnd(r));
+        }
+
+        Gmpfr(const std::pair<Gmpz,long> &intexp,Gmpfr::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+                mpfr_init2(fr(),p);
+                mpfr_set_z(fr(),
+                           intexp.first.mpz(),
+                           mpfr_get_default_rounding_mode());
+                mpfr_mul_2si(fr(),
+                             fr(),
+                             intexp.second,
+                             mpfr_get_default_rounding_mode());
+        }
+
+#define CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(_type,_fun) \
+        Gmpfr(_type x, \
+              std::float_round_style r, \
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                mpfr_init2(fr(),p); \
+                _fun(fr(),x,_gmp_rnd(r)); \
+        } \
+        Gmpfr(_type x,Gmpfr::Precision_type p){ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                mpfr_init2(fr(),p); \
+                _fun(fr(),x,mpfr_get_default_rounding_mode()); \
+        } \
+        Gmpfr(_type x){ \
+                mpfr_init2(fr(),mp_bits_per_limb*sizeof(_type)); \
+                _fun(fr(),x,mpfr_get_default_rounding_mode()); \
+        }
+
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(int,mpfr_set_si);
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long,mpfr_set_si);
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(unsigned,mpfr_set_ui);
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(unsigned long,mpfr_set_ui);
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(double,mpfr_set_d);
+
+        // With the MSVC compiler, 'long double' and 'double' are two
+        // different types, but with the same size: sizeof(long double)==8.
+        // For that reason, the cast of a long double to a double is
+        // exact.
+        // What is more, if one compile the mpfr library with mingw(32|64),
+        // on Windows, this compiler has sizeof(long double)==16, as
+        // gcc/g++ on Linux, and the produces libmpfr-1.dll has a symbol
+        // mpfr_set_ld which is binary incompatible with a call from MSVC.
+        // For those two reason, the constructor from 'long
+        // double' calls 'mpfr_set_l' on MSVC, instead of 'mpfr_set_ld'.
+        // That should not modify the semantic of a CGAL program, but
+        // only avoid the binary incompatibility of a CGAL program compiled
+        // with MSVC with the libmpfr-1.dll compiled with mingw.
+#ifdef _MSC_VER
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_d);
+#else
+        CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_ld);
+#endif
+#undef CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE
+
+#define CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT(_class,_member,_fun,_preccode) \
+        Gmpfr(const _class &x, \
+              std::float_round_style r, \
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                mpfr_init2(fr(),p); \
+                _fun(fr(),x._member,_gmp_rnd(r)); \
+        } \
+        Gmpfr(const _class &x,Gmpfr::Precision_type p){ \
+                CGAL_assertion(p<=MPFR_PREC_MAX); \
+                mpfr_init2(fr(),MPFR_PREC_MIN<p?p:MPFR_PREC_MIN); \
+                _fun(fr(),x._member,mpfr_get_default_rounding_mode()); \
+        } \
+        Gmpfr(const _class &x){ \
+                Gmpfr::Precision_type p=(_preccode); \
+                mpfr_init2(fr(),MPFR_PREC_MIN<p?p:MPFR_PREC_MIN); \
+                _fun(fr(),x._member,MPFR_RNDN); \
+        }
+
+        CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT(Gmpz,
+                                           mpz(),
+                                           mpfr_set_z,
+                                           static_cast<Gmpfr::Precision_type>(
+                                                x.bit_size()));
+
+#undef CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT
+
+        // When Gmpfr is refence counted, we inherit the assignment
+        // operator and the copy constructor from Handle_for.
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+        Gmpfr& operator=(const Gmpfr &a){
+                mpfr_set_prec(fr(),a.get_precision());
+                mpfr_set(fr(),a.fr(),mpfr_get_default_rounding_mode());
+                return *this;
+        }
+
+        Gmpfr(const Gmpfr &a){
+                mpfr_init2(fr(),a.get_precision());
+                mpfr_set(fr(),a.fr(),MPFR_RNDN);
+        }
+#endif
+
+        Gmpfr(const Gmpfr &a,
+              std::float_round_style r,
+              Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+#ifndef CGAL_GMPFR_NO_REFCOUNT
+                if(p==a.get_precision()){
+                        Gmpfr temp(a);
+                        // we use dont_clear_on_destruction because the
+                        // mpfr_t pointed to by fr() was never initialized
+                        dont_clear_on_destruction();
+                        swap(temp);
+                }else
+#endif
+                {
+                        mpfr_init2(fr(),p);
+                        mpfr_set(fr(),a.fr(),_gmp_rnd(r));
+                }
+        }
+
+        Gmpfr(const Gmpfr &a,Gmpfr::Precision_type p){
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+#ifndef CGAL_GMPFR_NO_REFCOUNT
+                if(p==a.get_precision()){
+                        Gmpfr temp(a);
+                        // we use dont_clear_on_destruction because the
+                        // mpfr_t pointed to by fr() was never initialized
+                        dont_clear_on_destruction();
+                        swap(temp);
+                }else
+#endif
+                {
+                        mpfr_init2(fr(),p);
+                        mpfr_set(fr(),a.fr(),mpfr_get_default_rounding_mode());
+                }
+        }
+
+        // default rounding mode
+
+        static std::float_round_style get_default_rndmode();
+        static std::float_round_style
+                set_default_rndmode(std::float_round_style);
+
+        // default precision
+
+        static Gmpfr::Precision_type get_default_precision();
+        static Gmpfr::Precision_type
+                set_default_precision(Gmpfr::Precision_type);
+
+        // precision of a single Gmpfr object
+
+        Gmpfr::Precision_type get_precision()const;
+        Gmpfr round(Gmpfr::Precision_type,std::float_round_style)const;
+
+        // mpfr global inexact flags
+
+        static void clear_flags();
+        static bool underflow_flag();
+        static bool overflow_flag();
+        static bool nan_flag();
+        static bool inex_flag();
+        static bool erange_flag();
+
+        // arithmetics
+
+        Gmpfr operator+()const;
+        Gmpfr operator-()const;
+
+#define CGAL_GMPFR_DECLARE_OPERATORS(_type) \
+        Gmpfr& operator+=(_type); \
+        Gmpfr& operator-=(_type); \
+        Gmpfr& operator*=(_type); \
+        Gmpfr& operator/=(_type);
+
+        CGAL_GMPFR_DECLARE_OPERATORS(const Gmpfr&)
+        Gmpfr& operator%=(const Gmpfr&);
+        CGAL_GMPFR_DECLARE_OPERATORS(long)
+        CGAL_GMPFR_DECLARE_OPERATORS(unsigned long)
+        CGAL_GMPFR_DECLARE_OPERATORS(int)
+        CGAL_GMPFR_DECLARE_OPERATORS(const Gmpz&)
+
+#undef CGAL_GMPFR_DECLARE_OPERATORS
+
+#define CGAL_GMPFR_DECLARE_STATIC_FUNCTION(_f,_t1,_t2) \
+        static Gmpfr _f (_t1, \
+                         _t2, \
+                         std::float_round_style=Gmpfr::get_default_rndmode()); \
+        static Gmpfr _f (_t1, \
+                         _t2, \
+                         Gmpfr::Precision_type, \
+                         std::float_round_style=Gmpfr::get_default_rndmode());
+
+#define CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(_t2) \
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(add,const Gmpfr&,_t2) \
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(sub,const Gmpfr&,_t2) \
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(mul,const Gmpfr&,_t2) \
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTION(div,const Gmpfr&,_t2)
+
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(const Gmpfr&)
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(long)
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(unsigned long)
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(int)
+        CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS(const Gmpz&)
+
+#undef CGAL_GMPFR_DECLARE_STATIC_FUNCTION
+#undef CGAL_GMPFR_DECLARE_STATIC_FUNCTIONS
+
+#define CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(_f) \
+        Gmpfr _f (std::float_round_style=Gmpfr::get_default_rndmode()) const; \
+        Gmpfr _f (Gmpfr::Precision_type,\
+                  std::float_round_style=Gmpfr::get_default_rndmode()) const;
+
+        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(abs)
+        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(sqrt)
+        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(cbrt)
+        Gmpfr kthroot
+                (int,std::float_round_style=Gmpfr::get_default_rndmode()) const;
+        Gmpfr kthroot
+                (int,
+                 Gmpfr::Precision_type,
+                 std::float_round_style=Gmpfr::get_default_rndmode()) const;
+        CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION(square)
+
+#undef CGAL_GMPFR_DECLARE_NO_ARGUMENT_FUNCTION
+
+        // comparison and query functions
+
+        bool is_zero()const;
+        bool is_one()const;
+        bool is_nan()const;
+        bool is_inf()const;
+        bool is_number()const;
+        Sign sign()const;
+        bool is_square()const;
+        bool is_square(Gmpfr&)const;
+        Comparison_result compare(const Gmpfr&)const;
+
+        // conversion functions
+
+        double to_double(std::float_round_style=Gmpfr::get_default_rndmode())
+                const;
+        std::pair<double,double> to_interval()const;
+        std::pair<double,long> to_double_exp(std::float_round_style=
+                                             Gmpfr::get_default_rndmode())const;
+        std::pair<std::pair<double,double>,long> to_interval_exp()const;
+        std::pair<Gmpz,long> to_integer_exp()const;
+};
+
+
+
+
+// --------------
+// implementation
+// --------------
+
+// default rounding mode, handled by mpfr
+inline
+std::float_round_style Gmpfr::get_default_rndmode(){
+        return _cgal_rnd(mpfr_get_default_rounding_mode());
+}
+
+inline
+std::float_round_style
+Gmpfr::set_default_rndmode(std::float_round_style rnd_mode){
+        std::float_round_style old_rnd_mode=Gmpfr::get_default_rndmode();
+        mpfr_set_default_rounding_mode(_gmp_rnd(rnd_mode));
+        return old_rnd_mode;
+}
+
+// default precision, handled by mpfr
+inline
+Gmpfr::Precision_type Gmpfr::get_default_precision(){
+        return static_cast<Gmpfr::Precision_type>(mpfr_get_default_prec());
+}
+
+inline
+Gmpfr::Precision_type Gmpfr::set_default_precision(Gmpfr::Precision_type prec){
+        Gmpfr::Precision_type old_prec=Gmpfr::get_default_precision();
+        CGAL_assertion(prec>=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX);
+        mpfr_set_default_prec(prec);
+        return old_prec;
+}
+
+// precision of a single Gmpfr object
+
+inline
+Gmpfr::Precision_type Gmpfr::get_precision()const{
+        return mpfr_get_prec(fr());
+}
+
+inline
+Gmpfr Gmpfr::round(Gmpfr::Precision_type p,std::float_round_style r)const{
+        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+        return Gmpfr(*this,r,p);
+}
+
+// mpfr global inexact flags
+
+inline
+void Gmpfr::clear_flags(){
+        mpfr_clear_flags();
+}
+
+inline
+bool Gmpfr::underflow_flag(){
+        return mpfr_underflow_p()!=0;
+}
+
+inline
+bool Gmpfr::overflow_flag(){
+        return mpfr_overflow_p()!=0;
+}
+
+inline
+bool Gmpfr::nan_flag(){
+        return mpfr_nanflag_p()!=0;
+}
+
+inline
+bool Gmpfr::inex_flag(){
+        return mpfr_inexflag_p()!=0;
+}
+
+inline
+bool Gmpfr::erange_flag(){
+        return mpfr_erangeflag_p()!=0;
+}
+
+// arithmetics
+
+inline
+Gmpfr Gmpfr::operator+()const{
+        return(*this);
+}
+
+inline
+Gmpfr Gmpfr::operator-()const{
+        Gmpfr result(0,get_precision());
+        mpfr_neg(result.fr(),fr(),MPFR_RNDN);
+        return result;
+}
+
+// CGAL_GMPFR_MEMBER_PREC returns the precision to be used to operate between
+// *this and a number of another type or class. Currently, the maximum of
+// *this' precision and the default precision is returned.
+#define CGAL_GMPFR_MEMBER_PREC() \
+        (get_precision()>Gmpfr::get_default_precision()? \
+         get_precision(): \
+         Gmpfr::get_default_precision())
+
+// CGAL_GMPFR_MEMBER_PREC_2 returns the precision for the operation between Gmpfr
+// objects *this and _b. Currently, it is the maximum of the precisions of
+// *this and _b and the default precision.
+// TODO: maybe we can rewrite this define optimally, maybe with an inline
+#define CGAL_GMPFR_MEMBER_PREC_2(_b) \
+        ( get_precision() >= mpfr_get_prec(_b.fr()) ? \
+                ( get_precision()>(Gmpfr::get_default_precision())? \
+                        get_precision():(Gmpfr::get_default_precision())): \
+                ( mpfr_get_prec(_b.fr())>(Gmpfr::get_default_precision())? \
+                        mpfr_get_prec(_b.fr()): \
+                        (Gmpfr::get_default_precision())) \
+        )
+
+// CGAL_GMPFR_OBJECT_BINARY_OPERATOR defines an overloaded binary operator of
+// the Gmpfr class, where the second parameter of the operator is an
+// object. It behaves differently when the Gmpfr class is reference-counted
+// or not.
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+#define CGAL_GMPFR_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(const _class &b){ \
+                if(get_precision()>=Gmpfr::get_default_precision()) { \
+                        _fun(fr(), \
+                             fr(), \
+                             b._member, \
+                             mpfr_get_default_rounding_mode()); \
+                }else{ \
+                        Gmpfr _temp(0,Gmpfr::get_default_precision()); \
+                        _fun(_temp.fr(), \
+                             fr(), \
+                             b._member, \
+                             mpfr_get_default_rounding_mode()); \
+                        mpfr_swap(_temp.fr(),fr()); \
+                } \
+                return *this; \
+        }
+#else
+#define CGAL_GMPFR_OBJECT_BINARY_OPERATOR(_op,_class,_member,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(const _class &b){ \
+                if(unique()){ \
+                        if(get_precision()>Gmpfr::get_default_precision()) { \
+                                _fun(fr(), \
+                                     fr(), \
+                                     b._member, \
+                                     mpfr_get_default_rounding_mode()); \
+                        }else{ \
+                                Gmpfr _temp(0,Gmpfr::get_default_precision()); \
+                                _fun(_temp.fr(), \
+                                     fr(), \
+                                     b._member, \
+                                     mpfr_get_default_rounding_mode()); \
+                                swap(_temp); \
+                        } \
+                }else{ \
+                        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
+                        _fun(result.fr(), \
+                             fr(), \
+                             b._member, \
+                             mpfr_get_default_rounding_mode()); \
+                        swap(result); \
+                } \
+                return *this; \
+        }
+#endif
+
+// CGAL_GMPFR_GMPFR_BINARY_OPERATOR is analogous to
+// CGAL_GMPFR_OBJECT_BINARY_OPERATOR, and it is used when the second operand is
+// another Gmpfr. The difference is the computation of the operation
+// precision.
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+#define CGAL_GMPFR_GMPFR_BINARY_OPERATOR(_op,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(const Gmpfr &b){ \
+                Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b); \
+                if(_p==get_precision()) { \
+                        _fun(fr(), \
+                             fr(), \
+                             b.fr(), \
+                             mpfr_get_default_rounding_mode()); \
+                }else{ \
+                        Gmpfr _temp(0,_p); \
+                        _fun(_temp.fr(), \
+                             fr(), \
+                             b.fr(), \
+                             mpfr_get_default_rounding_mode()); \
+                        mpfr_swap(_temp.fr(),fr()); \
+                } \
+                return *this; \
+        }
+#else
+#define CGAL_GMPFR_GMPFR_BINARY_OPERATOR(_op,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(const Gmpfr &b){ \
+                Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b); \
+                if(unique()&&(_p==get_precision())){ \
+                        _fun(fr(), \
+                             fr(), \
+                             b.fr(), \
+                             mpfr_get_default_rounding_mode()); \
+                }else{ \
+                        Gmpfr result(0,_p); \
+                        _fun(result.fr(), \
+                             fr(), \
+                             b.fr(), \
+                             mpfr_get_default_rounding_mode()); \
+                        swap(result); \
+                } \
+                return *this; \
+        }
+#endif
+
+// CGAL_GMPFR_TYPE_BINARY_OPERATOR is analogous to the
+// CGAL_GMPFR_OBJECT_BINARY_OPERATOR, where the second parameter is a type
+// instead of an object.
+#ifdef CGAL_GMPFR_NO_REFCOUNT
+#define CGAL_GMPFR_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(_type x){ \
+                if(get_precision()>=Gmpfr::get_default_precision()) { \
+                        _fun(fr(),fr(),x,mpfr_get_default_rounding_mode()); \
+                }else{ \
+                        Gmpfr _temp(0,Gmpfr::get_default_precision()); \
+                        _fun(_temp.fr(), \
+                             fr(), \
+                             x, \
+                             mpfr_get_default_rounding_mode()); \
+                        mpfr_swap(_temp.fr(),fr()); \
+                } \
+                return *this; \
+        }
+#else
+#define CGAL_GMPFR_TYPE_BINARY_OPERATOR(_op,_type,_fun) \
+        inline \
+        Gmpfr& Gmpfr::_op(_type x){ \
+                if(unique()){ \
+                        if(get_precision()>Gmpfr::get_default_precision()) { \
+                                _fun(fr(), \
+                                     fr(), \
+                                     x, \
+                                     mpfr_get_default_rounding_mode()); \
+                        }else{ \
+                                Gmpfr _temp(0,Gmpfr::get_default_precision()); \
+                                _fun(_temp.fr(), \
+                                     fr(), \
+                                     x, \
+                                     mpfr_get_default_rounding_mode()); \
+                                swap(_temp); \
+                        } \
+                }else{ \
+                        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
+                        _fun(result.fr(), \
+                             fr(), \
+                             x, \
+                             mpfr_get_default_rounding_mode()); \
+                        swap(result); \
+                } \
+                return *this; \
+        }
+#endif
+
+CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator+=,mpfr_add)
+CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator-=,mpfr_sub)
+CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator*=,mpfr_mul)
+CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator/=,mpfr_div)
+#if(defined(MPFR_VERSION)&&(MPFR_VERSION>=MPFR_VERSION_NUM(2,3,0)))
+CGAL_GMPFR_GMPFR_BINARY_OPERATOR(operator%=,mpfr_remainder)
+#else
+//#  warning "Gmpfr::operator%= is optimized in MPFR 2.3.0."
+inline
+Gmpfr& Gmpfr::operator%=(const Gmpfr &b){
+        Gmpfr::Precision_type _p=CGAL_GMPFR_MEMBER_PREC_2(b);
+        Gmpfr result(*this,_p);
+        result/=b;
+        mpfr_trunc(result.fr(),result.fr());
+        result*=b;
+        result-=*this;
+        mpfr_neg(result.fr(),result.fr(),MPFR_RNDN);
+#  ifdef CGAL_GMPFR_NO_REFCOUNT
+        mpfr_swap(result.fr(),fr());
+#  else
+        if(unique())
+                mpfr_swap(result.fr(),fr());
+        else
+                swap(result);
+#  endif
+        return *this;
+}
+#endif
+
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,long,mpfr_add_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,long,mpfr_sub_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,long,mpfr_mul_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,long,mpfr_div_si)
+
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,unsigned long,mpfr_add_ui)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,unsigned long,mpfr_sub_ui)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,unsigned long,mpfr_mul_ui)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,unsigned long,mpfr_div_ui)
+
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator+=,int,mpfr_add_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator-=,int,mpfr_sub_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator*=,int,mpfr_mul_si)
+CGAL_GMPFR_TYPE_BINARY_OPERATOR(operator/=,int,mpfr_div_si)
+
+CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator+=,Gmpz,mpz(),mpfr_add_z)
+CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator-=,Gmpz,mpz(),mpfr_sub_z)
+CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator*=,Gmpz,mpz(),mpfr_mul_z)
+CGAL_GMPFR_OBJECT_BINARY_OPERATOR(operator/=,Gmpz,mpz(),mpfr_div_z)
+
+#undef CGAL_GMPFR_OBJECT_BINARY_OPERATOR
+#undef CGAL_GMPFR_GMPFR_BINARY_OPERATOR
+#undef CGAL_GMPFR_TYPE_BINARY_OPERATOR
+
+// the static arithmetic functions are defined in a separate file
+#include <CGAL/GMP/Gmpfr_type_static.h>
+
+#define CGAL_GMPFR_ARITHMETIC_FUNCTION(_name,_fun) \
+        inline \
+        Gmpfr Gmpfr::_name (std::float_round_style r)const{ \
+                Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); \
+                _fun(result.fr(),fr(),_gmp_rnd(r)); \
+                return result; \
+        } \
+        inline \
+        Gmpfr Gmpfr::_name (Gmpfr::Precision_type p, \
+                            std::float_round_style r)const{ \
+                CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); \
+                Gmpfr result(0,p); \
+                _fun(result.fr(),fr(),_gmp_rnd(r)); \
+                return result; \
+        }
+
+CGAL_GMPFR_ARITHMETIC_FUNCTION(abs,mpfr_abs)
+CGAL_GMPFR_ARITHMETIC_FUNCTION(sqrt,mpfr_sqrt)
+CGAL_GMPFR_ARITHMETIC_FUNCTION(cbrt,mpfr_cbrt)
+
+inline
+Gmpfr Gmpfr::kthroot(int k,std::float_round_style r)const{
+        Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC());
+        mpfr_root(result.fr(),fr(),k,_gmp_rnd(r));
+        return result;
+}
+
+inline
+Gmpfr Gmpfr::kthroot(int k,
+                     Gmpfr::Precision_type p,
+                     std::float_round_style r)const{
+        CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
+        Gmpfr result(0,p);
+        mpfr_root(result.fr(),fr(),k,_gmp_rnd(r));
+        return result;
+}
+
+CGAL_GMPFR_ARITHMETIC_FUNCTION(square,mpfr_sqr)
+
+#undef CGAL_GMPFR_ARITHMETIC_FUNCTION
+#undef CGAL_GMPFR_MEMBER_PREC
+#undef CGAL_GMPFR_MEMBER_PREC_2
+
+// comparison and query functions
+
+inline
+bool Gmpfr::is_zero()const{
+        return mpfr_zero_p(fr())!=0;
+}
+
+inline
+bool Gmpfr::is_one()const{
+        return mpfr_cmp_ui(fr(),1)==0;
+}
+
+inline
+bool Gmpfr::is_nan()const{
+        return mpfr_nan_p(fr())!=0;
+}
+
+inline
+bool Gmpfr::is_inf()const{
+        return mpfr_inf_p(fr())!=0;
+}
+
+inline
+bool Gmpfr::is_number()const{
+        return mpfr_number_p(fr())!=0;
+}
+
+inline
+Sign Gmpfr::sign()const{
+        int s=mpfr_sgn(fr());
+        return(s==0?ZERO:(s>0?POSITIVE:NEGATIVE));
+}
+
+inline
+bool Gmpfr::is_square()const{
+        Sign s=sign();
+        if(s==NEGATIVE)
+                return false;
+        if(s==ZERO)
+                return true;
+        std::pair<Gmpz,long> r=Gmpfr::to_integer_exp();
+        if(r.second%2)
+                r.first=r.first*2;
+        return mpz_perfect_square_p(r.first.mpz())!=0;
+}
+
+inline
+bool Gmpfr::is_square(Gmpfr &y)const{
+        bool ret=is_square();
+        if(ret)
+                y=sqrt();
+        return ret;
+}
+
+inline
+Comparison_result Gmpfr::compare(const Gmpfr& b)const{
+        int c=mpfr_cmp(fr(),b.fr());
+        return(c?(c>0?LARGER:SMALLER):EQUAL);
+}
+
+// conversion functions
+
+inline
+double Gmpfr::to_double(std::float_round_style r)const{
+        return mpfr_get_d(fr(),_gmp_rnd(r));
+}
+
+inline
+std::pair<double,double>Gmpfr::to_interval()const{
+        return std::make_pair(
+                        mpfr_get_d(fr(),MPFR_RNDD),
+                        mpfr_get_d(fr(),MPFR_RNDU));
+}
+
+inline
+std::pair<double,long> Gmpfr::to_double_exp(std::float_round_style r)const{
+        long e;
+        double d=mpfr_get_d_2exp(&e,fr(),_gmp_rnd(r));
+        return std::make_pair(d,e);
+}
+
+inline
+std::pair<std::pair<double,double>,long> Gmpfr::to_interval_exp()const{
+        long e1,e2;
+        double d_low=mpfr_get_d_2exp(&e1,fr(),MPFR_RNDD);
+        double d_upp=mpfr_get_d_2exp(&e2,fr(),MPFR_RNDU);
+        CGAL_assertion(e1==e2);
+        return std::make_pair(std::make_pair(d_low,d_upp),e1);
+}
+
+inline
+std::pair<Gmpz,long> Gmpfr::to_integer_exp()const{
+        if(this->is_zero())
+                return std::make_pair(Gmpz(0),long(0));
+
+        Gmpz z;
+        long e=CGAL_GMPFR_GET_Z_2EXP(z.mpz(),this->fr());
+
+        long zeros=mpz_scan1(z.mpz(),0);
+        CGAL_assertion(z==(z>>zeros)<<zeros);
+        z>>=zeros;
+        CGAL_assertion(z%2!=0);
+        e+=zeros;
+
+        CGAL_postcondition_code(if(e>=0))
+        CGAL_postcondition(
+              (*this)==(Gmpfr(z,(mpfr_prec_t)z.bit_size())*CGAL::ipower(Gmpfr(2),e)));
+        CGAL_postcondition_code(else)
+        CGAL_postcondition(((*this)*(Gmpz(1)<<(-e)))==z);
+
+        return std::make_pair(z,e);
+}
+
+
+// input/output
+
+// This function was based on the Gmpq's one. It reads a number in the form
+// MeE, where M and E are integers. The read number is M.2^E. The number
+// may contain spaces between integers and the 'e', but not in the middle
+// of the numbers.
+inline
+std::istream& operator>>(std::istream& is,Gmpfr &f){
+        std::istream::int_type c;
+        std::ios::fmtflags old_flags = is.flags();
+
+        is.unsetf(std::ios::skipws);
+        internal::eat_white_space(is);
+
+        // 1. read the mantissa, it starts in +, - or a digit and ends in e
+        Gmpz mant(0);           // the mantissa of the number
+        Gmpz exp(0);            // the exponent of the number
+        bool neg_mant=false;    // true iff the mantissa is negative
+        bool neg_exp=false;     // true iff the exponent is negative
+        c=is.peek();
+        switch(c){
+                case '-':
+                        neg_mant=true;
+                        is.get();
+                        internal::eat_white_space(is);
+                        break;
+                case '+':
+                        is.get();
+                        internal::eat_white_space(is);
+                        break;
+                case 'n':       // this is NaN
+                        is.get();
+                        if(is.get()=='a'&&is.get()=='n'){
+                                f=Gmpfr();
+                                return is;
+                        }
+                        else
+                                goto invalid_number;
+                default:
+                        if(c!='i'&&(c<'0'||c>'9')){     // invalid number
+                                invalid_number:
+                                is.setstate(std::ios_base::failbit);
+                                is.flags(old_flags);
+                                return is;
+                        }
+        }
+
+        // at this point, we have the sign of the number and we are ready
+        // to read the mantissa
+        c=is.get();
+        if(c=='i'){     // infinity comes
+                if(is.get()=='n'&&is.get()=='f'){
+                        f=Gmpfr();
+                        mpfr_set_inf(f.fr(),neg_mant?-1:1);
+                        return is;
+                }
+                else
+                        goto invalid_number;
+        }
+
+        while(c>='0'&&c<='9'){
+                mant=10*mant+(c-'0');
+                c=is.get();
+        }
+
+        // set the correct sign of the mantissa
+        if(neg_mant)
+                mant=-mant;
+
+        is.putback(c);
+        internal::eat_white_space(is);
+
+        switch(c=is.get()){
+                case 'e':
+                        break;
+                default:
+                        is.setstate(std::ios_base::failbit);
+                        is.flags(old_flags);
+                        return is;
+        }
+        c=is.peek();
+        switch(c){
+                case '-':
+                        neg_exp=true;
+                        is.get();
+                        internal::eat_white_space(is);
+                        break;
+                case '+':
+                        is.get();
+                        internal::eat_white_space(is);
+                        break;
+                default:
+                        if(c<'0'||c>'9')
+                                goto invalid_number;
+        }
+        internal::eat_white_space(is);
+        while((c=is.get())>='0'&&c<='9')
+                exp=10*exp+(c-'0');
+        is.putback(c);
+        if(exp.bit_size()>8*sizeof(mpfr_exp_t))
+                mpfr_set_erangeflag();
+
+        // we have now both exponent and mantissa
+        f=Gmpfr(mant,
+                static_cast<Gmpfr::Precision_type>(
+                        mant.bit_size()>MPFR_PREC_MIN?
+                        mant.bit_size():
+                        MPFR_PREC_MIN));
+        if(neg_exp)
+                mpfr_div_2ui(f.fr(),f.fr(),mpz_get_ui(exp.mpz()),MPFR_RNDN);
+        else
+                mpfr_mul_2ui(f.fr(),f.fr(),mpz_get_ui(exp.mpz()),MPFR_RNDN);
+
+        // this expensive assertion checks that we didn't lose bits when
+        // multiplying or dividing by 2^exp
+        CGAL_expensive_assertion_code( \
+                Gmpfr g(0,static_cast<Gmpfr::Precision_type>( \
+                                MPFR_PREC_MIN<mant.bit_size()? \
+                                mant.bit_size(): \
+                                MPFR_PREC_MIN)); \
+                if(neg_exp) \
+                        mpfr_div_2ui(g.fr(), \
+                                     f.fr(), \
+                                     mpz_get_ui(exp.mpz()), \
+                                     MPFR_RNDN); \
+                else \
+                        mpfr_mul_2ui(g.fr(), \
+                                     f.fr(), \
+                                     mpz_get_ui(exp.mpz()), \
+                                     MPFR_RNDN); \
+        )
+        CGAL_expensive_assertion(g==mant);
+
+        return is;
+}
+
+inline
+std::ostream& operator<<(std::ostream& os,const Gmpfr &a){
+        if(a.is_nan())
+                return os<<"nan";
+        if(a.is_inf())
+                return os<<(a<0?"-inf":"+inf");
+        // The rest of the function was written by George Tzoumas.
+        if (!is_pretty(os)) {
+                std::pair<Gmpz,long> ie=a.to_integer_exp();
+                os << ie.first << 'e' << ie.second;
+                return os;
+        } else {
+                // human-readable format
+                mpfr_exp_t expptr;
+                char *str = mpfr_get_str(NULL, &expptr, 10, 0, a.fr(),
+                                mpfr_get_default_rounding_mode());
+                if (str == NULL) return os << "@err@";
+                std::string s(str);
+                mpfr_free_str(str);
+                int i = 0;
+                size_t n = s.length();
+                size_t k = 0;
+                while (k < n && s[n-k-1] == '0') k++; // count trailing zeros
+                if (k == n) return os << "0";
+                else if (k) {
+                        s.erase(n-k, k);  // remove trailing zeros
+                        n = s.length();
+                }
+                bool exp = false;
+                if(s[0] == '-') { os << "-"; i++; n--; } // sign
+                if (expptr < -5) {              // .125e-99
+                        s.insert(i, 1, '.'); exp = true;
+                } else if (expptr < 0) {
+                        s.insert(i, -expptr, '0');  // .00000125 -- .0125
+                        s.insert(i, 1, '.');
+                // The following cast of expptr is done for avoiding some
+                // compiler warnings. The cast is exact, because we know
+                // expptr is not negative here.
+                } else if ((size_t)expptr < n) {        // .125 -- 12.5
+                        s.insert(i+expptr, 1, '.');
+                } else if (expptr - n <= 5) {   // 125 -- 12500000
+                        s.append(expptr - n, '0');
+                } else {                        // .125e99
+                        s.insert(i, 1, '.'); exp = true;
+                }
+                os << s.substr(i);
+                if (exp) os << "e" << expptr;
+                return os;
+        }
+}
+
+// comparisons
+
+inline
+bool operator<(const Gmpfr &a,const Gmpfr &b){
+        return mpfr_less_p(a.fr(),b.fr())!=0;
+}
+
+inline
+bool operator==(const Gmpfr &a,const Gmpfr &b){
+        return mpfr_equal_p(a.fr(),b.fr())!=0;
+}
+
+inline
+bool operator<(const Gmpfr &a,long b){
+        return(mpfr_cmp_si(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,long b){
+        return(mpfr_cmp_si(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,long b){
+        return !mpfr_cmp_si(a.fr(),b);
+}
+
+inline
+bool operator<(const Gmpfr &a,unsigned long b){
+        return(mpfr_cmp_ui(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,unsigned long b){
+        return(mpfr_cmp_ui(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,unsigned long b){
+        return !mpfr_cmp_ui(a.fr(),b);
+}
+
+inline
+bool operator<(const Gmpfr &a,int b){
+        return(mpfr_cmp_si(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,int b){
+        return(mpfr_cmp_si(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,int b){
+        return !mpfr_cmp_si(a.fr(),b);
+}
+
+inline
+bool operator<(const Gmpfr &a,double b){
+        return(mpfr_cmp_d(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,double b){
+        return(mpfr_cmp_d(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,double b){
+        return !mpfr_cmp_d(a.fr(),b);
+}
+
+// See the comment about mpfr_set_ld and MSVC++, above.
+#ifdef _MSC_VER
+inline
+bool operator<(const Gmpfr &a,long double b){
+        return(mpfr_cmp_d(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,long double b){
+        return(mpfr_cmp_d(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,long double b){
+        return !mpfr_cmp_d(a.fr(),b);
+}
+#else
+inline
+bool operator<(const Gmpfr &a,long double b){
+        return(mpfr_cmp_ld(a.fr(),b)<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,long double b){
+        return(mpfr_cmp_ld(a.fr(),b)>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,long double b){
+        return !mpfr_cmp_ld(a.fr(),b);
+}
+#endif
+
+inline
+bool operator<(const Gmpfr &a,const Gmpz &b){
+        return(mpfr_cmp_z(a.fr(),b.mpz())<0);
+}
+
+inline
+bool operator>(const Gmpfr &a,const Gmpz &b){
+        return(mpfr_cmp_z(a.fr(),b.mpz())>0);
+}
+
+inline
+bool operator==(const Gmpfr &a,const Gmpz &b){
+        return !mpfr_cmp_z(a.fr(),b.mpz());
+}
+
+inline
+Gmpfr min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpfr& x,const Gmpfr& y){
+        return (x<=y)?x:y;
+}
+
+inline
+Gmpfr max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpfr& x,const Gmpfr& y){
+        return (x>=y)?x:y;
+}
+
+} // namespace CGAL
+
+#endif  // CGAL_GMPFR_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type_static.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type_static.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpfr_type_static.h
rename to 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpfr_type_static.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpq_type.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpq_type.h
new file mode 100644
index 0000000..91b666d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpq_type.h
@@ -0,0 +1,515 @@
+// Copyright (c) 2002,2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Sylvain Pion
+
+
+#ifndef CGAL_GMPQ_TYPE_H
+#define CGAL_GMPQ_TYPE_H
+
+#include <CGAL/basic.h>
+#include <CGAL/IO/io.h>
+
+#include <CGAL/GMP/Gmpz_type.h>
+#include <CGAL/GMP/Gmpfr_type.h>
+
+#include <CGAL/gmp.h>
+#include <mpfr.h>
+#include <utility>
+#include <string>
+
+#include <boost/operators.hpp>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Profile_counter.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4146)
+     // warning on - applied on unsigned number
+#endif
+
+namespace CGAL {
+
+// Wrapper around mpq_t to get the destructor call mpq_clear.
+// Contrary to mpz_t, there are no mpq_init_set_* functions,
+// so we simply call mpq_init() here.
+struct Gmpq_rep
+{
+  mpq_t mpQ;
+
+  Gmpq_rep()  { mpq_init(mpQ); }
+  ~Gmpq_rep() { mpq_clear(mpQ); }
+
+private:
+  // Make sure it does not get accidentally copied.
+  Gmpq_rep(const Gmpq_rep &);
+  Gmpq_rep & operator= (const Gmpq_rep &);
+};
+
+
+class Gmpq
+  : Handle_for<Gmpq_rep>,
+    boost::totally_ordered1< Gmpq
+  , boost::ordered_field_operators2< Gmpq, int
+  , boost::ordered_field_operators2< Gmpq, long
+  , boost::ordered_field_operators2< Gmpq, long long
+  , boost::ordered_field_operators2< Gmpq, double
+  , boost::ordered_field_operators2< Gmpq, Gmpz
+  , boost::ordered_field_operators2< Gmpq, Gmpfr
+    > > > > > > >
+{
+  typedef Handle_for<Gmpq_rep> Base;
+public:
+  typedef Tag_false  Has_gcd;
+  typedef Tag_true   Has_division;
+  typedef Tag_false  Has_sqrt;
+
+  typedef Tag_true   Has_exact_ring_operations;
+  typedef Tag_true   Has_exact_division;
+  typedef Tag_false  Has_exact_sqrt;
+
+  Gmpq() {}
+
+  Gmpq(const mpq_t q)
+  { mpq_set(mpq(), q); }
+
+  Gmpq(int n)
+  { mpq_set_si(mpq(), n, 1); }
+
+  Gmpq(unsigned int n)
+  { mpq_set_ui(mpq(), n, 1); }
+
+  Gmpq(long n)
+  { mpq_set_si(mpq(), n, 1); }
+
+  Gmpq(unsigned long n)
+  { mpq_set_ui(mpq(), n, 1); }
+
+private:
+  void init_ull(unsigned long long n){
+      CGAL_assertion(sizeof(long)==4 && sizeof(long long)==8);
+      mpq_set_ui(mpq(), (unsigned long)(n>>32), 1);
+      mpz_ptr z = mpq_numref(mpq());
+      mpz_mul_2exp (z, z, 32);
+      mpz_add_ui (z, z, (unsigned long)n);
+  }
+public:
+  Gmpq(unsigned long long n)
+  {
+    if (n <= std::numeric_limits<unsigned long>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
+      mpq_set_ui(mpq(), (unsigned long)n, 1);
+    else
+      init_ull(n);
+  }
+
+  Gmpq(long long n)
+  {
+    if (sizeof(long)==sizeof(long long))
+      mpq_set_si(mpq(), (long)n, 1);
+    else if (n>=0)
+      init_ull(n);
+    else {
+      init_ull(-(unsigned long long)n);
+      mpq_neg(mpq(), mpq());
+    }
+  }
+
+  Gmpq(const Gmpz& n)
+  { mpq_set_z(mpq(), n.mpz()); }
+
+  Gmpq(int n, int d)
+  {
+    if (d < 0) {
+      n = -n;
+      d = -d;
+    }
+    mpq_set_si(mpq(), n, d);
+    mpq_canonicalize(mpq());
+  }
+
+  Gmpq(signed long n, unsigned long d)
+  {
+    mpq_set_si(mpq(), n, d);
+    mpq_canonicalize(mpq());
+  }
+
+  Gmpq(unsigned long n, unsigned long d)
+  {
+    mpq_set_ui(mpq(), n, d);
+    mpq_canonicalize(mpq());
+  }
+
+  Gmpq(const Gmpz& n, const Gmpz& d)
+  {
+    mpz_set(mpq_numref(mpq()), n.mpz());
+    mpz_set(mpq_denref(mpq()), d.mpz());
+    mpq_canonicalize(mpq());
+  }
+
+  Gmpq(double d)
+  {
+    CGAL_assertion(is_finite(d));
+    mpq_set_d(mpq(), d);
+  }
+
+  Gmpq(const Gmpfr &f)
+  {
+    std::pair<Gmpz,long> intexp=f.to_integer_exp();
+    if(intexp.second<0){
+            mpz_set(mpq_numref(mpq()),intexp.first.mpz());
+            mpz_ui_pow_ui(mpq_denref(mpq()),2,-intexp.second);
+    }else{
+            mpz_mul_2exp(mpq_numref(mpq()),
+                         intexp.first.mpz(),
+                         (unsigned long)intexp.second);
+            mpz_set_ui(mpq_denref(mpq()),1);
+    }
+    // mpq_canonicalize is needed only when the numerator is odd and not zero
+    if(mpz_tstbit(intexp.first.mpz(),0)==0 && mpz_sgn(intexp.first.mpz())!=0)
+        mpq_canonicalize(mpq());
+    CGAL_assertion_msg(mpfr_cmp_q(f.fr(),mpq())==0,
+                       "error in conversion Gmpfr->Gmpq");
+  }
+
+  Gmpq(const std::string& str, int base = 10)
+  {
+    mpq_set_str(mpq(), str.c_str(), base);
+    mpq_canonicalize(mpq());
+  }
+
+#ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
+  int tam() const { return 0; }  // put here a code
+                                 // measuring the number of digits
+                                 // of the Gmpq
+// a possible code is:
+//  int tam() const { return std::max(numerator().tam(),
+//                                      denominator().tam()); }
+// the same as Quotient<MP_Float>
+#endif
+
+  // Gives the memory size in bytes. (not documented yet)
+  std::size_t size() const
+  {
+    std::size_t s_num = mpz_size(mpq_numref(mpq())) * (mp_bits_per_limb/8);
+    std::size_t s_den = mpz_size(mpq_denref(mpq())) * (mp_bits_per_limb/8);
+    return s_num + s_den;
+  }
+
+  Gmpz numerator() const
+  { return Gmpz(mpq_numref(mpq())); }
+
+  Gmpz denominator() const
+  { return Gmpz(mpq_denref(mpq())); }
+
+  Gmpq operator+() const;
+  Gmpq operator-() const;
+
+  Gmpq& operator+=(const Gmpq &q);
+  Gmpq& operator-=(const Gmpq &q);
+  Gmpq& operator*=(const Gmpq &q);
+  Gmpq& operator/=(const Gmpq &q);
+
+  bool operator==(const Gmpq &q) const { return mpq_equal(this->mpq(), q.mpq()) != 0;}
+  bool operator< (const Gmpq &q) const { return mpq_cmp(this->mpq(), q.mpq()) < 0; }
+
+  double to_double() const;
+  Sign sign() const;
+
+  const mpq_t & mpq() const { return Ptr()->mpQ; }
+  mpq_t & mpq() { return ptr()->mpQ; }
+
+  ~Gmpq()
+  {
+     CGAL_HISTOGRAM_PROFILER("[Gmpq sizes in log2 scale]",
+                             (unsigned) ( ::log(double(size())) / ::log(double(2)) )  );
+  }
+
+  // Interoperability with int
+  Gmpq& operator+=(int z){return (*this)+= Gmpq(z);}
+  Gmpq& operator-=(int z){return (*this)-= Gmpq(z);}
+  Gmpq& operator*=(int z){return (*this)*= Gmpq(z);}
+  Gmpq& operator/=(int z){return (*this)/= Gmpq(z);}
+  bool  operator==(int z) const {return mpq_cmp_si(mpq(),z,1)==0;}
+  bool  operator< (int z) const {return mpq_cmp_si(mpq(),z,1)<0;}
+  bool  operator> (int z) const {return mpq_cmp_si(mpq(),z,1)>0;}
+
+  // Interoperability with long
+  Gmpq& operator+=(long z){return (*this)+= Gmpq(z);}
+  Gmpq& operator-=(long z){return (*this)-= Gmpq(z);}
+  Gmpq& operator*=(long z){return (*this)*= Gmpq(z);}
+  Gmpq& operator/=(long z){return (*this)/= Gmpq(z);}
+  bool  operator==(long z) const {return mpq_cmp_si(mpq(),z,1)==0;}
+  bool  operator< (long z) const {return mpq_cmp_si(mpq(),z,1)<0;}
+  bool  operator> (long z) const {return mpq_cmp_si(mpq(),z,1)>0;}
+
+  // Interoperability with long long
+  Gmpq& operator+=(long long z){return (*this)+= Gmpq(z);}
+  Gmpq& operator-=(long long z){return (*this)-= Gmpq(z);}
+  Gmpq& operator*=(long long z){return (*this)*= Gmpq(z);}
+  Gmpq& operator/=(long long z){return (*this)/= Gmpq(z);}
+  bool  operator==(long long z) const {return (*this)== Gmpq(z);}
+  bool  operator< (long long z) const {return (*this)<  Gmpq(z);}
+  bool  operator> (long long z) const {return (*this)>  Gmpq(z);}
+
+  // Interoperability with double
+  Gmpq& operator+=(double d){return (*this)+= Gmpq(d);}
+  Gmpq& operator-=(double d){return (*this)-= Gmpq(d);}
+  Gmpq& operator*=(double d){return (*this)*= Gmpq(d);}
+  Gmpq& operator/=(double d){return (*this)/= Gmpq(d);}
+  bool  operator==(double d) const {return (*this)== Gmpq(d);}
+  bool  operator< (double d) const {return (*this)<  Gmpq(d);}
+  bool  operator> (double d) const {return (*this)>  Gmpq(d);}
+
+  // Interoperability with Gmpz
+  Gmpq& operator+=(const Gmpz&);
+  Gmpq& operator-=(const Gmpz&);
+  Gmpq& operator*=(const Gmpz&);
+  Gmpq& operator/=(const Gmpz&);
+  bool  operator==(const Gmpz &z) const {return (*this)== Gmpq(z);}
+  bool  operator< (const Gmpz &z) const {return (*this)<  Gmpq(z);}
+  bool  operator> (const Gmpz &z) const {return (*this)>  Gmpq(z);}
+
+  // Interoperability with Gmpfr
+  Gmpq& operator+=(const Gmpfr &f){return (*this)+= Gmpq(f);}
+  Gmpq& operator-=(const Gmpfr &f){return (*this)-= Gmpq(f);}
+  Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);}
+  Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);}
+  bool  operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;}
+  bool  operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;}
+  bool  operator> (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())<0;}
+};
+
+
+inline
+Gmpq
+Gmpq::operator-() const
+{
+    Gmpq Res;
+    mpq_neg(Res.mpq(), mpq());
+    return Res;
+}
+
+inline
+Gmpq
+Gmpq::operator+() const
+{
+  return Gmpq(mpq());
+}
+
+inline
+Gmpq
+operator+(const Gmpq &x, const Gmpq &y)
+{
+    Gmpq Res;
+    mpq_add(Res.mpq(), x.mpq(), y.mpq());
+    return Res;
+}
+
+inline
+Gmpq&
+Gmpq::operator+=(const Gmpq &z)
+{
+    (*this + z).swap(*this);
+    return *this;
+}
+
+inline
+Gmpq
+operator-(const Gmpq &x, const Gmpq &y)
+{
+    Gmpq Res;
+    mpq_sub(Res.mpq(), x.mpq(), y.mpq());
+    return Res;
+}
+
+inline
+Gmpq&
+Gmpq::operator-=(const Gmpq &z)
+{
+    (*this - z).swap(*this);
+    return *this;
+}
+
+inline
+Gmpq
+operator*(const Gmpq &x, const Gmpq &y)
+{
+    Gmpq Res;
+    mpq_mul(Res.mpq(), x.mpq(), y.mpq());
+    return Res;
+}
+
+inline
+Gmpq&
+Gmpq::operator*=(const Gmpq &z)
+{
+    (*this * z).swap(*this);
+    return *this;
+}
+
+inline
+Gmpq
+operator/(const Gmpq &x, const Gmpq &y)
+{
+    CGAL_precondition(y != 0);
+    Gmpq Res;
+    mpq_div(Res.mpq(), x.mpq(), y.mpq());
+    return Res;
+}
+
+inline
+Gmpq&
+Gmpq::operator/=(const Gmpq &z)
+{
+    (*this / z).swap(*this);
+    return *this;
+}
+
+inline
+Gmpq& Gmpq::operator+=(const Gmpz &z){
+  if(unique()){
+    mpz_addmul(mpq_numref(mpq()),mpq_denref(mpq()),z.mpz());
+  }else{
+    Gmpq result;
+    mpz_mul(mpq_numref(result.mpq()),
+            mpq_denref(mpq()),
+            z.mpz());
+    mpz_add(mpq_numref(result.mpq()),
+            mpq_numref(mpq()),
+            mpq_numref(result.mpq()));
+    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
+    swap(result);
+  }
+  return *this;
+}
+
+inline
+Gmpq& Gmpq::operator-=(const Gmpz &z){
+  if(unique()){
+    mpz_submul(mpq_numref(mpq()),mpq_denref(mpq()),z.mpz());
+  }else{
+    Gmpq result;
+    mpz_mul(mpq_numref(result.mpq()),
+            mpq_denref(mpq()),
+            z.mpz());
+    mpz_sub(mpq_numref(result.mpq()),
+            mpq_numref(mpq()),
+            mpq_numref(result.mpq()));
+    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
+    swap(result);
+  }
+  return *this;
+}
+
+inline
+Gmpq& Gmpq::operator*=(const Gmpz &z){
+  if(unique()){
+    mpz_mul(mpq_numref(mpq()),mpq_numref(mpq()),z.mpz());
+    mpq_canonicalize(mpq());
+  }else{
+    Gmpq result;
+    mpz_mul(mpq_numref(result.mpq()),mpq_numref(mpq()),z.mpz());
+    mpz_set(mpq_denref(result.mpq()),mpq_denref(mpq()));
+    mpq_canonicalize(result.mpq());
+    swap(result);
+  }
+  return *this;
+}
+
+inline
+Gmpq& Gmpq::operator/=(const Gmpz &z){
+  if(unique()){
+    mpz_mul(mpq_denref(mpq()),mpq_denref(mpq()),z.mpz());
+    mpq_canonicalize(mpq());
+  }else{
+    Gmpq result;
+    mpz_mul(mpq_denref(result.mpq()),mpq_denref(mpq()),z.mpz());
+    mpz_set(mpq_numref(result.mpq()),mpq_numref(mpq()));
+    mpq_canonicalize(result.mpq());
+    swap(result);
+  }
+  return *this;
+}
+
+inline
+double
+Gmpq::to_double() const
+{ return mpq_get_d(mpq()); }
+
+inline
+Sign
+Gmpq::sign() const
+{ return static_cast<Sign>(mpq_sgn(mpq())); }
+
+inline
+std::ostream&
+operator<<(std::ostream& os, const Gmpq &z)
+{
+  os << z.numerator() << "/" << z.denominator();
+  return os;
+}
+
+// inline
+// std::istream&
+// operator>>(std::istream& is, Gmpq &z)
+// {
+//   char c;
+//   Gmpz n, d;
+//   is >> n;
+//   is >> c;
+//   //CGAL_assertion(!is || c == '/');
+//   if (c != '/'){
+//     is.setstate(std::ios_base::failbit);
+//     return is;
+//   }
+//   is >> d;
+//   if (!is.fail()) {
+//     z = Gmpq(n,d);
+//   }
+//   return is;
+// }
+
+
+
+inline
+std::istream&
+operator>>(std::istream& is, Gmpq &z)
+{
+  internal::read_float_or_quotient<Gmpz,Gmpq>(is, z);
+  return is;
+}
+
+
+inline Gmpq min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){
+  return (x<=y)?x:y;
+}
+inline Gmpq max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){
+  return (x>=y)?x:y;
+}
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_GMPQ_TYPE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h
new file mode 100644
index 0000000..86e7263
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h
@@ -0,0 +1,438 @@
+// Copyright (c) 1999,2003,2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra, Sylvain Pion, Michael Hemmer
+
+
+#ifndef CGAL_GMPZ_TYPE_H
+#define CGAL_GMPZ_TYPE_H
+
+#include <CGAL/basic.h>
+#include <CGAL/IO/io.h>
+
+#include <CGAL/gmp.h>
+#include <mpfr.h>
+
+#include <boost/operators.hpp>
+#include <CGAL/Handle_for.h>
+
+#include <string>
+#include <locale>
+
+namespace CGAL {
+
+// TODO : benchmark without ref-counting, and maybe give the possibility
+// to select ref-counting or not, then... => template class.
+
+// Wrapper around mpz_t to get the destructor call mpz_clear.
+struct Gmpz_rep
+{
+// FIXME : bug if ~() is called before an mpz_init*() is called.
+// not a problem in practice, but not nice.
+// maybe the mpz_init_set* functions should move back to Gmpz_rep.
+// But then we should use the Storage_traits::construct/get...
+
+  mpz_t mpZ;
+
+  Gmpz_rep() {}
+  ~Gmpz_rep() { mpz_clear(mpZ); }
+
+private:
+  // Make sure it does not get accidentally copied.
+  Gmpz_rep(const Gmpz_rep &);
+  Gmpz_rep & operator= (const Gmpz_rep &);
+};
+
+
+class Gmpz
+  : Handle_for<Gmpz_rep>,
+    boost::ordered_euclidian_ring_operators1< Gmpz
+  , boost::ordered_euclidian_ring_operators2< Gmpz, int
+  , boost::ordered_euclidian_ring_operators2< Gmpz, long
+  , boost::ordered_euclidian_ring_operators2< Gmpz, unsigned long
+  , boost::shiftable< Gmpz , long
+  , boost::unit_steppable<Gmpz
+  , boost::bitwise<Gmpz
+> > > > > > >
+{
+  typedef Handle_for<Gmpz_rep> Base;
+public:
+  typedef Tag_true  Has_gcd;
+  typedef Tag_true  Has_division;
+  typedef Tag_true  Has_sqrt;
+
+  typedef Tag_true  Has_exact_ring_operations;
+  typedef Tag_true  Has_exact_division;
+  typedef Tag_false Has_exact_sqrt;
+
+  Gmpz()
+  { mpz_init(mpz()); }
+
+  Gmpz(const mpz_t z)
+  { mpz_init_set(mpz(), z); }
+
+  Gmpz(int i)
+  { mpz_init_set_si(mpz(), i); }
+
+  Gmpz(long l)
+  { mpz_init_set_si(mpz(), l); }
+
+  Gmpz(unsigned long l)
+  { mpz_init_set_ui(mpz(), l); }
+
+  Gmpz(double d)
+  {
+     CGAL_warning_msg(is_integer(d), "Gmpz constructed from non-integer double value");
+     CGAL_assertion(is_finite(d));
+     mpz_init_set_d(mpz(), d);
+   }
+
+  Gmpz(const std::string& str, int base = 10)
+  { mpz_init_set_str(mpz(), str.c_str(), base); }
+
+  // returns the number of bits used to represent this number
+  size_t bit_size() const { return mpz_sizeinbase(mpz(),2); }
+
+  // returns the memory size in bytes
+  size_t size() const { return mpz_size(mpz()) / (mp_bits_per_limb/8); }
+
+  // returns the number of decimal digits needed to represent this number
+  size_t approximate_decimal_length() const { return mpz_sizeinbase(mpz(),10); }
+
+  double to_double() const {return mpz_get_d(mpz());}
+  Sign sign() const { return static_cast<Sign>(mpz_sgn(mpz()));}
+
+  const mpz_t & mpz() const { return Ptr()->mpZ; }
+  mpz_t & mpz() { return ptr()->mpZ; }
+
+  #ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
+  int tam() const { return 0; }  // put here a code
+                                 // measuring the number of digits
+                                 // of the Gmpz
+#endif
+
+#define CGAL_GMPZ_OBJECT_OPERATOR(_op,_class,_fun)    \
+  Gmpz& _op(const _class& z){                        \
+    Gmpz Res;                                         \
+    _fun(Res.mpz(), mpz(), z.mpz());                  \
+    swap(Res);                                        \
+    return *this;                                     \
+  }
+
+  CGAL_GMPZ_OBJECT_OPERATOR(operator+=,Gmpz,mpz_add);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator-=,Gmpz,mpz_sub);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator*=,Gmpz,mpz_mul);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator/=,Gmpz,mpz_tdiv_q);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator%=,Gmpz,mpz_tdiv_r);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator&=,Gmpz,mpz_and);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator|=,Gmpz,mpz_ior);
+  CGAL_GMPZ_OBJECT_OPERATOR(operator^=,Gmpz,mpz_xor);
+#undef CGAL_GMPZ_OBJECT_OPERATOR
+
+  bool operator<(const Gmpz &b) const
+  { return mpz_cmp(this->mpz(), b.mpz()) < 0; }
+  bool operator==(const Gmpz &b) const
+  { return mpz_cmp(this->mpz(), b.mpz()) == 0; }
+
+
+  Gmpz operator+() const {return Gmpz( mpz() );}
+  Gmpz operator-() const {
+    Gmpz Res;
+    mpz_neg(Res.mpz(), mpz());
+    return Res;
+  }
+
+  Gmpz& operator <<= (const unsigned long& i){
+    Gmpz Res;
+    mpz_mul_2exp(Res.mpz(),this->mpz(), i);
+    swap(Res);
+    return *this;
+  }
+  Gmpz& operator >>= (const unsigned long& i){
+    Gmpz Res;
+    mpz_tdiv_q_2exp(Res.mpz(),this->mpz(), i);
+    swap(Res);
+    return *this;
+  }
+
+  Gmpz& operator++(){return *this+=1;}
+  Gmpz& operator--(){return *this-=1;}
+
+
+  // interoperability with int
+  Gmpz& operator+=(int i);
+  Gmpz& operator-=(int i);
+  Gmpz& operator*=(int i);
+  Gmpz& operator/=(int i);
+  bool  operator==(int i) const {return mpz_cmp_si(this->mpz(), i) == 0;};
+  bool  operator< (int i) const {return mpz_cmp_si(this->mpz(), i) < 0;};
+  bool  operator> (int i) const {return mpz_cmp_si(this->mpz(), i) > 0;};
+
+  // interoperability with long
+  Gmpz& operator+=(long i);
+  Gmpz& operator-=(long i);
+  Gmpz& operator*=(long i);
+  Gmpz& operator/=(long i);
+  bool  operator==(long i) const {return mpz_cmp_si(this->mpz(), i) == 0;};
+  bool  operator< (long i) const {return mpz_cmp_si(this->mpz(), i) < 0;};
+  bool  operator> (long i) const {return mpz_cmp_si(this->mpz(), i) > 0;};
+
+  // interoperability with unsigned long
+  Gmpz& operator+=(unsigned long i);
+  Gmpz& operator-=(unsigned long i);
+  Gmpz& operator*=(unsigned long i);
+  Gmpz& operator/=(unsigned long i);
+  bool  operator==(unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) == 0;};
+  bool  operator< (unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) < 0;};
+  bool  operator> (unsigned long i) const {return mpz_cmp_ui(this->mpz(), i) > 0;};
+};
+
+
+
+#define CGAL_GMPZ_SCALAR_OPERATOR(_op,_type,_fun)   \
+  inline Gmpz& Gmpz::_op(_type z) {                 \
+    Gmpz Res;                                       \
+    _fun(Res.mpz(), mpz(), z);                      \
+    swap(Res);                                      \
+    return *this;                                   \
+  }
+
+CGAL_GMPZ_SCALAR_OPERATOR(operator*=,int,mpz_mul_si)
+CGAL_GMPZ_SCALAR_OPERATOR(operator*=,long,mpz_mul_si)
+
+CGAL_GMPZ_SCALAR_OPERATOR(operator+=,unsigned long,mpz_add_ui)
+CGAL_GMPZ_SCALAR_OPERATOR(operator-=,unsigned long,mpz_sub_ui)
+CGAL_GMPZ_SCALAR_OPERATOR(operator*=,unsigned long,mpz_mul_ui)
+CGAL_GMPZ_SCALAR_OPERATOR(operator/=,unsigned long,mpz_tdiv_q_ui)
+#undef CGAL_GMPZ_SCALAR_OPERATOR
+
+
+inline Gmpz& Gmpz::operator+=(int i)
+{
+  Gmpz Res;
+  if (i >= 0)
+    mpz_add_ui(Res.mpz(), mpz(), i);
+  else
+    mpz_sub_ui(Res.mpz(), mpz(), -i);
+  swap(Res);
+  return *this;
+}
+
+inline Gmpz& Gmpz::operator+=(long i)
+{
+  Gmpz Res;
+  if (i >= 0)
+    mpz_add_ui(Res.mpz(), mpz(), i);
+  else
+    mpz_sub_ui(Res.mpz(), mpz(), -i);
+  swap(Res);
+  return *this;
+}
+
+
+
+inline Gmpz& Gmpz::operator-=(int  i){return *this+=-i;}
+inline Gmpz& Gmpz::operator-=(long i){return *this+=-i;}
+
+inline Gmpz& Gmpz::operator/=(int b) {
+  if (b>0) {
+    Gmpz Res;
+    mpz_tdiv_q_ui(Res.mpz(), mpz(), b);
+    swap(Res);
+    return *this;
+  }
+  return *this /= Gmpz(b);
+}
+
+inline Gmpz& Gmpz::operator/=(long b) {
+  if (b>0) {
+    Gmpz Res;
+    mpz_tdiv_q_ui(Res.mpz(), mpz(), b);
+    swap(Res);
+    return *this;
+  }
+  return *this /= Gmpz(b);
+}
+
+inline
+std::ostream&
+operator<<(std::ostream& os, const Gmpz &z)
+{
+  char *str = new char [mpz_sizeinbase(z.mpz(),10) + 2];
+  str = mpz_get_str(str, 10, z.mpz());
+  os << str ;
+  delete[] str;
+  return os;
+}
+
+
+inline
+std::istream &
+gmpz_new_read(std::istream &is, Gmpz &z)
+{
+  bool negative = false;
+  const std::istream::char_type zero = '0';
+  std::istream::int_type c;
+  Gmpz r;
+  std::ios::fmtflags old_flags = is.flags();
+
+  is.unsetf(std::ios::skipws);
+  internal::eat_white_space(is);
+
+  c=is.peek();
+  if (c=='-' || c=='+'){
+      is.get();
+      CGAL_assertion(!is.fail());
+      negative=(c=='-');
+      internal::eat_white_space(is);
+      c=is.peek();
+  }
+
+  std::istream::char_type cc= c;
+
+  if (c== std::istream::traits_type::eof() ||
+      !std::isdigit(cc, std::locale::classic() ) ){
+    is.setstate(std::ios_base::failbit);
+  } else {
+    CGAL_assertion(cc==c);
+    r= cc-zero;
+    is.get();
+    CGAL_assertion(!is.fail());
+
+    // The following loop was supposed to be an infinite loop with:
+    //   while (true)
+    // where the break condition is that is.peek() returns and EOF or a
+    // non-digit character.
+    //
+    // Unfortunately, the wording of the C++03 and C++11 standard was not
+    // well understood by the authors of libc++ (the STL of clang++) and,
+    // in the version of libc++ shipped with Apple-clang-3.2,
+    // istream::peek() set the flag eofbit when it reads the last character
+    // of the stream *instead* of setting it only when it *tries to read
+    // past the last character*. For that reason, to avoid that the next
+    // peek() sets also the failbit, one has to check for EOL twice.
+    //
+    // See the LWG C++ Issue 2036, classified as Not-A-Defect:
+    //   http://lwg.github.com/issues/lwg-closed.html#2036
+    // and a StackOverflow related question:
+    //   http://stackoverflow.com/a/9020292/1728537
+    // --
+    // Laurent Rineau, 2013/10/10
+    while (!is.eof()) {
+      c=is.peek();
+      if (c== std::istream::traits_type::eof()) {
+        break;
+      }
+      cc=c;
+      if  ( !std::isdigit(cc, std::locale::classic() )) {
+        break;
+      }
+      is.get();
+      CGAL_assertion(!is.fail());
+      CGAL_assertion(cc==c);
+      r= r*10+(cc-zero);
+    }
+  }
+
+  is.flags(old_flags);
+  if (!is.fail()) {
+    if (negative) {
+      z=-r;
+    } else {
+      z=r;
+    }
+  }
+  return is;
+}
+
+/*inline
+std::istream&
+read_gmpz(std::istream& is, Gmpz &z) {
+  bool negative = false;
+  bool good = false;
+  const int null = '0';
+  char c;
+  Gmpz tmp;
+  std::ios::fmtflags old_flags = is.flags();
+
+  is.unsetf(std::ios::skipws);
+  while (is.get(c) && std::isspace(c, std::locale::classic() ))
+  {}
+
+  if (c == '-')
+  {
+        negative = true;
+        while (is.get(c) && std::isspace(c, std::locale::classic() ))
+        {}
+  }
+  if (std::isdigit(c, std::locale::classic() ))
+  {
+        good = true;
+        tmp = c - null;
+        while (is.get(c) && std::isdigit(c, std::locale::classic() ))
+        {
+            tmp = 10*tmp + (c-null);
+        }
+  }
+  if (is)
+        is.putback(c);
+  if (sign(tmp) != ZERO && negative)
+      tmp = -tmp;
+  if (good){
+      z = tmp;
+      }
+   else
+    is.clear(is.rdstate() | std::ios::failbit);
+
+  is.flags(old_flags);
+  return is;
+  }*/
+
+inline
+std::istream&
+operator>>(std::istream& is, Gmpz &z)
+{
+  return gmpz_new_read(is, z);
+}
+
+template <>
+struct Split_double<Gmpz>
+{
+  void operator()(double d, Gmpz &num, Gmpz &den) const
+  {
+    std::pair<double, double> p = split_numerator_denominator(d);
+    num = Gmpz(p.first);
+    den = Gmpz(p.second);
+  }
+};
+
+inline Gmpz min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpz& x,const Gmpz& y){
+  return (x<=y)?x:y;
+}
+inline Gmpz max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpz& x,const Gmpz& y){
+  return (x>=y)?x:y;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_GMPZ_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpzf_type.h b/3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpzf_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/GMP/Gmpzf_type.h
rename to 3rdparty/CGAL-4.8/include/CGAL/GMP/Gmpzf_type.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/GMP_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/GMP_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/GMP_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/GMP_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/General_polygon_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/General_polygon_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_2.h b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_2.h
new file mode 100644
index 0000000..84193e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_2.h
@@ -0,0 +1,117 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$ $Date$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+
+#ifndef CGAL_GENERAL_POLYGON_SET_2_H
+#define CGAL_GENERAL_POLYGON_SET_2_H
+
+#include <CGAL/basic.h>
+
+#include <CGAL/Boolean_set_operations_2/Gps_default_dcel.h>
+#include <CGAL/General_polygon_set_on_surface_2.h>
+#include <CGAL/Arrangement_2/Arr_default_planar_topology.h>
+#include <CGAL/Arrangement_2.h>
+
+namespace CGAL {
+
+// General_polygon_set_2
+template <class Traits_, class Dcel_ = Gps_default_dcel<Traits_> >
+class General_polygon_set_2 : public General_polygon_set_on_surface_2
+  <Traits_, typename Default_planar_topology<Traits_, Dcel_>::Traits>
+{
+protected:
+  typedef General_polygon_set_2<Traits_, Dcel_>           Self;
+
+public:
+  typedef Traits_                                         Traits_2;
+  typedef Dcel_                                           Dcel;
+
+  typedef General_polygon_set_on_surface_2 <Traits_2,
+    typename Default_planar_topology<Traits_2, Dcel >::Traits>
+                                                          Base;
+
+  typedef CGAL::Arrangement_2<Traits_2, Dcel>             Arrangement_2;
+
+  typedef typename Base::Polygon_2                        Polygon_2;
+  typedef typename Base::Polygon_with_holes_2             Polygon_with_holes_2;
+
+  // default costructor
+  General_polygon_set_2() : Base() {}
+
+  // constructor with traits object
+  General_polygon_set_2(const Traits_2& tr) : Base(tr) {}
+
+  explicit General_polygon_set_2(const Polygon_2& pgn) : Base(pgn) {}
+
+  explicit General_polygon_set_2(const Polygon_with_holes_2& pgn_with_holes):
+   Base(pgn_with_holes)
+  {}
+
+  // For some reason the below functions (the ones that we call "using" for)
+  // are hidden by the function in this class and are not found in the parent's
+  // class (General_polygon_set_on_surface_2) when they are called on an
+  // object of type General_polygon_set_2.
+  // Check in the Vandervoorde / Stroustrup books what is the exact reason.
+  // (There may be a better and more correct solution.)
+  using Base::intersection;
+  using Base::join;
+  using Base::symmetric_difference;
+
+  inline void intersection(const Self& ps1, const Self& ps2)
+  {
+    Base::intersection(static_cast<const Base&>(ps1),
+                       static_cast<const Base&>(ps2));
+  }
+
+  inline void join(const Self& ps1, const Self& ps2)
+  {
+    Base::join(static_cast<const Base&>(ps1), static_cast<const Base&>(ps2));
+  }
+
+  inline void symmetric_difference(const Self& ps1, const Self& ps2)
+  {
+    Base::symmetric_difference(static_cast<const Base&>(ps1),
+                               static_cast<const Base&>(ps2));
+  }
+
+  //@{
+
+  /*! Obtain a const reference to the underlying arrangement
+   * \return the underlying arrangement.
+   */
+  const Arrangement_2& arrangement() const
+  {
+    return *(static_cast<const Arrangement_2*>(this->m_arr));
+  }
+
+  /*! Obtain a reference to the underlying arrangement
+   * \return the underlying arrangement.
+   */
+  Arrangement_2& arrangement()
+  {
+    return *(static_cast<Arrangement_2*>(this->m_arr));
+  }
+
+  //@}
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_on_surface_2.h b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_on_surface_2.h
new file mode 100644
index 0000000..de22960
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_set_on_surface_2.h
@@ -0,0 +1,150 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$ $Date$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+//                 Ophir Setter    <ophir.setter at cs.tau.ac.il>
+
+#ifndef CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
+#define CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
+
+#include <CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h>
+#include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
+
+namespace CGAL {
+
+
+namespace Boolean_set_operation_2_internal
+{
+  struct PreconditionValidationPolicy
+  {
+   /*! is_valid - Checks if a Traits::Polygon_2 OR
+       Traits::Polygon_with_holes_2 are valid.
+       This validation policy checks that polygons are valid in a
+       CGAL_precondition macro. We inherit from Gps_on_surface_base_2
+       and use preconditions to validate the input polygons.
+   */
+    template <class Polygon, class Traits>
+    inline static void is_valid(const Polygon& p, const Traits& t)
+    {
+      CGAL_precondition(is_valid_unknown_polygon(p, t));
+      CGAL_USE(p); CGAL_USE(t);
+    }
+  };
+}
+
+
+// General_polygon_set_on_surface_2
+/*
+  This class is derived from Gps_on_surface_base_2.
+  It enforces the validation conditions for general polygons, and is therefore
+  the basic implementation that should be used by the user
+*/
+template <class Traits_, class TopTraits_>
+  class General_polygon_set_on_surface_2 :
+  public Gps_on_surface_base_2<Traits_, TopTraits_,
+                 Boolean_set_operation_2_internal::PreconditionValidationPolicy>
+{
+protected:
+  typedef Traits_                                                   Traits_2;
+  typedef General_polygon_set_on_surface_2<Traits_2, TopTraits_>    Self;
+  typedef Gps_on_surface_base_2<Traits_2, TopTraits_,
+   Boolean_set_operation_2_internal::PreconditionValidationPolicy>  Base;
+
+public:
+  typedef typename Base::Polygon_2                                  Polygon_2;
+  typedef typename Base::Polygon_with_holes_2
+    Polygon_with_holes_2;
+  typedef typename Base::Arrangement_on_surface_2
+    Arrangement_on_surface_2;
+
+public:
+
+  // default costructor
+  General_polygon_set_on_surface_2() : Base()
+  {}
+
+  // constructor with traits object
+  General_polygon_set_on_surface_2(const Traits_2& tr) : Base(tr) {}
+
+  General_polygon_set_on_surface_2(const Self& ps) : Base(ps) {}
+
+  General_polygon_set_on_surface_2& operator=(const Self& ps)
+  {
+    Base::operator=(ps);
+    return (*this);
+  }
+
+  explicit General_polygon_set_on_surface_2(const Polygon_2& pgn) : Base(pgn) {}
+
+  explicit
+  General_polygon_set_on_surface_2(const Polygon_with_holes_2& pgn_with_holes) :
+    Base(pgn_with_holes)
+  {}
+
+protected:
+  General_polygon_set_on_surface_2(Arrangement_on_surface_2* arr) : Base(arr)
+  {}
+
+public:
+  //destructor
+  virtual ~General_polygon_set_on_surface_2()
+  {}
+
+  void intersection(const Self& gps1, const Self& gps2)
+  {
+    Base::intersection(gps1.base(), gps2.base());
+  }
+
+  void join(const Self& gps1, const Self& gps2)
+  {
+    Base::join(gps1.base(), gps2.base());
+  }
+
+  void symmetric_difference(const Self& gps1, const Self& gps2)
+  {
+    Base::symmetric_difference(gps1.base(), gps2.base());
+  }
+
+
+  // For some reason the below functions (the ones that we call "using" for)
+  // are hidden by the function in this class and are not found in the parent's
+  // class (General_polygon_set_on_surface_2) when they are called on an
+  // object of type General_polygon_set_2.
+  // Check in the Vandervoorde / Stroustrup books what is the exact reason.
+  // (There may be a better and more correct solution.)
+  using Base::intersection;
+  using Base::join;
+  using Base::symmetric_difference;
+
+private:
+  const Base& base() const
+    {
+      return static_cast<const Base&> (*this);
+    }
+
+  Base& base()
+    {
+      return static_cast<Base&> (*this);
+    }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/General_polygon_with_holes_2.h b/3rdparty/CGAL-4.8/include/CGAL/General_polygon_with_holes_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/General_polygon_with_holes_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/General_polygon_with_holes_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Get_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Get_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Get_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Get_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmp_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Gmp_coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmp_coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmp_coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmpfi.h b/3rdparty/CGAL-4.8/include/CGAL/Gmpfi.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmpfi.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmpfi.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmpfr.h b/3rdparty/CGAL-4.8/include/CGAL/Gmpfr.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmpfr.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmpfr.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmpq.h b/3rdparty/CGAL-4.8/include/CGAL/Gmpq.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmpq.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmpq.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmpz.h b/3rdparty/CGAL-4.8/include/CGAL/Gmpz.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmpz.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmpz.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gmpzf.h b/3rdparty/CGAL-4.8/include/CGAL/Gmpzf.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gmpzf.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gmpzf.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Gps_circle_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Gps_circle_segment_traits_2.h
new file mode 100644
index 0000000..543d375
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Gps_circle_segment_traits_2.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_GPS_CIRCLE_SEGMENT_TRAITS_2_H
+#define CGAL_GPS_CIRCLE_SEGMENT_TRAITS_2_H
+
+#include <CGAL/Gps_traits_2.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+
+namespace CGAL {
+
+template <class Kernel_, bool Filer_ = true>
+class Gps_circle_segment_traits_2 :
+  public Gps_traits_2<Arr_circle_segment_traits_2<Kernel_, Filer_> >
+{
+public:
+  Gps_circle_segment_traits_2<Kernel_, Filer_>(bool use_cache = false) :
+    Gps_traits_2<Arr_circle_segment_traits_2<Kernel_, Filer_> >()
+  {
+    this->m_use_cache = use_cache;
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gps_segment_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Gps_segment_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gps_segment_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gps_segment_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Gps_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Gps_traits_2.h
new file mode 100644
index 0000000..2705cd4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Gps_traits_2.h
@@ -0,0 +1,175 @@
+// Copyright (c) 2005  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Baruch Zukerman <baruchzu at post.tau.ac.il>
+
+#ifndef CGAL_GPS_TRAITS_2_H
+#define CGAL_GPS_TRAITS_2_H
+
+#include <CGAL/General_polygon_2.h>
+#include <CGAL/General_polygon_with_holes_2.h>
+#include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
+#include <CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h>
+
+namespace CGAL {
+
+template <typename Arr_traits,
+          typename General_polygon_t = General_polygon_2<Arr_traits> >
+class Gps_traits_2 : public Arr_traits
+{
+  typedef Arr_traits                                    Base;
+  typedef Gps_traits_2<Arr_traits,General_polygon_t>    Self;
+
+public:
+
+  typedef typename Base::Point_2                        Point_2;
+  typedef typename Base::X_monotone_curve_2             X_monotone_curve_2;
+  //Polygon_2 type is required by GeneralPolygonSetTraits Concept
+  typedef General_polygon_t                             Polygon_2;
+  //Polygon_2 is a model of the GeneralPolygon2 concept
+  typedef Polygon_2                                     General_polygon_2;
+
+  //Polygon_with_holes_2 type required by GeneralPolygonSetTraits Concept.
+  typedef CGAL::General_polygon_with_holes_2<General_polygon_2>
+                                                        Polygon_with_holes_2;
+  //Polygon_with_Holes_2 is a model of the GeneralPolygonWithHoles2 concept.
+  typedef Polygon_with_holes_2
+    General_polygon_with_holes_2;
+
+  typedef typename General_polygon_2::Curve_const_iterator
+                                                        Curve_const_iterator;
+
+  typedef typename General_polygon_with_holes_2::Hole_const_iterator
+                                                        Hole_const_iterator;
+
+  typedef typename Base::Equal_2                        Equal_2;
+  typedef typename Base::Compare_endpoints_xy_2         Compare_endpoints_xy_2;
+  typedef typename Base::Construct_min_vertex_2         Construct_min_vertex_2;
+  typedef typename Base::Construct_max_vertex_2         Construct_max_vertex_2;
+
+
+  /*!
+   * A functor for constructing a polygon from a range of x-monotone curves.
+   */
+  class Construct_polygon_2 {
+  public:
+    template<class XCurveIterator>
+    void operator()(XCurveIterator begin, XCurveIterator end,
+                    General_polygon_2& pgn) const
+    { pgn.init(begin, end); }
+  };
+
+  Construct_polygon_2 construct_polygon_2_object() const
+  { return Construct_polygon_2(); }
+
+  /*!
+   * A functor for scanning all x-monotone curves that form a polygon boundary.
+   */
+  class Construct_curves_2
+  {
+  public:
+
+    std::pair<Curve_const_iterator, Curve_const_iterator>
+    operator()(const General_polygon_2& pgn) const
+    { return std::make_pair(pgn.curves_begin(), pgn.curves_end()); }
+  };
+
+  Construct_curves_2 construct_curves_2_object() const
+  { return Construct_curves_2(); }
+
+  /*!
+   * An auxiliary functor used for validity checks.
+   */
+  typedef Gps_traits_adaptor<Base>                      Traits_adaptor;
+
+  /*typedef CGAL::Is_valid_2<Self, Traits_adaptor>           Is_valid_2;
+    Is_valid_2 is_valid_2_object() const
+    {
+    Traits_adaptor   tr_adp;
+
+    return (Is_valid_2 (*this, tr_adp));
+    }*/
+
+  //Added Functionality from GeneralPolygonWithHoles Concept to the traits.
+
+  /*A functor for constructing the outer boundary of a polygon with holes*/
+  class Construct_outer_boundary {
+  public:
+    General_polygon_2 operator()(const  General_polygon_with_holes_2& pol_wh)
+      const
+    { return pol_wh.outer_boundary(); }
+  };
+
+  Construct_outer_boundary construct_outer_boundary_object() const
+  { return Construct_outer_boundary(); }
+
+  /* typedef from General_polygon_with_holes_2. Hole_const_iterator nested type
+   * is required by GeneralPolygonWithHoles2 concept
+   */
+  /*A functor for constructing the container of holes of a polygon with holes*/
+  class Construct_holes {
+  public:
+    std::pair<Hole_const_iterator, Hole_const_iterator>
+    operator()(const General_polygon_with_holes_2& pol_wh) const
+    { return std::make_pair(pol_wh.holes_begin(), pol_wh.holes_end()); }
+  };
+
+  Construct_holes construct_holes_object() const
+  { return Construct_holes(); }
+
+  /* A functor for constructing a General_polygon_with_holes from a
+   * General_Polygon (and possibly a range of holes).
+   *
+   * constructs a general polygon with holes using a given general polygon
+   * outer as the outer boundary and a given range of holes. If outer is an
+   * empty general polygon, then an unbounded polygon with holes will be
+   * created. The holes must be contained inside the outer boundary, and the
+   * polygons representing the holes must be strictly simple and pairwise
+   * disjoint, except perhaps at the vertices.
+   */
+  class Construct_general_polygon_with_holes_2 {
+  public:
+    General_polygon_with_holes_2
+    operator()(const General_polygon_2& pgn_boundary) const
+    { return General_polygon_with_holes_2(pgn_boundary); }
+
+    template <class HolesInputIterator>
+    General_polygon_with_holes_2
+    operator()(const General_polygon_2& pgn_boundary,
+               HolesInputIterator h_begin,
+               HolesInputIterator h_end) const
+    { return General_polygon_with_holes_2(pgn_boundary, h_begin,h_end); }
+  };
+
+  Construct_general_polygon_with_holes_2 construct_polygon_with_holes_2_object()
+    const
+  { return Construct_general_polygon_with_holes_2(); }
+
+  // Return true if the outer boundary is empty, and false otherwise.
+  class Is_unbounded {
+  public:
+    bool operator()(const  General_polygon_with_holes_2& pol_wh) const
+    { return pol_wh.is_unbounded(); }
+  };
+
+  Is_unbounded construct_is_unbounded_object() const { return Is_unbounded(); }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Gray_image_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Gray_image_mesh_domain_3.h
new file mode 100644
index 0000000..9d351af
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Gray_image_mesh_domain_3.h
@@ -0,0 +1,132 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// Copyright (c) 2012  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb, Laurent Rineau
+//
+
+#ifndef CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H
+#define CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H
+
+#include <CGAL/Random.h>
+#include <CGAL/Labeled_mesh_domain_3.h>
+#include <CGAL/Mesh_3/Image_to_labeled_function_wrapper.h>
+
+#include <functional>
+
+namespace CGAL {
+
+namespace internal {
+
+  template<typename T>
+  struct Greater_than {
+    typedef T argument_type;
+    Greater_than(const T& second) : second(second) {}
+    bool operator()(const T& first) const {
+      return std::greater<T>()(first, second);
+    }
+    T second;
+  };
+
+}
+
+/**
+ * @class Gray_image_mesh_domain_3
+ *
+ *
+ */
+template<class Image,
+         class BGT,
+         typename Image_word_type = float,
+         typename Transform = internal::Greater_than<Image_word_type>,
+         typename Subdomain_index = int>
+class Gray_image_mesh_domain_3
+  : public Labeled_mesh_domain_3<
+  Mesh_3::Image_to_labeled_function_wrapper<Image, BGT,
+                                            Image_word_type,
+                                            Subdomain_index,
+                                            Transform,
+                                            false> ,
+  BGT>
+{
+public:
+  typedef Mesh_3::Image_to_labeled_function_wrapper<Image, BGT,
+                                                    Image_word_type,
+                                                    Subdomain_index,
+                                                    Transform,
+                                                    false>           Wrapper;
+
+  typedef Labeled_mesh_domain_3<Wrapper, BGT>                        Base;
+
+  typedef typename Base::Sphere_3 Sphere_3;
+  typedef typename Base::FT FT;
+  typedef BGT Geom_traits;
+  typedef CGAL::Bbox_3 Bbox_3;
+
+  /// Constructor
+  Gray_image_mesh_domain_3(const Image& image,
+                           const Image_word_type iso_value,
+                           const Image_word_type value_outside = 0.,
+                           const FT& error_bound = FT(1e-3),
+                           CGAL::Random* p_rng = NULL)
+    : Base(Wrapper(image, 
+                   Transform(iso_value),
+                   value_outside),
+           compute_bounding_box(image),
+           error_bound,
+           p_rng)
+  {}
+
+  Gray_image_mesh_domain_3(const Image& image,
+                           const Transform& transform,
+                           const Image_word_type value_outside = 0.,
+                           const FT& error_bound = FT(1e-3),
+                           CGAL::Random* p_rng = NULL)
+    : Base(Wrapper(image, transform, value_outside),
+           compute_bounding_box(image),
+           error_bound,
+           p_rng)
+  {}
+
+  /// Destructor
+  virtual ~Gray_image_mesh_domain_3() {}
+
+
+private:
+  /// Returns a box enclosing image \c im
+  Bbox_3 compute_bounding_box(const Image& im) const
+  {
+    return Bbox_3(-1,-1,-1,
+                  im.xdim()*im.vx()+1, im.ydim()*im.vy()+1, im.zdim()*im.vz()+1);
+  }
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Gray_image_mesh_domain_3<Image, BGT> Self;
+  Gray_image_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Gray_image_mesh_domain_3
+
+
+
+}  // end namespace CGAL
+
+
+
+#endif // CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Gray_level_image_3.h b/3rdparty/CGAL-4.8/include/CGAL/Gray_level_image_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Gray_level_image_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Gray_level_image_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_const_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_const_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_const_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_const_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_default.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_default.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_default.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_default.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_max_base_with_id.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_max_base_with_id.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_max_base_with_id.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_max_base_with_id.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_min_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_min_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_face_min_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_face_min_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_min_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_min_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_halfedge_min_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_halfedge_min_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_items_2.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_items_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_items_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_items_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_items_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_items_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_items_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_items_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_iterator_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_iterator_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_iterator_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_iterator_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_list.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_min_items.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_min_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_min_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_min_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vector.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vector.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_min_base.h b/3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_min_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/HalfedgeDS_vertex_min_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/HalfedgeDS_vertex_min_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Handle.h b/3rdparty/CGAL-4.8/include/CGAL/Handle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Handle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Handle.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Handle_for.h b/3rdparty/CGAL-4.8/include/CGAL/Handle_for.h
new file mode 100644
index 0000000..dbdd92c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Handle_for.h
@@ -0,0 +1,314 @@
+// Copyright (c) 1999,2001,2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra, Sylvain Pion
+ 
+#ifndef CGAL_HANDLE_FOR_H
+#define CGAL_HANDLE_FOR_H
+
+#include <CGAL/config.h>
+
+#include <boost/config.hpp>
+#include <CGAL/memory.h>
+#include <algorithm>
+#include <cstddef>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4345) // Avoid warning  http://msdn.microsoft.com/en-us/library/wewb47ee(VS.80).aspx
+#endif
+namespace CGAL {
+
+template <class T, class Alloc = CGAL_ALLOCATOR(T) >
+class Handle_for
+{
+    // Wrapper that adds the reference counter.
+    struct RefCounted {
+        T t;
+        unsigned int count;
+    };
+
+    typedef typename Alloc::template rebind<RefCounted>::other  Allocator;
+    typedef typename Allocator::pointer                         pointer;
+
+    static Allocator   allocator;
+    pointer            ptr_;
+
+public:
+
+    typedef T element_type;
+    
+    typedef std::ptrdiff_t Id_type ;
+
+    Handle_for()
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(); // we get the warning here
+        p->count = 1;
+        ptr_ = p;
+    }
+
+    Handle_for(const element_type& t)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(t);
+        p->count = 1;
+        ptr_ = p;
+    }
+
+#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
+    Handle_for(element_type && t)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(std::move(t));
+        p->count = 1;
+        ptr_ = p;
+    }
+#endif
+
+/* I comment this one for now, since it's preventing the automatic conversions
+   to take place.  We'll see if it's a problem later.
+    template < typename T1 >
+    Handle_for(const T1& t1)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) T(t1);
+        p->count = 1;
+        ptr_ = p;
+    }
+*/
+
+#if !defined CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES && !defined CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
+    template < typename T1, typename T2, typename... Args >
+    Handle_for(T1 && t1, T2 && t2, Args && ... args)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(std::forward<T1>(t1), std::forward<T2>(t2), std::forward<Args>(args)...);
+        p->count = 1;
+        ptr_ = p;
+    }
+#else
+    template < typename T1, typename T2 >
+    Handle_for(const T1& t1, const T2& t2)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(t1, t2);
+        p->count = 1;
+        ptr_ = p;
+    }
+
+    template < typename T1, typename T2, typename T3 >
+    Handle_for(const T1& t1, const T2& t2, const T3& t3)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(t1, t2, t3);
+        p->count = 1;
+        ptr_ = p;
+    }
+
+    template < typename T1, typename T2, typename T3, typename T4 >
+    Handle_for(const T1& t1, const T2& t2, const T3& t3, const T4& t4)
+    {
+        pointer p = allocator.allocate(1);
+        new (&(p->t)) element_type(t1, t2, t3, t4);
+        p->count = 1;
+        ptr_ = p;
+    }
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+    Handle_for(const Handle_for& h)
+      : ptr_(h.ptr_)
+    {
+	CGAL_assume (ptr_->count > 0);
+        ++(ptr_->count);
+    }
+
+    Handle_for&
+    operator=(const Handle_for& h)
+    {
+        Handle_for tmp = h;
+        swap(tmp);
+        return *this;
+    }
+
+    Handle_for&
+    operator=(const element_type &t)
+    {
+        if (is_shared())
+            *this = Handle_for(t);
+        else
+            ptr_->t = t;
+
+        return *this;
+    }
+
+#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
+    // Note : I don't see a way to make a useful move constructor, apart
+    //        from e.g. using NULL as a ptr value, but this is drastic.
+
+    Handle_for&
+    operator=(Handle_for && h)
+    {
+        swap(h);
+        return *this;
+    }
+
+    Handle_for&
+    operator=(element_type && t)
+    {
+        if (is_shared())
+            *this = Handle_for(std::move(t));
+        else
+            ptr_->t = std::move(t);
+
+        return *this;
+    }
+#endif
+
+    ~Handle_for()
+    {
+      if (--(ptr_->count) == 0) {
+          allocator.destroy( ptr_);
+          allocator.deallocate( ptr_, 1);
+      }
+    }
+
+    void
+    initialize_with(const element_type& t)
+    {
+        // kept for backward compatibility.  Use operator=(t) instead.
+        *this = t;
+    }
+
+    Id_type id() const { return Ptr() - static_cast<T const*>(0); }
+    
+    bool identical(const Handle_for& h) const { return Ptr() == h.Ptr(); }
+
+
+    // Ptr() is the "public" access to the pointer to the object.
+    // The non-const version asserts that the instance is not shared.
+    const element_type *
+    Ptr() const
+    {
+       return &(ptr_->t);
+    }
+
+    /*
+    // The assertion triggers in a couple of places, so I comment it for now.
+    T *
+    Ptr()
+    {
+      CGAL_assertion(!is_shared());
+      return &(ptr_->t);
+    }
+    */
+
+    bool
+    is_shared() const
+    {
+	return ptr_->count > 1;
+    }
+
+    bool
+    unique() const
+    {
+	return !is_shared();
+    }
+
+    long
+    use_count() const
+    {
+	return ptr_->count;
+    }
+
+    void
+    swap(Handle_for& h)
+    {
+      std::swap(ptr_, h.ptr_);
+    }
+
+protected:
+
+    void
+    copy_on_write()
+    {
+      if ( is_shared() ) Handle_for(ptr_->t).swap(*this);
+    }
+
+    // ptr() is the protected access to the pointer.  Both const and non-const.
+    // Redundant with Ptr().
+    element_type *
+    ptr()
+    { return &(ptr_->t); }
+
+    const element_type *
+    ptr() const
+    { return &(ptr_->t); }
+};
+
+
+template <class T, class Allocator>
+typename Handle_for<T, Allocator>::Allocator
+Handle_for<T, Allocator>::allocator;
+
+template <class T, class Allocator>
+inline
+void
+swap(Handle_for<T, Allocator> &h1, Handle_for<T, Allocator> &h2)
+{
+    h1.swap(h2);
+}
+
+template <class T, class Allocator>
+inline
+bool
+identical(const Handle_for<T, Allocator> &h1,
+          const Handle_for<T, Allocator> &h2)
+{
+    return h1.identical(h2);
+}
+
+template <class T> inline bool identical(const T &t1, const T &t2) { return &t1 == &t2; }
+
+template <class T, class Allocator>
+inline
+const T&
+get_pointee_or_identity(const Handle_for<T, Allocator> &h)
+{
+    return *(h.Ptr());
+}
+
+template <class T>
+inline
+const T&
+get_pointee_or_identity(const T &t)
+{
+    return t;
+}
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_HANDLE_FOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Handle_for_virtual.h b/3rdparty/CGAL-4.8/include/CGAL/Handle_for_virtual.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Handle_for_virtual.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Handle_for_virtual.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Handle_hash_function.h b/3rdparty/CGAL-4.8/include/CGAL/Handle_hash_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Handle_hash_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Handle_hash_function.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Handle_with_policy.h b/3rdparty/CGAL-4.8/include/CGAL/Handle_with_policy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Handle_with_policy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Handle_with_policy.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Has_timestamp.h b/3rdparty/CGAL-4.8/include/CGAL/Has_timestamp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Has_timestamp.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Has_timestamp.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_policy_tags.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_policy_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_policy_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_policy_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_3.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_base.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_d.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_3.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_d.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_median_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_median_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_2.h
new file mode 100644
index 0000000..bc63fef
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_2.h
@@ -0,0 +1,154 @@
+// Copyright (c) 2011  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     :  Olivier Devillers
+
+#ifndef CGAL_HILBERT_SORT_MIDDLE_2_H
+#define CGAL_HILBERT_SORT_MIDDLE_2_H
+
+#include <CGAL/basic.h>
+#include <functional>
+#include <cstddef>
+#include <CGAL/Hilbert_sort_middle_base.h>
+#include <CGAL/Polygon_2_algorithms.h> 
+
+namespace CGAL {
+
+namespace internal {
+    template <class K, int x, bool up> struct Fixed_hilbert_cmp_2;
+
+    template <class K, int x>
+    struct Fixed_hilbert_cmp_2<K,x,true>
+        : public std::binary_function<typename K::Point_2,
+                                      typename K::Point_2, bool>
+    {
+        typedef typename K::Point_2 Point;
+        K k;
+	double value;
+        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
+        bool operator() (const Point &p) const
+        { 
+	  return ! Fixed_hilbert_cmp_2<K,x,false> (value, k) (p);
+        }
+    };
+    
+    template <class K>
+    struct Fixed_hilbert_cmp_2<K,0,false>
+        : public std::binary_function<typename K::Point_2,
+                                      typename K::Point_2, bool>
+    {
+        typedef typename K::Point_2 Point;
+        K k;
+	double value;
+        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
+        bool operator() (const Point &p) const
+        { 
+	  return to_double(k.compute_x_2_object()(p)) < value;
+        }
+    };
+    
+    template <class K>
+    struct Fixed_hilbert_cmp_2<K,1,false>
+        : public std::binary_function<typename K::Point_2,
+                                      typename K::Point_2, bool>
+    {
+        typedef typename K::Point_2 Point;
+        K k;
+	double value;
+        Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {}
+        bool operator() (const Point &p) const
+        { 
+	  return to_double(k.compute_y_2_object()(p)) < value;
+        }
+    };
+}
+
+
+template <class K>
+class Hilbert_sort_middle_2
+{
+public:
+    typedef K Kernel;
+    typedef typename Kernel::Point_2 Point;
+    
+private:
+    Kernel _k;
+    std::ptrdiff_t _limit;
+
+    template <int x, bool up> struct Cmp : public internal::Fixed_hilbert_cmp_2<Kernel,x,up>
+      { Cmp (double v, const Kernel &k) : internal::Fixed_hilbert_cmp_2<Kernel,x,up> (v, k) {} };
+
+public:
+    Hilbert_sort_middle_2 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1)
+        : _k(k), _limit (limit)
+    {}
+
+    template <int x, bool upx, bool upy, class RandomAccessIterator>
+    void sort (RandomAccessIterator begin, RandomAccessIterator end,
+	       double xmin, double ymin, double xmax, double ymax) const
+    {
+        const int y = (x + 1) % 2;
+        if (end - begin <= _limit) return;
+
+	double xmed= (xmin+xmax)/2;
+	double ymed= (ymin+ymax)/2;
+
+        RandomAccessIterator m0 = begin, m4 = end;
+
+        RandomAccessIterator m2 = 
+	  internal::fixed_hilbert_split (m0, m4, Cmp< x,  upx> (xmed,_k));
+        RandomAccessIterator m1 = 
+	  internal::fixed_hilbert_split (m0, m2, Cmp< y,  upy> (ymed,_k));
+        RandomAccessIterator m3 = 
+	  internal::fixed_hilbert_split (m2, m4, Cmp< y, !upy> (ymed,_k));
+
+        sort<y, upy, upx> (m0, m1, ymin, xmin, ymed, xmed);
+        sort<x, upx, upy> (m1, m2, xmin, ymed, xmed, ymax);
+        sort<x, upx, upy> (m2, m3, xmed, ymed, xmax, ymax);
+        sort<y,!upy,!upx> (m3, m4, ymed, xmax, ymin, xmed);
+    }
+
+    template <class RandomAccessIterator>
+    void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
+    {
+      //Bbox_2 box=bbox_2(begin, end); BUG: WE NEED TO FIX THIS
+
+		K k;
+	    double xmin=to_double(k.compute_x_2_object()(*begin)),
+		     ymin=to_double(k.compute_y_2_object()(*begin)),
+	  	     xmax=xmin,
+		     ymax=ymin;
+		
+	    for(RandomAccessIterator it=begin+1; it<end; ++it){
+			if ( to_double(k.compute_x_2_object()(*it)) < xmin) 
+		  		xmin = to_double(k.compute_x_2_object()(*it));
+			if ( to_double(k.compute_y_2_object()(*it)) < ymin) 
+		  		ymin = to_double(k.compute_y_2_object()(*it));
+			if ( to_double(k.compute_x_2_object()(*it)) > xmax) 
+		  		xmax = to_double(k.compute_x_2_object()(*it));
+			if ( to_double(k.compute_y_2_object()(*it)) > ymax) 
+		  		ymax = to_double(k.compute_y_2_object()(*it));
+	    }
+
+        sort <0, false, false> (begin, end, xmin, ymin, xmax, ymax);
+    }
+};
+
+
+} // namespace CGAL
+
+#endif//CGAL_HILBERT_SORT_MIDDLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_base.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_d.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hilbert_sort_middle_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_middle_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_on_sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_on_sphere_3.h
new file mode 100644
index 0000000..b472d27
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Hilbert_sort_on_sphere_3.h
@@ -0,0 +1,119 @@
+// Copyright (c) 2013  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Olivier Devillers
+//                 Pedro Machado Manhaes de Castro
+
+#ifndef CGAL_HILBERT_SORT_ON_SPHERE_3_H
+#define CGAL_HILBERT_SORT_ON_SPHERE_3_H
+
+#include <CGAL/Hilbert_sort_2.h>
+#include <CGAL/internal/Transform_coordinates_traits_3.h>
+#include <algorithm>
+#include <vector>
+
+namespace CGAL {
+
+template <class K,  class Hilbert_policy >
+class Hilbert_sort_on_sphere_3 {
+	typedef typename K::Point_3  Point_3;
+	
+	static const double _sqrt_of_one_over_three;
+	
+	// Face 1, x > sqrt(1/3)
+	// Face 2, y > sqrt(1/3)
+	// Face 3, x < -sqrt(1/3)
+	// Face 4, z > sqrt(1/3)
+	// Face 5, y < -sqrt(1/3)
+	// Face 6, z < -sqrt(1/3)
+	
+	typedef internal::Transform_coordinates_traits_3<K,0,1,1,0> Face_1_traits_3;  // +y +z
+	typedef internal::Transform_coordinates_traits_3<K,-1,0,1,0> Face_2_traits_3; // -x +z
+	typedef internal::Transform_coordinates_traits_3<K,0,1,-1,1> Face_3_traits_3; // +z -y
+	typedef internal::Transform_coordinates_traits_3<K,-1,1,0,1> Face_4_traits_3;  // -y +x
+	typedef internal::Transform_coordinates_traits_3<K,-1,0,1,1> Face_5_traits_3;  // -z +x
+	typedef internal::Transform_coordinates_traits_3<K,1,1,0,0> Face_6_traits_3;  // +x +y
+	
+	Hilbert_sort_2<Face_1_traits_3, Hilbert_policy > _hs_1_object;
+	Hilbert_sort_2<Face_2_traits_3, Hilbert_policy > _hs_2_object;
+	Hilbert_sort_2<Face_3_traits_3, Hilbert_policy > _hs_3_object;
+	Hilbert_sort_2<Face_4_traits_3, Hilbert_policy > _hs_4_object;
+	Hilbert_sort_2<Face_5_traits_3, Hilbert_policy > _hs_5_object;
+	Hilbert_sort_2<Face_6_traits_3, Hilbert_policy > _hs_6_object;
+	K _k;
+	Point_3 _p;
+	double _sq_r;
+	
+public:
+	Hilbert_sort_on_sphere_3 (const K &k=K(),  
+	                          double sq_r = 1.0,
+							  const Point_3 &p = Point_3(0,0,0),
+							  std::ptrdiff_t limit=1)
+	: _hs_1_object(Face_1_traits_3(),limit),
+	  _hs_2_object(Face_2_traits_3(),limit),
+	  _hs_3_object(Face_3_traits_3(),limit),
+	  _hs_4_object(Face_4_traits_3(),limit),
+	  _hs_5_object(Face_5_traits_3(),limit),
+	  _hs_6_object(Face_6_traits_3(),limit),
+          _k(k), _p(p), _sq_r(sq_r)
+        {
+		CGAL_precondition( sq_r > 0 );
+	}
+	
+	
+	template <class RandomAccessIterator>
+	void operator()(RandomAccessIterator begin, RandomAccessIterator end) const {
+		typedef typename std::iterator_traits<RandomAccessIterator>::value_type Point;
+		std::vector< Point > vec[6];
+		
+		const double mulcte = _sqrt_of_one_over_three * CGAL_NTS sqrt(_sq_r);
+		const double lxi = _p.x() - mulcte, lxs = _p.x() + mulcte;
+		const double lyi = _p.y() - mulcte, lys = _p.y() + mulcte;
+		const double lzs = _p.z() + mulcte;
+		
+		for(RandomAccessIterator i = begin; i != end; ++i) {
+			const Point &p = *i;
+			const typename K::FT x = _k.compute_x_3_object()(p);
+			const typename K::FT y = _k.compute_y_3_object()(p);
+			const typename K::FT z = _k.compute_z_3_object()(p); // for unit sphere
+			if(x > lxs) vec[0].push_back(p);             // Face 1, x > sqrt(1/3) 
+			else if(y > lys) vec[1].push_back(p);        // Face 2, y > sqrt(1/3)
+			else if(x < lxi) vec[2].push_back(p);        // Face 3, x < -sqrt(1/3)
+			else if(z > lzs) vec[3].push_back(p);        // Face 4, z > sqrt(1/3)
+			else if(y < lyi) vec[4].push_back(p);        // Face 5, y < -sqrt(1/3)
+			else vec[5].push_back(p);                    // Face 6, z < -sqrt(1/3)
+		}
+		if(vec[0].size()) _hs_1_object(vec[0].begin(), vec[0].end());
+		if(vec[1].size()) _hs_2_object(vec[1].begin(), vec[1].end());
+		if(vec[2].size()) _hs_3_object(vec[2].begin(), vec[2].end());
+		if(vec[3].size()) _hs_4_object(vec[3].begin(), vec[3].end());
+		if(vec[4].size()) _hs_5_object(vec[4].begin(), vec[4].end());
+		if(vec[5].size()) _hs_6_object(vec[5].begin(), vec[5].end());
+		
+		// this is the order that set of points in a face should appear 
+		// after sorting points wrt each face
+		for(int i=0; i<6; i++)
+			for(std::size_t j=0; j<vec[i].size(); j++) 
+				*begin++ = vec[i][j];
+	}
+};
+template <class K,  class Hilbert_policy >
+const double Hilbert_sort_on_sphere_3<K,Hilbert_policy>::_sqrt_of_one_over_three = 0.57735026919;
+
+} // namespace CGAL
+
+#endif//CGAL_HILBERT_SORT_ON_SPHERE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Aff_transformationH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Aff_transformationH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Aff_transformationH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Aff_transformationH2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Aff_transformationH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Aff_transformationH3.h
new file mode 100644
index 0000000..28a2533
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Aff_transformationH3.h
@@ -0,0 +1,898 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_AFF_TRANSFORMATIONH3_H
+#define CGAL_AFF_TRANSFORMATIONH3_H
+
+#include <CGAL/Handle_for_virtual.h>
+#include <CGAL/determinant.h>
+#include <CGAL/aff_transformation_tags.h>
+#include <ostream>
+
+namespace CGAL {
+
+// forward declaration
+template < class R >
+class Aff_transformationH3;
+
+template < class R >
+class Aff_transformation_repH3;
+
+template < class R >
+std::ostream &
+operator<< ( std::ostream & out,
+             const Aff_transformationH3<R>& t);
+
+template < class R >
+Aff_transformationH3<R>
+_general_transformation_composition (
+                           Aff_transformation_repH3<R> l,
+                           Aff_transformation_repH3<R> r);
+
+template <class R_ >
+class Aff_transformation_rep_baseH3 : public Ref_counted_virtual
+// abstract base class of aff transformation representations
+{
+public:
+  typedef R_                         R;
+  typedef typename R::FT             FT;
+  typedef typename R::RT             RT;
+  typedef typename R::Point_3        Point_3;
+  typedef typename R::Vector_3       Vector_3;
+  typedef typename R::Direction_3    Direction_3;
+  typedef typename R::Plane_3        Plane_3;
+  typedef typename R::Aff_transformation_3 Aff_transformation_3;
+
+  virtual  ~Aff_transformation_rep_baseH3(){}
+
+  virtual  Point_3
+           transform(const Point_3&) const = 0;
+
+  virtual  Vector_3
+           transform(const Vector_3&) const = 0;
+
+  virtual  Direction_3
+           transform(const Direction_3&) const = 0;
+
+  virtual  Plane_3
+           transform(const Plane_3&) const = 0;
+
+  virtual  Aff_transformation_3
+           inverse() const = 0;
+
+  virtual  Aff_transformation_3
+           transpose() const = 0;
+
+  virtual  Aff_transformation_repH3<R>
+           general_form() const = 0;
+
+  virtual  bool
+           is_even() const = 0;
+
+  virtual  RT
+           homogeneous(int i, int j) const = 0;
+
+  virtual  FT
+           cartesian(int i, int j) const = 0;
+};
+
+template < class R_ >
+class Aff_transformation_repH3 : public Aff_transformation_rep_baseH3<R_>
+{
+  typedef typename R_::FT           FT;
+  typedef typename R_::RT           RT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+public:
+  typedef R_                       R;
+
+  Aff_transformation_repH3() {}
+
+  Aff_transformation_repH3(
+                 const RT& m00, const RT& m01, const RT& m02, const RT& m03,
+                 const RT& m10, const RT& m11, const RT& m12, const RT& m13,
+                 const RT& m20, const RT& m21, const RT& m22, const RT& m23,
+                                                              const RT& m33);
+  virtual  ~Aff_transformation_repH3() {}
+
+  virtual  Point_3
+           transform(const Point_3& p) const;
+
+  virtual  Vector_3
+           transform(const Vector_3& v) const;
+
+  virtual  Direction_3
+           transform(const Direction_3& dir) const;
+
+  virtual  Plane_3
+           transform(const Plane_3& pl) const;
+
+  virtual  Aff_transformation_3
+           inverse() const;
+
+  virtual  Aff_transformation_repH3<R>
+           general_form() const;
+
+  virtual  Aff_transformation_3
+           transpose() const;
+
+  virtual  bool
+           is_even() const;
+
+  virtual  RT
+           homogeneous(int i, int j) const ;
+
+  virtual  FT
+           cartesian(int i, int j) const ;
+
+  friend class Aff_transformationH3<R>;
+
+  friend
+  Aff_transformationH3<R>
+  _general_transformation_composition <> (
+                           Aff_transformation_repH3<R> l,
+                           Aff_transformation_repH3<R> r);
+
+  friend
+  std::ostream &
+  operator<< <> (std::ostream & out, const Aff_transformationH3<R>& t);
+
+private:
+    RT   t00, t01, t02, t03;
+    RT   t10, t11, t12, t13;
+    RT   t20, t21, t22, t23;
+    RT                  t33;
+};
+
+template < class R_ >
+class Identity_repH3 : public Aff_transformation_rep_baseH3<R_>
+{
+  typedef typename R_::RT    RT;
+  typedef typename R_::FT    FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+public:
+  typedef R_                R;
+
+           Identity_repH3()
+           {}
+
+  virtual  ~Identity_repH3()
+           {}
+
+  virtual  Point_3
+           transform(const Point_3& p) const
+           { return p; }
+
+  virtual  Vector_3
+           transform(const Vector_3& v) const
+           { return v; }
+
+  virtual  Direction_3
+           transform(const Direction_3& dir) const
+           { return dir; }
+
+  virtual  Plane_3
+           transform(const Plane_3& pl) const
+           { return pl; }
+
+  virtual  Aff_transformation_3
+           inverse() const
+           { return Aff_transformation_3( IDENTITY); }
+
+  virtual  Aff_transformation_repH3<R>
+           general_form() const;
+
+  virtual  Aff_transformation_3
+           transpose() const
+           { return Aff_transformation_3( IDENTITY); }
+
+  virtual  bool
+           is_even() const
+           { return true; }
+
+  virtual  RT
+           homogeneous(int i, int j) const
+           { return (i==j) ? RT(1) : RT(0); }
+
+  virtual  FT
+           cartesian(int i, int j) const
+           { return (i==j) ? FT(1) : FT(0); }
+};
+
+template < class R_ >
+class Translation_repH3 : public Aff_transformation_rep_baseH3<R_>
+{
+  typedef typename R_::FT       FT;
+  typedef typename R_::RT       RT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+public:
+  typedef R_                    R;
+
+           Translation_repH3( const Vector_3& v);
+
+  virtual  ~Translation_repH3() {}
+
+
+  virtual  Point_3
+           transform(const Point_3& p) const;
+
+  virtual  Vector_3
+           transform(const Vector_3& v) const;
+
+  virtual  Direction_3
+           transform(const Direction_3& dir) const;
+
+  virtual  Plane_3
+           transform(const Plane_3& pl) const;
+
+  virtual  Aff_transformation_3
+           inverse() const;
+
+  virtual  Aff_transformation_repH3<R>
+           general_form() const;
+
+  virtual  Aff_transformation_3
+           transpose() const;
+
+  virtual  bool
+           is_even() const;
+
+  virtual  RT
+           homogeneous(int i, int j) const ;
+
+  virtual  FT
+           cartesian(int i, int j) const ;
+
+friend class Aff_transformationH3<R>;
+
+private:
+  Vector_3  tv;
+};
+
+template < class R_ >
+class Aff_transformationH3
+  : public Handle_for_virtual< Aff_transformation_rep_baseH3<R_> >
+{
+  typedef typename R_::RT                   RT;
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Direction_3          Direction_3;
+  typedef typename R_::Plane_3              Plane_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+  typedef  Handle_for_virtual< Aff_transformation_rep_baseH3<R_> > Base;
+  using Base::initialize_with;
+public:
+  typedef R_                R;
+
+  Aff_transformationH3();
+
+  // Identity
+  Aff_transformationH3(const Identity_transformation&);
+
+  // Translation
+  Aff_transformationH3(const Translation& , const Vector_3& v);
+
+  //  Scaling
+  Aff_transformationH3(const Scaling&, const RT& num, const RT& den);
+
+  //  General form
+  Aff_transformationH3(
+                  const RT& m00, const RT& m01, const RT& m02, const RT& m03,
+                  const RT& m10, const RT& m11, const RT& m12, const RT& m13,
+                  const RT& m20, const RT& m21, const RT& m22, const RT& m23,
+                                                               const RT& m33);
+  Aff_transformationH3(
+                  const RT& m00, const RT& m01, const RT& m02,
+                  const RT& m10, const RT& m11, const RT& m12,
+                  const RT& m20, const RT& m21, const RT& m22,
+                                                               const RT& m33);
+
+  Point_3
+  transform(const Point_3& p) const;
+
+  Vector_3
+  transform(const Vector_3& v) const;
+
+  Direction_3
+  transform(const Direction_3& d) const;
+
+  Plane_3
+  transform(const Plane_3& pl) const;
+
+  Aff_transformation_3
+  inverse()   const;
+
+  Aff_transformationH3<R>
+  transpose() const;
+
+  bool
+  is_even()   const;
+
+  bool
+  is_odd()    const;
+
+  FT
+  cartesian(int i, int j) const
+  { return this->Ptr()->cartesian(i,j); }
+
+  RT
+  homogeneous(int i, int j) const
+  { return this->Ptr()->homogeneous(i,j); }
+
+  FT
+  m(int i, int j) const
+  { return this->Ptr()->cartesian(i,j); }
+
+  RT
+  hm(int i, int j) const
+  { return this->Ptr()->homogeneous(i,j); }
+};
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformation_repH3<R>::Aff_transformation_repH3(
+                   const RT& m00, const RT& m01, const RT& m02, const RT& m03,
+                   const RT& m10, const RT& m11, const RT& m12, const RT& m13,
+                   const RT& m20, const RT& m21, const RT& m22, const RT& m23,
+                                                                const RT& m33)
+  :  t00(m00), t01(m01), t02(m02), t03(m03),
+     t10(m10), t11(m11), t12(m12), t13(m13),
+     t20(m20), t21(m21), t22(m22), t23(m23),
+                                   t33(m33)
+{}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Point_3
+Aff_transformation_repH3<R>::
+transform(const typename Aff_transformation_repH3<R>::Point_3& p) const
+{
+  return Point_3(t00 * p.hx() + t01 * p.hy() + t02 * p.hz() + t03 * p.hw(),
+                 t10 * p.hx() + t11 * p.hy() + t12 * p.hz() + t13 * p.hw(),
+                 t20 * p.hx() + t21 * p.hy() + t22 * p.hz() + t23 * p.hw(),
+                 t33 * p.hw());
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Vector_3
+Aff_transformation_repH3<R>::
+transform(const typename Aff_transformation_repH3<R>::Vector_3& v) const
+{
+  return Vector_3(t00 * v.hx() + t01 * v.hy() + t02 * v.hz(),
+                  t10 * v.hx() + t11 * v.hy() + t12 * v.hz(),
+                  t20 * v.hx() + t21 * v.hy() + t22 * v.hz(),
+                  t33 * v.hw() );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Direction_3
+Aff_transformation_repH3<R>::
+transform(const typename Aff_transformation_repH3<R>::Direction_3& d) const
+{
+    if (t33 > RT(0))
+        return Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
+                           t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
+                           t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
+    else
+        return - Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
+                             t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
+                             t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Plane_3
+Aff_transformation_repH3<R>::
+transform(const typename Aff_transformation_repH3<R>::Plane_3& pl) const
+{
+  if ( is_even() )
+  {
+      return Plane_3(
+               transform(pl.point() ),
+               transpose().inverse().transform(pl.orthogonal_direction() ));
+  }
+  else
+  {
+     return Plane_3(
+               transform(pl.point() ),
+               -(transpose().inverse().transform(pl.orthogonal_direction() )));
+  }
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Aff_transformation_3
+Aff_transformation_repH3<R>::inverse() const
+{
+  typedef typename R::RT RT;
+  const RT  RT0(0);
+  return Aff_transformation_3(
+                           determinant( t11, t12, t13,
+                                                   t21, t22, t23,     // i 00
+                                                   RT0, RT0, t33 ),
+
+                        -  determinant( t01, t02, t03,
+                                                   t21, t22, t23,     // i 01
+                                                   RT0, RT0, t33 ),
+
+                           determinant( t01, t02, t03,
+                                                   t11, t12, t13,     // i 02
+                                                   RT0, RT0, t33 ),
+
+                        -  determinant( t01, t02, t03,
+                                                   t11, t12, t13,     // i 03
+                                                   t21, t22, t23 ),
+
+
+                        -  determinant( t10, t12, t13,
+                                                   t20, t22, t23,     // i 10
+                                                   RT0, RT0, t33 ),
+
+                           determinant( t00, t02, t03,
+                                                   t20, t22, t23,     // i 11
+                                                   RT0, RT0, t33 ),
+
+                        -  determinant( t00, t02, t03,
+                                                   t10, t12, t13,     // i 12
+                                                   RT0, RT0, t33 ),
+
+                           determinant( t00, t02, t03,
+                                                   t10, t12, t13,     // i 13
+                                                   t20, t22, t23 ),
+
+
+                           determinant( t10, t11, t13,
+                                                   t20, t21, t23,     // i 20
+                                                   RT0, RT0, t33 ),
+
+                        -  determinant( t00, t01, t03,
+                                                   t20, t21, t23,     // i 21
+                                                   RT0, RT0, t33 ),
+
+                           determinant( t00, t01, t03,
+                                                   t10, t11, t13,     // i 22
+                                                   RT0, RT0, t33 ),
+
+                        -  determinant( t00, t01, t03,
+                                                   t10, t11, t13,     // i 23
+                                                   t20, t21, t23 ),
+
+
+                           determinant( t00, t01, t02,
+                                                   t10, t11, t12,     // i 33
+                                                   t20, t21, t22 )
+                                                       ) ;
+}
+
+template < class R >
+inline
+Aff_transformation_repH3<R>
+Aff_transformation_repH3<R>::general_form() const
+{ return *this; }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Aff_transformation_repH3<R>::Aff_transformation_3
+Aff_transformation_repH3<R>::transpose() const
+{
+  typedef typename R::RT RT;
+  const RT  RT0(0);
+  return Aff_transformation_3( t00,    t10,    t20,    RT0,
+                               t01,    t11,    t21,    RT0,
+                               t02,    t12,    t22,    RT0,
+                                                              t33);
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+Aff_transformation_repH3<R>::is_even() const
+{
+  return (CGAL_NTS sign<RT>( t33 *
+	                    determinant(t00, t01, t02,
+                                              t10, t11, t12,
+                                              t20, t21, t22 ) ) == POSITIVE );
+}
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+typename Aff_transformation_repH3<R>::RT
+Aff_transformation_repH3<R>::
+homogeneous(int i, int j) const
+{
+  typedef typename R::RT RT;
+  CGAL_kernel_precondition( (i >= 0) && (i <= 3) && (j >= 0) && (j <= 3) );
+  const RT  RT0(0);
+  switch (i)
+  {
+    case 0: switch (j)
+            {
+              case 0: return t00;
+              case 1: return t01;
+              case 2: return t02;
+              case 3: return t03;
+            }
+    case 1: switch (j)
+            {
+              case 0: return t10;
+              case 1: return t11;
+              case 2: return t12;
+              case 3: return t13;
+            }
+    case 2: switch (j)
+            {
+              case 0: return t20;
+              case 1: return t21;
+              case 2: return t22;
+              case 3: return t23;
+            }
+    case 3: switch (j)
+            {
+              case 0: return RT0;
+              case 1: return RT0;
+              case 2: return RT0;
+              case 3: return t33;
+            }
+  }
+  return RT0;
+}
+
+template < class R >
+inline
+typename Aff_transformation_repH3<R>::FT
+Aff_transformation_repH3<R>::
+cartesian(int i, int j) const
+{
+  typedef typename R::FT FT;
+  return  FT(homogeneous(i,j)) / FT(t33);
+}
+
+template <class R>
+Aff_transformation_repH3<R>
+Identity_repH3<R>::general_form() const
+{
+  typedef typename R::RT RT;
+  const RT  RT0(0);
+  const RT  RT1(1);
+  return Aff_transformation_repH3<R>(RT1, RT0, RT0, RT0,
+                                         RT0, RT1, RT0, RT0,
+                                         RT0, RT0, RT1, RT0,
+                                                        RT1 );
+}
+
+template < class R >
+inline
+Translation_repH3<R>::
+Translation_repH3( const typename Translation_repH3<R>::Vector_3& v)
+ : tv(v)
+{}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Translation_repH3<R>::Point_3
+Translation_repH3<R>::
+transform(const typename Translation_repH3<R>::Point_3& p) const
+{
+  return Point_3( tv.hw() * p.hx() + tv.hx() * p.hw(),
+                  tv.hw() * p.hy() + tv.hy() * p.hw(),
+                  tv.hw() * p.hz() + tv.hz() * p.hw(),
+                  tv.hw() * p.hw() );
+}
+
+template < class R >
+inline
+typename Translation_repH3<R>::Vector_3
+Translation_repH3<R>::
+transform(const typename Translation_repH3<R>::Vector_3& v) const
+{ return v; }
+
+template < class R >
+inline
+typename Translation_repH3<R>::Direction_3
+Translation_repH3<R>::
+transform(const typename Translation_repH3<R>::Direction_3& dir) const
+{ return dir; }
+
+template < class R >
+inline
+typename Translation_repH3<R>::Plane_3
+Translation_repH3<R>::
+transform(const typename Translation_repH3<R>::Plane_3& pl) const
+{
+  return Plane_3( transform( pl.point() ), pl.orthogonal_vector() );
+}
+
+template < class R >
+inline
+typename Translation_repH3<R>::Aff_transformation_3
+Translation_repH3<R>::inverse() const
+{ return Aff_transformation_3(TRANSLATION, - tv ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformation_repH3<R>
+Translation_repH3<R>::general_form() const
+{
+  const RT  RT0(0);
+  return Aff_transformation_repH3<R>(tv.hw(), RT0,  RT0,  tv.hx(),
+                                         RT0,  tv.hw(), RT0,  tv.hy(),
+                                         RT0,  RT0,  tv.hw(), tv.hz(),
+                                                              tv.hw() );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename Translation_repH3<R>::Aff_transformation_3
+Translation_repH3<R>::transpose() const
+{
+  typedef typename R::RT RT;
+  const RT  RT0(0);
+  const RT  RT1(1);
+  return Aff_transformation_3( RT1,  RT0,  RT0,  RT0,
+                               RT0,  RT1,  RT0,  RT0,
+                               RT0,  RT0,  RT1,  RT0,
+                               RT1 );
+}
+
+template < class R >
+inline
+bool
+Translation_repH3<R>::is_even() const
+{ return true; }
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+typename Translation_repH3<R>::RT
+Translation_repH3<R>::homogeneous(int i, int j) const
+{
+  CGAL_kernel_precondition( (i >= 0) && (i <= 3) && (j >= 0) && (j <= 3) );
+  const RT  RT0(0);
+  switch (i)
+  {
+    case 0: switch (j)
+            {
+              case 0: return tv.hw();
+              case 1: return RT0;
+              case 2: return RT0;
+              case 3: return tv.hx();
+            }
+    case 1: switch (j)
+            {
+              case 0: return RT0;
+              case 1: return tv.hw();
+              case 2: return RT0;
+              case 3: return tv.hy();
+            }
+    case 2: switch (j)
+            {
+              case 0: return RT0;
+              case 1: return RT0;
+              case 2: return tv.hw();
+              case 3: return tv.hz();
+            }
+    case 3: switch (j)
+            {
+              case 0: return RT0;
+              case 1: return RT0;
+              case 2: return RT0;
+              case 3: return tv.hw();
+            }
+  }
+  return RT0;
+}
+
+template < class R >
+inline
+typename Translation_repH3<R>::FT
+Translation_repH3<R>::
+cartesian(int i, int j) const
+{
+  return FT(homogeneous(i,j)) / FT(tv.hw());
+}
+
+
+template < class R >
+Aff_transformationH3<R>
+_general_transformation_composition(
+    Aff_transformation_repH3<R> l,
+    Aff_transformation_repH3<R> r )
+{
+  return Aff_transformationH3<R>(
+            l.t00*r.t00 + l.t01*r.t10 + l.t02*r.t20,
+            l.t00*r.t01 + l.t01*r.t11 + l.t02*r.t21,
+            l.t00*r.t02 + l.t01*r.t12 + l.t02*r.t22,
+            l.t00*r.t03 + l.t01*r.t13 + l.t02*r.t23 + l.t03*r.t33,
+
+            l.t10*r.t00 + l.t11*r.t10 + l.t12*r.t20,
+            l.t10*r.t01 + l.t11*r.t11 + l.t12*r.t21,
+            l.t10*r.t02 + l.t11*r.t12 + l.t12*r.t22,
+            l.t10*r.t03 + l.t11*r.t13 + l.t12*r.t23 + l.t13*r.t33,
+
+            l.t20*r.t00 + l.t21*r.t10 + l.t22*r.t20,
+            l.t20*r.t01 + l.t21*r.t11 + l.t22*r.t21,
+            l.t20*r.t02 + l.t21*r.t12 + l.t22*r.t22,
+            l.t20*r.t03 + l.t21*r.t13 + l.t22*r.t23 + l.t23*r.t33,
+
+            l.t33*r.t33 );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::Aff_transformationH3()
+{ initialize_with(Aff_transformation_repH3<R>()); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::
+Aff_transformationH3(const Identity_transformation&)
+{ initialize_with(Identity_repH3<R>()); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::
+Aff_transformationH3(const Translation&,
+	             const typename Aff_transformationH3<R>::Vector_3& v)
+{ initialize_with(Translation_repH3<R>( v )); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::
+Aff_transformationH3(const Scaling&, const RT& num, const RT& den)
+{
+  const RT RT0(0);
+  initialize_with(Aff_transformation_repH3<R>(num, RT0, RT0, RT0,
+                                            RT0, num, RT0, RT0,
+                                            RT0, RT0, num, RT0,
+                                                           den ));
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::
+Aff_transformationH3(
+                  const RT& m00, const RT& m01, const RT& m02, const RT& m03,
+                  const RT& m10, const RT& m11, const RT& m12, const RT& m13,
+                  const RT& m20, const RT& m21, const RT& m22, const RT& m23,
+                                                               const RT& m33)
+{
+  initialize_with(Aff_transformation_repH3<R>(m00, m01, m02, m03,
+                                            m10, m11, m12, m13,
+                                            m20, m21, m22, m23,
+                                                           m33 ));
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>::
+Aff_transformationH3(
+                  const RT& m00, const RT& m01, const RT& m02,
+                  const RT& m10, const RT& m11, const RT& m12,
+                  const RT& m20, const RT& m21, const RT& m22,
+                                                               const RT& m33)
+{
+  const RT RT0 = RT(0);
+  initialize_with(Aff_transformation_repH3<R>(m00, m01, m02, RT0,
+                                            m10, m11, m12, RT0,
+                                            m20, m21, m22, RT0,
+                                                           m33 ));
+}
+
+template < class R >
+inline
+typename Aff_transformationH3<R>::Point_3
+Aff_transformationH3<R>::
+transform(const typename Aff_transformationH3<R>::Point_3& p) const
+{ return this->Ptr()->transform(p); }
+
+template < class R >
+inline
+typename Aff_transformationH3<R>::Vector_3
+Aff_transformationH3<R>::
+transform(const typename Aff_transformationH3<R>::Vector_3& v) const
+{ return this->Ptr()->transform(v); }
+
+template < class R >
+inline
+typename Aff_transformationH3<R>::Direction_3
+Aff_transformationH3<R>::
+transform(const typename Aff_transformationH3<R>::Direction_3& d) const
+{ return this->Ptr()->transform(d); }
+
+template < class R >
+inline
+typename Aff_transformationH3<R>::Plane_3
+Aff_transformationH3<R>::
+transform(const typename Aff_transformationH3<R>::Plane_3& pl) const
+{ return this->Ptr()->transform(pl); }
+
+template < class R >
+inline
+typename Aff_transformationH3<R>::Aff_transformation_3
+Aff_transformationH3<R>::inverse() const
+{ return this->Ptr()->inverse(); }
+
+template < class R >
+inline
+Aff_transformationH3<R>
+Aff_transformationH3<R>::transpose() const
+{ return this->Ptr()->transpose(); }
+
+template < class R >
+inline
+bool
+Aff_transformationH3<R>::is_even() const
+{ return this->Ptr()->is_even(); }
+
+template < class R >
+inline
+bool
+Aff_transformationH3<R>::is_odd() const
+{ return ( ! (this->Ptr()->is_even() )); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Aff_transformationH3<R>
+operator*(const Aff_transformationH3<R>& left_argument,
+          const Aff_transformationH3<R>& right_argument )
+{
+ return _general_transformation_composition(
+              left_argument.Ptr() ->general_form(),
+              right_argument.Ptr()->general_form() );
+}
+
+template < class R >
+std::ostream &
+operator<< ( std::ostream & out,
+             const Aff_transformationH3<R>& t)
+{
+ typename R::RT RT0(0);
+ Aff_transformation_repH3<R> r = t.Ptr()->general_form();
+ return  out
+ << "| "<< r.t00 <<' '<< r.t01 <<' '<< r.t02 <<' '<< r.t03 << " |\n"
+ << "| "<< r.t10 <<' '<< r.t11 <<' '<< r.t12 <<' '<< r.t13 << " |\n"
+ << "| "<< r.t20 <<' '<< r.t21 <<' '<< r.t22 <<' '<< r.t23 << " |\n"
+ << "| "<< RT0   <<' '<< RT0   <<' '<< RT0   <<' '<< r.t33 << " |\n";
+}
+
+} //namespace CGAL
+
+#endif // CGAL_AFF_TRANSFORMATIONH3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/CircleH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/CircleH2.h
new file mode 100644
index 0000000..a8e41df
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/CircleH2.h
@@ -0,0 +1,255 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sven Schoenherr
+//                 Stefan Schirra
+
+#ifndef CGAL_CIRCLEH2_H
+#define CGAL_CIRCLEH2_H
+
+#include <CGAL/Interval_nt.h>
+#include <boost/tuple/tuple.hpp>
+
+namespace CGAL {
+
+template <class R_>
+class CircleH2
+{
+    typedef typename R_::FT                   FT;
+    typedef typename R_::RT                   RT;
+    typedef typename R_::Point_2              Point_2;
+
+    typedef boost::tuple<Point_2, FT, Orientation>   Rep;
+    typedef typename R_::template Handle<Rep>::type  Base;
+
+    Base base;
+
+public:
+    typedef R_                                    R;
+
+    CircleH2() {}
+
+    CircleH2(const Point_2& p, const Point_2& q, const Point_2& r)
+    {
+      Orientation o = CGAL::orientation( p, q, r);
+      CGAL_kernel_precondition( o != COLLINEAR);
+
+      Point_2    cp   = circumcenter( p, q, r);
+      FT         sq_r = squared_distance( p, cp);
+
+      base = Rep(cp, sq_r, o);
+    }
+
+    CircleH2(const Point_2& p, const Point_2& q, const Orientation& o)
+    {
+      CGAL_kernel_precondition( o != COLLINEAR);
+
+      if ( p != q)
+      {
+         Point_2    cp   = midpoint( p, q);
+         FT         sq_r = squared_distance( cp, p);
+         base = Rep(cp, sq_r, o);
+      }
+      else
+         base = Rep(p, FT( 0), o);
+    }
+
+    CircleH2(const Point_2& cp, const FT& squared_radius,
+             const Orientation& o)
+    {
+      CGAL_precondition( ( ! CGAL_NTS is_negative( squared_radius)) &&
+                         ( o != COLLINEAR ) );
+      base = Rep(cp, squared_radius, o);
+    }
+
+    const Point_2 &
+    center() const;
+
+    Orientation
+    orientation() const;
+
+    const FT &
+    squared_radius() const;
+
+    CircleH2<R>
+    opposite() const;
+
+    Oriented_side
+    oriented_side(const Point_2& ) const;
+
+    Bounded_side
+    bounded_side(const Point_2& ) const;
+
+    bool  operator==( const CircleH2<R>& ) const;
+    bool  operator!=( const CircleH2<R>& ) const;
+    bool  has_on_positive_side(const Point_2& ) const;
+    bool  has_on_negative_side(const Point_2& ) const;
+    bool  has_on_boundary( const Point_2& ) const;
+    bool  has_on_bounded_side( const Point_2& ) const;
+    bool  has_on_unbounded_side(const Point_2&) const;
+    bool  is_degenerate() const;
+
+    // bool  oriented_equal( const CircleH2<R>& ) const;
+    // bool  unoriented_equal( const CircleH2<R>& ) const;
+};
+
+template <class R>
+inline
+const typename CircleH2<R>::Point_2 &
+CircleH2<R>::center() const
+{ return get_pointee_or_identity(base).template get<0>(); }
+
+template <class R>
+inline
+const typename CircleH2<R>::FT &
+CircleH2<R>::squared_radius() const
+{ return get_pointee_or_identity(base).template get<1>(); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+CircleH2<R>
+CircleH2<R>::opposite() const
+{
+  return CircleH2<R>( center(),
+                          squared_radius(),
+                          CGAL::opposite( orientation() ) );
+}
+
+template <class R>
+inline
+Orientation
+CircleH2<R>::orientation() const
+{ return get_pointee_or_identity(base).template get<2>(); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+Oriented_side
+CircleH2<R>::oriented_side( const typename CircleH2<R>::Point_2& p) const
+{
+  FT sq_dist = squared_distance( p, center() );
+  FT sq_rad  = squared_radius();
+  Comparison_result vgl = CGAL_NTS compare( sq_dist, sq_rad );
+  Oriented_side rel_pos = (vgl == LARGER ) ?
+                                   ON_NEGATIVE_SIDE :
+                                   ( (vgl == SMALLER ) ?
+                                          ON_POSITIVE_SIDE :
+                                          ON_ORIENTED_BOUNDARY);
+  if (orientation() == POSITIVE)
+  { return rel_pos; }
+  else       // NEGATIVE
+  { return CGAL::opposite( rel_pos ); }
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::has_on_positive_side(const typename CircleH2<R>::Point_2& p) const
+{
+  if ( orientation() == POSITIVE )
+  { return (has_on_bounded_side(p) ); }
+  else
+  { return (has_on_unbounded_side(p) ); }
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::has_on_boundary(const typename CircleH2<R>::Point_2& p) const
+{
+  FT sq_dist = squared_distance( p, center() );
+  FT sq_rad  = squared_radius();
+  return ( sq_dist == sq_rad );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::has_on_negative_side( const typename CircleH2<R>::Point_2&p) const
+{
+  if ( orientation() == NEGATIVE )
+  {
+      return (has_on_bounded_side(p) );
+  }
+  else
+  {
+      return (has_on_unbounded_side(p) );
+  }
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+Bounded_side
+CircleH2<R>::bounded_side(const typename CircleH2<R>::Point_2& p) const
+{
+  FT sq_dist = squared_distance( p, center() );
+  FT sq_rad  = squared_radius();
+  Comparison_result vgl = CGAL_NTS compare( sq_dist, sq_rad );
+  return  (vgl == LARGER ) ? ON_UNBOUNDED_SIDE :
+                                   ( (vgl == SMALLER ) ?
+                                          ON_BOUNDED_SIDE :
+                                          ON_BOUNDARY);
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::has_on_bounded_side(const typename CircleH2<R>::Point_2& p) const
+{
+  FT sq_dist = squared_distance( p, center() );
+  FT sq_rad  = squared_radius();
+  return ( sq_dist < sq_rad );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::has_on_unbounded_side(const typename CircleH2<R>::Point_2&p) const
+{
+  FT sq_dist = squared_distance( p, center() );
+  FT sq_rad  = squared_radius();
+  return ( sq_rad < sq_dist );
+}
+
+template <class R>
+inline
+bool
+CircleH2<R>::is_degenerate() const
+{ return ( squared_radius() == FT(0) ); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+CircleH2<R>::operator==(const CircleH2<R>& c) const
+{
+  return  ( center() == c.center() )
+        &&( squared_radius() == c.squared_radius() )
+        &&( orientation() == c.orientation() );
+}
+
+template <class R>
+inline
+bool
+CircleH2<R>::operator!=(const CircleH2<R>& c) const
+{ return !(*this == c); }
+
+} //namespace CGAL
+
+#endif // CGAL_CIRCLEH2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Data_accessorH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Data_accessorH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Data_accessorH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Data_accessorH2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH2.h
new file mode 100644
index 0000000..b39c3cb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH2.h
@@ -0,0 +1,120 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+#ifndef CGAL_HOMOGENEOUS_DIRECTION_2_H
+#define CGAL_HOMOGENEOUS_DIRECTION_2_H
+
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/kernel_config.h>
+#include <CGAL/number_type_basic.h>
+
+namespace CGAL {
+
+template < class R_ >
+class DirectionH2
+{
+  typedef DirectionH2<R_>                   Self;
+  typedef typename R_::FT                   FT;
+  typedef typename R_::RT                   RT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Vector_2             Vector_2;
+  typedef typename R_::Line_2               Line_2;
+  typedef typename R_::Ray_2                Ray_2;
+  typedef typename R_::Segment_2            Segment_2;
+
+  typedef cpp11::array<RT, 3>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+
+  typedef R_                                    R;
+
+  typedef const RT& Homogeneous_coordinate_type;
+
+  const Self&
+  rep() const
+  {
+    return static_cast<const Self& >(*this);
+  }
+  
+   DirectionH2() {}
+
+   DirectionH2(const RT& x, const RT& y)
+      : base(CGAL::make_array(x, y, RT(1))) {}
+
+   // TODO Not documented : should not exist, not used.
+   // we should also change array<RT, 3> -> array<RT, 2>
+   DirectionH2(const RT& x, const RT& y, const RT& w )
+     : base( w > RT(0) ? CGAL::make_array(x, y, w)
+                       : CGAL::make_array<RT>(-x, -y, -w) ) {}
+
+    bool    operator==( const DirectionH2<R>& d) const;
+    bool    operator!=( const DirectionH2<R>& d) const;
+
+
+    Vector_2       to_vector() const;
+
+    const RT & x() const { return CGAL::get_pointee_or_identity(base)[0]; }
+    const RT & y() const { return CGAL::get_pointee_or_identity(base)[1]; }
+
+    const RT & delta(int i) const;
+    const RT & dx() const { return CGAL::get_pointee_or_identity(base)[0]; }
+    const RT & dy() const { return CGAL::get_pointee_or_identity(base)[1]; }
+
+};
+
+template <class R >
+CGAL_KERNEL_INLINE
+bool
+DirectionH2<R>::operator==( const DirectionH2<R>& d) const
+{
+  return (  ( x() * d.y() == y() * d.x() )
+          &&( CGAL_NTS sign( x() ) == CGAL_NTS sign( d.x() ) )
+          &&( CGAL_NTS sign( y() ) == CGAL_NTS sign( d.y() ) ) );
+}
+
+template <class R >
+inline
+bool
+DirectionH2<R>::operator!=( const DirectionH2<R>& d) const
+{ return !(*this == d); }
+
+} //namespace CGAL
+
+#include <CGAL/Homogeneous/predicates_on_directionsH2.h>
+
+namespace CGAL {
+
+template <class R >
+CGAL_KERNEL_INLINE
+typename DirectionH2<R>::Vector_2
+DirectionH2<R>::to_vector() const
+{ return Vector_2(dx(), dy()); }
+
+} //namespace CGAL
+
+#endif // CGAL_HOMOGENEOUS_DIRECTION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH3.h
new file mode 100644
index 0000000..594c9ab
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/DirectionH3.h
@@ -0,0 +1,136 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+#ifndef CGAL_HOMOGENEOUS_DIRECTION_3_H
+#define CGAL_HOMOGENEOUS_DIRECTION_3_H
+
+#include <CGAL/kernel_config.h>
+#include <CGAL/array.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/number_utils.h>
+namespace CGAL {
+
+template < class R_ >
+class DirectionH3
+{
+   typedef typename R_::RT                   RT;
+   typedef typename R_::FT                   FT;
+   typedef typename R_::Point_3              Point_3;
+   typedef typename R_::Vector_3             Vector_3;
+   typedef typename R_::Segment_3            Segment_3;
+   typedef typename R_::Line_3               Line_3;
+   typedef typename R_::Ray_3                Ray_3;
+
+    typedef cpp11::array<RT, 4>              Rep;
+    typedef typename R_::template Handle<Rep>::type  Base;
+ 
+    Base base;
+
+public:
+
+    typedef R_                 R;
+
+  DirectionH3() {}
+
+  //DirectionH3(const Point_3 & p )
+    //: base(p) {}
+
+  DirectionH3(const Vector_3 & v )
+  { *this = v.direction(); }
+
+  DirectionH3(const Line_3 & l )
+  { *this = l.rep().direction(); }
+
+  DirectionH3(const Ray_3 & r )
+  { *this = r.direction(); }
+
+  DirectionH3(const Segment_3 & s )
+  { *this = s.direction(); }
+
+  // the fourth argument is not documented.  Should go away ?
+  DirectionH3(const RT& x, const RT& y,
+              const RT& z, const RT& w = RT(1) )
+    : base( w >= RT(0) ? CGAL::make_array(x, y, z, w)
+                       : CGAL::make_array<RT>(-x, -y, -z, -w) ) {}
+
+  bool  is_degenerate() const;
+
+  bool  operator==( const DirectionH3<R>& d) const;
+  bool  operator!=( const DirectionH3<R>& d) const;
+
+  Vector_3    to_vector() const;
+  Vector_3    vector() const { return to_vector(); }
+
+  const RT & dx() const { return get_pointee_or_identity(base)[0]; }
+  const RT & dy() const { return get_pointee_or_identity(base)[1]; }
+  const RT & dz() const { return get_pointee_or_identity(base)[2]; }
+  const RT & x()  const { return get_pointee_or_identity(base)[0]; }
+  const RT & y()  const { return get_pointee_or_identity(base)[1]; }
+  const RT & z()  const { return get_pointee_or_identity(base)[2]; }
+  const RT & hx() const { return get_pointee_or_identity(base)[0]; }
+  const RT & hy() const { return get_pointee_or_identity(base)[1]; }
+  const RT & hz() const { return get_pointee_or_identity(base)[2]; }
+};
+
+template <class R >
+CGAL_KERNEL_INLINE
+bool
+DirectionH3<R>::operator==( const DirectionH3<R>& d) const
+{
+  return ( ( hx()*d.hy() == hy()*d.hx() )
+        &&( hx()*d.hz() == hz()*d.hx() )
+        &&( hy()*d.hz() == hz()*d.hy() )
+        &&( CGAL_NTS sign( hx() ) == CGAL_NTS sign( d.hx() ) )
+        &&( CGAL_NTS sign( hy() ) == CGAL_NTS sign( d.hy() ) )
+        &&( CGAL_NTS sign( hz() ) == CGAL_NTS sign( d.hz() ) ) );
+}
+
+template <class R >
+inline
+bool
+DirectionH3<R>::operator!=( const DirectionH3<R>& d) const
+{ return !operator==(d); }
+
+template <class R >
+CGAL_KERNEL_INLINE
+bool
+DirectionH3<R>::is_degenerate() const
+{ return ((hx() == RT(0)) && (hy() == RT(0)) && (hz() == RT(0))); }
+
+template <class R >
+inline
+typename DirectionH3<R>::Vector_3
+DirectionH3<R>::to_vector() const
+{ return Vector_3(dx(), dy(), dz(), RT(1)); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+DirectionH3<R>
+cross_product( const DirectionH3<R>& d1,
+               const DirectionH3<R>& d2)
+{ return cross_product(d1.to_vector(),d2.to_vector()).direction(); }
+
+} //namespace CGAL
+
+#endif // CGAL_HOMOGENEOUS_DIRECTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Homogeneous_base.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Homogeneous_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/Homogeneous_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Homogeneous_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_cuboidH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_cuboidH3.h
new file mode 100644
index 0000000..788f862
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_cuboidH3.h
@@ -0,0 +1,398 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_ISO_CUBOIDH3_H
+#define CGAL_ISO_CUBOIDH3_H
+
+#include <CGAL/array.h>
+#include <CGAL/enum.h>
+#include <CGAL/kernel_config.h>
+#include <CGAL/kernel_assertions.h>
+
+namespace CGAL {
+
+template <class R_>
+class Iso_cuboidH3
+{
+  typedef typename R_::RT                   RT;
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+  typedef cpp11::array<Point_3, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                 R;
+
+  Iso_cuboidH3() {}
+
+  Iso_cuboidH3(const Point_3& p, const Point_3& q, int)
+    : base(CGAL::make_array(p, q))
+  {
+    CGAL_kernel_assertion(p.x()<=q.x());
+    CGAL_kernel_assertion(p.y()<=q.y());
+    CGAL_kernel_assertion(p.z()<=q.z());
+  }
+
+  Iso_cuboidH3(const Point_3& p, const Point_3& q);
+
+  Iso_cuboidH3(const Point_3& left,   const Point_3& right,
+               const Point_3& bottom, const Point_3& top,
+               const Point_3& far_,   const Point_3& close);
+
+  Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+               const RT& max_hx, const RT& max_hy, const RT& max_hz, 
+               const RT& hw);
+
+  Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+               const RT& max_hx, const RT& max_hy, const RT& max_hz);
+
+  bool      operator==(const Iso_cuboidH3<R>& s) const;
+  bool      operator!=(const Iso_cuboidH3<R>& s) const;
+
+  const Point_3 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  const Point_3 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  Point_3  vertex(int i) const;
+  Point_3  operator[](int i) const;
+
+  Iso_cuboidH3<R>
+            transform(const Aff_transformation_3& t) const;
+  Bounded_side
+            bounded_side(const Point_3& p) const;
+  bool      has_on(const Point_3& p) const;
+  bool      has_on_boundary(const Point_3& p) const;
+  bool      has_on_bounded_side(const Point_3& p) const;
+  bool      has_on_unbounded_side(const Point_3& p) const;
+  bool      is_degenerate() const;
+  FT        xmin() const;
+  FT        ymin() const;
+  FT        zmin() const;
+  FT        xmax() const;
+  FT        ymax() const;
+  FT        zmax() const;
+  FT        min_coord(int i) const;
+  FT        max_coord(int i) const;
+
+  FT        volume() const;
+
+};
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+Iso_cuboidH3<R>::
+Iso_cuboidH3(const typename Iso_cuboidH3<R>::Point_3& p,
+	     const typename Iso_cuboidH3<R>::Point_3& q)
+{
+  bool px_k_qx = ( p.hx()*q.hw() < q.hx()*p.hw() );
+  bool py_k_qy = ( p.hy()*q.hw() < q.hy()*p.hw() );
+  bool pz_k_qz = ( p.hz()*q.hw() < q.hz()*p.hw() );
+
+  RT minx;
+  RT miny;
+  RT minz;
+  RT maxx;
+  RT maxy;
+  RT maxz;
+  RT minw = p.hw()*q.hw();
+  RT maxw = p.hw()*q.hw();
+  if ( px_k_qx )
+  {
+      minx = p.hx()*q.hw();
+      maxx = q.hx()*p.hw();
+  }
+  else
+  {
+      minx = q.hx()*p.hw();
+      maxx = p.hx()*q.hw();
+  }
+  if ( py_k_qy )
+  {
+      miny = p.hy()*q.hw();
+      maxy = q.hy()*p.hw();
+  }
+  else
+  {
+      miny = q.hy()*p.hw();
+      maxy = p.hy()*q.hw();
+  }
+  if ( pz_k_qz )
+  {
+      minz = p.hz()*q.hw();
+      maxz = q.hz()*p.hw();
+  }
+  else
+  {
+      minz = q.hz()*p.hw();
+      maxz = p.hz()*q.hw();
+  }
+  base = Rep(CGAL::make_array(Point_3(minx, miny, minz, minw),
+                               Point_3(maxx, maxy, maxz, maxw)));
+}
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+Iso_cuboidH3<R>::
+Iso_cuboidH3(const typename Iso_cuboidH3<R>::Point_3& left,
+             const typename Iso_cuboidH3<R>::Point_3& right,
+             const typename Iso_cuboidH3<R>::Point_3& bottom,
+             const typename Iso_cuboidH3<R>::Point_3& top,
+             const typename Iso_cuboidH3<R>::Point_3& far_,
+             const typename Iso_cuboidH3<R>::Point_3& close)
+  : base(CGAL::make_array(Point_3(left.hx()   * bottom.hw() * far_.hw(),
+                                   bottom.hy() * left.hw()   * far_.hw(),
+                                   far_.hz()   * left.hw()   * bottom.hw(),
+                                   left.hw()   * bottom.hw() * far_.hw()),
+                           Point_3(right.hx()  * top.hw()    * close.hw(),
+                                   top.hy()    * right.hw()  * close.hw(),
+                                   close.hz()  * right.hw()  * top.hw(),
+                                   right.hw()  * top.hw()    * close.hw())))
+{
+  CGAL_kernel_precondition(!less_x(right, left));
+  CGAL_kernel_precondition(!less_y(top, bottom));
+  CGAL_kernel_precondition(!less_z(close, far_));
+}
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+Iso_cuboidH3<R>::
+Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+             const RT& max_hx, const RT& max_hy, const RT& max_hz)
+  : base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, RT(1)),
+                           Point_3(max_hx, max_hy, max_hz, RT(1))))
+{}
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+Iso_cuboidH3<R>::
+Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+             const RT& max_hx, const RT& max_hy, const RT& max_hz, 
+             const RT& hw)
+  : base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, hw),
+                           Point_3(max_hx, max_hy, max_hz, hw)))
+{}
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+Iso_cuboidH3<R>::
+operator==(const Iso_cuboidH3<R>& r) const
+{ return  ((this->min)() == (r.min)()) && ((this->max)() == (r.max)()); }
+
+template < class R >
+inline
+bool
+Iso_cuboidH3<R>::
+operator!=(const Iso_cuboidH3<R>& r) const
+{ return !(*this == r); }
+
+template < class R >
+inline
+const typename Iso_cuboidH3<R>::Point_3 &
+Iso_cuboidH3<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{ return get_pointee_or_identity(base)[0]; }
+
+template < class R >
+inline
+const typename Iso_cuboidH3<R>::Point_3 &
+Iso_cuboidH3<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{ return get_pointee_or_identity(base)[1]; }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::xmin() const
+{ return  FT( (this->min)().hx() ) / FT( (this->min)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::ymin() const
+{ return  FT( (this->min)().hy() ) / FT( (this->min)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::zmin() const
+{ return  FT( (this->min)().hz() ) / FT( (this->min)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::xmax() const
+{ return  FT( (this->max)().hx() ) / FT( (this->max)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::ymax() const
+{ return  FT( (this->max)().hy() ) / FT( (this->max)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::zmax() const
+{ return  FT( (this->max)().hz() ) / FT( (this->max)().hw() ); }
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::min_coord(int i) const
+{ 
+   CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
+   if ( i == 0 )
+       return xmin();
+   else if (i == 1)
+       return ymin();
+   return zmin();
+}
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::max_coord(int i) const
+{ 
+   CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
+   if ( i == 0 )
+      return xmax();
+   else if ( i == 1 )
+      return ymax();
+   return zmax();
+}
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::FT
+Iso_cuboidH3<R>::volume() const
+{ return  (xmax() - xmin()) * (ymax() - ymin()) * (zmax() - zmin()); }
+
+template < class R >
+CGAL_KERNEL_LARGE_INLINE
+typename Iso_cuboidH3<R>::Point_3
+Iso_cuboidH3<R>::vertex(int i) const
+{
+  switch (i%8)
+  {
+    case 0: return (this->min)();
+    case 1: return Point_3( (this->max)().hx(), (this->min)().hy(),
+		                   (this->min)().hz(), (this->min)().hw() );
+    case 2: return Point_3( (this->max)().hx(), (this->max)().hy(),
+		                   (this->min)().hz(), (this->min)().hw() );
+    case 3: return Point_3( (this->min)().hx(), (this->max)().hy(),
+		                   (this->min)().hz(), (this->min)().hw() );
+    case 4: return Point_3( (this->min)().hx(), (this->max)().hy(),
+		                   (this->max)().hz(), (this->min)().hw() );
+    case 5: return Point_3( (this->min)().hx(), (this->min)().hy(),
+		                   (this->max)().hz(), (this->min)().hw() );
+    case 6: return Point_3( (this->max)().hx(), (this->min)().hy(),
+		                   (this->max)().hz(), (this->min)().hw() );
+    default: /*case 7:*/ return (this->max)();
+  }
+}
+
+template < class R >
+inline
+typename Iso_cuboidH3<R>::Point_3
+Iso_cuboidH3<R>::operator[](int i) const
+{ return vertex(i); }
+
+template < class R >
+CGAL_KERNEL_MEDIUM_INLINE
+Bounded_side
+Iso_cuboidH3<R>::
+bounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
+{
+  if (    (p.hx()*(this->min)().hw() < (this->min)().hx()*p.hw() )
+        ||(p.hy()*(this->min)().hw() < (this->min)().hy()*p.hw() )
+        ||(p.hz()*(this->min)().hw() < (this->min)().hz()*p.hw() )
+        ||(p.hx()*(this->max)().hw() > (this->max)().hx()*p.hw() )
+        ||(p.hy()*(this->max)().hw() > (this->max)().hy()*p.hw() )
+        ||(p.hz()*(this->max)().hw() > (this->max)().hz()*p.hw() )  )
+  { return ON_UNBOUNDED_SIDE; }
+  if (    (p.hx()*(this->min)().hw() == (this->min)().hx()*p.hw() )
+        ||(p.hy()*(this->min)().hw() == (this->min)().hy()*p.hw() )
+        ||(p.hz()*(this->min)().hw() == (this->min)().hz()*p.hw() )
+        ||(p.hx()*(this->max)().hw() == (this->max)().hx()*p.hw() )
+        ||(p.hy()*(this->max)().hw() == (this->max)().hy()*p.hw() )
+        ||(p.hz()*(this->max)().hw() == (this->max)().hz()*p.hw() )  )
+  { return ON_BOUNDARY; }
+  else
+  { return ON_BOUNDED_SIDE; }
+}
+
+template < class R >
+inline
+bool
+Iso_cuboidH3<R>::
+has_on_boundary(const typename Iso_cuboidH3<R>::Point_3& p) const
+{ return ( bounded_side(p) == ON_BOUNDARY ); }
+
+template < class R >
+inline
+bool
+Iso_cuboidH3<R>::has_on(const typename Iso_cuboidH3<R>::Point_3& p) const
+{ return ( bounded_side(p) == ON_BOUNDARY ); }
+
+template < class R >
+inline
+bool
+Iso_cuboidH3<R>::
+has_on_bounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
+{ return ( bounded_side(p) == ON_BOUNDED_SIDE ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+Iso_cuboidH3<R>::
+has_on_unbounded_side(const typename Iso_cuboidH3<R>::Point_3& p) const
+{
+  return (   ( lexicographically_xyz_smaller(p,(this->min)() ))
+           ||( lexicographically_xyz_smaller((this->max)(),p ))  );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+Iso_cuboidH3<R>::is_degenerate() const
+{
+  return (  ( (this->min)().hx() == (this->max)().hx() )
+         || ( (this->min)().hy() == (this->max)().hy() )
+         || ( (this->min)().hz() == (this->max)().hz() ) );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+Iso_cuboidH3<R>
+Iso_cuboidH3<R>::
+transform(const typename Iso_cuboidH3<R>::Aff_transformation_3&t) const
+{
+  return Iso_cuboidH3<R>(t.transform((this->min)() ),
+                             t.transform((this->max)() ) );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_ISO_CUBOIDH3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_rectangleH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_rectangleH2.h
new file mode 100644
index 0000000..0d19aa8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/Iso_rectangleH2.h
@@ -0,0 +1,102 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_ISO_RECTANGLEH2_H
+#define CGAL_ISO_RECTANGLEH2_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template <class R_>
+class Iso_rectangleH2
+{
+  typedef typename R_::FT                   FT;
+  typedef typename R_::RT                   RT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Iso_rectangle_2      Iso_rectangle_2;
+
+  typedef cpp11::array<Point_2, 2>          Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  Base base;
+
+public:
+  typedef R_                                    R;
+  typedef typename Point_2::Rep::Cartesian_coordinate_type Cartesian_coordinate_type;
+  typedef typename Point_2::Rep::Homogeneous_coordinate_type Homogeneous_coordinate_type;
+
+  Iso_rectangleH2() {}
+
+  Iso_rectangleH2(const Point_2& p, const Point_2& q, int)
+    : base(CGAL::make_array(p, q))
+  {
+    // I have to remove the assertions, because of Homogeneous_converter.
+    // CGAL_kernel_assertion(p.x()<=q.x());
+    // CGAL_kernel_assertion(p.y()<=q.y());
+  }
+
+  const Point_2 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  const Point_2 & max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+
+  Bounded_side bounded_side(const Point_2& p) const;
+};
+
+
+
+template < class R >
+inline
+const typename Iso_rectangleH2<R>::Point_2 &
+Iso_rectangleH2<R>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{ return get_pointee_or_identity(base)[0]; }
+
+template < class R >
+inline
+const typename Iso_rectangleH2<R>::Point_2 &
+Iso_rectangleH2<R>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{ return get_pointee_or_identity(base)[1]; }
+
+template < class R >
+CGAL_KERNEL_INLINE
+Bounded_side
+Iso_rectangleH2<R>::
+bounded_side(const typename Iso_rectangleH2<R>::Point_2& p) const
+{
+  Oriented_side wrt_min = _where_wrt_L_wedge((this->min)(),p);
+  Oriented_side wrt_max = _where_wrt_L_wedge(p,(this->max)());
+  if (( wrt_min == ON_NEGATIVE_SIDE )||( wrt_max == ON_NEGATIVE_SIDE))
+  {
+      return ON_UNBOUNDED_SIDE;
+  }
+  if (  ( wrt_min == ON_ORIENTED_BOUNDARY )
+      ||( wrt_max == ON_ORIENTED_BOUNDARY ) )
+  {
+      return ON_BOUNDARY;
+  }
+  return ON_BOUNDED_SIDE;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_ISO_RECTANGLEH2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/LineH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/LineH2.h
new file mode 100644
index 0000000..5f7f796
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/LineH2.h
@@ -0,0 +1,100 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_LINEH2_H
+#define CGAL_LINEH2_H
+
+#include <CGAL/kernel_config.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template < class R_ >
+class LineH2
+{
+    typedef typename R_::FT                   FT;
+    typedef typename R_::RT                   RT;
+    typedef typename R_::Point_2              Point_2;
+    typedef typename R_::Vector_2             Vector_2;
+    typedef typename R_::Direction_2          Direction_2;
+    typedef typename R_::Segment_2            Segment_2;
+    typedef typename R_::Ray_2                Ray_2;
+    typedef typename R_::Line_2               Line_2;
+
+    typedef cpp11::array<RT, 3>               Rep;
+    typedef typename R_::template Handle<Rep>::type  Base;
+
+    Base base;
+
+public:
+
+    typedef R_                                    R;
+
+    LineH2() {}
+    LineH2(const RT& a, const RT& b, const RT& c)
+      : base(CGAL::make_array(a, b, c)) {}
+
+    bool           operator==(const LineH2<R>& l) const;
+    bool           operator!=(const LineH2<R>& l) const;
+
+    const RT &     a() const { return get_pointee_or_identity(base)[0]; }
+    const RT &     b() const { return get_pointee_or_identity(base)[1]; }
+    const RT &     c() const { return get_pointee_or_identity(base)[2]; }
+
+};
+
+template < class R >
+CGAL_KERNEL_MEDIUM_INLINE
+bool
+LineH2<R>::operator==(const LineH2<R>& l) const
+{
+  if (  (a() * l.c() != l.a() * c() )
+      ||(b() * l.c() != l.b() * c() ) )
+  {
+      return false;
+  }
+  int sc  = static_cast<int>(CGAL_NTS sign(c()));
+  int slc = static_cast<int>(CGAL_NTS sign(l.c()));
+  if ( sc == slc )
+  {
+      if (sc == 0)
+          return (  (a()*l.b() == b()*l.a() )
+                  &&(CGAL_NTS sign(a() )== CGAL_NTS sign( l.a() ))
+                  &&(CGAL_NTS sign(b() )== CGAL_NTS sign( l.b() )) );
+      else
+          return true;
+  }
+  else
+      return false;
+}
+
+template < class R >
+inline
+bool
+LineH2<R>::operator!=(const LineH2<R>& l) const
+{ return !(*this == l); }
+
+} //namespace CGAL
+
+#endif // CGAL_LINEH2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PlaneH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PlaneH3.h
new file mode 100644
index 0000000..8bc53ae
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PlaneH3.h
@@ -0,0 +1,545 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_PLANEH3_H
+#define CGAL_PLANEH3_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template < class R_ >
+class PlaneH3
+{
+   typedef typename R_::RT                   RT;
+   typedef typename R_::FT                   FT;
+   typedef typename R_::Point_2              Point_2;
+   typedef typename R_::Point_3              Point_3;
+   typedef typename R_::Vector_3             Vector_3;
+   typedef typename R_::Line_3               Line_3;
+   typedef typename R_::Segment_3            Segment_3;
+   typedef typename R_::Ray_3                Ray_3;
+   typedef typename R_::Direction_3          Direction_3;
+   typedef typename R_::Plane_3              Plane_3;
+   typedef typename R_::Aff_transformation_3 Aff_transformation_3;
+
+   typedef cpp11::array<RT, 4>               Rep;
+   typedef typename R_::template Handle<Rep>::type  Base;
+
+   Base base;
+
+public:
+
+   typedef R_                 R;
+
+    PlaneH3() {}
+
+    PlaneH3(const Point_3&, const Point_3&, const Point_3& );
+    PlaneH3(const RT& a, const RT& b,
+            const RT& c, const RT& d );
+    PlaneH3(const Point_3&, const Ray_3& );
+    PlaneH3(const Point_3&, const Line_3& );
+    PlaneH3(const Point_3&, const Segment_3& );
+    PlaneH3(const Line_3&, const Point_3& );
+    PlaneH3(const Segment_3&, const Point_3& );
+    PlaneH3(const Ray_3&, const Point_3& );
+    PlaneH3(const Point_3&, const Direction_3& );
+    PlaneH3(const Point_3&, const Vector_3& );
+    PlaneH3(const Point_3&, const Direction_3&, const Direction_3& );
+
+    const RT & a() const;
+    const RT & b() const;
+    const RT & c() const;
+    const RT & d() const;
+
+    bool       operator==( const PlaneH3<R>& ) const;
+    bool       operator!=( const PlaneH3<R>& ) const;
+
+    Line_3  perpendicular_line(const Point_3& ) const;
+    Plane_3 opposite() const;  // plane with opposite orientation
+    Point_3 projection(const Point_3& ) const;
+
+    Point_3 point() const;     // same point on the plane
+    Direction_3    orthogonal_direction() const;
+    Vector_3       orthogonal_vector() const;
+
+    Oriented_side  oriented_side(const Point_3 &p) const;
+    bool           has_on(const Point_3 &p) const;
+    bool           has_on(const Line_3 &p) const;
+    bool           has_on_positive_side(const Point_3&l) const;
+    bool           has_on_negative_side(const Point_3&l) const;
+
+    bool           is_degenerate() const;
+
+    Aff_transformation_3 transform_to_2d() const;
+    Point_2   to_2d(const Point_3& )  const;
+    Point_3   to_3d(const Point_2& )  const;
+    Vector_3  base1() const;
+    Vector_3  base2() const;
+
+protected:
+    Point_3   point1() const;   // same point different from point()
+    Point_3   point2() const;   // same point different from point()
+                                       // and point1()
+
+    void             new_rep(const Point_3 &p,
+                             const Point_3 &q,
+                             const Point_3 &r);
+
+    void             new_rep(const RT &a, const RT &b,
+                             const RT &c, const RT &d);
+};
+
+//
+//  a() * X + b() * Y + c() * Z() + d() * W() == 0
+//
+//      |    X        Y       Z       W     |
+//      |  p.hx()   p.hy()  p.hz()  p.hw()  |
+//      |  q.hx()   q.hy()  q.hz()  q.hw()  |
+//      |  r.hx()   r.hy()  r.hz()  r.hw()  |
+//
+//  cpp11::array<RT, 4> ( a(), b(), c(), d() )
+
+template < class R >
+inline
+void
+PlaneH3<R>::new_rep(const typename PlaneH3<R>::Point_3 &p,
+                    const typename PlaneH3<R>::Point_3 &q,
+                    const typename PlaneH3<R>::Point_3 &r)
+{
+  RT phx = p.hx();
+  RT phy = p.hy();
+  RT phz = p.hz();
+  RT phw = p.hw();
+
+  RT qhx = q.hx();
+  RT qhy = q.hy();
+  RT qhz = q.hz();
+  RT qhw = q.hw();
+
+  RT rhx = r.hx();
+  RT rhy = r.hy();
+  RT rhz = r.hz();
+  RT rhw = r.hw();
+
+  base = CGAL::make_array<RT>(
+              phy*( qhz*rhw - qhw*rhz )
+            - qhy*( phz*rhw - phw*rhz )     // * X
+            + rhy*( phz*qhw - phw*qhz ),
+
+            - phx*( qhz*rhw - qhw*rhz )
+            + qhx*( phz*rhw - phw*rhz )     // * Y
+            - rhx*( phz*qhw - phw*qhz ),
+
+              phx*( qhy*rhw - qhw*rhy )
+            - qhx*( phy*rhw - phw*rhy )     // * Z
+            + rhx*( phy*qhw - phw*qhy ),
+
+            - phx*( qhy*rhz - qhz*rhy )
+            + qhx*( phy*rhz - phz*rhy )     // * W
+            - rhx*( phy*qhz - phz*qhy ));
+}
+
+template < class R >
+inline
+void
+PlaneH3<R>::new_rep(const RT &a, const RT &b, const RT &c, const RT &d)
+{ base = CGAL::make_array(a, b, c, d); }
+
+template < class R >
+inline
+bool
+PlaneH3<R>::operator!=(const PlaneH3<R>& l) const
+{
+ return !(*this == l);
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
+                    const typename PlaneH3<R>::Point_3& q,
+                    const typename PlaneH3<R>::Point_3& r)
+{ new_rep(p,q,r); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const RT& a, const RT& b,
+                    const RT& c, const RT& d)
+{ new_rep(a,b,c,d); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
+                    const typename PlaneH3<R>::Line_3&  l)
+{ new_rep(p, l.point(0), l.point(1) ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
+                        const typename PlaneH3<R>::Segment_3& s)
+{ new_rep(p, s.source(), s.target() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
+                        const typename PlaneH3<R>::Ray_3&  r)
+{ new_rep(p, r.start(), r.start() + r.direction().to_vector() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Line_3& l ,
+                        const typename PlaneH3<R>::Point_3& p)
+{ new_rep(l.point(0), p, l.point(1) ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Segment_3& s,
+                        const typename PlaneH3<R>::Point_3& p)
+{ new_rep(s.source(), p, s.target() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Ray_3&  r,
+                        const typename PlaneH3<R>::Point_3& p)
+{ new_rep(r.start(), p, r.start() + r.direction().to_vector() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
+                        const typename PlaneH3<R>::Direction_3& d)
+{
+  Vector_3 ov = d.to_vector();
+  new_rep( ov.hx()*p.hw(),
+           ov.hy()*p.hw(),
+           ov.hz()*p.hw(),
+          -(ov.hx()*p.hx() + ov.hy()*p.hy() + ov.hz()*p.hz() ) );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
+                        const typename PlaneH3<R>::Vector_3& ov)
+{
+  new_rep( ov.hx()*p.hw(),
+           ov.hy()*p.hw(),
+           ov.hz()*p.hw(),
+          -(ov.hx()*p.hx() + ov.hy()*p.hy() + ov.hz()*p.hz() ) );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
+                        const typename PlaneH3<R>::Direction_3& d1,
+                        const typename PlaneH3<R>::Direction_3& d2)
+{ new_rep( p, p + d1.to_vector(), p + d2.to_vector() ); }
+
+template < class R >
+inline
+const typename PlaneH3<R>::RT &
+PlaneH3<R>::a() const
+{ return get_pointee_or_identity(base)[0]; }
+
+template < class R >
+inline
+const typename PlaneH3<R>::RT &
+PlaneH3<R>::b() const
+{ return get_pointee_or_identity(base)[1]; }
+
+template < class R >
+inline
+const typename PlaneH3<R>::RT &
+PlaneH3<R>::c() const
+{ return get_pointee_or_identity(base)[2]; }
+
+template < class R >
+inline
+const typename PlaneH3<R>::RT &
+PlaneH3<R>::d() const
+{ return get_pointee_or_identity(base)[3]; }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Line_3
+PlaneH3<R>::perpendicular_line(const typename PlaneH3<R>::Point_3& p) const
+{ return Line_3( p, orthogonal_direction() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Plane_3
+PlaneH3<R>::opposite() const
+{ return PlaneH3<R>(-a(), -b(), -c(), -d() ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Point_3
+PlaneH3<R>::projection(const typename PlaneH3<R>::Point_3& p) const
+{ return _projection( p, *this ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Point_3
+PlaneH3<R>::point() const
+{
+  const RT RT0(0);
+  if ( a() != RT0 )
+  {
+      return Point_3( -d(), RT0, RT0, a() );
+  }
+  if ( b() != RT0 )
+  {
+      return Point_3( RT0, -d(), RT0, b() );
+  }
+  CGAL_kernel_assertion ( c() != RT0);
+  return Point_3( RT0, RT0, -d(), c() );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Vector_3
+PlaneH3<R>::base1() const
+{
+ // point():
+ // a() != RT0 : Point_3( -d(), RT0, RT0, a() );
+ // b() != RT0 : Point_3( RT0, -d(), RT0, b() );
+ //            : Point_3( RT0, RT0, -d(), c() );
+ // point1():
+ // a() != RT0 : Point_3( -b()-d(), a(), RT0, a() );
+ // b() != RT0 : Point_3( RT0, -c()-d(), b(), b() );
+ //            : Point_3( c(), RT0, -a()-d(), c() );
+
+  const RT RT0(0);
+  if ( a() != RT0 )
+  {
+      return Vector_3( -b(), a(), RT0, a() );
+  }
+  if ( b() != RT0 )
+  {
+      return Vector_3( RT0, -c(), b(), b() );
+  }
+  CGAL_kernel_assertion ( c() != RT(0) );
+  return Vector_3( c(), RT0, -a(), c() );
+}
+
+template < class R >
+inline
+typename PlaneH3<R>::Vector_3
+PlaneH3<R>::base2() const
+{
+  Vector_3 a = orthogonal_vector();
+  Vector_3 b = base1();
+  return Vector_3(a.hy()*b.hz() - a.hz()*b.hy(),
+                         a.hz()*b.hx() - a.hx()*b.hz(),
+                         a.hx()*b.hy() - a.hy()*b.hx(),
+                         a.hw()*b.hw() );
+}
+// Actually, the following should work, but bcc doesn't like it:
+// { return cross_product( orthogonal_vector(), base1() ); }
+
+
+template < class R >
+inline
+typename PlaneH3<R>::Point_3
+PlaneH3<R>::point1() const
+{ return point() + base1(); }
+
+template < class R >
+inline
+typename PlaneH3<R>::Point_3
+PlaneH3<R>::point2() const
+{ return point() + base2(); }
+
+template < class R >
+inline
+typename PlaneH3<R>::Direction_3
+PlaneH3<R>::orthogonal_direction() const
+{ return Direction_3(a(), b(), c() ); }
+
+template < class R >
+inline
+typename PlaneH3<R>::Vector_3
+PlaneH3<R>::orthogonal_vector() const
+{ return Vector_3(a(), b(), c() ); }
+
+template < class R >
+bool
+PlaneH3<R>::is_degenerate() const
+{
+ const RT RT0(0);
+ return ( (a() == RT0 ) && (b() == RT0 ) && (c() == RT0 ) );
+}
+
+template < class R >
+bool
+PlaneH3<R>::has_on_positive_side( const typename PlaneH3<R>::Point_3& p) const
+{
+ return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() > RT(0) );
+}
+
+template < class R >
+bool
+PlaneH3<R>::has_on_negative_side( const typename PlaneH3<R>::Point_3& p) const
+{
+ return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() < RT(0) );
+}
+
+
+template < class R >
+bool
+PlaneH3<R>::has_on( const typename PlaneH3<R>::Point_3& p) const
+{
+ return (a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() == RT(0) );
+}
+
+template < class R >
+bool
+PlaneH3<R>::has_on( const typename PlaneH3<R>::Line_3& l) const
+{
+ Point_3   p   = l.point();
+ Vector_3  ld  = l.direction().to_vector();
+ Vector_3  ov  = orthogonal_vector();
+
+ return (  ( a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw()   == RT(0) )
+         &&( ld.hx()*ov.hx() + ld.hy()*ov.hy() + ld.hz()*ov.hz() == RT(0) ) );
+}
+
+template < class R >
+Oriented_side
+PlaneH3<R>::oriented_side( const typename PlaneH3<R>::Point_3& p) const
+{
+ return CGAL_NTS sign( a()*p.hx() + b()*p.hy() + c()*p.hz() + d()*p.hw() );
+}
+
+
+template < class R >
+bool
+PlaneH3<R>::operator==(const PlaneH3<R>& l) const
+{
+ if (  (a() * l.d() != l.a() * d() )
+     ||(b() * l.d() != l.b() * d() )
+     ||(c() * l.d() != l.c() * d() ) )
+ {
+    return false;
+ }
+ int sd  = static_cast<int>(CGAL_NTS sign(d()));
+ int sld = static_cast<int>(CGAL_NTS sign(l.d()));
+ if ( sd == sld )
+ {
+    if (sd == 0)
+    {
+        return (  (a()*l.b() == b()*l.a() )
+                &&(a()*l.c() == c()*l.a() )
+                &&(b()*l.c() == c()*l.b() )
+                &&(CGAL_NTS sign(a() )== CGAL_NTS sign( l.a() ))
+                &&(CGAL_NTS sign(b() )== CGAL_NTS sign( l.b() ))
+                &&(CGAL_NTS sign(c() )== CGAL_NTS sign( l.c() )) );
+    }
+    else
+    {
+        return true;
+    }
+ }
+ else
+ {
+    return false;
+ }
+}
+
+template < class R >
+typename PlaneH3<R>::Aff_transformation_3
+PlaneH3<R>::transform_to_2d() const
+{
+  const RT  RT0(0);
+  const RT  RT1(1);
+  Vector_3 nov = orthogonal_vector();
+  Vector_3 e1v = point1()-point() ;
+  Vector_3 e2v = point2()-point() ;
+  RT orthohx = nov.hx();
+  RT orthohy = nov.hy();
+  RT orthohz = nov.hz();
+  RT e1phx   = e1v.hx();
+  RT e1phy   = e1v.hy();
+  RT e1phz   = e1v.hz();
+  RT e2phx   = e2v.hx();
+  RT e2phy   = e2v.hy();
+  RT e2phz   = e2v.hz();
+
+  RT t11 =  -( orthohy*e2phz - orthohz*e2phy );
+  RT t12 =   ( orthohx*e2phz - orthohz*e2phx );
+  RT t13 =  -( orthohx*e2phy - orthohy*e2phx );
+
+  RT t21 =   ( orthohy*e1phz - orthohz*e1phy );
+  RT t22 =  -( orthohx*e1phz - orthohz*e1phx );
+  RT t23 =   ( orthohx*e1phy - orthohy*e1phx );
+
+  RT t31 =   ( e1phy*e2phz - e1phz*e2phy );
+  RT t32 =  -( e1phx*e2phz - e1phz*e2phx );
+  RT t33 =   ( e1phx*e2phy - e1phy*e2phx );
+
+  RT scale = determinant( orthohx, orthohy, orthohz,
+                                     e1phx,   e1phy,   e1phz,
+                                     e2phx,   e2phy,   e2phz );
+
+  Aff_transformation_3
+     point_to_origin(TRANSLATION,  - ( point() - ORIGIN ) );
+  Aff_transformation_3
+     rotate_and_more( t11,    t12,   t13,   RT0,
+                      t21,    t22,   t23,   RT0,
+                      t31,    t32,   t33,   RT0,
+                                            scale);
+
+  Point_3 ortho( orthohx, orthohy, orthohz );
+  Point_3 e1p( e1phx, e1phy, e1phz );
+  Point_3 e2p( e2phx, e2phy, e2phz );
+  CGAL_kernel_assertion((   ortho.transform(rotate_and_more)
+        == Point_3( RT(0), RT(0), RT(1)) ));
+  CGAL_kernel_assertion((   e1p.transform(rotate_and_more)
+        == Point_3( RT(1), RT(0), RT(0)) ));
+  CGAL_kernel_assertion((   e2p.transform(rotate_and_more)
+        == Point_3( RT(0), RT(1), RT(0)) ));
+
+  return  rotate_and_more * point_to_origin;
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Point_2
+PlaneH3<R>::to_2d(const typename PlaneH3<R>::Point_3& p) const
+{
+  Point_3 tp = p.transform( transform_to_2d() );
+  return Point_2( tp.hx(), tp.hy(), tp.hw());
+}
+
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename PlaneH3<R>::Point_3
+PlaneH3<R>::to_3d(const typename PlaneH3<R>::Point_2& p)  const
+{
+  Point_3 hp( p.hx(), p.hy(), RT(0.0), p.hw());
+  return hp.transform( transform_to_2d().inverse() );
+}
+
+} //namespace CGAL
+
+#endif  // CGAL_PLANEH3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PointH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PointH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PointH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PointH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PointH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PointH3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/PointH3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/PointH3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/RayH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/RayH3.h
new file mode 100644
index 0000000..bb743a5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/RayH3.h
@@ -0,0 +1,177 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+#ifndef CGAL_RAYH3_H
+#define CGAL_RAYH3_H
+
+#include <utility>
+#include <CGAL/kernel_config.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Origin.h>
+
+namespace CGAL {
+
+template < class R_ >
+class RayH3
+{
+   typedef typename R_::RT                   RT;
+   typedef typename R_::FT                   FT;
+   typedef typename R_::Point_3              Point_3;
+   typedef typename R_::Line_3               Line_3;
+   typedef typename R_::Direction_3          Direction_3;
+   typedef typename R_::Vector_3             Vector_3;
+
+   typedef std::pair<Point_3, Vector_3>             Rep;
+   typedef typename R_::template Handle<Rep>::type  Base;
+
+   Base base;
+
+public:
+   typedef R_                R;
+
+    RayH3() {}
+
+    RayH3( const Point_3& sp, const Point_3& secondp)
+      : base(sp, secondp-sp) {}
+
+    RayH3( const Point_3& sp, const Vector_3& v)
+      : base(sp, v) {}
+
+    RayH3( const Point_3& sp, const Direction_3& d)
+      : base(sp, d.to_vector()) {}
+
+    RayH3( const Point_3& sp, const Line_3& l)
+      : base(sp, l.to_vector()) {}
+
+    const Point_3 & start() const;
+    const Point_3 & source() const;
+    Point_3 second_point() const;
+    Point_3 point(int i) const;
+    Direction_3 direction() const;
+    const Vector_3 & to_vector() const;
+    Line_3  supporting_line() const;
+    RayH3<R>   opposite() const;
+    bool           has_on(const Point_3& p) const;
+    bool           collinear_has_on(const Point_3 &p) const;
+    bool           is_degenerate() const;
+
+    bool           operator==(const RayH3<R>& r) const;
+    bool           operator!=(const RayH3<R>& r) const;
+};
+
+template < class R >
+inline
+const typename RayH3<R>::Point_3 &
+RayH3<R>::source() const
+{ return get_pointee_or_identity(base).first; }
+
+template < class R >
+inline
+const typename RayH3<R>::Point_3 &
+RayH3<R>::start() const
+{ return get_pointee_or_identity(base).first; }
+
+template < class R >
+inline
+const typename RayH3<R>::Vector_3 &
+RayH3<R>::to_vector() const
+{
+  return get_pointee_or_identity(base).second;
+}
+
+template < class R >
+inline
+typename RayH3<R>::Direction_3
+RayH3<R>::direction() const
+{
+  return to_vector().direction();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename RayH3<R>::Point_3
+RayH3<R>::second_point() const
+{ return start() + to_vector(); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename RayH3<R>::Point_3
+RayH3<R>::point(int i) const
+{
+  CGAL_kernel_precondition( i >= 0 );
+  return start() + RT(i)*to_vector();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename RayH3<R>::Line_3
+RayH3<R>::supporting_line() const
+{
+  CGAL_kernel_precondition( !is_degenerate() );
+  return Line_3(start(), second_point() );
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+RayH3<R>
+RayH3<R>::opposite() const
+{ return RayH3<R>( start(), - direction() ); }
+
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+RayH3<R>::has_on(const typename RayH3<R>::Point_3 &p) const
+{
+  return ( (  p == start() )
+         ||(  Direction_3(p - start()) == direction() ) );
+}
+
+template < class R >
+inline                                      /* XXX */
+bool
+RayH3<R>::collinear_has_on(const typename RayH3<R>::Point_3 &p) const
+{ return has_on(p); }
+
+template < class R >
+inline
+bool
+RayH3<R>::is_degenerate() const
+{ return to_vector() == NULL_VECTOR; }
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+RayH3<R>::operator==(const RayH3<R>& r) const
+{ return ( (start() == r.start() )&&( direction() == r.direction() ) ); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+RayH3<R>::operator!=( const RayH3<R>& r) const
+{ return !operator==(r); }
+
+} //namespace CGAL
+
+#endif // CGAL_RAYH3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/SphereH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/SphereH3.h
new file mode 100644
index 0000000..bb79b5f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/SphereH3.h
@@ -0,0 +1,231 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_SPHEREH3_H
+#define CGAL_SPHEREH3_H
+
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Homogeneous/predicates_on_pointsH3.h>
+#include <boost/tuple/tuple.hpp>
+#include <CGAL/Kernel/global_functions_3.h>
+
+namespace CGAL {
+
+template <class R_>
+class SphereH3
+{
+   typedef typename R_::RT                   RT;
+   typedef typename R_::FT                   FT;
+   typedef typename R_::Point_3              Point_3;
+
+   typedef boost::tuple<Point_3, FT, Orientation>   Rep;
+   typedef typename R_::template Handle<Rep>::type  Base;
+
+   Base base;
+
+public:
+   typedef R_                R;
+
+      SphereH3() {}
+
+      SphereH3(const Point_3& p, const FT& sq_rad,
+               const Orientation& o = COUNTERCLOCKWISE);
+
+      SphereH3(const Point_3& p, const Point_3& q,
+               const Point_3& r, const Point_3& u);
+
+      SphereH3(const Point_3& p, const Point_3& q,
+               const Point_3& r,
+               const Orientation& o = COUNTERCLOCKWISE);
+
+      SphereH3(const Point_3&  p, const Point_3&  q,
+               const Orientation& o = COUNTERCLOCKWISE);
+
+      SphereH3(const Point_3&  p,
+               const Orientation& o = COUNTERCLOCKWISE);
+
+      bool
+      operator==(const SphereH3<R>&) const;
+
+      bool
+      operator!=(const SphereH3<R>& s) const
+      { return !(*this == s); }
+
+      const Point_3 & center() const;
+
+      const FT & squared_radius() const;
+
+      Orientation orientation() const;
+
+      bool is_degenerate() const;
+
+      SphereH3<R> opposite() const;
+
+      Oriented_side oriented_side(const Point_3& p) const;
+
+      bool
+      has_on_boundary(const Point_3& p) const
+      { return oriented_side(p)==ON_ORIENTED_BOUNDARY; }
+
+      bool
+      has_on_positive_side(const Point_3& p) const
+      { return oriented_side(p)==ON_POSITIVE_SIDE; }
+
+      bool
+      has_on_negative_side(const Point_3& p) const
+      { return oriented_side(p)==ON_NEGATIVE_SIDE; }
+
+      Bounded_side
+      bounded_side(const Point_3& p) const;
+
+      bool
+      has_on_bounded_side(const Point_3& p) const
+      { return bounded_side(p)==ON_BOUNDED_SIDE; }
+
+      bool
+      has_on_unbounded_side(const Point_3& p) const
+      { return bounded_side(p)==ON_UNBOUNDED_SIDE; }
+};
+
+
+template < class R >
+CGAL_KERNEL_INLINE
+SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& center,
+                      const FT& squared_radius,
+                      const Orientation& o)
+{
+  CGAL_kernel_precondition( !( squared_radius < FT(0))
+                          &&( o != COLLINEAR) );
+  base = Rep(center, squared_radius, o);
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& center,
+                      const Orientation& o)
+{
+  CGAL_kernel_precondition( ( o != COLLINEAR) );
+  base = Rep(center, FT(0), o);
+}
+
+template <class R>
+CGAL_KERNEL_MEDIUM_INLINE
+SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
+                      const typename SphereH3<R>::Point_3& q,
+                      const Orientation& o)
+{
+  CGAL_kernel_precondition( o != COLLINEAR);
+  Point_3 center = midpoint(p,q);
+  FT     squared_radius = squared_distance(p,center);
+  base = Rep(center, squared_radius, o);
+}
+
+template <class R>
+CGAL_KERNEL_MEDIUM_INLINE
+SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
+                      const typename SphereH3<R>::Point_3& q,
+                      const typename SphereH3<R>::Point_3& r,
+                      const Orientation& o)
+{
+  CGAL_kernel_precondition( o != COLLINEAR);
+  Point_3 center = circumcenter(p,q,r);
+  FT     squared_radius = squared_distance(p,center);
+  base = Rep(center, squared_radius, o);
+}
+
+template <class R>
+CGAL_KERNEL_MEDIUM_INLINE
+SphereH3<R>::SphereH3(const typename SphereH3<R>::Point_3& p,
+                      const typename SphereH3<R>::Point_3& q,
+                      const typename SphereH3<R>::Point_3& r,
+                      const typename SphereH3<R>::Point_3& s)
+{
+  Orientation o = CGAL::orientation(p,q,r,s);
+  CGAL_kernel_precondition( o != COLLINEAR);
+  Point_3 center = circumcenter(p,q,r,s);
+  FT     squared_radius = squared_distance(p,center);
+  base = Rep(center, squared_radius, o);
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+bool
+SphereH3<R>::operator==(const SphereH3<R>& s) const
+{
+   return    ( orientation() == s.orientation())
+          && ( center() == s.center())
+          && ( squared_radius() == s.squared_radius());
+}
+
+template <class R>
+inline
+const typename SphereH3<R>::Point_3 &
+SphereH3<R>::center() const
+{ return get_pointee_or_identity(base).template get<0>(); }
+
+template <class R>
+inline
+const typename SphereH3<R>::FT &
+SphereH3<R>::squared_radius() const
+{ return get_pointee_or_identity(base).template get<1>(); }
+
+template <class R>
+inline
+Orientation
+SphereH3<R>::orientation() const
+{ return get_pointee_or_identity(base).template get<2>(); }
+
+template <class R>
+inline
+bool
+SphereH3<R>::is_degenerate() const
+{ return squared_radius() <= FT(0) ; }
+
+template <class R>
+CGAL_KERNEL_MEDIUM_INLINE
+Oriented_side
+SphereH3<R>::oriented_side(const typename SphereH3<R>::Point_3& p) const
+{ return Oriented_side(bounded_side(p) * orientation()); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+Bounded_side
+SphereH3<R>::bounded_side(const typename SphereH3<R>::Point_3& p) const
+{
+  return Bounded_side(CGAL_NTS compare(squared_radius(),
+                                       squared_distance(center(),p)));
+}
+
+template <class R>
+inline
+SphereH3<R>
+SphereH3<R>::opposite() const
+{
+  return SphereH3<R>(center(), squared_radius(),
+                         CGAL::opposite(orientation()) );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_SPHEREH3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH2.h
new file mode 100644
index 0000000..cc87d30
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH2.h
@@ -0,0 +1,254 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+
+#ifndef CGAL_HOMOGENEOUS_VECTOR_2_h
+#define CGAL_HOMOGENEOUS_VECTOR_2_h
+
+#include <CGAL/Origin.h>
+#include <CGAL/array.h>
+#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
+#include <CGAL/Handle_for.h>
+
+#include <boost/next_prior.hpp>
+
+namespace CGAL {
+
+template < class R_ >
+class VectorH2
+{
+  typedef VectorH2<R_>                      Self;
+  typedef typename R_::FT                   FT;
+  typedef typename R_::RT                   RT;
+  typedef typename R_::Point_2              Point_2;
+  typedef typename R_::Segment_2            Segment_2;
+  typedef typename R_::Ray_2                Ray_2;
+  typedef typename R_::Line_2               Line_2;
+  typedef typename R_::Direction_2          Direction_2;
+  typedef typename R_::Vector_2             Vector_2;
+
+  typedef cpp11::array<RT, 3>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  typedef Rational_traits<FT>               Rat_traits;
+
+  Base base;
+
+public:
+
+  typedef const FT Cartesian_coordinate_type;
+  typedef const RT& Homogeneous_coordinate_type;
+  typedef Cartesian_const_iterator_d<typename Rep::const_iterator> Cartesian_const_iterator;
+
+  typedef R_                                    R;
+
+   VectorH2() {}
+
+   template < typename Tx, typename Ty >
+   VectorH2(const Tx & x, const Ty & y,
+            typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, RT>,
+                                                        boost::is_convertible<Ty, RT> > >::type* = 0)
+      : base(CGAL::make_array<RT>(x, y, RT(1))) {}
+
+   VectorH2(const FT& x, const FT& y)
+      : base(CGAL::make_array<RT>(
+             Rat_traits().numerator(x) * Rat_traits().denominator(y),
+             Rat_traits().numerator(y) * Rat_traits().denominator(x),
+             Rat_traits().denominator(x) * Rat_traits().denominator(y)))
+   {
+     CGAL_kernel_assertion(hw() > 0);
+   }
+
+   VectorH2(const RT& x, const RT& y, const RT& w )
+     : base( w >= RT(0) ? CGAL::make_array( x,  y,  w)
+                        : CGAL::make_array<RT>(-x, -y, -w) ) {}
+
+  const Self&
+  rep() const
+  {
+    return static_cast<const Self& >(*this);
+  }
+  
+   bool    operator==( const VectorH2<R>& v) const;
+   bool    operator!=( const VectorH2<R>& v) const;
+   bool    operator==( const Null_vector&) const;
+   bool    operator!=( const Null_vector& v) const;
+
+   const RT & hx() const { return CGAL::get_pointee_or_identity(base)[0]; };
+   const RT & hy() const { return CGAL::get_pointee_or_identity(base)[1]; };
+   const RT & hw() const { return CGAL::get_pointee_or_identity(base)[2]; };
+
+   FT      x()  const { return FT(hx()) / FT(hw()); };
+   FT      y()  const { return FT(hy()) / FT(hw()); };
+
+   FT      cartesian(int i)   const;
+   const RT & homogeneous(int i) const;
+   FT      operator[](int i)  const;
+
+   Cartesian_const_iterator cartesian_begin() const
+   {
+     return make_cartesian_const_iterator_begin(CGAL::get_pointee_or_identity(base).begin(),
+                                                boost::prior(CGAL::get_pointee_or_identity(base).end()));
+   }
+
+   Cartesian_const_iterator cartesian_end() const
+   {
+     return make_cartesian_const_iterator_end(boost::prior(CGAL::get_pointee_or_identity(base).end()));
+   }
+
+   int     dimension() const;
+   Direction_2 direction() const;
+   Vector_2 perpendicular(const Orientation& o ) const;
+
+  //   Vector_2 operator+(const VectorH2 &v) const;
+   Vector_2 operator-(const VectorH2 &v) const;
+   Vector_2 operator-() const;
+   Vector_2 opposite() const;
+   FT squared_length() const;
+  //   Vector_2 operator/(const RT &f) const;
+  //Vector_2 operator/(const FT &f) const;
+
+// undocumented:
+   VectorH2(const Direction_2 & dir)
+      : base ( dir) {}
+
+  VectorH2(const Point_2 & p)
+     : base ( p) {}
+};
+
+template < class R >
+inline
+bool
+VectorH2<R>::operator==( const Null_vector&) const
+{ return (hx() == RT(0)) && (hy() == RT(0)); }
+
+template < class R >
+inline
+bool
+VectorH2<R>::operator!=( const Null_vector& v) const
+{ return !(*this == v); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+VectorH2<R>::operator==( const VectorH2<R>& v) const
+{
+  return (  (hx() * v.hw() == v.hx() * hw() )
+          &&(hy() * v.hw() == v.hy() * hw() ) );
+}
+
+template < class R >
+inline
+bool
+VectorH2<R>::operator!=( const VectorH2<R>& v) const
+{ return !(*this == v); }  /* XXX */
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename VectorH2<R>::FT
+VectorH2<R>::cartesian(int i) const
+{
+  CGAL_kernel_precondition( (i==0 || i==1) );
+  if (i==0)
+      return x();
+  return y();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+const typename VectorH2<R>::RT &
+VectorH2<R>::homogeneous(int i) const
+{
+  CGAL_kernel_precondition( (i>=0) && (i<=2) );
+  return CGAL::get_pointee_or_identity(base)[i];
+}
+
+template < class R >
+inline
+typename VectorH2<R>::FT
+VectorH2<R>::operator[](int i) const
+{ return cartesian(i); }
+
+template < class R >
+inline
+int
+VectorH2<R>::dimension() const
+{ return 2; }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename VectorH2<R>::Direction_2
+VectorH2<R>::direction() const
+{ return Direction_2(hx(), hy()); }
+
+template < class R >
+inline
+typename VectorH2<R>::Vector_2
+VectorH2<R>::operator-() const
+{ return VectorH2<R>(- hx(), - hy(), hw() ); }
+
+template < class R >
+inline
+typename VectorH2<R>::Vector_2
+VectorH2<R>::opposite() const
+{ return VectorH2<R>(- hx(), - hy(), hw() ); }
+
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename VectorH2<R>::Vector_2
+VectorH2<R>::operator-(const VectorH2<R>& v) const
+{
+  return VectorH2<R>( hx()*v.hw() - v.hx()*hw(),
+                      hy()*v.hw() - v.hy()*hw(),
+                      hw()*v.hw() );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename VectorH2<R>::FT
+VectorH2<R>::squared_length() const
+{
+  typedef typename R::FT FT;
+  return 
+    FT( CGAL_NTS square(hx()) + CGAL_NTS square(hy()) ) / 
+    FT( CGAL_NTS square(hw()) );
+}
+
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename R::Vector_2
+VectorH2<R>::perpendicular(const Orientation& o) const
+{
+  CGAL_kernel_precondition(o != COLLINEAR);
+  if (o == COUNTERCLOCKWISE)
+      return typename R::Vector_2(-hy(), hx(), hw());
+  else
+      return typename R::Vector_2(hy(), -hx(), hw());
+}
+
+} //namespace CGAL
+
+#endif // CGAL_HOMOGENEOUS_VECTOR_2_h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH3.h
new file mode 100644
index 0000000..6c50ebc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/VectorH3.h
@@ -0,0 +1,249 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Stefan Schirra
+ 
+#ifndef CGAL_HOMOGENEOUS_VECTOR_3_H
+#define CGAL_HOMOGENEOUS_VECTOR_3_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/array.h>
+#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
+
+#include <boost/next_prior.hpp>
+
+namespace CGAL {
+
+template < class R_ >
+class VectorH3
+{
+  typedef typename R_::RT                   RT;
+  typedef typename R_::FT                   FT;
+  typedef typename R_::Point_3              Point_3;
+  typedef typename R_::Vector_3             Vector_3;
+  typedef typename R_::Segment_3            Segment_3;
+  typedef typename R_::Ray_3                Ray_3;
+  typedef typename R_::Line_3               Line_3;
+  typedef typename R_::Direction_3          Direction_3;
+
+  typedef cpp11::array<RT, 4>               Rep;
+  typedef typename R_::template Handle<Rep>::type  Base;
+
+  typedef Rational_traits<FT>               Rat_traits;
+
+  Base base;
+
+public:
+
+  typedef Cartesian_const_iterator_d<typename Rep::const_iterator> Cartesian_const_iterator;
+
+  typedef R_                 R;
+
+  VectorH3() {}
+
+  VectorH3(const Point_3& a, const Point_3& b)
+  { *this = R().construct_vector_3_object()(a, b); }
+
+  VectorH3(const Segment_3& s)
+  { *this = R().construct_vector_3_object()(s); }
+
+  VectorH3(const Ray_3& r)
+  { *this = R().construct_vector_3_object()(r); }
+
+  VectorH3(const Line_3& l)
+  { *this = R().construct_vector_3_object()(l); }
+
+  VectorH3(const Null_vector&)
+    : base(CGAL::make_array(RT(0), RT(0), RT(0), RT(1))) {}
+
+  template < typename Tx, typename Ty, typename Tz >
+  VectorH3(const Tx & x, const Ty & y, const Tz & z,
+           typename boost::enable_if< boost::mpl::and_< boost::mpl::and_< boost::is_convertible<Tx, RT>,
+                                                                          boost::is_convertible<Ty, RT> >,
+                                                        boost::is_convertible<Tz, RT> > >::type* = 0)
+    : base(CGAL::make_array<RT>(x, y, z, RT(1))) {}
+
+  VectorH3(const FT& x, const FT& y, const FT& z)
+    : base(CGAL::make_array<RT>(
+           Rat_traits().numerator(x) * Rat_traits().denominator(y)
+                                     * Rat_traits().denominator(z),
+           Rat_traits().numerator(y) * Rat_traits().denominator(x)
+                                     * Rat_traits().denominator(z),
+           Rat_traits().numerator(z) * Rat_traits().denominator(x)
+                                     * Rat_traits().denominator(y),
+           Rat_traits().denominator(x) * Rat_traits().denominator(y)
+                                       * Rat_traits().denominator(z)))
+  {
+    CGAL_kernel_assertion(hw() > 0);
+  }
+
+  VectorH3(const RT& x, const RT& y, const RT& z, const RT& w)
+    : base( w >= RT(0) ? CGAL::make_array(x, y, z, w)
+                       : CGAL::make_array<RT>(-x, -y, -z, -w) ) {}
+
+  const RT & hx() const { return get_pointee_or_identity(base)[0]; }
+  const RT & hy() const { return get_pointee_or_identity(base)[1]; }
+  const RT & hz() const { return get_pointee_or_identity(base)[2]; }
+  const RT & hw() const { return get_pointee_or_identity(base)[3]; }
+  FT    x()  const { return FT(hx())/FT(hw()); }
+  FT    y()  const { return FT(hy())/FT(hw()); }
+  FT    z()  const { return FT(hz())/FT(hw()); }
+  const RT & homogeneous(int i) const;
+  FT    cartesian(int i) const;
+  FT    operator[](int i) const;
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return make_cartesian_const_iterator_begin(get_pointee_or_identity(base).begin(),
+                                               boost::prior(get_pointee_or_identity(base).end()));
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return make_cartesian_const_iterator_end(boost::prior(get_pointee_or_identity(base).end()));
+  }
+
+  int   dimension() const { return 3; };
+
+  Direction_3 direction() const;
+
+  Vector_3 operator-() const;
+
+  bool  operator==( const VectorH3<R>& v) const;
+  bool  operator!=( const VectorH3<R>& v) const;
+
+  Vector_3 operator+( const VectorH3 &v) const;
+  Vector_3 operator-( const VectorH3 &v) const;
+  FT squared_length() const;
+  Vector_3 operator/( const RT &f) const;
+  Vector_3 operator/( const FT &f) const;
+};
+
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename VectorH3<R>::FT
+VectorH3<R>::cartesian(int i) const
+{
+  CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
+  switch (i)
+  {
+      case 0:   return x();
+      case 1:   return y();
+  }
+  return z();
+}
+
+template < class R >
+CGAL_KERNEL_INLINE
+const typename VectorH3<R>::RT &
+VectorH3<R>::homogeneous(int i) const
+{
+  CGAL_kernel_precondition(i == 0 || i == 1 || i == 2 || i == 3);
+  return get_pointee_or_identity(base)[i];
+}
+
+template < class R >
+inline
+typename VectorH3<R>::Direction_3
+VectorH3<R>::direction() const
+{ return Direction_3(hx(), hy(), hz()); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+bool
+VectorH3<R>::operator==( const VectorH3<R>& v) const
+{
+ return ( (hx() * v.hw() == v.hx() * hw() )
+        &&(hy() * v.hw() == v.hy() * hw() )
+        &&(hz() * v.hw() == v.hz() * hw() ) );
+}
+
+template < class R >
+inline
+bool
+VectorH3<R>::operator!=( const VectorH3<R>& v) const
+{ return !(*this == v); }
+
+template < class R >
+inline
+typename VectorH3<R>::FT
+VectorH3<R>::operator[](int i) const
+{ return cartesian(i); }
+
+template < class R >
+CGAL_KERNEL_INLINE
+typename VectorH3<R>::Vector_3
+VectorH3<R>::operator-() const
+{ return Vector_3( - hx(), - hy(), -hz(), hw() ); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename R::Vector_3
+VectorH3<R>::operator+(const VectorH3<R>& v) const
+{
+  return typename R::Vector_3(hx()*v.hw() + v.hx()*hw(),
+                              hy()*v.hw() + v.hy()*hw(),
+                              hz()*v.hw() + v.hz()*hw(),
+                              hw()*v.hw() );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename R::Vector_3
+VectorH3<R>::operator-(const VectorH3<R>& v) const
+{
+  return typename R::Vector_3(hx()*v.hw() - v.hx()*hw(),
+                              hy()*v.hw() - v.hy()*hw(),
+                              hz()*v.hw() - v.hz()*hw(),
+                              hw()*v.hw() );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename VectorH3<R>::FT
+VectorH3<R>::squared_length() const
+{
+  typedef typename R::FT FT;
+  return 
+    FT( CGAL_NTS square(hx()) + 
+	CGAL_NTS square(hy()) + 
+	CGAL_NTS square(hz()) ) / 
+    FT( CGAL_NTS square(hw()) );
+}
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename R::Vector_3
+VectorH3<R>::operator/(const typename VectorH3<R>::RT& f) const
+{ return typename R::Vector_3( hx(), hy(), hz(), hw()*f ); }
+
+template <class R>
+CGAL_KERNEL_INLINE
+typename R::Vector_3
+VectorH3<R>::operator/(const typename VectorH3<R>::FT& f) const
+{ return typename R::Vector_3(hx()*f.denominator(), hy()*f.denominator(),
+		              hz()*f.denominator(), hw()*f.numerator() ); }
+
+} //namespace CGAL
+
+#endif // CGAL_HOMOGENEOUS_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/basic_constructionsH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/basic_constructionsH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/basic_constructionsH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/basic_constructionsH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/basic_constructionsH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/basic_constructionsH3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/basic_constructionsH3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/basic_constructionsH3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/distance_predicatesH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/distance_predicatesH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/distance_predicatesH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/distance_predicatesH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/distance_predicatesH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/distance_predicatesH3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/distance_predicatesH3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/distance_predicatesH3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/function_objects.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_directionsH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_directionsH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_directionsH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_directionsH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_pointsH2.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_pointsH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_pointsH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_pointsH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_pointsH3.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_pointsH3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous/predicates_on_pointsH3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous/predicates_on_pointsH3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Homogeneous_d.h b/3rdparty/CGAL-4.8/include/CGAL/Homogeneous_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Homogeneous_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Homogeneous_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hyperbola_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hyperbola_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hyperbola_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hyperbola_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hyperbola_ray_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hyperbola_ray_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hyperbola_ray_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hyperbola_ray_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Hyperbola_segment_2.h b/3rdparty/CGAL-4.8/include/CGAL/Hyperbola_segment_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Hyperbola_segment_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Hyperbola_segment_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IEEE_754_unions.h b/3rdparty/CGAL-4.8/include/CGAL/IEEE_754_unions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IEEE_754_unions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IEEE_754_unions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_iostream.h
new file mode 100644
index 0000000..d27a2d3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_iostream.h
@@ -0,0 +1,122 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein           <wein at post.tau.ac.il>
+//                 (based on old version by Michal Meyerovitch and Ester Ezra)
+
+#ifndef CGAL_ARR_IOSTREAM_H
+#define CGAL_ARR_IOSTREAM_H
+
+/*! \file
+ * Definition of the I/O operators for the class-template
+ * Arrangement_on_surface_2<GeomTraits,TopTraits>.
+ */
+
+#include <CGAL/Arrangement_on_surface_2.h>
+#include <CGAL/IO/Arr_text_formatter.h>
+#include <CGAL/IO/Arrangement_2_writer.h>
+#include <CGAL/IO/Arrangement_2_reader.h>
+#include <iostream>
+
+namespace CGAL {
+
+/*!
+ * Write an arrangement to an output stream using a given formatter.
+ * \param arr The arrangement.
+ * \param os The output stream.
+ * \param format The formatter.
+ */
+template <class GeomTraits, class TopTraits, class Formatter>
+std::ostream&
+    write (const Arrangement_on_surface_2<GeomTraits,TopTraits>& arr,
+           std::ostream& os,
+           Formatter& format)
+{
+  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
+  typedef Arrangement_2_writer<Arrangement_2>             Arr_writer;
+
+  Arr_writer      writer (arr);
+
+  format.set_out (os);
+  writer (format);
+  return (os);
+}
+
+/*!
+ * Output operator (importer).
+ * \param os The output stream.
+ * \param arr The arrangement.
+ */
+template <class GeomTraits, class TopTraits>
+std::ostream&
+    operator<< (std::ostream& os,
+                const Arrangement_on_surface_2<GeomTraits,TopTraits>& arr)
+{
+  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
+  typedef Arrangement_2_writer<Arrangement_2>             Arr_writer;
+  typedef Arr_text_formatter<Arrangement_2>               Text_formatter;
+
+  Text_formatter text_format (os);
+  Arr_writer      writer (arr);
+
+  writer (text_format);
+  return (os);
+}
+
+/*!
+ * Read an arrangement from an input stream using a given formatter.
+ * \param arr The arrangement.
+ * \param os The output stream.
+ * \param format The formatter.
+ */
+template <class GeomTraits, class TopTraits, class Formatter>
+std::istream&
+    read (Arrangement_on_surface_2<GeomTraits,TopTraits>& arr,
+          std::istream& is,
+          Formatter& format)
+{
+  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
+  typedef Arrangement_2_reader<Arrangement_2>             Arr_reader;
+
+  Arr_reader      reader(arr);
+
+  format.set_in (is);
+  reader (format);
+  return (is);
+}
+
+/*!
+ * Output operator (exporter).
+ * \param is The input stream.
+ * \param arr The arrangement.
+ */
+template <class GeomTraits, class TopTraits>
+std::istream&
+    operator>> (std::istream& is,
+                Arrangement_on_surface_2<GeomTraits,TopTraits>& arr)
+{
+  typedef Arrangement_on_surface_2<GeomTraits,TopTraits>  Arrangement_2;
+  typedef Arrangement_2_reader<Arrangement_2>             Arr_reader;
+  typedef Arr_text_formatter<Arrangement_2>               Text_formatter;
+
+  Text_formatter text_format (is);
+  Arr_reader      reader(arr);
+
+  reader (text_format);
+  return (is);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_text_formatter.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_text_formatter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_text_formatter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_text_formatter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_2_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_2_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_2_reader.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_2_reader.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_2_writer.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_2_writer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_2_writer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_2_writer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_iostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_iostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_iostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_text_formatter.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_text_formatter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arr_with_history_text_formatter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arr_with_history_text_formatter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Arrangement_2_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arrangement_2_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Arrangement_2_reader.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Arrangement_2_reader.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Arrangement_2_writer.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Arrangement_2_writer.h
new file mode 100644
index 0000000..853a8ba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Arrangement_2_writer.h
@@ -0,0 +1,340 @@
+// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein           <wein at post.tau.ac.il>
+//                 (based on old version by Michal Meyerovitch and Ester Ezra)
+//
+#ifndef CGAL_IO_ARRANGEMENT_2_WRITER_H
+#define CGAL_IO_ARRANGEMENT_2_WRITER_H
+
+/*! \file
+ * The header file for the Arrangement_2_writer<Arrangement> class.
+ */
+
+#include <CGAL/Arr_accessor.h>
+#include <map>
+
+namespace CGAL {
+
+  /*! \class
+   * An auxiliary class for writing an arrangement to an output stream.
+   */
+  template <class Arrangement_>
+  class Arrangement_2_writer
+  {
+  public:
+
+    typedef Arrangement_                                  Arrangement_2;
+    typedef Arrangement_2_writer<Arrangement_2>           Self;
+
+  protected:
+
+    typedef typename Arrangement_2::Size                  Size;
+    typedef typename Arrangement_2::Dcel                  Dcel;
+
+    typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
+    typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
+    typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+
+    typedef CGAL::Arr_accessor<Arrangement_2>             Arr_accessor;
+    typedef typename Arr_accessor::Dcel_vertex_iterator   Vertex_const_iterator;
+    typedef typename Arr_accessor::Dcel_edge_iterator     Edge_const_iterator;
+    typedef typename Arr_accessor::Dcel_face_iterator     Face_const_iterator;
+
+    typedef typename Arr_accessor::Dcel_outer_ccb_iterator
+      Outer_ccb_iterator;
+    typedef typename Arr_accessor::Dcel_inner_ccb_iterator
+      Inner_ccb_iterator;
+    typedef typename Arr_accessor::Dcel_iso_vertex_iterator
+      Isolated_vertex_iterator;
+
+    typedef typename Arr_accessor::Dcel_vertex            DVertex;
+    typedef typename Arr_accessor::Dcel_halfedge          DHalfedge;
+    typedef typename Arr_accessor::Dcel_face              DFace;
+    typedef std::map<const DVertex*, int>                 Vertex_index_map;
+    typedef std::map<const DHalfedge*, int>               Halfedge_index_map;
+
+    // Data memebrs:
+    const Arrangement_2&   m_arr;
+    const Dcel*            m_dcel;
+    int                    m_curr_v;
+    Vertex_index_map       m_v_index;
+    int                    m_curr_he;
+    Halfedge_index_map     m_he_index;
+
+  private:
+
+    // Copy constructor and assignment operator - not supported.
+    Arrangement_2_writer(const Self&);
+    Self& operator= (const Self&);
+
+  public:
+
+    /*! Constructor. */
+    Arrangement_2_writer(const Arrangement_2& arr) :
+      m_arr(arr),
+      m_dcel(NULL),
+      m_curr_v(0),
+      m_curr_he(0)
+    {
+      const Arr_accessor     arr_access(const_cast<Arrangement_2&>(arr));
+      m_dcel = &(arr_access.dcel());
+    }
+
+    /*! Destructor. */
+    virtual ~Arrangement_2_writer()
+    {}
+
+    /*! Write the arrangement. */
+    template <class Formatter>
+    void operator()(Formatter& formatter)
+    {
+      formatter.write_arrangement_begin();
+      formatter.write_size("number_of_vertices",
+                           m_dcel->size_of_vertices());
+      formatter.write_size("number_of_edges",
+                           m_dcel->size_of_halfedges() / 2);
+      formatter.write_size("number_of_faces",
+                           m_dcel->size_of_faces());
+
+      // Reset indices.
+      m_curr_v = 0;
+      m_curr_he = 0;
+
+      // Write the vertices.
+      formatter.write_vertices_begin();
+      Vertex_const_iterator  vit;
+      for (vit = m_dcel->vertices_begin(); vit != m_dcel->vertices_end(); ++vit)
+      {
+        _write_vertex(formatter, vit);
+      }
+      formatter.write_vertices_end();
+
+      // Write the edges.
+      formatter.write_edges_begin();
+      Edge_const_iterator    eit;
+      for (eit = m_dcel->edges_begin(); eit != m_dcel->edges_end(); ++eit)
+      {
+        _write_edge(formatter, eit);
+      }
+      formatter.write_edges_end();
+
+      // Write the faces (the fictitious face first).
+      formatter.write_faces_begin();
+
+      Face_const_iterator    fit;
+      for (fit = m_dcel->faces_begin(); fit != m_dcel->faces_end(); ++fit)
+        _write_face(formatter, fit);
+      formatter.write_faces_end();
+
+      formatter.write_arrangement_end();
+    }
+
+  protected:
+
+    /*! Write a vertex. */
+    template <class Formatter>
+    void _write_vertex(Formatter& formatter, Vertex_const_iterator vit)
+    {
+      // Map the current vertex to its index.
+      const DVertex* v = &(*vit);
+
+      m_v_index[v] = m_curr_v;
+      ++m_curr_v;
+
+      // Write the vertex.
+      formatter.write_vertex_begin();
+      formatter.write_vertex_index(static_cast<int>(v->parameter_space_in_x()));
+      formatter.write_vertex_index(static_cast<int>(v->parameter_space_in_y()));
+
+      if (! v->has_null_point())
+      {
+        // Write the associated point.
+        formatter.write_vertex_index(1);
+        formatter.write_point(v->point());
+
+        // Write additional user-defined data.
+        formatter.write_vertex_data(Vertex_const_handle(v));
+      }
+      else
+      {
+        // Mark that the vertex is not associated with a point.
+        formatter.write_vertex_index(0);
+      }
+
+      formatter.write_vertex_end();
+    }
+
+    /*! Write an edge (a pair of halfedges). */
+    template <class Formatter>
+    void _write_edge(Formatter& formatter, Edge_const_iterator hit)
+    {
+      // Map the halfedge and its twin to their indices.
+      const DHalfedge* he = &(*hit);
+      const DHalfedge* he_t = he->opposite();
+
+      m_he_index[&(*he)] = m_curr_he;
+      ++m_curr_he;
+      m_he_index[&(*he_t)] = m_curr_he;
+      ++m_curr_he;
+
+      // Write the edge.
+      formatter.write_edge_begin();
+      formatter.write_vertex_index(_index(he_t->vertex()));
+      formatter.write_vertex_index(_index(he->vertex()));
+
+      if (he->direction() == ARR_LEFT_TO_RIGHT)
+        formatter.write_vertex_index(0);
+      else
+        formatter.write_vertex_index(1);
+
+      if (! he->has_null_curve())
+      {
+        // Write the associated curve.
+        formatter.write_vertex_index(1);
+        formatter.write_x_monotone_curve(he->curve());
+
+        // Write additional user-defined data.
+        formatter.write_halfedge_data(Halfedge_const_handle(he));
+        formatter.write_halfedge_data(Halfedge_const_handle(he_t));
+      }
+      else
+      {
+        // Mark that the edge is fictitious.
+        formatter.write_vertex_index(0);
+      }
+      formatter.write_edge_end();
+    }
+
+    /*! Write a face. */
+    template <class Formatter>
+    void _write_face(Formatter& formatter, Face_const_iterator fit) const
+    {
+      const DFace* f = &(*fit);
+
+      formatter.write_face_begin();
+
+      // Write whether the face is unbounded and whether it is valid
+      // (non-fictitious).
+      if (f->is_unbounded())
+        formatter.write_vertex_index(1);
+      else
+        formatter.write_vertex_index(0);
+
+      if (! f->is_fictitious())
+        formatter.write_vertex_index(1);
+      else
+        formatter.write_vertex_index(0);
+
+      // Write the outer CCBs of the face.
+      const std::size_t    n_occbs = f->number_of_outer_ccbs();
+      Outer_ccb_iterator   oc_it;
+
+      formatter.write_outer_ccbs_begin();
+      formatter.write_size("number_of_outer_ccbs", n_occbs);
+      for (oc_it = f->outer_ccbs_begin();
+           oc_it != f->outer_ccbs_end(); ++oc_it)
+      {
+        const std::size_t              n = _circulator_size(*oc_it);
+
+        formatter.write_size("halfedges_on_outer_ccb", n);
+        _write_ccb(formatter, *oc_it);
+      }
+      formatter.write_inner_ccbs_end();
+
+      // Write the inner CCBs of the face.
+      const std::size_t    n_iccbs = f->number_of_inner_ccbs();
+      Inner_ccb_iterator   ic_it;
+
+      formatter.write_inner_ccbs_begin();
+      formatter.write_size("number_of_inner_ccbs", n_iccbs);
+      for (ic_it = f->inner_ccbs_begin(); ic_it != f->inner_ccbs_end(); ++ic_it)
+      {
+        const std::size_t n = _circulator_size(*ic_it);
+        formatter.write_size("halfedges_on_inner_ccb", n);
+        _write_ccb(formatter, *ic_it);
+      }
+      formatter.write_inner_ccbs_end();
+
+      // Write the isolated vertices inside the face.
+      std::size_t n_isolated = f->number_of_isolated_vertices();
+      formatter.write_size("number_of_isolated_vertices", n_isolated);
+      if (n_isolated) {
+        formatter.write_isolated_vertices_begin();
+        Isolated_vertex_iterator iso_vit;
+        for (iso_vit = f->isolated_vertices_begin();
+             iso_vit != f->isolated_vertices_end(); ++iso_vit)
+          formatter.write_vertex_index(_index(&(*iso_vit)));
+        formatter.write_isolated_vertices_end();
+      }
+
+      // Write additional user-defined data associated with the face.
+      if (! f->is_fictitious())
+        formatter.write_face_data(Face_const_handle(f));
+
+      formatter.write_face_end();
+    }
+
+    /*! Write the edges along a given CCB. */
+    template <class Formatter>
+    void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const
+    {
+      const DHalfedge* curr = ccb;
+
+      formatter.write_ccb_halfedges_begin();
+      do {
+        formatter.write_halfedge_index(_index(curr));
+        curr = curr->next();
+      } while (curr != ccb);
+      formatter.write_ccb_halfedges_end();
+    }
+
+    /*! Get the mapped index of a given vertex. */
+    int _index(const DVertex* v) const
+    {
+      typename Vertex_index_map::const_iterator   pos = m_v_index.find(v);
+
+      CGAL_assertion(pos != m_v_index.end());
+      return (pos->second);
+    }
+
+    /*! Get the mapped index of a given halfegde. */
+    int _index(const DHalfedge* he) const
+    {
+      typename Halfedge_index_map::const_iterator  pos = m_he_index.find(he);
+
+      CGAL_assertion(pos != m_he_index.end());
+      return (pos->second);
+    }
+
+    /*! Get the number of edges along a given CCB. */
+    std::size_t _circulator_size(const DHalfedge* ccb) const
+    {
+      CGAL_assertion(ccb != NULL);
+
+      std::size_t       n = 0;
+      const DHalfedge*  curr = ccb;
+
+      do {
+        ++n;
+        curr = curr->next();
+      } while (curr != ccb);
+
+      return (n);
+    }
+  };
+
+} //namespace CGAL
+
+#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Color.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Color.h
new file mode 100644
index 0000000..2696ce8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Color.h
@@ -0,0 +1,104 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#include <CGAL/config.h>
+
+#ifndef CGAL_COLOR_H
+#define CGAL_COLOR_H
+
+namespace CGAL {
+
+class Color {
+public:
+  Color() {}
+  Color(unsigned char red,
+	unsigned char green,
+	unsigned char blue,
+	unsigned char alpha = 120)
+    : _red(red), _green(green), _blue(blue), _alpha(alpha)
+  {}
+
+  unsigned char r() const {return _red;}
+  unsigned char g() const {return _green;}
+  unsigned char b() const {return _blue;}
+
+  unsigned char red() const {return _red;}
+  unsigned char green() const {return _green;}
+  unsigned char blue() const {return _blue;}
+  unsigned char alpha() const {return _alpha;}
+  void set_alpha(unsigned char a) {_alpha=a;}
+  bool operator==(const Color &c) const
+  {
+    return ( (red() == c.red()) &&
+             (green() == c.green()) &&
+             (blue() == c.blue()) );
+  }
+
+  bool operator!=(const Color &c) const
+  {
+    return !( (*this) == c);
+  }
+
+  Color& operator=(const Color &c)
+  {
+    _red = c.red();
+    _green = c.green();
+    _blue = c.blue();
+    _alpha = c.alpha();
+    return *this;
+  }
+
+private:
+  unsigned char _red;
+  unsigned char _green;
+  unsigned char _blue;
+  unsigned char _alpha;
+};
+
+#ifndef CGAL_HEADER_ONLY
+
+CGAL_EXPORT extern const Color BLACK  ;
+CGAL_EXPORT extern const Color WHITE  ;
+CGAL_EXPORT extern const Color GRAY   ;
+
+CGAL_EXPORT extern const Color RED    ;
+CGAL_EXPORT extern const Color GREEN  ;
+
+CGAL_EXPORT extern const Color DEEPBLUE;
+CGAL_EXPORT extern const Color BLUE   ;
+CGAL_EXPORT extern const Color PURPLE ;
+CGAL_EXPORT extern const Color VIOLET ;
+
+CGAL_EXPORT extern const Color ORANGE ;
+CGAL_EXPORT extern const Color YELLOW ;
+
+#endif // CGAL_HEADER_ONLY
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/Color_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif  // CGAL_COLOR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Color_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Color_impl.h
new file mode 100644
index 0000000..cfca8de
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Color_impl.h
@@ -0,0 +1,42 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Hervé Brönnimann
+
+namespace CGAL {
+
+const Color BLACK  = Color(0, 0, 0);
+const Color WHITE  = Color(255, 255, 255);
+const Color GRAY   = Color(100,100,100);
+
+const Color GREEN  = Color(0, 255, 0);
+
+const Color DEEPBLUE   = Color(10, 0, 100);
+const Color BLUE   = Color(0, 0, 255);
+const Color VIOLET = Color(255, 0, 255);
+const Color PURPLE = Color(100, 0, 70);
+
+const Color RED    = Color(255, 0, 0);
+const Color ORANGE = Color(235, 150, 0);
+const Color YELLOW = Color(255, 255, 0);
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h
new file mode 100644
index 0000000..07dbffb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h
@@ -0,0 +1,193 @@
+// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008       GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
+#define CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
+
+#include <CGAL/Modifier_base.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+
+#include <stack>
+#include <set>
+
+namespace CGAL {
+
+template <class C2T3, class Polyhedron_>
+class Complex_2_in_triangulation_3_polyhedron_builder
+  : public CGAL::Modifier_base<typename Polyhedron_::HalfedgeDS>
+{
+public:
+  typedef C2T3 C2t3;
+  typedef Polyhedron_ Polyhedron;
+  typedef typename Polyhedron::HalfedgeDS HDS;
+
+private:
+  typedef typename C2T3::Triangulation Tr;
+
+  const C2t3& c2t3;
+  typedef CGAL::Modifier_base<typename Polyhedron::HalfedgeDS> Base;
+
+  template <class IBuilder, class Vertex_handle>
+  int get_vertex_index(IBuilder& builder, Vertex_handle vh, std::map<Vertex_handle, int>& V, int& inum)
+  {
+    typedef typename std::map<Vertex_handle, int>::iterator map_iterator;
+    std::pair<map_iterator,bool> insert_res = V.insert( std::make_pair(vh,inum) );
+    if ( insert_res.second ){
+      typename Tr::Point p = static_cast<typename Tr::Point>(vh->point());
+      builder.add_vertex(p);
+      ++inum;
+    }
+    return insert_res.first->second;
+  }
+
+public:
+  Complex_2_in_triangulation_3_polyhedron_builder(const C2t3& c2t3)
+    : Base(), c2t3(c2t3)
+  {
+  }
+
+  void operator()(HDS& hds) {
+    typedef typename Tr::Vertex_handle Vertex_handle;
+    typedef typename Tr::Geom_traits::Vector_3 Vector;
+    typedef typename Tr::Edge Edge;
+    typedef typename Tr::Facet Facet;
+    typedef typename Tr::Finite_facets_iterator Finite_facets_iterator;
+
+    const Tr& tr = c2t3.triangulation();
+    CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds, true);
+    const typename Tr::size_type number_of_facets = c2t3.number_of_facets();
+    builder.begin_surface(tr.number_of_vertices(),
+			  number_of_facets);
+    {
+      // Finite vertices coordinates.
+      Finite_facets_iterator fit = tr.finite_facets_begin();
+      std::set<Facet> oriented_set;
+      std::stack<Facet> stack;
+
+      CGAL_assertion_code(typename Tr::size_type nb_facets = 0; )
+
+      while (oriented_set.size() != number_of_facets) {
+        while ( fit->first->is_facet_on_surface(fit->second) == false ||
+                oriented_set.find(*fit) != oriented_set.end() ||
+
+                oriented_set.find(c2t3.opposite_facet(*fit)) !=
+                oriented_set.end() ) {
+          ++fit;
+        }
+        oriented_set.insert(*fit);
+        stack.push(*fit);
+        while(! stack.empty() ) {
+          Facet f = stack.top();
+          stack.pop();
+          for(int ih = 0 ; ih < 3 ; ++ih) {
+            const int i1  = tr.vertex_triple_index(f.second, tr. cw(ih));
+            const int i2  = tr.vertex_triple_index(f.second, tr.ccw(ih));
+            if( c2t3.face_status(Edge(f.first, i1, i2)) == C2t3::REGULAR ) {
+              Facet fn = c2t3.neighbor(f, ih);
+              if (oriented_set.find(fn) == oriented_set.end() &&
+                  oriented_set.find(c2t3.opposite_facet(fn)) == oriented_set.end())
+              {
+                oriented_set.insert(fn);
+                stack.push(fn);
+              }
+            } // end "if the edge is regular"
+          } // end "for each neighbor of f"
+        } // end "stack non empty"
+      } // end "oriented_set not full"
+
+      // Orients the whole mesh towards outside:
+      // - find the facet with max z
+      typename std::set<Facet>::const_iterator top_facet = oriented_set.begin();
+      for(typename std::set<Facet>::const_iterator fit = oriented_set.begin();
+	  fit != oriented_set.end();
+	  ++fit)
+      {
+	double top_z = 
+	  (top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0))->point().z()
+	 + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1))->point().z()
+	 + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2))->point().z())/3.;
+	double z = 
+	  (fit->first->vertex(tr.vertex_triple_index(fit->second, 0))->point().z()
+	 + fit->first->vertex(tr.vertex_triple_index(fit->second, 1))->point().z()
+	 + fit->first->vertex(tr.vertex_triple_index(fit->second, 2))->point().z())/3.;
+        if (top_z < z)
+          top_facet = fit;
+      }
+      // - orient the facet with max z towards +Z axis
+      Vertex_handle v0 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0));
+      Vertex_handle v1 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1));
+      Vertex_handle v2 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2));
+      Vector normal = cross_product(v1->point()-v0->point(), v2->point()-v1->point());
+      const Vector Z(0, 0, 1);
+      bool regular_orientation = (Z * normal >= 0);
+
+      //used to set indices of vertices
+      std::map<Vertex_handle, int> V;
+      int inum = 0;
+      
+      for(typename std::set<Facet>::const_iterator fit =
+	    oriented_set.begin();
+	  fit != oriented_set.end();
+	  ++fit)
+      {
+	int indices[3];
+	int index = 0;
+	for (int i=0; i<3; i++)
+	  indices[index++] = get_vertex_index(
+            builder, fit->first->vertex(tr.vertex_triple_index(fit->second, i)), V, inum
+          );
+	builder.begin_facet();
+	  builder.add_vertex_to_facet(indices[0]);
+	  builder.add_vertex_to_facet(regular_orientation ? indices[1] : indices[2]);
+	  builder.add_vertex_to_facet(regular_orientation ? indices[2] : indices[1]);
+	builder.end_facet();
+	CGAL_assertion_code(++nb_facets);
+      }
+      CGAL_assertion(nb_facets == number_of_facets);
+      // 	for( Finite_facets_iterator fit = tr.finite_facets_begin();
+      // 	     fit != tr.finite_facets_end(); ++fit)
+      // 	  if ((*fit).first->is_facet_on_surface((*fit).second)==true)
+      // 	  {
+      // 	    int indices[3];
+      // 	    int index = 0;
+      // 	    for (int i=0; i<3; i++)
+      // 	      std::cerr << ( indices[index++] = V[(*fit).first->vertex(tr.vertex_triple_index(fit->second, i))] ) << ", ";
+      // 	    std::cerr << "\n";
+      // 	    if( builder.test_facet(indices+0, indices+3) )
+      // 	      builder.add_facet(indices+0, indices+3);
+      // 	    else
+      // 	    {
+      // 	      builder.begin_facet();
+      // 	      builder.add_vertex_to_facet(indices[2]);
+      // 	      builder.add_vertex_to_facet(indices[1]);
+      // 	      builder.add_vertex_to_facet(indices[0]);
+      // 	      builder.end_facet();
+      // 	    }
+      // 	    CGAL_assertion_code(++nb_facets);
+      // 	  }
+    }
+    builder.end_surface();
+  } // end operator()
+}; // end Complex_2_in_triangulation_3_polyhedron_builder
+
+} // end namespace CGAL
+
+#endif  // CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h
new file mode 100644
index 0000000..9a7a148
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h
@@ -0,0 +1,91 @@
+// Copyright (c) 2008  GeometryFactory, Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
+#define CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
+
+#include <map>
+
+#include <vtkPoints.h>
+#include <vtkPolyData.h>
+#include <vtkCellArray.h>
+#include <vtkType.h>
+
+namespace CGAL {
+
+template <typename C2T3>
+vtkPolyData* output_c2t3_to_vtk_polydata(const C2T3& c2t3, 
+                                         vtkPolyData* polydata = 0)
+{
+  typedef typename C2T3::Triangulation Triangulation;
+  typedef typename Triangulation::Vertex_handle Vertex_handle;
+
+  const Triangulation& tr = c2t3.triangulation();
+
+  vtkPoints* const vtk_points = vtkPoints::New();
+  vtkCellArray* const vtk_cells = vtkCellArray::New();
+
+  vtk_points->Allocate(c2t3.triangulation().number_of_vertices());
+  vtk_cells->Allocate(c2t3.number_of_facets());
+
+  std::map<Vertex_handle, vtkIdType> V;
+  vtkIdType inum = 0;
+
+  for(typename Triangulation::Finite_vertices_iterator 
+        vit = tr.finite_vertices_begin(),
+        end = tr.finite_vertices_end();
+      vit != end;
+      ++vit)
+  {
+    typedef typename Triangulation::Point Point;
+    const Point& p = vit->point();
+    vtk_points->InsertNextPoint(CGAL::to_double(p.x()),
+                                CGAL::to_double(p.y()),
+                                CGAL::to_double(p.z()));
+    V[vit] = inum++;
+  }
+  for(typename C2T3::Facet_iterator 
+        fit = c2t3.facets_begin(),
+        end = c2t3.facets_end();
+      fit != end; ++fit) 
+  {
+    vtkIdType cell[3];
+    int j=0;
+    for (int i = 0; i < 4; ++i)
+      if (i != fit->second)
+        cell[j++] =  V[(*fit).first->vertex(i)];
+    CGAL_assertion(j==3);
+    vtk_cells->InsertNextCell(3, cell);
+  }
+  if(!polydata) {
+    polydata = vtkPolyData::New();
+  }
+
+  polydata->SetPoints(vtk_points);
+  vtk_points->Delete();
+
+  polydata->SetPolys(vtk_cells);
+  vtk_cells->Delete();
+  return polydata;
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_bsop_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_bsop_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_bsop_reader.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_bsop_reader.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_reader.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_reader.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_reader_doubles.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_reader_doubles.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_reader_doubles.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_reader_doubles.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_stream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_variant_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_variant_reader.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_variant_reader.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_variant_reader.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_writer.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_writer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Dxf_writer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Dxf_writer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Fig_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Fig_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Fig_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Fig_stream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Fig_stream_Conic_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Fig_stream_Conic_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Fig_stream_Conic_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Fig_stream_Conic_arc_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_avizo.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_avizo.h
new file mode 100644
index 0000000..63153f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_avizo.h
@@ -0,0 +1,165 @@
+// Copyright (c) 2012  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_IO_FILE_AVIZO_H
+#define CGAL_IO_FILE_AVIZO_H
+
+#include <CGAL/IO/File_medit.h>
+#include <iostream>
+#include <string>
+#include <CGAL/utility.h>
+#include <CGAL/Unique_hash_map.h>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+
+template <class C3T3>
+void
+output_to_avizo(std::ostream& os,
+                const C3T3& c3t3)
+{
+  typedef typename C3T3::Triangulation Tr;
+  typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+
+  typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+  typedef typename Tr::Cell_handle Cell_handle;
+  typedef typename Tr::Point Point_3;
+
+  const Tr& tr = c3t3.triangulation();
+
+  CGAL::Unique_hash_map<Vertex_handle, std::size_t> V;
+
+  //-------------------------------------------------------
+  // nodes
+  //-------------------------------------------------------
+
+  os << std::setprecision(17);
+  os << " # Avizo 3D ASCII 2.0\n\n";
+  os << "nNodes " << tr.number_of_vertices() << std::endl;
+  os << "nTetrahedra " << c3t3.number_of_cells_in_complex() << std::endl;
+  os <<  "Parameters {\n"
+    "    Materials {\n"
+    "        Material3 {\n"
+    "            Id 1,\n"
+    "            Color 0 0.835294 0.164706\n"
+    "        }\n"
+    "        Material4 {\n"
+    "            Id 2,\n"
+    "            Color 0.862745 0.0901961 0.0901961\n"
+    "        }\n"
+    "        Material5 {\n"
+    "            Id 3,\n"
+    "            Color 0.94902 0.847059 0.0901961\n"
+    "        }\n"
+    "        Material6 {\n"
+    "            Id 4,\n"
+    "            Color 0.8 0.16 0.698646\n"
+    "        }\n"
+    "        Material7 {\n"
+    "            Id 5,\n"
+    "            Color 0.494118 0.494118 1\n"
+    "        }\n"
+    "        Material8 {\n"
+    "            Id 6,\n"
+    "            Color 0.227451 0.227451 0.968627\n"
+    "        }\n"
+    "        Material9 {\n"
+    "            Id 7,\n"
+    "            Color 0.666667 0.666667 0.666667\n"
+    "        }\n"
+    "    }\n"
+    "}\n"
+    "Nodes { float[3] Coordinates } @1\n"
+    "Tetrahedra { int[4] Nodes } @2\n"
+    "TetrahedronData { byte Materials } @3\n"
+    "\n"
+    "# Data section follows\n"
+    "@1\n";
+
+  std::size_t vert_counter = 0;
+  for(Finite_vertices_iterator
+        vit = tr.finite_vertices_begin(),
+        end = tr.finite_vertices_end();
+      vit != end; ++vit)
+  {
+    const Point_3& p = vit->point();
+    const double x = CGAL::to_double(p.x());
+    const double y = CGAL::to_double(p.y());
+    const double z = CGAL::to_double(p.z());
+
+    V[vit] = ++vert_counter;
+
+    os << x << " " << y << " " << z << "\n";
+  }
+
+
+
+  //-------------------------------------------------------
+  // Elements
+  //-------------------------------------------------------
+
+  os << "\n at 2\n";
+  for (Cell_iterator
+         cit = c3t3.cells_in_complex_begin(),
+         end = c3t3.cells_in_complex_end();
+       cit != end; ++cit)
+  {
+    const Cell_handle ch = cit;
+    os << V[ch->vertex(0)] ;
+    os << " " << V[ch->vertex(1)] ;
+    os << " " << V[ch->vertex(2)] ;
+    os << " " << V[ch->vertex(3)]  << "\n";
+  }
+
+  os << "\n at 3\n";
+  for (Cell_iterator
+         cit = c3t3.cells_in_complex_begin(),
+         end = c3t3.cells_in_complex_end();
+       cit != end; ++cit)
+  {
+    os << cit->subdomain_index() << "\n";
+  }
+
+} // end output_to_avizo(...)
+
+} // end namespace Mesh_3
+
+
+
+
+/**
+ * @brief outputs mesh to avizo format
+ * @param os the stream
+ * @param c3t3 the mesh
+ */
+template <class C3T3>
+void
+output_to_avizo(std::ostream& os,
+                 const C3T3& c3t3)
+{
+  Mesh_3::output_to_avizo(os,c3t3);
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_IO_FILE_AVIZO_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_binary_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_binary_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/File_binary_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/File_binary_mesh_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF.h
new file mode 100644
index 0000000..15a5677
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF.h
@@ -0,0 +1,125 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+
+#ifndef CGAL_IO_FILE_HEADER_OFF_H
+#define CGAL_IO_FILE_HEADER_OFF_H 1
+
+#include <CGAL/IO/File_header_extended_OFF.h>
+#include <iostream>
+
+namespace CGAL {
+
+// Info structure for OFF file headers
+// ===================================
+class CGAL_EXPORT File_header_OFF : public File_header_extended_OFF {
+private:
+    // Publicly accessible file informations.
+    std::size_t  n_vertices;
+  std::size_t n_facets;
+    bool m_skel;        // SKEL format instead of OFF.
+    bool m_binary;      // OFF in binary format.
+    bool m_no_comments; // no comments in output.
+  std::size_t  m_offset;      // index offset for vertices, usually 0.
+
+    // Publicly accessible but not that well supported file informations.
+    bool m_colors;      // COFF detected.
+    bool m_normals;     // NOFF format stores also normals at vertices.
+
+    // More privately used file informations to scan the file.
+    bool m_tag4;        // 4OFF detected.
+    bool m_tagDim;      // nOFF detected (will not be supported).
+    int  m_dim;         // dimension for nOFF (will not be supported).
+public:
+    typedef  File_header_OFF           Self;
+    typedef  File_header_extended_OFF  Base;
+
+    explicit File_header_OFF( bool verbose = false);
+    File_header_OFF( bool binary, bool noc, bool skel,
+                     bool verbose = false);
+    //File_header_OFF( int v, int h, int f, bool verbose = false);
+    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
+                     bool binary, bool noc, bool skel,
+                     bool verbose = false);
+    File_header_OFF( const File_header_extended_OFF& ext_header);
+    File_header_OFF( const File_header_extended_OFF& ext_header,
+                     bool binary, bool noc, bool skel);
+    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
+                     const File_header_extended_OFF& ext_header);
+    File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
+                     const File_header_extended_OFF& ext_header,
+                     bool binary, bool noc, bool skel);
+
+    Self& operator= ( const Base& base) { (Base&)(*this) = base;
+                                          return *this;
+                                        }
+    std::size_t  size_of_vertices()   const { return n_vertices; }
+    std::size_t  size_of_facets()     const { return n_facets; }
+
+    bool skel()               const { return m_skel; }   // SKEL format.
+    bool off()                const { return ! m_skel; } // OFF format.
+    bool binary()             const { return m_binary; } // binary format.
+    bool ascii()              const { return ! m_binary; } // ASCII format.
+    bool no_comments()        const { return m_no_comments; }
+    bool comments()           const { return ! m_no_comments; }
+
+    std::size_t  index_offset()       const { return m_offset; }
+    bool has_colors()         const { return m_colors; } // COFF detected.
+    bool has_normals()        const { return m_normals;} // NOFF format.
+    bool is_homogeneous()     const { return m_tag4; }   // 4OFF detected.
+                           // nOFF detected. (will not be supported).
+    bool n_dimensional()      const { return m_tagDim; }
+                           // dimension for nOFF (will not be supported).
+    int  dimension()          const { return m_dim; }
+
+    void set_vertices( std::size_t n)       { n_vertices = n; }
+    void set_facets( std::size_t n)         { n_facets   = n; }
+
+    void set_skel( bool b)          { m_skel        = b; }
+    void set_binary( bool b)        { m_binary      = b; }
+    void set_no_comments( bool b)   { m_no_comments = b; }
+    void set_index_offset( std::size_t i)   { m_offset      = i; }
+
+    void set_colors( bool b)        { m_colors      = b; }
+    void set_normals( bool b)       { m_normals     = b;}
+    void set_homogeneous( bool b)   { m_tag4        = b; }
+    void set_dimensional( bool b)   { m_tagDim      = b; }
+    void set_dimension( int i)      { m_dim         = i; }
+    Self& operator+=( const Self& header);
+};
+
+// Write header.
+CGAL_EXPORT std::ostream& operator<<( std::ostream& out, const File_header_OFF& h);
+
+// Scan header. Marks streams badbit if not in SKEL format nor in OFF.
+CGAL_EXPORT std::istream& operator>>( std::istream& in, File_header_OFF& h);
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_header_OFF_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_HEADER_OFF_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF_impl.h
new file mode 100644
index 0000000..9ac3e1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_OFF_impl.h
@@ -0,0 +1,409 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <cstdlib>
+#include <cctype>
+#include <cstring>
+#include <iostream>
+#include <CGAL/IO/binary_file_io.h>
+#include <CGAL/IO/File_header_OFF.h>
+#include <algorithm>
+#include <boost/cstdint.hpp>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF( bool verbose)
+:   File_header_extended_OFF( verbose),
+    n_vertices(0),
+    n_facets(0),
+    m_skel(false),
+    m_binary(false),
+    m_no_comments(false),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF(
+                     bool binary, bool noc, bool skel, bool verbose)
+:   File_header_extended_OFF( verbose),
+    n_vertices(0),
+    n_facets(0),
+    m_skel(skel),
+    m_binary(binary),
+    m_no_comments(noc),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{}
+//CGAL_INLINE_FUNCTION
+//File_header_OFF::File_header_OFF( int v, int h, int f,
+//                                          bool verbose)
+//:   File_header_extended_OFF( verbose),
+//    n_vertices(v),
+//    n_facets(f),
+//    m_skel(false),
+//    m_binary(false),
+//    m_no_comments(false),
+//    m_offset(0),
+//    m_colors(false),
+//    m_normals(false),
+//    m_tag4(false),
+//    m_tagDim(false),
+//    m_dim(3)
+//{
+//    set_halfedges(h);
+//}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF( std::size_t v, std::size_t h, std::size_t f,
+                     bool binary, bool noc, bool skel, bool verbose)
+:   File_header_extended_OFF( verbose),
+    n_vertices(v),
+    n_facets(f),
+    m_skel(skel),
+    m_binary(binary),
+    m_no_comments(noc),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{
+    set_halfedges(h);
+}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF(
+                     const File_header_extended_OFF& ext_header)
+:   File_header_extended_OFF( ext_header),
+    n_vertices(0),
+    n_facets(0),
+    m_skel(false),
+    m_binary(false),
+    m_no_comments(false),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF(
+                     const File_header_extended_OFF& ext_header,
+                     bool binary, bool noc, bool skel)
+:   File_header_extended_OFF( ext_header),
+    n_vertices(0),
+    n_facets(0),
+    m_skel(skel),
+    m_binary(binary),
+    m_no_comments(noc),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF(
+                                 std::size_t v, std::size_t h, std::size_t f,
+                     const File_header_extended_OFF& ext_header)
+:   File_header_extended_OFF( ext_header),
+    n_vertices(v),
+    n_facets(f),
+    m_skel(false),
+    m_binary(false),
+    m_no_comments(false),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{
+    set_halfedges(h);
+}
+CGAL_INLINE_FUNCTION
+File_header_OFF::File_header_OFF(
+                                 std::size_t v, std::size_t h, std::size_t f,
+                     const File_header_extended_OFF& ext_header,
+                     bool binary, bool noc, bool skel)
+:   File_header_extended_OFF( ext_header),
+    n_vertices(v),
+    n_facets(f),
+    m_skel(skel),
+    m_binary(binary),
+    m_no_comments(noc),
+    m_offset(0),
+    m_colors(false),
+    m_normals(false),
+    m_tag4(false),
+    m_tagDim(false),
+    m_dim(3)
+{
+    set_halfedges(h);
+}
+
+CGAL_INLINE_FUNCTION
+File_header_OFF& File_header_OFF::
+operator+=( const File_header_OFF& header) {
+    (File_header_extended_OFF&)(*this) = header;
+    n_vertices += header.n_vertices;
+    n_facets   += header.n_facets;
+    return *this;
+}
+
+// Write header.
+CGAL_INLINE_FUNCTION
+std::ostream& operator<<( std::ostream& out, const File_header_OFF& h) {
+    if ( h.comments()) {
+        out << "# Output of a CGAL tool\n";
+        out << static_cast<const File_header_extended_OFF&>( h);
+    }
+    if ( h.has_normals())
+        out << 'N';
+    if ( h.skel())
+        out << "SKEL";
+    else
+        out << "OFF";
+    if ( h.binary()) {
+        out << " BINARY\n";
+        I_Binary_write_big_endian_integer32( out, static_cast<int>(h.size_of_vertices()));
+        I_Binary_write_big_endian_integer32( out, static_cast<int>(h.size_of_facets()));
+        if ( h.off())
+            I_Binary_write_big_endian_integer32( out, 0);
+    } else {
+        out << '\n';
+        out << h.size_of_vertices() << ' '<< h.size_of_facets();
+        if ( h.off())
+            out << " 0";
+        if ( h.comments()) {
+            out << "\n\n# " << h.size_of_vertices() << " vertices\n";
+            out << "# ------------------------------------------\n";
+        }
+        out << std::endl;
+    }
+    return out;
+}
+
+// Scan header. Marks streams badbit if not in SKEL format nor in OFF.
+CGAL_INLINE_FUNCTION
+std::istream& operator>>( std::istream& in, File_header_OFF& h) {
+    // read in the first character and scan for comments, `OFF', or `NOFF',
+    // or `SKEL', or `4SKEL'.
+    h.set_off_header( false);
+    char c;
+    while ( (in >> c) && c == '#') {
+        if ( in.get(c) && c == 'C' &&
+             in.get(c) && c == 'B' &&
+             in.get(c) && c == 'P') {
+            in >> static_cast<File_header_extended_OFF&>( h);
+        } else if ( c != '\n')
+            in >> skip_until_EOL;
+    }
+    if ( ! in)
+        return in;
+    h.set_skel( false);
+    h.set_binary( false);
+    h.set_index_offset( 1);
+    h.set_colors( false);
+    h.set_normals( false);
+    h.set_homogeneous( false);
+    h.set_dimensional( false);
+    h.set_dimension( 3);
+
+    const int max_keyword = 42;
+    char keyword[max_keyword] = "";
+    int i = 0;
+    keyword[i++] = c;
+    while( i < max_keyword - 1 && in.get(c) && std::isalnum(c))
+        keyword[i++] = c;
+    keyword[i] = '\0';
+    if ( i < 2 || (std::isdigit(keyword[0]) && keyword[0] != '4')
+               || std::isdigit(keyword[1])) {
+        h.set_vertices( std::atoi( keyword));
+    } else {
+        h.set_index_offset( 0);
+        int j = 0;
+        if ( j < i && keyword[j] == 'C') {
+            h.set_colors( true);
+            j++;
+        }
+        if ( j < i && keyword[j] == 'N') {
+            h.set_normals( true);
+            j++;
+        }
+        if ( j < i && keyword[j] == '4') {
+            h.set_homogeneous( true);
+            j++;
+        }
+        if ( j < i && keyword[j] == 'n') {
+            h.set_dimensional( true);
+            j++;
+        }
+        if ( i-j != 3 || keyword[j]   != 'O'
+                      || keyword[j+1] != 'F'
+                      || keyword[j+2] != 'F') {
+            if ( i-j != 4 || keyword[j]   != 'S'
+                          || keyword[j+1] != 'K'
+                          || keyword[j+2] != 'E'
+                          || keyword[j+3] != 'L') {
+                in.clear( std::ios::badbit);
+                if ( h.verbose()) {
+                    std::cerr << " " << std::endl;
+                    std::cerr << "error: File_header_OFF: "
+                                  "wrong format: neither OFF nor SKEL."
+                              << std::endl;
+                }
+                return in;
+            } else {
+                h.set_skel( true);
+            }
+        }
+        in >> skip_comment_OFF >> c;
+        if ( std::isdigit(c)) {
+            in.putback(c);
+            int n;
+            in >> n;
+            h.set_vertices(n);
+        } else {
+            i = 0;
+            keyword[i++] = c;
+            while( i < max_keyword - 1 && in.get(c) &&
+                   std::isalnum(c))
+                keyword[i++] = c;
+            keyword[i] = '\0';
+            if ( std::strcmp( keyword, "BINARY") == 0) {
+                h.set_binary( true);
+                if ( c != '\n')
+                    in >> skip_until_EOL;
+            } else {
+                in.clear( std::ios::badbit);
+                if ( h.verbose()) {
+                    std::cerr << " " << std::endl;
+                    std::cerr << "error: File_header_OFF(): "
+                                 "wrong format: neither OFF nor SKEL."
+                              << std::endl;
+                }
+                return in;
+            }
+        }
+    }
+    // Read remaining size value(s).
+    int n_h;
+    if ( h.binary()) {
+        boost::int32_t a, b, c;
+        I_Binary_read_big_endian_integer32( in, a);
+        if ( h.n_dimensional()) {
+            h.set_dimension( a);
+            I_Binary_read_big_endian_integer32( in, a);
+        }
+        I_Binary_read_big_endian_integer32( in, b);
+        if ( h.off())
+            I_Binary_read_big_endian_integer32( in, c);
+        else
+            c = 0;
+        h.set_vertices( a);
+        if (b<0){
+          in.clear( std::ios::badbit );
+          if ( h.verbose()) {
+              std::cerr << " " << std::endl;
+              std::cerr << "error: File_header_OFF(): File contains < 0 facets."
+                        << std::endl;
+          }
+          return in;
+        }
+        h.set_facets( b);
+        n_h = c;
+    } else {
+        int n;
+        if ( h.n_dimensional()) {
+            h.set_dimension( static_cast<int>(h.size_of_vertices()));
+            in >> n;
+            h.set_vertices(n);
+        }
+        in >> n;
+        if (n < 0){
+          in.clear( std::ios::badbit );
+          if ( h.verbose()) {
+              std::cerr << " " << std::endl;
+              std::cerr << "error: File_header_OFF(): File contains < 0 facets."
+                        << std::endl;
+          }
+          return in;
+        }
+        h.set_facets(n);
+        if ( h.off())
+            in >> n_h;
+        else
+            n_h = 0;
+    }
+    if ( n_h == 0)
+        h.set_index_offset( 0);
+    if ( ! in || h.size_of_vertices() <= 0 ) {
+        in.clear( std::ios::badbit);
+        if ( h.verbose()) {
+            std::cerr << " " << std::endl;
+            std::cerr << "error: File_header_OFF(): File contains <= 0 vertices."
+                      << std::endl;
+        }
+        return in;
+    }
+    if ( h.size_of_halfedges() == 0) {
+        // be careful, because border edges count twice
+        h.set_halfedges( 2 * n_h);
+        // check against the Eulerian equation for connected planar graphs.
+        // We do not know the number of holes we must represent as dummy
+        // facets and we do not know the genus of the surface.
+        // So we add 12 and a factor of 5 percent.
+        if (    h.size_of_halfedges() == 0
+             || h.size_of_halfedges() > (h.size_of_vertices()
+                + h.size_of_facets() - 2 + 12) * 2.1
+             || h.size_of_halfedges() < (h.size_of_vertices()
+                + h.size_of_facets() - 2) * 2
+        )
+            h.set_halfedges( int((h.size_of_vertices() +
+                                  h.size_of_facets() - 2 + 12) * 2.1));
+    }
+    h.set_off_header( h.off());
+    return in;
+}
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF.h
new file mode 100644
index 0000000..58d4ee4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF.h
@@ -0,0 +1,136 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+
+#ifndef CGAL_IO_FILE_HEADER_EXTENDED_OFF_H
+#define CGAL_IO_FILE_HEADER_EXTENDED_OFF_H 1
+#include <CGAL/basic.h>
+
+#include <iostream>
+#include <string>
+
+
+namespace CGAL {
+
+class  CGAL_EXPORT File_header_extended_OFF {
+    bool     m_verbose;     // Print error messages if true.
+    bool     m_polyhedral_surface;
+  std::size_t      m_halfedges;
+    bool     m_triangulated;
+    bool     m_non_empty_facets;
+    bool     m_terrain;
+    bool     m_normalized_to_sphere;
+    double   m_radius;
+    bool     m_rounded;
+    int      m_rounded_bits;
+    bool     m_off_header;
+public:
+    typedef  File_header_extended_OFF  Self;
+    File_header_extended_OFF( bool verbose = false)
+    :   m_verbose               ( verbose),
+        m_polyhedral_surface    ( false),
+        m_halfedges             ( 0),
+        m_triangulated          ( false),
+        m_non_empty_facets      ( false),
+        m_terrain               ( false),
+        m_normalized_to_sphere  ( false),
+        m_radius                ( 0.0),
+        m_rounded               ( false),
+        m_rounded_bits          ( 0),
+        m_off_header            ( true)
+    {}
+    // Access:
+    bool   verbose()              const { return m_verbose; }
+    bool   polyhedral_surface()   const { return m_polyhedral_surface; }
+  std::size_t    halfedges()            const { return m_halfedges; }
+  std::size_t    size_of_halfedges()    const { return m_halfedges; }
+    bool   triangulated()         const { return m_triangulated; }
+    bool   non_empty_facets()     const { return m_non_empty_facets; }
+    bool   terrain()              const { return m_terrain; }
+    bool   normalized_to_sphere() const { return m_normalized_to_sphere; }
+    double radius()               const { return m_radius; }
+    bool   rounded()              const { return m_rounded; }
+    int    rounded_bits()         const { return m_rounded_bits; }
+    bool   off_header()           const { return m_off_header; }
+    // Derived predicates about the file format.
+    bool   is_OFF()               const { return m_off_header; }
+    bool   is_POL()               const;
+    bool   is_CBP()               const;
+    bool   is_TRN()               const;
+    int    is_CBPn()              const;
+    int    is_TRNn()              const;
+    // The proper file suffix with respect to file format.
+    std::string suffix() const;
+    // The proper format name.
+    std::string format_name() const;
+    // Set values:
+    void   set_verbose( bool b)              { m_verbose            = b; }
+    void   set_polyhedral_surface( bool b)   { m_polyhedral_surface = b; }
+  void   set_halfedges( std::size_t h)       { m_halfedges          = h; }
+    void   set_triangulated( bool b)         { m_triangulated       = b; }
+    void   set_non_empty_facets( bool b)     { m_non_empty_facets   = b; }
+    void   set_terrain( bool b)              { m_terrain            = b; }
+    void   set_normalized_to_sphere( bool b) { m_normalized_to_sphere = b;}
+    void   set_radius( double d)             { m_radius             = d; }
+    void   set_rounded( bool b)              { m_rounded            = b; }
+    void   set_rounded_bits( int i)          { m_rounded_bits       = i; }
+    void   set_off_header( bool b)           { m_off_header         = b; }
+    Self&  operator+=( const Self& header); // union of two headers
+};
+
+// Write extended header incl. CGAL/ENDCBP keywords.
+std::ostream& operator<<( std::ostream& out,
+                          const File_header_extended_OFF& h);
+
+// Scan extended header. The CBP keyword must be read already.
+std::istream& operator>>( std::istream& in, File_header_extended_OFF& h);
+
+// istream modifier skips chars until end of line.
+inline std::istream& skip_until_EOL( std::istream& in) {
+    if(in.eof()){
+        return in;
+    }
+    char c;
+    while ( in.get(c) && c != '\n')
+        ;
+    return in;
+}
+
+// istream modifier that checks for OFF comments and removes them.
+inline std::istream& skip_comment_OFF( std::istream& in) {
+    char c;
+    while( (in >> c) && c == '#')
+        in >> skip_until_EOL;
+    in.putback(c);
+    return in;
+}
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_header_extended_OFF_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_HEADER_EXTENDED_OFF_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF_impl.h
new file mode 100644
index 0000000..0fad299
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_header_extended_OFF_impl.h
@@ -0,0 +1,212 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/IO/File_header_extended_OFF.h>
+#include <CGAL/basic.h>
+
+#include <cstdlib>
+#include <cctype>
+#include <cstring>
+#include <iostream>
+#include <sstream>
+#include <algorithm>
+
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+bool File_header_extended_OFF::
+is_POL()  const {
+    return is_OFF() && polyhedral_surface();
+}
+
+CGAL_INLINE_FUNCTION
+bool File_header_extended_OFF::
+is_CBP()  const {
+    return is_POL() && triangulated() && non_empty_facets() &&
+        normalized_to_sphere() && radius() <= 1.0;
+}
+
+CGAL_INLINE_FUNCTION
+bool File_header_extended_OFF::
+is_TRN()  const { return is_CBP() && terrain(); }
+
+CGAL_INLINE_FUNCTION
+int  File_header_extended_OFF::
+is_CBPn() const {
+    if ( is_POL() && triangulated() && non_empty_facets() &&
+         normalized_to_sphere() && rounded() &&
+         (radius() <= ( 1l << rounded_bits())))
+        return rounded_bits();
+    else
+        return 0;
+}
+
+CGAL_INLINE_FUNCTION
+int  File_header_extended_OFF::
+is_TRNn() const { return ( terrain() ? is_CBPn() : 0); }
+
+
+// The proper file suffix with respect to file format.
+CGAL_INLINE_FUNCTION
+std::string File_header_extended_OFF::
+suffix() const {
+    if ( is_TRNn()) {
+        std::ostringstream out;
+        out << "trn" << m_rounded_bits << '\0';
+        return out.str();
+    }
+    if ( is_TRN())
+        return std::string("trn");
+    if ( is_CBPn()) {
+        std::ostringstream out;
+        out << "cbp" << m_rounded_bits << '\0';
+        return out.str();
+    }
+    if ( is_CBP())
+        return std::string("cbp");
+    if ( is_POL())
+        return std::string("pol");
+    return std::string("off");
+}
+
+// The proper format name.
+CGAL_INLINE_FUNCTION
+std::string File_header_extended_OFF::
+format_name() const {
+    if ( is_TRNn()) {
+        std::ostringstream out;
+        out << "TRN" << m_rounded_bits << '\0';
+        return out.str();
+    }
+    if ( is_TRN())
+        return std::string("TRN");
+    if ( is_CBPn()) {
+        std::ostringstream out;
+        out << "CBP" << m_rounded_bits << '\0';
+        return out.str();
+    }
+    if ( is_CBP())
+        return std::string("CBP");
+    if ( is_POL())
+        return std::string("POL");
+    return std::string("OFF");
+}
+
+CGAL_INLINE_FUNCTION
+File_header_extended_OFF& File_header_extended_OFF::
+operator+=( const File_header_extended_OFF& header) {
+    m_verbose              = m_verbose || header.m_verbose;
+    m_polyhedral_surface   = m_polyhedral_surface &&
+                             header.m_polyhedral_surface;
+    m_halfedges           += header.m_halfedges;
+    m_triangulated         = m_triangulated && header.m_triangulated;
+    m_non_empty_facets     = m_non_empty_facets &&
+                             header.m_non_empty_facets;
+    m_terrain              = m_terrain && header.m_terrain;
+    m_normalized_to_sphere = m_normalized_to_sphere &&
+                             header.m_normalized_to_sphere;
+    m_radius               = (std::max)(m_radius, header.m_radius);
+    m_rounded              = m_rounded && header.m_rounded;
+    m_rounded_bits         = (std::max)( m_rounded_bits,
+                                       header.m_rounded_bits);
+    m_off_header           = m_off_header && header.m_off_header;
+    return *this;
+}
+
+#define CGAL_OUT(item)     out << "# " #item " " << h.item() << '\n'
+#define CGAL_OUTBOOL(item) out << "# " #item " " <<(h.item() ? '1':'0') << '\n'
+
+// Write extended header incl. CGAL/ENDCBP keywords.
+CGAL_INLINE_FUNCTION
+std::ostream& operator<<( std::ostream& out,
+                          const File_header_extended_OFF& h) {
+    out << "#CBP\n";
+    CGAL_OUTBOOL( polyhedral_surface);
+    CGAL_OUT(     halfedges);
+    CGAL_OUTBOOL( triangulated);
+    CGAL_OUTBOOL( non_empty_facets);
+    CGAL_OUTBOOL( terrain);
+    CGAL_OUTBOOL( normalized_to_sphere);
+    CGAL_OUT(     radius);
+    CGAL_OUTBOOL( rounded);
+    CGAL_OUT(     rounded_bits);
+    out << "# ENDCBP\n" << std::endl;
+    return out;
+}
+#undef CGAL_OUT
+#undef OUTBOOL
+
+#define CGAL_IN(item,type)                         \
+    else if ( std::strcmp( keyword, #item) == 0) { \
+        type t;                               \
+        in >> t;                              \
+        h.set_##item( t);                     \
+    }
+
+#define CGAL_INBOOL(item)                          \
+    else if ( std::strcmp( keyword, #item) == 0) { \
+        in >> c;                              \
+        h.set_##item( c == '1');              \
+    }
+
+// Scan extended header. The CBP keyword must be read already.
+CGAL_INLINE_FUNCTION
+std::istream& operator>>( std::istream& in, File_header_extended_OFF& h) {
+    const int max_keyword = 42;
+    char c;
+    char keyword[max_keyword] = "";
+    in >> keyword;
+    while ( in && std::strcmp( keyword, "ENDCBP") != 0) {
+        if ( std::strcmp( keyword, "#") == 0)
+            ;
+        CGAL_INBOOL( polyhedral_surface)
+        CGAL_IN(     halfedges, int)
+        CGAL_INBOOL( triangulated)
+        CGAL_INBOOL( non_empty_facets)
+        CGAL_INBOOL( terrain)
+        CGAL_INBOOL( normalized_to_sphere)
+        CGAL_IN(     radius, double)
+        CGAL_INBOOL( rounded)
+        CGAL_IN(     rounded_bits, int)
+        else if ( h.verbose()) {
+            std::cerr << "warning: File_header_extended_OFF: unknown key '"
+                      << keyword << "'." << std::endl;
+        }
+        in >> keyword;
+    }
+    in >> skip_until_EOL >> skip_comment_OFF;
+    return in;
+}
+#undef CGAL_IN
+#undef CGAL_INBOOL
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_maya.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_maya.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/File_maya.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/File_maya.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_medit.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_medit.h
new file mode 100644
index 0000000..452fe54
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_medit.h
@@ -0,0 +1,907 @@
+// Copyright (c) 2004-2006  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU, Stephane Tayeb
+
+#ifndef CGAL_IO_FILE_MEDIT_H
+#define CGAL_IO_FILE_MEDIT_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <iostream>
+#include <map>
+#include <set>
+#include <vector>
+#include <string>
+#include <CGAL/utility.h>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+
+//-------------------------------------------------------
+// Needed in verbose mode
+//-------------------------------------------------------
+#ifdef CGAL_MESH_3_IO_VERBOSE
+template<class T>
+inline
+std::ostream&
+operator<<(std::ostream &os, const std::pair<T,T>& pair)
+{
+  return os << "<" << pair.first << "," << pair.second << ">";
+}
+#endif
+
+// -----------------------------------
+// Rebind_cell_pmap
+// -----------------------------------
+template <typename C3T3>
+class Rebind_cell_pmap
+{
+  typedef typename C3T3::Subdomain_index Subdomain_index;
+  typedef std::map<Subdomain_index,int> Subdomain_map;
+  typedef typename C3T3::Cell_handle Cell_handle;
+  typedef unsigned int size_type;
+
+public:
+  Rebind_cell_pmap(const C3T3& c3t3)
+    : r_c3t3_(c3t3)
+  {
+    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+
+    int first_index = 0;
+    int index_counter = first_index + 1;
+
+    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
+         cell_it != r_c3t3_.cells_in_complex_end();
+         ++cell_it)
+    {
+      // Add subdomain index in internal map if needed
+      if ( subdomain_map_.end() ==
+              subdomain_map_.find(r_c3t3_.subdomain_index(cell_it)) )
+      {
+        subdomain_map_.insert(std::make_pair(r_c3t3_.subdomain_index(cell_it),
+                                             index_counter));
+        ++index_counter;
+      }
+    }
+    
+    // Rebind indices in alphanumeric order
+    index_counter = first_index + 1;
+    for ( typename Subdomain_map::iterator mit = subdomain_map_.begin() ;
+          mit != subdomain_map_.end() ;
+          ++mit )
+    {
+      mit->second = index_counter++;
+    }
+
+#ifdef CGAL_MESH_3_IO_VERBOSE
+    std::cerr << "Nb of subdomains: " << subdomain_map_.size() << "\n";
+    std::cerr << "Subdomain mapping:\n\t" ;
+
+    typedef typename Subdomain_map::iterator Subdomain_map_iterator;
+    for ( Subdomain_map_iterator sub_it = subdomain_map_.begin() ;
+          sub_it != subdomain_map_.end() ;
+          ++sub_it )
+    {
+      std::cerr << "[" << (*sub_it).first << ":" << (*sub_it).second << "] ";
+    }
+    std::cerr << "\n";
+#endif
+  }
+
+  int subdomain_index(const Cell_handle& ch) const
+  {
+    return subdomain_index(r_c3t3_.subdomain_index(ch));
+  }
+
+  size_type subdomain_number() const
+  {
+    return subdomain_map_.size();
+  }
+
+private:
+  int subdomain_index(const Subdomain_index& index) const
+  {
+    typedef typename Subdomain_map::const_iterator Smi;
+    Smi elt_it = subdomain_map_.find(index);
+    if ( elt_it != subdomain_map_.end() )
+      return elt_it->second;
+    else
+      return -1;
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+  Subdomain_map subdomain_map_;
+};
+  
+// Accessor  
+template <typename C3T3>
+int
+get(const Rebind_cell_pmap<C3T3>& cmap,
+    const typename C3T3::Cell_handle& ch)
+{
+  return cmap.subdomain_index(ch);
+}
+
+template <typename C3T3>
+unsigned int get_size(const Rebind_cell_pmap<C3T3>& cmap)
+{
+  return cmap.subdomain_number();
+}
+  
+
+// -----------------------------------
+// No_rebind_cell_pmap
+// -----------------------------------
+template <typename C3T3>
+class No_rebind_cell_pmap
+{
+  typedef typename C3T3::Subdomain_index Subdomain_index;
+  typedef typename C3T3::Cell_handle Cell_handle;
+  typedef unsigned int size_type;
+  
+public:
+  No_rebind_cell_pmap(const C3T3& c3t3)
+    : r_c3t3_(c3t3) {}
+  
+  int subdomain_index(const Cell_handle& ch) const
+  {
+    return static_cast<int>(r_c3t3_.subdomain_index(ch));
+  }
+  
+  size_type subdomain_number() const
+  {
+    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+    std::set<Subdomain_index> subdomain_set;
+    
+    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
+        cell_it != r_c3t3_.cells_in_complex_end();
+        ++cell_it)
+    {
+      // Add subdomain index in set if new
+      if ( subdomain_set.end() == subdomain_set.find(subdomain_index(cell_it)) )
+      {
+        subdomain_set.insert(subdomain_index(cell_it));
+      }
+    }
+    
+    return subdomain_set.size();
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+};
+  
+// Accessor  
+template <typename C3T3>
+int
+get(const No_rebind_cell_pmap<C3T3>& cmap,
+    const typename C3T3::Cell_handle& ch)
+{
+  return cmap.subdomain_index(ch);
+}
+  
+  
+// -----------------------------------
+// Rebind_facet_pmap
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class Rebind_facet_pmap
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef std::map<Surface_patch_index,int> Surface_map;
+  typedef typename C3T3::Facet Facet;
+  typedef unsigned int size_type;
+  
+public:
+  Rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& cell_pmap)
+    : r_c3t3_(c3t3)
+    , cell_pmap_(cell_pmap)
+  {
+    typedef typename C3T3::Facets_in_complex_iterator Facet_iterator;
+    
+    int first_index = 1;
+    int index_counter = first_index;
+    
+    for( Facet_iterator facet_it = r_c3t3_.facets_in_complex_begin();
+        facet_it != r_c3t3_.facets_in_complex_end();
+        ++facet_it)
+    {
+      // Add surface index in internal map if needed
+      if ( surface_map_.end() ==
+          surface_map_.find(c3t3.surface_patch_index((*facet_it).first,
+                                                     (*facet_it).second)) )
+      {
+        surface_map_.insert(std::make_pair(r_c3t3_.surface_patch_index(*facet_it),
+                                           index_counter));
+        ++index_counter;
+      }
+    }
+    
+    // Find cell_pmap_ unused indices
+    typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+    std::set<int> cell_label_set;
+    
+    for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
+        cell_it != r_c3t3_.cells_in_complex_end();
+        ++cell_it)
+    {
+      // Add subdomain index in set if new
+      if ( cell_label_set.end()
+          == cell_label_set.find(get(cell_pmap_,cell_it)) )
+      {
+        cell_label_set.insert(get(cell_pmap_,cell_it));
+      }
+    }
+    
+    // Rebind indices
+    index_counter = get_first_unused_label(cell_label_set,first_index);
+    for ( typename Surface_map::iterator mit = surface_map_.begin() ;
+         mit != surface_map_.end() ;
+         ++mit )
+    {
+      mit->second = index_counter++;
+      index_counter = get_first_unused_label(cell_label_set,index_counter);
+    }
+    
+#ifdef CGAL_MESH_3_IO_VERBOSE
+    std::cerr << "Nb of surface patches: " << surface_map_.size() << "\n";
+    std::cerr << "Surface mapping:\n\t" ;
+    
+    typedef typename Surface_map::iterator Surface_map_iterator;
+    for ( Surface_map_iterator surf_it = surface_map_.begin() ;
+         surf_it != surface_map_.end() ;
+         ++surf_it )
+    {
+      std::cerr << "[" << (*surf_it).first
+      << ":" << (*surf_it).second << "] ";
+    }
+    std::cerr << "\n";
+#endif
+  }
+  
+  int surface_index(const Facet& f) const
+  {
+    return surface_index(r_c3t3_.surface_patch_index(f));
+  }
+  
+  size_type surface_number() const
+  {
+    return surface_map_.size();
+  }
+  
+private:
+  int surface_index(const Surface_patch_index& index) const
+  {
+    typedef typename Surface_map::const_iterator Smi;
+    Smi elt_it = surface_map_.find(index);
+    if ( elt_it != surface_map_.end() )
+      return elt_it->second;
+    else
+      return -1;
+  }
+  
+  int get_first_unused_label(const std::set<int>& label_set,
+                             int search_start) const
+  {
+    while ( label_set.end() != label_set.find(search_start) )
+      ++search_start;
+    
+    return search_start;
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+  const Cell_pmap& cell_pmap_;
+  Surface_map surface_map_;
+};
+
+  
+// Accessors
+template <typename C3T3, typename Cell_pmap>
+int
+get(const Rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
+    const typename C3T3::Facet& f)
+{
+  return fmap.surface_index(f);
+}
+  
+template <typename C3T3, typename Cell_pmap>
+unsigned int
+get_size(const Rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
+         const typename C3T3::Facet& f)
+{
+  return fmap.surface_number(f);
+}
+
+  
+// -----------------------------------
+// No_rebind_facet_pmap
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class No_rebind_facet_pmap
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Facet Facet;
+  typedef unsigned int size_type;
+  
+public:
+  No_rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
+    : r_c3t3_(c3t3) {}
+
+  int surface_index(const Facet& f) const
+  {
+    return static_cast<int>(r_c3t3_.surface_patch_index(f));
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+};
+
+
+// Accessors
+template <typename C3T3, typename Cell_pmap>
+int
+get(const No_rebind_facet_pmap<C3T3,Cell_pmap>& fmap,
+    const typename C3T3::Facet& f)
+{
+return fmap.surface_index(f);
+}
+
+// -----------------------------------
+// No_rebind_facet_pmap_first
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class No_rebind_facet_pmap_first
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Facet Facet;
+  typedef unsigned int size_type;
+  
+public:
+  No_rebind_facet_pmap_first(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
+    : r_c3t3_(c3t3) {}
+  
+  int surface_index(const Facet& f) const
+  {
+    return static_cast<int>(r_c3t3_.surface_patch_index(f).first);
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+};
+
+
+// Accessors
+template <typename C3T3, typename Cell_pmap>
+int
+get(const No_rebind_facet_pmap_first<C3T3,Cell_pmap>& fmap,
+  const typename C3T3::Facet& f)
+{
+  return fmap.surface_index(f);
+}
+  
+  
+// -----------------------------------
+// No_rebind_facet_pmap_second
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class No_rebind_facet_pmap_second
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Facet Facet;
+  typedef unsigned int size_type;
+  
+public:
+  No_rebind_facet_pmap_second(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
+  : r_c3t3_(c3t3) {}
+  
+  int surface_index(const Facet& f) const
+  {
+    return static_cast<int>(r_c3t3_.surface_patch_index(f).second);
+  }
+  
+private:
+  const C3T3& r_c3t3_;
+};
+
+
+// Accessors
+template <typename C3T3, typename Cell_pmap>
+int
+get(const No_rebind_facet_pmap_second<C3T3,Cell_pmap>& fmap,
+    const typename C3T3::Facet& f)
+{
+  return fmap.surface_index(f);
+}
+  
+  
+  
+// -----------------------------------
+// No_patch_facet_pmap_first
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class No_patch_facet_pmap_first
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Facet Facet;
+  typedef typename C3T3::Cell_handle Cell_handle;
+  
+public:
+  No_patch_facet_pmap_first(const C3T3&, const Cell_pmap& cell_pmap)
+    : cell_pmap_(cell_pmap) { }
+  
+  int surface_index(const Facet& f) const
+  {
+    Cell_handle c1 = f.first;
+    Cell_handle c2 = c1->neighbor(f.second);
+    
+    int label1 = get(cell_pmap_,c1);
+    int label2 = get(cell_pmap_,c2);
+    
+    if ( 0 == label1 || -1 == label1 )
+      label1 = label2;
+    if ( 0 == label2 || -1 == label2 )
+      label2 = label1;
+    
+    return (std::min)(label1,label2);
+  }
+  
+private:
+  const Cell_pmap& cell_pmap_;
+};
+
+// Accessors 
+template <typename C3T3, typename Cell_pmap>
+int
+get(const No_patch_facet_pmap_first<C3T3,Cell_pmap>& fmap,
+    const typename C3T3::Facet& f)
+{
+  return fmap.surface_index(f);
+}
+
+// -----------------------------------
+// No_patch_facet_pmap_second
+// -----------------------------------
+template <typename C3T3, typename Cell_pmap>
+class No_patch_facet_pmap_second
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Facet Facet;
+  typedef typename C3T3::Cell_handle Cell_handle;
+  
+public:
+  No_patch_facet_pmap_second(const C3T3&, const Cell_pmap& cell_pmap)
+    : cell_pmap_(cell_pmap) { }
+  
+  int surface_index(const Facet& f) const
+  {
+    Cell_handle c1 = f.first;
+    Cell_handle c2 = c1->neighbor(f.second);
+    
+    int label1 = get(cell_pmap_,c1);
+    int label2 = get(cell_pmap_,c2);
+    
+    if ( 0 == label1 || -1 == label1 )
+      label1 = label2;
+    if ( 0 == label2 || -1 == label2 )
+      label2 = label1;
+    
+    return (std::max)(label1,label2);
+  }
+  
+private:
+  const Cell_pmap& cell_pmap_;
+};
+
+// Accessors 
+template <typename C3T3, typename Cell_pmap>
+int
+get(const No_patch_facet_pmap_second<C3T3,Cell_pmap>& fmap,
+    const typename C3T3::Facet& f)
+{
+  return fmap.surface_index(f);
+}
+  
+  
+// -----------------------------------
+// Default_vertex_index_pmap
+// ----------------------------------- 
+template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
+class Default_vertex_pmap
+{
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Subdomain_index Subdomain_index;
+  typedef typename C3T3::Index Index;
+  typedef typename C3T3::Vertex_handle Vertex_handle;
+  typedef typename C3T3::Cell_handle Cell_handle;
+  typedef typename C3T3::Facet Facet;
+
+public:
+  Default_vertex_pmap(const C3T3& c3t3,
+                      const Cell_pmap& c_pmap,
+                      const Facet_pmap& f_pmap)
+    : c_pmap_(c_pmap)
+    , f_pmap_(f_pmap)
+    , r_c3t3_(c3t3)
+    , edge_index_(0) {}
+
+  int index(const Vertex_handle& vh) const
+  {
+    switch ( r_c3t3_.in_dimension(vh) )
+    {
+    case 2:
+      {
+        // Check if each incident surface facet of vh has the same surface index
+        typename std::vector<Facet> facets;
+        r_c3t3_.triangulation().finite_incident_facets(
+            vh, std::back_inserter(facets));
+
+        if ( facets.begin() == facets.end() )
+          return -1;
+
+        // Look for the first surface facet
+        typename std::vector<Facet>::iterator it_facet = facets.begin();
+        while ( ! r_c3t3_.is_in_complex(*it_facet) )
+        {
+          if ( ++it_facet == facets.end() )
+            return -1;
+        }
+
+        Surface_patch_index facet_index = r_c3t3_.surface_patch_index(*it_facet);
+        Facet facet = *it_facet;
+        ++it_facet;
+
+        for( ; it_facet != facets.end() ; ++it_facet)
+        {
+          // If another index is found, return value for edge vertice
+          if (   r_c3t3_.is_in_complex(*it_facet)
+              && !( facet_index == r_c3t3_.surface_patch_index(*it_facet) ) )
+            return edge_index_;
+        }
+
+        return get(f_pmap_,facet);
+      }
+      break;
+
+    case 3:
+      {
+        // Returns value of any incident cell
+        typename std::vector<Cell_handle> cells;
+        r_c3t3_.triangulation().finite_incident_cells(
+            vh,std::back_inserter(cells));
+
+        if ( cells.begin() != cells.end() )
+          return get(c_pmap_, *cells.begin());
+        else
+          return -1;
+      }
+      break;
+
+    default:
+      // should not happen
+      return -1;
+      break;
+    }
+  }
+
+private:
+  const Cell_pmap& c_pmap_;
+  const Facet_pmap& f_pmap_;
+  const C3T3& r_c3t3_;
+  const unsigned int edge_index_;
+};
+
+template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
+int
+get(const Default_vertex_pmap<C3T3,Cell_pmap,Facet_pmap>& vmap,
+    const typename C3T3::Vertex_handle& vh)
+{
+  return vmap.index(vh);
+}
+
+
+// -----------------------------------
+// Null pmap
+// -----------------------------------  
+template <typename C3T3, typename Cell_pmap>
+struct Null_facet_pmap
+{
+  Null_facet_pmap(const C3T3&, const Cell_pmap&) {}
+};
+  
+template <typename C3T3, typename Cell_pmap>
+int get(const Null_facet_pmap<C3T3,Cell_pmap>&,
+        const typename C3T3::Facet&)
+{
+  return 0;
+}
+  
+template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
+struct Null_vertex_pmap
+{
+  Null_vertex_pmap(const C3T3&, const Cell_pmap&, const Facet_pmap&) {}
+};
+  
+template <typename C3T3, typename Cell_pmap, typename Facet_pmap>
+int get(const Null_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>&,
+        const typename C3T3::Vertex_handle&)
+{
+  return 0;
+}
+
+
+// -----------------------------------
+// Generator
+// -----------------------------------
+template <typename C3T3, bool rebind, bool no_patch>
+struct Medit_pmap_generator{};
+
+  
+template <typename C3T3>
+struct Medit_pmap_generator<C3T3, true, false>
+{
+  typedef Rebind_cell_pmap<C3T3>                            Cell_pmap;
+  typedef Rebind_facet_pmap<C3T3, Cell_pmap>                Facet_pmap;
+  typedef Null_facet_pmap<C3T3, Cell_pmap>                  Facet_pmap_twice;
+  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
+  
+  bool print_twice() { return false; }
+};
+  
+  
+template <typename C3T3>
+struct Medit_pmap_generator<C3T3, true, true>
+{
+  typedef Rebind_cell_pmap<C3T3>                            Cell_pmap;
+  typedef No_patch_facet_pmap_first<C3T3,Cell_pmap>         Facet_pmap;
+  typedef No_patch_facet_pmap_second<C3T3,Cell_pmap>        Facet_pmap_twice;
+  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
+  
+  bool print_twice() { return true; }
+};
+
+
+template <typename C3T3>
+struct Medit_pmap_generator<C3T3, false, true>
+{
+  typedef No_rebind_cell_pmap<C3T3>                         Cell_pmap;
+  typedef No_patch_facet_pmap_first<C3T3,Cell_pmap>         Facet_pmap;
+  typedef No_patch_facet_pmap_second<C3T3,Cell_pmap>        Facet_pmap_twice;
+  typedef Default_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>  Vertex_pmap;
+  
+  bool print_twice() { return true; }
+};
+  
+template <typename C3T3>
+struct Medit_pmap_generator<C3T3, false, false>
+{
+  typedef No_rebind_cell_pmap<C3T3>                         Cell_pmap;
+  typedef Rebind_facet_pmap<C3T3,Cell_pmap>                 Facet_pmap;
+  typedef Null_facet_pmap<C3T3, Cell_pmap>                  Facet_pmap_twice;
+  typedef Null_vertex_pmap<C3T3, Cell_pmap, Facet_pmap>     Vertex_pmap;
+  
+  bool print_twice() { return false; }
+};
+
+  
+//-------------------------------------------------------
+// IO functions
+//-------------------------------------------------------
+
+
+  
+template <class C3T3, bool rebind, bool no_patch>
+void
+output_to_medit(std::ostream& os,
+                const C3T3& c3t3)
+{
+#ifdef CGAL_MESH_3_IO_VERBOSE
+  std::cerr << "Output to medit:\n";
+#endif
+  
+  typedef Medit_pmap_generator<C3T3,rebind,no_patch> Generator;
+  typedef typename Generator::Cell_pmap Cell_pmap;
+  typedef typename Generator::Facet_pmap Facet_pmap;
+  typedef typename Generator::Facet_pmap_twice Facet_pmap_twice;
+  typedef typename Generator::Vertex_pmap Vertex_pmap;
+  
+  Cell_pmap cell_pmap(c3t3);
+  Facet_pmap facet_pmap(c3t3,cell_pmap);
+  Facet_pmap_twice facet_pmap_twice(c3t3,cell_pmap);
+  Vertex_pmap vertex_pmap(c3t3,cell_pmap,facet_pmap);
+  
+  output_to_medit(os,
+                  c3t3,
+                  vertex_pmap,
+                  facet_pmap,
+                  cell_pmap,
+                  facet_pmap_twice,
+                  Generator().print_twice());
+  
+#ifdef CGAL_MESH_3_IO_VERBOSE
+  std::cerr << "done.\n";
+#endif
+}
+
+
+  
+template <class C3T3,
+          class Vertex_index_property_map,
+          class Facet_index_property_map,
+          class Facet_index_property_map_twice,
+          class Cell_index_property_map>
+void
+output_to_medit(std::ostream& os,
+                const C3T3& c3t3,
+                const Vertex_index_property_map& vertex_pmap,
+                const Facet_index_property_map& facet_pmap,
+                const Cell_index_property_map& cell_pmap,
+                const Facet_index_property_map_twice& facet_twice_pmap = Facet_index_property_map_twice(),
+                const bool print_each_facet_twice = false)
+{
+  typedef typename C3T3::Triangulation Tr;
+  typedef typename C3T3::Facets_in_complex_iterator Facet_iterator;
+  typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+
+  typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+  typedef typename Tr::Point Point_3;
+
+  const Tr& tr = c3t3.triangulation();
+
+  //-------------------------------------------------------
+  // File output
+  //-------------------------------------------------------
+
+  //-------------------------------------------------------
+  // Header
+  //-------------------------------------------------------
+  os << std::setprecision(17);
+
+  os << "MeshVersionFormatted 1\n"
+     << "Dimension 3\n";
+
+
+  //-------------------------------------------------------
+  // Vertices
+  //-------------------------------------------------------
+  os << "Vertices\n" << tr.number_of_vertices() << '\n';
+
+  std::map<Vertex_handle, int> V;
+  int inum = 1;
+  for( Finite_vertices_iterator vit = tr.finite_vertices_begin();
+       vit != tr.finite_vertices_end();
+       ++vit)
+  {
+    V[vit] = inum++;
+    Point_3 p = vit->point();
+    os << CGAL::to_double(p.x()) << ' '
+       << CGAL::to_double(p.y()) << ' '
+       << CGAL::to_double(p.z()) << ' '
+       << get(vertex_pmap, vit)
+       << '\n';
+  }
+
+  //-------------------------------------------------------
+  // Facets
+  //-------------------------------------------------------
+  typename C3T3::size_type number_of_triangles = c3t3.number_of_facets_in_complex();
+  
+  if ( print_each_facet_twice )
+    number_of_triangles += number_of_triangles;
+  
+  os << "Triangles\n" 
+     << number_of_triangles << '\n';
+
+  for( Facet_iterator fit = c3t3.facets_in_complex_begin();
+       fit != c3t3.facets_in_complex_end();
+       ++fit)
+  {
+    for (int i=0; i<4; i++)
+    {
+      if (i != fit->second)
+      {
+        const Vertex_handle& vh = (*fit).first->vertex(i);
+        os << V[vh] << ' ';
+      }
+    }
+    os << get(facet_pmap, *fit) << '\n';
+    
+    // Print triangle again if needed
+    if ( print_each_facet_twice )
+    {
+      for (int i=0; i<4; i++)
+      {
+        if (i != fit->second)
+        {
+          const Vertex_handle& vh = (*fit).first->vertex(i);
+          os << V[vh] << ' ';
+        }
+      }
+      os << get(facet_twice_pmap, *fit) << '\n';
+    }
+  }
+
+  //-------------------------------------------------------
+  // Tetrahedra
+  //-------------------------------------------------------
+  os << "Tetrahedra\n"
+     << c3t3.number_of_cells_in_complex() << '\n';
+
+  for( Cell_iterator cit = c3t3.cells_in_complex_begin() ;
+       cit != c3t3.cells_in_complex_end() ;
+       ++cit )
+  {
+    for (int i=0; i<4; i++)
+      os << V[cit->vertex(i)] << ' ';
+
+    os << get(cell_pmap, cit) << '\n';
+  }
+
+  //-------------------------------------------------------
+  // End
+  //-------------------------------------------------------
+  os << "End\n";
+
+} // end output_to_medit(...)
+
+} // end namespace Mesh_3
+
+  
+
+  
+/**
+ * @brief outputs mesh to medit format
+ * @param os the stream
+ * @param c3t3 the mesh
+ * @param rebind if true, labels of cells are rebinded into [1..nb_of_labels]
+ * @param show_patches if true, patches are labeled with different labels than
+ * cells. If false, each surface facet is written twice, using label of
+ * each adjacent cell.
+ */
+template <class C3T3>
+void
+output_to_medit(std::ostream& os,
+                const C3T3& c3t3,
+                bool rebind = false,
+                bool show_patches = false) 
+{
+  if ( rebind )
+  {
+    if ( show_patches )
+      Mesh_3::output_to_medit<C3T3,true,false>(os,c3t3);
+    else
+      Mesh_3::output_to_medit<C3T3,true,true>(os,c3t3);
+  }
+  else
+  {
+    if ( show_patches )
+      Mesh_3::output_to_medit<C3T3,false,false>(os,c3t3);
+    else
+      Mesh_3::output_to_medit<C3T3,false,true>(os,c3t3);
+  }
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_IO_FILE_MEDIT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_poly.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_poly.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/File_poly.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/File_poly.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF.h
new file mode 100644
index 0000000..a8a6dc9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF.h
@@ -0,0 +1,470 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_IO_FILE_SCANNER_OFF_H
+#define CGAL_IO_FILE_SCANNER_OFF_H 1
+
+#include <CGAL/basic.h>
+#include <cstddef>
+#include <CGAL/IO/binary_file_io.h>
+#include <CGAL/IO/File_header_OFF.h>
+#include <iostream>
+#include <boost/cstdint.hpp>
+
+#include <CGAL/Point_3.h>
+#include <CGAL/Vector_3.h>
+
+namespace CGAL {
+
+class CGAL_EXPORT File_scanner_OFF : public File_header_OFF {
+    std::istream&  m_in;
+    bool           normals_read;
+    void skip_comment() { m_in >> skip_comment_OFF; }
+public:
+    File_scanner_OFF( std::istream& in, bool verbose = false)
+      : File_header_OFF(verbose), m_in(in), normals_read(false) {
+        in >> static_cast<File_header_OFF&>( *this);
+    }
+    File_scanner_OFF( std::istream& in, const File_header_OFF& header)
+      : File_header_OFF(header), m_in(in), normals_read(false) {}
+
+    std::istream& in() { return m_in; }
+
+    // The scan_vertex() routine is provided for multiple
+    // coordinate types to support parameterized polytopes.
+    void scan_vertex( float&  x, float&  y, float&  z) {
+        if ( binary()) {
+            I_Binary_read_big_endian_float32( m_in, x);
+            I_Binary_read_big_endian_float32( m_in, y);
+            I_Binary_read_big_endian_float32( m_in, z);
+            if ( is_homogeneous()) {
+                float w;
+                I_Binary_read_big_endian_float32( m_in, w);
+                x /= w;
+                y /= w;
+                z /= w;
+            }
+        } else {
+            skip_comment();
+            m_in >> iformat(x) >> iformat(y) >> iformat(z);
+            if ( is_homogeneous()) {
+                float w;
+                m_in >> iformat(w);
+                x /= w;
+                y /= w;
+                z /= w;
+            }
+        }
+    }
+    void scan_vertex( double& x, double& y, double& z) {
+        if ( binary()) {
+            float f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            x = f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            y = f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            z = f;
+            if ( is_homogeneous()) {
+                I_Binary_read_big_endian_float32( m_in, f);
+                x /= f;
+                y /= f;
+                z /= f;
+            }
+        } else {
+            skip_comment();
+            m_in >> iformat(x) >> iformat(y) >> iformat(z);
+            if ( is_homogeneous()) {
+                double w;
+                m_in >> iformat(w);
+                x /= w;
+                y /= w;
+                z /= w;
+            }
+        }
+    }
+    void scan_vertex( int& x, int& y, int& z) {
+        if ( binary()) {
+            float fx, fy, fz;
+            I_Binary_read_big_endian_float32( m_in, fx);
+            I_Binary_read_big_endian_float32( m_in, fy);
+            I_Binary_read_big_endian_float32( m_in, fz);
+            if ( is_homogeneous()) {
+                float fw;
+                I_Binary_read_big_endian_float32( m_in, fw);
+                x = int( fx / fw);
+                y = int( fy / fw);
+                z = int( fz / fw);
+            } else {
+                x = int(fx);
+                y = int(fy);
+                z = int(fz);
+            }
+        } else {
+            skip_comment();
+            if ( is_homogeneous()) {
+                double fx, fy, fz, fw;
+                m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
+                x = int( fx / fw);
+                y = int( fy / fw);
+                z = int( fz / fw);
+            } else {
+                double d;
+                m_in >> iformat(d);
+                x = int(d);
+                m_in >> iformat(d);
+                y = int(d);
+                m_in >> iformat(d);
+                z = int(d);
+            }
+        }
+    }
+
+    void scan_vertex( float&  x, float&  y, float&  z, float&  w) {
+        w = 1;
+        if ( binary()) {
+            I_Binary_read_big_endian_float32( m_in, x);
+            I_Binary_read_big_endian_float32( m_in, y);
+            I_Binary_read_big_endian_float32( m_in, z);
+            if ( is_homogeneous())
+                I_Binary_read_big_endian_float32( m_in, w);
+        } else {
+            skip_comment();
+            m_in >> iformat(x) >> iformat(y) >> iformat(z);
+            if ( is_homogeneous())
+              m_in >> iformat(w);
+        }
+    }
+    void scan_vertex( double& x, double& y, double& z, double& w) {
+        w = 1;
+        if ( binary()) {
+            float f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            x = f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            y = f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            z = f;
+            if ( is_homogeneous()) {
+                I_Binary_read_big_endian_float32( m_in, f);
+                w = f;
+            }
+        } else {
+            skip_comment();
+            m_in >> iformat(x);
+            m_in >> iformat(y);
+            m_in >> iformat(z);
+            if ( is_homogeneous())
+              m_in >> iformat(w);
+        }
+    }
+    void scan_vertex( int& x, int& y, int& z, int& w) {
+        w = 1;
+        if ( binary()) {
+            float f;
+            I_Binary_read_big_endian_float32( m_in, f);
+            x = int(f);
+            I_Binary_read_big_endian_float32( m_in, f);
+            y = int(f);
+            I_Binary_read_big_endian_float32( m_in, f);
+            z = int(f);
+            if ( is_homogeneous()) {
+                I_Binary_read_big_endian_float32( m_in, f);
+                w = int(f);
+            }
+        } else {
+            skip_comment();
+            double d;
+            m_in >> iformat(d);
+            x = int(d);
+            m_in >> iformat(d);
+            y = int(d);
+            m_in >> iformat(d);
+            z = int(d);
+            if ( is_homogeneous()) {
+                m_in >> iformat(d);
+                w = int(d);
+            }
+        }
+    }
+
+    void scan_normal( float&  x, float&  y, float&  z) {
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                I_Binary_read_big_endian_float32( m_in, x);
+                I_Binary_read_big_endian_float32( m_in, y);
+                I_Binary_read_big_endian_float32( m_in, z);
+                if ( is_homogeneous()) {
+                    float w;
+                    I_Binary_read_big_endian_float32( m_in, w);
+                    x /= w;
+                    y /= w;
+                    z /= w;
+                }
+            } else {
+                m_in >> iformat(x) >> iformat(y) >> iformat(z);
+                if ( is_homogeneous()) {
+                    float w;
+                    m_in >> iformat(w);
+                    x /= w;
+                    y /= w;
+                    z /= w;
+                }
+            }
+        }
+    }
+    void scan_normal( double& x, double& y, double& z) {
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                float fx, fy, fz;
+                I_Binary_read_big_endian_float32( m_in, fx);
+                I_Binary_read_big_endian_float32( m_in, fy);
+                I_Binary_read_big_endian_float32( m_in, fz);
+                if ( is_homogeneous()) {
+                    float fw;
+                    I_Binary_read_big_endian_float32( m_in, fw);
+                    x = fx / fw;
+                    y = fy / fw;
+                    z = fz / fw;
+                } else {
+                    x = fx;
+                    y = fy;
+                    z = fz;
+                }
+            } else {
+                if ( is_homogeneous()) {
+                    float fx, fy, fz, fw;
+                    m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
+                    x = fx / fw;
+                    y = fy / fw;
+                    z = fz / fw;
+                } else
+                    m_in >> iformat(x) >> iformat(y) >> iformat(z);
+            }
+        }
+    }
+    void scan_normal( int& x, int& y, int& z) {
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                float fx, fy, fz;
+                I_Binary_read_big_endian_float32( m_in, fx);
+                I_Binary_read_big_endian_float32( m_in, fy);
+                I_Binary_read_big_endian_float32( m_in, fz);
+                if ( is_homogeneous()) {
+                    float fw;
+                    I_Binary_read_big_endian_float32( m_in, fw);
+                    x = int( fx / fw);
+                    y = int( fy / fw);
+                    z = int( fz / fw);
+                } else {
+                    x = int(fx);
+                    y = int(fy);
+                    z = int(fz);
+                }
+            } else {
+                if ( is_homogeneous()) {
+                    float fx, fy, fz, fw;
+                    m_in >> iformat(fx) >> iformat(fy) >> iformat(fz) >> iformat(fw);
+                    x = int( fx / fw);
+                    y = int( fy / fw);
+                    z = int( fz / fw);
+                } else {
+                    double d;
+                    m_in >> iformat(d);
+                    x = int(d);
+                    m_in >> iformat(d);
+                    y = int(d);
+                    m_in >> iformat(d);
+                    z = int(d);
+                }
+            }
+        }
+    }
+
+    void scan_normal( float&  x, float&  y, float&  z, float&  w) {
+        w = 1;
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                I_Binary_read_big_endian_float32( m_in, x);
+                I_Binary_read_big_endian_float32( m_in, y);
+                I_Binary_read_big_endian_float32( m_in, z);
+                if ( is_homogeneous())
+                    I_Binary_read_big_endian_float32( m_in, w);
+            } else {
+                m_in >> iformat(x) >> iformat(y) >> iformat(z);
+                if ( is_homogeneous())
+                    m_in >> iformat(w);
+            }
+        }
+    }
+    void scan_normal( double& x, double& y, double& z, double& w) {
+        w = 1;
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                float f;
+                I_Binary_read_big_endian_float32( m_in, f);
+                x = f;
+                I_Binary_read_big_endian_float32( m_in, f);
+                y = f;
+                I_Binary_read_big_endian_float32( m_in, f);
+                z = f;
+                if ( is_homogeneous()) {
+                    I_Binary_read_big_endian_float32( m_in, f);
+                    w = f;
+                }
+            } else {
+                m_in >> iformat(x) >> iformat(y) >> iformat(z);
+                if ( is_homogeneous())
+                    m_in >> iformat(w);
+            }
+        }
+    }
+    void scan_normal( int& x, int& y, int& z, int& w) {
+        w = 1;
+        if ( has_normals()) {
+            normals_read = true;
+            if ( binary()) {
+                float f;
+                I_Binary_read_big_endian_float32( m_in, f);
+                x = int(f);
+                I_Binary_read_big_endian_float32( m_in, f);
+                y = int(f);
+                I_Binary_read_big_endian_float32( m_in, f);
+                z = int(f);
+                if ( is_homogeneous()) {
+                    I_Binary_read_big_endian_float32( m_in, f);
+                    w = int(f);
+                }
+            } else {
+                double d;
+                m_in >> iformat(d);
+                x = int(d);
+                m_in >> iformat(d);
+                y = int(d);
+                m_in >> iformat(d);
+                z = int(d);
+                if ( is_homogeneous()) {
+                    m_in >> iformat(d);
+                    w = int(d);
+                }
+            }
+        }
+    }
+
+  void skip_to_next_vertex( std::size_t current_vertex);
+
+  void scan_facet( std::size_t& size, std::size_t CGAL_assertion_code(current_facet)) {
+        CGAL_assertion( current_facet < size_of_facets());
+        if ( binary()){
+            boost::int32_t i32;
+            I_Binary_read_big_endian_integer32( m_in, i32);
+            size = i32;
+        } else {
+            skip_comment();
+            m_in >> size;
+        }
+    }
+
+  void scan_facet_vertex_index( std::size_t& index,
+                                std::size_t current_facet) {
+    if ( binary()){
+      boost::int32_t i32;
+      I_Binary_read_big_endian_integer32( m_in, i32);
+      index = i32;
+    } else
+      m_in >> index;
+
+    if( m_in.fail()) {
+      if ( verbose()) {
+        std::cerr << " " << std::endl;
+        std::cerr << "File_scanner_OFF::" << std::endl;
+        std::cerr << "scan_facet_vertex_index(): input error:  "
+          "cannot read OFF file beyond facet "
+                  << current_facet << "." << std::endl;
+      }
+      set_off_header( false);
+      return;
+    }
+    bool error  = index < index_offset();
+    index -= index_offset();
+
+    if(error || (index >= size_of_vertices())) {
+      m_in.clear( std::ios::failbit);
+      if ( verbose()) {
+        std::cerr << " " << std::endl;
+        std::cerr << "File_scanner_OFF::" << std::endl;
+        std::cerr << "scan_facet_vertex_index(): input error: "
+          "facet " << current_facet << ": vertex index "
+                  << index + index_offset() << ": is out of range."
+                  << std::endl;
+      }
+      set_off_header( false);
+      return;
+    }
+  }
+
+  void skip_to_next_facet( std::size_t current_facet);
+};
+
+template < class Point> inline
+Point&
+file_scan_vertex( File_scanner_OFF& scanner, Point& p) {
+    typedef typename Point::R R;
+    typedef typename R::RT    RT;
+    double x, y, z, w;
+    scanner.scan_vertex( x, y, z, w);
+    if ( w == 1)
+        p = Point( RT(x), RT(y), RT(z));
+    else
+        p = Point( RT(x), RT(y), RT(z), RT(w));
+    return p;
+}
+
+template < class Vector> inline
+Vector&
+file_scan_normal( File_scanner_OFF& scanner, Vector& v) {
+    typedef typename Vector::R R;
+    typedef typename R::RT     RT;
+    double x, y, z, w;
+    scanner.scan_normal( x, y, z, w);
+    if ( w == 1)
+        v = Vector( RT(x), RT(y), RT(z));
+    else
+        v = Vector( RT(x), RT(y), RT(z), RT(w));
+    return v;
+}
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_scanner_OFF_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_SCANNER_OFF_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF_impl.h
new file mode 100644
index 0000000..36e2e8d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_scanner_OFF_impl.h
@@ -0,0 +1,133 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <cstdlib>
+#include <iostream>
+#include <CGAL/IO/binary_file_io.h>
+#include <CGAL/IO/File_scanner_OFF.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+void
+File_scanner_OFF::
+skip_to_next_vertex( std::size_t current_vertex) {
+    CGAL_assertion( current_vertex < size_of_vertices());
+    if ( binary()) {
+        float f;
+        if ( has_normals() && ! normals_read) {
+            I_Binary_read_big_endian_float32( m_in, f);
+            I_Binary_read_big_endian_float32( m_in, f);
+            I_Binary_read_big_endian_float32( m_in, f);
+            if ( is_homogeneous())
+                I_Binary_read_big_endian_float32( m_in, f);
+        }
+        if ( has_colors()) {
+            // It is not well stated in the Geomview manual
+            // how color is coded following a vertex. It is
+            // parsed similar to the optional color for facets.
+	    boost::int32_t k;
+            I_Binary_read_big_endian_integer32( m_in, k);
+            if (k<0 || k>4) {
+                m_in.clear( std::ios::badbit);
+                if ( verbose()) {
+                    std::cerr << " " << std::endl;
+                    std::cerr << "File_scanner_OFF::" << std::endl;
+                    std::cerr << "skip_to_next_vertex(): input error: bad "
+                                 " number of color indices at vertex "
+                              << current_vertex << "." << std::endl;
+                }
+                set_off_header( false);
+                return;
+            }
+            while (k--) {
+                float dummy;
+                I_Binary_read_big_endian_float32( m_in, dummy);
+            }
+        }
+    } else {
+        if ( has_normals() && ! normals_read) {
+            double dummy;
+            if ( is_homogeneous()) {
+                m_in >> dummy >> dummy >> dummy >> dummy;
+            } else {
+                m_in >> dummy >> dummy >> dummy;
+            }
+        }
+        if ( has_colors()) { // skip color entries (1 to 4)
+            m_in >> skip_until_EOL;
+        }
+    }
+    if( ! m_in) {
+        if ( verbose()) {
+            std::cerr << " " << std::endl;
+            std::cerr << "File_scanner_OFF::" << std::endl;
+            std::cerr << "skip_to_next_vertex(): input error: cannot read "
+                         "OFF file beyond vertex " << current_vertex << "."
+                      << std::endl;
+        }
+        set_off_header( false);
+        return;
+    }
+    normals_read = false;
+}
+
+CGAL_INLINE_FUNCTION
+void
+File_scanner_OFF::
+skip_to_next_facet( std::size_t current_facet) {
+    // Take care of trailing informations like color triples.
+    if ( binary()) {
+        boost::int32_t k;
+        I_Binary_read_big_endian_integer32( m_in, k);
+        if (k<0 || k>4) {
+            m_in.clear( std::ios::badbit);
+            if ( verbose()) {
+                std::cerr << " " << std::endl;
+                std::cerr << "File_scanner_OFF::" << std::endl;
+                std::cerr << "skip_to_next_facet(): input error: bad "
+                             "number of color indices at vertex "
+                          << current_facet << "." << std::endl;
+            }
+            set_off_header( false);
+            return;
+        }
+        while (k--) {
+            float dummy;
+            I_Binary_read_big_endian_float32( m_in, dummy);
+        }
+    } else {
+        m_in >> skip_until_EOL;
+    }
+}
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/File_tetgen.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_tetgen.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/File_tetgen.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/File_tetgen.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF.h
new file mode 100644
index 0000000..1255567
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF.h
@@ -0,0 +1,113 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_IO_FILE_WRITER_OFF_H
+#define CGAL_IO_FILE_WRITER_OFF_H 1
+
+#include <CGAL/IO/binary_file_io.h>
+#include <CGAL/IO/File_header_OFF.h>
+#include <iostream>
+#include <cstddef>
+
+namespace CGAL {
+
+class CGAL_EXPORT File_writer_OFF {
+    std::ostream*           m_out;
+    File_header_OFF         m_header;
+public:
+    File_writer_OFF( bool verbose = false) : m_header( verbose) {}
+    File_writer_OFF( const File_header_OFF& h) : m_header( h) {}
+
+    std::ostream&           out()          { return *m_out;   }
+    File_header_OFF&        header()       { return m_header; }
+    const File_header_OFF&  header() const { return m_header; }
+
+    void write_header( std::ostream& out,
+                       std::size_t   vertices,
+                       std::size_t   halfedges,
+                       std::size_t   facets,
+                       bool          normals = false);
+    void write_footer() {
+        if ( m_header.ascii() && m_header.comments())
+            out() << "\n\n# End of OFF #";
+        out() << std::endl;
+    }
+    void write_vertex( const double& x, const double& y, const double& z) {
+        if ( m_header.binary()) {
+            I_Binary_write_big_endian_float32( out(), float(x));
+            I_Binary_write_big_endian_float32( out(), float(y));
+            I_Binary_write_big_endian_float32( out(), float(z));
+        } else {
+            out() << '\n' << x << ' ' << y << ' ' << z;
+        }
+    }
+    void write_normal( const double& x, const double& y, const double& z) {
+        if ( m_header.binary()) {
+            I_Binary_write_big_endian_float32( out(), float(x));
+            I_Binary_write_big_endian_float32( out(), float(y));
+            I_Binary_write_big_endian_float32( out(), float(z));
+        } else {
+            out() << ' ' << ' ' << x << ' ' << y << ' ' << z;
+        }
+    }
+    void write_facet_header() {
+        if ( m_header.ascii()) {
+            if ( m_header.no_comments())
+                out() << '\n';
+            else {
+                out() << "\n\n# " << m_header.size_of_facets()
+                       << " facets\n";
+                out() << "# ------------------------------------------"
+                          "\n\n";
+            }
+        }
+    }
+    void write_facet_begin( std::size_t no) {
+        if ( m_header.binary())
+          I_Binary_write_big_endian_integer32( out(), static_cast<boost::int32_t>(no));
+        else
+            out() << no << ' ';
+    }
+    void write_facet_vertex_index( std::size_t index) {
+        if ( m_header.binary())
+          I_Binary_write_big_endian_integer32( out(), static_cast<boost::int32_t>(index));
+        else
+            out() << ' ' << index;
+    }
+    void write_facet_end() {
+        if ( m_header.binary())
+            I_Binary_write_big_endian_integer32( out(), 0);
+        else
+            out() << '\n';
+    }
+};
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_writer_OFF_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_WRITER_OFF_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF_impl.h
new file mode 100644
index 0000000..936e8d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_OFF_impl.h
@@ -0,0 +1,56 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <CGAL/IO/File_writer_OFF.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_OFF::
+write_header( std::ostream& o,
+              std::size_t   vertices,
+              std::size_t   halfedges,
+              std::size_t   facets,
+              bool          normals) {
+    m_out = &o;
+    m_header.set_vertices(  vertices);
+    // Don't. This halfdges aren't trusted:
+    // m_header.set_halfedges( halfedges);
+    (void)halfedges;
+    m_header.set_facets(  facets);
+    m_header.set_normals( normals);
+    // Print header.
+    out() << m_header;
+}
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2.h
new file mode 100644
index 0000000..69b7c0f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2.h
@@ -0,0 +1,64 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_IO_FILE_WRITER_VRML_2_H
+#define CGAL_IO_FILE_WRITER_VRML_2_H 1
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <cstddef>
+
+namespace CGAL {
+
+class CGAL_EXPORT File_writer_VRML_2 {
+    std::ostream*      m_out;
+    std::size_t        m_facets;
+public:
+    File_writer_VRML_2() {}
+    std::ostream& out() const { return *m_out; }
+    void write_header( std::ostream& o,
+                       std::size_t vertices,
+                       std::size_t halfedges,
+                       std::size_t facets);
+    void write_footer() const;
+    void write_vertex( const double& x, const double& y, const double& z) {
+        out() << "                                "
+              << x << ' ' << y << ' ' << z << ',' << '\n';
+    }
+    void write_facet_header() const;
+    void write_facet_begin( std::size_t) {
+        out() << "                            ";
+    }
+    void write_facet_vertex_index( std::size_t idx) { out() << idx << ',';}
+    void write_facet_end() { out() << "-1,\n"; }
+};
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_writer_VRML_2_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_WRITER_VRML_2_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2_impl.h
new file mode 100644
index 0000000..7e80771
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_VRML_2_impl.h
@@ -0,0 +1,82 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <CGAL/IO/File_writer_VRML_2.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_VRML_2::
+write_header( std::ostream& o,
+              std::size_t   vertices,
+              std::size_t   halfedges,
+              std::size_t   facets) {
+    m_out    = &o;
+    m_facets = facets;
+
+    out() << "        #-- Begin of Polyhedron_3\n";
+    out() << "        # " << vertices  << " vertices\n";
+    out() << "        # " << halfedges << " halfedges\n";
+    out() << "        # " << facets    << " facets\n";
+    out() << "        Group {\n"
+             "            children [\n"
+             "                Shape {\n"
+             "                    appearance Appearance { material "
+                                               "USE Material }\n"
+             "                    geometry IndexedFaceSet {\n"
+             "                        convex FALSE\n"
+             "                        solid  FALSE\n"
+             "                        coord  Coordinate {\n"
+             "                            point [" << std::endl;
+}
+
+void
+File_writer_VRML_2::
+write_facet_header() const {
+    out() << "                            ] #point\n"
+             "                        } #coord Coordinate\n"
+             "                        coordIndex  [" << std::endl;
+}
+
+void
+File_writer_VRML_2::
+write_footer() const {
+    out() << "                        ] #coordIndex\n"
+             "                    } #geometry\n"
+             "                } #Shape\n"
+             "            ] #children\n"
+             "        } #Group" << std::endl;
+}
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor.h
new file mode 100644
index 0000000..4b49bee
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor.h
@@ -0,0 +1,61 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_IO_FILE_WRITER_INVENTOR_H
+#define CGAL_IO_FILE_WRITER_INVENTOR_H 1
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <cstddef>
+
+namespace CGAL {
+
+class CGAL_EXPORT File_writer_inventor {
+    std::ostream*      m_out;
+    std::size_t        m_facets;
+public:
+    File_writer_inventor() {}
+    std::ostream& out() const { return *m_out; }
+    void write_header( std::ostream& o,
+                       std::size_t vertices,
+                       std::size_t halfedges,
+                       std::size_t facets);
+    void write_footer() const;
+    void write_vertex( const double& x, const double& y, const double& z) {
+        out() << "            " << x << ' ' << y << ' ' << z << ',' <<'\n';
+    }
+    void write_facet_header() const;
+    void write_facet_begin( std::size_t) { out() << "            "; }
+    void write_facet_vertex_index( std::size_t idx) { out() << idx << ',';}
+    void write_facet_end() { out() << "-1,\n"; }
+};
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_writer_inventor_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_WRITER_INVENTOR_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor_impl.h
new file mode 100644
index 0000000..3cfda77
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_inventor_impl.h
@@ -0,0 +1,73 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/IO/File_writer_inventor.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_inventor::
+write_header( std::ostream& o,
+              std::size_t   vertices,
+              std::size_t   halfedges,
+              std::size_t   facets){
+    m_out    = &o;
+    m_facets = facets;
+    out() << "# " << vertices  << " vertices\n";
+    out() << "# " << halfedges << " halfedges\n";
+    out() << "# " << facets    << " facets\n\n";
+    out() << "Separator {\n"
+             "    Coordinate3 {\n"
+             "        point   [" << std::endl;
+}
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_inventor::
+write_facet_header() const {
+    out() << "        ] #point\n"
+             "    } #Coordinate3\n"
+             "    # " << m_facets << " facets\n"
+             "    IndexedFaceSet {\n"
+             "        coordIndex [\n";
+}
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_inventor::
+write_footer() const {
+    out() << "        ] #coordIndex\n"
+             "    } #IndexedFaceSet\n"
+             "} #Separator" << std::endl;
+}
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront.h
new file mode 100644
index 0000000..bd4fee5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront.h
@@ -0,0 +1,65 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_IO_FILE_WRITER_WAVEFRONT_H
+#define CGAL_IO_FILE_WRITER_WAVEFRONT_H 1
+
+#include <CGAL/IO/binary_file_io.h>
+#include <iostream>
+#include <cstddef>
+
+namespace CGAL {
+
+class CGAL_EXPORT File_writer_wavefront {
+    std::ostream*  m_out;
+    std::size_t    m_facets;
+public:
+    std::ostream& out() const { return *m_out; }
+    void write_header( std::ostream& out,
+                       std::size_t vertices,
+                       std::size_t halfedges,
+                       std::size_t facets);
+    void write_footer() const {
+        out() << "\n# End of Wavefront obj format #" << std::endl;
+    }
+    void write_vertex( const double& x, const double& y, const double& z) {
+        out() << "v " << x << ' ' << y << ' ' << z << '\n';
+    }
+    void write_facet_header() {
+        out() << "\n# " << m_facets << " facets\n";
+        out() << "# ------------------------------------------\n\n";
+    }
+    void write_facet_begin( std::size_t)            { out() << "f "; }
+    void write_facet_vertex_index( std::size_t idx) { out() << ' ' << idx+1; }
+    void write_facet_end()                          { out() << '\n'; }
+};
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/File_writer_wavefront_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_FILE_WRITER_WAVEFRONT_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront_impl.h
new file mode 100644
index 0000000..82691d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/File_writer_wavefront_impl.h
@@ -0,0 +1,57 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <CGAL/IO/File_writer_wavefront.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+void
+File_writer_wavefront::
+write_header( std::ostream& o,
+              std::size_t   vertices,
+              std::size_t   halfedges,
+              std::size_t   facets){
+    m_out    = &o;
+    m_facets = facets;
+    // Print header.
+    out() << "# file written from a CGAL tool in Wavefront obj format\n";
+    out() << "# " << vertices  << " vertices\n";
+    out() << "# " << halfedges << " halfedges\n";
+    out() << "# " << facets    << " facets\n\n";
+
+    out() << "\n# " << vertices << " vertices\n";
+    out() << "# ------------------------------------------\n\n";
+}
+
+} //namespace CGAL
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Generic_writer.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Generic_writer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Generic_writer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Generic_writer.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream.h
new file mode 100644
index 0000000..daaa728
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream.h
@@ -0,0 +1,605 @@
+// Copyright (c) 1997,1998,1999,2000,2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Sylvain Pion
+
+#ifndef CGAL_GEOMVIEW_STREAM_H
+#define CGAL_GEOMVIEW_STREAM_H
+
+#include <CGAL/basic.h>
+
+#ifdef CGAL_USE_GEOMVIEW
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/IO/Color.h>
+#include <CGAL/IO/Ostream_iterator.h>
+
+#include <CGAL/export/CGAL.h>
+
+#include <map>
+#include <vector>
+#include <utility>
+#include <string>
+#include <iterator>
+#include <algorithm>
+
+namespace CGAL {
+
+class CGAL_EXPORT Geomview_stream {
+public:
+    Geomview_stream(const Bbox_3 &bbox = Bbox_3(0,0,0, 1,1,1),
+		    const char *machine = NULL,
+		    const char *login = NULL);
+
+    ~Geomview_stream();
+
+    Geomview_stream &operator<<(const Color &c);
+    Geomview_stream &operator<<(const std::string & s);
+    Geomview_stream &operator<<(int i);
+    Geomview_stream &operator<<(unsigned int i);
+    Geomview_stream &operator<<(long i);
+    Geomview_stream &operator<<(unsigned long i);
+    Geomview_stream &operator<<(double d);
+
+    template < class InputIterator >
+    void
+    draw_triangles(InputIterator begin, InputIterator end);
+
+    Geomview_stream &operator>>(char *expr);
+
+    void clear();
+    void look_recenter();
+
+    void set_bg_color(const Color &c);
+
+    Color get_vertex_color() const;
+    Color get_edge_color() const;
+    Color get_face_color() const;
+
+    Color set_vertex_color(const Color&);
+    Color set_edge_color(const Color&);
+    Color set_face_color(const Color&);
+
+    double vcr() const;
+    double vcg() const;
+    double vcb() const;
+
+    double ecr() const;
+    double ecg() const;
+    double ecb() const;
+
+    double fcr() const;
+    double fcg() const;
+    double fcb() const;
+
+    double get_vertex_radius() const
+    {
+	return radius;
+    }
+    double set_vertex_radius(double r)
+    {
+	std::swap(r, radius);
+	return r;
+    }
+
+    int get_line_width() const
+    {
+	return line_width;
+    }
+    int set_line_width(int w)
+    {
+	std::swap(w, line_width);
+        return w;
+    }
+
+    bool set_wired(bool b)
+    {
+	std::swap(b, wired_flag);
+	return b;
+    }
+    bool get_wired() const
+    {
+	return wired_flag;
+    }
+
+    bool set_echo(bool b)
+    {
+	std::swap(b, echo_flag);
+	return b;
+    }
+    bool get_echo() const
+    {
+	return echo_flag;
+    }
+
+    bool set_raw(bool b)
+    {
+	std::swap(b, raw_flag);
+	return b;
+    }
+    bool get_raw() const
+    {
+	return raw_flag;
+    }
+
+    bool set_trace(bool b)
+    {
+	std::swap(b, trace_flag);
+	return b;
+    }
+    bool get_trace() const
+    {
+	return trace_flag;
+    }
+
+    void trace(const std::string s) const
+    {
+        if (get_trace())
+            std::cerr << s;
+    }
+    void trace(double d) const
+    {
+        if (get_trace())
+            std::cerr << d << ' ';
+    }
+    void trace(int i) const
+    {
+        if (get_trace())
+            std::cerr << i << ' ';
+    }
+    void trace(unsigned int i) const
+    {
+        if (get_trace())
+            std::cerr << i << ' ';
+    }
+
+    bool set_binary_mode(bool b = true)
+    {
+	std::swap(b, binary_flag);
+	return b;
+    }
+    bool set_ascii_mode(bool b = true)
+    {
+	return !set_binary_mode(!b);
+    }
+    bool get_binary_mode() const
+    {
+	return binary_flag;
+    }
+    bool get_ascii_mode() const
+    {
+	return !binary_flag;
+    }
+
+    std::string get_new_id(const std::string & s);
+
+    const Bbox_3 & get_bbox()
+    {
+	return bb;
+    }
+
+    void pickplane()
+    {
+        pickplane(get_bbox());
+    }
+
+    static char* nth(char* s, int count);
+    static void parse_point(const char* pickpoint,
+		     double &x, double &y, double &z, double &w);
+private:
+    void setup_geomview(const char *machine, const char *login);
+    void frame(const Bbox_3 &bbox);
+    void pickplane(const Bbox_3 &bbox);
+
+    Bbox_3 bb;
+    Color vertex_color, edge_color, face_color;
+    bool wired_flag;  // decides if we draw surfaces or edges.
+    bool echo_flag;   // decides if we echo the point we get back to Geomview.
+    bool raw_flag;    // decides if we output footers and headers.
+    bool trace_flag;  // makes operator<<() write a trace on cerr.
+    bool binary_flag; // makes operator<<() write binary format
+    int line_width;   // width of edges
+    double radius;    // radius of vertices
+    int in, out;      // file descriptors for input and output pipes
+    int pid;          // the geomview process identification
+    std::map<std::string, int> id; // used to get a unique ID per type.
+};
+
+// Factorize code for Point_2 and Point_3.
+template < class FT >
+void
+output_point(Geomview_stream &gv, const FT &x, const FT &y, const FT &z)
+{
+    bool ascii_bak = true; // the initialization value shuts up the compiler.
+    if (!gv.get_raw()) {
+    	ascii_bak = gv.set_ascii_mode();
+    	gv << "(geometry " << gv.get_new_id("P")
+       	   << " {appearance {linewidth 5 material {edgecolor "
+           << gv.vcr() << gv.vcg() << gv.vcb() << "}}{SKEL 1 1 ";
+    }
+
+    gv << CGAL::to_double(x) << CGAL::to_double(y) << CGAL::to_double(z);
+
+    if (!gv.get_raw()) {
+        gv << "1 0\n}})";
+    	gv.set_ascii_mode(ascii_bak);
+    }
+}
+
+#if defined CGAL_POINT_2_H && \
+   !defined CGAL_GV_OUT_POINT_2_H
+#define CGAL_GV_OUT_POINT_2_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Point_2<R> &p)
+{
+    typename R::FT zero(0);
+    output_point(gv, p.x(), p.y(), zero);
+    return gv;
+}
+#endif
+
+#if defined CGAL_POINT_3_H && \
+   !defined CGAL_GV_OUT_POINT_3_H
+#define CGAL_GV_OUT_POINT_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Point_3<R> &p)
+{
+    output_point(gv, p.x(), p.y(), p.z());
+    return gv;
+}
+#endif
+
+// The following code is the same for Segment_2 and Segment_3.
+template < class Segment >
+void
+output_segment(Geomview_stream &gv, const Segment &segment)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Seg")
+       << " {appearance {linewidth "
+       << gv.get_line_width() << "}{VECT "
+       << 1 <<  2 << 1    // 1 polyline, two vertices, 1 color
+       << 2               // the first polyline contains 2 vertices
+       << 1;              // and it has 1 color
+
+    // here are start and end points
+    bool raw_bak = gv.set_raw(true);
+    gv << segment.source() << segment.target();
+    gv.set_raw(raw_bak);
+
+    // and the color of the segment and its opaqueness
+    gv << gv.ecr() << gv.ecg() << gv.ecb() << 1.0 << "}})";
+    gv.set_ascii_mode(ascii_bak);
+}
+
+#if defined CGAL_SEGMENT_2_H && \
+   !defined CGAL_GV_OUT_SEGMENT_2_H
+#define CGAL_GV_OUT_SEGMENT_2_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Segment_2<R> &segment)
+{
+    output_segment(gv, segment);
+    return gv;
+}
+#endif
+
+#if defined CGAL_SEGMENT_3_H && \
+   !defined CGAL_GV_OUT_SEGMENT_3_H
+#define CGAL_GV_OUT_SEGMENT_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Segment_3<R> &segment)
+{
+    output_segment(gv, segment);
+    return gv;
+}
+#endif
+
+// The following code is the same for Triangle_2 and Triangle_3.
+template < class Triangle >
+void
+output_triangle(Geomview_stream &gv, const Triangle &triangle)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Tr")
+       << " {appearance {+edge material {edgecolor "
+       << gv.ecr()  << gv.ecg()  << gv.ecb() <<  " } shading constant}{ ";
+    gv.set_binary_mode();
+    // it's a planar polygon
+    gv << "OFF BINARY\n"
+
+    // it has 3 vertices, 1 face and 3 edges
+       << 3 << 1 << 3;
+
+    bool raw_bak = gv.set_raw(true);
+    for(int i=0; i<3; i++)
+        gv << triangle[i];
+    gv.set_raw(raw_bak);
+
+    // the face
+    gv << 3 << 0 << 1 << 2 << 4 << gv.fcr() << gv.fcg() << gv.fcb() << 1.0
+       << "}})";
+    gv.set_ascii_mode(ascii_bak);
+}
+
+// Draws a set of triangles as OFF format (it's faster than one by one).
+template < class InputIterator >
+void
+Geomview_stream::draw_triangles(InputIterator begin, InputIterator end)
+{
+    typedef typename std::iterator_traits<InputIterator>::value_type  Triangle;
+    typedef typename Kernel_traits<Triangle>::Kernel                  Kernel;
+    typedef typename Kernel::Point_3                                  Point;
+    typedef typename Kernel::Less_xyz_3                               Comp;
+
+    // We first copy everything in a vector to only require an InputIterator.
+    std::vector<Triangle> triangles(begin, end);
+    typedef typename std::vector<Triangle>::const_iterator            Tit;
+
+    // Put the points in a map and a vector.
+    // The index of a point in the vector is the value associated
+    // to it in the map.
+    typedef std::map<Point, int, Comp>  Point_map;
+    Point_map           point_map(Kernel().less_xyz_3_object());
+    std::vector<Point>  points;
+    for (Tit i = triangles.begin(); i != triangles.end(); ++i)
+        for (int j = 0; j < 3; ++j)
+	    if (point_map.insert(typename Point_map::value_type(i->vertex(j),
+					        points.size())).second)
+                points.push_back(i->vertex(j));
+
+    bool ascii_bak = get_ascii_mode();
+    bool raw_bak = set_raw(true);
+
+    // Header.
+    set_binary_mode();
+    (*this) << "(geometry " << get_new_id("triangles")
+            << " {appearance {}{ OFF BINARY\n"
+            << points.size() << triangles.size() << 0;
+
+    // Points coordinates.
+    std::copy(points.begin(), points.end(),
+              Ostream_iterator<Point, Geomview_stream>(*this));
+
+    // Triangles vertices indices.
+    for (Tit tit = triangles.begin(); tit != triangles.end(); ++tit) {
+        (*this) << 3;
+	for (int j = 0; j < 3; ++j)
+	    (*this) << point_map[tit->vertex(j)];
+        (*this) << 0; // without color.
+    }
+    // Footer.
+    (*this) << "}})";
+
+    set_raw(raw_bak);
+    set_ascii_mode(ascii_bak);
+}
+
+#if defined CGAL_TRIANGLE_2_H && \
+   !defined CGAL_GV_OUT_TRIANGLE_2_H
+#define CGAL_GV_OUT_TRIANGLE_2_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Triangle_2<R> &triangle)
+{
+    output_triangle(gv, triangle);
+    return gv;
+}
+#endif
+
+#if defined CGAL_TRIANGLE_3_H && \
+   !defined CGAL_GV_OUT_TRIANGLE_3_H
+#define CGAL_GV_OUT_TRIANGLE_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Triangle_3<R> &triangle)
+{
+    output_triangle(gv, triangle);
+    return gv;
+}
+#endif
+
+#if defined CGAL_TETRAHEDRON_3_H && \
+   !defined CGAL_GV_OUT_TETRAHEDRON_3_H
+#define CGAL_GV_OUT_TETRAHEDRON_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Tetrahedron_3<R> &t)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Tetra")
+       << " {appearance {}{ ";
+    gv.set_binary_mode();
+    gv << "OFF BINARY\n"
+
+    // it has 4 vertices, 4 face and 6 edges
+       << 4 << 4 << 6 ;
+
+    // the vertices
+    bool raw_bak = gv.set_raw(true);
+    for(int i=0; i<4; i++)
+        gv << t[i];
+    gv.set_raw(raw_bak);
+
+    // the faces
+    double r = gv.fcr(),
+           g = gv.fcg(),
+           b = gv.fcb();
+    gv << 3 << 0 << 1 << 2 << 4 << r << g << b << 1.0
+       << 3 << 3 << 0 << 1 << 4 << r << g << b << 1.0
+       << 3 << 3 << 1 << 2 << 4 << r << g << b << 1.0
+       << 3 << 3 << 0 << 2 << 4 << r << g << b << 1.0
+       << "}})";
+    gv.set_ascii_mode(ascii_bak);
+    return gv;
+}
+#endif
+
+#if defined CGAL_SPHERE_3_H && \
+   !defined CGAL_GV_OUT_SPHERE_3_H
+#define CGAL_GV_OUT_SPHERE_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Sphere_3<R> &S)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Sph")
+       << " {appearance {+edge material {edgecolor "
+       << gv.ecr()  << gv.ecg()  << gv.ecb() <<  "} shading constant}{ "
+       << "SPHERE\n"
+       << std::sqrt(CGAL::to_double(S.squared_radius())) << "\n";
+
+    bool raw_bak = gv.set_raw(true);
+    gv << Point_3<R>(S.center()) << "}})";
+    gv.set_raw(raw_bak);
+    gv.set_ascii_mode(ascii_bak);
+
+    return gv;
+}
+#endif
+
+#if defined CGAL_RAY_2_H && \
+   !defined CGAL_GV_OUT_RAY_2_H
+#define CGAL_GV_OUT_RAY_2_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Ray_2<R> &r)
+{
+    // Note: it won't work if double is not convertible to an RT...
+    const Bbox_3 & bb = gv.get_bbox();
+    Object result = intersection(Iso_rectangle_2<R>(
+		                    Point_2<R>(bb.xmin(), bb.ymin()),
+		                    Point_2<R>(bb.xmax(), bb.ymax())), r);
+    Point_2<R> ipoint;
+    Segment_2<R> iseg;
+    if (assign(ipoint, result))
+	gv << ipoint;
+    else if (assign(iseg, result))
+	gv << iseg;
+    return gv;
+}
+#endif
+
+#if defined CGAL_LINE_2_H && \
+   !defined CGAL_GV_OUT_LINE_2_H
+#define CGAL_GV_OUT_LINE_2_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Line_2<R> &r)
+{
+    // Note: it won't work if double is not convertible to an RT...
+    const Bbox_3 & bb = gv.get_bbox();
+    Object result = intersection(Iso_rectangle_2<R>(
+		                    Point_2<R>(bb.xmin(), bb.ymin()),
+		                    Point_2<R>(bb.xmax(), bb.ymax())), r);
+    Point_2<R> ipoint;
+    Segment_2<R> iseg;
+    if (assign(ipoint, result))
+	gv << ipoint;
+    else if (assign(iseg, result))
+	gv << iseg;
+    return gv;
+}
+#endif
+
+// Ray and Line drawing should be done by intersecting them with the BBox
+// of the Geomview_stream.  But for now we take the easy approach.
+
+#if defined CGAL_RAY_3_H && \
+   !defined CGAL_GV_OUT_RAY_3_H
+#define CGAL_GV_OUT_RAY_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Ray_3<R> &r)
+{
+    typename R::Segment_3 s(r.source(), r.point(1));
+    gv << s;
+    return gv;
+}
+#endif
+
+#if defined CGAL_LINE_3_H && \
+   !defined CGAL_GV_OUT_LINE_3_H
+#define CGAL_GV_OUT_LINE_3_H
+template < class R >
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Line_3<R> &r)
+{
+    typename R::Segment_3 s(r.point(-1), r.point(1));
+    gv << s;
+    return gv;
+}
+#endif
+
+CGAL_EXPORT Geomview_stream&
+operator<<(Geomview_stream &gv, const Bbox_2 &bbox);
+
+CGAL_EXPORT Geomview_stream&
+operator<<(Geomview_stream &gv, const Bbox_3 &bbox);
+
+#if defined CGAL_POINT_3_H && !defined CGAL_GV_IN_POINT_3_H
+#define CGAL_GV_IN_POINT_3_H
+template < class R >
+Geomview_stream&
+operator>>(Geomview_stream &gv, Point_3<R> &point)
+{
+    const char *gclpick =
+	"(pick world pickplane * nil nil nil nil nil nil nil)";
+
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(pickable pickplane yes) (ui-target pickplane yes)"
+       << "(interest " << gclpick << ")";
+
+    char sexpr[1024];
+    gv >> sexpr;  // this reads a gcl expression
+
+    const char* pickpoint = Geomview_stream::nth(sexpr, 3);
+    // this gives something as: (0.0607123 0.0607125 4.76837e-07 0.529628)
+    double x, y, z, w;
+    Geomview_stream::parse_point(pickpoint, x, y, z, w);
+    point = Point_3<R>(x, y, z, w);
+
+    // we echo the input
+    if (gv.get_echo())
+	gv << point;
+
+    // we are done and tell geomview to stop sending pick events
+    gv << "(uninterest " << gclpick << ") (pickable pickplane no)";
+    gv.set_ascii_mode(ascii_bak);
+
+    return gv;
+}
+#endif
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/Geomview_stream_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_USE_GEOMVIEW
+
+#endif // CGAL_GEOMVIEW_STREAM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream_impl.h
new file mode 100644
index 0000000..7eb8dd2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/Geomview_stream_impl.h
@@ -0,0 +1,612 @@
+// Copyright (c) 1999-2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann, Sylvain Pion
+
+#ifdef CGAL_USE_GEOMVIEW
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <sstream>
+#include <csignal>
+#include <cerrno>
+#include <cstring>
+#include <cstdlib>
+#include <unistd.h>
+
+#include <sys/types.h> // kill() on SunPro requires these 2 #includes.
+#include <signal.h>
+
+#include <CGAL/IO/binary_file_io.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+Geomview_stream::Geomview_stream(const Bbox_3 &bbox,
+				 const char *machine,
+				 const char *login)
+    : bb(bbox), vertex_color(BLACK), edge_color(BLACK), face_color(BLACK),
+      wired_flag(false), echo_flag(true), raw_flag(false),
+      trace_flag(false), binary_flag(false),
+      line_width(1)
+{
+    setup_geomview(machine, login);
+    frame(bbox);
+    pickplane(bbox);
+    set_vertex_radius((bbox.xmax() - bbox.xmin())/100.0);
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream::~Geomview_stream()
+{
+    kill(pid, SIGKILL);  // kills geomview
+}
+
+CGAL_INLINE_FUNCTION
+void Geomview_stream::setup_geomview(const char *machine, const char *login)
+{
+    int pipe_out[2], pipe_in[2];
+
+    // Communication between CGAL and geomview should be possible
+    // in two directions. To achieve this we open two pipes
+
+    std::cout << "Starting Geomview..." << std::flush;
+    if (pipe(pipe_out) < 0) {
+        CGAL_error_msg( "out pipe failed" );
+    }
+
+    if (pipe(pipe_in) < 0) {
+        CGAL_error_msg(  "in pipe failed" );
+    }
+
+    switch (pid = fork()){
+    case -1:
+        CGAL_error_msg( "fork failed" );
+    case 0:               // The child process
+        close(pipe_out[1]); // does not write to the out pipe,
+        close(pipe_in[0]);  // does not read from the in pipe.
+
+	if (dup2(pipe_out[0], 0) != 0)
+	    std::cerr << "Connect pipe to stdin failed." << std::endl;
+	if (dup2(pipe_in[1], 1) != 1)
+	    std::cerr << "Connect pipe to stdout failed." << std::endl;
+
+        if (machine && (std::strlen(machine)>0)) {
+	    std::string s (" rgeomview ");
+	    s += machine;
+	    s += ":0.0";
+            execlp("rsh", "rsh", machine, "-l", login, s.data(),
+                   static_cast<void *>(NULL)); // cast to stop gcc warning
+        } else {
+            execlp("geomview", "geomview", "-c", "-",
+                   static_cast<void *>(NULL)); // cast to stop gcc warning
+        }
+
+        // if we get to this point something went wrong.
+        std::cerr << "execl geomview failed" << std::endl;
+        switch(errno) {
+        case EACCES:
+            std::cerr << "please check your environment variable PATH"
+		      << std::endl;
+            std::cerr << "make sure the file `geomview' is contained in it"
+		      << std::endl;
+            std::cerr << "and is executable" << std::endl;
+            break;
+        case ELOOP:
+            std::cerr << "too many links for filename `geomview'" << std::endl;
+            break;
+        default:
+            std::cerr << "error number " << errno << " (check `man execlp')"
+		      << std::endl;
+        };
+        CGAL_error();
+    default:              // The parent process
+        close(pipe_out[0]); // does not read from the out pipe,
+        close(pipe_in[1]);  // does not write to the in pipe.
+
+        in = pipe_in[0];
+        out = pipe_out[1];
+
+	// Necessary to wait a little bit for Geomview,
+        // otherwise you won't be able to ask for points...
+        sleep(1);
+
+#if 1
+        // We want to get rid of the requirement in the CGAL doc about
+	// (echo "started").  But we want to be backward compatible, that is,
+	// people who have this echo in their .geomview must still have CGAL
+	// working, at least for a few public releases.
+        // So the plan is to send, from CGAL, the command : (echo "CGAL-3D")
+        // It's the same length as "started", 7.
+        // Then we read 7 chars from Geomview, and test which string it is.
+        // If it's "CGAL-3D", then fine, the user doesn't have .geomview with
+        // the back-compatible echo command.
+        // In the very long run, we'll be able to get rid of all this code as
+        // well.
+	// Maybe we should simply read the pipe, till we find "CGAL-3D" ?
+
+        *this << "(echo \"CGAL-3D\")";
+
+        char inbuf[10];
+        std::size_t retread=::read(in, inbuf, 7);
+        (void)retread;
+
+        if (std::strncmp(inbuf, "started", 7) == 0)
+        {
+            // std::cerr << "You still have a .geomview file with the\n"
+                   // << "(echo \"started\") command. Note that this is not\n"
+                   // << "compulsory anymore, since CGAL 2.3" << std::endl;
+
+            // Then the next one is supposed to be CGAL-3D.
+            retread=::read(in, inbuf, 7);
+            (void)retread;
+            if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
+                std::cerr << "Unexpected string from Geomview !" << std::endl;
+        }
+        else if (std::strncmp(inbuf, "CGAL-3D", 7) == 0)
+        {
+            // std::cerr << "Good, you don't have a .geomview file with the\n"
+                      // << "(echo \"started\") command" << std::endl;
+        }
+        else
+        {
+            std::cerr << "Unexcepted string from Geomview at initialization!\n"
+                      << "Going on nevertheless !" << std::endl;
+        }
+#else
+        // Old original version
+        char inbuf[10];
+        // Waits for "started" from the .geomview file.
+        retread=::read(in, inbuf, 7);
+        (void)retread;
+#endif
+
+        std::cout << "done." << std::endl;
+
+        (*this) << "(normalization g* none)(bbox-draw g* no)";
+    }
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::pickplane(const Bbox_3 &bbox)
+{
+    bool bin_bak = set_binary_mode();
+    (*this) << "(geometry pickplane {QUAD BINARY\n"
+            << 1
+    // here are the four corners
+            << bbox.xmin() << bbox.ymin() << bbox.zmin()
+            << bbox.xmin() << bbox.ymax() << bbox.zmin()
+            << bbox.xmax() << bbox.ymax() << bbox.zmin()
+            << bbox.xmax() << bbox.ymin() << bbox.zmin()
+
+    // close the text bracket
+            << "}) (pickable pickplane no)";
+    set_ascii_mode(bin_bak);
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::clear()
+{
+    (*this) << "(delete World)";
+    id.clear();
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::look_recenter()
+{
+    (*this) << "(look-recenter World)";
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(const std::string & s)
+{
+    if ((int)s.length() != ::write(out, s.data(), s.length())) {
+        CGAL_error_msg( "write problem in the pipe while sending data to geomview" );
+    }
+    trace(s);
+
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(int i)
+{
+    // Depending on the mode chosen
+    if (get_binary_mode()) {
+        // we write raw binary data to the stream.
+        int num = i;
+        I_swap_to_big_endian(num);
+        std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
+        (void)retwrite;
+        trace(i);
+    } else {
+        // transform the int in a character sequence and put whitespace around
+        std::ostringstream str;
+        str << i << ' ' << std::ends;
+        *this << str.str().c_str();
+    }
+
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(unsigned int i)
+{
+    // Depending on the mode chosen
+    if (get_binary_mode()) {
+        // we write raw binary data to the stream.
+        unsigned int num = i;
+        I_swap_to_big_endian(num);
+        std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
+        (void)retwrite;
+        trace(i);
+    } else {
+        // transform the int in a character sequence and put whitespace around
+        std::ostringstream str;
+        str << i << ' ' << std::ends;
+        *this << str.str().c_str();
+    }
+
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(long i)
+{
+    return operator<<((int) i);
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(unsigned long i)
+{
+    return operator<<((unsigned int) i);
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(double d)
+{
+    float f = d;
+    if (get_binary_mode()) {
+        float num = d;
+        I_swap_to_big_endian(num);
+        std::size_t retwrite= ::write(out, (char*)&num, sizeof(num));
+        (void)retwrite;
+        trace(f);
+    } else {
+        // 'copy' the float in a string and append a blank
+        std::ostringstream str;
+        str << f << ' ' << std::ends;
+        *this << str.str().c_str();
+    }
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Bbox_2 &bbox)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Bbox")
+       << " {VECT 1 5 0 5 0 ";
+    // here are the four corners
+
+    gv << bbox.xmin() << bbox.ymin() << 0.0
+       << bbox.xmin() << bbox.ymax() << 0.0
+       << bbox.xmax() << bbox.ymax() << 0.0
+       << bbox.xmax() << bbox.ymin() << 0.0
+       << bbox.xmin() << bbox.ymin() << 0.0;
+
+    // close the text bracket
+    gv << "})";
+    gv.set_ascii_mode(ascii_bak);
+
+    return gv;
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+operator<<(Geomview_stream &gv, const Bbox_3 &bbox)
+{
+    bool ascii_bak = gv.set_ascii_mode();
+    gv << "(geometry " << gv.get_new_id("Bbox")
+       << " {appearance {material {edgecolor "
+       << gv.ecr() << gv.ecg() << gv.ecb() <<  "}}{SKEL 8 4 "
+    // here are the corners
+       << bbox.xmin() << bbox.ymin() << bbox.zmin()
+       << bbox.xmin() << bbox.ymax() << bbox.zmin()
+       << bbox.xmax() << bbox.ymax() << bbox.zmin()
+       << bbox.xmax() << bbox.ymin() << bbox.zmin()
+       << bbox.xmax() << bbox.ymin() << bbox.zmax()
+       << bbox.xmax() << bbox.ymax() << bbox.zmax()
+       << bbox.xmin() << bbox.ymax() << bbox.zmax()
+       << bbox.xmin() << bbox.ymin() << bbox.zmax()
+
+       << "10 0 1 2 3 4 5 6 7 0 3\n"
+       << "2 1 6\n"
+       << "2 2 5\n"
+       << "2 4 7\n"
+
+    // close the text bracket
+       << "}})";
+    gv.set_ascii_mode(ascii_bak);
+
+    return gv;
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::set_bg_color(const Color &c)
+{
+    bool ascii_bak = set_ascii_mode();
+    *this << "(backcolor \"Camera\" "
+          << double(c.r())/255.0
+          << double(c.g())/255.0
+          << double(c.b())/255.0
+          << ")";
+    set_ascii_mode(ascii_bak);
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator<<(const Color &c)
+{
+    vertex_color = edge_color = face_color = c;
+    return (*this);
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::get_vertex_color() const
+{
+    return vertex_color;
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::get_edge_color() const
+{
+    return edge_color;
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::get_face_color() const
+{
+    return face_color;
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::set_vertex_color(const Color &c)
+{
+    Color old = vertex_color;
+    vertex_color = c;
+    return old;
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::set_edge_color(const Color &c)
+{
+    Color old = edge_color;
+    edge_color = c;
+    return old;
+}
+
+CGAL_INLINE_FUNCTION
+Color
+Geomview_stream::set_face_color(const Color &c)
+{
+    Color old = face_color;
+    face_color = c;
+    return old;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::vcr() const
+{
+    return double(vertex_color.r())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::vcg() const
+{
+    return double(vertex_color.g())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::vcb() const
+{
+    return double(vertex_color.b())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::ecr() const
+{
+    return double(edge_color.r())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::ecg() const
+{
+    return double(edge_color.g())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::ecb() const
+{
+    return double(edge_color.b())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::fcr() const
+{
+    return double(face_color.r())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::fcg() const
+{
+    return double(face_color.g())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+double
+Geomview_stream::fcb() const
+{
+    return double(face_color.b())/255.0;
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::frame(const Bbox_3 &bbox)
+{
+    (*this) << bbox << "(look-recenter g0 c0)";
+}
+
+CGAL_INLINE_FUNCTION
+Geomview_stream&
+Geomview_stream::operator>>(char *expr)
+{
+    // Skip whitespaces
+    do {
+      std::size_t retread=::read(in, expr, 1);
+      (void)retread;
+    } while (expr[0] != '(');
+
+    int pcount = 1;
+    int i = 1;
+    while (1) {
+        std::size_t retread=::read(in, &expr[i], 1);
+        (void)retread;
+        if (expr[i] == ')'){
+            pcount--;
+        } else if (expr[i] == '('){
+            pcount++;
+        }
+        if (pcount == 0){
+            expr[i+1]='\0';
+            break;  // we encountered a balanced number of parantheses
+        }
+        i++;
+    }
+    return *this;
+}
+
+// Parse a Lisp expression, return a pointer to the beginning of the
+// nth subexpression, and terminate it by '\0'.
+// It's either a word terminated by ' ' or ')', or a well parenthesed
+// expression, or a quoted "string".
+CGAL_INLINE_FUNCTION
+char*
+Geomview_stream::nth(char* s, int count)
+{
+    s++; // skip first character (always a parenthesis)
+
+    // Skip "count" words.
+    for(; count != 0; count--) {
+        while (*s == ' ')       // skip whitespaces
+            s++;
+        s++;
+        while (*s != ' ')       // skip a word
+            s++;
+    }
+    while (*s == ' ')           // skip whitespaces
+        s++;
+
+    // Now we have the beginning of the searched sub-expression.
+    int j = 1;
+    if (*s == '(')              // Case of a well-parenthesed expression.
+        for (int pcount = 1; pcount != 0;) {
+            if (s[j] == ')') pcount--;
+            if (s[j] == '(') pcount++;
+            j++;
+        }
+    else if (*s == '"') {       // Case of a quoted "string".
+        while (s[j] != '"')
+            j++;
+        j++;
+    }
+    else                        // Case of a word terminated by ' ' or ')'.
+        while (s[j] != ' ' && s[j] != ')')
+            j++;
+
+    s[j] = '\0';
+    return s;
+}
+
+CGAL_INLINE_FUNCTION
+void
+Geomview_stream::parse_point(const char* pickpoint,
+		     double &x, double &y, double &z, double &w)
+{
+    std::stringstream ss;
+    ss << pickpoint << std::ends;
+
+    char parenthesis;
+    ss >> parenthesis >> x >> y >> z >> w;
+}
+
+CGAL_INLINE_FUNCTION
+std::string
+Geomview_stream::get_new_id(const std::string & s)
+{
+    std::ostringstream str;
+    str << s << id[s]++ << std::ends;
+    return str.str();
+}
+
+} //namespace CGAL
+
+#else
+
+#ifndef CGAL_HEADER_ONLY
+// Add a dummy symbol to prevent warnings of empty translation unit.
+namespace CGAL {
+namespace {
+int dummy;
+}
+} //namespace CGAL
+#endif
+
+#endif // CGAL_USE_GEOMVIEW
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Gps_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Gps_iostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Gps_iostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Gps_iostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Inventor_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Inventor_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Inventor_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Inventor_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Istream_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Istream_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Istream_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Istream_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_S2_OGLUT_stream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_iostream_3.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_iostream_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_iostream_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_iostream_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_iostream_S2.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_iostream_S2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Nef_polyhedron_iostream_S2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Nef_polyhedron_iostream_S2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/OFF_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/OFF_reader.h
new file mode 100644
index 0000000..75fb783
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/OFF_reader.h
@@ -0,0 +1,100 @@
+// Copyright (c) 2015 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau and Sebastien Loriot
+
+#ifndef CGAL_IO_OFF_READER_H
+#define CGAL_IO_OFF_READER_H
+
+#include <CGAL/IO/File_scanner_OFF.h>
+
+#include <vector>
+#include <iostream>
+#include <CGAL/array.h>
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+
+namespace CGAL{
+
+  namespace read_OFF_internal{
+    template <class Point_3>
+    void fill_point(double x, double y, double z, Point_3& pt)
+    {
+      pt = Point_3(x, y, z);
+    }
+
+    void fill_point(double x, double y, double z, CGAL::cpp11::array<double,3>& p)
+    {
+      p = CGAL::make_array(x,y,z);
+    }
+
+    template <class Polygon_3>
+    void resize(Polygon_3& p, std::size_t size)
+    {
+      p.resize(size);
+    }
+
+    template <std::size_t N, class INT>
+    void resize(CGAL::cpp11::array<INT, N>&, std::size_t size)
+    {
+      CGAL_USE(size);
+      CGAL_assertion( size>=N );
+    }
+  }
+
+  template <class Point_3, class Polygon_3>
+  bool
+  read_OFF( std::istream& in,
+            std::vector< Point_3 >& points,
+            std::vector< Polygon_3 >& polygons,
+            bool /* verbose */ = false)
+  {
+    CGAL::File_scanner_OFF scanner(in);
+
+    points.resize(scanner.size_of_vertices());
+    polygons.resize(scanner.size_of_facets());
+    for (std::size_t i = 0; i < scanner.size_of_vertices(); ++i) {
+      double x, y, z, w;
+      scanner.scan_vertex( x, y, z, w);
+      CGAL_assertion(w!=0);
+      read_OFF_internal::fill_point( x/w, y/w, z/w, points[i] );
+      scanner.skip_to_next_vertex( i);
+    }
+    if(!in)
+      return false;
+
+    for (std::size_t i = 0; i < scanner.size_of_facets(); ++i) {
+      std::size_t no;
+
+      scanner.scan_facet( no, i);
+      read_OFF_internal::resize(polygons[i], no);
+      for(std::size_t j = 0; j < no; ++j) {
+        std::size_t id;
+        scanner.scan_facet_vertex_index(id, i);
+        if(id < scanner.size_of_vertices())
+        {
+          polygons[i][j] = id;
+        }
+        else
+          return false;
+      }
+    }
+    return in.good();
+  }
+
+} // namespace CGAL
+
+#endif // CGAL_IO_OFF_READER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Ostream_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Ostream_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Ostream_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Ostream_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_VRML_1_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_VRML_1_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_VRML_1_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_VRML_1_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_VRML_2_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_VRML_2_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_VRML_2_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_VRML_2_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_builder_from_STL.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_builder_from_STL.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_builder_from_STL.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_builder_from_STL.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_geomview_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_geomview_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_geomview_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_geomview_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_inventor_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_inventor_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_inventor_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_inventor_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_iostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_iostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_iostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_iostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_scan_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_scan_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Polyhedron_scan_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Polyhedron_scan_OFF.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/STL_reader.h b/3rdparty/CGAL-4.8/include/CGAL/IO/STL_reader.h
new file mode 100644
index 0000000..04eae64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/STL_reader.h
@@ -0,0 +1,148 @@
+// Copyright (c) 2015 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_IO_STL_READER_H
+#define CGAL_IO_STL_READER_H
+
+#include <CGAL/array.h>
+#include <boost/cstdint.hpp> 
+#include <vector>
+#include <map>
+#include <iostream>
+#include <string>
+
+namespace CGAL{
+
+  bool
+  read_STL( std::istream& input,
+            std::vector< cpp11::array<double,3> >& points,
+            std::vector< cpp11::array<int,3> >& facets,
+            bool verbose = false)
+  {
+    std::string s, solid("solid");
+    std::map<cpp11::array<double,3>, int> pmap;
+    int index = 0;
+    cpp11::array<int,3> ijk;
+    cpp11::array<double,3> p;
+
+    char line[80];
+    for(int i=0;i < 80; i++){
+      boost::uint8_t c;
+      input.read(reinterpret_cast<char*>(&c), sizeof(c));
+      line[i]=c;
+      if(i==5){
+        s = std::string(line,5);
+        if(s == solid){
+          break;
+        }
+      }
+    }
+
+    if(s!= solid){
+      boost::uint32_t N32;
+      input.read(reinterpret_cast<char*>(&N32), sizeof(N32));
+      unsigned int N = N32;
+
+      for(unsigned int i=0; i < N; i++){
+        float normal[3];
+        input.read(reinterpret_cast<char*>(&normal[0]), sizeof(normal[0]));
+        input.read(reinterpret_cast<char*>(&normal[1]), sizeof(normal[1]));
+        input.read(reinterpret_cast<char*>(&normal[2]), sizeof(normal[2]));
+
+        for(int j=0; j < 3; j++){
+          float x,y,z;
+          input.read(reinterpret_cast<char*>(&x), sizeof(x));
+          input.read(reinterpret_cast<char*>(&y), sizeof(y));
+          input.read(reinterpret_cast<char*>(&z), sizeof(z));
+          p[0]=x; p[1]=y; p[2]=z;
+          std::map<cpp11::array<double,3>, int>::iterator iti=
+            pmap.insert(std::make_pair(p,-1)).first;
+          if(iti->second==-1){
+            ijk[j] = index;
+            iti->second = index++;
+            points.push_back(p);
+          } else {
+            ijk[j] = iti->second;
+          }
+        }
+        facets.push_back(ijk);
+        char c;
+        input.read(reinterpret_cast<char*>(&c), sizeof(c));
+        input.read(reinterpret_cast<char*>(&c), sizeof(c));
+      }
+      return true;
+    } else {
+      std::string facet("facet"),
+        outer("outer"),
+        loop("loop"),
+        vertex("vertex"),
+        endloop("endloop"),
+        endsolid("endsolid");
+
+      while(input >> s){
+        if(s == endsolid){
+          //std::cerr << "found endsolid" << std::endl;
+        } else if(s == facet){
+          //std::cerr << "found facet" << std::endl;
+          std::getline(input, s); // ignore the normal
+          input >> s;
+          if(s != outer){
+            if (verbose)
+              std::cerr << "Expect 'outer' and got " << s << std::endl;
+            return false;
+          }
+          input >> s;
+          if(s != loop){
+            if (verbose)
+              std::cerr << "Expect 'loop' and got " << s << std::endl;
+            return false;
+          }
+          int count = 0;
+          do {
+            input >> s;
+            if(s == vertex){
+              //      std::cerr << "found vertex" << std::endl;
+              if(count < 3){
+                input >> p[0] >> p[1] >> p[2];
+                std::map<cpp11::array<double,3>, int>::iterator iti=
+                  pmap.insert(std::make_pair(p,-1)).first;
+                if(iti->second==-1){
+                  ijk[count] = index;
+                  iti->second = index++;
+                  points.push_back(p);
+                } else {
+                  ijk[count] = iti->second;
+                }
+                ++count;
+              } else {
+                if (verbose)
+                  std::cerr << "We can only read triangulated surfaces" << std::endl;
+                return false;
+              }
+            }
+          }while(s != endloop);
+          
+          facets.push_back(ijk);
+        }
+      }
+      return true;
+    }
+  }
+} // namespace CGAL
+
+#endif // CGAL_IO_STL_READER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Scanner_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Scanner_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Scanner_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Scanner_OFF.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Tee_for_output_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Tee_for_output_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Tee_for_output_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Tee_for_output_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_geomview_ostream_2.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_geomview_ostream_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_geomview_ostream_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_geomview_ostream_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_geomview_ostream_3.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_geomview_ostream_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_geomview_ostream_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_geomview_ostream_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_ps_stream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_ps_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Triangulation_ps_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Triangulation_ps_stream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/VRML_1_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/VRML_1_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/VRML_1_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/VRML_1_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/VRML_2_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/VRML_2_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/VRML_2_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/VRML_2_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Verbose_ostream.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Verbose_ostream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Verbose_ostream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Verbose_ostream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/Writer_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/Writer_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/Writer_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/Writer_OFF.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/alpha_shape_geomview_ostream_3.h b/3rdparty/CGAL-4.8/include/CGAL/IO/alpha_shape_geomview_ostream_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/alpha_shape_geomview_ostream_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/alpha_shape_geomview_ostream_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/binary_file_io.h b/3rdparty/CGAL-4.8/include/CGAL/IO/binary_file_io.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/binary_file_io.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/binary_file_io.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/generic_copy_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/generic_copy_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/generic_copy_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/generic_copy_OFF.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/generic_print_polyhedron.h b/3rdparty/CGAL-4.8/include/CGAL/IO/generic_print_polyhedron.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/generic_print_polyhedron.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/generic_print_polyhedron.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/io.h b/3rdparty/CGAL-4.8/include/CGAL/IO/io.h
new file mode 100644
index 0000000..9f7be26
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/io.h
@@ -0,0 +1,535 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+
+#ifndef CGAL_IO_H
+#define CGAL_IO_H
+
+
+#include <cstdio>
+#include <cctype>
+#include <string>
+#include <locale>
+#include <iostream>
+#include <CGAL/tags.h>
+#include <CGAL/IO/io_tags.h>
+#include <CGAL/IO/Color.h>
+#include <CGAL/assertions.h>
+
+
+namespace CGAL {
+
+class IO {
+public:
+#ifndef CGAL_HEADER_ONLY
+  CGAL_EXPORT static int mode;
+  static int& get_static_mode()
+  { return IO::mode; }
+#else // CGAL_HEADER_ONLY
+  static int& get_static_mode()
+  {
+    static int mode = std::ios::xalloc();
+    return mode;
+  }
+#endif // CGAL_HEADER_ONLY
+    enum Mode {ASCII = 0, PRETTY, BINARY};
+};
+
+template <class T, class F = ::CGAL::Null_tag >
+class Output_rep {
+    const T& t;
+public:
+    //! initialize with a const reference to \a t.
+    Output_rep( const T& tt) : t(tt) {}
+    //! perform the output, calls \c operator\<\< by default.
+    std::ostream& operator()( std::ostream& out) const { return (out << t); }
+};
+
+/*! \relates Output_rep
+    \brief stream output of the \c Output_rep calls its \c operator().
+*/
+template <class T, class F>
+std::ostream&
+operator<<( std::ostream& out, Output_rep<T,F> rep) {
+    return rep( out);
+}
+
+//! generic IO output format manipulator.
+template <class T>
+Output_rep<T>
+oformat( const T& t) { return Output_rep<T>(t); }
+
+//! generic IO output format manipulator with formatting tag.
+template <class T, class F>
+Output_rep<T,F>
+oformat( const T& t, F) { return Output_rep<T,F>(t); }
+
+
+
+/*!\brief
+ * input functor class created by the generic IO input manipulator.
+ *
+ * It holds a reference to the input object. Default implementation
+ * calls the stream input operator. Specializations can be written
+ * for external types not supporting our stream IO format.
+ */
+template <class T>
+class Input_rep {
+    T& t;
+public:
+    //! initialize with a reference to \a t.
+    Input_rep( T& tt) : t(tt) {}
+    //! perform the input, calls \c operator\>\> by default.
+    std::istream& operator()( std::istream& in) const { return (in >> t); }
+};
+
+#if CGAL_FORCE_IFORMAT_DOUBLE || \
+  ( ( _MSC_VER > 1600 ) && (! defined( CGAL_NO_IFORMAT_DOUBLE )) )
+template <>
+class Input_rep<double> {
+    double& t;
+public:
+  //! initialize with a reference to \a t.
+  Input_rep( double& tt) : t(tt) {}
+
+  std::istream& operator()( std::istream& is) const 
+  {
+    typedef std::istream istream;
+    typedef istream::char_type char_type;
+    typedef istream::int_type int_type;
+    typedef istream::traits_type traits_type;
+
+    std::string buffer;
+    buffer.reserve(32);
+
+    char_type c;
+    do {
+      const int_type i = is.get();
+      if(i == traits_type::eof()) {
+	return is;
+      }
+      c = static_cast<char_type>(i);
+    }while (std::isspace(c));
+    if(c == '-'){
+      buffer += '-';
+    } else if(c != '+'){
+      is.unget();
+    }
+    do {
+      const int_type i = is.get();
+      if(i == traits_type::eof()) {
+	is.clear(is.rdstate() & ~std::ios_base::failbit);
+	break;
+      }
+      c = static_cast<char_type>(i);
+      if(std::isdigit(c) || (c =='.') || (c =='E') || (c =='e') || (c =='+') || (c =='-')){
+        buffer += c;
+      }else{
+	is.unget();
+	break;
+      }
+    }while(true);
+
+    if(sscanf(buffer.c_str(), "%lf", &t) != 1) {
+      // if a 'buffer' does not contain a double, set the fail bit.
+      is.setstate(std::ios_base::failbit);
+    }
+    return is; 
+  }
+};
+#endif
+
+/*! \relates Input_rep
+    \brief stream input to the \c Input_rep calls its \c operator().
+*/
+template <class T>
+std::istream&
+operator>>( std::istream& in, Input_rep<T> rep) {
+    return rep( in);
+}
+
+//! generic IO input format manipulator.
+template <class T>
+Input_rep<T>
+iformat( T& t) { return Input_rep<T>(t); }
+
+
+template <class T, class F = Null_tag >
+class Benchmark_rep {
+    const T& t;
+public:
+    //! initialize with a const reference to \a t.
+    Benchmark_rep( const T& tt) : t(tt) {}
+    //! perform the output, calls \c operator\<\< by default.
+    std::ostream& operator()( std::ostream& out) const {
+        return out << t;
+    }
+    
+    // static function to get the benchmark name
+    static std::string get_benchmark_name() {
+        return "";
+    }
+};
+
+template <class T, class F>
+std::ostream& operator<<( std::ostream& out, Benchmark_rep<T,F> rep) {
+    return rep( out);
+}
+
+template <class T>
+Benchmark_rep<T> bmformat( const T& t) { return Benchmark_rep<T>(t); }
+
+template <class T, class F>
+Benchmark_rep<T,F> bmformat( const T& t, F) { return Benchmark_rep<T,F>(t); }
+
+
+CGAL_EXPORT
+IO::Mode
+get_mode(std::ios& i);
+
+CGAL_EXPORT
+IO::Mode
+set_ascii_mode(std::ios& i);
+
+CGAL_EXPORT
+IO::Mode
+set_binary_mode(std::ios& i);
+
+CGAL_EXPORT
+IO::Mode
+set_pretty_mode(std::ios& i);
+
+CGAL_EXPORT
+IO::Mode
+set_mode(std::ios& i, IO::Mode m);
+
+CGAL_EXPORT
+bool
+is_pretty(std::ios& i);
+
+CGAL_EXPORT
+bool
+is_ascii(std::ios& i);
+
+CGAL_EXPORT
+bool
+is_binary(std::ios& i);
+
+
+template < class T >
+inline
+void
+write(std::ostream& os, const T& t, const io_Read_write&)
+{
+    os.write(reinterpret_cast<const char*>(&t), sizeof(t));
+}
+
+
+template < class T >
+inline
+void
+write(std::ostream& os, const T& t, const io_Operator&)
+{
+    os << oformat(t);
+}
+
+
+template < class T >
+inline
+void
+write(std::ostream& os, const T& t, const io_Extract_insert&)
+{
+    insert(os, t);
+}
+
+
+template < class T >
+inline
+void
+write(std::ostream& os, const T& t)
+{
+    write(os, t, typename Io_traits<T>::Io_tag());
+}
+
+
+template < class T >
+inline
+void
+read(std::istream& is, T& t, const io_Read_write&)
+{
+    is.read(reinterpret_cast<char*>(&t), sizeof(t));
+}
+
+
+template < class T >
+inline
+void
+read(std::istream& is, T& t, const io_Operator&)
+{
+    is >> iformat(t);
+}
+
+
+template < class T >
+inline
+void
+read(std::istream& is, T& t, const io_Extract_insert&)
+{
+    extract(is, t);
+}
+
+
+template < class T >
+inline
+void
+read(std::istream& is, T& t)
+{
+    read(is, t, typename Io_traits<T>::Io_tag());
+}
+
+
+inline
+std::ostream& operator<<( std::ostream& out, const Color& col)
+{
+    switch(get_mode(out)) {
+    case IO::ASCII :
+        return out << static_cast<int>(col.red())   << ' '
+		   << static_cast<int>(col.green()) << ' '
+		   << static_cast<int>(col.blue());
+    case IO::BINARY :
+        write(out, static_cast<int>(col.red()));
+        write(out, static_cast<int>(col.green()));
+        write(out, static_cast<int>(col.blue()));
+        return out;
+    default:
+        return out << "Color(" << static_cast<int>(col.red()) << ", "
+		   << static_cast<int>(col.green()) << ", "
+                   << static_cast<int>(col.blue()) << ')';
+    }
+}
+
+inline
+std::istream &operator>>(std::istream &is, Color& col)
+{
+    int r = 0, g = 0, b = 0;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> r >> g >> b;
+        break;
+    case IO::BINARY :
+        read(is, r);
+        read(is, g);
+        read(is, b);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    col = Color((unsigned char)r,(unsigned char)g,(unsigned char)b);
+    return is;
+}
+
+CGAL_EXPORT
+const char* mode_name( IO::Mode m );
+
+// From polynomial.h TODO: Where to put this?
+CGAL_EXPORT
+void swallow(std::istream &is, char d);
+
+CGAL_EXPORT
+void swallow(std::istream &is, const std::string& s );
+
+
+  namespace internal {
+inline
+void eat_white_space(std::istream &is)
+{
+  std::istream::int_type c;
+  do {
+    c= is.peek();
+    if (c== std::istream::traits_type::eof())
+      return;
+    else {
+      std::istream::char_type cc= c;
+      if ( std::isspace(cc, std::locale::classic()) ) {
+        is.get();
+        // since peek succeeded, this should too
+        CGAL_assertion(!is.fail());
+      } else {
+        return;
+      }
+    }
+  } while (true);
+}
+ 
+
+  inline
+  bool is_space (const std::istream& /*is*/, std::istream::int_type c)
+  {
+    std::istream::char_type cc= c;
+    return (c == std::istream::traits_type::eof()) ||
+           std::isspace(cc, std::locale::classic() );
+  }
+
+  inline
+  bool is_eof (const std::istream& /*is*/, std::istream::int_type c)
+  {
+    return c == std::istream::traits_type::eof();
+  }
+
+  inline
+  bool is_digit (const std::istream& /*is*/, std::istream::int_type c)
+  {
+    std::istream::char_type cc= c;
+    return std::isdigit(cc, std::locale::classic() );
+  }
+
+  inline std::istream::int_type peek(std::istream& is)
+  {
+    // Workaround for a bug in the version of libc++ that is shipped with
+    // Apple-clang-3.2. See the long comment in the function
+    // gmpz_new_read() in <CGAL/GMP/Gmpz_type.h>.
+
+    if(is.eof())
+      return std::istream::traits_type::eof();
+    else
+      return is.peek();
+  }
+   
+    
+template <typename ET>
+inline void read_float_or_quotient(std::istream & is, ET& et)
+{
+  is >> et;
+}   
+
+
+
+template <typename Int, typename Rat>
+inline void read_float_or_quotient(std::istream& is, Rat &z)
+{
+  // reads rational and floating point literals.
+  const std::istream::char_type zero = '0';
+  std::istream::int_type c;
+  std::ios::fmtflags old_flags = is.flags();
+
+  is.unsetf(std::ios::skipws);
+  internal::eat_white_space(is);
+
+  Int n(0);             // unsigned number before '/' or '.'
+  Int d(1);             // number after '/', or denominator (fp-case)
+  bool negative = false; // do we have a leading '-'?
+  bool digits = false;   // for fp-case: are there any digits at all?
+
+  c = internal::peek(is);
+  if (c != '.') {
+    // is there a sign?
+    if (c == '-' || c == '+') {
+      is.get();
+      negative = (c == '-');
+      internal::eat_white_space(is);
+      c=internal::peek(is);
+    }
+    // read n (could be empty)
+    while (!internal::is_eof(is, c) && internal::is_digit(is, c)) {
+      digits = true;
+      n = n*10 + (c-zero);
+      is.get();
+      c = internal::peek(is);
+    }
+    // are we done?
+    if (internal::is_eof(is, c) || internal::is_space(is, c)) {
+      is.flags(old_flags);
+      if (digits && !is.fail())
+        z = negative? Rat(-n,1): Rat(n,1);
+      return;
+    }
+  } else
+    n = 0;
+
+  // now we have read n, we are not done, and c is the next character
+  // in the stream
+  if (c == '/' || c == '.') {
+    is.get();
+    if (c == '/') {
+      // rational case
+      is >> d;
+      is.flags(old_flags);
+      if (!is.fail())
+        z = negative? Rat(-n,d): Rat(n,d);
+      return;
+    }
+
+    // floating point case; read number after '.' (may be empty)
+    while (true) {
+      c = internal::peek(is);
+      if (internal::is_eof(is, c) || !internal::is_digit(is, c))
+        break;
+      // now we have a digit
+      is.get();
+      digits = true;
+      d *= 10;
+      n = n*10 + (c-zero);
+    }
+  }
+
+  // now we have read all digits after '.', and c is the next character;
+  // read the exponential part (optional)
+  int e = 0;
+  if (c == 'e' || c == 'E') {
+    is.get();
+    is >> e;
+  }
+
+  // now construct the Gmpq
+  if (!digits) {
+    // illegal floating-point number
+    is.setstate(std::ios_base::failbit);
+    is.flags(old_flags);
+    return;
+  }
+
+  // handle e
+  if (e > 0)
+    while (e--) n *= 10;
+  else
+    while (e++) d *= 10;
+  is.flags(old_flags);
+  if (!is.fail())
+    z = (negative ? Rat(-n,d) : Rat(n,d));
+
+} 
+    
+    
+  } // namespace internal
+
+} //namespace CGAL
+
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/IO/io_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_IO_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/io_impl.h b/3rdparty/CGAL-4.8/include/CGAL/IO/io_impl.h
new file mode 100644
index 0000000..ee84373
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/io_impl.h
@@ -0,0 +1,136 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+
+#include <sstream>
+#include <string>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+IO::Mode
+get_mode(std::ios& i)
+{
+  return static_cast<IO::Mode>(i.iword(IO::get_static_mode()));
+}
+
+CGAL_INLINE_FUNCTION
+IO::Mode
+set_ascii_mode(std::ios& i)
+{
+    IO::Mode m = get_mode(i);
+    i.iword(IO::get_static_mode()) = IO::ASCII;
+    return m;
+}
+
+CGAL_INLINE_FUNCTION
+IO::Mode
+set_binary_mode(std::ios& i)
+{
+    IO::Mode m = get_mode(i);
+    i.iword(IO::get_static_mode()) = IO::BINARY;
+    return m;
+}
+
+
+CGAL_INLINE_FUNCTION
+IO::Mode
+set_pretty_mode(std::ios& i)
+{
+    IO::Mode m = get_mode(i);
+    i.iword(IO::get_static_mode()) = IO::PRETTY;
+    return m;
+}
+
+CGAL_INLINE_FUNCTION
+IO::Mode
+set_mode(std::ios& i, IO::Mode m)
+{
+    IO::Mode old = get_mode(i);
+    i.iword(IO::get_static_mode()) = m;
+    return old;
+}
+
+CGAL_INLINE_FUNCTION
+bool
+is_pretty(std::ios& i)
+{
+    return i.iword(IO::get_static_mode()) == IO::PRETTY;
+}
+
+CGAL_INLINE_FUNCTION
+bool
+is_ascii(std::ios& i)
+{
+    return i.iword(IO::get_static_mode()) == IO::ASCII;
+}
+
+CGAL_INLINE_FUNCTION
+bool
+is_binary(std::ios& i)
+{
+    return i.iword(IO::get_static_mode()) == IO::BINARY;
+}
+
+CGAL_INLINE_FUNCTION
+const char*
+mode_name( IO::Mode m) {
+    static const char* const names[] = {"ASCII", "PRETTY", "BINARY" };
+    CGAL_assertion( IO::ASCII <= m && m <= IO::BINARY );
+    return names[m];
+}
+
+CGAL_INLINE_FUNCTION
+void
+swallow(std::istream &is, char d) {
+    char c;
+    do is.get(c); while (isspace(c));
+    if (c != d) {
+      std::stringstream msg;
+      msg << "input error: expected '" << d << "' but got '" << c << "'";
+      CGAL_error_msg( msg.str().c_str() );
+    }
+}
+
+CGAL_INLINE_FUNCTION
+void
+swallow(std::istream &is, const std::string& s ) {
+    std::string t;
+    is >> t;
+    if (s != t) {
+      std::stringstream msg;
+      msg << "input error: expected '" << s << "' but got '" << t << "'";
+      CGAL_error_msg( msg.str().c_str() );
+    }
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/io_tags.h b/3rdparty/CGAL-4.8/include/CGAL/IO/io_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/io_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/io_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/output_surface_facets_to_polyhedron.h b/3rdparty/CGAL-4.8/include/CGAL/IO/output_surface_facets_to_polyhedron.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/output_surface_facets_to_polyhedron.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/output_surface_facets_to_polyhedron.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/output_surface_facets_to_triangle_soup.h b/3rdparty/CGAL-4.8/include/CGAL/IO/output_surface_facets_to_triangle_soup.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/output_surface_facets_to_triangle_soup.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/output_surface_facets_to_triangle_soup.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/print_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/print_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/print_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/print_OFF.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/print_VRML_1.h b/3rdparty/CGAL-4.8/include/CGAL/IO/print_VRML_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/print_VRML_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/print_VRML_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/print_VRML_2.h b/3rdparty/CGAL-4.8/include/CGAL/IO/print_VRML_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/print_VRML_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/print_VRML_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/print_inventor.h b/3rdparty/CGAL-4.8/include/CGAL/IO/print_inventor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/print_inventor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/print_inventor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/print_wavefront.h b/3rdparty/CGAL-4.8/include/CGAL/IO/print_wavefront.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/print_wavefront.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/print_wavefront.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/read_off_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/read_off_points.h
new file mode 100644
index 0000000..3292385
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/read_off_points.h
@@ -0,0 +1,436 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret
+
+#ifndef CGAL_READ_OFF_POINTS_H
+#define CGAL_READ_OFF_POINTS_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/value_type_traits.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+  #include <boost/property_map/property_map.hpp>
+#else
+  #include <boost/property_map.hpp>
+#endif
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+namespace CGAL {
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (positions + normals, if available) from a .off ASCII stream.
+/// The function expects for each point a line with the x y z position,
+/// optionally followed by the nx ny nz normal.
+/// Faces are ignored.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with  value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+bool
+read_off_points_and_normals(
+    std::istream& stream, ///< input stream.
+    OutputIterator output, ///< output iterator over points.
+    PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+    NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+    const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // value_type_traits is a workaround as back_insert_iterator's value_type is void
+  // typedef typename value_type_traits<OutputIterator>::type Enriched_point;
+  typedef OutputIteratorValueType Enriched_point;
+
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // scan points
+  long pointsCount = 0, facesCount = 0, edgesCount = 0; // number of items in file
+  int pointsRead = 0; // current number of points read
+  int lineNumber = 0; // current line number
+  std::string line;
+  std::istringstream iss;
+  while(getline(stream,line))
+  {
+    iss.clear();
+    iss.str(line);
+
+    // Ignore empty lines and comments
+    if (line.empty () || line[0] == '#')
+      continue;
+
+    lineNumber++;
+
+    // Reads file signature on first line
+    if (lineNumber == 1)
+    {
+      std::string signature;
+      if ( !(iss >> signature)
+        || (signature != "OFF" && signature != "NOFF") )
+      {
+        // if wrong file format
+        std::cerr << "Incorrect file format line " << lineNumber << " of file" << std::endl;
+        return false;
+      }
+    }
+
+    // Reads number of points on 2nd line
+    else if (lineNumber == 2)
+    {
+      if ( !(iss >> pointsCount >> facesCount >> edgesCount) )
+      {
+        std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+        return false;
+      }
+    }
+
+    // Reads 3D points on next lines
+    else if (pointsRead < pointsCount)
+    {
+      // Reads position + normal...
+      double x,y,z;
+      double nx,ny,nz;
+      if (iss >> iformat(x) >> iformat(y) >> iformat(z))
+      {
+        Point point(x,y,z);
+        Vector normal = CGAL::NULL_VECTOR;
+        // ... + normal...
+        if (iss >> iformat(nx))
+        {
+          // In case we could read one number, we expect that there are two more
+          if(iss  >> iformat(ny) >> iformat(nz)){
+            normal = Vector(nx,ny,nz);
+          } else {
+            std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+            return false;
+          }
+        }
+        Enriched_point pwn;
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        put(point_pmap,  &pwn, point);  // point_pmap[&pwn] = point
+        put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal
+#else
+        put(point_pmap,  pwn, point);  // point_pmap[&pwn] = point
+        put(normal_pmap, pwn, normal); // normal_pmap[&pwn] = normal
+#endif
+        *output++ = pwn;
+        pointsRead++;
+      }
+      // ...or skip comment line
+    }
+    // Skip remaining lines
+  }
+
+  return true;
+}
+
+/// @cond SKIP_IN_MANUAL
+template <typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+bool
+read_off_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap,
+    kernel);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+bool
+read_off_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_off_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap,
+    Kernel());
+}
+
+template <typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+bool
+read_off_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename NormalPMap
+>
+bool
+read_off_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  return read_off_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output),
+#else
+    make_identity_property_map(OutputIteratorValueType()),
+#endif
+    normal_pmap);
+}
+
+template <typename OutputIterator,
+          typename NormalPMap
+>
+bool
+read_off_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (position only) from a .off ASCII stream.
+/// The function expects for each point a line with the x y z position.
+/// If the position is followed by the nx ny nz normal, then the normal will be ignored.
+/// Faces are ignored.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with  value_type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from  the value type of `PointPMap`.
+///
+/// @return `true` on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // Calls read_off_points_and_normals() with a normal property map = boost::dummy_property_map
+  return read_off_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    boost::dummy_property_map(),
+    kernel);
+}
+
+/// @cond SKIP_IN_MANUAL
+template <typename OutputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    kernel);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_off_points
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    Kernel());
+}
+
+template <typename OutputIterator,
+          typename PointPMap
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output) ///< output iterator over points.
+{
+  return read_off_points
+    <OutputIteratorValueType>(
+    stream,
+    output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output)
+#else
+    make_identity_property_map(OutputIteratorValueType())
+#endif
+    );
+}
+
+template <typename OutputIterator
+>
+bool
+read_off_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output) ///< output iterator over points.
+{
+  // just deduce value_type of OutputIterator
+  return read_off_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output);
+}
+//-----------------------------------------------------------------------------------
+
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_READ_OFF_POINTS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/read_ply_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/read_ply_points.h
new file mode 100644
index 0000000..ad772f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/read_ply_points.h
@@ -0,0 +1,615 @@
+// Copyright (c) 2015  Geometry Factory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Simon Giraudot
+
+#ifndef CGAL_READ_PLY_POINTS_H
+#define CGAL_READ_PLY_POINTS_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/value_type_traits.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <boost/version.hpp>
+#include <boost/cstdint.hpp>
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+
+namespace CGAL {
+
+
+// PLY types:
+// name        type        number of bytes
+// ---------------------------------------
+// char       character                 1
+// uchar      unsigned character        1
+// short      short integer             2
+// ushort     unsigned short integer    2
+// int        integer                   4
+// uint       unsigned integer          4
+// float      single-precision float    4
+// double     double-precision float    8
+
+namespace internal {
+
+  class Ply_read_number
+  {
+  protected:
+    std::string m_name;
+    std::size_t m_format;
+    
+  public:
+    Ply_read_number (std::string name, std::size_t format)
+      : m_name (name), m_format (format) { }
+    virtual ~Ply_read_number() { }
+
+    const std::string& name () const { return m_name; }
+
+    virtual double operator() (std::istream& stream) const = 0;
+
+    // The two following functions prevent the stream to only extract
+    // ONE character (= what the types char imply) by requiring
+    // explicitely an integer object when reading the stream
+    void read_ascii (std::istream& stream, boost::int8_t& c) const
+    {
+      short s;
+      stream >> s;
+      c = static_cast<char>(s);
+    }
+    void read_ascii (std::istream& stream, boost::uint8_t& c) const
+    {
+      unsigned short s;
+      stream >> s;
+      c = static_cast<unsigned char>(s);
+    }
+
+    // Default template when Type is not a char type
+    template <typename Type>
+    void read_ascii (std::istream& stream, Type& t) const
+    {
+      stream >> t;
+    }
+    
+    template <typename Type>
+    Type read (std::istream& stream) const
+    {
+      if (m_format == 0) // Ascii
+        {
+          Type t;
+          read_ascii (stream, t);
+          return t;
+        }
+      else // Binary (2 = little endian)
+        {
+          union
+          {
+            char uChar[sizeof (Type)];
+            Type type;
+          } buffer;
+          
+          std::size_t size = sizeof (Type);
+
+          stream.read(buffer.uChar, size);
+      
+          if (m_format == 2) // Big endian
+            {
+              for (std::size_t i = 0; i < size / 2; ++ i)
+                {
+                  unsigned char tmp = buffer.uChar[i];
+                  buffer.uChar[i] = buffer.uChar[size - 1 - i];
+                  buffer.uChar[size - 1 - i] = tmp;
+                }
+            }
+          return buffer.type;
+        }
+      return Type();
+    }
+  };
+
+  class Ply_read_char : public Ply_read_number
+  {
+  public:
+    Ply_read_char (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::int8_t> (stream)); }
+  };
+  class Ply_read_uchar : public Ply_read_number
+  {
+  public:
+    Ply_read_uchar (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::uint8_t> (stream)); }
+  };
+  class Ply_read_short : public Ply_read_number
+  {
+  public:
+    Ply_read_short (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::int16_t> (stream)); }
+  };
+  class Ply_read_ushort : public Ply_read_number
+  {
+  public:
+    Ply_read_ushort (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::uint16_t> (stream)); }
+  };
+  class Ply_read_int : public Ply_read_number
+  {
+  public:
+    Ply_read_int (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::int32_t> (stream)); }
+  };
+  class Ply_read_uint : public Ply_read_number
+  {
+  public:
+    Ply_read_uint (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<boost::uint32_t> (stream)); }
+  };
+  class Ply_read_float : public Ply_read_number
+  {
+  public:
+    Ply_read_float (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return static_cast<double> (this->read<float> (stream)); }
+  };
+  class Ply_read_double : public Ply_read_number
+  {
+  public:
+    Ply_read_double (std::string name, std::size_t format) : Ply_read_number (name, format) { }
+    double operator() (std::istream& stream) const
+    { return this->read<float> (stream); }
+  };
+
+
+
+} //namespace CGAL
+  
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (positions + normals, if available) from a .ply
+/// stream (ASCII or binary).
+/// Potential additional point properties and faces are ignored.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with  value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename Kernel >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                                 NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+                                 const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // value_type_traits is a workaround as back_insert_iterator's value_type is void
+  // typedef typename value_type_traits<OutputIterator>::type Enriched_point;
+  typedef OutputIteratorValueType Enriched_point;
+
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // scan points
+  std::size_t pointsCount = 0,  // number of items in file
+    pointsRead = 0, // current number of points read
+    lineNumber = 0; // current line number
+  enum Format { ASCII = 0, BINARY_LITTLE_ENDIAN = 1, BINARY_BIG_ENDIAN = 2};
+  Format format = ASCII;
+    
+  std::string line;
+  std::istringstream iss;
+
+  // Check the order of the properties of the point set
+  bool reading_properties = false;
+  std::vector<internal::Ply_read_number*> readers;
+  
+  while (getline (stream,line))
+  {
+    iss.clear();
+    iss.str (line);
+    ++ lineNumber;
+
+    // Reads file signature on first line
+    if (lineNumber == 1)
+      {
+        std::string signature;
+        if (!(iss >> signature) || (signature != "ply"))
+          {
+            // if wrong file format
+            std::cerr << "Incorrect file format line " << lineNumber << " of file" << std::endl;
+            return false;
+          }
+      }
+
+    // Reads format on 2nd line
+    else if (lineNumber == 2)
+      {
+        std::string tag, format_string, version;
+        if ( !(iss >> tag >> format_string >> version) )
+          {
+            std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+            return false;
+          }
+        if (format_string == "ascii") format = ASCII;
+        else if (format_string == "binary_little_endian") format = BINARY_LITTLE_ENDIAN;
+        else if (format_string == "binary_big_endian") format = BINARY_BIG_ENDIAN;
+        else
+          {
+            std::cerr << "Unknown file format \"" << format_string << "\" line " << lineNumber << std::endl;
+            return false;
+          }
+      }
+
+    // Comments and vertex properties
+    else
+      {
+        std::string keyword;
+        if (!(iss >> keyword))
+          {
+            std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+            return false;
+          }
+
+        if (keyword == "property")
+          {
+            if (!reading_properties)
+              continue;
+
+            std::string type, name;
+            if (!(iss >> type >> name))
+              {
+                std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+                return false;
+              }
+
+            if (     type == "char"   || type == "int8")
+              readers.push_back (new internal::Ply_read_char (name, format));
+            else if (type == "uchar"  || type == "uint8")
+              readers.push_back (new internal::Ply_read_uchar (name, format));
+            else if (type == "short"  || type == "int16")
+              readers.push_back (new internal::Ply_read_short (name, format));
+            else if (type == "ushort" || type == "uint16")
+              readers.push_back (new internal::Ply_read_ushort (name, format));
+            else if (type == "int"    || type == "int32")
+              readers.push_back (new internal::Ply_read_int (name, format));
+            else if (type == "uint"   || type == "uint32")
+              readers.push_back (new internal::Ply_read_uint (name, format));
+            else if (type == "float"  || type == "float32")
+              readers.push_back (new internal::Ply_read_float (name, format));
+            else if (type == "double" || type == "float64")
+              readers.push_back (new internal::Ply_read_double (name, format));
+                
+            continue;
+          }
+        else
+          reading_properties = false;
+            
+        // ignore comments and properties (if not in element
+        // vertex - cf below - properties are useless in our case)
+        if (keyword == "comment" || keyword == "property")
+          continue;
+
+        // When end_header is reached, stop loop and begin reading points
+        if (keyword == "end_header")
+          break;
+            
+        if (keyword == "element")
+          {
+            std::string type;
+            std::size_t number;
+            if (!(iss >> type >> number))
+              {
+                std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+                return false;
+              }
+                
+            if (type == "vertex")
+              {
+                pointsCount = number;
+                reading_properties = true;
+              }
+            else
+              continue;
+          }
+            
+      }
+  }
+  
+  while (!(stream.eof()) && pointsRead < pointsCount)
+    {
+
+      FT x = 0., y = 0., z = 0., nx = 0., ny = 0., nz = 0.;
+      for (std::size_t i = 0; i < readers.size (); ++ i)
+        {
+          FT value = (*readers[i])(stream);
+          if (readers[i]->name () == "x") x = value;
+          else if (readers[i]->name () == "y") y = value;
+          else if (readers[i]->name () == "z") z = value;
+          else if (readers[i]->name () == "nx") nx = value;
+          else if (readers[i]->name () == "ny") ny = value;
+          else if (readers[i]->name () == "nz") nz = value;
+        }
+      Point point(x,y,z);
+      Vector normal(nx,ny,nz);
+      Enriched_point pwn;
+      
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      put(point_pmap,  &pwn, point);  // point_pmap[&pwn] = point
+      put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal
+#else
+      put(point_pmap,  pwn, point);  // point_pmap[&pwn] = point
+      put(normal_pmap, pwn, normal); // normal_pmap[&pwn] = normal
+#endif
+      *output++ = pwn;
+      pointsRead++;
+    }
+    // Skip remaining lines
+
+  for (std::size_t i = 0; i < readers.size (); ++ i)
+    delete readers[i];
+  
+  return true;
+}
+
+/// @cond SKIP_IN_MANUAL
+template < typename OutputIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename Kernel >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                                 NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+                                 const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output,
+                                                       point_pmap,
+                                                       normal_pmap,
+                                                       kernel);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator,
+           typename PointPMap,
+           typename NormalPMap >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                                 NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_ply_points_and_normals
+    <OutputIteratorValueType>(stream,
+                              output,
+                              point_pmap,
+                              normal_pmap,
+                              Kernel());
+}
+
+template < typename OutputIterator,
+           typename PointPMap,
+           typename NormalPMap >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                                 NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output,
+                                                       point_pmap,
+                                                       normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator,
+           typename NormalPMap >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  return read_ply_points_and_normals
+    <OutputIteratorValueType>(stream,
+                              output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+                              make_dereference_property_map(output),
+#else
+                              make_identity_property_map(OutputIteratorValueType()),
+#endif
+                              normal_pmap);
+}
+
+template < typename OutputIterator,
+           typename NormalPMap >
+bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
+                                 OutputIterator output, ///< output iterator over points.
+                                 NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output,
+                                                       normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (position only) from a .ply stream (ASCII or binary).
+/// Potential additional point properties (including normals) and faces are ignored.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with  value_type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from  the value type of `PointPMap`.
+///
+/// @return `true` on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator,
+           typename PointPMap,
+           typename Kernel >
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output, ///< output iterator over points.
+                     PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                     const Kernel& kernel) ///< geometric traits.
+{
+  // Calls read_ply_points_and_normals() with a normal property map = boost::dummy_property_map
+  return read_ply_points_and_normals
+    <OutputIteratorValueType>(stream,
+                              output,
+                              point_pmap,
+                              boost::dummy_property_map(),
+                              kernel);
+}
+
+/// @cond SKIP_IN_MANUAL
+template < typename OutputIterator,
+           typename PointPMap,
+           typename Kernel >
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output, ///< output iterator over points.
+                     PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+                     const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output,
+                                                       point_pmap,
+                                                       kernel);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator,
+           typename PointPMap >
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output, ///< output iterator over points.
+                     PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_ply_points
+    <OutputIteratorValueType>(stream,
+                              output,
+                              point_pmap,
+                              Kernel());
+}
+
+template < typename OutputIterator,
+           typename PointPMap >
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output, ///< output iterator over points.
+                     PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output,
+                                                       point_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template < typename OutputIteratorValueType,
+           typename OutputIterator >
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output) ///< output iterator over points.
+{
+  return read_ply_points
+    <OutputIteratorValueType>(stream,
+                              output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+                              make_dereference_property_map(output)
+#else
+                              make_identity_property_map(OutputIteratorValueType())
+#endif
+                              );
+}
+
+template < typename OutputIterator>
+bool read_ply_points(std::istream& stream, ///< input stream.
+                     OutputIterator output) ///< output iterator over points.
+{
+  // just deduce value_type of OutputIterator
+  return read_ply_points
+    <typename value_type_traits<OutputIterator>::type>(stream,
+                                                       output);
+}
+//-----------------------------------------------------------------------------------
+
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_READ_PLY_POINTS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/read_xyz_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/read_xyz_points.h
new file mode 100644
index 0000000..0984d78
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/read_xyz_points.h
@@ -0,0 +1,428 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret
+
+#ifndef CGAL_READ_XYZ_POINTS_H
+#define CGAL_READ_XYZ_POINTS_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/value_type_traits.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+  #include <boost/property_map/property_map.hpp>
+#else
+  #include <boost/property_map.hpp>
+#endif
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+namespace CGAL {
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (positions + normals, if available) from a .xyz ASCII stream.
+/// The function expects for each point a line with the x y z position,
+/// optionally followed by the nx ny nz normal.
+/// The first line may contain the number of points in the file.
+/// Empty lines and comments starting by # character are allowed.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with  value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of OutputIterator value_type is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type  `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap,  ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // value_type_traits is a workaround as back_insert_iterator's value_type is void
+  //typedef typename value_type_traits<OutputIterator>::type Enriched_point;
+  typedef OutputIteratorValueType Enriched_point;
+  
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // scan points
+  long pointsCount; // number of points in file
+  int lineNumber = 0; // line counter
+  std::string line; // line buffer
+  std::istringstream iss;
+
+  while(getline(stream,line))
+  {
+    // position + normal
+    FT x,y,z;
+    FT nx,ny,nz;
+
+    lineNumber++;
+
+    // Trims line buffer
+    line.erase(line.find_last_not_of (" ")+1);
+    line.erase(0, line.find_first_not_of (" "));
+
+    // Skips comment or empty line...
+    if (line.length() == 0 || line[0] == '#')
+    {
+      continue;
+    }
+    // ...or reads position...
+    else {
+      iss.clear();
+      iss.str(line);
+      if (iss >> iformat(x) >> iformat(y) >> iformat(z))
+        {
+          Point point(x,y,z);
+          Vector normal = CGAL::NULL_VECTOR;
+          // ... + normal...
+          if (iss >> iformat(nx))
+            {
+              // In case we could read one number, we expect that there are two more
+              if(iss  >> iformat(ny) >> iformat(nz)){
+                normal = Vector(nx,ny,nz);
+              } else {
+                std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+                return false;
+              }
+            }
+          Enriched_point pwn;
+        #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+          put(point_pmap,  &pwn, point);  // point_pmap[&pwn] = point
+          put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal
+        #else
+          put(point_pmap,  pwn, point);  // point_pmap[pwn] = point
+          put(normal_pmap, pwn, normal); // normal_pmap[pwn] = normal
+        #endif
+          *output++ = pwn;
+          continue;
+        } 
+      
+    }
+    // ...or skips number of points on first line (optional)
+    if (lineNumber == 1 && std::istringstream(line) >> pointsCount)
+    {
+      continue;
+    }
+    else // if wrong file format
+    {
+      std::cerr << "Error line " << lineNumber << " of file" << std::endl;
+      return false;
+    }
+  }
+
+  return true;
+}
+
+/// @cond SKIP_IN_MANUAL
+template <typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of OutputIterator -> Vector_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap,
+    kernel);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_xyz_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap,
+    Kernel());
+}
+
+template <typename OutputIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename NormalPMap
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  return read_xyz_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output),
+#else
+    make_identity_property_map(OutputIteratorValueType()),
+#endif
+    normal_pmap);
+}
+
+template <typename OutputIterator,
+          typename NormalPMap
+>
+bool
+read_xyz_points_and_normals(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points_and_normals
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    normal_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Reads points (positions only) from a .xyz ASCII stream.
+/// The function expects for each point a line with the x y z position.
+/// If the position is followed by the nx ny nz normal, then the normal will be ignored.
+/// The first line may contain the number of points in the file.
+/// Empty lines and comments starting by # character are allowed.
+///
+/// @tparam OutputIteratorValueType type of objects that can be put in `OutputIterator`.
+///         It is default to `value_type_traits<OutputIterator>::%type` and can be omitted when the default is fine.
+/// @tparam OutputIterator iterator over output points.
+/// @tparam PointPMap is a model of `WritablePropertyMap` with value type  `Point_3<Kernel>`.
+///        It can be omitted if the value type of `OutputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // Calls read_xyz_points_and_normals() with a normal property map = boost::dummy_property_map
+  return read_xyz_points_and_normals
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    boost::dummy_property_map(),
+    kernel);
+}
+
+/// @cond SKIP_IN_MANUAL
+template <typename OutputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  const Kernel& kernel) ///< geometric traits.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap,
+    kernel);
+}
+/// @endcond
+//-----------------------------------------------------------------------------------
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator,
+          typename PointPMap
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return read_xyz_points
+    <OutputIteratorValueType>(
+    stream,
+    output,
+    point_pmap,
+    Kernel());
+}
+
+template <typename OutputIterator,
+          typename PointPMap
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output,
+    point_pmap);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+//-----------------------------------------------------------------------------------
+template <typename OutputIteratorValueType,
+          typename OutputIterator
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output) ///< output iterator over points.
+{
+  return read_xyz_points
+    <OutputIteratorValueType>(
+    stream,
+    output,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output)
+#else
+    make_identity_property_map(OutputIteratorValueType())
+#endif
+    );
+}
+
+template <typename OutputIterator
+>
+bool
+read_xyz_points(
+  std::istream& stream, ///< input stream.
+  OutputIterator output) ///< output iterator over points.
+{
+  // just deduce value_type of OutputIterator
+  return read_xyz_points
+    <typename value_type_traits<OutputIterator>::type>(
+    stream,
+    output);
+}
+//-----------------------------------------------------------------------------------
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_READ_XYZ_POINTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/scan_OFF.h b/3rdparty/CGAL-4.8/include/CGAL/IO/scan_OFF.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/scan_OFF.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/scan_OFF.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/IO/write_off_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/write_off_points.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/IO/write_off_points.h
rename to 3rdparty/CGAL-4.8/include/CGAL/IO/write_off_points.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/write_ply_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/write_ply_points.h
new file mode 100644
index 0000000..274713e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/write_ply_points.h
@@ -0,0 +1,260 @@
+// Copyright (c) 2015  Geometry Factory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Simon Giraudot
+
+#ifndef CGAL_WRITE_PLY_POINTS_H
+#define CGAL_WRITE_PLY_POINTS_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <boost/version.hpp>
+
+#include <iostream>
+#include <iterator>
+
+namespace CGAL {
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Saves the [first, beyond) range of points (positions + normals) to a .ply ASCII stream.
+///
+/// \pre normals must be unit vectors
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with  value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `ReadablePropertyMap` with a value type  `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename Kernel >
+bool
+write_ply_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3. 
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. 
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // Write header
+  stream << "ply" << std::endl
+         << "format ascii 1.0" << std::endl
+         << "comment Generated by the CGAL library" << std::endl
+         << "element vertex " << std::distance (first, beyond) << std::endl
+         << "property double x" << std::endl
+         << "property double y" << std::endl
+         << "property double z" << std::endl
+         << "property double nx" << std::endl
+         << "property double ny" << std::endl
+         << "property double nz" << std::endl
+         << "end_header" << std::endl;
+  
+
+  // Write positions + normals
+  for(ForwardIterator it = first; it != beyond; it++)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point p = get(point_pmap, it);
+    Vector n = get(normal_pmap, it);
+#else
+    Point p = get(point_pmap, *it);
+    Vector n = get(normal_pmap, *it);
+#endif
+    stream << p << " " << n << std::endl;
+  }
+
+  return ! stream.fail();
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap >
+bool
+write_ply_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return write_ply_points_and_normals(
+    stream,
+    first, beyond,
+    point_pmap,
+    normal_pmap,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename ForwardIterator,
+          typename NormalPMap
+>
+bool
+write_ply_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  return write_ply_points_and_normals(
+    stream,
+    first, beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+    normal_pmap);
+}
+/// @endcond
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Saves the [first, beyond) range of points (positions only) to a .ply ASCII stream.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename Kernel >
+bool
+write_ply_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  const Kernel& ) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // Write header
+  stream << "ply" << std::endl
+         << "format ascii 1.0" << std::endl
+         << "comment Generated by the CGAL library" << std::endl
+         << "element vertex " << std::distance (first, beyond) << std::endl
+         << "property double x" << std::endl
+         << "property double y" << std::endl
+         << "property double z" << std::endl
+         << "end_header" << std::endl;
+
+  // Write positions
+  for(ForwardIterator it = first; it != beyond; it++)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point p = get(point_pmap, it);
+#else
+    Point p = get(point_pmap, *it);
+#endif
+    stream << p << std::endl;
+  }
+
+  return ! stream.fail();
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template < typename ForwardIterator,
+           typename PointPMap >
+bool
+write_ply_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return write_ply_points(
+    stream,
+    first, beyond,
+    point_pmap,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template < typename ForwardIterator >
+bool
+write_ply_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond) ///< past-the-end input point.
+{
+  return write_ply_points(
+    stream,
+    first, beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first)
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<ForwardIterator>::value_type())
+#endif
+    );
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_WRITE_PLY_POINTS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/IO/write_xyz_points.h b/3rdparty/CGAL-4.8/include/CGAL/IO/write_xyz_points.h
new file mode 100644
index 0000000..b8b75c7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/IO/write_xyz_points.h
@@ -0,0 +1,250 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret
+
+#ifndef CGAL_WRITE_XYZ_POINTS_H
+#define CGAL_WRITE_XYZ_POINTS_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+  #include <boost/property_map/property_map.hpp>
+#else
+  #include <boost/property_map.hpp>
+#endif
+
+#include <iostream>
+#include <iterator>
+
+namespace CGAL {
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Saves the [first, beyond) range of points (positions + normals) to a .xyz ASCII stream.
+/// The function writes for each point a line with the x y z position
+/// followed by the nx ny nz normal.
+///
+/// \pre normals must be unit vectors
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value type = `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `ReadablePropertyMap` with a value type  `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+bool
+write_xyz_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // Write positions + normals
+  for(ForwardIterator it = first; it != beyond; it++)
+  {
+  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point p = get(point_pmap, it);
+    Vector n = get(normal_pmap, it);
+  #else
+    Point p = get(point_pmap, *it);
+    Vector n = get(normal_pmap, *it);
+  #endif
+    stream << p << " " << n << std::endl;
+  }
+
+  return ! stream.fail();
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+bool
+write_xyz_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  PointPMap point_pmap, ///< property map: value_type of OutputIterator -> Point_3.
+  NormalPMap normal_pmap) ///< property map: value_type of OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return write_xyz_points_and_normals(
+    stream,
+    first, beyond,
+    point_pmap,
+    normal_pmap,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename ForwardIterator,
+          typename NormalPMap
+>
+bool
+write_xyz_points_and_normals(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  NormalPMap normal_pmap) ///< property map: value_type of ForwardIterator -> Vector_3.
+{
+  return write_xyz_points_and_normals(
+    stream,
+    first, beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output),
+#else
+    make_identity_property_map(
+      typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+    normal_pmap);
+}
+/// @endcond
+
+
+//===================================================================================
+/// \ingroup PkgPointSetProcessing
+/// Saves the [first, beyond) range of points (positions only) to a .xyz ASCII stream.
+/// The function writes for each point a line with the x y z position.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type  `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator value_type is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return true on success.
+
+// This variant requires all parameters.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename Kernel
+>
+bool
+write_xyz_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  if(!stream)
+  {
+    std::cerr << "Error: cannot open file" << std::endl;
+    return false;
+  }
+
+  // Write positions
+  for(ForwardIterator it = first; it != beyond; it++)
+  {
+  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point p = get(point_pmap, it);
+  #else
+    Point p = get(point_pmap, *it);
+  #endif
+    
+    stream << p << std::endl;
+  }
+
+  return ! stream.fail();
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename ForwardIterator,
+          typename PointPMap
+>
+bool
+write_xyz_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond, ///< past-the-end input point.
+  PointPMap point_pmap) ///< property map: value_type of OutputIterator -> Point_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return write_xyz_points(
+    stream,
+    first, beyond,
+    point_pmap,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename ForwardIterator
+>
+bool
+write_xyz_points(
+  std::ostream& stream, ///< output stream.
+  ForwardIterator first, ///< first input point.
+  ForwardIterator beyond) ///< past-the-end input point.
+{
+  return write_xyz_points(
+    stream,
+    first, beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(output)
+#else
+    make_identity_property_map(
+      typename std::iterator_traits<ForwardIterator>::value_type())
+#endif
+    );
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_WRITE_XYZ_POINTS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Identity_policy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Identity_policy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Identity_policy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Identity_policy_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/ImageIO.h b/3rdparty/CGAL-4.8/include/CGAL/ImageIO.h
new file mode 100644
index 0000000..c296b99
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/ImageIO.h
@@ -0,0 +1,707 @@
+// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) 
+// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) 
+// All rights reserved.
+//
+// The files in this directory are part of the ImageIO Library.
+// You can redistribute them and/or  modify them under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+// $URL$
+// $Id$
+//
+
+#ifndef IMAGEIO_H
+#define IMAGEIO_H
+
+#include <CGAL/config.h>
+#include <CGAL/export/ImageIO.h>
+
+#include <CGAL/auto_link/ImageIO.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <boost/cstdint.hpp> // for uint32_t, etc.
+
+#ifdef CGAL_USE_ZLIB
+#include <zlib.h>
+/* see http://www.gzip.org/zlib/
+   for details and documentation
+*/
+#endif
+
+
+
+#if (defined(_LINUX_) || defined(_SOLARIS_))
+
+/* should be declared in stdio.h
+ */
+extern int fileno( FILE *stream);
+extern FILE *fdopen (int fildes, const char *mode);
+/* should be declared in string.h
+ */
+#ifndef __cplusplus
+extern char *strdup(const char *s);
+extern int strncasecmp(const char *s1, const char *s2, size_t n);
+#endif
+
+#endif
+
+
+
+
+
+#ifndef LONGINT
+
+#if (defined _ALPHA_ || (defined _SGI_ && (defined _64_ || defined _64_M4_ || defined _64_M3_)))
+/* the 64-bits type on 64-bits platform (long int) */
+#define LONGINT long  int
+#else
+#ifdef __GNUC__
+/* the 64-bits type on 32-bits platform (long long int) */
+#define LONGINT long long int
+#else
+/*#define LONGINT __int64 */
+#define LONGINT long int
+#endif
+#endif
+
+#endif
+
+
+
+
+
+
+
+
+/** file open mode */
+typedef enum {
+  /** no file open */
+  OM_CLOSE,
+  /** file is stdin or stdout */
+  OM_STD,
+  /** file is gzipped */
+#ifdef CGAL_USE_ZLIB
+  OM_GZ,
+#endif
+  /** normal file */
+  OM_FILE
+} OPEN_MODE;
+
+
+/** data mode */
+typedef enum {
+  /** data are binary */
+  DM_BINARY,
+  /** data are ascii */
+  DM_ASCII
+} DATA_MODE;
+
+
+/** kind of image word */
+typedef enum {
+  /** fixed type */
+  WK_FIXED,
+  /** floating point */
+  WK_FLOAT,
+  /** unknown (uninitialized) */
+  WK_UNKNOWN
+} WORD_KIND;
+
+
+/** image word sign */
+typedef enum {
+  /** signed */
+  SGN_SIGNED,
+  /** unsigned */
+  SGN_UNSIGNED,
+  /** unknown (uninitialized or floating point words) */
+  SGN_UNKNOWN
+} SIGN;
+
+
+/** endianness */
+typedef enum {
+  /** Little endian processor */
+  END_LITTLE,
+  /** Big endian processor */
+  END_BIG,
+  /** Unknown endianness (unopenned file) */
+  END_UNKNOWN
+} ENDIANNESS;
+
+
+/** inrimage vectorial storage mode */
+typedef enum {
+  /** interlaced vectors (i.e. x1, y1, z1, x2, y2, z2, x3, y3, z3, ...) */
+  VM_INTERLACED,
+  /** non interlaced vectors (i.e. x1, x2, x3, ..., y1, y2, y3, ..., z1, z2, z3...) */
+  VM_NON_INTERLACED,
+  /** scalar inrimage */
+  VM_SCALAR
+} VECTORIAL_MODE;
+
+
+
+#ifdef CGAL_USE_ZLIB
+typedef gzFile _ImageIO_file;
+#else
+typedef FILE*  _ImageIO_file;
+#endif
+
+#define IMAGE_FORMAT_NAME_LENGTH 100
+
+
+struct point_image;
+
+/** defines the type of function called to test if an image is of a given
+    format. The first parameter is an array of char of size 5 (ends with
+    character 0) that describes the first file character (magic string). The
+    second parameter is the filename. The output value is >=0 if the image is
+    of that given format and <0 otherwise */
+typedef int (*TEST_IMAGE_FORMAT)(char *,const char *);
+/** defines the type of function called to read an image or an image header
+    from a file corresponding to a given format. The first parameter is the
+    file name whereas the second parameter is an _image structure. Note that 
+    the file has been already opened (the file descriptor fd is valid). 
+    The output value is >0  if  the whole image has been read, it is 0 if 
+    only the header has been read and it is  <0 otherwise */
+typedef int (*READ_IMAGE_HEADER)(const char *, struct point_image *);
+/** defines the type of function called to write an image to a file
+    corresponding to a given format.  
+    The first parameter is the full file name whereas the second parameter
+    is an _image structure. 
+    Note that the file has to be opened and closed in the function.
+    The output value is >=0 if the whole image has been written
+    correctly and it is <0 otherwise */
+typedef int (*WRITE_IMAGE)(char *,struct point_image *);
+
+
+/** Image Format descriptor */
+typedef struct imformat {
+
+  /** a pointer on a function that tests if an image is of a given format */
+  TEST_IMAGE_FORMAT testImageFormat;
+
+  /** a pointer on a function that reads the header of an image file */
+  READ_IMAGE_HEADER readImageHeader;
+
+  /** a pointer on a function that writes  image of a given
+      format */
+  WRITE_IMAGE writeImage;
+
+  /* the file extension of format (including a dot ".": if several 
+     extensions may be used, they should be separed with a 
+     comma ".inr,.inr.gz" */
+  char fileExtension[IMAGE_FORMAT_NAME_LENGTH];
+  
+  /** the usual name given to a format : for instance "inrimage", "gif" */
+  char realName[IMAGE_FORMAT_NAME_LENGTH];
+  /* pointer towards the next image format*/
+  struct imformat *next;
+} IMAGE_FORMAT, *PTRIMAGE_FORMAT;
+
+/** Image descriptor */
+typedef struct point_image {
+  /** Image x dimension (number of columns) */
+  std::size_t xdim;
+  /** Image y dimension (number of rows) */
+  std::size_t ydim;
+  /** Image z dimension (number of planes) */
+  std::size_t zdim;
+  /** Image vectorial dimension */
+  std::size_t vdim;
+
+  /** Image voxel size in x dimension */
+  double vx;
+  /** Image voxel size in y dimension */
+  double vy;
+  /** Image voxel size in z dimension */
+  double vz;
+
+  /** Image offset in x dimension */
+  float tx;
+  /** Image offset in y dimension */
+  float ty;
+  /** Image offset in z dimension */
+  float tz;
+
+  /** Image rotation vector in x dimension */
+  float rx;
+  /** Image rotation vector in y dimension */
+  float ry;
+  /** Image rotation vector in z dimension */
+  float rz;
+
+  /** Image center in x dimension */
+  int cx;
+  /** Image center in y dimension */
+  int cy;
+  /** Image center in z dimension */
+  int cz;
+
+  /** spm */
+  float spm_offset;
+  float spm_scale;
+
+  /** Image data buffer */
+  void *data;
+
+  /** Image word size (in bytes) */
+  std::size_t wdim;
+  /** Image format to use for I/0. Should not be set by user */
+  PTRIMAGE_FORMAT imageFormat;
+  /** Data buffer vectors are interlaced or non interlaced */
+  VECTORIAL_MODE vectMode;
+  /** Image words kind */
+  WORD_KIND wordKind;
+  /** Image words sign */
+  SIGN sign;
+
+  /** User defined strings array. The user can use any internal purpose string.
+      Each string is written at then end of header after a '#' character. */
+  char **user;
+  /** Number of user defined strings */
+  unsigned int nuser;
+
+  /** Image file descriptor */
+  _ImageIO_file fd;
+
+
+  /** Kind of image file descriptor */
+  OPEN_MODE openMode;
+  /** Written words endianness */
+  ENDIANNESS endianness;
+  /** Kind of image data encoding */
+  DATA_MODE dataMode;
+
+} _image;
+
+
+
+/** Error codes */
+#define ImageIO_NO_ERROR 0
+#define ImageIO_UNKNOWN_TYPE -1
+#define ImageIO_OPENING -2
+#define ImageIO_READING_HEADER -3
+#define ImageIO_READING_IMAGE -4
+#define ImageIO_WRITING_HEADER -3
+#define ImageIO_WRITING_IMAGE -4
+#define ImageIO_WRITING_DATA  -5
+
+
+
+
+
+/** Allocates and initializes an image descriptor */
+CGAL_IMAGEIO_EXPORT _image *_initImage();
+
+/** Free an image descriptor
+    @param im image descriptor */
+CGAL_IMAGEIO_EXPORT void _freeImage(_image *im);
+
+/** creates an image descriptor from the given header information
+    @param x image x dimension (number of columns)
+    @param y image y dimension (number of rows)
+    @param z image z dimension (number of planes)
+    @param v image vectorial dimension
+    @param vx image voxel size in x dimension
+    @param vy image voxel size in y dimension
+    @param vz image voxel size in z dimension
+    @param w image word size in bytes
+    @param wk image word kind
+    @param sgn image word sign */
+CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v,
+                                         float vx, float vy, float vz, int w,
+                                         WORD_KIND wk, SIGN sgn);
+
+
+/** Reads an image from a file and returns an image descriptor or NULL if<br>
+    reading failed.<br>
+    Reads from stdin if image name is NULL.
+    The image data field points to a xdim * ydim * zdim * vdim buffer
+    containing voxels in order:
+    (Z1, Y1, X1, V1) (Z1, Y1, X1, V2), ... , (Z1, Y1, X1, Vt),
+    (Z1, Y1, X2, V1) ...         ...       , (Z1, Y1, X2, Vt),
+    ...
+    (Z1, Y1, Xn, V1) ...         ...       , (Z1, Y1, Xn, Vt),
+    (Z1, Y2, X1, V1) ...         ...       , (Z1, Y2, X1, Vt),
+    ...
+    (Z2, Y1, X1, V1) ...         ...       , (Z2, Y1, X1, Vt),
+    ...
+                     ...         ...       , (Zl, Ym, Xn, Vt)
+
+    Read the following format:
+    Inrimage,
+    GIF,
+    IRIS,
+    ANALYSE,
+    PGM,
+    PPM,
+    BMP,
+    GIS (CEA, IRISA, ENST 3D image format).
+    
+    See also:
+    http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html and
+    http://www.gzip.org/zlib/
+    
+
+   @param name image file name or NULL for stdin */
+CGAL_IMAGEIO_EXPORT _image* _readImage(const char *name);
+
+/** Reads an image from a file and returns an image descriptor or NULL if<br>
+    reading failed.<br>
+    Reads from stdin if image name is NULL.
+    If the image is vectorial, it is uninterlaced, i.e. the image data
+    field points to a xdim * ydim * zdim * vdim buffer containing voxels
+    in order:
+     (V1, Z1, Y1, X1) (V1, Z1, Y1, X2), ... , (V1, Z1, Y1, Xn),
+     (V1, Z1, Y2, X1) ...         ...       , (V1, Z1, Y2, Xn),
+     ...
+     (V1, Z1, Ym, X1) ...         ...       , (V1, Z1, Ym, Xn),
+     (V1, Z2, Y1, X1) ...         ...       , (V1, Z2, Y1, Xn),
+     ...
+     (V2, Z1, Y1, X1) ...         ...       , (V2, Z1, Y1, Xn),
+     ...
+                      ...         ...       , (Vt, Zl, Ym, Xn)
+   @param name image file name or NULL */
+CGAL_IMAGEIO_EXPORT _image* _readNonInterlacedImage(const char *name);
+
+/** Read an image from a file. The word type is supposed to be unsigned
+    char, and the dimensions are (rx, ry, rz). */
+CGAL_IMAGEIO_EXPORT _image* _readImage_raw(const char *name,
+                                           const unsigned int rx,
+                                           const unsigned int ry,
+                                           const unsigned int rz,
+                                           const double vx = 1.,
+                                           const double vy = 1.,
+                                           const double vz = 1.,
+                                           const unsigned int offset = 0);
+
+
+/** Writes given image in file 'name'.<br>
+    If name ends with '.gz', file is gzipped.<br>
+    If name is NULL, image is sent to stdout.
+    @param im image descriptor 
+    @param name file name to store image or NULL */
+CGAL_IMAGEIO_EXPORT int _writeImage(_image *im, const char *name);
+
+/** Read one slice of given image whose header has already been read.<br>
+    File descriptor is let at the beginning of next slice and closed<br>
+    when end of file is encountered.<br>
+    If data buffer is NULL, it is allocated for one slice only.<br>
+    This funtion is dedicated to read huge inrimages.
+    @param im image descriptor */
+CGAL_IMAGEIO_EXPORT void _getNextSlice(_image *im);
+
+
+/** adds a format in the list of image format. Test if all mandatory
+    fields have been filled 
+    @param format : an image format 
+    @return -1 if it failed (missing information) and 0 if it succeeded */
+CGAL_IMAGEIO_EXPORT int addImageFormat( PTRIMAGE_FORMAT format);
+
+
+/** returns the first available image format */
+CGAL_IMAGEIO_EXPORT PTRIMAGE_FORMAT firstImageFormat();
+
+/** Reads header from an image file<br>
+    If file is an inrimage, only header is read. Otherwise, whole image<br>
+    is read and image file descriptor is closed.<br>
+    If name is NULL, header is read from STDIN
+    @param name image file name or NULL */
+CGAL_IMAGEIO_EXPORT _image* _readImageHeader(const char *name);
+CGAL_IMAGEIO_EXPORT _image *_readImageHeaderAndGetError( const char *name, int *error );
+
+/** Reads body from an inrmage whose header has been read by
+    _readImageHeader
+    @param im image to read */
+CGAL_IMAGEIO_EXPORT int _readImageData(_image *im);
+
+/** Reads body from a vectorial inrimage whose header has been read by
+    _readImageHeader. The image is uninterlaced
+    (see _readNonInterlacedImage for details).
+    @param im image descriptor*/
+CGAL_IMAGEIO_EXPORT int _readNonInterlacedImageData(_image *im);
+
+/** Reads body from a non-interlaced vectorial inrimage whose header has
+    been read by _readImageHeader. The image buffer is interlaced.
+    @param im image descriptor */
+CGAL_IMAGEIO_EXPORT int _readNonInterlacedFileData(_image *im);
+
+
+
+
+/** given an initialized file descriptor and a file name, open file
+   from stdout (if name == NULL), a gziped pipe (if file is gziped)
+   or a standard file otherwise.
+   @param im initialized image descriptor
+   @param name image file name */
+CGAL_IMAGEIO_EXPORT void _openWriteImage(_image* im, const char *name) ;
+   
+/** open an image file from stdin (if name == NULL), from a pipe
+   (piped with gzip if image was compressed) or from a standard file
+   @param im initialized image descriptor
+   @param name image file name */
+CGAL_IMAGEIO_EXPORT void _openReadImage(_image *im, const char *name);
+
+/** close an image file descriptor that was opened using _openImage
+    @param im opened image descriptor */
+
+
+/** return the bounding box of the image
+    @param im opened image descriptor */
+CGAL_IMAGEIO_EXPORT void _get_image_bounding_box(_image* im,
+                                                 double* x_min, double* y_min, double* z_min,
+                                                 double* x_max, double* y_max, double* z_max);
+
+/** returns the endianness of the hardware architecture */
+CGAL_IMAGEIO_EXPORT ENDIANNESS  _getEndianness(); 
+/** initializes the list of  supported image formats */
+CGAL_IMAGEIO_EXPORT void initSupportedFileFormat();
+/** prints supported image formats */
+CGAL_IMAGEIO_EXPORT void printSupportedFileFormat();
+/** free the list of  supported image formats */
+CGAL_IMAGEIO_EXPORT void removeSupportedFileFormat();
+
+
+/** return image type in given file
+    @param fileName image file name */
+CGAL_IMAGEIO_EXPORT PTRIMAGE_FORMAT imageType(const char *fileName);
+
+extern "C" {
+/** function prototype to allocate memory */
+typedef void *(*ALLOCATION_FUNCTION)(size_t);
+
+/** function prototype to free memory */
+typedef void (*DEALLOCATION_FUNCTION)(void *);
+}
+
+/** set allocation and deallocation routines
+    @param alloc new allocation routine
+    @param del new deallocation routine */
+CGAL_IMAGEIO_EXPORT void setImageIOAllocationRoutines(ALLOCATION_FUNCTION alloc,
+                                                      DEALLOCATION_FUNCTION del);
+
+
+
+/** call allocation routine */
+CGAL_IMAGEIO_EXPORT void *ImageIO_alloc(size_t);
+/** call deallocation routine */
+CGAL_IMAGEIO_EXPORT void ImageIO_free(void *);
+
+/** replaces fwrite function
+    @param im image to write
+    @param buf data buffer to write
+    @param len buffer length */
+CGAL_IMAGEIO_EXPORT size_t ImageIO_write(const _image *im, const void *buf, size_t len);
+
+
+/** replaces fread function
+    @param im image to read
+    @param buf data buffer to read
+    @param len buffer length */
+CGAL_IMAGEIO_EXPORT size_t ImageIO_read(const _image *im, void *buf, size_t len);
+
+/** replaces fgets function
+ */
+CGAL_IMAGEIO_EXPORT char *ImageIO_gets( const _image *im, char *str, int size );
+
+/** replaces fseek function
+ */
+CGAL_IMAGEIO_EXPORT int ImageIO_seek( const _image *im, long offset, int whence );
+
+/** replaces ferror function
+ */
+CGAL_IMAGEIO_EXPORT int ImageIO_error( const _image *im );
+
+/** replaces fclose function
+ */
+CGAL_IMAGEIO_EXPORT int ImageIO_close( _image *im );
+
+/** trilinear interpolation in an _image. The returned type is float (cast
+    are made if the image word type is different).
+ */
+CGAL_IMAGEIO_EXPORT float triLinInterp(const _image* image, float posx, float posy, float posz,
+                                       const float value_outside = 0.);
+
+/** Alias for triLinInterp */
+CGAL_IMAGEIO_EXPORT inline float trilinear_interpolation(const _image* image,
+                                                         float posx, float posy, float posz)
+{
+  return triLinInterp(image, posx, posy, posz);
+}
+
+namespace CGAL {
+namespace IMAGEIO {
+
+//
+// The following definition are for the evaluate function.
+// 
+template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
+struct Word_type_generator
+{
+};
+
+template <SIGN sign>
+struct Word_type_generator<WK_FLOAT, sign, 4>
+{
+  typedef float type;
+};
+
+template <SIGN sign>
+struct Word_type_generator<WK_FLOAT, sign, 8>
+{
+  typedef double type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_SIGNED, 1>
+{
+//   typedef boost::int8_t type;
+  typedef char type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>
+{
+  typedef boost::uint8_t type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_SIGNED, 2>
+{
+  typedef boost::int16_t type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>
+{
+  typedef boost::uint16_t type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_SIGNED, 4>
+{
+  typedef boost::int32_t type;
+};
+
+template <>
+struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>
+{
+  typedef boost::uint32_t type;
+};
+
+template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
+inline
+typename Word_type_generator<wordKind, sign, wdim>::type
+static_evaluate(const _image* image,
+                const std::size_t i,
+                const std::size_t j,
+                const std::size_t k)
+{
+  typedef typename Word_type_generator<wordKind, sign, wdim>::type Word;
+
+  return static_evaluate<Word>(image, i, j, k);
+}
+
+template <typename Word>
+inline
+Word
+static_evaluate(const _image* image,
+                const std::size_t i,
+                const std::size_t j,
+                const std::size_t k)
+{
+  return ((Word*)image->data)[(k * image->ydim + j) * image->xdim + i];
+}
+
+} // end namespace IMAGEIO
+} // end namespace CGAL
+
+#define CGAL_IMAGE_IO_CASE(image_ptr,code)                                                 \
+  switch(image_ptr->wordKind)                                                              \
+  {                                                                                        \
+  case WK_FLOAT:                                                                           \
+    switch(image_ptr->wdim)                                                                \
+    {                                                                                      \
+    case 4: {                                                                              \
+      typedef CGAL::IMAGEIO::Word_type_generator<WK_FLOAT, SGN_UNKNOWN, 4>::type Word;     \
+      code;                                                                                \
+      break;                                                                               \
+    }                                                                                      \
+    case 8: {                                                                              \
+      typedef CGAL::IMAGEIO::Word_type_generator<WK_FLOAT, SGN_UNKNOWN, 8>::type Word;     \
+      code;                                                                                \
+      break;                                                                               \
+    }                                                                                      \
+    default:                                                                               \
+      break;                                                                               \
+    }                                                                                      \
+    break;                                                                                 \
+  case WK_FIXED:                                                                           \
+    switch(image_ptr->wdim)                                                                \
+    {                                                                                      \
+    case 2: {                                                                              \
+      if(image_ptr->sign == SGN_SIGNED) {                                                  \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 2>::type Word;    \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+      else {                                                                               \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>::type Word;  \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+    }                                                                                      \
+    case 1: {                                                                              \
+      if(image_ptr->sign == SGN_SIGNED) {                                                  \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 1>::type Word;    \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+      else {                                                                               \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>::type Word;  \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+    }                                                                                      \
+    case 4: {                                                                              \
+      if(image_ptr->sign == SGN_SIGNED) {                                                  \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_SIGNED, 4>::type Word;    \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+      else {                                                                               \
+        typedef CGAL::IMAGEIO::Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>::type Word;  \
+        code;                                                                              \
+        break;                                                                             \
+      }                                                                                    \
+    }                                                                                      \
+    default:                                                                               \
+      break;                                                                               \
+    }                                                                                      \
+    break;                                                                                 \
+  default:                                                                                 \
+    break;                                                                                 \
+  }
+
+CGAL_IMAGEIO_EXPORT float evaluate(const _image* image,const std::size_t i,const std::size_t j,const std::size_t k);
+
+
+/** convert the data of the image to float 
+*/
+CGAL_IMAGEIO_EXPORT void convertImageTypeToFloat(_image* image);
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/ImageIO_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // end IMAGEIO_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/ImageIO_impl.h b/3rdparty/CGAL-4.8/include/CGAL/ImageIO_impl.h
new file mode 100644
index 0000000..064e3d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/ImageIO_impl.h
@@ -0,0 +1,1633 @@
+// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) 
+// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) 
+// All rights reserved.
+//
+// The files in this directory are part of the ImageIO Library.
+// You can redistribute them and/or  modify them under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// $URL$
+// $Id$
+//
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#ifdef _MSC_VER
+// Suppress deprecated warning for fileno and strdup
+#  pragma warning(disable:4996) 
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <io.h>
+#include <stdio.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* formats actuellement lus 
+
+   format     |   extension(s)   |  lecture  | ecriture 
+   INRIMAGE   |  .inr[.gz]       |     X     |     X     -> + .gradient[.gz] + .gradient_direction[.gz]
+   GIS        |  .dim, .ima[.gz] |     X     |     X
+   ANALYZE    |  .hdr, .img[.gz] |     X     |     X
+   PNM        |  .ppm, .pgm      |     X     |     X
+   GIF        |  .gif            |     X     |     
+   BMP        |  .gif            |     X     |     
+*/
+#include "inr.h"
+#include "gif.h"
+#include "gis.h"
+#include "pnm.h"
+#include "bmp.h"
+#include "iris.h"
+#include "analyze.h"
+#ifdef MINC_FILES
+#include "mincio.h"
+#endif
+
+
+
+/** the first file format is initialized to null */
+static PTRIMAGE_FORMAT firstFormat=NULL;
+
+/** the Inrimage file format (default format) is initialized to null */
+static PTRIMAGE_FORMAT InrimageFormat=NULL;
+
+struct Remove_supported_file_format {
+  ~Remove_supported_file_format()
+  {
+    removeSupportedFileFormat();
+  }
+};
+
+static Remove_supported_file_format rsff;
+
+
+
+/*--------------------------------------------------
+ *
+ * mimics standard routines
+ *
+ --------------------------------------------------*/
+
+
+
+extern "C" {
+  /* default allocation routine */
+  static void *(*allocRoutine)(size_t) = 0;
+  /* default deallocation routine */
+  static void (*deleteRoutine)(void *) = 0;
+}
+
+CGAL_INLINE_FUNCTION
+void *ImageIO_alloc(size_t s) {
+  if(!allocRoutine) allocRoutine = malloc;
+  return ( (*allocRoutine)(s) );
+}
+/* call allocation routine */
+CGAL_INLINE_FUNCTION
+void ImageIO_free(void *m) {
+  if(!deleteRoutine) deleteRoutine = free;
+  (*deleteRoutine)(m);
+}
+/* call deallocation routine */
+
+
+
+/* mimics fwrite() function.
+   According to _openWriteImage(), openMode will has one 
+   of the following value:
+   - OM_STD (for stdout)
+   - OM_GZ 
+   - OM_FILE
+*/
+CGAL_INLINE_FUNCTION
+size_t ImageIO_write(const _image *im, const void *buf, size_t len) {
+
+  switch(im->openMode) {
+  default :
+  case OM_CLOSE :
+    return 0;
+  case OM_STD :
+#ifdef CGAL_USE_ZLIB
+    return gzwrite(im->fd, (void *) buf, len);
+#else 
+    return fwrite(buf, 1, len, im->fd);
+#endif
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ :
+    return gzwrite(im->fd, (void *) buf, len);
+#endif
+  case OM_FILE:
+    return fwrite(buf, 1, len, (FILE*)im->fd);
+  }
+  //return 0;
+}
+
+
+
+/* mimics fread() function.
+   According to _openReadImage(), openMode will has one 
+   of the following value:
+   - OM_STD (for stdin)
+   - OM_GZ *or* OM_FILE
+*/
+CGAL_INLINE_FUNCTION
+size_t ImageIO_read(const _image *im, void *buf, size_t len) 
+{
+  size_t to_be_read = len;
+  int l = -1;
+  char *b = (char*)buf;
+
+  switch(im->openMode) {
+  default :
+  case OM_CLOSE :
+    return 0;
+  case OM_STD :
+#ifdef CGAL_USE_ZLIB
+    while ( (to_be_read > 0) && ((l = gzread(im->fd, (void *) b, to_be_read)) > 0) ) {
+      to_be_read -= l;
+      b += l;
+    }
+#else 
+    while ( (to_be_read > 0) && ((l = fread( b, 1, to_be_read, im->fd )) > 0) ) {
+      to_be_read -= l;
+      b += l;
+    }
+#endif
+    return ( len - to_be_read );
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ :
+    while ( (to_be_read > 0) && ((l = gzread(im->fd, (void *) b, to_be_read)) > 0) ) {
+      to_be_read -= l;
+      b += l;
+    }
+    if(l<0)
+    {
+      int errnum;
+      fprintf(stderr, "zlib error: %s\n", gzerror(im->fd, &errnum));
+    }
+    return ( len - to_be_read );
+#else
+  case OM_FILE :
+    while ( (to_be_read > 0) && ((l = fread( b, 1, to_be_read, im->fd )) > 0) ) {
+      to_be_read -= l;
+      b += l;
+    }
+    return ( len - to_be_read );
+#endif
+  }
+
+  //return 0;
+}
+
+
+
+/* mimics fgets() function.
+   According to _openReadImage(), openMode will has one 
+   of the following value:
+   - OM_STD (for stdout)
+   - OM_GZ *or* OM_FILE
+*/
+CGAL_INLINE_FUNCTION
+char *ImageIO_gets( const _image *im, char *str, int size )
+{
+  char *ret = NULL;
+  switch(im->openMode) {
+  default :
+  case OM_CLOSE :
+    return NULL;
+  case OM_STD :
+#ifdef CGAL_USE_ZLIB
+    ret = (char *) gzgets(im->fd, str, size );
+#else
+    ret = fgets(str, size, im->fd);
+#endif
+    break;
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ :
+    ret = (char *) gzgets(im->fd, str, size);
+    break;
+#else
+  case OM_FILE :
+    ret = fgets(str, size, im->fd);
+    break;
+#endif
+  }
+  return ret;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int ImageIO_seek( const _image *im, long offset, int whence ) {
+  switch(im->openMode) {
+  case OM_CLOSE :
+  default :
+    return -1;
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ:
+    return gzseek(im->fd, offset, whence );
+#endif
+  case OM_FILE:
+    return fseek( (FILE*)im->fd, offset, whence );
+  }
+}
+
+/* return non 0 in case of error
+ */
+CGAL_INLINE_FUNCTION
+int ImageIO_error( const _image *im )
+{
+  switch(im->openMode) {
+  case OM_CLOSE :
+  default :
+    return 0;
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ :
+    static int errnum;
+    (void)gzerror(im->fd, &errnum);
+    return( (errnum != Z_OK) || gzeof(im->fd) );
+#endif
+  case OM_FILE :
+    return( ferror( (FILE*)im->fd ) || feof( (FILE*)im->fd ) );
+  }
+  //return 0;
+}
+
+
+
+/* Upon successful completion 0 is returned.
+   
+   Closing the standard output with gzclose()
+   is necessary as it will flush the pending output.
+ */
+CGAL_INLINE_FUNCTION
+int ImageIO_close( _image* im )
+{
+  int ret=0;
+  
+  switch ( im->openMode ) {
+  default :
+  case OM_CLOSE :
+    break;
+#ifdef CGAL_USE_ZLIB
+  case OM_GZ :
+  case OM_STD :
+    ret = gzclose( im->fd );
+    break;
+#else 
+  case OM_STD :
+    break;
+#endif
+  case OM_FILE :
+    ret = fclose( (FILE*)im->fd );
+  }
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+  
+  return ret;
+}
+
+
+
+
+
+
+
+/* given an initialized file descriptor and a file name, 
+   open file from stdin (if name == NULL, or name == "-", or name == "<"), 
+   or a standard/gzipped file otherwise (gzipped files are handled assuming
+   that it is compiled and linked with zlib). 
+   openMode will have one of the following value:
+   - OM_STD (for stdin)
+   - OM_GZ *or* OM_FILE
+*/
+CGAL_INLINE_FUNCTION
+void _openReadImage(_image* im, const char *name) {
+  if(im->openMode == OM_CLOSE) {
+
+    /* open from stdin */
+    if( name == NULL || name[0] == '\0' 
+	|| (name[0] == '-' && name[1] == '\0') 
+	|| (name[0] == '<' && name[1] == '\0') ) {
+#ifdef CGAL_USE_ZLIB      
+      im->fd = gzdopen(fileno(stdin), "rb");
+#else
+      im->fd = fdopen(fileno(stdin), "rb");
+#endif
+      im->openMode = OM_STD;
+    }
+
+    else {
+#ifdef CGAL_USE_ZLIB     
+      im->fd = gzopen(name, "rb");
+      if(im->fd) im->openMode = OM_GZ;
+#else
+      im->fd = fopen(name, "rb");
+      if(im->fd) im->openMode = OM_FILE;
+#endif
+
+    }
+
+  }
+}
+
+
+
+
+
+/* given an initialized file descriptor and a file name, 
+   open file from stdout (if name == NULL, or name == "-", or name == ">"), 
+   a gzipped pipe (if name got the extension ".gz")
+   or a standard file otherwise.
+   openMode will have one of the following value:
+   - OM_STD (for stdout)
+   - OM_GZ 
+   - OM_FILE
+*/
+CGAL_INLINE_FUNCTION
+void _openWriteImage(_image* im, const char *name) 
+{
+  im->openMode = OM_CLOSE;
+
+  if( name == NULL || name[0] == '\0' 
+      || (name[0] == '-' && name[1] == '\0') 
+      || (name[0] == '>' && name[1] == '\0') ) {
+
+#ifdef CGAL_USE_ZLIB
+#if (defined _LINUX_) || (defined _SOLARIS_) || (defined _SGI_)
+    im->fd = gzdopen(1, "wb");
+#else
+    im->fd = gzdopen(fileno(stdout), "wb");
+#endif
+#else    
+    im->fd = (_ImageIO_file) stdout;
+#endif
+    im->openMode = OM_STD;
+  }
+
+  else{
+#ifdef CGAL_USE_ZLIB      
+    
+    /* from gzopen() doc:
+       ... The mode parameter is as in fopen ("rb" or "wb") but can
+       also include a compression level ("wb9") or a strategy: 'f' for
+       filtered data as in "wb6f", 'h' for Huffman only compression as
+       in "wb1h" ...
+       However, a small .gz header will be written ... thus gz(d)open can not
+       be used for rgular files.
+    */
+    
+    if( !strncmp(name+strlen(name)-3, ".gz", 3) )
+      {
+#ifdef _MSC_VER
+	int ffd=_open(name,_O_RDWR | _O_CREAT| _O_TRUNC | _O_BINARY, _S_IREAD|_S_IWRITE);
+	im->fd = gzdopen( ffd, "wb" );
+#else
+	im->fd = gzopen( name, "wb" );
+#endif
+	im->openMode = OM_GZ;
+      }
+    else 
+#endif
+    {
+      im->fd = (_ImageIO_file) fopen(name, "wb");
+      im->openMode = OM_FILE;
+    }
+  }
+}
+
+
+
+/* set allocation and deallocation routines */
+CGAL_INLINE_FUNCTION
+void setImageIOAllocationRoutines(ALLOCATION_FUNCTION alloc,
+				  DEALLOCATION_FUNCTION del) {
+  if(alloc != NULL) allocRoutine = alloc;
+  if(del != NULL) deleteRoutine = del;
+}
+
+
+
+
+
+/*--------------------------------------------------
+ *
+ *
+ *
+ --------------------------------------------------*/
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+ENDIANNESS _getEndianness()
+{
+  union {
+    unsigned char uc[2];
+    unsigned short us;
+  } twobytes;
+  twobytes.us = 255;
+  /* on linux or dec
+   */
+  if ( twobytes.uc[1] == 0 ) return( END_LITTLE );
+  /* on solaris or sgi
+   */
+  return( END_BIG );
+}
+
+
+
+
+
+
+
+/* Allocates and initializes an image descriptor */
+CGAL_INLINE_FUNCTION
+_image *_initImage() {
+  _image *im;
+
+  im = (_image *) ImageIO_alloc(sizeof(_image));
+  if ( im == NULL ) return( im );
+
+  /* default image size is 1*1*1 */
+  im->xdim = im->ydim = im->zdim = im->vdim = 1;
+  /* default image voxel size is 1.0*1.0*1.0 */
+  im->vx = im->vy = im->vz = 1.0;
+
+  /* default image center  is 0 0 0 */
+  im->cx = im->cy = im->cz = 0;
+
+  /* default image offset  is 0 0 0 */
+  im->tx = im->ty = im->tz = 0.0;
+
+  /* default image rotation  is 0 0 0 */
+  im->rx = im->ry = im->rz = 0.0;
+
+  /* no data yet */
+  im->data = NULL;
+
+  /* no file associated to image */
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+  im->endianness = END_UNKNOWN;
+
+  /* unknown data kind
+     default is binary
+   */
+  im->dataMode = DM_BINARY;
+
+  /* no user string */
+  im->user = NULL;
+  im->nuser = 0;
+
+  /* unknown word kind */
+  im->wdim = 0;
+  im->wordKind = WK_UNKNOWN;
+  im->vectMode = VM_SCALAR;
+  im->sign = SGN_UNKNOWN;
+  im->imageFormat = NULL;
+
+  /** eventually initializes the supported file formats */
+  if (firstFormat==NULL)
+    initSupportedFileFormat();
+  /* return image descriptor */
+  return im;
+}
+
+CGAL_INLINE_FUNCTION
+_image *_createImage(int x, int y, int z, int v,
+		     float vx, float vy, float vz, int w,
+		     WORD_KIND wk, SIGN sgn)
+{
+  _image *im;
+  
+  im = (_image *) ImageIO_alloc(sizeof(_image));
+  if ( im == NULL ) return( im );
+  
+  im->xdim = x;
+  im->ydim = y;
+  im->zdim = z;
+  im->vdim = v;
+  im->vx = vx;
+  im->vy = vy;
+  im->vz = vz;
+
+  /* default image center  is 0 0 0 */
+  im->cx = im->cy = im->cz = 0;
+
+  /* default image offset  is 0 0 0 */
+  im->tx = im->ty = im->tz = 0.0;
+
+  /* default image rotation  is 0 0 0 */
+  im->rx = im->ry = im->rz = 0.0;
+
+  /* no data yet */
+  im->data = ImageIO_alloc(x*y*z*v*w);
+
+  /* no file associated to image */
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+  im->endianness = END_UNKNOWN;
+
+  /* unknown data kind
+     default is binary
+   */
+  im->dataMode = DM_BINARY;
+
+  /* no user string */
+  im->user = NULL;
+  im->nuser = 0;
+
+  /* unknown word kind */
+  im->wdim = w;
+  im->wordKind = wk;
+  im->vectMode = VM_SCALAR;
+  im->sign = sgn;
+  im->imageFormat = NULL;
+
+  /** eventually initializes the supported file formats */
+  if (firstFormat==NULL)
+    initSupportedFileFormat();
+  /* return image descriptor */
+  return im;
+}
+
+/* return the bounding box of the image */
+CGAL_INLINE_FUNCTION
+void _get_image_bounding_box(_image* im,
+			     double* x_min, double* y_min, double* z_min,
+			     double* x_max, double* y_max, double* z_max) {
+  *x_min = im->tx;
+  *y_min = im->ty;
+  *z_min = im->tz;
+  *x_max = (im->xdim - 1.0f)*(im->vx) + *x_min ;
+  *y_max = (im->ydim - 1.0f)*(im->vy) + *y_min ;
+  *z_max = (im->zdim - 1.0f)*(im->vz) + *z_min ;
+}
+
+/* Free an image descriptor */
+CGAL_INLINE_FUNCTION
+void _freeImage(_image *im) {
+  unsigned int i;
+
+  if ( im == NULL ) return;
+
+  /* close image if opened */
+  if(im->openMode != OM_CLOSE) ImageIO_close(im);
+
+  /* free data if any */
+  if(im->data != NULL) ImageIO_free(im->data);
+  im->data = NULL;
+
+  /* free user string array if any */
+  if( (im->nuser > 0) && (im->user != NULL) ) {
+    for(i = 0; i < im->nuser; i++)
+      if ( im->user[i] != NULL ) ImageIO_free(im->user[i]);
+    ImageIO_free(im->user);
+  }
+  im->nuser = 0;
+  im->user = NULL;
+
+  /* free given descriptor */
+  ImageIO_free(im);
+}
+
+
+
+
+
+/* Reads an image from a file and returns an image descriptor or NULL if
+   reading failed.
+   Reads from stdin if image name is NULL. */
+CGAL_INLINE_FUNCTION
+_image* _readImage(const char *name) {
+  _image *im;
+
+
+  /* read header */
+  im = _readImageHeader( name );
+
+  if(im != NULL && im->openMode != OM_CLOSE) {
+    /* read body */
+    if(_readImageData(im) < 0) {
+      fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
+	      name);
+      _freeImage(im);
+      return NULL;
+    }
+    ImageIO_close(im);
+  }
+
+  return im;
+}
+
+// raw
+CGAL_INLINE_FUNCTION
+_image* _readImage_raw(const char *name,
+                       const unsigned int rx,
+                       const unsigned int ry,
+                       const unsigned int rz,
+                       const double vx,
+                       const double vy,
+                       const double vz,
+		       const unsigned int offset)
+{
+  _image *im = NULL;
+  im = (_image *) ImageIO_alloc(sizeof(_image));
+  if ( im == NULL )
+    return NULL;
+
+  im->xdim = rx;
+  im->ydim = ry;
+  im->zdim = rz;
+  im->vdim = 1;
+  im->vx = vx;
+  im->vy = vy;
+  im->vz = vz;
+
+  // image center
+  im->cx = im->cy = im->cz = 0;
+
+  // image offset
+  im->tx = im->ty = im->tz = 0.0;
+
+  // image rotation
+  im->rx = im->ry = im->rz = 0.0;
+
+
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+  im->endianness = END_UNKNOWN;
+
+  im->dataMode = DM_BINARY;
+
+  // no user string
+  im->user = NULL;
+  im->nuser = 0;
+
+  // word type (unsigned byte)
+  im->wdim = 1;
+  im->wordKind = WK_FIXED;
+  im->vectMode = VM_SCALAR;
+  im->sign = SGN_UNSIGNED;
+  im->imageFormat = NULL;
+
+  // read file
+  ::_openReadImage(im, name);
+  if(!im->fd) {
+    fprintf(stderr, "_readImage_raw: error: unable to open file \'%s\'\n", name);
+    _freeImage(im);
+    return NULL;
+  }
+
+  // read offset
+  if(offset > 0) {
+    im->data = ImageIO_alloc(offset+1);
+    ImageIO_read(im, im->data, offset);
+    ImageIO_free(im->data);
+  }
+  // allocate memory
+  im->data = ImageIO_alloc(rx*ry*rz);
+  if(im->data == NULL)
+    return NULL;
+
+  // read
+  ImageIO_read(im, im->data, rx*ry*rz);
+
+  ImageIO_close(im);
+  /*
+    unsigned int i,j,k;
+    unsigned char *data = (unsigned char *)im->data;
+    int dimxy = rx * ry;
+    for(i=0;i<rx;i++)
+    for(j=0;j<ry;j++)
+    for(k=0;k<rz;k++)
+    {
+    unsigned char voxel;
+    fread(&voxel,1,1,pFile);
+    data[k * dimxy + j * rx + i] = voxel;
+    }
+  */
+
+  return im;
+}
+
+/* Reads an image from a file and returns an image descriptor or NULL if<br>
+   reading failed.<br>
+   Reads from stdin if image name is NULL.
+   If the image is vectorial, it is uninterlaced. */
+CGAL_INLINE_FUNCTION
+_image* _readNonInterlacedImage(const char *name) {
+  _image *im;
+
+  /* read header */
+  im = _readImageHeader(name);
+
+  if(im && im->openMode != OM_CLOSE) {
+    /* read scalar image body */
+    if(im->vdim == 1) {
+      if(_readImageData(im) < 0) {
+	fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
+		name);
+	_freeImage(im);
+	return NULL;
+      }
+    }
+    /* read vectorial image body */
+    else {
+      im->vectMode = VM_NON_INTERLACED;
+      if(_readNonInterlacedImageData(im) < 0) {
+	fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
+		name);
+	_freeImage(im);
+	return NULL;
+      }
+    }
+    ImageIO_close(im);
+   }
+
+  return im;
+}
+
+
+
+
+
+
+
+
+
+
+
+/* Write inrimage given in inr in file name. If file name's suffix is
+   .gz, the image is gziped. If file name's suffix is .hdr, the image
+   is written in ANALYZE format. If file name is NULL, image is written
+   on stdout */
+CGAL_INLINE_FUNCTION
+int _writeImage(_image *im, const char *name_to_be_written ) {
+
+  int r = ImageIO_NO_ERROR;
+  int length = 0;
+  char *name = NULL;
+  char *baseName = NULL;
+
+  if ( im == NULL ) return -1;
+
+  /* different conventions for the standard input
+   */
+  if ( name_to_be_written == NULL || name_to_be_written[0] == '\0' 
+       || (name_to_be_written[0] == '-' && name_to_be_written[1] == '\0') 
+       || (name_to_be_written[0] == '>' && name_to_be_written[1] == '\0') ) {
+    name = NULL;
+  }
+  else {
+    name = strdup( name_to_be_written );
+  }
+
+  initSupportedFileFormat();
+
+  /* what is the wanted format
+   */
+  if ( name == NULL ) {
+    im->imageFormat = InrimageFormat;
+  } else {
+    int i,extLength;
+    PTRIMAGE_FORMAT f;
+    char ext[IMAGE_FORMAT_NAME_LENGTH];
+    char *ptr;
+    
+    
+    /* scan all formats; */
+    im->imageFormat=NULL;
+    length=strlen(name);
+
+    for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
+      /* scan all extensions for that format */
+      ptr=&f->fileExtension[0];
+
+      do {
+	/* get next file extension */
+	i=0;
+	for(i=0;((*ptr)!=',' && (*ptr)!='\0');i++,ptr++) {
+	  ext[i]=(*ptr);
+	}
+	if ((*ptr)==',') {
+	  ext[i]='\0';
+	  ptr++;
+	}
+	else {
+	  ext[i]='\0';
+	}
+	extLength=strlen(ext);
+
+	/* test if the tail of name matches the extension */
+	if ( (length > extLength) && (!strcmp( name + length - extLength, ext)) ) {
+	  im->imageFormat=f;
+	  /* copy original name and removes extension */
+	  baseName=strdup(name);
+	  for(i= length - extLength;i<length;++i)
+	    baseName[i]='\0';
+	}
+
+      } while (((*ptr)!='\0') && (im->imageFormat==NULL));
+    }
+
+    if (!im->imageFormat) { 
+      fprintf(stderr, "_writeImage: warning : unknown extension in %s = assuming Inrimage\n",name);
+      im->imageFormat=InrimageFormat;
+      baseName=strdup(name);
+    }
+  }
+
+
+  /* open file descriptor */
+  /* _openWriteImage( im, name ) ; 
+  
+  
+
+  if(!im->fd) {
+     fprintf(stderr, "_writeImage: error: open failed\n");
+     if ( name != NULL ) free( name );
+     if ( baseName != NULL ) free( baseName );
+     return ImageIO_OPENING;
+  }
+  */
+
+  if (im->imageFormat) {
+
+    if (im->imageFormat->writeImage==NULL) {
+      im->imageFormat=InrimageFormat;
+    }
+
+    if ( 0 ) {
+      fprintf(stderr, "_writeImage: will write '%s' with '%s' format\n",
+	      name, im->imageFormat->realName );
+    }
+
+    if ((*im->imageFormat->writeImage)(name, im)<0) {
+      fprintf(stderr, "_writeImage: error: unable to write \'%s\'\n",
+	      name);
+      r = ImageIO_WRITING_HEADER;
+    } 
+    
+  }
+  
+
+
+  /* close file descriptor */
+  ImageIO_close( im );
+
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+
+  if ( baseName != NULL ) free( baseName );
+  if ( name != NULL ) free( name );
+ 
+  return r;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+/* read header from an image file 
+   
+   if standard input, it's an inrimage
+   if not, get a magic string
+   and try to find the good format
+
+   if data are in a separate file,
+   the header reading procedure will open
+   the data file.
+
+   error:
+   0  success
+   -1 unknown image type
+   -2 error while opening
+   -3 error while reading header
+   -4 error while reading header or data
+ */
+CGAL_INLINE_FUNCTION
+_image *_readImageHeader( const char *name ) {
+  int error = 0;
+  return( _readImageHeaderAndGetError( name, &error ) );
+}
+
+
+
+CGAL_INLINE_FUNCTION
+_image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
+{
+  _image *im;
+  char magic[5];
+  char *name = NULL;
+  PTRIMAGE_FORMAT f;
+  int res;
+
+  *error = ImageIO_NO_ERROR;
+  
+  /* open image file */
+  im = _initImage();
+  if ( name_to_be_read == NULL || name_to_be_read[0] == '\0' 
+       || (name_to_be_read[0] == '-' && name_to_be_read[1] == '\0') 
+       || (name_to_be_read[0] == '<' && name_to_be_read[1] == '\0') ) {
+    name = NULL;
+  }
+  else {
+    name = strdup( name_to_be_read );
+  }
+
+
+  _openReadImage(im, name);	
+
+  if(!im->fd) {
+    fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name);
+    _freeImage(im);
+    *error = ImageIO_OPENING;
+    if ( name != NULL ) free( name );
+    return NULL;
+  }
+
+  initSupportedFileFormat();
+  
+  /* what is the wanted format ?
+     assume that stdin is inrimage
+   */
+  if(im->openMode == OM_STD) {
+    im->imageFormat=InrimageFormat;
+  }
+  else {
+   /* get magic string for disk files
+    */
+    ImageIO_read(im, magic, 4);
+    magic[4] = '\0';
+    ImageIO_seek(im, 0L, SEEK_SET);
+    /** test each format */
+    for(f=firstFormat;(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
+      /* test if it is the correct format based on magic and file extension */
+      if (((*f->testImageFormat)(magic, name)) >=0) {
+	im->imageFormat=f;
+      }
+    }
+  }
+
+  if ( im->imageFormat == NULL ) {
+    fprintf(stderr, "_readImageHeaderAndGetError: does not find image format for \'%s\'\n", name);
+    ImageIO_close( im );
+    _freeImage(im);
+    *error = ImageIO_UNKNOWN_TYPE;
+    if ( name != NULL ) free( name );
+    return NULL;
+  }
+
+  /* now tests if the header can be read correctly */
+	
+  res=(*(im->imageFormat)->readImageHeader)(name,im);
+  /* could read header only */ 
+  if (res == 0) {
+    if ( name != NULL ) free( name );
+    return( im );
+  } 
+  /* could read header and data */
+  else if ( res > 0 ) {
+    ImageIO_close(im);
+    if ( name != NULL ) free( name );
+    return im;
+  }  
+
+  /* could not read error : throw error */
+  fprintf(stderr, "_readImageHeaderAndGetError: an error occurs when reading image\n" );
+  if ( name == NULL || im->openMode == OM_STD) {
+    fprintf(stderr, "\t from \'standard input\'" );
+  }
+  else {
+    fprintf(stderr, "\t from file \'%s\'", name );
+  }
+  fprintf(stderr, " using format \'%s\'\n", (im->imageFormat)->realName );
+  ImageIO_close( im );
+  _freeImage(im);
+  *error = ImageIO_READING_HEADER;
+  if ( name != NULL ) free( name );
+  return NULL;
+
+}
+
+
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+static void _swapImageData( _image *im ) 
+{
+  unsigned char *ptr1, *ptr2, b[8];
+  unsigned short int si, *ptr3, *ptr4;
+  unsigned int        i, *ptr5, *ptr6;
+  int size, length;
+  
+  if( _getEndianness() != im->endianness) {
+
+    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+    if ( size <= 0 ) return;
+
+    length = size / im->wdim;
+    ptr1 = ptr2 = (unsigned char *) im->data;
+    
+    /* 2 bytes swap */
+    if(im->wdim == 2) {
+      /*
+	while(length--) {
+	b[0] = *ptr1++;
+	b[1] = *ptr1++;
+	*ptr2++ = b[1];
+	*ptr2++ = b[0];
+	}
+      */
+      ptr3 = ptr4 = (unsigned short int *) im->data;
+      while( length-- ) {
+	si = *ptr3++;
+	*ptr4++ = ((si >> 8) & 0xff) | (si << 8);
+      }
+    }
+    
+    /* 4 bytes swap */
+    else if(im->wdim == 4) {
+      /*
+	while(length--) {
+	b[0] = *ptr1++;
+	b[1] = *ptr1++;
+	b[2] = *ptr1++;
+	b[3] = *ptr1++;
+	*ptr2++ = b[3];
+	*ptr2++ = b[2];
+	*ptr2++ = b[1];
+	*ptr2++ = b[0];
+	}
+      */
+      ptr5 = ptr6 = (unsigned int *) im->data;
+      while( length-- ) {
+	i = *ptr5++;
+	*ptr6++ =  (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | ((i >> 24) & 0xff);
+      }
+    }
+    /* 8 bytes swap */
+    else if(im->wdim == 8) {
+      while(length--) {
+	b[0] = *ptr1++;
+	b[1] = *ptr1++;
+	b[2] = *ptr1++;
+	b[3] = *ptr1++;
+	b[4] = *ptr1++;
+	b[5] = *ptr1++;
+	b[6] = *ptr1++;
+	b[7] = *ptr1++;
+	*ptr2++ = b[7];
+	*ptr2++ = b[6];
+	*ptr2++ = b[5];
+	*ptr2++ = b[4];
+	*ptr2++ = b[3];
+	*ptr2++ = b[2];
+	*ptr2++ = b[1];
+	*ptr2++ = b[0];
+      }
+    }
+  }
+}
+
+
+
+
+
+
+/* Read data of an inrimage.
+   If im->data is not NULL, assume that the buffer was previously allocated
+   Swap bytes depending on the endianness and the current architecture  */
+CGAL_INLINE_FUNCTION
+int _readImageData(_image *im) {
+  unsigned long size, nread;
+
+  if(im->openMode != OM_CLOSE) {
+    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+    
+    if ( size <= 0 ) return -3;
+
+    if(!im->data) {
+      im->data = (unsigned char *) ImageIO_alloc(size);
+      if(!im->data) return -2;
+    }
+
+    nread = ImageIO_read(im, im->data, size);
+    if(nread != size) return -1;
+
+
+    /* architecture is big endian and data little endian 
+       length = nb of points
+     */
+    _swapImageData( im );
+
+
+  }
+
+  return 1;
+}
+
+
+
+
+
+/* Read data of a vectorial inrimage, making the resulting buffer non-
+   inerlaced.
+   If im->data is not NULL, assume that the buffer was previously allocated
+   Swap bytes depending on the endianness and the current architecture. */
+CGAL_INLINE_FUNCTION
+int _readNonInterlacedImageData(_image *im) {
+  unsigned long size, nread;
+  unsigned char **vp, *buf;
+  unsigned int i, j, k, v, w;
+
+  if(im->vdim == 1) return _readImageData(im);
+  
+  if(im->openMode != OM_CLOSE) {
+    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+
+    if ( size <= 0 ) return -3;
+
+    if(!im->data) {
+      im->data = (unsigned char *) ImageIO_alloc(size);
+      if(!im->data) return -2;
+    }
+
+    vp = (unsigned char **) ImageIO_alloc(im->vdim * sizeof(unsigned char *));
+    buf = (unsigned char *) ImageIO_alloc(im->vdim * im->wdim);
+    size = im->xdim * im->ydim * im->zdim * im->wdim;
+    for(v = 0; v < im->vdim; v++)
+      vp[v] = (unsigned char *) im->data + v * size;
+
+    for(k = 0; k < im->zdim; k++) {
+      for(j = 0; j < im->ydim; j++) {
+	for(i = 0; i < im->xdim; i++) {
+	  nread = ImageIO_read(im, buf, im->vdim * im->wdim);
+	  if(nread != im->vdim * im->wdim) return -1;
+	  for(v = 0; v < im->vdim; v++)
+	    for(w = 0; w < im->wdim; w++)
+	      *vp[v]++ = *buf++;
+	  buf -= im->vdim * im->wdim;
+	}
+      }
+    }
+
+    ImageIO_free(buf);
+    ImageIO_free(vp);
+
+    /* architecture is big endian and data little endian */
+    _swapImageData( im );
+
+    
+    /* reorder lines */
+    /* no non-interlaced data for ANALYZE. But if ever... */
+/*     if( im->imageFormat == IF_ANALYZE ) { */
+/*        int v ; */
+/*        int vdim = im->vdim ; */
+/*        int lineSize = im->wdim * im->xdim ; */
+/*        int vsize = lineSize * im->ydim * im->zdim ; */
+/*        char* swapped = ImageIO_alloc(lineSize) ; */
+/*        for( v = 0 ; v < vdim ; ++v ) */
+/*        { */
+/* 	  char* buf1 = (char*)im->data + v*vsize ; */
+/* 	  char* buf2 = buf1 + vsize - lineSize ; */
+	  
+/* 	  while( buf1 < buf2 ) */
+/* 	  { */
+/* 	     memcpy( swapped, buf1, lineSize ) ; */
+/* 	     memcpy( buf1, buf2, lineSize ) ; */
+/* 	     memcpy( buf2, swapped, lineSize ) ; */
+/* 	     buf1 += lineSize ; */
+/* 	     buf2 -= lineSize ; */
+/* 	  } */
+
+/* 	  ImageIO_free( swapped ) ; */
+/*        } */
+/*     } */
+  }
+
+  return 1;
+}
+
+
+/* Reads body from a non-interlaced vectorial inrimage whose header has
+   been read by _readImageHeader. The image buffer is interlaced. */
+CGAL_INLINE_FUNCTION
+int _readNonInterlacedFileData(_image *im) {
+  unsigned long size, nread;
+  unsigned char *ptr1, *vp, *buf;
+  unsigned int i, j, k, v, w;
+
+  if(im->vdim == 1) return _readImageData(im);
+
+  if(im->openMode != OM_CLOSE) {
+    size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+
+    if ( size <= 0 ) return -3;
+
+    if(!im->data) {
+      im->data = (unsigned char *) ImageIO_alloc(size);
+      if(!im->data) return -2;
+    }
+
+    size = im->xdim * im->ydim * im->zdim * im->wdim;
+    buf = ptr1 = (unsigned char *) ImageIO_alloc(size);
+
+    for(v = 0; v < im->vdim; v++) {
+      buf = ptr1;
+      nread = ImageIO_read(im, buf, size);
+      if(nread != size) return -1;
+      vp = (unsigned char *) im->data + (v * im->wdim);
+      for(k = 0; k < im->zdim; k++) {
+	for(j = 0; j < im->ydim; j++) {
+	  for(i = 0; i < im->xdim; i++) {
+	    for(w = 0; w < im->wdim; w++) *vp++ = *buf++;
+	    vp += (im->vdim - 1) * im->wdim;
+	  }
+	}
+      }
+    }
+
+    ImageIO_free(buf);
+
+    /* architecture is big endian and data little endian */
+    _swapImageData( im );
+    
+    
+    /* reorder lines */
+    /* no non-interlaced data for ANALYZE. But if ever... */
+/*     if( im->imageFormat == IF_ANALYZE ) { */
+/*        int v ; */
+/*        int vdim = im->vdim ; */
+/*        int lineSize = im->wdim * im->xdim ; */
+/*        int vsize = lineSize * im->ydim * im->zdim ; */
+/*        char* swapped = ImageIO_alloc(lineSize) ; */
+/*        for( v = 0 ; v < vdim ; ++v ) */
+/*        { */
+/* 	  char* buf1 = (char*)im->data + v*vsize ; */
+/* 	  char* buf2 = buf1 + vsize - lineSize ; */
+	  
+/* 	  while( buf1 < buf2 ) */
+/* 	  { */
+/* 	     memcpy( swapped, buf1, lineSize ) ; */
+/* 	     memcpy( buf1, buf2, lineSize ) ; */
+/* 	     memcpy( buf2, swapped, lineSize ) ; */
+/* 	     buf1 += lineSize ; */
+/* 	     buf2 -= lineSize ; */
+/* 	  } */
+
+/* 	  ImageIO_free( swapped ) ; */
+/*        } */
+/*     } */
+  }
+
+  return 1;  
+}
+
+
+
+
+
+
+
+
+
+
+/*--------------------------------------------------
+ *
+ * ?????
+ *
+ --------------------------------------------------*/
+
+
+
+
+
+/* check the type of image in fileName */
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT imageType(const char *fileName) {
+  _ImageIO_file f;
+  char magic[5];
+  PTRIMAGE_FORMAT format;
+
+  if(!fileName) {
+#ifdef CGAL_USE_ZLIB    
+    f = gzdopen(fileno(stdin), "rb");
+#else
+    f = fdopen(fileno(stdin), "rb");
+#endif
+  }
+  else {
+#ifdef CGAL_USE_ZLIB      
+    f = gzopen(fileName, "rb");
+#else
+    f = fopen(fileName, "rb");
+#endif
+  }
+
+  if(!f) return NULL;
+  
+#ifdef CGAL_USE_ZLIB
+  gzread( f, (void *) magic, 4);
+#else
+  fread( (void *) magic, 1, 4, f );
+#endif
+
+
+  magic[4] = '\0';
+
+#ifdef CGAL_USE_ZLIB 
+  gzclose( f );
+#else
+  if(fileName) fclose( f );
+#endif
+
+  if (firstFormat==NULL)
+    initSupportedFileFormat();
+
+  for(format=firstFormat;(format!=NULL);format=format->next) {
+    /* test if it is the correct header based on magic and file extension */
+    if (((*format->testImageFormat)(magic,fileName)) >=0) {
+      return format;
+    }
+  }
+  return 0;
+
+}
+
+
+
+
+
+/*--------------------------------------------------
+ *
+ * Image Format Management
+ *
+ --------------------------------------------------*/
+
+
+
+
+
+/** adds a format at the beginning of the list of image formats. 
+    Test if all mandatory fields have been filled */
+CGAL_INLINE_FUNCTION
+int addImageFormat( PTRIMAGE_FORMAT format) 
+{
+  if ( (format->testImageFormat) &&
+       (format->readImageHeader) &&
+       (strlen(format->fileExtension)>0) &&
+       (strlen(format->realName)>0) ) {
+
+    format->next=firstFormat;
+    firstFormat=format;
+    
+    return 0;
+
+  } 
+  else {
+    fprintf(stderr,"addImageFormat: information missing in file format %s\n",
+	    format->realName);
+    return -1;
+  }
+}
+
+/** adds a format at the end of the list of image formats. 
+    Test if all mandatory fields have been filled */
+CGAL_INLINE_FUNCTION
+int addImageFormatAtEnd( PTRIMAGE_FORMAT format) 
+{
+  PTRIMAGE_FORMAT f;
+  if ( (format->testImageFormat) &&
+       (format->readImageHeader) &&
+       (strlen(format->fileExtension)>0) &&
+       (strlen(format->realName)>0) ) {
+
+    format->next = NULL;
+    
+    if (firstFormat == NULL) {
+      firstFormat=format;
+    }
+    else {
+      for(f=firstFormat;(f->next!=NULL);f=f->next)
+	;
+      f->next=format;    
+    }
+    
+    return 0;
+
+  } 
+  else {
+    fprintf(stderr,"addImageFormatAtEnd: information missing in file format %s\n",
+	    format->realName);
+    return -1;
+  }
+}
+
+
+/** creates supported image formats */
+CGAL_INLINE_FUNCTION
+void initSupportedFileFormat() 
+{
+  PTRIMAGE_FORMAT f;
+  if ( InrimageFormat == NULL ) {
+    f = createAnalyzeFormat();
+    addImageFormatAtEnd( f );
+    f = createBMPFormat();
+    addImageFormatAtEnd( f );
+    f = createGifFormat();
+    addImageFormatAtEnd( f );
+    f = createGisFormat();
+    addImageFormatAtEnd( f );
+    f = createIrisFormat();
+    addImageFormatAtEnd( f );
+    f = createPgmFormat();
+    addImageFormatAtEnd( f );
+    f = createPgmAscIIFormat();
+    addImageFormatAtEnd( f );
+    f = createPpmFormat();
+    addImageFormatAtEnd( f );
+    InrimageFormat = createInrimageFormat();
+    addImageFormat( InrimageFormat );
+  }
+}
+
+
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT firstImageFormat() {
+  return firstFormat;
+}
+
+
+
+/** prints supported image formats */
+CGAL_INLINE_FUNCTION
+void printSupportedFileFormat() {    
+  PTRIMAGE_FORMAT f;
+  int i;
+
+  initSupportedFileFormat();
+
+  for(i=0, f=firstFormat;(f!=NULL);i++, f=f->next) {
+    if ( (f->testImageFormat) &&
+	 (f->readImageHeader) &&
+	 (strlen(f->fileExtension)>0) &&
+	 (strlen(f->realName)>0)) {
+      fprintf( stderr, "#%2d: format name ='%s', extensions='%s'",
+	      i, f->realName, f->fileExtension );
+      if (f->readImageHeader) 
+	fprintf( stderr, ", read" );
+      if (f->writeImage) 
+	fprintf( stderr, ", write" );
+      fprintf( stderr, "\n" );
+    }
+  }
+}
+
+
+/** remove supported image formats */
+CGAL_INLINE_FUNCTION
+void removeSupportedFileFormat() {    
+  PTRIMAGE_FORMAT f=firstFormat;
+  
+  while( f != NULL) {
+    PTRIMAGE_FORMAT f_old = f;
+    f = f->next;
+    ImageIO_free( f_old);
+  }
+  InrimageFormat=NULL;
+
+}
+
+
+/** trilinear interpolation in an _image float type
+ */
+CGAL_INLINE_FUNCTION
+float triLinInterp(const _image* image,
+                   float posx, 
+                   float posy, 
+                   float posz,
+                   float value_outside /*= 0.f */)
+{
+  const int dimx = image->xdim;
+  const int dimy = image->ydim;
+  const int dimz = image->zdim;
+  const int dimxy = dimx*dimy;
+  
+  if(posx < 0.f || posy < 0.f || posz < 0.f )
+    return value_outside;
+
+  posx = static_cast<float>(posx /(image->vx));
+  posy = static_cast<float>(posy /(image->vy));
+  posz = static_cast<float>(posz /(image->vz));
+
+  //patch suggested by J.Cugnoni to prevent integer overflow
+  if(posz >= dimz-1 || posy >= dimy-1 || posx >= dimx-1)
+    return value_outside;
+  
+  const int i1 = (int)(posz);
+  const int j1 = (int)(posy);
+  const int k1 = (int)(posx);
+
+  const int i2 = i1 + 1;
+  const int j2 = j1 + 1;
+  const int k2 = k1 + 1;
+
+  const float KI2 = i2-posz;
+  const float KI1 = posz-i1;
+  const float KJ2 = j2-posy;
+  const float KJ1 = posy-j1;
+
+  CGAL_IMAGE_IO_CASE
+    (image,
+     Word *array = (Word *) image->data;
+     return (((float)array[i1 * dimxy + j1 * dimx + k1] * KI2 +
+              (float)array[i2 * dimxy + j1 * dimx + k1] * KI1) * KJ2 +
+             ((float)array[i1 * dimxy + j2 * dimx + k1] * KI2 +
+              (float)array[i2 * dimxy + j2 * dimx + k1] * KI1) * KJ1) * (k2-posx)+
+     (((float)array[i1 * dimxy + j1 * dimx + k2] * KI2 +
+       (float)array[i2 * dimxy + j1 * dimx + k2] * KI1) * KJ2 +
+      ((float)array[i1 * dimxy + j2 * dimx + k2] * KI2 +
+       (float)array[i2 * dimxy + j2 * dimx + k2] * KI1) * KJ1) * (posx-k1);
+     );
+  return 0.f;
+}
+
+// Gives the value of the image at pixel (i,j,k), converted in float.
+CGAL_INLINE_FUNCTION
+float evaluate(const _image* image,
+               const std::size_t i,
+               const std::size_t j,
+               const std::size_t k)
+{
+  using CGAL::IMAGEIO::static_evaluate;
+
+  CGAL_IMAGE_IO_CASE(image, return (float)static_evaluate<Word>(image, i, j, k); );
+
+  return 0.f;
+}
+
+/** convert the data of the image to float 
+*/
+CGAL_INLINE_FUNCTION
+void convertImageTypeToFloat(_image* image){ 
+  if(image->wordKind == WK_FLOAT && image->wdim == 4)
+    return;
+
+  const unsigned int dimx = image->xdim;
+  const unsigned int dimy = image->ydim;
+  const unsigned int dimz = image->zdim;
+  
+  float * array = (float*)ImageIO_alloc (dimx * dimy * dimz *sizeof(float));
+  if (array == NULL ) {
+    fprintf ( stderr, "allocation error\n" );
+    return;
+  }
+
+  CGAL_IMAGE_IO_CASE
+    (image, 
+     Word * typedArray  = (Word *)(image->data);
+     for(unsigned int i = 0; i<dimx * dimy * dimz;++i)
+       array[i] = (float)(typedArray[i]);
+     );
+
+  ImageIO_free ( image->data );
+  image->data = array;
+  
+  image->wordKind = WK_FLOAT;
+  image->wdim = 4;
+}
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Image_3.h b/3rdparty/CGAL-4.8/include/CGAL/Image_3.h
new file mode 100644
index 0000000..3e865b3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Image_3.h
@@ -0,0 +1,515 @@
+// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
+//               2008 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Pierre Alliez
+
+#ifndef CGAL_IMAGE_3_H
+#define CGAL_IMAGE_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/array.h>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/format.hpp>
+#include <boost/unordered_set.hpp>
+#include <CGAL/ImageIO.h>
+#include <CGAL/function_objects.h>
+
+#include <limits>
+#include <set>
+#include <cstdlib>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4244 4251) // double float conversion loss of data and dll linkage
+#endif
+
+class vtkImageData;
+
+namespace CGAL {
+
+namespace ImageIO {
+
+template <typename T>
+class Indicator : public std::unary_function<T, double>
+{
+  const T label;
+public:
+  Indicator(T i) : label(i) {};
+  
+  double operator()(T x) const 
+  {
+    return (x == label) ? 1. : 0.;
+  }
+};
+
+} // end namespace CGAL::ImageIO
+
+class CGAL_IMAGEIO_EXPORT Image_3
+{
+
+  struct Image_deleter {
+    void operator()(_image* image)
+    {
+      ::_freeImage(image);
+    }
+  };
+public:
+  typedef boost::shared_ptr<_image> Image_shared_ptr;
+  typedef Image_shared_ptr Pointer;
+
+protected:
+  Image_shared_ptr image_ptr;
+
+   // implementation in src/CGAL_ImageIO/Image_3.cpp
+  bool private_read(_image* im);
+
+public:
+  Image_3()
+    : image_ptr()
+  {
+  }
+
+  Image_3(const Image_3& bi)
+    : image_ptr(bi.image_ptr)
+  {
+//     std::cerr << "Image_3::copy_constructor\n";
+  }
+
+  Image_3(_image* im) 
+  {
+    private_read(im);
+  }
+
+  ~Image_3()
+  {
+  }
+
+  const _image* image() const
+  {
+    return image_ptr.get();
+  }
+
+  _image* image()
+  {
+    return image_ptr.get();
+  }
+
+  const void* data() const
+  {
+    return image()->data;
+  }
+
+  void* data()
+  {
+    return image()->data;
+  }
+
+  void set_data(void* d)
+  {
+    image()->data = d;
+  }
+
+  std::size_t xdim() const { return image_ptr->xdim; }
+  std::size_t ydim() const { return image_ptr->ydim; }
+  std::size_t zdim() const { return image_ptr->zdim; }
+
+  std::size_t size() const { return xdim() * ydim() * zdim(); }
+
+  double vx() const { return image_ptr->vx; }
+  double vy() const { return image_ptr->vy; }
+  double vz() const { return image_ptr->vz; }
+
+  float value(const std::size_t i,
+              const std::size_t j,
+              const std::size_t k) const
+  {
+    return ::evaluate(image(),i,j,k);
+  }
+
+public:
+
+  bool read(const char* file)
+  {
+    return private_read(::_readImage(file));
+  }
+
+  bool read_raw(const char* file,
+                const unsigned int rx,
+                const unsigned int ry,
+                const unsigned int rz,
+                const double vx = 1,
+                const double vy = 1,
+                const double vz = 1,
+		const unsigned int offset = 0)
+  {
+    return private_read(::_readImage_raw(file,
+                                         rx,ry,rz,
+                                         vx,vy,vz,offset));
+  }
+
+  // implementation in src/CGAL_ImageIO/Image_3.cpp
+  void gl_draw(const float point_size,
+               const unsigned char r,
+               const unsigned char g,
+               const unsigned char b);
+
+  // implementation in src/CGAL_ImageIO/Image_3.cpp
+  void gl_draw_bbox(const float line_width,
+                    const unsigned char red,
+                    const unsigned char green,
+                    const unsigned char blue);
+
+public:
+  template <typename Image_word_type,
+	    typename Target_word_type,
+	    typename Coord_type,
+	    class Image_transform>
+  Target_word_type 
+  trilinear_interpolation(const Coord_type&x, 
+			  const Coord_type&y, 
+			  const Coord_type&z,
+			  const Image_word_type& value_outside = 
+			    Image_word_type(),
+			  Image_transform transform = 
+			    Image_transform() ) const;
+
+  // default Image_transform = CGAL::Identity
+  template <typename Image_word_type,
+	    typename Target_word_type,
+	    typename Coord_type>
+  Target_word_type 
+  trilinear_interpolation(const Coord_type&x, 
+			  const Coord_type&y, 
+			  const Coord_type&z,
+			  const Image_word_type& value_outside = 
+			  Image_word_type()) const 
+  {
+    return trilinear_interpolation<
+      Image_word_type,
+      Target_word_type>(x, y, z, value_outside,
+			  CGAL::Identity<Image_word_type>());
+  }
+
+  template <typename Image_word_type,
+	    typename Coord_type>
+  Image_word_type 
+  labellized_trilinear_interpolation(const Coord_type&x, 
+				     const Coord_type&y, 
+				     const Coord_type&z,
+				     const Image_word_type& value_outside = 
+  				       Image_word_type()) const;
+
+}; // end Image_3
+
+template <typename Image_word_type,
+	  typename Target_word_type,
+	  typename Coord_type,
+	  class Image_transform>
+Target_word_type 
+Image_3::trilinear_interpolation(const Coord_type& x, 
+				 const Coord_type& y, 
+				 const Coord_type& z,
+				 const Image_word_type& value_outside,
+				 Image_transform transform) const 
+{
+  // Check on double/float coordinates, because (int)-0.1 gives 0
+  if ( x < 0 || y < 0 || z < 0 )
+    return Target_word_type(value_outside);
+  
+  const Coord_type lx = x / image()->vx;
+  const Coord_type ly = y / image()->vy;
+  const Coord_type lz = z / image()->vz;
+  const std::size_t dimx = xdim();
+  const std::size_t dimy = ydim();
+  const std::size_t dimz = zdim();
+  const std::size_t dimxy = dimx*dimy;
+  
+  if(lx < 0 ||
+     ly < 0 ||
+     lz < 0 ||
+     lz >= dimz-1 ||
+     ly >= dimy-1 ||
+     lx >= dimx-1)
+  {
+    return Target_word_type(transform(value_outside));
+  }  
+
+  // images are indexed by (z,y,x)
+  const int i1 = (int)(lz); 
+  const int j1 = (int)(ly);
+  const int k1 = (int)(lx);
+  const int i2 = i1 + 1;
+  const int j2 = j1 + 1;
+  const int k2 = k1 + 1;
+
+  /*   We assume (x,y,z) lies in the following cube.
+   *   a, b, c, d, e, f, g, h are the value of the image at the corresponding
+   *   voxels:
+   *
+   *
+   *     x        z
+   *     |       /
+   *        f___ __ g
+   *       /|      /|
+   *     e/_|____h/ |
+   *     |  |    |  |
+   *     |  |b___|_c|
+   *     | /     | /
+   *    a|/_____d|/  _y
+   *    
+   *
+   * a = val(i1, j1, k1)
+   * b = val(i2, j1, k1)
+   * c = val(i2, j2, k1)
+   * d = val(i1, j2, k1)
+   * e = val(i1, j1, k2)
+   * f = val(i2, j1, k2)
+   * g = val(i2, j2, k2)
+   * h = val(i1, j2, k2)
+   */
+
+  Image_word_type* ptr = (Image_word_type*)image()->data;
+  ptr += i1 * dimxy + j1 * dimx + k1;
+  const Target_word_type a = Target_word_type(transform(*ptr));
+  const Target_word_type e = Target_word_type(transform(*(ptr+1)));
+  ptr += dimxy; // i2 * dimxy + j1 * dimx + k1;
+  const Target_word_type b = Target_word_type(transform(*ptr));
+  const Target_word_type f = Target_word_type(transform(*(ptr+1)));
+  ptr += dimx; // i2 * dimxy + j2 * dimx + k1
+  const Target_word_type c = Target_word_type(transform(*ptr));
+  const Target_word_type g = Target_word_type(transform(*(ptr+1)));
+  ptr -= dimxy; // i1 * dimxy + j2 * dimx + k1
+  const Target_word_type d = Target_word_type(transform(*ptr));
+  const Target_word_type h = Target_word_type(transform(*(ptr+1)));
+  
+
+//   const Target_word_type a = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k1];
+//   const Target_word_type b = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k1];
+//   const Target_word_type c = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k1];
+//   const Target_word_type d = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k1];
+//   const Target_word_type e = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k2];
+//   const Target_word_type f = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k2];
+//   const Target_word_type g = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k2];
+//   const Target_word_type h = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k2];
+
+//   const Target_word_type outside = Target_word_type(transform(value_outside);
+
+//   if(x < 0.f ||
+//      y < 0.f ||
+//      z < 0.f ||
+//      i1 >= dimz ||
+//      j1 >= dimy ||
+//      k1 >= dimx)
+//   {
+//     return outside;
+//   }
+
+//   Target_word_type a, b, c, d, e, f, g, h; 
+
+//   if(k1 < 0) {
+//     a = b = c = d = outside;
+//   }
+//   else {
+//     if(j1 < 0) {
+//       a = b = outside;
+//     }
+//     else {
+//       if(i1 < 0)
+// 	a = outside;
+//       else
+// 	a = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k1];
+
+//       if(i2 >= dimz)
+// 	b = outside;
+//       else 
+// 	b = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k1];
+//     }
+
+//     if(j2 >= dimy) {
+//       c = d = outside;
+//     }
+//     else {
+//       if(i1 < 0)
+// 	d = outside;
+//       else
+// 	d = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k1];
+
+//       if(i2 >= dimz)
+// 	c = outside;
+//       else
+// 	c = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k1];
+//     }
+//   }
+
+//   if(k2 >= dimx) {
+//     e = f = g = h = outside;
+//   }
+//   else {
+//     if(j1 < 0) {
+//       e = f = outside;
+//     }
+//     else {
+//       if(i1 < 0)
+// 	e = outside;
+//       else
+// 	e = ((Image_word_type*)image()->data)[i1 * dimxy + j1 * dimx + k2];
+
+//       if(i2 >= dimz)
+// 	f = outside;
+//       else 
+// 	f = ((Image_word_type*)image()->data)[i2 * dimxy + j1 * dimx + k2];
+//     }
+
+//     if(j2 >= dimy) {
+//       g = h = outside;
+//     }
+//     else {
+//       if(i1 < 0)
+// 	h = outside;
+//       else
+// 	h = ((Image_word_type*)image()->data)[i1 * dimxy + j2 * dimx + k2];
+
+//       if(i2 >= dimz)
+// 	g = outside;
+//       else
+// 	g = ((Image_word_type*)image()->data)[i2 * dimxy + j2 * dimx + k2];
+//     }
+//   }
+
+  const Target_word_type di2 = i2 - lz;
+  const Target_word_type di1 = lz - i1;
+  const Target_word_type dj2 = j2 - ly;
+  const Target_word_type dj1 = ly - j1;
+  const Target_word_type dk2 = k2 - lx;
+  const Target_word_type dk1 = lx - k1;
+//   std::cerr << di2 << " " << di1 << "\n";
+//   std::cerr << dj2 << " " << dj1 << "\n";
+//   std::cerr << dk2 << " " << dk1 << "\n";
+
+  return ( (  ( a * di2 + b * di1 ) * dj2 + 
+	      ( d * di2 + c * di1 ) * dj1   ) * dk2 +
+	   (  ( e * di2 + f * di1 ) * dj2 + 
+	      ( h * di2 + g * di1 ) * dj1   ) * dk1 );
+} // end trilinear_interpolation
+
+
+template <typename Image_word_type,
+	  typename Coord_type>
+Image_word_type 
+Image_3::labellized_trilinear_interpolation(const Coord_type& x, 
+					    const Coord_type& y, 
+					    const Coord_type& z,
+					    const Image_word_type& value_outside) const 
+{
+  // Check on double/float coordinates, because (int)-0.1 gives 0
+  if ( x < 0 || y < 0 || z < 0 ) return value_outside;
+  
+  Coord_type lx = x / image()->vx;
+  Coord_type ly = y / image()->vy;
+  Coord_type lz = z / image()->vz;
+  const std::size_t dimx = xdim();
+  const std::size_t dimy = ydim();
+  const std::size_t dimz = zdim();
+  
+  if( lx < 0 ||
+      ly < 0 ||
+      lz < 0 ||
+     lz >= dimz-1 ||
+     ly >= dimy-1 ||
+     lx >= dimx-1)
+  {
+    return value_outside;
+  }  
+
+  // images are indexed by (z,y,x)
+  const int i1 = (int)(lz); 
+  const int j1 = (int)(ly);
+  const int k1 = (int)(lx);
+  const int i2 = i1 + 1;
+  const int j2 = j1 + 1;
+
+  CGAL::cpp11::array<std::size_t,8> index;
+  index[0] = (i1 * dimy + j1) * dimx + k1;
+  index[1] = index[0] + 1;
+  index[2] = (i1 * dimy + j2) * dimx + k1;
+  index[3] = index[2] + 1;
+  index[4] = (i2 * dimy + j1) * dimx + k1;
+  index[5] = index[4] + 1;
+  index[6] = (i2 * dimy + j2) * dimx + k1;
+  index[7] = index[6] + 1;
+
+  CGAL::cpp11::array<Image_word_type,8> labels;
+  
+  labels[0] = ((Image_word_type*)image()->data)[index[0]];
+  int lc = 1;
+  for(int lci=1; lci<8; ++lci){
+    bool found = false;
+    Image_word_type iwt = ((Image_word_type*)image()->data)[index[lci]];
+    for(int lcj=0; lcj < lc; ++lcj){
+      if(iwt == labels[lcj]){
+        found = true;
+        break;
+      }
+    }
+    if(found) continue;
+    labels[lc] = iwt;
+    ++lc;
+  }
+
+  CGAL_HISTOGRAM_PROFILER(
+    "Number of labels around a vertex, Image_3::labellized_trilinear_interpolation()", 
+    static_cast<unsigned int>(lc));
+
+  if(lc == 1) {
+    return labels[0];
+  }
+    
+  typedef ImageIO::Indicator<Image_word_type> Indicator;
+  double best_value = 0.;
+  Image_word_type best = 0;
+  for(int i = 0; i < lc; ++i)
+  {
+    Image_word_type iwt = labels[i];
+    const double r = 
+      trilinear_interpolation<Image_word_type,double,Coord_type, Indicator>(
+        x, y, z, value_outside, Indicator(iwt));
+    CGAL_assertion(r >= 0.);
+    CGAL_assertion(r <= 1.);
+
+    if(r > best_value) {
+      best = iwt;
+      best_value = r;
+    }
+  }
+//   CGAL_assertion(best_value > 0.5);
+  return best;
+}
+
+} // end namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Image_3_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+ 
+#endif // CGAL_IMAGE_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Image_3_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Image_3_impl.h
new file mode 100644
index 0000000..deeae53
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Image_3_impl.h
@@ -0,0 +1,232 @@
+// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
+//               2008 GeometryFactory, Sophia Antipolis (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau, Pierre Alliez
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/gl.h>
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+CGAL_INLINE_FUNCTION
+bool Image_3::private_read(_image* im)
+{
+  if(im != 0)
+  {
+    if(image() != 0)
+    {
+      ::_freeImage(image());
+    }
+    image_ptr = Image_shared_ptr(im, Image_deleter());
+
+//     std::cerr << 
+//       boost::format("image=%1% (xdim=%2%, ydim=%3%, zdim=%4%)\n")
+//       % image_ptr.get() % image_ptr->xdim % image_ptr->ydim % image_ptr->zdim;
+
+  }
+  return im != 0;
+}
+
+CGAL_INLINE_FUNCTION
+void Image_3::gl_draw(const float point_size,
+                      const unsigned char r,
+                      const unsigned char g,
+                      const unsigned char b)
+{
+  if(image_ptr.get() == NULL)
+    return;
+
+  glPointSize(point_size);
+  glColor3ub(r,g,b);
+  glBegin(GL_POINTS);
+  unsigned char *pData = (unsigned char*)image_ptr->data;
+  unsigned int xy = image_ptr->xdim * image_ptr->ydim;
+  for(unsigned int i=0;i<image_ptr->xdim;i+=5)
+    for(unsigned int j=0;j<image_ptr->ydim;j+=5)
+      for(unsigned int k=0;k<image_ptr->zdim;k+=5)
+      {
+        unsigned char value = pData[xy*k + j*image_ptr->xdim + i];
+        if(value > 0)
+        {
+          double x = image_ptr->vx * i;
+          double y = image_ptr->vy * j;
+          double z = image_ptr->vz * k;
+          glVertex3d(x,y,z);
+        }
+      }
+  glEnd();
+} // end Image_3::gl_draw
+
+
+CGAL_INLINE_FUNCTION
+void Image_3::gl_draw_bbox(const float line_width,
+                           const unsigned char red,
+                           const unsigned char green,
+                           const unsigned char blue)
+{
+  if(!image_ptr)
+    return;
+
+  glLineWidth(line_width);
+  glColor3ub(red,green,blue);
+  glBegin(GL_LINES);
+
+  struct Point {
+    double x_;
+    double y_;
+    double z_;
+    Point(double x, double y, double z) : x_(x), y_(y), z_(z) {};
+
+    double x() const { return x_; }
+    double y() const { return y_; }
+    double z() const { return z_; }
+  };
+
+  const double xmax = (image_ptr->xdim - 1.0)*(image_ptr->vx);
+  const double ymax = (image_ptr->ydim - 1.0)*(image_ptr->vy);
+  const double zmax = (image_ptr->zdim - 1.0)*(image_ptr->vz);
+
+  Point a(0.0, 0.0,    0.0);
+  Point b(0.0, ymax, 0.0);
+  Point c(0.0, ymax, zmax);
+  Point d(0.0, 0.0,    zmax);
+  Point e(xmax, 0.0,    0.0);
+  Point f(xmax, ymax, 0.0);
+  Point g(xmax, ymax, zmax);
+  Point h(xmax, 0.0,    zmax);
+
+  glVertex3d(a.x(),a.y(),a.z());
+  glVertex3d(b.x(),b.y(),b.z());
+
+  glVertex3d(b.x(),b.y(),b.z());
+  glVertex3d(c.x(),c.y(),c.z());
+
+  glVertex3d(c.x(),c.y(),c.z());
+  glVertex3d(d.x(),d.y(),d.z());
+
+  glVertex3d(d.x(),d.y(),d.z());
+  glVertex3d(a.x(),a.y(),a.z());
+
+  glVertex3d(e.x(),e.y(),e.z());
+  glVertex3d(f.x(),f.y(),f.z());
+
+  glVertex3d(f.x(),f.y(),f.z());
+  glVertex3d(g.x(),g.y(),g.z());
+
+  glVertex3d(g.x(),g.y(),g.z());
+  glVertex3d(h.x(),h.y(),h.z());
+
+  glVertex3d(h.x(),h.y(),h.z());
+  glVertex3d(e.x(),e.y(),e.z());
+
+  glVertex3d(a.x(),a.y(),a.z());
+  glVertex3d(e.x(),e.y(),e.z());
+
+  glVertex3d(d.x(),d.y(),d.z());
+  glVertex3d(h.x(),h.y(),h.z());
+
+  glVertex3d(c.x(),c.y(),c.z());
+  glVertex3d(g.x(),g.y(),g.z());
+
+  glVertex3d(b.x(),b.y(),b.z());
+  glVertex3d(f.x(),f.y(),f.z());
+
+  glEnd();
+} // end Image_3::gl_draw_bbox
+
+} // end namespace CGAL
+
+#if 0
+
+#include <vtkImageData.h>
+#include <CGAL/Image_3_vtk_interface.h>
+
+namespace CGAL {
+
+namespace {
+
+struct VTK_to_ImageIO_type_mapper {
+  WORD_KIND wordKind;
+  SIGN sign;
+  unsigned int wdim;
+};
+
+static const VTK_to_ImageIO_type_mapper VTK_to_ImageIO_type[VTK_ID_TYPE] = 
+  { { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  0=VTK_VOID
+    { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  1=VTK_BIT
+    { WK_FIXED,   SGN_SIGNED,   1}, //  2=VTK_CHAR
+    { WK_FIXED,   SGN_UNSIGNED, 1}, //  3=VTK_UNSIGNED_CHAR
+    { WK_FIXED,   SGN_SIGNED,   2}, //  4=VTK_SHORT 
+    { WK_FIXED,   SGN_UNSIGNED, 2}, //  5=VTK_UNSIGNED_SHORT
+    { WK_FIXED,   SGN_SIGNED,   4}, //  6=VTK_INT
+    { WK_FIXED,   SGN_UNSIGNED, 4}, //  7=VTK_UNSIGNED_INT
+    { WK_FIXED,   SGN_SIGNED,   8}, //  8=VTK_LONG
+    { WK_FIXED,   SGN_UNSIGNED, 8}, //  9=VTK_UNSIGNED_LONG
+    { WK_FLOAT,   SGN_SIGNED,   4}, // 10=VTK_FLOAT
+    { WK_FIXED,   SGN_SIGNED,   8}  // 11=VTK_DOUBLE
+ }; 
+
+} //end anonymous namespace
+
+CGAL_INLINE_FUNCTION
+bool
+Image_3::read_vtk_image_data(vtkImageData* vtk_image)
+{
+  if(!vtk_image)
+    return false;
+
+  _image* image = ::_initImage();
+  const int* dims = vtk_image->GetDimensions();
+  const double* spacing = vtk_image->GetSpacing();
+  image->vectMode = VM_SCALAR;
+  image->xdim = dims[0];
+  image->ydim = dims[1];
+  image->zdim = dims[2];
+  image->vdim = 1;
+  image->vx = spacing[0];
+  image->vy = spacing[1];
+  image->vz = spacing[2];
+  image->endianness = ::_getEndianness();
+  int vtk_type = vtk_image->GetScalarType();
+  if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR;
+  if(vtk_type < 0 || vtk_type > VTK_DOUBLE)
+    vtk_type = VTK_DOUBLE;
+  const VTK_to_ImageIO_type_mapper& imageio_type = 
+    VTK_to_ImageIO_type[vtk_type];
+  image->wdim = imageio_type.wdim;
+  image->wordKind = imageio_type.wordKind;
+  image->sign = imageio_type.sign;
+  image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim);
+  std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
+            << "\nimage->size()=" << dims[0]*dims[1]*dims[2]
+            << "\nwdim=" << image->wdim << '\n';
+  CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
+  vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
+
+  return this->private_read(image);
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_USE_VTK
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Image_3_vtk_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Image_3_vtk_interface.h
new file mode 100644
index 0000000..dd88ed8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Image_3_vtk_interface.h
@@ -0,0 +1,129 @@
+// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s)     : Laurent Rineau
+
+
+#ifndef CGAL_IMAGE_3_VTK_INTERFACE_H
+#define CGAL_IMAGE_3_VTK_INTERFACE_H
+
+#include <CGAL/config.h>
+
+#include <CGAL/Image_3.h>
+#include <vtkImageData.h>
+#include <vtkPointData.h>
+#include <vtkDataArray.h>
+#include <vtkFloatArray.h>
+#include <vtkDoubleArray.h>
+#include <vtkCharArray.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkShortArray.h>
+#include <vtkUnsignedShortArray.h>
+#include <vtkIntArray.h>
+#include <vtkUnsignedIntArray.h>
+
+#include <boost/cstdint.hpp> // for uint32_t, etc.
+
+namespace CGAL {
+
+template <typename Word>
+struct VTK_type_generator {
+};
+
+template <>
+struct VTK_type_generator<double> {
+  static const vtkIdType type = VTK_DOUBLE;
+  typedef vtkDoubleArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<float> {
+  static const vtkIdType type = VTK_FLOAT;
+  typedef vtkFloatArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<char> {
+  static const vtkIdType type = VTK_CHAR;
+  typedef vtkCharArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<boost::uint8_t> {
+  static const vtkIdType type = VTK_UNSIGNED_CHAR;
+  typedef vtkUnsignedCharArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<boost::int16_t> {
+  static const vtkIdType type = VTK_SHORT;
+  typedef vtkShortArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<boost::uint16_t> {
+  static const vtkIdType type = VTK_UNSIGNED_SHORT;
+  typedef vtkUnsignedShortArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<boost::int32_t> {
+  static const vtkIdType type = VTK_INT;
+  typedef vtkIntArray ArrayType;
+};
+
+template <>
+struct VTK_type_generator<boost::uint32_t> {
+  static const vtkIdType type = VTK_UNSIGNED_INT;
+  typedef vtkUnsignedIntArray ArrayType;
+};
+
+::vtkImageData* vtk_image_sharing_same_data_pointer(Image_3& image)
+{
+  vtkImageData* vtk_image = vtkImageData::New();
+  vtkDataArray* data_array = 0;
+  vtkIdType type = 0;
+
+  _image* image_ptr = image.image();
+
+  CGAL_IMAGE_IO_CASE
+    (image_ptr,
+     type = VTK_type_generator<Word>::type;
+     typedef VTK_type_generator<Word>::ArrayType VTKArray;
+     VTKArray* array = VTKArray::New();
+     array->SetArray(static_cast<Word*>(image.data()), image.size(), 1);
+     data_array = array;
+     );
+
+  vtk_image->SetDimensions((int)image.xdim(),
+                           (int)image.ydim(),
+                           (int)image.zdim());
+  vtk_image->SetExtent(0, (int)(image.xdim() - 1),
+                       0, (int)(image.ydim() - 1),
+                       0, (int)(image.zdim() - 1));
+  vtk_image->SetSpacing(image.vx(),
+                        image.vy(),
+                        image.vz());
+  vtk_image->AllocateScalars(type, 1);
+  vtk_image->GetPointData()->SetScalars(data_array);
+  return vtk_image;
+} // end vtk_image_sharing_same_data_pointer
+
+} //end namespace CGAL
+
+
+#endif // CGAL_IMAGE_3_VTK_INTERFACE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Implicit_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Implicit_mesh_domain_3.h
new file mode 100644
index 0000000..1801e8b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Implicit_mesh_domain_3.h
@@ -0,0 +1,93 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+// class Implicit_mesh_domain_3. See class description.
+//******************************************************************************
+
+#ifndef CGAL_IMPLICIT_MESH_DOMAIN_3_H
+#define CGAL_IMPLICIT_MESH_DOMAIN_3_H
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored
+#endif
+
+#include <CGAL/Labeled_mesh_domain_3.h>
+#include <CGAL/Implicit_to_labeling_function_wrapper.h>
+#include <CGAL/Random.h>
+
+namespace CGAL {
+
+
+/**
+ * @class Implicit_mesh_domain_3
+ *
+ * Implements mesh_traits for a domain defined as the negative values of
+ * an implicit function.
+ */
+template<class Function,
+  class BGT,
+  class Wrapper = Implicit_to_labeling_function_wrapper<Function,BGT> >
+class Implicit_mesh_domain_3
+ : public Labeled_mesh_domain_3<Wrapper, BGT >
+{
+public:
+  /// Base type
+  typedef Labeled_mesh_domain_3<Wrapper, BGT> Base;
+
+  /// Public types
+  typedef typename Base::Sphere_3 Sphere_3;
+  typedef typename Base::FT FT;
+  typedef BGT Geom_traits;
+
+  /**
+   * Constructor
+   * @param f the function which negative values defines the domain
+   * @param bounding_sphere a bounding sphere of the domain
+   * @param error_bound the error bound relative to the sphere radius
+   */
+  Implicit_mesh_domain_3(const Function& f,
+                         const Sphere_3& bounding_sphere,
+                         const FT& error_bound = FT(1e-6),
+                         CGAL::Random* p_rng = NULL)
+    : Base(Wrapper(f), bounding_sphere, error_bound, p_rng)  {}
+
+  /// Destructor
+  virtual ~Implicit_mesh_domain_3() {}
+
+  using Base::bbox;
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Implicit_mesh_domain_3<Function,BGT> Self;
+  Implicit_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Implicit_mesh_domain_3
+
+
+}  // end namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_IMPLICIT_MESH_DOMAIN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Implicit_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Implicit_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Implicit_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Implicit_surface_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Implicit_to_labeling_function_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Implicit_to_labeling_function_wrapper.h
new file mode 100644
index 0000000..eb2a945
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Implicit_to_labeling_function_wrapper.h
@@ -0,0 +1,290 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb, Aymeric PELLE
+//
+//******************************************************************************
+// File Description :
+// Implicit_to_labeling_function_wrapper and
+// Implicit_vector_to_labeling_function_wrapper class declaration
+// and implementation.
+//
+// See classes description to have more information.
+//******************************************************************************
+
+#ifndef CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
+#define CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored
+#endif
+
+#include <boost/dynamic_bitset.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+/**
+ * @class Implicit_to_labeling_function_wrapper
+ *
+ * This class is designed to wrap an implicit function which describes a domain
+ * by [p is inside if f(p)<0] to a function which takes its values into {0,1}.
+ * f(p)=0 means that p is outside the domain.
+ */
+template<class Function_, class BGT>
+class Implicit_to_labeling_function_wrapper
+{
+public:
+  // Types
+  typedef int                     return_type;
+  typedef typename BGT::Point_3   Point_3;
+
+  /// Constructor
+  Implicit_to_labeling_function_wrapper(const Function_& f)
+    : r_f_(f) {}
+
+  // Default copy constructor and assignment operator are ok
+
+  /// Destructor
+  ~Implicit_to_labeling_function_wrapper() {}
+
+  /// Operator ()
+  return_type operator()(const Point_3& p, const bool = true) const
+  {
+    return ( (r_f_(p)<0) ? 1 : 0 );
+  }
+
+private:
+  /// Function to wrap
+  const Function_& r_f_;
+
+};  // end class Implicit_to_labeling_function_wrapper
+
+
+
+/**
+ * \deprecated
+ *
+ * @class Implicit_vector_to_labeling_function_wrapper
+ *
+ * Wraps a set of implicit function [f1,f2,...] to one function F which
+ * takes its values into N.
+ *
+ * Let p be a point.
+ * F(p) = 0b000000(f2(p)<0)(f1(p)<0)
+ *
+ * It can handle at most 8 functions.
+ */
+template<class Function_, class BGT>
+class Implicit_vector_to_labeling_function_wrapper
+{
+public:
+  // Types
+  typedef int                       return_type;
+  typedef std::vector<Function_*>   Function_vector;
+  typedef typename BGT::Point_3     Point_3;
+
+  /// Constructor
+  Implicit_vector_to_labeling_function_wrapper(const std::vector<Function_*>& v)
+    : function_vector_(v) {}
+
+  // Default copy constructor and assignment operator are ok
+
+  /// Destructor
+  ~Implicit_vector_to_labeling_function_wrapper() {}
+
+  /// Operator ()
+  return_type operator()(const Point_3& p, const bool = true) const
+  {
+    int nb_func = function_vector_.size();
+    if ( nb_func > 8 )
+    {
+      CGAL_error_msg("We support at most 8 functions !");
+    }
+
+    char bits = 0;
+    for ( int i = 0 ; i < nb_func ; ++i )
+    {
+      // Insert value into bits : we compute fi(p) and insert result at
+      // bit i of bits
+      bits |= ( ((*function_vector_[i])(p) < 0) << i );
+    }
+
+    return ( static_cast<return_type>(bits) );
+  }
+
+private:
+  /// Functions to wrap
+  const Function_vector function_vector_;
+
+};  // end class Implicit_to_labeling_function_wrapper
+
+template <class ImplicitFunction>
+class Implicit_multi_domain_to_labeling_function_wrapper
+{
+  template <class T_>
+  class Implicit_function_traits
+  {
+  public:
+    typedef typename T_::Point Point;
+  };
+
+  template <class RT_, class Point_>
+  class Implicit_function_traits<RT_ (*)(Point_)>
+  {
+  public:
+    typedef typename boost::remove_reference<
+            typename boost::remove_cv< Point_ >::type>::type Point;
+  };
+
+public:
+  typedef int                     return_type;
+  typedef ImplicitFunction        Function;
+  typedef typename Implicit_function_traits<ImplicitFunction>::Point   Point_3;
+  typedef std::vector<Function>   Function_vector;
+
+private:
+  std::vector<Function> funcs;
+  typedef boost::dynamic_bitset<std::size_t> Bmask;
+  std::vector<Bmask> bmasks;
+
+public:
+  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::vector<Sign> >& vps)
+  : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
+  {
+    CGAL_assertion(funcs.size() != 0);
+
+    std::size_t mask_index = 0;
+    for (std::vector<std::vector<Sign> >::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end();
+         mask_iter != mask_end_iter;
+         ++mask_iter)
+    {
+      const std::vector<Sign>& mask = *mask_iter;
+      CGAL_assertion(funcs.size() == mask.size());
+      Bmask& bmask = bmasks[mask_index++];
+
+      typename Bmask::size_type bit_index = 0;
+      for (std::vector<Sign>::const_iterator iter = mask.begin(), endIter = mask.end(); iter != endIter; ++iter)
+      {
+        std::string::value_type character = *iter;
+        CGAL_assertion(character == POSITIVE || character == NEGATIVE);
+
+        bmask[bit_index] = (character == POSITIVE);
+        ++bit_index;
+        bmask[bit_index] = (character == NEGATIVE);
+        ++bit_index;
+      }
+    }
+    std::sort(bmasks.begin(), bmasks.end());
+  }
+
+  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf)
+  : funcs(vf)
+  {
+    CGAL_assertion(funcs.size() != 0);
+
+    bmasks.reserve((1 << funcs.size()) - 1);
+    bmasks.push_back(Bmask(std::string("10")));
+    bmasks.push_back(Bmask(std::string("01")));
+
+    for (std::size_t i = 0; i < funcs.size()-1; ++i)
+    {
+      std::size_t c_size = bmasks.size();
+      for (std::size_t index = 0; index < c_size; ++index)
+      {
+        Bmask aux = bmasks[index];
+        aux.push_back(true);
+        aux.push_back(false);
+        bmasks.push_back(aux);
+        bmasks[index].push_back(false);
+        bmasks[index].push_back(true);
+      }
+    }
+    bmasks.pop_back();
+    std::sort(bmasks.begin(), bmasks.end());
+  }
+
+  Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::string>& vps)
+  : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
+  {
+    CGAL_assertion(funcs.size() != 0);
+
+    std::size_t mask_index = 0;
+    for (std::vector<std::string>::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end();
+         mask_iter != mask_end_iter;
+         ++mask_iter)
+    {
+      const std::string& mask_str = *mask_iter;
+      CGAL_assertion(funcs.size() == mask_str.length());
+      Bmask& bmask = bmasks[mask_index++];
+
+      typename Bmask::size_type bit_index = 0;
+      for (std::string::const_iterator iter = mask_str.begin(), endIter = mask_str.end(); iter != endIter; ++iter)
+      {
+        std::string::value_type character = *iter;
+        CGAL_assertion(character == '+' || character == '-');
+
+        bmask[bit_index] = (character == '+');
+        ++bit_index;
+        bmask[bit_index] = (character == '-');
+        ++bit_index;
+      }
+    }
+    std::sort(bmasks.begin(), bmasks.end());
+  }
+
+  return_type operator() (const Point_3& p, const bool = true) const
+  {
+    Bmask bmask(funcs.size() * 2, false);
+
+    std::size_t i = 0;
+    for (typename std::vector<Function>::const_iterator iter = funcs.begin(), endIter = funcs.end();
+         iter != endIter;
+         ++iter)
+    {
+      const Function& function = *iter;
+
+      double fres = function(p);
+      bmask[i] = fres > 0;
+      ++i;
+      bmask[i] = fres < 0;
+      ++i;
+    }
+
+    std::vector<Bmask>::const_iterator iter = std::lower_bound(bmasks.begin(), bmasks.end(), bmask);
+    if (iter != bmasks.end() && *iter == bmask)
+      return static_cast<return_type>(1 + (iter - bmasks.begin()));
+    return 0;
+  }
+};
+
+}  // end namespace CGAL
+
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/In_place_list.h b/3rdparty/CGAL-4.8/include/CGAL/In_place_list.h
new file mode 100644
index 0000000..b0fc2a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/In_place_list.h
@@ -0,0 +1,812 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+//                 Sylvain Pion
+
+#ifndef CGAL_IN_PLACE_LIST_H
+#define CGAL_IN_PLACE_LIST_H 1
+
+#include <CGAL/basic.h>
+#include <cstddef>
+#include <iterator>
+#include <functional>
+#include <algorithm>
+#include <CGAL/memory.h>
+#include <boost/functional/hash.hpp>
+
+namespace CGAL {
+
+// Forward declarations
+namespace internal {
+  template <class T, class Alloc> class In_place_list_iterator;
+  template <class T, class Alloc> class In_place_list_const_iterator;
+}
+
+template <class T, bool managed, class Alloc = CGAL_ALLOCATOR(T)>
+class In_place_list;
+
+template < class T >
+class In_place_sl_list_base {
+public:
+  T* next_link;        // forward pointer
+};
+
+template < class T >
+class In_place_list_base {
+public:
+  T* next_link;        // forward pointer
+  T* prev_link;        // backwards pointer
+  //friend  class internal::In_place_list_iterator<T, Alloc>;
+  //friend  class internal::In_place_list_const_iterator<T, Alloc>;
+  //friend  class In_place_list<T,false, Alloc>;
+  //friend  class In_place_list<T,true, Alloc>;
+};
+
+
+namespace internal {
+  template <class T, class Alloc>
+  class In_place_list_iterator {
+  protected:
+    T* node;
+  public:
+    friend  class In_place_list<T,false, Alloc>;
+    friend  class In_place_list<T,true, Alloc>;
+
+    typedef In_place_list_iterator<T, Alloc>  Self;
+    typedef In_place_list_base<T>      Base;
+
+    typedef T               value_type;
+    typedef T*              pointer;
+    typedef T&              reference;
+    typedef std::size_t     size_type;
+    typedef std::ptrdiff_t  difference_type;
+    typedef std::bidirectional_iterator_tag   iterator_category;
+
+    In_place_list_iterator() : node(0) {}
+    In_place_list_iterator(T* x) : node(x) {}
+
+    bool  operator==( const Self& x) const { return node == x.node; }
+    bool  operator!=( const Self& x) const { return node != x.node; }
+    bool  operator< ( const Self& x) const { return node< x.node;   }
+    bool  operator<=( const Self& x) const { return node<= x.node;  }
+    bool  operator> ( const Self& x) const { return node> x.node;   }
+    bool  operator>=( const Self& x) const { return node>= x.node;  }
+    T&    operator*()  const { return *node; }
+    T*    operator->() const { return  node; }
+    Self& operator++() {
+      node = ((Base*)(node))->next_link;
+      return *this;
+    }
+    Self  operator++(int) {
+      Self tmp = *this;
+      ++*this;
+      return tmp;
+    }
+    Self& operator--() {
+      node = ((Base*)(node))->prev_link;
+      return *this;
+    }
+    Self  operator--(int) {
+      Self tmp = *this;
+      --*this;
+      return tmp;
+    }
+  };
+}
+
+namespace internal {
+  template <class T, class Alloc>
+  class In_place_list_const_iterator {
+  protected:
+    const T* node;  // It's not Ptr. Otherwise traversal won't work.
+  public:
+    friend  class In_place_list<T,false, Alloc>;
+    friend  class In_place_list<T,true, Alloc>;
+
+    typedef In_place_list_const_iterator<T, Alloc> Self;
+    typedef In_place_list_iterator<T, Alloc>       Iterator;
+    typedef In_place_list_base<T>           Base;
+
+    typedef T               value_type;
+    typedef const T*        pointer;
+    typedef const T&        reference;
+    typedef std::size_t     size_type;
+    typedef std::ptrdiff_t  difference_type;
+    typedef std::bidirectional_iterator_tag   iterator_category;
+
+    In_place_list_const_iterator() : node(0) {}
+    In_place_list_const_iterator( Iterator i) : node(&*i) {}
+    In_place_list_const_iterator(const T* x) : node(x) {}
+
+    bool     operator==( const Self& x) const { return node == x.node; }
+    bool     operator!=( const Self& x) const { return node != x.node; }
+    bool     operator< ( const Self& x) const { return node< x.node;   }
+    bool     operator<=( const Self& x) const { return node<= x.node;  }
+    bool     operator> ( const Self& x) const { return node> x.node;   }
+    bool     operator>=( const Self& x) const { return node>= x.node;  }
+    const T& operator*()  const { return *node; }
+    const T* operator->() const { return  node; }
+    Self& operator++() {
+      node = ((const Base*)(node))->next_link;
+      return *this;
+    }
+    Self  operator++(int) {
+      Self tmp = *this;
+      ++*this;
+      return tmp;
+    }
+    Self& operator--() {
+      node = ((const Base*)(node))->prev_link;
+      return *this;
+    }
+    Self  operator--(int) {
+      Self tmp = *this;
+      --*this;
+      return tmp;
+    }
+    In_place_list_iterator<T,Alloc>
+    remove_const() const
+    {
+      return In_place_list_iterator<T,Alloc>(const_cast<T*>(node));
+    }
+  };
+
+
+
+template <class T, class Alloc>
+  std::size_t hash_value(const In_place_list_iterator<T,Alloc>&  i)
+  {
+    T* ptr = &*i;
+    return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
+  }
+
+
+template <class T, class Alloc>
+  std::size_t hash_value(const In_place_list_const_iterator<T,Alloc>&  i)
+  {
+    T* ptr = &*i;
+    return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
+   }
+
+}
+
+
+template <class T, bool managed, class Alloc>
+class In_place_list {
+
+  // Bidirectional List Managing Objects in Place
+  // --------------------------------------------
+  //
+  // DEFINITION An object of the class In_place_list<T,bool> is a
+  // sequence that supports bidirectional iterators and allows constant time
+  // insert and erase operations anywhere within the sequence. The
+  // functionality is similar to the `list<T>' in the STL.
+  //
+  // The In_place_list<T,bool> manages element items in place. Two
+  // pointers `T*' are expected in the class. For example the base class
+  // `In_place_list_base<T>' can be used.
+  //
+  // The In_place_list<T,bool> does not copy element items during
+  // insertion (unless otherwise stated for a function). On removal or
+  // destruction of the list the element items are not deleted by default.
+  // The second template parameter `bool' has to be set to `false' in this
+  // case. If the In_place_list<T,bool> should take the responsibility
+  // for the stored objects the `bool' parameter could be set to `true', in
+  // which case the list will delete removed items and will delete all
+  // remaining items on destruction. In any case, the `destroy()' member
+  // function deletes all elements.
+  //
+  // On purpose, these two possible versions of In_place_list<T,bool>
+  // are not assignment compatible to avoid confusions between the different
+  // storage responsibilities.
+  //
+  // PARAMETERS
+  //
+  // The full classname is `In_place_list<T,bool managed = false, Alloc
+  // = CGAL_ALLOCATOR(T)>'.
+  //
+  // TYPES
+
+public:
+  typedef Alloc           Allocator;
+  typedef Alloc           allocator_type; // STL compliant
+
+  // Note: the standard requires the following types to be equivalent
+  // to T, T*, const T*, T&, const T&, size_t, and ptrdiff_t, respectively.
+  // So we don't pass these types to the iterators explicitly.
+  typedef typename Allocator::value_type          value_type;
+  typedef typename Allocator::pointer             pointer;
+  typedef typename Allocator::const_pointer       const_pointer;
+  typedef typename Allocator::reference           reference;
+  typedef typename Allocator::const_reference     const_reference;
+  typedef typename Allocator::size_type           size_type;
+  typedef typename Allocator::difference_type     difference_type;
+
+  typedef internal::In_place_list_iterator<T, Alloc> iterator;
+  typedef internal::In_place_list_const_iterator<T, Alloc> const_iterator;
+
+  typedef std::reverse_iterator<iterator>         reverse_iterator;
+  typedef std::reverse_iterator<const_iterator>   const_reverse_iterator;
+
+  typedef In_place_list<T,managed,Alloc>          Self;
+
+protected:
+  Allocator allocator;
+
+  pointer      node;
+  size_type    length;
+
+  // These are the only places where the allocator gets called.
+  pointer get_node() {
+    pointer p = allocator.allocate(1);
+#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
+    allocator.construct(p, value_type());
+#else
+    new (p) value_type;
+#endif
+    return p;
+  }
+  pointer get_node( const T& t) {
+    pointer p = allocator.allocate(1);
+#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
+    allocator.construct(p, t);
+#else
+    new (p) value_type(t);
+#endif
+    return p;
+  }
+  void put_node( pointer p) {
+#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY  
+    allocator.destroy( p);
+#else 
+   p->~value_type();
+#endif
+    allocator.deallocate( p, 1);
+  }
+
+public:
+  // CREATION
+  //
+  // New creation variable is: `l'
+
+  explicit In_place_list() : length(0) {
+    // introduces an empty list.
+    node = get_node();
+    (*node).next_link = node;
+    (*node).prev_link = node;
+  }
+  void swap(Self& x) {
+    std::swap(node, x.node);
+    std::swap(length, x.length);
+  }
+
+  // ACCESS MEMBER FUNCTIONS
+
+  allocator_type get_allocator() const { return allocator; }
+
+  iterator       begin() { return (*node).next_link; }
+  const_iterator begin() const { return (*node).next_link; }
+  iterator       end() { return node; }
+  const_iterator end() const { return node; }
+
+  reverse_iterator       rbegin() { return reverse_iterator(end()); }
+  const_reverse_iterator rbegin() const {
+    return const_reverse_iterator(end());
+  }
+  reverse_iterator       rend() { return reverse_iterator(begin()); }
+  const_reverse_iterator rend() const {
+    return const_reverse_iterator(begin());
+  }
+
+  bool            empty() const    { return length == 0; }
+  size_type       size() const     { return length; }
+  size_type       max_size() const { return size_type(-1); }
+
+  reference       front()          { return *begin(); }
+  const_reference front() const    { return *begin(); }
+  reference       back()           { return *(--end()); }
+  const_reference back() const     { return *(--end()); }
+
+  // INSERTION
+
+  iterator insert(iterator position, T& x) {
+    // inserts `t' in front of iterator `pos'. The return value points
+    // to the inserted item.
+    x.next_link = position.node;
+    x.prev_link = (*position.node).prev_link;
+    (*((*position.node).prev_link)).next_link = &x;
+    (*position.node).prev_link = &x;
+    ++length;
+    return &x;
+  }
+  iterator insert(T* pos, T& x) {
+    return insert( iterator(pos), x);
+  }
+  void push_front(T& x) { insert(begin(), x); }
+  // inserts an item in front of list `l'.
+
+  void push_back(T& x)  { insert(end(), x); }
+  // inserts an item at the back of list `l'.
+
+  void insert(iterator position, size_type n);
+  // inserts n copies of `T()' in front of iterator `pos'.
+
+  void insert(iterator position, size_type n, const T& x);
+  // inserts n copies of `t' in front of iterator `pos'.
+
+  void insert( T* pos, size_type n) { insert( iterator(pos), n); }
+  void insert( T* pos, size_type n, const T& x) {
+    insert( iterator(pos), n, x);
+  }
+
+  template <class InputIterator>
+  void insert(iterator pos, InputIterator first, InputIterator last) {
+    // inserts the range [`first, last') in front of iterator `pos'.
+    while (first != last)
+      insert(pos, *get_node(*first++));
+  }
+
+  template <class InputIterator>
+  void insert(T* pos, InputIterator first, InputIterator last) {
+    // inserts the range [`first, last') in front of iterator `pos'.
+    while (first != last)
+      insert(pos, *get_node(*first++));
+  }
+
+  void insert(T* pos, const T* first, const T* last) {
+    insert( iterator(pos), const_iterator(first),
+            const_iterator(last));
+  }
+
+
+  // REMOVAL
+
+  void erase(iterator i) {
+    // removes the item from list `l', where `pos' refers to.
+    CGAL_assertion( length > 0);
+    (*((*i.node).prev_link)).next_link = (*i.node).next_link;
+    (*((*i.node).next_link)).prev_link = (*i.node).prev_link;
+    if (managed)
+      put_node(i.node);
+    --length;
+  }
+  void erase(T* pos)  { erase( iterator( pos)); }
+
+  void pop_front() { erase(begin()); }
+  // removes the first item from list `l'.
+
+  void pop_back() {
+    // removes the last item from list `l'.
+    iterator tmp = end();
+    erase(--tmp);
+  }
+
+  void erase(iterator first, iterator last);
+  // removes the items in the range [`first, last') from list `l'.
+
+  void erase(T* first, T* last) {
+    erase( iterator(first), iterator(last));
+  }
+
+  void clear() { erase( begin(), end()); }
+
+  // CREATION (Continued)
+
+  explicit In_place_list(size_type n, const T& value = T()) : length(0) {
+    // introduces a list with n items, all initialized with copies of
+    // value.
+    node = get_node();
+    (*node).next_link = node;
+    (*node).prev_link = node;
+    insert(begin(), n, value);
+  }
+
+  template <class InputIterator>
+  In_place_list( InputIterator first, InputIterator last) : length(0) {
+    // a list with copies from the range [`first,last').
+    node = get_node();
+    (*node).next_link = node;
+    (*node).prev_link = node;
+    insert( begin(), first, last);
+  }
+
+  In_place_list(const T* first, const T* last) : length(0) {
+    // a list with copies from the range [`first,last').
+    node = get_node();
+    (*node).next_link = node;
+    (*node).prev_link = node;
+    insert(begin(), first, last);
+  }
+  In_place_list(const Self& x) : length(0) {
+    // copy constructor. Each item in `l1' is copied.
+    node = get_node();
+    (*node).next_link = node;
+    (*node).prev_link = node;
+    insert(begin(), x.begin(), x.end());
+  }
+  ~In_place_list() {
+    erase(begin(), end());
+    put_node(node);
+  }
+
+  Self& operator=(const Self& x);
+
+  void destroy();
+
+  template <class InputIterator>
+  void assign( InputIterator first, InputIterator last) {
+    erase( begin(), end());
+    insert( begin(), first, last);
+  }
+
+  void assign( size_type n, const T& t) {
+    erase( begin(), end());
+    insert( begin(), n, t);
+  }
+
+  void resize( size_type sz, const T& c = T()) {
+    if ( sz > size())
+      insert( end(), sz - size(), c);
+    else if ( sz < size()) {
+      iterator i = begin();
+      while ( sz-- > 0)
+        ++i;
+      erase( i, end());
+    }  // else do nothing
+  }
+
+  // COMPARISON OPERATIONS
+
+  bool operator==( const Self& y) const {
+    return size() == y.size() && std::equal(begin(), end(), y.begin());
+  }
+
+  bool operator!=( const Self& y) const {
+    return size() != y.size() || ! std::equal(begin(),end(),y.begin());
+  }
+
+  bool operator<(const Self& y) const {
+    return std::lexicographical_compare( begin(),end(),
+                                         y.begin(),y.end());
+  }
+  bool operator> ( const Self& i) const { return i < *this; }
+  bool operator<=( const Self& i) const { return !(i < *this); }
+  bool operator>=( const Self& i) const { return !(*this < i); }
+
+  // SPECIAL LIST OPERATIONS
+
+protected:
+  void transfer(iterator position, iterator first, iterator last) {
+    // move the range [`first, last') before the position.
+    (*((*last.node).prev_link)).next_link = position.node;
+    (*((*first.node).prev_link)).next_link = last.node;
+    (*((*position.node).prev_link)).next_link = first.node;
+    T* tmp = (*position.node).prev_link;
+    (*position.node).prev_link = (*last.node).prev_link;
+    (*last.node).prev_link = (*first.node).prev_link;
+    (*first.node).prev_link = tmp;
+  }
+
+public:
+  void splice(iterator position, Self& x) {
+    // inserts the list x before position `pos' and x becomes empty.
+    // It takes constant time. Precondition: `&l != &x'.
+    if (!x.empty()) {
+      transfer(position, x.begin(), x.end());
+      length += x.length;
+      x.length = 0;
+    }
+  }
+  void splice(T* position, Self& x) {
+    splice( iterator(position), x);
+  }
+  void splice( iterator position, Self& x, iterator i) {
+    // inserts an element pointed to by i from list x before position
+    // `pos' and removes the element from x. It takes constant time. i
+    // is a valid dereferenceable iterator of x. The result is
+    // unchanged if `pos == i' or `pos == ++i'.
+    iterator j = i;
+    if (position == i || position == ++j) return;
+    transfer(position, i, j);
+    ++length;
+    --x.length;
+  }
+  void splice(T* position, Self& x, T* i) {
+    splice( iterator(position), x, iterator(i));
+  }
+  void splice(iterator pos, Self& x, iterator first, iterator last) {
+    // inserts elements in the range [`first, last') before position
+    // `pos' and removes the elements from x. It takes constant time
+    // if `&x == $l'; otherwise, it takes linear time. [`first,
+    // last') is a valid range in x. Precondition: `pos' is not in the
+    // range [`first, last').
+    if (first != last) {
+      if (&x != this) {
+        difference_type n = std::distance(first, last);
+        x.length -= n;
+        length += n;
+      }
+      transfer(pos, first, last);
+    }
+  }
+  void splice(T* p, Self& x, T* first, T* last) {
+    splice( iterator(p), x, iterator(first), iterator(last));
+  }
+
+  void remove(const T& value);
+  // erases all elements e in the list l for which `e == value'.
+  // It is stable. Precondition: a suitable `operator==' for the
+  // type T.
+
+  void reverse();
+  // reverses the order of the elements in `l' in linear time.
+
+  void unique();
+  // erases all but the first element from every consecutive group
+  // of equal elements in the list `l'. Precondition: a suitable
+  // `operator==' for the type T.
+
+  void merge(Self& x);
+  // merges the list x into the list `l' and x becomes empty. It is
+  // stable. Precondition: Both lists are increasingly sorted. A
+  // suitable `operator<' for the type T.
+
+  template < class StrictWeakOrdering >
+  void merge(Self& x, StrictWeakOrdering ord)
+  // merges the list x into the list `l' and x becomes empty.
+  // It is stable.
+  // Precondition: Both lists are increasingly sorted wrt. ord.
+  {
+    iterator first1 = begin();
+    iterator last1 = end();
+    iterator first2 = x.begin();
+    iterator last2 = x.end();
+    while (first1 != last1 && first2 != last2)
+      if (ord(*first2, *first1)) {
+        iterator next = first2;
+        transfer(first1, first2, ++next);
+        first2 = next;
+      } else
+        ++first1;
+    if (first2 != last2)
+      transfer(last1, first2, last2);
+    length += x.length;
+    x.length= 0;
+  }
+
+  void sort();
+  // sorts the list `l' according to the `operator<' in time O(n
+  // log n) where `n = size()'. It is stable. Precondition: a
+  // suitable `operator<' for the type T.
+
+  template < class StrictWeakOrdering >
+  void sort(StrictWeakOrdering ord)
+  // sorts the list `l' according to ord in time O(n log n)
+  // where `n = size()'. It is stable.
+  {
+    if (size() < 2) return;
+    In_place_list<T,managed,Alloc> carry;
+    In_place_list<T,managed,Alloc> counter[64];
+    int fill = 0;
+    while (!empty()) {
+      carry.splice(carry.begin(), *this, begin());
+      int i = 0;
+      while(i < fill && !counter[i].empty()) {
+        counter[i].merge(carry, ord);
+        carry.swap(counter[i++]);
+      }
+      carry.swap(counter[i]);
+      if (i == fill)
+        ++fill;
+    }
+    for (int i = 1; i < fill; ++i)
+      counter[i].merge(counter[i-1], ord);
+    swap(counter[fill-1]);
+  }
+
+};
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::
+insert(internal::In_place_list_iterator<T, Alloc> position, size_type n) {
+  while (n--)
+    insert(position, *get_node());
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::
+insert(internal::In_place_list_iterator<T, Alloc> position, size_type n, const T& x) {
+  while (n--)
+    insert(position, *get_node(x));
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::
+erase(internal::In_place_list_iterator<T, Alloc> first,
+      internal::In_place_list_iterator<T, Alloc> last)
+{
+  while (first != last)
+    erase(first++);
+}
+
+template <class T, bool managed, class Alloc>
+In_place_list<T,managed,Alloc>&
+In_place_list<T,managed,Alloc>::
+operator=(const In_place_list<T,managed,Alloc>& x) {
+  if (this != &x) {
+    iterator first1 = begin();
+    iterator last1  = end();
+    const_iterator first2 = x.begin();
+    const_iterator last2  = x.end();
+    while (first1 != last1 && first2 != last2) {
+      // Save the pointer values before assignment.
+      // Assignment avoids unneccassary delete's and new's.
+      T* tmp1 = (*first1).next_link;
+      T* tmp2 = (*first1).prev_link;
+      *first1 = *first2++;
+      (*first1).next_link = tmp1;
+      (*first1).prev_link = tmp2;
+      ++first1;
+    }
+    if (first2 == last2)
+      erase(first1, last1);
+    else
+      insert(last1, first2, last2);
+  }
+  return *this;
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::
+destroy() {
+  iterator first = begin();
+  iterator last  = end();
+  while( first != last) {
+    iterator i = first++;
+    put_node(i.node);
+  }
+  length = 0;
+  (*node).next_link = node;
+  (*node).prev_link = node;
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::remove(const T& value) {
+  iterator first = begin();
+  iterator last = end();
+  while (first != last) {
+    iterator next = first;
+    ++next;
+    if (*first == value)
+      erase(first);
+    first = next;
+  }
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::reverse() {
+  if (size() < 2) return;
+  for (iterator first = ++begin(); first != end();) {
+    iterator old = first++;
+    transfer(begin(), old, first);
+  }
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::unique() {
+  iterator first = begin();
+  iterator last = end();
+  if (first == last) return;
+  iterator next = first;
+  while (++next != last) {
+    if (*first == *next)
+      erase(next);
+    else
+      first = next;
+    next = first;
+  }
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::merge(In_place_list<T,managed,Alloc>& x) {
+  iterator first1 = begin();
+  iterator last1 = end();
+  iterator first2 = x.begin();
+  iterator last2 = x.end();
+  while (first1 != last1 && first2 != last2)
+    if (*first2 < *first1) {
+      iterator next = first2;
+      transfer(first1, first2, ++next);
+      first2 = next;
+    } else
+      ++first1;
+  if (first2 != last2)
+    transfer(last1, first2, last2);
+  length += x.length;
+  x.length= 0;
+}
+
+template <class T, bool managed, class Alloc>
+void In_place_list<T,managed,Alloc>::sort() {
+  if (size() < 2) return;
+  In_place_list<T,managed,Alloc> carry;
+  In_place_list<T,managed,Alloc> counter[64];
+  int fill = 0;
+  while (!empty()) {
+    carry.splice(carry.begin(), *this, begin());
+    int i = 0;
+    while(i < fill && !counter[i].empty()) {
+      counter[i].merge(carry);
+      carry.swap(counter[i++]);
+    }
+    carry.swap(counter[i]);
+    if (i == fill)
+      ++fill;
+  }
+  for (int i = 1; i < fill; ++i)
+    counter[i].merge(counter[i-1]);
+  swap(counter[fill-1]);
+}
+
+} //namespace CGAL
+
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+
+  template < class T, class Alloc >
+  struct hash<CGAL::internal::In_place_list_iterator<T, Alloc> >
+    : public std::unary_function<CGAL::internal::In_place_list_iterator<T, Alloc>, std::size_t>  {
+
+    std::size_t operator()(const CGAL::internal::In_place_list_iterator<T, Alloc>& i) const
+    {
+      const T* ptr = &*i;
+      return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
+    }
+  };
+
+  template < class T, class Alloc >
+  struct hash<CGAL::internal::In_place_list_const_iterator<T, Alloc> >
+    : public std::unary_function<CGAL::internal::In_place_list_const_iterator<T, Alloc>, std::size_t> {
+
+    std::size_t operator()(const CGAL::internal::In_place_list_const_iterator<T, Alloc>& i) const
+    {
+      const T* ptr = &*i;
+      return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
+    }
+  };
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+#endif // CGAL_IN_PLACE_LIST_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Incremental_neighbor_search.h b/3rdparty/CGAL-4.8/include/CGAL/Incremental_neighbor_search.h
new file mode 100644
index 0000000..c4890c8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Incremental_neighbor_search.h
@@ -0,0 +1,549 @@
+// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
+
+#ifndef CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
+#define CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
+
+#include <cstring>
+#include <list>
+#include <queue>
+#include <memory>
+#include <CGAL/Kd_tree_node.h>
+#include <CGAL/Kd_tree_rectangle.h>
+#include <CGAL/Euclidean_distance.h>
+
+namespace CGAL {
+
+  template <class SearchTraits, 
+            class Distance_=typename internal::Spatial_searching_default_distance<SearchTraits>::type,
+            class Splitter_ = Sliding_midpoint<SearchTraits>,
+            class Tree_=Kd_tree<SearchTraits, Splitter_, Tag_false> >
+  class Incremental_neighbor_search { 
+
+  public:
+
+    typedef Distance_ Distance;
+    typedef Tree_     Tree;
+    typedef typename SearchTraits::Point_d Point_d;
+    typedef typename SearchTraits::FT FT;
+    typedef typename SearchTraits::Dimension Dimension;
+    typedef typename Tree::Point_d_iterator Point_d_iterator;
+    typedef typename Tree::Node_const_handle Node_const_handle;
+    typedef typename Tree::Splitter Splitter;
+    typedef Kd_tree_rectangle<FT,Dimension> Node_box;
+    typedef typename Distance::Query_item Query_item;
+
+    class Cell {
+
+    private:
+
+      Node_box* the_box;
+      Node_const_handle the_node;
+
+    public:
+
+      // constructor
+      Cell (Node_box* Nb, Node_const_handle N)
+      :the_box(Nb), the_node(N)
+      {}
+
+      Node_box* 
+      box() 
+      {
+	return the_box;
+      }
+
+      Node_const_handle    
+      node() 
+      {
+	return the_node;
+      }
+    };
+    
+    
+
+    typedef std::pair<Point_d,FT> Point_with_transformed_distance;
+    typedef std::pair<Cell*,FT> Cell_with_distance;
+
+
+    typedef std::vector<Cell_with_distance*> Cell_with_distance_vector;
+    typedef std::vector<Point_with_transformed_distance*> Point_with_distance_vector;
+    typedef std::vector<FT> Distance_vector;
+
+    //data members
+    const Tree& m_tree;
+    Query_item m_query;
+    Distance m_dist;
+    FT m_Eps; 
+    bool m_search_nearest;    
+
+  public:
+
+    class iterator;
+    typedef iterator const_iterator;
+
+    // constructor
+    Incremental_neighbor_search(const Tree& tree, const Query_item& q,
+				FT Eps=FT(0.0), bool search_nearest=true, 
+				const Distance& tr=Distance()): 
+          m_tree(tree),m_query(q),m_dist(tr),m_Eps(Eps),m_search_nearest(search_nearest)
+    {}
+
+    iterator 
+    begin() const
+    {
+      return iterator(m_tree,m_query,m_dist,m_Eps,m_search_nearest);
+    }
+
+    iterator 
+    end() const
+    {
+      return iterator();
+    }
+
+    std::ostream&  
+    statistics(std::ostream& s) 
+    {
+      begin()->statistics(s);
+      return s;
+    }
+
+
+    template<class T>
+    struct Object_wrapper
+    {
+      T object;
+      Object_wrapper(const T& t):object(t){}
+      const T& operator* () const { return object; }
+      const T* operator-> () const { return &object; }
+    };    
+
+
+    class iterator {
+
+    public:
+
+      typedef std::input_iterator_tag iterator_category;
+      typedef Point_with_transformed_distance       value_type;
+      typedef Point_with_transformed_distance*      pointer;
+      typedef const Point_with_transformed_distance&      reference;
+      typedef std::size_t               size_type;
+      typedef std::ptrdiff_t            difference_type;
+      typedef int distance_type;
+    
+    
+      class Iterator_implementation;
+      Iterator_implementation *ptr;
+
+
+      // default constructor
+      iterator() 
+	: ptr(0)
+      {}
+
+      int 
+      the_number_of_items_visited() 
+      {
+        return ptr->number_of_items_visited;
+      }
+
+      // constructor
+      iterator(const Tree& tree, const Query_item& q, const Distance& tr, FT eps, 
+	       bool search_nearest)
+        : ptr(new Iterator_implementation(tree, q, tr, eps, search_nearest))
+      {}
+      
+      // copy constructor
+      iterator(const iterator& Iter)
+	: ptr(Iter.ptr)
+      {
+	if (ptr != 0) ptr->reference_count++;
+      }
+      
+      iterator& operator=(const iterator& Iter)
+      {
+        if (ptr!=Iter.ptr){
+          if (ptr != 0 && --(ptr->reference_count)==0) {
+              delete ptr;
+          }
+          ptr = Iter.ptr;
+          if (ptr != 0) ptr->reference_count++;
+        }
+        return *this;
+      }      
+      
+      const Point_with_transformed_distance& 
+      operator* () const
+      {
+	return *(*ptr);
+      }
+
+      // -> operator
+      const Point_with_transformed_distance*
+      operator-> () const 
+      {
+	return &*(*ptr);
+      }      
+      
+      // prefix operator
+      iterator& operator++() 
+      {
+        ++(*ptr);
+        return *this;
+      }
+
+      // postfix operator
+      Object_wrapper<Point_with_transformed_distance>
+      operator++(int) 
+      {
+	return (*ptr)++;
+      }
+
+      bool 
+      operator==(const iterator& It) const 
+      {
+        if ( ((ptr == 0) || 
+	      ptr->Item_PriorityQueue.empty()) &&
+	     ((It.ptr == 0) ||  
+	      It.ptr->Item_PriorityQueue.empty())
+	     )
+	  return true;
+        // else
+        return (ptr == It.ptr);
+      }
+
+      bool 
+      operator!=(const iterator& It) const
+      {
+        return !(*this == It);
+      }
+
+      std::ostream& 
+      statistics (std::ostream& s) 
+      {
+    	ptr->statistics(s);
+        return s;
+      }
+
+      ~iterator() 
+      {
+        if (ptr != 0) {
+	  ptr->reference_count--;
+	  if (ptr->reference_count==0) {
+	    delete ptr;
+	    ptr = 0;
+	  }
+        }
+      }
+      
+
+      class Iterator_implementation {
+
+      private:
+
+	FT multiplication_factor;
+
+	Query_item query_point;
+
+	FT distance_to_root;
+
+	bool search_nearest_neighbour;
+
+	FT rd;
+
+
+	class Priority_higher {
+	
+	public:
+
+	  bool search_nearest;
+
+	  Priority_higher(bool search_the_nearest_neighbour)
+	    : search_nearest(search_the_nearest_neighbour) 
+	  {}
+
+	  //highest priority is smallest distance
+	  bool operator() (Cell_with_distance* n1, Cell_with_distance* n2) const 
+	  {
+	    return (search_nearest)? (n1->second > n2->second) : (n2->second > n1->second);
+	  }
+	};
+
+
+	class Distance_smaller {
+
+	public:
+
+	  bool search_nearest;
+
+	  Distance_smaller(bool search_the_nearest_neighbour)
+	    :search_nearest(search_the_nearest_neighbour)
+	  {}
+
+	  //highest priority is smallest distance
+	  bool 
+	  operator() (Point_with_transformed_distance* p1, Point_with_transformed_distance* p2) const 
+	  {
+	    return (search_nearest) ? (p1->second > p2->second) : (p2->second > p1->second);
+	  }
+	};
+
+
+	std::priority_queue<Cell_with_distance*, Cell_with_distance_vector,
+	                    Priority_higher> PriorityQueue;
+      public:
+	std::priority_queue<Point_with_transformed_distance*, Point_with_distance_vector,
+	                    Distance_smaller> Item_PriorityQueue;
+    
+
+	Distance distance;
+
+      public:
+
+	int reference_count;
+
+	int number_of_internal_nodes_visited;
+	int number_of_leaf_nodes_visited;
+	int number_of_items_visited;
+	int number_of_neighbours_computed;
+
+	// constructor
+	Iterator_implementation(const Tree& tree, const Query_item& q,const Distance& tr,
+				FT Eps, bool search_nearest)
+	  : query_point(q), search_nearest_neighbour(search_nearest), 
+	  PriorityQueue(Priority_higher(search_nearest)),
+	  Item_PriorityQueue(Distance_smaller(search_nearest)),
+	  distance(tr), reference_count(1), number_of_internal_nodes_visited(0), 
+	  number_of_leaf_nodes_visited(0), number_of_items_visited(0),
+	  number_of_neighbours_computed(0)
+	{
+          if (tree.empty()) return;
+            
+	  multiplication_factor= distance.transformed_distance(FT(1)+Eps);
+
+	  Node_box *bounding_box = new Node_box((tree.bounding_box()));
+
+	  if (search_nearest) distance_to_root=
+				distance.min_distance_to_rectangle(q,*bounding_box);
+	  else distance_to_root=
+		 distance.max_distance_to_rectangle(q,*bounding_box);
+
+        
+
+	  Cell *Root_Cell = new Cell(bounding_box,tree.root());
+	  Cell_with_distance  *The_Root = 
+	    new Cell_with_distance(Root_Cell,distance_to_root);
+
+	  PriorityQueue.push(The_Root);
+
+	  // rd is the distance of the top of the priority queue to q
+	  rd=The_Root->second;
+	  Compute_the_next_nearest_neighbour();
+	}
+
+	// * operator
+	const Point_with_transformed_distance& 
+	operator* () const
+	{    
+	  return *(Item_PriorityQueue.top());
+	}
+
+	// prefix operator
+	Iterator_implementation& 
+	operator++() 
+	{
+	  Delete_the_current_item_top();
+	  Compute_the_next_nearest_neighbour();
+	  return *this;
+	}
+
+        // postfix operator
+        Object_wrapper<Point_with_transformed_distance>
+        operator++(int) 
+        {
+          Object_wrapper<Point_with_transformed_distance> result( *(Item_PriorityQueue.top()) );
+          ++*this;
+          return result;
+        }	
+
+	// Print statistics of the general priority search process.
+	std::ostream& 
+	statistics (std::ostream& s) const
+	{
+	  s << "General priority search statistics:" << std::endl;
+	  s << "Number of internal nodes visited:" << 
+	    number_of_internal_nodes_visited << std::endl;
+	  s << "Number of leaf nodes visited:" << 
+	    number_of_leaf_nodes_visited << std::endl;
+	  s << "Number of points visited:" << 
+	    number_of_items_visited << std::endl;
+	  s << "Number of neighbours computed:" << 
+	    number_of_neighbours_computed << std::endl;
+	  return s;
+	}
+
+	//destructor
+	~Iterator_implementation() 
+	{
+	  while (! PriorityQueue.empty()) {
+	    Cell_with_distance* The_top=PriorityQueue.top();
+	    PriorityQueue.pop();
+	    delete The_top->first->box();
+	    delete The_top->first;
+	    delete The_top;
+	  }
+	  while (! Item_PriorityQueue.empty()) {
+	    Point_with_transformed_distance* The_top=Item_PriorityQueue.top();
+	    Item_PriorityQueue.pop();
+	    delete The_top;
+	  }
+	}
+
+      private:
+
+	void 
+	Delete_the_current_item_top() 
+	{
+	  Point_with_transformed_distance* The_item_top=Item_PriorityQueue.top();
+	  Item_PriorityQueue.pop();
+	  delete The_item_top;
+	}
+
+	void 
+	Compute_the_next_nearest_neighbour() 
+	{
+	  // compute the next item
+	  bool next_neighbour_found=false;
+	  if (!(Item_PriorityQueue.empty())) {
+	    if (search_nearest_neighbour)
+	      next_neighbour_found =
+		(multiplication_factor*rd > Item_PriorityQueue.top()->second);
+	    else
+	      next_neighbour_found =
+		(rd < multiplication_factor*Item_PriorityQueue.top()->second);
+	  }
+	  while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
+                
+	    Cell_with_distance* The_node_top = PriorityQueue.top();
+	    Node_const_handle N = The_node_top->first->node();
+	    Node_box* B = The_node_top->first->box();
+	    PriorityQueue.pop();
+	    delete The_node_top->first;
+	    delete The_node_top;
+
+	    while (!(N->is_leaf())) {
+              typename Tree::Internal_node_const_handle node =
+                static_cast<typename Tree::Internal_node_const_handle>(N);
+	      number_of_internal_nodes_visited++;
+	      int new_cut_dim = node->cutting_dimension();
+	      FT  new_cut_val = node->cutting_value();
+                        
+	      Node_box* lower_box = new Node_box(*B);
+	      Node_box* upper_box = new Node_box(*B); 
+		lower_box->split(*upper_box,new_cut_dim, new_cut_val);
+	      delete B;
+	      if (search_nearest_neighbour) {
+		FT distance_to_box_lower =
+		  distance.min_distance_to_rectangle(query_point, *lower_box);
+		FT distance_to_box_upper =
+		  distance.min_distance_to_rectangle(query_point, *upper_box);
+		if (distance_to_box_lower <= distance_to_box_upper) {
+
+		  Cell* C_upper = new Cell(upper_box, node->upper());
+		  Cell_with_distance *Upper_Child =
+		    new Cell_with_distance(C_upper,distance_to_box_upper);
+		  PriorityQueue.push(Upper_Child);
+		  N=node->lower();
+		  B=lower_box;
+		} else {
+		  Cell* C_lower = new Cell(lower_box, node->lower());
+		  Cell_with_distance *Lower_Child =
+		    new Cell_with_distance(C_lower,distance_to_box_lower);
+		  PriorityQueue.push(Lower_Child);
+		  N=node->upper();
+		  B=upper_box;
+		}
+	      }
+	      else { // search furthest
+		FT distance_to_box_lower =
+		  distance.max_distance_to_rectangle(query_point, *lower_box);
+		FT distance_to_box_upper =
+		  distance.max_distance_to_rectangle(query_point, *upper_box);
+		if (distance_to_box_lower >= distance_to_box_upper) {
+		  Cell* C_upper = new Cell(upper_box, node->upper());
+		  Cell_with_distance *Upper_Child =
+		    new Cell_with_distance(C_upper,distance_to_box_upper);
+		  PriorityQueue.push(Upper_Child);
+		  N=node->lower();
+		  B=lower_box;
+		}
+		else {
+		  Cell* C_lower = new Cell(lower_box, node->lower());
+		  Cell_with_distance *Lower_Child =
+		    new Cell_with_distance(C_lower,distance_to_box_lower);
+		  PriorityQueue.push(Lower_Child);
+		  N=node->upper();
+		  B=upper_box;
+		}
+	      }
+	    }
+	    delete B;
+             typename Tree::Leaf_node_const_handle node =
+              static_cast<typename Tree::Leaf_node_const_handle>(N);
+	    number_of_leaf_nodes_visited++;
+	    if (node->size() > 0) {
+	      for (typename Tree::iterator it = node->begin(); it != node->end(); it++) {
+		number_of_items_visited++;
+		FT distance_to_query_point=
+		  distance.transformed_distance(query_point,*it);
+		Point_with_transformed_distance *NN_Candidate=
+		  new Point_with_transformed_distance(*it,distance_to_query_point);
+		Item_PriorityQueue.push(NN_Candidate);
+	      }
+	      // old top of PriorityQueue has been processed,
+	      // hence update rd
+	      if (!PriorityQueue.empty()) {
+		rd = PriorityQueue.top()->second;
+		if (search_nearest_neighbour)
+		  next_neighbour_found =
+		    (multiplication_factor*rd > 
+		     Item_PriorityQueue.top()->second);
+		else
+		  next_neighbour_found =
+		    (multiplication_factor*rd < 
+		     Item_PriorityQueue.top()->second);
+	      }
+	      else // priority queue empty => last neighbour found
+		{
+		  next_neighbour_found=true;
+		};
+	      number_of_neighbours_computed++;
+	    }
+	  }   // next_neighbour_found or priority queue is empty
+	  // in the latter case also the item priority queue is empty
+        
+	}
+      }; // class Iterator_implementation
+    }; // class iterator
+  }; // class 
+
+} // namespace CGAL
+
+#endif  // CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Index_property_map.h b/3rdparty/CGAL-4.8/include/CGAL/Index_property_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Index_property_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Index_property_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interpolation_gradient_fitting_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Interpolation_gradient_fitting_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interpolation_gradient_fitting_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interpolation_gradient_fitting_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interpolation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Interpolation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interpolation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interpolation_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Intersection_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Intersection_traits.h
new file mode 100644
index 0000000..5c7b74e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Intersection_traits.h
@@ -0,0 +1,271 @@
+// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Möller
+
+#ifndef CGAL_INTERSECTION_TRAITS_H
+#define CGAL_INTERSECTION_TRAITS_H
+
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/Object.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Dimension.h>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/variant.hpp>
+
+// The macro CGAL_INTERSECTION_VERSION controls which version of the
+// intersection is used.
+// Currently two values are supported:
+// - 1, which means intersections with CGAL::Object
+// - 2, which means intersections with Intersection_traits and the 
+//      corresponding APIs in other modules
+// The default value is 2.
+
+#if !defined(CGAL_INTERSECTION_VERSION)
+#define CGAL_INTERSECTION_VERSION 2
+#endif
+
+#if CGAL_INTERSECTION_VERSION < 2
+
+#define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2)
+#define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3)
+
+#else
+
+#define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2)                \
+  template<typename K>     \
+  struct Intersection_traits<K, typename K::A, typename K::B>  { \
+    typedef typename boost::variant<typename K::R1, typename K::R2 >    \
+                     variant_type;                                      \
+    typedef typename boost::optional< variant_type > result_type;       \
+  };  
+
+#define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3)            \
+  template<typename K>     \
+  struct Intersection_traits<K, typename K::A, typename K::B>  { \
+    typedef typename boost::variant<typename K::R1, typename K::R2,     \
+                                    typename K::R3> variant_type;       \
+    typedef typename boost::optional< variant_type > result_type;       \
+  };                                                                    
+
+#endif
+
+#define CGAL_INTERSECTION_FUNCTION(A, B, DIM)                           \
+  template<typename K>                                                  \
+  inline                                                                \
+  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::B)>::type \
+  intersection(const A<K>& a, const B<K>& b) {                          \
+    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }                                                                     \
+  template<typename K>                                                  \
+  inline                                                                \
+  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::B)>::type \
+  intersection(const B<K>& a, const A<K>& b) {                          \
+    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }
+
+#define CGAL_INTERSECTION_FUNCTION_SELF(A, DIM)                         \
+  template<typename K>                                                  \
+  inline                                                                \
+  typename cpp11::result_of<BOOST_PP_CAT(typename K::Intersect_, DIM)(typename K::A, typename K::A)>::type \
+  intersection(const A<K> & a, const A<K> & b) {                          \
+    return BOOST_PP_CAT(K().intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }
+
+#define CGAL_DO_INTERSECT_FUNCTION(A, B, DIM)              \
+  template<typename K>                                     \
+  inline bool                                              \
+  do_intersect(const A<K>& a, const B<K>& b) {             \
+    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }                                                        \
+  template<typename K>                                     \
+  inline bool                                              \
+  do_intersect(const B<K>& a, const A<K>& b) {             \
+    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }
+
+#define CGAL_DO_INTERSECT_FUNCTION_SELF(A, DIM)                         \
+  template<typename K>                                                  \
+  inline bool                                                           \
+  do_intersect(const A<K> & a, const A<K> & b) {                          \
+    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
+  }
+
+namespace CGAL {
+
+// only declarationn
+template<typename, typename, typename>
+struct Intersection_traits {
+  // This defaults to Object, if we use VERSION < 2 and do nothing
+  // otherwise.
+  #if CGAL_INTERSECTION_VERSION < 2
+  typedef CGAL::Object result_type;
+  #endif
+};
+
+
+// Alias that gets the Kernel automatically and does some error checking.
+// Including corresponding specialization for Bbox, as it has no Kernel.
+template<typename A, typename B>
+class IT : public Intersection_traits< typename Kernel_traits<A>::Kernel, A, B > {
+  typedef typename Kernel_traits<A>::Kernel A_Kernel;
+  typedef typename Kernel_traits<B>::Kernel B_Kernel;
+  // CGAL_static_assertion_msg( (boost::is_same< A_Kernel, B_Kernel>::value),
+  //                            "IT instantiated with objects from two different Kernels");
+};
+
+class Bbox_2;
+class Bbox_3;
+
+template<typename B>
+class IT<Bbox_2, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_2, B >
+{ };
+
+template<typename B>
+class IT<Bbox_3, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_3, B >
+{ };
+
+namespace internal {
+
+// this function is used to call either make_object or a
+// Intersection_traits::result_type constructor to create return
+// values. The Object version takes some dummy template arguments
+// that are needed for the return of the Intersection_traits. In
+// theory a one parameter variant could be returned, but this
+// _could_ come with conversion overhead and so we rather go for
+// the real type.
+// Overloads for empty returns are also provided.
+#if CGAL_INTERSECTION_VERSION < 2
+  #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+    template<typename, typename, typename, typename T>
+    inline
+    CGAL::Object intersection_return(const T& t) { return CGAL::make_object(t); }
+  #else
+    template<typename, typename, typename, typename T>
+    inline
+    CGAL::Object intersection_return(T&& t) { return CGAL::make_object(std::forward<T>(t)); }
+  #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
+  template<typename, typename, typename>
+  inline
+  CGAL::Object intersection_return() { return CGAL::Object(); }
+#else
+#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
+    template<typename F, typename A, typename B, typename T>
+    inline typename cpp11::result_of<F(A, B)>::type
+    intersection_return(const T& t) { return typename cpp11::result_of<F(A, B)>::type(t); }
+  #else
+    template<typename F, typename A, typename B, typename T>
+    inline typename cpp11::result_of<F(A, B)>::type
+    intersection_return(T&& t) { return typename cpp11::result_of<F(A, B)>::type(std::forward<T>(t)); }
+  #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
+  template<typename F, typename A, typename B>
+  inline typename cpp11::result_of<F(A, B)>::type
+  intersection_return() { return typename cpp11::result_of<F(A, B)>::type(); }
+#endif // CGAL_INTERSECTION_VERSION < 2
+
+// Something similar to wrap around boost::get and object_cast to
+// prevent ifdefing too much. Another way could be to introduce an
+// overload of boost::get for Object.  We only provide the pointer
+// casts here. But use references to const as parameters. This makes
+// it somewhat nicer.
+template<typename T>
+inline
+const T* intersect_get(const CGAL::Object& o) { 
+  return CGAL::object_cast<T>(&o);
+}
+
+template<typename T, BOOST_VARIANT_ENUM_PARAMS(typename U)>
+inline
+const T* intersect_get(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)> >& v) {
+  return boost::get<T>(&*v);
+}
+
+template<typename T, BOOST_VARIANT_ENUM_PARAMS(typename U)>
+inline
+const T* intersect_get(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)> & v) {
+  return boost::get<T>(&v);
+}
+
+template<typename A, typename B>
+typename cpp11::result_of<typename CGAL::Kernel_traits<A>::Kernel::Intersect_2(A, B)>::type
+intersection_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().intersect_2_object()(a, b);
+}
+
+template<typename A, typename B>
+typename cpp11::result_of<typename CGAL::Kernel_traits<A>::Kernel::Intersect_3(A, B)>::type
+intersection_impl(const A& a, const B& b, Dimension_tag<3>) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().intersect_3_object()(a, b);
+}
+
+template<typename A, typename B>
+typename Intersection_traits< typename CGAL::Kernel_traits<A>::Kernel, A, B>::result_type
+intersection_impl(const A& a, const B& b, Dynamic_dimension_tag) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().intersect_d_object()(a, b);
+}
+
+template<typename A, typename B>
+inline bool
+do_intersect_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().do_intersect_2_object()(a, b);
+}
+
+template<typename A, typename B>
+inline bool
+do_intersect_impl(const A& a, const B& b, Dimension_tag<3>) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().do_intersect_3_object()(a, b);
+}
+
+template<typename A, typename B>
+inline bool
+do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) {
+  typedef typename CGAL::Kernel_traits<A>::Kernel Kernel;
+  return Kernel().do_intersect_d_object()(a, b);
+}
+
+} // internal
+
+// See overloads in the respective header files
+
+// template<typename A, typename B>
+// inline
+// typename Intersection_traits< typename Kernel_traits<A>::Kernel, A, B>::result_type >::type
+// intersection(const A& a, const B& b) {
+//   CGAL_static_assertion_msg( (boost::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value),
+//                               "intersection with objects of different dimensions not supported");
+//   return internal::intersection_impl(a, b, typename A::Ambient_dimension());
+// }
+
+// template<typename A, typename B>
+// inline
+// bool
+// do_intersect(const A& a, const B& b) {
+//   CGAL_static_assertion_msg((boost::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value), 
+//                         "do_intersect with objects of different dimensions not supported");
+//   return internal::do_intersect_impl(a, b, typename A::Ambient_dimension());
+// }
+
+} // CGAL
+
+#endif /* CGAL_INTERSECTION_TRAITS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Intersection_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Intersection_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Intersection_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Intersection_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Intersection_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Intersection_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Intersection_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Intersection_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Intersections_3/intersection_3_1_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Intersections_3/intersection_3_1_impl.h
new file mode 100644
index 0000000..7a298ef
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Intersections_3/intersection_3_1_impl.h
@@ -0,0 +1,1722 @@
+// Copyright (c) 1997-2010
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman <geert at cs.uu.nl>
+//                 Sebastien Loriot <Sebastien.Loriot at geometryfactory.com>
+
+
+#include <CGAL/wmult.h>
+#include <boost/next_prior.hpp>
+#include <CGAL/Intersection_traits_3.h>
+
+namespace CGAL {
+
+  template <class K>
+  class Plane_3;
+
+  template <class K>
+  class Line_3;
+
+  template <class K>
+  class Segment_3;
+
+  template <class K>
+  class Ray_3;
+
+  template <class K>
+  class Sphere_3;
+
+  template <class K>
+  class Triangle_3;
+
+  template <class K>
+  class Iso_cuboid_3;
+
+// the special plane_3 function
+template <class K>
+inline 
+#if CGAL_INTERSECTION_VERSION < 2
+CGAL::Object
+#else
+typename cpp11::result_of<typename K::Intersect_3(typename K::Plane_3, typename K::Plane_3, typename K::Plane_3)>::type
+#endif
+intersection(const Plane_3<K> &plane1, const Plane_3<K> &plane2,
+             const Plane_3<K> &plane3)
+{
+  return K().intersect_3_object()(plane1, plane2, plane3);
+}
+
+CGAL_INTERSECTION_FUNCTION(Plane_3, Line_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Plane_3, Line_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Plane_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Line_3, 3)
+CGAL_DO_INTERSECT_FUNCTION_SELF(Line_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Segment_3, 3)
+CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Line_3, Segment_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Line_3, Segment_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Line_3, Ray_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Line_3, Ray_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Segment_3, Ray_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Segment_3, Ray_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Ray_3, 3)
+CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Plane_3, Sphere_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Plane_3, Sphere_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Sphere_3, 3)
+CGAL_DO_INTERSECT_FUNCTION_SELF(Sphere_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Plane_3, Ray_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Plane_3, Ray_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Plane_3, Segment_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Plane_3, Segment_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Plane_3, Triangle_3, 3)
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Line_3, Bbox_3)>::type
+intersection(const Line_3<K> &a,
+	     const Bbox_3 &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Line_3, Bbox_3)>::type
+intersection(const Bbox_3 &a,
+             const Line_3<K> &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Ray_3, Bbox_3)>::type
+intersection(const Ray_3<K> &a,
+	     const Bbox_3 &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Ray_3, Bbox_3)>::type
+intersection(const Bbox_3 &a,
+             const Ray_3<K> &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Segment_3, Bbox_3)>::type
+intersection(const Segment_3<K> &a,
+	     const Bbox_3 &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+template <class K>
+inline typename
+cpp11::result_of<typename K::Intersect_3(typename K::Segment_3, Bbox_3)>::type
+intersection(const Bbox_3 &a,
+             const Segment_3<K> &b) {
+  return K().intersect_3_object()(a, b);
+}
+
+CGAL_INTERSECTION_FUNCTION(Line_3, Iso_cuboid_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Ray_3, Iso_cuboid_3, 3)
+
+CGAL_INTERSECTION_FUNCTION(Segment_3, Iso_cuboid_3, 3)
+
+CGAL_INTERSECTION_FUNCTION_SELF(Iso_cuboid_3, 3)
+
+CGAL_DO_INTERSECT_FUNCTION_SELF(Plane_3, 3)
+
+template <class R>
+inline bool
+do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
+             const Plane_3<R> &plane3) {
+  return R().do_intersect_3_object()(plane1, plane2, plane3);
+}
+
+CGAL_DO_INTERSECT_FUNCTION_SELF(Iso_cuboid_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Line_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Ray_3, 3)
+CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Segment_3, 3)
+
+namespace internal {
+
+template <class K>
+typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
+intersection(const typename K::Plane_3  &plane, 
+	     const typename K::Line_3 &line, 
+	     const K& /*k*/)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Direction_3 Direction_3;
+    typedef typename K::RT RT;
+
+    const Point_3 &line_pt = line.point();
+    const Direction_3 &line_dir = line.direction();
+
+    RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy()
+           + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt);
+    RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy()
+           + plane.c()*line_dir.dz();
+    if (den == 0) {
+        if (num == 0) {
+            // all line
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>(line);
+        } else {
+            // no intersection
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>();
+        }
+    }
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Line_3>(Point_3(
+        den*line_pt.hx()-num*line_dir.dx(),
+        den*line_pt.hy()-num*line_dir.dy(),
+        den*line_pt.hz()-num*line_dir.dz(),
+        wmult_hw((K*)0, den, line_pt)));
+}
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
+intersection(const typename K::Line_3 &line, 
+	     const typename K::Plane_3  &plane, 
+	     const K& k)
+{
+  return intersection(plane, line, k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Plane_3, typename K::Plane_3>::result_type
+intersection(const typename K::Plane_3 &plane1, 
+	     const typename K::Plane_3 &plane2, 
+	     const K&)
+{
+  typedef typename K::Point_3 Point_3;
+  typedef typename K::Direction_3 Direction_3;
+  typedef typename K::Line_3 Line_3;
+
+    typedef typename K::RT RT;
+    const RT &a = plane1.a();
+    const RT &b = plane1.b();
+    const RT &c = plane1.c();
+    const RT &d = plane1.d();
+    const RT &p = plane2.a();
+    const RT &q = plane2.b();
+    const RT &r = plane2.c();
+    const RT &s = plane2.d();
+
+    RT det = a*q-p*b;
+    if (det != 0) {
+        Point_3 is_pt = Point_3(b*s-d*q, p*d-a*s, 0, det);
+        Direction_3 is_dir = Direction_3(b*r-c*q, p*c-a*r, det);
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
+    }
+    det = a*r-p*c;
+    if (det != 0) {
+        Point_3 is_pt = Point_3(c*s-d*r, 0, p*d-a*s, det);
+        Direction_3 is_dir = Direction_3(c*q-b*r, det, p*b-a*q);
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
+    }
+    det = b*r-c*q;
+    if (det != 0) {
+        Point_3 is_pt = Point_3(0, c*s-d*r, d*q-b*s, det);
+        Direction_3 is_dir = Direction_3(det, c*p-a*r, a*q-b*p);
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(Line_3(is_pt, is_dir));
+    }
+// degenerate case
+    if (a!=0 || p!=0) {
+        if (a*s == p*d)
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
+        else
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
+    }
+    if (b!=0 || q!=0) {
+        if (b*s == q*d)
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
+        else
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
+    }
+    if (c!=0 || r!=0) {
+        if (c*s == r*d)
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
+        else
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>();
+    }
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Plane_3>(plane1);
+}
+
+template <class K>
+#if CGAL_INTERSECTION_VERSION < 2
+CGAL::Object
+#else
+boost::optional< boost::variant<typename K::Point_3,
+                                typename K::Line_3,
+                                typename K::Plane_3> >
+#endif
+intersection(const typename K::Plane_3 &plane1,
+	     const typename K::Plane_3 &plane2,
+	     const typename K::Plane_3 &plane3,
+	     const K& k)
+{
+    #if CGAL_INTERSECTION_VERSION > 1
+    typedef 
+      typename boost::optional< 
+      boost::variant<typename K::Point_3,
+                     typename K::Line_3,
+                     typename K::Plane_3> > 
+    result_type;
+    #endif
+
+
+    typedef typename K::Point_3      Point_3;
+    typedef typename K::Line_3       Line_3;
+    typedef typename K::Plane_3      Plane_3;
+
+    // Intersection between plane1 and plane2 can either be
+    // a line, a plane, or empty.
+    typename Intersection_traits<K, Plane_3, Plane_3>::result_type
+      o12 = internal::intersection(plane1, plane2, k);
+    
+    if(o12) {
+      if(const Line_3* l = intersect_get<Line_3>(o12)) {
+        // either point or line
+        typename Intersection_traits<K, Plane_3, Line_3>::result_type 
+          v = internal::intersection(plane3, *l, k);
+        if(v) {
+          if(const Point_3* p = intersect_get<Point_3>(v))
+            #if CGAL_INTERSECTION_VERSION < 2
+            return make_object(*p);
+            #else
+            return result_type(*p);
+            #endif
+          else if(const Line_3* l = intersect_get<Line_3>(v))
+            #if CGAL_INTERSECTION_VERSION < 2
+            return make_object(*l);
+            #else
+            return result_type(*l);
+            #endif
+        }
+      } else if(const Plane_3 *pl = intersect_get<Plane_3>(o12)) {
+        // either line or plane
+        typename Intersection_traits<K, Plane_3, Plane_3>::result_type 
+          v = internal::intersection(plane3, *pl, k);
+        if(v) {
+          if(const Plane_3* p = intersect_get<Plane_3>(v))
+            #if CGAL_INTERSECTION_VERSION < 2
+            return make_object(*p);
+            #else
+            return result_type(*p);
+            #endif
+          else if(const Line_3* l = intersect_get<Line_3>(v))
+            #if CGAL_INTERSECTION_VERSION < 2
+            return make_object(*l);
+            #else
+            return result_type(*l);
+            #endif
+        }
+      }
+    }
+    
+    #if CGAL_INTERSECTION_VERSION < 2
+    return Object();
+    #else
+    return result_type();
+    #endif
+}
+
+
+template <class K>
+bool
+do_intersect(const typename K::Plane_3 &plane, 
+	     const typename K::Line_3 &line,
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Direction_3 Direction_3;
+    typedef typename K::RT RT;
+    const Point_3 &line_pt = line.point();
+    const Direction_3 &line_dir = line.direction();
+
+    RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy()
+           + plane.c()*line_dir.dz();
+    if (den != 0)
+        return true;
+    RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy()
+           + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt);
+    if (num == 0) {
+        // all line
+        return true;
+    } else {
+        // no intersection
+        return false;
+    }
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Line_3 &line, 
+	     const typename K::Plane_3 &plane, 
+	     const K& k)
+{
+  return do_intersect(plane, line, k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type
+intersection(const typename K::Line_3 &l1,
+	     const typename K::Line_3 &l2,
+	     const K&)
+{
+  typedef typename K::FT           FT;
+  typedef typename K::Point_3      Point_3;
+  typedef typename K::Vector_3     Vector_3;
+
+  if(K().has_on_3_object()(l1, l2.point())) {
+    const Vector_3& v1 = l1.to_vector();
+    const Vector_3& v2 = l2.to_vector();
+    if((v1.x() * v2.y() == v1.y() * v2.x()) &&
+       (v1.x() * v2.z() == v1.z() * v2.x()) &&
+       (v1.y() * v2.z() == v1.z() * v2.y()))
+      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>(l1);
+  }
+  
+  if(K().are_parallel_3_object()(l1,l2)) return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>();
+  const Point_3 &p1 = l1.point();
+  const Point_3 &p3 = l2.point();
+  const Vector_3 &v1 = l1.to_vector();
+  const Vector_3 &v2 = l2.to_vector();
+  const Point_3 p2 = p1 + v1;
+  const Point_3 p4 = p2 + v2;
+  if(!K().coplanar_3_object()(p1,p2,p3,p4)) return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>();
+  const Vector_3 v3 = p3 - p1;
+ const Vector_3 v3v2 = cross_product(v3,v2);
+  const Vector_3 v1v2 = cross_product(v1,v2);
+  const FT t = ((v3v2.x()*v1v2.x()) + (v3v2.y()*v1v2.y()) + (v3v2.z()*v1v2.z())) /
+               (v1v2.squared_length());
+  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Line_3>(p1 + (v1 * t));
+}
+
+template <class K>
+bool
+do_intersect(const typename K::Line_3 &l1,
+	     const typename K::Line_3 &l2,
+	     const K&)
+{
+  typedef typename K::Point_3      Point_3;
+  typedef typename K::Vector_3     Vector_3;
+
+  if(K().has_on_3_object()(l1, l2.point())) return true;
+  if(K().are_parallel_3_object()(l1,l2)) return false;
+  const Point_3 &p1 = l1.point();
+  const Point_3 &p3 = l2.point();
+  const Vector_3 &v1 = l1.to_vector();
+  const Vector_3 &v2 = l2.to_vector();
+  const Point_3 p2 = p1 + v1;
+  const Point_3 p4 = p2 + v2;
+  return K().coplanar_3_object()(p1,p2,p3,p4);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
+intersection_collinear_segments(const typename K::Segment_3 &s1,
+                                const typename K::Segment_3 &s2,
+                                const K& k)
+{
+  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
+
+  const typename K::Point_3& p=s1[0],q=s1[1],r=s2[0],s=s2[1];
+  typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
+  
+  if ( cln_order(p,r,q) ){
+    if ( cln_order(p,s,q) )
+      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s2);
+    if ( cln_order(r,p,s) ){
+      if (r!=p) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(r,p) );
+      if ( cln_order(r,q,s) ) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1);
+      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
+    }
+    return r!=q ? intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(r,q) ) 
+      : intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(q);
+  }
+
+  if ( cln_order(p,s,q) ){
+    if ( cln_order(r,p,s) ){
+      if (s!=p) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(s,p) );
+      if (cln_order(r,q,s)) return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1);  
+      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
+    }
+   return s!=q ? intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>( typename K::Segment_3(s,q) ) 
+     : intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(q);
+  }
+  
+  if ( cln_order(r,p,s) )
+    return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(s1); 
+  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
+}
+
+template<class K>
+struct L_p_visitor : public boost::static_visitor< 
+  typename Intersection_traits<K, typename K::Segment_3, 
+                               typename K::Segment_3>::result_type
+  > 
+{
+
+  typedef typename Intersection_traits<K, typename K::Segment_3, 
+                                         typename K::Segment_3>::result_type result_type;
+  L_p_visitor(const typename K::Segment_3& s1, const typename K::Segment_3& s2) :
+    s1(s1), s2(s2) { }
+  const typename K::Segment_3& s1;
+  const typename K::Segment_3& s2;
+
+  result_type
+  operator()(const typename K::Point_3& p) const {
+    typename K::Collinear_are_ordered_along_line_3 cln_order=K().collinear_are_ordered_along_line_3_object();
+    if ( cln_order(s1[0],p,s1[1]) && cln_order(s2[0],p,s2[1]) )
+      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>(p);
+    else
+      return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
+}
+
+  result_type
+  operator()(const typename K::Line_3&) const {
+    return intersection_collinear_segments(s1,s2,K());
+  }
+};
+
+template <class K>
+typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
+intersection(const typename K::Segment_3 &s1,
+	     const typename K::Segment_3 &s2,
+	     const K&)
+{
+  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
+
+  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
+    v = internal::intersection(s1.supporting_line(),s2.supporting_line(), K());
+
+  if(v) {
+    #if CGAL_INTERSECTION_VERSION < 2
+    // abuse the visitor to do the visitation manually
+    L_p_visitor<K> visitor(s1, s2);
+    if(const typename K::Point_3* p = object_cast<typename K::Point_3>(&v))
+      return visitor(*p);
+    if(const typename K::Line_3* l = object_cast<typename K::Line_3>(&v))
+      return visitor(*l);
+    #else
+    return apply_visitor(L_p_visitor<K>(s1, s2) , *v);
+    #endif
+  }
+  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Segment_3>();
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Segment_3  &s1,
+             const typename K::Segment_3  &s2,
+             const K & k)
+{
+  CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
+  bool b=do_intersect(s1.supporting_line(),s2.supporting_line(),k);
+  if (b)
+  {
+    //supporting_line intersects: points are coplanar
+    typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object();
+    ::CGAL::Orientation or1 =  cpl_orient(s1[0],s1[1],s2[0]);
+    ::CGAL::Orientation or2 =  cpl_orient(s1[0],s1[1],s2[1]);
+    
+    if ( or1 == COLLINEAR && or2 ==COLLINEAR )
+    {
+      //segments are collinear
+      typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
+      return cln_order(s1[0],s2[0],s1[1]) || 
+             cln_order(s1[0],s2[1],s1[1]) ||
+             cln_order(s2[0],s1[0],s2[1]) ;
+    }
+    
+    if ( or1 != or2 ){
+      or1=cpl_orient(s2[0],s2[1],s1[0]);
+      return (or1 == COLLINEAR || or1 != cpl_orient(s2[0],s2[1],s1[1]));
+    }
+  }
+  return false;
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
+intersection(const typename K::Line_3 &l,
+	     const typename K::Segment_3 &s,
+	     const K& k)
+{
+  CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
+  
+  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
+    v = internal::intersection(l,s.supporting_line(), K());
+
+  if(v) {
+    if(const typename K::Point_3* p = intersect_get<typename K::Point_3> (v)) {
+    typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object();
+      if(cln_order(s[0],*p,s[1])) 
+        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>(*p);
+    } else {
+      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>(s);
+  }
+  }
+  
+  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Segment_3>();
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
+intersection(const typename K::Segment_3 &s,
+	     const typename K::Line_3 &l,
+	     const K& k)
+{
+  return intersection(l,s,k);
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Line_3  &l,
+             const typename K::Segment_3  &s,
+             const K & k)
+{
+  CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
+  bool b=do_intersect(l,s.supporting_line(),k);
+  if (b)
+  {
+    //supporting_line intersects: points are coplanar
+    typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object();
+    typename K::Point_3 p1=l.point(0);
+    typename K::Point_3 p2=l.point(1);
+    ::CGAL::Orientation or1 =  cpl_orient(p1,p2,s[0]);
+       
+    if ( or1 == COLLINEAR ) return true;
+    
+    ::CGAL::Orientation or2 =  cpl_orient(p1,p2,s[1]);
+    return or1!=or2;
+  }
+  return false;
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Segment_3  &s,
+             const typename K::Line_3  &l,
+             const K & k)
+{
+  return do_intersect(l,s,k);
+}
+
+template <class K>
+bool
+Ray_3_has_on_collinear_Point_3(
+            const typename K::Ray_3 &r,
+	    const typename K::Point_3 &p,
+	    const K& k)
+{
+  return
+      k.equal_3_object()(r.source(),p)
+    ||
+      k.equal_3_object() (
+        k.construct_direction_3_object()( k.construct_vector_3_object() (r.source(),p) ),
+        r.direction()
+      );
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type
+intersection(const typename K::Line_3 &l,
+	     const typename K::Ray_3 &r,
+	     const K& k)
+{
+  CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
+
+  typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type 
+    v = internal::intersection(l,r.supporting_line(), k);
+  
+  if(v) {
+    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
+      if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) 
+        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>(*p);
+    } else if(intersect_get<typename K::Line_3>(v)) {
+      return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>(r);
+  }
+  }
+  return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Ray_3>();
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Ray_3, typename K::Line_3>::result_type
+intersection(const typename K::Ray_3 &r,
+	     const typename K::Line_3 &l,
+	     const K& k)
+{
+  return intersection(l,r,k);
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Line_3  &l,
+             const typename K::Ray_3  &r,
+             const K & k)
+{
+  CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
+  if ( !do_intersect(l,r.supporting_line()) ) return false;
+  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
+  Orientation p0p1s=pred(l.point(0),l.point(1),r.source());
+  if ( p0p1s == COLLINEAR) return true;
+  Orientation stp0 =pred(r.source(),r.second_point(),l.point(0));
+  if ( stp0 == COLLINEAR )
+    return Ray_3_has_on_collinear_Point_3(r,l.point(0),k);
+  return p0p1s!=stp0;
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Ray_3  &r,
+             const typename K::Line_3  &l,
+             const K & k)
+{
+  return do_intersect(l,r,k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Segment_3, typename K::Ray_3>::result_type
+intersection(const typename K::Segment_3 &s,
+	     const typename K::Ray_3 &r,
+	     const K& k)
+{
+  CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
+
+  typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type 
+    v = internal::intersection(r.supporting_line(),s, K());
+
+  if(v) {
+    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
+      if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) 
+        return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(*p);
+    } else if(const typename K::Segment_3* s2 = intersect_get<typename K::Segment_3>(v)) {
+      bool has_source=Ray_3_has_on_collinear_Point_3(r,s.source(),k);
+      bool has_target=Ray_3_has_on_collinear_Point_3(r,s.target(),k);
+      if (has_source){
+        if (has_target)
+          return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(*s2);
+        else
+        {
+          if (k.equal_3_object() (r.source(),s.source()))
+            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(r.source());
+          else
+            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(
+              k.construct_segment_3_object()(r.source(),s.source()));
+        }
+      }
+      else{
+        if (has_target){
+          if (k.equal_3_object() (r.source(),s.target()))
+            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(r.source());          
+          else
+            return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>(
+              k.construct_segment_3_object()(r.source(),s.target()));
+        }
+      }
+    }
+  }
+
+  return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Ray_3>();
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Ray_3, typename K::Segment_3>::result_type
+intersection(const typename K::Ray_3 &r,
+	     const typename K::Segment_3 &s,
+	     const K& k)
+{
+  return intersection(s,r,k);
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Segment_3  &s,
+             const typename K::Ray_3  &r,
+             const K & k)
+{
+  CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
+  if ( !do_intersect(s,r.supporting_line()) ) return false;
+  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
+  Orientation p0p1s=pred(s.point(0),s.point(1),r.source());
+  Orientation stp0 =pred(r.source(),r.second_point(),s.point(0));
+  if ( p0p1s == COLLINEAR) //s belongs to the supporting line of p0p1
+  {
+    if ( stp0 == COLLINEAR )//st and p0p1 have the same supporting line
+      return Ray_3_has_on_collinear_Point_3(r,s.point(0),k) || Ray_3_has_on_collinear_Point_3(r,s.point(1),k);
+    else
+      return true;
+  }
+  if ( stp0 == COLLINEAR )
+    return Ray_3_has_on_collinear_Point_3(r,s.point(0),k);
+  return p0p1s!=stp0;
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Ray_3  &r,
+             const typename K::Segment_3  &s,
+             const K & k)
+{
+  return do_intersect(s,r,k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Ray_3, typename K::Ray_3>::result_type
+intersection(const typename K::Ray_3 &r1,
+	     const typename K::Ray_3 &r2,
+	     const K& k)
+{
+  CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
+
+  typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type 
+    v = internal::intersection(r1.supporting_line(),r2, k);
+
+  if(v) {
+    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v)) {
+      if(Ray_3_has_on_collinear_Point_3(r1,*p,k)) 
+        return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(*p);
+    } else if(const typename K::Ray_3* r = intersect_get<typename K::Ray_3>(v)) {
+      bool r1_has_s2=Ray_3_has_on_collinear_Point_3(r1,r2.source(),k);
+      bool r2_has_s1=Ray_3_has_on_collinear_Point_3(r2,r1.source(),k);
+      if (r1_has_s2){
+        if (r2_has_s1)
+        {
+          if (k.equal_3_object()(r1.source(),r2.source()))
+            return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(r1.source());
+          else {
+            return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(
+              k.construct_segment_3_object()(r1.source(),r2.source()));          
+          }
+        }
+        else
+          return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(*r);
+      }
+      else{
+        if (r2_has_s1)
+          return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>(r1);
+      }
+    }
+  }
+  return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Ray_3>();
+
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Ray_3  &r1,
+             const typename K::Ray_3  &r2,
+             const K & k)
+{
+  CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
+  if ( !do_intersect(r1,r2.supporting_line()) ) return false;
+  typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object();
+  Orientation p0p1s=pred(r1.point(0),r1.point(1),r2.source());
+  Orientation stp0 =pred(r2.source(),r2.second_point(),r1.point(0));
+  
+  if ( p0p1s == COLLINEAR){
+    if(stp0 == COLLINEAR ) 
+      return  Ray_3_has_on_collinear_Point_3(r2,r1.source(),k) ||
+              Ray_3_has_on_collinear_Point_3(r1,r2.source(),k);
+    else
+      return true;
+  }
+  if(stp0 == COLLINEAR )
+    return Ray_3_has_on_collinear_Point_3(r2,r1.point(0),k);
+  return p0p1s!=stp0;
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Plane_3, typename K::Sphere_3>::result_type
+intersection(const typename K::Plane_3 &p,
+             const typename K::Sphere_3 &s,
+             const K&)
+{
+  typedef typename K::Circle_3 Circle_3;
+  typedef typename K::Point_3 Point_3;
+  typedef typename K::FT FT;
+  const FT d2 = CGAL::square(p.a()*s.center().x() + 
+                             p.b()*s.center().y() + 
+                             p.c()*s.center().z() + p.d()) /
+      (square(p.a()) + square(p.b()) + square(p.c()));
+  const FT cmp = d2 - s.squared_radius();
+  if(CGAL_NTS is_zero(cmp)) { // tangent
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>(p.projection(s.center()));
+  } else if(CGAL_NTS is_negative(cmp)) { // intersect
+    Point_3 center = p.projection(s.center());
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>(Circle_3(center,s.squared_radius() - d2,p));
+  } // do not intersect
+  return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Sphere_3>();
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Plane_3 &p,
+             const typename K::Sphere_3 &s,
+             const K&)
+{
+  typedef typename K::FT FT;
+  const FT d2 = CGAL::square(p.a()*s.center().x() + 
+                             p.b()*s.center().y() + 
+                             p.c()*s.center().z() + p.d()) /
+      (square(p.a()) + square(p.b()) + square(p.c()));
+  return d2 <= s.squared_radius();
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Sphere_3 &s,
+             const typename K::Plane_3 &p,
+             const K&)
+{
+  return do_intersect(p,s);
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Sphere_3, typename K::Plane_3>::result_type
+intersection(const typename K::Sphere_3 &s,
+             const typename K::Plane_3 &p,
+             const K& k)
+{
+  return intersection(p, s, k);
+}
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Sphere_3, typename K::Sphere_3>::result_type
+intersection(const typename K::Sphere_3 &s1,
+             const typename K::Sphere_3 &s2,
+             const K& k)
+{
+  typedef typename K::Plane_3 Plane_3;
+  if(s1.center() == s2.center()) {
+    if(s1.squared_radius() == s2.squared_radius()) {
+      if(is_zero(s1.squared_radius())) return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(s1.center());
+      else return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(s1);
+    } else return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>();  // cocentrics
+  }
+  Plane_3 p = K().construct_radical_plane_3_object()(s1,s2);
+  
+  
+  typename Intersection_traits<K, typename K::Sphere_3, typename K::Plane_3>::result_type 
+    v = intersection(p, s1, k);
+
+
+  if(v) {
+    if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
+      return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(*p);
+    else if(const typename K::Circle_3* c = intersect_get<typename K::Circle_3>(v))
+      return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>(*c);
+  }
+
+  return intersection_return<typename K::Intersect_3, typename K::Sphere_3, typename K::Sphere_3>();
+}
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Sphere_3 &s1,
+             const typename K::Sphere_3 &s2,
+             const K& k)
+{
+  typedef typename K::Plane_3 Plane_3;
+  if(s1.center() == s2.center()) {
+    return s1.squared_radius() == s2.squared_radius();
+  }
+  Plane_3 p = K().construct_radical_plane_3_object()(s1,s2);
+  return do_intersect(p, s1, k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Plane_3, typename K::Ray_3>::result_type
+intersection(const typename K::Plane_3 &plane, 
+	     const typename K::Ray_3 &ray, 
+	     const K& k)
+{
+    typedef typename K::Point_3 Point_3;
+
+    typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type 
+      v = internal::intersection(plane, ray.supporting_line(), k);
+
+    if(v) {
+      if(const Point_3* p = intersect_get<Point_3>(v)) {
+        if (ray.collinear_has_on(*p))
+          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>(*p);
+        else
+          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>();
+    }
+    } else {
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>();
+    }
+
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Ray_3>(ray);
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Ray_3, typename K::Plane_3>::result_type
+intersection(const typename K::Ray_3 &ray, 
+	     const typename K::Plane_3 &plane, 
+	     const K& k)
+{
+  return intersection(plane, ray, k);
+}
+
+
+
+template <class K>
+bool
+do_intersect(const typename K::Plane_3 &plane, 
+	     const typename K::Ray_3 &ray, 
+	     const K& k)
+{
+    typedef typename K::Point_3 Point_3;
+    
+    typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>
+      ::result_type 
+      line_intersection = internal::intersection(plane, ray.supporting_line(), k);
+
+    if(!line_intersection)
+        return false;
+    if(const Point_3 *isp = intersect_get<Point_3>(line_intersection))
+        return ray.collinear_has_on(*isp);
+    
+    return true;
+}
+
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Ray_3 &ray, 
+	     const typename K::Plane_3 &plane, 
+	     const K& k)
+{
+  return do_intersect(plane, ray, k);
+}
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Plane_3, typename K::Segment_3>::result_type
+intersection(const typename K::Plane_3 &plane, 
+	     const typename K::Segment_3 &seg, 
+	     const K& k)
+{
+    typedef typename K::Point_3 Point_3;
+    const Point_3 &source = seg.source();
+    const Point_3 &target = seg.target();
+
+    Oriented_side source_side = plane.oriented_side(source);
+    Oriented_side target_side = plane.oriented_side(target);
+
+    switch (source_side) {
+    case ON_ORIENTED_BOUNDARY:
+        if (target_side == ON_ORIENTED_BOUNDARY)
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
+        else
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(source);
+    case ON_POSITIVE_SIDE:
+        switch (target_side) {
+        case ON_ORIENTED_BOUNDARY:
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(target);
+        case ON_POSITIVE_SIDE:
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
+        case ON_NEGATIVE_SIDE:
+          { 
+            // intersection object should be a point, but rounding errors 
+            // could lead to a line. In such case, return seg.
+            typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
+              v = internal::intersection(plane, seg.supporting_line(), k);
+            if(v) {
+              if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
+                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(*p);
+            else
+                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
+            }
+          }
+        }
+    case ON_NEGATIVE_SIDE:
+        switch (target_side) {
+        case ON_ORIENTED_BOUNDARY:
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(target);
+        case ON_POSITIVE_SIDE:
+          { 
+            // intersection object should be a point, but rounding errors 
+            // could lead to a line. In such case, return seg.
+            typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
+              v = internal::intersection(plane, seg.supporting_line(), k);
+            if(v) {
+              if(const typename K::Point_3* p = intersect_get<typename K::Point_3>(v))
+                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(*p);
+            else 
+                return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>(seg);
+            }
+          }
+        case ON_NEGATIVE_SIDE:
+            return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
+        }
+    }
+    CGAL_kernel_assertion_msg(false, "Supposedly unreachable code.");
+    return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Segment_3>();
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Segment_3, typename K::Plane_3>::result_type
+intersection(const typename K::Segment_3 &seg, 
+	     const typename K::Plane_3 &plane, 
+	     const K& k)
+{
+  return intersection(plane, seg, k);
+}
+
+
+template <class K>
+bool
+do_intersect(const typename K::Plane_3  &plane, 
+	     const typename K::Segment_3 &seg, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    const Point_3 &source = seg.source();
+    const Point_3 &target = seg.target();
+
+    Oriented_side source_side = plane.oriented_side(source);
+    Oriented_side target_side = plane.oriented_side(target);
+
+    if ( source_side == target_side
+       && target_side != ON_ORIENTED_BOUNDARY) {
+        return false;
+    }
+    return true;
+}
+
+
+template <class K>
+inline
+bool
+do_intersect(const typename K::Segment_3 &seg, 
+	     const typename K::Plane_3  &plane, 
+	     const K& k)
+{
+  return do_intersect(plane, seg, k);
+}
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Plane_3, typename K::Triangle_3>::result_type
+intersection(const typename K::Plane_3 &plane, 
+	     const typename K::Triangle_3 &tri, 
+	     const K& k)
+{
+  typedef 
+  typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type 
+  pl_res;
+
+  typename K::Construct_vertex_3 vertex_on =
+    k.construct_vertex_3_object();
+  
+  Oriented_side or0=plane.oriented_side(vertex_on(tri,0));
+  Oriented_side or1=plane.oriented_side(vertex_on(tri,1));
+  Oriented_side or2=plane.oriented_side(vertex_on(tri,2));
+  
+  if (or0==ON_ORIENTED_BOUNDARY){
+    if (or1==ON_ORIENTED_BOUNDARY){
+      if (or2==ON_ORIENTED_BOUNDARY) 
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri);
+      else 
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                   (tri.vertex(0),tri.vertex(1)));
+    }
+    else{
+      if (or2==ON_ORIENTED_BOUNDARY)
+        return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                   (tri.vertex(0),tri.vertex(2)));
+      else{
+        if (or1==or2)
+          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(0));
+        else{
+          pl_res v = internal::intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k);
+          const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
+          CGAL_kernel_assertion(p!=NULL);
+          return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                     (*p,tri.vertex(0)));
+        }
+      }
+    }
+  }
+
+  if (or1==ON_ORIENTED_BOUNDARY){
+    if (or2==ON_ORIENTED_BOUNDARY)
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                 (tri.vertex(1),tri.vertex(2)));
+    if (or2==or0)
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(1));
+    else{
+      pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k);
+      const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
+      CGAL_kernel_assertion(p!=NULL);
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                 (*p,tri.vertex(1)));      
+    }
+  }
+  
+  if (or2==ON_ORIENTED_BOUNDARY){
+    if (or1==or0)
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(tri.vertex(2));
+    else{
+      pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k);
+      const typename K::Point_3* p = intersect_get<typename K::Point_3>(v);
+      CGAL_kernel_assertion(p!=NULL);
+      return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>(k.construct_segment_3_object()
+                                                                                 (*p,tri.vertex(2)));      
+    }
+  }
+  
+  //triangle vertices are not in the plane
+  std::vector<typename K::Point_3> pts;
+  pts.reserve(2);
+  if (or0!=or1){
+    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k);
+    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
+    CGAL_kernel_assertion( pt_ptr!=NULL );    
+    pts.push_back( *pt_ptr );
+  }
+  if (or0!=or2){
+    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k);
+    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
+    CGAL_kernel_assertion( pt_ptr!=NULL );    
+    pts.push_back( *pt_ptr );    
+  }
+  if (or1!=or2){
+    pl_res v = intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k);
+    const typename K::Point_3* pt_ptr = intersect_get<typename K::Point_3>(v);
+    CGAL_kernel_assertion( pt_ptr!=NULL );    
+    pts.push_back( *pt_ptr );
+  }
+  
+  if (pts.empty()) return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>();
+  
+  CGAL_kernel_assertion(pts.size()==2);
+  
+  return intersection_return<typename K::Intersect_3, typename K::Plane_3, typename K::Triangle_3>( k.construct_segment_3_object()
+                                                                              (*pts.begin(),*boost::prior(pts.end())) );
+}
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Triangle_3, typename K::Plane_3>::result_type
+intersection(const typename K::Triangle_3 &triangle,
+	     const typename K::Plane_3  &plane,
+	     const K& k)
+{
+  return intersection(plane, triangle, k);
+}
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
+intersection(const typename K::Line_3 &line,
+	     const Bbox_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Direction_3 Direction_3;
+    const Point_3 &linepoint = line.point();
+    const Direction_3 &linedir = line.direction();
+    return intersection_bl<K>(box,
+        CGAL::to_double(linepoint.x()),
+        CGAL::to_double(linepoint.y()),
+        CGAL::to_double(linepoint.z()),
+        CGAL::to_double(linedir.dx()),
+        CGAL::to_double(linedir.dy()),
+        CGAL::to_double(linedir.dz()),
+        true, true
+        );
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, Bbox_3, typename K::Line_3>::result_type
+intersection(const Bbox_3 &box, 
+	     const typename K::Line_3 &line, 
+	     const K& k)
+{
+  return intersection(line, box, k);
+}
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
+intersection(const typename K::Ray_3 &ray,
+	     const Bbox_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Direction_3 Direction_3;
+    const Point_3 &linepoint = ray.source();
+    const Direction_3 &linedir = ray.direction();
+    return intersection_bl<K>(box,
+        CGAL::to_double(linepoint.x()),
+        CGAL::to_double(linepoint.y()),
+        CGAL::to_double(linepoint.z()),
+        CGAL::to_double(linedir.dx()),
+        CGAL::to_double(linedir.dy()),
+        CGAL::to_double(linedir.dz()),
+        false, true
+        );
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, Bbox_3, typename K::Ray_3>::result_type
+intersection(const Bbox_3 &box, 
+	     const typename K::Ray_3 &ray, 
+	     const K& k)
+{
+  return intersection(ray, box, k);
+}
+
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
+intersection(const typename K::Segment_3 &seg, 
+	     const Bbox_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Vector_3 Vector_3;
+    const Point_3 &linepoint = seg.source();
+    const Vector_3 &diffvec = seg.target()-linepoint;
+    return intersection_bl<K>(box,
+        CGAL::to_double(linepoint.x()),
+        CGAL::to_double(linepoint.y()),
+        CGAL::to_double(linepoint.z()),
+        CGAL::to_double(diffvec.x()),
+        CGAL::to_double(diffvec.y()),
+        CGAL::to_double(diffvec.z()),
+        false, false
+        );
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, Bbox_3, typename K::Segment_3>::result_type
+intersection(const Bbox_3 &box, 
+	     const typename K::Segment_3 &seg, 
+	     const K& k)
+{
+  return intersection(seg, box, k);
+}
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Line_3, typename K::Iso_cuboid_3>::result_type
+intersection(const typename K::Line_3 &line,
+	     const typename K::Iso_cuboid_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Vector_3 Vector_3;
+    typedef typename K::Segment_3 Segment_3;
+    typedef typename K::FT FT;
+    bool all_values = true;
+    FT _min = 0, _max = 0; // initialization to stop compiler warning
+    Point_3 const & _ref_point=line.point();
+    Vector_3 const & _dir=line.direction().vector();
+    Point_3 const & _iso_min=(box.min)();
+    Point_3 const & _iso_max=(box.max)();
+    for (int i=0; i< _ref_point.dimension(); i++) {
+        if (_dir.homogeneous(i) == 0) {
+            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
+            }
+            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
+            }
+        } else {
+            FT newmin, newmax;
+            if (_dir.homogeneous(i) > 0) {
+                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            } else {
+                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            }
+            if (all_values) {
+                _min = newmin;
+                _max = newmax;
+            } else {
+                if (newmin > _min)
+                    _min = newmin;
+                if (newmax < _max)
+                    _max = newmax;
+                if (_max < _min) {
+                    return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>();
+                }
+            }
+            all_values = false;
+        }
+    }
+    CGAL_kernel_assertion(!all_values);
+    if (_max == _min) {
+        return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
+    }
+    return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Iso_cuboid_3>(
+        Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Line_3>::result_type
+intersection(const typename K::Iso_cuboid_3 &box, 
+	     const typename K::Line_3 &line, 
+	     const K& k)
+{
+  return intersection(line, box, k);
+}
+
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Ray_3, typename K::Iso_cuboid_3>::result_type
+intersection(const typename K::Ray_3 &ray,
+	     const typename K::Iso_cuboid_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Vector_3 Vector_3;
+    typedef typename K::Segment_3 Segment_3;
+    typedef typename K::FT FT;
+    bool all_values = true;
+    FT _min = 0, _max = 0; // initialization to prevent compiler warning
+    Point_3 const & _ref_point=ray.source();
+    Vector_3 const & _dir=ray.direction().vector();
+    Point_3 const & _iso_min=(box.min)();
+    Point_3 const & _iso_max=(box.max)();
+
+    for (int i=0; i< _ref_point.dimension(); i++) {
+        if (_dir.homogeneous(i) == 0) {
+            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
+            }
+            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
+            }
+        } else {
+            FT newmin, newmax;
+            if (_dir.homogeneous(i) > 0) {
+                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            } else {
+                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            }
+            if (all_values) {
+                _max = newmax;
+            } else {
+                if (newmax < _max)
+                    _max = newmax;
+            }
+            if (newmin > _min)
+                 _min = newmin;
+            if (_max < _min)
+                return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>();
+            all_values = false;
+        }
+    }
+    CGAL_kernel_assertion(!all_values);
+    if (_max == _min) {
+        return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
+    }
+    return intersection_return<typename K::Intersect_3, typename K::Ray_3, typename K::Iso_cuboid_3>(
+        Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Ray_3>::result_type
+intersection(const typename K::Iso_cuboid_3 &box, 
+	     const typename K::Ray_3 &ray,
+	     const K& k)
+{
+  return intersection(ray, box, k);
+}
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Segment_3, typename K::Iso_cuboid_3>::result_type
+intersection(const typename K::Segment_3 &seg,
+	     const typename K::Iso_cuboid_3 &box, 
+	     const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Vector_3 Vector_3;
+    typedef typename K::Segment_3 Segment_3;
+    typedef typename K::FT FT;
+    FT _min = 0, _max;
+
+    Point_3 const & _ref_point=seg.source();
+    Vector_3 const & _dir=seg.direction().vector();
+    Point_3 const & _iso_min=(box.min)();
+    Point_3 const & _iso_max=(box.max)();
+    int main_dir =
+        (CGAL_NTS abs(_dir.x()) > CGAL_NTS abs(_dir.y()) )
+            ? (CGAL_NTS abs(_dir.x()) > CGAL_NTS abs(_dir.z()) ? 0 : 2)
+            : (CGAL_NTS abs(_dir.y()) > CGAL_NTS abs(_dir.z()) ? 1 : 2);
+    _max = (seg.target().cartesian(main_dir)-_ref_point.cartesian(main_dir)) /
+            _dir.cartesian(main_dir);
+
+    for (int i=0; i< _ref_point.dimension(); i++) {
+        if (_dir.homogeneous(i) == 0) {
+            if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
+            }
+            if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) {
+                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
+            }
+        } else {
+            FT newmin, newmax;
+            if (_dir.homogeneous(i) > 0) {
+                newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            } else {
+                newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+                newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) /
+                    _dir.cartesian(i);
+            }
+            if (newmax < _max)
+                _max = newmax;
+            if (newmin > _min)
+                 _min = newmin;
+            if (_max < _min)
+                return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>();
+        }
+    }
+    if (_max == _min) {
+        return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>(Point_3(_ref_point + _dir * _min ));
+    }
+   
+    return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Iso_cuboid_3>(
+            Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max));
+}
+
+
+template <class K>
+inline
+typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Segment_3>::result_type
+intersection(const typename K::Iso_cuboid_3 &box, 
+	     const typename K::Segment_3 &seg,
+	     const K& k)
+{
+  return intersection(seg, box, k);
+}
+
+
+template <class K>
+typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>::result_type
+intersection(
+    const typename K::Iso_cuboid_3 &icub1,
+    const typename K::Iso_cuboid_3 &icub2, 
+    const K&)
+{
+    typedef typename K::Point_3 Point_3;
+    typedef typename K::Iso_cuboid_3 Iso_cuboid_3;
+
+    Point_3 min_points[2];
+    Point_3 max_points[2];
+    min_points[0] = (icub1.min)();
+    min_points[1] = (icub2.min)();
+    max_points[0] = (icub1.max)();
+    max_points[1] = (icub2.max)();
+    const int DIM = 3;
+    int min_idx[DIM];
+    int max_idx[DIM];
+    Point_3 newmin;
+    Point_3 newmax;
+    for (int dim = 0; dim < DIM; ++dim) {
+        min_idx[dim] =
+          min_points[0].cartesian(dim) >= min_points[1].cartesian(dim) ? 0 : 1;
+        max_idx[dim] =
+          max_points[0].cartesian(dim) <= max_points[1].cartesian(dim) ? 0 : 1;
+        if (min_idx[dim] != max_idx[dim]
+                && max_points[max_idx[dim]].cartesian(dim)
+                   < min_points[min_idx[dim]].cartesian(dim))
+            return intersection_return<typename K::Intersect_3, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>();
+    }
+    if (min_idx[0] == min_idx[1] && min_idx[0] == min_idx[2]) {
+        newmin = min_points[min_idx[0]];
+    } else {
+        newmin = Point_3(
+            min_idx[0] == 0
+                ? wmult_hw((K*)0, min_points[0].hx(), min_points[1])
+                : wmult_hw((K*)0, min_points[1].hx(), min_points[0])
+            ,
+            min_idx[1] == 0
+                ? wmult_hw((K*)0, min_points[0].hy(), min_points[1])
+                : wmult_hw((K*)0, min_points[1].hy(), min_points[0])
+            ,
+            min_idx[2] == 0
+                ? wmult_hw((K*)0, min_points[0].hz(), min_points[1])
+                : wmult_hw((K*)0, min_points[1].hz(), min_points[0])
+            ,
+            wmult_hw((K*)0, min_points[0].hw(), min_points[1]) );
+    }
+    if (max_idx[0] == max_idx[1] && max_idx[0] == max_idx[2]) {
+        newmax = max_points[max_idx[0]];
+    } else {
+        newmax = Point_3(
+            max_idx[0] == 0
+                ? wmult_hw((K*)0, max_points[0].hx(), max_points[1])
+                : wmult_hw((K*)0, max_points[1].hx(), max_points[0])
+            ,
+            max_idx[1] == 0
+                ? wmult_hw((K*)0, max_points[0].hy(), max_points[1])
+                : wmult_hw((K*)0, max_points[1].hy(), max_points[0])
+            ,
+            max_idx[2] == 0
+                ? wmult_hw((K*)0, max_points[0].hz(), max_points[1])
+                : wmult_hw((K*)0, max_points[1].hz(), max_points[0])
+            ,
+            wmult_hw((K*)0, max_points[0].hw(), max_points[1]) );
+    }
+    return intersection_return<typename K::Intersect_3, typename K::Iso_cuboid_3, typename K::Iso_cuboid_3>(Iso_cuboid_3(newmin, newmax));
+}
+
+template <class R>
+inline bool
+do_intersect(const Plane_3<R>& plane1, const Plane_3<R>& plane2, const R&)
+{
+  return bool(intersection(plane1, plane2));
+}
+
+
+template <class R>
+inline bool
+do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
+             const Plane_3<R> &plane3, const R&)
+{
+  return bool(intersection(plane1, plane2, plane3));
+}
+
+
+template <class R>
+inline bool
+do_intersect(const Iso_cuboid_3<R> &i, const Iso_cuboid_3<R> &j, const R&)
+{
+  return bool(CGAL::intersection(i, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Line_3<R> &l, const Iso_cuboid_3<R> &j, const R&)
+{
+  return bool(CGAL::intersection(l, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Iso_cuboid_3<R> &j, const Line_3<R> &l, const R&)
+{
+  return bool(CGAL::intersection(l, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Ray_3<R> &r, const Iso_cuboid_3<R> &j, const R&)
+{
+  return bool(CGAL::intersection(r, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Iso_cuboid_3<R> &j, const Ray_3<R> &r, const R&)
+{
+  return bool(CGAL::intersection(r, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Segment_3<R> &s, const Iso_cuboid_3<R> &j, const R&)
+{
+  return bool(CGAL::intersection(s, j));
+}
+
+template <class R>
+inline bool
+do_intersect(const Iso_cuboid_3<R> &j, const Segment_3<R> &s, const R&)
+{
+  return bool(CGAL::intersection(s, j));
+}
+
+} // namespace internal
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interval_arithmetic.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_arithmetic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interval_arithmetic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interval_arithmetic.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Interval_arithmetic_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_arithmetic_impl.h
new file mode 100644
index 0000000..1d0ed47
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Interval_arithmetic_impl.h
@@ -0,0 +1,72 @@
+// Copyright (c) 1999-2004
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sylvain Pion
+
+namespace CGAL {
+
+#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG
+// For compilers which bug on denormalized values at compile time.
+// We generate CGAL_IA_MIN_DOUBLE at run time.
+namespace {
+double init_min_double()
+{
+    double d = 1;
+    double e = 1;
+    do {
+	d = e;
+	e = CGAL_IA_FORCE_TO_DOUBLE(e/2);
+    } while (e != 0);
+    return d;
+}
+} // anonymous namespace
+
+#ifndef CGAL_HEADER_ONLY
+
+namespace internal {
+double minimin = init_min_double();
+}
+
+#else // CGAL_HEADER_ONLY
+
+namespace internal {
+  double& get_static_minimin()
+  {
+    static double minimin = init_min_double();
+    return minimin;
+  }
+}
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_CFG_DENORMALS_COMPILE_BUG
+
+#ifndef CGAL_HEADER_ONLY
+
+#ifdef _MSC_VER
+namespace {
+int dummy_symbol_for_stopping_VC_linker_warning;
+} // namespace
+#endif
+
+#endif // CGAL_HEADER_ONLY
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interval_nt.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_nt.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interval_nt.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interval_nt.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interval_skip_list.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_skip_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interval_skip_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interval_skip_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interval_skip_list_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_skip_list_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interval_skip_list_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interval_skip_list_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Interval_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Interval_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Interval_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Interval_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Inverse_index.h b/3rdparty/CGAL-4.8/include/CGAL/Inverse_index.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Inverse_index.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Inverse_index.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Is_a_predicate.h b/3rdparty/CGAL-4.8/include/CGAL/Is_a_predicate.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Is_a_predicate.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Is_a_predicate.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Is_extended_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Is_extended_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Is_extended_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Is_extended_kernel.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Iso_cuboid_3.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_cuboid_3.h
new file mode 100644
index 0000000..184a30f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Iso_cuboid_3.h
@@ -0,0 +1,265 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_ISO_CUBOID_3_H
+#define CGAL_ISO_CUBOID_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3
+{
+  typedef typename R_::RT                 RT;
+  typedef typename R_::Point_3            Point_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Iso_cuboid_3                    Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_cuboid_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<3>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Iso_cuboid_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                    R;
+
+  Iso_cuboid_3() {}
+
+  Iso_cuboid_3(const Rep&  r)
+      : Rep(r) {}
+
+  Iso_cuboid_3(const Point_3& p, const Point_3& q)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p,q)) {}
+
+  Iso_cuboid_3(const Point_3& p, const Point_3& q, int)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p, q, 0)) {}
+
+  Iso_cuboid_3(const Point_3 &left,   const Point_3 &right,
+               const Point_3 &bottom, const Point_3 &top,
+               const Point_3 &far_,   const Point_3 &close)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), left, right, bottom,
+                                                    top, far_, close)) {}
+
+  Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+               const RT& max_hx, const RT& max_hy, const RT& max_hz,
+               const RT& hw)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
+				     max_hx, max_hy, max_hz, hw)) {}
+
+  Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
+               const RT& max_hx, const RT& max_hy, const RT& max_hz)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
+					     max_hx, max_hy, max_hz)) {}
+
+  Iso_cuboid_3(const Bbox_3& bbox)
+   : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.zmin(),
+				                                 bbox.xmax(), bbox.ymax(), bbox.zmax())) {}
+
+  typename cpp11::result_of<typename R::Construct_min_vertex_3( Iso_cuboid_3 )>::type
+  min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+    return R().construct_min_vertex_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_max_vertex_3( Iso_cuboid_3 )>::type
+  max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+    return R().construct_max_vertex_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Iso_cuboid_3, int )>::type
+  vertex(int i) const
+  {
+    return R().construct_vertex_3_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Iso_cuboid_3, int )>::type
+  operator[](int i) const
+  {
+    return R().construct_vertex_3_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
+  xmin() const
+  {
+    return R().compute_xmin_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
+  xmax() const
+  {
+    return R().compute_xmax_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_ymin_3( Iso_cuboid_3 )>::type
+  ymin() const
+  {
+    return R().compute_ymin_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_ymax_3( Iso_cuboid_3 )>::type
+  ymax() const
+  {
+    return R().compute_ymax_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_zmin_3( Iso_cuboid_3 )>::type
+  zmin() const
+  {
+    return R().compute_zmin_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_zmax_3( Iso_cuboid_3 )>::type
+  zmax() const
+  {
+    return R().compute_zmax_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
+  min_coord(int i) const
+  {
+    CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
+    if (i == 0)
+       return xmin();
+    else if (i == 1)
+       return ymin();
+    else
+       return zmin();
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
+  max_coord(int i) const
+  {
+    CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
+    if (i == 0)
+       return xmax();
+    else if (i == 1)
+       return ymax();
+    else
+       return zmax();
+  }
+
+  bool
+  has_on_bounded_side(const Point_3 &p) const
+  {
+    return R().has_on_bounded_side_3_object()(*this,p);
+  }
+
+  bool
+  has_on_unbounded_side(const Point_3 &p) const
+  {
+    return R().has_on_unbounded_side_3_object()(*this,p);
+  }
+
+  bool
+  has_on_boundary(const Point_3 &p) const
+  {
+    return R().has_on_boundary_3_object()(*this,p);
+  }
+
+  bool
+  has_on(const Point_3 &p) const
+  {
+    return has_on_boundary(p);
+  }
+
+  Bounded_side
+  bounded_side(const Point_3 &p) const
+  {
+    return R().bounded_side_3_object()(*this,p);
+  }
+
+  bool
+  is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_volume_3( Iso_cuboid_3 )>::type
+  volume() const
+  {
+    return R().compute_volume_3_object()(*this);
+  }
+
+  Bbox_3
+  bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+  Iso_cuboid_3
+  transform(const Aff_transformation_3 &t) const
+  {
+    return Iso_cuboid_3(t.transform((this->min)()), t.transform((this->max)()));
+  }
+
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream& os, const Iso_cuboid_3<R>& r)
+{
+  switch(get_mode(os)) {
+  case IO::ASCII :
+    return os << (r.min)() << ' ' << (r.max)();
+  case IO::BINARY :
+    return os << (r.min)() << (r.max)();
+  default:
+    return os << "Iso_cuboid_3(" << (r.min)() << ", " << (r.max)() << ")";
+  }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream& is, Iso_cuboid_3<R>& r)
+{
+  typename R::Point_3 p, q;
+  is >> p >> q;
+  if (is)
+      r = Iso_cuboid_3<R>(p, q);
+  return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_ISO_CUBOID_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2.h
new file mode 100644
index 0000000..9df885f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2.h
@@ -0,0 +1,258 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_ISO_RECTANGLE_2_H
+#define CGAL_ISO_RECTANGLE_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_2               Point_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+
+  typedef Iso_rectangle_2                    Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_rectangle_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Iso_rectangle_2  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Iso_rectangle_2() {}
+
+  Iso_rectangle_2(const Rep& r)
+    : Rep(r) {}
+
+  Iso_rectangle_2(const Point_2 &p, const Point_2 &q, int)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q, 0)) {}
+
+  Iso_rectangle_2(const Point_2 &p, const Point_2 &q)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q)) {}
+
+  Iso_rectangle_2(const Point_2 &left, const Point_2 &right,
+                  const Point_2 &bottom, const Point_2 &top)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), left, right, bottom, top)) {}
+
+  Iso_rectangle_2(const RT& min_hx, const RT& min_hy,
+                  const RT& max_hx, const RT& max_hy)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy)) {}
+
+  Iso_rectangle_2(const RT& min_hx, const RT& min_hy,
+                  const RT& max_hx, const RT& max_hy, const RT& hw)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {}
+
+  Iso_rectangle_2(const Bbox_2& bbox)
+    : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.xmax(), bbox.ymax())) {}
+
+  typename cpp11::result_of<typename R::Construct_min_vertex_2( Iso_rectangle_2 )>::type
+  min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+    return R().construct_min_vertex_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_max_vertex_2( Iso_rectangle_2 )>::type
+  max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+  {
+    return R().construct_max_vertex_2_object()(*this);
+  }
+
+  bool
+  operator==(const Iso_rectangle_2 &i) const
+  {
+    return R().equal_2_object()(*this, i);
+  }
+
+  bool
+  operator!=(const Iso_rectangle_2 &i) const
+  {
+    return ! (*this == i);
+  }
+
+
+  typename cpp11::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
+  vertex(int i) const
+  {
+    return R().construct_vertex_2_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
+  operator[](int i) const
+  {
+    return R().construct_vertex_2_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
+  xmin() const
+  {
+    return R().compute_xmin_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmax_2( Iso_rectangle_2 )>::type
+  xmax() const
+  {
+    return R().compute_xmax_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_ymin_2( Iso_rectangle_2 )>::type
+  ymin() const
+  {
+    return R().compute_ymin_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_ymax_2( Iso_rectangle_2 )>::type
+  ymax() const
+  {
+    return R().compute_ymax_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
+  min_coord(int i) const
+  {
+    CGAL_kernel_precondition( i == 0 || i == 1 );
+    if (i == 0)
+      return xmin();
+    else
+      return ymin();
+  }
+
+  typename cpp11::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
+  max_coord(int i) const
+  {
+    CGAL_kernel_precondition( i == 0 || i == 1 );
+    if (i == 0)
+      return xmax();
+    else
+      return ymax();
+  }
+
+  FT
+  area() const
+  {
+    return R().compute_area_2_object()(*this);
+  }
+
+
+  bool
+  has_on_boundary(const Point_2 &p) const
+  {
+    return R().has_on_boundary_2_object()(*this,p);
+  }
+
+
+  bool
+  has_on_bounded_side(const Point_2 &p) const
+  {
+    return R().has_on_bounded_side_2_object()(*this,p);
+  }
+
+
+  bool
+  has_on_unbounded_side(const Point_2 &p) const
+  {
+    return R().has_on_unbounded_side_2_object()(*this,p);
+  }
+
+  Bounded_side
+  bounded_side(const Point_2 &p) const
+  {
+    return R().bounded_side_2_object()(*this,p);
+  }
+
+
+  bool
+  is_degenerate() const
+  {
+    return R().is_degenerate_2_object()(*this);
+  }
+
+  Bbox_2
+  bbox() const
+  {
+    return R().construct_bbox_2_object()(*this);
+  }
+
+  Iso_rectangle_2 transform(const Aff_transformation_2 &t) const
+  {
+    // FIXME : We need a precondition like this!!!
+    // CGAL_kernel_precondition(t.is_axis_preserving());
+    return Iso_rectangle_2(t.transform(min  BOOST_PREVENT_MACRO_SUBSTITUTION ()), 
+			   t.transform(max  BOOST_PREVENT_MACRO_SUBSTITUTION ()));
+  }
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Iso_rectangle_2<R> &r)
+{
+  switch(get_mode(os)) {
+  case IO::ASCII :
+    return os << (r.min)() << ' ' << (r.max)();
+  case IO::BINARY :
+    return os << (r.min)() << (r.max)();
+  default:
+    return os << "Iso_rectangle_2(" << (r.min)() << ", " << (r.max)() << ")";
+  }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Iso_rectangle_2<R> &r)
+{
+  typename R::Point_2 p, q;
+
+  is >> p >> q;
+
+  if (is)
+    r = Iso_rectangle_2<R>(p, q);
+  return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_ISO_RECTANGLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_d.h b/3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iso_rectangle_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iso_rectangle_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iterator_project.h b/3rdparty/CGAL-4.8/include/CGAL/Iterator_project.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iterator_project.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iterator_project.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Iterator_range.h b/3rdparty/CGAL-4.8/include/CGAL/Iterator_range.h
new file mode 100644
index 0000000..82ee9e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Iterator_range.h
@@ -0,0 +1,115 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_ITERATOR_RANGE_H
+#define CGAL_ITERATOR_RANGE_H
+
+#include <CGAL/tuple.h>
+#include <utility>
+#include <boost/foreach.hpp>
+
+namespace CGAL {
+
+  /*!
+\ingroup PkgStlExtension
+  /// `CGAL::Iterator_range` is a...
+  */
+  template <typename I>
+  class Iterator_range
+    : public std::pair<I,I>{
+    
+    typedef std::pair<I,I> Base;
+
+  public:
+
+    typedef I iterator;
+    typedef I const_iterator;
+
+    Iterator_range(I b, I e)
+      : Base(b,e)
+    {}
+
+
+    // Iterator_range(const Iterator_range& ip)
+    //   : Base(ip)
+    // {}
+
+    Iterator_range(const std::pair<I,I>& ip)
+      : Base(ip)
+    {}
+
+  I begin() const
+  {
+    return this->first;
+  }
+
+  I end() const
+  {
+    return this->second;
+  }
+
+  /// returns `std::distance(begin(), end())`
+  typename std::iterator_traits<I>::difference_type
+  size() const
+  {
+    return std::distance(begin(), end());
+  }
+
+  /// returns `std::distance(begin(), end())==0`
+  bool empty() const
+  {
+    return std::distance(begin(), end())==0;
+  }
+
+};
+
+  template <typename T>
+  Iterator_range<T>
+  make_range(const T& b, const T&e)
+  {
+    return Iterator_range<T>(b,e);
+  }
+
+  template <typename T>
+  Iterator_range<T>
+  make_range(const std::pair<T,T>& p)
+  {
+    return Iterator_range<T>(p.first,p.second);
+  }
+
+
+} // namespace CGAL
+
+// At global scope...
+
+  template<typename T>
+inline boost::mpl::true_ *
+  boost_foreach_is_lightweight_proxy( CGAL::Iterator_range<T> *&, boost::foreach::tag )
+{
+    return 0;
+}
+namespace boost { namespace foreach
+{
+    template<typename T>
+    struct is_lightweight_proxy< CGAL::Iterator_range<T> >
+      : mpl::true_
+    {
+    };
+}}
+#endif // CGAL_ITERATOR_RANGE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Iterator_transform.h b/3rdparty/CGAL-4.8/include/CGAL/Iterator_transform.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Iterator_transform.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Iterator_transform.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Join_input_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Join_input_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Join_input_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Join_input_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/K_neighbor_search.h b/3rdparty/CGAL-4.8/include/CGAL/K_neighbor_search.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/K_neighbor_search.h
rename to 3rdparty/CGAL-4.8/include/CGAL/K_neighbor_search.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kd_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Kd_tree.h
new file mode 100644
index 0000000..39a4b77
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kd_tree.h
@@ -0,0 +1,464 @@
+// Copyright (c) 2002,2011,2014 Utrecht University (The Netherlands), Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>),
+//               : Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_KD_TREE_H
+#define CGAL_KD_TREE_H
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+#include <vector>
+
+#include <CGAL/algorithm.h>
+#include <CGAL/Kd_tree_node.h>
+#include <CGAL/Splitters.h>
+#include <CGAL/internal/Get_dimension_tag.h>
+
+#include <deque>
+#include <boost/container/deque.hpp>
+#include <boost/optional.hpp>
+
+#ifdef CGAL_HAS_THREADS
+#include <CGAL/mutex.h>
+#endif
+
+namespace CGAL {
+
+//template <class SearchTraits, class Splitter_=Median_of_rectangle<SearchTraits>, class UseExtendedNode = Tag_true >
+template <class SearchTraits, class Splitter_=Sliding_midpoint<SearchTraits>, class UseExtendedNode = Tag_true >
+class Kd_tree {
+
+public:
+  typedef SearchTraits Traits;
+  typedef Splitter_ Splitter;
+  typedef typename SearchTraits::Point_d Point_d;
+  typedef typename Splitter::Container Point_container;
+
+  typedef typename SearchTraits::FT FT;
+  typedef Kd_tree_node<SearchTraits, Splitter, UseExtendedNode > Node;
+  typedef Kd_tree_leaf_node<SearchTraits, Splitter, UseExtendedNode > Leaf_node;
+  typedef Kd_tree_internal_node<SearchTraits, Splitter, UseExtendedNode > Internal_node;
+  typedef Kd_tree<SearchTraits, Splitter> Tree;
+  typedef Kd_tree<SearchTraits, Splitter,UseExtendedNode> Self;
+
+  typedef Node* Node_handle;
+  typedef const Node* Node_const_handle;
+  typedef Leaf_node* Leaf_node_handle;
+  typedef const Leaf_node* Leaf_node_const_handle;
+  typedef Internal_node* Internal_node_handle;
+  typedef const Internal_node* Internal_node_const_handle;
+  typedef typename std::vector<const Point_d*>::const_iterator Point_d_iterator;
+  typedef typename std::vector<const Point_d*>::const_iterator Point_d_const_iterator;
+  typedef typename Splitter::Separator Separator;
+  typedef typename std::vector<Point_d>::const_iterator iterator;
+  typedef typename std::vector<Point_d>::const_iterator const_iterator;
+
+  typedef typename std::vector<Point_d>::size_type size_type;
+
+  typedef typename internal::Get_dimension_tag<SearchTraits>::Dimension D;
+
+private:
+  SearchTraits traits_;
+  Splitter split;
+
+
+  // wokaround for https://svn.boost.org/trac/boost/ticket/9332
+#if   (_MSC_VER == 1800) && (BOOST_VERSION == 105500)
+  std::deque<Internal_node> internal_nodes;
+  std::deque<Leaf_node> leaf_nodes;
+#else
+  boost::container::deque<Internal_node> internal_nodes;
+  boost::container::deque<Leaf_node> leaf_nodes;
+#endif
+
+  Node_handle tree_root;
+
+  Kd_tree_rectangle<FT,D>* bbox;
+  std::vector<Point_d> pts;
+
+  // Instead of storing the points in arrays in the Kd_tree_node
+  // we put all the data in a vector in the Kd_tree.
+  // and we only store an iterator range in the Kd_tree_node.
+  //
+  std::vector<const Point_d*> data;
+
+
+  #ifdef CGAL_HAS_THREADS
+  mutable CGAL_MUTEX building_mutex;//mutex used to protect const calls inducing build()
+  #endif
+  bool built_;
+
+  // protected copy constructor
+  Kd_tree(const Tree& tree)
+    : traits_(tree.traits_),built_(tree.built_)
+  {};
+
+
+  // Instead of the recursive construction of the tree in the class Kd_tree_node
+  // we do this in the tree class. The advantage is that we then can optimize
+  // the allocation of the nodes.
+
+  // The leaf node
+  Node_handle
+  create_leaf_node(Point_container& c)
+  {
+    Leaf_node node(true , static_cast<unsigned int>(c.size()));
+    std::ptrdiff_t tmp = c.begin() - data.begin();
+    node.data = pts.begin() + tmp;
+
+    leaf_nodes.push_back(node);
+    Leaf_node_handle nh = &leaf_nodes.back();
+
+   
+    return nh;
+  }
+
+
+  // The internal node
+
+  Node_handle
+  create_internal_node(Point_container& c, const Tag_true&)
+  {
+    return create_internal_node_use_extension(c);
+  }
+
+  Node_handle
+  create_internal_node(Point_container& c, const Tag_false&)
+  {
+    return create_internal_node(c);
+  }
+
+
+
+  // TODO: Similiar to the leaf_init function above, a part of the code should be
+  //       moved to a the class Kd_tree_node.
+  //       It is not proper yet, but the goal was to see if there is
+  //       a potential performance gain through the Compact_container
+  Node_handle
+  create_internal_node_use_extension(Point_container& c)
+  {
+    Internal_node node(false);
+    internal_nodes.push_back(node);
+    Internal_node_handle nh = &internal_nodes.back();
+
+    Separator sep;
+    Point_container c_low(c.dimension(),traits_);
+    split(sep, c, c_low);
+    nh->set_separator(sep);
+
+    int cd  = nh->cutting_dimension();
+    if(!c_low.empty())
+      nh->low_val = c_low.tight_bounding_box().max_coord(cd);
+    else
+      nh->low_val = c_low.bounding_box().min_coord(cd);
+    if(!c.empty())
+      nh->high_val = c.tight_bounding_box().min_coord(cd);
+    else
+      nh->high_val = c.bounding_box().max_coord(cd);
+
+    CGAL_assertion(nh->cutting_value() >= nh->low_val);
+    CGAL_assertion(nh->cutting_value() <= nh->high_val);
+
+    if (c_low.size() > split.bucket_size()){
+      nh->lower_ch = create_internal_node_use_extension(c_low);
+    }else{
+      nh->lower_ch = create_leaf_node(c_low);
+    }
+    if (c.size() > split.bucket_size()){
+      nh->upper_ch = create_internal_node_use_extension(c);
+    }else{
+      nh->upper_ch = create_leaf_node(c);
+    }
+
+    
+    
+
+    return nh;
+  }
+
+
+  // Note also that I duplicated the code to get rid if the if's for
+  // the boolean use_extension which was constant over the construction
+  Node_handle
+  create_internal_node(Point_container& c)
+  {
+    Internal_node node(false);
+    internal_nodes.push_back(node);
+    Internal_node_handle nh = &internal_nodes.back();
+    Separator sep;
+
+    Point_container c_low(c.dimension(),traits_);
+    split(sep, c, c_low);
+    nh->set_separator(sep);
+
+    if (c_low.size() > split.bucket_size()){
+      nh->lower_ch = create_internal_node(c_low);
+    }else{
+      nh->lower_ch = create_leaf_node(c_low);
+    }
+    if (c.size() > split.bucket_size()){
+      nh->upper_ch = create_internal_node(c);
+    }else{
+      nh->upper_ch = create_leaf_node(c);
+    }
+
+   
+
+    return nh;
+  }
+
+
+
+public:
+
+  Kd_tree(Splitter s = Splitter(),const SearchTraits traits=SearchTraits())
+    : traits_(traits),split(s), built_(false)
+  {}
+
+  template <class InputIterator>
+  Kd_tree(InputIterator first, InputIterator beyond,
+	  Splitter s = Splitter(),const SearchTraits traits=SearchTraits())
+    : traits_(traits),split(s), built_(false)
+  {
+    pts.insert(pts.end(), first, beyond);
+  }
+
+  bool empty() const {
+    return pts.empty();
+  }
+
+  void
+  build()
+  {
+    const Point_d& p = *pts.begin();
+    typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits_.construct_cartesian_const_iterator_d_object();
+    int dim = static_cast<int>(std::distance(ccci(p), ccci(p,0)));
+
+    data.reserve(pts.size());
+    for(unsigned int i = 0; i < pts.size(); i++){
+      data.push_back(&pts[i]);
+    }
+    Point_container c(dim, data.begin(), data.end(),traits_);
+    bbox = new Kd_tree_rectangle<FT,D>(c.bounding_box());
+    if (c.size() <= split.bucket_size()){
+      tree_root = create_leaf_node(c);
+    }else {
+      tree_root = create_internal_node(c, UseExtendedNode());
+    }
+
+    //Reorder vector for spatial locality
+    std::vector<Point_d> ptstmp;
+    ptstmp.resize(pts.size());
+    for (std::size_t i = 0; i < pts.size(); ++i){
+      ptstmp[i] = *data[i];
+    }
+    for(std::size_t i = 0; i < leaf_nodes.size(); ++i){
+      std::ptrdiff_t tmp = leaf_nodes[i].begin() - pts.begin();
+      leaf_nodes[i].data = ptstmp.begin() + tmp;
+    }
+    pts.swap(ptstmp);
+
+    data.clear();
+
+    built_ = true;
+  }
+
+private:
+  //any call to this function is for the moment not threadsafe
+  void const_build() const {
+    #ifdef CGAL_HAS_THREADS
+    //this ensure that build() will be called once
+    CGAL_SCOPED_LOCK(building_mutex);
+    if(!is_built())
+    #endif
+      const_cast<Self*>(this)->build(); //THIS IS NOT THREADSAFE
+  }
+public:
+
+  bool is_built() const
+  {
+    return built_;
+  }
+
+  void invalidate_built()
+  {
+    if(is_built()){
+      internal_nodes.clear();
+      leaf_nodes.clear();
+      data.clear();
+      delete bbox;
+      built_ = false;
+    }
+  }
+
+  void clear()
+  {
+    invalidate_built();
+    pts.clear();
+  }
+
+  void
+  insert(const Point_d& p)
+  {
+    invalidate_built();
+    pts.push_back(p);
+  }
+
+  template <class InputIterator>
+  void
+  insert(InputIterator first, InputIterator beyond)
+  {
+    invalidate_built();
+    pts.insert(pts.end(),first, beyond);
+  }
+
+  //For efficiency; reserve the size of the points vectors in advance (if the number of points is already known).
+  void reserve(size_t size)
+  {
+    pts.reserve(size);
+  }
+
+  //Get the capacity of the underlying points vector.
+  size_t capacity()
+  {
+    return pts.capacity();
+  }
+
+
+  template <class OutputIterator, class FuzzyQueryItem>
+  OutputIterator
+  search(OutputIterator it, const FuzzyQueryItem& q) const
+  {
+    if(! pts.empty()){
+
+      if(! is_built()){
+	const_build();
+      }
+      Kd_tree_rectangle<FT,D> b(*bbox);
+      return tree_root->search(it,q,b);
+    }
+    return it;
+  }
+
+
+  template <class FuzzyQueryItem>
+  boost::optional<Point_d>
+  search_any_point(const FuzzyQueryItem& q) const
+  {
+    if(! pts.empty()){
+
+      if(! is_built()){
+	const_build();
+      }
+      Kd_tree_rectangle<FT,D> b(*bbox);
+      return tree_root->search_any_point(q,b);
+    }
+    return boost::none;
+  }
+
+
+  ~Kd_tree() {
+    if(is_built()){
+      delete bbox;
+    }
+  }
+
+
+  const SearchTraits&
+  traits() const
+  {
+    return traits_;
+  }
+
+  Node_const_handle
+  root() const
+  {
+    if(! is_built()){
+      const_build();
+    }
+    return tree_root;
+  }
+
+  Node_handle
+  root()
+  {
+    if(! is_built()){
+      build();
+    }
+    return tree_root;
+  }
+
+  void
+  print() const
+  {
+    if(! is_built()){
+      const_build();
+    }
+    root()->print();
+  }
+
+  const Kd_tree_rectangle<FT,D>&
+  bounding_box() const
+  {
+    if(! is_built()){
+      const_build();
+    }
+    return *bbox;
+  }
+
+  const_iterator
+  begin() const
+  {
+    return pts.begin();
+  }
+
+  const_iterator
+  end() const
+  {
+    return pts.end();
+  }
+
+  size_type
+  size() const
+  {
+    return pts.size();
+  }
+
+  // Print statistics of the tree.
+  std::ostream&
+  statistics(std::ostream& s) const
+  {
+    if(! is_built()){
+      const_build();
+    }
+    s << "Tree statistics:" << std::endl;
+    s << "Number of items stored: "
+      << root()->num_items() << std::endl;
+    s << "Number of nodes: "
+      << root()->num_nodes() << std::endl;
+    s << " Tree depth: " << root()->depth() << std::endl;
+    return s;
+  }
+
+
+};
+
+} // namespace CGAL
+
+#endif // CGAL_KD_TREE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kd_tree_node.h b/3rdparty/CGAL-4.8/include/CGAL/Kd_tree_node.h
new file mode 100644
index 0000000..87f3b04
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kd_tree_node.h
@@ -0,0 +1,551 @@
+// Copyright (c) 2002,2011  Utrecht University (The Netherlands).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Authors       : Hans Tangelder (<hanst at cs.uu.nl>)
+
+#ifndef CGAL_KD_TREE_NODE_H
+#define CGAL_KD_TREE_NODE_H
+
+
+#include <CGAL/Splitters.h>
+#include <CGAL/Compact_container.h>
+#include <boost/cstdint.hpp>
+
+namespace CGAL {
+
+  template <class SearchTraits, class Splitter, class UseExtendedNode> 
+  class Kd_tree;
+
+  template < class TreeTraits, class Splitter, class UseExtendedNode > 
+  class Kd_tree_node {
+
+     friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
+
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_handle Node_handle;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_const_handle Node_const_handle;
+     typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Internal_node_handle Internal_node_handle;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Internal_node_const_handle Internal_node_const_handle;
+     typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Leaf_node_handle Leaf_node_handle;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Leaf_node_const_handle Leaf_node_const_handle;
+    typedef typename TreeTraits::Point_d Point_d;
+
+    typedef typename TreeTraits::FT FT;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Separator Separator;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Point_d_iterator Point_d_iterator;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::iterator iterator;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::D D;
+
+    bool leaf;
+
+  public : 
+    Kd_tree_node(bool leaf_)
+      :leaf(leaf_){}
+
+    bool is_leaf() const{
+      return leaf;
+    }
+
+    std::size_t 
+    num_items() const
+    {
+      if (is_leaf()){
+        Leaf_node_const_handle node = 
+          static_cast<Leaf_node_const_handle>(this);
+        return node->size();
+      }
+      else {
+        Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	return node->lower()->num_items() + node->upper()->num_items();
+      }
+    }
+
+    std::size_t
+    num_nodes() const
+    {
+      if (is_leaf()) return 1;
+      else {
+        Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	return node->lower()->num_nodes() + node->upper()->num_nodes();
+      }
+    }
+
+    int 
+    depth(const int current_max_depth) const
+    {
+      if (is_leaf()){
+	return current_max_depth;
+      }
+      else {
+        Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+        return 
+	     (std::max)( node->lower()->depth(current_max_depth + 1),
+			 node->upper()->depth(current_max_depth + 1));
+      }
+    }
+
+    int 
+    depth() const
+    {
+      return depth(1); 
+    }
+
+    template <class OutputIterator>
+    OutputIterator 
+    tree_items(OutputIterator it) const {
+      if (is_leaf()) {
+         Leaf_node_const_handle node = 
+          static_cast<Leaf_node_const_handle>(this);
+	 if (node->size()>0) 
+	    for (iterator i=node->begin(); i != node->end(); i++) 
+	      {*it=*i; ++it;} 
+	}
+      else {
+         Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	  it=node->lower()->tree_items(it);  
+	  it=node->upper()->tree_items(it); 
+      }
+      return it;
+    }
+
+
+    boost::optional<Point_d>
+    any_tree_item() const {
+      boost::optional<Point_d> result = boost::none;
+      if (is_leaf()) {
+         Leaf_node_const_handle node =
+          static_cast<Leaf_node_const_handle>(this);
+	 if (node->size()>0){
+           return boost::make_optional(*(node->begin()));
+         }
+	}
+      else {
+         Internal_node_const_handle node =
+          static_cast<Internal_node_const_handle>(this);
+	  result = node->lower()->any_tree_item();
+          if(! result){
+            result = node->upper()->any_tree_item();
+          }
+      }
+      return result;
+    }
+
+
+     void 
+    indent(int d) const
+    {
+      for(int i = 0; i < d; i++){
+	std::cout << " ";
+      }
+    }
+
+
+    void 
+    print(int d = 0) const 
+    {
+      if (is_leaf()) {
+        Leaf_node_const_handle node = 
+          static_cast<Leaf_node_const_handle>(this);
+	indent(d);
+	std::cout << "leaf" << std::endl;
+	if (node->size()>0)
+	  for (iterator i=node->begin(); i != node->end(); i++)
+	  {indent(d);std::cout << *i << std::endl;}
+      }
+      else {
+        Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	indent(d);
+	std::cout << "lower tree" << std::endl;
+	node->lower()->print(d+1);
+	indent(d);
+	std::cout << "separator: dim = " << node->cutting_dimension() << "  val = " << node->cutting_value() << std::endl;
+	indent(d);
+	std::cout << "upper tree" << std::endl;
+	node->upper()->print(d+1); 
+      }
+    }
+
+
+    template <class OutputIterator, class FuzzyQueryItem>
+    OutputIterator 
+    search(OutputIterator it, const FuzzyQueryItem& q,
+	   Kd_tree_rectangle<FT,D>& b) const
+    {
+      if (is_leaf()) { 
+        Leaf_node_const_handle node = 
+          static_cast<Leaf_node_const_handle>(this);
+	if (node->size()>0) 
+	  for (iterator i=node->begin(); i != node->end(); i++) 
+	    if (q.contains(*i)) 
+	      {*it++=*i;}
+      }
+      else {
+         Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	// after splitting b denotes the lower part of b
+	Kd_tree_rectangle<FT,D> b_upper(b);
+	b.split(b_upper, node->cutting_dimension(),
+		node->cutting_value());
+                             
+	if (q.outer_range_contains(b)) 	
+	  it=node->lower()->tree_items(it);
+	else
+	  if (q.inner_range_intersects(b)) 
+	    it=node->lower()->search(it,q,b);
+	if  (q.outer_range_contains(b_upper))     
+	  it=node->upper()->tree_items(it);
+	else
+	  if (q.inner_range_intersects(b_upper)) 
+	    it=node->upper()->search(it,q,b_upper);
+      };
+      return it;				
+    }
+
+
+    template <class FuzzyQueryItem>
+    boost::optional<Point_d>
+    search_any_point(const FuzzyQueryItem& q,
+                     Kd_tree_rectangle<FT,D>& b) const
+    {
+      boost::optional<Point_d> result = boost::none;
+      if (is_leaf()) { 
+        Leaf_node_const_handle node = 
+          static_cast<Leaf_node_const_handle>(this);
+	if (node->size()>0) 
+	  for (iterator i=node->begin(); i != node->end(); i++) 
+	    if (q.contains(*i)) 
+	      { result = boost::make_optional(*i);}
+      }
+      else {
+         Internal_node_const_handle node = 
+          static_cast<Internal_node_const_handle>(this);
+	// after splitting b denotes the lower part of b
+	Kd_tree_rectangle<FT,D> b_upper(b);
+	b.split(b_upper, node->cutting_dimension(),
+		node->cutting_value());
+                             
+	if (q.outer_range_contains(b)){ 	
+          result = node->lower()->any_tree_item();
+	}else{
+	  if (q.inner_range_intersects(b)){ 
+	    result = node->lower()->search_any_point(q,b);
+          }
+        }
+        if(result){
+          return result;
+        }
+	if  (q.outer_range_contains(b_upper)){     
+	  result = node->upper()->any_tree_item();
+	}else{
+	  if (q.inner_range_intersects(b_upper)) 
+	    result = node->upper()->search_any_point(q,b_upper);
+        }
+      }
+      return result;				
+    }
+
+  };
+
+
+  template < class TreeTraits, class Splitter, class UseExtendedNode > 
+  class Kd_tree_leaf_node : public Kd_tree_node< TreeTraits, Splitter, UseExtendedNode >{
+
+    friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
+    
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::iterator iterator;
+    typedef Kd_tree_node< TreeTraits, Splitter, UseExtendedNode> Base;
+    typedef typename TreeTraits::Point_d Point_d;
+
+  private:
+    
+    // private variables for leaf nodes
+    boost::int32_t n; // denotes number of items in a leaf node
+    iterator data; // iterator to data in leaf node
+
+                    
+  public:
+		
+    // default constructor
+    Kd_tree_leaf_node() 
+    {}
+
+    Kd_tree_leaf_node(bool leaf_ ) 
+      : Base(leaf_)
+    {}
+
+    Kd_tree_leaf_node(bool leaf_,unsigned int n_ ) 
+      : Base(leaf_), n(n_)
+    {}
+
+    // members for all nodes
+   
+    // members for leaf nodes only
+    inline 
+    unsigned int 
+    size() const 
+    { 
+      return n;
+    }
+  
+    inline 
+    iterator
+    begin() const  
+    {
+      return data;
+    }
+
+    inline 
+    iterator 
+    end() const 
+    {
+      return data + n;
+    }
+ 
+  }; //leaf node
+
+
+
+  template < class TreeTraits, class Splitter, class UseExtendedNode> 
+  class Kd_tree_internal_node : public Kd_tree_node< TreeTraits, Splitter, UseExtendedNode >{
+
+    friend class Kd_tree<TreeTraits,Splitter,UseExtendedNode>;
+
+    typedef Kd_tree_node< TreeTraits, Splitter, UseExtendedNode> Base;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_handle Node_handle;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Node_const_handle Node_const_handle;
+
+    typedef typename TreeTraits::FT FT;
+    typedef typename Kd_tree<TreeTraits,Splitter,UseExtendedNode>::Separator Separator;
+
+  private:
+    
+       // private variables for internal nodes
+    boost::int32_t cut_dim;
+    FT cut_val;
+    Node_handle lower_ch, upper_ch;
+
+
+    // private variables for extended internal nodes
+    FT low_val;
+    FT high_val;
+                
+  public:
+
+    // default constructor
+    Kd_tree_internal_node() 
+    {}
+
+    Kd_tree_internal_node(bool leaf_) 
+      : Base(leaf_)
+    {}
+    
+    
+    // members for internal node and extended internal node
+
+    inline 
+    Node_const_handle 
+    lower() const 
+    {
+      return lower_ch; 
+    }
+
+    inline 
+    Node_const_handle 
+    upper() const 
+    {
+      return upper_ch; 
+    }
+
+    inline 
+    Node_handle 
+    lower()
+    {
+      return lower_ch; 
+    }
+
+    inline 
+    Node_handle 
+    upper()
+    {
+      return upper_ch; 
+    }
+  	
+    // inline Separator& separator() {return sep; }
+    // use instead
+    inline
+    void set_separator(Separator& sep){
+      cut_dim = sep.cutting_dimension();
+      cut_val = sep.cutting_value();
+    }
+  	
+    inline 
+    FT 
+    cutting_value() const 
+    {
+      return cut_val;
+    }
+  	
+    inline 
+    int 
+    cutting_dimension() const 
+    {
+      return cut_dim;
+    }
+
+    // members for extended internal node only
+    inline 
+    FT
+    low_value() const 
+    { 
+      return low_val; 
+    }
+    
+    inline 
+    FT
+    high_value() const 
+    {
+      return high_val; 
+    }
+       
+
+    /*Separator& 
+    separator() 
+    {
+      return Separator(cutting_dimension,cutting_value);
+    }*/
+	
+
+  };//internal node
+
+ template < class TreeTraits, class Splitter> 
+ class Kd_tree_internal_node<TreeTraits,Splitter,Tag_false> : public Kd_tree_node< TreeTraits, Splitter, Tag_false >{
+
+    friend class Kd_tree<TreeTraits,Splitter,Tag_false>;
+
+    typedef Kd_tree_node< TreeTraits, Splitter, Tag_false> Base;
+    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Node_handle Node_handle;
+    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Node_const_handle Node_const_handle;
+
+    typedef typename TreeTraits::FT FT;
+    typedef typename Kd_tree<TreeTraits,Splitter,Tag_false>::Separator Separator;
+
+  private:
+    
+       // private variables for internal nodes
+    boost::uint8_t cut_dim;
+    FT cut_val;
+
+    Node_handle lower_ch, upper_ch;
+                
+  public:
+
+    // default constructor
+    Kd_tree_internal_node() 
+    {}
+
+    Kd_tree_internal_node(bool leaf_) 
+      : Base(leaf_)
+    {}
+    
+    
+    // members for internal node and extended internal node
+
+    inline 
+    Node_const_handle 
+    lower() const 
+    {
+      return lower_ch; 
+    }
+
+    inline 
+    Node_const_handle 
+    upper() const 
+    {
+      return upper_ch; 
+    }
+
+    inline 
+    Node_handle 
+    lower()
+    {
+      return lower_ch; 
+    }
+
+    inline 
+    Node_handle 
+    upper()
+    {
+      return upper_ch; 
+    }
+  	
+    // inline Separator& separator() {return sep; }
+    // use instead
+
+    inline
+    void set_separator(Separator& sep){
+      cut_dim = sep.cutting_dimension();
+      cut_val = sep.cutting_value();
+    }
+  	
+    inline 
+    FT 
+    cutting_value() const 
+    {
+      return cut_val;
+    }
+  	
+    inline 
+    int 
+    cutting_dimension() const 
+    {
+      return cut_dim;
+    }
+
+    // members for extended internal node only
+    inline 
+    FT
+    low_value() const 
+    { 
+      return this->low_val;
+    }
+    
+    inline 
+    FT
+    high_value() const 
+    {
+      return this->high_val;
+    }
+       
+
+   /* Separator& 
+    separator() 
+    {
+      return Separator(cutting_dimension,cutting_value);
+    }*/
+	
+
+  };//internal node
+
+
+
+} // namespace CGAL
+#endif // CGAL_KDTREE_NODE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kd_tree_rectangle.h b/3rdparty/CGAL-4.8/include/CGAL/Kd_tree_rectangle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kd_tree_rectangle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kd_tree_rectangle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Dimension_utils.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Dimension_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Dimension_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Dimension_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Return_base_tag.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Return_base_tag.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Return_base_tag.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Return_base_tag.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Same_uncertainty.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Same_uncertainty.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Same_uncertainty.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Same_uncertainty.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Type_equality_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Type_equality_wrapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Type_equality_wrapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Type_equality_wrapper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Type_mapper.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Type_mapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Type_mapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Type_mapper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/Wutils.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/Wutils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/Wutils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/Wutils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/function_objects.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_internal_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_internal_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_internal_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_internal_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_internal_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_internal_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/global_functions_internal_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/global_functions_internal_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/interface_macros.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/interface_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/interface_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/interface_macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/mpl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/mpl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/mpl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/mpl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel/solve.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel/solve.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel/solve.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel/solve.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_checker.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_checker.h
new file mode 100644
index 0000000..0f2ab86
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_checker.h
@@ -0,0 +1,324 @@
+// Copyright (c) 2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_KERNEL_CHECKER_H
+#define CGAL_KERNEL_CHECKER_H
+
+// This file contains the definition of a kernel traits checker.
+//
+// TODO:
+// - At the moment, only predicates are checked.  To handle constructions as
+//   well, the best approach is probably to have objects be pairs, and do
+//   everything in parallel (cf Curved_kernel's traits checker for an example).
+//   So the template parameter will be a comparator, not a converter.
+
+#include <CGAL/basic.h>
+#include <CGAL/use.h>
+#include <utility>
+#include <typeinfo>
+
+namespace CGAL {
+
+// Small utility to manipulate pairs for kernel objects, and
+// simple things for bool, Sign...  Object is yet another case...
+template < typename T1, typename T2 >
+struct Pairify {
+  typedef std::pair<T1, T2>  result_type;
+  result_type operator()(const T1 &t1, const T2 &t2) const
+  { return std::make_pair(t1, t2); }
+};
+
+template <>
+struct Pairify <bool, bool> {
+  typedef bool   result_type;
+  result_type operator()(const bool &t1, const bool &t2) const
+  { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; }
+};
+
+template <>
+struct Pairify <Sign, Sign> {
+  typedef Sign   result_type;
+  result_type operator()(const Sign &t1, const Sign &t2) const
+  { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; }
+};
+
+template <>
+struct Pairify <Bounded_side, Bounded_side> {
+  typedef Bounded_side   result_type;
+  result_type operator()(const Bounded_side &t1, const Bounded_side &t2) const
+  { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; }
+};
+
+template <>
+struct Pairify <Angle, Angle> {
+  typedef Angle   result_type;
+  result_type operator()(const Angle &t1, const Angle &t2) const
+  { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; }
+};
+
+
+// Class used by Kernel_checker.
+template <class P1, class P2, class Cmp>
+class Primitive_checker
+{
+    P1  p1;
+    P2  p2;
+    Cmp cmp;
+    typedef Pairify<typename P1::result_type,
+		    typename P2::result_type>  Pair_maker;
+    Pair_maker  pair_maker;
+
+public:
+
+    typedef typename Pair_maker::result_type   result_type;
+
+    Primitive_checker(const P1 &pp1 = P1(), const P2 &pp2 = P2(),
+                      const Cmp &c = Cmp())
+	: p1(pp1), p2(pp2), cmp(c) {}
+
+    template <class A1>
+    result_type
+    operator()(const A1 &a1) const
+    {
+	typename P1::result_type res1 = p1(a1.first);
+	typename P2::result_type res2 = p2(a1.second);
+	if (! cmp(res1, res2))
+	{
+	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
+		      << " for the inputs : " << std::endl;
+	    std::cerr << a1.first << std::endl;
+	    std::cerr << a1.second << std::endl;
+            std::cerr << "functor first kernel : "
+		      << typeid(p1).name() << std::endl;
+            std::cerr << "functor second kernel: "
+		      << typeid(p2).name() << std::endl;
+	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
+	    CGAL_kernel_assertion(false);
+	}
+	return pair_maker(res1, res2);
+    }
+
+    template <class A1, class A2>
+    result_type
+    operator()(const A1 &a1, const A2 &a2) const
+    {
+	typename P1::result_type res1 = p1(a1.first, a2.first);
+	typename P2::result_type res2 = p2(a1.second, a2.second);
+	if (! cmp(res1, res2))
+	{
+	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
+		      << " for the inputs : " << std::endl;
+	    std::cerr << a1.first << std::endl;
+	    std::cerr << a1.second << std::endl;
+	    std::cerr << a2.first << std::endl;
+	    std::cerr << a2.second << std::endl;
+            std::cerr << "functor first kernel : "
+		      << typeid(p1).name() << std::endl;
+            std::cerr << "functor second kernel: "
+		      << typeid(p2).name() << std::endl;
+	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
+	    CGAL_kernel_assertion(false);
+	}
+	return pair_maker(res1, res2);
+    }
+
+    template <class A1, class A2, class A3>
+    result_type
+    operator()(const A1 &a1, const A2 &a2, const A3 &a3) const
+    {
+	typename P1::result_type res1 = p1(a1.first, a2.first, a3.first);
+	typename P2::result_type res2 = p2(a1.second, a2.second, a3.second);
+	if (! cmp(res1, res2))
+	{
+	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
+		      << " for the inputs : " << std::endl;
+	    std::cerr << a1.first << std::endl;
+	    std::cerr << a1.second << std::endl;
+	    std::cerr << a2.first << std::endl;
+	    std::cerr << a2.second << std::endl;
+	    std::cerr << a3.first << std::endl;
+	    std::cerr << a3.second << std::endl;
+            std::cerr << "functor first kernel : "
+		      << typeid(p1).name() << std::endl;
+            std::cerr << "functor second kernel: "
+		      << typeid(p2).name() << std::endl;
+	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
+	    CGAL_kernel_assertion(false);
+	}
+	return pair_maker(res1, res2);
+    }
+
+    template <class A1, class A2, class A3, class A4>
+    result_type
+    operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
+    {
+	typename P1::result_type res1 = p1(a1.first, a2.first,
+                                           a3.first, a4.first);
+	typename P2::result_type res2 = p2(a1.second, a2.second,
+                                           a3.second, a4.second);
+	if (! cmp(res1, res2))
+	{
+	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
+		      << " for the inputs : " << std::endl;
+	    std::cerr << a1.first << std::endl;
+	    std::cerr << a1.second << std::endl;
+	    std::cerr << a2.first << std::endl;
+	    std::cerr << a2.second << std::endl;
+	    std::cerr << a3.first << std::endl;
+	    std::cerr << a3.second << std::endl;
+	    std::cerr << a4.first << std::endl;
+	    std::cerr << a4.second << std::endl;
+            std::cerr << "functor first kernel : "
+		      << typeid(p1).name() << std::endl;
+            std::cerr << "functor second kernel: "
+		      << typeid(p2).name() << std::endl;
+	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
+	    CGAL_kernel_assertion(false);
+	}
+	return pair_maker(res1, res2);
+    }
+
+    template <class A1, class A2, class A3, class A4, class A5>
+    result_type
+    operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4,
+               const A5 &a5) const
+    {
+	typename P1::result_type res1 = p1(a1.first, a2.first,
+                                           a3.first, a4.first, a5.first);
+	typename P2::result_type res2 = p2(a1.second, a2.second,
+                                           a3.second, a4.second, a5.second);
+	if (! cmp(res1, res2))
+	{
+	    std::cerr << "Kernel_checker error : " << res1 << " != " << res2
+		      << " for the inputs : " << std::endl;
+	    std::cerr << a1.first << std::endl;
+	    std::cerr << a1.second << std::endl;
+	    std::cerr << a2.first << std::endl;
+	    std::cerr << a2.second << std::endl;
+	    std::cerr << a3.first << std::endl;
+	    std::cerr << a3.second << std::endl;
+	    std::cerr << a4.first << std::endl;
+	    std::cerr << a4.second << std::endl;
+	    std::cerr << a5.first << std::endl;
+	    std::cerr << a5.second << std::endl;
+            std::cerr << "functor first kernel : "
+		      << typeid(p1).name() << std::endl;
+            std::cerr << "functor second kernel: "
+		      << typeid(p2).name() << std::endl;
+	    std::cerr << CGAL_PRETTY_FUNCTION << std::endl;
+	    CGAL_kernel_assertion(false);
+	}
+	return pair_maker(res1, res2);
+    }
+
+    // Same thing with more arguments...
+};
+
+struct dont_check_equal {
+  template < typename T1, typename T2 >
+  bool operator()(const T1 & /* t1 */, const T2 &/*t2*/) const
+  { return true; }
+  template < typename T >
+  bool operator()(const T &t1, const T &t2) const
+  { return t1 == t2; }
+};
+
+template < class K1, class K2, class Cmp = dont_check_equal >
+class Kernel_checker
+{
+protected:
+    K1 k1;
+    K2 k2;
+    Cmp cmp;
+
+public:
+
+    typedef bool                      Boolean;
+    typedef CGAL::Sign                Sign;
+    typedef CGAL::Comparison_result   Comparison_result;
+    typedef CGAL::Orientation         Orientation;
+    typedef CGAL::Oriented_side       Oriented_side;
+    typedef CGAL::Bounded_side        Bounded_side;
+    typedef CGAL::Angle               Angle;
+
+    typedef K1     Kernel1;
+    typedef K2     Kernel2;
+    typedef Cmp    Comparator;
+
+    // Kernel objects are defined as pairs, with primitives run in parallel.
+#define CGAL_kc_pair(X) typedef std::pair<typename K1::X, typename K2::X> X;
+
+    CGAL_kc_pair(RT)
+    CGAL_kc_pair(FT)
+
+    // TODO : Object_[23] are subtil : should probably be Object(pair<...>).
+    // Or should Assign_[23] be used, and that's it ?
+    // In any case, Assign will have to be treated separately because it
+    // takes its first argument by non-const reference.
+    // Maybe Primitive_checker should provide a variant with non-const ref...
+
+    CGAL_kc_pair(Object_2)
+    CGAL_kc_pair(Object_3)
+
+    CGAL_kc_pair(Point_2)
+    CGAL_kc_pair(Vector_2)
+    CGAL_kc_pair(Direction_2)
+    CGAL_kc_pair(Line_2)
+    CGAL_kc_pair(Ray_2)
+    CGAL_kc_pair(Segment_2)
+    CGAL_kc_pair(Triangle_2)
+    CGAL_kc_pair(Iso_rectangle_2)
+    CGAL_kc_pair(Circle_2)
+    CGAL_kc_pair(Conic_2)
+    CGAL_kc_pair(Aff_transformation_2)
+
+    CGAL_kc_pair(Point_3)
+    CGAL_kc_pair(Plane_3)
+    CGAL_kc_pair(Vector_3)
+    CGAL_kc_pair(Direction_3)
+    CGAL_kc_pair(Line_3)
+    CGAL_kc_pair(Ray_3)
+    CGAL_kc_pair(Segment_3)
+    CGAL_kc_pair(Triangle_3)
+    CGAL_kc_pair(Tetrahedron_3)
+    CGAL_kc_pair(Iso_cuboid_3)
+    CGAL_kc_pair(Sphere_3)
+    CGAL_kc_pair(Aff_transformation_3)
+
+#undef CGAL_kc_pair
+
+#define CGAL_Kernel_pred(X, Y) \
+    typedef Primitive_checker<typename K1::X, typename K2::X, Cmp> X; \
+    X Y() const { return X(k1.Y(), k2.Y(), cmp); }
+
+#define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z)
+
+public:
+
+#include <CGAL/Kernel/interface_macros.h>
+};
+
+} //namespace CGAL
+
+#endif // CGAL_KERNEL_CHECKER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformationCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformationCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformationCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformationCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformationHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformationHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformationHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformationHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformation_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformation_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Aff_transformation_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Aff_transformation_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Cartesian_converter_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Cartesian_converter_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Cartesian_converter_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Cartesian_converter_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionCd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionCd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionCd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionCd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/DirectionHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/DirectionHd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Direction_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Direction_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Direction_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Direction_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneCd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneCd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneCd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneCd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/HyperplaneHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/HyperplaneHd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Hyperplane_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Hyperplane_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Hyperplane_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Hyperplane_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Interface_classes.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Interface_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Interface_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Interface_classes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Interval_linear_algebra.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Interval_linear_algebra.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Interval_linear_algebra.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Interval_linear_algebra.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Iso_box_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Iso_box_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Iso_box_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Iso_box_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Kernel_classesCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Kernel_classesCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Kernel_classesCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Kernel_classesCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Kernel_classesHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Kernel_classesHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Kernel_classesHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Kernel_classesHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Line_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Line_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Line_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Line_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Line_d_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Line_d_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Line_d_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Line_d_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Linear_algebraCd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Linear_algebraCd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Linear_algebraCd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Linear_algebraCd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Linear_algebraHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Linear_algebraHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Linear_algebraHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Linear_algebraHd_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Matrix__.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Matrix__.h
new file mode 100644
index 0000000..24aefed
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Matrix__.h
@@ -0,0 +1,831 @@
+// Copyright (c) 1997-2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_MATRIX___H
+#define CGAL_MATRIX___H
+
+#include <CGAL/Kernel_d/Vector__.h>
+#include <CGAL/use.h>
+#include <new>
+#include <cstddef>                 // for std::size_t, std::ptrdiff_t
+
+namespace CGAL {
+namespace Linear_Algebra {
+
+template <typename ROW_, typename V_, typename R_, typename P_> 
+class column_iterator_ {
+  ROW_ row_; unsigned i_;
+public:
+  typedef column_iterator_ Self;
+  typedef V_  value_type;
+  typedef R_  reference;
+  typedef P_  pointer;
+  typedef std::size_t     size_type;
+  typedef std::ptrdiff_t  difference_type;
+  typedef std::random_access_iterator_tag iterator_category;
+
+  column_iterator_() : row_(),i_() {}
+  column_iterator_(ROW_ row, unsigned i) : row_(row),i_(i) {}
+
+  bool  operator==( const Self& x) const 
+  { return row_ == x.row_ && i_ == x.i_; }
+  bool  operator!=( const Self& x) const 
+  { return !(*this == x); }
+
+  R_ operator*()  const { return (**row_)[i_]; }
+  P_ operator->() const { return (**row_)+i_; }
+
+  Self& operator++() { ++row_; return *this; }
+  Self  operator++(int) 
+  { Self tmp = *this; ++*this; return tmp; }
+
+  Self& operator--() { --row_; return *this; }
+  Self  operator--(int) 
+  { Self tmp = *this; --*this; return tmp; }
+
+  Self operator+(difference_type i) const
+  { return Self(row_+i,i_); }
+  Self operator-(difference_type i) const
+  { return Self(row_-i,i_); }
+  difference_type operator-(const Self& x) const
+  { return (row_ - x.row_); }
+      
+};
+
+template <typename ROW_, typename V_, typename R_, typename P_> 
+class component_iterator_ {
+  ROW_ row_;  // pointer to row
+  int i_, n_; // offset and limit
+public:
+  typedef component_iterator_ Self;
+  typedef V_  value_type;
+  typedef R_  reference;
+  typedef P_  pointer;
+  typedef std::size_t     size_type;
+  typedef std::ptrdiff_t  difference_type;
+  typedef std::bidirectional_iterator_tag iterator_category;
+
+  component_iterator_() : row_(),i_(),n_() {}
+  component_iterator_(ROW_ row, int i, int n) 
+    : row_(row),i_(i),n_(n) {}
+
+  bool  operator==( const Self& x) const 
+  { return row_==x.row_ && i_==x.i_; }
+  bool  operator!=( const Self& x) const   
+  { return !(*this == x); }
+
+  R_    operator*()  const { return (**row_)[i_]; }
+  P_    operator->() const { return (**row_)+i_; }
+
+  Self& operator++() { ++i_; if (i_==n_) { ++row_; i_=0; } return *this; }
+  Self  operator++(int) { Self tmp = *this; ++*this; return tmp; }
+  Self& operator--() { --i_; if (i_<0) { --row_; i_=n_-1; } return *this; }
+  Self  operator--(int) { Self tmp = *this; --*this; return tmp; }
+     
+};
+
+
+/*{\Msubst
+<NT_,AL_>#
+<NT,AL>#
+Vector_#Vector
+Matrix_#Matrix
+}*/
+/*{\Moptions print_title=yes}*/
+/*{\Moptions outfile=Matrix.man}*/
+/*{\Manpage {Matrix}{}{Matrices with NT Entries}{M}}*/
+
+template <class NT_, class AL_>
+class Matrix_ 
+{ 
+/*{\Mdefinition An instance of data type |\Mname| is a matrix of
+variables of number type |NT|. The types |\Mname| and |Vector_|
+together realize many functions of basic linear algebra.}*/
+
+public:
+
+/*{\Mtypes 6}*/
+
+typedef Vector_<NT_,AL_>* vector_pointer;
+typedef const Vector_<NT_,AL_>* const_vector_pointer;
+
+typedef NT_ NT;
+/*{\Mtypemember the ring type of the components.}*/ 
+
+typedef component_iterator_<vector_pointer*,NT,NT&,NT*> iterator;
+/*{\Mtypemember bidirectional iterator for accessing all components
+row-wise.}*/
+typedef component_iterator_<vector_pointer*,NT,const NT&,const NT*> 
+  const_iterator;
+
+typedef NT* row_iterator;
+/*{\Mtypemember random access iterator for accessing row
+  entries.}*/
+typedef const NT* row_const_iterator;
+
+typedef column_iterator_<vector_pointer*,NT,NT&,NT*> column_iterator;
+/*{\Mtypemember random access iterator for accessing column entries.}*/ 
+typedef column_iterator_<vector_pointer*,NT,const NT&, const NT*> 
+  column_const_iterator;
+
+/*{\Mtext There also constant versions of the above iterators:
+|const_iterator|, |row_const_iterator|, and |column_const_iterator|.}*/
+
+class Identity {};
+/*{\Mtypemember a tag class for identity initialization}*/
+
+typedef Vector_<NT_,AL_> Vector;
+/*{\Mtypemember the vector type used.}*/ 
+
+protected:
+vector_pointer* v_; int dm_,dn_; 
+
+NT& elem(int i, int j) const { return v_[i]->v_[j]; }
+
+typedef typename AL_::template rebind<vector_pointer>::other 
+        allocator_type;
+static allocator_type MM;
+
+inline void allocate_mat_space(vector_pointer*& vi, int d)
+{
+  /* We use this procedure to allocate memory. We use our allocator
+     memory allocation scheme. There we first get an appropriate piece
+     of memory and then initialize each cell by an inplace new. */
+
+  vi = MM.allocate(d); 
+  vector_pointer* p = vi + d - 1; 
+  while (p >= vi) { 
+    new (p) vector_pointer*(0); p--;
+  }
+}
+
+inline void deallocate_mat_space(vector_pointer*& vi, int d)
+{
+  /* deallocate memory via our AL_ object. */
+
+  MM.deallocate(vi,d);
+  vi = (vector_pointer*)0;
+}
+
+inline void check_dimensions(const Matrix_<NT_,AL_>& mat) const
+{ 
+  CGAL_USE(mat);
+  CGAL_assertion_msg((dm_ == mat.dm_ && dn_ == mat.dn_), 
+    "Matrix::check_dimensions: incompatible matrix dimensions.") ;
+}
+
+public:
+
+/*{\Mcreation 5}*/
+
+Matrix_() : dm_(0),dn_(0) { v_ = (Vector**)0; }
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|.}*/
+Matrix_(int n); 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of
+dimension $n \times n$ initialized to the zero matrix.}*/
+Matrix_(int m, int n); 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of 
+dimension $m \times n$ initialized to the zero matrix.}*/
+Matrix_(std::pair<int,int> p);
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of dimension
+|p.first|$\times$|p.second| initialized to the zero matrix.}*/
+Matrix_(int n , const Identity&, const NT& x = NT(1) ); 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of
+dimension $n \times n$ initialized to the identity matrix
+(times |x|).}*/
+Matrix_(int m, int n, const NT& x);
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| of 
+dimension $m \times n$ initialized to the matrix with |x|
+entries.}*/
+
+template <class RAIterator>
+void range_initialize(RAIterator first, RAIterator last,  
+                      std::random_access_iterator_tag) 
+{ typedef typename std::iterator_traits<RAIterator>::value_type value_type;
+  typedef typename value_type::const_iterator const_iterator;
+  dn_ = static_cast<int>(last-first);
+  if (dn_ == 0) { dm_=0; v_=0; return; }
+  dm_ = first->dimension(); 
+  if (dm_ > 0) { 
+    int i,j;
+    allocate_mat_space(v_,dm_);
+    for (i=0; i<dm_; i++) {
+      v_[i] = new Vector(dn_);
+      // for (int j = 0; j < dn_; j++) elem(i,j) = (*(first+j))[i];
+    }
+    const_iterator it;
+    for (j=0; first != last; ++j, ++first) // column wise
+      for (i=0, it=first->begin(); it != first->end(); ++i, ++it) // row wise
+        elem(i,j) = *it;
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class InputIterator>
+void range_initialize(InputIterator first, InputIterator last, 
+                 std::forward_iterator_tag) 
+{ typedef typename std::iterator_traits<InputIterator>::value_type 
+    value_type;
+  std::vector<value_type> V(first,last);
+  range_initialize(V.begin(),V.end(),std::random_access_iterator_tag());
+}
+
+template <class Forward_iterator>
+Matrix_(Forward_iterator first, Forward_iterator last)
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. Let $S$ be
+the ordered set of $n$ column-vectors of common dimension $m$ as given
+by the iterator range |[first,last)|.  |\Mvar| is initialized to an $m
+\times n$ matrix with the columns as specified by $S$.  \precond
+|Forward_iterator| has a value type |V| from which we require to
+provide a iterator type |V::const_iterator|, to have |V::value_type ==
+NT|.\\ Note that |Vector_| or |std::vector<NT>| fulfill these
+requirements.}*/
+{ typedef typename std::iterator_traits<Forward_iterator>::iterator_category 
+    iterator_category;
+  range_initialize(first,last,iterator_category()); }
+
+Matrix_(const std::vector< Vector >& A) 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. Let $A$ be
+an array of $n$ column-vectors of common dimension $m$.  |\Mvar| is
+initialized to an $m \times n$ matrix with the columns as specified by
+$A$. }*/
+{ range_initialize(A.begin(),A.end(),
+    std::random_access_iterator_tag()); }
+
+Matrix_(const Matrix_<NT_,AL_>&); 
+
+Matrix_(const Vector&); 
+/* creates a $d \times 1$ matrix */
+
+Matrix_(int, int, NT**); 
+
+Matrix_<NT_,AL_>& operator=(const Matrix_<NT_,AL_>&);
+
+~Matrix_(); 
+
+/*{\Moperations 3 4}*/
+
+int row_dimension()  const {  return dm_; }
+/*{\Mop returns $n$, the number of rows of |\Mvar|.}*/
+
+int column_dimension()  const { return dn_; }
+/*{\Mop returns $m$, the number of columns of |\Mvar|.}*/
+
+std::pair<int,int> dimension() const 
+/*{\Mop returns $(m,n)$, the dimension pair of |\Mvar|.}*/
+{ return std::pair<int,int>(dm_,dn_); }
+
+Vector& row(int i) const
+/*{\Mop returns the $i$-th row of |\Mvar| (an $m$ - vector).\\
+\precond  $0 \le i \le m - 1$. }*/
+{ CGAL_assertion_msg((0<=i && i<dm_),"Matrix_: row index out of range.");
+  return *v_[i]; 
+}
+
+Vector column(int i) const 
+/*{\Mop returns the $i$-th column of |\Mvar| (an $n$ - vector).\\
+\precond  $0 \le i \le n - 1$. }*/
+{ return Vector(column_begin(i),column_end(i)); }
+
+Vector to_vector() const 
+{ 
+  CGAL_assertion_msg((dn_==1), 
+    "Matrix_::to_vector: cannot make vector from matrix.");
+  return column(0); 
+}
+
+Vector_<NT_,AL_>& operator[](int i) const  
+{ 
+  CGAL_assertion_msg((0<=i && i<dm_), 
+    "Matrix_::operator[]: index out of range.");
+  return row(i); 
+}
+
+NT& operator()(int i, int j)
+/*{\Mfunop returns $M_{ i,j }$. \\
+\precond $0\le i\le m-1$ and $0\le j\le n-1$. }*/
+{ CGAL_assertion_msg((0<=i && i<dm_), 
+    "Matrix_::operator(): row index out of range.");
+  CGAL_assertion_msg((0<=j && j<dn_), 
+    "Matrix_::operator(): column index out of range.");
+  return elem(i,j); 
+}
+
+NT operator()(int i, int j) const
+{ 
+  CGAL_assertion_msg((0<=i && i<dm_), 
+    "Matrix_::operator(): row index out of range.");
+  CGAL_assertion_msg((0<=j && j<dn_), 
+    "Matrix_::operator(): column index out of range.");
+  return elem(i,j); 
+}
+
+void swap_rows(int i, int j)
+/*{\Mop swaps rows $i$ and $j$.
+\precond $0\le i\le m-1$ and $0\le j\le m-1$.}*/
+{ CGAL_assertion(0<=i && i<dm_ && 0<=j && j<dm_);
+  std::swap(v_[i],v_[j]); 
+}
+
+void swap_columns(int i, int j) 
+/*{\Mop swaps columns $i$ and $j$.
+\precond $0\le i\le n-1$ and $0\le j\le n-1$.}*/
+{ CGAL_assertion(0<=i && i<dn_ && 0<=j && j<dn_);
+  for(int l = 0; l < dm_; l++) std::swap(elem(l,i),elem(l,j)); 
+}
+
+row_iterator row_begin(int i) 
+/*{\Mop an iterator pointing to the first entry of the $i$th row.
+\precond $0\le i\le m-1$.}*/
+{ CGAL_assertion_msg((0<=i&&i<dm_),"Matrix: row index out of range.");
+  return v_[i]->begin(); }
+
+row_iterator row_end(int i)   
+/*{\Mop an iterator pointing beyond the last entry of the $i$th row.
+\precond $0\le i\le m-1$.}*/
+{ CGAL_assertion_msg((0<=i&&i<dm_),"Matrix: row index out of range.");
+  return v_[i]->end(); }
+
+row_const_iterator row_begin(int i) const 
+{ CGAL_assertion_msg(0<=i&&i<dm_,"Matrix: row index out of range.");
+  return v_[i]->begin(); }
+row_const_iterator row_end(int i) const  
+{ CGAL_assertion_msg(0<=i&&i<dm_,"Matrix: row index out of range.");
+  return v_[i]->end(); }
+
+column_iterator column_begin(int i) 
+/*{\Mop an iterator pointing to the first entry of the $i$th column.
+\precond $0\le i\le n-1$.}*/
+{ CGAL_assertion_msg(0<=i&&i<dn_,"Matrix: column index out of range.");
+  return column_iterator(v_,i); }
+
+column_iterator column_end(int i)   
+/*{\Mop an iterator pointing beyond the last entry of the $i$th column.
+\precond $0\le i\le n-1$.}*/
+{ return column_begin(i)+dm_; }
+
+column_const_iterator column_begin(int i) const 
+{ CGAL_assertion_msg(0<=i&&i<dn_,"Matrix: column index out of range.");
+  return column_const_iterator(v_,i); }
+column_const_iterator column_end(int i)   const 
+{ return column_begin(i)+dm_; }
+
+iterator begin() { return iterator(v_,0,dn_); }
+/*{\Mop an iterator pointing to the first entry of |\Mvar|.}*/
+iterator end() { return iterator(v_+dm_,0,dn_); }
+/*{\Mop an iterator pointing beyond the last entry of |\Mvar|.}*/
+
+const_iterator begin() const { return const_iterator(v_,0,dn_); }
+const_iterator end() const { return const_iterator(v_+dm_,0,dn_); }
+
+/*{\Mtext The same operations exist for |row_const_iterator| and
+|column_const_iterator|.}*/
+
+bool  operator==(const Matrix_<NT_,AL_>& M1)  const; 
+/*{\Mbinop Test for equality. }*/
+
+bool  operator!=(const Matrix_<NT_,AL_>& M1)  const 
+/*{\Mbinop Test for inequality. }*/
+{ return !(*this == M1); }
+
+/*{\Mtext \headerline{Arithmetic Operators}}*/
+/*{\Mtext
+\settowidth{\typewidth}{|Matrix_<NT,LA>m|}
+\addtolength{\typewidth}{\colsep}
+\callwidth2cm
+\computewidths
+\newcommand{\dimeq}[2]{ 
+\\|M.row_dimension() == M1.row_dimension()| and
+\\|M.column_dimension() == M1.column_dimension()|
+}
+}*/
+
+Matrix_<NT_,AL_> operator+ (const Matrix_<NT_,AL_>& M1); 
+/*{\Mbinop Addition. \precond \dimeq.}*/
+
+Matrix_<NT_,AL_> operator- (const Matrix_<NT_,AL_>& M1); 
+/*{\Mbinop Subtraction. \precond \dimeq.}*/
+
+Matrix_<NT_,AL_> operator-(); // unary
+/*{\Munop Negation.}*/
+
+Matrix_<NT_,AL_>& operator-=(const Matrix_<NT_,AL_>&); 
+
+Matrix_<NT_,AL_>& operator+=(const Matrix_<NT_,AL_>&); 
+
+Matrix_<NT_,AL_> operator*(const Matrix_<NT_,AL_>& M1) const; 
+/*{\Mbinop Multiplication. \precond \\ |\Mvar.column_dimension() = M1.row_dimension()|. }*/
+
+Vector_<NT_,AL_> 
+operator*(const Vector_<NT_,AL_>& vec) const
+{  return ((*this) * Matrix_<NT_,AL_>(vec)).to_vector(); }
+/*{\Mbinop  Multiplication with vector. \precond \\
+|\Mvar.column_dimension() = vec.dimension()|.}*/
+
+Matrix_<NT_,AL_> compmul(const NT& x) const; 
+
+static int compare(const Matrix_<NT_,AL_>& M1, 
+                   const Matrix_<NT_,AL_>& M2);
+
+}; // end of class
+
+/*{\Xtext \headerline{Input and Output}}*/
+
+template <class NT_, class AL_> 
+std::ostream&  operator<<(std::ostream& os, const Matrix_<NT_,AL_>& M);
+/*{\Xbinopfunc writes matrix |\Mvar| row by row to the output stream |os|.}*/
+
+template <class NT_, class AL_> 
+std::istream&  operator>>(std::istream& is, Matrix_<NT_,AL_>& M);
+/*{\Xbinopfunc reads matrix |\Mvar| row by row from the input stream |is|.}*/
+
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(int dim) : dm_(dim),dn_(dim)
+{ 
+  CGAL_assertion_msg((dim >= 0), 
+    "Matrix_::constructor: negative dimension.");
+  if (dm_ > 0) { 
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; i++) 
+      v_[i] = new Vector(dn_);
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(int dim1, int dim2) : dm_(dim1),dn_(dim2)
+{ 
+  CGAL_assertion_msg((dim1>=0 && dim2>=0), 
+    "Matrix_::constructor: negative dimension.");
+
+  if (dm_ > 0) { 
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; i++) 
+      v_[i] = new Vector(dn_); 
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(std::pair<int,int> p) : dm_(p.first),dn_(p.second)
+{ 
+  CGAL_assertion_msg((dm_>=0 && dn_>=0), 
+    "Matrix_::constructor: negative dimension.");
+  if (dm_ > 0) { 
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; i++) 
+      v_[i] = new Vector(dn_); 
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(int dim, const Identity&, const NT& x) : dm_(dim),dn_(dim)
+{ CGAL_assertion_msg((dim >= 0),
+    "matrix::constructor: negative dimension.");
+  if (dm_ > 0) { 
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; i++) 
+      v_[i] = new Vector(dn_); 
+    if (x!=NT(0)) for (int i=0; i<dm_; ++i) elem(i,i)=x;
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(int dim1, int dim2, const NT& x) : dm_(dim1),dn_(dim2)
+{ CGAL_assertion_msg((dim1>=0 && dim2>=0), 
+    "Matrix_::constructor: negative dimension.");
+  if (dm_ > 0) { 
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; ++i) v_[i] = new Vector(dn_,x);
+  } else 
+    v_ = (Vector**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(const Matrix_<NT_,AL_>& p) : dm_(p.dm_),dn_(p.dn_)
+{ if (dm_ > 0) {  
+    allocate_mat_space(v_,dm_);
+    for (int i=0; i<dm_; i++) 
+      v_[i] = new Vector(*p.v_[i]); 
+  }
+  else 
+    v_ = (Vector_<NT_,AL_>**)0; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(const Vector& v) : dm_(v.d_),dn_(1)
+{ if (dm_>0) allocate_mat_space(v_,dm_);
+  else v_ = (Vector_<NT_,AL_>**)0; 
+  for(int i = 0; i < dm_; i++) { 
+    v_[i] = new Vector(1); 
+    elem(i,0) = v[i]; 
+  }
+}
+
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+Matrix_(int dim1, int dim2, NT** p) : dm_(dim1),dn_(dim2)
+{ 
+  CGAL_assertion_msg((dim1 >= 0 && dim2 >= 0), 
+    "Matrix_::constructor: negative dimension.");
+  if (dm_ > 0) {
+    allocate_mat_space(v_,dm_);
+    for(int i=0; i<dm_; i++) { 
+      v_[i] = new Vector_<NT_,AL_>(dn_); 
+      for(int j=0; j<dn_; j++) 
+        elem(i,j) = p[i][j]; 
+    }
+  } else 
+    v_ = (Vector_<NT_,AL_>**)0; 
+}
+
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
+operator=(const Matrix_<NT_,AL_>& mat)
+{ 
+  if (&mat == this)
+    return *this;
+
+  int i,j; 
+  if (dm_ != mat.dm_ || dn_ != mat.dn_) { 
+    for(i=0; i<dm_; i++) delete v_[i]; 
+    if (v_) deallocate_mat_space(v_,dm_);
+
+    dm_ = mat.dm_; dn_ = mat.dn_; 
+    if (dm_>0)
+      allocate_mat_space(v_,dm_);
+    for(i = 0; i < dm_; i++) 
+      v_[i] = new Vector(dn_); 
+  }
+
+  for(i = 0; i < dm_; i++)
+    for(j = 0; j < dn_; j++) 
+      elem(i,j) = mat.elem(i,j); 
+  return *this; 
+}
+
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>::
+~Matrix_()  
+{ 
+  if (v_) {
+    for (int i=0; i<dm_; i++) 
+      delete v_[i];  
+    deallocate_mat_space(v_,dm_);
+  }
+}
+
+
+template <class NT_, class AL_>
+inline bool Matrix_<NT_,AL_>::
+operator==(const Matrix_<NT_,AL_>& x) const
+{ 
+  int i,j; 
+  if (dm_ != x.dm_ || dn_ != x.dn_) 
+    return false; 
+
+  for(i = 0; i < dm_; i++)
+    for(j = 0; j < dn_; j++)
+      if (elem(i,j) != x.elem(i,j)) 
+        return false; 
+  return true; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
+operator+ (const Matrix_<NT_,AL_>& mat)
+{ 
+  int i,j; 
+  check_dimensions(mat); 
+  Matrix_<NT_,AL_> result(dm_,dn_); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      result.elem(i,j) = elem(i,j) + mat.elem(i,j); 
+  return result; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
+operator- (const Matrix_<NT_,AL_>& mat)
+{ 
+  int i,j; 
+  check_dimensions(mat); 
+  Matrix_<NT_,AL_> result(dm_,dn_); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      result.elem(i,j) = elem(i,j) - mat.elem(i,j); 
+  return result; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
+operator- ()  // unary
+{ 
+  int i,j; 
+  Matrix_<NT_,AL_> result(dm_,dn_); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      result.elem(i,j) = -elem(i,j); 
+  return result; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
+operator-= (const Matrix_<NT_,AL_>& mat) 
+{ 
+  int i,j; 
+  check_dimensions(mat); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      elem(i,j) -= mat.elem(i,j); 
+  return *this; 
+}
+
+template <class NT_, class AL_>
+Matrix_<NT_,AL_>& Matrix_<NT_,AL_>::
+operator+= (const Matrix_<NT_,AL_>& mat) 
+{ 
+  int i,j; 
+  check_dimensions(mat); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      elem(i,j) += mat.elem(i,j); 
+  return *this; 
+}
+
+template <class NT_, class AL_>
+inline Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
+operator*(const Matrix_<NT_,AL_>& M1) const
+{ CGAL_assertion_msg((dn_==M1.dm_), 
+    "Matrix_::operator*: incompatible matrix types."); 
+  Matrix_<NT_,AL_> result(dm_,M1.dn_); 
+  int i,j,l;
+  for (i=0; i<dm_; ++i)
+    for (j=0; j<M1.dn_; ++j)
+      for (l=0; l<dn_; ++l)
+        result.elem(i,j) += elem(i,l)*M1.elem(l,j);
+  return result;
+}
+
+template <class NT_, class AL_>
+inline Matrix_<NT_,AL_> Matrix_<NT_,AL_>::
+compmul(const NT& f) const
+{ 
+  int i,j; 
+  Matrix_<NT_,AL_> result(dm_,dn_); 
+  for(i=0; i<dm_; i++)
+    for(j=0; j<dn_; j++)
+      result.elem(i,j) = elem(i,j) *f; 
+  return result; 
+}
+
+
+template <class NT, class AL>
+
+Matrix_<NT,AL>  operator*(const NT& x, const Matrix_<NT,AL>& M)
+/*{\Mbinopfunc Multiplication of every entry with |x|. }*/
+{ return M.compmul(x); }
+
+template <class NT, class AL>
+
+Matrix_<NT,AL>  operator*(const Matrix_<NT,AL>& M, const NT& x)
+/*{\Mbinopfunc Multiplication of every entry with |x|. }*/
+{ return M.compmul(x); }
+
+
+
+template <class NT_, class AL_> 
+int Matrix_<NT_,AL_>::
+compare(const Matrix_<NT_,AL_>& M1, const Matrix_<NT_,AL_>& M2) 
+{ int i; int res;
+  M1.check_dimensions(M2);
+  for(i=0; i < M1.row_dimension() && 
+      (res = compare(M1.row(i),M2.row(i))) != 0; i++) {}
+  return res;
+}
+
+
+template <class NT_, class AL_> 
+std::ostream&  operator<<(std::ostream& os, const Matrix_<NT_,AL_>& M)
+{ 
+  /* syntax: d1 d2 
+             x_0,0    ... x_0,d1-1
+                  d2-times
+             x_d2-1,0 ... x_d2-1,d1-1 */
+
+    int d = M.row_dimension();
+    int k = M.column_dimension();
+    switch (get_mode(os)) {
+    case CGAL::IO::BINARY:
+        CGAL::write( os, d);
+        CGAL::write( os, k);
+        for ( int i = 0; i < d; ++i) {
+            for ( int j = 0; j < k; ++j) {
+                CGAL::write( os, M[i][j]);
+            }
+        }
+        break;
+    case CGAL::IO::ASCII:
+        os << d << ' ' << k;
+        for ( int i = 0; i < d; ++i) {
+            for ( int j = 0; j < k; ++j) {
+                os << ' ' << M[i][j];
+            }
+        }
+        break;
+    case CGAL::IO::PRETTY:
+        os << "LA::Matrix((" << d << ", " << k << " [";
+        for ( int i = 0; i < d; ++i) {
+            for ( int j = 0; j < k; ++j) {
+                if ( j != 0)
+                    os << ',' << ' ';
+                os << M[i][j];
+            }
+            if ( i != d)
+                os << ",\n";
+        }
+        os << "])";
+        break;
+    }
+    return os;
+}
+
+template <class NT_, class AL_> 
+std::istream&  operator>>(std::istream& is, Matrix_<NT_,AL_>& M) 
+{ 
+  /* syntax: d1 d2 
+             x_0,0  ... x_0,d1-1
+                  d2-times
+             x_d2,0 ... x_d2,d1-1 */
+
+  int cdim, rdim, i;
+  switch(get_mode(is)) {
+    case CGAL::IO::BINARY : 
+      CGAL::read(is,rdim);
+      CGAL::read(is,cdim);
+      for (i=0; i<rdim*cdim; ++i)
+        CGAL::read(is,M(i/rdim,i%cdim));
+      break;
+    case CGAL::IO::ASCII :
+      is >> rdim >> cdim;
+      M = Matrix_<NT_,AL_>(rdim,cdim);
+      for (i=0; i<rdim*cdim; ++i)
+        is >> M(i/rdim,i%cdim);
+      break; 
+    default:
+      std::cerr<<"\nStream must be in ascii or binary mode"<<std::endl;
+      break;
+  }
+  return is;
+}
+
+template <class NT_, class AL_>
+typename Matrix_<NT_,AL_>::allocator_type Matrix_<NT_,AL_>::MM;
+
+
+/*{\Ximplementation 
+The data type |\Mname| is implemented by two-dimensional arrays of
+variables of type |NT|. The memory layout is row oriented. Operation
+|column| takes time $O(n)$, |row|, |dim1|, |dim2| take constant time,
+and all other operations take time $O(nm)$.  The space requirement is
+$O(nm)$.}*/
+
+
+} // Linear_Algebra
+} // CGAL
+
+#endif // CGAL_MATRIX___H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PVDHACd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PVDHACd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PVDHACd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PVDHACd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PVDHAHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PVDHAHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PVDHAHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PVDHAHd_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Pair_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Pair_d.h
new file mode 100644
index 0000000..e91abb3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Pair_d.h
@@ -0,0 +1,97 @@
+// Copyright (c) 1997-2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+#ifndef CGAL_PAIR_D_H
+#define CGAL_PAIR_D_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle_for.h>
+
+namespace CGAL {
+
+template <class R> class Segment_d;
+template <class R> class Ray_d;
+template <class R> class Line_d;
+
+template <class R> 
+class Pair_d 
+{
+  typedef Pair_d<R> Self;
+  typedef typename R::Point_d Point_d;
+  typedef typename R::Vector_d Vector_d;
+  typedef typename R::Direction_d Direction_d;
+  Point_d _p[2];
+
+  friend class Line_d<R>; 
+  friend class Ray_d<R>; 
+  friend class Segment_d<R>; 
+   
+/* Any line object in $d$ - space is defined by two points |_p1| and |_p2|
+respectively. There exists an orientation from _p1 to _p2. */
+
+public: 
+Pair_d(int d = 0) { _p[0]=_p[1]=Point_d(d); }
+
+Pair_d(const Point_d& p, const Point_d& q)
+{ CGAL_assertion_msg((p.dimension() == q.dimension()), 
+  "Pair_d::constructor: source and target must have the same dimension."); 
+  _p[0]=p; _p[1]=q;
+}
+
+bool is_degenerate() const
+{ return (_p[0] == _p[1]); }
+
+Vector_d vector() const 
+{ return (_p[1] - _p[0]); }
+
+Direction_d direction() const
+{ return vector().direction(); }
+
+void read(std::istream& is)
+{ 
+  switch( get_mode(is) ) {
+    case CGAL::IO::ASCII :
+      is >> _p[0] >> _p[1]; break;
+    case CGAL::IO::BINARY :
+      CGAL::read(is, _p[0]); CGAL::read(is, _p[1]); break;
+    default:
+    CGAL_error_msg("\nStream must be in ascii or binary mode\n"); 
+  }
+}
+
+void print(std::ostream& os, const char* _name) const
+{ 
+  switch( get_mode(os) ) {
+    case CGAL::IO::ASCII :
+      os << _p[0] << " " <<  _p[1]; break;
+    case CGAL::IO::BINARY :
+      CGAL::write(os, _p[0]); CGAL::write(os, _p[1]); break;
+    default :
+      os << _name << "(" << _p[0] << ", " << _p[1] << ")"; break;
+  }
+}
+
+}; // Pair_d<R>
+
+} //namespace CGAL
+#endif //CGAL_PAIR_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointCd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointCd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointCd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointCd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/PointHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/PointHd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Point_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Point_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Point_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Point_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Ray_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Ray_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Ray_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Ray_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Segment_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Segment_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Segment_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Segment_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Sphere_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Sphere_d.h
new file mode 100644
index 0000000..c250afa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Sphere_d.h
@@ -0,0 +1,340 @@
+// Copyright (c) 2000,2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel
+
+#ifndef CGAL_SPHERE_D_H
+#define CGAL_SPHERE_D_H
+
+#include <CGAL/basic.h>
+#include <vector>
+#include <CGAL/Dimension.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+template <class R> class Sphere_d;
+template <class R> bool equal_as_sets(const Sphere_d<R>&, const Sphere_d<R>&);
+
+template <class R>
+class  Sphere_d_rep  {
+
+  typedef typename R::Point_d Point_d;
+
+  friend class Sphere_d<R>;
+  friend bool equal_as_sets <>
+    (const Sphere_d<R>&, const Sphere_d<R>&);
+
+  std::vector< Point_d > P; // d+1 defining points, index range 0-d
+  Orientation orient;       // orientation(P)
+  Point_d* cp;              // pointer to center (lazy calculated)
+  
+public:
+  Sphere_d_rep() : cp(0) {}
+  Sphere_d_rep(int d)  : P(d), cp(0) {}
+
+  template <class ForwardIterator>
+  Sphere_d_rep(int d, ForwardIterator first, ForwardIterator last) : 
+     P(first,last), cp(0)
+  { TUPLE_DIM_CHECK(P.begin(),P.end(),Sphere_d);
+    CGAL_assertion(d+1==int(P.size()));
+    CGAL_USE(d);
+    typename R::Orientation_d orientation_;
+    orient = orientation_(P.begin(),P.end()); }
+
+  ~Sphere_d_rep() { if (cp) delete cp; }
+
+};  // Sphere_d_rep<R>
+
+/*{\Manpage {Sphere_d}{R}{Simple Spheres}{S}}*/ 
+
+template <class R_>
+class Sphere_d : public Handle_for< Sphere_d_rep<R_> > {
+
+/*{\Mdefinition 
+An instance $S$ of the data type |Sphere_d| is an oriented sphere in
+some $d$-dimensional space. A sphere is defined by $d+1$ points with
+rational coordinates (class |Point_d<R>|). We use $A$ to denote the
+array of the defining points.  A set $A$ of defining points is
+\emph{legal} if either the points are affinely independent or if the
+points are all equal. Only a legal set of points defines a sphere in
+the geometric sense and hence many operations on spheres require the
+set of defining points to be legal.  The orientation of $S$ is equal
+to the orientation of the defining points, i.e., |orientation(A)|. }*/
+
+public: 
+  typedef CGAL::Dynamic_dimension_tag Ambient_dimension;
+  typedef CGAL::Dynamic_dimension_tag Feature_dimension;
+
+/*{\Mtypes 4}*/
+
+typedef Sphere_d_rep<R_>  Rep;
+typedef Handle_for<Rep>   Base;
+typedef Sphere_d<R_>      Self;
+typedef typename R_::Point_d Point_d;
+
+using Base::ptr;
+
+Sphere_d(const Base& b) : Base(b) {}
+
+typedef R_ R;
+/*{\Mtypemember the representation type.}*/
+
+typedef typename R::RT RT;
+/*{\Mtypemember the ring type.}*/
+
+typedef typename R::FT FT;
+/*{\Mtypemember the field type.}*/
+
+typedef typename R::LA LA;
+/*{\Mtypemember the linear algebra layer.}*/
+
+typedef typename std::vector< Point_d >::const_iterator point_iterator;
+/*{\Mtypemember a read-only iterator for points defining the sphere.}*/
+
+/*{\Mcreation 4}*/ 
+
+Sphere_d(int d = 0) : Base( Rep(d+1) ) 
+/*{\Mcreate introduces a variable |\Mvar| of type |\Mname|. |\Mvar|
+is initialized to the empty sphere centered at the origin of
+$d$-dimensional space. }*/
+{ 
+  Point_d p(d);
+  for (int i = 0; i <= d; i++) ptr()->P[i] = p;
+  ptr()->orient = ZERO;
+  ptr()->cp = new Point_d(p); 
+}
+
+template <class ForwardIterator>
+Sphere_d(int d, ForwardIterator first, ForwardIterator last) :
+/*{\Mcreate introduces a variable |\Mvar| of type |\Mname|. |\Mvar| is
+initialized to the sphere through the points in |A = set [first,last)|. 
+\precond $A$ consists of $d+1$ $d$-dimensional points.}*/
+  Base( Rep(d,first,last) ) {}
+
+Sphere_d(const Self& c) : Base(c) {}
+~Sphere_d() {}
+
+/*{\Moperations 4 3}*/
+
+int dimension() const 
+/*{\Mop returns the dimension of |\Mvar|.}*/
+  { return static_cast<int>(ptr()->P.size()) - 1; }
+
+Point_d point(int i) const
+/*{\Mop returns the $i$-th defining point. \precond $0 \le i \le |dim|$.}*/
+{ CGAL_assertion_msg((0<=i && i<=dimension()), 
+    "Sphere_d::point(): index out of range.");
+  return ptr()->P[i]; 
+}
+
+point_iterator points_begin() const { return ptr()->P.begin(); }
+/*{\Mop returns an iterator pointing to the first defining point.}*/
+
+point_iterator points_end() const { return ptr()->P.end(); }
+/*{\Mop returns an iterator pointing beyond the last defining point.}*/
+
+bool is_degenerate() const { return (ptr()->orient == CGAL::ZERO); }
+/*{\Mop returns true iff the defining points are not full dimenional.}*/
+
+bool is_legal() const
+/*{\Mop returns true iff the set of defining points is legal.
+A set of defining points is legal iff their orientation is
+non-zero or if they are all equal.}*/
+{ if (ptr()->orient != ZERO ) return true;
+  const std::vector< Point_d >& A = ptr()->P;
+  Point_d po = A[0];
+  for (int i = 1; i < int(A.size()); ++i) 
+    if (A[i] != po) return false;
+  return true;
+}
+
+Point_d center() const
+/*{\Mop  returns the center of |\Mvar|. \precond The orientation 
+of |\Mvar| is non-zero. }*/
+{ 
+  if (ptr()->cp == 0) {
+    if (ptr()->orient == 0) {
+      const std::vector< Point_d >& A = ptr()->P;
+      Point_d po = A[0];
+      for (int i = 1; i < int(A.size()); ++i) 
+        if (A[i] != po)
+          CGAL_error_msg("Sphere_d::center(): points are illegal.");
+      const_cast<Self&>(*this).ptr()->cp = new Point_d(A[0]);
+      return *(ptr()->cp);
+    }
+    typename R::Center_of_sphere_d center_of_sphere_;
+    const_cast<Self&>(*this).ptr()->cp = 
+      new Point_d(center_of_sphere_(points_begin(),points_end()));
+  }
+  return *(ptr()->cp);
+}
+
+
+
+FT squared_radius() const
+/*{\Mop returns the squared radius of the sphere.}*/
+{ if (is_degenerate()) return 0;
+  return (point(0)-center()).squared_length();
+}
+
+Orientation orientation()  const { return ptr()->orient; }
+/*{\Mop returns the orientation of |\Mvar|.}*/
+
+Oriented_side oriented_side(const Point_d& p) const
+/*{\Mop returns either the constant |ON_ORIENTED_BOUNDARY|,
+|ON_POSITIVE_SIDE|, or |ON_NEGATIVE_SIDE|, iff p lies on the boundary,
+properly on the positive side, or properly on the negative side of
+circle, resp.}*/ 
+{ typename R::Side_of_oriented_sphere_d side; 
+  return side(points_begin(),points_end(),p); }
+
+Bounded_side bounded_side(const Point_d& p) const
+/*{\Mop returns |ON_BOUNDED_SIDE|, |ON_BOUNDARY|, or
+|ON_UNBOUNDED_SIDE| iff p lies properly inside, on
+ the boundary, or properly outside of circle, resp.}*/
+{ typename R::Side_of_bounded_sphere_d side;
+  return side(points_begin(),points_end(),p); }
+
+bool has_on_positive_side (const Point_d& p) const
+/*{\Mop returns |\Mvar.oriented_side(p)==ON_POSITIVE_SIDE|.}*/
+{ return oriented_side(p) == ON_POSITIVE_SIDE; }
+
+bool has_on_negative_side (const Point_d& p) const
+/*{\Mop returns |\Mvar.oriented_side(p)==ON_NEGATIVE_SIDE|.}*/
+{ return oriented_side(p) == ON_NEGATIVE_SIDE; }
+
+bool has_on_boundary (const Point_d& p) const
+/*{\Mop returns |\Mvar.oriented_side(p)==ON_ORIENTED_BOUNDARY|,
+which is the same as |\Mvar.bounded_side(p)==ON_BOUNDARY|.}*/
+{ return oriented_side(p) == ON_ORIENTED_BOUNDARY; }
+
+bool has_on_bounded_side (const Point_d& p) const
+/*{\Mop returns |\Mvar.bounded_side(p)==ON_BOUNDED_SIDE|.}*/
+{ return (int(ptr()->orient) * int(oriented_side(p))) > 0 ; }
+
+bool has_on_unbounded_side (const Point_d& p) const
+/*{\Mop returns |\Mvar.bounded_side(p)==ON_UNBOUNDED_SIDE|.}*/
+{ return (int(ptr()->orient) * int(oriented_side(p))) < 0; }
+
+Sphere_d<R> opposite() const
+/*{\Mop returns the sphere with the same center and squared
+  radius as |\Mvar| but with opposite orientation.}*/
+{ CGAL_assertion(dimension()>1);
+  if (is_degenerate()) return *this;
+  std::vector< Point_d > V(points_begin(),points_end());
+  std::swap(V[0],V[1]);
+  return Sphere_d<R>(dimension(),V.begin(),V.end());
+}
+
+Sphere_d<R> transform(const Aff_transformation_d<R>& t) const
+/*{\Mopl returns $t(s)$. }*/ 
+{ std::vector< Point_d > B(points_begin(),points_end());
+  typename std::vector< Point_d >::iterator it;
+  for (it = B.begin(); it != B.end(); ++it)
+    *it = it->transform(t);
+  return Sphere_d<R>(dimension(),B.begin(),B.end());
+}
+
+Sphere_d<R> operator+(const Vector_d<R>& v) const
+/*{\Mbinop returns the sphere translated by |v|. }*/ 
+{ std::vector< Point_d > B(points_begin(),points_end());
+  typename std::vector< Point_d >::iterator it;
+  for (it = B.begin(); it != B.end(); ++it) it->operator+=(v);
+  return Sphere_d<R>(dimension(),B.begin(),B.end());
+}
+
+bool operator==(const Sphere_d<R>& D) const
+{ if (this->identical(D)) return true;
+  if (dimension() != D.dimension()) return false;
+  return (center()==D.center() &&
+          squared_radius() == D.squared_radius() &&
+          orientation() == D.orientation());
+}
+
+bool operator!=(const Sphere_d<R>& D) const 
+{ return !operator==(D); }
+
+
+}; // end of class Sphere_d
+
+/*{\Mtext \headerline{Non-Member Functions} }*/
+template <class R>
+bool weak_equality(const Sphere_d<R>& s1, const Sphere_d<R>& s2)
+/*{\Mfunc Test for equality as unoriented spheres.}*/
+{ if (s1.identical(s2)) return true;
+  if (s1.dimension() != s2.dimension()) return false;
+  return (s1.center()==s2.center() &&
+          s1.squared_radius() == s2.squared_radius());
+}
+
+/*{\Mimplementation Spheres are implemented by a vector of points as
+an item type.  All operations like creation, initialization, tests,
+input and output of a sphere $s$ take time
+$O(|s.dimension()|)$. |dimension()|, point access take constant time.
+The space requirement for spheres is $O(|s.dimension()|)$ 
+neglecting the storage room of the points.}*/
+
+template <class R>
+std::ostream& operator<<(std::ostream& os, const CGAL::Sphere_d<R>& s) 
+{ typedef typename Sphere_d<R>::point_iterator iterator;
+  os << s.dimension()+1 << " ";
+  for (iterator it=s.points_begin(); it!=s.points_end(); ++it)
+    os << *it << " ";
+  return os;
+} 
+
+template <class R> std::istream&  
+operator>>(std::istream& is, CGAL::Sphere_d<R>& s) 
+{ int d; is >> d;
+  std::vector< Point_d<R> > V(d);
+  Point_d<R> p;
+  while ( d-- ) { 
+    if (!(is >> p)) return is;
+    V[d] = p; 
+  }
+  s = Sphere_d<R>(static_cast<int>(V.size())-1, V.begin(), V.end() );
+  return is;
+}
+
+
+/*
+The center is only defined if the set of defining points are
+legal. If the defining points are all equal the sphere is trivial. So
+assume otherwise. Then the center $c$ is the unique point with equal
+distance to all the defining points. A point $c$ has equal distance to
+point $p_0$ and $p_i$ if it lies on the perpendicual bisector of $p_d$
+and $p_i$, i.e., if it satiesfies the plane equation $(p_i - p_d)^T c
+= (p_i - p_d) (p_i + p_d)/2$. Note that $p_i - p_d$ is the normal
+vector of the bisector hyperplane and $(p_i + p_d)/2$ is the midpoint
+of $p_d$ and $p_i$. The equation above translates into the equation \[
+\sum_{0 \le j < d} 2*p_{dd}p_{id}(p_{ij}p_{dd} - p_{dj}p_{id})c_j/c_d
+= \sum_{0 \le j < d} (p_{ij}p_{dd} - p_{dj}p_{id})(p_{ij}p_{dd} +
+p_{dj}p_{id}) \] for the homogeneous coordinates of the points and the
+center. We may tentatively assume that $c_d = 1$, solve the
+corresponding linear system, and then define the center.
+*/
+
+} //namespace CGAL
+
+#endif // CGAL_SPHERE_D_H
+//----------------------- end of file ----------------------------------
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Tuple_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Tuple_d.h
new file mode 100644
index 0000000..48d6451
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Tuple_d.h
@@ -0,0 +1,286 @@
+// Copyright (c) 2000,2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michael Seel
+
+#ifndef CGAL_TUPLE_D_H
+#define CGAL_TUPLE_D_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Quotient.h>
+#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
+#include <sstream>
+
+namespace CGAL {
+#define PointCd PointCd2
+#define PointHd PointHd2
+
+template <typename NT, typename LA> class PointHd;
+template <typename NT, typename LA> class VectorHd;
+template <typename NT, typename LA> class DirectionHd;
+template <typename NT, typename LA> class HyperplaneHd;
+template <typename NT, typename LA> class Aff_transformationHd;
+template <typename FT, typename LA> class PointCd;
+template <typename NT, typename LA> class VectorCd;
+template <typename FT, typename LA> class DirectionCd;
+template <typename FT, typename LA> class HyperplaneCd;
+template <typename NT, typename LA> class Aff_transformationCd;
+
+
+class MatchHelper {};
+
+template <typename NT, typename LA>
+class Tuple_d  {
+  typedef Tuple_d<NT,LA> Self;
+  typedef typename LA::Vector Vector;
+  Vector v;
+public:
+  typedef typename Vector::const_iterator const_iterator;
+
+  typedef Cartesian_const_iterator_d<const_iterator> Cartesian_const_iterator;
+
+  struct Homogeneous_const_iterator {
+    typedef Homogeneous_const_iterator self;
+    typedef std::random_access_iterator_tag iterator_category;
+    typedef NT                              value_type;
+    typedef std::ptrdiff_t                  difference_type;
+    typedef const value_type*               pointer;
+    typedef const value_type&               reference;
+
+  Homogeneous_const_iterator() : _it(0), _w(0) {}
+  Homogeneous_const_iterator(const_iterator it, const_iterator w = 0) 
+    : _it(it), _w(w) {}
+    
+  value_type operator*() const 
+  { if (_it == _w) return value_type(1); else return *_it; }
+
+  self& operator++() { ++_it; return *this; }
+  self  operator++(int) { self tmp = *this; ++_it; return tmp; }
+  self& operator--() { --_it; return *this; }
+  self  operator--(int) { self tmp = *this; --_it; return tmp; }
+
+  self& operator+=(difference_type i) { _it+=i; return *this; }
+  self& operator-=(difference_type i) { _it-=i; return *this; }
+  self operator+(difference_type i) const 
+  { self tmp=*this; return tmp += i; }
+  self operator-(difference_type i) const 
+  { self tmp=*this; return tmp -= i; }
+
+  difference_type operator-(self x) const { return _it-x._it; }
+  value_type operator[](difference_type i) const { return *(*this + i); }
+
+  bool operator==(const self& x) const { return _it==x._it; }
+  bool operator!=(const self& x) const { return ! (*this==x); }
+  bool operator<(self x) const { return (x - *this) > 0; }
+
+  private:
+    const_iterator _it, _w;  
+  }; // Homogeneous_const_iterator
+
+
+  Tuple_d(int d) : v(d) {}
+  Tuple_d(const NT& a, const NT& b) : v(2)
+  { v[0]=a; v[1]=b; }
+  Tuple_d(const NT& a, const NT& b, const NT& c, const MatchHelper&) : v(3)
+  { v[0]=a; v[1]=b; v[2]=c; }
+  Tuple_d(const NT& a, const NT& b, const NT& c, const NT& d) : v(4)
+  { v[0]=a; v[1]=b; v[2]=c; v[3]=d; }
+
+  template <typename I>
+  Tuple_d(int d, I& start, I end) : v(d) 
+  { int i(0); 
+    while ( i < d && start != end ) v[i++] = *start++; 
+  } 
+  /* this constructor returns the final position of start 
+     to offer access to a possible common denominator as
+     part of the tuple range */
+
+  template <typename I>
+  Tuple_d(int d, I start, I end, NT D) : v(d) 
+  { int i(0); 
+    while ( i < d && start != end ) v[i++] = *start++; 
+    v[d-1] = D; 
+  }
+
+  int size() const { return v.dimension(); }
+  const_iterator begin() const { return v.begin(); }
+  const_iterator last() const { return v.end()-1; }
+  const_iterator end() const { return v.end(); }
+  const_iterator beyondend() const { return v.end()+1; }
+
+
+  void invert()
+  { for (int i=0; i<size(); ++i) v[i]=-v[i]; }
+  void invert(int d)
+  { for (int i=0; i<d; ++i) v[i]=-v[i]; }
+
+  void print(std::ostream& out, const char*) const;
+  void read(std::istream& in);
+  void homogeneous_add(const Self* a, const Self* b)
+  { int d = a->size()-1;
+    if ( d < 0 ) return;
+    CGAL_assertion_msg((d == b->size()-1),"dimensions disagree."); 
+    CGAL_assertion_msg((d == size()-1),"dimensions disagree."); 
+    NT aw = a->v[d], bw = b->v[d]; 
+    for (int i = 0; i < d; ++i) { 
+      v[i] = a->v[i]*bw + b->v[i]*aw; 
+    }
+    v[d] = aw*bw; 
+  }
+
+  void homogeneous_sub(const Self* a, const Self* b)
+  { int d = a->size()-1; 
+    if ( d < 0 ) return;
+    CGAL_assertion_msg((d == b->size()-1),"dimensions disagree."); 
+    CGAL_assertion_msg((d == size()-1),"dimensions disagree."); 
+    NT aw = a->v[d], bw = b->v[d]; 
+    for (int i = 0; i < d; ++i) { 
+      v[i] = a->v[i]*bw - b->v[i]*aw; 
+    }
+    v[d] = aw*bw; 
+  }
+
+  void cartesian_add(const Self* a, const Self* b)
+  { v = a->v + b->v; }
+  void cartesian_sub(const Self* a, const Self* b)
+  { v = a->v - b->v; }
+
+  friend class PointHd<NT,LA>;
+  friend class VectorHd<NT,LA>;
+  friend class DirectionHd<NT,LA>;
+  friend class HyperplaneHd<NT,LA>;
+  friend class PointCd<NT,LA>;
+  friend class VectorCd<NT,LA>;
+  friend class DirectionCd<NT,LA>;
+  friend class HyperplaneCd<NT,LA>;
+  
+}; // Tuple_d
+
+
+template <class NT, class LA> 
+class Compare_homogeneously
+{ 
+public:
+Comparison_result operator()(
+  const typename LA::Vector& v1, const typename LA::Vector& v2)
+{ 
+  CGAL_assertion_msg((v1.dimension() == v2.dimension()),
+    "Compare_homogeneously: dimensions disagree.");
+  NT aw = v1[v1.dimension()-1]; 
+  NT bw = v2[v2.dimension()-1]; 
+  CGAL_assertion(aw>0 && bw>0);
+  for (int i = 0; i < v1.dimension()-1; i++ ) { 
+    NT aibw = v1[i]*bw; 
+    NT biaw = v2[i]*aw; 
+    Comparison_result S = (aibw<biaw ? SMALLER : 
+                          (biaw<aibw ? LARGER : EQUAL));
+    if (S != EQUAL) return S;
+  }
+  return EQUAL; 
+}
+}; // Compare_homogeneously
+
+template <class NT, class LA> 
+class Compare_componentwise
+{ public:
+Comparison_result operator()(
+  const typename LA::Vector& v1, const typename LA::Vector& v2)
+{ 
+  CGAL_assertion_msg((v1.dimension() == v2.dimension()),
+  "Compare_coefficientwise: dimensions disagree.");
+  for (int i = 0; i < v1.dimension(); i++ ) { 
+    Comparison_result S = (v1[i]<v2[i] ? SMALLER : 
+                          (v2[i]<v1[i] ? LARGER : EQUAL));
+    if (S != EQUAL) return S;
+  }
+  return EQUAL;
+}
+}; // Compare_coefficientwise
+
+
+template <typename NT, typename LA>
+void Tuple_d<NT,LA>::print(std::ostream& os, const char* l) const
+{ int i;
+  switch( get_mode(os) ) {
+    case CGAL::IO::ASCII :
+      os << size() << " ";
+      for (i = 0; i < size(); ++i) 
+        os << v[i] << " ";
+      break;
+    case CGAL::IO::BINARY :
+      CGAL::write(os, size()); 
+      for (i = 0; i < size(); ++i) 
+        CGAL::write(os, v[i]);
+      break;
+    default :
+      os << l << "(" << size() << ", ";
+      for (i = 0; i < size(); ++i) {
+        os << v[i]; if (i!=size()-1) os<<", "; else os<<")";
+      }
+  }
+}
+
+
+template <typename NT, typename LA>
+void Tuple_d<NT,LA>::read(std::istream& is)
+{ int i = 0, d;
+  switch( get_mode(is) ) {
+    case CGAL::IO::ASCII :
+      is >> d; v = Vector(d);
+      while (i < d && is >> v[i] ) ++i; 
+      break;
+    case CGAL::IO::BINARY :
+      CGAL::read(is, d); v = Vector(d);
+      while (i < d) { CGAL::read(is, v[i]); ++i; } break;
+    default:
+    CGAL_error_msg("\nStream must be in ascii or binary mode\n"); 
+  }
+}
+
+template <class ForwardIterator>
+void tuple_dim_check(ForwardIterator first, ForwardIterator last, 
+                     const char* file, int line, const char* op)
+{ if (first==last) return;
+  int d = first->dimension(); ++first;
+  for (; first!=last; ++first) 
+    if (first->dimension() != d) {
+      std::ostringstream os;
+      os << "Tuple Dimension Error " << 
+            "File " << file << "Line " << line << "Operation " << op << '\0';
+      CGAL_error_msg(os.str().c_str()); 
+    }
+}
+
+#define TUPLE_DIM_CHECK(i1,i2,op) tuple_dim_check(i1,i2,__FILE__,__LINE__,#op)
+
+template <class InputIterator, class OutputIterator>
+int copy_and_count(InputIterator first, InputIterator last,
+                   OutputIterator result) 
+{ int n=0;
+  while (first != last) { ++n; *result++ = *first++; }
+  return n;
+}
+
+#undef PointCd
+#undef PointHd
+} //namespace CGAL
+#endif //CGAL_TUPLE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorCd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorCd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorCd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorCd_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorHd_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorHd_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/VectorHd_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/VectorHd_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector__.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector__.h
new file mode 100644
index 0000000..f45c426
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector__.h
@@ -0,0 +1,466 @@
+// Copyright (c) 1997-2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_VECTOR___H
+#define CGAL_VECTOR___H
+
+#include <CGAL/basic.h>
+#include <CGAL/memory.h>
+#include <CGAL/Kernel_d/debug.h>
+#include <CGAL/use.h>
+
+#include <cmath>
+#include <memory>
+#include <new>
+#include <iostream>
+#include <vector>
+#include <iterator>
+
+namespace CGAL {
+namespace Linear_Algebra {
+
+template <class NT_, class AL_> class Vector_;
+template <class NT_, class AL_> class Matrix_;
+
+/*{\Msubst
+<NT_,AL_>#
+<NT,AL>#
+Vector_#Vector
+Matrix_#Matrix
+}*/
+/*{\Moptions print_title=yes}*/
+/*{\Moptions outfile=Vector.man}*/
+
+/*{\Xtext \headerline{Common Notation}
+The following data types use the concept of iterator ranges as an
+abstraction of tuples and sets. For an iterator range |[first,last)|
+we define |S = set [first,last)| as the ordered tuple $(|S[0]|,|S[1]|,
+\ldots |S[d-1]|)$ where $|S[i]| = |*| |++|^{(i)}|first|$ (the element
+obtained by forwarding the iterator by operator |++| $i$ times and
+then dereferencing it to get the value to which it points). We write
+|d = size [first,last)|.  This extends the syntax of random access
+iterators to input iterators.  If we index the tuple as above then we
+require that $|++|^{(d)}|first == last|$ (note that |last| points
+beyond the last element to be accepted).}*/
+
+/*{\Manpage {Vector}{}{Vectors with NT Entries}{v}}*/
+
+template <class NT_, class AL_> 
+class Vector_
+{
+/*{\Mdefinition An instance of data type |Vector_| is a vector of
+variables of number type |NT|.  Together with the type |Matrix_| it
+realizes the basic operations of linear algebra.}*/
+
+public:
+
+/*{\Mtypes 5.5}*/
+typedef NT_*       pointer;
+typedef const NT_* const_pointer;
+
+typedef NT_    NT;
+/*{\Mtypemember the ring type of the components.}*/ 
+typedef pointer iterator;
+/*{\Mtypemember the iterator type for accessing components.}*/ 
+typedef const_pointer const_iterator;
+/*{\Mtypemember the const iterator type for accessing components.}*/ 
+
+typedef AL_ allocator_type;
+/*{\Xtypemember the allocator type.}*/ 
+
+protected:
+  friend class Matrix_<NT_,AL_>;
+  NT* v_; int d_;
+  static allocator_type MM;
+
+  inline void allocate_vec_space(NT*& vi, int di)
+  {
+  /* We use this procedure to allocate memory. We first get an appropriate 
+     piece of memory from the allocator and then initialize each cell 
+     by an inplace new. */
+
+    vi = MM.allocate(di);
+    NT* p = vi + di - 1;
+    while (p >= vi) { new (p) NT(0);  p--; }   
+  }
+
+  inline void deallocate_vec_space(NT*& vi, int di)
+  {
+  /* We use this procedure to deallocate memory. We have to free it by
+     the allocator scheme. We first call the destructor for type NT for each
+     cell of the array and then return the piece of memory to the memory
+     manager. */
+
+    NT* p = vi + di - 1;
+    while (p >= vi)  { MM.destroy(p); p--; }  //af:  as proposed by sylvain
+    MM.deallocate(vi, di);
+    vi = (NT*)0;
+  }
+
+inline void 
+check_dimensions(const Vector_<NT_,AL_>& vec) const
+{ 
+  CGAL_USE(vec);
+  CGAL_assertion_msg((d_ == vec.d_), 
+    "Vector_::check_dimensions: object dimensions disagree.");
+}
+
+public:
+
+/*{\Mcreation v 3}*/
+
+Vector_() : v_(0),d_(0) {}
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|.}*/ 
+
+Vector_(int d) 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. 
+|\Mvar| is initialized to a vector of dimension $d$.}*/ 
+{ CGAL_assertion_msg( d >= 0 , 
+    "Vector_::constructor: negative dimension.");
+  d_ = d; 
+  v_ = (NT*)0;
+  if (d_ > 0){ 
+    allocate_vec_space(v_,d_);
+    while (d--) v_[d] = NT(0);
+  }
+}
+
+Vector_(int d, const NT& x) 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|. 
+|\Mvar| is initialized to a vector of dimension $d$ with entries |x|.}*/ 
+{ 
+  CGAL_assertion_msg( d >= 0 , 
+    "Vector_::constructor: negative dimension.");
+  d_ = d; v_ = (NT*)0;
+  if (d_ > 0){ 
+    allocate_vec_space(v_,d_);
+    while (d--) v_[d] = x;
+  }
+}
+
+template <class Forward_iterator>
+Vector_(Forward_iterator first, Forward_iterator last)
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|; 
+|\Mvar| is initialized to the vector with entries
+|set [first,last)|. \require |Forward_iterator| has value type |NT|.}*/
+{ 
+#if defined _MSC_VER && _MSC_VER == 1300
+  d_ = 0;
+  Forward_iterator fit = first;
+  while(fit++!=last) d_++;
+#else
+  d_ = static_cast<int>(std::distance(first, last));
+#endif
+  allocate_vec_space(v_,d_);
+  iterator it = begin();
+  while (first != last) { *it = *first; ++it; ++first; }
+}
+
+Vector_(const Vector_<NT_,AL_>& p)
+{ d_ = p.d_;
+  if (d_ > 0) allocate_vec_space(v_,d_);
+  else v_ = (NT*)0;
+  for(int i=0; i<d_; i++) { v_[i] = p.v_[i]; }
+}
+
+
+Vector_<NT_,AL_>& operator=(const Vector_<NT_,AL_>& vec)
+{ 
+  if (&vec == this)
+    return *this;
+
+  int n = vec.d_;
+  if (n != d_) {
+    if (d_ > 0) deallocate_vec_space(v_,d_);
+    d_=n;
+    if (n > 0) allocate_vec_space(v_,n);
+    else v_ = (NT*)0;
+  }
+
+  while (n--) v_[n] = vec.v_[n];
+  return *this;
+}
+
+~Vector_() 
+{ if (d_ > 0) deallocate_vec_space(v_,d_); }
+
+/*{\Moperations 3 4}*/
+
+int  dimension() const { return d_; }
+/*{\Mop returns the dimension of |\Mvar|.}*/ 
+
+bool is_zero() const 
+/*{\Mop returns true iff |\Mvar| is the zero vector.}*/ 
+{ for(int i=0; i<d_; ++i) if (v_[i]!=NT(0)) return false; 
+  return true; }
+  
+NT& operator[](int i)
+/*{\Marrop returns $i$-th component of |\Mvar|.\\
+           \precond $0\le i \le |v.dimension()-1|$. }*/
+{ CGAL_assertion_msg((0<=i && i<d_), 
+    "Vector_::operator[]: index out of range.");
+  return v_[i];
+}
+  
+const NT& operator[](int i) const
+{ CGAL_assertion_msg((0<=i && i<d_), 
+    "Vector_::operator[]: index out of range.");
+  return v_[i];
+}
+
+iterator begin() { return v_; }
+/*{\Mop iterator to the first component.}*/
+iterator end() { return v_+d_; }
+/*{\Mop iterator beyond the last component.}*/
+
+/*{\Mtext The same operations |begin()|, |end()| exist for 
+|const_iterator|.}*/
+
+const_iterator begin() const { return v_; }
+const_iterator end() const { return v_+d_; }
+
+Vector_<NT_,AL_>  operator+(const Vector_<NT_,AL_>& v1) const;
+/*{\Mbinop Addition. \precond\\ |v.dimension() == v1.dimension()|.}*/
+
+Vector_<NT_,AL_>  operator-(const Vector_<NT_,AL_>& v1) const;
+/*{\Mbinop Subtraction. \precond\\ |v.dimension() = v1.dimension()|.}*/
+
+NT operator*(const Vector_<NT_,AL_>& v1) const;
+/*{\Mbinop Inner Product. \precond\\ |v.dimension() = v1.dimension()|.}*/
+
+Vector_<NT_,AL_> compmul(const NT& r) const;
+
+Vector_<NT_,AL_>  operator-() const;
+/*{\Munop Negation.}*/
+
+Vector_<NT_,AL_>& operator+=(const Vector_<NT_,AL_>& v1);
+/*{\Mbinop Addition plus assignment. \precond\\
+|v.dimension() == v1.dimension()|.}*/
+
+Vector_<NT_,AL_>& operator-=(const Vector_<NT_,AL_>& v1);
+/*{\Mbinop Subtraction plus assignment. \precond\\ |v.dimension() == v1.dimension()|.}*/
+
+Vector_<NT_,AL_>& operator*=(const NT& s);
+/*{\Mbinop Scalar multiplication plus assignment.}*/
+
+Vector_<NT_,AL_>& operator/=(const NT& s);
+/*{\Mbinop Scalar division plus assignment.}*/
+ 
+
+bool     operator==(const Vector_<NT_,AL_>& w) const;
+bool     operator!=(const Vector_<NT_,AL_>& w) const 
+{ return !(*this == w); }
+
+static int  compare(const Vector_<NT_,AL_>&, 
+                    const Vector_<NT_,AL_>&);
+
+};
+
+
+template <class NT, class AL> 
+
+inline Vector_<NT,AL> operator*(const NT& r, const Vector_<NT,AL>& v)
+/*{\Mbinopfunc Componentwise multiplication with number $r$.}*/
+{ return v.compmul(r); }
+
+template <class NT, class AL> 
+
+inline Vector_<NT,AL> operator*(const Vector_<NT,AL>& v, const NT& r)
+/*{\Mbinopfunc Componentwise multiplication with number $r$.}*/
+{ return v.compmul(r); }
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
+operator+=(const Vector_<NT_,AL_>& vec)
+{ 
+  check_dimensions(vec);
+  int n = d_;
+  while (n--) v_[n] += vec.v_[n];
+  return *this;
+}
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
+operator-=(const Vector_<NT_,AL_>& vec)
+{ 
+  check_dimensions(vec);
+  int n = d_;
+  while (n--) v_[n] -= vec.v_[n];
+  return *this;
+}
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
+operator*=(const NT& s)
+{ int n = d_;
+  while (n--) v_[n] *= s;
+  return *this;
+}
+
+template <class NT_, class AL_>
+inline Vector_<NT_,AL_>& Vector_<NT_,AL_>::
+operator/=(const NT& s)
+{ int n = d_;
+  while (n--) v_[n] /= s;
+  return *this;
+}
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
+operator+(const Vector_<NT_,AL_>& vec) const
+{ 
+  check_dimensions(vec);
+  int n = d_;
+  Vector_<NT_,AL_> result(n);
+  while (n--) result.v_[n] = v_[n]+vec.v_[n];
+  return result;
+}
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
+operator-(const Vector_<NT_,AL_>& vec) const
+{ 
+  check_dimensions(vec);
+  int n = d_;
+  Vector_<NT_,AL_> result(n);
+  while (n--) result.v_[n] = v_[n]-vec.v_[n];
+  return result;
+}
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
+operator-() const  // unary minus
+{ 
+  int n = d_;
+  Vector_<NT_,AL_> result(n);
+  while (n--) result.v_[n] = -v_[n];
+  return result;
+}
+
+
+template <class NT_, class AL_> 
+inline Vector_<NT_,AL_> Vector_<NT_,AL_>::
+compmul(const NT& x) const
+{ 
+  int n = d_;
+  Vector_<NT_,AL_> result(n);
+  while (n--) result.v_[n] = v_[n] * x;
+  return result;
+}
+
+
+template <class NT_, class AL_> 
+inline NT_ Vector_<NT_,AL_>::
+operator*(const Vector_<NT_,AL_>& vec) const
+{ 
+  check_dimensions(vec);
+  NT_ result=0;
+  int n = d_;
+  while (n--) result = result+v_[n]*vec.v_[n];
+  return result;
+}
+
+template <class NT_, class AL_> 
+inline bool Vector_<NT_,AL_>::
+operator==(const Vector_<NT_,AL_>& vec)  const
+{ if (vec.d_ != d_) return false;
+  int i = 0;
+  while ((i<d_) && (v_[i]==vec.v_[i])) i++;
+  return (i==d_);
+}
+
+template <class NT_, class AL_> 
+int Vector_<NT_,AL_>::
+compare(const Vector_<NT_,AL_>& v1, const Vector_<NT_,AL_>& v2)
+{ int i;
+  v1.check_dimensions(v2);
+  for(i=0; i < v1.dimension() && v1[i]==v2[i]; i++) {}
+  if (i == v1.dimension()) return 0;
+  return (v1[i] < v2[i]) ?  -1 : 1;
+}
+
+template <class NT_, class AL_> 
+std::ostream& operator<<(std::ostream& os, const Vector_<NT_,AL_>& v)
+/*{\Xbinopfunc  writes |\Mvar| componentwise to the output stream $O$.}*/
+{ /* syntax: d x_0 x_1 ... x_d-1 */
+    int d = v.dimension();
+    switch (get_mode(os)) {
+    case CGAL::IO::BINARY:
+        CGAL::write( os, d);
+        for ( int i = 0; i < d; ++i)
+            CGAL::write( os, v[i]);
+        break;
+    case CGAL::IO::ASCII:
+        os << d;
+        for ( int i = 0; i < d; ++i)
+            os << ' ' << v[i];
+        break;
+    case CGAL::IO::PRETTY:
+        os << "LA::Vector(" << d << " [";
+        for ( int i = 0; i < d; ++i) {
+            if ( i > 0)
+                os << ',' << ' ';
+            os << v[i];
+        }
+        os << "])";
+        break;
+    }
+    return os;
+}
+
+template <class NT_, class AL_> 
+std::istream& operator>>(std::istream& is, Vector_<NT_,AL_>& v)
+/*{\Xbinopfunc  reads |\Mvar| componentwise from the input stream $I$.}*/
+{ /* syntax: d x_0 x_1 ... x_d-1 */
+  int d;
+  switch (get_mode(is)) {
+    case CGAL::IO::ASCII :
+    case CGAL::IO::BINARY :
+      is >> d; 
+      v = Vector_<NT_,AL_>(d);
+      for ( int i = 0; i < d; ++i) {
+          is >> v[i];
+      }
+      break;
+    default:
+      std::cerr<<"\nStream must be in ascii or binary mode"<<std::endl;
+      break;
+  }
+  return is;
+}
+
+
+template <class NT_, class AL_>
+typename Vector_<NT_,AL_>::allocator_type Vector_<NT_,AL_>::MM;
+
+/*{\Ximplementation Vectors are implemented by arrays of type
+|NT|. All operations on a vector |v| take time $O(|v.dimension()|)$,
+except for |dimension()| and $[\ ]$ which take constant time. The space
+requirement is $O(|v.dimension()|)$. }*/
+
+
+} // Linear_Algebra
+} // CGAL
+
+#endif // CGAL__VECTOR___H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/Vector_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/Vector_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/debug.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objects.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsCd.h
new file mode 100644
index 0000000..143f482
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsCd.h
@@ -0,0 +1,814 @@
+// Copyright (c) 2000,2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel, Kurt Mehlhorn
+
+#ifndef CGAL_FUNCTION_OBJECTSCD_H
+#define CGAL_FUNCTION_OBJECTSCD_H
+
+#include <CGAL/basic.h>
+#include <CGAL/enum.h>
+#include <CGAL/use.h>
+#include <CGAL/Referenced_argument.h>
+
+#undef CGAL_KD_TRACE
+#undef CGAL_KD_TRACEN
+#undef CGAL_KD_TRACEV
+#define CGAL_KD_TRACE(t)  std::cerr << t
+#define CGAL_KD_TRACEN(t) std::cerr << t << std::endl
+#define CGAL_KD_TRACEV(t) std::cerr << #t << " = " << (t) << std::endl
+ 
+namespace CGAL {
+
+template <typename K>
+class Compute_coordinateCd {
+  typedef typename K::FT             FT;
+  typedef typename K::Point_d        Point_d;
+  public:
+  typedef FT                         result_type;
+  result_type 
+    operator()(const Point_d& p, int i) const
+  {
+    return p.cartesian(i);
+  }
+};
+
+template <typename K>
+class Point_dimensionCd {
+  typedef typename K::FT             FT;
+  typedef typename K::Point_d        Point_d;
+  public:
+  typedef int                       result_type;
+  result_type 
+    operator()(const Point_d& p) const
+  {
+    return p.dimension();
+  }
+};
+
+template <typename K>
+class Less_coordinateCd {
+  typedef typename K::FT             FT;
+  typedef typename K::Point_d        Point_d;
+  public:
+  typedef bool                       result_type;
+  result_type 
+  operator()(const Point_d& p, const Point_d& q, int i) const
+  {
+    return p.cartesian(i)<q.cartesian(i);
+  }
+};
+
+template <class R>
+class Lift_to_paraboloidCd
+{
+    typedef typename R::Point_d Point;
+    typedef typename R::FT FT;
+    typedef typename R::LA LA;
+public:
+    typedef Point result_type;
+
+    result_type operator()(const Point & p) const
+    { 
+        int d = p.dimension();
+        typename LA::Vector h(d+1);
+        FT sum = 0;
+        for (int i = 0; i<d; i++) {
+            h[i] = p.cartesian(i);
+            sum += h[i]*h[i];
+        }
+        h[d] = sum;
+        return Point(d+1,h.begin(),h.end());
+    }
+};
+
+template <class R>
+class Project_along_d_axisCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::FT FT;
+public:
+    typedef Point_d result_type;
+
+    result_type operator()(const Point_d & p) const
+    {
+        return Point_d(p.dimension()-1,
+               p.cartesian_begin(), p.cartesian_end()-1);
+    }
+};
+
+template <class R>
+class MidpointCd
+{
+    typedef typename R::Point_d Point_d;
+public:
+    typedef Point_d result_type;
+
+    result_type operator()(const Point_d & p, const Point_d & q) const
+    {
+        return Point_d(p + (q-p)/2);
+    }
+};
+
+template <class R>
+class Center_of_sphereCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::FT FT;
+    typedef typename R::LA LA;
+    typedef typename LA::Vector Vector;
+    typedef typename LA::Matrix Matrix;
+public:
+    typedef Point_d result_type;
+
+    template <class Forward_iterator>
+    result_type operator()(Forward_iterator start, Forward_iterator end) const
+    {
+        CGAL_USE(end);
+        CGAL_assertion(start!=end);
+        int d = start->dimension();
+        Matrix M(d);
+        Vector b(d);
+        Point_d pd = *start++;
+        for (int i = 0; i < d; ++i) { 
+            // we set up the equation for p_i
+            Point_d pi = *start++;
+            b[i] = 0;
+            for (int j = 0; j < d; ++j) {
+                M(i,j) = FT(2)*(pi.cartesian(j) - pd.cartesian(j));
+                b[i] += (pi.cartesian(j) - pd.cartesian(j)) *
+                    (pi.cartesian(j) + pd.cartesian(j));
+            }
+        }
+        FT D;
+        Vector x;
+        LA::linear_solver(M,b,x,D);
+        return Point_d(d, x.begin(), x.end());
+    }
+}; // Center_of_sphereCd
+
+template <class R>
+class Squared_distanceCd
+{
+    typedef typename R::Point_d     Point;
+    typedef typename R::Vector_d    Vector;
+    typedef typename R::FT          FT;
+public:
+    typedef FT result_type;
+
+    result_type operator()(const Point & p, const Point & q) const
+    {
+        Vector v = p - q;
+        return v.squared_length();
+    }
+};
+
+template <class R>
+class Position_on_lineCd
+{
+    typedef typename R::Point_d Point;
+    typedef typename R::LA LA;
+    typedef typename R::FT FT;
+public:
+    typedef typename R::Boolean result_type;
+
+    result_type operator()(const Point & p, const Point & s, const Point & t, 
+        FT & l) const
+    {
+        int d = p.dimension(); 
+        CGAL_assertion_msg((d==s.dimension())&&(d==t.dimension()&& d>0), 
+                "position_along_line: argument dimensions disagree.");
+        CGAL_assertion_msg((s!=t), 
+                "Position_on_line_d: line defining points are equal.");
+        FT lnum = (p.cartesian(0) - s.cartesian(0)); 
+        FT lden = (t.cartesian(0) - s.cartesian(0)); 
+        FT num(lnum), den(lden), lnum_i, lden_i;
+        for (int i = 1; i < d; i++) {  
+            lnum_i = (p.cartesian(i) - s.cartesian(i)); 
+            lden_i = (t.cartesian(i) - s.cartesian(i)); 
+            if (lnum*lden_i != lnum_i*lden)
+                return false; 
+            if (lden_i != FT(0)) {
+                den = lden_i;
+                num = lnum_i;
+            }
+        }
+        l = num / den; return true; 
+    }
+};
+
+template <class R>
+class Barycentric_coordinatesCd
+{
+    typedef typename R::Point_d Point;
+    typedef typename R::LA LA;
+    typedef typename R::FT FT;
+public:
+
+    template <class ForwardIterator, class OutputIterator>
+    OutputIterator operator()(ForwardIterator first, ForwardIterator last, 
+        const Point & p, OutputIterator result)
+    {
+        TUPLE_DIM_CHECK(first,last,Barycentric_coordinates_d);
+        //int n = std::distance(first,last); //unused variable
+        int d = p.dimension();
+        typename R::Affine_rank_d affine_rank;
+        CGAL_assertion(affine_rank(first,last)==d);
+        std::vector< Point > V(first,last);
+        typename LA::Matrix M(d+1,V.size());
+        typename LA::Vector b(d+1), x;
+        int i;
+        for (i=0; i<d; ++i) {
+            for (int j=0; j<V.size(); ++j) 
+                M(i,j)=V[j].cartesian(i);
+            b[i] = p.cartesian(i);
+        }
+        for (int j=0; j<V.size(); ++j) 
+            M(d,j) = 1;
+        b[d] = 1;
+        FT D;
+        LA::linear_solver(M,b,x,D);
+        for (i=0; i < x.dimension(); ++result, ++i) {
+            *result = x[i];
+        }
+        return result;
+    }
+};
+
+template <class R>
+class OrientationCd
+{
+    typedef typename R::Point_d     Point;
+    typedef typename R::LA          LA;
+    typedef typename R::Orientation Orientation;
+public:
+    typedef Orientation result_type;
+
+    template <class ForwardIterator>
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        TUPLE_DIM_CHECK(first, last, Orientation_d);
+        int d = static_cast<int>(std::distance(first,last)) - 1;
+        // range contains d+1 points of dimension d
+        CGAL_assertion_msg(first->dimension() == d,
+                "Orientation_d: needs first->dimension() + 1 many points.");
+        typename LA::Matrix M(d);
+        ForwardIterator s = first;
+        ++s;
+        for( int j = 0; j < d; ++s, ++j )
+            for( int i = 0; i < d; ++i )
+                M(i,j) = s->cartesian(i) - first->cartesian(i);
+        return result_type(LA::sign_of_determinant(M));
+    }
+};
+
+/* This predicates tests the orientation of (k+1) points that span a
+ * k-dimensional affine subspace of the ambiant d-dimensional space. We
+ * greedily search for an orthogonal projection on a k-dim axis aligned
+ * subspace on which the (full k-dim) predicates answers POSITIVE or NEGATIVE.
+ * If no such subspace is found, return COPLANAR.
+ * IMPORTANT TODO: Current implementation is VERY bad with filters: if one
+ * determinant fails in the filtering step, then all the subsequent ones wil be
+ * in exact arithmetic :-(
+ * TODO: store the axis-aligned subspace that was found in order to avoid
+ * re-searching for it for subsequent calls to operator()
+ */
+template <class R>
+class Coaffine_orientationCd
+{ 
+    typedef typename R::Point_d     Point_d;
+    typedef typename R::LA          LA;
+    typedef typename R::Orientation Orientation;
+public:
+    typedef Orientation result_type;
+
+    // typedef internal::stateful_predicate_tag predicate_category;
+    typedef std::vector<int>	Axes;
+    struct State
+    {
+        Axes axes_;
+        bool axes_found_;
+        State(bool b) : axes_(), axes_found_(b) {}
+    };
+    mutable State state_;
+
+    Coaffine_orientationCd() : state_(false) {}
+
+    State & state()    {        return state_;    }
+    const State & state() const   {        return state_;    }
+
+    template < class ForwardIterator >
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        TUPLE_DIM_CHECK(first,last,Coaffine_orientation_d);
+        // |k| is the dimension of the affine subspace
+        const int k = std::distance(first,last) - 1;
+        // |d| is the dimension of the ambiant space
+        const int d = first->dimension();
+        CGAL_assertion_msg(k <= d, "Coaffine_orientation_d: needs less that (first->dimension() + 1) points.");
+        if( false == state_.axes_found_ )
+        {
+			state_.axes_.resize(d + 1);
+			// We start by choosing the first |k| axes to define a plane of projection
+            int i = 0;
+            for(; i < k;     ++i) state_.axes_[i] = i;
+            for(; i < d + 1; ++i) state_.axes_[i] = -1;
+        }
+        const typename ForwardIterator::value_type & l(*first);
+        typename LA::Matrix M(k); // quadratic
+        while( true )
+        {
+            ForwardIterator s = first;
+            ++s;
+            int j(0);
+            while( s != last )
+            {
+                const typename ForwardIterator::value_type & point(*s);
+                for( int i = 0; i < k; ++i )
+                    M(i,j) = point.cartesian(state_.axes_[i]) - l.cartesian(state_.axes_[i]);
+                ++s;
+                ++j;
+            }
+            Orientation o = Orientation(LA::sign_of_determinant(M));
+            if( ( o != COPLANAR ) || state_.axes_found_ )
+            {
+                state_.axes_found_ = true;
+                return o;
+            }
+            // for generating all possible unordered k-uple in the range
+            // [0 .. d-1]... we go to the next unordered k-uple:
+            int index = k - 1;
+            while( (index >= 0) && (state_.axes_[index] == d - k + index) )
+                --index;
+            if( index < 0 )
+                break;
+            ++state_.axes_[index];
+            for( int i = 1; i < k - index; ++i )
+                state_.axes_[index + i] = state_.axes_[index] + i;
+        }
+        return COPLANAR;
+    }
+};
+
+template <class R>
+class Side_of_oriented_sphereCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::LA LA;
+    typedef typename R::FT FT;
+    typedef typename R::Oriented_side Oriented_side;
+public:
+    typedef Oriented_side result_type;
+
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last, 
+         const Point_d& x) const
+    { 
+        TUPLE_DIM_CHECK(first,last,Side_of_oriented_sphere_d);
+        int d = static_cast<int>(std::distance(first,last)); // |A| contains |d| points
+        CGAL_assertion_msg((d-1 == first->dimension()), 
+                "Side_of_oriented_sphere_d: needs first->dimension()+1 many input points.");
+        typename LA::Matrix M(d + 1); 
+        for (int i = 0; i < d; ++first, ++i) { 
+            FT Sum = 0;
+            M(i,0) = 1;
+            for (int j = 0; j < d-1; j++) { 
+                FT cj = first->cartesian(j);
+                M(i,j + 1) = cj; Sum += cj*cj; 
+            }
+            M(i,d) = Sum; 
+        }
+        FT Sum = 0; 
+        M(d,0) = 1; 
+        for (int j = 0; j < d-1; j++) { 
+            FT hj = x.cartesian(j);
+            M(d,j + 1) = hj; Sum += hj*hj; 
+        }
+        M(d,d) = Sum;
+        return result_type( - LA::sign_of_determinant(M));
+    }
+};
+
+
+/* This predicates takes k+1 points defining a k-sphere in d-dim space, and a
+ * point |x| (assumed to lie in the same affine subspace spanned by the
+ * k-sphere). It tests wether the point |x| lies in the positive or negative
+ * side of the k-sphere.
+ * The parameter |axis| contains the indices of k axis of the canonical base of
+ * R^d, on which the affine subspace projects homeomorphically. We can thus
+ * "complete" the k+1 points with d-k other points along the "non-used" axes
+ * and then call the usual Side_of_oriented_sphereCd predicate.
+ */
+template < class R >
+class Side_of_oriented_subsphereCd
+{
+	typedef typename R::Point_d			Point;
+	typedef typename R::LA				LA;
+	typedef typename R::FT				FT;
+	typedef typename R::Orientation     Orientation;
+	typedef typename R::Oriented_side   Oriented_side;
+	typedef typename R::Side_of_oriented_sphere_d	Side_of_oriented_sphere;
+	typedef typename R::Coaffine_orientation_d		Coaffine_orientation;
+	typedef typename LA::Matrix	        Matrix;	
+	typedef typename Coaffine_orientation::Axes		Axes;
+	// DATA MEMBERS
+	mutable Coaffine_orientation ori_;
+	mutable unsigned int adjust_sign_;
+    // a square matrix of size (D+1)x(D+1) where D is the ambient dimension 
+	mutable typename LA::Matrix M;
+public:
+	typedef Oriented_side   result_type;
+    // typedef internal::stateless_predicate_tag predicate_category;
+
+    // constructor
+	Side_of_oriented_subsphereCd(const R & r = R())
+	: ori_(r.coaffine_orientation_d_object()), M(), adjust_sign_(0) { }
+
+	template < class ForwardIterator >
+	result_type operator()(ForwardIterator first, ForwardIterator last, const Point & q) const
+	{
+		const int d = first->dimension();
+		const int k = std::distance(first, last) - 1; // dimension of affine subspace
+		CGAL_assertion_msg( k <= d, "too much points in range.");
+		if( k == d )
+		{
+			Side_of_oriented_sphere sos;
+			return sos(first, last, q); // perhaps slap user on the back of the head here?
+		}
+        if( M.row_dimension() < d+1 )
+            M = Matrix(d+1);
+		if( ! ori_.state().axes_found_ )
+		{
+            // the call to ori_(...) will compute a set of axes to complement our base.
+			Orientation o = ori_(first, last);
+			if( COPLANAR == o )
+            {
+                std::cerr << "\nAffine base is flat (it should have positive orientation) !!";
+                //return ON_ORIENTED_BOUNDARY;
+            }
+			CGAL_assertion( o == POSITIVE );
+			// Now we can setup the fixed part of the matrix:
+			int a(0);
+			int j(k);
+			typename Axes::iterator axis = ori_.state().axes_.begin();
+			while( j < d )
+			{
+				while( a  == *axis )
+				{
+					++a; ++axis;
+				}
+	            adjust_sign_ = ( adjust_sign_ + j + a ) % 2;
+				int i(0);
+				for( ; i < a; ++i )
+					M(i, j) = FT(0);
+				M(i++, j) = FT(1);  // i.e.: M(a, j) = 1
+				for( ; i < d; ++i )
+					M(i, j) = FT(0);
+				++j;
+				++a;
+			}
+		}
+		typename ForwardIterator::value_type p1 = *first;
+		FT SumFirst(0); // squared length of first subsphere point, seen as vector.
+		for( int i = 0; i < d; ++i )
+		{
+			FT ci = p1.cartesian(i);
+			SumFirst += ci * ci;
+		}
+		int j(0); // iterates overs columns/subsphere points
+		++first;
+		while( first != last )
+		{
+			typename ForwardIterator::value_type v = *first;
+			FT Sum = FT(0);
+			for( int i = 0; i < d; ++i )
+			{
+				FT ci = v.cartesian(i);
+				M(i, j) = ci - p1.cartesian(i);
+				Sum += ci * ci;
+			}
+			M(d, j) = Sum - SumFirst;
+			++first;
+			++j;
+		}
+		int a(0);
+		typename Axes::iterator axis = ori_.state().axes_.begin();
+		while( j < d )
+		{
+			while( a  == *axis )
+			{
+				++a; ++axis;
+			}
+			M(d, j) = FT(1) + FT(2) * p1.cartesian(a);
+			++j;
+			++a;
+		}
+		FT Sum = FT(0);
+		for( int i = 0; i < d; ++i )
+		{
+			FT ci = q.cartesian(i);
+			M(i, d) = ci - p1.cartesian(i);
+			Sum += ci * ci;
+		}
+		M(d, d) = Sum - SumFirst;
+		if( 0 == ( adjust_sign_ % 2 ) )
+			return result_type( - LA::sign_of_determinant( M ) );
+		else
+			return result_type(   LA::sign_of_determinant( M ) );
+	}
+};
+
+template <class R>
+class Side_of_bounded_sphereCd
+{
+    typedef typename R::Point_d         Point_d;
+    typedef typename R::Orientation_d   Orientation_d;
+    typedef typename R::Side_of_oriented_sphere_d Side_of_oriented_sphere_d;
+    typedef typename R::Orientation     Orientation;
+    typedef typename R::Oriented_side   Oriented_side;
+    typedef typename R::Bounded_side    Bounded_side;
+public:
+    typedef Bounded_side    result_type;
+
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last, 
+            const Point_d& p) const
+    {
+        TUPLE_DIM_CHECK(first,last,region_of_sphere);
+        Orientation_d _orientation;
+        Orientation o = _orientation(first,last);
+        CGAL_assertion_msg((o != 0), "Side_of_bounded_sphere_d: \
+                A must be full dimensional.");
+        Side_of_oriented_sphere_d _side_of_oriented_sphere;
+        Oriented_side oside = _side_of_oriented_sphere(first,last,p);
+        if (o == POSITIVE) {
+            switch (oside) {
+                case ON_POSITIVE_SIDE    :   return ON_BOUNDED_SIDE;
+                case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
+                case ON_NEGATIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
+            }       
+        } else {
+            switch (oside) {
+                case ON_POSITIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
+                case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
+                case ON_NEGATIVE_SIDE    :   return ON_BOUNDED_SIDE;
+            }     
+        }
+        return ON_BOUNDARY; // never reached
+    }
+};
+
+
+template <class R>
+class Contained_in_simplexCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::FT FT;
+    typedef typename R::LA LA;
+    typedef typename LA::Vector Vector;
+    typedef typename LA::Matrix Matrix;
+public:
+    typedef typename R::Boolean result_type;
+
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last,
+            const Point_d& p) const
+    {
+        TUPLE_DIM_CHECK(first,last,Contained_in_simplex_d);
+        int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+        int d = first->dimension(); 
+        CGAL_assertion_code( typename R::Affinely_independent_d check_independence; )
+        CGAL_assertion_msg(check_independence(first,last),
+                "Contained_in_simplex_d: A not affinely independent.");
+        CGAL_assertion(d==p.dimension());
+
+        Matrix M(d + 1,k); 
+        Vector b(d +1);
+        for (int j = 0; j < k; ++first, ++j) {
+            for (int i = 0; i < d; ++i) 
+                M(i,j) = first->cartesian(i);
+            M(d,j) = 1;
+        }
+        for (int i = 0; i < d; ++i) 
+            b[i] = p.cartesian(i);
+        b[d] = 1;
+
+        FT D; 
+        Vector lambda; 
+        if ( LA::linear_solver(M,b,lambda,D) ) {
+            for (int j = 0; j < k; j++) { 
+                if (lambda[j] < FT(0)) return false;
+            }
+            return true;
+        }
+        return false; 
+    }
+};
+
+template <class R>
+class Contained_in_affine_hullCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::LA LA;
+    typedef typename R::Boolean Boolean;
+public:
+    typedef Boolean result_type;
+
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last,
+                const Point_d& p) const
+    {
+         TUPLE_DIM_CHECK(first,last,Contained_in_affine_hullCd);
+         int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+         int d = first->dimension(); 
+         typename LA::Matrix M(d + 1,k); 
+         typename LA::Vector b(d + 1); 
+         for (int j = 0; j < k; ++first, ++j) {
+             for (int i = 0; i < d; ++i) 
+                 M(i,j) = first->cartesian(i);
+             M(d,j) = 1;
+         }
+         for (int i = 0; i < d; ++i)
+             b[i] = p.cartesian(i);
+         b[d] = 1;
+         return LA::is_solvable(M,b);
+    }
+};
+
+
+template <class R>
+class Affine_rankCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::Vector_d Vector_d;
+    typedef typename R::LA LA;
+public:
+    typedef int result_type;
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        TUPLE_DIM_CHECK(first,last,Affine_rank_d);
+        int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+        if (k == 0) return -1;
+        if (k == 1) return 0; 
+        int d = first->dimension();
+        typename LA::Matrix M(d,--k);
+        Point_d p0 = *first; ++first; // first points to second
+        for (int j = 0; j < k; ++first, ++j) {
+            Vector_d v = *first - p0;
+            for (int i = 0; i < d; i++) 
+                M(i,j) = v.cartesian(i); 
+        }
+        return LA::rank(M);
+    }
+};
+
+template <class R>
+class Affinely_independentCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::LA LA;
+    typedef typename R::Affine_rank_d Affine_rank_d;
+public:
+    typedef typename R::Boolean result_type;
+
+    template <class ForwardIterator> 
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        Affine_rank_d rank;
+        int n = static_cast<int>(std::distance(first,last));
+        return rank(first,last) == n-1;
+    }
+};
+
+
+template <class R>
+class Compare_lexicographicallyCd
+{
+    typedef typename R::Point_d Point_d;
+    typedef typename R::Point_d PointD; //MSVC hack
+    typedef typename R::Comparison_result Comparison_result;
+public:
+    typedef Comparison_result result_type;
+
+    result_type operator()(const Point_d & p1, const Point_d & p2) const
+    {
+        return PointD::cmp(p1,p2);
+    }
+};
+
+template <class R>
+class Contained_in_linear_hullCd
+{
+    typedef typename R::LA LA;
+    typedef typename R::FT FT;
+    typedef typename R::Vector_d Vector_d;
+public:
+    typedef typename R::Boolean result_type;
+
+    template<class ForwardIterator>
+    result_type operator()(
+        ForwardIterator first, ForwardIterator last, const Vector_d& x) const
+    {
+        TUPLE_DIM_CHECK(first,last,Contained_in_linear_hull_d);
+        int k = static_cast<int>(std::distance(first,last));
+        // |A| contains |k| vectors
+        int d = first->dimension();
+        typename LA::Matrix M(d,k);
+        typename LA::Vector b(d); 
+        for (int i = 0; i < d; i++) { 
+            b[i] = x.cartesian(i); 
+            for (int j = 0; j < k; j++) 
+                M(i,j) = (first+j)->cartesian(i); 
+        }
+        return LA::is_solvable(M,b); 
+    }
+};
+
+template <class R>
+class Linear_rankCd
+{
+    typedef typename R::LA LA;
+public:
+    typedef int result_type;
+
+    template <class ForwardIterator>
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        TUPLE_DIM_CHECK(first,last,linear_rank);
+        int k = static_cast<int>(std::distance(first,last)); // k vectors
+        int d = first->dimension(); 
+        typename LA::Matrix M(d,k);
+        for (int i = 0; i < d  ; i++)
+            for (int j = 0; j < k; j++)  
+                M(i,j) = (first + j)->cartesian(i);
+        return LA::rank(M);
+    }
+};
+
+template <class R>
+class Linearly_independentCd
+{
+    typedef typename R::LA LA;
+public:
+    typedef typename R::Boolean result_type;
+
+    template <class ForwardIterator>
+    result_type operator()(ForwardIterator first, ForwardIterator last) const
+    {
+        typename R::Linear_rank_d rank;
+        return rank(first,last) == static_cast<int>(std::distance(first,last));
+    }
+};
+
+template <class R>
+class Linear_baseCd
+{
+    typedef typename R::LA LA;
+    typedef typename R::FT FT;
+    typedef typename R::Vector_d Vector_d;
+public:
+    template <class ForwardIterator, class OutputIterator>
+    OutputIterator operator()(ForwardIterator first, ForwardIterator last,
+        OutputIterator result) const
+    {
+        TUPLE_DIM_CHECK(first,last,linear_base);
+        int k = static_cast<int>(std::distance(first,last)); // k vectors
+        int d = first->dimension();
+        typename LA::Matrix M(d,k); 
+        for (int j = 0; j < k; ++first, ++j)
+            for (int i = 0; i < d; i++)
+                M(i,j) = first->cartesian(i);
+
+        std::vector<int> indcols;
+        int r = LA::independent_columns(M,indcols);
+
+        for (int l=0; l < r; l++) {
+            typename LA::Vector v = M.column(indcols[l]);
+            *result++ = Vector_d(d,v.begin(),v.end());
+        }
+        return result;
+    }
+};
+
+} //namespace CGAL
+#endif //CGAL_FUNCTION_OBJECTSCD_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsHd.h
new file mode 100644
index 0000000..38c4a2e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/function_objectsHd.h
@@ -0,0 +1,514 @@
+// Copyright (c) 2000,2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel
+
+//---------------------------------------------------------------------
+// file generated by notangle from noweb/function_objectsHd.lw
+// please debug or modify noweb file
+// coding: K. Mehlhorn, M. Seel
+//---------------------------------------------------------------------
+
+#ifndef CGAL_FUNCTION_OBJECTSHD_H
+#define CGAL_FUNCTION_OBJECTSHD_H
+
+#include <CGAL/basic.h>
+#include <CGAL/enum.h>
+
+namespace CGAL {
+
+template <typename K>
+class Compute_coordinateHd {
+  typedef typename K::FT             FT;
+  typedef typename K::Point_d        Point_d;
+ public:
+  typedef FT                         result_type;  
+  result_type 
+    operator()(const Point_d& p, int i) const
+  {
+    return p.cartesian(i);
+  }
+};
+
+template <typename K>
+class Point_dimensionHd {
+  typedef typename K::RT             RT;
+  typedef typename K::Point_d        Point_d;
+  public:
+  typedef int                       result_type;
+  result_type 
+    operator()(const Point_d& p) const
+  {
+    return p.dimension();
+  }
+};
+
+template <typename K>
+class Less_coordinateHd {
+  typedef typename K::RT             RT;
+  typedef typename K::Point_d        Point_d;
+  public:
+  typedef bool                       result_type;
+  result_type 
+    operator()(const Point_d& p, const Point_d& q, int i) const
+  {
+    int d = p.dimension();
+    return p.cartesian(i)*q.homogeneous(d)<q.cartesian(i)*p.homogeneous(d);
+  }
+};
+
+
+template <class R>
+struct Lift_to_paraboloidHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::RT RT;
+typedef typename R::LA LA;
+
+Point_d operator()(const Point_d& p) const
+{ 
+  int d = p.dimension();
+  typename LA::Vector h(d+2);
+  RT D = p.homogeneous(d);
+  RT sum = 0;
+  for (int i = 0; i<d; i++) {
+    RT hi = p.homogeneous(i);
+    h[i] = hi*D;
+    sum += hi*hi;
+  }
+  h[d] = sum;
+  h[d+1] = D*D;
+  return Point_d(d+1,h.begin(),h.end());
+}
+};
+
+template <class R>
+struct Project_along_d_axisHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::RT RT;
+typedef typename R::LA LA;
+
+Point_d operator()(const Point_d& p) const
+{ int d = p.dimension();
+  return Point_d(d-1, p.homogeneous_begin(),p.homogeneous_end()-2,
+                 p.homogeneous(d));
+}
+};
+
+template <class R>
+struct MidpointHd {
+typedef typename R::Point_d Point_d;
+Point_d operator()(const Point_d& p, const Point_d& q) const
+{ return Point_d(p + (q-p)/2); }
+};
+
+template <class R>
+struct Center_of_sphereHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::RT RT;
+typedef typename R::LA LA;
+template <class Forward_iterator>
+Point_d operator()(Forward_iterator start, Forward_iterator end) const
+{ CGAL_assertion(start!=end);
+  CGAL_USE(end);
+  int d = start->dimension();
+  typename LA::Matrix M(d);
+  typename LA::Vector b(d);
+  Point_d pd = *start++;
+  RT pdd  = pd.homogeneous(d);
+  for (int i = 0; i < d; i++) { 
+    // we set up the equation for p_i
+    Point_d pi = *start++; 
+    RT pid = pi.homogeneous(d);
+    b[i] = 0;
+    for (int j = 0; j < d; j++) {
+      M(i,j) = RT(2) * pdd * pid * 
+               (pi.homogeneous(j)*pdd - pd.homogeneous(j)*pid);
+      b[i] += (pi.homogeneous(j)*pdd - pd.homogeneous(j)*pid) *
+              (pi.homogeneous(j)*pdd + pd.homogeneous(j)*pid);
+    }
+  }
+  RT D;
+  typename LA::Vector x;
+  LA::linear_solver(M,b,x,D);
+  return Point_d(d,x.begin(),x.end(),D);
+}
+
+}; // Center_of_sphereHd
+
+
+template <class R>
+struct Squared_distanceHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::Vector_d Vector_d;
+typedef typename R::FT FT;
+FT operator()(const Point_d& p, const Point_d& q) const
+{ Vector_d v = p-q; return v.squared_length(); }
+};
+
+template <class R>
+struct Position_on_lineHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::FT FT;
+typedef typename R::RT RT;
+
+bool operator()(const Point_d& p, const Point_d& s, const Point_d& t, 
+     FT& l) const
+{ int d = p.dimension(); 
+  CGAL_assertion_msg((d==s.dimension())&&(d==t.dimension()&& d>0), 
+  "position_along_line: argument dimensions disagree.");
+  CGAL_assertion_msg((s!=t), 
+  "Position_on_line_d: line defining points are equal.");
+  RT lnum = (p.homogeneous(0)*s.homogeneous(d) - 
+             s.homogeneous(0)*p.homogeneous(d)) * t.homogeneous(d); 
+  RT lden = (t.homogeneous(0)*s.homogeneous(d) - 
+             s.homogeneous(0)*t.homogeneous(d)) * p.homogeneous(d); 
+  RT num(lnum), den(lden), lnum_i, lden_i; 
+  for (int i = 1; i < d; i++) {  
+    lnum_i = (p.homogeneous(i)*s.homogeneous(d) - 
+              s.homogeneous(i)*p.homogeneous(d)) * t.homogeneous(d); 
+    lden_i = (t.homogeneous(i)*s.homogeneous(d) - 
+              s.homogeneous(i)*t.homogeneous(d)) * p.homogeneous(d); 
+    if (lnum*lden_i != lnum_i*lden) return false; 
+    if (lden_i != 0) { den = lden_i; num = lnum_i; }
+  }
+  l = R::make_FT(num,den);
+  return true; 
+}
+};
+
+template <class R>
+struct Barycentric_coordinatesHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator, class OutputIterator>
+OutputIterator operator()(ForwardIterator first, ForwardIterator last, 
+  const Point_d& p, OutputIterator result)
+{ TUPLE_DIM_CHECK(first,last,Barycentric_coordinates_d);
+  CGAL_assertion_code( int d = p.dimension(); )
+  typename R::Affine_rank_d affine_rank;
+  CGAL_assertion(affine_rank(first,last)==d);
+  typename LA::Matrix M(first,last);
+  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()), x;
+  RT D;
+  LA::linear_solver(M,b,x,D);  
+  for (int i=0; i< x.dimension(); ++result, ++i) {
+    *result= R::make_FT(x[i],D); 
+  }
+  return result;
+}
+};
+
+
+template <class R>
+struct OrientationHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+
+template <class ForwardIterator>
+Orientation operator()(ForwardIterator first, ForwardIterator last)
+{ TUPLE_DIM_CHECK(first,last,Orientation_d);
+  int d = static_cast<int>(std::distance(first,last)); 
+  // range contains d points of dimension d-1
+  CGAL_assertion_msg(first->dimension() == d-1,
+  "Orientation_d: needs first->dimension() + 1 many points.");
+  typename LA::Matrix M(d); // quadratic
+  for (int i = 0; i < d; ++first,++i) {
+    for (int j = 0; j < d; ++j) 
+      M(i,j) = first->homogeneous(j); 
+  }
+  int row_correction = ( (d % 2 == 0) ? -1 : +1 );
+  // we invert the sign if the row number is even i.e. d is odd
+  return Orientation(row_correction * LA::sign_of_determinant(M));
+}
+};
+
+template <class R>
+struct Side_of_oriented_sphereHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+Oriented_side operator()(ForwardIterator first, ForwardIterator last, 
+                         const Point_d& x)
+{ 
+  TUPLE_DIM_CHECK(first,last,Side_of_oriented_sphere_d);
+  int d = static_cast<int>(std::distance(first,last)); // |A| contains |d| points
+  CGAL_assertion_msg((d-1 == first->dimension()), 
+  "Side_of_oriented_sphere_d: needs first->dimension()+1 many input points.");
+  typename LA::Matrix M(d + 1); 
+  for (int i = 0; i < d; ++first, ++i) { 
+    RT Sum = 0;
+    RT hd = first->homogeneous(d-1); 
+    M(i,0) = hd*hd; 
+    for (int j = 0; j < d; j++) { 
+      RT hj = first->homogeneous(j); 
+      M(i,j + 1) = hj * hd; 
+      Sum += hj*hj; 
+    }
+    M(i,d) = Sum; 
+  }
+  RT Sum = 0; 
+  RT hd = x.homogeneous(d-1); 
+  M(d,0) = hd*hd; 
+  for (int j = 0; j < d; j++) { 
+    RT hj = x.homogeneous(j); 
+    M(d,j + 1) = hj * hd; 
+    Sum += hj*hj; 
+  }
+  M(d,d) = Sum; 
+  return CGAL::Sign(- LA::sign_of_determinant(M));
+}
+};
+
+template <class R>
+struct Side_of_bounded_sphereHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+Bounded_side operator()(ForwardIterator first, ForwardIterator last, 
+                        const Point_d& p)
+{
+  TUPLE_DIM_CHECK(first,last,region_of_sphere);
+  typename R::Orientation_d _orientation;
+  Orientation o = _orientation(first,last);
+  CGAL_assertion_msg((o != 0), "Side_of_bounded_sphere_d: \
+  A must be full dimensional.");
+  typename R::Side_of_oriented_sphere_d _side_of_oriented_sphere;
+  Oriented_side oside = _side_of_oriented_sphere(first,last,p);
+  if (o == POSITIVE) {
+    switch (oside) {
+        case ON_POSITIVE_SIDE    :   return ON_BOUNDED_SIDE;
+        case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
+        case ON_NEGATIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
+    }       
+  } else {
+    switch (oside) {
+        case ON_POSITIVE_SIDE    :   return ON_UNBOUNDED_SIDE;
+        case ON_ORIENTED_BOUNDARY:   return ON_BOUNDARY;
+        case ON_NEGATIVE_SIDE    :   return ON_BOUNDED_SIDE;
+    }     
+  }
+  return ON_BOUNDARY; // never reached
+}
+};
+
+
+template <class R>
+struct Contained_in_simplexHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+bool operator()(ForwardIterator first, ForwardIterator last,
+                const Point_d& p) 
+{
+  TUPLE_DIM_CHECK(first,last,Contained_in_simplex_d);
+  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+  int d = first->dimension(); 
+  CGAL_assertion_code(
+    typename R::Affinely_independent_d check_independence; )
+  CGAL_assertion_msg(check_independence(first,last),
+    "Contained_in_simplex_d: A not affinely independent.");
+  CGAL_assertion(d==p.dimension());
+
+  typename LA::Matrix M(d + 1,k); 
+  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()); 
+  for (int j = 0; j < k; ++first, ++j) {
+    for (int i = 0; i <= d; ++i)  
+      M(i,j) = first->homogeneous(i); 
+  }
+
+  RT D; 
+  typename LA::Vector lambda; 
+  if ( LA::linear_solver(M,b,lambda,D) ) { 
+    int s = CGAL_NTS sign(D); 
+    for (int j = 0; j < k; j++) { 
+      int t = CGAL_NTS sign(lambda[j]); 
+      if (s * t < 0) return false; 
+    }
+    return true;
+  }
+  return false; 
+}
+};
+
+template <class R>
+struct Contained_in_affine_hullHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+bool operator()(ForwardIterator first, ForwardIterator last,
+                const Point_d& p) 
+{
+  TUPLE_DIM_CHECK(first,last,Contained_in_affine_hull_d);
+  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+  int d = first->dimension(); 
+  typename LA::Matrix M(d + 1,k); 
+  typename LA::Vector b(p.homogeneous_begin(),p.homogeneous_end()); 
+  for (int j = 0; j < k; ++first, ++j) 
+    for (int i = 0; i <= d; ++i) 
+      M(i,j) = first->homogeneous(i); 
+  return LA::is_solvable(M,b); 
+}
+};
+
+
+template <class R>
+struct Affine_rankHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::Vector_d Vector_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+int operator()(ForwardIterator first, ForwardIterator last) 
+{
+  TUPLE_DIM_CHECK(first,last,Affine_rank_d);
+  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| points
+  if (k == 0) return -1; 
+  if (k == 1) return 0; 
+  int d = first->dimension(); 
+  typename LA::Matrix M(d,--k);
+  Point_d p0 = *first; ++first; // first points to second
+  for (int j = 0; j < k; ++first, ++j) {
+    Vector_d v = *first - p0;
+    for (int i = 0; i < d; i++) 
+      M(i,j) = v.homogeneous(i); 
+  }
+  return LA::rank(M); 
+}
+};
+
+template <class R>
+struct Affinely_independentHd { 
+typedef typename R::Point_d Point_d;
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+
+template <class ForwardIterator> 
+bool operator()(ForwardIterator first, ForwardIterator last) 
+{ typename R::Affine_rank_d rank; 
+  int n = static_cast<int>(std::distance(first,last));
+  return rank(first,last) == n-1;
+}
+};
+
+
+template <class R>
+struct Compare_lexicographicallyHd {
+typedef typename R::Point_d Point_d;
+typedef typename R::Point_d PointD; //MSVC hack
+Comparison_result operator()(const Point_d& p1, const Point_d& p2)
+{ return PointD::cmp(p1,p2); }
+};
+
+template <class R>
+struct Contained_in_linear_hullHd {
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+typedef typename R::Vector_d Vector_d;
+
+template<class ForwardIterator>
+bool operator()(
+  ForwardIterator first, ForwardIterator last, const Vector_d& x) 
+{ TUPLE_DIM_CHECK(first,last,Contained_in_linear_hull_d);
+  int k = static_cast<int>(std::distance(first,last)); // |A| contains |k| vectors
+  int d = first->dimension(); 
+  typename LA::Matrix M(d,k); 
+  typename LA::Vector b(d); 
+  for (int i = 0; i < d; i++) { 
+     b[i] = x.homogeneous(i); 
+     for (int j = 0; j < k; j++) 
+       M(i,j) = (first+j)->homogeneous(i); 
+  }
+  return LA::is_solvable(M,b); 
+}
+};
+
+template <class R>
+struct Linear_rankHd {
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+template <class ForwardIterator>
+int operator()(ForwardIterator first, ForwardIterator last)
+{ TUPLE_DIM_CHECK(first,last,linear_rank);
+  int k = static_cast<int>(std::distance(first,last)); // k vectors
+  int d = first->dimension(); 
+  typename LA::Matrix M(d,k); 
+  for (int i = 0; i < d  ; i++)
+     for (int j = 0; j < k; j++)  
+       M(i,j) = (first + j)->homogeneous(i); 
+  return LA::rank(M); 
+}
+};
+
+template <class R>
+struct Linearly_independentHd {
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+template <class ForwardIterator>
+bool operator()(ForwardIterator first, ForwardIterator last)
+{ typename R::Linear_rank_d rank;
+  return rank(first,last) == static_cast<int>(std::distance(first,last));
+}
+};
+
+
+template <class R>
+struct Linear_baseHd {
+typedef typename R::LA LA;
+typedef typename R::RT RT;
+typedef typename R::Vector_d Vector_d;
+template <class ForwardIterator, class OutputIterator>
+OutputIterator operator()(ForwardIterator first, ForwardIterator last,
+  OutputIterator result)
+{ TUPLE_DIM_CHECK(first,last,linear_base);
+  int k = static_cast<int>(std::distance(first,last)); // k vectors
+  int d = first->dimension(); 
+  typename LA::Matrix M(d,k); 
+  for (int j = 0; j < k; j++) 
+    for (int i = 0; i < d; i++)
+      M(i,j) = (first+j)->homogeneous(i); 
+
+  std::vector<int> indcols; 
+  int r = LA::independent_columns(M,indcols); 
+
+  for (int l=0; l < r; l++) {
+    typename LA::Vector v = M.column(indcols[l]);
+    *result++ = Vector_d(d,v.begin(),v.end(),1);
+  }
+  return result; 
+}
+};
+
+} //namespace CGAL
+
+#endif // CGAL_FUNCTION_OBJECTSHD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/interface_macros_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/interface_macros_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/interface_macros_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/interface_macros_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objectsCd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objectsCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objectsCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objectsCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objectsHd.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objectsHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objectsHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objectsHd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objects_d.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objects_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/intersection_objects_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/intersection_objects_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_d/simple_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_d/simple_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_d/simple_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_d/simple_objects.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kernel_profiler.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_profiler.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kernel_profiler.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kernel_profiler.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kernel_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kernel_traits.h
new file mode 100644
index 0000000..0b44f74
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kernel_traits.h
@@ -0,0 +1,67 @@
+// Copyright (c) 2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_KERNEL_TRAITS_H
+#define CGAL_KERNEL_TRAITS_H
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace CGAL {
+
+namespace internal_kernel_traits{
+  BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_R,R,false)
+
+  /// In case no specialization of CGAL::Kernel_traits is provided and the type used
+  /// is not coming from a CGAL Kernel, we provide a dummy Kernel just to break later
+  /// and only when it is used. This was introduced to avoid issues with a free function
+  /// return a nested type of the kernel through Kernel_traits. Even if the function
+  /// was not the one to consider, its return type should be instanciable.
+  template <class T>
+  struct Dummy_kernel
+  {
+    struct FT{};
+  };
+
+  template <class T, bool is_cgal_kernel = Has_nested_R<T>::value >
+  struct Kernel_traits{
+    typedef typename T::R type;
+  };
+
+  template <class T>
+  struct Kernel_traits<T, false>{
+    typedef Dummy_kernel<T> type;
+  };
+} // end of namespace internal_kernel_traits
+
+template <class T>
+struct Kernel_traits
+{
+  typedef typename internal_kernel_traits::Kernel_traits<T>::type Kernel;
+  typedef Kernel type;
+};
+
+} // end namespace CGAL
+
+#endif // CGAL_KERNEL_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Active_objects_vector.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Active_objects_vector.h
new file mode 100644
index 0000000..7659c69
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Active_objects_vector.h
@@ -0,0 +1,378 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
+#define CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
+#include <CGAL/Kinetic/basic.h>
+#include <CGAL/Tools/Label.h>
+#include <CGAL/Kinetic/Ref_counted.h>
+#include <CGAL/Tools/Counter.h>
+#include <CGAL/Kinetic/internal/debug_counters.h>
+#include <iostream>
+#include <CGAL/Kinetic/Multi_listener.h>
+#include <set>
+#include <map>
+#include <vector>
+#include <sstream>
+//#include <boost/iterator/filter_iterator.hpp>
+#include <CGAL/iterator.h>
+#include <boost/iterator/transform_iterator.hpp>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4267) // warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
+#endif
+
+namespace CGAL { namespace Kinetic {
+
+//! Holds a set of moving points and creates notifications when changes occur.
+/*!  This container holds a set of objects of a particular type. It
+  creates notifications using the standard CGAL::Multi_listener
+  interface when a primitive changes or is added or deleted. Objects
+  which are listening for events can then ask which primitives
+  changed.
+
+  There is one type of notification
+  Moving_object_table::Listener_core::IS_EDITING which occurs when the
+  editing mode is set to false.
+
+  As an optimization, the change methods can be called without setting
+  the editing state to true, this acts as if it were set to true for
+  that one function call.
+
+  Objects are stored in a vector. This means that access is constant
+  time, but storage is not generally freed. The only way to be sure is
+  to remove all reference counts for the table or to call clear().
+*/
+template <class Value_t >
+class Active_objects_vector:
+  public Ref_counted<Active_objects_vector<Value_t > >
+{
+public:
+  typedef typename CGAL::Label<Value_t> Key;
+  typedef Value_t Data;
+protected:
+  //! Convenience
+  typedef Active_objects_vector<Value_t> This;
+  typedef std::pair<Key, Value_t> Storage_item;
+  typedef std::vector<Storage_item > Storage;
+  CGAL_KINETIC_MULTILISTENER1(IS_EDITING)
+  
+public:
+
+  //! default constructor
+  Active_objects_vector():editing_(false), num_valid_(false){}
+
+  ~Active_objects_vector(){CGAL_KINETIC_MULTILISTENER_DESTRUCTOR;}
+
+  //! access a point
+  const Data &operator[](Key key) const
+  {
+    CGAL_precondition(key.is_valid());
+    CGAL_precondition(storage_[key.index()].first == key);
+    CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
+    //if (static_cast<unsigned int>(key.index()) >= storage_.size()) return null_object();
+    /*else*/
+    return storage_[key.index()].second;
+  }
+
+  //! non operator based method to access a point.
+  const Data& at(Key key) const
+  {
+    return operator[](key);
+  }
+
+  //! Set the editing state of the object.
+  /*!  A notification is sent when the editing state is set to false
+    after it has been true, i.e. the editing session is finished. This
+    allows changes to be batched together.
+  */
+  void set_is_editing(bool is_e) {
+    if (is_e== editing_) return;
+    editing_=is_e;
+    if (!editing_) {
+      finish_editing();
+    }
+  }
+
+  //! return the editing state
+  bool is_editing() const
+  {
+    return editing_;
+  }
+
+  //! change one point.
+  /*!  The position at the current time should not be different from
+    the previous current position. However, at the moment I do not
+    check this as there is no reference to time in the
+    Data_table.
+
+    If Data_table::editing() is not true, then it is as if the calls
+    - set_editing(true)
+    - set_object(key, value)
+    - set_editing(false)
+    Were made. If it is true, then no notifications are created.
+
+    \todo check continuity.
+  */
+  void set(Key key, const Data &new_value) {
+    CGAL_precondition(key.is_valid());
+    CGAL_precondition(storage_[key.index()].first == key);
+    //CGAL_precondition(editing_);
+        //CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
+    if (storage_.size() <= static_cast<unsigned int>(key.index())) {
+      storage_.resize(key.index()+1);
+    }
+    storage_[key.index()].first=key;
+    storage_[key.index()].second=new_value;
+    changed_objects_.push_back(key);
+    CGAL_expensive_assertion_code(for (unsigned int i=0; i< storage_.size(); ++i) ) {
+      CGAL_expensive_assertion_code(if (key.index() != i && storage_[i].second == storage_[key.index()].second) CGAL_LOG(Log::SOME, "WARNING Objects " << Key(i) << " and " << key << " have equal trajectories.\n"));
+    }
+				  
+    if (!editing_) finish_editing();
+  }
+
+  //! Insert a new object into the table.
+  /*!
+    See Data_table::set_object() for an explainating of how the editing modes are used.
+  */
+  Key insert(const Data &ob) {
+    //CGAL_precondition(editing_);
+    storage_.push_back(Storage_item(Key(storage_.size()), ob));
+    new_objects_.push_back(storage_.back().first);
+
+    CGAL_expensive_assertion_code(for (unsigned int i=0; i< storage_.size()-1; ++i) ) {
+      
+CGAL_expensive_assertion_code(if ( storage_[i].second == storage_.back().second) CGAL_LOG(Log::SOME, "WARNING Objects " << Key(i) << " and " << storage_.back().first << " have equal trajectories.\n"));
+    }
+    if (!editing_) finish_editing();
+    return storage_.back().first;
+  }
+
+  //! Delete an object from the table.
+  /*!
+    The object with Key key must already be in the table.
+
+    This does not necessarily decrease the amount of storage used at
+    all. In fact, it is unlikely to do so.
+
+    See Data_table::set_object() for an explainating of how the editing modes are used.
+  */
+  void erase(Key key) {
+    CGAL_precondition(key.is_valid());
+    CGAL_precondition(storage_[key.index()].first == key);
+    //CGAL_precondition(editing_);
+    CGAL_precondition(static_cast<unsigned int>(key.index()) < storage_.size());
+    CGAL_expensive_precondition_code(for (Inserted_iterator dit= inserted_begin(); dit != inserted_end(); ++dit))
+      {CGAL_expensive_precondition(*dit != key);}
+    CGAL_expensive_precondition_code(for (Changed_iterator dit= changed_begin(); dit != changed_end(); ++dit))
+      {CGAL_expensive_precondition(*dit != key);}
+    deleted_objects_.push_back(key);
+    if (!editing_) finish_editing();
+  }
+
+  //! Clear all points.
+  void clear() {
+    deleted_objects_.insert(deleted_objects_.end(), keys_begin(), keys_end());
+    //storage_.clear();
+    if (!editing_) finish_editing();
+  }
+
+  struct Get_key {
+    typedef Key result_type;
+    Key operator()(const Storage_item &o) const {
+      return o.first;
+    }
+  };
+
+  struct Is_ok {
+    typedef bool result_type;
+    //typedef const Storage_item& argument_type;
+    template <class T>
+    bool operator()(const T& p) const {
+      return !p->first.is_valid();
+    }
+  };
+
+  //! An iterator to iterate through all the keys
+  typedef CGAL::Filter_iterator<typename Storage::const_iterator, Is_ok>  Fiterator;
+  typedef boost::transform_iterator<Get_key,  Fiterator> Key_iterator;
+  
+
+  //! Begin iterating through the keys
+  Key_iterator keys_begin() const
+  {
+    return Key_iterator(Fiterator(storage_.end(), Is_ok(), storage_.begin()), Get_key());
+  }
+  //! End iterating through the keys.
+  Key_iterator keys_end() const
+  {
+    return Key_iterator(Fiterator(storage_.end(),  Is_ok()), Get_key());
+  }
+
+  //! An iterator for iterating through changed objects.
+  /*!  The list of objects accessed through this iterator is only
+    those changed in the last session.
+  */
+  typedef typename std::vector<Key>::const_iterator Changed_iterator;
+  Changed_iterator changed_begin() const
+  {
+    return changed_objects_.begin();
+  }
+  Changed_iterator changed_end() const
+  {
+    return changed_objects_.end();
+  }
+  //! An iterator for iterating through added objects.
+  /*!  The list of objects accessed through this iterator is only
+    those added in the last session.
+  */
+  typedef typename std::vector<Key>::const_iterator Inserted_iterator;
+  //! The begin iterator for new objects
+  Inserted_iterator inserted_begin() const
+  {
+    return new_objects_.begin();
+  }
+  //! The past-end iterator for new objects.
+  Inserted_iterator inserted_end() const
+  {
+    return new_objects_.end();
+  }
+  //! An iterator for iterating through deleted objects.
+  /*!  The list of objects accessed through this iterator is only
+    those deleted in the last session.
+  */
+  typedef typename std::vector<Key>::const_iterator Erased_iterator;
+  //! The begin iterator for deleted objects.
+  Erased_iterator erased_begin() const
+  {
+    return deleted_objects_.begin();
+  }
+  //! The past end iterator for deleted objects.
+  Erased_iterator erased_end() const
+  {
+    return deleted_objects_.end();
+  }
+  //! The number of objects in the table
+  /*!  The objects are stored in a vector, so this could be large than
+    (additions- deletions) as non-consecutive blank objects not at the
+    back are still counted. In general, deleting an object doesn't do
+    much for storage, just provides notifications.
+  */
+  unsigned int size() const
+  {
+    return num_valid_;
+  }
+
+  std::ostream &write(std::ostream &out) const {
+    for (unsigned int i=0; i< storage_.size(); ++i){
+      out << storage_[i].second << std::endl;
+    }
+    return out;
+  }
+  
+  std::istream &read(std::istream &in) {
+    if (!storage_.empty()) {
+      set_is_editing(true);
+      for (Key_iterator kit= keys_begin(); kit != keys_end(); ++kit){
+	erase(*kit);
+      }
+      set_is_editing(false);
+      storage_.clear();
+    }
+    set_is_editing(true);
+    do {
+      char buf[10000];
+      in.getline(buf, 10000);
+      if (!in || buf[0]=='\0' || buf[0]=='#') {
+        if(!in.bad()) {
+          in.clear(in.rdstate() & ~std::ios_base::failbit);
+        }
+        break;
+      }
+      std::istringstream iss(buf);
+      Data d; 
+      iss >> d;
+      if (!iss) {
+	CGAL_ERROR("ERROR reading object from line " << buf);
+	++internal::get_static_io_errors();
+      } else {
+	//CGAL_LOG(Log::LOTS, "Read " << d << std::endl);
+	insert(d);
+      }
+    } while (true);
+    set_is_editing(false);
+    return in;
+  }
+
+private:
+
+  void finish_editing() {
+    CGAL_KINETIC_MULTINOTIFY(IS_EDITING);
+
+    num_valid_+= new_objects_.size();
+    num_valid_-= deleted_objects_.size();
+    CGAL_assertion(num_valid_ >=0);
+    for (Erased_iterator it= erased_begin(); it != erased_end(); ++it) {
+      storage_[it->index()].second=Data();
+      storage_[it->index()].first=Key();
+    }
+
+    changed_objects_.clear();
+    deleted_objects_.clear();
+    new_objects_.clear();
+  }
+
+
+protected:
+
+  Storage storage_;
+  std::vector<bool> valid_;
+  std::vector<Key> changed_objects_;
+  std::vector<Key> deleted_objects_;
+  std::vector<Key> new_objects_;
+  bool editing_;
+  int num_valid_;
+
+  /*static const Data &null_object() {
+    static Data o;
+    return o;
+    }*/
+};
+
+template <class V >
+inline std::ostream &operator<<(std::ostream &out, const Active_objects_vector<V> &v) {
+  return v.write(out);
+}
+
+
+template <class V >
+inline std::istream &operator>>(std::istream &in, Active_objects_vector<V> &v) {
+  return v.read(in);
+}
+
+} } //namespace CGAL::Kinetic
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/CORE_Expr_exact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/CORE_Expr_exact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/CORE_Expr_exact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/CORE_Expr_exact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Cartesian.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Cartesian.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Cartesian.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Certificate_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Certificate_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Certificate_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Certificate_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Default_instantaneous_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Default_instantaneous_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Default_instantaneous_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Default_instantaneous_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Default_simulator.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Default_simulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Default_simulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Default_simulator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_default_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_default_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_default_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_default_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Derivitive_filter_function_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Derivitive_filter_function_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Derivitive_filter_function_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Derivitive_filter_function_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Enclosing_box_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Enclosing_box_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Enclosing_box_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Enclosing_box_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Enclosing_box_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Enclosing_box_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Enclosing_box_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Enclosing_box_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Erase_event.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Erase_event.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Erase_event.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Erase_event.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Event_base.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Event_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Event_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Event_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Exact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Exact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Exact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Exact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Free_event_base.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Free_event_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Free_event_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Free_event_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h
new file mode 100644
index 0000000..a8b91ca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h
@@ -0,0 +1,121 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_KINETIC_ROOT_DEGEN_FK_H
+#define CGAL_KINETIC_ROOT_DEGEN_FK_H
+#include <CGAL/Kinetic/basic.h>
+#include <CGAL/Kinetic/internal/debug_counters.h>
+
+namespace CGAL { namespace Kinetic {
+
+
+template <class Traits_t, bool SLOPPY>
+class HDRS{
+  private:
+    typedef typename Traits_t::Root_stack Wrapped_solver;
+    typedef typename Traits_t::Function Function;
+
+  public:
+    typedef typename Wrapped_solver::Root Root;
+    typedef Traits_t Traits;
+    //! Construct and check preconditions
+    /*!
+
+    */
+    HDRS(const Function &uf, const Root& lb,
+	 const Root& ub, const Traits_t& k): solver_(k.root_stack_object(uf, lb, ub)) {
+      CGAL_LOG(Log::LOTS, "Function= " << uf << std::endl);
+      CGAL_expensive_precondition(solver_.empty() || solver_.top() >= lb);
+      if (uf.degree() == -1) {
+	CGAL_LOG(Log::SOME, "Zero function found at time " << lb << std::endl);	
+	++ internal::get_static_zero_certificates();
+      }
+#ifndef NDEBUG
+      if (!SLOPPY && k.sign_at_object()(uf, lb) == CGAL::NEGATIVE) {
+	CGAL_ERROR( "Invalid certificate constructed for function " << uf << " between " << lb 
+			    << " and " << ub << " will fail immediately." << std::endl);
+	CGAL_exactness_precondition(k.sign_at_object()(uf, lb) != CGAL::NEGATIVE);
+      }
+#endif
+      if (solver_.empty()) {
+	CGAL_LOG(Log::LOTS, "No failure" << std::endl);
+	 //sn = k.sign_between_roots_object()(uf, lb, ub);
+      } else if (solver_.top() == lb) {
+	CGAL_LOG(Log::LOTS, "Degeneracy at " << solver_.top() << std::endl);
+	CGAL::Sign sn = k.sign_after_object()(uf, lb);
+	if (sn == CGAL::NEGATIVE) {
+	  ++internal::get_static_function_degeneracies();
+	  CGAL_LOG(Log::LOTS, "Extra root at lower bound of " << lb << std::endl);
+	} else {
+	  CGAL_LOG(Log::LOTS, "Popping extra root at lower bound of " << lb << std::endl);
+	  solver_.pop();
+	}
+      } 
+    }
+
+    HDRS(){}
+
+    //! Drop even roots
+    const Root& top() const
+    {
+      return solver_.top();
+    }
+
+    void pop() {
+      solver_.pop();
+    }
+
+    bool empty() const
+    {
+      return solver_.empty();
+    }
+  /*double estimate() const {
+      return solver_.estimate();
+      }*/
+
+    std::ostream &write(std::ostream& out) const {
+      out << solver_;
+      return out;
+    }
+
+  protected:
+    Wrapped_solver solver_;
+  };
+
+template <class Traits_t, bool SLOPPY>
+struct Handle_degeneracy_function_kernel: public Traits_t
+{
+
+  typedef HDRS<Traits_t, SLOPPY> Root_stack;
+
+  Root_stack root_stack_object(const typename Traits_t::Function &f,
+			       const typename Traits_t::Root &lb,
+			       const typename Traits_t::Root &ub) const {
+    return Root_stack(f, lb, ub, *this);
+  }
+};
+
+template <class T, bool SLOPPY>
+std::ostream &operator<<(std::ostream &out, const HDRS<T, SLOPPY> &k) {
+  return k.write(out);
+}
+
+} } //namespace CGAL::Kinetic
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Heap_pointer_event_queue.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Heap_pointer_event_queue.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Heap_pointer_event_queue.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Heap_pointer_event_queue.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Inexact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Inexact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Inexact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Inexact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Insert_event.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Insert_event.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Insert_event.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Insert_event.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Listener.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Listener.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Listener.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Listener.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Multi_listener.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Multi_listener.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Multi_listener.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Multi_listener.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Ref_counted.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Ref_counted.h
new file mode 100644
index 0000000..276333d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Ref_counted.h
@@ -0,0 +1,130 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_REF_COUNTED_H
+#define CGAL_REF_COUNTED_H
+#include <CGAL/Kinetic/basic.h>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/utility.hpp>
+
+//#define NEW_REF_COUNTED
+
+namespace CGAL { namespace Kinetic { namespace internal {
+
+class Ref_counted_base;
+
+void intrusive_ptr_add_ref(const Ref_counted_base *t);
+
+void intrusive_ptr_release(const Ref_counted_base *t);
+
+
+class Ref_counted_base: boost::noncopyable
+{
+  typedef Ref_counted_base This;
+
+public:
+  Ref_counted_base() : reference_count_(0) {}
+
+  void write(std::ostream &out) const
+  {
+    out << "(" << reference_count_ << ")";
+  }
+  bool is_referenced() const
+  {
+    return reference_count_ != 0;
+  }
+
+  virtual ~Ref_counted_base() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
+  {
+    CGAL_destructor_assertion(reference_count_==0);
+  }
+
+  friend void intrusive_ptr_release(const This *t);
+  friend void intrusive_ptr_add_ref(const This *t);
+
+  unsigned int reference_count() const {return reference_count_;}
+
+  void  new_ref() const { ++reference_count_; }
+  void  delete_ref() const
+  {
+    CGAL_precondition(reference_count_!=0);
+    --reference_count_;
+  }
+
+  mutable unsigned int reference_count_;
+};
+
+inline void intrusive_ptr_add_ref(const Ref_counted_base *t)
+{
+  t->new_ref();
+}
+
+
+inline void intrusive_ptr_release(const Ref_counted_base *t)
+{
+  t->delete_ref();
+  if (t->reference_count() == 0) {
+    delete t;
+  }
+}
+
+
+
+struct Non_ref_counted_base{};
+
+inline void intrusive_ptr_add_ref(const Non_ref_counted_base *)
+{
+}
+
+
+inline void intrusive_ptr_release(const Non_ref_counted_base *)
+{
+}
+
+
+
+} } } //namespace CGAL::Kinetic::internal
+
+namespace CGAL { namespace Kinetic {
+
+template <class T>
+class Ref_counted: public internal::Ref_counted_base
+
+{
+  typedef internal::Ref_counted_base P;
+ public:
+  typedef T This;
+  typedef typename boost::intrusive_ptr<T> Handle;
+
+  typedef typename boost::intrusive_ptr<const T> Const_handle;
+};
+
+template <class T>
+struct Non_ref_counted: public internal::Non_ref_counted_base
+{
+  typedef T This;
+  typedef typename boost::intrusive_ptr<T> Handle;
+  typedef typename boost::intrusive_ptr<const T> Const_handle;
+};
+
+
+
+} } //namespace CGAL::Kinetic
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_3.h
new file mode 100644
index 0000000..5ffee23
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_3.h
@@ -0,0 +1,1221 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
+#define CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
+#include <CGAL/basic.h>
+
+#include <CGAL/Regular_triangulation_3.h>
+#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
+#include <CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h>
+#include <CGAL/Kinetic/Regular_triangulation_vertex_base_3.h>
+#include <CGAL/Kinetic/Regular_triangulation_cell_base_3.h>
+#include <CGAL/Kinetic/Regular_triangulation_visitor_base_3.h>
+#include <CGAL/Kinetic/Listener.h>
+#include <CGAL/Kinetic/Ref_counted.h>
+
+#include <CGAL/Kinetic/listeners.h>
+
+#include <CGAL/use.h>
+#include <CGAL/assertions.h>
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4355) // complaint about using 'this' to
+#endif                          // initialize a member
+
+
+namespace CGAL { namespace Kinetic { namespace internal {
+
+template <class KD>
+class Regular_3_pop_event: public Delaunay_event_base_3<KD, typename KD::Root_stack>
+{
+  typedef Delaunay_event_base_3<KD, typename KD::Root_stack>  P;
+public:
+  Regular_3_pop_event(const typename KD::Root_stack &s,
+		      const typename KD::Vertex_handle &vh,
+		      KD *kd): P(s, kd), vh_(vh) {
+  }
+
+  void process() {
+    P::kdel()->pop(vh_, P::root_stack());
+  }
+
+  typename KD::Vertex_handle vertex() const
+  {
+    return vh_;
+  }
+
+  std::ostream& write(std::ostream &out) const
+  {
+    out << "Pop " << vh_->point();
+    return out;
+  }
+
+  void audit(typename KD::Event_key k) const {
+    P::kdel()->audit_pop(k, vh_);
+  }
+  /*virtual bool is_of_type(int tp) const {
+    return (tp &type())!=0 || P::is_of_type(tp);
+    }
+    static int type() {
+    return 2;
+    }*/
+
+  virtual ~Regular_3_pop_event(){};
+
+protected:
+  const typename KD::Vertex_handle vh_;
+};
+
+/*template <class K, class S, class VH>
+  std::ostream& operator<<(std::ostream &out, const Regular_3_pop_event<K,S,VH> &e)
+  {
+  e.write(out);
+  return out;
+  }*/
+
+
+template <class KD>
+class Regular_3_non_vertex_event: public Delaunay_event_base_3<KD, typename KD::Root_stack>
+{
+  typedef Delaunay_event_base_3<KD, typename KD::Root_stack>  P;
+public:
+
+  Regular_3_non_vertex_event(const typename KD::Root_stack &s,
+			     const typename KD::Point_key &k,
+			     const typename KD::Cell_handle &c,
+			     KD *kd): P(s,kd), k_(k), cell_(c) {
+  }
+
+  Regular_3_non_vertex_event(){}
+
+  std::ostream& write(std::ostream &out) const
+  {
+    out << "Nothing ";
+    return out;
+  }
+
+  /* virtual bool is_of_type(int tp) const {
+     return (tp &type())!=0 || P::is_of_type(tp);
+     }
+     static int type() {
+     return 4;
+     }*/
+
+  typename KD::Point_key point() const {return k_;}
+
+  typename KD::Cell_handle cell_handle() const {return cell_;}
+
+  virtual ~Regular_3_non_vertex_event(){};
+
+protected:
+  const typename KD::Point_key k_;
+  const typename KD::Cell_handle cell_;
+};
+
+template <class KD>
+class Regular_3_move_event: public Regular_3_non_vertex_event<KD>
+{
+  typedef Regular_3_non_vertex_event<KD>  P;
+public:
+  Regular_3_move_event(const typename KD::Root_stack &s,
+		       const typename KD::Point_key &k,
+		       const typename KD::Cell_handle &c,
+		       int dir,
+		       KD *kd): P(s,k, c, kd), dir_(dir) {
+  }
+
+  void process() {
+    P::kdel()->move(P::k_, P::cell_, dir_, P::root_stack());
+  }
+
+  std::ostream& write(std::ostream &out) const
+  {
+    out << "Move " << P::point() << " from ";
+    internal::write_cell(P::cell_handle() , out);
+    return out;
+  }
+
+  void audit(typename KD::Event_key k) const{
+    P::kdel()->audit_move(k, P::point(), P::cell_, dir_);
+  }
+  /*virtual bool is_of_type(int tp) const {
+    return (tp &type())!=0 || P::is_of_type(tp);
+    }
+    static int type() {
+    return 8;
+    }*/
+
+  virtual ~Regular_3_move_event(){};
+
+protected:
+  int dir_;
+};
+
+/*template <class K,  class S, class KK, class C>
+  std::ostream& operator<<(std::ostream &out, const Regular_3_move_event<K,S,KK,C> &e)
+  {
+  e.write(out);
+  return out;
+  }*/
+
+
+template <class KD>
+class Regular_3_push_event: public Regular_3_non_vertex_event<KD>
+{
+  typedef Regular_3_non_vertex_event<KD>  P;
+public:
+
+  Regular_3_push_event(const typename KD::Root_stack &s,
+		       const typename KD::Point_key &k,
+		       const typename KD::Cell_handle &c,
+		       KD *kd): P(s,k, c, kd) {
+  }
+
+  void process() {
+    P::kdel()->push(P::k_, P::cell_, P::root_stack());
+  }
+
+  std::ostream& write(std::ostream &out) const
+  {
+    out << "Push " << P::point() << " into ";
+    internal::write_cell(P::cell_handle() , out);
+    return out;
+  }
+  
+  void audit(typename KD::Event_key k) const {
+    P::kdel()->audit_push(k, P::point(), P::cell_);
+  }
+  /*virtual bool is_of_type(int tp) const {
+    return (tp &type())!=0 || P::is_of_type(tp);
+    }
+    static int type() {
+    return 16;
+    }*/
+
+  virtual ~Regular_3_push_event(){};
+};
+
+/*template <class K, class S, class KK, class C>
+  std::ostream& operator<<(std::ostream &out, const Regular_3_push_event<K,S,KK,C> &e)
+  {
+  e.write(out);
+  return out;
+  }*/
+
+
+template <class Traits>
+struct Regular_triangulation_3_types
+{
+  typedef typename Traits::Active_points_3_table MPT; // here
+  typedef typename Traits::Kinetic_kernel KK;
+  // typedef CGAL::Triangulation_cell_base_3<typename Traits::Instantaneous_kernel> CFB;
+
+  /*typedef CGAL::Triangulation_cell_base_with_info_3<Delaunay_cache_3<MPT, KK>,
+    typename Traits::Instantaneous_kernel, CFB> CFBI;*/
+
+  //typedef Triangulation_labeled_edge_cell_base_3<CFBI, typename Traits::Simulator::Event_key> TFB;
+  //typedef Triangulation_labeled_facet_cell_base_3<TFB, typename Traits::Simulator::Event_key> FB;
+  /*typedef CGAL::Triangulation_vertex_base_3<typename Traits::Instantaneous_kernel> CVB;
+    typedef CGAL::Triangulation_vertex_base_with_info_3<typename Traits::Simulator::Event_key,
+    typename Traits::Instantaneous_kernel,
+    CVB> LVB;*/
+  typedef CGAL::Kinetic::Regular_triangulation_cell_base_3<Traits> FB;
+  typedef CGAL::Kinetic::Regular_triangulation_vertex_base_3<Traits> LVB;
+
+  typedef CGAL::Triangulation_data_structure_3<LVB, FB> TDS;
+
+  typedef CGAL::Regular_triangulation_3<typename Traits::Instantaneous_kernel, TDS> Default_triangulation;
+
+ 
+
+  //friend class CGAL::Delaunay_triangulation_3<typename P::Instantaneous_kernel, TDS>;
+
+};
+
+} } } //namespace CGAL::Kinetic::internal
+
+namespace CGAL { namespace Kinetic {
+
+/*!
+  redundant_cells_ maps each cell with redundant points to the ids of the points in that cell
+
+  redundant_points_ maps each redundant point to a certificate
+*/
+template <class TraitsT,
+	  class VisitorT= Regular_triangulation_visitor_base_3,
+	  class TriangulationT= typename internal::Regular_triangulation_3_types<TraitsT>::Default_triangulation>
+class Regular_triangulation_3:
+  public Ref_counted<Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> >
+{
+private:
+  typedef Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> This;
+  typedef typename TraitsT::Instantaneous_kernel Instantaneous_kernel;
+public:
+  typedef Regular_triangulation_3<TraitsT, VisitorT, TriangulationT> This_RT3;
+  typedef TraitsT Traits;
+  typedef typename Traits::Active_points_3_table::Key Point_key; //here
+  typedef typename Traits::Kinetic_kernel::Certificate Root_stack;
+protected:
+  typedef typename Traits::Active_points_3_table MPT; // here
+  typedef typename Traits::Simulator Simulator;
+  typedef typename Traits::Simulator::Event_key Event_key;
+  typedef typename Traits::Simulator::Time Time;
+
+  
+  typedef TriangulationT Delaunay;
+
+  typedef internal::Regular_triangulation_3_types<TraitsT> Types;
+
+  struct Delaunay_visitor {
+    template <class Point_key, class Cell_handle>
+    void pre_insert_vertex(Point_key v, Cell_handle h) {
+      v_.pre_insert_vertex(v, h);
+    }
+
+    template <class Vertex_handle>
+    void post_insert_vertex(Vertex_handle v) {
+      v_.post_insert_vertex(v);
+    }
+
+    template <class Vertex_handle>
+    void pre_remove_vertex(Vertex_handle v) {
+      v_.pre_remove_vertex(v);
+    }
+
+
+    template <class Point_key>
+    void post_remove_vertex(Point_key v) {
+      v_.post_remove_vertex(v);
+    }
+
+    template <class Vertex_handle>
+    void change_vertex(Vertex_handle v) {
+      v_.change_vertex(v);
+    }
+
+    template <class Cell_handle> 
+    void create_cell(Cell_handle h) {
+      krt_->create_cell(h);
+      v_.create_cell(h);
+    }
+
+    template <class Cell_handle>
+    void destroy_cell(Cell_handle h) {
+      krt_->destroy_cell(h);
+      v_.destroy_cell(h);
+    }
+
+    template <class Edge>
+    void pre_edge_flip(const Edge &e) {
+      v_.pre_edge_flip(e);
+    }
+    template <class Edge>
+    void post_facet_flip(const Edge& e) {
+      v_.post_facet_flip(e);
+    }
+
+    template <class Facet>
+    void pre_facet_flip(const Facet &f) {
+      v_.pre_facet_flip(f);
+    }
+
+    template <class Facet>
+    void post_edge_flip(const Facet& f) {
+      v_.post_edge_flip(f);
+    }
+
+    template <class Key, class Cell>
+    void pre_move(Key k, Cell h){
+      v_.pre_move(k,h);
+    }
+
+    template <class Key, class Cell>
+    void post_move(Key k, Cell h){
+      v_.post_move(k,h);
+    }
+
+    Delaunay_visitor(This* krt, VisitorT v): krt_(krt), v_(v){}
+
+    This* krt_;
+    VisitorT v_;
+  };
+
+  friend struct Delaunay_visitor;
+
+  typedef typename Delaunay::Facet Facet;
+  typedef typename Delaunay::Edge Edge;
+
+public:
+  typedef typename Delaunay::Cell_handle Cell_handle;
+  typedef typename Delaunay::Vertex_handle Vertex_handle;
+  typedef VisitorT Visitor;
+
+
+  friend class internal::Delaunay_event_base_3<This, Root_stack>;
+  typedef internal::Delaunay_3_edge_flip_event<This, Root_stack> Edge_flip;
+  friend class internal::Delaunay_3_edge_flip_event<This, Root_stack>;
+  typedef internal::Delaunay_3_facet_flip_event<This, Root_stack> Facet_flip;
+  friend class internal::Delaunay_3_facet_flip_event<This, Root_stack>;
+
+  typedef internal::Regular_3_pop_event<This> Pop_event;
+  friend class internal::Regular_3_pop_event<This>;
+
+  typedef internal::Regular_3_non_vertex_event<This> Non_vertex_event;
+  friend class internal::Regular_3_non_vertex_event<This>;
+
+  typedef internal::Regular_3_move_event<This> Move_event;
+  friend class internal::Regular_3_move_event<This> ;
+
+  typedef internal::Regular_3_push_event<This> Push_event;
+  friend class internal::Regular_3_push_event<This> ;
+
+protected:
+  typedef std::multimap<typename Delaunay::Cell_handle,
+			Point_key> RCMap;
+  typedef std::map<Point_key, Event_key> RPMap;
+
+  struct Base_traits;
+  friend struct Base_traits;
+
+  struct Base_traits: public TraitsT
+  {
+    
+    typedef TriangulationT Triangulation;
+    typedef typename This_RT3::Edge_flip Edge_flip;
+    typedef typename This_RT3::Facet_flip Facet_flip;
+    typedef typename TraitsT::Kinetic_kernel::Power_test_3 Side_of_oriented_sphere_3;
+    typedef typename TraitsT::Kinetic_kernel::Weighted_orientation_3 Orientation_3;
+    typedef typename TraitsT::Active_points_3_table Active_points_3_table; // here
+
+    Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const
+    {
+      //std::cout << "Getting power test" << std::endl;
+      return TraitsT::kinetic_kernel_object().power_test_3_object();
+    }
+
+    Orientation_3 orientation_3_object() const
+    {
+      return TraitsT::kinetic_kernel_object().weighted_orientation_3_object();
+    }
+
+    Base_traits(This_RT3 *t, const TraitsT &tr): TraitsT(tr), wr_(t) {}
+
+    This_RT3* wrapper_handle() {
+      return wr_;
+    }
+    const This_RT3* wrapper_handle() const
+    {
+      return wr_;
+    }
+
+    Active_points_3_table* active_points_3_table_handle() const {
+      return TraitsT::active_points_3_table_handle(); // here
+    }
+
+    This_RT3 *wr_;
+  };
+
+  typedef internal::Delaunay_triangulation_base_3<Base_traits, Delaunay_visitor> KDel;
+
+  CGAL_KINETIC_DECLARE_LISTENERS(typename TraitsT::Simulator,
+				 typename Traits::Active_points_3_table)
+
+public:
+  
+
+  Regular_triangulation_3(Traits tr, Visitor v= Visitor()): kdel_(Base_traits(this, tr), Delaunay_visitor(this, v)) {
+    CGAL_KINETIC_INITIALIZE_LISTENERS(tr.simulator_handle(),
+				      tr.active_points_3_table_handle());
+  }
+
+
+  const Visitor &visitor() const
+  {
+    return kdel_.visitor().v_;
+  }
+
+  typedef TriangulationT Triangulation;
+  const Triangulation& triangulation() const
+  {
+    return kdel_.triangulation();
+  }
+
+  CGAL_KINETIC_LISTENER1(TRIANGULATION)
+  public:
+
+  void audit_move(Event_key k, Point_key pk, Cell_handle h, int) const {
+    CGAL_USE(k);
+    CGAL_assertion(kdel_.vertex_handle(pk) == Vertex_handle());
+    CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
+    CGAL_assertion(redundant_points_.find(pk)->second == k);
+    audit_redundant(pk, h);
+  }
+  
+  void audit_push(Event_key k, Point_key pk, Cell_handle h) const {
+    CGAL_USE(k);
+    CGAL_assertion(kdel_.vertex_handle(pk) == Vertex_handle());
+    CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
+    CGAL_assertion(redundant_points_.find(pk)->second == k);
+    audit_redundant(pk, h);
+  }
+  void audit_pop(Event_key k, Vertex_handle vh) const {
+    CGAL_USE(k);
+    CGAL_USE(vh);
+    CGAL_assertion_code(if (vh->info() != k) std::cerr << vh->info() << std::endl << k << std::endl);
+    CGAL_assertion(vh->info() == k);
+  }
+
+
+  void audit_redundant(Point_key pk, Cell_handle h) const {
+    CGAL_LOG(Log::LOTS, "Auditing redundant of " << pk << std::endl);
+    CGAL_assertion_code(bool found=false);
+    for (typename RCMap::const_iterator cur= redundant_cells_.begin();
+	 cur != redundant_cells_.end(); ++cur){
+      if (cur->first == h && cur->second == pk) {
+	CGAL_assertion_code(found=true);
+      } else {
+	CGAL_assertion(cur->second != pk);
+      }
+    }
+    CGAL_assertion(found);
+  }
+  void audit() const
+  {
+    CGAL_LOG(Log::LOTS, "Verifying regular.\n");
+    //if (!has_certificates()) return;
+    CGAL_LOG(Log::LOTS, *this << std::endl);
+    //P::instantaneous_kernel().set_time(P::simulator()->audit_time());
+    kdel_.audit();
+    audit_structure();
+    //  RPMap redundant_points_;
+    // RCMap redundant_cells_;
+
+   
+    Triangulation tri= triangulation();
+    for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end(); ++it) {
+      //Vertex_handle vh= tri.insert(it->first);
+      //if (vh != Vertex_handle()) 
+      CGAL_assertion_code(Vertex_handle rvh= tri.insert(it->first));
+      CGAL_assertion(rvh == Vertex_handle() || rvh->point() != it->first);
+      //if (has_certificates()) {
+      CGAL_assertion_code(Cell_handle ch= get_cell_handle(it->first));
+      CGAL_assertion_code( typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object());
+      CGAL_assertion_code(Cell_handle lh= triangulation().locate(it->first));
+      CGAL_assertion(lh == ch
+		     || cco(it->first).point() == cco(lh->vertex(0)->point()).point()
+		     || cco(it->first).point() == cco(lh->vertex(1)->point()).point()
+		     || cco(it->first).point() == cco(lh->vertex(2)->point()).point()
+		     || cco(it->first).point() == cco(lh->vertex(3)->point()).point());
+	//}
+    }
+  
+  }
+
+  void write(std::ostream &out) const {
+    if (triangulation().dimension() != 3) return;
+    kdel_.write(out);
+    for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
+	 vit != triangulation().finite_vertices_end(); ++vit) {
+      if (kdel_.is_degree_4(vit)) {
+	out << vit->point() << ": " << vit->info() << std::endl;
+      } else if (!kdel_.is_degree_4(vit) && vit->info() != Event_key()) {
+	out << vit->point() << "******: " << vit->info() << std::endl;
+      }
+    }
+    out << "Redundant points: ";
+    for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end();
+	 ++it) {
+      out << it->first << " ";
+    }
+    out << std::endl;
+    typename Delaunay::Cell_handle last;
+    out << "Redundant cells: \n";
+    for (typename RCMap::const_iterator it= redundant_cells_.begin(); it != redundant_cells_.end();
+	 ++it) {
+      if (it->first != last) {
+	last= it->first;
+	internal::write_cell(last, out);
+	out << ": ";
+      }
+      out << it->second << std::endl;
+    }
+    out << std::endl;
+    
+  }
+
+
+
+  void push(Point_key k, typename Triangulation::Cell_handle h, Root_stack rs) {
+    CGAL_LOG(Log::LOTS, "Pushing " << k << " into cell ");
+    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h, LOG_STREAM));
+    CGAL_LOG(Log::LOTS, std::endl);
+    
+    //redundant_points_.erase(k);
+
+    remove_redundant(h,k);
+    
+    //typename Triangulation::Vertex_handle vh= kdel_.push_vertex(k, h);
+    kdel_.clean_cell(h);
+    kdel_.visitor().pre_insert_vertex(k, h);
+    // into max dim simplex?
+    Vertex_handle vh=kdel_.triangulation().tds().insert_in_cell( h);
+    vh->set_point(k);
+    kdel_.set_vertex_handle(k, vh);
+    handle_vertex(vh, rs);
+
+    std::vector<Cell_handle> ics;
+    triangulation().incident_cells(vh, std::back_insert_iterator<std::vector<Cell_handle> >(ics));
+    CGAL_postcondition(ics.size() == 4);
+    for (unsigned int j=0; j< ics.size(); ++j) {
+      Cell_handle cc= ics[j];
+      kdel_.handle_new_cell(cc);
+    }
+    kdel_.visitor().post_insert_vertex(vh);
+ 
+    on_geometry_changed();
+  }
+
+  void pop(typename Triangulation::Vertex_handle vh, const Root_stack &rs) {
+    CGAL_LOG(Log::LOTS, "Popping " << vh->point() << std::endl);
+   
+    Point_key k= vh->point();
+    vh->info()= Event_key();
+    typename Triangulation::Cell_handle h= kdel_.pop_vertex(vh);
+    CGAL_precondition(redundant_points_[k]==Event_key());
+    redundant_cells_.insert(typename RCMap::value_type(h,k));
+    handle_redundant(k, h, rs);
+    /*if (!success) {
+      std::cerr << "dropped a vertex when popped.\n";
+      redundant_points_[k]=kdel_.simulator()->null_event();
+      }*/
+    //CGAL_postcondition(success);
+    on_geometry_changed();
+  }
+
+  void move(Point_key k, typename Triangulation::Cell_handle h, int dir, const Root_stack &rs) {
+    kdel_.visitor().pre_move(k,h);
+    CGAL_LOG(Log::LOTS, "Moving " << k << " from ");
+    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h, LOG_STREAM));
+    CGAL_LOG(Log::LOTS, " to ");
+    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell(h->neighbor(dir), LOG_STREAM ));
+    CGAL_LOG(Log::LOTS, std::endl);
+    typename Triangulation::Cell_handle neighbor = h->neighbor(dir);
+    
+    bool hinf=false;
+    for (unsigned int i=0; i<4; ++i) {
+      if (neighbor->vertex(i)== triangulation().infinite_vertex()) {
+	hinf=true;
+	break;
+      }
+    }
+    if (hinf) {
+      //insert(k, neighbor);
+      push(k, h, rs);
+    } else {
+      remove_redundant(h, k);
+      CGAL_precondition(redundant_points_[k]==Event_key());
+      redundant_cells_.insert(typename RCMap::value_type(neighbor, k));
+      handle_redundant(k, neighbor);
+    }
+    kdel_.visitor().post_move(k,neighbor);
+  }
+
+  //! remove an object
+  /*!
+    See if it is redundant. If so, remove it from the list and delete its certificate.
+    Otherwise, pass it along.
+  */
+  void erase(Point_key ) {
+    CGAL_error();
+    on_geometry_changed();
+  }
+
+  void set(Point_key k) {
+    if (!kdel_.has_certificates()) return;
+    if (kdel_.vertex_handle(k) != NULL) {
+      kdel_.change_vertex(k);
+      if (kdel_.is_degree_4(kdel_.vertex_handle(k))) {
+	handle_vertex(kdel_.vertex_handle(k));
+      }
+    } else {
+      //kdel_.simulator()->template event<Non_vertex_event>(redundant_points_[k]);
+      typename Triangulation::Cell_handle h= get_cell_handle(k);
+      kdel_.simulator()->delete_event(redundant_points_[k]);
+      redundant_points_.erase(k);
+      CGAL_precondition(redundant_points_[k]==Event_key());
+      handle_redundant(k, h);
+    }
+  }
+
+  void insert(Point_key k, Cell_handle h) {
+    // almost the same as push
+    // if insertion fails, then handle redundant
+    CGAL_LOG(Log::LOTS, "Inserth " << k << std::endl);
+    kdel_.set_instantaneous_time();
+    typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object();
+    typename Triangulation::Vertex_handle vh;
+    if (h!= Cell_handle()) {
+      for (unsigned int i=0; i<4; ++i) {
+	if (h->vertex(i) != Vertex_handle()
+	    && h->vertex(i)->point() != Point_key() 
+	    && cco(h->vertex(i)->point()).point() == cco(k).point()) {
+	  CGAL_LOG(Log::SOME, "Point " << k << " is on point " 
+			   << h->vertex(i)->point() << "\n");
+	  vh= h->vertex(i);
+	  break;
+	}
+      }
+      if (vh== Vertex_handle()) {
+	vh=kdel_.insert(k, h);
+      } 
+    } else {
+      vh= kdel_.insert(k);
+    }
+   
+    
+    post_insert(k,vh, h);
+  }
+
+  void insert(Point_key k) {
+    // almost the same as push
+    // if insertion fails, then handle redundant
+    CGAL_LOG(Log::LOTS, "Insert " << k << std::endl);
+
+    kdel_.set_instantaneous_time();
+    Cell_handle h= triangulation().locate(k);
+
+    return insert(k, h);
+  }
+
+  void post_insert(Point_key k, Vertex_handle vh, Cell_handle h) {
+    if (vh != Vertex_handle() && vh->point() != k) {
+      if (!has_certificates()) {
+	unhandled_keys_.push_back(k);
+	return;
+      } else {
+	typename Instantaneous_kernel::Current_coordinates 
+	  cco= triangulation().geom_traits().current_coordinates_object();
+	if (cco(vh->point()).weight() < cco(k).weight()) {
+	  // swap them
+	  Point_key rp = kdel_.replace_vertex(vh, k);
+	  degen_handle_redundant(rp,vh);
+	  if (kdel_.has_certificates() && kdel_.is_degree_4(vh)) {
+	    handle_vertex(vh);
+	  }
+	} else {
+	  vh= Vertex_handle();
+	  degen_handle_redundant(k, vh);
+	  // need to try various cells, not just one
+	}
+      }
+    } else if (vh == Vertex_handle()) {
+      CGAL_precondition(triangulation().geom_traits().time() 
+			==kdel_.simulator()->current_time());
+     
+      if (h== Cell_handle()) {
+	h = triangulation().locate(k);
+      }
+      CGAL_precondition(redundant_points_[k]==Event_key());
+      redundant_cells_.insert(typename RCMap::value_type(h, k));
+      handle_redundant(k,h);
+    } else if (kdel_.has_certificates() && kdel_.is_degree_4(vh)){
+      handle_vertex(vh); 
+    }
+
+    on_geometry_changed();
+  }
+
+  void degen_handle_redundant(Point_key k, Vertex_handle vh) {
+    std::vector<Cell_handle> ics;
+    triangulation().incident_cells(vh, std::back_inserter(ics));
+    kdel_.set_instantaneous_time(true);
+    for (unsigned int i=0; i< ics.size(); ++i) {
+      if (try_handle_redundant(k, ics[i])) return;
+    }
+    CGAL_error();
+  }
+
+public:
+  void set_has_certificates(bool tf) {
+    if (tf == has_certificates()) return;
+    if (tf==false) {
+      for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
+	   vit != triangulation().finite_vertices_end(); ++vit) {
+	if (vit->info() != Event_key()) {
+	  kdel_.simulator()->delete_event(vit->info());
+	  vit->info()=  Event_key();
+	}
+      }
+      for (typename RPMap::iterator it = redundant_points_.begin(); it != redundant_points_.end(); ++it) {
+	kdel_.simulator()->delete_event(it->second);
+	it->second= Event_key();
+      }
+      kdel_.set_has_certificates(false);
+    }
+    else {
+      kdel_.set_has_certificates(true);
+      if (kdel_.triangulation().dimension()==3) {
+	// must be first so the vertex handles are set
+	CGAL_LOG(Log::LOTS, "Setting up certificates.\n");
+	for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
+	     vit != triangulation().finite_vertices_end(); ++vit) {
+	  /*if (kdel_.is_degree_4( vit)) {
+	    handle_vertex(vit);
+	    }*/
+	  CGAL_assertion(!kdel_.is_degree_4(vit) || vit->info() != Event_key());
+	}
+	for (typename RCMap::iterator it= redundant_cells_.begin();
+	     it != redundant_cells_.end(); ++it) {
+	  CGAL_LOG(Log::LOTS, "On init " << it->second 
+			   << " is redundant" << std::endl);
+	  CGAL_precondition(redundant_points_[it->second]==Event_key());
+	  handle_redundant(it->second, it->first);
+	}
+	CGAL_assertion(unhandled_keys_.empty());
+      } else {
+	CGAL_LOG(Log::LOTS, "Triangulation does not have dimension 3.\n");
+      }
+    }
+
+  }
+
+  bool has_certificates() const
+  {
+    return kdel_.has_certificates();
+  }
+
+
+
+protected:
+
+  Cell_handle get_cell_handle(Point_key k) const {
+    CGAL_precondition(redundant_points_.find(k) != redundant_points_.end());
+    if (redundant_points_.find(k)->second == kdel_.simulator()->null_event()
+	|| !has_certificates()) {
+      for (typename RCMap::const_iterator it = redundant_cells_.begin();
+	   it != redundant_cells_.end(); ++it){
+	if (it->second == k) return it->first;
+      }
+      CGAL_error();
+      return Cell_handle();
+    } else {
+      return kdel_.simulator()->template event<Non_vertex_event>(redundant_points_.find(k)->second).cell_handle();
+    }
+  }
+
+  
+  void audit_structure() const
+  {
+    if (!has_certificates()) {
+      for (typename RPMap::const_iterator it= redundant_points_.begin(); 
+	   it != redundant_points_.end(); ++it) {
+	CGAL_assertion(it->second==Event_key());
+      }
+
+      for (typename RCMap::const_iterator it= redundant_cells_.begin(); 
+	   it != redundant_cells_.end(); ++it) {
+	Cell_handle h= it->first;
+	Point_key k=it->second;
+	Cell_handle lh= triangulation().locate(k);
+	if (lh != h) {
+	  typename Instantaneous_kernel::Current_coordinates cco= triangulation().geom_traits().current_coordinates_object();
+	  bool found=false;
+	  for (unsigned int i=0; i<4; ++i) {
+	    if (lh->vertex(i)->point() != Point_key() && cco(lh->vertex(i)->point()).point() 
+		== cco(k).point()) {
+	      found=true;
+	    }
+	  }
+	  CGAL_assertion(found);
+          CGAL_USE(found);
+	}
+
+	
+      }
+    } else {
+      for (typename Triangulation::Finite_vertices_iterator vit= triangulation().finite_vertices_begin();
+	   vit != triangulation().finite_vertices_end(); ++vit) {
+	if (triangulation().degree(vit) == 4) {
+	  CGAL_assertion_code(Point_key k= vit->point());
+	  // it could be infinite
+	  // !! for VC
+	  CGAL_assertion(vit->info() != Event_key() || !k.is_valid());
+	}
+	else {
+	  CGAL_assertion(vit->info() == Event_key());
+	}
+	CGAL_assertion(redundant_points_.find(vit->point())== redundant_points_.end());
+      }
+      CGAL_assertion(triangulation().infinite_vertex()->info() == Event_key());
+      for (typename RPMap::const_iterator it= redundant_points_.begin(); it != redundant_points_.end(); ++it) {
+	CGAL_assertion(kdel_.vertex_handle(it->first) == Vertex_handle());
+	Cell_handle ch= get_cell_handle(it->first);
+	typename RCMap::const_iterator beg= redundant_cells_.lower_bound(ch);
+	typename RCMap::const_iterator end= redundant_cells_.upper_bound(ch);
+	bool found=false;
+	for (; beg != end; ++beg) {
+	  if (beg->second == it->first) {
+	    found=true;
+	    break;
+	  }
+	}
+	CGAL_assertion(found);
+        CGAL_USE(found);
+      } 
+
+      for (typename RCMap::const_iterator it= redundant_cells_.begin(); 
+	   it != redundant_cells_.end(); ++it) {
+	Point_key pk= it->second;
+	Cell_handle ch= it->first;
+	CGAL_assertion(redundant_points_.find(pk) != redundant_points_.end());
+	Event_key k= redundant_points_.find(pk)->second;
+
+	CGAL_assertion_code(Cell_handle ech= get_cell_handle(pk));
+	CGAL_assertion(ch== ech);
+      }
+    }
+  }
+protected:
+  //! also much check for vertex_events
+  void flip(const typename Triangulation::Edge &edge) {
+    kdel_.flip(edge);
+
+    on_geometry_changed();
+  }
+
+  void flip(const typename KDel::Facet &flip_facet) {
+    kdel_.flip(flip_facet);
+
+    on_geometry_changed();
+  }
+
+  CGAL::Sign orientation(Point_key k, Cell_handle h) const {
+    kdel_.set_instantaneous_time();
+    int hinf=-1;
+    for (int i=0; i< 4; ++i) {
+      if (h->vertex(i)->point() == Point_key()) {
+	hinf=i;
+      }
+    }
+    CGAL::Sign ret=CGAL::POSITIVE;
+    for (int i=0; i< 4; ++i) {
+      if (hinf == -1 ||  hinf == i) {
+	typename Triangulation::Facet f(h, i);
+	typename Traits::Instantaneous_kernel::Orientation_3 o3= triangulation().geom_traits().orientation_3_object();
+	
+	CGAL::Sign sn= o3((internal::vertex_of_facet(f,0)->point()),
+			  (internal::vertex_of_facet(f,1)->point()),
+			  (internal::vertex_of_facet(f,2)->point()),
+			  (k));
+	if (sn ==CGAL::ZERO) {
+	  CGAL_LOG(Log::SOME, "Point " << k << " lies on face ") ;
+	  CGAL_LOG_WRITE(Log::SOME, internal::write_facet( f, LOG_STREAM));
+	  CGAL_LOG(Log::SOME, "\nPoint trajectory is  " << point(k)  << std::endl) ;
+	  CGAL_LOG(Log::SOME, "Triangle 0  " << point(internal::vertex_of_facet(f,0)->point())  << std::endl) ;
+	  CGAL_LOG(Log::SOME, "Triangle 1  " << point(internal::vertex_of_facet(f,1)->point())  << std::endl) ;
+	  CGAL_LOG(Log::SOME, "Triangle 2  " << point(internal::vertex_of_facet(f,2)->point())  << std::endl) ;
+	  ret=CGAL::ZERO;
+	} else if (sn==CGAL::NEGATIVE) {
+	  ret=CGAL::NEGATIVE;
+	  return ret;
+	}
+      }
+    }
+    return ret;
+  }
+
+  void handle_redundant(Point_key k, Cell_handle h, Root_stack s) {
+    CGAL_LOG(Log::LOTS, "Handle redundant " << k << " ") ;
+    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell( h, LOG_STREAM));
+    CGAL_LOG(Log::LOTS, std::endl);
+    CGAL_precondition(orientation(k,h) != CGAL::NEGATIVE);
+    CGAL_precondition(redundant_points_[k]==Event_key());
+    CGAL_assertion_code(bool found=false);
+    for( typename RCMap::iterator it = redundant_cells_.begin();  it != redundant_cells_.end(); ++it) {
+      CGAL_assertion_code(if(it->second==k) found=true);
+      CGAL_assertion(h== it->first || it->second != k);
+    }
+    CGAL_assertion(found);
+    redundant_points_[k]= Event_key();
+    if (!kdel_.has_certificates()) return;
+ 
+    Time pst;
+    /*if (!ps.empty()) pst = ps.top();
+      else pst= std::numeric_limits<Time>::infinity();*/
+    if (s.will_fail()) {
+      pst=s.failure_time();
+    } else {
+      pst= kdel_.simulator()->end_time();
+    }
+    int hinf=-1;
+    for (int i=0; i< 4; ++i) {
+      if (h->vertex(i)->point() == Point_key()) {
+	hinf=i;
+      }
+    }
+    int first=0;
+    for (int i=0; i< 4; ++i) {
+      if (hinf == -1 || hinf ==i) {
+	typename Triangulation::Facet f(h, i);
+	// order matters
+	Root_stack cs
+	  = kdel_.orientation_object()(point(internal::vertex_of_facet(f,0)->point()),
+				       point(internal::vertex_of_facet(f,1)->point()),
+				       point(internal::vertex_of_facet(f,2)->point()),
+				       point(k),
+				       kdel_.simulator()->current_time(),
+				       kdel_.simulator()->end_time());
+	if (cs.will_fail() && cs.failure_time() < pst) {
+	  pst= cs.failure_time();
+	  s=cs;
+	  first= i+1;
+	}
+      }
+    }
+    if (pst < kdel_.simulator()->end_time()) {
+      s.pop_failure_time();
+      if (first==0 ) {
+	CGAL_LOG(Log::LOTS, "Making push certificate for " << k << std::endl);
+	redundant_points_[k]= kdel_.simulator()->new_event(pst, Push_event(s, k, h, this));
+	CGAL_assertion_code(kdel_.simulator()->audit_event(redundant_points_[k]));
+	CGAL_assertion_code(kdel_.simulator()->audit_events());
+      } else {
+	CGAL_LOG(Log::LOTS, "Making move certificate for " << k << std::endl);
+	redundant_points_[k]= kdel_.simulator()->new_event(pst, Move_event(s, k, h, first-1, this));
+	CGAL_assertion_code(kdel_.simulator()->audit_event(redundant_points_[k]));
+	CGAL_assertion_code(kdel_.simulator()->audit_events());
+      }
+    } else {
+      redundant_points_[k]= kdel_.simulator()->null_event();
+    }
+
+   
+  }
+
+  /*
+    if (s.will_fail()) {
+    Time t= s.failure_time();
+    s.pop_failure_time();
+    redundant_points_[k]= kdel_.simulator()->new_event(t, Push_event(s, vh, this));
+    } else {
+    return kdel_.simulator()->null_event();
+    }
+  */
+
+  void handle_redundant(Point_key k, typename Triangulation::Cell_handle h) {
+    int hinf=-1;
+    for (int i=0; i< 4; ++i) {
+      if (h->vertex(i)->point() == Point_key()) {
+	hinf=i;
+      }
+    }
+    Root_stack ps;
+    if (hinf ==-1 ) {
+      ps
+	= kdel_.power_test_object()(point(h->vertex(0)->point()),
+				    point(h->vertex(1)->point()),
+				    point(h->vertex(2)->point()),
+				    point(h->vertex(3)->point()),
+				    point(k),
+				    kdel_.simulator()->current_time(),
+				    kdel_.simulator()->end_time());
+    }
+    handle_redundant(k,h,ps);
+  }
+
+
+  bool try_handle_redundant(Point_key k, typename Triangulation::Cell_handle h) {
+    CGAL_LOG(Log::LOTS, "Trying handle redundant " << k << " ") ;
+    CGAL_LOG_WRITE(Log::LOTS, internal::write_cell( h, LOG_STREAM));
+    CGAL_LOG(Log::LOTS, std::endl);
+    if (orientation(k,h) != CGAL::NEGATIVE) {
+      CGAL_precondition(redundant_points_[k]==Event_key());
+      redundant_cells_.insert(typename RCMap::value_type(h, k));
+      handle_redundant(k,h);
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  void handle_vertex(typename Triangulation::Vertex_handle vh, Root_stack &s) {
+    CGAL_LOG(Log::LOTS, "Updating vertex " << vh->point() << std::endl);
+    CGAL_precondition(vh->info() == Event_key());
+    if (s.will_fail()) {
+      Time t= s.failure_time();
+      s.pop_failure_time();
+      vh->info()= kdel_.simulator()->new_event(t, Pop_event(s, vh, this));
+      CGAL_assertion_code(kdel_.simulator()->audit_event(vh->info()));
+      CGAL_assertion_code(kdel_.simulator()->audit_events());
+      CGAL_assertion_code(kdel_.simulator()->template event<Pop_event>(vh->info()).audit(vh->info()));
+    } else {
+      vh->info()= kdel_.simulator()->null_event();
+    }
+  }
+
+  void handle_vertex(typename Triangulation::Vertex_handle vh) {
+    CGAL_LOG(Log::LOTS, "Handling vertex " << vh->point() << std::endl);
+    if (vh== triangulation().infinite_vertex()) return;
+    CGAL_precondition( internal::has_degree_4(triangulation(), vh));
+    CGAL_precondition( vh->info() == Event_key());
+
+    typename Triangulation::Cell_handle ch= vh->cell();
+    typename Triangulation::Facet f(ch, ch->index(vh));
+    std::vector<typename Triangulation::Vertex_handle> n(4);
+   
+    for (int i=0; i<3; ++i) {
+      n[i]= internal::vertex_of_facet(f,i);
+      if (n[i]== triangulation().infinite_vertex()) {
+	vh->info() = kdel_.simulator()->null_event();
+	return;
+      }
+    }
+    int ind= (f.second+1)%4;
+    // some vertex on facet
+    n[3] = triangulation().mirror_vertex(ch, ind);
+    if (n[3]== triangulation().infinite_vertex()) {
+      vh->info() = kdel_.simulator()->null_event();
+      return;
+    }
+
+    CGAL_LOG(Log::LOTS, "Making D4 certificate for " << n[0]->point() << n[1]->point()
+		     << n[2]->point() << n[3]->point() << " around " << vh->point() << std::endl);
+
+   
+    //! The order is switched to invert the predicate since we want it to fail when it goes outside
+    Root_stack s
+      = kdel_.power_test_object()(point(n[1]->point()),
+				  point(n[0]->point()),
+				  point(n[2]->point()),
+				  point(n[3]->point()),
+				  point(vh->point()),
+				  kdel_.simulator()->current_time(),
+				  kdel_.simulator()->end_time());
+    return handle_vertex(vh, s);
+  }
+
+
+  void on_geometry_changed() {
+    CGAL_KINETIC_NOTIFY(TRIANGULATION);
+    CGAL_LOG(Log::LOTS, *this);
+    audit_structure();
+  }
+
+  typename MPT::Data point(Point_key k) const {
+    return kdel_.moving_object_table()->at(k);
+  }
+
+  // clean vertex events, gather redundant points
+
+  // create vertex events, try to insert redundant points
+
+
+  void destroy_cell(typename Triangulation::Cell_handle h) {
+    CGAL_LOG(Log::LOTS, "Cleaning cell " << h->vertex(0)->point()
+		     << " " << h->vertex(1)->point() << " " << h->vertex(2)->point()
+		     << " " << h->vertex(3)->point() << std::endl);
+    for (unsigned int i=0; i<4; ++i) {
+      if (h->vertex(i)->info() != Event_key()) {
+	CGAL_LOG(Log::LOTS, "Cleaning vertex " << h->vertex(i)->point() << std::endl);
+	kdel_.simulator()->delete_event(h->vertex(i)->info());
+	h->vertex(i)->info() = Event_key();
+      }
+    }
+    typename RCMap::iterator beg= redundant_cells_.lower_bound(h);
+    typename RCMap::iterator end= redundant_cells_.upper_bound(h);
+    for (; beg != end; ++beg) {
+      unhandled_keys_.push_back(beg->second);
+      kdel_.simulator()->delete_event(redundant_points_[beg->second]);
+      redundant_points_.erase(beg->second);
+    }
+    redundant_cells_.erase(redundant_cells_.lower_bound(h),
+			   redundant_cells_.upper_bound(h));
+  }
+
+  void create_cell(typename Triangulation::Cell_handle h) {
+    CGAL_LOG(Log::LOTS, "Creating cell " << h->vertex(0)->point()
+		     << " " << h->vertex(1)->point() << " " << h->vertex(2)->point()
+		     << " " << h->vertex(3)->point() << std::endl);
+    for (unsigned int i=0; i< 4; ++i){
+      if (h->vertex(i)->info() == Event_key() && kdel_.is_degree_4(h->vertex(i))){
+	handle_vertex(h->vertex(i));
+      }
+    }
+    for ( int i=0; i< static_cast<int>(unhandled_keys_.size()); ++i) {
+      kdel_.set_instantaneous_time(true);
+      if (try_handle_redundant(unhandled_keys_[i], h)) {
+	unhandled_keys_.erase(unhandled_keys_.begin()+i);
+	--i;
+      }
+    }
+  }
+
+  void remove_redundant(typename Triangulation::Cell_handle h, Point_key k) {
+    redundant_points_.erase(k);
+    typename RCMap::iterator beg = redundant_cells_.lower_bound(h);
+    typename RCMap::iterator end = redundant_cells_.upper_bound(h);
+    for (; beg != end; ++beg) {
+      if (beg->second == k) {
+	redundant_cells_.erase(beg);
+	return;
+      }
+    }
+    
+    for (typename RCMap::iterator cur= redundant_cells_.begin();
+	 cur != redundant_cells_.end(); ++cur){
+      CGAL_ERROR_WRITE( internal::write_cell( cur->first, LOG_STREAM));
+      CGAL_ERROR(": " << cur->second);
+      if (cur->second == k) {
+	CGAL_assertion_code(Cell_handle ch= cur->first);
+	CGAL_assertion(ch==h);
+	CGAL_error();
+      }
+    }
+    CGAL_error();
+  }
+
+ 
+
+  KDel kdel_;
+  RPMap redundant_points_;
+  RCMap redundant_cells_;
+  std::vector<Point_key> unhandled_keys_;
+  //typename P::Instantaneous_kernel::Orientation_3 po_;
+  // typename P::Kinetic_kernel::Weighted_orientation_3 por_;
+};
+
+template <class Traits, class Triang, class Visit>
+std::ostream &operator<<(std::ostream &out, const Regular_triangulation_3<Traits, Triang, Visit> &rt)
+{
+  rt.write(out);
+  return out;
+}
+
+
+} } //namespace CGAL::Kinetic
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_CORE_exact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_CORE_exact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_CORE_exact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_CORE_exact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_exact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_exact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_exact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_exact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_inexact_simulation_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_inexact_simulation_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_inexact_simulation_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_inexact_simulation_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_instantaneous_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_instantaneous_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_instantaneous_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_instantaneous_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Simulator_objects_listener.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Simulator_objects_listener.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Simulator_objects_listener.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Simulator_objects_listener.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort.h
new file mode 100644
index 0000000..31341dd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort.h
@@ -0,0 +1,469 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_KINETIC_TESTING_SORT_H
+#define CGAL_KINETIC_TESTING_SORT_H
+#include <CGAL/Kinetic/basic.h>
+#include <CGAL/Kinetic/listeners.h>
+#include <CGAL/Kinetic/Ref_counted.h>
+#include <CGAL/Kinetic/internal/debug_counters.h>
+#include <CGAL/Kinetic/Sort_visitor_base.h>
+#include <CGAL/Kinetic/Event_base.h>
+#include <CGAL/use.h>
+#include <algorithm>
+#include <iostream>
+#include <iterator>
+#include <list>
+#include <map>
+#include <set>
+
+namespace CGAL { namespace Kinetic {
+
+template <class KDS, class It, class RE>
+class Swap_event;
+
+struct Empty_data {};
+
+//! A simple KDS which maintains objects sorted by their x coordinate
+/*!  This does not use Simple_kds_base for now irrelevant
+  reasons. Ditto for the lack of protection of any of the fields. The
+  code is designed to be read, so read it if you want to figure out
+  what is going on.
+*/
+template <class Traits, class Visitor=Sort_visitor_base> class Sort:
+// for ref counted pointers
+  public Ref_counted<Sort< Traits, Visitor> >
+{
+  // for later, please ignore
+  typedef typename Traits::Active_points_1_table TTable;
+  typedef typename Traits::Kinetic_kernel::Compare_x_1 KLess;
+  typedef typename Traits::Instantaneous_kernel::Compare_x_1 IComp;
+
+  //typedef typename Traits::Instantaneous_kernel::Compare_x_1 ILess;
+
+  typedef Sort<Traits, Visitor> This;
+  // The way the Simulator represents time.
+  typedef typename Traits::Simulator::Time Time;
+  // The way the Simulator represents time.
+  typedef typename Traits::Simulator::NT NT;
+  // A label for a moving primitive in the MovingObjectTable
+  typedef typename TTable::Key Object_key;
+
+
+  // STL algorithms want less rather than compare. So we need to convert.
+  struct ILess {
+    ILess(IComp ic): ic_(ic){}
+
+    bool operator()(Object_key a, Object_key b) const {
+      bool ret=( ic_(a,b) == CGAL::SMALLER);
+      return ret;
+    }
+    IComp ic_;
+  };
+
+  // A label for a certificate so it can be descheduled.
+  typedef typename Traits::Simulator::Event_key Event_key;
+  // To shorten the names. Use the default choice for the static kernel.
+  typedef typename Traits::Instantaneous_kernel Instantaneous_kernel;
+  // The table containing the points
+  typedef TTable Active_objects_table;
+  // the comparators, one for static and one for instantaneous
+  typedef KLess Kinetic_less;
+  typedef ILess Instantaneous_less;
+  struct OD {
+    OD(Object_key k): key_(k){}
+    Object_key object() const {return key_;}
+    Event_key event() const {return event_;}
+    void set_event(Event_key k) {
+      event_= k;
+    }
+    operator Object_key() const {
+      return key_;
+    }
+    void swap(OD &o) {
+      std::swap(key_, o.key_);
+    }
+    Object_key key_;
+    Event_key event_;
+  };
+  // this is used to identify pairs of objects in the list
+  typedef typename std::list<OD>::iterator iterator;
+  // The certificate generator
+  /*struct Less {
+    typedef typename Traits::Kinetic_kernel::Is_less_x_1 Less_x;
+    Less(Less_x x): less_(x){}
+    bool operator()(const OD &a, const OD &b) const {
+      return less_(a.key(), b.key());
+    }
+    Less less_;
+    }*/
+
+  typedef Swap_event<This,iterator, typename KLess::result_type> Event;
+  friend class Swap_event<This,iterator, typename KLess::result_type>;
+  // Redirects the Simulator notifications to function calls
+  CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator,
+				 typename Active_objects_table)
+public:
+
+  // Register this KDS with the MovingObjectTable and the Simulator
+  Sort(Traits tr, Visitor v=Visitor()/*,
+       typedef Active_objects_table::Handle aot,
+       Kinetic_less kless=tr.kinetic_kernel_object().is_less_x_1_object(),
+       Instantaneous_less iless*/): compare_(tr.kinetic_kernel_object().compare_x_1_object()),
+				    ik_(tr.instantaneous_kernel_object()),
+				    iless_(ik_.compare_x_1_object()), v_(v),
+				    aot_(tr.active_points_1_table_handle()),
+				    simulator_(tr.simulator_handle()){
+    CGAL_KINETIC_INITIALIZE_LISTENERS(simulator_, aot_);
+    wrote_objects_= false;
+  }
+
+  const Visitor& visitor() const {
+    return v_;
+  }
+  Visitor& visitor() {
+    return v_;
+  }
+
+  /*Traits &traits() {
+    return tr_;
+  }
+  const Traits &traits() const {
+    return tr_;
+    }*/
+
+  typedef iterator Vertex_handle;
+
+  /* Insert k and update the affected certificates. std::upper_bound
+     returns the first place where an item can be inserted in a sorted
+     list. Called by the MOT_listener.*/
+  iterator insert(Object_key k) {
+    NT nt= simulator_->next_time_representable_as_nt();
+    simulator_->set_current_time(nt);
+    ik_.set_time(nt);
+    iterator it = std::upper_bound(sorted_.begin(), sorted_.end(),
+				   k, iless_);
+    CGAL_LOG(Log::LOTS, "\nInserting " << k);
+    if (it != sorted_.end()) {
+      CGAL_LOG(Log::LOTS, " before " << it->object() <<std::endl);
+    } else {
+      CGAL_LOG(Log::LOTS, " before end" <<std::endl);
+    }
+    /*if (it != sorted_.end()) {
+      v_.remove_edge(prior(it), it);
+      }*/
+    v_.pre_insert_vertex(k);
+    sorted_.insert(it, OD(k));
+
+
+    rebuild_certificate(prior(it));
+    //v_.create_edge(prior(it), it);
+    if (prior(it) != sorted_.begin()) {
+      rebuild_certificate(prior(prior(it)));
+      //v_.create_edge(prior(prior(it)), prior(it));
+    }
+
+    v_.post_insert_vertex(prior(it));
+    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
+    CGAL_LOG(Log::LOTS, std::endl);
+    return it;
+    //write(std::cout);
+  }
+
+  /* Rebuild the certificate for the pair of points *it and *(++it).
+     If there is a previous certificate there, deschedule it.*/
+  void rebuild_certificate(const iterator it) {
+    CGAL_LOG(Log::LOTS, "Building certifiate for " << it->object() << " and " << next(it)->object()<< std::endl);
+    CGAL_precondition(it != sorted_.end());
+    if (it->event() != Event_key()) {
+      simulator_->delete_event(it->event());
+      it->set_event(Event_key());
+    }
+    if (next(it) == sorted_.end()) return;
+    //Less less=kk_.less_x_1_object();
+    typename KLess::result_type s
+      = compare_( aot_->at(next(it)->object()), aot_->at(it->object()), simulator_->current_time(),
+		 simulator_->end_time());
+    // the Simulator will detect if the failure time is at infinity
+    if (s.will_fail()) {
+      Time t= s.failure_time();
+      s.pop_failure_time();
+      Event e(it, this,s);
+      it->set_event( simulator_->new_event(t, e));
+    } else {
+      it->set_event( simulator_->null_event());
+    }
+    //} else events_[*it]= simulator_->null_event();
+  }
+
+
+
+  /* Swap the pair of objects with *it as the first element.  The old
+     solver is used to compute the next root between the two points
+     being swapped. This method is called by an Event object.*/
+  void swap(iterator it, typename KLess::result_type &s) {
+    CGAL_LOG(Log::LOTS, "Swapping " << it->object() << " and " << next(it)->object() << std::endl);
+    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
+    v_.pre_swap(it, next(it));
+    it->set_event(Event_key());
+    iterator n= next(it);
+    if (n->event() != Event_key()) {
+      simulator_->delete_event(n->event());
+      n->set_event(Event_key());
+    }
+
+    it->swap(*n);
+
+    CGAL_LOG(Log::LOTS, "Updating next certificate " << std::endl);
+    if (n != sorted_.end()) {
+      rebuild_certificate(n);
+    }
+    CGAL_LOG(Log::LOTS, "Updating middle certificate " << std::endl);
+    if (s.will_fail()) {
+      Time t= s.failure_time(); s.pop_failure_time();
+      it->set_event(simulator_->new_event(t, Event(it, this,s)));
+    } else {
+      it->set_event(simulator_->null_event());
+    }
+
+
+    CGAL_LOG(Log::LOTS, "Updating prev certificate " << std::endl);
+    if (it != sorted_.begin()) {
+      rebuild_certificate(prior(it));
+    }
+    v_.post_swap(it, n);
+
+    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
+  }
+
+  void audit_order() const {
+    //std::cout << "Auditing order at time " << ik_.time() << std::endl;
+    for (typename std::list<OD>::const_iterator it
+	   = sorted_.begin(); it->object() != sorted_.back().object(); ++it) {
+      if (iless_(*next(it), *it)) {
+#ifdef CGAL_KINETIC_CHECK_EXACTNESS
+	std::cerr << "ERROR: objects " << it->object() << " and "
+		  << next(it)->object() << " are out of order.\n";
+	std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl;
+	std::cerr << "Time is " << ik_.time() << std::endl;
+	/*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and "
+	  << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/
+	std::cerr << "ERROR: order is ";
+#else
+	if (warned_.find(*it) == warned_.end() ||
+	    warned_[*it].find(*next(it)) == warned_[*it].end()) {
+	  std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and "
+		    << next(it)->object() << " are out of order.\n";
+	  std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl;
+	  std::cerr << "Time is " << ik_.time() << std::endl;
+	  std::cerr << "NUMERIC ISSUE: order is ";
+	}
+#endif
+	write(std::cerr);
+	std::cerr << std::endl;
+	++internal::get_static_audit_failures();
+
+	if (!wrote_objects_) {
+	  wrote_objects_=true;
+	  std::cerr << "Objects are: ";
+	  for (typename Active_objects_table::Key_iterator kit= aot_->keys_begin();
+	       kit != aot_->keys_end(); ++kit){
+	    std::cerr <<  aot_->at(*kit) << std::endl;
+	  }
+	}
+      }
+      if (compare_.sign_at(  aot_->at(it->object()),
+                             aot_->at(next(it)->object()),
+                             simulator_->current_time()) == CGAL::LARGER) {
+#ifdef CGAL_KINETIC_CHECK_EXACTNESS
+	std::cerr << "ERROR: kinetic objects " << it->object() << " and "
+		  << next(it)->object() << " are out of order.\n";
+	std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl;
+	std::cerr << "Time is " <<ik_.time() << std::endl;
+	/*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and "
+	  << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/
+	std::cerr << "ERROR: order is ";
+#else
+	if (warned_.find(*it) == warned_.end() ||
+	    warned_[*it].find(*next(it)) == warned_[*it].end()) {
+	  std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and "
+		    << next(it)->object() << " are out of order.\n";
+	  std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl;
+	  std::cerr << "Time is " <<ik_.time() << std::endl;
+	  std::cerr << "NUMERIC ISSUE: order is ";
+	}
+#endif
+	write(std::cerr);
+	std::cerr << std::endl;
+	++internal::get_static_audit_failures();
+
+	if (!wrote_objects_) {
+	  wrote_objects_=true;
+	  std::cerr << "Objects are: ";
+	  for (typename Active_objects_table::Key_iterator kit= aot_->keys_begin();
+	       kit != aot_->keys_end(); ++kit){
+	    std::cerr << aot_->at(*kit) << std::endl;
+	  }
+	}
+      }
+    }
+  }
+
+  /* Verify the structure by checking that the current coordinates are
+     properly sorted for time t. This function is called by the Sim_listener.*/
+  void audit() const
+  {
+
+    if (sorted_.size() <2) return;
+
+    ik_.set_time(simulator_->audit_time());
+    CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM));
+    CGAL_LOG(Log::LOTS, std::endl);
+
+
+    //typename Instantaneous_kernel::Less_x_1 less= ik_.less_x_1_object();
+    for (typename std::list<OD>::const_iterator it
+	   = sorted_.begin(); it->object() != sorted_.back().object(); ++it) {
+      CGAL_assertion(it->event() != Event_key());
+    }
+    CGAL_assertion(sorted_.back().event()==Event_key());
+
+    audit_order();
+  }
+
+  /* Update the certificates adjacent to object k. This method is called by
+     the MOT_listener. std::equal_range finds all items equal
+     to a key in a sorted list (there can only be one).*/
+  void set(Object_key k) {
+    typename std::list<OD>::iterator it;
+    for (it = sorted_.begin(); it != sorted_.end(); ++it){
+      if (it->object()==k) break;
+    }
+    CGAL_assertion(it != sorted_.end());
+    v_.change_vertex(it);
+    rebuild_certificate(it);
+    if (it != sorted_.begin()) rebuild_certificate(--it);
+  }
+
+  /* Remove object k and destroy 2 certificates and create one new one.
+     This function is called by the MOT_listener.*/
+  void erase(Object_key k) {
+    iterator it;
+    for (it = sorted_.begin(); it != sorted_.end(); ++it){
+      if (it->object()==k) break;
+    }
+    //iterator it =  std::equal_range(sorted_.begin(), sorted_.end(),k).first;
+    CGAL_precondition(it != sorted_.end());
+    CGAL_precondition(it->object() == k);
+
+    v_.pre_remove_vertex(it);
+    if (next(it) != Iterator(end())) {
+      simulator_->delete_event(it->event());
+      it->set_event(Event_key());
+    }
+    if (it != sorted_.begin()) {
+      iterator p= prior(it);
+      sorted_.erase(it);
+      rebuild_certificate(p);
+    } else {
+      sorted_.erase(it);
+    }
+    v_.post_remove_vertex(k);
+  }
+  template <class It> static It next(It it){ return ++it;}
+  template <class It> static It prior(It it){ return --it;}
+
+  void write(std::ostream &out) const {
+    out << "Sort:\n";
+    for (typename std::list<OD>::const_iterator it
+	   = sorted_.begin(); it != sorted_.end(); ++it) {
+      out << it->object() << " with event (";
+      if (it->event() != Event_key()) {
+        out << it->event();
+      } else {
+        out << "NULL";
+      }
+      out << ")\n";
+    }
+    out << std::endl << std::endl;;
+  }
+
+  typedef typename std::list<OD>::const_iterator Iterator;
+  Iterator begin() const
+  {
+    return sorted_.begin();
+  }
+  Iterator end() const
+  {
+    return sorted_.end();
+  }
+
+  // The points in sorted order
+  std::list<OD > sorted_;
+  // events_[k] is the certificates between k and the object after it
+  //std::map<Object_key, Event_key > events_;
+  Kinetic_less compare_;
+  Instantaneous_kernel ik_;
+  Instantaneous_less iless_;
+  //#ifndef NDEBUG
+  mutable bool wrote_objects_;
+  mutable std::map<Object_key, std::set<Object_key> > warned_;
+  Visitor v_;
+  typename Active_objects_table::Handle aot_;
+  typename Traits::Simulator::Handle simulator_;
+  //#endif
+};
+
+template <class Traits, class Visitor>
+std::ostream &operator<<(std::ostream &out, const Sort<Traits, Visitor> &s) {
+  s.write(out);
+  return out;
+}
+
+/* It needs to implement the time() and process() functions and
+   operator<< */
+template <class Sort, class Id, class Solver>
+class Swap_event: public Event_base<Sort*>
+{
+public:
+  Swap_event(Id o, Sort* sorter,
+	     const Solver &s): Event_base<Sort*>(sorter),
+			       left_object_(o), s_(s){}
+  void process() {
+    Event_base<Sort*>::kds()->swap(left_object_, s_);
+  }
+  void write(std::ostream &out) const {
+    out << left_object_->object() << "X" << Sort::next(left_object_)->object();
+    if (s_.will_fail()) out <<  " next is " << s_.failure_time();
+    else out << " out of failures";
+  }
+  void audit(typename Sort::Event_key tk) const {
+    //std::cout << "Auditing event ";
+    //write(std::cout);
+    //std::cout << std::endl;
+    CGAL_assertion(left_object_->event() == tk);
+    CGAL_USE(tk);
+  }
+  Id left_object_; Solver s_;
+};
+
+
+} } //namespace CGAL::Kinetic
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort_event_log_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort_event_log_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort_event_log_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort_event_log_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort_visitor_base.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort_visitor_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Sort_visitor_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Sort_visitor_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/Triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/Triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/Triangulation_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Two_list_pointer_event_queue.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Two_list_pointer_event_queue.h
new file mode 100644
index 0000000..f3f834d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/Two_list_pointer_event_queue.h
@@ -0,0 +1,1039 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_KINETIC_BIN_QUEUE_H
+#define CGAL_KINETIC_BIN_QUEUE_H
+#include <CGAL/Kinetic/basic.h>
+#include <iostream>
+#include <CGAL/Kinetic/internal/debug_counters.h>
+#include <CGAL/In_place_list.h>
+#include <functional>
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+#include <iostream>
+#include <CGAL/Kinetic/Ref_counted.h>
+#include <CGAL/Kinetic/internal/infinity_or_max.h>
+#include <algorithm>
+#include <boost/utility.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <CGAL/Kinetic/internal/debug_counters.h>
+
+//int two_list_remaining=0;
+
+//int growth__=0;
+//int shrink__=0;
+//int queue_insertions__=0;
+//int queue_front_insertions__=0;
+
+namespace CGAL { namespace Kinetic { namespace internal {
+
+
+template <class Item>
+struct Two_list_pointer_event_queue_key: public Item::Handle
+{
+  typedef Two_list_pointer_event_queue_key<Item> This;
+  typedef typename Item::Handle P;
+  Two_list_pointer_event_queue_key(){};
+  Two_list_pointer_event_queue_key(Item  *p): Item::Handle(p){}
+  std::ostream& write(std::ostream &out) {
+    if (Item::Handle::get()) {
+      out << "(" << Item::Handle::get() << ": " << *Item::Handle::get() << ")";
+    }
+    else {
+      out << "null";
+    }
+    return out;
+  }
+  /*operator bool() const
+    {
+    return Item::Handle::get() != NULL;
+    }*/
+  bool is_valid() const {
+    return  Item::Handle::get() != NULL;
+  }
+  /*bool operator!() const
+    {
+    return Item::Handle::operator!();
+    }*/
+  bool operator==(const This &o) const
+  {
+    return Item::Handle::get() == o.get();
+  }
+  bool operator!=(const This &o) const
+  {
+    return Item::Handle::get() != o.get();
+  }
+  //using P::operator<;
+  bool operator<(const This& o) const
+  {
+    return P::get() < o.get();
+  }
+
+  Item* pointer() {
+    return Item::Handle::get();
+  }
+  const Item* pointer() const
+  {
+    return Item::Handle::get();
+  }
+ 
+  //using P::operator>;
+};
+
+template  <class I>
+std::ostream &operator<<(std::ostream &out, Two_list_pointer_event_queue_key<I> k)
+{
+  k.write(out);
+  return out;
+}
+
+
+
+
+// The interface for an item stored in the ::Pointer_event_queue
+template <class Priority>
+class Two_list_event_queue_item:
+  public CGAL::In_place_list_base<Two_list_event_queue_item<Priority> >,
+  public Ref_counted<Two_list_event_queue_item<Priority> >
+{
+
+  typedef Two_list_event_queue_item<Priority> This;
+
+  Two_list_event_queue_item(const Two_list_event_queue_item &) {}
+  void operator=(const Two_list_event_queue_item &) {}
+public:
+  typedef Two_list_pointer_event_queue_key<This> Key;
+  Two_list_event_queue_item() { /*++two_list_remaining;*/}
+  Two_list_event_queue_item(const Priority &t): time_(t){/*++two_list_remaining;*/}
+  virtual ~Two_list_event_queue_item(){/*--two_list_remaining;*/
+  }
+
+  enum List {FRONT, BACK, INF};
+
+  const Priority& time() const {return time_;};
+
+  List in_list() const
+  {
+    return front_list_;
+  }
+  void set_in_list(List lt) {
+    front_list_=lt;
+  }
+
+  
+
+  bool operator<(const This &o) const {
+    CGAL::Comparison_result c= CGAL::compare(time(), o.time());
+    if (c != CGAL::EQUAL) return c== CGAL::SMALLER;
+    else {
+      if (kds() < o.kds()) return true;
+      else if (kds() > o.kds()) return false;
+      else {
+	CGAL::Comparison_result c= compare_concurrent(Key((This*) this),Key((This*) &o));
+	return c==CGAL::SMALLER;
+      }
+    }
+  }
+
+  virtual std::ostream& write(std::ostream &out) const{
+    out << "Dummy event." << std::endl;
+    return out;
+  }
+  virtual void process() {
+    CGAL_error();
+    CGAL_ERROR("Writing dummy queue element.");
+  }
+  virtual CGAL::Comparison_result compare_concurrent(Key , Key ) const {
+    CGAL_error();
+    return CGAL::EQUAL;
+  };
+  virtual bool merge_concurrent(Key , Key ) {
+    CGAL_error();
+    return false;
+  }
+  virtual void *kds() const{return NULL;}
+  virtual void audit(Key) const{};
+private:
+  Priority time_;
+  List front_list_;
+};
+
+template <class Priority>
+inline std::ostream& operator<<(std::ostream &out, const Two_list_event_queue_item<Priority> &i)
+{
+  i.write(out);
+  return out;
+}
+
+
+// The how a dummy item is stored in the ::Two_list_event_queue
+/*
+  One dummy item is used to represent events which will never happen.
+*/
+/*template <class Priority>
+class Two_list_event_queue_dummy_item: public Two_list_event_queue_item<Priority>
+{
+  typedef Two_list_event_queue_item<Priority> P;
+public:
+  Two_list_event_queue_dummy_item(){}
+  Two_list_event_queue_dummy_item(const Two_list_event_queue_dummy_item &):
+    Two_list_event_queue_item<Priority>(){}
+  virtual void process() {
+    std::cerr << "Trying to process a NULL event.\n";
+    CGAL_error();
+  }
+  virtual CGAL::Comparison_result compare_concurrent(typename P::Key , typename P::Key ) const{return CGAL::EQUAL;}
+  virtual bool merge_concurrent(typename P::Key, typename P::Key){
+    return false;
+  }
+  virtual std::ostream& write(std::ostream &out) const
+  {
+    out << "Never";
+    return out;
+  }
+  virtual ~Two_list_event_queue_dummy_item(){}
+  };*/
+
+// The how a real item is stored in the ::Two_list_event_queue
+/*
+  This just stores an object of type Event and passes the virtual calls on to it.
+
+  The object is reference counted so you don't have to worry about the
+  queue deleting it or not.
+*/
+template <class Priority, class Event>
+class Two_list_event_queue_item_rep: public internal::Two_list_event_queue_item<Priority>
+{
+  typedef  Two_list_event_queue_item<Priority> P;
+public:
+  Two_list_event_queue_item_rep(): internal::Two_list_event_queue_item<Priority>(){}
+  Two_list_event_queue_item_rep(const Priority &t, const Event &e): 
+    Two_list_event_queue_item<Priority>(t),
+    event_(e){}
+
+  virtual std::ostream& write(std::ostream &out) const
+  {
+    event_.write(out);
+    out << " at " << P::time();
+    return out;
+  }
+  virtual void process() {
+    event_.process();
+  }
+  virtual void audit(typename P::Key k) const {
+    event_.audit(k);
+  }
+  virtual CGAL::Comparison_result compare_concurrent(typename P::Key a, typename P::Key b) const{
+    return event_.compare_concurrent(a,b);
+  }
+  virtual bool merge_concurrent(typename P::Key a, typename P::Key b){
+    return event_.merge_concurrent(a,b);;
+  }
+  virtual void *kds() const{return event_.kds();}
+
+  // Access the actual event
+  const Event &event() const
+  {
+    return event_;
+  }
+
+ // Access the actual event
+  Event &event()
+  {
+    return event_;
+  }
+  
+  virtual ~Two_list_event_queue_item_rep(){}
+
+protected:
+  Event event_;
+};
+
+
+/* This is needed since the list cannot allocate an element of the abstract base class. I could just make it non-abstract. Why not?*/
+/*template <class T>
+struct Two_list_event_queue_item_allocator
+{
+  typedef Two_list_event_queue_dummy_item<T> dummy_value_type;
+
+  typedef Two_list_event_queue_item<T>* pointer;
+  typedef std::size_t size_type;
+  typedef std::ptrdiff_t difference_type;
+  typedef const pointer const_pointer;
+  typedef Two_list_event_queue_item<T>& reference;
+  typedef const Two_list_event_queue_item<T>& const_reference;
+  typedef dummy_value_type value_type;
+
+  Two_list_event_queue_item_allocator(){}
+  pointer allocate(size_t sz, void* =0) const
+  {
+    return static_cast<pointer>(::operator new(sz*sizeof(dummy_value_type)));
+  }
+  void deallocate(pointer p, size_type ) {
+    ::operator delete(static_cast<void*>(p));
+  }
+  size_type max_size() const throw() {
+    return (std::numeric_limits<size_type>::max)()/sizeof(dummy_value_type);
+  }
+  template <class TT>
+  void construct(pointer p, const TT &) {
+    new(static_cast<void*>(p)) dummy_value_type();
+  }
+  void destroy(pointer p) {
+    p->~Two_list_event_queue_item<T>();
+  }
+  };*/
+
+} } } //namespace CGAL::Kinetic::internal
+
+namespace CGAL { namespace Kinetic {
+
+
+
+
+//! The priority queue for holding many different types of events.
+/*!  This queue allows the priorities to be updated and for elements
+  to be removed. The events are stored behind an interface and
+  accessed through virtual functions allowing many different types of
+  events to be stored in the queue at once, as long as they all share
+  the same Priority.
+
+  Currently the items in the queue are refence counted. This imposes
+  some overhead, but makes accessing them much simpler since you don't
+  have to worry about them being processed (and deleted or not). I am
+  not sure which is better.
+*/
+template <class FK, bool INF=false, unsigned int TARGET=8>
+class Two_list_pointer_event_queue
+{
+  typedef typename FK::Root PriorityT;
+  typedef typename FK::FT NT;
+  typedef Two_list_pointer_event_queue<FK, INF, TARGET> This;
+  typedef typename internal::Two_list_event_queue_item<PriorityT> Item;
+
+  typedef typename CGAL::In_place_list<Item, false/*,
+						    internal::Two_list_event_queue_item_allocator<PriorityT>*/ > Queue;
+  typedef typename Queue::iterator Iterator;
+
+
+
+
+public:
+  typedef PriorityT Priority;
+
+  typedef internal::Two_list_pointer_event_queue_key<Item> Key;
+
+
+
+
+  //! Construct it with a suggested size of sz.
+  Two_list_pointer_event_queue(Priority start_time,
+			       Priority end_time, 
+			       FK, int =0):
+    null_event_(new internal::Two_list_event_queue_item<Priority>()){
+    CGAL_precondition(!INF);
+    initialize(start_time, end_time);
+  }
+
+ //! Construct it with a suggested size of sz.
+  Two_list_pointer_event_queue(Priority start_time,
+			       FK, int =0): 
+    null_event_(new internal::Two_list_event_queue_item<Priority>()){
+    CGAL_precondition(INF);
+    initialize(start_time);
+  }
+
+  ~Two_list_pointer_event_queue() {
+    // release pointers
+    std::vector<Key> all;
+    all.reserve(front_.size()+back_.size());
+    for (typename Queue::iterator it = front_.begin(); 
+	 it != front_.end(); ++it) {
+      all.push_back(Key(&*it));
+    }
+    for (typename Queue::iterator it = back_.begin(); 
+	 it != back_.end(); ++it) {
+      all.push_back(Key(&*it));
+    }
+    front_.clear();
+    back_.clear();
+    for (unsigned int i=0; i< all.size(); ++i) {
+      unmake_event(all[i].get());
+    }
+  }
+
+  
+  /*template <class E>
+  Key insert_at_end(const E & e) {
+
+  }*/
+  
+
+  bool is_after_end(const Priority &t) const {
+    if (INF) return false; 
+    else return  CGAL::compare(t,end_priority()) == CGAL::LARGER;
+  }
+
+  //! insert value_type into the queue and return a reference to it
+  /*!
+    The reference can be used to update or erase it.
+  */
+  template <class E>
+  Key insert(const Priority &t, const E & e) {
+    CGAL_expensive_precondition(audit());
+ 
+
+    Item *ni = make_event(t, e);
+
+    //CGAL_exactness_assertion(t >= lbs_);
+    //lb_=(std::min)(t, lb_);
+    if ( is_after_end(ni->time())){
+      return end_key();
+    } 
+
+
+    if (leq_ub(ni->time())) {
+      ni->set_in_list(Item::FRONT);
+      typename Queue::iterator iit=std::upper_bound(front_.begin(), front_.end(), *ni);
+   
+      front_.insert(iit, *ni);
+      CGAL_expensive_assertion(audit());
+      if (front_.size() > 2*max_front_size()) {
+	shrink_front();
+      }
+      //++queue_front_insertions__;
+    }  else if (front_.empty()) {
+      CGAL_assertion(back_.empty());
+      CGAL_assertion(INF || CGAL::compare(t, end_priority()) != CGAL::LARGER);
+      //CGAL_assertion(INF || CGAL::compare(end_priority(), std::numeric_limits<Priority>::infinity()) == CGAL::SMALLER);
+      if (true){
+	//++queue_front_insertions__;
+	front_.push_back(*ni);
+	ub_= CGAL::to_interval(t).second;
+	ni->set_in_list(Item::FRONT);
+      } 
+    } else {
+      ni->set_in_list(Item::BACK);
+      back_.push_back(*ni);
+    }
+    CGAL_expensive_postcondition(audit());
+    CGAL_expensive_postcondition(contains(Key(ni)));
+    //std::cout << "Made event " << ni << std::endl;
+    return Key(ni);
+  }
+
+
+  //! remove the event referenced by item from the queue
+  /*!
+    \todo Add check that item is actually in the list
+  */
+  void erase(const Key &item) {
+    //std::cout << "Erase event " << item.pointer() << std::endl;
+    if (item== end_key()) return;
+#ifndef NDEBUG
+    if (!contains(item)) {
+      std::cerr << "Erasing event not in queue ";
+      item->write(std::cerr);
+      std::cerr << std::endl;
+    }
+#endif
+    CGAL_expensive_precondition(contains(item));
+    CGAL_expensive_precondition(audit());
+    Item *i=item.get();
+    if (item->in_list() == Item::FRONT) {
+      front_.erase(i);
+      if (front_.empty() && !back_.empty()) grow_front();
+    }
+    else if (item->in_list() == Item::BACK) {
+      back_.erase(i);
+    }
+    if (item->in_list() == Item::FRONT || item->in_list() == Item::BACK) {
+      unmake_event(i);
+    }
+
+    CGAL_expensive_postcondition(audit());
+  }
+
+  template <class E>
+  const E& get(const Key &item) const
+  {
+    return reinterpret_cast<internal::Two_list_event_queue_item_rep<Priority, E>*>( item.get())->event();
+  }
+
+  template <class E>
+  E& get(const Key &item)  {
+    return reinterpret_cast<internal::Two_list_event_queue_item_rep<Priority, E>*>( item.get())->event();
+  }
+
+  //! Replace the event referenced by item with a new event referenced by ne
+  /*!  They must have exactly the same times associated with
+    them. This is checked when expensive checks are turned on.
+  */
+  template <class NE>
+  Key set(const Key &item, const NE &ne) {
+    CGAL_expensive_precondition(contains(item));
+    CGAL_precondition(item != end_key());
+    Item *oi= item.get();
+    typename Item::List front= item->in_list();
+    Item *ni= make_event(item->time(), ne);
+    ni->set_in_list(front);
+    if (front != Item::INF) {
+      if (front== Item::FRONT) {
+	front_.insert(oi, *ni);
+	front_.erase(oi);
+      }
+      else {
+	back_.insert(oi, *ni);
+	back_.erase(oi);
+      }
+      unmake_event(oi);
+      return Key(ni);
+    }
+    else {
+#ifndef NDEBUG
+      bool found=false;
+      for (unsigned int i=0; i< inf_.size(); ++i) {
+	if (inf_[i].get() == oi) {
+	  inf_[i]=ni;
+	  found=true;
+	  break;
+	}
+      }
+      CGAL_postcondition(found);
+      CGAL_USE(found);
+#endif
+      unmake_event(oi);
+      return Key(ni);
+    }
+    // unreachable
+
+  }
+
+  //! Get the time of the next event to be processed.
+  /*!  It is OK to call this if the queue is empty. In that case it
+    will just return infinity.
+  */
+  const Priority& front_priority() const
+  {
+    CGAL_precondition(!front_.empty());
+    return front_.front().time();
+  }
+
+
+  Key front() const
+  {
+    CGAL_precondition(!front_.empty());
+    return Key(const_cast<Item*>(&front_.front()));
+  }
+
+  //! Access the time of a particular event
+  const Priority& priority(const Key &item) const
+  {
+    return item->time();
+  }
+
+  //! empty
+  bool empty() const
+  {
+    CGAL_precondition(!front_.empty() || back_.empty());
+    return front_.empty() 
+      || CGAL::compare(front_.front().time(), end_priority()) == CGAL::LARGER;
+  }
+
+  //! Remove the next event from the queue and process it.
+  /*!
+    Processing means that the process() method of the event object is called.
+  */
+  void process_front() {
+    CGAL_precondition(!empty());
+    CGAL_expensive_precondition(audit());
+    if (!front_.empty()) {
+      Item *i= &front_.front();
+      CGAL_LOG(Log::SOME, "Processing event " << *i << std::endl);
+      front_.pop_front();
+      CGAL_expensive_postcondition(audit());
+      if (front_.empty() && !back_.empty()) grow_front();
+      i->process();
+
+      /*if (!front_.empty() && i->time() == front_.front().time()) {
+	CGAL_LOG(Log::SOME, "Degeneracy at time "
+	<< i->time() << " the events are: "
+	<< *i << " and " << front_.front() << std::endl);
+	}*/
+
+      unmake_event(i);
+    }
+    else {
+      CGAL_assertion(back_.empty());
+    }
+  }
+
+  //! debugging
+  bool print() const
+  {
+    write(std::cout);
+    return true;
+  }
+
+  void write(const Queue &q, std::ostream& out) const {
+    for (typename Queue::const_iterator it = q.begin(); it != q.end(); ++it) {
+      out << "(" << &*it << ": " << *it << ")";
+      out << std::endl;
+    }
+  }
+
+  bool write(std::ostream &out) const
+  {
+    write(front_, std::cout);
+    out << "--" << ub_ << "--" << std::endl;
+    write(back_, std::cout);
+    out << std::endl;
+    return true;
+  }
+
+  Key end_key() const
+  {
+    return null_event_;
+  }
+
+  
+
+  const Priority& end_priority() const
+  {
+    return end_time_;
+  }
+
+
+  void set_interval(const Priority &start_time, const Priority &end_time) {
+    CGAL_precondition(!INF);
+    initialize(start_time, end_time);
+  }
+  
+  void audit_events() const {
+    for (typename Queue::const_iterator it= front_.begin(); it != front_.end(); ++it) {
+      it->audit(Key(const_cast<Item*>(&*it)));
+    }
+    for (typename Queue::const_iterator it= back_.begin(); it != back_.end(); ++it) {
+      it->audit(Key(const_cast<Item*>(&*it)));
+    }
+  }
+
+  void audit_event(Key k) const {
+    k->audit(k);
+  }
+
+  void clear() {
+    front_.clear();
+    back_.clear();
+    //all_in_front_=false;
+  }
+
+protected:
+  void initialize(const Priority &start_time, const Priority &end_time) {
+    ub_=CGAL::to_interval(start_time).second;
+    // should be nextafter
+    step_=1;
+    //all_in_front_= false;
+    end_time_=end_time;
+  }
+
+ void initialize(const Priority &start_time) {
+   CGAL_precondition(INF);
+   ub_=CGAL::to_interval(start_time).second;
+    // should be nextafter
+   step_=1;
+    //all_in_front_= false;
+  }
+  bool leq_ub(const Priority &t) const {
+    //if (all_in_front_) return true;
+    //else 
+    // pretty much anything fast will have a fast to_interval, so use it
+    std::pair<double,double> iv= CGAL::to_interval(t);
+    if (iv.first > ub_) {
+      return false;
+    } else if (iv.second <= ub_) {
+      return true;
+    } else {
+      return CGAL::compare(t, Priority(ub_)) != CGAL::LARGER;
+    }
+  }
+
+ 
+  template <class E>
+  Item *make_event(const Priority &t, E &e) {
+    typedef typename boost::remove_const<E>::type NCE;
+    Item *ni
+      = new internal::Two_list_event_queue_item_rep<Priority, NCE>(t, e);
+    intrusive_ptr_add_ref(ni);
+    return ni;
+  }
+
+  void unmake_event(Item *i) {
+    intrusive_ptr_release(i);
+  }
+
+  bool audit() {
+    for (typename Queue::const_iterator it = front_.begin(); it != front_.end(); ++it) {
+      Priority t= it->time();
+      CGAL_assertion(leq_ub(t));
+      CGAL_assertion(it->in_list()== Item::FRONT);
+      //CGAL_exactness_assertion(t >= lb_);
+    }
+    for (typename Queue::const_iterator it = back_.begin(); it != back_.end(); ++it) {
+      Priority t= it->time();
+      CGAL_assertion(!leq_ub(t));
+      CGAL_assertion(it->in_list()== Item::BACK);
+    }
+#ifndef NDEBUG
+    for (unsigned int i=0; i< inf_.size(); ++i) {
+      Priority t= inf_[i]->time();
+      CGAL_assertion(INF || CGAL::compare(t, end_priority())== CGAL::LARGER);
+      CGAL_assertion(inf_[i]->in_list() == Item::INF);
+    }
+#endif
+    {
+      typename Queue::const_iterator it = front_.begin();
+      ++it;
+      for (; it != front_.end(); ++it) {
+	Priority tc= it->time();
+	Priority tp= boost::prior(it)->time();
+#ifndef NDEBUG
+	if (CGAL::compare(tc, tp) == CGAL::SMALLER) {
+	  std::cout << "ERROR: Out of order " << tc << std::endl << tp << std::endl << std::endl;
+	  ++internal::get_static_audit_failures();
+	}
+#endif
+	//CGAL_assertion(tc >= tp);
+      }
+    }
+    return true;
+  }
+public:
+  bool contains(const Key k) const
+  {
+    //if (k.pointer()->time() == std::numeric_limits<Priority>::infinity()) return true;
+    for (typename Queue::const_iterator it = front_.begin(); it != front_.end(); ++it) {
+      if (&*it == k.pointer()) return true;
+    }
+    for (typename Queue::const_iterator it = back_.begin(); it != back_.end(); ++it) {
+      if (&*it == k.pointer()) return true;
+    }
+#ifndef NDEBUG
+    for (unsigned int i=0; i< inf_.size(); ++i) {
+      const Key j=inf_[i];
+      const Key ki= k;
+      if (j==ki) return true;
+    }
+#else
+    if (k.pointer()->in_list() == Item::INF) return true;
+#endif
+    return false;
+  }
+protected:
+  unsigned int select(Queue &source, Queue &target/*, bool binf*/) {
+    CGAL_assertion_code(unsigned int sz= source.size() + target.size();)
+    int count=0;
+    Iterator it= source.begin();
+    while (it != source.end()) {
+      // CGAL_assertion(it->time() >= a);
+    
+      if (leq_ub(it->time())) {
+	Item *i= &*it;
+	Iterator t= boost::next(it);
+	source.erase(it);
+	it=t;
+	target.push_back(*i);
+	++count;
+      }
+      else {
+	++it;
+      }
+    }
+    CGAL_assertion(sz==source.size() + target.size());
+    return count;
+  }
+
+  /*NT step() const{
+    return (std::max)(ub_-lb_, NT(1));
+    }*/
+
+  NT av(NT a, NT b) const
+  {
+    return .5*(a+b);
+  }
+
+  template <class It>
+  void set_front(It b, It e, typename Item::List val) {
+    for (; b!= e; ++b) {
+      b->set_in_list(val);
+    }
+  }
+  template <class C, class It>
+  void make_inf(C &c, It b, It e) {
+    for (It cit = b; cit != e; ++cit) {
+      CGAL_assertion(INF || CGAL::compare(cit->time(), end_priority()) == CGAL::LARGER);
+      //std::cout << "Dropping inf event " << &*cit << std::endl;
+#ifndef NDEBUG
+      inf_.push_back(&*cit);
+#endif
+      cit->set_in_list(Item::INF);
+      It p= boost::prior(cit);
+      c.erase(cit);
+      unmake_event(&*cit);
+      cit=p;
+    }
+    //c.erase(b, e);
+  }
+
+  void grow_front(Queue &cand, int recursive_count=0) {
+    const bool dprint=false;
+    CGAL_assertion(front_.empty());
+    CGAL_assertion(!cand.empty());
+    //CGAL_assertion(!all_in_front_);
+    CGAL_assertion(step_ != 0);
+    if (dprint) std::cout << "Growing front from " << ub_ << " with step " 
+			  << step_ << "(" << recursive_count << ") ";
+
+    //CGAL_assertion(ub_<end_split());
+    if (cand.size() + front_.size() < max_front_size()) {
+      if (dprint) std::cout << "Setting ub to end of " << end_time_ << std::endl;
+      front_.splice(front_.end(), cand);
+      return;
+    }
+
+    //CGAL_assertion(!too_big(ub_));
+
+    /*if ( CGAL::compare(end_priority(), Priority(ub_)) == CGAL::SMALLER) {
+      all_in_front_=true;
+      //ub_=end_split();
+      }*/
+
+    CGAL_assertion_code(unsigned int num=)
+      select(cand, front_/*, all_in_front_*/);
+    CGAL_assertion(front_.size() >= num);
+    /*if (all_in_front_) {
+      make_inf(cand, cand.begin(), cand.end());
+      } else*/
+    if (front_.empty()) {
+      if (recursive_count > 10) {
+	// do something
+	std::cerr << "Too many recursions " << std::endl;
+	//all_in_front_=true;
+	ub_=CGAL::to_interval(end_time_).second; //CGAL::to_interval(end_time_).second*2;// std::numeric_limits<double>::infinity();
+	/*unsigned int num=*/ select(cand, front_/*, all_in_front_*/);
+	select(back_, front_);
+	make_inf(cand, cand.begin(), cand.end());
+	make_inf(back_, back_.begin(), back_.end());
+	//grow_front(cand, recursive_count+1);
+      } else {
+	if (dprint) {
+	  std::cout << "undershot." << std::endl;
+	  write(front_, std::cout);
+	  std::cout << "-- " << ub_ << "--\n";
+	  write(cand, std::cout);
+	  std::cout << "--\n";
+	  write(back_, std::cout);
+	}
+	ub_+= step_;
+       	step_*=2.0;
+	CGAL_assertion(step_!=0);
+	cand.splice(cand.end(), back_);
+	grow_front(cand, recursive_count+1);
+      }
+    } else {
+      //      unsigned int ncand= cand.size();
+      back_.splice(back_.begin(), cand);
+      if (front_.size() >  max_front_size()) {
+	if (recursive_count > 10) {
+	  //std::cerr << "Gave up on isolating front. Let with size " << front_.size() << " ub=" << ub_ << "step=" << step_ <<  "\n";
+	  return;
+	} else {
+	  // keep the bit length shortish
+	  double frac= .75+.25*max_front_size()/static_cast<double>(front_.size()+1);
+	  double ostep= step_;
+	  CGAL_assertion(frac < 1.1);
+	  CGAL_assertion(frac >= 0.0);
+	  //double rfrac= std::ceil(frac*256.0)/256.0;
+	  step_*=frac;
+	  //else nstep = step_*.6;
+	  //CGAL_assertion(nstep >0);
+	  cand.swap(front_);
+	  //ub_=lb_;
+	  if (step_ == 0) {
+	    CGAL_ERROR( "underflow in queue ");
+	    CGAL_ERROR_WRITE(write(LOG_STREAM));
+	    CGAL_assertion(cand.empty());
+	    step_=.0000001;
+	    return;
+	  } else {
+	    //CGAL_assertion(!all_in_front_);
+	    
+	    if (dprint) {
+	      std::cout << "...overshot" << std::endl;
+	      write(front_, std::cout);
+	      std::cout << "-- " << ub_ << "(" <<step_ << ")" << "--\n";
+	      write(cand, std::cout);
+	      std::cout << "--\n";
+	      write(back_, std::cout);
+	    }
+	    ub_=ub_-ostep+step_;  
+	    grow_front(cand, recursive_count+1);
+	  }
+	}
+      }
+      else {
+	if (dprint) std::cout << std::endl;
+      }
+    }
+    CGAL_postcondition(cand.empty());
+  }
+
+  void grow_front() {
+    //++growth__;
+    //std::cout << "Growing front from " << ub_ << std::endl;
+    //CGAL_assertion(is_valid());
+    CGAL_precondition(!back_.empty());
+    CGAL_precondition(front_.empty());
+    CGAL_assertion_code(unsigned int sz= front_.size()+back_.size()+ inf_.size());
+    Queue cand;
+    cand.splice(cand.begin(), back_);
+    ub_ += step_;
+    grow_front(cand);
+    set_front(front_.begin(), front_.end(), Item::FRONT);
+    front_.sort();
+    ub_= CGAL::to_interval(front_.back().time()).second;
+    // hmmmm, now I should make a second pass to merge. Ick.
+
+    CGAL_assertion(sz==front_.size()+back_.size() + inf_.size());
+    CGAL_assertion(audit());
+    //std::cout << "to " << ub_ << std::endl;
+  }
+
+  void shrink_front() {
+    //++shrink__;
+    //std::cout << "Shrinking front from " << ub_ << std::endl;
+    typename Queue::iterator it=front_.begin();
+    unsigned int mf= max_front_size();
+    for (unsigned int i=0; i < mf; ++i) {
+      ++it;
+    }
+
+    // use tii_ so that it does not subdivide
+
+    double split =  CGAL::to_interval(it->time()).second;
+    if (!INF && (CGAL::compare(end_priority(), it->time())==CGAL::SMALLER
+		 || CGAL::compare(end_priority(), Priority(split))==CGAL::SMALLER)) {
+      std::cout << "Past end in Queue " << end_priority() << ", "
+		<< it->time() << ", " << Priority(split) << std::endl;
+      //all_in_front_=true;
+      ub_= CGAL::to_interval(end_time_).second;
+      set_front(back_.begin(), back_.end(), Item::FRONT);
+      front_.splice(front_.end(), back_);
+
+      while (it != front_.end()) {
+	if (CGAL::compare(it->time(), end_priority())==CGAL::LARGER) break;
+      }
+      set_front(it, front_.end(), Item::INF);
+      std::vector<Item*> temp;
+      for (typename Queue::iterator c= it; c != front_.end(); ++c) {
+	temp.push_back(&*c);
+#ifndef NDEBUG
+	inf_.push_back(&*c);
+#endif
+	//std::cout << "Dropping inf event " << &*c << std::endl;
+      }
+      front_.erase(it, front_.end());
+
+   
+    
+      for (unsigned int i=0; i< temp.size(); ++i) {
+	unmake_event(temp[i]);
+      }
+    } else {
+      while (CGAL::compare(it->time(), Priority(split)) != CGAL::LARGER
+	     && it != front_.end()) ++it;
+      
+      if (it != front_.end()) {
+	
+	set_front(it, front_.end(), Item::BACK);
+	back_.splice(back_.begin(), front_, it, front_.end());
+	double oub=ub_;
+	//all_in_front_=false;
+	ub_ = split;
+	//CGAL_assertion(!too_big(ub_));
+	//CGAL_assertion(ub_ <= end_split());
+	step_= std::abs(ub_-oub);
+	if (step_<=0) {
+	  /*if (dprint) std::cout << "fixing step since " << oub 
+	    << " equals new bound" << std::endl;*/
+	  CGAL_ERROR("Roundoff error in split " << split << " " << ub_ << " "
+			     <<  oub);
+	  step_=.00001;
+	}
+	//CGAL_assertion(!all_in_front_);
+	/*CGAL_postcondition_code(if (step_<0) std::cerr << step_ << std::endl;);
+	CGAL_postcondition_code(if (step_<0) std::cerr << ub_ << std::endl;);
+	CGAL_postcondition_code(if (step_<0) std::cerr << oub << std::endl;);
+	CGAL_postcondition_code(if (step_<0) std::cerr << front_.back().time() << std::endl;);
+	CGAL_postcondition_code(if (step_==0) for (typename Queue::const_iterator it=front_.begin(); it != front_.end(); ++it) std::cout << *it << std::endl);
+	CGAL_postcondition(step_>=0);*/
+      }
+    }
+  }
+
+  /*NT end_split() const
+    {
+    return end_split_;
+    }*/
+
+  /*const Priority& end_time() const
+    {
+    return end_time_;
+    }*/
+
+  unsigned int max_front_size() const
+  {
+    return TARGET;
+    //return (std::max)(4U, static_cast<unsigned int>(std::sqrt(static_cast<double>(front_.size()+back_.size()))));
+  }
+
+  //typename FK::To_isolating_interval tii_;
+  Queue front_, back_;
+#ifndef NDEBUG
+  std::vector<Key> inf_;
+#endif
+  double ub_;
+  double step_;
+  //bool all_in_front_;
+  Priority end_time_;
+  Key null_event_;
+  //NT end_split_;
+};
+
+template <class D, unsigned int T, bool INF>
+std::ostream &operator<<(std::ostream &out, const Two_list_pointer_event_queue<D, INF, T> &q)
+{
+  q.write(out);
+  return out;
+}
+
+
+} } //namespace CGAL::Kinetic
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Instantaneous_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Instantaneous_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Instantaneous_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Instantaneous_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_kinetic_kernel_base.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_kinetic_kernel_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_kinetic_kernel_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_kinetic_kernel_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_lifted_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_lifted_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_lifted_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_lifted_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_orthosphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_orthosphere_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_orthosphere_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_orthosphere_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_1.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_weighted_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_weighted_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_weighted_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Cartesian_moving_weighted_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Center.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Center.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Center.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Center.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Certificate.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Certificate.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Certificate.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Certificate.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifted_lifting.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifted_lifting.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifted_lifting.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifted_lifting.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifting.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifting.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifting.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Delaunay_lifting.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Reverse_time.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Reverse_time.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/Reverse_time.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/Reverse_time.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_2.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Kernel/cartesian_predicates_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/To_static.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/To_static.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/To_static.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/To_static.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Triangulation_helper_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Triangulation_helper_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/Triangulation_helper_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/Triangulation_helper_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/config.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/config.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/config.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters.h
new file mode 100644
index 0000000..a537d12
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters.h
@@ -0,0 +1,79 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_DEBUG_COUNTERS_H_
+#define CGAL_DEBUG_COUNTERS_H_
+
+#include <CGAL/Kinetic/basic.h>
+
+namespace CGAL { namespace Kinetic {
+namespace internal {
+  
+#ifdef CGAL_HEADER_ONLY
+  
+  inline unsigned int& get_static_function_degeneracies()
+  { 
+    static unsigned int function_degeneracies__ = 0;
+    return function_degeneracies__; 
+  }
+  inline unsigned int& get_static_zero_certificates()
+  {
+    static unsigned int zero_certificates__ = 0;
+    return zero_certificates__; 
+  }
+  inline unsigned int& get_static_io_errors()
+  {
+    static unsigned int io_errors__ = 0;
+    return io_errors__;
+  }
+  inline unsigned int& get_static_audit_failures()
+  {
+    static unsigned int audit_failures__ = 0;
+    return audit_failures__;
+  }
+
+#else // CGAL_HEADER_ONLY
+  
+  CGAL_EXPORT extern unsigned int function_degeneracies__;
+  CGAL_EXPORT extern unsigned int zero_certificates__;
+  CGAL_EXPORT extern unsigned int io_errors__;
+  CGAL_EXPORT extern unsigned int audit_failures__;
+
+  inline unsigned int& get_static_function_degeneracies()
+  { return function_degeneracies__; }
+  inline unsigned int& get_static_zero_certificates()
+  { return zero_certificates__; }
+  inline unsigned int& get_static_io_errors()
+  { return io_errors__; }
+  inline unsigned int& get_static_audit_failures()
+  { return audit_failures__; }
+
+#endif // CGAL_HEADER_ONLY
+
+
+  CGAL_EXPORT void write_debug_counters(std::ostream &out);
+}
+} } //namespace CGAL::Kinetic
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Kinetic/internal/debug_counters_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_DEBUG_COUNTERS_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters_impl.h
new file mode 100644
index 0000000..d815a15
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/debug_counters_impl.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(disable:4251)
+#endif
+#include <iostream>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+namespace CGAL { namespace Kinetic { namespace internal {
+
+  CGAL_INLINE_FUNCTION
+  void write_debug_counters(std::ostream &out) {
+    out << "Degeneracies " << get_static_function_degeneracies() << std::endl;
+    out << "Zero functions " << get_static_zero_certificates() << std::endl;
+    if (get_static_io_errors() != 0) out << "I/O errors " << get_static_io_errors() << std::endl;
+    if (get_static_audit_failures() != 0) out << "Audit failures " << get_static_audit_failures() << std::endl;
+  }
+
+} } } //namespace CGAL::Kinetic::internal
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/infinity_or_max.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/infinity_or_max.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/infinity_or_max.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/infinity_or_max.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/tds_2_helpers.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/tds_2_helpers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/tds_2_helpers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/tds_2_helpers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/triangulation_helpers_3.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/triangulation_helpers_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/internal/triangulation_helpers_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/internal/triangulation_helpers_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Kinetic/listeners.h b/3rdparty/CGAL-4.8/include/CGAL/Kinetic/listeners.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Kinetic/listeners.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Kinetic/listeners.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/LEDA_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/LEDA_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/LEDA_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/LEDA_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/LEDA_basic.h b/3rdparty/CGAL-4.8/include/CGAL/LEDA_basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/LEDA_basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/LEDA_basic.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/LSCM_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/LSCM_parameterizer_3.h
new file mode 100644
index 0000000..93fb242
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/LSCM_parameterizer_3.h
@@ -0,0 +1,680 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_LSCM_PARAMETERIZER_3_H
+#define CGAL_LSCM_PARAMETERIZER_3_H
+
+#include <CGAL/circulator.h>
+#include <CGAL/Timer.h>
+#include <CGAL/OpenNL/linear_solver.h>
+
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_solver_traits.h>
+#endif
+
+#include <CGAL/Parameterizer_traits_3.h>
+#include <CGAL/Two_vertices_parameterizer_3.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+#include <CGAL/Parameterization_mesh_feature_extractor.h>
+#include <iostream>
+
+/// \file LSCM_parameterizer_3.h
+
+namespace CGAL {
+
+
+// ------------------------------------------------------------------------------------
+// Declaration
+// ------------------------------------------------------------------------------------
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class `LSCM_parameterizer_3` implements the
+/// *Least Squares Conformal Maps (LSCM)* parameterization  \cgalCite{cgal:lprm-lscm-02}.
+///
+/// This is a conformal parameterization, i.e. it attempts to preserve angles.
+///
+/// This is a free border parameterization. No need to map the border of the surface
+/// onto a convex polygon (only two pinned vertices are needed to ensure a
+/// unique solution), but one-to-one mapping is *not* guaranteed.
+///
+/// Note that his parametrization method has no template parameter for changing the sparse solver.
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+///
+/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+
+template
+<
+    class ParameterizationMesh_3,     ///< 3D surface mesh.
+    class BorderParameterizer_3
+  = Two_vertices_parameterizer_3<ParameterizationMesh_3>,
+                                      ///< Strategy to parameterize the surface border.
+                                      ///< The minimum is to parameterize two vertices.
+    class SparseLinearAlgebraTraits_d
+#if defined(CGAL_EIGEN3_ENABLED) || defined(DOXYGEN_RUNNING)
+  = Eigen_solver_traits<Eigen::SimplicialLDLT<Eigen_sparse_symmetric_matrix<double>::EigenType> >
+#else
+  = OpenNL::SymmetricLinearSolverTraits<typename ParameterizationMesh_3::NT>
+#endif
+                                      ///< Traits class to solve a sparse linear system.
+                                      ///< We may use a symmetric definite positive solver because LSCM
+                                      ///< solves the system in the least squares sense.
+>
+class LSCM_parameterizer_3
+    : public Parameterizer_traits_3<ParameterizationMesh_3>
+{
+// Private types
+private:
+    // Superclass
+    typedef Parameterizer_traits_3<ParameterizationMesh_3>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    /// @endcond
+
+    /// Export BorderParameterizer_3 template parameter.
+    typedef BorderParameterizer_3           Border_param;
+  
+// Private types
+private:  
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+    typedef typename OpenNL::LinearSolver<Sparse_LA>
+                                            LeastSquaresSolver ;
+
+// Public operations
+public:
+    /// Constructor
+    LSCM_parameterizer_3(Border_param border_param = Border_param(),
+                            ///< Object that maps the surface's border to 2D space
+                       Sparse_LA sparse_la = Sparse_LA())
+                            ///< Traits object to access a sparse linear system
+        : m_borderParameterizer(border_param), m_linearAlgebra(sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+    /// Compute a one-to-one mapping from a triangular 3D surface mesh
+    /// to a piece of the 2D space.
+    /// The mapping is linear by pieces (linear in each triangle).
+    /// The result is the (u,v) pair image of each vertex of the 3D surface.
+    ///
+    /// \pre `mesh` must be a surface with one connected component.
+    /// \pre `mesh` must be a triangular mesh.
+    virtual Error_code  parameterize(Adaptor& mesh);
+
+// Private operations
+private:
+    /// Check parameterize() preconditions:
+    /// - `mesh` must be a surface with one connected component.
+    /// - `mesh` must be a triangular mesh.
+    virtual Error_code  check_parameterize_preconditions(Adaptor& mesh);
+
+    /// Initialize "A*X = B" linear system after
+    /// (at least two) border vertices are parameterized.
+    ///
+    /// \pre Vertices must be indexed.
+    /// \pre X and B must be allocated and empty.
+    /// \pre At least 2 border vertices must be parameterized.
+    void initialize_system_from_mesh_border(LeastSquaresSolver& solver,
+                                            const Adaptor& mesh) ;
+
+    /// Utility for setup_triangle_relations():
+    /// Computes the coordinates of the vertices of a triangle
+    /// in a local 2D orthonormal basis of the triangle's plane.
+    void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2,  // in
+                          Point_2& z0, Point_2& z1, Point_2& z2);                   // out
+
+    /// Create two lines in the linear system per triangle (one for u, one for v).
+    ///
+    /// \pre vertices must be indexed.
+    Error_code setup_triangle_relations(LeastSquaresSolver& solver,
+                                        const Adaptor& mesh,
+                                        Facet_const_handle facet) ;
+
+    /// Copy X coordinates into the (u,v) pair of each vertex
+    void set_mesh_uv_from_system(Adaptor& mesh,
+                                 const LeastSquaresSolver& solver) ;
+
+    /// Check parameterize() postconditions:
+    /// - 3D -> 2D mapping is one-to-one.
+    virtual Error_code check_parameterize_postconditions(const Adaptor& mesh,
+                                                         const LeastSquaresSolver& solver);
+
+    /// Check if 3D -> 2D mapping is one-to-one
+    bool  is_one_to_one_mapping(const Adaptor& mesh,
+                                 const LeastSquaresSolver& solver);
+
+// Private accessors
+private:
+    /// Get the object that maps the surface's border onto a 2D space.
+    Border_param&   get_border_parameterizer()    { return m_borderParameterizer; }
+
+    /// Get the sparse linear algebra (traits object to access the linear system).
+    Sparse_LA&      get_linear_algebra_traits() { return m_linearAlgebra; }
+
+// Fields
+private:
+    /// Object that maps (at least two) border vertices onto a 2D space
+    Border_param    m_borderParameterizer;
+
+    /// Traits object to solve a sparse linear system
+    Sparse_LA       m_linearAlgebra;
+};
+
+
+// ------------------------------------------------------------------------------------
+// Implementation
+// ------------------------------------------------------------------------------------
+
+// Compute a one-to-one mapping from a triangular 3D surface mesh
+// to a piece of the 2D space.
+// The mapping is linear by pieces (linear in each triangle).
+// The result is the (u,v) pair image of each vertex of the 3D surface.
+//
+// Preconditions:
+// - `mesh` must be a surface with one connected component.
+// - `mesh` must be a triangular mesh.
+//
+// Implementation note: Outline of the algorithm:
+// 1) Find an initial solution by projecting on a plane.
+// 2) Lock two vertices of the mesh.
+// 3) Copy the initial u,v coordinates to OpenNL.
+// 3) Construct the LSCM equation with OpenNL.
+// 4) Solve the equation with OpenNL.
+// 5) Copy OpenNL solution to the u,v coordinates.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+parameterize(Adaptor& mesh)
+{
+#ifdef DEBUG_TRACE
+    // Create timer for traces
+    CGAL::Timer timer;
+    timer.start();
+#endif
+
+    // Check preconditions
+    Error_code status = check_parameterize_preconditions(mesh);
+#ifdef DEBUG_TRACE
+    std::cerr << "  parameterization preconditions: " << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // Count vertices
+    int nbVertices = mesh.count_mesh_vertices();
+
+    // Index vertices from 0 to nbVertices-1
+    mesh.index_mesh_vertices();
+
+    // Mark all vertices as *not* "parameterized"
+    Vertex_iterator vertexIt;
+    for (vertexIt = mesh.mesh_vertices_begin();
+        vertexIt != mesh.mesh_vertices_end();
+        vertexIt++)
+    {
+        mesh.set_vertex_parameterized(vertexIt, false);
+    }
+
+    // Compute (u,v) for (at least two) border vertices
+    // and mark them as "parameterized"
+    status = get_border_parameterizer().parameterize_border(mesh);
+#ifdef DEBUG_TRACE
+    std::cerr << "  border vertices parameterization: " << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // Create sparse linear system "A*X = B" of size 2*nbVertices x 2*nbVertices
+    // (in fact, we need only 2 lines per triangle x 1 column per vertex)
+    LeastSquaresSolver solver(2*nbVertices);
+    solver.set_least_squares(true) ;
+
+    // Initialize the "A*X = B" linear system after
+    // (at least two) border vertices parameterization
+    initialize_system_from_mesh_border(solver, mesh);
+
+    // Fill the matrix for the other vertices
+    solver.begin_system() ;
+    for (Facet_iterator facetIt = mesh.mesh_facets_begin();
+         facetIt != mesh.mesh_facets_end();
+         facetIt++)
+    {
+        // Create two lines in the linear system per triangle (one for u, one for v)
+        status = setup_triangle_relations(solver, mesh, facetIt);
+            if (status != Base::OK)
+            return status;
+    }
+    solver.end_system() ;
+#ifdef DEBUG_TRACE
+    std::cerr << "  matrix filling (" << 2*mesh.count_mesh_facets() << " x " << nbVertices << "): "
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+
+    // Solve the "A*X = B" linear system in the least squares sense
+    if ( ! solver.solve() )
+        status = Base::ERROR_CANNOT_SOLVE_LINEAR_SYSTEM;
+#ifdef DEBUG_TRACE
+    std::cerr << "  solving linear system: "
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+    if (status != Base::OK)
+        return status;
+
+    // Copy X coordinates into the (u,v) pair of each vertex
+    set_mesh_uv_from_system(mesh, solver);
+#ifdef DEBUG_TRACE
+    std::cerr << "  copy computed UVs to mesh :"
+              << timer.time() << " seconds." << std::endl;
+    timer.reset();
+#endif
+
+    // Check postconditions
+    status = check_parameterize_postconditions(mesh, solver);
+#ifdef DEBUG_TRACE
+    std::cerr << "  parameterization postconditions: " << timer.time() << " seconds." << std::endl;
+#endif
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+
+// Check parameterize() preconditions:
+// - `mesh` must be a surface with one connected component
+// - `mesh` must be a triangular mesh
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+check_parameterize_preconditions(Adaptor& mesh)
+{
+    Error_code status = Base::OK;	    // returned value
+
+    // Helper class to compute genus or count borders, vertices, ...
+    typedef Parameterization_mesh_feature_extractor<Adaptor>
+                                            Mesh_feature_extractor;
+    Mesh_feature_extractor feature_extractor(mesh);
+
+    // Check that mesh is not empty
+    if (mesh.mesh_vertices_begin() == mesh.mesh_vertices_end())
+        status = Base::ERROR_EMPTY_MESH;
+    if (status != Base::OK)
+        return status;
+
+    // The whole surface parameterization package is restricted to triangular meshes
+    status = mesh.is_mesh_triangular() ? Base::OK
+                                       : Base::ERROR_NON_TRIANGULAR_MESH;
+    if (status != Base::OK)
+        return status;
+
+    // The whole package is restricted to surfaces: genus = 0,
+    // one connected component and at least one border
+    int genus = feature_extractor.get_genus();
+    int nb_borders = feature_extractor.get_nb_borders();
+    int nb_components = feature_extractor.get_nb_connex_components();
+    status = (genus == 0 && nb_borders >= 1 && nb_components == 1)
+           ? Base::OK
+           : Base::ERROR_NO_TOPOLOGICAL_DISC;
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+// Initialize "A*X = B" linear system after
+// (at least two) border vertices are parameterized
+//
+// Preconditions:
+// - Vertices must be indexed
+// - X and B must be allocated and empty
+// - At least 2 border vertices must be parameterized
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+void LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+initialize_system_from_mesh_border(LeastSquaresSolver& solver,
+                                   const Adaptor& mesh)
+{
+    for (Vertex_const_iterator it = mesh.mesh_vertices_begin();
+        it != mesh.mesh_vertices_end();
+        it++)
+    {
+        // Get vertex index in sparse linear system
+        int index = mesh.get_vertex_index(it);
+
+        // Get vertex (u,v) (meaningless if vertex is not parameterized)
+        Point_2 uv = mesh.get_vertex_uv(it);
+
+        // Write (u,v) in X (meaningless if vertex is not parameterized)
+        // Note  : 2*index     --> u
+        //         2*index + 1 --> v
+        solver.variable(2*index    ).set_value(uv.x()) ;
+        solver.variable(2*index + 1).set_value(uv.y()) ;
+
+        // Copy (u,v) in B if vertex is parameterized
+        if (mesh.is_vertex_parameterized(it)) {
+            solver.variable(2*index    ).lock() ;
+            solver.variable(2*index + 1).lock() ;
+        }
+    }
+}
+
+// Utility for setup_triangle_relations():
+// Computes the coordinates of the vertices of a triangle
+// in a local 2D orthonormal basis of the triangle's plane.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+void
+LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2,   // in
+                 Point_2& z0, Point_2& z1, Point_2& z2)                     // out
+{
+    Vector_3 X = p1 - p0 ;
+    NT X_norm = std::sqrt(X*X);
+    if (X_norm != 0.0)
+        X = X / X_norm;
+
+    Vector_3 Z = CGAL::cross_product(X, p2 - p0) ;
+    NT Z_norm = std::sqrt(Z*Z);
+    if (Z_norm != 0.0)
+        Z = Z / Z_norm;
+
+    Vector_3 Y = CGAL::cross_product(Z, X) ;
+
+    const Point_3& O = p0 ;
+
+    NT x0 = 0 ;
+    NT y0 = 0 ;
+    NT x1 = std::sqrt( (p1 - O)*(p1 - O) ) ;
+    NT y1 = 0 ;
+    NT x2 = (p2 - O) * X ;
+    NT y2 = (p2 - O) * Y ;
+
+    z0 = Point_2(x0,y0) ;
+    z1 = Point_2(x1,y1) ;
+    z2 = Point_2(x2,y2) ;
+}
+
+
+// Create two lines in the linear system per triangle (one for u, one for v)
+//
+// Precondition: vertices must be indexed
+//
+// Implementation note: LSCM equation is:
+//       (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
+// where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
+//       Zk = xk + i.yk is the complex number corresponding to local (x,y) coords
+// cool: no divide with this expression; makes it more numerically stable
+// in presence of degenerate triangles
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+setup_triangle_relations(LeastSquaresSolver& solver,
+                         const Adaptor& mesh,
+                         Facet_const_handle facet)
+{
+    // Get the 3 vertices of the triangle
+    Vertex_const_handle v0, v1, v2;
+    int vertexIndex = 0;
+    Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facet),
+                                         end = cir;
+    CGAL_For_all(cir, end)
+    {
+        if (vertexIndex == 0)
+            v0 = cir;
+        else if (vertexIndex == 1)
+            v1 = cir;
+        else if (vertexIndex == 2)
+            v2 = cir;
+
+        vertexIndex++;
+    }
+    if (vertexIndex != 3)
+        return Base::ERROR_NON_TRIANGULAR_MESH;
+
+    // Get the vertices index
+    int id0 = mesh.get_vertex_index(v0) ;
+    int id1 = mesh.get_vertex_index(v1) ;
+    int id2 = mesh.get_vertex_index(v2) ;
+
+    // Get the vertices position
+    const Point_3& p0 = mesh.get_vertex_position(v0) ;
+    const Point_3& p1 = mesh.get_vertex_position(v1) ;
+    const Point_3& p2 = mesh.get_vertex_position(v2) ;
+
+    // Computes the coordinates of the vertices of a triangle
+    // in a local 2D orthonormal basis of the triangle's plane.
+    Point_2 z0,z1,z2 ;
+    project_triangle(p0,p1,p2,  //in
+                     z0,z1,z2); // out
+    Vector_2 z01 = z1 - z0 ;
+    Vector_2 z02 = z2 - z0 ;
+    NT a = z01.x() ;
+    NT b = z01.y() ;
+    NT c = z02.x() ;
+    NT d = z02.y() ;
+    CGAL_surface_mesh_parameterization_assertion(b == 0.0) ;
+
+    // Create two lines in the linear system per triangle (one for u, one for v)
+    // LSCM equation is:
+    //       (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
+    // where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
+    //       Zk = xk + i.yk is the complex number corresponding to local (x,y) coords
+    //
+    // Note  : 2*index     --> u
+    //         2*index + 1 --> v
+    int u0_id = 2*id0     ;
+    int v0_id = 2*id0 + 1 ;
+    int u1_id = 2*id1     ;
+    int v1_id = 2*id1 + 1 ;
+    int u2_id = 2*id2     ;
+    int v2_id = 2*id2 + 1 ;
+    //
+    // Real part
+    // Note: b = 0
+    solver.begin_row() ;
+    solver.add_coefficient(u0_id, -a+c)  ;
+    solver.add_coefficient(v0_id,  b-d)  ;
+    solver.add_coefficient(u1_id,   -c)  ;
+    solver.add_coefficient(v1_id,    d)  ;
+    solver.add_coefficient(u2_id,    a) ;
+    solver.end_row() ;
+    //
+    // Imaginary part
+    // Note: b = 0
+    solver.begin_row() ;
+    solver.add_coefficient(u0_id, -b+d) ;
+    solver.add_coefficient(v0_id, -a+c) ;
+    solver.add_coefficient(u1_id,   -d) ;
+    solver.add_coefficient(v1_id,   -c) ;
+    solver.add_coefficient(v2_id,    a) ;
+    solver.end_row() ;
+
+    return Base::OK;
+}
+
+// Copy X coordinates into the (u,v) pair of each vertex
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+void LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+set_mesh_uv_from_system(Adaptor& mesh,
+                        const LeastSquaresSolver& solver)
+{
+    Vertex_iterator vertexIt;
+    for (vertexIt = mesh.mesh_vertices_begin();
+         vertexIt != mesh.mesh_vertices_end();
+         vertexIt++)
+    {
+        int index = mesh.get_vertex_index(vertexIt);
+
+        // Note  : 2*index     --> u
+        //         2*index + 1 --> v
+        NT u = solver.variable(2*index    ).value() ;
+        NT v = solver.variable(2*index + 1).value() ;
+
+        // Fill vertex (u,v) and mark it as "parameterized"
+        mesh.set_vertex_uv(vertexIt, Point_2(u,v));
+        mesh.set_vertex_parameterized(vertexIt, true);
+    }
+}
+
+// Check parameterize() postconditions:
+// - 3D -> 2D mapping is one-to-one.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+typename LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::Error_code
+LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+check_parameterize_postconditions(const Adaptor& mesh,
+                                  const LeastSquaresSolver& solver)
+{
+    Error_code status = Base::OK;
+
+    // Check if 3D -> 2D mapping is one-to-one
+    status = is_one_to_one_mapping(mesh, solver)
+           ? Base::OK
+           : Base::ERROR_NO_1_TO_1_MAPPING;
+    if (status != Base::OK)
+        return status;
+
+    return status;
+}
+
+// Check if 3D -> 2D mapping is one-to-one.
+template<class Adaptor, class Border_param, class Sparse_LA>
+inline
+bool LSCM_parameterizer_3<Adaptor, Border_param, Sparse_LA>::
+is_one_to_one_mapping(const Adaptor& mesh,
+                      const LeastSquaresSolver& )
+{
+    Vector_3    first_triangle_normal(0., 0., 0.);
+
+    for (Facet_const_iterator facetIt = mesh.mesh_facets_begin();
+         facetIt != mesh.mesh_facets_end();
+         facetIt++)
+    {
+        // Get 3 vertices of the facet
+        Vertex_const_handle v0, v1, v2;
+        int vertexIndex = 0;
+        Vertex_around_facet_const_circulator cir = mesh.facet_vertices_begin(facetIt),
+                                             end = cir;
+        CGAL_For_all(cir, end)
+        {
+            if (vertexIndex == 0)
+                v0 = cir;
+            else if (vertexIndex == 1)
+                v1 = cir;
+            else if (vertexIndex == 2)
+                v2 = cir;
+
+            vertexIndex++;
+        }
+        CGAL_surface_mesh_parameterization_assertion(vertexIndex >= 3);
+
+        // Get the 3 vertices position IN 2D
+        Point_2 p0 = mesh.get_vertex_uv(v0) ;
+        Point_2 p1 = mesh.get_vertex_uv(v1) ;
+        Point_2 p2 = mesh.get_vertex_uv(v2) ;
+
+        // Compute the facet normal
+        Point_3 p0_3D(p0.x(), p0.y(), 0);
+        Point_3 p1_3D(p1.x(), p1.y(), 0);
+        Point_3 p2_3D(p2.x(), p2.y(), 0);
+        Vector_3 v01_3D = p1_3D - p0_3D;
+        Vector_3 v02_3D = p2_3D - p0_3D;
+        Vector_3 normal = CGAL::cross_product(v01_3D, v02_3D);
+
+        // Check that all normals are oriented the same way
+        // => no 2D triangle is flipped
+        if (cir == mesh.facet_vertices_begin(facetIt))
+        {
+            first_triangle_normal = normal;
+        }
+        else
+        {
+            if (first_triangle_normal * normal < 0)
+                return false;
+        }
+    }
+
+    return true;            // OK if we reach this point
+}
+
+
+} //namespace CGAL
+
+#endif //CGAL_LSCM_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Labeled_image_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Labeled_image_mesh_domain_3.h
new file mode 100644
index 0000000..c3c0f25
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Labeled_image_mesh_domain_3.h
@@ -0,0 +1,108 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description :
+//
+//
+//******************************************************************************
+
+#ifndef CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
+#define CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
+
+
+#include <CGAL/Random.h>
+#include <CGAL/Labeled_mesh_domain_3.h>
+#include <CGAL/Mesh_3/Image_to_labeled_function_wrapper.h>
+#include <CGAL/Bbox_3.h>
+
+namespace CGAL {
+
+/**
+ * @class Labeled_image_mesh_domain_3
+ *
+ *
+ */
+template<class Image,
+         class BGT,
+         typename Image_word_type = unsigned char,
+         typename Subdomain_index = int,
+         class Wrapper = Mesh_3::Image_to_labeled_function_wrapper<Image, BGT,
+                                                                   Image_word_type,
+                                                                   Subdomain_index> >
+class Labeled_image_mesh_domain_3
+: public Labeled_mesh_domain_3<Wrapper, BGT>
+{
+public:
+  typedef Labeled_mesh_domain_3<Wrapper, BGT> Base;
+
+  typedef typename Base::Sphere_3 Sphere_3;
+  typedef typename Base::FT FT;
+  typedef BGT Geom_traits;
+  typedef CGAL::Bbox_3 Bbox_3;
+
+  /// Constructor
+  Labeled_image_mesh_domain_3(const Image& image,
+                              const FT& error_bound = FT(1e-3),
+                              CGAL::Random* p_rng = NULL)
+    : Base(Wrapper(image),
+           compute_bounding_box(image),
+           error_bound,
+           p_rng)
+  {}
+
+  Labeled_image_mesh_domain_3(const Image& image,
+                              const CGAL::Bbox_3& bbox,
+                              const FT& error_bound = FT(1e-3),
+                              CGAL::Random* p_rng = NULL)
+    : Base(Wrapper(image),
+           bbox,
+           error_bound,
+           p_rng)
+  {}
+
+  /// Destructor
+  virtual ~Labeled_image_mesh_domain_3() {}
+
+  using Base::bbox;
+
+private:
+  /// Returns a box enclosing image \c im
+  Bbox_3 compute_bounding_box(const Image& im) const
+  {
+    return Bbox_3(-1,-1,-1,
+                  im.xdim()*im.vx()+1, im.ydim()*im.vy()+1, im.zdim()*im.vz()+1);
+  }
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Labeled_image_mesh_domain_3<Image, BGT> Self;
+  Labeled_image_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Labeled_image_mesh_domain_3
+
+
+
+}  // end namespace CGAL
+
+
+
+#endif // CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Labeled_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Labeled_mesh_domain_3.h
new file mode 100644
index 0000000..7d85d1b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Labeled_mesh_domain_3.h
@@ -0,0 +1,650 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb, Aymeric PELLE
+//
+//******************************************************************************
+// File Description :
+// class Labeled_mesh_domain_3. See class description.
+//******************************************************************************
+
+#ifndef CGAL_LABELED_MESH_DOMAIN_3_H
+#define CGAL_LABELED_MESH_DOMAIN_3_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Bbox_3.h>
+
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
+
+#include <boost/variant.hpp>
+#include <boost/format.hpp>
+#include <boost/optional.hpp>
+#include <CGAL/tuple.h>
+#include <CGAL/Origin.h>
+
+namespace CGAL {
+
+/**
+ * \class Labeled_mesh_domain_3
+ *
+ * Function f must take his values into N.
+ * Let p be a Point.
+ *  - f(p)=0 means that p is outside domain.
+ *  - f(p)=a, a!=0 means that p is inside subdomain a.
+ *
+ *  Any boundary facet is labelled <a,b>, a<b, where a and b are the
+ *  tags of it's incident subdomain.
+ *  Thus, a boundary facet of the domain is labelled <0,b>, where b!=0.
+ */
+template<class Function, class BGT>
+class Labeled_mesh_domain_3
+{
+public:
+  /// Geometric object types
+  typedef typename BGT::Point_3    Point_3;
+  typedef typename BGT::Segment_3  Segment_3;
+  typedef typename BGT::Ray_3      Ray_3;
+  typedef typename BGT::Line_3     Line_3;
+  typedef typename BGT::Vector_3   Vector_3;
+  typedef typename BGT::Sphere_3   Sphere_3;
+  typedef CGAL::Bbox_3             Bbox_3;
+
+protected:
+  typedef typename BGT::Iso_cuboid_3 Iso_cuboid_3;
+
+public:
+  // Kernel_traits compatibility
+  typedef BGT R;
+  // access Function type from inherited class
+  typedef Function Fct;
+
+  //-------------------------------------------------------
+  // Index Types
+  //-------------------------------------------------------
+  /// Type of indexes for cells of the input complex
+  typedef typename Function::return_type Subdomain_index;
+  typedef boost::optional<Subdomain_index> Subdomain;
+  /// Type of indexes for surface patch of the input complex
+  typedef std::pair<Subdomain_index, Subdomain_index> Surface_patch_index;
+  typedef boost::optional<Surface_patch_index> Surface_patch;
+  /// Type of indexes to characterize the lowest dimensional face of the input
+  /// complex on which a vertex lie
+  typedef boost::variant<Subdomain_index, Surface_patch_index> Index;
+  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
+
+
+  typedef typename BGT::FT FT;
+  typedef BGT Geom_traits;
+
+  /**
+   * @brief Constructor
+   */
+  Labeled_mesh_domain_3(const Function& f,
+                         const Sphere_3& bounding_sphere,
+                         const FT& error_bound = FT(1e-3),
+                         CGAL::Random* p_rng = NULL);
+
+  Labeled_mesh_domain_3(const Function& f,
+                         const Bbox_3& bbox,
+                         const FT& error_bound = FT(1e-3),
+                         CGAL::Random* p_rng = NULL);
+
+  Labeled_mesh_domain_3(const Function& f,
+                         const Iso_cuboid_3& bbox,
+                         const FT& error_bound = FT(1e-3),
+                         CGAL::Random* p_rng = NULL);
+
+  /// Destructor
+  virtual ~Labeled_mesh_domain_3()
+  {
+    if(delete_rng_)
+      delete p_rng_;
+  }
+
+
+  /**
+   * Constructs  a set of \ccc{n} points on the surface, and output them to
+   *  the output iterator \ccc{pts} whose value type is required to be
+   *  \ccc{std::pair<Points_3, Index>}.
+   */
+  struct Construct_initial_points
+  {
+    Construct_initial_points(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    template<class OutputIterator>
+    OutputIterator operator()(OutputIterator pts, const int n = 12) const;
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Construct_initial_points object
+  Construct_initial_points construct_initial_points_object() const
+  {
+    return Construct_initial_points(*this);
+  }
+
+  /**
+   * Returns a bounding box of the domain
+   */
+  Bbox_3 bbox() const {
+    return bbox_.bbox();
+  }
+
+  /**
+   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
+   *  domain, the parameter index is set to the index of the subdomain
+   *  including $p$. It is set to the default value otherwise.
+   */
+  struct Is_in_domain
+  {
+    Is_in_domain(const Labeled_mesh_domain_3& domain) : r_domain_(domain) {}
+
+    Subdomain operator()(const Point_3& p) const
+    {
+      // f(p)==0 means p is outside the domain
+      Subdomain_index index = (r_domain_.function_)(p);
+      if ( Subdomain_index() == index )
+        return Subdomain();
+      else
+        return Subdomain(index);
+    }
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Is_in_domain object
+  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
+
+  /**
+   * Returns true is the element \ccc{type} intersect properly any of the
+   * surface patches describing the either the domain boundary or some
+   * subdomain boundary.
+   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * Parameter index is set to the index of the intersected surface patch
+   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
+   * value otherwise.
+   */
+  struct Do_intersect_surface
+  {
+    Do_intersect_surface(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    Surface_patch operator()(const Segment_3& s) const
+    {
+      return this->operator()(s.source(), s.target());
+    }
+
+    Surface_patch operator()(const Ray_3& r) const
+    {
+      return clip_to_segment(r);
+    }
+
+    Surface_patch operator()(const Line_3& l) const
+    {
+      return clip_to_segment(l);
+    }
+
+  private:
+    /// Returns true if points \c a & \c b do not belong to the same subdomain
+    /// \c index is set to the surface index of subdomains f(a), f(b)
+    Surface_patch operator()(const Point_3& a, const Point_3& b) const
+    {
+      // If f(a) != f(b), then [a,b] intersects some surface. Here we consider
+      // [a,b] intersects surface_patch labelled <f(a),f(b)> (or <f(b),f(a)>).
+      // It may be false, further rafinement will improve precision
+      const Subdomain_index value_a = r_domain_.function_(a);
+      const Subdomain_index value_b = r_domain_.function_(b);
+
+      if ( value_a != value_b )
+        return Surface_patch(r_domain_.make_surface_index(value_a, value_b));
+      else
+        return Surface_patch();
+    }
+
+    /**
+     * Clips \c query to a segment \c s, and call operator()(s)
+     */
+    template<typename Query>
+    Surface_patch clip_to_segment(const Query& query) const
+    {
+      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
+        clipped = CGAL::intersection(query, r_domain_.bbox_);
+
+      if(clipped)
+#if CGAL_INTERSECTION_VERSION > 1
+        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
+          return this->operator()(*s);
+#else
+        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
+          return this->operator()(*s);
+#endif
+        
+      return Surface_patch();
+    }
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Do_intersect_surface object
+  Do_intersect_surface do_intersect_surface_object() const
+  {
+    return Do_intersect_surface(*this);
+  }
+
+  /**
+   * Returns a point in the intersection of the primitive \ccc{type}
+   * with some boundary surface.
+   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * The integer \ccc{dimension} is set to the dimension of the lowest
+   * dimensional face in the input complex containing the returned point, and
+   * \ccc{index} is set to the index to be stored at a mesh vertex lying
+   * on this face.
+   */
+  struct Construct_intersection
+  {
+    Construct_intersection(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    Intersection operator()(const Segment_3& s) const
+    {
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      CGAL_precondition(r_domain_.do_intersect_surface_object()(s));
+#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      return this->operator()(s.source(),s.target());
+    }
+
+    Intersection operator()(const Ray_3& r) const
+    {
+      return clip_to_segment(r);
+    }
+
+    Intersection operator()(const Line_3& l) const
+    {
+      return clip_to_segment(l);
+    }
+
+  private:
+    /**
+     * Returns a point in the intersection of [a,b] with the surface
+     * \c a must be the source point, and \c b the out point. It's important
+     * because it drives bisection cuts.
+     * Indeed, the returned point is the first intersection from \c [a,b]
+     * with a subdomain surface.
+     */
+    Intersection operator()(const Point_3& a, const Point_3& b) const
+    {
+      // Functors
+      typename BGT::Compute_squared_distance_3 squared_distance =
+                                      BGT().compute_squared_distance_3_object();
+      typename BGT::Construct_midpoint_3 midpoint =
+                                      BGT().construct_midpoint_3_object();
+
+      // Non const points
+      Point_3 p1 = a;
+      Point_3 p2 = b;
+      Point_3 mid = midpoint(p1, p2);
+
+      // Cannot be const: those values are modified below.
+      Subdomain_index value_at_p1 = r_domain_.function_(p1);
+      Subdomain_index value_at_p2 = r_domain_.function_(p2);
+      Subdomain_index value_at_mid = r_domain_.function_(mid,true);
+
+      // If both extremities are in the same subdomain,
+      // there is no intersection.
+      // This should not happen...
+      if( value_at_p1 == value_at_p2 )
+      {
+        return Intersection();
+      }
+
+      // Construct the surface patch index and index from the values at 'a'
+      // and 'b'. Even if the bissection find out a different pair of
+      // values, the reported index will be constructed from the initial
+      // values.
+      const Surface_patch_index sp_index =
+        r_domain_.make_surface_index(value_at_p1, value_at_p2);
+      const Index index = r_domain_.index_from_surface_patch_index(sp_index);
+
+      // Else lets find a point (by bisection)
+      // Bisection ends when the point is near than error bound from surface
+      while(true)
+      {
+        // If the two points are enough close, then we return midpoint
+        if ( squared_distance(p1, p2) < r_domain_.squared_error_bound_ )
+        {
+          CGAL_assertion(value_at_p1 != value_at_p2);
+          return Intersection(mid, index, 2);
+        }
+
+        // Else we must go on
+        // Here we consider that p1(a) is the source point. Thus, we keep p1 and
+        // change p2 if f(p1)!=f(p2).
+        // That allows us to find the first intersection from a of [a,b] with
+        // a surface.
+        if ( value_at_p1 != value_at_mid )
+        {
+          p2 = mid;
+          value_at_p2 = value_at_mid;
+        }
+        else
+        {
+          p1 = mid;
+          value_at_p1 = value_at_mid;
+        }
+
+        mid = midpoint(p1, p2);
+        value_at_mid = r_domain_.function_(mid,true);
+      }
+    }
+
+    /// Clips \c query to a segment \c s, and call operator()(s)
+    template<typename Query>
+    Intersection clip_to_segment(const Query& query) const
+    {
+      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
+        clipped = CGAL::intersection(query, r_domain_.bbox_);
+
+      if(clipped)
+#if CGAL_INTERSECTION_VERSION > 1
+        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
+          return this->operator()(*s);
+#else
+        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
+          return this->operator()(*s);
+#endif
+      
+      return Intersection();
+    }
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Construct_intersection object
+  Construct_intersection construct_intersection_object() const
+  {
+    return Construct_intersection(*this);
+  }
+
+  /**
+   * Returns the index to be stored in a vertex lying on the surface identified
+   * by \c index.
+   */
+  Index index_from_surface_patch_index(const Surface_patch_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the index to be stored in a vertex lying in the subdomain
+   * identified by \c index.
+   */
+  Index index_from_subdomain_index(const Subdomain_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the \c Surface_patch_index of the surface patch
+   * where lies a vertex with dimension 2 and index \c index.
+   */
+  Surface_patch_index surface_patch_index(const Index& index) const
+  { return boost::get<Surface_patch_index>(index); }
+
+  /**
+   * Returns the index of the subdomain containing a vertex
+   *  with dimension 3 and index \c index.
+   */
+  Subdomain_index subdomain_index(const Index& index) const
+  { return boost::get<Subdomain_index>(index); }
+  
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+  
+  Index index_from_surface_index(const Surface_index& index) const
+  { return index_from_surface_patch_index(index); }
+  
+  Surface_index surface_index(const Index& index) const
+  { return surface_patch_index(index); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+
+private:
+  /// Returns Surface_patch_index from \c i and \c j
+  Surface_patch_index make_surface_index(const Subdomain_index i,
+                                   const Subdomain_index j) const
+  {
+    if ( i < j ) return Surface_patch_index(i,j);
+    else return Surface_patch_index(j,i);
+  }
+
+  /// Returns squared error bound from \c bbox and \c error
+  FT squared_error_bound(const Iso_cuboid_3& bbox, const FT& error) const
+  {
+    typename BGT::Compute_squared_distance_3 squared_distance =
+                                    BGT().compute_squared_distance_3_object();
+    return squared_distance((bbox.min)(), (bbox.max)())*error*error/4;
+  }
+
+  /// Returns squared error bound from \c sphere and \c error
+  FT squared_error_bound(const Sphere_3& sphere, const FT& error) const
+  {
+    typename BGT::Compute_squared_radius_3 squared_radius =
+                                    BGT().compute_squared_radius_3_object();
+    return squared_radius(sphere)*error*error;
+  }
+
+  /// Returns the bounding sphere of an Iso_cuboid_3
+  Sphere_3 bounding_sphere(const Iso_cuboid_3& bbox) const
+  {
+    typename BGT::Construct_sphere_3 sphere = BGT().construct_sphere_3_object();
+    return sphere((bbox.min)(), (bbox.max)());
+  }
+
+  /// Returns and Iso_cuboid_3 from a Bbox_3
+  Iso_cuboid_3 iso_cuboid(const Bbox_3& bbox)
+  {
+    const Point_3 p_min(bbox.xmin(), bbox.ymin(), bbox.zmin());
+    const Point_3 p_max(bbox.xmax(), bbox.ymax(), bbox.zmax());
+
+    return Iso_cuboid_3(p_min,p_max);
+  }
+
+protected:
+  /// Returns bounding box
+  const Iso_cuboid_3& bounding_box() const { return bbox_; }
+
+private:
+  /// The function which answers subdomain queries
+  const Function function_;
+  /// The bounding box
+  const Iso_cuboid_3 bbox_;
+  /// The random number generator used by Construct_initial_points
+  CGAL::Random* p_rng_;
+  bool delete_rng_;
+  /// Error bound relative to sphere radius
+  FT squared_error_bound_;
+
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Labeled_mesh_domain_3<Function,BGT> Self;
+  Labeled_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Labeled_mesh_domain_3
+
+
+
+
+//-------------------------------------------------------
+// Method implementation
+//-------------------------------------------------------
+template<class F, class BGT>
+Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
+                       const F& f,
+                       const Sphere_3& bounding_sphere,
+                       const FT& error_bound,
+                       CGAL::Random* p_rng)
+: function_(f)
+, bbox_(iso_cuboid(bounding_sphere.bbox()))
+, p_rng_(p_rng)
+, delete_rng_(false)
+, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
+{
+  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
+  if(!p_rng_)
+  {
+    p_rng_ = new CGAL::Random(0);
+    delete_rng_ = true;
+  }
+}
+
+template<class F, class BGT>
+Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
+                       const F& f,
+                       const Bbox_3& bbox,
+                       const FT& error_bound,
+                       CGAL::Random* p_rng)
+: function_(f)
+, bbox_(iso_cuboid(bbox))
+, p_rng_(p_rng)
+, delete_rng_(false)
+, squared_error_bound_(squared_error_bound(bbox_,error_bound))
+{
+  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
+  if(!p_rng_)
+  {
+    p_rng_ = new CGAL::Random(0);
+    delete_rng_ = true;
+  }
+}
+
+template<class F, class BGT>
+Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
+                       const F& f,
+                       const Iso_cuboid_3& bbox,
+                       const FT& error_bound,
+                       CGAL::Random* p_rng)
+: function_(f)
+, bbox_(bbox)
+, p_rng_(p_rng)
+, delete_rng_(false)
+, squared_error_bound_(squared_error_bound(bbox_,error_bound))
+{
+  // TODO : CGAL_ASSERT(0 < f( bbox.get_center()) ) ?
+  if(!p_rng_)
+  {
+    p_rng_ = new CGAL::Random(0);
+    delete_rng_ = true;
+  }
+}
+
+
+
+template<class F, class BGT>
+template<class OutputIterator>
+OutputIterator
+Labeled_mesh_domain_3<F,BGT>::Construct_initial_points::operator()(
+                                                    OutputIterator pts,
+                                                    const int nb_points) const
+{
+  // Create point_iterator on and in bounding_sphere
+  typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
+  typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
+
+
+  const FT squared_radius = BGT().compute_squared_radius_3_object()(
+      r_domain_.bounding_sphere(r_domain_.bbox_));
+
+  const double radius = std::sqrt(CGAL::to_double(squared_radius));
+
+  CGAL::Random& rng = *(r_domain_.p_rng_);
+  Random_points_on_sphere_3 random_point_on_sphere(radius, rng);
+  Random_points_in_sphere_3 random_point_in_sphere(radius, rng);
+
+  // Get some functors
+  typename BGT::Construct_segment_3 segment_3 =
+                              BGT().construct_segment_3_object();
+  typename BGT::Construct_vector_3 vector_3 =
+                              BGT().construct_vector_3_object();
+  typename BGT::Construct_translated_point_3 translate =
+                              BGT().construct_translated_point_3_object();
+  typename BGT::Construct_center_3 center = BGT().construct_center_3_object();
+
+  // Get translation from origin to sphere center
+  Point_3 center_pt = center(r_domain_.bounding_sphere(r_domain_.bbox_));
+  const Vector_3 sphere_translation = vector_3(CGAL::ORIGIN, center_pt);
+
+  // Create nb_point points
+  int n = nb_points;
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "construct initial points:\n";
+#endif
+  while ( 0 != n )
+  {
+    // Get a random segment
+    const Point_3 random_point = translate(*random_point_on_sphere,
+                                           sphere_translation);
+    const Segment_3 random_seg = segment_3(center_pt, random_point);
+
+    // Add the intersection to the output if it exists
+    Surface_patch surface = r_domain_.do_intersect_surface_object()(random_seg);
+    if ( surface )
+    {
+      const Point_3 intersect_pt = CGAL::cpp11::get<0>(
+          r_domain_.construct_intersection_object()(random_seg));
+      *pts++ = std::make_pair(intersect_pt,
+                              r_domain_.index_from_surface_patch_index(*surface));
+      --n;
+
+#ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << boost::format("\r             \r"
+                                 "%1%/%2% initial point(s) found...")
+                   % (nb_points - n)
+                   % nb_points;
+#endif
+    }
+    else
+    {
+      // Get a new random point into sphere as center of object
+      // It may be necessary if the center of the domain is empty, e.g. torus
+      // In general case, it is good for input point dispersion
+      ++random_point_in_sphere;
+      center_pt = translate(*random_point_in_sphere, sphere_translation);
+    }
+    ++random_point_on_sphere;
+  }
+
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "\n";
+#endif
+  return pts;
+}
+
+
+}  // end namespace CGAL
+
+#endif // LABELLED_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Lapack_svd.h b/3rdparty/CGAL-4.8/include/CGAL/Lapack_svd.h
new file mode 100644
index 0000000..b4c6740
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Lapack_svd.h
@@ -0,0 +1,171 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+#ifndef CGAL_LAPACK_H
+#define CGAL_LAPACK_H
+
+#include <cstdlib>
+#include <CGAL/auto_link/LAPACK.h>
+
+extern "C" {
+  // taken from acml.h
+void dgelss(int m, int n, int nrhs, 
+            double *a, int lda, double *b, int ldb, double *sing, 
+            double rcond, int *irank, int *info);
+
+void dgelss_(int *m, int *n, int *nrhs,
+                    double *a, int *lda, double *b, int *ldb, double *
+                    s, double *rcond, int *rank, double *work, int *lwork,
+                    int *info);
+}
+
+namespace CGAL { namespace LAPACK {
+
+inline
+void dgelss(int *m, int *n, int *nrhs,
+       double *a, int *lda, double *b, int *ldb, double *
+       s, double *rcond, int *rank, double *work, int *lwork,
+       int *info)
+{
+#ifdef CGAL_USE_F2C
+  ::dgelss_(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info);
+#else
+  ::dgelss(*m, *n, *nrhs, a, *lda, b, *ldb, s, *rcond, rank,  info);
+#endif
+}
+
+} }
+
+
+namespace CGAL {
+  
+////////////////////////class Lapack_vector/////////////////////
+class Lapack_vector{
+  typedef double FT;
+ protected:
+  FT* m_vector;
+  size_t nb_elts;
+ public:
+  // constructor
+  // initializes all the elements of the vector to zero.
+  Lapack_vector(size_t n) { 
+    m_vector = (FT*) std::calloc (n, sizeof(FT)); 
+    nb_elts = n;
+  }
+  
+  ~Lapack_vector() { 
+    free(m_vector);
+  }
+  
+  size_t size() {return nb_elts;}
+  //data access
+  const FT* vector() const { return m_vector;}
+  FT* vector() { return m_vector; }
+
+  FT operator()(size_t i) {return m_vector[i];}
+  void set(size_t i, const FT value) { m_vector[i] = value; }
+private:
+  /// Copy constructor and operator =() are not implemented.
+  Lapack_vector(const Lapack_vector& toCopy);
+  Lapack_vector& operator =(const Lapack_vector& toCopy);
+}; 
+
+
+////////////////////////class Lapack_matrix/////////////////////
+//in clapack, matrices are one-dimensional arrays and elements are
+//column-major ordered. This class is a wrapper defining set and get
+//in the usual way with line and column indices.
+class Lapack_matrix{
+  typedef double FT;
+protected:
+  FT* m_matrix;
+  size_t nb_rows;
+  size_t nb_columns;
+public:
+  // constructor
+  // initializes all the elements of the matrix to zero.
+  Lapack_matrix(size_t n1, size_t n2) { 
+    m_matrix = (FT*) std::calloc (n1*n2, sizeof(FT)); 
+    nb_rows = n1;
+    nb_columns = n2;
+  }
+  
+  ~Lapack_matrix() { 
+    free(m_matrix);
+  }
+  
+  size_t number_of_rows() {return nb_rows;}
+  size_t number_of_columns() {return nb_columns;}
+
+  //access
+  const FT* matrix() const { return m_matrix; }
+  FT* matrix() { return m_matrix; }
+
+  void set(size_t i, size_t j, const FT value) { m_matrix[j*nb_rows+i] = value; }
+  FT operator()(size_t i, size_t j) { return m_matrix[j*nb_rows+i]; }
+private:
+  /// Copy constructor and operator =() are not implemented.
+  Lapack_matrix(const Lapack_matrix& toCopy);
+  Lapack_matrix& operator =(const Lapack_matrix& toCopy);
+}; 
+
+////////////////////////class Lapack_svd/////////////////////
+class Lapack_svd{
+public:
+  typedef double FT;
+  typedef Lapack_vector Vector;
+  typedef Lapack_matrix Matrix;
+  //solve MX=B using SVD and return the condition number of M
+  //The solution is stored in B
+  static
+    FT solve(Matrix& M, Vector& B);
+};
+
+inline
+Lapack_svd::FT Lapack_svd::solve(Matrix& M, Vector& B)
+{
+  int m = static_cast<int>(M.number_of_rows()),
+    n = static_cast<int>(M.number_of_columns()),
+    nrhs = 1,
+    lda = m,
+    ldb = m,
+    rank,
+    lwork = 5*m,
+    info;
+  //c style
+  FT* sing_values = (FT*) std::malloc(n*sizeof(FT));
+  FT* work = (FT*) std::malloc(lwork*sizeof(FT));
+
+  FT rcond = -1;
+
+  LAPACK::dgelss(&m, &n, &nrhs, M.matrix(), &lda, B.vector(), &ldb, sing_values, 
+	  &rcond, &rank, work, &lwork, &info);
+  CGAL_assertion(info==0);
+
+  FT cond_nb = sing_values[0]/sing_values[n-1];
+  
+  //clean up 
+  free(sing_values);
+  free(work);
+
+  return cond_nb;
+}
+
+} // namespace CGAL
+
+#endif // CGAL_LAPACK_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Largest_empty_iso_rectangle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Largest_empty_iso_rectangle_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Largest_empty_iso_rectangle_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Largest_empty_iso_rectangle_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Lazy.h b/3rdparty/CGAL-4.8/include/CGAL/Lazy.h
new file mode 100644
index 0000000..1341282
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Lazy.h
@@ -0,0 +1,1763 @@
+// Copyright (c) 2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Sylvain Pion
+
+#ifndef CGAL_LAZY_H
+#define CGAL_LAZY_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle.h>
+#include <CGAL/Object.h>
+#include <CGAL/Kernel/Type_mapper.h>
+#include <CGAL/Profile_counter.h>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/min_max_n.h>
+#include <CGAL/Origin.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Bbox_3.h>
+#include <vector>
+#include <CGAL/Default.h>
+#include<CGAL/tss.h>
+
+#include <boost/optional.hpp>
+#include <boost/variant.hpp>
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+#  include <boost/optional/optional_io.hpp>
+#endif
+
+#include <boost/mpl/has_xxx.hpp>
+
+#include <boost/preprocessor/facilities/expand.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+
+namespace CGAL {
+
+template <typename AT, typename ET, typename EFT, typename E2A> class Lazy;
+
+template <typename ET_>
+class Lazy_exact_nt;
+
+template <typename AT, typename ET, typename EFT, typename E2A>
+inline
+const AT&
+approx(const Lazy<AT,ET, EFT, E2A>& l)
+{
+  return l.approx();
+}
+
+// Where is this one (non-const) needed ?  Is it ?
+template <typename AT, typename ET, typename EFT, typename E2A>
+inline
+AT&
+approx(Lazy<AT,ET, EFT, E2A>& l)
+{
+  return l.approx();
+}
+
+
+template <typename AT, typename ET, typename EFT, typename E2A>
+inline
+const ET&
+exact(const Lazy<AT,ET,EFT,E2A>& l)
+{
+  return l.exact();
+}
+
+
+template <typename AT, typename ET, typename EFT, typename E2A>
+inline
+unsigned
+depth(const Lazy<AT,ET,EFT,E2A>& l)
+{
+  return l.depth();
+}
+
+
+#define CGAL_LAZY_FORWARD(T) \
+  inline const T & approx(const T& d) { return d; } \
+  inline const T & exact (const T& d) { return d; } \
+  inline unsigned  depth (const T&  ) { return 0; }
+
+
+CGAL_LAZY_FORWARD(long double)
+CGAL_LAZY_FORWARD(double)
+CGAL_LAZY_FORWARD(float)
+CGAL_LAZY_FORWARD(int)
+CGAL_LAZY_FORWARD(unsigned int)
+CGAL_LAZY_FORWARD(long)
+CGAL_LAZY_FORWARD(unsigned long)
+#ifdef CGAL_USE_LONG_LONG
+CGAL_LAZY_FORWARD(long long)
+CGAL_LAZY_FORWARD(unsigned long long)
+#endif
+CGAL_LAZY_FORWARD(Return_base_tag)
+CGAL_LAZY_FORWARD(Null_vector)
+CGAL_LAZY_FORWARD(Origin)
+CGAL_LAZY_FORWARD(Orientation)
+CGAL_LAZY_FORWARD(Bbox_2)
+CGAL_LAZY_FORWARD(Bbox_3)
+
+#undef CGAL_LAZY_FORWARD
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+template <class T>
+void
+print_at(std::ostream& os, const T& at)
+{
+  os << at;
+}
+
+template <class T>
+void
+print_at(std::ostream& os, const std::vector<T>& at)
+{
+  os << "std::vector";
+}
+
+template <>
+void
+print_at(std::ostream& os, const Object& o)
+{
+  os << "Object";
+}
+
+template <class T1, class T2>
+void
+print_at(std::ostream& os, const std::pair<T1,T2> & at)
+{
+  os << "[ " << at.first << " | " << at.second << " ]" << std::endl ;
+}
+
+
+template <typename AT, typename ET, typename EFT, typename E2A>
+inline
+void
+print_dag(const Lazy<AT,ET,EFT,E2A>& l, std::ostream& os, int level = 0)
+{
+  l.print_dag(os, level);
+}
+
+inline
+void
+print_dag(double d, std::ostream& os, int level)
+{
+  for(int i = 0; i < level; i++)
+    os << "    ";
+  os << d << std::endl;
+}
+
+inline
+void
+msg(std::ostream& os, int level, const char* s)
+{
+    for(int i = 0; i < level; i++)
+      os << "    ";
+    os << s << std::endl;
+}
+
+inline
+void
+print_dag(const Null_vector&, std::ostream& os, int level)
+{
+  for(int i = 0; i < level; i++)
+    os << "    ";
+  os << "Null_vector" << std::endl;
+}
+
+inline
+void
+print_dag(const Origin&, std::ostream& os, int level)
+{
+  for(int i = 0; i < level; i++)
+    os << "    ";
+  os << "Origin" << std::endl;
+}
+
+inline
+void
+print_dag(const Return_base_tag&, std::ostream& os, int level)
+{
+  for(int i = 0; i < level; i++)
+    os << "    ";
+  os << "Return_base_tag" << std::endl;
+}
+#endif
+
+
+struct Depth_base {
+#ifdef CGAL_PROFILE
+  unsigned depth_;
+  Depth_base() { set_depth(0); }
+  unsigned depth() const { return depth_; }
+  void set_depth(unsigned i)
+  {
+    depth_ = i;
+    CGAL_HISTOGRAM_PROFILER(std::string("[Lazy_kernel DAG depths]"), i);
+                            //(unsigned) ::log2(double(i)));
+  }
+#else
+  unsigned depth() const { return 0; }
+  void set_depth(unsigned) {}
+#endif
+};
+
+
+// Abstract base class for lazy numbers and lazy objects
+template <typename AT_, typename ET, typename E2A>
+class Lazy_rep : public Rep, public Depth_base
+{
+  Lazy_rep (const Lazy_rep&); // cannot be copied.
+
+public:
+
+  typedef AT_ AT;
+
+  mutable AT at;
+  mutable ET *et;
+
+  Lazy_rep ()
+    : at(), et(NULL){}
+
+  Lazy_rep (const AT& a)
+      : at(a), et(NULL){}
+
+  Lazy_rep (const AT& a, const ET& e)
+      : at(a), et(new ET(e)) {}
+
+  const AT& approx() const
+  {
+      return at;
+  }
+
+  AT& approx()
+  {
+      return at;
+  }
+
+  const ET & exact() const
+  {
+    if (et==NULL)
+      update_exact();
+    return *et;
+  }
+
+  ET & exact()
+  {
+    if (et==NULL)
+      update_exact();
+    return *et;
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void print_at_et(std::ostream& os, int level) const
+  {
+    for(int i = 0; i < level; i++){
+      os << "    ";
+    }
+    os << "Approximation: ";
+    print_at(os, at);
+    os << std::endl;
+    if(! is_lazy()){
+      for(int i = 0; i < level; i++){
+	os << "    ";
+      }
+      os << "Exact: ";
+      print_at(os, *et);
+      os << std::endl;
+#ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
+      for(int i = 0; i < level; i++){
+	os << "    ";
+      }
+      os << "  (type: " << typeid(*et).name() << ")" << std::endl;
+#endif // CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
+    }
+  }
+
+  virtual void print_dag(std::ostream& os, int level) const {}
+#endif
+
+  bool is_lazy() const { return et == NULL; }
+  virtual void update_exact() const = 0;
+  virtual ~Lazy_rep() { delete et; }
+};
+
+
+//____________________________________________________________
+// The rep for the leaf node
+
+template <typename AT, typename ET, typename E2A>
+class Lazy_rep_0 : public Lazy_rep<AT, ET, E2A>
+{
+
+  typedef Lazy_rep<AT, ET, E2A> Base;
+public:
+
+  void
+  update_exact() const
+  {
+    this->et = new ET();
+  }
+
+  Lazy_rep_0()
+    : Lazy_rep<AT,ET, E2A>() {}
+
+  Lazy_rep_0(const AT& a, const ET& e)
+    : Lazy_rep<AT,ET,E2A>(a, e) {}
+
+  Lazy_rep_0(const AT& a, void*)
+    : Lazy_rep<AT,ET,E2A>(a) {}
+
+  Lazy_rep_0(const ET& e)
+    : Lazy_rep<AT,ET,E2A>(E2A()(e), e) {}
+
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+  }
+};
+
+// Macro helpers to build the kernel objects
+#define CGAL_TYPEMAP_AC(z, n, t) typedef typename Type_mapper< t##n, LK, AK >::type A##n;
+#define CGAL_TYPEMAP_EC(z, n, t) typedef typename Type_mapper< t##n, LK, EK >::type E##n;
+#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n )
+#define CGAL_LARGS(z, n, t) L##n const& l##n
+
+#define CGAL_TMAP(z, n, d) typename Type_mapper< L##n, d##K, LK >::type
+#define CGAL_PRUNE_TREE(z, n, d) l##n = L##n ();
+#define CGAL_LINIT(z, n, d) l##n(l##n)
+#define CGAL_LN(z, n, d) d(l##n)
+#define CGAL_MLIST(z, n, d) mutable L##n l##n;
+
+//____________________________________________________________
+
+template <typename AT, typename ET, typename AC, typename EC, typename E2A, typename L1>
+class Lazy_rep_1
+  : public Lazy_rep<AT, ET, E2A>
+  , private EC
+{
+  typedef Lazy_rep<AT, ET, E2A> Base;
+
+  mutable L1 l1_;
+
+  const EC& ec() const { return *this; }
+
+public:
+
+  void
+  update_exact() const
+  {
+    this->et = new ET(ec()(CGAL::exact(l1_)));
+    this->at = E2A()(*(this->et));
+    // Prune lazy tree
+    l1_ = L1();
+  }
+
+  Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1)
+    : Lazy_rep<AT,ET, E2A>(ac(CGAL::approx(l1))), EC(ec), l1_(l1)
+  {
+    this->set_depth(CGAL::depth(l1_) + 1);
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
+#  define CGAL_LAZY_PRINT_TYPEID CGAL::msg(os, level, typeid(AC).name());
+#else  // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
+#  define CGAL_LAZY_PRINT_TYPEID
+#endif // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    if(this->is_lazy()){
+      CGAL_LAZY_PRINT_TYPEID
+      CGAL::msg(os, level, "DAG with one child node:");
+      CGAL::print_dag(l1_, os, level+1);
+    }
+  }
+#endif
+};
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+#  define CGAL_PRINT_DAG_LN(z, n, d) \
+  CGAL::print_dag(l##n, os, level+1);
+#  define CGAL_LAZY_REP_PRINT_DAG(n)                            \
+  void print_dag(std::ostream& os, int level) const {           \
+    this->print_at_et(os, level);                               \
+    if(this->is_lazy()){                                        \
+      CGAL_LAZY_PRINT_TYPEID                                    \
+      CGAL::msg(os, level, "DAG with " #n " child nodes:");     \
+      BOOST_PP_REPEAT(n, CGAL_PRINT_DAG_LN, _)                  \
+    }                                                           \
+  }
+#else // not CGAL_LAZY_KERNEL_DEBUG
+#  define CGAL_LAZY_REP_PRINT_DAG(n)
+#endif // not CGAL_LAZY_KERNEL_DEBUG
+
+#define CGAL_LAZY_REP(z, n, d)                                               \
+  template< typename AT, typename ET, typename AC, typename EC, typename E2A, BOOST_PP_ENUM_PARAMS(n, typename L)> \
+class Lazy_rep_##n :public Lazy_rep< AT, \
+                                     ET, \
+                                     E2A >,                             \
+                    private EC                                          \
+{                                                                       \
+  BOOST_PP_REPEAT(n, CGAL_MLIST, _)                                          \
+  const EC& ec() const { return *this; } \
+public: \
+  void update_exact() const { \
+    this->et = new ET(ec()( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ) ); \
+    this->at = E2A()(*(this->et));                           \
+    BOOST_PP_REPEAT(n, CGAL_PRUNE_TREE, _) \
+  } \
+  Lazy_rep_##n(const AC& ac, const EC&, BOOST_PP_ENUM(n, CGAL_LARGS, _)) \
+    : Lazy_rep<AT, ET, E2A>(ac( BOOST_PP_ENUM(n, CGAL_LN, CGAL::approx) )), BOOST_PP_ENUM(n, CGAL_LINIT, _) \
+  { this->set_depth(max_n( BOOST_PP_ENUM(n, CGAL_LN, CGAL::depth) ) + 1); }  \
+                                                                        \
+  CGAL_LAZY_REP_PRINT_DAG(n)                                          \
+};
+
+BOOST_PP_REPEAT_FROM_TO(2, 9, CGAL_LAZY_REP, _)
+
+#undef CGAL_TMAP
+#undef CGAL_PRUNE_TREE
+#undef CGAL_LINIT
+#undef CGAL_LAZY_REP
+#undef CGAL_LN
+#undef CGAL_MLIST
+#undef CGAL_PRINT_DAG_LN
+#undef CGAL_LAZY_REP_PRINT_DAG
+#undef CGAL_LAZY_PRINT_TYPEID
+
+template < typename K1, typename K2 >
+struct Approx_converter
+{
+  typedef K1         Source_kernel;
+  typedef K2         Target_kernel;
+  //typedef Converter  Number_type_converter;
+
+  template < typename T >
+  const typename T::AT&
+  operator()(const T&t) const
+  { return t.approx(); }
+
+  const Null_vector&
+  operator()(const Null_vector& n) const
+  { return n; }
+  
+  const Bbox_2&
+  operator()(const Bbox_2& b) const
+  { return b; }
+  
+  const Bbox_3&
+  operator()(const Bbox_3& b) const
+  { return b; }
+};
+
+template < typename K1, typename K2 >
+struct Exact_converter
+{
+  typedef K1         Source_kernel;
+  typedef K2         Target_kernel;
+  //typedef Converter  Number_type_converter;
+
+  template < typename T >
+  const typename T::ET&
+  operator()(const T&t) const
+  { return t.exact(); }
+
+  const Null_vector&
+  operator()(const Null_vector& n) const
+  { return n; }
+  
+  const Bbox_2&
+  operator()(const Bbox_2& b) const
+  { return b; }
+  
+  const Bbox_3&
+  operator()(const Bbox_3& b) const
+  { return b; }
+};
+
+//____________________________________________________________
+
+
+
+template <typename AC, typename EC, typename E2A, typename L1>
+class Lazy_rep_with_vector_1
+  : public Lazy_rep<std::vector<Object>, std::vector<Object>, E2A>
+  , private EC
+{
+  typedef std::vector<Object> AT;
+  typedef std::vector<Object> ET;
+  typedef Lazy_rep<AT, ET, E2A> Base;
+
+  mutable L1 l1_;
+
+  const EC& ec() const { return *this; }
+
+public:
+
+  void
+  update_exact() const 
+  {
+// TODO : This looks really unfinished...
+    std::vector<Object> vec;
+    this->et = new ET();
+    //this->et->reserve(this->at.size());
+    ec()(CGAL::exact(l1_), std::back_inserter(*(this->et)));
+    if(this->et==NULL)
+    E2A()(*(this->et));
+    this->at = E2A()(*(this->et));
+    // Prune lazy tree
+    l1_ = L1();
+  }
+
+  Lazy_rep_with_vector_1(const AC& ac, const EC& /*ec*/, const L1& l1)
+    : l1_(l1)
+  {
+    ac(CGAL::approx(l1), std::back_inserter(this->at));
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    os << "A Lazy_rep_with_vector_1 of size " <<  this->at.size() << std::endl;
+    if(this->is_lazy()){
+      CGAL::msg(os, level, "DAG with one child node:");
+      CGAL::print_dag(l1_, os, level+1);
+
+    }
+  }
+#endif
+};
+
+
+template <typename AC, typename EC, typename E2A, typename L1, typename L2>
+class Lazy_rep_with_vector_2
+  : public Lazy_rep<std::vector<Object>, std::vector<Object>, E2A>
+  , private EC
+{
+  typedef std::vector<Object> AT;
+  typedef std::vector<Object> ET;
+  typedef Lazy_rep<AT, ET, E2A> Base;
+
+  mutable L1 l1_;
+  mutable L2 l2_;
+
+  const EC& ec() const { return *this; }
+
+public:
+
+  void
+  update_exact() const
+  {
+    this->et = new ET();
+    this->et->reserve(this->at.size());
+    ec()(CGAL::exact(l1_), CGAL::exact(l2_), std::back_inserter(*(this->et)));
+    this->at = E2A()(*(this->et));
+    // Prune lazy tree
+    l1_ = L1();
+    l2_ = L2();
+  }
+
+  Lazy_rep_with_vector_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
+    : l1_(l1), l2_(l2)
+  {
+    ac(CGAL::approx(l1), CGAL::approx(l2), std::back_inserter(this->at));
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    os << "A Lazy_rep_with_vector_2 of size " <<  this->at.size() << std::endl;
+    if(this->is_lazy()){
+      CGAL::msg(os, level, "DAG with two child nodes:");
+      CGAL::print_dag(l1_, os, level+1);
+      CGAL::print_dag(l2_, os, level+1);
+    }
+  }
+#endif
+};
+
+
+template <typename AC, typename EC, typename E2A, typename L1, typename L2, typename R1>
+class Lazy_rep_2_1
+  : public Lazy_rep<typename R1::AT, typename R1::ET, E2A>
+  , private EC
+{
+  typedef typename R1::AT AT;
+  typedef typename R1::ET ET;
+  typedef Lazy_rep<AT, ET, E2A> Base;
+
+  mutable L1 l1_;
+  mutable L2 l2_;
+
+  const EC& ec() const { return *this; }
+
+public:
+
+  void
+  update_exact() const
+  {
+    this->et = new ET();
+    ec()(CGAL::exact(l1_), CGAL::exact(l2_), *(this->et));
+    this->at = E2A()(*(this->et));
+    // Prune lazy tree
+    l1_ = L1();
+    l2_ = L2();
+  }
+
+  Lazy_rep_2_1(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
+    : Lazy_rep<AT,ET,E2A>(), l1_(l1), l2_(l2)
+  {
+    ac(CGAL::approx(l1), CGAL::approx(l2), this->at);
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    os << "A Lazy_rep_2_1" << std::endl;
+    if(this->is_lazy()){
+      CGAL::msg(os, level, "DAG with two child nodes:");
+      CGAL::print_dag(l1_, os, level+1);
+      CGAL::print_dag(l2_, os, level+1);
+    }
+  }
+#endif
+};
+
+
+//____________________________________________________________________________________
+// The following rep class stores two non-const reference parameters of type R1 and R2
+
+template <typename AC, typename EC, typename E2A, typename L1, typename L2, typename R1, typename R2>
+class Lazy_rep_2_2
+  : public Lazy_rep<std::pair<typename R1::AT,typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, E2A>
+  , private EC
+{
+  typedef std::pair<typename R1::AT, typename R2::AT> AT;
+  typedef std::pair<typename R1::ET, typename R2::ET> ET;
+  typedef Lazy_rep<AT, ET, E2A> Base;
+
+  mutable L1 l1_;
+  mutable L2 l2_;
+
+  const EC& ec() const { return *this; }
+
+public:
+
+  void
+  update_exact() const
+  {
+    this->et = new ET();
+    ec()(CGAL::exact(l1_), CGAL::exact(l2_), this->et->first, this->et->second );
+    this->at = E2A()(*(this->et));
+    // Prune lazy tree
+    l1_ = L1();
+    l2_ = L2();
+  }
+
+  Lazy_rep_2_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2)
+    : Lazy_rep<AT,ET,E2A>(), l1_(l1), l2_(l2)
+  {
+    ac(CGAL::approx(l1), CGAL::approx(l2), this->at.first, this->at.second);
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    os << "A Lazy_rep_2_2"  << std::endl;
+    if(this->is_lazy()){
+      CGAL::msg(os, level, "DAG with two child nodes:");
+      CGAL::print_dag(l1_, os, level+1);
+      CGAL::print_dag(l2_, os, level+1);
+    }
+  }
+#endif
+};
+
+
+//____________________________________________________________
+// The handle class
+template <typename AT_, typename ET_, typename EFT, typename E2A>
+class Lazy : public Handle
+{
+public :
+
+  typedef Lazy<AT_, ET_, EFT, E2A>  Self;
+  typedef Lazy_rep<AT_, ET_, E2A>   Self_rep;
+
+  typedef AT_ AT; // undocumented
+  typedef ET_ ET; // undocumented
+
+  typedef AT  Approximate_type;
+  typedef ET  Exact_type;
+
+/*
+  typedef Self Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+*/
+
+  Lazy()
+    : Handle(zero()) {}
+
+  // Before Lazy::zero() used Boost.Thread, the definition of Lazy() was:
+  //   Lazy()
+  //   #ifndef CGAL_HAS_THREAD
+  //     : Handle(zero()) {}
+  //   #else
+  //   {
+  //     PTR = new Lazy_rep_0<AT, ET, E2A>();
+  //   }
+  //   #endif
+
+  Lazy(Self_rep *r)
+  {
+    PTR = r;
+  }
+
+  Lazy(const ET& e)
+  {
+    PTR = new Lazy_rep_0<AT,ET,E2A>(e);
+  }
+
+  const AT& approx() const
+  { return ptr()->approx(); }
+
+  const ET& exact() const
+  { return ptr()->exact(); }
+
+  AT& approx()
+  { return ptr()->approx(); }
+
+  ET& exact()
+  { return ptr()->exact(); }
+
+  unsigned depth() const
+  {
+    return ptr()->depth();
+  }
+
+  void print_dag(std::ostream& os, int level) const
+  {
+    ptr()->print_dag(os, level);
+  }
+
+private:
+
+  // We have a static variable for optimizing the default constructor,
+  // which is in particular heavily used for pruning DAGs.
+  static const Self & zero()
+  {
+    // Note that the new only happens inside an if() inside the macro
+    // So it would be a mistake to put the new before the macro
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(Self,z,(new Lazy_rep_0<AT, ET, E2A>()));
+    return z;
+  }
+
+  Self_rep * ptr() const { return (Self_rep*) PTR; }
+};
+
+// The magic functor for Construct_bbox_[2,3], as there is no Lazy<Bbox>
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_construction_bbox
+{
+  static const bool Protection = true;
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename AC::result_type result_type;
+
+  AC ac;
+  EC ec;
+
+  template <typename L1>
+  result_type operator()(const L1& l1) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
+    Protect_FPU_rounding<Protection> P;
+    try {
+      return ac(CGAL::approx(l1));
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      return ec(CGAL::exact(l1));
+    }
+  }
+};
+
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_construction_nt {
+
+  static const bool Protection = true;
+
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename LK::E2A E2A;
+
+  AC ac;
+  EC ec;
+
+  template<typename>
+  struct result { };
+
+#define CGAL_RESULT_NT(z, n, d)                                              \
+  template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) >              \
+  struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> {                      \
+    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, T)                                   \
+    typedef Lazy_exact_nt<                                              \
+      typename boost::remove_cv< typename boost::remove_reference <     \
+      typename cpp11::result_of<EC( BOOST_PP_ENUM_PARAMS(n, E) )>::type >::type >::type > type; \
+  };
+
+  BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_RESULT_NT, _)
+
+#define CGAL_NT_OPERATOR(z, n, d)                                            \
+  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
+  typename cpp11::result_of<Lazy_construction_nt(BOOST_PP_ENUM_PARAMS(n, L))>::type \
+  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const {                      \
+    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L)                                     \
+    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L)                                     \
+    typedef typename boost::remove_cv< typename boost::remove_reference < \
+                                        typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
+    typedef typename boost::remove_cv< typename boost::remove_reference < \
+                                        typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
+    Protect_FPU_rounding<Protection> P;                                 \
+    try {                                                               \
+      return new Lazy_rep_##n<AT, ET, AC, EC, To_interval<ET>, BOOST_PP_ENUM_PARAMS(n, L) >(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)); \
+    } catch (Uncertain_conversion_exception) {                          \
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
+      return new Lazy_rep_0<AT,ET,To_interval<ET> >(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) )); \
+    }                                                                   \
+  }                                                                     \
+
+  BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_NT_OPERATOR, _)
+
+#undef INTERVAL_OPERATOR
+#undef CGAL_RESULT_NT
+};
+
+
+template <typename LK>
+Object
+make_lazy(const Object& eto)
+{
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename LK::E2A E2A;
+
+  if (eto.is_empty())
+    return Object();
+
+#define CGAL_Kernel_obj(X) \
+  if (const typename EK::X* ptr = object_cast<typename EK::X>(&eto)) \
+    return make_object(typename LK::X(new Lazy_rep_0<typename AK::X, typename EK::X, E2A>(*ptr)));
+
+#include <CGAL/Kernel/interface_macros.h>
+
+//now handle vector
+#define CGAL_Kernel_obj(X) \
+      {  \
+        const std::vector<typename EK::X>* v_ptr;\
+        if ( (v_ptr = object_cast<std::vector<typename EK::X> >(&eto)) ) { \
+          std::vector<typename LK::X> V;\
+          V.resize(v_ptr->size());                           \
+          for (unsigned int i = 0; i < v_ptr->size(); ++i)                \
+            V[i] = typename LK::X( new Lazy_rep_0<typename AK::X,typename EK::X,E2A>((*v_ptr)[i])); \
+          return make_object(V);                                      \
+        }\
+      }
+
+CGAL_Kernel_obj(Point_2)
+CGAL_Kernel_obj(Point_3)  
+#undef CGAL_Kernel_obj
+
+  
+  std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#2)" << std::endl;
+  std::cerr << "dynamic type of the Object : " << eto.type().name() << std::endl;
+
+  return Object();
+}
+
+
+// This functor selects the i'th element in a vector of Object's
+// and casts it to what is in the Object
+
+template <typename T2>
+struct Ith {
+  typedef T2 result_type;
+
+  // We keep a Sign member object
+  // for future utilisation, in case
+  // we have pairs of 2 T2 objects e.g.
+  // for a numeric_point vector returned
+  // from a construction of a possible
+  // lazy algebraic kernel
+
+  int i;
+  Sign sgn;
+
+  Ith(int i_)
+    : i(i_)
+  {sgn=NEGATIVE;}
+
+  Ith(int i_, bool b_)
+    : i(i_)
+  { sgn= (b_) ? POSITIVE : ZERO;}
+
+  const T2&
+  operator()(const std::vector<Object>& v) const
+  {
+    if(sgn==NEGATIVE)
+    return *object_cast<T2>(&v[i]);
+
+    typedef std::pair<T2,unsigned int >         Pair_type_1;
+    typedef std::pair<T2,std::pair<bool,bool> > Pair_type_2;
+
+    if(const Pair_type_1 *p1 = object_cast<Pair_type_1>(&v[i]))
+    	return p1->first;
+    else if(const Pair_type_2 *p2 = object_cast<Pair_type_2>(&v[i]))
+        return p2->first;
+
+    CGAL_error_msg( " Unexpected encapsulated type ");
+  }
+};
+
+// This functor selects the i'th element in a vector of T2's
+template <typename T2>
+struct Ith_for_intersection {
+  typedef T2 result_type;
+  int i;
+
+  Ith_for_intersection(int i_)
+    : i(i_)
+  {}
+
+  const T2&
+  operator()(const Object& o) const
+  {
+    const std::vector<T2>* ptr = object_cast<std::vector<T2> >(&o);
+    return (*ptr)[i];
+  }
+};
+
+// This functor selects the i'th element in a vector of T2's
+template <typename T2>
+struct Ith_for_intersection_with_variant {
+  typedef T2 result_type;
+  int i;
+
+  Ith_for_intersection_with_variant(int i_)
+    : i(i_)
+  {}
+
+  template< BOOST_VARIANT_ENUM_PARAMS(typename U) >
+  const T2&
+  operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const
+  {
+    const std::vector<T2>* ptr = (boost::get<std::vector<T2> >(&(*o)));
+    return (*ptr)[i];
+  }
+
+  template< BOOST_VARIANT_ENUM_PARAMS(typename U) >
+  const T2&
+  operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >& o) const
+  {
+    const std::vector<T2>* ptr = (boost::get<std::vector<T2> >(&o));
+    return (*ptr)[i];
+  }
+};
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_cartesian_const_iterator_2
+{
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename LK::Cartesian_const_iterator_2 result_type;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  template < typename L1>
+  result_type
+  operator()(const L1& l1) const
+  {
+    return result_type(&l1);
+  }
+
+  template < typename L1>
+  result_type
+  operator()(const L1& l1, int) const
+  {
+    return result_type(&l1,2);
+  }
+
+};
+
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_cartesian_const_iterator_3
+{
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename LK::Cartesian_const_iterator_3 result_type;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  template < typename L1>
+  result_type
+  operator()(const L1& l1) const
+  {
+    return result_type(&l1);
+  }
+
+  template < typename L1>
+  result_type
+  operator()(const L1& l1, int) const
+  {
+    return result_type(&l1,3);
+  }
+
+};
+
+
+// This is the magic functor for functors that write their result in a  reference argument
+// In a first version we assume that the references are of type Lazy<Something>,
+// and that the result type is void
+
+template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
+struct Lazy_functor_2_1
+{
+  static const bool Protection = true;
+  typedef void result_type;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  template <typename L1, typename L2, typename R1>
+  void
+  operator()(const L1& l1, const L2& l2, R1& r1) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      // we suppose that R1 is a Lazy<Something>
+      r1 = R1(new Lazy_rep_2_1<AC, EC, E2A, L1, L2, R1>(ac, ec, l1, l2));
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      typename R1::ET et;
+      ec(CGAL::exact(l1), CGAL::exact(l2), et);
+      r1 = R1(new Lazy_rep_0<typename R1::AT,typename R1::ET,E2A>(et));
+    }
+  }
+};
+
+
+template <typename T>
+struct First
+{
+   typedef typename T::first_type result_type;
+
+   const typename T::first_type&
+   operator()(const T& p) const
+   {
+     return p.first;
+   }
+ };
+
+template <typename T>
+struct Second
+{
+  typedef typename T::second_type result_type;
+
+  const typename T::second_type&
+  operator()(const T& p) const
+  {
+    return p.second;
+  }
+};
+
+// This is the magic functor for functors that write their result in a reference argument
+// In a first version we assume that the references are of type Lazy<Something>,
+// and that the result type is void
+
+//template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
+template <typename LK, typename AC, typename EC>
+struct Lazy_functor_2_2
+{
+  static const bool Protection = true;
+
+  typedef void result_type;
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename EK::FT EFT;
+  typedef typename LK::E2A E2A;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  template <typename L1, typename L2, typename R1, typename R2>
+  void
+  operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const
+  {
+    typedef Lazy<typename R1::AT, typename R1::ET, EFT, E2A> Handle_1;
+    typedef Lazy<typename R2::AT, typename R2::ET, EFT, E2A> Handle_2;
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      typedef Lazy<std::pair<typename R1::AT, typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, EFT, E2A> Lazy_pair;
+      Lazy_pair lv(new Lazy_rep_2_2<AC, EC, E2A, L1, L2, R1, R2>(ac, ec, l1, l2));
+      // lv->approx() is a std::pair<R1::AT, R2::AT>;
+      r1 = R1(Handle_1(new Lazy_rep_1<void, void, First<std::pair<typename R1::AT, typename R2::AT> >, First<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(First<std::pair<typename R1::AT, typename R2::AT> >(), First<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
+      r2 = R2(Handle_2(new Lazy_rep_1<void, void, Second<std::pair<typename R1::AT, typename R2::AT> >, Second<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(Second<std::pair<typename R1::AT, typename R2::AT> >(), Second<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      typename R1::ET et1, et2;
+      ec(CGAL::exact(l1), CGAL::exact(l2), et1, et2);
+      r1 = R1(Handle_1(new Lazy_rep_0<typename R1::AT,typename R1::ET,E2A>(et1)));
+      r2 = R2(Handle_2(new Lazy_rep_0<typename R2::AT,typename R2::ET,E2A>(et2)));
+    }
+  }
+};
+
+
+// This is the magic functor for functors that write their result as Objects into an output iterator
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_intersect_with_iterators
+{
+  static const bool Protection = true;
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename EK::FT EFT;
+  typedef typename LK::E2A E2A;
+  typedef void result_type;
+  typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
+  typedef Lazy<std::vector<Object>, std::vector<Object>, EFT, E2A> Lazy_vector;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  // In the example we intersect two Lazy<Segment>s
+  // and write into a back_inserter(list<Object([Lazy<Point>,Lazy<Segment>]) >)
+  template <typename L1, typename L2, typename OutputIterator>
+  OutputIterator
+  operator()(const L1& l1, const L2& l2, OutputIterator it) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      Lazy_vector lv(new Lazy_rep_with_vector_2<AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
+      // lv.approx() is a std::vector<Object([AK::Point_2,AK::Segment_2])>
+      // that is, when we get here we have constructed all approximate results
+      for (unsigned int i = 0; i < lv.approx().size(); i++) {
+// FIXME : I'm not sure how this work...
+#define CGAL_Kernel_obj(X) if (object_cast<typename AK::X>(& (lv.approx()[i]))) { \
+	  *it++ = make_object(typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith<typename AK::X>, \
+                                                                      Ith<typename EK::X>, E2A, Lazy_vector> \
+                                                 (Ith<typename AK::X>(i), Ith<typename EK::X>(i), lv))); \
+          continue; \
+	}
+
+#include <CGAL/Kernel/interface_macros.h>
+
+        std::cerr << "we need  more casts" << std::endl;
+      }
+
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      // TODO: Instead of using a vector, write an iterator adapter
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      std::vector<Object> exact_objects;
+      ec(CGAL::exact(l1), CGAL::exact(l2), std::back_inserter(exact_objects));
+      for (std::vector<Object>::const_iterator oit = exact_objects.begin();
+	   oit != exact_objects.end();
+	   ++oit){
+	*it++ = make_lazy<LK>(*oit);
+      }
+    }
+    return it;
+  }
+};
+
+
+template <typename T>
+struct Object_cast
+{
+  typedef T result_type;
+
+  const T&
+  operator()(const Object& o) const
+  {
+    return *object_cast<T>(&o);
+  }
+};
+
+// The following functor returns an Object with a Lazy<Something> inside
+// As the nested kernels return Objects of AK::Something and EK::Something
+// we have to unwrap them from the Object, and wrap them in a Lazy<Something>
+//
+// TODO: write operators for other than two arguments. For the current kernel we only need two for Intersect_2
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_construction_object
+{
+  static const bool Protection = true;
+
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename EK::FT EFT;
+  typedef typename LK::E2A E2A;
+  typedef typename AC::result_type AT;
+  typedef typename EC::result_type ET;
+  typedef Object result_type;
+
+  typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
+
+  AC ac;
+  EC ec;
+
+public:
+
+  template <typename L1>
+  result_type
+  operator()(const L1& l1) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      Lazy_object lo(new Lazy_rep_1<result_type, result_type, AC, EC, E2A, L1>(ac, ec, l1));
+
+      if(lo.approx().is_empty())
+        return Object();
+
+#define CGAL_Kernel_obj(X) \
+      if (object_cast<typename AK::X>(& (lo.approx()))) { \
+	typedef Lazy_rep_1< typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
+	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
+	return make_object(typename LK::X(lcr)); \
+      }
+
+#include <CGAL/Kernel/interface_macros.h>
+
+      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
+      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
+
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      ET eto = ec(CGAL::exact(l1));
+      return make_lazy<LK>(eto);
+    }
+    return Object();
+  }
+
+  template <typename L1, typename L2>
+  result_type
+  operator()(const L1& l1, const L2& l2) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      Lazy_object lo(new Lazy_rep_2<result_type, result_type, AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
+
+      if(lo.approx().is_empty())
+        return Object();
+
+#define CGAL_Kernel_obj(X) \
+      if (object_cast<typename AK::X>(& (lo.approx()))) { \
+	typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
+	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
+	return make_object(typename LK::X(lcr)); \
+      }
+
+#include <CGAL/Kernel/interface_macros.h>
+
+    // We now check vector<X>
+  
+#define CGAL_Kernel_obj(X) \
+      {  \
+        const std::vector<typename AK::X>* v_ptr;\
+        if ( (v_ptr = object_cast<std::vector<typename AK::X> >(& (lo.approx()))) ) { \
+          std::vector<typename LK::X> V;\
+          V.resize(v_ptr->size());                           \
+          for (unsigned int i = 0; i < v_ptr->size(); i++) {               \
+            V[i] = typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith_for_intersection<typename AK::X>, \
+                                                 Ith_for_intersection<typename EK::X>, E2A, Lazy_object> \
+                                  (Ith_for_intersection<typename AK::X>(i), Ith_for_intersection<typename EK::X>(i), lo)); \
+          }                                                           \
+          return make_object(V);                                      \
+        }\
+      }
+
+CGAL_Kernel_obj(Point_2)
+CGAL_Kernel_obj(Point_3)  
+#undef CGAL_Kernel_obj
+
+      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
+      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
+
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      ET eto = ec(CGAL::exact(l1), CGAL::exact(l2));
+      return make_lazy<LK>(eto);
+    }
+    return Object();
+  }
+
+  template <typename L1, typename L2, typename L3>
+  result_type
+  operator()(const L1& l1, const L2& l2, const L3& l3) const
+  {
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      Lazy_object lo(new Lazy_rep_3<result_type, result_type, AC, EC, E2A, L1, L2, L3>(ac, ec, l1, l2, l3));
+
+      if(lo.approx().is_empty())
+        return Object();
+
+#define CGAL_Kernel_obj(X) \
+      if (object_cast<typename AK::X>(& (lo.approx()))) { \
+	typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
+	Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
+	return make_object(typename LK::X(lcr)); \
+      }
+
+#include <CGAL/Kernel/interface_macros.h>
+
+      std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl;
+      std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl;
+
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+      ET eto = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3));
+      return make_lazy<LK>(eto);
+    }
+    return Object();
+  }
+
+};
+
+
+
+//____________________________________________________________
+// The magic functor that has Lazy<Something> as result type.
+// Two versions are distinguished: one that needs to fiddle 
+// with result_of and another that can forward the result types.
+
+namespace internal {
+BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
+
+// lift boost::get into a functor with a result_type member name and
+// extend it to operate on optionals
+
+// TODO there is a mismatch between the result_type typedef and the
+// actual return type of operator()
+template<typename T>
+struct Variant_cast {
+  typedef T result_type;
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename U)>
+  const T&
+  operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const {
+    // can throw but should never because we always build it inside
+    // a static visitor with the right type
+    return boost::get<T>(*o);
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename U)>
+  T&
+  operator()(boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const {
+    // can throw but should never because we always build it inside
+    // a static visitor with the right type, if it throws bad_get 
+    return boost::get<T>(*o);
+  }
+};
+
+
+template<typename Result, typename AK, typename LK, typename EK, typename Origin>
+struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> {
+  Fill_lazy_variant_visitor_2(Result& r, Origin& o) : r(&r), o(&o) {}
+  Result* r;
+  Origin* o;
+    
+  template<typename T>
+  void operator()(const T&) {
+    // the equivalent type we are currently matching in the lazy kernel
+    typedef T AKT;
+    typedef typename Type_mapper<AKT, AK, EK>::type EKT;
+    typedef typename Type_mapper<AKT, AK, LK>::type LKT;
+
+    typedef Lazy_rep_1<AKT, EKT, Variant_cast<AKT>, Variant_cast<EKT>, typename LK::E2A, Origin> Lcr;
+    Lcr * lcr = new Lcr(Variant_cast<AKT>(), Variant_cast<EKT>(), *o);
+      
+    *r = LKT(lcr);
+  }
+    
+  template<typename T>
+  void operator()(const std::vector<T>& t) {
+    typedef T AKT;
+    typedef typename Type_mapper<AKT, AK, EK>::type EKT;
+    typedef typename Type_mapper<AKT, AK, LK>::type LKT; 
+
+    std::vector<LKT> V;
+    V.resize(t.size()); 
+    for (unsigned int i = 0; i < t.size(); i++) {
+      V[i] = LKT(new Lazy_rep_1<AKT, EKT, Ith_for_intersection<AKT>,
+                 Ith_for_intersection<EKT>, typename LK::E2A, Origin>
+                 (Ith_for_intersection<AKT>(i), Ith_for_intersection<EKT>(i), *o));
+    }
+      
+    *r = V;
+  }
+};
+
+template<typename Result, typename AK, typename LK, typename EK>
+struct Fill_lazy_variant_visitor_0 : boost::static_visitor<> {
+  Fill_lazy_variant_visitor_0(Result& r) : r(&r) {}
+  Result* r;
+    
+  template<typename T>
+  void operator()(const T& t) {
+    // the equivalent type we are currently matching in the lazy kernel
+    typedef T EKT;
+    typedef typename Type_mapper<EKT, EK, AK>::type AKT;
+    typedef typename Type_mapper<EKT, EK, LK>::type LKT;
+      
+    *r = LKT(new Lazy_rep_0<AKT, EKT, typename LK::E2A>(t));
+  }
+
+  template<typename T>
+  void operator()(const std::vector<T>& t) {
+    typedef T EKT;
+    typedef typename Type_mapper<EKT, EK, AK>::type AKT;
+    typedef typename Type_mapper<EKT, EK, LK>::type LKT;
+
+    std::vector<LKT> V;
+    V.resize(t.size()); 
+    for (unsigned int i = 0; i < t.size(); i++) {
+      V[i] = LKT(new Lazy_rep_0<AKT, EKT, typename LK::E2A>(t[i]));
+    }
+      
+    *r = V;
+  }
+};
+
+} // internal
+
+template <typename LK, typename AC, typename EC>
+struct Lazy_construction_variant {
+  static const bool Protection = true;
+
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename EK::FT EFT;
+  typedef typename LK::E2A E2A;
+
+
+  template<typename>
+  struct result {
+    // this does not default, if you want to make a lazy lazy-kernel,
+    // you are on your own
+  };
+
+  #define CGAL_RESULT(z, n, d) \
+    template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) >            \
+    struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> {                    \
+      BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T)                            \
+      typedef typename Type_mapper<                                     \
+        typename cpp11::result_of<AC( BOOST_PP_ENUM_PARAMS(n, A) )>::type, AK, LK>::type type; \
+    };
+
+  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
+
+  template <typename L1, typename L2>
+  typename result<Lazy_construction_variant(L1, L2)>::type
+  operator()(const L1& l1, const L2& l2) const {
+    typedef typename cpp11::result_of<Lazy_construction_variant(L1, L2)>::type result_type;
+    
+    typedef typename cpp11::result_of<AC(typename Type_mapper<L1, LK, AK>::type, 
+                                         typename Type_mapper<L2, LK, AK>::type)>::type AT;
+    typedef typename cpp11::result_of<EC(typename Type_mapper<L1, LK, EK>::type, 
+                                         typename Type_mapper<L2, LK, EK>::type)>::type ET;
+    
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+
+    try {
+      Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_2<AT, ET, AC, EC, E2A, L1, L2>(AC(), EC(), l1, l2));
+
+      // the approximate result requires the trait with types from the AK 
+      AT approx_v = lazy.approx();
+      // the result we build
+      result_type res;
+
+      if(!approx_v) {
+        // empty
+        return res;
+      }
+
+      // the static visitor fills the result_type with the correct unwrapped type
+      internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
+      boost::apply_visitor(visitor, *approx_v);
+      
+      return res;
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+
+      ET exact_v = EC()(CGAL::exact(l1), CGAL::exact(l2));
+      result_type res;
+
+      if(!exact_v) {
+        return res;
+      }
+
+      internal::Fill_lazy_variant_visitor_0<result_type, AK, LK, EK> visitor(res);
+      boost::apply_visitor(visitor, *exact_v);
+      return res;
+    }
+  }
+
+  template <typename L1, typename L2, typename L3>
+  typename result<Lazy_construction_variant(L1, L2, L3)>::type
+  operator()(const L1& l1, const L2& l2, const L3& l3) const {
+    typedef typename result<Lazy_construction_variant(L1, L2, L3)>::type result_type;
+    
+    typedef typename cpp11::result_of<AC(typename Type_mapper<L1, LK, AK>::type, 
+                                         typename Type_mapper<L2, LK, AK>::type,
+                                         typename Type_mapper<L3, LK, AK>::type)>::type AT;
+    typedef typename cpp11::result_of<EC(typename Type_mapper<L1, LK, EK>::type, 
+                                         typename Type_mapper<L2, LK, EK>::type,
+                                         typename Type_mapper<L3, LK, EK>::type)>::type ET;
+
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+    Protect_FPU_rounding<Protection> P;
+    try {
+      Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_3<AT, ET, AC, EC, E2A, L1, L2, L3>(AC(), EC(), l1, l2, l3));
+
+      // the approximate result requires the trait with types from the AK 
+      AT approx_v = lazy.approx();
+      // the result we build
+      result_type res;
+
+      if(!approx_v) {
+        // empty
+        return res;
+      }
+
+      // the static visitor fills the result_type with the correct unwrapped type
+      internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
+      boost::apply_visitor(visitor, *approx_v);
+      
+      return res;
+    } catch (Uncertain_conversion_exception) {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
+
+      ET exact_v = EC()(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3));
+      result_type res;
+
+      if(!exact_v) {
+        return res;
+      }
+
+      internal::Fill_lazy_variant_visitor_0< result_type, AK, LK, EK> visitor(res);
+      boost::apply_visitor(visitor, *exact_v);
+      return res;
+    }
+  }
+};
+
+template<typename LK, typename AC, typename EC, typename E2A = Default, 
+         bool has_result_type = internal::has_result_type<AC>::value && internal::has_result_type<EC>::value >
+struct Lazy_construction;
+
+
+// we have a result type, low effort
+template<typename LK, typename AC, typename EC, typename E2A_>
+struct Lazy_construction<LK, AC, EC, E2A_, true> {
+  static const bool Protection = true;
+
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename boost::remove_cv< 
+    typename boost::remove_reference < typename AC::result_type >::type >::type AT;
+  typedef typename boost::remove_cv< 
+    typename boost::remove_reference < typename EC::result_type >::type >::type  ET;
+
+  typedef typename EK::FT EFT;
+  typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
+  
+  typedef typename Type_mapper<AT, AK, LK>::type result_type;
+
+  AC ac;
+  EC ec;
+
+#define CGAL_CONSTRUCTION_OPERATOR(z, n, d  )                           \
+  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
+  result_type                                                           \
+  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const {                 \
+    typedef Lazy< AT, ET, EFT, E2A> Handle;                             \
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
+    Protect_FPU_rounding<Protection> P;                                 \
+    try {                                                               \
+      return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
+    } catch (Uncertain_conversion_exception) {                          \
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
+      return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
+    }                                                                   \
+  }        
+
+  // arity 1-8 
+  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
+
+  // nullary
+  result_type
+  operator()() const
+  {
+    typedef Lazy<AT, ET, EFT, E2A> Handle;
+    return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
+  }
+
+#undef CGAL_CONSTRUCTION_OPERATOR
+  
+};
+
+
+template <typename LK, typename AC, typename EC, typename E2A_>
+struct Lazy_construction<LK, AC, EC, E2A_, false>
+{
+  static const bool Protection = true;
+
+  typedef typename LK::Approximate_kernel AK;
+  typedef typename LK::Exact_kernel EK;
+  typedef typename EK::FT EFT;
+  typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
+
+  template<typename>
+  struct result {
+    // this does not default, if you want to make a lazy lazy-kernel,
+    // you are on your own
+  };
+
+  AC ac;
+  EC ec;
+
+  // acquire the result_type of the approximate kernel, map it back to the lazy kernel object
+#define CGAL_RESULT(z, n, d) \
+template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) > \
+struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
+  BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T)                                     \
+  typedef typename Type_mapper< typename cpp11::result_of<AC( BOOST_PP_ENUM_PARAMS(n, A) )>::type, AK, LK>::type type; \
+};
+
+  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
+
+#define CGAL_CONSTRUCTION_OPERATOR(z, n, d)                                      \
+  template<BOOST_PP_ENUM_PARAMS(n, class L)>                            \
+  typename cpp11::result_of<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type \
+  operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) {                            \
+    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L)                                     \
+    BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L)                                     \
+    typedef typename boost::remove_cv< typename boost::remove_reference < \
+                                        typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
+    typedef typename boost::remove_cv< typename boost::remove_reference < \
+                                        typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
+    typedef Lazy< AT, ET, EFT, E2A> Handle; \
+    typedef typename cpp11::result_of<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type result_type; \
+    CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
+    Protect_FPU_rounding<Protection> P;                                   \
+    try {                                                                 \
+      return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
+    } catch (Uncertain_conversion_exception) {                          \
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);                                 \
+      Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);          \
+      return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
+    }                                                                   \
+  }        
+
+  // arity 1-8 
+  BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
+
+  // nullary
+  typename Type_mapper< typename cpp11::result_of<AC()>::type ,AK, LK>::type
+  operator()() const
+  {
+    typedef typename cpp11::result_of<AC()>::type AT;
+    typedef typename cpp11::result_of<EC()>::type ET;
+    typedef Lazy<AT, ET, EFT, E2A> Handle;
+    typedef typename Type_mapper< typename cpp11::result_of<AC()>::type ,AK, LK>::type result_type;
+
+    return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
+  }
+};
+
+} //namespace CGAL
+
+#undef CGAL_TYPEMAP_AC
+#undef CGAL_TYPEMAP_EC
+#undef CGAL_LEXACT
+#undef CGAL_LARGS
+
+
+#endif // CGAL_LAZY_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Lazy_exact_nt.h b/3rdparty/CGAL-4.8/include/CGAL/Lazy_exact_nt.h
new file mode 100644
index 0000000..4c0678a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Lazy_exact_nt.h
@@ -0,0 +1,1447 @@
+// Copyright (c) 1999-2007  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_LAZY_EXACT_NT_H
+#define CGAL_LAZY_EXACT_NT_H
+
+#define CGAL_int(T)    typename First_if_different<int,    T>::Type
+#define CGAL_double(T) typename First_if_different<double, T>::Type
+#define CGAL_To_interval(T) To_interval<T>
+
+
+#include <CGAL/number_type_basic.h>
+#include <CGAL/assertions.h>
+
+#include <boost/iterator/transform_iterator.hpp> // for Root_of functor
+#include <boost/operators.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/logical.hpp>
+
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Handle.h>
+#include <CGAL/NT_converter.h>
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/Lazy.h>
+
+#include <CGAL/Sqrt_extension_fwd.h>
+#include <CGAL/Kernel/mpl.h>
+
+#include <CGAL/IO/io.h>
+
+
+/*
+ * This file contains the definition of the number type Lazy_exact_nt<ET>,
+ * where ET is an exact number type (must provide the exact operations needed).
+ *
+ * Lazy_exact_nt<ET> provides a DAG-based lazy evaluation, like LEDA's real,
+ * Core's Expr, LEA's lazy rationals...
+ *
+ * The values are first approximated using Interval_base.
+ * The exactness is provided when needed by ET.
+ *
+ * Lazy_exact_nt<ET> is just a handle to the abstract base class
+ * Lazy_exact_nt_rep which has pure virtual methods .approx() and .exact().
+ * From this class derives one class per operation, with one constructor.
+ *
+ * The DAG is managed by :
+ * - Handle and Rep.
+ * - virtual functions to denote the various operators (instead of an enum).
+ *
+ * Other packages with vaguely similar design : APU, MetaCGAL, LOOK.
+ */
+
+/*
+ * TODO :
+ * - Generalize it for constructions at the kernel level.
+ * - Add mixed operations with ET too ?
+ * - Interval refinement functionnality ?
+ * - Separate the handle and the representation(s) in 2 files (?)
+ *   maybe not a good idea, better if everything related to one operation is
+ *   close together.
+ * - Add a CT template parameter ?
+ * - Add a string constant to provide an expression string (a la MetaCGAL) ?
+ *   // virtual ostream operator<<() const = 0; // or string, like Core ?
+ * - Have a template-expression (?) thing that evaluates a temporary element,
+ *   and allocates stuff in memory only when really needs to convert to the
+ *   NT.  (cf gmp++, and maybe other things, Blitz++, Synaps...)
+ */
+
+/*
+ * Interface of the rep classes:
+ * - .approx()      returns Interval_nt<> (assumes rounding=nearest).
+ *                  [ only called from the handle, and declared in the base ]
+ * - .exact()       returns ET, if not already done, computes recursively
+ *
+ * - .rafine_approx()   ??
+ */
+
+namespace CGAL {
+
+template <class NT> class Lazy_exact_nt;
+
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+template <typename ET>
+inline
+void
+print_dag(const Lazy_exact_nt<ET>& l, std::ostream& os, int level=0)
+{
+  l.print_dag(os, level);
+}
+#endif
+
+// Abstract base representation class for lazy numbers
+template <typename ET>
+struct Lazy_exact_nt_rep : public Lazy_exact_nt<ET>::Self_rep
+{
+  typedef typename Lazy_exact_nt<ET>::Self_rep  Base;
+
+  Lazy_exact_nt_rep (const Interval_nt<false> & i)
+      : Base(i) {}
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+  }
+#endif
+};
+
+// int constant
+template <typename ET>
+struct Lazy_exact_Int_Cst : public Lazy_exact_nt_rep<ET>
+{
+  Lazy_exact_Int_Cst (int i)
+      : Lazy_exact_nt_rep<ET>(double(i)) {}
+
+  void update_exact() const { this->et = new ET((int)this->approx().inf()); }
+};
+
+// double constant
+template <typename ET, typename X>
+struct Lazy_exact_Cst : public Lazy_exact_nt_rep<ET>
+{
+  Lazy_exact_Cst (X x)
+      : Lazy_exact_nt_rep<ET>(x), cste(x) {}
+
+  void update_exact() const { this->et = new ET(cste); }
+
+  private:
+  X cste;
+};
+
+// Exact constant
+template <typename ET>
+struct Lazy_exact_Ex_Cst : public Lazy_exact_nt_rep<ET>
+{
+  Lazy_exact_Ex_Cst (const ET & e)
+      : Lazy_exact_nt_rep<ET>(CGAL_NTS to_interval(e))
+  {
+    this->et = new ET(e);
+  }
+
+  void update_exact() const { CGAL_error(); }
+};
+
+// Construction from a Lazy_exact_nt<ET1> (which keeps the lazyness).
+template <typename ET, typename ET1>
+class Lazy_lazy_exact_Cst : public Lazy_exact_nt_rep<ET>
+{
+  mutable Lazy_exact_nt<ET1> l;
+
+public:
+
+  Lazy_lazy_exact_Cst (const Lazy_exact_nt<ET1> &x)
+      : Lazy_exact_nt_rep<ET>(x.approx()), l(x)
+  {
+    this->set_depth(l.depth() + 1);
+  }
+
+  void update_exact() const
+  {
+    this->et = new ET(l.exact());
+    this->at = l.approx();
+    prune_dag();
+  }
+
+  void prune_dag() const { l = Lazy_exact_nt<ET1>(); }
+};
+
+
+// Unary  operations: abs, sqrt, square.
+// Binary operations: +, -, *, /, min, max.
+
+// Base unary operation
+template <typename ET>
+struct Lazy_exact_unary : public Lazy_exact_nt_rep<ET>
+{
+  mutable Lazy_exact_nt<ET> op1;
+
+  Lazy_exact_unary (const Interval_nt<false> &i, const Lazy_exact_nt<ET> &a)
+      : Lazy_exact_nt_rep<ET>(i), op1(a)
+  {
+    this->set_depth(op1.depth() + 1);
+  }
+
+  void prune_dag() const { op1 = Lazy_exact_nt<ET>(); }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    if(this->is_lazy()){
+      msg(os, level, "Unary number operator:");
+      CGAL::print_dag(op1, os, level+1);
+    }
+  }
+#endif
+};
+
+// Base binary operation
+template <typename ET, typename ET1 = ET, typename ET2 = ET>
+struct Lazy_exact_binary : public Lazy_exact_nt_rep<ET>
+{
+  mutable Lazy_exact_nt<ET1> op1;
+  mutable Lazy_exact_nt<ET2> op2;
+
+  Lazy_exact_binary (const Interval_nt<false> &i,
+		     const Lazy_exact_nt<ET1> &a, const Lazy_exact_nt<ET2> &b)
+      : Lazy_exact_nt_rep<ET>(i), op1(a), op2(b)
+  {
+    this->set_depth((std::max)(op1.depth(), op2.depth()) + 1);
+  }
+
+  void prune_dag() const
+  {
+    op1 = Lazy_exact_nt<ET1>();
+    op2 = Lazy_exact_nt<ET2>();
+  }
+
+#ifdef CGAL_LAZY_KERNEL_DEBUG
+  void
+  print_dag(std::ostream& os, int level) const
+  {
+    this->print_at_et(os, level);
+    if(this->is_lazy()){
+      msg(os, level, "Binary number operator:");
+      CGAL::print_dag(op1, os, level+1);
+      CGAL::print_dag(op2, os, level+1);
+    }
+  }
+#endif
+};
+
+// Here we could use a template class for all operations (STL provides
+// function objects plus, minus, multiplies, divides...).  But it would require
+// a template template parameter, and GCC 2.95 seems to crash easily with them.
+
+// Macro for unary operations
+#define CGAL_LAZY_UNARY_OP(OP, NAME)                                     \
+template <typename ET>                                                   \
+struct NAME : public Lazy_exact_unary<ET>                                \
+{                                                                        \
+  typedef typename Lazy_exact_unary<ET>::AT::Protector P;                \
+  NAME (const Lazy_exact_nt<ET> &a)                                      \
+      : Lazy_exact_unary<ET>((P(), OP(a.approx())), a) {}                \
+                                                                         \
+  void update_exact() const                                              \
+  {                                                                      \
+    this->et = new ET(OP(this->op1.exact()));                            \
+    if (!this->approx().is_point())                                      \
+      this->at = CGAL_NTS to_interval(*(this->et));                      \
+    this->prune_dag();                                                   \
+   }                                                                     \
+};
+
+CGAL_LAZY_UNARY_OP(opposite,  Lazy_exact_Opp)
+CGAL_LAZY_UNARY_OP(CGAL_NTS abs,    Lazy_exact_Abs)
+CGAL_LAZY_UNARY_OP(CGAL_NTS square, Lazy_exact_Square)
+CGAL_LAZY_UNARY_OP(CGAL_NTS sqrt,   Lazy_exact_Sqrt)
+
+// A macro for +, -, * and /
+#define CGAL_LAZY_BINARY_OP(OP, NAME)                                    \
+template <typename ET, typename ET1 = ET, typename ET2 = ET>             \
+struct NAME : public Lazy_exact_binary<ET, ET1, ET2>                     \
+{                                                                        \
+  typedef typename Lazy_exact_binary<ET,ET1,ET2>::AT::Protector P;	 \
+  NAME (const Lazy_exact_nt<ET1> &a, const Lazy_exact_nt<ET2> &b)        \
+    : Lazy_exact_binary<ET, ET1, ET2>((P(), a.approx() OP b.approx()), a, b) {} \
+                                                                         \
+  void update_exact() const                                              \
+  {                                                                      \
+    this->et = new ET(this->op1.exact() OP this->op2.exact());           \
+    if (!this->approx().is_point())                                      \
+      this->at = CGAL_NTS to_interval(*(this->et));                      \
+    this->prune_dag();                                                   \
+   }                                                                     \
+};
+
+CGAL_LAZY_BINARY_OP(+, Lazy_exact_Add)
+CGAL_LAZY_BINARY_OP(-, Lazy_exact_Sub)
+CGAL_LAZY_BINARY_OP(*, Lazy_exact_Mul)
+CGAL_LAZY_BINARY_OP(/, Lazy_exact_Div)
+
+// Minimum
+template <typename ET>
+struct Lazy_exact_Min : public Lazy_exact_binary<ET>
+{
+  Lazy_exact_Min (const Lazy_exact_nt<ET> &a, const Lazy_exact_nt<ET> &b)
+    : Lazy_exact_binary<ET>((CGAL::min)(a.approx(), b.approx()), a, b) {}
+
+  void update_exact() const
+  {
+    this->et = new ET((CGAL::min)(this->op1.exact(), this->op2.exact()));
+    if (!this->approx().is_point()) 
+      this->at = CGAL_NTS to_interval(*(this->et));
+    this->prune_dag();
+  }
+};
+
+// Maximum
+template <typename ET>
+struct Lazy_exact_Max : public Lazy_exact_binary<ET>
+{
+  Lazy_exact_Max (const Lazy_exact_nt<ET> &a, const Lazy_exact_nt<ET> &b)
+    : Lazy_exact_binary<ET>((CGAL::max)(a.approx(), b.approx()), a, b) {}
+
+  void update_exact() const
+  {
+    this->et = new ET((CGAL::max)(this->op1.exact(), this->op2.exact()));
+    if (!this->approx().is_point()) 
+      this->at = CGAL_NTS to_interval(*(this->et));
+    this->prune_dag();
+  }
+};
+
+
+// The real number type, handle class
+template <typename ET_>
+class Lazy_exact_nt
+  : public Lazy<Interval_nt<false>, ET_, Lazy_exact_nt<ET_>, To_interval<ET_> >
+  , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt<ET_>, int >
+  , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt<ET_>, double >
+{
+public:
+
+  typedef Lazy_exact_nt<ET_> Self;
+  typedef Lazy<Interval_nt<false>, ET_, Self, To_interval<ET_> > Base;
+  typedef typename Base::Self_rep  Self_rep;
+
+  typedef typename Base::ET ET; // undocumented
+  typedef typename Base::AT AT; // undocumented
+
+  typedef typename Base::Exact_type        Exact_type;
+  typedef typename Base::Approximate_type  Approximate_type;
+
+public :
+
+  Lazy_exact_nt () {}
+
+  Lazy_exact_nt (Self_rep *r)
+    : Base(r) {}
+
+  // Also check that ET and AT are constructible from T?
+  template<class T>
+  Lazy_exact_nt (T i, typename boost::enable_if<boost::mpl::and_<
+      boost::mpl::or_<boost::is_arithmetic<T>, boost::is_enum<T> >,
+      boost::mpl::not_<boost::is_same<T,ET> > >,void*>::type=0)
+    : Base(new Lazy_exact_Cst<ET,T>(i)) {}
+
+  Lazy_exact_nt (const ET & e)
+    : Base(new Lazy_exact_Ex_Cst<ET>(e)){}
+
+  template <class ET1>
+  Lazy_exact_nt (const Lazy_exact_nt<ET1> &x,
+      typename boost::enable_if<is_implicit_convertible<ET1,ET>,int>::type=0)
+    : Base(new Lazy_lazy_exact_Cst<ET, ET1>(x)){}
+
+  template <class ET1>
+  explicit Lazy_exact_nt (const Lazy_exact_nt<ET1> &x,
+  typename boost::disable_if<is_implicit_convertible<ET1,ET>,int>::type=0)
+    : Base(new Lazy_lazy_exact_Cst<ET, ET1>(x)){}
+
+  Self operator+ () const
+  { return *this; }
+
+  Self operator- () const
+  { return new Lazy_exact_Opp<ET>(*this); }
+
+  Self & operator+=(const Self& b)
+  { return *this = new Lazy_exact_Add<ET>(*this, b); }
+
+  Self & operator-=(const Self& b)
+  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
+
+  Self & operator*=(const Self& b)
+  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
+
+  Self & operator/=(const Self& b)
+  {
+    CGAL_precondition(b != 0);
+    return *this = new Lazy_exact_Div<ET>(*this, b);
+  }
+
+  // Mixed operators. (could be optimized ?)
+  Self & operator+=(CGAL_int(ET) b)
+  { return *this = new Lazy_exact_Add<ET>(*this, b); }
+
+  Self & operator-=(CGAL_int(ET) b)
+  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
+
+  Self & operator*=(CGAL_int(ET) b)
+  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
+
+  Self & operator/=(CGAL_int(ET) b)
+  {
+    CGAL_precondition(b != 0);
+    return *this = new Lazy_exact_Div<ET>(*this, b);
+  }
+
+  Self & operator+=(CGAL_double(ET) b)
+  { return *this = new Lazy_exact_Add<ET>(*this, b); }
+
+  Self & operator-=(CGAL_double(ET) b)
+  { return *this = new Lazy_exact_Sub<ET>(*this, b); }
+
+  Self & operator*=(CGAL_double(ET) b)
+  { return *this = new Lazy_exact_Mul<ET>(*this, b); }
+
+  Self & operator/=(CGAL_double(ET) b)
+  {
+    CGAL_precondition(b != 0);
+    return *this = new Lazy_exact_Div<ET>(*this, b);
+  }
+
+  // % kills filtering
+  Self & operator%=(const Self& b)
+  {
+    CGAL_precondition(b != 0);
+    ET res = this->exact();
+    res %= b.exact();
+    return *this = Lazy_exact_nt<ET>(res);
+  }
+
+  Self & operator%=(int b)
+  {
+    CGAL_precondition(b != 0);
+    ET res = this->exact();
+    res %= b;
+    return *this = Lazy_exact_nt<ET>(res);
+  }
+
+  Interval_nt<true> interval() const
+  {
+    const Interval_nt<false>& i = this->approx();
+    return Interval_nt<true>(i.inf(), i.sup());
+  }
+
+  Interval_nt_advanced approx_adv() const
+  { return this->ptr()->approx(); }
+
+  static const double & get_relative_precision_of_to_double()
+  {
+      return relative_precision_of_to_double;
+  }
+
+  static void set_relative_precision_of_to_double(const double & d)
+  {
+      CGAL_assertion((0 < d) & (d < 1));
+      relative_precision_of_to_double = d;
+  }
+
+  bool identical(const Self& b) const
+  {
+      return ::CGAL::identical(
+              static_cast<const Handle &>(*this),
+              static_cast<const Handle &>(b));
+  }
+
+  template < typename T >
+  bool identical(const T&) const
+  { return false; }
+
+private:
+  static double relative_precision_of_to_double;
+};
+
+
+template <typename ET>
+double Lazy_exact_nt<ET>::relative_precision_of_to_double = 0.00001;
+
+
+template <typename ET1, typename ET2>
+bool
+operator<(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  if (a.identical(b))
+    return false;
+  Uncertain<bool> res = a.approx() < b.approx();
+  if (is_certain(res))
+    return get_certain(res);
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return a.exact() < b.exact();
+}
+
+template <typename ET1, typename ET2>
+bool
+operator==(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  if (a.identical(b))
+    return true;
+  Uncertain<bool> res = a.approx() == b.approx();
+  if (is_certain(res))
+    return get_certain(res);
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return a.exact() == b.exact();
+}
+
+template <typename ET1, typename ET2>
+inline
+bool
+operator>(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{ return b < a; }
+
+template <typename ET1, typename ET2>
+inline
+bool
+operator>=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{ return ! (a < b); }
+
+template <typename ET1, typename ET2>
+inline
+bool
+operator<=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{ return b >= a; }
+
+template <typename ET1, typename ET2>
+inline
+bool
+operator!=(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{ return ! (a == b); }
+
+
+template <typename ET>
+inline
+Lazy_exact_nt<ET>
+operator%(const Lazy_exact_nt<ET>& a, const Lazy_exact_nt<ET>& b)
+{
+  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+  CGAL_precondition(b != 0);
+  return Lazy_exact_nt<ET>(a) %= b;
+}
+
+
+
+// Mixed operators with int.
+template <typename ET>
+bool
+operator<(const Lazy_exact_nt<ET>& a, int b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = a.approx() < b;
+  if (is_certain(res))
+    return res;
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return a.exact() < b;
+}
+
+template <typename ET>
+bool
+operator>(const Lazy_exact_nt<ET>& a, int b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = b < a.approx();
+  if (is_certain(res))
+    return get_certain(res);
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return b < a.exact();
+}
+
+template <typename ET>
+bool
+operator==(const Lazy_exact_nt<ET>& a, int b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = b == a.approx();
+  if (is_certain(res))
+    return get_certain(res);
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return b == a.exact();
+}
+
+
+// Mixed operators with double.
+template <typename ET>
+bool
+operator<(const Lazy_exact_nt<ET>& a, double b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = a.approx() < b;
+  if (is_certain(res))
+    return res;
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return a.exact() < b;
+}
+
+template <typename ET>
+bool
+operator>(const Lazy_exact_nt<ET>& a, double b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = b < a.approx();
+  if (is_certain(res))
+    return res;
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return b < a.exact();
+}
+
+template <typename ET>
+bool
+operator==(const Lazy_exact_nt<ET>& a, double b)
+{
+  CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+  Uncertain<bool> res = b == a.approx();
+  if (is_certain(res))
+    return res;
+  CGAL_BRANCH_PROFILER_BRANCH(tmp);
+  return b == a.exact();
+}
+
+
+
+template <typename ET1, typename ET2>
+Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
+operator+(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+  return new Lazy_exact_Add<typename Coercion_traits<ET1, ET2>::Type,
+                            ET1, ET2>(a, b);
+}
+
+template <typename ET1, typename ET2>
+Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
+operator-(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+  return new Lazy_exact_Sub<typename Coercion_traits<ET1, ET2>::Type,
+                            ET1, ET2>(a, b);
+}
+
+template <typename ET1, typename ET2>
+Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
+operator*(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+  return new Lazy_exact_Mul<typename Coercion_traits<ET1, ET2>::Type,
+                            ET1, ET2>(a, b);
+}
+
+template <typename ET1, typename ET2>
+Lazy_exact_nt< typename Coercion_traits<ET1, ET2>::Type >
+operator/(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
+{
+  CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+  CGAL_precondition(b != 0);
+  return new Lazy_exact_Div<typename Coercion_traits<ET1, ET2>::Type,
+                            ET1, ET2>(a, b);
+}
+
+//
+// Algebraic structure traits
+//
+
+namespace INTERN_LAZY_EXACT_NT {
+
+template< class NT, class Functor >
+struct Simplify_selector {
+  struct Simplify : public std::unary_function<NT&, void> {
+    void operator()( NT& ) const {
+      // TODO: In the old implementation the Simplify-functor was the default
+      //       (which does nothing). But this cannot be the correct way!?
+    }
+  };
+};
+
+template< class NT >
+struct Simplify_selector< NT, Null_functor > {
+  typedef Null_functor Simplify;
+};
+
+template< class NT, class Functor >
+struct Unit_part_selector {
+  struct Unit_part : public std::unary_function<NT, NT > {
+    NT operator()( const NT& x ) const {
+      return NT( CGAL_NTS unit_part( x.exact() ) );
+    }
+  };
+};
+
+template< class NT >
+struct Unit_part_selector< NT, Null_functor > {
+  typedef Null_functor Unit_part;
+};
+
+template< class NT, class Functor >
+struct Is_zero_selector {
+  struct Is_zero : public std::unary_function<NT, bool > {
+    bool operator()( const NT& x ) const {
+      return CGAL_NTS is_zero( x.exact() );
+    }
+  };
+};
+
+template< class NT >
+struct Is_zero_selector< NT, Null_functor > {
+  typedef Null_functor Is_zero;
+};
+
+template< class NT, class Functor >
+struct Is_one_selector {
+  struct Is_one : public std::unary_function<NT, bool > {
+    bool operator()( const NT& x ) const {
+      return CGAL_NTS is_one( x.exact() );
+    }
+  };
+};
+
+template< class NT >
+struct Is_one_selector< NT, Null_functor > {
+  typedef Null_functor Is_one;
+};
+
+template< class NT, class Functor >
+struct Square_selector {
+  struct Square : public std::unary_function<NT, NT > {
+    NT operator()( const NT& x ) const {
+      CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+      return new Lazy_exact_Square<typename NT::ET>(x);
+    }
+  };
+};
+
+template< class NT >
+struct Square_selector< NT, Null_functor > {
+  typedef Null_functor Square;
+};
+
+template< class NT, class Functor >
+struct Integral_division_selector {
+  struct Integral_division : public std::binary_function<NT, NT, NT > {
+    NT operator()( const NT& x, const NT& y ) const {
+      return NT( CGAL_NTS integral_division( x.exact(), y.exact() ) );
+    }
+
+    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
+  };
+};
+
+template< class NT >
+struct Integral_division_selector< NT, Null_functor > {
+  typedef Null_functor Integral_division;
+};
+
+template< class NT, class Functor >
+struct Is_square_selector {
+  struct Is_square : public std::binary_function<NT, NT&, bool > {
+      bool operator()( const NT& x, NT& y ) const {
+          typename NT::ET y_et;
+          bool result = CGAL_NTS is_square( x.exact(), y_et );
+          y = NT(y_et);
+          return result;
+      }
+      bool operator()( const NT& x) const {
+          typename NT::ET y_et;
+          return CGAL_NTS is_square( x.exact(), y_et );
+      }
+  };
+};
+
+template< class NT >
+struct Is_square_selector< NT, Null_functor > {
+  typedef Null_functor Is_square;
+};
+
+
+template <class NT, class AlgebraicStructureTag>
+struct Sqrt_selector{
+    struct Sqrt : public std::unary_function<NT, NT > {
+        NT operator ()(const NT& x) const {
+          CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+          CGAL_precondition(x >= 0);
+          return new Lazy_exact_Sqrt<typename NT::ET>(x);
+        }
+    };
+};
+template <class NT>
+struct Sqrt_selector<NT,Null_functor> {
+    typedef Null_functor Sqrt;
+};
+
+template< class NT, class Functor >
+struct Kth_root_selector {
+  struct Kth_root : public std::binary_function<int, NT, NT > {
+    NT operator()( int k, const NT& x ) const {
+      return NT( CGAL_NTS kth_root( k, x.exact() ) );
+    }
+  };
+};
+
+template< class NT >
+struct Kth_root_selector< NT, Null_functor > {
+  typedef Null_functor Kth_root;
+};
+
+template< class NT, class Functor >
+struct Root_of_selector {
+  private:
+      struct Cast{
+        typedef typename NT::ET result_type;
+        result_type operator()(const NT& lazy_exact) const {
+          return lazy_exact.exact();
+        }
+      };
+
+  public:
+    struct Root_of {
+//      typedef typename Functor::Boundary Boundary;
+      typedef NT result_type;
+      template< class Input_iterator >
+      NT operator()( int k, Input_iterator begin, Input_iterator end ) const {
+       Cast cast;
+       return NT( typename Algebraic_structure_traits<typename NT::ET>::
+                                 Root_of()( k,
+                              ::boost::make_transform_iterator( begin, cast ),
+                              ::boost::make_transform_iterator( end, cast ) ) );
+      }
+
+    };
+};
+
+template< class NT >
+struct Root_of_selector< NT, Null_functor > {
+  typedef Null_functor Root_of;
+};
+
+template< class NT, class Functor >
+struct Gcd_selector {
+  struct Gcd : public std::binary_function<NT, NT, NT > {
+    NT operator()( const NT& x, const NT& y ) const {
+     CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+     return NT( CGAL_NTS gcd( x.exact(), y.exact() ) );
+    }
+
+    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
+  };
+};
+
+template< class NT >
+struct Gcd_selector< NT, Null_functor > {
+  typedef Null_functor Gcd;
+};
+
+template< class NT, class Functor >
+struct Div_selector {
+  struct Div : public std::binary_function<NT, NT, NT > {
+    NT operator()( const NT& x, const NT& y ) const {
+      return NT( CGAL_NTS div( x.exact(), y.exact() ) );
+    }
+
+    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
+
+  };
+};
+
+template< class NT >
+struct Div_selector< NT, Null_functor > {
+  typedef Null_functor Div;
+};
+
+template< class NT, class Functor >
+struct Inverse_selector {
+  struct Inverse  {
+    typedef NT result_type;
+    NT operator()( const NT& x ) const {
+      return NT( 1 ) / x ;
+    }
+  };
+};
+
+template< class NT >
+struct Inverse_selector< NT, Null_functor > {
+  typedef Null_functor Inverse;
+};
+
+template< class NT, class Functor >
+struct Mod_selector {
+  struct Mod : public std::binary_function<NT, NT, NT > {
+    NT operator()( const NT& x, const NT& y ) const {
+      return NT( CGAL_NTS mod( x.exact(), y.exact() ) );
+    }
+
+    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( NT )
+
+  };
+};
+
+template< class NT >
+struct Mod_selector< NT, Null_functor > {
+  typedef Null_functor Mod;
+};
+
+template< class NT, class Functor >
+struct Div_mod_selector {
+  struct Div_mod {
+    typedef void result_type;
+    typedef NT   first_argument_type;
+    typedef NT   second_argument_type;
+    typedef NT&  third_argument_type;
+    typedef NT&  fourth_argument_type;
+
+    void operator()( const NT& x, const NT& y, NT& q, NT& r ) const {
+      typename NT::ET q_et;
+      typename NT::ET r_et;
+      CGAL_NTS div_mod( x.exact(), y.exact(), q_et, r_et );
+      q = NT( q_et );
+      r = NT( r_et );
+    }
+
+    template< class NT1, class NT2 >
+    void operator()( const NT1& x, const NT2& y,
+                     NT& q,
+                     NT& r ) const {
+      CGAL_static_assertion((::boost::is_same<
+        typename Coercion_traits< NT1, NT2 >::Type, NT
+                                              >::value));
+
+      typename Coercion_traits< NT1, NT2 >::Cast cast;
+      operator()( cast(x), cast(y), q, r );
+    }
+  };
+};
+
+template< class NT >
+struct Div_mod_selector< NT, Null_functor >{
+  typedef Null_functor Div_mod;
+};
+} // namespace INTERN_LAZY_EXACT_NT
+
+template <class ET>
+class Algebraic_structure_traits< Lazy_exact_nt<ET> >
+    :public Algebraic_structure_traits_base
+      < Lazy_exact_nt<ET>,
+       typename Algebraic_structure_traits<ET>::Algebraic_category >
+{
+private:
+    typedef Algebraic_structure_traits<ET> AST_ET;
+    typedef typename AST_ET::Algebraic_category ET_as_tag;
+public:
+    typedef typename AST_ET::Is_exact               Is_exact;
+    typedef typename AST_ET::Is_numerical_sensitive Is_numerical_sensitive;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Simplify_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Simplify > ::Simplify Simplify;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Unit_part_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Unit_part > ::Unit_part Unit_part;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Is_zero_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Is_zero > ::Is_zero Is_zero;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Is_one_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Is_one > ::Is_one Is_one;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Square_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Square > ::Square Square;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Integral_division_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Integral_division> ::Integral_division Integral_division;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Is_square_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Is_square > ::Is_square Is_square;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Sqrt_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Sqrt> ::Sqrt Sqrt;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Kth_root_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Kth_root > ::Kth_root Kth_root;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Root_of_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Root_of > ::Root_of Root_of;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Gcd_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Gcd > ::Gcd Gcd;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Div_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Div > ::Div Div;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Mod_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Mod > ::Mod Mod;
+
+    typedef typename INTERN_LAZY_EXACT_NT::Div_mod_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Div_mod > ::Div_mod Div_mod;
+    
+    typedef typename INTERN_LAZY_EXACT_NT::Inverse_selector
+    <Lazy_exact_nt<ET>, typename AST_ET::Inverse > ::Inverse Inverse;    
+};
+
+
+
+//
+// Real embeddalbe traits
+//
+
+template < typename ET > class Real_embeddable_traits< Lazy_exact_nt<ET> >
+  : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt<ET> , CGAL::Tag_true > {
+
+  // Every type ET of Lazy_exact_nt<ET> has to be real embeddable.
+  CGAL_static_assertion((::boost::is_same< typename Real_embeddable_traits< ET >
+                                ::Is_real_embeddable, Tag_true >::value));
+
+  public:
+    typedef Lazy_exact_nt<ET> Type;
+
+    class Abs
+      : public std::unary_function< Type, Type > {
+      public:
+        Type operator()( const Type& a ) const {
+            CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+            return new Lazy_exact_Abs<ET>(a);
+        }
+    };
+
+    class Sgn
+      : public std::unary_function< Type, ::CGAL::Sign > {
+      public:
+        ::CGAL::Sign operator()( const Type& a ) const {
+            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+            Uncertain< ::CGAL::Sign> res = CGAL_NTS sign(a.approx());
+            if (is_certain(res))
+                return get_certain(res);
+            CGAL_BRANCH_PROFILER_BRANCH(tmp);
+            return CGAL_NTS sign(a.exact());
+        }
+    };
+
+    class Compare
+      : public std::binary_function< Type, Type,
+                                Comparison_result > {
+      public:
+        Comparison_result operator()( const Type& a,
+                                            const Type& b ) const {
+            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+            if (a.identical(b))
+                return EQUAL;
+            Uncertain<Comparison_result> res = CGAL_NTS compare(a.approx(), b.approx());
+            if (is_certain(res))
+                return get_certain(res);
+            CGAL_BRANCH_PROFILER_BRANCH(tmp);
+            return CGAL_NTS compare(a.exact(), b.exact());
+        }
+
+        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type,
+                                                      Comparison_result )
+
+    };
+
+    class To_double
+      : public std::unary_function< Type, double > {
+      public:
+        double operator()( const Type& a ) const {
+            CGAL_BRANCH_PROFILER(std::string(" failures/calls to   : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
+
+            const Interval_nt<false>& app = a.approx();
+            double r;
+            if (fit_in_double(app, r))
+                return r;
+
+            // If it's precise enough, then OK.
+            if (has_smaller_relative_precision(app,
+                 Lazy_exact_nt<ET>::get_relative_precision_of_to_double()))
+                return CGAL_NTS to_double(app);
+
+            CGAL_BRANCH_PROFILER_BRANCH(tmp);
+
+            // Otherwise we trigger exact computation first,
+            // which will refine the approximation.
+            a.exact();
+            return CGAL_NTS to_double(a.approx());
+        }
+    };
+
+    class To_interval
+      : public std::unary_function< Type, std::pair< double, double > > {
+      public:
+        std::pair<double, double> operator()( const Type& a ) const {
+            CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+            return a.approx().pair();
+        }
+    };
+
+    class Is_finite
+      : public std::unary_function< Type, bool > {
+      public:
+        bool operator()( const Type& x ) const {
+          return CGAL_NTS is_finite(x.approx()) || CGAL_NTS is_finite(x.exact());
+        }
+    };
+
+};
+
+template <class ET1, class ET2, class F>
+class Lazy_exact_nt_coercion_traits_base {
+public:
+    typedef Tag_false Are_explicit_interoperable;
+    typedef Tag_false Are_implicit_interoperable;
+    //typedef Null_type    Type
+    typedef Null_functor Cast;
+};
+
+template <class ET1, class ET2>
+class Lazy_exact_nt_coercion_traits_base < Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2>, Tag_true >
+{
+    typedef Coercion_traits<ET1,ET2> CT;
+    typedef Lazy_exact_nt<ET1> A;
+    typedef Lazy_exact_nt<ET2> B;
+public:
+    typedef Lazy_exact_nt<typename CT::Type> Type;
+    typedef typename CT::Are_implicit_interoperable Are_explicit_interoperable;
+    typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
+
+    class Cast{
+    private:
+        template <class T>
+        Type cast(const T& x) const{ return Type(x); }
+        Type cast(const Type& x) const{ return x; }
+    public:
+        typedef Type result_type;
+        Type operator()(const A& x) const { return cast(x);}
+        Type operator()(const B& x) const { return cast(x);}
+    };
+};
+
+
+CGAL_DEFINE_COERCION_TRAITS_FOR_SELF_TEM(Lazy_exact_nt<ET>, class ET)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO_TEM(ET,Lazy_exact_nt<ET>,class ET)
+
+template<class ET1, class ET2 >
+struct Coercion_traits< Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2> >
+    :public Lazy_exact_nt_coercion_traits_base
+           <Lazy_exact_nt<ET1>, Lazy_exact_nt<ET2>,
+            typename Coercion_traits<ET1,ET2>::Are_implicit_interoperable>{};
+
+
+#define CGAL_COERCION_TRAITS_LAZY_EXACT(NTX)                            \
+    template<class ET>                                                  \
+    struct Coercion_traits< NTX, Lazy_exact_nt<ET> >{                   \
+    private:                                                            \
+        typedef Coercion_traits<NTX,ET> CT;                             \
+        typedef Lazy_exact_nt<ET> NT;                                   \
+    public:                                                             \
+        typedef typename CT::Are_explicit_interoperable                 \
+        Are_explicit_interoperable;                                     \
+        typedef typename CT::Are_implicit_interoperable                 \
+        Are_implicit_interoperable;                                     \
+    private:                                                            \
+        static const  bool interoperable                                \
+        =boost::is_same< Are_implicit_interoperable, Tag_false>::value; \
+    public:                                                             \
+        typedef typename boost::mpl::if_c <interoperable,Null_tag,NT>   \
+        ::type  Type;                                          \
+        typedef typename boost::mpl::if_c <interoperable, Null_functor, \
+    INTERN_CT::Cast_from_to<NTX,NT> >::type Cast;                       \
+    };                                                                  \
+                                                                        \
+    template<class ET>                                                  \
+    struct Coercion_traits< Lazy_exact_nt<ET>, NTX >                    \
+        :public Coercion_traits<NTX, Lazy_exact_nt<ET> >{};             \
+
+
+CGAL_COERCION_TRAITS_LAZY_EXACT(int)
+CGAL_COERCION_TRAITS_LAZY_EXACT(short)
+CGAL_COERCION_TRAITS_LAZY_EXACT(double)
+CGAL_COERCION_TRAITS_LAZY_EXACT(float)
+#undef CGAL_COERCION_TRAITS_LAZY_EXACT
+
+namespace INTERN_LAZY_EXACT_NT {
+
+template < typename NT, typename TAG  > class Fraction_traits_base;
+
+template < class ET >
+class Fraction_traits_base <Lazy_exact_nt<ET> , CGAL::Tag_false>
+    : public Fraction_traits<ET> {
+public:
+    typedef Lazy_exact_nt<ET>  Type;
+};
+
+template < class ET >
+class Fraction_traits_base <Lazy_exact_nt<ET> , CGAL::Tag_true>{
+    typedef Fraction_traits<ET> ETT;
+    typedef typename ETT::Numerator_type ET_numerator;
+    typedef typename ETT::Denominator_type ET_denominator;
+public:
+    typedef Lazy_exact_nt<ET>  Type;
+    typedef Tag_true Is_fraction;
+    typedef Lazy_exact_nt<ET_numerator> Numerator_type;
+    typedef Lazy_exact_nt<ET_denominator> Denominator_type;
+
+    struct Common_factor : std::binary_function<Denominator_type,Denominator_type,Denominator_type>{
+        Denominator_type operator()(const Denominator_type& a, const Denominator_type& b) const {
+            typename ETT::Common_factor common_factor;
+            return Denominator_type(common_factor(a.exact(),b.exact()));
+        }
+    };
+    struct Compose : std::binary_function<Type,Numerator_type,Denominator_type>{
+        Type operator()(const Numerator_type& n, const Denominator_type& d) const {
+            typename ETT::Compose compose;
+            return Type(compose(n.exact(),d.exact()));
+        }
+    };
+    struct Decompose {
+        typedef void result_type;
+        typedef Type first_argument_type;
+        typedef Numerator_type second_argument_type;
+        typedef Denominator_type third_argument_type;
+        void operator()(const Type& f, Numerator_type& n, Denominator_type& d) const {
+            typename ETT::Decompose decompose;
+            ET_numerator nn;
+            ET_denominator dd;
+            decompose(f.exact(),nn,dd);
+            n = Numerator_type(nn);
+            d = Denominator_type(dd);
+        }
+    };
+};
+} // namespace INTERN_LAZY_EXACT_NT
+
+
+template < class ET >
+class Fraction_traits< Lazy_exact_nt< ET > >
+    :public INTERN_LAZY_EXACT_NT::Fraction_traits_base<Lazy_exact_nt<ET>,
+            typename Fraction_traits<ET>::Is_fraction>
+{};
+
+template < class ET >
+struct Min <Lazy_exact_nt<ET> >
+    : public std::binary_function<Lazy_exact_nt<ET>,Lazy_exact_nt<ET>,Lazy_exact_nt<ET> > {
+
+    Lazy_exact_nt<ET> operator()( const Lazy_exact_nt<ET>& x, const Lazy_exact_nt<ET>& y) const
+    {
+      if (x.identical(y)){
+        return x;
+      }
+      Uncertain<bool> res = x.approx() < y.approx();
+      if(is_certain(res)){
+        return res.make_certain() ? x : y;
+      }
+      CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+      return new Lazy_exact_Min<ET>(x, y);
+    }
+};
+
+template < class ET >
+struct Max <Lazy_exact_nt<ET> >
+    : public std::binary_function<Lazy_exact_nt<ET>,Lazy_exact_nt<ET>,Lazy_exact_nt<ET> > {
+
+    Lazy_exact_nt<ET> operator()( const Lazy_exact_nt<ET>& x, const Lazy_exact_nt<ET>& y) const
+    {
+      if (x.identical(y)){
+        return x;
+      }
+      Uncertain<bool> res = x.approx() > y.approx();
+      if(is_certain(res)){
+        return  res.make_certain() ? x : y;
+      }
+        CGAL_PROFILER(std::string("calls to    : ") + std::string(CGAL_PRETTY_FUNCTION));
+        return new Lazy_exact_Max<ET>(x, y);
+    }
+};
+
+template<typename ET> inline 
+Lazy_exact_nt<ET> min BOOST_PREVENT_MACRO_SUBSTITUTION(
+const Lazy_exact_nt<ET> & x,
+const Lazy_exact_nt<ET> & y){
+  return CGAL::Min<Lazy_exact_nt<ET> > ()(x,y);
+}
+template<typename ET> inline 
+Lazy_exact_nt<ET> max BOOST_PREVENT_MACRO_SUBSTITUTION(
+const Lazy_exact_nt<ET> & x,
+const Lazy_exact_nt<ET> & y){
+  return CGAL::Max<Lazy_exact_nt<ET> > ()(x,y);
+}
+
+template <typename ET>
+std::ostream &
+operator<< (std::ostream & os, const Lazy_exact_nt<ET> & a)
+{ return os << CGAL_NTS to_double(a); }
+
+template <typename ET>
+std::istream &
+operator>> (std::istream & is, Lazy_exact_nt<ET> & a)
+{
+  ET e;
+  internal::read_float_or_quotient(is, e);
+  if (is)
+    a = e;
+  return is;
+}
+
+template< class ET >
+class Is_valid< Lazy_exact_nt<ET> >
+  : public std::unary_function< Lazy_exact_nt<ET>, bool > {
+  public :
+    bool operator()( const Lazy_exact_nt<ET>& x ) const {
+      return is_valid(x.approx());
+    }
+};
+
+template < typename ET >
+struct NT_converter < Lazy_exact_nt<ET>, ET >
+{
+  const ET& operator()(const Lazy_exact_nt<ET> &a) const
+  { return a.exact(); }
+};
+
+// Forward declaration to break inclusion cycle
+namespace internal {
+template<class>struct Exact_field_selector;
+template<class>struct Exact_ring_selector;
+}
+// Compiler can deduce ET from the first argument.
+template < typename ET >
+struct NT_converter < Lazy_exact_nt<ET>,
+  typename First_if_different<
+    typename internal::Exact_field_selector<ET>::Type,
+    ET>::Type>
+{
+  typename internal::Exact_field_selector<ET>::Type
+    operator()(const Lazy_exact_nt<ET> &a) const
+  { return NT_converter<ET,typename internal::Exact_field_selector<ET>::Type>()(a.exact()); }
+};
+
+template < typename ET >
+struct NT_converter < Lazy_exact_nt<ET>,
+  typename First_if_different<
+   typename First_if_different<
+    typename internal::Exact_ring_selector<ET>::Type,
+    ET>::Type,
+   typename internal::Exact_field_selector<ET>::Type>::Type>
+{
+  typename internal::Exact_ring_selector<ET>::Type operator()(const Lazy_exact_nt<ET> &a) const
+  { return NT_converter<ET,typename internal::Exact_ring_selector<ET>::Type>()(a.exact()); }
+};
+
+namespace internal {
+// Returns true if the value is representable by a double and to_double()
+// would return it.  False means "don't know" (the exact number type is not
+// queried).
+template < typename ET >
+inline bool
+fit_in_double(const Lazy_exact_nt<ET>& l, double& r)
+{ return fit_in_double(l.approx(), r); }
+
+} // namespace internal
+
+template <class NT_,class ROOT_, class ACDE_TAG_, class FP_TAG>
+void
+print(std::ostream &os, const CGAL::Lazy_exact_nt< Sqrt_extension<NT_,ROOT_,ACDE_TAG_,FP_TAG> > &r)
+{
+  print(os,r.exact());
+}
+
+namespace INTERN_LAZY_EXACT_NT {
+template< typename ET , typename Tag>
+class Modular_traits_base{
+public:
+  typedef Lazy_exact_nt<ET> NT;
+  typedef ::CGAL::Tag_false Is_modularizable;
+  typedef ::CGAL::Null_functor Residue_type;
+  typedef ::CGAL::Null_functor Modular_image;  
+  typedef ::CGAL::Null_functor Modular_image_representative;    
+};
+
+template< typename ET >
+class Modular_traits_base<ET, Tag_true>{
+  typedef Modular_traits<ET> MT_ET;
+public:
+  typedef Lazy_exact_nt<ET> NT;
+  typedef CGAL::Tag_true Is_modularizable;
+  typedef typename MT_ET::Residue_type Residue_type;
+
+  struct Modular_image{
+    Residue_type operator()(const NT& a){
+      typename MT_ET::Modular_image modular_image;
+      return modular_image(a.exact());
+    }
+  };
+  struct Modular_image_representative{
+    NT operator()(const Residue_type& x){
+      typename MT_ET::Modular_image_representative modular_image_representative;
+      return NT(modular_image_representative(x));
+    }
+  };    
+};
+} // namespace INTERN_LAZY_EXACT_NT
+
+template < typename ET > 
+class Modular_traits<Lazy_exact_nt<ET> >
+  :public INTERN_LAZY_EXACT_NT::Modular_traits_base
+<ET,typename Modular_traits<ET>::Is_modularizable>{};
+
+
+#undef CGAL_double
+#undef CGAL_int
+#undef CGAL_To_interval
+
+} //namespace CGAL
+
+namespace Eigen {
+  template<class> struct NumTraits;
+  template<typename ET> struct NumTraits<CGAL::Lazy_exact_nt<ET> >
+  {
+    typedef CGAL::Lazy_exact_nt<ET> Real;
+    // typedef CGAL::Lazy_exact_nt<ET> NonInteger;
+    typedef CGAL::Lazy_exact_nt<typename NumTraits<ET>::NonInteger> NonInteger;
+    typedef CGAL::Lazy_exact_nt<ET> Nested;
+
+    static inline Real epsilon() { return 0; }
+    static inline Real dummy_precision() { return 0; }
+
+    enum {
+      IsInteger = NumTraits<ET>::IsInteger,
+      IsSigned = NumTraits<ET>::IsSigned,
+      IsComplex = NumTraits<ET>::IsComplex,
+      RequireInitialization = 1,
+      ReadCost = 8,
+      AddCost = 30,
+      MulCost = 30
+    };
+  };
+}
+
+#endif // CGAL_LAZY_EXACT_NT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Lazy_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Lazy_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Lazy_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Lazy_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Level_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Level_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Level_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Level_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Lightweight_vector_3.h b/3rdparty/CGAL-4.8/include/CGAL/Lightweight_vector_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Lightweight_vector_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Lightweight_vector_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2.h
new file mode 100644
index 0000000..8f83060
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Line_2.h
@@ -0,0 +1,292 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_LINE_2_H
+#define CGAL_LINE_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Line_2 : public R_::Kernel_base::Line_2
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_2               Point_2;
+  typedef typename R_::Segment_2             Segment_2;
+  typedef typename R_::Ray_2                 Ray_2;
+  typedef typename R_::Vector_2              Vector_2;
+  typedef typename R_::Direction_2           Direction_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+  typedef typename R_::Kernel_base::Line_2   RLine_2;
+
+  typedef Line_2                             Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Line_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef RLine_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Line_2() {}
+
+  Line_2(const RLine_2& l)  // conversion impl -> interface class
+    : RLine_2(l) {}
+
+  Line_2(const Point_2 &p, const Point_2 &q)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,q)) {}
+
+  Line_2(const RT &a, const RT &b, const RT &c)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), a,b,c)) {}
+
+  explicit Line_2(const Segment_2& s)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), s)) {}
+
+  explicit Line_2(const Ray_2& r)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), r)) {}
+
+  Line_2(const Point_2 &p, const Direction_2 &d)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,d)) {}
+
+  Line_2(const Point_2 &p, const Vector_2 &v)
+    : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,v)) {}
+
+
+  // FIXME : Use Qrt<> here.
+  RT a() const
+  {
+    return R().compute_a_2_object()(*this);
+  }
+
+  RT b() const
+  {
+    return R().compute_b_2_object()(*this);
+  }
+
+  RT c() const
+  {
+    return R().compute_c_2_object()(*this);
+  }
+
+  Line_2
+  transform(const Aff_transformation_2 &t) const
+  {
+    return Line_2(t.transform(point(0)),
+		  t.transform(direction()));
+  }
+
+  Line_2
+  opposite() const
+  {
+    return R().construct_opposite_line_2_object()(*this);
+  }
+
+  Direction_2
+  direction() const
+  {
+    return R().construct_direction_2_object()(*this);
+  }
+
+  Vector_2
+  to_vector() const
+  {
+    return R().construct_vector_2_object()(*this);
+  }
+
+  Line_2
+  perpendicular(const Point_2 &p) const
+  {
+    return R().construct_perpendicular_line_2_object()(*this,p);
+  }
+
+  Point_2
+  projection(const Point_2& p) const
+  {
+    return R().construct_projected_point_2_object()(*this,p);
+  }
+
+  typename R::Boolean
+  is_horizontal() const
+  {
+    return R().is_horizontal_2_object()(*this);
+  }
+
+  typename R::Boolean
+  is_vertical() const
+  {
+    return R().is_vertical_2_object()(*this);
+  }
+
+  typename R::Boolean
+  is_degenerate() const
+  { return R().is_degenerate_2_object()(*this); }
+
+  typename R::Oriented_side
+  oriented_side(const Point_2 &p) const
+  {
+    return R().oriented_side_2_object()(*this,p);
+  }
+
+  typename R::Boolean
+  has_on_boundary(const Point_2 &p) const
+  {
+    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
+  }
+
+  typename R::Boolean
+  has_on_positive_side(const Point_2 &p) const
+  {
+    return oriented_side(p) == ON_POSITIVE_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_negative_side(const Point_2 &p) const
+  {
+    return oriented_side(p) == ON_NEGATIVE_SIDE;
+  }
+
+  typename R::Boolean
+  has_on(const Point_2 &p) const
+  {
+    return has_on_boundary(p);
+  }
+
+  FT
+  x_at_y(const FT &y) const
+  {
+    return R().compute_x_at_y_2_object()(*this, y);
+  }
+
+  FT
+  y_at_x(const FT &y) const
+  {
+    return R().compute_y_at_x_2_object()(*this, y);
+  }
+
+  Point_2
+  point() const
+  {
+    return R().construct_point_2_object()(*this);
+  }
+
+  Point_2
+  point(int i) const
+  {
+    return R().construct_point_2_object()(*this,i);
+  }
+
+  typename R::Boolean
+  operator==(const Line_2 &l) const
+  {
+    return R().equal_2_object()(*this, l);
+  }
+
+  typename R::Boolean
+  operator!=(const Line_2 &l) const
+  {
+    return !(*this == l);
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Line_2<R>& l)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << l.a() << ' ' << l.b() << ' ' << l.c();
+    case IO::BINARY :
+        write(os, l.a());
+        write(os, l.b());
+        write(os, l.c());
+        return os;
+    default:
+        return os << "Line_2(" << l.a()
+		  << ", " << l.b() << ", " << l.c() <<')';
+    }
+}
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Line_2<R> &l)
+{
+  return insert(os, l);
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Line_2<R>& l)
+{
+    typename R::RT a, b, c;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(a) >> iformat(b) >> iformat(c);
+        break;
+    case IO::BINARY :
+        read(is, a);
+        read(is, b);
+        read(is, c);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+	l = Line_2<R>(a, b, c);
+    return is;
+}
+
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Line_2<R> &l)
+{
+  return extract(is, l);
+}
+
+} //namespace CGAL
+
+#endif  // CGAL_LINE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Bbox_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Bbox_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Bbox_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Bbox_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Iso_rectangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Iso_rectangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Iso_rectangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_2_Triangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Line_2_Triangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_2_Triangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_2_Triangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Line_3.h b/3rdparty/CGAL-4.8/include/CGAL/Line_3.h
new file mode 100644
index 0000000..47696e5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Line_3.h
@@ -0,0 +1,171 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+//                 Stefan Schirra
+
+#ifndef CGAL_LINE_3_H
+#define CGAL_LINE_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Line_3 : public R_::Kernel_base::Line_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Ray_3                 Ray_3;
+  typedef typename R_::Segment_3             Segment_3;
+  typedef typename R_::Direction_3           Direction_3;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Plane_3               Plane_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Line_3                             Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Line_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Line_3   Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Line_3() {}
+
+  // conversion impl -> interface class
+  Line_3(const Rep& l)
+      : Rep(l) {}
+
+  Line_3(const Point_3 & p, const Point_3 & q)
+      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, q)) {}
+
+  explicit Line_3(const Segment_3 & s)
+      : Rep(typename R::Construct_line_3()(Return_base_tag(), s)) {}
+
+  explicit Line_3(const Ray_3 & r)
+      : Rep(typename R::Construct_line_3()(Return_base_tag(), r)) {}
+
+  Line_3(const Point_3 & p, const Direction_3 & d)
+      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, d)) {}
+
+  Line_3(const Point_3 & p, const Vector_3 & v)
+      : Rep(typename R::Construct_line_3()(Return_base_tag(), p, v)) {}
+
+  Line_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Line_3(t.transform(this->point()), t.transform(this->direction()));
+  }
+
+  Vector_3 to_vector() const
+  {
+    return R().construct_vector_3_object()(*this);
+  }
+
+  Direction_3 direction() const
+  {
+    return R().construct_direction_3_object()(*this);
+  }
+
+  bool has_on(const Point_3 &p) const 
+  { 
+    return R().has_on_3_object()(*this, p);
+    //return has_on_boundary(p); 
+  }
+
+  Point_3 point() const
+  { 
+    return R().construct_point_on_3_object()(*this, 0);
+  }
+
+  Point_3 point(int i) const
+  { 
+    return R().construct_point_on_3_object()(*this, i);
+  }
+
+  Line_3 opposite() const
+  {
+    return R().construct_opposite_line_3_object()(*this);
+  }
+
+  Plane_3 perpendicular_plane(const Point_3 &p) const
+  {
+    return R().construct_perpendicular_plane_3_object()(*this, p);
+  }
+
+  Point_3 projection(const Point_3 &p) const
+  {
+    return R().construct_projected_point_3_object()(*this, p);
+  }
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+  
+};
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Line_3<R> &l)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << l.point(0) << ' ' << l.point(1);
+    case IO::BINARY :
+        return os << l.point(0) <<  l.point(1);
+    default:
+        return  os << "Line_3(" << l.point(0) << ", " << l.point(1) << ")";
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Line_3<R> &l)
+{
+    typename R::Point_3 p, q;
+    is >> p >> q;
+    if (is)
+        l = Line_3<R>(p, q);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_arc_2.h b/3rdparty/CGAL-4.8/include/CGAL/Line_arc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_arc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_arc_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Line_arc_3.h b/3rdparty/CGAL-4.8/include/CGAL/Line_arc_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Line_arc_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Line_arc_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_algebraCd.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_algebraCd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Linear_algebraCd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Linear_algebraCd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_algebraHd.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_algebraHd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Linear_algebraHd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Linear_algebraHd.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex.h
new file mode 100644
index 0000000..01ad03d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex.h
@@ -0,0 +1,936 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_LINEAR_CELL_COMPLEX_H
+#define CGAL_LINEAR_CELL_COMPLEX_H 1
+
+#include <CGAL/Combinatorial_map.h>
+#include <CGAL/Combinatorial_map_constructors.h>
+#include <CGAL/Linear_cell_complex_operations.h>
+#include <CGAL/Linear_cell_complex_min_items.h>
+#include <CGAL/Linear_cell_complex_traits.h>
+#include <CGAL/Linear_cell_complex_storages.h>
+
+namespace CGAL {
+
+  /** @file Linear_cell_complex.h
+   * Definition of a linear cell complex, i.e. a combinatorial map with points
+   * associated to all vertices.
+   */
+
+  /**  Linear_cell_complex class.
+   * The Linear_cell_complex a nD object with linear geometry, ie
+   * an nD combinatorial map with point associated to each vertex.
+   */
+  template < unsigned int d_, unsigned int ambient_dim,
+             class Traits_,
+             class Items_,
+             class Alloc_,
+             template<unsigned int,class,class,class,class>
+             class CMap,
+             class Refs,
+             class Storage_>
+  class Linear_cell_complex_base:
+    public CMap<d_, Refs, Items_, Alloc_, Storage_>
+  {
+  public:
+    typedef Linear_cell_complex_base<d_, ambient_dim,
+                                Traits_, Items_, Alloc_, CMap,
+                                Refs, Storage_>  Self;
+    typedef CMap<d_, Refs, Items_, Alloc_, Storage_> Base;
+
+    typedef Traits_ Traits;
+    typedef Items_  Items;
+    typedef Alloc_  Alloc;
+    typedef Storage_ Storage;
+
+    static const unsigned int ambient_dimension = ambient_dim;
+    static const unsigned int dimension = Base::dimension;
+
+    typedef typename Storage::Dart_handle       Dart_handle;
+    typedef typename Storage::Dart_const_handle Dart_const_handle;
+    typedef typename Storage::Helper            Helper;
+
+    typedef typename Storage::Point  Point;
+    typedef typename Storage::Vector Vector;
+    typedef typename Storage::FT     FT;
+
+    typedef typename Base::Dart_range Dart_range;
+
+    /// Typedef for attributes
+    template<int i>
+    struct Attribute_type: public Base::template Attribute_type<i>
+    {};
+    template<int i>
+    struct Attribute_handle: public Base::template Attribute_handle<i>
+    {};
+    template<int i>
+    struct Attribute_const_handle:
+      public Base::template Attribute_const_handle<i>
+    {};
+    template<int i>
+    struct Attribute_range: public Base::template Attribute_range<i>
+    {};
+    template<int i>
+    struct Attribute_const_range:
+      public Base::template Attribute_const_range<i>
+    {};
+
+    typedef typename Base::template Attribute_type<0>::type Vertex_attribute;
+    typedef typename Base::template Attribute_handle<0>::type
+    Vertex_attribute_handle;
+    typedef typename Base::template Attribute_const_handle<0>::type
+    Vertex_attribute_const_handle;
+
+    typedef typename Base::template Attribute_range<0>::type
+    Vertex_attribute_range;
+    typedef typename Base::template Attribute_const_range<0>::type
+    Vertex_attribute_const_range;
+
+    typedef typename Base::size_type size_type;
+    typedef typename Base::Use_index Use_index;
+    typedef typename Base::Exception_no_more_available_mark
+    Exception_no_more_available_mark;
+
+    /// To use previous definition of create_dart methods.
+    using Base::create_dart;
+    using Base::beta;
+    using Base::is_free;
+    using Base::attribute;
+    using Base::null_handle;
+    using Base::point_of_vertex_attribute;
+
+    using Base::are_attributes_automatically_managed;
+    using Base::mark;
+    using Base::unmark;
+    using Base::free_mark;
+    using Base::get_new_mark;
+
+    Linear_cell_complex_base() : Base()
+    {}
+
+    /** Copy the given linear cell complex into *this.
+     *  Note that both LCC can have different dimensions and/or non void attributes.
+     *  @param alcc the linear cell complex to copy.
+     *  @post *this is valid.
+     */
+    Linear_cell_complex_base(const Self & alcc)
+    { Base::template copy<Self>(alcc); }
+
+    template < class LCC2 >
+    Linear_cell_complex_base(const LCC2& alcc)
+    { Base::template copy<LCC2>(alcc);}
+
+    template < class LCC2, typename Converters >
+    Linear_cell_complex_base(const LCC2& alcc, Converters& converters)
+    { Base::template copy<LCC2, Converters>(alcc, converters);}
+
+    template < class LCC2, typename Converters, typename Pointconverter >
+    Linear_cell_complex_base(const LCC2& alcc, Converters& converters,
+                        const Pointconverter& pointconverter)
+    { Base::template copy<LCC2, Converters, Pointconverter>
+          (alcc, converters, pointconverter);}
+
+    /** Create a vertex attribute.
+     * @return an handle on the new attribute.
+     */
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    template<typename ...Args>
+    Vertex_attribute_handle create_vertex_attribute(const Args&... args)
+    { return Base::template create_attribute<0>(args...); }
+#else
+    Vertex_attribute_handle create_vertex_attribute()
+    { return Base::template create_attribute<0>(); }
+
+    template<typename T1>
+    Vertex_attribute_handle create_vertex_attribute(const T1& t1)
+    { return Base::template create_attribute<0>(t1); }
+
+    template<typename T1, typename T2>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2)
+    { return Base::template create_attribute<0>(t1, t2); }
+
+    template<typename T1, typename T2, typename T3>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3)
+    { return Base::template create_attribute<0>(t1, t2, t3); }
+
+    template<typename T1, typename T2, typename T3, typename T4>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4); }
+
+    template<typename T1, typename T2, typename T3, typename T4, typename T5>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
+     const T5 &t5)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5); }
+
+    template<typename T1, typename T2, typename T3, typename T4, typename T5,
+             typename T6>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
+     const T5 &t5, const T6 &t6)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6); }
+
+    template<typename T1, typename T2, typename T3, typename T4, typename T5,
+             typename T6, typename T7>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
+     const T5 &t5, const T6 &t6, const T7 &t7)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7); }
+
+  template<typename T1, typename T2, typename T3, typename T4, typename T5,
+             typename T6, typename T7, typename T8>
+    Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
+     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7,
+                                                t8); }
+
+  template<typename T1, typename T2, typename T3, typename T4, typename T5,
+           typename T6, typename T7, typename T8, typename T9>
+  Vertex_attribute_handle create_vertex_attribute
+    (const T1& t1, const T2 &t2, const T3 &t3, const T4 &t4,
+     const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9)
+    { return Base::template create_attribute<0>(t1, t2, t3, t4, t5, t6, t7,
+                                                t8, t9); }
+#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+    /**
+     * Create a new dart associated with an handle through an attribute.
+     * @param ahandle the point handle to associated with the dart.
+     * @return a Dart_handle on the new dart.
+     */
+    Dart_handle create_dart(Vertex_attribute_handle ahandle)
+    {
+      Dart_handle res = create_dart();
+      set_vertex_attribute_of_dart(res,ahandle);
+      return res;
+    }
+
+    /** Create a new dart associated with a point.
+     * @param apoint the point to associated with the dart.
+     * @return a Dart_handle on the new dart.
+     */
+    Dart_handle create_dart(const Point& apoint)
+    { return create_dart(create_vertex_attribute(apoint)); }
+
+    /** Erase a given vertex attribute.
+     * @param ahandle the handle to the vertex attribute to erase.
+     */
+    void erase_vertex_attribute(Vertex_attribute_handle ahandle)
+    { Base::template erase_attribute<0>(ahandle); }
+
+    /** Set the vertex attribute of the given dart.
+     * @param adart a dart.
+     * @param ah the attribute to set.
+     */
+    void set_vertex_attribute_of_dart(Dart_handle adart,
+                                      Vertex_attribute_handle ah)
+    {
+      return CGAL::internal::Set_i_attribute_of_dart_functor<Self, 0>::
+          run(this, adart,ah);
+    }
+
+    /** Set the vertex attribute of all the darts of the vertex.
+     * @param adart a dart of the vertex.
+     * @param ah the attribute to set.
+     */
+    void set_vertex_attribute(Dart_handle adart,
+                              Vertex_attribute_handle ah)
+    { return CGAL::Set_i_attribute_functor<Self, 0>::run(this, adart,ah); }
+
+    /// @return the Vertex_attribute_range for all vertex_attributes.
+    Vertex_attribute_range& vertex_attributes()
+    { return this->template attributes<0>(); }
+
+    /// @return the Vertex_attribute_const_range for all vertex_attributes.
+    Vertex_attribute_const_range& vertex_attributes() const
+    { return this->template attributes<0>(); }
+
+    /// @return the size of the vertex_attribute container.
+    typename Base::size_type number_of_vertex_attributes() const
+    { return Base::template number_of_attributes<0>(); }
+
+#ifdef CGAL_CMAP_DEPRECATED
+    static Vertex_attribute_handle vertex_attribute(Dart_handle adart)
+    {
+      CGAL_assertion(adart!=NULL);
+      return adart->template attribute<0>();
+    }
+   static Vertex_attribute_const_handle vertex_attribute(Dart_const_handle
+                                                          adart)
+    {
+      CGAL_assertion(adart!=NULL);
+      return adart->template attribute<0>();
+    }
+    static Point& point(Dart_handle adart)
+    {
+      CGAL_assertion(adart!=NULL && adart->template attribute<0>()!=NULL );
+      return adart->template attribute<0>()->point();
+    }
+    static const Point& point(Dart_const_handle adart)
+    {
+      CGAL_assertion(adart!=NULL && adart->template attribute<0>()!=NULL );
+      return adart->template attribute<0>()->point();
+    }
+#else
+    /// Get the vertex_attribute associated with a dart.
+    /// @param a dart
+    /// @return the vertex_attribute.
+    Vertex_attribute_handle vertex_attribute(Dart_handle adart)
+    { return this->template attribute<0>(adart); }
+
+    /// Get the vertex_attribute associated with a const dart.
+    /// @param a dart
+    /// @return the vertex_const_attribute.
+    Vertex_attribute_const_handle
+    vertex_attribute(Dart_const_handle adart) const
+    { return this->template attribute<0>(adart); }
+
+    /// Get the point associated with a dart.
+    /// @param a dart
+    /// @return the point.
+    Point& point(Dart_handle adart)
+    {
+      CGAL_assertion(this->template attribute<0>(adart)!=null_handle );
+      return point_of_vertex_attribute(this->template attribute<0>(adart));
+    }
+
+    /// Get the point associated with a const dart.
+    /// @param a dart
+    /// @return the point.
+    const Point& point(Dart_const_handle adart) const
+    {
+      CGAL_assertion(this->template attribute<0>(adart)!=null_handle );
+      return point_of_vertex_attribute(this->template attribute<0>(adart));
+    }
+#endif // CGAL_CMAP_DEPRECATED
+
+    // Temporary methods to allow to write lcc->temp_vertex_attribute
+    // even with the old method. Depending if CGAL_CMAP_DEPRECATED is defined or not
+    // call the static method or the new method. To remove when we remove the
+    // old code.
+    Vertex_attribute_handle temp_vertex_attribute(Dart_handle adart)
+    {return vertex_attribute(adart); }
+    Vertex_attribute_const_handle
+    temp_vertex_attribute(Dart_const_handle adart) const
+    {return vertex_attribute(adart); }
+
+    /** Test if the lcc is valid.
+     * A Linear_cell_complex is valid if it is a valid Combinatorial_map with
+     * an attribute associated to each dart.
+     * @return true iff the map is valid.
+     */
+    bool is_valid() const
+    {
+      bool valid = Base::is_valid();
+      for (typename Dart_range::const_iterator it(this->darts().begin()),
+             itend(this->darts().end()); valid && it != itend; ++it)
+      {
+        if ( vertex_attribute(it)==null_handle )
+        {
+          std::cerr << "Map not valid: dart "<<&(*it)
+                    <<" does not have a vertex."<< std::endl;
+          valid = false;
+        }
+      }
+      return valid;
+    }
+
+    /** validate the lcc
+     */
+    void correct_invalid_attributes()
+    {
+      // Copy of the code in CMap::correct_invalid_attributes() to avoid
+      // 2 iterations through the darts of the map.
+
+      std::vector<size_type> marks(dimension+1);
+      for ( unsigned int i=0; i<=dimension; ++i)
+        marks[i] = Base::INVALID_MARK;
+
+      Helper::template
+        Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
+          run(this,&marks);
+
+      for ( typename Dart_range::iterator it(this->darts().begin()),
+             itend(this->darts().end()); it!=itend; ++it)
+      {
+        Helper::template Foreach_enabled_attributes
+          <internal::Correct_invalid_attributes_functor<Self> >::
+          run(this,it,&marks);
+
+        if ( vertex_attribute(it)==null_handle )
+        {
+          // If a dart don't have a 0-attribute, we create a Point at the origin
+          set_vertex_attribute(it, create_vertex_attribute(CGAL::ORIGIN));
+        }
+      }
+
+      for ( unsigned int i=0; i<=dimension; ++i)
+        if ( marks[i]!=Base::INVALID_MARK )
+        {
+          CGAL_assertion( this->is_whole_map_marked(marks[i]) );
+          free_mark(marks[i]);
+        }
+    }
+
+    /** test if the two given facets have the same geometry
+     * @return true iff the two facets have the same geometry.
+     */
+    bool are_facets_same_geometry(Dart_const_handle d1,
+                                  Dart_const_handle d2) const
+    {
+      typename Base::template Dart_of_orbit_range<1>::const_iterator
+        it1(*this,d1);
+      typename Base::template Dart_of_orbit_range<0>::const_iterator
+        it2(*this,d2);
+      bool samegeometry = true;
+      for ( ; samegeometry && it1.cont() && it2.cont(); ++it1, ++it2)
+      {
+        if ( this->other_extremity(it2)!=null_handle &&
+             point(it1)!=point(this->other_extremity(it2)) )
+          samegeometry = false;
+      }
+      if ( it1.cont() != it2.cont() ) samegeometry = false;
+      return samegeometry;
+    }
+
+    /// Sew3 the marked facets having same geometry
+    /// (a facet is considered marked if one of its dart is marked).
+    unsigned int sew3_same_facets(size_type AMark)
+    {
+      unsigned int res = 0;
+
+      std::map<Point, std::vector<Dart_handle> > one_dart_per_facet;
+      size_type mymark = get_new_mark();
+
+      // First we fill the std::map by one dart per facet, and by using
+      // the minimal point as index.
+      for (typename Dart_range::iterator it(this->darts().begin()),
+             itend(this->darts().end()); it!=itend; ++it )
+      {
+        if ( !this->is_marked(it, mymark) && this->is_marked(it, AMark) )
+        {
+          Point min_point=point(it);
+          Dart_handle min_dart = it;
+          this->mark(it, mymark);
+          typename Base::template
+            Dart_of_orbit_range<1>::iterator it2(*this,it);
+          ++it2;
+          for ( ; it2.cont(); ++it2 )
+          {
+            Point cur_point=point(it2);
+            this->mark(it2, mymark);
+            if ( cur_point < min_point )
+            {
+              min_point = cur_point;
+              min_dart = it2;
+            }
+          }
+          one_dart_per_facet[min_point].push_back(min_dart);
+        }
+        else
+          this->mark(it, mymark);
+      }
+
+      // Second we run through the map: candidates for sew3 have necessary the
+      // same minimal point.
+      typename std::map<Point, std::vector<Dart_handle> >::iterator
+        itmap=one_dart_per_facet.begin(),
+        itmapend=one_dart_per_facet.end();
+
+      for ( ; itmap!=itmapend; ++itmap )
+      {
+        for ( typename std::vector<Dart_handle>::iterator
+                it1=(itmap->second).begin(),
+                it1end=(itmap->second).end(); it1!=it1end; ++it1 )
+        {
+          typename std::vector<Dart_handle>::iterator it2=it1;
+          for ( ++it2; it2!= it1end; ++it2 )
+          {
+            if ( *it1!=*it2 && is_free(*it1, 3) &&
+                 is_free(*it2, 3) &&
+                 are_facets_same_geometry(*it1,beta(*it2, 0)) )
+            {
+              ++res;
+              this->template sew<3>(*it1,beta(*it2, 0));
+            }
+          }
+        }
+      }
+
+      CGAL_assertion( this->is_whole_map_marked(mymark) );
+      this->free_mark(mymark);
+      return res;
+    }
+
+    /// Sew3 the facets having same geometry
+    /// (all the facets of the map are considered)
+    unsigned int sew3_same_facets()
+    {
+      size_type mark = this->get_new_mark();
+      this->negate_mark(mark);
+      unsigned int res=sew3_same_facets(mark);
+      this->free_mark(mark);
+      return res;
+    }
+
+    /** Create an edge given 2 Vertex_attribute_handle.
+     * @param h0 the first vertex handle.
+     * @param h1 the second vertex handle.
+     * @return the dart of the new edge incident to h0.
+     */
+    Dart_handle make_segment(Vertex_attribute_handle h0,
+                             Vertex_attribute_handle h1)
+    {
+      Dart_handle d1 = make_edge(*this);
+      set_vertex_attribute_of_dart(d1,h0);
+      set_vertex_attribute_of_dart(beta(d1, 2),h1);
+
+      return d1;
+    }
+
+    /** Create a segment given 2 points.
+     * @param p0 the first point.
+     * @param p1 the second point.
+     * @return the dart of the new segment incident to p0.
+     */
+    Dart_handle make_segment(const Point& p0,const Point& p1)
+    {
+      return make_segment(create_vertex_attribute(p0),
+                          create_vertex_attribute(p1));
+    }
+
+    /** Create a triangle given 3 Vertex_attribute_handle.
+     * @param h0 the first vertex handle.
+     * @param h1 the second vertex handle.
+     * @param h2 the third vertex handle.
+     * @return the dart of the new triangle incident to h0.
+     */
+    Dart_handle make_triangle(Vertex_attribute_handle h0,
+                              Vertex_attribute_handle h1,
+                              Vertex_attribute_handle h2)
+    {
+      Dart_handle d1 = make_combinatorial_polygon(*this,3);
+
+      set_vertex_attribute_of_dart(d1,h0);
+      set_vertex_attribute_of_dart(beta(d1, 1),h1);
+      set_vertex_attribute_of_dart(beta(d1, 0),h2);
+
+      return d1;
+    }
+
+    /** Create a triangle given 3 points.
+     * @param p0 the first point.
+     * @param p1 the second point.
+     * @param p2 the third point.
+     * @return the dart of the new triangle incident to p0.
+     */
+    Dart_handle make_triangle(const Point& p0,
+                              const Point& p1,
+                              const Point& p2)
+    {
+      return make_triangle(create_vertex_attribute(p0),
+                           create_vertex_attribute(p1),
+                           create_vertex_attribute(p2));
+    }
+
+    /** Create a quadrangle given 4 Vertex_attribute_handle.
+     * @param h0 the first vertex handle.
+     * @param h1 the second vertex handle.
+     * @param h2 the third vertex handle.
+     * @param h3 the fourth vertex handle.
+     * @return the dart of the new quadrilateral incident to h0.
+     */
+    Dart_handle make_quadrangle(Vertex_attribute_handle h0,
+                                Vertex_attribute_handle h1,
+                                Vertex_attribute_handle h2,
+                                Vertex_attribute_handle h3)
+    {
+      Dart_handle d1 = make_combinatorial_polygon(*this,4);
+
+      set_vertex_attribute_of_dart(d1,h0);
+      set_vertex_attribute_of_dart(beta(d1, 1),h1);
+      set_vertex_attribute_of_dart(beta(d1, 1, 1),h2);
+      set_vertex_attribute_of_dart(beta(d1, 0),h3);
+
+      return d1;
+    }
+
+    /** Create a quadrangle given 4 points.
+     * @param p0 the first point.
+     * @param p1 the second point.
+     * @param p2 the third point.
+     * @param p3 the fourth point.
+     * @return the dart of the new quadrangle incident to p0.
+     */
+    Dart_handle make_quadrangle(const Point& p0,
+                                const Point& p1,
+                                const Point& p2,
+                                const Point& p3)
+    {
+      return make_quadrangle(create_vertex_attribute(p0),
+                             create_vertex_attribute(p1),
+                             create_vertex_attribute(p2),
+                             create_vertex_attribute(p3));
+    }
+
+
+    /** Create a tetrahedron given 4 Vertex_attribute_handle.
+     * @param h0 the first vertex handle.
+     * @param h1 the second vertex handle.
+     * @param h2 the third vertex handle.
+     * @param h3 the fourth vertex handle.
+     * @return the dart of the new tetrahedron incident to h0 and to
+     *         facet h0,h1,h2.
+     */
+    Dart_handle make_tetrahedron(Vertex_attribute_handle h0,
+                                 Vertex_attribute_handle h1,
+                                 Vertex_attribute_handle h2,
+                                 Vertex_attribute_handle h3)
+    {
+      Dart_handle d1 = make_triangle(h0, h1, h2);
+      Dart_handle d2 = make_triangle(h1, h0, h3);
+      Dart_handle d3 = make_triangle(h1, h3, h2);
+      Dart_handle d4 = make_triangle(h3, h0, h2);
+
+      return make_combinatorial_tetrahedron(*this, d1, d2, d3, d4);
+    }
+
+    /** Create a tetrahedron given 4 points.
+     * @param p0 the first point.
+     * @param p1 the second point.
+     * @param p2 the third point.
+     * @param p3 the fourth point.
+     * @return the dart of the new tetrahedron incident to p0 and to
+     *         facet p0,p1,p2.
+     */
+    Dart_handle make_tetrahedron(const Point& p0,
+                                 const Point& p1,
+                                 const Point& p2,
+                                 const Point& p3)
+    {
+      return make_tetrahedron(create_vertex_attribute(p0),
+                              create_vertex_attribute(p1),
+                              create_vertex_attribute(p2),
+                              create_vertex_attribute(p3));
+    }
+
+    /** Create an hexahedron given 8 Vertex_attribute_handle.
+     *    (8 vertices, 12 edges and 6 facets)
+     * \verbatim
+     *       4----7
+     *      /|   /|
+     *     5----6 |
+     *     | 3--|-2
+     *     |/   |/
+     *     0----1
+     * \endverbatim
+     * @param h0 the first vertex handle.
+     * @param h1 the second vertex handle.
+     * @param h2 the third vertex handle.
+     * @param h3 the fourth vertex handle.
+     * @param h4 the fifth vertex handle.
+     * @param h5 the sixth vertex handle.
+     * @param h6 the seventh vertex handle.
+     * @param h7 the height vertex handle.
+     * @return the dart of the new hexahedron incident to h0 and to
+     *         the facet (h0,h5,h6,h1).
+     */
+    Dart_handle make_hexahedron(Vertex_attribute_handle h0,
+                                Vertex_attribute_handle h1,
+                                Vertex_attribute_handle h2,
+                                Vertex_attribute_handle h3,
+                                Vertex_attribute_handle h4,
+                                Vertex_attribute_handle h5,
+                                Vertex_attribute_handle h6,
+                                Vertex_attribute_handle h7)
+    {
+      Dart_handle d1 = make_quadrangle(h0, h5, h6, h1);
+      Dart_handle d2 = make_quadrangle(h1, h6, h7, h2);
+      Dart_handle d3 = make_quadrangle(h2, h7, h4, h3);
+      Dart_handle d4 = make_quadrangle(h3, h4, h5, h0);
+      Dart_handle d5 = make_quadrangle(h0, h1, h2, h3);
+      Dart_handle d6 = make_quadrangle(h5, h4, h7, h6);
+
+      return make_combinatorial_hexahedron(*this, d1, d2, d3, d4, d5, d6);
+    }
+
+    /** Create an hexahedron given 8 points.
+     * \verbatim
+     *       4----7
+     *      /|   /|
+     *     5----6 |
+     *     | 3--|-2
+     *     |/   |/
+     *     0----1
+     * \endverbatim
+     * @param p0 the first point.
+     * @param p1 the second point.
+     * @param p2 the third point.
+     * @param p3 the fourth point.
+     * @param p4 the fifth point.
+     * @param p5 the sixth point.
+     * @param p6 the seventh point.
+     * @param p7 the height point.
+     * @return the dart of the new hexahedron incident to p0
+     *         and to the facet (p0,p5,p6,p1).
+     */
+    Dart_handle make_hexahedron(const Point& p0,
+                                const Point& p1,
+                                const Point& p2,
+                                const Point& p3,
+                                const Point& p4,
+                                const Point& p5,
+                                const Point& p6,
+                                const Point& p7)
+    {
+      return make_hexahedron(create_vertex_attribute(p0),
+                             create_vertex_attribute(p1),
+                             create_vertex_attribute(p2),
+                             create_vertex_attribute(p3),
+                             create_vertex_attribute(p4),
+                             create_vertex_attribute(p5),
+                             create_vertex_attribute(p6),
+                             create_vertex_attribute(p7));
+    }
+
+    /** Compute the barycenter of a given cell.
+     * @param adart a dart incident to the cell.
+     * @param adim the dimension of the cell.
+     * @return the barycenter of the cell.
+     */
+    template<unsigned int i>
+    Point barycenter(Dart_const_handle adart) const
+    {
+      return CGAL::Barycenter_functor<Self, i>::run(*this, adart);
+    }
+
+    /** Insert a point in a given 1-cell.
+     * @param dh a dart handle to the 1-cell
+     * @param p the point to insert
+     * @param update_attributes a boolean to update the enabled attributes
+     * @return a dart handle to the new vertex containing p.
+     */
+    Dart_handle insert_point_in_cell_1(Dart_handle dh, const Point& p, bool update_attributes)
+    {
+      return CGAL::insert_cell_0_in_cell_1(*this, dh,
+                                           create_vertex_attribute(p),
+                                           update_attributes);
+    }
+
+    /** Insert a point in a given 2-cell.
+     * @param dh a dart handle to the 2-cell
+     * @param p the point to insert
+     * @param update_attributes a boolean to update the enabled attributes
+     * @return a dart handle to the new vertex containing p.
+     */
+    Dart_handle insert_point_in_cell_2(Dart_handle dh, const Point& p, bool update_attributes)
+    {
+      Vertex_attribute_handle v = create_vertex_attribute(p);
+
+      Dart_handle first = CGAL::insert_cell_0_in_cell_2(*this, dh, v, update_attributes);
+
+      if ( first==null_handle ) // If the triangulated facet was made of one dart
+        erase_vertex_attribute(v);
+
+#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
+      CGAL_assertion( is_valid() );
+#endif
+
+      return first;
+    }
+
+    /** Insert a point in a given i-cell.
+     * @param dh a dart handle to the i-cell
+     * @param p the point to insert
+     * @param update_attributes a boolean to update the enabled attributes
+     * @return a dart handle to the new vertex containing p.
+     */
+    template <unsigned int i>
+    Dart_handle insert_point_in_cell(Dart_handle dh, const Point& p, bool update_attributes = true)
+    {
+      CGAL_static_assertion(1<=i && i<=2);
+      if (i==1) return insert_point_in_cell_1(dh, p, update_attributes);
+      return insert_point_in_cell_2(dh, p, update_attributes);
+    }
+
+    /** Insert a dangling edge in a given facet.
+     * @param dh a dart of the facet (!=NULL).
+     * @param p the coordinates of the new vertex.
+     * @param update_attributes a boolean to update the enabled attributes
+     * @return a dart of the new edge, incident to the new vertex.
+     */
+    Dart_handle insert_dangling_cell_1_in_cell_2(Dart_handle dh,
+                                                 const Point& p,
+                                                 bool update_attributes = true)
+    {
+      return CGAL::insert_dangling_cell_1_in_cell_2
+          (*this, dh, create_vertex_attribute(p), update_attributes);
+    }
+
+    /** Insert a point in a given i-cell.
+     * @param dh a dart handle to the i-cell
+     * @param p the point to insert
+     * @param update_attributes a boolean to update the enabled attributes
+     * @return a dart handle to the new vertex containing p.
+     */
+    template <unsigned int i>
+    Dart_handle insert_barycenter_in_cell(Dart_handle dh, bool update_attributes = true)
+    { return insert_point_in_cell<i>(dh, barycenter<i>(dh), update_attributes); }
+
+    /** Compute the dual of a Linear_cell_complex.
+     * @param alcc the lcc in which we build the dual of this lcc.
+     * @param adart a dart of the initial lcc, NULL by default.
+     * @return adart of the dual lcc, the dual of adart if adart!=NULL,
+     *         any dart otherwise.
+     * As soon as we don't modify this lcc and alcc lcc, we can iterate
+     * simultaneously through all the darts of the two lcc and we have
+     * each time of the iteration two "dual" darts.
+     */
+    Dart_handle dual_points_at_barycenter(Self & alcc, Dart_handle adart=null_handle)
+    {
+      Dart_handle res = Base::dual(alcc, adart);
+
+      // Now the lcc alcc is topologically correct, we just need to add
+      // its geometry to each vertex (the barycenter of the corresponding
+      // dim-cell in the initial map).
+      typename Dart_range::iterator it2 = alcc.darts().begin();
+      for (typename Dart_range::iterator it(this->darts().begin());
+           it!=this->darts().end(); ++it, ++it2)
+      {
+        if (vertex_attribute(it2)==null_handle)
+        {
+          alcc.set_vertex_attribute(it2, alcc.create_vertex_attribute
+                                    (barycenter<dimension>(it)));
+        }
+      }
+
+      return res;
+    }
+
+    /** Set the status of the managment of the attributes of the CMap
+     */
+    void set_update_attributes(bool newval)
+    {
+      if (this->automatic_attributes_management == false && newval == true)
+      {
+        // We need to recode this function because correct_invalid_attributes
+        // is not a virtual function.
+        correct_invalid_attributes();
+      }
+
+      this->automatic_attributes_management = newval;
+    }
+  };
+
+  // Linear_cell_complex using compact container with handle.
+  // No difference with class Linear_cell_complex_base except the default
+  // template parameters for Refs class.
+  template < unsigned int d_, unsigned int ambient_dim = d_,
+             class Traits_ = Linear_cell_complex_traits<ambient_dim>,
+             class Items_ = Linear_cell_complex_min_items<d_>,
+             class Alloc_ = CGAL_ALLOCATOR(int),
+             template<unsigned int,class,class,class,class>
+             class CMap = Combinatorial_map_base,
+             class Storage_ = Linear_cell_complex_storage_1<d_, ambient_dim,
+                                                            Traits_, Items_,
+                                                            Alloc_> >
+    class Linear_cell_complex: public Linear_cell_complex_base<d_,
+        ambient_dim, Traits_, Items_, Alloc_, CMap,
+        Linear_cell_complex<d_, ambient_dim,
+               Traits_, Items_, Alloc_, CMap, Storage_>,
+        Storage_>
+    {
+    public:
+      typedef Linear_cell_complex<d_, ambient_dim,
+                          Traits_, Items_, Alloc_, CMap, Storage_>  Self;
+
+      typedef Linear_cell_complex_base<d_, ambient_dim,
+                          Traits_, Items_, Alloc_, CMap, Self, Storage_> Base;
+
+      typedef Traits_ Traits;
+      typedef Items_  Items;
+      typedef Alloc_  Alloc;
+
+      static const unsigned int ambient_dimension = Base::ambient_dimension;
+      static const unsigned int dimension = Base::dimension;
+
+      typedef typename Base::Dart_handle       Dart_handle;
+      typedef typename Base::Dart_const_handle Dart_const_handle;
+      typedef typename Base::Helper            Helper;
+
+      typedef typename Base::Point  Point;
+      typedef typename Base::Vector Vector;
+      typedef typename Base::FT     FT;
+
+      typedef typename Base::Dart_range Dart_range;
+
+      typedef typename Base::template Attribute_type<0>::type Vertex_attribute;
+      typedef typename Base::template Attribute_handle<0>::type
+      Vertex_attribute_handle;
+      typedef typename Base::template Attribute_const_handle<0>::type
+      Vertex_attribute_const_handle;
+
+      typedef typename Base::template Attribute_range<0>::type
+      Vertex_attribute_range;
+      typedef typename Base::template Attribute_const_range<0>::type
+      Vertex_attribute_const_range;
+
+      typedef typename Base::size_type size_type;
+
+      typedef typename Base::Use_index Use_index;
+      typedef typename Base::Storage Storage;
+      typedef typename Base::Exception_no_more_available_mark
+      Exception_no_more_available_mark;
+
+      Linear_cell_complex() : Base()
+      {}
+
+      /** Copy the given linear cell complex into *this.
+       *  Note that both LCC can have different dimensions and/or non void attributes.
+       *  @param alcc the linear cell complex to copy.
+       *  @post *this is valid.
+       */
+      Linear_cell_complex(const Self & alcc) : Base()
+      { Base::template copy<Self>(alcc); }
+
+      template < class LCC2 >
+      Linear_cell_complex(const LCC2& alcc)
+      { Base::template copy<LCC2>(alcc);}
+
+      template < class LCC2, typename Converters >
+      Linear_cell_complex(const LCC2& alcc, Converters& converters)
+      { Base::template copy<LCC2, Converters>(alcc, converters);}
+
+      template < class LCC2, typename Converters, typename Pointconverter >
+      Linear_cell_complex(const LCC2& alcc, Converters& converters,
+                                    const Pointconverter& pointconverter)
+      { Base::template copy<LCC2, Converters, Pointconverter>
+            (alcc, converters, pointconverter);}
+
+    };
+
+} // namespace CGAL
+
+#endif // CGAL_LINEAR_CELL_COMPLEX_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_constructors.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_constructors.h
new file mode 100644
index 0000000..aa29244
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_constructors.h
@@ -0,0 +1,622 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H
+#define CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H 1
+
+#include <CGAL/Combinatorial_map_constructors.h>
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Triangulation_3.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/IO/File_header_OFF.h>
+#include <CGAL/IO/File_scanner_OFF.h>
+#include <CGAL/Linear_cell_complex_incremental_builder.h>
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+
+namespace CGAL {
+
+  /** @file Linear_cell_complex_constructors.h
+   * Some construction operations for a linear cell complex from other
+   * CGAL data structures.
+   */
+
+  /** Import an embedded plane graph read into a flux into a
+   *  linear cell complex.
+   * @param alcc the linear cell complex where the graph will be imported.
+   * @param ais the istream where read the graph.
+   * @return A dart created during the convertion.
+   */
+  template< class LCC >
+  typename LCC::Dart_handle import_from_plane_graph(LCC& alcc,
+                                                    std::istream& ais)
+  {
+    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
+  
+    typedef typename LCC::Dart_handle Dart_handle;
+    typedef typename LCC::Traits::Direction_2 Direction;
+    typedef typename std::list<Dart_handle>::iterator List_iterator;
+    typedef typename std::map<Direction, Dart_handle>::iterator LCC_iterator;
+  
+    // Arrays of vertices
+    std::vector< typename LCC::Vertex_attribute_handle > initVertices;
+    std::vector< std::list<Dart_handle> > testVertices;
+
+    std::string txt;
+    typename LCC::FT x, y;
+    Dart_handle d1 = alcc.null_handle, d2 = alcc.null_handle;
+    unsigned int v1, v2;
+  
+    unsigned int nbSommets = 0;
+    unsigned int nbAretes = 0;
+  
+    ais >> nbSommets >> nbAretes;
+    while (nbSommets > 0)
+    {
+      if (!ais.good())
+      {
+        std::cout << "Problem: file does not contain enough vertices."
+                  << std::endl;
+        return alcc.null_handle;
+      }
+
+      ais >> iformat(x) >> iformat(y);
+      initVertices.push_back(alcc.create_vertex_attribute
+                             (typename LCC::Point(x, y)));
+      testVertices.push_back(std::list<Dart_handle>());
+      --nbSommets;
+    }
+
+    while (nbAretes > 0)
+    {
+      if (!ais.good())
+      {
+        std::cout << "Problem: file does not contain enough edges."
+                  << std::endl;
+        return alcc.null_handle;
+      }
+
+      // We read an egde (given by the number of its two vertices).
+      ais >> v1 >> v2;
+      --nbAretes;
+
+      CGAL_assertion(v1 < initVertices.size());
+      CGAL_assertion(v2 < initVertices.size());
+
+      d1 = alcc.create_dart(initVertices[v1]);
+      d2 = alcc.create_dart(initVertices[v2]);
+      alcc.template link_beta<2>(d1, d2);
+
+      testVertices[v1].push_back(d1);
+      testVertices[v2].push_back(d2);
+    }
+
+    // LCC associating directions and darts.
+    std::map<Direction, Dart_handle> tabDart;
+    List_iterator it;
+    LCC_iterator  it2;
+
+    Dart_handle first = alcc.null_handle;
+    Dart_handle prec = alcc.null_handle;
+    typename LCC::Point sommet1, sommet2;
+  
+    for (unsigned int i = 0; i < initVertices.size(); ++i)
+    {
+      it = testVertices[i].begin();
+      if (it != testVertices[i].end()) // Si la liste n'est pas vide.
+      {
+        // 1. We insert all the darts and sort them depending on the direction
+        tabDart.clear();
+      
+        sommet1 = alcc.point(*it);
+        sommet2 = alcc.point(alcc.beta(*it,2));
+      
+        tabDart.insert(std::pair<Direction, Dart_handle>
+                       (typename LCC::Traits::Construct_direction_2()
+                        (typename LCC::Traits::Construct_vector()
+                         (sommet1,sommet2)), *it));
+      
+        ++it;
+        while (it != testVertices[i].end())
+        {
+          sommet2 = alcc.point(alcc.beta(*it,2));
+          tabDart.insert(std::pair<Direction, Dart_handle>
+                         (typename LCC::Traits::Construct_direction_2()
+                          (typename LCC::Traits::Construct_vector()
+                           (sommet1,sommet2)), *it));
+          ++it;
+        }
+      
+        // 2. We run through the array of darts and 1 links darts.
+        it2 = tabDart.begin();
+        first = it2->second;
+        prec = first;
+        ++it2;
+
+        while (it2 != tabDart.end())
+        {
+          alcc.template link_beta<0>(prec, alcc.beta(it2->second,2));
+          prec = it2->second;
+          ++it2;
+        }
+        alcc.template link_beta<0>(prec, alcc.beta(first,2));
+      }
+    }
+
+    // We return a dart from the imported object.
+    return first;
+  }
+
+  /** Convert a given Triangulation_2 into a 2D linear cell complex.
+   * @param alcc the used linear cell complex.
+   * @param atr the Triangulation_2.
+   * @param aface_to_dart a pointer to a std::map associating to each
+   *        triangle of atr a corresponding dart in alcc. Not used if NULL.
+   * @return A dart incident to the infinite vertex.
+   */
+  template < class LCC, class Triangulation >
+  typename LCC::Dart_handle import_from_triangulation_2
+  (LCC& alcc, const Triangulation &atr,
+   std::map<typename Triangulation::Face_handle,
+            typename LCC::Dart_handle >* aface_to_dart=NULL)
+  {
+    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
+    
+    // Case of empty triangulations.
+    if (atr.number_of_vertices() == 0) return LCC::null_handle;
+
+    // Check the dimension.
+    if (atr.dimension() != 2) return LCC::null_handle;
+    CGAL_assertion(atr.is_valid());
+
+    typedef typename Triangulation::Vertex_handle         TVertex_handle;
+    typedef typename Triangulation::All_vertices_iterator TVertex_iterator;
+    typedef typename Triangulation::All_faces_iterator    TFace_iterator;
+    typedef typename std::map
+      < TFace_iterator, typename LCC::Dart_handle >::iterator itmap_tcell;
+
+    // Create vertices in the map and associate in a map
+    // TVertex_handle and vertices in the map.
+    std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV;
+    for (TVertex_iterator itv = atr.all_vertices_begin();
+         itv != atr.all_vertices_end(); ++itv)
+    {
+      TV[itv] = alcc.create_vertex_attribute(itv->point());
+    }
+
+    // Create the triangles and create a map to link Cell_iterator
+    // and triangles.
+    TFace_iterator it;
+
+    std::map<typename Triangulation::Face_handle, typename LCC::Dart_handle> TC;
+    std::map<typename Triangulation::Face_handle, typename LCC::Dart_handle>*
+      mytc = (aface_to_dart==NULL?&TC:aface_to_dart);
+    
+    itmap_tcell maptcell_it;
+
+    typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
+    typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
+
+    for (it = atr.all_faces_begin(); it != atr.all_faces_end(); ++it)
+    {
+      /*     if (it->vertex(0) != atr.infinite_vertex() &&
+             it->vertex(1) != atr.infinite_vertex() &&
+             it->vertex(2) != atr.infinite_vertex() &&
+             it->vertex(3) != atr.infinite_vertex())
+      */
+      {
+        res = alcc.make_triangle(TV[it->vertex(0)],
+                                 TV[it->vertex(1)],
+                                 TV[it->vertex(2)]);
+
+        if ( dart==LCC::null_handle )
+        {
+          if ( it->vertex(0) == atr.infinite_vertex() )
+            dart = res;
+          else if ( it->vertex(1) == atr.infinite_vertex() )
+            dart = alcc.beta(res,1);
+          else if ( it->vertex(2) == atr.infinite_vertex() )
+            dart = alcc.beta(res,0);
+        }
+        
+        for (unsigned int i=0; i<3; ++i)
+        {
+          switch (i)
+          {
+          case 0: cur = alcc.beta(res,1); break;
+          case 1: cur = alcc.beta(res,0); break;
+          case 2: cur = res; break;
+          }
+
+          maptcell_it = mytc->find(it->neighbor(i));
+          if (maptcell_it != mytc->end())
+          {
+            switch (atr.mirror_index(it,i) )
+            {
+            case 0: neighbor = alcc.beta(maptcell_it->second,1);
+              break;
+            case 1: neighbor = alcc.beta(maptcell_it->second,0);
+              break;
+            case 2: neighbor = maptcell_it->second; break;
+            }
+            alcc.template topo_sew<2>(cur, neighbor);
+          }
+        }
+        (*mytc)[it] = res;
+      }
+    }
+
+    CGAL_assertion(dart!=LCC::null_handle);
+    return dart;
+  }
+  
+  /** Convert a given Triangulation_3 into a 3D linear cell complex.
+   * @param alcc the used linear cell complex.
+   * @param atr the Triangulation_3.
+   * @param avol_to_dart a pointer to a std::map associating to each
+   *        tetrahedron of atr a corresponding dart in alcc. Not used if NULL.
+   * @return A dart incident to the infinite vertex.
+   */
+  template < class LCC, class Triangulation >
+  typename LCC::Dart_handle import_from_triangulation_3
+  (LCC& alcc, const Triangulation &atr,
+   std::map<typename Triangulation::Cell_handle,
+            typename LCC::Dart_handle >* avol_to_dart=NULL)
+  {
+    CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 );
+    
+    // Case of empty triangulations.
+    if (atr.number_of_vertices() == 0) return LCC::null_handle;
+
+    // Check the dimension.
+    if (atr.dimension() != 3) return LCC::null_handle;
+    CGAL_assertion(atr.is_valid());
+
+    typedef typename Triangulation::Vertex_handle    TVertex_handle;
+    typedef typename Triangulation::Vertex_iterator  TVertex_iterator;
+    typedef typename Triangulation::Cell_iterator    TCell_iterator;
+    typedef typename std::map
+      < TCell_iterator, typename LCC::Dart_handle >::iterator itmap_tcell;
+
+    // Create vertices in the map and associate in a map
+    // TVertex_handle and vertices in the map.
+    std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV;
+    for (TVertex_iterator itv = atr.vertices_begin();
+         itv != atr.vertices_end(); ++itv)
+    {
+      TV[itv] = alcc.create_vertex_attribute(itv->point());
+    }
+
+    // Create the tetrahedron and create a map to link Cell_iterator
+    // and tetrahedron.
+    TCell_iterator it;
+
+    std::map<typename Triangulation::Cell_handle, typename LCC::Dart_handle> TC;
+    std::map<typename Triangulation::Cell_handle, typename LCC::Dart_handle>*
+      mytc = (avol_to_dart==NULL?&TC:avol_to_dart);
+    
+    itmap_tcell maptcell_it;
+
+    typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
+    typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
+
+    for (it = atr.cells_begin(); it != atr.cells_end(); ++it)
+    {
+      /*     if (it->vertex(0) != atr.infinite_vertex() &&
+             it->vertex(1) != atr.infinite_vertex() &&
+             it->vertex(2) != atr.infinite_vertex() &&
+             it->vertex(3) != atr.infinite_vertex())
+      */
+      {
+        res = alcc.make_tetrahedron(TV[it->vertex(0)],
+                                    TV[it->vertex(1)],
+                                    TV[it->vertex(2)],
+                                    TV[it->vertex(3)]);
+
+        if ( dart==LCC::null_handle )
+        {
+          if ( it->vertex(0) == atr.infinite_vertex() )
+            dart = res;
+          else if ( it->vertex(1) == atr.infinite_vertex() )
+            dart = alcc.beta(res, 1);
+          else if ( it->vertex(2) == atr.infinite_vertex() )
+            dart = alcc.beta(res, 1, 1);
+          else if ( it->vertex(3) == atr.infinite_vertex() )
+            dart = alcc.beta(res, 2, 0);
+        }
+        
+        for (unsigned int i = 0; i < 4; ++i)
+        {
+          switch (i)
+          {
+          case 0: cur = alcc.beta(res, 1, 2); break;
+          case 1: cur = alcc.beta(res, 0, 2); break;
+          case 2: cur = alcc.beta(res, 2); break;
+          case 3: cur = res; break;
+          }
+
+          maptcell_it = mytc->find(it->neighbor(i));
+          if (maptcell_it != mytc->end())
+          {
+            switch (atr.mirror_index(it,i) )
+            {
+            case 0: neighbor = alcc.beta(maptcell_it->second, 1, 2);
+              break;
+            case 1: neighbor = alcc.beta(maptcell_it->second, 0, 2);
+              break;
+            case 2: neighbor = alcc.beta(maptcell_it->second, 2); break;
+            case 3: neighbor = maptcell_it->second; break;
+            }
+            while (alcc.temp_vertex_attribute(neighbor) !=
+                   alcc.temp_vertex_attribute(alcc.other_extremity(cur)) )
+              neighbor = alcc.beta(neighbor,1);
+            alcc.template topo_sew<3>(cur, neighbor);
+          }
+        }
+        (*mytc)[it] = res;
+      }
+    }
+    CGAL_assertion(dart!=LCC::null_handle);
+    return dart;
+  }
+
+  /** Import a given Polyhedron_3 into a Linear_cell_complex.
+   * @param alcc the linear cell complex where Polyhedron_3 will be converted.
+   * @param apoly the Polyhedron.
+   * @return A dart created during the convertion.
+   */
+  template< class LCC, class Polyhedron >
+  typename LCC::Dart_handle import_from_polyhedron_3(LCC& alcc, 
+                                                     const Polyhedron &apoly)
+  {
+    CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==3 );
+
+    typedef typename Polyhedron::Halfedge_const_handle  Halfedge_handle;
+    typedef typename Polyhedron::Facet_const_iterator   Facet_iterator;
+    typedef typename Polyhedron::Halfedge_around_facet_const_circulator
+      HF_circulator;
+
+    typedef std::map < Halfedge_handle, typename LCC::Dart_handle> 
+      Halfedge_handle_map;
+    typedef typename Halfedge_handle_map::iterator itmap_hds;
+    Halfedge_handle_map TC;
+
+    itmap_hds it;
+    typename LCC::Dart_handle d = LCC::null_handle, prev = LCC::null_handle;
+    typename LCC::Dart_handle firstFacet = LCC::null_handle, firstAll = LCC::null_handle;
+
+    // First traversal to build the darts and link them.
+    for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
+    {
+      HF_circulator j = i->facet_begin();
+      prev = LCC::null_handle;
+      do
+      {
+        d = alcc.create_dart();
+        TC[j] = d;
+      
+        if (prev != LCC::null_handle) alcc.template link_beta<1>(prev, d);
+        else firstFacet = d;
+        it = TC.find(j->opposite());
+        if (it != TC.end())
+          alcc.template link_beta<2>(d, it->second);
+        prev = d;
+      }
+      while (++j != i->facet_begin());
+      alcc.template link_beta<1>(prev, firstFacet);
+      if (firstAll == LCC::null_handle) firstAll = firstFacet;
+    }
+
+    // Second traversal to update the geometry.
+    // We run one again through the facets of the HDS.
+    for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
+    {
+      HF_circulator j = i->facet_begin();
+      do
+      {
+        d = TC[j]; // Get the dart associated to the Halfedge
+        if (alcc.temp_vertex_attribute(d) == LCC::null_handle)
+        {
+          alcc.set_vertex_attribute
+            (d, alcc.create_vertex_attribute(j->opposite()->vertex()->point()));
+        }
+      }
+      while (++j != i->facet_begin());
+    }
+    return firstAll;
+  }
+
+  template < class LCC >
+  void load_off(LCC& alcc, std::istream& in)
+  {
+    File_header_OFF  m_file_header;
+    File_scanner_OFF scanner( in, m_file_header.verbose());
+    if ( ! in) return;
+    m_file_header = scanner;  // Remember file header after return.
+
+    Linear_cell_complex_incremental_builder_3<LCC> B( alcc);
+    B.begin_surface( scanner.size_of_vertices(),
+                     scanner.size_of_facets(),
+                     scanner.size_of_halfedges());
+
+    typedef typename LCC::Point Point;
+
+    // read in all vertices
+    std::size_t  i;
+    for ( i = 0; i < scanner.size_of_vertices(); i++) {
+      Point p;
+      file_scan_vertex( scanner, p);
+      B.add_vertex( p);
+      scanner.skip_to_next_vertex( i);
+    }
+    /* TODO rollback
+       if ( ! in  || B.error()) {
+       B.rollback();
+       in.clear( std::ios::badbit);
+       return;
+       }
+    */
+
+    // read in all facets
+    for ( i = 0; i < scanner.size_of_facets(); i++)
+    {
+      B.begin_facet();
+      std::size_t no;
+      scanner.scan_facet( no, i);
+      /* TODO manage errors
+         if( ! in || B.error() || no < 3) {
+         if ( scanner.verbose()) {
+         std::cerr << " " << std::endl;
+         std::cerr << "Polyhedron_scan_OFF<Traits>::" << std::endl;
+         std::cerr << "operator()(): input error: facet " << i
+         << " has less than 3 vertices." << std::endl;
+         }
+         B.rollback();
+         in.clear( std::ios::badbit);
+         return;
+         } */
+      for ( std::size_t j = 0; j < no; j++) {
+        std::size_t index;
+        scanner.scan_facet_vertex_index( index, i);
+        B.add_vertex_to_facet( index);
+      }
+      B.end_facet();
+      scanner.skip_to_next_facet( i);
+    }
+    /* TODO manage errors
+       if ( ! in  || B.error()) {
+       B.rollback();
+       in.clear( std::ios::badbit);
+       return;
+       }
+       if ( B.check_unconnected_vertices()) {
+       if ( ! B.remove_unconnected_vertices()) {
+       if ( scanner.verbose()) {
+       std::cerr << " " << std::endl;
+       std::cerr << "Polyhedron_scan_OFF<Traits>::" << std::endl;
+       std::cerr << "operator()(): input error: cannot "
+       "succesfully remove isolated vertices."
+       << std::endl;
+       }
+       B.rollback();
+       in.clear( std::ios::badbit);
+       return;
+       }
+       }*/
+    B.end_surface();
+  }
+
+  /** Convert a Polyhedron_3 read into a flux into 3D linear cell complex.
+   * @param alcc the linear cell complex where Polyhedron_3 will be converted.
+   * @param ais the istream where read the Polyhedron_3.
+   * @return A dart created during the convertion.
+   */
+  template < class LCC >
+  typename LCC::Dart_handle
+  import_from_polyhedron_3_flux(LCC& alcc, std::istream& ais)
+  {
+    if (!ais.good())
+    {
+      std::cout << "Error reading flux." << std::endl;
+      return LCC::null_handle;
+    }
+    CGAL::Polyhedron_3<typename LCC::Traits> P;
+    ais >> P;
+    return import_from_polyhedron_3<LCC, CGAL::Polyhedron_3
+                                    <typename LCC::Traits> > (alcc, P);
+  }
+
+  /** Export the alcc in off file format. If dimension>2, export all faces but only once.
+   */
+  template < class LCC >
+  void write_off(LCC& alcc, std::ostream& out)
+  {
+    File_header_OFF header(false);
+    header.set_binary(is_binary( out));
+    header.set_no_comments(!is_pretty( out));
+    File_writer_OFF writer( header);
+    writer.header().set_polyhedral_surface(true);
+    writer.header().set_halfedges( alcc.number_of_darts());
+
+    // Print header.
+    writer.write_header( out,
+                         alcc.number_of_vertex_attributes(),
+                         alcc.number_of_darts(),
+                         alcc.template one_dart_per_cell<2>().size() );
+
+    typedef typename LCC::Vertex_attribute_range::iterator VCI;
+    VCI vit, vend = alcc.vertex_attributes().end();
+    for ( vit = alcc.vertex_attributes().begin(); vit!=vend; ++vit )
+    {
+      writer.write_vertex( ::CGAL::to_double( vit->point().x()),
+                           ::CGAL::to_double( vit->point().y()),
+                           ::CGAL::to_double( vit->point().z()));
+    }
+
+    typedef Inverse_index< VCI > Index;
+    Index index( alcc.vertex_attributes().begin(),
+                 alcc.vertex_attributes().end());
+    writer.write_facet_header();
+
+    typename LCC::size_type m = alcc.get_new_mark();
+
+    for ( typename LCC::Dart_range::iterator itall = alcc.darts().begin(),
+            itallend = alcc.darts().end(); itall!=itallend; ++itall )
+    {
+      if ( !alcc.is_marked(itall, m) )
+      {
+        std::size_t n = 0;
+        // First we count the number of vertices of the face.
+        for ( typename LCC::template Dart_of_orbit_range<1>::iterator
+                itf=alcc.template darts_of_orbit<1>(itall).begin(),
+                itfend=alcc.template darts_of_orbit<1>(itall).end();
+              itf!=itfend; ++itf, ++n );
+
+        CGAL_assertion( n>=3 );
+        writer.write_facet_begin(n);
+
+        // Second we write the indices of vertices.
+        for ( typename LCC::template Dart_of_orbit_range<1>::iterator
+                itf=alcc.template darts_of_orbit<1>(itall).begin(),
+                itfend=alcc.template darts_of_orbit<1>(itall).end();
+              itf!=itfend; ++itf )
+        {
+          // TODO case with index
+          writer.write_facet_vertex_index(index[VCI(alcc.vertex_attribute(itf))]);
+
+          for ( typename LCC::template Dart_of_involution_basic_range<1>::iterator
+                  itinv=alcc.template darts_of_involution_basic<1>(itf, m).begin(),
+                  itinvend=alcc.template darts_of_involution_basic<1>(itf, m).end();
+                itinv!=itinvend; ++itinv )
+            alcc.mark(itinv, m);
+        }
+        writer.write_facet_end();
+      }
+    }
+    writer.write_footer();
+    alcc.free_mark(m);
+  }
+
+} // namespace CGAL
+
+#endif // CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_incremental_builder.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_incremental_builder.h
new file mode 100644
index 0000000..58da818
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_incremental_builder.h
@@ -0,0 +1,161 @@
+// Copyright (c) 2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H
+#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H 1
+
+#include <CGAL/Linear_cell_complex.h>
+#include <vector>
+#include <cstddef>
+
+namespace CGAL {
+  template < class LCC_ >
+  class Linear_cell_complex_incremental_builder_3
+  {
+  public:
+    typedef LCC_ LCC;
+    typedef typename LCC::Dart_handle             Dart_handle;
+    typedef typename LCC::Vertex_attribute_handle Vertex_attribute_handle;
+    typedef typename LCC::Point                   Point_3;
+    typedef typename LCC::size_type               size_type;
+
+    Linear_cell_complex_incremental_builder_3(LCC & alcc) :
+      lcc(alcc)
+    {}
+
+    Vertex_attribute_handle add_vertex (const Point_3& p)
+    {
+      Vertex_attribute_handle res = lcc.create_vertex_attribute(p);
+      vertex_map.push_back(res);
+      vertex_to_dart_map.push_back(std::vector<Dart_handle>());
+      ++new_vertices;
+      return res;
+    }
+
+    void begin_facet()
+    {
+      first_dart = lcc.null_handle;
+      prev_dart  = lcc.null_handle;
+      // std::cout<<"Begin facet: "<<std::flush;
+    }
+
+    void add_vertex_to_facet(size_type i)
+    {
+      CGAL_assertion( i<new_vertices );
+      // std::cout<<i<<"  "<<std::flush;
+      Dart_handle cur = lcc.create_dart(vertex_map[i]);
+
+      if ( prev_dart!=lcc.null_handle )
+      {
+        lcc.template link_beta<1>(prev_dart, cur);
+
+        Dart_handle opposite=find_dart_between(i,lcc.temp_vertex_attribute(prev_dart));
+        if ( opposite!=lcc.null_handle )
+        {
+          CGAL_assertion( lcc.template is_free<2>(opposite) );
+          lcc.template link_beta<2>(prev_dart, opposite);
+        }
+
+        add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
+      }
+      else
+      {
+        first_dart   = cur;
+        first_vertex = i;
+      }
+
+      prev_dart   = cur;
+      prev_vertex = i;
+    }
+
+    // End of the facet. Return the first dart of this facet.
+    Dart_handle end_facet()
+    {
+      CGAL_assertion( first_dart!=lcc.null_handle && prev_dart!=lcc.null_handle );
+      lcc.template link_beta<1>(prev_dart, first_dart);
+
+      Dart_handle opposite =
+        find_dart_between(first_vertex,lcc.temp_vertex_attribute(prev_dart));
+      if ( opposite!=lcc.null_handle )
+      {
+        CGAL_assertion( lcc.template is_free<2>(opposite) );
+        lcc.template link_beta<2>(prev_dart, opposite);
+      }
+
+      add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
+
+      return first_dart;
+      // std::cout<<"  end facet."<<std::endl;
+    }
+
+    void begin_surface( std::size_t v, std::size_t /*f*/, std::size_t /*h*/)
+    {
+      new_vertices  = 0;
+      first_dart    = lcc.null_handle;
+      prev_dart     = lcc.null_handle;
+      vertex_map.clear();
+      vertex_to_dart_map.clear();
+      vertex_map.reserve(v);
+      vertex_to_dart_map.reserve(v);
+      // lcc.reserve(v,h);
+    }
+
+    // End of the surface. Return one dart of the created surface.
+    Dart_handle end_surface()
+    { return first_dart; }
+
+  protected:
+
+    Dart_handle find_dart_between(size_type i, Vertex_attribute_handle vh)
+    {
+      typename std::vector<Dart_handle>::reverse_iterator
+        it(vertex_to_dart_map[i].rbegin());
+      typename std::vector<Dart_handle>::reverse_iterator
+        itend(vertex_to_dart_map[i].rend());
+
+      for ( ; it!=itend; ++it )
+      {
+        if ( lcc.temp_vertex_attribute(lcc.template beta<1>(*it))==vh ) return (*it);
+      }
+      return lcc.null_handle;
+    }
+
+    void add_dart_in_vertex_to_dart_map( Dart_handle adart, size_type i )
+    {
+      CGAL_assertion( adart!=lcc.null_handle );
+      CGAL_assertion( !lcc.template is_free<1>(adart) );
+      vertex_to_dart_map[i].push_back(adart);
+    }
+
+  private:
+    std::vector<Vertex_attribute_handle> vertex_map;
+    std::vector<std::vector<Dart_handle> > vertex_to_dart_map;
+
+    LCC&                      lcc;
+    Dart_handle               first_dart;
+    Dart_handle               prev_dart;
+    size_type                 first_vertex;
+    size_type                 prev_vertex;
+    size_type                 new_vertices;
+  };
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_min_items.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_min_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_min_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_min_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_operations.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_operations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_operations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_operations.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_storages.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_storages.h
new file mode 100644
index 0000000..0ef557b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_storages.h
@@ -0,0 +1,450 @@
+// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_LINEAR_CELL_COMPLEX_STORAGES_H
+#define CGAL_LINEAR_CELL_COMPLEX_STORAGES_H 1
+
+#include <CGAL/Combinatorial_map_storages.h>
+
+#include <boost/config.hpp>
+#if  (BOOST_GCC >= 50000)
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Warray-bounds\"")
+#endif
+
+namespace CGAL {
+
+  /** @file Linear_cell_complex_storages.h
+   * Definition of storages for dD Linear cell complex.
+   */
+
+  // Storage of darts with compact container, beta with handles
+  // Copy of Combinatorial_map_storage_1 and add new types related
+  // to geometry (not possible to inherith because we use Self type
+  // as template parameter of Dart_wrapper. If we inherit, Self is not
+  // the correct type.)
+  template<unsigned int d_, unsigned int ambient_dim,
+           class Traits_, class Items_, class Alloc_ >
+  class Linear_cell_complex_storage_1
+  {
+  public:
+    typedef typename Traits_::Point  Point;
+    typedef typename Traits_::Vector Vector;
+    typedef typename Traits_::FT     FT;
+
+    typedef Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+    Items_, Alloc_> Self;
+    typedef CGAL::Tag_false Use_index;
+
+    typedef internal::Combinatorial_map_helper<Self> Helper;
+
+    typedef typename Items_::template Dart_wrapper<Self>  Dart_wrapper;
+    typedef typename Dart_wrapper::Dart                   Dart;
+    typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
+
+    typedef Compact_container<Dart,Dart_allocator>  Dart_container;
+
+    typedef typename Dart_container::iterator       Dart_handle;
+    typedef typename Dart_container::const_iterator Dart_const_handle;
+    typedef typename Dart_container::size_type      size_type;
+
+    typedef CGAL::Void* Null_handle_type;
+    static Null_handle_type null_handle;
+
+    typedef Items_ Items;
+    typedef Alloc_ Alloc;
+
+    template <typename T>
+    struct Container_for_attributes :
+        public Compact_container<T, typename Alloc_::template rebind<T>::other>
+    {};
+
+    /// Typedef for attributes
+    typedef typename Dart_wrapper::Attributes Attributes;
+
+    template<int i>
+    struct Attribute_type: public Helper::template Attribute_type<i>
+    {};
+    template<int i>
+    struct Attribute_handle: public Helper::template Attribute_handle<i>
+    {};
+    template<int i>
+    struct Attribute_const_handle:
+        public Helper::template Attribute_const_handle<i>
+    {};
+    template<int i>
+    struct Attribute_range: public Helper::template Attribute_range<i>
+    {};
+    template<int i>
+    struct Attribute_const_range:
+        public Helper::template Attribute_const_range<i>
+    {};
+
+    typedef typename Attribute_type<0>::type Vertex_attribute;
+    typedef typename Attribute_handle<0>::type Vertex_attribute_handle;
+    typedef typename Attribute_const_handle<0>::type
+    Vertex_attribute_const_handle;
+
+    typedef typename Attribute_range<0>::type Vertex_attribute_range;
+    typedef typename Attribute_const_range<0>::type
+    Vertex_attribute_const_range;
+
+    /// Number of marks
+    static const size_type NB_MARKS = 32;
+
+    /// The dimension of the combinatorial map.
+    static const unsigned int dimension = d_;
+
+    typedef Handle_hash_function Hash_function;
+
+    // Init
+    void init_storage()
+    {
+#ifdef CGAL_CMAP_DEPRECATED
+      // We must do this ony once, but problem because null_dart_handle
+      // is static !
+      if ( mnull_dart_container.empty() )
+#endif // CGAL_CMAP_DEPRECATED
+      { // emplace null_dart; initialized in Combinatorial_map class
+        null_dart_handle = mnull_dart_container.emplace();
+      }
+    }
+
+    /** Return if this dart is free for adimension.
+       * @param dh a dart handle
+       * @param i the dimension.
+       * @return true iff dh is linked with NULL for \em adimension.
+       */
+    template<unsigned int i>
+    bool is_free(Dart_const_handle dh) const
+    {
+      CGAL_assertion( dh!=NULL );
+      CGAL_assertion(i <= dimension);
+      return dh->mbeta[i]==null_dart_handle;
+    }
+    bool is_free(Dart_const_handle dh, unsigned int i) const
+    {
+      CGAL_assertion( dh!=NULL );
+      CGAL_assertion(i <= dimension);
+      return dh->mbeta[i]==null_dart_handle;
+    }
+
+    /// Set simultaneously all the marks of this dart to a given value.
+    void set_dart_marks(Dart_const_handle ADart,
+                        const std::bitset<NB_MARKS>& amarks) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->set_marks(amarks);
+    }
+    /// Return all the marks of a dart.
+    std::bitset<NB_MARKS> get_dart_marks(Dart_const_handle ADart) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      return ADart->get_marks();
+    }
+    /// Return the mark value of dart a given mark number.
+    bool get_dart_mark(Dart_const_handle ADart, size_type amark) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      return ADart->get_mark(amark);
+    }
+
+    /// Set the mark of a given mark number to a given value.
+    void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->set_mark(amark, avalue);
+    }
+
+    /// Flip the mark of a given mark number to a given value.
+    void flip_dart_mark(Dart_const_handle ADart, size_type amark) const
+    {
+      CGAL_assertion( ADart!=NULL );
+      ADart->flip_mark(amark);
+    }
+
+    // Access to beta maps
+    Dart_handle get_beta(Dart_handle ADart, int B1)
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return ADart->mbeta[B1];
+    }
+    Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+    template<int B1>
+    Dart_handle get_beta(Dart_handle ADart)
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+    template<int B1>
+    Dart_const_handle get_beta(Dart_const_handle ADart) const
+    {
+      CGAL_assertion(ADart!=NULL && B1>=0 && B1<=(int)dimension);
+      return  ADart->mbeta[B1];
+    }
+
+    // return a handle on the i-attribute
+    template<unsigned int i>
+    typename Attribute_handle<i>::type attribute(Dart_handle ADart)
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                       "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+          (ADart->mattribute_handles);
+    }
+    template<unsigned int i>
+    typename Attribute_const_handle<i>::type
+    attribute(Dart_const_handle ADart) const
+    {
+      CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
+                       "attribute<i> called but i-attributes are disabled.");
+      return CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+          (ADart->mattribute_handles);
+    }
+
+    // get the attribute given its handle
+    template<unsigned int i>
+    typename Attribute_type<i>::type& get_attribute
+    (typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type&
+    get_attribute(typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+
+    Dart & get_dart(Dart_handle ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+    const Dart & get_dart(Dart_const_handle ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return *ah;
+    }
+
+    // Get the dart of the given attribute
+    template<unsigned int i>
+    Dart_handle dart_of_attribute(typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->dart();
+    }
+    template<unsigned int i>
+    Dart_const_handle dart_of_attribute
+    (typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->dart();
+    }
+
+    // Set the dart of the given attribute
+    template<unsigned int i>
+    void set_dart_of_attribute(typename Attribute_handle<i>::type ah,
+                               Dart_handle adart)
+    {
+      CGAL_assertion( ah!=NULL );
+      ah->set_dart(adart);
+    }
+
+    // Get the info of the given attribute
+    template<unsigned int i>
+    typename Attribute_type<i>::type::Info &
+    info_of_attribute(typename Attribute_handle<i>::type ah)
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->info();
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type::Info &
+    info_of_attribute(typename Attribute_const_handle<i>::type ah) const
+    {
+      CGAL_assertion( ah!=NULL );
+      return ah->info();
+    }
+
+    // Get the info of the given dart
+    template<unsigned int i>
+    typename Attribute_type<i>::type::Info & info(Dart_handle adart)
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return info_of_attribute<i>(attribute<i>(adart));
+    }
+    template<unsigned int i>
+    const typename Attribute_type<i>::type::Info &
+    info(Dart_const_handle adart) const
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return info_of_attribute<i>(attribute<i>(adart));
+    }
+
+    // Get the dart of the i-cell attribute associated with the given dart
+    template<unsigned int i>
+    Dart_handle & dart(Dart_handle adart)
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return dart_of_attribute<i>(attribute<i>(adart));
+    }
+    template<unsigned int i>
+    Dart_const_handle dart(Dart_const_handle adart) const
+    {
+      CGAL_assertion( adart!=NULL );
+      CGAL_assertion( attribute<i>(adart)!=NULL );
+      return dart_of_attribute<i>(attribute<i>(adart));
+    }
+
+    // Get the dart of the given 0-attribute
+    Point & point_of_vertex_attribute(typename Attribute_handle<0>::type vh)
+    {
+      CGAL_assertion( vh!=NULL );
+      return get_attribute<0>(vh).point();
+    }
+
+    const Point & point_of_vertex_attribute
+    (typename Attribute_const_handle<0>::type vh) const
+    {
+      CGAL_assertion( vh!=NULL );
+      return get_attribute<0>(vh).point();
+    }
+
+    void display_dart(Dart_const_handle ADart) const
+    { std::cout<<&*ADart; }
+
+    template<unsigned int i>
+    void display_attribute(typename Attribute_const_handle<i>::type ah) const
+    { std::cout<<&*ah; }
+
+  protected:
+    // Set the handle on the i th attribute
+    template<unsigned int i>
+    void basic_set_dart_attribute(Dart_handle dh,
+                                  typename Attribute_handle<i>::type ah)
+    {
+      CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
+          (dh->mattribute_handles) = ah;
+    }
+
+    /** Link a dart with a given dart for a given dimension.
+       * @param adart the dart to link.
+       * @param adart2 the dart to link with.
+       * @param i the dimension.
+       */
+    template<unsigned int i>
+    void dart_link_beta(Dart_handle adart, Dart_handle adart2)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(adart!=NULL && adart2!=NULL);
+      CGAL_assertion(adart!=null_dart_handle);
+      adart->mbeta[i] = adart2;
+    }
+    void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i)
+    {
+      CGAL_assertion(i <= dimension);
+      CGAL_assertion(adart!=NULL && adart2!=NULL);
+      CGAL_assertion(adart!=null_dart_handle);
+      adart->mbeta[i] = adart2;
+    }
+
+    /** Unlink a dart for a given dimension.
+       * @param adart a dart.
+       * @param i the dimension.
+       */
+    template<unsigned int i>
+    void dart_unlink_beta(Dart_handle adart)
+    {
+      CGAL_assertion(adart!=NULL && i <= dimension);
+      adart->mbeta[i] = null_dart_handle;
+    }
+    void dart_unlink_beta(Dart_handle adart, unsigned int i)
+    {
+      CGAL_assertion(adart!=NULL && i <= dimension);
+      adart->mbeta[i] = null_dart_handle;
+    }
+
+  public:
+    /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle.
+#ifdef CGAL_CMAP_DEPRECATED
+    static
+#endif // CGAL_CMAP_DEPRECATED
+    Dart_handle null_dart_handle; // Todo Dart_const_handle ??
+
+  protected:
+    /// Dart container.
+    Dart_container mdarts;
+
+    /// Container for the null_dart_handle, static data member.
+#ifdef CGAL_CMAP_DEPRECATED
+    static
+#endif // CGAL_CMAP_DEPRECATED
+    Dart_container mnull_dart_container;
+
+    /// Tuple of attributes containers
+    typename Helper::Attribute_containers mattribute_containers;
+  };
+
+  /// null_handle
+  template <unsigned int d_, unsigned int ambient_dim,
+           class Traits_, class Items_, class Alloc_ >
+  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                         Items_, Alloc_>::Null_handle_type
+  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                Items_, Alloc_>::null_handle = NULL;
+
+#ifdef CGAL_CMAP_DEPRECATED
+  /// Allocation of static data members
+  /// mnull_dart_container
+  template <unsigned int d_, unsigned int ambient_dim,
+           class Traits_, class Items_, class Alloc_ >
+  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                         Items_, Alloc_>::Dart_container
+  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                         Items_, Alloc_>::mnull_dart_container;
+
+  /// null_dart_handle
+  template <unsigned int d_, unsigned int ambient_dim,
+           class Traits_, class Items_, class Alloc_ >
+  typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                         Items_, Alloc_>::Dart_handle
+  Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
+                                         Items_, Alloc_>::null_dart_handle;
+  // =  mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
+  // Does not work on windows => segfault
+  // Thus we initialize null_dart_handle in the Combinatorial_map constructor
+#endif // CGAL_CMAP_DEPRECATED
+
+} // namespace CGAL
+
+#if  (BOOST_GCC >= 50000)
+ _Pragma("GCC diagnostic pop")
+#endif
+#endif // CGAL_LINEAR_CELL_COMPLEX_STORAGES_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Linear_cell_complex_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Linear_cell_complex_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Location_policy.h b/3rdparty/CGAL-4.8/include/CGAL/Location_policy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Location_policy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Location_policy.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/MP_Float.h b/3rdparty/CGAL-4.8/include/CGAL/MP_Float.h
new file mode 100644
index 0000000..0e1312b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/MP_Float.h
@@ -0,0 +1,912 @@
+// Copyright (c) 2001-2007  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_MP_FLOAT_H
+#define CGAL_MP_FLOAT_H
+
+#include <CGAL/number_type_basic.h>
+#include <CGAL/Algebraic_structure_traits.h>
+#include <CGAL/Real_embeddable_traits.h>
+#include <CGAL/Coercion_traits.h>
+#include <CGAL/Quotient.h>
+#include <CGAL/Sqrt_extension.h>
+
+#include <CGAL/utils.h>
+
+#include <CGAL/Interval_nt.h>
+#include <iostream>
+#include <vector>
+#include <algorithm>
+
+// MP_Float : multiprecision scaled integers.
+
+// Some invariants on the internal representation :
+// - zero is represented by an empty vector, and whatever exp.
+// - no leading or trailing zero in the vector => unique
+
+// The main algorithms are :
+// - Addition/Subtraction
+// - Multiplication
+// - Integral division div(), gcd(), operator%().
+// - Comparison
+// - to_double() / to_interval()
+// - Construction from a double.
+// - IOs
+
+// TODO :
+// - The exponent really overflows sometimes -> make it multiprecision.
+// - Write a generic wrapper that adds an exponent to be used by MP integers.
+// - Karatsuba (or other) ?  Would be fun to implement at least.
+// - Division, sqrt... : different options :
+//   - nothing
+//   - convert to double, take approximation, compute over double, reconstruct
+
+namespace CGAL {
+
+class MP_Float;
+
+template < typename > class Quotient; // Needed for overloaded To_double
+
+namespace INTERN_MP_FLOAT {
+
+Comparison_result compare(const MP_Float&, const MP_Float&);
+
+MP_Float square(const MP_Float&);
+
+// to_double() returns, not the closest double, but a one bit error is allowed.
+// We guarantee : to_double(MP_Float(double d)) == d.
+
+double to_double(const MP_Float&);
+
+double to_double(const Quotient<MP_Float>&);
+
+std::pair<double,double> to_interval(const MP_Float &);
+
+std::pair<double,double> to_interval(const Quotient<MP_Float>&);
+
+MP_Float div(const MP_Float& n1, const MP_Float& n2);
+
+MP_Float gcd(const MP_Float& a, const MP_Float& b);
+  
+} //namespace INTERN_MP_FLOAT
+
+std::pair<double, int>
+to_double_exp(const MP_Float &b);
+
+// Returns (first * 2^second), an interval surrounding b.
+std::pair<std::pair<double, double>, int>
+to_interval_exp(const MP_Float &b);
+
+std::ostream &
+operator<< (std::ostream & os, const MP_Float &b);
+
+// This one is for debug.
+std::ostream &
+print (std::ostream & os, const MP_Float &b);
+
+std::istream &
+operator>> (std::istream & is, MP_Float &b);
+
+MP_Float operator+(const MP_Float &a, const MP_Float &b);
+
+MP_Float operator-(const MP_Float &a, const MP_Float &b);
+
+MP_Float operator*(const MP_Float &a, const MP_Float &b);
+
+MP_Float operator%(const MP_Float &a, const MP_Float &b);
+
+
+class MP_Float
+{
+public:
+  typedef short          limb;
+  typedef unsigned short unsigned_limb;
+  typedef int            limb2;
+  typedef double         exponent_type;
+
+  typedef std::vector<limb>  V;
+  typedef V::const_iterator  const_iterator;
+  typedef V::iterator        iterator;
+
+private:
+
+  void remove_leading_zeros()
+  {
+    while (!v.empty() && v.back() == 0)
+      v.pop_back();
+  }
+
+  void remove_trailing_zeros()
+  {
+    if (v.empty() || v.front() != 0)
+      return;
+
+    iterator i = v.begin();
+    for (++i; *i == 0; ++i)
+      ;
+    exp += i-v.begin();
+    v.erase(v.begin(), i);
+  }
+
+  // The constructors from float/double/long_double are factorized in the
+  // following template :
+  template < typename T >
+  void construct_from_builtin_fp_type(T d);
+
+public:
+#ifdef CGAL_ROOT_OF_2_ENABLE_HISTOGRAM_OF_NUMBER_OF_DIGIT_ON_THE_COMPLEX_CONSTRUCTOR
+    int tam() const { return v.size(); }
+#endif
+
+  // Splits a limb2 into 2 limbs (high and low).
+  static
+  void split(limb2 l, limb & high, limb & low)
+  {
+    const unsigned int sizeof_limb=8*sizeof(limb);
+    const limb2 mask = 0x0000ffff;
+   
+    //Note: For Integer type, if the destination type is signed, the value is unchanged 
+    //if it can be represented in the destination type)
+    low=static_cast<limb>(l & mask); //extract low bits from l 
+    high = (l - low) >> sizeof_limb; //extract high bits from l
+    
+    CGAL_postcondition ( l == low + ( static_cast<limb2>(high) << sizeof_limb ) );
+  }
+
+  // Given a limb2, returns the higher limb.
+  static
+  limb higher_limb(limb2 l)
+  {
+      limb high, low;
+      split(l, high, low);
+      return high;
+  }
+
+  void canonicalize()
+  {
+    remove_leading_zeros();
+    remove_trailing_zeros();
+  }
+
+  MP_Float()
+      : exp(0)
+  {
+    CGAL_assertion(sizeof(limb2)==4); // so that the above 0x0000ffff is correct
+    CGAL_assertion(sizeof(limb2) == 2*sizeof(limb));
+    CGAL_assertion(v.empty());
+    // Creates zero.
+  }
+
+#if 0
+  // Causes ambiguities
+  MP_Float(limb i)
+  : v(1,i), exp(0)
+  {
+    remove_leading_zeros();
+  }
+#endif
+
+  MP_Float(limb2 i)
+  : v(2), exp(0)
+  {
+    split(i, v[1], v[0]);
+    canonicalize();
+  }
+
+  MP_Float(float d);
+
+  MP_Float(double d);
+
+  MP_Float(long double d);
+
+  MP_Float operator+() const {
+    return *this;
+  }
+
+  MP_Float operator-() const
+  {
+    return MP_Float() - *this;
+  }
+
+  MP_Float& operator+=(const MP_Float &a) { return *this = *this + a; }
+  MP_Float& operator-=(const MP_Float &a) { return *this = *this - a; }
+  MP_Float& operator*=(const MP_Float &a) { return *this = *this * a; }
+  MP_Float& operator%=(const MP_Float &a) { return *this = *this % a; }
+
+  exponent_type max_exp() const
+  {
+    return v.size() + exp;
+  }
+
+  exponent_type min_exp() const
+  {
+    return exp;
+  }
+
+  limb of_exp(exponent_type i) const
+  {
+    if (i < exp || i >= max_exp())
+      return 0;
+    return v[static_cast<int>(i-exp)];
+  }
+
+  bool is_zero() const
+  {
+    return v.empty();
+  }
+
+  Sign sign() const
+  {
+    if (v.empty())
+      return ZERO;
+    if (v.back()>0)
+      return POSITIVE;
+    CGAL_assertion(v.back()<0);
+    return NEGATIVE;
+  }
+
+  void clear()
+  {
+    v.clear();
+    exp = 0;
+  }
+
+  void swap(MP_Float &m)
+  {
+    std::swap(v, m.v);
+    std::swap(exp, m.exp);
+  }
+
+  // Converts to a rational type (e.g. Gmpq).
+  template < typename T >
+  T to_rational() const
+  {
+    const unsigned log_limb = 8 * sizeof(MP_Float::limb);
+
+    if (is_zero())
+      return 0;
+
+    MP_Float::const_iterator i;
+    exponent_type exp2 = min_exp() * log_limb;
+    T res = 0;
+
+    for (i = v.begin(); i != v.end(); ++i)
+    {
+      res += T(std::ldexp(static_cast<double>(*i),static_cast<int>(exp2)));
+      exp2 += log_limb;
+    }
+
+    return res;
+  }
+
+  std::size_t size() const
+  {
+    return v.size();
+  }
+
+  // Returns a scaling factor (in limbs) which would be good to extract to get
+  // a value with an exponent close to 0.
+  exponent_type find_scale() const
+  {
+    return exp + v.size();
+  }
+
+  // Rescale the value by some factor (in limbs).  (substract the exponent)
+  void rescale(exponent_type scale)
+  {
+    if (v.size() != 0)
+      exp -= scale;
+  }
+
+  // Accessory function that finds the least significant bit set (its position).
+  static unsigned short 
+  lsb(limb l)
+  {
+    unsigned short nb = 0;
+    for (; (l&1)==0; ++nb, l>>=1)
+      ;
+    return nb;
+  }
+
+  // This one is needed for normalizing gcd so that the mantissa is odd
+  // and non-negative, and the exponent is 0.
+  void gcd_normalize()
+  {
+    const unsigned log_limb = 8 * sizeof(MP_Float::limb);
+    if (is_zero())
+      return;
+    // First find how many least significant bits are 0 in the last digit.
+    unsigned short nb = lsb(v[0]);
+    if (nb != 0)
+      *this = *this * (1<<(log_limb-nb));
+    CGAL_assertion((v[0]&1) != 0);
+    exp=0;
+    if (sign() == NEGATIVE)
+      *this = - *this;
+  }
+
+  MP_Float unit_part() const
+  {
+    if (is_zero())
+      return 1;
+    MP_Float r = (sign() > 0) ? *this : - *this;
+    CGAL_assertion(r.v.begin() != r.v.end());
+    unsigned short nb = lsb(r.v[0]);
+    r.v.clear();
+    r.v.push_back(1<<nb);
+    return (sign() > 0) ? r : -r;
+  }
+
+  bool is_integer() const
+  {
+    return is_zero() || (exp >= 0);
+  }
+
+  V v;
+  exponent_type exp;
+};
+
+namespace internal{
+std::pair<MP_Float, MP_Float> // <quotient, remainder>
+division(const MP_Float & n, const MP_Float & d);
+} // namespace internal
+
+inline
+void swap(MP_Float &m, MP_Float &n)
+{ m.swap(n); }
+
+inline
+bool operator<(const MP_Float &a, const MP_Float &b)
+{ return INTERN_MP_FLOAT::compare(a, b) == SMALLER; }
+
+inline
+bool operator>(const MP_Float &a, const MP_Float &b)
+{ return b < a; }
+
+inline
+bool operator>=(const MP_Float &a, const MP_Float &b)
+{ return ! (a < b); }
+
+inline
+bool operator<=(const MP_Float &a, const MP_Float &b)
+{ return ! (a > b); }
+
+inline
+bool operator==(const MP_Float &a, const MP_Float &b)
+{ return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); }
+
+inline
+bool operator!=(const MP_Float &a, const MP_Float &b)
+{ return ! (a == b); }
+
+MP_Float
+approximate_sqrt(const MP_Float &d);
+
+MP_Float
+approximate_division(const MP_Float &n, const MP_Float &d);
+
+
+
+// Algebraic structure traits specialization
+template <> class Algebraic_structure_traits< MP_Float >
+  : public Algebraic_structure_traits_base< MP_Float,
+                                            Unique_factorization_domain_tag
+	    // with some work on mod/div it could be Euclidean_ring_tag
+                                          >  {
+  public:
+
+    typedef Tag_true            Is_exact;
+    typedef Tag_true            Is_numerical_sensitive;
+
+    struct Unit_part
+      : public std::unary_function< Type , Type >
+    {
+      Type operator()(const Type &x) const {
+        return x.unit_part();
+      }
+    };
+
+    struct Integral_division
+        : public std::binary_function< Type,
+                                 Type,
+                                 Type > {
+    public:
+        Type operator()(
+                const Type& x,
+                const Type& y ) const {
+            std::pair<MP_Float, MP_Float> res = internal::division(x, y);
+            CGAL_assertion_msg(res.second == 0,
+                "exact_division() called with operands which do not divide");
+            return res.first;
+        }
+    };
+
+
+    class Square
+      : public std::unary_function< Type, Type > {
+      public:
+        Type operator()( const Type& x ) const {
+          return INTERN_MP_FLOAT::square(x);
+        }
+    };
+
+    class Gcd
+      : public std::binary_function< Type, Type,
+                                Type > {
+      public:
+        Type operator()( const Type& x,
+                                        const Type& y ) const {
+          return INTERN_MP_FLOAT::gcd( x, y );
+        }
+    };
+
+    class Div
+      : public std::binary_function< Type, Type,
+                                Type > {
+      public:
+        Type operator()( const Type& x,
+                                        const Type& y ) const {
+          return INTERN_MP_FLOAT::div( x, y );
+        }
+    };
+
+  typedef INTERN_AST::Mod_per_operator< Type > Mod;
+// Default implementation of Divides functor for unique factorization domains
+  // x divides y if gcd(y,x) equals x up to inverses 
+  class Divides 
+    : public std::binary_function<Type,Type,bool>{ 
+  public:
+    bool operator()( const Type& x,  const Type& y) const {  
+      return internal::division(y,x).second == 0 ;
+    }
+    // second operator computing q = x/y 
+    bool operator()( const Type& x,  const Type& y, Type& q) const {    
+      std::pair<Type,Type> qr = internal::division(y,x);
+      q=qr.first;
+      return qr.second == 0;
+      
+    }
+    CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( Type , bool)
+  };
+};
+
+// Real embeddable traits
+template <> class Real_embeddable_traits< MP_Float >
+  : public INTERN_RET::Real_embeddable_traits_base< MP_Float , CGAL::Tag_true > {
+  public:
+
+    class Sgn
+      : public std::unary_function< Type, ::CGAL::Sign > {
+      public:
+        ::CGAL::Sign operator()( const Type& x ) const {
+          return x.sign();
+        }
+    };
+
+    class Compare
+      : public std::binary_function< Type, Type,
+                                Comparison_result > {
+      public:
+        Comparison_result operator()( const Type& x,
+                                            const Type& y ) const {
+          return INTERN_MP_FLOAT::compare( x, y );
+        }
+    };
+
+    class To_double
+      : public std::unary_function< Type, double > {
+      public:
+        double operator()( const Type& x ) const {
+          return INTERN_MP_FLOAT::to_double( x );
+        }
+    };
+
+    class To_interval
+      : public std::unary_function< Type, std::pair< double, double > > {
+      public:
+        std::pair<double, double> operator()( const Type& x ) const {
+          return INTERN_MP_FLOAT::to_interval( x );
+        }
+    };
+};
+
+
+
+namespace INTERN_MP_FLOAT{
+
+//Sqrt_extension internally uses Algebraic_structure_traits
+template <class ACDE_TAG_, class FP_TAG>  
+double
+to_double(const Sqrt_extension<MP_Float,MP_Float,ACDE_TAG_,FP_TAG> &x)
+{
+  typedef MP_Float RT;
+  typedef Quotient<RT> FT;
+  typedef CGAL::Rational_traits< FT > Rational;
+  Rational r;
+  const RT r1 = r.numerator(x.a0());
+  const RT d1 = r.denominator(x.a0());
+
+  if(x.is_rational()) {
+    std::pair<double, int> n = to_double_exp(r1);
+    std::pair<double, int> d = to_double_exp(d1);
+    double scale = std::ldexp(1.0, n.second - d.second);
+    return (n.first / d.first) * scale;
+  }
+
+  const RT r2 = r.numerator(x.a1());
+  const RT d2 = r.denominator(x.a1());
+  const RT r3 = r.numerator(x.root());
+  const RT d3 = r.denominator(x.root());
+
+  std::pair<double, int> n1 = to_double_exp(r1);
+  std::pair<double, int> v1 = to_double_exp(d1);
+  double scale1 = std::ldexp(1.0, n1.second - v1.second);
+
+  std::pair<double, int> n2 = to_double_exp(r2);
+  std::pair<double, int> v2 = to_double_exp(d2);
+  double scale2 = std::ldexp(1.0, n2.second - v2.second);
+
+  std::pair<double, int> n3 = to_double_exp(r3);
+  std::pair<double, int> v3 = to_double_exp(d3);
+  double scale3 = std::ldexp(1.0, n3.second - v3.second);
+
+  return ((n1.first / v1.first) * scale1) + 
+         ((n2.first / v2.first) * scale2) *
+         std::sqrt((n3.first / v3.first) * scale3);
+}
+
+} //namespace INTERN_MP_FLOAT
+
+
+namespace internal {
+// This compares the absolute values of the odd-mantissa.
+// (take the mantissas, get rid of all powers of 2, compare
+// the absolute values)
+inline
+Sign
+compare_bitlength(const MP_Float &a, const MP_Float &b)
+{
+  if (a.is_zero())
+    return b.is_zero() ? EQUAL : SMALLER;
+  if (b.is_zero())
+    return LARGER;
+
+  //Real_embeddable_traits<MP_Float>::Abs abs;
+
+  MP_Float aa = CGAL_NTS abs(a);
+  MP_Float bb = CGAL_NTS abs(b);
+
+  if (aa.size() > (bb.size() + 2)) return LARGER;
+  if (bb.size() > (aa.size() + 2)) return SMALLER;
+
+  // multiply by 2 till last bit is 1.
+  while (((aa.v[0]) & 1) == 0) // last bit is zero
+    aa = aa + aa;
+
+  while (((bb.v[0]) & 1) == 0) // last bit is zero
+    bb = bb + bb;
+
+  // sizes might have changed
+  if (aa.size() > bb.size()) return LARGER;
+  if (aa.size() < bb.size()) return SMALLER;
+
+  for (std::size_t i = aa.size(); i > 0; --i)
+  {
+    if (aa.v[i-1] > bb.v[i-1]) return LARGER;
+    if (aa.v[i-1] < bb.v[i-1]) return SMALLER;
+  }
+  return EQUAL;
+}
+
+inline // Move it to libCGAL once it's stable.
+std::pair<MP_Float, MP_Float> // <quotient, remainder>
+division(const MP_Float & n, const MP_Float & d)
+{
+  typedef MP_Float::exponent_type  exponent_type;
+
+  MP_Float remainder = n, divisor = d;
+
+  CGAL_precondition(divisor != 0);
+
+  // Rescale d to have a to_double() value with reasonnable exponent.
+  exponent_type scale_d = divisor.find_scale();
+  divisor.rescale(scale_d);
+  const double dd = INTERN_MP_FLOAT::to_double(divisor);
+
+  MP_Float res = 0;
+  exponent_type scale_remainder = 0;
+
+  bool first_time_smaller_than_divisor = true;
+
+  // School division algorithm.
+
+  while ( remainder != 0 )
+  {
+    // We have to rescale, since remainder can diminish towards 0.
+    exponent_type tmp_scale = remainder.find_scale();
+    remainder.rescale(tmp_scale);
+    res.rescale(tmp_scale);
+    scale_remainder += tmp_scale;
+
+    // Compute a double approximation of the quotient
+    // (imagine school division with base ~2^53).
+    double approx = INTERN_MP_FLOAT::to_double(remainder) / dd;
+    CGAL_assertion(approx != 0);
+    res += approx;
+    remainder -= approx * divisor;
+
+    if (remainder == 0)
+      break;
+
+    // Then we need to fix it up by checking if neighboring double values
+    // are closer to the exact result.
+    // There should not be too many iterations, because approx is only a few ulps
+    // away from the optimal.
+    // If we don't do the fixup, then spurious bits can be introduced, which
+    // will require an unbounded amount of additional iterations to be eliminated.
+
+    // The direction towards which we need to try to move from "approx".
+    double direction = (CGAL_NTS sign(remainder) == CGAL_NTS sign(dd))
+                     ?  std::numeric_limits<double>::infinity()
+                     : -std::numeric_limits<double>::infinity();
+
+    while (true)
+    {
+      const double approx2 = nextafter(approx, direction);
+      const double delta = approx2 - approx;
+      MP_Float new_remainder = remainder - delta * divisor;
+      if (CGAL_NTS abs(new_remainder) < CGAL_NTS abs(remainder)) {
+        remainder = new_remainder;
+        res += delta;
+        approx = approx2;
+      }
+      else {
+        break;
+      }
+    }
+
+    if (remainder == 0)
+      break;
+
+    // Test condition for non-exact division (with remainder).
+    if (compare_bitlength(remainder, divisor) == SMALLER)
+    {
+      if (! first_time_smaller_than_divisor)
+      {
+        // Scale back.
+        res.rescale(scale_d - scale_remainder);
+        remainder.rescale(- scale_remainder);
+        CGAL_postcondition(res * d  + remainder == n);
+        return std::make_pair(res, remainder);
+      }
+      first_time_smaller_than_divisor = false;
+    }
+  }
+
+  // Scale back the result.
+  res.rescale(scale_d - scale_remainder);
+  CGAL_postcondition(res * d == n);
+  return std::make_pair(res, MP_Float(0));
+}
+
+inline // Move it to libCGAL once it's stable.
+bool
+divides(const MP_Float & d, const MP_Float & n)
+{
+  return internal::division(n, d).second == 0;
+}
+
+} // namespace internal
+
+inline
+bool
+is_integer(const MP_Float &m)
+{
+  return m.is_integer();
+}
+
+
+
+inline
+MP_Float
+operator%(const MP_Float& n1, const MP_Float& n2)
+{
+  return internal::division(n1, n2).second;
+}
+
+
+// The namespace INTERN_MP_FLOAT contains global functions like square or sqrt
+// which collide with the global functor adapting functions provided by the new
+// AST/RET concept.
+//
+// TODO: IMHO, a better solution would be to put the INTERN_MP_FLOAT-functions
+//       into the MP_Float-class... But there is surely a reason why this is not
+//       the case..?
+
+
+namespace INTERN_MP_FLOAT {
+  inline
+  MP_Float
+  div(const MP_Float& n1, const MP_Float& n2)
+  {
+    return internal::division(n1, n2).first;
+  }
+
+  inline
+  MP_Float
+  gcd( const MP_Float& a, const MP_Float& b)
+  {
+    if (a == 0) {
+      if (b == 0)
+        return 0;
+      MP_Float tmp=b;
+      tmp.gcd_normalize();
+      return tmp;
+    }
+    if (b == 0) {
+      MP_Float tmp=a;
+      tmp.gcd_normalize();
+      return tmp;
+    }
+
+    MP_Float x = a, y = b;
+    while (true) {
+      x = x % y;
+      if (x == 0) {
+        CGAL_postcondition(internal::divides(y, a) & internal::divides(y, b));
+        y.gcd_normalize();
+        return y;
+      }
+      swap(x, y);
+    }
+  }
+
+} // INTERN_MP_FLOAT
+
+
+inline
+void
+simplify_quotient(MP_Float & numerator, MP_Float & denominator)
+{
+  // Currently only simplifies the two exponents.
+#if 0
+  // This better version causes problems as the I/O is changed for
+  // Quotient<MP_Float>, which then does not appear as rational 123/345,
+  // 1.23/3.45, this causes problems in the T2 test-suite (to be investigated).
+  numerator.exp -= denominator.exp
+                    + (MP_Float::exponent_type) denominator.v.size();
+  denominator.exp = - (MP_Float::exponent_type) denominator.v.size();
+#elif 1
+  numerator.exp -= denominator.exp;
+  denominator.exp = 0;
+#else
+  if (numerator != 0 && denominator != 0) {
+    numerator.exp -= denominator.exp;
+    denominator.exp = 0;
+    const MP_Float g = gcd(numerator, denominator);
+    numerator = integral_division(numerator, g);
+    denominator = integral_division(denominator, g);
+  }
+  numerator.exp -= denominator.exp;
+  denominator.exp = 0;
+#endif
+}
+
+inline void simplify_root_of_2(MP_Float &/*a*/, MP_Float &/*b*/, MP_Float&/*c*/) {
+#if 0
+  if(is_zero(a)) {
+  	simplify_quotient(b,c); return;
+  } else if(is_zero(b)) {
+  	simplify_quotient(a,c); return;
+  } else if(is_zero(c)) {
+  	simplify_quotient(a,b); return;
+  }
+  MP_Float::exponent_type va = a.exp +
+    (MP_Float::exponent_type) a.v.size();
+  MP_Float::exponent_type vb = b.exp +
+    (MP_Float::exponent_type) b.v.size();
+  MP_Float::exponent_type vc = c.exp +
+    (MP_Float::exponent_type) c.v.size();
+  MP_Float::exponent_type min = (std::min)((std::min)(va,vb),vc);
+  MP_Float::exponent_type max = (std::max)((std::max)(va,vb),vc);
+  MP_Float::exponent_type med = (min+max)/2.0;
+  a.exp -= med;
+  b.exp -= med;
+  c.exp -= med;
+#endif
+}
+
+namespace internal {
+  inline void simplify_3_exp(int &a, int &b, int &c) {
+    int min = (std::min)((std::min)(a,b),c);
+    int max = (std::max)((std::max)(a,b),c);
+    int med = (min+max)/2;
+    a -= med;
+    b -= med;
+    c -= med;
+  }
+}
+
+
+// specialization of to double functor
+template<>
+class Real_embeddable_traits< Quotient<MP_Float> >
+    : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base<
+Quotient<MP_Float> >{
+public:
+    struct To_double: public std::unary_function<Quotient<MP_Float>, double>{
+         inline
+         double operator()(const Quotient<MP_Float>& q) const {
+            return INTERN_MP_FLOAT::to_double(q);
+        }
+    };
+    struct To_interval
+        : public std::unary_function<Quotient<MP_Float>, std::pair<double,double> > {
+        inline
+        std::pair<double,double> operator()(const Quotient<MP_Float>& q) const {
+            return INTERN_MP_FLOAT::to_interval(q);
+        }
+    };
+};
+
+inline MP_Float min BOOST_PREVENT_MACRO_SUBSTITUTION(const MP_Float& x,const MP_Float& y){
+  return (x<=y)?x:y; 
+}
+inline MP_Float max BOOST_PREVENT_MACRO_SUBSTITUTION(const MP_Float& x,const MP_Float& y){
+  return (x>=y)?x:y; 
+}
+
+
+// Coercion_traits
+CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(MP_Float)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int, MP_Float)
+
+
+} //namespace CGAL
+
+namespace Eigen {
+  template<class> struct NumTraits;
+  template<> struct NumTraits<CGAL::MP_Float>
+  {
+    typedef CGAL::MP_Float Real;
+    typedef CGAL::Quotient<CGAL::MP_Float> NonInteger;
+    typedef CGAL::MP_Float Nested;
+
+    static inline Real epsilon() { return 0; }
+    static inline Real dummy_precision() { return 0; }
+
+    enum {
+      IsInteger = 1, // Is this lie right?
+      IsSigned = 1,
+      IsComplex = 0,
+      RequireInitialization = 1,
+      ReadCost = 6,
+      AddCost = 40,
+      MulCost = 40
+    };
+  };
+}
+
+#include <CGAL/MP_Float_impl.h>
+
+//specialization for Get_arithmetic_kernel
+#include <CGAL/MP_Float_arithmetic_kernel.h>
+
+#endif // CGAL_MP_FLOAT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/MP_Float_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/MP_Float_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/MP_Float_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/MP_Float_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/MP_Float_impl.h b/3rdparty/CGAL-4.8/include/CGAL/MP_Float_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/MP_Float_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/MP_Float_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Manhattan_distance_iso_box_point.h b/3rdparty/CGAL-4.8/include/CGAL/Manhattan_distance_iso_box_point.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Manhattan_distance_iso_box_point.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Manhattan_distance_iso_box_point.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Marching_tetrahedra_observer_default_3.h b/3rdparty/CGAL-4.8/include/CGAL/Marching_tetrahedra_observer_default_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Marching_tetrahedra_observer_default_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Marching_tetrahedra_observer_default_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mean_curvature_flow_skeletonization.h b/3rdparty/CGAL-4.8/include/CGAL/Mean_curvature_flow_skeletonization.h
new file mode 100644
index 0000000..1fcecad
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mean_curvature_flow_skeletonization.h
@@ -0,0 +1,1438 @@
+// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Xiang Gao <gaox at ethz.ch>
+//
+
+#ifndef CGAL_MEAN_CURVATURE_FLOW_SKELETONIZATION_H
+#define CGAL_MEAN_CURVATURE_FLOW_SKELETONIZATION_H
+
+#include <CGAL/trace.h>
+#include <CGAL/Timer.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/FaceGraph_to_Polyhedron_3.h>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/copy.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/foreach.hpp>
+
+#include <CGAL/boost/graph/iterator.h>
+
+// Compute cotangent Laplacian
+#include <CGAL/Polygon_mesh_processing/Weights.h>
+
+// Compute the vertex normal
+#include <CGAL/internal/Surface_mesh_skeletonization/get_normal.h>
+
+// Simplification function
+#include <CGAL/boost/graph/Euler_operations.h>
+
+// Curve skeleton data structure
+#include <CGAL/internal/Surface_mesh_skeletonization/Curve_skeleton.h>
+
+// For Voronoi diagram
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_3.h>
+
+// For debugging macro
+#include <CGAL/internal/Surface_mesh_skeletonization/Debug.h>
+
+// Some helper functions
+#include <CGAL/Polygon_mesh_processing/measure.h>
+
+// For detect_degenarcy
+#include <CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h>
+
+// Inside mesh test
+#include <CGAL/Side_of_triangle_mesh.h>
+
+// Compute bounding box
+#include <CGAL/Bbox_3.h>
+
+#include <queue>
+
+// for default parameters
+#if defined(CGAL_EIGEN3_ENABLED)
+#include <CGAL/Eigen_solver_traits.h>  // for sparse linear system solver
+// #include <Eigen/CholmodSupport>
+#endif
+
+namespace CGAL {
+
+namespace internal{
+
+template < class Refs, class Point, class ID, class vertex_descriptor>
+struct Skel_HDS_vertex_type : public HalfedgeDS_vertex_max_base_with_id<Refs, Point, ID>
+{
+  typedef HalfedgeDS_vertex_max_base_with_id<Refs, Point, ID> Base;
+  Skel_HDS_vertex_type() : Base (), is_fixed(false)  {}
+  Skel_HDS_vertex_type( Point const& p) : Base(p), is_fixed(false) {}
+  std::vector<vertex_descriptor> vertices;
+  Point pole;
+  bool is_fixed;
+};
+
+template <class vertex_descriptor>
+struct Skel_polyhedron_items_3: CGAL::Polyhedron_items_with_id_3 {
+    template < class Refs, class Traits>
+    struct Vertex_wrapper {
+        typedef typename Traits::Point_3 Point;
+      typedef Skel_HDS_vertex_type< Refs, Point, std::size_t, vertex_descriptor> Vertex;
+    };
+};
+
+} //end of namespace internal
+
+
+/// \ingroup PkgMeanCurvatureSkeleton3
+/// Function object that enables to extract the mean curvature
+/// flow skeleton of a triangulated surface mesh.
+///
+/// The algorithm used takes as input a triangulated surface mesh and iteratively contracts the surface mesh
+/// following the mean curvature flow \cgalCite{tagliasacchi2012mean}. The intermediate contracted surface
+/// mesh is called the <em>meso-skeleton</em>.
+/// After each iteration, the meso-skeleton is locally remeshed using angle split and edge contraction.
+/// The process ends when the modification of the meso-skeleton between two iterations is small.
+///
+/// @tparam TriangleMesh
+///         a model of `FaceListGraph`
+///
+/// @tparam Traits
+///         a model of `MeanCurvatureSkeletonizationTraits`<br>
+///         <b>%Default:</b>
+/// \code
+///     CGAL::Kernel_traits<
+///       boost::property_traits<
+///          boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type
+///        >::value_type
+///      >::Kernel
+/// \endcode
+///
+/// @tparam VertexPointMap
+///         a model of `ReadWritePropertyMap`
+///         with `boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key and
+///         `Traits::Point_3` as value type.<br>
+///         <b>%Default:</b>
+/// \code
+///   boost::property_map<TriangleMesh, CGAL::vertex_point_t>::const_type.
+/// \endcode
+///
+/// @tparam SolverTraits_
+///         a model of `NormalEquationSparseLinearAlgebraTraits_d`.<br>
+///         <b>%Default:</b> If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available
+///         and `CGAL_EIGEN3_ENABLED` is defined, then an overload of `Eigen_solver_traits` is provided as default parameter:
+/// \code
+///      CGAL::Eigen_solver_traits<
+///        Eigen::SimplicialLDLT< Eigen::SparseMatrix<double> >
+///      >
+/// \endcode
+///
+/// @cond CGAL_DOCUMENT_INTERNAL
+/// @tparam Degeneracy_algorithm_tag
+///         tag for selecting the degeneracy detection algorithm
+/// @endcond
+template <class TriangleMesh,
+          class Traits_ = Default,
+          class VertexPointMap_ = Default,
+          class SolverTraits_ = Default>
+class Mean_curvature_flow_skeletonization
+{
+// Public types
+public:
+
+/// \name Types
+/// @{
+  // Template parameters
+  #ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    VertexPointMap_,
+    typename boost::property_map<TriangleMesh, CGAL::vertex_point_t>::const_type
+  >::type VertexPointMap;
+
+  typedef typename Default::Get<
+    Traits_,
+    typename Kernel_traits<typename boost::property_traits<typename boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type>::value_type>::Kernel
+  >::type Traits;
+  #endif
+
+  #ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    SolverTraits_,
+  #if defined(CGAL_EIGEN3_ENABLED)
+      CGAL::Eigen_solver_traits<
+        Eigen::SimplicialLDLT< Eigen::SparseMatrix<double> >
+//        Eigen::CholmodDecomposition< Eigen::SparseMatrix<double> >
+      >
+  #else
+    SolverTraits_ // no parameter provided, and Eigen is not enabled: so don't compile!
+  #endif
+  >::type SolverTraits;
+  #endif
+
+  /// @cond CGAL_DOCUMENT_INTERNAL
+  typedef typename Traits::Point_3                                             Point;
+  typedef typename Traits::Vector_3                                             Vector;
+
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor  Input_vertex_descriptor;
+  typedef CGAL::Polyhedron_3<Traits,internal::Skel_polyhedron_items_3<Input_vertex_descriptor> > mTriangleMesh;
+  typedef typename boost::property_map<mTriangleMesh, CGAL::vertex_point_t>::type mVertexPointMap;
+  typedef typename boost::property_map<mTriangleMesh, boost::vertex_index_t>::type VertexIndexMap;
+  typedef typename boost::property_map<mTriangleMesh, boost::halfedge_index_t>::type HalfedgeIndexMap;
+
+
+  struct Vmap {
+    Point point;
+    std::vector<Input_vertex_descriptor> vertices;
+  };
+  ///@endcond
+
+  /// The graph type representing the skeleton. The vertex property
+  /// `Vmap` is a struct with a member `point` of type `Traits::Point_3`
+  /// and a member `vertices` of type
+  /// `std::vector<boost::graph_traits<TriangleMesh>::%vertex_descriptor>`.
+  /// See  <a href="http://www.boost.org/doc/libs/release/libs/graph/doc/adjacency_list.html"><tt>the boost documentation</tt></a> page for more details
+  typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, Vmap> Skeleton;
+
+
+/// @}
+
+  // Repeat mTriangleMesh types
+  typedef typename boost::graph_traits<mTriangleMesh>::vertex_descriptor       vertex_descriptor;
+  typedef typename boost::graph_traits<mTriangleMesh>::halfedge_descriptor     halfedge_descriptor;
+  typedef typename boost::graph_traits<mTriangleMesh>::vertex_iterator         vertex_iterator;
+  typedef typename boost::graph_traits<mTriangleMesh>::edge_descriptor         edge_descriptor;
+  typedef typename boost::graph_traits<mTriangleMesh>::edge_iterator           edge_iterator;
+
+  // Cotangent weight calculator
+  typedef internal::Cotangent_weight<mTriangleMesh,
+    typename boost::property_map<mTriangleMesh, vertex_point_t>::type,
+    internal::Cotangent_value_minimum_zero<mTriangleMesh,
+      typename boost::property_map<mTriangleMesh, vertex_point_t>::type,
+      internal::Cotangent_value_Meyer_secure<mTriangleMesh> > >                Weight_calculator;
+
+  typedef internal::Curve_skeleton<mTriangleMesh,
+                                   VertexIndexMap,
+                                   HalfedgeIndexMap,
+                                   mVertexPointMap>                            Curve_skeleton;
+
+  // Repeat Triangulation types
+  typedef CGAL::Exact_predicates_exact_constructions_kernel                    Exact_kernel;
+  typedef CGAL::Triangulation_vertex_base_with_info_3
+                                            <vertex_descriptor, Exact_kernel>  Vb;
+  typedef CGAL::Triangulation_data_structure_3<Vb>                             Tds;
+  typedef CGAL::Delaunay_triangulation_3<Exact_kernel, Tds>                    Delaunay;
+  typedef typename Delaunay::Point                                             Exact_point;
+  typedef typename Delaunay::Cell_handle                                       Cell_handle;
+  typedef typename Delaunay::Vertex_handle                                     TriVertex_handle;
+  typedef typename Delaunay::Finite_cells_iterator                             Finite_cells_iterator;
+
+// Data members
+private:
+
+  /** The meso-skeleton */
+  mTriangleMesh m_tmesh;
+
+  /** Storing indices of all vertices. */
+  VertexIndexMap m_vertex_id_pmap;
+  /** Storing indices of all edges. */
+  HalfedgeIndexMap m_hedge_id_pmap;
+  /** Storing the point for mTriangleMesh vertex_descriptor. */
+  mVertexPointMap m_tmesh_point_pmap;
+  /** Traits class. */
+  Traits m_traits;
+
+  /** Controling the velocity of movement and approximation quality. */
+  double m_omega_H;
+  /** Controling the smoothness of the medial approximation. */
+  double m_omega_P;
+  /** Edges with length less than `min_edge_length` will be collapsed. */
+  double m_min_edge_length;
+  /** Triangles with angle greater than `alpha_TH` will be split. */
+  double m_alpha_TH;
+  /** Value very close to zero. */
+  double m_zero_TH;
+  /** `contract_until_convergence` will stop if the change of area in one iteration
+   *  is less than `delta_area`. */
+  double m_delta_area;
+  /** Surface area of original surface mesh. */
+  double m_original_area;
+  /** Maximum number of iterations. */
+  std::size_t m_max_iterations;
+  /** Should the skeleton be medially centered? */
+  bool m_is_medially_centered;
+  /** Are poles computed? */
+  bool m_are_poles_computed;
+
+  /** Cotangent weight calculator. */
+  Weight_calculator m_weight_calculator;
+  /** Storing the weights for edges. */
+  std::vector<double> m_edge_weight;
+  /** The sparse solver. */
+  SolverTraits m_solver;
+
+  /** Assign a unique id to a new vertex. */
+  int m_vertex_id_count;
+  /** The maximum id for original surface. vertices with ids
+   *  greater than `m_max_id` are created during split,
+   *  thus will not be considered in correspondence tracking. */
+  int m_max_id;
+  /** Used when assembling the matrix. */
+  std::map<int, int> m_new_id;
+
+  /** The incident angle for a halfedge. */
+  std::vector<double> m_halfedge_angle;
+
+  /** The normal of surface points. */
+  std::vector<Vector> m_normals;
+
+
+// Private functions and classes
+
+struct Vertex_to_point{
+  mVertexPointMap ppmap;
+  Vertex_to_point(mVertexPointMap ppmap): ppmap(ppmap){}
+  typedef typename boost::property_traits<mVertexPointMap>::reference result_type;
+  result_type
+  operator()(vertex_descriptor vd) const{
+    return get(ppmap, vd);
+  }
+};
+
+double diagonal_length(const Bbox_3& bbox)
+{
+  double dx = bbox.xmax() - bbox.xmin();
+  double dy = bbox.ymax() - bbox.ymin();
+  double dz = bbox.zmax() - bbox.zmin();
+
+  double diag = dx * dx + dy * dy + dz * dz;
+  return std::sqrt(diag);
+}
+
+
+double init_min_edge_length()
+{
+  vertex_iterator vb, ve;
+  boost::tie(vb, ve) = vertices(m_tmesh);
+  Vertex_to_point v_to_p(m_tmesh_point_pmap);
+  Bbox_3 bbox = CGAL::bbox_3(boost::make_transform_iterator(vb, v_to_p),
+                             boost::make_transform_iterator(ve, v_to_p));
+  return 0.002 * diagonal_length(bbox);
+}
+
+std::size_t collapse_short_edges();
+// Public methods
+public:
+
+  /// \name Constructor
+  ///@{
+  #ifdef DOXYGEN_RUNNING
+  /**
+   * The constructor of a skeletonization object.
+   *
+   * The algorithm parameters are initialized such that:
+   * - `max_triangle_angle() == 110`
+   * - `quality_speed_tradeoff() == 0.1`
+   * - `medially_centered_speed_tradeoff() == 0.2`
+   * - `area_variation_factor() == 0.0001`
+   * - `max_iterations() == 500`
+   * - `is_medially_centered() == true`
+   * - `min_edge_length()` == 0.002 * the length of the diagonal of the bounding box of `tmesh`
+   *
+   * @pre `tmesh` is a triangulated surface mesh without borders and has exactly one connected component.
+   * @param tmesh
+   *        input triangulated surface mesh.
+   * @param vertex_point_map
+   *        property map which associates a point to each vertex of the graph.
+   * @param traits
+   *        an instance of the traits class.
+   */
+  Mean_curvature_flow_skeletonization(const TriangleMesh& tmesh,
+                                      VertexPointMap vertex_point_map = get(CGAL::vertex_point, tmesh),
+                                      Traits traits = Traits());
+
+  #else
+
+  Mean_curvature_flow_skeletonization(const TriangleMesh& tmesh,
+                                      VertexPointMap vertex_point_map,
+                                      const Traits& traits = Traits())
+    : m_traits(traits), m_weight_calculator(m_tmesh)
+  {
+    init(tmesh, vertex_point_map);
+  }
+
+  Mean_curvature_flow_skeletonization(const TriangleMesh& tmesh,
+                                      const Traits& traits = Traits())
+    : m_traits(traits), m_weight_calculator(m_tmesh)
+  {
+    init(tmesh, get(vertex_point, tmesh));
+  }
+  #endif
+  /// @} Constructor
+
+  /// \name Local Remeshing Parameters
+  /// @{
+
+  /// During the local remeshing step, a triangle will be split
+  /// if it has an angle larger than `max_triangle_angle()`.
+  double max_triangle_angle()
+  {
+    return m_alpha_TH;
+  }
+
+  /// During the local remeshing step, an edge will be collapse
+  /// if it is length is less than `min_edge_length()`.
+  double min_edge_length()
+  {
+    return m_min_edge_length;
+  }
+
+ void set_max_triangle_angle(double value)
+  {
+    m_alpha_TH = value;
+  }
+
+  void set_min_edge_length(double value)
+  {
+    m_min_edge_length = value;
+  }
+  /// @}
+
+  /// \name Algorithm Termination Parameters
+  /// @{
+
+  /// Maximum number of iterations performed by `contract_until_convergence()`.
+  std::size_t max_iterations()
+  {
+    return m_max_iterations;
+  }
+
+  /// The convergence is considered to be reached if the variation of the area of
+  /// the meso-skeleton after one iteration is smaller than
+  /// `area_variation_factor()*original_area` where `original_area` is the area of the input
+  /// triangle mesh.
+  double area_variation_factor()
+  {
+    return m_delta_area;
+  }
+
+  void set_max_iterations(std::size_t value)
+  {
+    m_max_iterations = value;
+  }
+
+  void set_area_variation_factor(double value)
+  {
+    m_delta_area = value;
+  }
+  /// @}
+
+  /// \name Vertex Motion Parameters
+  /// @{
+
+  /// \cgalAdvancedBegin
+  /// Controls the velocity of movement and approximation quality:
+  /// decreasing this value makes the mean curvature flow based contraction converge
+  /// faster, but results in a skeleton of lower quality.
+  /// This parameter corresponds to \f$ w_H \f$ in the original publication.
+  /// \cgalAdvancedEnd
+  double quality_speed_tradeoff()
+  {
+    return m_omega_H;
+  }
+
+  /// If `true`, the meso-skeleton placement will be attracted by an approximation
+  /// of the medial axis of the mesh during the contraction steps, so will be the result skeleton.
+  // (an additional energy is used during the contraction using the Voronoi poles of the input triangulated mesh
+  // as attractors).
+  bool is_medially_centered()
+  {
+    return m_is_medially_centered;
+  }
+
+  /// \cgalAdvancedBegin
+  /// Controls the smoothness of the medial approximation:
+  /// increasing this value results in a (less smooth) skeleton closer
+  /// to the medial axis, as well as a lower convergence speed.
+  /// It is only used if `is_medially_centered()==true`.
+  /// This parameter corresponds to \f$ w_M \f$ in the original publication.
+  /// \cgalAdvancedEnd
+  double medially_centered_speed_tradeoff()
+  {
+    return m_omega_P;
+  }
+
+  void set_quality_speed_tradeoff(double value)
+  {
+    m_omega_H = value;
+  }
+
+  void set_is_medially_centered(bool value)
+  {
+    m_is_medially_centered = value;
+  }
+
+  void set_medially_centered_speed_tradeoff(double value)
+  {
+    m_omega_P = value;
+  }
+
+  /// \cond SKIP_FROM_MANUAL
+  void set_zero_TH(double value)
+  {
+    m_zero_TH = value;
+  }
+
+  double zero_TH()
+  {
+    return m_zero_TH;
+  }
+
+  /// \endcond
+
+  /// @cond CGAL_DOCUMENT_INTERNAL
+
+  /**
+   * Get the positions of fixed(degenerate) points.
+   *
+   * @param fixed_points
+   *        return the positions of fixed points
+   */
+  void fixed_points(std::vector<Point>& fixed_points)
+  {
+    fixed_points.clear();
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      if (vd->is_fixed)
+        fixed_points.push_back(get(m_tmesh_point_pmap, vd));
+    }
+  }
+
+  /**
+   * Get the positions of non-fixed(non-degenerate) points.
+   *
+   * @param non_fixed_points
+   *        return the positions of non-fixed points
+   */
+  void non_fixed_points(std::vector<Point>& non_fixed_points)
+  {
+    non_fixed_points.clear();
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      if (!vd->is_fixed)
+        non_fixed_points.push_back(get(m_tmesh_point_pmap, vd));
+    }
+  }
+
+  /**
+   * Get the Voronoi pole for the polygonal mesh.
+   *
+   * @param max_poles
+   *        for each surface mesh vertex, record its correspondent Voronoi pole position
+   */
+  void poles(std::vector<Point>& max_poles)
+  {
+    max_poles.resize(num_vertices(m_tmesh));
+    int cnt = 0;
+    BOOST_FOREACH(vertex_descriptor v, vertices(m_tmesh))
+    {
+      max_poles[cnt++] = v->pole;
+    }
+  }
+
+  /// @endcond
+
+  /// @} Setter and Getter
+
+  /// \name High Level Function
+  /// @{
+
+
+  /**
+   * Creates the curve skeleton: the input surface mesh is iteratively
+   * contracted until convergence, and then turned into a curve skeleton.
+   *
+   * This is equivalent to calling `contract_until_convergence()` and `convert_to_skeleton()`.
+
+   * @param skeleton
+   *        graph that will contain the skeleton of the input triangulated surface mesh.
+   *        For each vertex descriptor `vd` of `skeleton`, the corresponding point
+   *        and the set of input vertices that contracted to `vd` can be retrieved
+   *        using `skeleton[vd].point` and `skeleton[vd].vertices` respectively.
+   */
+  void operator()(Skeleton& skeleton)
+  {
+    contract_until_convergence();
+    convert_to_skeleton(skeleton);
+  }
+  /// @}
+
+  /// \name Low Level Functions
+  /// \cgalAdvancedBegin
+  /// The following functions enable the user to run the mean curvature flow skeletonization algorithm step by step.
+  /// \cgalAdvancedEnd
+  /// @{
+
+  /**
+   * Runs one contraction step following the mean curvature flow.
+   */
+  void contract_geometry()
+  {
+    MCFSKEL_DEBUG(std::cerr << "before contract geometry";)
+
+    update_vertex_id();
+
+    compute_edge_weight();
+
+  // AF: attention: num_vertices will not decrease for a Surface_mesh
+    int nver = static_cast<int>(num_vertices(m_tmesh));
+    int nrows;
+    if (m_is_medially_centered)
+    {
+      nrows = nver * 3;
+      if (!m_are_poles_computed)
+      {
+        compute_voronoi_pole();
+      }
+    }
+    else
+    {
+      nrows = nver * 2;
+    }
+    // Assemble linear system At * A * X = At * B
+    typename SolverTraits::Matrix A(nrows, nver);
+    assemble_LHS(A);
+
+    typename SolverTraits::Vector X(nver), Bx(nrows);
+    typename SolverTraits::Vector Y(nver), By(nrows);
+    typename SolverTraits::Vector Z(nver), Bz(nrows);
+    assemble_RHS(Bx, By, Bz);
+
+    MCFSKEL_DEBUG(std::cerr << "before solve\n";)
+
+    // solve "At * A * X = At * B".
+    m_solver.normal_equation_factor(A);
+    m_solver.normal_equation_solver(Bx, X);
+    m_solver.normal_equation_solver(By, Y);
+    m_solver.normal_equation_solver(Bz, Z);
+
+    MCFSKEL_DEBUG(std::cerr << "after solve\n";)
+
+    // copy to surface mesh
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      int id = static_cast<int>(get(m_vertex_id_pmap, vd));
+      int i = m_new_id[id];
+      Point p =  m_traits.construct_point_3_object()(X[i], Y[i], Z[i]);
+      put(m_tmesh_point_pmap, vd, p);
+    }
+
+    MCFSKEL_DEBUG(std::cerr << "leave contract geometry\n";)
+  }
+
+  /**
+   * Collapses edges of the meso-skeleton with length less than `min_edge_length()` and returns the number of edges collapsed.
+   */
+  std::size_t collapse_edges()
+  {
+    return collapse_short_edges();
+  }
+
+  /**
+   * Splits faces of the meso-skeleton having one angle greater than `max_triangle_angle()` and returns the number of faces split.
+   */
+  std::size_t split_faces()
+  {
+    MCFSKEL_DEBUG(std::cerr << "before split\n";)
+
+    std::size_t num_splits = 0;
+    while (true)
+    {
+      if (num_vertices(m_tmesh) <= 3)
+      {
+        break;
+      }
+      std::size_t cnt = split_flat_triangles();
+      if (cnt == 0)
+      {
+        break;
+      }
+      else
+      {
+        num_splits += cnt;
+      }
+    }
+
+    MCFSKEL_DEBUG(std::cerr << "after split\n";)
+
+    return num_splits;
+  }
+
+#ifndef DOXYGEN_RUNNING
+  /**
+   * Sequentially calls `collapse_edges()` and `split_faces()` and returns the number of edges collapsed and faces split.
+   */
+  std::size_t remesh()
+  {
+    MCFSKEL_DEBUG(std::cerr << "before collapse edges\n";)
+
+    std::size_t num_collapses = collapse_edges();
+    MCFSKEL_INFO(std::cerr << "collapse " << num_collapses << " edges.\n";)
+
+    std::size_t num_splits = split_faces();
+    MCFSKEL_INFO(std::cerr << "split " << num_splits << " edges.\n";)
+
+    return num_collapses + num_splits;
+  }
+#endif
+
+  /**
+   * Prevents degenerate vertices to move during the following contraction steps and returns the number of newly fixed vertices.
+   */
+  std::size_t detect_degeneracies()
+  {
+    return detect_degeneracies_in_disk();
+  }
+
+  /// Performs subsequent calls to `contract_geometry()`, `collapse_edges()`, `split_faces()` and `detect_degeneracies()`
+  void contract()
+  {
+    contract_geometry();
+    remesh();
+    detect_degeneracies();
+
+    MCFSKEL_DEBUG(print_edges();)
+
+    MCFSKEL_INFO(double area = CGAL::Polygon_mesh_processing::area(m_tmesh,
+      CGAL::Polygon_mesh_processing::parameters::vertex_point_map(m_tmesh_point_pmap));)
+    MCFSKEL_INFO(std::cout << "area " << area << "\n";)
+  }
+
+
+  /**
+   * Iteratively calls `contract()`
+   * until the change of surface area of the meso-skeleton after one iteration is smaller than
+   * `area_variation_factor()*original_area` where `original_area` is the area of the input triangle mesh,
+   * or if the maximum number of iterations has been reached.
+   */
+  void contract_until_convergence()
+  {
+    double last_area = 0;
+    std::size_t num_iteration = 0;
+    while (true)
+    {
+      MCFSKEL_INFO(std::cout << "iteration " << num_iteration + 1 << "\n";)
+
+      contract_geometry();
+      remesh();
+      detect_degeneracies();
+
+      double area = CGAL::Polygon_mesh_processing::area(m_tmesh,
+        CGAL::Polygon_mesh_processing::parameters::vertex_point_map(m_tmesh_point_pmap)
+        .geom_traits(m_traits));
+      double area_ratio = fabs(last_area - area) / m_original_area;
+
+      MCFSKEL_INFO(std::cout << "area " << area << "\n";)
+      MCFSKEL_INFO(std::cout << "|area - last_area| / original_area "
+                             << area_ratio << "\n";)
+
+      if (area_ratio < m_delta_area)
+      {
+        break;
+      }
+      last_area = area;
+
+      num_iteration++;
+      if (num_iteration >= m_max_iterations)
+      {
+        break;
+      }
+    }
+  }
+
+  /**
+   * Converts the contracted surface mesh to a skeleton curve.
+   * @tparam Skeleton
+   *         an instantiation of <A href="http://www.boost.org/libs/graph/doc/adjacency_list.html">`boost::adjacency_list`</a>
+   *         as a data structure for the skeleton curve.
+   * @param skeleton
+   *        graph that will contain the skeleton of `tmesh`. It should be empty before passed to the function.
+   */
+  void convert_to_skeleton(Skeleton& skeleton)
+  {
+    skeleton.clear();
+    Curve_skeleton skeletonization(m_tmesh, m_vertex_id_pmap, m_hedge_id_pmap, m_tmesh_point_pmap);
+    skeletonization.extract_skeleton(skeleton);
+  }
+
+  /// @} Public Algorithm API
+
+
+  /// \name Access to the Meso-Skeleton
+  /// @{
+
+  /// When using the low level API it is possible to access the intermediate
+  /// results of the skeletonization process, called meso-skeleton.
+  /// It is a triangulated surface mesh which is model of `FaceListGraph`.
+#ifdef DOXYGEN_RUNNING
+  typedef unspecified_type Meso_skeleton;
+#else
+  typedef mTriangleMesh Meso_skeleton;
+#endif
+  /// Reference to the collapsed triangulated surface mesh.
+  Meso_skeleton& meso_skeleton()
+  {
+    return m_tmesh;
+  }
+
+  /// @}
+
+private:
+
+  // --------------------------------------------------------------------------
+  // Initialization
+  // --------------------------------------------------------------------------
+
+  /// Initialize the parameters for Mean_curvature_flow_skeletonization
+  void init_args()
+  {
+    m_omega_H = 0.1;
+    m_omega_P = 0.2;
+    m_delta_area = 0.0001;
+    m_max_iterations = 500;
+    m_is_medially_centered = true;
+    m_min_edge_length =  init_min_edge_length();
+    m_alpha_TH = 110 * (CGAL_PI / 180.0);
+    m_zero_TH = 1e-7;
+  }
+
+  /// Initialize some global data structures such as vertex id.
+  void init(const TriangleMesh& tmesh,
+            VertexPointMap vpm)
+  {
+    // copy the input FaceGraph into a mTriangleMesh
+    CGAL::FaceGraph_to_Polyhedron_3<TriangleMesh,
+                                    VertexPointMap,
+                                    typename mTriangleMesh::HalfedgeDS,
+                                    false> modifier(tmesh, vpm);
+
+    m_tmesh.delegate(modifier);
+
+    // copy input vertices to keep correspondance
+    typename boost::graph_traits<mTriangleMesh>::vertex_iterator vit=vertices(m_tmesh).first;
+    BOOST_FOREACH(Input_vertex_descriptor vd, vertices(tmesh) )
+      (*vit++)->vertices.push_back(vd);
+
+    //init indices
+    typedef typename boost::graph_traits<mTriangleMesh>::vertex_descriptor vertex_descriptor;
+    typedef typename boost::graph_traits<mTriangleMesh>::halfedge_descriptor halfedge_descriptor;
+    std::size_t i=0;
+    BOOST_FOREACH( vertex_descriptor vd, vertices(m_tmesh) )
+      vd->id()=i++;
+    i=0;
+    BOOST_FOREACH( halfedge_descriptor hd, halfedges(m_tmesh) )
+      hd->id()=i++;
+    m_hedge_id_pmap = get(boost::halfedge_index, m_tmesh);
+    m_vertex_id_pmap = get(boost::vertex_index, m_tmesh);
+      //, m_hedge_id_pmap(get(boost::halfedge_index, m_tmesh))
+    m_are_poles_computed = false;
+
+    m_original_area = CGAL::Polygon_mesh_processing::area(m_tmesh,
+      CGAL::Polygon_mesh_processing::parameters::vertex_point_map(m_tmesh_point_pmap)
+      .geom_traits(m_traits));
+
+    m_vertex_id_count = static_cast<int>(num_vertices(m_tmesh));
+    m_max_id = m_vertex_id_count;
+
+    if (m_is_medially_centered)
+      compute_voronoi_pole();
+
+    init_args();
+  }
+
+  // --------------------------------------------------------------------------
+  // Utilities
+  // --------------------------------------------------------------------------
+  double get_x(const Vector& v){ return m_traits.compute_x_3_object()(v); }
+  double get_y(const Vector& v){ return m_traits.compute_y_3_object()(v); }
+  double get_z(const Vector& v){ return m_traits.compute_z_3_object()(v); }
+  double get_x(const Point& v){ return m_traits.compute_x_3_object()(v); }
+  double get_y(const Point& v){ return m_traits.compute_y_3_object()(v); }
+  double get_z(const Point& v){ return m_traits.compute_z_3_object()(v); }
+  // --------------------------------------------------------------------------
+  // Contraction
+  // --------------------------------------------------------------------------
+
+  /// Compute cotangent weights of all edges.
+  void compute_edge_weight()
+  {
+    m_edge_weight.clear();
+    m_edge_weight.reserve(2 * num_edges(m_tmesh));
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(m_tmesh))
+    {
+      m_edge_weight.push_back(m_weight_calculator(hd));
+    }
+  }
+
+  /// Assemble the left hand side.
+  void assemble_LHS(typename SolverTraits::Matrix& A)
+  {
+    MCFSKEL_DEBUG(std::cerr << "start LHS\n";)
+
+    std::size_t nver = num_vertices(m_tmesh);
+
+    Side_of_triangle_mesh<mTriangleMesh, Traits> test_inside(m_tmesh);
+
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      int id = static_cast<int>(get(m_vertex_id_pmap, vd));
+
+      int i = m_new_id[id];
+      // if the vertex is fixed
+      if (vd->is_fixed)
+      {
+        A.set_coef(i + nver, i, 1.0 / m_zero_TH, true);
+      }
+      else
+      {
+        A.set_coef(i + nver, i, m_omega_H, true);
+        if (m_is_medially_centered)
+        {
+          if (id < m_max_id)
+          {
+            if (test_inside(vd->pole) == CGAL::ON_BOUNDED_SIDE)
+            {
+              A.set_coef(i + nver * 2, i, m_omega_P, true);
+            }
+          }
+        }
+      }
+    }
+
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      int id = static_cast<int>(get(m_vertex_id_pmap, vd));
+      int i = m_new_id[id];
+      double L = 1.0;
+      // if the vertex is fixed
+      if (vd->is_fixed)
+      {
+        L = 0;
+      }
+      double diagonal = 0;
+      BOOST_FOREACH(edge_descriptor ed, in_edges(vd, m_tmesh))
+      {
+        vertex_descriptor vj = source(ed, m_tmesh);
+        double wij = m_edge_weight[get(m_hedge_id_pmap, halfedge(ed, m_tmesh))] * 2.0;
+        int jd = static_cast<int>(get(m_vertex_id_pmap, vj));
+        int j = m_new_id[jd];
+        A.set_coef(i, j, wij * L, true);
+        diagonal += -wij;
+      }
+      A.set_coef(i, i, diagonal, true);
+    }
+
+    MCFSKEL_DEBUG(std::cerr << "end LHS\n";)
+  }
+
+  /// Assemble the right hand side.
+  void assemble_RHS(typename SolverTraits::Vector& Bx,
+                    typename SolverTraits::Vector& By,
+                    typename SolverTraits::Vector& Bz)
+  {
+    MCFSKEL_DEBUG(std::cerr << "start RHS\n";)
+
+    Side_of_triangle_mesh<mTriangleMesh, Traits> test_inside(m_tmesh);
+
+    // assemble right columns of linear system
+    int nver = static_cast<int>(num_vertices(m_tmesh));
+    for (int i = 0; i < nver; ++i)
+    {
+      Bx[i] = 0;
+      By[i] = 0;
+      Bz[i] = 0;
+    }
+
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      int id = static_cast<int>(get(m_vertex_id_pmap, vd));
+      int i = m_new_id[id];
+
+      double oh, op = 0.0;
+      if (vd->is_fixed)
+      {
+        oh = 1.0 / m_zero_TH;
+      }
+      else
+      {
+        oh = m_omega_H;
+        if (m_is_medially_centered)
+        {
+          if (id < m_max_id)
+          {
+            if (test_inside(vd->pole) == CGAL::ON_BOUNDED_SIDE)
+            {
+              op = m_omega_P;
+            }
+          }
+        }
+      }
+      Bx[i + nver] = get_x(get(m_tmesh_point_pmap, vd)) * oh;
+      By[i + nver] = get_y(get(m_tmesh_point_pmap, vd)) * oh;
+      Bz[i + nver] = get_z(get(m_tmesh_point_pmap, vd)) * oh;
+      if (m_is_medially_centered)
+      {
+        double x = get_x(vd->pole);
+        double y = get_y(vd->pole);
+        double z = get_z(vd->pole);
+        Bx[i + nver * 2] = x * op;
+        By[i + nver * 2] = y * op;
+        Bz[i + nver * 2] = z * op;
+      }
+    }
+
+    MCFSKEL_DEBUG(std::cerr << "end RHS\n";)
+  }
+
+  /// The order of vertex id is the same as the traverse order.
+  void update_vertex_id()
+  {
+    m_new_id.clear();
+    int cnt = 0;
+
+    BOOST_FOREACH(vertex_descriptor vd, vertices(m_tmesh))
+    {
+      int id = static_cast<int>(get(m_vertex_id_pmap, vd));
+      m_new_id[id] = cnt++;
+    }
+  }
+
+  // --------------------------------------------------------------------------
+  // Edge collapse
+  // --------------------------------------------------------------------------
+
+  /// Track correspondent original surface points during collapse.
+  void update_pole(vertex_descriptor v0, vertex_descriptor vkept)
+  {
+    if (m_is_medially_centered)
+    {
+      const Point& pole0 = v0->pole;
+      const Point& pole1 = vkept->pole;
+
+      Point p1 = get(m_tmesh_point_pmap, vkept);
+      double dis_to_pole0 = m_traits.compute_squared_distance_3_object()(pole0, p1);
+      double dis_to_pole1 = m_traits.compute_squared_distance_3_object()(pole1, p1);
+      if (dis_to_pole0 < dis_to_pole1)
+        vkept->pole = v0->pole;
+    }
+  }
+
+  bool edge_should_be_collapsed(edge_descriptor ed)
+  {
+    halfedge_descriptor h = halfedge(ed, m_tmesh);
+
+    vertex_descriptor vi = source(h, m_tmesh);
+    vertex_descriptor vj = target(h, m_tmesh);
+
+    // an edge cannot be collapsed if both vertices are degenerate.
+    if (vi->is_fixed && vj->is_fixed) return false;
+
+    double sq_edge_length = m_traits.compute_squared_distance_3_object()(
+                              get(m_tmesh_point_pmap, vi),
+                              get(m_tmesh_point_pmap, vj));
+    return sq_edge_length < m_min_edge_length * m_min_edge_length;
+  }
+
+  // --------------------------------------------------------------------------
+  // Triangle split
+  // --------------------------------------------------------------------------
+
+  /// Compute the incident angles for all the halfedges.
+  void compute_incident_angle()
+  {
+    m_halfedge_angle.clear();
+    int ne = 2 * static_cast<int>(num_edges(m_tmesh));
+    m_halfedge_angle.resize(ne, 0);
+
+    int idx = 0;
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(m_tmesh))
+    {
+      put(m_hedge_id_pmap, hd, idx++);
+    }
+
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(m_tmesh))
+    {
+      int e_id = static_cast<int>(get(m_hedge_id_pmap, hd));
+
+      if (is_border(hd, m_tmesh))
+      {
+        m_halfedge_angle[e_id] = -1;
+      }
+      else
+      {
+        vertex_descriptor vi = source(hd, m_tmesh);
+        vertex_descriptor vj = target(hd, m_tmesh);
+        halfedge_descriptor hd_next = next(hd, m_tmesh);
+        vertex_descriptor vk = target(hd_next, m_tmesh);
+        Point pi = get(m_tmesh_point_pmap, vi);
+        Point pj = get(m_tmesh_point_pmap, vj);
+        Point pk = get(m_tmesh_point_pmap, vk);
+
+        double dis2_ij = m_traits.compute_squared_distance_3_object()(pi, pj);
+        double dis2_ik = m_traits.compute_squared_distance_3_object()(pi, pk);
+        double dis2_jk = m_traits.compute_squared_distance_3_object()(pj, pk);
+        double dis_ij = std::sqrt(dis2_ij);
+        double dis_ik = std::sqrt(dis2_ik);
+        double dis_jk = std::sqrt(dis2_jk);
+
+        // A degenerate triangle will never undergo a split (but rather a collapse...)
+        if (dis_ij < m_zero_TH || dis_ik < m_zero_TH || dis_jk < m_zero_TH)
+        {
+          m_halfedge_angle[e_id] = -1;
+        }
+        else
+        {
+          m_halfedge_angle[e_id] =
+              acos((dis2_ik + dis2_jk - dis2_ij) / (2.0 * dis_ik * dis_jk));
+        }
+      }
+    }
+  }
+
+  void normalize(Vector& v)
+  {
+    double norm = std::sqrt(m_traits.compute_squared_length_3_object()(v));
+    v = m_traits.construct_divided_vector_3_object()(v, norm);
+  }
+
+  /// Project the vertex `vk` to the line of `vs` and `vt`.
+  Point project_vertex(const vertex_descriptor vs,
+                       const vertex_descriptor vt,
+                       const vertex_descriptor vk,
+                       const vertex_descriptor vnew)
+  {
+    Point ps = get(m_tmesh_point_pmap, vs);
+    Point pt = get(m_tmesh_point_pmap, vt);
+    Point pk = get(m_tmesh_point_pmap, vk);
+    Vector vec_st = m_traits.construct_vector_3_object()(ps, pt);
+    Vector vec_sk = m_traits.construct_vector_3_object()(ps, pk);
+
+    normalize(vec_st);
+    double t = m_traits.compute_scalar_product_3_object()(vec_st,vec_sk);
+    Point st = m_traits.construct_point_3_object()( get_x(vec_st) * t, get_y(vec_st) * t, get_z(vec_st) * t);
+    Point pn = m_traits.construct_point_3_object()( get_x(ps) + get_x(st), get_y(ps) + get_y(st), get_z(ps) + get_z(st));
+
+    // project the pole
+    if (m_is_medially_centered)
+    {
+      const Point& pole_s = vs->pole;
+      const Point& pole_t = vt->pole;
+      Vector pole_st = m_traits.construct_vector_3_object()(pole_s, pole_t );
+      normalize(pole_st);
+      vnew->pole =  m_traits.construct_translated_point_3_object()(
+                        pole_s,
+                        m_traits.construct_scaled_vector_3_object()(pole_st, t)
+                     );
+    }
+    return pn;
+  }
+
+  /// Split triangles with an angle greater than `alpha_TH`.
+  std::size_t split_flat_triangles()
+  {
+    compute_incident_angle();
+
+    // collect edges that should be split because
+    // both opposite angle are larger than the
+    // threshold
+    std::vector<edge_descriptor> edges_to_split;
+    BOOST_FOREACH(edge_descriptor ed, edges(m_tmesh))
+    {
+      halfedge_descriptor ei = halfedge(ed, m_tmesh);
+      halfedge_descriptor ej = opposite(ei, m_tmesh);
+      int ei_id = static_cast<int>(get(m_hedge_id_pmap, ei));
+      int ej_id = static_cast<int>(get(m_hedge_id_pmap, ej));
+
+      double angle_i = m_halfedge_angle[ei_id];
+      double angle_j = m_halfedge_angle[ej_id];
+      if (angle_i >= m_alpha_TH && angle_j >= m_alpha_TH)
+        edges_to_split.push_back( ed );
+    }
+
+    // now split the edge
+    std::size_t cnt = 0;
+    BOOST_FOREACH(edge_descriptor ed, edges_to_split)
+    {
+      halfedge_descriptor ei = halfedge(ed, m_tmesh);
+      halfedge_descriptor ej = opposite(ei, m_tmesh);
+      int ei_id = static_cast<int>(get(m_hedge_id_pmap, ei));
+      int ej_id = static_cast<int>(get(m_hedge_id_pmap, ej));
+
+      vertex_descriptor vs = source(ei, m_tmesh);
+      vertex_descriptor vt = target(ei, m_tmesh);
+
+      double angle_i = m_halfedge_angle[ei_id];
+      double angle_j = m_halfedge_angle[ej_id];
+
+      halfedge_descriptor ek = next(angle_i > angle_j ? ei : ej, m_tmesh);
+      vertex_descriptor vk = target(ek, m_tmesh);
+
+      // split the edge
+      halfedge_descriptor en = m_tmesh.split_edge(ei);
+      // split the incident faces
+      Euler::split_face(en, next(ei,m_tmesh), m_tmesh);
+      if (! is_border(ej,m_tmesh))
+      {
+        Euler::split_face(ej, next(next(ej,m_tmesh),m_tmesh), m_tmesh);
+      }
+
+      // set id for new vertex
+      put(m_vertex_id_pmap, target(en,m_tmesh), m_vertex_id_count++);
+      Point pn = project_vertex(vs, vt, vk, target(en, m_tmesh));
+      // set point of new vertex
+      put(m_tmesh_point_pmap, target(en,m_tmesh), pn);
+      target(en,m_tmesh)->vertices.clear(); // do no copy the info
+      ++cnt;
+    }
+    return cnt;
+  }
+
+  // --------------------------------------------------------------------------
+  // Degeneracy detection
+  // --------------------------------------------------------------------------
+
+  /// Test degeneracy of a vertex by counting the euler characteristic of
+  /// its local neighborhood disk.
+  std::size_t detect_degeneracies_in_disk()
+  {
+    std::size_t num_fixed = 0;
+    BOOST_FOREACH(vertex_descriptor v, vertices(m_tmesh))
+    {
+      if (!v->is_fixed)
+      {
+        bool willbefixed = internal::is_vertex_degenerate(m_tmesh, m_tmesh_point_pmap,
+                                                          v, m_min_edge_length, m_traits);
+        if (willbefixed)
+        {
+          v->is_fixed=true;
+          ++num_fixed;
+        }
+      }
+    }
+
+    MCFSKEL_INFO(std::cerr << "fixed " << num_fixed << " vertices.\n";)
+
+    return num_fixed;
+  }
+
+  // --------------------------------------------------------------------------
+  // Voronoi pole
+  // --------------------------------------------------------------------------
+
+  /// Compute the Voronoi pole for surface vertices. The pole is the furthest
+  /// vertex in the Voronoi cell containing the given vertex.
+  void compute_voronoi_pole()
+  {
+    MCFSKEL_DEBUG(std::cout << "start compute_voronoi_pole\n";)
+    compute_vertex_normal();
+
+    std::vector<std::pair<Exact_point, vertex_descriptor> > points;
+    std::vector<std::vector<int> > point_to_pole(num_vertices(m_tmesh));
+
+    BOOST_FOREACH(vertex_descriptor v, vertices(m_tmesh))
+    {
+      const Point& input_pt = get(m_tmesh_point_pmap, v);
+      Exact_point tp(get_x(input_pt), get_y(input_pt), get_z(input_pt));
+      points.push_back(std::make_pair(tp, v));
+    }
+
+    Delaunay T(points.begin(), points.end());
+
+    Finite_cells_iterator cit;
+    int cell_id = 0;
+    std::vector<Point> cell_dual;
+    cell_dual.reserve(T.number_of_cells());
+    for (cit = T.finite_cells_begin(); cit != T.finite_cells_end(); ++cit)
+    {
+      Cell_handle cell = cit;
+      Exact_point point = T.dual(cell);
+      cell_dual.push_back(
+        m_traits.construct_point_3_object()(
+          to_double(point.x()),
+          to_double(point.y()),
+          to_double(point.z())
+        )
+      );
+      // each cell has 4 incident vertices
+      for (int i = 0; i < 4; ++i)
+      {
+        TriVertex_handle vt = cell->vertex(i);
+        std::size_t id = get(m_vertex_id_pmap, vt->info());
+        point_to_pole[id].push_back(cell_id);
+      }
+      ++cell_id;
+    }
+
+    typedef std::pair<Exact_point, vertex_descriptor> Pair_type;
+    BOOST_FOREACH(const Pair_type& p, points)
+    {
+      std::size_t vid = get(m_vertex_id_pmap, p.second);
+      Point surface_point = get(m_tmesh_point_pmap, p.second);
+
+      double max_neg_t = 1;
+      int max_neg_i = -1;
+
+      for (size_t j = 0; j < point_to_pole[vid].size(); ++j)
+      {
+        int pole_id = point_to_pole[vid][j];
+        Point cell_point = cell_dual[pole_id];
+        Vector vt = m_traits.construct_vector_3_object()(surface_point, cell_point);
+        Vector n = m_normals[vid];
+
+        double t = m_traits.compute_scalar_product_3_object()(vt, n);
+
+        // choose the one with maximum distance along the normal
+        if (t < 0 && t < max_neg_t)
+        {
+          max_neg_i = pole_id;
+          max_neg_t = t;
+        }
+      }
+
+      p.second->pole = cell_dual[max_neg_i];
+    }
+    m_are_poles_computed = true;
+  }
+
+  /// Compute an approximate vertex normal for all vertices.
+  void compute_vertex_normal()
+  {
+    m_normals.resize(num_vertices(m_tmesh));
+
+    BOOST_FOREACH(vertex_descriptor v, vertices(m_tmesh))
+    {
+      int vid = static_cast<int>(get(m_vertex_id_pmap, v));
+      m_normals[vid] = internal::get_vertex_normal(*v, m_traits);
+    }
+  }
+
+  // --------------------------------------------------------------------------
+  // Debug
+  // --------------------------------------------------------------------------
+
+  void print_edges()
+  {
+    std::map<halfedge_descriptor, bool> visited;
+
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(m_tmesh))
+    {
+      if (!visited[hd])
+      {
+        vertex_descriptor vi = source(hd, m_tmesh);
+        vertex_descriptor vj = target(hd, m_tmesh);
+        size_t vi_idx = get(m_vertex_id_pmap, vi);
+        size_t vj_idx = get(m_vertex_id_pmap, vj);
+        std::cout << vi_idx << " " << vj_idx << "\n";
+
+        visited[hd] = true;
+        visited[opposite(hd,m_tmesh)] = true;
+      }
+    }
+  }
+};
+
+template <class TriangleMesh,
+          class Traits_,
+          class VertexPointMap_,
+          class SolverTraits_>
+std::size_t Mean_curvature_flow_skeletonization<TriangleMesh, Traits_, VertexPointMap_, SolverTraits_>::collapse_short_edges()
+{
+  std::size_t cnt=0, prev_cnt=0;
+
+  std::set<edge_descriptor> edges_to_collapse, non_topologically_valid_collapses;
+
+  BOOST_FOREACH(edge_descriptor ed, edges(m_tmesh))
+    if ( edge_should_be_collapsed(ed) )
+      edges_to_collapse.insert(ed);
+
+  do{
+    prev_cnt=cnt;
+    while(!edges_to_collapse.empty())
+    {
+      edge_descriptor ed = *edges_to_collapse.begin();
+      edges_to_collapse.erase(edges_to_collapse.begin());
+
+      // skip the edge is it became long enough
+      if ( !edge_should_be_collapsed(ed) ) continue;
+
+      if ( !Euler::does_satisfy_link_condition(ed,m_tmesh) )
+      {
+        non_topologically_valid_collapses.insert(ed);
+        continue;
+      }
+
+      halfedge_descriptor h = halfedge(ed, m_tmesh);
+
+      vertex_descriptor vi = source(h, m_tmesh);
+      vertex_descriptor vj = target(h, m_tmesh);
+
+      Point p = m_traits.construct_midpoint_3_object()(
+                  get(vertex_point, m_tmesh, vi),
+                  get(vertex_point, m_tmesh, vj) );
+
+      // invalidate the edges that will be collapsed
+      edges_to_collapse.erase(edge(prev(h, m_tmesh), m_tmesh));
+      edges_to_collapse.erase(edge(prev(opposite(h, m_tmesh), m_tmesh), m_tmesh));
+
+      non_topologically_valid_collapses.erase(ed);
+      non_topologically_valid_collapses.erase(edge(prev(h, m_tmesh), m_tmesh));
+      non_topologically_valid_collapses.erase(edge(prev(opposite(h, m_tmesh), m_tmesh), m_tmesh));
+
+      // the mesh is closed, the target of h is always the one kept
+      put(m_tmesh_point_pmap, vj, p);
+      std::vector<Input_vertex_descriptor>& vec_kept = vj->vertices;
+      std::vector<Input_vertex_descriptor>& vec_removed = vi->vertices;
+      vec_kept.insert(vec_kept.end(), vec_removed.begin(), vec_removed.end());
+      if (vi->is_fixed) vj->is_fixed=true;
+      update_pole(vi, vj);
+
+      vertex_descriptor v = Euler::collapse_edge(ed, m_tmesh);
+
+      CGAL_assertion(vj==v);
+
+      BOOST_FOREACH(edge_descriptor oed, out_edges(v, m_tmesh))
+        if ( edge_should_be_collapsed(oed) ) edges_to_collapse.insert(oed);
+
+      ++cnt;
+    }
+    if (prev_cnt==cnt) break;
+    edges_to_collapse.swap(non_topologically_valid_collapses);
+  } while(!edges_to_collapse.empty());
+
+  return cnt;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_MEAN_CURVATURE_FLOW_SKELETONIZATION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mean_value_coordinates_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mean_value_coordinates_parameterizer_3.h
new file mode 100644
index 0000000..c9826a0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mean_value_coordinates_parameterizer_3.h
@@ -0,0 +1,205 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
+#define CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
+
+#include <CGAL/Fixed_border_parameterizer_3.h>
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+#include <CGAL/Eigen_solver_traits.h>
+
+/// \file Mean_value_coordinates_parameterizer_3.h
+
+namespace CGAL {
+
+
+/// \ingroup  PkgSurfaceParameterizationMethods
+///
+/// The class Mean_value_coordinates_parameterizer_3
+/// implements *Floater Mean Value Coordinates* parameterization  \cgalCite{cgal:f-mvc-03}.
+/// This method is sometimes called simply *Floater parameterization*.
+///
+/// This is a conformal parameterization, i.e. it attempts to preserve angles.
+///
+/// One-to-one mapping is guaranteed if the surface's border is mapped to a convex polygon.
+///
+/// This class is used by the main
+/// parameterization algorithm `Fixed_border_parameterizer_3::parameterize()`.
+/// - It provides default` BorderParameterizer_3` and `SparseLinearAlgebraTraits_d` template
+///   parameters that make sense.
+/// - It implements `compute_w_ij()` to compute w_ij = (i, j) coefficient of matrix A
+///   for j neighbor vertex of i based on Floater Mean Value Coordinates parameterization.
+/// - It implements an optimized version of `is_one_to_one_mapping()`.
+///
+/// \cgalModels `ParameterizerTraits_3`
+///
+///
+/// \sa `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>`
+/// \sa `CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
+/// \sa `CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3>`
+
+template
+<
+    class ParameterizationMesh_3,     ///< 3D surface mesh
+    class BorderParameterizer_3       ///< Strategy to parameterize the surface border
+                = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
+    class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system
+                = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >
+>
+
+class Mean_value_coordinates_parameterizer_3
+    : public Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+{
+// Private types
+private:
+    // Superclass
+    typedef Fixed_border_parameterizer_3<ParameterizationMesh_3,
+                                        BorderParameterizer_3,
+                                        SparseLinearAlgebraTraits_d>
+                                            Base;
+
+// Public types
+public:
+    // We have to repeat the types exported by superclass
+    /// @cond SKIP_IN_MANUAL
+    typedef typename Base::Error_code       Error_code;
+    typedef ParameterizationMesh_3          Adaptor;
+    typedef BorderParameterizer_3           Border_param;
+    typedef SparseLinearAlgebraTraits_d     Sparse_LA;
+    /// @endcond
+
+// Private types
+private:
+    // Mesh_Adaptor_3 subtypes:
+    typedef typename Adaptor::NT            NT;
+    typedef typename Adaptor::Point_2       Point_2;
+    typedef typename Adaptor::Point_3       Point_3;
+    typedef typename Adaptor::Vector_2      Vector_2;
+    typedef typename Adaptor::Vector_3      Vector_3;
+    typedef typename Adaptor::Facet         Facet;
+    typedef typename Adaptor::Facet_handle  Facet_handle;
+    typedef typename Adaptor::Facet_const_handle
+                                            Facet_const_handle;
+    typedef typename Adaptor::Facet_iterator Facet_iterator;
+    typedef typename Adaptor::Facet_const_iterator
+                                            Facet_const_iterator;
+    typedef typename Adaptor::Vertex        Vertex;
+    typedef typename Adaptor::Vertex_handle Vertex_handle;
+    typedef typename Adaptor::Vertex_const_handle
+                                            Vertex_const_handle;
+    typedef typename Adaptor::Vertex_iterator Vertex_iterator;
+    typedef typename Adaptor::Vertex_const_iterator
+                                            Vertex_const_iterator;
+    typedef typename Adaptor::Border_vertex_iterator
+                                            Border_vertex_iterator;
+    typedef typename Adaptor::Border_vertex_const_iterator
+                                            Border_vertex_const_iterator;
+    typedef typename Adaptor::Vertex_around_facet_circulator
+                                            Vertex_around_facet_circulator;
+    typedef typename Adaptor::Vertex_around_facet_const_circulator
+                                            Vertex_around_facet_const_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_circulator
+                                            Vertex_around_vertex_circulator;
+    typedef typename Adaptor::Vertex_around_vertex_const_circulator
+                                            Vertex_around_vertex_const_circulator;
+
+    // SparseLinearAlgebraTraits_d subtypes:
+    typedef typename Sparse_LA::Vector      Vector;
+    typedef typename Sparse_LA::Matrix      Matrix;
+
+    using Base::compute_angle_rad;
+
+// Public operations
+public:
+    /// Constructor
+    Mean_value_coordinates_parameterizer_3(Border_param border_param = Border_param(),
+                                            ///< Object that maps the surface's border to 2D space.
+                                          Sparse_LA sparse_la = Sparse_LA())
+                                            ///< Traits object to access a sparse linear system.
+    :   Fixed_border_parameterizer_3<Adaptor,
+                                   Border_param,
+                                   Sparse_LA>(border_param, sparse_la)
+    {}
+
+    // Default copy constructor and operator =() are fine
+
+// Protected operations
+protected:
+    /// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
+    virtual NT compute_w_ij(const Adaptor& mesh,
+                            Vertex_const_handle main_vertex_v_i,
+                            Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
+    {
+        Point_3 position_v_i = mesh.get_vertex_position(main_vertex_v_i);
+        Point_3 position_v_j = mesh.get_vertex_position(neighbor_vertex_v_j);
+
+        // Compute the norm of v_j -> v_i vector
+        Vector_3 edge = position_v_i - position_v_j;
+        double len = std::sqrt(edge*edge);
+
+        // Compute angle of (v_j,v_i,v_k) corner (i.e. angle of v_i corner)
+        // if v_k is the vertex before v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator previous_vertex_v_k = neighbor_vertex_v_j;
+        previous_vertex_v_k --;
+        Point_3 position_v_k = mesh.get_vertex_position(previous_vertex_v_k);
+        double gamma_ij  = compute_angle_rad(position_v_j, position_v_i, position_v_k);
+
+        // Compute angle of (v_l,v_i,v_j) corner (i.e. angle of v_i corner)
+        // if v_l is the vertex after v_j when circulating around v_i
+        Vertex_around_vertex_const_circulator next_vertex_v_l = neighbor_vertex_v_j;
+        next_vertex_v_l ++;
+        Point_3 position_v_l = mesh.get_vertex_position(next_vertex_v_l);
+        double delta_ij = compute_angle_rad(position_v_l, position_v_i, position_v_j);
+
+        double weight = 0.0;
+        CGAL_surface_mesh_parameterization_assertion(len != 0.0);    // two points are identical!
+        if(len != 0.0)
+            weight = (std::tan(0.5*gamma_ij) + std::tan(0.5*delta_ij)) / len;
+        CGAL_surface_mesh_parameterization_assertion(weight > 0);
+
+        return weight;
+    }
+
+    /// Check if 3D -> 2D mapping is one-to-one.
+    virtual bool  is_one_to_one_mapping (const Adaptor& ,
+                                         const Matrix& ,
+                                         const Vector& ,
+                                         const Vector& )
+    {
+        /// Theorem: one-to-one mapping is guaranteed if all w_ij coefficients
+        ///          are > 0 (for j vertex neighbor of i) and if the surface
+        ///          border is mapped onto a 2D convex polygon.
+        /// Floater formula above implies that w_ij > 0 (for j vertex neighbor
+        /// of i), thus mapping is guaranteed if the surface border is mapped
+        /// onto a 2D convex polygon.
+        return Base::get_border_parameterizer().is_border_convex ();
+    }
+};
+
+
+} //namespace CGAL
+
+#endif //CGAL_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Memory_sizer.h b/3rdparty/CGAL-4.8/include/CGAL/Memory_sizer.h
new file mode 100644
index 0000000..b1f3297
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Memory_sizer.h
@@ -0,0 +1,174 @@
+// Copyright (c) 2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s)     : Sylvain Pion, Andreas Fabri
+
+#ifndef CGAL_MEMORY_SIZER_H
+#define CGAL_MEMORY_SIZER_H
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+
+// This has only been implemented for MacOSX/Darwin, Linux and VC++ for now.
+#if !defined _MSC_VER && !defined __linux__ && !defined __APPLE__
+
+#include <iostream>
+
+namespace CGAL {
+
+struct Memory_sizer
+{
+    typedef std::size_t   size_type;
+    size_type virtual_size()  const { return 0; }
+    size_type resident_size() const { return 0; }
+};
+
+} //namespace CGAL
+
+#else // defined _MSC_VER ||  defined __linux__ || defined __APPLE__
+
+#if defined _MSC_VER
+#  include <windows.h>
+#  include "psapi.h"
+
+// auto-link with psapi.lib
+#  define CGAL_LIB_NAME psapi
+#  define CGAL_AUTO_LINK_NOMANGLE
+#  include <CGAL/auto_link/auto_link.h>
+
+#elif defined __linux__ 
+#  include <fstream>
+#  include <cstddef>
+#  include <unistd.h>
+#elif defined __APPLE__
+#include <mach/task.h>
+#include <mach/mach_init.h>
+#endif
+
+namespace CGAL {
+
+// A class giving access to the memory currently used by the process.
+// Both the virtual memory size and the resident size.
+// I put it in a class instead of free functions for similarity with Timer,
+// and in case we want to store some state.
+
+struct Memory_sizer
+{
+    typedef std::size_t   size_type;
+
+    size_type virtual_size()  const { return get(true); }
+    size_type resident_size() const { return get(false); }
+
+private:
+
+  size_type get (bool virtual_size)  const 
+  { 
+#ifdef _MSC_VER
+    DWORD pid = GetCurrentProcessId();
+    size_type result;
+    HANDLE hProcess;
+    PROCESS_MEMORY_COUNTERS pmc;
+    hProcess = OpenProcess(  PROCESS_QUERY_INFORMATION |
+                                    PROCESS_VM_READ,
+                                    FALSE, pid );
+    if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )
+    {
+      // PagefileUsage seems not very precise, thus check it against WorkingSetSize:
+      size_t approximate_virtual_size = (std::max)(pmc.PagefileUsage, pmc.WorkingSetSize);
+      
+      result = (virtual_size)? approximate_virtual_size : pmc.WorkingSetSize;
+    }
+
+    CloseHandle( hProcess );
+    return result;
+
+#elif defined __linux__
+    // Extract of "man proc" under Linux :
+    //
+    //            vsize %u Virtual memory size
+    //
+    //            rss %u Resident Set Size: number of pages
+    //                   the process has in real memory,
+    //                   minus 3 for administrative purposes.
+    //                   This is just the pages which count
+    //                   towards text, data, or stack space.
+    //                   This does not include pages which
+    //                   have not been demand-loaded in, or
+    //                   which are swapped out.
+    //
+    // Note : the following may be buggy in case of space in the executable name...
+
+    int pid;
+    char name[1024];
+    char state;
+    int ppid, pgrp, session, tty, tpgid;
+    unsigned flags, minflt, cminflt, majflt, cmajflt;
+    int utime, stime, cutime, cstime, counter, priority, timeout;
+    unsigned itrealvalue, starttime;
+    size_type vsize = 0, rss = 0;
+
+    std::ifstream f("/proc/self/stat");
+    CGAL_assertion(!f.bad());
+
+    f >> pid >> name >> state >> ppid >> pgrp >> session >> tty >> tpgid >> flags;
+    f >> minflt >> cminflt >> majflt >> cmajflt >> utime >> stime >> cutime;
+    f >> cstime >> counter >> priority >> timeout >> itrealvalue >> starttime;
+    f >> vsize >> rss;
+
+    return virtual_size ? vsize : rss * getpagesize();
+
+#else // __APPLE__ is defined
+
+    // http://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html
+		// This is highly experimental. But still better than returning 0.
+		// It appears that we might need certain 'rights' to get access to the kernel
+		// task... It works if you have admin rights apparently
+		// (though non-root of course!). I haven't tested with non-admin user.
+    // -- Samuel Hornus
+
+    task_t task = MACH_PORT_NULL;
+		// The task_for_pid() seems to be time consuming (looking at the source
+		// in xnu-source/bsd/vm/vm_unix.c
+		// TODO: so it may be a good idea to cache the resulting 'task'
+    if (task_for_pid(current_task(), getpid(), &task) != KERN_SUCCESS)
+        return 0;
+		// It seems to me that after calling :
+		// task_for_pid(current_task(), getpid(), &task)
+		// we should have (task == current_task())
+		// ==> TODO: Check if this is indeed the case
+      
+    struct task_basic_info t_info;
+    mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
+      
+    task_info(task, TASK_BASIC_INFO, (task_info_t)&t_info, &t_info_count);
+		// TODO: test if the following line works...
+    //task_info(current_task(), TASK_BASIC_INFO, (task_info_t)&t_info, &t_info_count);
+#if 0
+    std::cerr << "PAGE SIZE IS " << getpagesize() << std::endl
+    << " RESIDENT SIZE IS " << t_info.resident_size << std::endl
+    << " VIRTUAL SIZE IS " << t_info.virtual_size << std::endl;
+#endif
+    return virtual_size ? t_info.virtual_size : t_info.resident_size;
+#endif
+  }
+};
+
+} //namespace CGAL
+
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Clusters.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Clusters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Clusters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Clusters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Do_not_refine_edges.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Do_not_refine_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Do_not_refine_edges.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Do_not_refine_edges.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Face_badness.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Face_badness.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Face_badness.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Face_badness.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h
new file mode 100644
index 0000000..b0c6ee4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h
@@ -0,0 +1,291 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s) : Lakulish Antani, Christophe Delage, Jane Tournois, Pierre Alliez
+//
+
+#ifndef CGAL_LIPSCHITZ_SIZING_FIELD_2_H
+#define CGAL_LIPSCHITZ_SIZING_FIELD_2_H
+
+#include <list>
+
+#include <CGAL/basic.h>
+#include <CGAL/squared_distance_2.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Search_traits_2.h>
+#include <CGAL/Apollonius_graph_2.h>
+#include <CGAL/Apollonius_graph_traits_2.h>
+
+#include <CGAL/Mesh_2/Sizing_field_2.h>
+
+namespace CGAL
+{
+
+template <typename Tr>
+class Lipschitz_sizing_field_2
+  : public virtual Sizing_field_2<Tr>
+{
+public:
+  typedef typename Tr::Geom_traits      Geom_traits;
+  typedef typename Geom_traits::Point_2 Point;
+    
+  typedef Delaunay_triangulation_2<Geom_traits> Delaunay_triangulation;
+  typedef typename Delaunay_triangulation::All_faces_iterator Face_iterator;
+  typedef typename Delaunay_triangulation::Finite_vertices_iterator Vertex_iterator;
+  typedef typename Delaunay_triangulation::Face_circulator Face_circulator;
+    
+  typedef Search_traits_2<Geom_traits> Tree_traits;
+  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Search_tree;
+    
+  typedef Apollonius_graph_traits_2<Geom_traits> Apollonius_traits;
+  typedef Apollonius_graph_2<Apollonius_traits> Apollonius_graph;
+  typedef typename Apollonius_traits::Site_2 Site;
+
+public:    
+  typedef std::list<Site> Site_set_2;
+
+public:
+
+  // comparison functor for sorting sites
+  class Compare_site_2
+  {
+  public:
+    bool operator ()(Site s1, Site s2)
+    {
+      return (s1.weight() > s2.weight());
+    }
+  };
+
+public:
+  // default constructor: empty point set and K = 1.0
+  Lipschitz_sizing_field_2()
+    : K(1.0)
+  {
+    sites = Site_set_2();
+
+    generate_delaunay();
+    extract_poles();
+    generate_sites();
+    generate_apollonius();
+  }
+    
+  // constructor with point set and K as parameters
+  template <typename InputIterator>
+  Lipschitz_sizing_field_2(InputIterator first,
+			   InputIterator beyond,
+			   const double k = 1.0)
+    : K(k)
+  {
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+  std::cout << "Building sizing field..." << std::flush;
+#endif
+    points = std::list<Point>(first, beyond);
+    generate_delaunay();
+    extract_poles();
+    generate_sites();
+    generate_apollonius();
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+  std::cout << "done." << std::endl;
+#endif
+  }
+
+  // constructor from a triangulation
+  Lipschitz_sizing_field_2(Tr& tr, const double k = 1.0)
+    : K(k)
+  {
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+    std::cout << "Building sizing field..." << std::flush;
+#endif
+    points = std::list<Point>(tr.points_begin(), tr.points_end());
+    generate_delaunay();
+    extract_poles();
+    generate_sites();
+    generate_apollonius();
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+    std::cout << "done." << std::endl;
+#endif
+  }
+
+  // assignment operator, copies point set and K
+  Lipschitz_sizing_field_2& operator =(const Lipschitz_sizing_field_2& f)
+  {
+    points.clear();
+    if(!poles.empty())
+      poles.clear();
+
+    if(!sites.empty())
+      sites.clear();
+
+    dt.clear();
+    ag.clear();
+
+    points = f.points;
+    K = f.K;
+
+    generate_delaunay();
+    extract_poles();
+    generate_sites();
+    generate_apollonius();
+
+    return *this;
+  }
+
+  double operator()(const Point& p) const
+  {
+    if(points.empty() || points.size() == 1)
+      return K;
+    Site ns = (*ag.nearest_neighbor(p)).site();
+    return K * weighted_distance(p, ns);
+  }
+
+  void set_K(double k)
+  {
+    K = k;
+  }
+
+  double get_K()
+  {
+    return K;
+  }
+
+  std::list<Point>& get_poles()
+  {
+    return poles;
+  }
+
+protected:
+
+  double K;
+  Site_set_2 sites;
+  std::list<Point> points;
+  std::list<Point> poles;
+  Apollonius_graph ag;
+  Delaunay_triangulation dt;
+
+  // generate the delaunay triangulation (for voronoi diagram)
+  void generate_delaunay()
+  {
+    if(points.empty())
+      return;
+
+    for(typename std::list<Point>::iterator ppi = points.begin();
+	ppi != points.end();ppi++)
+      dt.insert(*ppi);
+  }
+    
+
+  // pole extraction
+  void extract_poles()
+  {
+    if (points.empty())
+      return;
+    Vertex_iterator vi;
+    for (vi = dt.finite_vertices_begin(); vi != dt.finite_vertices_end(); vi++)
+      {
+	Face_circulator fc = dt.incident_faces(vi);
+	Face_circulator c = fc;
+	std::list<Point> vv;
+			    
+	if (fc != NULL)
+	  {
+	    do
+	      {
+		if (!dt.is_infinite(c) && dt.triangle(c).area() != 0)
+		  vv.push_back(dt.dual(c));
+	      } while (++c != fc);
+	  }
+			    
+	// find the farthest voronoi vertex from this point
+	typename std::list<Point>::iterator maxp = vv.begin();
+	for (typename std::list<Point>::iterator pi = vv.begin(); pi != vv.end(); pi++)
+	  {
+	    if (squared_distance(*pi, (*vi).point()) > squared_distance(*maxp, (*vi).point()))
+	      {
+		maxp = pi;
+	      }
+	  }
+	poles.push_back(*maxp);
+			    
+	// find the farthest voronoi vertex from this point in the other half-plane
+	typename std::list<Point>::iterator maxp2 = vv.begin();
+	for (typename std::list<Point>::iterator pi = vv.begin(); pi != vv.end(); pi++)
+	  {
+	    if (angle((Point) *pi, (Point) (*vi).point(), (Point) *maxp) == OBTUSE &&
+		squared_distance(*pi, (*vi).point()) > squared_distance(*maxp2, (*vi).point()))
+	      {
+		maxp2 = pi;
+	      }
+	  }
+	poles.push_back(*maxp2);
+      }
+  }
+
+  void generate_sites()
+  {
+    if(poles.empty())
+      return;
+
+    Search_tree tree_poles(poles.begin(), poles.end());
+    Search_tree tree_points(points.begin(), points.end());
+
+    for(typename std::list<Point>::iterator pi = points.begin();
+	pi != points.end();
+	pi++)
+      {
+
+	// estimate lfs (distance to medial axis estimate)
+	Neighbor_search search_poles(tree_poles, *pi, 1);
+	double lfs = std::sqrt((search_poles.begin())->second);
+
+	// compute distance to nearest input point
+	Neighbor_search search_points(tree_points, *pi, 2); // notice 2
+	typename Neighbor_search::iterator it = search_points.begin();
+	it++; // the first one is...itself
+	double d = std::sqrt(it->second);
+					
+	// take min(lfs,distance to nearest point) as sizing
+	double sizing = (std::min)(lfs,d);
+
+	sites.push_back(Site(*pi, -sizing / K));
+      }
+  }
+
+  // generate apollonius graph
+  // first sorting the sites in decreasing order of weights
+  void generate_apollonius()
+  {
+    if(sites.empty())
+      return;
+    sites.sort(Compare_site_2());
+    ag.insert(sites.begin(),sites.end());
+  }
+			    
+  double weighted_distance(const Point p,
+			   const Site s) const
+  {
+    return std::sqrt(squared_distance(p, s.point())) - s.weight();
+  }
+
+};
+
+}//namespace CGAL
+
+#endif //CGAL_LIPSCHITZ_SIZING_FIELD_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h
new file mode 100644
index 0000000..ed7d361
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h
@@ -0,0 +1,111 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez
+//
+
+#ifndef CGAL_LLOYD_MOVE_2_H
+#define CGAL_LLOYD_MOVE_2_H
+
+#include <CGAL/Mesh_2/Uniform_sizing_field_2.h>
+#include <CGAL/Constrained_voronoi_diagram_2.h>
+
+namespace CGAL
+{
+namespace Mesh_2
+{
+  template<typename CDT,
+           typename SizingField
+           = Uniform_sizing_field_2<typename CDT::Geom_traits> >
+  class Lloyd_move_2
+  {
+    typedef typename CDT::Vertex_handle          Vertex_handle;
+    typedef typename CDT::Geom_traits::Point_2   Point_2;
+    typedef typename CDT::Geom_traits::Segment_2  Segment;
+    typedef typename CDT::Geom_traits::Triangle_2 Triangle;
+    typedef typename CDT::Geom_traits::FT         FT;
+    typedef typename CDT::Geom_traits::Vector_2   Vector_2;
+
+    typedef typename CGAL::Constrained_voronoi_diagram_2<CDT> CVD;
+    typedef typename CVD::Cvd_cell               Cvd_cell;
+
+  public:
+    typedef SizingField Sizing_field;
+
+  public:
+    Vector_2 operator()(Vertex_handle v,
+          const CDT& cdt,
+          const Sizing_field& sizing_field = Sizing_field()) const
+    {
+      if(cdt.are_there_incident_constraints(v))
+        return CGAL::NULL_VECTOR;
+
+      Point_2 p = v->point();
+      Vector_2 move = CGAL::NULL_VECTOR;
+      FT sum_masses(0);
+
+      Cvd_cell cell = CGAL::dual(cdt, v);
+      if(cell.is_infinite() || cell.is_empty())
+        return CGAL::NULL_VECTOR; //center of mass is at infinity!
+
+      CGAL_assertion(cell.number_of_vertices() > 2);
+
+      typename Cvd_cell::segment_iterator sit = cell.segments_begin();
+      typename CDT::Geom_traits::Compute_area_2 compute_area =
+        cdt.geom_traits().compute_area_2_object();
+      for( ; sit != cell.segments_end(); ++sit)
+      {
+        Segment s = *sit;
+        Triangle tri(p, s.source(), s.target());
+        Point_2 tri_centroid = CGAL::centroid(tri);
+
+        // Compute mass
+        FT density = density_2d(tri_centroid, sizing_field);
+        FT abs_area = CGAL::abs(compute_area(tri[0], tri[1], tri[2]));
+        FT mass = abs_area * density;
+
+        move = move + mass * Vector_2(p, tri_centroid);
+        sum_masses += mass;
+      }
+
+      CGAL_assertion(sum_masses != 0.0);
+      return move / sum_masses;
+    }
+
+  private:
+    FT density_2d(const Point_2& p,
+                  const Sizing_field& sizing_field) const
+    {
+      FT s = sizing_field(p);
+      CGAL_assertion( s > 0. );
+
+      // 1 / s^(d+2)
+      return ( 1/(s*s*s*s) );
+    }
+
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+  public:
+    static std::string name() { return std::string("Lloyd"); }
+#endif
+
+  };
+
+} //end namespace Mesh_2
+} //end namespace CGAL
+
+#endif //CGAL_LLOYD_MOVE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h
new file mode 100644
index 0000000..119bd33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h
@@ -0,0 +1,485 @@
+// Copyright (c) 2009-2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez, St�phane Tayeb
+//
+
+#ifndef CGAL_MESH_2_MESH_GLOBAL_OPTIMIZER_2_H
+#define CGAL_MESH_2_MESH_GLOBAL_OPTIMIZER_2_H
+
+#ifdef CGAL_MESH_2_VERBOSE
+  #define CGAL_MESH_2_OPTIMIZER_VERBOSE 
+#endif
+
+#include <CGAL/Timer.h>
+#include <CGAL/Origin.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Delaunay_mesh_size_criteria_2.h>
+#include <CGAL/Constrained_voronoi_diagram_2.h>
+
+#include <vector>
+#include <list>
+#include <algorithm>
+#include <iterator>
+
+#include <boost/lambda/lambda.hpp>
+#include <boost/lambda/bind.hpp>
+#include <boost/format.hpp>
+#include <boost/math/constants/constants.hpp>
+
+namespace CGAL {
+
+namespace Mesh_2 {
+
+template <typename CDT,
+          typename MoveFunction>
+class Mesh_global_optimizer_2
+{  
+  // Types
+  typedef CDT  Tr;
+  typedef MoveFunction Mf;
+  typedef typename Tr::Geom_traits      Gt;
+  
+  typedef typename Tr::Point            Point_2;
+  typedef typename Tr::Face_handle      Face_handle;
+  typedef typename Tr::Vertex_handle    Vertex_handle;
+  typedef typename Tr::Edge             Edge;
+  typedef typename Tr::Vertex           Vertex;
+  typedef typename Tr::Face_circulator  Face_circulator;
+
+  typedef typename Gt::FT               FT;
+  typedef typename Gt::Vector_2         Vector_2;
+  
+  typedef typename std::vector<Face_handle>                 Face_vector;
+  typedef typename std::set<Vertex_handle>                  Vertex_set;
+  typedef typename std::list<FT>                            FT_list;
+  typedef typename std::pair<Vertex_handle,Point_2>         Move;
+
+  typedef std::vector<Move>   Moves_vector;
+
+  typedef typename MoveFunction::Sizing_field Sizing_field;
+
+public:
+  /**
+   * Constructor
+   */
+  Mesh_global_optimizer_2(CDT& cdt,
+                        const FT& convergence_ratio = 0., //no criterion
+                        const FT& freeze_ratio = 0., //no criterion
+                        const MoveFunction move_function = MoveFunction())
+    : cdt_(cdt)
+    , sq_freeze_ratio_(freeze_ratio * freeze_ratio)
+    , convergence_ratio_(convergence_ratio)
+    , move_function_(move_function)
+    , sizing_field_(cdt)
+    , seeds_()
+    , seeds_mark_(false)
+  {
+  }
+  
+  /// Time accessors
+  void set_time_limit(double time) { time_limit_ = time; }
+  double time_limit() const { return time_limit_; }
+
+  /** The value type of \a InputIterator should be \c Point, and represents
+      seeds.
+  */
+  template<typename InputIterator>
+  void set_seeds(InputIterator b,
+                 InputIterator e,
+                 const bool mark = false)
+  {
+    if(b != e)
+    {
+      seeds_.clear();
+      std::copy(b, e, std::back_inserter(seeds_));
+      seeds_mark_ = mark;
+    }
+  }
+
+  Mesh_optimization_return_code operator()(const int nb_iterations)
+  {
+    running_time_.reset();
+    running_time_.start();
+
+    // Fill set containing moving vertices
+    Vertex_set moving_vertices;
+    for(typename Tr::Finite_vertices_iterator
+      vit = cdt_.finite_vertices_begin();
+      vit != cdt_.finite_vertices_end();
+      ++vit )
+    {
+      if(!cdt_.are_there_incident_constraints(vit))
+        moving_vertices.insert(vit);
+    }
+
+  double initial_vertices_nb = static_cast<double>(moving_vertices.size());
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+  double step_begin = running_time_.time();
+  std::cerr << "Running " << Mf::name() << "-smoothing..." << std::endl;
+  std::cerr << "(" << initial_vertices_nb << " vertices moving)" << std::endl;
+#endif
+
+    // Initialize big moves (stores the largest moves)
+    big_moves_.clear();
+    std::size_t big_moves_size = (std::max)(std::size_t(1),
+                                            moving_vertices.size()/100);
+    big_moves_.resize(big_moves_size, FT(0));
+
+    std::size_t nb_vertices_moved = -1;
+    bool convergence_stop = false;
+
+    // Iterate
+    int i = -1;
+    while ( ++i < nb_iterations && ! is_time_limit_reached() )
+    {
+      this->before_move();
+
+      // Compute move for each vertex
+      Moves_vector moves = compute_moves(moving_vertices);
+
+      //Pb with Freeze : sometimes a few vertices continue moving indefinitely
+      //if the nb of moving vertices is < 2% of total nb AND does not decrease
+      if(sq_freeze_ratio_ > 0.
+        && nb_vertices_moved < 0.01 * initial_vertices_nb
+        && nb_vertices_moved == moving_vertices.size())
+      { 
+        // we should stop because we are 
+        // probably entering an infinite instable loop
+        convergence_stop = true;
+        break;
+      }
+
+      // Stop if convergence or time_limit is reached
+      if ( check_convergence() || is_time_limit_reached() )
+        break;
+
+      // Update mesh with those moves
+      update_mesh(moves);
+      nb_vertices_moved = moving_vertices.size();
+
+      this->after_move();
+ 
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+      double time = running_time_.time();
+      double moving_vertices_size = static_cast<double>(moving_vertices.size());
+      std::cerr << boost::format("\r             \r"
+        "end iteration %1% (%2%%% frozen), %3% / %4%, last step:%5$.2fs, step avg:%6$.2fs, avg large move:%7$.3f          ")
+      % (i+1)
+      % ((1. - moving_vertices_size/initial_vertices_nb)*100.)
+      % moving_vertices_size
+      % initial_vertices_nb
+      % (time - step_begin)
+      % (time / (i+1))
+      % sum_moves_;
+      step_begin = running_time_.time();
+#endif
+    }
+
+    this->after_all_moves();
+    running_time_.stop();
+
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+    if(sq_freeze_ratio_ > 0. && moving_vertices.empty())
+      std::cerr << "All vertices frozen" << std::endl;
+    else if(sq_freeze_ratio_ > 0. && convergence_stop)
+      std::cerr << "Can't improve anymore" << std::endl;
+    else if ( is_time_limit_reached() )
+      std::cerr << "Time limit reached" << std::endl;
+    else if ( check_convergence() )
+      std::cerr << "Convergence reached" << std::endl;
+    else if ( i >= nb_iterations )
+      std::cerr << "Max iteration number reached" << std::endl;
+
+    std::cerr << "Total optimization time: " << running_time_.time()
+              << "s" << std::endl << std::endl;
+#endif
+
+    if( sq_freeze_ratio_ > 0. && moving_vertices.empty() )
+      return ALL_VERTICES_FROZEN;
+    else if( sq_freeze_ratio_ > 0. && convergence_stop )
+      return CANT_IMPROVE_ANYMORE;
+    else if( is_time_limit_reached() )
+      return TIME_LIMIT_REACHED;
+    else if( check_convergence() )
+      return CONVERGENCE_REACHED;
+    else if( i >= nb_iterations )
+      return MAX_ITERATION_NUMBER_REACHED;
+    else
+      return MESH_OPTIMIZATION_UNKNOWN_ERROR;
+  }
+
+private:
+  /**
+   * Returns moves for vertices of set \c moving_vertices
+   */
+  Moves_vector compute_moves(Vertex_set& moving_vertices)
+  {
+    typename Gt::Construct_translated_point_2 translate =
+      Gt().construct_translated_point_2_object();
+
+    // Store new location of points which have to move
+    Moves_vector moves;
+    moves.reserve(moving_vertices.size());
+
+    // reset worst_move list
+    std::fill(big_moves_.begin(), big_moves_.end(), FT(0));
+
+    // Get move for each moving vertex
+    for ( typename Vertex_set::const_iterator vit = moving_vertices.begin() ;
+      vit != moving_vertices.end() ; )
+    {
+      Vertex_handle oldv = *vit;
+      Vector_2 move = compute_move(oldv);
+      ++vit;
+
+      if ( CGAL::NULL_VECTOR != move )
+      {
+        Point_2 new_position = translate(oldv->point(), move);
+        moves.push_back(std::make_pair(oldv, new_position));
+      }
+      else if(sq_freeze_ratio_ > 0.) //freezing ON
+        moving_vertices.erase(oldv);
+
+      // Stop if time_limit_ is reached
+      if ( is_time_limit_reached() )
+        break;
+    }
+    return moves;
+  }
+
+  /**
+   * Returns the move for vertex \c v
+   */
+  Vector_2 compute_move(const Vertex_handle& v)
+  {
+    // Get move from move function
+    Vector_2 move = move_function_(v, cdt_, sizing_field_);
+
+    FT local_sq_size = min_sq_circumradius(v);
+    if ( FT(0) == local_sq_size )
+      return CGAL::NULL_VECTOR;
+
+    FT local_move_sq_ratio = (move * move) / local_sq_size;
+
+    // Move point only if displacement is big enough w.r.t local size
+    if ( local_move_sq_ratio < sq_freeze_ratio_ )
+      return CGAL::NULL_VECTOR;
+
+    // Update big moves
+    update_big_moves(local_move_sq_ratio);
+
+    return move;
+  }
+
+  /**
+   * Returns the minimum cicumradius length of faces incident to \c v
+   */
+  FT min_sq_circumradius(const Vertex_handle& v) const
+  {
+    CGAL_assertion(!cdt_.is_infinite(v));
+
+    Face_circulator face = cdt_.incident_faces(v);
+    Face_circulator end = face;
+
+    // Get first face sq_circumradius_length 
+    // Initialize min
+    FT min_sqr = (std::numeric_limits<double>::max)();
+    // Find the minimum value
+    do
+    {
+      if(face->is_in_domain())
+        min_sqr = (std::min)(min_sqr, sq_circumradius(face));
+      face++;
+    }
+    while(face != end);
+
+    return min_sqr;
+  }
+
+  FT sq_circumradius(const Face_handle& f) const
+  {
+    Point_2 cc = cdt_.circumcenter(f);
+    Point_2 p0 = f->vertex(0)->point();
+    return (cc - p0) * (cc - p0);
+  }
+
+  /**
+   * update big_moves_ vector with new_sq_move value
+   */
+  void update_big_moves(const FT& new_sq_move)
+  {
+    if ( new_sq_move > big_moves_.back() )
+    {
+      // Remove last value
+      big_moves_.pop_back();
+
+      // Insert value at the right place
+      typename FT_list::iterator pos = std::find_if(
+        big_moves_.begin(),
+        big_moves_.end(),
+        boost::lambda::_1 < new_sq_move );
+
+      big_moves_.insert(pos, new_sq_move);
+    }
+  }
+
+  bool is_time_limit_reached() const
+  {
+    return (time_limit() > 0)
+        && (running_time_.time() > time_limit());
+  }
+
+  bool check_convergence() const
+  {
+    namespace bl = boost::lambda;
+
+    FT sum(0);
+    for(typename FT_list::const_iterator it = big_moves_.begin();
+        it != big_moves_.end();
+        ++it)
+      sum += CGAL::sqrt(*it);
+
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+    sum_moves_ = sum/big_moves_.size();
+#endif
+
+    return ( sum/FT(big_moves_.size()) < convergence_ratio_ );
+  }
+
+  void update_mesh(const Moves_vector& moves)
+  {
+    // Apply moves in triangulation
+    for(typename Moves_vector::const_iterator it = moves.begin() ;
+        it != moves.end() ;
+        ++it )
+    {
+      const Vertex_handle& v = it->first;
+      const Point_2& new_position = it->second;
+      const FT size = v->sizing_info();
+
+      //cdt_.move(v, new_position);
+      //function not available, see Constrained_triangulation_2
+      cdt_.remove(v);
+      Vertex_handle new_v = cdt_.insert(new_position);
+
+      new_v->set_sizing_info(size);
+
+      if( is_time_limit_reached() )
+        break;
+    }
+  }
+
+  void before_move()
+  {
+    update_blind_faces();
+  }
+
+  void after_move()
+  {
+    //update inside/outside tags
+    typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
+    CGAL::Delaunay_mesher_2<CDT, Criteria>::mark_facets(cdt_,
+      seeds_.begin(),
+      seeds_.end(),
+      seeds_mark_/*faces that are not in domain are tagged false*/);
+    //Connected components of seeds are marked with the value of
+    //  \a mark. Other components are marked with \c !mark. The connected
+    //  component of infinite faces is always marked with \c false.
+  }
+
+  void after_all_moves()
+  {
+    update_blind_faces();
+  }
+
+  void update_blind_faces()
+  {
+    //update blindness
+    CGAL::Constrained_voronoi_diagram_2<CDT> cvd(cdt_);
+    cvd.tag_faces_blind();
+  }
+
+public:
+
+  void output_angles_histogram(std::ostream& os)
+  {
+    double min_angle = 180.;
+    double max_angle = 0.;
+
+    //fill histogram
+    std::vector<int> histo(180,0);
+    for(typename CDT::Finite_faces_iterator fit = cdt_.finite_faces_begin();
+        fit != cdt_.finite_faces_end();
+        ++fit)
+    {
+      if(!fit->is_in_domain())
+        continue;
+      typename CDT::Triangle tr = cdt_.triangle(fit);
+      for(int i = 0; i < 3; ++i)
+      {
+        Vector_2 v1(tr[i], tr[(i+1)%3]);
+        Vector_2 v2(tr[i], tr[(i+2)%3]);
+        v1 = v1 / CGAL::sqrt(v1.squared_length());
+        v2 = v2 / CGAL::sqrt(v2.squared_length());
+
+        using namespace boost::math::constants;
+        double angle = std::acos(v1 * v2) * 180. / pi<double>();
+        histo[ (std::min)(179, int(angle)) ]++;
+
+        min_angle = (std::min)(min_angle, angle);
+        max_angle = (std::max)(max_angle, angle);
+      }
+    }
+
+    //output histogram to os
+    os << "# Min angle = " << min_angle << std::endl;
+    os << "# Max angle = " << max_angle << std::endl;
+    os << std::endl << "## Histogram ##" << std::endl;
+    for(unsigned int i = 0; i < 180; ++i)
+      os << i << "\t" << histo[i] << std::endl;
+  }
+
+private:
+  // -----------------------------------
+  // Private data
+  // -----------------------------------
+  CDT& cdt_;
+  FT sq_freeze_ratio_;
+  FT convergence_ratio_;
+  MoveFunction move_function_;
+  Sizing_field sizing_field_;
+  std::list<Point_2> seeds_;
+  bool seeds_mark_;
+
+  double time_limit_;
+  CGAL::Timer running_time_;
+  
+  std::list<FT> big_moves_;
+  
+#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
+  mutable FT sum_moves_;
+#endif
+
+};
+
+} // end namespace Mesh_2
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_2_MESH_GLOBAL_OPTIMIZER_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_sizing_field.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_sizing_field.h
new file mode 100644
index 0000000..801bc1a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Mesh_sizing_field.h
@@ -0,0 +1,218 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s) : Jane Tournois, Pierre Alliez
+//
+
+#ifndef CGAL_MESH_2_MESH_SIZING_FIELD_H
+#define CGAL_MESH_2_MESH_SIZING_FIELD_H
+
+#include <CGAL/Mesh_2/Sizing_field_2.h>
+
+namespace CGAL {
+
+namespace Mesh_2
+{
+/**
+ * @class Mesh_sizing_field
+ */
+template <typename Tr, bool Need_vertex_update = true>
+class Mesh_sizing_field
+  : public virtual Sizing_field_2<Tr>
+{
+  // Types
+  typedef typename Tr::Geom_traits   Gt;
+  typedef typename Tr::Point         Point_2;
+  typedef typename Gt::FT            FT;
+
+  typedef typename Tr::Vertex_handle      Vertex_handle;
+  typedef typename Tr::Face_handle        Face_handle;
+  typedef typename Tr::Edge               Edge;
+  
+public:
+  // update vertices of mesh triangulation ? 
+  static const bool is_vertex_update_needed = Need_vertex_update;
+  
+public:
+  /**
+   * Constructor
+   */
+  Mesh_sizing_field(Tr& tr)
+  : tr_(tr)
+  , last_face_()
+  {
+    init();
+  }
+
+  /**
+   * Returns size at point \c p.
+   */
+  FT operator()(const Point_2& p) const
+  { return this->operator()(p, last_face_); }
+
+  /**
+   * Returns size at point \c p, using \c v to accelerate \c p location
+   * in triangulation
+   */
+  FT operator()(const Point_2& p, const Vertex_handle& v) const
+  { return this->operator()(p, v->face()); }
+  
+  /**
+   * Returns size at point \c p.
+   */
+  FT operator()(const Point_2& p, const Face_handle& c) const
+  {
+    const Face_handle fh = tr_.locate(p,c);
+    last_face_ = fh;
+  
+    if ( !tr_.is_infinite(fh) )
+      return interpolate_on_face_vertices(p,fh);
+    else
+      return interpolate_on_edge_vertices(p,fh);
+  }
+
+  /**
+   * Fill sizing field with actual size inside the triangulation
+   */
+  void init()
+  {
+    for(typename Tr::Finite_vertices_iterator
+        vit = tr_.finite_vertices_begin() ;
+        vit != tr_.finite_vertices_end() ;
+        ++vit )
+    {
+      vit->set_sizing_info(average_incident_edge_length(vit));
+    }
+  }
+
+private:
+  /**
+   * Returns size at point \c p, by interpolation inside facet
+   */
+  FT interpolate_on_face_vertices(const Point_2&
+#ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES
+                                  p
+#endif
+                                  , const Face_handle& f) const
+  {
+    // Interpolate value using tet vertices values
+    const FT& sa = f->vertex(0)->sizing_info();
+    const FT& sb = f->vertex(1)->sizing_info();
+    const FT& sc = f->vertex(2)->sizing_info();
+
+#ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES
+    const Point_2& a = f->vertex(0)->point();
+    const Point_2& b = f->vertex(1)->point();
+    const Point_2& c = f->vertex(2)->point();
+    double abc_inv = 1. / CGAL::area(a, b, c);
+    double alpha = CGAL::area(p, b, c) * abc_inv;
+    double beta = CGAL::area(a, p, c) * abc_inv;
+    double gamma = CGAL::area(a, b, p) * abc_inv;
+
+    return alpha * sa + beta * sb + gamma * sc;
+#else
+    return ((sa + sb + sc) / 3.); 
+#endif
+  }
+
+  /**
+   * Returns size at point \c p, by interpolation inside edge
+   * (\c e f is assumed to be an infinite face)
+   */
+  FT interpolate_on_edge_vertices(const Point_2&
+#ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES
+                                  p
+#endif
+                                  , const Face_handle& f) const
+  {
+    CGAL_precondition(tr_.is_infinite(f));
+    int finite_i = -1;
+    for(int i = 0; i < 3; ++i)
+    {
+      if(!tr_.is_infinite(f, i))
+        finite_i = i;
+    }
+    CGAL_assertion(finite_i != -1);
+
+    const FT& sa = f->vertex(tr_.cw(finite_i))->sizing_info();
+    const FT& sb = f->vertex(tr_.ccw(finite_i))->sizing_info();
+
+#ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES
+    const Point_2& pa = f->vertex(tr_.cw(finite_i))->point();
+    const Point_2& pb = f->vertex(tr_.ccw(finite_i))->point();
+
+    FT t = CGAL::sqrt(
+      CGAL::squared_distance(pb, pb) / CGAL::squared_distance(pa, pb));
+    CGAL_assertion(t <= 1.);
+
+    return t * sa + (1. - t) * sb;
+#else
+    return 0.5 * (sa + sb);
+#endif
+  }
+
+  FT average_incident_edge_length(const Vertex_handle& v) const
+  {
+    typename Tr::Edge_circulator ec = tr_.incident_edges(v);
+    typename Tr::Edge_circulator end = ec;
+
+    FT sum_len(0.);
+    FT nb = 0.;
+    do
+    {
+      Edge e = *ec;
+      if(tr_.is_infinite(e))
+        continue;
+
+      Face_handle f1 = e.first;
+      Face_handle f2 = e.first->neighbor(e.second);
+      if(f1->is_in_domain() || f2->is_in_domain())
+      {
+        sum_len += length(e);
+        ++nb;
+      }
+    }
+    while(++ec != end);
+    // nb == 0 could happen if there is an isolated point.
+    if( 0 != nb )
+      return sum_len/nb;
+    else
+     // Use outside faces to compute size of point
+      return 1.;//todo
+  }
+
+  FT length(const Edge& e) const
+  {
+    Point_2 p1 = e.first->vertex(Tr::cw(e.second))->point();
+    Point_2 p2 = e.first->vertex(Tr::ccw(e.second))->point();
+    return CGAL::sqrt(CGAL::squared_distance(p1, p2));
+  }
+  
+private:
+  /// The triangulation
+  Tr& tr_;
+  /// A face_handle that is used to accelerate location queries
+  mutable Face_handle last_face_;
+};
+
+} // end namespace Mesh_2
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_2_MESH_SIZING_FIELD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Output_stream.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Output_stream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Output_stream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Output_stream.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/README b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/README
new file mode 100644
index 0000000..30d815f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/README
@@ -0,0 +1,6 @@
+No header in this sub-directory, but Face_badness.h, is documented. They
+are internal headers of the Mesh_2 packages, and should not be used.
+
+If you want to use some undocumented functionnality, please contact me
+(Laurent Rineau <laurent.rineau at ens.fr>) so that we can see if I can move
+some internal details to the documented interface.
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges_with_clusters.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges_with_clusters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_edges_with_clusters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_edges_with_clusters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_faces.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_faces.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_2/Refine_faces.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Refine_faces.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Sizing_field_2.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Sizing_field_2.h
new file mode 100644
index 0000000..2224796
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Sizing_field_2.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s) : Jane Tournois, Pierre Alliez
+//
+
+#ifndef CGAL_SIZING_FIELD_2_H
+#define CGAL_SIZING_FIELD_2_H
+
+#include <list>
+
+#include <CGAL/basic.h>
+
+namespace CGAL
+{
+
+template <typename Tr>
+class Sizing_field_2 // pure virtual class
+{    
+public:
+  typedef typename Tr::Geom_traits::Point_2 Point_2;
+  typedef typename Tr::Geom_traits::FT      FT;
+
+public:
+  Sizing_field_2()
+  {
+  }
+  Sizing_field_2(Tr& )
+  {
+  }
+
+  virtual ~Sizing_field_2()
+  {
+  }
+
+  virtual FT operator()(const Point_2& p) const = 0;
+};
+
+}//namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Uniform_sizing_field_2.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Uniform_sizing_field_2.h
new file mode 100644
index 0000000..2783ed8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_2/Uniform_sizing_field_2.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2013 INRIA Sophia-Antipolis (France),
+//               2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s) : Jane Tournois, Pierre Alliez
+//
+
+#ifndef CGAL_MESH_2_UNIFORM_SIZING_FIELD_H
+#define CGAL_MESH_2_UNIFORM_SIZING_FIELD_H
+
+#include <CGAL/Mesh_2/Sizing_field_2.h>
+
+namespace CGAL {
+
+namespace Mesh_2 {
+  
+template <typename Tr>
+class Uniform_sizing_field_2
+  : public virtual Sizing_field_2<Tr>
+{
+  typedef typename Tr::Geom_traits::Point_2       Point_2;
+  typedef typename Tr::Geom_traits::FT            FT;
+  
+public:
+  // Vertices of mesh triangulation do not need to be updated 
+  static const bool is_vertex_update_needed = false;
+
+public:
+  Uniform_sizing_field_2(Tr& ) {}
+
+public:
+  FT operator()(const Point_2&) const { return FT(1); }
+};
+  
+  
+} // end namespace Mesh_2
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_2_UNIFORM_SIZING_FIELD_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/C3T3_helpers.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/C3T3_helpers.h
new file mode 100644
index 0000000..1e8863d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/C3T3_helpers.h
@@ -0,0 +1,3906 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+//
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_C3T3_HELPERS_H
+#define CGAL_MESH_3_C3T3_HELPERS_H
+
+#include <CGAL/Mesh_3/config.h>
+#include <CGAL/use.h>
+
+#include <CGAL/linear_least_squares_fitting_3.h>
+#include <CGAL/Mesh_3/Triangulation_helpers.h>
+#include <CGAL/tuple.h>
+#include <CGAL/iterator.h>
+#include <CGAL/array.h>
+#include <CGAL/Handle_hash_function.h>
+
+#ifdef CGAL_MESH_3_PROFILING
+  #include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#include <boost/foreach.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/optional.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/function_output_iterator.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/unordered_set.hpp>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/parallel_do.h>
+#endif
+
+#include <functional>
+#include <vector>
+#include <set>
+
+namespace CGAL {
+namespace Mesh_3 {
+
+#ifdef CGAL_INTRUSIVE_LIST
+template <typename Type>
+class Intrusive_list {
+public:
+
+  typedef Type Type_handle;
+  typedef Type_handle& reference;
+  typedef const Type_handle& const_reference;
+  typedef Type_handle value_type;
+
+  Intrusive_list()
+    : f(), b(), n(0)
+  {}
+
+  ~Intrusive_list()
+  {
+    clear();
+  }
+
+
+  Intrusive_list(const Intrusive_list& )
+  {
+    CGAL_assertion(false);
+  }
+
+#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
+  template <typename IT>
+  Intrusive_list(IT first, IT last)
+  : f(), b(), n(0)
+  {
+    if(first == last){
+      return;
+    }
+
+    f = *first;
+    Type_handle ch = f;
+    ++n;
+    ++first;
+    while(first != last){
+      if((ch != Type(*first)) && ((*first)->next_intrusive()==Type_handle())){
+        // not yet inserted
+        ch->set_next_intrusive(*first);
+        (*first)->set_previous_intrusive(ch);
+        ch = *first;
+        ++n;
+      }
+      ++first;
+    }
+    b = ch;
+    b->set_next_intrusive(f);
+    f->set_previous_intrusive(b);
+  }
+#endif
+
+  bool
+  is_valid() const
+  {
+    if(n < 0){
+      std::cerr << "n < 0" << std::endl;
+      return false;
+    }
+    if(n == 0){
+      if (f != Type_handle()){
+        std::cerr << "n==0, but f!= Type_handle()" << std::endl;
+        return false;
+      }
+      if (b != Type_handle()){
+        std::cerr << "n==0, but b!= Type_handle()" << std::endl;
+        return false;
+      }
+    }else{
+      if(f->previous_intrusive() != b){
+        std::cerr << "f->previous_intrusive() != b" << std::endl;
+        return false;
+      }
+      if(b->next_intrusive() != f){
+        std::cerr << "b->next_intrusive() != f" << std::endl;
+      return false;
+      }
+
+
+      Type_handle ch = f;
+      for(std::size_t i = 1; i < n; i++){
+        if(ch->next_intrusive()->previous_intrusive() != ch){
+          std::cerr << "ch->next_intrusive()->previous_intrusive() != ch" << std::endl;
+          return false;
+        }
+        ch = ch->next_intrusive();
+      }
+      if(ch != b){
+        std::cerr << "ch!= b)" << std::endl;
+        return false;
+      }
+    }
+    return true;
+  }
+
+
+  void clear()
+  {
+    if(!empty()){
+      while( f!= b ){
+        Type_handle h = f;
+        f=f->next_intrusive();
+        h->set_previous_intrusive(Type_handle());
+        h->set_next_intrusive(Type_handle());
+      }
+      b->set_previous_intrusive(Type_handle());
+      b->set_next_intrusive(Type_handle());
+      f = b = Type_handle();
+    }
+    n = 0;
+  }
+
+  std::size_t size() const
+  {
+    return n;
+  }
+
+
+  struct iterator {
+    Type_handle pos, b;
+
+    typedef Type_handle                      value_type;
+    typedef const Type_handle*                     pointer;
+    typedef const Type_handle&                     reference;
+    typedef std::size_t                      size_type;
+    typedef std::ptrdiff_t                   difference_type;
+    typedef std::forward_iterator_tag  iterator_category;
+
+    iterator(Type_handle f, Type_handle b)
+      : pos(f), b(b)
+    {}
+
+    iterator()
+      : pos()
+    {}
+
+    iterator& operator++()
+    {
+      if(pos != Type_handle()){
+        if(pos == b){
+          pos = Type_handle(); // past the end
+        }else {
+          pos = pos->next_intrusive();
+        }
+      }
+      return *this;
+    }
+
+    iterator operator++(int)
+    {
+      iterator tmp(*this);
+      ++(*this);
+      return tmp;
+    }
+
+    bool operator==(const iterator& i) const
+    {
+      return pos == i.pos;
+    }
+
+    bool operator!=(const iterator& i) const
+    {
+      return !(*this == i);
+    }
+
+    reference operator*() const
+    {
+      return pos;
+    }
+
+    pointer operator->() const
+    {
+      return pos;
+    }
+  }; // struct iterator
+
+
+  iterator begin()
+  {
+    return iterator(f,b);
+  }
+
+  iterator end()
+  {
+    return iterator();
+  }
+
+
+  Type_handle front() const
+  {
+    return f;
+  }
+
+  Type_handle& front()
+  {
+    return f;
+  }
+
+
+  Type_handle back() const
+  {
+    return b;
+  }
+
+  Type_handle& back()
+  {
+    return b;
+  }
+
+  iterator insert(iterator /* position */,
+                  const Type_handle& ch)
+  {
+    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
+            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
+    CGAL_expensive_assertion(is_valid());
+
+    if(ch->next_intrusive() != Type_handle()){
+      return iterator(ch->next_intrusive()/*first*/, ch/*last*/);
+    }
+    else{
+      insert(ch);
+      return iterator(ch->next_intrusive()/*first*/, ch/*last*/);
+    }
+  }
+
+  void insert(Type_handle ch)
+  {
+    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
+            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
+    CGAL_expensive_assertion(is_valid());
+
+    if(ch->next_intrusive() != Type_handle()){
+      return;
+    }
+    if(empty()){
+      f = b = ch;
+      ch->set_next_intrusive(ch);
+      ch->set_previous_intrusive(ch);
+    } else {
+      ch->set_next_intrusive(f);
+      ch->set_previous_intrusive(b);
+      f->set_previous_intrusive(ch);
+      b->set_next_intrusive(ch);
+      b = ch;
+    }
+    n++;
+  }
+
+  void erase(Type_handle ch)
+  {
+    CGAL_assertion( (ch->next_intrusive() == Type_handle() && ch->previous_intrusive() == Type_handle()) ||
+            (ch->next_intrusive() != Type_handle() && ch->previous_intrusive() != Type_handle()) );
+    CGAL_expensive_assertion(is_valid());
+    if(ch->next_intrusive() == Type_handle()){
+      return;
+    }
+    if(f == b){ // only 1 element in the list
+      CGAL_assertion(f == ch);
+      CGAL_assertion(n == 1);
+
+      f = b = Type_handle();
+    } else {
+      if(f == ch){
+        f = f->next_intrusive();
+      }
+      if(b == ch){
+        b = b->previous_intrusive();
+      }
+      Type_handle p = ch->previous_intrusive(), n = ch->next_intrusive();
+      p->set_next_intrusive(n);
+      n->set_previous_intrusive(p);
+    }
+    ch->set_next_intrusive(Type_handle());
+    ch->set_previous_intrusive(Type_handle());
+    CGAL_assertion(ch->next_intrusive() == Type_handle());
+    CGAL_assertion(ch->previous_intrusive() == Type_handle());
+    n--;
+  }
+
+  bool empty() const
+  {
+    if(f == Type_handle()){
+      CGAL_assertion(b == Type_handle());
+      CGAL_assertion(n == 0);
+    }
+    return f == Type_handle();
+  }
+
+  bool contains(Type_handle th) const
+  {
+    if(th->next_intrusive() == Type_handle())
+    {
+      CGAL_assertion(th->previous_intrusive() == Type_handle());
+      return true;
+    }
+    else return false;
+  }
+
+  void push_back(Type_handle ch)
+  {
+    insert(ch);
+  }
+
+private:
+  Type_handle f,b;
+  std::size_t n;
+};
+#endif // #ifdef CGAL_INTRUSIVE_LIST
+
+
+/************************************************
+// Class C3T3_helpers_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Tr, typename Concurrency_tag>
+class C3T3_helpers_base
+{
+protected:
+  typedef typename Tr::Geom_traits          Gt;
+  typedef typename Gt::Point_3              Point_3;
+  typedef typename Tr::Vertex_handle        Vertex_handle;
+  typedef typename Tr::Cell_handle          Cell_handle;
+  typedef typename Tr::Facet                Facet;
+  typedef typename Tr::Lock_data_structure  Lock_data_structure;
+
+  C3T3_helpers_base(Lock_data_structure *) {}
+
+  Lock_data_structure *get_lock_data_structure() const
+  {
+    return 0;
+  }
+
+public:
+  // Dummy locks/unlocks
+  bool try_lock_point(const Point_3 &, int = 0) const
+  {
+    return true;
+  }
+
+  bool try_lock_vertex(Vertex_handle, int = 0) const
+  {
+    return true;
+  }
+
+  bool try_lock_point_no_spin(const Point_3 &, int = 0) const
+  {
+    return true;
+  }
+
+  bool try_lock_vertex_no_spin(Vertex_handle, int = 0) const
+  {
+    return true;
+  }
+
+  bool try_lock_element(Cell_handle, int = 0) const
+  {
+    return true;
+  }
+
+  bool try_lock_element(const Facet &, int = 0) const
+  {
+    return true;
+  }
+
+
+  bool is_point_locked_by_this_thread(const Point_3 &) const
+  { return false; }
+
+  bool is_cell_locked_by_this_thread(const Cell_handle &) const
+  { return false; }
+
+  void unlock_all_elements() const {}
+
+  // Dummy locks/unlocks
+  void lock_outdated_cells() const {}
+  void unlock_outdated_cells() const {}
+  void lock_moving_vertices() const {}
+  void unlock_moving_vertices() const {}
+  void lock_vertex_to_proj() const {}
+  void unlock_vertex_to_proj() const {}
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Tr>
+class C3T3_helpers_base<Tr, Parallel_tag>
+{
+protected:
+  typedef typename Tr::Geom_traits          Gt;
+  typedef typename Gt::Point_3              Point_3;
+  typedef typename Tr::Vertex_handle        Vertex_handle;
+  typedef typename Tr::Cell_handle          Cell_handle;
+  typedef typename Tr::Facet                Facet;
+  typedef typename Tr::Lock_data_structure  Lock_data_structure;
+
+  C3T3_helpers_base(Lock_data_structure *lock_ds)
+    : m_lock_ds(lock_ds) {}
+
+
+public:
+  // LOCKS (CONCURRENCY)
+
+  /*Lock_data_structure *get_lock_data_structure() const
+  {
+    return m_lock_ds;
+  }*/
+
+  bool try_lock_point(const Point_3 &p, int lock_radius = 0) const
+  {
+    if (m_lock_ds)
+    {
+      return m_lock_ds->try_lock(p, lock_radius);
+    }
+    return true;
+  }
+
+  bool try_lock_vertex(Vertex_handle vh, int lock_radius = 0) const
+  {
+    if (m_lock_ds)
+    {
+      return m_lock_ds->try_lock(vh->point(), lock_radius);
+    }
+    return true;
+  }
+
+  bool try_lock_point_no_spin(const Point_3 &p, int lock_radius = 0) const
+  {
+    if (m_lock_ds)
+    {
+      return m_lock_ds->template try_lock<true>(p, lock_radius);
+    }
+    return true;
+  }
+
+  bool try_lock_vertex_no_spin(Vertex_handle vh, int lock_radius = 0) const
+  {
+    return try_lock_point_no_spin(vh->point(), lock_radius);
+  }
+
+  bool try_lock_element(Cell_handle cell_handle, int lock_radius = 0) const
+  {
+    bool success = true;
+
+    // Lock the element area on the grid
+    for (int iVertex = 0 ; success && iVertex < 4 ; ++iVertex)
+    {
+      Vertex_handle vh = cell_handle->vertex(iVertex);
+      success = try_lock_vertex(vh, lock_radius);
+    }
+
+    return success;
+  }
+
+  bool try_lock_element(const Facet &facet, int lock_radius = 0) const
+  {
+    bool success = true;
+
+    // Lock the element area on the grid
+    Cell_handle cell = facet.first;
+    for (int iVertex = (facet.second+1)&3 ;
+          success && iVertex != facet.second ; iVertex = (iVertex+1)&3)
+    {
+      Vertex_handle vh = cell->vertex(iVertex);
+      success = try_lock_vertex(vh, lock_radius);
+    }
+
+    return success;
+  }
+
+  bool is_point_locked_by_this_thread(const Point_3 &p) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      locked = m_lock_ds->is_locked_by_this_thread(p);
+    }
+    return locked;
+  }
+
+  bool is_cell_locked_by_this_thread(const Cell_handle &cell_handle) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
+      {
+        locked = m_lock_ds->is_locked_by_this_thread(
+          cell_handle->vertex(iVertex)->point());
+      }
+    }
+    return locked;
+  }
+
+  void unlock_all_elements() const
+  {
+    if (m_lock_ds)
+    {
+      m_lock_ds->unlock_all_points_locked_by_this_thread();
+    }
+  }
+
+  void lock_outdated_cells() const
+  {
+    m_mut_outdated_cells.lock();
+  }
+  void unlock_outdated_cells() const
+  {
+    m_mut_outdated_cells.unlock();
+  }
+
+  void lock_moving_vertices() const
+  {
+    m_mut_moving_vertices.lock();
+  }
+  void unlock_moving_vertices() const
+  {
+    m_mut_moving_vertices.unlock();
+  }
+
+  void lock_vertex_to_proj() const
+  {
+    m_mut_vertex_to_proj.lock();
+  }
+  void unlock_vertex_to_proj() const
+  {
+    m_mut_vertex_to_proj.unlock();
+  }
+
+protected:
+  Lock_data_structure *m_lock_ds;
+
+  typedef tbb::mutex  Mutex_type;
+  mutable Mutex_type  m_mut_outdated_cells;
+  mutable Mutex_type  m_mut_moving_vertices;
+  mutable Mutex_type  m_mut_vertex_to_proj;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+
+/************************************************
+ *
+ * C3T3_helpers class
+ *
+ ************************************************/
+
+template <typename C3T3,
+          typename MeshDomain>
+class C3T3_helpers
+: public C3T3_helpers_base<typename C3T3::Triangulation,
+                           typename C3T3::Concurrency_tag>
+{
+  // -----------------------------------
+  // Private types
+  // -----------------------------------
+  typedef C3T3_helpers<C3T3, MeshDomain> Self;
+  typedef C3T3_helpers_base<typename C3T3::Triangulation,
+                            typename C3T3::Concurrency_tag> Base;
+  typedef typename C3T3::Concurrency_tag Concurrency_tag;
+
+  typedef typename Base::Lock_data_structure  Lock_data_structure;
+  typedef typename C3T3::Triangulation        Tr;
+  typedef Tr                                  Triangulation;
+  typedef typename Tr::Geom_traits            Gt;
+
+  typedef typename Gt::Vector_3         Vector_3;
+  typedef typename Gt::Point_3          Point_3;
+  typedef typename Gt::Plane_3          Plane_3;
+  typedef typename Gt::FT               FT;
+  typedef typename Gt::Tetrahedron_3    Tetrahedron;
+
+  typedef typename Tr::Vertex_handle    Vertex_handle;
+  typedef typename Tr::Cell_handle      Cell_handle;
+  typedef typename Tr::Cell             Cell;
+  typedef typename Tr::Facet            Facet;
+
+  typedef typename C3T3::Surface_patch_index  Surface_patch_index;
+  typedef typename C3T3::Subdomain_index      Subdomain_index;
+  typedef typename C3T3::Index                Index;
+
+  typedef boost::optional<Surface_patch_index>  Surface_patch;
+  typedef boost::optional<Subdomain_index>      Subdomain;
+
+  typedef std::vector<Cell_handle>      Cell_vector;
+  typedef std::set<Cell_handle>         Cell_set;
+  typedef std::vector<Tetrahedron>      Tet_vector;
+
+  typedef std::vector<Facet>            Facet_vector;
+  typedef std::vector<Vertex_handle>    Vertex_vector;
+  typedef std::set<Vertex_handle>       Vertex_set;
+
+#ifdef CGAL_INTRUSIVE_LIST
+  typedef Intrusive_list<Cell_handle>   Outdated_cell_set;
+#else
+  typedef Cell_set  Outdated_cell_set;
+#endif //CGAL_INTRUSIVE_LIST
+
+#ifdef CGAL_INTRUSIVE_LIST
+  typedef Intrusive_list<Vertex_handle>  Moving_vertices_set;
+#else
+  typedef Vertex_set Moving_vertices_set;
+#endif //CGAL_INTRUSIVE_LIST
+
+private:
+  // Facet_boundary stores the edges, of the boundary of surface facets,
+  // with meta-data.
+  typedef std::pair<Vertex_handle,Vertex_handle> Ordered_edge;
+  typedef std::pair<int, Index> Vertex_data;
+  // Vertex_data is the dimension and Index of the third vertex of the
+  // facet.
+  typedef std::pair<Surface_patch_index, Vertex_data>  Facet_topology_description;
+  typedef std::map<Ordered_edge,Facet_topology_description>  Facet_boundary;
+
+  typedef Triangulation_helpers<Tr> Th;
+
+public:
+  // -----------------------------------
+  // Public interface
+  // -----------------------------------
+  typedef boost::optional<Vertex_handle> Update_mesh;
+
+  using Base::try_lock_point;
+  using Base::try_lock_vertex;
+  using Base::try_lock_point_no_spin;
+  using Base::try_lock_vertex_no_spin;
+  using Base::try_lock_element;
+  using Base::is_point_locked_by_this_thread;
+  using Base::is_cell_locked_by_this_thread;
+  using Base::unlock_all_elements;
+  using Base::lock_outdated_cells;
+  using Base::unlock_outdated_cells;
+  using Base::lock_moving_vertices;
+  using Base::unlock_moving_vertices;
+  using Base::lock_vertex_to_proj;
+  using Base::unlock_vertex_to_proj;
+
+  /**
+   * Constructor
+   */
+  C3T3_helpers(C3T3& c3t3, const MeshDomain& domain,
+               Lock_data_structure *lock_ds = NULL)
+    : Base(lock_ds)
+    , c3t3_(c3t3)
+    , tr_(c3t3.triangulation())
+    , domain_(domain) { }
+
+  /**
+   * @brief tries to move \c old_vertex to \c new_position in the mesh
+   * @param new_position the new position of \c old_vertex
+   * @param old_vertex the old vertex
+   * @param criterion the criterion which will be used to verify the new
+   *    position is ok. c3t3 minimal value of new criterion shall not decrease.
+   * @param modified_vertices contains the vertices incident to cells which
+   *    may have been impacted by relocation
+   * @return a pair which contains:
+   *    - a bool which is \c true if the move has been done.
+   *    - a Vertex_handle which is always filled and may be the new vertex (if
+   *      the move is a success), or the vertex which lies at \c v's position in
+   *      the updated c3t3.
+   */
+  template <typename SliverCriterion, typename OutputIterator>
+  std::pair<bool,Vertex_handle>
+  update_mesh(const Point_3& new_position,
+              const Vertex_handle& old_vertex,
+              const SliverCriterion& criterion,
+              OutputIterator modified_vertices,
+              bool *could_lock_zone = NULL);
+
+  /** @brief tries to move \c old_vertex to \c new_position in the mesh
+   *
+   * Same as update_mesh, but with the precondition that
+   * Th().no_topological_change(tr_, old_vertex, new_position,
+   * incident_cells_) return false.
+   */
+  template <typename SliverCriterion, typename OutputIterator>
+  std::pair<bool,Vertex_handle>
+  update_mesh_topo_change(const Point_3& new_position,
+                          const Vertex_handle& old_vertex,
+                          const SliverCriterion& criterion,
+                          OutputIterator modified_vertices,
+                          bool *could_lock_zone = NULL);
+
+  /**
+   * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the
+   * new vertex of the triangulation.
+   *
+   * Insert into modified vertices the vertices which are impacted by to move.
+   */
+  template <typename OutputIterator>
+  Vertex_handle update_mesh(const Point_3& new_position,
+                            const Vertex_handle& old_vertex,
+                            OutputIterator modified_vertices,
+                            bool fill_modified_vertices = true);
+
+  /**
+   * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the
+   * new vertex of the triangulation.
+   */
+  Vertex_handle update_mesh(const Point_3& new_position,
+                            const Vertex_handle& old_vertex)
+  {
+    return update_mesh(new_position, old_vertex, Emptyset_iterator(), false);
+  }
+
+  /**
+   * Rebuilds restricted Delaunay
+   */
+  template <typename ForwardIterator>
+  void rebuild_restricted_delaunay(ForwardIterator first_cell,
+                                   ForwardIterator last_cell,
+                                   Moving_vertices_set& moving_vertices);
+
+#ifdef CGAL_INTRUSIVE_LIST
+  template <typename OutdatedCells>
+  void rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
+                                   Moving_vertices_set& moving_vertices);
+#endif
+
+  /**
+   * @brief Project \c p on surface, using incident facets of \c v
+   * @param p The point to project
+   * @param v The vertex from which p was moved
+   * @param index The index of the surface patch where v lies, if known.
+   * @return the projected point
+   *
+   * \c p is projected as follows using normal of least square fitting plane
+   * on \c v incident surface points. If \c index is specified, only
+   * surface points that are on the same surface patch are used to compute
+   * the fitting plane.
+   */
+  Point_3
+  project_on_surface(const Point_3& p, const Vertex_handle& v,
+                     Surface_patch_index index = Surface_patch_index()) const;
+
+  /**
+   * Returns the minimum value for criterion for incident cells of \c vh
+   */
+  template <typename SliverCriterion>
+  FT min_incident_value(const Vertex_handle& vh,
+                        const SliverCriterion& criterion) const;
+
+  /**
+   * Moves \c old_vertex to \c new_position
+   * Stores the cells which have to be updated in \c outdated_cells
+   * Updates the Vertex_handle old_vertex to its new value in \c moving_vertices
+   * The second one (with the could_lock_zone param) is for the parallel version
+   */
+  Vertex_handle move_point(const Vertex_handle& old_vertex,
+                           const Point_3& new_position,
+                           Outdated_cell_set& outdated_cells_set,
+                           Moving_vertices_set& moving_vertices) const;
+  Vertex_handle move_point(const Vertex_handle& old_vertex,
+                           const Point_3& new_position,
+                           Outdated_cell_set& outdated_cells_set,
+                           Moving_vertices_set& moving_vertices,
+                           bool *could_lock_zone) const;
+
+  /**
+   * Try to lock the incident cells and return them in \c cells
+   * Return value:
+   * - false: everything is unlocked and \c cells is empty
+   * - true: incident cells are locked and \c cells contains all of them
+   */
+  bool
+  try_lock_and_get_incident_cells(const Vertex_handle& v,
+                                  Cell_vector &cells) const;
+
+  /**
+   * Try to lock ALL the incident cells and return in \c cells the ones
+   * whose \c filter says "true".
+   * Return value:
+   * - false: everything is unlocked and \c cells is empty
+   * - true: ALL incident cells are locked and \c cells is filled
+   */
+  template <typename Filter>
+  bool
+  try_lock_and_get_incident_cells(const Vertex_handle& v,
+                                  Cell_vector &cells,
+                                  const Filter &filter) const;
+
+  /**
+   * Try to lock ALL the incident cells and return in \c cells the slivers
+   * Return value:
+   * - false: everything is unlocked and \c cells is empty
+   * - true: incident cells are locked and \c cells contains all slivers
+   */
+  template <typename SliverCriterion>
+  bool
+  try_lock_and_get_incident_slivers(const Vertex_handle& v,
+                                    const SliverCriterion& criterion,
+                                    const FT& sliver_bound,
+                                    Cell_vector &cells) const;
+
+  template <typename SliverCriterion>
+  void
+  get_incident_slivers_without_using_tds_data(const Vertex_handle& v,
+                                              const SliverCriterion& criterion,
+                                              const FT& sliver_bound,
+                                              Cell_vector &slivers) const;
+
+  /**
+   * Outputs to out the sliver (wrt \c criterion and \c sliver_bound) incident
+   * to \c v
+   */
+  template <typename SliverCriterion, typename OutputIterator>
+  OutputIterator
+  incident_slivers(const Vertex_handle& v,
+                   const SliverCriterion& criterion,
+                   const FT& sliver_bound,
+                   OutputIterator out) const;
+
+
+  template <typename SliverCriterion, typename OutputIterator>
+  OutputIterator
+  new_incident_slivers(const Vertex_handle& v,
+                   const SliverCriterion& criterion,
+                   const FT& sliver_bound,
+                   OutputIterator out) const;
+
+  /**
+   * Returns the sliver (wrt \c criterion and \c sliver_bound) incident to \c v
+   */
+  template <typename SliverCriterion>
+  Cell_vector
+  incident_slivers(const Vertex_handle& v,
+                   const SliverCriterion& criterion,
+                   const FT& sliver_bound) const
+  {
+    Cell_vector slivers;
+    incident_slivers(v, criterion, sliver_bound, std::back_inserter(slivers));
+    return slivers;
+  }
+
+  template <typename SliverCriterion>
+  Cell_vector
+  new_incident_slivers(const Vertex_handle& v,
+                   const SliverCriterion& criterion,
+                   const FT& sliver_bound) const
+  {
+    Cell_vector slivers;
+    new_incident_slivers(v, criterion, sliver_bound, std::back_inserter(slivers));
+    return slivers;
+  }
+
+
+  /**
+   * Returns the number of slivers incident to \c v
+   */
+  template <typename SliverCriterion>
+  std::size_t
+  number_of_incident_slivers(const Vertex_handle& v,
+                             const SliverCriterion& criterion,
+                             const FT& sliver_bound) const;
+
+  template <typename SliverCriterion>
+  bool
+  is_sliver(const Cell_handle& ch,
+            const SliverCriterion& criterion,
+            const FT& sliver_bound) const;
+
+  /**
+   * Returns the minimum criterion value of cells contained in \c cells
+   * Precondition: cells of \c cells must not be infinite.
+   * Warning: Here we don't check if cells are in c3t3
+   */
+  template <typename SliverCriterion>
+  FT min_sliver_value(const Cell_vector& cells,
+                      const SliverCriterion& criterion,
+                      const bool use_cache = true) const;
+
+  /**
+   * Reset cache validity of all cells of c3t3_
+   */
+  void reset_cache() const
+  {
+    for(typename C3T3::Cells_in_complex_iterator it = c3t3_.cells_in_complex_begin();
+        it != c3t3_.cells_in_complex_end(); ++it)
+      it->reset_cache_validity();
+  }
+
+private:
+  // -----------------------------------
+  // Usefull Functors
+  // -----------------------------------
+  /**
+   * @class Get_all_facets
+   *
+   * A functor which adds to an output iterator canonical facets of a cell
+   */
+  template <typename OutputIterator>
+  class Get_all_facets
+  {
+  public:
+    Get_all_facets(const Triangulation& tr, OutputIterator out)
+      : tr_(tr)
+      , out_(out) {}
+
+    void operator()(const Cell_handle& cell)
+    {
+#ifndef CGAL_MESH_3_NEW_GET_FACETS
+      for ( int i=0 ; i<4 ; ++i )
+        if ( !tr_.is_infinite(cell,i) )
+          *out_++ = canonical_facet(cell,i);
+#else
+      // Instead of iterating over the facets we iterate over the vertices
+      // If a vertex is infinite we report only the facet opposite to it and return
+      // If all vertices are finite we report all facets
+      // This approach makes less tests if vertices are infinite
+      int i=0;
+      for ( ; i<4 ; ++i ){
+        if ( tr_.is_infinite(cell->vertex(i)) ){
+          *out_++ = canonical_facet(cell,i);
+          return;
+        }
+      }
+      for ( i=0 ; i<4 ; ++i ){
+        *out_++ = canonical_facet(cell,i);
+      }
+#endif
+    }
+
+  private:
+    Facet canonical_facet(const Cell_handle& c, const int i) const
+    {
+#ifndef CGAL_MESH_3_NEW_GET_FACETS
+      Facet facet(c,i);
+      Facet mirror = tr_.mirror_facet(facet);
+      return ( (mirror<facet)?mirror:facet );
+#else
+      Cell_handle n = c->neighbor(i);
+      if(c < n){
+        return Facet(c,i);
+      }else{
+        return Facet(n,n->index(c));
+      }
+#endif
+    }
+
+  private:
+    const Triangulation& tr_;
+    OutputIterator out_;
+  };
+
+
+  /**
+   * @class Is_in_c3t3
+   *
+   * A functor which returns true if a given handle is in c3t3
+   */
+  template <typename Handle>
+  class Is_in_c3t3 : public std::unary_function<Handle, bool>
+  {
+  public:
+    Is_in_c3t3(const C3T3& c3t3) : c3t3_(c3t3) { }
+    bool operator()(const Handle& h) const { return c3t3_.is_in_complex(h); }
+
+  private:
+    const C3T3& c3t3_;
+  };
+
+
+  /**
+   * @class Is_sliver
+   *
+   * A functor which answers true if a Cell_handle is a sliver
+   */
+  template <typename SliverCriterion>
+  struct Is_sliver : public std::unary_function<Cell_handle,bool>
+  {
+    Is_sliver(const C3T3& c3t3,
+              const SliverCriterion& criterion,
+              const FT& bound = 0)
+      : c3t3_(c3t3)
+      , criterion_(criterion)
+      , bound_(bound) { }
+
+    bool operator()(const Cell_handle& c) const
+    {
+      if ( c3t3_.is_in_complex(c) )
+      {
+        CGAL_assertion(!c3t3_.triangulation().is_infinite(c));
+
+        if ( ! c->is_cache_valid() )
+        {
+          Sliver_criterion_value<SliverCriterion> sc_value(c3t3_.triangulation(),
+                                                           criterion_);
+          (void) sc_value(c); // 'sc_value::operator()' updates the cache of 'c'
+        }
+        else
+        {
+          CGAL_expensive_assertion(c->sliver_value() == criterion_(c));
+        }
+        if(bound_ > 0)
+          return ( c->sliver_value() <= bound_ );
+        else
+          return ( c->sliver_value() <= criterion_.sliver_bound() );
+      }
+      else
+        return false;
+    }
+
+  private:
+    const C3T3& c3t3_;
+    const SliverCriterion& criterion_;
+    const FT bound_;
+  };
+
+
+  /**
+   * @class Update_c3t3
+   *
+   * A functor which updates c3t3 w.r.t the domain.
+   */
+  class Update_c3t3
+  {
+  public:
+    Update_c3t3(const MeshDomain& domain, C3T3& c3t3)
+      : domain_(domain)
+      , c3t3_(c3t3) {}
+
+    /**
+     * @brief Updates facet \c facet in c3t3
+     * @param facet the facet to update
+     * @param update if set to \c false, checking only is done
+     * @return true if \c facet is in c3t3
+     */
+    Surface_patch operator()(const Facet& facet, const bool update = true) const
+    {
+      return this->operator()(facet, update, update);
+    }
+
+    /**
+     * @brief Updates facet \c facet in c3t3
+     * @param facet the facet to update
+     * @param update_c3t3 if set to \c false, checking only is done
+     * @param update_surface_center if set to \c true, the facet surface
+     * center is updated.
+     * @return true if \c facet is in c3t3
+     *
+     * By default, \c update_c3t3 is \c true, and \c update_surface_center
+     * is equal to \c update_c3t3.
+     */
+    Surface_patch operator()(const Facet& facet,
+                             const bool update_c3t3,
+                             const bool update_surface_center) const
+    {
+      typedef typename C3T3::Triangulation::Geom_traits Gt;
+      typedef typename Gt::Segment_3 Segment_3;
+      typedef typename Gt::Ray_3 Ray_3;
+      typedef typename Gt::Line_3 Line_3;
+
+      // Nothing to do for infinite facets
+      if ( c3t3_.triangulation().is_infinite(facet) )
+        return Surface_patch();
+
+      // Functors
+      typename Gt::Is_degenerate_3 is_degenerate =
+        Gt().is_degenerate_3_object();
+
+      // Get dual of facet
+      Object dual = c3t3_.triangulation().dual(facet);
+
+      // The dual is a segment, a ray or a line
+      if ( const Segment_3* p_segment = object_cast<Segment_3>(&dual) )
+      {
+        if (is_degenerate(*p_segment))
+          return Surface_patch();
+
+        return dual_intersect(*p_segment,facet,
+                              update_c3t3,
+                              update_surface_center);
+      }
+      else if ( const Ray_3* p_ray = object_cast<Ray_3>(&dual) )
+      {
+        if (is_degenerate(*p_ray))
+          return Surface_patch();
+
+        return dual_intersect(*p_ray,facet,update_c3t3,
+                              update_surface_center);
+      }
+      else if ( const Line_3* p_line = object_cast<Line_3>(&dual) )
+      {
+        return dual_intersect(*p_line,facet,update_c3t3,
+                              update_surface_center);
+      }
+
+      CGAL_error_msg("This should not happen");
+      return Surface_patch();
+    }
+
+    /**
+     * @brief Updates cell \c ch in c3t3
+     * @param ch the cell to update
+     * @param update if set to \c false, checking only is done
+     * @return true if \c ch is in c3t3
+     */
+    Subdomain operator()(const Cell_handle& ch, const bool update = true) const
+    {
+      if ( c3t3_.triangulation().is_infinite(ch) )
+        return Subdomain();
+
+      // treat cell
+      const Subdomain subdomain =
+        domain_.is_in_domain_object()(c3t3_.triangulation().dual(ch));
+        // function dual(cell) updates the circumcenter cache if there is one
+
+      if ( subdomain && update )
+      {
+        c3t3_.add_to_complex(ch,*subdomain);
+      }
+      else if(update)
+      {
+        c3t3_.remove_from_complex(ch);
+      }
+
+      return subdomain;
+    }
+
+  private:
+
+    // Returns true if query intersects the surface.
+    template <typename Query>
+    Surface_patch dual_intersect(const Query& dual,
+                                 const Facet& facet,
+                                 const bool update_c3t3,
+                                 const bool update_surface_center) const
+    {
+      typedef typename MeshDomain::Intersection Intersection;
+
+      typename MeshDomain::Construct_intersection construct_intersection =
+        domain_.construct_intersection_object();
+
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+      typename MeshDomain::Do_intersect_surface do_intersect_surface =
+        domain_.do_intersect_surface_object();
+      Surface_patch surface = do_intersect_surface(dual);
+
+#else // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+      Intersection intersection = construct_intersection(dual);
+      Surface_patch surface =
+        (CGAL::cpp0x::get<2>(intersection) == 0) ? Surface_patch() :
+        Surface_patch(
+          domain_.surface_patch_index(CGAL::cpp0x::get<1>(intersection)));
+
+#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+      // Update if needed
+      if(update_c3t3)
+      {
+        // Update status in c3t3
+        if(surface != boost::none)
+          c3t3_.add_to_complex(facet, surface.get());
+        else
+          c3t3_.remove_from_complex(facet);
+      }
+
+      if(update_surface_center)
+      {
+        Facet facet_m = c3t3_.triangulation().mirror_facet(facet);
+        if(surface)
+        {
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+          Intersection intersection = construct_intersection(dual);
+#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+          // Update facet surface center
+          Point_3 surface_center = CGAL::cpp0x::get<0>(intersection);
+          facet.first->set_facet_surface_center(facet.second,surface_center);
+          facet_m.first->set_facet_surface_center(facet_m.second,surface_center);
+        }
+        else
+        {
+          facet.first->set_facet_surface_center(facet.second,Point_3());
+          facet_m.first->set_facet_surface_center(facet_m.second,Point_3());
+        }
+      }
+
+      return surface;
+    }
+
+
+  private:
+    const MeshDomain& domain_;
+    C3T3& c3t3_;
+  }; //end class Update_c3t3
+
+  class Facet_updater {
+
+    std::set<Vertex_handle>& vertex_to_proj;
+    C3T3& c3t3_;
+    Update_c3t3& c3t3_updater_;
+
+  public:
+    typedef Facet& reference;
+    typedef const Facet& const_reference;
+
+    Facet_updater(C3T3& c3t3,
+      std::set<Vertex_handle>& vertex_to_proj,
+      Update_c3t3& c3t3_updater_)
+      : vertex_to_proj(vertex_to_proj), c3t3_(c3t3), c3t3_updater_(c3t3_updater_)
+    {}
+
+    void
+      operator()(const Facet& f)
+    {
+      // Update facet
+      c3t3_.remove_from_complex(f);
+      c3t3_updater_(f);
+
+      // Update vertex_to_proj
+      if ( c3t3_.is_in_complex(f) )
+      {
+        // Iterate on vertices
+        int k = f.second;
+        for ( int i=1 ; i<4 ; ++i )
+        {
+          const Vertex_handle& v = f.first->vertex((k+i)&3);
+          if ( c3t3_.in_dimension(v) > 2 )
+          {
+            //lock_vertex_to_proj();
+            vertex_to_proj.insert(v);
+            //unlock_vertex_to_proj();
+          }
+        }
+      }
+    }
+
+  }; // end class Facet_updater
+
+
+  /**
+   * @class Sliver_criterion_value
+   *
+   * A functor which returns sliver criterion value for a Cell_handle
+   * and updates its cache value
+   */
+  template <typename SliverCriterion>
+  class Sliver_criterion_value
+    : public std::unary_function<Cell_handle, double>
+  {
+  public:
+    Sliver_criterion_value(const Tr& tr,
+                           const SliverCriterion& criterion)
+      : p_tr_(&tr)
+      , criterion_(criterion) {}
+
+    FT operator()(const Cell_handle& ch) const
+    {
+      CGAL_precondition(!p_tr_->is_infinite(ch));
+
+      if ( ! ch->is_cache_valid() )
+      {
+        double sliver_value = criterion_(ch);
+        ch->set_sliver_value(sliver_value);
+      }
+      else
+      {
+        CGAL_expensive_assertion(ch->sliver_value() == criterion_(ch));
+      }
+      return ch->sliver_value();
+    }
+
+  private:
+    // '=' is used, so p_tr_ must be a pointer ...
+    const Tr* p_tr_;
+    SliverCriterion criterion_;
+  };
+
+  /**
+  * to be used by the perturber
+  */
+  class Cell_from_ids
+  {
+  public:
+    Cell_from_ids(const C3T3& c3t3, const Cell_handle& c)
+      : infinite_(c3t3.triangulation().is_infinite(c))
+      , vertices_()
+      , sorted_vertices_()
+    {
+      for(int i = 0; i < 4; ++i)
+      {
+        if (c3t3.triangulation().is_infinite(c->vertex(i)))
+          continue;
+        //the Id is set with an int by Sliver_perturber,
+        // in initialize_vertices_id
+        int id = static_cast<int>(c->vertex(i)->meshing_info());
+        vertices_.push_back(id);
+      }
+      sorted_vertices_ = vertices_;//makes a copy of each element
+      std::sort(sorted_vertices_.begin(), sorted_vertices_.end());
+      CGAL_assertion((infinite_ && vertices_.size() == 3)
+                   || vertices_.size() == 4);
+    }
+
+    std::size_t vertex_id(const std::size_t& i) const
+    {
+      CGAL_precondition(i >= 0);
+      CGAL_precondition((infinite_ && i < 3) || i < 4);
+      return vertices_[i];
+    }
+
+    bool operator<(const Cell_from_ids& c) const
+    {
+      //std::array operator< compares lhs and rhs lexicographically
+      return sorted_vertices_ < c.sorted_vertices_;
+    }
+
+  private:
+    bool infinite_;
+    // vertices IDs, not sorted, to keep the ordering of the Cell_handle id's
+    std::vector<int> vertices_;
+    // vertices IDs, sorted, to be found in a std::set<Cell_from_ids>
+    std::vector<int> sorted_vertices_;
+  };
+
+  class Cell_data_backup
+  {
+  public:
+    Cell_data_backup(const C3T3& c3t3,
+                     const Cell_handle& c,
+                     const bool do_backup = true)
+      : cell_ids_(c3t3, c)
+    {
+      //backup is not done when constructor is called to
+      //convert a newly created cell (has nothing to backup)
+      //to a Cell_data_backup
+      if(do_backup)
+      {
+        if (!c3t3.triangulation().is_infinite(c))
+          backup_finite_cell(c);
+        else
+          backup_infinite_cell(c, c3t3);
+      }
+    }
+
+  private:
+    void backup_finite_cell(const Cell_handle& c)
+    {
+      if(c->is_cache_valid())
+        sliver_value_ = c->sliver_value();
+      else
+        sliver_value_ = 0.;
+
+      subdomain_index_ = c->subdomain_index();
+      for(std::size_t i = 0; i < 4; ++i)
+      {
+        const int ii = static_cast<const int>(i);//avoid warnings
+        surface_index_table_[i] = c->surface_patch_index(ii);
+        facet_surface_center_[i] = c->get_facet_surface_center(ii);
+        surface_center_index_table_[i] = c->get_facet_surface_center_index(ii);
+      }
+      //note c->next_intrusive() and c->previous_intrusive()
+      //are lost by 'backup' and 'restore',
+      //because all cells are changing during the move
+      //they are not used in update_mesh functions involving a Sliver_criterion
+    }
+
+    void backup_infinite_cell(const Cell_handle& c,
+                              const C3T3& c3t3)
+    {
+      for (int ii = 0; ii < 4; ++ii)
+      {
+        if (c3t3.triangulation().is_infinite(c->vertex(ii)))
+        {
+          surface_index_table_[0] = c->surface_patch_index(ii);
+          facet_surface_center_[0] = c->get_facet_surface_center(ii);
+          surface_center_index_table_[0] = c->get_facet_surface_center_index(ii);
+          break;
+        }
+      }
+    }
+
+  public:
+    bool operator<(const Cell_data_backup& cb) const
+    {
+      return cell_ids_ < cb.cell_ids_;
+    }
+
+    /**
+    * new_cell has the same vertices as cell_ids_
+    *       (checked before function is called)
+    *       resets new_cell's meta-data to its back-uped values
+    */
+    void restore(Cell_handle new_cell, C3T3& c3t3)
+    {
+      if (c3t3.triangulation().is_infinite(new_cell))
+        return restore_infinite_cell(new_cell, c3t3);
+
+      IndexMap new_to_old_indices;
+      CGAL_assertion_code(unsigned int nbv_found = 0);
+      for(int i = 0; i < 4; ++i)
+      {
+        std::size_t new_vi_index =
+          static_cast<std::size_t>(new_cell->vertex(i)->meshing_info());
+        for(std::size_t j = 0; j < 4; ++j)
+        {
+          if(new_vi_index == cell_ids_.vertex_id(j))
+          {
+            new_to_old_indices[static_cast<std::size_t>(i)] = j;
+            CGAL_assertion_code(++nbv_found);
+            break;//loop on j
+          }
+        }//end loop j
+      }//end loop i
+      CGAL_assertion(nbv_found == 4);
+
+      restore(new_cell, new_to_old_indices, c3t3);
+    }
+
+  private:
+    typedef CGAL::cpp11::array<std::size_t, 4> IndexMap;
+
+    void restore(Cell_handle c,
+                 const IndexMap& index_map,//new_to_old_indices
+                 C3T3& c3t3)
+    {
+      if(sliver_value_ > 0.)
+        c->set_sliver_value(sliver_value_);
+
+      for(int i = 0; i < 4; ++i)
+        c->reset_visited(i);
+        //we don't need to store 'visited' information because it is
+        //reset and used locally where it is needed
+
+      //add_to_complex sets the index, and updates the cell counter
+      //if c should be in the c3t3, add_to_complex has to be used
+      //to increment the nb of cells and facets in c3t3
+      if(!( Subdomain_index() == subdomain_index_ ))
+        c3t3.add_to_complex(c, subdomain_index_);
+      else
+        c3t3.remove_from_complex(c);
+
+      for(int i = 0; i < 4; ++i)
+      {
+        std::size_t old_i = index_map.at(static_cast<std::size_t>(i));
+        Surface_patch_index index = surface_index_table_[old_i];
+        //add_to_complex sets the index, and updates the facet counter
+        if(!( Surface_patch_index() == index ))
+          c3t3.add_to_complex(Facet(c, i), index);
+        else
+          c3t3.remove_from_complex(Facet(c,i));
+
+        c->set_facet_surface_center(i, facet_surface_center_[old_i]);
+        c->set_facet_surface_center_index(i, surface_center_index_table_[old_i]);
+      }
+    }
+
+    void restore_infinite_cell(Cell_handle c,
+                               C3T3& c3t3)
+    {
+      c3t3.remove_from_complex(c);//infinite
+      for (unsigned int i = 0; i < 4; ++i)
+      {
+        if (!c3t3.triangulation().is_infinite(Facet(c,i)))
+        {
+          Surface_patch_index index = surface_index_table_[0];
+          if (!( Surface_patch_index() == index ))
+            c3t3.add_to_complex(Facet(c, i), index);
+          else
+            c3t3.remove_from_complex(Facet(c, i));
+
+          c->set_facet_surface_center(i, facet_surface_center_[0]);
+          c->set_facet_surface_center_index(i, surface_center_index_table_[0]);
+          return;
+        }
+      }
+    }
+
+  private:
+    typedef typename Tr::Cell::Subdomain_index Subdomain_index;
+    typedef typename Tr::Cell::Surface_patch_index Surface_patch_index;
+    typedef typename Tr::Cell::Index Index;
+
+    Cell_from_ids cell_ids_;
+    FT sliver_value_;
+    Subdomain_index subdomain_index_;
+    CGAL::cpp11::array<Surface_patch_index, 4> surface_index_table_;
+    CGAL::cpp11::array<Point_3, 4> facet_surface_center_;
+    CGAL::cpp11::array<Index, 4> surface_center_index_table_;
+  };
+
+private:
+  // -----------------------------------
+  // Private methods
+  // -----------------------------------
+  /**
+   * Returns the minimum criterion value of c3t3 cells contained in \c cells.
+   */
+  template <typename SliverCriterion>
+  FT min_sliver_in_c3t3_value(const Cell_vector& cells,
+                              const SliverCriterion& criterion,
+                              const bool use_cache = true) const
+  {
+    // Get complex cells only
+    Cell_vector c3t3_cells_ = c3t3_cells(cells);
+    return min_sliver_value(c3t3_cells_, criterion, use_cache);
+  }
+
+  Cell_vector c3t3_cells(const Cell_vector& cells) const
+  {
+    Cell_vector c3t3_cells;
+    std::remove_copy_if(cells.begin(),
+                        cells.end(),
+                        std::back_inserter(c3t3_cells),
+                        std::not1(Is_in_c3t3<Cell_handle>(c3t3_)) );
+    return c3t3_cells;
+  }
+
+  /**
+   * Removes objects of [begin,end[ range from \c c3t3_
+   */
+  template<typename ForwardIterator>
+  void remove_from_c3t3(ForwardIterator begin, ForwardIterator end) const
+  {
+    while ( begin != end )
+      c3t3_.remove_from_complex(*begin++);
+  }
+
+  /**
+   * Remove cells and facets of \c cells from c3t3
+   */
+  template < typename ForwardIterator >
+  void remove_cells_and_facets_from_c3t3(ForwardIterator cells_begin,
+                                         ForwardIterator cells_end) const
+  {
+    Facet_vector facets = get_facets_not_inplace(cells_begin,cells_end);
+    remove_from_c3t3(facets.begin(), facets.end());
+    remove_from_c3t3(cells_begin, cells_end);
+  }
+
+  /**
+   * Insert into \c out the vertices of range [cells_begin,cells_end[
+   */
+  template <typename InputIterator, typename OutputIterator>
+  void fill_modified_vertices(InputIterator cells_begin,
+                              InputIterator cells_end,
+                              const Vertex_handle& vertex,
+                              OutputIterator out) const;
+
+  /**
+   * Backup cells meta-data to a vector of Cell_data_backup
+   */
+  template <typename CellsVector, typename CellDataSet>
+  void fill_cells_backup(const CellsVector& cells,
+                         CellDataSet& cells_backup) const;
+
+  template <typename CellsVector, typename CellDataSet>
+  void restore_from_cells_backup(const CellsVector& cells,
+                                 CellDataSet& cells_backup) const;
+
+
+  /**
+   * Update mesh iff sliver criterion value does not decrease.
+   */
+  template <typename SliverCriterion, typename OutputIterator>
+  std::pair<bool,Vertex_handle>
+  update_mesh_no_topo_change(const Point_3& new_position,
+                             const Vertex_handle& old_vertex,
+                             const SliverCriterion& criterion,
+                             OutputIterator modified_vertices,
+                             const Cell_vector& conflict_cells);
+
+  /**
+   * Move point and returns the set of cells that are not valid anymore, and
+   * the set of cells which have been deleted by the move process.
+   */
+  template < typename OutdatedCellsOutputIterator,
+             typename DeletedCellsOutputIterator >
+  Vertex_handle move_point(const Vertex_handle& old_vertex,
+                           const Point_3& new_position,
+                           OutdatedCellsOutputIterator outdated_cells,
+                           DeletedCellsOutputIterator deleted_cells) const;
+
+  Vertex_handle
+  move_point_topo_change(const Vertex_handle& old_vertex,
+                         const Point_3& new_position,
+                         Outdated_cell_set& outdated_cells_set,
+                         bool *could_lock_zone = NULL) const;
+
+  template < typename OutdatedCellsOutputIterator,
+             typename DeletedCellsOutputIterator >
+  Vertex_handle
+  move_point_topo_change(const Vertex_handle& old_vertex,
+                         const Point_3& new_position,
+                         OutdatedCellsOutputIterator outdated_cells,
+                         DeletedCellsOutputIterator deleted_cells) const;
+
+  Vertex_handle move_point_topo_change(const Vertex_handle& old_vertex,
+                                       const Point_3& new_position) const;
+
+  template < typename OutdatedCellsOutputIterator >
+  Vertex_handle
+  move_point_no_topo_change(const Vertex_handle& old_vertex,
+                            const Point_3& new_position,
+                            OutdatedCellsOutputIterator outdated_cells) const;
+
+  Vertex_handle
+  move_point_no_topo_change(const Vertex_handle& old_vertex,
+                            const Point_3& new_position) const;
+
+  /**
+   * Returns the least square plane from v, using adjacent surface points
+   */
+  Plane_3 get_least_square_surface_plane(const Vertex_handle& v,
+                                         Point_3& ref_point,
+                                         Surface_patch_index index = Surface_patch_index()) const;
+
+  /**
+   * @brief Returns the projection of \c p, using direction of
+   * \c projection_vector
+   */
+  Point_3
+  project_on_surface_aux(const Point_3& p,
+                         const Point_3& ref_point,
+                         const Vector_3& projection_vector) const;
+
+  /**
+   * Reverts the move from \c old_point to \c new_vertex. Returns the inserted
+   * vertex located at \c old_point
+   * and an output iterator on outdated cells
+   */
+  template<typename OutputIterator>
+  Vertex_handle revert_move(const Vertex_handle& new_vertex,
+                            const Point_3& old_point,
+                            OutputIterator outdated_cells)
+  {
+    // Move vertex
+    Vertex_handle revert_vertex =
+      move_point_topo_change(new_vertex,
+                             old_point,
+                             outdated_cells,
+                             CGAL::Emptyset_iterator()); //deleted cells
+    CGAL_assertion(Vertex_handle() != revert_vertex);
+
+    return revert_vertex;
+  }
+
+  /**
+   * Returns the boundary of restricted facets of \c facets,
+     and the list of vertices of all restricted facets,
+     which should not contain the vertex that is moving
+   */
+  Facet_boundary
+  get_surface_boundary(const Vertex_handle& moving_vertex,
+                       const Facet_vector& facets,
+                       Vertex_set& incident_surface_vertices) const;
+
+  /**
+   * Returns the boundary of restricted facets of \c cells
+     and the list of vertices of all restricted facets.
+   */
+  Facet_boundary
+  get_surface_boundary(const Vertex_handle& moving_vertex,
+                       const Cell_vector& cells,
+                       Vertex_set& incident_surface_vertices) const
+  {
+    return get_surface_boundary(moving_vertex,
+                                get_facets(cells),
+                                incident_surface_vertices);
+  }
+
+  /**
+   * Returns false if there is a vertex belonging to one facet of \c facets
+   * which has not his dimension < 3
+   */
+  bool check_no_inside_vertices(const Facet_vector& facets) const;
+
+  /**
+   * Returns the impacted cells when moving \c vertex to \c conflict_point
+   */
+  template <typename OutputIterator>
+  OutputIterator
+  get_conflict_zone_no_topo_change(const Vertex_handle& vertex,
+                                   OutputIterator conflict_cells) const;
+
+  template <typename OutputIterator>
+  OutputIterator
+  get_conflict_zone_topo_change(const Vertex_handle& vertex,
+                                const Point_3& conflict_point,
+                                OutputIterator conflict_cells) const;
+
+  template <typename CellsOutputIterator,
+            typename FacetsOutputIterator>
+  void
+  get_conflict_zone_topo_change(const Vertex_handle& v,
+                                const Point_3& conflict_point,
+                                CellsOutputIterator insertion_conflict_cells,
+                                FacetsOutputIterator insertion_conflict_boundary,
+                                CellsOutputIterator removal_conflict_cells,
+                                bool *could_lock_zone = NULL) const;
+
+
+  template < typename ConflictCellsInputIterator,
+             typename OutdatedCellsOutputIterator,
+             typename DeletedCellsOutputIterator >
+  Vertex_handle
+  move_point_topo_change_conflict_zone_known(const Vertex_handle& old_vertex,
+                                             const Point_3& new_position,
+                                             const Facet& insertion_boundary_facet,
+                                             ConflictCellsInputIterator insertion_conflict_cells_begin,
+                                             ConflictCellsInputIterator insertion_conflict_cells_end,
+                                             ConflictCellsInputIterator removal_conflict_cells_begin,
+                                             ConflictCellsInputIterator removal_conflict_cells_end,
+                                             OutdatedCellsOutputIterator outdated_cells,
+                                             DeletedCellsOutputIterator deleted_cells) const;
+
+  /**
+   * Updates \c boundary wrt \c edge: if edge is already in boundary we remove
+   * it, else we add it.
+   */
+  void update_boundary(Facet_boundary& boundary,
+                       const Ordered_edge& edge,
+                       const Vertex_handle third_vertex,
+                       const Surface_patch_index& surface_index) const
+  {
+    const typename Facet_boundary::value_type x =
+      std::make_pair(edge,
+                     std::make_pair(surface_index,
+                                    std::make_pair(c3t3_.in_dimension(third_vertex),
+                                                   c3t3_.index(third_vertex)
+                                                   )
+                                    )
+                     );
+    typename Facet_boundary::iterator boundary_it =
+      boundary.find(edge);
+
+    if ( boundary_it != boundary.end() )
+      boundary.erase(boundary_it);
+    else
+      boundary.insert(x);
+  }
+
+  /**
+   * Returns the facets of \c cells (returns each facet only once i.e. use
+   * canonical facet)
+   */
+  Facet_vector get_facets(const Cell_vector& cells) const
+  {
+    return get_facets(cells.begin(),cells.end());
+  }
+
+  //  TODO: write get_facets so that it uses update_facets with a FacetUpdater that calls push_back
+
+#if defined(CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST) && defined(CGAL_INTRUSIVE_LIST)
+  template <typename ForwardIterator>
+  Facet_vector get_facets(ForwardIterator first_cell,
+                          ForwardIterator last_cell) const
+  {
+    Facet_vector result; // AF: todo: resize?
+#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
+    Intrusive_list<Cell_handle> outdated_cells(first_cell, last_cell);
+#else
+    Intrusive_list<Cell_handle> outdated_cells;
+    for( ;first_cell!= last_cell; ++first_cell){
+      outdated_cells.insert(*first_cell);
+    }
+#endif
+
+    for(typename Intrusive_list<Cell_handle>::iterator it = outdated_cells.begin();
+        it != outdated_cells.end();
+        ++it){
+      Cell_handle cell = *it;
+      int i=0;
+      bool inf = false;
+      for ( ; i<4 && (!inf) ; ++i ){
+        if ( tr_.is_infinite(cell->vertex(i)) ){
+          inf = true;
+          Cell_handle n = cell->neighbor(i);
+          if(n->next_intrusive() != Cell_handle()){// the neighbor is also outdated
+            if(cell < n){ // otherwise n will report it later
+              result.push_back(Facet(cell,i));
+            }
+          } else { // report it now or never
+            if(cell < n){
+              result.push_back(Facet(cell,i));
+            }else {
+              result.push_back(Facet(n,n->index(cell)));
+            }
+          }
+        }
+      }
+      if(! inf){
+        for ( i=0 ; i<4 ; ++i ){
+          Cell_handle n = cell->neighbor(i);
+          if(n->next_intrusive() != Cell_handle()){// the neighbor is also outdated
+            if(cell < n){ // otherwise n will report it later
+              result.push_back(Facet(cell,i));
+            }
+          } else { // report it now or never
+            if(cell < n){
+              result.push_back(Facet(cell,i));
+            }else {
+              result.push_back(Facet(n,n->index(cell)));
+            }
+          }
+        }
+      }
+    }
+    return result;
+  }
+#else
+  /**
+   * Returns the facets of \c cells (returns each facet only once i.e. use
+   * canonical facet)
+   */
+  template <typename ForwardIterator>
+  Facet_vector get_facets(ForwardIterator first_cell,
+                          ForwardIterator last_cell) const
+  {
+    // Get all facets
+    typedef Get_all_facets<std::back_insert_iterator<Facet_vector> > Get_facets;
+
+    Facet_vector all_facets;
+    all_facets.reserve(64);
+    std::for_each(first_cell,
+                  last_cell,
+                  Get_facets(tr_,std::back_inserter(all_facets)));
+
+    std::sort(all_facets.begin(), all_facets.end());
+
+    // Keep one copy of each facet (maybe copy could be avoided)
+    //    typename Facet_vector::iterator all_facets_end =
+    //      std::unique(all_facets.begin(), all_facets.end());
+    Facet_vector facets;
+    facets.reserve(64);
+    std::unique_copy(all_facets.begin(),
+                     all_facets.end(),
+                     std::back_inserter(facets));
+
+    return facets;
+  }
+#endif
+
+#ifdef CGAL_INTRUSIVE_LIST
+  template <typename FacetUpdater>
+  void update_facets(Intrusive_list<Cell_handle>& outdated_cells, FacetUpdater updater)
+  {
+# ifdef CGAL_LINKED_WITH_TBB
+    // Parallel
+    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+    {
+      tbb::parallel_do(
+        outdated_cells.begin(), outdated_cells.end(),
+        Update_cell_facets<Self, FacetUpdater>(tr_, updater));
+    }
+    // Sequential
+    else
+# endif // CGAL_LINKED_WITH_TBB
+    {
+      typename Intrusive_list<Cell_handle>::iterator it;
+      for(it = outdated_cells.begin();
+          it != outdated_cells.end();
+          ++it)
+      {
+        Update_cell_facets<Self, FacetUpdater> ucf(tr_, updater);
+        ucf(*it);
+      }
+    }
+  }
+#endif //CGAL_INTRUSIVE_LIST
+
+  // Used by the parallel version
+  template <typename FacetUpdater>
+  void update_facets(std::vector<Cell_handle>& outdated_cells_vector, FacetUpdater updater)
+  {
+# ifdef CGAL_LINKED_WITH_TBB
+    // Parallel
+    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+    {
+      tbb::parallel_for
+      (
+        tbb::blocked_range<size_t>(0, outdated_cells_vector.size()),
+        Update_cell_facets_for_parallel_for<Self, FacetUpdater>(
+          tr_, updater, outdated_cells_vector)
+      );
+    }
+    // Sequential
+    else
+# endif // CGAL_LINKED_WITH_TBB
+    {
+      typename std::vector<Cell_handle>::iterator it;
+      for(it = outdated_cells_vector.begin();
+          it != outdated_cells_vector.end();
+          ++it)
+      {
+        Update_cell_facets<Self, FacetUpdater> ucf(tr_, updater);
+        ucf(*it);
+      }
+    }
+  }
+
+
+  /**
+   * Returns the facets of \c cells (returns each facet only once i.e. use
+   * canonical facet)
+   */
+  template <typename ForwardIterator>
+  Facet_vector get_facets_not_inplace(ForwardIterator first_cell,
+                                      ForwardIterator last_cell) const
+  {
+    typedef Get_all_facets<std::back_insert_iterator<Facet_vector> > Get_facets;
+
+    Facet_vector all_facets;
+    all_facets.reserve(64);
+    std::for_each(first_cell,
+                  last_cell,
+                  Get_facets(tr_,std::back_inserter(all_facets)));
+
+    std::sort(all_facets.begin(), all_facets.end());
+
+    // Keep one copy of each facet (maybe copy could be avoided)
+    //    typename Facet_vector::iterator all_facets_end =
+    //      std::unique(all_facets.begin(), all_facets.end());
+    Facet_vector facets;
+    facets.reserve(64);
+    std::unique_copy(all_facets.begin(),
+                     all_facets.end(),
+                     std::back_inserter(facets));
+    CGAL_HISTOGRAM_PROFILER("|facets|", 
+                            static_cast<unsigned int>(facets.size()));
+    return facets;
+  }
+
+
+  /**
+   * Returns false iff a surface facet of `cells` has entered or left the
+   * restricted Delaunay, or if its surface patch index has changed
+   *
+   * That function does not modify the c3t3, but it does update the facet
+   * surface centers. The function is only called by
+   * `update_mesh_no_topo_change()`.
+   */
+  bool verify_surface(const Cell_vector& cells) const
+  {
+    // Naive implementation.
+    // Todo: improve this (maybe we don't have to check if no facet is on surface)
+    Facet_vector facets = get_facets(cells);
+    Facet_vector surface_facets;
+
+    // Check that nothing changed
+    Update_c3t3 checker(domain_,c3t3_);
+    for ( typename Facet_vector::iterator fit = facets.begin() ;
+          fit != facets.end() ;
+          ++fit )
+    {
+      if ( c3t3_.is_in_complex(*fit) )
+      {
+        surface_facets.push_back(*fit);
+      }
+      const Surface_patch sp = checker(*fit,
+                                       false, /* do not update c3t3 */
+                                       true); /* update surface centers */
+      // false means "do not update the c3t3"
+      if ( c3t3_.is_in_complex(*fit) != (bool)sp ||
+           ((bool)sp && !(c3t3_.surface_patch_index(*fit) == sp.get()) ) )
+        return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Restore mesh for cells and facets of \c cells, using domain_
+   */
+  template <typename ForwardIterator>
+  void restore_mesh(ForwardIterator first_cell, ForwardIterator last_cell)
+  {
+    Facet_vector facets = get_facets(first_cell, last_cell);
+    restore_mesh(first_cell, last_cell, facets.begin(), facets.end());
+  }
+
+  /**
+   * Restore mesh for cells of \c cells and facets of \c facets, using domain_
+   */
+  template <typename CellForwardIterator, typename FacetForwardIterator>
+  void restore_mesh(CellForwardIterator first_cell,
+                    CellForwardIterator last_cell,
+                    FacetForwardIterator first_facet,
+                    FacetForwardIterator last_facet)
+  {
+    // Update mesh
+    Update_c3t3 updater(domain_,c3t3_);
+    std::for_each(first_facet, last_facet, updater);
+    std::for_each(first_cell, last_cell, updater);
+  }
+
+  /**
+   * Returns true if facets of \c facets have the same boundary as
+   * \c old_boundary, and if the list of vertices has not changed.
+   */
+  bool check_surface_mesh(const Vertex_handle& moving_vertex,
+                          const Facet_vector& facets,
+                          const Facet_boundary& old_boundary,
+                          const Vertex_set& old_incident_surface_vertices) const
+  {
+    Vertex_set incident_surface_vertices;
+    Facet_boundary new_boundary = get_surface_boundary(moving_vertex,
+                                                       facets,
+                                                       incident_surface_vertices);
+    return ( old_boundary.size() == new_boundary.size() &&
+             old_incident_surface_vertices == incident_surface_vertices &&
+             std::equal(new_boundary.begin(),
+                        new_boundary.end(),
+                        old_boundary.begin()) );
+  }
+
+
+  void set_facet_visited(const Facet& facet)
+  {
+    facet.first->set_facet_visited(facet.second);
+    const Facet mirror_facet = tr_.mirror_facet(facet);
+    mirror_facet.first->set_facet_visited(mirror_facet.second);
+  }
+
+  /**
+   * Orders handles \c h1, \c h2 & \c h3
+   */
+  template <typename Handle>
+  void order_handles(Handle& h1, Handle& h2, Handle& h3) const
+  {
+    // Function used in get_surface_boundary
+
+    if ( h2 < h1 )
+      std::swap(h1,h2);
+
+    if ( h3 < h2 )
+    {
+      std::swap(h2,h3);
+
+      if ( h2 < h1 ) // don't need to compare h2 & h1 if h2 didn't change
+        std::swap(h1,h2);
+    }
+  }
+
+  template <typename CellRange>
+  void reset_sliver_cache(CellRange& cell_range) const
+  {
+    reset_sliver_cache(boost::begin(cell_range),
+                       boost::end(cell_range));
+  }
+
+  template <typename CellForwardIterator>
+  void reset_sliver_cache(CellForwardIterator cells_begin,
+                            CellForwardIterator cells_end) const
+  {
+    while(cells_begin != cells_end) {
+      (*cells_begin)->reset_cache_validity();
+      ++cells_begin;
+    }
+  }
+
+  template <typename CellRange>
+  void reset_circumcenter_cache(CellRange& cell_range) const
+  {
+    reset_circumcenter_cache(boost::begin(cell_range),
+                             boost::end(cell_range));
+  }
+
+  template <typename CellForwardIterator>
+  void reset_circumcenter_cache(CellForwardIterator cells_begin,
+                            CellForwardIterator cells_end) const
+  {
+    while(cells_begin != cells_end) {
+      (*cells_begin)->invalidate_circumcenter();
+      ++cells_begin;
+    }
+  }
+
+
+private:
+
+  // Functor for update_facets function (base)
+  template <typename C3T3_helpers_, typename FacetUpdater_>
+  class Update_cell_facets
+  {
+    Tr                        & m_tr;
+    FacetUpdater_             & m_facet_updater;
+
+  protected:
+
+    void update(const Cell_handle& cell) const
+    {
+      Cell_handle null_cell;
+      bool inf = false;
+      for (int i=0 ; i<4 && (!inf) ; ++i ){
+        if ( m_tr.is_infinite(cell->vertex(i)) ){
+          inf = true;
+          Cell_handle n = cell->neighbor(i);
+          if(n->next_intrusive() != null_cell){// the neighbor is also outdated
+            if(cell < n){ // otherwise n will report it later
+              Facet f(cell,i);
+              m_facet_updater(f);
+            }
+          } else { // report it now or never
+            if(cell < n){
+              Facet f(cell,i);
+              m_facet_updater(f);
+            }else {
+              Facet f(n,n->index(cell));
+              m_facet_updater(f);
+            }
+          }
+        }
+      }
+      if(! inf){
+        for ( int i=0 ; i<4 ; ++i ){
+          Cell_handle n = cell->neighbor(i);
+          if(n->next_intrusive() != null_cell){// the neighbor is also outdated
+            if(cell < n){ // otherwise n will report it later
+              Facet f(cell,i);
+              m_facet_updater(f);
+            }
+          } else { // report it now or never
+            if(cell < n){
+              Facet f(cell,i);
+              m_facet_updater(f);
+            }else {
+              Facet f(n,n->index(cell));
+              m_facet_updater(f);
+            }
+          }
+        }
+      }
+    }
+
+  public:
+    // Constructor
+    Update_cell_facets(Tr &tr,
+                  FacetUpdater_& fu)
+    : m_tr(tr), m_facet_updater(fu)
+    {}
+
+    // Constructor
+    Update_cell_facets(const Update_cell_facets &uf)
+    : m_tr(uf.m_tr), m_facet_updater(uf.m_facet_updater)
+    {}
+
+    // operator()
+    void operator()(const Cell_handle& cell) const
+    {
+      update(cell);
+    }
+  };
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Same functor: special version for tbb:parallel_for
+  template <typename C3T3_helpers_, typename FacetUpdater_>
+  class Update_cell_facets_for_parallel_for
+  : Update_cell_facets<C3T3_helpers, FacetUpdater_>
+  {
+    typedef Update_cell_facets<C3T3_helpers, FacetUpdater_> Base;
+    using Base::update;
+
+    const std::vector<Cell_handle>  & m_outdated_cells;
+
+  public:
+    // Constructor
+    Update_cell_facets_for_parallel_for(
+      Tr &tr,
+      FacetUpdater_& fu,
+      const std::vector<Cell_handle> &oc)
+    : Base(tr, fu), m_outdated_cells(oc)
+    {}
+
+    // Constructor
+    Update_cell_facets_for_parallel_for(
+      const Update_cell_facets_for_parallel_for &uf)
+    : Base(uf), m_outdated_cells(uf.m_outdated_cells)
+    {}
+
+    // operator()
+    void operator()(const tbb::blocked_range<size_t>& r) const
+    {
+      for( size_t i = r.begin() ; i != r.end() ; ++i)
+        update(m_outdated_cells[i]);
+    }
+  };
+#endif //CGAL_LINKED_WITH_TBB
+
+  // -----------------------------------
+  // -----------------------------------
+  // -----------------------------------
+
+  // Functor for rebuild_restricted_delaunay function
+  template <typename C3T3_, typename Update_c3t3_>
+  class Update_cell
+  {
+    C3T3                      & m_c3t3;
+    Update_c3t3_              & m_updater;
+
+  protected:
+    typedef typename C3T3_::Cell_handle Cell_handle;
+
+    void update(const Cell_handle& cell) const
+    {
+      m_c3t3.remove_from_complex(cell);
+      m_updater(cell);
+    }
+
+  public:
+    // Constructor
+    Update_cell(C3T3_ &c3t3, Update_c3t3_& updater)
+    : m_c3t3(c3t3), m_updater(updater)
+    {}
+
+    // Constructor
+    Update_cell(const Update_cell &uc)
+    : m_c3t3(uc.m_c3t3), m_updater(uc.m_updater)
+    {}
+
+    // operator()
+    void operator()(const Cell_handle& cell) const
+    {
+      update(cell);
+    }
+  };
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Same functor: special version for tbb:parallel_for
+  template <typename C3T3_, typename Update_c3t3_>
+  class Update_cell_for_parallel_for
+  : Update_cell<C3T3_, Update_c3t3_>
+  {
+    typedef Update_cell<C3T3_, Update_c3t3_> Base;
+    using Base::update;
+
+    const std::vector<Cell_handle>  & m_outdated_cells;
+
+  public:
+    // Constructor
+    Update_cell_for_parallel_for(
+      C3T3_ &c3t3,
+      Update_c3t3_& updater,
+      const std::vector<Cell_handle> &oc)
+    : Base(c3t3, updater), m_outdated_cells(oc)
+    {}
+
+    // Constructor
+    Update_cell_for_parallel_for(
+      const Update_cell_for_parallel_for &uc)
+    : Base(uc), m_outdated_cells(uc.m_outdated_cells)
+    {}
+
+    // operator()
+    void operator()(const tbb::blocked_range<size_t>& r) const
+    {
+      for( size_t i = r.begin() ; i != r.end() ; ++i)
+        update(m_outdated_cells[i]);
+    }
+  };
+#endif //CGAL_LINKED_WITH_TBB
+
+  // -----------------------------------
+  // -----------------------------------
+  // -----------------------------------
+
+  // Functor for rebuild_restricted_delaunay function
+#ifdef CGAL_LINKED_WITH_TBB
+  template <typename C3T3_helpers_, typename C3T3_, typename Update_c3t3_,
+            typename Vertex_to_proj_set_>
+  class Update_facet
+  {
+    const C3T3_helpers_       & m_c3t3_helpers;
+    C3T3_                     & m_c3t3;
+    Update_c3t3_              & m_updater;
+    Vertex_to_proj_set_       & m_vertex_to_proj;
+
+    typedef typename C3T3_::Vertex_handle       Vertex_handle;
+    typedef typename C3T3_::Cell_handle         Cell_handle;
+    typedef typename C3T3_::Facet               Facet;
+    typedef typename C3T3::Surface_patch_index  Surface_patch_index;
+
+  public:
+    // Constructor
+    Update_facet(const C3T3_helpers_ & c3t3_helpers,
+                 C3T3_ &c3t3, Update_c3t3_& updater,
+                 Vertex_to_proj_set_ &vertex_to_proj)
+    : m_c3t3_helpers(c3t3_helpers), m_c3t3(c3t3), m_updater(updater),
+      m_vertex_to_proj(vertex_to_proj)
+    {}
+
+    // Constructor
+    Update_facet(const Update_facet &uc)
+    : m_c3t3_helpers(uc.m_c3t3_helpers), m_c3t3(uc.m_c3t3),
+      m_updater(uc.m_updater), m_vertex_to_proj(uc.m_vertex_to_proj)
+    {}
+
+    // operator()
+    void operator()( const Facet& facet ) const
+    {
+      // Update facet
+      m_c3t3.remove_from_complex(facet);
+      m_updater(facet);
+
+      // Update m_vertex_to_proj
+      if ( m_c3t3.is_in_complex(facet) )
+      {
+        // Iterate on vertices
+        int k = facet.second;
+        for ( int i=1 ; i<4 ; ++i )
+        {
+          const Vertex_handle& v = facet.first->vertex((k+i)&3);
+          if ( m_c3t3.in_dimension(v) > 2 )
+          {
+            std::pair<Vertex_handle, Surface_patch_index> p
+              = std::make_pair(v, m_c3t3.surface_patch_index(facet));
+            m_c3t3_helpers.lock_vertex_to_proj();
+            m_vertex_to_proj.insert(p);
+            m_c3t3_helpers.unlock_vertex_to_proj();
+          }
+        }
+      }
+    }
+  };
+#endif
+
+  // -----------------------------------
+  // Private data
+  // -----------------------------------
+  C3T3& c3t3_;
+  Tr& tr_;
+  const MeshDomain& domain_;
+}; // class C3T3_helpers
+
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion, typename OutputIterator>
+std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
+C3T3_helpers<C3T3,MD>::
+update_mesh(const Point_3& new_position,
+            const Vertex_handle& old_vertex,
+            const SliverCriterion& criterion,
+            OutputIterator modified_vertices,
+            bool *could_lock_zone)
+{
+  // std::cerr << "\nupdate_mesh[v1](" << new_position << ",\n"
+  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
+  //           << ")\n";
+
+  if (could_lock_zone)
+    *could_lock_zone = true;
+
+  Cell_vector incident_cells_;
+  incident_cells_.reserve(64);
+  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
+  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
+  {
+
+    return update_mesh_no_topo_change(new_position,
+                                      old_vertex,
+                                      criterion,
+                                      modified_vertices,
+                                      incident_cells_);
+  }
+  else
+  {
+    return update_mesh_topo_change(new_position,
+                                   old_vertex,
+                                   criterion,
+                                   modified_vertices,
+                                   could_lock_zone);
+  }
+}
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion, typename OutputIterator>
+std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
+C3T3_helpers<C3T3,MD>::
+update_mesh_no_topo_change(const Point_3& new_position,
+                           const Vertex_handle& old_vertex,
+                           const SliverCriterion& criterion,
+                           OutputIterator modified_vertices,
+                           const Cell_vector& conflict_cells )
+{
+  // std::cerr << "update_mesh_no_topo_change(\n"
+  //           << new_position << ",\n"
+  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
+  //           << ")\n";
+
+    //backup metadata
+  std::set<Cell_data_backup> cells_backup;
+  fill_cells_backup(conflict_cells, cells_backup);
+
+  // Get old values
+  criterion.before_move(c3t3_cells(conflict_cells));
+  // std::cerr << "old_sliver_value=" << old_sliver_value << std::endl;
+  Point_3 old_position = old_vertex->point();
+
+  // Move point
+  reset_circumcenter_cache(conflict_cells);
+  reset_sliver_cache(conflict_cells);
+  move_point_no_topo_change(old_vertex,new_position);
+
+  // Check that surface mesh is still valid
+  // and Get new criterion value (conflict_zone did not change)
+    // warnings : valid_move updates caches
+    //     verify_surface does not change c3t3 when returns false,
+    //     but it does change circumcenters
+  if( verify_surface(conflict_cells)
+    && criterion.valid_move(c3t3_cells(conflict_cells)))
+  {
+    fill_modified_vertices(conflict_cells.begin(), conflict_cells.end(),
+                           old_vertex, modified_vertices);
+    return std::make_pair(true,old_vertex);
+  }
+  else // revert move
+  {
+    // std::cerr << "update_mesh_no_topo_change: revert move to "
+    //           << old_position << "\n";
+    reset_circumcenter_cache(conflict_cells);
+    //sliver caches have been updated by valid_move
+    reset_sliver_cache(conflict_cells);
+    move_point_no_topo_change(old_vertex,old_position);
+
+    //restore meta-data (cells should have same connectivity as before move)
+    // cells_backup does not contain infinite cells so they can be fewer
+    CGAL_assertion(conflict_cells.size() >= cells_backup.size());
+    restore_from_cells_backup(conflict_cells, cells_backup);
+
+    return std::make_pair(false,old_vertex);
+  }
+}
+
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion, typename OutputIterator>
+std::pair<bool,typename C3T3_helpers<C3T3,MD>::Vertex_handle>
+C3T3_helpers<C3T3,MD>::
+update_mesh_topo_change(const Point_3& new_position,
+                        const Vertex_handle& old_vertex,
+                        const SliverCriterion& criterion,
+                        OutputIterator modified_vertices,
+                        bool *could_lock_zone)
+{
+  // std::cerr << "update_mesh_topo_change(\n"
+  //           << new_position << ",\n"
+  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
+  //           << ")\n";
+  // check_c3t3(c3t3_);
+  Cell_set insertion_conflict_cells;
+  Cell_set removal_conflict_cells;
+  Facet_vector insertion_conflict_boundary;
+  insertion_conflict_boundary.reserve(64);
+  get_conflict_zone_topo_change(old_vertex, new_position,
+                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
+                                std::back_inserter(insertion_conflict_boundary),
+                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()),
+                                could_lock_zone);
+
+  if (could_lock_zone && *could_lock_zone == false)
+    return std::make_pair(false, Vertex_handle());
+
+  if(insertion_conflict_boundary.empty())
+    return std::make_pair(false,old_vertex); //new_location is a vertex already
+
+  Cell_vector conflict_cells;
+  conflict_cells.reserve(insertion_conflict_cells.size()+removal_conflict_cells.size());
+  std::set_union(insertion_conflict_cells.begin(), insertion_conflict_cells.end(),
+                 removal_conflict_cells.begin(), removal_conflict_cells.end(),
+                 std::back_inserter(conflict_cells));
+
+    //backup metadata
+  std::set<Cell_data_backup> cells_backup;
+  fill_cells_backup(conflict_cells, cells_backup);
+  CGAL_assertion(conflict_cells.size() == cells_backup.size());
+
+  criterion.before_move(c3t3_cells(conflict_cells));
+  // std::cerr << "old_sliver_value=" << old_sliver_value << std::endl;
+  Point_3 old_position = old_vertex->point();
+
+  // Keep old boundary
+  Vertex_set old_incident_surface_vertices;
+  Facet_boundary old_surface_boundary =
+    get_surface_boundary(old_vertex, conflict_cells, old_incident_surface_vertices);
+
+  reset_circumcenter_cache(conflict_cells);
+  reset_sliver_cache(conflict_cells);
+
+  Cell_vector outdated_cells;
+  outdated_cells.reserve(64);
+    Vertex_handle new_vertex =
+        move_point_topo_change_conflict_zone_known(old_vertex, new_position,
+                                                    insertion_conflict_boundary[0],
+                                                    insertion_conflict_cells.begin(),
+                                                    insertion_conflict_cells.end(),
+                                                    removal_conflict_cells.begin(),
+                                                    removal_conflict_cells.end(),
+                                                    std::back_inserter(outdated_cells),
+                                                    CGAL::Emptyset_iterator());
+
+  // If nothing changed, return
+  if ( old_position == new_vertex->point() )
+  {
+    // std::cerr << "update_mesh_topo_change: no move!\n";
+    // check_c3t3(c3t3_);
+    return std::make_pair(false,old_vertex);
+  }
+
+  restore_mesh(outdated_cells.begin(),outdated_cells.end());
+  // std::cerr << "new_sliver_value=" << new_sliver_value << std::endl;
+
+  // Check that surface boundary does not change.
+  // This check ensures that vertices which are inside c3t3 stay inside.
+  if (criterion.valid_move(c3t3_cells(outdated_cells))
+      && check_surface_mesh(new_vertex,
+                            get_facets(outdated_cells),
+                            old_surface_boundary,
+                            old_incident_surface_vertices) )
+  {
+    fill_modified_vertices(outdated_cells.begin(), outdated_cells.end(),
+                           new_vertex, modified_vertices);
+    // check_c3t3(c3t3_);
+    return std::make_pair(true,new_vertex);
+  }
+  else
+  {
+    // Removing from c3t3 cells which will be destroyed by revert_move
+    // is done by move_point_topo_change_conflict_zone_known, called by revert_move
+
+    // std::cerr << "update_mesh_topo_change: revert move to "
+    //           << old_position << "\n";
+    //reset caches in case cells are re-used by the compact container
+    reset_circumcenter_cache(outdated_cells);
+    reset_sliver_cache(outdated_cells);
+    outdated_cells.clear();
+
+    // Revert move
+    Vertex_handle revert_vertex = revert_move(new_vertex, old_position,
+                          std::inserter(outdated_cells, outdated_cells.end()));
+
+    //restore meta-data (cells should have same connectivity as before move)
+    //cells should be the same (connectivity-wise) as before initial move
+    CGAL_assertion(outdated_cells.size() == cells_backup.size());
+    restore_from_cells_backup(outdated_cells, cells_backup);
+
+    // check_c3t3(c3t3_);
+    return std::make_pair(false,revert_vertex);
+  }
+}
+
+template <typename C3T3, typename MD>
+template <typename OutputIterator>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+update_mesh(const Point_3& new_position,
+            const Vertex_handle& old_vertex,
+            OutputIterator modified_vertices,
+            bool fill_vertices)
+{
+  // std::cerr << "\nupdate_mesh[v2](" << new_position << ",\n"
+  //           << "                " << (void*)(&*old_vertex) << "=" << old_vertex->point()
+  //           << ")\n";
+  Cell_vector outdated_cells;
+  Vertex_handle new_vertex = move_point(old_vertex,
+                                        new_position,
+                                        std::back_inserter(outdated_cells),
+                                        CGAL::Emptyset_iterator());
+  // move_point has invalidated caches
+
+  restore_mesh(outdated_cells.begin(),outdated_cells.end());
+
+  // Fill modified vertices
+  if ( fill_vertices
+        && !(boost::is_same<OutputIterator,CGAL::Emptyset_iterator>::value))
+  {
+    fill_modified_vertices(outdated_cells.begin(), outdated_cells.end(),
+                           new_vertex, modified_vertices);
+  }
+
+  return new_vertex;
+}
+
+#ifdef CGAL_INTRUSIVE_LIST
+template <typename C3T3, typename MD>
+template <typename OutdatedCells>
+void
+C3T3_helpers<C3T3,MD>::
+rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
+                            Moving_vertices_set& moving_vertices)
+{
+  typename OutdatedCells::iterator first_cell = outdated_cells.begin();
+  typename OutdatedCells::iterator last_cell = outdated_cells.end();
+  Update_c3t3 updater(domain_,c3t3_);
+
+# ifdef CGAL_MESH_3_PROFILING
+  std::cerr << std::endl << "  Updating cells...";
+  WallClockTimer t;
+  size_t num_cells = c3t3_.number_of_cells_in_complex();
+# endif
+
+  // Updates cells
+  // Note: ~58% of rebuild_restricted_delaunay time
+
+  std::set<Vertex_handle> vertex_to_proj;
+
+# ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    std::vector<Cell_handle> outdated_cells_vector;
+    outdated_cells_vector.reserve(outdated_cells.size());
+    for ( ; first_cell != last_cell ; ++first_cell)
+    {
+      outdated_cells_vector.push_back(*first_cell);
+    }
+
+    tbb::parallel_for(
+      tbb::blocked_range<size_t>(0, outdated_cells_vector.size()),
+      Update_cell_for_parallel_for<C3T3, Update_c3t3>(
+        c3t3_, updater, outdated_cells_vector));
+
+#   ifdef CGAL_MESH_3_PROFILING
+    std::cerr << " done in " << t.elapsed() << " seconds (#cells from "
+      << num_cells << " to " << c3t3_.number_of_cells_in_complex() << ")."
+      << std::endl;
+    std::cerr << "  Updating facets...";
+    t.reset();
+#   endif
+
+    // Get facets (returns each canonical facet only once)
+    // Note: ~42% of rebuild_restricted_delaunay time
+    //  Facet_vector facets;
+    lock_vertex_to_proj();
+    Facet_updater facet_updater(c3t3_,vertex_to_proj, updater);
+    unlock_vertex_to_proj();
+    update_facets(outdated_cells_vector, facet_updater);
+
+    // now we can clear
+    outdated_cells.clear();
+  }
+  // Sequential
+  else
+# endif // CGAL_LINKED_WITH_TBB
+  {
+    while ( first_cell != last_cell )
+    {
+      Cell_handle cell = *first_cell++;
+      c3t3_.remove_from_complex(cell);
+      updater(cell);
+    }
+
+# ifdef CGAL_MESH_3_PROFILING
+    std::cerr << " done in " << t.elapsed() << " seconds (#cells from "
+      << num_cells << " to " << c3t3_.number_of_cells_in_complex() << ")."
+      << std::endl;
+    std::cerr << "  Updating facets...";
+    t.reset();
+# endif
+
+    // Get facets (returns each canonical facet only once)
+    // Note: ~42% of rebuild_restricted_delaunay time
+    //  Facet_vector facets;
+    Facet_updater facet_updater(c3t3_,vertex_to_proj, updater);
+    update_facets(outdated_cells, facet_updater);
+
+    // now we can clear
+    outdated_cells.clear();
+  }
+
+# ifdef CGAL_MESH_3_PROFILING
+  std::cerr << " done in " << t.elapsed() << " seconds ("
+            << vertex_to_proj.size() << " vertices to project)." << std::endl;
+  std::cerr << "  Projecting interior vertices...";
+  t.reset();
+# endif
+
+    CGAL_HISTOGRAM_PROFILER("|vertex_to_proj|=", 
+                            static_cast<unsigned int>(vertex_to_proj.size()));
+  // Project interior vertices
+  // Note: ~0% of rebuild_restricted_delaunay time
+  // TODO : iterate to be sure no interior vertice become on the surface
+  // because of move ?
+  for ( typename std::set<Vertex_handle>::iterator it = vertex_to_proj.begin() ;
+       it != vertex_to_proj.end() ;
+       ++it )
+  {
+    Point_3 new_pos = project_on_surface((*it)->point(),*it);
+
+    if ( new_pos != Point_3() )
+    {
+      //freezing needs 'erase' to be done before the vertex is actually destroyed
+      // Update moving vertices (it becomes new_vertex)
+      moving_vertices.erase(*it);
+
+      Vertex_handle new_vertex = update_mesh(new_pos,*it);
+      c3t3_.set_dimension(new_vertex,2);
+
+      moving_vertices.insert(new_vertex);
+    }
+  }
+
+# ifdef CGAL_MESH_3_PROFILING
+  std::cerr << " done in " << t.elapsed() << " seconds." << std::endl;
+# endif
+}
+#endif //CGAL_INTRUSIVE_LIST
+
+template <typename C3T3, typename MD>
+template <typename ForwardIterator>
+void
+C3T3_helpers<C3T3,MD>::
+rebuild_restricted_delaunay(ForwardIterator first_cell,
+                            ForwardIterator last_cell,
+                            Moving_vertices_set& moving_vertices)
+{
+  Update_c3t3 updater(domain_,c3t3_);
+
+  // Get facets (returns each canonical facet only once)
+  Facet_vector facets = get_facets(first_cell, last_cell);
+
+  // Updates cells
+  // Note: ~58% of rebuild_restricted_delaunay time
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tbb::parallel_do(first_cell, last_cell,
+      Update_cell<C3T3, Update_c3t3>(c3t3_, updater));
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+    while ( first_cell != last_cell )
+    {
+      Update_cell<C3T3, Update_c3t3> uc(c3t3_, updater);
+      uc(*first_cell++);
+    }
+  }
+
+  // Updates facets
+  typedef std::set<std::pair<Vertex_handle, Surface_patch_index> >
+    Vertex_to_proj_set;
+  Vertex_to_proj_set vertex_to_proj;
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tbb::parallel_do(
+      facets.begin(), facets.end(),
+      Update_facet<Self, C3T3, Update_c3t3, Vertex_to_proj_set>(
+        *this, c3t3_, updater, vertex_to_proj)
+    );
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+    for ( typename Facet_vector::iterator fit = facets.begin() ;
+         fit != facets.end() ;
+         ++fit )
+    {
+      // Update facet
+      c3t3_.remove_from_complex(*fit);
+      updater(*fit);
+
+      // Update vertex_to_proj
+      if ( c3t3_.is_in_complex(*fit) )
+      {
+        // Iterate on vertices
+        int k = fit->second;
+        for ( int i=1 ; i<4 ; ++i )
+        {
+          const Vertex_handle& v = fit->first->vertex((k+i)&3);
+          if ( c3t3_.in_dimension(v) > 2 )
+          {
+            vertex_to_proj.insert
+              (std::make_pair(v, c3t3_.surface_patch_index(*fit)));
+          }
+        }
+      }
+    }
+  }
+
+  // Project interior vertices
+  // TODO : iterate to be sure no interior vertice become on the surface
+  // because of move ?
+  for ( typename std::set<std::pair<Vertex_handle, Surface_patch_index> >
+          ::iterator it = vertex_to_proj.begin() ;
+        it != vertex_to_proj.end() ;
+        ++it )
+  {
+    Point_3 new_pos = project_on_surface((it->first)->point(),it->first,it->second);
+
+    if ( new_pos != Point_3() )
+    {
+      //freezing needs 'erase' to be done before the vertex is actually destroyed
+      // Update moving vertices (it becomes new_vertex)
+      moving_vertices.erase(it->first);
+
+      Vertex_handle new_vertex = update_mesh(new_pos,it->first);
+      c3t3_.set_dimension(new_vertex,2);
+
+      moving_vertices.insert(new_vertex);
+    }
+  }
+}
+
+
+template <typename C3T3, typename MD>
+template <typename OutdatedCellsOutputIterator,
+          typename DeletedCellsOutputIterator>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point(const Vertex_handle& old_vertex,
+           const Point_3& new_position,
+           OutdatedCellsOutputIterator outdated_cells,
+           DeletedCellsOutputIterator deleted_cells) const
+{
+  // std::cerr << "C3T3_helpers::move_point[v2]("
+  //           << (void*)(&*old_vertex) << " = " << old_vertex->point()
+  //           << " , " << new_position << ")\n";
+  Cell_vector incident_cells_;
+  incident_cells_.reserve(64);
+  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
+  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
+  {
+    reset_circumcenter_cache(incident_cells_);
+    reset_sliver_cache(incident_cells_);
+    std::copy(incident_cells_.begin(),incident_cells_.end(), outdated_cells);
+    return move_point_no_topo_change(old_vertex,
+                                     new_position);
+  }
+  else
+  {
+    return move_point_topo_change(old_vertex,
+                                  new_position,
+                                  outdated_cells,
+                                  deleted_cells);
+  }
+}
+
+// Sequential
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point(const Vertex_handle& old_vertex,
+           const Point_3& new_position,
+           Outdated_cell_set& outdated_cells_set,
+           Moving_vertices_set& moving_vertices) const
+{
+  Cell_vector incident_cells_;
+  incident_cells_.reserve(64);
+  tr_.incident_cells(old_vertex, std::back_inserter(incident_cells_));
+  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
+  {
+    reset_circumcenter_cache(incident_cells_);
+    reset_sliver_cache(incident_cells_);
+    std::copy(incident_cells_.begin(),incident_cells_.end(),
+      std::inserter(outdated_cells_set, outdated_cells_set.end()));
+    return move_point_no_topo_change(old_vertex, new_position);
+  }
+  else
+  {
+    moving_vertices.erase(old_vertex);
+
+    Vertex_handle new_vertex = move_point_topo_change(old_vertex, new_position, outdated_cells_set);
+
+    moving_vertices.insert(new_vertex);
+    return new_vertex;
+  }
+}
+
+// Parallel
+// In case of success (could_lock_zone = true), the zone is locked after the call
+// ==> the caller needs to call "unlock_all_elements" by itself
+// In case of failure (could_lock_zone = false), the zone is unlocked by this function
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point(const Vertex_handle& old_vertex,
+           const Point_3& new_position,
+           Outdated_cell_set& outdated_cells_set,
+           Moving_vertices_set& moving_vertices,
+           bool *could_lock_zone) const
+{
+  CGAL_assertion(could_lock_zone != NULL);
+  *could_lock_zone = true;
+
+  if (!try_lock_vertex(old_vertex)) // LOCK
+  {
+    *could_lock_zone = false;
+    unlock_all_elements();
+    return Vertex_handle();
+  }
+
+  //======= Get incident cells ==========
+  Cell_vector incident_cells_;
+  incident_cells_.reserve(64);
+  if (try_lock_and_get_incident_cells(old_vertex, incident_cells_) == false)
+  {
+    *could_lock_zone = false;
+    return Vertex_handle();
+  }
+  //======= /Get incident cells ==========
+
+  if (!try_lock_point(new_position)) // LOCK
+  {
+    *could_lock_zone = false;
+    unlock_all_elements();
+    return Vertex_handle();
+  }
+  if ( Th().no_topological_change(tr_, old_vertex, new_position, incident_cells_) )
+  {
+    reset_circumcenter_cache(incident_cells_);
+    reset_sliver_cache(incident_cells_);
+
+    lock_outdated_cells();
+    std::copy(incident_cells_.begin(),incident_cells_.end(),
+      std::inserter(outdated_cells_set, outdated_cells_set.end()));
+    unlock_outdated_cells();
+
+    Vertex_handle new_vertex =
+      move_point_no_topo_change(old_vertex, new_position);
+
+    // Don't "unlock_all_elements" here, the caller may need it to do it himself
+    return new_vertex;
+  }
+  else
+  {
+    //moving_vertices.erase(old_vertex); MOVED BELOW
+
+    Vertex_handle new_vertex =
+      move_point_topo_change(old_vertex, new_position, outdated_cells_set,
+                             could_lock_zone);
+
+    if (*could_lock_zone == false)
+    {
+      unlock_all_elements();
+      return Vertex_handle();
+    }
+
+
+    lock_moving_vertices();
+    moving_vertices.erase(old_vertex);
+    moving_vertices.insert(new_vertex);
+    unlock_moving_vertices();
+
+    // Don't "unlock_all_elements" here, the caller may need it to do it himself
+    return new_vertex;
+  }
+}
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_topo_change(const Vertex_handle& old_vertex,
+                       const Point_3& new_position,
+                       Outdated_cell_set& outdated_cells_set,
+                       bool *could_lock_zone) const
+{
+  Cell_set insertion_conflict_cells;
+  Cell_set removal_conflict_cells;
+  Facet_vector insertion_conflict_boundary;
+  insertion_conflict_boundary.reserve(64);
+
+  get_conflict_zone_topo_change(old_vertex, new_position,
+                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
+                                std::back_inserter(insertion_conflict_boundary),
+                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()),
+                                could_lock_zone);
+  if (insertion_conflict_cells.empty())
+    return old_vertex;//new_position coincides with an existing vertex (not old_vertex)
+                      //and old_vertex should not be removed of the nb_vertices will change
+  reset_circumcenter_cache(removal_conflict_cells);
+  reset_sliver_cache(removal_conflict_cells);
+  reset_circumcenter_cache(insertion_conflict_cells);
+  reset_sliver_cache(insertion_conflict_cells);
+
+  if (could_lock_zone && *could_lock_zone == false)
+    return Vertex_handle();
+
+  lock_outdated_cells();
+  for(typename Cell_set::iterator it = insertion_conflict_cells.begin();
+      it != insertion_conflict_cells.end(); ++it)
+      outdated_cells_set.erase(*it);
+  for(typename Cell_set::iterator it = removal_conflict_cells.begin();
+      it != removal_conflict_cells.end(); ++it)
+      outdated_cells_set.erase(*it);
+  unlock_outdated_cells();
+
+  Cell_vector outdated_cells;
+  Vertex_handle nv = move_point_topo_change_conflict_zone_known(old_vertex, new_position,
+                                insertion_conflict_boundary[0],
+                                insertion_conflict_cells.begin(),
+                                insertion_conflict_cells.end(),
+                                removal_conflict_cells.begin(),
+                                removal_conflict_cells.end(),
+                                std::back_inserter(outdated_cells),
+                                CGAL::Emptyset_iterator()); // deleted_cells
+
+  lock_outdated_cells();
+  for(typename Cell_vector::iterator it = outdated_cells.begin();
+      it != outdated_cells.end(); ++it)
+      outdated_cells_set.insert(*it);
+  unlock_outdated_cells();
+
+  return nv;
+}
+
+template <typename C3T3, typename MD>
+template <typename OutdatedCellsOutputIterator,
+          typename DeletedCellsOutputIterator>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_topo_change(const Vertex_handle& old_vertex,
+                       const Point_3& new_position,
+                       OutdatedCellsOutputIterator outdated_cells,
+                       DeletedCellsOutputIterator deleted_cells) const
+{
+  Cell_set insertion_conflict_cells;
+  Cell_set removal_conflict_cells;
+  Facet_vector insertion_conflict_boundary;
+  insertion_conflict_boundary.reserve(64);
+
+  get_conflict_zone_topo_change(old_vertex, new_position,
+                                std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()),
+                                std::back_inserter(insertion_conflict_boundary),
+                                std::inserter(removal_conflict_cells, removal_conflict_cells.end()));
+  reset_circumcenter_cache(removal_conflict_cells);
+  reset_sliver_cache(removal_conflict_cells);
+  reset_circumcenter_cache(insertion_conflict_cells);
+  reset_sliver_cache(insertion_conflict_cells);
+
+  Vertex_handle nv = move_point_topo_change_conflict_zone_known(old_vertex, new_position,
+                                insertion_conflict_boundary[0],
+                                insertion_conflict_cells.begin(),
+                                insertion_conflict_cells.end(),
+                                removal_conflict_cells.begin(),
+                                removal_conflict_cells.end(),
+                                outdated_cells,
+                                deleted_cells);
+
+  return nv;
+}
+
+
+template <typename C3T3, typename MD>
+template < typename ConflictCellsInputIterator,
+           typename OutdatedCellsOutputIterator,
+           typename DeletedCellsOutputIterator >
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_topo_change_conflict_zone_known(
+    const Vertex_handle& old_vertex,
+    const Point_3& new_position,
+    const Facet& insertion_boundary_facet,
+    ConflictCellsInputIterator insertion_conflict_cells_begin,//ordered
+    ConflictCellsInputIterator insertion_conflict_cells_end,
+    ConflictCellsInputIterator removal_conflict_cells_begin,//ordered
+    ConflictCellsInputIterator removal_conflict_cells_end,
+    OutdatedCellsOutputIterator outdated_cells,
+    DeletedCellsOutputIterator deleted_cells)//warning : this should not be an iterator to Intrusive_list
+                                             //o.w. deleted_cells will point to null pointer or so and crash
+                                             const
+{
+  Point_3 old_position = old_vertex->point();
+  // make one set with conflict zone
+  Cell_set conflict_zone;
+  std::set_union(insertion_conflict_cells_begin, insertion_conflict_cells_end,
+                 removal_conflict_cells_begin, removal_conflict_cells_end,
+                 std::inserter(conflict_zone, conflict_zone.end()));
+
+  // Remove conflict zone cells from c3t3 (they will be deleted by insert/remove)
+  remove_cells_and_facets_from_c3t3(conflict_zone.begin(), conflict_zone.end());
+
+// Start Move point // Insert new_vertex, remove old_vertex
+  int dimension = c3t3_.in_dimension(old_vertex);
+  Index vertex_index = c3t3_.index(old_vertex);
+  FT meshing_info = old_vertex->meshing_info();
+
+  // insert new point
+  Vertex_handle new_vertex = tr_.insert_in_hole(new_position,
+                                                insertion_conflict_cells_begin,
+                                                insertion_conflict_cells_end,
+                                                insertion_boundary_facet.first,
+                                                insertion_boundary_facet.second);
+
+  // If new_position is hidden, update what should be and return default constructed handle
+  if ( Vertex_handle() == new_vertex )
+  {
+    std::copy(conflict_zone.begin(), conflict_zone.end(), outdated_cells);
+    return old_vertex;
+  }
+  // remove old point
+  tr_.remove(old_vertex);
+
+  c3t3_.set_dimension(new_vertex,dimension);
+  c3t3_.set_index(new_vertex,vertex_index);
+  new_vertex->set_meshing_info(meshing_info);
+  // End Move point
+
+  //// Fill outdated_cells
+  // Get conflict zone in new triangulation and set cells outdated
+  Cell_vector new_conflict_cells;
+  new_conflict_cells.reserve(64);
+  get_conflict_zone_topo_change(new_vertex, old_position,
+                                std::back_inserter(new_conflict_cells));
+  std::copy(new_conflict_cells.begin(),new_conflict_cells.end(),outdated_cells);
+
+  // Fill deleted_cells
+  if(! boost::is_same<DeletedCellsOutputIterator,CGAL::Emptyset_iterator>::value)
+    std::copy(conflict_zone.begin(), conflict_zone.end(), deleted_cells);
+
+  return new_vertex;
+}
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_topo_change(const Vertex_handle& old_vertex,
+                       const Point_3& new_position) const
+{
+  // Insert new_vertex, remove old_vertex
+  int dimension = c3t3_.in_dimension(old_vertex);
+  Index vertex_index = c3t3_.index(old_vertex);
+  FT meshing_info = old_vertex->meshing_info();
+
+  // insert new point
+  Vertex_handle new_vertex = tr_.insert(new_position,old_vertex->cell());
+  // If new_position is hidden, return default constructed handle
+  if ( Vertex_handle() == new_vertex ) { return Vertex_handle(); }
+  // remove old point
+  tr_.remove(old_vertex);
+
+  c3t3_.set_dimension(new_vertex,dimension);
+  c3t3_.set_index(new_vertex,vertex_index);
+  new_vertex->set_meshing_info(meshing_info);
+
+  return new_vertex;
+}
+
+
+template <typename C3T3, typename MD>
+template <typename OutdatedCellsOutputIterator>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_no_topo_change(const Vertex_handle& old_vertex,
+                          const Point_3& new_position,
+                          OutdatedCellsOutputIterator outdated_cells) const
+{
+
+  lock_outdated_cells();
+  get_conflict_zone_no_topo_change(old_vertex, outdated_cells);
+  unlock_outdated_cells();
+
+  return move_point_no_topo_change(old_vertex, new_position);
+}
+
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Vertex_handle
+C3T3_helpers<C3T3,MD>::
+move_point_no_topo_change(const Vertex_handle& old_vertex,
+                          const Point_3& new_position) const
+{
+  // Change vertex position
+  old_vertex->set_point(new_position);
+  return old_vertex;
+}
+
+
+/**
+ * @brief Returns the projection of \c p, using direction of
+ * \c projection_vector
+ */
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Point_3
+C3T3_helpers<C3T3,MD>::
+project_on_surface_aux(const Point_3& p,
+                       const Point_3& ref_point,
+                       const Vector_3& projection_vector) const
+{
+  typedef typename Gt::Segment_3 Segment_3;
+
+  // Build a segment directed as projection_direction,
+  typename Gt::Compute_squared_distance_3 sq_distance =
+    Gt().compute_squared_distance_3_object();
+
+  typename Gt::Compute_squared_length_3 sq_length =
+    Gt().compute_squared_length_3_object();
+
+  typename Gt::Construct_scaled_vector_3 scale =
+    Gt().construct_scaled_vector_3_object();
+
+  typename Gt::Is_degenerate_3 is_degenerate =
+    Gt().is_degenerate_3_object();
+
+  typename MD::Construct_intersection construct_intersection =
+    domain_.construct_intersection_object();
+
+  const FT sq_dist = sq_distance(p,ref_point);
+  const FT sq_proj_length = sq_length(projection_vector);
+
+  if ( CGAL_NTS is_zero(sq_proj_length) )
+    return ref_point;
+
+  const Vector_3 projection_scaled_vector =
+    scale(projection_vector, CGAL::sqrt(sq_dist/sq_proj_length));
+
+  const Point_3 source = p + projection_scaled_vector;
+  const Point_3 target = p - projection_scaled_vector;
+
+  const Segment_3 proj_segment(source,target);
+
+  if ( is_degenerate(proj_segment) )
+    return ref_point;
+
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+  typename MD::Do_intersect_surface do_intersect =
+    domain_.do_intersect_surface_object();
+
+  if ( do_intersect(proj_segment) )
+    return CGAL::cpp0x::get<0>(construct_intersection(proj_segment));
+  else
+    return ref_point;
+
+#else // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+  typedef typename MD::Intersection Intersection;
+  Intersection intersection = construct_intersection(proj_segment);
+  if(CGAL::cpp0x::get<2>(intersection) == 2)
+    return CGAL::cpp0x::get<0>(intersection);
+  else
+    return ref_point;
+
+#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+}
+
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Plane_3
+C3T3_helpers<C3T3,MD>::
+get_least_square_surface_plane(const Vertex_handle& v,
+                               Point_3& reference_point,
+                               Surface_patch_index patch_index) const
+{
+  // Get incident facets
+  Facet_vector facets;
+# ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tr_.finite_incident_facets_threadsafe(v, std::back_inserter(facets));
+  }
+  // Sequential
+  else
+# endif // CGAL_LINKED_WITH_TBB
+  {
+    tr_.finite_incident_facets(v,std::back_inserter(facets));
+  }
+
+  // Get adjacent surface points
+  std::vector<Point_3> surface_point_vector;
+  for ( typename Facet_vector::iterator fit = facets.begin() ;
+       fit != facets.end() ;
+       ++fit )
+  {
+    if ( c3t3_.is_in_complex(*fit) &&
+         (patch_index == Surface_patch_index() ||
+          c3t3_.surface_patch_index(*fit) == patch_index) )
+    {
+      const Cell_handle& cell = fit->first;
+      const int& i = fit->second;
+
+      surface_point_vector.push_back(cell->get_facet_surface_center(i));
+    }
+  }
+
+  // In some cases point is not a real surface point
+  if ( surface_point_vector.empty() )
+    return Plane_3();
+
+  // Compute least square fitting plane
+  Plane_3 plane;
+  CGAL::linear_least_squares_fitting_3(surface_point_vector.begin(),
+                                       surface_point_vector.end(),
+                                       plane,
+                                       Dimension_tag<0>());
+
+  reference_point = surface_point_vector.front();
+
+  return plane;
+}
+
+
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Point_3
+C3T3_helpers<C3T3,MD>::
+project_on_surface(const Point_3& p,
+                   const Vertex_handle& v,
+                   Surface_patch_index index) const
+{
+  // return domain_.project_on_surface(p);
+  // Get plane
+  Point_3 reference_point(CGAL::ORIGIN);
+  Plane_3 plane = get_least_square_surface_plane(v,reference_point, index);
+
+  if ( reference_point == CGAL::ORIGIN )
+    return p;
+
+  // Project
+  if ( p != v->point() )
+    return project_on_surface_aux(p,
+                                  v->point(),
+                                  plane.orthogonal_vector());
+  else
+    return project_on_surface_aux(p,
+                                  reference_point,
+                                  plane.orthogonal_vector());
+}
+
+
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+typename C3T3_helpers<C3T3,MD>::FT
+C3T3_helpers<C3T3,MD>::
+min_incident_value(const Vertex_handle& vh,
+                   const SliverCriterion& criterion) const
+{
+  Cell_vector incident_cells_;
+  tr_.finite_incident_cells(vh,std::back_inserter(incident_cells_));
+
+  return min_sliver_in_c3t3_value(incident_cells_, criterion);
+}
+
+template <typename OutputIterator, typename CH, typename Fct>
+struct Filter {
+
+  mutable OutputIterator out;
+  const Fct& fct;
+
+  Filter(OutputIterator out, const Fct& fct)
+    : out(out), fct(fct)
+  {}
+
+  void operator()(CH cell_handle) const
+  {
+    if(fct(cell_handle)){
+      *out++ = cell_handle;
+    }
+  }
+
+};
+
+template <typename CH, typename Fct>
+struct Counter {
+
+  const Fct& fct;
+  std::size_t& count;
+
+  Counter(const Fct& fct, std::size_t& count)
+    : fct(fct), count(count)
+  {}
+
+  void operator()(CH cell_handle)
+  {
+    if(fct(cell_handle)){
+      ++count;
+    }
+  }
+
+};
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+void
+C3T3_helpers<C3T3,MD>::
+get_incident_slivers_without_using_tds_data(const Vertex_handle& v,
+                                            const SliverCriterion& criterion,
+                                            const FT& sliver_bound,
+                                            Cell_vector &slivers) const
+{
+  typedef SliverCriterion Sc;
+  typedef std::back_insert_iterator<Cell_vector> OutputIt;
+  typedef Filter<OutputIt, Cell_handle, Is_sliver<Sc> > F;
+  OutputIt slivers_it = std::back_inserter(slivers);
+  Is_sliver<Sc> i_s(c3t3_, criterion, sliver_bound);
+  F f(slivers_it, i_s);
+  tr_.incident_cells_threadsafe(v, boost::make_function_output_iterator(f));
+}
+
+// CJTODO: call tr_.try_lock_and_get_incident_cells instead?
+template <typename C3T3, typename MD>
+bool
+C3T3_helpers<C3T3,MD>::
+try_lock_and_get_incident_cells(const Vertex_handle& v,
+                                Cell_vector &cells) const
+  {
+    // We need to lock v individually first, to be sure v->cell() is valid
+    if (!try_lock_vertex(v))
+      return false;
+
+    Cell_handle d = v->cell();
+    if (!try_lock_element(d)) // LOCK
+    {
+      unlock_all_elements();
+      return false;
+    }
+    cells.push_back(d);
+    d->tds_data().mark_in_conflict();
+    int head=0;
+    int tail=1;
+    do {
+      Cell_handle c = cells[head];
+
+      for (int i=0; i<4; ++i) {
+        if (c->vertex(i) == v)
+          continue;
+        Cell_handle next = c->neighbor(i);
+
+        if (!try_lock_element(next)) // LOCK
+        {
+          BOOST_FOREACH(Cell_handle& ch,
+            std::make_pair(cells.begin(), cells.end()))
+          {
+            ch->tds_data().clear();
+          }
+          cells.clear();
+          unlock_all_elements();
+          return false;
+        }
+        if (! next->tds_data().is_clear())
+          continue;
+        cells.push_back(next);
+        ++tail;
+        next->tds_data().mark_in_conflict();
+      }
+      ++head;
+    } while(head != tail);
+    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
+    {
+      ch->tds_data().clear();
+    }
+    return true;
+  }
+
+template <typename C3T3, typename MD>
+template <typename Filter>
+bool
+C3T3_helpers<C3T3,MD>::
+try_lock_and_get_incident_cells(const Vertex_handle& v,
+                                Cell_vector &cells,
+                                const Filter &filter) const
+{
+  std::vector<Cell_handle> tmp_cells;
+  tmp_cells.reserve(64);
+  bool ret = try_lock_and_get_incident_cells(v, tmp_cells);
+  if (ret)
+  {
+    BOOST_FOREACH(Cell_handle& ch,
+                  std::make_pair(tmp_cells.begin(), tmp_cells.end()))
+    {
+      if (filter(ch))
+        cells.push_back(ch);
+    }
+  }
+  return ret;
+}
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+bool
+C3T3_helpers<C3T3,MD>::
+try_lock_and_get_incident_slivers(const Vertex_handle& v,
+                                  const SliverCriterion& criterion,
+                                  const FT& sliver_bound,
+                                  Cell_vector &slivers) const
+{
+  Is_sliver<SliverCriterion> i_s(c3t3_, criterion, sliver_bound);
+  return try_lock_and_get_incident_cells(v, slivers, i_s);
+}
+
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion, typename OutputIterator>
+OutputIterator
+C3T3_helpers<C3T3,MD>::
+incident_slivers(const Vertex_handle& v,
+                 const SliverCriterion& criterion,
+                 const FT& sliver_bound,
+                 OutputIterator out) const
+{
+  typedef SliverCriterion Sc;
+
+  std::vector<Cell_handle> incident_cells_;
+  tr_.incident_cells(v, std::back_inserter(incident_cells_));
+
+  std::remove_copy_if(incident_cells_.begin(),
+                      incident_cells_.end(),
+                      out,
+                      std::not1(Is_sliver<Sc>(c3t3_,criterion,sliver_bound)));
+
+  return out;
+}
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion, typename OutputIterator>
+OutputIterator
+C3T3_helpers<C3T3,MD>::
+new_incident_slivers(const Vertex_handle& v,
+                     const SliverCriterion& criterion,
+                     const FT& sliver_bound,
+                     OutputIterator out) const
+{
+  typedef SliverCriterion Sc;
+  typedef Filter<OutputIterator,Cell_handle,Is_sliver<Sc> > F;
+
+  Is_sliver<Sc> i_s(c3t3_, criterion, sliver_bound);
+  F f(out, i_s);
+  tr_.incident_cells(v,boost::make_function_output_iterator(f));
+
+  return f.out;
+}
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+bool
+C3T3_helpers<C3T3,MD>::
+is_sliver(const Cell_handle& ch,
+          const SliverCriterion& criterion,
+          const FT& sliver_bound) const
+{
+  Is_sliver<SliverCriterion> iss(c3t3_,criterion,sliver_bound);
+  return iss(ch);
+}
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+std::size_t
+C3T3_helpers<C3T3,MD>::
+number_of_incident_slivers(const Vertex_handle& v,
+                           const SliverCriterion& criterion,
+                           const FT& sliver_bound) const
+{
+  typedef SliverCriterion Sc;
+  typedef Counter<Cell_handle,Is_sliver<Sc> > C;
+
+  std::size_t count = 0;
+  Is_sliver<Sc> is_sliver(c3t3_,criterion,sliver_bound);
+  C c(is_sliver, count);
+  tr_.incident_cells(v, boost::make_function_output_iterator(c));
+
+  return count;
+}
+
+
+template <typename C3T3, typename MD>
+template <typename SliverCriterion>
+typename C3T3_helpers<C3T3,MD>::FT
+C3T3_helpers<C3T3,MD>::
+min_sliver_value(const Cell_vector& cells,
+                 const SliverCriterion& criterion,
+                 const bool use_cache) const
+{
+  using boost::make_transform_iterator;
+
+  if ( cells.empty() )
+    return criterion.get_max_value();
+
+  if ( ! use_cache )
+  {
+    reset_sliver_cache(cells.begin(),cells.end());
+  }
+
+  // Return min dihedral angle
+  //Sliver_criterion_value<SliverCriterion> sc_value(tr_,criterion);
+  //
+  //return *(std::min_element(make_transform_iterator(cells.begin(),sc_value),
+  //                          make_transform_iterator(cells.end(),sc_value)));
+  FT min_value = criterion.get_max_value();
+  for(typename Cell_vector::const_iterator it = cells.begin();
+      it != cells.end();
+      ++it)
+  {
+    min_value = (std::min)(criterion(*it), min_value);
+  }
+  return min_value;
+}
+
+
+template <typename C3T3, typename MD>
+template <typename InputIterator, typename OutputIterator>
+void
+C3T3_helpers<C3T3,MD>::
+fill_modified_vertices(InputIterator cells_begin,
+                       InputIterator cells_end,
+                       const Vertex_handle& vertex,
+                       OutputIterator out) const
+{
+  std::set<Vertex_handle> already_inserted_vertices;
+  // Dont insert vertex in out
+  already_inserted_vertices.insert(vertex);
+
+  for ( InputIterator it = cells_begin ; it != cells_end ; ++it )
+  {
+    for ( int i=0 ; i<4 ; ++i )
+    {
+      // Insert vertices if not already inserted
+      const Vertex_handle& current_vertex = (*it)->vertex(i);
+      if ( !tr_.is_infinite(current_vertex)
+          && already_inserted_vertices.insert(current_vertex).second )
+      {
+        *out++ = current_vertex;
+      }
+    }
+  }
+}
+
+
+template <typename C3T3, typename MD>
+template <typename CellsVector, typename CellDataSet>
+void
+C3T3_helpers<C3T3,MD>::
+fill_cells_backup(const CellsVector& cells,
+                  CellDataSet& cells_backup) const
+{
+  typedef typename CellDataSet::value_type Cell_data;
+  typename CellsVector::const_iterator cit;
+  for(cit = cells.begin(); cit != cells.end(); ++cit)
+  {
+    cells_backup.insert(Cell_data(c3t3_,*cit));
+  }
+}
+
+template <typename C3T3, typename MD>
+template <typename CellsVector, typename CellDataSet>
+void
+C3T3_helpers<C3T3,MD>::
+restore_from_cells_backup(const CellsVector& cells,
+                          CellDataSet& cells_backup) const
+{
+  for(typename CellsVector::const_iterator cit = cells.begin();
+      cit != cells.end();
+      ++cit)
+  {
+    typename CellDataSet::const_iterator cd_it
+      = cells_backup.find(Cell_data_backup(c3t3_, *cit, false/*don't backup*/));
+    if(cd_it != cells_backup.end())
+    {
+      typename CellDataSet::value_type cell_data = *cd_it;
+      cell_data.restore(*cit, c3t3_);
+      cells_backup.erase(cd_it);
+    }
+    else CGAL_error();
+  }
+  CGAL_assertion(cells_backup.empty());
+}
+
+template <typename C3T3, typename MD>
+template <typename OutputIterator>
+OutputIterator
+C3T3_helpers<C3T3,MD>::
+get_conflict_zone_no_topo_change(const Vertex_handle& vertex,
+                                 OutputIterator conflict_cells) const
+{
+  return tr_.incident_cells(vertex,conflict_cells);
+}
+
+template <typename C3T3, typename MD>
+template <typename CellsOutputIterator,
+          typename FacetsOutputIterator>
+void
+C3T3_helpers<C3T3,MD>::
+get_conflict_zone_topo_change(const Vertex_handle& v,
+                              const Point_3& conflict_point,
+                              CellsOutputIterator insertion_conflict_cells,
+                              FacetsOutputIterator insertion_conflict_boundary,
+                              CellsOutputIterator removal_conflict_cells,
+                              bool *could_lock_zone) const
+{
+  // Get triangulation_vertex incident cells : removal conflict zone
+  // TODO: hasn't it already been computed in "perturb_vertex" (when getting the slivers)?
+  // We don't try to lock the incident cells since they've already been locked
+  tr_.incident_cells(v, removal_conflict_cells);
+
+  // Get conflict_point conflict zone
+  int li=0;
+  int lj=0;
+  typename Tr::Locate_type lt;
+  Cell_handle cell = tr_.locate(
+    conflict_point, lt, li, lj, v->cell(), could_lock_zone);
+
+  if (could_lock_zone && *could_lock_zone == false)
+    return;
+
+  if ( lt == Tr::VERTEX ) // Vertex removal is forbidden
+    return;
+
+  // Find conflict zone
+  tr_.find_conflicts(conflict_point,
+                     cell,
+                     insertion_conflict_boundary,
+                     insertion_conflict_cells,
+                     could_lock_zone);
+}
+
+template <typename C3T3, typename MD>
+template <typename OutputIterator>
+OutputIterator
+C3T3_helpers<C3T3,MD>::
+get_conflict_zone_topo_change(const Vertex_handle& vertex,
+                              const Point_3& conflict_point,
+                              OutputIterator conflict_cells) const
+{
+  // Get triangulation_vertex incident cells
+  Cell_vector incident_cells_;
+  incident_cells_.reserve(64);
+  tr_.incident_cells(vertex, std::back_inserter(incident_cells_));
+
+  // Get conflict_point conflict zone
+  Cell_vector deleted_cells;
+  deleted_cells.reserve(64);
+
+  // Vertex removal is forbidden
+  int li=0;
+  int lj=0;
+  typename Tr::Locate_type locate_type;
+  Cell_handle cell = tr_.locate(conflict_point,
+                                locate_type,
+                                li,
+                                lj,
+                                vertex->cell());
+
+  if ( Tr::VERTEX == locate_type )
+    return conflict_cells;
+
+  // Find conflict zone
+  tr_.find_conflicts(conflict_point,
+                     cell,
+                     CGAL::Emptyset_iterator(),
+                     std::back_inserter(deleted_cells),
+                     CGAL::Emptyset_iterator());
+
+  // Compute union of conflict_point conflict zone and triangulation_vertex
+  // incident cells
+  std::sort(deleted_cells.begin(),deleted_cells.end());
+  std::sort(incident_cells_.begin(),incident_cells_.end());
+
+  std::set_union(deleted_cells.begin(), deleted_cells.end(),
+                 incident_cells_.begin(), incident_cells_.end(),
+                 conflict_cells);
+
+  return conflict_cells;
+}
+
+
+template <typename C3T3, typename MD>
+typename C3T3_helpers<C3T3,MD>::Facet_boundary
+C3T3_helpers<C3T3,MD>::
+get_surface_boundary(const Vertex_handle& moving_vertex,
+                     const Facet_vector& facets,
+                     Vertex_set& incident_surface_vertices) const
+{
+  Facet_boundary boundary;
+  typename Facet_vector::const_iterator fit = facets.begin();
+  for ( ; fit != facets.end() ; ++fit )
+  {
+    if ( c3t3_.is_in_complex(*fit) )
+    {
+      const Surface_patch_index surface_index = c3t3_.surface_patch_index(*fit);
+      const int k = fit->second;
+      Vertex_handle v1 = fit->first->vertex((k+1)&3);
+      Vertex_handle v2 = fit->first->vertex((k+2)&3);
+      Vertex_handle v3 = fit->first->vertex((k+3)&3);
+      incident_surface_vertices.insert(v1);
+      incident_surface_vertices.insert(v2);
+      incident_surface_vertices.insert(v3);
+
+      // Check that each vertex is a surface one
+      // This is a trick to ensure that in_domain vertices stay inside
+      if ( c3t3_.in_dimension(v1) > 2
+          || c3t3_.in_dimension(v2) > 2
+          || c3t3_.in_dimension(v3) > 2 )
+      {
+        boundary.clear();
+        return boundary; // return an empty boundary, that cannot be equal
+                         // to a real boundary
+      }
+
+      order_handles(v1,v2,v3);
+
+      CGAL_assertion(v1<v2);
+      CGAL_assertion(v2<v3);
+
+      update_boundary(boundary, Ordered_edge(v1,v2), v3, surface_index);
+      update_boundary(boundary, Ordered_edge(v1,v3), v2, surface_index);
+      update_boundary(boundary, Ordered_edge(v2,v3), v1, surface_index);
+    }
+
+    incident_surface_vertices.erase(moving_vertex);
+  }
+
+  // std::cerr.precision(17);
+  // std::cerr << "boundary { ";
+  // BOOST_FOREACH(const typename Facet_boundary::value_type& v,
+  //               boundary)
+  // {
+  //   std::cerr << "(" << v.first.first->point() << ", " << v.first.second->point() << ", " << v.second.first << ") ";
+  // }
+  // std::cerr << "}\n";
+  return boundary;
+}
+
+template <typename C3T3, typename MD>
+bool
+C3T3_helpers<C3T3,MD>::
+check_no_inside_vertices(const Facet_vector& facets) const
+{
+  typename Facet_vector::const_iterator fit = facets.begin();
+  for ( ; fit != facets.end() ; ++fit )
+  {
+    if ( c3t3_.is_in_complex(*fit) )
+    {
+      const int k = fit->second;
+      const Vertex_handle& v1 = fit->first->vertex((k+1)&3);
+      const Vertex_handle& v2 = fit->first->vertex((k+2)&3);
+      const Vertex_handle& v3 = fit->first->vertex((k+3)&3);
+
+      // Check that each vertex is a surface one
+      if ( c3t3_.in_dimension(v1) > 2
+          || c3t3_.in_dimension(v2) > 2
+          || c3t3_.in_dimension(v3) > 2 )
+      {
+        return false;
+      }
+    }
+  }
+
+  return true;
+}
+
+} // end namespace Mesh_3
+} // end namespace CGAL
+
+#endif // CGAL_MESH_3_C3T3_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Concurrent_mesher_config.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Concurrent_mesher_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Concurrent_mesher_config.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Concurrent_mesher_config.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Creator_weighted_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Creator_weighted_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Creator_weighted_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Creator_weighted_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_features_in_polyhedra_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_features_in_polyhedra_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_features_in_polyhedra_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_features_in_polyhedra_fwd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Detect_polylines_in_polyhedra_fwd.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Dump_c3t3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Dump_c3t3.h
new file mode 100644
index 0000000..aba5b56
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Dump_c3t3.h
@@ -0,0 +1,103 @@
+// Copyright (c) 2012  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_MESH_3_DUMP_C3T3_H
+#define CGAL_MESH_3_DUMP_C3T3_H
+
+#include <string>
+#include <CGAL/Mesh_3/io_signature.h>
+#include <CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h>
+#include <CGAL/is_streamable.h>
+#include <fstream>
+
+namespace CGAL {
+
+template <typename C3t3, 
+          bool is_streamable = 
+            is_streamable<typename C3t3::Triangulation::Vertex>::value &&
+            is_streamable<typename C3t3::Triangulation::Cell>::value &&
+            is_streamable<typename C3t3::Surface_patch_index>::value &&
+            is_streamable<typename C3t3::Subdomain_index>::value 
+          >
+struct Dump_c3t3 {
+  void dump_c3t3(const C3t3& c3t3, std::string prefix) const {
+    std::clog<<"======dump c3t3===== to: " << prefix << std::endl;
+    std::ofstream medit_file((prefix+".mesh").c_str());
+    medit_file.precision(17);
+    CGAL::output_to_medit(medit_file, c3t3, false, true);
+    medit_file.close();
+
+    std::string bin_filename = prefix;
+    bin_filename += ".binary.cgal";
+    std::ofstream bin_file(bin_filename.c_str(),
+                           std::ios_base::binary | std::ios_base::out);
+    bin_file << "binary CGAL c3t3 " << CGAL::Get_io_signature<C3t3>()() << "\n";
+    CGAL::set_binary_mode(bin_file);
+    bin_file << c3t3;
+  }
+}; // end struct template Dump_c3t3<C3t3, bool>
+
+template <typename C3t3>
+struct Dump_c3t3<C3t3, false> {
+  void dump_c3t3(const C3t3&, std::string) {
+    std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n"
+              << "  the c3t3 object of following type:\n"
+              << typeid(C3t3).name() << std::endl
+              << "  cannot be dumped because some types are not streamable:\n";
+    if(!is_streamable<typename C3t3::Triangulation::Vertex>::value) {
+      std::cerr << "     - C3t3::Triangulation::Vertex is not streamble\n";
+      std::cerr << "       "
+                << typeid(typename C3t3::Triangulation::Vertex).name()
+                << "\n";
+    }
+
+    if(!is_streamable<typename C3t3::Triangulation::Cell>::value) {
+      std::cerr << "     - C3t3::Triangulation::Cell is not streamble\n";
+      std::cerr << "       "
+                << typeid(typename C3t3::Triangulation::Cell).name()
+                << "\n";
+    }
+
+    if(!is_streamable<typename C3t3::Surface_patch_index>::value) {
+      std::cerr << "     - C3t3::Surface_patch_index is not streamable\n";
+      std::cerr << "       "
+                << typeid(typename C3t3::Surface_patch_index).name()
+                << "\n";
+    }
+    if(!is_streamable<typename C3t3::Subdomain_index>::value) {
+      std::cerr << "     - C3t3::Subdomain_index is not streamable\n";      
+      std::cerr << "       "
+                << typeid(typename C3t3::Subdomain_index).name()
+                << "\n";
+    }
+  }
+}; // end struct template specialization Dump_c3t3<C3t3, false>
+
+template <typename C3t3>
+void dump_c3t3(const C3t3& c3t3, std::string prefix) {
+  if(!prefix.empty()) {
+    Dump_c3t3<C3t3> dump;
+    dump.dump_c3t3(c3t3, prefix);
+  }
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_MESH_3_DUMP_C3T3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Has_features.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Has_features.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Has_features.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Has_features.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h
new file mode 100644
index 0000000..db2592b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h
@@ -0,0 +1,142 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+// Image_to_labeled_function_wrapper declaration and implementation. See
+// class description.
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
+#define CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
+
+#include <CGAL/Image_3.h>
+#include <CGAL/function_objects.h>
+
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+/**
+ * @class Image_to_labeled_function_wrapper
+ *
+ * Wraps a labeled image into a labeled function which takes his values into
+ * N. Uses trilinear interpolation.
+ * Note: Image has to be labeled with unsigned char
+ */
+template<class Image_,
+         class BGT,
+         typename Image_word_type = unsigned char,
+         typename Return_type = int,
+         typename Transform = Identity<Image_word_type>,
+         bool labeled_image = true,
+         bool use_trilinear_interpolation=true>
+class Image_to_labeled_function_wrapper
+{
+public:
+  // Types
+  typedef Return_type return_type;
+  typedef Image_word_type word_type;
+  typedef typename BGT::Point_3   Point_3;
+
+  /// Constructor
+  Image_to_labeled_function_wrapper(const Image_& image, 
+                                    const Transform& transform = Transform(),
+                                    const Image_word_type value_outside = 0)
+    : r_im_(image)
+    , transform(transform)
+    , value_outside(value_outside)
+  {
+    CGAL_assertion(transform(value_outside) == return_type());
+  }
+
+  // Default copy constructor and assignment operator are ok
+
+  /// Destructor
+  ~Image_to_labeled_function_wrapper() {}
+
+  /**
+   * Returns an int corresponding to the label at point \c p
+   * @param p the input point
+   * @return the label at point \c p
+   */
+  return_type operator()(const Point_3& p, const bool = true) const
+  {
+    if ( use_trilinear_interpolation )
+    {
+      if ( labeled_image )
+      {
+        return static_cast<return_type>(transform(
+          r_im_.labellized_trilinear_interpolation(
+              CGAL::to_double(p.x()),
+              CGAL::to_double(p.y()),
+              CGAL::to_double(p.z()),
+              value_outside)));
+      } else {
+        return static_cast<return_type>(transform(
+          static_cast<typename Transform::argument_type>(
+            r_im_.template trilinear_interpolation<Image_word_type, double>(
+              CGAL::to_double(p.x()),
+              CGAL::to_double(p.y()),
+              CGAL::to_double(p.z()),
+              value_outside))));
+      }
+    }
+    else
+    {
+      const std::ptrdiff_t px = static_cast<std::ptrdiff_t>(p.x()/r_im_.vx());
+      const std::ptrdiff_t py = static_cast<std::ptrdiff_t>(p.y()/r_im_.vy());
+      const std::ptrdiff_t pz = static_cast<std::ptrdiff_t>(p.z()/r_im_.vz());
+
+      const std::ptrdiff_t dimx = static_cast<std::ptrdiff_t>(r_im_.xdim());
+      const std::ptrdiff_t dimy = static_cast<std::ptrdiff_t>(r_im_.ydim());
+      const std::ptrdiff_t dimz = static_cast<std::ptrdiff_t>(r_im_.zdim());
+
+      if(px < 0 ||
+         py < 0 ||
+         pz < 0 ||
+         px+1 >= dimx ||
+         py+1 >= dimy ||
+         pz+1 >= dimz)
+      {
+        return 0;
+      }
+
+      const word_type* data = static_cast<const word_type*>(r_im_.data());
+      return static_cast<return_type>(transform(
+                data[pz*dimy*dimx + py*dimx + px]));
+    }
+  }
+
+private:
+  /// Labeled image to wrap
+  const Image_& r_im_;
+  const Transform transform;
+  const Image_word_type value_outside;
+
+};  // end class Image_to_labeled_function_wrapper
+
+
+}  // end namespace Mesh_3
+
+}  // end namespace CGAL
+
+#endif // CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h
new file mode 100644
index 0000000..52e4c47
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h
@@ -0,0 +1,630 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+// class Labeled_mesh_domain_3. See class description.
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_LABELED_MESH_DOMAIN_3_H
+#define CGAL_MESH_3_LABELED_MESH_DOMAIN_3_H
+
+#define CGAL_DEPRECATED_HEADER "<CGAL/Mesh_3/Labeled_mesh_domain_3.h>"
+#define CGAL_REPLACEMENT_HEADER "<CGAL/Labeled_mesh_domain_3.h>"
+#include <CGAL/internal/deprecation_warning.h>
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Bbox_3.h>
+
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
+
+#include <boost/variant.hpp>
+#include <boost/format.hpp>
+#include <boost/optional.hpp>
+#include <CGAL/tuple.h>
+#include <CGAL/Origin.h>
+#include <CGAL/Random.h>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+/**
+ * \class Labeled_mesh_domain_3
+ *
+ * Function f must take his values into N.
+ * Let p be a Point.
+ *  - f(p)=0 means that p is outside domain.
+ *  - f(p)=a, a!=0 means that p is inside subdomain a.
+ *
+ *  Any boundary facet is labelled <a,b>, a<b, where a and b are the
+ *  tags of it's incident subdomain.
+ *  Thus, a boundary facet of the domain is labelled <0,b>, where b!=0.
+ */
+template<class Function,
+         class BGT>
+class Labeled_mesh_domain_3
+{
+public:
+  /// Geometric object types
+  typedef typename BGT::Point_3    Point_3;
+  typedef typename BGT::Segment_3  Segment_3;
+  typedef typename BGT::Ray_3      Ray_3;
+  typedef typename BGT::Line_3     Line_3;
+  typedef typename BGT::Vector_3   Vector_3;
+  typedef typename BGT::Sphere_3   Sphere_3;
+  typedef CGAL::Bbox_3             Bbox_3;
+
+  typedef typename BGT::Iso_cuboid_3 Iso_cuboid_3;
+
+public:
+  // Kernel_traits compatibility
+  typedef BGT R;
+
+  //-------------------------------------------------------
+  // Index Types
+  //-------------------------------------------------------
+  /// Type of indexes for cells of the input complex
+  typedef typename Function::return_type Subdomain_index;
+  typedef boost::optional<Subdomain_index> Subdomain;
+  /// Type of indexes for surface patch of the input complex
+  typedef std::pair<Subdomain_index, Subdomain_index> Surface_patch_index;
+  typedef boost::optional<Surface_patch_index> Surface_patch;
+  /// Type of indexes to characterize the lowest dimensional face of the input
+  /// complex on which a vertex lie
+  typedef boost::variant<Subdomain_index, Surface_patch_index> Index;
+  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
+
+
+  typedef typename BGT::FT FT;
+  typedef BGT Geom_traits;
+
+  /**
+   * @brief Constructor
+   */
+  Labeled_mesh_domain_3(const Function& f,
+                         const Sphere_3& bounding_sphere,
+                         const FT& error_bound = FT(1e-3),
+                         CGAL::Random* p_rng = NULL);
+
+  Labeled_mesh_domain_3(const Function& f,
+                         const Bbox_3& bbox,
+                         const FT& error_bound = FT(1e-3),
+                         CGAL::Random* p_rng = NULL);
+
+  /// Destructor
+  virtual ~Labeled_mesh_domain_3()
+  {
+    if(delete_rng_)
+      delete p_rng_;
+  }
+
+  /**
+   * Returns a bounding box of the domain
+   */
+  Bbox_3 bbox() const {
+    return this->bbox_.bbox();
+  }
+
+  /**
+   * Constructs  a set of \ccc{n} points on the surface, and output them to
+   *  the output iterator \ccc{pts} whose value type is required to be
+   *  \ccc{std::pair<Points_3, Index>}.
+   */
+  struct Construct_initial_points
+  {
+    Construct_initial_points(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    template<class OutputIterator>
+    OutputIterator operator()(OutputIterator pts, const int n = 12) const;
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Construct_initial_points object
+  Construct_initial_points construct_initial_points_object() const
+  {
+    return Construct_initial_points(*this);
+  }
+
+  /**
+   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
+   *  domain, the parameter index is set to the index of the subdomain
+   *  including $p$. It is set to the default value otherwise.
+   */
+  struct Is_in_domain
+  {
+    Is_in_domain(const Labeled_mesh_domain_3& domain) : r_domain_(domain) {}
+
+    Subdomain operator()(const Point_3& p) const
+    {
+      // f(p)==0 means p is outside the domain
+      Subdomain_index index = (r_domain_.function_)(p);
+      if ( Subdomain_index() == index )
+        return Subdomain();
+      else
+        return Subdomain(index);
+    }
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Is_in_domain object
+  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
+
+  /**
+   * Returns true is the element \ccc{type} intersect properly any of the
+   * surface patches describing the either the domain boundary or some
+   * subdomain boundary.
+   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * Parameter index is set to the index of the intersected surface patch
+   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
+   * value otherwise.
+   */
+  struct Do_intersect_surface
+  {
+    Do_intersect_surface(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    Surface_patch operator()(const Segment_3& s) const
+    {
+      return this->operator()(s.source(), s.target());
+    }
+
+    Surface_patch operator()(const Ray_3& r) const
+    {
+      return clip_to_segment(r);
+    }
+
+    Surface_patch operator()(const Line_3& l) const
+    {
+      return clip_to_segment(l);
+    }
+
+  private:
+    /// Returns true if points \c a & \c b do not belong to the same subdomain
+    /// \c index is set to the surface index of subdomains f(a), f(b)
+    Surface_patch operator()(const Point_3& a, const Point_3& b) const
+    {
+      // If f(a) != f(b), then [a,b] intersects some surface. Here we consider
+      // [a,b] intersects surface_patch labelled <f(a),f(b)> (or <f(b),f(a)>).
+      // It may be false, further rafinement will improve precision
+      const Subdomain_index value_a = r_domain_.function_(a);
+      const Subdomain_index value_b = r_domain_.function_(b);
+
+      if ( value_a != value_b )
+        return Surface_patch(r_domain_.make_surface_index(value_a, value_b));
+      else
+        return Surface_patch();
+    }
+
+    /**
+     * Clips \c query to a segment \c s, and call operator()(s)
+     */
+    template<typename Query>
+    Surface_patch clip_to_segment(const Query& query) const
+    {
+      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
+        clipped = CGAL::intersection(query, r_domain_.bbox_);
+
+      if(clipped)
+#if CGAL_INTERSECTION_VERSION > 1
+        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
+          return this->operator()(*s);
+#else
+        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
+          return this->operator()(*s);
+#endif
+        
+      return Surface_patch();
+    }
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Do_intersect_surface object
+  Do_intersect_surface do_intersect_surface_object() const
+  {
+    return Do_intersect_surface(*this);
+  }
+
+  /**
+   * Returns a point in the intersection of the primitive \ccc{type}
+   * with some boundary surface.
+   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * The integer \ccc{dimension} is set to the dimension of the lowest
+   * dimensional face in the input complex containing the returned point, and
+   * \ccc{index} is set to the index to be stored at a mesh vertex lying
+   * on this face.
+   */
+  struct Construct_intersection
+  {
+    Construct_intersection(const Labeled_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    Intersection operator()(const Segment_3& s) const
+    {
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      CGAL_precondition(r_domain_.do_intersect_surface_object()(s));
+#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      return this->operator()(s.source(),s.target());
+    }
+
+    Intersection operator()(const Ray_3& r) const
+    {
+      return clip_to_segment(r);
+    }
+
+    Intersection operator()(const Line_3& l) const
+    {
+      return clip_to_segment(l);
+    }
+
+  private:
+    /**
+     * Returns a point in the intersection of [a,b] with the surface
+     * \c a must be the source point, and \c b the out point. It's important
+     * because it drives bisection cuts.
+     * Indeed, the returned point is the first intersection from \c [a,b]
+     * with a subdomain surface.
+     */
+    Intersection operator()(const Point_3& a, const Point_3& b) const
+    {
+      // Functors
+      typename BGT::Compute_squared_distance_3 squared_distance =
+                                      BGT().compute_squared_distance_3_object();
+      typename BGT::Construct_midpoint_3 midpoint =
+                                      BGT().construct_midpoint_3_object();
+
+      // Non const points
+      Point_3 p1 = a;
+      Point_3 p2 = b;
+      Point_3 mid = midpoint(p1, p2);
+
+      // Cannot be const: those values are modified below.
+      Subdomain_index value_at_p1 = r_domain_.function_(p1);
+      Subdomain_index value_at_p2 = r_domain_.function_(p2);
+      Subdomain_index value_at_mid = r_domain_.function_(mid,true);
+
+      // If both extremities are in the same subdomain,
+      // there is no intersection.
+      // This should not happen...
+      if( value_at_p1 == value_at_p2 )
+      {
+        return Intersection();
+      }
+
+      // Construct the surface patch index and index from the values at 'a'
+      // and 'b'. Even if the bissection find out a different pair of
+      // values, the reported index will be constructed from the initial
+      // values.
+      const Surface_patch_index sp_index =
+        r_domain_.make_surface_index(value_at_p1, value_at_p2);
+      const Index index = r_domain_.index_from_surface_patch_index(sp_index);
+
+      // Else lets find a point (by bisection)
+      // Bisection ends when the point is near than error bound from surface
+      while(true)
+      {
+        // If the two points are enough close, then we return midpoint
+        if ( squared_distance(p1, p2) < r_domain_.squared_error_bound_ )
+        {
+          CGAL_assertion(value_at_p1 != value_at_p2);
+          return Intersection(mid, index, 2);
+        }
+
+        // Else we must go on
+        // Here we consider that p1(a) is the source point. Thus, we keep p1 and
+        // change p2 if f(p1)!=f(p2).
+        // That allows us to find the first intersection from a of [a,b] with
+        // a surface.
+        if ( value_at_p1 != value_at_mid )
+        {
+          p2 = mid;
+          value_at_p2 = value_at_mid;
+        }
+        else
+        {
+          p1 = mid;
+          value_at_p1 = value_at_mid;
+        }
+
+        mid = midpoint(p1, p2);
+        value_at_mid = r_domain_.function_(mid,true);
+      }
+    }
+
+    /// Clips \c query to a segment \c s, and call operator()(s)
+    template<typename Query>
+    Intersection clip_to_segment(const Query& query) const
+    {
+      typename cpp11::result_of<typename BGT::Intersect_3(Query, Iso_cuboid_3)>::type
+        clipped = CGAL::intersection(query, r_domain_.bbox_);
+
+      if(clipped)
+#if CGAL_INTERSECTION_VERSION > 1
+        if(const Segment_3* s = boost::get<Segment_3>(&*clipped))
+          return this->operator()(*s);
+#else
+        if(const Segment_3* s = object_cast<Segment_3>(&clipped))
+          return this->operator()(*s);
+#endif
+      
+      return Intersection();
+    }
+
+  private:
+    const Labeled_mesh_domain_3& r_domain_;
+  };
+
+  /// Returns Construct_intersection object
+  Construct_intersection construct_intersection_object() const
+  {
+    return Construct_intersection(*this);
+  }
+
+  /**
+   * Returns the index to be stored in a vertex lying on the surface identified
+   * by \c index.
+   */
+  Index index_from_surface_patch_index(const Surface_patch_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the index to be stored in a vertex lying in the subdomain
+   * identified by \c index.
+   */
+  Index index_from_subdomain_index(const Subdomain_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the \c Surface_patch_index of the surface patch
+   * where lies a vertex with dimension 2 and index \c index.
+   */
+  Surface_patch_index surface_patch_index(const Index& index) const
+  { return boost::get<Surface_patch_index>(index); }
+
+  /**
+   * Returns the index of the subdomain containing a vertex
+   *  with dimension 3 and index \c index.
+   */
+  Subdomain_index subdomain_index(const Index& index) const
+  { return boost::get<Subdomain_index>(index); }
+  
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+  
+  Index index_from_surface_index(const Surface_index& index) const
+  { return index_from_surface_patch_index(index); }
+  
+  Surface_index surface_index(const Index& index) const
+  { return surface_patch_index(index); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+
+private:
+  /// Returns Surface_patch_index from \c i and \c j
+  Surface_patch_index make_surface_index(const Subdomain_index i,
+                                   const Subdomain_index j) const
+  {
+    if ( i < j ) return Surface_patch_index(i,j);
+    else return Surface_patch_index(j,i);
+  }
+
+  /// Returns squared error bound from \c bbox and \c error
+  FT squared_error_bound(const Iso_cuboid_3& bbox, const FT& error) const
+  {
+    typename BGT::Compute_squared_distance_3 squared_distance =
+                                    BGT().compute_squared_distance_3_object();
+    return squared_distance((bbox.min)(), (bbox.max)())*error*error/4;
+  }
+
+  /// Returns squared error bound from \c sphere and \c error
+  FT squared_error_bound(const Sphere_3& sphere, const FT& error) const
+  {
+    typename BGT::Compute_squared_radius_3 squared_radius =
+                                    BGT().compute_squared_radius_3_object();
+    return squared_radius(sphere)*error*error;
+  }
+
+  /// Returns the bounding sphere of an Iso_cuboid_3
+  Sphere_3 bounding_sphere(const Iso_cuboid_3& bbox) const
+  {
+    typename BGT::Construct_sphere_3 sphere = BGT().construct_sphere_3_object();
+    return sphere((bbox.min)(), (bbox.max)());
+  }
+
+  /// Returns and Iso_cuboid_3 from a Bbox_3
+  Iso_cuboid_3 iso_cuboid(const Bbox_3& bbox)
+  {
+    const Point_3 p_min(bbox.xmin(), bbox.ymin(), bbox.zmin());
+    const Point_3 p_max(bbox.xmax(), bbox.ymax(), bbox.zmax());
+
+    return Iso_cuboid_3(p_min,p_max);
+  }
+  
+protected:
+  /// Returns bounding box
+  const Iso_cuboid_3& bounding_box() const { return bbox_; }
+
+private:
+  /// The function which answers subdomain queries
+  const Function function_;
+  /// The bounding box
+  const Iso_cuboid_3 bbox_;
+  /// The random number generator used by Construct_initial_points
+  CGAL::Random* p_rng_;
+  bool delete_rng_;
+  /// Error bound relative to sphere radius
+  FT squared_error_bound_;
+
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Labeled_mesh_domain_3<Function,BGT> Self;
+  Labeled_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Labeled_mesh_domain_3
+
+
+
+
+//-------------------------------------------------------
+// Method implementation
+//-------------------------------------------------------
+template<class F, class BGT>
+Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
+                       const F& f,
+                       const Sphere_3& bounding_sphere,
+                       const FT& error_bound,
+                       CGAL::Random* p_rng)
+: function_(f)
+, bbox_(iso_cuboid(bounding_sphere.bbox()))
+, p_rng_(p_rng)
+, delete_rng_(false)
+, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
+{
+  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
+  if(!p_rng_)
+  {
+    p_rng_ = new CGAL::Random(0);
+    delete_rng_ = true;
+  }
+}
+
+template<class F, class BGT>
+Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
+                       const F& f,
+                       const Bbox_3& bbox,
+                       const FT& error_bound,
+                       CGAL::Random* p_rng)
+: function_(f)
+, bbox_(iso_cuboid(bbox))
+, p_rng_(p_rng)
+, delete_rng_(false)
+, squared_error_bound_(squared_error_bound(bbox_,error_bound))
+{
+  // TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
+  if(!p_rng_)
+  {
+    p_rng_ = new CGAL::Random(0);
+    delete_rng_ = true;
+  }
+}
+
+
+template<class F, class BGT>
+template<class OutputIterator>
+OutputIterator
+Labeled_mesh_domain_3<F,BGT>::Construct_initial_points::operator()(
+                                                    OutputIterator pts,
+                                                    const int nb_points) const
+{
+  // Create point_iterator on and in bounding_sphere
+  typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
+  typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
+
+
+  const FT squared_radius = BGT().compute_squared_radius_3_object()(
+      r_domain_.bounding_sphere(r_domain_.bbox_));
+
+  const double radius = std::sqrt(CGAL::to_double(squared_radius));
+
+  CGAL::Random& rng = *(r_domain_.p_rng_);
+  Random_points_on_sphere_3 random_point_on_sphere(radius, rng);
+  Random_points_in_sphere_3 random_point_in_sphere(radius, rng);
+
+  // Get some functors
+  typename BGT::Construct_segment_3 segment_3 =
+                              BGT().construct_segment_3_object();
+  typename BGT::Construct_vector_3 vector_3 =
+                              BGT().construct_vector_3_object();
+  typename BGT::Construct_translated_point_3 translate =
+                              BGT().construct_translated_point_3_object();
+  typename BGT::Construct_center_3 center = BGT().construct_center_3_object();
+
+  // Get translation from origin to sphere center
+  Point_3 center_pt = center(r_domain_.bounding_sphere(r_domain_.bbox_));
+  const Vector_3 sphere_translation = vector_3(CGAL::ORIGIN, center_pt);
+
+  // Create nb_point points
+  int n = nb_points;
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "construct initial points:\n";
+#endif
+  while ( 0 != n )
+  {
+    // Get a random segment
+    const Point_3 random_point = translate(*random_point_on_sphere,
+                                           sphere_translation);
+    const Segment_3 random_seg = segment_3(center_pt, random_point);
+
+    // Add the intersection to the output if it exists
+    Surface_patch surface = r_domain_.do_intersect_surface_object()(random_seg);
+    if ( surface )
+    {
+      const Point_3 intersect_pt = CGAL::cpp11::get<0>(
+          r_domain_.construct_intersection_object()(random_seg));
+      *pts++ = std::make_pair(intersect_pt,
+                              r_domain_.index_from_surface_patch_index(*surface));
+      --n;
+
+#ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << boost::format("\r             \r"
+                                 "%1%/%2% initial point(s) found...")
+                   % (nb_points - n)
+                   % nb_points;
+#endif
+    }
+    else
+    {
+      // Get a new random point into sphere as center of object
+      // It may be necessary if the center of the domain is empty, e.g. torus
+      // In general case, it is good for input point dispersion
+      ++random_point_in_sphere;
+      center_pt = translate(*random_point_in_sphere, sphere_translation);
+    }
+    ++random_point_on_sphere;
+  }
+
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "\n";
+#endif
+  return pts;
+}
+
+
+}  // end namespace Mesh_3
+
+}  // end namespace CGAL
+
+#endif // LABELLED_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Lloyd_move.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Lloyd_move.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Lloyd_move.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Lloyd_move.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
new file mode 100644
index 0000000..0b9a670
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
@@ -0,0 +1,949 @@
+// Copyright (c) 2003-2009  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2013       GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Stéphane Tayeb
+//
+//******************************************************************************
+// File Description : Implements class Mesh_complex_3_in_triangulation_3.
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
+#define CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Mesh_3/utilities.h>
+#include <CGAL/iterator.h>
+#include <CGAL/IO/File_medit.h>
+#include <CGAL/IO/File_maya.h>
+#include <CGAL/Bbox_3.h>
+#include <iostream>
+#include <fstream>
+#include <CGAL/Mesh_3/io_signature.h>
+#include <CGAL/Union_find.h>
+
+#ifdef CGAL_LINKED_WITH_TBB
+  #include <tbb/atomic.h>
+#endif
+
+namespace CGAL {
+namespace Mesh_3 {
+
+  namespace details {
+
+    template <typename Tr>
+    class C3t3_helper_class
+    {
+    protected:
+      typedef typename Tr::Vertex_handle Vertex_handle;
+      typedef typename Tr::Cell_handle   Cell_handle;
+      typedef typename Tr::Facet         Facet;
+      typedef typename Tr::Edge          Edge;
+
+      typedef std::pair<Vertex_handle, Vertex_handle> Pair_of_vertices;
+
+      // computes and return an ordered pair of Vertex
+      Pair_of_vertices
+      make_ordered_pair(const Vertex_handle vh1, const Vertex_handle vh2) const {
+	if (vh1 < vh2) {
+	  return std::make_pair(vh1, vh2);
+	}
+	else {
+	  return std::make_pair(vh2, vh1);
+	}
+      }
+
+      // same from an Edge
+      Pair_of_vertices
+      make_ordered_pair(const Edge e) const {
+        return make_ordered_pair(e.first->vertex(e.second),
+                                 e.first->vertex(e.third));
+      }
+
+      Facet canonical_facet(Cell_handle c, int i) const {
+        Cell_handle c2 = c->neighbor(i);
+        return (c2 < c) ? std::make_pair(c2,c2->index(c)) : std::make_pair(c,i);
+      }
+
+    }; // end class template C3t3_helper_class
+
+  } // end namespace Mesh_3::details
+
+/**
+ * @class Mesh_complex_3_in_triangulation_3_base
+ * @brief A data-structure to represent and maintain a 3D complex embedded
+ * in a 3D triangulation.
+ */
+template<typename Tr, typename Concurrency_tag>
+class Mesh_complex_3_in_triangulation_3_base
+  : public details::C3t3_helper_class<Tr>
+{
+  typedef Mesh_complex_3_in_triangulation_3_base<Tr, Concurrency_tag> Self;
+  typedef details::C3t3_helper_class<Tr> Base;
+
+public:
+  // Triangulation types
+  typedef Tr                            Triangulation;
+  typedef typename Tr::Vertex_handle    Vertex_handle;
+  typedef typename Tr::Cell_handle      Cell_handle;
+  typedef typename Tr::Facet            Facet;
+  typedef typename Tr::Edge             Edge;
+  typedef typename Tr::size_type        size_type;
+
+  // Indices types
+  typedef typename Tr::Cell::Subdomain_index      Subdomain_index;
+  typedef typename Tr::Cell::Surface_patch_index  Surface_patch_index;
+  typedef typename Tr::Vertex::Index              Index;
+
+  enum Face_status{ NOT_IN_COMPLEX = 0,
+                    ISOLATED = 1, // - An ISOLATED edge is a marked edge,
+                                  //   without any incident facets.
+                    BOUNDARY,     // - An edge is on BOUNDARY if it has only
+                                  //   one incident facet.
+                                  // - A vertex is on BOUNDARY if all its
+                                  //   incident edges are REGULAR or on
+                                  //   BOUNDARY, at least one is on
+                                  //   BOUNDARY, and the incident facets
+                                  //   form only one connected component.
+                    REGULAR,      // - A facet that is in the complex is
+                                  //   REGULAR.
+                                  // - An edge is REGULAR if it has
+                                  //   exactly two incident facets.
+                                  // - A vertex is REGULAR if all it
+                                  //   incident edges are REGULAR, and the
+                                  //   incident facets form only one
+                                  //   connected component.
+                    SINGULAR};    // - SINGULAR is for all other cases.
+
+  //-------------------------------------------------------
+  // Constructors / Destructors
+  //-------------------------------------------------------
+  /**
+   * @brief Constructor
+   * Builds an empty 3D complex.
+   */
+  Mesh_complex_3_in_triangulation_3_base()
+    : Base()
+    , tr_()
+    , edge_facet_counter_() //TODO: parallel!
+    , manifold_info_initialized_(false) //TODO: parallel!
+  {
+    // We don't put it in the initialization list because
+    // tbb::atomic has no contructors
+    number_of_facets_ = 0;
+    number_of_cells_ = 0;
+  }
+
+  /// Copy constructor
+  Mesh_complex_3_in_triangulation_3_base(const Self& rhs)
+    : Base()
+    , tr_(rhs.tr_)
+    , edge_facet_counter_(rhs.edge_facet_counter_)
+    , manifold_info_initialized_(rhs.manifold_info_initialized_)
+  {
+    number_of_facets_ = rhs.number_of_facets_;
+    number_of_cells_ = rhs.number_of_cells_;
+  }
+
+  /// Destructor
+  ~Mesh_complex_3_in_triangulation_3_base() {}
+
+  void clear() {
+    number_of_cells_ = 0;
+    number_of_facets_ = 0;
+    tr_.clear();
+    manifold_info_initialized_ = false;
+    edge_facet_counter_.clear();
+  }
+
+  /// Assignment operator
+  Self& operator=(Self rhs)
+  {
+    swap(rhs);
+    return *this;
+  }
+
+  /// Returns the reference to the triangulation
+  Triangulation& triangulation() { return tr_; }
+  /// Returns a const reference to the triangulation
+  const Triangulation& triangulation() const { return tr_; }
+
+
+  /// Adds facet \c facet to the 2D complex, with surface index \c index
+  void add_to_complex(const Facet& facet, const Surface_patch_index& index)
+  {
+    add_to_complex(facet.first, facet.second, index);
+  }
+
+  /// Adds facet(\c cell, \c i) to the 2D complex, with surface index \c index
+  void add_to_complex(const Cell_handle& cell,
+                      const int i,
+                      const Surface_patch_index& index);
+
+  /// Removes facet \c facet from 2D complex
+  void remove_from_complex(const Facet& facet);
+
+  /// Removes facet(\c cell, \c i) from 2D complex
+  void remove_from_complex(const Cell_handle& c, const int i) {
+    remove_from_complex(Facet(c, i));
+  }
+
+  /// Sets surface index of facet \c facet to \c index
+  void set_surface_patch_index(const Facet& f, const Surface_patch_index& index)
+  {
+    set_surface_patch_index(f.first, f.second, index);
+  }
+
+  /// Sets surface index of facet(\c cell, \c i) to \c index
+  void set_surface_patch_index(const Cell_handle& cell,
+                         const int i,
+                         const Surface_patch_index& index) const
+  {
+    cell->set_surface_patch_index(i, index);
+  }
+
+  /// Returns `NOT_IN_COMPLEX`, `BOUNDARY`, `REGULAR`, or `SINGULAR`,
+  /// depending on the number of incident facets in the complex, and the
+  /// number of connected components of its link
+  Face_status face_status(const Vertex_handle v) const
+  {
+    if(!manifold_info_initialized_) init_manifold_info();
+    const std::size_t n = v->cached_number_of_incident_facets();
+
+    if(n == 0) return NOT_IN_COMPLEX;
+
+    //test incident edges for REGULARITY and count BOUNDARY edges
+    typename std::vector<Edge> edges;
+    edges.reserve(64);
+    tr_.incident_edges(v, std::back_inserter(edges));
+    int number_of_boundary_incident_edges = 0; // could be a bool
+    for (typename std::vector<Edge>::iterator
+           eit=edges.begin(), end = edges.end();
+	 eit != end; eit++)
+    {
+      switch( face_status(*eit) )
+      {
+      case NOT_IN_COMPLEX: case REGULAR: break;
+      case BOUNDARY: ++number_of_boundary_incident_edges; break;
+      default :
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        std::cerr << "singular edge...\n";
+        std::cerr << v->point() << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        return SINGULAR;
+      }
+    }
+
+    // From here all incident edges (in complex) are REGULAR or BOUNDARY.
+    const std::size_t nb_components = union_find_of_incident_facets(v);
+    if(nb_components > 1) {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      std::cerr << "singular vertex: nb_components=" << nb_components << std::endl;
+      std::cerr << v->point() << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      return SINGULAR;
+    }
+    else { // REGULAR OR BOUNDARY
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      std::cerr << "regular or boundary: " << v->point() << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      if (number_of_boundary_incident_edges != 0)
+        return BOUNDARY;
+      else
+        return REGULAR;
+    }
+  }
+
+  /// This function should be called only when incident edges
+  /// are known to be REGULAR OR BOUNDARY
+  bool is_regular_or_boundary_for_vertices(Vertex_handle v) const {
+    return union_find_of_incident_facets(v) == 1;
+  }
+
+  /// Returns `NOT_IN_COMPLEX`, `BOUNDARY`, `REGULAR`, or `SINGULAR`,
+  /// depending on the number of incident facets in the complex
+  Face_status face_status(const Edge& edge) const
+  {
+    if(!manifold_info_initialized_) init_manifold_info();
+
+    switch(edge_facet_counter_[this->make_ordered_pair(edge)])
+    {
+    case 0: return NOT_IN_COMPLEX;
+    case 1: return BOUNDARY;
+    case 2: return REGULAR;
+    default: return SINGULAR;
+    }
+  }
+
+  /// Returns true if the vertex \c v has is incident to at least a facet
+  /// of the complex
+  bool has_incident_facets_in_complex(const Vertex_handle& v) const
+  {
+    if(!manifold_info_initialized_) init_manifold_info();
+    return v->cached_number_of_incident_facets() > 0;
+  }
+
+  /// Returns true if facet \c facet is in complex
+  bool is_in_complex(const Facet& facet) const
+  {
+    return is_in_complex(facet.first, facet.second);
+  }
+
+  /// Returns true if facet (\c cell, \c i) is in 2D complex
+  bool is_in_complex(const Cell_handle& cell, const int i) const
+  {
+    return ( cell->is_facet_on_surface(i) );
+  }
+
+  /// Returns surface index of facet \c f
+  Surface_patch_index surface_patch_index(const Facet& f) const
+  {
+    return surface_patch_index(f.first,f.second);
+  }
+
+  /// Returns surface index of facet(\c cell, \c i)
+  Surface_patch_index surface_patch_index(const Cell_handle& cell,
+                                          const int i) const
+  {
+    return cell->surface_patch_index(i);
+  }
+
+  /// Returns the number of surface facets of the mesh
+  size_type number_of_facets_in_complex() const { return number_of_facets_; }
+
+  /// Adds cell \c cell to the 3D complex, with subdomain index \c index
+  void add_to_complex(const Cell_handle& cell, const Subdomain_index& index)
+  {
+    CGAL_precondition( !( index == Subdomain_index() ) );
+
+    if ( ! is_in_complex(cell) )
+    {
+      set_subdomain_index(cell, index);
+      ++number_of_cells_;
+    }
+  }
+
+  /// Removes cell \c cell from the 3D complex
+  void remove_from_complex(const Cell_handle& cell)
+  {
+    if ( is_in_complex(cell) )
+    {
+      set_subdomain_index(cell, Subdomain_index());
+      --number_of_cells_;
+    }
+  }
+
+
+  /// Sets subdomain index of cell \c cell to \c index
+  void set_subdomain_index(const Cell_handle& cell,
+                           const Subdomain_index& index) const
+  {
+    cell->set_subdomain_index(index);
+  }
+
+  /// Sets index of vertex \c vertex to \c index
+  void set_index(const Vertex_handle& vertex, const Index& index) const
+  {
+    vertex->set_index(index);
+  }
+
+  /// Sets dimension of vertex \c vertex to \c dimension
+  void set_dimension(const Vertex_handle& vertex, int dimension) const
+  {
+    vertex->set_dimension(dimension);
+  }
+
+  /// Returns the number of cells which belongs to the 3D complex
+  size_type number_of_cells_in_complex() const
+  {
+    return number_of_cells_;
+  }
+
+  /// Returns \c true if cell \c cell belongs to the 3D complex
+  bool is_in_complex(const Cell_handle& cell) const
+  {
+    return !( subdomain_index(cell) == Subdomain_index() );
+  }
+
+  /// Returns the subdomain index of cell \c cell
+  Subdomain_index subdomain_index(const Cell_handle& cell) const
+  {
+    return cell->subdomain_index();
+  }
+
+  /// Returns the dimension of the lowest dimensional face of the input 3D
+  /// complex that contains the vertex
+  int in_dimension(const Vertex_handle& v) const { return v->in_dimension(); }
+
+  /// Returns the index of vertex \c v
+  Index index(const Vertex_handle& v) const { return v->index(); }
+
+  /// Outputs the mesh to medit
+  void output_to_medit(std::ostream& os,
+                       bool rebind = true,
+                       bool show_patches = false) const
+  {
+    // Call global function
+    CGAL::output_to_medit(os,*this,rebind,show_patches);
+  }
+  
+  /// Outputs the mesh to maya
+  void output_to_maya(std::ofstream& os,
+                      bool surfaceOnly = true) const
+  {
+    // Call global function
+    CGAL::output_to_maya(os,*this,surfaceOnly);
+  }
+
+  //-------------------------------------------------------
+  // Undocumented features
+  //-------------------------------------------------------
+  /**
+   * @brief insert \c [first,last[ in the triangulation (with dimension 2)
+   * @param first the iterator on the first point to insert
+   * @param last the iterator past the last point to insert
+   *
+   * InputIterator value type must be \c std::pair<Tr::Point,Index>
+   */
+  template <typename InputIterator>
+  void insert_surface_points(InputIterator first, InputIterator last)
+  {
+    while ( first != last )
+    {
+      Vertex_handle vertex = tr_.insert((*first).first);
+      vertex->set_index((*first).second);
+      vertex->set_dimension(2);
+      ++first;
+    }
+  }
+
+  /**
+   * @brief insert \c [first,last[ in the triangulation (with dimension 2 and
+   * index \c default_index)
+   * @param first the iterator on the first point to insert
+   * @param last the iterator past the last point to insert
+   * @param default_index the index to be used to insert points
+   *
+   * InputIterator value type must be \c Tr::Point
+   */
+  template <typename InputIterator>
+  void insert_surface_points(InputIterator first,
+                             InputIterator last,
+                             const Index& default_index)
+  {
+    while ( first != last )
+    {
+      Vertex_handle vertex = tr_.insert(*first);
+      vertex->set_index(default_index);
+      vertex->set_dimension(2);
+      ++first;
+    }
+  }
+
+  /// Swaps this & rhs
+  void swap(Self& rhs)
+  {
+    std::swap(rhs.number_of_facets_, number_of_facets_);
+    tr_.swap(rhs.tr_);
+    std::swap(rhs.number_of_cells_, number_of_cells_);
+  }
+
+  /// Returns bbox
+  Bbox_3 bbox() const;
+
+  void clear_manifold_info() {
+    edge_facet_counter_.clear();
+    manifold_info_initialized_ = false;
+  }
+
+private:
+  void init_manifold_info() const {
+    for(typename Tr::All_vertices_iterator
+          vit = triangulation().finite_vertices_begin(),
+          end = triangulation().finite_vertices_end();
+        vit != end; ++vit)
+    {
+      vit->set_c2t3_cache(0, -1);
+    }
+
+    edge_facet_counter_.clear();
+
+    for(typename Tr::Finite_facets_iterator
+          fit = triangulation().finite_facets_begin(),
+          end = triangulation().finite_facets_end();
+        fit != end; ++fit)
+    {
+      if ( is_in_complex(*fit) ) {
+        const Cell_handle cell = fit->first;
+        const int i = fit->second;
+        for(int j = 0; j < 3; ++j)
+        {
+          const int edge_index_va = tr_.vertex_triple_index(i, j);
+          const int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j+1));
+          const Vertex_handle edge_va = cell->vertex(edge_index_va);
+          const Vertex_handle edge_vb = cell->vertex(edge_index_vb);
+          ++edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)];
+
+          const std::size_t n = edge_va->cached_number_of_incident_facets();
+          edge_va->set_c2t3_cache(n+1, -1);
+        }
+      }
+    }
+    manifold_info_initialized_ = true;
+  }
+
+  /// Extract the subset `F` of facets of the complex incident to `v` and
+  /// return the number of connected component of the adjacency graph of `F`.
+  std::size_t union_find_of_incident_facets(const Vertex_handle v) const
+  {
+    if( v->is_c2t3_cache_valid() )
+    {
+      const std::size_t n = v->cached_number_of_components();
+      if(n != std::size_t(-1)) return n;
+    }
+
+    Union_find<Facet> facets;
+    { // fill the union find
+      std::vector<Facet> non_filtered_facets;
+      tr_.incident_facets(v, std::back_inserter(non_filtered_facets));
+
+      for(typename std::vector<Facet>::iterator
+            fit = non_filtered_facets.begin(),
+            end = non_filtered_facets.end();
+          fit != end; ++fit)
+      {
+        if(is_in_complex(*fit)) facets.push_back(*fit);
+      }
+    }
+
+    typedef std::map<Vertex_handle,
+                     typename Union_find<Facet>::handle> Vertex_set_map;
+    typedef typename Vertex_set_map::iterator Vertex_set_map_iterator;
+
+    Vertex_set_map vsmap;
+
+    for(typename Union_find<Facet>::iterator
+          it = facets.begin(), end = facets.end();
+        it != end; ++it)
+    {
+      const Cell_handle& ch = (*it).first;
+      const int& i = (*it).second;
+      for(int j=0; j < 3; ++j) {
+	const Vertex_handle w = ch->vertex(tr_.vertex_triple_index(i,j));
+	if(w != v){
+	  Vertex_set_map_iterator vsm_it = vsmap.find(w);
+	  if(vsm_it != vsmap.end()){
+	    facets.unify_sets(vsm_it->second, it);
+	  } else {
+	    vsmap.insert(std::make_pair(w, it));
+	  }
+	}
+      }
+    }
+    const std::size_t nb_components = facets.number_of_sets();
+
+    const std::size_t n = v->cached_number_of_incident_facets();
+    v->set_c2t3_cache(n, nb_components);
+    return nb_components;
+  }
+  
+  //-------------------------------------------------------
+  // Traversal
+  //-------------------------------------------------------
+private:
+  typedef Mesh_3::internal::Iterator_not_in_complex<Self> Iterator_not_in_complex;
+
+  class Facet_iterator_not_in_complex
+  {
+    const Self* c3t3_;
+    Surface_patch_index index_; //need by SWIG: should be const Surface_patch_index
+  public:
+    Facet_iterator_not_in_complex(){} //need by SWIG
+    Facet_iterator_not_in_complex(const Self& c3t3,
+                                  const Surface_patch_index& index = Surface_patch_index())
+      : c3t3_(&c3t3)
+      , index_(index) { }
+
+    template <typename Iterator>
+    bool operator()(Iterator it) const
+    {
+      if ( index_ == Surface_patch_index() ) { return ! c3t3_->is_in_complex(*it); }
+      else { return !( c3t3_->surface_patch_index(*it) == index_ );  }
+    }
+  };
+
+  /**
+   * @class Cell_not_in_complex
+   * @brief A class to filter cells which do not belong to the complex
+   */
+  class Cell_not_in_complex
+  {
+    const Self* r_self_;
+    Subdomain_index index_;//needed by SWIG, should be const Subdomain_index
+  public:
+    Cell_not_in_complex(){}//needed by SWIG
+    Cell_not_in_complex(const Self& self,
+                        const Subdomain_index& index = Subdomain_index())
+      : r_self_(&self)
+      , index_(index) { }
+
+    bool operator()(Cell_handle ch) const
+    {
+      if ( index_ == Subdomain_index() ) { return !r_self_->is_in_complex(ch); }
+      else { return !( r_self_->subdomain_index(ch) == index_ ); }
+    }
+  }; // end class Cell_not_in_complex
+
+public:
+  /// Iterator type to visit the facets of the 2D complex.
+  typedef Filter_iterator<
+    typename Triangulation::Finite_facets_iterator,
+    Facet_iterator_not_in_complex >               Facets_in_complex_iterator;
+
+  /// Returns a Facets_in_complex_iterator to the first facet of the 2D complex
+  Facets_in_complex_iterator facets_in_complex_begin() const
+  {
+    return CGAL::filter_iterator(tr_.finite_facets_end(),
+                                 Facet_iterator_not_in_complex(*this),
+                                 tr_.finite_facets_begin());
+  }
+
+  /// Returns a Facets_in_complex_iterator to the first facet of the 2D complex
+  Facets_in_complex_iterator
+  facets_in_complex_begin(const Surface_patch_index& index) const
+  {
+    return CGAL::filter_iterator(tr_.finite_facets_end(),
+                                 Facet_iterator_not_in_complex(*this,index),
+                                 tr_.finite_facets_begin());
+  }
+
+  /// Returns past-the-end iterator on facet of the 2D complex
+  Facets_in_complex_iterator facets_in_complex_end(const Surface_patch_index = Surface_patch_index()) const
+  {
+    return CGAL::filter_iterator(tr_.finite_facets_end(),
+                                 Facet_iterator_not_in_complex(*this));
+  }
+
+  /**
+   * @class Cells_in_complex_iterator
+   * @brief Iterator type to visit the cells of triangulation belonging
+   * to the 3D complex
+   *
+   * This class is usefull to ensure that Cells_in_complex_iterator is convertible
+   * to Cell_handle
+   */
+  class Cells_in_complex_iterator :
+    public Filter_iterator<typename Triangulation::Finite_cells_iterator,
+                           Cell_not_in_complex>
+  {
+  private:
+    typedef typename Triangulation::Finite_cells_iterator Tr_iterator;
+    typedef Filter_iterator<typename Triangulation::Finite_cells_iterator,
+                            Cell_not_in_complex> Base;
+    typedef Cells_in_complex_iterator Self;
+
+  public:
+    Cells_in_complex_iterator() : Base() { }
+    Cells_in_complex_iterator(Base i) : Base(i) { }
+
+    Self& operator++() { Base::operator++(); return *this; }
+    Self& operator--() { Base::operator--(); return *this; }
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+
+    operator Cell_handle() const { return Cell_handle(this->base()); }
+  }; // end class Cells_in_complex_iterator
+
+
+  /// Returns a \c Cells_in_complex_iterator to the first cell of the 3D complex
+  Cells_in_complex_iterator cells_in_complex_begin() const
+  {
+    return CGAL::filter_iterator(tr_.finite_cells_end(),
+                                 Cell_not_in_complex(*this),
+                                 tr_.finite_cells_begin());
+  }
+
+  /// Returns a \c Cells_in_complex_iterator to the first cell of the 3D complex
+  Cells_in_complex_iterator
+  cells_in_complex_begin(const Subdomain_index& index) const
+  {
+    return CGAL::filter_iterator(tr_.finite_cells_end(),
+                                 Cell_not_in_complex(*this,index),
+                                 tr_.finite_cells_begin());
+  }
+
+  /// Returns the past-the-end iterator for the cells of the 3D complex
+  Cells_in_complex_iterator cells_in_complex_end() const
+  {
+    return CGAL::filter_iterator(tr_.finite_cells_end(),
+                                 Cell_not_in_complex(*this));
+  }
+
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+
+  void set_surface_index(const Facet& f, const Surface_index& index)
+  { set_surface_patch_index(f, index); }
+
+  void set_surface_index(const Cell_handle& c, const int i, const Surface_index& index)
+  { set_surface_patch_index(c,i,index); }
+
+  Surface_index surface_index(const Facet& f) const
+  { return surface_patch_index(f); }
+
+  Surface_index surface_index(const Cell_handle& c, const int i) const
+  { return surface_patch_index(c,i); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+
+#ifndef CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS
+  typedef Facets_in_complex_iterator  Facet_iterator;
+  typedef Cells_in_complex_iterator   Cell_iterator;
+
+  Facet_iterator facets_begin() const
+  { return facets_in_complex_begin(); }
+
+  Facet_iterator facets_end() const
+  { return facets_in_complex_end(); }
+
+  Cell_iterator cells_begin() const
+  { return cells_in_complex_begin(); }
+
+  Cell_iterator cells_end() const
+  { return cells_in_complex_end(); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+  size_type number_of_facets() const
+  { return number_of_facets_in_complex(); }
+
+  size_type number_of_cells() const
+  { return number_of_cells_in_complex(); }
+
+public:
+  template <typename Tr2, typename Ct2>
+  friend
+  std::istream &
+  operator>> (std::istream& is,
+              Mesh_complex_3_in_triangulation_3_base<Tr2,Ct2> &c3t3);
+
+  static
+  std::string io_signature()
+  {
+    return
+      Get_io_signature<Tr>()();
+  }
+private:
+
+  // Sequential: non-atomic
+  // "dummy" is here to allow the specialization (see below)
+  // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6
+  template<typename Concurrency_tag2, typename dummy = void>
+  struct Number_of_elements
+  {
+    typedef size_type type;
+  };
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel: atomic
+  template<typename dummy>
+  struct Number_of_elements<Parallel_tag, dummy>
+  {
+    typedef tbb::atomic<size_type> type;
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+  // Private date members
+  Triangulation tr_;
+
+  typedef typename Base::Pair_of_vertices Pair_of_vertices;
+  typedef std::map<Pair_of_vertices, int> Edge_facet_counter;
+
+  mutable Edge_facet_counter edge_facet_counter_;
+
+  typename Number_of_elements<Concurrency_tag>::type number_of_facets_;
+  typename Number_of_elements<Concurrency_tag>::type number_of_cells_;
+
+  mutable bool manifold_info_initialized_;
+};  // end class Mesh_complex_3_in_triangulation_3_base
+
+
+template <typename Tr, typename Ct>
+void
+Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::add_to_complex(
+    const Cell_handle& cell,
+    const int i,
+    const Surface_patch_index& index)
+{
+  CGAL_precondition( !( index == Surface_patch_index() ) );
+
+  if ( ! is_in_complex(cell,i) )
+  {
+    Facet mirror = tr_.mirror_facet(std::make_pair(cell,i));
+    set_surface_patch_index(cell, i, index);
+    set_surface_patch_index(mirror.first, mirror.second, index);
+    ++number_of_facets_;
+    if(manifold_info_initialized_) {
+      for(int j = 0; j < 3; ++j)
+      {
+        int edge_index_va = tr_.vertex_triple_index(i, j);
+        int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j+1));
+        Vertex_handle edge_va = cell->vertex(edge_index_va);
+        Vertex_handle edge_vb = cell->vertex(edge_index_vb);
+        ++edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)];
+
+        const std::size_t n = edge_va->cached_number_of_incident_facets();
+        const std::size_t m = edge_va->cached_number_of_components();
+        edge_va->set_c2t3_cache(n+1, m);
+      }
+      const int dimension_plus_1 = tr_.dimension() + 1;
+      // update c2t3 for vertices of f
+      for (int j = 0; j < dimension_plus_1; j++) {
+        if (j != i) {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+          if(cell->vertex(j)->is_c2t3_cache_valid())
+            std::cerr << "(" << cell->vertex(j)->point() << ")->invalidate_c2t3_cache()\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+          cell->vertex(j)->invalidate_c2t3_cache();
+        }
+      }
+    }
+  }
+}
+
+
+template <typename Tr, typename Ct>
+void
+Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::remove_from_complex(const Facet& facet)
+{
+  if ( is_in_complex(facet) )
+  {
+    Facet mirror = tr_.mirror_facet(facet);
+    set_surface_patch_index(facet.first, facet.second, Surface_patch_index());
+    set_surface_patch_index(mirror.first, mirror.second, Surface_patch_index());
+    --number_of_facets_;
+    if(manifold_info_initialized_) {
+      const Cell_handle cell = facet.first;
+      const int i = facet.second;
+      for(int j = 0; j < 3; ++j)
+      {
+        const int edge_index_va = tr_.vertex_triple_index(i, j);
+        const int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j+1));
+        const Vertex_handle edge_va = cell->vertex(edge_index_va);
+        const Vertex_handle edge_vb = cell->vertex(edge_index_vb);
+        --edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)];
+
+        const std::size_t n = edge_va->cached_number_of_incident_facets();
+        CGAL_assertion(n>0);
+        const std::size_t m = edge_va->cached_number_of_components();
+        edge_va->set_c2t3_cache(n-1, m);
+      }
+      const int dimension_plus_1 = tr_.dimension() + 1;
+      // update c2t3 for vertices of f
+      for (int j = 0; j < dimension_plus_1; j++) {
+        if (j != facet.second) {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+          if(cell->vertex(j)->is_c2t3_cache_valid())
+            std::cerr << "(" << cell->vertex(j)->point() << ")->invalidate_c2t3_cache()\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+          cell->vertex(j)->invalidate_c2t3_cache();
+        }
+      }
+    }
+  }
+}
+
+
+// -----------------------------------
+// Undocumented
+// -----------------------------------
+template <typename Tr, typename Ct>
+Bbox_3
+Mesh_complex_3_in_triangulation_3_base<Tr,Ct>::
+bbox() const
+{
+  if ( 0 == triangulation().number_of_vertices() )
+  {
+    return Bbox_3();
+  }
+
+  typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
+  Bbox_3 result = (vit++)->point().bbox();
+
+  for(typename Tr::Finite_vertices_iterator end = tr_.finite_vertices_end();
+      vit != end ; ++vit)
+  {
+    result = result + vit->point().bbox();
+  }
+
+  return result;
+}
+
+template <typename Tr, typename Ct>
+std::ostream &
+operator<< (std::ostream& os,
+            const Mesh_complex_3_in_triangulation_3_base<Tr,Ct> &c3t3)
+{
+  return os << c3t3.triangulation();
+}
+
+
+template <typename Tr, typename Ct>
+std::istream &
+operator>> (std::istream& is,
+            Mesh_complex_3_in_triangulation_3_base<Tr,Ct> &c3t3)
+{
+  c3t3.clear();
+  is >> c3t3.triangulation();
+
+  if(!is) {
+    c3t3.clear();
+    return is;
+  }
+
+  for(typename Tr::Finite_facets_iterator
+        fit = c3t3.triangulation().finite_facets_begin(),
+        end = c3t3.triangulation().finite_facets_end();
+      fit != end; ++fit)
+  {
+    if ( c3t3.is_in_complex(*fit) ) {
+      ++c3t3.number_of_facets_;
+    }
+  }
+
+  for(typename Tr::Finite_cells_iterator
+        cit = c3t3.triangulation().finite_cells_begin(),
+        end = c3t3.triangulation().finite_cells_end();
+      cit != end; ++cit)
+  {
+    if ( c3t3.is_in_complex(cit) ) {
+      ++c3t3.number_of_cells_;
+    }
+  }
+
+  return is;
+}
+
+}  // end namespace Mesh_3
+}  // end namespace CGAL
+
+#endif // CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_global_optimizer.h
new file mode 100644
index 0000000..ee280da
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_global_optimizer.h
@@ -0,0 +1,1158 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description :
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
+#define CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Real_timer.h>
+#include <CGAL/Mesh_3/C3T3_helpers.h>
+#include <CGAL/Mesh_3/Triangulation_helpers.h>
+#include <CGAL/Origin.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/Null_global_optimizer_visitor.h>
+#include <CGAL/Prevent_deref.h>
+#include <CGAL/tuple.h>
+
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+
+#ifdef CGAL_MESH_3_PROFILING
+  #include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#include <vector>
+#include <list>
+#include <limits>
+
+#include <boost/type_traits/is_convertible.hpp>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/atomic.h>
+# include <tbb/parallel_do.h>
+# include <tbb/concurrent_vector.h>
+#endif
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+
+/************************************************
+// Class Mesh_global_optimizer_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Tr, typename Concurrency_tag>
+class Mesh_global_optimizer_base
+{
+protected:
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+
+  typedef std::vector<cpp11::tuple<
+    typename Tr::Vertex_handle, typename Tr::Point, FT> >   Moves_vector;
+  typedef unsigned int                                      Nb_frozen_points_type ;
+
+  Mesh_global_optimizer_base(const Bbox_3 &, int)
+    : big_moves_size_(0) {}
+
+  void update_big_moves(const FT& new_sq_move)
+  {
+    if (big_moves_.size() < big_moves_size_ )
+      big_moves_.insert(new_sq_move);
+    else
+    {
+      FT smallest = *(big_moves_.begin());
+      if( new_sq_move > smallest )
+      {
+        big_moves_.erase(big_moves_.begin());
+        big_moves_.insert(new_sq_move);
+      }
+    }
+  }
+
+  void clear_big_moves()
+  {
+    big_moves_.clear();
+  }
+
+  Lock_data_structure *get_lock_data_structure() { return 0; }
+  void unlock_all_elements() {}
+
+protected:
+  std::size_t big_moves_size_;
+  std::multiset<FT> big_moves_;
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Tr>
+class Mesh_global_optimizer_base<Tr, Parallel_tag>
+{
+protected:
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+  typedef tbb::concurrent_vector<cpp11::tuple<
+    typename Tr::Vertex_handle, typename Tr::Point, FT> >   Moves_vector;
+  typedef tbb::atomic<unsigned int>                         Nb_frozen_points_type ;
+
+  Mesh_global_optimizer_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
+    : big_moves_size_(0)
+    , m_lock_ds(bbox, num_grid_cells_per_axis)
+  {
+    big_moves_current_size_ = 0;
+    big_moves_smallest_ = std::numeric_limits<FT>::max();
+  }
+
+  void update_big_moves(const FT& new_sq_move)
+  {
+    if (++big_moves_current_size_ <= big_moves_size_ )
+    {
+      tbb::mutex::scoped_lock lock(m_big_moves_mutex);
+      typename std::multiset<FT>::const_iterator it = big_moves_.insert(new_sq_move);
+
+      // New smallest move of all big moves?
+      if (it == big_moves_.begin())
+        big_moves_smallest_ = new_sq_move;
+    }
+    else
+    {
+      --big_moves_current_size_;
+
+      if( new_sq_move > big_moves_smallest_ )
+      {
+        tbb::mutex::scoped_lock lock(m_big_moves_mutex);
+        // Test it again since it may have been modified by another
+        // thread in the meantime
+        if( new_sq_move > big_moves_smallest_ )
+        {
+          big_moves_.erase(big_moves_.begin());
+          typename std::multiset<FT>::const_iterator it = big_moves_.insert(new_sq_move);
+
+          // New smallest move of all big moves?
+          if (it == big_moves_.begin())
+            big_moves_smallest_ = new_sq_move;
+        }
+      }
+    }
+  }
+
+  void clear_big_moves()
+  {
+    big_moves_current_size_ = 0;
+    big_moves_smallest_ = std::numeric_limits<FT>::max();
+    big_moves_.clear();
+  }
+
+  Lock_data_structure *get_lock_data_structure()
+  {
+    return &m_lock_ds;
+  }
+
+  void unlock_all_elements()
+  {
+    m_lock_ds.unlock_all_points_locked_by_this_thread();
+  }
+
+public:
+
+protected:
+  tbb::atomic<std::size_t>  big_moves_current_size_;
+  tbb::atomic<FT>           big_moves_smallest_;
+  std::size_t               big_moves_size_;
+  std::multiset<FT>         big_moves_;
+  tbb::mutex                m_big_moves_mutex;
+
+  /// Lock data structure
+  Lock_data_structure m_lock_ds;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+
+
+
+/************************************************
+// Class Mesh_global_optimizer
+************************************************/
+
+template <typename C3T3,
+          typename MeshDomain,
+          typename MoveFunction,
+          typename Visitor_ = Null_global_optimizer_visitor<C3T3> >
+class Mesh_global_optimizer
+: public Mesh_global_optimizer_base<typename C3T3::Triangulation, typename C3T3::Concurrency_tag>
+{
+  // Types
+  typedef typename C3T3::Concurrency_tag Concurrency_tag;
+
+  typedef Mesh_global_optimizer<C3T3, MeshDomain, MoveFunction, Visitor_> Self;
+  typedef Mesh_global_optimizer_base<
+    typename C3T3::Triangulation, typename C3T3::Concurrency_tag>         Base;
+
+  using Base::get_lock_data_structure;
+  using Base::big_moves_;
+  using Base::big_moves_size_;
+
+  typedef typename C3T3::Triangulation  Tr;
+  typedef typename Tr::Geom_traits      Gt;
+
+  typedef typename Tr::Point            Point_3;
+  typedef typename Tr::Cell_handle      Cell_handle;
+  typedef typename Tr::Vertex_handle    Vertex_handle;
+  typedef typename Tr::Edge             Edge;
+  typedef typename Tr::Vertex           Vertex;
+
+  typedef typename Gt::FT               FT;
+  typedef typename Gt::Vector_3         Vector_3;
+
+  typedef typename std::vector<Cell_handle>                 Cell_vector;
+  typedef typename std::vector<Vertex_handle>               Vertex_vector;
+  typedef typename std::set<Vertex_handle>                  Vertex_set;
+  typedef typename Base::Moves_vector                       Moves_vector;
+  typedef typename Base::Nb_frozen_points_type              Nb_frozen_points_type;
+
+#ifdef CGAL_INTRUSIVE_LIST
+  typedef Intrusive_list<Cell_handle>   Outdated_cell_set;
+#else
+  typedef std::set<Cell_handle>         Outdated_cell_set;
+#endif //CGAL_INTRUSIVE_LIST
+
+#ifdef CGAL_INTRUSIVE_LIST
+  typedef Intrusive_list<Vertex_handle>  Moving_vertices_set;
+#else
+  typedef Vertex_set Moving_vertices_set;
+#endif
+
+  typedef typename MoveFunction::Sizing_field Sizing_field;
+
+  typedef class C3T3_helpers<C3T3,MeshDomain> C3T3_helpers;
+
+  // Visitor class
+  // Should define:
+  //  - after_compute_moves()
+  //  - after_move_points()
+  //  - after_rebuild_restricted_delaunay()
+  //  - end_of_iteration(int iteration_number)
+  typedef Visitor_ Visitor;
+
+public:
+  /**
+   * Constructor
+   */
+  Mesh_global_optimizer(C3T3& c3t3,
+                        const MeshDomain& domain,
+                        const FT& freeze_ratio,
+                        const bool do_freeze,
+                        const FT& convergence_ratio,
+                        const MoveFunction move_function = MoveFunction());
+
+  /**
+   * Launch optimization process
+   *
+   * @param nb_interations maximum number of iterations
+   */
+  Mesh_optimization_return_code operator()(int nb_iterations,
+                                           Visitor v = Visitor());
+
+  /**
+  * collects all vertices of the triangulation in moving_vertices
+  * (even the frozen ones)
+  */
+  void collect_all_vertices(Moving_vertices_set& moving_vertices);
+
+  /// Time accessors
+  void set_time_limit(double time) { time_limit_ = time; }
+  double time_limit() const { return time_limit_; }
+
+private:
+  /**
+   * Returns moves for vertices of set \c moving_vertices
+   */
+  Moves_vector compute_moves(Moving_vertices_set& moving_vertices)
+{
+  typename Gt::Construct_translated_point_3 translate =
+    Gt().construct_translated_point_3_object();
+
+  // Store new position of points which have to move
+  Moves_vector moves;
+
+
+  moves.reserve(moving_vertices.size());
+
+  // reset worst_move list
+  this->clear_big_moves();
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Computing moves...";
+  WallClockTimer t;
+#endif
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tbb::concurrent_vector<Vertex_handle> vertices_not_moving_any_more;
+
+    // Get move for each moving vertex
+    tbb::parallel_do(
+      moving_vertices.begin(), moving_vertices.end(),
+      Compute_move<Self, Sizing_field, Moves_vector,
+                   typename Gt::Construct_translated_point_3>(
+        *this, sizing_field_, moves, do_freeze_, vertices_not_moving_any_more,
+        translate)
+    );
+
+    typename tbb::concurrent_vector<Vertex_handle>::const_iterator it
+      = vertices_not_moving_any_more.begin();
+    typename tbb::concurrent_vector<Vertex_handle>::const_iterator it_end
+      = vertices_not_moving_any_more.end();
+    for ( ; it != it_end ; ++it)
+    {
+      moving_vertices.erase(*it);
+    }
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+    // Get move for each moving vertex
+    typename Moving_vertices_set::iterator vit = moving_vertices.begin();
+    for ( ; vit != moving_vertices.end() ; )
+    {
+      Vertex_handle oldv = *vit;
+      ++vit;
+      Vector_3 move = compute_move(oldv);
+
+      if ( CGAL::NULL_VECTOR != move )
+      {
+        Point_3 new_position = translate(oldv->point(),move);
+        FT size = (Sizing_field::is_vertex_update_needed ?
+          sizing_field_(new_position, oldv) : 0);
+        moves.push_back(cpp11::make_tuple(oldv,new_position,size));
+      }
+      else // CGAL::NULL_VECTOR == move
+      {
+        if(do_freeze_)
+          moving_vertices.erase(oldv); // TODO: if non-intrusive,
+                                       // we can optimize since we have the iterator,
+                                       // don't forget to do "vit = mv.erase(vit)" instead ++vit
+      }
+
+      // Stop if time_limit_ is reached
+      if ( is_time_limit_reached() )
+        break;
+    }
+  }
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "done in " << t.elapsed() << " seconds." << std::endl;
+#endif
+
+  return moves;
+}
+
+
+  /**
+   * Returns the move for vertex \c v
+   * warning : this function should be called only on moving vertices
+   *           even for frozen vertices, it could return a non-zero vector
+   */
+  Vector_3 compute_move(const Vertex_handle& v);
+
+  /**
+   * Updates mesh using moves of \c moves vector. Updates moving_vertices with
+   * the new set of moving vertices after the move.
+   */
+  void update_mesh(const Moves_vector& moves,
+                   Moving_vertices_set& moving_vertices,
+                   Visitor& visitor);
+
+  /**
+   * Fill sizing field using sizes (avg circumradius) contained in tr_
+   */
+  void fill_sizing_field();
+
+  /**
+   * Returns true if convergence is reached
+   */
+  bool check_convergence() const;
+
+  /**
+   * Returns the average circumradius length of cells incident to \c v
+   */
+  FT average_circumradius_length(const Vertex_handle& v) const;
+
+  /**
+   * Returns the minimum cicumradius length of cells incident to \c v
+   */
+  FT min_circumradius_sq_length(const Vertex_handle& v, const Cell_vector& incident_cells) const;
+
+  /**
+   * Returns the squared circumradius length of cell \c cell
+   */
+  FT sq_circumradius_length(const Cell_handle& cell,
+                            const Vertex_handle& v) const;
+
+  /**
+   * Returns true if time_limit is reached
+   */
+  bool is_time_limit_reached() const
+  {
+    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
+  }
+
+private:
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Functor for compute_moves function
+  template <typename MGO, typename Sizing_field_, typename Moves_vector_,
+            typename CTOP3>
+  class Compute_move
+  {
+    typedef tbb::concurrent_vector<Vertex_handle> Vertex_conc_vector;
+
+    MGO                  & m_mgo;
+    const Sizing_field_  & m_sizing_field;
+    Moves_vector_        & m_moves;
+    bool                   m_do_freeze;
+    Vertex_conc_vector   & m_vertices_not_moving_any_more;
+    const CTOP3          & m_translate;
+
+  public:
+    // Constructor
+    Compute_move(MGO &mgo, 
+                 const Sizing_field_ &sizing_field,
+                 Moves_vector_ &moves,
+                 bool do_freeze,
+                 Vertex_conc_vector & vertices_not_moving_any_more,
+                 const CTOP3 & translate)
+    : m_mgo(mgo),
+      m_sizing_field(sizing_field),
+      m_moves(moves),
+      m_do_freeze(do_freeze),
+      m_vertices_not_moving_any_more(vertices_not_moving_any_more),
+      m_translate(translate)
+    {}
+
+    // Constructor
+    Compute_move(const Compute_move &cm)
+    : m_mgo(cm.m_mgo), 
+      m_sizing_field(cm.m_sizing_field), 
+      m_moves(cm.m_moves),
+      m_do_freeze(cm.m_do_freeze),
+      m_vertices_not_moving_any_more(cm.m_vertices_not_moving_any_more),
+      m_translate(cm.m_translate)
+    {}
+
+    // operator()
+    void operator()(const Vertex_handle& oldv) const
+    {
+      Vector_3 move = m_mgo.compute_move(oldv);
+
+      if ( CGAL::NULL_VECTOR != move )
+      {
+        Point_3 new_position = m_translate(oldv->point(), move);
+        FT size = (MGO::Sizing_field::is_vertex_update_needed ?
+          m_sizing_field(new_position, oldv) : 0);
+        // typedef Triangulation_helpers<typename C3T3::Triangulation> Th;
+        //if( !Th().inside_protecting_balls(tr_, oldv, new_position))
+        //note : this is not happening for Lloyd and ODT so it's commented
+        //       maybe for a new global optimizer it should be de-commented
+        m_moves.push_back(cpp11::make_tuple(oldv, new_position, size));
+      }
+      else // CGAL::NULL_VECTOR == move
+      {
+        if(m_do_freeze)
+        {
+          m_vertices_not_moving_any_more.push_back(oldv);
+        }
+      }
+
+      if ( m_mgo.is_time_limit_reached() )
+        tbb::task::self().cancel_group_execution();
+    }
+  };
+
+  // Functor for fill_sizing_field function
+  template <typename MGO, typename Tr_, typename Local_list_>
+  class Compute_sizing_field_value
+  {
+    MGO                  & m_mgo;
+    Local_list_          & m_local_lists;
+
+  public:
+    // Constructor
+    Compute_sizing_field_value(MGO &mgo, 
+                               Local_list_ & local_lists)
+    : m_mgo(mgo),
+      m_local_lists(local_lists)
+    {}
+
+    // Constructor
+    Compute_sizing_field_value(const Compute_sizing_field_value &csfv)
+    : m_mgo(csfv.m_mgo), 
+      m_local_lists(csfv.m_local_lists)
+    {}
+
+    // operator()
+    void operator()(Vertex& v) const
+    {
+      Vertex_handle vh 
+        = Tr_::Triangulation_data_structure::Vertex_range::s_iterator_to(v);
+      m_local_lists.local().push_back(
+        std::make_pair(v.point(), m_mgo.average_circumradius_length(vh)));
+    }
+  };
+
+  // Functor for update_mesh function
+  template <typename MGO, typename Helper, typename Tr_, typename Moves_vector_,
+            typename Moving_vertices_set_, typename Outdated_cell_set_>
+  class Move_vertex
+  {
+    MGO                                  & m_mgo;
+    const Helper                         & m_helper;
+    const Moves_vector_                  & m_moves;
+    Moving_vertices_set_                 & m_moving_vertices;
+    Outdated_cell_set_                   & m_outdated_cells;
+  
+    typedef typename Tr_::Point            Point_3;
+    typedef typename Tr_::Vertex_handle    Vertex_handle;
+
+  public:
+    // Constructor
+    Move_vertex(MGO &mgo, const Helper &helper, const Moves_vector_ &moves,
+                Moving_vertices_set_ &moving_vertices,
+                Outdated_cell_set_ &outdated_cells)
+    : m_mgo(mgo), m_helper(helper), m_moves(moves), 
+      m_moving_vertices(moving_vertices), m_outdated_cells(outdated_cells)
+    {}
+
+    // Constructor
+    Move_vertex(const Move_vertex &mv)
+    : m_mgo(mv.m_mgo), m_helper(mv.m_helper), m_moves(mv.m_moves),
+      m_moving_vertices(mv.m_moving_vertices),
+      m_outdated_cells(mv.m_outdated_cells)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+      for( size_t i = r.begin() ; i != r.end() ; ++i)
+      {
+        const Vertex_handle& v = cpp11::get<0>(m_moves[i]);
+        const Point_3& new_position = cpp11::get<1>(m_moves[i]);
+        // Get size at new position
+        if ( MGO::Sizing_field::is_vertex_update_needed )
+        {
+          //FT size = sizing_field_(new_position,v);
+          FT size = cpp11::get<2>(m_moves[i]);
+
+          // Move point
+          bool could_lock_zone;
+          Vertex_handle new_v = m_helper.move_point(
+            v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
+          while (could_lock_zone == false)
+          {
+            new_v = m_helper.move_point(
+              v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
+          }
+
+          // Restore size in meshing_info data
+          new_v->set_meshing_info(size);
+        }
+        else // Move point
+        {
+          bool could_lock_zone;
+          do {
+            m_helper.move_point(
+              v, new_position, m_outdated_cells, m_moving_vertices, &could_lock_zone);
+          } while (!could_lock_zone);
+        }
+
+        m_mgo.unlock_all_elements();
+
+        // Stop if time_limit_ is reached, here we can't return without rebuilding
+        // restricted delaunay
+        if ( m_mgo.is_time_limit_reached() )
+        {
+          tbb::task::self().cancel_group_execution();
+          break;
+        }
+      }
+    }
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+  // -----------------------------------
+  // Private data
+  // -----------------------------------
+  C3T3& c3t3_;
+  Tr& tr_;
+  const MeshDomain& domain_;
+  FT sq_freeze_ratio_;
+  FT convergence_ratio_;
+  C3T3_helpers helper_;
+  MoveFunction move_function_;
+  Sizing_field sizing_field_;
+  double time_limit_;
+  CGAL::Real_timer running_time_;
+
+  bool do_freeze_;
+  mutable Nb_frozen_points_type nb_frozen_points_;
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  mutable FT sum_moves_;
+#endif
+};
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+Mesh_global_optimizer(C3T3& c3t3,
+                      const Md& domain,
+                      const FT& freeze_ratio,
+                      const bool do_freeze,
+                      const FT& convergence_ratio,
+                      const Mf move_function)
+: Base(c3t3.bbox(),
+       Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
+, c3t3_(c3t3)
+, tr_(c3t3_.triangulation())
+, domain_(domain)
+, sq_freeze_ratio_(freeze_ratio*freeze_ratio)
+, convergence_ratio_(convergence_ratio)
+, helper_(c3t3_,domain_, get_lock_data_structure())
+, move_function_(move_function)
+, sizing_field_(c3t3.triangulation())
+, time_limit_(-1)
+, running_time_()
+
+, do_freeze_(do_freeze)
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+, sum_moves_(0)
+#endif // CGAL_MESH_3_OPTIMIZER_VERBOSE
+{
+  nb_frozen_points_ = 0; // We put it here in case it's an "atomic"
+
+  // If we're multi-thread
+  tr_.set_lock_data_structure(get_lock_data_structure());
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  std::cerr << "Fill sizing field...";
+  CGAL::Real_timer timer;
+  timer.start();
+#endif
+
+  fill_sizing_field();
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  std::cerr << "done (" << timer.time() << "s)\n";
+#endif
+}
+
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+Mesh_optimization_return_code
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+operator()(int nb_iterations, Visitor visitor)
+{
+  running_time_.reset();
+  running_time_.start();
+
+#ifdef CGAL_MESH_3_PROFILING
+  WallClockTimer t;
+#endif
+
+  // Fill set containing moving vertices
+  // first, take them all
+#ifdef  CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
+  typedef CGAL::Prevent_deref<typename Tr::Finite_vertices_iterator> It;
+  Moving_vertices_set moving_vertices(It(tr_.finite_vertices_begin()),
+                                      It(tr_.finite_vertices_end()));
+#else
+  Moving_vertices_set moving_vertices;
+  collect_all_vertices(moving_vertices);
+#endif
+
+  std::size_t initial_vertices_nb = moving_vertices.size();
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  double step_begin = running_time_.time();
+  std::cerr << "Running " << Mf::name() << "-smoothing ("
+    << initial_vertices_nb << " vertices)" << std::endl;
+#endif //CGAL_MESH_3_OPTIMIZER_VERBOSE
+
+  // Initialize big moves (stores the largest moves)
+  this->clear_big_moves();
+  big_moves_size_ =
+    (std::max)(std::size_t(1), std::size_t(moving_vertices.size()/500));
+
+  std::size_t nb_vertices_moved = -1;
+  bool convergence_stop = false;
+
+  // Iterate
+  int i = -1;
+  while ( ++i < nb_iterations && ! is_time_limit_reached() )
+  {
+    if(!do_freeze_)
+      nb_frozen_points_ = 0;
+    else
+      nb_vertices_moved = moving_vertices.size();
+
+    // Compute move for each vertex
+    Moves_vector moves = compute_moves(moving_vertices);
+    visitor.after_compute_moves();
+
+    //Pb with Freeze : sometimes a few vertices continue moving indefinitely
+    //if the nb of moving vertices is < 1% of total nb AND does not decrease
+    if(do_freeze_
+      && nb_vertices_moved < 0.005 * initial_vertices_nb
+      && nb_vertices_moved == moving_vertices.size())
+    {
+      // we should stop because we are
+      // probably entering an infinite instable loop
+      convergence_stop = true;
+      break;
+    }
+
+    // Stop if time_limit is reached
+    if ( is_time_limit_reached() )
+      break;
+
+    // Update mesh with those moves
+    update_mesh(moves, moving_vertices, visitor);
+    visitor.end_of_iteration(i);
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+    std::size_t moving_vertices_size = moving_vertices.size();
+    std::cerr << boost::format("\r             \r"
+      "end iter.%1%, %2% / %3%, last step:%4$.2fs, step avg:%5$.2fs, avg big moves:%6$.3f ")
+    % (i+1)
+    % moving_vertices_size
+    % initial_vertices_nb
+    % (running_time_.time() - step_begin)
+    % (running_time_.time() / (i+1))
+    % sum_moves_;
+    step_begin = running_time_.time();
+#endif
+
+    if (do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
+      break;
+
+    if(check_convergence())
+      break;
+  }
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  std::cerr << std::endl;
+#endif
+
+  running_time_.stop();
+
+#ifdef CGAL_MESH_3_PROFILING
+  double optim_time = t.elapsed();
+# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
+  CGAL_MESH_3_SET_PERFORMANCE_DATA(std::string(Mf::name()) + "_optim_time", optim_time);
+# endif
+#endif
+
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  if ( do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
+    std::cerr << "All vertices frozen" << std::endl;
+  else if ( do_freeze_ && convergence_stop )
+    std::cerr << "Can't improve anymore" << std::endl;
+  else if ( is_time_limit_reached() )
+    std::cerr << "Time limit reached" << std::endl;
+  else if ( check_convergence() )
+    std::cerr << "Convergence reached" << std::endl;
+  else if( i >= nb_iterations )
+    std::cerr << "Max iteration number reached" << std::endl;
+
+  std::cerr << "Total optimization time: " << running_time_.time()
+            << "s" << std::endl << std::endl;
+#endif
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << std::endl << "Total optimization 'wall-clock' time: "
+            << optim_time << "s" << std::endl;
+#endif
+
+  if ( do_freeze_ && nb_frozen_points_ == initial_vertices_nb )
+    return ALL_VERTICES_FROZEN;
+
+  else if ( do_freeze_ && convergence_stop )
+    return CANT_IMPROVE_ANYMORE;
+
+  else if ( is_time_limit_reached() )
+    return TIME_LIMIT_REACHED;
+
+  else if ( check_convergence() )
+    return CONVERGENCE_REACHED;
+
+  return MAX_ITERATION_NUMBER_REACHED;
+}
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+void
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+collect_all_vertices(Moving_vertices_set& moving_vertices)
+{
+  typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
+  for(; vit != tr_.finite_vertices_end(); ++vit )
+    moving_vertices.insert(vit);
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::Vector_3
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+compute_move(const Vertex_handle& v)
+{
+  typename Gt::Compute_squared_length_3 sq_length =
+    Gt().compute_squared_length_3_object();
+
+  typename Gt::Construct_vector_3 vector =
+    Gt().construct_vector_3_object();
+
+  typename Gt::Construct_translated_point_3 translate =
+    Gt().construct_translated_point_3_object();
+
+  Cell_vector incident_cells;
+  incident_cells.reserve(64);
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells));
+  }
+  else
+#endif //CGAL_LINKED_WITH_TBB
+  {
+    tr_.incident_cells(v, std::back_inserter(incident_cells));
+  }
+
+  // Get move from move function
+  Vector_3 move = move_function_(v, incident_cells, c3t3_, sizing_field_);
+
+  // Project surface vertex
+  if ( c3t3_.in_dimension(v) == 2 )
+  {
+    Point_3 new_position = translate(v->point(),move);
+    move = vector(v->point(), helper_.project_on_surface(new_position,v));
+  }
+
+  FT local_sq_size = min_circumradius_sq_length(v, incident_cells);
+  if ( FT(0) == local_sq_size )
+    return CGAL::NULL_VECTOR;
+
+  FT local_move_sq_ratio = sq_length(move) / local_sq_size;
+
+  // Move point only if displacement is big enough w.r.t local size
+  if ( local_move_sq_ratio < sq_freeze_ratio_ )
+  {
+    nb_frozen_points_++;
+    return CGAL::NULL_VECTOR;
+  }
+
+  // Update big moves
+  this->update_big_moves(local_move_sq_ratio);
+
+  return move;
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+void
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+update_mesh(const Moves_vector& moves,
+            Moving_vertices_set& moving_vertices,
+            Visitor& visitor)
+{
+  // Cells which have to be updated
+  Outdated_cell_set outdated_cells;
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Moving vertices...";
+  WallClockTimer t;
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    // Apply moves in triangulation
+    tbb::parallel_for(tbb::blocked_range<size_t>(0, moves.size()),
+      Move_vertex<
+        Self, C3T3_helpers, Tr, Moves_vector,
+        Moving_vertices_set, Outdated_cell_set>(
+          *this, helper_, moves, moving_vertices, outdated_cells)
+    );
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+    // Apply moves in triangulation
+    for ( typename Moves_vector::const_iterator it = moves.begin() ;
+         it != moves.end() ;
+         ++it )
+    {
+      const Vertex_handle& v = cpp11::get<0>(*it);
+      const Point_3& new_position = cpp11::get<1>(*it);
+      // Get size at new position
+      if ( Sizing_field::is_vertex_update_needed )
+      {
+        //FT size = sizing_field_(new_position,v);
+        FT size = cpp11::get<2>(*it);
+
+        // Move point
+        Vertex_handle new_v = helper_.move_point(v, new_position, outdated_cells, moving_vertices);
+
+        // Restore size in meshing_info data
+        new_v->set_meshing_info(size);
+      }
+      else // Move point
+      {
+        helper_.move_point(v, new_position, outdated_cells, moving_vertices);
+      }
+
+      // Stop if time_limit_ is reached, here we can't return without rebuilding
+      // restricted delaunay
+      if ( is_time_limit_reached() )
+        break;
+    }
+  }
+
+
+  visitor.after_move_points();
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "done in " << t.elapsed() << " seconds." << std::endl;
+#endif
+
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Updating C3T3 (rebuilding restricted Delaunay)...";
+  t.reset();
+#endif
+
+  // Update c3t3
+#ifdef CGAL_INTRUSIVE_LIST
+  // AF:  rebuild_restricted_delaunay does more cell insertion/removal
+  //      which clashes with our inplace list
+  //      That's why we hand it in, and call clear() when we no longer need it
+  helper_.rebuild_restricted_delaunay(outdated_cells,
+                                      moving_vertices);
+#else
+  helper_.rebuild_restricted_delaunay(outdated_cells.begin(),
+                                      outdated_cells.end(),
+                                      moving_vertices);
+#endif
+
+  visitor.after_rebuild_restricted_delaunay();
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Updating C3T3 done in " << t.elapsed() << " seconds." << std::endl;
+#endif
+
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+void
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+fill_sizing_field()
+{
+  std::map<Point_3,FT> value_map;
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    typedef tbb::enumerable_thread_specific<
+      std::vector< std::pair<Point_3, FT> > > Local_list;
+    Local_list local_lists;
+
+    tbb::parallel_do(
+      tr_.finite_vertices_begin(), tr_.finite_vertices_end(),
+      Compute_sizing_field_value<Self, Tr, Local_list>(*this, local_lists)
+    );
+
+    for(typename Local_list::iterator it_list = local_lists.begin() ;
+          it_list != local_lists.end() ;
+          ++it_list )
+    {
+      value_map.insert(it_list->begin(), it_list->end());
+    }
+  }
+  else
+#endif //CGAL_LINKED_WITH_TBB
+  {
+    // Fill map with local size
+    for(typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
+        vit != tr_.finite_vertices_end();
+        ++vit)
+    {
+      value_map.insert(std::make_pair(vit->point(),
+                                      average_circumradius_length(vit)));
+    }
+  }
+
+  // fill sizing field
+  sizing_field_.fill(value_map);
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+bool
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+check_convergence() const
+{
+  FT sum(0);
+  for( typename std::multiset<FT>::const_iterator
+       it = big_moves_.begin(), end = big_moves_.end() ; it != end ; ++it )
+  {
+    sum += CGAL::sqrt(*it);
+  }
+
+  FT average_move = sum/big_moves_size_;/*even if set is not full, divide*/
+       /*by max size so that if only 1 point moves, it goes to 0*/
+#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE
+  sum_moves_ = average_move;
+#endif
+
+  return ( average_move < convergence_ratio_ );
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+average_circumradius_length(const Vertex_handle& v) const
+{
+  Cell_vector incident_cells;
+  incident_cells.reserve(64);
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells));
+  }
+  else
+#endif //CGAL_LINKED_WITH_TBB
+  {
+    tr_.incident_cells(v, std::back_inserter(incident_cells));
+  }
+
+  FT sum_len (0);
+  unsigned int nb = 0;
+
+  for ( typename Cell_vector::iterator cit = incident_cells.begin() ;
+       cit != incident_cells.end() ;
+       ++cit)
+  {
+    if ( c3t3_.is_in_complex(*cit) )
+    {
+      sum_len += CGAL::sqrt(sq_circumradius_length(*cit,v));
+      ++nb;
+    }
+  }
+
+  // nb == 0 could happen if there is an isolated point.
+  if ( 0 != nb )
+  {
+    return sum_len/nb;
+  }
+  else
+  {
+    // Use outside cells to compute size of point
+    for ( typename Cell_vector::iterator cit = incident_cells.begin() ;
+         cit != incident_cells.end() ;
+         ++cit)
+    {
+      if ( !tr_.is_infinite(*cit) )
+      {
+        sum_len += CGAL::sqrt(sq_circumradius_length(*cit,v));
+        ++nb;
+      }
+    }
+
+    CGAL_assertion(nb!=0);
+    CGAL_assertion(sum_len!=0);
+    return sum_len/nb;
+  }
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+min_circumradius_sq_length(const Vertex_handle& v, const Cell_vector& incident_cells) const
+{
+  // Get first cell sq_circumradius_length
+  typename Cell_vector::const_iterator cit = incident_cells.begin();
+  while ( incident_cells.end() != cit && !c3t3_.is_in_complex(*cit) ) { ++cit; }
+
+  // if vertex is isolated ...
+  if ( incident_cells.end() == cit )
+    return FT(0);
+
+  // Initialize min
+  FT min_sq_len = sq_circumradius_length(*cit++,v);
+
+  // Find the minimum value
+  for ( ; cit != incident_cells.end() ; ++cit )
+  {
+    if ( !c3t3_.is_in_complex(*cit) )
+      continue;
+
+    min_sq_len = (std::min)(min_sq_len,sq_circumradius_length(*cit,v));
+  }
+
+  return min_sq_len;
+}
+
+
+template <typename C3T3, typename Md, typename Mf, typename V_>
+typename Mesh_global_optimizer<C3T3,Md,Mf,V_>::FT
+Mesh_global_optimizer<C3T3,Md,Mf,V_>::
+sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const
+{
+  typename Gt::Compute_squared_distance_3 sq_distance =
+    Gt().compute_squared_distance_3_object();
+
+  const Point_3 circumcenter = tr_.dual(cell);
+  return ( sq_distance(v->point(), circumcenter) );
+}
+
+} // end namespace Mesh_3
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_sizing_field.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_sizing_field.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_sizing_field.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_sizing_field.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_3.h
new file mode 100644
index 0000000..dfcae79
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_3.h
@@ -0,0 +1,714 @@
+// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Stephane Tayeb, Clement Jamin
+//
+//******************************************************************************
+// File Description :
+// Implements a mesher_3 with two mesher levels : one for facets and one for
+// tets.
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_MESHER_3_H
+#define CGAL_MESH_3_MESHER_3_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Mesh_3/Dump_c3t3.h>
+
+#include<CGAL/Mesh_3/Refine_facets_3.h>
+#include<CGAL/Mesh_3/Refine_facets_manifold_base.h>
+#include<CGAL/Mesh_3/Refine_cells_3.h>
+#include <CGAL/Mesh_3/Refine_tets_visitor.h>
+#include <CGAL/Mesher_level_visitors.h>
+#include <CGAL/Kernel_traits.h>
+
+#ifdef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
+#include <CGAL/Surface_mesher/Surface_mesher_visitor.h>
+#endif
+
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+#include <CGAL/Real_timer.h>
+
+#ifdef CGAL_MESH_3_PROFILING
+  #include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+#  if TBB_IMPLEMENT_CPP0X
+#   include <tbb/compat/thread>
+#  else
+#   include <thread>
+#  endif
+#endif
+
+#include <boost/format.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <string>
+
+namespace CGAL {
+namespace Mesh_3 {
+
+/************************************************
+// Class Mesher_3_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Tr, typename Concurrency_tag>
+class Mesher_3_base
+{
+protected:
+  typedef typename Tr::Lock_data_structure Lock_data_structure;
+
+  Mesher_3_base(const Bbox_3 &, int) {}
+
+  Lock_data_structure *get_lock_data_structure() { return 0; }
+  WorksharingDataStructureType *get_worksharing_data_structure() { return 0; }
+  void set_bbox(const Bbox_3 &) {}
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Tr>
+class Mesher_3_base<Tr, Parallel_tag>
+{
+protected:
+  typedef typename Tr::Lock_data_structure Lock_data_structure;
+
+  Mesher_3_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
+  : m_lock_ds(bbox, num_grid_cells_per_axis),
+    m_worksharing_ds(bbox)
+  {}
+
+  Lock_data_structure *get_lock_data_structure()
+  {
+    return &m_lock_ds;
+  }
+  WorksharingDataStructureType *get_worksharing_data_structure()
+  {
+    return &m_worksharing_ds;
+  }
+
+  void set_bbox(const Bbox_3 &bbox)
+  {
+    m_lock_ds.set_bbox(bbox);
+    m_worksharing_ds.set_bbox(bbox);
+  }
+
+  /// Lock data structure
+  Lock_data_structure m_lock_ds;
+  /// Worksharing data structure
+  WorksharingDataStructureType m_worksharing_ds;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+
+/************************************************
+ *
+ * Mesher_3 class
+ *
+ ************************************************/
+
+template<class C3T3, class MeshCriteria, class MeshDomain>
+class Mesher_3
+: public Mesher_3_base<
+    typename C3T3::Triangulation,
+#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+    Sequential_tag
+#else
+    typename C3T3::Concurrency_tag
+#endif
+  >
+{
+public:
+#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+  typedef Sequential_tag                            Concurrency_tag;
+#else
+  typedef typename C3T3::Concurrency_tag            Concurrency_tag;
+#endif
+  typedef typename C3T3::Triangulation              Triangulation;
+  typedef typename Triangulation::Point             Point;
+  typedef typename Kernel_traits<Point>::Kernel     Kernel;
+  typedef typename Kernel::Vector_3                 Vector;
+  typedef typename MeshDomain::Index                Index;
+
+  // Self
+  typedef Mesher_3<C3T3, MeshCriteria, MeshDomain>      Self;
+#ifdef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+  typedef Mesher_3_base<Triangulation, Sequential_tag> Base;
+#else
+  typedef Mesher_3_base<Triangulation, typename C3T3::Concurrency_tag> Base;
+#endif
+
+  using Base::get_lock_data_structure;
+
+  //-------------------------------------------------------
+  // Mesher_levels
+  //-------------------------------------------------------
+  // typedef Refine_facets_manifold_base<Rf_base>      Rf_manifold_base;
+
+  /// Facets mesher level
+  typedef Refine_facets_3<
+      Triangulation,
+      typename MeshCriteria::Facet_criteria,
+      MeshDomain,
+      C3T3,
+      Null_mesher_level,
+      Concurrency_tag,
+      Refine_facets_manifold_base
+    >                                               Facets_level;
+
+  /// Cells mesher level
+  typedef Refine_cells_3<
+      Triangulation,
+      typename MeshCriteria::Cell_criteria,
+      MeshDomain,
+      C3T3,
+      Facets_level,
+      Concurrency_tag>                              Cells_level;
+
+  //-------------------------------------------------------
+  // Visitors
+  //-------------------------------------------------------
+  /// Facets visitor : to update cells when refining surface
+  typedef tets::Refine_facets_visitor<
+      Triangulation,
+      Cells_level,
+      Null_mesh_visitor>                            Facets_visitor;
+
+#ifndef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
+  /// Cells visitor : it just need to know previous level
+  typedef Null_mesh_visitor_level<Facets_visitor>   Cells_visitor;
+#else
+  /// Cells visitor : to update surface (restore restricted Delaunay)
+  /// when refining cells
+  typedef Surface_mesher::Visitor<
+      Triangulation,
+      Facets_level,
+      Facets_visitor>                               Cells_visitor;
+#endif
+
+  /// Constructor
+  Mesher_3(C3T3&               c3t3,
+           const MeshDomain&   domain,
+           const MeshCriteria& criteria);
+
+  /// Destructor
+  ~Mesher_3() 
+  {
+    // The lock data structure is going to be destroyed
+    r_c3t3_.triangulation().set_lock_data_structure(NULL);
+  }
+
+  /// Launch mesh refinement
+  double refine_mesh(std::string dump_after_refine_surface_prefix = "");
+
+  /// Debug
+  std::string debug_info() const;
+  std::string debug_info_header() const;
+
+  // Step-by-step methods
+  void initialize();
+  void fix_c3t3();
+  void display_number_of_bad_elements();
+  void one_step();
+  bool is_algorithm_done();
+
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  struct Mesher_status
+  {
+    std::size_t vertices, facet_queue, cells_queue;
+
+    Mesher_status(std::size_t v, std::size_t f, std::size_t c)
+     : vertices(v), facet_queue(f), cells_queue(c) {}
+  };
+
+  Mesher_status status() const;
+#endif
+
+private:
+  void remove_cells_from_c3t3();
+
+private:
+  /// The oracle
+  const MeshDomain& r_oracle_;
+
+  /// Meshers
+  Null_mesher_level null_mesher_;
+  Facets_level facets_mesher_;
+  Cells_level cells_mesher_;
+
+  /// Visitors
+  Null_mesh_visitor null_visitor_;
+  Facets_visitor facets_visitor_;
+  Cells_visitor cells_visitor_;
+
+  /// The container of the resulting mesh
+  C3T3& r_c3t3_;
+
+private:
+  // Disabled copy constructor
+  Mesher_3(const Self& src);
+  // Disabled assignment operator
+  Self& operator=(const Self& src);
+
+};  // end class Mesher_3
+
+
+
+template<class C3T3, class MC, class MD>
+Mesher_3<C3T3,MC,MD>::Mesher_3(C3T3& c3t3,
+                               const MD& domain,
+                               const MC& criteria)
+: Base(c3t3.bbox(),
+       Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
+, r_oracle_(domain)
+, null_mesher_()
+, facets_mesher_(c3t3.triangulation(),
+                 criteria.facet_criteria_object(),
+                 domain,
+                 null_mesher_,
+                 c3t3)
+, cells_mesher_(c3t3.triangulation(),
+                criteria.cell_criteria_object(),
+                domain,
+                facets_mesher_,
+                c3t3)
+, null_visitor_()
+, facets_visitor_(&cells_mesher_, &null_visitor_)
+#ifndef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
+, cells_visitor_(facets_visitor_)
+#else
+, cells_visitor_(&facets_mesher_, &facets_visitor_)
+#endif
+, r_c3t3_(c3t3)
+{
+  facets_mesher_.set_lock_ds(this->get_lock_data_structure());
+  facets_mesher_.set_worksharing_ds(this->get_worksharing_data_structure());
+  cells_mesher_.set_lock_ds(this->get_lock_data_structure());
+  cells_mesher_.set_worksharing_ds(this->get_worksharing_data_structure());
+}
+
+
+
+template<class C3T3, class MC, class MD>
+double
+Mesher_3<C3T3,MC,MD>::refine_mesh(std::string dump_after_refine_surface_prefix)
+{
+  CGAL::Real_timer timer;
+  timer.start();
+  double elapsed_time = 0.;
+
+  // First surface mesh could modify c3t3 without notifying cells_mesher
+  // So we have to ensure that no old cell will be left in c3t3
+  remove_cells_from_c3t3();
+
+#ifndef CGAL_MESH_3_VERBOSE
+  // Scan surface and refine it
+  initialize();
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Refining facets..." << std::endl;
+  WallClockTimer t;
+#endif
+  facets_mesher_.refine(facets_visitor_);
+#ifdef CGAL_MESH_3_PROFILING
+  double facet_ref_time = t.elapsed();
+  std::cerr << "==== Facet refinement: " << facet_ref_time << " seconds ===="
+            << std::endl << std::endl;
+# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
+    // If it's parallel but the refinement is forced to sequential, we don't
+    // output the value
+#   ifndef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+  CGAL_MESH_3_SET_PERFORMANCE_DATA("Facets_time", facet_ref_time);
+#   endif
+# endif
+#endif
+
+#if defined(CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END)
+  std::cerr << std::endl
+    << "===============================================================" << std::endl
+    << "=== CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END ===" << std::endl;
+  display_number_of_bad_elements();
+  std::cerr
+    << "==============================================================="
+    << std::endl << std::endl;
+#endif
+
+  // Then activate facet to surface visitor (surface could be
+  // refined again if it is encroached)
+  facets_visitor_.activate();
+
+  dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix);
+
+  // Then scan volume and refine it
+  cells_mesher_.scan_triangulation();
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Refining cells..." << std::endl;
+  t.reset();
+#endif
+  cells_mesher_.refine(cells_visitor_);
+#ifdef CGAL_MESH_3_PROFILING
+  double cell_ref_time = t.elapsed();
+  std::cerr << "==== Cell refinement: " << cell_ref_time << " seconds ===="
+            << std::endl << std::endl;
+# ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
+    // If it's parallel but the refinement is forced to sequential, we don't
+    // output the value
+#   ifndef CGAL_DEBUG_FORCE_SEQUENTIAL_MESH_REFINEMENT
+  CGAL_MESH_3_SET_PERFORMANCE_DATA("Cells_refin_time", cell_ref_time);
+#   endif
+# endif
+#endif
+
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+  std::cerr
+    << "Vertices: " << r_c3t3_.triangulation().number_of_vertices() << std::endl
+    << "Facets  : " << r_c3t3_.number_of_facets_in_complex() << std::endl
+    << "Tets    : " << r_c3t3_.number_of_cells_in_complex() << std::endl;
+#endif
+
+#else // ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "Start surface scan...";
+  initialize();
+  std::cerr << "end scan. [Bad facets:" << facets_mesher_.size() << "]";
+  std::cerr << std::endl << std::endl;
+  elapsed_time += timer.time();
+  timer.stop(); timer.reset(); timer.start();
+
+  const Triangulation& r_tr = r_c3t3_.triangulation();
+  int nbsteps = 0;
+
+  std::cerr << "Refining Surface...\n";
+  std::cerr << "Legend of the following line: "
+            << "(#vertices,#steps," << cells_mesher_.debug_info_header()
+            << ")\n";
+
+  std::cerr << "(" << r_tr.number_of_vertices() << ","
+            << nbsteps << "," << cells_mesher_.debug_info() << ")";
+
+  while ( ! facets_mesher_.is_algorithm_done() )
+  {
+    facets_mesher_.one_step(facets_visitor_);
+    std::cerr
+    << boost::format("\r             \r"
+                     "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
+    % r_tr.number_of_vertices()
+    % nbsteps % cells_mesher_.debug_info()
+    % (nbsteps / timer.time());
+    ++nbsteps;
+  }
+  std::cerr << std::endl;
+  std::cerr << "Total refining surface time: " << timer.time() << "s" << std::endl;
+  std::cerr << std::endl;
+
+  elapsed_time += timer.time();
+  timer.stop(); timer.reset(); timer.start();
+  nbsteps = 0;
+
+  facets_visitor_.activate();
+  dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix);
+  std::cerr << "Start volume scan...";
+  cells_mesher_.scan_triangulation();
+  std::cerr << "end scan. [Bad tets:" << cells_mesher_.size() << "]";
+  std::cerr << std::endl << std::endl;
+  elapsed_time += timer.time();
+  timer.stop(); timer.reset(); timer.start();
+
+  std::cerr << "Refining...\n";
+  std::cerr << "Legend of the following line: "
+            << "(#vertices,#steps," << cells_mesher_.debug_info_header()
+            << ")\n";
+  std::cerr << "(" << r_tr.number_of_vertices() << ","
+            << nbsteps << "," << cells_mesher_.debug_info() << ")";
+
+  while ( ! cells_mesher_.is_algorithm_done() )
+  {
+    cells_mesher_.one_step(cells_visitor_);
+    std::cerr
+        << boost::format("\r             \r"
+                     "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
+        % r_tr.number_of_vertices()
+        % nbsteps % cells_mesher_.debug_info()
+        % (nbsteps / timer.time());
+    ++nbsteps;
+  }
+  std::cerr << std::endl;
+
+  std::cerr << "Total refining volume time: " << timer.time() << "s" << std::endl;
+  std::cerr << "Total refining time: " << timer.time()+elapsed_time << "s" << std::endl;
+  std::cerr << std::endl;
+#endif
+
+  timer.stop();
+  elapsed_time += timer.time();
+
+#if defined(CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END) \
+ || defined(SHOW_REMAINING_BAD_ELEMENT_IN_RED)
+  std::cerr << std::endl
+    << "===============================================================" << std::endl
+    << "=== CHECK_AND_DISPLAY_THE_NUMBER_OF_BAD_ELEMENTS_IN_THE_END ===" << std::endl;
+  display_number_of_bad_elements();
+  std::cerr
+    << "==============================================================="
+    << std::endl << std::endl;
+#endif
+
+  return elapsed_time;
+}
+
+
+template<class C3T3, class MC, class MD>
+void
+Mesher_3<C3T3,MC,MD>::
+initialize()
+{
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Initializing... ";
+  WallClockTimer t;
+#endif
+  //=====================================
+  // Bounding box estimation
+  //=====================================
+#if defined(CGAL_LINKED_WITH_TBB) || \
+    defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE)
+
+#ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+  if(boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+#endif // If that macro is defined, then estimated_bbox must be initialized
+  {
+    Base::set_bbox(r_oracle_.bbox());
+  }
+#endif // CGAL_LINKED_WITH_TBB||"sequential use far sphere"
+
+  //========================================
+  // Initialization: parallel or sequential
+  //========================================
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    // we're not multi-thread, yet
+    r_c3t3_.triangulation().set_lock_data_structure(0);
+
+# ifndef CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+
+    if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0)
+    {
+      const Bbox_3 &bbox = r_oracle_.bbox();
+
+      // Compute radius for far sphere
+      const double xdelta = bbox.xmax()-bbox.xmin();
+      const double ydelta = bbox.ymax()-bbox.ymin();
+      const double zdelta = bbox.zmax()-bbox.zmin();
+      const double radius = 5. * std::sqrt(xdelta*xdelta +
+                                           ydelta*ydelta +
+                                           zdelta*zdelta);
+      const Vector center(
+        bbox.xmin() + 0.5*xdelta,
+        bbox.ymin() + 0.5*ydelta,
+        bbox.zmin() + 0.5*zdelta);
+#  ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
+      std::cerr << "Adding points on a far sphere (radius = " << radius <<")...";
+#  endif
+      Random_points_on_sphere_3<Point> random_point(radius);
+      const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
+        tbb::task_scheduler_init::default_num_threads()
+        * Concurrent_mesher_config::get().num_pseudo_infinite_vertices_per_core);
+      for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
+        r_c3t3_.add_far_point(*random_point + center);
+    
+#  ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
+      std::cerr << "done." << std::endl;
+#  endif
+    }
+# endif // CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+
+#ifdef CGAL_MESH_3_PROFILING
+    double init_time = t.elapsed();
+    std::cerr << "done in " << init_time << " seconds." << std::endl;
+#endif
+
+    // Scan triangulation
+    facets_mesher_.scan_triangulation();
+
+    // From now on, we're multi-thread
+    r_c3t3_.triangulation().set_lock_data_structure(get_lock_data_structure());
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+#ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+    if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0)
+    {
+      /*std::cerr << "A little bit of refinement... ";
+
+      // Start by a little bit of refinement to get a coarse mesh
+      // => Good approx of bounding box
+      const int NUM_VERTICES_OF_COARSE_MESH = 40;
+      facets_mesher_.refine_sequentially_up_to_N_vertices(
+        facets_visitor_, NUM_VERTICES_OF_COARSE_MESH);
+
+      std::cerr << "done." << std::endl;
+      std::cerr
+        << "Vertices: " << r_c3t3_.triangulation().number_of_vertices() << std::endl
+        << "Facets  : " << r_c3t3_.number_of_facets_in_complex() << std::endl
+        << "Tets    : " << r_c3t3_.number_of_cells_in_complex() << std::endl;*/
+
+      // Compute radius for far sphere
+      //const Bbox_3 &bbox = r_c3t3_.bbox();
+      CGAL_assertion(is_estimated_bbox_initialized);
+      const Bbox_3 &bbox = estimated_bbox;
+      const double xdelta = bbox.xmax()-bbox.xmin();
+      const double ydelta = bbox.ymax()-bbox.ymin();
+      const double zdelta = bbox.zmax()-bbox.zmin();
+      const double radius = 5. * std::sqrt(xdelta*xdelta +
+                                           ydelta*ydelta +
+                                           zdelta*zdelta);
+      const Vector center(
+        bbox.xmin() + 0.5*xdelta,
+        bbox.ymin() + 0.5*ydelta,
+        bbox.zmin() + 0.5*zdelta);
+# ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << "Adding points on a far sphere (radius = " << radius << ")...";
+# endif
+      Random_points_on_sphere_3<Point> random_point(radius);
+      const int NUM_PSEUDO_INFINITE_VERTICES = 12*2;
+      for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
+        r_c3t3_.add_far_point(*random_point + center);
+# ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << "done." << std::endl;
+# endif
+    }
+#endif // CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+
+#ifdef CGAL_MESH_3_PROFILING
+    double init_time = t.elapsed();
+    std::cerr << "done in " << init_time << " seconds." << std::endl;
+#endif
+
+    // Scan triangulation
+    facets_mesher_.scan_triangulation();
+
+  }
+}
+
+
+template<class C3T3, class MC, class MD>
+void
+Mesher_3<C3T3,MC,MD>::
+fix_c3t3()
+{
+  if ( ! facets_visitor_.is_active() )
+  {
+    cells_mesher_.scan_triangulation();
+  }
+}
+
+
+template<class C3T3, class MC, class MD>
+void
+Mesher_3<C3T3,MC,MD>::
+display_number_of_bad_elements()
+{
+  int nf = facets_mesher_.number_of_bad_elements();
+  int nc = cells_mesher_.number_of_bad_elements();
+  std::cerr << "Bad facets: " << nf << " - Bad cells: " << nc << std::endl;
+}
+
+template<class C3T3, class MC, class MD>
+void
+Mesher_3<C3T3,MC,MD>::
+one_step()
+{
+  if ( ! facets_visitor_.is_active() )
+  {
+    facets_mesher_.one_step(facets_visitor_);
+
+    if ( facets_mesher_.is_algorithm_done() )
+    {
+      facets_visitor_.activate();
+      cells_mesher_.scan_triangulation();
+    }
+  }
+  else
+  {
+    cells_mesher_.one_step(cells_visitor_);
+  }
+}
+
+template<class C3T3, class MC, class MD>
+bool
+Mesher_3<C3T3,MC,MD>::
+is_algorithm_done()
+{
+  return cells_mesher_.is_algorithm_done();
+}
+
+
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+template<class C3T3, class MC, class MD>
+typename Mesher_3<C3T3,MC,MD>::Mesher_status
+Mesher_3<C3T3,MC,MD>::
+status() const
+{
+  return Mesher_status(r_c3t3_.triangulation().number_of_vertices(),
+                       facets_mesher_.queue_size(),
+                       cells_mesher_.queue_size());
+}
+#endif
+
+
+template<class C3T3, class MC, class MD>
+void
+Mesher_3<C3T3,MC,MD>::
+remove_cells_from_c3t3()
+{
+  for ( typename C3T3::Triangulation::Finite_cells_iterator
+    cit = r_c3t3_.triangulation().finite_cells_begin(),
+    end = r_c3t3_.triangulation().finite_cells_end() ; cit != end ; ++cit )
+  {
+    r_c3t3_.remove_from_complex(cit);
+  }
+}
+
+template<class C3T3, class MC, class MD>
+inline
+std::string
+Mesher_3<C3T3,MC,MD>::debug_info() const
+{
+  return cells_mesher_.debug_info();
+}
+
+template<class C3T3, class MC, class MD>
+inline
+std::string
+Mesher_3<C3T3,MC,MD>::debug_info_header() const
+{
+  return cells_mesher_.debug_info_header();
+}
+
+}  // end namespace Mesh_3
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_MESH_3_MESHER_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_level.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_level.h
new file mode 100644
index 0000000..9d8a0f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_level.h
@@ -0,0 +1,1214 @@
+// Copyright (c) 2004-2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU, Clement JAMIN
+
+#ifndef CGAL_MESH_3_MESHER_LEVEL_H
+#define CGAL_MESH_3_MESHER_LEVEL_H
+
+#include <string>
+
+#ifdef CGAL_MESH_3_PROFILING
+  #include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#include <CGAL/Mesh_3/Worksharing_data_structures.h>
+
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+# define CGAL_PROFILE
+# include <CGAL/Profile_counter.h>
+#endif
+
+#include <algorithm>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/task.h>
+# include <tbb/tbb.h>
+#endif
+
+#include <string>
+
+namespace CGAL { namespace Mesh_3 {
+
+enum Mesher_level_conflict_status {
+  NO_CONFLICT = 0
+  , CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
+  , CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
+  , THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE
+  , ELEMENT_WAS_A_ZOMBIE
+  , COULD_NOT_LOCK_ZONE
+  , COULD_NOT_LOCK_ELEMENT
+};
+
+/************************************************
+ *
+ * Null_mesher_level class
+ *
+ ************************************************/
+
+struct Null_mesher_level {
+
+  template <typename Visitor>
+  void refine(Visitor) {}
+
+  // For sequential version
+  template <typename P, typename Z>
+  Mesher_level_conflict_status test_point_conflict_from_superior(P, Z)
+  {
+    return NO_CONFLICT;
+  }
+  // For parallel version
+  template <typename P, typename Z, typename MV>
+  Mesher_level_conflict_status test_point_conflict_from_superior(P, Z, MV &)
+  {
+    return NO_CONFLICT;
+  }
+
+  bool is_algorithm_done() const
+  {
+    return true;
+  }
+
+  template <typename Visitor>
+  bool try_to_insert_one_point(Visitor)
+  {
+    return false;
+  }
+
+  template <typename Visitor>
+  bool one_step(Visitor)
+  {
+    return false;
+  }
+
+  //==============================================
+  // For parallel version
+  void add_to_TLS_lists(bool) {}
+  void splice_local_lists() {}
+  template <typename Mesh_visitor>
+  void before_next_element_refinement_in_superior(Mesh_visitor) {}
+  void before_next_element_refinement() {}
+  //==============================================
+
+  std::string debug_info_class_name_impl() const
+  {
+    return "Null_mesher_level";
+  }
+
+  std::string debug_info() const
+  {
+    return "";
+  }
+  std::string debug_info_header() const
+  {
+    return "";
+  }
+
+}; // end Null_mesher_level
+
+
+/************************************************
+ *
+ * Mesher_level_base class
+ *
+ ************************************************/
+
+template <
+  class Tr, /**< The triangulation type. */
+  class Derived, /**< Derived class, that implements methods. */
+  class Element, /**< Type of elements that this level refines. */
+  class Previous, /* = Null_mesher_level, */
+  /**< Previous level type, defaults to
+     \c Null_mesher_level. */
+  class Triangulation_traits /** Traits class that defines types for the
+         triangulation. */
+>
+class Mesher_level_base
+{
+public:
+  /** Type of triangulation that is meshed. */
+  typedef Tr Triangulation;
+  /** Type of point that are inserted into the triangulation. */
+  typedef typename Triangulation::Point Point;
+  /** Type of vertex handles that are returns by insertions into the
+      triangulation. */
+  typedef typename Triangulation::Vertex_handle Vertex_handle;
+  /** Type of lock data structure for concurrency */
+  typedef typename Triangulation::Lock_data_structure Lock_data_structure;
+  /** Type of facet & cell handles */
+  typedef typename Triangulation::Cell_handle Cell_handle;
+  typedef typename Cell_handle::value_type Cell;
+  typedef typename Triangulation::Facet Facet;
+  /** Type of the conflict zone for a point that can be inserted. */
+  typedef typename Triangulation_traits::Zone Zone;
+
+  typedef Element Element_type;
+  typedef Previous Previous_level;
+
+protected:
+  /** \name Private member functions */
+
+  /** Curiously recurring template pattern. */
+  //@{
+  Derived& derived()
+  {
+    return static_cast<Derived&>(*this);
+  }
+
+  const Derived& derived() const
+  {
+    return static_cast<const Derived&>(*this);
+  }
+  //@}
+
+  /// debug info: class name
+  std::string debug_info_class_name() const
+  {
+    return derived().debug_info_class_name_impl();
+  }
+
+  std::string debug_info_element(const Element &e) const
+  {
+    return derived().debug_info_element_impl(e);
+  }
+
+  /** \name Private member datas */
+
+  Previous_level& previous_level; /**< The previous level of the refinement
+                                    process. */
+
+#ifdef CGAL_MESH_3_PROFILING
+protected:
+  WallClockTimer m_timer;
+#endif
+
+public:
+  typedef Mesher_level_base<Tr,
+                       Derived,
+                       Element,
+                       Previous_level,
+                       Triangulation_traits> Self;
+
+  /** \name CONSTRUCTORS */
+  Mesher_level_base(Previous_level& previous)
+    : previous_level(previous)
+  {
+  }
+
+  /** \name FUNCTIONS IMPLEMENTED IN THE CLASS \c Derived */
+
+  /**  Access to the triangulation */
+  Triangulation& triangulation()
+  {
+    return derived().triangulation_ref_impl();
+  }
+
+  /**  Access to the triangulation */
+  const Triangulation& triangulation() const
+  {
+    return derived().triangulation_ref_impl();
+  }
+
+  const Previous_level& previous() const
+  {
+    return previous_level;
+  }
+
+  Vertex_handle insert(Point p, Zone& z)
+  {
+    return derived().insert_impl(p, z);
+  }
+
+  void clear_refinement_queue()
+  {
+    derived().clear(); // Clear refinement queue
+  }
+
+  /** Called before the first refinement, to initialized the queue of
+      elements that should be refined. */
+  void scan_triangulation()
+  {
+    //derived().clear(); // Clear refinement queue
+    derived().scan_triangulation_impl();
+
+#if defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)\
+ && defined(CGAL_MESH_3_IF_UNSORTED_QUEUE_JUST_SORT_AFTER_SCAN)
+    std::cerr << "Sorting...";
+    derived().sort();
+    std::cerr << " done." << std::endl;
+#endif
+  }
+
+  /** For diagnostics. */
+  int number_of_bad_elements()
+  {
+    return derived().number_of_bad_elements_impl();
+  }
+
+  /** Tells if, as regards the elements of type \c Element, the refinement is
+      done. */
+  bool no_longer_element_to_refine()
+  {
+    return derived().no_longer_element_to_refine_impl();
+  }
+
+  /** It includes zombie elements */
+  int number_of_elements_in_queue()
+  {
+    return derived().size();
+  }
+
+  /** Retrieves the next element that could be refined. */
+  Element get_next_element()
+  {
+    return derived().get_next_element_impl();
+  }
+
+  /** Remove from the list the next element that could be refined. */
+  void pop_next_element()
+  {
+    derived().pop_next_element_impl();
+  }
+
+  Point circumcenter_of_element(const Element& e)
+  {
+    return derived().circumcenter_impl(e);
+  }
+
+  template <typename Mesh_visitor>
+  void before_next_element_refinement_in_superior(Mesh_visitor visitor)
+  {
+    derived().before_next_element_refinement_in_superior_impl(visitor);
+  }
+
+  template <typename Mesh_visitor>
+  void before_next_element_refinement(Mesh_visitor visitor)
+  {
+    derived().before_next_element_refinement_impl();
+    previous_level.before_next_element_refinement_in_superior(
+                                        visitor.previous_level());
+  }
+
+  /** Gives the point that should be inserted to refine the element \c e */
+  Point refinement_point(const Element& e)
+  {
+    return derived().refinement_point_impl(e);
+  }
+
+  /** Actions before testing conflicts for point \c p and element \c e */
+  template <typename Mesh_visitor>
+  void before_conflicts(const Element& e, const Point& p,
+      Mesh_visitor visitor)
+  {
+    visitor.before_conflicts(e, p);
+    derived().before_conflicts_impl(e, p);
+  }
+
+  /** Tells if, as regards this level of the refinement process, if the
+      point conflicts with something, and do what is needed. The return
+      type is made of two booleans:
+        - the first one tells if the point can be inserted,
+        - in case of, the first one is \c false, the second one tells if
+        the tested element should be reconsidered latter.
+  */
+  Mesher_level_conflict_status private_test_point_conflict(const Point& p,
+                 Zone& zone)
+  {
+    return derived().private_test_point_conflict_impl(p, zone);
+  }
+
+  /**
+   * Actions before inserting the point \c p in order to refine the
+   * element \c e. The zone of conflicts is \c zone.
+   */
+  template <class Mesh_visitor>
+  void before_insertion(Element& e, const Point& p, Zone& zone,
+                        Mesh_visitor visitor)
+  {
+    visitor.before_insertion(e, p, zone);
+    derived().before_insertion_impl(e, p, zone);
+  }
+
+  /** Actions after having inserted the point.
+   *  \param vh is the vertex handle of the inserted point,
+   *  \param visitor is the visitor.
+   */
+  template <class Mesh_visitor>
+  void after_insertion(Vertex_handle vh, Mesh_visitor visitor)
+  {
+    derived().after_insertion_impl(vh);
+    visitor.after_insertion(vh);
+  }
+
+  /** Actions after testing conflicts for point \c p and element \c e
+   *  if no point is inserted. */
+  template <class Mesh_visitor>
+  void after_no_insertion(const Element& e, const Point& p, Zone& zone,
+        Mesh_visitor visitor)
+  {
+    derived().after_no_insertion_impl(e, p, zone);
+    visitor.after_no_insertion(e, p, zone);
+  }
+
+  /** \name MESHING PROCESS
+   *
+   * The following functions use the functions that are implemented in the
+   * derived classes.
+   *
+   */
+
+  /**
+   * Tells it the algorithm is done, regarding elements of type \c Element
+   * or elements of previous levels.
+   */
+  bool is_algorithm_done()
+  {
+#ifdef CGAL_MESH_3_PROFILING
+    bool done = ( previous_level.is_algorithm_done() &&
+                  no_longer_element_to_refine() );
+    /*if (done)
+    {
+      std::cerr << "done in " << m_timer.elapsed() << " seconds." << std::endl;
+      m_timer.reset();
+    }*/
+    return done;
+#else
+    return ( previous_level.is_algorithm_done() &&
+             no_longer_element_to_refine() );
+#endif
+  }
+
+  /**
+   * This function takes one element from the queue, and try to refine
+   * it. It returns \c true if one point has been inserted.
+   * @todo Merge with try_to_refine_element().
+   */
+  template <class Mesh_visitor>
+  bool process_one_element(Mesh_visitor visitor)
+  {
+    Element e = get_next_element();
+
+    const Mesher_level_conflict_status result
+      = derived().try_to_refine_element(e, visitor);
+
+    if(result == CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED)
+    {
+      pop_next_element();
+    }
+
+    return result == NO_CONFLICT;
+  }
+
+  void get_valid_vertices_of_element(const Cell_handle &e, Vertex_handle vertices[4]) const
+  {
+    for (int i = 0 ; i < 4 ; ++i)
+      vertices[i] = e->vertex(i);
+  }
+  // Among the 4 values, one of them will be Vertex_handle() (~= NULL)
+  void get_valid_vertices_of_element(const Facet &e, Vertex_handle vertices[4]) const
+  {
+    for (int i = 0 ; i < 4 ; ++i)
+      vertices[i] = (i != e.second ? e.first->vertex(i) : Vertex_handle());
+  }
+
+  Cell_handle get_cell_from_element(const Cell_handle &e) const
+  {
+    return e;
+  }
+  Cell_handle get_cell_from_element(const Facet &e) const
+  {
+    return e.first;
+  }
+
+  /** \name STEP BY STEP FUNCTIONS */
+
+  /**
+   * Inserts exactly one point, if possible, and returns \c false if no
+   * point has been inserted because the algorithm is done.
+   */
+  template <class Mesh_visitor>
+  bool try_to_insert_one_point(Mesh_visitor visitor)
+  {
+    while(! is_algorithm_done() )
+    {
+      if( previous_level.try_to_insert_one_point(visitor.previous_level()) )
+        return true;
+      if(! no_longer_element_to_refine() )
+        if( process_one_element(visitor) )
+          return true;
+    }
+    return false;
+  }
+
+}; // end Mesher_level_base
+
+
+/************************************************
+// Class Mesher_level
+// Two versions: sequential / parallel
+************************************************/
+// Sequential
+template <
+  class Tr, /**< The triangulation type. */
+  class Derived, /**< Derived class, that implements methods. */
+  class Element, /**< Type of elements that this level refines. */
+  class Previous, /* = Null_mesher_level, */
+  /**< Previous level type, defaults to
+     \c Null_mesher_level. */
+  class Triangulation_traits, /** Traits class that defines types for the
+         triangulation. */
+  typename Concurrency_tag>
+class Mesher_level
+  : public Mesher_level_base<Tr, Derived, Element, Previous,
+                             Triangulation_traits>
+{
+public:
+
+  typedef Mesher_level<Tr,
+                       Derived,
+                       Element,
+                       Previous,
+                       Triangulation_traits,
+                       Concurrency_tag> Self;
+
+  typedef Mesher_level_base<Tr,
+                            Derived,
+                            Element,
+                            Previous,
+                            Triangulation_traits> Base;
+
+  typedef typename Base::Lock_data_structure Lock_data_structure;
+  typedef typename Base::Zone                Zone;
+  typedef typename Base::Point               Point;
+  typedef typename Base::Vertex_handle       Vertex_handle;
+  using Base::derived;
+  using Base::is_algorithm_done;
+  using Base::triangulation;
+  using Base::insert;
+  using Base::before_conflicts;
+  using Base::previous_level;
+  using Base::no_longer_element_to_refine;
+  using Base::pop_next_element;
+  using Base::debug_info_class_name;
+  using Base::debug_info_element;
+
+  /** \name CONSTRUCTORS */
+
+  Mesher_level(Previous& previous)
+    : Base(previous)
+  {
+  }
+
+  void add_to_TLS_lists(bool) {}
+  void splice_local_lists() {}
+  bool no_longer_local_element_to_refine() { return true; }
+  Element get_next_local_element() {return Element(); }
+  void pop_next_local_element() {}
+
+  Zone conflicts_zone(const Point& p
+                      , Element e
+                      , bool &facet_is_in_its_cz)
+  {
+    return derived().conflicts_zone_impl(p, e, facet_is_in_its_cz);
+  }
+
+  /** Tells if, as regards this level of the refinement process, if the
+      point conflicts with something, and do what is needed. The return
+      type is made of two booleans:
+        - the first one tells if the point can be inserted,
+        - in case of, the first one is \c false, the second one tells if
+        the tested element should be reconsidered latter.
+      This function is called by the superior level, if any.
+  */
+  Mesher_level_conflict_status
+  test_point_conflict_from_superior(const Point& p, Zone& zone)
+  {
+    return derived().test_point_conflict_from_superior_impl(p, zone);
+  }
+
+  /** Refines elements of this level and previous levels (SEQUENTIAL VERSION). */
+  template <class Mesh_visitor>
+  void refine(Mesh_visitor visitor)
+  {
+    while(! is_algorithm_done() )
+    {
+      previous_level.refine(visitor.previous_level());
+      if(! no_longer_element_to_refine() )
+      {
+        this->process_one_element(visitor);
+      }
+    }
+  }
+
+  template <class Mesh_visitor>
+  Mesher_level_conflict_status
+  try_to_refine_element(Element e, Mesh_visitor visitor)
+  {
+    const Point& p = this->refinement_point(e);
+
+#ifdef CGAL_MESH_3_VERY_VERBOSE
+    std::cerr << "Trying to insert point: " << p <<
+      " inside element " << debug_info_element(e) << std::endl;
+#endif
+
+    Mesher_level_conflict_status result;
+    Zone zone;
+
+    before_conflicts(e, p, visitor);
+
+    bool facet_is_in_its_cz = true;
+    zone = conflicts_zone(p, e, facet_is_in_its_cz);
+    if (!facet_is_in_its_cz)
+      result = THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE;
+    else
+      result = test_point_conflict(p, zone);
+
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "(" << p << ") ";
+    switch( result )
+    {
+    case NO_CONFLICT:
+      std::cerr << "accepted\n";
+      break;
+    case CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED:
+      std::cerr << "rejected (temporarily)\n";
+      break;
+    case CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED:
+      std::cerr << "rejected (permanent)\n";
+      break;
+    case THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE:
+      std::cerr << "the facet to refine was not in the conflict zone "
+        "(switching to exact)\n";
+      break;
+    case ELEMENT_WAS_A_ZOMBIE:
+      std::cerr << "element was a zombie\n";
+      break;
+    case   COULD_NOT_LOCK_ELEMENT:
+      std::cerr << "could not lock element\n";
+      break;
+    case COULD_NOT_LOCK_ZONE:
+      std::cerr << "could not lock zone\n";
+      break;
+    }
+#endif
+
+    if(result == NO_CONFLICT)
+    {
+      this->before_insertion(e, p, zone, visitor);
+
+      Vertex_handle vh = insert(p, zone);
+
+      this->after_insertion(vh, visitor);
+    }
+    else
+    {
+      this->after_no_insertion(e, p, zone, visitor);
+    }
+
+    return result;
+  }
+
+  /** Refines elements of this level and previous levels.
+  *   Stops when algorithm is done
+  *   or when num vertices > approx_max_num_mesh_vertices
+  */
+  template <class Mesh_visitor>
+  void
+  refine_sequentially_up_to_N_vertices(Mesh_visitor visitor,
+                                            int approx_max_num_mesh_vertices)
+  {
+    while(! is_algorithm_done()
+      && triangulation().number_of_vertices() < approx_max_num_mesh_vertices)
+    {
+      previous_level.refine(visitor.previous_level());
+      if(! no_longer_element_to_refine() )
+      {
+        this->process_one_element(visitor);
+      }
+    }
+  }
+
+  /** Return (can_split_the_element, drop_element). */
+  Mesher_level_conflict_status
+  test_point_conflict(const Point& p, Zone& zone)
+  {
+    const Mesher_level_conflict_status result =
+      previous_level.test_point_conflict_from_superior(p, zone);
+
+    if( result != NO_CONFLICT )
+      return result;
+
+    return this->private_test_point_conflict(p, zone);
+  }
+
+  /**
+   * Applies one step of the algorithm: tries to refine one element of
+   * previous level or one element of this level. Return \c false iff
+   * <tt> is_algorithm_done()==true </tt>.
+   */
+  template <class Mesh_visitor>
+  bool one_step(Mesh_visitor visitor)
+  {
+    if( ! previous_level.is_algorithm_done() )
+      previous_level.one_step(visitor.previous_level());
+    else if( ! no_longer_element_to_refine() )
+    {
+      this->process_one_element(visitor);
+    }
+    return ! is_algorithm_done();
+  }
+
+  // Useless here
+  void set_lock_ds(Lock_data_structure *) {}
+  void set_worksharing_ds(WorksharingDataStructureType *) {}
+
+protected:
+};
+
+// Parallel
+#ifdef CGAL_LINKED_WITH_TBB
+template <
+  class Tr, /**< The triangulation type. */
+  class Derived, /**< Derived class, that implements methods. */
+  class Element, /**< Type of elements that this level refines. */
+  class Previous, /* = Null_mesher_level, */
+  /**< Previous level type, defaults to
+     \c Null_mesher_level. */
+  class Triangulation_traits> /** Traits class that defines types for the
+                                  triangulation. */
+class Mesher_level<Tr, Derived, Element, Previous,
+                   Triangulation_traits, Parallel_tag>
+  : public Mesher_level_base<Tr, Derived, Element, Previous,
+                             Triangulation_traits>
+{
+private:
+  typedef Derived Derived_;
+  template <typename ML, typename Container_element, 
+            typename Quality, typename Mesh_visitor> class Enqueue_element;
+public:
+
+  typedef Mesher_level<Tr,
+                       Derived,
+                       Element,
+                       Previous,
+                       Triangulation_traits,
+                       Parallel_tag> Self;
+
+  typedef Mesher_level_base<Tr,
+                            Derived,
+                            Element,
+                            Previous,
+                            Triangulation_traits> Base;
+
+
+  typedef typename Base::Lock_data_structure  Lock_data_structure;
+  typedef typename Base::Zone                 Zone;
+  typedef typename Base::Point                Point;
+  typedef typename Base::Vertex_handle        Vertex_handle;
+  using Base::derived;
+  using Base::is_algorithm_done;
+  using Base::triangulation;
+  using Base::insert;
+  using Base::before_conflicts;
+  using Base::before_insertion;
+  using Base::after_insertion;
+  using Base::previous_level;
+  using Base::no_longer_element_to_refine;
+  using Base::pop_next_element;
+  using Base::debug_info_class_name;
+  using Base::debug_info_element;
+
+  /** \name CONSTRUCTORS */
+
+  Mesher_level(Previous& previous)
+  : Base(previous),
+    FIRST_GRID_LOCK_RADIUS(
+    Concurrent_mesher_config::get().first_grid_lock_radius)
+    , MESH_3_REFINEMENT_GRAINSIZE(
+    Concurrent_mesher_config::get().first_grid_lock_radius)
+    , REFINEMENT_BATCH_SIZE(
+    Concurrent_mesher_config::get().refinement_batch_size)
+    , m_lock_ds(0)
+    , m_worksharing_ds(0)
+    , m_empty_root_task(0)
+  {
+  }
+
+  void add_to_TLS_lists(bool add)
+  {
+    derived().add_to_TLS_lists_impl(add);
+  }
+  void splice_local_lists()
+  {
+    derived().splice_local_lists_impl();
+  }
+
+  bool no_longer_local_element_to_refine()
+  {
+    return derived().no_longer_local_element_to_refine_impl();
+  }
+
+  Element get_next_local_element()
+  {
+    return derived().get_next_local_element_impl();
+  }
+
+  void pop_next_local_element()
+  {
+    derived().pop_next_local_element_impl();
+  }
+
+  Zone conflicts_zone(const Point& p
+                      , Element e
+                      , bool &facet_is_in_its_cz
+                      , bool &could_lock_zone)
+  {
+    return derived().conflicts_zone_impl(p, e, facet_is_in_its_cz,
+                                         could_lock_zone);
+  }
+
+  template <typename Mesh_visitor>
+  void treat_local_refinement_queue(Mesh_visitor visitor)
+  {
+    // We treat the elements of the local (TLS) refinement queue
+    while (no_longer_local_element_to_refine() == false)
+    {
+      typedef typename Derived::Container::Element Container_element;
+      Container_element ce = derived().get_next_local_raw_element_impl().second;
+
+      Mesher_level_conflict_status status;
+      do
+      {
+        status = try_lock_and_refine_element(ce, visitor);
+      }
+      while (status != NO_CONFLICT
+        && status != CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
+        && status != ELEMENT_WAS_A_ZOMBIE);
+
+      pop_next_local_element();
+    }
+  }
+
+  /** Tells if, as regards this level of the refinement process, if the
+      point conflicts with something, and do what is needed. The return
+      type is made of two booleans:
+        - the first one tells if the point can be inserted,
+        - in case of, the first one is \c false, the second one tells if
+        the tested element should be reconsidered latter.
+      This function is called by the superior level, if any.
+  */
+  template <class Mesh_visitor>
+  Mesher_level_conflict_status test_point_conflict_from_superior(
+    const Point& p, Zone& zone, Mesh_visitor &visitor)
+  {
+    return derived().test_point_conflict_from_superior_impl(p, zone, visitor);
+  }
+
+  /** Refines elements of this level and previous levels (PARALLEL VERSION). */
+  template <class Mesh_visitor>
+  void refine(Mesh_visitor visitor)
+  {
+    while(! is_algorithm_done() )
+    {
+      previous_level.refine(visitor.previous_level());
+      if(! no_longer_element_to_refine() )
+      {
+        process_a_batch_of_elements(visitor);
+      }
+    }
+  }
+
+  /** Refines elements of this level and previous levels.
+  *   Stops when algorithm is done
+  *   or when num vertices > approx_max_num_mesh_vertices
+  */
+  template <class Mesh_visitor>
+  void
+  refine_sequentially_up_to_N_vertices(Mesh_visitor visitor,
+                                            int approx_max_num_mesh_vertices)
+  {
+
+    CGAL_assertion_msg(triangulation().get_lock_data_structure() == 0,
+      "In refine_sequentially_up_to_N_vertices, the triangulation's locking data structure should be NULL");
+
+    while(! is_algorithm_done()
+      && triangulation().number_of_vertices() < approx_max_num_mesh_vertices)
+    {
+      previous_level.refine(visitor.previous_level());
+      if(! no_longer_element_to_refine() )
+      {
+        this->process_one_element(visitor);
+      }
+    }
+  }
+
+  void unlock_all_thread_local_elements()
+  {
+    if (m_lock_ds)
+    {
+      m_lock_ds->unlock_all_points_locked_by_this_thread();
+    }
+  }
+
+  template <typename Container_element, typename Quality, typename Mesh_visitor>
+  void enqueue_task(
+    const Container_element &ce, const Quality &quality, Mesh_visitor visitor)
+  {
+    CGAL_assertion(m_empty_root_task != 0);
+
+    m_worksharing_ds->enqueue_work(
+      Enqueue_element<Self, Container_element, Quality, Mesh_visitor>(
+        *this, ce, quality, visitor),
+      quality,
+      *m_empty_root_task
+      // NOTE: if you uncomment this line (Load_based_worksharing_ds), the element may
+      // be a zombie at this point => thus, it may be "infinite" and cause an assertion error
+      // in debug mode when computing the circumcenter
+      //, circumcenter_of_element(derived().extract_element_from_container_value(ce))
+    );
+  }
+
+  /**
+    * This function takes N elements from the queue, and try to refine
+    * it in parallel.
+    */
+  template <class Mesh_visitor>
+  void process_a_batch_of_elements(Mesh_visitor visitor)
+  {
+    typedef typename Derived::Container::value_type Container_quality_and_element;
+
+#ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
+    std::cerr << "Refining elements...";
+#endif
+
+    previous_level.add_to_TLS_lists(true);
+    add_to_TLS_lists(true);
+
+    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
+    m_empty_root_task->set_ref_count(1);
+
+    while (!no_longer_element_to_refine())
+    {
+      Container_quality_and_element qe = derived().get_next_raw_element_impl();
+      pop_next_element();
+      enqueue_task(qe.second, qe.first, visitor);
+    }
+
+    m_empty_root_task->wait_for_all();
+
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << " Flushing";
+#endif
+    bool keep_flushing = true;
+    while (keep_flushing)
+    {
+      m_empty_root_task->set_ref_count(1);
+      keep_flushing = m_worksharing_ds->flush_work_buffers(*m_empty_root_task);
+      m_empty_root_task->wait_for_all();
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+      std::cerr << ".";
+#endif
+    }
+
+    tbb::task::destroy(*m_empty_root_task);
+    m_empty_root_task = 0;
+
+    splice_local_lists();
+    //previous_level.splice_local_lists(); // useless
+    previous_level.add_to_TLS_lists(false);
+    add_to_TLS_lists(false);
+
+#ifdef CGAL_CONCURRENT_MESH_3_VERBOSE
+    std::cerr << " done." << std::endl;
+#endif
+
+  }
+
+  template <class Mesh_visitor>
+  Mesher_level_conflict_status
+  try_to_refine_element(Element e, Mesh_visitor visitor)
+  {
+    const Point& p = this->refinement_point(e);
+
+#ifdef CGAL_MESH_3_VERY_VERBOSE
+    std::cerr << "Trying to insert point: " << p <<
+      " inside element " << debug_info_element(e) << std::endl;
+#endif
+
+    before_conflicts(e, p, visitor);
+
+    bool could_lock_zone;
+    bool facet_is_in_its_cz = true;
+    Zone zone = conflicts_zone(p, e, facet_is_in_its_cz, could_lock_zone);
+    Mesher_level_conflict_status result;
+    if (!could_lock_zone)
+      result = COULD_NOT_LOCK_ZONE;
+    else if (!facet_is_in_its_cz)
+      result = THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE;
+    else
+      result = test_point_conflict(p, zone, visitor);
+
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "(" << p << ") ";
+    switch( result )
+    {
+    case NO_CONFLICT:
+      std::cerr << "accepted\n";
+      break;
+    case CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED:
+      std::cerr << "rejected (temporarily)\n";
+      break;
+    case CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED:
+      std::cerr << "rejected (permanent)\n";
+      break;
+    case THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE:
+      std::cerr << "the facet to refine was not in the conflict zone "
+        "(switching to exact)\n";
+      break;
+    case ELEMENT_WAS_A_ZOMBIE:
+      std::cerr << "element was a zombie\n";
+      break;
+    case   COULD_NOT_LOCK_ELEMENT:
+      std::cerr << "could not lock element\n";
+      break;
+    case COULD_NOT_LOCK_ZONE:
+      std::cerr << "could not lock zone\n";
+      break;
+    }
+#endif
+
+    if(result == NO_CONFLICT)
+    {
+      this->before_insertion(e, p, zone, visitor);
+
+      Vertex_handle vh = insert(p, zone);
+
+      if (vh == Vertex_handle())
+      {
+        this->after_no_insertion(e, p, zone, visitor);
+        result = COULD_NOT_LOCK_ZONE;
+      }
+      else
+      {
+        this->after_insertion(vh, visitor);
+      }
+    }
+    else
+    {
+      this->after_no_insertion(e, p, zone, visitor);
+    }
+
+    return result;
+  }
+
+  template <typename Container_element, typename Mesh_visitor>
+  Mesher_level_conflict_status
+  try_lock_and_refine_element(const Container_element &ce, Mesh_visitor visitor)
+  {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+    static Profile_branch_counter_3 bcounter(
+      std::string("early withdrawals / late withdrawals / successes [") + debug_info_class_name() + "]");
+#endif
+
+    Mesher_level_conflict_status result;
+    Derived &derivd = derived();
+    if( !derivd.is_zombie(ce) )
+    {
+      // Lock the element area on the grid
+      Element element = derivd.extract_element_from_container_value(ce);
+      bool locked = derivd.try_lock_element(element, FIRST_GRID_LOCK_RADIUS);
+
+      if( locked )
+      {
+        // Test it again as it may have changed in the meantime
+        if( !derivd.is_zombie(ce) )
+        {
+          result = try_to_refine_element(element, visitor);
+
+          //lock.release();
+
+          if (result == CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
+            || result == THE_FACET_TO_REFINE_IS_NOT_IN_ITS_CONFLICT_ZONE)
+          {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+            ++bcounter; // It's not a withdrawal
+#endif
+          }
+          else if (result == COULD_NOT_LOCK_ZONE)
+          {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+            bcounter.increment_branch_1(); // THIS is a late withdrawal!
+#endif
+          }
+          else
+          {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+            ++bcounter;
+#endif
+          }
+        }
+        else
+        {
+          result = ELEMENT_WAS_A_ZOMBIE;
+        }
+
+        // Unlock
+        unlock_all_thread_local_elements();
+      }
+      // else, we will try it again
+      else
+      {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+        bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+        // Unlock
+        unlock_all_thread_local_elements();
+
+        std::this_thread::yield();
+        result = COULD_NOT_LOCK_ELEMENT;
+      }
+    }
+    else
+    {
+      result = ELEMENT_WAS_A_ZOMBIE;
+    }
+
+    return result;
+  }
+
+  /** Return (can_split_the_element, drop_element). */
+  template <class Mesh_visitor>
+  Mesher_level_conflict_status
+  test_point_conflict(const Point& p, Zone& zone, Mesh_visitor &visitor)
+  {
+    const Mesher_level_conflict_status result =
+      previous_level.test_point_conflict_from_superior(
+        p, zone, visitor.previous_level());
+
+    if( result != NO_CONFLICT )
+      return result;
+
+    return this->private_test_point_conflict(p, zone);
+  }
+
+  /**
+   * Applies one step of the algorithm: tries to refine one element of
+   * previous level or one element of this level. Return \c false iff
+   * <tt> is_algorithm_done()==true </tt>.
+   */
+  template <class Mesh_visitor>
+  bool one_step(Mesh_visitor visitor)
+  {
+    if( ! previous_level.is_algorithm_done() )
+      previous_level.one_step(visitor.previous_level());
+    else if( ! no_longer_element_to_refine() )
+    {
+      process_a_batch_of_elements(visitor);
+    }
+    return ! is_algorithm_done();
+  }
+
+  void set_lock_ds(Lock_data_structure *p)
+  {
+    m_lock_ds = p;
+  }
+
+  void set_worksharing_ds(WorksharingDataStructureType *p)
+  {
+    m_worksharing_ds = p;
+  }
+
+protected:
+
+  // Member variables
+  const int FIRST_GRID_LOCK_RADIUS;
+  const int MESH_3_REFINEMENT_GRAINSIZE;
+  const int REFINEMENT_BATCH_SIZE;
+  Lock_data_structure *m_lock_ds;
+  WorksharingDataStructureType *m_worksharing_ds;
+
+  tbb::task *m_empty_root_task;
+
+private:
+
+  // Functor for enqueue_task function
+  template <typename ML, typename Container_element, typename Quality, typename Mesh_visitor>
+  class Enqueue_element
+  {
+    ML                & m_mesher_level;
+    Container_element   m_container_element;
+    Quality             m_quality;
+    Mesh_visitor        m_visitor;
+
+  public:
+    // Constructor
+    Enqueue_element(ML &ml,
+                    const Container_element &ce, 
+                    const Quality &quality, 
+                    Mesh_visitor visitor)
+    : m_mesher_level(ml), 
+      m_container_element(ce), 
+      m_quality(quality), 
+      m_visitor(visitor)
+    {
+    }
+
+    // operator()
+    void operator()() const
+    {
+      typedef typename ML::Derived_::Container::value_type 
+                                                 Container_quality_and_element;
+
+      Mesher_level_conflict_status status;
+      do
+      {
+        status = m_mesher_level.try_lock_and_refine_element(m_container_element, 
+                                                            m_visitor);
+      }
+      while (status != NO_CONFLICT
+        && status != CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED
+        && status != CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED
+        && status != ELEMENT_WAS_A_ZOMBIE);
+
+      // Refine the new bad facets
+      m_mesher_level.before_next_element_refinement(m_visitor);
+
+      // We can now reconsider the element if requested
+      if (status == CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED)
+        m_mesher_level.enqueue_task(m_container_element, m_quality, m_visitor);
+
+      // Finally we add the new local bad_elements to the feeder
+      while (m_mesher_level.no_longer_local_element_to_refine() == false)
+      {
+        Container_quality_and_element qe = 
+          m_mesher_level.derived().get_next_local_raw_element_impl();
+        m_mesher_level.pop_next_local_element();
+        m_mesher_level.enqueue_task(qe.second, qe.first, m_visitor);
+      }
+    }
+  };
+
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+} }  // end namespace CGAL::Mesh_3
+
+#include <CGAL/Mesher_level_visitors.h>
+#include <CGAL/Mesh_3/Mesher_level_default_implementations.h>
+
+#endif // CGAL_MESH_3_MESHER_LEVEL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_level_default_implementations.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_level_default_implementations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Mesher_level_default_implementations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Mesher_level_default_implementations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_exuder_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_exuder_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_exuder_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_exuder_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_perturber_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_perturber_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Null_perturber_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Null_perturber_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Odt_move.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Odt_move.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Odt_move.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Odt_move.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Poisson_refine_cells_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Poisson_refine_cells_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Poisson_refine_cells_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Poisson_refine_cells_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Polyline_with_context.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Polyline_with_context.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Polyline_with_context.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Polyline_with_context.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Profile_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Profile_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Profile_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Profile_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Profiling_tools.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Profiling_tools.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Profiling_tools.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Profiling_tools.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
new file mode 100644
index 0000000..a68b512
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
@@ -0,0 +1,1705 @@
+// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
+// Copyright (c) 2010-2013 GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb, Laurent Rineau
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
+#define CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Mesh_3/io_signature.h>
+#ifndef CGAL_NO_ASSERTIONS
+#  include <boost/math/special_functions/next.hpp> // for float_prior
+#endif
+#include <boost/function_output_iterator.hpp>
+
+namespace CGAL {
+namespace Mesh_3 {
+namespace internal {
+  const double min_intersection_factor = .4; // (1-alpha)
+  const double weight_modifier = .81; //0.9025;//0.81;
+  const double distance_divisor = 2.1;
+  const int max_nb_vertices_to_reevaluate_size = 10;
+} // end namespace internal
+} // end namespace Mesh_3
+} // end namespace CGAL
+
+#include <cmath>
+#include <algorithm>
+#include <set>
+#include <list>
+#include <vector>
+#include <stack>
+
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/optional.hpp>
+
+#include <CGAL/Mesh_3/utilities.h>
+#include <CGAL/enum.h>
+#include <CGAL/iterator.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/squared_distance_3.h>
+
+#include <fstream>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+template <typename C3t3>
+void debug_dump_c3t3(const std::string filename, const C3t3& c3t3)
+{
+  std::cerr << "Dump current mesh to " << filename << std::endl;
+  std::ofstream out(filename.c_str(), 
+                    std::ios_base::out|std::ios_base::binary);
+  out << "binary CGAL c3t3 " << CGAL::Get_io_signature<C3t3>()() << "\n";
+  CGAL::set_binary_mode(out);
+  out << c3t3;
+}
+
+
+template <typename C3T3, typename MeshDomain, typename SizingFunction>
+class Protect_edges_sizing_field
+{
+  typedef Protect_edges_sizing_field          Self;
+  
+public:
+  typedef typename C3T3::Triangulation        Tr;
+  typedef typename Tr::Geom_traits            Gt;
+  typedef typename Gt::FT                     FT;
+  typedef typename Gt::Point_3                Weighted_point;
+  typedef typename Weighted_point::Point      Bare_point;
+  typedef typename Weighted_point::Weight     Weight;
+  
+  typedef typename C3T3::Cell_handle          Cell_handle;
+  typedef typename C3T3::Vertex_handle        Vertex_handle;
+  typedef typename C3T3::Triangulation        Triangulation;
+  typedef typename C3T3::Edge                 Edge;
+  
+  typedef typename MeshDomain::Curve_segment_index  Curve_segment_index;
+  typedef typename MeshDomain::Corner_index         Corner_index;
+  typedef typename MeshDomain::Index                Index;
+  
+public:
+  Protect_edges_sizing_field(C3T3& c3t3,
+                             const MeshDomain& domain,
+                             SizingFunction size=SizingFunction(),
+                             const FT minimal_size = FT());
+  
+  void operator()(const bool refine=true);
+  
+private:
+  typedef std::vector<std::pair<Curve_segment_index,Bare_point> >    Incident_edges;
+  typedef std::vector<Vertex_handle>                                 Vertex_vector;
+  typedef std::vector<std::pair<Vertex_handle,Curve_segment_index> > Incident_vertices;
+  
+private:
+  /// Insert corners of the mesh
+  void insert_corners();
+  
+  /// Insert balls on every edge
+  void insert_balls_on_edges();
+  
+  /// Refine balls
+  void refine_balls();
+
+  /// Returns vertex which corresponds to corner located at point p
+  Vertex_handle get_vertex_corner_from_point(const Bare_point& p,
+                                             const Index& p_index) const;
+  
+  /// Insert point(p,w) into triangulation and set its dimension to \c dim and
+  /// it's index to \c index.
+  /// The handle of the newly created vertex is returned.
+  Vertex_handle insert_point(const Bare_point& p,
+                             const Weight& w,
+                             int dim,
+                             const Index& index,
+                             const bool special_ball = false);
+
+  /**
+   * Insert point(p,w) into triangulation and set its dimension to \c dim and
+   * it's index to \c index.
+   * The handle of the newly created vertex is returned.
+   * 
+   * This function also ensures that point(p,w) will not be inside a
+   * sphere, by decreasing the radius of any sphere that contains it.
+   * It also ensures that no point of the triangulation will be inside its
+   * sphere, by decreasing w.
+   */
+  template <typename ErasedVeOutIt>
+  std::pair<Vertex_handle, ErasedVeOutIt>
+  smart_insert_point(const Bare_point& p,
+		     Weight w,
+		     int dim,
+		     const Index& index,
+		     ErasedVeOutIt out);
+  
+  
+  /// Insert balls between points which are pointed by handles \c vp and \c vq
+  /// on curve identified by \c curve_index
+  template <typename ErasedVeOutIt>
+  ErasedVeOutIt insert_balls(const Vertex_handle& vp,
+			     const Vertex_handle& vq,
+			     const Curve_segment_index& curve_index,
+			     ErasedVeOutIt out);
+
+  /**
+   * Insert balls
+   * Preconditions:
+   *  - size_p < size_q
+   *  - pq_geodesic > 0
+   */
+  template <typename ErasedVeOutIt>
+  ErasedVeOutIt insert_balls(const Vertex_handle& vp,
+			     const Vertex_handle& vq,
+			     const FT size_p,
+			     const FT size_q,
+			     const FT pq_geodesic,
+			     const CGAL::Sign distance_sign,
+			     const Curve_segment_index& curve_index,
+			     ErasedVeOutIt out);
+  
+  /// Returns true if balls of \c va and \c vb intersect, and (va,vb) is not
+  /// an edge of the complex
+  bool non_adjacent_but_intersect(const Vertex_handle& va,
+                                  const Vertex_handle& vb) const;
+  
+  /// Returns true if balls of \c va and \c vb intersect
+  bool do_balls_intersect(const Vertex_handle& va,
+                          const Vertex_handle& vb) const;
+  
+  /// Change size of the ball of vertex \c v.
+  Vertex_handle change_ball_size(const Vertex_handle& v, const FT size,
+                                 const bool special_ball = false);
+  
+  
+  /// Returns true if balls of v1 and v2 intersect "enough"
+  bool is_sampling_dense_enough(const Vertex_handle& v1,
+                                const Vertex_handle& v2) const;
+  
+  /// Takes an iterator on Vertex_handle as input and check if the sampling
+  /// of those vertices is ok. If not, fix it.
+  void check_and_repopulate_edges();
+
+  /// Checks if vertex \c v is well sampled, and if its not the case, fix it.
+  /// Fills out with deleted vertices during this process. out value type
+  /// is Vertex_handle.
+  template <typename ErasedVeOutIt>
+  ErasedVeOutIt
+  check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out);
+  
+  /// Walk along edge from \c start, following the direction \c start to 
+  /// \c next, and fills \c out with the vertices which do not fullfill 
+  /// the sampling conditions
+  template <typename ErasedVeOutIt>
+  ErasedVeOutIt
+  walk_along_edge(const Vertex_handle& start,
+                  const Vertex_handle& next,
+                  const bool test_sampling,
+                  ErasedVeOutIt out) const;
+  
+  /// Returns next vertex along edge, i.e vertex after \c start, following
+  /// the direction from \c previous to \c start
+  /// \pre (previous,start) is in c3t3
+  Vertex_handle next_vertex_along_edge(const Vertex_handle& start,
+                                       const Vertex_handle& previous) const;
+  
+  /// Replace vertices between ]begin,last[ by new vertices, along curve
+  /// identified by \c curve_index
+  /// The value type of InputIterator is Vertex_handle.
+  template <typename InputIterator, typename ErasedVeOutIt>
+  ErasedVeOutIt repopulate(InputIterator begin,
+			   InputIterator last,
+			   const Curve_segment_index& index,
+			   ErasedVeOutIt out);
+
+  template <typename InputIterator, typename ErasedVeOutIt>
+  ErasedVeOutIt
+  analyze_and_repopulate(InputIterator begin,
+                         InputIterator last,
+                         const Curve_segment_index& index,
+			 ErasedVeOutIt out);
+  
+  /// Checks if \c v2 size is compatible (i.e. greater) with the linear
+  /// interpolation of sizes of \c v1 and \c v3 
+  bool is_sizing_field_correct(const Vertex_handle& v1,
+                               const Vertex_handle& v2,
+                               const Vertex_handle& v3) const;
+  
+  /// Repopulate all incident curve around corner \c v
+  /// \pre \c v is a corner of c3t3 
+  template <typename ErasedVeOutIt>
+  ErasedVeOutIt
+  repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out);
+  
+  /// Returns true if edge with index \c curve_index is already treated
+  bool is_treated(const Curve_segment_index& curve_index) const
+  {
+    return ( treated_edges_.find(curve_index) != treated_edges_.end() );
+  }
+  
+  /// Set edge with index \c curve_index as treated
+  void set_treated(const Curve_segment_index& curve_index)
+  {
+    treated_edges_.insert(curve_index);
+  }
+  
+  /// Compute euclidean distance between bare points of \c va and \c vb
+  FT compute_distance(const Vertex_handle& va, const Vertex_handle& vb) const
+  {
+    return compute_distance(va->point().point(), vb->point().point());
+  }
+  
+  /// Compute euclidean distance between bare points \c and \c q
+  FT compute_distance(const Bare_point& p, const Bare_point& q) const
+  {
+    return CGAL::sqrt(Gt().compute_squared_distance_3_object()(p,q));
+  }
+  
+  /// Returns the radius of the ball of vertex \c v
+  FT get_size(const Vertex_handle& v) const
+  {
+    return CGAL::sqrt(v->point().weight());
+  }
+
+  /// Test if a given vertex is a special protecting ball
+  /// A special ball is a protecting ball whose radius is set to the
+  /// minimal radius. Such a ball can exceptionally intersect a ball that
+  /// is on a different curve. Special balls are marked with special values
+  /// of 'in_dimension'.
+  bool is_special(const Vertex_handle&v) const
+  {
+    return v->is_special();
+  }
+
+  /// Set to a negative dimension to mark this ball as a special one.
+  void set_special(const Vertex_handle&v) const
+  {
+    v->set_special();
+  }
+
+  /// Returns the real dimension of the vertex
+  int get_dimension(const Vertex_handle& v) const
+  {
+    return c3t3_.in_dimension(v);
+  }
+
+  /// Query the sizing field and returns its value at the point p, or
+  /// minimal_size if the later is greater.
+  FT query_size(const Bare_point& p, int dim, const Index& index) const
+  {
+    if(dim < 0) dim = -1 - dim; // Convert the dimension if it was set to a
+                                // negative value (marker for special balls).
+    const FT s = size_(p, dim, index);
+    // if(minimal_size_ != FT() && s < minimal_size_) 
+    //   return minimal_size_;
+    // else
+      return s;
+  }
+
+private:
+  C3T3& c3t3_;
+  const MeshDomain& domain_;
+  SizingFunction size_;
+  FT minimal_size_;
+  Weight minimal_weight_;
+  std::set<Curve_segment_index> treated_edges_;
+  std::set<Vertex_handle> unchecked_vertices_;
+};
+
+
+template <typename C3T3, typename MD, typename Sf>
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+Protect_edges_sizing_field(C3T3& c3t3, const MD& domain, 
+                           Sf size, const FT minimal_size)
+  : c3t3_(c3t3)
+  , domain_(domain)
+  , size_(size)
+  , minimal_size_(minimal_size)
+  , minimal_weight_(CGAL::square(minimal_size))
+{
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+void
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+operator()(const bool refine)
+{
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "Inserting protection balls..." << std::endl
+            << "  refine_balls = " << std::boolalpha << refine << std::endl
+            << "  min_balls_radius = " << minimal_size_ << std::endl
+            << "  min_balls_weight = " << minimal_weight_ << std::endl;
+#endif
+  
+  // Insert 0-dimensional features
+  insert_corners();
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "insert_corners() done. Nb of points in triangulation: "
+            << c3t3_.triangulation().number_of_vertices() << std::endl;
+#endif
+  
+  // Insert 1-dimensional features
+  insert_balls_on_edges();
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "insert_balls_on_edges() done. Nb of points in triangulation: "
+            << c3t3_.triangulation().number_of_vertices() << std::endl;
+#endif
+  
+  // Solve problems
+  if ( refine )
+  { 
+    refine_balls();
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "refine_balls() done. Nb of points in triangulation: "
+              << c3t3_.triangulation().number_of_vertices() << std::endl;
+#endif
+    CGAL_assertion(minimal_size_ > 0 || c3t3_.is_valid());
+ }
+  
+  // debug_dump_c3t3("dump-mesh-after-protect_edges.binary.cgal", c3t3_);
+
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << std::endl;
+#endif
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+void
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+insert_corners()
+{
+  // Gt is a traits class for regular triangulations, and Gt::Kernel is its
+  // CGAL kernel.
+  typedef CGAL::Delaunay_triangulation_3<typename Gt::Kernel> Dt;
+
+  // Iterate on domain corners
+  typedef std::vector< std::pair<Corner_index, Bare_point> > Initial_corners;
+  Initial_corners corners;
+  domain_.get_corners(std::back_inserter(corners));
+  
+  Dt dt;
+  for ( typename Initial_corners::iterator it = corners.begin(),
+       end = corners.end() ; it != end ; ++it )
+  {
+    const Bare_point& p = it->second;
+    dt.insert(p);
+  }
+
+  for ( typename Initial_corners::iterator cit = corners.begin(),
+          end = corners.end() ; cit != end ; ++cit )
+  {
+    const Bare_point& p = cit->second;
+    Index p_index = domain_.index_from_corner_index(cit->first);
+    
+    // Get weight (ball radius is given by size_ function)
+    FT w = CGAL::square(query_size(p, 0, p_index));
+
+    // the following lines ensure that the weight w is small enough so that
+    // corners balls do not intersect
+    if(dt.number_of_vertices() >= 2)
+    {
+
+      typename Dt::Vertex_handle vh;
+      CGAL_assertion_code( bool p_found= )
+        dt.is_vertex(p, vh);
+      CGAL_assertion(p_found);
+      std::vector<typename Dt::Vertex_handle> vs;
+      vs.reserve(32);
+      dt.finite_adjacent_vertices(vh, std::back_inserter(vs));
+      CGAL_assertion(!vs.empty());
+      typename Dt::Point nearest = vs[0]->point();
+      typename Gt::Compare_distance_3 compare_dist = 
+        c3t3_.triangulation().geom_traits().compare_distance_3_object();
+      for (typename std::vector<typename Dt::Vertex_handle>::const_iterator
+             it = vs.begin(); it != vs.end(); ++it) 
+      {
+        if(compare_dist(p, (*it)->point(), nearest) == CGAL::SMALLER) {
+          // 	    std::cerr << "  nearest!\n";
+          nearest =  (*it)->point();
+        }
+      }
+      typename Gt::Compute_squared_distance_3 squared_distance = 
+        c3t3_.triangulation().geom_traits().compute_squared_distance_3_object();
+      const FT nearest_sq_dist = squared_distance( nearest, p);
+      
+      w = (std::min)(w, nearest_sq_dist / FT(9));
+    }
+    
+    // Insert corner with ball (dim is zero because p is a corner)
+    Vertex_handle v = smart_insert_point(p, w, 0, p_index,
+					 CGAL::Emptyset_iterator()).first;
+    CGAL_assertion(v != Vertex_handle());
+
+    // As C3t3::add_to_complex modifies the 'in_dimension' of the vertex,
+    // we need to backup and re-set the 'is_special' marker after.
+    const bool special_ball = is_special(v);
+    c3t3_.add_to_complex(v,cit->first);
+    if(special_ball) {
+      set_special(v);
+    }
+  }
+} //end insert_corners()
+
+
+template <typename C3T3, typename MD, typename Sf>
+typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index,
+             const bool special_ball /* = false */)
+{
+  using CGAL::Mesh_3::internal::weight_modifier;
+
+  if(dim < 0) dim = -1 - dim; // Convert the dimension if it was set to a
+                              // negative value (marker for special balls).
+
+  typedef typename Tr::size_type size_type;
+  CGAL_USE_TYPE(size_type);
+  
+  // Insert point
+  CGAL_assertion_code(size_type nb_vertices_before = c3t3_.triangulation().number_of_vertices());
+
+  typename Tr::Locate_type lt;
+  int li, lj;
+  const typename Tr::Cell_handle ch = c3t3_.triangulation().locate(p, lt, li, lj);
+  Vertex_handle v = c3t3_.triangulation().insert(Weighted_point(p,w*weight_modifier),
+                                                 lt, ch, li, lj);
+  
+  // If point insertion created an hidden ball, fail
+  CGAL_assertion ( Vertex_handle() != v );
+  CGAL_assertion ( lt == Tr::VERTEX ||
+                   c3t3_.triangulation().number_of_vertices() == (nb_vertices_before+1) );
+
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "Insertion of ";
+  if(special_ball) std::cerr << "SPECIAL ";
+  std::cerr << "protecting ball "
+            << Weighted_point(p,w*weight_modifier);
+  switch(dim) {
+  case 0:
+    std::cerr << " on corner #";
+    break;
+  case 1:
+    std::cerr << " on curve #";
+    break;
+  default:
+    std::cerr << " ERROR dim=" << dim << " index=";
+  }
+  std::cerr  << index << std::endl;
+  if(v == Vertex_handle()) std::cerr << "  HIDDEN!\n";
+  std::cerr << "The weight was " << w << std::endl;
+#endif // CGAL_MESH_3_PROTECTION_DEBUG
+
+  c3t3_.set_dimension(v, dim);
+  if(special_ball)
+    set_special(v);
+  c3t3_.set_index(v,index);
+  
+  unchecked_vertices_.insert(v);
+  
+  return v;
+}
+
+  
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+std::pair<typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle,
+	  ErasedVeOutIt>
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index,
+		   ErasedVeOutIt out)
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "smart_insert_point( (" << p 
+            << "), w=" << w
+            << ", dim=" << dim
+            << ", index=" << index << ")\n";
+#endif
+  const Tr& tr = c3t3_.triangulation();
+  typename Gt::Compute_squared_distance_3 sq_distance =
+    tr.geom_traits().compute_squared_distance_3_object();
+  
+  bool add_handle_to_unchecked = false; /// add or not the new vertex to
+                                        /// the set 'unchecked_vertices'
+  bool insert_a_special_ball = false; /// will be passed to the function
+                                      /// this->insert_point
+  
+  if ( tr.dimension() > 2 ) 
+  {
+    // Check that new point will not be inside a power sphere
+
+    typename Tr::Locate_type lt;
+    int li, lj;
+    Cell_handle ch = tr.locate(p, lt, li, lj);
+    Vertex_handle nearest_vh = tr.nearest_power_vertex(p, ch);
+    FT sq_d = sq_distance(p, nearest_vh->point().point());
+    while ( nearest_vh->point().weight() > sq_d &&
+            ! is_special(nearest_vh) )
+    {
+      CGAL_assertion( minimal_size_ >0 || sq_d > 0 );
+
+      bool special_ball = false;
+      if(minimal_weight_ != Weight() && sq_d < minimal_weight_) {
+        sq_d = minimal_weight_;
+        w = minimal_weight_;
+        special_ball = true;
+        insert_a_special_ball = true;
+      }
+
+      // Adapt size
+      *out++ = nearest_vh;
+      Vertex_handle new_vh = change_ball_size(nearest_vh, CGAL::sqrt(sq_d),
+                                              special_ball);
+      ch = tr.locate(p, lt, li, lj, new_vh);
+      
+      // Iterate
+      nearest_vh = tr.nearest_power_vertex(p, ch);
+      sq_d = sq_distance(p, nearest_vh->point().point());
+    }
+
+    if( is_special(nearest_vh) && nearest_vh->point().weight() > sq_d )
+    {
+      w = minimal_weight_;
+      insert_a_special_ball = true;
+    }
+
+    // Change w in order to be sure that no existing point will be included
+    // in (p,w)
+    std::vector<Vertex_handle> vertices_in_conflict_zone;
+    { // fill vertices_in_conflict_zone
+      std::set<Vertex_handle> vertices_in_conflict_zone_set;
+      std::vector<Cell_handle> cells_in_conflicts;
+      tr.find_conflicts(Weighted_point(p, w), ch,
+                        CGAL::Emptyset_iterator(),
+                        std::back_inserter(cells_in_conflicts),
+                        CGAL::Emptyset_iterator());
+
+      for(typename std::vector<Cell_handle>::const_iterator 
+            it = cells_in_conflicts.begin(),
+            end = cells_in_conflicts.end(); it != end; ++it) 
+      {
+        for(int i = 0, d = tr.dimension(); i <= d; ++i) {
+          const Vertex_handle v = (*it)->vertex(i);
+          if( ! c3t3_.triangulation().is_infinite(v) ) {
+            vertices_in_conflict_zone_set.insert(v);
+          }
+        }
+      }
+      vertices_in_conflict_zone.insert(vertices_in_conflict_zone.end(),
+				       vertices_in_conflict_zone_set.begin(),
+				       vertices_in_conflict_zone_set.end());
+    }
+    FT min_sq_d = w;
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    typename Tr::Point nearest_point;
+#endif
+    for(typename std::vector<Vertex_handle>::const_iterator
+          it = vertices_in_conflict_zone.begin(),
+          end = vertices_in_conflict_zone.end(); it != end ; ++it )
+    {
+      const FT sq_d = sq_distance(p, (*it)->point().point());
+      if(minimal_weight_ != Weight() && sq_d < minimal_weight_) {
+        insert_a_special_ball = true;
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+        nearest_point = (*it)->point();
+#endif
+        min_sq_d = minimal_weight_;
+        if( ! is_special(*it) ) {
+	  *out++ = *it;
+          ch = change_ball_size(*it, minimal_size_, true)->cell(); // special ball
+        }
+      } else {
+        if(sq_d < min_sq_d) {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+          nearest_point = (*it)->point();
+#endif
+          min_sq_d = sq_d;
+        }
+      }
+    }
+
+    if ( w > min_sq_d )
+    { 
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+      std::cerr << "smart_insert_point: weight " << w
+                << " reduced to " << min_sq_d
+                << "\n (near existing point: " << nearest_point << " )\n";
+#endif
+      w = min_sq_d;
+      add_handle_to_unchecked = true;
+    }
+
+    if(lt != Tr::VERTEX) {
+      using CGAL::Mesh_3::internal::weight_modifier;
+      CGAL_assertion_code(std::vector<Vertex_handle> hidden_vertices;);
+      CGAL_assertion_code(ch = tr.locate(p, lt, li, lj, ch););
+      CGAL_assertion_code(tr.vertices_inside_conflict_zone(Weighted_point(p, w*weight_modifier),
+                                                           ch,
+                                                           std::back_inserter(hidden_vertices)));
+
+      CGAL_assertion(hidden_vertices.empty());
+    }
+  }
+  else // tr.dimension() <= 2
+  {
+    // change size of existing balls which include p
+    bool restart = true;
+    while ( restart )
+    {
+      restart = false;
+      for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(),
+           end = tr.finite_vertices_end() ; it != end ; ++it )
+      {
+        FT sq_d = sq_distance(p, it->point().point());
+        if ( it->point().weight() > sq_d )
+        { 
+          bool special_ball = false;
+          if(minimal_weight_ != Weight() && sq_d > minimal_weight_) {
+            sq_d = minimal_weight_;
+            w = minimal_weight_;
+            special_ball = true;
+            insert_a_special_ball = true;
+          }
+          if( ! is_special(it) ) { 
+	    *out++ = it;
+            change_ball_size(it, CGAL::sqrt(sq_d), special_ball);
+            restart = true;
+          }
+          break;
+        }
+      }
+    }
+    
+    FT min_sq_d = w;
+    typename Tr::Point nearest_point;
+    // Change w in order to be sure that no existing point will be included
+    // in (p,w)
+    for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(),
+         end = tr.finite_vertices_end() ; it != end ; ++it )
+    {
+      FT sq_d = sq_distance(p, it->point().point());
+      if(sq_d < min_sq_d) {
+        min_sq_d = sq_d;
+        nearest_point = it->point();
+      }
+    }    
+    if ( w > min_sq_d )
+    { 
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+      std::cerr << "smart_insert_point: weight " << w
+                << " reduced to " << min_sq_d
+                << "\n (near existing point: " << nearest_point << " )\n";
+#endif
+      w = min_sq_d;
+      add_handle_to_unchecked = true;
+    }
+  }
+
+  const FT w_max = CGAL::square(query_size(p, dim, index));
+
+  if(w > w_max) {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr << "smart_insert_point: weight " << w
+              << " reduced to " << w_max << " (sizing field)\n";
+#endif
+    w = w_max;
+    add_handle_to_unchecked = true;
+  }
+  if( w < minimal_weight_) {
+    w = minimal_weight_;
+    insert_a_special_ball = true;
+  }
+  Vertex_handle v = insert_point(p,w,dim,index, insert_a_special_ball);
+  /// @TODO `insert_point` does insert in unchecked_vertices anyway!
+  if ( add_handle_to_unchecked ) { unchecked_vertices_.insert(v); }
+  
+  return std::pair<Vertex_handle, ErasedVeOutIt>(v, out);
+}
+
+  
+template <typename C3T3, typename MD, typename Sf>
+void
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+insert_balls_on_edges()
+{
+  // Get features
+  typedef CGAL::cpp11::tuple<Curve_segment_index,
+                             std::pair<Bare_point,Index>,
+                             std::pair<Bare_point,Index> >    Feature_tuple;
+  typedef std::vector<Feature_tuple>                          Input_features;
+  
+  Input_features input_features;
+  domain_.get_curve_segments(std::back_inserter(input_features));
+  
+  // Interate on edges
+  for ( typename Input_features::iterator fit = input_features.begin(),
+       end = input_features.end() ; fit != end ; ++fit )
+  {
+    const Curve_segment_index& curve_index = CGAL::cpp11::get<0>(*fit);
+    if ( ! is_treated(curve_index) )
+    {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+      std::cerr << "** treat curve #" << curve_index << std::endl;
+#endif
+      const Bare_point& p = CGAL::cpp11::get<1>(*fit).first;
+      const Bare_point& q = CGAL::cpp11::get<2>(*fit).first; 
+      
+      const Index& p_index = CGAL::cpp11::get<1>(*fit).second;
+      const Index& q_index = CGAL::cpp11::get<2>(*fit).second;
+      
+      Vertex_handle vp,vq;
+      if ( ! domain_.is_cycle(p, curve_index) )
+      {
+        vp = get_vertex_corner_from_point(p,p_index);
+        vq = get_vertex_corner_from_point(q,q_index);
+      }
+      else
+      {
+        // Even if the curve is a cycle, it can intersect other curves at
+        // its first point (here 'p'). In that case, 'p' is a corner, even
+        // if the curve is a cycle.
+        if(!c3t3_.triangulation().is_vertex(Weighted_point(p), vp))
+        {
+          // if 'p' is not a corner, find out a second point 'q' on the
+          // curve, "far" from 'p', and limit the radius of the ball of 'p'
+          // with the third of the distance from 'p' to 'q'.
+          FT p_size = query_size(p, 1, p_index);
+
+          FT curve_lenght = domain_.geodesic_distance(p, p, curve_index);
+
+          Bare_point other_point =
+            domain_.construct_point_on_curve_segment(p,
+                                                     curve_index,
+                                                     curve_lenght / 2);
+          p_size = (std::min)(p_size,
+                              compute_distance(p, other_point) / 3);
+          vp = smart_insert_point(p,
+                                  CGAL::square(p_size),
+                                  1,
+                                  p_index,
+				  CGAL::Emptyset_iterator()).first;
+        }
+        // No 'else' because in that case 'is_vertex(..)' already filled
+        // the variable 'vp'.
+        vq = vp;
+      }
+      
+      // Insert balls and set treated
+      // if(do_balls_intersect(vp, vq)) {
+      //   CGAL_assertion(is_special(vp) || is_special(vq));
+      // }
+      // else
+      {
+        insert_balls(vp, vq, curve_index, Emptyset_iterator());
+      }
+      set_treated(curve_index);
+    }
+    // std::stringstream s;
+    // s << "dump-mesh-curve-" << curve_index << ".binary.cgal";
+    // debug_dump_c3t3(s.str(), c3t3_);
+  }
+} //end insert_balls_on_edges()
+
+
+template <typename C3T3, typename MD, typename Sf>
+typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+get_vertex_corner_from_point(const Bare_point& p, const Index&) const
+{
+  // Get vertex_handle associated to corner (dim=0) point
+  Vertex_handle v;
+  CGAL_assertion_code( bool q_finded = )
+  c3t3_.triangulation().is_vertex(Weighted_point(p), v);
+  // Let the weight be 0, because is_vertex only locates the point, and
+  // check that the location type is VERTEX.
+  CGAL_assertion( q_finded );
+  return v;
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+insert_balls(const Vertex_handle& vp,
+             const Vertex_handle& vq,
+             const Curve_segment_index& curve_index,
+	     ErasedVeOutIt out)
+{
+  // Get size of p & q
+  const Bare_point& p = vp->point().point();
+  const Bare_point& q = vq->point().point();
+  
+  const FT sp = get_size(vp);
+  const FT sq = get_size(vq);
+  
+  // Compute geodesic distance
+  const FT pq_geo_signed = domain_.geodesic_distance(p, q, curve_index);
+  const CGAL::Sign d_sign = CGAL::sign(pq_geo_signed);
+  const FT pq_geo = CGAL::abs(pq_geo_signed);
+
+  // Insert balls
+  return
+    (sp <= sq) ?
+    insert_balls(vp, vq, sp, sq, pq_geo, d_sign, curve_index, out) :
+    insert_balls(vq, vp, sq, sp, pq_geo, -d_sign, curve_index, out);
+}
+
+
+
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+insert_balls(const Vertex_handle& vp,
+             const Vertex_handle& vq,
+             const FT sp,
+             const FT sq,
+             const FT d,
+             const CGAL::Sign d_sign,
+             const Curve_segment_index& curve_index,
+	     ErasedVeOutIt out)
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "insert_balls(vp=" << (void*)(&*vp) << " (" << vp->point() << "),\n"
+            << "             vq=" << (void*)(&*vq) << " (" << vq->point() << "),\n"
+            << "             sp=" << sp << ",\n"
+            << "             sq=" << sq << ",\n"
+            << "              d=" << d << ",\n"
+            << "             d_sign=" << d_sign << ",\n"
+            << "             curve_index=" << curve_index << ")\n";
+#endif
+  CGAL_precondition(d > 0);
+  CGAL_precondition(sp <= sq);
+  CGAL_precondition(sp > 0);
+
+  // Notations:
+  // sp = size_p,   sq = size_q,   d = pq_geodesic
+  // n = nb_points,   r = delta_step_size
+  // 
+  // Hypothesis:
+  // sp <= sq
+  //
+  // Let's define
+  // P0 = p, Pn+1 = q, d(Pi,Pi+1) = ai
+  //
+  // The following constraints should be verified:
+  // a0 = sp + r, an = sq,
+  // ai+1 = ai + r
+  // d = Sum(ai)
+  //
+  // The following could be obtained:
+  // r = (sq - sp) / (n+1)
+  // n = 2(d-sq) / (sp+sq)
+  //
+  // =======================
+  // Calculus details:
+  // ai+1 = ai + r
+  // ai+1 = a0 + r*(i+1)
+  //   an = a0 + r*n
+  //   sq = sp + r + r*n
+  //    r = (sq-sp) / (n+1)
+  //
+  //   d = Sum(ai)
+  //   d = Sum(sp + (i+1)*r)
+  //   d = (n+1)*sp + (n+1)(n+2)/2 * r
+  //   d = (n+1)*sp + (n+1)(n+2)/2 * (sq-sp) / (n+1)
+  // 2*d = 2(n+1)*sp + (n+2)*sq - (n+2)*sp
+  // 2*d = n*sp + (n+2)*sq
+  //   n = 2(d-sq) / (sp+sq)
+  // =======================
+  
+  int n = static_cast<int>(std::floor(FT(2)*(d-sq) / (sp+sq))+.5);
+  // if( minimal_weight_ != 0 && n == 0 ) return;
+
+#ifndef CGAL_MESH_3_NO_PROTECTION_NON_LINEAR
+  // This block tries not to apply the general rule that the size of
+  // protecting balls is a linear interpolation of the size of protecting
+  // balls at corner. When the curve segment is long enough, pick a point
+  // at the middle and choose a new size.
+  if(n >= internal::max_nb_vertices_to_reevaluate_size && 
+     d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight_)) {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr << "Number of to-be-inserted balls is: " 
+              << n << "\n  between points ("
+              << vp->point() << ") and (" << vq->point()
+              << ") (geodesic distance: "
+              << domain_.geodesic_distance(vp->point(), vq->point(),
+                                           curve_index)
+              << ")\n";
+#endif
+    const Bare_point new_point =
+      domain_.construct_point_on_curve_segment(vp->point().point(),
+                                               curve_index,
+                                               d_sign * d / 2);
+    const int dim = 1; // new_point is on edge
+    const Index index = domain_.index_from_curve_segment_index(curve_index);
+    const FT point_weight = CGAL::square(size_(new_point, dim, index));
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr << "  middle point: " << new_point << std::endl;
+    std::cerr << "  new weight: " << point_weight << std::endl;
+#endif
+    std::pair<Vertex_handle, ErasedVeOutIt> pair =
+      smart_insert_point(new_point,
+			 point_weight,
+			 dim,
+			 index,
+			 out);
+    const Vertex_handle new_vertex = pair.first;
+    out = pair.second;
+    const FT sn = get_size(new_vertex);
+    if(sp <= sn) {
+      out=insert_balls(vp, new_vertex, sp, sn, d/2, d_sign, curve_index, out);
+    } else {
+      out=insert_balls(new_vertex, vp, sn, sp, d/2, -d_sign, curve_index, out);
+    }
+    if(sn <= sq) {
+      out=insert_balls(new_vertex, vq, sn, sq, d/2, d_sign, curve_index, out);
+    } else {
+      out=insert_balls(vq, new_vertex, sq, sn, d/2, -d_sign, curve_index, out);
+    }
+    return out;
+  }
+#endif // not CGAL_MESH_3_NO_PROTECTION_NON_LINEAR
+
+  FT r = (sq - sp) / FT(n+1);
+
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "  n=" << n
+            << "\n  r=" << r << std::endl;
+#endif
+
+
+  // Adjust size of steps, D = covered distance
+  FT D = sp*FT(n+1) + FT((n+1)*(n+2)) / FT(2) * r ;
+  
+  FT dleft_frac = d / D;
+
+  // Initialize step sizes
+  FT step_size = sp + r;
+  FT norm_step_size = dleft_frac * step_size;
+  
+  // Initial distance
+  FT d_signF = static_cast<FT>(d_sign);
+  FT pt_dist = d_signF * norm_step_size;
+  Vertex_handle prev = vp;
+  const Bare_point& p = vp->point().point();
+
+  // if ( (0 == n) && 
+  //      ( (d >= sp+sq) || !is_sampling_dense_enough(vp, vq) ) )
+
+  // If there is some place to insert one point, insert it
+  if ( (0 == n) && (d >= sp+sq) )
+  {
+    n = 1;
+    step_size = sp + (d-sp-sq) / FT(2);
+    pt_dist = d_signF * step_size;
+    norm_step_size = step_size;
+  } else {
+    CGAL_assertion_code(using boost::math::float_prior);
+    CGAL_assertion(n==0 ||
+                   dleft_frac >= float_prior(float_prior(1.)));
+  }
+  
+  // Launch balls
+  for ( int i = 1 ; i <= n ; ++i )
+  {
+    // New point position
+    Bare_point new_point =
+      domain_.construct_point_on_curve_segment(p, curve_index, pt_dist);
+    
+    // Weight (use as size the min between norm_step_size and linear interpolation)
+    FT current_size = (std::min)(norm_step_size, sp + CGAL::abs(pt_dist)/d*(sq-sp));
+    FT point_weight = current_size * current_size;
+    
+    // Index and dimension
+    Index index = domain_.index_from_curve_segment_index(curve_index);
+    int dim = 1; // new_point is on edge
+    
+    // Insert point into c3t3
+    std::pair<Vertex_handle, ErasedVeOutIt> pair =
+      smart_insert_point(new_point, point_weight, dim, index, out);
+    Vertex_handle new_vertex = pair.first;
+    out = pair.second;
+    
+    // Add edge to c3t3
+    if(!c3t3_.is_in_complex(prev, new_vertex)) {
+      c3t3_.add_to_complex(prev, new_vertex, curve_index);
+    }
+    prev = new_vertex;
+    
+    // Step size
+    step_size += r;
+    norm_step_size = dleft_frac * step_size;
+    
+    // Increment distance
+    pt_dist += d_signF * norm_step_size;
+  }
+  
+  // Insert last edge into c3t3
+  // Warning: if vp==vq (cycle) and if only 1 point was inserted,
+  // then (prev,vp) == (prev,vq)
+  if ( vp != vq || n > 1 )
+  {
+    if(!c3t3_.is_in_complex(prev, vq)) {
+      c3t3_.add_to_complex(prev, vq, curve_index);
+    }
+  }
+  return out;
+}
+  
+  
+template <typename C3T3, typename MD, typename Sf>
+void
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+refine_balls()
+{
+  Triangulation& tr = c3t3_.triangulation();
+  
+  // Loop
+  bool restart = true;
+  int nb=0;
+  while ( (!unchecked_vertices_.empty() || restart) && nb<29)
+  {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr << "RESTART REFINE LOOP (" << nb << ")\n"
+              << "\t unchecked_vertices size: " << unchecked_vertices_.size() <<"\n";
+#endif
+    ++nb;
+    restart = false;
+    std::map<Vertex_handle, FT> new_sizes;
+    
+    for(typename Tr::Finite_edges_iterator eit = tr.finite_edges_begin(), 
+        end = tr.finite_edges_end(); eit != end; ++eit)
+    {
+      const Vertex_handle& va = eit->first->vertex(eit->second);
+      const Vertex_handle& vb = eit->first->vertex(eit->third);
+      
+      // If those vertices are not adjacent 
+      if( non_adjacent_but_intersect(va, vb) )
+      {
+        using CGAL::Mesh_3::internal::distance_divisor;
+
+        // Compute correct size of balls
+        const FT ab = compute_distance(va,vb);
+	/// @TOTO pb: get_size(va) is called several times
+        FT sa_new = (std::min)(ab/distance_divisor, get_size(va));
+        FT sb_new = (std::min)(ab/distance_divisor, get_size(vb));
+        
+        // In case of va or vb have already been in conflict, keep minimal size
+        if ( new_sizes.find(va) != new_sizes.end() )
+        { sa_new = (std::min)(sa_new, new_sizes[va]); }
+        
+        if ( new_sizes.find(vb) != new_sizes.end() )
+        { sb_new = (std::min)(sb_new, new_sizes[vb]); }
+        
+        // Store new_sizes for va and vb
+        if ( sa_new != get_size(va) )
+        { new_sizes[va] = sa_new; }
+        
+        if ( sb_new != get_size(vb) )
+        { new_sizes[vb] = sb_new; }
+      }
+    }
+
+    // The std::map with Vertex_handle as the key is not robust, because
+    // the time stamp of vertices can change during the following loop. The
+    // solution is to copy it in a vector.
+    std::vector<std::pair<Vertex_handle, FT> >
+      new_sizes_copy(new_sizes.begin(), new_sizes.end());
+    new_sizes.clear();
+    
+    // Update size of balls
+    for ( typename std::vector<std::pair<Vertex_handle,FT> >::iterator
+	    it = new_sizes_copy.begin(),
+	    end = new_sizes_copy.end();
+	  it != end ; ++it )
+    {
+      const Vertex_handle v = it->first;
+      const FT new_size = it->second;
+      // Set size of the ball to new value
+      if(minimal_size_ != FT() && new_size < minimal_size_) {
+        if(!is_special(v)) {
+          change_ball_size(v,minimal_size_,true); // special ball
+                  
+          // Loop will have to be run again
+          restart = true;
+        }
+      } else {
+        change_ball_size(v,new_size);
+                
+        // Loop will have to be run again
+        restart = true;
+      }
+    }
+    
+    // Check edges
+    check_and_repopulate_edges();
+  }
+} // end refine_balls()
+
+
+template <typename C3T3, typename MD, typename Sf>
+bool
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+non_adjacent_but_intersect(const Vertex_handle& va, const Vertex_handle& vb) const
+{
+  if ( ! c3t3_.is_in_complex(va,vb) )
+  {
+    return do_balls_intersect(va, vb);
+  }
+  
+  return false;
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+bool
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const
+{
+  typename Gt::Construct_sphere_3 sphere = 
+    c3t3_.triangulation().geom_traits().construct_sphere_3_object();
+    
+  typename Gt::Do_intersect_3 do_intersect = 
+    c3t3_.triangulation().geom_traits().do_intersect_3_object();
+    
+  const Bare_point& a = va->point().point();
+  const Bare_point& b = vb->point().point();
+    
+  const FT& sq_ra = va->point().weight();
+  const FT& sq_rb = vb->point().weight();
+    
+  return do_intersect(sphere(a, sq_ra), sphere(b, sq_rb));
+}
+
+template <typename C3T3, typename MD, typename Sf>
+typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+change_ball_size(const Vertex_handle& v, const FT size, const bool special_ball)
+{
+  // Check if there is something to do
+  Weight w = CGAL::square(size);
+  // if(v->point().weight() == w)
+  // { return v; }
+
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "change_ball_size(v=" << (void*)(&*v) 
+            << " (" << v->point()
+            << ") dim=" << c3t3_.in_dimension(v) 
+            << " index=" << c3t3_.index(v)
+            << " ,\n"
+            << "                 size=" << size 
+            << ", special_ball=" << std::boolalpha << special_ball << std::endl;
+#endif
+  
+  // Get incident vertices along c3t3 edge
+  Incident_vertices incident_vertices;
+  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
+  
+  // Remove incident edges from complex
+  for ( typename Incident_vertices::iterator vit = incident_vertices.begin(),
+       vend = incident_vertices.end() ; vit != vend ; ++vit )
+  {
+    c3t3_.remove_from_complex(v,vit->first);
+  }
+  
+  
+  
+  // Store point data
+  Index index = c3t3_.index(v);
+  int dim = get_dimension(v);
+  Bare_point p = v->point().point();  
+
+  // Remove v from corners
+  boost::optional<Corner_index> corner_index =
+    boost::make_optional(false, Corner_index());
+  if ( c3t3_.is_in_complex(v) )
+  {
+    corner_index = c3t3_.corner_index(v);
+    c3t3_.remove_from_complex(v);
+  }
+
+  unchecked_vertices_.erase(v);
+  // Change v size
+  c3t3_.triangulation().remove(v);
+ 
+  CGAL_assertion_code(Tr& tr = c3t3_.triangulation());
+  CGAL_assertion_code(Cell_handle ch = tr.locate(p));
+  CGAL_assertion_code(std::vector<Vertex_handle> hidden_vertices);
+  CGAL_assertion_code(if(tr.dimension() > 2)
+                      tr.vertices_inside_conflict_zone(Weighted_point(p, w),
+                                                       ch,
+                                                       std::back_inserter(hidden_vertices)));
+
+  Vertex_handle new_v = insert_point(p, w , dim, index, special_ball);
+  CGAL_assertion(hidden_vertices.empty());
+
+  CGAL_assertion( (! special_ball) || is_special(new_v) ); 
+  
+  // TODO: ensure that this condition is always satisfied (Pedro's code ?)
+  CGAL_assertion(v==new_v);
+  //new_v->set_meshing_info(size*size);
+
+  // Restore v in corners
+  if ( corner_index )
+  {
+    // As C3t3::add_to_complex modifies the 'in_dimension' of the vertex,
+    // we need to backup and re-set the 'is_special' marker after.
+    const bool special_ball = is_special(new_v);
+    c3t3_.add_to_complex(new_v,*corner_index);
+    if(special_ball) {
+        set_special(new_v);
+    }
+  }
+  
+  // Restore c3t3 edges
+  for ( typename Incident_vertices::iterator it = incident_vertices.begin(),
+       end = incident_vertices.end() ; it != end ; ++it )
+  {
+    // Restore connectivity in c3t3
+    c3t3_.add_to_complex(new_v, it->first, it->second);
+  }
+
+  // Update unchecked vertices
+  unchecked_vertices_.insert(new_v);
+  return new_v;
+}
+namespace details {
+
+  // Functor used by Protect_edges_sizing_field::check_and_repopulate_edges, below
+  template <typename Set>
+  class Erase_element_from_set {
+    Set* set_ptr;
+  public:
+    Erase_element_from_set(Set& set) : set_ptr(&set) {}
+
+    void operator()(const typename Set::key_type& x)
+    {
+      set_ptr->erase(x);
+    }
+  }; // end class Erase_element_from_set
+
+} // end namespace details
+
+template <typename C3T3, typename MD, typename Sf>
+void
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+check_and_repopulate_edges()
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "check_and_repopulate_edges()\n";
+#endif
+  typedef std::set<Vertex_handle> Vertices;
+  Vertices vertices;
+  std::copy( unchecked_vertices_.begin(), unchecked_vertices_.end(),
+             std::inserter(vertices,vertices.begin()) );
+  
+  unchecked_vertices_.clear();
+  
+  // Fix edges
+  while ( !vertices.empty() )
+  {
+    Vertex_handle v = *vertices.begin();
+    vertices.erase(vertices.begin());
+
+    details::Erase_element_from_set<Vertices> erase_from_vertices(vertices);
+
+    check_and_fix_vertex_along_edge(v,
+      boost::make_function_output_iterator(erase_from_vertices));
+  }
+}
+
+  
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out)
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "check_and_fix_vertex_along_edge(" 
+            << (void*)(&*v) << "= (" << v->point() 
+            << ") dim=" << get_dimension(v)
+            << " index=" << c3t3_.index(v)
+            << " special=" << std::boolalpha << is_special(v)
+            << ")\n";
+#endif
+  // If v is a corner, then all incident edges have to be checked
+  if ( c3t3_.is_in_complex(v) )
+  {
+    return repopulate_edges_around_corner(v, out);
+  }
+  
+  // Get incident vertices along c3t3 edge
+  Incident_vertices incident_vertices;
+  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
+  CGAL_assertion(v->is_special()
+                 || incident_vertices.size() == 0
+                 || incident_vertices.size() == 1
+                 || incident_vertices.size() == 2);
+  if(incident_vertices.size() == 0) return out;
+  // The size of 'incident_vertices' can be 0 if v is a ball that covers
+  // entirely a closed curve. 
+  // The size can also be 1 if the curve is a cycle, and the temporary
+  // mesh is only two balls on the cycle: then each ball has only one
+  // neighbor.
+
+  // Walk along edge to find the edge piece which is not correctly sampled
+  typedef std::list<Vertex_handle> Vertex_list;
+  Vertex_list to_repopulate;
+  to_repopulate.push_front(v);
+  
+  const Vertex_handle& previous = incident_vertices.front().first;
+  const Vertex_handle& next = incident_vertices.back().first;
+
+  // Walk following direction (v,previous)
+  walk_along_edge(v, previous, true, std::front_inserter(to_repopulate));
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr <<  "to_repopulate.size()=" << to_repopulate.size() << "\n";
+#endif // CGAL_MESH_3_PROTECTION_DEBUG  
+
+  // Check whether a complete circle has been discovered or not
+  if (   to_repopulate.size() == 1
+      || to_repopulate.front() != to_repopulate.back() )
+  {
+    // Walk in other direction (v,next)
+    walk_along_edge(v, next, true, std::back_inserter(to_repopulate));    
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr <<  "to_repopulate.size()=" << to_repopulate.size() << "\n";
+#endif // CGAL_MESH_3_PROTECTION_DEBUG  
+  }
+  
+  // If only v is in to_repopulate, there is nothing to do
+  if ( to_repopulate.size() == 1 )
+  {
+    *out++ = *to_repopulate.begin();
+    return out;
+  }
+  
+  // Store erased vertices
+  // out = std::copy(to_repopulate.begin(), to_repopulate.end(), out);
+
+  // Repopulate edge
+  const Curve_segment_index& curve_index = incident_vertices.front().second;
+  
+  out = analyze_and_repopulate(to_repopulate.begin(),
+			       --to_repopulate.end(),
+			       curve_index,
+			       out);
+  
+  return out;
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+bool
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2) const
+{
+  using CGAL::Mesh_3::internal::min_intersection_factor;
+  CGAL_precondition(c3t3_.is_in_complex(v1,v2));
+
+  // Get sizes
+  FT size_v1 = get_size(v1);
+  FT size_v2 = get_size(v2);
+  FT distance_v1v2 = compute_distance(v1,v2);
+  
+  // Ensure size_v1 > size_v2
+  if ( size_v1 < size_v2 ) { std::swap(size_v1, size_v2); }
+  
+  // Check if balls intersect
+  return distance_v1v2 < (FT(min_intersection_factor) * size_v2 + size_v1);  
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+walk_along_edge(const Vertex_handle& start, const Vertex_handle& next,
+                bool /*test_sampling*/,
+                ErasedVeOutIt out) const
+{
+  CGAL_precondition( c3t3_.is_in_complex(start, next) );
+  
+  Vertex_handle previous = start;
+  Vertex_handle current = next;
+  
+  // Walk along edge since a corner is encountered or the balls of previous
+  // and current intersects enough
+  while ( ! is_sampling_dense_enough(previous, current) )
+  {
+    *out++ = current;
+    
+    // Don't go through corners
+    if ( c3t3_.is_in_complex(current) || current == start )
+    {
+      break;
+    }
+    
+    // Get next vertex along edge
+    Vertex_handle next = next_vertex_along_edge(current,previous);
+    previous = current;
+    current = next;
+  }
+  
+  return out;
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+typename Protect_edges_sizing_field<C3T3, MD, Sf>::Vertex_handle
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+next_vertex_along_edge(const Vertex_handle& start,
+                       const Vertex_handle& previous) const
+{
+  CGAL_precondition( c3t3_.is_in_complex(start, previous) );
+  CGAL_precondition( ! c3t3_.is_in_complex(start) );
+  
+  Incident_vertices incident_vertices;
+  c3t3_.adjacent_vertices_in_complex(start,
+                                  std::back_inserter(incident_vertices));
+  CGAL_assertion(incident_vertices.size() == 2);
+  
+  if ( incident_vertices.front().first == previous )
+  { 
+    return incident_vertices.back().first;
+  }
+  else
+  { 
+    return incident_vertices.front().first;
+  }
+}
+
+  
+template <typename C3T3, typename MD, typename Sf>
+template <typename InputIterator, typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+repopulate(InputIterator begin, InputIterator last,
+	   const Curve_segment_index& index, ErasedVeOutIt out)
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "repopulate(begin=" << (void*)(&**begin) 
+            << " (" << (*begin)->point() << "),\n"
+            << "            last=" << (void*)(&**last)
+            << " (" << (*last)->point() << ")\n"
+            << "                  distance(begin, last)=" 
+            << std::distance(begin, last) << ",\n"
+            << "           index=" << index << ")\n";
+#endif
+  CGAL_assertion( std::distance(begin,last) >= 0 );
+  
+  // May happen
+  if ( begin == last ) { return out; }
+  
+  // Valid because begin < last
+  InputIterator current = begin;
+  InputIterator previous = current++;
+  
+  // Remove edges from c3t3.
+  while ( current != last )
+  {
+    c3t3_.remove_from_complex(*previous++, *current++);
+  }
+  // Keep a point between current and last
+  Bare_point point_through = (*previous)->point().point();
+  // Remove last edge
+  c3t3_.remove_from_complex(*previous, *current);
+  
+  // Remove vertices (don't remove the first one and the last one)
+  current = begin;
+  while ( ++current != last )
+  {
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    std::cerr << "Removal of ";
+    if(is_special(*current)) std::cerr << "SPECIAL ";
+    std::cerr << "protecting ball "
+              << (*current)->point();
+    switch(get_dimension(*current)) {
+    case 0:
+      std::cerr << " on corner #";
+      break;
+    case 1:
+      std::cerr << " on curve #";
+      break;
+    default:
+      std::cerr << " ERROR dim=" << get_dimension(*current)  << " index=";
+    }
+    std::cerr  << c3t3_.index(*current) << std::endl;
+#endif // CGAL_MESH_3_PROTECTION_DEBUG
+    *out++ = *current;
+    c3t3_.triangulation().remove(*current);
+  }
+  
+  // If edge is a cycle, order the iterators according to the orientation of
+  // the cycle
+  if (  domain_.is_cycle((*begin)->point().point(), index) 
+      && domain_.distance_sign_along_cycle((*begin)->point().point(),
+                                           point_through,
+                                           (*last)->point().point(),
+                                           index ) != CGAL::POSITIVE )
+  {
+    std::swap(begin,last);
+  }
+  
+  // Repopulate edge
+  return insert_balls(*begin, *last, index, out);
+}
+
+
+template <typename C3T3, typename MD, typename Sf>
+template <typename InputIterator, typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+analyze_and_repopulate(InputIterator begin, InputIterator last,
+		       const Curve_segment_index& index, ErasedVeOutIt out)
+{
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+  std::cerr << "analyze_and_repopulate(begin=" << (void*)(&**begin)
+            << " (" << (*begin)->point() << "),\n"
+            << "                       last=" << (void*)(&**last)
+            << " (" << (*last)->point() << ")\n"
+            << "                              distance(begin, last)=" 
+            << std::distance(begin, last) << ",\n"
+            << "                       index=" << index << ")\n";
+#endif
+  CGAL_assertion( std::distance(begin,last) >= 0 );
+  
+  // May happen
+  if ( begin == last ) { return out; }
+  if ( std::distance(begin,last) == 1 )
+  {
+    out = repopulate(begin, last, index, out);
+    return out;
+  }
+  
+  // Here std::distance(begin,last) > 1
+  
+  // ch_stack is the stack filled with the convex hull of element size.
+  // The goal is to ensure that no ball will have its size increased
+  std::stack<InputIterator> ch_stack;
+  InputIterator current = begin;
+  ch_stack.push(current);
+  ch_stack.push(++current);
+
+  // Compute the convex hull of the size of elements
+  while ( ++current != last )
+  {
+    // Get last element of the stack
+    InputIterator previous = ch_stack.top();
+    ch_stack.pop();
+    
+    // If (prevprev, prev, current) is ok, then go one step forward, i.e. check
+    // (prevprevprev, prevprev, current)
+    while (   !ch_stack.empty() 
+           && is_sizing_field_correct(*ch_stack.top(),*previous,*current) )
+    {
+      previous = ch_stack.top();
+      ch_stack.pop();
+    }
+    
+    // Push in the stack the furthest good element (previous)
+    // and current element
+    ch_stack.push(previous);   
+    ch_stack.push(current);
+  }
+  
+  // Insert last element
+  ch_stack.push(last);
+  
+  // Repopulate edge segments
+  current = ch_stack.top();
+  ch_stack.pop();
+  while ( !ch_stack.empty() )
+  {
+    InputIterator next = ch_stack.top();
+    ch_stack.pop();
+    // Iterators are on the reverse order in the stack, thus use [next,current]
+    out = repopulate(next, current, index, out);
+    current = next;
+  }
+  return out;
+}
+  
+template <typename C3T3, typename MD, typename Sf>
+bool
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+is_sizing_field_correct(const Vertex_handle& v1,
+                        const Vertex_handle& v2,
+                        const Vertex_handle& v3) const
+{
+  FT s1 = get_size(v1);
+  FT s2 = get_size(v2);
+  FT s3 = get_size(v3);
+  FT D = compute_distance(v1,v3);
+  FT d = compute_distance(v1,v2);
+  
+  return ( s2 >= (s1 + d/D*(s3-s1)) );
+}
+
+  
+template <typename C3T3, typename MD, typename Sf>
+template <typename ErasedVeOutIt>
+ErasedVeOutIt
+Protect_edges_sizing_field<C3T3, MD, Sf>::
+repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out)
+{
+  CGAL_precondition(c3t3_.is_in_complex(v));
+  
+  Incident_vertices incident_vertices;
+  c3t3_.adjacent_vertices_in_complex(v, std::back_inserter(incident_vertices));
+  
+  for ( typename Incident_vertices::iterator vit = incident_vertices.begin(),
+       vend = incident_vertices.end() ; vit != vend ; ++vit )
+  {
+    const Vertex_handle& next = vit->first;
+    const Curve_segment_index& curve_index = vit->second;
+    
+    // Walk along each incident edge of the corner
+    Vertex_vector to_repopulate;
+    to_repopulate.push_back(v);
+    walk_along_edge(v, next, true, std::back_inserter(to_repopulate));
+
+    // Return erased vertices
+    std::copy(to_repopulate.begin(), to_repopulate.end(), out);
+
+    // Repopulate
+    out = analyze_and_repopulate(to_repopulate.begin(), --to_repopulate.end(),
+				 curve_index, out);
+  }
+  
+  return out;
+}
+  
+} // end namespace Mesh_3
+
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_cells_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_cells_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_cells_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_cells_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_3.h
new file mode 100644
index 0000000..1e950a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_3.h
@@ -0,0 +1,1965 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+// Implements a mesher level for facets.
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_REFINE_FACETS_3_H
+#define CGAL_MESH_3_REFINE_FACETS_3_H
+
+#include <CGAL/Mesh_3/Mesher_level.h>
+#include <CGAL/Mesh_3/Mesher_level_default_implementations.h>
+#ifdef CGAL_LINKED_WITH_TBB
+  #include <tbb/tbb.h>
+#endif
+
+#include <CGAL/Meshes/Filtered_deque_container.h>
+#include <CGAL/Meshes/Filtered_multimap_container.h>
+#include <CGAL/Meshes/Double_map_container.h>
+
+#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
+
+#ifdef CGAL_MESH_3_PROFILING
+  #include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#include <CGAL/Object.h>
+
+#include <boost/format.hpp>
+#include <boost/optional.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/if.hpp>
+#include <CGAL/tuple.h>
+#include <boost/type_traits/is_convertible.hpp>
+#include <sstream>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+// Helper meta-programming functions, to allow backward compatibility.
+//
+//   - Has_Is_facet_bad and Had_Facet_badness are used to detect if a model
+//     of the MeshFacetCriteria_3 concept follows the specifications of
+//     CGAL-3.7 (with Facet_badness) or later (with Is_facet_bad).
+//
+//   - Then the meta-function Get_Is_facet_bad is used to get the actual
+//     type, either Facet_criteria::Facet_badness or
+//      Facet_criteria::Is_facet_bad.
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_Is_facet_bad, Is_facet_bad, true)
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_Facet_badness, Facet_badness, false)
+
+// template class, used when use_facet_badness = false
+template <typename Facet_criteria,
+          bool use_facet_badness = (!Has_Is_facet_bad<Facet_criteria>::value) &&
+                                    Has_Facet_badness<Facet_criteria>::value >
+struct Get_Is_facet_bad {
+  typedef typename Facet_criteria::Is_facet_bad Type;
+  typedef Type type; // compatibility with Boost
+};
+
+// partial specialization when use_facet_badness == true
+template <typename Facet_criteria>
+struct Get_Is_facet_bad<Facet_criteria, true> {
+  typedef typename Facet_criteria::Facet_badness Type;
+  typedef Type type;
+};
+
+  // Predicate to know if a facet in a refinement queue is a zombie
+  // A facet is a pair <cell, index of the opposite vertex>.
+  // A facet is a "zombie" if at least one of its two adjacent cells
+  // has been erased. We test it thanks to the "erase counter" which
+  // is inside each cell (incremented by the compact container).
+  // In the refinement queue, we store a tuple
+  // <facet1, facet1_erase counter, facet2, facet2_erase_counter>
+  // where facet2 = mirror_facet(facet1) and facetx_erase_counter is
+  // the erase_counter of facetx's cell when added to the queue>
+  template<typename Facet>
+  class Facet_to_refine_is_not_zombie
+  {
+  public:
+    Facet_to_refine_is_not_zombie() {}
+
+    bool operator()(const CGAL::cpp11::tuple<
+      Facet, unsigned int, Facet, unsigned int> &f) const
+    {
+#ifdef _DEBUG
+      int f1_current_erase_counter = CGAL::cpp11::get<0>(f).first->erase_counter();
+      int f1_saved_erase_counter = CGAL::cpp11::get<1>(f);
+      int f2_current_erase_counter = CGAL::cpp11::get<2>(f).first->erase_counter();
+      int f2_saved_erase_counter = CGAL::cpp11::get<3>(f);
+      //f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1
+
+      /*if (f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1)
+      {
+#ifdef CGAL_LINKED_WITH_TBB
+        tbb::queuing_mutex mut;
+        tbb::queuing_mutex::scoped_lock l(mut);
+#endif
+
+        std::stringstream sstr;
+        Facet facet = CGAL::cpp11::get<0>(f);
+        sstr << "Facet 1 { " << std::endl
+        << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
+        << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+        << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
+        << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
+        << "}" << std::endl;
+
+        facet = CGAL::cpp11::get<2>(f);
+        sstr << "Facet 2 { " << std::endl
+        << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
+        << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+        << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
+        << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
+        << "}" << std::endl;
+
+        std::string s = sstr.str();
+        //std::cerr << s << std::endl;
+      }*/
+#endif
+      return (CGAL::cpp11::get<0>(f).first->erase_counter() == CGAL::cpp11::get<1>(f)
+        && CGAL::cpp11::get<2>(f).first->erase_counter() == CGAL::cpp11::get<3>(f) );
+    }
+  };
+
+/************************************************
+// Class Refine_facets_3_handle_queue_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Index, typename Facet, typename Concurrency_tag>
+class Refine_facets_3_handle_queue_base
+{
+protected:
+  Refine_facets_3_handle_queue_base() : m_last_vertex_index() {}
+
+  Index get_last_vertex_index() const
+  {
+    return m_last_vertex_index;
+  }
+
+  void set_last_vertex_index(Index i) const
+  {
+    m_last_vertex_index = i;
+  }
+
+#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
+ || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
+
+  CGAL::cpp11::tuple<Facet, unsigned int, Facet, unsigned int>
+  from_facet_to_refinement_queue_element(const Facet &facet,
+                                         const Facet &mirror) const
+  {
+    return CGAL::cpp11::make_tuple(
+      facet, facet.first->erase_counter(),
+      mirror, mirror.first->erase_counter());
+  }
+
+public:
+  template<typename Container_element>
+  Facet extract_element_from_container_value(const Container_element &e) const
+  {
+    // We get the first Facet inside the tuple
+    return CGAL::cpp11::get<0>(e);
+  }
+
+#else
+
+  Facet
+  from_facet_to_refinement_queue_element(const Facet &facet,
+                                         const Facet &mirror) const
+  {
+    // Returns canonical facet
+    return (facet < mirror) ? facet : mirror;
+  }
+
+public:
+  template<typename Container_element>
+  Facet extract_element_from_container_value(const Container_element &e) const
+  {
+    return e;
+  }
+
+#endif
+
+protected:
+  /// Stores index of vertex that may be inserted into triangulation
+  mutable Index m_last_vertex_index;
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Index, typename Facet>
+class Refine_facets_3_handle_queue_base<Index, Facet, Parallel_tag>
+{
+protected:
+  Refine_facets_3_handle_queue_base() : m_last_vertex_index(Index()) {}
+
+  Index get_last_vertex_index() const
+  {
+    return m_last_vertex_index.local();
+  }
+
+  void set_last_vertex_index(Index i) const
+  {
+    m_last_vertex_index.local() = i;
+  }
+
+  CGAL::cpp11::tuple<Facet, unsigned int, Facet, unsigned int>
+  from_facet_to_refinement_queue_element(const Facet &facet,
+                                         const Facet &mirror) const
+  {
+    return CGAL::cpp11::make_tuple(
+      facet, facet.first->erase_counter(),
+      mirror, mirror.first->erase_counter());
+  }
+
+public:
+  template<typename Container_element>
+  Facet extract_element_from_container_value(const Container_element &e) const
+  {
+    // We get the first Facet inside the tuple
+    return CGAL::cpp11::get<0>(e);
+  }
+
+protected:
+  /// Stores index of vertex that may be inserted into triangulation
+  mutable tbb::enumerable_thread_specific<Index> m_last_vertex_index;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+template<class Tr,
+         class Criteria,
+         class MeshDomain,
+         class Complex3InTriangulation3,
+         class Concurrency_tag,
+         class Container_
+         >
+class Refine_facets_3_base
+  : public Refine_facets_3_handle_queue_base<typename MeshDomain::Index,
+                                             typename Tr::Facet,
+                                             Concurrency_tag>
+  , public Container_
+{
+  typedef typename Tr::Point Point;
+  typedef typename Tr::Facet Facet;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+  typedef typename Tr::Cell_handle Cell_handle;
+  typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
+
+  typedef typename Tr::Geom_traits Gt;
+  typedef typename Gt::Segment_3 Segment_3;
+  typedef typename Gt::Ray_3 Ray_3;
+  typedef typename Gt::Line_3 Line_3;
+
+public:
+  Refine_facets_3_base(Tr& tr, Complex3InTriangulation3& c3t3,
+                       const MeshDomain& oracle,
+                       const Criteria& criteria)
+    : r_tr_(tr)
+    , r_criteria_(criteria)
+    , r_oracle_(oracle)
+    , r_c3t3_(c3t3)
+  {}
+
+  void scan_triangulation_impl_amendement() const {}
+
+  /// Gets the point to insert from the element to refine
+  Point refinement_point_impl(const Facet& facet) const
+  {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    const Cell_handle c = facet.first;
+    const int i = facet.second;
+    std::cerr << "Facet ("
+              << c->vertex((i+1)&3)->point() << " , "
+              << c->vertex((i+2)&3)->point() << " , "
+              << c->vertex((i+3)&3)->point() << ") : refinement point is "
+              << get_facet_surface_center(facet) << std::endl;
+#endif
+    CGAL_assertion (this->is_facet_on_surface(facet));
+    this->set_last_vertex_index(get_facet_surface_center_index(facet));
+    return get_facet_surface_center(facet);
+  };
+
+  Facet get_next_element_impl()
+  {
+    return this->extract_element_from_container_value(
+      Container_::get_next_element_impl());
+  }
+
+  /// Job to do before insertion
+  void before_insertion_impl(const Facet& facet,
+                             const Point& point,
+                             Zone& zone);
+
+  /// Job to do after insertion
+  void after_insertion_impl(const Vertex_handle& v)
+  {
+    restore_restricted_Delaunay(v);
+  }
+
+  /// debug info: class name
+  std::string debug_info_class_name_impl() const
+  {
+    return "Refine_facets_3";
+  }
+
+  /// debug info
+  std::string debug_info() const
+  {
+    std::stringstream s;
+    s << Container_::size();
+    return s.str();
+  }
+
+  /// debug_info_header
+  std::string debug_info_header() const
+  {
+    return "#facets to refine";
+  }
+
+  std::string debug_info_element_impl(const Facet &facet) const
+  {
+    std::stringstream sstr;
+    sstr << "Facet { " << std::endl
+    << "  - " << *facet.first->vertex((facet.second+1)%4)  << std::endl
+    << "  - " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+    << "  - " << *facet.first->vertex((facet.second+3)%4)  << std::endl
+    << "  - 4th vertex in cell: " << *facet.first->vertex(facet.second)  << std::endl
+    << "}" << std::endl;
+
+    return sstr.str();
+  }
+
+protected:
+
+  // Functor for scan_triangulation_impl function
+  template <typename Refine_facets_>
+  class Scan_facet
+  {
+    Refine_facets_ & m_refine_facets;
+
+    typedef typename Refine_facets_::Facet Facet;
+
+  public:
+    // Constructor
+    Scan_facet(Refine_facets_ & rf)
+    : m_refine_facets(rf)
+    {}
+
+    // Constructor
+    Scan_facet(const Scan_facet &sf)
+    : m_refine_facets(sf.m_refine_facets)
+    {}
+
+    // operator()
+    // f cannot be const, see treat_new_facet signature
+    void operator()( Facet f ) const
+    {
+      m_refine_facets.treat_new_facet(f);
+    }
+  };
+
+
+protected:
+  //-------------------------------------------------------
+  // Private types
+  //-------------------------------------------------------
+  typedef typename Criteria::Facet_quality Quality;
+  typedef typename Get_Is_facet_bad<Criteria>::Type Is_facet_bad;
+  typedef typename MeshDomain::Surface_patch_index Surface_patch_index;
+  typedef typename MeshDomain::Index Index;
+  typedef typename Gt::Bare_point Bare_point;
+
+  typedef typename boost::optional<
+    CGAL::cpp11::tuple<Surface_patch_index, Index, Point> >
+                                                      Facet_properties;
+
+
+  /// Returns canonical facet of facet
+  Facet canonical_facet(const Facet& facet) const
+  {
+    const Facet mirror = mirror_facet(facet);
+    return ( (facet < mirror)?facet:mirror );
+  }
+
+  /// Returns true if f has already been visited
+  bool is_facet_visited(const Facet& f) const
+  {
+    return f.first->is_facet_visited(f.second);
+  }
+
+  /// Sets facet f to visited
+  void set_facet_visited(Facet& f) const
+  {
+    f.first->set_facet_visited(f.second);
+  }
+
+  /// Sets facet f and it's mirror one surface center to point p
+  void set_facet_surface_center(const Facet& f,
+                                const Point& p,
+                                const Index& index) const
+  {
+    const Facet mirror = mirror_facet(f);
+
+    f.first->set_facet_surface_center(f.second, p);
+    mirror.first->set_facet_surface_center(mirror.second, p);
+
+    f.first->set_facet_surface_center_index(f.second,index);
+    mirror.first->set_facet_surface_center_index(mirror.second,index);
+  }
+
+  /// Returns facet surface center of \c f
+  Point get_facet_surface_center(const Facet& f) const
+  {
+    return f.first->get_facet_surface_center(f.second);
+  }
+
+  /// Returns index of surface center of facet \c f
+  Index get_facet_surface_center_index(const Facet& f) const
+  {
+    return f.first->get_facet_surface_center_index(f.second);
+  }
+
+  /// Sets \c f to surface facets, with index \c index
+  void set_facet_on_surface(const Facet& f,
+                            const Surface_patch_index& index)
+  {
+    r_c3t3_.add_to_complex(f, index);
+  }
+
+  /// Returns index of facet \c f
+  Surface_patch_index get_facet_surface_index(const Facet& f) const
+  {
+    return r_c3t3_.surface_patch_index(f.first, f.second);
+  }
+
+  /// Sets index and dimension of vertex \v
+  void set_vertex_properties(Vertex_handle& v, const Index& index)
+  {
+    r_c3t3_.set_index(v, index);
+    // Set dimension of v: v is on surface by construction, so dimension=2
+    v->set_dimension(2);
+  }
+
+  /// Compute the (exact) dual of a facet
+  void dual_segment(const Facet & f, Bare_point& p1, Bare_point& p2) const;
+
+  void dual_segment_exact(const Facet & f, Bare_point& p1, Bare_point& p2) const;
+
+  void dual_ray(const Facet & f, Ray_3& ray) const;
+
+  void dual_ray_exact(const Facet & f, Ray_3& ray) const;
+
+  /// Returns true if point encroaches facet
+  bool is_facet_encroached(const Facet& facet, const Point& point) const;
+
+  /// Returns whethere an encroached facet is refinable or not
+  bool is_encroached_facet_refinable(Facet& facet) const;
+
+  /// Insert facet into refinement queue
+  void insert_bad_facet(Facet& facet, const Quality& quality)
+  {
+    // Insert the facet and its mirror
+    this->add_bad_element(
+      this->from_facet_to_refinement_queue_element(facet, mirror_facet(facet)),
+      quality);
+  }
+
+  /// Insert encroached facet into refinement queue
+  void insert_encroached_facet_in_queue(Facet& facet)
+  {
+    insert_bad_facet(facet,Quality());
+  }
+
+protected:
+  /**
+   * Action to perform on a facet inside the conflict zone before insertion
+   * @return true if source_facet is the same as facet or mirror(facet)
+   */
+  bool before_insertion_handle_facet_in_conflict_zone(Facet& facet,
+                                                     const Facet& source_facet);
+
+  /**
+   * Action to perform on a facet on the boundary of the conflict zone
+   * before insertion
+   * @return true if source_facet is the same as facet or mirror(facet)
+   */
+  bool before_insertion_handle_facet_on_conflict_zone(Facet& facet,
+                                                      const Facet& source_facet)
+  {
+    // perform the same operations as for an internal facet
+    return before_insertion_handle_facet_in_conflict_zone(facet, source_facet);
+  }
+
+  /// Restore restricted Delaunay ; may be call by Cells_mesher visitor
+  void restore_restricted_Delaunay(const Vertex_handle& v);
+
+  /// Action to perform on a facet incident to the new vertex
+  void after_insertion_handle_incident_facet(Facet& facet);
+
+  /// Action to perform on a facet opposite to the new vertex
+  void after_insertion_handle_opposite_facet(Facet& facet)
+  {
+    // perform the same operations as for a facet incident to the new vertex
+    after_insertion_handle_incident_facet(facet);
+  }
+
+  /// Get mirror facet
+  Facet mirror_facet(const Facet& f) const { return r_tr_.mirror_facet(f); };
+
+  /// for debugging
+  std::string display_dual(Facet f) const
+  {
+    std::stringstream stream;
+    stream.precision(17);
+    Object dual = r_tr_.dual(f);
+
+    if ( const Segment_3* p_segment = object_cast<Segment_3>(&dual) ) {
+      stream << "Segment(" << p_segment->source()
+             << " , " << p_segment->target() << ")";
+    }
+    else if ( const Ray_3* p_ray = object_cast<Ray_3>(&dual) ) {
+      stream << "Ray(" << p_ray->point(0)
+             << " , " << p_ray->point(1)
+             << "), with vector (" << p_ray->to_vector() << ")";
+    }
+    else if ( const Line_3* p_line = object_cast<Line_3>(&dual) ) {
+      stream << "Line(point=" << p_line->point(0)
+             << " , vector=" << p_line->to_vector() << ")";
+    }
+    return stream.str();
+  }
+
+  /// Returns to if f is on surface
+  bool is_facet_on_surface(const Facet& f) const
+  {
+    return r_c3t3_.is_in_complex(f) ;
+  }
+
+  /// Removes \c f from surface facets
+  void remove_facet_from_surface(const Facet& f)
+  {
+    r_c3t3_.remove_from_complex(f);
+  }
+
+  /// Removes facet from refinement queue
+  // Sequential
+  void remove_bad_facet(Facet& facet, Sequential_tag)
+  {
+    // If sequential AND NOT lazy, remove cell from refinement queue
+#if !defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
+ && !defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
+    // Remove canonical facet
+    Facet canonical_facet = this->canonical_facet(facet);
+    this->remove_element(canonical_facet);
+#endif
+  }
+#ifdef CGAL_LINKED_WITH_TBB
+  /// Removes facet from refinement queue
+  // Parallel: it's always lazy, so do nothing
+  void remove_bad_facet(Facet&, Parallel_tag) {}
+#endif // CGAL_LINKED_WITH_TBB
+
+  /// Sets facet f to not visited
+  void reset_facet_visited(Facet& f) const
+  {
+    f.first->reset_visited(f.second);
+  }
+
+  /// Computes facet properties and add facet to the refinement queue if needed
+  void treat_new_facet(Facet& facet);
+
+  /**
+   * Computes at once is_facet_on_surface and facet_surface_center.
+   * @param facet The input facet
+   * @return \c true if \c facet is on surface, \c false otherwise
+   */
+  void compute_facet_properties(const Facet& facet, Facet_properties& fp,
+                                bool force_exact = false ) const;
+
+protected:
+  /// The triangulation
+  Tr& r_tr_;
+  /// The facet criteria
+  const Criteria& r_criteria_;
+  /// The oracle
+  const MeshDomain& r_oracle_;
+  /// The mesh result
+  Complex3InTriangulation3& r_c3t3_;
+}; // end class template Refine_facets_3_base
+
+/************************************************
+// Class Refine_facets_3
+//
+// Template parameters should be models of
+// Tr         : MeshTriangulation_3
+// Criteria   : SurfaceMeshFacetsCriteria_3
+// MeshDomain : MeshTraits_3
+//
+// Implements a Mesher_level for facets
+************************************************/
+
+// TODO document Container_ requirements
+template<class Tr,
+         class Criteria,
+         class MeshDomain,
+         class Complex3InTriangulation3,
+         class Previous_level_,
+         class Concurrency_tag,
+         template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2>
+            class Base_ = Refine_facets_3_base,
+#ifdef CGAL_LINKED_WITH_TBB
+         class Container_ = typename boost::mpl::if_c // (parallel/sequential?)
+         <
+          boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
+          // Parallel
+# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
+          Meshes::Filtered_deque_container
+# else
+          Meshes::Filtered_multimap_container
+# endif
+          <
+            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
+                               typename Tr::Facet, unsigned int>,
+            typename Criteria::Facet_quality,
+            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
+            Concurrency_tag
+          >,
+          // Sequential
+# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
+          Meshes::Filtered_deque_container
+          <
+            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
+                               typename Tr::Facet, unsigned int>,
+            typename Criteria::Facet_quality,
+            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
+            Concurrency_tag
+          >
+# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE)
+          Meshes::Filtered_multimap_container
+          <
+            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
+                               typename Tr::Facet, unsigned int>,
+            typename Criteria::Facet_quality,
+            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
+            Concurrency_tag
+          >
+# else
+          Meshes::Double_map_container<typename Tr::Facet,
+                                       typename Criteria::Facet_quality>
+# endif
+         >::type // boost::if (parallel/sequential)
+
+#else // !CGAL_LINKED_WITH_TBB
+
+         // Sequential
+         class Container_ =
+# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE
+          Meshes::Filtered_deque_container
+          <
+            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
+                               typename Tr::Facet, unsigned int>,
+            typename Criteria::Facet_quality,
+            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
+            Concurrency_tag
+          >
+# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE)
+          Meshes::Filtered_multimap_container
+          <
+            CGAL::cpp11::tuple<typename Tr::Facet, unsigned int,
+                               typename Tr::Facet, unsigned int>,
+            typename Criteria::Facet_quality,
+            Facet_to_refine_is_not_zombie<typename Tr::Facet>,
+            Concurrency_tag
+          >
+# else
+          Meshes::Double_map_container<typename Tr::Facet,
+                                       typename Criteria::Facet_quality>
+# endif
+#endif // CGAL_LINKED_WITH_TBB
+>
+class Refine_facets_3
+: public Base_<Tr,
+               Criteria,
+               MeshDomain,
+               Complex3InTriangulation3,
+               Concurrency_tag,
+               Container_>
+, public Mesh_3::Mesher_level<Tr,
+                      Refine_facets_3<Tr,
+                                      Criteria,
+                                      MeshDomain,
+                                      Complex3InTriangulation3,
+                                      Previous_level_,
+                                      Concurrency_tag,
+                                      Base_,
+                                      Container_>,
+                      typename Tr::Facet,
+                      Previous_level_,
+                      Triangulation_mesher_level_traits_3<Tr>,
+                      Concurrency_tag >
+, public No_after_no_insertion
+, public No_before_conflicts
+{
+  // Self
+  typedef Refine_facets_3<Tr,
+                          Criteria,
+                          MeshDomain,
+                          Complex3InTriangulation3,
+                          Previous_level_,
+                          Concurrency_tag,
+                          Base_,
+                          Container_> Self;
+
+  typedef Base_<Tr,
+                Criteria,
+                MeshDomain,
+                Complex3InTriangulation3,
+                Concurrency_tag,
+                Container_> Rf_base;
+
+  typedef Rf_base Base;
+
+  typedef Mesher_level<Tr,
+                       Self,
+                       typename Tr::Facet,
+                       Previous_level_,
+                       Triangulation_mesher_level_traits_3<Tr>,
+                       Concurrency_tag >               Base_ML;
+
+  typedef typename Tr::Lock_data_structure Lock_data_structure;
+
+public:
+  using Base_ML::add_to_TLS_lists;
+  using Base_ML::splice_local_lists;
+
+  typedef Container_ Container; // Because we need it in Mesher_level
+  typedef typename Container::Element Container_element;
+  typedef typename Tr::Point Point;
+  typedef typename Tr::Facet Facet;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+  typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
+  typedef Complex3InTriangulation3 C3T3;
+
+  /// Constructor
+  // For sequential
+  Refine_facets_3(Tr& triangulation,
+                  const Criteria& criteria,
+                  const MeshDomain& oracle,
+                  Previous_level_& previous,
+                  C3T3& c3t3);
+  // For parallel
+  Refine_facets_3(Tr& triangulation,
+                  const Criteria& criteria,
+                  const MeshDomain& oracle,
+                  Previous_level_& previous,
+                  C3T3& c3t3,
+                  Lock_data_structure *lock_ds,
+                  WorksharingDataStructureType *worksharing_ds);
+
+  /// Destructor
+  virtual ~Refine_facets_3() { }
+
+  /// Get a reference on triangulation
+  Tr& triangulation_ref_impl() { return this->r_tr_; }
+  const Tr& triangulation_ref_impl() const { return this->r_tr_; }
+
+  /// Initialization function
+  void scan_triangulation_impl();
+
+  int number_of_bad_elements_impl();
+
+  Point circumcenter_impl(const Facet& facet) const
+  {
+    return get_facet_surface_center(facet);
+  }
+
+  template <typename Mesh_visitor>
+  void before_next_element_refinement_in_superior_impl(Mesh_visitor visitor)
+  {
+    // Before refining any cell, we refine the facets in the local refinement
+    // queue
+    this->treat_local_refinement_queue(visitor);
+  }
+
+  void before_next_element_refinement_impl()
+  {
+  }
+
+  Facet get_next_local_element_impl()
+  {
+    return extract_element_from_container_value(
+      Container_::get_next_local_element_impl());
+  }
+
+  /// Tests if p encroaches facet from zone
+  // For sequential
+  Mesher_level_conflict_status
+  test_point_conflict_from_superior_impl(const Point& p, Zone& zone);
+
+  /// Tests if p encroaches facet from zone
+  // For parallel
+  template <typename Mesh_visitor>
+  Mesher_level_conflict_status
+  test_point_conflict_from_superior_impl(const Point& p, Zone& zone,
+                                         Mesh_visitor &visitor);
+
+  /// Useless here
+  Mesher_level_conflict_status private_test_point_conflict_impl(
+      const Point& p,
+      Zone& zone)
+  {
+    if( zone.locate_type == Tr::VERTEX )
+    {
+      std::stringstream sstr;
+      sstr << "(" << p << ") is already inserted on surface.\n";
+      CGAL_error_msg(sstr.str().c_str());
+      return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
+    }
+    else
+      return NO_CONFLICT;
+  }
+
+  /// Returns the conflicts zone
+  Zone conflicts_zone_impl(const Point& point
+                           , const Facet& facet
+                           , bool &facet_is_in_its_cz);
+  Zone conflicts_zone_impl(const Point& point
+                           , const Facet& facet
+                           , bool &facet_is_in_its_cz
+                           , bool &could_lock_zone);
+
+  /// Insert p into triangulation
+  Vertex_handle insert_impl(const Point& p, const Zone& zone);
+
+  bool try_lock_element(const Facet &f, int lock_radius = 0) const
+  {
+    return this->triangulation().try_lock_facet(f, lock_radius);
+  }
+
+#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED
+  std::size_t queue_size() const { return this->size(); }
+#endif
+
+
+private:
+  // private types
+  typedef typename Tr::Cell_handle Cell_handle;
+  typedef typename MeshDomain::Surface_patch_index Surface_patch_index;
+  typedef typename MeshDomain::Index Index;
+  typedef typename Tr::Geom_traits Gt;
+  typedef typename Gt::Bare_point Bare_point;
+  typedef typename Gt::Ray_3 Ray_3;
+
+private:
+  // Disabled copy constructor
+  Refine_facets_3(const Self& src);
+  // Disabled assignment operator
+  Self& operator=(const Self& src);
+};  // end class Refine_facets_3
+
+
+
+
+// For sequential
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+Refine_facets_3(Tr& triangulation,
+                const Cr& criteria,
+                const MD& oracle,
+                P_& previous,
+                C3T3& c3t3)
+  : Rf_base(triangulation, c3t3, oracle, criteria)
+  , Mesher_level<Tr, Self, Facet, P_,
+      Triangulation_mesher_level_traits_3<Tr>, Ct>(previous)
+  , No_after_no_insertion()
+  , No_before_conflicts()
+{
+
+}
+
+// For parallel
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+Refine_facets_3(Tr& triangulation,
+                const Cr& criteria,
+                const MD& oracle,
+                P_& previous,
+                C3T3& c3t3,
+                Lock_data_structure *lock_ds,
+                WorksharingDataStructureType *worksharing_ds)
+  : Rf_base(triangulation, c3t3, oracle, criteria)
+  , Mesher_level<Tr, Self, Facet, P_,
+      Triangulation_mesher_level_traits_3<Tr>, Ct>(previous)
+  , No_after_no_insertion()
+  , No_before_conflicts()
+{
+  Base::set_lock_ds(lock_ds);
+  Base::set_worksharing_ds(worksharing_ds);
+}
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+void
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+scan_triangulation_impl()
+{
+  typedef typename Tr::Finite_facets_iterator Finite_facet_iterator;
+
+#ifdef CGAL_MESH_3_PROFILING
+  WallClockTimer t;
+#endif
+
+#ifdef CGAL_MESH_3_VERY_VERBOSE
+  std::cerr
+    << "Vertices: " << this->r_c3t3_.triangulation().number_of_vertices() << std::endl
+    << "Facets  : " << this->r_c3t3_.number_of_facets_in_complex() << std::endl
+    << "Tets    : " << this->r_c3t3_.number_of_cells_in_complex() << std::endl;
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Ct, Parallel_tag>::value)
+  {
+# if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << "Scanning triangulation for bad facets (in parallel) - "
+      "number of finite facets = "
+      << this->r_c3t3_.triangulation().number_of_finite_facets() << "..."
+      << std::endl;
+# endif
+    add_to_TLS_lists(true);
+
+    // PARALLEL_DO
+    tbb::parallel_do(
+      this->r_tr_.finite_facets_begin(), this->r_tr_.finite_facets_end(),
+      typename Rf_base::template Scan_facet<Self>(*this) 
+    );
+
+    splice_local_lists();
+    add_to_TLS_lists(false);
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << "Scanning triangulation for bad facets (sequential) - "
+      "number of finite facets = "
+      << this->r_c3t3_.triangulation().number_of_finite_facets() << "..."
+      << std::endl;
+#endif
+    for(Finite_facet_iterator facet_it = this->r_tr_.finite_facets_begin();
+        facet_it != this->r_tr_.finite_facets_end();
+        ++facet_it)
+    {
+      // Cannot be const, see treat_new_facet signature
+      Facet facet = *facet_it;
+      /*std::cerr << "*" << *facet.first->vertex((facet.second+1)%4)  << std::endl
+          << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+          << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl;*/
+      this->treat_new_facet(facet);
+    }
+  }
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "==== Facet scan: " << t.elapsed() << " seconds ===="
+            << std::endl << std::endl;
+#endif
+
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+  std::cerr << "Number of bad facets: " << C_::size() << std::endl;
+#endif
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << "Refining... ";
+  Base_ML::m_timer.reset();
+#endif
+  Base::scan_triangulation_impl_amendement();
+}
+
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+int
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+number_of_bad_elements_impl()
+{
+  typedef typename Tr::Finite_facets_iterator Finite_facet_iterator;
+
+  int count = 0, count_num_bad_surface_facets = 0;
+  int num_internal_facets_that_should_be_on_surface = 0;
+#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+  std::cerr << "Scanning triangulation for bad facets - "
+    "number of finite facets = "
+    << this->r_c3t3_.triangulation().number_of_finite_facets() << "...";
+#endif
+  int num_tested_facets = 0;
+  for(Finite_facet_iterator facet_it = this->r_tr_.finite_facets_begin();
+      facet_it != this->r_tr_.finite_facets_end();
+      ++facet_it)
+  {
+    Facet facet = *facet_it;
+    typename Rf_base::Facet_properties properties;
+    compute_facet_properties(facet, properties);
+
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+    //facet.first->mark = 0;
+#endif
+
+    // On surface?
+    if ( properties )
+    {
+      // This facet should be on surface...
+      if (!this->is_facet_on_surface(facet))
+      {
+        std::cerr << "\n\n*** The facet f is on surface but is NOT MARKED ON SURFACE. " << std::endl;
+
+        Cell_handle c = facet.first;
+        int ind = facet.second;
+        Cell_handle mc = mirror_facet(facet).first;
+        int mind = mirror_facet(facet).second;
+
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+        c->mark2 = ind;
+#endif
+
+        // c and mc are the cells adjacent to f
+        // browse each facet ff of c and mc, and mark it if it is "on surface"
+        int num_erroneous_surface_facets_in_c = 0;
+        int num_erroneous_surface_facets_in_mc = 0;
+        int num_real_surface_facets_in_c = 0;
+        int num_real_surface_facets_in_mc = 0;
+        for (int i = 0 ; i < 4 ; ++i)
+        {
+          if (i != ind)
+          {
+            const Facet f1(c, i);
+            if (this->is_facet_on_surface(f1))
+            {
+              std::cerr << "*** f1 is " << (this->r_criteria_(f1) ? "bad" : "good") << std::endl;
+
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+              c->mark = i;
+#endif
+              typename Rf_base::Facet_properties properties;
+              compute_facet_properties(f1, properties);
+              if (properties)
+                ++num_real_surface_facets_in_c;
+              else
+                ++num_erroneous_surface_facets_in_c;
+            }
+          }
+          if (i != mind)
+          {
+            const Facet f2(c, i);
+            if (this->is_facet_on_surface(f2))
+            {
+              std::cerr << "*** f2 is " << (this->r_criteria_(f2) ? "bad" : "good") << std::endl;
+
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+              mc->mark = i;
+#endif
+              typename Rf_base::Facet_properties properties;
+              this->compute_facet_properties(f2, properties);
+              if (properties)
+                ++num_real_surface_facets_in_mc;
+              else
+                ++num_erroneous_surface_facets_in_mc;
+            }
+          }
+        }
+
+        std::cerr
+          << "*** Num of erroneous surface facets in c: " << num_erroneous_surface_facets_in_c << std::endl
+          << "*** Num of erroneous surface facets in mc: " << num_erroneous_surface_facets_in_mc << std::endl
+          << "*** Num of real surface facets in c: " << num_real_surface_facets_in_c << std::endl
+          << "*** Num of real surface facets in mc: " << num_real_surface_facets_in_mc << std::endl;
+
+        const bool is_c_in_domain = this->r_oracle_.is_in_domain_object()(this->r_tr_.dual(c));
+        const bool is_mc_in_domain = this->r_oracle_.is_in_domain_object()(this->r_tr_.dual(mc));
+
+        std::cerr << "*** Is in complex? c is marked in domain: " << this->r_c3t3_.is_in_complex(c)
+          << " / c is really in domain: " << is_c_in_domain
+          << " / mc is marked in domain: " << this->r_c3t3_.is_in_complex(mc)
+          << " / mc is really in domain: " << is_mc_in_domain
+          << std::endl;
+
+
+        // ... if it's not, count it
+        ++num_internal_facets_that_should_be_on_surface;
+
+      }
+
+      const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
+      const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
+      const Point& surface_center = CGAL::cpp11::get<2>(*properties);
+
+      // Facet is on surface: set facet properties
+      //set_facet_surface_center(facet, surface_center, surface_center_index);
+      //set_facet_on_surface(facet, surface_index);
+
+      const typename Rf_base::Is_facet_bad is_facet_bad = this->r_criteria_(facet);
+      if ( is_facet_bad )
+      {
+        ++count;
+        if (this->is_facet_on_surface(facet))
+          ++count_num_bad_surface_facets;
+
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+        //facet.first->mark = facet.second;
+#endif
+      }
+      ++ num_tested_facets;
+    }
+    // Not on surface?
+    else
+    {
+      // Facet is not on surface
+      //remove_facet_from_surface(facet);
+
+      // Marked on surface?
+      if (this->is_facet_on_surface(facet))
+      {
+        std::cerr << "************** The facet is marked on surface whereas it's not! **************" << std::endl;
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+        facet.first->mark = facet.second;
+#endif
+      }
+    }
+  }
+
+  /*std::cerr << "done (" << num_internal_facets_that_should_be_on_surface
+    << " facets which were internal facets were added to the surface)." << std::endl;*/
+  std::cerr << "done (" << num_internal_facets_that_should_be_on_surface
+    << " facets that should be on surface are actually internal facets)." << std::endl;
+  std::cerr << std::endl << "Num_tested_facets = " << num_tested_facets << std::endl;
+  std::cerr << std::endl << "Num bad surface-marked facets = " << count_num_bad_surface_facets << std::endl;
+
+  return count;
+}
+
+// For sequential
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+Mesher_level_conflict_status
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+test_point_conflict_from_superior_impl(const Point& point, Zone& zone)
+{
+  typedef typename Zone::Facets_iterator Facet_iterator;
+
+  for (Facet_iterator facet_it = zone.internal_facets.begin();
+       facet_it != zone.internal_facets.end();
+       ++facet_it)
+  {
+    // surface facets which are internal facets of the conflict zone are
+    // encroached
+    if( this->is_facet_on_surface(*facet_it) )
+    {
+      if ( this->is_encroached_facet_refinable(*facet_it) )
+      {
+        this->insert_encroached_facet_in_queue(*facet_it);
+        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
+      }
+      else
+        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
+    }
+  }
+
+  for (Facet_iterator facet_it = zone.boundary_facets.begin();
+       facet_it != zone.boundary_facets.end();
+       ++facet_it)
+  {
+    if( this->is_facet_encroached(*facet_it, point) )
+    {
+      // Insert already existing surface facet into refinement queue
+      if ( this->is_encroached_facet_refinable(*facet_it) )
+      {
+        this->insert_encroached_facet_in_queue(*facet_it);
+        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
+      }
+      else
+        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
+    }
+  }
+
+  return NO_CONFLICT;
+}
+
+// For parallel
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+template <typename Mesh_visitor>
+Mesher_level_conflict_status
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+test_point_conflict_from_superior_impl(const Point& point, Zone& zone,
+                                       Mesh_visitor &visitor)
+{
+  typedef typename Zone::Facets_iterator Facet_iterator;
+
+  for (Facet_iterator facet_it = zone.internal_facets.begin();
+       facet_it != zone.internal_facets.end();
+       ++facet_it)
+  {
+    // surface facets which are internal facets of the conflict zone are
+    // encroached
+    if( this->is_facet_on_surface(*facet_it) )
+    {
+      if ( this->is_encroached_facet_refinable(*facet_it) )
+      {
+        // Even if it doesn't succeed, it will be tried again
+        this->try_to_refine_element(*facet_it, visitor);
+        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
+      }
+      else
+        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
+    }
+  }
+
+  for (Facet_iterator facet_it = zone.boundary_facets.begin();
+       facet_it != zone.boundary_facets.end();
+       ++facet_it)
+  {
+    if( this->is_facet_encroached(*facet_it, point) )
+    {
+      // Insert already existing surface facet into refinement queue
+      if ( this->is_encroached_facet_refinable(*facet_it) )
+      {
+        // Even if it doesn't succeed, it will be tried again
+        this->try_to_refine_element(*facet_it, visitor);
+        return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED;
+      }
+      else
+        return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
+    }
+  }
+
+  return NO_CONFLICT;
+}
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::Zone
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+conflicts_zone_impl(const Point& point
+                    , const Facet& facet
+                    , bool &facet_is_in_its_cz)
+{
+  Zone zone;
+
+  // TODO may be avoid the locate here
+  zone.cell = this->r_tr_.locate(point,
+                                 zone.locate_type,
+                                 zone.i,
+                                 zone.j,
+                                 facet.first);
+
+  if(zone.locate_type != Tr::VERTEX)
+  {
+    const Facet *p_facet = (facet == Facet() ? 0 : &facet);
+
+    this->r_tr_.find_conflicts(point,
+                               zone.cell,
+                               std::back_inserter(zone.boundary_facets),
+                               std::back_inserter(zone.cells),
+                               std::back_inserter(zone.internal_facets)
+                               , 0
+                               , p_facet
+                               , &facet_is_in_its_cz);
+
+    if (p_facet != 0 && !facet_is_in_its_cz)
+    {
+# ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << "Info: the facet is not in the conflict zone of (" << point
+                << "). Switching to exact computation." << std::endl;
+# endif
+      
+      typename Rf_base::Facet_properties properties;
+      this->compute_facet_properties(facet, properties, /*force_exact=*/true);
+      if ( properties )
+      {
+        const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
+        const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
+        const Point& surface_center = CGAL::cpp11::get<2>(*properties);
+
+        // Facet is on surface: set facet properties
+        this->set_facet_surface_center(facet, surface_center, surface_center_index);
+        this->set_facet_on_surface(facet, surface_index);
+      }
+      else
+      {
+        // Facet is not on surface
+        this->remove_facet_from_surface(facet);
+      }
+    }
+  }
+
+  return zone;
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::Zone
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+conflicts_zone_impl(const Point& point
+                    , const Facet& facet
+                    , bool &facet_is_in_its_cz
+                    , bool &could_lock_zone)
+{
+  Zone zone;
+
+  // TODO may be avoid the locate here
+  zone.cell = this->r_tr_.locate(point,
+                                 zone.locate_type,
+                                 zone.i,
+                                 zone.j,
+                                 facet.first,
+                                 &could_lock_zone);
+
+  if(could_lock_zone && zone.locate_type != Tr::VERTEX)
+  {
+    const Facet *p_facet = (facet == Facet() ? 0 : &facet);
+
+    this->r_tr_.find_conflicts(point,
+                               zone.cell,
+                               std::back_inserter(zone.boundary_facets),
+                               std::back_inserter(zone.cells),
+                               std::back_inserter(zone.internal_facets)
+                               , &could_lock_zone
+                               , p_facet
+                               , &facet_is_in_its_cz);
+
+    if (could_lock_zone && p_facet != 0 && !facet_is_in_its_cz)
+    {
+#ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << "Info: the facet is not in its conflict zone. "
+        "Switching to exact computation." << std::endl;
+#endif
+
+      typename Rf_base::Facet_properties properties;
+      this->compute_facet_properties(facet, properties, /*force_exact=*/true);
+      if ( properties )
+      {
+        const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
+        const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
+        const Point& surface_center = CGAL::cpp11::get<2>(*properties);
+
+        // Facet is on surface: set facet properties
+        this->set_facet_surface_center(facet, surface_center, surface_center_index);
+        this->set_facet_on_surface(facet, surface_index);
+      }
+      else
+      {
+        // Facet is not on surface
+        this->remove_facet_from_surface(facet);
+      }
+    }
+  }
+
+  return zone;
+}
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+before_insertion_impl(const Facet& facet,
+                      const Point& point,
+                      Zone& zone)
+{
+  typedef typename Zone::Facets_iterator Facets_iterator;
+
+  bool source_facet_is_in_conflict = false;
+
+  /*std::cerr << "before_insertion_impl:" << std::endl
+    << "* " << *facet.first->vertex((facet.second+1)%4)  << std::endl
+    << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+    << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl;*/
+
+  // Iterate on conflict zone facets
+  for (Facets_iterator facet_it = zone.internal_facets.begin();
+       facet_it != zone.internal_facets.end();
+       ++facet_it)
+  {
+    if (before_insertion_handle_facet_in_conflict_zone(*facet_it, facet) )
+    {
+      source_facet_is_in_conflict = true;
+    }
+  }
+
+  for (Facets_iterator facet_it = zone.boundary_facets.begin() ;
+       facet_it != zone.boundary_facets.end() ;
+       ++facet_it)
+  {
+    if (before_insertion_handle_facet_on_conflict_zone(*facet_it, facet))
+    {
+      source_facet_is_in_conflict = true;
+    }
+  }
+
+  // source_facet == Facet() when this->before_insertion_impl is
+  // called from a Mesh_3 visitor.
+  if ( !source_facet_is_in_conflict && facet != Facet()  )
+  {
+    const Facet source_other_side = mirror_facet(facet);
+
+    using boost::io::group;
+    using std::setprecision;
+
+    std::stringstream error_msg;
+    error_msg <<
+      boost::format("Mesh_3 ERROR: "
+                    "A facet is not in conflict with its refinement point!\n"
+                    "Debugging informations:\n"
+                    "  Facet: (%1%, %2%) = (%6%, %7%, %8%)\n"
+                    "  Dual: %3%\n"
+                    "  Refinement point: %5%\n"
+                    "  Cells adjacent to facet:\n"
+                    "    ( %9% , %10% , %11% , %12% )\n"
+                    "    ( %13% , %14% , %15% , %16% )\n")
+      % group(setprecision(17), (&*facet.first))
+      % group(setprecision(17), facet.second)
+      % display_dual(facet)
+      % 0 // dummy: %4% no longer used
+      % group(setprecision(17), point)
+      % group(setprecision(17), facet.first->vertex((facet.second + 1)&3)->point())
+      % group(setprecision(17), facet.first->vertex((facet.second + 2)&3)->point())
+      % group(setprecision(17), facet.first->vertex((facet.second + 3)&3)->point())
+      % facet.first->vertex(0)->point()
+      % facet.first->vertex(1)->point()
+      % facet.first->vertex(2)->point()
+      % facet.first->vertex(3)->point()
+      % source_other_side.first->vertex(0)->point()
+      % source_other_side.first->vertex(1)->point()
+      % source_other_side.first->vertex(2)->point()
+      % source_other_side.first->vertex(3)->point();
+
+    CGAL_error_msg(error_msg.str().c_str());
+  }
+}
+
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class P_, class Ct, template<class Tr_, class Cr_, class MD_, class C3T3_2, class Ct_, class C_2> class B_, class C_>
+typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::Vertex_handle
+Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
+insert_impl(const Point& point,
+            const Zone& zone)
+{
+  if( zone.locate_type == Tr::VERTEX )
+  {
+    // TODO look at this
+    std::cerr<<"VERTEX\n";
+    return zone.cell->vertex(zone.i);
+  }
+
+  const Facet& facet = *(zone.boundary_facets.begin());
+
+  Vertex_handle v = this->r_tr_.insert_in_hole(point,
+                                               zone.cells.begin(),
+                                               zone.cells.end(),
+                                               facet.first,
+                                               facet.second);
+
+  // Set index and dimension of v
+  this->set_vertex_properties(v, Base::get_last_vertex_index());
+
+  return v;
+}
+
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+restore_restricted_Delaunay(const Vertex_handle& vertex)
+{
+  typedef std::vector<Cell_handle> Cell_handle_vector;
+  typedef typename Cell_handle_vector::iterator Cell_handle_vector_iterator;
+
+  // Update incident facets
+  Cell_handle_vector cells;
+  r_tr_.incident_cells(vertex, std::back_inserter(cells));
+
+  for(Cell_handle_vector_iterator cell_it = cells.begin();
+      cell_it != cells.end();
+      ++cell_it)
+  {
+    // Look at all four facets of the cell, starting with the
+    // facet opposite to the new vertex
+    int index = (*cell_it)->index(vertex);
+
+    Facet opposite_facet(*cell_it, index);
+    after_insertion_handle_opposite_facet(opposite_facet);
+
+    for (int i = 1; i <= 3; ++i)
+    {
+      Facet incident_facet(*cell_it, (index+i)&3);
+      after_insertion_handle_incident_facet(incident_facet);
+    }
+  }
+}
+
+//-------------------------------------------------------
+// Private methods
+//-------------------------------------------------------
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+treat_new_facet(Facet& facet)
+{
+  // Treat facet
+  Facet_properties properties;
+  compute_facet_properties(facet, properties);
+  if ( properties )
+  {
+    const Surface_patch_index& surface_index = CGAL::cpp11::get<0>(*properties);
+    const Index& surface_center_index = CGAL::cpp11::get<1>(*properties);
+    const Point& surface_center = CGAL::cpp11::get<2>(*properties);
+
+    // Facet is on surface: set facet properties
+    set_facet_surface_center(facet, surface_center, surface_center_index);
+    set_facet_on_surface(facet, surface_index);
+
+    // Insert facet into refinement queue if needed
+    const Is_facet_bad is_facet_bad = r_criteria_(facet);
+
+    if ( is_facet_bad )
+    {
+      insert_bad_facet(facet, *is_facet_bad);
+
+      /*std::cerr << "INSERT BAD FACET : " << std::endl
+        << "* " << *facet.first->vertex((facet.second+1)%4)  << std::endl
+        << "  " << *facet.first->vertex((facet.second+2)%4)  << std::endl
+        << "  " << *facet.first->vertex((facet.second+3)%4)  << std::endl
+        << "  Quality=" << is_facet_bad->second << std::endl;*/
+    }
+  }
+  else
+  {
+    // Facet is not on surface
+    this->remove_facet_from_surface(facet);
+  }
+
+  // Set facet visited
+  Facet mirror = mirror_facet(facet);
+  set_facet_visited(facet);
+  set_facet_visited(mirror);
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+dual_segment(const Facet & facet, Bare_point& p, Bare_point& q) const
+{
+  Cell_handle c = facet.first;
+  int i = facet.second;
+  Cell_handle n = c->neighbor(i);
+  CGAL_assertion( ! r_tr_.is_infinite(c) && ! r_tr_.is_infinite(n) );
+  p = Gt().construct_weighted_circumcenter_3_object()(
+      c->vertex(0)->point(),
+      c->vertex(1)->point(),
+      c->vertex(2)->point(),
+      c->vertex(3)->point());
+  q = Gt().construct_weighted_circumcenter_3_object()(
+      n->vertex(0)->point(),
+      n->vertex(1)->point(),
+      n->vertex(2)->point(),
+      n->vertex(3)->point());
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+dual_segment_exact(const Facet & facet, Bare_point& p, Bare_point& q) const
+{
+  Cell_handle c = facet.first;
+  int i = facet.second;
+  Cell_handle n = c->neighbor(i);
+  CGAL_assertion( ! r_tr_.is_infinite(c) && ! r_tr_.is_infinite(n) );
+  p = Gt().construct_weighted_circumcenter_3_object()(
+      c->vertex(0)->point(),
+      c->vertex(1)->point(),
+      c->vertex(2)->point(),
+      c->vertex(3)->point(),
+      true);
+  q = Gt().construct_weighted_circumcenter_3_object()(
+      n->vertex(0)->point(),
+      n->vertex(1)->point(),
+      n->vertex(2)->point(),
+      n->vertex(3)->point(),
+      true);
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+dual_ray(const Facet & facet, Ray_3& ray) const
+{
+  Cell_handle c = facet.first;
+  int i = facet.second;
+  Cell_handle n = c->neighbor(i);
+  // either n or c is infinite
+  int in;
+  if ( r_tr_.is_infinite(c) )
+    in = n->index(c);
+  else {
+    n = c;
+    in = i;
+  }
+  // n now denotes a finite cell, either c or c->neighbor(i)
+  int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
+  if ( (in&1) == 1 )
+    std::swap(ind[0], ind[1]);
+  const Point& p = n->vertex(ind[0])->point();
+  const Point& q = n->vertex(ind[1])->point();
+  const Point& r = n->vertex(ind[2])->point();
+
+  typename Gt::Line_3 l = Gt().construct_perpendicular_line_3_object()
+    ( Gt().construct_plane_3_object()(p,q,r),
+      Gt().construct_weighted_circumcenter_3_object()(p,q,r) );
+
+ ray = Gt().construct_ray_3_object()(Gt().construct_weighted_circumcenter_3_object()(
+        n->vertex(0)->point(),
+        n->vertex(1)->point(),
+        n->vertex(2)->point(),
+        n->vertex(3)->point()), l);
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+dual_ray_exact(const Facet & facet, Ray_3& ray) const
+{
+  Cell_handle c = facet.first;
+  int i = facet.second;
+  Cell_handle n = c->neighbor(i);
+  // either n or c is infinite
+  int in;
+  if ( r_tr_.is_infinite(c) )
+    in = n->index(c);
+  else {
+    n = c;
+    in = i;
+  }
+  // n now denotes a finite cell, either c or c->neighbor(i)
+  int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
+  if ( (in&1) == 1 )
+    std::swap(ind[0], ind[1]);
+  const Point& p = n->vertex(ind[0])->point();
+  const Point& q = n->vertex(ind[1])->point();
+  const Point& r = n->vertex(ind[2])->point();
+
+  typename Gt::Line_3 l = Gt().construct_perpendicular_line_3_object()
+    ( Gt().construct_plane_3_object()(p,q,r),
+      Gt().construct_weighted_circumcenter_3_object()(p,q,r) );
+
+ ray = Gt().construct_ray_3_object()(Gt().construct_weighted_circumcenter_3_object()(
+        n->vertex(0)->point(),
+        n->vertex(1)->point(),
+        n->vertex(2)->point(),
+        n->vertex(3)->point(),
+        true), l);
+}
+
+
+
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+compute_facet_properties(const Facet& facet,
+                         Facet_properties& fp,
+                         bool force_exact) const
+{
+  //-------------------------------------------------------
+  // Facet must be finite
+  //-------------------------------------------------------
+  CGAL_assertion( ! r_tr_.is_infinite(facet) );
+  CGAL_assertion( r_tr_.dimension() == 3 );
+
+  // types
+  typedef boost::optional<typename MD::Surface_patch_index> Surface_patch;
+  typedef typename MD::Intersection Intersection;
+
+  // Functor
+  typename Gt::Is_degenerate_3 is_degenerate = Gt().is_degenerate_3_object();
+  typename Gt::Compare_xyz_3 compare_xyz = Gt().compare_xyz_3_object();
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+  typename MD::Do_intersect_surface do_intersect_surface =
+      r_oracle_.do_intersect_surface_object();
+#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+
+ typedef typename Gt::Bare_point Bare_point;
+
+  Cell_handle c = facet.first;
+  int i = facet.second;
+  Cell_handle n = c->neighbor(i);
+  if ( ! r_tr_.is_infinite(c) && ! r_tr_.is_infinite(n) ){
+    // the dual is a segment
+    Bare_point p1, p2;
+    if(force_exact){
+      dual_segment_exact(facet, p1, p2);
+    } else {
+      dual_segment(facet, p1, p2);
+    }
+    if (p1 == p2) { fp = Facet_properties(); return; }
+
+    // Trick to have canonical vector : thus, we compute always the same
+    // intersection
+    Segment_3 segment = ( compare_xyz(p1,p2)== CGAL::SMALLER )
+      ? Segment_3(p1, p2)
+      : Segment_3(p2, p1);
+
+    // If facet is on surface, compute intersection point and return true
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+    Surface_patch surface = do_intersect_surface(segment);
+    if ( surface )
+#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+    {
+      typename MD::Construct_intersection construct_intersection =
+          r_oracle_.construct_intersection_object();
+
+      Intersection intersect = construct_intersection(segment);
+#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      // In the following, CGAL::cpp11::get<2>(intersect) == 0 is a way to
+      // test "intersect == Intersection()" (aka empty intersection), but
+      // the later does not work.
+      Surface_patch surface =
+        (CGAL::cpp11::get<2>(intersect) == 0) ? Surface_patch() :
+        Surface_patch(
+          r_oracle_.surface_patch_index(CGAL::cpp11::get<1>(intersect)));
+      if(surface)
+#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      fp =  Facet_properties(CGAL::cpp11::make_tuple(*surface,
+                                    CGAL::cpp11::get<1>(intersect),
+                                    Point(CGAL::cpp11::get<0>(intersect))));
+    }
+  }
+  // If the dual is a ray
+  else
+  {
+    // If a facet is on the convex hull, and if its finite incident
+    // cell has a very big Delaunay ball, then the dual of the facet is
+    // a ray constructed with a point with very big coordinates, and a
+    // vector with small coordinates. Its can happen than the
+    // constructed ray is degenerate (the point(1) of the ray is
+    // point(0) plus a vector whose coordinates are epsilon).
+    Ray_3 ray;
+    if(force_exact){
+      dual_ray_exact(facet,ray);
+    } else {
+      dual_ray(facet,ray);
+    }
+    if (is_degenerate(ray)) { fp = Facet_properties(); return; }
+
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+    Surface_patch surface = do_intersect_surface(ray);
+    if ( surface )
+#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+    {
+      typename MD::Construct_intersection construct_intersection =
+          r_oracle_.construct_intersection_object();
+
+      Intersection intersect = construct_intersection(ray);
+#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      Surface_patch surface =
+        (CGAL::cpp11::get<2>(intersect) == 0) ? Surface_patch() :
+        Surface_patch(
+          r_oracle_.surface_patch_index(CGAL::cpp11::get<1>(intersect)));
+      if(surface)
+#endif // CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      {
+        fp = Facet_properties(CGAL::cpp11::make_tuple(*surface,
+                                      CGAL::cpp11::get<1>(intersect),
+                                      Point(CGAL::cpp11::get<0>(intersect))));
+      }
+    }
+  }
+}
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+bool
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+is_facet_encroached(const Facet& facet,
+                    const Point& point) const
+{
+  if ( r_tr_.is_infinite(facet) || ! this->is_facet_on_surface(facet) )
+  {
+    return false;
+  }
+
+  typename Gt::Compare_power_distance_3 compare_distance =
+    r_tr_.geom_traits().compare_power_distance_3_object();
+
+  const Cell_handle& cell = facet.first;
+  const int& facet_index = facet.second;
+  const Point& center = get_facet_surface_center(facet);
+  const Point& reference_point = cell->vertex((facet_index+1)&3)->point();
+
+  // facet is encroached if the new point is near from center than
+  // one vertex of the facet
+  return ( compare_distance(center, reference_point, point) != CGAL::SMALLER );
+}
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+bool
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+is_encroached_facet_refinable(Facet& facet) const
+{
+  typedef typename Gt::Point_3 Point_3;
+  typedef typename Gt::FT      FT;
+
+  typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius =
+    Gt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
+
+  typename Gt::Compare_weighted_squared_radius_3 compare =
+    Gt().compare_weighted_squared_radius_3_object();
+
+  const Cell_handle& c = facet.first;
+  const int& k = facet.second;
+
+  int k1 = (k+1)&3;
+  int k2 = (k+2)&3;
+  int k3 = (k+3)&3;
+
+  // Get number of weighted points, and ensure that they will be accessible
+  // using k1...ki, if i is the number of weighted points.
+  int wp_nb = 0;
+  if(c->vertex(k1)->point().weight() > FT(0))
+  {
+    ++wp_nb;
+  }
+
+  if(c->vertex(k2)->point().weight() > FT(0))
+  {
+    if ( 0 == wp_nb ) { std::swap(k1,k2); }
+    ++wp_nb;
+  }
+
+  if(c->vertex(k3)->point().weight() > FT(0))
+  {
+    if ( 0 == wp_nb ) { std::swap(k1,k3); }
+    if ( 1 == wp_nb ) { std::swap(k2,k3); }
+    ++wp_nb;
+  }
+
+  const Point_3& p1 = c->vertex(k1)->point();
+  const Point_3& p2 = c->vertex(k2)->point();
+  const Point_3& p3 = c->vertex(k3)->point();
+
+  const FT min_ratio (0.16); // (0.2*2)^2
+
+  // Check ratio
+  switch ( wp_nb )
+  {
+    case 1:
+    {
+      FT r = (std::max)(sq_radius(p1,p2),sq_radius(p1,p3));
+      if ( r < min_ratio*p1.weight() ) { return false; }
+      break;
+    }
+
+    case 2:
+    {
+      bool do_spheres_intersect = (compare(p1,p2,FT(0)) != CGAL::LARGER);
+      if ( do_spheres_intersect )
+      {
+        FT r13 = sq_radius(p1,p3) / p1.weight();
+        FT r23 = sq_radius(p2,p3) / p2.weight();
+        FT r = (std::max)(r13,r23);
+
+        if ( r < min_ratio ) { return false; }
+      }
+      break;
+    }
+
+    case 3:
+    {
+      bool do_spheres_intersect = (compare(p1,p2,p3,FT(0)) != CGAL::LARGER);
+      if ( do_spheres_intersect ) { return false; }
+      break;
+    }
+
+    default: break;
+  }
+
+  return true;
+}
+
+/**
+  * \c facet is an internal facet we are going to remove
+  * \c source_facet is the facet we want to refine by inserting a new point
+  */
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+bool
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+before_insertion_handle_facet_in_conflict_zone(Facet& facet,
+                                               const Facet& source_facet)
+{
+  Facet other_side = mirror_facet(facet);
+
+  // Is the facet on the surface of the complex
+  if ( this->is_facet_on_surface(facet) )
+  {
+    // Remove element (if needed - see remove_bad_facet implementation)
+    remove_bad_facet(facet, Ct());
+
+    // Remove facet from complex
+    remove_facet_from_surface(facet);
+
+    // Reset visited
+    reset_facet_visited(facet);
+    reset_facet_visited(other_side);
+  }
+
+  return ( (facet == source_facet) || (other_side == source_facet) );
+}
+
+
+
+template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
+void
+Refine_facets_3_base<Tr,Cr,MD,C3T3_,Ct,C_>::
+after_insertion_handle_incident_facet(Facet& facet)
+{
+  // If the facet is infinite or has been already visited,
+  // then there is nothing to do as for it or its edges
+  // Facet other_side = mirror_facet(facet);
+  if ( r_tr_.is_infinite(facet) || (is_facet_visited(facet)) ) // && is_facet_visited(other_side)) )
+  {
+    return;
+  }
+
+  treat_new_facet(facet);
+}
+
+
+}  // end namespace Mesh_3
+
+
+}  // end namespace CGAL
+
+#endif // CGAL_MESH_3_REFINE_FACETS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_manifold_base.h
new file mode 100644
index 0000000..f1285c9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_facets_manifold_base.h
@@ -0,0 +1,637 @@
+// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008,2013  GeometryFactory, Sophia Antipolis (France)
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Steve Oudot, David Rey, Mariette Yvinec, Laurent Rineau, Andreas Fabri
+
+#ifndef CGAL_MESH_3_REFINE_FACETS_MANIFOLD_BASE_H
+#define CGAL_MESH_3_REFINE_FACETS_MANIFOLD_BASE_H
+
+#include <CGAL/utility.h>
+#include <set>
+#include <vector>
+#include <boost/bimap.hpp>
+#include <boost/bimap/unordered_set_of.hpp>
+#include <boost/bimap/multiset_of.hpp>
+#include <boost/foreach.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <CGAL/Mesh_facet_topology.h>
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(Has_manifold_criterion)
+
+template <typename Criteria,
+          bool has_Has_manifold_criterion =
+          has_Has_manifold_criterion<Criteria>::value>
+struct Has_manifold_criterion :
+    public CGAL::Boolean_tag<Criteria::Has_manifold_criterion::value>
+// when Criteria has the nested type Has_manifold_criterion
+{};
+
+template <typename Criteria>
+struct Has_manifold_criterion<Criteria, false> : public CGAL::Tag_false
+// when Criteria does not have the nested type Has_manifold_criterion
+{};
+
+
+
+template <typename Criteria>
+bool get_with_manifold(const Criteria&, CGAL::Tag_false)
+{
+  return false;
+}
+
+template <typename Criteria>
+bool get_with_manifold(const Criteria& c, CGAL::Tag_true)
+{
+  return (c.topology() & MANIFOLD_WITH_BOUNDARY) != 0;
+}
+
+template <typename Criteria>
+bool get_with_manifold(const Criteria& c)
+{
+  return get_with_manifold(c, Has_manifold_criterion<Criteria>());
+}
+
+template <typename Criteria>
+bool get_with_boundary(const Criteria&, CGAL::Tag_false)
+{
+  return false;
+}
+
+template <typename Criteria>
+bool get_with_boundary(const Criteria& c, CGAL::Tag_true)
+{
+  return (c.topology() & NO_BOUNDARY) == 0;
+}
+
+template <typename Criteria>
+bool get_with_boundary(const Criteria& c)
+{
+  return get_with_boundary(c, Has_manifold_criterion<Criteria>());
+}
+
+template<class Tr,
+         class Criteria,
+         class MeshDomain,
+         class Complex3InTriangulation3,
+         class Concurrency_tag,
+         class Container_
+         >
+class Refine_facets_manifold_base
+  : public Refine_facets_3_base<Tr,
+                                Criteria,
+                                MeshDomain,
+                                Complex3InTriangulation3,
+                                Concurrency_tag,
+                                Container_>
+{
+  typedef Refine_facets_3_base<Tr,
+                               Criteria,
+                               MeshDomain,
+                               Complex3InTriangulation3,
+                               Concurrency_tag,
+                               Container_> Base;
+
+public:
+  typedef Complex3InTriangulation3 C3t3;
+  typedef MeshDomain Mesh_domain;
+  typedef typename Tr::Point Point;
+  typedef typename Tr::Facet Facet;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+
+  typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
+
+protected:
+  typedef typename Tr::Geom_traits GT;
+  typedef typename GT::FT FT;
+  typedef typename Tr::Edge Edge;
+  typedef typename Tr::Cell_handle Cell_handle;
+
+  typedef typename Tr::Facet_circulator Tr_facet_circulator;
+  typedef std::pair<Vertex_handle, Vertex_handle> EdgeVV;
+
+protected:
+  typedef ::boost::bimap< EdgeVV,
+                          ::boost::bimaps::multiset_of<int> > Bad_edges;
+  typedef typename Bad_edges::value_type Bad_edge;
+
+  mutable Bad_edges m_bad_edges;
+  mutable std::set<Vertex_handle> m_bad_vertices;
+
+  mutable bool m_manifold_info_initialized;
+  mutable bool m_bad_vertices_initialized;
+  bool m_with_manifold_criterion;
+  bool m_with_boundary;
+
+private:
+  // computes and return an ordered pair of Vertex
+  EdgeVV make_edgevv(const Vertex_handle vh1,
+                     const Vertex_handle vh2) const {
+    if (vh1 < vh2) {
+      return std::make_pair(vh1, vh2);
+    }
+    else {
+      return std::make_pair(vh2, vh1);
+    }
+  }
+
+  // computes and returns the Edge type object from the EdgeVV object
+  // use tr.is_edge(...)
+  Edge edgevv_to_edge(const EdgeVV& arete) const {
+    Vertex_handle v1 = arete.first;
+    Vertex_handle v2 = arete.second;
+    Cell_handle c;
+    int index1=0, index2=0; // initialize to avoid g++ 4.8 -Wmaybe-uninitialized
+
+    CGAL_assume_code(bool is_edge =)
+    this->r_tr_.is_edge(v1, v2, c, index1, index2);
+    CGAL_assume(is_edge);
+
+    return make_triple( c, index1, index2 );
+  }
+
+  // computes and returns the EdgeVV type object from the Edge object
+  EdgeVV edge_to_edgevv(const Edge& arete) const {
+    return make_edgevv(arete.first->vertex(arete.second),
+                       arete.first->vertex(arete.third) );
+  }
+
+  FT compute_distance_to_facet_center(const Facet& f,
+                                      const Vertex_handle v) const {
+    const Point& fcenter = f.first->get_facet_surface_center(f.second);
+    const Point& vpoint = v->point();
+
+    return
+      this->r_tr_.geom_traits().compute_squared_distance_3_object()(fcenter.point(),
+                                                              vpoint.point())
+      - vpoint.weight();
+  }
+
+  Facet
+  biggest_incident_facet_in_complex(const Vertex_handle v) const
+  {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "Bad vertex: " << v->point() << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::vector<Facet> facets;
+    facets.reserve(64);
+    this->r_tr_.incident_facets(v, std::back_inserter(facets));
+
+    typename std::vector<Facet>::iterator fit = facets.begin();
+    while(fit != facets.end() && !this->r_c3t3_.is_in_complex(*fit)) ++fit;
+    CGAL_assertion(fit!=facets.end());
+    CGAL_assertion_code(std::size_t facet_counter = 1);
+
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "  " << v->cached_number_of_incident_facets()
+              << " incident faces, with sizes:\n";
+    std::cerr << "    " << compute_distance_to_facet_center(*fit, v) << "\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    Facet biggest_facet = *fit++;
+    while(fit != facets.end() && !this->r_c3t3_.is_in_complex(*fit)) ++fit;
+
+    for (; fit != facets.end(); )
+    {
+      CGAL_assertion_code(++facet_counter);
+      Facet current_facet = *fit;
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      std::cerr << "    " << compute_distance_to_facet_center(*fit, v) << "\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      // is the current facet bigger than the current biggest one
+      if ( compute_distance_to_facet_center(current_facet, v) >
+           compute_distance_to_facet_center(biggest_facet, v) )
+      {
+        biggest_facet = current_facet;
+      }
+      ++fit;
+      while(fit != facets.end() && !this->r_c3t3_.is_in_complex(*fit)) ++fit;
+    }
+    CGAL_assertion(v->cached_number_of_incident_facets() ==
+                   facet_counter);
+    CGAL_assertion(this->r_c3t3_.is_in_complex(biggest_facet));
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "Biggest facet radius: "
+              << compute_distance_to_facet_center(biggest_facet, v)
+              << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+
+    return biggest_facet;
+  }
+
+  Facet biggest_incident_facet_in_complex(const Edge& arete) const {
+    // Find the first facet in the incident facets
+    // of the edge which is in the Complex
+    // use the list of incident facets in the complex
+    Vertex_handle fev = edge_to_edgevv(arete).first;
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "Bad edge: (" << fev->point()
+              << ", " << arete.first->vertex(arete.third)->point()
+              << ")\n  incident facets sizes:\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    Tr_facet_circulator fcirc = this->r_tr_.incident_facets(arete);
+    while(!this->r_c3t3_.is_in_complex(*fcirc)) ++fcirc;
+    Facet first_facet = *fcirc;
+    Facet biggest_facet = *fcirc;
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "    "
+              << compute_distance_to_facet_center(*fcirc, fev) << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+
+    for (++fcirc; *fcirc != first_facet; ++fcirc) 
+    {
+      while(!this->r_c3t3_.is_in_complex(*fcirc)) ++fcirc;
+      if(*fcirc == first_facet) break;
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      std::cerr << "    "
+                << compute_distance_to_facet_center(*fcirc, fev) << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+
+      // is the current facet bigger than the current biggest one
+      if ( compute_distance_to_facet_center(*fcirc, fev) >
+           compute_distance_to_facet_center(biggest_facet,
+                                            fev) ) {
+        biggest_facet = *fcirc;
+      }
+    }
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "Biggest facet radius: "
+              << compute_distance_to_facet_center(biggest_facet, fev)
+              << std::endl;
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+
+    return biggest_facet;
+  }
+
+  ///////////////////////
+  // For before_insertion
+
+  // Actions to perform on a facet inside the conflict zone
+  void
+  before_insertion_handle_facet_inside_conflict_zone (const Facet& f) 
+  {
+    if ( this->r_c3t3_.is_in_complex(f) ) {
+      // foreach edge of f
+      const Cell_handle cell = f.first;
+      const int i = f.second;
+      for(int j = 0; j < 3; ++j)
+      {
+        const int edge_index_va = this->r_tr_.vertex_triple_index(i, j);
+        const int edge_index_vb = this->r_tr_.vertex_triple_index(i, (j == 2) ? 0 : (j+1));
+        const Vertex_handle edge_va = cell->vertex(edge_index_va);
+        const Vertex_handle edge_vb = cell->vertex(edge_index_vb);
+        m_bad_edges.left.erase( make_edgevv(edge_va, edge_vb));
+      }
+    }
+  }
+
+  // Action to perform on a facet on the boundary of the conflict zone
+  void
+  before_insertion_handle_facet_on_boundary_of_conflict_zone(const Facet& f)
+  {
+    // perform the same operations as for an internal facet
+    before_insertion_handle_facet_inside_conflict_zone (f);
+
+    if(m_bad_vertices_initialized) {
+      const Cell_handle& c = f.first;
+      const int i = f.second;
+
+      // for each v of f
+      for (int j = 0; j < 4; j++)
+        if (i != j)
+          if(m_bad_vertices.erase(c->vertex(j)) > 0) {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+            std::cerr << "m_bad_vertices.erase("
+                      << c->vertex(j)->point() << ")\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+          }
+    }
+  }
+
+public:
+  Refine_facets_manifold_base(Tr& triangulation,
+                              C3t3& c3t3,
+                              const Mesh_domain& oracle,
+                              const Criteria& criteria)
+    : Base(triangulation,
+           c3t3,
+           oracle,
+           criteria)
+    , m_manifold_info_initialized(false)
+    , m_bad_vertices_initialized(false)
+    , m_with_manifold_criterion(get_with_manifold(criteria))
+    , m_with_boundary(get_with_boundary(criteria))
+  {
+#ifdef CGAL_MESH_3_DEBUG_CONSTRUCTORS
+    std::cerr << "CONS: Refine_facets_manifold_base";
+    if(m_with_manifold_criterion) {
+      if(m_with_boundary)
+        std::cerr << " (with boundaries)\n";
+      else
+        std::cerr << " (without boundary)\n";
+    } else {
+      std::cerr << " (DEACTIVATED)\n";
+    }
+#endif
+  }
+
+private:
+  // Initialization function
+  void initialize_manifold_info() const {
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "\nscanning edges ";
+    if(m_with_boundary)
+      std::cerr << "(boundaries allowed)";
+    std::cerr << "...\n";
+    int n = 0;
+#endif
+    for (typename Tr::Finite_edges_iterator
+           eit = this->r_tr_.finite_edges_begin(), end = this->r_tr_.finite_edges_end();
+         eit != end; ++eit)
+    {
+      if ( (this->r_c3t3_.face_status(*eit) == C3t3::SINGULAR) ||
+           ( (!m_with_boundary) &&
+             (this->r_c3t3_.face_status(*eit) == C3t3::BOUNDARY) ) )
+      {
+        m_bad_edges.insert(Bad_edge(edge_to_edgevv(*eit),
+                                    (this->r_c3t3_.face_status(*eit) ==
+                                     C3t3::SINGULAR ? 0 : 1)));
+#ifdef CGAL_MESH_3_VERBOSE
+        ++n;
+#endif
+      }
+    }
+    m_manifold_info_initialized = true;
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "   -> found " << n << " bad edges\n";
+#endif
+  }
+
+  void initialize_bad_vertices() const
+  {
+    CGAL_assertion(m_bad_vertices_initialized == false);
+    CGAL_assertion(m_bad_vertices.empty());
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "\nscanning vertices..." << std::endl;
+    int n = 0;
+#endif
+    for (typename Tr::Finite_vertices_iterator
+           vit = this->r_tr_.finite_vertices_begin(),
+           end = this->r_tr_.finite_vertices_end();
+         vit != end; ++vit)
+    {
+      if( this->r_c3t3_.face_status(vit) == C3t3::SINGULAR ) {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        std::cerr << "m_bad_edges.insert("
+                  << vit->point() << ")\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        m_bad_vertices.insert( vit );
+#ifdef CGAL_MESH_3_VERBOSE
+        ++n;
+#endif
+      }
+    }
+    m_bad_vertices_initialized = true;
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "   -> found " << n << " bad vertices\n";
+#  ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+    std::cerr << "Bad vertices queue:\n";
+    BOOST_FOREACH(Vertex_handle v2, m_bad_vertices)
+    {
+      std::cerr << v2->point() << std::endl;
+    }
+    CGAL::dump_c3t3(this->r_c3t3_, "dump-at-scan-vertices");
+#  endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+#endif
+  }
+
+public:
+  void scan_triangulation_impl_amendement() const {
+#ifdef CGAL_MESH_3_VERBOSE
+    std::cerr << "scanning edges (lazy)" << std::endl;
+    std::cerr << "scanning vertices (lazy)" << std::endl;
+#endif
+  }
+
+  // Tells whether there remain elements to refine
+  bool no_longer_element_to_refine_impl() {
+    if(Base::no_longer_element_to_refine_impl())
+    {
+      if(!m_with_manifold_criterion) return true;
+      // Disable the manifold criterion
+
+      if( ! m_manifold_info_initialized ) initialize_manifold_info();
+
+      if(m_bad_edges.left.empty())
+      {
+        if( ! m_bad_vertices_initialized ) initialize_bad_vertices();
+
+        return m_bad_vertices.empty();
+      }
+      else // m_bad_vertices is not empty
+        return false;
+    }
+    else // Base::no_longer_element_to_refine_impl() returned false
+      return false;
+  }
+
+  // Returns the next element to refine
+  Facet get_next_element_impl() {
+
+    if (!Base::no_longer_element_to_refine_impl()) {
+      return Base::get_next_element_impl();
+    }
+    else {
+      if(!m_bad_edges.left.empty()) {
+        Edge first_bad_edge = edgevv_to_edge(m_bad_edges.right.begin()->second);
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        const EdgeVV& edgevv = m_bad_edges.right.begin()->second;
+        std::cerr << "Bad edge "
+                  << edgevv.first->point()
+                  << " - "
+                  << edgevv.second->point()
+                  << "\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        return biggest_incident_facet_in_complex(first_bad_edge);
+      } else {
+        CGAL_assertion(!m_bad_vertices.empty());
+        const Vertex_handle& v = *m_bad_vertices.begin();
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        std::cerr << "Bad vertices queue:\n";
+        BOOST_FOREACH(Vertex_handle v2, m_bad_vertices)
+        {
+          std::cerr << v2->point() << std::endl;
+        }
+        std::cerr << "Bad vertex " << v->point() << "\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        CGAL_assertion(this->r_c3t3_.has_incident_facets_in_complex(v));
+        if(this->r_c3t3_.face_status(v) != C3t3::SINGULAR) {
+          dump_c3t3(this->r_c3t3_, "dump-crash");
+          CGAL_error_msg("this->r_c3t3_.face_status(v) != C3t3::SINGULAR");
+        }
+        return biggest_incident_facet_in_complex(v);
+      }
+    }
+  }
+
+  void before_insertion_impl(const Facet& f, const Point& s,
+                             Zone& zone) {
+    if( m_manifold_info_initialized )
+    {
+      for (typename Zone::Facets_iterator fit =
+             zone.internal_facets.begin();
+           fit != zone.internal_facets.end();
+           ++fit)
+        before_insertion_handle_facet_inside_conflict_zone (*fit);
+
+      for (typename Zone::Facets_iterator fit =
+             zone.boundary_facets.begin(); fit !=
+             zone.boundary_facets.end(); ++fit)
+        before_insertion_handle_facet_on_boundary_of_conflict_zone (*fit);
+    }
+    Base::before_insertion_impl(f, s, zone);
+  }
+
+  void after_insertion_impl(const Vertex_handle v) {
+    Base::after_insertion_impl(v);
+
+    if( ! m_manifold_info_initialized )
+      return;
+
+    // search for incident facets around v
+    typedef std::vector<Facet> Facets;
+    Facets facets;
+    facets.reserve(64);
+    this->r_tr_.incident_facets (v, std::back_inserter(facets));
+
+    // foreach f in star(v)
+    for (typename Facets::iterator fit = facets.begin();
+         fit != facets.end();
+         ++fit) 
+    {
+      // foreach edge of *fit
+      const Cell_handle cell = fit->first;
+      const int i = fit->second;
+      for(int j = 0; j < 3; ++j)
+      {
+        const int edge_index_va = this->r_tr_.vertex_triple_index(i, j);
+        const int edge_index_vb = this->r_tr_.vertex_triple_index(i, (j == 2) ? 0 : (j+1));
+        Edge edge(cell, edge_index_va, edge_index_vb);
+        // test if edge is in Complex
+        if ( this->r_c3t3_.face_status(edge) != C3t3::NOT_IN_COMPLEX ) {
+          // test if edge is not regular to store it as a "bad_edge"
+          // e.g. more than or equal to 3 incident facets (SINGULAR)
+          // or less than or equal to 1
+          // (BOUNDARY only, because ISOLATED is NA)
+          // This test is not efficient because
+          // edges are tried to be inserted several times
+          // TODO one day: test if the edge is still singular
+          if ( (this->r_c3t3_.face_status(edge) == C3t3::SINGULAR) ||
+               ( (!m_with_boundary) && 
+                 (this->r_c3t3_.face_status(edge) == C3t3::BOUNDARY) )
+               )
+          {
+            m_bad_edges.insert(Bad_edge(edge_to_edgevv(edge),
+                                        (this->r_c3t3_.face_status(edge) ==
+                                         C3t3::SINGULAR ? 0 : 1)));
+          }
+          else {
+            m_bad_edges.left.erase( edge_to_edgevv(edge) ); // @TODO: pourquoi?!
+          }
+        }
+      }
+    }
+
+    if(!m_bad_vertices_initialized) return;
+
+    // foreach v' in star of v
+    std::vector<Vertex_handle> vertices;
+    vertices.reserve(64);
+    this->r_tr_.incident_vertices(v, std::back_inserter(vertices));
+
+    // is_regular_or_boundary_for_vertices
+    // is used here also incident edges are not known to be
+    // REGULAR which may cause some singular vertices to be forgotten
+    // This causes no problem because
+    // those SINGULAR incident SINGULAR edges are going to be handled
+    for (typename std::vector<Vertex_handle>::iterator
+           vit = vertices.begin(), end = vertices.end();
+         vit != end; ++vit)
+    {
+      if ( this->r_c3t3_.has_incident_facets_in_complex(*vit)  &&
+           (this->r_c3t3_.face_status(*vit) == C3t3::SINGULAR)
+           // !this->r_c3t3_.is_regular_or_boundary_for_vertices(*vit)
+           )
+      {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        std::cerr << "m_bad_vertices.insert("
+                  << (*vit)->point() << ")\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+        m_bad_vertices.insert(*vit);
+      }
+    }
+
+    if ( this->r_c3t3_.has_incident_facets_in_complex(v) &&
+         (this->r_c3t3_.face_status(v) == C3t3::SINGULAR)
+         // !this->r_c3t3_.is_regular_or_boundary_for_vertices(v)
+         )
+    {
+#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      std::cerr << "m_bad_vertices.insert("
+                << v->point() << ")\n";
+#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS
+      m_bad_vertices.insert(v);
+    }
+  }
+
+  /// debug info: class name
+  std::string debug_info_class_name_impl() const
+  {
+    return "Refine_facets_manifold_base";
+  }
+
+  std::string debug_info() const
+  {
+    std::stringstream s;
+    s << Base::debug_info();
+    if(m_with_manifold_criterion) {
+      s << "," << m_bad_edges.left.size()
+        << "," << m_bad_vertices.size();
+    }
+    return s.str();
+  }
+
+  std::string debug_info_header() const
+  {
+    std::stringstream s;
+    s << Base::debug_info_header();
+    if(m_with_manifold_criterion) {
+      s << ",#bad edges,#bad vertices";
+    }
+    return s.str();
+  }
+};  // end Refine_facets_manifold_base
+
+}  // end namespace Mesh_3
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_MESH_3_REFINE_FACETS_MANIFOLD_BASE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_tets_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_tets_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Refine_tets_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Refine_tets_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_intersection_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_intersection_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_intersection_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_intersection_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_intersection_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_intersection_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Robust_intersection_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_intersection_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h
new file mode 100644
index 0000000..58d0f99
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h
@@ -0,0 +1,429 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+//
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
+#define CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
+
+
+#include <CGAL/number_utils_classes.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/Robust_construction.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
+#include <CGAL/constructions/constructions_on_weighted_points_cartesian_3.h>
+
+namespace CGAL {
+
+template < typename K >
+class Robust_filtered_compute_squared_radius_3
+  : public K::Compute_squared_radius_3
+{
+public:
+  typedef Exact_predicates_exact_constructions_kernel         EK;
+  typedef Weighted_converter_3<Cartesian_converter<K, EK> >   To_exact;
+  typedef Weighted_converter_3<Cartesian_converter<EK,K> >    Back_from_exact;
+  
+  typedef typename K::Point_3                         Point_3;
+  typedef typename K::FT                              FT;
+  typedef FT                                          result_type;
+
+#ifndef  CGAL_CFG_MATCHING_BUG_6 
+  using K::Compute_squared_radius_3::operator();
+#else // CGAL_CFG_MATCHING_BUG_6
+  typedef typename K::Sphere_3                        Sphere_3;
+  typedef typename K::Circle_3                        Circle_3;
+
+  result_type
+  operator()( const Sphere_3& s) const
+  { return K::Compute_squared_radius_3::operator()(s); }
+
+  result_type
+  operator()( const Circle_3& c) const
+  { return K::Compute_squared_radius_3::operator()(c); }
+
+  FT operator() ( const Point_3 & p,
+                  const Point_3 & q,
+                  const Point_3 & r) const
+  {
+    return K::Compute_squared_radius_3::operator()(p,q,r);
+  }
+
+  FT operator() ( const Point_3 & p,
+                  const Point_3 & q) const
+  {
+    return K::Compute_squared_radius_3::operator()(p,q);
+  }
+
+  FT operator() ( const Point_3 & p) const
+  {
+    return K::Compute_squared_radius_3::operator()(p);
+  }
+#endif // CGAL_CFG_MATCHING_BUG_6
+  
+  FT operator() ( const Point_3 & p,
+                  const Point_3 & q,
+                  const Point_3 & r,
+                  const Point_3 & s ) const
+  {
+    typename K::Compute_squared_radius_3 sq_radius =
+      K().compute_squared_radius_3_object();
+    
+    // Compute denominator to swith to exact if it is 0
+    const FT denom = compute_denom(p,q,r,s);
+    if ( ! CGAL_NTS is_zero(denom) )
+    {
+      return sq_radius(p,q,r,s);
+    }
+    
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    EK::Compute_squared_radius_3 exact_sq_radius =
+      EK().compute_squared_radius_3_object();
+    
+    return back_from_exact(exact_sq_radius(to_exact(p),
+                                           to_exact(q),
+                                           to_exact(r),
+                                           to_exact(s)));
+  }
+
+private:
+  FT compute_denom(const Point_3 & p,
+                   const Point_3 & q,
+                   const Point_3 & r,
+                   const Point_3 & s) const
+  {
+    return compute_denom(p.x(),p.y(),p.z(),
+                         q.x(),q.y(),q.z(),
+                         r.x(),r.y(),r.z(),
+                         s.x(),s.y(),s.z());
+  }
+
+  FT compute_denom(const FT &px, const FT &py, const FT &pz,
+                   const FT &qx, const FT &qy, const FT &qz,
+                   const FT &rx, const FT &ry, const FT &rz,
+                   const FT &sx, const FT &sy, const FT &sz) const
+  {
+    const FT qpx = qx-px;
+    const FT qpy = qy-py;
+    const FT qpz = qz-pz;
+
+    const FT rpx = rx-px;
+    const FT rpy = ry-py;
+    const FT rpz = rz-pz;
+
+    const FT spx = sx-px;
+    const FT spy = sy-py;
+    const FT spz = sz-pz;
+
+    return determinant(qpx,qpy,qpz,
+                       rpx,rpy,rpz,
+                       spx,spy,spz);
+  }
+};
+
+template < typename K_ >
+class Robust_filtered_construct_weighted_circumcenter_3
+{
+public:
+  typedef Exact_predicates_exact_constructions_kernel          EK;
+  typedef Weighted_converter_3<Cartesian_converter<K_, EK> >   To_exact;
+  typedef Weighted_converter_3<Cartesian_converter<EK,K_> >    Back_from_exact;
+  
+  typedef CGAL::Regular_triangulation_euclidean_traits_3<K_> Rt;
+  typedef CGAL::Regular_triangulation_euclidean_traits_3<EK> Exact_Rt;
+  
+  typedef typename Rt::Weighted_point_3               Weighted_point_3;
+  typedef typename Rt::Bare_point                     Bare_point;
+  typedef typename Rt::FT                             FT;
+  typedef typename Rt::Sphere_3                       Sphere_3;
+  
+  typedef Bare_point                                  result_type;
+  
+  Bare_point operator() ( const Weighted_point_3 & p,
+                          const Weighted_point_3 & q,
+                          const Weighted_point_3 & r,
+                          const Weighted_point_3 & s,
+                          bool force_exact = false) const
+  {
+    CGAL_precondition(Rt().orientation_3_object()(p,q,r,s) == CGAL::POSITIVE);
+   
+    // We use Power_test_3: it is static filtered and
+    // we know that p,q,r,s are positive oriented
+    typename Rt::Power_test_3 power_test = Rt().power_test_3_object();
+
+    // Compute denominator to swith to exact if it is 0
+    FT num_x, num_y, num_z, den;
+    bool unweighted = (p.weight() == 0) && (q.weight() == 0) && (r.weight() == 0) && (s.weight() == 0);
+
+    if(unweighted){
+      determinants_for_circumcenterC3(p.x(), p.y(), p.z(),
+                                      q.x(), q.y(), q.z(),
+                                      r.x(), r.y(), r.z(),
+                                      s.x(), s.y(), s.z(),
+                                      num_x,  num_y, num_z, den);
+    } else {
+    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
+                                             q.x(), q.y(), q.z(), q.weight(),
+                                             r.x(), r.y(), r.z(), r.weight(),
+                                             s.x(), s.y(), s.z(), s.weight(),
+                                             num_x,  num_y, num_z, den);
+    }
+    if ( ! force_exact && ! CGAL_NTS is_zero(den) )
+    {
+      FT inv = FT(1)/(FT(2) * den);
+      Bare_point res(p.x() + num_x*inv, p.y() - num_y*inv, p.z() + num_z*inv);
+       
+      if(unweighted){
+        if(side_of_oriented_sphere(p.point(),q.point(),r.point(),s.point(), res)
+           == CGAL::ON_POSITIVE_SIDE )
+          return res;
+      } else {
+      // Fast output
+      if ( power_test(p,q,r,s,res) == CGAL::ON_POSITIVE_SIDE )
+        return res;
+    }
+    }
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
+      Exact_Rt().construct_weighted_circumcenter_3_object();
+    
+    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
+                                                       to_exact(q),
+                                                       to_exact(r),
+                                                       to_exact(s)));
+  }
+  
+  Bare_point operator() ( const Weighted_point_3 & p,
+                          const Weighted_point_3 & q,
+                          const Weighted_point_3 & r ) const
+  {
+    CGAL_precondition(! Rt().collinear_3_object()(p,q,r) );
+        
+    typename Rt::Side_of_bounded_sphere_3 side_of_bounded_sphere =
+      Rt().side_of_bounded_sphere_3_object();
+    
+    // Compute denominator to swith to exact if it is 0
+    FT num_x, num_y, num_z, den;
+    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
+                                             q.x(), q.y(), q.z(), q.weight(),
+                                             r.x(), r.y(), r.z(), r.weight(),
+                                             num_x,  num_y, num_z, den);
+    
+    if ( ! CGAL_NTS is_zero(den) )
+    {
+      FT inv = FT(1)/(FT(2) * den);
+      Bare_point res(p.x() + num_x*inv, p.y() - num_y*inv, p.z() + num_z*inv);
+      
+      // Fast output
+      if ( side_of_bounded_sphere(p,q,r,res) == CGAL::ON_BOUNDED_SIDE )
+        return res;
+    }
+    
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
+      Exact_Rt().construct_weighted_circumcenter_3_object();
+    
+    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
+                                                       to_exact(q),
+                                                       to_exact(r)));
+  }
+  
+  Bare_point operator() ( const Weighted_point_3 & p,
+                          const Weighted_point_3 & q ) const
+  {
+    typename Rt::Construct_weighted_circumcenter_3 weighted_circumcenter =
+      Rt().construct_weighted_circumcenter_3_object();
+    
+    typename Rt::Side_of_bounded_sphere_3 side_of_bounded_sphere =
+      Rt().side_of_bounded_sphere_3_object();
+    
+    // No division here
+    result_type point = weighted_circumcenter(p,q);
+    
+    // Fast output
+    if ( side_of_bounded_sphere(p,q,point) == CGAL::ON_BOUNDED_SIDE )
+      return point;
+    
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter =
+      Exact_Rt().construct_weighted_circumcenter_3_object();
+    
+    return back_from_exact(exact_weighted_circumcenter(to_exact(p),
+                                                       to_exact(q)));
+  }
+};
+  
+  
+  
+template < typename K_ >
+class Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3
+{
+public:
+  typedef Exact_predicates_exact_constructions_kernel          EK;
+  typedef Weighted_converter_3<Cartesian_converter<K_, EK> >   To_exact;
+  typedef Weighted_converter_3<Cartesian_converter<EK,K_> >    Back_from_exact;
+  
+  typedef CGAL::Regular_triangulation_euclidean_traits_3<K_> Rt;
+  typedef CGAL::Regular_triangulation_euclidean_traits_3<EK> Exact_Rt;
+  
+  typedef typename Rt::Weighted_point_3               Weighted_point_3;
+  typedef typename Rt::FT                             FT;
+  
+  FT operator() ( const Weighted_point_3& p,
+                  const Weighted_point_3& q,
+                  const Weighted_point_3& r,
+                  const Weighted_point_3& s ) const
+  {
+    // Compute denominator to swith to exact if it is 0
+    FT num_x, num_y, num_z, den;
+    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
+                                             q.x(), q.y(), q.z(), q.weight(),
+                                             r.x(), r.y(), r.z(), r.weight(),
+                                             s.x(), s.y(), s.z(), s.weight(),
+                                             num_x,  num_y, num_z, den);
+    if ( ! CGAL_NTS is_zero(den) )
+    {
+      FT inv = FT(1)/(FT(2) * den);
+      
+      return (  CGAL_NTS square(num_x) 
+              + CGAL_NTS square(num_y)
+              + CGAL_NTS square(num_z) ) * CGAL_NTS square(inv) - p.weight();
+    }
+    
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
+      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
+    
+    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q),
+                                                to_exact(r),to_exact(s)));
+  }
+  
+  
+  FT operator() (const Weighted_point_3& p,
+                 const Weighted_point_3& q,
+                 const Weighted_point_3& r) const
+  {
+    // Compute denominator to swith to exact if it is 0
+    FT num_x, num_y, num_z, den;
+    determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(),
+                                             q.x(), q.y(), q.z(), q.weight(),
+                                             r.x(), r.y(), r.z(), r.weight(),
+                                             num_x,  num_y, num_z, den);
+    
+    if ( ! CGAL_NTS is_zero(den) )
+    {
+      FT inv = FT(1)/(FT(2) * den);
+      
+      return (  CGAL_NTS square(num_x) 
+              + CGAL_NTS square(num_y)
+              + CGAL_NTS square(num_z) ) * CGAL_NTS square(inv) - p.weight();
+    }
+
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
+      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
+    
+    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q),to_exact(r)));
+  }
+  
+  
+  FT operator() (const Weighted_point_3& p,
+                 const Weighted_point_3& q) const
+  {
+    // Compute denominator to swith to exact if it is 0
+    FT qpx = q.x() - p.x();
+    FT qpy = q.y() - p.y();
+    FT qpz = q.z() - p.z();
+    FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) + CGAL_NTS square(qpz);
+    
+    if ( ! CGAL_NTS is_zero(qp2) )
+    {
+      FT inv = FT(1)/(FT(2)*qp2);
+      FT alpha = 1/FT(2) + (p.weight()-q.weight())*inv;
+      
+      return  CGAL_NTS square(alpha)*qp2 - p.weight();      
+    }
+    
+    // Switch to exact
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+    Exact_Rt::Compute_squared_radius_smallest_orthogonal_sphere_3 exact_compute_radius =
+      Exact_Rt().compute_squared_radius_smallest_orthogonal_sphere_3_object();
+    
+    return back_from_exact(exact_compute_radius(to_exact(p),to_exact(q)));
+  }
+  
+  
+  FT operator() (const Weighted_point_3& p) const
+  {
+    return -p.weight();
+  }  
+};
+  
+
+/**
+ * @class Robust_weighted_circumcenter_filtered_traits_3
+ */
+template<class K_>
+struct Robust_weighted_circumcenter_filtered_traits_3
+: public CGAL::Regular_triangulation_euclidean_traits_3<K_>
+{
+  typedef CGAL::Robust_filtered_construct_weighted_circumcenter_3<K_>
+    Construct_weighted_circumcenter_3;
+  
+  typedef CGAL::Robust_filtered_compute_squared_radius_3<K_> Compute_squared_radius_3;
+  
+  typedef CGAL::Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3<K_>
+    Compute_squared_radius_smallest_orthogonal_sphere_3;
+
+  Construct_weighted_circumcenter_3
+  construct_weighted_circumcenter_3_object() const
+  { return Construct_weighted_circumcenter_3(); }
+
+  Compute_squared_radius_3
+  compute_squared_radius_3_object() const
+  { return Compute_squared_radius_3(); }
+  
+  Compute_squared_radius_smallest_orthogonal_sphere_3
+  compute_squared_radius_smallest_orthogonal_sphere_3_object() const
+  { return Compute_squared_radius_smallest_orthogonal_sphere_3(); }
+  
+};  // end class Robust_weighted_circumcenter_filtered_traits_3
+
+
+}  // end namespace CGAL
+
+#endif // CGAL_MESH_3_ROBUST_WEIGHTED_CIRCUMCENTER_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Sizing_grid.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Sizing_grid.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Sizing_grid.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Sizing_grid.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Sliver_perturber.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Sliver_perturber.h
new file mode 100644
index 0000000..5bc4a79
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Sliver_perturber.h
@@ -0,0 +1,1661 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description :
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_SLIVER_PERTURBER_H
+#define CGAL_MESH_3_SLIVER_PERTURBER_H
+
+#include <CGAL/Mesh_3/config.h>
+
+
+#ifdef CGAL_MESH_3_VERBOSE
+  #define CGAL_MESH_3_PERTURBER_VERBOSE
+#endif
+
+#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
+  #ifndef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+    #define CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
+  #else
+    #undef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
+  #endif
+#endif
+
+#include <CGAL/Mesh_3/vertex_perturbation.h>
+#include <CGAL/Mesh_3/C3T3_helpers.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Real_timer.h>
+#include <CGAL/Mesh_3/Null_perturber_visitor.h>
+#include <CGAL/Mesh_3/sliver_criteria.h>
+#include <CGAL/Has_timestamp.h>
+
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+#include <CGAL/Mesh_3/Worksharing_data_structures.h>
+
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+# define CGAL_PROFILE
+# include <CGAL/Profile_counter.h>
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/task.h>
+#endif
+
+#include <boost/format.hpp>
+#ifdef CGAL_MESH_3_USE_RELAXED_HEAP
+#include <boost/pending/relaxed_heap.hpp>
+#else
+#include <CGAL/Modifiable_priority_queue.h>
+#endif //CGAL_MESH_3_USE_RELAXED_HEAP
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/unordered_map.hpp>
+
+#include <memory>
+
+namespace CGAL {
+
+namespace internal { namespace Mesh_3 {
+
+  // Hash function for boost::unordered_map<Vertex_handle,...>
+  template <typename Tr, bool HasTimestamp>
+  struct VHash
+  {
+    typedef typename Tr::Vertex_handle Vertex_handle;
+    std::size_t operator()(Vertex_handle vh) const
+    {
+      return vh->time_stamp();
+    }
+  };
+  template <typename Tr>
+  struct VHash<Tr, false>
+  {
+    typedef typename Tr::Vertex_handle Vertex_handle;
+    std::size_t operator()(Vertex_handle vh) const
+    {
+      return boost::hash_value(&*vh);
+    }
+  };
+}} // end internal::Mesh_3
+
+namespace Mesh_3 {
+
+
+/**
+* @class PVertex
+* Vertex with associated perturbation datas
+*/
+// Sequential
+template< typename FT
+        , typename Vertex_handle
+        , typename Point_3
+        , typename SliverCriterion
+        , typename Perturbation
+        , typename Concurrency_tag>
+class PVertex_
+{
+public:
+typedef PVertex_<FT,
+                 Vertex_handle,
+                 Point_3,
+                 SliverCriterion,
+                 Perturbation,
+                 Concurrency_tag> Self;
+typedef std::size_t id_type;
+
+/// Constructor
+PVertex_()
+: vertex_handle_()
+, incident_sliver_nb_(0)
+, min_value_((std::numeric_limits<double>::max)())
+, try_nb_(0)
+, p_perturbation_(NULL)
+, id_()
+{ }
+
+PVertex_(const Vertex_handle& vh, id_type id)
+: vertex_handle_(vh)
+, incident_sliver_nb_(0)
+, min_value_((std::numeric_limits<double>::max)())
+, try_nb_(0)
+, p_perturbation_(NULL)
+, id_(id)
+{ }
+
+/// Associated vertex
+const Vertex_handle& vertex() const { return vertex_handle_; }
+void set_vertex(const Vertex_handle& vh) { vertex_handle_ = vh; }
+
+/// Incident slivers number
+unsigned int sliver_nb() const { return incident_sliver_nb_; }
+void set_sliver_nb(const unsigned int n) { incident_sliver_nb_ = n; }
+
+/// Current perturbation
+const Perturbation* perturbation() const { return p_perturbation_; }
+void set_perturbation(const Perturbation* p) { p_perturbation_ = p; }
+
+/// Is perturbable
+bool is_perturbable() const
+{
+  return (   (vertex_handle_->in_dimension() > 1)
+          && (NULL != perturbation())
+          && (sliver_nb() != 0) );
+}
+
+/// Min sliver value
+const FT& min_value() const { return min_value_; }
+void set_min_value(const FT& min_value){ min_value_ = min_value; }
+
+/// Try nb
+const unsigned int& try_nb() const { return try_nb_; }
+void set_try_nb(const unsigned int& try_nb) { try_nb_ = try_nb; }
+void increment_try_nb() { ++try_nb_; }
+
+/// Id
+void set_id(const id_type& id) { id_ = id; }
+id_type id() const { return id_; }
+
+/// Operators
+bool operator==(const Self& pv) const { return ( id() == pv.id() ); }
+
+bool operator<(const Self& pv) const
+{
+  // vertex type (smallest-interior first)
+  if ( vertex()->in_dimension() != pv.vertex()->in_dimension() )
+    return vertex()->in_dimension() > pv.vertex()->in_dimension();
+  // nb incident slivers (smallest first)
+  else if ( sliver_nb() != pv.sliver_nb() )
+    return sliver_nb() < pv.sliver_nb();
+  // min angle (smallest first)
+  else if ( min_value() != pv.min_value() )
+    return min_value() < pv.min_value();
+  // try nb (smallest first)
+  else if ( try_nb() != pv.try_nb() )
+    return try_nb() < pv.try_nb();
+  // perturbation type (smallest first)
+  else if ( perturbation() != pv.perturbation() )
+    return *perturbation() < *pv.perturbation();
+  return ( id() < pv.id() ); // all characteristics are the same!
+}
+
+/// Dummy functions
+void update_saved_erase_counter() {}
+bool is_zombie() { return false; }
+
+private:
+/// Private datas
+Vertex_handle vertex_handle_;
+unsigned int incident_sliver_nb_;
+FT min_value_;
+unsigned int try_nb_;
+const Perturbation* p_perturbation_;
+id_type id_;
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template< typename FT
+        , typename Vertex_handle
+        , typename Point_3
+        , typename SliverCriterion
+        , typename Perturbation>
+class PVertex_<FT, Vertex_handle, Point_3,
+               SliverCriterion, Perturbation, Parallel_tag>
+{
+public:
+typedef PVertex_<FT,
+                 Vertex_handle,
+                 Point_3,
+                 SliverCriterion,
+                 Perturbation,
+                 Parallel_tag> Self;
+typedef std::size_t id_type;
+
+/// Constructor
+PVertex_()
+: vertex_handle_()
+, in_dimension_(-1)
+, incident_sliver_nb_(0)
+, min_value_((std::numeric_limits<double>::max)())
+, try_nb_(0)
+, p_perturbation_(NULL)
+, id_()
+{ }
+
+PVertex_(const Vertex_handle& vh, id_type id)
+: vertex_handle_(vh)
+, vh_erase_counter_when_added_(vh->erase_counter())
+, in_dimension_(vh->in_dimension())
+, incident_sliver_nb_(0)
+, min_value_((std::numeric_limits<double>::max)())
+, try_nb_(0)
+, p_perturbation_(NULL)
+, id_(id)
+{ }
+
+/// Associated vertex
+const Vertex_handle& vertex() const { return vertex_handle_; }
+void set_vertex(const Vertex_handle& vh)
+{
+  vertex_handle_ = vh;
+  update_saved_erase_counter();
+}
+void update_saved_erase_counter()
+{
+  vh_erase_counter_when_added_ = vertex_handle_->erase_counter();
+}
+
+int in_dimension() const { return in_dimension_; }
+
+/// Incident slivers number
+unsigned int sliver_nb() const { return incident_sliver_nb_; }
+void set_sliver_nb(const unsigned int n) { incident_sliver_nb_ = n; }
+
+/// Current perturbation
+const Perturbation* perturbation() const { return p_perturbation_; }
+void set_perturbation(const Perturbation* p) { p_perturbation_ = p; }
+
+/// Is perturbable
+bool is_perturbable() const
+{
+  return (   (vertex_handle_->in_dimension() > 1)
+          && (NULL != perturbation())
+          && (sliver_nb() != 0) );
+}
+
+/// Min sliver value
+const FT& min_value() const { return min_value_; }
+void set_min_value(const FT& min_value){ min_value_ = min_value; }
+
+/// Try nb
+const unsigned int& try_nb() const { return try_nb_; }
+void set_try_nb(const unsigned int& try_nb) { try_nb_ = try_nb; }
+void increment_try_nb() { ++try_nb_; }
+
+/// Id
+void set_id(const id_type& id) { id_ = id; }
+id_type id() const { return id_; }
+
+/// Zombie
+bool is_zombie() const
+{
+  return vertex_handle_->erase_counter() != vh_erase_counter_when_added_;
+}
+
+/// Operators
+bool operator==(const Self& pv) const { return ( id() == pv.id() ); }
+
+bool operator<(const Self& pv) const
+{
+  // vertex type (smallest-interior first)
+  if ( in_dimension() != pv.in_dimension() )
+    return in_dimension() > pv.in_dimension();
+  // nb incident slivers (smallest first)
+  else if ( sliver_nb() != pv.sliver_nb() )
+    return sliver_nb() < pv.sliver_nb();
+  // min angle (smallest first)
+  else if ( min_value() != pv.min_value() )
+    return min_value() < pv.min_value();
+  // try nb (smallest first)
+  else if ( try_nb() != pv.try_nb() )
+    return try_nb() < pv.try_nb();
+  // perturbation type (smallest first)
+  else if ( perturbation() != pv.perturbation() )
+    return *perturbation() < *pv.perturbation();
+  return ( id() < pv.id() ); // all characteristics are the same!
+}
+
+private:
+/// Private datas
+Vertex_handle vertex_handle_;
+unsigned int vh_erase_counter_when_added_;
+int in_dimension_;
+unsigned int incident_sliver_nb_;
+FT min_value_;
+unsigned int try_nb_;
+const Perturbation* p_perturbation_;
+id_type id_;
+};
+#endif
+
+/************************************************
+// Class Sliver_perturber_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Tr, typename Concurrency_tag>
+class Sliver_perturber_base
+{
+protected:
+  typedef typename Tr::Vertex_handle                        Vertex_handle;
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename std::vector<Vertex_handle>               Bad_vertices_vector;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+
+
+  Sliver_perturber_base(const Bbox_3 &, int) {}
+
+  Lock_data_structure *
+    get_lock_data_structure()                       const { return 0; }
+  void unlock_all_elements()                        const {}
+  void create_root_task()                           const {}
+  bool flush_work_buffers()                         const { return true; }
+  void wait_for_all()                               const {}
+  void destroy_root_task()                          const {}
+  template <typename Func, typename PVertex>
+  void enqueue_work(Func, const PVertex &)          const {}
+
+  void increment_erase_counter(const Vertex_handle &) const {}
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Tr>
+class Sliver_perturber_base<Tr, Parallel_tag>
+{
+protected:
+  typedef typename Tr::Vertex_handle                        Vertex_handle;
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename tbb::concurrent_vector<Vertex_handle>    Bad_vertices_vector;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+
+  Sliver_perturber_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
+    : m_lock_ds(bbox, num_grid_cells_per_axis)
+    , m_worksharing_ds(bbox)
+  {
+  }
+
+  Lock_data_structure *get_lock_data_structure() const
+  {
+    return &m_lock_ds;
+  }
+
+  void unlock_all_elements() const
+  {
+    m_lock_ds.unlock_all_points_locked_by_this_thread();
+  }
+
+  void create_root_task() const
+  {
+    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
+    m_empty_root_task->set_ref_count(1);
+  }
+
+  bool flush_work_buffers() const
+  {
+    m_empty_root_task->set_ref_count(1);
+    bool keep_flushing = m_worksharing_ds.flush_work_buffers(*m_empty_root_task);
+    wait_for_all();
+    return keep_flushing;
+  }
+
+  void wait_for_all() const
+  {
+    m_empty_root_task->wait_for_all();
+  }
+
+  void destroy_root_task() const
+  {
+    tbb::task::destroy(*m_empty_root_task);
+    m_empty_root_task = 0;
+  }
+
+  template <typename Func, typename PVertex>
+  void enqueue_work(Func f, const PVertex &pv) const
+  {
+    CGAL_assertion(m_empty_root_task != 0);
+    m_worksharing_ds.enqueue_work(f, pv, *m_empty_root_task);
+  }
+
+  void increment_erase_counter(const Vertex_handle &vh) const
+  {
+    vh->increment_erase_counter();
+  }
+
+public:
+
+protected:
+  mutable Lock_data_structure           m_lock_ds;
+  mutable Mesh_3::Auto_worksharing_ds   m_worksharing_ds;
+  mutable tbb::task                    *m_empty_root_task;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+
+
+/************************************************
+// Class Sliver_perturber
+************************************************/
+
+template < typename C3T3,
+           typename MeshDomain,
+           typename SliverCriterion = Mesh_3::Min_dihedral_angle_criterion
+                                  <typename C3T3::Triangulation::Geom_traits>,
+           typename Visitor_ = Null_perturber_visitor<C3T3> >
+class Sliver_perturber
+: public Sliver_perturber_base<typename C3T3::Triangulation,
+                               typename C3T3::Concurrency_tag>
+{
+  // Types
+  typedef typename C3T3::Concurrency_tag Concurrency_tag;
+
+  typedef Sliver_perturber<C3T3, MeshDomain, SliverCriterion, Visitor_> Self;
+  typedef Sliver_perturber_base<
+    typename C3T3::Triangulation, Concurrency_tag>                      Base;
+
+  typedef typename C3T3::Triangulation  Tr;
+  typedef typename Tr::Geom_traits      Gt;
+
+  typedef typename Tr::Cell_handle              Cell_handle;
+  typedef typename Base::Vertex_handle          Vertex_handle;
+  typedef typename Tr::Vertex                   Vertex;
+  typedef typename MeshDomain::Point_3          Point_3;
+
+  typedef typename std::vector<Cell_handle>     Cell_vector;
+  typedef typename std::vector<Vertex_handle>   Vertex_vector;
+  typedef typename Base::Bad_vertices_vector    Bad_vertices_vector;
+
+  typedef typename Gt::FT                       FT;
+
+  // Helper
+  typedef class C3T3_helpers<C3T3,MeshDomain> C3T3_helpers;
+
+  using Base::get_lock_data_structure;
+
+  // Visitor
+  // Should define
+  //  - bound_reached(FT bound)
+  //  - end_of_perturbation_iteration(std::size_t vertices_left)
+  typedef Visitor_ Visitor;
+
+  // perturbations
+public:
+  typedef Abstract_perturbation<C3T3,MeshDomain,SliverCriterion> Perturbation;
+  typedef boost::ptr_vector<Perturbation>                 Perturbation_vector;
+
+private:
+  // Relaxed heap
+
+  typedef PVertex_<FT,
+                   Vertex_handle,
+                   Point_3,
+                   SliverCriterion,
+                   Perturbation,
+                   Concurrency_tag> PVertex;
+
+  /**
+   * @class PVertex_id
+   * relaxed heap
+   */
+  class PVertex_id :
+  public boost::put_get_helper<typename PVertex::id_type, PVertex_id>
+  {
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef typename PVertex::id_type value_type;
+    typedef typename PVertex::id_type reference;
+    typedef PVertex key_type;
+
+    value_type operator[] (const key_type& pv) const { return pv.id(); }
+  };
+
+  typedef std::less<PVertex> less_PVertex;
+  #ifdef CGAL_MESH_3_USE_RELAXED_HEAP
+  typedef boost::relaxed_heap<PVertex, less_PVertex, PVertex_id> PQueue;
+  #else
+  typedef ::CGAL::internal::mutable_queue_with_remove<PVertex,std::vector<PVertex>, less_PVertex, PVertex_id> PQueue;
+  #endif //CGAL_MESH_3_USE_RELAXED_HEAP
+
+public:
+  /**
+   * Constructor
+   */
+  Sliver_perturber(C3T3& c3t3,
+                   const MeshDomain& domain,
+                   const SliverCriterion& criterion);
+
+  /**
+   * @brief Launch perturbation
+   * @param sliver_bound the bound the perturber will try to achieve
+   * @param delta the size of the step used by the perturber
+   *
+   * Runs explicit perturbation. The goal is that for each tet of the mesh,
+   * SliverCriterion(tet) > sliver_bound.
+   * The perturber runs step by step, using delta as step size.
+   */
+  Mesh_optimization_return_code
+  operator()(Visitor visitor = Visitor());
+
+  /**
+   * Adds a perturbation at the end of the perturbation queue
+   */
+  void add_perturbation(Perturbation* perturbation);
+
+  /// Time accessors
+  void set_time_limit(double time) { time_limit_ = time; }
+  double time_limit() const { return time_limit_; }
+
+private:
+
+  // -----------------------------------
+  // Private methods
+  // -----------------------------------
+
+  /**
+   * One step perturbation: tries to achieve sliver_bound quality in the mesh
+   */
+  bool perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& v) const;
+
+  /**
+   * Builds priority queue. It will contain all vertices that have quality below
+   * sliver_bound.
+   * Returns priority queue size.
+   *
+   * precondition: pqueue.empty()
+   */
+  int build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const;
+
+  /**
+   * Updates priority queue for all vertices of \c vertices
+   */
+  // Sequential
+  int update_priority_queue(const Vertex_vector& vertices,
+                            const FT& sliver_bound,
+                            PQueue& pqueue) const;
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  int update_priority_queue( const Vertex_vector& vertices
+                           , const FT& sliver_bound
+                           , Visitor& visitor
+                           , Bad_vertices_vector &bad_vertices) const;
+#endif
+
+  /**
+   * Updates \c pv in priority queue
+   */
+  int update_priority_queue(const PVertex& pv, PQueue& pqueue) const;
+
+  // For parallel version
+  void
+  perturb_vertex( PVertex pv
+                , const FT& sliver_bound
+                , Visitor& visitor
+                , Bad_vertices_vector &bad_vertices
+                , bool *could_lock_zone
+                ) const;
+
+  /**
+   * Returns a pvertex from a vertex handle \c vh, using id \c pv_id
+   */
+  PVertex
+  make_pvertex(const Vertex_handle& vh,
+               const FT& sliver_bound,
+               const typename PVertex::id_type& pv_id) const;
+  PVertex
+  make_pvertex__concurrent(
+               const Vertex_handle& vh,
+               const FT& sliver_bound,
+               const typename PVertex::id_type& pv_id) const;
+
+  /**
+   * Updates a pvertex \c pv
+   */
+  void update_pvertex(PVertex& pv, const FT& sliver_bound) const;
+  void update_pvertex__concurrent(PVertex& pv, const FT& sliver_bound) const;
+
+  /**
+   * Returns \c vh pvertex id
+   */
+  typename PVertex::id_type get_pvertex_id(const Vertex_handle& vh) const
+  {
+    return static_cast<typename PVertex::id_type>(vh->meshing_info());
+  }
+
+  /**
+   * Update bad vertices vector, wrt \c sliver_bound
+   */
+  // Sequential
+  void update_bad_vertices(std::vector<Vertex_handle> &bad_vertices,
+                           const FT& sliver_bound) const;
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  void update_bad_vertices(tbb::concurrent_vector<Vertex_handle> &bad_vertices,
+                           const FT& sliver_bound) const;
+#endif
+
+  /**
+   * Initializes vertices ids
+   */
+  void initialize_vertices_id() const;
+
+  /**
+   * Returns true if time_limit is reached
+   */
+  bool is_time_limit_reached() const
+  {
+    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
+  }
+
+
+#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
+  /// Verbose mode methods
+  void print_perturbations_statistics() const;
+  void print_final_perturbations_statistics() const;
+  void reset_perturbation_counters();
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // For parallel version
+  void
+  enqueue_task(const PVertex &pv,
+               const FT& sliver_bound,
+               Visitor& visitor,
+               Bad_vertices_vector &bad_vertices
+               ) const;
+#endif
+
+private:
+
+#ifdef CGAL_LINKED_WITH_TBB
+
+  // Functor for enqueue_task function
+  template <typename SP, typename Bad_vertices_vector_>
+  class Perturb_vertex
+  {
+    const SP              & m_sliver_perturber;
+    PVertex                 m_pv;
+    FT                      m_sliver_bound;
+    Visitor               & m_visitor;
+    Bad_vertices_vector_  & m_bad_vertices;
+
+  public:
+    // Constructor
+    Perturb_vertex(const SP &sp,
+                   const PVertex &pv,
+                   FT sliver_bound,
+                   Visitor& visitor,
+                   Bad_vertices_vector_ &bad_vertices)
+    : m_sliver_perturber(sp),
+      m_pv(pv),
+      m_sliver_bound(sliver_bound),
+      m_visitor(visitor),
+      m_bad_vertices(bad_vertices)
+    {
+    }
+
+    // Constructor
+    Perturb_vertex(const Perturb_vertex &pvx)
+    : m_sliver_perturber(pvx.m_sliver_perturber),
+      m_pv(pvx.m_pv),
+      m_sliver_bound(pvx.m_sliver_bound),
+      m_visitor(pvx.m_visitor),
+      m_bad_vertices(pvx.m_bad_vertices)
+    {}
+
+    // operator()
+    void operator()() const
+    {
+      bool could_lock_zone;
+      do
+      {
+        m_sliver_perturber.perturb_vertex(
+          m_pv, m_sliver_bound, m_visitor, m_bad_vertices, &could_lock_zone);
+        m_sliver_perturber.unlock_all_elements();
+      } while (!could_lock_zone);
+
+      if ( m_sliver_perturber.is_time_limit_reached() )
+        tbb::task::self().cancel_group_execution();
+    }
+  };
+#endif
+
+  // -----------------------------------
+  // Private data
+  // -----------------------------------
+  C3T3& c3t3_;
+  Tr& tr_;
+  const MeshDomain& domain_;
+  SliverCriterion sliver_criterion_;
+  Perturbation_vector perturbation_vector_;
+  C3T3_helpers helper_;
+
+  // Internal perturbation ordering
+  int next_perturbation_order_;
+
+  // Timer
+  double time_limit_;
+  CGAL::Real_timer running_time_;
+};
+
+
+
+
+
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+Sliver_perturber<C3T3,Md,Sc,V_>::
+Sliver_perturber(C3T3& c3t3,
+                 const Md& domain,
+                 const Sc& criterion)
+  : Base(c3t3.bbox(),
+         Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
+  , c3t3_(c3t3)
+  , tr_(c3t3_.triangulation())
+  , domain_(domain)
+  , sliver_criterion_(criterion)
+  , helper_(c3t3_,domain_,get_lock_data_structure())
+  , next_perturbation_order_(0)
+  , time_limit_(-1)
+  , running_time_()
+{
+  // If we're multi-thread
+  tr_.set_lock_data_structure(get_lock_data_structure());
+}
+
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+Mesh_optimization_return_code
+Sliver_perturber<C3T3,Md,Sc,V_>::
+operator()(Visitor visitor)
+{
+  //check criterion bound
+  if ( sliver_criterion_.sliver_bound() == 0 )
+    sliver_criterion_.set_sliver_bound(Sc::default_value);
+
+  // Reset sliver value cache
+  helper_.reset_cache();
+
+  // Init time counter
+  if (running_time_.is_running())
+    running_time_.stop();
+  running_time_.reset();
+  running_time_.start();
+
+#ifdef CGAL_MESH_3_PROFILING
+  WallClockTimer t;
+#endif
+
+  // Build priority queue (we use one queue for all steps)
+  PQueue pqueue(tr_.number_of_vertices());
+
+  // Initialize vertices ids
+  initialize_vertices_id();
+
+
+#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) \
+ || defined(CGAL_MESH_3_PROFILING)
+  std::cerr << "Running sliver perturbation..." << std::endl;
+#endif
+
+#ifdef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
+  std::cerr << "Legend of the following line: "
+            << "(#vertices in pqueue, #iterations, #fails)" << std::endl;
+#endif
+
+  const FT& delta = sliver_criterion_.get_perturbation_unit();
+  FT current_bound = delta;
+  bool perturbation_ok = true;
+  while(current_bound <= sliver_criterion_.sliver_bound() && perturbation_ok)
+  {
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+    // reset_perturbation_counters is not const
+    reset_perturbation_counters();
+#endif
+    perturbation_ok = perturb(current_bound, pqueue, visitor);
+
+    visitor.bound_reached(current_bound);
+
+    current_bound += delta;
+    if ( (current_bound >= sliver_criterion_.sliver_bound())
+        && (current_bound < sliver_criterion_.sliver_bound() + delta) )
+    {
+      current_bound = sliver_criterion_.sliver_bound();
+    }
+  }
+
+#ifdef CGAL_MESH_3_PROFILING
+  double perturbation_time = t.elapsed();
+#endif
+
+  running_time_.stop();
+  helper_.reset_cache();//in case we re-use caches in another operation
+                               // after this perturbation
+
+#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
+  std::cerr << std::endl
+            << "Total perturbation time: " << running_time_.time() << "s";
+  std::cerr << std::endl << "Perturbation statistics:" << std::endl;
+  print_final_perturbations_statistics();
+#endif
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << std::endl << "Total perturbation 'wall-clock' time: "
+            << perturbation_time << "s" << std::endl;
+#endif
+
+  Mesh_optimization_return_code ret;
+
+  if ( is_time_limit_reached() ) {
+#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << "Perturbation return code: TIME_LIMIT_REACHED\n\n";
+#endif // CGAL_MESH_3_PERTURBER_VERBOSE
+    ret = TIME_LIMIT_REACHED;
+  }
+  else if ( !perturbation_ok ) {
+#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << "Perturbation return code: CANT_IMPROVE_ANYMORE\n\n";
+#endif // CGAL_MESH_3_PERTURBER_VERBOSE
+    ret = CANT_IMPROVE_ANYMORE;
+  }
+  else
+  {
+#if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << "Perturbation return code: BOUND_REACHED\n\n";
+#endif // CGAL_MESH_3_PERTURBER_VERBOSE
+    ret = BOUND_REACHED;
+  }
+
+#if defined(CGAL_MESH_3_EXPORT_PERFORMANCE_DATA) \
+ && defined(CGAL_MESH_3_PROFILING)
+  if (ret == BOUND_REACHED)
+  {
+    CGAL_MESH_3_SET_PERFORMANCE_DATA("Perturber_optim_time", perturbation_time);
+  }
+  else
+  {
+    CGAL_MESH_3_SET_PERFORMANCE_DATA("Perturber_optim_time",
+      (ret == CANT_IMPROVE_ANYMORE ?
+      "CANT_IMPROVE_ANYMORE" : "TIME_LIMIT_REACHED"));
+  }
+#endif
+
+  return ret;
+}
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+add_perturbation(Perturbation* perturbation)
+{
+  if ( !perturbation_vector_.empty() )
+    perturbation_vector_.back().set_next(perturbation);
+
+  if ( NULL != perturbation )
+  {
+    // Set order
+    perturbation->set_order(next_perturbation_order_++);
+
+    // Add perturbation
+    perturbation_vector_.push_back(perturbation);
+  }
+}
+
+
+
+
+// -----------------------------------
+// Private methods
+// -----------------------------------
+template <typename C3T3, typename Md, typename Sc, typename V_>
+bool
+Sliver_perturber<C3T3,Md,Sc,V_>::
+perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const
+{
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  CGAL::Real_timer timer;
+  timer.start();
+  std::streamsize prec = std::cerr.precision(4);
+  std::cerr << "Perturb sliver vertices (bound: " << sliver_bound
+            << ") ..." << std::endl;
+  std::cerr.precision(prec);
+#endif
+
+  // build priority queue
+  int pqueue_size = build_priority_queue(sliver_bound, pqueue);
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  std::cerr << "Legend of the following line: "
+            << "(#vertices in pqueue, #iterations, #fails)" << std::endl;
+
+  // Store construction time
+  timer.stop();
+  double construction_time = timer.time();
+  timer.reset();
+  timer.start();
+#endif
+
+  // Stores the vertices for which perturbation has failed
+  Bad_vertices_vector bad_vertices;
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    this->create_root_task();
+
+    while (pqueue.size() > 0)
+    {
+      PVertex pv = pqueue.top();
+      pqueue.pop();
+      enqueue_task(pv, sliver_bound,
+                   visitor, bad_vertices);
+    }
+
+    this->wait_for_all();
+
+# if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << " Flushing";
+# endif
+    bool keep_flushing = true;
+    while (keep_flushing)
+    {
+      keep_flushing = this->flush_work_buffers();
+# if defined(CGAL_MESH_3_PERTURBER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+      std::cerr << ".";
+# endif
+    }
+
+    this->destroy_root_task();
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+# ifdef CGAL_MESH_3_PERTURBER_VERBOSE
+    int iteration_nb = 0;
+# endif
+
+    while ( !is_time_limit_reached() && !pqueue.empty() )
+    {
+      // Get pqueue head
+      PVertex pv = pqueue.top();
+      pqueue.pop();
+      --pqueue_size;
+
+      CGAL_assertion(pv.is_perturbable());
+
+      // Get pvertex slivers list
+# ifdef CGAL_NEW_INCIDENT_SLIVERS
+      Cell_vector slivers;
+      helper_.new_incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound,
+                                 std::back_inserter(slivers));
+# else
+      Cell_vector slivers =
+        helper_.incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound);
+# endif
+
+      CGAL_assertion(slivers.size() == pv.sliver_nb());
+
+      // Perturb vertex
+      Vertex_vector modified_vertices;
+
+      // pv.perturbation() should not be NULL if pv is in pqueue
+      CGAL_assertion(pv.perturbation() != NULL);
+
+      std::pair<bool,Vertex_handle> perturbation_ok =
+        pv.perturbation()->operator()(pv.vertex(),
+                                      slivers,
+                                      c3t3_,
+                                      domain_,
+                                      sliver_criterion_,
+                                      sliver_bound,
+                                      modified_vertices);
+
+      // If vertex has changed - may happen in two cases: vertex has been moved
+      // or vertex has been reverted to the same location -
+      if ( perturbation_ok.second != pv.vertex() )
+      {
+        // Update pvertex vertex
+        pv.set_vertex(perturbation_ok.second);
+      }
+
+      // If v has been moved
+      if ( perturbation_ok.first )
+      {
+        // Update pvertex
+        update_pvertex(pv,sliver_bound);
+
+        // If pv needs to be modified again, try first perturbation
+        pv.set_perturbation(&perturbation_vector_.front());
+        pv.increment_try_nb();
+
+        // update modified vertices
+        pqueue_size += update_priority_queue(modified_vertices,
+                                             sliver_bound,
+                                             pqueue);
+      }
+      else
+      {
+        // If perturbation fails, try next one
+        pv.set_perturbation(pv.perturbation()->next());
+
+        if ( NULL == pv.perturbation() )
+        {
+          bad_vertices.push_back(pv.vertex());
+        }
+      }
+
+      // Update pqueue in every cases, because pv was poped
+      pqueue_size += update_priority_queue(pv, pqueue);
+      visitor.end_of_perturbation_iteration(pqueue_size);
+
+# ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+      ++iteration_nb;
+      std::cerr << boost::format("\r             \r"
+                                 "(%1%,%2%,%4%) (%|3$.1f| iteration/s)")
+      % pqueue_size
+      % iteration_nb
+      % (iteration_nb / timer.time())
+      % bad_vertices.size();
+# endif
+
+# ifdef CGAL_MESH_3_PERTURBER_LOW_VERBOSITY
+      ++iteration_nb;
+      std::cerr << boost::format("\r             \r"
+                                 "bound %5%: (%1%,%2%,%4%) (%|3$.1f| iteration/s)")
+      % pqueue_size
+      % iteration_nb
+      % (iteration_nb / running_time_.time())
+      % bad_vertices.size()
+      % sliver_bound;
+# endif
+    }
+  }
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  std::cerr << std::endl;
+  print_perturbations_statistics();
+  std::cerr << "Step perturbation time: " << timer.time() + construction_time
+            << "s" << std::endl << std::endl;
+#endif
+
+  if ( is_time_limit_reached() )
+    return false;
+
+  // update bad vertices list (remove those which are not bad anymore)
+  update_bad_vertices(bad_vertices,sliver_bound);
+  return bad_vertices.empty();
+}
+
+
+#ifdef CGAL_FASTER_BUILD_QUEUE
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+int
+Sliver_perturber<C3T3,Md,Sc,V_>::
+build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const
+{
+  CGAL_precondition(pqueue.empty());
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  CGAL::Real_timer timer;
+  timer.start();
+  std::cerr << "Build pqueue...";
+#endif
+
+  int pqueue_size = 0;
+
+  typedef typename std::iterator_traits<Vertex_handle>::value_type Vertex;
+  typedef CGAL::internal::Has_timestamp<Vertex> Vertex_has_timestamp;
+  using CGAL::internal::Mesh_3::VHash;
+  typedef VHash<Tr, Vertex_has_timestamp::value> Hash_fct;
+  typedef boost::unordered_map<Vertex_handle,PVertex,Hash_fct> M;
+
+  M vpm;
+  for ( typename Tr::Finite_cells_iterator cit = tr_.finite_cells_begin();
+       cit != tr_.finite_cells_end() ;
+       ++cit )
+  {
+    if(helper_.is_sliver(cit, sliver_criterion_, sliver_bound))
+    {
+      double d = cit->sliver_value();
+      for(int i=0; i< 4; i++){
+        Vertex_handle vh = cit->vertex(i);
+        PVertex& pv = vpm[vh];
+        if(pv.sliver_nb() ==0)
+        {
+          pv.set_vertex(vh);
+          pv.set_id( get_pvertex_id(vh));
+          pv.set_sliver_nb(1);
+          pv.set_min_value(d);
+          pv.set_perturbation(&perturbation_vector_.front());
+        }
+        else
+        {
+          pv.set_sliver_nb(pv.sliver_nb()+1);
+          if(d < pv.min_value())
+            pv.set_min_value(d);
+        }
+      }
+    }
+  }
+
+  for( typename M::iterator vit = vpm.begin();
+       vit != vpm.end() ;
+       ++vit )
+    pqueue_size += update_priority_queue(vit->second, pqueue);
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  std::cerr << "done (" << pqueue_size << " vertices inserted in "
+            << timer.time() << "s)\n";
+#endif
+
+  return pqueue_size;
+}
+
+#else // not CGAL_FASTER_BUILD_QUEUE
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+int
+Sliver_perturber<C3T3,Md,Sc,V_>::
+build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const
+{
+  CGAL_precondition(pqueue.empty());
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  CGAL::Real_timer timer;
+  timer.start();
+  std::cerr << "Build pqueue...";
+#endif
+
+  int pqueue_size = 0;
+
+  for ( typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin();
+       vit != tr_.finite_vertices_end() ;
+       ++vit )
+  {
+    PVertex pv = make_pvertex(vit, sliver_bound, get_pvertex_id(vit));
+    pqueue_size += update_priority_queue(pv, pqueue);
+  }
+
+#ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY
+  std::cerr << "done (" << pqueue_size << " vertices inserted in "
+            << timer.time() << "s)\n";
+#endif
+
+  return pqueue_size;
+}
+#endif // not CGAL_FASTER_BUILD_QUEUE
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+int
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_priority_queue(const Vertex_vector& vertices,
+                      const FT& sliver_bound,
+                      PQueue& pqueue) const
+{
+  int modified_pv_nb = 0;
+  for ( typename Vertex_vector::const_iterator vit = vertices.begin() ;
+       vit != vertices.end() ;
+       ++vit )
+  {
+    PVertex pv = make_pvertex(*vit,sliver_bound,get_pvertex_id(*vit));
+    modified_pv_nb += update_priority_queue(pv, pqueue);
+  }
+
+  return modified_pv_nb;
+}
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+// For parallel version
+template <typename C3T3, typename Md, typename Sc, typename V_>
+int
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_priority_queue( const Vertex_vector& vertices
+                     , const FT& sliver_bound
+                     , Visitor& visitor
+                     , Bad_vertices_vector &bad_vertices) const
+{
+  int modified_pv_nb = 0;
+  for ( typename Vertex_vector::const_iterator vit = vertices.begin() ;
+       vit != vertices.end() ;
+       ++vit )
+  {
+    PVertex pv = make_pvertex__concurrent(*vit,sliver_bound,get_pvertex_id(*vit));
+    if (pv.is_perturbable())
+    {
+      enqueue_task(pv, sliver_bound, visitor, bad_vertices);
+      ++modified_pv_nb;
+    }
+  }
+
+  return modified_pv_nb;
+}
+#endif
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+int
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_priority_queue(const PVertex& pv, PQueue& pqueue) const
+{
+  if ( pqueue.contains(pv) )
+  {
+    if ( pv.is_perturbable() )
+    {
+      pqueue.update(pv);
+      return 0;
+    }
+    else
+    {
+      pqueue.remove(pv);
+      return -1;
+    }
+  }
+  else
+  {
+    if ( pv.is_perturbable() )
+    {
+      pqueue.push(pv);
+      return 1;
+    }
+  }
+
+  return 0;
+}
+
+#ifdef CGAL_LINKED_WITH_TBB
+// For parallel version
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+perturb_vertex( PVertex pv
+              , const FT& sliver_bound
+              , Visitor& visitor
+              , Bad_vertices_vector &bad_vertices
+              , bool *could_lock_zone
+              ) const
+{
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+  static Profile_branch_counter_3 bcounter(
+    "early withdrawals / late withdrawals / successes [Perturber]");
+#endif
+
+  *could_lock_zone = true;
+
+  // Zombie?
+  if (pv.is_zombie())
+  {
+    return;
+  }
+
+  Point_3 p = pv.vertex()->point();
+  if (!helper_.try_lock_point_no_spin(p) || p != pv.vertex()->point())
+  {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+    bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+    *could_lock_zone = false;
+    return;
+  }
+
+  // Zombie? (in case the vertex has changed in the meantime)
+  if (pv.is_zombie())
+  {
+    return;
+  }
+
+  CGAL_assertion(pv.is_perturbable());
+
+  int num_new_vertices_to_treat = 0;
+
+  Cell_vector slivers;
+  slivers.reserve(8);
+  if (!helper_.try_lock_and_get_incident_slivers(
+    pv.vertex(), sliver_criterion_, sliver_bound, slivers))
+  {
+    *could_lock_zone = false;
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+    bcounter.increment_branch_1(); // THIS is a late withdrawal!
+#endif
+  }
+  else
+  {
+    // Slivers may be empty if the vertex has been modified by another thread in the meatime
+    if (slivers.empty())
+    {
+      return;
+    }
+
+    // Perturb vertex
+    Vertex_vector modified_vertices;
+
+    // pv.perturbation() should not be NULL if pv is in pqueue
+    CGAL_assertion(pv.perturbation() != NULL);
+
+    std::pair<bool,Vertex_handle> perturbation_ok =
+      pv.perturbation()->operator()(pv.vertex(),
+                                    slivers,
+                                    c3t3_,
+                                    domain_,
+                                    sliver_criterion_,
+                                    sliver_bound,
+                                    modified_vertices,
+                                    could_lock_zone);
+
+    if (*could_lock_zone)
+    {
+      // If vertex has changed - may happen in two cases: vertex has been moved
+      // or vertex has been reverted to the same location -
+      if ( perturbation_ok.second != pv.vertex() )
+      {
+        // Update pvertex vertex
+        pv.set_vertex(perturbation_ok.second);
+      }
+      // If the vertex hasn't changed, we still need to "virtually" increment
+      // the erase counter, because we need to invalidate the PVertex that
+      // may be in other threads' queues
+      else
+      {
+        this->increment_erase_counter(pv.vertex());
+      }
+
+      // If v has been moved
+      if ( perturbation_ok.first )
+      {
+        // Update pvertex
+        update_pvertex__concurrent(pv,sliver_bound);
+
+        // If pv needs to be modified again, try first perturbation
+        pv.set_perturbation(&perturbation_vector_.front());
+        pv.increment_try_nb();
+
+        // update modified vertices
+        num_new_vertices_to_treat +=
+          update_priority_queue(modified_vertices, sliver_bound, visitor, bad_vertices);
+      }
+      else
+      {
+        // If perturbation fails, try next one
+        pv.set_perturbation(pv.perturbation()->next());
+        pv.update_saved_erase_counter();
+
+        if ( NULL == pv.perturbation() )
+        {
+          bad_vertices.push_back(pv.vertex());
+        }
+      }
+
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+      ++bcounter;
+#endif
+
+      // Update pqueue in every cases, because pv was poped
+      if (pv.is_perturbable())
+      {
+        enqueue_task(pv, sliver_bound, visitor, bad_vertices);
+        ++num_new_vertices_to_treat;
+      }
+    }
+    else
+    {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+      bcounter.increment_branch_1();   // THIS is a late withdrawal!
+#endif
+    }
+  }
+
+  visitor.end_of_perturbation_iteration(0);
+}
+#endif
+
+
+// Sequential
+template <typename C3T3, typename Md, typename Sc, typename V_>
+typename Sliver_perturber<C3T3,Md,Sc,V_>::PVertex
+Sliver_perturber<C3T3,Md,Sc,V_>::
+make_pvertex(const Vertex_handle& vh,
+             const FT& sliver_bound,
+             const typename PVertex::id_type& pv_id) const
+{
+  CGAL_assertion(!tr_.is_infinite(vh));
+
+  // Make pvertex in all cases
+  PVertex pv(vh,pv_id);
+  pv.set_perturbation(&perturbation_vector_.front());
+  update_pvertex(pv, sliver_bound);
+
+  return pv;
+}
+
+// Parallel
+template <typename C3T3, typename Md, typename Sc, typename V_>
+typename Sliver_perturber<C3T3,Md,Sc,V_>::PVertex
+Sliver_perturber<C3T3,Md,Sc,V_>::
+make_pvertex__concurrent(
+             const Vertex_handle& vh,
+             const FT& sliver_bound,
+             const typename PVertex::id_type& pv_id) const
+{
+  // Make pvertex in all cases
+  PVertex pv(vh,pv_id);
+  pv.set_perturbation(&perturbation_vector_.front());
+  update_pvertex__concurrent(pv, sliver_bound);
+
+  return pv;
+}
+
+
+// Sequential
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_pvertex(PVertex& pv, const FT& sliver_bound) const
+{
+#ifdef CGAL_NEW_INCIDENT_SLIVERS
+  Cell_vector slivers;
+  helper_.new_incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound, std::back_inserter(slivers));
+#else
+  Cell_vector slivers =
+    helper_.incident_slivers(pv.vertex(), sliver_criterion_, sliver_bound);
+#endif
+
+  pv.set_sliver_nb(static_cast<unsigned int>(slivers.size()));
+  pv.set_min_value(helper_.min_sliver_value(slivers, sliver_criterion_));
+}
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_pvertex__concurrent(PVertex& pv, const FT& sliver_bound) const
+{
+  Cell_vector slivers;
+  helper_.get_incident_slivers_without_using_tds_data(
+    pv.vertex(), sliver_criterion_, sliver_bound, slivers);
+
+  pv.set_sliver_nb(static_cast<unsigned int>(slivers.size()));
+  pv.set_min_value(helper_.min_sliver_value(slivers, sliver_criterion_));
+}
+#endif
+
+// Sequential
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_bad_vertices(std::vector<Vertex_handle> &bad_vertices,
+                    const FT& sliver_bound) const
+{
+  typename std::vector<Vertex_handle>::iterator vit = bad_vertices.begin();
+  while ( vit != bad_vertices.end() )
+  {
+    if ( tr_.is_vertex(*vit)
+        && helper_.min_incident_value(*vit,sliver_criterion_) <= sliver_bound )
+    {
+      ++vit;
+    }
+    else
+    {
+      vit = bad_vertices.erase(vit);
+    }
+  }
+}
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+update_bad_vertices(tbb::concurrent_vector<Vertex_handle> &bad_vertices,
+                    const FT& sliver_bound) const
+{
+  tbb::concurrent_vector<Vertex_handle> tmpv;
+
+  typename tbb::concurrent_vector<Vertex_handle>::iterator vit
+    = bad_vertices.begin();
+  while ( vit != bad_vertices.end() )
+  {
+    if ( tr_.is_vertex(*vit)
+        && helper_.min_incident_value(*vit,sliver_criterion_) <= sliver_bound )
+    {
+      tmpv.push_back(*vit);
+    }
+    ++vit;
+  }
+  bad_vertices.swap(tmpv);
+}
+#endif // CGAL_LINKED_WITH_TBB
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+initialize_vertices_id() const
+{
+  int cur_id = 0;
+  for(typename Tr::Finite_vertices_iterator it = tr_.finite_vertices_begin(); 
+      it != tr_.finite_vertices_end(); ++it) {
+    it->set_meshing_info(cur_id++);
+  }
+}
+
+
+#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+print_perturbations_statistics() const
+{
+  int total_perturbation_nb = 0;
+  typename Perturbation_vector::const_iterator it = perturbation_vector_.begin();
+  for ( ; it != perturbation_vector_.end() ; ++it )
+  {
+    total_perturbation_nb += it->counter();
+  }
+
+  if ( 0 == total_perturbation_nb )
+  {
+    std::cerr << "No perturbation done at this step" << std::endl;
+    return;
+  }
+
+  for ( it = perturbation_vector_.begin() ;
+       it != perturbation_vector_.end() ;
+       ++it )
+  {
+    std::cerr << it->perturbation_name() << ": "
+              << (double)it->counter() / (double)total_perturbation_nb * 100.
+              << "% (" << it->counter() << " in " << it->time() << "s)"
+              << std::endl;
+  }
+}
+
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+print_final_perturbations_statistics() const
+{
+  int total_perturbation_nb = 0;
+  typename Perturbation_vector::const_iterator it = perturbation_vector_.begin();
+  for ( ; it != perturbation_vector_.end() ; ++it )
+  {
+    total_perturbation_nb += it->total_counter();
+  }
+
+  if ( 0 == total_perturbation_nb )
+  {
+    std::cerr << "No perturbation done" << std::endl;
+    return;
+  }
+
+  for ( it = perturbation_vector_.begin() ;
+       it != perturbation_vector_.end() ;
+       ++it )
+  {
+    std::cerr << it->perturbation_name() << ": "
+              << (double)it->total_counter() / (double)total_perturbation_nb * 100.
+              << "% (" << it->total_counter() << " in " << it->total_time() << "ms)"
+              << std::endl;
+  }
+}
+
+
+
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+reset_perturbation_counters()
+{
+  typename Perturbation_vector::iterator it = perturbation_vector_.begin();
+  for ( ; it != perturbation_vector_.end() ; ++it )
+  {
+    it->reset_counter();
+    it->reset_timer();
+  }
+}
+#endif
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+// For parallel version
+template <typename C3T3, typename Md, typename Sc, typename V_>
+void
+Sliver_perturber<C3T3,Md,Sc,V_>::
+enqueue_task(const PVertex &pv,
+             const FT& sliver_bound,
+             Visitor& visitor,
+             Bad_vertices_vector &bad_vertices
+             ) const
+{
+  this->enqueue_work(
+    Perturb_vertex<Self, Bad_vertices_vector>(
+      *this, pv, sliver_bound, visitor, bad_vertices),
+    pv);
+}
+#endif
+
+} // end namespace Mesh_3
+
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_3_SLIVERS_PERTURBER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder.h
new file mode 100644
index 0000000..df65de8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder.h
@@ -0,0 +1,1869 @@
+// Copyright (c) 2004-2007  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Stephane Tayeb
+
+#ifndef CGAL_MESH_3_SLIVERS_EXUDER_H
+#define CGAL_MESH_3_SLIVERS_EXUDER_H
+
+#include <CGAL/Mesh_3/config.h>
+#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
+#include <CGAL/Bbox_3.h>
+
+#include <CGAL/Double_map.h>
+#include <CGAL/iterator.h>
+#include <map>
+#include <vector>
+#include <set>
+#include <algorithm>
+#include <iomanip> // std::setprecision
+#include <iostream> // std::cerr/cout
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/function_output_iterator.hpp>
+#include <boost/bind.hpp>
+#include <boost/format.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/optional.hpp>
+
+#include <CGAL/Real_timer.h>
+
+#include <CGAL/Mesh_3/sliver_criteria.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/Null_exuder_visitor.h>
+
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+# define CGAL_PROFILE
+# include <CGAL/Profile_counter.h>
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/task.h>
+#endif
+
+
+#ifdef CGAL_MESH_3_VERBOSE
+  #define CGAL_MESH_3_EXUDER_VERBOSE
+#endif
+
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+  namespace details { // various function objects
+
+    // That functor Second_of takes a pair as input (the value type of a
+    // map), and returns the ".second" member of that pair. It is used in
+    // Slivers_exuder, to constructor a transform iterator.
+
+    // It should be doable using STL bind operators, but i am not sure how
+    // to use them. -- Laurent Rineau, 2007/07/27
+    template <typename Map>
+    struct Second_of :
+    public std::unary_function<typename Map::value_type,
+    const typename Map::mapped_type&>
+    {
+      typedef std::unary_function<typename Map::value_type,
+        const typename Map::mapped_type&> Base;
+      typedef typename Base::result_type result_type;
+      typedef typename Base::argument_type argument_type;
+
+      const typename Map::mapped_type&
+      operator()(const typename Map::value_type& p) const
+      {
+        return p.second;
+      }
+    }; // end class Second_of
+
+    // That function is constructed with a vertex handle v1.
+    // Then, its operator() takes an other vertex handle v2 as input, and
+    // returns the distance d(v1, v2).
+    // It is used in Slivers_exuder, to constructor a transform iterator.
+    template <typename Gt, typename Vertex_handle>
+    class Min_distance_from_v :
+    public std::unary_function<Vertex_handle, void>
+    {
+      const Vertex_handle * v;
+      Gt gt;
+      double & dist;
+
+    public:
+      Min_distance_from_v(const Vertex_handle& vh,
+                          double& dist,
+                          Gt geom_traits = Gt())
+        : v(&vh), gt(geom_traits), dist(dist)
+      {
+      }
+
+      void
+      operator()(const Vertex_handle& vh) const
+      {
+        typedef typename Gt::Compute_squared_distance_3
+        Compute_squared_distance_3;
+        Compute_squared_distance_3 distance =
+        gt.compute_squared_distance_3_object();
+
+        const double d = CGAL::to_double(distance((*v)->point(), vh->point()));
+        if(d < dist){
+          dist = d;
+        }
+      }
+    }; // end class Min_distance_from_v
+
+  } // end namespace details
+
+
+
+/************************************************
+// Class Slivers_exuder_base
+// Two versions: sequential / parallel
+************************************************/
+
+// Sequential
+template <typename Tr, typename Concurrency_tag>
+class Slivers_exuder_base
+{
+protected:
+  typedef typename Tr::Vertex_handle                        Vertex_handle;
+  typedef typename Tr::Cell_handle                          Cell_handle;
+  typedef std::vector<Cell_handle>                          Cell_vector;
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename std::vector<Vertex_handle>               Bad_vertices_vector;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+
+  // A priority queue ordered on Tet quality (SliverCriteria)
+  typedef CGAL::Double_map<Cell_handle, double>             Tet_priority_queue;
+  typedef typename Tet_priority_queue::reverse_iterator     Queue_iterator;
+  typedef typename Tet_priority_queue::Reverse_entry        Queue_value_type;
+
+  Slivers_exuder_base(const Bbox_3 &, int) {}
+
+  Lock_data_structure * get_lock_data_structure()   const { return 0; }
+  void unlock_all_elements()                        const {}
+  void create_root_task()                           const {}
+  bool flush_work_buffers()                         const { return true; }
+  void wait_for_all()                               const {}
+  void destroy_root_task()                          const {}
+  template <typename Func>
+  void enqueue_work(Func, double)                   const {}
+
+protected:
+  Cell_handle extract_cell_handle_from_queue_value(const Queue_value_type &qv) const
+  {
+    return qv.second;
+  }
+  double extract_cell_quality_from_queue_value(const Queue_value_type &qv) const
+  {
+    return qv.first;
+  }
+  unsigned int extract_erase_counter_from_queue_value(const Queue_value_type &) const
+  {
+    return 0;
+  }
+
+  // Dummy
+  unsigned int erase_counter(const Cell_handle &) const { return 0;}
+
+  std::size_t cells_queue_size() const { return cells_queue_.size(); }
+  bool cells_queue_empty()       const { return cells_queue_.empty(); }
+  Queue_iterator
+    cells_queue_front()                { return cells_queue_.front(); }
+  void cells_queue_pop_front()         { cells_queue_.pop_front(); }
+  void cells_queue_clear()             { cells_queue_.clear(); }
+  void cells_queue_insert(const Cell_handle &ch, double quality_value)
+  {
+    cells_queue_.insert(ch, quality_value);
+  }
+
+  /**
+   * A functor to remove one \c Cell_handle from a priority queue
+   */
+  class Erase_from_queue
+  {
+  public:
+    Erase_from_queue(Tet_priority_queue& queue)
+    : r_queue_(queue) { }
+
+    void operator()(const Cell_handle& cell)
+    { r_queue_.erase(cell); }
+
+  private:
+    Tet_priority_queue& r_queue_;
+  };
+
+  /**
+   * Delete cells of \c cells from \c cells_queue
+   */
+  void delete_cells_from_queue(const Cell_vector& cells)
+  {
+    std::for_each(cells.begin(), cells.end(),
+                  Erase_from_queue(cells_queue_));
+  }
+
+private:
+
+  Tet_priority_queue cells_queue_;
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel
+template <typename Tr>
+class Slivers_exuder_base<Tr, Parallel_tag>
+{
+protected:
+  typedef typename Tr::Vertex_handle                        Vertex_handle;
+  typedef typename Tr::Cell_handle                          Cell_handle;
+  typedef std::vector<Cell_handle>                          Cell_vector;
+  typedef typename Tr::Geom_traits                          Gt;
+  typedef typename Gt::FT                                   FT;
+  typedef typename tbb::concurrent_vector<Vertex_handle>    Bad_vertices_vector;
+  typedef typename Tr::Lock_data_structure                  Lock_data_structure;
+
+  // A priority queue ordered on Tet quality (SliverCriteria)
+  typedef std::multimap<
+    double, std::pair<Cell_handle, unsigned int> >          Tet_priority_queue;
+  typedef typename Tet_priority_queue::iterator             Queue_iterator;
+  typedef typename Tet_priority_queue::value_type           Queue_value_type;
+
+  Slivers_exuder_base(const Bbox_3 &bbox, int num_grid_cells_per_axis)
+    : m_lock_ds(bbox, num_grid_cells_per_axis)
+    , m_worksharing_ds(bbox)
+  {
+  }
+
+  Lock_data_structure *get_lock_data_structure() const
+  {
+    return &m_lock_ds;
+  }
+
+  void unlock_all_elements() const
+  {
+    m_lock_ds.unlock_all_points_locked_by_this_thread();
+  }
+
+  void create_root_task() const
+  {
+    m_empty_root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
+    m_empty_root_task->set_ref_count(1);
+  }
+
+  bool flush_work_buffers() const
+  {
+    m_empty_root_task->set_ref_count(1);
+    bool keep_flushing = m_worksharing_ds.flush_work_buffers(*m_empty_root_task);
+    wait_for_all();
+    return keep_flushing;
+  }
+
+  void wait_for_all() const
+  {
+    m_empty_root_task->wait_for_all();
+  }
+
+  void destroy_root_task() const
+  {
+    tbb::task::destroy(*m_empty_root_task);
+    m_empty_root_task = 0;
+  }
+
+  template <typename Func>
+  void enqueue_work(Func f, double value) const
+  {
+    CGAL_assertion(m_empty_root_task != 0);
+    m_worksharing_ds.enqueue_work(f, value, *m_empty_root_task);
+  }
+
+public:
+
+protected:
+  Cell_handle extract_cell_handle_from_queue_value(const Queue_value_type &qv) const
+  {
+    return qv.second.first;
+  }
+  double extract_cell_quality_from_queue_value(const Queue_value_type &qv) const
+  {
+    return qv.first;
+  }
+  unsigned int extract_erase_counter_from_queue_value(const Queue_value_type &qv) const
+  {
+    return qv.second.second;
+  }
+
+  unsigned int erase_counter(const Cell_handle &ch) const
+  {
+    return ch->erase_counter();
+  }
+
+  std::size_t cells_queue_size() const { return cells_queue_.size(); }
+  bool cells_queue_empty()       const { return cells_queue_.empty(); }
+  Queue_iterator
+    cells_queue_front()                { return cells_queue_.begin(); }
+  void cells_queue_pop_front()         { cells_queue_.erase(cells_queue_front()); }
+  void cells_queue_clear()             { cells_queue_.clear(); }
+  void cells_queue_insert(const Cell_handle &ch, double quality_value)
+  {
+    cells_queue_.insert(std::make_pair(
+      quality_value,
+      std::make_pair(ch, ch->erase_counter())));
+  }
+
+  /**
+   * A functor to remove one \c Cell_handle from a priority queue
+   */
+  class Erase_from_queue
+  {
+  public:
+    Erase_from_queue(Tet_priority_queue&) {}
+
+    void operator()(const Cell_handle& cell)
+    { cell->increment_erase_counter(); }
+  };
+
+  /**
+   * Delete cells of \c cells from \c cells_queue
+   */
+  void delete_cells_from_queue(const Cell_vector& cells)
+  {
+    std::for_each(cells.begin(), cells.end(),
+                  Erase_from_queue(cells_queue_));
+  }
+
+  mutable Lock_data_structure                 m_lock_ds;
+  mutable Mesh_3::Auto_worksharing_ds         m_worksharing_ds;
+  mutable tbb::task                          *m_empty_root_task;
+
+private:
+
+  Tet_priority_queue cells_queue_;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+
+/************************************************
+// Class Slivers_exuder
+************************************************/
+
+template <
+  typename C3T3,
+  typename SliverCriteria,
+  typename Visitor_ = Null_exuder_visitor<C3T3>,
+  typename FT = typename C3T3::Triangulation::Geom_traits::FT
+  >
+class Slivers_exuder
+: public Slivers_exuder_base<typename C3T3::Triangulation,
+                             typename C3T3::Concurrency_tag>
+{
+
+public: // Types
+
+  typedef typename C3T3::Concurrency_tag Concurrency_tag;
+  typedef Slivers_exuder_base<
+    typename C3T3::Triangulation, Concurrency_tag> Base;
+
+private: // Types
+
+  typedef Slivers_exuder<C3T3, SliverCriteria, Visitor_, FT> Self;
+
+  typedef typename C3T3::Triangulation Tr;
+  typedef typename Tr::Weighted_point Weighted_point;
+  typedef typename Tr::Bare_point Bare_point;
+  typedef typename Tr::Cell_handle Cell_handle;
+  typedef typename Tr::Facet Facet;
+  typedef typename Tr::Vertex_handle Vertex_handle;
+  typedef typename Weighted_point::Weight Weight;
+  typedef typename Base::Queue_value_type Queue_value_type;
+  typedef typename Base::Cell_vector Cell_vector;
+
+  typedef typename Tr::Geom_traits Geom_traits;
+  typedef typename Geom_traits::Tetrahedron_3 Tetrahedron_3;
+
+  typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
+  typedef std::vector<Facet> Facet_vector;
+
+  typedef typename C3T3::Surface_patch_index Surface_patch_index;
+  typedef typename C3T3::Subdomain_index Subdomain_index;
+  typedef typename C3T3::Index Index;
+
+  // Umbrella will store the surface_index of internal facets of a new
+  // weighted point conflict zone. Such facets are represented by their edge
+  // which do not contain the pumped vertex
+  typedef std::pair<Vertex_handle,Vertex_handle> Ordered_edge;
+  typedef std::pair<Surface_patch_index, std::size_t> Patch_and_counter;
+  typedef std::map<Ordered_edge, Patch_and_counter> Umbrella;
+
+  // Boundary_facets_from_outside represents the facet of the conflict zone
+  // seen from outside of it. It stores Surface_patch_index of the facet, and
+  // Subdomain_index of the cell which is inside the conflict zone.
+  typedef std::map<Facet, std::pair<Surface_patch_index,Subdomain_index> >
+    Boundary_facets_from_outside;
+
+  /** Pre_star will represent the pre-star of a point. It is a (double)-map
+   *  of Facet (viewed from cells inside the star), ordered by the
+   *  critial_radius of the point with the cell that lies on the facet, at
+   *  the exterior of the pre-star. */
+  typedef CGAL::Double_map<Facet, double> Pre_star;
+
+  // Stores the value of facet for the sliver criterion functor
+  typedef std::map<Facet, double> Sliver_values;
+
+  // Visitor class
+  // Should define
+  //  - after_cell_pumped(std::size_t cells_left_number)
+  typedef Visitor_ Visitor;
+  
+  using Base::get_lock_data_structure;
+
+public: // methods
+
+  /**
+   * @brief Constructor
+   * @param c3t3 The mesh to exude
+   * @param criteria The criterion which will be used to evaluate tet quality
+   * @param d defines the maximal weight we will try:
+   * max_weight(v) < d*dist(v,nearest_vertice(v))
+   */
+  Slivers_exuder(C3T3& c3t3,
+                 const SliverCriteria& criterion,
+                 double d = 0.45);
+
+  /**
+   * @brief pumps vertices
+   * @param criterion_value_limit All vertices of tetrahedra that have a
+   * quality below this bound will be pumped
+   */
+  Mesh_optimization_return_code
+  operator()(Visitor visitor = Visitor())
+  {
+#ifdef CGAL_MESH_3_PROFILING
+  WallClockTimer t;
+#endif
+
+    Mesh_optimization_return_code ret =
+      pump_vertices<true>(sliver_criteria_.sliver_bound(), visitor);
+
+#ifdef CGAL_MESH_3_PROFILING
+    double exudation_time = t.elapsed();
+    std::cerr << std::endl << "==== Total exudation 'wall-clock' time: "
+              << exudation_time << "s ====" << std::endl;
+#endif
+
+#ifdef CGAL_MESH_3_EXPORT_PERFORMANCE_DATA
+    if (ret == BOUND_REACHED)
+    {
+      CGAL_MESH_3_SET_PERFORMANCE_DATA("Exuder_optim_time", exudation_time);
+    }
+    else
+    {
+      CGAL_MESH_3_SET_PERFORMANCE_DATA("Exuder_optim_time",
+        (ret == CANT_IMPROVE_ANYMORE ?
+        "CANT_IMPROVE_ANYMORE" : "TIME_LIMIT_REACHED"));
+    }
+#endif
+
+    return ret;
+  }
+
+  /// Time accessors
+  void set_time_limit(double time) { time_limit_ = time; }
+  double time_limit() const { return time_limit_; }
+
+private:
+  // -----------------------------------
+  // Private Methods
+  // -----------------------------------
+  /**
+   * Pumps vertices
+   */
+  template <bool pump_vertices_on_surfaces>
+  Mesh_optimization_return_code
+  pump_vertices(double criterion_value_limit, Visitor& v);
+
+  /**
+   * Pump one vertex
+   */
+  template <bool pump_vertices_on_surfaces>
+  bool pump_vertex(const Vertex_handle& v,
+                   bool *could_lock_zone = NULL);
+
+  /**
+   * Returns the best_weight of v
+   */
+  double get_best_weight(const Vertex_handle& v,
+                         bool *could_lock_zone = NULL) const;
+
+  /**
+   * Initializes pre_star and criterion_values
+   */
+  void
+  initialize_prestar_and_criterion_values(const Vertex_handle& v,
+                                          Pre_star& pre_star,
+                                          Sliver_values& criterion_values,
+                                          bool *could_lock_zone = NULL) const;
+
+  /**
+   * Expand pre_star with cell_to_add
+   */
+  bool expand_prestar(const Cell_handle& cell_to_add,
+                      const Vertex_handle& pumped_vertex,
+                      Pre_star& pre_star,
+                      Sliver_values& criterion_values) const;
+
+  /**
+   * Returns Ordered_edge of facet which do not contains vertex
+   */
+  Ordered_edge get_opposite_ordered_edge(const Facet& facet,
+                                         const Vertex_handle& vertex) const;
+
+  /**
+   * Returns the umbrella of internal_facets vector
+   */
+  boost::optional<Umbrella>
+  get_umbrella(const Facet_vector& internal_facets,
+               const Vertex_handle& v) const;
+
+  /**
+   * Updates the mesh with new_point
+   */
+  template <bool pump_vertices_on_surfaces>
+  bool update_mesh(const Weighted_point& new_point,
+                   const Vertex_handle& old_vertex,
+                   bool *could_lock_zone = NULL);
+
+  /**
+   * Restores cells and boundary facets of conflict zone of new_vertex in c3t3_
+   */
+  template <bool pump_vertices_on_surfaces>
+  void restore_cells_and_boundary_facets(
+    const Boundary_facets_from_outside& boundary_facets_from_outside,
+    const Vertex_handle& new_vertex);
+
+  /**
+   * Restore internal facets of conflict zone of new_vertex in c3t3_
+   */
+  void restore_internal_facets(const Umbrella& umbrella,
+                               const Vertex_handle& new_vertex);
+
+  /**
+   * Orders handles \c h1 & \c h2
+   */
+  template <typename Handle>
+  static
+  void order_two_handles(Handle& h1, Handle& h2)
+  {
+    if( h2 < h1 )
+      std::swap(h1, h2);
+  }
+
+  template <typename Handle>
+  static
+  void order_three_handles(Handle& h1, Handle& h2, Handle& h3)
+  {
+    if(h1 > h2) std::swap(h1, h2);
+    if(h2 > h3) std::swap(h2, h3);
+    if(h1 > h2) std::swap(h1, h2);
+  }
+
+  /**
+   * Initialization
+   */
+  void init(double limit_value)
+  {
+    if ( 0 < limit_value )
+      sliver_criteria_.set_sliver_bound(limit_value);
+    else
+      sliver_criteria_.set_sliver_bound(SliverCriteria::max_value);
+
+    this->cells_queue_clear();
+    initialize_cells_priority_queue();
+    initialized_ = true;
+  }
+
+  /**
+   * Initialize cells_queue w.r.t sliver_bound_
+   */
+  void initialize_cells_priority_queue()
+  {
+    for( Cell_iterator cit = c3t3_.cells_in_complex_begin() ;
+        cit != c3t3_.cells_in_complex_end() ;
+        ++cit)
+    {
+      const double value
+        = sliver_criteria_(cit);
+
+      if( value < sliver_criteria_.sliver_bound() )
+        this->cells_queue_insert(cit, value);
+    }
+  }
+
+  /**
+   * Returns critical radius of (v,c)
+   */
+  double compute_critical_radius(const Vertex_handle& v,
+                                 const Cell_handle& c) const
+  {
+    typedef typename Geom_traits::Compute_critical_squared_radius_3
+      Critical_radius;
+
+    Critical_radius critical_radius =
+      tr_.geom_traits().compute_critical_squared_radius_3_object();
+
+    return CGAL::to_double(critical_radius(c->vertex(0)->point(),
+                                           c->vertex(1)->point(),
+                                           c->vertex(2)->point(),
+                                           c->vertex(3)->point(),
+                                           v->point()));
+  }
+
+  /**
+   * Returns the squared distance from vh to its closest vertice
+   */
+  double get_closest_vertice_squared_distance(const Vertex_handle& vh) const
+  {
+
+    double dist = (std::numeric_limits<double>::max)();
+    details::Min_distance_from_v<Geom_traits, Vertex_handle>
+      min_distance_from_v(vh, dist);
+
+    tr_.adjacent_vertices(vh, boost::make_function_output_iterator(min_distance_from_v));
+
+    return dist;
+  }
+
+  /**
+   * Returns the min value of second element of Ratio
+   */
+  double get_min_value(const Sliver_values& criterion_values) const
+  {
+    using boost::make_transform_iterator;
+    typedef details::Second_of<Sliver_values> Second_of;
+
+    return *(std::min_element(
+      make_transform_iterator(criterion_values.begin(), Second_of()),
+      make_transform_iterator(criterion_values.end(), Second_of())));
+  }
+
+  /**
+   * Returns the \c Boundary_facets_from_outside object containing mirror facets
+   * of \c facets
+   */
+  Boundary_facets_from_outside
+  get_boundary_facets_from_outside(const Facet_vector& facets) const
+  {
+    Boundary_facets_from_outside boundary_facets_from_outside;
+
+    for(typename Facet_vector::const_iterator fit = facets.begin();
+        fit != facets.end();
+        ++fit)
+    {
+      boundary_facets_from_outside.insert(std::make_pair(
+        tr_.mirror_facet(*fit),
+        std::make_pair(c3t3_.surface_patch_index(*fit),
+                       c3t3_.subdomain_index(fit->first))));
+    }
+
+    return boundary_facets_from_outside;
+  }
+
+  /**
+   * Add a cell \c ch to \c cells_queue
+   */
+  template <bool pump_vertices_on_surfaces>
+  void add_cell_to_queue(Cell_handle ch, double criterion_value)
+  {
+#ifdef CGAL_LINKED_WITH_TBB
+    // Parallel
+    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+      enqueue_task<pump_vertices_on_surfaces>(
+        ch, this->erase_counter(ch), criterion_value);
+    // Sequential
+    else
+#endif
+      this->cells_queue_insert(ch, criterion_value);
+
+  }
+
+  /**
+   * A functor to remove one handle (Cell_handle/Facet_handle) from complex
+   */
+  class Remove_from_complex
+  {
+  public:
+    Remove_from_complex(C3T3& c3t3)
+    : c3t3_(c3t3) { }
+
+    template <typename Handle_>
+    void operator()(const Handle_& handle)
+    { c3t3_.remove_from_complex(handle); }
+
+  private:
+    C3T3& c3t3_;
+  };
+
+  /**
+   * Removes objects of [begin,end[ range from \c c3t3_
+   */
+  template<typename ForwardIterator>
+  void remove_from_c3t3(ForwardIterator begin, ForwardIterator end)
+  {
+    std::for_each(begin, end, Remove_from_complex(c3t3_));
+  }
+
+  /**
+   * Returns true if time_limit is reached
+   */
+  bool is_time_limit_reached() const
+  {
+    return ( (time_limit() > 0) && (running_time_.time() > time_limit()) );
+  }
+
+  /**
+   * Returns true if all cells of mesh have a sliver_criteria_ value greater
+   * than sliver_bound_
+   */
+  bool check_sliver_bound() const
+  {
+    for( Cell_iterator cit = c3t3_.cells_in_complex_begin() ;
+        cit != c3t3_.cells_in_complex_end() ;
+        ++cit)
+    {
+      const double value =
+        sliver_criteria_(cit);
+
+      if( value < sliver_criteria_.sliver_bound() )
+        return false;
+    }
+
+    return true;
+  }
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // For parallel version
+  template <bool pump_vertices_on_surfaces>
+  void
+  enqueue_task(Cell_handle ch, unsigned int erase_counter, double value);
+#endif
+
+private:
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+
+  // Functor for enqueue_task function
+  template <typename SE, bool pump_vertices_on_surfaces>
+  class Pump_vertex
+  {
+    SE                    & m_sliver_exuder;
+    const C3T3            & m_c3t3;
+    Cell_handle             m_cell_handle;
+    unsigned int            m_erase_counter;
+
+
+  public:
+    // Constructor
+    Pump_vertex(SE &sliver_exuder,
+                const C3T3 &c3t3,
+                Cell_handle cell_handle,
+                unsigned int erase_counter)
+    : m_sliver_exuder(sliver_exuder),
+      m_c3t3(c3t3),
+      m_cell_handle(cell_handle),
+      m_erase_counter(erase_counter)
+    {
+    }
+
+    // Constructor
+    Pump_vertex(const Pump_vertex &pvx)
+    : m_sliver_exuder(pvx.m_sliver_exuder),
+      m_c3t3(pvx.m_c3t3),
+      m_cell_handle(pvx.m_cell_handle),
+      m_erase_counter(pvx.m_erase_counter)
+    {}
+
+    // operator()
+    void operator()() const
+    {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Exuder]");
+#endif
+
+      for( int i = 0; i < 4; ++i )
+      {
+        bool could_lock_zone;
+        do
+        {
+          could_lock_zone = true;
+
+          if (m_sliver_exuder.erase_counter(m_cell_handle) != m_erase_counter)
+            break;
+
+          if (!m_c3t3.triangulation().try_lock_cell(m_cell_handle))
+          {
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+            bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+            could_lock_zone = false;
+            m_sliver_exuder.unlock_all_elements();
+            continue;
+          }
+
+          if (m_sliver_exuder.erase_counter(m_cell_handle) != m_erase_counter)
+          {
+            m_sliver_exuder.unlock_all_elements();
+            break;
+          }
+
+          // pump_vertices_on_surfaces is a boolean template parameter.  The
+          // following condition is pruned at compiled time, if
+          // pump_vertices_on_surfaces==false.
+          if (pump_vertices_on_surfaces
+           || m_c3t3.in_dimension(m_cell_handle->vertex(i)) > 2)
+          {
+            m_sliver_exuder.template pump_vertex<pump_vertices_on_surfaces>(
+              m_cell_handle->vertex(i), &could_lock_zone);
+
+#ifdef CGAL_CONCURRENT_MESH_3_PROFILING
+            if (!could_lock_zone)
+              bcounter.increment_branch_1(); // THIS is a late withdrawal!
+            else
+              ++bcounter; // Success!
+#endif
+          }
+
+          m_sliver_exuder.unlock_all_elements();
+        } while (!could_lock_zone);
+      }
+
+      if ( m_sliver_exuder.is_time_limit_reached() )
+        tbb::task::self().cancel_group_execution();
+    }
+  };
+#endif
+
+  // -----------------------------------
+  // Private data
+  // -----------------------------------
+  C3T3& c3t3_;
+  Tr& tr_;
+  double sq_delta_;
+
+  int num_of_pumped_vertices_;
+  int num_of_ignored_vertices_;
+  int num_of_treated_vertices_;
+
+  bool initialized_;
+  SliverCriteria sliver_criteria_;
+
+  // Timer
+  double time_limit_;
+  CGAL::Real_timer running_time_;
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+  // -----------------------------------
+  // Debug Helpers
+  // -----------------------------------
+private:
+  /**
+   * Verifies that two doubles are near equal
+   */
+  static bool near_equal(const double& d1, const double& d2)
+  {
+    const double epsilon = 1e-8;
+    return ( ((d1-d2) >= -1*epsilon) && ((d1-d2) <= epsilon) );
+  }
+
+  /**
+   * Prints a double
+   */
+  static void print_double(const double& d)
+  {
+    std::cerr << d << " ; ";
+  }
+
+  /** This function verifies that the pre_star contains exactly the set of
+   facets given by the sequence [begin, end[.
+
+   If v!=0, it also fills another Pre_star object, from the sequence [begin,
+   end[, and checks that is in the same order as pre_star.
+   */
+  template <class Input_facet_it>
+  bool check_pre_star(const Pre_star& pre_star,
+                      Input_facet_it begin,
+                      Input_facet_it end,
+                      const Vertex_handle v = Vertex_handle()) const;
+
+  /** This function verifies that the pre_star contains exactly the set of
+   facets on the boundary of the conflict zone of the weighted point wp.
+   The vertex handle vh is an hint for the location of wp.
+
+   It also fills another Pre_star object, and checks that is in the same
+   order as pre_star.
+   */
+  bool check_pre_star(const Pre_star& pre_star,
+                      const Weighted_point& wp,
+                      const Vertex_handle& vh) const;
+
+  /**
+   * Checks if the sliver criterion values from \c criterion_values are the same as
+   * those that will be found if wp is inserted in the triangulation
+   */
+  bool check_ratios(const Sliver_values& criterion_values,
+                    const Weighted_point& wp,
+                    const Vertex_handle& vh) const;
+
+#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+
+}; // end class Slivers_exuder
+
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+Slivers_exuder<C3T3,SC,V_,FT>::
+Slivers_exuder(C3T3& c3t3, const SC& criteria, double d)
+  : Base(c3t3.bbox(),
+         Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
+  , c3t3_(c3t3)
+  , tr_(c3t3_.triangulation())
+  , sq_delta_(d*d)
+  , num_of_pumped_vertices_(0)
+  , num_of_ignored_vertices_(0)
+  , num_of_treated_vertices_(0)
+  , initialized_(false)
+  , sliver_criteria_(criteria)
+  , time_limit_(-1)
+  , running_time_()
+{
+  // If we're multi-thread
+  tr_.set_lock_data_structure(get_lock_data_structure());
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <bool pump_vertices_on_surfaces>
+Mesh_optimization_return_code
+Slivers_exuder<C3T3,SC,V_,FT>::
+pump_vertices(double sliver_criterion_limit,
+              Visitor& visitor)
+{
+#ifdef CGAL_MESH_3_PROFILING
+  WallClockTimer t;
+#endif
+
+  init(sliver_criterion_limit);
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << std::endl << "==== Init time: "
+            << t.elapsed() << "s ====" << std::endl;
+#endif
+
+#ifdef CGAL_MESH_3_EXUDER_VERBOSE
+  std::cerr << "Exuding...\n";
+  std::cerr << "Legend of the following line: "
+            << "(#cells left,#vertices pumped,#vertices ignored)" << std::endl;
+
+  std::cerr << "(" << this->cells_queue_size() << ",0,0)";
+#endif // CGAL_MESH_3_EXUDER_VERBOSE
+
+  running_time_.reset();
+  running_time_.start();
+
+#ifdef CGAL_MESH_3_PROFILING
+  t.reset();
+#endif
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+  // Parallel
+  if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+  {
+    this->create_root_task();
+
+    while (!this->cells_queue_empty())
+    {
+      Queue_value_type front = *(this->cells_queue_front());
+      this->cells_queue_pop_front();
+      Cell_handle c = this->extract_cell_handle_from_queue_value(front);
+      double q = this->extract_cell_quality_from_queue_value(front);
+      unsigned int ec = this->extract_erase_counter_from_queue_value(front);
+      // Low quality first (i.e. low value of q)
+      enqueue_task<pump_vertices_on_surfaces>(c, ec, q);
+    }
+
+    this->wait_for_all();
+
+# if defined(CGAL_MESH_3_EXUDER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+    std::cerr << " Flushing";
+# endif
+    bool keep_flushing = true;
+    while (keep_flushing)
+    {
+      keep_flushing = this->flush_work_buffers();
+# if defined(CGAL_MESH_3_EXUDER_VERBOSE) || defined(CGAL_MESH_3_PROFILING)
+      std::cerr << ".";
+# endif
+    }
+
+    this->destroy_root_task();
+  }
+  // Sequential
+  else
+#endif // CGAL_LINKED_WITH_TBB
+  {
+    while( !this->cells_queue_empty() && !is_time_limit_reached() )
+    {
+      Queue_value_type front = *(this->cells_queue_front());
+      Cell_handle c = this->extract_cell_handle_from_queue_value(front);
+
+      // Low quality first (i.e. low value of cell quality)
+      bool vertex_pumped = false;
+      for( int i = 0; i < 4; ++i )
+      {
+        // pump_vertices_on_surfaces is a boolean template parameter.  The
+        // following condition is pruned at compiled time, if
+        // pump_vertices_on_surfaces==false.
+        if( pump_vertices_on_surfaces || c3t3_.in_dimension(c->vertex(i)) > 2 )
+        {
+          if( pump_vertex<pump_vertices_on_surfaces>(c->vertex(i)) )
+          {
+            vertex_pumped = true;
+            ++num_of_pumped_vertices_;
+            break;
+          }
+          else
+            ++num_of_ignored_vertices_;
+
+          ++num_of_treated_vertices_;
+        }
+      }
+
+      // if the tet could not be deleted
+      if ( ! vertex_pumped )
+        this->cells_queue_pop_front();
+
+      visitor.after_cell_pumped(this->cells_queue_size());
+  #ifdef CGAL_MESH_3_EXUDER_VERBOSE
+      std::cerr << boost::format("\r             \r"
+                                 "(%1%,%2%,%3%) (%|4$.1f| vertices/s)")
+        % this->cells_queue_size()
+        % num_of_pumped_vertices_
+        % num_of_ignored_vertices_
+        % (num_of_treated_vertices_ / running_time_.time());
+  #endif // CGAL_MESH_3_EXUDER_VERBOSE
+    }
+  }
+
+  running_time_.stop();
+
+#ifdef CGAL_MESH_3_PROFILING
+  std::cerr << std::endl << "==== Iterations time: "
+            << t.elapsed() << "s ====" << std::endl;
+#endif
+
+
+#ifdef CGAL_MESH_3_EXUDER_VERBOSE
+  std::cerr << std::endl;
+  std::cerr << "Total exuding time: " << running_time_.time() << "s";
+  std::cerr << std::endl;
+#endif // CGAL_MESH_3_EXUDER_VERBOSE
+
+  if ( is_time_limit_reached() ) {
+#ifdef CGAL_MESH_3_EXUDER_VERBOSE
+    std::cerr << "Exuding return code: TIME_LIMIT_REACHED\n\n";
+#endif // CGAL_MESH_3_EXUDER_VERBOSE
+    return TIME_LIMIT_REACHED;
+  }
+
+  if ( check_sliver_bound() ) {
+#ifdef CGAL_MESH_3_EXUDER_VERBOSE
+    std::cerr << "Exuding return code: BOUND_REACHED\n\n";
+#endif // CGAL_MESH_3_EXUDER_VERBOSE
+    return BOUND_REACHED;
+  }
+
+#ifdef CGAL_MESH_3_EXUDER_VERBOSE
+    std::cerr << "Exuding return code: CANT_IMPROVE_ANYMORE\n\n";
+#endif // CGAL_MESH_3_EXUDER_VERBOSE
+  return CANT_IMPROVE_ANYMORE;
+
+} // end function pump_vertices
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <bool pump_vertices_on_surfaces>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+pump_vertex(const Vertex_handle& pumped_vertex,
+            bool *could_lock_zone)
+{
+  // Get best_weight
+  double best_weight = get_best_weight(pumped_vertex, could_lock_zone);
+  if (could_lock_zone && *could_lock_zone == false)
+    return false;
+
+  // If best_weight < pumped_vertex weight, nothing to do
+  if ( best_weight > pumped_vertex->point().weight() )
+  {
+    Weighted_point wp(pumped_vertex->point(), best_weight);
+
+    // Insert weighted point into mesh
+    // note it can fail if the mesh is non-manifold at pumped_vertex
+    return update_mesh<pump_vertices_on_surfaces>(wp,
+                                                  pumped_vertex,
+                                                  could_lock_zone);
+  }
+
+  return false;
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+void
+Slivers_exuder<C3T3,SC,V_,FT>::
+initialize_prestar_and_criterion_values(const Vertex_handle& v,
+                                        Pre_star& pre_star,
+                                        Sliver_values& criterion_values,
+                                        bool *could_lock_zone) const
+{
+  std::vector<Cell_handle> incident_cells;
+  incident_cells.reserve(64);
+  // Parallel
+  if (could_lock_zone)
+  {
+    if (!tr_.try_lock_and_get_incident_cells(v, incident_cells))
+    {
+      this->unlock_all_elements();
+      *could_lock_zone = false;
+      return;
+    }
+  }
+  // Sequential
+  else
+  {
+    tr_.incident_cells(v, std::back_inserter(incident_cells));
+  }
+
+  for ( typename Cell_vector::const_iterator cit = incident_cells.begin() ;
+       cit != incident_cells.end() ;
+       ++cit )
+  {
+    const int index = (*cit)->index(v);
+    const Facet f = Facet(*cit, index);
+    const Facet opposite_facet = tr_.mirror_facet(f);
+
+    // Sliver criterion values initialization
+    if( c3t3_.is_in_complex(*cit) )
+    {
+      criterion_values[f] = sliver_criteria_(*cit);
+    }
+
+
+    // Pre_star initialization
+    // If facet is adjacent to and infinite cell, no need to put it in prestar
+    // (infinite critical radius)
+    if ( tr_.is_infinite(opposite_facet.first) )
+      continue;
+
+    // Insert facet in prestar (even if it is not in complex)
+    double critical_radius = compute_critical_radius(v, opposite_facet.first);
+    pre_star.insert(f, critical_radius);
+  }
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+expand_prestar(const Cell_handle& cell_to_add,
+               const Vertex_handle& pumped_vertex,
+               Pre_star& pre_star,
+               Sliver_values& criterion_values) const
+{
+  // Delete first facet of pre_star
+  Facet start_facet = pre_star.front()->second;
+  CGAL_assertion(tr_.mirror_facet(start_facet).first == cell_to_add);
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+  double critical_radius = pre_star.front()->first;
+#endif
+  pre_star.pop_front();
+  if ( c3t3_.is_in_complex(cell_to_add) )
+  {
+    criterion_values.erase(start_facet);
+  }
+
+  int start_mirror_facet_index = tr_.mirror_facet(start_facet).second;
+
+  // For each facet of cell_to_add
+  for(int i = 0; i<4 ; ++i)
+  {
+    // We have already treated start_facet
+    if ( i == start_mirror_facet_index )
+      continue;
+
+    const Facet current_facet(cell_to_add, i);
+    const Facet current_mirror_facet(tr_.mirror_facet(current_facet));
+
+    // If current_facet_mirror is in prestar, delete it
+    // (it may happen than pre_star contains two facets of the same cell)
+    if ( pre_star.erase(current_mirror_facet) )
+    {
+      // If it is a boundary facet, stop pre_star expansion
+      if ( c3t3_.is_in_complex(current_mirror_facet) )
+      {
+        return false;
+      }
+
+      // Update criterion_values
+      if ( c3t3_.is_in_complex(cell_to_add) )
+      {
+        criterion_values.erase(current_mirror_facet);
+      }
+    }
+    // If current_mirror_facet is not in prestar:
+    // expand prestar & update criterion_values
+    else
+    {
+      const Cell_handle& current_mirror_cell = current_mirror_facet.first;
+
+      CGAL_assertion(current_mirror_cell != start_facet.first);
+      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(0));
+      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(1));
+      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(2));
+      CGAL_assertion(pumped_vertex != current_mirror_facet.first->vertex(3));
+
+      // Update pre_star (we do not insert facets with infinite critical radius)
+      // We do insert facet of cells which are outside the complex (we just
+      // don't use their sliver criterion value to get best weight)
+      if ( ! tr_.is_infinite(current_mirror_cell) )
+      {
+        double new_critical_radius =
+          compute_critical_radius(pumped_vertex, current_mirror_cell);
+
+        pre_star.insert(current_facet, new_critical_radius);
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+        if ( new_critical_radius < critical_radius )
+          std::cerr << "new critical radius:" << new_critical_radius
+                    << " / current critical radius:" << critical_radius
+                    << std::endl;
+#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+      }
+
+      // Update ratio (ratio is needed for cells of complex only)
+      if ( c3t3_.is_in_complex(cell_to_add) )
+      {
+        Tetrahedron_3 tet(pumped_vertex->point(),
+                          cell_to_add->vertex((i+1)&3)->point(),
+                          cell_to_add->vertex((i+2)&3)->point(),
+                          cell_to_add->vertex((i+3)&3)->point());
+
+        double new_value = sliver_criteria_(tet);
+        criterion_values.insert(std::make_pair(current_facet,new_value));
+      }
+    }
+  }
+
+  return true;
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+double
+Slivers_exuder<C3T3,SC,V_,FT>::
+get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const
+{
+  // Get pre_star and criterion_values
+  Pre_star pre_star;
+  Sliver_values criterion_values;
+  initialize_prestar_and_criterion_values(
+    v, pre_star, criterion_values, could_lock_zone);
+
+  if (could_lock_zone && *could_lock_zone == false)
+    return 0.;
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+  Pre_star pre_star_copy;
+  Sliver_values ratios_copy;
+#endif
+
+  double worst_criterion_value = get_min_value(criterion_values);
+  double best_weight = 0;
+  // TODO: it seems that this computes the incident cells again
+  double sq_d_v = get_closest_vertice_squared_distance(v);
+
+  // If that boolean is set to false, it means that a facet in the complex
+  // is about to be flipped. In that case, the pumping is stopped.
+  bool can_flip = true;
+
+  // Main loop: find the weight which maximizes the minimum value of ratio
+  while(   can_flip
+        && ! pre_star.empty()
+        && pre_star.front()->first < (sq_delta_ * sq_d_v)
+        && ! c3t3_.is_in_complex(pre_star.front()->second) )
+  {
+    // Store critial radius (pre_star will be modified in expand_prestar)
+    double critical_r = pre_star.front()->first;
+
+    // expand prestar (insert opposite_cell facets in pre_star)
+    Facet link = pre_star.front()->second;
+    const Cell_handle& opposite_cell = tr_.mirror_facet(link).first;
+
+    if (could_lock_zone && !tr_.try_lock_cell(opposite_cell))
+    {
+      *could_lock_zone = false;
+      return 0.;
+    }
+    can_flip = expand_prestar(opposite_cell, v, pre_star, criterion_values);
+
+    // Update best_weight if needed
+    if(can_flip)
+    {
+      double min_of_pre_star = get_min_value(criterion_values);
+
+      if( min_of_pre_star > worst_criterion_value )
+      {
+        // Update worst_criterion_value
+        worst_criterion_value = min_of_pre_star;
+
+        // Update best_weight
+        CGAL_assertion(!pre_star.empty());
+        double next_r = pre_star.front()->first;
+        best_weight = (critical_r + next_r) / 2;
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+        pre_star_copy = pre_star;
+        ratios_copy = criterion_values;
+#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+      }
+    }
+  } // end while(... can pump...)
+
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+  if ( best_weight > v->point().weight() )
+  {
+    Weighted_point wp(v->point(), best_weight);
+    check_pre_star(pre_star_copy, wp, v);
+    check_ratios(ratios_copy, wp, v);
+  }
+#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+
+  return best_weight;
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+boost::optional<typename Slivers_exuder<C3T3,SC,V_,FT>::Umbrella >
+Slivers_exuder<C3T3,SC,V_,FT>::
+get_umbrella(const Facet_vector& facets,//internal_facets of conflict zone
+
+             const Vertex_handle& /* v no longer used */) const
+{
+  Umbrella umbrella; //std::map<Ordered_edge, Patch_and_counter>
+
+  // Insert into umbrella surface_index of facets which are on the surface
+  typename Facet_vector::const_iterator fit = facets.begin();
+  for ( ; fit != facets.end() ; ++fit )
+  {
+    if ( c3t3_.is_in_complex(*fit) )
+    {
+      Facet f = *fit;
+      Vertex_handle v1 = f.first->vertex((f.second+1)%4);
+      Vertex_handle v2 = f.first->vertex((f.second+2)%4);
+      Vertex_handle v3 = f.first->vertex((f.second+3)%4);
+      order_three_handles(v1, v2, v3);
+      std::vector<Ordered_edge> edges;
+      edges.push_back(Ordered_edge(v1, v2));
+      edges.push_back(Ordered_edge(v2, v3));
+      edges.push_back(Ordered_edge(v1, v3));
+
+      for(std::size_t i = 0; i < 3; ++i)
+      {
+        Ordered_edge oe = edges[i];
+        typename Umbrella::iterator uit = umbrella.find(oe);
+        if(uit == umbrella.end()) //umbrella does not contain oe yet
+        {
+          umbrella.insert(std::make_pair(oe,
+            std::make_pair(c3t3_.surface_patch_index(f), 1)));
+        }
+        else //umbrella already contains oe. Increment counter or return
+        {
+          std::size_t count = (*uit).second.second;
+          if(count == 2) //there will be more than 3 after insertion
+            return boost::none; //non-manifold configuration
+
+          umbrella.insert(uit,
+            std::make_pair(oe,
+              std::make_pair(c3t3_.surface_patch_index(f), count + 1)));
+        }
+      }
+    }
+  }
+
+  // erase edges that have been counted twice
+  //each Oriented_edge should appear only once
+  // twice means it belongs to two internal facets that are restricted
+  // three or more corresponds to a non-manifold geometry
+  typename Umbrella::iterator uit = umbrella.begin();
+  while(uit != umbrella.end())
+  {
+    if((*uit).second.second == 2)
+    {
+      typename Umbrella::iterator to_be_erased = uit++;
+      umbrella.erase(to_be_erased);
+    }
+    else
+      ++uit;
+  }
+
+  return umbrella;
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <bool pump_vertices_on_surfaces>
+void
+Slivers_exuder<C3T3,SC,V_,FT>::
+restore_cells_and_boundary_facets(
+  const Boundary_facets_from_outside& boundary_facets_from_outside,
+  const Vertex_handle& new_vertex)
+{
+  Cell_vector new_cells;
+  new_cells.reserve(64);
+  tr_.incident_cells(new_vertex, std::back_inserter(new_cells));
+
+  // Each cell must have a facet on the boundary of the conflict zone
+  CGAL_assertion(boundary_facets_from_outside.size() == new_cells.size());
+
+  // Restore attributes of each cell
+  for(typename Cell_vector::iterator cit = new_cells.begin();
+      cit != new_cells.end();
+      ++cit)
+  {
+    (*cit)->invalidate_circumcenter();
+    const int index = (*cit)->index(new_vertex);
+    const Facet new_facet = std::make_pair(*cit, index);
+    const Facet new_facet_from_outside = tr_.mirror_facet(new_facet);
+
+    // Search new_facet_from_outside in boundary_facets_from_outside.
+    // That search cannot fail.
+    typename Boundary_facets_from_outside::const_iterator it =
+      boundary_facets_from_outside.find(new_facet_from_outside);
+
+    CGAL_assertion(it != boundary_facets_from_outside.end());
+
+    // Restore facet attributes
+    if ( !( it->second.first == Surface_patch_index() ) )
+      c3t3_.add_to_complex(new_facet, it->second.first);
+
+    // Restore cell attributes
+    if ( !( it->second.second == Subdomain_index() ) )
+      c3t3_.add_to_complex(*cit, it->second.second);
+
+    // if the new cell is in the domain, and it criterion value is less that
+    // the maximum, push it in the cells queue.
+    if( c3t3_.is_in_complex(*cit) )
+    {
+      double criterion_value
+        = sliver_criteria_(*cit);
+
+      if( criterion_value < sliver_criteria_.sliver_bound() )
+        add_cell_to_queue<pump_vertices_on_surfaces>(*cit, criterion_value);
+    }
+  }
+}
+
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+typename Slivers_exuder<C3T3,SC,V_,FT>::Ordered_edge
+Slivers_exuder<C3T3,SC,V_,FT>::get_opposite_ordered_edge(
+  const Facet& facet,
+  const Vertex_handle& vertex) const
+{
+  CGAL_assertion(tr_.has_vertex(facet, vertex));
+
+  Vertex_handle v1;
+  Vertex_handle v2;
+
+  // Get the two vertex of *fit which are not new_vertex
+  for ( int i = 0 ; i < 4 ; ++i )
+  {
+    const Vertex_handle current_vertex = facet.first->vertex(i);
+
+    if ( current_vertex != vertex && tr_.has_vertex(facet, current_vertex) )
+    {
+      if ( v1 == Vertex_handle() )
+        v1 = current_vertex;
+      else
+        v2 = current_vertex;
+    }
+  }
+
+  CGAL_assertion(v1 != Vertex_handle() && v2 != Vertex_handle());
+
+  order_two_handles(v1,v2);
+  return Ordered_edge(v1,v2);
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+void
+Slivers_exuder<C3T3,SC,V_,FT>::
+restore_internal_facets(const Umbrella& umbrella,
+                        const Vertex_handle& new_vertex)
+{
+  Facet_vector new_internal_facets;
+  new_internal_facets.reserve(64);
+  tr_.incident_facets(new_vertex, std::back_inserter(new_internal_facets));
+
+  // Restore attributes of each facet
+  for(typename Facet_vector::iterator fit = new_internal_facets.begin();
+      fit != new_internal_facets.end();
+      ++fit)
+  {
+    Ordered_edge edge = get_opposite_ordered_edge(*fit, new_vertex);
+
+    // Search edge in umbrella.
+    // If it is found, restore facet surface index from umbrella
+    const typename Umbrella::const_iterator um_it = umbrella.find(edge);
+    if( um_it != umbrella.end() )
+    {
+      c3t3_.add_to_complex(*fit, um_it->second.first);
+    }
+  }
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <bool pump_vertices_on_surfaces>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+update_mesh(const Weighted_point& new_point,
+            const Vertex_handle& old_vertex,
+            bool *could_lock_zone)
+{
+  CGAL_assertion_code(std::size_t nb_vert =
+                      tr_.number_of_vertices());
+  Cell_vector deleted_cells;
+  Facet_vector internal_facets;
+  Facet_vector boundary_facets;
+
+  deleted_cells.reserve(64);
+  internal_facets.reserve(64);
+  boundary_facets.reserve(64);
+
+  tr_.find_conflicts(new_point,
+                     old_vertex->cell(),
+                     std::back_inserter(boundary_facets),
+                     std::back_inserter(deleted_cells),
+                     std::back_inserter(internal_facets),
+                     could_lock_zone);
+
+  if (could_lock_zone && *could_lock_zone == false)
+    return false;
+
+  // Get some datas to restore mesh
+  Boundary_facets_from_outside boundary_facets_from_outside =
+    get_boundary_facets_from_outside(boundary_facets);
+
+  boost::optional<Umbrella> umbrella
+    = get_umbrella(internal_facets, old_vertex);
+  if(umbrella == boost::none)
+    return false; //abort pumping this vertex
+
+  // Delete old cells from queue (they aren't in the triangulation anymore)
+  this->delete_cells_from_queue(deleted_cells);
+
+  // Delete old cells & facets from c3t3
+  remove_from_c3t3(deleted_cells.begin(),deleted_cells.end());
+  remove_from_c3t3(boundary_facets.begin(),boundary_facets.end());
+  remove_from_c3t3(internal_facets.begin(),internal_facets.end());
+
+  // Insert new point (v will be updated using a wp)
+  int dimension = c3t3_.in_dimension(old_vertex);
+  Index vertice_index = c3t3_.index(old_vertex);
+
+  Vertex_handle new_vertex = tr_.insert(new_point, old_vertex->cell());
+  c3t3_.set_dimension(new_vertex,dimension);
+  c3t3_.set_index(new_vertex,vertice_index);
+
+  // Only true for sequential version
+  CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices());
+
+  // Restore mesh
+  restore_cells_and_boundary_facets<pump_vertices_on_surfaces>(
+    boundary_facets_from_outside, new_vertex);
+  restore_internal_facets(*umbrella, new_vertex);
+
+  // Only true for sequential version
+  CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices());
+
+  return true;//pump was done successfully
+}
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+// For parallel version
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <bool pump_vertices_on_surfaces>
+void
+Slivers_exuder<C3T3,SC,V_,FT>::
+enqueue_task(Cell_handle ch, unsigned int erase_counter, double value)
+{
+  this->enqueue_work(
+    Pump_vertex<Self, pump_vertices_on_surfaces>(
+      *this, c3t3_, ch, erase_counter),
+    value);
+}
+#endif
+
+
+#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+template <typename C3T3, typename SC, typename V_, typename FT>
+template <class Input_facet_it>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+check_pre_star(const Pre_star& pre_star,
+               Input_facet_it begin,
+               Input_facet_it end,
+               const Vertex_handle v) const
+{
+  Pre_star pre_star_copy = pre_star;
+  if(v != Vertex_handle())
+  {
+    Pre_star pre_star2;
+
+    // fill pre_star2
+    for(Input_facet_it fit = begin;
+        fit != end;
+        ++fit)
+    {
+      const Facet opposite_facet = tr_.mirror_facet(*fit);
+      if(! tr_.is_infinite(opposite_facet.first) )
+      {
+        pre_star2.insert(*fit, compute_critical_radius(v,
+                                                       opposite_facet.first));
+      }
+    }
+
+    while(!pre_star_copy.empty() && !pre_star2.empty())
+    {
+      if(pre_star_copy.front()->first != pre_star2.front()->first) {
+        std::cerr << "bad order\n";
+        std::cerr << boost::format("pre_star.front()->first=%1%, should be %2%\n")
+        % pre_star_copy.front()->first % pre_star2.front()->first;
+        return false;
+      }
+      if ( pre_star_copy.front()->second != pre_star2.front()->second )
+      {
+        Facet f1 = pre_star_copy.front()->second;
+        Facet f2 = pre_star2.front()->second;
+        pre_star2.pop_front();
+        pre_star_copy.pop_front();
+        if ( pre_star_copy.front()->second == f2 && pre_star2.front()->second == f1 )
+        {
+          // It's ok
+          pre_star2.pop_front();
+          pre_star_copy.pop_front();
+        }
+        else
+        {
+          Facet f1 = tr_.mirror_facet(pre_star_copy.front()->second);
+          Facet f2 = tr_.mirror_facet(pre_star2.front()->second);
+          std::cerr << "Bad facet:" << f1.second << "/" << f2.second
+          << " - " << &*f1.first << "/" << &*f2.first << std::endl;
+        }
+      }
+      else
+      {
+        pre_star2.pop_front();
+        pre_star_copy.pop_front();
+      }
+    }
+
+    if(pre_star2.empty() && ! pre_star_copy.empty()) {
+      std::cerr << "pre_star is too big!\n";
+      while(!pre_star_copy.empty())
+      {
+        const Facet f = pre_star_copy.front()->second;
+        const double r = pre_star_copy.front()->first;
+        pre_star_copy.pop_front();
+        std::cerr << boost::format("extra facet (%1%,%2%) (infinite: %3%, opposite infinite: %4%), critical radius: %5%\n")
+        % &*f.first % f.second % tr_.is_infinite(f.first) % tr_.is_infinite(f.first->neighbor(f.second))
+        % r;
+      }
+      return false;
+    }
+
+    if( pre_star_copy.empty() && ! pre_star2.empty() ) {
+      std::cerr << "pre_star is too small!\n";
+      while(!pre_star2.empty())
+      {
+        const Facet f = pre_star2.front()->second;
+        pre_star2.pop_front();
+        std::cerr << boost::format("missing facet (%1%,%2%) (infinite: %3%, opposite infinite: %4%)\n")
+        % &*f.first % f.second % tr_.is_infinite(f.first) % tr_.is_infinite(f.first->neighbor(f.second));
+      }
+      return false;
+    }
+  }
+
+  pre_star_copy = pre_star;
+
+  for(Input_facet_it fit = begin;
+      fit != end;
+      ++fit)
+  {
+    const Facet opposite_facet = tr_.mirror_facet(*fit);
+    if(!tr_.is_infinite(opposite_facet.first) && !pre_star_copy.erase(*fit))
+      return false;
+  }
+  if( !pre_star_copy.empty() )
+    return false;
+
+  return true;
+}
+
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+check_pre_star(const Pre_star& pre_star,
+               const Weighted_point& wp,
+               const Vertex_handle& vh) const
+{
+  std::vector<Facet> boundary_facets;
+  boundary_facets.reserve(64);
+
+  tr_.find_conflicts(wp,
+                     vh->cell(),
+                     std::back_inserter(boundary_facets),
+                     CGAL::Emptyset_iterator(),
+                     CGAL::Emptyset_iterator());
+
+  const bool result =  check_pre_star(pre_star,
+                                      boundary_facets.begin(),
+                                      boundary_facets.end(),
+                                      vh);
+  if( ! result )
+    std::cerr << "boundary_facets.size()=" << boundary_facets.size()
+    << "\npre_star.size()=" << pre_star.size()
+    << "\ntested wp=" << wp
+    << "\n";
+  return result;
+}
+
+
+template <typename C3T3, typename SC, typename V_, typename FT>
+bool
+Slivers_exuder<C3T3,SC,V_,FT>::
+check_ratios(const Sliver_values& criterion_values,
+                  const Weighted_point& wp,
+                  const Vertex_handle& vh) const
+{
+  Cell_vector deleted_cells;
+  Facet_vector internal_facets;
+  Facet_vector boundary_facets;
+
+  tr_.find_conflicts(wp,
+                     vh->cell(),
+                     std::back_inserter(boundary_facets),
+                     std::back_inserter(deleted_cells),
+                     std::back_inserter(internal_facets));
+
+  bool result = true;
+  std::vector<double> expected_ratios;
+  std::vector<double> ratio_vector;
+
+  for ( typename Sliver_values::const_iterator rit = criterion_values.begin() ;
+       rit != criterion_values.end() ;
+       ++rit )
+  {
+    ratio_vector.push_back(rit->second);
+  }
+
+  for ( typename Facet_vector::const_iterator it = boundary_facets.begin() ;
+       it != boundary_facets.end() ;
+       ++ it )
+  {
+    if ( !c3t3_.is_in_complex((it->first)) )
+      continue;
+
+    int k = it->second;
+    Tetrahedron_3 tet(vh->point(),
+                      it->first->vertex((k+1)&3)->point(),
+                      it->first->vertex((k+2)&3)->point(),
+                      it->first->vertex((k+3)&3)->point());
+
+    double ratio = sliver_criteria_(tet);
+    expected_ratios.push_back(ratio);
+
+    bool found = false;
+    for ( typename Sliver_values::const_iterator rit = criterion_values.begin() ;
+         rit != criterion_values.end() ;
+         ++rit )
+    {
+      if ( near_equal(rit->second,ratio) )
+      {
+        found = true;
+        break;
+      }
+    }
+    if ( ! found )
+    {
+      result = false;
+    }
+  }
+
+  if (expected_ratios.size() != criterion_values.size())
+    result = false;
+
+  if ( !result )
+  {
+    std::sort(expected_ratios.begin(),expected_ratios.end());
+    std::sort(ratio_vector.begin(),ratio_vector.end());
+    std::vector<double> diff;
+    std::set_difference(expected_ratios.begin(),expected_ratios.end(),
+                        ratio_vector.begin(),ratio_vector.end(),
+                        std::back_inserter(diff));
+
+
+    std::cerr << "\nExpected criterion_values:[";
+    std::for_each(expected_ratios.begin(), expected_ratios.end(), print_double);
+    std::cerr << "]\nRatios:[";
+    std::for_each(ratio_vector.begin(), ratio_vector.end(), print_double);
+    std::cerr << "]\nDiff:[";
+    std::for_each(diff.begin(),diff.end(), print_double);
+    std::cerr << "]\n";
+  }
+
+  return result;
+}
+#endif // CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
+
+
+} // end namespace Mesh_3
+
+} // end namespace CGAL
+
+
+#endif // end CGAL_MESH_3_SLIVERS_EXUDER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangle_accessor_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangle_accessor_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangle_accessor_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangle_accessor_primitive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangulation_helpers.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangulation_helpers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangulation_helpers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangulation_helpers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangulation_sizing_field.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangulation_sizing_field.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Triangulation_sizing_field.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Triangulation_sizing_field.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Uniform_sizing_field.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Uniform_sizing_field.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Uniform_sizing_field.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Uniform_sizing_field.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Worksharing_data_structures.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Worksharing_data_structures.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/Worksharing_data_structures.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/Worksharing_data_structures.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/config.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/config.h
new file mode 100644
index 0000000..52e4aa8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/config.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2011 GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Mesh_3/config.h $
+// $Id: config.h 70893 2012-07-31 10:43:20Z jtournoi $
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_MESH_3_CONFIG_H
+#define CGAL_MESH_3_CONFIG_H 1
+
+#include <CGAL/config.h>
+
+//#define CGAL_MESH_3_VERBOSE 1
+
+// Use optimisations of Mesh_3
+#  define CGAL_INTRUSIVE_LIST 1
+#  define CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR 1
+#  define CGAL_MESH_3_NEW_GET_FACETS 1
+#  define CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST 1
+#  define CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE 1
+#  define FORCE_STRUCTURAL_FILTERING 1
+#  define CGAL_NEW_INCIDENT_SLIVERS 1
+
+//experimental
+#  define CGAL_FASTER_BUILD_QUEUE 1
+//#  define CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+//#  define CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE // slower / not recommended
+
+//should not be used
+//#define CGAL_MESH_3_OLD_MINIMUM_DIHEDRAL_ANGLE 1
+
+//experimental
+#define CGAL_MESH_3_NO_PROTECTION_NON_LINEAR 1
+#define CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS 1
+
+
+// CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+// implies CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+#ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+#  ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+#    ifndef CGAL_MESH_3_DEACTIVATE_NO_LONGER_CALLS_DO_INTERSECT_3
+#      define CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 1
+#    endif
+#  endif
+#endif // CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+
+// CGAL_MESH_3_VERBOSE implies CGAL_MESH_3_OPTIMIZER_VERBOSE
+#ifdef CGAL_MESH_3_VERBOSE
+#  ifndef CGAL_MESH_3_OPTIMIZER_VERBOSE
+#    define CGAL_MESH_3_OPTIMIZER_VERBOSE 1
+#  endif
+#endif
+
+#if defined(__clang__) || (BOOST_GCC >= 40600)
+#  define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES \
+    _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
+    _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
+#else
+#  define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES
+#endif
+#if __has_warning("-Wunneeded-internal-declaration")
+#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION \
+     _Pragma("clang diagnostic ignored \"-Wunneeded-internal-declaration\"")
+#else
+#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION
+#endif
+
+#define CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS \
+  CGAL_MESH_3_IGNORE_UNUSED_VARIABLES                    \
+  CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION
+
+#endif // CGAL_MESH_3_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/dihedral_angle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/dihedral_angle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/dihedral_angle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/dihedral_angle_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/global_parameters.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/global_parameters.h
new file mode 100644
index 0000000..e3fce73
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/global_parameters.h
@@ -0,0 +1,100 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_MESH_3_GLOBAL_PARAMETERS_H
+#define CGAL_MESH_3_GLOBAL_PARAMETERS_H
+
+#include <CGAL/config.h>
+#include <CGAL/Mesh_3/config.h>
+
+#ifdef BOOST_PARAMETER_MAX_ARITY
+#  if (BOOST_PARAMETER_MAX_ARITY < 12)
+#    error "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3"
+#  endif
+#else
+#  define  BOOST_PARAMETER_MAX_ARITY 12
+#endif
+
+#include <boost/parameter.hpp>
+
+
+namespace CGAL {
+
+namespace parameters {
+
+template <typename T>
+struct Base
+{
+  Base(T t) : t_(t) {}
+  T operator()() const { return t_; }
+private:
+  T t_;
+};
+  
+#define CGAL_MESH_BOOLEAN_PARAMETER(Class, function_true, function_false)     \
+  struct Class : public Base<bool> { Class(bool b) : Base<bool>(b){} };       \
+  inline Class function_true() { return Class(true); }                        \
+  inline Class function_false() { return Class(false); }
+
+#define CGAL_MESH_DOUBLE_PARAMETER(Class, function, precondition)             \
+  struct Class : public Base<double>                                          \
+  { Class(double d) : Base<double>(d) { precondition(d); } };                 \
+  inline Class function(double d) { return Class(d); }
+
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_NAME( c3t3 )
+BOOST_PARAMETER_NAME( domain )
+BOOST_PARAMETER_NAME( criteria )
+  
+BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ )
+BOOST_PARAMETER_NAME( (sliver_bound, tag) sliver_bound_)
+BOOST_PARAMETER_NAME( (sliver_criterion, tag) sliver_criterion_)
+BOOST_PARAMETER_NAME( (perturbation_vector, tag) perturbation_vector_) 
+BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_)
+BOOST_PARAMETER_NAME( (do_freeze, tag) do_freeze_)
+BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ )
+BOOST_PARAMETER_NAME( (convergence, tag) convergence_)
+
+BOOST_PARAMETER_NAME( (dump_after_init_prefix, tag ) dump_after_init_prefix_)
+BOOST_PARAMETER_NAME( (dump_after_refine_surface_prefix, tag ) dump_after_refine_surface_prefix_)
+BOOST_PARAMETER_NAME( (dump_after_refine_prefix, tag ) dump_after_refine_prefix_)
+BOOST_PARAMETER_NAME( (dump_after_glob_opt_prefix, tag ) dump_after_glob_opt_prefix_)
+BOOST_PARAMETER_NAME( (dump_after_perturb_prefix, tag ) dump_after_perturb_prefix_)
+BOOST_PARAMETER_NAME( (dump_after_exude_prefix, tag ) dump_after_exude_prefix_)
+BOOST_PARAMETER_NAME( (number_of_initial_points, tag) number_of_initial_points_)
+
+CGAL_PRAGMA_DIAG_POP
+} // end namespace parameters
+
+
+
+
+
+} //namespace CGAL
+
+#endif // CGAL_MESH_3_GLOBAL_PARAMETERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/io_signature.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/io_signature.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/io_signature.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/io_signature.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_criteria.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_criteria.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_criteria.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_criteria.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/min_dihedral_angle.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/min_dihedral_angle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/min_dihedral_angle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/min_dihedral_angle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/parameters_defaults.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/parameters_defaults.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/parameters_defaults.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/parameters_defaults.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/polylines_to_protect.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/polylines_to_protect.h
new file mode 100644
index 0000000..f968c23
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/polylines_to_protect.h
@@ -0,0 +1,359 @@
+// Copyright (c) 2015 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_POLYLINES_TO_PROTECT_H
+#define CGAL_POLYLINES_TO_PROTECT_H
+
+#include <vector>
+#include <map>
+#include <CGAL/tuple.h>
+#include <CGAL/Image_3.h>
+#include <CGAL/internal/Mesh_3/split_in_polylines.h>
+#include <CGAL/internal/Mesh_3/Graph_manipulations.h>
+#include <boost/graph/adjacency_list.hpp>
+
+namespace CGAL {
+
+
+  template <typename P>
+  void
+  polylines_to_protect(const CGAL::Image_3& cgal_image,
+                       const double, const double, const double,
+                       std::vector<std::vector<P> >& polylines)
+  {
+    typedef typename Kernel_traits<P>::Kernel K;
+    typedef P Point_3;
+    typedef boost::adjacency_list<boost::setS, boost::setS, boost::undirectedS, Point_3> Graph;
+    typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+   // typedef typename boost::graph_traits<Graph>::edge_iterator edge_iterator;
+
+    const int xdim = static_cast<int>(cgal_image.xdim());
+    const int ydim = static_cast<int>(cgal_image.ydim());
+    const int zdim = static_cast<int>(cgal_image.zdim());
+
+  const int image_dims[3] = { xdim, ydim, zdim };
+
+  Graph graph;
+  internal::Mesh_3::Graph_manipulations<Graph, Point_3> g_manip(graph);
+
+  std::size_t
+    case4 = 0, // 4 colors
+    case211 = 0, case121 = 0, // 3 colors
+    case31 = 0, case22 = 0, // 2 colors
+    case1 = 0; // 1 color
+
+  for(int axis = 0; axis < 3; ++axis)
+  {
+    for(int i = 0; i < xdim; i+= (axis == 0 ? (xdim-1) : 1 ) )
+      for(int j = 0; j < ydim; j+= (axis == 1 ? (ydim-1) : 1 ) )
+        for(int k = 0; k < zdim; k+= (axis == 2 ? (zdim-1) : 1 ) )
+        {
+
+          using CGAL::cpp11::array;
+          using CGAL::cpp11::tuple;
+
+          typedef array<int, 3> Pixel;
+
+          Pixel pix00 = {{i  , j  , k  }},
+            pix10 = pix00, pix01 = pix00, pix11 = pix00;
+
+          const int axis_xx = (axis + 1) % 3;
+          const int axis_yy = (axis + 2) % 3;
+
+          ++pix10[axis_xx];
+          ++pix11[axis_xx];
+          ++pix01[axis_yy];
+          ++pix11[axis_yy];
+          if(pix11[0] >= xdim || pix11[1] >= ydim || pix11[2] >= zdim) {
+            // we have gone too far
+            continue;
+          }
+          typedef unsigned char Image_word_type;
+          typedef tuple<Pixel, Point_3, Image_word_type> Enriched_pixel;
+
+          array<array<Enriched_pixel, 2>, 2> square =
+            {{ {{ Enriched_pixel(pix00, Point_3(), Image_word_type()),
+                  Enriched_pixel(pix01, Point_3(), Image_word_type()) }},
+               {{ Enriched_pixel(pix10, Point_3(), Image_word_type()),
+                  Enriched_pixel(pix11, Point_3(), Image_word_type()) }} }};
+
+          std::map<Image_word_type, int> pixel_values_set;
+          for(int ii = 0; ii < 2; ++ii)
+            for(int jj = 0; jj < 2; ++jj)
+            {
+              const Pixel& pixel = get<0>(square[ii][jj]);
+              double x = pixel[0] * cgal_image.vx();
+              double y = pixel[1] * cgal_image.vy();
+              double z = pixel[2] * cgal_image.vz();
+              get<1>(square[ii][jj]) = Point_3(x, y, z);
+              get<2>(square[ii][jj]) = static_cast<Image_word_type>(cgal_image.value(pixel[0],
+                                                                                     pixel[1],
+                                                                                     pixel[2]));
+              ++pixel_values_set[get<2>(square[ii][jj])];
+            }
+          const Point_3& p00 = get<1>(square[0][0]);
+          const Point_3& p10 = get<1>(square[1][0]);
+          const Point_3& p01 = get<1>(square[0][1]);
+          const Point_3& p11 = get<1>(square[1][1]);
+
+          //
+          // Protect the edges of the cube
+          //
+          if(pix00[axis_xx] == 0) {
+            g_manip.try_add_edge(g_manip.get_vertex(p00),
+                                 g_manip.get_vertex(p01));
+          }
+          if(pix11[axis_xx] == image_dims[axis_xx]-1) {
+            g_manip.try_add_edge(g_manip.get_vertex(p10),
+                                 g_manip.get_vertex(p11));
+          }
+          if(pix00[axis_yy] == 0) {
+            g_manip.try_add_edge(g_manip.get_vertex(p00),
+                                 g_manip.get_vertex(p10));
+          }
+          if(pix11[axis_yy] == image_dims[axis_yy]-1) {
+            g_manip.try_add_edge(g_manip.get_vertex(p01),
+                                 g_manip.get_vertex(p11));
+          }
+
+          //
+          // Protect lines inside the square
+          //
+          switch(pixel_values_set.size()) {
+          case 4: {
+            assert(get<2>(square[0][0]) != get<2>(square[0][1]));
+            assert(get<2>(square[0][0]) != get<2>(square[1][0]));
+            assert(get<2>(square[0][0]) != get<2>(square[1][1]));
+            assert(get<2>(square[1][0]) != get<2>(square[1][1]));
+            assert(get<2>(square[0][1]) != get<2>(square[1][1]));
+            assert(get<2>(square[0][1]) != get<2>(square[1][0]));
+case_4:
+            // case 4 or case 2-2
+            ++case4;
+            vertex_descriptor left   = g_manip.split(p00, p01);
+            vertex_descriptor right  = g_manip.split(p10, p11);
+            vertex_descriptor top    = g_manip.split(p01, p11);
+            vertex_descriptor bottom = g_manip.split(p00, p10);
+            vertex_descriptor vmid   = g_manip.get_vertex(midpoint(p00, p11));
+            g_manip.try_add_edge(left   , vmid);
+            g_manip.try_add_edge(right  , vmid);
+            g_manip.try_add_edge(top    , vmid);
+            g_manip.try_add_edge(bottom , vmid);
+          }
+            break;
+          case 3: {
+            if(get<2>(square[0][0]) == get<2>(square[1][1])) {
+              // Diagonal, but the wrong one.
+              // Vertical swap
+              std::swap(square[0][1], square[0][0]);
+              std::swap(square[1][1], square[1][0]);
+            }
+            if(get<2>(square[0][1]) == get<2>(square[1][0])) {
+              // diagonal case 1-2-1
+              assert(get<2>(square[0][1]) == get<2>(square[1][0]));
+              assert(get<2>(square[1][1]) != get<2>(square[0][0]));
+              assert(get<2>(square[0][1]) != get<2>(square[0][0]));
+              assert(get<2>(square[0][1]) != get<2>(square[1][1]));
+              ++case121;
+              vertex_descriptor left   = g_manip.split(p00, p01);
+              vertex_descriptor right  = g_manip.split(p10, p11);
+              vertex_descriptor top    = g_manip.split(p01, p11);
+              vertex_descriptor bottom = g_manip.split(p00, p10);
+              Point_3 inter_left = p00 + (1./3.) * (p11 - p00);
+              Point_3 inter_right = p00 + (2./3.) * (p11 - p00);
+              vertex_descriptor v_int_left = g_manip.get_vertex(inter_left);
+              vertex_descriptor v_int_right = g_manip.get_vertex(inter_right);
+              g_manip.try_add_edge(left, v_int_left);
+              g_manip.try_add_edge(v_int_left, bottom);
+              g_manip.try_add_edge(top, v_int_right);
+              g_manip.try_add_edge(v_int_right, right);
+            } else {
+              // case 2-1-1
+              if(get<2>(square[0][0]) == get<2>(square[1][0])) {
+                // Diagonal swap
+                std::swap(square[0][1], square[1][0]);
+              } else
+              if(get<2>(square[0][1]) == get<2>(square[1][1])) {
+                // The other diagonal swap
+                std::swap(square[0][0], square[1][1]);
+              } else
+              if(get<2>(square[1][0]) == get<2>(square[1][1])) {
+                // Vertical swap
+                std::swap(square[0][0], square[1][0]);
+                std::swap(square[0][1], square[1][1]);
+              }
+              assert(get<2>(square[0][0]) == get<2>(square[0][1]));
+              assert(get<2>(square[0][0]) != get<2>(square[1][0]));
+              assert(get<2>(square[0][0]) != get<2>(square[1][1]));
+              ++case211;
+              Point_3 midleft =  midpoint(p00, p01);
+              Point_3 midright = midpoint(p10, p11);
+              Point_3 inter = midleft + (2./3)*(midright-midleft);
+              vertex_descriptor v_inter = g_manip.get_vertex(inter);
+              vertex_descriptor right  = g_manip.split(p10, p11);
+              vertex_descriptor top    = g_manip.split(p01, p11);
+              vertex_descriptor bottom = g_manip.split(p00, p10);
+              g_manip.try_add_edge(top,    v_inter);
+              g_manip.try_add_edge(bottom, v_inter);
+              g_manip.try_add_edge(right,  v_inter);
+            }
+          }
+            break;
+          case 2: {
+            if(pixel_values_set.begin()->second ==
+               pixel_values_set.rbegin()->second)
+            {
+              // Case of two colors with two pixels each.
+
+              if(get<2>(square[0][0])==get<2>(square[1][0])) {
+                // case 2-2, diagonal swap
+                std::swap(square[0][1], square[1][0]);
+                assert(get<2>(square[0][0])==get<2>(square[0][1]));
+              }
+              if(get<2>(square[1][0])==get<2>(square[1][1])) {
+                // case 2-2, vertical swap
+                std::swap(square[0][1], square[1][1]);
+                std::swap(square[0][0], square[1][0]);
+                assert(get<2>(square[0][0])==get<2>(square[0][1]));
+              }
+              if(get<2>(square[0][1])==get<2>(square[1][1])) {
+                // case 2-2, diagonal swap
+                std::swap(square[0][0], square[1][1]);
+                assert(get<2>(square[0][0])==get<2>(square[0][1]));
+              }
+
+              if(get<2>(square[0][0])==get<2>(square[0][1])) {
+                // vertical case 2-2
+                ++case22;
+                assert(get<2>(square[1][0])==get<2>(square[1][1]));
+                assert(get<2>(square[1][0])!=get<2>(square[0][1]));
+                vertex_descriptor top    = g_manip.split(p01, p11);
+                vertex_descriptor bottom = g_manip.split(p00, p10);
+                g_manip.try_add_edge(top, bottom);
+              } else {
+                // Else diagonal case case 2-2
+                // Same as the case with 4 colors
+                assert(get<2>(square[0][0])==get<2>(square[1][1]));
+                assert(get<2>(square[1][0])==get<2>(square[0][1]));
+                assert(get<2>(square[0][0])!=get<2>(square[0][1]));
+                goto case_4;
+              }
+            }
+            else {
+              // case of two colors with one pixel green and three red
+              Image_word_type value_alone;
+              if(pixel_values_set.begin()->second == 1) {
+                value_alone = pixel_values_set.begin()->first;
+              } else {
+                assert(pixel_values_set.begin()->second == 3);
+                assert(pixel_values_set.rbegin()->second ==1);
+                value_alone = pixel_values_set.rbegin()->first;
+              }
+              if(get<2>(square[0][1]) == value_alone) {
+                // central symmetry
+                std::swap(square[0][1], square[1][0]);
+                std::swap(square[0][0], square[1][1]);
+              assert(get<2>(square[1][0]) == value_alone);
+              }
+              if(get<2>(square[1][1]) == value_alone) {
+                // vertical swap
+                std::swap(square[0][0], square[0][1]);
+                std::swap(square[1][0], square[1][1]);
+              assert(get<2>(square[1][0]) == value_alone);
+              }
+              if(get<2>(square[0][0]) == value_alone) {
+                // horizontal swap
+                std::swap(square[0][1], square[1][1]);
+                std::swap(square[0][0], square[1][0]);
+              assert(get<2>(square[1][0]) == value_alone);
+              }
+              ++case31;
+              assert(get<2>(square[1][0]) == value_alone);
+              assert(get<2>(square[1][0]) != get<2>(square[0][0]));
+              assert(get<2>(square[1][1]) == get<2>(square[0][0]));
+              assert(get<2>(square[0][1]) == get<2>(square[0][0]));
+              vertex_descriptor bottom = g_manip.split(p00, p10);
+              vertex_descriptor old = bottom;
+
+              Point_3 inter;
+
+              vertex_descriptor v_int;
+              for(double x = 0.55; x < 1.; x+= 0.05)
+              {
+                inter = p00
+                  +      x         * (p10 - p00)  // x
+                  + (1.-1./(2.*x)) * (p01 - p00); // y
+                v_int = g_manip.get_vertex(inter);
+                g_manip.try_add_edge(old, v_int);
+                old = v_int;
+              }
+
+              vertex_descriptor right  = g_manip.split(p10, p11);
+              g_manip.try_add_edge(v_int, right);
+            }
+          }
+            break;
+          default: // case 1
+            ++case1;
+            // nothing to do
+            break;
+          }
+        }
+  }
+  // std::cerr << "case 4:     " << case4 << std::endl;
+  // std::cerr << "case 2-1-1: " << case211 << std::endl;
+  // std::cerr << "case 1-2-1: " << case121 << std::endl;
+  // std::cerr << "case 3-1:   " << case31 << std::endl;
+  // std::cerr << "case 2-2:   " << case22 << std::endl;
+  // std::cerr << "case 1:     " << case1 << std::endl;
+
+  const std::ptrdiff_t nb_facets =
+    case4 + case211 + case121 + case31 + case22 + case1;
+  const std::ptrdiff_t expected_nb_facets =
+    2*((xdim-1)*(ydim-1) + (ydim-1)*(zdim-1) + (xdim-1)*(zdim-1));
+
+  // std::cerr << "nb of facets:           " << nb_facets << std::endl
+  //           << " expected nb of facets: " << expected_nb_facets << std::endl;
+
+  CGAL_assertion(nb_facets == expected_nb_facets);
+  CGAL_USE(nb_facets); CGAL_USE(expected_nb_facets);
+
+
+  internal::Mesh_3::split_in_polylines(graph, polylines, K());
+  }
+
+
+  template <typename P>
+  void
+  polylines_to_protect(const CGAL::Image_3& cgal_image,
+                       std::vector<std::vector<P> >& polylines)
+  {
+    polylines_to_protect<P>
+      (cgal_image,
+       cgal_image.vx(), cgal_image.vy(),cgal_image.vz(),
+       polylines);
+  }
+
+
+} // namespace CGAL
+
+
+#endif // CGAL_POLYLINES_TO_PROTECT_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/radius_ratio.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/radius_ratio.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/radius_ratio.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/radius_ratio.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/sliver_criteria.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/sliver_criteria.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/sliver_criteria.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/sliver_criteria.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/utilities.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/utilities.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/utilities.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/utilities.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_3/vertex_perturbation.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_3/vertex_perturbation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_3/vertex_perturbation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_3/vertex_perturbation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_cell_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_cell_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_cell_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_cell_criteria_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_complex_3_in_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_complex_3_in_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_complex_3_in_triangulation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_constant_domain_field_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_constant_domain_field_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_constant_domain_field_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_constant_domain_field_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_criteria_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_domain_with_polyline_features_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_domain_with_polyline_features_3.h
new file mode 100644
index 0000000..0a9c2cb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_domain_with_polyline_features_3.h
@@ -0,0 +1,1088 @@
+// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb, Laurent Rineau
+//
+//******************************************************************************
+// File Description :
+//
+//******************************************************************************
+
+#ifndef CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
+#define CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
+
+#include <CGAL/iterator.h>
+#include <CGAL/enum.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/is_streamable.h>
+
+#include <vector>
+#include <set>
+#include <map>
+#include <boost/next_prior.hpp> // for boost::prior and boost::next
+#include <boost/variant.hpp>
+#include <boost/foreach.hpp>
+
+namespace CGAL {
+
+
+namespace internal {
+namespace Mesh_3 {
+
+template <typename Kernel>
+class Polyline
+{
+  typedef typename Kernel::Point_3  Point_3;
+  typedef typename Kernel::Segment_3 Segment_3;
+  typedef typename Kernel::FT       FT;
+
+  typedef std::vector<Point_3>      Data;
+
+public:
+  typedef typename Data::const_iterator const_iterator;
+
+  Polyline() {}
+  ~Polyline() {}
+
+  /// Add a point at the end of the polyline
+  void add_point(const Point_3& p)
+  {
+    if( points_.empty() || p != end_point() ) {
+      points_.push_back(p);
+    }
+  }
+
+  /// Returns the starting point of the polyline
+  const Point_3& start_point() const
+  {
+    CGAL_assertion( ! points_.empty() );
+    return points_.front();
+  }
+
+  /// Returns the ending point of the polyline
+  const Point_3& end_point() const
+  {
+    CGAL_assertion( ! points_.empty() );
+    return points_.back();
+  }
+
+  /// Returns true if the polyline is not degenerated
+  bool is_valid() const
+  {
+    return points_.size() > 1;
+  }
+
+  /// Returns true if polyline is a cycle
+  bool is_cycle() const
+  {
+    return start_point() == end_point();
+  }
+
+  /// Returns the length of the polyline
+  FT length() const
+  {
+    //TODO: cache result
+    FT result (0);
+    const_iterator it = points_.begin();
+    const_iterator previous = it++;
+
+    for ( const_iterator end = points_.end() ; it != end ; ++it, ++previous )
+    {
+      result += distance(*previous,*it);
+    }
+
+    return result;
+  }
+
+  /// Returns signed geodesic distance between \c p and \c q
+  FT geodesic_distance(const Point_3& p, const Point_3& q,
+                       bool /*treat_cycle*/=true) const
+  {
+    CGAL_precondition(is_valid());
+
+    // Locate p & q on polyline
+    const_iterator pit = locate(p);
+    const_iterator qit = locate(q,false);
+
+    // Compute geodesic distance
+    FT result = (pit <= qit) ? geodesic_distance(p,q,pit,qit)
+                             : -geodesic_distance(q,p,qit,pit);
+
+    // Treat cycles: return a positive value
+    if ( is_cycle() && (p==q || result < FT(0)) )
+    {
+      result = length() + result;
+    }
+
+    return result;
+  }
+
+
+  /// Returns a point at geodesic distance \c distance from p along the
+  /// polyline. The polyline is oriented from starting point to end point.
+  /// The distance could be negative.
+  Point_3 point_at(const Point_3& p, FT distance) const
+  {
+    // use first point of the polyline instead of p
+    distance += geodesic_distance(start_point(),p,false);
+
+    // If polyline is a cycle, ensure that distance is given from start_point()
+    if ( is_cycle() )
+    {
+      if ( distance < FT(0) ) { distance += length(); }
+      else if ( distance > length() ) { distance -= length(); }
+    }
+
+    CGAL_assertion( distance >= FT(0) );
+    CGAL_assertion( distance <= length() );
+
+    // Initialize iterators
+    const_iterator pit = points_.begin();
+    const_iterator previous = pit++;
+
+    // Iterate to find which segment contains the point we want to construct
+    FT segment_length = this->distance(*previous,*pit);
+    while ( distance > segment_length )
+    {
+      distance -= segment_length;
+
+      // Increment iterators and update length
+      ++previous;
+      ++pit;
+
+      if (pit == points_.end())
+        return *previous;
+
+      segment_length = this->distance(*previous,*pit);
+    }
+
+    // return point at distance from current segment source
+    typedef typename Kernel::Vector_3 Vector_3;
+    Vector_3 v (*previous, *pit);
+
+    return (*previous) + (distance / CGAL::sqrt(v.squared_length())) * v;
+  }
+
+  bool are_ordered_along(const Point_3& p, const Point_3& q) const
+  {
+    CGAL_precondition(!is_cycle());
+
+    // Locate p & q on polyline
+    const_iterator pit = locate(p);
+    const_iterator qit = locate(q,true);
+
+    // Points are not located on the same segment
+    if ( pit != qit ) { return (pit <= qit); }
+
+    // pit == qit, then we have to sort p&q along (pit,pit+1)
+    return ( compare_distance(*pit,p,q) != CGAL::LARGER );
+  }
+
+private:
+  const_iterator first_segment_source() const
+  {
+    CGAL_precondition(is_valid());
+    return points_.begin();
+  }
+
+  const_iterator last_segment_source() const
+  {
+    CGAL_precondition(is_valid());
+    return (points_.end() - 2);
+  }
+
+  FT geodesic_distance(const Point_3& p, const Point_3& q,
+                       const_iterator pit, const_iterator qit) const
+  {
+    CGAL_precondition(std::distance(pit,qit) >= 0);
+
+    // If p and q are in the same segment of the polyline
+    if ( pit == qit )
+    {
+      FT result = distance(p,q);
+
+      // Find the closest point to *pit
+      if ( compare_distance(*pit,p,q) != CGAL::LARGER )
+      { return result; }
+      else
+      { return -result; }
+    }
+
+    // p is inside [pit,pit+1], pit+1 != qit, q is inside [qit,qit+1]
+    FT result = distance(p,*(pit+1));
+    result += distance(*qit,q);
+
+    // Add segments between pit+1 and qit to result
+    for ( const_iterator it = (pit+1) ; it != qit ; ++it )
+    {
+      result += distance(*it,*(it+1));
+    }
+
+    return result;
+  }
+
+  /// Returns an iterator on the starting point of the segment of the
+  /// polyline which contains p
+  /// if end_point_first is true, then --end is returned instead of begin
+  /// if p is the starting point of a cycle.
+  const_iterator locate(const Point_3& p, bool end_point_first=false) const
+  {
+    CGAL_precondition(is_valid());
+
+    // First look if p is one of the points of the polyline
+    const_iterator result = std::find(points_.begin(), points_.end(), p);
+    if ( result != points_.end() )
+    {
+      if ( result != points_.begin() )
+      { return --result; }
+      else
+      {
+        // Treat cycles
+        if ( end_point_first && p == end_point() )
+        { return last_segment_source(); }
+        else
+        { return result; }
+      }
+    }
+
+    CGAL_assertion(result == points_.end());
+
+    // Get result by projecting p on the polyline
+    const_iterator it = points_.begin();
+    const_iterator previous = it;
+    Segment_3 nearest_segment;
+    const_iterator nearest_vertex = it;
+    result = nearest_vertex;
+    bool nearest_is_a_segment = false;
+
+    while ( ++it != points_.end() )
+    {
+      Segment_3 seg (*previous, *it);
+
+      if(nearest_is_a_segment)
+      {
+        if(compare_distance(p, seg, nearest_segment) == CGAL::SMALLER)
+        {
+          nearest_segment = seg;
+          result = previous;
+        }
+        if(compare_distance(p, *it, nearest_segment) == CGAL::SMALLER)
+        {
+          nearest_vertex = it;
+          nearest_is_a_segment = false;
+          result = it;
+        }
+      }
+      else {
+        if(compare_distance(p, *it, *nearest_vertex) == CGAL::SMALLER)
+        {
+          nearest_vertex = it;
+          result = it;
+        }
+        if(compare_distance(p, seg, *nearest_vertex) == CGAL::SMALLER)
+        {
+          nearest_segment = seg;
+          nearest_is_a_segment = true;
+          result = previous;
+        }
+      }
+      previous = it;
+    } // end the while loop on the vertices of the polyline
+
+
+    if(result == points_.begin()) {
+      return (end_point_first && !nearest_is_a_segment) ? last_segment_source() : points_.begin();
+    } else {
+      return result;
+    }
+  }
+
+  // FT squared_distance(const Point_3& p, const Point_3& q) const
+  // {
+  //   typename Kernel::Compute_squared_distance_3 sq_distance =
+  //     Kernel().compute_squared_distance_3_object();
+  //   return sq_distance(p,q);
+  // }
+
+  FT distance(const Point_3& p, const Point_3& q) const
+  {
+    return CGAL::sqrt(squared_distance(p, q));
+  }
+
+  Angle angle(const Point_3& p,
+              const Point_3& angle_vertex_point,
+              const Point_3& q) const
+  {
+    typename Kernel::Angle_3 compute_angle =  Kernel().angle_3_object();
+    return compute_angle(p,angle_vertex_point,q);
+  }
+
+  template <typename T1, typename T2>
+  CGAL::Sign compare_distance(const Point_3& p,
+                              const T1& obj1,
+                              const T2& obj2) const
+  {
+    typename Kernel::Compare_distance_3 compare_distance =
+      Kernel().compare_distance_3_object();
+    return compare_distance(p,obj1,obj2);
+  }
+
+public:
+  Data points_;
+}; // end class Polyline
+
+
+template <typename Gt, typename MapIterator>
+struct Mesh_domain_segment_of_curve_primitive{
+  typedef typename std::iterator_traits<MapIterator>::value_type Map_value_type;
+  typedef typename Map_value_type::first_type Curve_id;
+  typedef typename Map_value_type::second_type Polyline;
+
+  typedef std::pair<MapIterator,
+                    typename Polyline::const_iterator> Id;
+
+  typedef typename std::iterator_traits<
+    typename Polyline::const_iterator>::value_type Point;
+
+  typedef typename Gt::Segment_3 Datum;
+
+  Id id_;
+
+  Mesh_domain_segment_of_curve_primitive(Id id) : id_(id) {}
+
+  const Id& id() const { return id_; }
+
+  const Point& reference_point() const {
+    return *(id_.second);
+  }
+
+  Datum datum() const {
+    return Datum(*id_.second, *(id_.second+1));
+  }
+}; // end Mesh_domain_segment_of_curve_primitive
+
+template <typename MDwPF, bool patch_id_is_streamable>
+struct Display_incidences_to_patches_aux {
+  template <typename Container>
+  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
+                  const Container&) const;
+};
+
+template <typename MDwPF> //specialization when patch_id_is_streamable == false
+struct Display_incidences_to_patches_aux<MDwPF, false> {
+  template <typename Container>
+  void operator()(std::ostream& os,
+                  typename MDwPF::Curve_segment_index id,
+                  const Container&) const;
+};
+
+template <typename MDwPF, bool curve_id_is_streamable>
+struct Display_incidences_to_curves_aux {
+  template <typename Container>
+  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
+                  const Container&) const;
+};
+
+template <typename MDwPF> //specialization when curve_id_is_streamable == false
+struct Display_incidences_to_curves_aux<MDwPF, false> {
+  template <typename Container>
+  void operator()(std::ostream& os, typename MDwPF::Curve_segment_index id,
+                  const Container&) const;
+};
+
+} // end of namespace CGAL::internal::Mesh_3
+} // end of namespace CGAL::internal
+
+
+
+
+
+/**
+ * @class Mesh_domain_with_polyline_features_3
+ *
+ *
+ */
+template < typename MeshDomain >
+class Mesh_domain_with_polyline_features_3
+  : public MeshDomain
+{
+  typedef MeshDomain Base;
+
+public:
+  // Index types
+  typedef typename Base::Index    Index;
+
+  typedef typename Base::Surface_patch_index
+                                  Surface_patch_index;
+
+  typedef int                     Curve_segment_index;
+  typedef int                     Corner_index;
+
+  typedef typename Base::R         Gt;
+  typedef Gt                       R;
+  typedef typename Base::Point_3   Point_3;
+  typedef typename Gt::FT          FT;
+
+  typedef CGAL::Tag_true           Has_features;
+
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  template <typename ... T>
+  Mesh_domain_with_polyline_features_3(const T& ...t)
+    : Base(t...)
+    , current_corner_index_(1)
+    , current_curve_index_(1)
+    , curves_aabb_tree_is_built(false) {}
+#else
+  /// Constructors
+  /// Call the base class constructor
+  Mesh_domain_with_polyline_features_3()
+    : Base()
+    , current_corner_index_(1)
+    , current_curve_index_(1)
+    , curves_aabb_tree_is_built(false) {}
+
+  template <typename T1>
+  Mesh_domain_with_polyline_features_3(const T1& o1)
+    : Base(o1)
+    , current_corner_index_(1)
+    , current_curve_index_(1)
+    , curves_aabb_tree_is_built(false) {}
+
+  template <typename T1, typename T2>
+  Mesh_domain_with_polyline_features_3(const T1& o1, const T2& o2)
+    : Base(o1, o2)
+    , current_corner_index_(1)
+    , current_curve_index_(1)
+    , curves_aabb_tree_is_built(false) {}
+
+  template <typename T1, typename T2, typename T3>
+  Mesh_domain_with_polyline_features_3(const T1& o1, const T2& o2,
+                                       const T3& o3)
+    : Base(o1, o2, o3)
+    , current_corner_index_(1)
+    , current_curve_index_(1)
+    , curves_aabb_tree_is_built(false) {}
+#endif
+
+  /// Destructor
+  ~Mesh_domain_with_polyline_features_3() {}
+
+  /// OutputIterator value type is std::pair<Corner_index, Point_3>
+  template <typename OutputIterator>
+  OutputIterator get_corners(OutputIterator out) const;
+
+  /// OutputIterator value type is CGAL::cpp11::tuple<Curve_segment_index,
+  /// std::pair<Point_3,Index>, std::pair<Point_3,Index> >
+  template <typename OutputIterator>
+  OutputIterator get_curve_segments(OutputIterator out) const;
+
+  /// Returns the geodesic distance between points p and q of curve
+  /// \c curve_index
+  FT geodesic_distance(const Point_3& p, const Point_3& q,
+                       const Curve_segment_index& curve_index) const;
+
+  /// Construct a point on curve \c curve_index at geodesic distance \c distance
+  /// of \c starting_point
+  Point_3
+  construct_point_on_curve_segment(const Point_3& starting_point,
+                                   const Curve_segment_index& curve_index,
+                                   FT distance) const;
+
+  /// Returns the sign of the orientation of p,q,r along curve segment
+  /// of index \c index
+  CGAL::Sign distance_sign_along_cycle(const Point_3& p,
+                                       const Point_3& q,
+                                       const Point_3& r,
+                                       const Curve_segment_index& index) const;
+
+  /// Returns true if curve \c curve_index is a cycle
+  bool is_cycle(const Point_3&, const Curve_segment_index& index) const;
+
+  /// Returns an Index from a Curve_segment_index
+  Index index_from_curve_segment_index(const Curve_segment_index& index) const
+  { return Index(index); }
+
+  /// Returns an Curve_segment_index from an Index
+  Curve_segment_index curve_segment_index(const Index& index) const
+  { return boost::get<Curve_segment_index>(index); }
+
+  /// Returns an Index from a Corner_index
+  Index index_from_corner_index(const Corner_index& index) const
+  { return Index(index); }
+
+  /// Returns an Corner_index from an Index
+  Corner_index corner_index(const Index& index) const
+  { return boost::get<Corner_index>(index); }
+
+  /// Insert a bunch of edges into domain
+  ///   + InputIterator type should have begin() and end() function
+  ///   + InputIterator::iterator value type must be Point_3
+  //    + IndicesOutputIterator is an output iterator of value_type equal
+  ///   to Curve_segment_index
+  template <typename InputIterator, typename IndicesOutputIterator>
+  IndicesOutputIterator
+  add_features(InputIterator first, InputIterator last,
+               IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/);
+
+  template <typename InputIterator, typename IndicesOutputIterator>
+  IndicesOutputIterator
+  add_features_with_context(InputIterator first, InputIterator last,
+                            IndicesOutputIterator out /*=
+                                                        CGAL::Emptyset_iterator()*/);
+
+  template <typename IndicesOutputIterator>
+  IndicesOutputIterator
+  get_incidences(Curve_segment_index id, IndicesOutputIterator out) const;
+
+  template <typename IndicesOutputIterator>
+  IndicesOutputIterator
+  get_corner_incidences(Curve_segment_index id, IndicesOutputIterator out) const;
+
+  typedef std::set<Surface_patch_index> Surface_patch_index_set;
+
+  const Surface_patch_index_set&
+  get_incidences(Curve_segment_index id) const;
+
+  void display_corner_incidences(std::ostream& os, Corner_index id);
+
+  template <typename InputIterator>
+  void
+  add_features(InputIterator first, InputIterator last)
+  { add_features(first, last, CGAL::Emptyset_iterator()); }
+
+  /// Insert one edge into domain
+  /// InputIterator value type is Point_3
+  template <typename InputIterator>
+  Curve_segment_index insert_edge(InputIterator first, InputIterator last);
+
+private:
+  void register_corner(const Point_3& p, const Curve_segment_index& index);
+  void compute_corners_incidences();
+
+  /// Returns the sign of the geodesic distance between \c p and \c q
+  /// Precondition: index is not a cycle
+  CGAL::Sign distance_sign(const Point_3& p, const Point_3& q,
+                           const Curve_segment_index& index) const;
+
+  /// Returns Index associated to p (p must be the coordinates of a corner
+  /// point)
+  Index point_corner_index(const Point_3& p) const;
+
+private:
+  typedef std::map<Point_3,Corner_index> Corners;
+
+  typedef internal::Mesh_3::Polyline<Gt> Polyline;
+  typedef std::map<Curve_segment_index, Polyline> Edges;
+  typedef std::map<Curve_segment_index, Surface_patch_index_set > Edges_incidences;
+  typedef std::map<Corner_index, std::set<Curve_segment_index> > Corners_tmp_incidences;
+  typedef std::map<Corner_index, Surface_patch_index_set > Corners_incidences;
+
+  typedef internal::Mesh_3::Mesh_domain_segment_of_curve_primitive<
+    Gt,
+    typename Edges::const_iterator> Curves_primitives;
+
+  typedef CGAL::AABB_traits<Gt,
+                            Curves_primitives> AABB_curves_traits;
+
+  Corners corners_;
+  Corners_tmp_incidences corners_tmp_incidences_;
+  Corner_index current_corner_index_;
+  Corners_incidences corners_incidences_;
+
+  Edges edges_;
+  Curve_segment_index current_curve_index_;
+  Edges_incidences edges_incidences_;
+
+public:
+  typedef CGAL::AABB_tree<AABB_curves_traits> Curves_AABB_tree;
+
+private:
+  mutable Curves_AABB_tree curves_aabb_tree_;
+  mutable bool curves_aabb_tree_is_built;
+
+public:
+  const Curves_AABB_tree& curves_aabb_tree() const {
+    if(!curves_aabb_tree_is_built) build_curves_aabb_tree();
+    return curves_aabb_tree_;
+  }
+
+  void build_curves_aabb_tree() const {
+    std::cerr << "Building curves AABB tree...\n";
+    curves_aabb_tree_.clear();
+    for(typename Edges::const_iterator
+          edges_it = edges_.begin(),
+          edges_end = edges_.end();
+        edges_it != edges_end; ++edges_it)
+    {
+      const Polyline& polyline = edges_it->second;
+      for(typename Polyline::const_iterator
+            pit = polyline.points_.begin(),
+            end = polyline.points_.end() - 1;
+          pit != end; ++pit)
+      {
+        curves_aabb_tree_.insert(std::make_pair(edges_it, pit));
+      }
+    }
+    curves_aabb_tree_.build();
+    curves_aabb_tree_is_built = true;
+  } // end build_curves_aabb_tree()
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Mesh_domain_with_polyline_features_3 Self;
+  Mesh_domain_with_polyline_features_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Mesh_domain_with_polyline_features_3
+
+
+
+template <class MD_>
+template <typename OutputIterator>
+OutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+get_corners(OutputIterator out) const
+{
+  for ( typename Corners::const_iterator
+       cit = corners_.begin(), end = corners_.end() ; cit != end ; ++cit )
+  {
+    *out++ = std::make_pair(cit->second,cit->first);
+  }
+
+  return out;
+}
+
+template <class MD_>
+template <typename OutputIterator>
+OutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+get_curve_segments(OutputIterator out) const
+{
+  for ( typename Edges::const_iterator
+       eit = edges_.begin(), end = edges_.end() ; eit != end ; ++eit )
+  {
+    CGAL_assertion( eit->second.is_valid() );
+
+    const Point_3& p = eit->second.start_point();
+    const Point_3& q = eit->second.end_point();
+
+    Index p_index, q_index;
+    if ( ! eit->second.is_cycle() )
+    {
+      p_index = point_corner_index(p);
+      q_index = point_corner_index(q);
+    }
+    else
+    {
+      p_index = index_from_curve_segment_index(eit->first);
+      q_index = p_index;
+    }
+
+    *out++ = CGAL::cpp11::make_tuple(eit->first,
+                                     std::make_pair(p,p_index),
+                                     std::make_pair(q,q_index));
+  }
+
+  return out;
+}
+
+
+template <class MD_>
+typename Mesh_domain_with_polyline_features_3<MD_>::Index
+Mesh_domain_with_polyline_features_3<MD_>::
+point_corner_index(const Point_3& p) const
+{
+  typename Corners::const_iterator p_index_it = corners_.find(p);
+  if ( p_index_it == corners_.end() )
+  {
+    CGAL_assertion(false);
+    return Index();
+  }
+
+  return p_index_it->second;
+}
+
+
+template <class MD_>
+typename Mesh_domain_with_polyline_features_3<MD_>::FT
+Mesh_domain_with_polyline_features_3<MD_>::
+geodesic_distance(const Point_3& p, const Point_3& q,
+                  const Curve_segment_index& curve_index) const
+{
+  // Get corresponding polyline
+  typename Edges::const_iterator eit = edges_.find(curve_index);
+  CGAL_assertion(eit != edges_.end());
+
+  // Compute geodesic_distance
+  return eit->second.geodesic_distance(p,q);
+}
+
+
+template <class MD_>
+typename Mesh_domain_with_polyline_features_3<MD_>::Point_3
+Mesh_domain_with_polyline_features_3<MD_>::
+construct_point_on_curve_segment(const Point_3& starting_point,
+                                 const Curve_segment_index& curve_index,
+                                 FT distance) const
+{
+  // Get corresponding polyline
+  typename Edges::const_iterator eit = edges_.find(curve_index);
+  CGAL_assertion(eit != edges_.end());
+
+  // Return point at geodesic_distance distance from starting_point
+  return eit->second.point_at(starting_point,distance);
+}
+
+
+
+template <class MD_>
+template <typename InputIterator, typename IndicesOutputIterator>
+IndicesOutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+add_features(InputIterator first, InputIterator last,
+             IndicesOutputIterator indices_out)
+{
+  // Insert one edge for each element
+  while ( first != last )
+  {
+    *indices_out++ = insert_edge(first->begin(), first->end());
+    ++first;
+  }
+  compute_corners_incidences();
+  return indices_out;
+}
+
+template <class MD_>
+template <typename InputIterator, typename IndicesOutputIterator>
+IndicesOutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+add_features_with_context(InputIterator first, InputIterator last,
+                          IndicesOutputIterator indices_out)
+{
+  // Insert one edge for each element
+  for( ; first != last ; ++first )
+  {
+    Curve_segment_index curve_id =
+      insert_edge(first->polyline_content.begin(), first->polyline_content.end());
+    edges_incidences_[curve_id] = first->context.adjacent_patches_ids;
+    *indices_out++ = curve_id;
+  }
+  compute_corners_incidences();
+  return indices_out;
+}
+
+template <class MD_>
+template <typename IndicesOutputIterator>
+IndicesOutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+get_incidences(Curve_segment_index id,
+               IndicesOutputIterator indices_out) const
+{
+  typename Edges_incidences::const_iterator it = edges_incidences_.find(id);
+
+  if(it == edges_incidences_.end()) return indices_out;
+
+  const Surface_patch_index_set& incidences = it->second;
+
+  return std::copy(incidences.begin(), incidences.end(), indices_out);
+}
+
+template <class MD_>
+template <typename IndicesOutputIterator>
+IndicesOutputIterator
+Mesh_domain_with_polyline_features_3<MD_>::
+get_corner_incidences(Corner_index id,
+                      IndicesOutputIterator indices_out) const
+{
+  typename Corners_incidences::const_iterator it = corners_incidences_.find(id);
+  const Surface_patch_index_set& incidences = it->second;
+  return std::copy(incidences.begin(), incidences.end(), indices_out);
+}
+
+namespace internal { namespace Mesh_3 {
+
+template <typename MDwPF_, bool curve_id_is_streamable>
+// here 'curve_id_is_streamable' is true
+template <typename Container2>
+void
+Display_incidences_to_curves_aux<MDwPF_,curve_id_is_streamable>::
+operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
+           const Container2& corners_tmp_incidences_of_id) const
+{
+  os << "Corner #" << id << " is incident to the following curves: {";
+  BOOST_FOREACH(typename MDwPF_::Curve_segment_index curve_index,
+                corners_tmp_incidences_of_id)
+  {
+    os << " " << curve_index;
+  }
+  os << " }\n";
+}
+
+template <class MDwPF_>
+// here 'curve_id_is_streamable' is false
+template <typename Container2>
+void
+Display_incidences_to_curves_aux<MDwPF_,false>::
+operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
+           const Container2& corners_tmp_incidences_of_id) const
+{
+  os << "Corner #" << id << " is incident to "
+     << corners_tmp_incidences_of_id .size()
+     << " curve(s).\n";
+}
+
+template <typename MDwPF_, bool patch_id_is_streamable>
+// here 'patch_id_is_streamable' is true
+template <typename Container>
+void
+Display_incidences_to_patches_aux<MDwPF_,patch_id_is_streamable>::
+operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
+           const Container& corners_incidences_of_id) const
+{
+  os << "Corner #" << id << " is incident to the following patches: {";
+  BOOST_FOREACH(typename MDwPF_::Surface_patch_index i,
+                corners_incidences_of_id)
+  {
+    os << " " << i;
+  }
+  os << " }\n";
+}
+
+template <class MDwPF_>
+// here 'patch_id_is_streamable' is false
+template <typename Container>
+void
+Display_incidences_to_patches_aux<MDwPF_,false>::
+operator()(std::ostream& os, typename MDwPF_::Curve_segment_index id,
+           const Container& corners_incidences_id) const
+{
+  os << "Corner #" << id << " is incident to "
+     << corners_incidences_id.size()
+     << " surface patch(es).\n";
+}
+
+}} // end namespaces internal::Mesh_3:: and internal::
+
+template <class MD_>
+void
+Mesh_domain_with_polyline_features_3<MD_>::
+display_corner_incidences(std::ostream& os, Corner_index id)
+{
+  typedef Mesh_domain_with_polyline_features_3<MD_> Mdwpf;
+  typedef is_streamable<Surface_patch_index> i_s_spi;
+  typedef is_streamable<Curve_segment_index> i_s_csi;
+
+  using namespace internal::Mesh_3;
+  typedef Display_incidences_to_curves_aux<Mdwpf,i_s_csi::value> D_i_t_c;
+  typedef Display_incidences_to_patches_aux<Mdwpf,i_s_spi::value> D_i_t_p;
+  D_i_t_c()(os, id, corners_tmp_incidences_[id]);
+  D_i_t_p()(os, id, corners_incidences_[id]);
+}
+
+template <class MD_>
+void
+Mesh_domain_with_polyline_features_3<MD_>::
+compute_corners_incidences()
+{
+  for(typename Corners::iterator
+        cit = corners_.begin(), end = corners_.end();
+      cit != end; /* the loop variable is incremented in the  body */)
+  {
+    const Corner_index id = cit->second;
+
+    const typename Corners_tmp_incidences::mapped_type&
+      corner_tmp_incidences = corners_tmp_incidences_[id];
+
+    // If the corner is incident to only one curve, and that curve is a
+    // cycle, then remove the corner from the set.
+    if(corner_tmp_incidences.size() == 1 &&
+       is_cycle(Point_3(), *corner_tmp_incidences.begin()))
+    {
+      typename Corners::iterator to_erase = cit;
+      ++cit;
+      corners_.erase(to_erase);
+      continue;
+    }
+
+    Surface_patch_index_set& incidences = corners_incidences_[id];
+    // That should be an empty set.
+
+    BOOST_FOREACH(Curve_segment_index curve_index, corner_tmp_incidences)
+    {
+      get_incidences(curve_index,
+                     std::inserter(incidences,
+                                   incidences.begin()));
+    }
+#ifdef CGAL_MESH_3_PROTECTION_DEBUG
+    display_corner_incidences(std::cerr, id);
+#endif // CGAL_MESH_3_PROTECTION_DEBUG
+
+    // increment the loop variable
+    ++cit;
+  }
+}
+
+template <class MD_>
+const typename Mesh_domain_with_polyline_features_3<MD_>::Surface_patch_index_set&
+Mesh_domain_with_polyline_features_3<MD_>::
+get_incidences(Curve_segment_index id) const
+{
+  typename Edges_incidences::const_iterator it = edges_incidences_.find(id);
+  return it->second;
+}
+
+template <class MD_>
+void
+Mesh_domain_with_polyline_features_3<MD_>::
+register_corner(const Point_3& p, const Curve_segment_index& curve_index)
+{
+
+  typename Corners::iterator cit = corners_.lower_bound(p);
+
+  // If the corner already exists, returns...
+  if(cit != corners_.end() && !(corners_.key_comp()(p, cit->first))) {
+    corners_tmp_incidences_[cit->second].insert(curve_index);
+    return;
+  }
+
+  // ...else insert it!
+
+  const Corner_index index = current_corner_index_;
+  ++current_corner_index_;
+
+  corners_.insert(cit, std::make_pair(p, index));
+  corners_tmp_incidences_[index].insert(curve_index);
+}
+
+template <class MD_>
+template <typename InputIterator>
+typename Mesh_domain_with_polyline_features_3<MD_>::Curve_segment_index
+Mesh_domain_with_polyline_features_3<MD_>::
+insert_edge(InputIterator first, InputIterator last)
+{
+  CGAL_assertion(std::distance(first,last) > 1);
+
+  const Curve_segment_index curve_index = current_curve_index_++;
+
+  // Fill corners
+  //
+  // For a cycle, the "first" point of the cycle is registered as a
+  // corner. If at the end, during the call to
+  // 'compute_corners_incidences()', that corner is incident only to a
+  // cycle, then it will be removed from the set of corners.
+  register_corner(*first, curve_index);
+  if ( *first != *boost::prior(last) )
+  {
+    register_corner(*boost::prior(last), curve_index);
+  }
+
+  // Create a new polyline
+  std::pair<typename Edges::iterator,bool> insertion =
+    edges_.insert(std::make_pair(curve_index,Polyline()));
+
+  // Fill polyline with data
+  while ( first != last )
+  {
+    insertion.first->second.add_point(*first++);
+  }
+  return curve_index;
+}
+
+
+template <class MD_>
+CGAL::Sign
+Mesh_domain_with_polyline_features_3<MD_>::
+distance_sign(const Point_3& p, const Point_3& q,
+              const Curve_segment_index& index) const
+{
+  typename Edges::const_iterator eit = edges_.find(index);
+  CGAL_assertion(eit != edges_.end());
+  CGAL_precondition( ! eit->second.is_cycle() );
+
+  if ( p == q )
+    return CGAL::ZERO;
+  else if ( eit->second.are_ordered_along(p,q) )
+    return CGAL::POSITIVE;
+  else
+    return CGAL::NEGATIVE;
+}
+
+template <class MD_>
+CGAL::Sign
+Mesh_domain_with_polyline_features_3<MD_>::
+distance_sign_along_cycle(const Point_3& p,
+                          const Point_3& q,
+                          const Point_3& r,
+                          const Curve_segment_index& index) const
+{
+  // Find edge
+  typename Edges::const_iterator eit = edges_.find(index);
+  CGAL_assertion(eit != edges_.end());
+
+  // If eit is not a cycle, then the orientation corresponds to the sign
+  // of the distance
+  if ( ! eit->second.is_cycle() )
+  {
+    return distance_sign(p,r,index);
+  }
+
+  // If p and r are the same point, it correspond to a complete loop on a cycle
+  if ( p == r ) { return CGAL::POSITIVE; }
+
+  // We are on a cycle without any clue (p==q). Return the shortest path as
+  // orientation.
+  if ( p == q )
+  {
+    FT pr = eit->second.geodesic_distance(p,r);
+    FT rp = eit->second.geodesic_distance(r,p);
+    if ( pr < rp ) { return CGAL::POSITIVE; }
+    else { return CGAL::NEGATIVE; }
+  }
+
+  // If pq or pr is negative, edge is not a cycle, thus geodesic_distance
+  // gives the answer.
+  FT pq = eit->second.geodesic_distance(p,q);
+  FT pr = eit->second.geodesic_distance(p,r);
+  CGAL_assertion(pq > FT(0));
+  CGAL_assertion(pr > FT(0));
+
+  // Compare pq and pr
+  if ( pq <= pr ) { return CGAL::POSITIVE; }
+  else { return CGAL::NEGATIVE; }
+}
+
+template <class MD_>
+bool
+Mesh_domain_with_polyline_features_3<MD_>::
+is_cycle(const Point_3&, const Curve_segment_index& index) const
+{
+  // Find edge
+  typename Edges::const_iterator eit = edges_.find(index);
+  CGAL_assertion(eit != edges_.end());
+
+  return eit->second.is_cycle();
+}
+
+
+} //namespace CGAL
+
+
+#endif // CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_edge_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_edge_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_edge_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_edge_criteria_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_criteria_3.h
new file mode 100644
index 0000000..7f8d211
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_criteria_3.h
@@ -0,0 +1,182 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+// Mesh_facet_criteria_3 class.
+//******************************************************************************
+
+#ifndef CGAL_MESH_FACET_CRITERIA_3_H
+#define CGAL_MESH_FACET_CRITERIA_3_H
+
+#include <CGAL/Mesh_3/mesh_standard_facet_criteria.h>
+#include <CGAL/Mesh_facet_topology.h>
+
+namespace CGAL {
+  
+template<typename Tr,
+         typename Visitor_ = Mesh_3::Facet_criterion_visitor_with_features<Tr> >
+class Mesh_facet_criteria_3
+{
+public:
+  typedef Visitor_ Visitor;
+  typedef typename Visitor::Facet_quality Facet_quality;
+  typedef typename Visitor::Facet_badness Facet_badness;
+  
+private:
+  typedef Mesh_3::Criteria<Tr,Visitor> Criteria;
+  typedef Mesh_3::Abstract_criterion<Tr,Visitor> Abstract_criterion;
+
+  typedef typename Tr::Facet Facet;
+  typedef typename Tr::Geom_traits::FT FT;
+
+  typedef Mesh_facet_criteria_3<Tr> Self;
+
+public:
+  typedef CGAL::Tag_true Has_manifold_criterion;
+
+  /**
+   * @brief Constructor
+   */
+  Mesh_facet_criteria_3(const FT& angle_bound,
+                        const FT& radius_bound,
+                        const FT& distance_bound,
+                        const Mesh_facet_topology topology =
+                          FACET_VERTICES_ON_SURFACE)
+  {
+    if ( FT(0) != angle_bound )
+      init_aspect(angle_bound);
+    
+    if ( FT(0) != radius_bound )
+      init_radius(radius_bound);
+    
+    if ( FT(0) != distance_bound )
+      init_distance(distance_bound);
+    
+    init_topo(topology);
+  }
+
+  // Nb: SFINAE (dummy) to avoid wrong matches with built-in numerical types
+  // as int.
+  template < typename Sizing_field >
+  Mesh_facet_criteria_3(const FT& angle_bound,
+                        const Sizing_field& radius_bound,
+                        const FT& distance_bound,
+                        const Mesh_facet_topology topology = 
+                          FACET_VERTICES_ON_SURFACE,
+                        typename Sizing_field::FT /*dummy*/ = 0)
+  {
+    if ( FT(0) != angle_bound )
+      init_aspect(angle_bound);
+    
+    init_radius(radius_bound);
+    
+    if ( FT(0) != distance_bound )
+      init_distance(distance_bound);
+    
+    init_topo(topology);  
+  }
+  
+  /// Destructor
+  ~Mesh_facet_criteria_3() { }
+
+   /**
+   * @brief returns the badness of facet \c facet
+   * @param facet the facet
+   * @return the badness of \c facet
+   */
+  Facet_badness operator()(const Facet& facet) const
+  {
+    return criteria_(facet);
+  }
+  
+  void add(Abstract_criterion* criterion)
+  {
+    criteria_.add(criterion);
+  }
+
+  Mesh_facet_topology topology() const {
+    return topology_;
+  }
+
+private:
+  void init_aspect(const FT& angle_bound)
+  {
+    typedef Mesh_3::Aspect_ratio_criterion<Tr,Visitor> Aspect_criterion;
+    criteria_.add(new Aspect_criterion(angle_bound));
+  }
+  
+  void init_radius(const FT& radius_bound)
+  {
+    typedef Mesh_3::Uniform_size_criterion<Tr,Visitor> Uniform_size_criterion;
+    criteria_.add(new Uniform_size_criterion(radius_bound));
+  }
+  
+  template <typename Sizing_field>
+  void init_radius(const Sizing_field& radius_bound)
+  {
+    typedef Mesh_3::Variable_size_criterion<Tr,Visitor,Sizing_field> Variable_size_criterion;
+    criteria_.add(new Variable_size_criterion(radius_bound));
+  }
+  
+  void init_distance(const FT& distance_bound)
+  {
+    typedef Mesh_3::Curvature_size_criterion<Tr,Visitor> Curvature_criterion;
+    criteria_.add(new Curvature_criterion(distance_bound));
+  }
+  
+  void init_topo(const Mesh_facet_topology topology)
+  {
+    topology_ = topology;
+    switch ( topology % MANIFOLD )
+    {
+      case FACET_VERTICES_ON_SURFACE:
+      {
+        typedef Mesh_3::Facet_on_surface_criterion<Tr,Visitor> On_surface_criterion;
+        criteria_.add(new On_surface_criterion());
+        break;
+      }
+        
+      case FACET_VERTICES_ON_SAME_SURFACE_PATCH:
+      {
+        typedef Mesh_3::Facet_on_same_surface_criterion<Tr,Visitor> Same_surface_criterion;
+        criteria_.add(new Same_surface_criterion());
+        break;
+      }
+      
+      case FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK:
+      {
+        // @TODO: Implement adjacency check !
+        typedef Mesh_3::Facet_on_same_surface_criterion<Tr,Visitor> Same_surface_criterion;
+        criteria_.add(new Same_surface_criterion());
+        break;
+      }
+    }
+  }
+  
+private:
+  Criteria criteria_;
+  Mesh_facet_topology topology_;
+};  // end class Mesh_facet_criteria_3
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_MESH_FACET_CRITERIA_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_topology.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_topology.h
new file mode 100644
index 0000000..5571803
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_facet_topology.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : 
+//******************************************************************************
+
+#ifndef CGAL_MESH_FACET_TOPOLOGY_H
+#define CGAL_MESH_FACET_TOPOLOGY_H
+
+namespace CGAL {
+
+enum Mesh_facet_topology {
+  FACET_VERTICES_ON_SURFACE = 1,
+  FACET_VERTICES_ON_SAME_SURFACE_PATCH = 2,
+  FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK = 3,
+  MANIFOLD_WITH_BOUNDARY = 8,
+  NO_BOUNDARY = 16,
+  MANIFOLD = 24
+};
+  
+} // end namespace CGAL
+
+#endif // CGAL_MESH_FACET_TOPOLOGY_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_optimization_return_code.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_optimization_return_code.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_optimization_return_code.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_optimization_return_code.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesh_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesh_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesh_triangulation_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mesh_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Mesh_vertex_base_3.h
new file mode 100644
index 0000000..4eb8f66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mesh_vertex_base_3.h
@@ -0,0 +1,310 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// Copyright (c) 2011 GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/Mesh_vertex_base_3.h $
+// $Id: Mesh_vertex_base_3.h 69674 2012-06-18 09:34:06Z jtournoi $
+//
+//
+// Author(s)     : Stéphane Tayeb, Andreas Fabri
+//
+//******************************************************************************
+// File Description :
+//
+//
+//******************************************************************************
+
+
+#ifndef CGAL_COMPACT_MESH_VERTEX_BASE_3_H
+#define CGAL_COMPACT_MESH_VERTEX_BASE_3_H
+
+#include <CGAL/Triangulation_vertex_base_3.h>
+#include <CGAL/internal/Mesh_3/get_index.h>
+#include <CGAL/Mesh_3/io_signature.h>
+#include <CGAL/Has_timestamp.h>
+#include <CGAL/tags.h>
+
+namespace CGAL {
+  
+// Without erase counter
+template <typename Concurrency_tag>
+class Mesh_vertex_base_3_base
+{
+#if defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) \
+ || defined(CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE)
+
+public:
+  // Erase counter (cf. Compact_container)
+  unsigned int erase_counter() const
+  {
+    return this->m_erase_counter;
+  }
+  void set_erase_counter(unsigned int c)
+  {
+    this->m_erase_counter = c;
+  }
+  void increment_erase_counter()
+  {
+    ++this->m_erase_counter;
+  }
+  
+protected:
+  typedef unsigned int              Erase_counter_type;
+  Erase_counter_type                m_erase_counter;
+#endif
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Specialized version (parallel)
+template <>
+class Mesh_vertex_base_3_base<Parallel_tag>
+{
+public:
+  
+  // Erase counter (cf. Compact_container)
+  unsigned int erase_counter() const
+  {
+    return this->m_erase_counter;
+  }
+  void set_erase_counter(unsigned int c)
+  {
+    this->m_erase_counter = c;
+  }
+  void increment_erase_counter()
+  {
+    ++this->m_erase_counter;
+  }
+  
+protected:
+  typedef tbb::atomic<unsigned int> Erase_counter_type;
+  Erase_counter_type                m_erase_counter;
+
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+// Class Mesh_vertex_base_3
+// Vertex base class used in 3D meshing process.
+// Adds information to Vb about the localization of the vertex in regards
+// to the 3D input complex.
+template<class GT,
+         class MD,
+         class Vb = Triangulation_vertex_base_3<GT> >
+class Mesh_vertex_base_3
+: public Vb,
+  public Mesh_vertex_base_3_base<
+    typename Vb::Triangulation_data_structure::Concurrency_tag>
+{
+public:
+  typedef Vb Cmvb3_base;
+  typedef typename Vb::Vertex_handle  Vertex_handle;
+
+  // To get correct vertex type in TDS
+  template < class TDS3 >
+  struct Rebind_TDS {
+    typedef typename Vb::template Rebind_TDS<TDS3>::Other Vb3;
+    typedef Mesh_vertex_base_3 <GT, MD, Vb3> Other;
+  };
+
+  // Types
+  typedef typename MD::Index                      Index;
+  typedef typename GT::FT                         FT;
+
+  // Constructor
+  Mesh_vertex_base_3()
+    : Vb()
+    , number_of_incident_facets_(0)
+    , number_of_components_(0)
+    , index_()
+    , meshing_info_(0)
+    , dimension_(-1)
+    , cache_validity(false)
+#ifdef CGAL_INTRUSIVE_LIST
+    , next_intrusive_()
+    , previous_intrusive_()
+#endif //CGAL_INTRUSIVE_LIST
+    , time_stamp_(-1)
+  {}
+
+  // Default copy constructor and assignment operator are ok
+
+  // Returns the dimension of the lowest dimensional face of the input 3D
+  // complex that contains the vertex
+  int in_dimension() const {
+    if(dimension_ < -1) return -2-dimension_;
+    else return dimension_; 
+  }
+
+  // Sets the dimension of the lowest dimensional face of the input 3D complex
+  // that contains the vertex
+  void set_dimension(const int dimension) { dimension_ = dimension; }
+
+  // Tells if the vertex is marked as a special protecting ball
+  bool is_special() const { return dimension_ < -1; }
+
+  // Marks or unmarks the vertex as a special protecting ball
+  void set_special(bool special = true) {
+    if(special != (dimension_ < -1) )
+      dimension_ = -2-dimension_;
+  }
+
+  // Returns the index of the lowest dimensional face of the input 3D complex
+  // that contains the vertex
+  Index index() const { return index_; }
+
+  // Sets the index of the lowest dimensional face of the input 3D complex
+  // that contains the vertex
+  void set_index(const Index& index) { index_ = index; }
+
+  // Accessors to meshing_info private data
+  const FT& meshing_info() const { return meshing_info_; }
+  void set_meshing_info(const FT& value) { meshing_info_ = value; }
+
+#ifdef CGAL_INTRUSIVE_LIST
+  Vertex_handle next_intrusive() const { return next_intrusive_; }
+  void set_next_intrusive(Vertex_handle v)
+  { 
+    next_intrusive_ = v;
+  }
+
+  Vertex_handle previous_intrusive() const { return previous_intrusive_; }
+  void set_previous_intrusive(Vertex_handle v)
+  {
+    previous_intrusive_ = v; 
+  }
+#endif
+
+  /// For the determinism of Compact_container iterators
+  ///@{
+  typedef Tag_true Has_timestamp;
+
+  std::size_t time_stamp() const {
+    return time_stamp_;
+  }
+  void set_time_stamp(const std::size_t& ts) {
+    time_stamp_ = ts;
+  }
+  ///@}
+
+  bool is_c2t3_cache_valid() const {
+    return cache_validity;
+  }
+
+  void invalidate_c2t3_cache()
+  {
+    cache_validity = false;
+  }
+
+  void set_c2t3_cache(const std::size_t i, const std::size_t j)
+  {
+    number_of_incident_facets_ = i;
+    number_of_components_ = j;
+    cache_validity = true;
+  }
+
+  std::size_t cached_number_of_incident_facets() const
+  {
+    return number_of_incident_facets_;
+  }
+    
+  std::size_t cached_number_of_components() const
+  {
+    return number_of_components_;
+  }
+
+  static
+  std::string io_signature()
+  {
+    return 
+      Get_io_signature<Vb>()() + "+" +
+      Get_io_signature<int>()() + "+" +
+      Get_io_signature<Index>()();
+  }
+private:
+
+  std::size_t number_of_incident_facets_;
+  std::size_t number_of_components_; // number of components in the adjacency
+  // graph of incident facets (in complex)
+
+
+  // Index of the lowest dimensional face of the input 3D complex
+  // that contains me
+  Index index_;
+  // Stores info needed by optimizers
+  FT meshing_info_;
+
+  // Dimension of the lowest dimensional face of the input 3D complex
+  // that contains me. Negative values are a marker for special vertices.
+  short dimension_;
+  bool cache_validity;
+#ifdef CGAL_INTRUSIVE_LIST
+  Vertex_handle next_intrusive_;
+  Vertex_handle previous_intrusive_;
+#endif
+  std::size_t time_stamp_;
+
+};  // end class Mesh_vertex_base_3
+
+template<class GT,
+         class MD,
+         class Vb>
+inline
+std::istream&
+operator>>(std::istream &is, Mesh_vertex_base_3<GT,MD,Vb>& v)
+{
+  typedef Mesh_vertex_base_3<GT,MD,Vb> Vertex;
+  typedef typename Vertex::Cmvb3_base Cmvb3_base;
+  is >> static_cast<Cmvb3_base&>(v);
+  int dimension;
+  if(is_ascii(is)) {
+    is >> dimension;
+
+  } else {
+    CGAL::read(is, dimension);
+  }
+  v.set_dimension(dimension);
+  CGAL_assertion(v.in_dimension() >= -1);
+  CGAL_assertion(v.in_dimension() < 4);
+  typename Vertex::Index index =
+    internal::Mesh_3::Read_mesh_domain_index<MD>()(v.in_dimension(), is);
+  v.set_index(index);
+  return is;
+}
+
+template<class GT,
+         class MD,
+         class Vb>
+inline
+std::ostream&
+operator<<(std::ostream &os, const Mesh_vertex_base_3<GT,MD,Vb>& v)
+{
+  typedef Mesh_vertex_base_3<GT,MD,Vb> Vertex;
+  typedef typename Vertex::Cmvb3_base Cmvb3_base;
+  os << static_cast<const Cmvb3_base&>(v);
+  if(is_ascii(os)) {
+    os << " " << v.in_dimension()
+       << " ";
+  } else {
+    CGAL::write(os, v.in_dimension());
+  }
+  internal::Mesh_3::Write_mesh_domain_index<MD>()(os, 
+                                                  v.in_dimension(),
+                                                  v.index());
+  return os;
+}
+
+}  // end namespace CGAL
+
+
+
+#endif // CGAL_COMPACT_MESH_VERTEX_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesher_level.h b/3rdparty/CGAL-4.8/include/CGAL/Mesher_level.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesher_level.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesher_level.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesher_level_default_implementations.h b/3rdparty/CGAL-4.8/include/CGAL/Mesher_level_default_implementations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesher_level_default_implementations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesher_level_default_implementations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Mesher_level_visitors.h b/3rdparty/CGAL-4.8/include/CGAL/Mesher_level_visitors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Mesher_level_visitors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Mesher_level_visitors.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Meshes/Double_map_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Double_map_container.h
new file mode 100644
index 0000000..fa8ac11
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Double_map_container.h
@@ -0,0 +1,95 @@
+// Copyright (c) 2004-2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
+#define CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
+
+#include <set>
+#include <iostream>
+#include <CGAL/Double_map.h>
+
+// backward compatibility
+#ifdef CGAL_MESH_3_DEBUG_DOUBLE_MAP
+#  define CGAL_MESHES_DEBUG_DOUBLE_MAP CGAL_MESH_3_DEBUG_DOUBLE_MAP
+#endif
+
+namespace CGAL {
+
+  namespace Meshes {
+
+    template <typename Elt, class Quality>
+    class Double_map_container 
+    {
+    public:
+      typedef Elt Element;
+
+    protected:
+      // --- protected datas ---
+      Double_map<Element, Quality> m;
+
+    public:
+      bool no_longer_element_to_refine_impl() const
+      {
+        return m.empty();
+      }
+
+      Element get_next_element_impl()
+      {
+        CGAL_assertion(!m.empty());
+#if CGAL_MESHES_DEBUG_DOUBLE_MAP
+	std::cerr << "get_next_element_impl(" << &*(m.front()->second)
+		  << ")\n";
+#endif
+        return m.front()->second;
+
+      }
+
+      void add_bad_element(const Element& e, const Quality& q)
+      {
+#if CGAL_MESHES_DEBUG_DOUBLE_MAP
+	std::cerr << "add_bad_element(" << &*e << ")\n";
+#endif
+        m.insert(e, q);
+      }
+
+      void pop_next_element_impl()
+      {
+        m.pop_front();
+      }
+
+      void remove_element(const Element& e)
+      {
+#if CGAL_MESHES_DEBUG_DOUBLE_MAP
+	std::cerr << "remove_element(" << &*e << ")\n";
+#endif
+        m.erase(e);
+      }
+
+      typename Double_map<Element, Quality>::size_type
+      size() const
+      {
+	return m.size();
+      }
+    }; // end Double_map_container
+    
+  } // end namespace Meshes
+} // end namespace CGAL
+
+#endif // CGAL_MESHES_DOUBLE_MAP_CONTAINER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_deque_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_deque_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_deque_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_deque_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_multimap_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_multimap_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_multimap_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_multimap_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_queue_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_queue_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Filtered_queue_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Filtered_queue_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_map_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_map_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_map_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_map_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_queue_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_queue_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_queue_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_queue_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_set_container.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_set_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Simple_set_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Simple_set_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Min_annulus_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_annulus_d.h
new file mode 100644
index 0000000..79d1240
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Min_annulus_d.h
@@ -0,0 +1,874 @@
+// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>
+
+#ifndef CGAL_MIN_ANNULUS_D_H
+#define CGAL_MIN_ANNULUS_D_H
+
+// includes
+// --------
+#include <CGAL/Optimisation/basic.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/QP_options.h>
+#include <CGAL/QP_solver/QP_solver.h>
+#include <CGAL/QP_solver/functors.h>
+#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
+#include <CGAL/QP_solver/QP_full_exact_pricing.h>
+#include <CGAL/boost/iterator/counting_iterator.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/functional.hpp>
+
+// here is how it works. We have d+2 variables: 
+// R (big radius), r (small radius), c (center). The problem is
+//
+// min R^2 - r^2 
+// s.t. ||p - c||^2 >= r^2   for all p
+//      ||p - c||^2 <= R^2   for all p
+//
+// This looks nonlinear, but we can in fact make the substitutions
+// u = R^2 - c^Tc, v = r^2 - c^Tc and get the following equivalent
+// linear program:
+//
+// min u - v
+// s.t. p^Tp - 2p^Tc >= v  for all p
+//      p^Tp - 2p^Tc <= u  for all p
+// 
+// or 
+//
+// max  v - u
+// s.t. v     + 2p_1c_1 + 2p_2c_2 + ...  + 2p_dc_d <=  p^Tp for all p
+//        - u - 2p_1c_1 - 2p_2c_2 - ...  - 2p_dc_d <= -p^Tp for all p
+//
+// When we introduce a dual variable x_p for every constraint in the first
+// set and a dual variable y_p for every constraint in the second set,
+// we obtain the following dual program:
+//
+// min \sum_p x_p p^Tp -  \sum_p y_p p^Tp
+// s.t.
+//    2\sum_p x_p p    - 2\sum_p y_p p     =  0
+//     \sum_p x_p                          =  1  (constraint for v)
+//                     -  \sum_p y_p       = -1  (constraint for u)
+//                                               x_p >= 0  for all p        
+//                                               y_p >= 0  for all p 
+//
+// in the following functors, the ordering of the constraints is as above; 
+// the indices of the variables are: x_p_j <-> 2 * j, y_p_j <-> 2 * j + 1 
+// we also make the substitutions x'_p = x_p / h_p^2, y'_p = y_p / h_p^2
+// where h_p is the homogenizing coordinate of p, in order to allow
+// homogeneous points. This, however, means that the computed annulus is
+// not necessarily correct. If P is a set of homogeneous points, 
+//     P = { (p_0,...,p_{d-1}, h_p) }, 
+// then we always get a *feasible* annulus for the point set 
+//     P' = { (p_0*h_p,...,p_{d-1}*h_p, h_p*h_p) }. 
+// If the type NT is inexact, this annulus might not even be optimal, since
+// the objective function involves terms p^Tp that might not be exactly
+// computed -> document all this!!!
+
+namespace CGAL {
+
+namespace MA_detail {
+
+  // functor for a fixed column of A
+  template <class NT, class Iterator>
+  class A_column : public std::unary_function <int, NT>
+  {
+  public:
+    typedef NT result_type;
+    A_column()
+    {}
+  
+    A_column (int j, int d, Iterator it)
+      : j_ (j), d_ (d), it_ (it), h_p (*(it+d)), nt_0_ (0), nt_2_ (2)
+    {}
+
+    result_type operator() (int i) const
+    {
+      if (j_ % 2 == 0) {
+	// column for x_p
+	if (i < d_) return  *(it_ + i) * h_p * nt_2_;  
+	if (i == d_) return h_p * h_p;  
+	return nt_0_;
+      } else {
+	// column for y_p
+	if (i < d_) return  -(*(it_ + i)) * h_p * nt_2_;
+	if (i == d_+1) return -h_p * h_p;
+	return nt_0_;
+      }
+    }
+    
+  private:
+    int j_;                  // column number
+    int d_;                  // dimension
+    Iterator it_;            // the iterator through the column's point
+    NT h_p;                  // the homogenizing coordinate of p
+    NT nt_0_;
+    NT nt_2_; 
+  };
+  
+  // functor for matrix A
+  template <class NT, class Access_coordinate_begin_d,
+	    class Point_iterator >
+  class A_matrix : public std::unary_function
+  <int, boost::transform_iterator <A_column
+    <NT, typename Access_coordinate_begin_d::Coordinate_iterator>, 
+				   boost::counting_iterator<int> > >
+  { 
+    typedef typename MA_detail::A_column
+    <NT, typename Access_coordinate_begin_d::Coordinate_iterator> A_column;
+  public:
+    typedef boost::transform_iterator
+    <A_column, boost::counting_iterator<int> > result_type;
+    
+    A_matrix ()
+    {}
+
+    A_matrix (int d, 
+	      const Access_coordinate_begin_d& da_coord,
+	      Point_iterator P) 
+      : d_ (d), da_coord_ (da_coord), P_ (P)
+    {}
+
+    result_type operator () (int j) const
+    { 
+      return result_type
+	(0, A_column (j, d_, da_coord_ (*(P_+j/2)))); 
+    }
+
+  private:
+    int d_;                  // dimension
+    Access_coordinate_begin_d da_coord_; // data accessor
+    Point_iterator P_;       // point set P
+  };
+
+  // The functor necessary to realize access to b
+  template <class NT>
+  class B_vector : public std::unary_function<int, NT>
+  {
+  public:
+    typedef NT result_type;
+    B_vector()
+    {}
+
+    B_vector (int d)
+      : d_ (d), nt_0_ (0), nt_1_ (1)
+    {}
+
+    result_type operator() (int i) const
+    {
+      if (i == d_) return nt_1_;
+      if (i == d_+1) return -nt_1_;
+      return nt_0_;
+    }
+
+  private:
+    int d_;
+    NT nt_0_;
+    NT nt_1_;
+  };
+
+}
+
+// Class interfaces
+// ================
+template < class Traits_ >
+class Min_annulus_d {
+public:
+  // self
+  typedef  Traits_                    Traits;
+  typedef  Min_annulus_d<Traits>      Self;
+
+  // types from the traits class
+  typedef  typename Traits::Point_d   Point;
+
+  typedef  typename Traits::Rep_tag   Rep_tag;
+
+  typedef  typename Traits::RT        RT;
+  typedef  typename Traits::FT        FT;
+
+  typedef  typename Traits::Access_dimension_d
+  Access_dimension_d;
+  typedef  typename Traits::Access_coordinates_begin_d
+  Access_coordinates_begin_d;
+
+  typedef  typename Traits::Construct_point_d
+  Construct_point_d;
+
+  typedef  typename Traits::ET        ET;
+  typedef  typename Traits::NT        NT;
+
+  // public types 
+  typedef  std::vector<Point>         Point_vector;
+  typedef  typename Point_vector::const_iterator
+  Point_iterator;
+
+private:  
+  // QP solver iterator types
+  typedef MA_detail::A_matrix <NT, Access_coordinates_begin_d,
+			       Point_iterator> A_matrix;
+  typedef boost::transform_iterator
+  <A_matrix,  
+   boost::counting_iterator<int> >   A_iterator;
+
+  typedef MA_detail::B_vector <NT> B_vector;
+  typedef  boost::transform_iterator
+  <B_vector,
+    boost::counting_iterator<int> >  B_iterator;
+
+  typedef CGAL::Const_oneset_iterator<CGAL::Comparison_result> R_iterator;  
+ 
+  typedef  std::vector<NT>                                     C_vector; 
+  typedef  typename C_vector::const_iterator                   C_iterator; 
+
+  // Program type
+  typedef CGAL::Nonnegative_linear_program_from_iterators
+  <A_iterator, B_iterator, R_iterator, C_iterator> LP;
+
+  // Tags
+  typedef QP_solver_impl::QP_tags <Tag_true, Tag_true> QP_tags;
+
+  // Solver types
+  typedef  CGAL::QP_solver <LP, ET, QP_tags > Solver;
+
+  typedef  typename Solver::Pricing_strategy Pricing_strategy;
+
+  // types from the QP solver
+  typedef  typename Solver::Basic_variable_index_iterator
+  Basic_variable_index_iterator;
+    
+  // private types
+  typedef  std::vector<ET>            ET_vector;
+    
+  typedef  QP_access_by_index
+  <typename std::vector<Point>::const_iterator, int> Point_by_index;
+    
+  typedef  boost::binder2nd< std::divides<int> >
+  Divide;
+    
+  typedef  std::vector<int>           Index_vector;
+    
+  typedef  std::vector<NT>            NT_vector;
+  typedef  std::vector<NT_vector>     NT_matrix;
+    
+
+public:
+  // public types
+    
+  typedef  CGAL::Join_input_iterator_1<
+    Basic_variable_index_iterator,
+    CGAL::Unary_compose_1<Point_by_index,Divide> >
+  Support_point_iterator;
+    
+    
+  typedef  typename Index_vector::const_iterator IVCI;
+  typedef  CGAL::Join_input_iterator_1<
+    IVCI, Point_by_index >
+  Inner_support_point_iterator;
+  typedef  CGAL::Join_input_iterator_1<
+    IVCI, Point_by_index >
+  Outer_support_point_iterator;
+
+  typedef IVCI Inner_support_point_index_iterator;
+  typedef IVCI Outer_support_point_index_iterator;
+    
+  typedef  typename ET_vector::const_iterator
+  Coordinate_iterator;
+    
+
+  // creation
+  Min_annulus_d( const Traits&  traits  = Traits())
+    : tco( traits), da_coord(tco.access_coordinates_begin_d_object()),
+      d( -1), solver(0){}
+    
+  template < class InputIterator >
+  Min_annulus_d( InputIterator  first,
+		 InputIterator  last,
+		 const Traits&  traits = Traits())
+    : tco( traits), da_coord(tco.access_coordinates_begin_d_object()), 
+      solver(0) {
+    set( first, last);
+  }
+
+  ~Min_annulus_d() {
+    if (solver)
+      delete solver;
+  }
+    
+  // access to point set
+  int  ambient_dimension( ) const { return d; }
+    
+  int  number_of_points( ) const { return static_cast<int>(points.size()); }
+    
+  Point_iterator  points_begin( ) const { return points.begin(); }
+  Point_iterator  points_end  ( ) const { return points.end  (); }
+    
+  // access to support points
+  int
+  number_of_support_points( ) const
+  { return number_of_points() < 2 ?
+      number_of_points() :
+    solver->number_of_basic_variables(); }
+    
+  Support_point_iterator
+  support_points_begin() const {
+    CGAL_optimisation_assertion_msg(number_of_points() >= 2,
+				    "support_points_begin: not enough points");
+    return Support_point_iterator(
+				  solver->basic_original_variable_indices_begin(),
+				  CGAL::compose1_1(
+						   Point_by_index( points.begin()),
+						   boost::bind2nd( std::divides<int>(), 2)));
+  }
+    
+  Support_point_iterator
+  support_points_end() const {
+    CGAL_optimisation_assertion_msg(number_of_points() >= 2,
+				    "support_points_begin: not enough points");
+    return Support_point_iterator(
+				  solver->basic_original_variable_indices_end(),
+				  CGAL::compose1_1(
+						   Point_by_index( points.begin()),
+						   boost::bind2nd( std::divides<int>(), 2)));
+  }
+    
+  int  number_of_inner_support_points() const { return static_cast<int>(inner_indices.size());}
+  int  number_of_outer_support_points() const { return static_cast<int>(outer_indices.size());}
+    
+  Inner_support_point_iterator
+  inner_support_points_begin() const
+  { return Inner_support_point_iterator(
+					inner_indices.begin(),
+					Point_by_index( points.begin())); }
+    
+  Inner_support_point_iterator
+  inner_support_points_end() const
+  { return Inner_support_point_iterator(
+					inner_indices.end(),
+					Point_by_index( points.begin())); }
+    
+  Outer_support_point_iterator
+  outer_support_points_begin() const
+  { return Outer_support_point_iterator(
+					outer_indices.begin(),
+					Point_by_index( points.begin())); }
+    
+  Outer_support_point_iterator
+  outer_support_points_end() const
+  { return Outer_support_point_iterator(
+					outer_indices.end(),
+					Point_by_index( points.begin())); }
+
+  Inner_support_point_index_iterator
+  inner_support_points_indices_begin() const
+  { return inner_indices.begin(); }
+    
+  Inner_support_point_index_iterator
+  inner_support_points_indices_end() const
+  { return inner_indices.end(); }
+
+  Outer_support_point_index_iterator
+  outer_support_points_indices_begin() const
+  { return outer_indices.begin(); }
+
+  Outer_support_point_index_iterator
+  outer_support_points_indices_end() const
+  { return outer_indices.end(); }
+
+
+  // access to center (rational representation)
+  Coordinate_iterator
+  center_coordinates_begin( ) const { return center_coords.begin(); }
+    
+  Coordinate_iterator
+  center_coordinates_end  ( ) const { return center_coords.end  (); }
+    
+  // access to squared radii (rational representation)
+  ET  squared_inner_radius_numerator( ) const { return sqr_i_rad_numer; }
+  ET  squared_outer_radius_numerator( ) const { return sqr_o_rad_numer; }
+  ET  squared_radii_denominator     ( ) const { return sqr_rad_denom; }
+    
+  // access to center and squared radii
+  // NOTE: an implicit conversion from ET to RT must be available!
+  Point
+  center( ) const
+  { CGAL_optimisation_precondition( ! is_empty());
+  return tco.construct_point_d_object()( ambient_dimension(),
+					 center_coordinates_begin(),
+					 center_coordinates_end()); }
+    
+  FT
+  squared_inner_radius( ) const
+  { CGAL_optimisation_precondition( ! is_empty());
+  return FT( squared_inner_radius_numerator()) /
+    FT( squared_radii_denominator()); }
+    
+  FT
+  squared_outer_radius( ) const
+  { CGAL_optimisation_precondition( ! is_empty());
+  return FT( squared_outer_radius_numerator()) /
+    FT( squared_radii_denominator()); }
+    
+  // predicates
+  CGAL::Bounded_side
+  bounded_side( const Point& p) const
+  { CGAL_optimisation_precondition(
+				   is_empty() || tco.access_dimension_d_object()( p) == d);
+  ET sqr_d = sqr_dist( p);
+  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
+  return CGAL::Bounded_side
+    (CGAL_NTS sign( sqr_d - h_p_sqr * sqr_i_rad_numer)
+     * CGAL_NTS sign( h_p_sqr * sqr_o_rad_numer - sqr_d)); }
+    
+  bool
+  has_on_bounded_side( const Point& p) const
+  { CGAL_optimisation_precondition(
+				   is_empty() || tco.access_dimension_d_object()( p) == d);
+  ET sqr_d = sqr_dist( p);
+  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
+  return ( ( h_p_sqr * sqr_i_rad_numer < sqr_d) && 
+	   ( sqr_d < h_p_sqr * sqr_o_rad_numer)); }
+    
+  bool
+  has_on_boundary( const Point& p) const
+  { CGAL_optimisation_precondition(
+				   is_empty() || tco.access_dimension_d_object()( p) == d);
+  ET sqr_d = sqr_dist( p);
+  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
+  return (( sqr_d == h_p_sqr * sqr_i_rad_numer) || 
+	  ( sqr_d == h_p_sqr * sqr_o_rad_numer));}
+    
+  bool
+  has_on_unbounded_side( const Point& p) const
+  { CGAL_optimisation_precondition(
+				   is_empty() || tco.access_dimension_d_object()( p) == d);
+  ET sqr_d = sqr_dist( p);
+  ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
+  return ( ( sqr_d < h_p_sqr * sqr_i_rad_numer) || 
+	   ( h_p_sqr * sqr_o_rad_numer < sqr_d)); }
+    
+  bool  is_empty     ( ) const { return number_of_points() == 0; }
+  bool  is_degenerate( ) const
+  { return ! CGAL_NTS is_positive( sqr_o_rad_numer); }
+    
+  // modifiers
+  template < class InputIterator >
+  void
+  set( InputIterator first, InputIterator last)
+  { if ( points.size() > 0) points.erase( points.begin(), points.end());
+  std::copy( first, last, std::back_inserter( points));
+  set_dimension();
+  CGAL_optimisation_precondition_msg( check_dimension(),
+				      "Not all points have the same dimension.");
+  compute_min_annulus(); }
+    
+  void
+  insert( const Point& p)
+  { if ( is_empty()) d = tco.access_dimension_d_object()( p);
+  CGAL_optimisation_precondition(
+				 tco.access_dimension_d_object()( p) == d);
+  points.push_back( p);
+  compute_min_annulus(); }
+    
+  template < class InputIterator >
+  void
+  insert( InputIterator first, InputIterator last)
+  { CGAL_optimisation_precondition_code( std::size_t old_n = points.size());
+  points.insert( points.end(), first, last);
+  set_dimension();
+  CGAL_optimisation_precondition_msg( check_dimension( old_n),
+				      "Not all points have the same dimension.");
+  compute_min_annulus(); }
+    
+  void
+  clear( )
+  { points.erase( points.begin(), points.end());
+  compute_min_annulus(); }
+    
+  // validity check
+  bool  is_valid( bool verbose = false, int level = 0) const;
+    
+  // traits class access
+  const Traits&  traits( ) const { return tco; }
+    
+
+private:
+    
+  Traits                   tco;       // traits class object
+  Access_coordinates_begin_d da_coord; // data accessor
+    
+  Point_vector             points;    // input points
+  int                      d;         // dimension of input points
+    
+  ET_vector                center_coords;     // center of small.encl.annulus
+    
+  ET                       sqr_i_rad_numer;   // squared inner radius of
+  ET                       sqr_o_rad_numer;   // ---"--- outer ----"----
+  ET                       sqr_rad_denom;     // smallest enclosing annulus
+    
+  Solver                   *solver;    // linear programming solver
+     
+  Index_vector             inner_indices;
+  Index_vector             outer_indices;
+    
+  NT_matrix                a_matrix;  // matrix `A' of dual LP
+  NT_vector                b_vector;  // vector `b' of dual LP
+  NT_vector                c_vector;  // vector `c' of dual LP
+    
+private:
+  // squared distance to center * h_p^2 * c_d^2 
+  ET sqr_dist_exact( const Point& p) const
+  {
+    ET result(0);
+    typename Access_coordinates_begin_d::Coordinate_iterator 
+      p_it (da_coord ( p));     // this is p * h_p
+    ET c_d = center_coords[d];
+    ET h_p = p_it[d];
+    for (int i=0; i<d; ++i) {
+      ET x = 
+	c_d * ET(p_it[i]) -      /* this is c_d *    p_i * h_p */
+	h_p * center_coords[i]   /* this is h_p *    c_i * c_d */ ;
+      result += x * x;
+    }
+    return result;
+  }
+
+  // the function above computes sqr_dist as ||p-c||^2 
+  // (endowed with a factor of c_d^2 * h_p^2)
+  // but we know that c was computed from (possibly slightly wrong)
+  // data if NT is inexact; in order to compensate for this, let
+  // us instead compute sqr_dist as p^Tp - 2c^Tp + c^Tc, where we use
+  // the (potentially wrong) values of p^Tp and p that went into the
+  // linear program; this will give us correct containment / on_boundary 
+  // checks also in the inexact-NT case.
+  ET sqr_dist( const Point& p) const
+  {
+    ET result(0), two(2);
+    NT pTp(0); // computed over input type, possibly slightly wrong
+    ET cTc(0); 
+    ET two_pTc(0);
+    typename Access_coordinates_begin_d::Coordinate_iterator 
+      p_it (da_coord ( p));     // this is p * h_p
+    NT h_p = p_it[d]; // input type!
+    for (int i=0; i<d; ++i) {
+      NT p_i (p_it[i]);  // input type!
+      pTp += p_i * p_i;  // p_i^2 * h_p^2 
+      cTc += center_coords[i] * center_coords[i]; // c_i^2 * c_d^2
+      two_pTc += 
+	// 2 * c_i * c_d * p_i * h_p^2  
+	2 * center_coords[i] * ET(h_p * p_i); 
+    } 
+    ET c_d = center_coords[d];
+    result = 
+      ET(pTp) * c_d * c_d +      
+      cTc * ET (h_p * h_p) +
+      - two_pTc * c_d;
+    return result;
+  }
+    
+  // set dimension of input points
+  void
+  set_dimension( )
+  { d = ( points.size() == 0 ? -1 :
+	  tco.access_dimension_d_object()( points[ 0])); }
+    
+  // check dimension of input points
+  bool
+  check_dimension( std::size_t  offset = 0)
+  { return ( std::find_if( points.begin()+offset, points.end(),
+			   CGAL::compose1_1( boost::bind2nd(
+							  std::not_equal_to<int>(), d),
+					     tco.access_dimension_d_object()))
+	     == points.end()); }
+    
+  // compute smallest enclosing annulus
+  void
+  compute_min_annulus( )
+  {
+    // clear inner and outer support points
+    inner_indices.erase( inner_indices.begin(), inner_indices.end());
+    outer_indices.erase( outer_indices.begin(), outer_indices.end());
+    
+    if ( is_empty()) {
+      center_coords.resize( 1);
+      sqr_i_rad_numer = -ET( 1);
+      sqr_o_rad_numer = -ET( 1);
+      return;
+    }
+    
+    if ( number_of_points() == 1) {
+      inner_indices.push_back( 0);
+      outer_indices.push_back( 0);
+      center_coords.resize( d+1);
+      std::copy( da_coord( points[ 0]),
+		 da_coord( points[ 0])+d+1,
+		 center_coords.begin());
+      sqr_i_rad_numer = ET( 0);
+      sqr_o_rad_numer = ET( 0);
+      sqr_rad_denom   = ET( 1);
+      return;
+    }
+    
+    // set up vector c and solve dual LP
+    // the ordering of the constraints is as above; the ordering
+    // of the variables is: z_p_j <-> 2 * j, y_p_j <-> 2 * j + 1 
+    c_vector.resize( 2*points.size());
+    for ( int j = 0; j < number_of_points(); ++j) {
+      typename Traits::Access_coordinates_begin_d::Coordinate_iterator
+	coord_it = da_coord( points[j]);
+      NT  sum = 0;
+      for ( int i = 0; i < d; ++i) {
+	sum += NT( coord_it[ i])*NT( coord_it[ i]);
+      }
+      c_vector[ 2*j  ] =  sum;
+      c_vector[ 2*j+1] = -sum;
+    }
+        
+    LP lp (2*static_cast<int>(points.size()), d+2, 
+	   A_iterator ( boost::counting_iterator<int>(0), 
+			A_matrix (d, da_coord, points.begin())),
+	   B_iterator ( boost::counting_iterator<int>(0), 
+			B_vector (d)), 
+	   R_iterator (CGAL::EQUAL), 
+	   c_vector.begin());
+    
+    Quadratic_program_options options;
+    options.set_pricing_strategy(pricing_strategy(NT()));
+    delete solver;
+    solver = new Solver(lp, options);
+    CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL);
+ 
+    // compute center and squared radius
+    ET sqr_sum = 0;
+    center_coords.resize( ambient_dimension()+1);
+    for ( int i = 0; i < d; ++i) {
+      center_coords[ i] = -solver->dual_variable( i);
+      sqr_sum += center_coords[ i] * center_coords[ i];
+    }
+    center_coords[ d] = solver->variables_common_denominator();
+    sqr_i_rad_numer = sqr_sum
+      - solver->dual_variable( d  )*center_coords[ d];
+    sqr_o_rad_numer = sqr_sum
+      - solver->dual_variable( d+1)*center_coords[ d];
+    sqr_rad_denom   = center_coords[ d] * center_coords[ d];
+        
+    // split up support points
+    for ( int i = 0; i < solver->number_of_basic_original_variables(); ++i) {
+      int index = solver->basic_original_variable_indices_begin()[ i];
+      if ( index % 2 == 0) {
+	inner_indices.push_back( index/2);
+      } else {
+	outer_indices.push_back( index/2);
+      }
+    }
+  }
+  
+  template < class NT >
+  Quadratic_program_pricing_strategy pricing_strategy( NT) {
+    return QP_PARTIAL_FILTERED_DANTZIG;
+  }
+  
+  Quadratic_program_pricing_strategy pricing_strategy( ET) {
+    return QP_PARTIAL_DANTZIG;
+  }
+ 
+    
+};
+
+// Function declarations
+// =====================
+// I/O operators
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os, const Min_annulus_d<Traits_>& min_annulus);
+
+template < class Traits_ >
+std::istream&
+operator >> ( std::istream& is,       Min_annulus_d<Traits_>& min_annulus);
+
+// ============================================================================
+
+// Class implementation
+// ====================
+
+// validity check
+template < class Traits_ >
+bool
+Min_annulus_d<Traits_>::
+is_valid( bool verbose, int level) const
+{
+  using namespace std;
+
+  CGAL::Verbose_ostream verr( verbose);
+  verr << "CGAL::Min_annulus_d<Traits>::" << endl;
+  verr << "is_valid( true, " << level << "):" << endl;
+  verr << "  |P| = " << number_of_points()
+       << ", |S| = " << number_of_support_points() << endl;
+
+  // containment check (a)
+  // ---------------------
+  verr << "  (a) containment check..." << flush;
+    
+  Point_iterator  point_it = points_begin();
+  for ( ; point_it != points_end(); ++point_it) {
+    if ( has_on_unbounded_side( *point_it))
+      return CGAL::_optimisation_is_valid_fail( verr,
+						"annulus does not contain all points");
+  }
+    
+  verr << "passed." << endl;
+
+  // support set check (b)
+  // ---------------------
+  verr << "  (b) support set check..." << flush;
+    
+  // all inner support points on inner boundary?
+  Inner_support_point_iterator  i_pt_it = inner_support_points_begin();
+  for ( ; i_pt_it != inner_support_points_end(); ++i_pt_it) {
+    ET h_p_sqr = da_coord (*i_pt_it)[d] * da_coord (*i_pt_it)[d];
+    if ( sqr_dist( *i_pt_it) != h_p_sqr * sqr_i_rad_numer)
+      return CGAL::_optimisation_is_valid_fail( verr,
+						"annulus does not have all inner support points on its inner boundary");
+  }
+    
+  // all outer support points on outer boundary?
+  Outer_support_point_iterator  o_pt_it = outer_support_points_begin();
+  for ( ; o_pt_it != outer_support_points_end(); ++o_pt_it) {
+    ET h_p_sqr = da_coord (*o_pt_it)[d] * da_coord (*o_pt_it)[d];
+    if ( sqr_dist( *o_pt_it) != h_p_sqr * sqr_o_rad_numer)
+      return CGAL::_optimisation_is_valid_fail( verr,
+						"annulus does not have all outer support points on its outer boundary");
+  }
+  /*
+  // center strictly in convex hull of support points?
+  typename Solver::Basic_variable_numerator_iterator
+  num_it = solver.basic_variables_numerator_begin();
+  for ( ; num_it != solver.basic_variables_numerator_end(); ++num_it) {
+  if ( ! (    CGAL_NTS is_positive( *num_it)
+  && *num_it <= solver.variables_common_denominator()))
+  return CGAL::_optimisation_is_valid_fail( verr,
+  "center does not lie strictly in convex hull of support points");
+  }
+  */
+    
+  verr << "passed." << endl;
+
+  verr << "  object is valid!" << endl;
+  return( true);
+}
+
+// output operator
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os,
+              const Min_annulus_d<Traits_>& min_annulus)
+{
+  using namespace std;
+
+  typedef  typename Min_annulus_d<Traits_>::Point  Point;
+  typedef  ostream_iterator<Point>       Os_it;
+  typedef  typename Traits_::ET          ET;
+  typedef  ostream_iterator<ET>          Et_it;
+
+  switch ( CGAL::get_mode( os)) {
+
+  case CGAL::IO::PRETTY:
+    os << "CGAL::Min_annulus_d( |P| = "
+       << min_annulus.number_of_points() << ", |S| = "
+       << min_annulus.number_of_inner_support_points() << '+'
+       << min_annulus.number_of_outer_support_points() << endl;
+    os << "  P = {" << endl;
+    os << "    ";
+    copy( min_annulus.points_begin(), min_annulus.points_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  S_i = {" << endl;
+    os << "    ";
+    copy( min_annulus.inner_support_points_begin(),
+	  min_annulus.inner_support_points_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  S_o = {" << endl;
+    os << "    ";
+    copy( min_annulus.outer_support_points_begin(),
+	  min_annulus.outer_support_points_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  center = ( ";
+    copy( min_annulus.center_coordinates_begin(),
+	  min_annulus.center_coordinates_end(),
+	  Et_it( os, " "));
+    os << ")" << endl;
+    os << "  squared inner radius = "
+       << min_annulus.squared_inner_radius_numerator() << " / "
+       << min_annulus.squared_radii_denominator() << endl;
+    os << "  squared outer radius = "
+       << min_annulus.squared_outer_radius_numerator() << " / "
+       << min_annulus.squared_radii_denominator() << endl;
+    break;
+
+  case CGAL::IO::ASCII:
+    copy( min_annulus.points_begin(), min_annulus.points_end(),
+	  Os_it( os, "\n"));
+    break;
+
+  case CGAL::IO::BINARY:
+    copy( min_annulus.points_begin(), min_annulus.points_end(),
+	  Os_it( os));
+    break;
+
+  default:
+    CGAL_optimisation_assertion_msg( false,
+				     "CGAL::get_mode( os) invalid!");
+    break; }
+
+  return( os);
+}
+
+// input operator
+template < class Traits_ >
+std::istream&
+operator >> ( std::istream& is, CGAL::Min_annulus_d<Traits_>& min_annulus)
+{
+  using namespace std;
+
+  switch ( CGAL::get_mode( is)) {
+
+  case CGAL::IO::PRETTY:
+    cerr << endl;
+    cerr << "Stream must be in ascii or binary mode" << endl;
+    break;
+
+  case CGAL::IO::ASCII:
+  case CGAL::IO::BINARY:
+    typedef  typename CGAL::Min_annulus_d<Traits_>::Point  Point;
+    typedef  istream_iterator<Point>             Is_it;
+    min_annulus.set( Is_it( is), Is_it());
+    break;
+
+  default:
+    CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!");
+    break; }
+
+  return( is);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_MIN_ANNULUS_D_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2.h
new file mode 100644
index 0000000..d59566a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2.h
@@ -0,0 +1,589 @@
+// Copyright (c) 1997-2001  
+// ETH Zurich (Switzerland).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
+
+#ifndef CGAL_MIN_CIRCLE_2_H
+#define CGAL_MIN_CIRCLE_2_H
+
+// includes
+#  include <CGAL/Optimisation/basic.h>
+#  include <CGAL/Random.h>
+#  include <list>
+#  include <vector>
+#  include <algorithm>
+#  include <iostream>
+
+namespace CGAL {
+
+// Class declaration
+// =================
+template < class Traits_ >
+class Min_circle_2;
+
+// Class interface
+// ===============
+template < class Traits_ >
+class Min_circle_2 {
+  public:
+    // types
+    typedef           Traits_                           Traits;
+    typedef typename  Traits_::Point                    Point;
+    typedef typename  Traits_::Circle                   Circle;
+    typedef typename  std::list<Point>::const_iterator  Point_iterator;
+    typedef           const Point *                     Support_point_iterator;
+    
+    /**************************************************************************
+    WORKAROUND: Some compilers are unable to match member functions defined
+    outside the class template. Therefore, all member functions are implemented
+    in the class interface.
+    
+    // creation
+    template < class InputIterator >
+    Min_circle_2( InputIterator first,
+                  InputIterator last,
+                  bool          randomize = false,
+                  Random&       random    = get_default_random(),
+                  const Traits& traits    = Traits());
+    
+    Min_circle_2( const Traits& traits = Traits());
+    Min_circle_2( const Point&  p,
+                  const Traits& traits = Traits());
+    Min_circle_2( Point  p, Point  q,
+                  const Traits& traits = Traits());
+    Min_circle_2( const Point&  p1, const Point&  p2, const Point&  p3,
+                  const Traits& traits = Traits());
+    ~Min_circle_2( );
+    
+    // access functions
+    int  number_of_points        ( ) const;
+    int  number_of_support_points( ) const;
+    
+    Point_iterator  points_begin( ) const;
+    Point_iterator  points_end  ( ) const;
+    
+    Support_point_iterator  support_points_begin( ) const;
+    Support_point_iterator  support_points_end  ( ) const;
+    
+    const Point&  support_point( int i) const;
+    
+    const Circle&  circle( ) const;
+    
+    // predicates
+    Bounded_side  bounded_side( const Point& p) const;
+    bool  has_on_bounded_side      ( const Point& p) const;
+    bool  has_on_boundary          ( const Point& p) const;
+    bool  has_on_unbounded_side    ( const Point& p) const;
+    
+    bool  is_empty     ( ) const;
+    bool  is_degenerate( ) const;
+    
+    // modifiers
+    void  insert( const Point& p);
+    void  insert( const Point* first,
+                  const Point* last );
+    void  insert( std::list<Point>::const_iterator first,
+                  std::list<Point>::const_iterator last );
+    void  insert( std::istream_iterator<Point,std::ptrdiff_t> first,
+                  std::istream_iterator<Point,std::ptrdiff_t> last );
+    void  clear( );
+    
+    // validity check
+    bool  is_valid( bool verbose = false, int level = 0) const;
+    
+    // miscellaneous
+    const Traits&  traits( ) const;
+    **************************************************************************/
+
+  private:
+    // private data members
+    Traits       tco;                           // traits class object
+    std::list<Point>  points;                   // doubly linked list of points
+  std::size_t         n_support_points;              // number of support points
+    Point*       support_points;                // array of support points
+    
+
+    // copying and assignment not allowed!
+    Min_circle_2( const Min_circle_2<Traits_>&);
+    Min_circle_2<Traits_>&
+        operator = ( const Min_circle_2<Traits_>&);
+
+// ============================================================================
+
+// Class implementation
+// ====================
+
+  public:
+    // Access functions and predicates
+    // -------------------------------
+    // #points and #support points
+    inline
+    std::size_t
+    number_of_points( ) const
+    {
+        return( points.size());
+    }
+    
+    inline
+    std::size_t
+    number_of_support_points( ) const
+    {
+        return( n_support_points);
+    }
+
+    // is_... predicates
+    inline
+    bool
+    is_empty( ) const
+    {
+        return( number_of_support_points() == 0);
+    }
+    
+    inline
+    bool
+    is_degenerate( ) const
+    {
+        return( number_of_support_points() <  2);
+    }
+
+    // access to points and support points
+    inline
+    Point_iterator
+    points_begin( ) const
+    {
+        return( points.begin());
+    }
+    
+    inline
+    Point_iterator
+    points_end( ) const
+    {
+        return( points.end());
+    }
+    
+    inline
+    Support_point_iterator
+    support_points_begin( ) const
+    {
+        return( support_points);
+    }
+    
+    inline
+    Support_point_iterator
+    support_points_end( ) const
+    {
+        return( support_points+n_support_points);
+    }
+    
+    // random access for support points
+    inline
+    const Point&
+    support_point( std::size_t i) const
+    {
+        CGAL_optimisation_precondition(i <  number_of_support_points());
+        return( support_points[ i]);
+    }
+    // circle
+    inline
+    const Circle&
+    circle( ) const
+    {
+        return( tco.circle);
+    }
+    
+
+    // in-circle test predicates
+    inline
+    CGAL::Bounded_side
+    bounded_side( const Point& p) const
+    {
+        return( tco.circle.bounded_side( p));
+    }
+    
+    inline
+    bool
+    has_on_bounded_side( const Point& p) const
+    {
+        return( tco.circle.has_on_bounded_side( p));
+    }
+    
+    inline
+    bool
+    has_on_boundary( const Point& p) const
+    {
+        return( tco.circle.has_on_boundary( p));
+    }
+    
+    inline
+    bool
+    has_on_unbounded_side( const Point& p) const
+    {
+        return( tco.circle.has_on_unbounded_side( p));
+    }
+
+  private:
+    // Private member functions
+    // ------------------------
+    // compute_circle
+    inline
+    void
+    compute_circle( )
+    {
+        switch ( n_support_points) {
+          case 3:
+            tco.circle.set( support_points[ 0],
+                            support_points[ 1],
+                            support_points[ 2]);
+            break;
+          case 2:
+            tco.circle.set( support_points[ 0], support_points[ 1]);
+            break;
+          case 1:
+            tco.circle.set( support_points[ 0]);
+            break;
+          case 0:
+            tco.circle.set( );
+            break;
+          default:
+            CGAL_optimisation_assertion( n_support_points <= 3 ); }
+    }
+
+    void
+    mc( const Point_iterator& last, std::size_t n_sp)
+    {
+        // compute circle through support points
+        n_support_points = n_sp;
+        compute_circle();
+        if ( n_sp == 3) return;
+    
+        // test first n points
+        typename std::list<Point>::iterator  point_iter = points.begin();
+        for ( ; last != point_iter; ) {
+            const Point& p = *point_iter;
+    
+            // p not in current circle?
+            if ( has_on_unbounded_side( p)) {
+    
+                // recursive call with p as additional support point
+                support_points[ n_sp] = p;
+                mc( point_iter, n_sp+1);
+    
+                // move current point to front
+                points.splice( points.begin(), points, point_iter++); }
+    
+            else
+                ++point_iter; }
+    }
+
+  public:
+    // Constructors
+    // ------------
+    // STL-like constructor (member template)
+    template < class InputIterator >
+    Min_circle_2( InputIterator first,
+                  InputIterator last,
+                  bool          randomize
+    #if !defined(_MSC_VER) || _MSC_VER > 1300
+                                              = false
+    #endif
+                                                     ,
+                      Random&       random    = get_default_random(),
+                      const Traits& traits    = Traits())
+            : tco( traits)
+        {
+            // allocate support points' array
+            support_points = new Point[ 3];
+    
+            // range of points not empty?
+            if ( first != last) {
+    
+                // store points
+                if ( randomize) {
+    
+                    // shuffle points at random
+                    std::vector<Point> v( first, last);
+                    std::random_shuffle( v.begin(), v.end(), random);
+                    std::copy( v.begin(), v.end(),
+                               std::back_inserter( points)); }
+                else
+                    std::copy( first, last, std::back_inserter( points)); }
+    
+            // compute mc
+            mc( points.end(), 0);
+        }
+    
+    // default constructor
+    inline
+    Min_circle_2( const Traits& traits = Traits())
+        : tco( traits), n_support_points( 0)
+    {
+        // allocate support points' array
+        support_points = new Point[ 3];
+    
+        // initialize circle
+        tco.circle.set();
+    
+        CGAL_optimisation_postcondition( is_empty());
+    }
+    
+    // constructor for one point
+    inline
+    Min_circle_2( const Point& p, const Traits& traits = Traits())
+        : tco( traits), points( 1, p), n_support_points( 1)
+    {
+        // allocate support points' array
+        support_points = new Point[ 3];
+    
+        // initialize circle
+        support_points[ 0] = p;
+        tco.circle.set( p);
+    
+        CGAL_optimisation_postcondition( is_degenerate());
+    }
+    
+    // constructor for two points
+    // This was const Point& but then Intel 7.0/.net2003 messes it up 
+    // with the constructor taking an iterator range
+    inline
+    Min_circle_2( Point p1, Point p2,
+                  const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 3];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+    
+        // compute mc
+        mc( points.end(), 0);
+    }
+    
+    // constructor for three points
+    inline
+    Min_circle_2( const Point& p1, const Point& p2, const Point& p3,
+                  const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 3];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+        points.push_back( p3);
+    
+        // compute mc
+        mc( points.end(), 0);
+    }
+    
+
+    // Destructor
+    // ----------
+    inline
+    ~Min_circle_2( )
+    {
+        // free support points' array
+        delete[] support_points;
+    }
+
+    // Modifiers
+    // ---------
+    void
+    insert( const Point& p)
+    {
+        // p not in current circle?
+        if ( has_on_unbounded_side( p)) {
+    
+            // p new support point
+            support_points[ 0] = p;
+    
+            // recompute mc
+            mc( points.end(), 1);
+    
+            // store p as the first point in list
+            points.push_front( p); }
+        else
+    
+            // append p to the end of the list
+            points.push_back( p);
+    }
+    
+        template < class InputIterator >
+        void
+        insert( InputIterator first, InputIterator last)
+        {
+            for ( ; first != last; ++first)
+                insert( *first);
+        }
+    
+    void
+    clear( )
+    {
+        points.erase( points.begin(), points.end());
+        n_support_points = 0;
+        tco.circle.set();
+    }
+    
+
+    // Validity check
+    // --------------
+    bool
+    is_valid( bool verbose = false, int level = 0) const
+    {
+        using namespace std;
+    
+        CGAL::Verbose_ostream verr( verbose);
+        verr << endl;
+        verr << "CGAL::Min_circle_2<Traits>::" << endl;
+        verr << "is_valid( true, " << level << "):" << endl;
+        verr << "  |P| = " << number_of_points()
+             << ", |S| = " << number_of_support_points() << endl;
+    
+        // containment check (a)
+        verr << "  a) containment check..." << flush;
+        Point_iterator point_iter;
+        for ( point_iter  = points_begin();
+              point_iter != points_end();
+              ++point_iter)
+            if ( has_on_unbounded_side( *point_iter))
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "circle does not contain all points"));
+        verr << "passed." << endl;
+    
+        // support set checks (b)+(c)
+        verr << "  b)+c) support set checks..." << flush;
+        switch( number_of_support_points()) {
+        
+          case 0:
+            if ( ! is_empty())
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "P is nonempty, \
+                             but there are no support points."));
+            break;
+        
+          case 1:
+            if ( ( circle().center() != support_point( 0)    ) ||
+                 ( ! CGAL_NTS is_zero( circle().squared_radius())) )
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "circle differs from the circle \
+                             spanned by its single support point."));
+            break;
+        
+          case 2: {
+            const Point& p = support_point( 0),
+                         q = support_point( 1);
+            
+            // p equals q?
+            if ( p == q)
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "the two support points are equal."));
+            
+            // segment(p,q) is not diameter?
+            if ( ( ! has_on_boundary( p)                                ) ||
+                 ( ! has_on_boundary( q)                                ) ||
+                 ( tco.orientation( p, q,
+                                    circle().center()) != CGAL::COLLINEAR) )
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "circle does not have its \
+                             two support points as diameter.")); }
+            break;
+        
+          case 3: {
+            const Point& p = support_point( 0),
+                         q = support_point( 1),
+                         r = support_point( 2);
+            
+            // p, q, r not pairwise distinct?
+            if ( ( p == q) || ( q == r) || ( r == p))
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "at least two of the three \
+                             support points are equal."));
+            
+            // p, q, r collinear?
+            if ( tco.orientation( p, q, r) == CGAL::COLLINEAR)
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "the three support points are collinear."));
+            
+            // current circle not equal the unique circle through p,q,r ?
+            Circle c = circle();
+            c.set( p, q, r);
+            if ( circle() != c)
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "circle is not the unique circle \
+                             through its three support points."));
+            
+            // circle's center on boundary of triangle(p,q,r)?
+            const Point& center = circle().center();
+            CGAL::Orientation o_pqz = tco.orientation( p, q, center);
+            CGAL::Orientation o_qrz = tco.orientation( q, r, center);
+            CGAL::Orientation o_rpz = tco.orientation( r, p, center);
+            if ( ( o_pqz == CGAL::COLLINEAR) ||
+                 ( o_qrz == CGAL::COLLINEAR) ||
+                 ( o_rpz == CGAL::COLLINEAR) )
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "one of the three support points is redundant."));
+            
+            // circle's center not inside triangle(p,q,r)?
+            if ( ( o_pqz != o_qrz) || ( o_qrz != o_rpz) || ( o_rpz != o_pqz))
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "circle's center is not in the \
+                             convex hull of its three support points.")); }
+            break;
+        
+          default:
+            return( CGAL::_optimisation_is_valid_fail( verr,
+                        "illegal number of support points, \
+                         not between 0 and 3."));
+        };
+        verr << "passed." << endl;
+    
+        verr << "  object is valid!" << endl;
+        return( true);
+    }
+
+    // Miscellaneous
+    // -------------
+    inline
+    const Traits&
+    traits( ) const
+    {
+        return( tco);
+    }
+};
+
+// Function declarations
+// =====================
+// I/O
+// ---
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os, const Min_circle_2<Traits_>& mc);
+
+template < class Traits_ >
+std::istream&
+operator >> ( std::istream& is,       Min_circle_2<Traits_>& mc);
+
+} //namespace CGAL
+
+#include <CGAL/Min_circle_2/Min_circle_2_impl.h>
+
+#endif // CGAL_MIN_CIRCLE_2_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Min_circle_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Min_circle_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Optimisation_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Optimisation_circle_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Optimisation_circle_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Optimisation_circle_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_circle_2_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_circle_2_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_circle_2_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_circle_2_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2.h
new file mode 100644
index 0000000..31e766e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2.h
@@ -0,0 +1,584 @@
+// Copyright (c) 1997-2001  
+// ETH Zurich (Switzerland).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
+
+#ifndef CGAL_MIN_ELLIPSE_2_H
+#define CGAL_MIN_ELLIPSE_2_H
+
+#include <CGAL/Optimisation/basic.h>
+#include <CGAL/Random.h>
+#include <list>
+#include <vector>
+#include <algorithm>
+#include <iostream>
+
+namespace CGAL {
+
+// Class declaration
+// =================
+template < class Traits_ >
+class Min_ellipse_2;
+
+// Class interface
+// ===============
+template < class Traits_ >
+class Min_ellipse_2 {
+  public:
+    // types
+    typedef           Traits_                           Traits;
+    typedef typename  Traits_::Point                    Point;
+    typedef typename  Traits_::Ellipse                  Ellipse;
+    typedef typename  std::list<Point>::const_iterator  Point_iterator;
+    typedef           const Point *                     Support_point_iterator;
+    
+    /**************************************************************************
+    WORKAROUND: Some compilers are unable to match member functions defined
+    outside the class template. Therefore, all member functions are implemented
+    in the class interface.
+    
+    // creation
+    template < class InputIterator >
+    Min_ellipse_2( InputIterator first,
+                   InputIterator last,
+                   bool          randomize = false,
+                   Random&       random    = get_default_random(),
+                   const Traits& traits    = Traits());
+    
+    Min_ellipse_2( const Traits& traits = Traits());
+    Min_ellipse_2( const Point&  p,
+                   const Traits& traits = Traits());
+    Min_ellipse_2( Point  p,
+                   Point  q,
+                   const Traits& traits = Traits());
+    Min_ellipse_2( const Point&  p1,
+                   const Point&  p2,
+                   const Point&  p3,
+                   const Traits& traits = Traits());
+    Min_ellipse_2( const Point&  p1,
+                   const Point&  p2,
+                   const Point&  p3,
+                   const Point&  p4,
+                   const Traits& traits = Traits());
+    Min_ellipse_2( const Point&  p1,
+                   const Point&  p2,
+                   const Point&  p3,
+                   const Point&  p4,
+                   const Point&  p5,
+                   const Traits& traits = Traits());
+    ~Min_ellipse_2( );
+    
+    // access functions
+    int  number_of_points        ( ) const;
+    int  number_of_support_points( ) const;
+    
+    Point_iterator  points_begin( ) const;
+    Point_iterator  points_end  ( ) const;
+    
+    Support_point_iterator  support_points_begin( ) const;
+    Support_point_iterator  support_points_end  ( ) const;
+    
+    const Point&  support_point( int i) const;
+    
+    const Ellipse&  ellipse( ) const;
+    
+    // predicates
+    CGAL::Bounded_side  bounded_side( const Point& p) const;
+    bool  has_on_bounded_side      ( const Point& p) const;
+    bool  has_on_boundary          ( const Point& p) const;
+    bool  has_on_unbounded_side    ( const Point& p) const;
+    
+    bool  is_empty     ( ) const;
+    bool  is_degenerate( ) const;
+    
+    // modifiers
+    void  insert( const Point& p);
+    void  insert( const Point* first,
+                  const Point* last );
+    void  insert( std::list<Point>::const_iterator first,
+                  std::list<Point>::const_iterator last );
+    void  insert( std::istream_iterator<Point,std::ptrdiff_t> first,
+                  std::istream_iterator<Point,std::ptrdiff_t> last );
+    void  clear( );
+    
+    // validity check
+    bool  is_valid( bool verbose = false, int level = 0) const;
+    
+    // miscellaneous
+    const Traits&  traits( ) const;
+    **************************************************************************/
+
+  private:
+    // private data members
+    Traits       tco;                           // traits class object
+    std::list<Point>  points;                   // doubly linked list of points
+    int          n_support_points;              // number of support points
+    Point*       support_points;                // array of support points
+    
+
+    // copying and assignment not allowed!
+    Min_ellipse_2( const Min_ellipse_2<Traits_>&);
+    Min_ellipse_2<Traits_>& operator = ( const Min_ellipse_2<Traits_>&);
+
+// ============================================================================
+
+// Class implementation
+// ====================
+
+  public:
+    // Access functions and predicates
+    // -------------------------------
+    // #points and #support points
+    inline
+    std::size_t
+    number_of_points( ) const
+    {
+        return( points.size());
+    }
+    
+    inline
+    std::size_t
+    number_of_support_points( ) const
+    {
+        return( n_support_points);
+    }
+
+    // is_... predicates
+    inline
+    bool
+    is_empty( ) const
+    {
+        return( number_of_support_points() == 0);
+    }
+    
+    inline
+    bool
+    is_degenerate( ) const
+    {
+        return( number_of_support_points() <  3);
+    }
+
+    // access to points and support points
+    inline
+    Point_iterator
+    points_begin( ) const
+    {
+        return( points.begin());
+    }
+    
+    inline
+    Point_iterator
+    points_end( ) const
+    {
+        return( points.end());
+    }
+    
+    inline
+    Support_point_iterator
+    support_points_begin( ) const
+    {
+        return( support_points);
+    }
+    
+    inline
+    Support_point_iterator
+    support_points_end( ) const
+    {
+        return( support_points+n_support_points);
+    }
+    
+    // random access for support points
+    inline
+    const Point&
+    support_point( std::size_t i) const
+    {
+        CGAL_optimisation_precondition(i <  number_of_support_points());
+        return( support_points[ i]);
+    }
+    // ellipse
+    inline
+    const Ellipse&
+    ellipse( ) const
+    {
+        return( tco.ellipse);
+    }
+    
+
+    // in-ellipse test predicates
+    inline
+    CGAL::Bounded_side
+    bounded_side( const Point& p) const
+    {
+        return( tco.ellipse.bounded_side( p));
+    }
+    
+    inline
+    bool
+    has_on_bounded_side( const Point& p) const
+    {
+        return( tco.ellipse.has_on_bounded_side( p));
+    }
+    
+    inline
+    bool
+    has_on_boundary( const Point& p) const
+    {
+        return( tco.ellipse.has_on_boundary( p));
+    }
+    
+    inline
+    bool
+    has_on_unbounded_side( const Point& p) const
+    {
+        return( tco.ellipse.has_on_unbounded_side( p));
+    }
+
+  private:
+    // Private member functions
+    // ------------------------
+    // compute_ellipse
+    inline
+    void
+    compute_ellipse( )
+    {
+        switch ( n_support_points) {
+          case 5:
+            tco.ellipse.set( support_points[ 0],
+                             support_points[ 1],
+                             support_points[ 2],
+                             support_points[ 3],
+                             support_points[ 4]);
+            break;
+          case 4:
+            tco.ellipse.set( support_points[ 0],
+                             support_points[ 1],
+                             support_points[ 2],
+                             support_points[ 3]);
+            break;
+          case 3:
+            tco.ellipse.set( support_points[ 0],
+                             support_points[ 1],
+                             support_points[ 2]);
+            break;
+          case 2:
+            tco.ellipse.set( support_points[ 0], support_points[ 1]);
+            break;
+          case 1:
+            tco.ellipse.set( support_points[ 0]);
+            break;
+          case 0:
+            tco.ellipse.set( );
+            break;
+          default:
+            CGAL_optimisation_assertion( ( n_support_points >= 0) &&
+                                         ( n_support_points <= 5) ); }
+    }
+
+    void
+    me( const Point_iterator& last, int n_sp)
+    {
+        // compute ellipse through support points
+        n_support_points = n_sp;
+        compute_ellipse();
+        if ( n_sp == 5) return;
+    
+        // test first n points
+        typename std::list<Point>::iterator  point_iter = points.begin();
+        for ( ; last != point_iter; ) {
+            const Point& p = *point_iter;
+    
+            // p not in current ellipse?
+            if ( has_on_unbounded_side( p)) {
+    
+                // recursive call with p as additional support point
+                support_points[ n_sp] = p;
+                me( point_iter, n_sp+1);
+    
+                // move current point to front
+                points.splice( points.begin(), points, point_iter++); }
+    
+            else
+                ++point_iter; }
+    }
+
+  public:
+    // Constructors
+    // ------------
+    // STL-like constructor (member template)
+    template < class InputIterator >
+    Min_ellipse_2( InputIterator first,
+                   InputIterator last,
+                   bool          randomize
+    #if !defined(_MSC_VER) || _MSC_VER > 1300
+                                               = false
+    #endif
+                                                      ,
+                     Random&       random    = get_default_random(),
+                       const Traits& traits    = Traits())
+            : tco( traits)
+        {
+            // allocate support points' array
+            support_points = new Point[ 5];
+    
+            // range of points not empty?
+            if ( first != last) {
+    
+                // store points
+                if ( randomize) {
+    
+                    // shuffle points at random
+                    std::vector<Point> v( first, last);
+                    std::random_shuffle( v.begin(), v.end(), random);
+                    std::copy( v.begin(), v.end(),
+                               std::back_inserter( points)); }
+                else
+                    std::copy( first, last, std::back_inserter( points)); }
+    
+            // compute me
+            me( points.end(), 0);
+        }
+    
+    // default constructor
+    inline
+    Min_ellipse_2( const Traits& traits = Traits())
+        : tco( traits), n_support_points( 0)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // initialize ellipse
+        tco.ellipse.set();
+    
+        CGAL_optimisation_postcondition( is_empty());
+    }
+    
+    // constructor for one point
+    inline
+    Min_ellipse_2( const Point& p, const Traits& traits = Traits())
+        : tco( traits), points( 1, p), n_support_points( 1)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // initialize ellipse
+        support_points[ 0] = p;
+        tco.ellipse.set( p);
+    
+        CGAL_optimisation_postcondition( is_degenerate());
+    }
+    
+    // constructor for two points
+    // This was const Point& but then Intel 7.0/.net2003 messes it up 
+    // with the constructor taking an iterator range
+    inline
+    Min_ellipse_2( Point p1, Point p2,
+                   const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+    
+        // compute me
+        me( points.end(), 0);
+    
+        CGAL_optimisation_postcondition( is_degenerate());
+    }
+    
+    // constructor for three points
+    inline
+    Min_ellipse_2( const Point& p1, const Point& p2, const Point& p3,
+                   const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+        points.push_back( p3);
+    
+        // compute me
+        me( points.end(), 0);
+    }
+    
+    // constructor for four points
+    inline
+    Min_ellipse_2( const Point& p1, const Point& p2,
+                   const Point& p3, const Point& p4,
+                   const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+        points.push_back( p3);
+        points.push_back( p4);
+    
+        // compute me
+        me( points.end(), 0);
+    }
+    
+    // constructor for five points
+    inline
+    Min_ellipse_2( const Point& p1, const Point& p2, const Point& p3,
+                   const Point& p4, const Point& p5,
+                   const Traits& traits = Traits())
+        : tco( traits)
+    {
+        // allocate support points' array
+        support_points = new Point[ 5];
+    
+        // store points
+        points.push_back( p1);
+        points.push_back( p2);
+        points.push_back( p3);
+        points.push_back( p4);
+        points.push_back( p5);
+    
+        // compute me
+        me( points.end(), 0);
+    }
+    
+
+    // Destructor
+    // ----------
+    inline
+    ~Min_ellipse_2( )
+    {
+        // free support points' array
+        delete[] support_points;
+    }
+
+    // Modifiers
+    // ---------
+    void
+    insert( const Point& p)
+    {
+        // p not in current ellipse?
+        if ( has_on_unbounded_side( p)) {
+    
+            // p new support point
+            support_points[ 0] = p;
+    
+            // recompute me
+            me( points.end(), 1);
+    
+            // store p as the first point in list
+            points.push_front( p); }
+        else
+    
+            // append p to the end of the list
+            points.push_back( p);
+    }
+        template < class InputIterator >
+        void
+        insert( InputIterator first, InputIterator last)
+        {
+            for ( ; first != last; ++first)
+                insert( *first);
+        }
+
+    void
+    clear( )
+    {
+        points.erase( points.begin(), points.end());
+        n_support_points = 0;
+        tco.ellipse.set();
+    }
+    
+
+    // Validity check
+    // --------------
+    bool
+    is_valid( bool verbose = false, int level = 0) const
+    {
+        using namespace std;
+    
+        CGAL::Verbose_ostream verr( verbose);
+        verr << endl;
+        verr << "CGAL::Min_ellipse_2<Traits>::" << endl;
+        verr << "is_valid( true, " << level << "):" << endl;
+        verr << "  |P| = " << number_of_points()
+             << ", |S| = " << number_of_support_points() << endl;
+    
+        // containment check (a)
+        verr << "  a) containment check..." << flush;
+        Point_iterator point_iter;
+        for ( point_iter  = points_begin();
+              point_iter != points_end();
+              ++point_iter)
+            if ( has_on_unbounded_side( *point_iter))
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "ellipse does not contain all points"));
+        verr << "passed." << endl;
+    
+        // support set checks (b)+(c) (not yet implemented)
+        
+        // alternative support set check
+        verr << "  +) support set check..." << flush;
+        Support_point_iterator support_point_iter;
+        for ( support_point_iter  = support_points_begin();
+              support_point_iter != support_points_end();
+              ++support_point_iter)
+            if ( ! has_on_boundary( *support_point_iter))
+                return( CGAL::_optimisation_is_valid_fail( verr,
+                            "ellipse does not have all \
+                             support points on the boundary"));
+        verr << "passed." << endl;
+    
+        verr << "  object is valid!" << endl;
+        return( true);
+    }
+
+    // Miscellaneous
+    // -------------
+    inline
+    const Traits&
+    traits( ) const
+    {
+        return( tco);
+    }
+};
+
+// Function declarations
+// =====================
+// I/O
+// ---
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os, const Min_ellipse_2<Traits_>& me);
+
+template < class Traits_ >
+std::istream&
+operator >> ( std::istream& is,       Min_ellipse_2<Traits_>& me);
+
+} //namespace CGAL
+
+#include <CGAL/Min_ellipse_2/Min_ellipse_2_impl.h>
+
+#endif // CGAL_MIN_ELLIPSE_2_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h
new file mode 100644
index 0000000..efa58d9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h
@@ -0,0 +1,449 @@
+// Copyright (c) 1997-2001  
+// ETH Zurich (Switzerland).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Bernd Gaertner
+
+#ifndef CGAL_OPTIMISATION_ELLIPSE_2_H
+#define CGAL_OPTIMISATION_ELLIPSE_2_H
+
+#include <CGAL/Conic_2.h>
+#include <CGAL/Optimisation/assertions.h>
+#include <CGAL/Kernel/global_functions_2.h>
+
+
+namespace CGAL {
+
+// Class interface
+// ===============
+template < class K_ >
+class Optimisation_ellipse_2 {
+    /*
+    friend  std::ostream&  operator << <> (
+        std::ostream&, const Optimisation_ellipse_2<K_>&);
+    friend  std::istream&  operator >> <> (
+        std::istream&, Optimisation_ellipse_2<K_> &);
+    */
+  public:
+    // types
+    typedef           K_                K;
+    typedef  typename K_::RT            RT;
+    typedef  typename K_::FT            FT;
+    typedef  typename K::Point_2        Point;
+    typedef  typename K::Conic_2        Conic;
+    
+    /**************************************************************************
+    WORKAROUND: Some compilers are unable to match member functions defined
+    outside the class template. Therefore, all member functions are implemented
+    in the class interface.
+    
+    // creation
+    Optimisation_ellipse_2( );
+    
+    void  set( );
+    void  set( const Point& p);
+    void  set( const Point& p,  const Point& q);
+    void  set( const Point& p1, const Point& p2, const Point& p3);
+    void  set( const Point& p1, const Point& p2,
+               const Point& p3, const Point& p4);
+    void  set( const Point& p1, const Point& p2,
+               const Point& p3, const Point& p4, const Point& p5);
+    
+    // access functions
+    int  number_of_boundary_points()
+    
+    // equality tests
+    bool  operator == ( const Optimisation_ellipse_2<K>& e) const;
+    bool  operator != ( const Optimisation_ellipse_2<K>& e) const;
+    
+    // predicates
+    CGAL::Bounded_side  bounded_side( const Point& p) const;
+    bool  has_on_bounded_side      ( const Point& p) const;
+    bool  has_on_boundary          ( const Point& p) const;
+    bool  has_on_unbounded_side    ( const Point& p) const;
+    
+    bool  is_empty     ( ) const;
+    bool  is_degenerate( ) const;
+    **************************************************************************/
+
+  /* private: */
+    // private data members
+    int    n_boundary_points;                   // number of boundary points
+    Point  boundary_point1, 
+           boundary_point2,
+           boundary_point3,
+           boundary_point4,
+           boundary_point5;                     // <= 5 support point 
+    Conic  conic1, conic2;                      // two conics 
+
+    // this gradient vector has dr=0 and is used in testing the
+    // position of a point relative to an ellipse through 4 points
+    mutable RT     dr, ds, dt, du, dv, dw;  
+    mutable bool   d_values_set; 
+    
+    // this gradient vector is just conic2 - conic1 and is used in
+    // obtaining an explicit conic representing an ellipse through 4 poinnts
+    mutable RT     er, es, et, eu, ev, ew;
+    mutable bool e_values_set;
+
+    // needed in bounded-side predicate over ellipse with 4 support points
+    mutable Conic helper_ellipse; // needed in bounded-side predicate over 
+    mutable bool helper_ellipse_set;
+
+    mutable Conic helper_conic; // also needed in bounded-side test
+
+// ============================================================================
+
+// Class implementation
+// ====================
+
+  public:
+    // Constructor
+    // -----------
+    inline
+    Optimisation_ellipse_2( ) { }
+
+    // Set functions
+    // -------------
+    void
+    set( )
+    {
+        n_boundary_points = 0;
+    }
+    
+    void
+    set( const Point& p)
+    {
+        n_boundary_points = 1;
+        boundary_point1   = p;
+    }
+    
+    void
+    set( const Point& p, const Point& q)
+    {
+        n_boundary_points = 2;
+        CGAL_optimisation_precondition(boundary_point1 == p); CGAL_USE(p);
+        boundary_point2 = q;
+    }
+    
+    void
+    set( const Point& p1, const Point& p2, const Point& p3)
+    {       
+        n_boundary_points = 3;        
+	CGAL_optimisation_precondition(boundary_point1 == p1);
+        CGAL_optimisation_precondition(boundary_point2 == p2);
+	boundary_point3 = p3;
+        helper_conic.set_ellipse( p1, p2, p3);
+	CGAL_optimisation_assertion(helper_conic.is_ellipse());
+    }
+    
+    void
+    set( const Point& p1, const Point& p2, const Point& p3, const Point& p4)
+    {
+        n_boundary_points = 4;	
+	CGAL_optimisation_precondition(boundary_point1 == p1);
+        CGAL_optimisation_precondition(boundary_point2 == p2);
+	CGAL_optimisation_precondition(boundary_point3 == p3);
+        boundary_point4 = p4;
+        Conic::set_two_linepairs( p1, p2, p3, p4, conic1, conic2);
+
+	d_values_set = false;
+	e_values_set = false;
+	helper_ellipse_set = false;	
+    }
+
+    void
+    set_d_values() const
+    {
+      if (!d_values_set) {
+        dr = RT( 0);
+        ds = conic1.r() * conic2.s() - conic2.r() * conic1.s(),
+        dt = conic1.r() * conic2.t() - conic2.r() * conic1.t(),
+        du = conic1.r() * conic2.u() - conic2.r() * conic1.u(),
+        dv = conic1.r() * conic2.v() - conic2.r() * conic1.v(),
+        dw = conic1.r() * conic2.w() - conic2.r() * conic1.w();
+	d_values_set = true;
+      }
+    }
+
+    void
+    set_e_values() const
+    {
+      if (!e_values_set) {
+       	er = conic2.r() - conic1.r();
+	es = conic2.s() - conic1.s();
+	et = conic2.t() - conic1.t();
+	eu = conic2.u() - conic1.u();
+	ev = conic2.v() - conic1.v();
+	ew = conic2.w() - conic1.w();
+	e_values_set = true;
+      }
+    }
+
+    void
+    set_helper_ellipse () const
+    {
+      if (!helper_ellipse_set) {
+        helper_ellipse.set_ellipse( conic1, conic2);
+        helper_ellipse.analyse();
+	CGAL_optimisation_assertion (helper_ellipse.is_ellipse());
+	helper_ellipse_set= true;
+      }
+    }
+
+    void
+    set( const Point& p1, const Point& p2,
+         const Point& p3, const Point& p4, const Point& p5)
+    { 
+        helper_conic.set(conic1, conic2, p5);
+	helper_conic.analyse();
+	// an optimization is possible if this set-call arose from
+	// a successful violation test of ME(p1,p2,p3,p4) and p5.
+	// In that case, helper_conic is already correct, 
+	// but in general, this optimization is NOT valid.
+	n_boundary_points = 5;
+	CGAL_optimisation_assertion(helper_conic.is_ellipse());	
+	// the following assertion is too strict if we run under
+	// double (which is sometimes the case, e.g. in demos)
+	// CGAL_optimisation_assertion(helper_conic.has_on_boundary(p5));
+	CGAL_optimisation_precondition(boundary_point1 == p1);
+        CGAL_optimisation_precondition(boundary_point2 == p2);
+	CGAL_optimisation_precondition(boundary_point3 == p3);
+        CGAL_optimisation_precondition(boundary_point4 == p4);
+	CGAL_USE(p1); CGAL_USE(p2); CGAL_USE(p3); CGAL_USE(p4);
+	boundary_point5 = p5;
+    }
+
+    // Access functions
+    // ----------------
+    inline
+    int
+    number_of_boundary_points( ) const
+    {
+        return( n_boundary_points);
+    }
+    
+    template <typename DoubleConic_2>
+    void
+    double_conic(DoubleConic_2& e) const
+    {
+        double r,s,t,u,v,w;
+	double_coefficients(r,s,t,u,v,w);
+        e.set(r,s,t,u,v,w);
+	// NOTE: the set method calls analyze, so the conic is clean
+    }
+
+    void 
+    double_coefficients (double &r, double &s,double &t,
+                         double &u, double &v, double &w) const
+    {
+      // just like double_conic, but we only get the coefficients
+      CGAL_optimisation_precondition( ! is_degenerate());
+    
+      if ( n_boundary_points == 4) {
+        set_e_values();
+        double tau = conic1.vol_minimum( er, es, et, eu, ev, ew);
+	r = CGAL::to_double( conic1.r()) + tau*CGAL::to_double( er);
+	s = CGAL::to_double( conic1.s()) + tau*CGAL::to_double( es);
+	t = CGAL::to_double( conic1.t()) + tau*CGAL::to_double( et);
+	u = CGAL::to_double( conic1.u()) + tau*CGAL::to_double( eu);
+	v = CGAL::to_double( conic1.v()) + tau*CGAL::to_double( ev);
+	w = CGAL::to_double( conic1.w()) + tau*CGAL::to_double( ew);
+      } else {
+	// it's the helper_conic
+	r = CGAL::to_double(helper_conic.r());
+	s = CGAL::to_double(helper_conic.s());
+	t = CGAL::to_double(helper_conic.t());
+	u = CGAL::to_double(helper_conic.u());
+	v = CGAL::to_double(helper_conic.v());
+        w = CGAL::to_double(helper_conic.w());
+      }
+    }
+
+
+    // Equality tests
+    // --------------
+    bool
+    operator == ( const Optimisation_ellipse_2<K>& e) const
+    {
+        if ( n_boundary_points != e.n_boundary_points)
+            return( false);
+    
+        switch ( n_boundary_points) {
+          case 0:
+            return( true);
+          case 1:
+            return( boundary_point1 == e.boundary_point1);
+          case 2:
+            return(    (    ( boundary_point1 == e.boundary_point1)
+                         && ( boundary_point2 == e.boundary_point2))
+                    || (    ( boundary_point1 == e.boundary_point2)
+                         && ( boundary_point2 == e.boundary_point1)));
+          case 3:
+          case 5:
+            return( helper_conic == e.helper_conic);
+          case 4:
+            return(    (    ( conic1 == e.conic1)
+                         && ( conic2 == e.conic2))
+                    || (    ( conic1 == e.conic2)
+                         && ( conic2 == e.conic1)));
+          default:
+            CGAL_optimisation_assertion(    ( n_boundary_points >= 0)
+                                         && ( n_boundary_points <= 5)); }
+        // keeps g++ happy
+        return( false);
+    }
+    
+    inline
+    bool
+    operator != ( const Optimisation_ellipse_2<K>& e) const
+    {
+        return( ! operator == ( e));
+    }
+
+    // Predicates
+    // ----------
+    inline
+    CGAL::Bounded_side
+    bounded_side( const Point& p) const
+    {
+        switch ( n_boundary_points) {
+          case 0:
+            return( CGAL::ON_UNBOUNDED_SIDE);
+          case 1:
+            return( ( p == boundary_point1) ?
+                           CGAL::ON_BOUNDARY : CGAL::ON_UNBOUNDED_SIDE);
+          case 2:
+            return(    ( p == boundary_point1)
+                    || ( p == boundary_point2)
+                    || ( CGAL::are_ordered_along_line(
+                             boundary_point1, p, boundary_point2)) ?
+                         CGAL::ON_BOUNDARY : CGAL::ON_UNBOUNDED_SIDE);
+          case 3:
+          case 5:
+            return(helper_conic.convex_side( p));
+          case 4: {
+            helper_conic.set( conic1, conic2, p);
+            helper_conic.analyse();
+            if ( !helper_conic.is_ellipse()) {
+	        set_helper_ellipse();
+                return( helper_ellipse.convex_side( p)); }
+            else {
+	        set_d_values();
+                int tau_star = 
+                  helper_conic.vol_derivative( dr, ds, dt, du, dv, dw);
+                return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } }
+          default:
+            CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
+                                         ( n_boundary_points <= 5) ); }
+        // keeps g++ happy
+        return( CGAL::Bounded_side( 0));
+    }
+    
+    inline
+    bool
+    has_on_bounded_side( const Point& p) const
+    {
+        return( bounded_side( p) == CGAL::ON_BOUNDED_SIDE);
+    }
+    
+    inline
+    bool
+    has_on_boundary( const Point& p) const
+    {
+        return( bounded_side( p) == CGAL::ON_BOUNDARY);
+    }
+    
+    inline
+    bool
+    has_on_unbounded_side( const Point& p) const
+    {
+        return( bounded_side( p) == CGAL::ON_UNBOUNDED_SIDE);
+    }
+    
+    inline
+    bool
+    is_empty( ) const
+    {
+        return( n_boundary_points == 0);
+    }
+    
+    inline
+    bool
+    is_degenerate( ) const
+    {
+        return( n_boundary_points < 3);
+    }
+
+    bool
+    is_circle( ) const
+    {
+       switch ( n_boundary_points) {
+       case 0: 
+	 return false; // the empty set is not a circle
+       case 1:
+	 return true;  
+       case 2:
+	 return false; // a segment is not a circle
+       case 3:
+       case 5:
+	 return helper_conic.is_circle();
+       case 4:
+	 // the smallest ellipse through four points is
+	 // a circle only if the four points are cocircular;
+	 // if so, compute this circle (as a conic) and check
+	 // its volume derivative
+	 if (CGAL::ON_BOUNDARY !=  CGAL::side_of_bounded_circle
+	           (boundary_point1, 
+                    boundary_point2,
+                    boundary_point3,
+                    boundary_point4)) {
+	   return false;
+	 } else {
+	   // ok, they are cocircular, now get the circle and check it
+	   Conic c;
+	   c.set_circle(boundary_point1, boundary_point2, boundary_point3);
+           set_d_values();
+	   return (CGAL::ZERO ==  (c.vol_derivative(dr, ds, dt, du, dv, dw)));
+	 }
+       default:
+	 CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
+                                      ( n_boundary_points <= 5) ); 
+	 return false;
+       }
+    }
+};
+
+// Function declarations
+// =====================
+// I/O
+// ---
+template < class K_ >
+std::ostream&
+operator << ( std::ostream&, const CGAL::Optimisation_ellipse_2<K_>&);
+
+template < class K_ >
+std::istream&
+operator >> ( std::istream&, CGAL::Optimisation_ellipse_2<K_>&);
+
+} //namespace CGAL
+
+#include <CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h>
+
+#endif // CGAL_OPTIMISATION_ELLIPSE_2_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_ellipse_2_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_ellipse_2_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_quadrilateral_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_quadrilateral_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_quadrilateral_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_quadrilateral_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_annulus_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_annulus_d_traits_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d.h
new file mode 100644
index 0000000..be117d9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d.h
@@ -0,0 +1,462 @@
+// Copyright (c) 1997  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.fu-berlin.de>
+//                 Bernd Gaertner
+
+#ifndef CGAL_MIN_SPHERE_D_H
+#define CGAL_MIN_SPHERE_D_H
+
+// Class declarations
+// ==================
+
+// Class interface and implementation
+// ==================================
+// includes
+
+#  include <CGAL/basic.h>
+
+#  include <CGAL/Optimisation/assertions.h>
+
+#  include <CGAL/Optimisation/basic.h>
+
+#  include <CGAL/Min_sphere_d/Optimisation_sphere_d.h>
+
+
+#include <list>
+
+#include <iostream>
+
+namespace CGAL {
+
+
+template <class Traits>
+class Min_sphere_d
+{
+    
+    
+    public:
+        typedef typename Traits::Rep_tag        Rep_tag;
+        typedef typename Traits::RT             RT;
+        typedef typename Traits::FT             FT;
+        typedef typename Traits::Point_d        Point; // Point type
+    
+        typedef  typename Traits::Access_dimension_d
+          Access_dimension_d;
+        typedef  typename Traits::Access_coordinates_begin_d
+          Access_coordinates_begin_d;
+        typedef  typename Traits::Construct_point_d
+          Construct_point_d;
+    
+        typedef typename std::list<Point>::const_iterator
+                Point_iterator;
+        typedef typename std::list<Point>::const_iterator
+                Support_point_iterator;
+    
+    private:
+        typedef typename std::list<Point>::iterator             It;
+    
+    
+    private:
+        int                                     d;            // ambient dim
+        std::list<Point>                        points;       // keeps P = Q_n
+        Traits                                  tco;          // traits object
+        Optimisation_sphere_d<Rep_tag, FT, RT, Point,Traits>
+                                                ms_basis; // keeps  miniball
+        It                                      support_end;  // delimites S
+    
+public:
+    Min_sphere_d ()
+    : d(-1), tco( Traits()), ms_basis (tco),
+      support_end(points.begin())
+        {}
+    
+    
+    Min_sphere_d (const Traits& traits)
+    : d(-1), tco( traits), ms_basis (tco),
+      support_end(points.begin())
+        {}
+    
+    
+
+ 
+    // STL-like constructor (member template)
+    template <class InputIterator>
+    Min_sphere_d( InputIterator first,
+                       InputIterator last)
+      : d(-1), 
+#if ( _MSC_VER != 1300)
+      points( first, last), 
+#endif
+      tco( Traits()), 
+      ms_basis (tco) 
+#if ( _MSC_VER != 1300)
+      ,support_end(points.begin())
+#endif
+    {
+#if ( _MSC_VER == 1300)
+      std::copy(first,last,std::back_inserter(points));
+      support_end = points.begin();
+#endif
+        if (points.size()>0) {
+            d = tco.access_dimension_d_object() (points.front());
+            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d));
+            ms_basis.get_sphere(Rep_tag()).set_size (d);
+            pivot_ms();
+        }
+    }
+    
+    template <class InputIterator>
+    Min_sphere_d( InputIterator first,
+                       InputIterator last,
+                       const Traits& traits)
+      : d(-1),
+#if ( _MSC_VER != 1300)
+      points( first, last), 
+#endif
+      tco( traits), 
+      ms_basis (tco)
+#if ( _MSC_VER != 1300)
+      ,support_end(points.begin())
+#endif
+
+    {
+#if ( _MSC_VER == 1300)
+      std::copy(first,last,std::back_inserter(points));
+      support_end = points.begin();
+#endif
+        if (points.size()>0) {
+            d = tco.access_dimension_d_object() (points.front());
+            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d));
+            ms_basis.get_sphere(Rep_tag()).set_size (d);
+            pivot_ms();
+        }
+    }
+    
+    Min_sphere_d (const Min_sphere_d& msph)
+    : d(msph.ambient_dimension()),
+      points (msph.points_begin(), msph.points_end()), tco (msph.tco),
+          ms_basis (tco), support_end (points.begin())
+    
+    {
+        if (d != -1) {
+            ms_basis.get_sphere(Rep_tag()).set_size (d);
+            pivot_ms();
+        }
+    }
+    
+    Min_sphere_d& operator=(const Min_sphere_d& msph)
+    {
+        if (this != &msph) {
+            points.erase (points.begin(), points.end());
+            d = msph.ambient_dimension();
+            points.insert
+              (points.begin(), msph.points_begin(), msph.points_end());
+              ms_basis.get_sphere(Rep_tag()).set_tco(msph.tco);
+            support_end = points.begin();
+            tco = msph.tco;
+            if (d != -1) {
+                ms_basis.get_sphere(Rep_tag()).set_size (d);
+                pivot_ms();
+            }
+        }
+        return *this;
+    }
+    
+    
+    int number_of_points() const
+    {
+        return static_cast<int>(points.size());
+    }
+    
+    int number_of_support_points() const
+    {
+        return ms_basis.get_sphere(Rep_tag()).number_of_support_points();
+    }
+    
+    Point_iterator points_begin () const
+    {
+        return points.begin();
+    }
+    
+    Point_iterator points_end () const
+    {
+        return points.end();
+    }
+    
+    Support_point_iterator support_points_begin () const
+    {
+        return points.begin();
+    }
+    
+    Support_point_iterator support_points_end () const
+    {
+        return support_end;
+    }
+    
+    int ambient_dimension () const
+    {
+        return d;
+    }
+    
+    Point center () const
+    {
+        CGAL_optimisation_precondition (!is_empty());
+        return ms_basis.get_sphere(Rep_tag()).center();
+    }
+    
+    FT squared_radius () const
+    {
+        CGAL_optimisation_precondition (!is_empty());
+        return ms_basis.get_sphere(Rep_tag()).squared_radius();
+    }
+    
+    
+    Bounded_side bounded_side (const Point& p) const
+    {
+        if (d == -1)
+           return ON_UNBOUNDED_SIDE;
+        else {
+          CGAL_optimisation_precondition
+           (d == tco.access_dimension_d_object()(p));
+           return (Bounded_side
+               (-CGAL::sign (ms_basis.get_sphere(Rep_tag()).excess (p))));
+        }
+    }
+    
+    bool has_on_bounded_side (const Point& p) const
+    {
+        if (d == -1)
+           return false;
+        else {
+          CGAL_optimisation_precondition
+           (d == tco.access_dimension_d_object()(p));
+           return (CGAL_NTS is_negative (ms_basis.get_sphere(Rep_tag()).excess (p)));
+        }
+    }
+    
+    bool has_on_unbounded_side (const Point& p) const
+    {
+        if (d == -1)
+           return true;
+        else {
+          CGAL_optimisation_precondition
+          (d == tco.access_dimension_d_object()(p));
+           return (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess (p)));
+        }
+    }
+    
+    bool has_on_boundary (const Point& p) const
+    {
+        if (d == -1)
+           return false;
+        else {
+          CGAL_optimisation_precondition
+          (d == tco.access_dimension_d_object()(p));
+           return (CGAL_NTS is_zero (ms_basis.get_sphere(Rep_tag()).excess (p)));
+        }
+    }
+    
+    bool is_empty () const
+    {
+        return (d == -1);
+    }
+    
+    bool is_degenerate () const
+    {
+        return (ms_basis.get_sphere(Rep_tag()).number_of_support_points() < 2);
+    }
+    
+    
+    void clear ()
+    {
+         d = -1;
+         points.erase (points.begin(), points.end());
+         ms_basis.get_sphere(Rep_tag()).set_size (-1);
+         support_end = points.begin();
+    }
+    
+    // STL-like set(member template)
+    template <class InputIterator>
+    void set ( InputIterator first,
+               InputIterator last)
+    {
+        points.erase (points.begin(), points.end());
+        points.insert (points.begin(), first, last);
+        support_end = points.begin();
+        if (points.size()>0) {
+            d = tco.access_dimension_d_object() (points.front());
+            CGAL_optimisation_precondition ((d>=0) && all_points_have_dim (d));
+            ms_basis.get_sphere(Rep_tag()).set_size (d);
+            pivot_ms();
+        } else {
+            d = -1;
+            ms_basis.get_sphere(Rep_tag()).set_size (-1);
+        }
+    }
+    
+    void insert (const Point& p)
+    {
+        if (has_on_unbounded_side (p)) {
+            if (is_empty()) {
+                d = tco.access_dimension_d_object() (p);
+                CGAL_optimisation_precondition (d>=0);
+                ms_basis.get_sphere(Rep_tag()).set_size (d);
+            }
+            // ensure precondition of pivot_ms
+            ms_basis.get_sphere(Rep_tag()).push (p);
+            pivot_ms ();
+            ms_basis.get_sphere(Rep_tag()).pop ();
+            points.push_front (p);  // ensure postcondition of insert
+        } else
+            points.push_back (p);   // just append p
+        if (support_end == points.end()) --support_end;
+    }
+    
+    template <class InputIterator>
+    void insert (InputIterator first, InputIterator last)
+    {
+        for (InputIterator i=first; i!=last; ++i)
+            insert (*i);
+    }
+    
+    
+  bool is_valid (bool verbose = false, int /* level */ = 0) const
+    {
+        Verbose_ostream verr (verbose);
+    
+        // sphere verification
+        verr << "  (a) sphere verification..." << std::flush;
+        if (ms_basis.get_sphere(Rep_tag()).is_valid (verbose))
+            verr << "passed." << std::endl;
+        else
+            return false;
+    
+        // containment check
+        verr << "  (b) containment check..." << std::flush;
+    
+        // non-support-points
+        Point_iterator i;
+        for (i=support_end; i!=points.end(); ++i)
+            if (has_on_unbounded_side (*i))
+                return (_optimisation_is_valid_fail (verr,
+                  "sphere does not contain all points"));
+    
+        // support points
+        for (i=points.begin(); i!=support_end; ++i)
+            if (!has_on_boundary (*i))
+                return (_optimisation_is_valid_fail (verr,
+                  "sphere does not have all support points on boundary"));
+    
+        verr << "passed." << std::endl;
+        verr << "object is valid!" << std::endl;
+        return true;
+    }
+    
+    
+    const Traits& traits() const
+    {
+         return tco;
+    }
+    
+    
+private:
+    void mtf_ms (It k)
+    {
+        support_end = points.begin();
+        if (ms_basis.get_sphere(Rep_tag()).size_of_basis()==d+1) return;
+        for (It i = points.begin(); i!=k;) {
+            It j = i++;
+            if (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess(*j))) {
+                ms_basis.get_sphere(Rep_tag()).push (*j);
+                mtf_ms (j);
+                ms_basis.get_sphere(Rep_tag()).pop();
+                move_to_front (j);
+            }
+        }
+    }
+    
+    
+    void pivot_ms ()
+    {
+        It t = points.begin();
+        std::advance (t, (std::min) (d+1, (int)points.size()));
+        mtf_ms (t);
+    
+        RT excess, e;
+        do {
+            excess = RT(0);
+            It pivot;
+            for (It i=t; i!=points.end(); ++i) {
+                e = ms_basis.get_sphere(Rep_tag()).excess(*i);
+                if (e > excess) {
+                   excess = e;
+                   pivot = i;
+                }
+            }
+            if (CGAL_NTS is_positive (excess)) {
+                t = support_end;
+                if (t==pivot) ++t; //  inserted from the esa code
+                ms_basis.get_sphere(Rep_tag()).push (*pivot);
+                mtf_ms (support_end);
+                ms_basis.get_sphere(Rep_tag()).pop();
+                move_to_front (pivot);
+            }
+        } while (CGAL_NTS is_positive (excess));
+    }
+    
+    
+    void move_to_front (It j)
+    {
+        if (support_end == j)
+           ++support_end;
+        points.splice (points.begin(), points, j);
+    }
+    
+    
+    bool all_points_have_dim (int dim) const
+    {
+        for (Point_iterator i=points.begin(); i!=points.end(); ++i)
+            if (tco.access_dimension_d_object()(*i) != dim)
+                return false;
+        return true;
+    }
+    
+    
+};
+
+// Function declarations
+// =====================
+// I/O
+// ---
+
+template < class Traits >
+std::ostream&
+operator << ( std::ostream& os, const Min_sphere_d<Traits>& ms);
+
+template < class Traits >
+std::istream&
+operator >> ( std::istream& is, Min_sphere_d<Traits> & ms);
+
+} //namespace CGAL
+
+#include <CGAL/Min_sphere_d/Min_sphere_d_impl.h>
+
+#endif // CGAL_MIN_SPHERE_D_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_points_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_points_d_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Min_sphere_of_spheres_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Min_sphere_of_spheres_d_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minimum_enclosing_quadrilateral_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minimum_enclosing_quadrilateral_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Minimum_enclosing_quadrilateral_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Minimum_enclosing_quadrilateral_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h
new file mode 100644
index 0000000..823febd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h
@@ -0,0 +1,102 @@
+// Copyright (c) 2015  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s): Sebastian Morr    <sebastian at morr.cc>
+
+#ifndef CGAL_AABB_COLLISION_DETECTOR_2_H
+#define CGAL_AABB_COLLISION_DETECTOR_2_H
+
+#include <CGAL/Minkowski_sum_2/AABB_tree_with_join.h>
+#include <CGAL/Minkowski_sum_2/AABB_traits_2.h>
+#include <CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h>
+
+namespace CGAL {
+
+// Tests whether two polygons P and Q overlap for different translations of Q.
+template <class Kernel_, class Container_>
+class AABB_collision_detector_2
+{
+public:
+  typedef Kernel_                                       Kernel;
+  typedef Container_                                    Container;
+
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Kernel::Vector_2                     Vector_2;
+  typedef typename CGAL::Polygon_2<Kernel, Container>   Polygon_2;
+  typedef typename CGAL::Polygon_with_holes_2<Kernel, Container>
+                                                        Polygon_with_holes_2;
+  typedef typename Polygon_2::Edge_const_iterator       Edge_iterator;
+  typedef AABB_segment_2_primitive<Kernel, Edge_iterator, Polygon_with_holes_2>
+                                                        Tree_segment_2;
+  typedef AABB_traits_2<Kernel, Tree_segment_2>         Tree_traits;
+  typedef AABB_tree_with_join<Tree_traits>              Tree_2;
+
+public:
+  AABB_collision_detector_2(const Polygon_with_holes_2& p,
+                            const Polygon_with_holes_2& q) :
+    m_p(q), m_q(p)
+  {
+    m_stationary_tree.insert(p.outer_boundary().edges_begin(),
+                             p.outer_boundary().edges_end());
+
+    typename Polygon_with_holes_2::Hole_const_iterator it = p.holes_begin();
+    while (it != p.holes_end())
+    {
+      m_stationary_tree.insert(it->edges_begin(), it->edges_end());
+      ++it;
+    }
+
+    m_translating_tree.insert(q.outer_boundary().edges_begin(),
+                              q.outer_boundary().edges_end());
+
+    it = q.holes_begin();
+    while (it != q.holes_end())
+    {
+      m_translating_tree.insert(it->edges_begin(), it->edges_end());
+      ++it;
+    }
+  }
+
+  // Returns true iff the polygons' boundaries intersect or one polygon is
+  // completely inside of the other one. Q is translated by t.
+  bool check_collision(const Point_2 &t)
+  {
+    if (m_stationary_tree.do_intersect(m_translating_tree, t)) return true;
+
+    // If t_q is inside of P, or t_p is inside of Q, one polygon is completely
+    // inside of the other.
+    Point_2 t_q = *m_q.outer_boundary().vertices_begin() + Vector_2(ORIGIN, t);
+    Point_2 t_p = *m_p.outer_boundary().vertices_begin() - Vector_2(ORIGIN, t);
+
+    // Use bounded_side_2() instead of on_bounded_side() because the latter
+    // checks vor simplicity every time.
+    return
+      bounded_side_2(m_p.outer_boundary().vertices_begin(),
+                     m_p.outer_boundary().vertices_end(), t_q,
+                     m_p.outer_boundary().traits_member()) == ON_BOUNDED_SIDE ||
+      bounded_side_2(m_q.outer_boundary().vertices_begin(),
+                     m_q.outer_boundary().vertices_end(), t_p,
+                     m_q.outer_boundary().traits_member()) == ON_BOUNDED_SIDE;
+  }
+
+private:
+  Tree_2 m_stationary_tree;
+  Tree_2 m_translating_tree;
+  const Polygon_with_holes_2& m_p;
+  const Polygon_with_holes_2& m_q;
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h
new file mode 100644
index 0000000..d43cd25
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h
@@ -0,0 +1,285 @@
+// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb
+
+#ifndef CGAL_AABB_NODE_WITH_JOIN_H
+#define CGAL_AABB_NODE_WITH_JOIN_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Bbox_3.h>
+#include <vector>
+
+namespace CGAL {
+
+/**
+ * @class AABB_node_with_join
+ *
+ *
+ */
+template<typename AABBTraits>
+class AABB_node_with_join
+{
+public:
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+
+  /// Constructor
+  AABB_node_with_join()
+    : m_bbox()
+    , m_p_left_child(NULL)
+    , m_p_right_child(NULL)      { };
+
+  /// Non virtual Destructor
+  /// Do not delete children because the tree hosts and delete them
+  ~AABB_node_with_join() { };
+
+  /// Returns the bounding box of the node
+  const Bounding_box& bbox() const { return m_bbox; }
+
+  /**
+   * @brief Builds the tree by recursive expansion.
+   * @param first the first primitive to insert
+   * @param last the last primitive to insert
+   * @param range the number of primitive of the range
+   *
+   * [first,last[ is the range of primitives to be added to the tree.
+   */
+  template<typename ConstPrimitiveIterator>
+  void expand(ConstPrimitiveIterator first,
+              ConstPrimitiveIterator beyond,
+              const std::size_t range,
+              const AABBTraits&);
+
+  /**
+   * @brief General traversal query
+   * @param query the query
+   * @param traits the traversal traits that define the traversal behaviour
+   * @param nb_primitives the number of primitive
+   *
+   * General traversal query. The traits class allows using it for the various
+   * traversal methods we need: listing, counting, detecting intersections,
+   * drawing the boxes.
+   */
+  template<class Traversal_traits, class Query>
+  void traversal(const Query& query,
+                 Traversal_traits& traits,
+                 const std::size_t nb_primitives) const;
+
+  /**
+   * @param other_node root node of a tree which we want to traverse in parallel
+   * @param traits the traversal traits that define the traversal behaviour
+   * @param nb_primitives the number of primitives in this tree
+   * @param nb_primitives_other the number of primitives in the other tree
+   * @param first_stationary if true, the other_node is the translatable tree's root
+   *
+   * General traversal query for two trees.
+   */
+  template<class Traversal_traits>
+  void traversal(const AABB_node_with_join &other_node,
+                 Traversal_traits &traits,
+                 const std::size_t nb_primitives,
+                 const std::size_t nb_primitives_other,
+                 bool first_stationary) const;
+
+private:
+  typedef AABBTraits AABB_traits;
+  typedef AABB_node_with_join<AABB_traits> Node;
+  typedef typename AABB_traits::Primitive Primitive;
+
+  /// Helper functions
+  const Node& left_child() const
+                     { return *static_cast<Node*>(m_p_left_child); }
+  const Node& right_child() const
+                     { return *static_cast<Node*>(m_p_right_child); }
+  const Primitive& left_data() const
+                     { return *static_cast<Primitive*>(m_p_left_child); }
+  const Primitive& right_data() const
+                     { return *static_cast<Primitive*>(m_p_right_child); }
+
+  Node& left_child() { return *static_cast<Node*>(m_p_left_child); }
+  Node& right_child() { return *static_cast<Node*>(m_p_right_child); }
+  Primitive& left_data() { return *static_cast<Primitive*>(m_p_left_child); }
+  Primitive& right_data() { return *static_cast<Primitive*>(m_p_right_child); }
+
+private:
+  /// node bounding box
+  Bounding_box m_bbox;
+
+  /// children nodes, either pointing towards children (if children are not leaves),
+  /// or pointing toward input primitives (if children are leaves).
+  void *m_p_left_child;
+  void *m_p_right_child;
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef AABB_node_with_join<AABBTraits> Self;
+  AABB_node_with_join(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class AABB_node_with_join
+
+
+template<typename Tr>
+template<typename ConstPrimitiveIterator>
+void
+AABB_node_with_join<Tr>::expand(ConstPrimitiveIterator first,
+                      ConstPrimitiveIterator beyond,
+                      const std::size_t range,
+                      const Tr& traits)
+{
+  m_bbox = traits.compute_bbox_object()(first, beyond);
+
+  // sort primitives along longest axis aabb
+  traits.sort_primitives_object()(first, beyond, m_bbox);
+
+  switch(range)
+  {
+  case 2:
+    m_p_left_child = &(*first);
+    m_p_right_child = &(*(++first));
+    break;
+  case 3:
+    m_p_left_child = &(*first);
+    m_p_right_child = static_cast<Node*>(this)+1;
+    right_child().expand(first+1, beyond, 2,traits);
+    break;
+  default:
+    const std::size_t new_range = range/2;
+    m_p_left_child = static_cast<Node*>(this) + 1;
+    m_p_right_child = static_cast<Node*>(this) + new_range;
+    left_child().expand(first, first + new_range, new_range,traits);
+    right_child().expand(first + new_range, beyond, range - new_range,traits);
+  }
+}
+
+
+template<typename Tr>
+template<class Traversal_traits, class Query>
+void
+AABB_node_with_join<Tr>::traversal(const Query& query,
+                         Traversal_traits& traits,
+                         const std::size_t nb_primitives) const
+{
+  // Recursive traversal
+  switch(nb_primitives)
+  {
+  case 2:
+    traits.intersection(query, left_data());
+    if( traits.go_further() )
+    {
+      traits.intersection(query, right_data());
+    }
+    break;
+  case 3:
+    traits.intersection(query, left_data());
+    if( traits.go_further() && traits.do_intersect(query, right_child()) )
+    {
+      right_child().traversal(query, traits, 2);
+    }
+    break;
+  default:
+    if( traits.do_intersect(query, left_child()) )
+    {
+      left_child().traversal(query, traits, nb_primitives/2);
+      if( traits.go_further() && traits.do_intersect(query, right_child()) )
+      {
+        right_child().traversal(query, traits, nb_primitives-nb_primitives/2);
+      }
+    }
+    else if( traits.do_intersect(query, right_child()) )
+    {
+      right_child().traversal(query, traits, nb_primitives-nb_primitives/2);
+    }
+  }
+}
+
+template<typename Tr>
+template<class Traversal_traits>
+void
+AABB_node_with_join<Tr>::traversal(const AABB_node_with_join &other_node,
+                         Traversal_traits &traits,
+                         const std::size_t nb_primitives,
+                         const std::size_t nb_primitives_other,
+                         bool first_stationary) const
+{
+  if (nb_primitives >= nb_primitives_other)
+  {
+    switch(nb_primitives)
+    {
+      case 2: // Both trees contain 2 primitives, test all pairs
+        traits.intersection(left_data(), other_node.left_data(), first_stationary);
+        if (!traits.go_further()) return;
+        traits.intersection(right_data(), other_node.right_data(), first_stationary);
+        if (!traits.go_further()) return;
+        traits.intersection(right_data(), other_node.left_data(), first_stationary);
+        if (!traits.go_further()) return;
+        traits.intersection(left_data(), other_node.right_data(), first_stationary);
+        break;
+
+      case 3: // This tree contains 3 primitives, the other 3 or 2
+        // Both left children are primitives:
+        traits.intersection(left_data(), other_node.left_data(), first_stationary);
+        if (!traits.go_further()) return;
+
+        // Test left child against all right leaves of the other tree
+        if (nb_primitives_other == 2)
+        {
+          traits.intersection(left_data(), other_node.right_data(), first_stationary);
+        }
+        else
+        {
+          if (traits.do_intersect(left_data(), other_node.right_child(), first_stationary))
+          {
+            traits.intersection(left_data(), other_node.right_child().left_data(), first_stationary);
+            if (!traits.go_further()) return;
+            traits.intersection(left_data(), other_node.right_child().right_data(), first_stationary);
+          }
+        }
+        if (!traits.go_further()) return;
+
+        // Test right child against the other node
+        if(traits.do_intersect(right_child(), other_node, first_stationary))
+        {
+          right_child().traversal(other_node, traits, 2, nb_primitives_other, first_stationary);
+        }
+        break;
+
+      default: // This tree has two node-children, test both against the other node
+        if( traits.do_intersect(left_child(), other_node, first_stationary) )
+        {
+          left_child().traversal(other_node, traits, nb_primitives/2, nb_primitives_other, first_stationary);
+        }
+        if (!traits.go_further()) return;
+        if( traits.do_intersect(right_child(), other_node, first_stationary) )
+        {
+          right_child().traversal(other_node, traits, nb_primitives-nb_primitives/2, nb_primitives_other, first_stationary);
+        }
+    }
+  }
+  else
+  {
+    // The other node contains more primitives. Call this method the other way around:
+    other_node.traversal(*this, traits, nb_primitives_other, nb_primitives, !first_stationary);
+  }
+}
+
+} // end namespace CGAL
+
+#endif // CGAL_AABB_NODE_WITH_JOIN_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h
new file mode 100644
index 0000000..4513e5a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h
@@ -0,0 +1,69 @@
+// Copyright (c) 2015  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s): Sebastian Morr    <sebastian at morr.cc>
+
+#ifndef CGAL_AABB_SEGMENT_2_PRIMITIVE_H
+#define CGAL_AABB_SEGMENT_2_PRIMITIVE_H
+
+namespace CGAL {
+
+// Wraps around a Segment_2 and provides its iterator as Id
+template <class GeomTraits, class Iterator_, class ContainerType>
+class AABB_segment_2_primitive
+{
+
+public:
+
+  typedef Iterator_ Id;
+  typedef typename GeomTraits::Segment_2 Datum;
+  typedef typename GeomTraits::Point_2 Point;
+  typedef ContainerType Container;
+
+  AABB_segment_2_primitive() {}
+
+  AABB_segment_2_primitive(Id it) : m_it(it)
+  {
+  }
+
+  AABB_segment_2_primitive(const AABB_segment_2_primitive &primitive)
+  {
+    m_it = primitive.id();
+  }
+
+  const Id &id() const
+  {
+    return m_it;
+  }
+
+  const Datum datum() const
+  {
+    return *m_it;
+  }
+
+  // Return a point on the primitive
+  Point reference_point() const
+  {
+    return m_it->source();
+  }
+
+private:
+
+  Id m_it;
+
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traits_2.h
new file mode 100644
index 0000000..f3853d6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traits_2.h
@@ -0,0 +1,221 @@
+// Copyright (c) 2015  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s): Sebastian Morr    <sebastian at morr.cc>
+
+#ifndef CGAL_AABB_TRAITS_2_H
+#define CGAL_AABB_TRAITS_2_H
+
+namespace CGAL {
+
+template<typename GeomTraits, typename AABB_primitive_>
+class AABB_traits_2
+{
+
+public:
+
+  typedef AABB_primitive_ Primitive;
+  typedef typename Primitive::Id Id;
+  typedef typename Primitive::Datum Datum;
+  typedef typename Primitive::Container Container;
+
+  typedef typename GeomTraits::Point_2 Point;
+  typedef typename GeomTraits::Vector_2 Vector_2;
+  typedef typename CGAL::Bbox_2 Bounding_box;
+
+  typedef typename std::pair<Object, Id> Object_and_primitive_id;
+  typedef typename std::pair<Point, Id> Point_and_primitive_id;
+
+  // Types for AABB_tree
+  typedef typename GeomTraits::FT FT;
+  typedef typename GeomTraits::Point_2 Point_3;
+  typedef typename GeomTraits::Circle_2 Sphere_3;
+  typedef typename GeomTraits::Iso_rectangle_2 Iso_cuboid_3;
+  typedef typename GeomTraits::Construct_center_2 Construct_center_3;
+  typedef typename GeomTraits::Construct_iso_rectangle_2 Construct_iso_cuboid_3;
+  typedef typename GeomTraits::Construct_min_vertex_2 Construct_min_vertex_3;
+  typedef typename GeomTraits::Construct_max_vertex_2 Construct_max_vertex_3;
+  typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_3;
+  typedef typename GeomTraits::Cartesian_const_iterator_2
+  Cartesian_const_iterator_3;
+  typedef typename GeomTraits::Construct_cartesian_const_iterator_2
+  Construct_cartesian_const_iterator_3;
+
+  AABB_traits_2(const Point &translation_point): m_translation_point(
+      translation_point)
+  {
+    m_interval_x = Interval_nt<true>(to_interval(translation_point.x()));
+    m_interval_y = Interval_nt<true>(to_interval(translation_point.y()));
+  };
+
+  AABB_traits_2()
+  {
+    m_translation_point = Point(0, 0);
+    m_interval_x = Interval_nt<true>(0);
+    m_interval_y = Interval_nt<true>(0);
+  };
+
+  Interval_nt<true> get_interval_x() const
+  {
+    return m_interval_x;
+  }
+
+  Interval_nt<true> get_interval_y() const
+  {
+    return m_interval_y;
+  }
+
+  Point get_translation_point() const
+  {
+    return m_translation_point;
+  }
+
+  // Put the n/2 smallest primitives in the front, the n/2 largest primitives
+  // in the back. They are compared along the bbox' longest axis.
+  class Sort_primitives
+  {
+  public:
+    template<typename PrimitiveIterator>
+    void operator()(PrimitiveIterator first,
+                    PrimitiveIterator beyond,
+                    const Bounding_box &bbox) const
+    {
+      PrimitiveIterator middle = first + (beyond - first) / 2;
+
+      if (bbox.xmax()-bbox.xmin() >= bbox.ymax()-bbox.ymin())
+      {
+        std::nth_element(first, middle, beyond, less_x); // sort along x
+      }
+      else
+      {
+        std::nth_element(first, middle, beyond, less_y); // sort along y
+      }
+    }
+  };
+
+  Sort_primitives sort_primitives_object() const
+  {
+    return Sort_primitives();
+  }
+
+  // Computes the bounding box of a set of primitives
+  class Compute_bbox
+  {
+  public:
+    template<typename ConstPrimitiveIterator>
+    Bounding_box operator()(ConstPrimitiveIterator first,
+                            ConstPrimitiveIterator beyond) const
+    {
+      Bounding_box bbox = first->datum().bbox();
+
+      for (++first; first != beyond; ++first)
+      {
+        bbox = bbox + first->datum().bbox();
+      }
+
+      return bbox;
+    }
+  };
+
+  Compute_bbox compute_bbox_object() const
+  {
+    return Compute_bbox();
+  }
+
+  class Do_intersect
+  {
+
+  private:
+
+    AABB_traits_2 *m_traits;
+
+  public:
+
+    Do_intersect(AABB_traits_2 *_traits): m_traits(_traits) {}
+
+    bool operator()(const Bounding_box &q, const Bounding_box &bbox) const
+    {
+      Interval_nt<true> x1 = Interval_nt<true>(q.xmin(), q.xmax());
+      Interval_nt<true> y1 = Interval_nt<true>(q.ymin(), q.ymax());
+      Interval_nt<true> x2 = Interval_nt<true>(bbox.xmin(),
+                             bbox.xmax()) + m_traits->get_interval_x();
+      Interval_nt<true> y2 = Interval_nt<true>(bbox.ymin(),
+                             bbox.ymax()) + m_traits->get_interval_y();
+
+      return x1.do_overlap(x2) && y1.do_overlap(y2);
+    }
+
+    bool operator()(const Primitive &q, const Bounding_box &bbox) const
+    {
+      Interval_nt<true> x1 = Interval_nt<true>(q.datum().bbox().xmin(),
+                             q.datum().bbox().xmax());
+      Interval_nt<true> y1 = Interval_nt<true>(q.datum().bbox().ymin(),
+                             q.datum().bbox().ymax());
+      Interval_nt<true> x2 = Interval_nt<true>(bbox.xmin(),
+                             bbox.xmax()) + m_traits->get_interval_x();
+      Interval_nt<true> y2 = Interval_nt<true>(bbox.ymin(),
+                             bbox.ymax()) + m_traits->get_interval_y();
+
+      return x1.do_overlap(x2) && y1.do_overlap(y2);
+    }
+
+    bool operator()(const Bounding_box &q, const Primitive &pr) const
+    {
+      Datum tr_pr = pr.datum().transform(typename GeomTraits::Aff_transformation_2(
+                                         Translation(),
+                                         Vector_2(ORIGIN, m_traits->get_translation_point())));
+
+      return do_overlap(q, tr_pr.bbox());
+    }
+
+    bool operator()(const Primitive &q, const Primitive &pr) const
+    {
+      Datum tr_pr = pr.datum().transform(typename GeomTraits::Aff_transformation_2(
+                                         Translation(), Vector_2(ORIGIN, m_traits->get_translation_point())));
+
+      if (!do_overlap(q.datum().bbox(), tr_pr.bbox()))
+      {
+        return false;
+      }
+
+      return do_intersect(q.datum(), tr_pr);
+    }
+  };
+
+  Do_intersect do_intersect_object()
+  {
+    return Do_intersect(this);
+  }
+
+private:
+
+  Point m_translation_point;
+  Interval_nt<true> m_interval_x;
+  Interval_nt<true> m_interval_y;
+
+  // Comparison functions
+  static bool less_x(const Primitive &pr1, const Primitive &pr2)
+  {
+    return pr1.reference_point().x() < pr2.reference_point().x();
+  }
+
+  static bool less_y(const Primitive &pr1, const Primitive &pr2)
+  {
+    return pr1.reference_point().y() < pr2.reference_point().y();
+  }
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h
new file mode 100644
index 0000000..c6aa343
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h
@@ -0,0 +1,428 @@
+// Copyright (c) 2008-2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb
+
+#ifndef CGAL_AABB_TRAVERSAL_TRAITS_WITH_JOIN_H
+#define CGAL_AABB_TRAVERSAL_TRAITS_WITH_JOIN_H
+
+#include <CGAL/Minkowski_sum_2/AABB_node_with_join.h>
+#include <boost/optional.hpp>
+
+namespace CGAL { 
+
+namespace internal { namespace AABB_tree_with_join {
+
+template <class Value_type, typename Integral_type>
+class Counting_output_iterator {
+  typedef Counting_output_iterator<Value_type,Integral_type> Self;
+  Integral_type* i;
+public:
+  Counting_output_iterator(Integral_type* i_) : i(i_) {};
+
+  struct Proxy {
+    Proxy& operator=(const Value_type&) { return *this; };
+  };
+
+  Proxy operator*() {
+    return Proxy();
+  }
+
+  Self& operator++() {
+    ++*i;
+    return *this;
+  }
+
+  Self& operator++(int) {
+    ++*i;
+    return *this;
+  }
+};
+
+//-------------------------------------------------------
+// Traits classes for traversal computation
+//-------------------------------------------------------
+/**
+ * @class First_intersection_traits
+ */
+template<typename AABBTraits, typename Query>
+class First_intersection_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  typedef
+  #if CGAL_INTERSECTION_VERSION < 2
+  boost::optional<Object_and_primitive_id> 
+  #else
+  boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
+  #endif
+  Result;
+public:
+  First_intersection_traits(const AABBTraits& traits)
+    : m_result(), m_traits(traits)
+  {}
+
+  bool go_further() const { 
+    return !m_result;
+  }
+
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    m_result = m_traits.intersection_object()(query, primitive);
+  }
+
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_traits.do_intersect_object()(query, node.bbox());
+  }
+
+  Result result() const { return m_result; }
+  bool is_intersection_found() const { 
+    return m_result;
+  }
+
+private:
+  Result m_result;
+  const AABBTraits& m_traits;
+};
+
+
+/**
+ * @class Listing_intersection_traits
+ */
+template<typename AABBTraits, typename Query, typename Output_iterator>
+class Listing_intersection_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  Listing_intersection_traits(Output_iterator out_it, const AABBTraits& traits)
+    : m_out_it(out_it), m_traits(traits) {}
+
+  bool go_further() const { return true; }
+
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    #if CGAL_INTERSECTION_VERSION < 2
+    boost::optional<Object_and_primitive_id>
+    #else
+    boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
+    #endif
+    intersection = m_traits.intersection_object()(query, primitive);
+
+    if(intersection)
+    {
+      *m_out_it++ = *intersection;
+    }
+  }
+
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_traits.do_intersect_object()(query, node.bbox());
+  }
+
+private:
+  Output_iterator m_out_it;
+  const AABBTraits& m_traits;
+};
+
+
+/**
+ * @class Listing_primitive_traits
+ */
+template<typename AABBTraits, typename Query, typename Output_iterator>
+class Listing_primitive_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  Listing_primitive_traits(Output_iterator out_it, const AABBTraits& traits)
+    : m_out_it(out_it), m_traits(traits) {}
+
+  bool go_further() const { return true; }
+
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    if( m_traits.do_intersect_object()(query, primitive) )
+    {
+      *m_out_it++ = primitive.id();
+    }
+  }
+
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_traits.do_intersect_object()(query, node.bbox());
+  }
+
+private:
+  Output_iterator m_out_it;
+  const AABBTraits& m_traits;
+};
+
+
+/**
+ * @class First_primitive_traits
+ */
+template<typename AABBTraits, typename Query>
+class First_primitive_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  First_primitive_traits(const AABBTraits& traits)
+    : m_is_found(false)
+    , m_result()
+    , m_traits(traits) {}
+
+  bool go_further() const { return !m_is_found; }
+
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    if( m_traits.do_intersect_object()(query, primitive) )
+    {
+      m_result = boost::optional<typename Primitive::Id>(primitive.id());
+      m_is_found = true;
+    }
+  }
+
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_traits.do_intersect_object()(query, node.bbox());
+  }
+
+  boost::optional<typename Primitive::Id> result() const { return m_result; }
+  bool is_intersection_found() const { return m_is_found; }
+
+private:
+  bool m_is_found;
+  boost::optional<typename Primitive::Id> m_result;
+  const AABBTraits& m_traits;
+};
+
+/**
+ * @class Do_intersect_traits
+ */
+template<typename AABBTraits, typename Query>
+class Do_intersect_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  Do_intersect_traits(const AABBTraits& traits)
+    : m_is_found(false), m_traits(traits)
+  {}
+
+  bool go_further() const { return !m_is_found; }
+
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    if( m_traits.do_intersect_object()(query, primitive) )
+      m_is_found = true;
+  }
+
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_traits.do_intersect_object()(query, node.bbox());
+  }
+
+  bool is_intersection_found() const { return m_is_found; }
+
+private:
+  bool m_is_found;
+  const AABBTraits& m_traits;
+};
+
+
+/**
+ * @class Do_intersect_joined_traits
+ */
+template<typename AABBTraits>
+class Do_intersect_joined_traits
+{
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef AABB_node_with_join<AABBTraits> Node;
+
+public:
+
+  Do_intersect_joined_traits(const Point &point) : m_is_found(false)
+  {
+    m_traits_ptr = new AABBTraits(point);
+  }
+
+  bool go_further() const { return !m_is_found; }
+
+  void intersection(const Primitive &primitive1, const Primitive &primitive2, bool first_stationary)
+  {
+    if (first_stationary)
+    {
+      if (m_traits_ptr->do_intersect_object()(primitive1, primitive2))
+      {
+        m_is_found = true;
+      }
+    }
+    else
+    {
+      if (m_traits_ptr->do_intersect_object()(primitive2, primitive1))
+      {
+        m_is_found = true;
+      }
+    }
+  }
+
+  bool do_intersect(const Node &node_1, const Node &node_2, bool first_stationary) const
+  {
+    if (first_stationary)
+    {
+      return m_traits_ptr->do_intersect_object()(node_1.bbox(), node_2.bbox());
+    }
+    else
+    {
+      return m_traits_ptr->do_intersect_object()(node_2.bbox(), node_1.bbox());
+    }
+  }
+
+  bool do_intersect(const Node &node_1, const Primitive &primitive2, bool first_stationary) const
+  {
+    if (first_stationary)
+    {
+      return m_traits_ptr->do_intersect_object()(node_1.bbox(), primitive2);
+    }
+    else
+    {
+      return m_traits_ptr->do_intersect_object()(primitive2, node_1.bbox());
+    }
+  }
+
+  bool do_intersect(const Primitive &primitive1, const Node &node_2, bool first_stationary) const
+  {
+    if (first_stationary)
+    {
+      return m_traits_ptr->do_intersect_object()(primitive1, node_2.bbox());
+    }
+    else
+    {
+      return m_traits_ptr->do_intersect_object()(node_2.bbox(), primitive1);
+    }
+  }
+
+  bool is_intersection_found() const { return m_is_found; }
+
+  ~Do_intersect_joined_traits() { delete m_traits_ptr; }
+
+private:
+
+  bool m_is_found;
+  AABBTraits *m_traits_ptr;
+};
+
+
+/**
+ * @class Projection_traits
+ */
+template <typename AABBTraits>
+class Projection_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node_with_join<AABBTraits> Node;
+
+public:
+  Projection_traits(const Point& hint,
+                    const typename Primitive::Id& hint_primitive,
+                    const AABBTraits& traits)
+    : m_closest_point(hint),
+      m_closest_primitive(hint_primitive), 
+      m_traits(traits)
+  {}
+
+  bool go_further() const { return true; }
+
+  void intersection(const Point& query, const Primitive& primitive)
+  {
+    Point new_closest_point = m_traits.closest_point_object()
+      (query, primitive, m_closest_point);
+    if(new_closest_point != m_closest_point)
+    {
+      m_closest_primitive = primitive.id();
+      m_closest_point = new_closest_point; // this effectively shrinks the sphere 
+    }
+  }
+
+  bool do_intersect(const Point& query, const Node& node) const
+  {
+    return m_traits.compare_distance_object()
+      (query, node.bbox(), m_closest_point) == CGAL::SMALLER;
+  }
+
+  Point closest_point() const { return m_closest_point; }
+  Point_and_primitive_id closest_point_and_primitive() const
+  {
+    return Point_and_primitive_id(m_closest_point, m_closest_primitive);
+  }
+
+private:
+  Point m_closest_point;
+  typename Primitive::Id m_closest_primitive;
+  const AABBTraits& m_traits;
+};
+
+}}} // end namespace CGAL::internal::AABB_tree_with_join
+
+#endif // CGAL_AABB_TRAVERSAL_TRAITS_WITH_JOIN_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h
new file mode 100644
index 0000000..b524a97
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h
@@ -0,0 +1,1274 @@
+// Copyright (c) 2008,2011  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb
+
+#ifndef CGAL_AABB_TREE_WITH_JOIN_H
+#define CGAL_AABB_TREE_WITH_JOIN_H
+
+#include <vector>
+#include <iterator>
+#include <CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h>
+#include <CGAL/Minkowski_sum_2/AABB_node_with_join.h>
+#include <CGAL/internal/AABB_tree/AABB_search_tree.h>
+#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
+#include <CGAL/internal/AABB_tree/Primitive_helper.h>
+#include <boost/optional.hpp>
+
+#ifdef CGAL_HAS_THREADS
+#include <CGAL/mutex.h>
+#endif
+
+/// \file AABB_tree.h
+
+namespace CGAL {
+
+/// \addtogroup PkgAABB_tree
+/// @{
+
+	/**
+   * Class AABB_tree is a static data structure for efficient
+   * intersection and distance computations in 3D. It builds a
+   * hierarchy of axis-aligned bounding boxes (an AABB tree) from a set
+   * of 3D geometric objects, and can receive intersection and distance
+   * queries, provided that the corresponding predicates are
+   * implemented in the traits class AABBTraits.
+   * An instance of the class `AABBTraits` is internally stored.
+   *
+   * \sa `AABBTraits`
+   * \sa `AABBPrimitive`
+   *
+   */
+	template <typename AABBTraits>
+	class AABB_tree_with_join
+	{
+	private:
+		// internal KD-tree used to accelerate the distance queries
+		typedef AABB_search_tree<AABBTraits> Search_tree;
+
+		// type of the primitives container
+		typedef std::vector<typename AABBTraits::Primitive> Primitives;
+
+	public:
+    typedef AABBTraits AABB_traits;
+    
+    /// \name Types
+    ///@{
+
+    /// Number type returned by the distance queries.
+		typedef typename AABBTraits::FT FT;
+
+
+    /// Type of 3D point.
+		typedef typename AABBTraits::Point_3 Point;
+
+    /// Type of input primitive.
+		typedef typename AABBTraits::Primitive Primitive;
+		/// Identifier for a primitive in the tree.
+		typedef typename Primitive::Id Primitive_id;
+		/// Unsigned integral size type.
+		typedef typename Primitives::size_type size_type; 
+    /// Type of bounding box.
+		typedef typename AABBTraits::Bounding_box Bounding_box;
+    /// 
+		typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+		typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+
+    /*!
+    An alias to `AABBTraits::Intersection_and_primitive_id<Query>`
+    */
+    #ifdef DOXYGEN_RUNNING
+    template<typename Query>
+    using Intersection_and_primitive_id = AABBTraits::Intersection_and_primitive_id<Query>;
+    #else
+    template<typename Query>
+    struct Intersection_and_primitive_id {
+      typedef typename AABBTraits::template Intersection_and_primitive_id<Query>::Type Type;
+    };
+    #endif
+
+    
+    ///@}
+
+	public:
+    /// \name Creation
+    ///@{
+
+    /// Constructs an empty tree, and initializes the internally stored traits
+    /// class using `traits`.
+    AABB_tree_with_join(const AABBTraits& traits = AABBTraits());
+
+    /**
+     * @brief Builds the datastructure from a sequence of primitives.
+     * @param first iterator over first primitive to insert
+     * @param beyond past-the-end iterator
+     *
+     * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`.
+     * For compilers that do not support variadic templates, overloads up to 
+     * 5 template arguments are provided.
+     * The tree stays empty if the memory allocation is not successful.
+     */
+    #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+		template<typename InputIterator,typename ... T>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond,T...);  
+    #else
+		template<typename InputIterator>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond);
+    template<typename InputIterator, typename T1>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond,T1);
+    template<typename InputIterator, typename T1, typename T2>
+    AABB_tree_with_join(InputIterator first, InputIterator beyond,T1,T2);
+    template<typename InputIterator, typename T1, typename T2, typename T3>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond,T1,T2,T3);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond,T1,T2,T3,T4);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		AABB_tree_with_join(InputIterator first, InputIterator beyond,T1,T2,T3,T4,T5);
+    #endif
+
+    ///@}
+
+		/// \name Operations
+		///@{
+
+    /// Equivalent to calling `clear()` and then `insert(first,last,t...)`.
+    /// For compilers that do not support variadic templates, overloads up
+    /// to 5 template arguments are provided.
+    #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+		template<typename ConstPrimitiveIterator,typename ... T>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T...);
+    #else
+		template<typename ConstPrimitiveIterator>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond);
+    template<typename ConstPrimitiveIterator, typename T1>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1,T2);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1,T2,T3);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1,T2,T3,T4);
+    template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1,T2,T3,T4,T5);
+    #endif
+
+
+    /// Add a sequence of primitives to the set of primitives of the AABB tree.
+    /// `%InputIterator` is any iterator and the parameter pack `T` are any types
+    /// such that `Primitive` has a constructor with the following signature:
+    /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept
+    /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)`
+    /// is made using the internally stored traits.
+    /// For compilers that do not support variadic templates,
+    /// overloads up to 5 template arguments are provided.
+    #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+		template<typename InputIterator,typename ... T>
+		void insert(InputIterator first, InputIterator beyond,T...);
+    #else
+		template<typename InputIterator>
+		void insert(InputIterator first, InputIterator beyond);
+    template<typename InputIterator, typename T1>
+		void insert(InputIterator first, InputIterator beyond,T1);
+    template<typename InputIterator, typename T1, typename T2>
+		void insert(InputIterator first, InputIterator beyond,T1,T2);
+    template<typename InputIterator, typename T1, typename T2, typename T3>
+		void insert(InputIterator first, InputIterator beyond,T1,T2,T3);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
+		void insert(InputIterator first, InputIterator beyond,T1,T2,T3,T4);
+    template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+		void insert(InputIterator first, InputIterator beyond,T1,T2,T3,T4,T5);
+    #endif
+
+    /// Adds a primitive to the set of primitives of the tree.
+    inline void insert(const Primitive& p);
+
+		/// Clears and destroys the tree.
+		~AABB_tree_with_join()
+		{
+			clear();
+		}
+    /// Returns a const reference to the internally stored traits class.
+    const AABBTraits& traits() const{
+      return m_traits; 
+    }
+    
+		/// Clears the tree.
+		void clear()
+		{
+			// clear AABB tree
+      clear_nodes();
+			m_primitives.clear();
+			clear_search_tree();
+		}
+
+		/// Returns the axis-aligned bounding box of the whole tree.
+		/// \pre `!empty()`
+		const Bounding_box bbox() const { 
+			CGAL_precondition(!empty());
+			if(size() > 1)
+				return root_node()->bbox(); 
+			else
+				return AABB_traits().compute_bbox_object()(m_primitives.begin(), 
+																									 m_primitives.end());
+		}
+    
+    /// Returns the number of primitives in the tree.
+		size_type size() const { return m_primitives.size(); }
+    
+    /// Returns \c true, iff the tree contains no primitive.
+		bool empty() const { return m_primitives.empty(); }
+		///@}
+
+    /// \name Advanced
+    ///@{
+
+    /// After one or more calls to `AABB_tree_with_join::insert()` the internal data
+    /// structure of the tree must be reconstructed. This procedure
+    /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of
+    /// primitives of the tree.  This procedure is called implicitly
+    /// at the first call to a query member function. You can call
+    /// AABB_tree_with_join::build() explicitly to ensure that the next call to
+    /// query functions will not trigger the reconstruction of the
+    /// data structure.
+    void build();
+
+    ///@}
+
+private:
+    #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    template <typename ... T>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T ... ){}
+    template <typename ... T>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T ... t)
+    {m_traits.set_shared_data(t...);}
+
+    template <typename ... T>
+    void set_shared_data(T...t){
+      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t...);
+    }
+    #else
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>){}
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>)
+    {m_traits.set_shared_data();}
+    void set_shared_data(){
+      set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>());
+    }
+    
+    template <typename T1>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1){}
+    template <typename T1>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1 t1)
+    {m_traits.set_shared_data(t1);}
+    template <typename T1>
+    void set_shared_data(T1 t1){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1);
+    }
+    
+    template <typename T1, typename T2>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2){}
+    template <typename T1, typename T2>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1 t1,T2 t2)
+    {m_traits.set_shared_data(t1,t2);}
+    template <typename T1, typename T2>
+    void set_shared_data(T1 t1,T2 t2){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2);
+    }
+    
+    template <typename T1, typename T2, typename T3>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3){}
+    template <typename T1, typename T2, typename T3>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1 t1,T2 t2,T3 t3)
+    {m_traits.set_shared_data(t1,t2,t3);}
+    template <typename T1, typename T2, typename T3>
+    void set_shared_data(T1 t1,T2 t2,T3 t3){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3);
+    }
+    
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4){}
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1 t1,T2 t2,T3 t3,T4 t4)
+    {m_traits.set_shared_data(t1,t2,t3,t4);}
+    template <typename T1, typename T2, typename T3, typename T4>
+    void set_shared_data(T1 t1,T2 t2,T3 t3,T4 t4){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4);
+    }
+    
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4,T5){}
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1 t1,T2 t2,T3 t3,T4 t4,T5 t5)
+    {m_traits.set_shared_data(t1,t2,t3,t4,t5);}
+    template <typename T1, typename T2, typename T3, typename T4, typename T5>
+    void set_shared_data(T1 t1,T2 t2,T3 t3,T4 t4,T5 t5){
+      set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4,t5);
+    }
+    #endif
+
+		template<typename ConstPointIterator>
+		bool accelerate_distance_queries_impl(ConstPointIterator first,
+                                          ConstPointIterator beyond) const;
+public:
+
+    /// \name Intersection Tests
+    ///@{
+
+		/// Returns `true`, iff the query intersects at least one of
+		/// the input primitives. \tparam Query must be a type for
+		/// which `do_intersect` predicates are
+		/// defined in the traits class `AABBTraits`.
+		template<typename Query>
+		bool do_intersect(const Query& query) const;
+
+    /// Returns `true`, iff at least one pair of primitives in the
+    /// two trees intersect. The `other` tree is translated by
+    /// `translation` before this is tested. The traits class `AABBTraits`
+    /// needs to define `do_intersect` predicates for the tree's primitive.
+    bool do_intersect(const AABB_tree_with_join &other,
+                      const Point &translation) const;
+
+    /// Returns the number of primitives intersected by the
+    /// query. \tparam Query must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template<typename Query>
+		size_type number_of_intersected_primitives(const Query& query) const;
+
+    /// Outputs to the iterator the list of all intersected primitives
+    /// ids. This function does not compute the intersection points
+    /// and is hence faster than the function `all_intersections()`
+    /// function below. \tparam Query must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template<typename Query, typename OutputIterator>
+		OutputIterator all_intersected_primitives(const Query& query, OutputIterator out) const;
+
+
+    /// Returns the first encountered intersected primitive id, iff
+    /// the query intersects at least one of the input primitives. No
+    /// particular order is guaranteed over the tree traversal, such
+    /// that, e.g, the primitive returned is not necessarily the
+    /// closest from the source point of a ray query. \tparam Query
+    /// must be a type for which
+    /// `do_intersect` predicates are defined
+    /// in the traits class `AABBTraits`.
+		template <typename Query>
+		boost::optional<Primitive_id> any_intersected_primitive(const Query& query) const;
+    
+    ///@}
+
+    /// \name Intersections
+    ///@{
+
+    /// Outputs the list of all intersections, as objects of
+    /// `Intersection_and_primitive_id<Query>::%Type`,
+    /// between the query and the input data to
+    /// the iterator. `do_intersect()`
+    /// predicates and intersections must be defined for `Query`
+    /// in the `AABBTraits` class.
+		template<typename Query, typename OutputIterator>
+		OutputIterator all_intersections(const Query& query, OutputIterator out) const;
+
+
+    /// Returns the first encountered intersection. No particular
+    /// order is guaranteed over the tree traversal, e.g, the
+    /// primitive returned is not necessarily the closest from the
+    /// source point of a ray query. Type `Query` must be a type
+    /// for which `do_intersect` predicates
+    /// and intersections are defined in the traits class AABBTraits.
+		template <typename Query>
+    #if CGAL_INTERSECTION_VERSION < 2 && !defined(DOXYGEN_RUNNING)
+		boost::optional<Object_and_primitive_id> 
+    #else
+    boost::optional< typename Intersection_and_primitive_id<Query>::Type >
+    #endif
+    any_intersection(const Query& query) const;
+
+    ///@}
+
+    /// \name Distance Queries
+    ///@{
+
+    /// Returns the minimum squared distance between the query point
+    /// and all input primitives. Method
+    /// `accelerate_distance_queries()` should be called before the
+    /// first distance query, so that an internal secondary search
+    /// structure is build, for improving performance.
+		/// \pre `!empty()`
+		FT squared_distance(const Point& query) const;
+
+    /// Returns the point in the union of all input primitives which
+    /// is closest to the query. In case there are several closest
+    /// points, one arbitrarily chosen closest point is
+    /// returned. Method `accelerate_distance_queries()` should be
+    /// called before the first distance query, so that an internal
+    /// secondary search structure is build, for improving
+    /// performance.
+		/// \pre `!empty()`
+		Point closest_point(const Point& query) const;
+
+    
+    /// Returns a `Point_and_primitive_id` which realizes the
+    /// smallest distance between the query point and all input
+    /// primitives. Method `accelerate_distance_queries()` should be
+    /// called before the first distance query, so that an internal
+    /// secondary search structure is build, for improving
+    /// performance.
+		/// \pre `!empty()`
+		Point_and_primitive_id closest_point_and_primitive(const Point& query) const;
+
+
+    ///@}
+
+    /// \name Accelerating the Distance Queries
+    /// 
+    /// In the following paragraphs, we discuss details of the
+    /// implementation of the distance queries. We explain the
+    /// internal use of hints, how the user can pass his own hints to
+    /// the tree, and how the user can influence the construction of
+    /// the secondary data structure used for accelerating distance
+    /// queries.
+    /// Internally, the distance queries algorithms are initialized
+    /// with some hint, which has the same type as the return type of
+    /// the query, and this value is refined along a traversal of the
+    /// tree, until it is optimal, that is to say until it realizes
+    /// the shortest distance to the primitives. In particular, the
+    /// exact specification of these internal algorithms is that they
+    /// minimize the distance to the object composed of the union of
+    /// the primitives and the hint.
+    /// It follows that 
+    /// - in order to return the exact distance to the set of
+    /// primitives, the algorithms need the hint to be exactly on the
+    /// primitives;
+    /// - if this is not the case, and if the hint happens to be closer
+    /// to the query point than any of the primitives, then the hint
+    /// is returned.
+    ///
+    /// This second observation is reasonable, in the sense that
+    /// providing a hint to the algorithm means claiming that this
+    /// hint belongs to the union of the primitives. These
+    /// considerations about the hints being exactly on the primitives
+    /// or not are important: in the case where the set of primitives
+    /// is a triangle soup, and if some of the primitives are large,
+    /// one may want to provide a much better hint than a vertex of
+    /// the triangle soup could be. It could be, for example, the
+    /// barycenter of one of the triangles. But, except with the use
+    /// of an exact constructions kernel, one cannot easily construct
+    /// points other than the vertices, that lie exactly on a triangle
+    /// soup. Hence, providing a good hint sometimes means not being
+    /// able to provide it exactly on the primitives. In rare
+    /// occasions, this hint can be returned as the closest point.
+    /// In order to accelerate distance queries significantly, the
+    /// AABB tree builds an internal KD-tree containing a set of
+    /// potential hints, when the method
+    /// `accelerate_distance_queries()` is called. This KD-tree
+    /// provides very good hints that allow the algorithms to run much
+    /// faster than with a default hint (such as the
+    /// `reference_point` of the first primitive). The set of
+    /// potential hints is a sampling of the union of the primitives,
+    /// which is obtained, by default, by calling the method
+    /// `reference_point` of each of the primitives. However, such
+    /// a sampling with one point per primitive may not be the most
+    /// relevant one: if some primitives are very large, it helps
+    /// inserting more than one sample on them. Conversely, a sparser
+    /// sampling with less than one point per input primitive is
+    /// relevant in some cases.
+    ///@{
+
+		/// Constructs internal search tree from
+		/// a point set taken on the internal primitives
+		/// returns `true` iff successful memory allocation
+		bool accelerate_distance_queries() const;
+
+    /// Constructs an internal KD-tree containing the specified point
+    /// set, to be used as the set of potential hints for accelerating
+    /// the distance queries. 
+		/// \tparam ConstPointIterator is an iterator with
+    /// value type `Point_and_primitive_id`.
+		template<typename ConstPointIterator>
+		bool accelerate_distance_queries(ConstPointIterator first,
+                                     ConstPointIterator beyond) const
+    {
+      #ifdef CGAL_HAS_THREADS
+      //this ensures that this is done once at a time
+      CGAL_SCOPED_LOCK(kd_tree_mutex);
+      #endif
+      clear_search_tree();
+      return accelerate_distance_queries_impl(first,beyond);
+      
+    }
+    
+    /// Returns the minimum squared distance between the query point
+    /// and all input primitives. The internal KD-tree is not used.
+		/// \pre `!empty()`
+		FT squared_distance(const Point& query, const Point& hint) const;
+
+    /// Returns the point in the union of all input primitives which
+    /// is closest to the query. In case there are several closest
+    /// points, one arbitrarily chosen closest point is returned. The
+    /// internal KD-tree is not used.
+		/// \pre `!empty()`
+		Point closest_point(const Point& query, const Point& hint) const;
+    
+    /// Returns a `Point_and_primitive_id` which realizes the
+    /// smallest distance between the query point and all input
+    /// primitives. The internal KD-tree is not used.
+		/// \pre `!empty()`
+		Point_and_primitive_id closest_point_and_primitive(const Point& query, const Point_and_primitive_id& hint) const;
+
+    ///@}
+
+	private:
+    // clear nodes
+    void clear_nodes()
+    {
+			if( size() > 1 ) {
+				delete [] m_p_root_node;
+			}
+			m_p_root_node = NULL;
+    }
+
+		// clears internal KD tree
+		void clear_search_tree() const
+		{
+			if ( m_search_tree_constructed )
+			{
+				CGAL_assertion( m_p_search_tree!=NULL );
+				delete m_p_search_tree;
+				m_p_search_tree = NULL;
+				m_search_tree_constructed = false;
+				m_default_search_tree_constructed = false;
+                        }
+		}
+
+	public:
+
+    /// \internal
+		template <class Query, class Traversal_traits>
+		void traversal(const Query& query, Traversal_traits& traits) const
+		{
+			switch(size())
+			{
+			case 0:
+				break;
+			case 1:
+				traits.intersection(query, singleton_data());
+				break;
+			default: // if(size() >= 2)
+				root_node()->template traversal<Traversal_traits,Query>(query, traits, m_primitives.size());
+			}
+		}
+
+    /// \internal
+    template <class Traversal_traits>
+    void traversal(const AABB_tree_with_join &other_tree, Traversal_traits &traits) const
+    {
+      if (size() > 1 && other_tree.size() > 1)
+      {
+        root_node()->template traversal<Traversal_traits>(*(other_tree.root_node()),
+                                                          traits,
+                                                          m_primitives.size(),
+                                                          other_tree.m_primitives.size(),
+                                                          true);
+      }
+      else // at least tree has less than 2 primitives
+      {
+          // TODO not implemented yet, cannot happen with two polygons
+      }
+    }
+
+	private:
+		typedef AABB_node_with_join<AABBTraits> Node;
+
+
+	public:
+		// returns a point which must be on one primitive
+		Point_and_primitive_id any_reference_point_and_id() const
+		{
+			CGAL_assertion(!empty());
+			return Point_and_primitive_id(
+        internal::Primitive_helper<AABB_traits>::get_reference_point(m_primitives[0],m_traits), m_primitives[0].id()
+      );
+		}
+
+	public:
+		Point_and_primitive_id best_hint(const Point& query) const
+		{
+			if(m_search_tree_constructed)
+				return m_p_search_tree->closest_point(query);
+			else
+				return this->any_reference_point_and_id();
+		}
+
+	private:
+    //Traits class
+    AABBTraits m_traits;
+		// set of input primitives
+		Primitives m_primitives;
+		// single root node
+		Node* m_p_root_node;
+    #ifdef CGAL_HAS_THREADS
+    mutable CGAL_MUTEX internal_tree_mutex;//mutex used to protect const calls inducing build()
+    mutable CGAL_MUTEX kd_tree_mutex;//mutex used to protect calls to accelerate_distance_queries
+    #endif
+  
+    const Node* root_node() const {
+			CGAL_assertion(size() > 1);
+      if(m_need_build){
+        #ifdef CGAL_HAS_THREADS
+        //this ensures that build() will be called once
+        CGAL_SCOPED_LOCK(internal_tree_mutex);
+        if(m_need_build)
+        #endif
+          const_cast< AABB_tree_with_join<AABBTraits>* >(this)->build(); 
+      }
+      return m_p_root_node;
+    }
+
+		const Primitive& singleton_data() const {
+			CGAL_assertion(size() == 1);
+			return *m_primitives.begin();
+		}
+
+		// search KD-tree
+		mutable const Search_tree* m_p_search_tree;
+		mutable bool m_search_tree_constructed;
+    mutable bool m_default_search_tree_constructed;
+    bool m_need_build;
+
+	private:
+		// Disabled copy constructor & assignment operator
+		typedef AABB_tree_with_join<AABBTraits> Self;
+		AABB_tree_with_join(const Self& src);
+		Self& operator=(const Self& src);
+
+	};  // end class AABB_tree_with_join
+
+/// @}
+
+  template<typename Tr>
+  AABB_tree_with_join<Tr>::AABB_tree_with_join(const Tr& traits)
+    : m_traits(traits)
+    , m_primitives()
+    , m_p_root_node(NULL)
+    , m_p_search_tree(NULL)
+    , m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+  {}
+
+  #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+ 	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T ... t)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t...);
+ 	}
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T ... t)
+	{
+    set_shared_data(t...);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t...));
+			++first;
+		}
+    m_need_build = true;
+  }
+  
+  // Clears tree and insert a set of primitives
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename ... T>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T ... t)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t...);
+
+    build();
+	}  
+  #else
+  //=============constructor======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1 t1)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1 t1,T2 t2)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1 t1,T2 t2,T3 t3)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3);
+ 	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1 t1,T2 t2,T3 t3,T4 t4)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3,t4);
+ 	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	AABB_tree_with_join<Tr>::AABB_tree_with_join(ConstPrimitiveIterator first,
+                           ConstPrimitiveIterator beyond,
+                           T1 t1,T2 t2,T3 t3,T4 t4,T5 t5)
+		: m_traits()
+    , m_primitives()
+		, m_p_root_node(NULL)
+		, m_p_search_tree(NULL)
+		, m_search_tree_constructed(false)
+    , m_default_search_tree_constructed(false)
+    , m_need_build(false)
+	{
+		// Insert each primitive into tree
+    insert(first, beyond,t1,t2,t3,t4,t5);
+ 	}
+  //=============insert======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond)
+	{
+    set_shared_data();
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1 t1)
+	{
+    set_shared_data(t1);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1));
+			++first;
+		}
+    m_need_build = true;
+  }
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1 t1,T2 t2)
+	{
+    set_shared_data(t1,t2);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1 t1,T2 t2,T3 t3)
+	{
+    set_shared_data(t1,t2,t3);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1 t1,T2 t2,T3 t3,T4 t4)
+	{
+    set_shared_data(t1,t2,t3,t4);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3,t4));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	void AABB_tree_with_join<Tr>::insert(ConstPrimitiveIterator first,
+                             ConstPrimitiveIterator beyond,
+                             T1 t1,T2 t2,T3 t3,T4 t4,T5 t5)
+	{
+    set_shared_data(t1,t2,t3,t4,t5);
+		while(first != beyond)
+		{
+			m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5));
+			++first;
+		}
+    m_need_build = true;
+  }
+
+  //=============insert======================
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond);
+
+    build();
+	}
+
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1 t1)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1);
+
+    build();
+	}
+  
+	template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1 t1,T2 t2)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1 t1,T2 t2,T3 t3)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1 t1,T2 t2,T3 t3,T4 t4)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3,t4);
+
+    build();
+	}
+
+  template<typename Tr>
+	template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
+	void AABB_tree_with_join<Tr>::rebuild(ConstPrimitiveIterator first,
+                              ConstPrimitiveIterator beyond,
+                              T1 t1,T2 t2,T3 t3,T4 t4,T5 t5)
+	{
+		// cleanup current tree and internal KD tree
+		clear();
+
+		// inserts primitives
+    insert(first, beyond,t1,t2,t3,t4,t5);
+
+    build();
+	}
+  #endif
+
+	template<typename Tr>
+	void AABB_tree_with_join<Tr>::insert(const Primitive& p)
+	{
+    m_primitives.push_back(p);
+    m_need_build = true;
+  }
+
+	// Build the data structure, after calls to insert(..)
+	template<typename Tr>
+	void AABB_tree_with_join<Tr>::build()
+	{
+    clear_nodes();
+
+    if(m_primitives.size() > 1) {
+
+			// allocates tree nodes
+			m_p_root_node = new Node[m_primitives.size()-1]();
+			if(m_p_root_node == NULL)
+			{
+				std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
+				CGAL_assertion(m_p_root_node != NULL);
+				m_primitives.clear();
+				clear();
+			}
+
+			// constructs the tree
+			m_p_root_node->expand(m_primitives.begin(), m_primitives.end(),
+														m_primitives.size(), m_traits);
+		}
+
+    // In case the users has switched on the accelerated distance query
+    // data structure with the default arguments, then it has to be
+    // rebuilt.
+    if(m_default_search_tree_constructed)
+      accelerate_distance_queries();
+
+    m_need_build = false;    
+	}
+
+
+	// constructs the search KD tree from given points
+	// to accelerate the distance queries
+	template<typename Tr>
+	template<typename ConstPointIterator>
+	bool AABB_tree_with_join<Tr>::accelerate_distance_queries_impl(ConstPointIterator first,
+		ConstPointIterator beyond) const
+	{
+		m_p_search_tree = new Search_tree(first, beyond);
+		if(m_p_search_tree != NULL)
+		{
+			m_search_tree_constructed = true;
+			return true;
+		}
+		else
+    {
+			std::cerr << "Unable to allocate memory for accelerating distance queries" << std::endl;
+			return false;
+    }
+	}
+
+	// constructs the search KD tree from internal primitives
+	template<typename Tr>
+	bool AABB_tree_with_join<Tr>::accelerate_distance_queries() const
+	{
+		if(m_primitives.empty()) return true;
+    #ifdef CGAL_HAS_THREADS
+    //this ensures that this function will be done once
+    CGAL_SCOPED_LOCK(kd_tree_mutex);
+    #endif
+
+    //we only redo computation only if needed 
+    if (!m_need_build && m_default_search_tree_constructed)
+      return m_search_tree_constructed;
+    
+		// iterate over primitives to get reference points on them
+		std::vector<Point_and_primitive_id> points;
+		points.reserve(m_primitives.size());
+		typename Primitives::const_iterator it;
+		for(it = m_primitives.begin(); it != m_primitives.end(); ++it)
+			points.push_back(
+        Point_and_primitive_id(
+          internal::Primitive_helper<AABB_traits>::get_reference_point(*it,m_traits), it->id()
+        )
+      );
+
+    // clears current KD tree
+    clear_search_tree();
+    m_default_search_tree_constructed = true;
+		return accelerate_distance_queries_impl(points.begin(), points.end());
+	}
+
+	template<typename Tr>
+	template<typename Query>
+	bool
+		AABB_tree_with_join<Tr>::do_intersect(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		Do_intersect_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.is_intersection_found();
+	}
+
+  template<typename Tr>
+  bool AABB_tree_with_join<Tr>::do_intersect(const AABB_tree_with_join &other,
+    const Point &translation) const
+  {
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+    Do_intersect_joined_traits<AABBTraits> traversal_traits(translation);
+    this->traversal(other, traversal_traits);
+    return traversal_traits.is_intersection_found();
+  }
+
+  template<typename Tr>
+	template<typename Query>
+	typename AABB_tree_with_join<Tr>::size_type
+		AABB_tree_with_join<Tr>::number_of_intersected_primitives(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    using CGAL::internal::AABB_tree_with_join::Counting_output_iterator;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+    typedef Counting_output_iterator<Primitive_id, size_type> Counting_iterator;
+
+    size_type counter = 0;
+    Counting_iterator out(&counter);
+
+		Listing_primitive_traits<AABBTraits, 
+      Query, Counting_iterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return counter;
+	}
+
+	template<typename Tr>
+	template<typename Query, typename OutputIterator>
+	OutputIterator
+		AABB_tree_with_join<Tr>::all_intersected_primitives(const Query& query,
+		OutputIterator out) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		Listing_primitive_traits<AABBTraits, 
+      Query, OutputIterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return out;
+	}
+
+	template<typename Tr>
+	template<typename Query, typename OutputIterator>
+	OutputIterator
+		AABB_tree_with_join<Tr>::all_intersections(const Query& query,
+		OutputIterator out) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		Listing_intersection_traits<AABBTraits, 
+      Query, OutputIterator> traversal_traits(out,m_traits);
+		this->traversal(query, traversal_traits);
+		return out;
+	}
+
+
+	template <typename Tr>
+	template <typename Query>
+  #if CGAL_INTERSECTION_VERSION < 2
+	boost::optional<typename AABB_tree_with_join<Tr>::Object_and_primitive_id>
+  #else
+  boost::optional< typename AABB_tree_with_join<Tr>::template Intersection_and_primitive_id<Query>::Type >
+  #endif
+		AABB_tree_with_join<Tr>::any_intersection(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		First_intersection_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.result();
+	}
+
+	template <typename Tr>
+	template <typename Query>
+	boost::optional<typename AABB_tree_with_join<Tr>::Primitive_id>
+		AABB_tree_with_join<Tr>::any_intersected_primitive(const Query& query) const
+	{
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		First_primitive_traits<AABBTraits, Query> traversal_traits(m_traits);
+		this->traversal(query, traversal_traits);
+		return traversal_traits.result();
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::Point
+		AABB_tree_with_join<Tr>::closest_point(const Point& query,
+		const Point& hint) const
+	{
+		CGAL_precondition(!empty());
+		typename Primitive::Id hint_primitive = m_primitives[0].id();
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		Projection_traits<AABBTraits> projection_traits(hint,hint_primitive,m_traits);
+		this->traversal(query, projection_traits);
+		return projection_traits.closest_point();
+	}
+
+	// closest point without hint, the search KD-tree is queried for the
+	// first closest neighbor point to get a hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::Point
+		AABB_tree_with_join<Tr>::closest_point(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		const Point_and_primitive_id hint = best_hint(query);
+		return closest_point(query,hint.first);
+	}
+
+	// squared distance with user-specified hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::FT
+		AABB_tree_with_join<Tr>::squared_distance(const Point& query,
+		const Point& hint) const
+	{
+		CGAL_precondition(!empty());
+		const Point closest = this->closest_point(query, hint);
+		return Tr().squared_distance_object()(query, closest);
+	}
+
+	// squared distance without user-specified hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::FT
+		AABB_tree_with_join<Tr>::squared_distance(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		const Point closest = this->closest_point(query);
+		return Tr().squared_distance_object()(query, closest);
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::Point_and_primitive_id
+		AABB_tree_with_join<Tr>::closest_point_and_primitive(const Point& query) const
+	{
+		CGAL_precondition(!empty());
+		return closest_point_and_primitive(query,best_hint(query));
+	}
+
+	// closest point with user-specified hint
+	template<typename Tr>
+	typename AABB_tree_with_join<Tr>::Point_and_primitive_id
+		AABB_tree_with_join<Tr>::closest_point_and_primitive(const Point& query,
+		const Point_and_primitive_id& hint) const
+	{
+		CGAL_precondition(!empty());
+    using namespace CGAL::internal::AABB_tree_with_join;
+    typedef typename AABB_tree_with_join<Tr>::AABB_traits AABBTraits;
+		Projection_traits<AABBTraits> projection_traits(hint.first,hint.second,m_traits);
+		this->traversal(query, projection_traits);
+		return projection_traits.closest_point_and_primitive();
+	}
+
+} // end namespace CGAL
+
+#endif // CGAL_AABB_TREE_WITH_JOIN_H
+
+/***EMACS SETTINGS**    */
+/* Local Variables:     */
+/* tab-width: 2         */
+/* indent-tabs-mode: t  */
+/* End:                 */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h
new file mode 100644
index 0000000..35f6f03
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h
@@ -0,0 +1,598 @@
+// Copyright (c) 2006-2008  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein       <wein_r at yahoo.com>
+//                 Andreas Fabri  <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+//                 Efi Fogel      <efif at post.tau.ac.il>
+
+#ifndef CGAL_APPROXIMATED_OFFSET_BASE_H
+#define CGAL_APPROXIMATED_OFFSET_BASE_H
+
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+#include <CGAL/Gps_circle_segment_traits_2.h>
+#include <CGAL/Minkowski_sum_2/Labels.h>
+#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+/*! \class
+ * A base class for approximating the offset of a given polygon by a given
+ * radius.
+ */
+template <class Kernel_, class Container_>
+class Approx_offset_base_2
+{
+private:
+
+  typedef Kernel_                                        Kernel;
+  typedef typename Kernel::FT                            NT;
+
+protected:
+
+  typedef Kernel                                         Basic_kernel;
+  typedef NT                                             Basic_NT;
+  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel, Container_> Polygon_with_holes_2;
+
+private:
+
+  // Kernel types:
+  typedef typename Kernel::Point_2                       Point_2;
+  typedef typename Kernel::Line_2                        Line_2;
+
+  // Polygon-related types:
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+
+  // Traits-class types:
+  typedef Gps_circle_segment_traits_2<Kernel>            Traits_2;
+  typedef typename Traits_2::CoordNT                     CoordNT;
+  typedef typename Traits_2::Point_2                     Tr_point_2;
+  typedef typename Traits_2::Curve_2                     Curve_2;
+  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
+
+protected:
+
+  typedef typename Traits_2::Polygon_2                   Offset_polygon_2;
+
+  typedef Arr_labeled_traits_2<Traits_2>                 Labeled_traits_2;
+  typedef typename Labeled_traits_2::X_monotone_curve_2  Labeled_curve_2;
+
+  // Data members:
+  double        _eps;            // An upper bound on the approximation error.
+  int           _inv_sqrt_eps;   // The inverse squared root of _eps.
+
+public:
+
+  /*!
+   * Constructor.
+   * \param eps An upper bound on the approximation error.
+   */
+  Approx_offset_base_2 (const double& eps) :
+    _eps (eps)
+  {
+    CGAL_precondition (CGAL::sign (eps) == POSITIVE);
+
+    _inv_sqrt_eps = static_cast<int> (1.0 / CGAL::sqrt (_eps));
+    if (_inv_sqrt_eps <= 0)
+      _inv_sqrt_eps = 1;
+  }
+
+protected:
+
+  /*!
+   * Compute curves that constitute the offset of a simple polygon by a given
+   * radius, with a given approximation error.
+   * \param pgn The polygon.
+   * \param orient The orientation to traverse the vertices.
+   * \param r The offset radius.
+   * \param cycle_id The index of the cycle.
+   * \param oi An output iterator for the offset curves.
+   * \pre The value type of the output iterator is Labeled_curve_2.
+   * \return A past-the-end iterator for the holes container.
+   */
+  template <class OutputIterator>
+  OutputIterator _offset_polygon (const Polygon_2& pgn,
+                                  CGAL::Orientation orient,
+                                  const Basic_NT& r,
+                                  unsigned int cycle_id,
+                                  OutputIterator oi) const
+  {
+    // Prepare circulators over the polygon vertices.
+    const bool            forward = (pgn.orientation() == orient);
+    Vertex_circulator     first, curr, next, prev;
+
+    first = pgn.vertices_circulator();
+    curr = first;
+    next = first;
+    prev = first;
+
+    if (forward)
+      --prev;
+    else
+      ++prev;
+
+    // Traverse the polygon vertices and edges and approximate the arcs that
+    // constitute the single convolution cycle.
+    NT              x1, y1;              // The source of the current edge.
+    NT              x2, y2;              // The target of the current edge.
+    NT              delta_x, delta_y;    // (x2 - x1) and (y2 - y1), resp.
+    NT              abs_delta_x;
+    NT              abs_delta_y;
+    CGAL::Sign      sign_delta_x;        // The sign of (x2 - x1).
+    CGAL::Sign      sign_delta_y;        // The sign of (y2 - y1).
+    NT              sqr_d;               // The squared length of the edge.
+    NT              err_bound;           // An approximation bound for d.
+    NT              app_d;               // The apporximated edge length.
+    NT              app_err;             // The approximation error.
+    CGAL::Sign      sign_app_err;        // Its sign.
+    NT              lower_tan_half_phi;
+    NT              upper_tan_half_phi;
+    NT              sqr_tan_half_phi;
+    NT              sin_phi, cos_phi;
+    Point_2         op1;                 // The approximated offset point
+                                         // corresponding to (x1, y1).
+    Point_2         op2;                 // The approximated offset point
+                                         // corresponding to (x2, y2).
+    Line_2          l1, l2;              // Lines tangent at op1 and op2.
+    Object          obj;
+    bool            assign_success;
+    Point_2         mid_p;               // The intersection of l1 and l2.
+    Point_2         first_op;            // op1 for the first edge visited.
+    Point_2         prev_op;             // op2 for the previous edge.
+
+    unsigned int                    curve_index = 0;
+    X_monotone_curve_2              seg1, seg2;
+    bool                            dir_right1 = false, dir_right2 = false;
+    X_monotone_curve_2              seg_short;
+    bool                            dir_right_short;
+    int                             n_segments;
+
+    Kernel                            ker;
+    typename Kernel::Intersect_2      f_intersect = ker.intersect_2_object();
+    typename Kernel::Construct_line_2 f_line = ker.construct_line_2_object();
+    typename Kernel::Construct_perpendicular_line_2
+                     f_perp_line = ker.construct_perpendicular_line_2_object();
+    typename Kernel::Compare_xy_2     f_comp_xy = ker.compare_xy_2_object();
+    typename Kernel::Orientation_2    f_orient = ker.orientation_2_object();
+
+    Traits_2                        traits;
+    std::list<Object>               xobjs;
+    std::list<Object>::iterator     xobj_it;
+    typename Traits_2::Make_x_monotone_2
+                       f_make_x_monotone = traits.make_x_monotone_2_object();
+    Curve_2                         arc;
+    X_monotone_curve_2              xarc;
+
+    do
+    {
+      // Get a circulator for the next vertex (in the proper orientation).
+      if (forward)
+        ++next;
+      else
+        --next;
+
+      // Compute the vector v = (delta_x, delta_y) of the current edge,
+      // and compute the squared edge length.
+      x1 = curr->x();
+      y1 = curr->y();
+      x2 = next->x();
+      y2 = next->y();
+
+      delta_x = x2 - x1;
+      delta_y = y2 - y1;
+      sqr_d = CGAL::square (delta_x) + CGAL::square (delta_y);
+
+      sign_delta_x = CGAL::sign (delta_x);
+      sign_delta_y = CGAL::sign (delta_y);
+
+      if (sign_delta_x == CGAL::ZERO)
+      {
+        CGAL_assertion (sign_delta_y != CGAL::ZERO);
+
+        // The edge [(x1, y1) -> (x2, y2)] is vertical. The offset edge lies
+        // at a distance r to the right if y2 > y1, and to the left if y2 < y1.
+        if (sign_delta_y == CGAL::POSITIVE)
+        {
+          op1 = Point_2 (x1 + r, y1);
+          op2 = Point_2 (x2 + r, y2);
+        }
+        else
+        {
+          op1 = Point_2 (x1 - r, y1);
+          op2 = Point_2 (x2 - r, y2);
+        }
+
+        // Create the offset segment [op1 -> op2].
+        seg1 = X_monotone_curve_2 (op1, op2);
+        dir_right1 = (sign_delta_y == CGAL::POSITIVE);
+
+        n_segments = 1;
+      }
+      else if (sign_delta_y == CGAL::ZERO)
+      {
+        // The edge [(x1, y1) -> (x2, y2)] is horizontal. The offset edge lies
+        // at a distance r to the bottom if x2 > x1, and to the top if x2 < x1.
+        if (sign_delta_x == CGAL::POSITIVE)
+        {
+          op1 = Point_2 (x1, y1 - r);
+          op2 = Point_2 (x2, y2 - r);
+        }
+        else
+        {
+          op1 = Point_2 (x1, y1 + r);
+          op2 = Point_2 (x2, y2 + r);
+        }
+
+        // Create the offset segment [op1 -> op2].
+        seg1 = X_monotone_curve_2 (op1, op2);
+        dir_right1 = (sign_delta_x == CGAL::POSITIVE);
+
+        n_segments = 1;
+      }
+      else
+      {
+        abs_delta_x = (sign_delta_x == POSITIVE) ? delta_x : -delta_x;
+        abs_delta_y = (sign_delta_y == POSITIVE) ? delta_y : -delta_y;
+
+        // In this general case, the length d of the current edge is usually
+        // an irrational number.
+        // Compute the upper bound for the approximation error for d.
+        // This bound is given by:
+        //
+        //                            d - |delta_y|
+        //     bound = 2 * d * eps * ---------------
+        //                              |delta_x|
+        //
+        // As we use floating-point arithmetic, if |delta_x| is small, then
+        // it might be that to_double(|delta_y|) == to_double(d), hence we
+        // have a 0 tolerance in the approximation bound. Luckily, because
+        // of symmetry, we can rotate the scene by pi/2, and swap roles of
+        // x and y. In fact, we do that in order to get a larger approximation
+        // bound if possible.
+        const double    dd = CGAL::sqrt (CGAL::to_double (sqr_d));
+        const double    dabs_dx = CGAL::to_double (abs_delta_x);
+        const double    dabs_dy = CGAL::to_double (abs_delta_y);
+        double          derr_bound;
+
+        if (dabs_dy < dabs_dx)
+        {
+          derr_bound = 2 * dd * _eps * (dd - dabs_dy) / dabs_dx;
+        }
+        else
+        {
+          derr_bound = 2 * dd * _eps * (dd - dabs_dx) / dabs_dy;
+        }
+
+        CGAL_assertion (derr_bound > 0);
+        err_bound = NT (derr_bound);
+
+        // Compute an approximation for d (the squared root of sqr_d).
+        int             numer;
+        int             denom = _inv_sqrt_eps;
+        const int       max_int = (1 << (8*sizeof(int) - 2));
+
+        numer = static_cast<int> (dd * denom + 0.5);
+        if (numer > 0)
+        {
+            while (static_cast<double>(max_int) / denom < dd &&
+                   numer > 0)
+            {
+              denom >>= 1;
+              numer = static_cast<int> (dd * denom + 0.5);
+            }
+        }
+        else if (numer == 0)
+        {
+            while (numer == 0)
+            {
+              denom <<= 1;
+              if (denom > 0)
+              {
+                numer = static_cast<int> (dd * denom + 0.5);
+              }
+              else
+              {
+		// In case of overflow of denom
+                numer = 1;
+                denom = max_int;
+              }
+            }
+        }
+        else {// if numer < 0 (overflow)
+          numer = max_int;
+          denom = 1;
+        }
+
+
+        app_d = NT (numer) / NT (denom);
+        app_err = sqr_d - CGAL::square (app_d);
+
+        while (CGAL::compare (CGAL::abs (app_err),
+                              err_bound) == CGAL::LARGER ||
+               CGAL::compare (app_d, abs_delta_x) != LARGER ||
+               CGAL::compare (app_d, abs_delta_y) != LARGER)
+        {
+          app_d = (app_d + sqr_d/app_d) / 2;
+          app_err = sqr_d - CGAL::square (app_d);
+        }
+
+        sign_app_err = CGAL::sign (app_err);
+
+        if (sign_app_err == CGAL::ZERO)
+        {
+          // In this case d is a rational number, and we should shift the
+          // both edge endpoints by (r * delta_y / d, -r * delta_x / d) to
+          // obtain the offset points op1 and op2.
+          const NT   trans_x = r * delta_y / app_d;
+          const NT   trans_y = r * (-delta_x) / app_d;
+
+          op1 = Point_2 (x1 + trans_x, y1 + trans_y);
+          op2 = Point_2 (x2 + trans_x, y2 + trans_y);
+
+          seg1 = X_monotone_curve_2 (op1, op2);
+          dir_right1 = (sign_delta_x == CGAL::POSITIVE);
+
+          n_segments = 1;
+        }
+        else
+        {
+          // In case |x2 - x1| < |y2 - y1| (and phi is small) it is possible
+          // that the approximation t' of t = tan(phi/2) is of opposite sign.
+          // To avoid this problem, we symbolically rotate the scene by pi/2,
+          // swapping roles between x and y. Thus, t is not close to zero, and
+          // we are guaranteed to have: phi- < phi < phi+ .
+          bool rotate_pi2 = false;
+
+          if (CGAL::compare (CGAL::abs(delta_x),
+                             CGAL::abs(delta_y)) == SMALLER)
+          {
+            rotate_pi2 = true;
+
+            // We use the rotation matrix by pi/2:
+            //
+            //   +-       -+
+            //   |  0  -1  |
+            //   |  1   0  |
+            //   +-       -+
+            //
+            // Thus, the point (x, y) is converted to (-y, x):
+            NT tmp = x1;
+
+            x1 = -y1;
+            y1 = tmp;
+
+            tmp = x2;
+            x2 = -y2;
+            y2 = tmp;
+
+            // Swap the delta_x and delta_y values.
+            tmp = delta_x;
+            delta_x = -delta_y;
+            delta_y = tmp;
+
+            CGAL::Sign  tmp_sign = sign_delta_x;
+            sign_delta_x = CGAL::opposite (sign_delta_y);
+            sign_delta_y = tmp_sign;
+          }
+
+          // Act according to the sign of delta_x.
+          if (sign_delta_x == CGAL::NEGATIVE)
+          {
+            // x1 > x2, so we take a lower approximation for the squared root.
+            if (sign_app_err == CGAL::NEGATIVE)
+              app_d = sqr_d / app_d;
+          }
+          else
+          {
+            // x1 < x2, so we take an upper approximation for the squared root.
+            if (sign_app_err == CGAL::POSITIVE)
+              app_d = sqr_d / app_d;
+          }
+
+          // If theta is the angle that the vector (delta_x, delta_y) forms
+          // with the x-axis, the perpendicular vector forms an angle of
+          // phi = theta - PI/2, and we can approximate tan(phi/2) from below
+          // and from above using:
+          lower_tan_half_phi = (app_d - delta_y) / (-delta_x);
+          upper_tan_half_phi = (-delta_x) / (app_d + delta_y);
+
+          // Translate (x1, y1) by (r*cos(phi-), r*sin(phi-)) and create the
+          // first offset point.
+          // If tan(phi/2) = t is rational, then sin(phi) = 2t/(1 + t^2)
+          // and cos(phi) = (1 - t^2)/(1 + t^2) are also rational.
+          sqr_tan_half_phi = CGAL::square (lower_tan_half_phi);
+          sin_phi = 2 * lower_tan_half_phi / (1 + sqr_tan_half_phi);
+          cos_phi = (1 - sqr_tan_half_phi) / (1 + sqr_tan_half_phi);
+
+          if (! rotate_pi2)
+          {
+            op1 = Point_2 (x1 + r*cos_phi, y1 + r*sin_phi);
+          }
+          else
+          {
+            // In case of symbolic rotation by pi/2, we have to rotate the
+            // translated point by -(pi/2), transforming (x, y) to (y, -x).
+            op1 = Point_2 (y1 + r*sin_phi, -(x1 + r*cos_phi));
+          }
+
+          // Translate (x2, y2) by (r*cos(phi+), r*sin(phi+)) and create the
+          // second offset point.
+          sqr_tan_half_phi = CGAL::square (upper_tan_half_phi);
+          sin_phi = 2 * upper_tan_half_phi / (1 + sqr_tan_half_phi);
+          cos_phi = (1 - sqr_tan_half_phi) / (1 + sqr_tan_half_phi);
+
+          if (! rotate_pi2)
+          {
+            op2 = Point_2 (x2 + r*cos_phi, y2 + r*sin_phi);
+          }
+          else
+          {
+            // In case of symbolic rotation by pi/2, we have to rotate the
+            // translated point by -(pi/2), transforming (x, y) to (y, -x).
+            op2 = Point_2 (y2 + r*sin_phi, -(x2 + r*cos_phi));
+          }
+
+          // Compute the line l1 tangent to the circle centered at (x1, y1)
+          // with radius r at the approximated point op1.
+          l1 = f_perp_line (f_line (*curr, op1), op1);
+
+          // Compute the line l2 tangent to the circle centered at (x2, y2)
+          // with radius r at the approximated point op2.
+          l2 = f_perp_line (f_line (*next, op2), op2);
+
+          // Intersect the two lines. The intersection point serves as a common
+          // end point for the two line segments we are about to introduce.
+          obj = f_intersect (l1, l2);
+
+          assign_success = CGAL::assign (mid_p, obj);
+          CGAL_assertion (assign_success);
+          CGAL_USE(assign_success);
+
+          // Andreas's assertions:
+          CGAL_assertion( right_turn(*curr, *next, op2) );
+          CGAL_assertion( angle(*curr, *next, op2) != ACUTE);
+          CGAL_assertion( angle(op1, *curr, *next) != ACUTE);
+          CGAL_assertion( right_turn(op1, *curr, *next) );
+
+          // Create the two segments [op1 -> p_mid] and [p_min -> op2].
+          seg1 = X_monotone_curve_2 (op1, mid_p);
+          dir_right1 = (f_comp_xy (op1, mid_p) == CGAL::SMALLER);
+
+          seg2 = X_monotone_curve_2 (mid_p, op2);
+          dir_right2 = (f_comp_xy (mid_p, op2) == CGAL::SMALLER);
+
+          n_segments = 2;
+        }
+      }
+
+      if (curr == first) {
+        // This is the first edge we visit -- store op1 for future use.
+        first_op = op1;
+      }
+      else {
+        CGAL::Orientation orient = f_orient (*prev, *curr, *next);
+        if (orient == CGAL::COLLINEAR) {
+          /* If the orientation is collinear, figure out whether it's a 180
+           * turn. If so, assume that it is an antena that generates
+           * a positive spike, and treat it as a left turn.
+           * A complete solution would need to distinguish between positive
+           * and negative spikes, and treat them as left and right turns,
+           * respectively.
+           */
+          typename Kernel::Compare_x_2 f_comp_x = ker.compare_x_2_object();
+          Comparison_result res1, res2;
+          res1 = f_comp_x(*prev, *curr);
+          if (res1 != CGAL::EQUAL)
+            res2 = f_comp_x(*curr, *next);
+          else {
+            typename Kernel::Compare_y_2 f_comp_y = ker.compare_y_2_object();
+            res1 = f_comp_y(*prev, *curr);
+            res2 = f_comp_y(*curr, *next);
+          }
+          if (res1 != res2) orient = CGAL::LEFT_TURN;
+        }
+
+        // Connect the offset target point of the previous edge to the
+        // offset source of the current edge.
+        if (orient == CGAL::LEFT_TURN) {
+          // Connect prev_op and op1 with a circular arc, whose supporting
+          // circle is (x1, x2) with radius r.
+          arc = Curve_2 (*curr, r, CGAL::COUNTERCLOCKWISE,
+                         Tr_point_2 (prev_op.x(), prev_op.y()),
+                         Tr_point_2 (op1.x(), op1.y()));
+
+          // Subdivide the arc into x-monotone subarcs and insert them into the
+          // convolution cycle.
+          xobjs.clear();
+          f_make_x_monotone (arc, std::back_inserter(xobjs));
+          for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) {
+            assign_success = CGAL::assign (xarc, *xobj_it);
+            CGAL_assertion (assign_success);
+            CGAL_USE(assign_success);
+            *oi++ = Labeled_curve_2 (xarc,
+                                     X_curve_label (xarc.is_directed_right(),
+                                                    cycle_id, curve_index++));
+          }
+        }
+        else if (orient == CGAL::RIGHT_TURN) {
+          // In case the current angle between the previous and the current
+          // edge is larger than pi/2, it not necessary to connect prev_op
+          // and op1 by a circular arc (as the case above): it is sufficient
+          // to shortcut the circular arc using a segment, whose sole purpose
+          // is to guarantee the continuity of the convolution cycle (we know
+          // this segment will not be part of the output offset or inset).
+          seg_short = X_monotone_curve_2(prev_op, op1);
+
+          dir_right_short = (f_comp_xy (prev_op, op1) == CGAL::SMALLER);
+          *oi++ = Labeled_curve_2 (seg_short,
+                                   X_curve_label (dir_right_short,
+                                                  cycle_id, curve_index++));
+        }
+      }
+
+      // Append the offset segment(s) to the convolution cycle.
+      CGAL_assertion (n_segments == 1 || n_segments == 2);
+      *oi++ = Labeled_curve_2 (seg1, X_curve_label (dir_right1,
+                                                    cycle_id, curve_index++));
+
+      if (n_segments == 2)
+      {
+        *oi++ = Labeled_curve_2 (seg2, X_curve_label (dir_right2,
+                                                      cycle_id, curve_index++));
+      }
+
+      // Proceed to the next polygon vertex.
+      prev_op = op2;
+      prev = curr;
+      curr = next;
+
+    } while (curr != first);
+
+    // Close the convolution cycle by creating the final circular arc,
+    // centered at the first vertex.
+    arc = Curve_2 (*first, r, CGAL::COUNTERCLOCKWISE,
+                   Tr_point_2 (op2.x(), op2.y()),
+                   Tr_point_2 (first_op.x(), first_op.y()));
+
+    // Subdivide the arc into x-monotone subarcs and insert them to the
+    // convolution cycle.
+    xobjs.clear();
+    f_make_x_monotone (arc, std::back_inserter(xobjs));
+
+    xobj_it = xobjs.begin();
+    while (xobj_it != xobjs.end())
+    {
+      assign_success = CGAL::assign (xarc, *xobj_it);
+      CGAL_assertion (assign_success);
+      CGAL_USE(assign_success);
+
+      ++xobj_it;
+      bool is_last = (xobj_it == xobjs.end());
+
+      *oi++ = Labeled_curve_2 (xarc,
+                               X_curve_label (xarc.is_directed_right(),
+                                              cycle_id, curve_index++, is_last));
+    }
+
+    return (oi);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h
new file mode 100644
index 0000000..7ba74f4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h
@@ -0,0 +1,418 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_ARR_LABELED_TRAITS_2_H
+#define CGAL_ARR_LABELED_TRAITS_2_H
+
+#include <CGAL/Minkowski_sum_2/Labels.h>
+#include <list>
+
+namespace CGAL {
+
+/*! \class
+ * A meta-traits class that adds lables to points and to x-monotone curves,
+ * such that the comparison of two points, as well as the computation of the
+ * intersections between two segments can be easily filtered.
+ */
+template <class Traits_>
+class Arr_labeled_traits_2 : public Traits_
+{
+private:
+
+  typedef Traits_                                      Base_traits_2;
+  typedef typename Base_traits_2::Point_2              Base_point_2;
+  typedef typename Base_traits_2::X_monotone_curve_2   Base_x_monotone_curve_2;
+
+public:
+
+  /*! \class
+   * A point extended by a label.
+   */
+  class Point_2 : public Base_point_2
+  {
+  private:
+
+    Point_label         _label;
+
+  public:
+
+    /*! Default constructor. */
+    Point_2 ()
+    {}
+
+    /*! Constructor from a base point. */
+    Point_2 (const Base_point_2& p) :
+      Base_point_2 (p),
+      _label()
+    {}
+
+    /*! Constructor from a point an a label. */
+    Point_2 (const Base_point_2& p, const Point_label& label) :
+      Base_point_2 (p),
+      _label (label)
+    {}
+
+    /*! Get the label. */
+    const Point_label& label () const
+    {
+      return (_label);
+    }
+  };
+
+  /*! \class
+   * An x-monotone curve extended by a label.
+   */
+  class X_monotone_curve_2 : public Base_x_monotone_curve_2
+  {
+  private:
+
+    X_curve_label         _label;
+
+  public:
+
+    /*! Default constructor. */
+    X_monotone_curve_2 ()
+    {}
+
+    /*! Constructor from a base x-monotone curve. */
+    X_monotone_curve_2 (const Base_x_monotone_curve_2& p) :
+      Base_x_monotone_curve_2 (p),
+      _label()
+    {}
+
+    /*! Constructor from an x-monotone curve an a label. */
+    X_monotone_curve_2 (const Base_x_monotone_curve_2& p,
+                        const X_curve_label& label) :
+      Base_x_monotone_curve_2 (p),
+      _label (label)
+    {}
+
+    /*! Get the label (const version). */
+    const X_curve_label& label () const
+    {
+      return (_label);
+    }
+
+    /*! Get the label (non-const version). */
+    X_curve_label& label ()
+    {
+      return (_label);
+    }
+
+    /*! Set the label. */
+    void set_label (const X_curve_label& label)
+    {
+      _label = label;
+      return;
+    }
+  };
+
+  typedef typename Base_traits_2::Has_left_category      Has_left_category;
+  typedef Tag_false                                      Has_merge_category;
+
+  /*! Default constructor. */
+  Arr_labeled_traits_2 ()
+  {}
+
+  // Inherited functors:
+  typedef typename Base_traits_2::Is_vertical_2         Is_vertical_2;
+  typedef typename Base_traits_2::Compare_y_at_x_2      Compare_y_at_x_2;
+  typedef typename Base_traits_2::Compare_y_at_x_right_2
+                                                        Compare_y_at_x_right_2;
+  typedef typename Base_traits_2::Equal_2               Equal_2;
+
+  /// \name Overriden functors.
+  //@{
+  class Compare_x_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Compare_x_2 (const Base_traits_2 * _base) :
+      base (_base)
+    {}
+
+    /*!
+     * Compare the x-coordinates of two points.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      // If two points have the same label, they are equal.
+      if (p1.label() == p2.label())
+        return (EQUAL);
+
+      return (base->compare_x_2_object()(p1, p2));
+    }
+  };
+
+  /*! Get a Compare_x_2 functor object. */
+  Compare_x_2 compare_x_2_object () const
+  {
+    return (Compare_x_2 (this));
+  }
+
+
+  class Compare_xy_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Compare_xy_2 (const Base_traits_2 *_base) :
+      base (_base)
+    {}
+
+    /*!
+     * Compare two points lexigoraphically: by x, then by y.
+     */
+    Comparison_result operator() (const Point_2& p1, const Point_2& p2) const
+    {
+      // If two points have the same label, they are equal.
+      if (p1.label() == p2.label())
+        return (EQUAL);
+
+      return (base->compare_xy_2_object()(p1, p2));
+    }
+  };
+
+  /*! Get a Compare_xy_2 functor object. */
+  Compare_xy_2 compare_xy_2_object () const
+  {
+    return (Compare_xy_2 (this));
+  }
+
+
+  class Construct_min_vertex_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Construct_min_vertex_2 (const Base_traits_2 *_base) :
+      base (_base)
+    {}
+
+    /*!
+     * Get the left endpoint of the x-monotone curve.
+     */
+    Point_2 operator() (const X_monotone_curve_2& cv) const
+    {
+      const Base_point_2&  pt = base->construct_min_vertex_2_object() (cv);
+
+      if (cv.label().right_count() == 1 && cv.label().left_count() == 0)
+      {
+        // A curve directed from left to right:
+        Point_label   label (cv.label().component(), cv.label().index());
+
+        return (Point_2 (pt, label));
+      }
+      else if (cv.label().right_count() == 0 && cv.label().left_count() == 1)
+      {
+        // A curve directed from right to left:
+        Point_label   label (cv.label().component(),
+                             cv.label().is_last() ? 0 : cv.label().index()+1);
+
+        return (Point_2 (pt, label));
+      }
+
+      // Assign an invalid label to the point.
+      return (Point_2 (pt));
+    }
+  };
+
+  /*! Get a Construct_min_vertex_2 functor object. */
+  Construct_min_vertex_2 construct_min_vertex_2_object () const
+  {
+    return (Construct_min_vertex_2 (this));
+  }
+
+
+  class Construct_max_vertex_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Construct_max_vertex_2 (const Base_traits_2 *_base) :
+      base (_base)
+    {}
+
+    /*!
+     * Get the right endpoint of the x-monotone curve.
+     */
+    Point_2 operator() (const X_monotone_curve_2& cv) const
+    {
+      const Base_point_2&  pt = base->construct_max_vertex_2_object() (cv);
+
+      if (cv.label().right_count() == 1 && cv.label().left_count() == 0)
+      {
+        // A curve directed from left to right:
+        Point_label   label (cv.label().component(),
+                             cv.label().is_last() ? 0 : cv.label().index()+1);
+
+        return (Point_2 (pt, label));
+      }
+      else if (cv.label().right_count() == 0 && cv.label().left_count() == 1)
+      {
+        // A curve directed from right to left:
+        Point_label   label (cv.label().component(), cv.label().index());
+
+        return (Point_2 (pt, label));
+      }
+
+      // Assign an invalid label to the point.
+      return (Point_2 (pt));
+    }
+  };
+
+  /*! Get a Construct_max_vertex_2 functor object. */
+  Construct_max_vertex_2 construct_max_vertex_2_object () const
+  {
+    return (Construct_max_vertex_2 (this));
+  }
+
+
+  class Split_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Split_2 (const Base_traits_2 * _base) :
+      base (_base)
+    {}
+
+    /*!
+     * Split a given x-monotone curve at a given point into two sub-curves.
+     */
+    void operator() (const X_monotone_curve_2& cv, const Point_2& p,
+                     X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
+    {
+      // Split the base curve into two.
+      base->split_2_object() (cv, p, c1, c2);
+
+      // Duplicate the label to both subcurves.
+      c1.set_label (cv.label());
+      c2.set_label (cv.label());
+
+      return;
+    }
+  };
+
+  /*! Get a Split_2 functor object. */
+  Split_2 split_2_object () const
+  {
+    return (Split_2 (this));
+  }
+
+
+  class Intersect_2
+  {
+  private:
+
+    const Base_traits_2 * base;
+
+  public:
+
+    /*! Constructor. */
+    Intersect_2 (const Base_traits_2 * _base) :
+      base (_base)
+    {}
+
+    /*!
+     * Find the intersections of the two given curves and insert them to the
+     * given output iterator.
+     */
+    template<class OutputIterator>
+    OutputIterator operator() (const X_monotone_curve_2& cv1,
+                               const X_monotone_curve_2& cv2,
+                               OutputIterator oi) const
+    {
+      // In case the curves are adjacent in their curve sequence, we do
+      // not have to compute their intersection (we already know that they
+      // have just one common endpoint).
+      if (cv1.label().is_adjacent (cv2.label()))
+        return (oi);
+
+      // Compute the intersection.
+      std::list<CGAL::Object>            base_objs;
+
+      base->intersect_2_object() (cv1, cv2, std::back_inserter (base_objs));
+
+      if (base_objs.empty())
+        return (oi);
+
+      // Attach labels to the intersection objects.
+      std::list<CGAL::Object>::iterator             obj_it;
+      const std::pair<Base_point_2, unsigned int>  *base_pt;
+      const Base_x_monotone_curve_2                *base_xcv;
+
+      for (obj_it = base_objs.begin(); obj_it != base_objs.end(); ++obj_it)
+      {
+        base_pt =
+          object_cast<std::pair<Base_point_2, unsigned int> > (&(*obj_it));
+
+        if (base_pt != NULL)
+        {
+          // Attach an invalid label to an itersection point.
+          *oi = CGAL::make_object
+            (std::make_pair (Point_2 (base_pt->first), base_pt->second));
+          ++oi;
+        }
+        else
+        {
+          base_xcv = object_cast<Base_x_monotone_curve_2> (&(*obj_it));
+          CGAL_assertion (base_xcv != NULL);
+
+          // Attach a merged label to the overlapping curve.
+          *oi = CGAL::make_object
+            (X_monotone_curve_2 (*base_xcv,
+                                 X_curve_label (cv1.label(), cv2.label())));
+          ++oi;
+        }
+      }
+
+      return (oi);
+    }
+  };
+
+  /*! Get an Intersect_2 functor object. */
+  Intersect_2 intersect_2_object () const
+  {
+    return (Intersect_2 (this));
+  }
+  //@}
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h
new file mode 100644
index 0000000..251bbdc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h
@@ -0,0 +1,176 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Ron Wein   <wein_r at yahoo.com>
+//             Efi Fogel  <efifogel at gmail.com>
+
+#ifndef CGAL_POLYGON_DECOMPOSITION_STRATEGY_ADAPTER_H
+#define CGAL_POLYGON_DECOMPOSITION_STRATEGY_ADAPTER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Partition_traits_2.h>
+#include <CGAL/partition_2.h>
+
+namespace CGAL {
+
+struct Tag_optimal_convex_parition { bool dummy; };
+
+struct Tag_approx_convex_parition { bool dummy; };
+
+struct Tag_Greene_convex_parition { bool dummy; };
+
+/*!
+ * \class
+ * An adapter of the global planar polygonal partitioning functions
+ * to a decomposition strategy-class.
+ */
+template <typename Kernel_, typename Container_, typename StrategyTag_>
+class Polygon_decomposition_strategy_adapter {
+public:
+  typedef Kernel_                                  Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
+  typedef typename Kernel::Point_2                 Point_2;
+  typedef StrategyTag_                             Strategy_tag;
+
+protected:
+  typedef Partition_traits_2<Kernel>               Traits_2;
+  typedef typename Traits_2::Polygon_2             Traits_polygon_2;
+
+  // Data members:
+  const Traits_2* m_traits;
+  bool m_own_traits;      // inidicates whether the kernel should be freed up.
+
+public:
+  /*! Default constructor. */
+  Polygon_decomposition_strategy_adapter() :
+    m_traits(NULL),
+    m_own_traits(false)
+  { init(); }
+
+  /*! Constructor. */
+  Polygon_decomposition_strategy_adapter(const Traits_2& traits) :
+    m_traits(traits),
+    m_own_traits(false)
+  { init(); }
+
+  /*! Destructor */
+  ~Polygon_decomposition_strategy_adapter()
+  {
+    if (m_own_traits) {
+      if (m_traits != NULL) {
+        delete m_traits;
+        m_traits = NULL;
+      }
+      m_own_traits = false;
+    }
+  }
+
+  //! Initialize
+  void init()
+  {
+    // Allocate the traits if not provided.
+    if (m_traits == NULL) {
+      m_traits = new Traits_2;
+      m_own_traits = true;
+    }
+  }
+
+  /*!
+   * Obtain the traits
+   * \return the traits
+   */
+  const Traits_2* traits() const { return m_traits; }
+
+  /*!
+   * Decompose a simple polygon to convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator>
+  OutputIterator operator()(const Polygon_2& pgn, OutputIterator oi) const
+  {
+    std::list<Traits_polygon_2> pgns;
+    typename std::list<Traits_polygon_2>::const_iterator pgn_it;
+
+    if (pgn.orientation() == CLOCKWISE) {
+      // Make a local copy of the polygon, and reverse the order of its
+      // vertices to make it counterclockwise oriented.
+      Polygon_2        my_pgn = pgn;
+
+      my_pgn.reverse_orientation();
+
+      // Perform the decomposition.
+      _decompose (my_pgn, Strategy_tag(), std::back_inserter(pgns));
+    }
+    else {
+      // Perform the decomposition on the original polygon.
+      _decompose (pgn, Strategy_tag(), std::back_inserter(pgns));
+    }
+
+    // Copy the polygons to the output iterator.
+    for (pgn_it = pgns.begin(); pgn_it != pgns.end(); ++pgn_it)
+      *oi++ = Polygon_2(pgn_it->vertices_begin(), pgn_it->vertices_end());
+
+    return (oi);
+  }
+
+private:
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using the optimal
+   * convex-partition method.
+   */
+  template <typename OutputIterator>
+  OutputIterator _decompose(const Polygon_2& pgn,
+                            Tag_optimal_convex_parition ,
+                            OutputIterator oi) const
+  {
+    return (optimal_convex_partition_2(pgn.vertices_begin(),
+                                       pgn.vertices_end(),
+                                       oi, *m_traits));
+  }
+
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using the
+   * approximated convex-partition method.
+   */
+  template <typename OutputIterator>
+  OutputIterator _decompose(const Polygon_2& pgn,
+                            Tag_approx_convex_parition ,
+                            OutputIterator oi) const
+  {
+    return (approx_convex_partition_2(pgn.vertices_begin(),
+                                      pgn.vertices_end(),
+                                      oi, *m_traits));
+  }
+
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using Greene's
+   * approximated convex-partition method.
+   */
+  template <typename OutputIterator>
+  OutputIterator _decompose(const Polygon_2& pgn,
+                            Tag_Greene_convex_parition ,
+                            OutputIterator oi) const
+  {
+    return (greene_approx_convex_partition_2(pgn.vertices_begin(),
+                                             pgn.vertices_end(),
+                                             oi, *m_traits));
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h
new file mode 100644
index 0000000..e66613f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h
@@ -0,0 +1,294 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_EXACT_OFFSET_BASE_H
+#define CGAL_EXACT_OFFSET_BASE_H
+
+#include <CGAL/Polygon_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+#include <CGAL/Gps_traits_2.h>
+#include <CGAL/Minkowski_sum_2/Labels.h>
+#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+/*! \class
+ * A base class for computing the offset of a given polygon by a given
+ * radius in an exact manner.
+ */
+template <class Traits_, class Container_>
+class Exact_offset_base_2
+{
+private:
+
+  typedef Traits_                                        Traits_2;
+
+  // Rational kernel types:
+  typedef typename Traits_2::Rat_kernel                  Rat_kernel;
+  typedef typename Rat_kernel::FT                        Rational;
+  typedef typename Rat_kernel::Point_2                   Rat_point_2;
+  typedef typename Rat_kernel::Line_2                    Rat_line_2;
+  typedef typename Rat_kernel::Circle_2                  Rat_circle_2;
+
+protected:
+
+  typedef Rat_kernel                                     Basic_kernel;
+  typedef Rational                                       Basic_NT;
+
+private:
+
+  // Algebraic kernel types:
+  typedef typename Traits_2::Alg_kernel                  Alg_kernel;
+  typedef typename Alg_kernel::FT                        Algebraic;
+  typedef typename Alg_kernel::Point_2                   Alg_point_2;
+
+  typedef typename Traits_2::Nt_traits                   Nt_traits;
+
+  // Traits-class types:
+  typedef typename Traits_2::Curve_2                     Curve_2;
+  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
+
+  typedef CGAL::Gps_traits_2<Traits_2>                   Gps_traits_2;
+
+protected:
+
+  typedef CGAL::Polygon_2<Rat_kernel, Container_>        Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Rat_kernel,
+                                     Container_>         Polygon_with_holes_2;
+  typedef typename Gps_traits_2::Polygon_2               Offset_polygon_2;
+
+private:
+
+  // Polygon-related types:
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+
+protected:
+
+  typedef Arr_labeled_traits_2<Traits_2>                 Labeled_traits_2;
+
+  typedef typename Labeled_traits_2::X_monotone_curve_2  Labeled_curve_2;
+
+public:
+
+  /*! Default constructor. */
+  Exact_offset_base_2 ()
+  {}
+
+protected:
+
+  /*!
+   * Compute the curves that constitute the offset of a simple polygon by a
+   * given radius.
+   * \param pgn The polygon.
+   * \param orient The orientation to traverse the vertices.
+   * \param r The offset radius.
+   * \param cycle_id The index of the cycle.
+   * \param oi An output iterator for the offset curves.
+   * \pre The value type of the output iterator is Labeled_curve_2.
+   * \return A past-the-end iterator for the holes container.
+   */
+  template <class OutputIterator>
+  OutputIterator _offset_polygon (const Polygon_2& pgn,
+                                  CGAL::Orientation orient,
+                                  const Rational& r,
+                                  unsigned int cycle_id,
+                                  OutputIterator oi) const
+  {
+    // Prepare circulators over the polygon vertices.
+    const bool            forward = (pgn.orientation() == orient);
+    Vertex_circulator     first, curr, next;
+
+    first = pgn.vertices_circulator();
+    curr = first;
+    next = first;
+
+    // Traverse the polygon vertices and edges and construct the arcs that
+    // constitute the single convolution cycle.
+    Alg_kernel                    alg_ker;
+    typename Alg_kernel::Equal_2  f_equal = alg_ker.equal_2_object();
+
+    Nt_traits       nt_traits;
+    const Rational  sqr_r = CGAL::square (r);
+    const Algebraic alg_r = nt_traits.convert (r);
+    Rational        x1, y1;              // The source of the current edge.
+    Rational        x2, y2;              // The target of the current edge.
+    Rational        delta_x, delta_y;    // (x2 - x1) and (y2 - y1), resp.
+    Algebraic       len;                 // The length of the current edge.
+    Algebraic       trans_x, trans_y;    // The translation vector.
+    Alg_point_2     op1, op2;            // The edge points of the offset edge.
+    Alg_point_2     first_op;            // The first offset point.
+    Algebraic       a, b, c;
+
+    unsigned int                    curve_index = 0;
+    Traits_2                        traits;
+    std::list<Object>               xobjs;
+    std::list<Object>::iterator     xobj_it;
+    typename Traits_2::Make_x_monotone_2
+                       f_make_x_monotone = traits.make_x_monotone_2_object();
+    Curve_2                         arc;
+    X_monotone_curve_2              xarc;
+    bool                            assign_success;
+
+    do
+    {
+      // Get a circulator for the next vertex (in the proper orientation).
+      if (forward)
+        ++next;
+      else
+        --next;
+
+      // Compute the vector v = (delta_x, delta_y) of the current edge,
+      // and compute the edge length ||v||.
+      x1 = curr->x();
+      y1 = curr->y();
+      x2 = next->x();
+      y2 = next->y();
+
+      delta_x = x2 - x1;
+      delta_y = y2 - y1;
+      len = nt_traits.sqrt (nt_traits.convert (CGAL::square (delta_x) +
+                                               CGAL::square (delta_y)));
+
+      // The angle theta between the vector v and the x-axis is given by:
+      //
+      //                 y2 - y1                        x2 - x1
+      //   sin(alpha) = ---------         cos(alpha) = ---------
+      //                  ||v||                          ||v||
+      //
+      // To offset the endpoints of the current edge we compute a vector
+      // (trans_x, trans_y) perpendicular to v. Since we traverse the polygon
+      // in a counterclockwise manner, the angle this vector forms with the
+      // x-axis is (alpha - PI/2), and we have:
+      //
+      //   trans_x = r*cos(alpha - PI/2) = r*sin(alpha)
+      //   trans_y = r*sin(alpha - PI/2) = -r*cos(alpha)
+      trans_x = nt_traits.convert (r * delta_y) / len;
+      trans_y = nt_traits.convert (-r * delta_x) / len;
+
+      // Construct the first offset vertex, which corresponds to the
+      // source vertex of the current polygon edge.
+      op1 = Alg_point_2 (nt_traits.convert (x1) + trans_x,
+                         nt_traits.convert (y1) + trans_y);
+
+      if (curr == first)
+      {
+        // This is the first edge we visit -- store op1 for future use.
+        first_op = op1;
+      }
+      else
+      {
+        if (! f_equal (op2, op1))
+        {
+          // Connect op2 (from the previous iteration) and op1 with a circular
+          // arc, whose supporting circle is (x1, x2) with radius r.
+          arc = Curve_2 (Rat_circle_2 (*curr, sqr_r),
+                         CGAL::COUNTERCLOCKWISE,
+                         op2, op1);
+
+          // Subdivide the arc into x-monotone subarcs and append them to the
+          // convolution cycle.
+          xobjs.clear();
+          f_make_x_monotone (arc, std::back_inserter(xobjs));
+
+          for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it)
+          {
+            assign_success = CGAL::assign (xarc, *xobj_it);
+            CGAL_assertion (assign_success);
+            CGAL_USE(assign_success);
+
+            *oi = Labeled_curve_2 (xarc,
+                                   X_curve_label (xarc.is_directed_right(),
+                                                  cycle_id,
+                                                  curve_index));
+            ++oi;
+            curve_index++;
+          }
+        }
+      }
+
+      // Construct the second offset vertex, which corresponds to the
+      // target vertex of the current polygon edge.
+      op2 = Alg_point_2 (nt_traits.convert (x2) + trans_x,
+                         nt_traits.convert (y2) + trans_y);
+
+      // The equation of the line connecting op1 and op2 is given by:
+      //
+      //   (y1 - y2)*x + (x2 - x1)*y + (r*len - y1*x2 - x1*y2) = 0
+      //
+      a = nt_traits.convert (-delta_y);
+      b = nt_traits.convert (delta_x);
+      c = alg_r*len - nt_traits.convert (y1*x2 - x1*y2);
+
+      xarc = X_monotone_curve_2 (a, b, c,
+                                 op1, op2);
+
+      *oi = Labeled_curve_2 (xarc,
+                             X_curve_label (xarc.is_directed_right(),
+                                            cycle_id,
+                                            curve_index));
+      ++oi;
+      curve_index++;
+
+      // Proceed to the next polygon vertex.
+      curr = next;
+
+    } while (curr != first);
+
+    if (! f_equal (op2, first_op))
+    {
+      // Close the convolution cycle by creating the final circular arc,
+      // centered at the first vertex.
+      arc = Curve_2 (Rat_circle_2 (*first, sqr_r),
+                     CGAL::COUNTERCLOCKWISE,
+                     op2, first_op);
+
+      // Subdivide the arc into x-monotone subarcs and append them to the
+      // convolution cycle.
+      bool           is_last;
+
+      xobjs.clear();
+      f_make_x_monotone (arc, std::back_inserter(xobjs));
+
+      xobj_it = xobjs.begin();
+      while (xobj_it != xobjs.end())
+      {
+        assign_success = CGAL::assign (xarc, *xobj_it);
+        CGAL_assertion (assign_success);
+        CGAL_USE(assign_success);
+
+        ++xobj_it;
+        is_last = (xobj_it == xobjs.end());
+
+        *oi = Labeled_curve_2 (xarc,
+                               X_curve_label (xarc.is_directed_right(),
+                                              cycle_id,
+                                              curve_index,
+                                              is_last));
+        ++oi;
+        curve_index++;
+      }
+    }
+
+    return (oi);
+  }
+
+};
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Hole_filter_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Hole_filter_2.h
new file mode 100644
index 0000000..7fb0c7d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Hole_filter_2.h
@@ -0,0 +1,88 @@
+// Copyright (c) 2015  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s): Sebastian Morr    <sebastian at morr.cc>
+
+#ifndef CGAL_MINKOWSKI_SUM_HOLE_FILTER_2_H
+#define CGAL_MINKOWSKI_SUM_HOLE_FILTER_2_H
+
+#include <CGAL/basic.h>
+#include <vector>
+
+namespace CGAL {
+
+/*! \class
+ * This class applies filter to a polygon with holes,
+ * by removing all of its holes that cannot possibly contribute
+ * to the Minkowski sum boundary.
+ */
+template <typename Kernel_, typename Container_>
+class Hole_filter_2
+{
+private:
+  typedef Kernel_               Kernel;
+  typedef Container_            Container;
+
+  typedef CGAL::Polygon_2<Kernel, Container>            Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel, Container> Polygon_with_holes_2;
+  typedef typename Polygon_with_holes_2::Hole_iterator  Hole_iterator;
+  typedef std::vector<Hole_iterator>                    Hole_iterator_vector;
+
+public:
+  /*! Filter out holes of a polygon with holes.
+   * \param[in] pgn1 The polygon with holes to filter.
+   * \param[in] pgn2 The reference polygon with holes.
+   * \param[out] filtered_pgn1 the filterd polygon.
+   */
+  void operator()(const Polygon_with_holes_2& pgn1,
+                  const Polygon_2& pgn2,
+                  Polygon_with_holes_2& filtered_pgn1) const
+  {
+    filtered_pgn1 = pgn1;
+
+    Hole_iterator_vector to_erase;
+    Bbox_2 boundary_bbox = pgn2.bbox();
+
+    Hole_iterator it = filtered_pgn1.holes_begin();
+    while (it != filtered_pgn1.holes_end()) {
+      Bbox_2 hole_bbox = (*it).bbox();
+
+      if ((hole_bbox.ymax()-hole_bbox.ymin() <
+           boundary_bbox.ymax()-boundary_bbox.ymin()) ||
+          (hole_bbox.xmax()-hole_bbox.xmin() <
+           boundary_bbox.xmax()-boundary_bbox.xmin()))
+      {
+        to_erase.push_back(it);
+      }
+      ++it;
+    }
+
+    typename Hole_iterator_vector::iterator it2 = to_erase.begin();
+    while (it2 != to_erase.end()) filtered_pgn1.erase_hole(*it2++);
+  }
+
+  /*! Filter out holes of a polygon with holes.
+   * \param[in] pgn1 The polygon with holes to filter.
+   * \param[in] pgn2 The reference polygon polygon with holes.
+   * \param[out] filtered_pgn1 the filterd polygon.
+   */
+  void operator()(const Polygon_with_holes_2& pgn1,
+                  const Polygon_with_holes_2& pgn2,
+                  Polygon_with_holes_2& filtered_pgn1) const
+  { operator()(pgn1, pgn2.outer_boundary(), filtered_pgn1); }
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Labels.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Labels.h
new file mode 100644
index 0000000..9438db6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Labels.h
@@ -0,0 +1,285 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_MINKOWSKI_SUM_LABELS_H
+#define CGAL_MINKOWSKI_SUM_LABELS_H
+
+namespace CGAL {
+
+/*! \class
+ * A label for endpoints of Minkowski-sum curves.
+ */
+class Point_label
+{
+private:
+
+  unsigned int  _component;   // The index of the component this point
+                              // belongs to.
+  unsigned int  _index;       // Index of the point in the component.
+
+public:
+
+  /*! Default constructor. */
+  Point_label () :
+    _component (0),
+    _index (0)
+  {}
+
+  /*!
+   * Constructor.
+   * \param component The index of the component.
+   * \param index Index of the point within the component.
+   */
+  Point_label (unsigned int component,
+               unsigned int index) :
+    _component (component),
+    _index (index)
+  {
+    CGAL_precondition (component != 0);
+  }
+
+  /*! Check whether the label is valid. */
+  bool is_valid () const
+  {
+    return (_component != 0);
+  }
+
+  /*! Check two labels for equality. */
+  bool operator== (const Point_label& label) const
+  {
+    if (_component == 0 || label._component == 0)
+      return (false);
+
+    return (_component == label._component &&
+	    _index == label._index);
+  }
+
+  /*! Get the component. */
+  unsigned int component () const
+  {
+    return (_component);
+  }
+
+  /*! Get the index within the component. */
+  unsigned int index () const
+  {
+    return (_index);
+  }
+
+  /*! Set the component. */
+  void set_component (unsigned int component)
+  {
+    CGAL_precondition (component != 0);
+
+    _component = component;
+    return;
+  }
+
+  /*! Set the index. */
+  void set_index (unsigned int index)
+  {
+    _index = index;
+    return;
+  }
+};
+
+/*! \class
+ * A label for Minkowski-sum x-monotone curves.
+ */
+class X_curve_label
+{
+private:
+
+  unsigned int  _component;   // The index of the component the x-monotone
+                              // curve belongs to.
+  unsigned int  _index;       // Index of the curve in the component.
+  bool          _is_last;     // Is the curve the last one in its component.
+  int           _right;       // The number of curves directed from left to
+                              // right that are associated with the curve.
+  int           _left;        // The number of curves directed from right to
+                              // left that are associated with the curve.
+
+public:
+
+  /*! Default constructor. */
+  X_curve_label () :
+    _component (0),
+    _index (0),
+    _is_last (false),
+    _right (0),
+    _left (0)
+  {}
+
+  /*!
+   * Constructor.
+   * \param is_directed_right Is the curve directed from left to right.
+   * \param component The index of the component.
+   * \param index Index of the curve in the component.
+   * \param is_last Is this the last curve of the component.
+   */
+  X_curve_label (bool is_directed_right,
+                 unsigned int component,
+                 unsigned int index,
+                 bool is_last = false) :
+    _component (component),
+    _index (index),
+    _is_last (is_last),
+    _right (is_directed_right ? 1 : 0),
+    _left (is_directed_right ? 0 : 1)
+  {
+    CGAL_precondition (component != 0);
+  }
+
+  /*!
+   * Construct a merged curve label.
+   * \param label1 The first label.
+   * \param label2 The second label.
+   */
+  X_curve_label (const X_curve_label& label1,
+                 const X_curve_label& label2) :
+    _component (0),
+    _index (0),
+    _is_last (false),
+    _right (label1._right + label2._right),
+    _left (label1._left + label2._left)
+  {}
+
+  /*! Check whether the label is valid. */
+  bool is_valid () const
+  {
+    return (_component != 0);
+  }
+
+  /*! Check two labels for equality. */
+  bool operator== (const X_curve_label& label) const
+  {
+    if (_component == 0)
+      return (false);
+
+    return (_component == label._component &&
+	    _index == label._index);
+  }
+
+  /*! Check whether the given label is the predecessor of this label. */
+  bool is_prev (const X_curve_label& label) const
+  {
+    if (_component == 0)
+      return (false);
+
+    return (_component == label._component &&
+	    (label._index + 1 == _index ||
+	     (label._is_last && _index == 0)));
+  }
+
+  /*! Check whether the given label is the succcessor of this label. */
+  bool is_next (const X_curve_label& label) const
+  {
+    if (_component == 0)
+      return (false);
+
+    return (_component == label._component &&
+	    (_index + 1 == label._index ||
+	     (_is_last && label._index == 0)));
+  }
+
+  /*!
+   * Check if the given label is the successor of this label
+   * (or vice-versa).
+   */
+  bool is_adjacent (const X_curve_label& label) const
+  {
+    if (_component == 0)
+      return (false);
+
+    // Two curves can be adjacent only if they belong to the same component.
+    if (_component != label._component)
+      return (false);
+
+    // Check if one label is adjacent to the next.
+    return ((_index + 1 == label._index) ||
+            (label._index + 1 == _index) ||
+            (_is_last && label._index == 0) ||
+            (label._is_last && _index == 0));
+  }
+
+  /*! Get the number of curves directed from left to right. */
+  int right_count () const
+  {
+    return (_right);
+  }
+
+  /*! Get the number of curves directed from right to left. */
+  int left_count () const
+  {
+    return (_left);
+  }
+
+  /*! Get the component. */
+  unsigned int component () const
+  {
+    return (_component);
+  }
+
+  /*! Get the index within the component. */
+  unsigned int index () const
+  {
+    return (_index);
+  }
+
+  /*! Check whether this is the last curve in the component. */
+  bool is_last () const
+  {
+    return (_is_last);
+  }
+
+  /*! Set the component. */
+  void set_component (unsigned int component)
+  {
+    CGAL_precondition (component != 0);
+
+    _component = component;
+    return;
+  }
+
+  /*!
+   * Set the curve index within the component.
+   * \param index The index in the component.
+   * \param is_last Is this the last curve of the component.
+   */
+  void set_index (unsigned int index, bool is_last = false)
+  {
+    _index = index;
+    _is_last = is_last;
+    return;
+  }
+
+  /*! Get the flag value. */
+  bool get_flag () const
+  {
+    return (_is_last);
+  }
+
+  /*! Set the flag value. */
+  void set_flag (bool flag)
+  {
+    _is_last = flag;
+    return;
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h
new file mode 100644
index 0000000..c783dd3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h
@@ -0,0 +1,512 @@
+// Copyright (c) 2015  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s): Sebastian Morr    <sebastian at morr.cc>
+
+#ifndef CGAL_MINKOWSKI_SUM_BY_REDUCED_CONVOLUTION_2_H
+#define CGAL_MINKOWSKI_SUM_BY_REDUCED_CONVOLUTION_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Arrangement_with_history_2.h>
+#include <CGAL/Arr_segment_traits_2.h>
+
+#include <CGAL/Minkowski_sum_2/AABB_collision_detector_2.h>
+
+#include <queue>
+#include <boost/unordered_set.hpp>
+#include <boost/unordered_map.hpp>
+
+namespace CGAL {
+
+// This algorithm was first described by Evan Behar and Jyh-Ming Lien in "Fast
+// and Robust 2D Minkowski Sum Using Reduced Convolution", IROS 2011.
+// This implementation is based on Alon Baram's 2013 master's thesis "Polygonal
+// Minkowski Sums via Convolution: Theory and Practice" at Tel-Aviv University.
+template <class Kernel_, class Container_>
+class Minkowski_sum_by_reduced_convolution_2
+{
+private:
+  typedef Kernel_ Kernel;
+  typedef Container_ Container;
+
+  // Basic types:
+  typedef CGAL::Polygon_2<Kernel, Container> Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel, Container> Polygon_with_holes_2;
+  typedef typename Kernel::Point_2                      Point_2;
+  typedef typename Kernel::Vector_2                     Vector_2;
+  typedef typename Kernel::Direction_2                  Direction_2;
+  typedef typename Kernel::Triangle_2                   Triangle_2;
+  typedef typename Kernel::FT                           FT;
+
+  // Segment-related types:
+  typedef Arr_segment_traits_2<Kernel>                  Traits_2;
+  typedef typename Traits_2::X_monotone_curve_2         Segment_2;
+  typedef std::list<Segment_2>                          Segment_list;
+  typedef Arr_default_dcel<Traits_2>                    Dcel;
+  typedef std::pair<int, int>                           State;
+
+  // Arrangement-related types:
+  typedef Arrangement_with_history_2<Traits_2, Dcel>    Arrangement_history_2;
+  typedef typename Arrangement_history_2::Halfedge_handle Halfedge_handle;
+  typedef typename Arrangement_history_2::Face_iterator Face_iterator;
+  typedef typename Arrangement_history_2::Face_handle   Face_handle;
+  typedef typename Arrangement_history_2::Ccb_halfedge_circulator
+  Ccb_halfedge_circulator;
+  typedef typename Arrangement_history_2::Originating_curve_iterator
+  Originating_curve_iterator;
+  typedef typename Arrangement_history_2::Inner_ccb_iterator Inner_ccb_iterator;
+
+  // Function object types:
+  typename Kernel::Construct_translated_point_2 f_add;
+  typename Kernel::Construct_vector_2 f_vector;
+  typename Kernel::Construct_direction_2 f_direction;
+  typename Kernel::Orientation_2 f_orientation;
+  typename Kernel::Compare_xy_2 f_compare_xy;
+  typename Kernel::Counterclockwise_in_between_2 f_ccw_in_between;
+
+public:
+  Minkowski_sum_by_reduced_convolution_2()
+  {
+    // Obtain kernel functors
+    Kernel ker;
+    f_add = ker.construct_translated_point_2_object();
+    f_vector = ker.construct_vector_2_object();
+    f_direction = ker.construct_direction_2_object();
+    f_orientation = ker.orientation_2_object();
+    f_compare_xy = ker.compare_xy_2_object();
+    f_ccw_in_between = ker.counterclockwise_in_between_2_object();
+  }
+
+  template <typename OutputIterator>
+  void operator()(const Polygon_2& pgn1, const Polygon_2& pgn2,
+                  Polygon_2& outer_boundary, OutputIterator holes) const
+  {
+    CGAL_precondition(pgn1.is_simple());
+    CGAL_precondition(pgn2.is_simple());
+    CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE);
+    CGAL_precondition(pgn2.orientation() == COUNTERCLOCKWISE);
+
+    const Polygon_with_holes_2 pwh1(pgn1);
+    const Polygon_with_holes_2 pwh2(pgn2);
+
+    common_operator(pwh1, pwh2, outer_boundary, holes);
+  }
+
+  template <class OutputIterator>
+  void operator()(const Polygon_with_holes_2& pgn1,
+                  const Polygon_with_holes_2& pgn2,
+                  Polygon_2& outer_boundary, OutputIterator holes) const
+  {
+    common_operator(pgn1, pgn2, outer_boundary, holes);
+  }
+
+  template <class OutputIterator>
+  void operator()(const Polygon_2& pgn1,
+                  const Polygon_with_holes_2& pgn2,
+                  Polygon_2& outer_boundary, OutputIterator holes) const
+  {
+    CGAL_precondition(pgn1.is_simple());
+    CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE);
+    const Polygon_with_holes_2 pwh1(pgn1);
+    common_operator(pwh1, pgn2, outer_boundary, holes);
+  }
+
+private:
+  template <class OutputIterator>
+  void common_operator(const Polygon_with_holes_2& pgn1,
+                       const Polygon_with_holes_2& pgn2,
+                       Polygon_2& outer_boundary, OutputIterator holes) const
+  {
+    // Initialize collision detector. It operates on pgn2 and on the inversed
+    // pgn1:
+    const Polygon_with_holes_2 inversed_pgn1 =
+      transform(Aff_transformation_2<Kernel>(SCALING, -1), pgn1);
+    AABB_collision_detector_2<Kernel, Container>
+      collision_detector(pgn2, inversed_pgn1);
+
+    // Compute the reduced convolution (see section 4.1 of Alon's master's
+    // thesis)
+    Segment_list reduced_convolution;
+    build_reduced_convolution(pgn1, pgn2, reduced_convolution);
+
+    // Insert the segments into an arrangement
+    Arrangement_history_2 arr;
+    insert(arr, reduced_convolution.begin(), reduced_convolution.end());
+
+    // Trace the outer loop and put it in 'outer_boundary'
+    get_outer_loop(arr, outer_boundary);
+
+    // Check for each face whether it is a hole in the M-sum. If it is, add it
+    // to 'holes'. See chapter 3 of of Alon's master's thesis.
+    for (Face_iterator face = arr.faces_begin(); face != arr.faces_end();
+         ++face)
+    {
+      handle_face(arr, face, holes, collision_detector);
+    }
+  }
+
+  // Builds the reduced convolution for each pair of loop in the two
+  // polygons-with-holes.
+  void build_reduced_convolution(const Polygon_with_holes_2& pgnwh1,
+                                 const Polygon_with_holes_2& pgnwh2,
+                                 Segment_list& reduced_convolution) const
+  {
+    for (std::size_t x = 0; x < 1+pgnwh1.number_of_holes(); ++x)
+    {
+      for (std::size_t y = 0; y < 1+pgnwh2.number_of_holes(); ++y)
+      {
+        if ((x != 0) && (y != 0))
+        {
+          continue;
+        }
+
+        Polygon_2 pgn1, pgn2;
+
+        if (x == 0) {
+          pgn1 = pgnwh1.outer_boundary();
+        }
+        else {
+          typename Polygon_with_holes_2::Hole_const_iterator it1 =
+            pgnwh1.holes_begin();
+          for (std::size_t count = 0; count < x-1; count++) { it1++; }
+          pgn1 = *it1;
+        }
+
+        if (y == 0) {
+          pgn2 = pgnwh2.outer_boundary();
+        }
+        else {
+          typename Polygon_with_holes_2::Hole_const_iterator it2 =
+            pgnwh2.holes_begin();
+          for (std::size_t count = 0; count < y-1; count++) { it2++; }
+          pgn2 = *it2;
+        }
+
+        build_reduced_convolution(pgn1, pgn2, reduced_convolution);
+      }
+    }
+  }
+
+  // Builds the reduced convolution using a fiber grid approach. For each
+  // starting vertex, try to add two outgoing next states. If a visited
+  // vertex is reached, then do not explore further. This is a BFS-like
+  // iteration beginning from each vertex in the first column of the fiber
+  // grid.
+  void build_reduced_convolution(const Polygon_2& pgn1, const Polygon_2& pgn2,
+                                 Segment_list& reduced_convolution) const
+  {
+    int n1 = static_cast<int>(pgn1.size());
+    int n2 = static_cast<int>(pgn2.size());
+
+    std::vector<Point_2> p1_vertices = vertices_of_polygon(pgn1);
+    std::vector<Point_2> p2_vertices = vertices_of_polygon(pgn2);
+
+    // Init the direcions of both polygons
+    std::vector<Direction_2> p1_dirs = directions_of_polygon(p1_vertices);
+    std::vector<Direction_2> p2_dirs = directions_of_polygon(p2_vertices);
+
+    // Contains states that were already visited
+    boost::unordered_set<State> visited_states;
+
+    // Init the queue with vertices from the first column
+    std::queue<State> state_queue;
+    for (int i = n1-1; i >= 0; --i)
+    {
+      state_queue.push(State(i, 0));
+    }
+
+    while (state_queue.size() > 0)
+    {
+      State curr_state = state_queue.front();
+      state_queue.pop();
+
+      int i1 = curr_state.first;
+      int i2 = curr_state.second;
+
+      // If this state was already visited, skip it
+      if (visited_states.count(curr_state) > 0)
+      {
+        continue;
+      }
+      visited_states.insert(curr_state);
+
+      int next_i1 = (i1+1) % n1;
+      int next_i2 = (i2+1) % n2;
+      int prev_i1 = (n1+i1-1) % n1;
+      int prev_i2 = (n2+i2-1) % n2;
+
+      // Try two transitions: From (i,j) to (i+1,j) and to (i,j+1). Add
+      // the respective segments, if they are in the reduced convolution.
+      for(int step_in_pgn1 = 0; step_in_pgn1 <= 1; step_in_pgn1++)
+      {
+        int new_i1, new_i2;
+        if (step_in_pgn1)
+        {
+          new_i1 = next_i1;
+          new_i2 = i2;
+        }
+        else
+        {
+          new_i1 = i1;
+          new_i2 = next_i2;
+        }
+
+        // If the segment's direction lies counterclockwise in between
+        // the other polygon's vertex' ingoing and outgoing directions,
+        // the segment belongs to the full convolution.
+        bool belongs_to_convolution;
+        if (step_in_pgn1)
+        {
+          belongs_to_convolution =
+            f_ccw_in_between(p1_dirs[i1], p2_dirs[prev_i2], p2_dirs[i2]) ||
+            p1_dirs[i1] == p2_dirs[i2];
+        }
+        else
+        {
+          belongs_to_convolution =
+            f_ccw_in_between(p2_dirs[i2], p1_dirs[prev_i1], p1_dirs[i1]) ||
+            p2_dirs[i2] == p1_dirs[prev_i1];
+        }
+
+        if (belongs_to_convolution)
+        {
+          state_queue.push(State(new_i1, new_i2));
+
+          // Only edges added to convex vertices can be on the M-sum's boundary.
+          // This filter only leaves the *reduced* convolution.
+          bool convex;
+          if (step_in_pgn1)
+          {
+            convex = is_convex(p2_vertices[prev_i2], p2_vertices[i2],
+              p2_vertices[next_i2]);
+          }
+          else
+          {
+            convex = is_convex(p1_vertices[prev_i1], p1_vertices[i1],
+              p1_vertices[next_i1]);
+          }
+
+          if (convex)
+          {
+            Point_2 start_point = get_point(i1, i2, p1_vertices, p2_vertices);
+            Point_2 end_point = get_point(new_i1, new_i2, p1_vertices,
+                                          p2_vertices);
+            reduced_convolution.push_back(Segment_2(start_point, end_point));
+          }
+        }
+      }
+    }
+  }
+
+  // Returns a vector of the polygon's vertices, in case that Container
+  // is std::list and we cannot use vertex(i).
+  std::vector<Point_2> vertices_of_polygon(const Polygon_2& p) const
+  {
+    std::vector<Point_2> vertices;
+
+    for (typename Polygon_2::Vertex_const_iterator it = p.vertices_begin();
+         it != p.vertices_end(); it++)
+    {
+      vertices.push_back(*it);
+    }
+    return vertices;
+  }
+
+  // Returns a sorted list of the polygon's edges
+  std::vector<Direction_2> directions_of_polygon(
+    const std::vector<Point_2>& points) const
+  {
+    std::vector<Direction_2> directions;
+    std::size_t n = points.size();
+
+    for (std::size_t i = 0; i < n-1; ++i)
+    {
+      directions.push_back(f_direction(f_vector(points[i], points[i+1])));
+    }
+    directions.push_back(f_direction(f_vector(points[n-1], points[0])));
+
+    return directions;
+  }
+
+  bool is_convex(const Point_2& prev, const Point_2& curr,
+                 const Point_2& next) const
+  {
+    return f_orientation(prev, curr, next) == LEFT_TURN;
+  }
+
+  // Returns the point corresponding to a state (i,j).
+  Point_2 get_point(int i1, int i2, const std::vector<Point_2>& pgn1,
+                    const std::vector<Point_2>& pgn2) const
+  {
+
+    return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2]));
+  }
+
+  // Put the outer loop of the arrangement in 'outer_boundary'
+  void get_outer_loop(Arrangement_history_2& arr,
+                      Polygon_2& outer_boundary) const
+  {
+    Inner_ccb_iterator icit = arr.unbounded_face()->inner_ccbs_begin();
+    Ccb_halfedge_circulator circ_start = *icit;
+    Ccb_halfedge_circulator circ = circ_start;
+
+    do
+    {
+      outer_boundary.push_back(circ->source()->point());
+    }
+    while (--circ != circ_start);
+  }
+
+  // Check whether the face is on the M-sum's border. Add it to 'holes' if it is.
+  template <class OutputIterator>
+  void handle_face(const Arrangement_history_2& arr, const Face_handle face,
+                   OutputIterator holes,
+                   AABB_collision_detector_2<Kernel, Container>&
+                   collision_detector) const
+  {
+
+    // If the face contains holes, it can't be on the Minkowski sum's border
+    if (face->holes_begin() != face->holes_end())
+    {
+      return;
+    }
+
+    Ccb_halfedge_circulator start = face->outer_ccb();
+    Ccb_halfedge_circulator circ = start;
+
+    // The face needs to be orientable
+    do
+    {
+      if (!do_original_edges_have_same_direction(arr, circ))
+      {
+        return;
+      }
+    }
+    while (++circ != start);
+
+    // When the reversed polygon 1, translated by a point inside of this face,
+    // collides with polygon 2, this cannot be a hole
+    Point_2 inner_point = get_point_in_face(face);
+    if (collision_detector.check_collision(inner_point))
+    {
+      return;
+    }
+
+    // At this point, the face is a real hole, add it to 'holes'
+    Polygon_2 pgn_hole;
+    circ = start;
+
+    do
+    {
+      pgn_hole.push_back(circ->source()->point());
+    }
+    while (--circ != start);
+
+    *holes = pgn_hole;
+    ++holes;
+  }
+
+  // Check whether the convolution's original edge(s) had the same direction as
+  // the arrangement's half edge
+  bool do_original_edges_have_same_direction(const Arrangement_history_2& arr,
+                                             const Halfedge_handle he) const
+  {
+    Originating_curve_iterator segment_itr;
+
+    for (segment_itr = arr.originating_curves_begin(he);
+         segment_itr != arr.originating_curves_end(he); ++segment_itr)
+    {
+      if (f_compare_xy(segment_itr->source(), segment_itr->target()) ==
+          (Comparison_result)he->direction())
+      {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  // Return a point in the face's interior by finding a diagonal
+  Point_2 get_point_in_face(const Face_handle face) const
+  {
+    Ccb_halfedge_circulator current_edge = face->outer_ccb();
+    Ccb_halfedge_circulator next_edge = current_edge;
+    next_edge++;
+
+    Point_2 a, v, b;
+
+    // Move over the face's vertices until a convex corner is encountered:
+    do
+    {
+      a = current_edge->source()->point();
+      v = current_edge->target()->point();
+      b = next_edge->target()->point();
+
+      current_edge++;
+      next_edge++;
+    }
+    while (!is_convex(a, v, b));
+
+    Triangle_2 ear(a, v, b);
+    FT min_distance = -1;
+    const Point_2* min_q = 0;
+
+    // Of the remaining vertices, find the one inside of the "ear" with minimal
+    // distance to v:
+    while (++next_edge != current_edge)
+    {
+      const Point_2& q = next_edge->target()->point();
+      if (ear.has_on_bounded_side(q))
+      {
+        FT distance = squared_distance(q, v);
+        if ((min_q == 0) || (distance < min_distance))
+        {
+          min_distance = distance;
+          min_q = &q;
+        }
+      }
+    }
+
+    // If there was no vertex inside of the ear, return it's centroid.
+    // Otherwise, return a point between v and min_q.
+    if (min_q == 0)
+    {
+      return centroid(ear);
+    }
+    else
+    {
+      return midpoint(v, *min_q);
+    }
+  }
+
+  template <class Transformation>
+  Polygon_with_holes_2 transform(const Transformation& t,
+                                 const Polygon_with_holes_2& p) const
+  {
+    Polygon_with_holes_2 result(CGAL::transform(t, p.outer_boundary()));
+
+    typename Polygon_with_holes_2::Hole_const_iterator it = p.holes_begin();
+    while(it != p.holes_end())
+    {
+      Polygon_2 p2(it->vertices_begin(), it->vertices_end());
+      result.add_hole(CGAL::transform(t, p2));
+      ++it;
+    }
+    return result;
+  }
+};
+
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h
new file mode 100644
index 0000000..df36eaf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h
@@ -0,0 +1,638 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Ron Wein   <wein_r at yahoo.com>
+//             Efi Fogel  <efifogel at gmail.com>
+
+#ifndef CGAL_MINKOWSKI_SUM_CONV_H
+#define CGAL_MINKOWSKI_SUM_CONV_H
+
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Minkowski_sum_2/Labels.h>
+#include <CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h>
+#include <CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * A class for computing the Minkowski sum of two simple polygons based on the
+ * convolution of their boundaries.
+ */
+template <typename Kernel_, typename Container_>
+class Minkowski_sum_by_convolution_2 {
+public:
+  typedef Kernel_                                        Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
+
+private:
+  // Kernel types:
+  typedef typename Kernel::Point_2                       Point_2;
+  typedef typename Kernel::Vector_2                      Vector_2;
+  typedef typename Kernel::Direction_2                   Direction_2;
+
+  // Kernel functors:
+  typedef typename Kernel::Equal_2                       Equal_2;
+  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
+  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
+  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
+  typedef typename Kernel::Construct_opposite_line_2     Opposite_line_2;
+  typedef typename Kernel::Orientation_2                 Compute_orientation_2;
+  typedef typename Kernel::Compare_xy_2                  Compare_xy_2;
+  typedef typename Kernel::Counterclockwise_in_between_2 Ccw_in_between_2;
+
+  // Polygon-related types:
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+  typedef std::pair<Vertex_circulator, unsigned int>     Vertex_ref;
+  typedef std::pair<Vertex_ref, Vertex_ref>              Anchor;
+  typedef std::list<Anchor>                              Anchors_queue;
+
+  /*! \class
+   * An auxiliary class for representing labels of convolved vertex pairs.
+   */
+  class Convolution_label {
+  private:
+    unsigned int index1;       // Vertex index of the first polygon.
+    unsigned int index2;       // Vertex index of the second polygon.
+    unsigned int move_on;      // On which polygon do we move.
+
+  public:
+    /*! Default constructor. */
+    Convolution_label() : move_on(0) {}
+
+    /*! Constructor with parameters. */
+    Convolution_label(unsigned int ind1, unsigned int ind2,
+                      unsigned int move) :
+      index1(ind1),
+      index2(ind2),
+      move_on(move)
+    {
+      CGAL_precondition(move_on == 1 || move_on == 2);
+    }
+
+    /*! Less-then operator (for the usage of std::set). */
+    bool operator<(const Convolution_label& label) const
+    {
+      if (index1 < label.index1) return (true);
+      else if (index1 > label.index1) return (false);
+
+      if (index2 < label.index2) return (true);
+      else if (index2 > label.index2) return (false);
+
+      return (move_on < label.move_on);
+    }
+  };
+
+  typedef std::set<Convolution_label>                     Labels_set;
+
+  // Traits-related types:
+  typedef Arr_segment_traits_2<Kernel>                    Segment_traits_2;
+  typedef Arr_labeled_traits_2<Segment_traits_2>          Traits_2;
+
+  typedef typename Segment_traits_2::X_monotone_curve_2   Segment_2;
+  typedef typename Traits_2::X_monotone_curve_2           Labeled_segment_2;
+  typedef std::list<Labeled_segment_2>                    Segments_list;
+
+  typedef Union_of_segment_cycles_2<Traits_2, Polygon_2>  Union_2;
+
+  const Kernel* m_kernel;
+  bool m_own_kernel;    // inidicates whether the kernel should be freed up.
+
+  // Data members:
+  Equal_2                 f_equal;
+  Translate_point_2       f_add;
+  Construct_vector_2      f_vector;
+  Construct_direction_2   f_direction;
+  Opposite_line_2         f_opp_line;
+  Compute_orientation_2   f_orientation;
+  Compare_xy_2            f_compare_xy;
+  Ccw_in_between_2        f_ccw_in_between;
+
+public:
+  /*! Default constructor. */
+  Minkowski_sum_by_convolution_2() :
+    m_kernel(new Kernel),
+    m_own_kernel(true)
+  { init(); }
+
+  /*! Constructor. */
+  Minkowski_sum_by_convolution_2(const Kernel& kernel) :
+    m_kernel(&kernel),
+    m_own_kernel(false)
+  { init(); }
+
+  /*! Destructor */
+  ~Minkowski_sum_by_convolution_2()
+  {
+    if (m_own_kernel) {
+      if (m_kernel != NULL) {
+        delete m_kernel;
+        m_kernel = NULL;
+      }
+      m_own_kernel = false;
+    }
+  }
+
+  /*! Initialize. */
+  void init()
+  {
+    // Obtain kernel functors.
+    f_equal = m_kernel->equal_2_object();
+    f_add = m_kernel->construct_translated_point_2_object();
+    f_vector = m_kernel->construct_vector_2_object();
+    f_direction = m_kernel->construct_direction_2_object();
+    f_opp_line = m_kernel->construct_opposite_line_2_object();
+    f_orientation = m_kernel->orientation_2_object();
+    f_compare_xy = m_kernel->compare_xy_2_object();
+    f_ccw_in_between = m_kernel->counterclockwise_in_between_2_object();
+  }
+
+  /*!
+   * Obtain the kernel
+   * \return the kernel
+   */
+  const Kernel* kernel() const { return m_kernel; }
+
+  /*!
+   * Compute the Minkowski sum of two simple polygons.
+   * Note that as the input polygons may not be convex, the Minkowski sum may
+   * not be a simple polygon. The result is therefore represented as
+   * the outer boundary of the Minkowski sum (which is always a simple polygon)
+   * and a container of simple polygons, representing the holes inside this
+   * polygon.
+   * \param pgn1 The first polygon.
+   * \param pgn2 The second polygon.
+   * \param sum_bound Output: A polygon respresenting the outer boundary
+   *                          of the Minkowski sum.
+   * \param sum_holes Output: An output iterator for the holes in the sum,
+   *                          represented as simple polygons.
+   * \pre Both input polygons are simple.
+   * \return A past-the-end iterator for the holes in the sum.
+   */
+  template <typename OutputIterator>
+  OutputIterator operator()(const Polygon_2& pgn1, const Polygon_2& pgn2,
+                            Polygon_2& sum_bound, OutputIterator sum_holes)
+    const
+  {
+    CGAL_precondition(pgn1.is_simple());
+    CGAL_precondition(pgn2.is_simple());
+
+    // Prepare the vector of directions for the first polygon.
+    const unsigned int n1 = static_cast<unsigned int>(pgn1.size());
+    const bool forward1 = (pgn1.orientation() == COUNTERCLOCKWISE);
+    std::vector<Direction_2> dirs1(n1);
+    Vertex_circulator curr1, next1;
+    unsigned int k1;
+
+    next1 = curr1 = pgn1.vertices_circulator();
+    for (k1 = 0; k1 < n1; ++k1) {
+      if (forward1) ++next1;
+      else --next1;
+
+      dirs1[k1] = f_direction(f_vector(*curr1, *next1));
+      curr1 = next1;
+    }
+
+    // Prepare the vector of directions for the second polygon.
+    // Also prepare a list containing all reflex vertices of this polygon.
+    const unsigned int n2 = static_cast<unsigned int>(pgn2.size());
+    const bool forward2 = (pgn2.orientation() == COUNTERCLOCKWISE);
+    std::vector<Direction_2> dirs2(n2);
+    Vertex_circulator prev2, curr2, next2;
+    Vertex_ref bottom_left;
+    // bool                      is_convex2 = true;
+    std::list<Vertex_ref> reflex_vertices;
+    unsigned int k2;
+
+    prev2 = next2 = curr2 = pgn2.vertices_circulator();
+
+    if (forward2) --prev2;
+    else ++prev2;
+
+    for (k2 = 0; k2 < n2; ++k2) {
+      if (forward2) ++next2;
+      else --next2;
+
+      if (k2 == 0)
+        bottom_left = Vertex_ref(curr2, 0);
+      else if (f_compare_xy(*curr2, *(bottom_left.first)) == SMALLER)
+        bottom_left = Vertex_ref(curr2, k2);
+
+      if (f_orientation(*prev2, *curr2, *next2) == RIGHT_TURN) {
+        // We found a reflex vertex.
+        // is_convex2 = false;
+        reflex_vertices.push_back (Vertex_ref (curr2, k2));
+      }
+
+      dirs2[k2] = f_direction(f_vector(*curr2, *next2));
+      prev2 = curr2;
+      curr2 = next2;
+    }
+
+    // Add the bottom-left vertex of the second polygon to the reflex vertices.
+    typename std::list<Vertex_ref>::iterator  reflex_it;
+
+    reflex_vertices.push_front(bottom_left);
+
+    // Construct the segments of the convolution cycles.
+    unsigned int curr_id = 0;
+    unsigned int cycles = 0;
+    Segments_list conv_segments;
+    Segments_list cycle;
+    Labels_set used_labels;
+    Anchor anchor;
+    Anchors_queue queue;
+    unsigned int loops;
+
+    for (reflex_it = reflex_vertices.begin();
+         reflex_it != reflex_vertices.end(); ++reflex_it)
+    {
+      // Get the current reflex vertex (or the bottom-left vertex).
+      next2 = curr2 = reflex_it->first;
+      k2 = reflex_it->second;
+
+      if (forward2) ++next2;
+      else --next2;
+
+      // Search the first polygon for a vertex that contains (k1, k2, 1) in
+      // a convolution cycle.
+      next1 = curr1 = pgn1.vertices_circulator();
+      for (k1 = 0; k1 < n1; ++k1) {
+        if (forward1) ++next1;
+        else --next1;
+
+        if ((used_labels.count(Convolution_label(k1, k2, 1)) == 0 &&
+             (f_ccw_in_between(dirs1[k1], dirs2[(n2 + k2 - 1) % n2],
+                               dirs2[k2]) ||
+              f_equal(dirs1[k1], dirs2[k2]))) ||
+            (used_labels.count(Convolution_label(k1, k2, 2)) == 0 &&
+             f_ccw_in_between(dirs2[k2], dirs1[(n1 + k1 - 1) % n1],
+                              dirs1[k1])))
+        {
+          // Construct the current convolution cycle.
+          queue.clear();
+          queue.push_back(Anchor(Vertex_ref(curr1, k1),
+                                 Vertex_ref(curr2, k2)));
+          loops = 0;
+
+          while (! queue.empty()) {
+            // Pop the first pair of anchor vertices from the queue.
+            anchor = queue.front();
+            queue.pop_front();
+            loops++;
+
+            const Vertex_ref& vert1 = anchor.first;
+            const Vertex_ref& vert2 = anchor.second;
+
+            if (loops > 0 &&
+                used_labels.count(Convolution_label(vert1.second,
+                                                    vert2.second, 2)) != 0)
+            {
+              loops--;
+              continue;
+            }
+
+            // Add a loop to the current convolution cycle.
+            curr_id++;
+            _convolution_cycle(curr_id,
+                               n1, forward1, dirs1, vert1.first, vert1.second,
+                               n2, forward2, dirs2, vert2.first, vert2.second,
+                               used_labels, queue,
+                               cycle);
+
+            // Catenate the segments of the current loop to the convolution
+            // list.
+            if (cycle.empty()) {
+              --loops;
+            }
+            else {
+              conv_segments.splice(conv_segments.end(), cycle);
+              CGAL_assertion(cycle.empty());
+            }
+          }
+          ++cycles;
+        }
+
+        curr1 = next1;
+      }
+    }
+
+    // Compute the union of the cycles that represent the Minkowski sum.
+    Union_2     unite;
+
+    sum_holes = unite(conv_segments.begin(), conv_segments.end(),
+                      sum_bound, sum_holes);
+
+    return (sum_holes);
+  }
+
+private:
+  /*!
+   * Compute a convolution cycle starting from tow given vertices.
+   * \param cycle_id The index of the current cycle.
+   * \param n1 The size of the first polygon.
+   * \param forward1 Whether we move forward or backward on this polygon.
+   * \param dirs1 The directions of the edges in the first polygon.
+   * \param curr1 Points to the current vertex in the first polygon.
+   * \param k1 The index of this vertex (between 0 and n1 - 1).
+   * \param n2 The size of the second polygon.
+   * \param forward2 Whether we move forward or backward on this polygon.
+   * \param dirs2 The directions of the edges in the second polygon.
+   * \param curr2 Points to the current vertex in the second polygon.
+   * \param k2 The index of this vertex (between 0 and n2 - 1).
+   * \param used_labels Input/output: The segment labels used so far.
+   * \param queue A queue of anchor vertices for loops in the cycle.
+   * \param cycle Output: An list of labeled segments that constitute the
+   *                      convolution cycle.
+   * \return A past-the-end iterator for the output segments.
+   */
+  void _convolution_cycle(unsigned int cycle_id,
+                          unsigned int n1, bool forward1,
+                          const std::vector<Direction_2>& dirs1,
+                          Vertex_circulator curr1, unsigned int k1,
+                          unsigned int n2, bool forward2,
+                          const std::vector<Direction_2>& dirs2,
+                          Vertex_circulator curr2, unsigned int k2,
+                          Labels_set& used_labels,
+                          Anchors_queue& queue,
+                          Segments_list& cycle) const
+
+  {
+    // Update the circulator pointing to the next vertices in both polygons.
+    unsigned int seg_index = 0;
+    const unsigned int first1 = k1;
+    const unsigned int first2 = k2;
+    Vertex_circulator next1 = curr1;
+    Vertex_circulator next2 = curr2;
+    Convolution_label label;
+    Point_2 first_pt, curr_pt, next_pt;
+    bool inc1, inc2;
+    Comparison_result res;
+    const bool MOVE_ON_1 = true, MOVE_ON_2 = false;
+
+    if (forward1) ++next1;
+    else --next1;
+
+    if (forward2) ++next2;
+    else --next2;
+
+    // Start constructing the convolution cycle from *curr1 and *curr2.
+    curr_pt = first_pt = f_add(*curr1, f_vector(CGAL::ORIGIN, *curr2));
+    do {
+      // Determine on which polygons we should move.
+      inc1 = false;
+      inc2 = false;
+
+      if (f_ccw_in_between(dirs1[k1], dirs2[(n2 + k2 - 1) % n2], dirs2[k2])) {
+        inc1 = true;
+
+        label = Convolution_label(k1, k2, 1);
+        if (used_labels.count(label) != 0)
+          inc1 = false;
+      }
+
+      if (f_ccw_in_between(dirs2[k2], dirs1[(n1 + k1 - 1) % n1], dirs1[k1])) {
+        if (inc1) {
+          // If we are about to increment the first polygon, add an anchor
+          // to the queue. Next time we reach here we will increment the
+          // second polygon (and proceed until reaching this point again and
+          // closing the loop).
+          label = Convolution_label(k1, k2, 2);
+          if (used_labels.count(label) == 0) {
+            queue.push_back(Anchor(Vertex_ref(curr1, k1),
+                                   Vertex_ref(curr2, k2)));
+          }
+        }
+        else {
+          inc2 = true;
+
+          label = Convolution_label(k1, k2, 2);
+          if (used_labels.count(label) != 0)
+            inc2 = false;
+        }
+      }
+
+      if (! inc1 && ! inc2 && f_equal(dirs1[k1], dirs2[k2])) {
+        inc1 = true;
+        inc2 = true;
+
+        label = Convolution_label(k1, k2, 1);
+        if (used_labels.count(label) != 0) inc1 = false;
+
+        if (inc1) label = Convolution_label((k1 + 1) % n1, k2, 2);
+        else label = Convolution_label(k1, k2, 2);
+
+        if (used_labels.count(label) != 0) inc2 = false;
+      }
+
+      CGAL_assertion(inc1 || inc2);
+
+      // Act according to the increment flags.
+      if (inc1) {
+        // Translate the current edge of the first polygon to *curr2.
+        next_pt = f_add(*next1, f_vector(CGAL::ORIGIN, *curr2));
+
+        res = f_compare_xy(curr_pt, next_pt);
+        CGAL_assertion(res != EQUAL);
+
+        cycle.push_back(Labeled_segment_2(Segment_2(curr_pt, next_pt),
+                                          X_curve_label((res == SMALLER),
+                                                        cycle_id,
+                                                        seg_index,
+                                                        MOVE_ON_1)));
+        used_labels.insert(Convolution_label(k1, k2, 1));
+        ++seg_index;
+
+        // Proceed to the next vertex of the first polygon.
+        curr1 = next1;
+        k1 = (k1 + 1) % n1;
+
+        if (forward1) ++next1;
+        else --next1;
+
+        curr_pt = next_pt;
+      }
+
+      if (inc2) {
+        // Translate the current edge of the second polygon to *curr1.
+        next_pt = f_add(*next2, f_vector(CGAL::ORIGIN, *curr1));
+
+        res = f_compare_xy(curr_pt, next_pt);
+        CGAL_assertion(res != EQUAL);
+
+        cycle.push_back(Labeled_segment_2(Segment_2(curr_pt, next_pt),
+                                          X_curve_label((res == SMALLER),
+                                                        cycle_id,
+                                                        seg_index,
+                                                        MOVE_ON_2)));
+        used_labels.insert(Convolution_label(k1, k2, 2));
+        seg_index++;
+
+        // Proceed to the next vertex of the second polygon.
+        curr2 = next2;
+        k2 = (k2 + 1) % n2;
+
+        if (forward2) ++next2;
+        else --next2;
+
+        curr_pt = next_pt;
+      }
+
+    } while ((k1 != first1) || (k2 != first2));
+
+    CGAL_assertion(f_equal(curr_pt, first_pt));
+
+    // Before moving un-necessary sub-cycles from the segment list, make sure
+    // the list contains no "cyclic" sub-cylces. We do that by making sure that
+    // the first and last segments of the list correspond to traversals of
+    // different polygons.
+    int steps = static_cast<int>(cycle.size());
+
+    while ((steps > 0) &&
+           cycle.front().label().get_flag() == cycle.back().label().get_flag())
+    {
+      cycle.push_back(cycle.front());
+      cycle.pop_front();
+      steps--;
+    }
+
+    if (steps == 0) {
+      cycle.clear();
+      return;
+    }
+
+    // Reduce un-necessary sub-cycles. This is done by scanning the segments
+    // list for subsequences sharing a common move_on indicator. When we
+    // encounter such a subsequence that equals the size of the corresponding
+    // polygon, we can safely remove it from the convolution cycle.
+    typename std::list<Labeled_segment_2>::iterator  first, curr;
+    bool move_on;
+    unsigned int count = 1;
+    bool reduced_cycle = false;
+
+    curr = first = cycle.begin();
+    move_on = first->label().get_flag();
+
+    curr->label().set_flag(false);
+    ++curr;
+    while (curr != cycle.end()) {
+      if ((move_on == MOVE_ON_1 && count == n1) ||
+          (move_on == MOVE_ON_2 && count == n2))
+      {
+        // We have discovered a sequence of moves on one of the polygon that
+        // equals the polygon size, so we can remove this sequence.
+        cycle.erase(first, curr);
+        reduced_cycle = true;
+        first = curr;
+        move_on = first->label().get_flag();
+        count = 1;
+      }
+      else {
+        if (move_on == curr->label().get_flag()) {
+          ++count;
+        }
+        else {
+          first = curr;
+          move_on = first->label().get_flag();
+          count = 1;
+        }
+      }
+
+      curr->label().set_flag(false);
+      ++curr;
+    }
+
+    if ((move_on == MOVE_ON_1 && count == n1) ||
+        (move_on == MOVE_ON_2 && count == n2))
+    {
+      cycle.erase(first, curr);
+      reduced_cycle = true;
+    }
+
+    // Eliminate "antenna"s that occur in the cycle.
+    typename std::list<Labeled_segment_2>::iterator next, after_next;
+    bool is_last = false;
+
+    next = curr = cycle.begin();
+    ++next;
+
+    do {
+      // If the current segment is the last one in the cycle, its next segment
+      // (in cyclic order) is the first one.
+      if (next == cycle.end()) {
+        is_last = true;
+        next = cycle.begin();
+        after_next = cycle.end();
+      }
+      else {
+        after_next = next;
+        ++after_next;
+      }
+
+      // Check whether the current segment and the next segment form an
+      // "antenna". This can happen only if their supporting lines are
+      // opposite (as we know curr's target equals next's source):
+      if (f_equal(curr->line(), f_opp_line(next->line()))) {
+        // In case curr's source equals next's target, then the two segments
+        // are opposite and cancel one another. We can therefore remove them
+        // both. Otherwise, we replace them with the segment directed from
+        // curr's source to next's target.
+        curr_pt = curr->source();
+        next_pt = next->target();
+
+        res = f_compare_xy(curr_pt, next_pt);
+
+        if (res != EQUAL) {
+          cycle.insert(curr,
+                       Labeled_segment_2(Segment_2(curr_pt, next_pt),
+                                         X_curve_label((res == SMALLER),
+                                                       cycle_id,
+                                                       curr->label().index(),
+                                                       false)));
+        }
+
+        cycle.erase(curr);
+        cycle.erase(next);
+        curr = after_next;
+
+        if (after_next != cycle.end()) {
+          next = curr;
+          ++next;
+        }
+
+        // Mark that we have reduced the cycle.
+        reduced_cycle = true;
+      }
+      else {
+        curr = next;
+        if (next != cycle.end()) {
+          ++next;
+        }
+      }
+
+    } while (! is_last);
+
+    // In case we have reduced the cycle, re-number the segments in it.
+    if (reduced_cycle) {
+      seg_index = 0;
+      for (curr = cycle.begin(); curr != cycle.end(); ++curr)
+        curr->label().set_index(seg_index++);
+    }
+    cycle.back().label().set_flag(true);
+    return;
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h
new file mode 100644
index 0000000..5f03d75
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h
@@ -0,0 +1,421 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_MINKOWSKI_SUM_DECOMP_2_H
+#define CGAL_MINKOWSKI_SUM_DECOMP_2_H
+
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+
+#include <CGAL/Boolean_set_operations_2.h>
+#include <CGAL/General_polygon_set_2.h>
+#include <CGAL/Gps_segment_traits_2.h>
+#include <list>
+
+namespace CGAL {
+
+/*! \class
+ * A class for computing the Minkowski sum of two simple polygons based on
+ * their decomposition two convex sub-polygons, taking the pairwise sums and
+ * computing the union of the sub-sums.
+ */
+
+template <class DecompStrategy_, class Container_>
+class Minkowski_sum_by_decomposition_2 {
+public:
+  typedef DecompStrategy_                              Decomposition_strategy;
+  typedef Container_                                   Container;
+
+  typedef typename Decomposition_strategy::Polygon_2     Polygon_2;
+
+  typedef typename Decomposition_strategy::Kernel        Kernel;
+  typedef CGAL::Arr_segment_traits_2<Kernel>             Arr_segment_traits;
+  typedef CGAL::Gps_segment_traits_2<Kernel, Container, Arr_segment_traits>
+                                                         Traits_2;
+  typedef CGAL::General_polygon_set_2<Traits_2>          General_polygon_set_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel,Container>   Polygon_with_holes_2;
+  typedef typename General_polygon_set_2::Arrangement_2  Arrangement_2;
+
+private:
+  // Kernel types:
+  typedef typename Kernel::Point_2                       Point_2;
+  typedef typename Kernel::Vector_2                      Vector_2;
+  typedef typename Kernel::Direction_2                   Direction_2;
+
+  // Kernel functors:
+  typedef typename Kernel::Compare_angle_with_x_axis_2   Compare_angle_2;
+  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
+  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
+  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
+  typedef typename Kernel::Compare_x_2                   Compare_x_2;
+  typedef typename Kernel::Compare_y_2                   Compare_y_2;
+  typedef typename Kernel::Compare_xy_2                  Compare_xy_2;
+
+  // Polygon-related types:
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+  typedef std::list<Polygon_2>                           Polygons_list;
+  typedef typename Polygons_list::iterator               Polygons_iterator;
+
+  typedef std::list<Polygon_with_holes_2>
+    Polygon_with_holes_list;
+
+  // Data members:
+  const Decomposition_strategy* m_decomposition_strategy;
+  bool m_own_strategy;    // inidicates whether the stategy should be freed up.
+
+  const Traits_2* m_traits;
+  bool m_own_traits;      // inidicates whether the kernel should be freed up.
+
+  Compare_angle_2         f_compare_angle;
+  Translate_point_2       f_add;
+  Construct_vector_2      f_vector;
+  Construct_direction_2   f_direction;
+  Compare_x_2             f_compare_x;
+  Compare_y_2             f_compare_y;
+  Compare_xy_2            f_compare_xy;
+
+public:
+  //! Default constructor.
+  Minkowski_sum_by_decomposition_2() :
+    m_decomposition_strategy(NULL),
+    m_own_strategy(false),
+    m_traits(NULL),
+    m_own_traits(false)
+  { init(); }
+
+  //! Constructor.
+  Minkowski_sum_by_decomposition_2(const Decomposition_strategy& strategy,
+                                   const Traits_2& traits) :
+    m_decomposition_strategy(&strategy),
+    m_own_strategy(false),
+    m_traits(&traits),
+    m_own_traits(false)
+  { init(); }
+
+  //! Constructor.
+  Minkowski_sum_by_decomposition_2(const Decomposition_strategy& strategy) :
+    m_decomposition_strategy(&strategy),
+    m_own_strategy(false),
+    m_traits(NULL),
+    m_own_traits(false)
+  { init(); }
+
+  //! Constructor.
+  Minkowski_sum_by_decomposition_2(const Traits_2& traits) :
+    m_decomposition_strategy(NULL),
+    m_own_strategy(false),
+    m_traits(&traits),
+    m_own_traits(false)
+  { init(); }
+
+  /*! Destructor */
+  ~Minkowski_sum_by_decomposition_2()
+  {
+    if (m_own_traits) {
+      if (m_traits != NULL) {
+        delete m_traits;
+        m_traits = NULL;
+      }
+      m_own_traits = false;
+    }
+
+    if (m_own_strategy) {
+      if (m_decomposition_strategy != NULL) {
+        delete m_decomposition_strategy;
+        m_decomposition_strategy = NULL;
+      }
+      m_own_strategy = false;
+    }
+  }
+
+  //! Initialize
+  void init()
+  {
+    // Allocate the traits if not provided.
+    if (m_traits == NULL) {
+      m_traits = new Traits_2;
+      m_own_traits = true;
+    }
+    // Allocate the strategy if not provided.
+    if (m_decomposition_strategy == NULL) {
+      m_decomposition_strategy = new Decomposition_strategy;
+      m_own_strategy = true;
+    }
+    // Obtain kernel functors.
+    const Kernel* kernel = m_traits;
+    f_compare_angle = kernel->compare_angle_with_x_axis_2_object();
+    f_add = kernel->construct_translated_point_2_object();
+    f_vector = kernel->construct_vector_2_object();
+    f_direction = kernel->construct_direction_2_object();
+    f_compare_x = kernel->compare_x_2_object();
+    f_compare_y = kernel->compare_y_2_object();
+    f_compare_xy = kernel->compare_xy_2_object();
+  }
+
+  /*!
+   * Obtain the traits
+   * \return the traits
+   */
+  const Traits_2* traits() const { return m_traits; }
+
+  /*!
+   * Obtain the decomposition strategy
+   * \return the decomposition strategy
+   */
+  const Decomposition_strategy* decomposition_strategy() const
+  { return m_decomposition_strategy; }
+
+  /*!
+   * Compute the Minkowski sum of two simple polygons.
+   * \param pgn1 The first polygon.
+   * \param pgn2 The second polygon.
+   * \pre Both input polygons are simple.
+   * \return The resulting polygon with holes, representing the sum.
+   */
+  Polygon_with_holes_2
+  operator()(const Polygon_2& pgn1, const Polygon_2& pgn2) const
+  {
+    CGAL_precondition(pgn1.is_simple());
+    CGAL_precondition(pgn2.is_simple());
+
+    // Decompose both input polygons to convex sub-polygons.
+    Polygons_list sub_pgns1;
+    Polygons_list sub_pgns2;
+
+    (*m_decomposition_strategy)(pgn1, std::back_inserter(sub_pgns1));
+    (*m_decomposition_strategy)(pgn2, std::back_inserter(sub_pgns2));
+
+    return operator()(sub_pgns1.begin(), sub_pgns1.end(),
+                      sub_pgns2.begin(), sub_pgns2.end());
+  }
+
+  /*!
+   * Compute the Minkowski sum of two polygon-with-holes.
+   * \param pgn1 The first polygon.
+   * \param pgn2 The second polygon.
+   * \pre Both input polygons are simple.
+   * \return The resulting polygon with holes, representing the sum.
+   */
+  Polygon_with_holes_2
+  operator()(const Polygon_with_holes_2& pgn1,
+             const Polygon_with_holes_2& pgn2) const
+  {
+    // Decompose both input polygons to convex sub-polygons.
+    Polygons_list sub_pgns1;
+    Polygons_list sub_pgns2;
+
+    (*m_decomposition_strategy)(pgn1, std::back_inserter(sub_pgns1));
+    (*m_decomposition_strategy)(pgn2, std::back_inserter(sub_pgns2));
+
+    return operator()(sub_pgns1.begin(), sub_pgns1.end(),
+                      sub_pgns2.begin(), sub_pgns2.end());
+  }
+
+  /*!
+   * Compute the Minkowski sum of a simple polygon and a polygon-with-holes.
+   * \param pgn1 The simple polygon.
+   * \param pgn2 The polygon with holes.
+   * \pre Both input polygons are simple.
+   * \return The resulting polygon with holes, representing the sum.
+   */
+  Polygon_with_holes_2
+  operator()(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2) const
+  {
+    CGAL_precondition(pgn1.is_simple());
+
+    // Decompose both input polygons to convex sub-polygons.
+    Polygons_list sub_pgns1;
+    Polygons_list sub_pgns2;
+
+    (*m_decomposition_strategy)(pgn1, std::back_inserter(sub_pgns1));
+    (*m_decomposition_strategy)(pgn2, std::back_inserter(sub_pgns2));
+
+    return operator()(sub_pgns1.begin(), sub_pgns1.end(),
+                      sub_pgns2.begin(), sub_pgns2.end());
+  }
+
+  /*! Compute the union of the pairwise Minkowski sum of two sets of
+   * convex polygons.
+   * \param begin1 the iterator to the begin element of the first set.
+   * \param end1 the iterator to the past-the-end element of the first set.
+   * \param begin2 the iterator to the begin element of the second set.
+   * \param end2 the iterator to the past-the-end element of the second set.
+   */
+  template <class InputIterator1, class InputIterator2>
+  Polygon_with_holes_2 operator()(InputIterator1 begin1, InputIterator1 end1,
+                                  InputIterator2 begin2, InputIterator1 end2)
+    const
+  {
+    Polygons_list sub_sum_polygons;
+
+    // Compute the sub-sums of all pairs of sub-polygons.
+    for (InputIterator1 curr1 = begin1; curr1 != end1; ++curr1) {
+      for (InputIterator2 curr2 = begin2; curr2 != end2; ++curr2) {
+        // Compute the sum of the current pair of convex sub-polygons.
+        Polygon_2 sub_sum;
+        _compute_sum_of_convex(*curr1, *curr2, sub_sum);
+        sub_sum_polygons.push_back(sub_sum);
+      }
+    }
+
+    General_polygon_set_2 gps(*m_traits);
+    gps.join(sub_sum_polygons.begin(), sub_sum_polygons.end());
+
+    Arrangement_2& arr = gps.arrangement();
+    simplify(arr);
+
+    Polygon_with_holes_list sum;
+    gps.polygons_with_holes(std::back_inserter(sum));
+    CGAL_assertion(sum.size() == 1);
+    return (*(sum.begin()));
+  }
+
+private:
+  /*! Merge mergable edges
+   * \param arr (in) The underlying arrangement.
+   */
+  void simplify(Arrangement_2& arr) const
+  {
+    typename Arrangement_2::Vertex_iterator vit = arr.vertices_begin();
+    while (vit != arr.vertices_end()) {
+      typename Arrangement_2::Vertex_iterator curr = vit++;
+      if (curr->degree() != 2) continue;
+      typename Arrangement_2::Halfedge_around_vertex_circulator eit =
+        curr->incident_halfedges();
+      const typename Arrangement_2::Geometry_traits_2* traits =
+        arr.geometry_traits();
+      if (traits->are_mergeable_2_object()(eit->curve(), eit->next()->curve()))
+      {
+        typename Arrangement_2::Geometry_traits_2::X_monotone_curve_2 c;
+        traits->merge_2_object()(eit->curve(), eit->next()->curve(), c);
+        arr.merge_edge(eit, eit->next(), c);
+      }
+    }
+  }
+
+  /*!
+   * Compute the Minkowski sum of two convex polygons.
+   * \param pgn1 The first convex polygon.
+   * \param pgn2 The second convex polygon.
+   * \param sub_sum Output: Polygon which is the sub sum of the two convex
+   *        polygons
+   */
+  void _compute_sum_of_convex(const Polygon_2& pgn1,
+                              const Polygon_2& pgn2,
+                              Polygon_2& sub_sum) const
+  {
+    // Find the bottom-left vertex in both polygons.
+    Vertex_circulator first1, curr1, next1;
+    Vertex_circulator bottom_left1;
+    Comparison_result res;
+    bottom_left1 = curr1 = first1 = pgn1.vertices_circulator();
+    ++curr1;
+    while (curr1 != first1) {
+      res = f_compare_y(*curr1, *bottom_left1);
+      if ((res == SMALLER) ||
+          ((res == EQUAL) && (f_compare_x(*curr1, *bottom_left1) == SMALLER)))
+      {
+        bottom_left1 = curr1;
+      }
+      ++curr1;
+    }
+
+    // Find the bottom-left vertex in both polygons.
+    Vertex_circulator         first2, curr2, next2;
+    Vertex_circulator         bottom_left2;
+
+    bottom_left2 = curr2 = first2 = pgn2.vertices_circulator();
+    ++curr2;
+    while (curr2 != first2) {
+      res = f_compare_y(*curr2, *bottom_left2);
+      if ((res == SMALLER) ||
+          ((res == EQUAL) && (f_compare_x(*curr2, *bottom_left2) == SMALLER)))
+      {
+        bottom_left2 = curr2;
+      }
+      ++curr2;
+    }
+
+    // Start from the bottom-left vertices.
+    next1 = curr1 = bottom_left1;
+    ++next1;
+    next2 = curr2 = bottom_left2;
+    ++next2;
+
+    // Compute the Minkowski sum.
+    Point_2 first_pt;
+    Point_2 curr_pt;
+    Point_2 prev_pt;
+    bool is_first = true;
+    bool inc1, inc2;
+    bool moved_on1 = false;
+    bool moved_on2 = false;
+
+    do {
+      // Compute the sum of the two current vertices (we actually translate
+      // the point curr1 by a vector equivalent to the point curr2).
+      curr_pt = f_add(*curr1, f_vector(CGAL::ORIGIN, *curr2));
+
+      if (is_first) {
+        // This is the first point we have computed.
+        first_pt = prev_pt = curr_pt;
+        is_first = false;
+        sub_sum.push_back(first_pt);
+      }
+      else {
+        // Add a segment from the previously summed point to the current one.
+        res = f_compare_xy(prev_pt, curr_pt);
+        CGAL_assertion (res != EQUAL);
+        prev_pt = curr_pt;
+        sub_sum.push_back(curr_pt);
+      }
+
+      // Compare the angles the current edges form with the x-axis.
+      res = f_compare_angle(f_direction(f_vector(*curr1, *next1)),
+                            f_direction(f_vector(*curr2, *next2)));
+
+      // Proceed to the next vertex according to the result.
+      inc1 = (res != LARGER);
+      inc2 = (res != SMALLER);
+
+      if (inc1 && moved_on1 && (curr1 == bottom_left1)) {
+        inc1 = false;
+        inc2 = true;
+      }
+
+      if (inc2 && moved_on2 && (curr2 == bottom_left2)) {
+        inc1 = true;
+        inc2 = false;
+      }
+
+      if (inc1) {
+        curr1 = next1;
+        ++next1;
+        moved_on1 = true;
+      }
+
+      if (inc2) {
+        curr2 = next2;
+        ++next2;
+         moved_on2 = true;
+     }
+    } while ((curr1 != bottom_left1) || (curr2 != bottom_left2));
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_conv_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_conv_2.h
new file mode 100644
index 0000000..63b1cb5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_conv_2.h
@@ -0,0 +1,198 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_OFFSET_CONV_H
+#define CGAL_OFFSET_CONV_H
+
+#include <CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h>
+#include <list>
+
+namespace CGAL {
+
+/*! \class
+ * A class for computing the offset of a given polygon by a given radius
+ * by constructing a single convolution cycle and computing its interior.
+ */
+template <class Base_>
+class Offset_by_convolution_2 : private Base_
+{
+private:
+
+  typedef Base_                                          Base;
+
+public:
+
+  typedef typename Base::Basic_kernel                    Kernel;
+  typedef typename Base::Basic_NT                        NT;
+  typedef typename Base::Polygon_2                       Polygon_2;
+  typedef typename Base::Polygon_with_holes_2            Polygon_with_holes_2;
+  typedef typename Base::Offset_polygon_2                Offset_polygon_2;
+
+private:
+
+  typedef typename Base::Labeled_traits_2                Labeled_traits_2;
+  typedef typename Base::Labeled_curve_2                 Labeled_curve_2;
+  typedef std::list<Labeled_curve_2>                     Curves_list;
+
+  typedef Union_of_curve_cycles_2<Labeled_traits_2,
+                                  Offset_polygon_2>      Union_2;
+
+  using Base::_offset_polygon;
+public:
+
+  /*! Constructor. */
+  Offset_by_convolution_2 (const Base_& base) :
+    Base (base)
+  {}
+
+  /*!
+   * Compute the offset of a simple polygon by a given radius.
+   * Note that as the input polygon may not be convex, its offset may not be
+   * simply connected. The result is therefore represented as the outer
+   * boundary of the Minkowski sum (which is always a simple offset polygon)
+   * and a container of offset polygons, representing the holes in this "outer"
+   * polygon.
+   * \param pgn The polygon.
+   * \param r The offset radius.
+   * \param off_bound Output: The outer boundary of the offset polygon.
+   * \param off_holes Output: An output iterator for the holes in the offset.
+   * \pre The polygon is simple.
+   * \return A past-the-end iterator for the holes container.
+   */
+  template <class OutputIterator>
+  OutputIterator operator() (const Polygon_2& pgn,
+                             const NT& r,
+                             Offset_polygon_2& off_bound,
+                             OutputIterator off_holes) const
+  {
+    CGAL_precondition (pgn.is_simple());
+
+    // Compute the curves that form the single convolution cycle for the
+    // given polygon.
+    Curves_list                     cycle;
+
+    _offset_polygon (pgn,
+                     CGAL::COUNTERCLOCKWISE,
+                     r,
+                     1,                       // The ID of the single cycle.
+                     std::back_inserter (cycle));
+
+    // Compute the union of the cycles that represent the offset polygon.
+    Union_2     unite;
+
+    off_holes = unite (cycle.begin(), cycle.end(),
+                       off_bound, off_holes);
+
+    return (off_holes);
+  }
+
+  /*!
+   * Compute the offset of a polygon with holes by a given radius.
+   * The result is represented as the outer boundary of the Minkowski sum
+   * (which is always a simple offset polygon) and a container of offset
+   * polygons, representing the holes in this "outer" polygon.
+   * \param pwh The polygon with holes.
+   * \param r The offset radius.
+   * \param off_bound Output: The outer boundary of the offset polygon.
+   * \param off_holes Output: An output iterator for the holes in the offset.
+   * \pre The polygon is bounded (has an outer boundary).
+   * \return A past-the-end iterator for the holes container.
+   */
+  template <class OutputIterator>
+  OutputIterator operator() (const Polygon_with_holes_2& pwh,
+                             const NT& r,
+                             Offset_polygon_2& off_bound,
+                             OutputIterator off_holes) const
+  {
+    CGAL_precondition (! pwh.is_unbounded());
+
+    // Compute the curves that form the convolution cycle for the polygon
+    // that forms the outer boundary.
+    Curves_list                     cycle;
+    unsigned int                    cycle_id = 1;
+
+    _offset_polygon (pwh.outer_boundary(),
+                     CGAL::COUNTERCLOCKWISE,
+                     r,
+                     cycle_id,
+                     std::back_inserter (cycle));
+
+    // Go over the polygon holes and compute the convolution cycle for each
+    // hole. Note that in this case we traverse the holes in clockwise
+    // orientation.
+    typename Polygon_with_holes_2::Hole_const_iterator  hoit;
+
+    for (hoit = pwh.holes_begin(); hoit != pwh.holes_end(); ++hoit)
+    {
+      cycle_id++;
+      _offset_polygon (*hoit,
+                       CGAL::CLOCKWISE,
+                       r,
+                       cycle_id,
+                       std::back_inserter (cycle));
+    }
+
+    // Compute the union of the cycles that represent the offset polygon.
+    Union_2     unite;
+
+    off_holes = unite (cycle.begin(), cycle.end(),
+                       off_bound, off_holes);
+
+    return (off_holes);
+  }
+
+  /*!
+   * Compute the inset of a simple polygon by a given radius.
+   * Note that as the input polygon may not be convex, its offset may not be
+   * simply connected. The result is therefore represented as a sequence of
+   * polygons (which may also be empty).
+   * \param pgn The polygon.
+   * \param r The inset radius.
+   * \param oi Output: An output iterator for the inset polygons.
+   * \pre The polygon is simple.
+   * \return A past-the-end iterator for the polygons container.
+   */
+  template <class OutputIterator>
+  OutputIterator inset (const Polygon_2& pgn,
+                        const NT& r,
+                        OutputIterator oi) const
+  {
+    CGAL_precondition (pgn.is_simple());
+
+    // Compute the curves that form the single convolution cycle for the
+    // given polygon. Note that we traverse the polygon in clockwise direction,
+    // as we treat it as a hole in the unbounded plane.
+    Curves_list                     cycle;
+
+    _offset_polygon (pgn,
+                     CGAL::CLOCKWISE,
+                     r,
+                     1,                       // The ID of the single cycle.
+                     std::back_inserter (cycle));
+
+    // Compute the union of the cycles that represent the offset polygon.
+    Union_2             unite;
+
+    oi = unite.inverse (cycle.begin(), cycle.end(),
+                        oi);
+
+    return (oi);
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h
new file mode 100644
index 0000000..fd6ee34
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h
@@ -0,0 +1,124 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_OFFSET_DECOMP_H
+#define CGAL_OFFSET_DECOMP_H
+
+#include <CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h>
+#include <list>
+
+namespace CGAL {
+
+/*! \class
+ * A class for computing the offset of a given polygon by a given radius,
+ * by decomposing the polygon into convex sub-polygons and computing the union
+ * off their offsets.
+ */
+template <class Base_, class DecompStrategy_>
+class Offset_by_decomposition_2 : private Base_
+{
+private:
+
+  typedef Base_                                        Base;
+
+  using Base::_offset_polygon;
+
+public:
+
+  typedef typename Base::Basic_kernel                  Kernel;
+  typedef typename Base::Basic_NT                      NT;
+  typedef typename Base::Polygon_2                     Polygon_2;
+  typedef typename Base::Offset_polygon_2              Offset_polygon_2;
+  typedef DecompStrategy_                              Decomposition_strategy;
+
+private:
+
+  typedef std::list<Polygon_2>                         Polygons_list;
+  typedef typename Polygons_list::iterator             Polygons_iterator;
+
+  typedef typename Base::Labeled_traits_2              Labeled_traits_2;
+  typedef typename Base::Labeled_curve_2               Labeled_curve_2;
+  typedef std::list<Labeled_curve_2>                   Curves_list;
+
+  typedef Union_of_curve_cycles_2<Labeled_traits_2,
+                                  Offset_polygon_2>    Union_2;
+
+public:
+
+  /*! Constructor. */
+  Offset_by_decomposition_2 (const Base_& base) :
+    Base (base)
+  {}
+
+  /*!
+   * Compute the offset of a simple polygon by a given radius.
+   * Note that as the input polygon may not be convex, its offset may not be
+   * simply connected. The result is therefore represented as the outer
+   * boundary of the Minkowski sum (which is always a simple offset polygon)
+   * and a container of offset polygons, representing the holes in this "outer"
+   * polygon.
+   * \param traits Arrangement traits that can deal with line segments and
+   *               circular arcs.
+   * \param pgn The polygon.
+   * \param r The offset radius.
+   * \param off_bound Output: The outer boundary of the offset polygon.
+   * \param off_holes Output: An output iterator for the holes in the offset.
+   * \pre The polygon is simple.
+   * \return A past-the-end iterator for the holes container.
+   */
+  template <class OutputIterator>
+  OutputIterator operator() (const Polygon_2& pgn,
+                             const NT& r,
+                             Offset_polygon_2& off_bound,
+                             OutputIterator off_holes) const
+  {
+    CGAL_precondition (pgn.is_simple());
+
+    // Decompose the input polygon into convex sub-polygons.
+    Decomposition_strategy  decomp_strat;
+    Polygons_list           sub_pgns;
+    Polygons_iterator       iter;
+
+    decomp_strat (pgn, std::back_inserter(sub_pgns));
+
+    // Compute the offset of each polygon separately.
+    Curves_list                     boundary_curves;
+    unsigned int                    pgn_id = 1;
+
+    for (iter = sub_pgns.begin(); iter != sub_pgns.end(); ++iter)
+    {
+      _offset_polygon (*iter,
+                       CGAL::COUNTERCLOCKWISE,
+                       r,
+                       pgn_id,
+                       std::back_inserter(boundary_curves));
+      pgn_id++;
+    }
+
+    // Compute the union of the cycles that represent the offset polygon.
+    Union_2     unite;
+
+    off_holes = unite (boundary_curves.begin(), boundary_curves.end(),
+                       off_bound, off_holes);
+
+    return (off_holes);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h
new file mode 100644
index 0000000..fb7366f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h
@@ -0,0 +1,128 @@
+// Copyright (c) 2006 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein           <wein_r at yahoo.com>
+
+#ifndef CGAL_DECOMPOSITION_STRATEGY_ADAPTER_H
+#define CGAL_DECOMPOSITION_STRATEGY_ADAPTER_H
+
+#include <CGAL/partition_2.h>
+
+namespace CGAL {
+
+struct Tag_optimal_convex_parition
+{
+  bool    dummy;
+};
+
+struct Tag_approx_convex_parition
+{
+  bool    dummy;
+};
+
+struct Tag_Greene_convex_parition
+{
+  bool    dummy;
+};
+
+/*!
+ * \class
+ * An adapter of the global planar polygonal partitioning functions
+ * to a decomposition strategy-class.
+ */
+template <class Kernel_, class Container_, class StrategyTag_>
+class Decomposition_strategy_adapter
+{
+public:
+
+  typedef Kernel_                                  Kernel;
+  typedef Polygon_2<Kernel, Container_>            Polygon_2;
+  typedef StrategyTag_                             Strategy_tag;
+
+  /*! Default constructor. */
+  Decomposition_strategy_adapter ()
+  {}
+
+  /*!
+   * Decompose a simple polygon to convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <class OutputIterator>
+  OutputIterator decompose (const Polygon_2& pgn,
+                            OutputIterator oi) const
+  {
+    // Make a local copy of the polygon, and if it is not counterclockwise
+    // oriented, reverse the order of its vertices.
+    Polygon_2        my_pgn = pgn;
+
+    if (my_pgn.orientation() == CLOCKWISE)
+      my_pgn.reverse_orientation();
+
+    // Perform the decomposition.
+    return (_decompose (pgn, Strategy_tag(), oi));
+  }
+
+private:
+
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using the optimal
+   * convex-partition method.
+   */
+  template <class OutputIterator>
+  OutputIterator _decompose (const Polygon_2& pgn,
+                             Tag_optimal_convex_parition ,
+                             OutputIterator oi) const
+  {
+    return (optimal_convex_partition_2 (pgn.vertices_begin(),
+                                        pgn.vertices_end(),
+                                        oi,
+                                        Kernel()));
+  }
+
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using the
+   * approximated convex-partition method.
+   */
+  template <class OutputIterator>
+  OutputIterator _decompose (const Polygon_2& pgn,
+                             Tag_approx_convex_parition ,
+                             OutputIterator oi) const
+  {
+    return (approx_convex_partition_2 (pgn.vertices_begin(),
+                                       pgn.vertices_end(),
+                                       oi,
+                                       Kernel()));
+  }
+
+  /*!
+   * Decompose the given counter clockwise-oriented polygon using Greene's
+   * approximated convex-partition method.
+   */
+  template <class OutputIterator>
+  OutputIterator _decompose (const Polygon_2& pgn,
+                             Tag_Greene_convex_parition ,
+                             OutputIterator oi) const
+  {
+    return (greene_approx_convex_partition_2 (pgn.vertices_begin(),
+                                              pgn.vertices_end(),
+                                              oi,
+                                              Kernel()));
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h
new file mode 100644
index 0000000..4c0d038
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h
@@ -0,0 +1,251 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_UNION_OF_CURVE_CYCLES_2_H
+#define CGAL_UNION_OF_CURVE_CYCLES_2_H
+
+#include <CGAL/Minkowski_sum_2/Union_of_cycles_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * An auxiliary class for computing the union of the interiors of curve
+ * cycles (convolution cycles).
+ */
+template <class Traits_, class GeneralPolygon_>
+class Union_of_curve_cycles_2 : private Union_of_cycles_2<Traits_>
+{
+public:
+
+  typedef Traits_                                 Traits_2;
+  typedef GeneralPolygon_                         General_polygon_2;
+
+private:
+
+  // Base-class types:
+  typedef Union_of_cycles_2<Traits_2>             Base;
+  typedef typename Base::Point_2                  Point_2;
+  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
+
+  typedef typename Base::Arrangement_2            Arrangement_2;
+  typedef typename Base::Vertex_handle            Vertex_handle;
+  typedef typename Base::Halfedge_handle          Halfedge_handle;
+  typedef typename Base::Face_handle              Face_handle;
+  typedef typename Base::Vertex_iterator          Vertex_iterator;
+  typedef typename Base::Edge_iterator            Edge_iterator;
+  typedef typename Base::Halfedge_iterator        Halfedge_iterator;
+  typedef typename Base::Face_iterator            Face_iterator;
+  typedef typename Base::Inner_ccb_iterator       Inner_ccb_iterator;
+  typedef typename Base::Halfedge_around_vertex_circulator
+                                             Halfedge_around_vertex_circulator;
+  typedef typename Base::Ccb_halfedge_circulator  Ccb_halfedge_circulator;
+
+public:
+
+  /*! \class
+   * A circulator adapter that iterates over all curves in a CCB.
+   */
+  class Ccb_curve_iterator
+  {
+  public:
+
+    typedef Ccb_curve_iterator                      Self;
+    typedef typename Union_of_cycles_2<Traits_>::Ccb_halfedge_circulator
+                                                    Ccb_halfedge_circulator;
+    typedef typename Union_of_cycles_2<Traits_>::X_monotone_curve_2
+                                                    value_type;
+    typedef std::forward_iterator_tag               iterator_category;
+    typedef const value_type&                       reference;
+    typedef const value_type*                       pointer;
+    typedef int                                     difference_type;
+
+  private:
+
+    Ccb_halfedge_circulator    _first;    // The first halfedge.
+    Ccb_halfedge_circulator    _circ;     // The current circulator.
+    bool                       _done;     // Indicates whether we completed
+                                          // a full traversal of the CCB.
+
+  public:
+
+    /*! Default constructor. */
+    Ccb_curve_iterator () :
+      _done (true)
+    {}
+
+    /*!
+     * Constructor from a circulator.
+     * \param circ A circulator for the first halfedge in the CCB.
+     * \param done (true) in order to create a past-the-end iterator.
+     */
+    Ccb_curve_iterator (Ccb_halfedge_circulator circ,
+                        bool done = false) :
+      _first (circ),
+      _circ (circ),
+      _done (done)
+    {}
+
+    /*! Dereference operators. */
+    reference operator* () const
+    {
+      return (_circ->curve());
+    }
+
+    pointer operator-> () const
+    {
+      return (&(_circ->curve()));
+    }
+
+    /*! Equality operators.*/
+    bool operator== (const Self& it) const
+    {
+      return (_done == it._done && _circ == it._circ);
+    }
+
+    bool operator!= (const Self& it) const
+    {
+      return (_done != it._done || _circ != it._circ);
+    }
+
+    /*! Increment operators. */
+    Self& operator++ ()
+    {
+      if (! _done)
+      {
+        --_circ;
+
+        if (_circ == _first)
+          _done = true;
+      }
+
+      return (*this);
+    }
+
+    Self operator++ (int )
+    {
+      Self   temp = *this;
+
+      if (! _done)
+      {
+        --_circ;
+
+        if (_circ == _first)
+          _done = true;
+      }
+
+      return (temp);
+    }
+
+  };
+
+  /*! Default constructor. */
+  Union_of_curve_cycles_2 () :
+    Base()
+  {}
+
+  /*!
+   * Compute the union of the interiors of the curve cycles.
+   * \param begin An iterator for the first curve in the range.
+   * \param end A past-the-end iterator for the curve range.
+   * \param out_bound Output: A generalized polygon representing the outer
+   *                          boundary of the union.
+   * \param holes Output: An output iterator of the holes in the union.
+   * \return A past-the-end iterator for the holes.
+   */
+  template <class InputIterator, class OutputIterator>
+  OutputIterator operator() (InputIterator begin, InputIterator end,
+                             General_polygon_2& out_bound,
+                             OutputIterator holes) const
+  {
+    // Construct the arrangement of all segments.
+    Arrangement_2                    arr;
+
+    this->_construct_arrangement (begin, end, arr);
+
+    // Produce the result. First set the outer boundary of the union, given
+    // as the inner boundary of the single hole in the unbounded face.
+    Face_iterator                    fit;
+    const Face_handle                uf = arr.unbounded_face();
+    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
+    Ccb_halfedge_circulator          circ;
+
+    circ = *iccb_it;
+    out_bound = General_polygon_2 (Ccb_curve_iterator (circ),
+                                   Ccb_curve_iterator (circ, true));
+
+    // Locate the holes in the union: Go over all arrangement faces.
+    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+    {
+      CGAL_assertion (fit->data() != this->UNVISITED);
+
+      // If a bounded face has an inside count that equals 0, it forms a hole
+      // in the union.
+      if (! fit->is_unbounded() && fit->data() == 0)
+      {
+        circ = fit->outer_ccb();
+        *holes = General_polygon_2 (Ccb_curve_iterator (circ),
+                                    Ccb_curve_iterator (circ, true));
+        ++holes;
+      }
+    }
+
+    return (holes);
+  }
+
+
+  /*!
+   * Compute the inverse of the union of the interiors of the curve cycles,
+   * and return the result as a sequence of polygons.
+   * \param begin An iterator for the first curve in the range.
+   * \param end A past-the-end iterator for the curve range.
+   * \param oi Output: An output iterator of the polygons.
+   * \return A past-the-end iterator for the polygons.
+   */
+  template <class InputIterator, class OutputIterator>
+  OutputIterator inverse (InputIterator begin, InputIterator end,
+                          OutputIterator oi) const
+  {
+    // Construct the arrangement of all segments.
+    Arrangement_2                    arr;
+
+    this->_construct_arrangement (begin, end, arr);
+
+    // Go over all arrangement faces, and output each face whose data is
+    // negative.
+    Face_iterator                    fit;
+    Ccb_halfedge_circulator          circ;
+
+    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+    {
+      CGAL_assertion (fit->data() != this->UNVISITED);
+
+      if (fit->data() < 0)
+      {
+        circ = fit->outer_ccb();
+        *oi = General_polygon_2 (Ccb_curve_iterator (circ),
+                                 Ccb_curve_iterator (circ, true));
+        ++oi;
+      }
+    }
+
+    return (oi);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h
new file mode 100644
index 0000000..dc6ffdc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h
@@ -0,0 +1,223 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_UNION_OF_CYCLES_2_H
+#define CGAL_UNION_OF_CYCLES_2_H
+
+#include <CGAL/Arr_extended_dcel.h>
+#include <CGAL/Arrangement_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * An auxiliary base class for computing the union of the interiors of cycles
+ * of x-monotone curves.
+ */
+template <class Traits_>
+class Union_of_cycles_2
+{
+public:
+
+  typedef Traits_                                        Traits_2;
+
+protected:
+
+  // Traits types:
+  typedef typename Traits_2::Point_2                     Point_2;
+  typedef typename Traits_2::X_monotone_curve_2          X_monotone_curve_2;
+
+  // Arrangement-related types:
+  typedef Arr_face_extended_dcel<Traits_2, int>          Dcel;
+  typedef CGAL::Arrangement_2<Traits_2, Dcel>            Arrangement_2;
+  typedef typename Arrangement_2::Vertex_handle          Vertex_handle;
+  typedef typename Arrangement_2::Halfedge_handle        Halfedge_handle;
+  typedef typename Arrangement_2::Face_handle            Face_handle;
+  typedef typename Arrangement_2::Vertex_iterator        Vertex_iterator;
+  typedef typename Arrangement_2::Edge_iterator          Edge_iterator;
+  typedef typename Arrangement_2::Halfedge_iterator      Halfedge_iterator;
+  typedef typename Arrangement_2::Face_iterator          Face_iterator;
+  typedef typename Arrangement_2::Inner_ccb_iterator     Inner_ccb_iterator;
+  typedef typename Arrangement_2::Halfedge_around_vertex_circulator
+                                             Halfedge_around_vertex_circulator;
+  typedef typename Arrangement_2::Ccb_halfedge_circulator
+                                                       Ccb_halfedge_circulator;
+  // Data members:
+  int                    UNVISITED;    // A code marking unvisited faces.
+
+public:
+
+  /*! Default constructor. */
+  Union_of_cycles_2 () :
+    UNVISITED (-1000000)
+  {}
+
+protected:
+
+  /*!
+   * Construct the arrnagement representing the union of the curve cycles,
+   * such that every arrangement face is associated with its winding number
+   * with respect to the cycles.
+   * \param begin An iterator for the first curve in the range.
+   * \param end A past-the-end iterator for the curve range.
+   * \param arr Output: The arrangement of the curve cycles, where each face
+   *                    is associated with its winding number.
+   */
+  template <class InputIterator>
+  void _construct_arrangement (InputIterator begin, InputIterator end,
+                               Arrangement_2& arr) const
+  {
+    CGAL_precondition (arr.is_empty());
+
+    // Construct the arrangement of the curves.
+    CGAL::insert (arr, begin, end);
+
+    // Go over all faces and mark them as unvisited, by setting their inside
+    // count to UNVISITED.
+    Face_iterator                    fit;
+
+    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+      fit->set_data (UNVISITED);
+
+    // Mark the inside count of the unbounded face as 0, and start a
+    // breadth-first search from this face, going over the inner boundary of
+    // the single hole (inner CCB) in the unbounded face.
+    const Face_handle                uf = arr.unbounded_face();
+    Face_handle                      f_next;
+    int                              next_count;
+    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
+    Ccb_halfedge_circulator          first, circ;
+    Halfedge_handle                  he;
+    std::list<Face_handle>           queue;
+
+    uf->set_data (0);
+    circ = first = *iccb_it;
+    do
+    {
+      he = circ;
+      f_next = he->twin()->face();
+
+      if (f_next->data() == UNVISITED)
+      {
+        next_count = _boundary_count (he->twin());
+        f_next->set_data (next_count);
+        queue.push_back (f_next);
+      }
+      else
+      {
+        CGAL_assertion (f_next->data() == _boundary_count (he->twin()));
+      }
+
+      ++circ;
+
+    } while (circ != first);
+
+    ++iccb_it;
+
+    // Make sure that there is a single hole in the unbounded face.
+    CGAL_assertion (iccb_it == uf->inner_ccbs_end());
+
+    // The main breadth-first search loop.
+    Face_handle                      f_curr;
+    int                              curr_count;
+
+    while (! queue.empty())
+    {
+      f_curr = queue.front();
+      curr_count = f_curr->data();
+      queue.pop_front();
+
+      // Go over the outer boundary of the current face to visit its edjacent
+      // faces.
+      circ = first = f_curr->outer_ccb();
+      do
+      {
+        he = circ;
+        f_next = he->twin()->face();
+
+        if (f_next->data() == UNVISITED)
+        {
+          next_count = curr_count + _boundary_count (he->twin());
+          f_next->set_data (next_count);
+          queue.push_back (f_next);
+        }
+        else if (f_curr != f_next)
+        {
+          CGAL_assertion (f_next->data() ==
+                          curr_count + _boundary_count (he->twin()));
+        }
+        ++circ;
+
+      } while (circ != first);
+
+      // Go over the holes (inner CCBs) of the current face.
+      for (iccb_it = f_curr->inner_ccbs_begin();
+           iccb_it != f_curr->inner_ccbs_end();
+           ++iccb_it)
+      {
+        circ = first = *iccb_it;
+        do
+        {
+          he = circ;
+          f_next = he->twin()->face();
+
+          if (f_next->data() == UNVISITED)
+          {
+            next_count = curr_count + _boundary_count (he->twin());
+            f_next->set_data (next_count);
+            queue.push_back (f_next);
+          }
+          else if (f_curr != f_next)
+          {
+            CGAL_assertion (f_next->data() ==
+                            curr_count + _boundary_count (he->twin()));
+          }
+          ++circ;
+
+        } while (circ != first);
+      }
+    }
+
+    return;
+  }
+
+private:
+
+  /*!
+   * Compute the boundary count of the given halfedge, namely the number of
+   * curves going in the halfedges direction minus the number of associated
+   * curves going in the opposite direction.
+   */
+  int _boundary_count (Halfedge_handle he) const
+  {
+    if ((Arr_halfedge_direction) he->direction() == ARR_LEFT_TO_RIGHT)
+    {
+      // Halfedge is directed from left to right:
+      return (he->curve().label().right_count() -
+              he->curve().label().left_count());
+    }
+    else
+    {
+      // Halfedge is directed from right to left:
+      return (he->curve().label().left_count() -
+              he->curve().label().right_count());
+    }
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h
new file mode 100644
index 0000000..5efd8ba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h
@@ -0,0 +1,132 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_UNION_OF_SEGMENT_CYCLES_2_H
+#define CGAL_UNION_OF_SEGMENT_CYCLES_2_H
+
+#include <CGAL/Minkowski_sum_2/Union_of_cycles_2.h>
+
+namespace CGAL {
+
+/*! \class
+ * An auxiliary class for computing the union of the interiors of segment
+ * cycles (polygon boundaries or convolution cycles).
+ */
+template <class Traits_, class Polygon_>
+class Union_of_segment_cycles_2 : private Union_of_cycles_2<Traits_>
+{
+public:
+
+  typedef Traits_                                 Traits_2;
+  typedef Polygon_                                Polygon_2;
+
+private:
+
+  // Base-class types:
+  typedef Union_of_cycles_2<Traits_2>             Base;
+  typedef typename Base::Point_2                  Point_2;
+  typedef typename Base::X_monotone_curve_2       X_monotone_curve_2;
+
+  typedef typename Base::Arrangement_2            Arrangement_2;
+  typedef typename Base::Vertex_handle            Vertex_handle;
+  typedef typename Base::Halfedge_handle          Halfedge_handle;
+  typedef typename Base::Face_handle              Face_handle;
+  typedef typename Base::Vertex_iterator          Vertex_iterator;
+  typedef typename Base::Edge_iterator            Edge_iterator;
+  typedef typename Base::Halfedge_iterator        Halfedge_iterator;
+  typedef typename Base::Face_iterator            Face_iterator;
+  typedef typename Base::Inner_ccb_iterator       Inner_ccb_iterator;
+  typedef typename Base::Halfedge_around_vertex_circulator
+                                             Halfedge_around_vertex_circulator;
+  typedef typename Base::Ccb_halfedge_circulator  Ccb_halfedge_circulator;
+
+public:
+
+  /*! Default constructor. */
+  Union_of_segment_cycles_2 () :
+    Base()
+  {}
+
+  /*!
+   * Compute the union of the interiors of the segment cycles.
+   * \param begin An iterator for the first segment in the range.
+   * \param end A past-the-end iterator for the segment range.
+   * \param out_bound Output: A polygon representing the union boundary.
+   * \param holes Output: An output iterator of the holes in the union.
+   * \return A past-the-end iterator for the holes.
+   */
+  template <class InputIterator, class OutputIterator>
+  OutputIterator operator() (InputIterator begin, InputIterator end,
+                             Polygon_2& out_bound,
+                             OutputIterator holes) const
+  {
+    // Construct the arrangement of all segments.
+    Arrangement_2                    arr;
+
+    this->_construct_arrangement (begin, end, arr);
+
+    // Produce the result. First set the outer boundary of the union, given
+    // as the inner boundary of the single hole in the unbounded face.
+    Face_iterator                    fit;
+    const Face_handle                uf = arr.unbounded_face();
+    Inner_ccb_iterator               iccb_it = uf->inner_ccbs_begin();
+    Ccb_halfedge_circulator          first, circ;
+    Halfedge_handle                  he;
+
+    out_bound.erase (out_bound.vertices_begin(), out_bound.vertices_end());
+
+    circ = first = *iccb_it;
+    do
+    {
+      out_bound.push_back (circ->source()->point());
+      --circ;
+
+    } while (circ != first);
+    ++iccb_it;
+
+    // Locate the holes in the union: Go over all arrangement faces.
+    for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
+    {
+      CGAL_assertion (fit->data() != this->UNVISITED);
+
+      // If a bounded face has an inside count that equals 0, it forms a hole
+      // in the union.
+      if (! fit->is_unbounded() && fit->data() == 0)
+      {
+        Polygon_2   pgn_hole;
+
+        circ = first = fit->outer_ccb();
+        do
+        {
+          pgn_hole.push_back (circ->source()->point());
+          --circ;
+
+        } while (circ != first);
+
+        // Insert it to the containers of holes in the Minkowski sum.
+        *holes = pgn_hole;
+        ++holes;
+      }
+    }
+
+    return (holes);
+  }
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/Gaussian_map.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/Gaussian_map.h
new file mode 100644
index 0000000..33d6ade
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/Gaussian_map.h
@@ -0,0 +1,1233 @@
+// Copyright (c) 2005-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$ 
+// 
+//
+// Author(s)     :  Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+#ifndef CGAL_MS3_GAUSSIAN_MAP
+#define CGAL_MS3_GAUSSIAN_MAP
+
+#include <CGAL/Nef_S2/SM_items.h>
+#include <CGAL/Nef_S2/Sphere_map.h>
+#include <CGAL/Nef_S2/Sphere_geometry.h>
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_S2/SM_io_parser.h>
+#include <CGAL/Nef_polyhedron_S2.h>
+#include <CGAL/Minkowski_sum_3/PointMark.h>
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 223
+#include <CGAL/Nef_2/debug.h>
+
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+
+template <class K, class Nef, class Mark_ = PointMark<K> >
+class Gaussian_map :
+  public CGAL::SM_decorator<CGAL::Sphere_map<CGAL::Sphere_geometry<K>, 
+					     CGAL::SM_items, Mark_> > {
+
+  typedef K                                               Kernel;
+  typedef CGAL::Sphere_geometry<K>                        Sphere_kernel;
+  typedef typename Kernel::Point_3                        Point_3;
+  typedef typename Kernel::Vector_3                       Vector_3;
+  typedef Mark_                                           Mark;
+  typedef CGAL::Sphere_map<Sphere_kernel, 
+                           CGAL::SM_items, Mark>          Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>                  SM_decorator;
+  typedef SM_decorator                                    Base;
+  typedef CGAL::SM_overlayer<SM_decorator>                SM_overlayer;
+  typedef typename Sphere_kernel::Sphere_circle           Sphere_circle;
+ public:
+  typedef typename Sphere_map::SVertex_handle             SVertex_handle;
+  typedef typename Sphere_map::SHalfedge_handle           SHalfedge_handle;
+  typedef typename Sphere_map::SHalfloop_handle           SHalfloop_handle;
+  typedef typename Sphere_map::SFace_handle               SFace_handle;
+  typedef typename Sphere_map::SFace_iterator             SFace_iterator;
+  typedef typename Sphere_map::SHalfedge_iterator         SHalfedge_iterator;
+  typedef typename Sphere_map::SVertex_iterator           SVertex_iterator;
+  typedef typename Sphere_map::SVertex_const_iterator     SVertex_const_iterator;
+  typedef typename Sphere_map::SVertex_const_handle       SVertex_const_handle;
+  typedef typename Sphere_map::SFace_cycle_iterator       SFace_cycle_iterator;
+  typedef typename Sphere_map::SHalfedge_around_svertex_circulator
+    SHalfedge_around_svertex_circulator;
+  typedef typename Sphere_map::SHalfedge_around_sface_circulator
+    SHalfedge_around_sface_circulator;
+  typedef typename Sphere_map::SHalfedge_around_sface_const_circulator
+    SHalfedge_around_sface_const_circulator;
+
+  typedef typename Sphere_map::Object_handle              Object_handle;
+
+  using Base::clear_face_cycle_entries;
+  using Base::is_closed_at_source;
+  using Base::delete_edge_pair;
+  using Base::delete_vertex_only;
+  using Base::delete_face_only;
+  using Base::set_face;
+  using Base::store_sm_boundary_object;
+  using Base::is_isolated;
+  using Base::has_outdeg_two;
+  using Base::first_out_edge;
+  using Base::merge_edge_pairs_at_target;
+  
+  template<typename Nef_polyhedron_3>
+  class SVertex_creator2 {
+
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
+
+    SM_decorator SM;
+    Facet2SVertex_hash& Facet2SVertex;
+
+  public:
+    SVertex_creator2(Sphere_map* smap, Facet2SVertex_hash& F2SV)
+      : SM(smap), Facet2SVertex(F2SV) {}
+
+    void visit(Vertex_const_handle) {}
+    void visit(Halfedge_const_handle) {}
+    void visit(SHalfedge_const_handle) {}
+    void visit(SHalfloop_const_handle) {}
+    void visit(SFace_const_handle) {}
+    void visit(Halffacet_const_handle f) {
+
+      CGAL_NEF_TRACEN( "SVertex_creator2 " << f->twin()->plane() );
+      SVertex_handle sv
+	(SM.new_svertex(normalized(f->twin()->plane().orthogonal_vector())));
+      sv->mark() = Mark(Point_3(0,0,0), f->mark());
+      Facet2SVertex[f] = sv;
+    }
+
+  };
+
+  template<typename Nef_polyhedron_3>
+  class SVertex_creator {     
+
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+
+    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
+      Halffacet_cycle_const_iterator;
+    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
+      SHalfedge_around_facet_const_circulator;
+
+    typedef typename Nef_polyhedron_3::Point_3                  Point_3;
+    typedef typename Nef_polyhedron_3::Sphere_point             Sphere_point;
+
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, bool> Facet2bool_hash;
+    typedef CGAL::Unique_hash_map<Vertex_const_handle, bool> Vertex2bool_hash;
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, bool> Edge2bool_hash;
+    typedef CGAL::Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge_hash;
+    typedef CGAL::Unique_hash_map<SFace_const_handle, bool> SFace2bool_hash;
+
+    SM_decorator SM;
+    Facet2SVertex_hash& Facet2SVertex;
+    Facet2bool_hash& omit_facet;
+    SEdge2SEdge_hash& next;
+    Vertex2bool_hash& omit_vertex;
+    Edge2bool_hash& omit_edge;
+    SFace2bool_hash& Shell;
+
+  public:
+    SVertex_creator(Sphere_map* smap, Facet2SVertex_hash& F2SV, Facet2bool_hash& F2b, SEdge2SEdge_hash& SE2SE, Vertex2bool_hash& V2b, Edge2bool_hash& E2b, SFace2bool_hash& SHELL)
+      : SM(smap), Facet2SVertex(F2SV), omit_facet(F2b), next(SE2SE), omit_vertex(V2b), omit_edge(E2b), Shell(SHELL) {}
+
+  private:
+    bool svertex_exists(Sphere_point sp, SVertex_handle& sv) {
+      SVertex_iterator svi;
+      sp = normalized(sp);
+      CGAL_forall_svertices(svi, SM) {
+	if(svi->point() == sp) {
+	  sv = svi;
+	  return true;
+	}
+      }
+      return false;
+    }
+
+  public:
+      void visit(Vertex_const_handle v) { CGAL_USE(v); CGAL_NEF_TRACEN( "Vertices " << v->point() );}
+      void visit(Halfedge_const_handle ) {}
+      void visit(SHalfedge_const_handle ) {}
+      void visit(SHalfloop_const_handle ) {}
+      void visit(SFace_const_handle sf) {
+	
+	typename Nef_polyhedron_3::SHalfedge_const_handle sec = sf->sface_cycles_begin();
+	
+	int circles = 1;
+	Sphere_circle first, current;
+	first = current = sec->circle();
+	CGAL_NEF_TRACEN( "first+current:" << first << "+" << current );
+	typename Nef_polyhedron_3::SHalfedge_around_sface_const_circulator sfc(sec), send(sfc);
+	CGAL_For_all(sfc, send) {
+	  CGAL_NEF_TRACEN( "sedge->cirlce() " << sfc->circle() );
+	  if(sfc->circle() != current) {
+	    if(sfc->circle() != first)
+	      ++circles;
+	    current = sfc->circle();
+	  }
+	}
+	
+	CGAL_NEF_TRACEN( "first+current:" << first << "+" << current );
+	CGAL_NEF_TRACEN( "circles " << circles );
+
+	if(circles < 3)
+	  omit_vertex[sf->center_vertex()] = true;
+      }
+  
+      void visit(Halffacet_const_handle f) {
+
+	CGAL_NEF_TRACEN( "SVertex_creator " << f->twin()->plane() );
+
+	Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
+	SHalfedge_const_handle se(fc);
+	SHalfedge_around_facet_const_circulator hc(se), hend(hc);
+
+	bool verge_found(false);
+	CGAL_For_all(hc,hend) {
+	  Point_3 p(hc->source()->source()->point());
+	  CGAL_NEF_TRACEN(" hc " << CGAL::to_double(p.hx()) << 
+			  " " << CGAL::to_double(p.hy()) <<
+			  " " << CGAL::to_double(p.hz()));
+	  CGAL_NEF_TRACEN(" hc->snext()->circle() " << normalized(hc->snext()->circle()));
+	  if(normalized(hc->snext()->circle()) == normalized(hc->circle())) {
+	    next[hc] = hc->snext();
+	    CGAL_NEF_TRACEN( "set next " << hc->source()->source()->point() << ":"
+		      << hc->source()->point() << "->" << hc->twin()->source()->point() << " | " 
+		      << hc->snext()->source()->point() << "->" << hc->snext()->twin()->source()->point() );
+ 	    omit_edge[hc->twin()->source()] = omit_edge[hc->twin()->source()->twin()] = true;
+	  } else
+	    verge_found = true;
+	}
+
+	if(!verge_found) {
+	  omit_facet[f] = true;
+	  return;
+	}
+
+	SVertex_handle sv;
+	if(!svertex_exists(f->twin()->plane().orthogonal_vector(), sv)) {
+	  sv = SM.new_svertex(f->twin()->plane().orthogonal_vector());
+	  sv->point() = normalized(sv->point());
+	  sv->mark() = Mark(Point_3(0,0,0), f->mark());
+	} else {
+	  omit_facet[f] = true;
+	  if(sv->mark().boolean() && !f->mark())
+	    sv->mark().set_boolean(false);
+          CGAL_NEF_TRACEN("omit facet " << f->plane());
+	}
+	Facet2SVertex[f] = sv;
+      }
+  };
+
+  template<typename Nef_polyhedron_3>
+    class SEdge_creator2 {
+
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+
+    typedef typename SM_decorator::SHalfedge_around_svertex_circulator
+      SHalfedge_around_svertex_circulator;
+
+    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
+      Halffacet_cycle_const_iterator;
+    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
+      SHalfedge_around_facet_const_circulator;
+
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
+
+    SM_decorator SM;
+    Edge2SEdge_hash& Edge2SEdge;
+    Facet2SVertex_hash& Facet2SVertex;
+
+  public:
+    SEdge_creator2(Sphere_map* smap, Edge2SEdge_hash& E2SE, Facet2SVertex_hash& F2SV)
+      : SM(smap), Edge2SEdge(E2SE), Facet2SVertex(F2SV) {}
+      
+  public:
+    void visit(Vertex_const_handle) {}
+    void visit(Halfedge_const_handle) {}
+    void visit(SHalfedge_const_handle) {}
+    void visit(SHalfloop_const_handle) {}
+    void visit(SFace_const_handle) {}
+    
+    void visit(Halffacet_const_handle f) {
+      
+      CGAL_NEF_TRACEN( "SEdge_creator2 " << f->twin()->plane() );
+      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
+      SHalfedge_const_handle sef(fc);
+      SHalfedge_around_facet_const_circulator hc(sef), hend(hc);
+      
+      CGAL_For_all(hc, hend) {
+	if(hc->sprev()->facet()->plane() == 
+	   hc->facet()->plane())
+	  continue;
+	SHalfedge_handle thetwin;
+	Halfedge_const_handle e(hc->source()->twin());
+	SHalfedge_handle set = Edge2SEdge[e];
+	if(set == SHalfedge_handle()) {
+	  thetwin = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
+	  CGAL_NEF_TRACEN("add stub " << Facet2SVertex[f]->point()
+			  << "->" << hc->twin()->snext()->facet()->plane().orthogonal_vector());
+	} else {	
+	  SM.link_as_target_and_append(Facet2SVertex[f], set);
+	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
+	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
+	  set->twin()->circle() = set->circle().opposite();
+	  thetwin = set->twin();
+	  CGAL_NEF_TRACEN("complete edge " << set->source()->point()
+			  << "->" << set->twin()->source()->point());
+	}
+	Edge2SEdge[hc->source()] = thetwin;
+      }
+    }
+  };
+
+  template<typename Nef_polyhedron_3>
+    class SEdge_creator {
+
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+
+    typedef typename SM_decorator::SHalfedge_around_svertex_circulator
+      SHalfedge_around_svertex_circulator;
+
+    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator   
+      Halffacet_cycle_const_iterator;
+    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
+      SHalfedge_around_facet_const_circulator;
+
+    typedef typename Nef_polyhedron_3::Sphere_point Sphere_point;
+
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex_hash;
+    typedef CGAL::Unique_hash_map<Halffacet_const_handle, bool> Facet2bool_hash;
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, bool> Edge2bool_hash;
+    typedef CGAL::Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge_hash;
+
+    SM_decorator SM;
+    Edge2SEdge_hash& Edge2SEdge;
+    Facet2SVertex_hash& Facet2SVertex;
+    SEdge2SEdge_hash& next;
+    Facet2bool_hash& omit_facet;
+    Edge2bool_hash& omit_edge;
+
+  public:
+    SEdge_creator(Sphere_map* smap, Edge2SEdge_hash& E2SE, Facet2SVertex_hash& F2SV, SEdge2SEdge_hash& SE2SE, Facet2bool_hash&  F2b, Edge2bool_hash& E2b)
+      : SM(smap), Edge2SEdge(E2SE), Facet2SVertex(F2SV), next(SE2SE), omit_facet(F2b), omit_edge(E2b) {}
+      
+  public:
+    void visit(Vertex_const_handle ) {}
+    void visit(Halfedge_const_handle ) {}
+    void visit(SHalfedge_const_handle ) {}
+    void visit(SHalfloop_const_handle ) {}
+    void visit(SFace_const_handle ) {}
+    
+    void visit(Halffacet_const_handle f) {
+
+      if(omit_facet[f]) {
+	CGAL_NEF_TRACEN( "omit facet " << 
+			 normalized(Sphere_point(f->twin()->plane().orthogonal_vector())));
+	return;
+      }
+
+      CGAL_NEF_TRACEN( "SEdge_creator " << 
+		       normalized(Sphere_point(f->twin()->plane().orthogonal_vector())));
+      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
+      SHalfedge_const_handle se(fc);
+      SHalfedge_around_facet_const_circulator hc(se), hend(hc);
+      
+      
+      while(hc->snext()->circle() == hc->circle()) ++hc;
+      CGAL_NEF_TRACEN("verge " << hc->circle() << 
+		      " " << hc->snext()->circle());
+      // Found first edge such that next is not defined
+      Halfedge_const_handle last = hc->twin()->source();      
+      do {
+	++hc;
+	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
+      } while(normalized(hc->twin()->source()->point()) == 
+	      normalized(last->point()));
+      last = hc->twin()->source();
+      // now last has a good value
+      Halfedge_const_handle etwin;
+      do {
+	++hc;
+	etwin = hc->source();
+	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
+      } while(normalized(hc->twin()->source()->point()) == 
+	      normalized(last->point()));      
+      // hc is now one interesting corner further than last
+      hend = hc;
+      
+
+      SHalfedge_handle thetwin;
+      do {
+	Halfedge_const_handle e = hc->twin()->source();
+	CGAL_NEF_TRACEN(" check next " << &*next[hc]);
+	CGAL_NEF_TRACEN(" check plane " << hc->facet()->plane());
+	if(normalized(e->point()) != normalized(last->point())) {
+	  Edge2SEdge[etwin] = thetwin;
+	  SHalfedge_handle set = Edge2SEdge[e];
+	  if(set == SHalfedge_handle()) {
+	    thetwin = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
+            CGAL_NEF_TRACEN("add stub " << Facet2SVertex[f]->point()
+                            << "->" << 
+			    normalized(Sphere_point(hc->snext()->facet()->plane().orthogonal_vector())));
+	  } else {	
+	    SM.link_as_target_and_append(Facet2SVertex[f], set);
+	    set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
+	    set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
+	    set->twin()->circle() = set->circle().opposite();
+	    thetwin = set->twin();
+            CGAL_NEF_TRACEN("complete edge " << set->source()->point()
+                            << "->" << set->twin()->source()->point());
+	  } 
+	  last = hc->twin()->source();
+	} else { CGAL_NEF_TRACEN( "omit " ); }
+
+	++hc;
+	etwin = hc->source();
+	while(next[hc]!=SHalfedge_const_handle()) hc = next[hc];
+      } while(hc!=hend);
+      Edge2SEdge[etwin] = thetwin;
+
+
+      /*
+      do {
+	if(!omit_edge[hc->source()]) {
+	  CGAL_NEF_TRACEN( "edge " << hc->source()->source()->point() 
+		    << ":" << hc->source()->point() );
+
+	  Halfedge_const_handle e = hc->source();
+	  SHalfedge_handle set = Edge2SEdge[e->twin()];
+	  if(set == SHalfedge_handle())
+	    Edge2SEdge[e] = SM.new_shalfedge_pair_at_source(Facet2SVertex[f],1);
+	  else {
+	    SM.link_as_target_and_append(Facet2SVertex[f], set);
+	    set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0));
+	    set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
+	    set->twin()->circle() = set->circle().opposite();
+	    Edge2SEdge[e] = set->twin();
+	  }
+	} else {
+	  CGAL_NEF_TRACEN( "omit edge " << hc->source()->source()->point() 
+		    << ":" << hc->source()->point() );
+	}
+	++hc;
+      } while(hc != hend);
+      */
+
+    }
+  };
+  
+  template<typename Nef_polyhedron_3>
+    class SFace_creator2 {     
+  
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+    
+    typedef typename Nef_polyhedron_3::SFace_cycle_const_iterator SFace_cycle_const_iterator;
+
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
+
+    SM_decorator SM;
+    Edge2SEdge_hash& Edge2SEdge;
+
+  public:
+    SFace_creator2(Sphere_map* smap, Edge2SEdge_hash& E2SE) : 
+      SM(smap), Edge2SEdge(E2SE) {}
+
+      void visit(Halfedge_const_handle ) {}
+      void visit(SHalfedge_const_handle ) {}
+      void visit(SHalfloop_const_handle ) {}
+      void visit(Halffacet_const_handle ) {}
+      void visit(Vertex_const_handle ) {}
+
+      void visit(SFace_const_handle sf) {
+	CGAL_NEF_TRACEN( "SFace_creator2 " << sf->center_vertex()->point() );
+
+	SFace_cycle_const_iterator sfc(sf->sface_cycles_begin());
+	CGAL_assertion(sfc.is_shalfedge());
+   	SHalfedge_const_handle sef(sfc);
+	Halfedge_const_handle e(sef->source());
+	SHalfedge_around_sface_circulator 
+	  sec(Edge2SEdge[e]), send(sec);
+	CGAL_For_all(sec, send)
+	  if(sec->source()->point() == 
+	     sec->twin()->source()->point())
+	    return;
+	SFace_handle sf_new = SM.new_sface();
+	sf_new->mark() = Mark(sf->center_vertex()->point(),
+			      sf->center_vertex()->mark());
+	SM.link_as_face_cycle(sec,sf_new);
+      }
+  };
+
+  template<typename Nef_polyhedron_3>
+    class SFace_creator {     
+  
+    typedef typename Nef_polyhedron_3::Vertex_const_handle      Vertex_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle   Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle    Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle   SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfloop_const_handle   SHalfloop_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle       SFace_const_handle;
+
+    typedef CGAL::Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge_hash;
+    typedef CGAL::Unique_hash_map<Vertex_const_handle, bool> Vertex2bool_hash;
+    typedef CGAL::Unique_hash_map<SFace_const_handle, bool> SFace2bool_hash;
+
+    const Nef_polyhedron_3& N3;
+    SM_decorator SM;
+    Edge2SEdge_hash& Edge2SEdge;
+    Vertex2bool_hash& omit_vertex;
+    /* SFace2bool_hash& Shell; */
+
+  public:
+    SFace_creator(const Nef_polyhedron_3& N, Sphere_map* smap, Edge2SEdge_hash& E2SE, Vertex2bool_hash& V2b /*, SFace2bool_hash& SHELL*/) : 
+      N3(N), SM(smap), Edge2SEdge(E2SE), omit_vertex(V2b)/* , Shell(SHELL)*/ {}
+
+      void visit(Halfedge_const_handle ) {}
+      void visit(SHalfedge_const_handle ) {}
+      void visit(SHalfloop_const_handle ) {}
+      void visit(SFace_const_handle ) {}
+      void visit(Halffacet_const_handle ) {}
+
+      void visit(Vertex_const_handle v) {
+
+	CGAL_NEF_TRACEN( "SFace_creator " << v->point() );
+
+	if(omit_vertex[v]) {
+	  CGAL_NEF_TRACEN("omit " << v->point() );
+	  return;
+	}
+
+        typename Nef_polyhedron_3::Nef_polyhedron_S2 SD(N3.get_sphere_map(v));
+   
+        /*
+	typename Nef_polyhedron_3::SFace_const_iterator sf = SD.sfaces_begin();
+	while(sf != SD.sfaces_end() && !Shell[sf]) ++sf;
+        CGAL_assertion(sf != SD.sfaces_end());
+        */
+
+	typename Nef_polyhedron_3::Halfedge_const_iterator ei(SD.svertices_begin());
+	SHalfedge_handle se = Edge2SEdge[ei];
+	while(se == SHalfedge_handle()) {
+	  ++ei;
+	  se = Edge2SEdge[ei];
+	}
+
+	CGAL_assertion(ei != SD.svertices_end());
+
+	SFace_handle sf_new = SM.new_sface();
+	sf_new->mark() = Mark(v->point(), v->mark());
+	SM.link_as_face_cycle(se,sf_new);
+      }
+  };
+
+  struct VECTOR_ADDITION {
+    Mark operator()(const Mark& b1, const Mark& b2) const {
+      return b1+b2;
+    }
+  };
+
+  Object_handle top;
+  Object_handle bottom;
+
+  void locate_top_and_bottom() {
+    std::vector<SFace_iterator> topSF;
+    std::vector<SFace_iterator> bottomSF;
+    SFace_iterator sfi = this->sfaces_begin();
+    topSF.push_back(sfi);
+    bottomSF.push_back(sfi);
+
+    Comparison_result cr;
+    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
+      cr = compare_z(sfi->mark(), (*topSF.begin())->mark());
+      if(cr != CGAL::SMALLER) {
+	if(cr == CGAL::LARGER)
+	  topSF.clear();
+	topSF.push_back(sfi);	
+      }
+      cr = compare_z(sfi->mark(), (*bottomSF.begin())->mark());
+      if(cr != CGAL::LARGER) {
+	if(cr == CGAL::SMALLER)
+	  bottomSF.clear();
+	bottomSF.push_back(sfi);	
+      }    
+    }
+
+    SFace_handle sf(topSF.front());
+    if(topSF.size()==1)
+      top = Object_handle(SFace_const_handle(sf));
+    else {
+      SHalfedge_handle se(sf->sface_cycles_begin());
+      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
+      
+      if(topSF.size()==2) {
+	while(sfc->circle().c()!=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	top = Object_handle(SHalfedge_const_handle(sfc));
+      } else {
+	CGAL_assertion(topSF.size() > 0);
+	while(sfc->source()->point().hx()!=0 || 
+	      sfc->source()->point().hy()!=0 ||
+	      sfc->source()->point().hz()<=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	top = Object_handle(SVertex_const_handle(sfc->source()));      
+      }
+    }
+
+    sf = bottomSF.front();
+    if(bottomSF.size()==1)
+      bottom = Object_handle(SFace_const_handle(sf));
+    else {
+      SHalfedge_handle se(sf->sface_cycles_begin());
+      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
+      
+      if(bottomSF.size()==2) {
+	while(sfc->circle().c()!=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	bottom = Object_handle(SHalfedge_const_handle(sfc));
+      } else {
+	CGAL_assertion(bottomSF.size() > 0);
+	while(sfc->source()->point().hx()!=0 || 
+	      sfc->source()->point().hy()!=0 || 
+	      sfc->source()->point().hz()>=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	bottom = Object_handle(SVertex_const_handle(sfc->source()));      
+      }
+    }
+  }
+
+  void erase_redundant_vertices() {
+
+    std::cerr << "erase redundant vertices " << std::endl;
+
+    /*
+    SVertex_iterator svi;
+    CGAL_forall_svertices(svi, *this) {
+      bool erase(true);
+      SHalfedge_around_svertex_circulator 
+	svc(svi->out_sedge()), send(svc);
+      CGAL_For_all(svc, send) {
+	if(svc->incident_sface() != SFace_handle() ||
+	   svc->twin()->incident_sface() != SFace_handle()) {
+	  erase = false;
+	  break;
+	}
+      }
+      if(!erase) continue;
+      SHalfedge_handle se(svi->out_sedge());
+      while(se->twin()->snext() != se) {
+	SHalfedge_handle se_next(se->twin()->snext());
+	delete_edge_pair(se);
+	se = se_next;
+      }
+      delete_edge_pair(se);
+      delete_vertex_only(svi);
+    }
+    */
+
+    std::list<SHalfedge_handle> redundant;
+    SHalfedge_iterator sei;
+    CGAL_forall_sedges(sei, *this) {
+      if(sei->source()->point() ==
+	 sei->twin()->source()->point()) {
+	redundant.push_back(sei);
+      }
+    }
+
+    CGAL::Unique_hash_map<SHalfedge_handle, bool> erased(false);
+    typename std::list<SHalfedge_handle>::iterator ri;
+    for(ri = redundant.begin(); ri != redundant.end(); ++ri) {
+      if(erased[(*ri)]) continue;
+
+      SVertex_handle src((*ri)->source());
+      SVertex_handle tgt((*ri)->twin()->source());
+
+      std::cerr << "erase " << src->point() << std::endl;
+      std::cerr << &*src << " " << &*tgt << std::endl;
+
+      SHalfedge_handle prev((*ri)->sprev());
+      SHalfedge_handle next((*ri)->snext());
+
+      std::cerr << "prev " << &*prev->source()
+		<< "->" << &*prev->twin()->source() << std::endl;      
+      std::cerr << "next " << &*next->source()
+		<< "->" << &*next->twin()->source() << std::endl;
+ 
+      if(prev->source() ==
+	 next->twin()->source()) {
+	std::cerr << "delete before" << std::endl;
+	SHalfedge_handle sein;
+	SHalfedge_handle se_cas(next->twin()->snext());
+	SFace_handle sf(next->twin()->incident_sface());
+	if(sf != SFace_handle()) {
+	  std::cerr << "not null " << std::endl;
+	  SFace_cycle_iterator sfci(sf->sface_cycles_begin());
+	  CGAL_assertion(sfci.is_shalfedge());
+	  sein = sfci;
+	  undo_sm_boundary_object(sein, sf);
+	  sein = next->twin()->sprev();
+	  std::cerr << "sein " << sein->source()->point()
+		    << "->" << sein->twin()->source()->point()
+		    << std::endl;
+	}
+	erased[next] = erased[next->twin()] = true;
+	delete_edge_pair(next);
+	next = se_cas;
+	if(sf != SFace_handle()) {
+	  link_as_face_cycle(sein, sf);
+	}
+      }
+ 
+      prev->snext() = next;
+      next->sprev() = prev;
+
+      SHalfedge_handle tprev((*ri)->twin()->sprev());
+      SHalfedge_handle tnext((*ri)->twin()->snext());
+      if(tprev->source() ==
+	 tnext->twin()->source()) {
+	std::cerr << "delete twin" << std::endl;
+	SHalfedge_handle sein;
+	SHalfedge_handle se_cap(tprev->twin()->sprev());
+	SFace_handle sf(tprev->twin()->incident_sface());
+	if(sf != SFace_handle()) {
+	  SFace_cycle_iterator sfci(sf->sface_cycles_begin());
+	  CGAL_assertion(sfci.is_shalfedge());
+	  sein=sfci;
+	  undo_sm_boundary_object(sein, sf);
+	  sein = tprev->twin()->snext();
+	}
+	erased[tprev] = erased[tprev->twin()] = true;
+	delete_edge_pair(tprev);
+	tprev = se_cap;
+	if(sf != SFace_handle())
+	  link_as_face_cycle(sein, sf);
+      }
+      tprev->snext() = tnext;
+      tnext->sprev() = tprev;
+
+      std::cerr << "tprev " << &*tprev->source()
+		<< "->" << &*tprev->twin()->source() << std::endl;      
+      std::cerr << "tnext " << &*tnext->source()
+		<< "->" << &*tnext->twin()->source() << std::endl;
+
+      while(next != tnext) {
+      std::cerr << "next " << &*next->source()
+		<< "->" << &*next->twin()->source() << std::endl;
+	SHalfedge_handle se_cas(next->twin()->snext());
+	next->source() = src;
+	next = se_cas;
+      }
+      delete_edge_pair_only(*ri);
+      delete_vertex_only(tgt);
+    }
+  }
+
+ public:
+  Gaussian_map() : Base(new Sphere_map) {}
+
+  template<typename NK, typename Items> 
+  Gaussian_map(const CGAL::Nef_polyhedron_3<NK, Items>& N3,
+	      typename CGAL::Nef_polyhedron_3<NK, Items>::Volume_const_iterator c) : Base(new Sphere_map) {
+
+    typedef CGAL::Nef_polyhedron_3<NK, Items> Nef_polyhedron_3;
+
+    typedef typename Nef_polyhedron_3::Vertex_const_handle
+      Vertex_const_handle;   
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle
+      Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle
+      Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle
+      SHalfedge_const_handle;
+    typedef typename Nef_polyhedron_3::SFace_const_handle
+      SFace_const_handle;
+
+    Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex;
+    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
+    Unique_hash_map<Halffacet_const_handle, bool> Facet2bool;
+    Unique_hash_map<Vertex_const_handle, bool> Vertex2bool(false);
+    Unique_hash_map<Halfedge_const_handle, bool> Edge2bool(false);
+    Unique_hash_map<SHalfedge_const_handle, SHalfedge_const_handle> SEdge2SEdge;
+    Unique_hash_map<SFace_const_handle, bool> Shell(false);
+
+    SFace_const_handle sf = c->shells_begin();
+
+    SVertex_creator<Nef_polyhedron_3> create_svertices(this->sphere_map(), Facet2SVertex, Facet2bool, SEdge2SEdge, Vertex2bool, Edge2bool, Shell);
+    SEdge_creator<Nef_polyhedron_3>   create_sedges(this->sphere_map(), Edge2SEdge, Facet2SVertex, SEdge2SEdge, Facet2bool, Edge2bool);
+    SFace_creator<Nef_polyhedron_3>   create_sfaces(N3, this->sphere_map(), Edge2SEdge, Vertex2bool /*, Shell */);
+
+    N3.visit_shell_objects(sf, create_svertices);
+    N3.visit_shell_objects(sf, create_sedges);
+    N3.visit_shell_objects(sf, create_sfaces);
+  }
+
+  template<typename NK> 
+    Gaussian_map(const CGAL::Nef_polyhedron_3<NK>& N3) : Base(new Sphere_map) {
+
+    typedef CGAL::Nef_polyhedron_3<NK> Nef_polyhedron_3;
+    typedef typename Nef_polyhedron_3::Vertex_const_iterator 
+      Vertex_const_iterator;
+    typedef typename Nef_polyhedron_3::Halffacet_const_iterator
+      Halffacet_const_iterator;
+    typedef typename Nef_polyhedron_3::Halffacet_cycle_const_iterator
+      Halffacet_cycle_const_iterator;
+    typedef typename Nef_polyhedron_3::SHalfedge_around_facet_const_circulator
+      SHalfedge_around_facet_const_circulator;
+    typedef typename Nef_polyhedron_3::Volume_const_handle
+      Volume_const_handle;
+    typedef typename Nef_polyhedron_3::Halfedge_const_handle
+      Halfedge_const_handle;
+    typedef typename Nef_polyhedron_3::Halffacet_const_handle
+      Halffacet_const_handle;
+    typedef typename Nef_polyhedron_3::SHalfedge_const_handle
+      SHalfedge_const_handle;
+    
+    Unique_hash_map<Halffacet_const_handle, SVertex_handle> Facet2SVertex;
+    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
+
+    Volume_const_handle c(--N3.volumes_end());
+
+    Halffacet_const_iterator f;
+    CGAL_forall_halffacets(f,N3) {
+      if(f->incident_volume() != c) continue;
+      SVertex_handle sv = new_svertex(f->twin()->plane().orthogonal_vector());
+      sv->mark() = Mark(Point_3(0,0,0), f->mark());
+      Facet2SVertex[f] = sv;
+    }
+    
+    CGAL_forall_halffacets(f,N3) {
+      if(f->incident_volume() != c) continue;
+      Halffacet_cycle_const_iterator fc = f->twin()->facet_cycles_begin();
+      SHalfedge_const_handle se(fc);
+      SHalfedge_around_facet_const_circulator hc(se), hend(hc);
+      do {
+	Halfedge_const_handle e = hc->source();
+	SHalfedge_handle set = Edge2SEdge[e->twin()];
+	if(set == SHalfedge_handle())
+	  Edge2SEdge[e] = new_shalfedge_pair_at_source(Facet2SVertex[f],1);
+	else {
+	  link_as_target_and_append(Facet2SVertex[f], set);
+	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), e->mark());
+	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
+	  set->twin()->circle() = set->circle().opposite();
+	  Edge2SEdge[e] = set->twin();
+	}
+	++hc;
+      } while(hc != hend);
+    }
+    
+    Vertex_const_iterator v;
+    CGAL_forall_vertices(v,N3) {
+
+      typename Nef_polyhedron_3::Nef_polyhedron_S2 SD(N3.get_sphere_map(v));
+      Halfedge_const_handle e(SD.svertices_begin());
+      SHalfedge_handle se = Edge2SEdge[e];
+      SFace_handle sf = this->new_sface();
+      sf->mark() = Mark(v->point(), v->mark());
+      link_as_face_cycle(se,sf);
+    }
+  }
+  
+  template<typename PK> 
+  Gaussian_map(const CGAL::Polyhedron_3<PK>& P, bool closed = true) 
+    : Base(new Sphere_map) {
+    
+    typedef CGAL::Polyhedron_3<PK> Polyhedron_3;
+    typedef typename Polyhedron_3::Vertex_const_iterator 
+      Vertex_const_iterator;
+    typedef typename Polyhedron_3::Facet_const_iterator
+      Facet_const_iterator;
+    typedef typename Polyhedron_3::Halfedge_around_facet_const_circulator
+      Halfedge_around_facet_const_circulator;
+    typedef typename Polyhedron_3::Halfedge_const_handle
+      Halfedge_const_handle;
+    typedef typename Polyhedron_3::Facet_const_handle
+      Facet_const_handle;
+    
+    Unique_hash_map<Facet_const_handle, SVertex_handle> Facet2SVertex;
+    Unique_hash_map<Halfedge_const_handle, SHalfedge_handle> Edge2SEdge;
+
+    Facet_const_iterator f;
+    for(f = P.facets_begin(); f != P.facets_end(); ++f) {
+      SVertex_handle sv = new_svertex(f->plane().orthogonal_vector());
+      sv->mark() = Mark(Point_3(0,0,0), closed);
+      Facet2SVertex[f] = sv;
+    }
+
+    for(f = P.facets_begin(); f != P.facets_end(); ++f) {
+      Halfedge_around_facet_const_circulator hc(f->facet_begin()),hend(hc);
+      do {
+	Halfedge_const_handle e = hc;
+	SHalfedge_handle set = Edge2SEdge[e->opposite()];
+	if(set == SHalfedge_handle())
+	  Edge2SEdge[e] = new_shalfedge_pair_at_source(Facet2SVertex[f],1);
+	else {
+	  link_as_target_and_append(Facet2SVertex[f], set,1);
+	  set->mark() = set->twin()->mark() = Mark(Point_3(0,0,0), closed);
+	  set->circle() = Sphere_circle(set->source()->point(), set->twin()->source()->point());
+	  set->twin()->circle() = set->circle().opposite();
+	  Edge2SEdge[e] = set->twin();
+	}
+	++hc;
+      } while(hc != hend);
+    }
+   
+    Vertex_const_iterator v;
+    for(v = P.vertices_begin(); v != P.vertices_end(); ++v) {
+      Halfedge_const_handle e(v->halfedge());
+      SHalfedge_handle se = Edge2SEdge[e];
+      SFace_handle sf = this->new_sface();
+      sf->mark() = Mark(v->point(), closed);
+      link_as_face_cycle(se,sf);
+    }
+  }
+
+  Gaussian_map(typename Nef::Halffacet_const_handle f) 
+    : Base(new Sphere_map) 
+  {
+    SVertex_handle 
+      sv1(this->new_svertex(CGAL::ORIGIN + 
+			    f->plane().orthogonal_vector())),
+      sv2(this->new_svertex(CGAL::ORIGIN-sv1->point()));
+	  
+    sv1->mark() = sv1->mark() = 
+      Mark(Point_3(0,0,0), f->mark());
+
+    typename Nef::SHalfedge_around_facet_const_circulator 
+      sfc(f->facet_cycles_begin()), send(sfc);
+
+    SHalfedge_handle se1 = this->new_shalfedge_pair(sv1, sv2);
+    Point_3 orth(sfc->twin()->source()->point());
+    se1->circle() = Sphere_circle(orth.hx(), 
+				  orth.hy(),
+				  orth.hz());
+    se1->twin()->circle() = se1->circle().opposite();
+    se1->mark() = se1->twin()->mark() = 
+      Mark(Point_3(0,0,0), sfc->twin()->source()->mark());
+    
+    SHalfedge_handle se_prev(se1);
+
+    ++sfc;
+    CGAL_For_all(sfc, send) {
+      SHalfedge_handle 
+	se(this->new_shalfedge_pair(se_prev, se_prev->twin(),
+				    SM_decorator::AFTER, SM_decorator::BEFORE));
+      Point_3 orth(sfc->twin()->source()->point());
+      se->circle() = Sphere_circle(orth.hx(), 
+				   orth.hy(),
+				   orth.hz());
+      se->twin()->circle() = se->circle().opposite();
+      se->mark() = se->twin()->mark() = 
+	Mark(Point_3(0,0,0), sfc->twin()->source()->mark());      
+      se_prev = se;
+    }
+
+    typename Sphere_map::SHalfedge_around_svertex_circulator 
+      svc(sv1->out_sedge());
+    CGAL_For_all(sfc, send) {
+      SFace_handle sf = this->new_sface();
+      sf->mark() = 
+	Mark(sfc->source()->source()->point(), sfc->source()->source()->mark());
+      this->link_as_face_cycle(svc->twin(), sf);
+      ++svc;
+    } 
+  }
+
+  Gaussian_map(typename Nef::Halfedge_const_handle e) 
+    : Base(new Sphere_map) 
+  {
+    SHalfloop_handle sl = this->new_shalfloop_pair();
+    Point_3 p = e->twin()->point();
+    sl->circle() = Sphere_circle(p.hx(), p.hy(), p.hz());
+    sl->twin()->circle() = sl->circle().opposite();
+    sl->mark() = sl->twin()->mark() = 
+      Mark(Point_3(0,0,0), e->mark());
+    
+    SFace_handle sf1 = this->new_sface();
+    SFace_handle sf2 = this->new_sface();
+    sf1->mark() = Mark(e->source()->point(), 
+		       e->source()->mark());
+    sf2->mark() = Mark(e->twin()->source()->point(),
+		       e->twin()->source()->mark());
+
+    this->link_as_loop(sl, sf1);
+    this->link_as_loop(sl->twin(), sf2);
+  }
+
+  Gaussian_map(typename Nef::Vertex_const_handle v) 
+    : Base(new Sphere_map) 
+  {
+    SFace_handle sf = this->new_sface();
+    sf->mark() = Mark(v->point(), v->mark());
+  }
+
+
+  void simplify() 
+  {
+	  CGAL_NEF_TRACEN("simplify");
+    
+	  typedef typename CGAL::Union_find<SFace_handle>::handle Union_find_handle;
+	  CGAL::Unique_hash_map< SFace_handle, Union_find_handle> Pitem(NULL);
+	  CGAL::Union_find< SFace_handle> UF;
+    
+	  SFace_iterator f;
+	  CGAL_forall_sfaces(f,*this) {
+		  Pitem[f] = UF.make_set(f);
+		  clear_face_cycle_entries(f);
+	  }
+    
+	  SHalfedge_iterator e, en;
+	  for(e = this->shalfedges_begin(); e != this->shalfedges_end(); e = en) 
+	  { 
+		  en = e; ++en; if ( en==e->twin() ) ++en;
+		  CGAL_NEF_TRACEN("can simplify ? " << PH(e));
+		  CGAL_NEF_TRACEN(e->mark() << " " << e->incident_sface()->mark() 
+						  << " " << e->twin()->incident_sface()->mark());
+		  if (e->incident_sface()->mark() == 
+			  e->twin()->incident_sface()->mark()) {
+			  CGAL_NEF_TRACEN("deleting "<<PH(e));
+			  if ( !UF.same_set(Pitem[e->incident_sface()],
+								Pitem[e->twin()->incident_sface()]) ) {
+	  
+				  UF.unify_sets( Pitem[e->incident_sface()],
+								 Pitem[e->twin()->incident_sface()] );
+				  CGAL_NEF_TRACEN("unioning disjoint faces");
+			  }
+	
+			  CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) << 
+							  " " << is_closed_at_source(e->twin()));
+			  delete_edge_pair(e);
+		  }
+	  }
+    
+	  CGAL::Unique_hash_map<SHalfedge_handle,bool> linked(false);
+	  for (e = this->shalfedges_begin(); e != this->shalfedges_end(); ++e) {
+		  if ( linked[e] ) continue;
+		  SHalfedge_around_sface_circulator hfc(e),hend(hfc);
+		  SFace_handle f = *(UF.find( Pitem[e->incident_sface()]));
+		  CGAL_For_all(hfc,hend) {  set_face(hfc,f); linked[hfc]=true; }
+		  store_sm_boundary_object(e,f);
+	  }
+    
+	  SVertex_iterator v,vn;
+	  for(v = this->svertices_begin(); v != this->svertices_end(); v=vn) 
+	  {
+		  vn=v; ++vn;
+		  if ( is_isolated(v) ) {
+			  delete_vertex_only(v);
+			  continue;
+		  }
+		  if ( has_outdeg_two(v)) {
+			  merge_edge_pairs_at_target(first_out_edge(v)->sprev()); 
+		  } 
+	  }
+    
+	  SFace_iterator fn;
+	  for (f = fn = this->sfaces_begin(); f != this->sfaces_end(); f=fn) 
+	  { 
+		  ++fn;
+		  Union_find_handle pit = Pitem[f];
+		  if ( UF.find(pit) != pit ) {
+			  CGAL_NEF_TRACEN("delete face " << &*f);
+			  delete_face_only(f);
+		  }
+	  }
+  }      
+  
+  void minkowski_sum(const Gaussian_map& G1, const Gaussian_map& G2) {
+    SM_overlayer O(this->sphere_map());
+#ifdef CGAL_NEF3_TIMER_OVERLAY
+    CGAL::Timer t;
+    t.start();
+#endif // CGAL_NEF3_TIMER_OVERLAY
+    O.subdivide(G1.sphere_map(), G2.sphere_map(), true);
+#ifdef CGAL_NEF3_TIMER_OVERLAY
+    t.stop();
+    std::cout << "Runtime_overlay " << t.time() << std::endl;
+#endif // CGAL_NEF3_TIMER_OVERLAY
+    VECTOR_ADDITION va;
+    O.select(va);
+    simplify();
+  }
+  
+  Object_handle get_top() {
+    return top;
+  }
+  Object_handle get_bottom() {
+    return bottom;
+  }
+  
+  Object_handle locate_top() {
+    std::vector<SFace_iterator> topSF;
+    SFace_iterator sfi = this->sfaces_begin();
+    topSF.push_back(sfi);
+    
+    Comparison_result cr;
+    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
+      cr = compare_z(sfi->mark(), (*topSF.begin())->mark());
+      if(cr != CGAL::SMALLER) {
+	if(cr == CGAL::LARGER)
+	  topSF.clear();
+	topSF.push_back(sfi);	
+      }
+    }
+    
+    SFace_handle sf(topSF.front());
+    if(topSF.size()==1)
+    return Object_handle(SFace_const_handle(sf));
+    else {
+      SHalfedge_handle se(sf->sface_cycles_begin());
+      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
+      
+      if(topSF.size()==2) {
+	while(sfc->circle().c()!=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	return Object_handle(SHalfedge_const_handle(sfc));
+      } else {
+	CGAL_assertion(topSF.size() > 0);
+	while(sfc->source()->point().hx()!=0 || 
+	      sfc->source()->point().hy()!=0 ||
+	      sfc->source()->point().hz()<=0) {
+	  ++sfc;
+	  CGAL_assertion(sfc != sfend);
+	}
+	return Object_handle(SVertex_const_handle(sfc->source()));      
+      }
+    }
+    CGAL_error_msg("line should not be executed");
+    return Object_handle();
+  }
+  
+  Object_handle locate_bottom() {
+    std::vector<SFace_iterator> bottomSF;
+    SFace_iterator sfi = this->sfaces_begin();
+    bottomSF.push_back(sfi);
+    
+    Comparison_result cr;
+    for(++sfi;sfi != this->sfaces_end(); ++sfi) {
+      cr = compare_z(sfi->mark(), (*bottomSF.begin())->mark());
+      if(cr != CGAL::LARGER) {
+	if(cr == CGAL::SMALLER)
+	  bottomSF.clear();
+	bottomSF.push_back(sfi);	
+      }
+    }
+    
+    SFace_handle sf(bottomSF.front());
+    if(bottomSF.size()==1)
+    return Object_handle(SFace_const_handle(sf));
+    else {
+      SHalfedge_handle se(sf->sface_cycles_begin());
+      SHalfedge_around_sface_circulator sfc(se), sfend(sfc);       
+      
+	if(bottomSF.size()==2) {
+	  while(sfc->circle().c()!=0) {
+	    ++sfc;
+	    CGAL_assertion(sfc != sfend);
+	  }
+	  return Object_handle(SHalfedge_const_handle(sfc));
+	} else {
+	  CGAL_assertion(bottomSF.size() > 0);
+	  while(sfc->source()->point().hx()!=0 || 
+		sfc->source()->point().hy()!=0 ||
+		sfc->source()->point().hz()>=0) {
+	    ++sfc;
+	    CGAL_assertion(sfc != sfend);
+	  }
+	  return Object_handle(SVertex_const_handle(sfc->source()));      
+	}
+    }
+    CGAL_error_msg("line should not be executed");
+    return Object_handle();
+  }
+  
+};
+
+template<typename Kernel, typename Nef, typename Mark>
+std::ostream& operator<<(std::ostream& out, const CGAL::Gaussian_map<Kernel, Nef, Mark>& G) {
+  out << "OFF" << std::endl;
+  out << G.number_of_sfaces() << " " << G.number_of_svertices() << " 0" << std::endl;
+  
+  typedef typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SFace_const_iterator 
+    SFace_const_iterator;
+  CGAL::Unique_hash_map<SFace_const_iterator, int> SFace2int;
+  
+  int i=0;
+  SFace_const_iterator sf;
+  CGAL_forall_sfaces(sf, G) {
+    SFace2int[sf] = i++;
+    out << CGAL::to_double(sf->mark().x()) << " " 
+	<< CGAL::to_double(sf->mark().y()) << " " 
+	<< CGAL::to_double(sf->mark().z()) << std::endl;
+  }
+
+  typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SVertex_const_iterator sv;
+  CGAL_forall_svertices(sv,G) {
+    typename CGAL::Gaussian_map<Kernel, Nef, Mark>::SHalfedge_around_svertex_const_circulator 
+      svc(G.first_out_edge(sv)),
+      svc1(svc),
+      svend(svc);
+    out << std::distance(++svc1,svend)+1;
+    CGAL_For_all(svc,svend)
+      out << " " << SFace2int[svc->incident_sface()];
+    out << std::endl;
+  }
+
+  return out;
+}
+
+} //namespace CGAL
+#endif // CGAL_MS3_GAUSSIAN_MAP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/PointMark.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/PointMark.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/PointMark.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/PointMark.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h b/3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Modifiable_priority_queue.h b/3rdparty/CGAL-4.8/include/CGAL/Modifiable_priority_queue.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Modifiable_priority_queue.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Modifiable_priority_queue.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Modifier_base.h b/3rdparty/CGAL-4.8/include/CGAL/Modifier_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Modifier_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Modifier_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Modular_arithmetic/Residue_type.h b/3rdparty/CGAL-4.8/include/CGAL/Modular_arithmetic/Residue_type.h
new file mode 100644
index 0000000..e5ddbaa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Modular_arithmetic/Residue_type.h
@@ -0,0 +1,327 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), Max-Planck-Institute
+// Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sylvain Pion, Michael Hemmer, Alexander Kobel
+
+#ifndef CGAL_RESIDUE_TYPE_H
+#define CGAL_RESIDUE_TYPE_H
+
+#include <CGAL/basic.h>
+#include <CGAL/tss.h>
+
+#include <cfloat>
+
+#include <boost/operators.hpp>
+
+
+namespace CGAL {
+
+class Residue;
+    
+Residue operator + (const Residue&);
+Residue operator - (const Residue&);
+
+std::ostream& operator << (std::ostream& os, const Residue& p);
+std::istream& operator >> (std::istream& is, Residue& p);
+
+/*! \ingroup CGAL_Modular_traits
+ * \brief This class represents the Field Z mod p. 
+ *  
+ * This class uses the type double for representation. 
+ * Therefore the value of p is restricted to primes less than 2^26.
+ * By default p is set to 67108859.
+ *
+ * It provides the standard operators +,-,*,/ as well as in&output.
+ * 
+ * \see Modular_traits
+ */
+class Residue:
+    boost::ordered_field_operators1< Residue,
+    boost::ordered_field_operators2< Residue, int > >{
+    
+public:
+  typedef Residue Self;
+  typedef Residue NT;
+  
+private:
+#ifdef CGAL_HEADER_ONLY
+  static const double& get_static_CST_CUT()
+  {
+    static const double CST_CUT = std::ldexp( 3., 51 );
+    return CST_CUT;
+  }
+#else // CGAL_HEADER_ONLY
+  CGAL_EXPORT static const double  CST_CUT; 
+  static const double& get_static_CST_CUT()
+  { return Residue::CST_CUT; }
+#endif // CGAL_HEADER_ONLY
+
+  static int& prime_int_internal()
+  {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, prime_int, 67111067);
+    return prime_int;
+  }
+  
+  static inline int get_prime_int(){
+    return prime_int_internal();
+  }
+  
+  
+  static double& prime_internal()
+  {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(double, prime, 67111067.0);
+    return prime;
+  }
+
+  static inline double get_prime(){
+    return prime_internal();
+  }
+  
+  static double& prime_inv_internal()
+  {
+    CGAL_STATIC_THREAD_LOCAL_VARIABLE(double, prime_inv, 0.000000014900672045640400859667452463541);
+    return prime_inv;
+  }
+
+  static inline double get_prime_inv(){
+    return prime_inv_internal();
+  }
+
+
+
+
+    /* Quick integer rounding, valid if a<2^51. for double */ 
+    static inline 
+    double RES_round (double a){
+      // call CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_TONEAREST)
+      // before using modular arithmetic 
+      CGAL_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
+      return ( (a + get_static_CST_CUT())  - get_static_CST_CUT());
+    }
+
+    /* Big modular reduction (e.g. after multiplication) */
+    static inline 
+    double RES_reduce (double a){
+      double result = a - get_prime() * RES_round(a * get_prime_inv());
+      CGAL_postcondition(2*result <  get_prime());
+      CGAL_postcondition(2*result > -get_prime());
+      return result;
+    }
+
+    /* Little modular reduction (e.g. after a simple addition). */
+    static inline 
+    double RES_soft_reduce (double a){
+      double p = get_prime();
+        double b = 2*a;
+        return (b>p) ? a-p :
+            ((b<-p) ? a+p : a);
+    }
+
+    
+    /* -a */
+    static inline 
+    double RES_negate(double a){
+        return RES_soft_reduce(-a);
+    }
+
+
+    /* a*b */
+    static inline 
+    double RES_mul (double a, double b){
+        double c = a*b;
+        return RES_reduce(c);
+    }
+
+
+    /* a+b */
+    static inline 
+    double RES_add (double a, double b){
+        double c = a+b;
+        return RES_soft_reduce(c);
+    }
+
+    
+    /* a^-1, using Bezout (extended Euclidian algorithm). */
+    static inline 
+    double RES_inv (double ri1){
+        CGAL_precondition (ri1 != 0.0);
+
+        double bi = 0.0;
+        double bi1 = 1.0;
+        double ri = get_prime();
+        double p, tmp, tmp2;
+    
+        Real_embeddable_traits<double>::Abs double_abs;
+        while (double_abs(ri1) != 1.0)
+        {
+            p = RES_round(ri/ri1);
+            tmp = bi - p * bi1;
+            tmp2 = ri - p * ri1;
+            bi = bi1;
+            ri = ri1;
+            bi1 = tmp;
+            ri1 = tmp2;
+        };
+
+        return ri1 * RES_soft_reduce(bi1);	/* Quicker !!!! */
+    }
+    
+    /* a/b */
+    static inline 
+    double RES_div (double a, double b){
+        return RES_mul(a, RES_inv(b));
+    }    
+
+public:
+    /*! \brief sets the current prime. 
+     *  
+     *  Note that you are going to change a static member!
+     *  \pre p is prime, but we abstained from such a test.
+     *  \pre 0 < p < 2^26
+     *  
+     */
+    static int 
+    set_current_prime(int p){   
+      int old_prime = get_prime_int();  
+      prime_int_internal() = p;  
+      prime_internal() = double(p);  
+      prime_inv_internal() =  1.0 / double(p);
+
+      return old_prime; 
+    }
+ 
+  /*! \brief return the current prime.  */
+    static int get_current_prime(){
+      return get_prime_int();
+    }
+  
+  int  get_value() const{
+    CGAL_precondition(2*x_ <  get_prime());
+    CGAL_precondition(2*x_ > -get_prime());
+    return int(x_);
+  }
+    
+private:
+    double x_;
+
+public: 
+
+    //! constructor of Residue, from int 
+    Residue(int n = 0){
+        x_= RES_reduce(n);
+    }
+
+    //! constructor of Residue, from long 
+
+    Residue (long n) {
+        x_= RES_soft_reduce (static_cast< double > (n % get_prime_int()));
+    }
+
+    //! constructor of Residue, from long long
+    Residue (long long n) {
+        x_= RES_soft_reduce (static_cast< double > (n % get_prime_int()));
+    }
+   
+    //! Access operator for x, \c const 
+    const double& x() const { return x_; }
+    //! Access operator for x
+    double&       x()       { return x_; }                     
+
+    Self& operator += (const Self& p2) { 
+        x() = RES_add(x(),p2.x()); 
+        return (*this); 
+    }
+    Self& operator -= (const Self& p2){ 
+        x() = RES_add(x(),RES_negate(p2.x())); 
+        return (*this); 
+    }
+    Self& operator *= (const Self& p2){ 
+        x() = RES_mul(x(),p2.x()); 
+        return (*this); 
+    }
+    Self& operator /= (const Self& p2) { 
+        x() = RES_div(x(),p2.x()); 
+        return (*this); 
+    }
+    // 
+    Self& operator += (int p2) { 
+        x() = RES_add(x(),Residue(p2).x()); 
+        return (*this); 
+    }
+    Self& operator -= (int p2){ 
+        x() = RES_add(x(),Residue(-p2).x()); 
+        return (*this); 
+    }
+
+    Self& operator *= (int p2){ 
+        x() = RES_mul(x(),Residue(p2).x()); 
+        return (*this); 
+    }
+
+    Self& operator /= (int p2) { 
+        x() = RES_div(x(),Residue(p2).x()); 
+        return (*this); 
+    }
+  
+    friend Self operator + (const Self&);
+    friend Self operator - (const Self&);                
+};
+
+inline Residue operator + (const Residue& p1)
+{ return p1; }
+
+inline Residue operator - (const Residue& p1){ 
+    typedef Residue RES;
+    Residue r; 
+    r.x() = RES::RES_negate(p1.x());
+    return r; 
+}
+
+inline bool operator == (const Residue& p1, const Residue& p2)
+{ return ( p1.x()==p2.x() ); }   
+inline bool operator == (const Residue& p1, int p2)
+{ return ( p1 == Residue(p2) ); }   
+
+
+inline bool operator < (const Residue& p1, const Residue& p2)
+{ return ( p1.x() < p2.x() ); }   
+inline bool operator < (const Residue& p1, int p2)
+{ return ( p1.x() < Residue(p2).x() ); }   
+
+
+// I/O 
+inline std::ostream& operator << (std::ostream& os, const Residue& p) {   
+    typedef Residue RES;
+    os <<"("<< int(p.x())<<"%"<<RES::get_current_prime()<<")";
+    return os;
+}
+
+inline std::istream& operator >> (std::istream& is, Residue& p) {
+    char ch;
+    int prime;
+
+    is >> p.x();
+    is >> ch;    // read the %
+    is >> prime; // read the prime
+    CGAL_precondition(prime==Residue::get_current_prime());
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_RESIDUE_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Modular_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Modular_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Modular_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Modular_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Monge_via_jet_fitting.h b/3rdparty/CGAL-4.8/include/CGAL/Monge_via_jet_fitting.h
new file mode 100644
index 0000000..1236ac6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Monge_via_jet_fitting.h
@@ -0,0 +1,784 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+#ifndef CGAL_MONGE_VIA_JET_FITTING_H_
+#define CGAL_MONGE_VIA_JET_FITTING_H_
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/circulator.h>
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/Default_diagonalize_traits.h>
+#include <math.h>
+#include <utility>
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_svd.h>
+#else
+#ifdef CGAL_LAPACK_ENABLED
+#include <CGAL/Lapack/Linear_algebra_lapack.h>
+#endif
+#endif
+
+namespace CGAL {
+
+inline
+unsigned int fact(unsigned int n){
+  unsigned int i, p=1;
+  for(i=2; i<=n; i++) p *= i;
+  return p;
+}
+
+////////////////////// CLASS Monge_via_jet_fitting ////////////////////////
+#ifdef CGAL_EIGEN3_ENABLED
+template < class DataKernel, class LocalKernel = Simple_cartesian<double>, class SvdTraits = Eigen_svd >
+#else
+#ifdef CGAL_LAPACK_ENABLED
+template < class DataKernel, class LocalKernel = Simple_cartesian<double>, class SvdTraits = Lapack_svd>  
+#else
+template < class DataKernel, class LocalKernel, class SvdTraits >  
+#endif
+#endif
+  class Monge_via_jet_fitting {
+ public:
+//////////////////////begin nested CLASS Monge_form ///////////////////
+class Monge_form {
+ public: 
+  typedef typename DataKernel::FT        FT;
+  typedef typename DataKernel::Point_3   Point_3;
+  typedef typename DataKernel::Vector_3  Vector_3;
+ protected:
+  //point on the fitted surface where diff quantities are computed
+  Point_3 m_origin_pt;
+  //the monge trihedron (d1,d2,n) is orthonormal direct
+  Vector_3 m_d1;   //maximal ppal dir
+  Vector_3 m_d2;   //minimal ppal dir
+  Vector_3 m_n;    //normal direction
+  //coeff = (k1, k2, //ppal curv
+  //         b0, b1, b2, b3, //third order
+  //         c0, c1, c2, c3, c4) //fourth order
+  //     if (degree==1) no coeff needed
+  std::vector<FT> m_coefficients;
+  
+public:
+  //constructor
+  Monge_form() {
+    m_origin_pt  = Point_3(0.,0.,0.); 
+    m_d1 = Vector_3(0.,0.,0.);
+    m_d2 = Vector_3(0.,0.,0.);
+    m_n = Vector_3(0.,0.,0.);
+    m_coefficients = std::vector<FT>();
+  }
+  ~Monge_form() {}
+  //access
+  const Point_3 origin() const { return m_origin_pt; }
+  Point_3& origin() { return m_origin_pt; }
+  const Vector_3 maximal_principal_direction() const { return m_d1; }
+  Vector_3& maximal_principal_direction() { return m_d1; }
+  const Vector_3 minimal_principal_direction() const { return m_d2; }
+  Vector_3& minimal_principal_direction() { return m_d2; }
+  const Vector_3 normal_direction() const { return m_n; }
+  Vector_3& normal_direction() { return m_n; }
+  const std::vector<FT> coefficients() const { return m_coefficients; }
+  std::vector<FT>& coefficients() { return m_coefficients; }
+
+  const FT principal_curvatures(size_t i) const {
+    CGAL_precondition( (i == 0 || i == 1) && coefficients().size() >=2 );
+    return coefficients()[i]; }
+  const FT third_order_coefficients(size_t i) const {
+    CGAL_precondition( i <= 3 && coefficients().size() >=6 );
+    return coefficients()[i+2]; }
+  const FT fourth_order_coefficients(size_t i) const {
+    CGAL_precondition( i <= 4 && coefficients().size() >=11 );
+    return coefficients()[i+6]; }
+ 
+  //if d>=2, number of coeffs = (d+1)(d+2)/2 -4. 
+  //we remove cst, linear and the xy coeff which vanish
+  void set_up(std::size_t degree);
+  //switch min-max ppal curv/dir wrt a given normal orientation.
+  // if given_normal.monge_normal < 0 then change the orientation
+  // if z=g(x,y) in the basis (d1,d2,n) then in the basis (d2,d1,-n)
+  // z=h(x,y)=-g(y,x)
+  void comply_wrt_given_normal(const Vector_3& given_normal);
+  void dump_verbose(std::ostream& out_stream) const;
+  void dump_4ogl(std::ostream& out_stream, const FT scale);
+};
+//////////////////////end nested CLASS Monge_form /////////////////////
+
+//continue main class Monge_via_jet_fitting ////////
+ public:
+ typedef  DataKernel   Data_kernel;
+ typedef  LocalKernel  Local_kernel;
+ 
+ //used to convert number types, points and vectors back and forth
+ typedef NT_converter<typename Local_kernel::FT, typename  Data_kernel::FT> L2D_NTconverter;
+ Cartesian_converter<Data_kernel, Local_kernel> D2L_converter; 
+ Cartesian_converter<Local_kernel, Data_kernel> L2D_converter; 
+  
+ typedef typename Local_kernel::FT       FT;
+ typedef typename Local_kernel::Point_3  Point_3;
+ typedef typename Local_kernel::Vector_3 Vector_3;
+ typedef CGAL::Aff_transformation_3<Local_kernel> Aff_transformation;
+
+ typedef typename Data_kernel::FT       DFT;
+
+ typedef typename SvdTraits::Vector LAVector;
+ typedef typename SvdTraits::Matrix LAMatrix;
+ 
+
+ public:
+ Monge_via_jet_fitting(); 
+ template <class InputIterator>
+ Monge_form operator()(InputIterator begin, InputIterator end,  
+		       size_t d, size_t dprime);
+ const FT condition_number() const {return condition_nb;}
+ const std::pair<FT, Vector_3> pca_basis(size_t i) const {
+   CGAL_precondition( i<3 );
+   return m_pca_basis[i];}
+ 
+ protected:
+ int deg;
+ int deg_monge;
+  int nb_d_jet_coeff;
+  int nb_input_pts;
+  FT preconditionning;
+  CGAL::Sqrt<FT> Lsqrt;
+  FT condition_nb;
+  
+  std::vector< std::pair<FT, Vector_3> > m_pca_basis;
+
+  //translate_p0 changes the origin of the world to p0 the first point 
+  //  of the input data points
+  //change_world2fitting (coord of a vector in world) = coord of this 
+  //  vector in fitting. The matrix tranform has as lines the coord of
+  //  the basis vectors of fitting in the world coord. 
+  //idem for change_fitting2monge
+  Aff_transformation translate_p0, change_world2fitting,
+    change_fitting2monge;
+
+  //eigen val and vect stored in m_pca_basis
+  // change_world2fitting is computed 
+ template <class InputIterator>
+  void compute_PCA(InputIterator begin, InputIterator end); 
+
+  //Coordinates of input points are computed in the fitting basis with 
+  //  p0 as origin.
+  //Preconditionning is computed, M and Z are filled
+ template <class InputIterator>
+  void fill_matrix(InputIterator begin, InputIterator end,
+		   std::size_t d, LAMatrix& M, LAVector& Z);
+  //A is computed, solving MA=Z in the ls sense, the solution A is stored in Z
+  //Preconditionning is needed
+  void solve_linear_system(LAMatrix &M, LAVector& Z);
+  
+  //Classical differential geometric calculus
+  //change_fitting2monge is computed
+  //if deg_monge =1 only 1st order info
+  //if deg_monge >= 2 2nd order info are computed
+  void compute_Monge_basis(const FT* A, Monge_form& monge_form);
+
+  //if deg_monge >=3 then 3rd (and 4th) order info are computed
+  void compute_Monge_coefficients(FT* A, std::size_t dprime, 
+				  Monge_form& monge_form);
+
+  //for a trihedron (v1,v2,v3) switches v1 to -v1 if det(v1,v2,v3) < 0
+  void switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
+				   const Vector_3& v3);
+
+    friend
+    std::ostream&
+    operator<<(std::ostream& out_stream, 
+	       const typename Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form& monge){
+      monge.dump_verbose(out_stream);
+      return out_stream;
+    }
+};
+
+//-------------------------------------------------------------------
+// Implementation
+//------------------------------------------------------------------
+
+// Implementation nested Monge_form //////////////////////////////
+//template <class DataKernel>
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+  void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+  Monge_form::
+set_up(std::size_t degree) {
+  if ( degree >= 2 ) std::fill_n(back_inserter(m_coefficients),
+				 (degree+1)*(degree+2)/2-4, 0.);
+}
+
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
+comply_wrt_given_normal(const Vector_3& given_normal)
+{
+  if ( given_normal*this->normal_direction() < 0 )
+    {
+      normal_direction() = -normal_direction();
+      std::swap(maximal_principal_direction(), minimal_principal_direction());
+      if ( coefficients().size() >= 2) 
+	std::swap(coefficients()[0],coefficients()[1]);
+      if ( coefficients().size() >= 6) {
+	std::swap(coefficients()[2],coefficients()[5]);
+	std::swap(coefficients()[3],coefficients()[4]);}
+      if ( coefficients().size() >= 11) {
+	std::swap(coefficients()[6],coefficients()[10]);
+	std::swap(coefficients()[7],coefficients()[9]);}
+      typename std::vector<FT>::iterator itb = coefficients().begin(),
+	ite = coefficients().end();
+      for (;itb!=ite;itb++) { *itb = -(*itb); }
+    }
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
+dump_verbose(std::ostream& out_stream) const
+{
+  out_stream << "origin : " << origin() << std::endl
+	     << "n : " << normal_direction() << std::endl;
+  if ( coefficients().size() >= 2) 
+    out_stream << "d1 : " << maximal_principal_direction() << std::endl 
+	       << "d2 : " << minimal_principal_direction() << std::endl
+	       << "k1 : " << coefficients()[0] << std::endl 
+	       << "k2 : " << coefficients()[1] << std::endl;	      
+  if ( coefficients().size() >= 6) 
+    out_stream << "b0 : " << coefficients()[2] << std::endl 
+	       << "b1 : " << coefficients()[3] << std::endl
+ 	       << "b2 : " << coefficients()[4] << std::endl
+ 	       << "b3 : " << coefficients()[5] << std::endl;
+  if ( coefficients().size() >= 11) 
+    out_stream << "c0 : " << coefficients()[6] << std::endl 
+	       << "c1 : " << coefficients()[7] << std::endl
+ 	       << "c2 : " << coefficients()[8] << std::endl
+ 	       << "c3 : " << coefficients()[9] << std::endl 
+ 	       << "c4 : " << coefficients()[10] << std::endl
+	       << std::endl; 
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form::
+dump_4ogl(std::ostream& out_stream, const FT scale)
+{
+  CGAL_precondition( coefficients().size() >= 2 );
+  out_stream << origin()  << " "
+	     << maximal_principal_direction() * scale << " "
+	     << minimal_principal_direction() * scale << " "
+	     << coefficients()[0] << " "
+	     << coefficients()[1] << " "
+	     << std::endl;
+}
+//////////////////////////////////////////////////////////////
+// Implementation main Monge_via_jet_fiting
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+  Monge_via_jet_fitting()
+{
+  m_pca_basis = std::vector< std::pair<FT, Vector_3> >(3);
+} 
+
+template < class DataKernel, class LocalKernel, class SvdTraits> 
+template <class InputIterator>
+  typename  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form
+  Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+  operator()(InputIterator begin, InputIterator end, 
+	     size_t d, size_t dprime)
+{
+  // precondition: on the degrees, jet and monge
+  CGAL_precondition( (d >=1) && (dprime >= 1) 
+		     && (dprime <= 4) && (dprime <= d) );
+  this->deg = static_cast<int>(d);
+  this->deg_monge = static_cast<int>(dprime);
+  this->nb_d_jet_coeff = static_cast<int>((d+1)*(d+2)/2);
+  this->nb_input_pts = static_cast<int>(end - begin);
+  // precondition: solvable ls system
+  CGAL_precondition( nb_input_pts >= nb_d_jet_coeff );
+
+  //Initialize
+  Monge_form monge_form;
+  monge_form.set_up(dprime);
+  //for the system MA=Z
+  LAMatrix M(nb_input_pts, nb_d_jet_coeff);
+  LAVector Z(nb_input_pts);
+
+  compute_PCA(begin, end);
+  fill_matrix(begin, end, d, M, Z);//with precond
+  solve_linear_system(M, Z);  //correct with precond
+  compute_Monge_basis(Z.vector(), monge_form);
+  if ( dprime >= 3) compute_Monge_coefficients(Z.vector(), dprime, monge_form);
+  return monge_form;
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+template <class InputIterator>
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+compute_PCA(InputIterator begin, InputIterator end)
+{
+  int n = this->nb_input_pts;
+  FT x, y, z,
+    sumX = 0., sumY = 0., sumZ = 0.,
+    sumX2 = 0., sumY2 = 0., sumZ2 = 0.,
+    sumXY = 0., sumXZ = 0., sumYZ = 0., 
+    xx, yy, zz, xy, xz, yz;
+  
+  for (; begin != end; begin++)
+    {
+      Point_3 lp = D2L_converter(*begin);
+      x = lp.x();
+      y = lp.y();
+      z = lp.z();   
+      sumX += x / n;
+      sumY += y / n;
+      sumZ += z / n;
+      sumX2 += x * x / n;
+      sumY2 += y * y / n;
+      sumZ2 += z * z / n;
+      sumXY += x * y / n;
+      sumXZ += x * z / n;
+      sumYZ += y * z / n;
+    }
+  xx = sumX2 - sumX * sumX;
+  yy = sumY2 - sumY * sumY;
+  zz = sumZ2 - sumZ * sumZ;
+  xy = sumXY - sumX * sumY;
+  xz = sumXZ - sumX * sumZ;
+  yz = sumYZ - sumY * sumZ;
+
+  // assemble covariance matrix as a
+  // semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5
+  CGAL::cpp11::array<FT, 6> covariance = {{ xx,xy,xz,yy,yz,zz }};
+  CGAL::cpp11::array<FT, 3> eigen_values = {{ 0., 0., 0. }};
+  CGAL::cpp11::array<FT, 9> eigen_vectors = {{ 0., 0., 0. }};
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  CGAL::Default_diagonalize_traits<FT,3>::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  //store in m_pca_basis
+  for (int i=0; i<3; i++)
+    {
+      m_pca_basis[i].first =  eigen_values[2-i];
+    }
+
+  Vector_3 v1(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]);
+  m_pca_basis[0].second = v1;
+  Vector_3 v2(eigen_vectors[3],eigen_vectors[4],eigen_vectors[5]);
+  m_pca_basis[1].second = v2;
+  Vector_3 v3(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]);
+  m_pca_basis[2].second = v3;
+  switch_to_direct_orientation(m_pca_basis[0].second,
+			       m_pca_basis[1].second,
+			       m_pca_basis[2].second);
+ 
+  //Store the change of basis W->F
+  Aff_transformation 
+    change_basis (m_pca_basis[0].second[0], m_pca_basis[0].second[1], m_pca_basis[0].second[2], 
+		  m_pca_basis[1].second[0], m_pca_basis[1].second[1], m_pca_basis[1].second[2],
+		  m_pca_basis[2].second[0], m_pca_basis[2].second[1], m_pca_basis[2].second[2]);
+
+   this->change_world2fitting = change_basis; 
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+template <class InputIterator>
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+fill_matrix(InputIterator begin, InputIterator end,
+	    std::size_t d, LAMatrix &M, LAVector& Z)
+{
+  //origin of fitting coord system = first input data point
+  Point_3 point0 = D2L_converter(*begin);
+  //transform coordinates of sample points with a
+  //translation ($-p$) and multiplication by $ P_{W\rightarrow F}$.
+  Point_3 orig(0.,0.,0.);
+  Vector_3 v_point0_orig(orig - point0);
+  Aff_transformation transl(CGAL::TRANSLATION, v_point0_orig);
+  this->translate_p0 = transl;
+  Aff_transformation transf_points = this->change_world2fitting *
+    this->translate_p0;
+  
+  //compute and store transformed points
+  std::vector<Point_3> pts_in_fitting_basis;
+  pts_in_fitting_basis.reserve(this->nb_input_pts);
+  CGAL_For_all(begin,end){
+    Point_3 cur_pt = transf_points(D2L_converter(*begin));
+    pts_in_fitting_basis.push_back(cur_pt);
+  }
+  
+  //Compute preconditionning
+  FT precond = 0.;
+  typename std::vector<Point_3>::iterator itb = pts_in_fitting_basis.begin(),
+    ite = pts_in_fitting_basis.end();
+  CGAL_For_all(itb,ite) precond += CGAL::abs(itb->x()) + CGAL::abs(itb->y());
+  precond /= 2*this->nb_input_pts;
+  this->preconditionning = precond;
+  //fill matrices M and Z
+  itb = pts_in_fitting_basis.begin();
+  int line_count = 0;
+  FT x, y;
+  CGAL_For_all(itb,ite) {
+    x = itb->x();
+    y = itb->y();
+    //  Z[line_count] = itb->z();
+    Z.set(line_count,itb->z());
+    for (std::size_t k=0; k <= d; k++) {
+      for (std::size_t i=0; i<=k; i++) {
+        M.set(line_count, k*(k+1)/2+i,
+              std::pow(x,static_cast<int>(k-i))
+              * std::pow(y,static_cast<int>(i))
+              /( fact(static_cast<unsigned int>(i)) *
+                 fact(static_cast<unsigned int>(k-i))
+                 *std::pow(this->preconditionning,static_cast<int>(k))));
+      }
+    }
+    line_count++;
+  }
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+solve_linear_system(LAMatrix &M, LAVector& Z)
+{
+  condition_nb = SvdTraits::solve(M, Z); 
+  for (int k=0; k <= this->deg; k++) for (int i=0; i<=k; i++)
+    // Z[k*(k+1)/2+i] /= std::pow(this->preconditionning,k);
+    Z.set( k*(k+1)/2+i, Z(k*(k+1)/2+i) / std::pow(this->preconditionning,k) );
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>   
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+compute_Monge_basis(const FT* A, Monge_form& monge_form)
+{
+  // only 1st order info.
+  if ( this->deg_monge == 1 ) {  
+    Point_3 orig_monge(0., 0., A[0]);
+    Vector_3  normal(-A[1], -A[2], 1.);
+    FT norm2 = normal * normal;
+    normal = normal / Lsqrt(norm2);
+    monge_form.origin() = L2D_converter(
+      (this->translate_p0.inverse() * 
+       this->change_world2fitting.inverse()) (orig_monge) );
+    monge_form.normal_direction() = L2D_converter(this->change_world2fitting.inverse()(normal));
+  }
+  // else (deg_monge >= 2) then 2nd order info are computed
+  else {
+  //bi-index to uni-index conversion : A(i,j)=A[(i+j)(i+j+1)/2+j]
+  Point_3 orig_monge(0., 0., A[0]);
+  //normal = Xu crossprod Xv
+  Vector_3 Xu(1.,0.,A[1]), Xv(0.,1.,A[2]), normal(-A[1], -A[2], 1.);
+  FT norm2 = normal * normal;
+  normal = normal / Lsqrt(norm2);
+
+  //Surface in fitting_basis : X(u,v)=(u,v,J_A(u,v))
+  //in the basis Xu=(1,0,A[1]), Xv=(0,1,A[2]), Weingarten=-I^{-1}II
+  //first fond form I=(e,f,f,g)
+  //                 =(Xu.Xu, Xu.Xv, Xu.Xv, Xv.Xv)
+  //second fond form II=(l,m,m,n)/norm2^(1/2)
+  //                   =(n.Xuu, n.Xuv, n.Xuv, n.Xvv)
+  //ppal curv are the opposite of the eigenvalues of Weingarten or the
+  //  eigenvalues of weingarten = -Weingarten = I^{-1}II
+  typedef typename CGAL::Linear_algebraCd<FT>::Matrix Matrix;
+
+  FT e = 1+A[1]*A[1], f = A[1]*A[2], g = 1+A[2]*A[2],
+    l = A[3], m = A[4], n = A[5];
+  Matrix  weingarten(2,2,0.);
+  weingarten(0,0) = (g*l-f*m)/ (Lsqrt(norm2)*norm2);
+  weingarten(0,1) = (g*m-f*n)/ (Lsqrt(norm2)*norm2);
+  weingarten(1,0) = (e*m-f*l)/ (Lsqrt(norm2)*norm2);
+  weingarten(1,1) = (e*n-f*m)/ (Lsqrt(norm2)*norm2);
+  // Y, Z are normalized GramSchmidt of Xu, Xv
+  // Xu->Y=Xu/||Xu||;
+  // Xv->Z=Xv-(Xu.Xv)Xu/||Xu||^2;
+  // Z-> Z/||Z||
+  Vector_3 Y, Z;
+  FT normXu = Lsqrt( Xu*Xu );
+  Y = Xu / normXu;
+  FT XudotXv = Xu * Xv;
+  Z = Xv - XudotXv * Xu / (normXu*normXu);
+  FT normZ = Lsqrt( Z*Z );
+  Z = Z / normZ;
+  Matrix change_XuXv2YZ(2,2,0.);
+  change_XuXv2YZ(0,0) = 1 / normXu;
+  change_XuXv2YZ(0,1) = -XudotXv / (normXu * normXu * normZ);
+  change_XuXv2YZ(1,0) = 0;
+  change_XuXv2YZ(1,1) = 1 / normZ;
+  FT det = 0.;
+  Matrix inv = CGAL::Linear_algebraCd<FT>::inverse ( change_XuXv2YZ, det );
+  //in the new orthonormal basis (Y,Z) of the tangent plane :
+  weingarten = inv *(1/det) * weingarten * change_XuXv2YZ;
+  
+  // diagonalization of weingarten
+  CGAL::cpp11::array<FT,3> W = {{ weingarten(0,0), weingarten(1,0), weingarten(1,1) }};
+  CGAL::cpp11::array<FT,2> eval = {{ 0., 0. }};
+  CGAL::cpp11::array<FT,4> evec = {{ 0., 0., 0., 0. }};
+
+  //eval in increasing order
+  CGAL::Default_diagonalize_traits<FT,2>::diagonalize_selfadjoint_covariance_matrix
+    (W, eval, evec);
+
+  Vector_3 d_max = evec[2]*Y + evec[3]*Z,
+    d_min = evec[0]*Y + evec[1]*Z;
+
+  switch_to_direct_orientation(d_max, d_min, normal);
+  Aff_transformation change_basis (d_max[0], d_max[1], d_max[2], 
+				   d_min[0], d_min[1], d_min[2],
+				   normal[0], normal[1], normal[2]);
+  this->change_fitting2monge = change_basis;
+
+  //store the monge basis origin and vectors with their world coord
+  //store ppal curv
+  monge_form.origin() = L2D_converter(
+    (this->translate_p0.inverse() * 
+     this->change_world2fitting.inverse()) (orig_monge ));
+  monge_form.maximal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_max));
+  monge_form.minimal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_min));
+  monge_form.normal_direction()  = L2D_converter(this->change_world2fitting.inverse()(normal));
+  monge_form.coefficients()[0] = L2D_NTconverter()(eval[1]);
+  monge_form.coefficients()[1] = L2D_NTconverter()(eval[0]);
+  }
+  //end else
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+compute_Monge_coefficients(FT* A, std::size_t dprime, 
+			   Monge_form& monge_form)
+{
+  //One has the equation w=J_A(u,v) of the fitted surface S 
+  // in the fitting_basis
+  //Substituing (u,v,w)=change_fitting2monge^{-1}(x,y,z)
+  //One has the equation f(x,y,z)=0 on this surface S in the monge
+  //  basis
+  //The monge form of the surface at the origin is the bivariate fct
+  //   g(x,y) s.t. f(x,y,g(x,y))=0
+  //voir les calculs Maple dans monge.mws
+  //Notations are f123= d^3f/dxdydz
+  //              g(x,y)=sum (gij x^i y^j/ i!j!) with 
+  //              g00=g10=g01=g11=0, g20=kmax, g02=kmin
+  //
+  //g(x,y)= 1/2*(k1x^2 +k2y^2) 
+  //       +1/6*(b0x^3 +3b1x^2y +3b2xy^2 +b3y^3) 
+  //       +1/24*(c0x^4 +4c1x^3y +6c2x^2y^2 +4c3xy^3 +c4y^4)
+  //       +...
+  // p stores change_fitting2monge^{-1}=change_fitting2monge^{T}
+  FT p[3][3];
+  p[0][0] = this->change_fitting2monge.m(0,0);
+  p[1][0] = this->change_fitting2monge.m(0,1);
+  p[2][0] = this->change_fitting2monge.m(0,2);
+  p[0][1] = this->change_fitting2monge.m(1,0);
+  p[1][1] = this->change_fitting2monge.m(1,1);
+  p[2][1] = this->change_fitting2monge.m(1,2);
+  p[0][2] = this->change_fitting2monge.m(2,0);
+  p[1][2] = this->change_fitting2monge.m(2,1);
+  p[2][2] = this->change_fitting2monge.m(2,2);
+
+  // formula are designed for w=sum( Aij ui vj), but we have J_A = sum( Aij/i!j! ui vj)
+  for (int k=0; k <= this->deg; k++) for (int i=0; i<=k; i++)
+    A[k*(k+1)/2+i] /= fact(k-i)*fact(i);//this is A(k-i;i)
+
+/*   //debug */
+/*   std::cout << "coeff of A" << std::endl */
+/* 	    << A[0] << " "<< A[1] << " "<< A[2] << std::endl */
+/* 	    << A[3] << " "<< A[4] << " "<< A[5] << std::endl */
+/* 	    << A[6] << " "<< A[7] << " "<< A[8] << " "<< A[9]<< std::endl */
+/* 	    << A[10] << " "<< A[11] << " "<< A[12] << " "<< A[13]<< " " << A[14] << std::endl; */
+
+
+
+  //     note f1 = f2 = f12 = 0 
+  //     FT f1 = A[1] * p[0][0] + A[2] * p[1][0] - p[2][0];
+  //     FT f2 = A[2] * p[1][1] + A[1] * p[0][1] - p[2][1];
+  //     FT f12 = 
+  //     2 * A[3] * p[0][0] * p[0][1]
+  //     + 2 * A[5] * p[1][0] * p[1][1]
+  //     + A[4] * p[0][1] * p[1][0] 
+  //     + A[4] * p[0][0] * p[1][1];
+  //         -f11 / f3 = kmax
+  //         -f22 / f3 = kmin 
+ 
+  FT f3 = A[1] * p[0][2] + A[2] * p[1][2] - p[2][2];
+  FT f11 =
+    2 * A[4] * p[0][0] * p[1][0]
+    + 2 * A[5] * p[1][0] * p[1][0]
+    + 2 * A[3] * p[0][0] * p[0][0];
+  FT f13 =
+    A[4] * p[0][0] * p[1][2]
+    + A[4] * p[0][2] * p[1][0]
+    + 2 * A[5] * p[1][0] * p[1][2]
+    + 2 * A[3] * p[0][0] * p[0][2];
+  FT f22 =
+    2 * A[4] * p[0][1] * p[1][1]
+    + 2 * A[5] * p[1][1] * p[1][1]
+    + 2 * A[3] * p[0][1] * p[0][1];
+  FT f23 =
+    A[4] * p[0][1] * p[1][2]
+    + 2 * A[5] * p[1][1] * p[1][2]
+    + A[4] * p[0][2] * p[1][1]
+    + 2 * A[3] * p[0][1] * p[0][2];
+  FT f33 =
+    2 * A[5] * p[1][2] * p[1][2]
+    + 2 * A[3] * p[0][2] * p[0][2]
+    + 2 * A[4] * p[0][2] * p[1][2];
+  FT f111 =
+    6 * A[8] * p[0][0] * p[1][0] * p[1][0]
+    + 6 * A[7] * p[0][0] * p[0][0] * p[1][0]
+    + 6 * A[6] * p[0][0] * p[0][0] * p[0][0]
+    + 6 * A[9] * p[1][0] * p[1][0] * p[1][0];
+  FT f222 =
+    6 * A[7] * p[0][1] * p[0][1] * p[1][1]
+    + 6 * A[8] * p[0][1] * p[1][1] * p[1][1]
+    + 6 * A[9] * p[1][1] * p[1][1] * p[1][1]
+    + 6 * A[6] * p[0][1] * p[0][1] * p[0][1];
+  FT f112 =
+    2 * A[7] * p[0][0] * p[0][0] * p[1][1]
+    + 6 * A[6] * p[0][0] * p[0][0] * p[0][1]
+    + 2 * A[8] * p[0][1] * p[1][0] * p[1][0]
+    + 4 * A[8] * p[0][0] * p[1][0] * p[1][1]
+    + 6 * A[9] * p[1][0] * p[1][0] * p[1][1]
+    + 4 * A[7] * p[0][0] * p[0][1] * p[1][0];
+  FT f122 =
+    4 * A[8] * p[0][1] * p[1][0] * p[1][1]
+    + 2 * A[8] * p[0][0] * p[1][1] * p[1][1]
+    + 6 * A[6] * p[0][0] * p[0][1] * p[0][1]
+    + 2 * A[7] * p[0][1] * p[0][1] * p[1][0]
+    + 4 * A[7] * p[0][0] * p[0][1] * p[1][1]
+    + 6 * A[9] * p[1][0] * p[1][1] * p[1][1];
+  FT f113 = 
+    6*A[6]*p[0][0]*p[0][0]*p[0][2]
+    +6*A[9]*p[1][0]*p[1][0]*p[1][2]
+    +2*A[7]*p[0][0]*p[0][0]*p[1][2]
+    +2*A[8]*p[0][2]*p[1][0]*p[1][0]
+    +4*A[7]*p[0][0]*p[0][2]*p[1][0]
+    +4*A[8]*p[0][0]*p[1][0]*p[1][2];
+  FT f223 = 
+    2*A[8]*p[0][2]*p[1][1]*p[1][1]
+    +6*A[6]*p[0][1]*p[0][1]*p[0][2]
+    +6*A[9]*p[1][1]*p[1][1]*p[1][2]
+    +2*A[7]*p[0][1]*p[0][1]*p[1][2]
+    +4*A[7]*p[0][1]*p[0][2]*p[1][1]
+    +4*A[8]*p[0][1]*p[1][1]*p[1][2];
+  FT f123 = 
+    2*A[8]*p[0][2]*p[1][0]*p[1][1]
+    +2*A[7]*p[0][0]*p[0][1]*p[1][2]
+    +2*A[7]*p[0][0]*p[0][2]*p[1][1]
+    +6*A[9]*p[1][0]*p[1][1]*p[1][2]
+    +2*A[7]*p[0][1]*p[0][2]*p[1][0]
+    +6*A[6]*p[0][0]*p[0][1]*p[0][2]
+    +2*A[8]*p[0][0]*p[1][1]*p[1][2]
+    +2*A[8]*p[0][1]*p[1][0]*p[1][2];
+
+  FT b0 = 1/(f3*f3)*(-f111*f3+3*f13*f11);
+  FT b1 = 1/(f3*f3)*(-f112*f3+f23*f11);
+  FT b2 = 1/(f3*f3)*(-f122*f3+f13*f22);
+  FT b3 = -1/(f3*f3)*(f222*f3-3*f23*f22);
+  
+  monge_form.coefficients()[2] = L2D_NTconverter()(b0);
+  monge_form.coefficients()[3] = L2D_NTconverter()(b1);
+  monge_form.coefficients()[4] = L2D_NTconverter()(b2);
+  monge_form.coefficients()[5] = L2D_NTconverter()(b3);
+
+  if ( dprime == 4 )
+    {
+      FT f1111 = 
+	24*A[13]*p[0][0]*p[1][0]*p[1][0]*p[1][0]
+	+24*A[12]*p[0][0]*p[0][0]*p[1][0]*p[1][0]
+	+24*A[11]*p[0][0]*p[0][0]*p[0][0]*p[1][0]
+	+24*A[14]*p[1][0]*p[1][0]*p[1][0]*p[1][0]
+	+24*A[10]*p[0][0]*p[0][0]*p[0][0]*p[0][0];
+      FT f1112 = 
+	6*A[13]*p[0][1]*p[1][0]*p[1][0]*p[1][0]
+	+18*A[13]*p[0][0]*p[1][0]*p[1][0]*p[1][1]
+	+24*A[10]*p[0][0]*p[0][0]*p[0][0]*p[0][1]
+	+12*A[12]*p[0][0]*p[0][1]*p[1][0]*p[1][0]
+	+18*A[11]*p[0][0]*p[0][0]*p[0][1]*p[1][0]
+	+24*A[14]*p[1][0]*p[1][0]*p[1][0]*p[1][1]
+	+6*A[11]*p[0][0]*p[0][0]*p[0][0]*p[1][1]
+	+12*A[12]*p[0][0]*p[0][0]*p[1][0]*p[1][1];
+      FT f1122 = 
+	12*A[11]*p[0][0]*p[0][0]*p[0][1]*p[1][1]
+	+12*A[13]*p[0][0]*p[1][0]*p[1][1]*p[1][1]
+	+12*A[13]*p[0][1]*p[1][0]*p[1][0]*p[1][1]
+	+16*A[12]*p[0][0]*p[0][1]*p[1][0]*p[1][1]
+	+12*A[11]*p[0][0]*p[0][1]*p[0][1]*p[1][0]
+	+24*A[10]*p[0][0]*p[0][0]*p[0][1]*p[0][1]
+	+4*A[12]*p[0][1]*p[0][1]*p[1][0]*p[1][0]
+	+4*A[12]*p[0][0]*p[0][0]*p[1][1]*p[1][1]
+	+24*A[14]*p[1][0]*p[1][0]*p[1][1]*p[1][1];
+      FT f1222 = 
+	6*A[13]*p[0][0]*p[1][1]*p[1][1]*p[1][1]
+	+24*A[10]*p[0][0]*p[0][1]*p[0][1]*p[0][1]
+	+24*A[14]*p[1][0]*p[1][1]*p[1][1]*p[1][1]
+	+6*A[11]*p[0][1]*p[0][1]*p[0][1]*p[1][0]
+	+18*A[11]*p[0][0]*p[0][1]*p[0][1]*p[1][1]
+	+12*A[12]*p[0][0]*p[0][1]*p[1][1]*p[1][1]
+	+12*A[12]*p[0][1]*p[0][1]*p[1][0]*p[1][1]
+	+18*A[13]*p[0][1]*p[1][0]*p[1][1]*p[1][1];
+      FT f2222 =
+	24*A[13]*p[0][1]*p[1][1]*p[1][1]*p[1][1]
+	+24*A[11]*p[0][1]*p[0][1]*p[0][1]*p[1][1]
+	+24*A[12]*p[0][1]*p[0][1]*p[1][1]*p[1][1]
+	+24*A[10]*p[0][1]*p[0][1]*p[0][1]*p[0][1]
+	+24*A[14]*p[1][1]*p[1][1]*p[1][1]*p[1][1];
+
+      FT c0 =
+	-1/(f3*f3*f3)*(f1111*(f3*f3)-4*f13*f3*f111+12*f13*f13*f11-6*f113*f3*f11+3*f33*f11*f11);
+      FT c1 =
+	1/(f3*f3*f3)*(f23*f3*f111+3*f3*f123*f11+3*f13*f3*f112-f1112*(f3*f3)-6*f13*f23*f11); 
+      FT c2 =
+	1/(f3*f3*f3)*(-f33*f22*f11+f113*f3*f22+2*f13*f3*f122-2*f13*f13*f22+f223*f3*f11+2*f23*f3*f112-2*f23*f23*f11-f1122*(f3*f3)); 
+      FT c3 =
+	1/(f3*f3*f3)*(-f1222*(f3*f3)-6*f13*f23*f22+3*f123*f3*f22+f13*f3*f222+3*f23*f3*f122); 
+      FT c4 =
+	-1/(f3*f3*f3)*(f2222*(f3*f3)+3*f33*f22*f22-6*f223*f3*f22-4*f23*f3*f222+12*f23*f23*f22) ; 
+      
+      monge_form.coefficients()[6] = L2D_NTconverter()(c0);
+      monge_form.coefficients()[7] = L2D_NTconverter()(c1);
+      monge_form.coefficients()[8] = L2D_NTconverter()(c2);
+      monge_form.coefficients()[9] = L2D_NTconverter()(c3);
+      monge_form.coefficients()[10] = L2D_NTconverter()(c4);
+    }
+}
+
+template < class DataKernel, class LocalKernel, class SvdTraits>  
+void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
+switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
+			    const Vector_3& v3) 
+{
+  if (CGAL::orientation (v1, v2, v3) == CGAL::NEGATIVE)
+    v1 = -v1;
+}
+
+
+// template < class DataKernel, class LocalKernel, class SvdTraits>  
+// inline
+// std::ostream&
+// operator<<(std::ostream& out_stream, 
+// 	  const typename Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::Monge_form& monge)
+// {
+//   monge.dump_verbose(out_stream);
+//   return out_stream;
+// }
+
+} //namespace CGAL
+
+#endif //CGAL_MONGE_VIA_JET_FITTING_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Mpzf.h b/3rdparty/CGAL-4.8/include/CGAL/Mpzf.h
new file mode 100644
index 0000000..55ceb4e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Mpzf.h
@@ -0,0 +1,1161 @@
+// Copyright (c) 2013
+// INRIA Saclay - Ile de France (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)	:  Marc Glisse
+
+#ifndef CGAL_MPZF_H
+#define CGAL_MPZF_H
+#include <cstdlib>
+#include <algorithm>
+#include <climits>
+#include <vector>
+#include <math.h>
+#include <cmath>
+#include <iostream>
+#include <stdexcept>
+#ifdef CGAL_USE_GMPXX
+# include <CGAL/gmpxx.h>
+#else
+# include <CGAL/gmp.h>
+#endif
+#include <CGAL/enum.h>
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Gmpz.h>
+#include <CGAL/Gmpq.h>
+//#include <CGAL/Gmpzf.h>
+
+#include <CGAL/Coercion_traits.h>
+
+// The following is currently assumed in several places. I hope I am not
+// making too many other assumptions.
+// * limbs are 64 bits
+// * if using gcc, sizeof(long long)==8
+// * mpn_neg(_n) exists
+// * IEEE double
+// * not too fancy endianness
+#if !defined(CGAL_DO_NOT_USE_MPZF) \
+    && __GNU_MP_VERSION * 10 + __GNU_MP_VERSION_MINOR >= 43 \
+    && GMP_NUMB_BITS == 64
+#define CGAL_HAS_MPZF 1
+
+// GMP-4.3.* has a different name for mpn_neg.
+#ifndef mpn_neg
+#define mpn_neg mpn_neg_n
+#endif
+// GMP-4.3.0 is missing mpn_sqr.
+#ifndef mpn_sqr
+#define mpn_sqr(dest,a,n) mpn_mul_n(dest,a,a,n)
+#endif
+// GMP before 5.0 doesn't provide mpn_copyi.
+#ifndef mpn_copyi
+#define mpn_copyi(dst, src, siz) std::copy((src), (src)+(siz), (dst))
+#endif
+
+#include <boost/cstdint.hpp>
+
+#ifdef _MSC_VER
+#include <intrin.h>
+#pragma intrinsic(_BitScanForward64)
+#pragma intrinsic(_BitScanReverse64)
+#endif
+
+#ifdef __xlC__
+#include <builtins.h>
+#endif
+
+#include <CGAL/assertions.h>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/version.hpp>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4146 4244 4267 4800)
+     // warning on - applied on unsigned number
+     // conversion with loss of data
+     // conversion with loss of data
+     // int to bool performance
+#endif
+
+
+/*
+#ifdef CGAL_MPZF_NO_USE_CACHE
+# ifdef CGAL_MPZF_USE_CACHE
+#  undef CGAL_MPZF_USE_CACHE
+# endif
+#else
+# if !defined(CGAL_MPZF_USE_CACHE) \
+     && defined(CGAL_HAS_THREADS) \
+     && !defined(CGAL_I_PROMISE_I_WONT_USE_MANY_THREADS)
+#  define CGAL_MPZF_USE_CACHE 1
+# endif
+#endif
+*/
+#define CGAL_MPZF_USE_CACHE 1
+
+// On a dataset provided by Andreas, replacing Gmpq with this type in
+// Epick reduced the running time of the construction of a Delaunay
+// triangulation by a factor larger than 6
+
+#if !defined(CGAL_HAS_THREADS)
+#define CGAL_MPZF_THREAD_LOCAL
+#define CGAL_MPZF_TLS
+#elif defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
+#define CGAL_MPZF_THREAD_LOCAL thread_local
+#define CGAL_MPZF_TLS thread_local
+#elif defined(_MSC_VER)
+#define CGAL_MPZF_THREAD_LOCAL __declspec(thread)
+#define CGAL_MPZF_TLS
+#else
+#define CGAL_MPZF_THREAD_LOCAL __thread
+#define CGAL_MPZF_TLS
+// Too bad for the others
+#endif
+namespace CGAL {
+namespace Mpzf_impl {
+// Warning: these pools aren't generic at all!
+
+// Not thread-safe
+template <class T, class = void> struct pool1 {
+  static T pop() { T ret = data.back(); data.pop_back(); return ret; }
+  static void push(T t) { data.push_back(t); }
+  static bool empty() { return data.empty(); }
+  static const int extra = 0;
+  private:
+  // thread_local would be fine, but not __declspec(thread) and for most
+  // compilers not __thread, since data is not POD.
+  static std::vector<T> data;
+};
+template <class T, class D> std::vector<T> pool1<T,D>::data;
+
+// Use an intrusive single-linked list instead (allocate one more limb and use
+// it to store the pointer to next), the difference isn't that noticable (still
+// the list wins).  Neither is thread-safe (both can be with threadlocal, and
+// the list can be with an atomic compare-exchange (never tried)).  With gcc,
+// TLS has a large effect on classes with constructor/destructor, but is free
+// for a simple pointer.  The slowdown is because of PR55812.
+
+// Leaks at thread destruction
+template <class T, class = void> struct pool2 {
+  static T pop() { T ret = data(); data() = ptr(data()); return ret; }
+  static void push(T t) { ptr(t) = data(); data() = t; }
+  static bool empty() { return data() == 0; }
+  static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t
+  private:
+  CGAL_static_assertion(sizeof(T) >= sizeof(T*));
+  static T& data () {
+    static CGAL_MPZF_TLS T data_ = 0;
+    return data_;
+  }
+  static T& ptr(T t) { t -= extra+1; return *reinterpret_cast<T*>(t); }
+};
+
+#if defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
+template <class T, class = void> struct pool3 {
+  static T pop() { T ret = data(); data() = ptr(data()); return ret; }
+  static void push(T t) { ptr(t) = data(); data() = t; }
+  static bool empty() { return data() == 0; }
+  static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t
+  private:
+  CGAL_static_assertion(sizeof(T) >= sizeof(T*));
+  struct cleaner {
+    T data_ = 0;
+    ~cleaner(){
+      // Deallocate everything. As an alternative, we could store it in a
+      // global location, for re-use by a later thread.
+      while (!empty())
+	delete[] (pop() - (extra + 1));
+    }
+  };
+  static T& data () {
+    static thread_local cleaner obj;
+    return obj.data_;
+  }
+  static T& ptr(T t) { t -= extra+1; return *reinterpret_cast<T*>(t); }
+};
+#endif
+
+// No caching
+template <class T, class = void> struct no_pool {
+  static T pop() { throw "Shouldn't be here!"; }
+  static void push(T t) { delete [] (t - (extra+1)); }
+  static bool empty() { return true; }
+  static const int extra = 0;
+};
+
+// Only used with an argument known not to be 0.
+inline int ctz (boost::uint64_t x) {
+#if defined(_MSC_VER)
+  unsigned long ret;
+  _BitScanForward64(&ret, x);
+  return (int)ret;
+#elif defined(__xlC__)
+  return __cnttz8 (x);
+#else
+  // Assume long long is 64 bits
+  return __builtin_ctzll (x);
+#endif
+}
+inline int clz (boost::uint64_t x) {
+#if defined(_MSC_VER)
+  unsigned long ret;
+  _BitScanReverse64(&ret, x);
+  return 63 - (int)ret;
+#elif defined(__xlC__)
+  // Macro supposedly not defined on z/OS.
+  return __cntlz8 (x);
+#else
+  return __builtin_clzll (x);
+#endif
+}
+
+// In C++11, std::fill_n returns a pointer to the end, but in C++03,
+// it returns void.
+inline mp_limb_t* fill_n_ptr(mp_limb_t* p, int n, int c) {
+#if __cplusplus >= 201103L
+  return std::fill_n (p, n, c);
+#else
+  mp_limb_t* q = p + n;
+  std::fill (p, q, c);
+  //std::fill_n (p, n, c);
+  //memset (p, sizeof(mp_limb_t)*n, c);
+  return q;
+#endif
+}
+} // namespace Mpzf_impl
+
+#undef CGAL_MPZF_THREAD_LOCAL
+#undef CGAL_MPZF_TLS
+
+// TODO:
+// * make data==0 a valid state for number 0. Incompatible with the cache. I
+//   tried, and it doesn't seem to help (may even hurt a bit).
+struct Mpzf {
+  private:
+#ifdef CGAL_MPZF_USE_CACHE
+  // More experiments to determine the best value would be good. It likely
+  // depends on the usage. Note that pool2 is fast enough that a conditional
+  // cache slows it down. A purely static cache (crash if it isn't large
+  // enough) still wins by about 11% on the Delaunay_3 construction, but is
+  // more complicated to handle.
+  // Evaluating a polynomial in double will never require more than roughly
+  // (2100*degree) bits, or (33*degree) mp_limb_t, which is very small. I
+  // checked by including an array of 150 limbs in every Mpzf (that's where
+  // the 11% number comes from).
+  // BONUS: doing that is thread-safe!
+  static const unsigned int cache_size = 8;
+#endif
+//#if !defined(CGAL_HAS_THREADS) || defined(CGAL_I_PROMISE_I_WONT_USE_MANY_THREADS)
+//  typedef Mpzf_impl::pool2<mp_limb_t*,Mpzf> pool;
+//#elif defined(CGAL_CAN_USE_CXX11_THREAD_LOCAL)
+//  typedef Mpzf_impl::pool3<mp_limb_t*,Mpzf> pool;
+//#else
+  typedef Mpzf_impl::no_pool<mp_limb_t*,Mpzf> pool;
+//#endif
+
+  mp_limb_t* data_; /* data_[0] is never 0 (except possibly for 0). */
+  inline mp_limb_t*& data() { return data_; };
+  inline mp_limb_t const* data() const { return data_; };
+
+#ifdef CGAL_MPZF_USE_CACHE
+  mp_limb_t cache[cache_size + 1];
+#endif
+  int size; /* Number of relevant limbs in data_. */
+  int exp; /* The number is data_ (an integer) * 2 ^ (64 * exp). */
+
+  struct allocate{};
+  struct noalloc{};
+
+  void init(unsigned mini=2){
+#ifdef CGAL_MPZF_USE_CACHE
+    if (mini <= cache_size) {
+      cache[0] = cache_size;
+      data() = cache + 1;
+      return;
+    }
+#endif
+    if(!pool::empty()){
+      data() = pool::pop();
+      if(data()[-1] >= mini) return; // TODO: when mini==2, no need to check
+      delete[] (data() - (pool::extra+1)); // too small, useless
+    }
+    if(mini<2) mini=2;
+    data() = (new mp_limb_t[mini+(pool::extra+1)]) + (pool::extra+1);
+    data()[-1] = mini;
+  }
+  void clear(){
+    while(*--data()==0); // in case we skipped final zeroes
+#ifdef CGAL_MPZF_USE_CACHE
+    if (data() == cache) return;
+#endif
+    ++data();
+    pool::push(data());
+  }
+
+  Mpzf(noalloc){}
+  Mpzf(allocate,int i) { init(i); }
+
+  public:
+
+  static void clear_pool () {
+    while (!pool::empty())
+      delete[] (pool::pop() - (pool::extra + 1));
+  }
+
+  ~Mpzf(){
+    clear();
+  }
+  Mpzf(): size(0), exp(0) {
+    init();
+  }
+  Mpzf& operator=(Mpzf const& x){
+    unsigned asize=std::abs(x.size);
+    if(asize==0) { exp=0; size=0; return *this; }
+    if(this==&x) return *this;
+    while(*--data()==0); // factor that code somewhere?
+    if(*data()<asize){
+#ifdef CGAL_MPZF_USE_CACHE
+      if (data() != cache)
+#endif
+	delete[] (data() - pool::extra);
+      init(asize);
+    } else ++data();
+    size=x.size;
+    exp=x.exp;
+    mpn_copyi(data(),x.data(),asize);
+    return *this;
+  }
+  Mpzf(Mpzf const& x){
+    int asize=std::abs(x.size);
+    init(asize);
+    size=x.size;
+    exp=x.exp;
+    if(size!=0) mpn_copyi(data(),x.data(),asize);
+  }
+#if !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) \
+    && !defined(CGAL_MPZF_USE_CACHE)
+  Mpzf(Mpzf&& x):data_(x.data()),size(x.size),exp(x.exp){
+    x.init(); // yes, that's a shame...
+    x.size = 0;
+    x.exp = 0;
+  }
+  Mpzf& operator=(Mpzf&& x){
+    std::swap(size,x.size);
+    exp = x.exp;
+    std::swap(data(),x.data());
+    return *this;
+  }
+  friend Mpzf operator-(Mpzf&& x){
+    Mpzf ret = std::move(x);
+    ret.size = -ret.size;
+    return ret;
+  }
+#endif
+  Mpzf(int i) : exp(0) {
+    // assume that int is smaller than mp_limb_t
+    init();
+    if      (i == 0)    { size = 0; }
+    else if (i >  0)    { size = 1; data()[0] = i; }
+    else /* (i <  0) */ { size =-1; data()[0] = -(mp_limb_t)i; }
+    // cast to mp_limb_t because -INT_MIN is undefined
+  }
+  Mpzf(unsigned int i) : exp(0) {
+    // assume that int is smaller than mp_limb_t
+    init();
+    if      (i == 0)    { size = 0; }
+    else /* (i >  0) */ { size = 1; data()[0] = i; }
+  }
+  Mpzf(long i) : exp(0) {
+    // assume that long is smaller than mp_limb_t
+    init();
+    if      (i == 0)    { size = 0; }
+    else if (i >  0)    { size = 1; data()[0] = i; }
+    else /* (i <  0) */ { size =-1; data()[0] = -(mp_limb_t)i; }
+    // cast to mp_limb_t because -LONG_MIN is undefined
+  }
+  Mpzf(unsigned long i) : exp(0) {
+    // assume that long is smaller than mp_limb_t
+    init();
+    if      (i == 0)    { size = 0; }
+    else /* (i >  0) */ { size = 1; data()[0] = i; }
+  }
+  Mpzf(double d){
+    init();
+    using boost::uint64_t;
+    union {
+#ifdef CGAL_LITTLE_ENDIAN
+      struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s;
+#else /* CGAL_BIG_ENDIAN */
+      //WARNING: untested!
+      struct { uint64_t sig:1; uint64_t exp:11; uint64_t man:52; } s;
+#endif
+      double d;
+    } u;
+    u.d = d;
+    uint64_t m;
+    uint64_t dexp = u.s.exp;
+    CGAL_assertion_msg(dexp != 2047, "Creating an Mpzf from infinity or NaN.");
+    if (dexp == 0) {
+      if (d == 0) { size=0; exp=0; return; }
+      else { // denormal number
+	m = u.s.man;
+	++dexp;
+      }
+    } else {
+      m = (1LL<<52) | u.s.man;
+    }
+    int e1 = (int)dexp+13;
+    // FIXME: make it more general! But not slower...
+    CGAL_static_assertion(GMP_NUMB_BITS == 64);
+    int e2 = e1 % 64;
+    exp = e1 / 64 - 17;
+    // 52+1023+13==17*64 ?
+#if 0
+    // This seems very slightly faster
+    if(Mpzf_impl::ctz(m)+e2>=64){
+      data()[0] = m >> (64-e2);
+      size = 1;
+      ++exp;
+    }else{
+      data()[0] = m << e2;
+      if(e2>11){ // Wrong test for denormals
+	data()[1] = m >> (64-e2);
+	size = 2;
+      } else {
+	size = 1;
+      }
+    }
+#else
+    mp_limb_t d0 = (m << e2) & GMP_NUMB_MASK;
+    mp_limb_t d1 = 0;
+    if (e2 != 0) // shifting by 64 is UB
+      d1 = m >> (GMP_NUMB_BITS - e2);
+    if (d0 == 0) {
+      data()[0] = d1;
+      size = 1;
+      ++exp;
+    }
+    else {
+      data()[0] = d0;
+      if (d1 == 0) {
+	size = 1;
+      }
+      else {
+	data()[1] = d1;
+	size = 2;
+      }
+    }
+#endif
+    if(u.s.sig) size=-size;
+    //CGAL_assertion(to_double()==IA_force_to_double(d));
+  }
+
+#ifdef CGAL_USE_GMPXX
+  Mpzf(mpz_class const&z){
+    init_from_mpz_t(z.get_mpz_t());
+  }
+#endif
+  Mpzf(Gmpz const&z){
+    init_from_mpz_t(z.mpz());
+  }
+  void init_from_mpz_t(mpz_t const z){
+    exp=mpz_scan1(z,0)/GMP_NUMB_BITS;
+    size=mpz_size(z)-exp;
+    init(size);
+    mpn_copyi(data(),z->_mp_d+exp,size);
+  }
+
+#if 0
+  // For debug purposes only
+  void print()const{
+    //std::cout << "size: " << size << std::endl;
+    if(size==0) { std::cout << "zero\n"; return; }
+    if(size<0) std::cout << "- ";
+    int asize = std::abs(size);
+    std::cout << std::hex;
+    while(--asize>=0) { std::cout << data()[asize] << ' '; }
+    std::cout << std::dec << "exp " << exp << ' ';
+    std::cout << std::dec << "size " << size << ' ';
+    asize = std::abs(size);
+    std::cout << "double: " << std::ldexp((double)data()[asize-1],64*(exp+asize-1))*((size<0)?-1:1) << '\n';
+  }
+#endif
+
+  friend int Mpzf_abscmp(Mpzf const&a, Mpzf const&b){
+    int asize=std::abs(a.size);
+    int bsize=std::abs(b.size);
+    // size==0 should mean exp==-infinity, like with double.
+    // Since it doesn't, test for it explicitly.
+    if (bsize == 0) return asize;
+    if (asize == 0) return -1;
+    int ah=asize+a.exp;
+    int bh=bsize+b.exp;
+    if(ah!=bh) return ah-bh;
+    int minsize=(std::min)(asize,bsize);
+    const mp_limb_t* adata=a.data()+(asize-1);
+    const mp_limb_t* bdata=b.data()+(bsize-1);
+    for(int i=0;i<minsize;++i,--adata,--bdata){
+      const mp_limb_t aa=*adata;
+      const mp_limb_t bb=*bdata;
+      if(aa!=bb) return (aa<bb)?-1:1;
+    }
+    return asize-bsize; // this assumes that we get rid of trailing zeros...
+  }
+  friend int Mpzf_cmp (Mpzf const&a, Mpzf const&b){
+    if ((a.size ^ b.size) < 0) return (a.size < 0) ? -1 : 1;
+    int res = Mpzf_abscmp(a, b);
+    return (a.size < 0) ? -res : res;
+  }
+  friend bool operator<(Mpzf const&a, Mpzf const&b){
+    if((a.size ^ b.size) < 0) return a.size < 0;
+    return ((a.size < 0) ? Mpzf_abscmp(b, a) : Mpzf_abscmp(a, b)) < 0;
+  }
+  friend bool operator>(Mpzf const&a, Mpzf const&b){
+    return b<a;
+  }
+  friend bool operator>=(Mpzf const&a, Mpzf const&b){
+    return !(a<b);
+  }
+  friend bool operator<=(Mpzf const&a, Mpzf const&b){
+    return !(a>b);
+  }
+  friend bool operator==(Mpzf const&a, Mpzf const&b){
+    if (a.exp != b.exp || a.size != b.size) return false;
+    if (a.size == 0) return true;
+    return mpn_cmp(a.data(), b.data(), std::abs(a.size)) == 0;
+  }
+  friend bool operator!=(Mpzf const&a, Mpzf const&b){
+    return !(a==b);
+  }
+  private:
+  static Mpzf aors(Mpzf const&a, Mpzf const&b, int bsize){
+    Mpzf res=noalloc();
+    if(bsize==0){
+      int size=std::abs(a.size);
+      res.init(size);
+      res.exp=a.exp;
+      res.size=a.size;
+      if(size!=0) mpn_copyi(res.data(),a.data(),size);
+      return res;
+    }
+    int asize=a.size;
+    if(asize==0){
+      int size=std::abs(bsize);
+      res.init(size);
+      res.exp=b.exp;
+      res.size=bsize;
+      mpn_copyi(res.data(),b.data(),size);
+      return res;
+    }
+    if((asize^bsize)>=0){
+      // Addition
+      int absasize=std::abs(asize);
+      int absbsize=std::abs(bsize);
+      const mp_limb_t* adata=a.data();
+      const mp_limb_t* bdata=b.data();
+      int aexp=a.exp;
+      int bexp=b.exp;
+      if(aexp<bexp){ res.exp=a.exp; aexp=0; bexp=b.exp-a.exp; }
+      else { res.exp=b.exp; aexp=a.exp-b.exp; bexp=0; }
+      res.init((std::max)(absasize+aexp,absbsize+bexp)+1);
+      mp_limb_t* rdata=res.data();
+      res.size=0;
+      // TODO: if aexp>0, swap a and b so we don't repeat the code.
+      if(0<bexp){
+	if(absasize<=bexp){ // no overlap
+	  mpn_copyi(rdata, adata, absasize);
+	  rdata+=absasize;
+	  rdata=Mpzf_impl::fill_n_ptr(rdata,bexp-absasize,0);
+	  mpn_copyi(rdata, bdata, absbsize);
+	  res.size=absbsize+bexp;
+	  if(bsize<0) res.size=-res.size;
+	  return res;
+	} else {
+	  mpn_copyi(rdata, adata, bexp);
+	  adata+=bexp;
+	  absasize-=bexp;
+	  rdata+=bexp;
+	  res.size=bexp;
+	}
+      }
+      else if(0<aexp){
+	if(absbsize<=aexp){ // no overlap
+	  mpn_copyi(rdata, bdata, absbsize);
+	  rdata+=absbsize;
+	  rdata=Mpzf_impl::fill_n_ptr(rdata,aexp-absbsize,0);
+	  mpn_copyi(rdata, adata, absasize);
+	  res.size=absasize+aexp;
+	  if(asize<0) res.size=-res.size;
+	  return res;
+	} else {
+	  mpn_copyi(rdata, bdata, aexp);
+	  bdata+=aexp;
+	  absbsize-=aexp;
+	  rdata+=aexp;
+	  res.size=aexp;
+	}
+      }
+      if(absasize>=absbsize){
+	mp_limb_t carry=mpn_add(rdata,adata,absasize,bdata,absbsize);
+	res.size+=absasize;
+	if(carry!=0){
+	  res.size++;
+	  rdata[absasize]=carry;
+	}
+      } else {
+	mp_limb_t carry=mpn_add(rdata,bdata,absbsize,adata,absasize);
+	res.size+=absbsize;
+	if(carry!=0){
+	  res.size++;
+	  rdata[absbsize]=carry;
+	}
+      }
+      // unnecessary if a.exp != b.exp
+      while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
+      if(bsize<0) res.size=-res.size;
+    } else {
+      // Subtraction
+      const Mpzf *x, *y;
+      int xsize=a.size;
+      int ysize=bsize;
+      int cmp=Mpzf_abscmp(a,b);
+      if(cmp==0){ res.init(); res.size=0; res.exp=0; return res; }
+      if(cmp<0) { x=&b; y=&a; std::swap(xsize, ysize); }
+      else { x=&a; y=&b; }
+      int absxsize=std::abs(xsize);
+      int absysize=std::abs(ysize);
+      const mp_limb_t* xdata=x->data();
+      const mp_limb_t* ydata=y->data();
+      int xexp=x->exp;
+      int yexp=y->exp;
+      if(xexp<yexp){ res.exp=xexp; yexp-=xexp; xexp=0; }
+      else { res.exp=yexp; xexp-=yexp; yexp=0; }
+      res.init((std::max)(absxsize+xexp,absysize+yexp)+1);
+      mp_limb_t* rdata=res.data();
+      res.size=0;
+      bool carry1=false;
+      if(0<yexp){ // must have overlap since x is larger
+	mpn_copyi(rdata, xdata, yexp);
+	xdata+=yexp;
+	absxsize-=yexp;
+	rdata+=yexp;
+	res.size=yexp;
+      }
+      else if(0<xexp){
+	if(absysize<=xexp){ // no overlap
+	  mpn_neg(rdata, ydata, absysize); // assert that it returns 1
+	  rdata+=absysize;
+	  rdata=Mpzf_impl::fill_n_ptr(rdata,xexp-absysize,-1);
+	  mpn_sub_1(rdata, xdata, absxsize, 1);
+	  res.size=absxsize+xexp;
+	  if(res.data()[res.size-1]==0) --res.size;
+	  if(xsize<0) res.size=-res.size;
+	  return res;
+	} else {
+	  mpn_neg(rdata, ydata, xexp); // assert that it returns 1
+	  ydata+=xexp;
+	  absysize-=xexp;
+	  rdata+=xexp;
+	  res.size=xexp;
+	  carry1=true; // assumes no trailing zeros
+	}
+      }
+      CGAL_assertion_code( mp_limb_t carry= )
+	mpn_sub(rdata, xdata, absxsize, ydata, absysize);
+      if(carry1)
+	CGAL_assertion_code( carry+= )
+	  mpn_sub_1(rdata, rdata, absxsize, 1);
+      CGAL_assertion(carry==0);
+      res.size+=absxsize;
+      while(/*res.size>0&&*/res.data()[res.size-1]==0) --res.size;
+      while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
+      if(xsize<0) res.size=-res.size;
+    }
+    return res;
+  }
+
+  public:
+  friend Mpzf operator+(Mpzf const&a, Mpzf const&b){
+    return aors(a,b,b.size);
+  }
+
+  friend Mpzf operator-(Mpzf const&a, Mpzf const&b){
+    return aors(a,b,-b.size);
+  }
+
+  friend Mpzf operator*(Mpzf const&a, Mpzf const&b){
+    int asize=std::abs(a.size);
+    int bsize=std::abs(b.size);
+    int siz=asize+bsize;
+    Mpzf res(allocate(),siz);
+    if(asize==0||bsize==0){res.exp=0;res.size=0;return res;}
+    res.exp=a.exp+b.exp;
+    mp_limb_t high;
+    if(asize>=bsize)
+      high = mpn_mul(res.data(),a.data(),asize,b.data(),bsize);
+    else
+      high = mpn_mul(res.data(),b.data(),bsize,a.data(),asize);
+    if(high==0) --siz;
+    if(res.data()[0]==0) { ++res.data(); ++res.exp; --siz; }
+    res.size=((a.size^b.size)>=0)?siz:-siz;
+    return res;
+  }
+
+  friend Mpzf Mpzf_square(Mpzf const&a){
+    int asize=std::abs(a.size);
+    int siz=2*asize;
+    Mpzf res(allocate(),siz);
+    res.exp=2*a.exp;
+    if(asize==0){res.size=0;return res;}
+    mpn_sqr(res.data(),a.data(),asize);
+    mp_limb_t high = res.data()[siz-1];
+    if(high==0) --siz;
+    if(res.data()[0]==0) { ++res.data(); ++res.exp; --siz; }
+    res.size=siz;
+    return res;
+  }
+
+  friend Mpzf operator/(Mpzf const&a, Mpzf const&b){
+    // FIXME: Untested
+    int asize=std::abs(a.size);
+    int bsize=std::abs(b.size);
+    int siz=asize+2-bsize;
+    Mpzf res(allocate(),asize+2);
+    if(bsize==0){throw std::range_error("Division by zero");}
+    if(asize==0){res.exp=0;res.size=0;return res;}
+    res.size=siz;
+    res.exp=a.exp-b.exp;
+    const mp_limb_t *adata = a.data();
+    const mp_limb_t *bdata = b.data();
+    mp_limb_t *qp = res.data();
+    mp_limb_t *rp = qp + siz;
+    if(Mpzf_impl::ctz(adata[0]) >= Mpzf_impl::ctz(bdata[0])){ // Easy case
+      --res.size;
+      mpn_tdiv_qr(qp, rp, 0, adata, asize, bdata, bsize);
+      CGAL_assertion_code(
+	  for (int i=0; i<bsize; ++i)
+	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
+      )
+    }
+    else if(adata[-1]==0){ // We are lucky
+      --adata; ++asize; --res.exp;
+      mpn_tdiv_qr(qp, rp, 0, adata, asize, bdata, bsize);
+      CGAL_assertion_code(
+	  for (int i=0; i<bsize; ++i)
+	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
+      )
+    }
+    else{
+      --res.exp;
+      Mpzf a2(allocate(),asize+1);
+      a2.data()[0]=0;
+      mpn_copyi(a2.data()+1,a.data(),asize);
+      // No need to complete a2, we just want the buffer.
+      //a2.size=(a.size<0)?(a.size-1):(a.size+1);
+      //a2.exp = a.exp-1;
+      mpn_tdiv_qr(qp, rp, 0, a2.data(), asize+1, bdata, bsize);
+      CGAL_assertion_code(
+	  for (int i=0; i<bsize; ++i)
+	    if (rp[i] != 0) throw std::logic_error("non exact Mpzf division");
+      )
+    }
+    while(/*res.size>0&&*/res.data()[res.size-1]==0) --res.size;
+    //while(/*res.size>0&&*/res.data()[0]==0){--res.size;++res.data();++res.exp;}
+    if((a.size^b.size)<0) res.size=-res.size;
+    return res;
+  }
+
+  friend Mpzf Mpzf_gcd(Mpzf const&a, Mpzf const&b){
+    // FIXME: Untested
+    if (a.size == 0) return b;
+    if (b.size == 0) return a;
+    int asize=std::abs(a.size);
+    int bsize=std::abs(b.size);
+    int atz=Mpzf_impl::ctz(a.data()[0]);
+    int btz=Mpzf_impl::ctz(b.data()[0]);
+    int rtz=(std::min)(atz,btz);
+    Mpzf tmp(allocate(), asize);
+    Mpzf res(allocate(), bsize);
+    if (atz != 0) {
+      mpn_rshift(tmp.data(), a.data(), asize, atz);
+      if(tmp.data()[asize-1]==0) --asize;
+    }
+    else { mpn_copyi(tmp.data(), a.data(), asize); }
+    if (btz != 0) {
+      mpn_rshift(res.data(), b.data(), bsize, btz);
+      if(res.data()[bsize-1]==0) --bsize;
+    }
+    else { mpn_copyi(res.data(), b.data(), bsize); }
+    res.exp = 0; // Pick b.exp? or the average? 0 helps return 1 more often.
+    if (asize < bsize)
+      res.size = mpn_gcd(res.data(), res.data(), bsize, tmp.data(), asize);
+    else
+      res.size = mpn_gcd(res.data(), tmp.data(), asize, res.data(), bsize);
+    if(rtz!=0) {
+      mp_limb_t c = mpn_lshift(res.data(), res.data(), res.size, rtz);
+      if(c) { res.data()[res.size]=c; ++res.size; }
+    }
+    return res;
+  }
+
+  friend bool Mpzf_is_square(Mpzf const&x){
+    if (x.size < 0) return false;
+    if (x.size == 0) return true;
+    // Assume that GMP_NUMB_BITS is even.
+    return mpn_perfect_square_p (x.data(), x.size);
+  }
+
+  friend Mpzf Mpzf_sqrt(Mpzf const&x){
+    // FIXME: Untested
+    if (x.size < 0) throw std::range_error("Sqrt of negative number");
+    if (x.size == 0) return 0;
+    if (x.exp % 2 == 0) {
+      Mpzf res(allocate(), (x.size + 1) / 2);
+      res.exp = x.exp / 2;
+      res.size = (x.size + 1) / 2;
+      CGAL_assertion_code(mp_size_t rem=)
+      mpn_sqrtrem(res.data(), 0, x.data(), x.size);
+      CGAL_assertion(rem==0);
+      return res;
+    }
+    else if (x.data()[-1] == 0) {
+      Mpzf res(allocate(), (x.size + 2) / 2);
+      res.exp = (x.exp - 1) / 2;
+      res.size = (x.size + 2) / 2;
+      CGAL_assertion_code(mp_size_t rem=)
+      mpn_sqrtrem(res.data(), 0, x.data()-1, x.size+1);
+      CGAL_assertion(rem==0);
+      return res;
+    }
+    else {
+      Mpzf res(allocate(), (x.size + 2) / 2);
+      res.exp = (x.exp - 1) / 2;
+      res.size = (x.size + 2) / 2;
+      CGAL_assertion_code(mp_size_t rem=)
+      mpn_sqrtrem(res.data(), 0, x.data(), x.size);
+      CGAL_assertion(rem==0);
+      mpn_lshift(res.data(), res.data(), res.size, GMP_NUMB_BITS / 2);
+      return res;
+    }
+  }
+
+  friend Mpzf operator-(Mpzf const&x){
+    Mpzf ret = x;
+    ret.size = -ret.size;
+    return ret;
+  }
+  Mpzf& operator+=(Mpzf const&x){ *this=*this+x; return *this; }
+  Mpzf& operator-=(Mpzf const&x){ *this=*this-x; return *this; }
+  Mpzf& operator*=(Mpzf const&x){ *this=*this*x; return *this; }
+  Mpzf& operator/=(Mpzf const&x){ *this=*this/x; return *this; }
+
+  bool is_canonical () const {
+    if (size == 0) return true;
+    if (data()[0] == 0) return false;
+    if (data()[std::abs(size)-1] == 0) return false;
+    return true;
+  }
+
+  bool is_zero () const {
+    return size==0;
+  }
+
+  bool is_one () const {
+    return exp==0 && size==1 && data()[0]==1;
+  }
+
+  CGAL::Sign sign () const { return CGAL::sign(size); }
+
+  double to_double () const {
+    // Assumes GMP_NUMB_BITS == 64
+    using std::ldexp;
+    if(size==0) return 0;
+    int asize = std::abs(size);
+    mp_limb_t top = data()[asize-1];
+    double dtop = top;
+    if(top >= (1LL<<53) || asize == 1) /* ok */ ;
+    else { dtop += (double)data()[asize-2] * ldexp(1.,-GMP_NUMB_BITS); }
+    return ldexp( (size<0) ? -dtop : dtop, (asize-1+exp) * GMP_NUMB_BITS);
+  }
+
+  std::pair<double, double> to_interval () const {
+    // Assumes GMP_NUMB_BITS == 64
+    if (size == 0) return std::make_pair(0., 0.);
+    double dl, dh;
+    int asize = std::abs(size);
+    int e = 64 * (asize - 1 + exp);
+    mp_limb_t x = data()[asize-1];
+    int lz = Mpzf_impl::clz(x);
+    if (lz <= 11) {
+      if (lz != 11) {
+	e += (11 - lz);
+	x >>= (11 - lz);
+      }
+      dl = x;
+      dh = x + 1;
+      // Check for the few cases where dh=x works (asize==1 and the evicted
+      // bits from x were 0s)
+    }
+    else if (asize == 1) {
+      dl = dh = x; // conversion is exact
+    }
+    else {
+      mp_limb_t y = data()[asize-2];
+      e -= (lz - 11);
+      x <<= (lz - 11);
+      y >>= (75 - lz);
+      x |= y;
+      dl = x;
+      dh = x + 1;
+      // Check for the few cases where dh=x works (asize==2 and the evicted
+      // bits from y were 0s)
+    }
+    typedef Interval_nt<> IA;
+    IA res (dl, dh);
+    res = ldexp (res, e);
+    if (size < 0) res = -res;
+    return CGAL::to_interval(res);
+    // Use ldexp(Interval_nt,int) to delegate the hard thinking
+    // about over/underflow.
+  }
+
+#ifdef CGAL_USE_GMPXX
+#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
+  explicit
+#endif
+  operator mpq_class () const {
+    mpq_class q;
+    export_to_mpq_t(q.get_mpq_t());
+    return q;
+  }
+#endif
+
+#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
+  explicit
+#endif
+  operator Gmpq () const {
+    Gmpq q;
+    export_to_mpq_t(q.mpq());
+    return q;
+  }
+  void export_to_mpq_t(mpq_t q) const {
+    /* q must be 0/1 before this call */
+    CGAL_precondition(mpq_cmp_ui(q,0,1)==0);
+    if (size != 0) {
+      mpz_import (mpq_numref (q),
+		  std::abs(size),
+		  -1, // data()[0] is the least significant part
+		  sizeof(mp_limb_t),
+		  0, // native endianness inside mp_limb_t
+		  GMP_NAIL_BITS, // should be 0
+		  data());
+      if (exp > 0)
+	mpq_mul_2exp(q, q, (sizeof(mp_limb_t) * CHAR_BIT *  exp));
+      else if (exp < 0)
+	mpq_div_2exp(q, q, (sizeof(mp_limb_t) * CHAR_BIT * -exp));
+
+      if (size < 0)
+	mpq_neg(q,q);
+    }
+  }
+#if 0
+#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS
+  explicit
+#endif
+// This makes Mpzf==int ambiguous
+  operator Gmpzf () const {
+    mpz_t z;
+    z->_mp_d=const_cast<mp_limb_t*>(data());
+    z->_mp_size=size;
+    Gmpzf m(z);
+// Only works for a very limited range of exponents
+    Gmpzf e(std::ldexp(1.,GMP_NUMB_BITS*exp));
+    return m*e;
+  }
+#endif
+
+  friend void simplify_quotient(Mpzf& a, Mpzf& b){
+    // Avoid quotient(2^huge_a/2^huge_b)
+    a.exp -= b.exp;
+    b.exp = 0;
+    // Simplify with gcd?
+  }
+};
+
+// Copied from Gmpzf, not sure that's the best thing to do.
+inline
+std::ostream& operator<< (std::ostream& os, const Mpzf& a)
+{
+    return os << a.to_double();
+}
+
+inline
+std::istream& operator>> (std::istream& is, Mpzf& a)
+{
+  double d;
+  is >> d;
+  if (is)
+    a = d;
+  return is;
+}
+
+
+  template <> struct Algebraic_structure_traits< Mpzf >
+    : public Algebraic_structure_traits_base< Mpzf, Integral_domain_without_division_tag >  {
+      typedef Tag_true            Is_exact;
+      typedef Tag_false            Is_numerical_sensitive;
+
+      struct Is_zero
+	: public std::unary_function< Type, bool > {
+	  bool operator()( const Type& x ) const {
+	    return x.is_zero();
+	  }
+	};
+
+      struct Is_one
+	: public std::unary_function< Type, bool > {
+	  bool operator()( const Type& x ) const {
+	    return x.is_one();
+	  }
+	};
+
+      struct Gcd
+	: public std::binary_function< Type, Type, Type > {
+	  Type operator()(
+	      const Type& x,
+	      const Type& y ) const {
+	    return Mpzf_gcd(x, y);
+	  }
+	};
+
+      struct Square
+	: public std::unary_function< Type, Type > {
+	  Type operator()( const Type& x ) const {
+	    return Mpzf_square(x);
+	  }
+	};
+
+      struct Integral_division
+	: public std::binary_function< Type, Type, Type > {
+	  Type operator()(
+	      const Type& x,
+	      const Type& y ) const {
+	    return x / y;
+	  }
+	};
+
+      struct Sqrt
+	: public std::unary_function< Type, Type > {
+	  Type operator()( const Type& x) const {
+	    return Mpzf_sqrt(x);
+	  }
+	};
+
+      struct Is_square
+	: public std::binary_function< Type, Type&, bool > {
+	  bool operator()( const Type& x, Type& y ) const {
+	    // TODO: avoid doing 2 calls.
+	    if (!Mpzf_is_square(x)) return false;
+	    y = Mpzf_sqrt(x);
+	    return true;
+	  }
+	  bool operator()( const Type& x) const {
+	    return Mpzf_is_square(x);
+	  }
+	};
+
+    };
+  template <> struct Real_embeddable_traits< Mpzf >
+    : public INTERN_RET::Real_embeddable_traits_base< Mpzf , CGAL::Tag_true > {
+      struct Sgn
+	: public std::unary_function< Type, ::CGAL::Sign > {
+	  ::CGAL::Sign operator()( const Type& x ) const {
+	    return x.sign();
+	  }
+	};
+
+      struct To_double
+	: public std::unary_function< Type, double > {
+	    double operator()( const Type& x ) const {
+	      return x.to_double();
+	    }
+	};
+
+      struct Compare
+	: public std::binary_function< Type, Type, Comparison_result > {
+	    Comparison_result operator()(
+		const Type& x,
+		const Type& y ) const {
+	      return CGAL::sign(Mpzf_cmp(x,y));
+	    }
+	};
+
+      struct To_interval
+	: public std::unary_function< Type, std::pair< double, double > > {
+	    std::pair<double, double> operator()( const Type& x ) const {
+	      return x.to_interval();
+	    }
+	};
+
+    };
+
+CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float    ,Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double   ,Mpzf)
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(Gmpz     ,Mpzf)
+#ifdef CGAL_USE_GMPXX
+CGAL_DEFINE_COERCION_TRAITS_FROM_TO(mpz_class,Mpzf)
+#endif
+
+}
+
+/* There isn't much Eigen can do with such a type,
+ * mostly this is here for IsInteger to protect people.
+ */
+namespace Eigen {
+  template<class> struct NumTraits;
+  template<> struct NumTraits<CGAL::Mpzf>
+  {
+    typedef CGAL::Mpzf Real;
+    /* Should this be Quotient<Mpzf>? Gmpq?  */
+    typedef CGAL::Mpzf NonInteger;
+    typedef CGAL::Mpzf Nested;
+
+    static inline Real epsilon() { return 0; }
+    static inline Real dummy_precision() { return 0; }
+
+    enum {
+      /* Only exact divisions are supported, close enough to an integer.
+       * This way we get compilation failures instead of runtime.  */
+      IsInteger = 1,
+      IsSigned = 1,
+      IsComplex = 0,
+      RequireInitialization = 1,
+      ReadCost = 6,
+      AddCost = 30,
+      MulCost = 50
+    };
+  };
+}
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // GMP_NUMB_BITS == 64
+#endif // CGAL_MPZF_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Multi_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Multi_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Multi_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Multi_surface_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Multiscale_sort.h b/3rdparty/CGAL-4.8/include/CGAL/Multiscale_sort.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Multiscale_sort.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Multiscale_sort.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Multiset.h b/3rdparty/CGAL-4.8/include/CGAL/Multiset.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Multiset.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Multiset.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NT_converter.h b/3rdparty/CGAL-4.8/include/CGAL/NT_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NT_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NT_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/N_step_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/N_step_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/N_step_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/N_step_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/N_step_adaptor_derived.h b/3rdparty/CGAL-4.8/include/CGAL/N_step_adaptor_derived.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/N_step_adaptor_derived.h
rename to 3rdparty/CGAL-4.8/include/CGAL/N_step_adaptor_derived.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Needs_parens_as_product.h b/3rdparty/CGAL-4.8/include/CGAL/Needs_parens_as_product.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Needs_parens_as_product.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Needs_parens_as_product.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Bounding_box_2.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Bounding_box_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Bounding_box_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Bounding_box_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Constrained_triang_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Constrained_triang_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Constrained_triang_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Constrained_triang_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/HDS_items.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/HDS_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/HDS_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/HDS_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Line_to_epoint.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Line_to_epoint.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Line_to_epoint.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Line_to_epoint.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Object_handle.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Object_handle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Object_handle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Object_handle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Object_index.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Object_index.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Object_index.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Object_index.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_checker.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_checker.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_checker.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_checker.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_const_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_const_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_const_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_const_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_explorer.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_explorer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_explorer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_explorer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_io_parser.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_io_parser.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_io_parser.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_io_parser.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_overlayer.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_overlayer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_overlayer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_overlayer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_persistent_PL.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_persistent_PL.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/PM_persistent_PL.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_persistent_PL.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_point_locator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_point_locator.h
new file mode 100644
index 0000000..92234db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/PM_point_locator.h
@@ -0,0 +1,1059 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+#ifndef CGAL_PM_POINT_LOCATOR_H
+#define CGAL_PM_POINT_LOCATOR_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Nef_2/Constrained_triang_traits.h>
+#include <CGAL/Nef_2/Object_handle.h>
+#include <CGAL/Circulator_project.h>
+#include <CGAL/Polygon_2_algorithms.h>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 17
+#include <CGAL/Nef_2/debug.h>
+#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+#include <CGAL/Nef_2/geninfo.h>
+#else
+#include <boost/any.hpp>
+#endif
+
+#ifdef CGAL_USE_LEDA_LIBRARY
+#include <CGAL/LEDA_basic.h>
+# if __LEDA__ > 410 && __LEDA__ < 441
+#  define CGAL_USING_PPL
+#  include <CGAL/Nef_2/PM_persistent_PL.h>
+# endif
+#endif
+
+namespace CGAL {
+
+enum object_kind { VERTEX, EDGE_CROSSING, EDGE_COLLINEAR };
+
+template < class Node, class Object>
+struct Project_halfedge_point {
+  typedef Node         argument_type;
+  typedef Object       result_type;
+  Object& operator()( Node& x) const   {
+    return x.vertex()->point();
+  }
+  const Object& operator()( const Node& x) const   {
+    return x.vertex()->point();
+  }
+};
+
+/*{\Moptions print_title=yes }*/
+/*{\Msubst
+PM_decorator_#PMD
+Geometry_#GEO
+}*/
+/*{\Manpage {PM_naive_point_locator}{PMD,GEO}
+{Naive point location in plane maps}{PL}}*/
+/*{\Mdefinition An instance |\Mvar| of data type |\Mname|
+encapsulates naive point location queries within a plane map |P|.  The
+two template parameters are specified via concepts. |PM_decorator_|
+must be a model of the concept |PMDecorator| as described in the
+appendix.  |Geometry_| must be a model of the concept
+|AffineGeometryTraits_2| as described in the appendix. For a
+specification of plane maps see also the concept of
+|PMConstDecorator|.}*/
+
+/*{\Mgeneralization PMD}*/
+
+template <typename PM_decorator_, typename Geometry_>
+class PM_naive_point_locator : public PM_decorator_ {
+protected:
+  typedef PM_decorator_ Base;
+  typedef PM_naive_point_locator<PM_decorator_,Geometry_> Self;
+
+  const Geometry_& K;
+public:
+  /*{\Mtypes 5}*/
+  typedef PM_decorator_                 Decorator;
+  /*{\Mtypemember equals |PM_decorator_|.}*/
+  typedef typename Decorator::Plane_map Plane_map;
+  /*{\Mtypemember the plane map type decorated by |Decorator|.}*/
+  typedef typename Decorator::Mark      Mark;
+  /*{\Mtypemember the attribute of all objects (vertices, edges,
+  faces).}*/
+
+  typedef Geometry_                       Geometry;
+  /*{\Mtypemember equals |Geometry_|.}*/
+  typedef typename Geometry_::Point_2     Point;
+  /*{\Mtypemember the point type of the geometry kernel.\\
+  \require |Geometry::Point_2| equals |Plane_map::Point|.}*/
+  typedef typename Geometry_::Segment_2   Segment;
+  /*{\Mtypemember the segment type of the geometry kernel.}*/
+  typedef typename Geometry_::Direction_2 Direction;
+
+  /*{\Mtext Local types are handles, iterators and circulators of the
+  following kind: |Vertex_const_handle|, |Vertex_const_iterator|,
+  |Halfedge_const_handle|, |Halfedge_const_iterator|, |Face_const_handle|,
+  |Face_const_iterator|.}*/
+
+  typedef CGAL::Object_handle Object_handle;
+  /*{\Mtypemember a generic handle to an object of the underlying plane
+  map. The kind of the object |(vertex, halfedge,face)| can be determined and
+  the object assigned by the three functions:\\
+  |bool assign(Vertex_const_handle& h, Object_handle o)|\\
+  |bool assign(Halfedge_const_handle& h, Object_handle o)|\\
+  |bool assign(Face_const_handle& h, Object_handle o)|\\ where each
+  function returns |true| iff the assignment of |o| to |h| was valid.}*/
+
+   typedef typename PM_decorator_::Vertex_handle Vertex_handle;
+   typedef typename PM_decorator_::Halfedge_handle Halfedge_handle;
+   typedef typename PM_decorator_::Face_handle Face_handle;
+   typedef typename PM_decorator_::Vertex_const_handle Vertex_const_handle;
+   typedef typename PM_decorator_::Halfedge_const_handle Halfedge_const_handle;
+   typedef typename PM_decorator_::Face_const_handle Face_const_handle;
+   typedef typename PM_decorator_::Vertex_iterator Vertex_iterator;
+   typedef typename PM_decorator_::Halfedge_iterator Halfedge_iterator;
+   typedef typename PM_decorator_::Face_iterator Face_iterator;
+   typedef typename PM_decorator_::Vertex_const_iterator Vertex_const_iterator;
+   typedef typename PM_decorator_::Halfedge_const_iterator Halfedge_const_iterator;
+   typedef typename PM_decorator_::Face_const_iterator Face_const_iterator;
+   typedef typename PM_decorator_::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
+   typedef typename PM_decorator_::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator;
+   typedef typename PM_decorator_::Halfedge_around_face_circulator Halfedge_around_face_circulator;
+   typedef typename PM_decorator_::Halfedge_around_face_const_circulator Halfedge_around_face_const_circulator;
+
+  using Base::clear;
+  using Base::vertices_begin;
+  using Base::vertices_end;
+  using Base::halfedges_begin;
+  using Base::halfedges_end;
+  using Base::faces_begin;
+  using Base::faces_end;
+  using Base::number_of_vertices;
+  using Base::number_of_halfedges;
+  using Base::number_of_faces;
+  using Base::info;
+  using Base::is_closed_at_source;
+  using Base::source;
+  using Base::target;
+  using Base::cyclic_adj_succ;
+  using Base::mark;
+  using Base::twin;
+  using Base::flip_diagonal;
+  using Base::is_isolated;
+  using Base::first_out_edge;
+  using Base::next;
+  using Base::previous;
+  using Base::face;
+  using Base::point;
+
+  Halfedge_const_handle out_wedge(Vertex_const_handle v,
+    const Direction& d, bool& collinear) const
+  /*{\Xop returns a halfedge |e| bounding a wedge in between two
+  neighbored edges in the adjacency list of |v| which contains |d|.
+  If |d| extends along a edge then |e| is this edge. If |d| extends
+  into the interior of such a wedge then |e| is the first edge hit
+  when |d| is rotated clockwise. \precond |v| is not isolated.}*/
+  { CGAL_NEF_TRACEN("out_wedge "<<PV(v));
+    CGAL_assertion(!is_isolated(v));
+    collinear=false;
+    Point p = point(v);
+    Halfedge_const_handle e_res = first_out_edge(v);
+    Direction d_res = direction(e_res);
+    Halfedge_around_vertex_const_circulator el(e_res),ee(el);
+    CGAL_For_all(el,ee) {
+      if ( K.strictly_ordered_ccw(d_res, direction(el), d) ){
+        e_res = el; d_res = direction(e_res);
+      }
+    }
+    CGAL_NEF_TRACEN("  determined "<<PE(e_res)<<" "<<d_res);
+    if ( direction(cyclic_adj_succ(e_res)) == d ) {
+      e_res = cyclic_adj_succ(e_res);
+      collinear=true;
+    }
+    CGAL_NEF_TRACEN("  wedge = "<<PE(e_res)<<" "<<collinear);
+    return e_res;
+  }
+
+  Segment segment(Halfedge_const_handle e) const
+  { return K.construct_segment(point(source(e)), point(target(e))); }
+
+  Direction direction(Halfedge_const_handle e) const
+  { return K.construct_direction(point(source(e)),point(target(e))); }
+
+  /*{\Mcreation 3}*/
+
+  /*{\Moptions constref=yes}*/
+  PM_naive_point_locator(const Plane_map& P, const Geometry& k = Geometry()) :
+    Base(const_cast<Plane_map&>(P)), K(k) {}
+  /*{\Mcreate constructs a point locator working on |P|.}*/
+  /*{\Moptions constref=no}*/
+  /*{\Moperations 2.5 0.5}*/
+
+  const Mark& mark(Object_handle h) const
+  /*{\Mop returns the mark associated to the object |h|.}*/
+  { Vertex_const_handle v;
+    Halfedge_const_handle e;
+    Face_const_handle f;
+    if ( assign(v,h) ) return mark(v);
+    if ( assign(e,h) ) return mark(e);
+    if ( assign(f,h) ) return mark(f);
+    CGAL_error_msg("PM_point_locator::mark: Object_handle holds no object.");
+    return mark(v); // never reached
+  }
+
+
+  Object_handle locate(const Segment& s) const
+  /*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
+  face) of the underlying plane map |P| which contains the point |p =
+  s.source()| in its relative interior. |s.target()| must be a point
+  such that |s| intersects the $1$-skeleton of |P|.}*/
+  { CGAL_NEF_TRACEN("locate naivly "<<s);
+    if (this->number_of_vertices() == 0)
+      CGAL_error_msg("PM_naive_point_locator: plane map is empty.");
+    Point p = K.source(s);
+    Vertex_const_iterator vit;
+    for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
+      if ( p == point(vit) ) return make_object(vit);
+    }
+    Halfedge_const_iterator eit;
+    for(eit = this->halfedges_begin(); eit != this->halfedges_end(); ++(++eit)) {
+      // we only have to check each second halfedge
+      if ( K.contains(segment(eit),p) )
+        return make_object(eit);
+    }
+    Vertex_const_handle v_res;
+    Halfedge_const_handle e_res;
+    Segment ss = s; // we shorten the segment iteratively
+    Direction dso = K.construct_direction(K.target(s),p), d_res;
+    CGAL::Unique_hash_map<Halfedge_const_handle,bool> visited(false);
+    for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
+      Point p_res, vp = point(vit);
+      if ( K.contains(ss,vp) ) {
+        CGAL_NEF_TRACEN(" location via vertex at "<<vp);
+        ss = K.construct_segment(p,vp); // we shrink the segment
+        if ( is_isolated(vit) ) {
+          v_res = vit; e_res = Halfedge_const_handle();
+        } else { // not isolated
+          bool dummy;
+          e_res = out_wedge(vit,dso,dummy);
+          Halfedge_around_vertex_const_circulator el(e_res),ee(el);
+          CGAL_For_all(el,ee)
+            visited[el] = visited[twin(el)] = true;
+          /* e_res is now the counterclockwise maximal halfedge out
+             of v just before s */
+          if ( K.orientation(p,vp,point(target(e_res))) < 0 ) // right turn
+            e_res = previous(e_res);
+          // correction to make e_res visible from p
+          CGAL_NEF_TRACEN("  determined "<<PE(e_res));
+        }
+      }
+    }
+
+    for (eit = this->halfedges_begin(); eit != this->halfedges_end(); ++eit) {
+      if ( visited[eit] ) continue;
+      Point se = point(source(eit)),
+            te = point(target(eit));
+      int o1 = K.orientation(ss,se);
+      int o2 = K.orientation(ss,te);
+      if ( o1 == -o2 && // internal intersection
+           K.orientation(se,te,K.source(ss)) !=
+           K.orientation(se,te,K.target(ss)) ) {
+          CGAL_NEF_TRACEN(" location via halfedge "<<segment(eit));
+        Point p_res = K.intersection(s,segment(eit));
+        ss = K.construct_segment(p,p_res);
+        e_res = (o2 > 0 ? eit : twin(eit));
+        // o2>0 => te left of s and se right of s => p left of e
+        visited[eit] = visited[twin(eit)] = true;
+        CGAL_NEF_TRACEN("  determined "<<PE(e_res)<<" "<<mark(e_res));
+        CGAL_NEF_TRACEN("             "<<mark(face(e_res)));
+      }
+    }
+
+    if ( e_res != Halfedge_const_handle() )
+      return make_object((Face_const_handle)(face(e_res)));
+    else
+      return make_object((Face_const_handle)(face(v_res)));
+  }
+
+
+  template <typename Object_predicate>
+  Object_handle ray_shoot(const Segment& s, const Object_predicate& M) const
+  /*{\Mop returns an |Object_handle o| which can be converted to a
+  |Vertex_const_handle|, |Halfedge_const_handle|, |Face_const_handle|
+  |h| as described above.  The object predicate |M| has to have function
+  operators \\
+  |bool operator() (const Vertex_/Halfedge_/Face_const_handle&)|.\\
+  The object returned is intersected by the segment |s| and has
+  minimal distance to |s.source()| and |M(h)| holds on the converted
+  object. The operation returns the null handle |NULL| if the ray shoot
+  along |s| does not hit any object |h| of |P| with |M(h)|.}*/
+  { CGAL_NEF_TRACEN("naive ray_shoot "<<s);
+    CGAL_assertion( !K.is_degenerate(s) );
+    Point p = K.source(s);
+    Segment ss(s);
+    Direction d = K.construct_direction(K.source(s),K.target(s));
+    Object_handle h = locate(s);
+    Vertex_const_handle v;
+    Halfedge_const_handle e;
+    Face_const_handle f;
+    if ( ( assign(v,h) && M(v) ) ||
+         ( assign(e,h) && M(e) ) ||
+         ( assign(f,h) && M(f) ) ) return h;
+    h = Object_handle();
+    CGAL_NEF_TRACEN("not contained");
+    for (v = this->vertices_begin(); v != this->vertices_end(); ++v) {
+      Point pv = point(v);
+      if ( !K.contains(ss,pv) ) continue;
+      CGAL_NEF_TRACEN("candidate "<<pv);
+      if ( M(v) ) {
+        h = make_object(v);     // store vertex
+        ss = K.construct_segment(p,pv); // shorten
+        continue;
+      }
+      // now we know that v is not marked but on s
+      bool collinear;
+      Halfedge_const_handle e = out_wedge(v,d,collinear);
+      if ( collinear ) {
+        if ( M(e) ) {
+          h = make_object(e);
+          ss = K.construct_segment(p,pv);
+        }
+        continue;
+      }
+      if ( M(face(e)) ) {
+        h = make_object(face(e));
+        ss = K.construct_segment(p,pv);
+      }
+    } // all vertices
+
+    Halfedge_const_iterator e_res;
+    for(e = this->halfedges_begin(); e != this->halfedges_end(); ++(++e)) {
+      Segment es = segment(e);
+      int o1 = K.orientation(ss,K.source(es));
+      int o2 = K.orientation(ss,K.target(es));
+      if ( o1 == -o2 && o1 != 0 &&
+           K.orientation(es, K.source(ss)) ==
+           - K.orientation(es, K.target(ss)) ) {
+        // internal intersection
+        CGAL_NEF_TRACEN("candidate "<<es);
+        Point p_res = K.intersection(s,es);
+        e_res = (o2 > 0 ? e : twin(e));
+        // o2 > 0 => te left of s and se right of s => p left of e
+        if ( M(e_res) ) {
+          h = make_object(e_res);
+          ss = K.construct_segment(p,p_res);
+        } else if ( M(face(twin(e_res))) ) {
+          h = make_object(face(twin(e_res)));
+          ss = K.construct_segment(p,p_res);
+        }
+      }
+    }
+
+    return h;
+  }
+
+
+  // C++ is really friendly:
+  #define USECMARK(t) const Mark& mark(t h) const { return Base::mark(h); }
+  #define USEMARK(t)  Mark& mark(t h) const { return Base::mark(h); }
+  USEMARK(Vertex_handle)
+  USEMARK(Halfedge_handle)
+  USEMARK(Face_handle)
+  USECMARK(Vertex_const_handle)
+  USECMARK(Halfedge_const_handle)
+  USECMARK(Face_const_handle)
+  #undef USEMARK
+  #undef USECMARK
+  /*{\Mimplementation Naive query operations are realized by checking
+  the intersection points of the $1$-skeleton of the plane map |P| with
+  the query segments $s$. This method takes time linear in the size $n$
+  of the underlying plane map without any preprocessing.}*/
+}; // PM_naive_point_locator<PM_decorator_,Geometry_>
+
+
+/*{\Moptions print_title=yes }*/
+/*{\Msubst
+PM_decorator_#PMD
+Geometry_#GEO
+}*/
+/*{\Manpage {PM_point_locator}{PMD,GEO}
+{Point location in plane maps via LMWT}{PL}}*/
+/*{\Mdefinition An instance |\Mvar| of data type |\Mname|
+encapsulates point location queries within a plane map |P|. The two
+template parameters are specified via concepts. |PMD| must be a model
+of the concept |PMDecorator| as described in the appendix.  |GEO| must
+be a model of the concept |AffineGeometryTraits_2| as described in the
+appendix. For a specification of plane maps see also the concept of
+|PMConstDecorator|.}*/
+
+/*{\Mgeneralization PMD^#PM_naive_point_locator<PMD,GEO>}*/
+
+template <typename PM_decorator_, typename Geometry_>
+class PM_point_locator : public
+  PM_naive_point_locator<PM_decorator_,Geometry_> {
+protected:
+  typedef PM_naive_point_locator<PM_decorator_,Geometry_> Base;
+  typedef PM_point_locator<PM_decorator_,Geometry_> Self;
+  Base CT;
+  #ifdef CGAL_USING_PPL
+  typedef PM_persistent_PL_traits<Base>  PMPPLT;
+  typedef PointLocator<PMPPLT>           PMPP_locator;
+  PMPP_locator* pPPL;
+  #define LOCATE_IN_TRIANGULATION pPPL->locate_down
+  #else
+  #define LOCATE_IN_TRIANGULATION walk_in_triangulation
+  #endif
+
+public:
+
+  typedef typename Base::Decorator Decorator;
+  typedef typename Base::Plane_map Plane_map;
+  typedef typename Base::Mark Mark;
+  typedef typename Base::Geometry Geometry;
+  typedef typename Base::Point Point;
+  typedef typename Base::Segment Segment;
+  typedef typename Base::Direction Direction;
+  typedef typename Base::Object_handle Object_handle;
+  typedef typename Base::Vertex_handle Vertex_handle;
+  typedef typename Base::Halfedge_handle Halfedge_handle;
+  typedef typename Base::Face_handle Face_handle;
+  typedef typename Base::Vertex_const_handle Vertex_const_handle;
+  typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
+  typedef typename Base::Face_const_handle Face_const_handle;
+  typedef typename Base::Vertex_iterator Vertex_iterator;
+  typedef typename Base::Halfedge_iterator Halfedge_iterator;
+  typedef typename Base::Face_iterator Face_iterator;
+  typedef typename Base::Vertex_const_iterator Vertex_const_iterator;
+  typedef typename Base::Halfedge_const_iterator Halfedge_const_iterator;
+  typedef typename Base::Face_const_iterator Face_const_iterator;
+  typedef typename Base::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
+  typedef typename Base::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator;
+  typedef typename Base::Halfedge_around_face_circulator Halfedge_around_face_circulator;
+  typedef typename Base::Halfedge_around_face_const_circulator Halfedge_around_face_const_circulator;
+
+  using Base::K;
+  using Base::number_of_vertices;
+  using Base::faces_begin;
+  using Base::info;
+  using Base::flip_diagonal;
+  using Base::twin; 
+  using Base::next; 
+  using Base::previous; 
+  using Base::source; 
+  using Base::target; 
+  using Base::point; 
+  using Base::segment; 
+  using Base::face;
+
+  /*{\Mtypes 2}*/
+  /*{\Mtext All local types of |PM_naive_point_locator| are inherited.}*/
+  typedef std::pair<Vertex_const_handle,Face_const_handle>   VF_pair;
+  typedef std::pair<Halfedge_const_handle,Face_const_handle> EF_pair;
+
+  struct CT_link_to_original : Decorator { // CT decorator
+    const Decorator& Po;
+    using Decorator::info;
+
+    CT_link_to_original(const Decorator& P, const Decorator& Poi)
+      : Decorator(P), Po(Poi) {}
+
+    void operator()(Vertex_handle vn, Vertex_const_handle vo) const
+    { Face_const_handle f;
+      if ( Po.is_isolated(vo) ) f = Po.face(vo);
+      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      geninfo<VF_pair>::create(info(vn));
+      geninfo<VF_pair>::access(info(vn)) = VF_pair(vo,f);
+      #else
+      info(vn) = VF_pair(vo,f);      
+      #endif
+      CGAL_NEF_TRACEN("linking to org "<<PV(vn));
+    }
+
+    void operator()(Halfedge_handle hn, Halfedge_const_handle ho) const
+    { 
+      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      geninfo<EF_pair>::create(info(hn));
+      geninfo<EF_pair>::access(info(hn)) = EF_pair(ho,Po.face(ho));
+      #else
+      info(hn) = EF_pair(ho,Po.face(ho));      
+      #endif
+      CGAL_NEF_TRACEN("linking to org "<<PE(hn));
+    }
+  };
+
+protected:
+  Vertex_const_handle input_vertex(Vertex_const_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<VF_pair>::const_access(CT.info(v)).first; 
+    #else
+    return 
+      boost::any_cast<VF_pair>(CT.info(v)).first; 
+    #endif
+  }
+
+  Halfedge_const_handle input_halfedge(Halfedge_const_handle e) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<EF_pair>::const_access(CT.info(e)).first; 
+    #else
+    return 
+      boost::any_cast<EF_pair>(CT.info(e)).first; 
+    #endif
+  }
+
+  Face_const_handle input_face(Halfedge_const_handle e) const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<EF_pair>::const_access(CT.info(e)).second;
+    #else
+    return 
+      boost::any_cast<EF_pair>(CT.info(e)).second;
+    #endif
+  }
+
+
+  Object_handle input_object(Vertex_const_handle v) const
+  { return make_object(input_vertex(v)); }
+
+  Object_handle input_object(Halfedge_const_handle e) const
+  { Halfedge_const_handle e_org = input_halfedge(e);
+    if ( e_org != Halfedge_const_handle() )
+      return make_object( e_org );
+    // now e_org is not existing
+    return make_object( input_face(e) );
+  }
+
+  /*{\Mimplementation
+  The efficiency of this point location module is mostly based on
+  heuristics. Therefore worst case bounds are not very expressive. The
+  query operations take up to linear time for subsequent query
+  operations though they are better in practise. They trigger a one-time
+  initialization which needs worst case $O(n^2)$ time though runtime
+  tests often show subquadratic results. The necessary space for the
+  query structure is subsumed in the storage space $O(n)$ of the input
+  plane map. The query times are configuration dependent. If LEDA is
+  present then point location is done via the slap method based on
+  persistent dictionaries.  Then $T_{pl}(n) = O( \log(n) )$. If CGAL is
+  not configured to use LEDA then point location is done via a segment
+  walk in the underlying convex subdivision of $P$. In this case
+  $T_{pl}(n)$ is the number of triangles crossed by a walk from the
+  boundary of the structure to the query point. The time for the ray
+  shooting operation $T_{rs}(n)$ is the time for the point location
+  $T_{pl}(n)$ plus the time for the walk in the triangulation that is
+  superimposed to the plane map. Let's consider the plane map edges as
+  obstacles and the additional triangulation edges as non-obstacle
+  edges. Let's call the sum of the lengths of all edges of the
+  triangulation its weight. If the calculated triangulation
+  approximates\cgalFootnote{The calculation of general
+  minimum-weight-triangulations is conjectured to be NP-complete and
+  locally-minimum-weight-triangulations that we use are considered good
+  approximations.} the minimum weight triangulation of the obstacle set
+  then the stepping quotient\cgalFootnote {The number of non-obstacle edges
+  crossed until an obstacle edge is hit.} for a random direction of the
+  ray shot is expected to be $O( \sqrt{n} )$.}*/
+
+
+  struct CT_new_edge : Decorator {
+    const Decorator& _DP;
+    using Decorator::mark;
+    using Decorator::previous;
+    using Decorator::is_closed_at_source;
+    using Decorator::info;
+    using Decorator::source;
+    using Decorator::twin;
+
+    CT_new_edge(const Decorator& CT, const Decorator& DP) :
+      Decorator(CT), _DP(DP) {}
+    void operator()(Halfedge_handle& e) const
+    { Halfedge_handle e_from = previous(e);
+      Face_const_handle f;
+      if ( is_closed_at_source(e) ) // source(e) was isolated before
+        #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+        f = geninfo<VF_pair>::access(info(source(e))).second;
+      else
+        f = geninfo<EF_pair>::access(info(e_from)).second;      
+        #else
+        f = 
+          boost::any_cast<VF_pair>(info(source(e))).second;
+      else
+        f = 
+          boost::any_cast<EF_pair>(info(e_from)).second;              
+        #endif
+      mark(e) = _DP.mark(f);
+      #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      geninfo<EF_pair>::create(info(e));
+      geninfo<EF_pair>::create(info(twin(e)));
+
+      geninfo<EF_pair>::access(info(e)).first =
+      geninfo<EF_pair>::access(info(twin(e))).first =
+        Halfedge_const_handle();
+
+      geninfo<EF_pair>::access(info(e)).second =
+      geninfo<EF_pair>::access(info(twin(e))).second = f;
+      #else
+      info(e)=EF_pair(Halfedge_const_handle(),f);
+      info(twin(e))=EF_pair(Halfedge_const_handle(),f);
+      #endif
+      CGAL_NEF_TRACEN("CT_new_edge "<<PE(e));
+    }
+  };
+
+  void triangulate_CT() const
+  {
+    CGAL_NEF_TRACEN("triangulate_CT");
+    typedef CGAL::Constrained_triang_traits<
+      Decorator,Geometry,CT_new_edge> NCTT;
+    typedef CGAL::generic_sweep<NCTT> Constrained_triang_sweep;
+    CT_new_edge NE(CT,*this);
+    Constrained_triang_sweep T(NE,CT.plane_map(),this->K); T.sweep();
+  }
+
+  void minimize_weight_CT() const
+  { CGAL_NEF_TRACEN("minimize_weight_CT");
+    if ( this->number_of_vertices() < 2 ) return;
+    std::list<Halfedge_handle> S;
+    /* We maintain a stack |S| of edges containing diagonals
+       which might have to be flipped. */
+    int flip_count = 0;
+    Halfedge_iterator e;
+    for (e = CT.halfedges_begin(); e != CT.halfedges_end(); ++(++e)) {
+      Halfedge_const_handle e_org = input_halfedge(e);
+      if ( e_org != Halfedge_const_handle() )
+        continue;
+      S.push_back(e);
+    }
+
+    while ( !S.empty() ) {
+      Halfedge_handle e = S.front(); S.pop_front();
+      Halfedge_handle r = twin(e);
+      Halfedge_const_handle e_org = input_halfedge(e);
+      if ( e_org != Halfedge_const_handle() )
+        continue;
+      Halfedge_handle e1 = next(r);
+      Halfedge_handle e3 = next(e);
+      // e1,e3: edges of quadrilateral with diagonal e
+
+      Point a = point(source(e1));
+      Point b = point(target(e1));
+      Point c = point(source(e3));
+      Point d = point(target(e3));
+
+      if (! (this->K.orientation(b,d,a) > 0 && // left_turn
+             this->K.orientation(b,d,c) < 0) ) // right_turn
+        continue;
+
+      if ( this->K.first_pair_closer_than_second(b,d,a,c) ) { // flip
+        CGAL_NEF_TRACEN("flipping diagonal of quadilateral"<<a<<b<<c<<d);
+        Halfedge_handle e2 = next(e1);
+        Halfedge_handle e4 = next(e3);
+        S.push_back(e1);
+        S.push_back(e2);
+        S.push_back(e3);
+        S.push_back(e4);
+        flip_diagonal(e);
+        flip_count++;
+      }
+
+
+    }
+    CGAL_NEF_TRACEN("  flipped "<<flip_count);
+  }
+
+public:
+  /*{\Mcreation 3}*/
+
+  PM_point_locator() {
+    #ifdef CGAL_USING_PPL
+    pPPL = 0;
+    #endif
+
+  }
+
+  /*{\Moptions constref=yes}*/
+  PM_point_locator(const Plane_map& P, const Geometry& k = Geometry());
+  /*{\Mcreate constructs a point locator working on |P|.}*/
+
+  ~PM_point_locator();
+
+  /*{\Moperations 2.5 0.5}*/
+
+  const Decorator& triangulation() const { return CT; }
+  /*{\Mop access to the constrained triangulation structure that
+  is superimposed to |P|.}*/
+  /*{\Moptions constref=no}*/
+
+
+  Object_handle locate(const Point& p) const
+  /*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
+  face) of |P| which contains the point |p| in its relative
+  interior.}*/
+  {
+    Object_handle h = LOCATE_IN_TRIANGULATION(p);
+    Vertex_const_handle v_triang;
+    if ( assign(v_triang,h) ) {
+      return input_object(v_triang);
+    }
+    Halfedge_const_handle e_triang;
+    if ( assign(e_triang,h) ) {
+      Halfedge_const_handle e = input_halfedge(e_triang);
+      if ( e == Halfedge_const_handle() ) // inserted during triangulation
+        return make_object(input_face(e_triang));
+      int orientation_ = this->K.orientation(segment(e),p);
+      if ( orientation_ == 0 ) return make_object(e);
+      if ( orientation_ < 0 )  return make_object(face(twin(e)));
+      if ( orientation_ > 0 )  return make_object(face(e));
+    }
+    CGAL_assertion(!check_tag(typename Is_extended_kernel<Geometry>::value_type()));
+    return make_object(Face_const_handle(faces_begin()));
+    //    CGAL_error(); return h; // compiler warning
+  }
+
+  bool ray_shoot_from_outer_facet(Segment& , object_kind& ,
+				  Vertex_const_handle &,
+				  Halfedge_const_handle& ,
+				  const Tag_true& ) const {
+    return false;
+  }
+
+  bool ray_shoot_from_outer_facet(Segment& s, object_kind& current,
+				  Vertex_const_handle &v,
+				  Halfedge_const_handle& e,
+				  const Tag_false& ) const {
+    CGAL_NEF_TRACEN("target on outer facet");
+    Point p = this->K.source(s);
+    Vertex_const_handle v1 = CT.vertices_begin();
+    Halfedge_const_handle e1 = CT.twin(CT.first_out_edge(v1));
+    Halfedge_around_face_const_circulator circ(e1), end(circ);
+    Point i;
+    Segment seg;
+    bool found = false;
+    CGAL_For_all(circ, end) {
+      //	std::cerr << s << std::endl;
+      //	std::cerr << point(source(circ)) << "->" << point(target(circ)) << std::endl;
+      Object o = intersection(s, Segment(point(source(circ)),
+					 point(target(circ))));
+
+      if(assign(i,o)) {
+	CGAL_NEF_TRACEN("intersection in point " << i);
+	found = true;
+	s = Segment(p,i);
+	if(i == point(source(circ))) {
+	  current = VERTEX;
+	  v = source(circ);
+	} else if(i == point(target(circ))) {
+	  current = VERTEX;
+	  v = target(circ);
+	} else {
+	  current = EDGE_CROSSING;
+	  e = circ;
+	}
+      } else if(assign(seg,o)) {
+	found = true;
+	CGAL_NEF_TRACEN("overlap of segments");
+	current = EDGE_COLLINEAR;
+	e = circ;
+      }
+    }
+    return found;
+  }
+
+  template <typename Object_predicate>
+  Object_handle ray_shoot(const Segment& ss, const Object_predicate& M) const
+  /*{\Mop returns an |Object_handle o| which can be converted to a
+  |Vertex_const_handle|, |Halfedge_const_handle|, |Face_const_handle|
+  |h| as described above.  The object predicate |M| has to have
+  function operators\\
+  |bool operator() (const Vertex_/ Halfedge_/Face_const_handle&) const|.\\
+  The object returned is intersected by the segment |s| and has minimal
+  distance to |s.source()| and |M(h)| holds on the converted object. The
+  operation returns the null handle |NULL| if the ray shoot along |s|
+  does not hit any object |h| of |P| with |M(h)|.}*/
+  { Segment s(ss);
+    CGAL_NEF_TRACEN("ray_shoot "<<s);
+    CGAL_assertion( !this->K.is_degenerate(s) );
+    Point p = this->K.source(s);
+    Direction d = this->K.construct_direction(p,s.target());
+    Vertex_const_handle v;
+    Halfedge_const_handle e;
+    object_kind current;
+    Object_handle h = LOCATE_IN_TRIANGULATION(p);
+    if ( assign(v,h) ) {
+      CGAL_NEF_TRACEN("located vertex "<<PV(v));
+      current = VERTEX;
+    } else if ( assign(e,h) ) {
+      CGAL_NEF_TRACEN("located edge "<<PE(e));
+      int orientation_ = this->K.orientation( segment(e), p);
+      if ( orientation_ == 0 ) { // p on segment
+        CGAL_NEF_TRACEN("on edge "<<PE(e));
+        if ( d == CT.direction(e) )
+        { current = EDGE_COLLINEAR; }
+        else if ( d == CT.direction(CT.twin(e)) )
+        { e = CT.twin(e); current = EDGE_COLLINEAR; }
+        else { // crossing
+          current = EDGE_CROSSING;
+          if ( !(this->K.orientation(CT.segment(e),s.target())>0) ) // not left_turn
+            e = CT.twin(e);
+        }
+
+      } else { // p not on segment, thus in triangle
+        if ( orientation_ < 0  ) e = CT.twin(e);
+        // now p left of e
+        CGAL_NEF_TRACEN("in face at "<<PE(e));
+        if ( M(input_face(e)) ) // face mark
+          return make_object(input_face(e));
+
+        Point p1 = CT.point(CT.source(e)),
+              p2 = CT.point(CT.target(e)),
+              p3 = CT.point(CT.target(next(e)));
+        int or1 = this->K.orientation(p,s.target(),p1);
+        int or2 = this->K.orientation(p,s.target(),p2);
+        int or3 = this->K.orientation(p,s.target(),p3);
+        if ( or1 == 0 && !this->K.left_turn(p1,p2,s.target()) )
+        { v = CT.source(e); current = VERTEX; }
+        else if ( or2 == 0 && !this->K.left_turn(p2,p3,s.target()) )
+        { v = CT.target(e); current = VERTEX; }
+        else if ( or3 == 0 && !this->K.left_turn(p3,p1,s.target()) )
+        { v = CT.target(CT.next(e)); current = VERTEX; }
+        else if ( or2 > 0 && or1 < 0 && !this->K.left_turn(p1,p2,s.target()) )
+        { e = CT.twin(e); current = EDGE_CROSSING; }
+        else if ( or3 > 0 && or2 < 0 && !this->K.left_turn(p2,p3,s.target()) )
+        { e = CT.twin(CT.next(e)); current = EDGE_CROSSING; }
+        else if ( or1 > 0 && or3 < 0 && !this->K.left_turn(p3,p1,s.target()) )
+        { e = CT.twin(CT.previous(e)); current = EDGE_CROSSING; }
+        else return Object_handle();
+
+      }
+    } else {
+
+      if(check_tag(typename Is_extended_kernel<Geometry>::value_type())) {
+	CGAL_error_msg( "code is only for Bounded_kernel");
+      }
+      if(!ray_shoot_from_outer_facet(s,current,v,e,typename Is_extended_kernel<Geometry>::value_type()))
+	return Object_handle();
+    }
+
+    CGAL_NEF_TRACEN("current = " << current);
+    if(current == VERTEX){
+      CGAL_NEF_TRACEN(point(v));
+    }
+    while (true) switch ( current ) {
+      case VERTEX:
+        { CGAL_NEF_TRACEN("vertex "<<CT.point(v));
+          Vertex_const_handle v_org = input_vertex(v);
+          if ( M(v_org) ) return make_object(v_org);
+          if ( CT.point(v) == s.target() ) return Object_handle();
+          // stop walking at s.target(), or determine next object on s:
+          bool collinear;
+          Halfedge_const_handle e_out = CT.out_wedge(v,d,collinear);
+          if (collinear) // ray shoot via e_out
+          { e = e_out; current = EDGE_COLLINEAR; }
+          else { // ray shoot in wedge left of e_out
+            if ( M(input_face(e_out)) )
+              return make_object(input_face(e_out));
+            e = CT.twin(CT.next(e_out)); current = EDGE_CROSSING;
+          }
+        }
+
+        break;
+      case EDGE_CROSSING:
+        { CGAL_NEF_TRACEN("crossing edge "<<segment(e));
+          if ( this->K.orientation(CT.segment(e),s.target()) == 0 )
+            return Object_handle();
+          Halfedge_const_handle e_org = input_halfedge(e);
+          if ( e_org != Halfedge_const_handle() ) { // not a CT edge
+            if ( M(e_org) ) return make_object(e_org);
+            if ( M(face(e_org)) ) return make_object(face(e_org));
+          }
+          Vertex_const_handle v_cand = CT.target(CT.next(e));
+          CGAL_NEF_TRACEN("v_cand "<<PV(v_cand));
+          int orientation_ = this->K.orientation(p,s.target(),CT.point(v_cand));
+          switch( orientation_ ) {
+            case 0:
+              v = v_cand; current = VERTEX; break;
+            case +1:
+              e = CT.twin(CT.next(e)); current = EDGE_CROSSING; break;
+            case -1:
+              e = CT.twin(CT.previous(e)); current = EDGE_CROSSING; break;
+          }
+        }
+
+        break;
+      case EDGE_COLLINEAR:
+        { CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
+          Halfedge_const_handle e_org = input_halfedge(e);
+          if ( e_org == Halfedge_const_handle() ) { // a CT edge
+            if ( M(input_face(e)) )
+              return make_object(input_face(e));
+          } else { // e_org is not a CT edge
+            if ( M(e_org) )
+              return make_object(e_org);
+          }
+          if ( this->K.strictly_ordered_along_line(
+                 CT.point(CT.source(e)),s.target(),CT.point(CT.target(e))) )
+            return Object_handle();
+          v = CT.target(e); current = VERTEX;
+        }
+
+        break;
+    }
+    // CGAL_error(); return h; // compiler warning
+  }
+
+  bool within_outer_cycle(Vertex_const_handle ,
+			  const Point& , const Tag_true& ) const {
+    return true;
+  }
+
+  bool within_outer_cycle(Vertex_const_handle v,
+			  const Point& q, const Tag_false& ) const {
+    typedef Project_halfedge_point<typename Decorator::Halfedge, Point> Project;
+    typedef Circulator_project<Halfedge_around_face_const_circulator,
+      Project, const Point&, const Point*> Circulator;
+    typedef Container_from_circulator<Circulator> Container;
+
+    Halfedge_const_handle e_min = CT.twin(CT.first_out_edge(v));
+    Halfedge_around_face_const_circulator circ(e_min);
+    Circulator c(circ);
+    Container ct(c);
+    if(is_empty_range(ct.begin(), ct.end()) ||
+       bounded_side_2(ct.begin(), ct.end(),q) == CGAL::ON_UNBOUNDED_SIDE)
+      return false;
+
+    return true;
+  }
+
+  Object_handle walk_in_triangulation(const Point& p) const;
+
+}; // PM_point_locator<PM_decorator_,Geometry_>
+
+
+#ifdef CGAL_USING_PPL
+static const char* const pointlocationversion ="point location via pers dicts";
+#else
+static const char* const pointlocationversion ="point location via seg walks";
+#endif
+
+template <typename PMD, typename GEO>
+PM_point_locator<PMD,GEO>::
+PM_point_locator(const Plane_map& P, const Geometry& k) :
+  Base(P,k), CT(*(new Plane_map),k)
+
+{ CGAL_NEF_TRACEN("PM_point_locator construction");
+  CT.clone_skeleton(P,CT_link_to_original(CT,*this));
+  triangulate_CT();
+  minimize_weight_CT();
+  #ifdef CGAL_USING_PPL
+  pPPL = new PMPP_locator(CT,PMPPLT(K));
+  #endif
+
+}
+
+template <typename PMD, typename GEO>
+PM_point_locator<PMD,GEO>::
+~PM_point_locator()
+{ CGAL_NEF_TRACEN("clear_static_point_locator");
+  Vertex_iterator vit, vend = CT.vertices_end();
+  for (vit = CT.vertices_begin(); vit != vend; ++vit) {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<VF_pair>::clear(CT.info(vit));
+    #else
+    CT.info(vit)=boost::any();
+    #endif
+  }
+  Halfedge_iterator eit, eend = CT.halfedges_end();
+  for (eit = CT.halfedges_begin(); eit != eend; ++eit) {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<EF_pair>::clear(CT.info(eit));
+    #else
+    CT.info(eit)=boost::any();
+    #endif
+  }
+  CT.clear();
+  delete &(CT.plane_map());
+  #ifdef CGAL_USING_PPL
+  delete pPPL; pPPL=0;
+  #endif
+}
+
+template <typename PMD, typename GEO>
+typename PM_point_locator<PMD,GEO>::Object_handle
+PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
+{
+  CGAL_NEF_TRACEN("walk in triangulation "<<q);
+
+  Vertex_const_handle v = CT.vertices_begin();
+
+  if(!check_tag(typename Is_extended_kernel<GEO>::value_type()))
+    if(!within_outer_cycle(v,q,typename Is_extended_kernel<Geometry>::value_type()))
+      return Object_handle();
+
+  Halfedge_const_handle e;
+  Point p = CT.point(v);
+  if ( p == q ) return make_object(v);
+  //  Segment s = this->K.construct_segment(p,q);
+  Direction dir = this->K.construct_direction(p,q);
+  object_kind current = VERTEX;
+  while (true) switch ( current ) {
+    case VERTEX:
+      {
+        CGAL_NEF_TRACEN("vertex "<<CT.point(v));
+        if ( CT.point(v) == q )
+          return make_object(v); // stop walking at q
+        bool collinear;
+        Halfedge_const_handle e_out = CT.out_wedge(v,dir,collinear);
+        if (collinear) // ray shoot via e_out
+        { e = e_out; current = EDGE_COLLINEAR; }
+        else  // ray shoot in wedge left of e_out
+        { e = CT.twin(CT.next(e_out)); current = EDGE_CROSSING; }
+      }
+
+      break;
+    case EDGE_CROSSING:
+      { CGAL_NEF_TRACEN("crossing edge "<<CT.segment(e));
+        if ( !(this->K.orientation(CT.segment(e),q) > 0) ) // q not left of e
+          return make_object(e);
+        Vertex_const_handle v_cand = CT.target(CT.next(e));
+        int orientation_ = this->K.orientation(p,q,CT.point(v_cand));
+        switch( orientation_ ) {
+          case 0:  // collinear
+            if ( this->K.strictly_ordered_along_line(p,q,CT.point(v_cand)) )
+              return make_object(e);
+            v = v_cand; current = VERTEX; break;
+          case +1: // left_turn
+            e = twin(next(e)); current = EDGE_CROSSING; break;
+          case -1:
+            e = twin(previous(e)); current = EDGE_CROSSING; break;
+        }
+      }
+
+      break;
+    case EDGE_COLLINEAR:
+      { CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
+        if ( this->K.strictly_ordered_along_line(
+               CT.point(CT.source(e)),q,CT.point(CT.target(e))) )
+          return make_object(e);
+        v = CT.target(e); current = VERTEX;
+      }
+
+      break;
+  }
+  return Object_handle(); // never reached warning acceptable
+}
+
+} //namespace CGAL
+
+#endif // CGAL_PM_POINT_LOCATOR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial.h
new file mode 100644
index 0000000..ae99f11
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial.h
@@ -0,0 +1,1979 @@
+// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+//                 Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+
+#ifndef CGAL_NEF_2_POLYNOMIAL_H
+#define CGAL_NEF_2_POLYNOMIAL_H
+
+#include <CGAL/basic.h>
+#include <CGAL/kernel_assertions.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/number_type_basic.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/IO/io.h>
+#include <cstddef>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 3
+#include <CGAL/Nef_2/debug.h>
+#include <vector>
+
+
+
+namespace CGAL {
+
+namespace Nef {
+
+template <class NT> class Polynomial_rep;
+
+// SPECIALIZE_CLASS(NT,int double) START
+// CLASS TEMPLATE NT: 
+template <class NT> class Polynomial;
+// CLASS TEMPLATE int: 
+template <> class Polynomial<int> ;
+// CLASS TEMPLATE double: 
+template <> class Polynomial<double> ;
+// SPECIALIZE_CLASS(NT,int double) END
+
+
+
+/*{\Mtext \headerline{Range template}}*/
+
+
+template <class Forward_iterator>
+typename std::iterator_traits<Forward_iterator>::value_type 
+gcd_of_range(Forward_iterator its, Forward_iterator ite, Unique_factorization_domain_tag)
+/*{\Mfunc calculates the greates common divisor of the
+set of numbers $\{ |*its|, |*++its|, \ldots, |*it| \}$ of type |NT|,
+where |++it == ite| and |NT| is the value type of |Forward_iterator|. 
+\precond there exists a pairwise gcd operation |NT gcd(NT,NT)| and 
+|its!=ite|.}*/
+{ CGAL_assertion(its!=ite);
+  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
+  NT res = *its++;
+  for(; its!=ite; ++its) res = 
+    (*its==0 ? res : CGAL_NTS gcd(res, *its));
+  if (res==0) res = 1;
+  return res;
+}
+
+template <class Forward_iterator>
+typename std::iterator_traits<Forward_iterator>::value_type 
+gcd_of_range(Forward_iterator its, Forward_iterator ite, Integral_domain_without_division_tag)
+/*{\Mfunc calculates the greates common divisor of the
+set of numbers $\{ |*its|, |*++its|, \ldots, |*it| \}$ of type |NT|,
+where |++it == ite| and |NT| is the value type of |Forward_iterator|. 
+\precond |its!=ite|.}*/
+{ CGAL_assertion(its!=ite);
+  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
+  NT res = *its++;
+  for(; its!=ite; ++its) res = 
+    (*its==0 ? res : 1);
+  if (res==0) res = 1;
+  return res;
+}
+
+template <class Forward_iterator>
+typename std::iterator_traits<Forward_iterator>::value_type 
+gcd_of_range(Forward_iterator its, Forward_iterator ite)
+{
+    
+  typedef typename std::iterator_traits<Forward_iterator>::value_type NT;
+  typedef CGAL::Algebraic_structure_traits<NT> AST;
+  return gcd_of_range(its,ite,typename AST::Algebraic_category());
+}
+
+
+template <class NT>  inline Polynomial<NT>
+  operator - (const Polynomial<NT>&);
+template <class NT>  Polynomial<NT>
+  operator + (const Polynomial<NT>&, const Polynomial<NT>&);
+template <class NT>  Polynomial<NT>
+  operator - (const Polynomial<NT>&, const Polynomial<NT>&);
+template <class NT>  Polynomial<NT>
+  operator * (const Polynomial<NT>&, const Polynomial<NT>&);
+template <class NT> Polynomial<NT>
+  operator / (const Polynomial<NT>&, const Polynomial<NT>&);
+template <class NT> Polynomial<NT>
+  operator % (const Polynomial<NT>&, const Polynomial<NT>&);
+
+template<class NT> CGAL::Sign 
+  sign(const Polynomial<NT>& p);
+
+template <class NT> double 
+  to_double(const Polynomial<NT>& p) ;
+template <class NT> bool 
+  is_valid(const Polynomial<NT>& p) ;
+template <class NT> bool 
+  is_finite(const Polynomial<NT>& p) ;
+
+template<class NT>  
+  std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p);
+template <class NT>  
+  std::istream& operator >> (std::istream& is, Polynomial<NT>& p);
+
+
+  // lefthand side
+template<class NT> inline Polynomial<NT> operator + 
+  (const NT& num, const Polynomial<NT>& p2);
+template<class NT> inline Polynomial<NT> operator - 
+  (const NT& num, const Polynomial<NT>& p2);
+template<class NT> inline Polynomial<NT> operator * 
+  (const NT& num, const Polynomial<NT>& p2);
+template<class NT> inline Polynomial<NT> operator / 
+  (const NT& num, const Polynomial<NT>& p2);
+template<class NT> inline Polynomial<NT> operator % 
+  (const NT& num, const Polynomial<NT>& p2);
+
+  // righthand side
+template<class NT> inline Polynomial<NT> operator + 
+  (const Polynomial<NT>& p1, const NT& num);
+template<class NT> inline Polynomial<NT> operator - 
+  (const Polynomial<NT>& p1, const NT& num);
+template<class NT> inline Polynomial<NT> operator * 
+  (const Polynomial<NT>& p1, const NT& num);
+template<class NT> inline Polynomial<NT> operator / 
+  (const Polynomial<NT>& p1, const NT& num);
+template<class NT> inline Polynomial<NT> operator % 
+  (const Polynomial<NT>& p1, const NT& num);
+
+
+  // lefthand side
+template<class NT> inline bool operator ==  
+  (const NT& num, const Polynomial<NT>& p);
+template<class NT> inline bool operator != 
+  (const NT& num, const Polynomial<NT>& p);
+template<class NT> inline bool operator <  
+  (const NT& num, const Polynomial<NT>& p);
+template<class NT> inline bool operator <=  
+  (const NT& num, const Polynomial<NT>& p);
+template<class NT> inline bool operator >  
+  (const NT& num, const Polynomial<NT>& p);
+template<class NT> inline bool operator >=  
+  (const NT& num, const Polynomial<NT>& p);
+
+  // righthand side
+template<class NT> inline bool operator ==
+  (const Polynomial<NT>& p, const NT& num);
+template<class NT> inline bool operator !=
+  (const Polynomial<NT>& p, const NT& num);
+template<class NT> inline bool operator < 
+  (const Polynomial<NT>& p, const NT& num);
+template<class NT> inline bool operator <= 
+  (const Polynomial<NT>& p, const NT& num);
+template<class NT> inline bool operator > 
+  (const Polynomial<NT>& p, const NT& num);
+template<class NT> inline bool operator >=
+  (const Polynomial<NT>& p, const NT& num);
+
+
+
+template <class pNT> class Polynomial_rep { 
+  typedef pNT NT;
+
+  typedef std::vector<NT> Vector;
+
+
+  typedef typename Vector::size_type      size_type;
+  typedef typename Vector::iterator       iterator;
+  typedef typename Vector::const_iterator const_iterator;
+  Vector coeff;
+
+  Polynomial_rep() : coeff(0) {}
+  Polynomial_rep(const NT& n) : coeff(1) { coeff[0]=n; }
+  Polynomial_rep(const NT& n, const NT& m) : coeff(2)
+    { coeff[0]=n; coeff[1]=m; }
+  Polynomial_rep(const NT& a, const NT& b, const NT& c) : coeff(3)
+    { coeff[0]=a; coeff[1]=b; coeff[2]=c; }
+  Polynomial_rep(size_type s) : coeff(s,NT(0)) {}
+
+
+  template <class Forward_iterator>
+  Polynomial_rep(std::pair<Forward_iterator,Forward_iterator> poly) 
+    : coeff(poly.first,poly.second) {}
+
+
+  void reduce() 
+  { while ( coeff.size()>1 && coeff.back()==NT(0) ) coeff.pop_back(); }
+
+  friend class Polynomial<pNT>;
+  friend class Polynomial<int>;
+  friend class Polynomial<double>;
+  friend std::istream& operator >> <> (std::istream&, Polynomial<NT>&);
+
+};
+
+// SPECIALIZE_CLASS(NT,int double) START
+// CLASS TEMPLATE NT: 
+/*{\Msubst 
+typename iterator_traits<Forward_iterator>::value_type#NT
+<>#
+}*/
+
+/*{\Manpage{Polynomial}{NT}{Polynomials in one variable}{p}}*/
+
+template <class pNT> class Polynomial : 
+  public Handle_for< Polynomial_rep<pNT> >
+{
+/*  {\Mdefinition An instance |\Mvar| of the data type |\Mname| represents
+  a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |NT[x]|. 
+  The data type offers standard ring operations and a sign operation which 
+  determines the sign for the limit process $x \rightarrow \infty$. 
+
+  |NT[x]| becomes a unique factorization domain, if the number type
+  |NT| is either a field type (1) or a unique factorization domain
+  (2). In both cases there's a polynomial division operation defined.}
+*/
+
+  /*{\Mtypes 5}*/
+  public:
+  typedef pNT NT;
+  
+  typedef Handle_for< Polynomial_rep<NT> > Base;
+  typedef Polynomial_rep<NT> Rep;
+  typedef typename Rep::Vector    Vector;
+  typedef typename Rep::size_type size_type;
+  typedef typename Rep::iterator  iterator;
+
+  typedef typename Rep::const_iterator const_iterator;
+  /*{\Mtypemember a random access iterator for read-only access to the
+  coefficient vector.}*/
+
+  //protected:
+  void reduce() { this->ptr()->reduce(); }
+  Vector& coeffs() { return this->ptr()->coeff; }
+  const Vector& coeffs() const { return this->ptr()->coeff; }
+  Polynomial(size_type s) : Base( Polynomial_rep<NT>(s) ) {}
+  // creates a polynomial of degree s-1
+
+
+  /*{\Mcreation 3}*/
+  public:
+
+  Polynomial()
+  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| of undefined
+  value. }*/
+    : Base( Polynomial_rep<NT>() ) {}
+   
+  Polynomial(const NT& a0)
+  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the constant polynomial $a_0$.}*/
+    : Base(Polynomial_rep<NT>(a0)) { reduce(); }
+
+  Polynomial(NT a0, NT a1) 
+  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x$. }*/
+    : Base(Polynomial_rep<NT>(a0,a1)) { reduce(); }
+
+  Polynomial(const NT& a0, const NT& a1,const NT& a2)
+  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
+    : Base(Polynomial_rep<NT>(a0,a1,a2)) { reduce(); }
+
+  template <class Forward_iterator>
+  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
+  /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial whose coefficients are determined by the iterator range,
+  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
+  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
+  \ldots a_d x^d$.}*/
+    : Base(Polynomial_rep<NT>(poly)) { reduce(); }
+
+
+  // KILL double START
+  Polynomial(double n) : Base(Polynomial_rep<NT>(NT(n))) { reduce(); }
+  Polynomial(double n1, double n2) 
+    : Base(Polynomial_rep<NT>(NT(n1),NT(n2))) { reduce(); }
+  // KILL double END
+
+  // KILL int START
+  Polynomial(int n) : Base(Polynomial_rep<NT>(NT(n))) { reduce(); }
+  Polynomial(int n1, int n2)
+    : Base(Polynomial_rep<NT>(NT(n1),NT(n2))) { reduce(); }
+  // KILL int END
+
+  Polynomial(const Polynomial<NT>& p) : Base(p) {}
+
+  //protected: // accessing coefficients internally:
+  NT& coeff(unsigned int i) 
+  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
+    return this->ptr()->coeff[i]; 
+  }
+  public:
+
+  /*{\Moperations 3 3 }*/
+  const_iterator begin() const { return this->ptr()->coeff.begin(); }
+  /*{\Mop a random access iterator pointing to $a_0$.}*/
+  const_iterator end()   const { return this->ptr()->coeff.end(); }
+  /*{\Mop a random access iterator pointing beyond $a_d$.}*/
+
+  int degree() const 
+  { return  static_cast<int>(this->ptr()->coeff.size())-1; } 
+  /*{\Mop the degree of the polynomial.}*/
+
+  const NT& operator[](unsigned int i) const 
+  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
+    return this->ptr()->coeff[i]; }
+  //{\Marrop the coefficient $a_i$ of the polynomial.}
+
+  NT operator()(unsigned int i) const
+  { 
+    if(i<(this->ptr()->coeff.size()))
+      return this->ptr()->coeff[i];
+    return 0;
+  }
+
+  NT eval_at(const NT& r) const
+  /*{\Mop evaluates the polynomial at |r|.}*/
+  { CGAL_assertion( degree()>=0 );
+    NT res = this->ptr()->coeff[0], x = r;
+    for(int i=1; i<=degree(); ++i) 
+    { res += this->ptr()->coeff[i]*x; x*=r; }
+    return res; 
+  }
+
+  CGAL::Sign sign() const
+  /*{\Mop returns the sign of the limit process for $x \rightarrow \infty$
+  (the sign of the leading coefficient).}*/
+  { const NT& leading_coeff = this->ptr()->coeff.back();
+    if (degree() < 0) return CGAL::ZERO;
+    if (leading_coeff < NT(0)) return (CGAL::NEGATIVE);
+    if (leading_coeff > NT(0)) return (CGAL::POSITIVE);
+    return CGAL::ZERO;
+  }
+
+  bool is_zero() const
+  /*{\Mop returns true iff |\Mvar| is the zero polynomial.}*/
+  { return degree()==0 && this->ptr()->coeff[0]==NT(0); }
+
+  Polynomial<NT> abs() const
+  /*{\Mop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
+  otherwise.}*/
+  { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; }
+
+
+  NT content() const
+  /*{\Mop returns the content of |\Mvar| (the gcd of its coefficients).}*/
+  { CGAL_assertion( degree()>=0 );
+    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
+  }
+
+
+  /*{\Mtext Additionally |\Mname| offers standard arithmetic ring
+  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
+  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
+  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
+  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
+  
+   friend Polynomial<NT>
+   operator - <>  (const Polynomial<NT>&);
+                          
+  friend Polynomial<NT>
+    operator + <> (const Polynomial<NT>&, const Polynomial<NT>&);
+
+  friend Polynomial<NT>
+    operator - <> (const Polynomial<NT>&, const Polynomial<NT>&);
+
+  friend Polynomial<NT>
+    operator * <> (const Polynomial<NT>&, const Polynomial<NT>&);
+
+  friend 
+  Polynomial<NT>  operator / <> 
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2);
+  
+  /*{\Mbinopfunc implements polynomial division of |p1| and |p2|. if
+  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
+  does not exist in |NT[x]|.  The correct division algorithm is chosen
+  according to a number type traits class.
+  If |Number_type_traits<NT>::Has_gcd == Tag_true| then the division is
+  done by \emph{pseudo division} based on a |gcd| operation of |NT|.  If
+  |Number_type_traits<NT>::Has_gcd == Tag_false| then the division is done
+  by \emph{euclidean division} based on the division operation of the
+  field |NT|.
+
+  \textbf{Note} that |NT=int| quickly leads to overflow
+  errors when using this operation.}*/
+
+  /*{\Mtext \headerline{Static member functions}}*/
+
+  static Polynomial<NT> gcd
+    (const Polynomial<NT>& p1, const Polynomial<NT>& p2);
+  /*{\Mstatic returns the greatest common divisor of |p1| and |p2|.
+  \textbf{Note} that |NT=int| quickly leads to overflow errors when
+  using this operation.  \precond Requires |NT| to be a unique
+  factorization domain, i.e. to provide a |gcd| operation.}*/
+
+  static void pseudo_div
+    (const Polynomial<NT>& f, const Polynomial<NT>& g, 
+     Polynomial<NT>& q, Polynomial<NT>& r, NT& D);
+  /*{\Mstatic implements division with remainder on polynomials of 
+  the ring |NT[x]|: $D*f = g*q + r$.  \precond |NT| is a unique
+  factorization domain, i.e., there exists a |gcd| operation and an
+  integral division operation on |NT|.}*/
+
+  static void euclidean_div 
+    (const Polynomial<NT>& f, const Polynomial<NT>& g, 
+     Polynomial<NT>& q, Polynomial<NT>& r);
+  /*{\Mstatic implements division with remainder on polynomials of 
+  the ring |NT[x]|: $f = g*q + r$.  \precond |NT| is a field, i.e.,
+  there exists a division operation on |NT|.  }*/
+
+  friend double to_double <> (const Polynomial<NT>& p);
+
+
+  Polynomial<NT>& operator += (const Polynomial<NT>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) += p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<NT>& operator -= (const Polynomial<NT>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<NT>& operator *= (const Polynomial<NT>& p1)
+  { (*this)=(*this)*p1; return (*this); }
+
+  Polynomial<NT>& operator /= (const Polynomial<NT>& p1)
+  { (*this)=(*this)/p1; return (*this); }
+
+  Polynomial<NT>& operator %= (const Polynomial<NT>& p1)
+  { (*this)=(*this)%p1; return (*this); }
+
+
+  //------------------------------------------------------------------
+  // SPECIALIZE_MEMBERS(int double) START
+    
+  Polynomial<NT>& operator += (const NT& num)
+  { this->copy_on_write();
+    coeff(0) += (NT)num; return *this; }
+
+  Polynomial<NT>& operator -= (const NT& num)
+  { this->copy_on_write();
+    coeff(0) -= (NT)num; return *this; }
+
+  Polynomial<NT>& operator *= (const NT& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator /= (const NT& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator %= (const NT& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
+    reduce(); return *this; }
+
+// SPECIALIZING_MEMBERS FOR const int& 
+    
+  Polynomial<NT>& operator += (const int& num)
+  { this->copy_on_write();
+    coeff(0) += (NT)num; return *this; }
+
+  Polynomial<NT>& operator -= (const int& num)
+  { this->copy_on_write();
+    coeff(0) -= (NT)num; return *this; }
+
+  Polynomial<NT>& operator *= (const int& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator /= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator %= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
+    reduce(); return *this; }
+
+// SPECIALIZING_MEMBERS FOR const double& 
+    
+  Polynomial<NT>& operator += (const double& num)
+  { this->copy_on_write();
+    coeff(0) += (NT)num; return *this; }
+
+  Polynomial<NT>& operator -= (const double& num)
+  { this->copy_on_write();
+    coeff(0) -= (NT)num; return *this; }
+
+  Polynomial<NT>& operator *= (const double& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator /= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (NT)num; 
+    reduce(); return *this; }
+
+  Polynomial<NT>& operator %= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (NT)num; 
+    reduce(); return *this; }
+
+  // SPECIALIZE_MEMBERS(int double) END
+  //------------------------------------------------------------------
+
+  void minus_offsetmult(const Polynomial<NT>& p, const NT& b, int k)
+  { CGAL_assertion(!this->is_shared());
+    Polynomial<NT> s(size_type(p.degree()+k+1)); // zero entries
+    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
+    operator-=(s);
+  }
+
+};
+
+/*{\Mimplementation This data type is implemented as an item type
+via a smart pointer scheme. The coefficients are stored in a vector of
+|NT| entries.  The simple arithmetic operations $+,-$ take time
+$O(d*T(NT))$, multiplication is quadratic in the maximal degree of the
+arguments times $T(NT)$, where $T(NT)$ is the time for a corresponding
+operation on two instances of the ring type.}*/
+
+//############ POLYNOMIAL< INT > ###################################
+// CLASS TEMPLATE int: 
+/*{\Xsubst 
+ iterator_traits<Forward_iterator>::value_type#int
+<>#
+}*/
+
+/*{\Xanpage{Polynomial}{int}{Polynomials in one variable}{p}}*/
+
+template <>
+class Polynomial<int> : 
+  public Handle_for< Polynomial_rep<int> >
+{
+/*{\Xdefinition An instance |\Mvar| of the data type |\Mname| represents
+ a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |int[x]|. 
+ The data type offers standard ring operations and a sign operation which 
+ determines the sign for the limit process $x \rightarrow \infty$. 
+
+ |int[x]| becomes a unique factorization domain, if the number type
+ |int| is either a field type (1) or a unique factorization domain
+ (2). In both cases there's a polynomial division operation defined.}*/
+
+  /*{\Xtypes 5}*/
+  public:
+  typedef int NT;
+  /*{\Xtypemember the component type representing the coefficients.}*/
+
+  typedef Handle_for< Polynomial_rep<int> > Base;
+  typedef Polynomial_rep<int> Rep;
+  typedef  Rep::Vector    Vector;
+  typedef  Rep::size_type size_type;
+  typedef  Rep::iterator  iterator;
+
+  typedef  Rep::const_iterator const_iterator;
+  /*{\Xtypemember a random access iterator for read-only access to the
+  coefficient vector.}*/
+
+  //protected:
+  void reduce() { this->ptr()->reduce(); }
+  Vector& coeffs() { return this->ptr()->coeff; }
+  const Vector& coeffs() const { return this->ptr()->coeff; }
+  Polynomial(size_type s) : Base( Polynomial_rep<int>(s) ) {}
+  // creates a polynomial of degree s-1
+
+
+  /*{\Xcreation 3}*/
+  public:
+
+  Polynomial()
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| of undefined
+  value. }*/
+    : Base( Polynomial_rep<int>() ) {}
+   
+  Polynomial(const int& a0)
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the constant polynomial $a_0$.}*/
+    : Base(Polynomial_rep<int>(a0)) { reduce(); }
+
+
+  Polynomial(int a0, int a1) 
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x$. }*/
+    : Base(Polynomial_rep<int>(a0,a1)) { reduce(); }
+
+  Polynomial(const int& a0, const int& a1,const int& a2)
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
+    : Base(Polynomial_rep<int>(a0,a1,a2)) { reduce(); }
+
+
+  template <class Forward_iterator>
+  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial whose coefficients are determined by the iterator range,
+  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
+  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
+  \ldots a_d x^d$.}*/
+    : Base(Polynomial_rep<int>(poly)) { reduce(); }
+
+
+
+  // KILL double START
+  Polynomial(double n) : Base(Polynomial_rep<int>(int(n))) { reduce(); }
+  Polynomial(double n1, double n2) 
+    : Base(Polynomial_rep<int>(int(n1),int(n2))) { reduce(); }
+  // KILL double END
+
+  Polynomial(const Polynomial<int>& p) : Base(p) {}
+
+  //protected: // accessing coefficients internally:
+  int& coeff(unsigned int i) 
+  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
+    return this->ptr()->coeff[i]; 
+  }
+  public:
+
+  /*{\Xoperations 3 3 }*/
+  const_iterator begin() const { return this->ptr()->coeff.begin(); }
+  /*{\Xop a random access iterator pointing to $a_0$.}*/
+  const_iterator end()   const { return this->ptr()->coeff.end(); }
+  /*{\Xop a random access iterator pointing beyond $a_d$.}*/
+
+  int degree() const 
+  { return static_cast<int>(this->ptr()->coeff.size())-1; } 
+  /*{\Xop the degree of the polynomial.}*/
+
+  const int& operator[](unsigned int i) const 
+  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
+    return this->ptr()->coeff[i]; }
+  /*{\Xarrop the coefficient $a_i$ of the polynomial.}*/
+
+  int eval_at(const int& r) const
+  /*{\Xop evaluates the polynomial at |r|.}*/
+  { CGAL_assertion( degree()>=0 );
+    int res = this->ptr()->coeff[0], x = r;
+    for(int i=1; i<=degree(); ++i) 
+    { res += this->ptr()->coeff[i]*x; x*=r; }
+    return res; 
+  }
+
+  CGAL::Sign sign() const
+  /*{\Xop returns the sign of the limit process for $x \rightarrow \infty$
+  (the sign of the leading coefficient).}*/
+  { const int& leading_coeff = this->ptr()->coeff.back();
+    if (leading_coeff < int(0)) return (CGAL::NEGATIVE);
+    if (leading_coeff > int(0)) return (CGAL::POSITIVE);
+    return CGAL::ZERO;
+  }
+
+  bool is_zero() const
+  /*{\Xop returns true iff |\Mvar| is the zero polynomial.}*/
+  { return degree()==0 && this->ptr()->coeff[0]==int(0); }
+
+  Polynomial<int> abs() const
+  /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
+  otherwise.}*/
+  { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; }
+
+  int content() const
+  /*{\Xop returns the content of |\Mvar| (the gcd of its coefficients).
+  \precond Requires |int| to provide a |gcd| operation.}*/
+  { CGAL_assertion( degree()>=0 );
+    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
+  }
+
+  /*{\Xtext Additionally |\Mname| offers standard arithmetic ring
+  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
+  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
+  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
+  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
+
+                          
+  friend Polynomial<int>
+    operator + <> (const Polynomial<int>&, const Polynomial<int>&);
+
+  friend Polynomial<int>
+    operator - <> (const Polynomial<int>&, const Polynomial<int>&);
+
+  friend Polynomial<int>
+    operator * <> (const Polynomial<int>&, const Polynomial<int>&);
+
+  friend 
+  Polynomial<int>  operator / <> 
+  (const Polynomial<int>& p1, const Polynomial<int>& p2);
+  /*{\Xbinopfunc implements polynomial division of |p1| and |p2|. if
+  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
+  does not exist in |int[x]|.  The correct division algorithm is chosen
+  according to a number type traits class.
+  If |Number_type_traits<int>::Has_gcd == Tag_true| then the division is
+  done by \emph{pseudo division} based on a |gcd| operation of |int|.  If
+  |Number_type_traits<int>::Has_gcd == Tag_false| then the division is done
+  by \emph{euclidean division} based on the division operation of the
+  field |int|.
+
+  \textbf{Note} that |int=int| quickly leads to overflow
+  errors when using this operation.}*/
+
+  /*{\Xtext \headerline{Static member functions}}*/
+
+  CGAL_EXPORT static Polynomial<int> gcd
+    (const Polynomial<int>& p1, const Polynomial<int>& p2);
+  /*{\Xstatic returns the greatest common divisor of |p1| and |p2|.
+  \textbf{Note} that |int=int| quickly leads to overflow errors when
+  using this operation.  \precond Requires |int| to be a unique
+  factorization domain, i.e. to provide a |gcd| operation.}*/
+
+  CGAL_EXPORT static void pseudo_div
+    (const Polynomial<int>& f, const Polynomial<int>& g, 
+     Polynomial<int>& q, Polynomial<int>& r, int& D);
+  /*{\Xstatic implements division with remainder on polynomials of 
+  the ring |int[x]|: $D*f = g*q + r$.  \precond |int| is a unique
+  factorization domain, i.e., there exists a |gcd| operation and an
+  integral division operation on |int|.}*/
+
+  CGAL_EXPORT static void euclidean_div 
+    (const Polynomial<int>& f, const Polynomial<int>& g, 
+     Polynomial<int>& q, Polynomial<int>& r);
+  /*{\Xstatic implements division with remainder on polynomials of 
+  the ring |int[x]|: $f = g*q + r$.  \precond |int| is a field, i.e.,
+  there exists a division operation on |int|.  }*/
+
+  friend double to_double <> (const Polynomial<int>& p);
+
+
+  Polynomial<int>& operator += (const Polynomial<int>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) += p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<int>& operator -= (const Polynomial<int>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<int>& operator *= (const Polynomial<int>& p1)
+  { (*this)=(*this)*p1; return (*this); }
+
+  Polynomial<int>& operator /= (const Polynomial<int>& p1)
+  { (*this)=(*this)/p1; return (*this); }
+
+  Polynomial<int>& operator %= (const Polynomial<int>& p1)
+  { (*this)=(*this)%p1; return (*this); }
+
+
+  //------------------------------------------------------------------
+  // SPECIALIZE_MEMBERS(int double) START
+    
+  Polynomial<int>& operator += (const int& num)
+  { this->copy_on_write();
+    coeff(0) += (int)num; return *this; }
+
+  Polynomial<int>& operator -= (const int& num)
+  { this->copy_on_write();
+    coeff(0) -= (int)num; return *this; }
+
+  Polynomial<int>& operator *= (const int& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (int)num; 
+    reduce(); return *this; }
+
+  Polynomial<int>& operator /= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (int)num; 
+    reduce(); return *this; }
+
+  Polynomial<int>& operator %= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (int)num; 
+    reduce(); return *this; }
+
+// SPECIALIZING_MEMBERS FOR const double& 
+    
+  Polynomial<int>& operator += (const double& num)
+  { this->copy_on_write();
+    coeff(0) += (int)num; return *this; }
+
+  Polynomial<int>& operator -= (const double& num)
+  { this->copy_on_write();
+    coeff(0) -= (int)num; return *this; }
+
+  Polynomial<int>& operator *= (const double& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (int)num; 
+    reduce(); return *this; }
+
+  Polynomial<int>& operator /= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (int)num; 
+    reduce(); return *this; }
+
+  Polynomial<int>& operator %= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (int)num; 
+    reduce(); return *this; }
+
+  // SPECIALIZE_MEMBERS(int double) END
+  //------------------------------------------------------------------
+
+  void minus_offsetmult(const Polynomial<int>& p, const int& b, int k)
+  { CGAL_assertion(!is_shared());
+    Polynomial<int> s(size_type(p.degree()+k+1)); // zero entries
+    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
+    operator-=(s);
+  }
+
+};
+
+/*{\Ximplementation This data type is implemented as an item type
+via a smart pointer scheme. The coefficients are stored in a vector of
+|int| entries.  The simple arithmetic operations $+,-$ take time
+$O(d*T(int))$, multiplication is quadratic in the maximal degree of the
+arguments times $T(int)$, where $T(int)$ is the time for a corresponding
+operation on two instances of the ring type.}*/
+
+
+//############ POLYNOMIAL< INT > ###################################
+
+//############ POLYNOMIAL< DOUBLE > ################################
+
+
+// CLASS TEMPLATE double: 
+/*{\Xsubst 
+ iterator_traits<Forward_iterator>::value_type#double
+<>#
+}*/
+
+/*{\Xanpage{Polynomial}{double}{Polynomials in one variable}{p}}*/
+
+template <>
+class Polynomial<double> : 
+  public Handle_for< Polynomial_rep<double> >
+{
+/*{\Xdefinition An instance |\Mvar| of the data type |\Mname| represents
+a polynomial $p = a_0 + a_1 x + \ldots a_d x^d $ from the ring |double[x]|. 
+The data type offers standard ring operations and a sign operation which 
+determines the sign for the limit process $x \rightarrow \infty$. 
+
+|double[x]| becomes a unique factorization domain, if the number type
+|double| is either a field type (1) or a unique factorization domain
+(2). In both cases there's a polynomial division operation defined.}*/
+
+  /*{\Xtypes 5}*/
+  public:
+  typedef double NT;
+  /*{\Xtypemember the component type representing the coefficients.}*/
+
+  typedef Handle_for< Polynomial_rep<double> > Base;
+  typedef Polynomial_rep<double> Rep;
+  typedef  Rep::Vector    Vector;
+  typedef  Rep::size_type size_type;
+  typedef  Rep::iterator  iterator;
+
+  typedef  Rep::const_iterator const_iterator;
+  /*{\Xtypemember a random access iterator for read-only access to the
+  coefficient vector.}*/
+
+  //protected:
+  void reduce() { this->ptr()->reduce(); }
+  Vector& coeffs() { return this->ptr()->coeff; }
+  const Vector& coeffs() const { return this->ptr()->coeff; }
+  Polynomial(size_type s) : Base( Polynomial_rep<double>(s) ) {}
+  // creates a polynomial of degree s-1
+
+
+  /*{\Xcreation 3}*/
+  public:
+
+  Polynomial()
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| of undefined
+  value. }*/
+    : Base( Polynomial_rep<double>() ) {}
+   
+  Polynomial(const double& a0)
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the constant polynomial $a_0$.}*/
+    : Base(Polynomial_rep<double>(a0)) { reduce(); }
+
+  Polynomial(const double a0, const double a1)
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x$. }*/
+    : Base(Polynomial_rep<double>(a0,a1)) { reduce(); }
+
+  Polynomial(const double& a0, const double& a1,const double& a2)
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial $a_0 + a_1 x + a_2 x^2$. }*/
+    : Base(Polynomial_rep<double>(a0,a1,a2)) { reduce(); }
+
+  template <class Forward_iterator>
+  Polynomial(std::pair<Forward_iterator, Forward_iterator> poly) 
+  /*{\Xcreate introduces a variable |\Mvar| of type |\Mname| representing
+  the polynomial whose coefficients are determined by the iterator range,
+  i.e. let $(a_0 = |*first|, a_1 = |*++first|, \ldots a_d = |*it|)$, 
+  where |++it == last| then |\Mvar| stores the polynomial $a_1 + a_2 x + 
+  \ldots a_d x^d$.}*/
+    : Base(Polynomial_rep<double>(poly)) { reduce(); }
+
+
+
+  // KILL int START
+  Polynomial(int n) : Base(Polynomial_rep<double>(double(n))) { reduce(); }
+  Polynomial(int n1, int n2)
+    : Base(Polynomial_rep<double>(double(n1),double(n2))) { reduce(); }
+  // KILL int END
+
+  Polynomial(const Polynomial<double>& p) : Base(p) {}
+
+  //protected: // accessing coefficients internally:
+  double& coeff(unsigned int i) 
+  { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size()));
+    return this->ptr()->coeff[i]; 
+  }
+  public:
+
+  /*{\Xoperations 3 3 }*/
+  const_iterator begin() const { return this->ptr()->coeff.begin(); }
+  /*{\Xop a random access iterator pointing to $a_0$.}*/
+  const_iterator end()   const { return this->ptr()->coeff.end(); }
+  /*{\Xop a random access iterator pointing beyond $a_d$.}*/
+
+  int degree() const 
+  { return static_cast<int>(this->ptr()->coeff.size())-1; } 
+  /*{\Xop the degree of the polynomial.}*/
+
+  const double& operator[](unsigned int i) const 
+  { CGAL_assertion( i<(this->ptr()->coeff.size()) );
+    return this->ptr()->coeff[i]; }
+  /*{\Xarrop the coefficient $a_i$ of the polynomial.}*/
+
+  double eval_at(const double& r) const
+  /*{\Xop evaluates the polynomial at |r|.}*/
+  { CGAL_assertion( degree()>=0 );
+    double res = this->ptr()->coeff[0], x = r;
+    for(int i=1; i<=degree(); ++i) 
+    { res += this->ptr()->coeff[i]*x; x*=r; }
+    return res; 
+  }
+
+  CGAL::Sign sign() const
+  /*{\Xop returns the sign of the limit process for $x \rightarrow \infty$
+  (the sign of the leading coefficient).}*/
+  { const double& leading_coeff = this->ptr()->coeff.back();
+    if (leading_coeff < double(0)) return (CGAL::NEGATIVE);
+    if (leading_coeff > double(0)) return (CGAL::POSITIVE);
+    return CGAL::ZERO;
+  }
+
+  bool is_zero() const
+  /*{\Xop returns true iff |\Mvar| is the zero polynomial.}*/
+  { return degree()==0 && this->ptr()->coeff[0]==double(0); }
+
+  Polynomial<double> abs() const
+  /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| 
+  otherwise.}*/
+  { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; }
+
+
+  double content() const
+  /*{\Xop returns the content of |\Mvar| (the gcd of its coefficients).
+  \precond Requires |double| to provide a |gdc| operation.}*/
+  { CGAL_assertion( degree()>=0 );
+    return gcd_of_range(this->ptr()->coeff.begin(),this->ptr()->coeff.end());
+  }
+ 
+
+  /*{\Xtext Additionally |\Mname| offers standard arithmetic ring
+  opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can
+  also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$
+  holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant
+  to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/
+                     
+  friend Polynomial<double>
+    operator + <> (const Polynomial<double>&, const Polynomial<double>&);
+
+  friend Polynomial<double>
+    operator - <> (const Polynomial<double>&, const Polynomial<double>&);
+
+  friend Polynomial<double>
+    operator * <> (const Polynomial<double>&, const Polynomial<double>&);
+
+  friend 
+  Polynomial<double>  operator / <> 
+  (const Polynomial<double>& p1, const Polynomial<double>& p2);
+  /*{\Xbinopfunc implements polynomial division of |p1| and |p2|. if
+  |p1 = p2 * p3| then |p2| is returned. The result is undefined if |p3|
+  does not exist in |double[x]|.  The correct division algorithm is chosen
+  according to the number type traits class.
+  If |Number_type_traits<double>::Has_gcd == Tag_true| then the division is
+  done by \emph{pseudo division} based on a |gcd| operation of |double|.  If
+  |Number_type_traits<double>::Has_gcd == Tag_false| then the division is done
+  by \emph{euclidean division} based on the division operation of the
+  field |double|.
+
+  \textbf{Note} that |double=int| quickly leads to overflow
+  errors when using this operation.}*/
+
+  /*{\Xtext \headerline{Static member functions}}*/
+
+  CGAL_EXPORT static Polynomial<double> gcd
+    (const Polynomial<double>& p1, const Polynomial<double>& p2);
+  /*{\Xstatic returns the greatest common divisor of |p1| and |p2|.
+  \textbf{Note} that |double=int| quickly leads to overflow errors when
+  using this operation.  \precond Requires |double| to be a unique
+  factorization domain, i.e. to provide a |gdc| operation.}*/
+
+  CGAL_EXPORT static void pseudo_div
+    (const Polynomial<double>& f, const Polynomial<double>& g, 
+     Polynomial<double>& q, Polynomial<double>& r, double& D);
+  /*{\Xstatic implements division with remainder on polynomials of 
+  the ring |double[x]|: $D*f = g*q + r$.  \precond |double| is a unique
+  factorization domain, i.e., there exists a |gcd| operation and an
+  integral division operation on |double|.}*/
+
+  CGAL_EXPORT static void euclidean_div 
+    (const Polynomial<double>& f, const Polynomial<double>& g, 
+     Polynomial<double>& q, Polynomial<double>& r);
+  /*{\Xstatic implements division with remainder on polynomials of 
+  the ring |double[x]|: $f = g*q + r$.  \precond |double| is a field, i.e.,
+  there exists a division operation on |double|.  }*/
+
+  friend double to_double <> (const Polynomial<double>& p);
+
+
+  Polynomial<double>& operator += (const Polynomial<double>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) += p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<double>& operator -= (const Polynomial<double>& p1)
+  { this->copy_on_write();
+    int d = (std::min)(degree(),p1.degree()), i;
+    for(i=0; i<=d; ++i) coeff(i) -= p1[i];
+    while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
+    reduce(); return (*this); }
+
+  Polynomial<double>& operator *= (const Polynomial<double>& p1)
+  { (*this)=(*this)*p1; return (*this); }
+
+  Polynomial<double>& operator /= (const Polynomial<double>& p1)
+  { (*this)=(*this)/p1; return (*this); }
+
+  Polynomial<double>& operator %= (const Polynomial<double>& p1)
+  { (*this)=(*this)%p1; return (*this); }
+
+
+  //------------------------------------------------------------------
+  // SPECIALIZE_MEMBERS(int double) START
+    
+  Polynomial<double>& operator += (const double& num)
+  { this->copy_on_write();
+    coeff(0) += (double)num; return *this; }
+
+  Polynomial<double>& operator -= (const double& num)
+  { this->copy_on_write();
+    coeff(0) -= (double)num; return *this; }
+
+  Polynomial<double>& operator *= (const double& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (double)num; 
+    reduce(); return *this; }
+
+  Polynomial<double>& operator /= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (double)num; 
+    reduce(); return *this; }
+
+/*
+  Polynomial<double>& operator %= (const double& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (double)num; 
+    reduce(); return *this; }
+*/
+
+// SPECIALIZING_MEMBERS FOR const int& 
+    
+  Polynomial<double>& operator += (const int& num)
+  { this->copy_on_write();
+    coeff(0) += (double)num; return *this; }
+
+  Polynomial<double>& operator -= (const int& num)
+  { this->copy_on_write();
+    coeff(0) -= (double)num; return *this; }
+
+  Polynomial<double>& operator *= (const int& num)
+  { this->copy_on_write();
+    for(int i=0; i<=degree(); ++i) coeff(i) *= (double)num; 
+    reduce(); return *this; }
+
+  Polynomial<double>& operator /= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) /= (double)num; 
+    reduce(); return *this; }
+
+/*
+  Polynomial<double>& operator %= (const int& num)
+  { this->copy_on_write(); CGAL_assertion(num!=0);
+    for(int i=0; i<=degree(); ++i) coeff(i) %= (double)num; 
+    reduce(); return *this; }
+*/
+
+  // SPECIALIZE_MEMBERS(int double) END
+  //------------------------------------------------------------------
+
+  void minus_offsetmult(const Polynomial<double>& p, const double& b, int k)
+  { CGAL_assertion(!this->is_shared());
+    Polynomial<double> s(size_type(p.degree()+k+1)); // zero entries
+    for (int i=k; i <= s.degree(); ++i) s.coeff(i) = b*p[i-k];
+    operator-=(s);
+  }
+
+};
+
+/*{\Ximplementation This data type is implemented as an item type
+via a smart pointer scheme. The coefficients are stored in a vector of
+|double| entries.  The simple arithmetic operations $+,-$ take time
+$O(d*T(double))$, multiplication is quadratic in the maximal degree of the
+arguments times $T(double)$, where $T(double)$ is the time for a corresponding
+operation on two instances of the ring type.}*/
+
+
+//############ POLYNOMIAL< DOUBLE > ################################
+
+
+
+// SPECIALIZE_CLASS(NT,int double) END
+
+template <class NT> double to_double 
+  (const Polynomial<NT>&) 
+  { return 0; }
+
+template <class NT> bool is_valid 
+  (const Polynomial<NT>& p) 
+  { return (CGAL::is_valid(p[0])); }
+
+template <class NT> bool is_finite 
+  (const Polynomial<NT>& p) 
+  { return CGAL::is_finite(p[0]); }
+
+template <class NT> 
+Polynomial<NT> operator - (const Polynomial<NT>& p)
+{
+  CGAL_assertion(p.degree()>=0);
+  Polynomial<NT> res(std::make_pair(p.coeffs().begin(),p.coeffs().end())); 
+  typename Polynomial<NT>::iterator it, ite=res.coeffs().end();
+  for(it=res.coeffs().begin(); it!=ite; ++it) *it = -*it;
+  return res;
+}
+
+
+
+template <class NT> 
+Polynomial<NT> operator + (const Polynomial<NT>& p1, 
+                            const Polynomial<NT>& p2)
+{ 
+  typedef typename Polynomial<NT>::size_type size_type;
+  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
+  bool p1d_smaller_p2d = p1.degree() < p2.degree();
+  int min,max,i;
+  if (p1d_smaller_p2d) { min = p1.degree(); max = p2.degree(); }
+  else                 { max = p1.degree(); min = p2.degree(); }
+  Polynomial<NT>  p( size_type(max + 1));
+  for (i = 0; i <= min; ++i ) p.coeff(i) = p1[i]+p2[i];
+  if (p1d_smaller_p2d)  for (; i <= max; ++i ) p.coeff(i)=p2[i];
+  else /* p1d >= p2d */ for (; i <= max; ++i ) p.coeff(i)=p1[i];
+  p.reduce();
+  return p;
+}
+
+template <class NT> 
+Polynomial<NT> operator - (const Polynomial<NT>& p1, 
+                            const Polynomial<NT>& p2)
+{ 
+  typedef typename Polynomial<NT>::size_type size_type;
+  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
+  bool p1d_smaller_p2d = p1.degree() < p2.degree();
+  int min,max,i;
+  if (p1d_smaller_p2d) { min = p1.degree(); max = p2.degree(); }
+  else                 { max = p1.degree(); min = p2.degree(); }
+  Polynomial<NT>  p( size_type(max+1) );
+  for (i = 0; i <= min; ++i ) p.coeff(i)=p1[i]-p2[i];
+  if (p1d_smaller_p2d)  for (; i <= max; ++i ) p.coeff(i)= -p2[i];
+  else /* p1d >= p2d */ for (; i <= max; ++i ) p.coeff(i)=  p1[i];
+  p.reduce();
+  return p;
+}
+
+template <class NT> 
+Polynomial<NT> operator * (const Polynomial<NT>& p1, 
+                            const Polynomial<NT>& p2)
+{
+  typedef typename Polynomial<NT>::size_type size_type;
+  if (p1.degree()<0 || p2.degree()<0) return p1;
+  CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
+  Polynomial<NT>  p( size_type(p1.degree()+p2.degree()+1) ); 
+  // initialized with zeros
+  for (int i=0; i <= p1.degree(); ++i)
+    for (int j=0; j <= p2.degree(); ++j)
+      p.coeff(i+j) += (p1[i]*p2[j]); 
+  p.reduce();
+  return p;
+}
+
+template <class NT>
+Polynomial<NT> operator / (const Polynomial<NT>& p1, 
+                           const Polynomial<NT>& p2)
+{ 
+    typedef Algebraic_structure_traits<NT> AST;
+    return divop(p1,p2, typename AST::Algebraic_category());
+}
+
+
+template <class NT> inline
+Polynomial<NT> operator % (const Polynomial<NT>& p1,
+			   const Polynomial<NT>& p2)
+{ 
+    typedef Algebraic_structure_traits<NT> AST;
+    return modop(p1,p2, typename AST::Algebraic_category());
+}
+
+
+template <class NT> 
+Polynomial<NT> divop (const Polynomial<NT>& p1, 
+                      const Polynomial<NT>& p2,
+                      Integral_domain_without_division_tag)
+{ CGAL_assertion(!p2.is_zero());
+  if (p1.is_zero()) {
+	return 0;
+  }
+  Polynomial<NT> q;
+  Polynomial<NT> r;
+  Polynomial<NT>::euclidean_div(p1,p2,q,r);
+  CGAL_postcondition( (p2*q+r==p1) );
+  return q;
+}
+
+
+template <class NT> 
+Polynomial<NT> divop (const Polynomial<NT>& p1, 
+                      const Polynomial<NT>& p2,
+                      Unique_factorization_domain_tag)
+{ CGAL_assertion(!p2.is_zero());
+  if (p1.is_zero()) return 0;
+  Polynomial<NT> q,r; NT D; 
+  Polynomial<NT>::pseudo_div(p1,p2,q,r,D); 
+  CGAL_postcondition( (p2*q+r==p1*Polynomial<NT>(D)) );
+  return q/=D;
+}
+
+
+template <class NT> 
+Polynomial<NT> modop (const Polynomial<NT>& p1, 
+                      const Polynomial<NT>& p2,
+                      Integral_domain_without_division_tag)
+{ CGAL_assertion(!p2.is_zero());
+  if (p1.is_zero()) return 0;
+  Polynomial<NT> q,r;
+  Polynomial<NT>::euclidean_div(p1,p2,q,r);
+  CGAL_postcondition( (p2*q+r==p1) );
+  return r;
+}
+
+
+template <class NT> 
+Polynomial<NT> modop (const Polynomial<NT>& p1, 
+                      const Polynomial<NT>& p2,
+                      Unique_factorization_domain_tag)
+{ CGAL_assertion(!p2.is_zero());
+  if (p1.is_zero()) return 0;
+  Polynomial<NT> q,r; NT D; 
+  Polynomial<NT>::pseudo_div(p1,p2,q,r,D); 
+  CGAL_postcondition( (p2*q+r==p1*Polynomial<NT>(D)) );
+  return q/=D;
+}
+
+
+template <class NT> 
+inline Polynomial<NT> 
+gcd(const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+{ return Polynomial<NT>::gcd(p1,p2); }
+
+
+template <class NT> bool operator == 
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() == CGAL::ZERO ); }    
+
+template <class NT> bool operator != 
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() != CGAL::ZERO ); }    
+
+template <class NT> bool operator <  
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() == CGAL::NEGATIVE ); }    
+
+template <class NT> bool operator <= 
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() != CGAL::POSITIVE ); }    
+
+template <class NT> bool operator >  
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() == CGAL::POSITIVE ); }    
+
+template <class NT> bool operator >= 
+  (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+  { return ( (p1-p2).sign() != CGAL::NEGATIVE ); }    
+
+template <class NT> CGAL::Sign 
+  sign(const Polynomial<NT>& p)
+  { return p.sign(); }
+
+//------------------------------------------------------------------
+// SPECIALIZE_FUNCTION(NT,int double) START
+// SPECIALIZING inline to :
+
+  // lefthand side
+  inline    Polynomial<int> operator + 
+  (const int& num, const Polynomial<int>& p2)
+  { return (Polynomial<int>(num) + p2); }
+  inline    Polynomial<int> operator - 
+  (const int& num, const Polynomial<int>& p2)
+  { return (Polynomial<int>(num) - p2); }
+  inline    Polynomial<int> operator * 
+  (const int& num, const Polynomial<int>& p2)
+  { return (Polynomial<int>(num) * p2); }
+  inline    Polynomial<int> operator / 
+  (const int& num, const Polynomial<int>& p2)
+  { return (Polynomial<int>(num)/p2); }
+  inline    Polynomial<int> operator % 
+  (const int& num, const Polynomial<int>& p2)
+  { return (Polynomial<int>(num)%p2); }
+
+  // righthand side
+  inline    Polynomial<int> operator + 
+  (const Polynomial<int>& p1, const int& num)
+  { return (p1 + Polynomial<int>(num)); }
+  inline    Polynomial<int> operator - 
+  (const Polynomial<int>& p1, const int& num)
+  { return (p1 - Polynomial<int>(num)); }
+  inline    Polynomial<int> operator * 
+  (const Polynomial<int>& p1, const int& num)
+  { return (p1 * Polynomial<int>(num)); }
+  inline    Polynomial<int> operator / 
+  (const Polynomial<int>& p1, const int& num)
+  { return (p1 / Polynomial<int>(num)); }
+  inline    Polynomial<int> operator % 
+  (const Polynomial<int>& p1, const int& num)
+  { return (p1 % Polynomial<int>(num)); }
+
+  // lefthand side
+  inline    bool operator ==  
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() == CGAL::ZERO );}
+  inline    bool operator != 
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() != CGAL::ZERO );}
+  inline    bool operator <  
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() == CGAL::NEGATIVE );}
+  inline    bool operator <=  
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() != CGAL::POSITIVE );}
+  inline    bool operator >  
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() == CGAL::POSITIVE );}
+  inline    bool operator >=  
+  (const int& num, const Polynomial<int>& p) 
+  { return ( (Polynomial<int>(num)-p).sign() != CGAL::NEGATIVE );}
+
+  // righthand side
+  inline    bool operator ==
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() == CGAL::ZERO );}
+  inline    bool operator !=
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() != CGAL::ZERO );}
+  inline    bool operator < 
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() == CGAL::NEGATIVE );}
+  inline    bool operator <= 
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() != CGAL::POSITIVE );}
+  inline    bool operator > 
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() == CGAL::POSITIVE );}
+  inline    bool operator >=
+  (const Polynomial<int>& p, const int& num) 
+  { return ( (p-Polynomial<int>(num)).sign() != CGAL::NEGATIVE );}
+
+// SPECIALIZING pure int params:
+
+  // lefthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const int& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) + p2); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const int& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) - p2); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const int& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) * p2); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const int& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)/p2); }
+  template <class NT>    Polynomial<NT> operator % 
+  (const int& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)%p2); }
+
+  // righthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const Polynomial<NT>& p1, const int& num)
+  { return (p1 + Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const Polynomial<NT>& p1, const int& num)
+  { return (p1 - Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const Polynomial<NT>& p1, const int& num)
+  { return (p1 * Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const Polynomial<NT>& p1, const int& num)
+  { return (p1 / Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator % 
+  (const Polynomial<NT>& p1, const int& num)
+  { return (p1 % Polynomial<NT>(num)); }
+
+  // lefthand side
+  template <class NT>    bool operator ==  
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator != 
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator <  
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <=  
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator >  
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=  
+  (const int& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
+
+  // righthand side
+  template <class NT>    bool operator ==
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator !=
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator < 
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <= 
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator > 
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=
+  (const Polynomial<NT>& p, const int& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
+
+// SPECIALIZING inline to :
+
+  // lefthand side
+  inline    Polynomial<double> operator + 
+  (const double& num, const Polynomial<double>& p2)
+  { return (Polynomial<double>(num) + p2); }
+  inline    Polynomial<double> operator - 
+  (const double& num, const Polynomial<double>& p2)
+  { return (Polynomial<double>(num) - p2); }
+  inline    Polynomial<double> operator * 
+  (const double& num, const Polynomial<double>& p2)
+  { return (Polynomial<double>(num) * p2); }
+  inline    Polynomial<double> operator / 
+  (const double& num, const Polynomial<double>& p2)
+  { return (Polynomial<double>(num)/p2); }
+  inline    Polynomial<double> operator %
+  (const double& num, const Polynomial<double>& p2)
+  { return (Polynomial<double>(num)%p2); }
+
+  // righthand side
+  inline    Polynomial<double> operator + 
+  (const Polynomial<double>& p1, const double& num)
+  { return (p1 + Polynomial<double>(num)); }
+  inline    Polynomial<double> operator - 
+  (const Polynomial<double>& p1, const double& num)
+  { return (p1 - Polynomial<double>(num)); }
+  inline    Polynomial<double> operator * 
+  (const Polynomial<double>& p1, const double& num)
+  { return (p1 * Polynomial<double>(num)); }
+  inline    Polynomial<double> operator / 
+  (const Polynomial<double>& p1, const double& num)
+  { return (p1 / Polynomial<double>(num)); }
+  inline    Polynomial<double> operator % 
+  (const Polynomial<double>& p1, const double& num)
+  { return (p1 % Polynomial<double>(num)); }
+
+  // lefthand side
+  inline    bool operator ==  
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() == CGAL::ZERO );}
+  inline    bool operator != 
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() != CGAL::ZERO );}
+  inline    bool operator <  
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() == CGAL::NEGATIVE );}
+  inline    bool operator <=  
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() != CGAL::POSITIVE );}
+  inline    bool operator >  
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() == CGAL::POSITIVE );}
+  inline    bool operator >=  
+  (const double& num, const Polynomial<double>& p) 
+  { return ( (Polynomial<double>(num)-p).sign() != CGAL::NEGATIVE );}
+
+  // righthand side
+  inline    bool operator ==
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() == CGAL::ZERO );}
+  inline    bool operator !=
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() != CGAL::ZERO );}
+  inline    bool operator < 
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() == CGAL::NEGATIVE );}
+  inline    bool operator <= 
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() != CGAL::POSITIVE );}
+  inline    bool operator > 
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() == CGAL::POSITIVE );}
+  inline    bool operator >=
+  (const Polynomial<double>& p, const double& num) 
+  { return ( (p-Polynomial<double>(num)).sign() != CGAL::NEGATIVE );}
+
+// SPECIALIZING pure double params:
+
+  // lefthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const double& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) + p2); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const double& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) - p2); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const double& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) * p2); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const double& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)/p2); }
+  template <class NT>    Polynomial<NT> operator % 
+  (const double& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)%p2); }
+
+  // righthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const Polynomial<NT>& p1, const double& num)
+  { return (p1 + Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const Polynomial<NT>& p1, const double& num)
+  { return (p1 - Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const Polynomial<NT>& p1, const double& num)
+  { return (p1 * Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const Polynomial<NT>& p1, const double& num)
+  { return (p1 / Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator % 
+  (const Polynomial<NT>& p1, const double& num)
+  { return (p1 % Polynomial<NT>(num)); }
+
+
+  // lefthand side
+  template <class NT>    bool operator ==  
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator != 
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator <  
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <=  
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator >  
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=  
+  (const double& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
+
+  // righthand side
+  template <class NT>    bool operator ==
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator !=
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator < 
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <= 
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator > 
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=
+  (const Polynomial<NT>& p, const double& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
+
+// SPECIALIZE_FUNCTION ORIGINAL
+
+  // lefthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const NT& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) + p2); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const NT& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) - p2); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const NT& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num) * p2); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const NT& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)/p2); }
+  template <class NT>    Polynomial<NT> operator % 
+  (const NT& num, const Polynomial<NT>& p2)
+  { return (Polynomial<NT>(num)%p2); }
+
+  // righthand side
+  template <class NT>    Polynomial<NT> operator + 
+  (const Polynomial<NT>& p1, const NT& num)
+  { return (p1 + Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator - 
+  (const Polynomial<NT>& p1, const NT& num)
+  { return (p1 - Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator * 
+  (const Polynomial<NT>& p1, const NT& num)
+  { return (p1 * Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator / 
+  (const Polynomial<NT>& p1, const NT& num)
+  { return (p1 / Polynomial<NT>(num)); }
+  template <class NT>    Polynomial<NT> operator %
+  (const Polynomial<NT>& p1, const NT& num)
+  { return (p1 % Polynomial<NT>(num)); }
+
+
+  // lefthand side
+  template <class NT>    bool operator ==  
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator != 
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator <  
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <=  
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator >  
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=  
+  (const NT& num, const Polynomial<NT>& p) 
+  { return ( (Polynomial<NT>(num)-p).sign() != CGAL::NEGATIVE );}
+
+  // righthand side
+  template <class NT>    bool operator ==
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::ZERO );}
+  template <class NT>    bool operator !=
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::ZERO );}
+  template <class NT>    bool operator < 
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::NEGATIVE );}
+  template <class NT>    bool operator <= 
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::POSITIVE );}
+  template <class NT>    bool operator > 
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() == CGAL::POSITIVE );}
+  template <class NT>    bool operator >=
+  (const Polynomial<NT>& p, const NT& num) 
+  { return ( (p-Polynomial<NT>(num)).sign() != CGAL::NEGATIVE );}
+
+// SPECIALIZE_FUNCTION(NT,int double) END
+//------------------------------------------------------------------
+
+
+template <class NT> 
+void print_monomial(std::ostream& os, const NT& n, int i)
+{
+  if (i==0) os << n;
+  if (i==1) os << n << "R";
+  if (i>1)  os << n << "R^" << i;
+}
+
+// I/O 
+template <class NT>
+std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p)
+{
+  int i;
+  switch( get_mode(os) )
+  {
+    case CGAL::IO::ASCII :
+      os << p.degree() << ' ';
+      for(i=0; i<=p.degree(); ++i) 
+        os << p[i] << ' ';
+      break;
+    case CGAL::IO::BINARY :
+      CGAL::write(os, p.degree());
+      for( i=0; i <= p.degree(); ++i) 
+        CGAL::write(os, p[i]);
+      break;
+  default: // i.e. PRETTY
+      os << "Polynomial(" << p.degree() << ", ";
+      for( i=0; i <= p.degree(); ++i) {
+          os << p[i];
+          if (i < p.degree())
+              os << ", ";
+      }
+      os << ")";
+      // Alternative pretty format
+      //print_monomial(os,p[p.degree()],p.degree());
+      //for(i=p.degree()-1; i>=0; --i) {
+      //  if (p[i]!=NT(0)) { os << " + "; print_monomial(os,p[i],i); }
+      //}
+      break;
+  }
+  return os;
+}
+
+template <class NT>
+std::istream& operator >> (std::istream& is, Polynomial<NT>& p) { 
+    int  i,d;
+    char ch;
+    NT   c;
+    bool pretty = false;
+    switch( get_mode(is) ) {
+    case CGAL::IO::ASCII : 
+    case CGAL::IO::PRETTY : 
+        is >> ch;
+        if ( ch == 'P') {
+            pretty = true;
+            // Parse rest of "olynomial("
+            const char buffer[11] = "olynomial(";
+            const char* p = buffer;
+            is >> ch;
+            while ( is && *p != '\0' && *p == ch) {
+                is >> ch;
+                ++p;
+            }
+            if ( *p != '\0')
+                is.clear( std::ios::badbit);
+            if ( ! is)
+                return is;
+	    is.putback(ch);
+        } else {
+	    is.putback(ch);
+        }
+        is >> d;
+        if ( pretty) {
+            is >> ch;
+            if ( ch != ',') {
+                is.clear( std::ios::badbit);
+                return is;
+            }
+        }
+        if (d < 0) {
+            if ( pretty) {
+                is >> ch;
+                if ( ch != ')') {
+                    is.clear( std::ios::badbit);
+                    return is;
+                }
+            }
+            if ( is)
+                p = Polynomial<NT>();
+        } else {
+            typename Polynomial<NT>::Vector coeffs(d+1);
+            for( i = 0; i <= d; ++i) {
+                is >> coeffs[i];
+                if ( pretty && i < d) {
+                    is >> ch;
+                    if ( ch != ',') {
+                        is.clear( std::ios::badbit);
+                        return is;
+                    }
+                }
+            }
+            if ( pretty) {
+                is >> ch;
+                if ( ch != ')') {
+                    is.clear( std::ios::badbit);
+                    return is;
+                }
+            }
+            if ( is)
+                p = Polynomial<NT>(std::make_pair( coeffs.begin(),
+                                                   coeffs.end()));
+        }
+        break;
+    case CGAL::IO::BINARY :
+        CGAL::read(is, d);
+        if (d < 0)
+            p = Polynomial<NT>();
+        else {
+            typename Polynomial<NT>::Vector coeffs(d+1);
+            for(i=0; i<=d; ++i) {
+                CGAL::read(is,c);
+                coeffs[i]=c;
+            }
+            p = Polynomial<NT>(std::make_pair( coeffs.begin(), coeffs.end()));
+        }
+        break;
+    }
+    return is;
+}
+
+// SPECIALIZE_FUNCTION ORIGINAL
+template <class NT> 
+void Polynomial<NT>::euclidean_div(
+  const Polynomial<NT>& f, const Polynomial<NT>& g,
+  Polynomial<NT>& q, Polynomial<NT>& r)
+{
+  r = f; 
+  r.copy_on_write();
+  int rd = r.degree();
+  int gd = g.degree(), qd;
+  if ( rd < gd ) { 
+    q = Polynomial<NT>(NT(0)); 
+  } else { 
+    qd = rd - gd + 1;
+    q = Polynomial<NT>(std::size_t(qd)); 
+  }
+  while ( rd >= gd && !(r.is_zero())) {
+    NT S = r[rd] / g[gd];
+    qd = rd-gd;
+    q.coeff(qd) += S;
+    r.minus_offsetmult(g,S,qd);
+    rd = r.degree();
+  }
+  CGAL_postcondition( f==q*g+r );
+}
+
+
+template <class NT> 
+void Polynomial<NT>::pseudo_div(
+  const Polynomial<NT>& f, const Polynomial<NT>& g, 
+  Polynomial<NT>& q, Polynomial<NT>& r, NT& D)
+{
+  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
+  int fd=f.degree(), gd=g.degree();
+  if ( fd<gd ) 
+  { q = Polynomial<NT>(0); r = f; D = 1; 
+    CGAL_postcondition(Polynomial<NT>(D)*f==q*g+r); return; 
+  }
+  // now we know fd >= gd and f>=g
+  int qd=fd-gd, delta=qd+1, rd=fd;
+  { q = Polynomial<NT>( std::size_t(delta) ); }; // workaround for SunPRO
+  NT G = g[gd]; // highest order coeff of g
+  D = G; while (--delta) D*=G; // D = G^delta
+  Polynomial<NT> res = Polynomial<NT>(D)*f;
+  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
+  while (qd >= 0) {
+    NT F = res[rd]; // highest order coeff of res
+    NT t = F/G;     // ensured to be integer by multiplication of D
+    q.coeff(qd) = t;    // store q coeff
+    res.minus_offsetmult(g,t,qd); 
+    if (res.is_zero()) break;
+    rd = res.degree();
+    qd = rd - gd;
+  }
+  r = res;
+  CGAL_postcondition(Polynomial<NT>(D)*f==q*g+r);
+  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
+}
+
+
+template <class NT> 
+Polynomial<NT> Polynomial<NT>::gcd(
+  const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
+  if ( p1.is_zero() ) {
+    if ( p2.is_zero() ) return Polynomial<NT>(NT(1));
+    else return p2.abs();
+  }
+  if ( p2.is_zero() )
+    return p1.abs();
+
+  Polynomial<NT> f1 = p1.abs();
+  Polynomial<NT> f2 = p2.abs();
+  NT f1c = f1.content(), f2c = f2.content();
+  f1 /= f1c; f2 /= f2c;
+  NT F = CGAL_NTS gcd(f1c,f2c);
+  Polynomial<NT> q,r; NT M=1,D;
+  bool first = true;
+  while ( ! f2.is_zero() ) { 
+    Polynomial<NT>::pseudo_div(f1,f2,q,r,D);
+    if (!first) M*=D;
+    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
+    r /= r.content();
+    f1=f2; f2=r;
+    first=false;
+  }
+  CGAL_NEF_TRACEV(f1.content());
+  return Polynomial<NT>(F)*f1.abs();
+}
+
+
+// SPECIALIZE_IMPLEMENTATION(NT,int double) END
+
+} // namespace Nef
+
+
+using Nef::to_double;
+using Nef::sign;
+using Nef::is_finite;
+using Nef::is_valid;
+using Nef::gcd;
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Nef_2/Polynomial_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif  // CGAL_NEF_2_POLYNOMIAL_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial_impl.h
new file mode 100644
index 0000000..af23caf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Polynomial_impl.h
@@ -0,0 +1,204 @@
+// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel
+//                 Andreas Fabri
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+namespace CGAL{
+
+  namespace Nef {
+
+CGAL_INLINE_FUNCTION
+void Polynomial<int>::euclidean_div(
+  const Polynomial<int>& f, const Polynomial<int>& g,
+  Polynomial<int>& q, Polynomial<int>& r)
+{
+  r = f; r.copy_on_write();
+  int rd=r.degree(), gd=g.degree(), qd;
+  if ( rd < gd ) { q = Polynomial<int>(int(0)); }
+  else { qd = rd-gd+1; q = Polynomial<int>(std::size_t(qd)); }
+  while ( rd >= gd && !(r.is_zero())) {
+    int S = r[rd] / g[gd];
+    qd = rd-gd;
+    q.coeff(qd) += S;
+    r.minus_offsetmult(g,S,qd);
+    rd = r.degree();
+  }
+  CGAL_postcondition( f==q*g+r );
+}
+
+
+
+CGAL_INLINE_FUNCTION
+void Polynomial<int>::pseudo_div(
+  const Polynomial<int>& f, const Polynomial<int>& g, 
+  Polynomial<int>& q, Polynomial<int>& r, int& D)
+{
+  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
+  int fd=f.degree(), gd=g.degree();
+  if ( fd<gd ) 
+  { q = Polynomial<int>(0); r = f; D = 1; 
+    CGAL_postcondition(Polynomial<int>(D)*f==q*g+r); return; 
+  }
+  // now we know fd >= gd and f>=g
+  int qd=fd-gd, delta=qd+1, rd=fd;
+  { q = Polynomial<int>( std::size_t(delta) ); }; // workaround for SUNPRO
+  int G = g[gd]; // highest order coeff of g
+  D = G; while (--delta) D*=G; // D = G^delta
+  Polynomial<int> res = Polynomial<int>(D)*f;
+  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
+  while (qd >= 0) {
+    int F = res[rd]; // highest order coeff of res
+    int t = F/G;     // ensured to be integer by multiplication of D
+    q.coeff(qd) = t;    // store q coeff
+    res.minus_offsetmult(g,t,qd); 
+    if (res.is_zero()) break;
+    rd = res.degree();
+    qd = rd - gd;
+  }
+  r = res;
+  CGAL_postcondition(Polynomial<int>(D)*f==q*g+r);
+  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
+}
+
+
+
+CGAL_INLINE_FUNCTION
+Polynomial<int> Polynomial<int>::gcd(
+  const Polynomial<int>& p1, const Polynomial<int>& p2)
+{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
+  if ( p1.is_zero() ) {
+    if ( p2.is_zero() ) return Polynomial<int>(int(1));
+    else return p2.abs();
+  }
+  if ( p2.is_zero() )
+    return p1.abs();
+
+  Polynomial<int> f1 = p1.abs();
+  Polynomial<int> f2 = p2.abs();
+  int f1c = f1.content(), f2c = f2.content();
+  f1 /= f1c; f2 /= f2c;
+  int F = CGAL::gcd(f1c,f2c);
+  Polynomial<int> q,r; int M=1,D;
+  bool first = true;
+  while ( ! f2.is_zero() ) { 
+    Polynomial<int>::pseudo_div(f1,f2,q,r,D);
+    if (!first) M*=D;
+    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
+    r /= r.content();
+    f1=f2; f2=r;
+    first=false;
+  }
+  CGAL_NEF_TRACEV(f1.content());
+  return Polynomial<int>(F)*f1.abs();
+}
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Polynomial<double>::euclidean_div(
+  const Polynomial<double>& f, const Polynomial<double>& g,
+  Polynomial<double>& q, Polynomial<double>& r)
+{
+  r = f; r.copy_on_write();
+  int rd=r.degree(), gd=g.degree(), qd;
+  if ( rd < gd ) { q = Polynomial<double>(double(0)); }
+  else { qd = rd-gd+1; q = Polynomial<double>(std::size_t(qd)); }
+  while ( rd >= gd && !(r.is_zero())) {
+    double S = r[rd] / g[gd];
+    qd = rd-gd;
+    q.coeff(qd) += S;
+    r.minus_offsetmult(g,S,qd);
+    rd = r.degree();
+  }
+  CGAL_postcondition( f==q*g+r );
+}
+
+
+
+CGAL_INLINE_FUNCTION
+void Polynomial<double>::pseudo_div(
+  const Polynomial<double>& f, const Polynomial<double>& g, 
+  Polynomial<double>& q, Polynomial<double>& r, double& D)
+{
+  CGAL_NEF_TRACEN("pseudo_div "<<f<<" , "<< g);
+  int fd=f.degree(), gd=g.degree();
+  if ( fd<gd ) 
+  { q = Polynomial<double>(0); r = f; D = 1; 
+    CGAL_postcondition(Polynomial<double>(D)*f==q*g+r); return; 
+  }
+  // now we know fd >= gd and f>=g
+  int qd=fd-gd, delta=qd+1, rd=fd;
+  q = Polynomial<double>( std::size_t(delta) );
+  double G = g[gd]; // highest order coeff of g
+  D = G; while (--delta) D*=G; // D = G^delta
+  Polynomial<double> res = Polynomial<double>(D)*f;
+  CGAL_NEF_TRACEN("  pseudo_div start "<<res<<" "<<qd<<" "<<q.degree());
+  while (qd >= 0) {
+    double F = res[rd]; // highest order coeff of res
+    double t = F/G;     // ensured to be integer by multiplication of D
+    q.coeff(qd) = t;    // store q coeff
+    res.minus_offsetmult(g,t,qd); 
+    if (res.is_zero()) break;
+    rd = res.degree();
+    qd = rd - gd;
+  }
+  r = res;
+  CGAL_postcondition(Polynomial<double>(D)*f==q*g+r);
+  CGAL_NEF_TRACEN("  returning "<<q<<", "<<r<<", "<< D);
+}
+
+CGAL_INLINE_FUNCTION
+Polynomial<double> Polynomial<double>::gcd(
+  const Polynomial<double>& p1, const Polynomial<double>& p2)
+{ CGAL_NEF_TRACEN("gcd("<<p1<<" , "<<p2<<")");
+  if ( p1.is_zero() ) {
+    if ( p2.is_zero() ) return Polynomial<double>(double(1));
+    else return p2.abs();
+  }
+  if ( p2.is_zero() )
+    return p1.abs();
+
+  Polynomial<double> f1 = p1.abs();
+  Polynomial<double> f2 = p2.abs();
+  double f1c = f1.content(), f2c = f2.content();
+  f1 /= f1c; f2 /= f2c;
+  Polynomial<double> q,r; double M=1,D;
+  bool first = true;
+  while ( ! f2.is_zero() ) { 
+    Polynomial<double>::pseudo_div(f1,f2,q,r,D);
+    if (!first) M*=D;
+    CGAL_NEF_TRACEV(f1);CGAL_NEF_TRACEV(f2);CGAL_NEF_TRACEV(q);CGAL_NEF_TRACEV(r);CGAL_NEF_TRACEV(M);
+    r /= r.content();
+    f1=f2; f2=r;
+    first=false;
+  }
+  CGAL_NEF_TRACEV(f1.content());
+  return Polynomial<double>(1)*f1.abs();
+}
+
+
+} // end namespace Nef
+}//end namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/Segment_overlay_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/Segment_overlay_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/Segment_overlay_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/Segment_overlay_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/debug.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/gen_point_location.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/gen_point_location.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/gen_point_location.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/gen_point_location.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_2/geninfo.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/geninfo.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_2/geninfo.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_2/geninfo.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_2/iterator_tools.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/iterator_tools.h
new file mode 100644
index 0000000..c32db37
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_2/iterator_tools.h
@@ -0,0 +1,112 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+#ifndef CGAL_ITERATORTOOLS_H
+#define CGAL_ITERATORTOOLS_H
+
+#include <CGAL/basic.h>
+#include <CGAL/circulator.h>
+
+namespace CGAL {
+
+template <typename Iter, typename Move> 
+class CircFromIt : public Iter {
+    // Ptr  node;    // The internal node ptr inherited from It.
+    typedef CircFromIt<Iter,Move> Self;
+public:
+    typedef typename Iter::iterator_category Icategory;
+    typedef I_Circulator_from_iterator_traits<Icategory> CTraits;
+    typedef typename CTraits::iterator_category iterator_category;
+
+    CircFromIt() : Iter(0) {}
+    CircFromIt(Iter i) : Iter(i) {}
+
+// OPERATIONS Forward Category
+// ---------------------------
+
+    bool operator==( Nullptr_t CGAL_assertion_code(p) ) const {
+      CGAL_assertion( p == NULL );
+      return Iter::operator==( Iter(NULL) );
+    }
+    bool operator!=( Nullptr_t p ) const {
+      return !(*this == p);
+    }
+    bool operator==( const Self& i ) const {
+      return Iter::operator==(i);
+    }
+    bool operator!=( const Self& i) const {
+        return !(*this == i);
+    }
+
+    Self& operator++() {
+      Move move;
+      move.forward(*this);
+      return *this;
+    }
+    Self  operator++(int) {
+      CircFromIt tmp = *this;
+      ++*this;
+      return tmp;
+    }
+
+// OPERATIONS Bidirectional Category
+// ---------------------------------
+
+    Self& operator--() {
+      Move move;
+      move.backward(*this);
+      return *this;
+    }
+    Self  operator--(int) {
+      CircFromIt tmp = *this;
+      --*this;
+      return tmp;
+    }
+
+};
+
+template <typename Iter, typename Pnt> 
+class PntItFromVertIt : public Iter {
+public:
+  typedef PntItFromVertIt<Iter,Pnt> Self;
+  typedef Iter Base;
+  typedef Pnt  value_type;
+  typedef const Pnt* pointer;
+  typedef const Pnt& reference;
+
+  PntItFromVertIt() : Base() {}
+  PntItFromVertIt(Iter it) : Base(it) {}
+  PntItFromVertIt(const Self& it) : Base(it) {}
+
+  reference operator*() const 
+  { return Base::operator*().point(); }
+  pointer operator->() const 
+  { return &(operator*()); }
+  Self& operator++() { return (Self&)Base::operator++(); }
+  Self operator++(int) { Self tmp=*this; ++*this; return tmp; }
+
+};
+
+template <class H>
+std::string PH(H h)
+{ if (h == H()) return "nil";
+  return h->debug(); }
+
+} //namespace CGAL
+#endif // CGAL_ITERATORTOOLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Binary_operation.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Binary_operation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Binary_operation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Binary_operation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Bounding_box_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Bounding_box_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Bounding_box_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Bounding_box_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Combine_with_halfspace.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Combine_with_halfspace.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Combine_with_halfspace.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Combine_with_halfspace.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Default_items.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Default_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Default_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Default_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Edge_edge_overlay.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Edge_edge_overlay.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Edge_edge_overlay.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Edge_edge_overlay.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Halfedge.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Halfedge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Halfedge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Halfedge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Halffacet.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Halffacet.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Halffacet.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Halffacet.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/ID_support_handler.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/ID_support_handler.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/ID_support_handler.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/ID_support_handler.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Infimaximal_box.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Infimaximal_box.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Infimaximal_box.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Infimaximal_box.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/K3_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/K3_tree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/K3_tree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/K3_tree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Mark_bounded_volumes.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Mark_bounded_volumes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Mark_bounded_volumes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Mark_bounded_volumes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Nef_box.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Nef_box.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Nef_box.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Nef_box.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/OGL_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/OGL_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/OGL_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/OGL_helper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Pluecker_line_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Pluecker_line_3.h
new file mode 100644
index 0000000..193d3c2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Pluecker_line_3.h
@@ -0,0 +1,356 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
+//                 Miguel Granados <granados at mpi-sb.mpg.de>
+//                 Susan Hert      <hert at mpi-sb.mpg.de>
+//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
+#ifndef CGAL_PLUECKER_LINE_3_H
+#define CGAL_PLUECKER_LINE_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Homogeneous.h>
+#include <algorithm>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 61
+#include <CGAL/Nef_2/debug.h>
+
+namespace CGAL {
+
+/*{\Manpage{Pluecker_line_3}{R}{Straight lines in 3-space}{pl}}*/  
+
+/*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a
+directed straight line in the three-dimensional plane. Its
+representation is based on Pluecker coordinates. (For a treatment see
+the book on projected oriented geometry of Stolfi.)}*/
+
+template <typename Tag, typename R> class Pluecker_line_3;
+
+template <typename R_>
+class Pluecker_line_3<Homogeneous_tag,R_> {
+
+/*{\Mtypes 6}*/
+typedef R_ R;
+/*{\Mtypemember the standard kernel type.}*/
+typedef typename R::RT RT;
+/*{\Mtypemember the ring type.}*/
+typedef typename R::Point_3 Point_3;
+/*{\Mtypemember the point type of the standard kernel.}*/
+typedef typename R::Line_3  Line_3;
+/*{\Mtypemember the line type of the standard kernel.}*/
+/*{\Mtypemember iterator over Pluecker coefficients.}*/
+typedef Pluecker_line_3<Homogeneous_tag,R> Self;
+// typedef Infimaximal_box<typename Is_extended_kernel<R>::value_type, R> Infi_box;
+// typedef typename Infi_box::NT NT;
+typedef const RT* const_iterator;
+
+RT c_[6];
+
+public:
+/*{\Mcreation 3}*/     
+Pluecker_line_3() {}
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to some line.}*/
+
+Pluecker_line_3(const Line_3& l)
+  /*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to |l|.}*/
+{
+  Point_3 p(l.point(0)), q(l.point(1));
+  c_[0] = p.hx()*q.hy() - p.hy()*q.hx();
+  c_[1] = p.hx()*q.hz() - p.hz()*q.hx();
+  c_[2] = p.hy()*q.hz() - p.hz()*q.hy();
+  c_[3] = p.hx()*q.hw() - p.hw()*q.hx();
+  c_[4] = p.hy()*q.hw() - p.hw()*q.hy();
+  c_[5] = p.hz()*q.hw() - p.hw()*q.hz();
+}
+
+Pluecker_line_3(const Point_3& p, const Point_3& q)
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to the oriented line through |p| and |q|.}*/
+{
+  c_[0] = p.hx()*q.hy() - p.hy()*q.hx();
+  c_[1] = p.hx()*q.hz() - p.hz()*q.hx();
+  c_[2] = p.hy()*q.hz() - p.hz()*q.hy();
+  c_[3] = p.hx()*q.hw() - p.hw()*q.hx();
+  c_[4] = p.hy()*q.hw() - p.hw()*q.hy();
+  c_[5] = p.hz()*q.hw() - p.hw()*q.hz();
+
+}
+
+template <typename Forward_iterator>
+Pluecker_line_3(Forward_iterator s, Forward_iterator e) 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to line with the parameters |tuple [s,e)|.}*/
+{ int i=0;
+  while (s!=e && i<6) c_[i++] = *s;
+  CGAL_assertion(i==6);
+}
+
+/*{\Moperations 4 2 }*/
+
+const_iterator begin() const { return c_; }
+/*{\Mop returns an iterator pointing to the first
+Pluecker coefficient.}*/                                                   
+const_iterator end() const { return c_+6; }
+/*{\Mop returns an iterator pointing beyond the last
+Pluecker coefficient.}*/                                                   
+
+Pluecker_line_3(const Self& l) 
+{ std::copy(l.begin(),l.end(),c_); }
+
+Self& operator=(const Self& l) 
+{ if (&l!=this) std::copy(l.begin(),l.end(),c_); 
+  return *this; }
+
+const RT& operator[](unsigned i) const
+/*{\Marrop returns constant access to the $i$th Pluecker coefficient.}*/    
+{ CGAL_assertion(i<6); return c_[i]; }
+
+int sign() const
+/*{\Mop returns the sign of the first nonzero Pluecker coefficient
+within the ordered tuple of coefficients.}*/
+{ for (unsigned i=0; i<6; ++i) 
+    if (c_[i]!=RT(0)) return CGAL_NTS sign(c_[i]); 
+ CGAL_error_msg("Pluecker line 0 0 0 0 0 0 shouldn't appear!!!"); 
+  return CGAL_NTS sign(c_[5]); 
+}
+
+void normalize()
+//{\Mop reduces the Pluecker coefficients to a minimal 
+//representation. This is done by dividing all Pluecker 
+//coefficients by their common gcd.}
+{ 
+  CGAL_NEF_TRACEN("normalize");
+  int i=0;
+  while(i<6 && c_[i]==0)
+    i++;
+    
+  if(i>5)
+    return;
+
+  RT D = c_[i];
+  CGAL_assertion(D!=0);
+
+  for(++i; i<6; ++i) 
+    D = (c_[i]==0 ? D : CGAL_NTS gcd(D, c_[i]));
+  if (D==0) return;
+  CGAL_NEF_TRACEN("gcd" << D);
+  for(int i=0; i<6; ++i) c_[i]/=D;
+}
+
+void negate()
+/*{\Mop negates all Pluecker coefficients.}*/
+{ for(int i=0; i<6; ++i) c_[i] = -c_[i]; }
+
+Self opposite() const
+/*{\Mop returns the line opposite to |\Mvar|. }*/
+{ Self res;
+  std::negate<RT> N;
+  std::transform(begin(), end(), res.c_, N);
+  return res;
+}
+
+static int cmp(const Self& l1,
+               const Self& l2)
+/*{\Mstatic returns the lexicographic order on lines defined
+on their Pluecker coefficient tuples.}*/
+{ for (unsigned i=0; i<5; ++i) {
+    typename R::RT diff = l1[i]-l2[i];
+    if ( diff != typename R::RT(0) ) return CGAL_NTS sign(diff);
+  }
+  return CGAL_NTS sign(l1[5]-l2[5]);
+}
+
+}; // Pluecker_line_3
+
+
+template <typename R_>
+class Pluecker_line_3<Cartesian_tag,R_> {
+
+/*{\Mtypes 6}*/
+typedef R_ R;
+/*{\Mtypemember the standard kernel type.}*/
+typedef typename R::FT FT;
+/*{\Mtypemember the ring type.}*/
+typedef typename R::Point_3 Point_3;
+/*{\Mtypemember the point type of the standard kernel.}*/
+typedef typename R::Line_3  Line_3;
+/*{\Mtypemember the line type of the standard kernel.}*/
+/*{\Mtypemember iterator over Pluecker coefficients.}*/
+typedef Pluecker_line_3<Cartesian_tag,R> Self;
+// typedef Infimaximal_box<typename Is_extended_kernel<R>::value_type, R> Infi_box;
+// typedef typename Infi_box::NT NT;
+typedef const FT* const_iterator;
+
+FT c_[6];
+
+public:
+/*{\Mcreation 3}*/     
+Pluecker_line_3() {}
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to some line.}*/
+
+Pluecker_line_3(const Line_3& l)
+  /*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to |l|.}*/
+{
+  Point_3 p(l.point(0)), q(l.point(1));
+  c_[0] = p.x()*q.y() - p.y()*q.x();
+  c_[1] = p.x()*q.z() - p.z()*q.x();
+  c_[2] = p.y()*q.z() - p.z()*q.y();
+  c_[3] = p.x() - q.x();
+  c_[4] = p.y() - q.y();
+  c_[5] = p.z() - q.z();
+}
+
+
+Pluecker_line_3(const Point_3& p, const Point_3& q)
+//{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+// initializes it to the oriented line through |p| and |q|.}
+{
+  c_[0] = p.x()*q.y() - p.y()*q.x();
+  c_[1] = p.x()*q.z() - p.z()*q.x();
+  c_[2] = p.y()*q.z() - p.z()*q.y();
+  c_[3] = p.x() - q.x();
+  c_[4] = p.y() - q.y();
+  c_[5] = p.z() - q.z();
+}
+
+template <typename Forward_iterator>
+Pluecker_line_3(Forward_iterator s, Forward_iterator e) 
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname| and
+initializes it to line with the parameters |tuple [s,e)|.}*/
+{ int i=0;
+  while (s!=e && i<6) c_[i++] = *s;
+  CGAL_assertion(i==6);
+}
+
+/*{\Moperations 4 2 }*/
+
+const_iterator begin() const { return c_; }
+/*{\Mop returns an iterator pointing to the first
+Pluecker coefficient.}*/                                                   
+const_iterator end() const { return c_+6; }
+/*{\Mop returns an iterator pointing beyond the last
+Pluecker coefficient.}*/                                                   
+
+Pluecker_line_3(const Self& l) 
+{ std::copy(l.begin(),l.end(),c_); }
+
+Self& operator=(const Self& l) 
+{ if (&l!=this) std::copy(l.begin(),l.end(),c_); 
+  return *this; }
+
+const FT& operator[](unsigned i) const
+/*{\Marrop returns constant access to the $i$th Pluecker coefficient.}*/    
+{ CGAL_assertion(i<6); return c_[i]; }
+
+int sign() const
+/*{\Mop returns the sign of the first nonzero Pluecker coefficient
+within the ordered tuple of coefficients.}*/
+{ for (unsigned i=0; i<6; ++i) 
+    if (c_[i]!=FT(0)) return CGAL_NTS sign(c_[i]); 
+ CGAL_error_msg("Pluecker line 0 0 0 0 0 0 shouldn't appear!!!"); 
+  return CGAL_NTS sign(c_[5]); 
+}
+
+void normalize()
+//{\Mop reduces the Pluecker coefficients to a minimal 
+//representation. This is done by dividing all Pluecker 
+//coefficients by their common gcd.}
+{
+  CGAL_NEF_TRACEN("normalize");
+  int i=0;
+  while(i<6 && c_[i]==FT(0))
+    ++i;
+    
+  if(i>5)
+    return;
+
+  FT D = c_[i];
+  if(D<FT(0)) D=-D;
+  CGAL_assertion(D!=0);
+
+  for(int i=0; i<6; ++i) {
+    c_[i]/=D;
+    //    c_[i].normalize();
+  }
+}
+
+void negate()
+/*{\Mop negates all Pluecker coefficients.}*/
+{ for(int i=0; i<6; ++i) c_[i] = -c_[i]; }
+
+Self opposite() const
+/*{\Mop returns the line opposite to |\Mvar|. }*/
+{ Self res;
+  std::negate<FT> N;
+  std::transform(begin(), end(), res.c_, N);
+  return res;
+}
+
+static int cmp(const Self& l1,
+               const Self& l2)
+/*{\Mstatic returns the lexicographic order on lines defined
+on their Pluecker coefficient tuples.}*/
+{ for (unsigned i=0; i<5; ++i) {
+    typename R::FT diff = l1[i]-l2[i];
+    if ( diff != typename R::FT(0) ) return CGAL_NTS sign(diff);
+  }
+  return CGAL_NTS sign(l1[5]-l2[5]);
+}
+
+}; // Pluecker_line_3
+
+template <typename Tag, typename R>
+std::ostream& operator<<(std::ostream& os, const Pluecker_line_3<Tag,R>& l)
+{ 
+  switch( get_mode(os) ) {
+    case CGAL::IO::ASCII :
+      for (unsigned i=0; i<6; ++i) os << l[i] << " "; 
+      return os; 
+    case CGAL::IO::BINARY :
+      for (unsigned i=0; i<6; ++i) CGAL::write(os, l[i]);
+      return os;
+    default:
+      os << "Pluecker_line_3(";
+      for (unsigned i=0; i<5; ++i) os << l[i] << ", "; 
+      os << l[5] << ")";
+  } return os;
+}
+
+template <typename Tag, typename R>
+Pluecker_line_3<Tag,R> categorize(const Pluecker_line_3<Tag,R>& l, int& inverted)
+{ Pluecker_line_3<Tag,R> res(l);
+  if ( res.sign()<0 ) { res.negate(); inverted=1; }
+  else inverted=-1;
+  res.normalize();
+  CGAL_assertion(res.sign()!=0);
+  return res;
+}
+
+struct Pluecker_line_lt {
+  template <typename Tag, typename R>
+  bool operator()(const CGAL::Pluecker_line_3<Tag,R>& l1,
+                  const CGAL::Pluecker_line_3<Tag,R>& l2) const
+  { return CGAL::Pluecker_line_3<Tag,R>::cmp(l1,l2)<0; }
+};
+
+} //namespace CGAL
+#endif //CGAL_PLUECKER_LINE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SFace.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SFace.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SFace.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SFace.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SHalfedge.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SHalfedge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SHalfedge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SHalfedge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SHalfloop.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SHalfloop.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SHalfloop.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SHalfloop.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SM_visualizor.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SM_visualizor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SM_visualizor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SM_visualizor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_FM_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_FM_decorator.h
new file mode 100644
index 0000000..211d725
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_FM_decorator.h
@@ -0,0 +1,678 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_SNC_FM_DECORATOR_H
+#define CGAL_SNC_FM_DECORATOR_H
+#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+#include <CGAL/Nef_2/geninfo.h>
+#else
+#include <boost/any.hpp>
+#endif
+#include <CGAL/Nef_2/Segment_overlay_traits.h>
+#include <CGAL/Nef_3/SNC_decorator.h>
+#include <CGAL/Lazy_kernel.h>
+#include <list>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 31
+#include <CGAL/Nef_2/debug.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+//--------------------------------------------------------------------------
+/* We introduce a template that is a point that refers to a vertex.
+   We derive from the point type and add the vertex handle */
+
+template <typename P, typename H>
+class Vertex_point : public H {
+  P p_;
+public:
+  Vertex_point() {}
+  Vertex_point(const P& p, H v) : H(v), p_(p) {}
+  Vertex_point(const Vertex_point& vp) : H(vp) { p_=vp.p_; }
+  Vertex_point& operator=(const Vertex_point& vp)
+  { H::operator=(vp); p_=vp.p_; return *this; } 
+  H vertex() const { return *this; }
+  P point() const { return p_; } 
+};
+
+/*
+bool operator==(const Vertex_point& vp1, const Vertex_point& vp2) {
+    return vp1.vertex()==vp2.vertex();
+}
+*/
+
+template <typename P, typename H>
+std::ostream& operator<<(std::ostream& os, const Vertex_point<P,H>& p)
+{ os << p.point(); return os; }
+
+template <typename P, typename H>
+std::ostream& operator<<(std::ostream& os, 
+  const std::pair< Vertex_point<P,H>, Vertex_point<P,H> > & s)
+{ os << s.first << s.second; return os; }
+
+template <typename V, typename SE>
+struct Sort_sedges {
+  bool operator()(SE e1, SE e2) {
+    V v1[2], v2[2];
+    v1[0] = e1->source()->center_vertex();
+    v1[1] = e1->next()->source()->center_vertex();
+    v2[0] = e2->source()->center_vertex();
+    v2[1] = e2->next()->source()->center_vertex();
+    int i1(0), i2(0);
+    if(CGAL::lexicographically_xyz_smaller(v1[1]->point(),v1[0]->point())) i1 = 1;
+    if(CGAL::lexicographically_xyz_smaller(v2[1]->point(),v2[0]->point())) i2 = 1;
+    if(v1[i1] != v2[i2]) return CGAL::lexicographically_xyz_smaller(v1[i1]->point(),v2[i2]->point());
+    if(v1[1-i1] != v2[1-i2]) return CGAL::lexicographically_xyz_smaller(v1[1-i1]->point(),v2[1-i2]->point());
+    return i1<i2;
+  }
+};
+
+template <typename P, typename SE>
+struct Sort_sedges2 {
+  bool operator()(SE e1, SE e2) {
+    P p1[2], p2[2];
+    p1[0] = e1->source()->center_vertex()->point();
+    p1[1] = e1->twin()->source()->twin()->center_vertex()->point();
+    p2[0] = e2->source()->center_vertex()->point();
+    p2[1] = e2->twin()->source()->twin()->center_vertex()->point();
+    int i1(0), i2(0);
+    if(CGAL::lexicographically_xyz_smaller(p1[1],p1[0])) i1 = 1;
+    if(CGAL::lexicographically_xyz_smaller(p2[1],p2[0])) i2 = 1;
+    if(p1[i1] != p2[i2]) return CGAL::lexicographically_xyz_smaller(p1[i1],p2[i2]);
+    if(p1[1-i1] != p2[1-i2]) return CGAL::lexicographically_xyz_smaller(p1[1-i1],p2[1-i2]);
+    return i1<i2;
+  }
+};
+
+
+//--------------------------------------------------------------------------
+/* The following type is an output model for our generic segment
+   sweep module |Segment_overlay_traits|. We use that code to 
+   sweep all sedges of a plane to finally associate facet cycles
+   to facets. Note that we do not use the segment intersection
+   functionality of the code as the sedges only touch in endpoints.
+   There is room for optimization here. */
+//--------------------------------------------------------------------------
+
+template <typename P, typename V, typename E, typename I>
+struct Halffacet_output {
+
+Halffacet_output(CGAL::Unique_hash_map<I,E>& F, std::vector<E>& S) 
+  : From(F), Support(S) { edge_number=0; Support[0]=E(); }
+
+typedef P         Point;
+typedef V         Vertex_handle;
+typedef unsigned  Halfedge_handle;
+
+CGAL::Unique_hash_map<I,E>& From;
+std::vector<E>& Support;
+unsigned edge_number;
+
+Vertex_handle new_vertex(const Point& p) const
+{ 
+  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+  geninfo<unsigned>::create(p.vertex()->info());
+  #else
+  p.vertex()->info()=unsigned();
+  #endif
+  return p.vertex(); }
+
+Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v) 
+{ 
+  CGAL_USE(v);
+  CGAL_NEF_TRACEN("new_edge "<<&*v<<" "<<edge_number+1);
+  return ++edge_number; 
+}
+
+void supporting_segment(Halfedge_handle e, I it)
+{ if ( From[it] != E() ) Support[e] = From[it]; }
+
+void halfedge_below(Vertex_handle v, Halfedge_handle e)
+{ CGAL_NEF_TRACEN("halfedge_below point "<< v->point() <<": " << e); 
+  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+  geninfo<unsigned>::access(v->info()) = e;
+  #else
+  v->info() = e;
+  #endif
+}
+
+// all empty, no update necessary
+void link_as_target_and_append(Vertex_handle, Halfedge_handle)
+{ /* do nothing */ }
+
+void trivial_segment(Vertex_handle, I) const {}
+void starting_segment(Vertex_handle, I) const {}
+void passing_segment(Vertex_handle, I) const {}
+void ending_segment(Vertex_handle, I) const {}
+
+};
+
+//--------------------------------------------------------------------------
+// the following class is the geometry kernel of the generic sweep
+// module |Segment_overlay_traits|. 
+//--------------------------------------------------------------------------
+
+template <typename Point, typename Plane, typename Handle>
+class Halffacet_geometry { 
+
+ public:
+  typedef Point Point_3;
+  typedef Plane Plane_3;
+  typedef Vertex_point<Point,Handle>  Point_2;
+  typedef std::pair<Point_2,Point_2>  Segment_2;
+
+ private:
+  // the underlying plane:
+  Plane_3 h;
+
+  Point_3 above(const Point_3& p) const
+  { return p + h.orthogonal_vector(); }
+
+ public:
+
+Halffacet_geometry(const Plane_3& hi) : h(hi) {}
+
+Point_2 source(const Segment_2& s) const  { return s.first; }
+Point_2 target(const Segment_2& s) const  { return s.second; }
+
+bool is_degenerate(const Segment_2& s) const { 
+  return source(s).vertex()==target(s).vertex();
+}
+
+Segment_2 construct_segment(const Point_2& p1, const Point_2& p2) const
+{ return Segment_2(p1,p2); }
+
+int orientation(const Point_2& p1, const Point_2& p2, const Point_2& p3) const
+{ return static_cast<int>(
+    CGAL::orientation(p1.point(),p2.point(),p3.point(),above(p1.point()))); }
+
+int orientation(const Segment_2& s, const Point_2& p) const {
+    if(source(s).vertex() == p.vertex() ||
+       target(s).vertex() == p.vertex())
+        return 0;
+    return orientation(source(s),target(s),p); 
+}
+
+int compare_xy(const Point_2& p1, const Point_2& p2) const { 
+    if(p1.vertex()==p2.vertex())
+        return 0;
+    return static_cast<int>(
+        CGAL::compare_xyz(p1.point(),p2.point()));
+}
+
+Point_2 intersection(const Segment_2& s1, const Segment_2& s2) const
+{
+  CGAL_USE(s2);
+  CGAL_assertion(target(s1).vertex()==target(s2).vertex()); 
+  return target(s1); }
+
+bool left_turn(const Point_3& p1, const Point_3& p2, const Point_3& p3) const
+{ return CGAL::orientation(p1,p2,p3,above(p1)) == CGAL::POSITIVE; }
+
+}; // Halffacet_geometry
+
+
+template<class Kernel, typename SHalfedge_handle, typename Halffacet_geometry> 
+class SmallerXYZ {
+  
+  typedef typename Kernel::Point_3  Point_3;
+  Halffacet_geometry& G;
+ public:
+  SmallerXYZ(Halffacet_geometry& Gin) : G(Gin) {}
+
+  bool operator()(SHalfedge_handle se, SHalfedge_handle min, bool /*init*/) {
+    if(se->twin()->source()->twin()->source() == min->twin()->source()->twin()->source()) {
+      Point_3 p1 = se->source()->source()->point(), 
+	p2 = se->twin()->source()->twin()->source()->point(), 
+	p3 = se->next()->twin()->source()->twin()->source()->point();      
+      return !G.left_turn(p1,p2,p3);
+    }
+    return CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
+					       min->twin()->source()->twin()->source()->point());
+  }
+};
+
+/*
+template<typename SHalfedge_handle, typename EK> 
+class SmallerXYZ<CGAL::Lazy_kernel<EK>, SHalfedge_handle> {
+
+  typedef CGAL::Lazy_kernel<EK> Kernel;
+  typedef typename Kernel::Point_3  Point_3;
+ public:
+  SmallerXYZ() {}
+
+  bool point_in_positive_direction_3(const Point_3& p) const {
+    if(p.x() < 0) return false;
+    if(p.x() > 0) return true;
+    if(p.y() < 0) return false;
+    if(p.y() > 0) return true;
+    return p.z() > 0;
+  }  
+
+  bool operator()(const SHalfedge_handle se, const Point_3 min, bool) {
+    return 
+      //      (point_in_positive_direction_3(se->next()->source()->point()) &&
+      //	    point_in_positive_direction_3(se->next()->twin()->source()->point()) &&
+      //	    (!init || 
+	     CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
+						 min);
+  }
+};
+*/
+
+/*
+template<class K2, typename EK, typename SHalfedge_handle> 
+class SmallerXYZ<CGAL::Lazy_kernel<EK>, K2, SHalfedge_handle> {
+
+  typedef typename K2::Point_3  Point_3;
+ public:
+  SmallerXYZ() {}
+
+  bool point_in_positive_direction_2(const Point_3& p) const {
+    if(p.y() < 0) return false;
+    if(p.y() > 0) return true;
+    return p.z() > 0;
+  }
+
+  bool point_in_positive_direction_3(const Point_3& p) const {
+    if(p.x() < 0) return false;
+    if(p.x() > 0) return true;
+    if(p.y() < 0) return false;
+    if(p.y() > 0) return true;
+    return p.z() > 0;
+  }  
+
+  bool operator()(const SHalfedge_handle se, const Point_3 min, bool init) {
+    return (point_in_positive_direction_3(se->next()->source()->point()) &&
+	    point_in_positive_direction_3(se->next()->twin()->source()->point()) &&
+	    (!init || 
+	     CGAL::lexicographically_xyz_smaller(se->twin()->source()->twin()->source()->point(), 
+						 min)));
+  }
+};
+*/
+
+//--------------------------------------------------------------------------
+// SNC_FM_decorator
+// Note that we interpret sedges as edge uses between vertices.  We
+//   overwrite some operations from the base class for that semantics.
+//--------------------------------------------------------------------------
+
+template <typename S> class SNC_decorator;
+
+template <typename SNC_structure_>
+class SNC_FM_decorator : public SNC_decorator<SNC_structure_> {
+public:
+  typedef SNC_structure_ SNC_structure;
+  typedef SNC_decorator<SNC_structure> Base;
+
+  typedef typename SNC_structure::Vertex_iterator Vertex_iterator; 
+  typedef typename SNC_structure::Vertex_handle Vertex_handle;
+  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator; 
+  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
+  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator; 
+  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
+  typedef typename SNC_structure::Volume_iterator Volume_iterator;
+  typedef typename SNC_structure::Volume_handle Volume_handle;
+  typedef typename SNC_structure::SVertex_iterator SVertex_iterator; 
+  typedef typename SNC_structure::SVertex_handle SVertex_handle;
+  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator; 
+  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
+  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator; 
+  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
+  typedef typename SNC_structure::SFace_iterator SFace_iterator; 
+  typedef typename SNC_structure::SFace_handle SFace_handle;
+  typedef typename SNC_structure::SFace_cycle_iterator SFace_cycle_iterator;
+  typedef typename SNC_structure::Halffacet_cycle_iterator Halffacet_cycle_iterator;
+  typedef typename SNC_structure::Shell_entry_iterator Shell_entry_iterator;
+  typedef typename SNC_structure::Object_handle Object_handle;
+  typedef typename SNC_structure::Kernel  Kernel;
+  typedef typename SNC_structure::Point_3 Point_3;
+  typedef typename SNC_structure::Plane_3 Plane_3;
+  typedef typename SNC_structure::Mark Mark;
+
+  typedef typename Base::SHalfedge_around_facet_circulator
+    SHalfedge_around_facet_circulator;
+#if 0
+  typedef typename Base::SHalfedge_around_facet_const_circulator
+    SHalfedge_around_facet_const_circulator;
+#endif
+
+  typedef typename std::list<Object_handle>::iterator 
+    Object_list_iterator;
+
+  typedef CGAL::Vertex_point<Point_3,Vertex_handle>  Vertex_point;
+  typedef std::pair<Vertex_point,Vertex_point> Vertex_segment;
+  typedef std::list<Vertex_segment>            Segment_list;
+  typedef typename Segment_list::iterator      Segment_iterator;
+
+  typedef CGAL::Halffacet_geometry<Point_3,Plane_3,Vertex_handle> 
+    Halffacet_geometry;
+  using Base::debug; using Base::link_as_facet_cycle; using Base::info; using Base::link_as_interior_loop;
+protected:
+  Halffacet_handle f_;
+public:
+
+  SNC_FM_decorator(SNC_structure& W) : Base(W), f_() {}
+  SNC_FM_decorator(SNC_structure& W, Halffacet_handle f)
+   : Base(W),f_(f) {}
+
+
+  Halffacet_cycle_iterator facet_cycles_begin() const 
+  { return f_->facet_cycles_begin(); }  
+  Halffacet_cycle_iterator facet_cycles_end()   const 
+  { return f_->facet_cycles_end(); }
+
+  void create_facet_objects(const Plane_3& h,
+    Object_list_iterator start, Object_list_iterator end) const;
+
+protected:
+
+//--------------------------------------------------------------------------
+/* We provide some information on determine_facet. To understand its
+   functionality please refer to the Nef_2 implementation report where
+   there is similar function determine_face with more documentation.
+
+   When we call |determine_facet|$(e,\ldots)$ we know that the
+   shalfedge |e| is not linked to a face object yet and thus no
+   shalfedge in its face cycle is linked. Thus we jump to the minimal
+   shalfedge and look down (along the previously used sweep line in
+   the plane of the facet). If we see an shalfedge we ask for its
+   face. If it does not have one we recurse.  Note that the target
+   vertex of the minimal halfedge actually has a view downwards as we
+   examine a hole facet cycle. The method |link_as_facet_cycle| does
+   the linkage between the facet object and all sedges of the facet
+   cycle. Its cost is linear in the size of the facet cycle. Note also
+   that we do the linking bottom up along the recursion stack for all
+   visited hole (facet) cycles.  Thus we visit each hole facet cycle
+   only once as afterwards each edge of the facet cycle is incident to
+   a facet. */
+//--------------------------------------------------------------------------
+
+  Halffacet_handle determine_facet(SHalfedge_handle e, 
+    const std::vector<SHalfedge_handle>& MinimalEdge,
+    const CGAL::Unique_hash_map<SHalfedge_handle,int>& FacetCycle,
+    const std::vector<SHalfedge_handle>& Edge_of) const
+  { CGAL_NEF_TRACEN("  determine_facet "<<debug(e));
+    int fc = FacetCycle[e];
+    SHalfedge_handle e_min = MinimalEdge[fc];
+    SHalfedge_handle e_below = 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      Edge_of[geninfo<unsigned>::access(info(e_min->twin()->source()->twin()->source()))];
+    #else
+      Edge_of[ boost::any_cast<unsigned>(info(e_min->twin()->source()->twin()->source())) ];
+    #endif
+    CGAL_assertion( e_below != SHalfedge_handle() );
+    CGAL_NEF_TRACEN("  edge below " << debug(e_below));    
+    Halffacet_handle f = e_below->facet();
+    if ( f != Halffacet_handle() ) return f; // has already a facet 
+    // e_below also has no facet
+    f = determine_facet(e_below, MinimalEdge, FacetCycle, Edge_of);
+    CGAL_NEF_TRACEN("  edge below " << debug(e_below));
+    link_as_facet_cycle(e_below,f); 
+    link_as_facet_cycle(e_below->twin(),f->twin()); 
+    return f;
+  }
+
+//--------------------------------------------------------------------------
+/* segment(...)
+   an shalfedge |e| can be interpreted as an edge-use extending along
+   the halfedge that leaves the local graph in |target(e)|. Only
+   edge-uses allow us to code the non-unique character of an edge as a
+   boundary object of several facets. An edge-use |e| represents the
+   edge |target(e)| in the boundary structure of a facet. */
+//--------------------------------------------------------------------------
+
+  Vertex_segment segment(SHalfedge_handle e) const
+  { Vertex_handle vs = e->source()->source(), 
+      vt = e->twin()->source()->twin()->source(); 
+    Vertex_point  ps(vs->point(),vs), pt(vt->point(),vt);
+    return Vertex_segment(ps,pt); }
+
+  Vertex_segment segment(SHalfloop_handle l) const
+  { Vertex_handle v = l->incident_sface()->center_vertex(); 
+    Vertex_point  p(v->point(),v);
+    return Vertex_segment(p,p); }
+
+
+}; // SNC_FM_decorator<SNC_structure_>
+
+
+
+//--------------------------------------------------------------------------
+/* create_facet_objects() 
+   In this method we use the visibility along a sweep line in the
+   facet plane to create facet objects. |SEdge_below[v]| either
+   provides the sedge that is hit first by a vertical ray downwards or
+   an uninitialized edge if there is none. */
+//--------------------------------------------------------------------------
+
+
+template <typename SNC_>
+void SNC_FM_decorator<SNC_>::
+create_facet_objects(const Plane_3& plane_supporting_facet,
+  Object_list_iterator start, Object_list_iterator end) const
+{ CGAL_NEF_TRACEN(">>>>>create_facet_objects "
+		  << normalized(plane_supporting_facet));
+  CGAL::Unique_hash_map<SHalfedge_handle,int> FacetCycle(-1);
+  std::vector<SHalfedge_handle> MinimalEdge;
+  std::list<SHalfedge_handle> SHalfedges; 
+  std::list<SHalfloop_handle> SHalfloops; 
+
+  CGAL::Unique_hash_map<Vertex_handle,SHalfedge_handle> SHalfedgeBelow;
+  CGAL::Unique_hash_map<Segment_iterator,SHalfedge_handle>  From;
+
+  Segment_list Segments;
+  SHalfedge_handle e; SHalfloop_handle l;
+  typename std::list<SHalfedge_handle>::iterator eit,epred;
+  typename std::list<SHalfloop_handle>::iterator lit;
+
+  // the output decorator for the facet plane sweep
+  typedef CGAL::Halffacet_output<Vertex_point, Vertex_handle, 
+    SHalfedge_handle, Segment_iterator> Halffacet_output;
+
+  // the sweep traits class instantiated with the input, output and
+  // geometry models
+  typedef CGAL::Segment_overlay_traits
+    <Segment_iterator, Halffacet_output, Halffacet_geometry>
+    Halffacet_sweep_traits;
+  typedef CGAL::generic_sweep<Halffacet_sweep_traits>   Halffacet_sweep;
+  Halffacet_geometry G(plane_supporting_facet);
+
+  /* We first separate sedges and sloops, and fill a list of segments
+     to trigger a sweep. */
+
+  for ( ; start != end; ++start ) {
+    if ( CGAL::assign(e,*start) ) {
+      SHalfedges.push_back(e); 
+    } else if ( CGAL::assign(l,*start) ) {
+      SHalfloops.push_back(l); 
+    } else 
+      CGAL_error_msg("Damn wrong handle.");
+  }
+
+  /* We iterate all shalfedges and assign a number for each facet
+     cycle.  After that iteration for an edge |e| the number of its
+     facet cycle is |FacetCycle[e]| and for a facet cycle |c| we know
+     |MinimalEdge[c]|. */
+  int i=0; 
+  //  bool xyplane = plane_supporting_facet.b() != 0 || plane_supporting_facet.c() != 0;
+  SmallerXYZ<Kernel, SHalfedge_handle, Halffacet_geometry> smallerXYZ(G);
+  CGAL_forall_iterators(eit,SHalfedges) { 
+    e = *eit;
+    if ( FacetCycle[e] >= 0 ) continue; // already assigned
+    SHalfedge_around_facet_circulator hfc(e),hend(hfc);
+    FacetCycle[hfc]=i;
+    SHalfedge_handle e_min = e;
+    bool init=false;
+    CGAL_NEF_TRACEN("\n  facet cycle numbering (up) "<<i);
+    CGAL_For_all(hfc,hend) {
+      FacetCycle[hfc]=i; // assign face cycle number
+      if(smallerXYZ(hfc, e_min, init)) {
+	init = true;
+	e_min = hfc;
+      }
+      
+      CGAL_NEF_TRACEN(hfc->twin()->source()->twin()->source()->point() << " lex xyz smaller " << 
+		      e_min->twin()->source()->twin()->source()->point() << "=" << 
+		      CGAL::lexicographically_xyz_smaller(hfc->twin()->source()->twin()->source()->point(), 
+							  e_min->twin()->source()->twin()->source()->point()));
+      
+    } CGAL_NEF_TRACEN("");
+    MinimalEdge.push_back(e_min);
+    ++i;
+  }
+
+
+
+  /* We now know the number of facet cycles |i| and we have a minimal
+     edge |e| for each facet cycle. We just check the geometric
+     embedding of |e| and |e->next()| to characterize the facet cycle
+     (outer or hole). Note that the two edges cannot be collinear due
+     to the minimality of |e| (the lexicographic minimality of the
+     embedding of its target vertex). Outer facet cycles obtain facet
+     objects right away. */
+
+  for (int j=0; j<i; ++j) {
+    SHalfedge_handle e = MinimalEdge[j];
+    CGAL_NEF_TRACEN("  facet cycle "<<j<<" minimal halfedge "<<debug(e));
+    Point_3 p1 = e->source()->source()->point(), 
+      p2 = e->twin()->source()->twin()->source()->point(), 
+      p3 = e->next()->twin()->source()->twin()->source()->point();
+    
+    //      std::cerr << "minimal shalfedge " << e->source()->source()->point() << ":"
+    //                << e->source()->point() << "->" << e->twin()->source()->point() << std::endl;
+
+
+    if ( G.left_turn(p1,p2,p3) ) { 
+      Halffacet_handle f = this->sncp()->new_halffacet_pair(plane_supporting_facet);
+      link_as_facet_cycle(e,f); link_as_facet_cycle(e->twin(),f->twin()); 
+      f->mark() = f->twin()->mark() = e->mark();
+      CGAL_NEF_TRACEN("  creating new facet object "<<&*f<<" bd "<<&*e);
+    }
+  }
+
+  /* Now the only shalfedges not linked are those on hole facet
+     cycles.  We use a recursive scheme to find the bounding cycle
+     providing the facet object and finally iterate over all isolated
+     vertices to link them accordingly to their containing facet
+     object. Note that in that final iteration all shalfedges already
+     have facet links. Thus that ensures termination. The recursive
+     operation $|determine_facet|(e,\ldots)$ returns the facet
+     containing the hole cycle of |e|. As a postcondition of this code
+     part we have all shalfedges and isolated shalfloops linked to
+     facet objects, and all facet objects know their bounding facet
+     cycles. */
+ 
+  bool do_sweep = false;
+  if(SHalfloops.size() > 0)
+    do_sweep = true;
+
+  CGAL_forall_iterators(eit,SHalfedges) { 
+    //    std::cerr << "fc " << FacetCycle[*eit] << std::endl;
+    if ( (*eit)->facet() == Halffacet_handle() ) {
+      //      std::cerr << "nicht verlinkte shalfedge " << (*eit)->source()->source()->point() << ":"
+      //                << (*eit)->source()->point() << "->" << (*eit)->twin()->source()->point() << std::endl;
+      do_sweep = true;
+      break;
+    }
+  }
+
+
+  //  std::cerr << std::endl;
+#ifndef CGAL_NEF3_PLANE_SWEEP_OPTIMIZATION_OFF
+  if(!do_sweep) return; 
+#endif
+
+#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
+  number_of_plane_sweeps++;
+  timer_plane_sweeps.start();
+#endif
+
+  //  Note that we only allow those edges that are
+  //  directed from lexicographically smaller to larger vertices. 
+  //  Insertion of SHalfedges into Segments is shifted below in order
+  //  to guarantee that there are no gaps in the overlay.
+
+
+  //  SHalfedges.sort(Sort_sedges2<Point_3,SHalfedge_handle>());
+  SHalfedges.sort(Sort_sedges<Vertex_handle,SHalfedge_handle>());
+  for(eit = SHalfedges.begin();eit != SHalfedges.end();) {
+    CGAL_NEF_TRACEN("  appending edge "<< debug(*eit));
+    Segments.push_front(segment(*eit)); 
+    From[Segments.begin()] = *eit;
+    epred=eit;
+    ++eit;
+    if(eit != SHalfedges.end()) {
+      CGAL_NEF_TRACEN("test " << std::endl << "  " << debug(*epred) 
+	     << std::endl << "  " << debug(*eit));
+    }
+    if(eit != SHalfedges.end() && 
+       (*epred)->source()->source() ==(*eit)->next()->source()->source() &&  
+       (*eit)->source()->source() == (*epred)->next()->source()->source())
+      ++eit;
+  }
+
+  CGAL_forall_iterators(lit,SHalfloops) {
+    CGAL_NEF_TRACEN("  appending loop " << (*lit)->incident_sface()->center_vertex()->point()); 
+    Segments.push_back(segment(*lit));
+  }
+
+  std::vector<SHalfedge_handle> Edge_of(Segments.size()+1);
+  Halffacet_output O(From,Edge_of);
+  Halffacet_sweep f_s(typename Halffacet_sweep::INPUT(
+    Segments.begin(),Segments.end()), O, G); f_s.sweep();
+
+#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
+  timer_plane_sweeps.stop();
+#endif
+
+  CGAL_forall_iterators(eit,SHalfedges) { e=*eit;
+  if ( e->facet() != Halffacet_handle() ) continue;
+    CGAL_NEF_TRACEN("  linking hole "<<debug(e));
+    Halffacet_handle f = determine_facet(e,MinimalEdge,FacetCycle,Edge_of);
+    link_as_facet_cycle(e,f); link_as_facet_cycle(e->twin(),f->twin());
+  }
+
+  CGAL_forall_iterators(lit,SHalfloops) { l=*lit;
+    SHalfedge_handle e_below = 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      Edge_of[geninfo<unsigned>::access(info(l->incident_sface()->center_vertex()))];    
+    #else
+      Edge_of[ boost::any_cast<unsigned>(info(l->incident_sface()->center_vertex())) ];
+    #endif
+    
+    CGAL_assertion( e_below != SHalfedge_handle() );
+    CGAL_NEF_TRACEN("link sloop at vertex "<< l->incident_sface()->center_vertex()->point());
+    CGAL_NEF_TRACEN("e_below "  << debug(e_below));
+    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()));
+    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()));
+    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()->next()));
+    CGAL_NEF_TRACEN("next    "  << debug(e_below->next()->next()->next()->next()));
+    link_as_interior_loop(l,e_below->facet());
+    link_as_interior_loop(l->twin(),e_below->facet()->twin());
+  }
+  
+  CGAL_NEF_TRACEN("exit FM");
+}
+
+} //namespace CGAL
+#endif //CGAL_SNC_FM_DECORATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_explorer.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_explorer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_explorer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_explorer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_overlayer.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_overlayer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_overlayer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_overlayer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_visualizor.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_visualizor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_SM_visualizor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_SM_visualizor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_const_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_const_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_const_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_const_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_constructor.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_constructor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_constructor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_constructor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_decorator_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_decorator_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_decorator_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_decorator_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_external_structure.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_external_structure.h
new file mode 100644
index 0000000..c18fe43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_external_structure.h
@@ -0,0 +1,1407 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel       <seel at mpi-sb.mpg.de> 
+//                 Miguel Granados    <granados at mpi-sb.mpg.de>
+//                 Susan Hert         <hert at mpi-sb.mpg.de>
+//                 Lutz Kettner       <kettner at mpi-sb.mpg.de>
+//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+#ifndef CGAL_SNC_EXTERNAL_STRUCTURE_H
+#define CGAL_SNC_EXTERNAL_STRUCTURE_H
+
+#include <CGAL/Nef_S2/Normalizing.h>
+#include <CGAL/Nef_3/Pluecker_line_3.h>
+#include <CGAL/Nef_3/SNC_decorator.h>
+#include <CGAL/Nef_3/SNC_point_locator.h>
+#include <CGAL/Nef_S2/SM_point_locator.h>
+#include <CGAL/Nef_3/SNC_FM_decorator.h>
+#include <CGAL/Nef_3/SNC_io_parser.h>
+#include <CGAL/Nef_3/SNC_indexed_items.h>
+#include <CGAL/Nef_3/SNC_simplify.h>
+#include <map>
+#include <list>
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 43
+#include <CGAL/Nef_2/debug.h>
+
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+struct int_lt {
+  bool operator()(const int& i1, const int& i2) const { return i1<i2; }
+};
+template <typename Edge_handle>
+struct Halfedge_key_lt4 {
+
+  bool operator()(const Edge_handle& e1, const Edge_handle& e2) const {
+    if(CGAL::sign(e1->point().x()) != 0) {
+      if(e1->source() != e2->source())
+	return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; 
+      else 
+	return e1->point().x() < 0;
+    }
+    if(CGAL::sign(e1->point().y()) != 0) {
+      if(e1->source() != e2->source())
+	return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; 
+      else 
+	return e1->point().y() < 0;
+    }
+    if(e1->source() != e2->source())
+      return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; 
+    return e1->point().z() < 0;
+  }
+};
+
+template <typename Edge_handle>
+struct Halfedge_key_lt3 {
+
+  bool operator()(const Edge_handle& e1, const Edge_handle& e2) const {
+    if(e1->source() != e2->source())
+      return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); 
+    if(CGAL::sign(e1->point().x()) != 0)
+      return e1->point().x() < 0;
+    if(CGAL::sign(e1->point().y()) != 0)
+      return e1->point().y() < 0;
+    return e1->point().z() < 0;
+  }
+};
+
+template <typename Point, typename Edge>
+struct Halfedge_key {
+  typedef Halfedge_key<Point,Edge> Self;
+  Point p; int i; Edge e;
+  Halfedge_key(Point pi, int ii, Edge ei) : 
+    p(pi), i(ii), e(ei) {}
+  Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {}
+  Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; }
+  bool operator==(const Self& k) const { return p==k.p && i==k.i; }
+  bool operator!=(const Self& k) const { return !operator==(k); }
+};
+
+template <typename Point, typename Edge, class Decorator>
+struct Halfedge_key_lt {
+  typedef Halfedge_key<Point,Edge> Key;
+  typedef typename Point::R R;
+  typedef typename R::Vector_3 Vector;
+  typedef typename R::Direction_3 Direction;
+  bool operator()( const Key& k1, const Key& k2) const { 
+    if( k1.e->source() == k2.e->source())
+      return (k1.i < k2.i);
+    Direction l(k1.e->vector());
+    if( k1.i < 0) l = -l;
+    return (Direction( k2.p - k1.p) == l); 
+  }
+};
+
+template <typename Point, typename Edge>
+std::ostream& operator<<(std::ostream& os, 
+                         const Halfedge_key<Point,Edge>& k )
+{ os << k.p << " " << k.i; return os; }
+
+template <typename R>
+int sign_of(const CGAL::Plane_3<R>& h)
+{ if ( h.c() != 0 ) return CGAL_NTS sign(h.c());
+  if ( h.b() != 0 ) return CGAL_NTS sign(-h.b());
+  return CGAL_NTS sign(h.a());
+}
+
+struct Plane_lt {
+    template <typename R>
+    bool operator()(const CGAL::Plane_3<R>& h1,
+                    const CGAL::Plane_3<R>& h2) const
+    {
+        typedef typename R::RT     RT;
+        typedef typename R::FT     FT;
+
+        bool flag=false;
+        FT ratioa,ratiob,ratioc,ratiod;
+        FT a1,b1,c1,d1,a2,b2,c2,d2;
+        a1=h1.a();
+        a2=h2.a();
+        b1=h1.b();
+        b2=h2.b();
+        c1=h1.c();
+        c2=h2.c();
+        d1=h1.d();
+        d2=h2.d();
+        if(a2==0 || a1==0)
+        {
+            if(a2==a1) ratioa=1;
+            else flag=true;
+        }
+        else{ratioa=a1/a2;}
+        if(b2==0 || b1==0)
+        {
+            if(b2==b1) ratiob=ratioa;
+            else flag=true;
+        }
+        else{ ratiob=b1/b2;}
+        if(c2==0 || c1==0)
+        {
+            if(c2==c1) ratioc=ratioa;
+            else flag=true;
+        }
+        else{ ratioc=c1/c2;}
+        if(d2==0 || d1==0)
+        {
+            if(d2==d1) ratiod=ratioc;
+            else flag=true;
+        }
+        else{ ratiod=d1/d2;}
+        if(flag || !(ratioa==ratiob && ratioc==ratiod && ratioa==ratioc))
+        {
+            RT diff = h1.a()-h2.a();
+            if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
+            diff = h1.b()-h2.b();
+            if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
+            diff = h1.c()-h2.c();
+            if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
+            diff = h1.d()-h2.d();
+            if ( (diff) != 0 ) return CGAL_NTS sign(diff) < 0;
+        }
+        return 0;
+    }
+};
+
+
+struct Plane_RT_lt {
+  template <typename R>
+  bool operator()(const CGAL::Plane_3<R>& h1,
+                  const CGAL::Plane_3<R>& h2) const
+  { return (&(h1.a())) < (&(h2.a())); }
+};
+
+// ----------------------------------------------------------------------------
+// SNC_external_structure 
+// ----------------------------------------------------------------------------
+
+template <typename Items_, typename SNC_structure_>
+class SNC_external_structure_base : public SNC_decorator<SNC_structure_>
+{ 
+public:
+  typedef SNC_structure_ SNC_structure;
+
+  typedef typename SNC_structure::Infi_box                   Infi_box;
+  typedef typename Infi_box::Standard_kernel                 Standard_kernel;
+  typedef typename Standard_kernel::Point_3                  Standard_point_3;
+  typedef typename Infi_box::NT                              NT;
+
+  typedef CGAL::SNC_decorator<SNC_structure>                 SNC_decorator;
+  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
+  typedef CGAL::SNC_FM_decorator<SNC_structure>              FM_decorator;
+  typedef CGAL::SNC_simplify<Items_, SNC_structure>          SNC_simplify;
+
+  typedef typename SNC_structure::Sphere_map                 Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>                     SM_decorator;  
+  typedef CGAL::SM_const_decorator<Sphere_map>               SM_const_decorator;
+  typedef CGAL::SM_point_locator<SM_const_decorator>         SM_point_locator;
+
+  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator;
+  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator;
+  typedef typename SNC_structure::Volume_iterator Volume_iterator;
+
+  typedef typename SNC_structure::Vertex_handle Vertex_handle;
+  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
+  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
+  typedef typename SNC_structure::Volume_handle Volume_handle;
+
+  typedef typename SNC_structure::Halffacet_const_handle Halffacet_const_handle;
+  typedef typename SNC_structure::SFace_const_handle SFace_const_handle; 
+
+  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator;
+  typedef typename SNC_structure::SFace_iterator SFace_iterator;
+  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator;
+
+  typedef typename SNC_structure::SVertex_handle SVertex_handle;
+  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
+  typedef typename SNC_structure::SFace_handle SFace_handle;
+  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
+
+  typedef typename SNC_structure::Object_handle Object_handle;
+
+  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
+    SHalfedge_around_facet_circulator;
+
+  typedef typename SNC_structure::Point_3 Point_3;
+  typedef typename SNC_structure::Direction_3 Direction_3;
+  typedef typename SNC_structure::Plane_3 Plane_3;
+  typedef typename SNC_structure::Ray_3 Ray_3;
+
+  typedef typename SNC_structure::Sphere_point Sphere_point;
+  typedef typename SNC_structure::Sphere_circle Sphere_circle;
+
+  typedef typename SM_decorator::SHalfedge_around_svertex_circulator 
+    SHalfedge_around_svertex_circulator;
+
+  SNC_point_locator* pl;
+
+  typedef CGAL::Unique_hash_map<SFace_const_handle,unsigned int>  
+                                                         Sface_shell_hash;
+  typedef CGAL::Unique_hash_map<Halffacet_const_handle,unsigned int>  
+                                                         Face_shell_hash;
+  typedef CGAL::Unique_hash_map<SFace_const_handle,bool> SFace_visited_hash;
+  typedef CGAL::Unique_hash_map<SFace_const_handle,bool> Shell_closed_hash;
+
+  using SNC_decorator::visit_shell_objects;
+  using SNC_decorator::link_as_inner_shell;
+  using SNC_decorator::link_as_outer_shell;
+  using SNC_decorator::link_as_prev_next_pair;
+  using SNC_decorator::get_visible_facet;
+  using SNC_decorator::adjacent_sface;
+  using SNC_decorator::make_twins;
+
+  struct Shell_explorer {
+    const SNC_decorator& D;
+    Sface_shell_hash&  ShellSf;
+    Face_shell_hash&   ShellF;
+    //    Shell_closed_hash& Closed;
+    SFace_visited_hash& Done;
+    SFace_handle sf_min;
+    int n;
+
+    Shell_explorer(const SNC_decorator& Di, Sface_shell_hash& SSf, 
+                   Face_shell_hash& SF, SFace_visited_hash& Vi) 
+      : D(Di), ShellSf(SSf), ShellF(SF), Done(Vi), n(0) {}
+
+    void visit(SFace_handle h) { 
+      CGAL_NEF_TRACEN("visit sf "<<h->center_vertex()->point());
+      ShellSf[h]=n;
+      Done[h]=true;
+      if ( CGAL::lexicographically_xyz_smaller(h->center_vertex()->point(),
+					       sf_min->center_vertex()->point())) 
+	sf_min = h; 
+    }
+
+    void visit(Vertex_handle h) { 
+      CGAL_USE(h);
+      CGAL_NEF_TRACEN("visit v  "<<h->point());
+    }
+
+    void visit(Halfedge_handle h) { 
+      CGAL_USE(h);
+      CGAL_NEF_TRACEN("visit he "<< h->source()->point());
+    }
+
+    void visit(Halffacet_handle h) { 
+      CGAL_NEF_TRACEN(h->plane()); 
+      ShellF[h]=n; 
+    }
+
+    void visit(SHalfedge_handle ) {}
+    void visit(SHalfloop_handle ) {}
+
+    SFace_handle& minimal_sface() { return sf_min; }
+
+    void increment_shell_number() { 
+      CGAL_NEF_TRACEN("leaving shell "<<n);
+      ++n; 
+    }
+  };
+
+  SNC_external_structure_base( SNC_structure& W, SNC_point_locator* spl = NULL) 
+    : SNC_decorator(W), pl(spl) {}
+  /*{\Mcreate makes |\Mvar| a decorator of |W|.}*/
+
+ public:
+  //#define CGAL_NEF_NO_HALFEDGE_KEYS
+#ifdef CGAL_NEF_NO_HALFEDGE_KEYS
+  void pair_up_halfedges() const {
+  /*{\Mop pairs all halfedge stubs to create the edges in 3-space.}*/
+
+  //  CGAL_NEF_SETDTHREAD(43*61);
+    CGAL_NEF_TRACEN(">>>>>pair_up_halfedges");
+    typedef Halfedge_key_lt3<Halfedge_handle> 
+      Halfedge_key_lt;
+    typedef std::list<Halfedge_handle>  Halfedge_list;
+    
+    typedef typename Standard_kernel::Kernel_tag   Kernel_tag;
+    typedef CGAL::Pluecker_line_3<Kernel_tag,Standard_kernel> Pluecker_line_3;
+    typedef CGAL::Pluecker_line_lt        Pluecker_line_lt;
+    typedef std::map< Pluecker_line_3, Halfedge_list, Pluecker_line_lt> 
+      Pluecker_line_map;
+    
+    Pluecker_line_map M;
+    Pluecker_line_map M2;
+    Pluecker_line_map M3;
+    Pluecker_line_map M4;
+    
+    NT eval(Infi_box::compute_evaluation_constant_for_halfedge_pairup(*this->sncp()));
+    
+    Halfedge_iterator e;
+    CGAL_forall_halfedges(e,*this->sncp()) {
+      //    progress++;
+      Point_3 p = e->source()->point();
+      Point_3 q = p + e->vector();
+      CGAL_NEF_TRACE(" segment("<<p<<", "<<q<<")"<<
+	    " direction("<<e->vector()<<")");
+      Standard_point_3 sp = Infi_box::standard_point(p,eval);
+      Standard_point_3 sq = Infi_box::standard_point(q,eval);
+      Pluecker_line_3  l( sp, sq);
+      
+      int inverted;
+      l = categorize( l, inverted);
+      
+      if(Infi_box::is_edge_on_infibox(e))
+	if(Infi_box::is_type4(e))
+	  M4[l].push_back(e);
+	else
+	  if(Infi_box::is_type3(e))
+	    M3[l].push_back(e);
+	  else
+	    M2[l].push_back(e);
+      else
+	M[l].push_back(e);
+      
+      // the following trace crashes when compiling with optimizations (-O{n})
+      //CGAL_NEF_TRACEN(Infi_box::standard_point(point(vertex(e)))+
+      
+      CGAL_NEF_TRACEN(" line("<<l<<")"<<" inverted="<<inverted);
+    }
+    
+    typename Pluecker_line_map::iterator it;
+    
+    CGAL_forall_iterators(it,M4) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = *itl;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = *itl;
+	while(normalized(e1->vector()) != normalized(-e2->vector())) {
+	  ++itl;
+	  make_twins(e1,*itl);
+	  e1 = e2;
+	  ++itl;
+	  e2 = *itl;
+	}
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+
+    CGAL_forall_iterators(it,M3) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = *itl;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = *itl;
+	while(normalized(e1->vector()) != normalized(-e2->vector())) {
+	  ++itl;
+	  make_twins(e1,*itl);
+	  e1 = e2;
+	  ++itl;
+	  e2 = *itl;
+	}
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }    
+
+    CGAL_forall_iterators(it,M2) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = *itl;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = *itl;
+	while(normalized(e1->vector()) != normalized(-e2->vector())) {
+	  ++itl;
+	  this->make_twins(e1,*itl);
+	  e1 = e2;
+	  ++itl;
+	  e2 = *itl;
+	}
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	this->make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+    
+    CGAL_forall_iterators(it,M) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = *itl;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = *itl;
+	while(normalized(e1->vector()) != normalized(-e2->vector())) {
+	  ++itl;
+	  this->make_twins(e1,*itl);
+	  e1 = e2;
+	  ++itl;
+	  e2 = *itl;
+	}
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	this->make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+
+  }
+#else
+  void pair_up_halfedges() const {
+  /*{\Mop pairs all halfedge stubs to create the edges in 3-space.}*/
+
+//    CGAL_NEF_SETDTHREAD(43*61);
+    CGAL_NEF_TRACEN(">>>>>pair_up_halfedges");
+    typedef Halfedge_key< Point_3, Halfedge_handle>
+      Halfedge_key;
+    typedef Halfedge_key_lt< Point_3, Halfedge_handle, SNC_decorator> 
+      Halfedge_key_lt;
+    typedef std::list<Halfedge_key>  Halfedge_list;
+    
+    typedef typename Standard_kernel::Kernel_tag   Kernel_tag;
+    typedef CGAL::Pluecker_line_3<Kernel_tag,Standard_kernel> Pluecker_line_3;
+    typedef CGAL::Pluecker_line_lt        Pluecker_line_lt;
+    typedef std::map< Pluecker_line_3, Halfedge_list, Pluecker_line_lt> 
+      Pluecker_line_map;
+    
+    SNC_decorator D(*this);
+    Pluecker_line_map M;
+    Pluecker_line_map M2;
+    Pluecker_line_map M3;
+    Pluecker_line_map M4;
+    
+    NT eval(Infi_box::compute_evaluation_constant_for_halfedge_pairup(*this->sncp()));;
+    
+    Halfedge_iterator e;
+    CGAL_forall_halfedges(e,*this->sncp()) {
+      //    progress++;
+      Point_3 p = e->source()->point();
+      Point_3 q = p + e->vector();
+      CGAL_NEF_TRACE(" segment("<<p<<", "<<q<<")"<<
+	    " direction("<<e->vector()<<")");
+      Standard_point_3 sp = Infi_box::standard_point(p,eval);
+      Standard_point_3 sq = Infi_box::standard_point(q,eval);
+      Pluecker_line_3  l( sp, sq);
+      
+      int inverted;
+      l = categorize( l, inverted);
+      
+      if(Infi_box::is_edge_on_infibox(e))
+	if(Infi_box::is_type4(e))
+	  M4[l].push_back(Halfedge_key(p,inverted,e));
+	else
+	  if(Infi_box::is_type3(e))
+	    M3[l].push_back(Halfedge_key(p,inverted,e));
+	  else
+	    M2[l].push_back(Halfedge_key(p,inverted,e));
+      else
+	M[l].push_back(Halfedge_key(p,inverted,e));
+      
+      // the following trace crashes when compiling with optimizations (-O{n})
+      //CGAL_NEF_TRACEN(Infi_box::standard_point(point(vertex(e)))+
+      
+      CGAL_NEF_TRACEN(" line("<<l<<")"<<" inverted="<<inverted);
+    }
+    
+    typename Pluecker_line_map::iterator it;
+    
+    CGAL_forall_iterators(it,M4) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = itl->e;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = itl->e;
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+    
+    CGAL_forall_iterators(it,M3) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = itl->e;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = itl->e;
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+    
+    CGAL_forall_iterators(it,M2) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = itl->e;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = itl->e;
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector());
+	make_twins(e1,e2);
+	CGAL_assertion(e1->mark()==e2->mark());
+	
+	// discard temporary sphere_point ?
+      }
+    }
+    
+    CGAL_forall_iterators(it,M) {
+      //    progress++;
+      it->second.sort(Halfedge_key_lt());
+      CGAL_NEF_TRACEN("search opposite  "<<it->first); 
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = itl->e;
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = itl->e;
+	CGAL_NEF_TRACEN("    " << e1->source()->point() 
+			<< " -> " << e2->source()->point());
+	CGAL_NEF_TRACEN(e1->vector()<<" -> "<< -e2->vector());
+	CGAL_assertion(e1->source()->point() != e2->source()->point());
+	CGAL_assertion(e1->mark()==e2->mark());
+	make_twins(e1,e2);
+	
+	// discard temporary sphere_point ?
+      }
+    }
+  }
+#endif
+
+  void link_shalfedges_to_facet_cycles() const {
+  /*{\Mop creates all non-trivial facet cycles from sedges. 
+  \precond |pair_up_halfedges()| was called before.}*/
+    
+  //  CGAL_NEF_SETDTHREAD(43*31);
+    CGAL_NEF_TRACEN(">>>>>link_shalfedges_to_facet_cycles");
+
+#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
+    Point_3 p1(1,2,7), p2(p1);     
+    bool reference_counted = (&(p1.hx()) == &(p2.hx()));
+#endif
+
+    Halfedge_iterator e;
+    CGAL_forall_edges(e,*this->sncp()) {
+      //    progress++;
+      CGAL_NEF_TRACEN("");
+      CGAL_NEF_TRACEN(PH(e));
+      Halfedge_iterator et = e->twin();
+      SM_decorator D(&*e->source()), Dt(&*et->source());
+      CGAL_NEF_TRACEN(e->source()->point());
+      if ( D.is_isolated(e) ) continue;
+      SHalfedge_around_svertex_circulator ce(D.first_out_edge(e)),cee(ce);
+      SHalfedge_around_svertex_circulator cet(Dt.first_out_edge(et)),cete(cet);
+      
+#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
+      if(reference_counted) {
+	CGAL_For_all(cet,cete)
+	  if ( &(cet->circle().a()) == &(ce->circle().opposite().a()) && 
+	       cet->source()->twin() == ce->source() )
+	    break;
+      } else
+#endif
+        CGAL_For_all(cet,cete)
+	  if ( cet->circle() == ce->circle().opposite() && 
+	       cet->source()->twin() == ce->source() ) 
+            break;
+
+#ifndef NDEBUG
+      if( cet->circle() != ce->circle().opposite() )
+	CGAL_NEF_TRACEN("assertion failed!");
+      
+      CGAL_NEF_TRACEN("vertices " << e->source()->point() << 
+      "    "      << et->source()->point());
+      
+      
+      SHalfedge_around_svertex_circulator sc(D.first_out_edge(e));
+      SHalfedge_around_svertex_circulator sct(Dt.first_out_edge(et));
+
+      CGAL_NEF_TRACEN("");
+      CGAL_For_all(sc,cee)
+	CGAL_NEF_TRACEN("sseg at E addr="<<&*sc<<
+			" src="<< sc->source()->point()<<
+			" tgt="<< sc->target()->point()<<std::endl<<
+			" circle=" << normalized(sc->circle()));
+      CGAL_NEF_TRACEN("");
+
+      CGAL_For_all(sct,cete)
+      CGAL_NEF_TRACEN("sseg at ET addr="<<&*sct<<
+		      " src="<< sct->source()->point()<<
+		      " tgt="<<sct->target()->point()<<std::endl<<
+		      " circle=" << normalized(sct->circle()));
+      CGAL_NEF_TRACEN("");
+#endif
+
+      CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite()) ); 
+      CGAL_assertion( cet->source()->twin() == ce->source()); 
+      CGAL_For_all(ce,cee) { 
+	CGAL_NEF_TRACEN("circles " << normalized(cet->circle()) << "   " << normalized(ce->circle()) << 
+			" sources " << cet->target()->point() << 
+			"   " << ce->target()->point());
+	CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite())); 
+	CGAL_assertion( cet->source()->twin() == ce->source()); 
+	CGAL_assertion(ce->mark()==cet->mark());
+	link_as_prev_next_pair(cet->twin(),ce);
+	link_as_prev_next_pair(ce->twin(),cet);
+	--cet; // ce moves ccw, cet moves cw
+      }
+    }
+  }
+
+  void categorize_facet_cycles_and_create_facets() const {
+  /*{\Mop collects all facet cycles incident to a facet and creates
+  the facets. \precond |link_shalfedges_to_facet_cycles()| was called
+  before.}*/
+
+    //    CGAL_NEF_SETDTHREAD(43*31);
+    CGAL_NEF_TRACEN(">>>>>categorize_facet_cycles_and_create_facets");
+    
+    typedef std::list<Object_handle> Object_list;
+#ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING
+    typedef std::map<Plane_3, Object_list, Plane_RT_lt> 
+      Map_planes;
+#else
+    typedef std::map<Plane_3, Object_list, Plane_lt> 
+      Map_planes;
+#endif 
+   
+    Map_planes M;
+    SHalfedge_iterator e;
+    CGAL_forall_shalfedges(e,*this->sncp()) {
+      Sphere_circle c(e->circle());
+      Plane_3 h = c.plane_through(e->source()->source()->point());
+      CGAL_NEF_TRACEN("\n" << e->source()->twin()->source()->point() <<" - "
+		      << e->source()->source()->point() <<" - "<< 
+		      e->twin()->source()->twin()->source()->point() << 
+		      " has plane " << h << " has circle " << e->circle() << 
+		      " has signum " << sign_of(h));
+      if ( sign_of(h)<0 ) continue;
+      M[normalized(h)].push_back(make_object(e->twin())); 
+      CGAL_NEF_TRACEN(" normalized as " << normalized(h));
+      /*
+	Unique_hash_map<SHalfedge_handle, bool> Done(false);
+	SHalfedge_iterator ei;
+	CGAL_forall_sedges(ei,*this->sncp()) {
+	if(Done[ei]) continue;
+	Sphere_circle c(ei->circle());
+	Plane_3 h = c.plane_through(ei->source()->source()->point());
+	CGAL_NEF_TRACEN("\n" << ei->source()->twin()->source()->point() <<" - "
+	<< ei->source()->source()->point() <<" - "<< 
+		      ei->twin()->source()->twin()->source()->point() << 
+		      " has plane " << h << " has circle " << ei->circle() << 
+		      " has signum " << sign_of(h));
+      SHalfedge_handle e(ei);
+      if ( sign_of(h)<0 ) {
+	h = h.opposite();
+	e = e->twin();
+      }
+      SHalfedge_around_facet_circulator sfc(e), send(sfc);
+      CGAL_For_all(sfc, send) {
+	M[normalized(h)].push_back(make_object(e->twin())); 
+	Done[sfc] = true;
+	Done[sfc->twin()] = true;
+	CGAL_NEF_TRACEN(" normalized as " << normalized(h)); 
+      }
+      */
+    }
+    SHalfloop_iterator l;
+    CGAL_forall_shalfloops(l,*this->sncp()) {
+      Sphere_circle c(l->circle());
+      Plane_3 h = c.plane_through(l->incident_sface()->center_vertex()->point()); 
+      if ( sign_of(h)<0 ) continue;
+      // CGAL_assertion( h == normalized(h));
+      M[normalized(h)].push_back(make_object(l->twin()));
+    }
+    
+#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
+  number_of_plane_sweeps=0;
+  timer_plane_sweeps.reset();
+#endif
+
+    typename Map_planes::iterator it;
+    CGAL_forall_iterators(it,M) { 
+      //    progress2++;
+      //      CGAL_NEF_TRACEN("  plane "<<it->first<<"             "<<(it->first).point());
+      FM_decorator D(*this->sncp());
+      D.create_facet_objects(it->first,it->second.begin(),it->second.end());
+    }
+    //       CGAL_NEF_SETDTHREAD(1);
+  }
+
+  void create_volumes() {
+  /*{\Mop collects all shells incident to a volume and creates the
+  volumes.  \precond |categorize_facet_cycles_and_creating_facets()| was
+  called before.}*/
+
+#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
+    number_of_ray_shooting_queries=0;
+    timer_ray_shooting.reset();
+#endif 
+
+    //    CGAL_NEF_SETDTHREAD(37*43*503*509);
+
+    CGAL_NEF_TRACEN(">>>>>create_volumes");
+    Sface_shell_hash     ShellSf(0);
+    Face_shell_hash      ShellF(0);
+    SFace_visited_hash Done(false);
+    Shell_explorer V(*this,ShellSf,ShellF,Done);
+    std::vector<SFace_handle> MinimalSFace;
+    std::vector<SFace_handle> EntrySFace;
+    std::vector<bool> Closed;
+    
+    SFace_iterator f;
+    // First, we classify all the Shere Faces per Shell.  For each Shell we
+    //     determine its minimum lexicographyly vertex and we check wheter the
+    //     Shell encloses a region (closed surface) or not. 
+    CGAL_forall_sfaces(f,*this->sncp()) {
+      //    progress++;
+      CGAL_NEF_TRACEN("sface in " << ShellSf[f]);
+      if ( Done[f] ) 
+	continue;
+      V.minimal_sface() = f;
+      visit_shell_objects(f,V);
+      
+      CGAL_NEF_TRACEN("minimal vertex " << V.minimal_sface()->center_vertex()->point());
+
+      MinimalSFace.push_back(V.minimal_sface());
+      EntrySFace.push_back(f);
+      V.increment_shell_number();
+      CGAL_NEF_TRACEN("sface out " << ShellSf[f]);
+    }
+    
+    for(unsigned int i=0; i<EntrySFace.size(); ++i)
+      Closed.push_back(false);
+    
+    Halffacet_iterator hf;
+    CGAL_forall_facets(hf,*this) 
+      if(ShellF[hf] != ShellF[hf->twin()]) {
+	Closed[ShellF[hf]] = true;
+	Closed[ShellF[hf->twin()]] = true;
+      }
+    
+    CGAL_assertion( pl != NULL);
+
+#ifdef CGAL_NEF3_TIMER_INITIALIZE_KDTREE
+    CGAL::Timer timer_initialize_kdtree;
+    timer_initialize_kdtree.start();
+#endif
+    pl->initialize(this->sncp()); // construct the point locator 
+#ifdef CGAL_NEF3_TIMER_INITIALIZE_KDTREE
+    timer_initialize_kdtree.stop();
+    if(cgal_nef3_timer_on)
+      std::cout << "Runtime_initialize_kdtree: " 
+		<< timer_initialize_kdtree.time() << std::endl;
+#endif
+
+    //   then, we determine the Shells which correspond to Volumes via a ray
+    //   shootting in the direction (-1,0,0) over the Sphere_map of the minimal 
+    //   vertex.  The Shell corresponds to a Volume if the object hit belongs 
+    //   to another Shell. 
+    
+    this->sncp()->new_volume(); // outermost volume (nirvana)
+    if(MinimalSFace.size() == 0) return;
+    Vertex_handle v_min = MinimalSFace[0]->center_vertex();
+    for( unsigned int i = 0; i < MinimalSFace.size(); ++i) {
+      //    progress2++;
+      Vertex_handle v = MinimalSFace[i]->center_vertex();
+      if(CGAL::lexicographically_xyz_smaller(v->point(),v_min->point()))
+	v_min=v;
+      CGAL_NEF_TRACEN( "Shell #" << i << " minimal vertex: " << v->point());
+      SM_point_locator D((Sphere_map*) &*v);
+      Object_handle o = D.locate(Sphere_point(-1,0,0));
+      SFace_const_handle sfc;
+      if( !CGAL::assign(sfc, o) || ShellSf[sfc] != i) {
+	CGAL_NEF_TRACEN("the shell encloses a volume");
+	CGAL_NEF_TRACEN("sface hit? "<<CGAL::assign(sfc,o));
+	if( CGAL::assign(sfc, o)) { CGAL_NEF_TRACEN("sface on another shell? "<<ShellSf[sfc]); }
+	SFace_handle f = MinimalSFace[i];
+	CGAL_assertion( ShellSf[f] == i );
+	if( Closed[i] ) {
+	  CGAL_NEF_TRACEN("Shell #" << i << " is closed");
+	  SM_decorator SD(&*v);
+	  Volume_handle c = this->sncp()->new_volume();
+	  c->mark() = f->mark(); // TODO test if line is redundant
+	  link_as_inner_shell(f, c );
+	  CGAL_NEF_TRACE( "Shell #" << i <<" linked as inner shell");
+	  CGAL_NEF_TRACEN( "(sface" << (CGAL::assign(sfc,o)?"":" not") << " hit case)");
+	}
+      }
+    }
+    
+    // finaly, we go through all the Shells which do not correspond to a Volume 
+    //     and we assign them to its enclosing Volume determined via a facet below
+    //     check. 
+    
+    CGAL_forall_sfaces(f,*this->sncp()) {
+      //    progress3++;
+      if ( f->volume() != Volume_handle() ) 
+	continue;
+      CGAL_NEF_TRACEN( "Outer shell #" << ShellSf[f] << " volume?");
+      Volume_handle c = determine_volume( MinimalSFace[ShellSf[f]], 
+					  MinimalSFace, ShellSf );
+      c->mark() = f->mark();
+      link_as_outer_shell( f, c );
+    } 
+  }
+
+  Halffacet_handle get_facet_below( Vertex_handle vi, 
+				    const std::vector< SFace_handle>& MinimalSFace, 
+				    const Sface_shell_hash&  Shell) const {
+    // {\Mop determines the facet below a vertex |vi| via ray shooting. }
+    
+    Halffacet_handle f_below;
+    Point_3 p = vi->point();
+    if(!Infi_box::is_standard(p))
+      return Halffacet_handle();
+    
+    Ray_3 ray = Ray_3(p, Direction_3(-1,0,0));
+#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
+    number_of_ray_shooting_queries++;
+    timer_ray_shooting.start();
+#endif 
+    Object_handle o = pl->shoot(ray);
+#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
+    timer_ray_shooting.stop();
+#endif 
+    // The ray here has an special property since it is shooted from the lowest
+    // vertex in a shell, so it would be expected that the ray goes along the
+    // interior of a volume before it hits a 2-skeleton element.
+    // Unfortunatelly, it seems to be possible that several shells are incident
+    // to this lowest vertex, and in consequence, the ray could also go along
+    // an edge or a facet belonging to a different shell.
+    // This fact invalidates the precondition of the get_visible_facet method,
+    // (the ray must pierce the local view of the hit object in a sface).
+    // This situation has not been analyzed and has to be verified. Granados.
+    Vertex_handle v;
+    Halfedge_handle e;
+    Halffacet_handle f;
+    CGAL_NEF_TRACEN("get_facet_below");
+    if( CGAL::assign(v, o)) {
+      CGAL_NEF_TRACEN("facet below from from vertex...");
+      f_below = get_visible_facet(v, ray);
+      if( f_below == Halffacet_handle()) {
+	CGAL_assertion(v->sfaces_begin() == v->sfaces_last());
+	f_below = get_facet_below(MinimalSFace[Shell[v->sfaces_begin()]]->center_vertex(), 
+				  MinimalSFace,Shell);
+      }
+    }
+    else if( CGAL::assign(e, o)) {
+      CGAL_NEF_TRACEN("facet below from from edge...");
+      f_below = get_visible_facet(e, ray);
+      if( f_below == Halffacet_handle()) {
+	CGAL_assertion(e->source()->sfaces_begin() == e->source()->sfaces_last());
+	f_below = get_facet_below(MinimalSFace[Shell[e->source()->sfaces_begin()]]->center_vertex(), 
+				  MinimalSFace, Shell);
+      }
+    }
+    else if( CGAL::assign(f, o)) {
+      CGAL_NEF_TRACEN("facet below from from facet...");
+      f_below = get_visible_facet(f, ray);
+      CGAL_assertion( f_below != Halffacet_handle());
+    }
+    else { CGAL_NEF_TRACEN("no facet below found..."); }
+    return f_below;
+  }  
+
+  Volume_handle determine_volume( SFace_handle sf, 
+                const std::vector< SFace_handle>& MinimalSFace, 
+				  const Sface_shell_hash&  Shell ) const {
+    //{\Mop determines the volume |C| that a shell |S| pointed by |sf| 
+    //  belongs to.  \precondition |S| separates the volume |C| from an enclosed
+    //  volume.}
+    
+    CGAL_NEF_TRACEN("determine volume");
+    Vertex_handle v_min = MinimalSFace[Shell[sf]]->center_vertex();
+    
+    Halffacet_handle f_below = get_facet_below(v_min, MinimalSFace, Shell);
+    if ( f_below == Halffacet_handle())
+      return SNC_decorator(*this).volumes_begin();
+    Volume_handle c = f_below->incident_volume();
+    if( c != Volume_handle()) {
+      CGAL_NEF_TRACE( "Volume " << &*c << " hit ");
+      CGAL_NEF_TRACEN("(Shell #" << Shell[adjacent_sface(f_below)] << ")");
+      return c;
+    }
+    SFace_handle sf_below = adjacent_sface(f_below);
+    CGAL_NEF_TRACE( "Shell not assigned to a volume hit ");
+    CGAL_NEF_TRACEN( "(Inner shell #" << Shell[sf_below] << ")");
+    c = determine_volume( sf_below, MinimalSFace, Shell);
+    link_as_inner_shell( sf_below, c);
+    return c;
+  }
+   
+  void build_external_structure() {
+
+#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
+    CGAL::Timer timer_external_structure;
+    timer_external_structure.start();
+#endif
+
+#ifdef CGAL_NEF3_TIMER_PLUECKER
+    CGAL::Timer timer_pluecker;
+    timer_pluecker.start();
+#endif
+    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
+    //    O0.print();
+    pair_up_halfedges();
+#ifdef CGAL_NEF3_TIMER_PLUECKER
+    timer_pluecker.stop();
+     if(cgal_nef3_timer_on)
+      std::cout << "Runtime_pluecker: " 
+		<< timer_pluecker.time() << std::endl;
+#endif
+    link_shalfedges_to_facet_cycles();
+    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
+    //    O0.print();
+    categorize_facet_cycles_and_create_facets();
+    create_volumes();
+
+#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
+    timer_external_structure.stop();
+    if(cgal_nef3_timer_on)
+      std::cout << "Runtime_external_structure: " 
+		<< timer_external_structure.time() << std::endl;
+#endif
+  }
+
+  template<typename Association>
+  void build_after_binary_operation(Association) {
+
+#ifdef CGAL_NEF3_TIMER_SIMPLIFICATION
+    CGAL::Timer timer_simplification;
+    timer_simplification.start();
+#endif
+    SNC_simplify simp(*this->sncp());
+    simp.vertex_simplification(SNC_simplify::NO_SNC);
+#ifdef CGAL_NEF3_TIMER_SIMPLIFICATION
+    timer_simplification.stop();
+    if(cgal_nef3_timer_on)
+      std::cout << "Runtime_simplification: " 
+		<< timer_simplification.time() << std::endl;
+#endif
+    
+    CGAL_NEF_TRACEN("\nnumber of vertices (so far...) = "
+		    << this->sncp()->number_of_vertices());
+    
+    CGAL_NEF_TRACEN("=> resultant vertices (after simplification): ");
+    
+    build_external_structure();
+  }
+
+  void clear_external_structure() {
+    this->sncp()->clear_snc_boundary();
+
+    while(this->sncp()->volumes_begin()!= this->sncp()->volumes_end())
+      this->sncp()->delete_volume(this->sncp()->volumes_begin());
+
+    while(this->sncp()->halffacets_begin()!= this->sncp()->halffacets_end())
+      this->sncp()->delete_halffacet_pair(this->sncp()->halffacets_begin());
+
+    SHalfedge_iterator se;
+    CGAL_forall_shalfedges(se,*this)
+      se->facet() = Halffacet_handle();
+
+    SFace_iterator sf;
+    CGAL_forall_sfaces(sf,*this)
+      sf->volume() = Volume_handle();
+  }
+}; 
+
+
+
+template <typename Items_, typename SNC_structure_>
+class SNC_external_structure : public SNC_external_structure_base<Items_, SNC_structure_>
+{ 
+  typedef CGAL::SNC_decorator<SNC_structure_>                 SNC_decorator;
+  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
+public:
+
+  SNC_external_structure( SNC_structure_& W, SNC_point_locator* spl = NULL) 
+    : SNC_external_structure_base<Items_, SNC_structure_>(W, spl) 
+  {}
+};
+
+
+
+
+template <typename SNC_structure_>
+class SNC_external_structure<SNC_indexed_items, SNC_structure_> 
+  : public SNC_external_structure_base<int, SNC_structure_> {
+ 
+public:
+  typedef SNC_structure_                                SNC_structure;
+  typedef SNC_external_structure_base<int, SNC_structure>    Base;
+
+  typedef CGAL::SNC_decorator<SNC_structure>                 SNC_decorator;
+  typedef CGAL::SNC_point_locator<SNC_decorator>             SNC_point_locator;
+  typedef CGAL::SNC_FM_decorator<SNC_structure>              FM_decorator;
+  typedef typename SNC_structure::Sphere_map                 Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>                     SM_decorator;  
+  typedef CGAL::SNC_simplify<SNC_indexed_items, SNC_structure> SNC_simplify;
+
+  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator;
+  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator;
+  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator;
+
+  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
+  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
+
+  typedef typename SNC_structure::Object_handle Object_handle;
+
+  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
+    SHalfedge_around_facet_circulator;
+  typedef typename SM_decorator::SHalfedge_around_svertex_circulator 
+    SHalfedge_around_svertex_circulator;
+  
+  typedef typename SNC_structure::Plane_3 Plane_3;
+
+  using Base::make_twins;
+  using Base::link_as_prev_next_pair;
+  using Base::link_as_inner_shell;
+
+
+  SNC_external_structure( SNC_structure& W, SNC_point_locator* spl = NULL) 
+    : Base(W, spl) {}
+  /*{\Mcreate makes |\Mvar| a decorator of |W|.}*/
+
+ public:
+  void pair_up_halfedges() const {
+    typedef Halfedge_key_lt4<Halfedge_handle>  Halfedge_key_lt;
+    typedef std::list<Halfedge_handle>  Halfedge_list;
+    typedef std::map<int, Halfedge_list, int_lt> index_map;
+
+    CGAL_NEF_TRACEN("pair up by indexes");
+
+    index_map i2he;
+    Halfedge_iterator ei;
+    CGAL_forall_halfedges(ei, *this->sncp()) 
+      i2he[ei->get_index()].push_back(ei);
+    
+    typename index_map::iterator it;
+    CGAL_forall_iterators(it,i2he) {
+      CGAL_NEF_TRACEN("pair up " << it->first);
+      it->second.sort(Halfedge_key_lt());
+      typename Halfedge_list::iterator itl;
+      CGAL_forall_iterators(itl,it->second) {
+	Halfedge_handle e1 = *itl;
+	CGAL_NEF_TRACEN(e1->source()->point() << ", " << e1->vector());
+	++itl; 
+	CGAL_assertion(itl != it->second.end());
+	Halfedge_handle e2 = *itl;
+	CGAL_NEF_TRACEN(" + " << e2->source()->point() << ", " << e2->vector());
+	make_twins(e1,e2);
+	//	SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
+	//	O0.print();
+	CGAL_assertion(e1->mark()==e2->mark());
+      }
+    }
+  }
+
+  void link_shalfedges_to_facet_cycles() const {
+  /*{\Mop creates all non-trivial facet cycles from sedges. 
+  \precond |pair_up_halfedges()| was called before.}*/
+    
+  //  CGAL_NEF_SETDTHREAD(43*31);
+    CGAL_NEF_TRACEN(">>>>>link_shalfedges_to_facet_cycles");
+
+    Halfedge_iterator e;
+    CGAL_forall_edges(e,*this->sncp()) {
+      //    progress++;
+      CGAL_NEF_TRACEN("");
+      CGAL_NEF_TRACEN(PH(e));
+      Halfedge_iterator et = e->twin();
+      SM_decorator D(&*e->source()), Dt(&*et->source());
+      CGAL_NEF_TRACEN(e->source()->point());
+      if ( D.is_isolated(e) ) continue;
+      SHalfedge_around_svertex_circulator ce(D.first_out_edge(e)),cee(ce);
+      SHalfedge_around_svertex_circulator cet(Dt.first_out_edge(et)),cete(cet);
+      
+      CGAL_For_all(cet,cete) {
+	//	std::cerr << cet->get_index() << ", " << ce->twin()->get_index() << std::endl;
+	if (cet->get_forward_index() == ce->twin()->get_backward_index())
+	    //	    cet->source()->twin() == ce->source())
+	  break;
+      }
+
+      CGAL_NEF_TRACEN("vertices " << e->source()->point() << 
+      "    "      << et->source()->point());
+      
+      SHalfedge_around_svertex_circulator sc(D.first_out_edge(e));
+      SHalfedge_around_svertex_circulator sct(Dt.first_out_edge(et));
+
+      CGAL_NEF_TRACEN("");
+      CGAL_For_all(sc,cee)
+	CGAL_NEF_TRACEN("sseg at E addr="<<&*sc<<
+			" src="<< sc->source()->point()<< 
+			" tgt="<< sc->target()->point()<< std::endl << 
+			" circle=" << sc->circle()<< std::endl <<
+			" indexes=" << sc->get_forward_index() << 
+			"," << sc->get_backward_index() << std::endl <<
+			"         " << sc->twin()->get_forward_index() <<
+			"," << sc->twin()->get_backward_index());
+ 
+      CGAL_NEF_TRACEN("");
+
+      CGAL_For_all(sct,cete)
+      CGAL_NEF_TRACEN("sseg at ET addr="<<&*sct<<
+		      " src="<< sct->source()->point()<<
+		      " tgt="<<sct->target()->point() <<std::endl<<
+		      " circle=" << sct->circle() << std::endl<<
+		      " indexes=" << sct->get_forward_index() << 
+		      "," << sct->get_backward_index() << std::endl <<
+		      "         " << sct->twin()->get_forward_index() <<
+	              "," << sct->twin()->get_backward_index());
+      CGAL_NEF_TRACEN("");
+
+      CGAL_assertion( cet->get_index() == ce->twin()->get_index());
+      CGAL_assertion( cet->twin()->get_index() == ce->get_index());
+      CGAL_assertion( cet->source()->twin() == ce->source()); 
+      CGAL_For_all(ce,cee) { 
+	CGAL_NEF_TRACEN("circles " << cet->circle() << "   " << ce->circle() << 
+			" sources " << cet->target()->point() << 
+			"   " << ce->target()->point());
+	CGAL_assertion( cet->source()->twin() == ce->source()); 
+	CGAL_assertion(ce->mark()==cet->mark());
+	link_as_prev_next_pair(cet->twin(),ce);
+	link_as_prev_next_pair(ce->twin(),cet);
+	--cet; // ce moves ccw, cet moves cw
+      }
+    }
+  }
+
+  void categorize_facet_cycles_and_create_facets() const {
+  /*{\Mop collects all facet cycles incident to a facet and creates
+  the facets. \precond |link_shalfedges_to_facet_cycles()| was called
+  before.}*/
+
+    //    CGAL_NEF_SETDTHREAD(43*31);
+    CGAL_NEF_TRACEN(">>>>>categorize_facet_cycles_and_create_facets");
+    
+    typedef std::list<Object_handle> Object_list;
+    typedef std::map<int, Object_list> 
+      Map_planes;
+   
+    Map_planes M;
+    SHalfedge_iterator e;
+    CGAL_forall_shalfedges(e,*this->sncp()) {
+      if(e->get_index() > e->twin()->get_index())
+	continue;
+      M[e->get_index()].push_back(make_object(e));
+    }
+    SHalfloop_iterator l;
+    CGAL_forall_shalfloops(l,*this->sncp()) {
+      if(l->get_index() > l->twin()->get_index())
+	continue;
+      M[l->get_index()].push_back(make_object(l));
+    }
+    
+#ifdef CGAL_NEF3_TIMER_PLANE_SWEEPS
+  number_of_plane_sweeps=0;
+  timer_plane_sweeps.reset();
+#endif
+
+    typename Map_planes::iterator it;
+    CGAL_forall_iterators(it,M) { 
+      CGAL_NEF_TRACEN("  plane "<< it->first);
+      CGAL_NEF_TRACEN("  size "<< it->second.size());
+      FM_decorator D(*this->sncp());
+      Plane_3 h;
+      Object_handle o(*it->second.begin());
+      if(CGAL::assign(e, o))
+	h = e->circle().opposite().plane_through(e->source()->source()->point());
+      else if(CGAL::assign(l, o))
+	h = l->circle().opposite().plane_through(l->incident_sface()->center_vertex()->point());
+      else
+	CGAL_error_msg( "wrong handle");
+
+      D.create_facet_objects(h,it->second.begin(),it->second.end());
+    }
+    //       CGAL_NEF_SETDTHREAD(1);
+  }
+
+  void create_volumes() {
+    Base::create_volumes();
+  }
+   
+  void build_external_structure() {
+//    CGAL_NEF_SETDTHREAD(503*509);
+
+#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
+    CGAL::Timer timer_external_structure;
+    timer_external_structure.start();
+#endif
+
+#ifdef CGAL_NEF3_TIMER_PLUECKER
+    CGAL::Timer timer_pluecker;
+    timer_pluecker.start();
+#endif
+    //    SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
+    //    O0.print();
+    pair_up_halfedges();
+#ifdef CGAL_NEF3_TIMER_PLUECKER
+    timer_pluecker.stop();
+     if(cgal_nef3_timer_on)
+      std::cout << "Runtime_pluecker: " 
+		<< timer_pluecker.time() << std::endl;
+#endif
+     //     SNC_io_parser<SNC_structure> O0(std::cerr,*this->sncp());
+     //     O0.print();
+    link_shalfedges_to_facet_cycles();
+
+    std::map<int, int> hash;
+    CGAL::Unique_hash_map<SHalfedge_handle, bool> done(false);
+
+    SHalfedge_iterator sei;
+    CGAL_forall_shalfedges(sei, *this->sncp()) {
+      hash[sei->get_index()] = sei->get_index();
+    }
+    
+    CGAL_forall_shalfedges(sei, *this->sncp()) {
+      if(done[sei])
+	continue;
+      SHalfedge_around_facet_circulator circ(sei), end(circ);
+      int index = circ->get_index();
+      ++circ;
+      CGAL_For_all(circ, end)
+	if(circ->get_index() < index)
+	  index = circ->get_index();      
+      index = hash[index];
+      CGAL_For_all(circ, end) {
+	hash[circ->get_index()] = index;
+	circ->set_index(index);
+	done[circ] = true;
+      }
+    }
+    
+    SHalfloop_iterator sli;
+    CGAL_forall_shalfloops(sli, *this->sncp())
+      sli->set_index(hash[sli->get_index()]);
+
+    categorize_facet_cycles_and_create_facets();
+    create_volumes();
+
+#ifdef CGAL_NEF3_TIMER_EXTERNAL_STRUCTURE
+    timer_external_structure.stop();
+    if(cgal_nef3_timer_on)
+      std::cout << "Runtime_external_structure: " 
+		<< timer_external_structure.time() << std::endl;
+#endif
+  }
+
+  void clear_external_structure() {
+    Base::clear_external_structure();    
+  }
+
+  template<typename Association>
+  void build_after_binary_operation(Association& A) {
+    
+    SHalfedge_iterator sei;
+    CGAL_forall_shalfedges(sei, *this->sncp()) {
+      CGAL_NEF_TRACEN("hash sedge " << sei->get_index() 
+		      << "->" << A.get_hash(sei->get_index()));
+      sei->set_index(A.get_hash(sei->get_index()));
+    }
+
+    SHalfloop_iterator sli;
+    CGAL_forall_shalfloops(sli, *this->sncp()) {
+      CGAL_NEF_TRACEN("hash sloop " << sli->get_index() 
+		      << "->" << A.get_hash(sli->get_index()));
+      sli->set_index(A.get_hash(sli->get_index()));
+    }
+
+    //    CGAL_NEF_SETDTHREAD(43);
+    /*
+    {    CGAL::SNC_io_parser<SNC_structure> O
+      (std::cerr, *this->sncp(), false, true);
+      O.print();}
+    */
+    pair_up_halfedges();
+    /*
+    {      CGAL::SNC_io_parser<SNC_structure> O
+	(std::cerr, *this->sncp(), false, true);
+      O.print();}
+    */
+    link_shalfedges_to_facet_cycles();
+
+    SNC_simplify simp(*this->sncp());
+    simp.vertex_simplificationI();
+
+    //    std::map<int, int> hash;
+    CGAL::Unique_hash_map<SHalfedge_handle, bool> 
+      done(false);
+
+    /*
+    SHalfedge_iterator sei;
+    CGAL_forall_shalfedges(sei, *this->sncp()) {
+      hash[sei->get_forward_index()] = sei->get_forward_index();
+      hash[sei->get_backward_index()] = sei->get_backward_index();
+    }
+    */
+
+    categorize_facet_cycles_and_create_facets();
+    create_volumes();
+  }
+}; 
+
+} //namespace CGAL
+#endif //CGAL_SNC_EXTERNAL_STRUCTURE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_indexed_items.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_indexed_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_indexed_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_indexed_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_io_parser.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_io_parser.h
new file mode 100644
index 0000000..6bea47f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_io_parser.h
@@ -0,0 +1,2086 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
+//                 Miguel Granados <granados at mpi-sb.mpg.de>
+//                 Susan Hert      <hert at mpi-sb.mpg.de>
+//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_SNC_IO_PARSER_H
+#define CGAL_SNC_IO_PARSER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_3/SNC_structure.h>
+#include <CGAL/Nef_3/SNC_decorator.h>
+#include <CGAL/Nef_3/SNC_constructor.h>
+#include <CGAL/Nef_2/Object_index.h>
+#include <CGAL/Nef_S2/Normalizing.h>
+#include <vector>
+#include <CGAL/Fraction_traits.h>
+#include <CGAL/Homogeneous_converter.h>
+#include <CGAL/Cartesian_converter.h>
+
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 293
+#include <CGAL/Nef_2/debug.h>
+
+#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
+#include <boost/any.hpp>
+#endif
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace CGAL {
+
+template <class NT> class Lazy_exact_nt;
+class Homogeneous_tag;
+class Cartesian_tag;
+template <class T> struct Simple_cartesian;
+template <class T1, class T2> struct Simple_homogeneous;
+template <class RT> class Quotient;
+
+namespace Nef_3_internal{
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_Exact_kernel,Exact_kernel,false)
+
+template <class R,bool has_exact_kernel=Has_nested_Exact_kernel<R>::value, class FT = typename R::RT, class Kernel_tag=typename R::Kernel_tag>
+struct Type_converter{
+  typedef const CGAL::Point_3<R>& Point_3;
+  typedef const CGAL::Vector_3<R>& Vector_3;
+  typedef const CGAL::Plane_3<R>& Plane_3;
+
+  static Point_3 convert(Point_3 p){return p;}
+  static Plane_3 convert(Plane_3 p){return p;}
+  static Vector_3 convert(Vector_3 v){return v;}
+};
+
+template <class R>
+struct Type_converter<R, true>{
+  typedef CGAL::Point_3<typename R::Exact_kernel> Point_3;
+  typedef CGAL::Plane_3<typename R::Exact_kernel> Plane_3;
+  typedef CGAL::Vector_3<typename R::Exact_kernel> Vector_3;
+
+  static Point_3 convert(const CGAL::Point_3<R>& p){return p.exact();}
+  static Plane_3 convert(const CGAL::Plane_3<R>& p){return p.exact();}
+  static Vector_3 convert(const CGAL::Vector_3<R>& v){return v.exact();}
+};
+
+template <class R, class NT>
+struct Type_converter<R, false, ::CGAL::Lazy_exact_nt<NT>, ::CGAL::Cartesian_tag >{
+  typedef CGAL::Simple_cartesian< NT > EK;
+  typedef CGAL::Cartesian_converter<R, EK> Converter;
+  typedef CGAL::Point_3<EK> Point_3;
+  typedef CGAL::Plane_3<EK> Plane_3;
+  typedef CGAL::Vector_3<EK> Vector_3;
+
+  static Point_3 convert(const CGAL::Point_3<R>& p){return Converter()(p);}
+  static Plane_3 convert(const CGAL::Plane_3<R>& p){return Converter()(p);}
+  static Vector_3 convert(const CGAL::Vector_3<R>& v){return Converter()(v);}
+};
+
+template <class R, class NT>
+struct Type_converter<R, false, ::CGAL::Lazy_exact_nt<NT>, ::CGAL::Homogeneous_tag>{
+  typedef CGAL::Simple_homogeneous< NT, CGAL::Quotient<NT> > EK;
+  typedef CGAL::Homogeneous_converter<R, EK> Converter;
+  typedef CGAL::Point_3<EK> Point_3;
+  typedef CGAL::Plane_3<EK> Plane_3;
+  typedef CGAL::Vector_3<EK> Vector_3;
+
+  static Point_3 convert(const CGAL::Point_3<R>& p){return Converter()(p);}
+  static Plane_3 convert(const CGAL::Plane_3<R>& p){return Converter()(p);}
+  static Vector_3 convert(const CGAL::Vector_3<R>& v){return Converter()(v);}
+};
+
+
+template <class R>
+typename Type_converter<R>::Point_3 get_point(const CGAL::Point_3<R>& p){ return Type_converter<R>::convert(p); }
+
+template <class R>
+typename Type_converter<R>::Plane_3 get_plane(const CGAL::Plane_3<R>& p){ return Type_converter<R>::convert(p); }
+
+template <class R>
+typename Type_converter<R>::Vector_3 get_vector(const CGAL::Vector_3<R>& v){ return Type_converter<R>::convert(v); }
+
+} //end of Nef_3_internal
+
+template<typename T>
+class moreLeft : public T {
+
+  typedef typename T::SM_decorator      SM_decorator;
+  typedef typename T::SHalfedge_handle  SHalfedge_handle;
+  typedef typename T::Vector_3          Vector_3;
+  typedef typename T::FT                FT;
+  typedef typename T::RT                RT;
+
+ public:
+  moreLeft(T D) : T(D) {}
+
+  int operator()(SHalfedge_handle se1, SHalfedge_handle se2) {
+
+    CGAL_assertion(se1 != SHalfedge_handle());
+    if(se2 == SHalfedge_handle())
+      return -1;
+
+    SM_decorator SM(&*se1->source()->source());
+    Vector_3 vec1 = se1->circle().orthogonal_vector();
+    Vector_3 vec2 = se2->circle().orthogonal_vector();
+
+    if(vec1 == vec2)
+      return 0;
+
+    if(vec1.x() == RT(0) && vec2.x() == RT(0)) {
+      if(vec1.y() != vec2.y()) {
+	if(vec1.y() < vec2.y())
+	  return -1;
+	else
+	  return 1;
+      }
+      if(vec1.z() < vec2.z())
+	return -1;
+      else
+	return 1;
+    }
+
+    Vector_3 minus(-1,0,0);
+    FT sk1(minus*vec1),  sk2(minus*vec2);
+    if((sk1 >= FT(0) && sk2 <= FT(0)) ||
+       (sk1 <= FT(0) && sk2 >= FT(0))) {
+      if(sk1 > FT(0) || sk2 < FT(0))
+	return -1;
+      else
+	return 1;
+    }
+
+    FT len1 = vec1.x()*vec1.x()+vec1.y()*vec1.y()+vec1.z()*vec1.z();
+    FT len2 = vec2.x()*vec2.x()+vec2.y()*vec2.y()+vec2.z()*vec2.z();
+    FT diff = len1*sk2*sk2 - len2*sk1*sk1;
+
+    if(diff != FT(0)) {
+      if((sk1>FT(0) && diff<FT(0)) || (sk1<FT(0) && diff>FT(0)))
+	return -1;
+      else
+	return 1;
+    }
+
+    return 0;
+  }
+};
+
+template <typename T>
+class sort_vertices : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>          Base;
+  typedef typename T::Vertex_handle Vertex_handle;
+  typedef typename T::Point_3       Point_3;
+
+ public:
+  sort_vertices(T& D) : Base(D) {}
+
+  bool operator() (Vertex_handle v1, Vertex_handle v2) const {
+    return lexicographically_xyz_smaller(v1->point(), v2->point());
+  }
+};
+
+template <typename T>
+class sort_edges : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>            Base;
+  typedef typename T::Halfedge_handle Halfedge_handle;
+
+ public:
+  sort_edges(T& D) : Base(D) {}
+
+  bool operator() (Halfedge_handle e1, Halfedge_handle e2) const {
+    sort_vertices<T> SORT(*this->sncp());
+    if(e1->source() != e2->source())
+      return SORT(e1->source(),e2->source());
+    return SORT(e1->twin()->source(), e2->twin()->source());
+  }
+};
+
+template <typename T>
+class sort_facets : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef SNC_decorator<T>             Base;
+  typedef typename T::Halffacet_handle Halffacet_handle;
+  typedef typename T::SHalfedge_handle SHalfedge_handle;
+  typedef typename T::Vector_3         Vector_3;
+  typedef typename T::Plane_3          Plane_3;
+
+ public:
+  sort_facets(T& D) : Base(D) {}
+
+  bool operator() (Halffacet_handle f1, Halffacet_handle f2) const {
+
+
+    Plane_3 p1(f1->plane());
+    Plane_3 p2(f2->plane());
+
+    if(p1.d() != p2.d())
+      return p1.d() < p2.d();
+    else if(p1.a() != p2.a())
+      return p1.a() < p2.a();
+    else if(p1.b() != p2.b())
+      return p1.b() < p2.b();
+    else if(p1.c() != p2.c())
+      return p1.c() < p2.c();
+
+    SHalfedge_handle se1 = SHalfedge_handle(f1->facet_cycles_begin());
+    SHalfedge_handle se2 = SHalfedge_handle(f2->facet_cycles_begin());
+
+    sort_vertices<T> SORT(*this->sncp());
+    if(se1->source()->source() != se2->source()->source())
+      return SORT(se1->source()->source(), se2->source()->source());
+
+    se1 = se1->next();
+    se2 = se2->next();
+    CGAL_assertion(se1->source()->source() != se2->source()->source());
+    return SORT(se1->source()->source(), se2->source()->source());
+
+
+  }
+};
+
+template <typename T>
+class sort_sedges : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>             Base;
+  typedef CGAL::SM_decorator<T>          SM_decorator;
+  typedef typename T::Vertex_handle    Vertex_handle;
+  typedef typename T::SHalfedge_handle SHalfedge_handle;
+  typedef typename T::Sphere_circle    Sphere_circle;
+
+ public:
+  sort_sedges(T& D) : Base(D) {}
+
+  bool operator() (SHalfedge_handle se1, SHalfedge_handle se2) const {
+    CGAL_NEF_TRACEN("sort sedges");
+    if(se1 == se2) return false;
+    sort_vertices<T> SORT(*this->sncp());
+    CGAL_NEF_TRACEN("  center verices: " << se1->source()->source()->point() <<
+		    " , " << se2->source()->source()->point());
+    if(se1->source()->source() != se2->source()->source())
+      return SORT(se1->source()->source(),se2->source()->source());
+    if(se1 == se2->twin()) {
+      if(se1->source() == se2->source()) {
+	Sphere_circle vec1 = se1->circle();
+	Sphere_circle vec2 = se2->circle();
+	if(vec1.a() != vec2.a())
+	  return vec1.a() < vec2.a();
+	else if(vec1.b() != vec2.b())
+	  return vec1.b() < vec2.b();
+	return vec1.c() < vec2.c();
+      }
+      else
+	return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
+    }
+
+    if(SORT(se1->twin()->source()->twin()->source(),
+	    se1->source()->twin()->source()))
+      se1 = se1->twin();
+    if(SORT(se2->twin()->source()->twin()->source(),
+	    se2->source()->twin()->source()))
+      se2 = se2->twin();
+    CGAL_NEF_TRACEN("  ssources " << se1->source()->twin()->source()->point()
+		    << " , " << se2->source()->twin()->source()->point());
+    if(se1->source() != se2->source())
+      return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
+    CGAL_NEF_TRACEN("  starget " << se1->twin()->source()->twin()->source()->point() <<
+		    " , " << se2->twin()->source()->twin()->source()->point());
+    if(se1->twin()->source()->twin()->source() != se2->twin()->source()->twin()->source())
+      return SORT(se1->twin()->source()->twin()->source(), se2->twin()->source()->twin()->source());
+
+    CGAL_assertion(se1->circle() != se2->circle());
+    Sphere_circle vec1 = se1->circle();
+    Sphere_circle vec2 = se2->circle();
+
+    if(vec1.a() != vec2.a())
+      return vec1.a() < vec2.a();
+    else if(vec1.b() != vec2.b())
+      return vec1.b() < vec2.b();
+    return vec1.c() < vec2.c();
+  }
+};
+
+
+template <typename T>
+class sort_sloops : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>             Base;
+  typedef typename T::SHalfloop_handle SHalfloop_handle;
+
+ public:
+  sort_sloops(T& D) : Base(D) {}
+
+  bool operator() (SHalfloop_handle sl1, SHalfloop_handle sl2) const {
+    if(sl1 == sl2) return false;
+    sort_vertices<T> SORTV(*this->sncp());
+    sort_facets<T> SORTF(*this->sncp());
+    if(sl1->incident_sface()->center_vertex() != sl2->incident_sface()->center_vertex())
+      return SORTV(sl1->incident_sface()->center_vertex(),sl2->incident_sface()->center_vertex());
+    return SORTF(sl1->facet(), sl2->facet());
+  }
+};
+
+template <typename T>
+class sort_sface_cycle_entries : public SNC_decorator<T> {
+
+  typedef T                             SNC_structure;
+  typedef CGAL::SNC_decorator<T>        Base;
+  typedef typename T::SM_decorator      SM_decorator;
+  typedef typename T::Object_handle     Object_handle;
+  typedef typename T::SVertex_handle    SVertex_handle;
+  typedef typename T::SHalfedge_handle  SHalfedge_handle;
+  typedef typename T::SHalfloop_handle  SHalfloop_handle;
+  typedef typename T::SFace_handle      SFace_handle;
+  typedef typename T::Point_3           Point_3;
+  typedef typename T::Vector_3          Vector_3;
+
+ public:
+  sort_sface_cycle_entries(T D) : Base(D) {}
+
+  bool operator() (Object_handle o1, Object_handle o2) const {
+    CGAL_NEF_TRACEN("sort sface cycles ");
+    SVertex_handle sv1, sv2;
+    SHalfedge_handle se1, se2;
+    SHalfloop_handle sl1, sl2;
+
+    if(!CGAL::assign(se1,o1) && !CGAL::assign(sl1,o1) && !CGAL::assign(sv1,o1))
+      CGAL_error_msg("wrong handle");
+
+    if(!CGAL::assign(se2,o2) && !CGAL::assign(sl2,o2) && !CGAL::assign(sv2,o2))
+      CGAL_error_msg("wrong handle");
+
+    if(se1 != SHalfedge_handle() && se2 == SHalfedge_handle())
+      return true;
+
+    if(se1 == SHalfedge_handle() && se2 != SHalfedge_handle())
+      return false;
+
+    if(sl1 != SHalfloop_handle() && sv2 != SVertex_handle())
+      return true;
+
+    if(sl2 != SHalfloop_handle() && sv1 != SVertex_handle())
+      return false;
+
+    if(se1 != SHalfedge_handle() && se2 != SHalfedge_handle()) {
+      CGAL_NEF_TRACEN("  sedges " << &*se1 << " , " << &*se2);
+      sort_sedges<SNC_structure> SORT(*this->sncp());
+      return SORT(se1,se2);
+      /*
+	sort_vertices<SNC_structure> SORT(*this->sncp());
+      if(ssource(se1) != ssource(se2))
+	return SORT(se1->source()->twin()->source(), se2->source()->twin()->source());
+      else
+	return SORT(se1->target(), se2->target());
+      */
+    }
+
+    if(sl1 != SHalfloop_handle() && sl2 != SHalfloop_handle()) {
+      Vector_3 vec1(sl1->circle().orthogonal_vector());
+      Vector_3 vec2(sl2->circle().orthogonal_vector());
+      //      CGAL_assertion(vec1 == vec2.antipode());
+      if(vec1.x() != vec2.x())
+	return vec1.x() < vec2.x();
+      else if(vec1.y() != vec2.y())
+	return vec1.y() < vec2.y();
+      else if(vec1.z() != vec2.z())
+	return vec1.z() < vec2.z();
+    }
+
+    CGAL_assertion(sv1 != SVertex_handle() && sv2 != SVertex_handle());
+    sort_vertices<SNC_structure> SORT(*this->sncp());
+    return SORT(sv1->twin()->source(), sv2->twin()->source());
+  }
+};
+
+template <typename T>
+class sort_sfaces : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>            Base;
+  typedef typename T::SM_decorator          SM_decorator;
+  typedef typename T::Point_3               Point_3;
+  typedef typename T::Vector_3              Vector_3;
+  typedef typename T::SVertex_handle        SVertex_handle;
+  typedef typename T::SHalfedge_handle      SHalfedge_handle;
+  typedef typename T::SHalfloop_handle      SHalfloop_handle;
+  typedef typename T::SFace_handle          SFace_handle;
+  typedef typename T::SFace_cycle_iterator  SFace_cycle_iterator;
+  typedef typename T::SHalfedge_around_sface_circulator
+                      SHalfedge_around_sface_circulator;
+
+ public:
+  sort_sfaces(T& D) : Base(D) {}
+
+  bool operator() (SFace_handle sf1, SFace_handle sf2) const {
+    CGAL_NEF_TRACEN("sort sfaces");
+    if(&*sf1 == &*sf2) return false;
+
+    sort_vertices<T> SORT(*this->sncp());
+
+    CGAL_NEF_TRACEN("  vertices " << sf1->center_vertex()->point() << " , " << sf2->center_vertex()->point());
+    if(sf1->center_vertex() != sf2->center_vertex())
+      return SORT(sf1->center_vertex(), sf2->center_vertex());
+
+    //    sort_sface_cycle_entries<Base> sort_cycles((Base) *this);
+    //    return sort_cycles(*sf1->sface_cycles_begin(), *sf2->sface_cycles_begin());
+
+    SM_decorator SD(&*sf1->center_vertex());
+    moreLeft<Base> ml((Base) *this);
+    Vector_3 plus(1,0,0);
+
+    SFace_cycle_iterator fc;
+
+    CGAL_NEF_TRACEN("  sface 1");
+
+    SHalfedge_handle se1;
+    SHalfloop_handle sl1;
+    CGAL_forall_sface_cycles_of(fc,sf1) {
+      if(fc.is_shalfedge()) {
+	SHalfedge_handle se(fc);
+	SHalfedge_around_sface_circulator ec(se),ee(se);
+	CGAL_For_all(ec,ee) {
+	  CGAL_NEF_TRACEN("     " << ec->source()->point() <<
+		 " | " << ec->circle().orthogonal_vector());
+	  if(ml(ec, se1) == -1)
+	    se1 = ec;
+	}
+      }
+      else if(fc.is_shalfloop())
+	sl1 = SHalfloop_handle(fc);
+      else
+	CGAL_assertion(fc.is_svertex());
+    }
+
+    CGAL_NEF_TRACEN("  sface 2");
+
+    SHalfedge_handle se2;
+    SHalfloop_handle sl2;
+    CGAL_forall_sface_cycles_of(fc,sf2) {
+      if(fc.is_shalfedge()) {
+	SHalfedge_handle se(fc);
+	SHalfedge_around_sface_circulator ec(se),ee(se);
+	CGAL_For_all(ec,ee) {
+	  CGAL_NEF_TRACEN("     " << ec->source()->point() <<
+		 " | " << ec->circle().orthogonal_vector());
+	  if(ml(ec, se2) == -1)
+	    se2 = ec;
+	}
+      }
+      else if(fc.is_shalfloop())
+	sl2 = SHalfloop_handle(fc);
+      else
+	CGAL_assertion(fc.is_svertex());
+    }
+
+    CGAL_NEF_TRACEN("  sedge cycles existing? " << (se1 != SHalfedge_handle())
+	   << " , " << (se2 != SHalfedge_handle()));
+
+    if(se1 != SHalfedge_handle() && se2 == SHalfedge_handle())
+      return true;
+    if(se1 == SHalfedge_handle() && se2 != SHalfedge_handle())
+      return false;
+
+    if(se1 == SHalfedge_handle() && se2 == SHalfedge_handle()) {
+      Vector_3 vec1 = sl1->circle().orthogonal_vector();
+      Vector_3 vec2 = sl2->circle().orthogonal_vector();
+      CGAL_NEF_TRACEN("  sloops " << vec1 << " , " << vec2);
+      if(vec1.x() != vec2.x())
+	return vec1.x() < vec2.x();
+      else if(vec1.y() != vec2.y())
+	return vec1.y() < vec2.y();
+      else if(vec1.z() != vec2.z())
+	return vec1.z() < vec2.z();
+    }
+
+    CGAL_assertion(se1 != SHalfedge_handle() && se2 != SHalfedge_handle());
+
+    CGAL_NEF_TRACEN("  minimal sedge in sface 1:" << se1->source()->point() <<
+	   " , " << se1->circle().orthogonal_vector());
+    CGAL_NEF_TRACEN("  minimal sedge in sface 2:" << se2->source()->point() <<
+	   " , " << se2->circle().orthogonal_vector());
+    CGAL_NEF_TRACEN("result " << ml(se1,se2));
+    switch(ml(se1, se2)) {
+    case -1: return true;
+    case  1: return false;
+    }
+    sort_sface_cycle_entries<T> SORTSFC(*this->sncp());
+    return SORTSFC(*sf1->sface_cycles_begin(), *sf2->sface_cycles_begin());
+  }
+};
+
+template <typename T>
+class sort_volumes : public SNC_decorator<T> {
+
+  typedef T SNC_structure;
+  typedef CGAL::SNC_decorator<T>    Base;
+  typedef typename T::Volume_handle Volume_handle;
+  typedef typename T::SFace_handle  SFace_handle;
+
+ public:
+  sort_volumes(T& D) : Base(D) {}
+
+  bool operator() (Volume_handle c1, Volume_handle c2) const {
+    CGAL_NEF_TRACEN("sort volumes");
+    SFace_handle sf1 = SFace_handle(c1->shells_begin());
+    SFace_handle sf2 = SFace_handle(c2->shells_begin());
+
+    sort_sfaces<T> SORT(*this->sncp());
+    return SORT(sf1, sf2);
+  }
+};
+
+template <typename T>
+class sort_facet_cycle_entries : public T {
+
+  typedef typename T::SNC_structure     SNC_structure;
+  typedef typename T::SM_decorator      SM_decorator;
+  typedef typename T::Object_handle     Object_handle;
+  typedef typename T::SHalfedge_handle  SHalfedge_handle;
+  typedef typename T::SHalfloop_handle  SHalfloop_handle;
+  typedef typename T::SFace_handle      SFace_handle;
+  typedef typename T::Point_3           Point_3;
+  typedef typename T::Vector_3          Vector_3;
+
+ public:
+  sort_facet_cycle_entries(T D) : T(D) {}
+
+  bool operator() (Object_handle o1, Object_handle o2) const {
+
+    SHalfedge_handle se1, se2;
+    SHalfloop_handle sl1, sl2;
+
+    if(!CGAL::assign(se1,o1) && !CGAL::assign(sl1,o1))
+      CGAL_error_msg("wrong handle");
+
+    if(!CGAL::assign(se2,o2) && !CGAL::assign(sl2,o2))
+      CGAL_error_msg("wrong handle");
+
+    if(se1 != SHalfedge_handle() && se2 != SHalfedge_handle()) {
+      sort_vertices<SNC_structure> SORT(*this->sncp());
+      return SORT(se1->source()->source(), se2->source()->source());
+    }
+
+    if(se1 != SHalfedge_handle())
+      return true;
+    if(se2 != SHalfedge_handle())
+      return false;
+
+    CGAL_assertion(sl1 != SHalfloop_handle() &&
+			sl2 != SHalfloop_handle());
+
+    SM_decorator SD(&*sl1->incident_sface()->center_vertex());
+    Vector_3 vec1(sl1->circle().orthogonal_vector());
+    Vector_3 vec2(sl2->circle().orthogonal_vector());
+    //    CGAL_assertion(vec1 == vec2.antipode());
+    if(vec1.x() != vec2.x())
+      return vec1.x() < vec2.x();
+    else if(vec1.y() != vec2.y())
+      return vec1.y() < vec2.y();
+    else
+      return vec1.z() < vec2.z();
+  }
+};
+
+template <typename T>
+class sort_shell_entries : public T {
+
+  typedef typename T::Object_handle Object_handle;
+  typedef typename T::Shell_entry_iterator  Shell_entry_iterator;
+  typedef typename T::SFace_handle  SFace_handle;
+  typedef typename T::Point_3       Point_3;
+
+ public:
+  sort_shell_entries(T D) : T(D) {}
+
+  bool operator() (Object_handle o1, Object_handle o2) const {
+    SFace_handle sf1, sf2;
+    CGAL::assign(sf1, o1);
+    CGAL::assign(sf2, o2);
+    Point_3 p1(sf1->center_vertex()->point()), p2(sf2->center_vertex()->point());
+    if(p1.x() != p2.x())
+      return p1.x() < p2.x();
+    else if(p1.y() != p2.y())
+      return p1.y() < p2.y();
+    return p1.z() < p2.z();
+  }
+};
+
+template<typename T>
+struct find_minimal_sface_of_shell : public SNC_decorator<T> {
+
+  typedef T                               SNC_structure;
+  typedef CGAL::SNC_decorator<T>          Base;
+  typedef typename T::Vertex_handle       Vertex_handle;
+  typedef typename T::Halfedge_handle     Halfedge_handle;
+  typedef typename T::Halffacet_handle    Halffacet_handle;
+  typedef typename T::SFace_handle        SFace_handle;
+  typedef typename T::SHalfedge_handle    SHalfedge_handle;
+  typedef typename T::SHalfloop_handle    SHalfloop_handle;
+  typedef CGAL::Unique_hash_map<SFace_handle,bool> SFace_visited_hash;
+
+  SFace_visited_hash& Done;
+  SFace_handle sf_min;
+  sort_sfaces<T> SORT;
+
+  find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi)
+    : Base(D), Done(Vi), SORT(D) {}
+
+  void visit(SFace_handle h) {
+    Done[h]=true;
+    if(sf_min == SFace_handle())
+      sf_min = h;
+    else {
+      if(SORT(h,sf_min))
+	sf_min = h;
+    }
+  }
+
+  void visit(Vertex_handle ) {}
+  void visit(Halfedge_handle ) {}
+  void visit(Halffacet_handle ) {}
+  void visit(SHalfedge_handle ) {}
+  void visit(SHalfloop_handle ) {}
+
+  SFace_handle& minimal_sface() { return sf_min; }
+};
+
+
+template<typename Tag, typename Kernel> class Geometry_io;
+
+template<typename Kernel>
+class Geometry_io<Cartesian_tag, Kernel> {
+ public:
+  template <typename EK, typename K> static
+  typename EK::Point_3 read_point(std::istream& in) {
+    typedef Fraction_traits<typename K::FT> FracTraits;
+    typename FracTraits::Type hx, hy, hz, hw;
+    typename FracTraits::Numerator_type num;
+    typename FracTraits::Denominator_type denom(1);
+    typename FracTraits::Compose composer;
+    in >> num;
+    hx = composer(num, denom);
+    in >> num;
+    hy = composer(num, denom);
+    in >> num;
+    hz = composer(num, denom);
+    in >> num;
+    hw = composer(num, denom);
+    return typename EK::Point_3(hx,hy,hz,hw);
+  }
+
+  template <typename EK, typename K> static
+  typename EK::Plane_3 read_plane(std::istream& in) {
+    typedef Fraction_traits<typename K::FT> FracTraits;
+    typename FracTraits::Type a, b, c, d;
+    typename FracTraits::Numerator_type num;
+    typename FracTraits::Denominator_type denom(1);
+    typename FracTraits::Compose composer;
+    in >> num;
+    a = composer(num, denom);
+    in >> num;
+    b = composer(num, denom);
+    in >> num;
+    c = composer(num, denom);
+    in >> num;
+    d = composer(num, denom);
+    return typename EK::Plane_3(a,b,c,d);
+  }
+
+  template <typename R> static
+    void print_point_impl(std::ostream& out, const CGAL::Point_3<R> p) {
+    typedef Fraction_traits<typename R::FT> FracTraits;
+    typedef std::vector<typename FracTraits::Numerator_type> NV;
+
+    typename FracTraits::Numerator_type num;
+    typename FracTraits::Denominator_type denom;
+    typename FracTraits::Decompose decomposer;
+    NV vec;
+
+    decomposer(p.x(),num,denom);
+    vec.push_back(num);
+    vec.push_back(denom);
+    vec.push_back(denom);
+    vec.push_back(denom);
+    decomposer(p.y(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=num;
+    vec[2]*=denom;
+    vec[3]*=denom;
+    decomposer(p.z(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=denom;
+    vec[2]*=num;
+    vec[3]*=denom;
+    Normalizing<Homogeneous_tag>::
+      normalized(vec.begin(),vec.end());
+    out << vec[0] << " " << vec[1] << " "
+	<< vec[2] << " " << vec[3];
+  }
+
+  template <typename R> static
+    void print_vector_impl(std::ostream& out, const CGAL::Vector_3<R> p) {
+    typedef Fraction_traits<typename R::FT> FracTraits;
+    typedef typename FracTraits::Numerator_type NumType;
+    typedef std::vector<NumType> NV;
+
+    typename FracTraits::Numerator_type num;
+    typename FracTraits::Denominator_type denom;
+    typename FracTraits::Decompose decomposer;
+    NV vec;
+
+    decomposer(p.x(),num,denom);
+    vec.push_back(num);
+    vec.push_back(denom);
+    vec.push_back(denom);
+    decomposer(p.y(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=num;
+    vec[2]*=denom;
+    decomposer(p.z(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=denom;
+    vec[2]*=num;
+    Normalizing<Homogeneous_tag>::
+      normalized(vec.begin(),vec.end());
+    out << vec[0] << " " << vec[1] << " "
+	<< vec[2] << " " << NumType(1);
+  }
+
+  template <typename R> static
+  void print_plane_impl(std::ostream& out, const CGAL::Plane_3<R> p) {
+    typedef Fraction_traits<typename R::FT> FracTraits;
+    typedef std::vector<typename FracTraits::Numerator_type> NV;
+
+    typename FracTraits::Numerator_type num;
+    typename FracTraits::Denominator_type denom;
+    typename FracTraits::Decompose decomposer;
+    NV vec;
+
+    decomposer(p.a(),num,denom);
+    vec.push_back(num);
+    vec.push_back(denom);
+    vec.push_back(denom);
+    vec.push_back(denom);
+    decomposer(p.b(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=num;
+    vec[2]*=denom;
+    vec[3]*=denom;
+    decomposer(p.c(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=denom;
+    vec[2]*=num;
+    vec[3]*=denom;
+    decomposer(p.d(),num,denom);
+    vec[0]*=denom;
+    vec[1]*=denom;
+    vec[2]*=denom;
+    vec[3]*=num;
+    Normalizing<Homogeneous_tag>::
+      normalized(vec.begin(),vec.end());
+
+    out << vec[0] << " " << vec[1] << " "
+	<< vec[2] << " " << vec[3];
+  }
+
+  template <class R> static
+  void print_point(std::ostream& out, const CGAL::Point_3<R>& p) {
+    print_point_impl(out, Nef_3_internal::get_point(p) );
+  }
+
+  template <class R> static
+  void print_vector(std::ostream& out, const CGAL::Vector_3<R>& v) {
+    print_vector_impl(out, Nef_3_internal::get_vector(v) );
+  }
+
+  template <class R> static
+  void print_plane(std::ostream& out, const CGAL::Plane_3<R>& p) {
+    print_plane_impl(out, Nef_3_internal::get_plane(p) );
+  }
+
+};
+
+template<typename Kernel>
+class Geometry_io<Homogeneous_tag, Kernel> {
+ public:
+  template <typename EK, typename K> static
+  typename EK::Point_3 read_point(std::istream& in) {
+    typename K::RT hx, hy, hz, hw;
+    in >> hx >> hy >> hz >> hw;
+    return typename EK::Point_3(hx, hy, hz, hw);
+  }
+
+  template <typename EK, typename K> static
+  typename EK::Plane_3 read_plane(std::istream& in) {
+    typename K::RT a, b, c, d;
+    in >> a >> b >> c >> d;
+    return typename EK::Plane_3(a, b, c, d);
+  }
+
+  template <typename R> static
+  void print_point_impl(std::ostream& out, const CGAL::Point_3<R>& p) {
+    out << p;
+  }
+
+  template <typename R> static
+  void print_vector_impl(std::ostream& out, const CGAL::Vector_3<R>& vec) {
+    out << vec;
+  }
+
+  template <typename R> static
+  void print_plane_impl(std::ostream& out, const CGAL::Plane_3<R>& p) {
+    out << p;
+  }
+
+  template <class R> static
+  void print_point(std::ostream& out, const CGAL::Point_3<R>& p) {
+    print_point_impl(out, Nef_3_internal::get_point(p) );
+  }
+
+  template <class R> static
+  void print_vector(std::ostream& out, const CGAL::Vector_3<R>& v) {
+    print_vector_impl(out, Nef_3_internal::get_vector(v) );
+  }
+
+  template <class R> static
+  void print_plane(std::ostream& out, const CGAL::Plane_3<R>& p) {
+    print_plane_impl(out, Nef_3_internal::get_plane(p) );
+  }
+};
+
+template <typename SNC_structure_>
+class SNC_io_parser : public SNC_decorator<SNC_structure_>
+{ typedef SNC_structure_ SNC_structure;
+  typedef CGAL::SNC_io_parser<SNC_structure_> Self;
+  typedef CGAL::SNC_decorator<SNC_structure_> Base;
+  typedef typename Base::SNC_constructor SNC_constructor;
+  typedef typename SNC_structure::Sphere_map  Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>      SM_decorator;
+  typedef typename SNC_structure::Infi_box    Infi_box;
+  typedef typename Infi_box::Standard_kernel  Standard_kernel;
+public:
+  typedef typename SNC_structure::Vertex_iterator Vertex_iterator;
+  typedef typename SNC_structure::Vertex_handle Vertex_handle;
+  typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator;
+  typedef typename SNC_structure::Halfedge_handle Halfedge_handle;
+  typedef typename SNC_structure::Halffacet_iterator Halffacet_iterator;
+  typedef typename SNC_structure::Halffacet_handle Halffacet_handle;
+  typedef typename SNC_structure::Volume_iterator Volume_iterator;
+  typedef typename SNC_structure::Volume_handle Volume_handle;
+  typedef typename SNC_structure::SVertex_iterator SVertex_iterator;
+  typedef typename SNC_structure::SVertex_handle SVertex_handle;
+  typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator;
+  typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle;
+  typedef typename SNC_structure::SFace_iterator SFace_iterator;
+  typedef typename SNC_structure::SFace_handle SFace_handle;
+  typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator;
+  typedef typename SNC_structure::SHalfloop_handle SHalfloop_handle;
+  typedef typename SNC_structure::Object_iterator Object_iterator;
+  typedef typename SNC_structure::Object_handle Object_handle;
+  typedef typename SNC_structure::SFace_cycle_iterator SFace_cycle_iterator;
+  typedef typename SNC_structure::Halffacet_cycle_iterator Halffacet_cycle_iterator;
+  typedef typename SNC_structure::Shell_entry_iterator Shell_entry_iterator;
+  typedef typename SNC_structure::SHalfedge_around_svertex_circulator
+                                  SHalfedge_around_svertex_circulator;
+  typedef typename SNC_structure::SHalfedge_around_sface_circulator
+                                  SHalfedge_around_sface_circulator;
+  typedef typename SNC_structure::SHalfedge_around_facet_circulator
+                                  SHalfedge_around_facet_circulator;
+  typedef typename SNC_structure::Point_3 Point_3;
+  typedef typename SNC_structure::Plane_3 Plane_3;
+  typedef typename SNC_structure::Vector_3 Vector_3;
+  typedef typename SNC_structure::Sphere_point Sphere_point;
+  typedef typename SNC_structure::Sphere_segment Sphere_segment;
+  typedef typename SNC_structure::Sphere_circle Sphere_circle;
+  typedef typename SNC_structure::Mark Mark;
+  typedef typename SNC_structure::Kernel Kernel;
+  typedef typename Kernel::RT RT;
+  typedef typename Infi_box::Standard_point  Standard_point;
+  typedef typename Infi_box::Standard_vector Standard_vector;
+  typedef typename Infi_box::Standard_plane  Standard_plane;
+
+  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+  typedef void* GenPtr;
+  #else
+  typedef boost::any GenPtr;
+  #endif
+
+  using Base::visit_shell_objects;
+
+ private:
+  std::istream& in; std::ostream& out;
+  bool verbose;
+  bool reduce;
+  bool sorted;
+  bool addInfiBox;
+
+  CGAL::Object_index<Vertex_iterator> VI;
+  CGAL::Object_index<Halfedge_iterator> EI;
+  CGAL::Object_index<Halffacet_iterator>    FI;
+  CGAL::Object_index<Volume_iterator>   CI;
+  CGAL::Object_index<SHalfedge_iterator> SEI;
+  CGAL::Object_index<SHalfloop_iterator>   SLI;
+  CGAL::Object_index<SFace_iterator>     SFI;
+  std::list<Vertex_iterator> VL;
+  std::list<Halfedge_iterator> EL;
+  std::list<Halffacet_iterator> FL;
+  std::list<Volume_iterator> CL;
+  std::list<SHalfedge_iterator> SEL;
+  std::list<SHalfloop_iterator> SLL;
+  std::list<SFace_iterator> SFL;
+  std::vector<Vertex_iterator>   Vertex_of;
+  std::vector<Halfedge_iterator> Edge_of;
+  std::vector<Halffacet_iterator>    Halffacet_of;
+  std::vector<Volume_iterator>   Volume_of;
+  std::vector<SVertex_iterator>  SVertex_of;
+  std::vector<SHalfedge_iterator> SEdge_of;
+  std::vector<SHalfloop_iterator> SLoop_of;
+  std::vector<SFace_iterator>     SFace_of;
+  std::size_t i,vn,en,fn,cn,sen,sln,sfn;
+
+public:
+  SNC_io_parser(std::istream& is, SNC_structure& W);
+  SNC_io_parser(std::ostream& os, SNC_structure& W,
+		bool sort=false, bool reduce_ = false);
+
+  std::string index(Vertex_iterator v) const
+  { return VI(v,verbose); }
+  std::string index(Halfedge_iterator e) const
+  { return EI(e,verbose); }
+  std::string index(Halffacet_iterator f) const
+  { return FI(f,verbose); }
+  std::string index(Volume_iterator c) const
+  { return CI(c,verbose); }
+  std::string index(SHalfedge_iterator e) const
+  { return SEI(e,verbose); }
+  std::string index(SHalfloop_iterator l) const
+  { return SLI(l,verbose); }
+  std::string index(SFace_iterator f) const
+  { return SFI(f,verbose); }
+  std::string index(Object_iterator o) const
+  { if( o == 0 )
+      return this->string("undef");
+    Vertex_iterator v;
+    Halfedge_iterator e;
+    Halffacet_iterator f;
+    Volume_iterator c;
+    SHalfedge_iterator se;
+    SHalfloop_iterator sl;
+    SFace_iterator sf;
+    if( CGAL::assign( v, *o))
+      return index(v);
+    else if( CGAL::assign( e, *o))
+      return index(e);
+    else if( CGAL::assign( f, *o))
+      return index(f);
+    else if( CGAL::assign( c, *o))
+      return index(c);
+    else if( CGAL::assign( se, *o))
+      return index(se);
+    else if( CGAL::assign( sl, *o))
+      return index(sl);
+    else if( CGAL::assign( sf, *o))
+      return index(sf);
+    return this->string("unknown object");
+  }
+
+  bool check_sep(const char* sep) const;
+  bool test_string(std::string s) const;
+  void print_vertex(Vertex_handle) const;
+  void print_edge(Halfedge_handle) const;
+  void print_facet(Halffacet_handle) const;
+  void print_volume(Volume_handle) const;
+  void print_sedge(SHalfedge_handle) const;
+  void print_sloop(SHalfloop_handle) const;
+  void print_sface(SFace_handle) const;
+  void print() const;
+  void print_local_graph(Vertex_handle) const;
+
+  template <typename NT> bool read_vertex(Vertex_handle);
+  template <typename NT> bool read_edge(Halfedge_handle);
+  template <typename NT> bool read_facet(Halffacet_handle);
+  bool read_volume(Volume_handle);
+  template <typename NT> bool read_svertex(SVertex_handle);
+  template <typename NT> bool read_sedge(SHalfedge_handle);
+  template <typename NT> bool read_sloop(SHalfloop_handle);
+  bool read_sface(SFace_handle);
+  void add_infi_box();
+  void read();
+  template <typename K> void read_items(int);
+
+  static void dump(SNC_structure& W, std::ostream& os = std::cerr, bool sort = false)
+  { Self O(os,W, sort); O.print(); }
+
+  template <typename Iter, typename Index>
+    void output_sorted_indexes(Iter begin, Iter end, Index i) const {
+    int low = i[begin];
+    int high = low;
+    for(Iter it=begin; it != end; it++) {
+      if(i[it] < low) low = i[it];
+      if(i[it] > high) high = i[it];
+    }
+    out << low << " " << high << ", ";
+  }
+
+};
+
+template <typename EW>
+SNC_io_parser<EW>::SNC_io_parser(std::istream& is, SNC_structure& W) :
+  Base(W), in(is), out(std::cout) {
+  W.clear();
+  CGAL_assertion(W.is_empty());
+  verbose = false;
+}
+
+
+template <typename EW>
+SNC_io_parser<EW>::SNC_io_parser(std::ostream& os, SNC_structure& W,
+				 bool sort, bool reduce_) :
+  Base(W), in(std::cin), out(os),
+  FI(W.halffacets_begin(),W.halffacets_end(),'F'),
+  CI(W.volumes_begin(),W.volumes_end(),'C'),
+  SEI(W.shalfedges_begin(),W.shalfedges_end(),'e'),
+  SLI(W.shalfloops_begin(),W.shalfloops_end(),'l'),
+  SFI(W.sfaces_begin(),W.sfaces_end(),'f'),
+  vn(W.number_of_vertices()),
+  en(W.number_of_halfedges()),
+  fn(W.number_of_halffacets()),
+  cn(W.number_of_volumes()),
+  sen(W.number_of_shalfedges()),
+  sln(W.number_of_shalfloops()),
+  sfn(W.number_of_sfaces())
+{
+  verbose = (get_mode(out) != CGAL::IO::ASCII &&
+             get_mode(out) != CGAL::IO::BINARY);
+  sorted = sort;
+  reduce = reduce_;
+  reduce = reduce && this->is_extended_kernel() && this->is_bounded();
+  sorted = sorted || reduce;
+
+  Vertex_iterator vi;
+  CGAL_forall_vertices(vi, *this->sncp()) {
+    VL.push_back(vi);
+    if(sorted) {
+      vi->point() = normalized(vi->point());
+      if(vi->has_shalfloop() &&
+	 sort_sloops<SNC_structure>(*this->sncp())(vi->shalfloop()->twin(),
+						   vi->shalfloop()))
+	vi->shalfloop() = vi->shalfloop()->twin();
+    }
+  }
+  if(sorted) {
+    VL.sort(sort_vertices<SNC_structure>(*this->sncp()));
+  }
+  if(reduce)
+    for(int k=0; k<4; k++){
+      VL.pop_front(); VL.pop_back();
+    }
+  int i = 0;
+  typename std::list<Vertex_iterator>::iterator vl;
+  for(vl = VL.begin(); vl != VL.end(); vl++)
+    VI[*vl] = i++;
+
+  SM_decorator SD;
+  Halfedge_iterator ei;
+  CGAL_forall_halfedges(ei, *this->sncp()) {
+    EL.push_back(ei);
+    if(sorted) {
+      //      std::cerr << ei->point() << " | " << normalized(ei->point()) << " |";
+      ei->point() = normalized(ei->point());
+      //      std::cerr << ei->point() << std::endl;
+      sort_sedges<SNC_structure> sortSE(*this->sncp());
+      SHalfedge_handle new_outedge = ei->out_sedge();
+      SHalfedge_around_svertex_circulator cb(new_outedge), ce(cb);
+      CGAL_For_all(cb,ce) {
+	if(cb != new_outedge && sortSE(cb,new_outedge))
+	  new_outedge = cb;
+      }
+      ei->out_sedge() = new_outedge;
+    }
+  }
+  if(sorted) EL.sort(sort_edges<SNC_structure>(*this->sncp()));
+  if(reduce)
+    for(int k=0; k<12; k++){
+      EL.pop_front(); EL.pop_back();
+    }
+  i = 0;
+  typename std::list<Halfedge_iterator>::iterator el;
+  for(el = EL.begin(); el != EL.end(); el++)
+    EI[*el] = i++;
+
+  Halffacet_iterator fi;
+  CGAL_forall_halffacets(fi, *this->sncp()){
+    if(sorted) {
+      sort_sedges<SNC_structure> sortSE(*this->sncp());
+      Halffacet_cycle_iterator fc;
+      for(fc = fi->facet_cycles_begin();
+	  fc != fi->facet_cycles_end(); ++fc) {
+	if(fc.is_shalfedge()) {
+	  SHalfedge_handle se(fc);
+	  if(this->sncp()->is_boundary_object(se))
+	    this->sncp()->undef_boundary_item(se);
+	  SHalfedge_around_facet_circulator sfc(fc), send(sfc);
+	  CGAL_For_all(sfc, send) {
+	    if(sortSE(sfc, se))
+	      se = sfc;
+	  }
+	  this->sncp()->store_boundary_item(se,fc);
+	  *fc = make_object(se);
+	}
+      }
+      fi->plane() = normalized(fi->plane());
+      fi->boundary_entry_objects().sort(sort_facet_cycle_entries<Base>((Base) *this));
+    }
+    FL.push_back(fi);
+  }
+  if(sorted) FL.sort(sort_facets<SNC_structure>(*this->sncp()));
+  if(reduce) {
+    for(int k=0; k<6; k++){
+      FL.pop_front();
+      FL.pop_back();
+    }
+  }
+  i = 0;
+  typename std::list<Halffacet_iterator>::iterator fl;
+  for(fl = FL.begin(); fl != FL.end(); fl++)
+    FI[*fl] = i++;
+
+  SHalfedge_iterator sei;
+  CGAL_forall_shalfedges(sei, *this->sncp()) {
+    SEL.push_back(sei);
+    if(sorted)
+      sei->circle() = normalized(sei->circle());
+  }
+  if(sorted) SEL.sort(sort_sedges<SNC_structure>(*this->sncp()));
+  if(reduce)
+    for(int k=0; k<24; k++){
+      SEL.pop_front(); SEL.pop_back();
+    }
+  i = 0;
+  typename std::list<SHalfedge_iterator>::iterator sel;
+  for(sel = SEL.begin(); sel != SEL.end(); sel++)
+    SEI[*sel] = i++;
+
+  SHalfloop_iterator sli;
+  CGAL_forall_shalfloops(sli, *this->sncp()) {
+    SLL.push_back(sli);
+    if(sorted)
+      sli->circle() = normalized(sli->circle());
+  }
+  if(sorted) SLL.sort(sort_sloops<SNC_structure>(*this->sncp()));
+  i = 0;
+  typename std::list<SHalfloop_iterator>::iterator sll;
+  for(sll = SLL.begin(); sll != SLL.end(); sll++)
+    SLI[*sll] = i++;
+
+  SFace_iterator sfi;
+  CGAL_forall_sfaces(sfi, *this->sncp()) {
+    if(sorted) {
+      SFace_cycle_iterator fc;
+      CGAL_forall_sface_cycles_of(fc, sfi) {
+	if(fc.is_shalfedge()) {
+	  SHalfedge_handle se(fc);
+	  if(this->sncp()->is_sm_boundary_object(se))
+	    this->sncp()->undef_sm_boundary_item(se);
+	  SHalfedge_around_sface_circulator cb(se), ce(cb);
+	  CGAL_For_all(cb,ce) {
+	    if(cb->source() != se->source()) {
+	      if(lexicographically_xyz_smaller(cb->source()->twin()->source()->point(),
+					       se->source()->twin()->source()->point()))
+		se = cb;
+	    }
+	    else
+	      if(lexicographically_xyz_smaller(cb->twin()->source()->twin()->source()->point(),
+					       se->twin()->source()->twin()->source()->point()))
+		se = cb;
+	  }
+	  this->sncp()->store_sm_boundary_item(se,fc);
+	  *fc = make_object(se);
+	}
+      }
+      sfi->boundary_entry_objects().sort(sort_sface_cycle_entries<Base>((Base) *this));
+    }
+    SFL.push_back(sfi);
+  }
+  if(sorted) SFL.sort(sort_sfaces<SNC_structure>(*this->sncp()));
+  if(reduce)
+    for(int k=0; k<8; k++){
+      SFL.pop_front(); SFL.pop_back();
+    }
+  i = 0;
+  typename std::list<SFace_iterator>::iterator sfl;
+  for(sfl = SFL.begin(); sfl != SFL.end(); sfl++)
+    SFI[*sfl] = i++;
+
+  Volume_iterator ci;
+  CGAL::Unique_hash_map<SFace_handle,bool> Done(false);
+  find_minimal_sface_of_shell<SNC_structure> findMinSF(*this->sncp(),Done);
+  CGAL_forall_volumes(ci, *this->sncp()) {
+    if(sorted) {
+      Shell_entry_iterator it;
+      CGAL_forall_shells_of(it,ci) {
+	findMinSF.minimal_sface() = SFace_handle(it);
+	visit_shell_objects(SFace_handle(it),findMinSF);
+	*it = make_object(findMinSF.minimal_sface());
+      }
+      ci->shell_entry_objects().sort(sort_shell_entries<Base>((Base)*this));
+    }
+    CL.push_back(ci);
+  }
+
+  if(sorted) CL.sort(sort_volumes<SNC_structure>(*this->sncp()));
+  if(reduce)
+    CL.pop_front();
+  i = 0;
+  typename std::list<Volume_iterator>::iterator cl;
+  for(cl = CL.begin(); cl != CL.end(); cl++)
+    CI[*cl] = i++;
+
+  VI[W.vertices_end()]=-2;
+  EI[W.halfedges_end()]=-2;
+  FI[W.halffacets_end()]=-2;
+  CI[W.volumes_end()]=-2;
+  SEI[W.shalfedges_end()]=-2;
+  SLI[W.shalfloops_end()]=-2;
+  SFI[W.sfaces_end()]=-2;
+}
+
+template <typename EW>
+bool SNC_io_parser<EW>::check_sep(const char* sep) const
+{
+  char c;
+  do in.get(c); while (isspace(c));
+  while (*sep != '\0') {
+    if (*sep != c) {
+      in.putback(c);
+      return false;
+    }
+    ++sep; in.get(c);
+  }
+  in.putback(c);
+  return true;
+}
+
+template <typename EW>
+bool SNC_io_parser<EW>::test_string(std::string s) const {
+  std::string s2;
+  in >> s2;
+  return (s==s2);
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::print() const
+{
+  out << "Selective Nef Complex" << std::endl;
+  if(this->is_extended_kernel() && (!reduce || !this->is_bounded()))
+    out << "extended" << std::endl;
+  else
+    out << "standard" << std::endl;
+  out << "vertices   " << VL.size() << std::endl;
+  out << "halfedges  " << EL.size() << std::endl;
+  out << "facets     " << FL.size() << std::endl;
+  out << "volumes    " << CL.size() << std::endl;
+  out << "shalfedges " << SEL.size() << std::endl;
+  out << "shalfloops " << SLL.size() << std::endl;
+  out << "sfaces     " << SFL.size() << std::endl;
+
+  if (verbose)
+    out << "/* Vertex: index { svs sve ses see sfs sfe sl,"
+        << " mark, point } */\n";
+  typename std::list<Vertex_iterator>::const_iterator v;
+  for(v=VL.begin();v!=VL.end();v++)
+    print_vertex(*v);
+
+  if (verbose)
+  out << "/* Edge: index { twin, source, isolated incident_object,"
+      << " mark } */\n";
+  typename std::list<Halfedge_iterator>::const_iterator e;
+  for(e=EL.begin();e!=EL.end();e++)
+    print_edge(*e);
+
+  if (verbose)
+  out << "/* Facet: index { twin, fclist, ivlist, volume | plane } mark */\n";
+  typename std::list<Halffacet_iterator>::const_iterator f;
+  for(f=FL.begin();f!=FL.end();f++)
+    print_facet(*f);
+
+  if (verbose)
+  out << "/* Volume: index { shlist } mark  */\n";
+  typename std::list<Volume_iterator>::const_iterator c;
+  for(c=CL.begin();c!=CL.end();c++)
+    print_volume(*c);
+
+  if (verbose)
+  out << "/* SEdge: index { twin, sprev, snext, source, sface,"
+      << " prev, next, facet } */\n";
+  typename std::list<SHalfedge_iterator>::const_iterator se;
+  for(se=SEL.begin();se!=SEL.end();se++)
+    print_sedge(*se);
+
+  if (verbose)
+  out << "/* SLoop: index { twin, sface, facet } */" << std::endl;
+  typename std::list<SHalfloop_iterator>::const_iterator sl;
+  for(sl=SLL.begin();sl!=SLL.end();sl++)
+    print_sloop(*sl);
+
+  if (verbose)
+  out << "/* SFace: index { fclist, ivlist, sloop, volume } */" << std::endl;
+  typename std::list<SFace_iterator>::const_iterator sf;
+  for(sf=SFL.begin();sf!=SFL.end();sf++)
+    print_sface(*sf);
+
+  out << "/* end Selective Nef complex */" << std::endl;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::read()
+{
+  if ( !check_sep("Selective Nef Complex") )
+    CGAL_error_msg("SNC_io_parser::read: no SNC header.");
+  std::string kernel_type;
+  in >> kernel_type;
+  CGAL_assertion(kernel_type == "standard" || kernel_type == "extended");
+  if ( !(check_sep("vertices") && (in >> vn)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong vertex line.");
+  if ( !(check_sep("halfedges") && (in >> en) && (en%2==0)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong edge line.");
+  if ( !(check_sep("facets") && (in >> fn) && (fn%2==0)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong facet line.");
+  if ( !(check_sep("volumes") && (in >> cn)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong volume line.");
+  if ( !(check_sep("shalfedges") && (in >> sen)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong sedge line.");
+  if ( !(check_sep("shalfloops") && (in >> sln)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong sloop line.");
+  if ( !(check_sep("sfaces") && (in >> sfn)) )
+    CGAL_error_msg("SNC_io_parser::read: wrong sface line.");
+
+  addInfiBox = (kernel_type == "standard" && Infi_box::extended_kernel());
+
+  for(i=0; i<vn; ++i)  Vertex_of.push_back(this->sncp()->new_vertex_only());
+  for(i=0; i<en; ++i)  Edge_of.push_back(this->sncp()->new_halfedge_only());
+  for(i=0; i<fn; ++i)  Halffacet_of.push_back(this->sncp()->new_halffacet_only());
+  for(i=0; i<cn; ++i)  Volume_of.push_back(this->sncp()->new_volume_only());
+  for(i=0; i<sen; ++i) SEdge_of.push_back(this->sncp()->new_shalfedge_only());
+  for(i=0; i<sln; ++i) SLoop_of.push_back(this->sncp()->new_shalfloop_only());
+  for(i=0; i<sfn; ++i) SFace_of.push_back(this->sncp()->new_sface_only());
+
+  if(addInfiBox) {
+    Volume_of.push_back(this->sncp()->new_volume_only());
+    read_items<Standard_kernel>(1);
+    add_infi_box();
+  } else
+    read_items<Kernel>(0);
+}
+
+template <typename EW>
+template <typename K>
+void SNC_io_parser<EW>::read_items(int plus01) {
+
+  typename std::vector<Vertex_iterator>::iterator vi;
+  for(vi=Vertex_of.begin(); vi!=Vertex_of.end(); ++vi) {
+    if (!read_vertex<K>(*vi))
+      CGAL_error_msg("SNC_io_parser::read: error in node line");
+  }
+
+  typename std::vector<Halfedge_iterator>::iterator ei;
+  for(ei=Edge_of.begin(); ei!=Edge_of.end(); ++ei) {
+    if (!read_edge<K>(*ei))
+      CGAL_error_msg("SNC_io_parser::read: error in edge line");
+  }
+
+  typedef typename std::vector<Halffacet_iterator>::iterator vhf_iterator;
+  vhf_iterator fi;
+  for(fi=Halffacet_of.begin(); fi!=Halffacet_of.end(); ++fi) {
+    if (!read_facet<K>(*fi))
+      CGAL_error_msg("SNC_io_parser::read: error in facet line");
+  }
+  typename std::vector<Volume_iterator>::iterator ci;
+  for(ci=Volume_of.begin()+plus01; ci!=Volume_of.end(); ++ci) {
+    if (!read_volume(*ci))
+      CGAL_error_msg("SNC_io_parser::read: error in volume line");
+  }
+  typename std::vector<SHalfedge_iterator>::iterator sei;
+  for(sei=SEdge_of.begin(); sei!=SEdge_of.end(); ++sei) {
+    if (!read_sedge<K>(*sei))
+      CGAL_error_msg("SNC_io_parser::read: error in sedge line");
+  }
+  typename std::vector<SHalfloop_iterator>::iterator sli;
+  for(sli=SLoop_of.begin(); sli!=SLoop_of.end(); ++sli) {
+    if (!read_sloop<K>(*sli))
+      CGAL_error_msg("SNC_io_parser::read: error in sloop line");
+  }
+  typename std::vector<SFace_iterator>::iterator sfi;
+  for(sfi=SFace_of.begin(); sfi!=SFace_of.end(); ++sfi) {
+    if (!read_sface(*sfi))
+      CGAL_error_msg("SNC_io_parser::read: error in sface line");
+  }
+
+  SNC_constructor C(*this->sncp());
+  C.assign_indices();
+}
+
+
+template <typename EW>
+void SNC_io_parser<EW>::print_vertex(Vertex_handle v) const
+{ // syntax: index { svs sve, ses see, sfs sfe, sl | point } mark
+  SM_decorator SD(&*v);
+  out << index(v) << " { ";
+  if(sorted) {
+
+    output_sorted_indexes(v->svertices_begin(),
+			  v->svertices_end(), EI);
+    output_sorted_indexes(v->shalfedges_begin(),
+			  v->shalfedges_end(), SEI);
+    output_sorted_indexes(v->sfaces_begin(),
+			  v->sfaces_end(), SFI);
+    out << index(SD.shalfloop()) << " | ";
+  }
+  else {
+    out
+    << index(v->svertices_begin()) << " "
+    << index(v->svertices_last()) << ", "
+    << index(v->shalfedges_begin()) << " "
+    << index(v->shalfedges_last()) << ", "
+    << index(v->sfaces_begin()) << " "
+    << index(v->sfaces_last()) << ", "
+    << index(SD.shalfloop()) << " | ";
+  }
+  if(reduce) {
+    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
+      print_point(out, Infi_box::standard_point(v->point()));
+  }
+  else
+    Geometry_io<typename Kernel::Kernel_tag, Kernel>::print_point(out, v->point());
+  out << " } "  << v->mark() << std::endl;
+}
+
+template <typename EW>
+template <typename K>
+bool SNC_io_parser<EW>::
+read_vertex(Vertex_handle vh) {
+
+  bool OK = true;
+  int index;
+  typename K::RT hx, hy, hz, hw;
+
+  in >> index;
+  OK = OK && test_string("{");
+  vh->sncp() = this->sncp();
+
+  in >> index;
+  vh->svertices_begin() = (index >= 0 ? Edge_of[index] : this->svertices_end());
+  in >> index;
+  vh->svertices_last()  = index >= 0 ? Edge_of[index] : this->svertices_end();
+  OK = OK && test_string(",");
+  in >> index;
+  vh->shalfedges_begin() = index >= 0 ? SEdge_of[index] : this->shalfedges_end();
+  in >> index;
+  vh->shalfedges_last()  = index >= 0 ? SEdge_of[index] : this->shalfedges_end();
+  OK = OK && test_string(",");
+  in >> index;
+  vh->sfaces_begin() = index >= 0 ? SFace_of[index] : this->sfaces_end();
+  in >> index;
+  vh->sfaces_last()  = index >= 0 ? SFace_of[index] : this->sfaces_end();
+  OK = OK && test_string(",");
+  in >> index;
+  vh->shalfloop() = index >= 0 ? SLoop_of[index] : this->shalfloops_end();
+  OK = OK && test_string("|");
+#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
+  in >> hx >> hy >> hz >> hw;
+  vh->point() = Point_3(hx,hy,hz,hw);
+#else
+  vh->point() =
+    Geometry_io<typename K::Kernel_tag, Kernel>::template read_point<Kernel, K>(in);
+#endif
+  OK = OK && test_string("}");
+  in >> vh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::print_edge(Halfedge_handle e) const
+{ // syntax: index { twin, source, isolated incident_object | spoint } mark
+  SM_decorator D(&*e->source());
+  out << index(e) << " { " << index(e->twin()) << ", "
+      << index(e->source()) << ", ";
+  if ( D.is_isolated(e) ) out << "1 " << index(e->incident_sface());
+  else out << "0 " << index(e->out_sedge());
+  out << " | ";
+  if(reduce) {
+    Standard_point sp = Infi_box::standard_point(e->point());
+    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
+      print_vector(out, sp-CGAL::ORIGIN);
+  }
+  else
+    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
+      print_vector(out, e->vector());
+
+  out << " } "<< e->mark();
+#ifdef CGAL_NEF_OUTPUT_INDEXES
+  out << " " << e->get_index();
+#endif
+  out << std::endl;
+}
+
+template <typename EW>
+template <typename K>
+bool SNC_io_parser<EW>::
+read_edge(Halfedge_handle eh) {
+
+  bool OK = true;
+  int index;
+  typename K::RT hx,hy,hz,hw;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> index;
+  eh->twin() = Edge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  eh->center_vertex() = Vertex_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  if(index == 0) {
+    in >> index;
+    eh->out_sedge() = SEdge_of[index];
+  } else {
+    in >> index;
+    eh->incident_sface() = SFace_of[index];
+  }
+  OK = OK && test_string("|");
+#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
+  in >> hx >> hy >> hz >> hw;
+  eh->point() = Sphere_point(hx,hy,hz);
+#else
+  eh->point() =
+    Geometry_io<typename K::Kernel_tag, Kernel>::template read_point<Kernel,K>(in);
+#endif
+  OK = OK && test_string("}");
+  in >> eh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::print_facet(Halffacet_handle f) const
+{ // syntax: index { twin, fclist, ivlist, volume | plane } mark
+  out << index(f) << " { ";
+  out << index(f->twin()) << ", ";
+  Halffacet_cycle_iterator it;
+  CGAL_forall_facet_cycles_of(it,f)
+    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
+  out << ", ";
+  CGAL_forall_facet_cycles_of(it,f)
+    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it)) << ' ';
+  out << ", " << index(f->incident_volume()) << " | ";
+  if(reduce) {
+    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
+      print_plane(out, Infi_box::standard_plane(f->plane()));
+  }
+  else
+    Geometry_io<typename Kernel::Kernel_tag, Kernel>::print_plane(out, f->plane());
+
+  out << " } " << f->mark() << std::endl;
+}
+
+template <typename EW>
+template <typename K>
+bool SNC_io_parser<EW>::
+read_facet(Halffacet_handle fh) {
+
+  bool OK = true;
+  int index;
+  char cc;
+  typename K::RT a,b,c,d;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> index;
+  fh->twin() = Halffacet_of[index];
+  OK = OK && test_string(",");
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    fh->boundary_entry_objects().push_back(make_object(SEdge_of[index]));
+    in >> cc;
+  }
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    fh->boundary_entry_objects().push_back(make_object(SLoop_of[index]));
+    in >> cc;
+  }
+
+  in >> index;
+  fh->incident_volume() = Volume_of[index+addInfiBox];
+  OK = OK && test_string("|");
+#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
+  in >> a >> b >> c >> d;
+  fh->plane() = Plane_3(a,b,c,d);
+#else
+  fh->plane() =
+    Geometry_io<typename K::Kernel_tag, Kernel>::
+    template read_plane<Kernel, K>(in);
+#endif
+  OK = OK && test_string("}");
+  in >> fh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::print_volume(Volume_handle c) const
+{ // syntax: index { shlist } mark
+  out << index(c) << " { ";
+  Shell_entry_iterator it;
+  CGAL_forall_shells_of(it,c)
+    if(!reduce || Infi_box::is_standard(SFace_handle(it)->center_vertex()->point()))
+      out << index(SFace_handle(it)) << ' ';
+  out << "} " << c->mark() << std::endl;
+}
+
+template <typename EW>
+bool SNC_io_parser<EW>::
+read_volume(Volume_handle ch) {
+
+  bool OK = true;
+  int index;
+  char cc;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    ch->shell_entry_objects().push_back(make_object(SFace_of[index]));
+    in >> cc;
+  }
+  in >> ch->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::
+print_sedge(SHalfedge_handle e) const {
+//index { twin, sprev, snext, source, sface, prev, next, facet | circle } mark
+  out << index(e) << " { "
+      << index(e->twin()) << ", "
+      << index(e->sprev()) << ", " << index(e->snext()) << ", "
+      << index(e->source()) << ", " << index(e->incident_sface()) << ", "
+      << index(e->prev()) << ", " << index(e->next()) << ", "
+      << index(e->facet())
+      << " | ";
+  if(reduce) {
+    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
+      print_plane(out, Infi_box::standard_plane(e->circle()));
+  }
+  else
+    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
+      print_plane(out, (Plane_3) e->circle());
+
+  out << " } " << e->mark();
+#ifdef CGAL_NEF_OUTPUT_INDEXES
+  out << " " << e->get_forward_index()
+      << " " << e->get_backward_index();
+#endif
+  out << std::endl;
+}
+
+template <typename EW>
+template <typename K>
+bool SNC_io_parser<EW>::
+read_sedge(SHalfedge_handle seh) {
+
+  bool OK = true;
+  int index;
+  typename K::RT a,b,c,d;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> index;
+  seh->twin() = SEdge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->sprev() = SEdge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->snext() = SEdge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->source() = Edge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->incident_sface() = SFace_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->prev() = SEdge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->next() = SEdge_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  seh->facet() = Halffacet_of[index];
+  OK = OK && test_string("|");
+#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
+  in >> a >> b >> c >> d;
+  seh->circle() = Sphere_circle(Plane_3(a,b,c,d));
+#else
+  seh->circle() =
+    Geometry_io<typename K::Kernel_tag, Kernel>::
+    template read_plane<Kernel, K>(in);
+#endif
+  OK = OK && test_string("}");
+  in >> seh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::
+print_sloop(SHalfloop_handle l) const
+{ // syntax: index { twin, sface, facet | circle } mark
+  out << index(l) << " { "
+      << index(l->twin()) << ", " << index(l->incident_sface()) << ", "
+      << index(l->facet())
+      << " | ";
+  if(reduce) {
+    Geometry_io<typename Standard_kernel::Kernel_tag, Standard_kernel>::
+      print_plane(out, Infi_box::standard_plane(l->circle()));
+  }
+  else
+    Geometry_io<typename Kernel::Kernel_tag, Kernel>::
+      print_plane(out, (Plane_3) l->circle());
+
+  out << " } " << l->mark() << "\n";
+}
+
+template <typename EW>
+template <typename K>
+bool SNC_io_parser<EW>::
+read_sloop(SHalfloop_handle slh) {
+
+  bool OK = true;
+  int index;
+  typename K::RT a,b,c,d;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> index;
+  slh->twin() = SLoop_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  slh->incident_sface() = SFace_of[index];
+  OK = OK && test_string(",");
+  in >> index;
+  slh->facet() = Halffacet_of[index];
+  OK = OK && test_string("|");
+#ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT
+  in >> a >> b >> c >> d;
+  slh->circle() = Sphere_circle(Plane_3(a,b,c,d));
+#else
+  slh->circle() =
+    Geometry_io<typename K::Kernel_tag, Kernel>::
+    template read_plane<Kernel, K>(in);
+#endif
+  OK = OK && test_string("}");
+  in >> slh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::
+print_sface(SFace_handle f) const
+{ // syntax: index { vertex, fclist, ivlist, sloop, volume }
+  SM_decorator D(&*f->center_vertex());
+  out << index(f) << " { " << index(f->center_vertex()) << ", ";
+  SFace_cycle_iterator it;
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
+  out << ", ";
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_svertex() ) out << index(SVertex_handle(it)) << ' ';
+  out << ", ";
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it));
+  out << ", " << index(f->volume()) << " } " << f->mark() <<"\n";
+}
+
+template <typename EW>
+bool SNC_io_parser<EW>::
+read_sface(SFace_handle sfh) {
+
+  bool OK = true;
+  int index;
+  char cc;
+
+  in >> index;
+  OK = OK && test_string("{");
+
+  in >> index;
+  sfh->center_vertex() = Vertex_of[index];
+  OK = OK && test_string(",");
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    //    sfh->boundary_entry_objects().push_back(SEdge_of[index]);
+    SM_decorator SD(&*sfh->center_vertex());
+    SD.link_as_face_cycle(SEdge_of[index],sfh);
+    in >> cc;
+  }
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    sfh->boundary_entry_objects().push_back(make_object(Edge_of[index]));
+    this->sncp()->store_sm_boundary_item(Edge_of[index], --(sfh->sface_cycles_end()));
+    in >> cc;
+  }
+
+  in >> cc;
+  while(isdigit(cc)) {
+    in.putback(cc);
+    in >> index;
+    sfh->boundary_entry_objects().push_back(make_object(SLoop_of[index]));
+    this->sncp()->store_sm_boundary_item(SLoop_of[index], --(sfh->sface_cycles_end()));
+    in >> cc;
+  }
+
+  in >> index;
+  sfh->volume() = Volume_of[index+addInfiBox];
+  OK = OK && test_string("}");
+  in >> sfh->mark();
+
+  return OK;
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::print_local_graph(Vertex_handle v) const
+{ SM_decorator D(&*v);
+  out << "Local Graph "
+      << D.number_of_vertices() << " " << D.number_of_edges() << " "
+      << D.number_of_loops() << " " << D.number_of_faces() << " "
+      << std::endl;
+  if (verbose)
+    out << "/* index { twin, source, isolated incident_object, mark } */\n";
+  SVertex_iterator vit;
+  CGAL_forall_svertices_of(vit,v) print_edge(vit);
+  if (verbose)
+    out << "/* index { twin, sprev, snext, source, sface,"
+        << " prev, next, facet } */\n";
+  SHalfedge_iterator eit;
+  CGAL_forall_shalfedges_of(eit,v) print_sedge(eit);
+  if (verbose)
+    out << "/* index { twin, sface, facet } */" << std::endl;
+  if ( D.has_sloop() )
+  { print_sloop(D.loop()); print_sloop(twin(D.loop())); }
+  if (verbose)
+    out << "/* index { fclist, ivlist, sloop, volume } */" << std::endl;
+  SFace_iterator fit;
+  CGAL_forall_sfaces_of(fit,v) print_sface(fit);
+  out.flush();
+}
+
+template <typename EW>
+void SNC_io_parser<EW>::add_infi_box() {
+
+  for(i=0; i<8; ++i)  Vertex_of.push_back(this->sncp()->new_vertex_only());
+  for(i=0; i<24; ++i)  Edge_of.push_back(this->sncp()->new_halfedge_only());
+  for(i=0; i<12; ++i)  Halffacet_of.push_back(this->sncp()->new_halffacet_only());
+  for(i=0; i<48; ++i) SEdge_of.push_back(this->sncp()->new_shalfedge_only());
+  for(i=0; i<16; ++i) SFace_of.push_back(this->sncp()->new_sface_only());
+
+  typename Standard_kernel::RT hx,hy,hz,hw;
+  for(int i=0; i<8; ++i) {
+    Vertex_handle vh = Vertex_of[vn+i];
+    vh->svertices_begin() = Edge_of[en+3*i];
+    vh->svertices_last()  = Edge_of[en+3*i+2];
+    vh->shalfedges_begin() = SEdge_of[sen+6*i];
+    vh->shalfedges_last()  = SEdge_of[sen+6*i+5];
+    vh->sfaces_begin() = SFace_of[sfn+2*i];
+    vh->sfaces_last()  = SFace_of[sfn+2*i+1];
+    vh->shalfloop() = this->shalfloops_end();
+    hx = i % 2 ? -1 : 1;
+    hy = i % 4 > 1 ? -1 : 1;
+    hz = i > 3 ? -1 : 1;
+    vh->point() = Infi_box::create_extended_point(hx, hy, hz);
+    vh->mark() = 1;
+    vh->sncp() = this->sncp();
+  }
+
+  int seOff[3] = {0, 1, 3};
+  int twinIdx[24] = { 3, 7,14,
+		      0,10,17,
+		      9, 1,20,
+		      6, 4,23,
+		      15,19, 2,
+		      12,22, 5,
+		      21,13, 8,
+		      18,16,11};
+
+  for(int i = 0; i < 24; ++i) {
+    Halfedge_handle eh = Edge_of[en+i];
+    eh->twin() = Edge_of[en+twinIdx[i]];
+    eh->center_vertex() = Vertex_of[vn+(i/3)];
+    eh->out_sedge() = SEdge_of[sen+(i/3*6)+seOff[i%3]];
+    switch(i%3) {
+    case 0 :
+      hx = i % 6 ? 1 : -1;
+      hy = hz = 0;
+      break;
+    case 1:
+      hy = i % 12 >= 6 ? 1 : -1;
+      hx = hz = 0;
+      break;
+    case 2:
+      hz = i >= 12 ? 1 : -1;
+      hx = hy = 0;
+      break;
+    }
+    eh->point() = Sphere_point(hx,hy,hz);
+    eh->mark() = 1;
+  }
+
+  int bnd[12] = {19, 18, 43, 42, 35, 34,
+		 47, 46, 39, 38, 45, 44};
+  for(int i = 0; i < 12; ++i) {
+    Halffacet_handle fh = Halffacet_of[fn+i];
+    fh->twin() = Halffacet_of[fn+(i/2*2)+((i+1)%2)];
+    fh->boundary_entry_objects().push_back(make_object(SEdge_of[sen+bnd[i]]));
+    fh->incident_volume() = Volume_of[((i%4) == 1 || (i%4 == 2)) ? 1 : 0];
+    if(i<4) {
+      hz = i % 2 ? -1 : 1;
+      hx = hy = 0;
+    }
+    else if(i<8) {
+      hy = i % 2 ? -1 : 1;
+      hx = hz = 0;
+    }
+    else {
+      hx = i % 2 ? -1 : 1;
+      hz = hy = 0;
+    }
+    hw = ((i%4) == 1 || (i%4) == 2) ? 1 : -1;
+    fh->plane() = Infi_box::create_extended_plane(hx,hy,hz,hw);
+    fh->mark() = 1;
+  }
+
+  Volume_of[0]->shell_entry_objects().push_back(make_object(SFace_of[sfn]));
+  Volume_of[0]->mark() = 0;
+  Volume_of[1]->shell_entry_objects().push_front(make_object(SFace_of[sfn+1]));
+
+  int sprevOff[6] = {4,3,0,5,2,1};
+  int snextOff[6] = {2,5,4,1,0,3};
+  int prevIdx[48] = {7,12,15,26,29,10,
+		     1,18,21,32,35,4,
+		     19,0,3,38,41,22,
+		     13,6,9,44,47,16,
+		     31,36,39,2,5,34,
+		     25,42,45,8,11,28,
+		     43,24,27,14,17,46,
+		     37,30,33,20,23,40};
+  int nextIdx[48] = {13,6,27,14,11,28,
+		     19,0,33,20,5,34,
+		     1,18,39,2,23,40,
+		     7,12,45,8,17,46,
+		     37,30,3,38,35,4,
+		     43,24,9,44,29,10,
+		     25,42,15,26,47,16,
+		     31,36,21,32,41,22};
+  int factIdx[48] = {1,0,9,8,5,4,
+		     0,1,11,10,4,5,
+		     0,1,8,9,7,6,
+		     1,0,10,11,6,7,
+		     3,2,8,9,4,5,
+		     2,3,10,11,5,4,
+		     2,3,9,8,6,7,
+		     3,2,11,10,7,6};
+  int sgn[24] = {1,1,1,-1,1,-1,
+		 -1,-1,1,1,-1,-1,
+		 1,-1,-1,-1,-1,1,
+		 -1,1,-1,1,1,1};
+
+  for(int i = 0; i < 48; ++i) {
+    SHalfedge_handle seh = SEdge_of[sen+i];
+
+    seh->twin() = SEdge_of[sen+(i/2*2)+((i+1)%2)];
+    seh->sprev() = SEdge_of[sen+sprevOff[i%6]+(i/6*6)];
+    seh->snext() = SEdge_of[sen+snextOff[i%6]+(i/6*6)];
+    seh->source() = Edge_of[en+((i+1)%6)/2+(i/6)*3];
+    seh->incident_sface() = SFace_of[sfn+(i%2)+(i/6)*2];
+    seh->prev() = SEdge_of[sen+prevIdx[i]];
+    seh->next() = SEdge_of[sen+nextIdx[i]];
+    seh->facet() = Halffacet_of[fn+factIdx[i]];
+    if(i%6 < 2) {
+      hz = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
+      hx = hy = 0;
+    }
+    else if(i%6 < 4) {
+      hx = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
+      hz = hy = 0;
+    }
+    else {
+      hy = (i%2) ? sgn[i/2] * (-1) : sgn[i/2];
+      hx = hz = 0;
+    }
+    seh->circle() = Sphere_circle(Plane_3(RT(hx),RT(hy),RT(hz),RT(0)));
+    seh->mark() = 1;
+  }
+
+  int volIdx[8] = {0,1,1,0,1,0,0,1};
+
+  for(int i = 0; i < 16; ++i) {
+    SFace_handle sfh = SFace_of[sfn+i];
+    sfh->center_vertex() = Vertex_of[vn+(i/2)];
+    sfh->boundary_entry_objects().push_back(make_object(SEdge_of[sen+(i/2*6)+(i%2)]));
+    this->sncp()->store_sm_boundary_item(SEdge_of[sen+(i/2*6)+(i%2)],
+					  --(sfh->sface_cycles_end()));
+    int cIdx = i%2 ? 1-volIdx[i/2] : volIdx[i/2];
+    sfh->volume() = Volume_of[cIdx];
+    sfh->mark() = cIdx ? Volume_of[1]->mark() : 0;
+  }
+}
+
+} //namespace CGAL
+#endif //CGAL_SNC_IO_PARSER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_items.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_iteration.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_iteration.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_iteration.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_iteration.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_k3_tree_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_k3_tree_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_k3_tree_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_k3_tree_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_list.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_point_locator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_point_locator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_point_locator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_point_locator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_simplify.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_simplify.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_simplify.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_simplify.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_sphere_map.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_sphere_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_sphere_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_sphere_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_structure.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_structure.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/SNC_structure.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/SNC_structure.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/Volume.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/Volume.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/Volume.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/Volume.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/binop_intersection_tests.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/binop_intersection_tests.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/binop_intersection_tests.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/binop_intersection_tests.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/bounded_side_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/bounded_side_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/bounded_side_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/bounded_side_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/shell_to_nef_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/shell_to_nef_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/shell_to_nef_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/shell_to_nef_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Generic_handle_map.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Generic_handle_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Generic_handle_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Generic_handle_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Normalizing.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Normalizing.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Normalizing.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Normalizing.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/OGL_base_object.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/OGL_base_object.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/OGL_base_object.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/OGL_base_object.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_checker.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_checker.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_checker.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_checker.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_const_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_const_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_const_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_const_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_constrained_triang_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_constrained_triang_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_constrained_triang_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_constrained_triang_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_decorator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_decorator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_decorator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_decorator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_decorator_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_decorator_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_decorator_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_decorator_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_io_parser.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_io_parser.h
new file mode 100644
index 0000000..059cc49
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_io_parser.h
@@ -0,0 +1,492 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
+//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+
+#ifndef CGAL_SM_IO_PARSER_H
+#define CGAL_SM_IO_PARSER_H
+
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_2/Object_index.h>
+#include <CGAL/Nef_S2/SM_decorator_traits.h>
+#include <vector>
+#include <iostream>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4355) // complaint about using 'this' to
+#endif                          // initialize a member
+
+namespace CGAL {
+
+/*{\Moptions outfile=SM_io_parser.man }*/
+/*{\Manpage {SM_io_parser}{Decorator_}{IO of embedded maps}{IO}}*/
+
+/*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a
+decorator to provide input and output of a embedded map.  |\Mtype| is
+generic with respect to the |Decorator_| parameter.  |Decorator_| has
+to be a decorator model of our |SM_decorator| concept.}*/
+
+/*{\Mgeneralization SM_decorator}*/
+
+template <typename Decorator_>
+class SM_io_parser : public Decorator_
+{
+  typedef Decorator_                         Base;
+  typedef typename Decorator_::Sphere_point  Sphere_point;
+  typedef typename Decorator_::Sphere_circle Sphere_circle;
+  typedef typename Decorator_::Mark          Mark;
+
+  typedef typename Decorator_::Decorator_traits  Decorator_traits;
+
+  typedef typename Decorator_traits::SVertex_iterator     SVertex_iterator;
+  typedef typename Decorator_traits::SHalfedge_iterator   SHalfedge_iterator;
+  typedef typename Decorator_traits::SFace_iterator       SFace_iterator;
+  typedef typename Decorator_traits::SVertex_handle             SVertex_handle;
+  typedef typename Decorator_traits::SVertex_const_handle       SVertex_const_handle;
+  typedef typename Decorator_traits::SHalfedge_handle           SHalfedge_handle;
+  typedef typename Decorator_traits::SHalfedge_const_handle     SHalfedge_const_handle;
+  typedef typename Decorator_traits::SFace_const_handle         SFace_const_handle;
+  typedef typename Decorator_traits::SFace_handle               SFace_handle;
+  typedef typename Decorator_traits::SHalfloop_handle           SHalfloop_handle;
+  typedef typename Decorator_traits::SHalfloop_const_handle     SHalfloop_const_handle;
+  typedef typename Decorator_traits::SFace_cycle_iterator SFace_cycle_iterator;
+  typedef typename Decorator_traits::SHalfedge_around_svertex_circulator
+                                     SHalfedge_around_svertex_circulator;
+
+
+  using Base::is_isolated;
+  using Base::first_out_edge;
+  using Base::out_edges;
+
+  std::istream& in; std::ostream& out;
+  bool verbose;
+  // a reference to the IO object
+  CGAL::Object_index<SVertex_const_handle>   VI;
+  CGAL::Object_index<SHalfedge_const_handle> EI;
+  CGAL::Object_index<SFace_const_handle>     FI;
+  std::vector<SVertex_handle>        SVertex_of;
+  std::vector<SHalfedge_handle>      Edge_of;
+  std::vector<SFace_handle>          SFace_of;
+  SHalfloop_handle                   Loop_of[2];
+  // object mapping for input
+  std::size_t vn,en,ln,fn,i;
+  // the number of objects
+
+  bool check_sep(const char* sep);
+  void print_vertex(SVertex_handle) const;
+  void print_edge(SHalfedge_handle) const;
+  void print_loop(SHalfloop_const_handle) const;
+  void print_face(SFace_handle) const;
+
+  bool read_vertex(SVertex_handle);
+  bool read_edge(SHalfedge_handle);
+  bool read_loop(SHalfloop_handle);
+  bool read_face(SFace_handle);
+
+  void debug_vertex(SVertex_handle) const;
+  void debug_edge(SHalfedge_handle) const;
+  void debug_loop(SHalfloop_const_handle) const;
+
+public:
+/*{\Mcreation 3}*/
+SM_io_parser(std::istream& is, const Base& D);
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
+to input |H| from |is|.}*/
+
+SM_io_parser(std::ostream& os, const Base& D);
+/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
+to output |H| to |os|.}*/
+
+/*{\Moperations 2 3}*/
+void print() const;
+/*{\Mop prints |H| to |os|.}*/
+void read();
+/*{\Mop reads |H| from |is|.}*/
+void debug() const;
+void print_faces() const;
+
+std::string index(SVertex_const_handle v) const 
+{ return VI(v,verbose); }
+std::string index(SHalfedge_const_handle e) const 
+{ return EI(e,verbose); }
+std::string index(SHalfloop_const_handle l) const 
+{ if (verbose)  return (l==this->shalfloop()? "l0" : "l1");
+  else return (l==this->shalfloop()? "0" : "1");
+}
+std::string index(SFace_const_handle f) const 
+{ return FI(f,verbose); }
+
+static void dump(const Decorator_& D, std::ostream& os = std::cerr);
+/*{\Mstatic prints the plane map decorated by |D| to |os|.}*/
+
+}; // SM_io_parser<Decorator_>
+
+
+template <typename Decorator_>
+SM_io_parser<Decorator_>::
+SM_io_parser(std::istream& iin, const Base& H) :
+  Base(H), in(iin), out(std::cout), verbose(0), 
+  vn(0), en(0), ln(0), fn(0)
+{ this->clear(); }
+
+template <typename Decorator_>
+SM_io_parser<Decorator_>::
+SM_io_parser(std::ostream& iout, const Base& D) 
+  : Base(D), in(std::cin), out(iout), 
+  VI(this->svertices_begin(),this->svertices_end(),'v'),
+  EI(this->shalfedges_begin(),this->shalfedges_end(),'e'),
+  FI(this->sfaces_begin(),this->sfaces_end(),'f'),
+  vn(this->number_of_svertices()), 
+  en(this->number_of_shalfedges()), 
+  ln(this->number_of_shalfloops()),
+  fn(this->number_of_sfaces())
+{ verbose = (get_mode(out) != CGAL::IO::ASCII &&
+             get_mode(out) != CGAL::IO::BINARY);
+}
+
+
+//-----------------------------------------------------------------------------
+// OUTPUT AND INPUT:
+//-----------------------------------------------------------------------------
+
+template <typename Decorator_>
+bool SM_io_parser<Decorator_>::check_sep(const char* sep)
+{
+  char c; 
+  do in.get(c); while (isspace(c));
+  while (*sep != '\0') { 
+    if (*sep != c) {
+      in.putback(c);
+      return false;
+    }
+    ++sep; in.get(c);
+  }
+  in.putback(c);
+  return true;  
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print_vertex(SVertex_handle v) const
+{
+  // syntax: index { isolated incident_object, mark, point }
+  out << index(v) << " { ";
+  if ( is_isolated(v) ) out << "1 " << index(v->incident_sface());
+  else                  out << "0 " << index(first_out_edge(v));
+  out  << ", " << v->mark() << ", " << v->point() <<  "}\n";
+}
+
+template <typename Decorator_>
+bool SM_io_parser<Decorator_>::read_vertex(SVertex_handle v)
+{ 
+  // precondition: nodes exist
+  // syntax: index { isolated incident_object, mark, point}
+  int n; bool iso; int f; Mark m; Sphere_point p; 
+  if ( !(in >> n) ||
+       !check_sep("{") ||
+       !(in >> iso) ||
+       !(in >> f) ||
+       !check_sep(",") ||
+       !(in >> m) ||
+       !check_sep(",") ||
+       !(in >> p) ||
+       !check_sep("}") ) return false;
+ 
+  if (iso) set_face(v,SFace_of[f]);
+  else     set_first_out_edge(v,Edge_of[f]);
+  v->mark() = m; v->point() = p;
+  return true; 
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print_edge(SHalfedge_handle e) const
+{ // syntax: index { twin, prev, next, source, face, mark, circle }
+
+  Decorator_ D;
+  out << index(e) << " { "
+      << index(e->twin()) << ", " 
+      << index(e->sprev()) << ", " << index(e->snext()) << ", "
+      << index(e->source()) << ", " << index(e->incident_sface()) << ", "
+      << e->mark() << ", " << e->circle() << " }\n";
+}
+
+template <typename Decorator_>
+bool SM_io_parser<Decorator_>::read_edge(SHalfedge_handle e)
+{ // syntax: index { twin, prev, next, source, face, mark, circle }
+  int n, eo, epr, ene, v, f; bool m; Sphere_circle k;
+  if ( !(in >> n) ||
+       !check_sep("{") ||
+       !(in >> eo) || !check_sep(",") ||
+       !(in >> epr) || !check_sep(",") ||
+       !(in >> ene) || !check_sep(",") ||
+       !(in >> v) || !check_sep(",") ||
+       !(in >> f) || !check_sep(",") ||
+       !(in >> m) || !check_sep(",") ||
+       !(in >> k) || !check_sep("}") )
+    return false;
+  CGAL_assertion_msg 
+     (eo >= 0 && eo < en && epr >= 0 && epr < en && ene >= 0 && ene < en &&
+      v >= 0 && v < vn && f >= 0 && f < fn ,
+      "wrong index in read_edge");
+  
+  // precond: features exist!
+  CGAL_assertion(EI[e->twin()]);
+  set_prev(e,Edge_of[epr]);
+  set_next(e,Edge_of[ene]);
+  set_source(e,SVertex_of[v]);
+  set_face(e,SFace_of[f]);
+  e->mark() = m;
+  e->circle() = k;
+  return true;
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print_loop(SHalfloop_const_handle l) const
+{ // syntax: index { twin, face, mark, circle }
+  out << index(l) << " { "
+      << index(l->twin()) << ", " 
+      << index(l->incident_sface()) << ", "
+      << l->mark() << ", " << l->circle() << " }\n";
+}
+
+template <typename Decorator_>
+bool SM_io_parser<Decorator_>::read_loop(SHalfloop_handle l)
+{ // syntax: index { twin, face, mark, circle }
+  int n, lo, f; bool m; Sphere_circle k;
+  if ( !(in >> n) ||
+       !check_sep("{") ||
+       !(in >> lo) || !check_sep(",") ||
+       !(in >> f) || !check_sep(",") ||
+       !(in >> m) || !check_sep(",") ||
+       !(in >> k) || !check_sep("}") )
+    return false;
+  CGAL_assertion_msg(
+    (lo >= 0 && lo < 2 && f >= 0 && f < fn),"wrong index in read_edge");
+  
+  set_face(l,SFace_of[f]);
+  l->mark() = m;
+  l->circle() = k;
+  return true;
+}
+
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print_face(SFace_handle f) const
+{ // syntax: index { fclist, ivlist, loop, mark }
+  out << index(f) << " { "; 
+  SFace_cycle_iterator it;
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' ';
+  out << ", ";
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_svertex() ) out << index(SVertex_handle(it)) << ' ';
+  out << ", ";
+  CGAL_forall_sface_cycles_of(it,f)
+    if ( it.is_shalfloop() ) out << index(SHalfloop_handle(it));
+  out << ", " << f->mark() << " }\n";
+}
+
+template <typename Decorator_>
+bool SM_io_parser<Decorator_>::read_face(SFace_handle f)
+{ // syntax: index { fclist, ivlist, loop, mark }
+  int n, ei, vi, li; Mark m;
+  if ( !(in >> n) || !check_sep("{") ) return false;
+  while (in >> ei) { 
+    CGAL_assertion_msg(ei >= 0 && ei < en, 
+                           "wrong index in face cycle list.");
+    store_sm_boundary_object(Edge_of[ei],f);
+  } in.clear();
+  if (!check_sep(",")) { return false; }
+  while (in >> vi) { 
+    CGAL_assertion_msg(vi >= 0 && vi < vn, 
+                           "wrong index in iso vertex list.");
+    store_sm_boundary_object(SVertex_of[vi],f);
+  } in.clear();
+  if (!check_sep(",")) { return false; }
+  while (in >> li) { 
+    CGAL_assertion_msg(li >= 0 && li < 2, 
+                           "wrong index in iso vertex list.");
+    store_sm_boundary_object(Loop_of[li],f);
+  } in.clear();
+  if (!check_sep(",") || !(in >> m) || !check_sep("}") ) 
+    return false;
+  f->mark() = m;
+  return true;
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print() const
+{
+  out << "Sphere_map_2" << std::endl;
+  out << "vertices "  << vn << std::endl;
+  out << "edges "     << en << std::endl;
+  out << "loops "     << ln << std::endl;
+  out << "faces "     << fn << std::endl;
+  if (verbose) 
+    out << "/* index { isolated ? face : edge, mark, point } */" << std::endl;
+  SVertex_iterator vit;
+  CGAL_forall_svertices(vit,*this) print_vertex(vit);
+  if (verbose) 
+    out << "/* index { twin, prev, next, source, face, mark, circle } */" 
+	<< std::endl;
+  SHalfedge_iterator eit;
+  CGAL_forall_shalfedges(eit,*this) print_edge(eit);
+  if (verbose) 
+    out << "/* index { twin, face, mark, circle } */" << std::endl;
+  if ( this->has_shalfloop() ) 
+    { print_loop(this->shalfloop()); print_loop(this->shalfloop()->twin()); }
+  if (verbose) 
+    out << "/* index { fclist, ivlist, loop, mark } */" << std::endl;
+  SFace_iterator fit;
+  CGAL_forall_sfaces(fit,*this) print_face(fit);
+  out.flush();
+  if (verbose) debug();
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::read() 
+{
+  if ( !check_sep("Sphere_map_2") )  
+    CGAL_error_msg("SM_io_parser::read: no embedded_PM header.");
+  if ( !(check_sep("vertices") && (in >> vn)) ) 
+    CGAL_error_msg("SM_io_parser::read: wrong vertex line.");
+  if ( !(check_sep("edges") && (in >> en) && (en%2==0)) )
+    CGAL_error_msg("SM_io_parser::read: wrong edge line.");
+  if ( !(check_sep("loops") && (in >> ln)) )
+    CGAL_error_msg("SM_io_parser::read: wrong loop line.");
+  if ( !(check_sep("faces") && (in >> fn)) )
+    CGAL_error_msg("SM_io_parser::read: wrong face line.");
+
+  SVertex_of.resize(vn);
+  Edge_of.resize(en);
+  SFace_of.resize(fn);
+  for(i=0; i<vn; i++)  SVertex_of[i] =   this->new_svertex();
+  for(i=0; i<en; i++) 
+    if (i%2==0) Edge_of[i] = this->new_shalfedge_pair();
+    else Edge_of[i] = Edge_of[i-1]->twin();
+  for(i=0; i<fn; i++)  SFace_of[i] =     this->new_sface();
+  if ( ln == 2 ) { 
+    Loop_of[0] = this->new_shalfloop_pair(); 
+    Loop_of[1] = this->shalfloop()->twin(); 
+  }
+
+  for(i=0; i<vn; i++) {
+    if (!read_vertex(SVertex_of[i]))
+      CGAL_error_msg("SM_io_parser::read: error in node line");
+  }
+  for(i=0; i<en; i++) {
+    if (!read_edge(Edge_of[i]))
+      CGAL_error_msg("SM_io_parser::read: error in edge line");
+  }
+  if ( ln == 2 ) {
+    read_loop(Loop_of[0]); read_loop(Loop_of[1]);
+  }
+  for(i=0; i<fn; i++) {
+    if (!read_face(SFace_of[i]))
+      CGAL_error_msg("SM_io_parser::read: error in face line");
+  }
+}
+
+//-----------------------------------------------------------------------------
+// VERBOSE OUTPUT:
+// note that we output the index of the objects which is stored in them
+// this is NOT the member index as produced by the forall loops
+//-----------------------------------------------------------------------------
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::debug_vertex(SVertex_handle v) const
+{ 
+  out << index(v) << "[" << v->mark() << "," << v->point() << "]" << std::endl; 
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::debug_edge(SHalfedge_handle e) const
+{ 
+  out << index(e)
+      << "(" << index(e->source()) << "," << index(e->target()) << ") "
+      << index(e->twin()) << " " << index(e->incident_sface())
+      << " ["<< e->mark() << "," << e->circle() << "] " << std::endl;
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::debug_loop(SHalfloop_const_handle l) const
+{ 
+  out << index(l) << " "
+      << index(l->twin()) << " " << index(l->incident_sface())
+      << " ["<< l->mark() << "] " << l->circle() << std::endl;
+}
+
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::debug() const
+{ 
+  out << "\nDEBUG Plane_map\n";
+  out << "Vertices:  " << this->number_of_svertices() << "\n";
+  out << "SHalfedges: " << this->number_of_shalfedges() << "\n";
+  out << "Loop:      " << this->number_of_shalfloops() << "\n";
+  SVertex_iterator vit; 
+  CGAL_forall_svertices(vit,*this) {
+    if ( is_isolated(vit) ) continue;
+    SHalfedge_around_svertex_circulator hcirc(out_edges(vit)), hend(hcirc);
+    debug_vertex(vit);
+    CGAL_For_all(hcirc,hend) { out << "  "; debug_edge(hcirc); }
+  }
+  if ( this->has_shalfloop() ) 
+    { debug_loop(this->shalfloop()); debug_loop(this->shalfloop()->twin()); }
+  out << std::endl;
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::print_faces() const
+{ 
+  out << "\nFACES\n";
+  out << "Vertices:  " << this->number_of_svertices() << "\n";
+  out << "SHalfedges: " << this->number_of_shalfedges() << "\n";
+  out << "Loop:      " << this->number_of_shalfloops() << "\n";
+  SHalfedge_iterator e;
+  Unique_hash_map<SHalfedge_iterator,bool> Done(false);
+  CGAL_forall_shalfedges(e,*this) {
+    if ( Done[e] ) continue;
+    typename Base::SHalfedge_around_sface_circulator c(e), ce = c;
+    out << "face cycle\n";
+    CGAL_For_all(c,ce) 
+    { Done[c]=true; out << "  "; debug_vertex(c->source()); }
+  }
+  if ( this->has_shalfloop() ) 
+    { debug_loop(this->shalfloop()); debug_loop(this->shalfloop()->twin()); }
+  out << std::endl;
+}
+
+template <typename Decorator_>
+void SM_io_parser<Decorator_>::dump(const Decorator_& D, std::ostream& os)
+{ SM_io_parser<Decorator_> Out(os,D);
+  Out.print();
+  Out.print_faces();
+}
+
+
+
+} //namespace CGAL
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif //CGAL_SM_IO_PARSER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_items.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_items.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_items.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_items.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_iteration.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_iteration.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_iteration.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_iteration.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_list.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_list.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_overlayer.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_overlayer.h
new file mode 100644
index 0000000..d677995
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_overlayer.h
@@ -0,0 +1,2461 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+
+#ifndef CGAL_SM_OVERLAYER_H
+#define CGAL_SM_OVERLAYER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Union_find.h>
+#include <CGAL/Nef_2/Segment_overlay_traits.h>
+#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+#include <CGAL/Nef_2/geninfo.h>
+#else
+#include <boost/any.hpp>
+#endif
+#include <CGAL/Nef_S2/Sphere_geometry.h>
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_S2/SM_const_decorator.h>
+#include <CGAL/Nef_S2/SM_point_locator.h>
+#include <CGAL/Nef_S2/SM_io_parser.h>
+#include <CGAL/Nef_3/ID_support_handler.h>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 131
+#include <CGAL/Nef_2/debug.h>
+
+#ifndef CGAL_USE_LEDA
+#define LEDA_MEMORY(t)
+#else
+#include <LEDA/system/memory.h>
+#endif
+
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+template <typename Decorator_, typename I>
+struct SMO_from_segs {
+  typedef Decorator_ SM_decorator;
+  typedef typename SM_decorator::SVertex_handle     Vertex_handle;
+  typedef typename SM_decorator::SHalfedge_handle   Halfedge_handle;
+  typedef typename SM_decorator::Sphere_point       Point;
+  typedef typename SM_decorator::Sphere_segment     Segment;
+  typedef CGAL::Unique_hash_map<I,bool>             Iterator_map;
+  SM_decorator G;
+  const Iterator_map& M;
+  SMO_from_segs(SM_decorator Gi, const Iterator_map& Mi) : G(Gi),M(Mi) {}
+
+  Vertex_handle new_vertex(const Point& p)
+  { Vertex_handle v = G.new_svertex(p); 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<Halfedge_handle>::create(G.info(v));
+    #else
+    G.info(v)=Halfedge_handle();
+    #endif
+    return v;
+  }
+
+  void link_as_target_and_append(Vertex_handle v, Halfedge_handle e) 
+  { G.link_as_target_and_append(v,e); }
+
+  Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
+  { Halfedge_handle e = 
+    G.new_shalfedge_pair_at_source(v,SM_decorator::BEFORE); 
+    return e;
+  }
+
+  void supporting_segment(Halfedge_handle e, I it) const
+  { if ( M[it] ) e->mark() = true; }
+
+  void trivial_segment(Vertex_handle v, I it) const
+  { if ( M[it] ) v->mark() = true; }
+
+  void starting_segment(Vertex_handle v, I it) const
+  { if ( M[it] ) v->mark() = true; }
+
+  void passing_segment(Vertex_handle v, I it) const
+  { if ( M[it] ) v->mark() = true; }
+
+  void ending_segment(Vertex_handle v, I it) const
+  { if ( M[it] ) v->mark() = true; }
+
+  void halfedge_below(Vertex_handle v, Halfedge_handle e) const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<Halfedge_handle>::access(G.info(v)) = e; 
+    #else
+    G.info(v)=e;
+    #endif
+  }
+
+  Halfedge_handle halfedge_below(Vertex_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<Halfedge_handle>::access(G.info(v)); 
+    #else
+    return 
+      boost::any_cast<Halfedge_handle>( G.info(v) );
+    #endif
+  }
+
+  void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const 
+  { 
+    CGAL_USE(v1);
+    CGAL_USE(v2);
+    CGAL_assertion(v1->mark()==v2->mark());
+  }
+
+  void discard_info(Vertex_handle v) const 
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<Halfedge_handle>::clear(G.info(v)); 
+    #else
+    G.info(v)=boost::any();
+    #endif
+  }
+
+  void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
+  {
+    CGAL_USE(e1);
+    CGAL_USE(e2);
+    CGAL_assertion(e1->mark()==e2->mark());
+  }
+
+  void discard_info(Halfedge_handle ) const {}
+
+  void clear_temporary_vertex_info() const
+  { Vertex_handle v;
+    CGAL_forall_svertices(v,G)
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+      geninfo<Halfedge_handle>::clear(G.info(v));
+    #else
+    G.info(v)=boost::any();
+    #endif
+      
+  }
+
+
+}; // SMO_from_segs
+
+
+template <typename SM_overlayer, typename IT, typename INFO>
+struct SMO_from_sm {
+  typedef typename SM_overlayer::SM_const_decorator      SM_const_decorator;
+  typedef typename SM_overlayer::SVertex_handle          Vertex_handle;
+  typedef typename SM_overlayer::SHalfedge_handle        Halfedge_handle;
+  typedef typename SM_overlayer::Sphere_point            Point;
+  typedef typename SM_overlayer::Sphere_segment          Segment;
+
+  SM_overlayer G;
+  CGAL::Unique_hash_map<IT,INFO>& M;
+  SMO_from_sm(SM_overlayer Gi, 
+              SM_const_decorator* /* pGIi */, 
+              CGAL::Unique_hash_map<IT,INFO>& Mi) : 
+    G(Gi), M(Mi) {}
+
+Vertex_handle new_vertex(const Point& p)
+{ CGAL_NEF_TRACEN(" new vertex " << p);
+  Vertex_handle v = G.new_svertex(p);
+  G.assoc_info(v);
+  return v;
+}
+
+void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
+  { CGAL_NEF_TRACEN(" link as target and append " 
+		    << e->source()->point() << "->"
+		    << v->point());
+		    G.link_as_target_and_append(v,e); }
+
+Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
+{ CGAL_NEF_TRACEN(" new halfedge pair at source " << v->point());
+  Halfedge_handle e = 
+  G.new_shalfedge_pair_at_source(v,SM_overlayer::BEFORE); 
+  G.assoc_info(e);
+  return e;
+}
+
+void halfedge_below(Vertex_handle v, Halfedge_handle e) const
+{ 
+  CGAL_NEF_TRACEN("   edge below " << v->point() << ":");
+  CGAL_NEF_TRACEN(&*e);
+  G.halfedge_below(v) = e; 
+}
+
+void supporting_segment(Halfedge_handle e, IT it) const
+{ INFO& si = M[it];
+  G.is_forward(e) = true;
+  if ( si._from == -1 )  return; // equatorial segment
+  G.supp_object(e,si._from) = si._o;
+  CGAL_NEF_TRACEN("   supporting segment "<<si._from<<":"<<*it);
+}
+
+void trivial_segment(Vertex_handle v, IT it) const
+{ INFO& si = M[it];
+  CGAL_assertion( ! si._o.empty() );
+  typename SM_const_decorator::SHalfedge_const_handle se;
+  typename SM_const_decorator::SHalfloop_const_handle sl;
+  typename SM_const_decorator::SVertex_const_handle sv;
+  if(CGAL::assign(se, si._o)) {
+    if(se->source()->point() != v->point())
+      se = se->twin();
+    if(se->source()->point() != v->point())
+      G.supp_object(v,si._from) = si._o;
+    else
+      G.supp_object(v,si._from) = make_object(se->source());
+  } else if(CGAL::assign(sl, si._o)) {
+    G.supp_object(v,si._from) = si._o;
+  } else if(CGAL::assign(sv, si._o)) {
+    CGAL_assertion(sv->point() == v->point());
+    G.supp_object(v,si._from) = si._o;
+  } else
+    CGAL_error_msg( "wrong handle");
+  
+  CGAL_NEF_TRACEN("trivial_segment " << si._from << ":" << v->point()); 
+  //  debug();
+}
+
+void starting_segment(Vertex_handle v, IT it) const
+{ INFO& si = M[it];
+  if ( si._from == -1 ) return;
+  typename SM_const_decorator::SHalfedge_const_handle se;
+  typename SM_const_decorator::SHalfloop_const_handle sl;
+  if(CGAL::assign(se, si._o)) {
+    if(se->source()->point() != v->point()) {
+      se = se->twin();
+      if(se->source()->point() != v->point()) {
+	G.supp_object(v,si._from) = si._o;
+	return;
+      }
+    }
+    G.supp_object(v,si._from) = make_object(se->source());
+    CGAL_NEF_TRACEN("starting_segment " << si._from << ":"<< 
+		    v->point() << " " << se->source()->point()); 
+  } else if(CGAL::assign(sl, si._o)) {
+    G.supp_object(v,si._from) = si._o;
+  } else
+    CGAL_error_msg( "wrong object");
+  //  debug();
+}
+
+void ending_segment(Vertex_handle v, IT it) const
+{ INFO& si = M[it];
+  if ( si._from == -1 ) return;
+  typename SM_const_decorator::SHalfedge_const_handle se;
+  typename SM_const_decorator::SHalfloop_const_handle sl;
+  if(CGAL::assign(se, si._o)) {
+    if(se->source()->point() != v->point()) {
+      se = se->twin();
+      if(se->source()->point() != v->point()) {
+	G.supp_object(v,si._from) = si._o;
+	return;
+      }
+    }
+    G.supp_object(v,si._from) = make_object(se->source());
+    CGAL_NEF_TRACEN("ending_segment " << si._from << ":"<< 
+		    v->point() << ":" << 
+		    se->source()->point() << "->" << 
+		    se->twin()->source()->point()); 
+  } else if(CGAL::assign(sl, si._o)) {
+    G.supp_object(v,si._from) = si._o;
+  } else
+    CGAL_error_msg( "wrong object");
+  //  debug();
+}
+
+void passing_segment(Vertex_handle v, IT it) const
+{ INFO& si = M[it];
+  if ( si._from == -1 ) return;
+  G.supp_object(v,si._from) = si._o; 
+  CGAL_NEF_TRACEN("passing_segment " << si._from << ":"<< v->point()); 
+  //  debug();
+}
+
+Halfedge_handle halfedge_below(Vertex_handle v) const
+{ return G.halfedge_below(v); }
+
+void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const 
+{
+  CGAL_USE(v1);
+  CGAL_USE(v2);
+  CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
+  CGAL_NEF_TRACEV(G.mark(v2,0));CGAL_NEF_TRACEV(G.mark(v2,1));
+  CGAL_assertion(G.mark(v1,0)==G.mark(v2,0)&&
+		 G.mark(v1,1)==G.mark(v2,1)); }
+void discard_info(Vertex_handle v) const 
+{ G.discard_info(v); }
+
+void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
+{ 
+  CGAL_USE(e1);
+  CGAL_USE(e2);
+  CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) && 
+		 G.mark(e1,1)==G.mark(e2,1)); 
+}
+
+void discard_info(Halfedge_handle e) const 
+{ G.discard_info(e); }
+
+void debug() const {
+  typename SM_overlayer::SVertex_iterator svii;
+  CGAL_forall_svertices(svii, G) {
+    typename SM_overlayer::SVertex_const_handle vs;
+    typename SM_overlayer::SHalfedge_const_handle es;
+    if(CGAL::assign(vs, G.supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
+    else if(CGAL::assign(es, G.supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+    if(CGAL::assign(vs, G.supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by svertex" << vs->point() << std::endl;
+    else if(CGAL::assign(es, G.supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+  }
+}
+
+}; // SMO_from_sm
+
+template <typename SM_decorator, typename ITERATOR>
+class SMO_decorator { 
+public:
+  typedef SM_decorator Graph;
+  typedef typename SM_decorator::SVertex_handle  SVertex_handle;
+  typedef typename SM_decorator::SHalfedge_handle    SHalfedge_handle;
+  typedef typename SM_decorator::Sphere_point    Point_2;
+  typedef typename SM_decorator::Sphere_segment  Segment_2;
+  SM_decorator G;
+
+SMO_decorator(Graph Gi) : G(Gi) {}
+
+SVertex_handle new_vertex(const Point_2& p)
+{ return G.snew_vertex(p); }
+
+void link_as_target_and_append(SVertex_handle v, SHalfedge_handle e)
+{ G.link_as_target_and_append(v,e); }
+
+SHalfedge_handle new_halfedge_pair_at_source(SVertex_handle v)
+{ return G.new_shalfedge_pair_at_source(v,Graph::BEFORE); }
+
+void supporting_segment(SHalfedge_handle /*e*/, ITERATOR /*it*/) {}
+void halfedge_below(SVertex_handle /*v*/, SHalfedge_handle /*e*/) {}
+void trivial_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
+void starting_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
+void passing_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
+void ending_segment(SVertex_handle /*v*/, ITERATOR /*it*/) {}
+
+
+}; // SMO_decorator
+
+// ============================================================================
+// ============================================================================
+
+/*{\Manpage {SM_overlayer}{SM_decorator}{Overlay in the sphere}{O}}*/
+
+template <typename SM_decorator_>
+class SM_overlayer : public SM_decorator_ {
+public:
+
+  /*{\Mdefinition An instance |\Mvar| of data type |\Mname| is a
+  decorator object offering sphere map overlay calculation. Overlay is
+  either calculated from two sphere maps or from a set of halfspaces.
+  The result is stored in a sphere map |M| that carries the geometry and
+  the topology of the overlay.
+
+  The template parameter provides the underlying topological interface
+  to sphere maps. The template parameter |SM_decorator| has to be a model
+  conforming to our map decorator concept |SM_decorator|.  The concept
+  also describes the interface how the topological information stored in
+  |M| can be extracted or extended.
+
+  The overlay of a set of sphere segments $S$ is stored in a sphere map
+  $M = (V,E,L,F)$. Vertices are either the endpoints of segments (trivial
+  segments are allowed) or the result of the internal intersection of
+  two segments. Between two vertices there's an edge if there's a
+  segment that supports the spherical embedding of $e$ and if there's no
+  vertex in the relative interior of the embedding of $e$.
+
+  The faces refer to the maximal connected open point sets of the
+  spherical subdivision implied by the embedding of the vertices and
+  edges.  SFaces are bounded by possibly several face cycles\cgalFootnote{For
+  the definition of sphere maps and their concepts see the manual page
+  of |SM_decorator|.} including isolated vertices. The overlay process
+  in the method |create_from_segments| creates the objects and the
+  topology of the result. The method starts from zero- and
+  one-dimensional geometric objects in $S$ and produces a spherical
+  structure where each point of the sphere can be assigned to an object
+  (vertex, edge, loop, or face) of |M|.
+
+  The overlay of two sphere maps $M_i = (V_i, E_i, L_i, F_i)$ has the
+  additional aspect that we already start from two spherical
+  subdivisions.  We use the index $i=0,1$ defining the reference to
+  $M_i$, unindexed variables refer to the resulting sphere map $M$.  The
+  $1$-skeleta of the two maps subdivide the edges, loops, and faces of
+  the complementary structure into smaller units. This means vertices,
+  edges, and loops of $M_i$ can split edges and loops of $M_{1-i}$ and
+  face cycles of $M_i$ subdivide faces of $M_{1-i}$. The 1-skeleton $G$
+  of $M$ is defined by the overlay of the embedding of the 1-skeleta of
+  $M_0$ and $M_1$ (Take a trivial segment for each vertex and a segment
+  for each edge, and a circle for a loop, and use the overlay definition
+  of a set of segments and loops above). The faces of $M$ refer to the
+  maximal connected open point sets of the spherical subdivision implied
+  by the embedding of $G$. Each object from the output tuple $(V,E,F)$
+  has a \emph{supporting} object $u_i$ in each of the two input
+  structures.  Imagine the two maps to be transparent balls, where one
+  contains the other. Then each point of the sphere is covered by an
+  object from each of the input structures.  This support relationship
+  from the input structures to the output structure defines an
+  information flow. Each supporting object $u_i$ of $u$ $(i=0,1)$
+  carries an associated information $|mark|(u_i)$. After the subdivision
+  operation this information is attributed to the output object $u$ by
+  $|mark|(u,i)$.}*/
+
+  typedef SM_decorator_                         SM_decorator;
+  typedef typename SM_decorator::Map            Map;
+  typedef SM_decorator                          Base;
+  typedef SM_overlayer<SM_decorator_>           Self;
+  typedef CGAL::SM_const_decorator<Map>               SM_const_decorator;
+  typedef CGAL::SM_point_locator<SM_const_decorator>  SM_point_locator;
+
+  //  typedef typename SM_const_decorator::Constructor_parameter 
+  //                                       Constructor_const_parameter;
+  typedef typename SM_const_decorator::SVertex_const_handle SVertex_const_handle;
+  typedef typename SM_const_decorator::SHalfedge_const_handle SHalfedge_const_handle;
+  typedef typename SM_const_decorator::SHalfloop_const_handle SHalfloop_const_handle;
+  typedef typename SM_const_decorator::SFace_const_handle SFace_const_handle;
+  typedef typename SM_const_decorator::SVertex_const_iterator SVertex_const_iterator;
+  typedef typename SM_const_decorator::SHalfedge_const_iterator SHalfedge_const_iterator;
+  typedef typename SM_const_decorator::SFace_const_iterator SFace_const_iterator;
+
+  //  typedef typename Base::Constructor_parameter Constructor_parameter;
+  typedef typename Base::SVertex_handle SVertex_handle;
+  typedef typename Base::SHalfedge_handle SHalfedge_handle;
+  typedef typename Base::SHalfloop_handle SHalfloop_handle;
+  typedef typename Base::SFace_handle SFace_handle;
+  typedef typename Base::SVertex_iterator SVertex_iterator;
+  typedef typename Base::SHalfedge_iterator SHalfedge_iterator;
+  typedef typename Base::SFace_iterator SFace_iterator;
+  typedef typename Base::Object_handle Object_handle;
+
+  typedef typename Base::SHalfedge_around_svertex_circulator 
+                         SHalfedge_around_svertex_circulator;
+  typedef typename Base::SHalfedge_around_sface_circulator 
+                         SHalfedge_around_sface_circulator;
+  typedef typename Base::SFace_cycle_iterator 
+                         SFace_cycle_iterator;
+
+  typedef std::pair<SHalfedge_handle,SHalfedge_handle> SHalfedge_pair;
+
+  /*{\Mtypes 3}*/
+
+  typedef typename Base::Sphere_kernel           Sphere_kernel;
+  /*{\Mtypemember the geometry kernel.}*/
+  typedef typename Sphere_kernel::Sphere_point   Sphere_point;
+  /*{\Mtypemember the point type of the sphere geometry.}*/
+  typedef typename Sphere_kernel::Sphere_segment Sphere_segment;
+  /*{\Mtypemember the segment type of the sphere geometry.}*/
+  typedef typename Sphere_kernel::Sphere_circle  Sphere_circle;
+  /*{\Mtypemember the circle type of the sphere geometry.}*/
+  typedef typename Base::Mark Mark;
+  /*{\Mtypemember the mark of sphere map objects.}*/
+
+  typedef typename Base::GenPtr GenPtr;
+
+
+  using Base::info;
+  using Base::set_first_out_edge;
+  using Base::first_out_edge;
+  using Base::last_out_edge;
+  using Base::out_edges;
+  using Base::link_as_loop;
+  using Base::link_as_face_cycle;
+  using Base::link_as_prev_next_pair;
+  using Base::link_as_isolated_vertex;
+  using Base::is_isolated;
+  using Base::set_source;
+  using Base::set_face;
+  using Base::delete_vertex_only;
+  using Base::delete_face_only;
+  using Base::delete_edge_pair;
+  using Base::delete_edge_pair_only;
+  using Base::is_sm_boundary_object;
+  using Base::undo_sm_boundary_object;
+  using Base::store_sm_boundary_object;
+  using Base::clear_face_cycle_entries;
+  using Base::is_closed_at_source;
+  using Base::has_outdeg_two;
+  using Base::convert_edge_to_loop;
+  using Base::merge_edge_pairs_at_target;
+
+
+  /*{\Mgeneralization SM_decorator}*/
+
+protected:
+  SM_const_decorator PI[2];
+  const Sphere_kernel& K;
+
+public:
+
+  // ---------------------------------------------------------------
+
+  struct Seg_info { // to transport information from input to output
+    Object_handle _o; int _from;
+
+    Seg_info() : _o(), _from(-1) {}
+    Seg_info(SVertex_const_handle v, int i) 
+    { _o=make_object(v); _from=i; }
+    Seg_info(SHalfedge_const_handle e, int i) 
+    { _o=make_object(e); _from=i; }
+    Seg_info(SHalfloop_const_handle l, int i) 
+    { _o=make_object(l); _from=i; }
+    Seg_info(const Seg_info& si) 
+    { _o=si._o; _from=si._from; }
+    Seg_info& operator=(const Seg_info& si) 
+    { _o=si._o; _from=si._from; return *this; }
+    LEDA_MEMORY(Seg_info)
+  }; // Seg_info
+
+  typedef std::list<Sphere_segment>            Seg_list;
+  typedef typename Seg_list::iterator          Seg_iterator;
+  typedef std::pair<Seg_iterator,Seg_iterator> Seg_it_pair;
+  typedef std::pair<Sphere_segment,Sphere_segment> Seg_pair;
+  typedef CGAL::Unique_hash_map<Seg_iterator,Seg_info> Seg_map;
+
+  // ---------------------------------------------------------------
+
+  struct vertex_info {
+    Mark m[2];
+    Object_handle o_supp[2];
+    SHalfedge_handle e_below;
+    vertex_info() 
+    { o_supp[0]=o_supp[1]=Object_handle(); }
+    LEDA_MEMORY(vertex_info)
+  }; // vertex_info
+
+  void assoc_info(SVertex_handle v) const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<vertex_info>::create(info(v)); 
+    #else
+    info(v)=vertex_info();
+    #endif
+  }
+
+  void discard_info(SVertex_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<vertex_info>::clear(info(v)); 
+    #else
+    info(v)=boost::any();
+    #endif
+  }
+
+  vertex_info& ginfo(SVertex_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<vertex_info>::access(info(v)); 
+    #else
+    return 
+      *boost::any_cast<vertex_info>(&info(v)); 
+    #endif
+  }
+
+  Mark& mark(SVertex_handle v, int i) const
+  { return ginfo(v).m[i]; }
+
+  Object_handle& supp_object(SVertex_handle v, int i) const
+  { return ginfo(v).o_supp[i]; }
+
+  SHalfedge_handle& halfedge_below(SVertex_handle v) const
+  { return ginfo(v).e_below; }
+
+  // ---------------------------------------------------------------
+
+  struct edge_info {
+    Mark m[2];
+    Mark mf[2];
+    Object_handle o_supp[2];
+    bool forw;
+    edge_info()
+    { m[0]=m[1]=mf[0]=mf[1]=Mark(); 
+      o_supp[0]=o_supp[1]=Object_handle(); 
+      forw=false; }
+    LEDA_MEMORY(edge_info)
+  };
+
+  void assoc_info(SHalfedge_handle e)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<edge_info>::create(info(e));
+    geninfo<edge_info>::create(info(e->twin()));
+    #else
+    info(e)=edge_info();
+    info(e->twin())=edge_info();
+    #endif
+  }
+
+  void discard_info(SHalfedge_handle e)  const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<edge_info>::clear(info(e)); 
+    geninfo<edge_info>::clear(info(e->twin()));
+    #else
+    info(e)=boost::any();
+    info(e->twin())=boost::any();
+    #endif
+  }
+
+  edge_info& ginfo(SHalfedge_handle e)  const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<edge_info>::access(info(e)); 
+    #else
+    return 
+      *boost::any_cast<edge_info>(&info(e));
+    #endif
+  }
+
+  Mark& mark(SHalfedge_handle e, int i)  const
+    { return ginfo(e).m[i]; }
+
+  Object_handle& supp_object(SHalfedge_handle e, int i) const
+  // uedge information we store in the smaller one 
+  { if (&*e < &*(e->twin())) return ginfo(e).o_supp[i]; 
+    else                   return ginfo(e->twin()).o_supp[i]; }
+
+  Mark& incident_mark(SHalfedge_handle e, int i)  const
+  // biedge information we store in the edge
+  { return ginfo(e).mf[i]; }
+
+  bool& is_forward(SHalfedge_handle e) const
+  // biedge information we store in the edge
+  { return ginfo(e).forw; }
+
+  // ---------------------------------------------------------------
+
+  struct face_info {
+    Mark m[2];
+    face_info() { m[0]=m[1]=Mark(); }
+    LEDA_MEMORY(face_info)
+  };
+
+  void assoc_info(SFace_handle f)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<face_info>::create(info(f)); 
+    #else
+    info(f)=face_info();
+    #endif
+  }
+
+  void discard_info(SFace_handle f)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<face_info>::clear(info(f)); 
+    #else
+    info(f)=boost::any();
+    #endif
+  }
+
+  face_info& ginfo(SFace_handle f)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<face_info>::access(info(f)); 
+    #else
+    return
+      *boost::any_cast<face_info>(&info(f));
+    #endif
+  }
+
+  Mark& mark(SFace_handle f, int i)  const
+  { return ginfo(f).m[i]; }
+
+  // ---------------------------------------------------------------
+
+  template <typename Below_accessor>
+  SFace_handle determine_face(SHalfedge_handle e, 
+    const std::vector<SHalfedge_handle>& MinimalSHalfedge,
+    const CGAL::Unique_hash_map<SHalfedge_handle,int>& SFaceCycle,
+    const Below_accessor& D)
+  { CGAL_NEF_TRACEN("determine_face "<<PH(e));
+    int fc = SFaceCycle[e];
+    SHalfedge_handle e_min = MinimalSHalfedge[fc];
+    SHalfedge_handle e_below = D.halfedge_below(e_min->target());
+    if(e_below == SHalfedge_handle())
+      return SFace_handle();
+    SFace_handle f = e_below->incident_sface();
+    if ( f != SFace_handle() ) return f; // has already a face 
+    // e_below also has no face
+    f = determine_face(e_below, MinimalSHalfedge, SFaceCycle,D);
+    if(f != SFace_handle())
+      link_as_face_cycle(e_below,f);
+    return f;
+  }
+
+  Sphere_segment segment(SM_const_decorator , 
+                         SHalfedge_const_handle e) const
+  { return K.construct_segment(e->source()->point(),
+			       e->target()->point(),
+			       e->circle()); }
+
+  Sphere_segment trivial_segment(SM_const_decorator , 
+                                 SVertex_const_handle v) const
+  { Sphere_point p = v->point(); 
+    return K.construct_segment(p,p); }
+
+  Seg_pair two_segments(SM_const_decorator , 
+                        SHalfedge_const_handle e) const
+  // we know that e->source()==e->target()
+  { return e->circle().split_at(e->source()->point()); }
+
+  Seg_pair two_segments(SM_const_decorator , 
+                        SHalfloop_const_handle l) const
+  { return l->circle().split_at_xy_plane(); }
+
+
+  // ---------------------------------------------------------------
+  // INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE 
+  // ---------------------------------------------------------------
+
+  /*{\Mcreation 6}*/
+
+  SM_overlayer(Map* M, 
+    const Sphere_kernel& G = Sphere_kernel()) : Base(M), K(G) {}
+  /*{\Mcreate |\Mvar| is a decorator object manipulating the map
+  of |v|.}*/
+
+  /*{\Moperations 1.1 1}*/
+
+  template <typename Forward_iterator>
+  void create_from_segments(
+    Forward_iterator start, Forward_iterator end); 
+  /*{\Mop produces the sphere map which is the overlay of the
+  segments from the iterator range |[start,end)|.  \precond
+  |Forward_iterator| has value type |Sphere_segment|.}*/
+
+  template <typename Forward_iterator>
+  void create_from_circles(Forward_iterator start, Forward_iterator end);
+  /*{\Mop produces the sphere map which is the overlay of the
+  circles from the iterator range |[start,end)|.  \precond
+  |Forward_iterator| has value type |Sphere_circle|.}*/
+
+  void create(const Sphere_circle& c);
+  /*{\Mop produces the sphere map which consists of one loop
+  and the two halfspheres incident to it.}*/
+
+  void subdivide(const Map* M0, const Map* M1, 
+		 bool with_trivial_segments = false); 
+  
+  template <typename Association>
+  void subdivide(const Map* M0, const Map* M1, 
+		 Association& A, 
+		 bool with_trivial_segments = false);
+  /*{\Mop constructs the overlay of the sphere maps |M0| and |M1| in
+  |M|, where all objects (vertices, halfedges, faces) of |M| are
+  \emph{enriched} by the marks of the supporting objects of the two
+  input structures: e.g. let |v| be a vertex supported by a node |v0| in
+  |M0| and by a face |f1| in |M1| and |D0|, |D1| be decorators of
+  type |SM_decorator| on |M0|,|M1|. Then |\Mvar.mark(v,0) = D0.v0->mark()|
+  and |\Mvar.mark(v,1) = D1.f1->mark()|.}*/
+
+  template <typename Selection> 
+  void select(const Selection& SP) const;
+  /*{\Mop sets the marks of all objects according to the selection
+  predicate |SP|. |Selection| has to be a function object type with a
+  function operator\\
+  [[Mark operator()(Mark m0, Mark m1) const]]\\
+  For each object |u| of |M| enriched by the marks of the supporting
+  objects according to the previous procedure |subdivide|, after this
+  operation |\Mvar.u->mark() = SP ( \Mvar.mark(u,0),\Mvar.mark(u,1)
+  )|. The additional marks are invalidated afterwards.
+  \precond subdivide() was called before.}*/
+
+  void simplify();
+  /*{\Mop simplifies the structure of |M| according to the marks of
+  its objects. An edge |e| separating two faces |f1| and |f2| and equal
+  marks |e->mark() == f1->mark() == f2->mark()| is removed and the faces are
+  unified.  An isolated vertex |v| in a face |f| with |v->mark()==f->mark()|
+  is removed.  A vertex |v| with outdegree two, two collinear out-edges
+  |e1|,|e2| and equal marks |v->mark() == e1->mark() == e2->mark()| is removed
+  and the edges are unified.}*/
+
+  int check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const;
+
+  template <typename Iterator>
+  void subdivide_segments(Iterator start, Iterator end) const;
+  template <typename Iterator, typename T>
+  void partition_to_halfsphere(Iterator start, Iterator end,
+    Seg_list& L, CGAL::Unique_hash_map<Iterator,T>& M, 
+    Sphere_circle xycircle, Sphere_circle yzcircle, bool include_equator) const;
+
+  template <typename Mark_accessor>
+  void merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2,
+    const Mark_accessor& D);
+  template <typename Mark_accessor>
+  void merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2,
+    const Mark_accessor& D);
+
+  template <typename Below_accessor, typename Halfsphere_geometry>
+  void create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
+			   SVertex_iterator v_start, SVertex_iterator v_end,
+			   const Below_accessor& D, 
+			   const Halfsphere_geometry& SG);
+
+  template <typename Below_accessor>
+  void complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
+    const Below_accessor& D, std::vector<Mark>& mohs, int offset, bool both=true) const;
+
+  void complete_sface_marks() const;
+
+  void set_outer_face_mark(int offset, const std::vector<Mark>& mohs);
+
+  template <typename Association>
+    void transfer_data(Association& A);
+
+  void dump(std::ostream& os = std::cerr) const
+  { SM_io_parser<Base>::dump(*this,os); }
+
+}; // SM_overlayer<SM_decorator>
+
+template <typename Map>
+template <typename Forward_iterator>
+void SM_overlayer<Map>::
+create_from_segments(Forward_iterator start, Forward_iterator end)
+{
+  CGAL_NEF_TRACEN("creating from segment iterator range");
+  Seg_list L(start,end);
+  Unique_hash_map<Seg_iterator,bool> From_input(false);
+  Seg_iterator it;
+  CGAL_forall_iterators(it,L) From_input[it]=true;
+  Seg_list L_pos,L_neg;
+  partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input, 
+			  Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
+  partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input, 
+			  Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
+
+  typedef SMO_from_segs<Self,Seg_iterator> SM_output;
+  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
+  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+
+  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, NH_geometry> NHS_traits;
+  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  SVertex_iterator v;
+  SHalfedge_iterator e;
+  SM_output O(*this,From_input); 
+
+  typedef typename PHS_traits::INPUT Input_range;
+  Positive_halfsphere_sweep SP(
+    Input_range(L_pos.begin(),L_pos.end()),O,
+    PH_geometry());
+  SP.sweep();
+  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
+  v=--this->svertices_end(); e=--this->shalfedges_end();
+
+  Negative_halfsphere_sweep SM(
+    Input_range(L_neg.begin(),L_neg.end()),O,
+    NH_geometry());
+  SM.sweep();
+  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
+  ++v; ++e;
+  // now two CCs of sphere graph are calculated
+  // v = first vertex of CC in negative x-sphere
+  // e = first edge of CC in negative x-sphere
+
+  create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
+                      PH_geometry());
+  create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
+                      NH_geometry());
+
+  SHalfedge_iterator u;
+  CGAL_forall_sedges(u,*this) {
+    Sphere_segment s(u->source()->point(),u->target()->point());
+    u->circle() = s.sphere_circle();
+    u->twin()->circle() = s.sphere_circle().opposite();
+  }
+
+  merge_halfsphere_maps(this->svertices_begin(),v,O);
+  this->check_integrity_and_topological_planarity();
+
+  O.clear_temporary_vertex_info();
+}
+
+template <typename Map>
+template <typename Forward_iterator>
+void SM_overlayer<Map>::
+create_from_circles(Forward_iterator start, Forward_iterator end)
+{
+  CGAL_NEF_TRACEN("creating from circle iterator range");
+  Seg_list L;
+  Unique_hash_map<Seg_iterator,bool> From_input(false);
+  for ( ; start != end; ++start ) {
+    std::pair<Sphere_segment,Sphere_segment> spair =
+      start->split_at_xy_plane();
+    L.push_back(spair.first); L.push_back(spair.second);
+  }
+  Seg_iterator it;
+  CGAL_forall_iterators(it,L) From_input[it]=true;
+  Seg_list L_pos,L_neg;
+  partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
+			  Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
+  partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
+			  Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
+
+  typedef SMO_from_segs<Self,Seg_iterator> SM_output;
+  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
+  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+
+  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, NH_geometry> NHS_traits;
+  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  SVertex_iterator v;
+  SHalfedge_iterator e;
+  SM_output O(*this,From_input); 
+
+  typedef typename PHS_traits::INPUT Input_range;
+  Positive_halfsphere_sweep SP(
+    Input_range(L_pos.begin(),L_pos.end()),O,
+    PH_geometry());
+  SP.sweep();
+  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
+  v=--this->svertices_end(); e=--this->shalfedges_end();
+
+  Negative_halfsphere_sweep SM(
+    Input_range(L_neg.begin(),L_neg.end()), O,
+    NH_geometry());
+  SM.sweep();
+  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
+  ++v; ++e;
+  // now two CCs of sphere graph are calculated
+  // v = first vertex of CC in negative x-sphere
+  // e = first edge of CC in negative x-sphere
+
+  create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
+                      PH_geometry());
+  create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
+                      NH_geometry());
+
+  SHalfedge_iterator u;
+  CGAL_forall_sedges(u,*this) {
+    Sphere_segment s(u->source()->point(),u->target()->point());
+    u->circle() = s.sphere_circle();
+    u->twin()->circle() = s.sphere_circle().opposite();
+  }
+
+  merge_halfsphere_maps(this->svertices_begin(),v,O);
+  this->check_integrity_and_topological_planarity();
+
+  O.clear_temporary_vertex_info();
+}
+
+#ifdef CGAL_NEF_NEW_CHECK_SPHERE
+template <typename Map>
+int SM_overlayer<Map>::
+check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
+
+  int chsp = 0;
+  CGAL_NEF_TRACEN("chsp " << chsp);
+  
+  typename Seg_list::const_iterator it;
+  CGAL_forall_iterators(it,L) {
+    CGAL_NEF_TRACEN("source " << it->source());
+    CGAL_NEF_TRACEN("target " << it->target());
+
+    if((chsp&1)!=1)
+      if(it->source().hx()>0 || it->target().hx()>0)
+        chsp|=1;
+    if((chsp&2)!=2)
+      if(it->source().hx()<0 || it->target().hx()<0)
+        chsp|=2;
+    if((chsp&4)!=4)
+      if(it->source().hy()>0 || it->target().hy()>0)
+        chsp|=4;
+    if((chsp&8)!=8)
+      if(it->source().hy()<0 || it->target().hy()<0)
+        chsp|=8;
+    if((chsp&16)!=16)
+      if(it->source().hz()>0 || it->target().hz()>0)
+        chsp|=16;
+    if((chsp&32)!=32)
+      if(it->source().hz()<0 || it->target().hz()<0)
+        chsp|=32;
+    CGAL_NEF_TRACEN("chsp " << chsp);
+    if(chsp == 63)
+      break;
+  }
+
+  CGAL_forall_iterators(it,L) {
+    CGAL_NEF_TRACEN("chsp " << chsp);
+    if(chsp == 63)
+      break;
+
+//    int l = it->compare_length_to_halfcircle();
+    CGAL_NEF_TRACEN("source " << it->source());
+    CGAL_NEF_TRACEN("target " << it->target());
+    CGAL_NEF_TRACEN("cicle  " << it->sphere_circle());
+    CGAL_NEF_TRACEN("is long " << it->is_long());
+
+    if(it->is_short()) continue;
+
+    CGAL_NEF_TRACEN("not short");
+    CGAL_NEF_TRACEN("circle " << it->sphere_circle());
+    if(it->is_long()) {
+      if((chsp&60)!=60 && 
+         it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60;
+      if((chsp&51)!=51 && 
+         it->sphere_circle().orthogonal_vector().y()!=0) chsp|=51;
+      if((chsp&15)!=15 && 
+         it->sphere_circle().orthogonal_vector().z()!=0) chsp|=15;
+    } else {
+
+      int n = 0;
+      if(it->source().hx()==0) ++n;
+      if(it->source().hy()==0) ++n;
+      if(it->source().hz()==0) ++n;
+      CGAL_assertion(n<3);
+      
+      CGAL_NEF_TRACEN("n " << n);
+      CGAL_NEF_TRACEN("number of coordinats =0:" << n);
+      if(n==0) {
+        if((chsp&60)!=60 && 
+           it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60;
+        if((chsp&51)!=51 && 
+           it->sphere_circle().orthogonal_vector().y()!=0) chsp|=51;
+        if((chsp&15)!=15 && 
+           it->sphere_circle().orthogonal_vector().z()!=0) chsp|=15;
+      } else if(n==1) {
+        if((chsp&48)!=48 && it->source().z()==0) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if(i.z() > 0) chsp|=16;
+          else if(i.z() < 0) chsp|=32;
+        } else if((chsp&3)!=3 && it->source().x()==0) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if(i.x() > 0) chsp|=1;
+          else if(i.x() < 0) chsp|=2;
+        } else if((chsp&12)!=12) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if(i.y() > 0) chsp|=4;
+          else if(i.y() < 0) chsp|=8;
+        }
+      } else { // n==2
+        if((chsp&60)!=60 && it->source().x()!=0) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(1,0,0));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if((chsp&12)!=12)
+            if(i.y() > 0) chsp|=4;
+            else if(i.y() < 0) chsp|=8;
+          if((chsp&48)!=48)
+            if(i.z() > 0) chsp|=16;
+            else if(i.z() < 0) chsp|=32;
+	} else if((chsp&51)!=51 && it->source().y()!=0) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if((chsp&3)!=3)
+            if(i.x() > 0) chsp|=1;
+            else if(i.x() < 0) chsp|=2;
+	  if((chsp&48)!=48)
+	    if(i.z() > 0) chsp|=16;
+            else if(i.z() < 0) chsp|=32;
+        } else if((chsp&15)!=15 && it->source().z()!=0) {
+          Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,0,1));
+          CGAL_NEF_TRACEN("intersection " << i);
+          if(!it->has_on_after_intersection(i)) i=i.antipode();
+          if((chsp&3)!=3)
+            if(i.x() > 0) chsp|=1;
+            else if(i.x() < 0) chsp|=2;
+	  if((chsp&12)!=12)
+            if(i.y() > 0) chsp|=4;
+            else if(i.y() < 0) chsp|=8;
+        }          
+      }
+    }
+  }
+
+  CGAL_NEF_TRACEN("chsp " << chsp);
+
+  compute_halfsphere[0][0] = (chsp&1)==1;
+  compute_halfsphere[0][1] = (chsp&2)==2;
+  compute_halfsphere[1][0] = (chsp&4)==4;
+  compute_halfsphere[1][1] = (chsp&8)==8;
+  compute_halfsphere[2][0] = (chsp&16)==16;
+  compute_halfsphere[2][1] = (chsp&32)==32;
+
+  if((chsp&1)==0) { 
+      compute_halfsphere[0][1]=true;
+      return 0;
+  }
+  if((chsp&2)==0) {
+      compute_halfsphere[0][0]=true;
+      return 1;
+  }
+  if((chsp&4)==0) { 
+      compute_halfsphere[1][1]=true;
+      return 2;
+  }
+  if((chsp&8)==0) {
+      compute_halfsphere[1][0]=true;
+      return 3;
+  }
+  if((chsp&16)==0) { 
+      compute_halfsphere[2][1]=true; 
+      return 4;
+  }
+  if((chsp&32)==0) { 
+      compute_halfsphere[2][0]=true;
+      return 5;
+  }
+
+  return -1;
+}
+#else
+template <typename Map>
+int SM_overlayer<Map>::
+check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
+
+  for(int i=0; i<6; i++)
+    compute_halfsphere[i/2][i%2] = false;  
+
+  CGAL_NEF_TRACEN("compute_halfsphere (at begin)");
+  for(int i=0; i<6; ++i)
+    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
+
+  typename Seg_list::const_iterator it;
+  CGAL_forall_iterators(it,L) {
+    if(!compute_halfsphere[0][0])
+      if(it->source().hx()>0 || it->target().hx()>0)
+	compute_halfsphere[0][0] = true;
+    if(!compute_halfsphere[0][1])
+      if(it->source().hx()<0 || it->target().hx()<0)
+	compute_halfsphere[0][1] = true;    
+    if(!compute_halfsphere[1][0])
+      if(it->source().hy()>0 || it->target().hy()>0)
+	compute_halfsphere[1][0] = true;
+    if(!compute_halfsphere[1][1])
+      if(it->source().hy()<0 || it->target().hy()<0)
+	compute_halfsphere[1][1] = true;    
+    if(!compute_halfsphere[2][0])
+      if(it->source().hz()>0 || it->target().hz()>0)
+	compute_halfsphere[2][0] = true;
+    if(!compute_halfsphere[2][1])
+      if(it->source().hz()<0 || it->target().hz()<0)
+	compute_halfsphere[2][1] = true;    
+  }
+
+  CGAL_NEF_TRACEN("compute_halfsphere (after vertices)");
+  for(int i=0; i<6; ++i)
+    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
+
+
+  if(!compute_halfsphere[2][0]) {
+    CGAL_forall_iterators(it,L) {
+      if((it->source().hz()==0 && it->target().hz()==0) 
+         || it->is_long()) { 
+	compute_halfsphere[2][0] = true;
+	break;
+      }
+    }
+  }
+  
+  if(!compute_halfsphere[2][0]) {
+    compute_halfsphere[2][1] = true;
+    return 4;
+  }
+  
+  if(!compute_halfsphere[2][1]) {
+    CGAL_forall_iterators(it,L) {
+      if(it->is_long() || (it->source().hz()==0 && it->target().hz()==0)) { 
+	compute_halfsphere[2][1] = true;
+	break;
+      }
+    }
+  }
+
+  if(!compute_halfsphere[2][1])
+    return 5;
+
+  if(!compute_halfsphere[0][0]) {
+    CGAL_forall_iterators(it,L) {
+      if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) { 
+	compute_halfsphere[0][0] = true;
+	break;
+      }
+    }
+  }
+
+  if(!compute_halfsphere[0][0]) {
+    compute_halfsphere[0][1] = true;
+    return 0;
+  }
+  
+  if(!compute_halfsphere[0][1]) {
+    CGAL_forall_iterators(it,L) {
+      if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) { 
+	compute_halfsphere[0][1] = true;
+	break;
+      }
+    }
+  }
+
+  if(!compute_halfsphere[0][1])
+    return 1;
+  
+
+  if(!compute_halfsphere[1][0]) {
+    CGAL_forall_iterators(it,L) {
+      if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) { 
+	compute_halfsphere[1][0] = true;
+	break;
+      }
+    }
+  }
+  
+  if(!compute_halfsphere[1][0]) {
+    compute_halfsphere[1][1] = true;
+    return 2;
+  }
+  
+  if(!compute_halfsphere[1][1]) {
+    CGAL_forall_iterators(it,L) {
+      if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) { 
+	compute_halfsphere[1][1] = true;
+	break;
+      }
+    }
+  }
+
+  if(!compute_halfsphere[1][1])
+    return 3;
+  return -1;
+}
+#endif
+
+template <typename Map>
+void SM_overlayer<Map>::
+create(const Sphere_circle& c)
+{ SHalfloop_handle l1 = this->new_shalfloop_pair();
+  SHalfloop_handle l2 = l1->twin();
+  l1->circle() = c; l2->circle() = c.opposite();
+  SFace_handle f1 = this->new_sface();
+  SFace_handle f2 = this->new_sface();
+  link_as_loop(l1,f1);
+  link_as_loop(l2,f2);
+}
+
+template <typename Map>
+void SM_overlayer<Map>::
+subdivide(const Map* M0, const Map* M1, 
+	  bool with_trivial_segments) {
+  PI[0] = SM_const_decorator(M0); 
+  PI[1] = SM_const_decorator(M1);
+  bool compute_halfsphere[3][2];
+  int cs=0;
+
+  Seg_list L;
+  Seg_map  From;
+  for (int i=0; i<2; ++i) {
+    SVertex_const_iterator v;
+    CGAL_forall_svertices(v,PI[i]) {
+      CGAL_NEF_TRACEN(v->point() << " from " << i << " mark " << v->mark());
+      if ( !PI[i].is_isolated(v) ) continue;
+      cs = -1;
+      L.push_back(trivial_segment(PI[i],v));
+      From[--L.end()] = Seg_info(v,i);
+    }
+    SHalfedge_const_iterator e;
+    CGAL_forall_sedges(e,PI[i]) {
+      if ( e->source() == e->target() ) {
+       if(with_trivial_segments) {	 
+	  CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
+          v = e->source();
+          L.push_back(trivial_segment(PI[i],v));
+          From[--L.end()] = Seg_info(v,i);
+        } else {
+	  CGAL_NEF_TRACEN("once around " << e->source()->point());
+          Seg_pair p = two_segments(PI[i],e);
+          L.push_back(p.first);
+          L.push_back(p.second);
+          From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
+        }
+      } else {
+	CGAL_NEF_TRACEN("normal segment " << e->source()->point()
+			<< "->" << e->twin()->source()->point());
+        L.push_back(segment(PI[i],e));
+        From[--L.end()] = Seg_info(e,i);
+      }
+    }
+    if ( PI[i].has_shalfloop() ) {
+      CGAL_NEF_TRACEN("loop ");
+      SHalfloop_const_handle shl = PI[i].shalfloop();
+      Seg_pair p = two_segments(PI[i],shl);
+      L.push_back(p.first); 
+      L.push_back(p.second.opposite());
+      From[--L.end()] = From[--(--L.end())] = 
+        Seg_info(shl,i);
+    }
+  }
+
+  CGAL_assertion_code(typename Seg_list::iterator it);
+  CGAL_assertion_code(CGAL_forall_iterators(it,L) CGAL_NEF_TRACEN("  "<<*it));
+
+#ifdef CGAL_NEF3_SPHERE_SWEEP_OPTIMIZATION_OFF
+  cs = -1;
+  compute_halfsphere[2][0]=true;
+  compute_halfsphere[2][1]=true;
+#else
+  if(cs != -1)
+    cs = check_sphere(L, compute_halfsphere);
+#endif
+
+  CGAL_NEF_TRACEN("compute_halfsphere\n  cs = " << cs);
+  for(int i=0; i<6; ++i)
+    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
+  Seg_list L_pos,L_neg;
+
+  switch(cs) {
+  case 1: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
+			    compute_halfsphere[0][1]);
+    break;
+  case 0:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
+			    compute_halfsphere[0][0]);
+    break;
+  case 3: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,1,0), Sphere_circle(1,0,0),
+			    compute_halfsphere[1][1]);
+    break;
+  case 2:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,-1,0), Sphere_circle(1,0,0), 
+			    compute_halfsphere[1][0]);
+    break;
+  case 5: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,0,1), Sphere_circle(1,0,0),
+			    compute_halfsphere[2][1]);
+    break;
+  case 4:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), 
+			    compute_halfsphere[2][0]);
+    break;
+  case -1:
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
+    break;
+  default: CGAL_error_msg( "wrong value");
+  }
+
+  cs = cs==-1 ? 2 : cs/2;
+
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+  timer_sphere_sweeps.start();
+#endif
+  
+  typedef SMO_from_sm<Self,Seg_iterator,Seg_info> SM_output;
+  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+  
+  typedef CGAL::Segment_overlay_traits< 
+    Seg_iterator, SM_output, PH_geometry>  PHS_traits;
+  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+    
+  typedef CGAL::Segment_overlay_traits< 
+    Seg_iterator, SM_output, NH_geometry> NHS_traits;
+  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  typedef typename PHS_traits::INPUT Input_range;
+
+  SVertex_handle v;
+  SHalfedge_handle e;
+  SM_output O(*this,PI,From); 
+
+  if(compute_halfsphere[cs][0]) {
+    PH_geometry phg(cs);
+    Positive_halfsphere_sweep SP(
+	Input_range(L_pos.begin(),L_pos.end()),O,phg);
+    SP.sweep();
+    v=--this->svertices_end(); e=--this->shalfedges_end();
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+    number_of_sphere_sweeps++;
+#endif
+  }
+
+  if(compute_halfsphere[cs][1]) {
+    NH_geometry nhg(cs);
+    Negative_halfsphere_sweep SM(
+        Input_range(L_neg.begin(),L_neg.end()),O,
+        nhg);
+    SM.sweep();
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+    number_of_sphere_sweeps++;
+#endif
+  }
+
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+  timer_sphere_sweeps.stop();
+#endif
+
+  if(compute_halfsphere[cs][0]) {
+    ++v; 
+    ++e;
+  }
+  else {
+    v = this->svertices_begin(); 
+    e = this->shalfedges_begin();
+  }
+
+  if(compute_halfsphere[cs][0])
+    create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
+                        PH_geometry(cs));
+  if(compute_halfsphere[cs][1])
+    create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
+			NH_geometry(cs));
+
+  CGAL_forall_sedges(e,*this) {
+    e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point()); 
+    e->twin()->circle() = e->circle().opposite();
+    CGAL_NEF_TRACEN(PH(e) << " with circle " << e->circle());
+  }
+
+  std::vector<Mark> mohs(4);
+  SM_point_locator L0(M0);
+  SM_point_locator L1(M1);
+  
+  L0.marks_of_halfspheres(mohs, 0, cs);
+  L1.marks_of_halfspheres(mohs, 2, cs);
+
+  CGAL_NEF_TRACEN("mohs[0]=" << mohs[0]);
+  CGAL_NEF_TRACEN("mohs[1]=" << mohs[1]);
+  CGAL_NEF_TRACEN("mohs[2]=" << mohs[2]);
+  CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
+
+  CGAL_NEF_TRACEN("compute_halfsphrere\n  cs = " << cs << 
+	 "\n  [cs][0] = " << compute_halfsphere[cs][0] <<
+	 "\n  [cs][1] = " << compute_halfsphere[cs][1]);
+  /*
+  SVertex_iterator svii;
+  CGAL_forall_svertices(svii, *this) {
+    SVertex_const_handle vs;
+    SHalfedge_const_handle es;
+    if(CGAL::assign(vs, supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
+    else if(CGAL::assign(es, supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+    if(CGAL::assign(vs, supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
+    else if(CGAL::assign(es, supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+  }
+  */
+  if(compute_halfsphere[cs][0])
+    complete_face_support(this->svertices_begin(), v, O, mohs, 0, 
+			  compute_halfsphere[cs][1]);
+  if(compute_halfsphere[cs][1])
+    complete_face_support(v, this->svertices_end(), O, mohs, 1,
+			  compute_halfsphere[cs][0]);
+
+  complete_sface_marks();
+
+  // DEBUG CODE: to do: have all svertices a halfedge below associated?
+  CGAL_NEF_TRACEN("Vertex info after swep");
+  CGAL_assertion_code(SVertex_iterator svi);
+  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+  CGAL_assertion_code(
+    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
+      CGAL_NEF_TRACEN("vertex "<<svi->point()<<" info "<< info(svi)<< " marks "<<mark(svi,0)<<" "<<mark(svi,1));
+    }
+  )
+  #else
+  CGAL_assertion_code(
+    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
+      CGAL_NEF_TRACEN("vertex "<<svi->point()<< " marks "<<mark(svi,0)<<" "<<mark(svi,1));
+    }
+  )
+  #endif
+  if(compute_halfsphere[cs][0] && compute_halfsphere[cs][1])
+    merge_halfsphere_maps(this->svertices_begin(),v,O);
+  else
+    set_outer_face_mark(compute_halfsphere[cs][1], mohs);
+  
+  CGAL_assertion_code(this->check_integrity_and_topological_planarity());
+  
+  CGAL_NEF_TRACEN("subdivided");
+  CGAL_assertion_code(CGAL_forall_svertices(v,*this) CGAL_NEF_TRACEN(PH(v)));
+}
+
+template <typename Map>
+template <typename Association>
+void SM_overlayer<Map>::
+subdivide(const Map* M0, const Map* M1, 
+	  Association& A, 
+	  bool with_trivial_segments)
+{
+  PI[0] = SM_const_decorator(M0); 
+  PI[1] = SM_const_decorator(M1);
+ 
+  bool compute_halfsphere[3][2];
+  int cs=0;
+
+  Seg_list L;
+  Seg_map  From;
+  for (int i=0; i<2; ++i) {
+    SVertex_const_iterator v;
+    CGAL_forall_svertices(v,PI[i]) {
+      CGAL_NEF_TRACEN(v->point() << " from " << i << " mark " << v->mark());
+      if ( !PI[i].is_isolated(v) ) continue;
+      cs = -1;
+      L.push_back(trivial_segment(PI[i],v));
+      From[--L.end()] = Seg_info(v,i);
+    }
+    SHalfedge_const_iterator e;
+    CGAL_forall_sedges(e,PI[i]) {
+      if ( e->source() == e->target() ) {
+       if(with_trivial_segments) {
+	 CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
+          v = e->source();
+          L.push_back(trivial_segment(PI[i],v));
+          From[--L.end()] = Seg_info(v,i);
+        } else {
+	 CGAL_NEF_TRACEN("once around " << e->source()->point());
+          Seg_pair p = two_segments(PI[i],e);
+          L.push_back(p.first);
+          L.push_back(p.second);
+          From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
+        }
+      } else {
+	CGAL_NEF_TRACEN("normal segment " << e->source()->point());
+        L.push_back(segment(PI[i],e));
+        From[--L.end()] = Seg_info(e,i);
+      }
+    }
+    if ( PI[i].has_shalfloop() ) {
+      cs = -1;
+      CGAL_NEF_TRACEN("loop ");
+      SHalfloop_const_handle shl = PI[i].shalfloop();
+      Seg_pair p = two_segments(PI[i],shl);
+      L.push_back(p.first); 
+      L.push_back(p.second.opposite());
+      From[--L.end()] = From[--(--L.end())] = 
+        Seg_info(shl,i);
+    }
+  }
+
+  CGAL_assertion_code(typename Seg_list::iterator it);
+  CGAL_assertion_code(CGAL_forall_iterators(it,L) CGAL_NEF_TRACEN("  "<<*it));
+
+#ifdef CGAL_NEF3_SPHERE_SWEEP_OPTIMIZATION_OFF
+  cs = -1;
+#endif
+  if(cs != -1)
+    cs = check_sphere(L, compute_halfsphere);
+  else {
+    compute_halfsphere[2][0]=true;
+    compute_halfsphere[2][1]=true;
+  }
+
+  CGAL_NEF_TRACEN("compute_halfsphere\n  cs = " << cs);
+  for(int i=0; i<6; ++i)
+    CGAL_NEF_TRACEN("  " << i << " : " << compute_halfsphere[i/2][i%2]);
+  Seg_list L_pos,L_neg;
+
+  switch(cs) {
+  case 1: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
+			    compute_halfsphere[0][1]);
+    break;
+  case 0:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
+			    compute_halfsphere[0][0]);
+    break;
+  case 3: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,1,0), Sphere_circle(1,0,0),
+			    compute_halfsphere[1][1]);
+    break;
+  case 2:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,-1,0), Sphere_circle(1,0,0), 
+			    compute_halfsphere[1][0]);
+    break;
+  case 5: 
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,0,1), Sphere_circle(1,0,0),
+			    compute_halfsphere[2][1]);
+    break;
+  case 4:
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), 
+			    compute_halfsphere[2][0]);
+    break;
+  case -1:
+    partition_to_halfsphere(L.begin(), L.end(), L_pos, From, 
+			    Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
+    partition_to_halfsphere(L.begin(), L.end(), L_neg, From, 
+			    Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
+    break;
+  default: CGAL_error_msg( "wrong value");
+  }
+
+  cs = cs==-1 ? 2 : cs/2;
+
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+  timer_sphere_sweeps.start();
+#endif
+  
+  typedef SMO_from_sm<Self,Seg_iterator,Seg_info> SM_output;
+  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+  
+  typedef CGAL::Segment_overlay_traits< 
+    Seg_iterator, SM_output, PH_geometry>  PHS_traits;
+  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+    
+  typedef CGAL::Segment_overlay_traits< 
+    Seg_iterator, SM_output, NH_geometry> NHS_traits;
+  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  typedef typename PHS_traits::INPUT Input_range;
+
+  SVertex_handle v;
+  SHalfedge_handle e;
+  SM_output O(*this,PI,From); 
+
+  if(compute_halfsphere[cs][0]) {
+    PH_geometry phg(cs);
+
+    /*   
+    // the following is only needed for indexed items
+    SHalfedge_const_handle se;
+    SHalfloop_const_handle sl;
+    for(Seg_iterator it=L_pos.begin(); it!=L_pos.end();++it) {
+      CGAL_NEF_TRACEN("pos " << *it);
+      if(phg.compare_xy(it->target(),it->source())<0) {
+	Object_handle o = From[it]._o;
+	if(CGAL::assign(se, o)) {
+	  if(it->sphere_circle() == se->circle())
+	    From[it] = Seg_info(se->twin(), From[it]._from);
+	} else if(CGAL::assign(sl, o)) {
+	  if(it->sphere_circle() == sl->circle())
+	    From[it] = Seg_info(sl->twin(), From[it]._from);
+	}
+      }
+    }
+ */
+
+    Positive_halfsphere_sweep SP(
+	Input_range(L_pos.begin(),L_pos.end()),O,phg);
+    SP.sweep();
+    v=--this->svertices_end(); e=--this->shalfedges_end();
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+    number_of_sphere_sweeps++;
+#endif
+  }
+
+  if(compute_halfsphere[cs][1]) {
+    NH_geometry nhg(cs);
+
+    /*
+    SHalfedge_const_handle se;
+    SHalfloop_const_handle sl;
+    for(Seg_iterator it=L_neg.begin(); it!=L_neg.end();++it) {
+      CGAL_NEF_TRACEN("neg " << *it);
+      if(nhg.compare_xy(it->target(),it->source())<0) {
+	Object_handle o = From[it]._o;
+	if(CGAL::assign(se, o)) {
+	  if(it->sphere_circle() == se->circle())
+	    From[it] = Seg_info(se->twin(), From[it]._from);
+	} else if(CGAL::assign(sl, o)) {
+	  if(it->sphere_circle() == sl->circle())
+	  From[it] = Seg_info(sl->twin(), From[it]._from);
+	}
+      }
+    }
+    */
+
+    Negative_halfsphere_sweep SM(
+        Input_range(L_neg.begin(),L_neg.end()),O,
+        nhg);
+    SM.sweep();
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+    number_of_sphere_sweeps++;
+#endif
+  }
+
+#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
+  timer_sphere_sweeps.stop();
+#endif
+
+  if(compute_halfsphere[cs][0]) {
+    ++v; 
+    ++e;
+  }
+  else {
+    v = this->svertices_begin(); 
+    e = this->shalfedges_begin();
+  }
+
+  if(compute_halfsphere[cs][0])
+    create_face_objects(this->shalfedges_begin(), e, this->svertices_begin(), v, O,
+                        PH_geometry(cs));
+  if(compute_halfsphere[cs][1])
+    create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
+			NH_geometry(cs));
+
+  CGAL_forall_sedges(e,*this) {
+    e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point()); 
+    e->twin()->circle() = e->circle().opposite();
+    CGAL_NEF_TRACEN(PH(e) << " with circle " << e->circle());
+  }
+
+  std::vector<Mark> mohs(4);
+  SM_point_locator L0(M0);
+  SM_point_locator L1(M1);
+  
+  L0.marks_of_halfspheres(mohs, 0, cs);
+  L1.marks_of_halfspheres(mohs, 2, cs);
+
+  CGAL_NEF_TRACEN("mohs[0]=" << mohs[0]);
+  CGAL_NEF_TRACEN("mohs[1]=" << mohs[1]);
+  CGAL_NEF_TRACEN("mohs[2]=" << mohs[2]);
+  CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
+
+  CGAL_NEF_TRACEN("compute_halfsphrere\n  cs = " << cs << 
+	 "\n  [cs][0] = " << compute_halfsphere[cs][0] <<
+	 "\n  [cs][1] = " << compute_halfsphere[cs][1]);
+  /*
+  SVertex_iterator svii;
+  CGAL_forall_svertices(svii, *this) {
+    SVertex_const_handle vs;
+    SHalfedge_const_handle es;
+    if(CGAL::assign(vs, supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
+    else if(CGAL::assign(es, supp_object(svii,0)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+    if(CGAL::assign(vs, supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by svertex " << vs->point() << std::endl;
+    else if(CGAL::assign(es, supp_object(svii,1)))
+      std::cerr << svii->point() << " supported by sedge" << std::endl;
+    else
+      std::cerr << svii->point() << " is neither supported by svertex or sedge" << std::endl;
+  }
+  */
+  if(compute_halfsphere[cs][0])
+    complete_face_support(this->svertices_begin(), v, O, mohs, 0, 
+			  compute_halfsphere[cs][1]);
+  if(compute_halfsphere[cs][1])
+    complete_face_support(v, this->svertices_end(), O, mohs, 1,
+			  compute_halfsphere[cs][0]);
+
+  complete_sface_marks();
+
+  // DEBUG CODE: to do: have all svertices a halfedge below associated?
+  CGAL_NEF_TRACEN("Vertex info after swep");
+  CGAL_assertion_code(SVertex_iterator svi);
+  #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+  CGAL_assertion_code(
+    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
+        CGAL_NEF_TRACEN("vertex "<<svi->point() <<" info "<<info(svi) << " marks "<<mark(svi,0)<<" "<<mark(svi,1));
+    }
+  )
+  #else
+  CGAL_assertion_code(
+    for(svi=this->svertices_begin(); svi!=this->svertices_end(); svi++) {
+        CGAL_NEF_TRACEN("vertex "<<svi->point() << " marks "<<mark(svi,0)<<" "<<mark(svi,1));
+    }
+  )
+  #endif
+
+
+  transfer_data(A);
+
+  if(compute_halfsphere[cs][0] && compute_halfsphere[cs][1])
+    merge_halfsphere_maps(this->svertices_begin(),v,O);
+  else
+    set_outer_face_mark(compute_halfsphere[cs][1], mohs);
+  
+  CGAL_assertion_code(this->check_integrity_and_topological_planarity());
+  
+  CGAL_NEF_TRACEN("subdivided");
+  CGAL_assertion_code(CGAL_forall_svertices(v,*this) CGAL_NEF_TRACEN(PH(v)));
+}
+
+template <typename Map>
+template <typename Association>
+void SM_overlayer<Map>::
+transfer_data(Association& A) {
+
+  SVertex_iterator sv;
+  SHalfedge_handle se;
+  SVertex_const_handle sv0,sv1;
+  SHalfedge_const_handle se0, se1;
+  SHalfloop_const_handle sl0, sl1;
+
+  CGAL_forall_svertices(sv, *this) {
+    //    std::cerr << "svertex " << sv->point() << std::endl;
+    Object_handle o0 = supp_object(sv,0), o1 = supp_object(sv,1);
+    if(o0.empty()) {
+      if(CGAL::assign(sv1, o1))
+	A.handle_support(sv, sv1);
+      else
+	continue;
+    } else if(CGAL::assign(se0, o0)) {
+      if(o1.empty()) 
+	continue;
+      else if(assign(se1, o1))
+	A.handle_support(sv, se0, se1);
+      else if(CGAL::assign(sv1, o1))
+	A.handle_support(sv, se0, sv1);
+      else if(CGAL::assign(sl1, o1))
+	A.handle_support(sv, se0, sl1);
+      else
+	CGAL_error_msg( "wrong handle");
+    } else if(CGAL::assign(sv0, o0)) {
+      if(o1.empty())
+	A.handle_support(sv, sv0);
+      else if(CGAL::assign(se1, o1))
+	A.handle_support(sv, sv0, se1);
+      else if(CGAL::assign(sv1, o1))
+	A.handle_support(sv, sv0, sv1);
+      else if(CGAL::assign(sl1, o1))
+	A.handle_support(sv, sv0, sl1);
+      else
+	CGAL_error_msg( "wrong handle");
+    } else if(CGAL::assign(sl0, o0)) {
+      if(o1.empty())
+	continue;
+      else if(CGAL::assign(sv1, o1))
+	A.handle_support(sv, sl0, sv1);
+      else if(CGAL::assign(se1, o1))
+	A.handle_support(sv, sl0, se1);
+      else if(CGAL::assign(sl1, o1))
+	A.handle_support(sv, sl0, sl1);
+    } else 
+      CGAL_error_msg( "wrong handle");
+  }
+
+  CGAL_forall_sedges(se, *this) {
+    CGAL_assertion(is_forward(se));
+    Object_handle o0 = supp_object(se,0), o1 = supp_object(se,1);   
+    if(o0.empty()) {
+      if(assign(se1, o1))
+	A.handle_support(se, se1);
+      else if(assign(sl1, o1))
+	A.handle_support(se, sl1);
+      else
+	continue; // CGAL_error_msg( "wrong handle");
+    } else if(assign(se0, o0)) {
+      if(o1.empty())
+	A.handle_support(se, se0);
+      else if(assign(se1, o1))
+	A.handle_support(se, se0, se1);
+      else if(assign(sl1, o1))
+	A.handle_support(se, se0, sl1);
+      else
+	CGAL_error_msg( "wrong handle");    
+    } else if(assign(sl0, o0)) {
+      if(o1.empty())
+	A.handle_support(se, sl0);
+      else if(assign(se1, o1))
+	A.handle_support(se, sl0, se1);
+      else if(assign(sl1, o1))
+	A.handle_support(se, sl0, sl1);
+      else
+	CGAL_error_msg( "wrong handle");
+    } else
+      CGAL_error_msg( "wrong handle");	      
+  }
+}
+
+template <typename Map>
+void SM_overlayer<Map>::
+set_outer_face_mark(int offset, const std::vector<Mark>& mohs) {
+
+  SFace_handle sf = this->new_sface();
+  assoc_info(sf);
+  mark(sf, 0) = mohs[offset];
+  mark(sf, 1) = mohs[offset+2];
+
+  SHalfedge_iterator e;
+  CGAL_forall_shalfedges(e, *this) {
+    if ( e->incident_sface() != SFace_handle() ) continue;
+    link_as_face_cycle(e,sf); 
+  }
+  
+  SVertex_handle v;
+  CGAL_forall_svertices(v, *this) {
+    if(!is_isolated(v) || v->incident_sface() != SFace_handle()) continue;
+    link_as_isolated_vertex(v,sf);
+  }
+}
+
+template <typename Map>
+template <typename Iterator, typename T>
+void SM_overlayer<Map>::
+partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L, 
+			CGAL::Unique_hash_map<Iterator,T>& M, 
+			Sphere_circle xycircle, Sphere_circle yzcircle, 
+			bool include_equator) const
+{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
+//  CGAL_assertion(pos!=0);
+  Sphere_segment s1,s2;
+  //  Sphere_circle xycircle(0,0,pos);
+  if(include_equator) {
+    while ( start != beyond) {
+      int i = start->intersection(xycircle,s1,s2);
+      CGAL_NEF_TRACEN("segment " << start->source() << " " << start->target());
+      if (i>1) { 
+	L.push_back(s2); M[--L.end()] = M[start];    
+	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
+      }
+      if (i>0) { 
+	L.push_back(s1); M[--L.end()] = M[start];    
+	CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target()); 
+      }
+      ++start;
+    }
+  }
+  else {
+    while(start != beyond) {
+      L.push_back(*start);
+      M[--L.end()] = M[start];
+      ++start;
+    }
+  }
+
+  // now all segments are split into hemispheres
+  // we still have to:
+  // - split segments containing our special poles y^-, y^+
+  // - split halfcircles
+  // - add four equator segments 
+
+  //  Sphere_circle yzcircle(1,0,0);
+  typename Seg_list::iterator it, itl;
+  
+  CGAL_forall_iterators(it,L) { CGAL_NEF_TRACEN("  "<<*it);
+    if ( equal_as_sets(it->sphere_circle(),xycircle) ) {
+      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
+      bool added=false;
+      int n1 =  it->intersection(yzcircle,s1,s2);
+      if (n1 > 1 && !s2.is_degenerate()) { 
+	M[ L.insert(it,s2) ] = M[it]; 
+	added=true; 
+	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
+      }
+      if (n1 > 0 && !s1.is_degenerate()) { 
+	M[ L.insert(it,s1) ] = M[it]; 
+	added = true; 
+	CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target()); 
+      }
+      int n2 =  it->intersection(yzcircle.opposite(),s1,s2);
+      if (n2 > 1 && !s2.is_degenerate()) { 
+	M[ L.insert(it,s2) ] = M[it]; 
+	added=true; 
+	CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target()); 
+      }
+      if (n2 > 0 && !s1.is_degenerate()) { 
+	M[ L.insert(it,s1) ] = M[it]; 
+	added=true; 
+	CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target()); 
+      }
+      if(added) {
+	itl = it; --it; M[itl] = T(); L.erase(itl);
+      }
+      // at least one item was appended
+    }
+  }
+
+  CGAL_forall_iterators(it,L) {
+    if ( it->is_halfcircle() ) {
+      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
+      Sphere_segment s1,s2;
+      it->split_halfcircle(s1,s2);
+      CGAL_NEF_TRACEN("    into " << s1);
+      CGAL_NEF_TRACEN("    into " << s2);
+      *it = s2; 
+      M[ L.insert(it,s1) ] = M[it];
+    }
+  }
+
+  if(include_equator) {
+    // append 4 xy-equator segments:
+    Sphere_point S(0,-1,0),N(0,1,0);
+    Sphere_segment sp(S,N,xycircle);
+    Sphere_segment sm(S,N,xycircle.opposite());
+    Sphere_segment s[4];
+    sp.split_halfcircle(s[0],s[1]);
+    sm.split_halfcircle(s[2],s[3]);
+    L.insert(L.end(),s,s+4);
+  }
+}
+
+template <typename Map>
+template <typename Below_accessor, typename Halfsphere_geometry>
+void SM_overlayer<Map>::
+create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
+  SVertex_iterator v_start, SVertex_iterator v_end,
+  const Below_accessor& D, 
+  const Halfsphere_geometry& SG)
+{
+  CGAL_NEF_TRACEN("create_face_objects()");
+  if(e_start != e_end) {
+    CGAL::Unique_hash_map<SHalfedge_handle,int> SFaceCycle(-1);
+    std::vector<SHalfedge_handle>  MinimalSHalfedge;
+    SHalfedge_around_sface_circulator hfc(last_out_edge(v_start)),hend(hfc);
+    CGAL_NEF_TRACEN("equator cycle "<<PH(hfc));
+    CGAL_For_all(hfc,hend) SFaceCycle[hfc]=0; // outer face cycle = 0
+    MinimalSHalfedge.push_back(first_out_edge(v_start)->twin());
+    int i=1; 
+    for (SHalfedge_iterator e = e_start; e != e_end; ++e) {
+      if ( SFaceCycle[e] >= 0 ) continue; // already assigned
+      SHalfedge_around_sface_circulator hfc(e),hend(hfc);
+      SHalfedge_handle e_min = e;
+      CGAL_NEF_TRACEN(""); 
+      CGAL_NEF_TRACEN("  face cycle numbering "<<i);
+      CGAL_For_all(hfc,hend) {
+	SFaceCycle[hfc]=i; // assign face cycle number
+	if (hfc->twin()->source() == e_min->twin()->source()) {
+	  Sphere_point p1 = hfc->source()->point(), 
+	    p2 = hfc->twin()->source()->point(), 
+	    p3 = hfc->snext()->twin()->source()->point();	  
+	  if ( SG.orientation(p1,p2,p3) <= 0 )
+	    e_min = hfc;
+	} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
+	  e_min = hfc;    
+	CGAL_NEF_TRACEN(PH(hfc));
+      } CGAL_NEF_TRACEN("");
+      MinimalSHalfedge.push_back(e_min);
+      ++i;
+    }
+    
+    for (int j=1; j<i; ++j) {
+      SHalfedge_handle e = MinimalSHalfedge[j];
+      CGAL_NEF_TRACEN("  face cycle "<<j<<" minimal halfedge "<<PH(e));
+      Sphere_point p1 = e->source()->point(), 
+	p2 = e->twin()->source()->point(), 
+	p3 = e->snext()->twin()->source()->point();
+      if ( SG.orientation(p1,p2,p3) > 0 ) { // left_turn => outer face cycle
+	SFace_handle f = this->new_sface();
+	link_as_face_cycle(e,f);
+	CGAL_NEF_TRACEN("  creating new face object "<<&*f<<" bd "<<&*e);
+      }
+    }
+    
+    for (SHalfedge_iterator e = e_start; e != e_end; ++e) {
+      if ( e->incident_sface() != SFace_handle() ) continue;
+      if ( SFaceCycle[e] == 0 ) continue;
+      CGAL_NEF_TRACEN("linking hole "<<PH(e));
+      SFace_handle f = determine_face(e,MinimalSHalfedge,SFaceCycle,D);
+      if(f != SFace_handle())
+	link_as_face_cycle(e,f);
+    }
+  }    
+
+  for (SVertex_iterator v = v_start; v != v_end; ++v) {
+    if ( !is_isolated(v) ) continue;
+    SHalfedge_handle e_below = D.halfedge_below(v);
+    CGAL_assertion( e_below != SHalfedge_handle() || e_start == e_end );
+    if(e_below != SHalfedge_handle())
+      link_as_isolated_vertex(v,e_below->incident_sface());
+  }
+
+}
+
+template <typename Map>
+template <typename Below_accessor>
+void SM_overlayer<Map>::
+complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
+  const Below_accessor& , std::vector<Mark>& mohs, int offset, bool both) const
+{ CGAL_NEF_TRACEN("complete_face_support");
+  for (SVertex_iterator v = v_start; v != v_end; ++v) { 
+    CGAL_NEF_TRACEN("VERTEX = "<<PH(v));
+    Mark m_buffer[2];
+    SHalfedge_handle e_below = halfedge_below(v);
+    if ( v == v_start ) {     
+      for (int i=0; i<2; ++i){
+	m_buffer[i] = mohs[offset+2*i];
+      } 
+    } else if ( e_below != SHalfedge_handle() ) {
+      for (int i=0; i<2; ++i) {
+	CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
+	m_buffer[i] = incident_mark(e_below,i);
+      }
+    } else { // e_below does not exist
+      //      CGAL_assertion( v->point().hz() == 0 && 
+      //		   ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
+      if(!is_isolated(v)) {
+	if(!both) {
+	  for (int i=0; i<2; ++i)
+	    m_buffer[i] = mohs[offset+2*i];	
+	  CGAL_NEF_TRACEN("no edge below ");
+	} else {
+	  for (int i=0; i<2; ++i) 
+	    m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
+	}
+      }
+    } CGAL_NEF_TRACEN(" faces right-below "<<m_buffer[0]<<" "<<m_buffer[1]);
+
+    for (int i=0; i<2; ++i) {
+      Object_handle o = supp_object(v,i);
+      if ( o.empty() ) { 
+	CGAL_NEF_TRACEN("no vertex support"); 
+	mark(v,i) = m_buffer[i]; continue; 
+      }
+      SVertex_const_handle vs;
+      SHalfedge_const_handle es;
+      SHalfloop_const_handle ls;
+      if ( CGAL::assign(vs,o) ) { 
+	CGAL_NEF_TRACEN("support by svertex");
+	mark(v,i) = vs->mark(); continue; 
+      }
+      if ( CGAL::assign(es,supp_object(v,i)) ) {
+	CGAL_NEF_TRACEN("support by sedge");
+        if ( es->source()->point() == v->point() ) 
+	  { mark(v,i) = es->source()->mark(); continue; }
+        if ( es->target()->point() == v->point() ) 
+	  { mark(v,i) = es->target()->mark(); continue; }
+        mark(v,i) = es->mark(); continue;
+      }
+      if ( CGAL::assign(ls,o) ) { 
+	mark(v,i) = ls->mark(); 
+	CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
+      CGAL_error_msg("wrong handle");
+    } CGAL_NEF_TRACEN(" vertex marks "<<mark(v,0)<<" "<<mark(v,1));
+
+    if ( is_isolated(v) ) continue;
+    SHalfedge_around_svertex_circulator e(first_out_edge(v)), hend(e);
+    CGAL_For_all(e,hend) {
+      if ( !is_forward(e) ) break;
+      CGAL_NEF_TRACEN("  forward edge "<<PH(e));
+      for (int i=0; i<2; ++i) {
+        if ( ! supp_object(e,i).empty() ) {
+          SHalfedge_const_handle ei; 
+          if ( CGAL::assign(ei,supp_object(e,i)) ) { 
+            if (!equal_not_opposite(ei->circle(),e->circle())) 
+	      ei = ei->twin();
+            CGAL_assertion( ei->circle() == e->circle() ); 
+            CGAL_NEF_TRACEN("  supporting edge "<<i<<" "<<PH(ei));
+            incident_mark(e->twin(),i) =
+              ei->twin()->incident_sface()->mark();
+            mark(e,i) = mark(e->twin(),i) = ei->mark();
+            incident_mark(e,i) = m_buffer[i] =
+              ei->incident_sface()->mark(); 
+          }
+          SHalfloop_const_handle li;
+          if ( CGAL::assign(li,supp_object(e,i)) ) { 
+	    if (!equal_not_opposite(li->circle(),e->circle())) 
+	      li = li->twin();
+	    CGAL_assertion( li->circle() == e->circle() ); 
+	    CGAL_NEF_TRACEN("  supporting loop "<<i<<" "<<PH(li));
+	    incident_mark(e->twin(),i) =
+	      li->twin()->incident_sface()->mark();
+	    mark(e,i) = mark(e->twin(),i) = li->mark();
+	    incident_mark(e,i) = m_buffer[i] =
+	      li->incident_sface()->mark(); 
+          }
+        } else { CGAL_NEF_TRACEN("  support from face below "<<i);
+	  incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
+          incident_mark(e,i) = m_buffer[i];
+        }
+      } CGAL_NEF_TRACEN("  face marks "<<m_buffer[0]<<" "<<m_buffer[1]);
+    }
+
+    CGAL_NEF_TRACEN(" mark of "<<PH(v)<<" "<<mark(v,0)<<" "<<mark(v,1));
+  }
+}
+
+template <typename Map>
+void SM_overlayer<Map>::complete_sface_marks() const {
+  SFace_iterator f;
+  for (f = this->sfaces_begin(); f != this->sfaces_end(); ++f) {
+    assoc_info(f);
+    SFace_cycle_iterator boundary_object(f->sface_cycles_begin());
+    if (!boundary_object.is_shalfedge() ) 
+      CGAL_error_msg("Outer face cycle should be first.");
+    SHalfedge_handle e(boundary_object);
+    for (int i=0; i<2; ++i) mark(f,i) = incident_mark(e,i);
+  }
+}
+
+template <typename Map>
+template <typename Mark_accessor>
+void SM_overlayer<Map>::
+merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2,
+  const Mark_accessor& D)
+{
+  SVertex_handle v1 = e1->source(), v2 = e2->target();
+  CGAL_NEF_TRACEN("merge_nodes "<<PH(v1)<<PH(v2));
+  CGAL_assertion(v1->point()==v2->point());
+  SHalfedge_handle ep1 = e1->sprev(), en2 = e2->snext();
+  SHalfedge_around_svertex_circulator eav(out_edges(v2)),ee(eav);
+  CGAL_For_all(eav,ee) { set_source(eav,v1); }
+  link_as_prev_next_pair(e2,e1);  
+  link_as_prev_next_pair(ep1,en2); 
+  D.assert_equal_marks(v1,v2);
+  D.discard_info(v2);
+  delete_vertex_only(v2);
+}
+
+template <typename Map>
+template <typename Mark_accessor>
+void SM_overlayer<Map>::
+merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2,
+  const Mark_accessor& D)
+{ CGAL_NEF_TRACEN("merging halfspheres "<<PH(v1)<<PH(v2));
+  CGAL_assertion(v1->point()==v2->point());
+  std::list<SHalfedge_pair> L_equator;
+  SHalfedge_around_sface_circulator 
+    ep(last_out_edge(v1)), en(first_out_edge(v2)->twin());
+  do { 
+   L_equator.push_back(SHalfedge_pair(ep,en));
+   merge_nodes(ep,en,D); ++ep; --en; 
+  } while ( ep->source() != v1 );
+  
+  typename std::list<SHalfedge_pair>::iterator it;
+  CGAL_forall_iterators(it,L_equator) { 
+    SHalfedge_handle e1 = it->first, e2 = it->second;
+    SHalfedge_handle e1t = e1->twin(), e2t = e2->twin();
+    CGAL_NEF_TRACEV(PH(e1));CGAL_NEF_TRACEV(PH(e2));
+    SHalfedge_handle e2tp = e2t->sprev();
+    SHalfedge_handle e2tn = e2t->snext();
+    link_as_prev_next_pair(e2tp,e1);
+    link_as_prev_next_pair(e1,e2tn);
+    SFace_handle f = e2t->incident_sface();
+    if ( is_sm_boundary_object(e2t) )
+    { undo_sm_boundary_object(e2t,f); store_sm_boundary_object(e1,f); }
+    set_face(e1,f);
+    if ( e2 == first_out_edge(e2->source()) )
+      set_first_out_edge(e2->source(),e1t);
+    D.discard_info(e2);
+    delete_edge_pair_only(e2);
+  }
+}
+
+template <typename Map>
+template <typename Selection>
+void SM_overlayer<Map>::
+select(const Selection& SP) const
+{ 
+  SVertex_iterator v;
+  CGAL_forall_svertices(v,*this) {
+    v->mark() = SP(mark(v,0),mark(v,1));
+    discard_info(v); 
+  }
+  SHalfedge_iterator e;
+  CGAL_forall_sedges(e,*this) {
+    e->mark() = SP(mark(e,0),mark(e,1));
+    e->twin()->mark() = SP(mark(e->twin(),0),mark(e->twin(),1));
+    CGAL_assertion(e->mark() == e->twin()->mark());
+    discard_info(e);
+  }
+  SFace_iterator f;
+  CGAL_forall_sfaces(f,*this) {
+    f->mark() = SP(mark(f,0),mark(f,1));
+    discard_info(f);
+  }
+
+}
+
+template <typename Map>
+void SM_overlayer<Map>::simplify()
+{
+  CGAL_NEF_TRACEN("simplifying"); 
+
+  typedef typename CGAL::Union_find<SFace_handle>::handle Union_find_handle;
+  CGAL::Unique_hash_map< SFace_handle, Union_find_handle> Pitem(NULL);
+  CGAL::Unique_hash_map< SVertex_handle, Union_find_handle> Vitem(NULL);
+  CGAL::Union_find< SFace_handle> UF;
+  
+  SFace_iterator f;
+  CGAL_forall_sfaces(f,*this) {
+     Pitem[f] = UF.make_set(f);
+     clear_face_cycle_entries(f);
+  }
+
+  if ( this->has_shalfloop() ) {
+    SHalfloop_handle l = this->shalfloop();
+    SFace_handle f = *(UF.find(Pitem[l->incident_sface()]));
+    link_as_loop(l,f);
+    f = *(UF.find(Pitem[l->twin()->incident_sface()]));
+    link_as_loop(l->twin(),f);
+  }
+
+  SHalfedge_iterator e, en;
+  for(e = this->shalfedges_begin(); e != this->shalfedges_end(); e = en) { 
+    en = e; ++en; if ( en==e->twin() ) ++en;
+    CGAL_NEF_TRACEN("can simplify ? " << PH(e));
+    CGAL_NEF_TRACEN(e->mark() << " " << 
+		    e->incident_sface()->mark() << " " << 
+		    e->twin()->incident_sface()->mark());
+    if (( e->mark() == e->incident_sface()->mark() && 
+	  e->mark() == e->twin()->incident_sface()->mark())){
+      CGAL_NEF_TRACEN("deleting "<<PH(e));
+      if ( !UF.same_set(Pitem[e->incident_sface()],
+			Pitem[e->twin()->incident_sface()]) ) {
+	
+	UF.unify_sets( Pitem[e->incident_sface()],
+		       Pitem[e->twin()->incident_sface()] );
+	CGAL_NEF_TRACEN("unioning disjoint faces");
+      }
+      
+      CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) << 
+	     " " << is_closed_at_source(e->twin()));
+      
+      if ( is_closed_at_source(e) )
+	Vitem[e->source()] = Pitem[e->incident_sface()];
+      
+      if ( is_closed_at_source(e->twin()))
+	Vitem[e->target()] = Pitem[e->incident_sface()];
+      
+      delete_edge_pair(e);
+    }
+  }
+
+  CGAL::Unique_hash_map<SHalfedge_handle,bool> linked(false);
+  for (e = this->shalfedges_begin(); e != this->shalfedges_end(); ++e) {
+    if ( linked[e] ) continue;
+    SHalfedge_around_sface_circulator hfc(e),hend(hfc);
+    SFace_handle f = *(UF.find( Pitem[e->incident_sface()]));
+    CGAL_For_all(hfc,hend) {  set_face(hfc,f); linked[hfc]=true; }
+    store_sm_boundary_object(e,f);
+  }
+
+  SVertex_iterator v,vn;
+  for(v = this->svertices_begin(); v != this->svertices_end(); v=vn) {
+    vn=v; ++vn;
+    if ( is_isolated(v) ) {
+    
+      if(Vitem[v] != NULL) {
+	set_face(v,*(UF.find(Vitem[v])));
+	CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
+      }
+      else {
+	set_face(v, *(UF.find(Pitem[v->incident_sface()])));
+	CGAL_NEF_TRACEN("isolated svertex " << PH(v) << 
+	       " already has incident face " << &*(v->incident_sface()));
+      }
+
+      if ( v->mark() == v->incident_sface()->mark() ) {
+        CGAL_NEF_TRACEN("removing isolated vertex"<<PH(v));
+        delete_vertex_only(v);  
+      } 
+      else 
+        store_sm_boundary_object(v,v->incident_sface()); // isolated, but should stay
+    } else { // v not isolated
+      SHalfedge_handle e2 = first_out_edge(v), e1 = e2->sprev();
+      if ( has_outdeg_two(v) &&
+           v->mark() == e1->mark() && v->mark() == e2->mark() &&
+           e1->circle() == e2->circle() ) {
+        CGAL_NEF_TRACEN("collinear at "<<PH(v)<<PH(e1)<<PH(e2));
+        if ( e1 == e2 ){ CGAL_NEF_TRACEN("edge_to_loop"); convert_edge_to_loop(e1);}
+        else {CGAL_NEF_TRACEN("merge_edge_pairs"); merge_edge_pairs_at_target(e1); } 
+      }
+    }
+  }
+
+  SFace_iterator fn;
+  for (f = fn = this->sfaces_begin(); f != this->sfaces_end(); f=fn) { 
+    ++fn;
+    Union_find_handle pit = Pitem[f];
+    if ( UF.find(pit) != pit ) {
+      CGAL_NEF_TRACEN("delete face " << &*f);
+      delete_face_only(f);
+    }
+  }
+}
+
+template <typename Map>
+template <typename Iterator>
+void SM_overlayer<Map>::
+subdivide_segments(Iterator start, Iterator end) const
+{
+typedef SMO_decorator<SM_decorator,Iterator> SM_output;
+typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+typedef CGAL::Segment_overlay_traits< 
+          Iterator, SM_output, PH_geometry>  PHS_traits;
+typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+
+typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+typedef CGAL::Segment_overlay_traits< 
+          Iterator, SM_output, NH_geometry> NHS_traits;
+typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  std::list<Sphere_segment> Lp,Lm;
+  partition_xy( start, end, Lp , +1);
+  partition_xy( start, end, Lm , -1);
+  // both lists initialized with four quarter segments
+  // supporting the xy-equator thereby separating the 
+  // two halfspheres 
+  // all other segments in the range are split into their
+  // connected components with respect to the xy-plane.
+
+  SVertex_handle v1,v2;
+  SM_output O(*this); 
+  typedef typename PHS_traits::INPUT Input_range;
+  Positive_halfsphere_sweep SP(Input_range(Lp.begin(),Lp.end()),O);
+  SP.sweep();
+  //CGAL_NEF_TRACEN("POS SWEEP\n"<<(dump(std::cerr),""));
+  v1= this->vertices_begin(); v2=--this->vertices_end();
+  Negative_halfsphere_sweep SM(Input_range(Lm.begin(),Lm.end()),O);
+  SM.sweep();
+  //CGAL_NEF_TRACEN("NEG SWEEP\n"<<(dump(std::cerr),""));
+  ++v2;
+  // now two CCs of sphere graph calculated
+  // v1 = first node of CC in positive xy-sphere
+  // v2 = first node of CC in negative xy-sphere
+
+  merge_halfsphere_maps(v1,v2,O);
+  this->check_integrity_and_topological_planarity(false);
+}
+
+
+} //namespace CGAL
+
+#endif //CGAL_SM_OVERLAYER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_point_locator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_point_locator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_point_locator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_point_locator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_triangulator.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_triangulator.h
new file mode 100644
index 0000000..940598f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_triangulator.h
@@ -0,0 +1,744 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_SM_TRIANGULATOR_H
+#define CGAL_SM_TRIANGULATOR_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Nef_2/Segment_overlay_traits.h>
+#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+#include <CGAL/Nef_2/geninfo.h>
+#else
+#include <boost/any.hpp>
+#endif
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_S2/SM_const_decorator.h>
+#include <CGAL/Nef_S2/SM_point_locator.h>
+#include <CGAL/Nef_S2/SM_io_parser.h>
+#include <CGAL/Nef_S2/SM_constrained_triang_traits.h>
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 137
+#include <CGAL/Nef_2/debug.h>
+
+#define CGAL_USING(t) typedef typename Base::t t
+#ifndef CGAL_USE_LEDA
+#define LEDA_MEMORY(t) 
+#endif
+namespace CGAL {
+
+template <typename Decorator_, typename IT, typename INFO>
+struct SM_subdivision {
+  typedef Decorator_ Triangulator;
+  typedef typename Decorator_::SVertex_handle Vertex_handle;
+  typedef typename Decorator_::SHalfedge_handle   Halfedge_handle;
+  typedef typename Decorator_::Sphere_point   Point;
+  typedef typename Decorator_::Sphere_segment Segment;
+  Triangulator T;
+  CGAL::Unique_hash_map<IT,INFO>& M;
+  /* M stores the object that supports the segment that
+     is input object of the sweep */
+
+  SM_subdivision(Triangulator Ti, 
+                 CGAL::Unique_hash_map<IT,INFO>& Mi) : T(Ti), M(Mi) {}
+
+Vertex_handle new_vertex(const Point& p)
+{ Vertex_handle v = T.new_svertex(p); T.assoc_info(v);
+  return v;
+}
+
+void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
+{ T.link_as_target_and_append(v,e); }
+
+Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
+{ Halfedge_handle e = 
+  T.new_shalfedge_pair_at_source(v,Decorator_::BEFORE); 
+  T.assoc_info(e);
+  return e;
+}
+
+void halfedge_below(Vertex_handle v, Halfedge_handle e) const 
+{ T.halfedge_below(v) = e; }
+
+/* the following operation associates segment support with
+   halfedges, we only update if non-NULL; this prevents 
+   artificial sphere subdivision segments that have NULL 
+   support to overwrite non-NULL support */
+
+void supporting_segment(Halfedge_handle e, IT it) const
+{ T.is_forward(e) = true; 
+  if ( ! M[it].empty() ) T.support(e) = M[it]; }
+
+/* the following operation associate segment support with
+   vertices, we only update if non-NULL; this prevents 
+   artificial segments that have NULL support to overwrite
+   non-NULL support */
+
+void trivial_segment(Vertex_handle v, IT it) const
+{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
+
+void starting_segment(Vertex_handle v, IT it) const
+{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
+
+void ending_segment(Vertex_handle v, IT it) const
+{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
+
+void passing_segment(Vertex_handle v, IT it) const
+{ if ( ! M[it].empty() ) T.support(v) = M[it]; }
+
+
+}; // SM_subdivision
+
+
+
+/*{\Manpage {SM_triangulator}{Decorator_}{Overlay in the sphere}{O}}*/
+
+template <typename Decorator_>
+class SM_triangulator : public Decorator_ {
+public:
+  /*{\Mdefinition An instance |\Mvar| of data type |\Mname| is a
+  decorator object offering sphere map triangulation calculation.}*/
+
+  typedef Decorator_                            Base;
+  typedef typename Decorator_::Sphere_map       Sphere_map;
+  typedef CGAL::SM_const_decorator<Sphere_map>  SM_const_decorator;
+  typedef SM_const_decorator                    Explorer;
+  typedef Decorator_                            Decorator;
+  typedef SM_triangulator<Decorator_>           Self;
+  typedef CGAL::SM_point_locator<SM_const_decorator>  SM_point_locator;
+
+  typedef typename SM_const_decorator::SVertex_const_handle SVertex_const_handle;
+  typedef typename SM_const_decorator::SHalfedge_const_handle SHalfedge_const_handle;
+  typedef typename SM_const_decorator::SHalfloop_const_handle SHalfloop_const_handle;
+  typedef typename SM_const_decorator::SFace_const_handle SFace_const_handle;
+  typedef typename SM_const_decorator::SVertex_const_iterator SVertex_const_iterator;
+  typedef typename SM_const_decorator::SHalfedge_const_iterator SHalfedge_const_iterator;
+  typedef typename SM_const_decorator::SFace_const_iterator SFace_const_iterator;
+
+  typedef typename Base::SVertex_handle SVertex_handle;
+  typedef typename Base::SHalfedge_handle SHalfedge_handle;
+  typedef typename Base::SHalfloop_handle SHalfloop_handle;
+  typedef typename Base::SFace_handle SFace_handle;
+  typedef typename Base::SVertex_iterator SVertex_iterator;
+  typedef typename Base::SHalfedge_iterator SHalfedge_iterator;
+  typedef typename Base::SFace_iterator SFace_iterator;
+  typedef typename Base::Object_handle Object_handle;
+
+  typedef typename Base::SHalfedge_around_svertex_circulator 
+                         SHalfedge_around_svertex_circulator;
+  typedef typename Base::SHalfedge_around_sface_circulator 
+                         SHalfedge_around_sface_circulator;
+
+  typedef std::pair<SHalfedge_handle,SHalfedge_handle> SHalfedge_pair;
+
+  /*{\Mtypes 3}*/
+
+  typedef typename Base::Sphere_kernel Sphere_kernel;
+
+  typedef typename Sphere_kernel::Sphere_point   Sphere_point;
+  /*{\Mtypemember the point type of the sphere geometry.}*/
+  typedef typename Sphere_kernel::Sphere_segment Sphere_segment;
+  /*{\Mtypemember the segment type of the sphere geometry.}*/
+  typedef typename Sphere_kernel::Sphere_circle  Sphere_circle;
+  /*{\Mtypemember the circle type of the sphere geometry.}*/
+  typedef typename Sphere_kernel::Sphere_triangle Sphere_triangle;
+  /*{\Mtypemember the triangle type of the sphere geometry.}*/
+
+  typedef typename Decorator::Mark        Mark;
+  /*{\Mtypemember the mark of sphere map objects.}*/
+
+  /*{\Mgeneralization Decorator_}*/
+
+protected:
+  const Explorer* E_;
+  const Sphere_kernel& K;
+
+public:
+
+  typedef std::list<Sphere_segment>            Seg_list;
+  typedef typename Seg_list::iterator          Seg_iterator;
+  typedef std::pair<Seg_iterator,Seg_iterator> Seg_it_pair;
+  typedef std::pair<Sphere_segment,Sphere_segment> Seg_pair;
+  typedef CGAL::Unique_hash_map<Seg_iterator,Object_handle> Seg_map;
+
+  using Base::info;
+  using Base::set_first_out_edge;
+  using Base::first_out_edge;
+  using Base::last_out_edge;
+  using Base::is_isolated;
+  using Base::has_outdeg_two;
+  using Base::flip_diagonal;
+  using Base::out_edges;
+  using Base::set_source;
+  using Base::set_face;
+  using Base::link_as_prev_next_pair;
+  using Base::delete_vertex_only;
+  using Base::delete_edge_pair_only;
+  using Base::is_sm_boundary_object;
+  using Base::store_sm_boundary_object;
+  using Base::undo_sm_boundary_object;
+
+  // vertex_info stores the origin of vertices
+  struct vertex_info {
+    Object_handle         o_;
+    SHalfedge_handle       e_;
+    vertex_info() : o_(),e_() {}
+    LEDA_MEMORY(vertex_info)
+  };
+
+  void assoc_info(SVertex_handle v) const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<vertex_info>::create(info(v)); 
+    #else
+    info(v)=vertex_info();
+    #endif
+  }
+
+  void discard_info(SVertex_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<vertex_info>::clear(info(v)); 
+    #else
+    info(v)=boost::any();
+    #endif
+  }
+
+  vertex_info& ginfo(SVertex_handle v) const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<vertex_info>::access(info(v)); 
+    #else
+    return
+      *boost::any_cast<vertex_info>(&info(v));
+    #endif
+  }
+
+  Object_handle& support(SVertex_handle v) const
+  { return ginfo(v).o_; }
+
+  SHalfedge_handle& halfedge_below(SVertex_handle v) const
+  { return ginfo(v).e_; }
+
+  // edge_info stores the origin of edges
+  struct edge_info {
+    Mark m_left_; Object_handle o_; bool forw_;
+
+    edge_info() { m_left_=Mark(); o_=Object_handle(); forw_=false; }
+    LEDA_MEMORY(edge_info)
+  };
+
+  void assoc_info(SHalfedge_handle e)  const
+  { 
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<edge_info>::create(info(e)); 
+    geninfo<edge_info>::create(info(e->twin()));
+    #else
+    info(e)=edge_info();
+    info(e->twin())=edge_info();
+    #endif
+  }
+
+  void discard_info(SHalfedge_handle e)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    geninfo<edge_info>::clear(info(e)); 
+    geninfo<edge_info>::clear(info(e->twin()));
+    #else
+    info(e)=boost::any();
+    info(e->twin())=boost::any();
+    #endif
+  }
+
+  edge_info& ginfo(SHalfedge_handle e)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<edge_info>::access(info(e)); 
+    #else
+    return
+      *boost::any_cast<edge_info>(&info(e));
+    #endif
+  }
+
+  Object_handle& support(SHalfedge_handle e) const
+  // uedge information we store in the smaller one 
+  { if (&*e < &*(e->twin())) return ginfo(e).o_; 
+    else                   return ginfo(e->twin()).o_; }
+
+  Mark& incident_mark(SHalfedge_handle e)  const
+  // biedge information we store in the edge
+  { return ginfo(e).m_left_; }
+
+  const edge_info& ginfo(SHalfedge_const_handle e)  const
+  {
+    #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
+    return geninfo<edge_info>::const_access(info(e)); 
+    #else
+    return 
+      *boost::any_cast<edge_info>(&info(e)); 
+    #endif
+  }
+  const Mark& incident_mark(SHalfedge_const_handle e)  const
+  { return ginfo(e).m_left_; }
+
+  bool& is_forward(SHalfedge_handle e) const
+  // biedge information we store in the edge
+  { return ginfo(e).forw_; }
+
+  void assert_equal_marks(SVertex_handle v1, SVertex_handle v2) const 
+  { CGAL_assertion(v1->mark()==v2->mark()); CGAL_USE(v1); CGAL_USE(v2); }
+
+  void assert_equal_marks(SHalfedge_handle e1, SHalfedge_handle e2) const
+  { CGAL_assertion(e1->mark()==e2->mark()); CGAL_USE(e1); CGAL_USE(e2); }
+
+  Sphere_segment segment(const Explorer* , 
+                         SHalfedge_const_handle e) const
+  { return Sphere_segment(
+	    e->source()->point(),e->twin()->source()->point(),e->circle()); }
+
+  Sphere_segment trivial_segment(const Explorer* , 
+                                 SVertex_const_handle v) const
+  { Sphere_point p = v->point(); 
+    return Sphere_segment(p,p); }
+
+  Seg_pair two_segments(const Explorer* , 
+                        SHalfedge_const_handle e) const
+  // we know that source(e)==target(e)
+  { return e->circle().split_at(e->source()->point()); }
+
+  Seg_pair two_segments(const Explorer* , 
+                        SHalfloop_const_handle l) const
+  { return l->circle().split_at_xy_plane(); }
+
+  /*{\Mcreation 6}*/
+  SM_triangulator(Sphere_map* M, const Explorer* E,
+		  const Sphere_kernel& G = Sphere_kernel()) : Base(M), E_(E), K(G) {}
+  /*{\Mcreate |\Mvar| is a triangulator object for the map |M|,
+     stores the triangulation in |MT|.}*/
+
+  /*{\Moperations 1.1 1}*/
+
+  void triangulate();
+  /*{\Mop produces a triangulated sphere map.}*/
+
+  void triangulate_per_hemisphere(SVertex_iterator start, SVertex_iterator end);
+
+  template <typename Iterator, typename T>
+  void partition_to_halfsphere(Iterator start, Iterator end,
+    Seg_list& L, CGAL::Unique_hash_map<Iterator,T>& M, int pos) const;
+
+  void merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2);
+  void merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2);
+  void complete_support(SVertex_iterator v_start, SVertex_iterator v_end, 
+			Mark mohs) const;
+
+  void correct_triangle_at(SVertex_handle v)
+  { CGAL_NEF_TRACEN("correct_triangle_at "<<PH(v));
+    if ( !has_outdeg_two(v) ) return;
+    SHalfedge_handle e = first_out_edge(v);
+    CGAL_assertion(e->snext()->snext()->snext()==e);
+    flip_diagonal(e->snext());
+  }
+
+  void dump(std::ostream& os = std::cerr) const
+  { SM_io_parser<Explorer>::dump(E_,os);
+    SM_io_parser<Base>::dump(*this,os); }
+
+  Sphere_triangle incident_triangle(SHalfedge_handle e) const
+  { SHalfedge_handle en(e->snext()), enn(en->snext());
+    CGAL_assertion(enn->snext()==e);
+    return Sphere_triangle(e->source()->point(),
+			   en->source()->point(),
+			   enn->source()->point(),
+			   e->circle(),
+			   en->circle(),
+			   enn->circle());
+  }
+
+  Sphere_triangle incident_triangle(SHalfedge_const_handle e) const
+  { SHalfedge_const_handle en(e->snext()), enn(en->snext());
+    CGAL_assertion(enn->snext()==e);
+    return Sphere_triangle(e->source()->point(),
+			   en->source()->point(),
+			   enn->source()->point(),
+			   e->circle(),
+			   en->circle(),
+			   enn->circle());
+  }
+
+  void discard_info()
+  {
+    SVertex_iterator v;
+    SHalfedge_iterator e;
+    CGAL_forall_svertices(v,*this) discard_info(v);
+    CGAL_forall_shalfedges(e,*this) discard_info(e);
+  }
+
+
+}; // SM_triangulator<Decorator_>
+
+
+template <typename Decorator_>
+void SM_triangulator<Decorator_>::triangulate()
+{ CGAL_NEF_TRACEN("triangulate");
+  // first create sphere segments from isoverts, edges, loops
+  Seg_list L;
+  Seg_map From;
+  SVertex_const_iterator v;
+  CGAL_forall_svertices(v,*E_) {
+    if ( !E_->is_isolated(v) ) continue;
+    L.push_back(trivial_segment(E_,v));
+    From[--L.end()] = make_object(v);
+  }
+  SHalfedge_const_iterator e;
+  CGAL_forall_sedges(e,*E_) {
+    if ( e->source() == e->twin()->source() ) {
+      Seg_pair p = two_segments(E_,e);
+      L.push_back(p.first); L.push_back(p.second);
+      From[--L.end()] = From[--(--L.end())] = make_object(e);
+    } else {
+      L.push_back(segment(E_,e));
+      From[--L.end()] = make_object(e);
+    }
+  }
+  if ( E_->has_shalfloop() ) {
+    Seg_pair p = two_segments(E_,E_->shalfloop());
+    L.push_back(p.first); L.push_back(p.second);
+    From[--L.end()] = From[--(--L.end())] = make_object(E_->shalfloop());
+  }
+
+  // partition segments from L to positive and negative hemisphere
+  Seg_list L_pos,L_neg;
+  partition_to_halfsphere(L.begin(), L.end(), L_pos, From, +1);
+  partition_to_halfsphere(L.begin(), L.end(), L_neg, From, -1);
+
+  //  typename Seg_list::iterator it;
+  //    std::cerr << "L_pos" << std::endl;
+  //    CGAL_forall_iterators(it,L_pos) std::cerr << *it << std::endl;
+  //    std::cerr << "L_neg" << std::endl;
+  //    CGAL_forall_iterators(it,L_neg) std::cerr << *it << std::endl;
+
+  // sweep the hemispheres to create two half sphere maps
+  typedef SM_subdivision<Self,Seg_iterator,Object_handle> SM_output;
+  typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, PH_geometry>  PHS_traits;
+  typedef CGAL::generic_sweep<PHS_traits> Positive_halfsphere_sweep;
+
+  typedef typename Sphere_kernel::Negative_halfsphere_geometry NH_geometry;
+  typedef CGAL::Segment_overlay_traits< 
+            Seg_iterator, SM_output, NH_geometry> NHS_traits;
+  typedef CGAL::generic_sweep<NHS_traits> Negative_halfsphere_sweep;
+
+  SVertex_handle v_sep;
+  SHalfedge_handle e_sep;
+  SM_output O(*this,From); 
+
+  typedef typename PHS_traits::INPUT Input_range;
+  Positive_halfsphere_sweep SP(
+    Input_range(L_pos.begin(),L_pos.end()),O,
+    PH_geometry());
+  SP.sweep();
+  v_sep=--this->svertices_end(); e_sep=--this->shalfedges_end();
+
+  Negative_halfsphere_sweep SM(
+    Input_range(L_neg.begin(),L_neg.end()),O,
+    NH_geometry());
+  SM.sweep();
+  ++v_sep; ++e_sep;
+  // now two CCs of sphere graph are calculated
+  // v_sep = first vertex of CC in negative x-sphere
+  // e_sep = first edge of CC in negative x-sphere
+   
+  SHalfedge_iterator u;
+  CGAL_forall_sedges(u,*this) {
+    Sphere_segment s(u->source()->point(),u->twin()->source()->point());
+    u->circle() = s.sphere_circle(); 
+    u->twin()->circle() = s.sphere_circle().opposite();
+  }
+
+  Mark lower, upper;
+  SM_point_locator PL(E_->sphere_map());
+  PL.marks_of_halfspheres(lower,upper);
+  complete_support(this->svertices_begin(), v_sep, lower);
+  complete_support(v_sep, this->svertices_end(), upper);
+
+  /*
+  CGAL_forall_sedges(u,*this) {
+    std::cerr << point(source(u)) << "->" << point(target(u)) << std::endl;
+  }
+  */
+
+  // triangulate per hemisphere
+  typedef SM_constrained_triang_traits<Self,PH_geometry>  PCT_traits;
+  typedef CGAL::generic_sweep<PCT_traits> Positive_halfsphere_ct_sweep;
+  typedef SM_constrained_triang_traits<Self,NH_geometry>  NCT_traits;
+  typedef CGAL::generic_sweep<NCT_traits> Negative_halfsphere_ct_sweep;
+  typedef std::pair<SVertex_iterator,SVertex_iterator> SVertex_pair;
+
+  SVertex_pair vpp(this->svertices_begin(),v_sep);
+  Positive_halfsphere_ct_sweep PCTS(vpp, *this,
+    PH_geometry());
+  PCTS.sweep();
+  SVertex_pair vpn(v_sep,this->svertices_end());
+  Negative_halfsphere_ct_sweep NCTS(vpn, *this,
+    NH_geometry());
+  NCTS.sweep();
+
+  /*
+  std::cerr << std::endl;
+  CGAL_forall_sedges(u,*this) {
+    std::cerr << point(source(u)) << "->" << point(target(u)) << std::endl;
+  }
+  */
+
+  /* Note the we divide the world along the xy equator and 
+     split the equator at y- and y+. We treat the halfcircle
+     at x+ as if perturbed slightly up. This makes triangles
+     that have y- or y+ as a vertex degenerate. if such triangles
+     appear we repair it by flipping the edge opposite to the
+     vertex y-(y+).
+  */
+
+  correct_triangle_at(this->svertices_begin());
+  correct_triangle_at(--SVertex_iterator(v_sep));
+  correct_triangle_at(v_sep);
+  correct_triangle_at(--this->svertices_end());
+
+  CGAL_forall_sedges(u,*this) {
+    Sphere_segment s(u->source()->point(),u->twin()->source()->point());
+    u->circle() = s.sphere_circle();
+    u->twin()->circle() = s.sphere_circle().opposite();
+  }
+
+  // merge the hemisphere maps into one sphere map
+  merge_halfsphere_maps(this->svertices_begin(),v_sep);
+  this->check_integrity_and_topological_planarity(false);
+}
+
+
+template <typename Decorator_>
+template <typename Iterator, typename T>
+void SM_triangulator<Decorator_>::
+partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L, 
+  CGAL::Unique_hash_map<Iterator,T>& M, int pos) const
+{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
+  CGAL_assertion(pos!=0);
+  bool add_cross = true;
+  Sphere_segment s1,s2;
+  Sphere_circle xycircle(0,0,pos);
+  while ( start != beyond ) { 
+    if(start->source().hz() * pos > 0 || start->target().hz() * pos > 0)
+      add_cross = false;
+    int i = start->intersection(xycircle,s1,s2);
+    if (i>1) { L.push_back(s2); M[--L.end()] = M[start]; }
+    if (i>0) { L.push_back(s1); M[--L.end()] = M[start]; }
+    ++start;
+  }
+  // now all segments are split into halfspheres
+  // we still have to:
+  // - split segments containing our special poles y^-, y^+
+  // - split halfcircles
+  // - add four equator segments 
+  Sphere_point S(0,-1,0),N(0,1,0);
+  Sphere_circle yzcircle(1,0,0);
+  typename Seg_list::iterator it, itl;
+
+  bool part_in_hemisphere(false);
+  CGAL_forall_iterators(it,L) { CGAL_NEF_TRACEN("  "<<*it);
+    if ( equal_as_sets(it->sphere_circle(),xycircle) ) {
+      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
+      int n1 =  it->intersection(yzcircle,s1,s2);
+      if (n1 > 1 && !s2.is_degenerate()) 
+      { M[ L.insert(it,s2) ] = M[it]; }
+      if (n1 > 0 && !s1.is_degenerate()) 
+      { M[ L.insert(it,s1) ] = M[it]; }
+      int n2 =  it->intersection(yzcircle.opposite(),s1,s2);
+      if (n2 > 1 && !s2.is_degenerate()) 
+      { M[ L.insert(it,s2) ] = M[it]; }
+      if (n2 > 0 && !s1.is_degenerate()) 
+      { M[ L.insert(it,s1) ] = M[it]; }
+      itl = it; --it; L.erase(itl); M[itl] = T();
+      // at least one item was appended
+    } else {
+      part_in_hemisphere = true;
+    }
+  }
+  CGAL_forall_iterators(it,L) {
+    if ( it->is_halfcircle() ) {
+      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
+      Sphere_segment s1,s2;
+      it->split_halfcircle(s1,s2);
+      *it = s2; 
+      M[ L.insert(it,s1) ] = M[it];
+    }
+  }
+  // append 4 xy-equator segments:
+  Sphere_segment sp(S,N,xycircle);
+  Sphere_segment sm(S,N,xycircle.opposite());
+  Sphere_segment s[4];
+  sp.split_halfcircle(s[0],s[1]);
+  sm.split_halfcircle(s[2],s[3]);
+  L.insert(L.end(),s,s+4);
+  /* if no segment is covering the interior of the hemisphere
+     we have to add a trivial segment to allow for a correct
+     triangulation */
+  if ( !part_in_hemisphere || add_cross) {
+    Sphere_point p(0,0,pos);
+    Sphere_circle c(1,0,0);
+    L.push_back(Sphere_segment(p,p,c));
+  }
+}
+
+template <typename Decorator_>
+void SM_triangulator<Decorator_>::
+merge_nodes(SHalfedge_handle e1, SHalfedge_handle e2)
+{
+  SVertex_handle v1 = e1->source(), v2 = e2->twin()->source();
+  CGAL_NEF_TRACEN("merge_nodes "<<PH(v1)<<PH(v2));
+  CGAL_assertion(v1->point()==v2->point());
+  SHalfedge_handle ep1 = e1->sprev(), en2 = e2->snext();
+  SHalfedge_around_svertex_circulator eav(out_edges(v2)),ee(eav);
+  CGAL_For_all(eav,ee) { set_source(eav,v1); }
+  link_as_prev_next_pair(e2,e1);  
+  link_as_prev_next_pair(ep1,en2); 
+  assert_equal_marks(v1,v2);
+  discard_info(v2);
+  delete_vertex_only(v2);
+}
+
+
+template <typename Decorator_>
+void SM_triangulator<Decorator_>::
+merge_halfsphere_maps(SVertex_handle v1, SVertex_handle v2)
+{ CGAL_NEF_TRACEN("merging halfspheres "<<PH(v1)<<PH(v2));
+  CGAL_assertion(v1->point()==v2->point());
+  std::list<SHalfedge_pair> L_equator;
+  SHalfedge_around_sface_circulator 
+    ep(last_out_edge(v1)), en(first_out_edge(v2)->twin());
+  do { 
+   L_equator.push_back(SHalfedge_pair(ep,en));
+   merge_nodes(ep,en); ++ep; --en; 
+  } while ( ep->source() != v1 );
+  
+  typename std::list<SHalfedge_pair>::iterator it;
+  CGAL_forall_iterators(it,L_equator) { 
+    SHalfedge_handle e1 = it->first, e2 = it->second;
+    SHalfedge_handle e1t = e1->twin(), e2t = e2->twin();
+    CGAL_NEF_TRACEV(PH(e1));CGAL_NEF_TRACEV(PH(e2));
+    SHalfedge_handle e2tp = e2t->sprev();
+    SHalfedge_handle e2tn = e2t->snext();
+    link_as_prev_next_pair(e2tp,e1);
+    link_as_prev_next_pair(e1,e2tn);
+    SFace_handle f = e2t->incident_sface();
+    if ( is_sm_boundary_object(e2t) )
+    { undo_sm_boundary_object(e2t,f); store_sm_boundary_object(e1,f); }
+    set_face(e1,f);
+    if ( e2 == first_out_edge(e2->source()) )
+      set_first_out_edge(e2->source(),e1t);
+    discard_info(e2);
+    delete_edge_pair_only(e2);
+  }
+}
+
+template <typename Decorator_>
+void SM_triangulator<Decorator_>::
+complete_support(SVertex_iterator v_start, SVertex_iterator v_end,
+		 Mark mohs) const
+{ CGAL_NEF_TRACEN("complete_support");
+  Mark m_buffer(mohs); 
+  for (SVertex_iterator v = v_start; v != v_end; ++v) { 
+    CGAL_NEF_TRACEN(" vertex = "<<PH(v));
+    SHalfedge_handle e_below = halfedge_below(v);
+    if ( v != v_start ) {
+      if ( e_below != SHalfedge_handle() ) {
+	m_buffer = incident_mark(e_below); 
+      } else { // e_below does not exist
+	/* this is only the case for a vertex v on the final equatorial
+	   halfcircle; there we take the mark from an inedge edge into v */
+	//	CGAL_assertion( point(v).z() == 0 && 
+	//	  ( pos > 0 ? (point(v).x() >= 0) : (point(v).x()<=0)) );
+	m_buffer = incident_mark(first_out_edge(v)->sprev());
+      }
+    }
+    CGAL_NEF_TRACEN(" face mark below "<<m_buffer);
+
+    Object_handle o = support(v);
+    SVertex_const_handle vs;
+    SHalfedge_const_handle es;
+    SHalfloop_const_handle ls;
+    if ( o.empty() ) { v->mark() = m_buffer; }
+    else if ( CGAL::assign(vs,o) ) { v->mark() = vs->mark(); }
+    else if ( CGAL::assign(es,o) ) {
+      if ( es->source()->point() == v->point() ) 
+	{ v->mark() = es->source()->mark(); }
+      else if ( es->twin()->source()->point() == v->point() ) 
+	{ v->mark() = es->twin()->source()->mark(); }
+      else { v->mark() = es->mark(); }
+    }
+    else if ( CGAL::assign(ls,o) ) { v->mark() = ls->mark(); }
+    else CGAL_error_msg("damn wrong support.");
+    CGAL_NEF_TRACEN(" face mark at "<<v->mark());
+
+    if ( is_isolated(v) ) continue;
+
+    SHalfedge_around_svertex_circulator e(first_out_edge(v)), hend(e);
+    CGAL_For_all(e,hend) {
+      CGAL_NEF_TRACEN("  edge "<<PH(e));
+      if ( !is_forward(e) ) break;
+      if ( ! support(e).empty() ) {
+        SHalfedge_const_handle ei;
+        if ( CGAL::assign(ei,support(e)) ) { 
+          if ( ei->circle() != e->circle() ) { ei = ei->twin(); }
+          CGAL_assertion( ei->circle() == e->circle() ); 
+          CGAL_NEF_TRACEN("  supporting edge "<<PH(ei));
+          incident_mark(e->twin()) = ei->twin()->incident_sface()->mark();
+          e->mark() = ei->mark();
+          incident_mark(e) = m_buffer = ei->incident_sface()->mark(); 
+        }
+        SHalfloop_const_handle li;
+        if ( CGAL::assign(li,support(e)) ) { 
+          if ( li->circle() != e->circle() ) { li = li->twin(); }
+          CGAL_assertion( li->circle() == e->circle() ); 
+          CGAL_NEF_TRACEN("  supporting loop "<<PH(li));
+          incident_mark(e->twin()) = li->twin()->incident_sface()->mark();
+          e->mark() = li->mark();
+          incident_mark(e) = m_buffer = li->incident_sface()->mark();
+        }
+      } else { CGAL_NEF_TRACEN("  support from face below ");
+        incident_mark(e->twin()) = e->mark() = 
+        incident_mark(e) = m_buffer;
+      }
+      CGAL_NEF_TRACEN("  new face mark "<<m_buffer);
+
+    } // CGAL_For_all(e,hend)
+
+    CGAL_NEF_TRACEN(" mark of "<<PH(v));
+  }
+
+}
+
+
+
+
+} //namespace CGAL
+#undef CGAL_USING
+#endif //CGAL_SM_TRIANGULATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_visualizor.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_visualizor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/SM_visualizor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/SM_visualizor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_circle.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_circle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_circle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_circle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_direction.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_direction.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_direction.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_direction.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_geometry.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_geometry.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_geometry.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_geometry.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_geometry_OGL.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_geometry_OGL.h
new file mode 100644
index 0000000..7978331
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_geometry_OGL.h
@@ -0,0 +1,824 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_SPHERE_GEOMETRY_OGL_H
+#define CGAL_SPHERE_GEOMETRY_OGL_H
+
+#include <CGAL/Nef_S2/OGL_base_object.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Nef_S2/Sphere_geometry.h>
+#include <CGAL/Nef_S2/SM_triangulator.h>
+#include <CGAL/IO/Color.h>
+#include <qgl.h>
+#include <CGAL/glu.h>
+#include <cmath>
+#include <cstdlib>
+#include <cstdio>
+#include <string>
+#include <vector>
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 151
+#include <CGAL/Nef_2/debug.h>
+
+#define CGAL_NEF_LGREY CGAL::Color(170,170,200)
+#define CGAL_NEF_DGREY CGAL::Color(30,30,50)
+
+namespace CGAL {
+namespace OGL {
+
+struct Gen_object {
+  Gen_object() {}
+  virtual ~Gen_object() {}
+  virtual void draw() const {}
+  virtual Gen_object* clone() const { return 0; }
+  virtual void print() const {}
+};
+
+typedef CGAL::Simple_cartesian<double>      VKernel;
+typedef VKernel::Vector_3                   VVector;
+typedef VKernel::Point_3                    VPoint;
+typedef VKernel::Aff_transformation_3       VTrafo;
+typedef VKernel::Aff_transformation_3       Affine_3;
+typedef std::vector<VPoint>                 VSegment;
+typedef VKernel::Triangle_3                 DTriangle;
+typedef std::vector<DTriangle>              VTriangle;
+
+template <typename R>
+VVector convert(const CGAL::Vector_3<R>& v)
+{ return VVector(CGAL::to_double(v.x()),
+                 CGAL::to_double(v.y()),
+                 CGAL::to_double(v.z())); }
+
+
+const double refinement_angle = 0.1;
+const double shrink_fac = 0.995;
+
+template <typename R>
+class Approximator {
+
+ public:
+  static VPoint approximate(const CGAL::Sphere_point<R>& p) {
+    VVector v = convert(p-CGAL::ORIGIN);
+    v = v / CGAL_NTS sqrt(v*v) ; // normalize
+    return CGAL::ORIGIN+v;
+  }
+   
+  static VSegment approximate(const CGAL::Sphere_segment<R>& s) {
+    
+    /* we construct the rotation matrix that transfers the x-axis
+       into |ps_|, the z-axis into h_.orthogonal_vector() and the
+       y-axix into the corresponding crossproduct of the two.*/
+    if ( s.is_degenerate() ) {
+      VSegment S(1);
+      S[0] = approximate(s.source());
+      return S;
+    }
+    
+    VVector v0 = convert(s.source()-CGAL::ORIGIN);
+    VVector v2 = convert(s.sphere_circle().orthogonal_vector());
+    VVector v1(-cross_product(v0,v2));
+    VVector v3 = convert(s.target()-CGAL::ORIGIN);
+    double v0l = CGAL_NTS sqrt(v0*v0);
+    double v1l = CGAL_NTS sqrt(v1*v1);
+    double v2l = CGAL_NTS sqrt(v2*v2);
+    double v3l = CGAL_NTS sqrt(v3*v3);
+    double cosalpha = v0*v3 / v0l / v3l; 
+    double alpha = std::acos(cosalpha);
+    const int units_per_halfcircle = 50;
+    int units = int(units_per_halfcircle/CGAL_PI * alpha);
+    if (units == 0) ++units;
+    bool seg_is_short = s.is_short();
+    bool seg_is_halfcircle = s.is_halfcircle();
+    if ( seg_is_halfcircle ) units = units_per_halfcircle;
+    else if ( !seg_is_short ) {
+      units = 2*units_per_halfcircle - (units+1);
+    } CGAL_NEF_TRACEV(units); CGAL_NEF_TRACEV(cosalpha); CGAL_NEF_TRACEV(alpha);
+    
+    v0 = v0 / v0l;
+    v1 = v1 / v1l;
+    v2 = v2 / v2l;
+    v3 = v3 / v3l;
+    VTrafo T(v0.x(),v1.x(),v2.x(),
+	     v0.y(),v1.y(),v2.y(),
+	     v0.z(),v1.z(),v2.z());
+    VSegment S(units+1);
+    for (int i=0; i<units; ++i) 
+      S[i] = VPoint(std::cos(CGAL_PI*i/double(units_per_halfcircle)),
+		    std::sin(CGAL_PI*i/double(units_per_halfcircle)),
+		    0.0);
+    double sinalpha = 1 - cosalpha*cosalpha;
+    if (sinalpha <0) sinalpha = 0; 
+    else             sinalpha = CGAL_NTS sqrt(sinalpha);
+    if ( seg_is_short ) 
+      S[units] = VPoint(cosalpha, sinalpha, 0);
+    else
+      S[units] = VPoint(cosalpha, -sinalpha, 0);
+    VSegment::iterator it;
+    for(it = S.begin(); it != S.end(); ++it) { CGAL_NEF_TRACEN(*it<<" "<<T(*it));
+    *it = T(*it); 
+    } CGAL_NEF_TRACEN("");
+    return S;
+  }
+
+  static VSegment approximate(const CGAL::Sphere_circle<R>& s) {
+    
+    /* we construct the rotation matrix that transfers the x-axis
+       into |ps_|, the z-axis into h_.orthogonal_vector() and the
+       y-axix into the corresponding crossproduct of the two.*/
+    
+    VVector v0 = convert(s.base1());
+    VVector v1 = convert(s.base2());
+    VVector v2 = convert(s.orthogonal_vector());
+    double v0l = CGAL_NTS sqrt(v0*v0);
+    double v1l = CGAL_NTS sqrt(v1*v1);
+    double v2l = CGAL_NTS sqrt(v2*v2);
+    const int units = 100;
+    v0 = v0 / v0l;
+    v1 = v1 / v1l;
+    v2 = v2 / v2l;
+    VTrafo T(v0.x(),v1.x(),v2.x(),
+	     v0.y(),v1.y(),v2.y(),
+	     v0.z(),v1.z(),v2.z());
+    VSegment S(units);
+    for (int i=0; i<units; ++i) {
+      S[i] = VPoint(std::cos(2.0*CGAL_PI*i/double(units)),
+		    std::sin(2.0*CGAL_PI*i/double(units)),
+		    0.0);
+    }
+    VSegment::iterator it;
+    for(it = S.begin(); it != S.end(); ++it) *it = T(*it); 
+    return S;
+  }
+
+
+/* the following operation refines a sphere triangle as a list of flat
+   triangles in 3d. The refinement only works for triangles that are
+   contained in a perfect hemisphere (no long sphere segments are
+   allowed as triangle segments). We split triangles along at the
+   midpoint of their longest side into two. */
+
+  static void refine(const DTriangle& t, VTriangle& T) {
+    double angle[3]; int i(0);
+    angle[0] = std::acos((t[0]-CGAL::ORIGIN)*(t[1]-CGAL::ORIGIN));
+    angle[1] = std::acos((t[1]-CGAL::ORIGIN)*(t[2]-CGAL::ORIGIN));
+    angle[2] = std::acos((t[2]-CGAL::ORIGIN)*(t[0]-CGAL::ORIGIN));
+    CGAL_NEF_TRACEN("refine "<<angle[0]<<" "<<angle[1]<<" "<<angle[2]);
+    if ( angle[1] > angle[0] ) {
+      if ( angle[2] > angle[1] ) i=2;
+      else                       i=1;
+    } else { // angle[0] >= angle[1]
+      if ( angle[2] > angle[0] ) i=2;
+      else                       i=0;
+    }
+    // now i references the side of maximal angle
+    if ( angle[i] < refinement_angle ) // refinement threshhold
+      { T.push_back(t); return; }
+    VVector v;
+    switch (i) {
+    case 0: v = (t[0]-CGAL::ORIGIN)+(t[1]-CGAL::ORIGIN); break;
+    case 1: v = (t[1]-CGAL::ORIGIN)+(t[2]-CGAL::ORIGIN); break;
+    case 2: v = (t[2]-CGAL::ORIGIN)+(t[0]-CGAL::ORIGIN); break;
+    }
+    v = v / CGAL_NTS sqrt(v*v) ; // normalize
+    VPoint p = CGAL::ORIGIN+v;
+    DTriangle t1,t2;
+    switch (i) {
+    case 0: t1=DTriangle(t[0],p,t[2]); t2=DTriangle(p,t[1],t[2]); break;
+    case 1: t1=DTriangle(t[1],p,t[0]); t2=DTriangle(p,t[2],t[0]); break;
+    case 2: t1=DTriangle(t[2],p,t[1]); t2=DTriangle(p,t[0],t[1]); break;
+    }
+    refine(t1,T);
+    refine(t2,T);
+  }
+
+  static VTriangle approximate(const CGAL::Sphere_triangle<R>& t) {
+    // we subdivide the triangle into a list of triangles until
+    // we reach a fine resolution on the surface.
+    
+    VTriangle T;
+    DTriangle td(approximate(t.point(0)), 
+		 approximate(t.point(1)),
+		 approximate(t.point(2)));
+    CGAL_NEF_TRACEN("approximate " << td);
+    refine(td,T);
+    return T;
+  }
+
+};
+
+
+template <class R_>
+class Sphere_point : public VPoint, public Gen_object {
+  typedef R_ R;
+  CGAL::Sphere_point<R> p_;
+  CGAL::Color           c_;
+  unsigned              w_;
+public:
+  Sphere_point() {}
+  Sphere_point(const CGAL::Sphere_point<R>& p,
+    CGAL::Color c = CGAL::BLACK, unsigned w = 10) : 
+    VPoint(Approximator<R>::approximate(p)), p_(p), c_(c), w_(w) {}
+  Sphere_point(const Sphere_point<R>& p) : VPoint(p), Gen_object()
+  { p_ = p.p_; c_ = p.c_; w_ = p.w_; }
+  Sphere_point<R>& operator=(const Sphere_point<R>& p)
+  { VPoint::operator=(p); p_ = p.p_;  c_ = p.c_; w_ = p.w_;
+    return *this; }
+
+  virtual ~Sphere_point() {}
+
+  const CGAL::Sphere_point<R>& original() const
+  { return p_; }
+
+  virtual Gen_object* clone() const 
+  { return new Sphere_point<R>(*this); }
+ 
+  virtual void draw() const { 
+    glPointSize(w_);
+    glColor3ub(c_.red(),c_.green(),c_.blue());
+    glBegin(GL_POINTS);
+    glNormal3d(x(),y(),z());
+    glVertex3d(x(),y(),z());
+    glEnd();
+  }
+
+  virtual void print() const 
+  { std::cerr << "point " << p_; }
+
+};
+
+
+
+
+
+template <class R_>
+class Sphere_segment : public VSegment, public Gen_object { 
+  typedef R_ R;
+  CGAL::Sphere_segment<R> s_;
+  CGAL::Color             c_;
+  unsigned                w_;
+public:
+  Sphere_segment() {}
+  Sphere_segment(const CGAL::Sphere_segment<R>& s,
+    CGAL::Color c = CGAL::BLACK, unsigned w = 2) 
+    : VSegment(Approximator<R>::approximate(s)), s_(s), c_(c), w_(w) {}
+  Sphere_segment(const Sphere_segment<R>& s) : VSegment(s), Gen_object()
+  { s_ = s.s_; c_ = s.c_; w_ = s.w_; }
+  Sphere_segment<R>& operator=(const Sphere_segment<R>& s)
+  { VSegment::operator=(s); s_ = s.s_; c_ = s.c_; w_ = s.w_;
+    return *this; }
+  virtual ~Sphere_segment() {}
+
+  const CGAL::Sphere_segment<R>& original() const
+  { return s_; }
+
+  virtual Gen_object* clone() const 
+  { return new Sphere_segment<R>(*this); }
+
+  virtual void draw() const
+  { CGAL_NEF_TRACEN("draw "<<s_);
+    if ( size() == 1 ) {
+      glPointSize(5*w_);
+      glColor3ub(c_.red(),c_.green(),c_.blue());
+      glBegin(GL_POINTS);
+      glNormal3d(begin()->x(),begin()->y(),begin()->z());
+      glVertex3d(begin()->x(),begin()->y(),begin()->z());
+      glEnd();
+    } else {
+      glLineWidth(w_);
+      glColor3ub(c_.red(),c_.green(),c_.blue()); 
+      glBegin(GL_LINE_STRIP);
+      VSegment::const_iterator it;
+      for(it = begin(); it != end(); ++it) {
+        glNormal3d(it->x(),it->y(),it->z());
+        glVertex3d(it->x(),it->y(),it->z());
+      }
+      glEnd();
+    }
+  }
+
+  virtual void print() const 
+  { std::cerr << "segment " << s_; }
+
+};
+
+
+
+template <class R_>
+class Sphere_circle : public VSegment, public Gen_object { 
+  typedef R_ R;
+  CGAL::Sphere_circle<R> s_;
+  CGAL::Color            c_;
+  unsigned               w_;
+public:
+  Sphere_circle() {}
+  Sphere_circle(const CGAL::Sphere_circle<R>& s,
+    CGAL::Color c = CGAL::BLACK, unsigned w = 2) 
+    : VSegment(Approximator<R>::approximate(s)), s_(s), c_(c), w_(w) {}
+  Sphere_circle(const Sphere_circle<R>& s) : VSegment(s), Gen_object()
+  { s_ = s.s_; c_ = s.c_; w_ = s.w_; }
+  Sphere_circle<R>& operator=(const Sphere_circle<R>& s)
+  { VSegment::operator=(s); s_ = s.s_; c_ = s.c_; w_ = s.w_;
+    return *this; }
+  virtual ~Sphere_circle() {}
+
+  const CGAL::Sphere_circle<R>& original() const
+  { return s_; }
+
+  virtual Gen_object* clone() const 
+  { return new Sphere_circle<R>(*this); }
+
+  virtual void draw() const
+  { CGAL_NEF_TRACEN("draw "<<s_);
+    glLineWidth(w_);
+    glColor3ub(c_.red(),c_.green(),c_.blue()); 
+    glBegin(GL_LINE_LOOP);
+    VSegment::const_iterator it;
+    for(it = begin(); it != end(); ++it) {
+      glNormal3d(it->x(),it->y(),it->z());
+      glVertex3d(it->x(),it->y(),it->z());
+    }
+    glEnd();
+  }
+
+  virtual void print() const 
+  { std::cerr << "circle " << s_; }
+
+};
+
+
+/* The following class approximates a spherical triangle by a list
+   of flat triangles */
+
+template <class R_>
+class Sphere_triangle : public VTriangle, public Gen_object { 
+  typedef R_ R;
+  CGAL::Sphere_triangle<R> t_;
+  CGAL::Color              c_;
+public:
+  Sphere_triangle() {}
+
+  Sphere_triangle(const CGAL::Sphere_triangle<R>& t,
+    CGAL::Color c = CGAL::Color(100,100,120)) 
+    : VTriangle(Approximator<R>::approximate(t)), t_(t), c_(c) {}
+
+  Sphere_triangle(const Sphere_triangle<R>& t) : VTriangle(t), Gen_object()
+  { t_ = t.t_; c_ = t.c_; }
+
+  Sphere_triangle<R>& operator=(const Sphere_triangle<R>& t)
+  { VTriangle::operator=(t); t_ = t.t_; c_ = t.c_; return *this; }
+
+  virtual ~Sphere_triangle() {}
+
+  const CGAL::Sphere_triangle<R>& original() const
+  { return t_; }
+
+  virtual Gen_object* clone() const 
+  { return new Sphere_triangle<R>(*this); }
+
+  virtual void draw() const { 
+    CGAL_NEF_TRACEN("draw "<<t_ << " in " << c_);
+    VTriangle::const_iterator it;
+    VPoint p;
+    glColorMaterial(GL_FRONT, GL_DIFFUSE);
+    glEnable(GL_COLOR_MATERIAL);
+    glColor3ub(c_.red(),c_.green(),c_.blue());
+    glBegin(GL_TRIANGLES);
+    for(it = begin(); it != end(); ++it) {
+      p = it->vertex(0); 
+      glNormal3d(p.x(),p.y(),p.z()); 	//glVertex3d(p.x(),p.y(),p.z());
+      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
+      p = it->vertex(1); 
+      glNormal3d(p.x(),p.y(),p.z()); 
+      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
+      p = it->vertex(2); 
+      glNormal3d(p.x(),p.y(),p.z()); 
+      glVertex3d(shrink_fac*p.x(),shrink_fac*p.y(),shrink_fac*p.z());
+    }
+    glEnd();
+    glDisable(GL_COLOR_MATERIAL);
+  }
+
+  virtual void print() const 
+  { std::cerr << "triangle " << t_; }
+
+};
+
+//----------------------------------------------------------------------------
+// the sphere:
+//----------------------------------------------------------------------------
+
+ enum { SM_FACES, SM_SKELETON, SM_TRIANGULATION };
+ enum { SM_AXES, SM_CUBE };
+
+class Unit_sphere : public OGL_base_object {
+  typedef std::list<Gen_object*> Object_list;
+  typedef Object_list::const_iterator  Object_const_iterator;
+  typedef Object_list::iterator  Object_iterator;
+  
+  GLUquadricObj*        sphere_;
+  int                   style_;
+  bool                  initialized_;
+  Object_list           objects_,triangles_,triangle_edges_;
+  GLuint                sphere_list_;
+  std::vector<bool>     switches;
+
+public:
+void init() { 
+  style_ = SM_FACES; 
+  switches[0] = true;
+  switches[1] = false;
+  gluQuadricNormals(sphere_,GLenum(GLU_SMOOTH));
+}
+
+Unit_sphere() : switches(2) { 
+  sphere_ = gluNewQuadric(); 
+  initialized_ = false; 
+  init(); 
+}
+
+void clear_list() 
+{ while ( objects_.begin() != objects_.end() ) {
+    delete (*objects_.begin());
+    objects_.pop_front();
+  }
+  while ( triangles_.begin() != triangles_.end() ) {
+    delete (*triangles_.begin());
+    triangles_.pop_front();
+  }
+  while ( triangle_edges_.begin() != triangle_edges_.end() ) {
+    delete (*triangle_edges_.begin());
+    triangle_edges_.pop_front();
+  }
+}
+
+void copy_list(const Unit_sphere& S)
+{ Object_const_iterator it;
+  CGAL_forall_iterators (it,S.objects_)
+    objects_.push_back( (*it)->clone() );
+  CGAL_forall_iterators (it,S.triangles_)
+    triangles_.push_back( (*it)->clone() );
+  CGAL_forall_iterators (it,S.triangle_edges_)
+    triangle_edges_.push_back( (*it)->clone() );
+}
+
+void print() const
+{ std::cerr << "Dumping Unit_sphere:\n";
+  for (Object_const_iterator it = objects_.begin();
+       it != objects_.end(); ++it)
+     (*it)->print();
+  std::cerr << std::endl;
+  for (Object_const_iterator it = triangles_.begin();
+       it != triangles_.end(); ++it)
+     (*it)->print();
+  std::cerr << std::endl;
+}
+
+Unit_sphere(const Unit_sphere& S) : OGL_base_object(), switches(2)
+{ CGAL_NEF_TRACEN("copyconstruction");
+  sphere_ = gluNewQuadric();
+  initialized_ = S.initialized_;
+  style_ = S.style_;
+  switches[0] = S.switches[0];
+  switches[1] = S.switches[1];
+  copy_list(S);
+}
+
+
+Unit_sphere& operator=(const Unit_sphere& S)
+{ CGAL_NEF_TRACEN("assignment");
+  initialized_ = S.initialized_;
+  style_ = S.style_;
+  switches[0] = S.switches[0];
+  switches[1] = S.switches[1];
+  clear_list(); copy_list(S);
+  return *this;
+}
+
+~Unit_sphere() {
+  clear_list(); 
+  gluDeleteQuadric(sphere_); 
+}
+
+template <typename R>
+void push_back(const CGAL::Sphere_point<R>& p,
+  CGAL::Color c = CGAL::YELLOW, unsigned w = 5)
+{ objects_.push_back(new Sphere_point<R>(p,c,w)); }
+
+template <typename R>
+void push_back(const CGAL::Sphere_segment<R>& s,
+  CGAL::Color c = CGAL::BLACK, unsigned w = 1)
+{ objects_.push_back(new Sphere_segment<R>(s,c,w)); }
+
+template <typename R>
+void push_back(const CGAL::Sphere_circle<R>& s,
+  CGAL::Color c = CGAL::BLACK, unsigned w = 1)
+{ objects_.push_back(new Sphere_circle<R>(s,c,w)); }
+
+template <typename R>
+void push_back(const CGAL::Sphere_triangle<R>& t,
+  CGAL::Color c = CGAL::WHITE)
+{ triangles_.push_back(new Sphere_triangle<R>(t,c)); }
+
+template <typename R>
+void push_back_triangle_edge(const CGAL::Sphere_segment<R>& s,
+  CGAL::Color c = CGAL::BLUE, unsigned w = 1)
+{ triangle_edges_.push_back(new Sphere_segment<R>(s,c,w)); }
+
+void set_style(int style) { 
+  style_ = style; 
+}
+
+void toggle(int index) { 
+  switches[index] = !switches[index]; 
+}
+private:
+
+void construct_axes() const
+{ int i;
+  double f(1.02);
+  glNewList(sphere_list_+3, GL_COMPILE);
+  glLineWidth(2.0);
+  // red x-axis and equator
+  glColor3f(1.0,0.0,0.0);
+  glBegin(GL_LINES);
+  glVertex3d(0.0,0.0,0.0);
+  glVertex3d(1.2,0.0,0.0);
+  glEnd();
+  glBegin(GL_LINE_LOOP);
+  for(i=0;i<100;i++)
+    glVertex3d(f*std::cos(2.0*CGAL_PI*i/100.0),f*std::sin(2.0*CGAL_PI*i/100.0),0.0);
+  glEnd();
+  // green y-axis and equator
+  glColor3f(0.0,1.0,0.0);
+  glBegin(GL_LINES);
+  glVertex3d(0.0,0.0,0.0);
+  glVertex3d(0.0,1.2,0.0);
+  glEnd();
+  glBegin(GL_LINE_LOOP);
+  for(i=0;i<100;i++)
+    glVertex3d(0.0,f*std::cos(2.0*CGAL_PI*i/100.0),f*std::sin(2.0*CGAL_PI*i/100.0));
+  glEnd();
+  // blue z-axis and equator
+  glColor3f(0.0,0.0,1.0);
+  glBegin(GL_LINES);
+  glVertex3d(0.0,0.0,0.0);
+  glVertex3d(0.0,0.0,1.2);
+  glEnd();
+  glBegin(GL_LINE_LOOP);
+  for(i=0;i<100;i++)
+    glVertex3d(f*std::cos(2.0*CGAL_PI*i/100.0),0.0,f*std::sin(2.0*CGAL_PI*i/100.0));
+  glEnd();
+  // six coordinate points in pink:
+  glPointSize(10);
+  glColor3f(1,0,1);
+  glBegin(GL_POINTS);
+  glVertex3d(1,0,0);
+  glVertex3d(0,1,0);
+  glVertex3d(0,0,1);
+  glVertex3d(-1,0,0);
+  glVertex3d(0,-1,0);
+  glVertex3d(0,0,-1);
+  glEnd(); glEndList();
+}
+
+void construct_cube() const
+{ 
+  glNewList(sphere_list_+4, GL_COMPILE);
+  glColor3f(1,1,0); // yellow
+  glLineWidth(2.0);
+  glBegin(GL_LINE_LOOP);
+  glVertex3d(-1.0,-1.0,-1.0);
+  glVertex3d( 1.0,-1.0,-1.0);
+  glVertex3d( 1.0, 1.0,-1.0);
+  glVertex3d(-1.0, 1.0,-1.0);
+  glEnd();
+  glBegin(GL_LINE_LOOP);
+  glVertex3d(-1.0,-1.0, 1.0);
+  glVertex3d( 1.0,-1.0, 1.0);
+  glVertex3d( 1.0, 1.0, 1.0);
+  glVertex3d(-1.0, 1.0, 1.0);
+  glEnd();
+  glBegin(GL_LINES);
+  glVertex3d(-1.0,-1.0,-1.0);
+  glVertex3d(-1.0,-1.0, 1.0);
+  glVertex3d( 1.0,-1.0,-1.0);
+  glVertex3d( 1.0,-1.0, 1.0);
+  glVertex3d( 1.0, 1.0,-1.0);
+  glVertex3d( 1.0, 1.0, 1.0);
+  glVertex3d(-1.0, 1.0,-1.0);
+  glVertex3d(-1.0, 1.0, 1.0);
+  glEnd(); glEndList();
+}
+
+void construct()
+{ initialized_=true;
+  sphere_list_ = glGenLists(5);
+  CGAL_assertion_msg(sphere_list_!=0,"no display list.");
+  // skeleton:
+  glNewList(sphere_list_, GL_COMPILE);
+  for (Object_const_iterator it = objects_.begin();
+       it != objects_.end(); ++it) 
+     (*it)->draw();
+  glEndList();
+  // triangles:
+  glNewList(sphere_list_+1, GL_COMPILE);
+  for (Object_const_iterator it = triangles_.begin();
+       it != triangles_.end(); ++it) 
+     (*it)->draw();
+  glEndList();
+  glNewList(sphere_list_+2, GL_COMPILE);
+  for (Object_const_iterator it = triangle_edges_.begin();
+       it != triangle_edges_.end(); ++it) 
+     (*it)->draw();
+  glEndList();
+  // orientation features:
+  construct_axes();
+  construct_cube();
+}
+
+public:
+
+//void draw(GLdouble z_vec[3]) const
+void draw() const
+{ 
+  gluQuadricDrawStyle(sphere_,GLenum(GLU_FILL));
+  glEnable(GL_LIGHTING);
+  if ( style_ == SM_SKELETON ) {
+    glEnable(GL_COLOR_MATERIAL);
+    glColor3f(0.7f,0.7f,0.7f);
+    gluSphere(sphere_,shrink_fac,50,50);
+    glDisable(GL_COLOR_MATERIAL);
+  }
+  glDisable(GL_LIGHTING);
+  if ( !initialized_ ) const_cast<Unit_sphere*>(this)->construct();
+  if ( style_ == SM_FACES || style_ == SM_TRIANGULATION ) {
+    glEnable(GL_LIGHTING); 
+    glCallList(sphere_list_+1); // triangle list
+    glDisable(GL_LIGHTING);
+  }
+  if ( style_ == SM_TRIANGULATION ) {
+    glCallList(sphere_list_+2); // triangle edge list
+  }
+  
+  if ( style_ != SM_TRIANGULATION ) {
+    glCallList(sphere_list_);
+  }
+  if ( switches[0] ) glCallList(sphere_list_+3);
+  if ( switches[1] ) glCallList(sphere_list_+4);
+}
+
+
+};
+
+template <typename Map_>
+class SM_BooleColor 
+{
+  typedef typename Map_::SVertex_const_handle   SVertex_const_handle;   
+  typedef typename Map_::SHalfedge_const_handle SHalfedge_const_handle;   
+  typedef typename Map_::SHalfloop_const_handle SHalfloop_const_handle;   
+  typedef typename Map_::SFace_const_handle     SFace_const_handle;   
+  typedef typename Map_::Mark Mark;   
+public:
+  Color color(SVertex_const_handle, Mark m) const
+  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
+  Color color(SHalfedge_const_handle, Mark m) const
+  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
+  Color color(SHalfloop_const_handle, Mark m) const
+  { return ( m ? CGAL::BLACK : CGAL::WHITE ); }
+  Color color(SFace_const_handle, Mark m) const
+  { return ( m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY ); }
+};
+
+template <typename Nef_polyhedron>
+class NefS2_to_UnitSphere
+{
+  typedef typename Nef_polyhedron::Sphere_map          Sphere_map;
+  typedef typename Nef_polyhedron::Const_decorator     SM_const_decorator;
+  typedef CGAL::OGL::SM_BooleColor<Sphere_map>           Color_;
+  typedef typename Sphere_map::Sphere_kernel        Sphere_kernel;
+  typedef SM_decorator<Sphere_map>                  Decorator;
+  typedef CGAL::SM_triangulator<Decorator>                Base;
+
+  typedef typename Sphere_map::SVertex_const_handle SVertex_const_handle;   
+  typedef typename Sphere_map::SHalfedge_const_handle SHalfedge_const_handle; 
+  typedef typename Sphere_map::SFace_const_handle SFace_const_handle;     
+  typedef typename Sphere_map::SVertex_const_iterator SVertex_const_iterator;
+  typedef typename Sphere_map::SHalfedge_const_iterator SHalfedge_const_iterator;
+  typedef typename Sphere_map::SFace_const_iterator SFace_const_iterator;
+  typedef typename Sphere_map::Mark Mark;
+
+  typedef typename Sphere_kernel::Sphere_point    Sphere_point;
+  typedef typename Sphere_kernel::Sphere_segment  Sphere_segment;
+  typedef typename Sphere_kernel::Sphere_circle   Sphere_circle;
+  typedef typename Sphere_kernel::Sphere_triangle Sphere_triangle;
+
+  typedef Color_                                  Color_objects;  
+
+ public:
+  static CGAL::OGL::Unit_sphere convert(const SM_const_decorator& E_,
+					const Color_objects& CO_ = Color_objects()) {
+    Sphere_map MT_(true);
+    Base T_(&MT_, &E_);
+    CGAL::OGL::Unit_sphere S_;
+
+    T_.triangulate();
+
+    SHalfedge_const_iterator e;
+    CGAL_forall_sedges(e,E_) {
+      if ( e->source() == e->twin()->source() ) {
+	S_.push_back(e->circle(), CO_.color(e,e->mark()));} else {
+	S_.push_back(Sphere_segment(e->source()->point(),
+				    e->twin()->source()->point(),
+				    e->circle()),CO_.color(e,e->mark()));
+      }
+    }
+    // draw sphere circles underlying loops of E_:
+    
+    if ( E_.has_shalfloop() )
+      S_.push_back(
+		   E_.shalfloop()->circle(),
+		   CO_.color(E_.shalfloop(),E_.shalfloop()->mark()));
+    
+    // draw points underlying vertices of E_:
+    SVertex_const_iterator v;
+    CGAL_forall_svertices(v,E_)
+      S_.push_back(v->point(),CO_.color(v,v->mark()));
+    
+    Unique_hash_map<SHalfedge_const_iterator,bool> Done(false);
+    CGAL_forall_shalfedges(e,T_) {
+      if ( Done[e] ) continue;
+      SHalfedge_const_handle en(e->snext()),enn(en->snext());
+      CGAL_NEF_TRACEV(T_.incident_triangle(e));
+      CGAL_NEF_TRACEN(T_.incident_mark(e)<<T_.incident_mark(en)<<T_.incident_mark(enn));
+      CGAL_assertion(T_.incident_mark(e)==T_.incident_mark(en) &&
+		     T_.incident_mark(en)==T_.incident_mark(enn));
+      Mark m = T_.incident_mark(e);
+      Sphere_triangle t = T_.incident_triangle(e);
+      S_.push_back(t, (m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY) );
+      Done[e]=Done[en]=Done[enn]=true;
+    }
+    
+    Done.clear(false);
+    CGAL_forall_shalfedges(e,T_) {
+      if ( Done[e] ) continue;
+      S_.push_back_triangle_edge(Sphere_segment(e->source()->point(),
+						e->twin()->source()->point(),
+						e->circle()));
+      Done[e]=Done[e->twin()]=true;
+    }    
+    return S_;
+  }
+};
+
+} // OGL
+} //namespace CGAL
+
+
+
+template <class R>
+std::ostream& operator<<(std::ostream& os, 
+                         const CGAL::OGL::Sphere_segment<R>& s)
+{ CGAL::OGL::VSegment::const_iterator it;
+   os << s.original() << " ";
+  for (it = s.begin(); it != s.end(); ++it) 
+    os << *it;
+  return os;
+}
+
+template <class R>
+std::ostream& operator<<(std::ostream& os, 
+                         const CGAL::OGL::Sphere_circle<R>& s)
+{ CGAL::OGL::VSegment::const_iterator it;
+   os << s.original() << " ";
+  for (it = s.begin(); it != s.end(); ++it) 
+    os << *it;
+  return os;
+}
+
+
+
+template <class R>
+std::ostream& operator<<(std::ostream& os, 
+                         const CGAL::OGL::Sphere_point<R>& p)
+{ os << p.original() << CGAL::OGL::VPoint(p); return os; }
+
+
+#endif //CGAL_SPHERE_GEOMETRY_OGL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_map.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_point.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_point.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_point.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_point.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_segment.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_segment.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/Sphere_segment.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_segment.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_triangle.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_triangle.h
new file mode 100644
index 0000000..e0624fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/Sphere_triangle.h
@@ -0,0 +1,119 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_SPHERE_TRIANGLE_H
+#define CGAL_SPHERE_TRIANGLE_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+template <class R_> class Sphere_triangle_rep 
+{ typedef Sphere_point<R_>  Point;
+  typedef Sphere_circle<R_> Circle;
+  typedef Sphere_triangle_rep<R_> Rep;
+
+  cpp11::array<Point,3>  points_; 
+  cpp11::array<Circle,3> circles_;
+
+  friend class Sphere_triangle<R_>;
+ 
+  Sphere_triangle_rep(const Point& p1, const Point& p2, const Point& p3,
+        const Circle& c1, const Circle& c2, const Circle& c3) :
+    points_(CGAL::make_array(p1,p2,p3)), circles_(CGAL::make_array(c1,c2,c3)) {}
+public:
+  Sphere_triangle_rep() {}
+};
+
+
+/*{\Manpage{Sphere_triangle}{R}{Triangles on the unit sphere}{t}}*/
+template <class R_> class Sphere_triangle : 
+  public Handle_for< Sphere_triangle_rep<R_> > {
+/*{\Mdefinition An object |\Mvar| of type |\Mname| is a triangle
+on the surface of the unit sphere.}*/
+
+public:
+/*{\Mtypes 5}*/
+typedef R_ R;
+/*{\Mtypemember representation class.}*/
+typedef typename R::RT RT;
+/*{\Mtypemember ring type.}*/
+
+typedef Sphere_triangle_rep<R_> Rep;
+typedef Handle_for<Rep>         Base;
+
+/*{\Mcreation 5}*/
+Sphere_triangle() : Base() {}
+/*{\Mcreate creates some triangle.}*/
+
+Sphere_triangle(
+  const Sphere_point<R>& p0, const Sphere_point<R>& p1, 
+  const Sphere_point<R>& p2,
+  const Sphere_circle<R>& c0, const Sphere_circle<R>& c1, 
+  const Sphere_circle<R>& c2) : Base(Rep(p0,p1,p2,c0,c1,c2)) 
+/*{\Mcreate creates a triangle spanned by the three points
+|p0|, |p1|, |p2|, where the triangle is left of the three circles
+|c0|, |c1|, |c2|. \precond $c_i$ contains $p_i$ and $p_{i+1}$ mod 3.}*/
+{ CGAL_assertion( c0.has_on(p0) && c0.has_on(p1) );
+  CGAL_assertion( c1.has_on(p1) && c1.has_on(p2) );
+  CGAL_assertion( c2.has_on(p2) && c0.has_on(p0) );
+}
+
+Sphere_triangle(const Sphere_triangle<R>& t) : Base(t) {} 
+
+/*{\Moperations 4 2}*/
+
+const Sphere_point<R>& point(unsigned i) const 
+/*{\Mop returns the ith point of |\Mvar|.}*/
+{ return this->ptr()->points_[i%3]; }
+
+const Sphere_circle<R>& circle(unsigned i) const 
+/*{\Mop returns the ith circle of |\Mvar|.}*/
+{ return this->ptr()->circles_[i%3]; }
+
+Sphere_triangle<R> opposite() const 
+/*{\Mop returns the opposite of |\Mvar|.}*/
+{ return Sphere_triangle<R>(point(0), point(1), point(2),
+    circle(0).opposite(), circle(1).opposite(), circle(2).opposite()); }
+
+
+}; // Sphere_triangle<R>
+
+
+template <typename R>
+std::ostream& operator<<(std::ostream& os, 
+                         const CGAL::Sphere_triangle<R>& t)
+{ for (int i=0; i<3; ++i) os << t.point(i);
+  for (int i=0; i<3; ++i) os << t.circle(i);
+  return os; }
+
+template <typename R>
+std::istream& operator>>(std::istream& is, 
+                         CGAL::Sphere_triangle<R>& t)
+{ CGAL::Sphere_point<R> p1,p2,p3;
+  CGAL::Sphere_circle<R> c1,c2,c3;
+  if ( !(is >> p1 >> p2 >> p3 >> c1 >> c2 >> c3) ) return is; 
+  t = CGAL::Sphere_triangle<R>(p1,p2,p3,c1,c2,c3);
+  return is; }
+
+} //namespace CGAL
+#endif //CGAL_SPHERE_TRIANGLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_S2/leda_sphere_map.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/leda_sphere_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_S2/leda_sphere_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_S2/leda_sphere_map.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/sphere_predicates.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/sphere_predicates.h
new file mode 100644
index 0000000..5786a7c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_S2/sphere_predicates.h
@@ -0,0 +1,411 @@
+// Copyright (c) 1997-2002  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel  <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_SPHERE_PREDICATES_H
+#define CGAL_SPHERE_PREDICATES_H
+
+#include <CGAL/basic.h>
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 23
+#include <CGAL/Nef_2/debug.h>
+#include <vector>
+
+#undef CGAL_forall_iterators
+#define CGAL_forall_iterators(x,L)\
+for(x = (L).begin(); x != (L).end(); ++x) 
+
+
+namespace CGAL {
+
+/* |spherical_orientation| takes three points of one hemisphere and
+returns the orientation of $p_3$ with respect to the halfcircle
+through $p_1$ and $p_2$. We map this to the 3d orientation predicate
+of the origin, $p_1$, $p_2$, and $p_3$ */
+
+template <class R>
+int spherical_orientation(const Sphere_point<R>& p1, 
+                          const Sphere_point<R>& p2, 
+                          const Sphere_point<R>& p3)
+{ return CGAL::orientation(typename R::Point_3(0,0,0),
+			   (typename R::Point_3)p1,
+			   (typename R::Point_3)p2,
+			   (typename R::Point_3)p3); }
+
+
+/* |spherical_compare| codes our order of points during the sweep. The
+south pole is the first point, the north pole is the last point, then
+we order lexicographically. We cover the special case where both
+points are part of the equator first. Otherwise we sort according to
+the angle of the halfcircle through $S$, $N$, and the points with
+respect to the xy-plane. If both lie on the same halfcircle then the
+angle with respect to $OS$ decides. The parameter $pos=1$ does
+everthing in the positive halfsphere. If $pos=-1$ then we rotate the
+whole scenery around the y-axis by $\pi$. Then the x-axis points left
+and the z-axis into the equatorial plane. */
+
+template <class R>
+bool is_south(const Sphere_point<R>& p, int axis) {
+  if(axis==1)  
+    return (p.hz() >  0 &&
+	    p.hx() == 0 &&
+	    p.hy() == 0);
+  
+  return (p.hy() <  0 &&
+	  p.hx() == 0 &&
+	  p.hz() == 0);
+}
+
+template <class R>
+bool is_north(const Sphere_point<R>& p, int axis) {
+  if(axis==1)  
+    return (p.hz() <  0 &&
+	    p.hx() == 0 &&
+	    p.hy() == 0);
+  
+  return (p.hy() >  0 &&
+	  p.hx() == 0 &&
+	  p.hz() == 0);
+}
+
+template <class R>
+int spherical_compare(const Sphere_point<R>& p1, 
+		      const Sphere_point<R>& p2,
+		      int axis, int pos) {
+  
+  Sphere_point<R> pS, pN;
+  CGAL_assertion(axis>=0 && axis<=2);
+  switch(axis) {
+  case 0:
+    pS=Sphere_point<R>(0,-1,0);
+    //    pN=Sphere_point<R>(0,1,0);
+    break;
+  case 1:
+    pS=Sphere_point<R>(0,0,1);
+    //    pN=Sphere_point<R>(0,0,-1);
+    break;
+  case 2: 
+    pS=Sphere_point<R>(0,-1,0);
+    //    pN=Sphere_point<R>(0,1,0);
+    break;
+  }
+  typename R::Direction_3 
+    d1(p1-CGAL::ORIGIN), 
+    d2(p2-CGAL::ORIGIN);
+  if (d1 == d2) return 0;
+  if(is_south(p1,axis) || is_north(p2,axis)) return -1;
+  if(is_south(p2,axis) || is_north(p1,axis)) return 1;
+  //  if (d1 == dS || d2 == dN) return -1;
+  //  if (d1 == dN || d2 == dS) return  1;
+  // now no more special cases 
+  if (axis==0 && (p1.hx()==static_cast<typename R::RT>(0) && 
+		  p2.hx()==static_cast<typename R::RT>(0))) {
+      int s1 = CGAL_NTS sign(p1.hz());
+      int s2 = CGAL_NTS sign(p2.hz());
+      if ( s1 != s2 ) return pos * -s1;
+      // now s1 == s2
+      return -s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(1,0,0),p2);
+  } else 
+  if (axis==1 && (p1.hy()==static_cast<typename R::RT>(0) && 
+		  p2.hy()==static_cast<typename R::RT>(0))) {
+    int s1 = CGAL_NTS sign(p1.hx());
+    int s2 = CGAL_NTS sign(p2.hx());
+    if ( s1 != s2 ) return pos * s1;
+    // now s1 == s2
+    return s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(0,1,0),p2);
+  } else 
+  if (axis==2 && (p1.hz()==static_cast<typename R::RT>(0) && 
+		  p2.hz()==static_cast<typename R::RT>(0))) { 
+    int s1 = CGAL_NTS sign(p1.hx());
+    int s2 = CGAL_NTS sign(p2.hx());
+    if ( s1 != s2 ) return pos * s1;
+    // now s1 == s2
+    return s1 * CGAL::spherical_orientation(p1,Sphere_point<R>(0,0,1),p2);
+  }
+  int sor = CGAL::spherical_orientation(pS,p1,p2);
+  if ( sor ) return sor;
+  if(axis==0)
+    return CGAL::spherical_orientation(Sphere_point<R>(0,0,pos),p2,p1);
+  return CGAL::spherical_orientation(Sphere_point<R>(-pos,0,0),p2,p1);
+}
+
+/* the next two functions partition the segments in a list into a list
+that carries the segment parts that are only part of a halfspace.
+Halfcircles are again divided into two equally sized pieces. */
+
+template <class R, class I>
+void partition(const Sphere_circle<R>& c, I start, I beyond, 
+               std::list< Sphere_segment<R> >& Lpos)
+{ CGAL_NEF_TRACEN("partition ");
+  Sphere_segment<R> s1,s2,s3;
+  while ( start != beyond ) { CGAL_NEF_TRACEN("  "<<*start);
+    int i = start->intersection(c,s1,s2);
+    if (i>1) Lpos.push_back(s2);
+    if (i>0) Lpos.push_back(s1);
+    ++start;
+  }
+}
+
+template <class R, class I>
+void partition_xy(I start, I beyond,
+                  std::list< Sphere_segment<R> >& L, int pos)
+{
+  Sphere_circle<R> xy_circle(0,0,1), yz_circle(1,0,0);
+  Sphere_point<R> S(0,-1,0),N(0,1,0);
+  Sphere_segment<R> s1,s2;
+  if (pos > 0)  partition(xy_circle,start,beyond,L);
+  else partition(xy_circle.opposite(),start,beyond,L);
+  typename std::list< Sphere_segment<R> >::iterator it,itl;
+  CGAL_NEF_TRACEN("partition_xy ");
+  CGAL_forall_iterators(it,L) {
+    CGAL_NEF_TRACEN("  "<<*it);
+    if ( equal_as_sets(it->sphere_circle(),xy_circle) ) {
+      CGAL_NEF_TRACEN("  splitting xy seg "<<*it);
+      int n1 =  it->intersection(yz_circle,s1,s2);
+      if (n1 > 1 && !s2.is_degenerate()) L.insert(it,s2);
+      if (n1 > 0 && !s1.is_degenerate()) L.insert(it,s1);
+      int n2 =  it->intersection(yz_circle.opposite(),s1,s2);
+      if (n2 > 1 && !s2.is_degenerate()) L.insert(it,s2);
+      if (n2 > 0 && !s1.is_degenerate()) L.insert(it,s1);
+      itl = it; --it; L.erase(itl); 
+      // at least one item was appended
+    }
+  }
+  CGAL_forall_iterators(it,L) {
+    if ( it->is_halfcircle() ) {
+      CGAL_NEF_TRACEN("  splitting halfcircle "<<*it);
+      Sphere_segment<R> s1,s2;
+      it->split_halfcircle(s1,s2);
+      *it = s2; L.insert(it,s1);
+    }
+  }
+  // append 4 xy-equator segments:
+  Sphere_segment<R> sp(S,N,xy_circle);
+  Sphere_segment<R> sm(S,N,xy_circle.opposite());
+  Sphere_segment<R> s[4];
+  sp.split_halfcircle(s[0],s[1]);
+  sm.split_halfcircle(s[2],s[3]);
+  L.insert(L.end(),s,s+4);
+}
+
+
+/* |intersection| calculates the intersection of a halfspace $h$
+(defined via a great circle $c$) with a sphere segment
+$s$. Interesting are the boundary cases. If an endpoint is part of
+$h^0$, but the part of $s$ incident to the endpoint is not part of
+$h^{0+}$ then we return a trivial segment.
+
+*/
+
+/*
+template <typename R> 
+int Sphere_segment<R>::
+intersection(const CGAL::Sphere_circle<R>& c, std::vector<Sphere_segment<R> >& s) const {  
+
+  CGAL_NEF_TRACEN("    intersection "<<*this<<" "<<c);
+  if ( is_degenerate() ) { 
+    CGAL_NEF_TRACEN("    degenerate");
+    s.push_back(*this); 
+    return 1;
+  }
+
+  CGAL::Oriented_side or1 = c.oriented_side(source());
+  CGAL::Oriented_side or2 = c.oriented_side(target());
+
+  CGAL_NEF_TRACEN("    Orientation " << or1 << " " << or2);
+
+  if ( or1 == CGAL::opposite(or2) && or1 != or2 ) { 
+    // it is sure that $s$ intersects $h$ in its interior. the
+    //   question is which part is in the halfspace $h^+$.
+    CGAL_NEF_TRACEN("    opposite");
+    Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
+    if ( !has_on(i1) ) 
+      i1 = i1.antipode();
+    s.push_back(Sphere_segment<R>(source(),i1,sphere_circle()));
+    s.push_back(Sphere_segment<R>(i1,target(),sphere_circle()));
+    return 2;
+  }
+  else if ( or1 == CGAL::ON_ORIENTED_BOUNDARY && 
+            or2 == CGAL::ON_ORIENTED_BOUNDARY ) { 
+    // if both ends of $s$ are part of $h$ then $s$ is a halfcircle or
+    //   $s$ is fully part of $h$.  In this case we have to check if the
+    //   halfcircle is not part of $h^-$.  This can be formulated by an
+    //   orientation test of the point $p$ at the tip of the normal of
+    //   |s.sphere_circle()| with respect to the plane through the
+    //   endpoints of $s$ and the tip of the normal of $h$.
+    CGAL_NEF_TRACEN("    both in plane");
+    s.push_back(*this); 
+    return 1;
+  }
+  else if ( or1 != CGAL::ON_NEGATIVE_SIDE && 
+            or2 != CGAL::ON_NEGATIVE_SIDE ) { 
+    // this case covers the endpoints of $s$ as part of the closed
+    //   oriented halfspace $h^{0+}$. At least one is part of
+    //   $h^{+}$. If $s$ is not long then the segment must be fully part
+    //   of $h^{0+}$. Otherwise if $s$ is long, then we at both ends
+    //   there are subsegments as part of $h^{0+}$ (one might be
+    //   degenerate). 
+    if ( is_long() ) { 
+      Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
+      Sphere_point<R> i2 = i1.antipode();
+      Sphere_segment<R> so(i1,i2,sphere_circle());
+      if ( so.has_on(source()) && so.has_on(target()) )
+	std::swap(i1,i2);
+      // now source(),i1,i2,target() are circularly ordered
+      s.push_back(Sphere_segment(source(),i1,sphere_circle()));
+      s.push_back(Sphere_segment(i1,i2,sphere_circle()));
+      s.push_back(Sphere_segment(i2,target(),sphere_circle()));
+      //      CGAL_NEF_TRACEN("    both >= plane, long "<<s1<<s2);
+      return 3;
+    } // now short:
+    CGAL_NEF_TRACEN("    both >= plane, short ");
+    s.push_back(*this); 
+    return 1; 
+  } 
+  else if ( or1 != CGAL::ON_POSITIVE_SIDE && 
+            or2 != CGAL::ON_POSITIVE_SIDE ) { 
+    // either both endpoints of $s$ are in $h^-$ or one is in $h^-$
+    //   and one on $h^0$. 
+    if ( is_long() ) { 
+      Sphere_point<R> i1 = CGAL::intersection(ptr()->c_,c);
+      Sphere_point<R> i2 = i1.antipode();
+      Sphere_segment so(i1,i2,sphere_circle());
+      //      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
+      if ( so.has_on(source()) && so.has_on(target()) )
+      { so = so.complement(); }
+      //      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
+      s.push_back(Sphere_segment(source(),so.source(),sphere_circle()));
+      s.push_back(so);
+      s.push_back(Sphere_segment(so.target(),target(),sphere_circle()));
+      return 3;
+    } // now short
+    CGAL_NEF_TRACEN("    both <= plane, short");
+    s.push_back(*this);
+    return 1;
+  }
+
+  CGAL_error_msg("Oops, forgot some case.");
+  return -1;
+}
+*/
+
+template <typename R> 
+int Sphere_segment<R>::
+intersection(const CGAL::Sphere_circle<R>& c,
+             Sphere_segment<R>& s1, Sphere_segment<R>& s2) const
+{  
+  CGAL_NEF_TRACEN("    intersection "<<*this<<" "<<c);
+  if ( is_degenerate() ) { CGAL_NEF_TRACEN("    degenerate");
+    if ( !c.has_on_negative_side(source()) ) 
+    { s1 = *this; return 1; }
+    return 0;
+  }
+  CGAL::Oriented_side or1 = c.oriented_side(source());
+  CGAL::Oriented_side or2 = c.oriented_side(target());
+  if ( or1 == CGAL::opposite(or2) && or1 != or2 ) { 
+// it is sure that $s$ intersects $h$ in its interior. the
+//       question is which part is in the halfspace $h^+$.
+    CGAL_NEF_TRACEN("    opposite");
+    Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
+    if ( !has_on(i1) ) i1 = i1.antipode();
+    if ( or1 == CGAL::ON_POSITIVE_SIDE ) 
+      s1 = Sphere_segment<R>(source(),i1,sphere_circle());
+    else if ( or2 == CGAL::ON_POSITIVE_SIDE )
+      s1 = Sphere_segment<R>(i1,target(),sphere_circle());
+    else CGAL_error_msg("no intersection.");
+    return 1;
+  }
+  else if ( or1 == CGAL::ON_ORIENTED_BOUNDARY && 
+            or2 == CGAL::ON_ORIENTED_BOUNDARY ) { 
+// if both ends of $s$ are part of $h$ then $s$ is a halfcircle or
+//    $s$ is fully part of $h$.  In this case we have to check if the
+//    halfcircle is not part of $h^-$.  This can be formulated by an
+//    orientation test of the point $p$ at the tip of the normal of
+//    |s.sphere_circle()| with respect to the plane through the
+//   endpoints of $s$ and the tip of the normal of $h$. 
+    CGAL_NEF_TRACEN("    both in plane");
+    if ( source() != target().antipode() ) {
+      s1 = *this; return 1;
+    } 
+    // now this is a halfcircle
+    bool halfcircle_notin_hminus =
+      (CGAL::orientation(source(),target(),
+			 CGAL::ORIGIN + c.orthogonal_vector(),
+			 CGAL::ORIGIN + sphere_circle().orthogonal_vector())
+       != CGAL::POSITIVE);
+    CGAL_NEF_TRACE("    ");CGAL_NEF_TRACEV(halfcircle_notin_hminus);
+    if ( halfcircle_notin_hminus ) { s1 = *this; return 1; }
+    else { 
+      s1 = Sphere_segment(source(),source(),sphere_circle());
+      s2 = Sphere_segment(target(),target(),sphere_circle());
+      return 2;
+    }
+  }
+  else if ( or1 != CGAL::ON_NEGATIVE_SIDE && 
+            or2 != CGAL::ON_NEGATIVE_SIDE ) { 
+// this case covers the endpoints of $s$ as part of the closed
+//   oriented halfspace $h^{0+}$. At least one is part of
+//   $h^{+}$. If $s$ is not long then the segment must be fully part
+//   of $h^{0+}$. Otherwise if $s$ is long, then we at both ends
+//   there are subsegments as part of $h^{0+}$ (one might be
+//   degenerate).
+    if ( is_long() ) { 
+      Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
+      Sphere_point<R> i2 = i1.antipode();
+      Sphere_segment<R> so(i1,i2,sphere_circle());
+      if ( so.has_on(source()) && so.has_on(target()) )
+	std::swap(i1,i2);
+      // now source(),i1,i2,target() are circularly ordered
+      s1 = Sphere_segment(source(),i1,sphere_circle());
+      s2 = Sphere_segment(i2,target(),sphere_circle());
+      CGAL_NEF_TRACEN("    both >= plane, long "<<s1<<s2);
+      return 2;
+    } // now short:
+    CGAL_NEF_TRACEN("    both >= plane, short ");
+    s1=*this; return 1; 
+  } 
+  else if ( or1 != CGAL::ON_POSITIVE_SIDE && 
+            or2 != CGAL::ON_POSITIVE_SIDE ) { 
+// either both endpoints of $s$ are in $h^-$ or one is in $h^-$
+//     and one on $h^0$.
+    if ( is_long() ) { 
+      Sphere_point<R> i1 = CGAL::intersection(this->ptr()->c_,c);
+      Sphere_point<R> i2 = i1.antipode();
+      Sphere_segment<R> so(i1,i2,sphere_circle());
+      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
+      if ( so.has_on(source()) && so.has_on(target()) )
+      { so = so.complement(); }
+      CGAL_NEF_TRACEN("    both <= plane, long"<<so);
+      s1 = so; return 1;
+    } // now short
+    CGAL_NEF_TRACEN("    both <= plane, short");
+    if ( or1 == CGAL::ON_ORIENTED_BOUNDARY ) 
+    { s1 = Sphere_segment<R>(source(),source(),sphere_circle()); return 1; }
+    if ( or2 == CGAL::ON_ORIENTED_BOUNDARY ) 
+    { s1 = Sphere_segment<R>(target(),target(),sphere_circle()); return 1; }
+    return 0;
+  }
+
+  CGAL_error_msg("Oops, forgot some case.");
+  return -1;
+}
+
+} //namespace CGAL
+
+#endif //CGAL_SPHERE_PREDICATES_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_nary_intersection_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_nary_intersection_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_nary_intersection_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_nary_intersection_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_nary_union_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_nary_union_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_nary_union_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_nary_union_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_2.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_2.h
new file mode 100644
index 0000000..8ae3cf0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_2.h
@@ -0,0 +1,1137 @@
+// Copyright (c) 1997-2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>
+
+#ifndef CGAL_NEF_POLYHEDRON_2_H
+#define CGAL_NEF_POLYHEDRON_2_H
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4800) // complaint about performance in std::map where we can't do anything
+#endif                          
+
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Nef_2/HDS_items.h>
+#include <CGAL/HalfedgeDS_default.h>
+
+#include <CGAL/Is_extended_kernel.h>
+#include <CGAL/Nef_2/PM_explorer.h>
+#include <CGAL/Nef_2/PM_decorator.h>
+#include <CGAL/Nef_2/PM_io_parser.h>
+#include <CGAL/Nef_2/PM_overlayer.h>
+//#include <CGAL/Nef_2/PM_transformer.h>
+#include <CGAL/Nef_2/PM_point_locator.h>
+#include <CGAL/Nef_2/Bounding_box_2.h>
+#include <vector>
+#include <list>
+
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/variate_generator.hpp>
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 11
+#include <CGAL/Nef_2/debug.h>
+
+namespace CGAL {
+
+template <typename T, typename I, typename M> class Nef_polyhedron_2;
+template <typename T, typename I, typename M> class Nef_polyhedron_2_rep;
+
+template <typename T, typename I, typename M>
+std::ostream& operator<<(std::ostream&, const Nef_polyhedron_2<T,I,M>&); 
+
+template <typename T, typename I, typename M>
+std::istream& operator>>(std::istream&, Nef_polyhedron_2<T,I,M>&);
+
+template <typename T, typename Items, typename Mark_>
+class Nef_polyhedron_2_rep 
+{ 
+  typedef Nef_polyhedron_2_rep<T,Items,Mark_> Self;
+  friend class Nef_polyhedron_2<T,Items,Mark_>;
+
+  struct HDS_traits {
+    typedef typename T::Point_2 Point;
+    typedef Mark_                Mark;
+  };
+
+public: // gcc-3.3 otherwise claims that Decorator in Polyhedron_2 is private
+  typedef CGAL_HALFEDGEDS_DEFAULT<HDS_traits,Items> Plane_map;
+  typedef CGAL::PM_const_decorator<Plane_map>           Const_decorator;
+  typedef CGAL::PM_decorator<Plane_map>                 Decorator;
+  typedef CGAL::PM_naive_point_locator<Decorator,T>     Slocator;
+  typedef CGAL::PM_point_locator<Decorator,T>           Locator;
+  typedef CGAL::PM_overlayer<Decorator,T>               Overlayer;
+
+private:
+
+  Plane_map pm_; 
+  Locator* pl_;
+  
+  void init_locator() 
+  { 
+    if ( !pl_ ) 
+      pl_ = new Locator(pm_); 
+  }
+
+  void clear_locator() 
+  { 
+    if ( pl_ ) { 
+      delete pl_; 
+      pl_=0; 
+    } 
+  }
+
+public:
+  Nef_polyhedron_2_rep() 
+    : pm_(), pl_(0) 
+  {}
+
+  Nef_polyhedron_2_rep(const Self& ) 
+    : pm_(), pl_(0) 
+  {}
+
+  ~Nef_polyhedron_2_rep() 
+  { 
+    pm_.clear(); 
+    clear_locator(); 
+  }
+};
+
+/*{\Moptions print_title=yes }*/ 
+/*{\Manpage {Nef_polyhedron_2}{T}{Nef Polyhedra in the Plane}{N}}*/
+
+/*{\Mdefinition
+An instance of data type |\Mname| is a subset of the plane that is
+the result of forming complements and intersections starting from a
+finite set |H| of half-spaces. |\Mtype| is closed under all binary set
+operations |intersection|, |union|, |difference|, |complement| and
+under the topological operations |boundary|, |closure|, and
+|interior|.
+
+The template parameter |T| is specified via an extended kernel
+concept. |T| must be a model of the concept |ExtendedKernelTraits_2|.
+}*/
+
+template <typename T, typename Items_=HDS_items, typename Mark_=bool>
+class Nef_polyhedron_2 
+  : public Handle_for< Nef_polyhedron_2_rep<T,Items_,Mark_> >
+{ 
+public:
+typedef T Extended_kernel;
+static  T EK; // static extended kernel
+
+  /*{\Mtypes 7}*/
+  typedef Mark_ Mark;
+  /*{\Xtypemember marking set membership or exclusion.}*/
+  typedef Items_ Items;
+  typedef Nef_polyhedron_2<T,Items,Mark> Self;
+  typedef Handle_for< Nef_polyhedron_2_rep<T,Items,Mark> > Base;
+  typedef typename T::Point_2   Extended_point;
+  typedef typename T::Segment_2 Extended_segment;
+
+  typedef typename T::Standard_line_2 Line;
+  /*{\Mtypemember the oriented lines modeling half-planes}*/
+  typedef typename T::Standard_point_2 Point;
+  /*{\Mtypemember the affine points of the plane.}*/
+  typedef typename T::Standard_direction_2 Direction;
+  /*{\Mtypemember directions in our plane.}*/
+  typedef typename T::Standard_aff_transformation_2  Aff_transformation;
+  /*{\Mtypemember affine transformations of the plane.}*/
+
+
+  // types for choosing the right constructor
+  struct Polylines {};
+  struct Polygons {};
+
+  typedef Polylines Polylines_tag;
+  typedef Polygons Polygons_tag;
+
+  enum Operation { JOIN=0 };
+
+  enum Boundary { EXCLUDED=0, INCLUDED=1 };
+  /*{\Menum construction selection.}*/
+
+  enum Content { EMPTY=0, COMPLETE=1 };
+  /*{\Menum construction selection}*/
+
+  static const Polylines POLYLINES;
+  static const Polygons POLYGONS;
+protected:
+  struct AND { bool operator()(bool b1, bool b2)  const { return b1&&b2; }  };
+  struct OR { bool operator()(bool b1, bool b2)   const { return b1||b2; }  };
+  struct DIFF { bool operator()(bool b1, bool b2) const { return b1&&!b2; } };
+  struct XOR { bool operator()(bool b1, bool b2)  const 
+                                           { return (b1&&!b2)||(!b1&&b2); } };
+
+  typedef Nef_polyhedron_2_rep<T,Items,Mark>           Nef_rep;
+  typedef typename Nef_rep::Plane_map       Plane_map;
+  typedef typename Nef_rep::Decorator       Decorator;
+  typedef typename Nef_rep::Const_decorator Const_decorator;
+  typedef typename Nef_rep::Overlayer       Overlayer;
+  //typedef typename Nef_rep::T               Transformer;
+  typedef typename Nef_rep::Slocator        Slocator;
+  typedef typename Nef_rep::Locator         Locator;
+
+  using Base::ptr;
+  using Base::is_shared;
+
+  Plane_map& pm() { return ptr()->pm_; } 
+  const Plane_map& pm() const { return ptr()->pm_; } 
+
+  friend std::ostream& operator<< <>
+      (std::ostream& os, const Nef_polyhedron_2<T,Items,Mark>& NP);
+  friend std::istream& operator>> <>
+      (std::istream& is, Nef_polyhedron_2<T,Items,Mark>& NP);
+
+  typedef typename Decorator::Vertex_handle         Vertex_handle;
+  typedef typename Decorator::Halfedge_handle       Halfedge_handle;
+  typedef typename Decorator::Face_handle           Face_handle;
+  typedef typename Decorator::Vertex_const_handle   Vertex_const_handle;
+  typedef typename Decorator::Halfedge_const_handle Halfedge_const_handle;
+  typedef typename Decorator::Face_const_handle     Face_const_handle;
+
+  typedef typename Decorator::Vertex_iterator       Vertex_iterator;
+  typedef typename Decorator::Halfedge_iterator     Halfedge_iterator;
+  typedef typename Decorator::Face_iterator         Face_iterator;
+  typedef typename Const_decorator::Vertex_const_iterator   
+                                                    Vertex_const_iterator;
+  typedef typename Const_decorator::Halfedge_const_iterator 
+                                                    Halfedge_const_iterator;
+  typedef typename Const_decorator::Face_const_iterator     
+                                                    Face_const_iterator;
+
+  typedef Bounding_box_2<typename Is_extended_kernel<Extended_kernel>::value_type, 
+                         Extended_kernel> Box_2;
+
+  struct Except_frame_box_edges {
+    Decorator D_; 
+    Face_handle f_;
+
+    Except_frame_box_edges(Plane_map& P) 
+      : D_(P), f_(D_.faces_begin()) 
+    {}
+    
+    bool 
+    operator()(Halfedge_handle e, const Tag_true& ) const
+    { 
+      return D_.face(e)==f_ || D_.face(D_.twin(e))==f_; 
+    }
+
+    bool 
+    operator()(Halfedge_handle /*e*/, const Tag_false& ) const
+    { 
+      return false;
+    }
+    bool
+    operator()(Halfedge_handle e) const
+    {
+      return this->operator()(e, typename Is_extended_kernel<Extended_kernel>::value_type());
+    }
+
+  };
+
+  friend struct Except_frame_box_edges;
+
+  typedef std::list<Extended_segment>      ES_list;
+  typedef typename ES_list::const_iterator ES_iterator;
+
+  void fill_with_frame_segs(ES_list& L, const Tag_true& ) const
+  /*{\Xop fills the list with the four segments which span our frame,
+     the convex hull of SW,SE,NW,NE.}*/
+  { L.push_back(Extended_segment(EK.SW(),EK.NW()));
+    L.push_back(Extended_segment(EK.SW(),EK.SE()));
+    L.push_back(Extended_segment(EK.NW(),EK.NE()));
+    L.push_back(Extended_segment(EK.SE(),EK.NE()));
+  }
+
+  void fill_with_frame_segs(ES_list& , const Tag_false& ) const
+  {}
+
+  void fill_with_frame_segs(ES_list& L) const
+  { 
+
+    fill_with_frame_segs(L, typename Is_extended_kernel<Extended_kernel>::value_type());
+  }
+
+  struct Link_to_iterator {
+    const Decorator& D;
+    Halfedge_handle _e;
+    Vertex_handle   _v;
+    ES_iterator     _it;
+    Mark            _m;
+    Link_to_iterator(const Decorator& d, ES_iterator it, Mark m) : 
+      D(d), _e(), _v(), _it(it), _m(m) {}
+
+    void supporting_segment(Halfedge_handle e, ES_iterator it) 
+    {
+      if ( it == _it )
+        _e = e;
+      D.mark(e) = _m; 
+    }
+    void trivial_segment(Vertex_handle v, ES_iterator it) 
+    {
+      if ( it == _it )
+        _v = v;
+      D.mark(v) = _m;
+    }
+    void starting_segment(Vertex_handle v, ES_iterator) 
+    { D.mark(v) = _m; }
+    void passing_segment(Vertex_handle v, ES_iterator) 
+    { D.mark(v) = _m; }
+    void ending_segment(Vertex_handle v, ES_iterator) 
+    { D.mark(v) = _m; }
+
+  };
+
+  template<typename IT>
+  struct From_intersecting_polygons {
+
+    Unique_hash_map<Halfedge_handle,IT>& halfedge2iterator;
+
+    From_intersecting_polygons(Unique_hash_map<Halfedge_handle,IT>& e2i) 
+      : halfedge2iterator(e2i) {}
+
+    void supporting_segment(Halfedge_handle e, IT it) 
+    { 
+      halfedge2iterator[e->opposite()] = 
+	halfedge2iterator[e] = it; e->mark() = true;}      
+
+    void trivial_segment(Vertex_handle v, IT) 
+    { v->mark() = true; }
+    void starting_segment(Vertex_handle v, IT) 
+    { v->mark() = true; }
+    void passing_segment(Vertex_handle v, IT) 
+    { v->mark() = true; }
+    void ending_segment(Vertex_handle v, IT) 
+    { v->mark() = true; }
+  };  
+
+  friend struct Link_to_iterator;
+
+  void clear_outer_face_cycle_marks(const Tag_true&) 
+  { // unset all frame marks
+    Decorator D(pm());
+    Face_iterator f = D.faces_begin(); 
+    D.mark(f) = false;
+    Halfedge_handle e = D.holes_begin(f);
+    D.set_marks_in_face_cycle(e, false);
+  }
+
+  void clear_outer_face_cycle_marks(const Tag_false&)
+  {}
+
+  void clear_outer_face_cycle_marks()
+  {
+    clear_outer_face_cycle_marks(typename Is_extended_kernel<Extended_kernel>::value_type());
+  }
+
+public:
+  /*{\Mcreation 3}*/
+  Nef_polyhedron_2(Content plane = EMPTY) : Base(Nef_rep())
+  /*{\Mcreate creates an instance |\Mvar| of type |\Mname|
+  and initializes it to the empty set if |plane == EMPTY|
+  and to the whole plane if |plane == COMPLETE|.}*/
+  {
+    ES_list L;
+    fill_with_frame_segs(L);
+    Overlayer D(pm());
+    Link_to_iterator I(D, --L.end(), false);
+    D.create(L.begin(),L.end(),I);
+    D.mark(--D.faces_end()) = bool(plane);
+  }
+
+
+  Nef_polyhedron_2(const Line& l, Boundary line = INCLUDED) : Base(Nef_rep())
+  /*{\Mcreate creates a Nef polyhedron |\Mvar| containing the half-plane
+  left of |l| including |l| if |line==INCLUDED|, excluding |l| if 
+  |line==EXCLUDED|.}*/  
+  {   CGAL_NEF_TRACEN("Nconstruction from line "<<l);
+    ES_list L;
+    fill_with_frame_segs(L);
+    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
+      Extended_point ep1 = EK.construct_opposite_point(l);
+      Extended_point ep2 = EK.construct_point(l);
+      L.push_back(EK.construct_segment(ep1,ep2));
+    }
+    Overlayer D(pm());
+    Link_to_iterator I(D, --L.end(), false);
+    D.create(L.begin(),L.end(),I);
+    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
+      CGAL_assertion( I._e != Halfedge_handle() );
+      Halfedge_handle el = I._e;
+      if ( D.point(D.target(el)) != EK.target(L.back()) )
+	el = D.twin(el);
+      D.mark(D.face(el)) = true;
+      D.mark(el) = bool(line);
+    } else {
+      D.mark(--D.faces_end()) = bool(EMPTY);
+      std::cerr << "Constructor not available with standard kernel. "
+                   " Returned empty polygon!" << std::endl;
+    }
+  }
+
+
+  template <class Forward_iterator>
+  Nef_polyhedron_2(Forward_iterator it, Forward_iterator end,
+    Boundary b = INCLUDED) : Base(Nef_rep())
+  /*{\Mcreate creates a Nef polyhedron |\Mvar| from the simple polygon
+  |P| spanned by the list of points in the iterator range |[it,end)| and
+  including its boundary if |b = INCLUDED| and excluding the boundary
+  otherwise. |Forward_iterator| has to be an iterator with value type
+  |Point|. This construction expects that |P| is simple. The degenerate
+  cases where |P| contains no point, one point or spans just one segment
+  (two points) are correctly handled. In all degenerate cases there's
+  only one unbounded face adjacent to the degenerate polygon. If |b ==
+  INCLUDED| then |\Mvar| is just the boundary. If |b == EXCLUDED| then
+  |\Mvar| is the whole plane without the boundary.}*/
+  { 
+    ES_list L;
+    fill_with_frame_segs(L);
+    bool empty = false;  
+    if (it != end) 
+      {
+        Extended_point ef, ep = ef = EK.construct_point(*it);
+        Forward_iterator itl=it; ++itl;
+        if (itl == end) // case only one point
+          L.push_back(EK.construct_segment(ep,ep));
+        else { // at least one segment
+          while( itl != end ) {
+            Extended_point en = EK.construct_point(*itl);
+            L.push_back(EK.construct_segment(ep,en));
+            ep = en; ++itl;
+          }
+          L.push_back(EK.construct_segment(ep,ef));
+        }
+      }
+
+    else empty = true;
+    Overlayer D(pm());
+    Link_to_iterator I(D, --L.end(), true);
+    D.create(L.begin(),L.end(),I);
+    if ( empty ) {
+      D.mark(--D.faces_end()) = !bool(b); return; }
+    CGAL_assertion( I._e != Halfedge_handle() || I._v != Vertex_handle() );
+
+    if ( EK.is_degenerate(L.back()) ) {
+      // its a point
+      CGAL_assertion(I._v != Vertex_handle());
+      D.mark(D.face(I._v)) = !bool(b); D.mark(I._v) = b;
+    } else {
+      // at least one segment
+      Halfedge_handle el = I._e;
+      if ( D.point(D.target(el)) != EK.target(L.back()) )
+	el = D.twin(el);  
+      D.set_marks_in_face_cycle(el,bool(b));
+      unsigned int n = 
+        check_tag(typename Is_extended_kernel<Extended_kernel>::value_type()) ? 2 : 1;
+      if ( D.number_of_faces() > n ) D.mark(D.face(el)) = true;
+      else                           D.mark(D.face(el)) = !bool(b);
+    }
+
+    clear_outer_face_cycle_marks();
+  }
+
+  // The constructor which takes an iterator range of polygons
+  template <class Forward_iterator>
+  Nef_polyhedron_2(Forward_iterator pit, Forward_iterator pend,	      
+		   Polygons, Operation op = JOIN) : Base(Nef_rep()) { 
+
+    CGAL_assertion(op==JOIN);
+
+    typedef typename std::iterator_traits<Forward_iterator>::value_type
+      iterator_pair;
+    typedef typename iterator_pair::first_type point_iterator;
+    point_iterator it, itl, end;
+
+    ES_list L;
+
+    fill_with_frame_segs(L);
+    for(;pit != pend; ++pit) {
+      it = pit->first;
+      end = pit->second;
+      if (it != end) {
+        Extended_point ef, ep = ef = EK.construct_point(*it);
+        itl=it; ++itl;
+        if (itl == end) // case only one point
+          L.push_back(EK.construct_segment(ep,ep));
+        else { // at least one segment
+          while( itl != end ) {
+            Extended_point en = EK.construct_point(*itl);
+            L.push_back(EK.construct_segment(ep,en));
+            ep = en; ++itl;
+          }
+          L.push_back(EK.construct_segment(ep,ef));
+        }
+      }
+    }
+
+    Overlayer D(pm());
+    Unique_hash_map<Halfedge_handle,ES_iterator> e2i;
+    From_intersecting_polygons<ES_iterator> fip(e2i);
+    D.create(L.begin(),L.end(),fip);
+
+    Face_handle outer_face;
+    if(check_tag(typename Is_extended_kernel<Extended_kernel>::value_type()))
+      outer_face = ++D.faces_begin();
+    else
+      outer_face = D.faces_begin();
+    Halfedge_handle e;
+    for(e=D.halfedges_begin(); e!=D.halfedges_end(); ++e) {
+      if(&*e < &*(D.twin(e)) && EK.is_standard(D.source(e)->point())) {
+	ES_iterator eit = e2i[e];
+	if(lexicographically_xy_smaller(EK.standard_point(eit->source()),
+					EK.standard_point(eit->target()))) {
+	  if(lexicographically_xy_smaller(EK.standard_point(D.source(D.twin(e))->point()),
+					  EK.standard_point(D.source(e)->point())))
+	    e = D.twin(e);
+	} else
+	  if(lexicographically_xy_smaller(EK.standard_point(D.source(e)->point()),
+					  EK.standard_point(D.source(D.twin(e))->point())))
+	    e = D.twin(e);
+	if(D.face(e) != outer_face)
+	  D.mark(D.face(e)) = true;
+      }
+    }
+    
+    D.simplify(Except_frame_box_edges(pm()));
+    clear_outer_face_cycle_marks();
+  }
+
+
+  // The constructor which takes an iterator range of polylines
+  template <class Forward_iterator>
+  Nef_polyhedron_2(Forward_iterator pit, Forward_iterator pend,	      
+		   Polylines) : Base(Nef_rep()) { 
+
+    typedef typename std::iterator_traits<Forward_iterator>::value_type 
+      iterator_pair;
+    typedef typename iterator_pair::first_type point_iterator;
+    point_iterator it, itl, end;
+
+    ES_list L;
+
+    fill_with_frame_segs(L);
+    for(;pit != pend; ++pit) {
+      it = pit->first;
+      end = pit->second;
+      if (it != end) {
+        Extended_point ep  = EK.construct_point(*it);
+        itl=it; ++itl;
+        if (itl == end) // case only one point
+          L.push_back(EK.construct_segment(ep,ep));
+        else { // at least one segment
+          while( itl != end ) {
+            Extended_point en = EK.construct_point(*itl);
+            L.push_back(EK.construct_segment(ep,en));
+            ep = en;
+	    ++itl;
+          }
+        }
+      }
+    }
+
+    Overlayer D(pm());
+    Link_to_iterator I(D, --L.end(), true);
+    D.create(L.begin(),L.end(),I, Overlayer::POLYLINE);
+    
+    clear_outer_face_cycle_marks();
+  }
+
+  Nef_polyhedron_2(const Nef_polyhedron_2<T,Items,Mark>& N1) : Base(N1) {}
+  Nef_polyhedron_2& operator=(const Nef_polyhedron_2<T,Items,Mark>& N1)
+  { Base::operator=(N1); return (*this); }
+  ~Nef_polyhedron_2() {}
+
+
+
+  template <class Forward_iterator>
+  Nef_polyhedron_2(Forward_iterator first, Forward_iterator beyond, 
+    double p) : Base(Nef_rep())
+  /*{\Xcreate creates a random Nef polyhedron from the arrangement of
+  the set of lines |S = set[first,beyond)|. The cells of the arrangement
+  are selected uniformly at random with probability $p$. \precond $0 < p
+  < 1$.}*/
+  { CGAL_assertion(0<p && p<1);
+    ES_list L; fill_with_frame_segs(L);
+    while ( first != beyond ) {
+      Extended_point ep1 = EK.construct_opposite_point(*first);
+      Extended_point ep2 = EK.construct_point(*first);
+      L.push_back(EK.construct_segment(ep1,ep2)); ++first;
+    }
+    Overlayer D(pm());
+    Link_to_iterator I(D, --L.end(), false);
+    D.create(L.begin(),L.end(),I);
+
+    boost::rand48 rng;
+    boost::uniform_real<> dist(0,1);
+    boost::variate_generator<boost::rand48&, boost::uniform_real<> > get_double(rng,dist);
+
+    Vertex_iterator v; Halfedge_iterator e; Face_iterator f;
+    for (v = D.vertices_begin(); v != D.vertices_end(); ++v)
+      D.mark(v) = ( get_double() < p ? true : false );
+    for (e = D.halfedges_begin(); e != D.halfedges_end(); ++(++e))
+      D.mark(e) = ( get_double() < p ? true : false );
+    for (f = D.faces_begin(); f != D.faces_end(); ++f)
+      D.mark(f) = ( get_double() < p ? true : false );
+    D.simplify(Except_frame_box_edges(pm()));
+    clear_outer_face_cycle_marks(); 
+  }
+
+
+
+  protected:
+  Nef_polyhedron_2(const Plane_map& H, bool clone=true) : Base(Nef_rep()) 
+  /*{\Xcreate makes |\Mvar| a new object.  If |clone==true| then the
+  underlying structure of |H| is copied into |\Mvar|.}*/
+  { if (clone) {
+      Decorator D(pm()); // a decorator working on the rep plane map
+      D.clone(H);        // cloning H into pm()
+    }
+  }
+  void clone_rep() { *this = Nef_polyhedron_2<T,Items,Mark>(pm()); }
+
+  /*{\Moperations 4 3 }*/
+  public:
+
+  void clear(Content plane = EMPTY)
+  { *this = Nef_polyhedron_2(plane); }
+  /*{\Mop makes |\Mvar| the empty set if |plane == EMPTY| and the
+  full plane if |plane == COMPLETE|.}*/
+
+  bool is_empty() const
+  /*{\Mop returns true if |\Mvar| is empty, false otherwise.}*/
+  { Const_decorator D(pm());
+    Face_const_iterator f = D.faces_begin();
+    if(check_tag(typename Is_extended_kernel<Extended_kernel>::
+		 value_type()))
+      return (D.number_of_vertices()==4 &&
+	      D.number_of_edges()==4 &&
+	      D.number_of_faces()==2 &&
+	      D.mark(++f) == false);
+    else
+      return (D.number_of_vertices()==0 &&
+	      D.number_of_edges()==0 &&
+	      D.number_of_faces()==1 &&
+		D.mark(f) == false);    
+  }
+
+  bool is_plane() const
+  /*{\Mop returns true if |\Mvar| is the whole plane, false otherwise.}*/
+  { Const_decorator D(pm());
+    Face_const_iterator f = D.faces_begin();
+    if(check_tag(typename Is_extended_kernel<Extended_kernel>::
+         value_type()))
+      return (D.number_of_vertices()==4 &&
+              D.number_of_edges()==4 &&
+              D.number_of_faces()==2 &&
+              D.mark(++f) == true);
+    else
+      return (D.number_of_vertices()==0 &&
+          D.number_of_edges()==0 &&
+          D.number_of_faces()==1 &&
+          D.mark(f) == true);
+  }
+
+  void extract_complement()
+  { CGAL_NEF_TRACEN("extract complement");
+  if ( this->is_shared() ) {
+	  clone_rep();
+  }
+    Overlayer D(pm());
+    Vertex_iterator v, vend = D.vertices_end();
+    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = !D.mark(v);
+    Halfedge_iterator e, eend = D.halfedges_end();
+    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = !D.mark(e);
+    Face_iterator f, fend = D.faces_end();
+    for(f = D.faces_begin(); f != fend; ++f)         D.mark(f) = !D.mark(f);
+    clear_outer_face_cycle_marks();
+  }
+
+  void extract_interior()
+  { CGAL_NEF_TRACEN("extract interior");
+    if ( this->is_shared() ) clone_rep();
+    Overlayer D(pm());
+    Vertex_iterator v, vend = D.vertices_end();
+    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = false;
+    Halfedge_iterator e, eend = D.halfedges_end();
+    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = false;
+    D.simplify(Except_frame_box_edges(pm()));
+  }
+
+
+  void extract_boundary()
+  { CGAL_NEF_TRACEN("extract boundary");
+    if ( this->is_shared() ) clone_rep();
+    Overlayer D(pm());
+    Vertex_iterator v, vend = D.vertices_end();
+    for(v = D.vertices_begin(); v != vend; ++v)      D.mark(v) = true;
+    Halfedge_iterator e, eend = D.halfedges_end();
+    for(e = D.halfedges_begin(); e != eend; ++(++e)) D.mark(e) = true;
+    Face_iterator f, fend = D.faces_end();
+    for(f = D.faces_begin(); f != fend; ++f)         D.mark(f) = false;
+    clear_outer_face_cycle_marks();
+    D.simplify(Except_frame_box_edges(pm()));
+  }
+
+  void extract_closure()
+  /*{\Xop converts |\Mvar| to its closure. }*/
+  { CGAL_NEF_TRACEN("extract closure");
+    extract_complement();
+    extract_interior();
+    extract_complement();
+  }
+
+  void extract_regularization()
+  /*{\Xop converts |\Mvar| to its regularization. }*/
+  { CGAL_NEF_TRACEN("extract regularization");
+    extract_interior();
+    extract_closure();
+  }
+
+  /*{\Mtext \headerline{Constructive Operations}}*/
+
+  Nef_polyhedron_2<T,Items,Mark> complement() const
+  /*{\Mop returns the complement of |\Mvar| in the plane.}*/
+  { Nef_polyhedron_2<T,Items,Mark> res = *this;
+    res.extract_complement();
+    return res;
+  }
+
+
+  Nef_polyhedron_2<T,Items,Mark> interior() const
+  /*{\Mop returns the interior of |\Mvar|.}*/
+  { Nef_polyhedron_2<T,Items,Mark> res = *this;
+    res.extract_interior();
+    return res;
+  }
+
+  Nef_polyhedron_2<T,Items,Mark> closure() const
+  /*{\Mop returns the closure of |\Mvar|.}*/
+  { Nef_polyhedron_2<T,Items,Mark> res = *this;
+    res.extract_closure();
+    return res;
+  }
+
+  Nef_polyhedron_2<T,Items,Mark> boundary() const
+  /*{\Mop returns the boundary of |\Mvar|.}*/
+  { Nef_polyhedron_2<T,Items,Mark> res = *this;
+    res.extract_boundary();
+    return res;
+  }
+
+  Nef_polyhedron_2<T,Items,Mark> regularization() const
+  /*{\Mop returns the regularized polyhedron (closure of interior).}*/
+  { Nef_polyhedron_2<T,Items,Mark> res = *this;
+    res.extract_regularization();
+    return res;
+  }
+
+
+  Nef_polyhedron_2<T,Items,Mark> intersection(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  /*{\Mop returns |\Mvar| $\cap$ |N1|. }*/
+  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
+    Overlayer D(res.pm());
+    D.subdivide(pm(),N1.pm());
+    AND _and; D.select(_and);
+    res.clear_outer_face_cycle_marks();
+    D.simplify(Except_frame_box_edges(res.pm()));
+    return res;
+  }
+
+
+  Nef_polyhedron_2<T,Items,Mark> join(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  /*{\Mop returns |\Mvar| $\cup$ |N1|. }*/
+  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
+    Overlayer D(res.pm());
+    D.subdivide(pm(),N1.pm());
+    OR _or; D.select(_or);
+    res.clear_outer_face_cycle_marks();
+    D.simplify(Except_frame_box_edges(res.pm()));
+    return res;
+  }
+
+  Nef_polyhedron_2<T,Items,Mark> difference(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  /*{\Mop returns |\Mvar| $-$ |N1|. }*/
+  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
+    Overlayer D(res.pm());
+    D.subdivide(pm(),N1.pm());
+    DIFF _diff; D.select(_diff);
+    res.clear_outer_face_cycle_marks();
+    D.simplify(Except_frame_box_edges(res.pm()));
+    return res;
+  }    
+
+  Nef_polyhedron_2<T,Items,Mark> symmetric_difference(
+    const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ 
+          |T - \Mvar|. }*/
+  { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame
+    Overlayer D(res.pm());
+    D.subdivide(pm(),N1.pm());
+    XOR _xor; D.select(_xor);
+    res.clear_outer_face_cycle_marks();
+    D.simplify(Except_frame_box_edges(res.pm()));
+    return res;
+  }
+
+  #if 0
+  Nef_polyhedron_2<T,Items,Mark> transform(const Aff_transformation& t) const
+  /*{\Mop returns $t(|\Mvar|)$.}*/
+  { Nef_polyhedron_2<T,Items,Mark> res(pm()); // cloned
+    Transformer PMT(res.pm());
+    PMT.transform(t);
+    return res;
+  }
+  #endif
+
+
+  /*{\Mtext Additionally there are operators |*,+,-,^,!| which
+  implement the binary operations \emph{intersection}, \emph{union},
+  \emph{difference}, \emph{symmetric difference}, and the unary
+  operation \emph{complement} respectively. There are also the
+  corresponding modification operations |*=,+=,-=,^=|.}*/
+
+  Nef_polyhedron_2<T,Items,Mark>  operator*(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return intersection(N1); }
+
+  Nef_polyhedron_2<T,Items,Mark>  operator+(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return join(N1); }
+
+  Nef_polyhedron_2<T,Items,Mark>  operator-(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return difference(N1); }
+
+  Nef_polyhedron_2<T,Items,Mark>  operator^(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return symmetric_difference(N1); }
+
+  Nef_polyhedron_2<T,Items,Mark>  operator!() const
+  { return complement(); }
+   
+  Nef_polyhedron_2<T,Items,Mark>& operator*=(const Nef_polyhedron_2<T,Items,Mark>& N1)
+  { *this = intersection(N1); return *this; }
+
+  Nef_polyhedron_2<T,Items,Mark>& operator+=(const Nef_polyhedron_2<T,Items,Mark>& N1)
+  { *this = join(N1); return *this; }
+
+  Nef_polyhedron_2<T,Items,Mark>& operator-=(const Nef_polyhedron_2<T,Items,Mark>& N1)
+  { *this = difference(N1); return *this; }
+
+  Nef_polyhedron_2<T,Items,Mark>& operator^=(const Nef_polyhedron_2<T,Items,Mark>& N1)
+  { *this = symmetric_difference(N1); return *this; }
+
+  /*{\Mtext There are also comparison operations like |<,<=,>,>=,==,!=|
+  which implement the relations subset, subset or equal, superset, superset
+  or equal, equality, inequality, respectively.}*/
+
+  bool operator==(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return symmetric_difference(N1).is_empty(); }
+
+  bool operator!=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return !operator==(N1); }  
+
+  bool operator<=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return difference(N1).is_empty(); } 
+
+  bool operator<(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return difference(N1).is_empty() && !N1.difference(*this).is_empty(); } 
+
+  bool operator>=(const Nef_polyhedron_2<T,Items,Mark>& N1) const
+  { return N1.difference(*this).is_empty(); } 
+
+  bool operator>(const Nef_polyhedron_2<T,Items,Mark>& N1) const   
+  { return N1.difference(*this).is_empty() && !difference(N1).is_empty(); } 
+
+
+  /*{\Mtext \headerline{Exploration - Point location - Ray shooting}
+  As Nef polyhedra are the result of forming complements 
+  and intersections starting from a set |H| of half-spaces that are
+  defined by oriented lines in the plane, they can be represented by
+  an attributed plane map $M = (V,E,F)$. For topological queries
+  within |M| the following types and operations allow exploration
+  access to this structure.}*/
+
+  /*{\Mtypes 3}*/
+  typedef Const_decorator Topological_explorer;
+
+  typedef CGAL::PM_explorer<Const_decorator,T> Explorer;
+  /*{\Mtypemember a decorator to examine the underlying plane map. 
+  See the manual page of |Explorer|.}*/
+
+  typedef typename Locator::Object_handle Object_handle;
+  /*{\Mtypemember a generic handle to an object of the underlying
+  plane map. The kind of object |(vertex, halfedge, face)| can 
+  be determined and the object can be assigned to a corresponding
+  handle by the three functions:\\
+  |bool assign(Vertex_const_handle& h, Object_handle)|\\
+  |bool assign(Halfedge_const_handle& h, Object_handle)|\\
+  |bool assign(Face_const_handle& h, Object_handle)|\\
+  where each function returns |true| iff the assignment to
+  |h| was done.}*/
+
+  enum Location_mode { DEFAULT, NAIVE, LMWT };
+  /*{\Menum selection flag for the point location mode.}*/
+
+
+  /*{\Moperations 3 1 }*/
+
+  void init_locator() const 
+  { const_cast<Self*>(this)->ptr()->init_locator(); }
+  const Locator& locator() const 
+  { CGAL_assertion(ptr()->pl_); return *(ptr()->pl_); }
+
+
+  bool contains(Object_handle h) const
+  /*{\Mop  returns true iff the object |h| is contained in the set
+  represented by |\Mvar|.}*/
+  { Slocator PL(pm()); return PL.mark(h); }
+
+  bool contained_in_boundary(Object_handle h) const
+  /*{\Mop  returns true iff the object |h| is contained in the $1$-skeleton
+  of |\Mvar|.}*/
+  { Vertex_const_handle v;
+    Halfedge_const_handle e;
+    return  ( CGAL::assign(v,h) || CGAL::assign(e,h) );
+  }
+
+  Object_handle locate(const Point& p, Location_mode m = DEFAULT) const
+  /*{\Mop  returns a generic handle |h| to an object (face, halfedge, vertex) 
+  of the underlying plane map that contains the point |p| in its relative 
+  interior. The point |p| is contained in the set represented by |\Mvar| if 
+  |\Mvar.contains(h)| is true. The location mode flag |m| allows one to choose
+  between different point location strategies.}*/
+  { 
+    if (m == DEFAULT || m == LMWT) {
+      init_locator();
+      Extended_point ep = EK.construct_point(p);
+      return locator().locate(ep);
+    } else if (m == NAIVE) {
+      Slocator PL(pm(),EK);
+      Extended_segment s(EK.construct_point(p),
+			 PL.point(PL.vertices_begin()));
+      return PL.locate(s); 
+    }
+    CGAL_error_msg("location mode not implemented.");
+    return Object_handle();
+  }
+
+  struct INSET {
+    const Const_decorator& D;
+    INSET(const Const_decorator& Di) : D(Di) {}
+    bool operator()(Vertex_const_handle v) const { return D.mark(v); }
+    bool operator()(Halfedge_const_handle e) const { return D.mark(e); }
+    bool operator()(Face_const_handle f) const { return D.mark(f); }
+  };
+
+  friend struct INSET;
+
+  Object_handle ray_shoot(const Point& p, const Direction& d, 
+                          Location_mode m = DEFAULT) const
+  /*{\Mop returns a handle |h| with |\Mvar.contains(h)| that can be
+  converted to a |Vertex_/Halfedge_/Face_const_handle| as described
+  above. The object returned is intersected by the ray starting in |p|
+  with direction |d| and has minimal distance to |p|.  The operation
+  returns the null handle |NULL| if the ray shoot along |d| does not hit
+  any object |h| of |\Mvar| with |\Mvar.contains(h)|. The location mode
+  flag |m| allows one to choose between different point location
+  strategies.}*/
+  { 
+    Extended_point ep, eq;
+    if(!check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
+      Const_decorator D(pm());
+      Box_2 b(D.vertices_begin(), D.vertices_end());
+      ep = EK.construct_point(p);
+      eq = b.intersection_ray_bbox(p,d);
+    } else {
+      ep = EK.construct_point(p);
+      eq = EK.construct_point(p,d);      
+    }
+      
+    if (m == DEFAULT || m == LMWT) {
+      init_locator();
+      return locator().ray_shoot(EK.construct_segment(ep,eq),
+                                 INSET(locator())); 
+    } else if (m == NAIVE) {
+      Slocator PL(pm(),EK);
+      return PL.ray_shoot(EK.construct_segment(ep,eq),INSET(PL));
+    }
+    CGAL_error_msg("location mode not implemented.");
+    return Object_handle();
+  }
+
+  struct INSKEL {
+    bool operator()(Vertex_const_handle) const { return true; }
+    bool operator()(Halfedge_const_handle) const { return true; }
+    bool operator()(Face_const_handle) const { return false; }
+  };
+
+  Object_handle ray_shoot_to_boundary(const Point& p, const Direction& d, 
+                Location_mode m = DEFAULT) const
+  /*{\Mop returns a handle |h| that can be converted to a
+  |Vertex_/Halfedge_const_handle| as described above. The object
+  returned is part of the $1$-skeleton of |\Mvar|, intersected by the
+  ray starting in |p| with direction |d| and has minimal distance to
+  |p|.  The operation returns the null handle |NULL| if the ray shoot
+  along |d| does not hit any $1$-skeleton object |h| of |\Mvar|. The
+  location mode flag |m| allows one to choose between different point
+  location strategies.}*/
+  { 
+    Extended_point ep, eq;
+    if(!check_tag(typename Is_extended_kernel<Extended_kernel>::value_type())) {
+      Const_decorator D(pm());
+      Box_2 b(D.vertices_begin(), D.vertices_end());
+      ep = EK.construct_point(p);
+      eq = b.intersection_ray_bbox(p,d);
+    } else {
+      ep = EK.construct_point(p);
+      eq = EK.construct_point(p,d);      
+    }
+      
+    if (m == DEFAULT || m == LMWT) {
+      init_locator();
+      return locator().ray_shoot(EK.construct_segment(ep,eq),
+                                 INSKEL()); 
+    } else if (m == NAIVE) {
+      Slocator PL(pm(),EK);
+      return PL.ray_shoot(EK.construct_segment(ep,eq),INSKEL());
+    }
+    CGAL_error_msg("location mode not implemented.");
+    return Object_handle();
+  }
+
+
+  Explorer explorer() const { return Explorer(pm(),EK); }
+  /*{\Mop returns a decorator object which allows read-only access of
+  the underlying plane map. See the manual page |Explorer| for its 
+  usage.}*/
+
+
+  /*{\Mimplementation Nef polyhedra are implemented on top of a halfedge
+  data structure and use linear space in the number of vertices, edges
+  and facets.  Operations like |empty| take constant time. The
+  operations |clear|, |complement|, |interior|, |closure|, |boundary|,
+  |regularization|, input and output take linear time. All binary set
+  operations and comparison operations take time $O(n \log n)$ where $n$
+  is the size of the output plus the size of the input.
+
+  The point location and ray shooting operations are implemented in
+  two flavors. The |NAIVE| operations run in linear query time without
+  any preprocessing, the |DEFAULT| operations (equals |LMWT|) run in
+  sub-linear query time, but preprocessing is triggered with the first
+  operation. Preprocessing takes time $O(N^2)$, the sub-linear point
+  location time is either logarithmic when LEDA's persistent
+  dictionaries are present or if not then the point location time is
+  worst-case linear, but experiments show often sublinear runtimes.  Ray
+  shooting equals point location plus a walk in the constrained
+  triangulation overlayed on the plane map representation. The cost of
+  the walk is proportional to the number of triangles passed in
+  direction |d| until an obstacle is met. In a minimum weight
+  triangulation of the obstacles (the plane map representing the
+  polyhedron) the theory provides a $O(\sqrt{n})$ bound for the number
+  of steps. Our locally minimum weight triangulation approximates the
+  minimum weight triangulation only heuristically (the calculation of
+  the minimum weight triangulation is conjectured to be NP hard). Thus
+  we have no runtime guarantee but a strong experimental motivation for
+  its approximation.}*/
+
+  /*{\Mexample Nef polyhedra are parameterized by a so-called extended
+  geometric kernel. There are three kernels, one based on a homogeneous
+  representation of extended points called |Extended_homogeneous<RT>|
+  where |RT| is a ring type providing additionally a |gcd| operation and
+  one based on a cartesian representation of extended points called
+  |Extended_cartesian<NT>| where |NT| is a field type, and finally
+  |Filtered_extended_homogeneous<RT>| (an optimized version of the
+  first).
+
+  The member types of |Nef_polyhedron_2< Extended_homogeneous<NT> >|
+  map to corresponding types of the CGAL geometry kernel
+  (e.g. |Nef_polyhedron::Line| equals
+  |CGAL::Homogeneous<leda_integer>::Line_2| in the example below).
+  \begin{Mverb}
+  #include <CGAL/basic.h>
+  #include <CGAL/leda_integer.h>
+  #include <CGAL/Extended_homogeneous.h>
+  #include <CGAL/Nef_polyhedron_2.h>
+
+  using namespace CGAL;
+  typedef  Extended_homogeneous<leda_integer> Extended_kernel;
+  typedef  Nef_polyhedron_2<Extended_kernel>  Nef_polyhedron;
+  typedef  Nef_polyhedron::Line               Line;
+
+  int main()
+  {
+    Nef_polyhedron N1(Line(1,0,0));
+    Nef_polyhedron N2(Line(0,1,0), Nef_polyhedron::EXCLUDED);
+    Nef_polyhedron N3 = N1 * N2; // line (*)
+    return 0;
+  }
+  \end{Mverb}
+  After line (*) |N3| is the intersection of |N1| and |N2|.}*/
+
+
+}; // end of Nef_polyhedron_2
+
+template <typename T, typename Items, typename Mark>
+T Nef_polyhedron_2<T,Items,Mark>::EK;
+
+
+template <typename T, typename Items, typename Mark>
+const typename Nef_polyhedron_2<T,Items,Mark>::Polygons Nef_polyhedron_2<T,Items,Mark>::POLYGONS = typename Nef_polyhedron_2<T,Items,Mark>::Polygons();
+
+template <typename T, typename Items, typename Mark>
+const typename Nef_polyhedron_2<T,Items,Mark>::Polylines Nef_polyhedron_2<T,Items,Mark>::POLYLINES = typename Nef_polyhedron_2<T,Items,Mark>::Polylines();
+
+template <typename T, typename Items, typename Mark>
+std::ostream& operator<<
+ (std::ostream& os, const Nef_polyhedron_2<T,Items,Mark>& NP)
+{
+  os << "Nef_polyhedron_2<" << NP.EK.output_identifier() << ">\n";
+  typedef typename Nef_polyhedron_2<T,Items,Mark>::Decorator Decorator;
+  CGAL::PM_io_parser<Decorator> O(os, NP.pm()); O.print();
+  return os;
+}
+
+template <typename T, typename Items, typename Mark>
+std::istream& operator>>
+  (std::istream& is, Nef_polyhedron_2<T,Items,Mark>& NP)
+{
+  typedef typename Nef_polyhedron_2<T,Items,Mark>::Decorator Decorator;
+  CGAL::PM_io_parser<Decorator> I(is, NP.pm()); 
+  if (I.check_sep("Nef_polyhedron_2<") &&
+      I.check_sep(NP.EK.output_identifier()) &&
+      I.check_sep(">")) I.read();
+  else {
+    std::cerr << "Nef_polyhedron_2 input corrupted." << std::endl;
+    NP = Nef_polyhedron_2<T,Items,Mark>();
+  }
+  typename Nef_polyhedron_2<T,Items,Mark>::Topological_explorer D(NP.explorer());
+  D.check_integrity_and_topological_planarity();
+  return is;
+}
+
+
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif //CGAL_NEF_POLYHEDRON_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_3.h
new file mode 100644
index 0000000..b6f5b2d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_3.h
@@ -0,0 +1,2130 @@
+// Copyright (c) 1997-2002,2005 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel    <seel at mpi-sb.mpg.de>
+//                 Miguel Granados <granados at mpi-sb.mpg.de>
+//                 Susan Hert      <hert at mpi-sb.mpg.de>
+//                 Lutz Kettner    <kettner at mpi-sb.mpg.de>
+//                 Ralf Osbild     <osbild at mpi-sb.mpg.de>
+//                 Peter Hachenberger <hachenberger at mpi-sb.mpg.de>
+#ifndef CGAL_NEF_POLYHEDRON_3_H
+#define CGAL_NEF_POLYHEDRON_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Nef_3/Default_items.h>
+#include <CGAL/Nef_3/SNC_structure.h>
+#include <CGAL/Nef_3/SNC_decorator.h>
+#include <CGAL/Nef_3/SNC_const_decorator.h>
+#include <CGAL/Nef_3/SNC_constructor.h>
+#include <CGAL/Nef_3/SNC_external_structure.h>
+#include <CGAL/Nef_3/Combine_with_halfspace.h>
+#ifdef CGAL_NEF_VISUAL_HULL
+#include <CGAL/Nef_3/Binary_operation_vs.h>
+#else
+#include <CGAL/Nef_3/Binary_operation.h>
+#endif
+#include <CGAL/Nef_S2/SM_decorator.h>
+#include <CGAL/Nef_S2/SM_const_decorator.h>
+#include <CGAL/Nef_3/SNC_SM_overlayer.h>
+#include <CGAL/Nef_S2/SM_point_locator.h>
+#include <CGAL/Nef_3/SNC_SM_explorer.h>
+#include <CGAL/Nef_polyhedron_S2.h>
+#include <CGAL/Modifier_base.h>
+#include <CGAL/Nef_3/Mark_bounded_volumes.h>
+
+
+#ifdef CGAL_NEF3_CGAL_NEF3_SM_VISUALIZOR
+#include <CGAL/Nef_3/SNC_SM_visualizor.h>
+#endif // CGAL_NEF3_SM_VISUALIZOR
+
+#ifdef CGAL_NEF3_OLD_VISUALIZATION 
+#include <CGAL/Nef_3/Visualizor_OpenGL_3.h>
+#endif // CGAL_NEF3_OLD_VISUALIZATION 
+
+#include <CGAL/IO/Verbose_ostream.h>
+#include <CGAL/Nef_3/polyhedron_3_to_nef_3.h>
+#include <CGAL/Nef_3/shell_to_nef_3.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Nef_3/SNC_point_locator.h>
+#include <CGAL/assertions.h>
+
+#include <CGAL/Constrained_triangulation_2.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/Projection_traits_xy_3.h>
+#include <CGAL/Projection_traits_yz_3.h>
+#include <CGAL/Projection_traits_xz_3.h>
+#include <CGAL/Constrained_triangulation_face_base_2.h>
+#include <list>
+
+// RO: includes for "vertex cycle to Nef" constructor
+#include <CGAL/Nef_3/vertex_cycle_to_nef_3.h>
+#include <CGAL/Vector_3.h>
+#include <CGAL/normal_vector_newell_3.h>
+
+#ifdef CGAL_NEF_VISUAL_HULL
+#include <CGAL/Nef_3/Modifying_binary_operation_vs.h>
+#endif
+
+#undef CGAL_NEF_DEBUG
+#define CGAL_NEF_DEBUG 11
+#include <CGAL/Nef_2/debug.h>
+
+namespace CGAL {
+
+template <typename K, typename I, typename M> class Nef_polyhedron_3;
+template <typename K, typename I, typename M> class Nef_polyhedron_3_rep;
+
+template <typename K, typename I, typename M>
+std::ostream& operator<<(std::ostream& os, Nef_polyhedron_3<K,I,M>& NP);
+
+template <typename K, typename I, typename M>
+std::istream& operator>>(std::istream& os, Nef_polyhedron_3<K,I,M>& NP);
+
+
+template <typename K, typename I, typename M>
+class Nef_polyhedron_3_rep 
+{ 
+  typedef Nef_polyhedron_3_rep<K,I,M>                  Self;
+  friend class Nef_polyhedron_3<K,I,M>;
+ public:
+  typedef CGAL::SNC_structure<K,I,M>                      SNC_structure;
+  typedef CGAL::SNC_decorator<SNC_structure>              SNC_decorator;
+  typedef CGAL::SNC_const_decorator<SNC_structure>        SNC_const_decorator;
+  typedef CGAL::Binary_operation<SNC_structure>           Binary_operation;
+  typedef CGAL::SNC_constructor<I, SNC_structure>         SNC_constructor;
+  typedef CGAL::SNC_external_structure<I, SNC_structure>  SNC_external_structure;
+  typedef CGAL::SNC_point_locator<SNC_decorator> SNC_point_locator;
+  typedef CGAL::SNC_simplify<I, SNC_structure>            SNC_simplify;
+  typedef CGAL::SNC_point_locator_by_spatial_subdivision<SNC_decorator> SNC_point_locator_default;
+
+  typedef typename SNC_structure::Sphere_map       Sphere_map;
+  typedef CGAL::SM_decorator<Sphere_map>           SM_decorator;
+  typedef CGAL::SM_const_decorator<Sphere_map>     SM_const_decorator;
+  typedef CGAL::SNC_SM_overlayer<I, SM_decorator>  SM_overlayer;
+  typedef CGAL::SM_point_locator<SNC_structure>    SM_point_locator;
+
+#ifdef CGAL_NEF3_SM_VISUALIZOR
+  typedef CGAL::SNC_SM_visualizor<SNC_structure>       SM_visualizor;
+#endif // CGAL_NEF3_SM_VISUALIZOR
+
+ private:
+  SNC_structure snc_;
+  SNC_point_locator* pl_;
+  
+ public:
+  Nef_polyhedron_3_rep() : snc_(), pl_() {}
+  ~Nef_polyhedron_3_rep() { 
+    CGAL_NEF_TRACEN( "Nef_polyhedron_3_rep: destroying SNC structure "<<&snc_<<
+	    ", point locator "<<pl_);
+    snc_.clear(); 
+    delete pl_; 
+  }
+};
+
+/*{\Manpage {Nef_polyhedron_3} {T} {Nef Polyhedra in Space}{N}}*/
+
+/*{\Mdefinition
+An instance of data type |\Mname| is a subset of 3-space which is the
+result of forming complements and intersections starting from a set |H| of
+halfspaces. |\Mtype| is closed under all binary set opertions |intersection|,
+|union|, |difference|, |complement| and under the topological operations
+|boundary|, |closure|, and |interior|.}*/
+
+template <typename Kernel_, typename Items_ = typename CGAL::Default_items<Kernel_>::Items, typename Mark_ = bool>
+class Nef_polyhedron_3 : public CGAL::Handle_for< Nef_polyhedron_3_rep<Kernel_, Items_, Mark_> >, 
+			 public SNC_const_decorator<SNC_structure<Kernel_,Items_,Mark_> >
+{ 
+ public:
+  /*{\Mtypes 7}*/  
+  
+  typedef Kernel_                                     Kernel;
+  typedef Kernel_                                     Traits;
+  typedef Items_                                      Items;
+  typedef Mark_                                       Mark;
+  typedef Nef_polyhedron_3<Kernel, Items, Mark>       Self;
+  typedef Nef_polyhedron_3<Kernel, Items, Mark>       Nef_polyhedron;
+  typedef Handle_for< Nef_polyhedron_3_rep<Kernel, Items, Mark> >   Base;
+  typedef typename Kernel::Point_3                    Point_3;
+  typedef typename Kernel::Plane_3                    Plane_3;
+  typedef typename Kernel::Vector_3                   Vector_3;
+  typedef typename Kernel::Segment_3                  Segment_3;
+  typedef typename Kernel::Aff_transformation_3       Aff_transformation_3;
+
+#ifndef _MSC_VER
+  // VC++ has a problem to digest the following typedef,
+  // and does not need the using statements -- AF
+  // The left and right part of these typedefs have the same name. It is
+  // very important to qualify the left part with the CGAL:: namespace, no
+  // to confuse g++. -- Laurent Rineau, 2010/09/13
+  typedef CGAL::SNC_structure<Kernel,Items,Mark> SNC_structure;
+  typedef CGAL::SNC_const_decorator<SNC_structure> SNC_const_decorator;
+  using SNC_const_decorator::set_snc;
+  using SNC_const_decorator::is_standard;
+  using SNC_const_decorator::is_bounded;
+#endif
+
+  struct Polylines_tag {};
+  struct Points_tag {};
+
+  enum Boundary { EXCLUDED=0, INCLUDED=1 };
+  /*{\Menum construction selection.}*/
+
+  typedef enum { EMPTY=0, COMPLETE=1 } Content;
+  /*{\Menum construction selection}*/
+
+  typedef enum { DEFAULT, NAIVE, WALKING, SPATIAL_SUBDIVISION  } Location_mode;
+  /*{\Menum selection flag for the point location mode.}*/
+
+protected: 
+  struct AND {
+    Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false)const 
+    { return b1&&b2; } 
+  };
+
+  struct OR {
+    Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false) const
+    { return b1||b2; } 
+  };
+
+  struct DIFF {
+    Mark operator()(const Mark& b1, const Mark& b2, bool inverted=false) const 
+    { return (inverted) ? !b1&&b2  :  b1&&!b2 ; }
+  };
+
+  struct XOR {
+    Mark operator()(const Mark& b1, const Mark& b2, bool /* inverted */ =false) const 
+    { return (b1&&!b2)||(!b1&&b2); } 
+  };
+
+ public:
+  typedef Nef_polyhedron_3_rep<Kernel,Items, Mark>    Nef_rep;
+
+  typedef typename Nef_rep::SM_decorator        SM_decorator;
+  typedef typename Nef_rep::SM_const_decorator  SM_const_decorator;
+ protected:
+  typedef typename Nef_rep::SNC_decorator       SNC_decorator;
+  typedef typename Nef_rep::SNC_constructor     SNC_constructor;
+  typedef typename Nef_rep::SNC_external_structure SNC_external_structure;
+  typedef typename Nef_rep::Binary_operation    Binary_operation;
+  typedef typename Nef_rep::SNC_point_locator   SNC_point_locator;
+  typedef typename Nef_rep::SNC_point_locator_default
+    SNC_point_locator_default;
+  typedef CGAL::Combine_with_halfspace<SNC_structure, SNC_point_locator> 
+          Combine_with_halfspace;
+public:
+ enum Intersection_mode { 
+	 CLOSED_HALFSPACE = Combine_with_halfspace::CLOSED_HALFSPACE, 
+     OPEN_HALFSPACE = Combine_with_halfspace::OPEN_HALFSPACE, 
+     PLANE_ONLY = Combine_with_halfspace::PLANE_ONLY};
+
+protected: 
+  typedef typename Nef_rep::SM_overlayer        SM_overlayer;
+  typedef typename Nef_rep::SM_point_locator    SM_point_locator;
+  typedef typename Nef_rep::SNC_simplify        SNC_simplify;
+#ifdef CGAL_NEF3_SM_VISUALIZOR
+  typedef typename Nef_rep::SM_visualizor       SM_visualizor;
+#endif // CGAL_NEF3_SM_VISUALIZOR
+#ifdef CGAL_NEF3_OLD_VISUALIZATION 
+  typedef CGAL::Nef_Visualizor_OpenGL_3<Nef_polyhedron_3> Visualizor;
+#endif // CGAL_NEF3_OLD_VISUALIZATION 
+
+ typedef typename Nef_rep::Sphere_map                Sphere_map;
+ public:
+ typedef CGAL::Nef_polyhedron_S2<Kernel,Items,Mark,Sphere_map> Nef_polyhedron_S2;
+ protected:
+
+  SNC_structure& snc() { return this->ptr()->snc_; } 
+  const SNC_structure& snc() const { return this->ptr()->snc_; } 
+
+  SNC_point_locator*& pl() { return this->ptr()->pl_; }
+  const SNC_point_locator* pl() const { return this->ptr()->pl_; }
+
+  friend std::ostream& operator<< <>
+      (std::ostream& os, Nef_polyhedron_3<Kernel,Items, Mark>& NP);
+  friend std::istream& operator>> <>
+      (std::istream& is, Nef_polyhedron_3<Kernel,Items, Mark>& NP);
+
+  typedef typename SNC_decorator::Vertex_handle    Vertex_handle;
+  typedef typename SNC_decorator::Halfedge_handle  Halfedge_handle;
+  typedef typename SNC_decorator::Halffacet_handle
+                                                   Halffacet_handle;
+  typedef typename SNC_decorator::Volume_handle    Volume_handle;
+
+ public:
+  typedef typename SNC_structure::Sphere_point                 Sphere_point;
+  typedef typename SNC_structure::Sphere_segment               Sphere_segment;
+  typedef typename SNC_structure::Sphere_circle                Sphere_circle;
+  typedef typename SNC_structure::Vertex_base                  Vertex;
+  typedef typename SNC_structure::Halfedge_base                Halfedge;
+  typedef typename SNC_structure::Halffacet_base               Halffacet;
+  typedef typename SNC_structure::Volume_base                  Volume;
+  typedef typename SNC_structure::Vertex_const_handle          Vertex_const_handle;
+  typedef typename SNC_structure::Halfedge_const_handle        Halfedge_const_handle;
+  typedef typename SNC_structure::Halffacet_const_handle       Halffacet_const_handle;
+  typedef typename SNC_structure::Volume_const_handle          Volume_const_handle;
+  typedef typename SNC_structure::SHalfedge_around_svertex_circulator 
+                                  SHalfedge_around_svertex_circulator;
+  typedef typename SNC_structure::SHalfedge_around_svertex_const_circulator 
+                                  SHalfedge_around_svertex_const_circulator;
+  typedef typename SNC_structure::SHalfedge_around_facet_circulator 
+                                  SHalfedge_around_facet_circulator;
+  typedef typename SNC_structure::SHalfedge_around_facet_const_circulator 
+                                  SHalfedge_around_facet_const_circulator;
+  typedef typename SNC_structure::SHalfedge_around_sface_const_circulator 
+                                  SHalfedge_around_sface_const_circulator;
+  typedef typename SNC_structure::Halffacet_cycle_const_iterator     
+                                  Halffacet_cycle_const_iterator;
+  typedef typename SNC_structure::Halffacet_cycle_iterator     
+                                  Halffacet_cycle_iterator;
+  typedef typename SNC_structure::Infi_box                     Infi_box;
+  typedef typename SNC_structure::Size_type Size_type;
+  typedef Size_type                         size_type;
+
+  typedef typename Kernel::RT                       RT;
+
+ public:
+  typedef typename SM_decorator::SVertex_handle    SVertex_handle;
+  typedef typename SM_decorator::SHalfedge_handle  SHalfedge_handle;
+  typedef typename SM_decorator::SFace_handle      SFace_handle;
+  typedef typename SM_decorator::SVertex_const_handle
+                                                   SVertex_const_handle;
+  typedef typename SM_decorator::SHalfedge_const_handle
+                                                   SHalfedge_const_handle;
+  typedef typename SM_decorator::SHalfloop_const_handle
+                                                   SHalfloop_const_handle;
+  typedef typename SM_decorator::SFace_const_handle
+                                                   SFace_const_handle;
+  typedef typename SNC_decorator::Vertex_iterator  Vertex_iterator;
+  typedef typename SNC_decorator::Halfedge_iterator
+                                                   Halfedge_iterator;
+  typedef typename SNC_decorator::Halffacet_iterator
+                                                   Halffacet_iterator;
+  typedef typename SNC_structure::Shell_entry_iterator
+                                                   Shell_entry_iterator;
+  typedef typename SNC_decorator::Volume_iterator  Volume_iterator;
+  typedef typename SNC_structure::Vertex_const_iterator
+                                                    Vertex_const_iterator;
+  typedef typename SNC_structure::Halfedge_const_iterator 
+                                                   Halfedge_const_iterator;
+  typedef typename SNC_structure::Halffacet_const_iterator     
+                                                   Halffacet_const_iterator;
+  typedef typename SNC_structure::Volume_const_iterator     
+                                                   Volume_const_iterator;
+  typedef typename SNC_structure::Shell_entry_const_iterator
+                                                   Shell_entry_const_iterator;
+  typedef typename SM_decorator::SVertex_iterator  SVertex_iterator;
+  typedef typename SM_decorator::SHalfedge_iterator
+                                                   SHalfedge_iterator;
+  typedef typename SM_decorator::SHalfloop_iterator
+                                                   SHalfloop_iterator;
+  typedef typename SM_decorator::SFace_iterator    SFace_iterator;
+  typedef typename SM_decorator::SVertex_const_iterator
+                                                   SVertex_const_iterator;
+  typedef typename SM_decorator::SHalfedge_const_iterator 
+                                                   SHalfedge_const_iterator;
+  typedef typename SM_decorator::SHalfloop_const_iterator 
+                                                   SHalfloop_const_iterator;
+  typedef typename SM_decorator::SFace_const_iterator     
+                                                   SFace_const_iterator;
+  typedef typename SNC_decorator::SFace_cycle_const_iterator     
+                                                   SFace_cycle_const_iterator;
+
+  typedef typename SNC_decorator::Association  Association;
+
+
+ protected: 
+  void initialize_infibox_vertices(Content space) {
+    SNC_constructor C(snc()); 
+    Infi_box::initialize_infibox_vertices(C, space == COMPLETE);
+  }
+
+  void check_h_for_intersection_of_12_cube_edges_and_add_vertices
+  (const Plane_3& p);
+  void create_intersection_vertex_of_h_and_e();
+  void init_cube_vertices_depending_on_h(const Plane_3& p);
+  void add_h_to_local_view_of_v();
+  
+ public:
+  void build_external_structure() {
+    SNC_external_structure es(snc(), pl());
+    es.build_external_structure();
+  }
+
+ public:
+  /*{\Mcreation 3}*/
+
+  Nef_polyhedron_3( Content space = EMPTY);
+		   
+  /*{\Mcreate creates an instance |\Mvar| of type |\Mname|
+  and initializes it to the empty set if |space == EMPTY|
+  and to the whole space if |space == COMPLETE|.}*/
+
+  explicit Nef_polyhedron_3(const Plane_3& p, Boundary b = INCLUDED);
+  /*{\Mcreate creates a Nef polyhedron |\Mvar| containing the
+  halfspace on the negative side of |p| including |p| if |b==INCLUDED|,
+  excluding |p| if |b==EXCLUDED|.}*/
+
+  Nef_polyhedron_3(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) 
+ : Base(N1) , SNC_const_decorator() {
+    set_snc(snc());
+  } 
+
+  Nef_polyhedron_3& operator=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) { 
+    Base::operator=(N1);
+    set_snc(snc());
+    return (*this); 
+  }
+
+  ~Nef_polyhedron_3() { 
+    CGAL_NEF_TRACEN("~Nef_polyhedron_3: destructor called for snc "<<&snc()<<
+	   ", pl "<<pl());
+  }
+
+   // RO: "vertex cycle to Nef" constructor (main part)
+   // II input iterator; KN kernel of normal (may differ from Nef kernel)
+   template <class II, class KN>
+   Nef_polyhedron_3 (II v_first, II v_last,
+                    const CGAL::Vector_3<KN> &normal, bool verb = false)
+   {  CGAL_NEF_TRACEN("construction from vertex cycle (main part)");
+
+      // project and triangulate vertices,
+      // convert result to Nef_polyhedron
+      CGAL_precondition (!CGAL::is_empty_range (v_first, v_last));
+      bool is_nef = vertex_cycle_to_nef_3<Nef_polyhedron> (snc(),
+         v_first, v_last, normal, verb);
+      if (is_nef)
+      {
+	 // TO DO:
+	 // Wie kann der eigene point_locator pl() eingebunden werden?
+	 // Wie kann der Konstruktor umgangen werden?
+         typedef CGAL::SNC_point_locator_by_spatial_subdivision
+            <CGAL::SNC_decorator<SNC_structure> >    Point_locator;
+
+         Point_locator Pl;
+         SNC_external_structure es(snc(), &Pl);
+         es.build_external_structure();
+         *this = Nef_polyhedron(snc(), &Pl);
+      }
+      else
+      {  *this = Nef_polyhedron();
+      }
+      set_snc (snc());
+      CGAL_expensive_postcondition (is_valid());
+   }
+
+   // RO: "vertex cycle to Nef" constructor (normal computation)
+   template <class II>
+   Nef_polyhedron_3 (II v_first, II v_last, bool verb = false)
+   {  CGAL_NEF_TRACEN("construction from vertex cycle (normal computation)");
+
+      // compute normal vector
+      CGAL_precondition (!CGAL::is_empty_range (v_first, v_last));
+      CGAL::Vector_3<typename II::value_type::R> normal;
+      normal_vector_newell_3 (v_first, v_last, normal);
+
+      // call "main" constructor
+      *this = Nef_polyhedron_3 (v_first, v_last, normal, verb);
+      set_snc (snc());
+   }
+  
+ template<typename Items, typename SNC_structure>
+ class Sphere_map_creator {
+   typedef typename SNC_structure::SM_decorator     SM_decorator;
+   typedef typename SNC_structure::Vertex_handle    Vertex_handle;
+   typedef typename SNC_structure::SVertex_handle   SVertex_handle;
+   typedef typename SNC_structure::SFace_handle     SFace_handle;
+   typedef typename SNC_structure::Sphere_point     Sphere_point;
+   
+   public:
+   Sphere_map_creator() {}
+   
+   template<typename point_iterator>
+   void create_end_sphere_map(SNC_structure& snc,
+			      point_iterator cur,
+			      point_iterator prev) {
+     Vertex_handle v(snc.new_vertex(*cur, true));
+     SM_decorator SM(&*v);
+     SVertex_handle sv(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
+				      true));
+     SFace_handle sf(v->new_sface());
+     SM.link_as_isolated_vertex(sv,sf);
+   }
+   
+   template<typename point_iterator>
+   void create_sphere_map(SNC_structure& snc,
+			  point_iterator cur,
+			  point_iterator prev,
+			  point_iterator next) {
+     Vertex_handle v(snc.new_vertex(*cur, true));
+     SM_decorator SM(&*v);
+     SVertex_handle sv1(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
+				       true));
+     SVertex_handle sv2(v->new_svertex(Sphere_point(ORIGIN+(*next-*cur)),
+				       true));      
+     SFace_handle sf(v->new_sface());
+     SM.link_as_isolated_vertex(sv1,sf);
+     SM.link_as_isolated_vertex(sv2,sf);
+   }
+ };
+ 
+ template<typename SNC_structure>
+ class Sphere_map_creator<CGAL::SNC_indexed_items, SNC_structure> {
+   typedef typename SNC_structure::SM_decorator     SM_decorator;
+   typedef typename SNC_structure::Vertex_handle    Vertex_handle;
+   typedef typename SNC_structure::SVertex_handle   SVertex_handle;
+   typedef typename SNC_structure::SFace_handle     SFace_handle;
+   typedef typename SNC_structure::Sphere_point     Sphere_point;
+   
+   bool first;
+   int index;
+ public:
+   Sphere_map_creator() : first(true), index(0) {}
+     
+     template<typename point_iterator>
+       void create_end_sphere_map(SNC_structure& snc,
+				  point_iterator cur,
+				  point_iterator prev) {
+       Vertex_handle v(snc.new_vertex(*cur, true));
+       SM_decorator SM(&*v);
+       SVertex_handle sv(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
+					true));
+       SFace_handle sf(v->new_sface());
+       SM.link_as_isolated_vertex(sv,sf);
+       if(first) {
+	 sv->set_index();
+	 index = sv->get_index();
+	 first = false;
+       } else
+	 sv->set_index(index);
+     }
+     
+     template<typename point_iterator>
+       void create_sphere_map(SNC_structure& snc,
+			      point_iterator cur,
+			      point_iterator prev,
+			      point_iterator next) {
+       Vertex_handle v(snc.new_vertex(*cur, true));
+       SM_decorator SM(&*v);
+       SVertex_handle sv1(v->new_svertex(Sphere_point(ORIGIN+(*prev-*cur)),
+					 true));
+       SVertex_handle sv2(v->new_svertex(Sphere_point(ORIGIN+(*next-*cur)),
+					 true));      
+       SFace_handle sf(v->new_sface());
+       SM.link_as_isolated_vertex(sv1,sf);
+       SM.link_as_isolated_vertex(sv2,sf);
+       sv1->set_index(index);
+       sv2->set_index();
+       index = sv2->get_index();
+     }
+ };
+ 
+ template <typename InputIterator>
+ Nef_polyhedron_3(InputIterator begin, InputIterator end, Polylines_tag) {
+   typedef typename std::iterator_traits<InputIterator>::value_type
+     point_iterator_pair;
+   typedef typename point_iterator_pair::first_type
+     point_iterator;
+
+   empty_rep();
+   set_snc(snc());
+   initialize_infibox_vertices(EMPTY);
+
+   point_iterator pbegin, pend, pnext, pprev;
+   Sphere_map_creator<Items, SNC_structure> smc;
+   for(;begin != end; ++begin) {
+     pend = begin->second;
+     pprev = pnext = pbegin = begin->first;
+     ++pnext;
+     CGAL_assertion(pnext != pend);
+     smc.create_end_sphere_map(snc(),pbegin,pnext);
+     for(++pbegin,++pnext; pnext!=pend; ++pbegin,++pprev,++pnext)
+       smc.create_sphere_map(snc(),pbegin,pprev,pnext);
+     smc.create_end_sphere_map(snc(),pbegin,pprev);
+   }
+   build_external_structure();
+   simplify();
+ }
+
+ explicit
+ Nef_polyhedron_3(const Segment_3& s) {
+   empty_rep();
+   set_snc(snc());
+   initialize_infibox_vertices(EMPTY);
+
+   Sphere_map_creator<Items, SNC_structure> smc;
+   std::vector<Point_3> endpoints(2);
+   endpoints[0]=s.source();
+   endpoints[1]=s.target();
+   smc.create_end_sphere_map(snc(),&endpoints[0],&endpoints[1]);
+   smc.create_end_sphere_map(snc(),&endpoints[1],&endpoints[0]);
+
+   build_external_structure();
+   simplify();
+ }
+
+ template <typename InputIterator>
+ Nef_polyhedron_3(InputIterator begin, InputIterator end, Points_tag) {
+   empty_rep();
+   set_snc(snc());
+   initialize_infibox_vertices(EMPTY);
+
+   for(InputIterator it=begin; it!=end;++it)
+   {
+     Vertex_handle v(snc().new_vertex(*it, true));
+     SM_decorator SM(&*v);
+     v->new_sface();
+   }
+   build_external_structure();
+   simplify();
+ }
+
+ explicit
+ Nef_polyhedron_3(const Point_3& p) {
+   empty_rep();
+   set_snc(snc());
+   initialize_infibox_vertices(EMPTY);
+
+   Vertex_handle v(snc().new_vertex(p, true));
+   SM_decorator SM(&*v);
+   v->new_sface();
+
+   build_external_structure();
+   simplify();
+ }
+
+ template <class T1, class T2,
+           template <class T31, class T32, class T33>
+           class T3, class T4 >
+ Nef_polyhedron_3( CGAL::Polyhedron_3<T1,T2,T3,T4>& P) {
+    CGAL_NEF_TRACEN("construction from Polyhedron_3");
+    SNC_structure rsnc;
+    *this = Nef_polyhedron_3(rsnc, new SNC_point_locator_default, false);
+    initialize_infibox_vertices(EMPTY);
+    polyhedron_3_to_nef_3
+      <CGAL::Polyhedron_3<T1,T2,T3,T4>, SNC_structure>( P, snc());
+    build_external_structure();
+    simplify();
+    CGAL::Mark_bounded_volumes<Nef_polyhedron_3> mbv(true);
+    delegate(mbv);
+    set_snc(snc());
+  }
+  
+ Nef_polyhedron_3(const Nef_polyhedron& N, 
+		  SFace_const_iterator sf) 
+ {
+   SNC_structure rsnc;
+   *this = Nef_polyhedron_3(rsnc, new SNC_point_locator_default, false);
+   initialize_infibox_vertices(EMPTY);
+   shell_to_nef_3(N, sf, snc());
+   build_external_structure();
+   simplify();
+   CGAL::Mark_bounded_volumes<Nef_polyhedron_3> mbv(true);
+   delegate(mbv);
+   set_snc(snc());
+ }
+
+
+ protected: 
+
+  template<typename Kernel>
+  class Triangulation_handler2 {
+
+    typedef typename CGAL::Triangulation_vertex_base_2<Kernel>               Vb;
+    typedef typename CGAL::Constrained_triangulation_face_base_2<Kernel>     Fb;
+    typedef typename CGAL::Triangulation_data_structure_2<Vb,Fb>             TDS;
+    typedef typename CGAL::Constrained_triangulation_2<Kernel,TDS>           CT;
+
+    typedef typename CT::Face_handle           Face_handle;
+    typedef typename CT::Vertex_handle         CTVertex_handle;
+    typedef typename CT::Finite_faces_iterator Finite_face_iterator;
+    typedef typename CT::Edge                  Edge;
+
+    CT ct;
+    CGAL::Unique_hash_map<Face_handle, bool> visited;
+    CGAL::Unique_hash_map<CTVertex_handle, Vertex_const_handle> ctv2v;
+    Finite_face_iterator fi;
+    Plane_3 supporting_plane;
+
+  public:
+    Triangulation_handler2(Halffacet_const_handle f) : 
+      visited(false), supporting_plane(f->plane()) {
+
+      Halffacet_cycle_const_iterator fci;
+      for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) {
+	if(fci.is_shalfedge()) {
+          SHalfedge_around_facet_const_circulator sfc(fci), send(sfc);
+	  CGAL_For_all(sfc,send) {
+            CGAL_NEF_TRACEN("  insert point" << sfc->source()->source()->point());
+	    CTVertex_handle ctv = ct.insert(sfc->source()->source()->point());
+	    ctv2v[ctv] = sfc->source()->source();
+          }
+        }
+      }
+
+      for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) {
+	if(fci.is_shalfedge()) {
+          SHalfedge_around_facet_const_circulator sfc(fci), send(sfc);
+	  CGAL_For_all(sfc,send) {
+            CGAL_NEF_TRACEN("  insert constraint" << sfc->source()->source()->point()
+	                     << "->" << sfc->source()->twin()->source()->point());
+	    ct.insert_constraint(sfc->source()->source()->point(),
+	                         sfc->source()->twin()->source()->point());
+          }
+        }
+      }
+      CGAL_assertion(ct.is_valid());
+
+      CGAL_NEF_TRACEN("number of finite triangles " << ct.number_of_faces());
+
+      typename CT::Face_handle infinite = ct.infinite_face();
+      typename CT::Vertex_handle ctv = infinite->vertex(1);
+      if(ct.is_infinite(ctv)) ctv = infinite->vertex(2);
+      CGAL_assertion(!ct.is_infinite(ctv));
+
+      typename CT::Face_handle opposite;
+      typename CT::Face_circulator vc(ctv,infinite);
+      do { opposite = vc++;
+      } while(!ct.is_constrained(typename CT::Edge(vc,vc->index(opposite))));
+      typename CT::Face_handle first = vc;
+
+      CGAL_assertion(!ct.is_infinite(first));
+      traverse_triangulation(first, first->index(opposite));
+
+      fi = ct.finite_faces_begin();
+    }
+
+    void traverse_triangulation(Face_handle f, int parent) {
+      visited[f] = true;
+      if(!ct.is_constrained(Edge(f,ct.cw(parent))) && !visited[f->neighbor(ct.cw(parent))]) {
+	Face_handle child(f->neighbor(ct.cw(parent)));
+	traverse_triangulation(child, child->index(f));
+      } 
+      if(!ct.is_constrained(Edge(f,ct.ccw(parent))) && !visited[f->neighbor(ct.ccw(parent))]) {
+	Face_handle child(f->neighbor(ct.ccw(parent)));
+	traverse_triangulation(child, child->index(f));
+      } 
+    } 
+ 
+    template<typename Triangle_3>
+    bool get_next_triangle(Triangle_3& tr) {
+      while(fi != ct.finite_faces_end() && visited[fi] == false) ++fi;
+      if(fi == ct.finite_faces_end()) return false;
+      tr = Triangle_3(fi->vertex(0)->point(), fi->vertex(1)->point(), fi->vertex(2)->point());
+      ++fi;
+      return true;
+    }
+
+    bool same_orientation(Plane_3 p1) const {
+      if(p1.a() != 0)
+	return CGAL::sign(p1.a()) == CGAL::sign(supporting_plane.a());
+      if(p1.b() != 0)
+	return CGAL::sign(p1.b()) == CGAL::sign(supporting_plane.b());
+      return CGAL::sign(p1.c()) == CGAL::sign(supporting_plane.c());
+    }
+
+    template<typename PIB, typename Index>
+    void handle_triangles(PIB& pib, Index& VI) {
+      while(fi != ct.finite_faces_end() && visited[fi] == false) ++fi;
+      while(fi != ct.finite_faces_end()) {
+	Plane_3 plane(fi->vertex(0)->point(),
+		      fi->vertex(1)->point(),
+		      fi->vertex(2)->point());
+	pib.begin_facet();
+	if(same_orientation(plane)) {
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(0)]]);
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(1)]]);
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(2)]]);
+	} else {
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(0)]]);
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(2)]]);
+	  pib.add_vertex_to_facet(VI[ctv2v[fi->vertex(1)]]);
+	}
+	pib.end_facet();
+	do {
+	  ++fi;
+	} while(fi != ct.finite_faces_end() && visited[fi] == false);
+      }
+    }
+  };
+ 
+  template <class HDS>
+  class Build_polyhedron : public CGAL::Modifier_base<HDS> {
+    
+    class Visitor {
+
+      typedef typename CGAL::Projection_traits_xy_3<Kernel>       XY;
+      typedef typename CGAL::Projection_traits_yz_3<Kernel>       YZ;
+      typedef typename CGAL::Projection_traits_xz_3<Kernel>       XZ;
+
+      const Object_index<Vertex_const_iterator>& VI;
+      Polyhedron_incremental_builder_3<HDS>& B;
+      const SNC_const_decorator& D;
+      
+    public:
+      Visitor(Polyhedron_incremental_builder_3<HDS>& BB,
+	      const SNC_const_decorator& sd,
+	      Object_index<Vertex_const_iterator>& vi) : VI(vi), B(BB), D(sd){}
+
+      void visit(Halffacet_const_handle opposite_facet) {
+
+	CGAL_NEF_TRACEN("Build_polyhedron: visit facet " << opposite_facet->plane());
+ 
+	CGAL_assertion(Infi_box::is_standard(opposite_facet->plane()));
+	
+	SHalfedge_const_handle se;
+	Halffacet_cycle_const_iterator fc;
+     	
+	Halffacet_const_handle f = opposite_facet->twin();
+
+	SHalfedge_around_facet_const_circulator 
+	  sfc1(f->facet_cycles_begin()), sfc2(sfc1);
+	
+	if(++f->facet_cycles_begin() != f->facet_cycles_end() ||
+	   ++(++(++sfc1)) != sfc2) {
+	  Vector_3 orth = f->plane().orthogonal_vector();
+	  int c = CGAL::abs(orth[0]) > CGAL::abs(orth[1]) ? 0 : 1;
+	  c = CGAL::abs(orth[2]) > CGAL::abs(orth[c]) ? 2 : c;
+	  
+	  if(c == 0) {
+	    Triangulation_handler2<YZ> th(f);
+	    th.handle_triangles(B, VI);
+	  } else if(c == 1) {
+	    Triangulation_handler2<XZ> th(f);
+	    th.handle_triangles(B, VI);
+	  } else if(c == 2) {
+	    Triangulation_handler2<XY> th(f);
+	    th.handle_triangles(B, VI);
+	  } else
+	    CGAL_error_msg( "wrong value");
+
+	} else {
+
+	  B.begin_facet();
+	  fc = f->facet_cycles_begin();
+	  se = SHalfedge_const_handle(fc);
+	  CGAL_assertion(se!=0);
+	  SHalfedge_around_facet_const_circulator hc_start(se);
+	  SHalfedge_around_facet_const_circulator hc_end(hc_start);
+	  CGAL_For_all(hc_start,hc_end) {
+	    CGAL_NEF_TRACEN("   add vertex " << hc_start->source()->center_vertex()->point());
+	    B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]);
+	  }
+	  B.end_facet();
+	}
+      }
+
+      void visit(SFace_const_handle) {}
+      void visit(Halfedge_const_handle) {}
+      void visit(Vertex_const_handle) {}
+      void visit(SHalfedge_const_handle) {}
+      void visit(SHalfloop_const_handle) {}
+    };
+
+  public:
+
+    const SNC_const_decorator& scd;
+    Object_index<Vertex_const_iterator> VI;
+
+    Build_polyhedron(const SNC_const_decorator& s) : 
+      scd(s), VI(s.vertices_begin(),s.vertices_end(),'V') {}
+    
+    void operator()( HDS& hds) {
+
+      Polyhedron_incremental_builder_3<HDS> B(hds, true);
+
+      int skip_volumes;
+      if(Infi_box::extended_kernel()) {
+	B.begin_surface(scd.number_of_vertices()-8, 
+			scd.number_of_facets()-6,
+			scd.number_of_edges()-12);
+	skip_volumes = 2;
+      }
+      else {
+	B.begin_surface(scd.number_of_vertices(), 
+			2*scd.number_of_vertices()-4,
+			3*scd.number_of_vertices()-6);
+	skip_volumes = 1;
+      }
+      
+      int vertex_index = 0;
+      Vertex_const_iterator v;
+      CGAL_forall_vertices(v,scd) {
+	if(Infi_box::is_standard(v->point())) {
+	  VI[v]=vertex_index++;
+	  B.add_vertex(v->point());
+	}
+      }     
+      
+      Visitor V(B,scd,VI);
+      Volume_const_handle c;
+      CGAL_forall_volumes(c,scd)
+	if(skip_volumes-- <= 0)
+	  scd.visit_shell_objects(SFace_const_handle(c->shells_begin()),V);
+      B.end_surface();
+      if ( B.error() ) B.rollback();
+    }
+
+  };
+
+  template <class HDS>
+  class Build_polyhedron2 : public CGAL::Modifier_base<HDS> {
+    
+    class Find_holes {
+
+      Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
+      int nov, nof;
+
+    public:
+      Find_holes(Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_) 
+	: omit_vertex(omit_vertex_), nov(0), nof(0) {}
+
+      void visit(Halffacet_const_handle f) {
+	++nof;
+	Halffacet_cycle_const_iterator fc = f->facet_cycles_begin();
+	for(++fc; fc != f->facet_cycles_end(); ++fc) {
+	  if(fc.is_shalfedge()) {
+	    --nof;
+	    SHalfedge_around_facet_const_circulator 
+	      sfc(fc), send(sfc);
+	    CGAL_For_all(sfc, send) {
+	      omit_vertex[sfc->source()->source()] = true;
+	      --nov;
+	    }
+	  } else if(fc.is_shalfloop()) {
+	    SHalfloop_const_handle sl(fc);
+	    omit_vertex[sl->incident_sface()->center_vertex()];
+	    --nov;
+	  } else
+	    CGAL_error_msg( "wrong handle type");
+	}
+      }
+
+      void visit(Vertex_const_handle) { ++nov; }
+      void visit(SFace_const_handle) {}
+      void visit(Halfedge_const_handle) {}
+      void visit(SHalfedge_const_handle) {}
+      void visit(SHalfloop_const_handle) {}
+
+      int number_of_vertices() const {
+	return nov;
+      }
+
+      int number_of_facets() const {
+	return nof;
+      }
+    };
+
+    class Add_vertices {
+      
+      Polyhedron_incremental_builder_3<HDS>& B;
+      Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
+      Object_index<Vertex_const_iterator>& VI;      
+      int vertex_index;
+
+    public:
+      Add_vertices(Polyhedron_incremental_builder_3<HDS>& B_,
+		   Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_,
+		   Object_index<Vertex_const_iterator>& VI_) 
+	: B(B_), omit_vertex(omit_vertex_), VI(VI_), vertex_index(0) {}
+	
+      void visit(Vertex_const_handle v) {
+	if(omit_vertex[v]) return;
+	VI[v]=vertex_index++;
+	B.add_vertex(v->point());
+      }
+
+      void visit(Halffacet_const_handle) {}
+      void visit(SFace_const_handle) {}
+      void visit(Halfedge_const_handle) {}
+      void visit(SHalfedge_const_handle) {}
+      void visit(SHalfloop_const_handle) {}
+
+    };
+
+    class Visitor {
+
+      const Object_index<Vertex_const_iterator>& VI;
+      Polyhedron_incremental_builder_3<HDS>& B;
+      const Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
+      SNC_const_decorator& D;
+      
+    public:
+      Visitor(Polyhedron_incremental_builder_3<HDS>& BB,
+	      const Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_,
+	      SNC_const_decorator& sd,
+	      Object_index<Vertex_const_iterator>& vi) 
+	: VI(vi), B(BB), omit_vertex(omit_vertex_), D(sd){}
+
+      void visit(Halffacet_const_handle opposite_facet) {
+
+	CGAL_NEF_TRACEN("Build_polyhedron: visit facet " << opposite_facet->plane());
+ 
+	CGAL_assertion(Infi_box::is_standard(opposite_facet->plane()));
+	
+	SHalfedge_const_handle se;
+	Halffacet_cycle_const_iterator fc;
+     	
+	Halffacet_const_handle f = opposite_facet->twin();
+
+	fc = f->facet_cycles_begin();
+	se = SHalfedge_const_handle(fc);
+	CGAL_assertion(se!=0);
+	if(omit_vertex[se->source()->source()]) return;
+	B.begin_facet();
+	SHalfedge_around_facet_const_circulator hc_start(se);
+	SHalfedge_around_facet_const_circulator hc_end(hc_start);
+	CGAL_For_all(hc_start,hc_end) {
+	  CGAL_NEF_TRACEN("   add vertex " << hc_start->source()->center_vertex()->point());
+	  B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]);
+	}
+	B.end_facet();
+      }
+
+      void visit(SFace_const_handle) {}
+      void visit(Halfedge_const_handle) {}
+      void visit(Vertex_const_handle) {}
+      void visit(SHalfedge_const_handle) {}
+      void visit(SHalfloop_const_handle) {}
+    };
+
+  public:
+
+    SFace_const_handle sf;
+    SNC_const_decorator& scd;
+    Object_index<Vertex_const_iterator> VI;
+    Unique_hash_map<Vertex_const_handle, bool> omit_vertex;
+
+    Build_polyhedron2(SFace_const_handle sf_, SNC_const_decorator& s) : 
+      sf(sf_), scd(s), VI(s.vertices_begin(),s.vertices_end(),'V'), 
+      omit_vertex(false) {}
+    
+      void operator()(HDS& hds) {
+
+      Polyhedron_incremental_builder_3<HDS> B(hds, true);
+      
+      Find_holes F(omit_vertex);
+      scd.visit_shell_objects(sf, F);
+
+      B.begin_surface(F.number_of_vertices(), 
+		      F.number_of_facets(),
+		      F.number_of_vertices()+F.number_of_facets()-2);
+
+      Add_vertices A(B,omit_vertex, VI);
+      scd.visit_shell_objects(sf, A);
+
+      Visitor V(B,omit_vertex, scd,VI);
+      scd.visit_shell_objects(sf, V);
+      B.end_surface();
+      if ( B.error() ) B.rollback();
+    }
+
+  };
+
+
+ public:
+ void delegate( Modifier_base<SNC_structure>& modifier, 
+		bool compute_external = false, 
+		bool do_simplify = true) {
+
+   // calls the `operator()' of the `modifier'. Precondition: The
+   // `modifier' returns a consistent representation.
+   if( this->is_shared()) clone_rep();
+   modifier(snc());
+   if(compute_external) {
+     SNC_external_structure es(snc());
+     es.clear_external_structure();
+     
+     build_external_structure();
+   }
+   if(do_simplify)
+     simplify();
+   CGAL_expensive_postcondition( is_valid());
+ }
+
+ struct SNC_and_PL {
+   SNC_structure* sncp;
+   SNC_point_locator* pl;
+
+   SNC_and_PL(SNC_structure* s, SNC_point_locator* p) : sncp(s), pl(p) {}
+ };
+
+ void delegate( Modifier_base<SNC_and_PL>& modifier, 
+		bool compute_external = false,
+		bool do_simplify = false) {
+   // calls the `operator()' of the `modifier'. Precondition: The
+   // `modifier' returns a consistent representation.
+   if( this->is_shared()) clone_rep();
+   SNC_and_PL sncpl(&snc(),pl());
+   modifier(sncpl);
+   pl() = sncpl.pl;
+   if(compute_external) {
+     SNC_external_structure es(snc());
+     es.clear_external_structure();
+     build_external_structure();
+   }
+   if(do_simplify)
+     simplify();
+   CGAL_expensive_postcondition( is_valid());
+ }
+ 
+ public:
+
+ template<typename Polyhedron>
+ void convert_to_Polyhedron(Polyhedron& P) const {
+   convert_to_polyhedron(P);
+ }
+
+ template<typename Polyhedron>
+ void convert_to_polyhedron(Polyhedron& P) const {
+   typedef typename Polyhedron::HalfedgeDS HalfedgeDS;
+   CGAL_precondition(is_simple());
+   P.clear();
+   Build_polyhedron<HalfedgeDS> bp(*this);    
+   P.delegate(bp);
+ }
+
+ template<typename Polyhedron>
+ void convert_inner_shell_to_polyhedron(SFace_const_iterator sf, Polyhedron& P) {
+   typedef typename Polyhedron::HalfedgeDS HalfedgeDS;
+   P.clear();
+   Build_polyhedron2<HalfedgeDS> bp(sf, *this);
+   P.delegate(bp);
+ }
+
+  bool is_valid( bool verb = false, int level = 0) {
+    // checks the combinatorial consistency.
+    Verbose_ostream verr(verb);
+    verr << "begin CGAL::Nef_polyhedron_3<...>::is_valid( verb=true, "
+      "level = " << level << "):" << std::endl;
+
+    SNC_decorator D(snc());
+    bool valid = D.is_valid(verb, level);
+    verr << "end of CGAL::Nef_polyhedron_3<...>::is_valid(): structure is "
+	 << ( valid ? "valid." : "NOT VALID.") << std::endl;
+    return valid;
+  }
+
+  bool is_simple() const {
+
+    Halfedge_const_iterator e;
+    CGAL_forall_edges(e,snc())
+      if(!is_edge_2manifold(e))
+	return false;
+
+    CGAL_NEF_TRACEN("there is no edge with non-manifold situation");
+
+    Vertex_const_iterator v;
+    CGAL_forall_vertices(v,snc())
+      if(!is_vertex_2manifold(v))
+	return false;
+
+    CGAL_NEF_TRACEN("there is no vertex with non-manifold situation");
+/*
+    Halffacet_iterator f;
+    CGAL_forall_halffacets(f,snc())
+      if(!is_facet_simple(f))
+	return false;
+
+    CGAL_NEF_TRACEN("there are no holes");
+*/
+    return true;
+  }
+ 
+ bool is_convex() const {
+   
+   Vertex_const_iterator v;
+   CGAL_forall_vertices(v, *this) {
+
+     SM_const_decorator SD(&*v);
+     if(std::distance(SD.sfaces_begin(),SD.sfaces_end())!=2)
+       return false;
+
+     if(!Infi_box::is_standard(v->point())) continue;
+
+     SFace_const_iterator sf;
+     CGAL_forall_sfaces(sf,SD) {
+       if(sf->volume() == Infi_box::getNirvana(snc())) continue;
+       if(std::distance(sf->sface_cycles_begin(),sf->sface_cycles_end())!=1)
+	 return false;
+       SFace_cycle_const_iterator sfi(sf->sface_cycles_begin());
+       if(!sfi.is_shalfedge())
+	 return false;
+       SHalfedge_const_handle se(sf->sface_cycles_begin());
+       SHalfedge_around_sface_const_circulator sec(se),send(sec);
+       CGAL_For_all(sec,send)
+	 if(spherical_orientation(sec->source()->point(),
+				  sec->snext()->source()->point(),
+				  sec->snext()->snext()->source()->point())<0) {
+	   std::cerr << "vertex at " << v->point() << " is not convex" << std::endl;
+	   return false;
+	 }
+     }
+   }
+   return true;
+ }
+
+ private:  
+  bool is_edge_2manifold(const Halfedge_const_handle& e) const {
+
+    SM_decorator SD;
+    SHalfedge_around_svertex_const_circulator c(SD.first_out_edge(e)), c2(c);
+
+    if(c == 0) {
+      CGAL_assertion(circulator_size(c) !=2);
+      return false;
+    }
+
+    if(++c == c2){
+      CGAL_assertion(circulator_size(c) !=2);
+      return false;
+    }
+
+    if(++c != c2) { 
+      CGAL_assertion(circulator_size(c) !=2);
+      return false;
+    }
+    
+    CGAL_assertion(circulator_size(c) == 2);
+    return true;
+  }
+ 
+  bool is_vertex_2manifold(const Vertex_const_handle& v) const {
+     
+    SFace_const_iterator sfi(v->sfaces_begin());
+    if (++sfi != v->sfaces_last())
+      return false;
+
+    return true;
+  }
+
+  bool is_facet_simple(const Halffacet_const_handle& f) const {
+    
+    bool found_first = false;
+    Halffacet_cycle_const_iterator it; 
+    CGAL_forall_facet_cycles_of(it,f)
+      if (found_first || !it.is_shalfedge())
+	return false;
+      else
+	found_first = true;
+   
+    return true;
+  }
+
+ public:
+#ifdef CGAL_NEF3_OLD_VISUALIZATION   
+  void visualize() { 
+    Visualizor sncv(*this);
+    sncv.draw();
+    //OGL::polyhedra_.back().debug();
+    OLDOGL::start_viewer();
+  }
+#endif // CGAL_NEF3_OLD_VISUALIZATION   
+   
+  void clear(Content space = EMPTY)
+    { *this = Nef_polyhedron_3(space); }
+  /*{\Mop makes |\Mvar| the empty set if |space == EMPTY| and the
+  full space if |space == COMPLETE|.}*/
+
+ bool is_empty() const {
+   /*{\Mop returns true if |\Mvar| is empty, false otherwise.}*/
+   if(Infi_box::extended_kernel()) 
+     return this->number_of_vertices() == 8 &&
+            this->number_of_edges() == 12 &&
+            this->number_of_facets() == 6 &&
+            this->number_of_volumes() == 2 &&
+            (++this->volumes_begin())->mark() == false;
+
+   else 
+     return this->number_of_vertices() == 0 &&
+            this->number_of_edges() == 0 &&
+            this->number_of_facets() == 0 &&
+            this->number_of_volumes() == 1 &&
+            (this->volumes_begin())->mark() == false;
+  }
+
+ bool is_space() const {
+  /*{\Mop returns true if |\Mvar| is the whole space, false otherwise.}*/
+   if(Infi_box::extended_kernel()) 
+     return this->number_of_vertices() == 8 &&
+            this->number_of_edges() == 12 &&
+            this->number_of_facets() == 6 &&
+            this->number_of_volumes() == 2 &&
+            (++this->volumes_begin())->mark() == true;
+
+   else 
+     return this->number_of_vertices() == 0 &&
+            this->number_of_edges() == 0 &&
+            this->number_of_facets() == 0 &&
+            this->number_of_volumes() == 1 &&
+            (this->volumes_begin())->mark() == true;
+  }
+
+  /*{\Xtext \headerline{Destructive Operations}}*/
+
+ protected:
+  void clone_rep() { *this = Nef_polyhedron_3<Kernel,Items, Mark>(snc(), pl()); }
+  void empty_rep() { 
+    SNC_structure rsnc;
+    delete pl();
+    *this = Nef_polyhedron_3<Kernel,Items, Mark>(rsnc, new SNC_point_locator_default,false);
+  }
+
+ public:
+  Nef_polyhedron_3( const SNC_structure& W, 
+		    SNC_point_locator* _pl = new SNC_point_locator_default,
+		    bool clone_pl = true,
+		    bool clone_snc = true);
+  /*{\Xcreate makes |\Mvar| a new object.  If |cloneit==true| then the
+  underlying structure of |W| is copied into |\Mvar|.}*/
+  // TODO: granados: define behavior when clone=false
+
+  /*{\Moperations 4 3 }*/
+
+  void simplify() {
+    SNC_simplify simp(snc());
+    bool simplified = simp.simplify();
+    CGAL_NEF_TRACEN( "simplify(): structure simplified? "<<simplified);
+    
+    if( simplified) {
+#ifdef CGAL_NEF3_UPDATE_K3TREE_AFTER_SIMPLIFICATION
+      /*debug*/ snc().print_statistics();
+      Unique_hash_map<Vertex_handle, bool> 
+	V(false, snc().number_of_vertices());
+      Unique_hash_map<Halfedge_handle, bool> 
+	E(false, snc().number_of_halfedges());
+      Unique_hash_map<Halffacet_handle, bool> 
+	F(false, snc().number_of_halffacets());
+      Vertex_iterator v;
+      Halfedge_iterator e;
+      Halffacet_iterator f;
+      CGAL_forall_vertices( v, snc()) V[Vertex_handle(v)] = true;
+      CGAL_forall_halfedges( e, snc()) E[Halfedge_handle(e)] = true;
+      CGAL_forall_halffacets( f, snc()) F[Halffacet_handle(f)] = true;
+      bool updated = pl()->update( V, E, F);
+      CGAL_NEF_TRACEN("simplify(): point locator structure updated? " << updated);
+#else
+      SNC_point_locator* old_pl = pl();
+      pl() = pl()->clone();
+      pl()->initialize(&snc());
+      delete old_pl;
+#endif
+    }
+  }
+
+ public:
+  Nef_polyhedron_S2 get_sphere_map(Vertex_const_handle v) const {
+    return Nef_polyhedron_S2(*v);
+  }
+
+  void extract_complement();
+  /*{\Xop converts |\Mvar| to its complement. }*/
+  void extract_interior();
+  /*{\Xop converts |\Mvar| to its interior. }*/
+  void extract_boundary();
+  /*{\Xop converts |\Mvar| to its boundary. }*/
+
+  void extract_closure()
+  /*{\Xop converts |\Mvar| to its closure. }*/
+  { CGAL_NEF_TRACEN("extract closure");
+    if( this->is_shared()) clone_rep();
+    extract_complement();
+    extract_interior();
+    extract_complement();
+  }
+
+  void extract_regularization()
+  /*{\Xop converts |\Mvar| to its regularization. }*/
+  { CGAL_NEF_TRACEN("extract regularization");
+    if( this->is_shared()) clone_rep();
+    extract_interior();
+    extract_closure();
+  }
+
+  /*{\Mtext \headerline{Constructive Operations}}*/
+
+  Nef_polyhedron_3<Kernel,Items, Mark> complement() const
+  /*{\Mop returns the complement of |\Mvar| in the plane. }*/
+  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
+    res.extract_complement();
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> interior() const
+  /*{\Mop    returns the interior of |\Mvar|. }*/
+  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
+    res.extract_interior();
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> closure() const
+  /*{\Mop returns the closure of |\Mvar|. }*/
+  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
+    res.extract_closure();
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> boundary() const
+  /*{\Mop returns the boundary of |\Mvar|. }*/
+  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
+    res.extract_boundary();
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> regularization() const
+  /*{\Mop    returns the regularized polyhedron (closure of 
+    the interior).}*/
+  { Nef_polyhedron_3<Kernel,Items, Mark> res = *this;
+    res.extract_regularization();
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>
+  intersection(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+    /*{\Mop returns |\Mvar| $\cap$ |N1|. }*/ {
+    CGAL_NEF_TRACEN(" intersection between nef3 "<<&*this<<" and "<<&N1);
+    AND _and;
+    SNC_structure rsnc;
+    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
+    Binary_operation bo( res.snc());
+    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _and);
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>
+   intersection(const Plane_3& plane, 
+		Intersection_mode im) const {
+    AND _and;
+    SNC_structure rsnc;
+    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
+    Combine_with_halfspace cwh(res.snc(), res.pl());
+    cwh.combine_with_halfspace(snc(), plane, _and, 
+							   static_cast<typename Combine_with_halfspace::Intersection_mode>(im));
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> 
+  join(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  /*{\Mop returns |\Mvar| $\cup$ |N1|. }*/ { 
+    CGAL_NEF_TRACEN(" join between nef3 "<<&*this<<" and "<<&N1);
+    OR _or;
+    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, OR> tests_impl;
+    SNC_structure rsnc;
+    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
+    Binary_operation bo(res.snc());
+    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _or);
+    return res;
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark> 
+  difference(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  /*{\Mop returns |\Mvar| $-$ |N1|. }*/ { 
+    CGAL_NEF_TRACEN(" difference between nef3 "<<&*this<<" and "<<&N1);
+    DIFF _diff;
+    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, DIFF> tests_impl;
+    SNC_structure rsnc;
+    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
+    Binary_operation bo(res.snc());
+    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _diff);
+    return res;
+  }    
+
+  Nef_polyhedron_3<Kernel,Items, Mark> 
+  symmetric_difference(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ 
+          |T - \Mvar|. }*/ {
+    CGAL_NEF_TRACEN(" symmetic difference between nef3 "<<&*this<<" and "<<&N1);
+    XOR _xor;
+    //CGAL::binop_intersection_tests_allpairs<SNC_decorator, XOR> tests_impl;
+    SNC_structure rsnc;
+    Nef_polyhedron_3<Kernel,Items, Mark> res(rsnc, new SNC_point_locator_default, false);
+    Binary_operation bo(res.snc());
+    bo(res.pl(), snc(), pl(), N1.snc(), N1.pl(), _xor);
+    return res;
+  }
+
+
+  /*{\Mtext Additionally there are operators |*,+,-,^,!| which
+  implement the binary operations \emph{intersection}, \emph{union},
+  \emph{difference}, \emph{symmetric difference}, and the unary
+  operation \emph{complement}. There are also the corresponding
+  modification operations |*=,+=,-=,^=|.}*/
+
+  Nef_polyhedron_3<Kernel,Items, Mark>  operator*(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const 
+  { return intersection(N1); }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>  operator+(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return join(N1); }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>  operator-(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return difference(N1); }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>  operator^(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return symmetric_difference(N1); }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>  operator!() const
+  { return complement(); }
+   
+  Nef_polyhedron_3<Kernel,Items, Mark>& operator*=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
+  { 
+#ifdef CGAL_NEF_VISUAL_HULL
+    CGAL_NEF_SETDTHREAD(19*43*71);
+    std::cerr << "visual hull code " << std::endl;
+    std::cerr << *this << std::endl;
+    std::cerr << const_cast<Nef_polyhedron&>(N1) << std::endl;
+    AND _and;
+    typename CGAL::Modifying_binary_operation<SNC_structure> 
+      mbo(this->snc());
+    mbo(const_cast<SNC_structure&>(N1.snc()), N1.pl(), pl(), _and);
+    return *this;
+#else
+    *this = intersection(N1); return *this; 
+#endif
+  }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>& operator+=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
+  { *this = join(N1); return *this; }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>& operator-=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
+  { *this = difference(N1); return *this; }
+
+  Nef_polyhedron_3<Kernel,Items, Mark>& operator^=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1)
+  { *this = symmetric_difference(N1); return *this; }
+
+  /*{\Mtext There are also comparison operations like |<,<=,>,>=,==,!=|
+  which implement the relations subset, subset or equal, superset, superset
+  or equal, equality, inequality.}*/
+
+  bool operator==(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { CGAL_NEF_TRACEN(" equality comparision between nef3 "<<&*this<<" and "<<&N1);
+    return symmetric_difference(N1).is_empty(); }
+
+  bool operator!=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { CGAL_NEF_TRACEN(" inequality comparision between nef3 "<<&*this<<" and "<<&N1);
+    return !operator==(N1); }  
+
+  bool operator<(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return !N1.difference(*this).is_empty() && difference(N1).is_empty(); } 
+
+  bool operator>(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return difference(*this).is_empty() && !difference(N1).is_empty(); } 
+
+  bool operator<=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return difference(N1).is_empty(); } 
+
+  bool operator>=(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
+  { return N1.difference(*this).is_empty(); } 
+
+
+ bool is_90degree_rotation(const Aff_transformation_3& aff) const {
+   if(aff.hm(0,3) != 0) return false;
+   if(aff.hm(1,3) != 0) return false;
+   if(aff.hm(2,3) != 0) return false;
+   if(CGAL_NTS abs(aff.hm(0,0)) + 
+      CGAL_NTS abs(aff.hm(0,1)) + 
+      CGAL_NTS abs(aff.hm(0,2)) != aff.hm(3,3)) return false;
+   if(CGAL_NTS abs(aff.hm(1,0)) + 
+      CGAL_NTS abs(aff.hm(1,1)) + 
+      CGAL_NTS abs(aff.hm(1,2)) != aff.hm(3,3)) return false;
+   if(CGAL_NTS abs(aff.hm(2,0)) + 
+      CGAL_NTS abs(aff.hm(2,1)) + 
+      CGAL_NTS abs(aff.hm(2,2)) != aff.hm(3,3)) return false;
+   if(CGAL_NTS abs(aff.hm(0,0)) + 
+      CGAL_NTS abs(aff.hm(1,0)) + 
+      CGAL_NTS abs(aff.hm(2,0)) != aff.hm(3,3)) return false;
+   if(CGAL_NTS abs(aff.hm(0,1)) + 
+      CGAL_NTS abs(aff.hm(1,1)) + 
+      CGAL_NTS abs(aff.hm(2,1)) != aff.hm(3,3)) return false;
+   if(CGAL_NTS abs(aff.hm(0,2)) + 
+      CGAL_NTS abs(aff.hm(1,2)) + 
+      CGAL_NTS abs(aff.hm(2,2)) != aff.hm(3,3)) return false;
+   return true;
+ }
+
+ bool is_scaling(const Aff_transformation_3& aff) const {
+   if(aff.hm(0,3) != 0) return false;
+   if(aff.hm(1,3) != 0) return false;
+   if(aff.hm(2,3) != 0) return false;   
+   if(aff.hm(0,1) != 0) return false;
+   if(aff.hm(0,2) != 0) return false;
+   if(aff.hm(1,0) != 0) return false;   
+   if(aff.hm(1,2) != 0) return false;
+   if(aff.hm(2,0) != 0) return false;
+   if(aff.hm(2,1) != 0) return false;
+   if(aff.hm(0,0) != aff.hm(1,1)) return false;
+   if(aff.hm(0,0) != aff.hm(2,2)) return false;
+   return true;
+ }
+
+ void change_orientation(bool full = false) {
+
+   Halffacet_handle ftemp;
+   Volume_handle vtemp;
+   SVertex_handle svtemp;
+   SHalfedge_handle setemp;
+   SFace_handle sftemp;
+
+   SVertex_iterator sv;
+   CGAL_forall_svertices(sv, snc()) {
+     sv->out_sedge() = sv->out_sedge()->twin();
+   }
+
+   SHalfedge_iterator se;
+   CGAL_forall_shalfedges(se, snc()) {
+     if(se->is_twin()) {
+       svtemp = se->source();
+       se->source() = se->twin()->source();
+       se->twin()->source() = svtemp;
+
+       if(full) {
+	 ftemp = se->facet();
+	 se->facet() = se->twin()->facet();
+	 se->twin()->facet() = ftemp;
+       }
+       //       sftemp = se->incident_sface();
+       //       se->incident_sface() = se->twin()->incident_sface();
+       //       se->twin()->incident_sface() = sftemp;
+     }
+       
+     setemp = se->sprev();
+     se->sprev() = se->snext();
+     se->snext() = setemp;
+
+     se->circle() = se->circle().opposite();
+
+     if(full) {
+       setemp = se->prev();
+       se->prev() = se->next();
+       se->next() = setemp;
+     }
+   }
+
+   if(full) {
+     Halffacet_iterator f;
+     CGAL_forall_facets(f, snc()) {
+       vtemp  = f->incident_volume();
+       f->incident_volume() = f->twin()->incident_volume();
+       f->twin()->incident_volume() = vtemp;
+       Halffacet_cycle_iterator fc(f->facet_cycles_begin()),
+	 fct(f->twin()->facet_cycles_begin());
+       while(fc!=f->facet_cycles_end()) {
+	 CGAL_assertion(fct!=f->twin()->facet_cycles_end());
+	 if(fc.is_shalfedge()) {
+	   CGAL_assertion(fct.is_shalfedge());
+	   setemp = fc;
+	   *fc = *fct;
+	   *fct = make_object(setemp);
+	 }
+	 ++fc;
+	 ++fct;
+       }
+     }
+   
+     CGAL_forall_halffacets(f, snc()) {
+       Halffacet_cycle_iterator fc(f->facet_cycles_begin());
+       for(;fc!=f->facet_cycles_end();++fc) {
+	 if(fc.is_shalfedge()) {
+	   setemp = fc;
+	   SHalfedge_around_facet_circulator hfc(setemp),hend(hfc);
+	   ++hfc;
+	   CGAL_For_all(hfc,hend) {
+	     if ( CGAL::lexicographically_xyz_smaller(hfc->source()->source()->point(),
+						      setemp->source()->source()->point()))
+	       setemp = hfc;
+	   }
+	   *fc = make_object(setemp);
+	 }
+       }
+     }
+   }
+ }
+
+  void transform( const Aff_transformation_3& aff) {
+    
+    if( this->is_shared())
+      clone_rep();
+    // only linear transform for the origin-centered sphere maps
+    Aff_transformation_3 linear( aff.hm(0,0), aff.hm(0,1), aff.hm(0,2),
+				 aff.hm(1,0), aff.hm(1,1), aff.hm(1,2),
+				 aff.hm(2,0), aff.hm(2,1), aff.hm(2,2),
+				 aff.hm(3,3));
+    
+    SNC_constructor cstr(snc());
+    
+    std::list<Vertex_handle> vertex_list;
+    std::list<Vertex_handle> corner_list;
+    std::list<Vertex_handle> delete_list;
+    typename std::list<Vertex_handle>::iterator li;
+    typename std::list<Vertex_handle>::iterator li2;
+
+    bool ninety = is_90degree_rotation(aff);
+    bool scale = is_scaling(aff);
+
+    Vertex_iterator vi;
+    CGAL_forall_vertices( vi, snc()) {
+      
+      CGAL_NEF_TRACEN("transform vertex ");
+      if(scale) {
+	if(is_standard(vi))
+	  vi->point() = vi->point().transform( aff);
+	else if(!Infi_box::is_infibox_corner(vi->point())) {
+	  vi->point() = normalized(Infi_box::normalize_transformed_vertex(vi->point().transform(aff)));
+	}
+      } else if (!is_standard(vi) && !ninety) {
+	if(Infi_box::is_infibox_corner(vi->point()))
+	  corner_list.push_back(vi);
+	vertex_list.push_back(vi);
+      } else {
+	vi->point() = vi->point().transform( aff);
+	SM_decorator sdeco(&*vi);
+	sdeco.transform( linear);
+      }
+    }
+
+    if(!this->is_bounded() && !ninety && !scale) {
+      Halffacet_iterator fi;
+      CGAL_forall_facets(fi, snc()) {
+	if(!is_standard(fi) || is_bounded(fi)) continue;
+	Plane_3 pt = fi->plane();
+	pt = pt.transform(aff);
+	std::list<Point_3> points(Infi_box::find_points_of_box_with_plane(cstr,pt));
+	std::list<Vertex_handle> newVertices;
+	newVertices = Infi_box::create_vertices_on_infibox(cstr,
+							   pt, points, fi->mark(), 
+							   fi->twin()->incident_volume()->mark(), 
+							   fi->incident_volume()->mark());
+
+	for(li = newVertices.begin(); li != newVertices.end(); ++li) {
+	  if(Infi_box::is_infibox_corner((*li)->point())) {
+	    li2 = corner_list.begin();
+	    while(li2 != corner_list.end() && (*li2)->point() != (*li)->point()) ++li2;
+	    CGAL_assertion(li2 != corner_list.end());
+	    delete_list.push_back(*li2);
+	    *li2 = *li;
+	  }
+	}
+      }
+      
+      for(li = vertex_list.begin(); li != vertex_list.end();++li) {
+	SM_decorator SD(&**li);
+	if(Infi_box::is_complex_facet_infibox_intersection(**li)) {
+	  Halffacet_handle hf[2];
+	  int i=0;
+	  SHalfedge_iterator sei;
+	  CGAL_forall_sedges(sei,SD) {
+	    if(!Infi_box::is_sedge_on_infibox(sei)) {
+	      hf[i] = sei->facet();
+	      if(hf[i]->is_twin()) hf[i] = hf[i]->twin();
+	      ++i;
+	    }
+	    if(i>1)
+	      break;
+	  }
+	}
+      }
+
+      Association A;
+      SNC_external_structure es(snc());
+      es.clear_external_structure();
+      for(li = vertex_list.begin(); li != vertex_list.end();++li){
+	if(Infi_box::is_complex_facet_infibox_intersection(**li)) {
+	  Vertex_handle v2;
+	  Vertex_handle v1 = cstr.create_for_infibox_overlay(*li);
+	  v1->point() = normalized(Infi_box::normalize_transformed_vertex((*li)->point().transform(aff)));
+	  SM_decorator sdeco(&*v1);
+	  sdeco.transform(linear);	    
+	  switch(Infi_box::type_of_infibox_point(v1->point())) {
+	  case 1: 
+	    v2 = cstr.create_from_point_on_infibox_facet(v1->point()); 
+	    break;
+	  case 2: 
+	    v2 = cstr.create_from_point_on_infibox_edge(v1->point());
+	    break;
+	  case 3: 
+	    v2 = cstr.create_from_point_on_infibox_vertex(v1->point());
+	    li2 = corner_list.begin();
+	    while(li2 != corner_list.end() && (*li2)->point() != v2->point()) ++li2;
+	    if(li2 != corner_list.end())
+	      delete_list.push_back(*li2);
+	    break;
+	  default: CGAL_error_msg( "wrong value");
+	  }
+	  Vertex_handle v = snc().new_vertex(v1->point(), (*li)->mark());
+	  SM_overlayer O(&*v);
+	  O.subdivide(&*v1, &*v2, A);
+	  AND _and;
+	  O.select(_and);
+	  O.simplify(A);
+	  snc().delete_vertex(v1);
+	  snc().delete_vertex(v2);
+	}
+	
+	if(Infi_box::is_infibox_corner((*li)->point())) {
+	  SM_decorator SD(&**li);
+	  if(SD.number_of_svertices() < 4)
+	    continue;
+	  li2 = corner_list.begin();
+	  while(li2 != corner_list.end() && (*li2)->point() != (*li)->point()) ++li2;
+	  CGAL_assertion(li2 != corner_list.end());
+	  if(*li == *li2) {
+	    delete_list.push_back(*li2);
+	    *li2 = cstr.create_from_point_on_infibox_vertex((*li)->point());
+	  }
+	} else 
+	  snc().delete_vertex(*li);	  
+      }
+
+      for(li = delete_list.begin(); li != delete_list.end(); ++li)
+	snc().delete_vertex(*li);
+
+      if(!aff.is_even())
+	change_orientation();
+
+      while(cstr.erase_redundant_vertices()) ;
+      cstr.correct_infibox_sedge_marks();
+
+      build_external_structure();
+      cstr.correct_infibox_sface_marks();
+
+      // are the upcoming lines necessary? 
+      SNC_point_locator* old_pl = pl();
+      pl() = pl()->clone();
+      pl()->initialize(&snc());
+      delete old_pl;   
+
+    } else {
+      Halffacet_iterator fi;
+      CGAL_forall_halffacets(fi,snc()) {
+	if(is_standard(fi) || ninety) {
+	  fi->plane() = fi->plane().transform( aff);
+#ifdef CGAL_NEF3_FACET_WITH_BOX 
+	  typedef typename Halffacet::Box Box;
+	  bool first = true;
+	  Halffacet_cycle_iterator cycle_it = fi->facet_cycles_begin();
+	  if( cycle_it.is_shalfedge() ) {
+	    SHalfedge_iterator edge_it(cycle_it);
+	    SHalfedge_around_facet_circulator
+	      start( edge_it ), end( edge_it );
+	    CGAL_For_all( start, end ) {
+	      const Point_3& p = start->source()->source()->point();
+	      typename Kernel::FT q[3];
+	      q[0] = p.x();
+	      q[1] = p.y();
+	      q[2] = p.z();
+	      if(first) {
+		fi->b = Box(q,q);
+		first = false;
+	      } else
+		fi->b.extend(q);
+	    }
+	  } else
+	    CGAL_error_msg( "is facet first cycle a SHalfloop?"); 
+#endif
+	}
+      }    
+
+      if(!aff.is_even())
+	change_orientation(true);
+
+      if(aff.homogeneous(0,1) != 0 ||
+	 aff.homogeneous(0,2) != 0 ||
+	 aff.homogeneous(1,0) != 0 ||
+	 aff.homogeneous(1,2) != 0 ||
+	 aff.homogeneous(2,0) != 0 ||
+	 aff.homogeneous(2,1) != 0 ||
+	 aff.homogeneous(0,0) != aff.homogeneous(1,1) ||
+	 aff.homogeneous(0,0) != aff.homogeneous(2,2) ||
+	 !this->is_bounded()) {
+	   SNC_point_locator* old_pl = pl();
+	   pl() = pl()->clone();
+	   pl()->initialize(&snc());
+	   delete old_pl;   
+	 }
+      else pl()->transform(aff); 
+    }
+
+    SNC_constructor C(snc());
+    C.assign_indices(); 
+  }
+  
+  /*{\Mtext \headerline{Exploration}
+  As Nef polyhedra are the result of forming complements 
+  and intersections starting from a set |H| of halfspaces which are
+  defined by oriented planes in three space. The corresponding 
+  structure is represented by an extended wuerzburg structure 
+  $W = (V,E,F,C)$. For topological queries within |W| the following 
+  types and operations allow exploration access to this structure.}*/
+
+  /*{\Mtypes 3}*/
+    
+    typedef CGAL::SNC_SM_explorer<SM_const_decorator>  SM_explorer;
+
+    SM_explorer SMexplorer(Vertex_const_handle v) const { 
+      SM_const_decorator SMCD(&*v);
+      return SM_explorer(SMCD); 
+    }
+
+  typedef typename SNC_structure::Object_list Object_list;
+  typedef typename SNC_structure::Object_handle Object_handle;
+  /*{\Mtypemember a generic handle to an object of the underlying
+  plane map. The kind of object |(vertex, halfedge, face)| can 
+  be determined and the object can be assigned to a corresponding
+  handle by the three functions:\\
+  |bool assign(Vertex_const_handle& h, Object_handle)|\\
+  |bool assign(Edge_const_handle& h, Object_handle)|\\
+  |bool assign(Facet_const_handle& h, Object_handle)|\\
+  |bool assign(Volume_const_handle& h, Object_handle)|\\
+  where each function returns |true| iff the assignment to
+  |h| was done.}*/
+
+  /*{\Moperations 3 1 }*/
+
+  bool contains(Object_handle /*h*/) const
+  /*{\Mop  returns true iff the object |h| is contained in the set
+  represented by |\Mvar|.}*/
+    // { SNC_point_locator PL(snc()); return PL.mark(h);} 
+    { CGAL_error_msg( "not implemented."); return false;}
+
+  bool contained_in_boundary(Object_handle h) const
+  /*{\Mop  returns true iff the object |h| is contained in the $2$-skeleton
+  of |\Mvar|.}*/
+  { Vertex_const_handle v;
+    Halfedge_const_handle e;
+    Halffacet_const_handle f;
+    return  ( assign(v,h) || assign(e,h) || assign(f,h) );
+  }
+
+  Object_handle locate(const Point_3& p) const
+  /*{\Mop  returns a generic handle |h| to an object (vertex, edge, facet,
+  volume) of the underlying SNC which contains the point |p| in its relative 
+  interior. The point |p| is contained in the set represented by |\Mvar| if 
+  |\Mvar.contains(h)| is true.}*/ {
+    CGAL_NEF_TRACEN( "locating point...");
+    CGAL_assertion( pl() != NULL);
+
+    Object_handle o = pl()->locate(p);
+    
+    Vertex_handle v;
+    Halfedge_handle e;
+    Halffacet_handle f;
+    Volume_handle c;
+    if(assign(v,o)) return make_object(Vertex_const_handle(v));
+    if(assign(e,o)) return make_object(Halfedge_const_handle(e));
+    if(assign(f,o)) return make_object(Halffacet_const_handle(f));
+    if(assign(c,o)) return make_object(Volume_const_handle(c));
+
+    return Object_handle();
+  }
+
+  /*{\Mimplementation Nef polyhedra are implemented on top of an
+  extended Wuerzburg structure data structure (EWS) and use linear
+  space in the number of vertices, edges and facets.  Operations like
+  empty take constant time. The operations clear, complement, interior,
+  closure, boundary, regularization, input and output take linear
+  time. All binary set operations and comparison operations take time
+  $O(N^2)$ where $N$ is the size of the output plus the size of the
+  input.
+
+  The point location operations run in linear query time without any 
+  preprocessing.}*/
+
+  /*{\Mexample Nef polyhedra are parameterized by a so called extended
+  geometric kernel. There's currently only one such kernel based on a
+  homogeneous representation of extended points called
+  |Extended_homogeneous<NT>|.  The kernel is parameterized by a
+  multiprecision integer type. The member types of |Nef_polyhedron_3<
+  Extended_homogeneous_3<NT> >| map to corresponding types of the CGAL
+  geometry kernel (e.g. |Nef_polyhedron::Plane_3| equals
+  |CGAL::Homogeneous<leda_integer>::Plane_3| in the example below).
+  \begin{Mverb}
+  #include <CGAL/basic.h>
+  #include <CGAL/leda_integer.h>
+  #include <CGAL/Extended_homogeneous.h>
+  #include <CGAL/Nef_polyhedron_3.h>
+
+  using namespace CGAL;
+  typedef  Extended_homogeneous<leda_integer>   Extended_kernel;
+  typedef  Nef_polyhedron_3<Extended_kernel>    Nef_polyhedron;
+  typedef  Nef_polyhedron::Plane_3              Plane_3;
+
+  int main()
+  {
+    Nef_polyhedron N1(Plane_3(1,0,0,0));
+    Nef_polyhedron N2(Plane_3(0,1,0,0), Nef_polyhedron::EXCLUDED);
+    Nef_polyhedron N3 = N1 * N2; // line (*)
+    return 0;
+  }
+  \end{Mverb}
+  After line (*) |N3| is the intersection of |N1| and |N2|.}*/
+
+  std::size_t bytes() {
+    // bytes used for the Nef_polyhedron_3.
+    return sizeof(Self) + (snc().bytes() - sizeof(SNC_structure));
+  }
+
+  std::size_t bytes_reduced() {
+    // bytes used for the Nef_polyhedron_3.
+    std::cout << sizeof(Self) + (snc().bytes_reduced2() - sizeof(SNC_structure)) << std::endl;
+    return sizeof(Self) + (snc().bytes_reduced() - sizeof(SNC_structure));
+  }
+
+}; // end of Nef_polyhedron_3
+
+template <typename Kernel, typename Items, typename Mark>
+Nef_polyhedron_3<Kernel,Items, Mark>::
+Nef_polyhedron_3( Content space) {
+  CGAL_NEF_TRACEN("construction from empty or space.");
+  empty_rep();
+  set_snc(snc());
+  if(Infi_box::extended_kernel()) {
+    initialize_infibox_vertices(space);
+    build_external_structure();
+  } else {
+    build_external_structure();
+    snc().volumes_begin()->mark() = (space == COMPLETE) ? 1 : 0;
+  }
+}
+
+template <typename Kernel, typename Items, typename Mark>
+Nef_polyhedron_3<Kernel,Items, Mark>::
+Nef_polyhedron_3(const Plane_3& h, Boundary b) {
+  CGAL_NEF_TRACEN("construction from plane "<<h);
+  empty_rep();
+  set_snc(snc());
+  SNC_constructor C(snc());
+  Infi_box::create_vertices_of_box_with_plane(C,h,(b==INCLUDED));
+  build_external_structure();
+  /*
+  if(Infi_box::extended_kernel()) {
+    SNC_structure snc1, snc2;
+    SNC_point_locator* pl1 = new SNC_point_locator_default; 
+    SNC_point_locator* pl2 = new SNC_point_locator_default; 
+
+    SNC_constructor c1(snc1); 
+    Infi_box::initialize_infibox_vertices(c1, true);
+    SNC_external_structure es1(snc1, pl1);
+    es1.build_external_structure();
+
+    SNC_constructor c2(snc2);
+    c2.create_vertices_for_halfspace(h, b);
+    SNC_external_structure es2(snc2, pl2);
+    es2.pair_up_halfedges();
+    es2.link_shalfedges_to_facet_cycles();
+    c2.create_facets_and_volumes_of_halfspace(h);
+    pl2->initialize(&snc2);
+
+    AND _and;
+    Binary_operation bo(snc());
+    bo(pl(), snc1, pl1, snc2, pl2, _and);
+    
+    delete pl1;
+    delete pl2;
+  } else
+    CGAL_error_msg
+      ("Constructor is only available with extended kernels");
+  */
+}
+ 
+template <typename Kernel, typename Items, typename Mark>
+Nef_polyhedron_3<Kernel,Items, Mark>::
+Nef_polyhedron_3( const SNC_structure& W, SNC_point_locator* _pl, 
+		  bool clone_pl,
+		  bool clone_snc) {
+  CGAL_assertion( clone_snc == true || clone_pl == false);
+  // TODO: granados: define behavior when clone=false
+  //  CGAL_NEF_TRACEN("construction from an existing SNC structure (clone="<<clone<<")"); 
+
+  this->copy_on_write();
+  if(clone_snc) {
+    snc() = W;
+    set_snc(snc());
+  }
+  if(clone_pl) {
+    pl() = _pl->clone();
+    pl()->initialize(&snc());
+  } 
+  else
+    pl() = _pl;
+}
+
+template <typename Kernel, typename Items, typename Mark>
+void
+Nef_polyhedron_3<Kernel,Items, Mark>::
+extract_complement() {
+  CGAL_NEF_TRACEN("extract complement");
+  if( this->is_shared()) clone_rep();
+  SNC_decorator D(snc());
+  Vertex_iterator v;
+  CGAL_forall_vertices(v,D){
+    v->mark() = !v->mark(); 
+    SM_decorator SM(&*v);
+    SM.extract_complement();
+  }
+
+  Halffacet_iterator f;
+  CGAL_forall_halffacets(f,D) f->mark() = !f->mark(); 
+ 
+  Volume_iterator c;
+  CGAL_forall_volumes(c,D) 
+    //    if(!(Infi_box::extended_kernel && c==D.volumes_begin()))
+      c->mark() = !c->mark();
+}
+
+template <typename Kernel, typename Items, typename Mark>
+void
+Nef_polyhedron_3<Kernel,Items, Mark>::
+extract_interior() {
+  CGAL_NEF_TRACEN("extract interior");
+  if (this->is_shared()) clone_rep();
+  SNC_decorator D(snc());
+  Vertex_iterator v;
+  CGAL_forall_vertices(v,D){
+    v->mark() = false;
+    SM_decorator SM(&*v);
+    SM.extract_interior();
+  }
+  Halffacet_iterator f;
+  CGAL_forall_halffacets(f,D) f->mark() = false;
+
+  simplify();
+}
+
+template <typename Kernel, typename Items, typename Mark>
+void
+Nef_polyhedron_3<Kernel,Items, Mark>::
+extract_boundary() {
+  CGAL_NEF_TRACEN("extract boundary");
+  if (this->is_shared()) clone_rep();
+  SNC_decorator D(snc());
+  Vertex_iterator v;
+  CGAL_forall_vertices(v,D) {
+    v->mark() = true;
+    SM_decorator SM(&*v);
+    SM.extract_boundary();
+  }
+  Halffacet_iterator f;
+  CGAL_forall_halffacets(f,D) f->mark() = true;
+  Volume_iterator c;
+  CGAL_forall_volumes(c,D) c->mark() = false;
+  simplify();
+}
+
+} //namespace CGAL
+
+#endif //CGAL_NEF_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_S2.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_S2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_polyhedron_S2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_polyhedron_S2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_polynomial.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nef_polynomial_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Nef_polynomial_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nef_polynomial_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nef_polynomial_fwd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Nested_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Nested_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Nested_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Nested_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_LA_base.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_LA_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_LA_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_LA_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_LA_functors.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_LA_functors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_LA_functors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_LA_functors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_base.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_change_FT.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_change_FT.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_change_FT.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_change_FT.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_complete.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_complete.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_complete.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_complete.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_filter_K.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_filter_K.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_filter_K.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_filter_K.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_filter_NT.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_filter_NT.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_filter_NT.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_filter_NT.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_per_dimension.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_per_dimension.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_per_dimension.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_per_dimension.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_static_filters.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_static_filters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Cartesian_static_filters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Cartesian_static_filters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Coaffine.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Coaffine.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Coaffine.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Coaffine.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Define_kernel_types.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Define_kernel_types.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Define_kernel_types.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Define_kernel_types.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Dimension_base.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Dimension_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Dimension_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Dimension_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Filtered_predicate2.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Filtered_predicate2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Filtered_predicate2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Filtered_predicate2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/KernelD_converter.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/KernelD_converter.h
new file mode 100644
index 0000000..8babc59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/KernelD_converter.h
@@ -0,0 +1,199 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
+#define CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
+
+#include <CGAL/basic.h>
+#include <CGAL/tuple.h>
+#include <CGAL/typeset.h>
+#include <CGAL/Object.h>
+#include <CGAL/Origin.h>
+#include <CGAL/NT_converter.h>
+#include <CGAL/NewKernel_d/functor_tags.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/is_iterator.h>
+#include <CGAL/transforming_iterator.h>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <CGAL/NewKernel_d/store_kernel.h>
+#include <CGAL/NewKernel_d/Kernel_object_converter.h>
+
+namespace CGAL {
+namespace internal {
+// Reverses order, but that shouldn't matter.
+template<class K,class T> struct Map_taglist_to_typelist :
+  Map_taglist_to_typelist<K,typename T::tail>::type
+  ::template add<typename Get_type<K, typename T::head>::type>
+{};
+template<class K> struct Map_taglist_to_typelist<K,typeset<> > : typeset<> {};
+}
+
+template<class List = typeset<> >
+struct Object_converter {
+	typedef Object result_type;
+	template<class F>
+	result_type operator()(Object const& o, F const& f) const {
+	  typedef typename List::head H;
+		if (H const* ptr = object_cast<H>(&o))
+			return make_object(f(*ptr));
+		else
+			return Object_converter<typename List::tail>()(o,f);
+	}
+};
+template<>
+struct Object_converter <typeset<> > {
+	typedef Object result_type;
+	template<class F>
+	result_type operator()(Object const&,F const&)const {
+		CGAL_error_msg("Cartesiand_converter is unable to determine what is wrapped in the Object");
+		return Object();
+	}
+};
+
+
+	//TODO: special case when K1==K2 (or they are very close?)
+template<class Final_, class K1, class K2, class List>
+class KernelD_converter_
+: public KernelD_converter_<Final_,K1,K2,typename List::tail>
+{
+	typedef typename List::head Tag_;
+	typedef typename List::tail Rest;
+	typedef KernelD_converter_<Final_,K1,K2,Rest> Base;
+	typedef typename Get_type<K1,Tag_>::type K1_Obj;
+	typedef typename Get_type<K2,Tag_>::type K2_Obj;
+	typedef typename Get_functor<K1, Convert_ttag<Tag_> >::type K1_Conv;
+	typedef KO_converter<Tag_,K1,K2> KOC;
+	typedef CGAL_BOOSTD is_same<K1_Conv, Null_functor> no_converter;
+	typedef typename internal::Map_taglist_to_typelist<K1,Rest>::type::template contains<K1_Obj> duplicate;
+
+	// Disable the conversion in some cases:
+	struct Do_not_use{};
+
+        // Explicit calls to boost::mpl functions to avoid parenthesis
+        // warning on some versions of GCC
+	typedef typename boost::mpl::if_ <
+                          // If Point==Vector, keep only one conversion
+          boost::mpl::or_<boost::mpl::bool_<duplicate::value>,
+                          // For iterator objects, the default is make_transforming_iterator
+                          boost::mpl::bool_<(iterator_tag_traits<Tag_>::is_iterator && no_converter::value)> >,
+	  Do_not_use,K1_Obj>::type argument_type;
+	//typedef typename KOC::argument_type K1_Obj;
+	//typedef typename KOC::result_type K2_Obj;
+	public:
+	using Base::operator(); // don't use directly, just make it accessible to the next level
+	K2_Obj helper(K1_Obj const& o,CGAL_BOOSTD true_type)const{
+		return KOC()(this->myself().kernel(),this->myself().kernel2(),this->myself(),o);
+	}
+	K2_Obj helper(K1_Obj const& o,CGAL_BOOSTD false_type)const{
+		return K1_Conv(this->myself().kernel())(this->myself().kernel2(),this->myself(),o);
+	}
+	K2_Obj operator()(argument_type const& o)const{
+	  return helper(o,no_converter());
+	}
+	template<class X,int=0> struct result:Base::template result<X>{};
+	template<int i> struct result<Final_(argument_type),i> {typedef K2_Obj type;};
+};
+
+template<class Final_, class K1, class K2>
+class KernelD_converter_<Final_,K1,K2,typeset<> > {
+	public:
+	struct Do_not_use2{};
+	void operator()(Do_not_use2)const{}
+	template<class T> struct result;
+	Final_& myself(){return *static_cast<Final_*>(this);}
+	Final_ const& myself()const{return *static_cast<Final_ const*>(this);}
+};
+
+
+// TODO: use the intersection of Kn::Object_list.
+template<class K1, class K2, class List_=
+typename typeset_intersection<typename K1::Object_list, typename K2::Object_list>::type
+//typeset<Point_tag>::add<Vector_tag>::type/*::add<Segment_tag>::type*/
+> class KernelD_converter
+	: public Store_kernel<K1>, public Store_kernel2<K2>,
+	public KernelD_converter_<KernelD_converter<K1,K2,List_>,K1,K2,List_>
+{
+	typedef KernelD_converter Self;
+	typedef Self Final_;
+	typedef KernelD_converter_<Self,K1,K2,List_> Base;
+	typedef typename Get_type<K1, FT_tag>::type FT1;
+	typedef typename Get_type<K2, FT_tag>::type FT2;
+	typedef NT_converter<FT1, FT2> NTc;
+	NTc c; // TODO: compressed storage as this is likely empty and the converter gets passed around (and stored in iterators)
+
+	public:
+	KernelD_converter(){}
+	KernelD_converter(K1 const&a,K2 const&b):Store_kernel<K1>(a),Store_kernel2<K2>(b){}
+
+	// For boost::result_of, used in transforming_iterator
+	template<class T,int i=is_iterator<T>::value?42:0> struct result:Base::template result<T>{};
+	template<class T> struct result<Final_(T),42> {
+		typedef transforming_iterator<Final_,T> type;
+	};
+	template<int i> struct result<Final_(K1),i>{typedef K2 type;};
+	template<int i> struct result<Final_(int),i>{typedef int type;};
+	// Ideally the next 2 would come with Point_tag and Vector_tag, but that's hard...
+	template<int i> struct result<Final_(Origin),i>{typedef Origin type;};
+	template<int i> struct result<Final_(Null_vector),i>{typedef Null_vector type;};
+	template<int i> struct result<Final_(Object),i>{typedef Object type;};
+	template<int i> struct result<Final_(FT1),i>{typedef FT2 type;};
+
+	using Base::operator();
+	typename Store_kernel2<K2>::reference2_type operator()(K1 const&)const{return this->kernel2();}
+	int operator()(int i)const{return i;}
+	Origin operator()(Origin const&o)const{return o;}
+	Null_vector operator()(Null_vector const&v)const{return v;}
+	FT2 operator()(FT1 const&x)const{return c(x);}
+	//RT2 operator()(typename First_if_different<RT1,FT1>::Type const&x)const{return cr(x);}
+
+	typename Get_type<K2, Flat_orientation_tag>::type const&
+	operator()(typename Get_type<K1, Flat_orientation_tag>::type const&o)const
+	{ return o; } // Both kernels should have the same, returning a reference should warn if not.
+
+	template<class It>
+	transforming_iterator<Final_,typename boost::enable_if<is_iterator<It>,It>::type>
+	operator()(It const& it) const {
+		return make_transforming_iterator(it,*this);
+	}
+
+	template<class T>
+	//TODO: use decltype in C++11 instead of result
+	std::vector<typename result<Final_(T)>::type>
+	operator()(const std::vector<T>& v) const {
+		return std::vector<typename result<Final_(T)>::type>(operator()(v.begin()),operator()(v.begin()));
+	}
+
+	//TODO: convert std::list and other containers?
+
+	Object
+	operator()(const Object &obj) const
+	{
+		typedef typename internal::Map_taglist_to_typelist<K1,List_>::type Possibilities;
+		//TODO: add Empty, vector<Point>, etc to the list.
+		return Object_converter<Possibilities>()(obj,*this);
+	}
+
+	//TODO: convert boost::variant
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_KERNEL_D_CARTESIAN_CONVERTER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_2_interface.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_2_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_2_interface.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_2_interface.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_3_interface.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_3_interface.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_3_interface.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_3_interface.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_d_interface.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_d_interface.h
new file mode 100644
index 0000000..43a074c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_d_interface.h
@@ -0,0 +1,238 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KD_KERNEL_D_INTERFACE_H
+#define CGAL_KD_KERNEL_D_INTERFACE_H
+
+#include <CGAL/NewKernel_d/functor_tags.h>
+#include <CGAL/transforming_iterator.h>
+#include <CGAL/NewKernel_d/utils.h>
+#include <CGAL/tuple.h>
+
+
+namespace CGAL {
+template <class Base_> struct Kernel_d_interface : public Base_ {
+  CGAL_CONSTEXPR Kernel_d_interface(){}
+  CGAL_CONSTEXPR Kernel_d_interface(int d):Base_(d){}
+
+	typedef Base_ Base;
+	typedef Kernel_d_interface<Base> Kernel;
+	typedef Base_ R_; // for the macros
+	typedef typename Get_type<Base, RT_tag>::type RT;
+	typedef typename Get_type<Base, FT_tag>::type FT;
+	typedef typename Get_type<Base, Bool_tag>::type Boolean;
+	typedef typename Get_type<Base, Sign_tag>::type Sign;
+	typedef typename Get_type<Base, Comparison_result_tag>::type Comparison_result;
+	typedef typename Get_type<Base, Orientation_tag>::type Orientation;
+	typedef typename Get_type<Base, Oriented_side_tag>::type Oriented_side;
+	typedef typename Get_type<Base, Bounded_side_tag>::type Bounded_side;
+	typedef typename Get_type<Base, Angle_tag>::type Angle;
+	typedef typename Get_type<Base, Flat_orientation_tag>::type Flat_orientation_d;
+	typedef typename Get_type<Base, Point_tag>::type	Point_d;
+	typedef typename Get_type<Base, Vector_tag>::type	Vector_d;
+	typedef typename Get_type<Base, Segment_tag>::type	Segment_d;
+	typedef typename Get_type<Base, Sphere_tag>::type	Sphere_d;
+	typedef typename Get_type<Base, Hyperplane_tag>::type	Hyperplane_d;
+	typedef Vector_d Direction_d;
+	typedef typename Get_type<Base, Line_tag>::type	Line_d;
+	typedef typename Get_type<Base, Ray_tag>::type	Ray_d;
+	typedef typename Get_type<Base, Iso_box_tag>::type	Iso_box_d;
+	typedef typename Get_type<Base, Aff_transformation_tag>::type	Aff_transformation_d;
+	typedef typename Get_functor<Base, Compute_point_cartesian_coordinate_tag>::type Compute_coordinate_d;
+	typedef typename Get_functor<Base, Compare_lexicographically_tag>::type Compare_lexicographically_d;
+	typedef typename Get_functor<Base, Equal_points_tag>::type Equal_d;
+	typedef typename Get_functor<Base, Less_lexicographically_tag>::type Less_lexicographically_d;
+	typedef typename Get_functor<Base, Less_or_equal_lexicographically_tag>::type Less_or_equal_lexicographically_d;
+	// FIXME: and vectors?
+	typedef typename Get_functor<Base, Orientation_of_points_tag>::type Orientation_d;
+	typedef typename Get_functor<Base, Less_point_cartesian_coordinate_tag>::type Less_coordinate_d;
+	typedef typename Get_functor<Base, Point_dimension_tag>::type Point_dimension_d;
+	typedef typename Get_functor<Base, Side_of_oriented_sphere_tag>::type Side_of_oriented_sphere_d;
+	typedef typename Get_functor<Base, Contained_in_affine_hull_tag>::type Contained_in_affine_hull_d;
+	typedef typename Get_functor<Base, Construct_flat_orientation_tag>::type Construct_flat_orientation_d;
+	typedef typename Get_functor<Base, In_flat_orientation_tag>::type In_flat_orientation_d;
+	typedef typename Get_functor<Base, In_flat_side_of_oriented_sphere_tag>::type In_flat_side_of_oriented_sphere_d;
+	typedef typename Get_functor<Base, Point_to_vector_tag>::type Point_to_vector_d;
+	typedef typename Get_functor<Base, Vector_to_point_tag>::type Vector_to_point_d;
+	typedef typename Get_functor<Base, Scaled_vector_tag>::type Scaled_vector_d;
+	typedef typename Get_functor<Base, Difference_of_vectors_tag>::type Difference_of_vectors_d;
+	typedef typename Get_functor<Base, Difference_of_points_tag>::type Difference_of_points_d;
+	typedef typename Get_functor<Base, Construct_ttag<Point_tag> >::type Construct_point_d;
+	typedef typename Get_functor<Base, Construct_ttag<Vector_tag> >::type Construct_vector_d;
+	typedef typename Get_functor<Base, Construct_ttag<Segment_tag> >::type Construct_segment_d;
+	typedef typename Get_functor<Base, Construct_ttag<Sphere_tag> >::type Construct_sphere_d;
+	typedef typename Get_functor<Base, Construct_ttag<Hyperplane_tag> >::type Construct_hyperplane_d;
+	typedef Construct_vector_d Construct_direction_d;
+	typedef typename Get_functor<Base, Construct_ttag<Line_tag> >::type Construct_line_d;
+	typedef typename Get_functor<Base, Construct_ttag<Ray_tag> >::type Construct_ray_d;
+	typedef typename Get_functor<Base, Construct_ttag<Iso_box_tag> >::type Construct_iso_box_d;
+	typedef typename Get_functor<Base, Construct_ttag<Aff_transformation_tag> >::type Construct_aff_transformation_d;
+	typedef typename Get_functor<Base, Midpoint_tag>::type Midpoint_d;
+	struct Component_accessor_d : private Store_kernel<Kernel> {
+	  typedef Kernel R_; // for the macro
+	  CGAL_FUNCTOR_INIT_STORE(Component_accessor_d)
+	  int dimension(Point_d const&p){
+	    return this->kernel().point_dimension_d_object()(p);
+	  }
+	  FT cartesian(Point_d const&p, int i){
+	    return this->kernel().compute_coordinate_d_object()(p,i);
+	  }
+	  RT homogeneous(Point_d const&p, int i){
+	    if (i == dimension(p))
+	      return 1;
+	    return cartesian(p, i);
+	  }
+	};
+	struct Construct_cartesian_const_iterator_d : private Store_kernel<R_> {
+	  CGAL_FUNCTOR_INIT_STORE(Construct_cartesian_const_iterator_d)
+	  typedef typename Get_functor<Base, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
+	  typedef typename Get_functor<Base, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
+	  // FIXME: The following sometimes breaks compilation. The typedef below forces instantiation of this, which forces Point_d, which itself (in the wrapper) needs the derived kernel to tell it what the base kernel is, and that's a cycle. The exact circumstances are not clear, g++ and clang++ are ok in both C++03 and C++11, it is only clang in C++11 without CGAL_CXX11 that breaks. For now, rely on result_type.
+	  //typedef typename CGAL::decay<typename boost::result_of<CPI(Point_d,CGAL::Begin_tag)>::type>::type result_type;
+	  typedef typename CGAL::decay<typename CPI::result_type>::type result_type;
+	  // Kernel_d requires a common iterator type for points and vectors
+	  // TODO: provide this mixed functor in preKernel?
+	  //CGAL_static_assertion((boost::is_same<typename CGAL::decay<typename boost::result_of<CVI(Vector_d,CGAL::Begin_tag)>::type>::type, result_type>::value));
+	  CGAL_static_assertion((boost::is_same<typename CGAL::decay<typename CVI::result_type>::type, result_type>::value));
+	  template <class Tag_>
+	  result_type operator()(Point_d const&p, Tag_ t)const{
+	    return CPI(this->kernel())(p,t);
+	  }
+	  template <class Tag_>
+	  result_type operator()(typename First_if_different<Vector_d,Point_d>::Type const&v, Tag_ t)const{
+	    return CVI(this->kernel())(v,t);
+	  }
+
+	  template <class Obj>
+	  result_type operator()(Obj const&o)const{
+	    return operator()(o, Begin_tag());
+	  }
+	  result_type operator()(Point_d const&p, int)const{
+	    return operator()(p, End_tag());
+	  }
+	  result_type operator()(typename First_if_different<Vector_d,Point_d>::Type const&v, int)const{
+	    return operator()(v, End_tag());
+	  }
+	};
+	struct Compute_squared_radius_d : private Store_kernel<Kernel> {
+	  typedef Kernel R_; // for the macro
+	  CGAL_FUNCTOR_INIT_STORE(Compute_squared_radius_d)
+	  typedef FT result_type;
+	  template<class S> FT operator()(CGAL_FORWARDABLE(S) s)const{
+	    return typename Get_functor<Base, Squared_radius_tag>::type(this->kernel())(CGAL_FORWARD(S,s));
+	  }
+	  template<class I> FT operator()(I b, I e)const{
+	    return typename Get_functor<Base, Squared_circumradius_tag>::type(this->kernel())(b,e);
+	  }
+	};
+	typedef typename Construct_cartesian_const_iterator_d::result_type Cartesian_const_iterator_d;
+	typedef typename Get_functor<Base, Squared_distance_tag>::type Squared_distance_d;
+	typedef typename Get_functor<Base, Squared_length_tag>::type Squared_length_d;
+	typedef typename Get_functor<Base, Scalar_product_tag>::type Scalar_product_d;
+	typedef typename Get_functor<Base, Affine_rank_tag>::type Affine_rank_d;
+	typedef typename Get_functor<Base, Affinely_independent_tag>::type Affinely_independent_d;
+	typedef typename Get_functor<Base, Contained_in_linear_hull_tag>::type Contained_in_linear_hull_d;
+	typedef typename Get_functor<Base, Contained_in_simplex_tag>::type Contained_in_simplex_d;
+	typedef typename Get_functor<Base, Has_on_positive_side_tag>::type Has_on_positive_side_d;
+	typedef typename Get_functor<Base, Linear_rank_tag>::type Linear_rank_d;
+	typedef typename Get_functor<Base, Linearly_independent_tag>::type Linearly_independent_d;
+	typedef typename Get_functor<Base, Oriented_side_tag>::type Oriented_side_d;
+	typedef typename Get_functor<Base, Side_of_bounded_circumsphere_tag>::type Side_of_bounded_sphere_d;
+
+	typedef typename Get_functor<Base, Center_of_sphere_tag>::type Center_of_sphere_d;
+	typedef typename Get_functor<Base, Construct_circumcenter_tag>::type Construct_circumcenter_d;
+	typedef typename Get_functor<Base, Value_at_tag>::type Value_at_d;
+	typedef typename Get_functor<Base, Point_of_sphere_tag>::type Point_of_sphere_d;
+	typedef typename Get_functor<Base, Orthogonal_vector_tag>::type Orthogonal_vector_d;
+	typedef typename Get_functor<Base, Linear_base_tag>::type Linear_base_d;
+	typedef typename Get_functor<Base, Construct_min_vertex_tag>::type Construct_min_vertex_d;
+	typedef typename Get_functor<Base, Construct_max_vertex_tag>::type Construct_max_vertex_d;
+
+	//TODO:
+	//typedef ??? Intersect_d;
+
+
+	Compute_coordinate_d compute_coordinate_d_object()const{ return Compute_coordinate_d(*this); }
+	Has_on_positive_side_d has_on_positive_side_d_object()const{ return Has_on_positive_side_d(*this); }
+	Compare_lexicographically_d compare_lexicographically_d_object()const{ return Compare_lexicographically_d(*this); }
+	Equal_d equal_d_object()const{ return Equal_d(*this); }
+	Less_lexicographically_d less_lexicographically_d_object()const{ return Less_lexicographically_d(*this); }
+	Less_or_equal_lexicographically_d less_or_equal_lexicographically_d_object()const{ return Less_or_equal_lexicographically_d(*this); }
+	Less_coordinate_d less_coordinate_d_object()const{ return Less_coordinate_d(*this); }
+	Orientation_d orientation_d_object()const{ return Orientation_d(*this); }
+	Oriented_side_d oriented_side_d_object()const{ return Oriented_side_d(*this); }
+	Point_dimension_d point_dimension_d_object()const{ return Point_dimension_d(*this); }
+	Point_of_sphere_d point_of_sphere_d_object()const{ return Point_of_sphere_d(*this); }
+	Side_of_oriented_sphere_d side_of_oriented_sphere_d_object()const{ return Side_of_oriented_sphere_d(*this); }
+	Side_of_bounded_sphere_d side_of_bounded_sphere_d_object()const{ return Side_of_bounded_sphere_d(*this); }
+	Contained_in_affine_hull_d contained_in_affine_hull_d_object()const{ return Contained_in_affine_hull_d(*this); }
+	Contained_in_linear_hull_d contained_in_linear_hull_d_object()const{ return Contained_in_linear_hull_d(*this); }
+	Contained_in_simplex_d contained_in_simplex_d_object()const{ return Contained_in_simplex_d(*this); }
+	Construct_flat_orientation_d construct_flat_orientation_d_object()const{ return Construct_flat_orientation_d(*this); }
+	In_flat_orientation_d in_flat_orientation_d_object()const{ return In_flat_orientation_d(*this); }
+	In_flat_side_of_oriented_sphere_d in_flat_side_of_oriented_sphere_d_object()const{ return In_flat_side_of_oriented_sphere_d(*this); }
+	Point_to_vector_d point_to_vector_d_object()const{ return Point_to_vector_d(*this); }
+	Vector_to_point_d vector_to_point_d_object()const{ return Vector_to_point_d(*this); }
+	Scaled_vector_d scaled_vector_d_object()const{ return Scaled_vector_d(*this); }
+	Difference_of_vectors_d difference_of_vectors_d_object()const{ return Difference_of_vectors_d(*this); }
+	Difference_of_points_d difference_of_points_d_object()const{ return Difference_of_points_d(*this); }
+	Affine_rank_d affine_rank_d_object()const{ return Affine_rank_d(*this); }
+	Affinely_independent_d affinely_independent_d_object()const{ return Affinely_independent_d(*this); }
+	Linear_base_d linear_base_d_object()const{ return Linear_base_d(*this); }
+	Linear_rank_d linear_rank_d_object()const{ return Linear_rank_d(*this); }
+	Linearly_independent_d linearly_independent_d_object()const{ return Linearly_independent_d(*this); }
+	Midpoint_d midpoint_d_object()const{ return Midpoint_d(*this); }
+	Value_at_d value_at_d_object()const{ return Value_at_d(*this); }
+	/// Intersect_d intersect_d_object()const{ return Intersect_d(*this); }
+	Component_accessor_d component_accessor_d_object()const{ return Component_accessor_d(*this); }
+	Orthogonal_vector_d orthogonal_vector_d_object()const{ return Orthogonal_vector_d(*this); }
+	Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object()const{ return Construct_cartesian_const_iterator_d(*this); }
+	Construct_point_d construct_point_d_object()const{ return Construct_point_d(*this); }
+	Construct_vector_d construct_vector_d_object()const{ return Construct_vector_d(*this); }
+	Construct_segment_d construct_segment_d_object()const{ return Construct_segment_d(*this); }
+	Construct_sphere_d construct_sphere_d_object()const{ return Construct_sphere_d(*this); }
+	Construct_hyperplane_d construct_hyperplane_d_object()const{ return Construct_hyperplane_d(*this); }
+	Compute_squared_radius_d compute_squared_radius_d_object()const{ return Compute_squared_radius_d(*this); }
+	Squared_distance_d squared_distance_d_object()const{ return Squared_distance_d(*this); }
+	Squared_length_d squared_length_d_object()const{ return Squared_length_d(*this); }
+	Scalar_product_d scalar_product_d_object()const{ return Scalar_product_d(*this); }
+	Center_of_sphere_d center_of_sphere_d_object()const{ return Center_of_sphere_d(*this); }
+	Construct_circumcenter_d construct_circumcenter_d_object()const{ return Construct_circumcenter_d(*this); }
+	Construct_direction_d construct_direction_d_object()const{ return Construct_direction_d(*this); }
+	Construct_line_d construct_line_d_object()const{ return Construct_line_d(*this); }
+	Construct_ray_d construct_ray_d_object()const{ return Construct_ray_d(*this); }
+	Construct_iso_box_d construct_iso_box_d_object()const{ return Construct_iso_box_d(*this); }
+	Construct_aff_transformation_d construct_aff_transformation_d_object()const{ return Construct_aff_transformation_d(*this); }
+	Construct_min_vertex_d construct_min_vertex_d_object()const{ return Construct_min_vertex_d(*this); }
+	Construct_max_vertex_d construct_max_vertex_d_object()const{ return Construct_max_vertex_d(*this); }
+
+	// Dummies for those required functors missing a concept.
+	typedef Null_functor Position_on_line_d;
+	Position_on_line_d position_on_line_d_object()const{return Null_functor();}
+	typedef Null_functor Barycentric_coordinates_d;
+	Barycentric_coordinates_d barycentric_coordinates_d_object()const{return Null_functor();}
+
+	/* Not provided because they don't make sense here:
+	   Lift_to_paraboloid_d
+	   Project_along_d_axis_d
+	 */
+};
+}
+
+#endif // CGAL_KD_KERNEL_D_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_object_converter.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_object_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Kernel_object_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Kernel_object_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/LA_eigen/LA.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/LA_eigen/LA.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/LA_eigen/LA.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/LA_eigen/LA.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/LA_eigen/constructors.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/LA_eigen/constructors.h
new file mode 100644
index 0000000..3636996
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/LA_eigen/constructors.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_LA_EIGEN_CONSTRUCTORS_H
+#define CGAL_LA_EIGEN_CONSTRUCTORS_H
+#include <CGAL/config.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4003) // not enough actual parameters for macro 'BOOST_PP_EXPAND_I'
+                                // http://lists.boost.org/boost-users/2014/11/83291.php
+#endif 
+
+#ifndef CGAL_EIGEN3_ENABLED
+#error Requires Eigen
+#endif
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <CGAL/Dimension.h>
+#include <Eigen/Dense>
+#include <CGAL/iterator_from_indices.h>
+#include <CGAL/NewKernel_d/utils.h>
+#include <boost/preprocessor/repetition.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+namespace CGAL {
+  template <class Vector_> struct Construct_eigen {
+    typedef Vector_ result_type;
+    typedef typename Vector_::Scalar NT;
+
+    private:
+    static void check_dim(int CGAL_assertion_code(d)){
+      CGAL_assertion_code(int m = result_type::MaxSizeAtCompileTime;)
+      CGAL_assertion((m == Eigen::Dynamic) || (d <= m));
+    }
+    public:
+
+    struct Dimension {
+      // Initialize with NaN if possible?
+      result_type operator()(int d) const {
+	check_dim(d);
+	return result_type(d);
+      }
+    };
+
+    struct Iterator {
+      template<typename Iter>
+	result_type operator()(int d,Iter const& f,Iter const& e) const {
+	  check_dim(d);
+	  CGAL_assertion(d==std::distance(f,e));
+	  result_type a(d);
+	  // TODO: check the right way to do this
+	  std::copy(f,e,&a[0]);
+	  return a;
+	}
+    };
+
+#if 0
+    struct Iterator_add_one {
+      template<typename Iter>
+	result_type operator()(int d,Iter const& f,Iter const& e) const {
+	  check_dim(d);
+	  CGAL_assertion(d==std::distance(f,e)+1);
+	  result_type a(d);
+	  std::copy(f,e,&a[0]);
+	  a[d-1]=1;
+	  return a;
+	}
+    };
+#endif
+
+    struct Iterator_and_last {
+      template<typename Iter,typename T>
+	result_type operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
+	  check_dim(d);
+	  CGAL_assertion(d==std::distance(f,e)+1);
+	  result_type a(d);
+	  std::copy(f,e,&a[0]);
+	  a[d-1]=CGAL_FORWARD(T,t);
+	  return a;
+	}
+    };
+
+#ifdef CGAL_CXX11
+    struct Initializer_list {
+      // Fix T==NT?
+      template<class T>
+	result_type operator()(std::initializer_list<T> l) const {
+	  return Iterator()(l.size(),l.begin(),l.end());
+	}
+    };
+#endif
+
+    struct Values {
+#ifdef CGAL_CXX11
+      // TODO avoid going through Initializer_list which may cause extra copies. Possibly use forward_as_tuple.
+      template<class...U>
+	result_type operator()(U&&...u) const {
+	  check_dim(sizeof...(U)); // TODO: use static_assert
+	  return Initializer_list()({forward_safe<NT,U>(u)...});
+	}
+#else
+
+#define CGAL_CODE(Z,N,_) result_type operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+  check_dim(N); \
+  result_type a(N); \
+  a << BOOST_PP_ENUM_PARAMS(N,t); \
+  return a; \
+}
+BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+
+#endif
+    };
+
+    struct Values_divide {
+#ifdef CGAL_CXX11
+      template<class H,class...U>
+	result_type operator()(H const&h,U&&...u) const {
+	  check_dim(sizeof...(U)); // TODO: use static_assert
+	  return Initializer_list()({Rational_traits<NT>().make_rational(std::forward<U>(u),h)...});
+	}
+#else
+
+#define CGAL_VAR(Z,N,_) ( Rational_traits<NT>().make_rational( t##N ,h) )
+#define CGAL_CODE(Z,N,_) template <class H> result_type \
+  operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+    check_dim(N); \
+    result_type a(N); \
+    a << BOOST_PP_ENUM(N,CGAL_VAR,); \
+    return a; \
+  }
+  BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR
+
+#endif
+    };
+  };
+}
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Lazy_cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Lazy_cartesian.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Lazy_cartesian.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Lazy_cartesian.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Aff_transformation.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Aff_transformation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Aff_transformation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Aff_transformation.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Hyperplane.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Hyperplane.h
new file mode 100644
index 0000000..14e35b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Hyperplane.h
@@ -0,0 +1,159 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KD_TYPE_HYPERPLANE_H
+#define CGAL_KD_TYPE_HYPERPLANE_H
+#include <CGAL/enum.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/NewKernel_d/store_kernel.h>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+namespace CGAL {
+template <class R_> class Hyperplane {
+	typedef typename Get_type<R_, FT_tag>::type FT_;
+	typedef typename Get_type<R_, Vector_tag>::type	Vector_;
+	Vector_ v_;
+	FT_ s_;
+
+	public:
+	Hyperplane(Vector_ const&v, FT_ const&s): v_(v), s_(s) {}
+	// TODO: Add a piecewise constructor?
+
+	Vector_ const& orthogonal_vector()const{return v_;}
+	FT_ translation()const{return s_;}
+};
+namespace CartesianDKernelFunctors {
+template <class R_> struct Construct_hyperplane : Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Construct_hyperplane)
+  typedef typename Get_type<R_, Hyperplane_tag>::type	result_type;
+  typedef typename Get_type<R_, Point_tag>::type	Point;
+  typedef typename Get_type<R_, Vector_tag>::type	Vector;
+  typedef typename Get_type<R_, FT_tag>::type FT;
+  private:
+  struct One {
+    typedef int result_type;
+    template<class T>int const& operator()(T const&)const{
+      static const int one = 1;
+      return one;
+    }
+  };
+  public:
+
+  result_type operator()(Vector const&a, FT const&b)const{
+    return result_type(a,b);
+  }
+  // Not really needed
+  result_type operator()()const{
+    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
+    return result_type(cv(),0);
+  }
+
+  template <class Iter>
+  result_type through(Iter f, Iter e)const{
+    typedef typename R_::LA LA;
+    typedef typename R_::Default_ambient_dimension D1;
+    typedef typename R_::Max_ambient_dimension D2;
+    typedef typename Increment_dimension<D1>::type D1i;
+    typedef typename Increment_dimension<D2>::type D2i;
+
+    typedef Eigen::Matrix<FT, Eigen_dimension<D1>::value, Eigen_dimension<D1i>::value,
+	      Eigen::ColMajor|Eigen::AutoAlign, Eigen_dimension<D2>::value, Eigen_dimension<D2i>::value> Matrix;
+    typedef Eigen::Matrix<FT, Eigen_dimension<D1i>::value, 1,
+	      Eigen::ColMajor|Eigen::AutoAlign, Eigen_dimension<D2i>::value, 1> Vec;
+    typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
+    typename Get_functor<R_, Point_dimension_tag>::type pd(this->kernel());
+
+    Point const& p0=*f;
+    int d = pd(p0);
+    Matrix m(d,d+1);
+    for(int j=0;j<d;++j)
+      m(0,j)=c(p0,j);
+    // Write the point coordinates in lines.
+    int i;
+    for (i=1; ++f!=e; ++i) {
+      Point const& p=*f;
+      for(int j=0;j<d;++j)
+	m(i,j)=c(p,j);
+    }
+    CGAL_assertion (i == d);
+    for(i=0;i<d;++i)
+      m(i,d)=-1;
+    Eigen::FullPivLU<Matrix> lu(m);
+    Vec res = lu.kernel().col(0);
+    return this->operator()(cv(d,LA::vector_begin(res),LA::vector_end(res)-1),res(d));
+  }
+  template <class Iter>
+  result_type operator()(Iter f, Iter e, Point const&p, CGAL::Oriented_side s=ON_ORIENTED_BOUNDARY)const{
+    result_type ret = through(f, e);
+    // I don't really like using ON_ORIENTED_BOUNDARY to mean that we don't care, we might as well not pass 'p' at all.
+    if (s == ON_ORIENTED_BOUNDARY)
+      return ret;
+    typename Get_functor<R_, Oriented_side_tag>::type os(this->kernel());
+    CGAL::Oriented_side o = os(ret, p);
+    if (o == ON_ORIENTED_BOUNDARY || o == s)
+      return ret;
+    typename Get_functor<R_, Opposite_vector_tag>::type ov(this->kernel());
+    typename Get_functor<R_, Construct_ttag<Vector_tag> >::type cv(this->kernel());
+    return this->operator()(ov(ret.orthogonal_vector()), -ret.translation());
+  }
+};
+template <class R_> struct Orthogonal_vector {
+  CGAL_FUNCTOR_INIT_IGNORE(Orthogonal_vector)
+  typedef typename Get_type<R_, Hyperplane_tag>::type		Hyperplane;
+  typedef typename Get_type<R_, Vector_tag>::type const&	result_type;
+  result_type operator()(Hyperplane const&s)const{
+    return s.orthogonal_vector();
+  }
+};
+template <class R_> struct Hyperplane_translation {
+  CGAL_FUNCTOR_INIT_IGNORE(Hyperplane_translation)
+  typedef typename Get_type<R_, Hyperplane_tag>::type	Hyperplane;
+  typedef typename Get_type<R_, FT_tag>::type result_type;
+  // TODO: Is_exact?
+  result_type operator()(Hyperplane const&s)const{
+    return s.translation();
+  }
+};
+template <class R_> struct Value_at : Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Value_at)
+  typedef typename Get_type<R_, Hyperplane_tag>::type	Hyperplane;
+  typedef typename Get_type<R_, Vector_tag>::type	Vector;
+  typedef typename Get_type<R_, Point_tag>::type	Point;
+  typedef typename Get_type<R_, FT_tag>::type		FT;
+  typedef FT result_type;
+  typedef typename Get_functor<R_, Scalar_product_tag>::type	Dot;
+  typedef typename Get_functor<R_, Point_to_vector_tag>::type	P2V;
+  result_type operator()(Hyperplane const&h, Point const&p)const{
+    Dot dot(this->kernel());
+    P2V p2v(this->kernel());
+    return dot(h.orthogonal_vector(),p2v(p));
+    // Use Orthogonal_vector to make it generic?
+    // Copy the code from Scalar_product to avoid p2v?
+  }
+};
+}
+//TODO: Add a condition that the hyperplane type is the one from this file.
+CGAL_KD_DEFAULT_TYPE(Hyperplane_tag,(CGAL::Hyperplane<K>),(Vector_tag),());
+CGAL_KD_DEFAULT_FUNCTOR(Construct_ttag<Hyperplane_tag>,(CartesianDKernelFunctors::Construct_hyperplane<K>),(Vector_tag,Hyperplane_tag),(Opposite_vector_tag,Oriented_side_tag));
+CGAL_KD_DEFAULT_FUNCTOR(Orthogonal_vector_tag,(CartesianDKernelFunctors::Orthogonal_vector<K>),(Vector_tag,Hyperplane_tag),());
+CGAL_KD_DEFAULT_FUNCTOR(Hyperplane_translation_tag,(CartesianDKernelFunctors::Hyperplane_translation<K>),(Hyperplane_tag),());
+CGAL_KD_DEFAULT_FUNCTOR(Value_at_tag,(CartesianDKernelFunctors::Value_at<K>),(Point_tag,Vector_tag,Hyperplane_tag),(Scalar_product_tag,Point_to_vector_tag));
+} // namespace CGAL
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Iso_box.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Iso_box.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Iso_box.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Iso_box.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Line.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Line.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Line.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Line.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Ray.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Ray.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Ray.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Ray.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Segment.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Segment.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Types/Segment.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Segment.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Sphere.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Sphere.h
new file mode 100644
index 0000000..ec565f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Types/Sphere.h
@@ -0,0 +1,133 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KD_TYPE_SPHERE_H
+#define CGAL_KD_TYPE_SPHERE_H
+#include <CGAL/NewKernel_d/store_kernel.h>
+#include <boost/iterator/counting_iterator.hpp>
+namespace CGAL {
+template <class R_> class Sphere {
+	typedef typename Get_type<R_, FT_tag>::type FT_;
+	typedef typename Get_type<R_, Point_tag>::type	Point_;
+	Point_ c_;
+	FT_ r2_;
+
+	public:
+	Sphere(Point_ const&p, FT_ const&r2): c_(p), r2_(r2) {}
+	// TODO: Add a piecewise constructor?
+
+	Point_ const& center()const{return c_;}
+	FT_ const& squared_radius()const{return r2_;}
+};
+
+namespace CartesianDKernelFunctors {
+template <class R_> struct Construct_sphere : Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Construct_sphere)
+  typedef typename Get_type<R_, Sphere_tag>::type	result_type;
+  typedef typename Get_type<R_, Point_tag>::type	Point;
+  typedef typename Get_type<R_, FT_tag>::type FT;
+  result_type operator()(Point const&a, FT const&b)const{
+    return result_type(a,b);
+  }
+  // Not really needed
+  result_type operator()()const{
+    typename Get_functor<R_, Construct_ttag<Point_tag> >::type cp(this->kernel());
+    return result_type(cp(),0);
+  }
+  template <class Iter>
+  result_type operator()(Iter f, Iter e)const{
+    typedef typename Get_type<R_, Point_tag>::type	Point;
+    typename Get_functor<R_, Construct_circumcenter_tag>::type cc(this->kernel());
+    typename Get_functor<R_, Squared_distance_tag>::type sd(this->kernel());
+
+    // It should be possible to avoid copying the center by moving this code to a constructor.
+    Point center = cc(f, e);
+    FT const& r2 = sd(center, *f);
+    return this->operator()(CGAL_MOVE(center), r2);
+  }
+};
+
+template <class R_> struct Center_of_sphere : private Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Center_of_sphere)
+  typedef typename Get_type<R_, Sphere_tag>::type	Sphere;
+  // No reference because of the second overload
+  typedef typename Get_type<R_, Point_tag>::type	result_type;
+
+  result_type const& operator()(Sphere const&s)const{
+    return s.center();
+  }
+
+  template<class Iter>
+  result_type operator()(Iter b, Iter e)const{
+    typename Get_functor<R_, Construct_ttag<Sphere_tag> >::type	cs(this->kernel());
+    return operator()(cs(b,e)); // computes the radius needlessly
+  }
+};
+
+template <class R_> struct Squared_radius {
+  CGAL_FUNCTOR_INIT_IGNORE(Squared_radius)
+  typedef typename Get_type<R_, Sphere_tag>::type	Sphere;
+  typedef typename Get_type<R_, FT_tag>::type const&	result_type;
+  // TODO: Is_exact?
+  result_type operator()(Sphere const&s)const{
+    return s.squared_radius();
+  }
+};
+
+// FIXME: Move it to the generic functors, using the two above and conditional to the existence of sqrt(FT)
+template<class R_> struct Point_of_sphere : private Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Point_of_sphere)
+  typedef R_ R;
+  typedef typename Get_type<R, FT_tag>::type FT;
+  typedef typename Get_type<R, RT_tag>::type RT;
+  typedef typename Get_type<R, Point_tag>::type Point;
+  typedef typename Get_type<R, Sphere_tag>::type Sphere;
+  typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
+  typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+  typedef typename Get_functor<R, Point_dimension_tag>::type PD;
+  typedef Point result_type;
+  typedef Sphere first_argument_type;
+  typedef int second_argument_type;
+  struct Trans : std::binary_function<FT,int,FT> {
+    FT const& r_; int idx; bool sgn;
+    Trans (int n, FT const& r, bool b) : r_(r), idx(n), sgn(b) {}
+    FT operator()(FT const&x, int i)const{
+      return (i == idx) ? sgn ? x + r_ : x - r_ : x;
+    }
+  };
+  result_type operator()(Sphere const&s, int i)const{
+    CI ci(this->kernel());
+    PD pd(this->kernel());
+    typedef boost::counting_iterator<int,std::random_access_iterator_tag> Count;
+    Point const&c = s.center();
+    int d=pd(c);
+    bool last = (i == d);
+    FT r = sqrt(s.squared_radius());
+    Trans t(last ? 0 : i, r, !last);
+    return CP(this->kernel())(make_transforming_pair_iterator(ci(c,Begin_tag()),Count(0),t),make_transforming_pair_iterator(ci(c,End_tag()),Count(d),t));
+  }
+};
+}
+CGAL_KD_DEFAULT_TYPE(Sphere_tag,(CGAL::Sphere<K>),(Point_tag),());
+CGAL_KD_DEFAULT_FUNCTOR(Construct_ttag<Sphere_tag>,(CartesianDKernelFunctors::Construct_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Point_tag>,Compute_point_cartesian_coordinate_tag,Squared_distance_tag,Squared_distance_to_origin_tag,Point_dimension_tag));
+CGAL_KD_DEFAULT_FUNCTOR(Center_of_sphere_tag,(CartesianDKernelFunctors::Center_of_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Sphere_tag>));
+CGAL_KD_DEFAULT_FUNCTOR(Squared_radius_tag,(CartesianDKernelFunctors::Squared_radius<K>),(Sphere_tag),());
+CGAL_KD_DEFAULT_FUNCTOR(Point_of_sphere_tag,(CartesianDKernelFunctors::Point_of_sphere<K>),(Sphere_tag,Point_tag),(Construct_ttag<Point_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
+} // namespace CGAL
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/array.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/array.h
new file mode 100644
index 0000000..0ad9bb3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/array.h
@@ -0,0 +1,165 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_VECTOR_ARRAY_H
+#define CGAL_VECTOR_ARRAY_H
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <CGAL/Dimension.h>
+#include <CGAL/NewKernel_d/utils.h>
+#include <CGAL/array.h>
+#include <boost/preprocessor/repetition.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+
+#include <CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h>
+#include <CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h>
+#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h>
+#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h>
+#include <CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h>
+
+
+
+namespace CGAL {
+
+// May not be safe to use with dim!=max_dim.
+// In that case, we should store the real dim next to the array.
+template<class NT_,class Dim_,class Max_dim_=Dim_> struct Array_vector {
+        typedef NT_ NT;
+	typedef Dim_ Dimension;
+	typedef Max_dim_ Max_dimension;
+	template< class D2, class D3=D2 >
+	struct Rebind_dimension {
+	  typedef Array_vector< NT, D2, D3 > Other;
+	};
+	template<class> struct Property : boost::false_type {};
+
+	static const unsigned d_=Max_dim_::value;
+	CGAL_static_assertion(d_ != (unsigned)UNKNOWN_DIMENSION);
+
+	typedef cpp0x::array<NT,d_> Vector;
+	struct Construct_vector {
+		struct Dimension {
+			// Initialize with NaN if possible?
+                  Vector operator()(unsigned CGAL_assertion_code(d)) const {
+				CGAL_assertion(d<=d_);
+				return Vector();
+			}
+		};
+
+		struct Iterator {
+			template<typename Iter>
+				Vector operator()(unsigned CGAL_assertion_code(d),Iter const& f,Iter const& e) const {
+					CGAL_assertion(d==(unsigned) std::distance(f,e));
+					CGAL_assertion(d<=d_);
+					//TODO: optimize for forward iterators
+					Vector a;
+					std::copy(f,e,a.begin());
+					return a;
+				}
+		};
+
+#if 0
+		struct Iterator_add_one {
+			template<typename Iter>
+				Vector operator()(unsigned d,Iter const& f,Iter const& e) const {
+					CGAL_assertion(d==std::distance(f,e)+1);
+					CGAL_assertion(d<=d_);
+					//TODO: optimize
+					Vector a;
+					std::copy(f,e,a.begin());
+					a.back()=1;
+					return a;
+				}
+		};
+#endif
+
+		struct Iterator_and_last {
+			template<typename Iter,typename T>
+                        Vector operator()(unsigned  CGAL_assertion_code(d),Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
+					CGAL_assertion(d==std::distance(f,e)+1);
+					CGAL_assertion(d<=d_);
+					//TODO: optimize for forward iterators
+					Vector a;
+					std::copy(f,e,a.begin());
+					a.back()=CGAL_FORWARD(T,t);
+					return a;
+				}
+		};
+
+		struct Values {
+#ifdef CGAL_CXX11
+			template<class...U>
+				Vector operator()(U&&...u) const {
+					static_assert(sizeof...(U)<=d_,"too many arguments");
+					Vector a={{forward_safe<NT,U>(u)...}};
+					return a;
+				}
+#else
+
+#define CGAL_CODE(Z,N,_) Vector operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+	CGAL_assertion(N<=d_); \
+	Vector a={{BOOST_PP_ENUM_PARAMS(N,t)}}; \
+	return a; \
+}
+BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+
+#endif
+		};
+
+		struct Values_divide {
+#ifdef CGAL_CXX11
+			template<class H,class...U>
+				Vector operator()(H const& h,U&&...u) const {
+					static_assert(sizeof...(U)<=d_,"too many arguments");
+					Vector a={{Rational_traits<NT>().make_rational(std::forward<U>(u),h)...}};
+					return a;
+				}
+#else
+
+#define CGAL_VAR(Z,N,_) Rational_traits<NT>().make_rational( t##N , h)
+#define CGAL_CODE(Z,N,_) template <class H> Vector \
+			operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+				CGAL_assertion(N<=d_); \
+				Vector a={{BOOST_PP_ENUM(N,CGAL_VAR,_)}}; \
+				return a; \
+			}
+			BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR
+
+#endif
+		};
+	};
+
+	typedef NT const* Vector_const_iterator;
+	static Vector_const_iterator vector_begin(Vector const&a){
+		return &a[0];
+	}
+	static Vector_const_iterator vector_end(Vector const&a){
+		return &a[0]+d_; // Don't know the real size
+	}
+	static unsigned size_of_vector(Vector const&){
+		return d_; // Don't know the real size
+	}
+
+};
+
+}
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/avx4.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/avx4.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/avx4.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/avx4.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h
new file mode 100644
index 0000000..b8efbe2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_VECTOR_DET_ITER_PTS_ITER_VEC_H
+#define CGAL_VECTOR_DET_ITER_PTS_ITER_VEC_H
+#include <functional>
+#include <CGAL/transforming_iterator.h>
+#include <CGAL/NewKernel_d/functor_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class LA, class Dim_=typename LA::Dimension,
+	 class Max_dim_=typename LA::Max_dimension,
+	 bool = LA::template Property<Has_determinant_of_iterator_to_points_tag>::value,
+	 bool = LA::template Property<Has_determinant_of_iterator_to_vectors_tag>::value>
+struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors : LA {
+  template< class D2, class D3=D2 >
+    struct Rebind_dimension {
+      typedef typename LA::template Rebind_dimension<D2,D3> LA2;
+      typedef Add_determinant_of_iterator_to_points_from_iterator_to_vectors<LA2> Other;
+    };
+};
+
+template <class LA, class Dim_,class Max_dim_>
+struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors
+<LA, Dim_, Max_dim_, false, true> : LA {
+  typedef typename LA::NT NT;
+  typedef typename LA::Vector Vector;
+  template< class D2, class D3=D2 >
+    struct Rebind_dimension {
+      typedef typename LA::template Rebind_dimension<D2,D3> LA2;
+      typedef Add_determinant_of_iterator_to_points_from_iterator_to_vectors<LA2> Other;
+    };
+  template<class P,class=void> struct Property : LA::template Property<P> {};
+  template<class D> struct Property<Has_determinant_of_iterator_to_points_tag, D> :
+    boost::true_type {};
+
+  // TODO: use std::minus, boost::bind, etc
+  template<class T> struct Minus_fixed {
+    T const& a;
+    Minus_fixed(T const&a_):a(a_){}
+    T operator()(T const&b)const{return b-a;}
+  };
+  template<class Iter>
+  static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){
+    Vector const&a=*first; ++first;
+    Minus_fixed<Vector> f(a);
+    return LA::determinant_of_iterator_to_vectors(make_transforming_iterator(first,f),make_transforming_iterator(end,f));
+  }
+  template<class Iter>
+  static Sign sign_of_determinant_of_iterator_to_points(Iter const&first, Iter const&end){
+    Vector const&a=*first; ++first;
+    Minus_fixed<Vector> f(a);
+    return LA::sign_of_determinant_of_iterator_to_vectors(make_transforming_iterator(first,f),make_transforming_iterator(end,f));
+  }
+};
+
+}
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/mix.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/mix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/mix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/mix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/sse2.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/sse2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/sse2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/sse2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/v2int.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/v2int.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/Vector/v2int.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/v2int.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/vector.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/vector.h
new file mode 100644
index 0000000..f9cc4e3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Vector/vector.h
@@ -0,0 +1,167 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_VECTOR_VECTOR_H
+#define CGAL_VECTOR_VECTOR_H
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <CGAL/Dimension.h>
+#include <CGAL/NewKernel_d/utils.h>
+#include <vector>
+#include <boost/preprocessor/repetition.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+namespace CGAL {
+
+//Derive from a class that doesn't depend on Dim, or still use Dim for checking?
+template<class NT_,class Dim_,class Max_dim_=Dim_> struct Vector_vector {
+        typedef NT_ NT;
+	typedef Dim_ Dimension;
+	typedef Max_dim_ Max_dimension;
+	typedef std::vector<NT> Vector;
+        template< class D2, class D3=D2 >
+        struct Rebind_dimension {
+	  typedef Vector_vector< NT, D2, D3 > Other;
+        };
+        template<class> struct Property : boost::false_type {};
+
+	struct Construct_vector {
+		struct Dimension {
+			Vector operator()(int d) const {
+				return Vector(d);
+			}
+		};
+
+		struct Iterator {
+			template<typename Iter>
+                        Vector operator()(int CGAL_assertion_code(d),Iter const& f,Iter const& e) const {
+					CGAL_assertion(d==std::distance(f,e));
+					return Vector(f,e);
+				}
+		};
+
+		// unneeded thanks to Iterator_and_last?
+#if 0
+		struct Iterator_add_one {
+			template<typename Iter>
+                        Vector operator()(int  CGAL_assertion_code(d),Iter const& f,Iter const& e) const {
+					CGAL_assertion(d==std::distance(f,e)+1);
+					Vector a;
+					a.reserve(d+1);
+					a.insert(a.end(),f,e);
+					a.push_back(1);
+					return a;
+				}
+		};
+#endif
+
+		struct Iterator_and_last {
+			template<typename Iter,typename T>
+				Vector operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
+					CGAL_assertion(d==std::distance(f,e)+1);
+					Vector a;
+					a.reserve(d+1);
+					a.insert(a.end(),f,e);
+					a.push_back(CGAL_FORWARD(T,t));
+					return a;
+				}
+		};
+
+		// useless, use a transform_iterator?
+#if 0
+		struct Iterator_and_last_divide {
+			template<typename Iter,typename T>
+				Vector operator()(int d,Iter f,Iter const& e,T const&t) const {
+					CGAL_assertion(d==std::distance(f,e)+1);
+					Vector a;
+					a.reserve(d+1);
+					for(;f!=e;++f){
+						a.push_back(*f/t);
+					}
+					return a;
+				}
+		};
+#endif
+
+		struct Values {
+#ifdef CGAL_CXX11
+			template<class...U>
+				Vector operator()(U&&...u) const {
+					//TODO: check the right number of {}, g++ accepts one and two
+					Vector a={forward_safe<NT,U>(u)...};
+					return a;
+				}
+#else
+
+#define CGAL_VAR(Z,N,_) a.push_back(t##N);
+#define CGAL_CODE(Z,N,_) Vector operator()(BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+	Vector a; \
+	a.reserve(N); \
+	BOOST_PP_REPEAT(N,CGAL_VAR,) \
+	return a; \
+}
+BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR
+
+#endif
+		};
+
+		struct Values_divide {
+#ifdef CGAL_CXX11
+			template<class H,class...U>
+				Vector operator()(H const&h,U&&...u) const {
+					//TODO: do we want to cast at some point?
+					//e.g. to avoid 1/2 in integers
+					// ==> use Rational_traits<NT>().make_rational(x,y) ?
+					Vector a={Rational_traits<NT>().make_rational(std::forward<U>(u),h)...};
+					return a;
+				}
+#else
+
+#define CGAL_VAR(Z,N,_) a.push_back(Rational_traits<NT>().make_rational( t##N ,h));
+#define CGAL_CODE(Z,N,_) template<class H> Vector \
+			operator()(H const&h, BOOST_PP_ENUM_PARAMS(N,NT const& t)) const { \
+				Vector a; \
+				a.reserve(N); \
+				BOOST_PP_REPEAT(N,CGAL_VAR,) \
+				return a; \
+			}
+			BOOST_PP_REPEAT_FROM_TO(1, 11, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR
+
+#endif
+		};
+	};
+	typedef typename Vector::const_iterator Vector_const_iterator;
+	static Vector_const_iterator vector_begin(Vector const&a){
+		return a.begin();
+	}
+	static Vector_const_iterator vector_end(Vector const&a){
+		return a.end();
+	}
+	static int size_of_vector(Vector const&a){
+		return (int)a.size();
+	}
+};
+
+
+}
+#endif
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h
new file mode 100644
index 0000000..e1f4610
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h
@@ -0,0 +1,303 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KERNEL_D_CARTESIAN_WRAP_H
+#define CGAL_KERNEL_D_CARTESIAN_WRAP_H
+
+#include <CGAL/basic.h>
+#include <CGAL/is_iterator.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4003) // not enough actual parameters for macro 'BOOST_PP_EXPAND_I'
+                                // http://lists.boost.org/boost-users/2014/11/83291.php
+#endif 
+#include <CGAL/NewKernel_d/Wrapper/Point_d.h>
+#include <CGAL/NewKernel_d/Wrapper/Vector_d.h>
+#include <CGAL/NewKernel_d/Wrapper/Segment_d.h>
+#include <CGAL/NewKernel_d/Wrapper/Sphere_d.h>
+#include <CGAL/NewKernel_d/Wrapper/Hyperplane_d.h>
+
+#include <CGAL/NewKernel_d/Wrapper/Ref_count_obj.h>
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/vector.hpp>
+
+//TODO: do we want to store the kernel ref in the Object wrappers? It would allow for additions and operator[] and things like that to work, but objects would still need to be created by functors.
+
+namespace CGAL {
+namespace internal {
+BOOST_MPL_HAS_XXX_TRAIT_DEF(Is_wrapper)
+template<class T,bool=has_Is_wrapper<T>::value> struct Is_wrapper {
+	enum { value=false };
+	typedef Tag_false type;
+};
+template<class T> struct Is_wrapper<T,true> {
+	typedef typename T::Is_wrapper type;
+	enum { value=type::value };
+};
+
+template<class T,bool=is_iterator_type<T,std::input_iterator_tag>::value> struct Is_wrapper_iterator {
+	enum { value=false };
+	typedef Tag_false type;
+};
+template<class T> struct Is_wrapper_iterator<T,true> :
+	Is_wrapper<typename std::iterator_traits<typename CGAL::decay<T>::type>::value_type>
+{ };
+
+struct Forward_rep {
+//TODO: make a good C++0X version with perfect forwarding
+//#ifdef CGAL_CXX11
+//template <class T,class=typename std::enable_if<!Is_wrapper<typename std::decay<T>::type>::value&&!Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
+//T&& operator()(typename std::remove_reference<T>::type&& t) const {return static_cast<T&&>(t);};
+//template <class T,class=typename std::enable_if<!Is_wrapper<typename std::decay<T>::type>::value&&!Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
+//T&& operator()(typename std::remove_reference<T>::type& t) const {return static_cast<T&&>(t);};
+//
+//template <class T,class=typename std::enable_if<Is_wrapper<typename std::decay<T>::type>::value>::type>
+//typename Type_copy_cvref<T,typename std::decay<T>::type::Rep>::type&&
+//operator()(T&& t) const {
+//	return static_cast<typename Type_copy_cvref<T,typename std::decay<T>::type::Rep>::type&&>(t.rep());
+//};
+//
+//template <class T,class=typename std::enable_if<Is_wrapper_iterator<typename std::decay<T>::type>::value>::type>
+//transforming_iterator<Forward_rep,typename std::decay<T>::type>
+//operator()(T&& t) const {
+//	return make_transforming_iterator(std::forward<T>(t),Forward_rep());
+//};
+//#else
+template <class T,bool=Is_wrapper<T>::value,bool=Is_wrapper_iterator<T>::value> struct result_;
+template <class T> struct result_<T,false,false>{typedef T const& type;};
+template <class T> struct result_<T,true,false>{typedef typename decay<T>::type::Rep const& type;};
+template <class T> struct result_<T,false,true>{typedef transforming_iterator<Forward_rep,typename decay<T>::type> type;};
+template<class> struct result;
+template<class T> struct result<Forward_rep(T)> : result_<T> {};
+
+template <class T> typename boost::disable_if<boost::mpl::or_<Is_wrapper<T>,Is_wrapper_iterator<T> >,T>::type const& operator()(T const& t) const {return t;}
+template <class T> typename boost::disable_if<boost::mpl::or_<Is_wrapper<T>,Is_wrapper_iterator<T> >,T>::type& operator()(T& t) const {return t;}
+
+template <class T> typename T::Rep const& operator()(T const& t, typename boost::enable_if<Is_wrapper<T> >::type* = 0) const {return t.rep();}
+
+template <class T> transforming_iterator<Forward_rep,typename boost::enable_if<Is_wrapper_iterator<T>,T>::type> operator()(T const& t) const {return make_transforming_iterator(t,Forward_rep());}
+//#endif
+};
+}
+
+template <class B, class K, class T, bool = Provides_type<B, T>::value>
+struct Map_wrapping_type : Get_type<B, T> {};
+#define CGAL_REGISTER_OBJECT_WRAPPER(X) \
+  template <class B, class K> \
+  struct Map_wrapping_type <B, K, X##_tag, true> { \
+    typedef Wrap::X##_d<K> type; \
+  }
+CGAL_REGISTER_OBJECT_WRAPPER(Point);
+CGAL_REGISTER_OBJECT_WRAPPER(Vector);
+CGAL_REGISTER_OBJECT_WRAPPER(Segment);
+CGAL_REGISTER_OBJECT_WRAPPER(Sphere);
+CGAL_REGISTER_OBJECT_WRAPPER(Hyperplane);
+#undef CGAL_REGISTER_OBJECT_WRAPPER
+
+// Note: this tends to be an all or nothing thing currently, wrapping
+// only some types breaks, probably because we don't check whether the
+// return type is indeed wrapped.
+template < typename Base_ , typename Derived_ = Default >
+struct Cartesian_wrap : public Base_
+{
+    CGAL_CONSTEXPR Cartesian_wrap(){}
+    CGAL_CONSTEXPR Cartesian_wrap(int d):Base_(d){}
+    typedef Base_ Kernel_base;
+    typedef Cartesian_wrap Self;
+    // TODO: pass the 2 types Self and Derived to the wrappers, they can use Self for most purposes and Derived only for Kernel_traits' typedef R.
+    typedef typename Default::Get<Derived_, Self>::type Derived;
+    // FIXME: The list doesn't belong here.
+    typedef boost::mpl::vector<Point_tag,Segment_tag,Sphere_tag,Vector_tag,Hyperplane_tag> Wrapped_list;
+
+    template <class T>
+    struct Type : Map_wrapping_type<Base_, Derived, T> {};
+
+    //Translate the arguments
+    template <class T, class D = void,
+      class=typename Get_functor_category<Derived,T>::type,
+      bool=Provides_functor<Kernel_base, T>::value,
+      bool=boost::mpl::contains<Wrapped_list,typename map_result_tag<T>::type>::type::value>
+    struct Functor {
+	    typedef typename Get_functor<Kernel_base, T>::type B;
+	    struct type {
+		    B b;
+		    type(){}
+		    type(Self const&k):b(k){}
+		    typedef typename B::result_type result_type;
+#ifdef CGAL_CXX11
+		    template<class...U> result_type operator()(U&&...u)const{
+			    return b(internal::Forward_rep()(u)...);
+		    }
+#else
+#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
+		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
+			    return b(BOOST_PP_ENUM(N,CGAL_VAR,)); \
+		    }
+		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+#undef CGAL_VAR
+// In case the last argument needs to be non-const. Fragile...
+#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U),class V> result_type \
+		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u),V&v)const{ \
+			    return b(BOOST_PP_ENUM(N,CGAL_VAR,),internal::Forward_rep()(v)); \
+		    }
+		    BOOST_PP_REPEAT_FROM_TO(1,8,CGAL_CODE,_)
+#undef CGAL_CODE
+#undef CGAL_VAR
+#endif
+	    };
+    };
+
+    // Preserve the difference between Null_functor and nothing.
+    template <class T, class D, class C, bool b>
+    struct Functor <T, D, C, false, b>
+      : Get_functor <Kernel_base, T> {};
+
+    //Translate both the arguments and the result
+    //TODO: Check Is_wrapper instead of relying on map_result_tag?
+    template<class T,class D> struct Functor<T,D,Construct_tag,true,true> {
+	    typedef typename Get_functor<Kernel_base, T>::type B;
+	    struct type {
+		    B b;
+		    type(){}
+		    type(Self const&k):b(k){}
+		    typedef typename map_result_tag<T>::type result_tag;
+		    // FIXME: Self or Derived?
+		    typedef typename Get_type<Self,result_tag>::type result_type;
+#ifdef CGAL_CXX11
+		    template<class...U> result_type operator()(U&&...u)const{
+			    return result_type(Eval_functor(),b,internal::Forward_rep()(u)...);
+		    }
+#else
+#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
+		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
+			    return result_type(Eval_functor(),b,BOOST_PP_ENUM(N,CGAL_VAR,)); \
+		    }
+		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+#undef CGAL_VAR
+#endif
+	    };
+    };
+
+};
+
+template < typename Base_ >
+struct Cartesian_refcount : public Base_
+{
+    CGAL_CONSTEXPR Cartesian_refcount(){}
+    CGAL_CONSTEXPR Cartesian_refcount(int d):Base_(d){}
+    typedef Base_ Kernel_base;
+    typedef Cartesian_refcount Self;
+
+    // FIXME: Use object_list, or a list passed as argument, or anything
+    // automatic.
+    template <class T, class=void> struct Type : Get_type<Base_, T> {};
+#define CGAL_Kernel_obj(X,Y) \
+    template <class D> struct Type<X##_tag, D> { typedef Ref_count_obj<Cartesian_refcount, X##_tag> type; };
+
+    CGAL_Kernel_obj(Point,point)
+    CGAL_Kernel_obj(Vector,vector)
+#undef CGAL_Kernel_obj
+
+    template<class T> struct Dispatch {
+	    //typedef typename map_functor_type<T>::type f_t;
+	    typedef typename map_result_tag<T>::type r_t;
+	    enum {
+		    is_nul = boost::is_same<typename Get_functor<Kernel_base, T>::type,Null_functor>::value,
+		    ret_rcobj = boost::is_same<r_t,Point_tag>::value || boost::is_same<r_t,Vector_tag>::value
+	    };
+    };
+
+    //Translate the arguments
+    template<class T,class D=void,bool=Dispatch<T>::is_nul,bool=Dispatch<T>::ret_rcobj> struct Functor {
+	    typedef typename Get_functor<Kernel_base, T>::type B;
+	    struct type {
+		    B b;
+		    type(){}
+		    type(Self const&k):b(k){}
+		    typedef typename B::result_type result_type;
+#ifdef CGAL_CXX11
+		    template<class...U> result_type operator()(U&&...u)const{
+			    return b(internal::Forward_rep()(u)...);
+		    }
+#else
+		    result_type operator()()const{
+			    return b();
+		    }
+#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
+		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
+			    return b(BOOST_PP_ENUM(N,CGAL_VAR,)); \
+		    }
+		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+#undef CGAL_VAR
+#endif
+	    };
+    };
+
+    //Translate both the arguments and the result
+    template<class T,class D,bool b> struct Functor<T,D,true,b> {
+	    typedef Null_functor type;
+    };
+
+    template<class T,class D> struct Functor<T,D,false,true> {
+	    typedef typename Get_functor<Kernel_base, T>::type B;
+	    struct type {
+		    B b;
+		    type(){}
+		    type(Self const&k):b(k){}
+		    typedef typename map_result_tag<T>::type result_tag;
+		    typedef typename Get_type<Self,result_tag>::type result_type;
+#ifdef CGAL_CXX11
+		    template<class...U> result_type operator()(U&&...u)const{
+			    return result_type(Eval_functor(),b,internal::Forward_rep()(u)...);
+		    }
+#else
+		    result_type operator()()const{
+			     return result_type(Eval_functor(),b);
+		    }
+#define CGAL_VAR(Z,N,_) internal::Forward_rep()(u##N)
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> result_type \
+		    operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
+			    return result_type(Eval_functor(),b,BOOST_PP_ENUM(N,CGAL_VAR,)); \
+		    }
+		    BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+#undef CGAL_VAR
+#endif
+	    };
+    };
+
+};
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_KERNEL_D_CARTESIAN_WRAP_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h
new file mode 100644
index 0000000..54fd50b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h
@@ -0,0 +1,131 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_HYPERPLANE_D_H
+#define CGAL_WRAPPER_HYPERPLANE_D_H
+
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+namespace CGAL {
+namespace Wrap {
+
+template <class R_>
+class Hyperplane_d : public Get_type<typename R_::Kernel_base, Hyperplane_tag>::type
+{
+  typedef typename Get_type<R_, FT_tag>::type		FT_;
+  typedef typename R_::Kernel_base		Kbase;
+  typedef typename Get_type<R_, Vector_tag>::type	Vector_;
+  typedef typename Get_functor<Kbase, Construct_ttag<Hyperplane_tag> >::type	CHBase;
+  typedef typename Get_functor<Kbase, Orthogonal_vector_tag>::type		OVBase;
+  typedef typename Get_functor<Kbase, Hyperplane_translation_tag>::type			HTBase;
+
+  typedef Hyperplane_d                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Hyperplane_tag>::type>::value));
+
+public:
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  typedef typename Increment_dimension<Ambient_dimension,-1>::type Feature_dimension;
+
+  typedef typename Get_type<Kbase, Hyperplane_tag>::type	Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Hyperplane_d> >::value>::type> explicit Hyperplane_d(U&&...u)
+	  : Rep(CHBase()(std::forward<U>(u)...)){}
+
+//  // called from Construct_point_d
+//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
+//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
+  template<class F,class...U> explicit Hyperplane_d(Eval_functor&&,F&&f,U&&...u)
+	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
+
+#if 0
+  // the new standard may make this necessary
+  Point_d(Point_d const&)=default;
+  Point_d(Point_d &);//=default;
+  Point_d(Point_d &&)=default;
+#endif
+
+  // try not to use these
+  Hyperplane_d(Rep const& v) : Rep(v) {}
+  Hyperplane_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
+  Hyperplane_d(Rep&& v) : Rep(std::move(v)) {}
+
+#else
+
+  Hyperplane_d() : Rep(CHBase()()) {}
+
+  Hyperplane_d(Rep const& v) : Rep(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Hyperplane_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(CHBase()( \
+	BOOST_PP_ENUM_PARAMS(N,t))) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Hyperplane_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
+  /*
+  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
+  */
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+
+#endif
+
+  //TODO: if OVBase returns a reference to a base vector, cast it to a
+  //reference to a wrapper vector. Ugly but should be safe.
+  Vector_ orthogonal_vector()const{
+    return Vector_(Eval_functor(),OVBase(),rep());
+  }
+  FT_ translation()const{
+    return HTBase()(rep());
+  }
+
+
+};
+
+} //namespace Wrap
+} //namespace CGAL
+
+#endif // CGAL_WRAPPER_SPHERE_D_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Point_d.h
new file mode 100644
index 0000000..0718c94
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Point_d.h
@@ -0,0 +1,284 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_POINT_D_H
+#define CGAL_WRAPPER_POINT_D_H
+
+#include <ostream>
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+namespace CGAL {
+namespace Wrap {
+
+template <class R_>
+class Point_d : public Get_type<typename R_::Kernel_base, Point_tag>::type
+		// Deriving won't work if the point is just a __m256d.
+		// Test boost/std::is_class for instance
+{
+  typedef typename Get_type<R_, RT_tag>::type		RT_;
+  typedef typename Get_type<R_, FT_tag>::type		FT_;
+  typedef typename R_::Kernel_base		Kbase;
+  typedef typename Get_type<R_, Vector_tag>::type	Vector_;
+  typedef typename Get_functor<Kbase, Construct_ttag<Point_tag> >::type CPBase;
+  typedef typename Get_functor<Kbase, Compute_point_cartesian_coordinate_tag>::type CCBase;
+  typedef typename Get_functor<Kbase, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
+
+
+  typedef Point_d                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Point_tag>::type>::value));
+
+public:
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef typename Get_type<Kbase, Point_tag>::type      Rep;
+  //typedef typename CGAL::decay<typename boost::result_of<CPI(Rep,Begin_tag)>::type>::type Cartesian_const_iterator;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Point_d> >::value>::type> explicit Point_d(U&&...u)
+	  : Rep(CPBase()(std::forward<U>(u)...)){}
+
+//  // called from Construct_point_d
+//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
+//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
+  template<class F,class...U> explicit Point_d(Eval_functor&&,F&&f,U&&...u)
+	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
+
+#if 0
+  // the new standard may make this necessary
+  Point_d(Point_d const&)=default;
+  Point_d(Point_d &);//=default;
+  Point_d(Point_d &&)=default;
+#endif
+
+  // try not to use these
+  Point_d(Rep const& v) : Rep(v) {}
+  Point_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
+  Point_d(Rep&& v) : Rep(std::move(v)) {}
+
+  // this one should be implicit
+  Point_d(Origin const& v)
+    : Rep(CPBase()(v)) {}
+  Point_d(Origin& v)
+    : Rep(CPBase()(v)) {}
+  Point_d(Origin&& v)
+    : Rep(CPBase()(std::move(v))) {}
+
+#else
+
+  Point_d() : Rep(CPBase()()) {}
+
+  Point_d(Rep const& v) : Rep(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Point_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(CPBase()( \
+	BOOST_PP_ENUM_PARAMS(N,t))) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Point_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
+  /*
+  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
+  */
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+
+  // this one should be implicit
+  Point_d(Origin const& o)
+    : Rep(CPBase()(o)) {}
+
+#endif
+
+  typename boost::result_of<CCBase(Rep,int)>::type cartesian(int i)const{
+	  return CCBase()(rep(),i);
+  }
+  typename boost::result_of<CCBase(Rep,int)>::type operator[](int i)const{
+	  return CCBase()(rep(),i);
+  }
+
+  typename boost::result_of<CPI(Rep,Begin_tag)>::type cartesian_begin()const{
+	  return CPI()(rep(),Begin_tag());
+  }
+
+  typename boost::result_of<CPI(Rep,End_tag)>::type cartesian_end()const{
+	  return CPI()(rep(),End_tag());
+  }
+
+  int dimension() const {
+    typedef typename Get_functor<Kbase, Point_dimension_tag>::type PDBase;
+    return PDBase()(rep());
+  }
+
+  /*
+  Direction_d direction() const
+  {
+    return R().construct_direction_d_object()(*this);
+  }
+
+  Vector_d transform(const Aff_transformation_d &t) const
+  {
+    return t.transform(*this);
+  }
+
+  Vector_d operator/(const RT& c) const
+  {
+   return R().construct_divided_vector_d_object()(*this,c);
+  }
+
+  Vector_d operator/(const typename First_if_different<FT_,RT>::Type & c) const
+  {
+   return R().construct_divided_vector_d_object()(*this,c);
+  }
+
+  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
+  x() const
+  {
+    return R().compute_x_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_y_3, Vector_3>::type
+  y() const
+  {
+    return R().compute_y_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_z_3, Vector_3>::type
+  z() const
+  {
+    return R().compute_z_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hx_3, Vector_3>::type
+  hx() const
+  {
+    return R().compute_hx_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hy_3, Vector_3>::type
+  hy() const
+  {
+    return R().compute_hy_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hz_3, Vector_3>::type
+  hz() const
+  {
+    return R().compute_hz_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
+  hw() const
+  {
+    return R().compute_hw_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
+    if (i==0) return x();
+    if (i==1) return y();
+    return z();
+  }
+
+  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
+    if (i==0) return hx();
+    if (i==1) return hy();
+    if (i==2) return hz();
+    return hw();
+  }
+
+  typename Qualified_result_of<typename R::Compute_squared_length_3, Vector_3>::type
+  squared_length() const
+  {
+    return R().compute_squared_length_3_object()(*this);
+  }
+*/
+};
+#if 0
+template <class R_> Point_d<R_>::Point_d(Point_d &)=default;
+#endif
+
+//TODO: IO
+
+template <class R_>
+std::ostream& operator <<(std::ostream& os, const Point_d<R_>& p)
+{
+  typedef typename R_::Kernel_base Kbase;
+  typedef typename Get_functor<Kbase, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
+  // Should just be "auto"...
+  typename CGAL::decay<typename boost::result_of<
+        CPI(typename Point_d<R_>::Rep,Begin_tag)
+      >::type>::type
+    b = p.cartesian_begin(),
+    e = p.cartesian_end();
+  os << p.dimension();
+  for(; b != e; ++b){
+    os << " " << *b;
+  }
+  return os;
+}
+
+//template <class R_>
+//Vector_d<R_> operator+(const Vector_d<R_>& v,const Vector_d<R_>& w) const
+//{
+//	return typename R::template Construct<Sum_of_vectors_tag>::type()(v,w);
+//}
+//
+//template <class R_>
+//Vector_d<R_> operator-(const Vector_d<R_>& v,const Vector_d<R_>& w) const
+//{
+//	return typename R::template Construct<Difference_of_vectors_tag>::type()(v,w);
+//}
+
+} //namespace Wrap
+} //namespace CGAL
+
+#endif // CGAL_WRAPPER_POINT_D_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h
new file mode 100644
index 0000000..f33e14c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h
@@ -0,0 +1,120 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_REF_COUNT_OBJ_H
+#define CGAL_WRAPPER_REF_COUNT_OBJ_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Handle_for.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+// no need for a fancy interface here, people can use the Point_d wrapper on
+// top.
+
+namespace CGAL {
+
+template <class R_, class Tag_>
+class Ref_count_obj
+{
+  typedef typename R_::Kernel_base	Kbase;
+  typedef typename Get_functor<Kbase, Construct_ttag<Tag_> >::type CBase;
+
+  typedef Ref_count_obj			Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Tag_>::type>::value));
+
+public:
+  typedef R_ R;
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  //typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef typename Get_type<Kbase, Tag_>::type	Rep;
+  typedef Handle_for<Rep> Data;
+
+private:
+  Data data;
+public:
+
+  const Rep& rep() const
+  {
+    return CGAL::get_pointee_or_identity(data);
+  }
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Ref_count_obj> >::value>::type> explicit Ref_count_obj(U&&...u)
+	  : data(Eval_functor(),CBase(),std::forward<U>(u)...){}
+
+  template<class F,class...U> explicit Ref_count_obj(Eval_functor&&,F&&f,U&&...u)
+	  : data(Eval_functor(),std::forward<F>(f),std::forward<U>(u)...){}
+
+  // try not to use these
+  Ref_count_obj(Rep const& v) : data(v) {}
+  Ref_count_obj(Rep& v) : data(static_cast<Rep const&>(v)) {}
+  Ref_count_obj(Rep&& v) : data(std::move(v)) {}
+
+  // Do we really need this for point?
+//  // this one should be implicit
+//  Ref_count_obj(Origin const& v)
+//    : data(Eval_functor(),CBase(),v) {}
+//  Ref_count_obj(Origin& v)
+//    : data(Eval_functor(),CBase(),v) {}
+//  Ref_count_obj(Origin&& v)
+//    : data(Eval_functor(),CBase(),std::move(v)) {}
+
+#else
+
+  Ref_count_obj() : data(Eval_functor(),CBase()) {}
+
+  Ref_count_obj(Rep const& v) : data(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Ref_count_obj(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : data(Eval_functor(),CBase(),BOOST_PP_ENUM_PARAMS(N,t)) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Ref_count_obj(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : data(Eval_functor(),f,BOOST_PP_ENUM_PARAMS(N,t)) {}
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+  template<class F>
+  Ref_count_obj(Eval_functor,F const& f)
+  : data(Eval_functor(),f) {}
+
+//  // this one should be implicit
+//  Ref_count_obj(Origin const& o)
+//    : data(Eval_functor(),CBase(),o) {}
+
+#endif
+
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Segment_d.h
new file mode 100644
index 0000000..bfb20a7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Segment_d.h
@@ -0,0 +1,133 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_SEGMENT_D_H
+#define CGAL_WRAPPER_SEGMENT_D_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+namespace CGAL {
+namespace Wrap {
+
+template <class R_>
+class Segment_d : public Get_type<typename R_::Kernel_base, Segment_tag>::type
+{
+  typedef typename Get_type<R_, RT_tag>::type		RT_;
+  typedef typename Get_type<R_, FT_tag>::type		FT_;
+  typedef typename R_::Kernel_base			Kbase;
+  typedef typename Get_type<R_, Point_tag>::type	Point_;
+  typedef typename Get_functor<Kbase, Construct_ttag<Point_tag> >::type CPBase;
+  typedef typename Get_functor<Kbase, Construct_ttag<Segment_tag> >::type CSBase;
+  typedef typename Get_functor<Kbase, Segment_extremity_tag>::type CSEBase;
+
+  typedef Segment_d                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Segment_tag>::type>::value));
+
+public:
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef typename Get_type<Kbase, Segment_tag>::type	Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Segment_d> >::value>::type> explicit Segment_d(U&&...u)
+	  : Rep(CSBase()(std::forward<U>(u)...)){}
+
+//  // called from Construct_point_d
+//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
+//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
+  template<class F,class...U> explicit Segment_d(Eval_functor&&,F&&f,U&&...u)
+	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
+
+#if 0
+  // the new standard may make this necessary
+  Point_d(Point_d const&)=default;
+  Point_d(Point_d &);//=default;
+  Point_d(Point_d &&)=default;
+#endif
+
+  // try not to use these
+  Segment_d(Rep const& v) : Rep(v) {}
+  Segment_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
+  Segment_d(Rep&& v) : Rep(std::move(v)) {}
+
+#else
+
+  Segment_d() : Rep(CSBase()()) {}
+
+  Segment_d(Rep const& v) : Rep(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Segment_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(CSBase()( \
+	BOOST_PP_ENUM_PARAMS(N,t))) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Segment_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
+  /*
+  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
+  */
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+
+#endif
+
+	  //TODO: if CSEBase returns a reference to a base point, cast it to a
+	  //reference to a wrapper point. Ugly but should be safe.
+	  Point_ source()const{
+		  return Point_(Eval_functor(),CSEBase(),rep(),0);
+	  }
+	  Point_ target()const{
+		  return Point_(Eval_functor(),CSEBase(),rep(),1);
+	  }
+
+};
+
+} //namespace Wrap
+} //namespace CGAL
+
+#endif // CGAL_WRAPPER_SEGMENT_D_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h
new file mode 100644
index 0000000..87f0c66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h
@@ -0,0 +1,130 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_SPHERE_D_H
+#define CGAL_WRAPPER_SPHERE_D_H
+
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+namespace CGAL {
+namespace Wrap {
+
+template <class R_>
+class Sphere_d : public Get_type<typename R_::Kernel_base, Sphere_tag>::type
+{
+  typedef typename Get_type<R_, FT_tag>::type		FT_;
+  typedef typename R_::Kernel_base		Kbase;
+  typedef typename Get_type<R_, Point_tag>::type	Point_;
+  typedef typename Get_functor<Kbase, Construct_ttag<Sphere_tag> >::type	CSBase;
+  typedef typename Get_functor<Kbase, Center_of_sphere_tag>::type		COSBase;
+  typedef typename Get_functor<Kbase, Squared_radius_tag>::type			SRBase;
+
+  typedef Sphere_d                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Sphere_tag>::type>::value));
+
+public:
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  typedef typename Increment_dimension<Ambient_dimension,-1>::type Feature_dimension;
+
+  typedef typename Get_type<Kbase, Sphere_tag>::type	Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Sphere_d> >::value>::type> explicit Sphere_d(U&&...u)
+	  : Rep(CSBase()(std::forward<U>(u)...)){}
+
+//  // called from Construct_point_d
+//  template<class...U> explicit Point_d(Eval_functor&&,U&&...u)
+//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
+  template<class F,class...U> explicit Sphere_d(Eval_functor&&,F&&f,U&&...u)
+	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
+
+#if 0
+  // the new standard may make this necessary
+  Point_d(Point_d const&)=default;
+  Point_d(Point_d &);//=default;
+  Point_d(Point_d &&)=default;
+#endif
+
+  // try not to use these
+  Sphere_d(Rep const& v) : Rep(v) {}
+  Sphere_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
+  Sphere_d(Rep&& v) : Rep(std::move(v)) {}
+
+#else
+
+  Sphere_d() : Rep(CSBase()()) {}
+
+  Sphere_d(Rep const& v) : Rep(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Sphere_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(CSBase()( \
+	BOOST_PP_ENUM_PARAMS(N,t))) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Sphere_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
+  /*
+  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Point_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
+  */
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+
+#endif
+
+    //TODO: if COSBase returns a reference to a base point, cast it to a
+    //reference to a wrapper point. Ugly but should be safe.
+    Point_ center()const{
+      return Point_(Eval_functor(),COSBase(),rep());
+    }
+  FT_ squared_radius()const{
+    return SRBase()(rep());
+  }
+
+};
+
+} //namespace Wrap
+} //namespace CGAL
+
+#endif // CGAL_WRAPPER_SPHERE_D_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Vector_d.h
new file mode 100644
index 0000000..b7d1f0d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/Wrapper/Vector_d.h
@@ -0,0 +1,266 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_WRAPPER_VECTOR_D_H
+#define CGAL_WRAPPER_VECTOR_D_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+#ifndef CGAL_CXX11
+#include <boost/preprocessor/repetition.hpp>
+#endif
+#include <boost/utility/result_of.hpp>
+
+namespace CGAL {
+namespace Wrap {
+
+template <class R_>
+class Vector_d : public Get_type<typename R_::Kernel_base, Vector_tag>::type
+{
+  typedef typename Get_type<R_, RT_tag>::type		RT_;
+  typedef typename Get_type<R_, FT_tag>::type		FT_;
+  typedef typename R_::Kernel_base           Kbase;
+  typedef typename Get_type<R_, Point_tag>::type	Point_;
+  typedef typename Get_functor<Kbase, Construct_ttag<Vector_tag> >::type CVBase;
+  typedef typename Get_functor<Kbase, Compute_vector_cartesian_coordinate_tag>::type CCBase;
+  typedef typename Get_functor<Kbase, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
+  typedef typename Get_functor<Kbase, Squared_length_tag>::type SLBase;
+
+  typedef Vector_d                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Vector_tag>::type>::value));
+
+public:
+
+  typedef Tag_true Is_wrapper;
+  typedef typename R_::Default_ambient_dimension Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  //typedef typename R_::Vector_cartesian_const_iterator Cartesian_const_iterator;
+  typedef typename Get_type<Kbase, Vector_tag>::type	Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+#ifdef CGAL_CXX11
+  template<class...U,class=typename std::enable_if<!std::is_same<std::tuple<typename std::decay<U>::type...>,std::tuple<Vector_d> >::value>::type> explicit Vector_d(U&&...u)
+	  : Rep(CVBase()(std::forward<U>(u)...)){}
+
+//  // called from Construct_vector_d
+//  template<class...U> explicit Vector_d(Eval_functor&&,U&&...u)
+//	  : Rep(Eval_functor(), std::forward<U>(u)...){}
+  template<class F,class...U> explicit Vector_d(Eval_functor&&,F&&f,U&&...u)
+	  : Rep(std::forward<F>(f)(std::forward<U>(u)...)){}
+
+#if 0
+  // the new standard may make this necessary
+  Vector_d(Vector_d const&)=default;
+  Vector_d(Vector_d &);//=default;
+  Vector_d(Vector_d &&)=default;
+#endif
+
+  // try not to use these
+  Vector_d(Rep const& v) : Rep(v) {}
+  Vector_d(Rep& v) : Rep(static_cast<Rep const&>(v)) {}
+  Vector_d(Rep&& v) : Rep(std::move(v)) {}
+
+  // this one should be implicit
+  Vector_d(Null_vector const& v)
+    : Rep(CVBase()(v)) {}
+  Vector_d(Null_vector& v)
+    : Rep(CVBase()(v)) {}
+  Vector_d(Null_vector&& v)
+    : Rep(CVBase()(std::move(v))) {}
+
+#else
+
+  Vector_d() : Rep(CVBase()()) {}
+
+  Vector_d(Rep const& v) : Rep(v) {} // try not to use it
+
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  explicit Vector_d(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(CVBase()( \
+	BOOST_PP_ENUM_PARAMS(N,t))) {} \
+  \
+  template<class F,BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Vector_d(Eval_functor,F const& f,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(f(BOOST_PP_ENUM_PARAMS(N,t))) {}
+  /*
+  template<BOOST_PP_ENUM_PARAMS(N,class T)> \
+  Vector_d(Eval_functor,BOOST_PP_ENUM_BINARY_PARAMS(N,T,const&t)) \
+  : Rep(Eval_functor(), BOOST_PP_ENUM_PARAMS(N,t)) {}
+  */
+
+  BOOST_PP_REPEAT_FROM_TO(1,11,CGAL_CODE,_)
+#undef CGAL_CODE
+
+  // this one should be implicit
+  Vector_d(Null_vector const& v)
+    : Rep(CVBase()(v)) {}
+
+#endif
+
+  typename boost::result_of<CCBase(Rep,int)>::type cartesian(int i)const{
+	  return CCBase()(rep(),i);
+  }
+
+  typename boost::result_of<CCBase(Rep,int)>::type operator[](int i)const{
+	  return CCBase()(rep(),i);
+  }
+
+  typename boost::result_of<CVI(Rep,Begin_tag)>::type cartesian_begin()const{
+	  return CVI()(rep(),Begin_tag());
+  }
+
+  typename boost::result_of<CVI(Rep,End_tag)>::type cartesian_end()const{
+	  return CVI()(rep(),End_tag());
+  }
+
+  Vector_d operator-() const
+  {
+    return typename Get_functor<R, Opposite_vector_tag>::type()(*this);
+  }
+
+  /*
+  Direction_d direction() const
+  {
+    return R().construct_direction_d_object()(*this);
+  }
+
+  Vector_d transform(const Aff_transformation_d &t) const
+  {
+    return t.transform(*this);
+  }
+
+  Vector_d operator/(const RT& c) const
+  {
+   return R().construct_divided_vector_d_object()(*this,c);
+  }
+
+  Vector_d operator/(const typename First_if_different<FT_,RT>::Type & c) const
+  {
+   return R().construct_divided_vector_d_object()(*this,c);
+  }
+
+  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
+  x() const
+  {
+    return R().compute_x_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_y_3, Vector_3>::type
+  y() const
+  {
+    return R().compute_y_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_z_3, Vector_3>::type
+  z() const
+  {
+    return R().compute_z_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hx_3, Vector_3>::type
+  hx() const
+  {
+    return R().compute_hx_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hy_3, Vector_3>::type
+  hy() const
+  {
+    return R().compute_hy_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hz_3, Vector_3>::type
+  hz() const
+  {
+    return R().compute_hz_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
+  hw() const
+  {
+    return R().compute_hw_3_object()(*this);
+  }
+
+  typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
+    if (i==0) return x();
+    if (i==1) return y();
+    return z();
+  }
+
+  typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
+    if (i==0) return hx();
+    if (i==1) return hy();
+    if (i==2) return hz();
+    return hw();
+  }
+
+  int dimension() const // bad idea?
+  {
+      return rep.dimension();
+  }
+*/
+  typename boost::result_of<SLBase(Rep)>::type squared_length()const{
+	  return SLBase()(rep());
+  }
+};
+#if 0
+template <class R_> Vector_d<R_>::Vector_d(Vector_d &)=default;
+#endif
+
+//TODO: IO
+
+template <class R_>
+Vector_d<R_> operator+(const Vector_d<R_>& v,const Vector_d<R_>& w)
+{
+	return typename Get_functor<R_, Sum_of_vectors_tag>::type()(v,w);
+}
+
+template <class R_>
+Vector_d<R_> operator-(const Vector_d<R_>& v,const Vector_d<R_>& w)
+{
+	return typename Get_functor<R_, Difference_of_vectors_tag>::type()(v,w);
+}
+
+} //namespace Wrap
+} //namespace CGAL
+
+#endif // CGAL_WRAPPER_VECTOR_D_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/function_objects_cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/function_objects_cartesian.h
new file mode 100644
index 0000000..e3acecc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/function_objects_cartesian.h
@@ -0,0 +1,1298 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
+#define CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
+
+#include <CGAL/NewKernel_d/utils.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Uncertain.h>
+#include <CGAL/NewKernel_d/store_kernel.h>
+#include <CGAL/is_iterator.h>
+#include <CGAL/iterator_from_indices.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/transforming_iterator.h>
+#include <CGAL/transforming_pair_iterator.h>
+#include <CGAL/NewKernel_d/functor_tags.h>
+#include <CGAL/NewKernel_d/functor_properties.h>
+#include <CGAL/predicates/sign_of_determinant.h>
+#include <functional>
+#ifdef CGAL_CXX11
+#include <initializer_list>
+#endif
+
+namespace CGAL {
+namespace CartesianDKernelFunctors {
+namespace internal {
+template<class,int> struct Dimension_at_most { enum { value = false }; };
+template<int a,int b> struct Dimension_at_most<Dimension_tag<a>,b> {
+	enum { value = (a <= b) };
+};
+}
+
+template<class R_,class D_=typename R_::Default_ambient_dimension,bool=internal::Dimension_at_most<D_,6>::value> struct Orientation_of_points : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
+	typedef R_ R;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	typedef typename R::LA::Square_matrix Matrix;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+		Point const& p0=*f++;
+		int d=pd(p0);
+		Matrix m(d,d);
+		// FIXME: this writes the vector coordinates in lines ? check all the other uses in this file, this may be wrong for some.
+		for(int i=0;f!=e;++f,++i) {
+		  Point const& p=*f;
+		  for(int j=0;j<d;++j){
+		    m(i,j)=c(p,j)-c(p0,j);
+		    // should we cache the coordinates of p0 in case they are computed?
+		  }
+		}
+		return R::LA::sign_of_determinant(CGAL_MOVE(m));
+	}
+
+#ifdef CGAL_CXX11
+	// Since the dimension is at least 2, there are at least 3 points and no ambiguity with iterators.
+	// template <class...U,class=typename std::enable_if<std::is_same<Dimension_tag<sizeof...(U)-1>,typename R::Default_ambient_dimension>::value>::type>
+	template <class...U,class=typename std::enable_if<(sizeof...(U)>=3)>::type>
+	result_type operator()(U&&...u) const {
+		return operator()({std::forward<U>(u)...});
+	}
+
+	template <class P>
+	result_type operator()(std::initializer_list<P> l) const {
+		return operator()(l.begin(),l.end());
+	}
+#else
+	//should we make it template to avoid instantiation for wrong dim?
+	//or iterate outside the class?
+#define CGAL_VAR(Z,J,I) m(I,J)=c(p##I,J)-c(x,J);
+#define CGAL_VAR2(Z,I,N) BOOST_PP_REPEAT(N,CGAL_VAR,I)
+#define CGAL_CODE(Z,N,_) \
+	result_type operator()(Point const&x, BOOST_PP_ENUM_PARAMS(N,Point const&p)) const { \
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel()); \
+		Matrix m(N,N); \
+		BOOST_PP_REPEAT(N,CGAL_VAR2,N) \
+		return R::LA::sign_of_determinant(CGAL_MOVE(m)); \
+	}
+
+BOOST_PP_REPEAT_FROM_TO(7, 10, CGAL_CODE, _ )
+	// No need to do it for <=6, since that uses a different code path
+#undef CGAL_CODE
+#undef CGAL_VAR2
+#undef CGAL_VAR
+#endif
+};
+
+#ifdef CGAL_CXX11
+template<class R_,int d> struct Orientation_of_points<R_,Dimension_tag<d>,true> : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	template<class>struct Help;
+	template<int...I>struct Help<Indices<I...> > {
+		template<class C,class P,class T> result_type operator()(C const&c,P const&x,T&&t)const{
+			return sign_of_determinant<RT>(c(std::get<I/d>(t),I%d)-c(x,I%d)...);
+		}
+	};
+	template<class P0,class...P> result_type operator()(P0 const&x,P&&...p)const{
+		static_assert(d==sizeof...(P),"Wrong number of arguments");
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+		return Help<typename N_increasing_indices<d*d>::type>()(c,x,std::forward_as_tuple(std::forward<P>(p)...));
+	}
+
+
+	template<int N,class Iter,class...U> result_type help2(Dimension_tag<N>, Iter f, Iter const&e, U&&...u)const{
+		auto const&p=*f;
+		return help2(Dimension_tag<N-1>(),++f,e,std::forward<U>(u)...,p);
+	}
+	template<class Iter,class...U> result_type help2(Dimension_tag<0>, Iter CGAL_assertion_code(f), Iter const& CGAL_assertion_code(e), U&&...u)const{
+		CGAL_assertion(f==e);
+		return operator()(std::forward<U>(u)...);
+	}
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		return help2(Dimension_tag<d+1>(),f,e);
+	}
+};
+#else
+#define CGAL_VAR(Z,J,I) c(p##I,J)-x##J
+#define CGAL_VAR2(Z,I,N) BOOST_PP_ENUM(N,CGAL_VAR,I)
+#define CGAL_VAR3(Z,N,_) Point const&p##N=*++f;
+#define CGAL_VAR4(Z,N,_) RT const&x##N=c(x,N);
+#define CGAL_CODE(Z,N,_) \
+template<class R_> struct Orientation_of_points<R_,Dimension_tag<N>,true> : private Store_kernel<R_> { \
+	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points) \
+	typedef R_ R; \
+	typedef typename Get_type<R, RT_tag>::type RT; \
+	typedef typename Get_type<R, Point_tag>::type Point; \
+	typedef typename Get_type<R, Orientation_tag>::type result_type; \
+	result_type operator()(Point const&x, BOOST_PP_ENUM_PARAMS(N,Point const&p)) const { \
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel()); \
+		BOOST_PP_REPEAT(N,CGAL_VAR4,) \
+		return sign_of_determinant<RT>(BOOST_PP_ENUM(N,CGAL_VAR2,N)); \
+	} \
+	template<class Iter> \
+	result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{ \
+		Point const&x=*f; \
+		BOOST_PP_REPEAT(N,CGAL_VAR3,) \
+		CGAL_assertion(++f==e); \
+		return operator()(x,BOOST_PP_ENUM_PARAMS(N,p)); \
+	} \
+};
+
+	BOOST_PP_REPEAT_FROM_TO(2, 7, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR4
+#undef CGAL_VAR3
+#undef CGAL_VAR2
+#undef CGAL_VAR
+
+#endif
+
+template<class R_> struct Orientation_of_points<R_,Dimension_tag<1>,true> : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation_of_points)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	result_type operator()(Point const&x, Point const&y) const {
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+		// No sign_of_determinant(RT) :-(
+		return CGAL::compare(c(y,0),c(x,0));
+	}
+	template<class Iter>
+	result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{
+		Point const&x=*f;
+		Point const&y=*++f;
+		CGAL_assertion(++f==e);
+		return operator()(x,y);
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Orientation_of_points_tag,(CartesianDKernelFunctors::Orientation_of_points<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Orientation_of_vectors : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation_of_vectors)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	typedef typename R::LA::Square_matrix Matrix;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
+		// FIXME: Uh? Using it on a vector ?!
+		Vector const& v0=*f;
+		int d=vd(v0);
+		Matrix m(d,d);
+		for(int j=0;j<d;++j){
+			m(0,j)=c(v0,j);
+		}
+		for(int i=1;++f!=e;++i) {
+			Vector const& v=*f;
+		for(int j=0;j<d;++j){
+			m(i,j)=c(v,j);
+		}
+		}
+		return R::LA::sign_of_determinant(CGAL_MOVE(m));
+	}
+
+#ifdef CGAL_CXX11
+	template <class...U,class=typename std::enable_if<(sizeof...(U)>=3)>::type>
+	result_type operator()(U&&...u) const {
+		return operator()({std::forward<U>(u)...});
+	}
+
+	template <class V>
+	result_type operator()(std::initializer_list<V> l) const {
+		return operator()(l.begin(),l.end());
+	}
+#else
+	//TODO
+#endif
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Orientation_of_vectors_tag,(CartesianDKernelFunctors::Orientation_of_vectors<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Linear_rank : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Linear_rank)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	// Computing a sensible Uncertain<int> is not worth it
+	typedef int result_type;
+	typedef typename R::LA::Dynamic_matrix Matrix;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		if (n==0) return 0;
+		Vector const& v0 = *f;
+		// FIXME: Uh? Using it on a vector ?!
+		int d=vd(v0);
+		Matrix m(d,n);
+		for(int j=0;j<d;++j){
+		  m(j,0)=c(v0,j);
+		}
+		for(int i=1; ++f!=e; ++i){
+		  Vector const& v = *f;
+		  for(int j=0;j<d;++j){
+		    m(j,i)=c(v,j);
+		  }
+		}
+		return R::LA::rank(CGAL_MOVE(m));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Linear_rank_tag,(CartesianDKernelFunctors::Linear_rank<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Linearly_independent : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Linearly_independent)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		// FIXME: Uh? Using it on a vector ?!
+		int d=vd(*f);
+		if (n>d) return false;
+		typename Get_functor<R, Linear_rank_tag>::type lr(this->kernel());
+		return lr(f,e) == n;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Linearly_independent_tag,(CartesianDKernelFunctors::Linearly_independent<K>),(Vector_tag),(Point_dimension_tag,Linear_rank_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Contained_in_linear_hull : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Contained_in_linear_hull)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	// Computing a sensible Uncertain<bool> is not worth it
+	typedef bool result_type;
+	typedef typename R::LA::Dynamic_matrix Matrix;
+
+	template<class Iter,class V>
+	result_type operator()(Iter f, Iter e,V const&w)const{
+		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		if (n==0) return false;
+		// FIXME: Uh? Using it on a vector ?!
+		int d=vd(w);
+		Matrix m(d,n+1);
+		for(int i=0; f!=e; ++f,++i){
+		  Vector const& v = *f;
+		  for(int j=0;j<d;++j){
+		    m(j,i)=c(v,j);
+		  }
+		}
+		for(int j=0;j<d;++j){
+		  m(j,n)=c(w,j);
+		}
+		int r1 = R::LA::rank(m);
+		// FIXME: Don't use eigen directly, go through an interface in LA...
+		m.conservativeResize(Eigen::NoChange, n);
+		int r2 = R::LA::rank(CGAL_MOVE(m));
+		return r1 == r2;
+		// TODO: This is very very far from optimal...
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Contained_in_linear_hull_tag,(CartesianDKernelFunctors::Contained_in_linear_hull<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Affine_rank : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Affine_rank)
+	typedef R_ R;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	// Computing a sensible Uncertain<int> is not worth it
+	typedef int result_type;
+	typedef typename R::LA::Dynamic_matrix Matrix;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+		int n=(int)std::distance(f,e);
+		if (--n<=0) return n;
+		Point const& p0 = *f;
+		int d=pd(p0);
+		Matrix m(d,n);
+		for(int i=0; ++f!=e; ++i){
+		  Point const& p = *f;
+		  for(int j=0;j<d;++j){
+		    m(j,i)=c(p,j)-c(p0,j);
+		    // TODO: cache p0[j] in case it is computed?
+		  }
+		}
+		return R::LA::rank(CGAL_MOVE(m));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Affine_rank_tag,(CartesianDKernelFunctors::Affine_rank<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Affinely_independent : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Affinely_independent)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter e)const{
+		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		int d=pd(*f);
+		if (--n>d) return false;
+		typename Get_functor<R, Affine_rank_tag>::type ar(this->kernel());
+		return ar(f,e) == n;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Affinely_independent_tag,(CartesianDKernelFunctors::Affinely_independent<K>),(Point_tag),(Point_dimension_tag,Affine_rank_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Contained_in_simplex : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Contained_in_simplex)
+	typedef R_ R;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	// Computing a sensible Uncertain<*> is not worth it
+	// typedef typename Get_type<R, Boolean_tag>::type result_type;
+	typedef bool result_type;
+	typedef typename Increment_dimension<typename R::Default_ambient_dimension>::type D1;
+	typedef typename Increment_dimension<typename R::Max_ambient_dimension>::type D2;
+	typedef typename R::LA::template Rebind_dimension<D1,D2>::Other LA;
+	typedef typename LA::Dynamic_matrix Matrix;
+	typedef typename LA::Dynamic_vector DynVec;
+	typedef typename LA::Vector Vec;
+
+	template<class Iter, class P>
+	result_type operator()(Iter f, Iter e, P const&q)const{
+		typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		if (n==0) return false;
+		int d=pd(q);
+		Matrix m(d+1,n);
+		DynVec a(n);
+		// FIXME: Should use the proper vector constructor (Iterator_and_last)
+		Vec b(d+1);
+		for(int j=0;j<d;++j) b[j]=c(q,j);
+		b[d]=1;
+
+		for(int i=0; f!=e; ++i,++f){
+		  Point const& p = *f;
+		  for(int j=0;j<d;++j){
+		    m(j,i)=c(p,j);
+		  }
+		  m(d,i)=1;
+		}
+		if (!LA::solve(a,CGAL_MOVE(m),CGAL_MOVE(b))) return false;
+		for(int i=0;i<n;++i){
+		  if (a[i]<0) return false;
+		}
+		return true;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Contained_in_simplex_tag,(CartesianDKernelFunctors::Contained_in_simplex<K>),(Point_tag),(Point_dimension_tag,Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+  namespace internal {
+    template<class Ref_>
+    struct Matrix_col_access {
+      typedef Ref_ result_type;
+      int col;
+      Matrix_col_access(int r):col(r){}
+      template<class Mat> Ref_ operator()(Mat const& m, std::ptrdiff_t row)const{
+	return m(row,col);
+      }
+    };
+  }
+template<class R_> struct Linear_base : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Linear_base)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, FT_tag>::type FT;
+	typedef void result_type;
+	typedef typename R::LA::Dynamic_matrix Matrix;
+
+	template<class Iter, class Oter>
+	result_type operator()(Iter f, Iter e, Oter&o)const{
+		typename Get_functor<R, Compute_vector_cartesian_coordinate_tag>::type c(this->kernel());
+		typename Get_functor<R, Point_dimension_tag>::type vd(this->kernel());
+		typename Get_functor<R, Construct_ttag<Vector_tag> >::type cv(this->kernel());
+		std::ptrdiff_t n=std::distance(f,e);
+		if (n==0) return;
+		Vector const& v0 = *f;
+		// FIXME: Uh? Using it on a vector ?!
+		int d=vd(v0);
+		Matrix m(d,n);
+		for(int j=0;j<d;++j){
+		  m(0,j)=c(v0,j);
+		}
+		for(int i=1; ++f!=e; ++i){
+		  Vector const& v = *f;
+		  for(int j=0;j<d;++j){
+		    m(i,j)=c(v,j);
+		  }
+		}
+		Matrix b = R::LA::basis(CGAL_MOVE(m));
+		for(int i=0; i < R::LA::columns(b); ++i){
+		  //*o++ = Vector(b.col(i));
+		  typedef
+#ifdef CGAL_CXX11
+		    decltype(std::declval<const Matrix>()(0,0))
+#else
+		    FT
+#endif
+		    Ref;
+		  typedef Iterator_from_indices<Matrix, FT, Ref,
+			  internal::Matrix_col_access<Ref> > IFI;
+		  *o++ = cv(IFI(b,0,i),IFI(b,d,i));
+		}
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Linear_base_tag,(CartesianDKernelFunctors::Linear_base<K>),(Vector_tag),(Point_dimension_tag,Compute_vector_cartesian_coordinate_tag));
+
+#if 0
+namespace CartesianDKernelFunctors {
+template<class R_,bool=boost::is_same<typename R_::Point,typename R_::Vector>::value> struct Orientation : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	typedef typename Get_functor<R, Orientation_of_points_tag>::type OP;
+	typedef typename Get_functor<R, Orientation_of_vectors_tag>::type OV;
+
+	//FIXME!!!
+	//when Point and Vector are distinct types, the dispatch should be made
+	//in a way that doesn't instantiate a conversion from Point to Vector
+	template<class Iter>
+	result_type operator()(Iter const&f, Iter const& e)const{
+		typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+		typename std::iterator_traits<Iter>::difference_type d=std::distance(f,e);
+		int dim=pd(*f); // BAD
+		if(d==dim) return OV(this->kernel())(f,e);
+		CGAL_assertion(d==dim+1);
+		return OP(this->kernel())(f,e);
+	}
+	//TODO: version that takes objects directly instead of iterators
+};
+
+template<class R_> struct Orientation<R_,false> : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Orientation)
+	typedef R_ R;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Orientation_tag>::type result_type;
+	typedef typename Get_functor<R, Orientation_of_points_tag>::type OP;
+	typedef typename Get_functor<R, Orientation_of_vectors_tag>::type OV;
+	typedef typename R::LA::Square_matrix Matrix;
+
+	//FIXME!!!
+	//when Point and Vector are distinct types, the dispatch should be made
+	//in a way that doesn't instantiate a conversion from Point to Vector
+	template<class Iter>
+	typename boost::enable_if<is_iterator_to<Iter,Point>,result_type>::type
+	operator()(Iter const&f, Iter const& e)const{
+		return OP(this->kernel())(f,e);
+	}
+	template<class Iter>
+	typename boost::enable_if<is_iterator_to<Iter,Vector>,result_type>::type
+	operator()(Iter const&f, Iter const& e)const{
+		return OV(this->kernel())(f,e);
+	}
+	//TODO: version that takes objects directly instead of iterators
+};
+}
+#endif
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Side_of_oriented_sphere : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Side_of_oriented_sphere)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Oriented_side_tag>::type result_type;
+	typedef typename Increment_dimension<typename R::Default_ambient_dimension>::type D1;
+	typedef typename Increment_dimension<typename R::Max_ambient_dimension>::type D2;
+	typedef typename R::LA::template Rebind_dimension<D1,D2>::Other LA;
+	typedef typename LA::Square_matrix Matrix;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter const& e)const{
+	  Point const& p0=*f++; // *--e ?
+	  return this->operator()(f,e,p0);
+	}
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter const& e, Point const& p0) const {
+	  typedef typename Get_functor<R, Squared_distance_to_origin_tag>::type Sqdo;
+	  typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+	  typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+
+	  int d=pd(p0);
+	  Matrix m(d+1,d+1);
+	  if(CGAL::Is_stored<Sqdo>::value) {
+	    Sqdo sqdo(this->kernel());
+	    for(int i=0;f!=e;++f,++i) {
+	      Point const& p=*f;
+	      for(int j=0;j<d;++j){
+		RT const& x=c(p,j);
+		m(i,j)=x-c(p0,j);
+	      }
+	      m(i,d) = sqdo(p) - sqdo(p0);
+	    }
+	  } else {
+	    for(int i=0;f!=e;++f,++i) {
+	      Point const& p=*f;
+	      m(i,d) = 0;
+	      for(int j=0;j<d;++j){
+		RT const& x=c(p,j);
+		m(i,j)=x-c(p0,j);
+		m(i,d)+=CGAL::square(m(i,j));
+	      }
+	    }
+	  }
+	  if(d%2)
+	    return -LA::sign_of_determinant(CGAL_MOVE(m));
+	  else
+	    return LA::sign_of_determinant(CGAL_MOVE(m));
+	}
+
+#ifdef CGAL_CXX11
+	template <class...U,class=typename std::enable_if<(sizeof...(U)>=4)>::type>
+	result_type operator()(U&&...u) const {
+		return operator()({std::forward<U>(u)...});
+	}
+
+	template <class P>
+	result_type operator()(std::initializer_list<P> l) const {
+		return operator()(l.begin(),l.end());
+	}
+#else
+	//TODO
+#endif
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Side_of_oriented_sphere_tag,(CartesianDKernelFunctors::Side_of_oriented_sphere<K>),(Point_tag),(Point_dimension_tag,Squared_distance_to_origin_tag,Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template <class R_> struct Construct_circumcenter : Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Construct_circumcenter)
+  typedef typename Get_type<R_, Point_tag>::type Point;
+  typedef Point result_type;
+  typedef typename Get_type<R_, FT_tag>::type FT;
+  template <class Iter>
+  result_type operator()(Iter f, Iter e)const{
+    typedef typename Get_type<R_, Point_tag>::type      Point;
+    typedef typename R_::LA LA;
+    typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type c(this->kernel());
+    typename Get_functor<R_, Construct_ttag<Point_tag> >::type cp(this->kernel());
+    typename Get_functor<R_, Point_dimension_tag>::type pd(this->kernel());
+    typename Get_functor<R_, Squared_distance_to_origin_tag>::type sdo(this->kernel());
+
+    Point const& p0=*f;
+    int d = pd(p0);
+    if (d+1 == std::distance(f,e))
+    {
+      // 2*(x-y).c == x^2-y^2
+      typedef typename LA::Square_matrix Matrix;
+      typedef typename LA::Vector Vec;
+      typedef typename LA::Construct_vector CVec;
+      FT const& n0 = sdo(p0);
+      Matrix m(d,d);
+      Vec b = typename CVec::Dimension()(d);
+      // Write the point coordinates in lines.
+      int i;
+      for(i=0; ++f!=e; ++i) {
+	Point const& p=*f;
+	for(int j=0;j<d;++j) {
+	  m(i,j)=2*(c(p,j)-c(p0,j));
+	  b[i] = sdo(p) - n0;
+	}
+      }
+      CGAL_assertion (i == d);
+      Vec res = typename CVec::Dimension()(d);;
+      //std::cout << "Mat: " << m << "\n Vec: " << one << std::endl;
+      LA::solve(res, CGAL_MOVE(m), CGAL_MOVE(b));
+      //std::cout << "Sol: " << res << std::endl;
+      return cp(d,LA::vector_begin(res),LA::vector_end(res));
+    }
+    else
+    {
+      /*
+       * Matrix P=(p1, p2, ...) (each point as a column)
+       * Matrix Q=2*t(p2-p1,p3-p1, ...) (each vector as a line)
+       * Matrix M: QP, adding a line of 1 at the top
+       * Vector B: (1, p2^2-p1^2, p3^2-p1^2, ...)
+       * Solve ML=B, the center of the sphere is PL
+       *
+       * It would likely be faster to write P then transpose, multiply,
+       * etc instead of doing it by hand.
+       */
+      // TODO: check for degenerate cases?
+
+      typedef typename R_::Max_ambient_dimension D2;
+      typedef typename R_::LA::template Rebind_dimension<Dynamic_dimension_tag,D2>::Other LAd;
+      typedef typename LAd::Square_matrix Matrix;
+      typedef typename LAd::Vector Vec;
+      typename Get_functor<R_, Scalar_product_tag>::type sp(this->kernel());
+      int k=static_cast<int>(std::distance(f,e));
+      int d=pd(p0);
+      Matrix m(k,k);
+      Vec b(k);
+      Vec l(k);
+      int j,i=0;
+      for(Iter f2=f;f2!=e;++f2,++i){
+	b(i)=m(i,i)=sdo(*f2);
+	j=0;
+	for(Iter f3=f;f3!=e;++f3,++j){
+	  m(j,i)=m(i,j)=sp(*f2,*f3);
+	}
+      }
+      for(i=1;i<k;++i){
+	b(i)-=b(0);
+	for(j=0;j<k;++j){
+	  m(i,j)=2*(m(i,j)-m(0,j));
+	}
+      }
+      for(j=0;j<k;++j) m(0,j)=1;
+      b(0)=1;
+
+      LAd::solve(l,CGAL_MOVE(m),CGAL_MOVE(b));
+
+      typename LA::Vector center=typename LA::Construct_vector::Dimension()(d);
+      for(i=0;i<d;++i) center(i)=0;
+      j=0;
+      for(Iter f2=f;f2!=e;++f2,++j){
+	for(i=0;i<d;++i){
+	  center(i)+=l(j)*c(*f2,i);
+	}
+      }
+
+      return cp(LA::vector_begin(center),LA::vector_end(center));
+    }
+  }
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Construct_circumcenter_tag,(CartesianDKernelFunctors::Construct_circumcenter<K>),(Point_tag),(Construct_ttag<Point_tag>,Compute_point_cartesian_coordinate_tag,Scalar_product_tag,Squared_distance_to_origin_tag,Point_dimension_tag));
+
+namespace CartesianDKernelFunctors {
+template <class R_> struct Squared_circumradius : Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Squared_circumradius)
+  typedef typename Get_type<R_, FT_tag>::type result_type;
+  template <class Iter>
+  result_type operator()(Iter f, Iter e)const{
+    typename Get_functor<R_, Construct_circumcenter_tag>::type cc(this->kernel());
+    typename Get_functor<R_, Squared_distance_tag>::type sd(this->kernel());
+    return sd(cc(f, e), *f);
+  }
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Squared_circumradius_tag,(CartesianDKernelFunctors::Squared_circumradius<K>),(Point_tag),(Construct_circumcenter_tag,Squared_distance_tag));
+
+namespace CartesianDKernelFunctors {
+// TODO: implement it directly, it should be at least as fast as Side_of_oriented_sphere.
+template<class R_> struct Side_of_bounded_sphere : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Side_of_bounded_sphere)
+	typedef R_ R;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Bounded_side_tag>::type result_type;
+
+	template<class Iter>
+	result_type operator()(Iter f, Iter const& e) const {
+	  Point const& p0 = *f++; // *--e ?
+	  typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
+	  //FIXME: Doesn't work for non-full dimension.
+	  CGAL_assertion (std::distance(f,e) == pd(p0)+1);
+	  return operator() (f, e, p0);
+	}
+
+	template<class Iter>
+	result_type operator()(Iter const& f, Iter const& e, Point const& p0) const {
+	  typename Get_functor<R, Side_of_oriented_sphere_tag>::type sos (this->kernel());
+	  typename Get_functor<R, Orientation_of_points_tag>::type op (this->kernel());
+	  // enum_cast is not very generic, but since this function isn't supposed to remain like this...
+	  return enum_cast<Bounded_side> (sos (f, e, p0) * op (f, e));
+	}
+
+#ifdef CGAL_CXX11
+	template <class...U,class=typename std::enable_if<(sizeof...(U)>=4)>::type>
+	result_type operator()(U&&...u) const {
+		return operator()({std::forward<U>(u)...});
+	}
+
+	template <class P>
+	result_type operator()(std::initializer_list<P> l) const {
+		return operator()(l.begin(),l.end());
+	}
+#else
+	//TODO
+#endif
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Side_of_bounded_sphere_tag,(CartesianDKernelFunctors::Side_of_bounded_sphere<K>),(Point_tag),(Side_of_oriented_sphere_tag,Orientation_of_points_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Side_of_bounded_circumsphere : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Side_of_bounded_circumsphere)
+	typedef typename Get_type<R_, Bounded_side_tag>::type result_type;
+
+	template<class Iter, class P>
+	result_type operator()(Iter f, Iter const& e, P const& p0) const {
+	  // TODO: Special case when the dimension is full.
+	  typename Get_functor<R_, Construct_circumcenter_tag>::type cc(this->kernel());
+	  typename Get_functor<R_, Compare_distance_tag>::type cd(this->kernel());
+
+	  return enum_cast<Bounded_side>(cd(cc(f, e), *f, p0));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Side_of_bounded_circumsphere_tag,(CartesianDKernelFunctors::Side_of_bounded_circumsphere<K>),(Point_tag),(Squared_distance_tag,Construct_circumcenter_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Point_to_vector : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Point_to_vector)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Point argument_type;
+	result_type operator()(argument_type const&v)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(ci(v,Begin_tag()),ci(v,End_tag()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Point_to_vector_tag,(CartesianDKernelFunctors::Point_to_vector<K>),(Point_tag,Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Vector_to_point : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Vector_to_point)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef Point result_type;
+	typedef Vector argument_type;
+	result_type operator()(argument_type const&v)const{
+		CI ci(this->kernel());
+		return CP(this->kernel())(ci(v,Begin_tag()),ci(v,End_tag()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Vector_to_point_tag,(CartesianDKernelFunctors::Vector_to_point<K>),(Point_tag,Vector_tag),(Construct_ttag<Point_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Opposite_vector : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Opposite_vector)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Vector argument_type;
+	result_type operator()(Vector const&v)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(make_transforming_iterator(ci(v,Begin_tag()),std::negate<RT>()),make_transforming_iterator(ci(v,End_tag()),std::negate<RT>()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Opposite_vector_tag,(CartesianDKernelFunctors::Opposite_vector<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Scaled_vector : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Scaled_vector)
+	typedef R_ R;
+	typedef typename Get_type<R, FT_tag>::type FT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Vector first_argument_type;
+	typedef FT second_argument_type;
+	result_type operator()(Vector const&v,FT const& s)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(make_transforming_iterator(ci(v,Begin_tag()),Scale<FT>(s)),make_transforming_iterator(ci(v,End_tag()),Scale<FT>(s)));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Scaled_vector_tag,(CartesianDKernelFunctors::Scaled_vector<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Sum_of_vectors : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Sum_of_vectors)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Vector first_argument_type;
+	typedef Vector second_argument_type;
+	result_type operator()(Vector const&a, Vector const&b)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::plus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::plus<RT>()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Sum_of_vectors_tag,(CartesianDKernelFunctors::Sum_of_vectors<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Difference_of_vectors : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Difference_of_vectors)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Vector first_argument_type;
+	typedef Vector second_argument_type;
+	result_type operator()(Vector const&a, Vector const&b)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::minus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::minus<RT>()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Difference_of_vectors_tag,(CartesianDKernelFunctors::Difference_of_vectors<K>),(Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Translated_point : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Translated_point)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CVI;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CPI;
+	typedef Point  result_type;
+	typedef Point  first_argument_type;
+	typedef Vector second_argument_type;
+	result_type operator()(Point const&a, Vector const&b)const{
+		CVI cvi(this->kernel());
+		CPI cpi(this->kernel());
+		return CP(this->kernel())(make_transforming_pair_iterator(cpi(a,Begin_tag()),cvi(b,Begin_tag()),std::plus<RT>()),make_transforming_pair_iterator(cpi(a,End_tag()),cvi(b,End_tag()),std::plus<RT>()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Translated_point_tag,(CartesianDKernelFunctors::Translated_point<K>),(Point_tag, Vector_tag),(Construct_ttag<Point_tag>, Construct_ttag<Vector_cartesian_const_iterator_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Difference_of_points : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Difference_of_points)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_tag> >::type CV;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	typedef Vector result_type;
+	typedef Point first_argument_type;
+	typedef Point second_argument_type;
+	result_type operator()(Point const&a, Point const&b)const{
+		CI ci(this->kernel());
+		return CV(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),std::minus<RT>()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),std::minus<RT>()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Difference_of_points_tag,(CartesianDKernelFunctors::Difference_of_points<K>),(Point_tag, Vector_tag),(Construct_ttag<Vector_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Midpoint : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Midpoint)
+	typedef R_ R;
+	typedef typename Get_type<R, FT_tag>::type FT;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Point_tag> >::type CP;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	typedef Point result_type;
+	typedef Point first_argument_type;
+	typedef Point second_argument_type;
+	// There is a division, but it will be cast to RT afterwards anyway, so maybe we could use RT.
+	struct Average : std::binary_function<FT,RT,FT> {
+		FT operator()(FT const&a, RT const&b)const{
+			return (a+b)/2;
+		}
+	};
+	result_type operator()(Point const&a, Point const&b)const{
+		CI ci(this->kernel());
+		//Divide<FT,int> half(2);
+		//return CP(this->kernel())(make_transforming_iterator(make_transforming_pair_iterator(ci.begin(a),ci.begin(b),std::plus<FT>()),half),make_transforming_iterator(make_transforming_pair_iterator(ci.end(a),ci.end(b),std::plus<FT>()),half));
+		return CP(this->kernel())(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),Average()),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),Average()));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Midpoint_tag,(CartesianDKernelFunctors::Midpoint<K>),(Point_tag),(Construct_ttag<Point_tag>, Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Squared_length : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Squared_length)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Vector_tag>::type Vector;
+	typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+	typedef RT result_type;
+	typedef Vector argument_type;
+	result_type operator()(Vector const&a)const{
+		CI ci(this->kernel());
+		typename Algebraic_structure_traits<RT>::Square f;
+		// TODO: avoid this RT(0)+...
+		return std::accumulate(make_transforming_iterator(ci(a,Begin_tag()),f),make_transforming_iterator(ci(a,End_tag()),f),RT(0));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Squared_length_tag,(CartesianDKernelFunctors::Squared_length<K>),(Vector_tag),(Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Squared_distance_to_origin : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Squared_distance_to_origin)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	typedef RT result_type;
+	typedef Point argument_type;
+	result_type operator()(Point const&a)const{
+		CI ci(this->kernel());
+		typename Algebraic_structure_traits<RT>::Square f;
+		// TODO: avoid this RT(0)+...
+		return std::accumulate(make_transforming_iterator(ci(a,Begin_tag()),f),make_transforming_iterator(ci(a,End_tag()),f),RT(0));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Squared_distance_to_origin_tag,(CartesianDKernelFunctors::Squared_distance_to_origin<K>),(Point_tag),(Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Squared_distance : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Squared_distance)
+	typedef R_ R;
+	typedef typename Get_type<R, RT_tag>::type RT;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	typedef RT result_type;
+	typedef Point first_argument_type;
+	typedef Point second_argument_type;
+	struct Sq_diff : std::binary_function<RT,RT,RT> {
+		RT operator()(RT const&a, RT const&b)const{
+			return CGAL::square(a-b);
+		}
+	};
+	result_type operator()(Point const&a, Point const&b)const{
+		CI ci(this->kernel());
+		Sq_diff f;
+		// TODO: avoid this RT(0)+...
+		return std::accumulate(make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),f),make_transforming_pair_iterator(ci(a,End_tag()),ci(b,End_tag()),f),RT(0));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Squared_distance_tag,(CartesianDKernelFunctors::Squared_distance<K>),(Point_tag),(Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Scalar_product : private Store_kernel<R_> {
+  CGAL_FUNCTOR_INIT_STORE(Scalar_product)
+  typedef R_ R;
+  typedef typename Get_type<R, RT_tag>::type RT;
+  typedef typename Get_type<R, Vector_tag>::type Vector;
+  typedef typename Get_functor<R, Construct_ttag<Vector_cartesian_const_iterator_tag> >::type CI;
+  typedef RT result_type;
+  typedef Vector first_argument_type;
+  typedef Vector second_argument_type;
+  result_type operator()(Vector const&a, Vector const&b)const{
+    CI ci(this->kernel());
+    std::multiplies<RT> f;
+    // TODO: avoid this RT(0)+...
+    return std::accumulate(
+	make_transforming_pair_iterator(ci(a,Begin_tag()),ci(b,Begin_tag()),f),
+	make_transforming_pair_iterator(ci(a,  End_tag()),ci(b,  End_tag()),f),
+	RT(0));
+  }
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Scalar_product_tag,(CartesianDKernelFunctors::Scalar_product<K>),(Vector_tag),(Construct_ttag<Vector_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Compare_distance : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Compare_distance)
+	typedef R_ R;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_functor<R, Squared_distance_tag>::type CSD;
+	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
+	typedef Point first_argument_type;
+	typedef Point second_argument_type;
+	typedef Point third_argument_type; // why am I doing this already?
+	typedef Point fourth_argument_type;
+	result_type operator()(Point const&a, Point const&b, Point const&c)const{
+		CSD csd(this->kernel());
+		return CGAL_NTS compare(csd(a,b),csd(a,c));
+	}
+	result_type operator()(Point const&a, Point const&b, Point const&c, Point const&d)const{
+		CSD csd(this->kernel());
+		return CGAL_NTS compare(csd(a,b),csd(c,d));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Compare_distance_tag,(CartesianDKernelFunctors::Compare_distance<K>),(Point_tag),(Squared_distance_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Less_point_cartesian_coordinate : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Less_point_cartesian_coordinate)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+	typedef typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type Cc;
+	// TODO: This is_exact thing should be reengineered.
+	// the goal is to have a way to tell: don't filter this
+	typedef typename CGAL::Is_exact<Cc> Is_exact;
+
+	template<class V,class W,class I>
+	result_type operator()(V const&a, W const&b, I i)const{
+		Cc c(this->kernel());
+		return c(a,i)<c(b,i);
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Less_point_cartesian_coordinate_tag,(CartesianDKernelFunctors::Less_point_cartesian_coordinate<K>),(),(Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Compare_point_cartesian_coordinate : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Compare_point_cartesian_coordinate)
+	typedef R_ R;
+	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
+	typedef typename Get_functor<R, Compute_point_cartesian_coordinate_tag>::type Cc;
+	// TODO: This is_exact thing should be reengineered.
+	// the goal is to have a way to tell: don't filter this
+	typedef typename CGAL::Is_exact<Cc> Is_exact;
+
+	template<class V,class W,class I>
+	result_type operator()(V const&a, W const&b, I i)const{
+		Cc c(this->kernel());
+		return CGAL_NTS compare(c(a,i),c(b,i));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Compare_point_cartesian_coordinate_tag,(CartesianDKernelFunctors::Compare_point_cartesian_coordinate<K>),(),(Compute_point_cartesian_coordinate_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Compare_lexicographically : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Compare_lexicographically)
+	typedef R_ R;
+	typedef typename Get_type<R, Comparison_result_tag>::type result_type;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	// TODO: This is_exact thing should be reengineered.
+	// the goal is to have a way to tell: don't filter this
+	typedef typename CGAL::Is_exact<CI> Is_exact;
+
+	template<class V,class W>
+	result_type operator()(V const&a, W const&b)const{
+		CI c(this->kernel());
+#ifdef CGAL_CXX11
+		auto
+#else
+		typename CI::result_type
+#endif
+		a_begin=c(a,Begin_tag()),
+		b_begin=c(b,Begin_tag()),
+		a_end=c(a,End_tag());
+		result_type res;
+		// can't we do slightly better for Uncertain<*> ?
+		// after res=...; if(is_uncertain(res))return indeterminate<result_type>();
+		do res=CGAL_NTS compare(*a_begin++,*b_begin++);
+		while(a_begin!=a_end && res==EQUAL);
+		return res;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Compare_lexicographically_tag,(CartesianDKernelFunctors::Compare_lexicographically<K>),(),(Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Less_lexicographically : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Less_lexicographically)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+	typedef typename Get_functor<R, Compare_lexicographically_tag>::type CL;
+	typedef typename CGAL::Is_exact<CL> Is_exact;
+
+	template <class V, class W>
+	result_type operator() (V const&a, W const&b) const {
+		CL c (this->kernel());
+		return c(a,b) < 0;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Less_lexicographically_tag,(CartesianDKernelFunctors::Less_lexicographically<K>),(),(Compare_lexicographically_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Less_or_equal_lexicographically : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Less_or_equal_lexicographically)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+	typedef typename Get_functor<R, Compare_lexicographically_tag>::type CL;
+	typedef typename CGAL::Is_exact<CL> Is_exact;
+
+	template <class V, class W>
+	result_type operator() (V const&a, W const&b) const {
+		CL c (this->kernel());
+		return c(a,b) <= 0;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Less_or_equal_lexicographically_tag,(CartesianDKernelFunctors::Less_or_equal_lexicographically<K>),(),(Compare_lexicographically_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Equal_points : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Equal_points)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+	typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
+	// TODO: This is_exact thing should be reengineered.
+	// the goal is to have a way to tell: don't filter this
+	typedef typename CGAL::Is_exact<CI> Is_exact;
+
+	template<class V,class W>
+	result_type operator()(V const&a, W const&b)const{
+		CI c(this->kernel());
+#ifdef CGAL_CXX11
+		auto
+#else
+		typename CI::result_type
+#endif
+		a_begin=c(a,Begin_tag()),
+		b_begin=c(b,Begin_tag()),
+		a_end=c(a,End_tag());
+		result_type res = true;
+		// Is using CGAL::possibly for Uncertain really an optimization?
+		do res = res & (*a_begin++ == *b_begin++);
+		while(a_begin!=a_end && possibly(res));
+		return res;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Equal_points_tag,(CartesianDKernelFunctors::Equal_points<K>),(),(Construct_ttag<Point_cartesian_const_iterator_tag>));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Oriented_side : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Oriented_side)
+	typedef R_ R;
+	typedef typename Get_type<R, Oriented_side_tag>::type result_type;
+	typedef typename Get_type<R, Point_tag>::type Point;
+	typedef typename Get_type<R, Hyperplane_tag>::type Hyperplane;
+	typedef typename Get_type<R, Sphere_tag>::type Sphere;
+	typedef typename Get_functor<R, Value_at_tag>::type VA;
+	typedef typename Get_functor<R, Hyperplane_translation_tag>::type HT;
+	typedef typename Get_functor<R, Squared_distance_tag>::type SD;
+	typedef typename Get_functor<R, Squared_radius_tag>::type SR;
+	typedef typename Get_functor<R, Center_of_sphere_tag>::type CS;
+
+	result_type operator()(Hyperplane const&h, Point const&p)const{
+		HT ht(this->kernel());
+		VA va(this->kernel());
+		return CGAL::compare(va(h,p),ht(h));
+	}
+	result_type operator()(Sphere const&s, Point const&p)const{
+		SD sd(this->kernel());
+		SR sr(this->kernel());
+		CS cs(this->kernel());
+		return CGAL::compare(sd(cs(s),p),sr(s));
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Oriented_side_tag,(CartesianDKernelFunctors::Oriented_side<K>),(Point_tag,Sphere_tag,Hyperplane_tag),(Value_at_tag,Hyperplane_translation_tag,Squared_distance_tag,Squared_radius_tag,Center_of_sphere_tag));
+
+namespace CartesianDKernelFunctors {
+template<class R_> struct Has_on_positive_side : private Store_kernel<R_> {
+	CGAL_FUNCTOR_INIT_STORE(Has_on_positive_side)
+	typedef R_ R;
+	typedef typename Get_type<R, Bool_tag>::type result_type;
+	typedef typename Get_functor<R, Oriented_side_tag>::type OS;
+
+	template <class Obj, class Pt>
+	result_type operator()(Obj const&o, Pt const&p)const{
+		OS os(this->kernel());
+		return os(o,p) == ON_POSITIVE_SIDE;
+	}
+};
+}
+
+CGAL_KD_DEFAULT_FUNCTOR(Has_on_positive_side_tag,(CartesianDKernelFunctors::Has_on_positive_side<K>),(),(Oriented_side_tag));
+
+}
+#include <CGAL/NewKernel_d/Coaffine.h>
+#endif // CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/functor_properties.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/functor_properties.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/functor_properties.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/functor_properties.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/functor_tags.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/functor_tags.h
new file mode 100644
index 0000000..a184f45
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/functor_tags.h
@@ -0,0 +1,353 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_FUNCTOR_TAGS_H
+#define CGAL_FUNCTOR_TAGS_H
+#include <CGAL/tags.h> // for Null_tag
+#include <CGAL/NewKernel_d/utils.h>
+#ifdef CGAL_CXX11
+#include <type_traits>
+#include <utility>
+#endif
+#include <boost/type_traits.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/pop_front.hpp>
+namespace CGAL {
+
+  // Find a better place for this later
+
+  template <class K, class T, class=void> struct Get_type
+    : K::template Type<T> {};
+  template <class K, class F, class O=void, class=void> struct Get_functor
+    : K::template Functor<F, O> {};
+#ifdef CGAL_CXX11
+  template <class K, class T> using Type = typename Get_type<K, T>::type;
+  template <class K, class T> using Functor = typename Get_functor<K, T>::type;
+#endif
+
+  class Null_type {~Null_type();}; // no such object should be created
+
+	// To construct iterators
+	struct Begin_tag {};
+	struct End_tag {};
+
+	// Functor category
+	struct Predicate_tag {};
+	struct Construct_tag {};
+	struct Construct_iterator_tag {};
+	struct Compute_tag {};
+	struct Misc_tag {};
+
+	struct No_filter_tag {};
+
+	template<class>struct Construct_ttag {};
+	template<class>struct Convert_ttag {};
+
+	template <class K, class F, class=void, class=void> struct Get_functor_category { typedef Misc_tag type; };
+	template<class Tg, class Obj, class Base> struct Typedef_tag_type;
+	//template<class Kernel, class Tg> struct Read_tag_type {};
+
+	template<class Kernel, class Tg>
+	struct Provides_type
+	  : Has_type_different_from<Get_type<Kernel, Tg>, Null_type> {};
+
+	template<class Kernel, class Tg, class O=void>
+	struct Provides_functor
+	  : Has_type_different_from<Get_functor<Kernel, Tg, O>, Null_functor> {};
+
+	template<class K, class List, bool=boost::mpl::empty<List>::type::value>
+	struct Provides_functors : boost::mpl::and_ <
+				   Provides_functor<K, typename boost::mpl::front<List>::type>,
+				   Provides_functors<K, typename boost::mpl::pop_front<List>::type> > {};
+	template<class K, class List>
+	struct Provides_functors<K, List, true> : boost::true_type {};
+
+	template<class K, class List, bool=boost::mpl::empty<List>::type::value>
+	struct Provides_types : boost::mpl::and_ <
+				   Provides_type<K, typename boost::mpl::front<List>::type>,
+				   Provides_types<K, typename boost::mpl::pop_front<List>::type> > {};
+	template<class K, class List>
+	struct Provides_types<K, List, true> : boost::true_type {};
+
+	namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Type,template Type<Null_tag>,false) }
+	template<class Kernel, class Tg,
+	  bool = internal::has_Type<Kernel>::value /* false */>
+	struct Provides_type_i : boost::false_type {};
+	template<class Kernel, class Tg>
+	struct Provides_type_i <Kernel, Tg, true>
+	  : Has_type_different_from<typename Kernel::template Type<Tg>, Null_type> {};
+
+	//// This version does not like Functor<T,bool=false>
+	//namespace internal { BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_Functor,Functor,false) }
+	// This version lets us use non-type template parameters, but fails with older EDG-based compilers (Intel 14).
+	namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Functor,template Functor<Null_tag>,false) }
+
+	template<class Kernel, class Tg, class O=void,
+	  bool = internal::has_Functor<Kernel>::value /* false */>
+	struct Provides_functor_i : boost::false_type {};
+	template<class Kernel, class Tg, class O>
+	struct Provides_functor_i <Kernel, Tg, O, true>
+	  : Has_type_different_from<typename Kernel::template Functor<Tg, O>, Null_functor> {};
+
+	// TODO: Refine this a bit.
+	template <class K, class T, class D=void,
+		  //bool=Provides_functor<K,T>::value,
+		  //bool=Provides_functor_i<K,T>::value,
+		  bool = internal::has_Functor<K>::value
+		  >
+	struct Inherit_functor : K::template Functor<T> {};
+	template <class K, class T, class D>
+	struct Inherit_functor <K, T, D, false> {};
+
+	template <class K, class T, bool=internal::has_Type<K>::value>
+	struct Inherit_type : K::template Type<T> {};
+	template <class K, class T>
+	struct Inherit_type <K, T, false> {};
+
+	struct Number_tag {};
+	struct Discrete_tag {};
+	struct Object_tag {};
+	template <class K, class T, class=void> struct Get_type_category {
+	  // The lazy kernel uses it too eagerly,
+	  // so it currently needs a default.
+	  typedef Null_tag type;
+	};
+
+#define CGAL_DECL_OBJ_(X,Y) \
+  template<class Obj,class Base> \
+  struct Typedef_tag_type<X##_tag, Obj, Base> : Base { typedef Obj X; }; \
+  template<class K, class D> \
+  struct Get_type_category <K, X##_tag, D> { typedef Y##_tag type; }
+#define CGAL_DECL_OBJ(X,Y) struct X##_tag {}; \
+  CGAL_DECL_OBJ_(X,Y)
+
+  //namespace has_object { BOOST_MPL_HAS_XXX_TRAIT_DEF(X) }
+  //template<class Kernel>
+  //struct Provides_tag_type<Kernel, X##_tag> : has_object::has_##X<Kernel> {};
+  //template<class Kernel>
+  //struct Read_tag_type<Kernel, X##_tag> { typedef typename Kernel::X type; }
+
+	// Not exactly objects, but the extras can't hurt.
+	CGAL_DECL_OBJ(FT, Number);
+	CGAL_DECL_OBJ(RT, Number);
+
+	CGAL_DECL_OBJ(Bool, Discrete); // Boolean_tag is already taken, and is a template :-(
+	CGAL_DECL_OBJ(Comparison_result, Discrete);
+	CGAL_DECL_OBJ(Sign, Discrete);
+	CGAL_DECL_OBJ(Orientation, Discrete); // Note: duplicate with the functor tag!
+	CGAL_DECL_OBJ(Oriented_side, Discrete);
+	CGAL_DECL_OBJ(Bounded_side, Discrete);
+	CGAL_DECL_OBJ(Angle, Discrete);
+	CGAL_DECL_OBJ(Flat_orientation, Discrete);
+
+	CGAL_DECL_OBJ(Vector, Object);
+	CGAL_DECL_OBJ(Point, Object);
+	CGAL_DECL_OBJ(Segment, Object);
+	CGAL_DECL_OBJ(Sphere, Object);
+	CGAL_DECL_OBJ(Line, Object);
+	CGAL_DECL_OBJ(Direction, Object);
+	CGAL_DECL_OBJ(Hyperplane, Object);
+	CGAL_DECL_OBJ(Ray, Object);
+	CGAL_DECL_OBJ(Iso_box, Object);
+	CGAL_DECL_OBJ(Bbox, Object);
+	CGAL_DECL_OBJ(Aff_transformation, Object);
+#undef CGAL_DECL_OBJ_
+#undef CGAL_DECL_OBJ
+
+// Intel fails with those, and they are not so useful.
+//	CGAL_KD_DEFAULT_TYPE(RT_tag,(typename Get_type<K, FT_tag>::type),(),());
+//	CGAL_KD_DEFAULT_TYPE(FT_tag,(CGAL::Quotient<typename Get_type<K, RT_tag>::type>),(),());
+
+#define CGAL_SMURF2(A,B) CGAL_KD_DEFAULT_TYPE(A##_tag,(typename Same_uncertainty_nt<B, typename Get_type<K,RT_tag>::type>::type),(RT_tag),())
+#define CGAL_SMURF1(A) CGAL_SMURF2(A,CGAL::A)
+	CGAL_SMURF2(Bool, bool);
+	CGAL_SMURF1(Sign);
+	CGAL_SMURF1(Comparison_result);
+	CGAL_SMURF1(Orientation);
+	CGAL_SMURF1(Oriented_side);
+	CGAL_SMURF1(Bounded_side);
+	CGAL_SMURF1(Angle);
+#undef CGAL_SMURF1
+#undef CGAL_SMURF2
+
+	// TODO: replace with Get_type_category
+	template<class> struct is_NT_tag { enum { value = false }; };
+	template<> struct is_NT_tag<FT_tag> { enum { value = true }; };
+	template<> struct is_NT_tag<RT_tag> { enum { value = true }; };
+
+	template<class> struct iterator_tag_traits {
+	  enum { is_iterator = false, has_nth_element = false };
+	  typedef Null_tag value_tag;
+	};
+
+#define CGAL_DECL_COMPUTE(X) struct X##_tag {}; \
+	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Compute_tag type;}
+	CGAL_DECL_COMPUTE(Compute_point_cartesian_coordinate);
+	CGAL_DECL_COMPUTE(Compute_vector_cartesian_coordinate);
+	CGAL_DECL_COMPUTE(Compute_homogeneous_coordinate);
+	CGAL_DECL_COMPUTE(Squared_distance);
+	CGAL_DECL_COMPUTE(Squared_distance_to_origin);
+	CGAL_DECL_COMPUTE(Squared_length);
+	CGAL_DECL_COMPUTE(Squared_radius);
+	CGAL_DECL_COMPUTE(Squared_circumradius);
+	CGAL_DECL_COMPUTE(Scalar_product);
+	CGAL_DECL_COMPUTE(Hyperplane_translation);
+	CGAL_DECL_COMPUTE(Value_at);
+#undef CGAL_DECL_COMPUTE
+
+#define CGAL_DECL_ITER_OBJ(X,Y,Z,C) struct X##_tag {}; \
+  template<>struct iterator_tag_traits<X##_tag> { \
+    enum { is_iterator = true, has_nth_element = true }; \
+    typedef Y##_tag value_tag; \
+    typedef Z##_tag nth_element; \
+    typedef C##_tag container; \
+  }; \
+  template<class Obj,class Base> \
+  struct Typedef_tag_type<X##_tag, Obj, Base> : Base { typedef Obj X; }
+
+  //namespace has_object { BOOST_MPL_HAS_XXX_TRAIT_DEF(X) }
+  //template<class Kernel>
+  //struct Provides_tag_type<Kernel, X##_tag> : has_object::has_##X<Kernel> {};
+  //template<class Kernel>
+  //struct Read_tag_type<Kernel, X##_tag> { typedef typename Kernel::X type; }
+
+	CGAL_DECL_ITER_OBJ(Vector_cartesian_const_iterator, FT, Compute_vector_cartesian_coordinate, Vector);
+	CGAL_DECL_ITER_OBJ(Point_cartesian_const_iterator, FT, Compute_point_cartesian_coordinate, Point);
+#undef CGAL_DECL_ITER_OBJ
+
+	template<class>struct map_result_tag{typedef Null_type type;};
+	template<class T>struct map_result_tag<Construct_ttag<T> >{typedef T type;};
+
+	template<class A,class T,class B,class C>struct Get_functor_category<A,Construct_ttag<T>,B,C> :
+	  boost::mpl::if_c<iterator_tag_traits<T>::is_iterator,
+			   Construct_iterator_tag,
+			   Construct_tag> {};
+
+	// Really?
+	template<class A,class T,class B,class C>struct Get_functor_category<A,Convert_ttag<T>,B,C>{typedef Misc_tag type;};
+
+#define CGAL_DECL_CONSTRUCT(X,Y) struct X##_tag {}; \
+	template<>struct map_result_tag<X##_tag>{typedef Y##_tag type;}; \
+	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Construct_tag type;}
+	CGAL_DECL_CONSTRUCT(Midpoint,Point);
+	CGAL_DECL_CONSTRUCT(Center_of_sphere,Point);
+	CGAL_DECL_CONSTRUCT(Point_of_sphere,Point);
+	CGAL_DECL_CONSTRUCT(Segment_extremity,Point);
+	CGAL_DECL_CONSTRUCT(Sum_of_vectors,Vector);
+	CGAL_DECL_CONSTRUCT(Difference_of_vectors,Vector);
+	CGAL_DECL_CONSTRUCT(Opposite_vector,Vector);
+	CGAL_DECL_CONSTRUCT(Scaled_vector,Vector);
+	CGAL_DECL_CONSTRUCT(Orthogonal_vector,Vector);
+	CGAL_DECL_CONSTRUCT(Difference_of_points,Vector);
+	CGAL_DECL_CONSTRUCT(Translated_point,Point);
+	CGAL_DECL_CONSTRUCT(Point_to_vector,Vector);
+	CGAL_DECL_CONSTRUCT(Vector_to_point,Point);
+	CGAL_DECL_CONSTRUCT(Construct_min_vertex,Point);
+	CGAL_DECL_CONSTRUCT(Construct_max_vertex,Point);
+	CGAL_DECL_CONSTRUCT(Construct_circumcenter,Point);
+#undef CGAL_DECL_CONSTRUCT
+#if 0
+#define CGAL_DECL_ITER_CONSTRUCT(X,Y) struct X##_tag {}; \
+	template<>struct map_result_tag<X##_tag>{typedef Y##_tag type;}; \
+	template<>struct map_functor_type<X##_tag>{typedef Construct_iterator_tag type;}
+	CGAL_DECL_ITER_CONSTRUCT(Construct_point_cartesian_const_iterator,Point_cartesian_const_iterator);
+	CGAL_DECL_ITER_CONSTRUCT(Construct_vector_cartesian_const_iterator,Vector_cartesian_const_iterator);
+#undef CGAL_DECL_ITER_CONSTRUCT
+#endif
+
+	//FIXME: choose a convention: prefix with Predicate_ ?
+#define CGAL_DECL_PREDICATE_(X) \
+	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Predicate_tag type;}
+#define CGAL_DECL_PREDICATE(X) struct X##_tag {}; \
+	CGAL_DECL_PREDICATE_(X)
+	CGAL_DECL_PREDICATE(Less_point_cartesian_coordinate);
+	CGAL_DECL_PREDICATE(Compare_point_cartesian_coordinate);
+	CGAL_DECL_PREDICATE(Compare_distance);
+	CGAL_DECL_PREDICATE(Compare_lexicographically);
+	CGAL_DECL_PREDICATE(Less_lexicographically);
+	CGAL_DECL_PREDICATE(Less_or_equal_lexicographically);
+	CGAL_DECL_PREDICATE(Equal_points);
+	CGAL_DECL_PREDICATE(Has_on_positive_side);
+	CGAL_DECL_PREDICATE_(Orientation); // duplicate with the type
+	CGAL_DECL_PREDICATE_(Oriented_side); // duplicate with the type
+	CGAL_DECL_PREDICATE(Orientation_of_points);
+	CGAL_DECL_PREDICATE(Orientation_of_vectors);
+	CGAL_DECL_PREDICATE(Side_of_oriented_sphere);
+	CGAL_DECL_PREDICATE(Side_of_bounded_sphere);
+	CGAL_DECL_PREDICATE(Side_of_bounded_circumsphere);
+	CGAL_DECL_PREDICATE(Contained_in_affine_hull);
+	CGAL_DECL_PREDICATE(In_flat_orientation);
+	CGAL_DECL_PREDICATE(In_flat_side_of_oriented_sphere);
+	CGAL_DECL_PREDICATE(Construct_flat_orientation); // Making it a predicate is a questionable choice, it should be possible to let it be a construction for some implementations. Not sure how to do that... TODO
+	CGAL_DECL_PREDICATE(Linear_rank);
+	CGAL_DECL_PREDICATE(Affine_rank);
+	CGAL_DECL_PREDICATE(Linearly_independent);
+	CGAL_DECL_PREDICATE(Affinely_independent);
+	CGAL_DECL_PREDICATE(Contained_in_linear_hull);
+	CGAL_DECL_PREDICATE(Contained_in_simplex);
+#undef CGAL_DECL_PREDICATE
+
+#define CGAL_DECL_MISC(X) struct X##_tag {}; \
+	template<class A,class B,class C>struct Get_functor_category<A,X##_tag,B,C>{typedef Misc_tag type;}
+	//TODO: split into _begin and _end ?
+	//CGAL_DECL_MISC(Construct_point_cartesian_const_iterator);
+	//CGAL_DECL_MISC(Construct_vector_cartesian_const_iterator);
+	CGAL_DECL_MISC(Point_dimension);
+	CGAL_DECL_MISC(Vector_dimension);
+	CGAL_DECL_MISC(Linear_base); // Find a more appropriate category?
+#undef CGAL_DECL_MISC
+
+
+	// Properties for LA
+	struct Has_extra_dimension_tag {};
+	struct Has_vector_plus_minus_tag {};
+	struct Has_vector_scalar_ops_tag {};
+	struct Has_dot_product_tag {};
+	struct Has_determinant_of_vectors_tag {};
+	struct Has_determinant_of_points_tag {};
+	struct Has_determinant_of_iterator_to_vectors_tag {};
+	struct Has_determinant_of_iterator_to_points_tag {};
+	struct Has_determinant_of_vectors_omit_last_tag {};
+	struct Stores_squared_norm_tag {};
+
+	template<class> struct Preserved_by_non_linear_extra_coordinate
+	  : boost::false_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_extra_dimension_tag> : boost::true_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_determinant_of_vectors_tag> : boost::true_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_determinant_of_points_tag> : boost::true_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_determinant_of_iterator_to_vectors_tag> : boost::true_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_determinant_of_iterator_to_points_tag> : boost::true_type {};
+	template<> struct Preserved_by_non_linear_extra_coordinate
+	  <Has_determinant_of_vectors_omit_last_tag> : boost::true_type {};
+
+	// Kernel properties
+	struct Point_stores_squared_distance_to_origin_tag {};
+
+}
+#endif // CGAL_FUNCTOR_TAGS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/static_int.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/static_int.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/static_int.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/static_int.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/store_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/store_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/NewKernel_d/store_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/store_kernel.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/utils.h b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/utils.h
new file mode 100644
index 0000000..238a223
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/NewKernel_d/utils.h
@@ -0,0 +1,306 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_MARCUTILS
+#define CGAL_MARCUTILS
+
+#include <CGAL/config.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4003) // not enough actual parameters for macro 'BOOST_PP_EXPAND_I'
+                                // http://lists.boost.org/boost-users/2014/11/83291.php
+#endif                          
+
+#ifdef CGAL_CXX11
+#include <type_traits>
+#include <utility>
+#define CGAL_FORWARDABLE(T) T&&
+#define CGAL_FORWARD(T,t) std::forward<T>(t)
+#define CGAL_MOVE(t) std::move(t)
+#define CGAL_CONSTEXPR constexpr
+#else
+#define CGAL_FORWARDABLE(T) T const&
+#define CGAL_FORWARD(T,t) t
+#define CGAL_MOVE(t) t
+#define CGAL_CONSTEXPR
+#endif
+#include <boost/utility/enable_if.hpp>
+#include <boost/preprocessor/repetition.hpp>
+#include <CGAL/Rational_traits.h>
+#include <CGAL/tuple.h>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits.hpp>
+
+#ifdef CGAL_CXX11
+#define CGAL_BOOSTD std::
+#else
+#define CGAL_BOOSTD boost::
+#endif
+
+namespace CGAL {
+namespace internal {
+	BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
+}
+
+template <class T, class No, bool=internal::has_type<T>::value /*false*/>
+struct Has_type_different_from : boost::false_type {};
+template <class T, class No>
+struct Has_type_different_from <T, No, true>
+: boost::mpl::not_<boost::is_same<typename T::type, No> > {};
+
+
+	template <class T> struct Wrap_type { typedef T type; };
+
+	// tell a function f(a,b,c) that its real argument is a(b,c)
+	struct Eval_functor {};
+
+	// forget the first argument. Useful to make something dependant
+	// (and thus usable in SFINAE), although that's not a great design.
+	template<class A,class B> struct Second_arg {
+		typedef B type;
+	};
+
+	// like std::forward, except for basic types where it does a cast, to
+	// avoid issues with narrowing conversions
+#ifdef CGAL_CXX11
+	template<class T,class U,class V> inline
+		typename std::conditional<std::is_arithmetic<T>::value&&std::is_arithmetic<typename std::remove_reference<U>::type>::value,T,U&&>::type
+	       	forward_safe(V&& u) { return std::forward<U>(u); }
+#else
+	template<class T,class U> inline U const& forward_safe(U const& u) {
+		return u;
+	}
+#endif
+
+#ifdef CGAL_CXX11
+	template<class...> struct Constructible_from_each;
+	template<class To,class From1,class...From> struct Constructible_from_each<To,From1,From...>{
+		enum { value=std::is_convertible<From1,To>::value&&Constructible_from_each<To,From...>::value };
+	};
+	template<class To> struct Constructible_from_each<To>{
+		enum { value=true };
+	};
+#else
+// currently only used in C++0X code
+#endif
+
+	template<class T> struct Scale {
+#ifndef CGAL_CXX11
+		template<class> struct result;
+		template<class FT> struct result<Scale(FT)> {
+			typedef FT type;
+		};
+#endif
+		T const& scale;
+		Scale(T const& t):scale(t){}
+		template<class FT>
+#ifdef CGAL_CXX11
+		auto operator()(FT&& x)const->decltype(scale*std::forward<FT>(x))
+#else
+		FT operator()(FT const& x)const
+#endif
+		{
+			return scale*CGAL_FORWARD(FT,x);
+		}
+	};
+	template<class NT,class T> struct Divide {
+#if !defined(CGAL_CXX11) || !defined(BOOST_RESULT_OF_USE_DECLTYPE)
+		// requires boost > 1.44
+		// shouldn't be needed with C++0X
+		//template<class> struct result;
+		//template<class FT> struct result<Divide(FT)> {
+		//	typedef FT type;
+		//};
+		typedef NT result_type;
+#endif
+		T const& scale;
+		Divide(T const& t):scale(t){}
+		template<class FT>
+#ifdef CGAL_CXX11
+		//FIXME: gcc complains for Gmpq
+		//auto operator()(FT&& x)const->decltype(Rational_traits<NT>().make_rational(std::forward<FT>(x),scale))
+		NT operator()(FT&& x)const
+#else
+		NT operator()(FT const& x)const
+#endif
+		{
+			return Rational_traits<NT>().
+				make_rational(CGAL_FORWARD(FT,x),scale);
+		}
+	};
+
+	template <class NT> struct has_cheap_constructor : boost::is_arithmetic<NT>{};
+	template <bool p> struct has_cheap_constructor<Interval_nt<p> > {
+		        enum { value=true };
+	};
+
+	// like std::multiplies but allows mixing types
+	// in C++11 in doesn't need to be a template
+	template < class Ret >
+	struct multiplies {
+		template<class A,class B>
+#ifdef CGAL_CXX11
+		auto operator()(A&&a,B&&b)const->decltype(std::forward<A>(a)*std::forward<B>(b))
+#else
+		Ret operator()(A const& a, B const& b)const
+#endif
+		{
+			return CGAL_FORWARD(A,a)*CGAL_FORWARD(B,b);
+		}
+	};
+	template < class Ret >
+	struct division {
+		template<class A,class B>
+#ifdef CGAL_CXX11
+		auto operator()(A&&a,B&&b)const->decltype(std::forward<A>(a)/std::forward<B>(b))
+#else
+		Ret operator()(A const& a, B const& b)const
+#endif
+		{
+			return CGAL_FORWARD(A,a)/CGAL_FORWARD(B,b);
+		}
+	};
+
+#ifdef CGAL_CXX11
+	using std::decay;
+#else
+	template<class T> struct decay : boost::remove_cv<typename boost::decay<T>::type> {};
+#endif
+
+	template<class T,class U> struct Type_copy_ref { typedef U type; };
+	template<class T,class U> struct Type_copy_ref<T&,U> { typedef U& type; };
+#ifdef CGAL_CXX11
+	template<class T,class U> struct Type_copy_ref<T&&,U> { typedef U&& type; };
+#endif
+	template<class T,class U> struct Type_copy_cv { typedef U type; };
+	template<class T,class U> struct Type_copy_cv<T const,U> { typedef U const type; };
+	template<class T,class U> struct Type_copy_cv<T volatile,U> { typedef U volatile type; };
+	template<class T,class U> struct Type_copy_cv<T const volatile,U> { typedef U const volatile type; };
+
+	template<class T,class U> struct Type_copy_cvref :
+		Type_copy_ref<T,typename Type_copy_cv<typename boost::remove_reference<T>::type,U>::type> {};
+
+	struct Dereference_functor {
+		template<class> struct result{};
+		template<class It> struct result<Dereference_functor(It)> {
+			typedef typename std::iterator_traits<It>::reference type;
+		};
+		template<class It> typename result<Dereference_functor(It)>::type
+			operator()(It const&i)const{
+				return *i;
+			}
+	};
+
+#ifdef CGAL_CXX11
+	template<int...> struct Indices{};
+	template<class> struct Next_increasing_indices;
+	template<int...I> struct Next_increasing_indices<Indices<I...> > {
+		typedef Indices<I...,sizeof...(I)> type;
+	};
+	template<int N> struct N_increasing_indices {
+		typedef typename Next_increasing_indices<typename N_increasing_indices<N-1>::type>::type type;
+	};
+	template<> struct N_increasing_indices<0> { typedef Indices<> type; };
+	namespace internal {
+	template<class F,class...U,int...I> inline typename std::result_of<F&&(U...)>::type
+	do_call_on_tuple_elements(F&&f, std::tuple<U...>&&t, Indices<I...>&&) {
+		return f(std::get<I>(std::move(t))...);
+	}
+	} // internal
+	template<class/*result type, ignored*/,class F,class...U>
+	inline typename std::result_of<F&&(U...)>::type
+	call_on_tuple_elements(F&&f, std::tuple<U...>&&t) {
+		return internal::do_call_on_tuple_elements(std::forward<F>(f),std::move(t),
+				typename N_increasing_indices<sizeof...(U)>::type());
+	}
+#else
+#define CGAL_VAR(Z,N,_) cpp0x::get<N>(t)
+#define CGAL_CODE(Z,N,_) template<class Res, class F BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N,class U)> \
+	inline Res call_on_tuple_elements(F const&f, \
+			cpp0x::tuple<BOOST_PP_ENUM_PARAMS(N,U)> const&t) { \
+		return f(BOOST_PP_ENUM(N,CGAL_VAR,)); \
+	}
+	template<class Res, class F>
+	inline Res call_on_tuple_elements(F const&f, cpp0x::tuple<>) {
+		return f();
+	}
+BOOST_PP_REPEAT_FROM_TO(1, 8, CGAL_CODE, _ )
+#undef CGAL_CODE
+#undef CGAL_VAR
+#endif
+
+	template<class A> struct Factory {
+	  typedef A result_type;
+#ifdef CGAL_CXX11
+	  template<class...U> result_type operator()(U&&...u)const{
+	    return A(std::forward<U>(u)...);
+	  }
+#else
+	  result_type operator()()const{
+	    return A();
+	  }
+#define CGAL_CODE(Z,N,_) template<BOOST_PP_ENUM_PARAMS(N,class U)> \
+	  result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,U,const&u))const{ \
+	    return A(BOOST_PP_ENUM_PARAMS(N,u)); \
+	  }
+BOOST_PP_REPEAT_FROM_TO(1, 8, CGAL_CODE, _ )
+#undef CGAL_CODE
+#endif
+	};
+}
+
+// TODO: make a Cartesian-only variant
+// WARNING: do not use the Req* parameters too much, they can cause circular instanciations and are only useful for dispatching.
+#define CGAL_STRIP_PAREN_(...) __VA_ARGS__
+#define CGAL_STRIP_PAREN(...) CGAL_STRIP_PAREN_ __VA_ARGS__
+// What to do with O? pass it down to other functors or drop it?
+#define CGAL_KD_DEFAULT_FUNCTOR(Tg,Name,ReqTyp,ReqFun) \
+    template <class K, class O> \
+    struct Get_functor<K, Tg, O, \
+      typename boost::mpl::if_c< \
+        Provides_functor_i<K, Tg, O>::value \
+        || !Provides_types<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqTyp> >::value \
+        || !Provides_functors<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqFun> >::value \
+      , int, void>::type> \
+    { \
+      typedef CGAL_STRIP_PAREN_ Name type; \
+      typedef K Bound_kernel; \
+    }
+
+// Not used yet, may need some changes.
+#define CGAL_KD_DEFAULT_TYPE(Tg,Name,ReqTyp,ReqFun) \
+    template <class K> \
+    struct Get_type<K, Tg, \
+      typename boost::mpl::if_c< \
+        Provides_type_i<K, Tg>::value \
+        || !Provides_types<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqTyp> >::value \
+        || !Provides_functors<K, boost::mpl::vector<CGAL_STRIP_PAREN_ ReqFun> >::value \
+      , int, void>::type> \
+    { \
+      typedef CGAL_STRIP_PAREN_ Name type; \
+      typedef K Bound_kernel; \
+    }
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Null_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Null_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Null_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Null_matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Number_type_checker.h b/3rdparty/CGAL-4.8/include/CGAL/Number_type_checker.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Number_type_checker.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Number_type_checker.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h b/3rdparty/CGAL-4.8/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OFF_to_nef_3.h b/3rdparty/CGAL-4.8/include/CGAL/OFF_to_nef_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OFF_to_nef_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OFF_to_nef_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Cost.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Cost.h
new file mode 100644
index 0000000..b04eaf1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Cost.h
@@ -0,0 +1,110 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_OTR2_COST_H_
+#define CGAL_OTR2_COST_H_
+
+#include <algorithm>
+
+namespace CGAL {
+namespace OTR_2 {
+
+template <class FT>
+class Cost
+{
+private:
+  FT m_norm;
+  FT m_tang;
+  FT m_max_norm;
+  FT m_max_tang;
+
+public:
+  Cost()
+  : m_norm(0),
+    m_tang(0),
+    m_max_norm(0),
+    m_max_tang(0)
+  {}
+
+  Cost(const FT norm, const FT tang)
+  : m_norm(norm),
+    m_tang(tang),
+    m_max_norm(norm),
+    m_max_tang(tang)
+  {}
+
+  ~Cost() {}
+
+  Cost& operator= (const Cost& cost)
+  {
+    m_norm = cost.norm();
+    m_tang = cost.tang();
+    m_max_norm = cost.max_norm();
+    m_max_tang = cost.max_tang();
+    return *this;
+  }
+
+  const FT norm() const { return m_norm; }
+
+  const FT tang() const { return m_tang; }
+
+  const FT max_norm() const { return m_max_norm; }
+
+  const FT max_tang() const { return m_max_tang; }
+
+  FT finalize(const FT alpha = FT(0.5)) const
+  {
+    return FT(2) * (alpha * m_norm + (FT(1) - alpha) * m_tang);
+  }
+
+  void divide(const FT ratio)
+  {
+    CGAL_assertion(ratio != FT(0));
+    m_norm /= ratio;
+    m_tang /= ratio;
+  }
+
+  void add(const Cost& cost, const FT mass = FT(1))
+  {
+    m_norm += mass * cost.norm();
+    m_tang += mass * cost.tang();
+  }
+
+  void reset_max()
+  {
+    m_max_norm = FT(0);
+    m_max_tang = FT(0);
+  }
+
+  void update_max(const Cost& cost)
+  {
+    m_max_norm = (std::max)(m_max_norm, cost.max_norm());
+    m_max_tang = (std::max)(m_max_tang, cost.max_tang());
+  }
+
+  void compute_max(const FT norm, const FT tang)
+  {
+    m_max_norm = (std::max)(m_max_norm, norm);
+    m_max_tang = (std::max)(m_max_tang, tang);
+  }
+};
+
+} } // namespaces
+
+#endif // CGAL_OTR2_COST_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_edge_2.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_edge_2.h
new file mode 100644
index 0000000..9569d5e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_edge_2.h
@@ -0,0 +1,144 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_RECONSTRUCTION_EDGE_2_H_
+#define CGAL_RECONSTRUCTION_EDGE_2_H_
+
+namespace CGAL {
+namespace OTR_2 {
+
+template<class FT, class Edge, class Vertex_handle, class Face_handle>
+class Reconstruction_edge_2 {
+protected:
+  Edge m_edge;
+  Vertex_handle m_source;
+  Vertex_handle m_target;
+
+  FT m_before_cost;
+  FT m_after_cost;
+
+public:
+  Reconstruction_edge_2() 
+  : m_edge(Face_handle(), 0),
+    m_before_cost(0),
+    m_after_cost(0)
+  {}
+
+  Reconstruction_edge_2(const Reconstruction_edge_2& pedge) 
+  : m_edge(pedge.edge()),
+    m_source(pedge.source()),
+    m_target(pedge.target()),
+    m_before_cost(pedge.before()),
+    m_after_cost(pedge.after())
+  {}
+
+  Reconstruction_edge_2(const Edge& edge, const FT before, const FT after)
+  : m_edge(edge),
+    m_before_cost(before),
+    m_after_cost(after)
+  {
+    get_vertices();
+  }
+
+  Reconstruction_edge_2(const Edge& edge, const FT priority = FT(0))
+  : m_edge(edge),
+    m_before_cost(0),
+    m_after_cost(priority)
+  {
+    get_vertices(); 
+  }
+
+  Reconstruction_edge_2(Vertex_handle source, Vertex_handle target)
+  : m_edge(Face_handle(), 0),
+    m_source(source),
+    m_target(target),
+    m_before_cost(0),
+    m_after_cost(0)
+  {}
+
+  Reconstruction_edge_2& operator= (const Reconstruction_edge_2& pedge)
+  {
+    m_edge = pedge.edge();
+    m_source = pedge.source();
+    m_target = pedge.target();
+    m_before_cost = pedge.before();
+    m_after_cost = pedge.after();
+
+    return *this;
+  }
+
+  bool operator== (const Reconstruction_edge_2& pedge) const
+  {
+    return (m_source->id() == pedge.source()->id()
+      && m_target->id() == pedge.target()->id());
+  }
+
+  bool operator< (const Reconstruction_edge_2& pedge) const 
+  {
+    if (m_source->id() < pedge.source()->id())
+      return true;
+    if (m_source->id() > pedge.source()->id())
+      return false;
+    if (m_target->id() < pedge.target()->id())
+      return true;
+    return false;
+  }
+
+  const Edge& edge() const
+  {
+    return m_edge;
+  }
+
+  const Vertex_handle& source() const
+  {
+    return m_source;
+  }
+
+  const Vertex_handle& target() const
+  {
+    return m_target;
+  }
+
+  const FT before() const
+  {
+    return m_before_cost;
+  }
+
+  const FT after() const
+  {
+    return m_after_cost;
+  }
+
+  const FT priority() const
+  {
+    return after() - before();
+  }
+
+protected:
+  void get_vertices()
+  {
+    int index = m_edge.second;
+    m_source = m_edge.first->vertex((index + 1) % 3);
+    m_target = m_edge.first->vertex((index + 2) % 3);
+  }
+};
+
+} } // namespace
+
+#endif // CGAL_RECONSTRUCTION_EDGE_2_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_face_base_2.h
new file mode 100644
index 0000000..0714646
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_face_base_2.h
@@ -0,0 +1,266 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_RECONSTRUCTION_FACE_BASE_2_H_
+#define CGAL_RECONSTRUCTION_FACE_BASE_2_H_
+
+#include <CGAL/OTR_2/Cost.h>
+#include <CGAL/OTR_2/Sample.h>
+#include <CGAL/Triangulation_face_base_2.h>
+
+#include <vector>
+
+/// \cond SKIP_IN_MANUAL
+
+namespace CGAL {
+namespace OTR_2 {
+
+/// The Reconstruction_face_base_2 class is the default
+/// vertex class of the Reconstruction_face_base_2 class.
+///
+/// - Each vertex stores a CSample as well as the corresponding relocated point
+///
+/// @param Traits_  Traits class
+/// @param Vb       Vertex base class, model of TriangulationFaceBase_2.
+template < class Traits_, class Fb = Triangulation_face_base_2<Traits_> >
+class Reconstruction_face_base_2 : public Fb
+{
+public:
+  typedef Fb                            Base;
+  typedef typename Base::Vertex_handle  Vertex_handle;
+  typedef typename Base::Face_handle    Face_handle;
+
+  template < typename TDS2 >
+  struct Rebind_TDS 
+  {
+    typedef typename Base::template Rebind_TDS<TDS2>::Other   Fb2;
+    typedef Reconstruction_face_base_2<Traits_,Fb2>           Other;
+  };
+
+  typedef typename Traits_::FT    FT;
+  typedef OTR_2::Cost<FT>          Cost_;
+  typedef OTR_2::Sample<Traits_>   Sample_;
+  typedef std::vector<Sample_*>   Sample_vector;
+
+private:
+  Sample_vector m_samples[3];
+  FT m_mass[3];
+
+  Cost_ m_cost0[3];
+  Cost_ m_cost1[3];
+  int   m_plan[3];
+
+  FT m_relevance[3];
+
+public:
+  Reconstruction_face_base_2()
+  {
+    init();
+  }
+
+  Reconstruction_face_base_2(
+    Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
+  : Base(v1, v2, v3)
+  {
+    init();
+  }
+
+  Reconstruction_face_base_2(
+    Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
+    Face_handle f1, Face_handle f2, Face_handle f3)
+  : Base(v1, v2, v3, f1, f2, f3)
+  {
+    init();
+  }
+
+  Reconstruction_face_base_2(Face_handle f)
+  : Base(f)
+  {
+    m_samples[0] = f->samples(0);
+    m_samples[1] = f->samples(1);
+    m_samples[2] = f->samples(2);
+
+    m_mass[0] = f->mass(0);
+    m_mass[1] = f->mass(1);
+    m_mass[2] = f->mass(2);
+
+    m_cost0[0] = f->vertex_cost(0);
+    m_cost0[1] = f->vertex_cost(1);
+    m_cost0[2] = f->vertex_cost(2);
+
+    m_cost1[0] = f->edge_cost(0);
+    m_cost1[1] = f->edge_cost(1);
+    m_cost1[2] = f->edge_cost(2);
+
+    m_plan[0] = f->plan(0);
+    m_plan[1] = f->plan(1);
+    m_plan[2] = f->plan(2);
+
+    m_relevance[0] = f->relevance(0);
+    m_relevance[1] = f->relevance(1);
+    m_relevance[2] = f->relevance(2);
+  }
+
+  ~Reconstruction_face_base_2()
+  {
+    clean_all_samples();
+  }
+
+  void init()
+  {
+    m_mass[0] = FT(0);
+    m_mass[1] = FT(0);
+    m_mass[2] = FT(0);
+
+    m_cost0[0] = Cost_();
+    m_cost0[1] = Cost_();
+    m_cost0[2] = Cost_();
+
+    m_cost1[0] = Cost_();
+    m_cost1[1] = Cost_();
+    m_cost1[2] = Cost_();
+
+    m_plan[0] = 0;
+    m_plan[1] = 0;
+    m_plan[2] = 0;
+
+    m_relevance[0] = 0;
+    m_relevance[1] = 0;
+    m_relevance[2] = 0;
+
+  }
+
+  int plan(int edge) const { return m_plan[edge]; }
+  int& plan(int edge) { return m_plan[edge]; }
+
+  const FT& mass(int edge) const { return m_mass[edge]; }
+  FT& mass(int edge) { return m_mass[edge]; }
+
+  const Cost_& vertex_cost(int edge) const { return m_cost0[edge]; }
+  Cost_& vertex_cost(int edge) { return m_cost0[edge]; }
+
+  const Cost_& edge_cost(int edge) const { return m_cost1[edge]; }
+  Cost_& edge_cost(int edge) { return m_cost1[edge]; }
+
+  const FT& relevance(int edge) const { return m_relevance[edge]; }
+  FT& relevance(int edge) { return m_relevance[edge]; }
+
+
+  const Cost_& cost(int edge) const
+  {
+    if (plan(edge) == 0) 
+      return vertex_cost(edge);
+    return edge_cost(edge);
+  }
+
+  bool ghost(int edge) const
+  {
+    if (mass(edge) == FT(0))
+      return true;
+    if (plan(edge) == 0)
+      return true;
+    return false;
+  }
+
+  const Sample_vector& samples(int edge) const { return m_samples[edge]; }
+  Sample_vector& samples(int edge) { return m_samples[edge]; }
+
+  void add_sample(int edge, Sample_* sample)
+  {
+    m_samples[edge].push_back(sample);
+  }
+
+  void clean_samples(int edge)
+  {
+    m_samples[edge].clear();
+  }
+
+  void clean_all_samples()
+  {
+    for (int i = 0; i < 3; ++i)
+      clean_samples(i);
+  }
+};
+
+//---------------STRUCT LESS FACE_HANDLE---------------------
+template <class T>
+struct less_Face_handle
+{
+  void get_vertices_id(const T& face, int& a, int& b, int& c) const
+  {
+    a = face->vertex(0)->id();
+    b = face->vertex(1)->id();
+    c = face->vertex(2)->id();
+  }
+
+  bool operator() (const T& a, const T& b) const
+  {
+    int a0, a1, a2;
+    get_vertices_id(a, a0, a1, a2);
+
+    int b0, b1, b2;
+    get_vertices_id(b, b0, b1, b2);
+
+    if (a0 < b0) return true;
+    if (a0 > b0) return false;
+
+    if (a1 < b1) return true;
+    if (a1 > b1) return false;
+
+    if (a2 < b2) return true;
+
+    return false;
+  }
+};
+
+
+//---------------STRUCT LESS EDGE---------------------
+template <class T>
+struct less_Edge
+{
+  void get_vertices_id(const T& a, int& i, int& j) const
+  {
+    i = a.first->vertex( (a.second+1)%3 )->id();
+    j = a.first->vertex( (a.second+2)%3 )->id();
+    if (i > j) std::swap(i, j);
+  }
+
+  bool operator() (const T& a, const T& b) const
+  {
+    int a0, a1;
+    get_vertices_id(a, a0, a1);
+
+    int b0, b1;
+    get_vertices_id(b, b0, b1);
+
+    if (a0 < b0) return true;
+    if (a0 > b0) return false;
+    if (a1 < b1) return true;
+
+    return false;
+  }
+
+
+  /// \endcond
+
+};
+
+} } //end namespace
+
+#endif // CGAL_RECONSTRUCTION_FACE_BASE_2_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_triangulation_2.h
new file mode 100644
index 0000000..5242f1b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_triangulation_2.h
@@ -0,0 +1,1079 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_RECONSTRUCTION_TRIANGULATION_2_H
+#define CGAL_RECONSTRUCTION_TRIANGULATION_2_H
+
+// local
+#include <CGAL/OTR_2/Sample.h>
+#include <CGAL/OTR_2/Reconstruction_edge_2.h>
+#include <CGAL/OTR_2/Cost.h>
+#include <CGAL/OTR_2/Reconstruction_vertex_base_2.h>
+#include <CGAL/OTR_2/Reconstruction_face_base_2.h>
+
+// CGAL
+#include <CGAL/basic.h>
+#include <CGAL/Random.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+
+// boost
+#include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/identity.hpp>
+#include <boost/multi_index/member.hpp>
+
+// STL
+#include <map>
+#include <set>
+#include <vector>
+#include <queue>
+#include <iostream>
+#include <limits>
+
+#define EPS   1e-15
+
+namespace CGAL {
+namespace OTR_2 {
+
+/// \internal
+///  The Reconstruction_triangulation_2 class
+///  provides the reconstruction simplex as well as the transportation plan.
+/// - Each vertex stores a normal vector.
+/// - A vertex a Sample which got assigned to it by the transportation plan,
+///   well as the corresponding relocated Point (of type Traits_::Point_2).
+/// - In order to solve a linear system over the triangulation, a vertex may be constrained
+///   or not (i.e. may contribute to the right or left member of the linear system),
+///   and has a unique index.
+/// The vertex class must derive from Reconstruction_vertex_base_3.
+///
+///  @param Traits_   The traits class
+///  @param Tds       Model of TriangulationDataStructure_2.
+///  The vertex class must derive from Reconstruction_vertex_base_2.
+///  The face   class must derive from Reconstruction_face_base_2.
+template<
+  class Traits_,
+  class Tds_ = Triangulation_data_structure_2<
+  Reconstruction_vertex_base_2<Traits_>,
+  Reconstruction_face_base_2<Traits_> > >
+class Reconstruction_triangulation_2
+  : public Delaunay_triangulation_2<Traits_, Tds_> 
+{
+public:
+
+  typedef Delaunay_triangulation_2<Traits_, Tds_> Base;
+
+  typedef typename Traits_::FT FT;
+  typedef typename Traits_::Point_2 Point;
+  typedef typename Traits_::Vector_2 Vector;
+  typedef typename Traits_::Line_2 Line;
+  typedef typename Traits_::Segment_2 Segment;
+  typedef typename Traits_::Triangle_2 Triangle;
+
+  typedef typename Base::Vertex Vertex;
+  typedef typename Base::Vertex_handle Vertex_handle;
+  typedef typename Base::Vertex_iterator Vertex_iterator;
+  typedef typename Base::Vertex_circulator Vertex_circulator;
+  typedef typename Base::Finite_vertices_iterator Finite_vertices_iterator;
+
+  typedef typename Base::Edge Edge;
+  typedef typename Base::Edge_circulator Edge_circulator;
+  typedef typename Base::Finite_edges_iterator Finite_edges_iterator;
+
+  typedef typename Base::Face_handle Face_handle;
+  typedef typename Base::Face_circulator Face_circulator;
+  typedef typename Base::Finite_faces_iterator Finite_faces_iterator;
+
+  typedef std::map<Vertex_handle, Vertex_handle,
+      less_Vertex_handle<Vertex_handle> > Vertex_handle_map;
+  typedef std::map<Face_handle, Face_handle, 
+                   less_Face_handle<Face_handle> > Face_handle_map;
+
+  typedef std::set<Vertex_handle, 
+                   less_Vertex_handle<Vertex_handle> > Vertex_handle_set;
+  typedef std::set<Edge, less_Edge<Edge> > Edge_set;
+
+  typedef std::vector<Edge> Edge_vector;
+
+  typedef OTR_2::Cost<FT> Cost_;
+  typedef OTR_2::Sample<Traits_> Sample_;
+  typedef std::vector<Sample_*> Sample_vector;
+  typedef typename Sample_vector::const_iterator Sample_vector_const_iterator;
+
+  typedef OTR_2::Sample_with_priority<Sample_> PSample;
+  typedef std::priority_queue<PSample, std::vector<PSample>,
+      OTR_2::greater_priority<PSample> > SQueue;
+
+  typedef Reconstruction_edge_2<FT, Edge, 
+                                Vertex_handle, Face_handle> Rec_edge_2;
+
+  using Base::geom_traits;
+
+  typedef boost::multi_index_container<
+      Rec_edge_2,
+      boost::multi_index::indexed_by<
+      // sort by Rec_edge_2::operator<
+      boost::multi_index::ordered_unique< boost::multi_index::identity<
+      Rec_edge_2 > > ,
+      // sort by Rec_edge_2::priority()
+      boost::multi_index::ordered_non_unique<
+      boost::multi_index::const_mem_fun<
+      Rec_edge_2,const FT,&Rec_edge_2::priority> >
+  >
+  > MultiIndex;
+
+  double m_factor; // ghost vs solid
+
+
+public:
+  Reconstruction_triangulation_2(Traits_ traits = Traits_())
+  : Base(traits), m_factor(1.)
+  {
+  }
+
+  ~Reconstruction_triangulation_2() {
+  }
+
+  double& ghost_factor() {
+    return m_factor;
+  }
+
+  double ghost_factor() const {
+    return m_factor;
+  }
+
+  Edge random_finite_edge() const {
+    static CGAL::Random rng;
+    std::size_t nbf = Base::number_of_faces();
+    int offset = rng.get_int(0, static_cast<int>(nbf - 1));
+    Finite_faces_iterator fi = Base::finite_faces_begin();
+    for (int i = 0; i < offset; i++)
+      fi++;
+    Face_handle face = fi;
+    int index = rng.get_int(0, 40) % 3;
+    return Edge(face, index);
+  }
+
+  // ACCESS //
+
+  Vertex_handle source_vertex(const Edge& edge) const {
+    return edge.first->vertex(Base::ccw(edge.second));
+  }
+
+  Vertex_handle target_vertex(const Edge& edge) const {
+    return edge.first->vertex(Base::cw(edge.second));
+  }
+
+  Vertex_handle opposite_vertex(const Edge& edge) const {
+    return edge.first->vertex(edge.second);
+  }
+
+  bool is_pinned(const Edge& edge) const {
+    Vertex_handle s = source_vertex(edge);
+    if (s->pinned())
+      return true;
+    return false;
+  }
+
+  Edge twin_edge(const Edge& edge) const {
+    Face_handle f = edge.first;
+    Vertex_handle v = source_vertex(edge);
+    Face_handle nf = f->neighbor(edge.second);
+    return Edge(nf, Base::ccw(nf->index(v)));
+  }
+
+  Edge next_edge(const Edge& edge) const {
+    Face_handle f = edge.first;
+    int index = Base::ccw(edge.second);
+    return Edge(f, index);
+  }
+
+  Edge prev_edge(const Edge& edge) const {
+    Face_handle f = edge.first;
+    int index = Base::cw(edge.second);
+    return Edge(f, index);
+  }
+
+  FT get_length(const Edge& edge) const {
+    Segment segment = get_segment(edge);
+    return CGAL::sqrt(segment.squared_length());
+  }
+
+  Segment get_segment(const Edge& edge) const {
+    const Point& ps = source_vertex(edge)->point();
+    const Point& pt = target_vertex(edge)->point();
+    return geom_traits().construct_segment_2_object()(ps, pt);
+  }
+
+  Triangle get_triangle(Face_handle face) const {
+    Vertex_handle v0 = face->vertex(0);
+    Vertex_handle v1 = face->vertex(1);
+    Vertex_handle v2 = face->vertex(2);
+    return geom_traits().construct_triangle_2_object()(
+      v0->point(), v1->point(), v2->point());
+  }
+
+  // GET LINK //
+
+  void get_vertices_from_edge_link(const Edge& edge,
+      Vertex_handle_set& vertices) const {
+    vertices.insert(opposite_vertex(edge));
+    vertices.insert(opposite_vertex(twin_edge(edge)));
+  }
+
+  void get_vertices_from_vertex_link(Vertex_handle vertex,
+      Vertex_handle_set& vertices) const {
+    Vertex_circulator vcirc = Base::incident_vertices(vertex);
+    Vertex_circulator vend = vcirc;
+    CGAL_For_all(vcirc, vend)
+    {
+      Vertex_handle v = vcirc;
+      vertices.insert(v);
+    }
+  }
+
+  // boundary of star(vertex)
+  // 'outward' chooses the orientation of the boundary
+  void get_edges_from_star_minus_link(Vertex_handle vertex, Edge_vector& hull,
+      bool outward = false) const {
+    Face_circulator fcirc = Base::incident_faces(vertex);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle face = fcirc;
+      int index = face->index(vertex);
+      Edge edge(face, index);
+      if (outward)
+        edge = twin_edge(edge);
+      hull.push_back(edge);
+    }
+  }
+
+  // ATTRIBUTES //
+
+  bool is_ghost(const Edge& edge) const {
+    return edge.first->ghost(edge.second);
+  }
+
+  int get_plan(const Edge& edge) const {
+    return edge.first->plan(edge.second);
+  }
+
+  void set_plan(const Edge& edge, int simplex) const {
+    edge.first->plan(edge.second) = simplex;
+  }
+
+  FT get_mass(const Edge& edge) const {
+    return edge.first->mass(edge.second);
+  }
+
+  void set_mass(const Edge& edge, const FT mass) const {
+    edge.first->mass(edge.second) = mass;
+  }
+
+  const Cost_& get_cost(const Edge& edge) const {
+    return edge.first->cost(edge.second);
+  }
+
+  void set_vertex_cost(const Edge& edge, const Cost_& cost) const {
+    edge.first->vertex_cost(edge.second) = cost;
+  }
+
+  void set_edge_cost(const Edge& edge, const Cost_& cost) const {
+    edge.first->edge_cost(edge.second) = cost;
+  }
+
+  FT get_vertex_minus_edge_cost(const Edge& edge) const {
+    const Cost_& vcost = edge.first->vertex_cost(edge.second);
+    const Cost_& ecost = edge.first->edge_cost(edge.second);
+    return vcost.finalize() - m_factor * ecost.finalize();
+  }
+
+  FT get_vertex_over_edge_cost(const Edge& edge) const {
+    FT vvalue = edge.first->vertex_cost(edge.second).finalize();
+    FT evalue = edge.first->edge_cost(edge.second).finalize();
+    if (evalue == vvalue)
+      return FT(1) / m_factor;
+    return vvalue / (m_factor * evalue);
+  }
+
+  FT get_edge_relevance(const Edge& edge) const {
+    FT M = get_mass(edge);
+    if (M == FT(0))
+      return FT(0);
+
+    FT L = get_length(edge);
+    FT cost = get_cost(edge).finalize();
+    return M * L * L / cost;
+  }
+
+  FT get_density(const Edge& edge) const {
+    FT length = get_length(edge);
+    FT mass = get_mass(edge);
+    return (mass / length);
+  }
+
+  unsigned int nb_samples(const Edge& edge) const {
+    Edge twin = twin_edge(edge);
+    return edge.first->samples(edge.second).size()
+      + twin.first->samples(twin.second).size();
+  }
+
+  void collect_samples_from_edge(
+    const Edge& edge, Sample_vector& samples) const 
+  {
+    const Sample_vector& edge_samples = edge.first->samples(edge.second);
+    samples.insert(samples.end(), edge_samples.begin(), edge_samples.end());
+  }
+
+  void collect_samples_from_vertex(
+    Vertex_handle vertex, Sample_vector& samples, bool cleanup) const 
+  {
+    Face_circulator fcirc = Base::incident_faces(vertex);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle face = fcirc;
+      int index = face->index(vertex);
+
+      Edge edge(face, index);
+      collect_samples_from_edge(edge, samples);
+
+      Edge next = next_edge(edge);
+      collect_samples_from_edge(next, samples);
+
+      Edge prev = prev_edge(edge);
+      collect_samples_from_edge(prev, samples);
+
+      if (cleanup)
+        face->clean_all_samples();
+    }
+    Sample_* sample = vertex->sample();
+    if (sample)
+      samples.push_back(sample);
+    if (cleanup)
+      vertex->set_sample(NULL);
+  }
+
+  void collect_all_samples(Sample_vector& samples) const {
+    for (Finite_edges_iterator ei = Base::finite_edges_begin();
+        ei != Base::finite_edges_end(); ++ei) {
+      Edge edge = *ei;
+      Edge twin = twin_edge(edge);
+      collect_samples_from_edge(edge, samples);
+      collect_samples_from_edge(twin, samples);
+    }
+    for (Finite_vertices_iterator vi = Base::finite_vertices_begin();
+        vi != Base::finite_vertices_end(); ++vi) {
+      Vertex_handle v = vi;
+      Sample_* sample = v->sample();
+      if (sample)
+        samples.push_back(sample);
+    }
+  }
+
+  void cleanup_assignments() {
+    for (Finite_faces_iterator fi = Base::finite_faces_begin();
+        fi != Base::finite_faces_end(); ++fi) {
+      fi->clean_all_samples();
+    }
+    for (Finite_vertices_iterator vi = Base::finite_vertices_begin();
+        vi != Base::finite_vertices_end(); ++vi) {
+      vi->set_sample(NULL);
+    }
+  }
+
+  // COST //
+
+  Cost_ compute_total_cost() const {
+    Cost_ sum;
+    for (Finite_edges_iterator ei = Base::finite_edges_begin();
+        ei != Base::finite_edges_end(); ++ei) {
+      Edge edge = *ei;
+      const Cost_& cost = get_cost(edge);
+      sum.update_max(cost);
+      sum.add(cost);
+    }
+    return sum;
+  }
+
+  Cost_ compute_cost_around_vertex(Vertex_handle vertex) const {
+    Cost_ inner;
+    Cost_ outer;
+    Face_circulator fcirc = Base::incident_faces(vertex);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle face = fcirc;
+      int index = face->index(vertex);
+
+      Edge edge(face, index);
+      Cost_ cost = get_cost(edge);
+      outer.update_max(cost);
+      outer.add(cost);
+
+      edge = next_edge(edge);
+      cost = get_cost(edge);
+      inner.update_max(cost);
+      inner.add(cost);
+
+      edge = next_edge(edge);
+      cost = get_cost(edge);
+      inner.update_max(cost);
+      inner.add(cost);
+    }
+    inner.divide(2.0);
+
+    Cost_ sum;
+    sum.add(inner);
+    sum.add(outer);
+    sum.update_max(inner);
+    sum.update_max(outer);
+    return sum;
+  }
+
+  void reset_all_costs() {
+    for (Finite_edges_iterator ei = Base::finite_edges_begin();
+        ei != Base::finite_edges_end(); ++ei) {
+      Edge edge = *ei;
+      update_cost(edge);
+    }
+  }
+
+  void update_cost(const Edge& edge) {
+    compute_mass(edge);
+    compute_edge_cost(edge);
+    compute_vertex_cost(edge);
+    select_plan(edge);
+  }
+
+  void compute_mass(const Edge& edge) const {
+    FT mass = 0;
+
+    typename Sample_vector::const_iterator it;
+    const Sample_vector& samples0 = edge.first->samples(edge.second);
+    for (it = samples0.begin(); it != samples0.end(); ++it) {
+      Sample_* sample = *it;
+      mass += sample->mass();
+    }
+
+    Edge twin = twin_edge(edge);
+    const Sample_vector& samples1 = twin.first->samples(twin.second);
+    for (it = samples1.begin(); it != samples1.end(); ++it) {
+      Sample_* sample = *it;
+      mass += sample->mass();
+    }
+
+    set_mass(edge, mass);
+    set_mass(twin, mass);
+  }
+
+  void select_plan(const Edge& edge) const {
+    // transport plan:
+    // 0 - to vertex
+    // 1 - to edge
+
+    int plan = 0;
+    FT diff = get_vertex_minus_edge_cost(edge);
+    if (diff >= 0.0)
+      plan = 1;
+
+    Edge twin = twin_edge(edge);
+    set_plan(edge, plan);
+    set_plan(twin, plan);
+  }
+
+  void compute_edge_cost(const Edge& edge) const {
+    SQueue squeue;
+    FT M = get_mass(edge);
+    FT L = get_length(edge);
+    sort_samples_from_edge(edge, squeue);
+    Cost_ cost = compute_cost_from_squeue(squeue, M, L);
+
+    Edge twin = twin_edge(edge);
+    set_edge_cost(edge, cost);
+    set_edge_cost(twin, cost);
+  }
+
+  void sort_samples_from_edge(const Edge& edge, SQueue& squeue) const {
+    typename Sample_vector::const_iterator it;
+    const Sample_vector& samples0 = edge.first->samples(edge.second);
+    for (it = samples0.begin(); it != samples0.end(); ++it) {
+      Sample_* sample = *it;
+      squeue.push(PSample(sample, sample->coordinate()));
+    }
+
+    Edge twin = twin_edge(edge);
+    const Sample_vector& samples1 = twin.first->samples(twin.second);
+    for (it = samples1.begin(); it != samples1.end(); ++it) {
+      Sample_* sample = *it;
+      squeue.push(PSample(sample, 1.0 - sample->coordinate()));
+    }
+  }
+
+  Cost_ compute_cost_from_squeue(SQueue& squeue, const FT M, const FT L) const
+  {
+    if (squeue.empty())
+      return Cost_();
+    if (M == FT(0))
+      return Cost_();
+
+    Cost_ sum;
+    FT start = 0;
+    FT coef = L / M;
+    while (!squeue.empty()) {
+      PSample psample = squeue.top();
+      squeue.pop();
+
+      FT mass = psample.sample()->mass();
+      FT coord = psample.priority() * L;
+      FT bin = mass * coef;
+      FT center = start + FT(0.5) * bin;
+      FT pos = coord - center;
+
+      FT norm2 = psample.sample()->distance2();
+      FT tang2 = bin * bin / 12 + pos * pos;
+
+      sum.add(Cost_(norm2, tang2), mass);
+      sum.compute_max(norm2, tang2);
+
+      start += bin;
+    }
+    return sum;
+  }
+
+  void compute_vertex_cost(const Edge& edge) const {
+    Edge twin = twin_edge(edge);
+    const Point& ps = source_vertex(edge)->point();
+    const Point& pt = target_vertex(edge)->point();
+
+    Sample_vector samples;
+    collect_samples_from_edge(edge, samples);
+    collect_samples_from_edge(twin, samples);
+
+    Cost_ sum;
+    for (Sample_vector_const_iterator it = samples.begin();
+        it != samples.end(); ++it) {
+      Sample_* sample = *it;
+      FT mass = sample->mass();
+      const Point& query = sample->point();
+
+      FT Ds = geom_traits().compute_squared_distance_2_object()(query, ps);
+      FT Dt = geom_traits().compute_squared_distance_2_object()(query, pt);
+      FT dist2 = ((std::min))(Ds, Dt);
+
+      FT norm2 = sample->distance2();
+      FT tang2 = dist2 - norm2;
+
+      sum.add(Cost_(norm2, tang2), mass);
+      sum.compute_max(norm2, tang2);
+    }
+    set_vertex_cost(edge, sum);
+    set_vertex_cost(twin, sum);
+  }
+
+  // SAMPLE //
+
+  template<class Iterator> // value_type = Sample_*
+  void assign_samples(Iterator begin, Iterator end) {
+    for (Iterator it = begin; it != end; ++it) {
+      Sample_* sample = *it;
+      assign_sample(sample);
+    }
+  }
+
+  template<class Iterator> // value_type = Sample_*
+  void assign_samples_brute_force(Iterator begin, Iterator end) {
+    for (Iterator it = begin; it != end; ++it) {
+      Sample_* sample = *it;
+      assign_sample_brute_force(sample);
+    }
+  }
+
+  bool assign_sample(Sample_* sample) {
+    const Point& point = sample->point();
+    Face_handle face = Base::locate(point);
+
+    if (face == Face_handle() || Base::is_infinite(face)) {
+      //std::cout << "free bird" << std::endl;
+      return false;
+    }
+
+    Vertex_handle vertex = find_nearest_vertex(point, face);
+    if (vertex != Vertex_handle()) {
+      assign_sample_to_vertex(sample, vertex);
+      return true;
+    }
+
+    Edge edge = find_nearest_edge(point, face);
+    assign_sample_to_edge(sample, edge);
+    return true;
+  }
+
+  bool assign_sample_brute_force(Sample_* sample) {
+    const Point& point = sample->point();
+    Face_handle nearest_face = Face_handle();
+    for (Finite_faces_iterator fi = Base::finite_faces_begin();
+        fi != Base::finite_faces_end(); ++fi) {
+      Face_handle face = fi;
+      if (face_has_point(face, point)) {
+        nearest_face = face;
+        break;
+      }
+    }
+
+    if (nearest_face == Face_handle()) {
+      //std::cout << "free bird" << std::endl;
+      return false;
+    }
+
+    Vertex_handle vertex = find_nearest_vertex(point, nearest_face);
+    if (vertex != Vertex_handle()) {
+      assign_sample_to_vertex(sample, vertex);
+      return true;
+    }
+
+    Edge edge = find_nearest_edge(point, nearest_face);
+    assign_sample_to_edge(sample, edge);
+    return true;
+  }
+
+  bool face_has_point(Face_handle face, const Point& query) const {
+    for (int i = 0; i < 3; ++i) {
+      Edge edge(face, i);
+      const Point& ps = source_vertex(edge)->point();
+      const Point& pt = target_vertex(edge)->point();
+      if (!compute_triangle_ccw(ps, pt, query))
+        return false;
+    }
+    return true;
+  }
+
+  Vertex_handle find_nearest_vertex(const Point& point, Face_handle face) const
+  {
+    for (int i = 0; i < 3; ++i) {
+      Vertex_handle vi = face->vertex(i);
+      const Point& pi = vi->point();
+      if (pi == point)
+        return vi;
+    }
+    return Vertex_handle();
+  }
+
+  Edge find_nearest_edge(const Point& point, Face_handle face) const {
+    FT min_dist2 = (std::numeric_limits<FT>::max)();
+    Edge nearest(Face_handle(), 0);
+    for (int i = 0; i < 3; ++i) {
+      Edge edge(face, i);
+      Segment segment = get_segment(edge);
+      FT dist2 = compute_distance2(point, segment);
+      if (dist2 < min_dist2) {
+        min_dist2 = dist2;
+        nearest = edge;
+      }
+    }
+
+    if (nearest.first == Face_handle()) {
+      std::cout << "nearest edge not found" << std::endl;
+    }
+    return nearest;
+  }
+
+  void assign_sample_to_vertex(Sample_* sample, Vertex_handle vertex) const {
+    /*if (vertex->sample()) {
+      std::cout << "assign to vertex: vertex already has sample"
+          << std::endl;
+    }*/
+
+    sample->distance2() = FT(0);
+    sample->coordinate() = FT(0);
+    vertex->set_sample(sample);
+  }
+
+  void assign_sample_to_edge(Sample_* sample, const Edge& edge) const {
+    Segment segment = get_segment(edge);
+    const Point& query = sample->point();
+    sample->distance2() = compute_distance2(query, segment);
+    sample->coordinate() = compute_coordinate(query, segment);
+    edge.first->add_sample(edge.second, sample);
+  }
+
+  FT compute_distance2(const Point& query, const Segment& segment) const {
+    Line line = geom_traits().construct_line_2_object()(segment);
+    if (geom_traits().has_on_2_object()(line, query))
+      return FT(0);
+
+    Point proj = geom_traits().construct_projected_point_2_object()(line, query);
+    return geom_traits().compute_squared_distance_2_object()(query, proj);
+  }
+
+  FT compute_coordinate(const Point& q, const Segment& segment) const {
+    const Point& p0 = segment.source();
+    const Point& p1 = segment.target();
+    Vector p0p1 = geom_traits().construct_vector_2_object()(p0, p1);
+    Vector p0q  = geom_traits().construct_vector_2_object()(p0, q);
+    
+    FT t = geom_traits().compute_scalar_product_2_object()(p0q, p0p1)
+         / geom_traits().compute_scalar_product_2_object()(p0p1, p0p1);
+    return t; // [0,1]
+  }
+
+  // SIGNED DISTANCE //
+
+  // signed distance from line(a,b) to point t
+  FT signed_distance(Vertex_handle a, Vertex_handle b,
+      Vertex_handle t) const {
+    const Point& pa = a->point();
+    const Point& pb = b->point();
+    const Point& pt = t->point();
+    return compute_signed_distance(pa, pb, pt);
+  }
+
+  // signed distance from line(a,b) to point t
+  FT compute_signed_distance(
+    const Point& pa, const Point& pb, const Point& pt) const
+  {
+    if (pt == pa)
+      return FT(0);
+    if (pt == pb)
+      return FT(0);
+    if (pa == pb)
+      return CGAL::sqrt(geom_traits().compute_squared_distance_2_object()(pa, pt));
+
+    Vector vab = geom_traits().construct_vector_2_object()(pa, pb);
+    // Normalize vab
+    vab = geom_traits().construct_scaled_vector_2_object()(
+      vab,
+      FT(1) / CGAL::sqrt(geom_traits().compute_squared_length_2_object()(vab)));
+    Vector vab90 = geom_traits().construct_vector_2_object()(-vab.y(), vab.x());
+    Vector vat = geom_traits().construct_vector_2_object()(pa, pt);
+    return geom_traits().compute_scalar_product_2_object()(vat, vab90);
+  }
+
+  // signed distance from t to the intersection of line(a,b) and line(t,s)
+  FT signed_distance_from_intersection(Vertex_handle a, Vertex_handle b,
+      Vertex_handle t, Vertex_handle s) const {
+    const Point& pa = a->point();
+    const Point& pb = b->point();
+    const Point& pt = t->point();
+    const Point& ps = s->point();
+    return compute_signed_distance_from_intersection(pa, pb, pt, ps);
+  }
+
+  // signed distance from t to the intersection of line(a,b) and line(t,s)
+  FT compute_signed_distance_from_intersection(
+    const Point& pa, const Point& pb, const Point& pt, const Point& ps) const
+  {
+    FT Dabt = compute_signed_distance(pa, pb, pt);
+    if (Dabt == FT(0))
+      return FT(0);
+
+    Line lab = geom_traits().construct_line_2_object()(
+      pa, geom_traits().construct_vector_2_object()(pa, pb));
+    Line lts = geom_traits().construct_line_2_object()(
+      pt, geom_traits().construct_vector_2_object()(pt, ps));
+
+    FT Dqt = (std::numeric_limits<FT>::max)();
+    CGAL::Object result = CGAL::intersection(lab, lts);
+    const Point* iq = CGAL::object_cast<Point>(&result);
+    if (iq)
+      Dqt = CGAL::sqrt(geom_traits().compute_squared_distance_2_object()(*iq, pt));
+
+    if (Dabt < FT(0))
+      Dqt = -Dqt;
+    return Dqt;
+  }
+
+  bool is_triangle_ccw(Vertex_handle a, Vertex_handle b, Vertex_handle c) const
+  {
+    const Point& pa = a->point();
+    const Point& pb = b->point();
+    const Point& pc = c->point();
+    return compute_triangle_ccw(pa, pb, pc);
+  }
+
+  bool compute_triangle_ccw(
+    const Point& pa, const Point& pb, const Point& pc) const
+  {
+    FT dist = compute_signed_distance(pa, pb, pc);
+    return (dist > -EPS);
+  }
+
+  // COMBINATORIAL TESTS //
+
+  // (a,b) is cyclic if (a,b,c) and (a,c,b) exist
+  bool is_edge_cyclic(const Edge& edge) const {
+    Vertex_handle f = opposite_vertex(edge);
+    Vertex_handle b = opposite_vertex(twin_edge(edge));
+    return (f == b);
+  }
+
+  // b from (a,b) is cyclic if (a,b,c) and (b,a,c) exist
+  bool is_target_cyclic(const Edge& edge) const {
+    if (!is_edge_cyclic(edge))
+      return false;
+
+    Edge twin = twin_edge(edge);
+    Edge prev = prev_edge(twin);
+    Face_handle fp = prev.first->neighbor(prev.second);
+    Face_handle ft = twin.first->neighbor(twin.second);
+    return (fp == ft);
+  }
+
+  bool is_flippable(const Edge& edge) const {
+    Edge twin = twin_edge(edge);
+    if (Base::is_infinite(twin.first))
+      return false;
+    if (Base::is_infinite(edge.first))
+      return false;
+
+    Vertex_handle vs = source_vertex(edge);
+    Vertex_handle vt = target_vertex(edge);
+    Vertex_handle vf = opposite_vertex(edge);
+    Vertex_handle vb = opposite_vertex(twin);
+
+    return is_triangle_ccw(vs, vb, vf) && is_triangle_ccw(vt, vf, vb);
+  }
+
+  bool is_collapsible(const Edge& edge) const {
+    return check_link_test(edge) && check_kernel_test(edge);
+  }
+
+  bool check_link_test(const Edge& edge) const {
+    Vertex_handle s = source_vertex(edge);
+    Vertex_handle t = target_vertex(edge);
+
+    if (s == t)
+      return false;
+    typename Vertex_handle_set::const_iterator it;
+
+    Vertex_handle_set svertices;
+    get_vertices_from_vertex_link(s, svertices);
+
+    Vertex_handle_set tvertices;
+    get_vertices_from_vertex_link(t, tvertices);
+
+    // link(s) inter link(t)
+    Vertex_handle_set ivertices;
+    for (it = svertices.begin(); it != svertices.end(); ++it) {
+      Vertex_handle v = *it;
+      if (tvertices.find(v) != tvertices.end())
+        ivertices.insert(v);
+    }
+
+    Vertex_handle_set evertices;
+    get_vertices_from_edge_link(edge, evertices);
+
+    // link(edge) =? link(s) inter link(t)
+    if (evertices.size() != ivertices.size())
+      return false;
+
+    for (it = evertices.begin(); it != evertices.end(); ++it) {
+      Vertex_handle v = *it;
+      if (ivertices.find(v) == ivertices.end())
+        return false;
+    }
+    return true;
+  }
+
+  bool check_kernel_test(const Edge& edge) const {
+    Vertex_handle s = source_vertex(edge);
+    Vertex_handle t = target_vertex(edge);
+
+    Edge_vector hull;
+    get_edges_from_star_minus_link(s, hull);
+    return is_in_kernel(t->point(), hull.begin(), hull.end());
+  }
+
+  template<class Iterator> // value_type = Edge
+  bool is_in_kernel(const Point& query, Iterator begin, Iterator end) const {
+    for (Iterator it = begin; it != end; ++it) {
+      Edge edge = *it;
+      const Point& pa = source_vertex(edge)->point();
+      const Point& pb = target_vertex(edge)->point();
+      if (!compute_triangle_ccw(pa, pb, query))
+        return false;
+    }
+    return true;
+  }
+
+  // COLLAPSE //
+
+  // (s,a,b) + (s,b,c) -> (s,a,c) + (a,b,c)
+  // st = (source,target) from 'make_collapsible'
+  // return (a,c)
+  Edge flip(const Edge& sb, Edge& st, int /*verbose*/ = 0) {
+    Vertex_handle t = target_vertex(st);
+
+    Edge sc = twin_edge(prev_edge(sb));
+    Base::tds().flip(sb.first, sb.second);
+    Edge ac = prev_edge(twin_edge(sc));
+
+    Vertex_handle a = source_vertex(ac);
+    if (a == t)
+      st = prev_edge(ac);
+
+    return ac;
+  }
+
+  void collapse(const Edge& edge, int /*verbose*/ = 0) {
+    if (is_edge_cyclic(edge)) {
+      collapse_cyclic_edge(edge);
+      return;
+    }
+
+    Edge twin = twin_edge(edge);
+    Base::tds().join_vertices(twin);
+  }
+
+  // (a,b,c) + (c,b,a) + (a,c,i) + (c,a,j) ->
+  // (a,c,i) + (c,a,j)
+  void collapse_cyclic_edge(const Edge& bc, int verbose = 0) {
+    if (verbose > 0)
+      std::cout << "collapse_cyclic_edge ... ";
+
+    Edge cb = twin_edge(bc);
+    Face_handle abc = bc.first;
+    Face_handle cba = cb.first;
+
+    Vertex_handle b = source_vertex(bc);
+    Vertex_handle c = target_vertex(bc);
+    Vertex_handle a = opposite_vertex(bc);
+
+    Edge ac = twin_edge(next_edge(bc));
+    Edge ca = twin_edge(prev_edge(cb));
+
+    a->set_face(ac.first);
+    c->set_face(ca.first);
+    ac.first->set_neighbor(ac.second, ca.first);
+    ca.first->set_neighbor(ca.second, ac.first);
+
+    this->delete_face(abc);
+    this->delete_face(cba);
+    this->delete_vertex(b);
+
+    if (verbose > 0)
+      std::cout << "done" << std::endl;
+  }
+
+  void print_edge(Rec_edge_2 edge) const {
+    int i = ((edge).edge()).second;
+    Point a = ((edge).edge()).first->vertex((i+1)%3)->point();
+    Point b = ((edge).edge()).first->vertex((i+2)%3)->point();
+    std::cout <<"( " << (edge).priority()  <<  ") ( " << a << " , " << b << " )" << std::endl;
+  }
+
+  template <class Iterator> // value_type = Edge
+  bool make_collapsible(Edge& edge, Iterator begin, Iterator end, int verbose = 0)
+  {
+    Vertex_handle source = source_vertex(edge);
+    Vertex_handle target = target_vertex(edge);
+
+    MultiIndex multi_ind;
+    for (Iterator it = begin; it != end; ++it)
+    {
+      Edge ab = twin_edge(*it);
+      Vertex_handle a = source_vertex(ab);
+      Vertex_handle b = target_vertex(ab);
+      FT D = signed_distance_from_intersection(a, b, target, source);
+      if (D < FT(0)) {
+        multi_ind.insert(Rec_edge_2(ab, D));
+      }
+    }
+
+    int nb_flips = 0;
+    while (!multi_ind.empty())
+    {
+      Rec_edge_2 pedge = *(multi_ind.template get<1>()).begin();
+      FT Dbc = pedge.priority();
+      Edge bc = pedge.edge();
+      (multi_ind.template get<0>()).erase(pedge);
+
+      Edge sb = prev_edge(bc);
+      Edge ab = prev_edge(twin_edge(sb));
+      Edge sc = twin_edge(next_edge(bc));
+      Edge cd = next_edge(sc);
+
+      Vertex_handle a = source_vertex(ab);
+      Vertex_handle b = source_vertex(bc);
+      Vertex_handle c = target_vertex(bc);
+      Vertex_handle d = target_vertex(cd);
+
+      FT Dac =  -(std::numeric_limits<FT>::max)();
+      if (a != c && is_triangle_ccw(a, b, c))
+        Dac = signed_distance_from_intersection(a, c, target, source);
+
+      FT Dbd =  -(std::numeric_limits<FT>::max)();
+      if (b != d && is_triangle_ccw(b, c, d))
+        Dbd = signed_distance_from_intersection(b, d, target, source);
+
+      if (Dac ==  -(std::numeric_limits<FT>::max)() && Dbd ==
+          -(std::numeric_limits<FT>::max)())
+      {
+        std::cerr << "--- No flips available ---"  << std::endl;
+        return false;
+      }
+
+      if ((std::max)(Dac, Dbd) + EPS < Dbc)
+      {
+			/*
+        std::cerr.precision(10);
+        std::cerr << "--- Flip makes kernel worse ---" << std::endl;
+        std::cerr << Dac << " or " << Dbd << " vs " << Dbc << std::endl;
+        std::cerr << "a: " << a->point() << std::endl;
+        std::cerr << "b: " << b->point() << std::endl;
+        std::cerr << "c: " << c->point() << std::endl;
+        std::cerr << "d: " << d->point() << std::endl;
+        std::cerr << "t: " << target->point() << std::endl;
+        std::cerr << "diff = " << Dbc - (std::max)(Dac, Dbd) << std::endl;
+				*/
+        return false;
+      }
+
+      if (Dac > Dbd)
+      {
+        (multi_ind.template get<0>()).erase(Rec_edge_2(ab));
+
+        Edge ac = flip(sb, edge, verbose);
+        if (Dac < FT(0)) {
+          multi_ind.insert(Rec_edge_2(ac, Dac));
+        }
+      }
+      else
+      {
+        (multi_ind.template get<0>()).erase(Rec_edge_2(cd));
+        Edge bd = flip(sc, edge, verbose);
+        if (Dbd < FT(0)) {
+          multi_ind.insert(Rec_edge_2(bd, Dbd));
+        }
+      }
+      nb_flips++;
+    }
+
+    if (verbose > 0)
+      std::cerr  << "Nb flips: "  << nb_flips << std::endl;
+
+    return true;
+  }
+};
+
+} } //namespace CGAL
+
+#endif // CGAL_RECONSTRUCTION_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h
new file mode 100644
index 0000000..91cf9f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h
@@ -0,0 +1,134 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_RECONSTRUCTION_VERTEX_BASE_2_H_
+#define CGAL_RECONSTRUCTION_VERTEX_BASE_2_H_
+
+#include <CGAL/Triangulation_vertex_base_2.h>
+#include <CGAL/OTR_2/Sample.h>
+
+namespace CGAL {
+namespace OTR_2 {
+
+/// The Reconstruction_vertex_base_2 class is the default
+/// vertex class of the Reconstruction_triangulation_2 class.
+///
+/// - Each vertex stores a Sample as well as the corresponding relocated point.
+///
+/// @param Traits_  Geometric traits class
+/// @param Vb       Vertex base class, model of TriangulationVertexBase_2.
+template < class Traits_, class Vb = Triangulation_vertex_base_2<Traits_> >
+class Reconstruction_vertex_base_2 : public Vb
+{
+
+  /// \cond SKIP_IN_MANUAL
+
+public:
+  typedef Vb Base;
+  typedef typename Traits_::FT        FT;
+  typedef OTR_2::Sample<Traits_>       Sample_;
+  typedef typename Traits_::Point_2   Point;
+  typedef typename Base::Face_handle  Face_handle;
+
+  template < typename TDS2 >
+  struct Rebind_TDS {
+    typedef typename Base::template Rebind_TDS<TDS2>::Other Vb2;
+    typedef Reconstruction_vertex_base_2<Traits_,Vb2> Other;
+  };
+
+private:
+  int       m_id;
+  bool      m_pinned;
+  Sample_*  m_sample;
+  Point     m_relocated;
+  FT        m_relevance;
+
+
+public:
+  Reconstruction_vertex_base_2()
+  : Base(),
+    m_id(-1),
+    m_pinned(false),
+    m_sample(NULL),
+    m_relevance(0)
+{
+}
+
+  Reconstruction_vertex_base_2(const Point & p)
+  : Base(p),
+    m_id(-1),
+    m_pinned(false),
+    m_sample(NULL),
+    m_relevance(0)
+  {
+  }
+
+  Reconstruction_vertex_base_2(Face_handle f)
+  : Base(f),
+    m_id(-1),
+    m_pinned(false),
+    m_sample(NULL),
+    m_relevance(0)
+  {
+  }
+
+  Reconstruction_vertex_base_2(const Point & p, Face_handle f)
+  : Base(p, f),
+    m_id(-1),
+    m_pinned(false),
+    m_sample(NULL),
+    m_relevance(0)
+  {
+  }
+
+  ~Reconstruction_vertex_base_2() { }
+
+  int  id() const { return m_id; }
+  int& id() { return m_id; }
+
+  bool  pinned() const { return m_pinned; }
+  bool& pinned() { return m_pinned; }
+
+  FT relevance() const { return m_relevance; }
+  void set_relevance(FT relevance) { m_relevance = relevance; }
+
+  Sample_* sample() const { return m_sample; }
+  void set_sample(Sample_* sample) { m_sample = sample; }
+
+  const Point& relocated() const { return m_relocated; }
+  Point& relocated() { return m_relocated; }
+
+  bool  has_sample_assigned() const { return sample() != NULL; }
+};
+//---------------STRUCT LESS VERTEX_HANDLE---------------------
+template <class T>
+struct less_Vertex_handle
+{
+  bool operator() (const T& a, const T& b) const
+  {
+    return (a->id() < b->id());
+  }
+};
+
+
+/// \endcond
+
+} } //end namespaces
+
+#endif // CGAL_RECONSTRUCTION_VERTEX_BASE_2_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Sample.h b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Sample.h
new file mode 100644
index 0000000..65c780d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OTR_2/Sample.h
@@ -0,0 +1,146 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Clément Jamin
+
+#ifndef CGAL_OTR2_SAMPLE_H
+#define CGAL_OTR2_SAMPLE_H
+
+
+/// \cond SKIP_IN_MANUAL
+
+namespace CGAL {
+namespace OTR_2 {
+
+template <class Traits_>
+class Sample
+{
+public:
+  typedef typename Traits_::FT FT;
+  typedef typename Traits_::Point_2 Point;
+
+private:
+  Point m_point;
+  FT m_mass;
+
+  FT m_dist2_to_edge;
+  FT m_coordinate;
+
+  FT m_backup_dist2;
+  FT m_backup_coord;
+
+public:
+  Sample(const Point& point,
+      const FT mass = FT(1))
+  : m_point(point),
+    m_mass(mass),
+    m_dist2_to_edge(0),
+    m_coordinate(0),
+    m_backup_dist2(0),
+    m_backup_coord(0)
+  {
+  }
+
+  Sample(const Sample& sample)
+  : m_point(sample.point()),
+    m_mass(sample.mass()),
+    m_dist2_to_edge(0),
+    m_coordinate(0),
+    m_backup_dist2(0),
+    m_backup_coord(0)
+  {
+  }
+
+  ~Sample() { }
+
+  const Point& point() const { return m_point; }
+  Point& point() { return m_point; }
+
+  const FT& mass() const { return m_mass; }
+  FT& mass() { return m_mass; }
+
+  const FT& distance2() const { return m_dist2_to_edge; }
+  FT& distance2() { return m_dist2_to_edge; }
+
+  const FT& coordinate() const { return m_coordinate; }
+  FT& coordinate() { return m_coordinate; }
+
+  void backup()
+  {
+    m_backup_dist2 = m_dist2_to_edge;
+    m_backup_coord = m_coordinate;
+  }
+
+  void restore()
+  {
+    m_dist2_to_edge = m_backup_dist2;
+    m_coordinate = m_backup_coord;
+  }
+};
+
+template <class Sample_>
+class Sample_with_priority
+{
+public:
+  typedef typename Sample_::FT FT;
+
+private:
+  Sample_* m_sample;
+  FT m_priority;
+
+public:
+  Sample_with_priority(Sample_* sample, const FT priority = FT(0))
+  {
+    m_sample   = sample;
+    m_priority = priority;
+  }
+
+  Sample_with_priority(const Sample_with_priority& psample)
+  {
+    m_sample   = psample.sample();
+    m_priority = psample.priority();
+  }
+
+  ~Sample_with_priority() { }
+
+  Sample_with_priority& operator = (const Sample_with_priority& psample)
+  {
+    m_sample   = psample.sample();
+    m_priority = psample.priority();
+    return *this;
+  }
+
+  Sample_* sample() const { return m_sample; }
+
+  const FT priority() const { return m_priority; }
+};
+
+
+template <class T>
+struct greater_priority
+{
+  bool operator() (const T& a, const T& b) const
+  {
+    return ( a.priority() > b.priority() );
+  }
+};
+
+} } //end namespaces
+
+/// \endcond
+
+#endif // CGAL_OTR2_SAMPLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Object.h b/3rdparty/CGAL-4.8/include/CGAL/Object.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Object.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Object.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/bicgstab.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/bicgstab.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/bicgstab.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/bicgstab.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/blas.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/blas.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/blas.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/blas.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/conjugate_gradient.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/conjugate_gradient.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/conjugate_gradient.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/conjugate_gradient.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/full_vector.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/full_vector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/full_vector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/full_vector.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/OpenNL/linear_solver.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/linear_solver.h
new file mode 100644
index 0000000..9605851
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/linear_solver.h
@@ -0,0 +1,478 @@
+// Copyright (c) 2005-2008  Inria Loria (France).
+/*
+ * author:  Bruno Levy, INRIA, project ALICE
+ * website: http://www.loria.fr/~levy/software
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Scientific work that use this software can reference the website and
+ * the following publication:
+ *
+ * @INPROCEEDINGS {levy:NMDGP:05,
+ *    AUTHOR = Bruno Levy,
+ *    TITLE  = Numerical Methods for Digital Geometry Processing,
+ *    BOOKTITLE =Israel Korea Bi-National Conference,
+ *    YEAR=November 2005,
+ *    URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics
+ * }
+ *
+ *  Laurent Saboret 2005-2006: Changes for CGAL:
+ *      - Added OpenNL namespace
+ *      - DefaultLinearSolverTraits is now a model of the SparseLinearAlgebraTraits_d concept
+ *      - Added SymmetricLinearSolverTraits
+ *      - copied Jacobi preconditioner from Graphite 1.9 code
+ */
+
+
+#ifndef __OPENNL_LINEAR_SOLVER__
+#define __OPENNL_LINEAR_SOLVER__
+
+#include <CGAL/OpenNL/conjugate_gradient.h>
+#include <CGAL/OpenNL/bicgstab.h>
+#include <CGAL/OpenNL/preconditioner.h>
+#include <CGAL/OpenNL/sparse_matrix.h>
+#include <CGAL/OpenNL/full_vector.h>
+
+#include <vector>
+#include <iostream>
+#include <cstdlib>
+
+#include <CGAL/use.h>
+
+namespace OpenNL {
+
+
+
+// Class DefaultLinearSolverTraits
+// is a traits class for solving general sparse linear systems.
+// It uses BICGSTAB solver with Jacobi preconditioner.
+//
+// Concept: Model of the SparseLinearAlgebraTraits_d concept.
+
+template
+<
+    class COEFFTYPE,                        // type of matrix and vector coefficients
+    class MATRIX = SparseMatrix<COEFFTYPE>, // model of SparseLinearSolverTraits_d::Matrix
+    class VECTOR = FullVector<COEFFTYPE>    // model of SparseLinearSolverTraits_d::Vector
+>
+class DefaultLinearSolverTraits
+{
+// Public types
+public:
+    typedef COEFFTYPE                       CoeffType ;
+    typedef COEFFTYPE                       NT;
+    typedef MATRIX                          Matrix ;
+    typedef VECTOR                          Vector ;
+
+// Private types
+private:
+    typedef Jacobi_Preconditioner<NT>       Preconditioner ;
+    typedef Solver_preconditioned_BICGSTAB<Matrix, Preconditioner, Vector>
+                                            Preconditioned_solver ;
+    typedef Solver_BICGSTAB<Matrix, Vector> Solver ;
+
+// Public operations
+public:
+    // Default contructor, copy constructor, operator=() and destructor are fine
+
+    // Solve the sparse linear system "A*X = B"
+    // Return true on success. The solution is then (1/D) * X.
+    //
+    // Preconditions:
+    // - A.row_dimension()    == B.dimension()
+    // - A.column_dimension() == X.dimension()
+    bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
+    {
+        D = 1;              // OpenNL does not support homogeneous coordinates
+
+        // Solve using BICGSTAB solver with preconditioner
+        Preconditioned_solver preconditioned_solver ;
+        NT omega = 1.5;
+        Preconditioner C(A, omega);
+        X = B;
+        if (preconditioned_solver.solve(A, C, B, X))
+            return true;
+
+        // On error, solve using BICGSTAB solver without preconditioner
+#ifdef DEBUG_TRACE
+        std::cerr << "  Failure of BICGSTAB solver with Jacobi preconditioner. "
+                  << "Trying BICGSTAB." << std::endl;
+#endif
+        Solver solver ;
+        X = B;
+        return solver.solve(A, B, X) ;
+    }
+} ;
+
+// Class SymmetricLinearSolverTraits
+// is a traits class for solving symmetric positive definite sparse linear systems.
+// It uses Conjugate Gradient solver with Jacobi preconditioner.
+//
+// Concept: Model of the SparseLinearAlgebraTraits_d concept.
+
+template
+<
+    class COEFFTYPE,                        // type of matrix and vector coefficients
+    class MATRIX = SparseMatrix<COEFFTYPE>, // model of SparseLinearSolverTraits_d::Matrix
+    class VECTOR = FullVector<COEFFTYPE>    // model of SparseLinearSolverTraits_d::Vector
+>
+class SymmetricLinearSolverTraits
+{
+// Public types
+public:
+    typedef COEFFTYPE                       CoeffType ;
+    typedef COEFFTYPE                       NT;
+    typedef MATRIX                          Matrix ;
+    typedef VECTOR                          Vector ;
+
+// Private types
+private:
+    typedef Jacobi_Preconditioner<NT>       Preconditioner ;
+    typedef Solver_preconditioned_CG<Matrix, Preconditioner, Vector>
+                                            Preconditioned_solver ;
+    typedef Solver_CG<Matrix, Vector>       Solver ;
+
+// Public operations
+public:
+    // Default contructor, copy constructor, operator=() and destructor are fine
+
+    // Solve the sparse linear system "A*X = B"
+    // Return true on success. The solution is then (1/D) * X.
+    //
+    // Preconditions:
+    // - A.row_dimension()    == B.dimension()
+    // - A.column_dimension() == X.dimension()
+    bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
+    {
+        D = 1;              // OpenNL does not support homogeneous coordinates
+
+        // Solve using Conjugate Gradient solver with preconditioner
+        Preconditioned_solver preconditioned_solver ;
+        NT omega = 1.5;
+        Preconditioner C(A, omega);
+        X = B;
+        if (preconditioned_solver.solve(A, C, B, X))
+            return true;
+
+        // On error, solve using Conjugate Gradient solver without preconditioner
+#ifdef DEBUG_TRACE
+        std::cerr << "  Failure of Conjugate Gradient solver with Jacobi preconditioner. "
+                  << "Trying Conjugate Gradient." << std::endl;
+#endif
+        Solver solver ;
+        X = B;
+        return solver.solve(A, B, X) ;
+    }
+};
+
+
+/*
+ * Solves a linear system or minimizes a quadratic form.
+ *
+ * Requirements for its traits class: must be a model of SparseLinearSolverTraits_d concept
+ */
+template <class TRAITS>
+class LinearSolver
+{
+protected:
+    enum State {
+        INITIAL, IN_SYSTEM, IN_ROW, CONSTRUCTED, SOLVED
+    } ;
+
+public:
+    typedef TRAITS Traits ;
+    typedef typename Traits::Matrix Matrix ;
+    typedef typename Traits::Vector Vector ;
+    typedef typename Traits::NT CoeffType ;
+
+    class Variable {
+    public:
+        Variable() : x_(0), index_(-1), locked_(false) { }
+        double value() const { return x_; }
+        void set_value(double x_in) { x_ = x_in ; }
+        void lock()   { locked_ = true ; }
+        void unlock() { locked_ = false ; }
+        bool is_locked() const { return locked_ ; }
+        unsigned int index() const {
+            CGAL_assertion(index_ != -1) ;
+            return (unsigned int)(index_) ;
+        }
+        void set_index(unsigned int index_in) {
+            index_ = index_in ;
+        }
+    private:
+        CoeffType x_ ;
+        int index_ ;
+        bool locked_ ;
+    }  ;
+
+
+    LinearSolver(unsigned int nb_variables) {
+        state_ = INITIAL ;
+        least_squares_ = false ;
+        nb_variables_ = nb_variables ;
+        variable_ = new Variable[nb_variables] ;
+        A_ = NULL ;
+        x_ = NULL ;
+        b_ = NULL ;
+    }
+
+    ~LinearSolver() {
+        delete[] variable_ ;
+        delete A_ ;
+        delete x_ ;
+        delete b_ ;
+    }
+
+    // __________________ Parameters ________________________
+
+    void set_least_squares(bool x) { least_squares_ = x ; }
+
+    // __________________ Access ____________________________
+
+    int nb_variables() const { return nb_variables_ ; }
+
+    Variable& variable(unsigned int idx) {
+        CGAL_assertion(idx < nb_variables_) ;
+        return variable_[idx] ;
+    }
+
+    const Variable& variable(unsigned int idx) const {
+        CGAL_assertion(idx < nb_variables_) ;
+        return variable_[idx] ;
+    }
+
+    // _________________ Construction _______________________
+
+    void begin_system() {
+        current_row_ = 0 ;
+        transition(INITIAL, IN_SYSTEM) ;
+        // Enumerate free variables.
+        unsigned int index = 0 ;
+        for(int ii=0; ii < nb_variables() ; ii++) {
+            Variable& v = variable(ii) ;
+            if(!v.is_locked()) {
+                v.set_index(index) ;
+                index++ ;
+            }
+        }
+        unsigned int n = index ;
+        A_ = new Matrix(static_cast<int>(n)) ;
+        x_ = new Vector(n) ;
+        b_ = new Vector(n) ;
+        for(unsigned int i=0; i<n; i++) {
+            (*x_)[i] = 0 ;
+            (*b_)[i] = 0 ;
+        }
+        variables_to_vector() ;
+    }
+
+    void begin_row() {
+        transition(IN_SYSTEM, IN_ROW) ;
+        af_.clear() ;
+        if_.clear() ;
+        al_.clear() ;
+        xl_.clear() ;
+        bk_ = 0 ;
+    }
+
+    void set_right_hand_side(double b) {
+        check_state(IN_ROW) ;
+        bk_ = b ;
+    }
+
+    void add_coefficient(unsigned int iv, double a) {
+        check_state(IN_ROW) ;
+        Variable& v = variable(iv) ;
+        if(v.is_locked()) {
+            al_.push_back(a) ;
+            xl_.push_back(v.value()) ;
+        } else {
+            af_.push_back(a) ;
+            if_.push_back(v.index()) ;
+        }
+    }
+
+    void normalize_row(CoeffType weight = 1) {
+        check_state(IN_ROW) ;
+        CoeffType norm = 0.0 ;
+        unsigned int nf = af_.size() ;
+        for(unsigned int i=0; i<nf; i++) {
+            norm += af_[i] * af_[i] ;
+        }
+        unsigned int nl = al_.size() ;
+        for(unsigned int i=0; i<nl; i++) {
+            norm += al_[i] * al_[i] ;
+        }
+        norm = sqrt(norm) ;
+        CGAL_assertion( fabs(norm)>1e-40 );
+        scale_row(weight / norm) ;
+    }
+
+    void scale_row(CoeffType s) {
+        check_state(IN_ROW) ;
+        unsigned int nf = af_.size() ;
+         for(unsigned int i=0; i<nf; i++) {
+             af_[i] *= s ;
+         }
+         unsigned int nl = al_.size() ;
+         for(unsigned int i=0; i<nl; i++) {
+             al_[i] *= s ;
+         }
+         bk_ *= s ;
+    }
+
+    void end_row() {
+        if(least_squares_) {
+            std::size_t nf = af_.size() ;
+            std::size_t nl = al_.size() ;
+            for(std::size_t i=0; i<nf; i++) {
+                for(std::size_t j=0; j<nf; j++) {
+                    A_->add_coef(if_[i], if_[j], af_[i] * af_[j]) ;
+                }
+            }
+            CoeffType S = - bk_ ;
+            for(std::size_t j=0; j<nl; j++) {
+                S += al_[j] * xl_[j] ;
+            }
+            for(std::size_t i=0; i<nf; i++) {
+                (*b_)[if_[i]] -= af_[i] * S ;
+            }
+        } else {
+            std::size_t nf = af_.size() ;
+            std::size_t nl = al_.size() ;
+            for(std::size_t i=0; i<nf; i++) {
+                A_->add_coef(current_row_, if_[i], af_[i]) ;
+            }
+            (*b_)[current_row_] = bk_ ;
+            for(std::size_t i=0; i<nl; i++) {
+                (*b_)[current_row_] -= al_[i] * xl_[i] ;
+            }
+        }
+        current_row_++ ;
+        transition(IN_ROW, IN_SYSTEM) ;
+    }
+
+    void end_system() {
+        transition(IN_SYSTEM, CONSTRUCTED) ;
+    }
+
+    // ----------------------------- Solver -------------------------------
+
+    // Solves a linear system or minimizes a quadratic form.
+    // Return true on success.
+    // (modified for SparseLinearAlgebraTraits_d concept)
+    bool solve()
+    {
+        check_state(CONSTRUCTED) ;
+
+        // Solve the sparse linear system "A*X = B". On success, the solution is (1/D) * X.
+        Traits solver_traits;
+        CoeffType D;
+        bool success = solver_traits.linear_solver(*A_, *b_, *x_, D) ;
+        CGAL_assertion(D == 1.0);   // WARNING: this library does not support homogeneous coordinates!
+
+        vector_to_variables() ;
+
+        transition(CONSTRUCTED, SOLVED) ;
+
+        delete A_ ; A_ = NULL ;
+        delete b_ ; b_ = NULL ;
+        delete x_ ; x_ = NULL ;
+
+        return success;
+    }
+
+protected:
+
+    // ----------- Converting between user representation and the internal representation -----
+
+    void vector_to_variables() {
+        for(int ii=0; ii < nb_variables(); ii++) {
+            Variable& v = variable(ii) ;
+            if(!v.is_locked()) {
+                v.set_value( (*x_)[v.index()] ) ;
+            }
+        }
+    }
+
+    void variables_to_vector() {
+        for(int ii=0; ii < nb_variables(); ii++) {
+            Variable& v = variable(ii) ;
+            if(!v.is_locked()) {
+                (*x_)[v.index()] = v.value() ;
+            }
+        }
+    }
+
+    // ----------- Finite state automaton (checks that calling sequence is respected) ---------
+
+    std::string state_to_string(State s) {
+            switch(s) {
+            case INITIAL:
+                return "initial" ;
+            case IN_SYSTEM:
+                return "in system" ;
+            case IN_ROW:
+                return "in row" ;
+            case CONSTRUCTED:
+                return "constructed" ;
+            case SOLVED:
+                return "solved" ;
+            }
+            // Should not go there.
+            CGAL_error();
+            return "undefined" ;
+    }
+
+    void check_state(State s) {
+            CGAL_USE(s);
+            CGAL_assertion(state_ == s) ;
+    }
+
+    void transition(State from, State to) {
+            check_state(from) ;
+            state_ = to ;
+    }
+
+private:
+
+    // --------------- parameters --------------------------
+    bool least_squares_ ;
+
+    // --------------- user representation --------------
+    unsigned int nb_variables_ ;
+    Variable* variable_ ;
+
+    // --------------- construction -----------------------
+    State state_ ;
+    unsigned int current_row_ ;
+    std::vector<CoeffType> af_ ;
+    std::vector<unsigned int> if_ ;
+    std::vector<CoeffType> al_ ;
+    std::vector<CoeffType> xl_ ;
+    double bk_ ;
+
+    // --------------- internal representation ---------
+    Matrix* A_ ;
+    Vector* x_ ;
+    Vector* b_ ;
+
+} ;
+
+
+} // namespace OpenNL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/preconditioner.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/preconditioner.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/preconditioner.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/preconditioner.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/OpenNL/sparse_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/OpenNL/sparse_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/OpenNL/sparse_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/OpenNL/sparse_matrix.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Optimal_transportation_reconstruction_2.h b/3rdparty/CGAL-4.8/include/CGAL/Optimal_transportation_reconstruction_2.h
new file mode 100644
index 0000000..c20785f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Optimal_transportation_reconstruction_2.h
@@ -0,0 +1,1673 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando de Goes, Pierre Alliez, Ivo Vigan, Cl�ment Jamin
+
+#ifndef CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_2_H_
+#define CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_2_H_
+
+#include <CGAL/OTR_2/Reconstruction_triangulation_2.h>
+#include <CGAL/OTR_2/Reconstruction_edge_2.h>
+
+#include <CGAL/property_map.h>
+#include <CGAL/Real_timer.h>
+
+#include <iterator>
+#include <iostream>
+#include <vector>
+#include <list>
+#include <algorithm>
+#include <utility>      // std::pair
+
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/identity.hpp>
+#include <boost/property_map/property_map.hpp>
+
+namespace CGAL {
+
+
+/*!
+\ingroup PkgOptimalTransportationReconstruction2Classes
+
+This class provides a means to reconstruct a 1-dimensional shape from a set of 2D points with masses.
+The algorithm computes an initial 2D Delaunay triangulation from the input points, 
+and performs a simplification of the triangulation by performing half edge collapses, edge flips and vertex relocations.
+
+The edges are either processed in the order imposed by an priority queue, or
+in an order based on random selection of edge collapse operators.
+As the exhaustive priority queue guarantees a higher quality it is the default.
+The user can switch to the other method, for example for an initial
+simplification round, by calling `set_random_sample_size()`.
+
+By default edge flip operators are applied to ensure that every edge of the 
+triangulation are candidate to be collapsed, while preserving a valid embedding
+of the triangulation. This option can be disabled by calling
+\link set_use_flip() `set_use_flip(false)`\endlink to reduce the running times.
+
+By default the vertices are not relocated after each half edge collapse.
+This option can be changed by setting the number of vertex relocation steps
+performed between two edge collapse operators.
+
+The simplification is performed by calling either 
+\link run_until() `run_until(n)`\endlink or \link run() `run(steps)`\endlink.
+The former simplifies the triangulation until n points remain, while the latter
+stops after `steps` edge collapse operators have been performed.
+Furthermore, we can relocate the vertices by calling `relocate_all_points()`.
+
+\tparam Traits a model of the concept `OptimalTransportationReconstructionTraits_2`.
+
+\tparam PointPMap a model of `ReadablePropertyMap` with value type `Traits::Point_2`.
+        Defaults to <a href="http://www.boost.org/doc/libs/release/libs/property_map/doc/identity_property_map.html">`boost::typed_identity_property_map<Traits::Point_2>`</a> 
+        (for the case the input is points without mass).
+
+\tparam MassPMap a model of `ReadablePropertyMap` with value type `Traits::FT`
+        Defaults to <a href="http://www.boost.org/doc/libs/release/libs/property_map/doc/static_property_map.html">`boost::static_property_map<Traits::FT>`</a> 
+        (for the case the input is points without mass).
+
+ */
+template<
+  class Traits,
+  class PointPMap = boost::typed_identity_property_map <typename Traits::Point_2>,
+  class MassPMap  = boost::static_property_map <typename Traits::FT> >
+class Optimal_transportation_reconstruction_2
+{
+public:
+
+  /// \name Types
+  /// @{
+  /*!
+        Number type.
+   */
+  typedef typename Traits::FT FT;
+
+  /*!
+        Point type.
+   */
+  typedef typename Traits::Point_2 Point;
+
+  /*!
+        Segment type.
+  */
+  typedef typename Traits::Segment_2 Segment;
+
+  /// \cond SKIP_IN_MANUAL
+  /*!
+        Vector type.
+   */
+  typedef typename Traits::Vector_2 Vector;
+
+  typedef typename std::pair<Point, FT> PointMassPair;
+  typedef typename std::vector<PointMassPair> PointMassList;
+
+
+  /*!
+    The Output simplex.
+   */
+  typedef OTR_2::Reconstruction_triangulation_2<Traits>  Triangulation;
+
+  typedef typename Triangulation::Vertex                Vertex;
+  typedef typename Triangulation::Vertex_handle         Vertex_handle;
+  typedef typename Triangulation::Vertex_iterator       Vertex_iterator;
+  typedef typename Triangulation::Vertex_circulator     Vertex_circulator;
+  typedef typename Triangulation::Finite_vertices_iterator
+                                                        Finite_vertices_iterator;
+
+  typedef typename Triangulation::Edge                  Edge;
+  typedef typename Triangulation::Edge_circulator       Edge_circulator;
+  typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;
+
+  typedef typename Triangulation::Face_handle           Face_handle;
+  typedef typename Triangulation::Face_circulator       Face_circulator;
+  typedef typename Triangulation::Finite_faces_iterator Finite_faces_iterator;
+
+  typedef typename Triangulation::Vertex_handle_map     Vertex_handle_map;
+  typedef typename Triangulation::Face_handle_map       Face_handle_map;
+
+  typedef typename Triangulation::Vertex_handle_set     Vertex_handle_set;
+  typedef typename Triangulation::Edge_set              Edge_set;
+
+  typedef typename Triangulation::Edge_vector           Edge_vector;
+  typedef std::list<Edge>                               Edge_list;
+
+  typedef typename Triangulation::Cost_                 Cost_;
+  typedef typename Triangulation::Sample_               Sample_;
+  typedef typename Triangulation::Sample_vector         Sample_vector;
+  typedef typename Triangulation::Sample_vector_const_iterator
+                                                        Sample_vector_const_iterator;
+
+  typedef typename Triangulation::PSample               PSample;
+  typedef typename Triangulation::SQueue                SQueue;
+
+  typedef typename Triangulation::Rec_edge_2            Rec_edge_2;
+
+  typedef typename Triangulation::MultiIndex            MultiIndex;
+
+  /// @}
+
+protected:
+  Triangulation m_dt;
+  Traits const& m_traits;
+  MultiIndex m_mindex;
+  int m_ignore;
+  int m_verbose;
+  std::size_t m_mchoice;  // # Edges
+  bool m_use_flip;
+  FT m_alpha; // [0, 1]
+  FT m_ghost; // ghost vs solid
+  unsigned int m_relocation; // # relocations
+
+  // bbox
+  FT m_bbox_x;
+  FT m_bbox_y;
+  FT m_bbox_size;
+
+  PointPMap point_pmap;
+  MassPMap  mass_pmap;
+
+  /// \endcond
+
+public:
+
+  /// \name Initialization
+  /// @{
+
+  /*!
+  Constructor of the optimal transportation reconstruction class. 
+  It builds an initial simplicial complex 
+  for a given range of point-mass pairs.
+
+  \tparam InputRange is a model of `Range` with forward iterators, 
+          providing input points and point masses through the 
+          `PointPMap` and `MassPMap` property maps.
+
+  \param input_range  Range of input data.
+  \param point_map    A `ReadablePropertyMap` used to access the input points.
+  \param mass_map     A `ReadablePropertyMap` used to access the input 
+                      points' masses.
+  \param sample_size  If `sample_size != 0`, the size of the random sample 
+                      which replaces the exhaustive priority queue.
+  \param use_flip     If `true` the edge flipping procedure is used to ensure 
+                      that every edge can be made collapsible.
+  \param relocation   The number of point relocations that are performed 
+                      between two edge collapses.
+  \param verbose      Controls how much console output is produced by 
+                      the algorithm. The values are 0, 1, or > 1.
+  \param traits       The traits class.
+   */
+  template <class InputRange>
+  Optimal_transportation_reconstruction_2(
+    const InputRange& input_range,
+    PointPMap point_map = PointPMap(),
+    MassPMap  mass_map = MassPMap(1),
+    std::size_t sample_size = 0,
+    bool use_flip = true,
+    unsigned int relocation = 2,
+    int verbose = 0,
+    Traits traits = Traits())
+  : m_dt(traits),
+    m_traits(m_dt.geom_traits()),
+    m_ignore(0), 
+    m_verbose(verbose),
+    m_mchoice(sample_size),
+    m_use_flip(use_flip),
+    m_alpha(0.5),
+    m_ghost(1.0),
+    m_relocation(relocation),
+    m_bbox_x(0.0),
+    m_bbox_y(0.0),
+    m_bbox_size(1.0),
+    point_pmap(point_map),
+    mass_pmap(mass_map)
+  {
+    initialize(input_range.begin(), input_range.end());
+  }
+
+  /// @}
+
+  /// \name Settting Parameters
+  /// @{
+  /*!
+          If `sample_size == 0`, the simplification is performed using an exhaustive priority queue.
+          If `sample_size` is stricly positive the simplification is performed using a
+          multiple choice approach, ie, a best-choice selection in a random sample of 
+          edge collapse operators, of size `sample_size`. A typical value for the sample
+          size is 15, but this value must be enlarged when targeting a very coarse simplification.
+          \param sample_size If `sample_size != 0`, the size of the random sample replaces the priority queue.
+   */
+  void set_random_sample_size(std::size_t sample_size) {
+    m_mchoice = sample_size;
+  }
+
+  /*!
+        Determines how much console output the algorithm generates.
+        If set to a value larger than 0
+        details about the reconstruction process are written to `std::cerr`.
+
+        \param verbose The verbosity level.
+   */
+  void set_verbose(int verbose) {
+    m_verbose = verbose;
+  }
+
+
+  
+
+  /*!
+        The use_flip parameter determines whether the edge flipping procedure
+        is used for the half-edge collapse. 
+   */
+  void set_use_flip(const bool use_flip) {
+    m_use_flip = use_flip;
+  }
+
+
+  /*!
+        Sets the number of vertex relocations
+        that are performed between two edge collapses.
+   */
+  void set_relocation(unsigned int relocation) {
+    m_relocation = relocation;
+  }
+
+  /// \cond SKIP_IN_MANUAL
+  unsigned int relocation() const {
+    return m_relocation;
+  }
+  /// \endcond
+
+
+  /*!
+  \param relevance The relevance threshold used for filtering the edges.
+  An edge is relevant from the approximation point of view
+  if it is long, covers a large mass (or equivalently the
+  number of points when all masses are equal), and has a
+  small transport cost. This notion is defined as 
+  \f$ m(e) * |e|^2 / cost(e) \f$, where \f$ m(e) \f$ 
+  denotes the mass of the points approximated by the edge,
+  \f$ |e| \f$ denotes the edge length and \f$ cost(e) \f$
+  its approximation error.
+  As the cost is defined by mass time squared distance the
+  relevance is unitless.
+
+  The default value is 0, so that all edges receiving some mass
+  are considered relevant.
+  Setting a large relevance value is used to get robustness to a
+  large amount of outliers.
+   */
+  void set_relevance(const FT relevance) {
+    m_ghost = relevance;
+    m_dt.ghost_factor() = m_ghost;
+  }
+
+
+  /// \cond SKIP_IN_MANUAL
+  FT ghost() {
+    return m_ghost;
+  }
+
+  /// @}
+
+  /// \cond SKIP_IN_MANUAL
+
+  Optimal_transportation_reconstruction_2()
+  : m_traits(m_dt.geom_traits())
+  {
+    initialize_parameters();
+  }
+
+
+  ~Optimal_transportation_reconstruction_2() {
+    clear();
+  }
+
+  void initialize_parameters() {
+    m_verbose = 0;
+    m_mchoice = 0;
+    m_use_flip = true;
+    m_alpha = FT(0.5);
+    m_ghost = FT(1);
+    m_relocation = 0;
+
+    m_bbox_x = FT(0);
+    m_bbox_y = FT(0);
+    m_bbox_size = FT(1);
+
+    m_ignore = 0;
+  }
+
+  //Function if one wants to create a Optimal_transportation_reconstruction_2
+  //without yet specifying the input in the constructor.
+  template <class InputIterator>
+  void initialize(
+    InputIterator start_itr,
+    InputIterator beyond_itr,
+    PointPMap point_map,
+    MassPMap  mass_map)
+  {
+    point_pmap = point_map;
+    mass_pmap  = mass_map;
+
+    initialize(start_itr, beyond_itr);
+  }
+
+
+  template <class InputIterator>
+  void initialize(InputIterator start, InputIterator beyond) {
+
+    clear();
+    insert_loose_bbox(m_bbox_x, m_bbox_y, 2 * m_bbox_size);
+    init(start, beyond);
+
+    std::vector<Sample_*> m_samples;
+    for (InputIterator it = start; it != beyond; it++) {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      Point point = get(point_pmap, it);
+      FT    mass  = get( mass_pmap, it);
+#else
+      Point point = get(point_pmap, *it);
+      FT    mass  = get( mass_pmap, *it);
+#endif
+      Sample_* s = new Sample_(point, mass);
+      m_samples.push_back(s);
+    }
+    assign_samples(m_samples.begin(), m_samples.end());
+  }
+
+
+  template <class Vector>
+  Vector random_vec(const FT scale) const
+  {
+    FT dx = -scale + (FT(rand()) / FT(RAND_MAX)) * 2* scale;
+    FT dy = -scale + (FT(rand()) / FT(RAND_MAX)) * 2* scale;
+    return m_traits.construct_vector_2_object()(dx, dy);
+  }
+
+  void clear() {
+    Sample_vector samples;
+    m_dt.collect_all_samples(samples);
+    // Deallocate samples
+    for (Sample_vector_const_iterator s_it = samples.begin();
+        s_it != samples.end(); ++s_it)
+    {
+      delete *s_it;
+    }
+
+    m_dt.clear();
+    m_mindex.clear();
+  }
+
+
+  // INIT //
+  void insert_loose_bbox(const FT x, const FT y, const FT size) {
+    CGAL::Real_timer timer;
+    std::cerr << "insert loose bbox" << "...";
+
+    timer.start();
+    int nb = static_cast<int>(m_dt.number_of_vertices());
+    insert_point(m_traits.construct_point_2_object()(x - size, y - size), true, nb++);
+    insert_point(m_traits.construct_point_2_object()(x - size, y + size), true, nb++);
+    insert_point(m_traits.construct_point_2_object()(x + size, y + size), true, nb++);
+    insert_point(m_traits.construct_point_2_object()(x + size, y - size), true, nb++);
+
+    std::cerr << "done" << " (" << nb << " vertices, "
+      << timer.time() << " s)" << std::endl;
+  }
+
+  template<class Iterator>  // value_type = Point*
+  void init(Iterator begin, Iterator beyond) {
+    CGAL::Real_timer timer;
+    std::cerr << "init" << "...";
+
+    timer.start();
+    int nb = static_cast<int>(m_dt.number_of_vertices());
+    m_dt.infinite_vertex()->pinned() = true;
+    for (Iterator it = begin; it != beyond; it++) {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      Point point = get(point_pmap, it);
+#else
+      Point point = get(point_pmap, *it);
+#endif
+      insert_point(point, false, nb++);
+    }
+
+    std::cerr << "done" << " (" << nb << " vertices, "
+      << timer.time() << " s)"
+      << std::endl;
+  }
+
+  Vertex_handle insert_point(
+    const Point& point, const bool pinned, const int id) 
+  {
+    Vertex_handle v = m_dt.insert(point);
+    v->pinned() = pinned;
+    v->id() = id;
+    return v;
+  }
+
+  // ASSIGNMENT //
+
+  void cleanup_assignments() {
+    m_dt.cleanup_assignments();
+  }
+
+  template<class Iterator>  // value_type = Sample_*
+  void assign_samples(Iterator begin, Iterator end) {
+    CGAL::Real_timer timer;
+    std::cerr << "assign samples" << "...";
+
+    timer.start();
+    m_dt.assign_samples(begin, end);
+    m_dt.reset_all_costs();
+
+    std::cerr << "done" << " (" << timer.time() << " s)" << std::endl;
+  }
+
+  void reassign_samples() {
+    Sample_vector samples;
+    m_dt.collect_all_samples(samples);
+    m_dt.cleanup_assignments();
+    m_dt.assign_samples(samples.begin(), samples.end());
+    m_dt.reset_all_costs();
+  }
+
+  void reassign_samples_around_vertex(Vertex_handle vertex) {
+    Sample_vector samples;
+    m_dt.collect_samples_from_vertex(vertex, samples, true);
+    m_dt.assign_samples(samples.begin(), samples.end());
+
+    Edge_vector hull;
+    m_dt.get_edges_from_star_minus_link(vertex, hull, true);
+    update_cost(hull.begin(), hull.end());
+  }
+
+
+  bool do_collapse(Edge edge) {
+    Vertex_handle s = m_dt.source_vertex(edge);
+    Vertex_handle t = m_dt.target_vertex(edge);
+
+    if (m_verbose > 0) {
+      std::cerr << std::endl << "do collapse " << "("
+          << s->id() << "->" << t->id() << ") ... " << std::endl;
+    }
+
+    Sample_vector samples;
+    m_dt.collect_samples_from_vertex(s, samples, true);
+
+    Edge_vector hull;
+    m_dt.get_edges_from_star_minus_link(s, hull, true);
+
+    if (m_mchoice == 0)
+      remove_stencil_from_pqueue(hull.begin(), hull.end());
+
+    if (m_use_flip)
+      m_dt.make_collapsible(edge, hull.begin(), hull.end(), m_verbose);
+
+    // debug test
+    bool ok = m_dt.check_kernel_test(edge);
+    if (!ok) {
+      std::cerr << "do_collapse: kernel test failed: " << std::endl;
+      return false;
+    }
+    //
+
+    m_dt.collapse(edge, m_verbose);
+
+    m_dt.assign_samples(samples.begin(), samples.end());
+
+    update_cost(hull.begin(), hull.end());
+
+    if (m_mchoice == 0)
+      push_stencil_to_pqueue(hull.begin(), hull.end());
+
+    for (unsigned int i = 0; i < m_relocation; ++i) {
+      relocate_one_ring(hull.begin(), hull.end());
+    }
+
+    if (m_verbose > 0) {
+      std::cerr << "done" << std::endl;
+    }
+
+    return true;
+  }
+
+  bool simulate_collapse(const Edge& edge, Cost_& cost) {
+    bool ok;
+    Vertex_handle s = m_dt.source_vertex(edge);
+    Vertex_handle t = m_dt.target_vertex(edge);
+
+    if (m_verbose > 1) {
+      std::cerr << "simulate collapse " << "("
+        << s->id() << "->" << t->id() << ") ... " << std::endl;
+    }
+
+    Triangulation copy;
+    Edge copy_edge = copy_star(edge, copy);
+    Vertex_handle copy_source = copy.source_vertex(copy_edge);
+
+    if (m_use_flip) {
+      Edge_vector copy_hull;
+      copy.get_edges_from_star_minus_link(copy_source, copy_hull, true);
+      ok = copy.make_collapsible(copy_edge, copy_hull.begin(),
+          copy_hull.end(), m_verbose);
+      if (!ok) {
+        // std::cerr << "simulation: failed (make collapsible)" << std::endl;
+        return false;
+      }
+    }
+
+    ok = copy.check_kernel_test(copy_edge);
+    if (!ok) {
+      std::cerr << "simulation: failed (kernel test)" << std::endl;
+      return false;
+    }
+
+    copy.collapse(copy_edge, m_verbose);
+
+    Sample_vector samples;
+    m_dt.collect_samples_from_vertex(s, samples, false);
+
+    backup_samples(samples.begin(), samples.end());
+    copy.assign_samples_brute_force(samples.begin(), samples.end());
+    copy.reset_all_costs();
+    cost = copy.compute_total_cost();
+    restore_samples(samples.begin(), samples.end());
+
+    if (m_verbose > 1) {
+      std::cerr << "done" << std::endl;
+    }
+
+    return true;
+  }
+
+  template<class Iterator> // value_type = Sample_*
+  void backup_samples(Iterator begin, Iterator end) const {
+    for (Iterator it = begin; it != end; ++it) {
+      Sample_* sample = *it;
+      sample->backup();
+    }
+  }
+
+  template<class Iterator> // value_type = Sample_*
+  void restore_samples(Iterator begin, Iterator end) const {
+    for (Iterator it = begin; it != end; ++it) {
+      Sample_* sample = *it;
+      sample->restore();
+    }
+  }
+
+  // PEDGE //
+
+  bool decimate() {
+    bool ok;
+    Rec_edge_2 pedge;
+    ok = pick_edge(m_mchoice, pedge);
+    if (!ok)
+      return false;
+
+    ok = do_collapse(pedge.edge());
+    if (!ok)
+      return false;
+    return true;
+  }
+
+  bool create_pedge(const Edge& edge, Rec_edge_2& pedge) {
+    Cost_ after_cost;
+    bool ok = simulate_collapse(edge, after_cost);
+    if (!ok)
+      return false;
+
+    Vertex_handle source = m_dt.source_vertex(edge);
+    Cost_ before_cost = m_dt.compute_cost_around_vertex(source);
+
+    FT before = before_cost.finalize(m_alpha);
+    FT after = after_cost.finalize(m_alpha);
+    pedge = Rec_edge_2(edge, before, after);
+    return true;
+  }
+
+
+  // COST //
+
+  void init_cost() {
+    m_dt.reset_all_costs();
+  }
+
+  template<class Iterator> // value_type = Edge
+  void update_cost(Iterator begin, Iterator end) {
+    Edge_vector edges;
+    collect_cost_stencil(m_dt, begin, end, edges);
+
+    typename Edge_vector::iterator ei;
+    for (ei = edges.begin(); ei != edges.end(); ++ei) {
+      Edge edge = *ei;
+      m_dt.update_cost(edge);
+    }
+  }
+
+  template<class Iterator> // value_type = Edge
+  void collect_cost_stencil(
+    const Triangulation& mesh, Iterator begin, Iterator end, 
+    Edge_vector& edges) const
+  {
+    Edge_set done;
+    Edge_list fifo;
+    for (Iterator it = begin; it != end; ++it) {
+      Edge edge = *it;
+      fifo.push_back(edge);
+      done.insert(edge);
+    }
+
+    while (!fifo.empty()) {
+      Edge edge = fifo.front();
+      fifo.pop_front();
+
+      edge = mesh.twin_edge(edge);
+      edges.push_back(edge);
+
+      Edge next = mesh.next_edge(edge);
+      if (done.insert(next).second)
+        fifo.push_back(next);
+
+      Edge prev = mesh.prev_edge(edge);
+      if (done.insert(prev).second)
+        fifo.push_back(prev);
+    }
+  }
+
+  // PQUEUE (MCHOICE or EXHAUSTIVE) //
+
+  bool pick_edge(std::size_t nb, Rec_edge_2& best_pedge) {
+    if (m_dt.number_of_faces() < 2)
+      return false;
+
+    std::size_t ne = 2 * m_dt.tds().number_of_edges();
+    if (nb > ne)
+      nb = ne;
+
+    bool ok;
+    if (nb == 0) {
+      ok = pick_edge_from_pqueue(best_pedge);
+      return ok;
+    }
+    m_mindex.clear();
+
+    if (nb == ne) {
+      ok = pick_edge_brute_force(best_pedge);
+      return ok;
+    }
+
+    ok = pick_edge_randomly(nb, best_pedge);
+    return ok;
+  }
+
+  bool pick_edge_from_pqueue(Rec_edge_2& best_pedge) {
+    if (m_mindex.empty())
+      populate_pqueue();
+    if (m_mindex.empty())
+      return false;
+    best_pedge = *(m_mindex.template get<1>()).begin();
+    (m_mindex.template get<0>()).erase(best_pedge);
+    return true;
+  }
+
+  bool pick_edge_brute_force(Rec_edge_2& best_pedge) {
+    MultiIndex mindex;
+    Finite_edges_iterator ei;
+    for (ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end();
+        ++ei) {
+      Edge edge = *ei;
+      push_to_mindex(edge, mindex);
+
+      edge = m_dt.twin_edge(edge);
+      push_to_mindex(edge, mindex);
+    }
+    if (mindex.empty())
+      return false;
+    best_pedge = *(mindex.template get<1>()).begin();
+    return true;
+  }
+
+  bool pick_edge_randomly(std::size_t nb, Rec_edge_2& best_pedge) {
+    MultiIndex mindex;
+    for (std::size_t i = 0; i < nb; ++i) {
+      Rec_edge_2 pedge;
+      if (random_pedge(pedge))
+        mindex.insert(pedge);
+    }
+    if (mindex.empty())
+      return false;
+    best_pedge = *(mindex.template get<1>()).begin();
+    return true;
+  }
+
+  void populate_pqueue() {
+    Finite_edges_iterator ei;
+    for (ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end();
+        ++ei) {
+      Edge edge = *ei;
+      push_to_mindex(edge, m_mindex);
+
+      edge = m_dt.twin_edge(edge);
+      push_to_mindex(edge, m_mindex);
+    }
+  }
+
+
+  bool push_to_mindex(const Edge& edge, MultiIndex& mindex) {
+    if (m_dt.is_pinned(edge))
+      return false;
+    if (m_dt.is_target_cyclic(edge))
+      return false;
+
+    Rec_edge_2 pedge;
+    bool ok = create_pedge(edge, pedge);
+    if (!ok)
+      return false;
+    mindex.insert(pedge);
+    return true;
+  }
+
+
+
+  bool random_pedge(Rec_edge_2& pedge) {
+    for (unsigned i = 0; i < 10; ++i) {
+      Edge edge = m_dt.random_finite_edge();
+      if (m_dt.is_pinned(edge))
+        continue;
+      if (m_dt.is_target_cyclic(edge))
+        continue;
+      bool ok = create_pedge(edge, pedge);
+      if (ok)
+        return true;
+    }
+    return false;
+  }
+
+  template<class Iterator> // value_type = Edge
+  void remove_stencil_from_pqueue(Iterator begin, Iterator end) 
+  {
+    if (m_mindex.empty())
+      return;
+
+    Edge_vector edges;
+    collect_pqueue_stencil(m_dt, begin, end, edges);
+
+    typename Edge_vector::const_iterator ei;
+    for (ei = edges.begin(); ei != edges.end(); ++ei) {
+      Edge edge = *ei;
+      (m_mindex.template get<0>()).erase(Rec_edge_2(edge));
+    }
+  }
+
+  template<class Iterator> // value_type = Edge
+  void push_stencil_to_pqueue(Iterator begin, Iterator end) {
+    Edge_vector edges;
+    collect_pqueue_stencil(m_dt, begin, end, edges);
+
+    typename Edge_vector::const_iterator ei;
+    for (ei = edges.begin(); ei != edges.end(); ++ei) {
+      Edge edge = *ei;
+      push_to_mindex(edge, m_mindex);
+    }
+  }
+
+  template<class Iterator> // value_type = Edge
+  void collect_pqueue_stencil(
+    const Triangulation& mesh, Iterator begin, Iterator end, 
+    Edge_vector& edges) const
+  {
+    Vertex_handle_set vertex_set;
+    for (Iterator it = begin; it != end; ++it) {
+      Edge edge = *it;
+      Edge twin = mesh.twin_edge(edge);
+
+      Vertex_handle s = mesh.source_vertex(edge);
+      if (!s->pinned())
+        vertex_set.insert(s);
+
+      Vertex_handle t = mesh.target_vertex(edge);
+      if (!t->pinned())
+        vertex_set.insert(t);
+
+      Vertex_handle f = mesh.opposite_vertex(edge);
+      if (!f->pinned())
+        vertex_set.insert(f);
+
+      Vertex_handle b = mesh.opposite_vertex(twin);
+      if (!b->pinned())
+        vertex_set.insert(b);
+    }
+
+    typename Vertex_handle_set::const_iterator vi;
+    for (vi = vertex_set.begin(); vi != vertex_set.end(); ++vi) {
+      Vertex_handle v = *vi;
+      Edge_circulator ecirc = mesh.incident_edges(v);
+      Edge_circulator eend = ecirc;
+      CGAL_For_all(ecirc, eend)
+      {
+        Edge edge = *ecirc;
+        if (mesh.source_vertex(edge) != v)
+          edge = mesh.twin_edge(edge);
+        edges.push_back(edge);
+      }
+    }
+  }
+
+  // COPY STAR //
+
+  // edge must not be pinned or have cyclic target
+  Edge copy_star(const Edge& edge, Triangulation& copy) {
+    copy.tds().set_dimension(2);
+    copy.infinite_vertex()->pinned() = true;
+
+    // copy vertices
+    Vertex_handle_map cvmap;
+
+    Vertex_handle s = m_dt.source_vertex(edge);
+    Vertex_handle cs = copy.tds().create_vertex();
+    cvmap[s] = copy_vertex(s, cs);
+
+    Vertex_circulator vcirc = m_dt.incident_vertices(s);
+    Vertex_circulator vend = vcirc;
+    CGAL_For_all(vcirc, vend)
+    {
+      Vertex_handle v = vcirc;
+      if (cvmap.find(v) == cvmap.end()) {
+        Vertex_handle cv = copy.tds().create_vertex();
+        cvmap[v] = copy_vertex(v, cv);
+      }
+    }
+
+    // copy faces
+    Face_handle_map cfmap;
+    Face_circulator fcirc = m_dt.incident_faces(s);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle f = fcirc;
+      Face_handle cf = copy.tds().create_face();
+      cfmap[f] = copy_face(f, cf, cvmap);
+    }
+
+    // set neighbors
+    fcirc = m_dt.incident_faces(s);
+    fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle f = fcirc;
+      copy_neighbors(f, s, cvmap, cfmap);
+    }
+
+    // make copy homeomorphic to S^2
+    close_copy_mesh(cs, copy);
+
+    // copy samples surrounding star
+    copy_samples(s, cs, cfmap, copy);
+
+    // get copy of edge
+    Edge copy_edge = get_copy_edge(edge, cvmap, cfmap);
+    return copy_edge;
+  }
+
+  Vertex_handle copy_vertex(Vertex_handle v0, Vertex_handle v1) const {
+    v1->id() = v0->id();
+    v1->set_point(v0->point());
+    v1->pinned() = v0->pinned();
+    v1->set_sample(v0->sample());
+    return v1;
+  }
+
+  Face_handle copy_face(
+    Face_handle f0, Face_handle f1, Vertex_handle_map& vmap) const 
+  {
+    for (unsigned i = 0; i < 3; ++i) {
+      Vertex_handle v0i = f0->vertex(i);
+      Vertex_handle v1i = vmap[v0i];
+      f1->set_vertex(i, v1i);
+      v1i->set_face(f1);
+    }
+    return f1;
+  }
+
+  void copy_neighbors(
+    Face_handle f, Vertex_handle v, Vertex_handle_map& vmap,
+    Face_handle_map& fmap) const
+  {
+    int i = f->index(v);
+    Face_handle cf = fmap[f];
+    Vertex_handle cv = vmap[v];
+
+    if (fmap.find(f->neighbor(i)) != fmap.end()) {
+      Face_handle fi = f->neighbor(i);
+      Face_handle cfi = fmap[fi];
+      cf->set_neighbor(i, cfi);
+    }
+
+    for (unsigned j = 0; j < 2; ++j) {
+      i = (i + 1) % 3;
+      Face_handle fi = f->neighbor(i);
+      Face_handle cfi = fmap[fi];
+      cf->set_neighbor(i, cfi);
+    }
+  }
+
+  void close_copy_mesh(Vertex_handle vertex, Triangulation& copy) const {
+    std::vector<Face_handle> outer_faces;
+
+    Face_circulator fcirc = copy.incident_faces(vertex);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle face = fcirc;
+      int i = face->index(vertex);
+
+      if (face->neighbor(i) != Face_handle())
+        continue;
+
+      Vertex_handle v1 = face->vertex((i + 1) % 3);
+      Vertex_handle v2 = face->vertex((i + 2) % 3);
+
+      Face_handle outer = copy.tds().create_face();
+      outer->set_vertex(0, copy.infinite_vertex());
+      outer->set_vertex(1, v2);
+      outer->set_vertex(2, v1);
+
+      face->set_neighbor(i, outer);
+      outer->set_neighbor(0, face);
+
+      outer_faces.push_back(outer);
+    }
+
+    for (unsigned i = 0; i < outer_faces.size(); ++i) {
+      unsigned j = (i + 1) % outer_faces.size();
+      outer_faces[i]->set_neighbor(2, outer_faces[j]);
+      outer_faces[j]->set_neighbor(1, outer_faces[i]);
+    }
+
+    if (!outer_faces.empty())
+      copy.infinite_vertex()->set_face(outer_faces[0]);
+  }
+
+  void copy_samples(
+    Vertex_handle vertex, Vertex_handle copy_vertex,
+    Face_handle_map& fmap, Triangulation& copy) const
+  {
+    Face_circulator fcirc = m_dt.incident_faces(vertex);
+    Face_circulator fend = fcirc;
+    CGAL_For_all(fcirc, fend)
+    {
+      Face_handle face = fcirc;
+      int index = face->index(vertex);
+      Edge twin = m_dt.twin_edge(Edge(face, index));
+
+      Face_handle copy_face = fmap[face];
+      index = copy_face->index(copy_vertex);
+      Edge copy_twin = copy.twin_edge(Edge(copy_face, index));
+
+      Sample_vector samples;
+      m_dt.collect_samples_from_edge(twin, samples);
+      copy_twin.first->samples(copy_twin.second) = samples;
+    }
+    copy_vertex->set_sample(NULL);
+  }
+
+  Edge get_copy_edge(
+    const Edge& edge, Vertex_handle_map& vmap, Face_handle_map& fmap) const 
+  {
+    Face_handle f = edge.first;
+    Vertex_handle v = f->vertex(edge.second);
+
+    Face_handle cf = fmap[f];
+    Vertex_handle cv = vmap[v];
+
+    return Edge(cf, cf->index(cv));
+  }
+
+  // RELOCATION //
+
+  void relocate_one_vertex(Vertex_handle vertex) {
+    std::swap(vertex->point(), vertex->relocated());
+    reassign_samples_around_vertex(vertex);
+  }
+
+  template<class Iterator> // value_type = Edge
+      void relocate_one_ring(Iterator begin, Iterator end) {
+    Vertex_handle_set vertices;
+    for (Iterator it = begin; it != end; ++it) {
+      Edge edge = *it;
+      vertices.insert(m_dt.source_vertex(edge));
+      vertices.insert(m_dt.target_vertex(edge));
+    }
+
+    typename Vertex_handle_set::const_iterator vi;
+    for (vi = vertices.begin(); vi != vertices.end(); ++vi) {
+      Vertex_handle v = *vi;
+      if (v->pinned())
+        continue;
+      v->relocated() = compute_relocation(v);
+    }
+
+    for (vi = vertices.begin(); vi != vertices.end(); ++vi) {
+      Vertex_handle v = *vi;
+      if (v->pinned())
+        continue;
+      if (v->point() == v->relocated())
+        continue;
+
+      Edge_vector hull;
+      m_dt.get_edges_from_star_minus_link(v, hull, false);
+      bool ok = m_dt.is_in_kernel(v->relocated(), hull.begin(),
+          hull.end());
+
+      if (ok) {
+        // do relocation
+        FT norm_bef = m_dt.compute_cost_around_vertex(v).norm();
+        relocate_one_vertex(v);
+        FT norm_aft = m_dt.compute_cost_around_vertex(v).norm();
+
+        if (norm_bef < norm_aft) {
+          // undo relocation
+          relocate_one_vertex(v);
+        } else if (m_mchoice == 0) {
+          // update queue
+          hull.clear();
+          m_dt.get_edges_from_star_minus_link(v, hull, true);
+          remove_stencil_from_pqueue(hull.begin(), hull.end());
+          push_stencil_to_pqueue(hull.begin(), hull.end());
+        }
+      }
+    }
+  }
+
+  /// \endcond
+
+
+  /// \cond SKIP_IN_MANUAL
+  Vector compute_gradient(Vertex_handle vertex) const {
+    Vector grad = m_traits.construct_vector_2_object()(FT(0), FT(0));
+    Edge_circulator ecirc = m_dt.incident_edges(vertex);
+    Edge_circulator eend = ecirc;
+    CGAL_For_all(ecirc, eend)
+    {
+      Edge edge = *ecirc;
+      if (m_dt.source_vertex(edge) != vertex)
+        edge = m_dt.twin_edge(edge);
+
+      if (m_dt.get_plan(edge) == 0)
+        grad = m_traits.construct_sum_of_vectors_2_object()(
+          grad, compute_gradient_for_plan0(edge));
+      else
+        grad = m_traits.construct_sum_of_vectors_2_object()(
+          grad, compute_gradient_for_plan1(edge));
+    }
+    return grad;
+  }
+
+  Point compute_relocation(Vertex_handle vertex) const {
+    FT coef = FT(0);
+    Vector rhs = m_traits.construct_vector_2_object()(FT(0), FT(0));
+
+    Edge_circulator ecirc = m_dt.incident_edges(vertex);
+    Edge_circulator eend = ecirc;
+    CGAL_For_all(ecirc, eend)
+    {
+      Edge edge = *ecirc;
+      if (m_dt.source_vertex(edge) != vertex)
+        edge = m_dt.twin_edge(edge);
+
+      if (m_dt.get_plan(edge) == 0)
+        compute_relocation_for_plan0(edge, coef, rhs);
+      else
+        compute_relocation_for_plan1(edge, coef, rhs);
+    }
+    compute_relocation_for_vertex(vertex, coef, rhs);
+
+    if (coef == FT(0))
+      return vertex->point();
+
+    return m_traits.construct_translated_point_2_object()(
+      CGAL::ORIGIN,
+      m_traits.construct_scaled_vector_2_object()(rhs, FT(1) / coef));
+  }
+
+  void compute_relocation_for_vertex(
+    Vertex_handle vertex, FT& coef, Vector& rhs) const
+  {
+    Sample_* sample = vertex->sample();
+    if (sample) {
+      const FT m = sample->mass();
+      const Point& ps = sample->point();
+      rhs = m_traits.construct_sum_of_vectors_2_object()(rhs, 
+        m_traits.construct_scaled_vector_2_object()(
+          m_traits.construct_vector_2_object()(CGAL::ORIGIN, ps), m));
+      coef += m;
+    }
+  }
+
+  Vector compute_gradient_for_plan0(const Edge& edge) const {
+    Edge twin = m_dt.twin_edge(edge);
+    const Point& pa = m_dt.source_vertex(edge)->point();
+    const Point& pb = m_dt.target_vertex(edge)->point();
+
+    Sample_vector samples;
+    m_dt.collect_samples_from_edge(edge, samples);
+    m_dt.collect_samples_from_edge(twin, samples);
+
+    Vector grad = m_traits.construct_vector_2_object()(FT(0), FT(0));
+    Sample_vector_const_iterator it;
+    for (it = samples.begin(); it != samples.end(); ++it) {
+      Sample_* sample = *it;
+      const FT m = sample->mass();
+      const Point& ps = sample->point();
+
+      FT Da = m_traits.compute_squared_distance_2_object()(ps, pa);
+      FT Db = m_traits.compute_squared_distance_2_object()(ps, pb);
+      if (Da < Db)
+        grad = m_traits.construct_sum_of_vectors_2_object()(
+          grad,
+          m_traits.construct_scaled_vector_2_object()(
+            m_traits.construct_vector_2_object()(ps, pa), m));
+    }
+    return grad;
+  }
+
+  void compute_relocation_for_plan0(
+    const Edge& edge, FT& coef, Vector& rhs) const 
+  {
+    Edge twin = m_dt.twin_edge(edge);
+    const Point& pa = m_dt.source_vertex(edge)->point();
+    const Point& pb = m_dt.target_vertex(edge)->point();
+
+    Sample_vector samples;
+    m_dt.collect_samples_from_edge(edge, samples);
+    m_dt.collect_samples_from_edge(twin, samples);
+
+    Sample_vector_const_iterator it;
+    for (it = samples.begin(); it != samples.end(); ++it) {
+      Sample_* sample = *it;
+      const FT m = sample->mass();
+      const Point& ps = sample->point();
+
+      FT Da = m_traits.compute_squared_distance_2_object()(ps, pa);
+      FT Db = m_traits.compute_squared_distance_2_object()(ps, pb);
+
+      if (Da < Db) {
+        rhs = m_traits.construct_sum_of_vectors_2_object()(rhs, 
+          m_traits.construct_scaled_vector_2_object()(
+            m_traits.construct_vector_2_object()(CGAL::ORIGIN, ps), m));
+        coef += m;
+      }
+    }
+  }
+
+  Vector compute_gradient_for_plan1(const Edge& edge) const {
+    //FT M = m_dt.get_mass(edge);
+    const Point& pa = m_dt.source_vertex(edge)->point();
+    const Point& pb = m_dt.target_vertex(edge)->point();
+
+    SQueue queue;
+    m_dt.sort_samples_from_edge(edge, queue);
+
+    //FT start = FT(0);
+    Vector grad = m_traits.construct_vector_2_object()(FT(0), FT(0));
+    while (!queue.empty()) {
+      PSample psample = queue.top();
+      queue.pop();
+
+      const FT m = psample.sample()->mass();
+      const Point& ps = psample.sample()->point();
+
+      // normal + tangnetial
+      const FT coord = psample.priority();
+      Point pf = m_traits.construct_translated_point_2_object()(
+        CGAL::ORIGIN,
+        m_traits.construct_sum_of_vectors_2_object()(
+          m_traits.construct_scaled_vector_2_object()(
+            m_traits.construct_vector_2_object()(CGAL::ORIGIN, pa), 
+            1.0 - coord),
+          m_traits.construct_scaled_vector_2_object()(
+            m_traits.construct_vector_2_object()(CGAL::ORIGIN, pb), 
+            coord)));
+      grad = m_traits.construct_sum_of_vectors_2_object()(
+        grad,
+        m_traits.construct_scaled_vector_2_object()(
+          m_traits.construct_vector_2_object()(ps, pf), m * (1.0 - coord)));
+
+      /*
+      // only normal
+      FT bin = m/M;
+      FT center = start + 0.5*bin;
+      Point pc = CGAL::ORIGIN + (1.0-center)*(pa - CGAL::ORIGIN) + center*(pb - CGAL::ORIGIN);
+      start += bin;
+      grad = grad + m*(bin*bin/12.0)*(pa - pb);
+      grad = grad + m*(1.0-center)*(pc - pf);
+      */
+    }
+    return grad;
+  }
+
+  void compute_relocation_for_plan1(
+    const Edge& edge, FT& coef, Vector& rhs) const 
+  {
+    //FT M = m_dt.get_mass(edge);
+    const Point& pb = m_dt.target_vertex(edge)->point();
+
+    SQueue queue;
+    m_dt.sort_samples_from_edge(edge, queue);
+
+    //FT start = FT(0);
+    while (!queue.empty()) {
+      PSample psample = queue.top();
+      queue.pop();
+
+      const FT m = psample.sample()->mass();
+      const Point& ps = psample.sample()->point();
+
+      const FT coord = psample.priority();
+      const FT one_minus_coord = 1.0 - coord;
+
+      // normal + tangential
+      coef += m * one_minus_coord * one_minus_coord;
+      rhs = m_traits.construct_sum_of_vectors_2_object()(
+        rhs,
+        m_traits.construct_scaled_vector_2_object()(
+          m_traits.construct_sum_of_vectors_2_object()(
+            m_traits.construct_vector_2_object()(CGAL::ORIGIN, ps),
+            m_traits.construct_scaled_vector_2_object()(
+              m_traits.construct_vector_2_object()(CGAL::ORIGIN, pb), -coord)),
+          m * one_minus_coord));
+
+      /*
+      // only normal
+      FT bin = m/M;
+      FT center = start + 0.5*bin;
+      Point pc = CGAL::ORIGIN + (1.0-center)*(pa - CGAL::ORIGIN) + center*(pb - CGAL::ORIGIN);
+      start += bin;
+      grad = grad + m*(bin*bin/12.0)*(pa - pb);
+      grad = grad + m*(1.0-center)*(pc - pf);
+       */
+
+      /*
+      // only normal
+      FT bin = m/M;
+      FT center = start + 0.5*bin;
+      FT one_minus_center = 1.0 - center;
+      start += bin;
+
+      coef += m*bin*bin/12.0;
+      rhs = rhs + m*(bin*bin/12.0)*(pb - CGAL::ORIGIN);
+
+      coef += m*one_minus_center*(coord - center);
+      rhs = rhs + m*one_minus_center*(coord - center)*(pb - CGAL::ORIGIN);
+       */
+    }
+  }
+
+  void print_stats_debug() const
+  {
+    int nb_solid = 0;
+    int nb_ghost = 0;
+    for (Finite_edges_iterator ei = m_dt.finite_edges_begin();
+        ei != m_dt.finite_edges_end(); ++ei)
+    {
+      Edge edge = *ei;
+      if (m_dt.is_ghost(edge))
+        nb_ghost++;
+      else
+        nb_solid++;
+    }
+
+    std::cerr << "STATS" << std::endl;
+    std::cerr << "# vertices : " << m_dt.number_of_vertices()-4 << std::endl;
+    std::cerr << "# triangles: " << m_dt.number_of_faces() << std::endl;
+    std::cerr << "# edges: " << m_dt.tds().number_of_edges() << std::endl;
+    std::cerr << "# solid: " << nb_solid << std::endl;
+    std::cerr << "# ghost: " << nb_ghost << std::endl;
+  }
+
+
+  /*!
+    Returns the number of vertices present in the reconstructed triangulation.
+   */
+  std::size_t number_of_vertices() const {
+    return m_dt.number_of_vertices() - 4;
+
+  }
+
+  /*!
+    Returns the number of (solid) edges present in the reconstructed triangulation.
+   */
+  int number_of_edges() const {
+    int nb_solid = 0;
+    for (Finite_edges_iterator ei = m_dt.finite_edges_begin();
+         ei != m_dt.finite_edges_end(); ++ei)
+    {
+      Edge edge = *ei;
+      if (m_dt.is_ghost(edge))
+        continue;
+      nb_solid++;
+    }
+    return nb_solid;
+  }
+
+
+  /*!
+    Returns the cost of the (solid) edges present in the 
+    reconstructed triangulation.
+   */
+  FT total_edge_cost() const {
+    FT total_cost = 0;
+    for (Finite_edges_iterator ei = m_dt.finite_edges_begin();
+         ei != m_dt.finite_edges_end(); ++ei) 
+    {
+      Edge edge = *ei;
+      if (m_dt.is_ghost(edge))
+        continue;
+
+      total_cost += m_dt.get_cost(edge).finalize();
+    }
+    return total_cost;
+  }
+
+  /// \endcond
+
+
+  /// \name Simplification 
+  /// You can freely mix calls of the following functions. 
+  /// @{
+  /*!
+    Computes a shape consisting of `np` points, reconstructing the input
+    points.
+    \param np The number of points which will be present in the output.
+   */
+  void run_until(std::size_t np) {
+    CGAL::Real_timer timer;
+    std::cerr << "reconstruct until " << np << " V";
+
+    timer.start();
+    std::size_t N = np + 4;
+    std::size_t performed = 0;
+    while (m_dt.number_of_vertices() > N) {
+      bool ok = decimate();
+      if (!ok)
+        break;
+      performed++;
+    }
+
+    std::cerr << " done" << " (" << performed
+        << " iters, " << m_dt.number_of_vertices() - 4 << " V "
+        << timer.time() << " s)"
+        << std::endl;
+  }
+
+  /*!
+    Computes a shape, reconstructing the input, by performing `steps`
+    edge collapse operators on the output simplex.
+    \param steps The number of edge collapse operators to be performed.
+   */
+  void run(const unsigned steps) {
+    CGAL::Real_timer timer;
+    std::cerr << "reconstruct " << steps;
+
+    timer.start();
+    unsigned performed = 0;
+    for (unsigned i = 0; i < steps; ++i) {
+      bool ok = decimate();
+      if (!ok)
+        break;
+      performed++;
+    }
+
+    std::cerr << " done" << " (" << performed << "/"
+        << steps << " iters, " << m_dt.number_of_vertices() - 4
+        << " V, " << timer.time() << " s)"
+        << std::endl;
+  }
+
+
+  /*!
+    Since noise and missing data may prevent the reconstructed shape to have sharp corners well located, the algorithm offers the possibility to automatically relocate points after each edge collapse. The new location of the points is chosen such that the fitting of the output segments to the input points is improved. 
+   */
+  void relocate_all_points() {
+    CGAL::Real_timer timer;
+    std::cerr << "relocate all points" << "...";
+
+    timer.start();
+    m_mindex.clear(); // pqueue must be recomputed
+
+    for (Finite_vertices_iterator v = m_dt.finite_vertices_begin();
+        v != m_dt.finite_vertices_end(); ++v) {
+      if (v->pinned())
+        continue;
+      v->relocated() = compute_relocation(v);
+    }
+
+    for (Finite_vertices_iterator v = m_dt.finite_vertices_begin();
+        v != m_dt.finite_vertices_end(); ++v) {
+      if (v->pinned())
+        continue;
+      if (v->point() == v->relocated())
+        continue;
+
+      Edge_vector hull;
+      m_dt.get_edges_from_star_minus_link(v, hull, false);
+      bool ok = m_dt.is_in_kernel(v->relocated(), hull.begin(),
+          hull.end());
+
+      if (ok) {
+        // do relocation
+        FT norm_bef = m_dt.compute_cost_around_vertex(v).norm();
+        relocate_one_vertex(v);
+        FT norm_aft = m_dt.compute_cost_around_vertex(v).norm();
+
+        // undo relocation
+        if (norm_bef < norm_aft)
+          relocate_one_vertex(v);
+      }
+    }
+
+    std::cerr << "done" << " (" << timer.time() << " s)" << std::endl;
+  }
+
+  /// @}
+
+  /// \name Output
+  /// @{
+
+  /*!
+    Writes the points and segments of the output simplex in an indexed format into output iterators.
+        \tparam PointOutputIterator An output iterator with value type 
+                \link Optimal_transportation_reconstruction_2::Point Point \endlink.
+        \tparam IndexOutputIterator An output iterator with value type 
+                `std::size_t`.
+        \tparam IndexPairOutputIterator An output iterator with value type 
+                `std::pair<std::size_t, std::size_t>`.
+
+        \param points The output iterator for all points.
+        \param isolated_points The output iterator for the indices of isolated points.
+        \param segments The output iterator for the pairs of segment indices.
+   */
+  template <
+    typename PointOutputIterator,
+    typename IndexOutputIterator,
+    typename IndexPairOutputIterator>
+  CGAL::cpp11::tuple<
+    PointOutputIterator, 
+    IndexOutputIterator,
+    IndexPairOutputIterator>
+  indexed_output(
+    PointOutputIterator points,
+    IndexOutputIterator isolated_points,
+    IndexPairOutputIterator segments) const
+  {
+    std::vector<Point> isolated_points_;
+    std::vector<Segment> edges;
+
+    list_output (
+        std::back_inserter(isolated_points_), std::back_inserter(edges));
+
+    // vertices_of_edges
+    std::set<Point> edge_vertices;
+    for (typename std::vector<Segment>::iterator it = edges.begin();
+        it != edges.end(); it++) {
+
+      Point a = (*it).source();
+      Point b = (*it).target();
+
+      edge_vertices.insert(a);
+      edge_vertices.insert(b);
+    }
+
+    std::size_t count_points = 0;
+    for (typename std::set<Point>::iterator it = edge_vertices.begin();
+        it != edge_vertices.end(); it++) {
+
+      *points++ = *it;
+      ++count_points;
+    }
+
+    for (typename std::vector<Point>::iterator it = isolated_points_.begin();
+        it != isolated_points_.end(); it++) {
+
+      *isolated_points++ = count_points;
+      *points++ = *it;
+      ++count_points;
+    }
+
+    for (typename std::vector<Segment>::iterator it = edges.begin();
+        it != edges.end(); it++) {
+
+      Point const& a = it->source();
+      Point const& b = it->target();
+
+      typename std::set<Point>::iterator it_a = edge_vertices.find(a);
+      typename std::set<Point>::iterator it_b = edge_vertices.find(b);
+
+      std::size_t pos_a = std::distance(edge_vertices.begin(), it_a);
+      std::size_t pos_b = std::distance(edge_vertices.begin(), it_b);
+
+      *segments++ = std::make_pair(pos_a, pos_b);
+    }
+
+    return CGAL::cpp11::make_tuple(points, isolated_points, segments);
+  }
+
+  /*!
+     Returns the solid edges and vertices present after the reconstruction
+     process finished.
+
+    \details It takes two output iterators, one for storing the
+    isolated points and one for storing the edges of the reconstructed shape.
+
+    \tparam PointOutputIterator An output iterator with value type 
+            \link Optimal_transportation_reconstruction_2::Point Point \endlink.
+    \tparam SegmentOutputIterator An output iterator with value type 
+            \link Optimal_transportation_reconstruction_2::Segment Segment \endlink.
+   */
+  template<class PointOutputIterator, class SegmentOutputIterator>
+  void list_output (PointOutputIterator v_it, SegmentOutputIterator e_it) const
+  {
+    for (Vertex_iterator vi = m_dt.vertices_begin();
+         vi != m_dt.vertices_end(); ++vi)
+    {
+      bool incident_edges_have_sample = false;
+      typename Triangulation::Edge_circulator start = m_dt.incident_edges(vi);
+      typename Triangulation::Edge_circulator cur   = start;
+
+      do {
+        if (!m_dt.is_ghost(*cur)) {
+          incident_edges_have_sample = true;
+          break;
+        }
+        ++cur;
+      } while (cur != start);
+
+      if (!incident_edges_have_sample) {
+        if ((*vi).has_sample_assigned()) {
+          Point p = (*vi).point();
+          *v_it = p;
+          v_it++;
+        }
+      }
+    }
+
+    for (Finite_edges_iterator ei = m_dt.finite_edges_begin(); ei != m_dt.finite_edges_end(); ++ei)
+    {
+      Edge edge = *ei;
+      if (m_dt.is_ghost(edge))
+        continue;
+
+      int index = edge.second;
+      Vertex_handle source = edge.first->vertex( (index+1)%3 );
+      Vertex_handle target = edge.first->vertex( (index+2)%3 );
+
+      Segment s = m_traits.construct_segment_2_object()(
+        source->point(), target->point());
+      *e_it = s;
+      e_it++;
+    }
+  }
+  /// \endcond
+
+
+  /// \cond SKIP_IN_MANUAL
+  void extract_tds_output(Triangulation& rt2) const {
+    rt2 = m_dt;
+    //mark vertices
+    for (Vertex_iterator vi = rt2.vertices_begin();
+        vi != rt2.vertices_end(); ++vi)
+    {
+      bool incident_edges_have_sample = false;
+      typename Triangulation::Edge_circulator start = rt2.incident_edges(vi);
+      typename Triangulation::Edge_circulator cur = start;
+
+      do {
+        if (!rt2.is_ghost(*cur)) {
+          incident_edges_have_sample = true;
+          break;
+        }
+        ++cur;
+      } while (cur != start);
+
+      if (!incident_edges_have_sample) {
+        if ((*vi).has_sample_assigned())
+          (*vi).set_relevance(1);
+      }
+    }
+
+    // mark edges
+    for (Finite_edges_iterator ei = rt2.finite_edges_begin(); ei != rt2.finite_edges_end(); ++ei)
+    {
+      Edge edge = *ei;
+      FT relevance = 0;
+      if (!rt2.is_ghost(edge)) {
+        relevance = rt2.get_edge_relevance(edge); // >= 0
+      }
+      edge.first->relevance(edge.second) = relevance;
+    }
+  }
+
+
+  /// \endcond
+  /// @}
+
+};
+} // namespace
+
+#endif // CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_2_H_
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_2.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_3.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_d.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_coordinates_begin_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_coordinates_begin_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_2.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_3.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_d.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Access_dimension_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Access_dimension_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_d.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/Construct_point_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/Construct_point_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation/debug.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation/debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation/debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Optimisation_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Optimisation_d_traits_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Orientation_Linf_2.h b/3rdparty/CGAL-4.8/include/CGAL/Orientation_Linf_2.h
new file mode 100644
index 0000000..34c40fa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Orientation_Linf_2.h
@@ -0,0 +1,156 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_ORIENTATION_LINF_2_H
+#define CGAL_ORIENTATION_LINF_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/enum.h>
+
+namespace CGAL {
+
+typedef Sign OrientationLinf;
+
+
+template<class K>
+class Orientation_Linf_2
+{
+private:
+  typedef typename K::Point_2     Point_2;
+  typedef typename K::Compare_x_2 Compare_x_2;
+  typedef typename K::Compare_y_2 Compare_y_2;
+  typedef typename K::Comparison_result Comparison_result;
+
+  Compare_x_2 compare_x_2;
+  Compare_y_2 compare_y_2;
+
+
+  OrientationLinf predicate(const Point_2& p, const Point_2& q,
+	                    const Point_2& r) const
+  {
+    Comparison_result cmpxpq = compare_x_2(p, q);
+    Comparison_result cmpypq = compare_y_2(p, q);
+    Comparison_result cmpxpr = compare_x_2(p, r);
+    Comparison_result cmpypr = compare_y_2(p, r);
+    Comparison_result cmpxqr = compare_x_2(q, r);
+    Comparison_result cmpyqr = compare_y_2(q, r);
+
+    //std::cout << "debug Orientation_Linf_2 (p,q,r)= "
+    //          << p << ' ' << q << ' ' << r 
+    //          << std::endl;
+
+    if ( cmpxpq == EQUAL ) {
+      if (cmpypq == EQUAL) {//p and q are same points
+        return DEGENERATE;
+      } 
+      else {//pq forms a vertical line
+        if (cmpxpr == EQUAL) {//r lies on the vertical line formed by pq
+          return DEGENERATE;
+        } 
+        else {
+          return (cmpypq == cmpxpr) ? RIGHT_TURN : LEFT_TURN ;
+        }
+      }
+    } 
+    else if ( cmpypq == EQUAL ) {//p and q forms a horizontal line 
+      // here: cmpxpq != EQUAL
+      if (cmpypr == EQUAL) {//r lies on the horizontal line formed by pq
+        return DEGENERATE;
+      } 
+      else {
+        return (cmpxpq == cmpypr) ? LEFT_TURN : RIGHT_TURN ;
+      }
+    }
+    else {
+      // here both cmpxpq != EQUAL and cmpypq != EQUAL
+      bool is_monotone = 
+          ( ( ( cmpxpr == -cmpxqr ) &&
+              ( cmpypr == -cmpyqr )    ) ||
+            ( ( cmpxpq == cmpxpr) && ( cmpxpr == cmpxqr ) &&
+              ( cmpypq == cmpypr) && ( cmpypr == cmpyqr )    ) ||
+            ( (-cmpxpq == cmpxpr) && ( cmpxpr == cmpxqr) &&
+              (-cmpypq == cmpypr) && ( cmpypr == cmpyqr)     )    ) ;
+
+      //std::cout << "debug is_monotone=" << is_monotone << std::endl; 
+
+      if (is_monotone) {
+        //p, q, r are monotone here
+        //std::cout << "debug Orientation_Linf_2 are monotone"
+        //      << std::endl;
+        return DEGENERATE;
+      }
+      else { // p, q, r do not form stair case
+        //std::cout << "debug Orientation_Linf_2 not monotone"
+        //      << std::endl;
+        if ( cmpxpq == SMALLER ) {
+          if ( cmpypq == SMALLER ) {//CASE-I q lies in the North East of p
+            return (cmpyqr == SMALLER ||
+                cmpxpr == LARGER  ||
+                (cmpxqr == LARGER && cmpypr == SMALLER)) ? 
+              LEFT_TURN : RIGHT_TURN;
+          }//end of CASE-I
+          else {
+            // compare_y_2(p, q) == LARGER -- 
+            // CASE-II q lies in the South East of p
+            return (cmpxqr == SMALLER ||
+                cmpypr == SMALLER ||
+                (cmpxpr == SMALLER && cmpyqr == SMALLER)) ? 
+              LEFT_TURN : RIGHT_TURN;
+          }//end of CASE-II
+        }
+        else {//cmpxpq == LARGER case III and case IV
+          //std::cout << "debug Orientation_Linf_2 cmpxpq LARGER"
+          //    << std::endl;
+          if ( cmpypq == SMALLER ) {//CASE-III q lies in the North West of p
+            //std::cout << "debug Orientation_Linf_2 cmpypq SMALLER"
+            //    << std::endl;
+            return (cmpxpr == SMALLER ||
+                cmpyqr == SMALLER ||
+                (cmpxqr == SMALLER && cmpypr == SMALLER)) ? 
+              RIGHT_TURN : LEFT_TURN;			
+          }//end of CASE-III
+          else {//compare_y_2(p, q) == LARGER -- CASE-IV q lies in the South West of p
+            //std::cout << "debug Orientation_Linf_2 cmpypq LARGER"
+            //    << std::endl;
+            return (cmpypr == SMALLER ||
+                cmpxqr == LARGER ||
+                (cmpxpr == LARGER && cmpyqr == SMALLER)) ? 
+              RIGHT_TURN : LEFT_TURN;
+          }//end of CASE-IV
+        }
+      }
+    }
+  }
+
+public:
+  typedef OrientationLinf   result_type;
+  typedef Point_2           argument_type;
+
+  OrientationLinf operator()(const Point_2& p, const Point_2& q,
+	                     const Point_2& r) const
+  {
+    return predicate(p, q, r);
+  }
+};
+
+} //namespace CGAL
+
+#endif // CGAL_ORIENTATION_LINF_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Origin.h b/3rdparty/CGAL-4.8/include/CGAL/Origin.h
new file mode 100644
index 0000000..78ec935
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Origin.h
@@ -0,0 +1,52 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+//                 Stefan Schirra
+
+#ifndef CGAL_ORIGIN_H
+#define CGAL_ORIGIN_H
+
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+class Origin
+{};
+
+class Null_vector
+{};
+
+#ifndef CGAL_HEADER_ONLY
+
+CGAL_EXPORT extern const Origin ORIGIN;
+CGAL_EXPORT extern const Null_vector NULL_VECTOR;
+
+#endif
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Origin_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_ORIGIN_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Origin_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Origin_impl.h
new file mode 100644
index 0000000..38a00c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Origin_impl.h
@@ -0,0 +1,30 @@
+// Copyright (c) 1999
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+namespace CGAL {
+
+const Origin      ORIGIN = Origin();
+const Null_vector NULL_VECTOR = Null_vector();
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Orthogonal_incremental_neighbor_search.h b/3rdparty/CGAL-4.8/include/CGAL/Orthogonal_incremental_neighbor_search.h
new file mode 100644
index 0000000..54eb4f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Orthogonal_incremental_neighbor_search.h
@@ -0,0 +1,621 @@
+// Copyright (c) 2002,2011 Utrecht University (The Netherlands).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Hans Tangelder (<hanst at cs.uu.nl>)
+
+#ifndef CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH
+#define CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH
+
+#include <cstring>
+#include <list>
+#include <queue>
+#include <memory>
+#include <CGAL/Kd_tree.h>
+#include <CGAL/Euclidean_distance.h>
+#include <CGAL/tuple.h>
+
+namespace CGAL {
+
+  template <class SearchTraits, 
+            class Distance_= typename internal::Spatial_searching_default_distance<SearchTraits>::type,
+            class Splitter_ = Sliding_midpoint<SearchTraits>,
+            class Tree_= Kd_tree<SearchTraits, Splitter_, Tag_true> >
+  class Orthogonal_incremental_neighbor_search {
+
+  public:
+    typedef Splitter_ Splitter;
+    typedef Tree_  Tree;
+    typedef Distance_ Distance;
+    typedef typename SearchTraits::Point_d Point_d;
+    typedef typename Distance::Query_item Query_item;
+    typedef typename SearchTraits::FT FT;
+    typedef typename Tree::Point_d_iterator Point_d_iterator;
+    typedef typename Tree::Node_const_handle Node_const_handle;
+
+    typedef std::pair<Point_d,FT> Point_with_transformed_distance;
+    typedef CGAL::cpp11::tuple<Node_const_handle,FT,std::vector<FT> > Node_with_distance;
+    typedef std::vector<Node_with_distance*> Node_with_distance_vector;
+    typedef std::vector<Point_with_transformed_distance*> Point_with_transformed_distance_vector;
+
+    template<class T>
+    struct Object_wrapper
+    {   
+      T object;
+      Object_wrapper(const T& t):object(t){}
+      const T& operator* () const { return object; }
+      const T* operator-> () const { return &object; }
+    };
+
+    class Iterator_implementation {
+      SearchTraits traits;
+    public:
+
+      int number_of_neighbours_computed;
+      int number_of_internal_nodes_visited;
+      int number_of_leaf_nodes_visited;
+      int number_of_items_visited;
+
+    private:
+
+      typedef std::vector<FT> Distance_vector;
+    
+      Distance_vector dists;
+
+      Distance Orthogonal_distance_instance;
+    
+      FT multiplication_factor;
+
+      Query_item query_point;
+
+      FT distance_to_root;
+
+      bool search_nearest_neighbour;
+
+      FT rd;
+
+
+      class Priority_higher {
+      public:
+
+        bool search_nearest;
+
+        Priority_higher(bool search_the_nearest_neighbour) 
+	  : search_nearest(search_the_nearest_neighbour)
+	{} 
+
+        //highest priority is smallest distance
+        bool 
+	operator() (Node_with_distance* n1, Node_with_distance* n2) const
+	{
+	  return (search_nearest) ? (CGAL::cpp11::get<1>(*n1) > CGAL::cpp11::get<1>(*n2)) : (CGAL::cpp11::get<1>(*n2) > CGAL::cpp11::get<1>(*n1));
+        }
+      };
+
+      class Distance_smaller {
+
+      public:
+
+        bool search_nearest;
+
+        Distance_smaller(bool search_the_nearest_neighbour) 
+	  : search_nearest(search_the_nearest_neighbour)
+	{}
+
+        //highest priority is smallest distance
+        bool operator() (Point_with_transformed_distance* p1, Point_with_transformed_distance* p2) const
+	{
+	  return (search_nearest) ? (p1->second > p2->second) : (p2->second > p1->second);
+        }
+      };
+
+
+      std::priority_queue<Node_with_distance*, Node_with_distance_vector,
+	                  Priority_higher> PriorityQueue;
+
+    public:
+      std::priority_queue<Point_with_transformed_distance*, Point_with_transformed_distance_vector,
+	                  Distance_smaller> Item_PriorityQueue;
+
+
+    public:
+
+      int reference_count;
+
+    
+
+      // constructor
+      Iterator_implementation(const Tree& tree,const Query_item& q, const Distance& tr,
+			      FT Eps=FT(0.0), bool search_nearest=true)
+	: traits(tree.traits()),number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), 
+	number_of_leaf_nodes_visited(0), number_of_items_visited(0),
+	Orthogonal_distance_instance(tr), multiplication_factor(Orthogonal_distance_instance.transformed_distance(FT(1.0)+Eps)), 
+	query_point(q), search_nearest_neighbour(search_nearest), 
+	PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)),
+	reference_count(1)
+	  
+	  
+      {
+        if (tree.empty()) return;
+
+        typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits.construct_cartesian_const_iterator_d_object();
+        int dim = static_cast<int>(std::distance(ccci(q), ccci(q,0)));
+
+        dists.resize(dim);
+        for(int i=0 ; i<dim ; ++i){
+          dists[i] = 0;
+        }
+        
+        if (search_nearest){ 
+	  distance_to_root=
+	    Orthogonal_distance_instance.min_distance_to_rectangle(q, tree.bounding_box(),dists);
+          Node_with_distance *The_Root = new Node_with_distance(tree.root(),
+							        distance_to_root, dists);
+          PriorityQueue.push(The_Root);
+
+          // rd is the distance of the top of the priority queue to q
+          rd=CGAL::cpp11::get<1>(*The_Root);
+          Compute_the_next_nearest_neighbour();
+        }
+         else{
+           distance_to_root=
+   	 Orthogonal_distance_instance.max_distance_to_rectangle(q,
+						tree.bounding_box());
+           Node_with_distance *The_Root = new Node_with_distance(tree.root(),
+                                                                 distance_to_root, dists);
+        PriorityQueue.push(The_Root);
+
+        // rd is the distance of the top of the priority queue to q
+        rd=CGAL::cpp11::get<1>(*The_Root);
+        Compute_the_next_furthest_neighbour();
+         }
+
+        
+      }
+
+      // * operator
+      const Point_with_transformed_distance& 
+      operator* () const 
+      {
+	return *(Item_PriorityQueue.top());
+      }
+
+      // prefix operator
+      Iterator_implementation& 
+      operator++() 
+      {
+        Delete_the_current_item_top();
+        if(search_nearest_neighbour)
+          Compute_the_next_nearest_neighbour();
+        else
+          Compute_the_next_furthest_neighbour();
+        return *this;
+      }
+
+      // postfix operator
+      Object_wrapper<Point_with_transformed_distance>
+      operator++(int) 
+      {
+        Object_wrapper<Point_with_transformed_distance> result( *(Item_PriorityQueue.top()) );
+        ++*this;
+        return result;
+      }
+
+      // Print statistics of the general priority search process.
+      std::ostream& 
+      statistics (std::ostream& s) const {
+    	s << "Orthogonal priority search statistics:" 
+	  << std::endl;
+    	s << "Number of internal nodes visited:" 
+	  << number_of_internal_nodes_visited << std::endl;
+    	s << "Number of leaf nodes visited:" 
+	  << number_of_leaf_nodes_visited << std::endl;
+    	s << "Number of items visited:" 
+	  << number_of_items_visited << std::endl;
+        s << "Number of neighbours computed:" 
+	  << number_of_neighbours_computed << std::endl;
+        return s;
+      }
+
+
+      //destructor
+      ~Iterator_implementation() 
+      {
+	while (!PriorityQueue.empty()) {
+	  Node_with_distance* The_top=PriorityQueue.top();
+	  PriorityQueue.pop();
+	  delete The_top;
+	}
+	while (!Item_PriorityQueue.empty()) {
+	  Point_with_transformed_distance* The_top=Item_PriorityQueue.top();
+	  Item_PriorityQueue.pop();
+	  delete The_top;
+        }
+      }
+
+    private:
+
+      void 
+      Delete_the_current_item_top() 
+      {
+        Point_with_transformed_distance* The_item_top=Item_PriorityQueue.top();
+        Item_PriorityQueue.pop();
+        delete The_item_top;
+      }
+
+      void 
+      Compute_the_next_nearest_neighbour() 
+      {
+        // compute the next item
+        bool next_neighbour_found=false;
+        if (!(Item_PriorityQueue.empty())) {
+	    next_neighbour_found=
+	      (multiplication_factor*rd > Item_PriorityQueue.top()->second);
+        }
+	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object();
+	typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point);
+        // otherwise browse the tree further
+        while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
+	  Node_with_distance* The_node_top=PriorityQueue.top();
+	  Node_const_handle N= CGAL::cpp11::get<0>(*The_node_top);
+          dists = CGAL::cpp11::get<2>(*The_node_top);
+	  PriorityQueue.pop();
+	  delete The_node_top;
+	  FT copy_rd=rd;
+	  while (!(N->is_leaf())) { // compute new distance
+            typename Tree::Internal_node_const_handle node =
+            static_cast<typename Tree::Internal_node_const_handle>(N);
+	    number_of_internal_nodes_visited++;
+	    int new_cut_dim=node->cutting_dimension();
+	    FT new_rd,dst = dists[new_cut_dim];
+	    FT val = *(query_point_it + new_cut_dim);
+            FT diff1 = val - node->high_value();
+            FT diff2 = val - node->low_value();
+	    if (diff1 + diff2 < FT(0.0)) {
+              new_rd=
+		Orthogonal_distance_instance.new_distance(copy_rd,dst,diff1,new_cut_dim);
+                
+	      CGAL_assertion(new_rd >= copy_rd);
+                dists[new_cut_dim] = diff1;
+                Node_with_distance *Upper_Child =
+		  new Node_with_distance(node->upper(), new_rd, dists);
+		PriorityQueue.push(Upper_Child);
+                dists[new_cut_dim] = dst;
+		N=node->lower();
+
+	    }
+	    else { // compute new distance
+	      new_rd=Orthogonal_distance_instance.new_distance(copy_rd,dst,diff2,new_cut_dim);  
+	      CGAL_assertion(new_rd >= copy_rd);
+                dists[new_cut_dim] = diff2;
+		Node_with_distance *Lower_Child =
+		  new Node_with_distance(node->lower(), new_rd, dists);
+		PriorityQueue.push(Lower_Child);
+                dists[new_cut_dim] = dst;
+		N=node->upper();
+	    }
+	  }
+	  // n is a leaf
+          typename Tree::Leaf_node_const_handle node =
+            static_cast<typename Tree::Leaf_node_const_handle>(N);
+	  number_of_leaf_nodes_visited++;
+	  if (node->size() > 0) {
+	    for (typename Tree::iterator it=node->begin(); it != node->end(); it++) {
+	      number_of_items_visited++;
+	      FT distance_to_query_point=
+		Orthogonal_distance_instance.transformed_distance(query_point,*it);
+	      Point_with_transformed_distance *NN_Candidate=
+		new Point_with_transformed_distance(*it,distance_to_query_point);
+	      Item_PriorityQueue.push(NN_Candidate);
+	    }
+	    // old top of PriorityQueue has been processed,
+	    // hence update rd
+                
+	    if (!(PriorityQueue.empty()))  {
+	      rd = CGAL::cpp11::get<1>(*PriorityQueue.top());
+		next_neighbour_found =
+                  (multiplication_factor*rd > 
+		   Item_PriorityQueue.top()->second);
+	    }
+	    else // priority queue empty => last neighbour found
+	      {
+		next_neighbour_found=true;
+	      }
+
+	    number_of_neighbours_computed++;
+	  }
+        }   // next_neighbour_found or priority queue is empty
+        // in the latter case also the item priority quee is empty
+      }
+
+
+      void 
+      Compute_the_next_furthest_neighbour() 
+      {
+        // compute the next item
+        bool next_neighbour_found=false;
+        if (!(Item_PriorityQueue.empty())) {
+	    next_neighbour_found=
+	      (rd < multiplication_factor*Item_PriorityQueue.top()->second);
+        }
+	typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object();
+	typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point);
+        // otherwise browse the tree further
+        while ((!next_neighbour_found) && (!PriorityQueue.empty())) {
+	  Node_with_distance* The_node_top=PriorityQueue.top();
+	  Node_const_handle N= CGAL::cpp11::get<0>(*The_node_top);
+          dists = CGAL::cpp11::get<2>(*The_node_top);
+	  PriorityQueue.pop();
+	  delete The_node_top;
+	  FT copy_rd=rd;
+	  while (!(N->is_leaf())) { // compute new distance
+            typename Tree::Internal_node_const_handle node =
+              static_cast<typename Tree::Internal_node_const_handle>(N);
+	    number_of_internal_nodes_visited++;
+	    int new_cut_dim=node->cutting_dimension();
+	    FT new_rd,dst = dists[new_cut_dim];
+	    FT val = *(query_point_it + new_cut_dim);
+            FT diff1 = val - node->high_value();
+            FT diff2 = val - node->low_value();
+	    if (diff1 + diff2 < FT(0.0)) {
+              new_rd=
+		Orthogonal_distance_instance.new_distance(copy_rd,dst,diff1,new_cut_dim);
+                
+	      CGAL_assertion(new_rd >= copy_rd);
+		Node_with_distance *Lower_Child =
+		  new Node_with_distance(node->lower(), copy_rd, dists);
+		PriorityQueue.push(Lower_Child);
+		N=node->upper();
+                dists[new_cut_dim] = diff1;
+		copy_rd=new_rd;
+
+	    }
+	    else { // compute new distance
+	      new_rd=Orthogonal_distance_instance.new_distance(copy_rd,dst,diff2,new_cut_dim);  
+	      CGAL_assertion(new_rd >= copy_rd);
+		Node_with_distance *Upper_Child =
+		  new Node_with_distance(node->upper(), copy_rd, dists);
+		PriorityQueue.push(Upper_Child);
+		N=node->lower();
+                dists[new_cut_dim] = diff2;
+		copy_rd=new_rd;
+	    }
+	  }
+	  // n is a leaf
+          typename Tree::Leaf_node_const_handle node =
+            static_cast<typename Tree::Leaf_node_const_handle>(N);
+	  number_of_leaf_nodes_visited++;
+	  if (node->size() > 0) {
+	    for (typename Tree::iterator it=node->begin(); it != node->end(); it++) {
+	      number_of_items_visited++;
+	      FT distance_to_query_point=
+		Orthogonal_distance_instance.transformed_distance(query_point,*it);
+	      Point_with_transformed_distance *NN_Candidate=
+		new Point_with_transformed_distance(*it,distance_to_query_point);
+	      Item_PriorityQueue.push(NN_Candidate);
+	    }
+	    // old top of PriorityQueue has been processed,
+	    // hence update rd
+                
+	    if (!(PriorityQueue.empty()))  {
+	      rd = CGAL::cpp11::get<1>(*PriorityQueue.top());
+		next_neighbour_found =
+                  (multiplication_factor*rd < 
+		   Item_PriorityQueue.top()->second);
+	    }
+	    else // priority queue empty => last neighbour found
+	      {
+		next_neighbour_found=true;
+	      }
+
+	    number_of_neighbours_computed++;
+	  }
+        }   // next_neighbour_found or priority queue is empty
+        // in the latter case also the item priority quee is empty
+      }
+    }; // class Iterator_implementaion
+  
+
+
+
+
+
+
+    
+
+  public:
+    class iterator;
+    typedef iterator const_iterator;
+
+    // constructor
+    Orthogonal_incremental_neighbor_search(const Tree& tree,  
+					   const Query_item& q, FT Eps = FT(0.0), 
+					   bool search_nearest=true, const Distance& tr=Distance())
+      : m_tree(tree),m_query(q),m_dist(tr),m_Eps(Eps),m_search_nearest(search_nearest)
+    {}
+
+    iterator 
+    begin() const
+    {
+      return iterator(m_tree,m_query,m_dist,m_Eps,m_search_nearest);
+    }
+
+    iterator 
+    end() const
+    {
+      return iterator();
+    }
+
+    std::ostream& 
+    statistics(std::ostream& s) 
+    {
+      begin()->statistics(s);
+      return s;
+    }
+
+
+
+
+    class iterator {
+
+    public:
+
+      typedef std::input_iterator_tag iterator_category;
+      typedef Point_with_transformed_distance       value_type;
+      typedef Point_with_transformed_distance*      pointer;
+      typedef const Point_with_transformed_distance&      reference;
+      typedef std::size_t               size_type;
+      typedef std::ptrdiff_t            difference_type;
+      typedef int distance_type;
+
+      //class Iterator_implementation;
+      Iterator_implementation *Ptr_implementation;
+
+
+    public:
+
+      // default constructor
+      iterator() 
+      : Ptr_implementation(0)
+      {}
+
+      int 
+      the_number_of_items_visited() 
+      {
+        return Ptr_implementation->number_of_items_visited;
+      }
+
+      // constructor
+      iterator(const Tree& tree,const Query_item& q, const Distance& tr=Distance(), FT eps=FT(0.0), 
+	       bool search_nearest=true)
+	: Ptr_implementation(new Iterator_implementation(tree, q, tr, eps, search_nearest))
+	{}
+
+      // copy constructor
+      iterator(const iterator& Iter) 
+      {
+        Ptr_implementation = Iter.Ptr_implementation;
+        if (Ptr_implementation != 0) Ptr_implementation->reference_count++;
+      }
+
+      iterator& operator=(const iterator& Iter)
+      {
+        if (Ptr_implementation != Iter.Ptr_implementation){
+          if (Ptr_implementation != 0 && --(Ptr_implementation->reference_count)==0) {
+              delete Ptr_implementation;
+          }
+          Ptr_implementation = Iter.Ptr_implementation;
+          if (Ptr_implementation != 0) Ptr_implementation->reference_count++;
+        }
+        return *this;
+      }      
+      
+      
+      const Point_with_transformed_distance& 
+      operator* () const 
+      {
+	return *(*Ptr_implementation);
+      }
+      
+      // -> operator
+      const Point_with_transformed_distance*
+      operator-> () const 
+      {
+	return &*(*Ptr_implementation);
+      }
+
+      // prefix operator
+      iterator& 
+      operator++() 
+      {
+        ++(*Ptr_implementation);
+        return *this;
+      }
+
+      // postfix operator
+      Object_wrapper<Point_with_transformed_distance>
+      operator++(int) 
+      {
+	return (*Ptr_implementation)++;
+      }
+
+
+      bool 
+      operator==(const iterator& It) const 
+      {
+        if (
+	    ((Ptr_implementation == 0) || 
+	     Ptr_implementation->Item_PriorityQueue.empty()) &&
+	    ((It.Ptr_implementation == 0) ||  
+	     It.Ptr_implementation->Item_PriorityQueue.empty())
+	    )
+	  return true;
+        // else
+        return (Ptr_implementation == It.Ptr_implementation);
+      }
+
+      bool 
+      operator!=(const iterator& It) const 
+      {
+        return !(*this == It);
+      }
+
+      std::ostream& 
+      statistics (std::ostream& s) 
+      {
+    	Ptr_implementation->statistics(s);
+        return s;
+      }
+
+      ~iterator() 
+      {
+        if (Ptr_implementation != 0) {
+	  Ptr_implementation->reference_count--;
+	  if (Ptr_implementation->reference_count==0) {
+	    delete Ptr_implementation;
+	    Ptr_implementation = 0;
+	  }
+        }
+      }
+
+
+    }; // class iterator
+
+    //data members
+    const Tree& m_tree;
+    Query_item m_query;
+    Distance m_dist;
+    FT m_Eps; 
+    bool m_search_nearest;
+  }; // class 
+
+  template <class Traits, class Query_item, class Distance>
+  void swap (typename Orthogonal_incremental_neighbor_search<Traits, 
+	     Query_item, Distance>::iterator& x,
+	     typename Orthogonal_incremental_neighbor_search<Traits, 
+	     Query_item, Distance>::iterator& y) 
+  {
+    typename Orthogonal_incremental_neighbor_search<Traits, 
+      Query_item, Distance>::iterator::Iterator_implementation
+      *tmp = x.Ptr_implementation;
+    x.Ptr_implementation  = y.Ptr_implementation;
+    y.Ptr_implementation = tmp;
+  }
+
+} // namespace CGAL
+
+#endif // CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Orthogonal_k_neighbor_search.h b/3rdparty/CGAL-4.8/include/CGAL/Orthogonal_k_neighbor_search.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Orthogonal_k_neighbor_search.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Orthogonal_k_neighbor_search.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/PCA_util.h b/3rdparty/CGAL-4.8/include/CGAL/PCA_util.h
new file mode 100644
index 0000000..d82ed86
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/PCA_util.h
@@ -0,0 +1,778 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
+
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+namespace internal {
+
+// Initialize a matrix in n dimension by an array or numbers
+template <typename K>
+typename CGAL::Linear_algebraCd<typename K::FT>::Matrix
+init_matrix(const int n,
+            typename K::FT entries[])
+{
+  CGAL_assertion(n > 1); // dimension > 1
+  typedef typename CGAL::Linear_algebraCd<typename K::FT>::Matrix Matrix;
+
+  Matrix m(n);
+  int i,j;
+  for(i = 0; i < n; i++) 
+    for(j = 0; j < n; j++)
+      m[i][j] = entries[i*n+j];
+
+  return m;
+} // end initialization of matrix
+
+// assemble covariance matrix from a point set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+                             typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K& ,                    // kernel
+                             const typename K::Point_3*,   // used for indirection
+                             const CGAL::Dimension_tag<0>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT       FT;
+  typedef typename K::Point_3  Point;
+  typedef typename K::Vector_3 Vector;
+
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  covariance[0] = covariance[1] = covariance[2] = 
+  covariance[3] = covariance[4] = covariance[5] = (FT)0.0;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Point& p = *it;
+    Vector d = p - c;
+    covariance[0] += d.x() * d.x();
+    covariance[1] += d.x() * d.y();
+    covariance[2] += d.x() * d.z();
+    covariance[3] += d.y() * d.y();
+    covariance[4] += d.y() * d.z();
+    covariance[5] += d.z() * d.z();
+  }
+}
+
+// assemble covariance matrix from a triangle set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond,
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K&,                    // kernel
+                             const typename K::Triangle_3*,// used for indirection
+                             const CGAL::Dimension_tag<2>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Triangle_3  Triangle;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all triangles and their combined mass
+  FT mass = 0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {1.0/12.0, 1.0/24.0, 1.0/24.0,
+                1.0/24.0, 1.0/12.0, 1.0/24.0,
+                1.0/24.0, 1.0/24.0, 1.0/12.0};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each triangle, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Triangle& t = *it;
+
+    // defined for convenience.
+    FT delta[9] = {t[0].x(), t[1].x(), t[2].x(), 
+                   t[0].y(), t[1].y(), t[2].y(),
+                   t[0].z(), t[1].z(), t[2].z()};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT area = std::sqrt(t.squared_area());
+
+		// skip zero measure primitives
+    if(area == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = 2 * area * transformation * moment * LA::transpose(transformation);
+    
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0];
+    covariance[1] += transformation[1][0];
+    covariance[2] += transformation[2][0];
+    covariance[3] += transformation[1][1];
+    covariance[4] += transformation[2][1];
+    covariance[5] += transformation[2][2];
+
+    mass += area;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+
+}
+
+// assemble covariance matrix from a cuboid set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond,
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K& ,                    // kernel
+                             const typename K::Iso_cuboid_3*,// used for indirection
+                             const CGAL::Dimension_tag<3>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Iso_cuboid_3    Iso_cuboid;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  // final combined covariance matrix for all cuboids and their combined mass
+  FT mass = (FT)0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {(FT)(1.0/3.0), (FT)(1.0/4.0), (FT)(1.0/4.0),
+								(FT)(1.0/4.0), (FT)(1.0/3.0), (FT)(1.0/4.0),
+                (FT)(1.0/4.0), (FT)(1.0/4.0), (FT)(1.0/3.0)};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each cuboid, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Iso_cuboid& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT x0 = t[0].x();
+    FT y0 = t[0].y();
+    FT z0 = t[0].z();
+    FT delta[9] = {t[1].x()-x0, t[3].x()-x0, t[5].x()-x0, 
+                   t[1].y()-y0, t[3].y()-y0, t[5].y()-y0,
+                   t[1].z()-z0, t[3].z()-z0, t[5].z()-z0};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT volume = t.volume();
+
+		// skip zero measure primitives
+    if(volume == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the cuboid wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = volume * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the minimum corner (x0,y0,z0) of the cuboid.
+    FT xav0 = (delta[0] + delta[1] + delta[2])/4.0;
+    FT yav0 = (delta[3] + delta[4] + delta[5])/4.0;
+    FT zav0 = (delta[6] + delta[7] + delta[8])/4.0;
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0);
+    covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0);
+    covariance[2] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0);
+    covariance[3] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0);
+    covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0);
+    covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0);
+
+    mass += volume;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (- c.x() * c.x());
+  covariance[1] += mass * (- c.x() * c.y());
+  covariance[2] += mass * (- c.z() * c.x());
+  covariance[3] += mass * (- c.y() * c.y());
+  covariance[4] += mass * (- c.z() * c.y());
+  covariance[5] += mass * (- c.z() * c.z());
+}
+
+// assemble covariance matrix from a cuboid set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K& ,                    // kernel
+                             const typename K::Iso_cuboid_3*,// used for indirection
+                             const CGAL::Dimension_tag<2>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT FT;
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all cuboids and their combined mass
+  FT mass = (FT)0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {(FT)(7.0/3.0), (FT)1.5,       (FT)1.5,
+                (FT)1.5,       (FT)(7.0/3.0), (FT)1.5,
+                (FT)1.5,       (FT)1.5,       (FT)(7.0/3.0)};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each cuboid, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Iso_cuboid& t = *it;
+
+    // defined for convenience.
+    FT x0 = t[0].x();
+    FT y0 = t[0].y();
+    FT z0 = t[0].z();
+    FT delta[9] = {t[1].x()-x0, t[3].x()-x0, t[5].x()-x0, 
+                   t[1].y()-y0, t[3].y()-y0, t[5].y()-y0,
+                   t[1].z()-z0, t[3].z()-z0, t[5].z()-z0};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT area = std::pow(delta[0]*delta[0] + delta[3]*delta[3] +
+                  delta[6]*delta[6],1/3.0)*std::pow(delta[1]*delta[1] +
+                  delta[4]*delta[4] + delta[7]*delta[7],1/3.0)*2 +
+                  std::pow(delta[0]*delta[0] + delta[3]*delta[3] +
+                  delta[6]*delta[6],1/3.0)*std::pow(delta[2]*delta[2] +
+                  delta[5]*delta[5] + delta[8]*delta[8],1/3.0)*2 +
+                  std::pow(delta[1]*delta[1] + delta[4]*delta[4] +
+                  delta[7]*delta[7],1/3.0)*std::pow(delta[2]*delta[2] +
+                  delta[5]*delta[5] + delta[8]*delta[8],1/3.0)*2;
+
+		// skip zero measure primitives
+    if(area == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the cuboid wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = area * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the minimum corner (x0,y0,z0) of the cuboid.
+    FT xav0 = (delta[0] + delta[1] + delta[2])/4.0;
+    FT yav0 = (delta[3] + delta[4] + delta[5])/4.0;
+    FT zav0 = (delta[6] + delta[7] + delta[8])/4.0;
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + area * (2*x0*xav0 + x0*x0);
+    covariance[1] += transformation[1][0] + area * (xav0*y0 + yav0*x0 + x0*y0);
+    covariance[2] += transformation[2][0] + area * (x0*zav0 + xav0*z0 + x0*z0);
+    covariance[3] += transformation[1][1] + area * (2*y0*yav0 + y0*y0);
+    covariance[4] += transformation[2][1] + area * (yav0*z0 + y0*zav0 + z0*y0);
+    covariance[5] += transformation[2][2] + area * (2*zav0*z0 + z0*z0);
+
+    mass += area;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+
+}
+
+// assemble covariance matrix from a sphere set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K&,                     // kernel
+                             const typename K::Sphere_3*,  // used for indirection
+                             const CGAL::Dimension_tag<3>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Sphere_3  Sphere;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all spheres and their combined mass
+  FT mass = 0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {4.0/15.0, 0.0,      0.0,
+                0.0,      4.0/15.0, 0.0,
+                0.0,      0.0,      4.0/15.0};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each sphere, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Sphere& t = *it;
+
+    // defined for convenience.
+    FT radius = std::sqrt(t.squared_radius());
+    FT delta[9] = {radius, 0.0, 0.0, 
+                   0.0, radius, 0.0,
+                   0.0, 0.0, radius};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT volume = (FT)(4.0/3.0) * radius * t.squared_radius();
+
+		// skip zero measure primitives
+    if(volume == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = (3.0/4.0) * volume * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the sphere.
+    FT x0 = t.center().x();
+    FT y0 = t.center().y();
+    FT z0 = t.center().z();
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + volume * x0*x0;
+    covariance[1] += transformation[1][0] + volume * x0*y0;
+    covariance[2] += transformation[2][0] + volume * x0*z0;
+    covariance[3] += transformation[1][1] + volume * y0*y0;
+    covariance[4] += transformation[2][1] + volume * z0*y0;
+    covariance[5] += transformation[2][2] + volume * z0*z0;
+
+    mass += volume;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+
+}
+// assemble covariance matrix from a sphere set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K&,                     // kernel
+                             const typename K::Sphere_3*,  // used for indirection
+                             const CGAL::Dimension_tag<2>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Sphere_3  Sphere;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all spheres and their combined mass
+  FT mass = 0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {4.0/3.0, 0.0,     0.0,
+                0.0,     4.0/3.0, 0.0,
+                0.0,     0.0,     4.0/3.0};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each sphere, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Sphere& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT radius = std::sqrt(t.squared_radius());
+    FT delta[9] = {radius, 0.0,    0.0, 
+                   0.0,    radius, 0.0,
+                   0.0,    0.0,    radius};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT area = (FT)4.0 * t.squared_radius();
+
+		// skip zero measure primitives
+    if(area == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = (1.0/4.0) * area * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the sphere.
+    FT x0 = t.center().x();
+    FT y0 = t.center().y();
+    FT z0 = t.center().z();
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + area * x0*x0;
+    covariance[1] += transformation[1][0] + area * x0*y0;
+    covariance[2] += transformation[2][0] + area * x0*z0;
+    covariance[3] += transformation[1][1] + area * y0*y0;
+    covariance[4] += transformation[2][1] + area * z0*y0;
+    covariance[5] += transformation[2][2] + area * z0*z0;
+
+    mass += area;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+
+}
+
+// assemble covariance matrix from a tetrahedron set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K& ,                    // kernel
+                             const typename K::Tetrahedron_3*,// used for indirection
+                             const CGAL::Dimension_tag<3>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Tetrahedron_3  Tetrahedron;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all tetrahedrons and their combined mass
+  FT mass = 0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {1.0/60.0,  1.0/120.0, 1.0/120.0,
+                1.0/120.0, 1.0/60.0,  1.0/120.0,
+                1.0/120.0, 1.0/120.0, 1.0/60.0};
+  Matrix moment = init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each tetrahedron, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Tetrahedron& t = *it;
+
+    // defined for convenience.
+    FT x0 = t[0].x();
+    FT y0 = t[0].y();
+    FT z0 = t[0].z();
+
+    FT delta[9] = {t[1].x()-x0, t[2].x()-x0, t[3].x()-x0, 
+                   t[1].y()-y0, t[2].y()-y0, t[3].y()-y0,
+                   t[1].z()-z0, t[2].z()-z0, t[3].z()-z0};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT volume = t.volume();
+
+		// skip zero measure primitives
+    if(volume == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the tetrahedron wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = 6 * volume * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the tetrahedron.
+    FT xav0 = (delta[0]+delta[1]+delta[2])/4.0;
+    FT yav0 = (delta[3]+delta[4]+delta[5])/4.0;
+    FT zav0 = (delta[6]+delta[7]+delta[8])/4.0;
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0);
+    covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0);
+    covariance[2] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0);
+    covariance[3] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0);
+    covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0);
+    covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0);
+
+    mass += volume;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+}
+
+// assemble covariance matrix from a segment set 
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+void
+assemble_covariance_matrix_3(InputIterator first,
+                             InputIterator beyond, 
+			     typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                             const typename K::Point_3& c, // centroid
+                             const K& ,                    // kernel
+                             const typename K::Segment_3*,// used for indirection
+                             const CGAL::Dimension_tag<1>&,
+			     const DiagonalizeTraits&)
+{
+  typedef typename K::FT          FT;
+  typedef typename K::Segment_3  Segment;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1 2
+  //   3 4
+  //     5          
+  //Final combined covariance matrix for all segments and their combined mass
+  FT mass = 0.0;
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[9] = {1.0, 0.5, 0.0,
+                0.5, 1.0, 0.0,
+                0.0, 0.0, 0.0};
+  Matrix moment = (FT)(1.0/3.0) * init_matrix<K>(3,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each segment, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Segment& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT delta[9] = {t[0].x(), t[1].x(), 0.0, 
+       t[0].y(), t[1].y(), 0.0,
+                   t[0].z(), t[1].z(), 1.0};
+    Matrix transformation = init_matrix<K>(3,delta);
+    FT length = std::sqrt(t.squared_length());
+
+		// skip zero measure primitives
+    if(length == (FT)0.0)
+			continue;
+
+    // Find the 2nd order moment for the segment wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = length * transformation * moment * LA::transpose(transformation);
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0];
+    covariance[1] += transformation[1][0];
+    covariance[2] += transformation[2][0];
+    covariance[3] += transformation[1][1];
+    covariance[4] += transformation[2][1];
+    covariance[5] += transformation[2][2];
+
+    mass += length;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.z() * c.x());
+  covariance[3] += mass * (-1.0 * c.y() * c.y());
+  covariance[4] += mass * (-1.0 * c.z() * c.y());
+  covariance[5] += mass * (-1.0 * c.z() * c.z());
+
+}
+
+
+// compute the eigen values and vectors of the covariance 
+// matrix and deduces the best linear fitting plane.
+// returns fitting quality
+template < typename K, typename DiagonalizeTraits >
+typename K::FT
+fitting_plane_3(typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+                const typename K::Point_3& c,       // centroid
+                typename K::Plane_3& plane,         // best fit plane
+                const K&,                           // kernel
+		const DiagonalizeTraits& )                 // Diagonalize traits
+{
+  typedef typename K::FT       FT;
+  typedef typename K::Plane_3  Plane;
+  typedef typename K::Vector_3 Vector;
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0., 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0.,
+							0., 0., 0.,
+							0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // degenerate case 
+  if(eigen_values[0] == eigen_values[1] && 
+     eigen_values[1] == eigen_values[2])
+  {
+    // assemble a default horizontal plane that goes
+    // through the centroid.
+    plane = Plane(c,Vector(FT(0),FT(0),FT(1)));
+    return FT(0);
+  } 
+  else // regular and line case
+  {
+    Vector normal(eigen_vectors[0],
+                  eigen_vectors[1],
+                  eigen_vectors[2]);
+    plane = Plane(c,normal);
+    return FT(1) - eigen_values[0] / eigen_values[1];
+  } // end regular case
+}
+
+// compute the eigen values and vectors of the covariance 
+// matrix and deduces the best linear fitting line
+// (this is an internal function)
+// returns fitting quality
+template < typename K, typename DiagonalizeTraits >
+typename K::FT
+fitting_line_3(typename DiagonalizeTraits::Covariance_matrix& covariance, // covariance matrix
+               const typename K::Point_3& c,       // centroid
+               typename K::Line_3& line,           // best fit line
+	       const K&,                           // kernel
+	       const DiagonalizeTraits& )                 // Diagonalize traits
+{
+  typedef typename K::FT       FT;
+  typedef typename K::Line_3   Line;
+  typedef typename K::Vector_3 Vector;
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0., 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0.,
+							0., 0., 0.,
+							0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+    // isotropic case (infinite number of directions)
+  if(eigen_values[0] == eigen_values[1] && 
+     eigen_values[0] == eigen_values[2])
+  {
+    // assemble a default line along x axis which goes
+    // through the centroid.
+    line = Line(c,Vector(FT(1),FT(0),FT(0)));
+    return (FT)0.0;
+  }
+  else
+  {
+    // regular case
+    Vector direction(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]);
+    line = Line(c,direction);
+    return (FT)1.0 - eigen_values[1] / eigen_values[2];
+  } 
+}
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parabola_2.h b/3rdparty/CGAL-4.8/include/CGAL/Parabola_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parabola_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parabola_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parabola_segment_2.h b/3rdparty/CGAL-4.8/include/CGAL/Parabola_segment_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parabola_segment_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parabola_segment_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_circulators.h b/3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_circulators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_circulators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_circulators.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_iterators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Param_mesh_patch_iterators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_iterators.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_vertex.h
new file mode 100644
index 0000000..6b78e61
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Param_mesh_patch_vertex.h
@@ -0,0 +1,442 @@
+// Copyright (c) 2005  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez, Bruno Levy
+
+
+#ifndef CGAL_PARAM_MESH_PATCH_VERTEX_H
+#define CGAL_PARAM_MESH_PATCH_VERTEX_H
+
+#include <CGAL/surface_mesh_parameterization_assertions.h>
+
+#include <list>
+
+namespace CGAL {
+
+/// \cond SKIP_IN_MANUAL
+
+// Forward reference
+template<class ParameterizationPatchableMesh_3> class Param_mesh_patch_vertex_const_handle;
+
+
+/// The class Param_mesh_patch_vertex represents a vertex
+/// of a Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> mesh.
+///
+/// Implementation note:
+/// A Param_mesh_patch_vertex object is basically a handle to a
+/// ParameterizationPatchableMesh_3::Vertex + its position / seam.
+/// Param_mesh_patch_vertex comparison methods compare the pointers.
+///
+template<class ParameterizationPatchableMesh_3>
+class Param_mesh_patch_vertex
+{
+// Private types
+private:
+
+    typedef Param_mesh_patch_vertex         Self;
+
+// Public types
+public:
+
+    /// Export template parameter type
+    typedef ParameterizationPatchableMesh_3 Adaptor;
+
+// Public operations
+public:
+
+    /// Default constructor
+    Param_mesh_patch_vertex()
+    {
+        m_vertex            = NULL;
+        m_last_cw_neighbor  = NULL;
+        m_first_cw_neighbor = NULL;
+    }
+
+    /// Constructor:
+    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
+    ///   must be NULL
+    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
+    /// defines the range of the valid neighbors of adaptor_vertex (included).
+    explicit Param_mesh_patch_vertex(
+        typename Adaptor::Vertex_handle adaptor_vertex,
+        typename Adaptor::Vertex_handle last_cw_neighbor  = typename Adaptor::Vertex_handle(),
+        typename Adaptor::Vertex_handle first_cw_neighbor = typename Adaptor::Vertex_handle())
+    {
+        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
+        CGAL_surface_mesh_parameterization_assertion( (last_cw_neighbor == NULL) ==
+                                                      (first_cw_neighbor == NULL) );
+
+        m_vertex            = adaptor_vertex;
+        m_last_cw_neighbor  = last_cw_neighbor;
+        m_first_cw_neighbor = first_cw_neighbor;
+    }
+
+    /// Copy constructor
+    Param_mesh_patch_vertex(const Self& hdl)
+    {
+        m_vertex            = hdl.m_vertex;
+        m_last_cw_neighbor  = hdl.m_last_cw_neighbor;
+        m_first_cw_neighbor = hdl.m_first_cw_neighbor;
+    }
+
+    /// operator =()
+    Self& operator =(const Self& hdl)
+    {
+        m_vertex            = hdl.m_vertex;
+        m_last_cw_neighbor  = hdl.m_last_cw_neighbor;
+        m_first_cw_neighbor = hdl.m_first_cw_neighbor;
+
+        return *this;
+    }
+
+    /// Comparison
+    bool operator==(const Param_mesh_patch_vertex& vertex) const {
+        return m_vertex            == vertex.m_vertex
+            && m_last_cw_neighbor  == vertex.m_last_cw_neighbor
+            && m_first_cw_neighbor == vertex.m_first_cw_neighbor;
+    }
+    bool operator!=(const Param_mesh_patch_vertex& vertex) const {
+        return ! (*this == vertex);
+    }
+
+    /// Get content
+    typename Adaptor::Vertex_handle vertex() {
+        return m_vertex;
+    }
+    typename Adaptor::Vertex_const_handle vertex() const {
+        return m_vertex;
+    }
+    typename Adaptor::Vertex_handle last_cw_neighbor() {
+        return m_last_cw_neighbor;
+    }
+    typename Adaptor::Vertex_const_handle last_cw_neighbor() const {
+        return m_last_cw_neighbor;
+    }
+    typename Adaptor::Vertex_handle first_cw_neighbor() {
+        return m_first_cw_neighbor;
+    }
+    typename Adaptor::Vertex_const_handle first_cw_neighbor() const {
+        return m_first_cw_neighbor;
+    }
+
+// Fields
+private:
+    /// The decorated vertex
+    typename Adaptor::Vertex_handle m_vertex;
+
+    /// [m_first_cw_neighbor, m_last_cw_neighbor] defines the range of the valid
+    /// neighbors of m_vertex (included) if m_vertex is on the main border/seam
+    /// (NULL if inner vertex)
+    typename Adaptor::Vertex_handle m_last_cw_neighbor;
+    typename Adaptor::Vertex_handle m_first_cw_neighbor;
+
+}; // Param_mesh_patch_vertex
+
+
+/// Param_mesh_patch_vertex_handle represents a handle to a
+/// Param_mesh_patch_vertex object, thus has the same behavior
+/// as Param_mesh_patch_vertex* pointer type.
+///
+/// ## Design Pattern ##
+/// Param_mesh_patch_vertex_handle is a Bridge [GHJV95].
+///
+/// Implementation note:
+/// A Param_mesh_patch_vertex_handle contains in fact a
+/// Param_mesh_patch_vertex object, which is basically
+/// a handle to a ParameterizationPatchableMesh_3::Vertex.
+/// Param_mesh_patch_vertex_handle comparison methods simply compare
+/// the address of the ParameterizationPatchableMesh_3::Vertex pointed by the handles.
+///
+template<class ParameterizationPatchableMesh_3>
+class Param_mesh_patch_vertex_handle
+{
+// Private types
+private:
+
+    typedef Param_mesh_patch_vertex_handle  Self;
+
+// Public types
+public:
+
+    /// Export template parameter type
+    typedef ParameterizationPatchableMesh_3 Adaptor;
+
+    // Iterator types
+    typedef Param_mesh_patch_vertex<ParameterizationPatchableMesh_3>
+                                            Vertex;
+    typedef Vertex                          value_type;
+    typedef std::ptrdiff_t                  difference_type;
+    typedef std::size_t                     size_type;
+    typedef Vertex&                         reference;
+    typedef Vertex*                         pointer;
+
+// Public operations
+public:
+
+    /// Constructor from ParameterizationPatchableMesh_3::Vertex pointer
+    Param_mesh_patch_vertex_handle(Vertex* ptr = NULL)
+    {
+        if (ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = *ptr;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+    }
+
+    /// Extra constructor that will create the Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex on the fly
+    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
+    ///   must be NULL
+    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
+    /// defines the range of the valid neighbors of adaptor_vertex (included).
+    explicit Param_mesh_patch_vertex_handle(
+        typename Adaptor::Vertex_handle adaptor_vertex,
+        typename Adaptor::Vertex_handle last_cw_neighbor  = typename Adaptor::Vertex_handle(),
+        typename Adaptor::Vertex_handle first_cw_neighbor = typename Adaptor::Vertex_handle())
+    {
+        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
+        m_vertex = Vertex(adaptor_vertex, last_cw_neighbor, first_cw_neighbor);
+        m_ptr = &m_vertex;
+    }
+
+    /// Copy constructor
+    Param_mesh_patch_vertex_handle(const Self& hdl)
+    {
+        if (hdl.m_ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = hdl.m_vertex;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+    }
+
+    /// operator =()
+    Self& operator =(const Self& hdl)
+    {
+        if (hdl.m_ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = hdl.m_vertex;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+
+        return *this;
+    }
+
+    /// Compare patch vertices instead of patch vertex pointers (two patch
+    /// vertex handles are equal iff they point to the same adaptor vertex)
+    bool operator==(const Self& hdl) const
+    {
+        if (m_ptr == NULL || hdl.m_ptr == NULL)
+            return m_ptr == hdl.m_ptr;
+        else
+            return *m_ptr == *(hdl.m_ptr);
+    }
+    bool operator!=(const Self& hdl) const { return ! (*this == hdl); }
+
+    /// Comparison to NULL pointer
+  
+    bool operator==(Nullptr_t ptr) const {
+        CGAL_surface_mesh_parameterization_assertion(ptr == NULL);
+        return m_ptr == ptr;
+    }
+    bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
+
+    pointer operator->()  const { return  m_ptr; }
+    reference operator*() const { return *m_ptr; }
+    operator Param_mesh_patch_vertex_const_handle<Adaptor>() const {
+        return m_ptr;
+    }
+
+// Fields
+private:
+    /// The actual pointer
+    pointer m_ptr;
+
+    /// Internal Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> vertex
+    /// pointed to by m_ptr (except if NULL)
+    Vertex m_vertex;
+
+}; // Param_mesh_patch_vertex_handle
+
+
+/// Param_mesh_patch_vertex_const_handle represents a handle to a
+/// Param_mesh_patch_vertex object, thus has the same behavior
+/// as const Param_mesh_patch_vertex* pointer type.
+///
+/// ## Design Pattern ##
+/// Param_mesh_patch_vertex_const_handle is a Bridge [GHJV95].
+///
+/// Implementation note:
+/// A Param_mesh_patch_vertex_const_handle contains in fact a Param_mesh_patch_vertex
+/// object, which is basically a handle to a ParameterizationPatchableMesh_3::Vertex.
+/// Param_mesh_patch_vertex_const_handle comparison methods basically compare
+/// the address of the ParameterizationPatchableMesh_3::Vertex pointed by the handles.
+///
+template<class ParameterizationPatchableMesh_3>
+class Param_mesh_patch_vertex_const_handle
+{
+// Private types
+private:
+
+    typedef Param_mesh_patch_vertex_const_handle
+                                            Self;
+
+// Public types
+public:
+
+    /// Export template parameter type
+    typedef ParameterizationPatchableMesh_3 Adaptor;
+
+    // Iterator types
+    typedef Param_mesh_patch_vertex<ParameterizationPatchableMesh_3>
+                                            Vertex;
+    typedef Vertex                          value_type;
+    typedef std::ptrdiff_t                  difference_type;
+    typedef std::size_t                     size_type;
+    typedef const Vertex&                   reference;
+    typedef const Vertex*                   pointer;
+
+// Public operations
+public:
+
+    /// Constructor from ParameterizationPatchableMesh_3::Vertex pointer
+    Param_mesh_patch_vertex_const_handle(const Vertex* ptr = NULL)
+    {
+        if (ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = *ptr;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+    }
+
+    /// Extra constructor that will create the Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex on the fly
+    /// - for an INNER adaptor vertex, last_cw_neighbor and first_cw_neighbor
+    ///   must be NULL
+    /// - for a SEAM/MAIN BORDER vertex, [first_cw_neighbor, last_cw_neighbor]
+    /// defines the range of the valid neighbors of adaptor_vertex (included).
+    explicit Param_mesh_patch_vertex_const_handle(
+        typename Adaptor::Vertex_const_handle adaptor_vertex,
+        typename Adaptor::Vertex_const_handle last_cw_neighbor =typename Adaptor::Vertex_const_handle(),
+        typename Adaptor::Vertex_const_handle first_cw_neighbor=typename Adaptor::Vertex_const_handle())
+    {
+        CGAL_surface_mesh_parameterization_assertion(adaptor_vertex != NULL);
+        m_vertex = Vertex((typename Adaptor::Vertex*)&*adaptor_vertex,
+                          (typename Adaptor::Vertex*)&*last_cw_neighbor,
+                          (typename Adaptor::Vertex*)&*first_cw_neighbor);
+        m_ptr = &m_vertex;
+    }
+
+    /// Copy constructor
+    Param_mesh_patch_vertex_const_handle(const Self& hdl)
+    {
+        if (hdl.m_ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = hdl.m_vertex;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+    }
+
+    /// operator =()
+    Self& operator =(const Self& hdl)
+    {
+        if (hdl.m_ptr == NULL)
+        {
+            m_vertex = Vertex();
+            m_ptr = NULL;
+        }
+        else
+        {
+            m_vertex = *hdl.m_ptr;
+            m_ptr = &m_vertex;
+        }
+
+        CGAL_surface_mesh_parameterization_assertion(m_ptr == NULL || m_ptr == &m_vertex);
+
+        return *this;
+    }
+
+    /// Compare patch vertices instead of patch vertex pointers (two patch
+    /// vertex handles are equal iff they point to the same adaptor vertex)
+    bool operator==(const Self& hdl) const
+    {
+        if (m_ptr == NULL || hdl.m_ptr == NULL)
+            return m_ptr == hdl.m_ptr;
+        else
+            return *m_ptr == *(hdl.m_ptr);
+    }
+    bool operator!=(const Self& hdl) const { return ! (*this == hdl); }
+
+    /// Comparison to NULL pointer
+    bool operator==(Nullptr_t ptr) const {
+        CGAL_surface_mesh_parameterization_assertion(ptr == NULL);
+        return m_ptr == ptr;
+    }
+    bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
+
+    pointer operator->()  const { return  m_ptr; }
+    reference operator*() const { return *m_ptr; }
+
+// Fields
+private:
+    /// The actual pointer
+    pointer m_ptr;
+
+    /// Internal Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> vertex
+    /// pointed to by m_ptr (except if NULL)
+    Vertex m_vertex;
+
+}; // Param_mesh_patch_vertex_const_handle
+
+/// \endcond
+
+} //namespace CGAL
+
+#endif //CGAL_PARAM_MESH_PATCH_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parameterization_mesh_feature_extractor.h b/3rdparty/CGAL-4.8/include/CGAL/Parameterization_mesh_feature_extractor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parameterization_mesh_feature_extractor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parameterization_mesh_feature_extractor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parameterization_mesh_patch_3.h b/3rdparty/CGAL-4.8/include/CGAL/Parameterization_mesh_patch_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parameterization_mesh_patch_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parameterization_mesh_patch_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parameterization_polyhedron_adaptor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Parameterization_polyhedron_adaptor_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parameterization_polyhedron_adaptor_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parameterization_polyhedron_adaptor_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Parameterizer_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Parameterizer_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Parameterizer_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Parameterizer_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Circulator_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Circulator_pair.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Circulator_pair.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Circulator_pair.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_edge_compare.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_edge_compare.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_edge_compare.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_edge_compare.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_less_xy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_less_xy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_less_xy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_less_xy_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_not_less_yx_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_not_less_yx_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Indirect_not_less_yx_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Indirect_not_less_yx_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Iterator_list.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Iterator_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Iterator_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Iterator_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_edge.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_edge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_edge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_edge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_traits_2_base.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_traits_2_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_traits_2_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_traits_2_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_vertex_map.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_vertex_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partition_vertex_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partition_vertex_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partitioned_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partitioned_polygon_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Partitioned_polygon_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Partitioned_polygon_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Point_pair_less_xy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Point_pair_less_xy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Point_pair_less_xy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Point_pair_less_xy_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_node_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_node_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Rotation_tree_node_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Rotation_tree_node_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Segment_less_yx_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Segment_less_yx_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Segment_less_yx_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Segment_less_yx_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Turn_reverser.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Turn_reverser.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Turn_reverser.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Turn_reverser.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Vertex_visibility_graph_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Vertex_visibility_graph_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Vertex_visibility_graph_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Vertex_visibility_graph_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/is_degenerate_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/is_degenerate_polygon_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/is_degenerate_polygon_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/is_degenerate_polygon_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_approx_convex_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_approx_convex_2.h
new file mode 100644
index 0000000..9c982c1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_approx_convex_2.h
@@ -0,0 +1,283 @@
+// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Susan Hert <hert at mpi-sb.mpg.de>
+
+#ifndef CGAL_PARTITION_APPROX_CONVEX_H
+#define CGAL_PARTITION_APPROX_CONVEX_H
+
+#include <boost/config.hpp>
+#if  (BOOST_GCC >= 40800)
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+#endif
+
+#include <CGAL/Constrained_triangulation_2.h>
+#include <CGAL/Partition_2/Triangulation_indirect_traits_2.h>
+#include <CGAL/Partition_2/Turn_reverser.h>
+#include <CGAL/Partition_2/Partitioned_polygon_2.h>
+#include <CGAL/IO/Tee_for_output_iterator.h>
+#include <CGAL/Partition_traits_2.h>
+#include <CGAL/partition_is_valid_2.h>
+#include <CGAL/Partition_2/partition_assertions.h>
+#include <CGAL/Circulator/Safe_circulator_from_iterator.h>
+#include <utility>
+#include <iterator>
+
+namespace CGAL {
+
+template< class Point_2, class Traits >
+bool partition_appx_cvx_is_edge_through_interior(const Point_2& before_s, 
+                                                 const Point_2& source,
+                                                 const Point_2& after_s, 
+                                                 const Point_2& target,
+                                                 const Traits& traits )
+{
+   // determine if the edge goes through the interior of the polygon or not
+   typedef typename Traits::Left_turn_2   Left_turn_2;
+   Left_turn_2 left_turn = traits.left_turn_2_object();
+   Turn_reverser<Point_2, Left_turn_2> right_turn(left_turn);
+   if (right_turn(before_s, source, after_s)) // concave angle
+   {
+     if (right_turn(before_s, source, target) &&
+         right_turn(target, source, after_s))
+       return false;
+   }
+   else // left turn or straight
+     if (right_turn(before_s, source, target) ||
+         right_turn(target, source, after_s))
+       return false;
+   return true;
+}
+
+
+// e_circ is a circulator for the edges incident to the point referred to by
+// v_ref, which is a circualtor around the vertices of the original polygon
+template <class Edge_circulator, class Circulator, class Triangulation, 
+          class Traits>
+bool partition_appx_cvx_cuts_nonconvex_angle( Edge_circulator e_circ, 
+                                              Circulator v_ref,
+                                              const Triangulation& triangles, 
+                                              const Traits& traits)
+{
+   typedef typename Triangulation::Segment        Segment_2;
+
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+   Segment_2 edge = triangles.segment((*e_circ).first, (*e_circ).second);
+   std::cout << "edge: " << *edge.source() << " " << *edge.target()
+             << std::endl;
+#endif
+
+   typename Triangulation::Point next_ccw_pt_ref, prev_ccw_pt_ref;
+
+   // the next and previous edges in the ccw ordering of edges around v_ref
+   Edge_circulator next_e = e_circ; next_e++;
+   Edge_circulator prev_e = e_circ; prev_e--;
+
+   // find the first edge before this one that has been included in the
+   // partition polygon (and is thus marked as constrained in triangulation)
+   while (prev_e != e_circ && (triangles.is_infinite(*prev_e) ||
+           !(*prev_e).first->is_constrained((*prev_e).second)))
+      prev_e--;
+ 
+   Segment_2  next_edge = triangles.segment((*next_e).first,(*next_e).second);
+   Segment_2  prev_edge = triangles.segment((*prev_e).first,(*prev_e).second);
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+   std::cout << "next_edge: " << *next_edge.source() << " " 
+             << *next_edge.target() <<std::endl;
+   std::cout << "prev_edge: " << *prev_edge.source() << " " 
+             << *prev_edge.target() <<std::endl;
+#endif
+   // find which endpoint is shared by the two edges
+   if (next_edge.source() == v_ref)
+      next_ccw_pt_ref = next_edge.target();
+   else
+      next_ccw_pt_ref = next_edge.source();
+   if (prev_edge.source() == v_ref)
+      prev_ccw_pt_ref = prev_edge.target();
+   else
+      prev_ccw_pt_ref = prev_edge.source();
+
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+   std::cout << "partition_appx_cvx_cuts_nonconvex_angle: next_ccw_pt " 
+             << *next_ccw_pt_ref << " v_ref " << *v_ref << " prev_ccw_pt_ref " 
+             << *prev_ccw_pt_ref << std::endl;
+#endif
+
+   typedef typename Traits::Left_turn_2    Left_turn_2;
+   typedef typename Traits::Point_2     Point_2;
+   Left_turn_2 left_turn = traits.left_turn_2_object();
+   Turn_reverser<Point_2, Left_turn_2>  right_turn(left_turn);
+   return right_turn(*next_ccw_pt_ref, *v_ref, *prev_ccw_pt_ref); 
+}
+
+
+template<class InputIterator, class Traits, class OutputIterator>
+OutputIterator partition_approx_convex_2(InputIterator first, 
+                                         InputIterator beyond,
+                                         OutputIterator result,
+                                         const Traits& traits) 
+{
+   if (first == beyond) return result;
+
+   typedef Partitioned_polygon_2< Traits >             P_Polygon_2;
+   typedef typename P_Polygon_2::iterator              I;
+   typedef Safe_circulator_from_iterator<I>            Circulator;
+   typedef Triangulation_indirect_traits_2<Circulator, Traits>  Gt;
+
+   typedef Constrained_triangulation_2<Gt>             Constrained_tri_2;
+   typedef typename Constrained_tri_2::Edge_circulator Edge_circulator;
+   typedef typename Constrained_tri_2::Vertex_iterator Tri_vertex_iterator;
+   typedef typename Constrained_tri_2::Vertex_handle   Vertex_handle;
+   typedef typename Gt::Segment_2                      Segment_2;
+
+   P_Polygon_2 polygon(first, beyond);
+
+   CGAL_partition_precondition(
+    orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE);
+
+   Circulator first_c(polygon.begin(), polygon.end(), polygon.begin());
+   Circulator c(polygon.begin(), polygon.end());
+   Circulator next(polygon.begin(), polygon.end());
+
+   Gt gt_traits(traits);
+   Constrained_tri_2 triangles(gt_traits);
+   
+   do 
+   {
+       next = c; next++;
+       triangles.insert(c, next);
+   } while (++c != first_c);
+
+   Segment_2 edge;
+   Circulator source, target, before_s, after_s;
+
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+   std::cout << "Inserting diagonals: " << std::endl;
+#endif
+
+   Edge_circulator e_circ, first_e;
+   Tri_vertex_iterator v_it;
+
+
+   for (v_it = triangles.vertices_begin(); v_it != triangles.vertices_end(); 
+        v_it++)
+   {
+       first_e = triangles.incident_edges(Vertex_handle(v_it));
+       // find the constrained edge attached to this vertex that is first
+       // when going CW from the first edge returned above.  
+       while (triangles.is_infinite(*first_e) ||  
+              !(*first_e).first->is_constrained((*first_e).second)) 
+       {
+          first_e--;
+       }
+       e_circ = first_e;
+       do 
+       {
+          if ((*e_circ).first->is_constrained((*e_circ).second))
+          {
+             edge = triangles.segment((*e_circ).first, (*e_circ).second);
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+             std::cout << "edge " <<  *edge.source() << " " << *edge.target() 
+                       << " is constrained " << std::endl;
+#endif
+          }  
+          else 
+          {
+             if (!triangles.is_infinite(*e_circ)) 
+             {
+                edge = triangles.segment((*e_circ).first, (*e_circ).second);
+                source = edge.source();
+                target = edge.target();
+                before_s = source; before_s--;
+                after_s = source; after_s++;
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+                std::cout << "considering " << *source << " " << *target 
+                          << "...";
+#endif
+                if (partition_appx_cvx_is_edge_through_interior(*before_s, 
+                                *source, *after_s, *target, traits)) 
+                {
+                   if (partition_appx_cvx_cuts_nonconvex_angle(e_circ, 
+                                 (*v_it).point(), triangles, traits)) 
+                   {
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+                      std::cout << "inserting" << std::endl;
+#endif
+                      polygon.insert_diagonal(source.unsafe_circulator()
+		                             ,target.unsafe_circulator()
+					     );
+                      triangles.insert(source, target);
+                   }
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+                   else 
+                      std::cout << "doesn't cut reflex angle" << std::endl;
+#endif
+                }
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+                else 
+                   std::cout << "not an edge through the interior" 
+                             << std::endl;
+#endif
+             }
+#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
+             std::cout << "edge is infinite " << std::endl;
+#endif
+          }
+       } while (++e_circ != first_e);
+   }
+
+#if defined(CGAL_PARTITION_NO_POSTCONDITIONS) || \
+    defined(CGAL_NO_POSTCONDITIONS)  || defined(NDEBUG)
+   OutputIterator res(result);
+#else
+   typedef typename Traits::Polygon_2                  Polygon_2;
+   Tee_for_output_iterator<OutputIterator, Polygon_2>  res(result);
+#endif // no postconditions
+
+   polygon.partition(res, 0);
+   CGAL_partition_postcondition(
+       convex_partition_is_valid_2(polygon.begin(), polygon.end(),
+                                   res.output_so_far_begin(), 
+                                   res.output_so_far_end(), traits));
+
+#if defined(CGAL_PARTITION_NO_POSTCONDITIONS) || \
+    defined(CGAL_NO_POSTCONDITIONS)  || defined(NDEBUG)
+   return res;
+#else
+   return res.to_output_iterator();
+#endif // no postconditions
+}
+
+template <class InputIterator, class OutputIterator>
+inline
+OutputIterator partition_approx_convex_2(InputIterator first, 
+                                         InputIterator beyond,
+                                         OutputIterator result)
+{
+   typedef typename std::iterator_traits<InputIterator>::value_type Point_2;
+   typedef typename Kernel_traits<Point_2>::Kernel K;
+   return partition_approx_convex_2(first, beyond, result,  
+                                    Partition_traits_2<K>());
+}
+
+}
+#if  (BOOST_GCC >= 40800)
+ _Pragma("GCC diagnostic pop")
+#endif
+#endif // CGAL_PARTITION_APPROX_CONVEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_greene_approx_convex_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_greene_approx_convex_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_greene_approx_convex_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_greene_approx_convex_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_optimal_convex_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_optimal_convex_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_optimal_convex_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_optimal_convex_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_y_monotone_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_y_monotone_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_2/partition_y_monotone_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_2/partition_y_monotone_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_is_valid_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_is_valid_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_is_valid_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_is_valid_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Partition_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Partition_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Partition_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Partition_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_Delaunay_triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_Delaunay_triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_Delaunay_triangulation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_offset_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_offset_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_offset_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_offset_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_dummy_12.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_dummy_12.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_dummy_12.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_dummy_12.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_hierarchy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_hierarchy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_hierarchy_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_hierarchy_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_hierarchy_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_hierarchy_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_hierarchy_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_iterators_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_iterators_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_iterators_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_iterators_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_statically_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_statically_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_statically_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_statically_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_2_triangulation_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_2_triangulation_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_Delaunay_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_Delaunay_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h
new file mode 100644
index 0000000..975db52
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h
@@ -0,0 +1,161 @@
+// Copyright (c) 2004,2006-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+
+
+#ifndef CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_FILTERED_TRAITS_3_H
+#define CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_FILTERED_TRAITS_3_H
+
+#include <string>
+#include <CGAL/basic.h>
+#include <CGAL/config.h>
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Uncertain.h>
+#include <CGAL/Profile_counter.h>
+#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+
+namespace CGAL {
+
+// The argument is supposed to be a Filtered_kernel like kernel.
+template < typename K, typename Off >
+class Periodic_3_Delaunay_triangulation_filtered_traits_base_3
+  : public Periodic_3_Delaunay_triangulation_traits_base_3<K, Off>
+{
+  typedef Periodic_3_Delaunay_triangulation_traits_base_3<K, Off> Base;
+
+  // Exact traits is based on the exact kernel.
+  typedef Periodic_3_Delaunay_triangulation_traits_3<typename K::Exact_kernel,
+                                            Off>
+                                                   Exact_traits;
+  // Filtering traits is based on the filtering kernel.
+  typedef Periodic_3_Delaunay_triangulation_traits_3<typename K::Approximate_kernel,
+                                            Off>
+                                                   Filtering_traits;
+private:
+  typedef typename K::C2E C2E;
+  typedef typename K::C2F C2F;
+
+  typedef typename C2E::Target_kernel::Iso_cuboid_3 Exact_iso_cuboid_3;
+  typedef typename C2F::Target_kernel::Iso_cuboid_3 Approximate_iso_cuboid_3;
+ 
+public:
+  typedef typename K::Iso_cuboid_3 Iso_cuboid_3;
+
+  void set_domain(const Iso_cuboid_3& domain) {
+    C2E c2e;
+    C2F c2f;
+    this->_domain = domain;
+    this->_domain_e = c2e(this->_domain);
+    this->_domain_f = c2f(this->_domain);
+  }
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Compare_xyz_3,
+            typename Filtering_traits::Compare_xyz_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Compare_xyz_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Coplanar_orientation_3,
+            typename Filtering_traits::Coplanar_orientation_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Coplanar_orientation_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Orientation_3,
+            typename Filtering_traits::Orientation_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Orientation_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Coplanar_side_of_bounded_circle_3,
+            typename Filtering_traits::Coplanar_side_of_bounded_circle_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Coplanar_side_of_bounded_circle_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Side_of_oriented_sphere_3,
+            typename Filtering_traits::Side_of_oriented_sphere_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Side_of_oriented_sphere_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Compare_distance_3,
+            typename Filtering_traits::Compare_distance_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Compare_distance_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Side_of_bounded_sphere_3,
+            typename Filtering_traits::Side_of_bounded_sphere_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Side_of_bounded_sphere_3;
+
+
+  Compare_xyz_3 compare_xyz_3_object() const
+  { return Compare_xyz_3(&_domain_e,&_domain_f);}
+
+  Coplanar_orientation_3 coplanar_orientation_3_object() const
+  { return Coplanar_orientation_3(&_domain_e,&_domain_f); }
+
+  Orientation_3 orientation_3_object() const
+  { return Orientation_3(&_domain_e,&_domain_f);}
+
+  Coplanar_side_of_bounded_circle_3
+  coplanar_side_of_bounded_circle_3_object() const 
+  { return Coplanar_side_of_bounded_circle_3(&_domain_e,&_domain_f); }
+
+  Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const
+  { return Side_of_oriented_sphere_3(&_domain_e,&_domain_f);}
+
+  Compare_distance_3 compare_distance_3_object() const
+  { return Compare_distance_3(&_domain_e,&_domain_f);}
+
+  Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const
+  { return Side_of_bounded_sphere_3(&_domain_e,&_domain_f);}
+
+  // The following are inherited since they are constructions :
+  // Construct_segment_3
+  // Construct_triangle_3
+  // Construct_tetrahedron_3
+  // Construct_circumcenter_3
+
+ protected:
+  Exact_iso_cuboid_3 _domain_e;
+  Approximate_iso_cuboid_3 _domain_f;
+};
+
+} //namespace CGAL
+
+#include <CGAL/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h>
+
+namespace CGAL {
+
+template < typename K, typename Off = typename CGAL::Periodic_3_offset_3 >
+class Periodic_3_Delaunay_triangulation_filtered_traits_3
+  : public Periodic_3_Delaunay_triangulation_statically_filtered_traits_3<
+  Periodic_3_Delaunay_triangulation_filtered_traits_base_3<K, Off> > {
+};
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h
new file mode 100644
index 0000000..dbbae07
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2001,2004,2008-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+ 
+#ifndef CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
+#define CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
+
+// This class gathers optimized predicates written by hand, using
+// a few steps of filtering.  It should work if the initial traits has
+// cartesian coordinates which fit exactly in doubles.
+//
+// Purely static filters code has been removed, since it requires additional
+// logic and is not plug'n play (requires users providing bounds).
+// If it should be provided again, it should probably be separate.
+
+#include <CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h>
+
+#include <CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h>
+
+// TODO :
+// - add more predicates :
+
+namespace CGAL {
+
+// The K_base argument is supposed to provide exact primitives.
+template < typename Traits >
+class Periodic_3_Delaunay_triangulation_statically_filtered_traits_3 : public Periodic_3_triangulation_statically_filtered_traits_3<Traits>
+{
+  typedef Periodic_3_Delaunay_triangulation_statically_filtered_traits_3<Traits> Self;
+
+public:
+
+  typedef internal::Static_filters_predicates::Periodic_3_side_of_oriented_sphere_3<Traits>
+    Side_of_oriented_sphere_3;
+
+  Side_of_oriented_sphere_3  side_of_oriented_sphere_3_object() const {
+    return Side_of_oriented_sphere_3(&this->_domain,
+                                     &this->_domain_e,
+                                     &this->_domain_f);
+  }
+};
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h
new file mode 100644
index 0000000..6fc2193
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h
@@ -0,0 +1,150 @@
+// Copyright (c) 2006-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+
+#ifndef CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_TRAITS_3_H
+#define CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_TRAITS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Periodic_3_offset_3.h>
+#include <CGAL/Traits_with_offsets_adaptor.h>
+#include <CGAL/Periodic_3_construct_point_3.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Periodic_3_triangulation_traits_3.h>
+
+
+namespace CGAL { 
+
+template < class Kernel, class Off = typename CGAL::Periodic_3_offset_3 >
+class Periodic_3_Delaunay_triangulation_traits_base_3
+  : public Periodic_3_triangulation_traits_base_3<Kernel, Off>
+{
+public:
+  typedef Kernel                                                 K;
+  typedef Off                                                    Offset;
+  typedef Periodic_3_triangulation_traits_base_3<K, Offset>               Base;
+  typedef Periodic_3_Delaunay_triangulation_traits_base_3< K, Offset >    Self;
+
+  typedef typename Base::RT                   RT;
+  typedef typename Base::FT                   FT;
+  typedef typename Base::Point_3              Point_3;
+  typedef typename Base::Vector_3             Vector_3;
+  typedef typename Base::Periodic_3_offset_3  Periodic_3_offset_3;
+  typedef typename Base::Iso_cuboid_3         Iso_cuboid_3;
+
+  // The next typedef is there for backward compatibility
+  // Some users take their point type from the traits class.
+  // Before this type was Point
+  typedef Point_3 Point;
+
+  typedef typename Base::Segment_3         Segment_3;
+  typedef typename Base::Triangle_3        Triangle_3;
+  typedef typename Base::Tetrahedron_3     Tetrahedron_3;
+
+  // Delaunay specific predicates
+  typedef Traits_with_offsets_adaptor<Self,
+				      typename K::Side_of_oriented_sphere_3>
+      Side_of_oriented_sphere_3;
+  typedef Traits_with_offsets_adaptor<Self, typename K::Compare_distance_3>
+      Compare_distance_3;
+   typedef Traits_with_offsets_adaptor<Self,
+ 				      typename K::Side_of_bounded_sphere_3>
+       Side_of_bounded_sphere_3;
+
+  // Degenerate dimension predicates
+  typedef Traits_with_offsets_adaptor<Self, typename K::Coplanar_orientation_3>
+      Coplanar_orientation_3;
+  typedef Traits_with_offsets_adaptor<Self,
+              typename K::Coplanar_side_of_bounded_circle_3>
+      Coplanar_side_of_bounded_circle_3;
+
+  // Delaunay specific constructions
+  typedef Traits_with_offsets_adaptor<Self,
+				      typename K::Construct_circumcenter_3>
+      Construct_circumcenter_3;
+
+  // Operations
+  Side_of_oriented_sphere_3
+  side_of_oriented_sphere_3_object() const {
+    return Side_of_oriented_sphere_3(&this->_domain);
+  }
+  Compare_distance_3
+  compare_distance_3_object() const {
+    return Compare_distance_3(&this->_domain);
+  }
+  Side_of_bounded_sphere_3
+  side_of_bounded_sphere_3_object() const {
+    return Side_of_bounded_sphere_3(&this->_domain);
+  }
+  Coplanar_orientation_3
+  coplanar_orientation_3_object() const {
+    return Coplanar_orientation_3(&this->_domain);
+  }
+  Coplanar_side_of_bounded_circle_3
+  coplanar_side_of_bounded_circle_3_object() const {
+    return Coplanar_side_of_bounded_circle_3(&this->_domain);
+  }
+  Construct_circumcenter_3
+  construct_circumcenter_3_object() const {
+    return Construct_circumcenter_3(&this->_domain);
+  }
+};
+
+template < typename K, typename Off = CGAL::Periodic_3_offset_3 >
+class Periodic_3_Delaunay_triangulation_traits_3;
+
+} //namespace CGAL
+
+// Partial specialization for Filtered_kernel<CK>.
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_Delaunay_triangulation_filtered_traits_3.h>
+
+namespace CGAL {
+
+// This declaration is needed to break the cyclic dependency.
+template < typename K, typename Off >
+class Periodic_3_Delaunay_triangulation_filtered_traits_3;
+
+template < class K, class Off>
+class Periodic_3_Delaunay_triangulation_traits_3
+  : public Periodic_3_Delaunay_triangulation_traits_base_3<K, Off>
+{
+};
+
+template < typename CK, typename Off >
+class Periodic_3_Delaunay_triangulation_traits_3 < Filtered_kernel<CK>, Off>
+  : public Periodic_3_Delaunay_triangulation_filtered_traits_3 <
+  Filtered_kernel<CK>, Off >
+{
+public:
+  typedef Filtered_kernel<CK>  Kernel;
+};
+
+template < class Off >
+class Periodic_3_Delaunay_triangulation_traits_3<CGAL::Epick, Off>
+  : public Periodic_3_Delaunay_triangulation_filtered_traits_3<CGAL::Epick, Off>
+{
+  typedef CGAL::Epick Kernel;
+};
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_DELAUNAY_TRIANGULATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_construct_point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_construct_point_3.h
new file mode 100644
index 0000000..d8f8476
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_construct_point_3.h
@@ -0,0 +1,55 @@
+// Copyright (c) 1999-2004,2006-2009,2014-2015   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
+//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+//                 Aymeric Pellé <Aymeric.Pelle at sophia.inria.fr>
+#ifndef CGAL_PERIODIC_3_CONSTRUCT_POINT_3_H
+#define CGAL_PERIODIC_3_CONSTRUCT_POINT_3_H
+
+namespace CGAL
+{
+template < typename K, typename Construct_point_3_base>
+class Periodic_3_construct_point_3 : public Construct_point_3_base
+{
+  typedef K Kernel;
+
+public:
+  typedef typename Kernel::Point_3       Point;
+  typedef typename Kernel::Offset        Offset;
+  typedef typename Kernel::Iso_cuboid_3  Iso_cuboid_3;
+
+  typedef Point       result_type;
+
+  Periodic_3_construct_point_3(const Iso_cuboid_3 & dom) : _dom(dom) { }
+
+  Point operator() ( const Point& p, const Offset& o ) const {
+    return Point(p.x()+(_dom.xmax()-_dom.xmin())*o.x(),
+  p.y()+(_dom.ymax()-_dom.ymin())*o.y(),
+  p.z()+(_dom.zmax()-_dom.zmin())*o.z());
+  }
+
+private:
+  Iso_cuboid_3 _dom;
+};
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_offset_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_offset_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_offset_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_offset_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_3.h
new file mode 100644
index 0000000..3bebc4d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_3.h
@@ -0,0 +1,4141 @@
+// Copyright (c) 1999-2003,2006-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+
+#ifndef CGAL_PERIODIC_3_TRIANGULATION_3_H
+#define CGAL_PERIODIC_3_TRIANGULATION_3_H
+
+#include <CGAL/basic.h>
+
+#include <iostream>
+#include <algorithm>
+#include <cmath>
+#include <functional>
+#include <list>
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_smallint.hpp>
+#include <boost/random/variate_generator.hpp>
+
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/use.h>
+
+#include <CGAL/Triangulation_data_structure_3.h>
+#include <CGAL/Periodic_3_triangulation_ds_cell_base_3.h>
+#include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h>
+#include <CGAL/Triangulation_cell_base_3.h>
+#include <CGAL/Triangulation_vertex_base_3.h>
+
+#include <CGAL/Periodic_3_triangulation_iterators_3.h>
+
+#include <CGAL/Unique_hash_map.h>
+
+#include <CGAL/internal/Exact_type_selector.h>
+#include <CGAL/NT_converter.h>
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+#include <CGAL/Triangulation_structural_filtering_traits.h>
+#include <CGAL/determinant.h>
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+namespace CGAL {
+
+template < class GT, class TDS > class Periodic_3_triangulation_3;
+
+template < class GT, class TDS > std::istream& operator>> 
+    (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr);
+template < class GT, class TDS > std::ostream& operator<< 
+    (std::ostream& os, const Periodic_3_triangulation_3<GT,TDS> &tr);
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+namespace internal {
+// structural filtering is performed only for EPIC
+struct Periodic_structural_filtering_3_tag {};
+struct No_periodic_structural_filtering_3_tag {};
+
+template <bool filter>
+struct Periodic_structural_filtering_selector_3 {
+#ifdef FORCE_STRUCTURAL_FILTERING
+  typedef Periodic_structural_filtering_3_tag  Tag;
+#else
+  typedef No_periodic_structural_filtering_3_tag  Tag;
+#endif
+};
+
+template <>
+struct Periodic_structural_filtering_selector_3<true> {
+  typedef Periodic_structural_filtering_3_tag  Tag;
+};
+}
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+/**\class Periodic_3_triangulation_3
+ * 
+ * \brief Implements functionality for computing in periodic space.
+ *
+ * There are several things that are special to computing in $\mathbb{T}^3$
+ * such as
+ * - periodicity --> offsets
+ * - no infinite vertex
+ * - no degenerate dimensions
+ * All functions that are affected can be found in this class. In case it is
+ * necessary to provide different implementations for Delaunay and regular
+ * triangulation, we work with visitors. 
+ */
+
+template < class GT,
+            class TDS = Triangulation_data_structure_3 <
+	      Triangulation_vertex_base_3<
+		GT, Periodic_3_triangulation_ds_vertex_base_3<>
+		>,
+              Triangulation_cell_base_3<
+                GT, Periodic_3_triangulation_ds_cell_base_3<>
+              >
+            >
+          >
+class Periodic_3_triangulation_3 
+  : public Triangulation_utils_3
+{
+  friend std::istream& operator>> <>
+  (std::istream& is, Periodic_3_triangulation_3<GT, TDS> &tr);
+
+  typedef Periodic_3_triangulation_3<GT,TDS>   Self;
+
+public:
+  typedef GT                                   Geometric_traits;
+  typedef TDS                                  Triangulation_data_structure;
+
+  typedef typename GT::Periodic_3_offset_3     Offset;
+  typedef typename GT::Iso_cuboid_3            Iso_cuboid;
+  typedef array<int, 3>                        Covering_sheets;
+  
+  typedef typename GT::Point_3                 Point;
+  typedef typename GT::Segment_3               Segment;
+  typedef typename GT::Triangle_3              Triangle;
+  typedef typename GT::Tetrahedron_3           Tetrahedron;
+
+  typedef std::pair<Point,Offset>              Periodic_point;
+  typedef array< std::pair<Point,Offset>, 2>   Periodic_segment;
+  typedef array< std::pair<Point,Offset>, 3>   Periodic_triangle;
+  typedef array< std::pair<Point,Offset>, 4>   Periodic_tetrahedron;
+
+  typedef typename TDS::Vertex                 Vertex;
+  typedef typename TDS::Cell                   Cell;
+  typedef typename TDS::Facet                  Facet;
+  typedef typename TDS::Edge                   Edge;
+
+  typedef typename TDS::Vertex_handle          Vertex_handle;
+  typedef typename TDS::Cell_handle            Cell_handle;
+  
+  typedef typename TDS::size_type              size_type;
+  typedef typename TDS::difference_type        difference_type;
+
+  typedef typename TDS::Cell_iterator          Cell_iterator;
+  typedef typename TDS::Facet_iterator         Facet_iterator;
+  typedef typename TDS::Edge_iterator          Edge_iterator;
+  typedef typename TDS::Vertex_iterator        Vertex_iterator;
+
+  typedef typename TDS::Cell_circulator        Cell_circulator;
+  typedef typename TDS::Facet_circulator       Facet_circulator;
+
+  typedef Cell_iterator                        All_cells_iterator;
+  typedef Facet_iterator                       All_facets_iterator;
+  typedef Edge_iterator                        All_edges_iterator;
+  typedef Vertex_iterator                      All_vertices_iterator;
+  typedef Periodic_3_triangulation_unique_vertex_iterator_3<Self>
+                                               Unique_vertex_iterator;
+
+private:
+  typedef typename GT::FT                      FT;
+  typedef std::pair< Vertex_handle, Offset >   Virtual_vertex;
+  typedef std::map<Vertex_handle, Virtual_vertex>
+                                               Virtual_vertex_map;
+  typedef typename Virtual_vertex_map::const_iterator
+                                               Virtual_vertex_map_it;
+  typedef std::map<Vertex_handle, std::vector<Vertex_handle > >
+                                               Virtual_vertex_reverse_map;
+  typedef typename Virtual_vertex_reverse_map::const_iterator
+                                               Virtual_vertex_reverse_map_it;
+  typedef Triple< Vertex_handle, Vertex_handle, Vertex_handle >
+                                               Vertex_triple;
+
+public:
+  typedef Periodic_3_triangulation_tetrahedron_iterator_3<Self>
+                                               Periodic_tetrahedron_iterator;
+  typedef Periodic_3_triangulation_triangle_iterator_3<Self>
+                                               Periodic_triangle_iterator;
+  typedef Periodic_3_triangulation_segment_iterator_3<Self>
+                                               Periodic_segment_iterator;
+  typedef Periodic_3_triangulation_point_iterator_3<Self>
+                                               Periodic_point_iterator;
+
+  typedef Point                                value_type;
+  typedef const value_type&                    const_reference;
+
+  typedef Tag_false Weighted_tag;
+
+public:
+  enum Iterator_type {
+    STORED=0,
+    UNIQUE, //1
+    STORED_COVER_DOMAIN, //2
+    UNIQUE_COVER_DOMAIN };//3
+
+  enum Locate_type {
+    VERTEX=0, 
+    EDGE, //1
+    FACET, //2
+    CELL, //3
+    EMPTY , //4
+    OUTSIDE_CONVEX_HULL, // unused, for compatibility with Alpha_shape_3
+    OUTSIDE_AFFINE_HULL }; // unused, for compatibility with Alpha_shape_3
+
+private:
+  Geometric_traits  _gt;
+  Triangulation_data_structure _tds; 
+  Iso_cuboid _domain;
+  /// This threshold should be chosen such that if all edges are shorter,
+  /// we can be sure that there are no self-edges anymore.
+  FT edge_length_threshold;
+  
+  /// This adjacency list stores all edges that are longer than
+  /// edge_length_threshold.
+  std::map< Vertex_handle, std::list<Vertex_handle> > too_long_edges;
+  unsigned int too_long_edge_counter;
+  
+  /// map of offsets for periodic copies of vertices
+  Virtual_vertex_map virtual_vertices;
+  Virtual_vertex_reverse_map  virtual_vertices_reverse;
+
+protected:
+  /// v_offsets temporarily stores all the vertices on the border of a
+  /// conflict region.
+  mutable std::vector<Vertex_handle> v_offsets;
+
+private:
+  /// Determines if we currently compute in 3-cover or 1-cover.
+  Covering_sheets _cover;
+
+public:
+  /** @name Creation */ //@{
+  Periodic_3_triangulation_3(
+      const Iso_cuboid & domain = Iso_cuboid(0,0,0,1,1,1),
+      const Geometric_traits & gt = Geometric_traits())
+    : _gt(gt), _tds(), _domain(domain), too_long_edge_counter(0) {
+    _gt.set_domain(_domain);
+    typedef typename internal::Exact_field_selector<FT>::Type EFT;
+    typedef NT_converter<FT,EFT> NTC;
+    CGAL_USE_TYPE(NTC);
+    CGAL_triangulation_assertion_code( NTC ntc; )
+    CGAL_triangulation_precondition(ntc(_domain.xmax())-ntc(_domain.xmin())
+	== ntc(_domain.ymax())-ntc(_domain.ymin()));
+    CGAL_triangulation_precondition(ntc(_domain.ymax())-ntc(_domain.ymin())
+	== ntc(_domain.zmax())-ntc(_domain.zmin()));
+    CGAL_triangulation_precondition(ntc(_domain.zmax())-ntc(_domain.zmin())
+	== ntc(_domain.xmax())-ntc(_domain.xmin()));
+    _cover = make_array(3,3,3);
+    init_tds();
+    edge_length_threshold = FT(0.166) * (_domain.xmax()-_domain.xmin())
+                                      * (_domain.xmax()-_domain.xmin());
+  }
+
+private:
+  // Copy constructor helpers
+  class Finder;
+  void copy_multiple_covering(const Periodic_3_triangulation_3 & tr);
+public:
+  // Copy constructor duplicates vertices and cells
+  Periodic_3_triangulation_3(const Periodic_3_triangulation_3 & tr)
+    : _gt(tr.geom_traits()),
+      _domain(tr._domain),
+      edge_length_threshold(tr.edge_length_threshold),
+      _cover(tr._cover) {
+    if (is_1_cover()) {
+      _tds = tr.tds();
+    } else {
+      copy_multiple_covering(tr);
+    }
+    CGAL_triangulation_expensive_postcondition(*this == tr);
+  }
+  
+  /** @name Assignment */ //@{
+  Periodic_3_triangulation_3 & operator=(Periodic_3_triangulation_3 tr) {
+    swap(tr);
+    return *this;
+  }
+  
+  void swap(Periodic_3_triangulation_3 &tr) {
+    std::swap(tr._gt, _gt);
+    _tds.swap(tr._tds);
+    std::swap(_domain,tr._domain);
+    std::swap(edge_length_threshold,tr.edge_length_threshold);
+    std::swap(too_long_edges,tr.too_long_edges);
+    std::swap(too_long_edge_counter,tr.too_long_edge_counter);
+    std::swap(virtual_vertices,tr.virtual_vertices);
+    std::swap(virtual_vertices_reverse,tr.virtual_vertices_reverse);
+    std::swap(_cover, tr._cover);
+  }
+
+  /// Clears the triangulation and initializes it again.
+  void clear() {
+    _tds.clear();
+    init_tds();
+    too_long_edges.clear();
+    too_long_edge_counter = 0;
+    virtual_vertices.clear();
+    virtual_vertices_reverse.clear();
+    _cover = make_array(3,3,3);
+    v_offsets.clear();
+  }
+  //@}
+
+private:
+  /// Initializes the triangulation data structure
+  void init_tds() {
+    _tds.set_dimension(-2);
+    v_offsets.reserve(48);
+  }
+
+public:
+  /** @name Access functions */ //@{
+  const Geometric_traits& geom_traits() const { return _gt; }
+  const TDS & tds() const { return _tds; }
+  TDS & tds() { return _tds; }
+
+  const Iso_cuboid & domain() const { return _domain; }
+  // TODO: Documentation and tests
+  void set_domain(const Iso_cuboid & domain) {
+    clear();
+    _domain = domain;
+    _gt.set_domain(domain);
+    edge_length_threshold = FT(0.166) * (_domain.xmax()-_domain.xmin())
+                                      * (_domain.xmax()-_domain.xmin());
+  }
+
+  const Covering_sheets & number_of_sheets() const { return _cover; }
+  const std::pair<Vertex_handle, Offset> original_vertex(
+      const Vertex_handle v) const {
+    return (virtual_vertices.find(v) == virtual_vertices.end()) ?
+      std::make_pair(v,Offset()) : virtual_vertices.find(v)->second;
+  }
+  const std::vector<Vertex_handle>& periodic_copies(
+      const Vertex_handle v) const {
+    CGAL_triangulation_precondition(number_of_sheets() != make_array(1,1,1) );
+    CGAL_triangulation_precondition(
+	virtual_vertices.find(v) == virtual_vertices.end());
+    CGAL_triangulation_assertion(
+	virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end());
+    return virtual_vertices_reverse.find(v)->second;
+  }
+
+  bool is_extensible_triangulation_in_1_sheet_h1() const;
+  bool is_extensible_triangulation_in_1_sheet_h2() const;
+  bool is_triangulation_in_1_sheet() const;
+
+  void convert_to_1_sheeted_covering();
+  void convert_to_27_sheeted_covering();
+
+  size_type number_of_cells() const {
+    if (is_1_cover()) return _tds.number_of_cells();
+    else return _tds.number_of_cells()/27;
+  }
+  size_type number_of_facets() const {
+    if (is_1_cover()) return _tds.number_of_facets();
+    else return _tds.number_of_facets()/27;
+  }
+  size_type number_of_edges() const {
+    if (is_1_cover()) return _tds.number_of_edges();
+    else return _tds.number_of_edges()/27;
+  }
+  size_type number_of_vertices() const {
+    if (is_1_cover()) return _tds.number_of_vertices();
+    else return _tds.number_of_vertices()/27;
+  }
+
+  size_type number_of_stored_cells() const {
+    return _tds.number_of_cells();
+  }
+  size_type number_of_stored_facets() const {
+    return _tds.number_of_facets();
+  }
+  size_type number_of_stored_edges() const {
+    return _tds.number_of_edges();
+  }
+  size_type number_of_stored_vertices() const {
+    return _tds.number_of_vertices();
+  }
+
+protected:
+  bool is_1_cover() const {
+    bool flag;
+    flag = ((_cover[0] == 1) && (_cover[1] == 1) && (_cover[2] == 1));
+    return flag;
+  }
+
+public:
+  bool is_virtual(Vertex_handle v) {
+    if (is_1_cover()) return false;
+    return (virtual_vertices.find(v) != virtual_vertices.end());
+  }
+
+public:
+  // Offset converters
+  int off_to_int(const Offset & off) const {
+    CGAL_triangulation_assertion( off.x()==0 || off.x() ==1 );
+    CGAL_triangulation_assertion( off.y()==0 || off.y() ==1 );
+    CGAL_triangulation_assertion( off.z()==0 || off.z() ==1 );
+    int i = ((off.x()&1)<<2) + ((off.y()&1)<<1) + ((off.z()&1));
+    return i;
+  }
+  Offset int_to_off(int i) const {
+    return Offset((i>>2)&1,(i>>1)&1,i&1);
+  }
+
+
+  void set_offsets(Cell_handle c, int o0,int o1,int o2,int o3) {
+    int off0[3] = {(o0>>2)&1,(o0>>1)&1,(o0&1)};
+    int off1[3] = {(o1>>2)&1,(o1>>1)&1,(o1&1)};
+    int off2[3] = {(o2>>2)&1,(o2>>1)&1,(o2&1)};
+    int off3[3] = {(o3>>2)&1,(o3>>1)&1,(o3&1)};
+    for (int i=0; i<3; i++) {
+      int min_off = (std::min)((std::min)(off0[i],off1[i]),
+			       (std::min)(off2[i],off3[i]));
+      if (min_off != 0) {
+	off0[i] -= min_off; off1[i] -= min_off;
+	off2[i] -= min_off; off3[i] -= min_off;
+      }
+    }
+    o0 = ((off0[0]&1)<<2)+((off0[1]&1)<<1)+(off0[2]&1);
+    o1 = ((off1[0]&1)<<2)+((off1[1]&1)<<1)+(off1[2]&1);
+    o2 = ((off2[0]&1)<<2)+((off2[1]&1)<<1)+(off2[2]&1);
+    o3 = ((off3[0]&1)<<2)+((off3[1]&1)<<1)+(off3[2]&1);
+    c->set_offsets(o0,o1,o2,o3);
+  }
+ 
+  template <class Offset> 
+  void set_offsets(Cell_handle c, Offset o0,Offset o1,Offset o2,Offset o3) {
+    int off0[3] = {o0.x(),o0.y(),o0.z()};
+    int off1[3] = {o1.x(),o1.y(),o1.z()};
+    int off2[3] = {o2.x(),o2.y(),o2.z()};
+    int off3[3] = {o3.x(),o3.y(),o3.z()};
+    for (int i=0; i<3; i++) {
+      int min_off = (std::min)((std::min)(off0[i],off1[i]),
+			       (std::min)(off2[i],off3[i]));
+      if (min_off != 0) {
+	off0[i] -= min_off; off1[i] -= min_off;
+	off2[i] -= min_off; off3[i] -= min_off;
+      }
+    }
+
+    CGAL_triangulation_assertion((std::min)((std::min)(off0[0],off1[0]),
+			      (std::min)(off2[0],off3[0])) == 0);
+    CGAL_triangulation_assertion((std::min)((std::min)(off0[1],off1[1]),
+			      (std::min)(off2[1],off3[1])) == 0);
+    CGAL_triangulation_assertion((std::min)((std::min)(off0[2],off1[2]),
+			      (std::min)(off2[2],off3[2])) == 0);
+    CGAL_triangulation_assertion((0 <= off0[0]) && (off0[0] < 2));
+    CGAL_triangulation_assertion((0 <= off1[0]) && (off1[0] < 2));
+    CGAL_triangulation_assertion((0 <= off2[0]) && (off2[0] < 2));
+    CGAL_triangulation_assertion((0 <= off3[0]) && (off3[0] < 2));
+    CGAL_triangulation_assertion((0 <= off0[1]) && (off0[1] < 2));
+    CGAL_triangulation_assertion((0 <= off1[1]) && (off1[1] < 2));
+    CGAL_triangulation_assertion((0 <= off2[1]) && (off2[1] < 2));
+    CGAL_triangulation_assertion((0 <= off3[1]) && (off3[1] < 2));
+    CGAL_triangulation_assertion((0 <= off0[2]) && (off0[2] < 2));
+    CGAL_triangulation_assertion((0 <= off1[2]) && (off1[2] < 2));
+    CGAL_triangulation_assertion((0 <= off2[2]) && (off2[2] < 2));
+    CGAL_triangulation_assertion((0 <= off3[2]) && (off3[2] < 2));
+
+    int o0i = ((off0[0]&1)<<2)+((off0[1]&1)<<1)+(off0[2]&1);
+    int o1i = ((off1[0]&1)<<2)+((off1[1]&1)<<1)+(off1[2]&1);
+    int o2i = ((off2[0]&1)<<2)+((off2[1]&1)<<1)+(off2[2]&1);
+    int o3i = ((off3[0]&1)<<2)+((off3[1]&1)<<1)+(off3[2]&1);
+    c->set_offsets(o0i,o1i,o2i,o3i);
+  }
+
+public:
+  /** @name Wrapping the traits */ //@{
+  Comparison_result compare_xyz(const Point &p1, const Point &p2) const {
+    return geom_traits().compare_xyz_3_object()(p1,p2);
+  }
+  Comparison_result compare_xyz(const Point &p1, const Point&p2,
+      const Offset &o1, const Offset &o2) const {
+    return geom_traits().compare_xyz_3_object()(p1,p2,o1,o2);
+  }
+
+  Orientation orientation(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
+      const {
+    return geom_traits().orientation_3_object()(p1,p2,p3,p4);
+  }
+  Orientation orientation(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
+      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
+      const {
+    return geom_traits().orientation_3_object()(p1,p2,p3,p4,o1,o2,o3,o4);
+  }
+
+  bool equal(const Point &p1, const Point &p2) const {
+    return compare_xyz(p1,p2) == EQUAL;
+  }
+  bool equal(const Point &p1, const Point &p2,
+      const Offset &o1, const Offset &o2) const {
+    return compare_xyz(p1,p2,o1,o2) == EQUAL;
+  }
+
+  bool coplanar(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
+      const {
+    return orientation(p1,p2,p3,p4) == COPLANAR;
+  }
+  bool coplanar(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
+      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
+      const {
+    return orientation(p1,p2,p3,p4,o1,o2,o3,o4) == COPLANAR;
+  }
+
+  Periodic_tetrahedron construct_periodic_3_tetrahedron(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
+      const {
+    return make_array(std::make_pair(p1,Offset()), std::make_pair(p2,Offset()),
+	std::make_pair(p3,Offset()), std::make_pair(p4,Offset()));
+  }
+  Periodic_tetrahedron construct_periodic_3_tetrahedron(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
+      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
+      const {
+    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2),
+	std::make_pair(p3,o3), std::make_pair(p4,o4));
+  }
+
+  Periodic_triangle construct_periodic_3_triangle(
+      const Point &p1, const Point &p2, const Point &p3) const {
+    return make_array(std::make_pair(p1,Offset()),
+	std::make_pair(p2,Offset()), std::make_pair(p3,Offset()));
+  }
+  Periodic_triangle construct_periodic_3_triangle(
+      const Point &p1, const Point &p2, const Point &p3,
+      const Offset &o1, const Offset &o2, const Offset &o3) const {
+    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2),
+	std::make_pair(p3,o3));
+  }
+
+  Periodic_segment construct_periodic_3_segment(
+      const Point &p1, const Point &p2) const {
+    return make_array(std::make_pair(p1,Offset()), std::make_pair(p2,Offset()));
+  }
+  Periodic_segment construct_periodic_3_segment(
+      const Point &p1, const Point &p2,
+      const Offset &o1, const Offset &o2) const {
+    return make_array(std::make_pair(p1,o1), std::make_pair(p2,o2));
+  }
+
+  Tetrahedron construct_tetrahedron(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4)
+      const {
+    return geom_traits().construct_tetrahedron_3_object()(p1,p2,p3,p4);
+  }
+  Tetrahedron construct_tetrahedron(
+      const Point &p1, const Point &p2, const Point &p3, const Point &p4,
+      const Offset &o1, const Offset &o2, const Offset &o3, const Offset &o4)
+      const {
+    return geom_traits().construct_tetrahedron_3_object()(p1,p2,p3,p4,
+	o1,o2,o3,o4);
+  }
+  Tetrahedron construct_tetrahedron(const Periodic_tetrahedron& tet) {
+    return construct_tetrahedron(
+	tet[0].first, tet[1].first, tet[2].first, tet[3].first,
+	tet[0].second, tet[1].second, tet[2].second, tet[3].second);
+  }
+
+  Triangle construct_triangle(
+      const Point &p1, const Point &p2, const Point &p3) const {
+    return geom_traits().construct_triangle_3_object()(p1,p2,p3);
+  }
+  Triangle construct_triangle(
+      const Point &p1, const Point &p2, const Point &p3,
+      const Offset &o1, const Offset &o2, const Offset &o3) const {
+    return geom_traits().construct_triangle_3_object()(p1,p2,p3,o1,o2,o3);
+  }
+  Triangle construct_triangle(const Periodic_triangle& tri) {
+    return construct_triangle(tri[0].first, tri[1].first, tri[2].first,
+       tri[0].second, tri[1].second, tri[2].second);
+  }
+
+  Segment construct_segment(const Point &p1, const Point &p2) const {
+    return geom_traits().construct_segment_3_object()(p1, p2);
+  }
+  Segment construct_segment(const Point &p1, const Point &p2,
+    const Offset &o1, const Offset &o2) const {
+    return geom_traits().construct_segment_3_object()(p1,p2,o1,o2);
+  }
+  Segment construct_segment(const Periodic_segment& seg) const {
+    return construct_segment(seg[0].first, seg[1].first,
+	seg[0].second, seg[1].second);
+  }
+
+  Point construct_point(const Point& p, const Offset &o) const {
+    return geom_traits().construct_point_3_object()(p,o);
+  }
+  Point construct_point(const Periodic_point& pp) const {
+    return construct_point(pp.first, pp.second);
+  }
+  //@}
+
+public:
+  /** @name Geometric access functions */ //@{
+  Periodic_point periodic_point( const Vertex_handle v ) const {
+    if (is_1_cover()) return std::make_pair(v->point(), Offset(0,0,0));
+    Virtual_vertex_map_it it = virtual_vertices.find(v);
+    if (it == virtual_vertices.end()) {
+      // if v is not contained in virtual_vertices, then it is in the
+      // original domain.
+      return std::make_pair(v->point(), Offset(0,0,0));
+    } else {
+      // otherwise it has to be looked up as well as its offset.
+      return std::make_pair(it->second.first->point(), it->second.second);
+    }
+  }
+  Periodic_point periodic_point( const Cell_handle c, int i) const {
+    if (is_1_cover()) return std::make_pair(c->vertex(i)->point(),
+					    int_to_off(c->offset(i)));
+    Virtual_vertex_map_it it = virtual_vertices.find(c->vertex(i));
+    if (it == virtual_vertices.end()) {
+      // if c->vertex(i) is not contained in virtual_vertices, then it
+      // is in the original domain.
+      return std::make_pair(c->vertex(i)->point(), 
+	  combine_offsets(Offset(),int_to_off(c->offset(i))) );
+    } else {
+      // otherwise it has to be looked up as well as its offset.
+      return std::make_pair(it->second.first->point(),
+	  combine_offsets(it->second.second, int_to_off(c->offset(i))) );
+    }
+  }
+
+  Periodic_segment periodic_segment(const Cell_handle c, int i, int j) const {
+    CGAL_triangulation_precondition( i != j );
+    CGAL_triangulation_precondition( number_of_vertices() != 0 );
+    CGAL_triangulation_precondition( i >= 0 && i <= 3 
+        && j >= 0 && j <= 3 );
+    return make_array( std::make_pair(c->vertex(i)->point(),
+				      get_offset(c,i)),
+		       std::make_pair(c->vertex(j)->point(),
+				      get_offset(c,j)) );
+  }
+  Periodic_segment periodic_segment(const Edge & e) const {
+    return periodic_segment(e.first,e.second,e.third);
+  }
+
+  Periodic_triangle periodic_triangle(const Cell_handle c, int i) const;
+  Periodic_triangle periodic_triangle(const Facet & f) const {
+    return periodic_triangle(f.first, f.second);
+  }
+
+  Periodic_tetrahedron periodic_tetrahedron(const Cell_handle c) const {
+    CGAL_triangulation_precondition( number_of_vertices() != 0 );
+    return make_array(
+        std::make_pair(c->vertex(0)->point(), get_offset(c,0)),
+	std::make_pair(c->vertex(1)->point(), get_offset(c,1)),
+        std::make_pair(c->vertex(2)->point(), get_offset(c,2)),
+	std::make_pair(c->vertex(3)->point(), get_offset(c,3)) );
+  }
+
+  Point point(const Periodic_point & pp) const {
+    return construct_point(pp.first, pp.second);
+  }
+  Segment segment(const Periodic_segment & ps) const {
+    return construct_segment(ps[0].first,ps[1].first,ps[0].second,ps[1].second);
+  }
+  Triangle triangle(const Periodic_triangle & pt) const {
+    return construct_triangle(pt[0].first, pt[1].first, pt[2].first,
+			      pt[0].second,pt[1].second,pt[2].second);
+  }
+  Tetrahedron tetrahedron(const Periodic_tetrahedron & pt) const {
+    return construct_tetrahedron(pt[0].first, pt[1].first,
+				 pt[2].first, pt[3].first,
+				 pt[0].second,pt[1].second,
+				 pt[2].second,pt[3].second);
+  }
+  // @}
+
+  /** @name Queries */ //@{
+  bool is_vertex(const Point & p, Vertex_handle & v) const;
+
+  bool is_vertex(Vertex_handle v) const {
+    return _tds.is_vertex(v);
+  }
+  bool is_edge(Vertex_handle u, Vertex_handle v,
+      Cell_handle & c, int & i, int & j) const {
+    return _tds.is_edge(u, v, c, i, j);
+  }
+  bool is_edge(Vertex_handle u, const Offset & off_u,
+	       Vertex_handle v, const Offset & off_v,
+      Cell_handle & c, int & i, int & j) const {
+    if (!_tds.is_edge(u,v,c,i,j)) return false;
+    if ((get_offset(c,i) == off_u) && (get_offset(c,j) == off_v))
+      return true;
+    // it might be that different cells containing (u,v) yield
+    // different offsets, which forces us to test for all possibilities.
+    else {
+      Cell_circulator ccirc = incident_cells(c,i,j,c);
+      while (++ccirc != c) {
+	i = ccirc->index(u);
+	j = ccirc->index(v);
+	if ((get_offset(ccirc,i) == off_u) && (get_offset(ccirc,j) == off_v)) {
+	  c = ccirc;
+	  return true;
+	}
+      }
+      return false;
+    }
+  }
+  bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
+      Cell_handle & c, int & i, int & j, int & k) const {
+    return _tds.is_facet(u, v, w, c, i, j, k);
+  }
+  bool is_facet(Vertex_handle u, const Offset & off_u,
+		Vertex_handle v, const Offset & off_v,
+		Vertex_handle w, const Offset & off_w,
+      Cell_handle & c, int & i, int & j, int & k) const {
+    if (!_tds.is_facet(u,v,w,c,i,j,k)) return false;
+    if ((get_offset(c,i) == off_u)
+	&& (get_offset(c,j) == off_v)
+	&& (get_offset(c,k) == off_w) )
+      return true;
+    // it might be that c and c->neighbor(l) yield different offsets
+    // which forces us to test for both possibilities.
+    else {
+      int l = 6-i-j-k;
+      c = c->neighbor(l);
+      i = c->index(u);
+      j = c->index(v);
+      k = c->index(w);      
+      return ((get_offset(c,i) == off_u)
+	  && (get_offset(c,j) == off_v)
+	  && (get_offset(c,k) == off_w) );
+    }
+  }
+  bool is_cell(Cell_handle c) const {
+    return _tds.is_cell(c);
+  }
+  bool is_cell(Vertex_handle u, Vertex_handle v,
+      Vertex_handle w, Vertex_handle t,
+      Cell_handle & c, int & i, int & j, int & k, int & l) const {
+    return _tds.is_cell(u, v, w, t, c, i, j, k, l);
+  }
+  bool is_cell(Vertex_handle u, Vertex_handle v, Vertex_handle w,
+      Vertex_handle t, Cell_handle & c) const {
+    int i,j,k,l;
+    return _tds.is_cell(u, v, w, t, c, i, j, k, l);
+  }
+  bool is_cell(Vertex_handle u, const Offset & off_u,
+	       Vertex_handle v, const Offset & off_v,
+	       Vertex_handle w, const Offset & off_w,
+	       Vertex_handle t, const Offset & off_t,
+      Cell_handle & c, int & i, int & j, int & k, int & l) const {
+    if (!_tds.is_cell(u,v,w,t,c,i,j,k,l)) return false;
+    return ((get_offset(c,i) == off_u)
+	    && (get_offset(c,j) == off_v)
+	    && (get_offset(c,k) == off_w)
+	    && (get_offset(c,l) == off_t) );
+    return false;
+  }
+  bool is_cell(Vertex_handle u, const Offset & off_u,
+	       Vertex_handle v, const Offset & off_v,
+	       Vertex_handle w, const Offset & off_w,
+	       Vertex_handle t, const Offset & off_t,
+	       Cell_handle & c) const {
+    int i, j, k, l;
+    return is_cell(u,off_u,v,off_v,w,off_w,t,off_t,c,i,j,k,l);
+  }
+
+  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const {
+    return _tds.has_vertex(f.first, f.second, v, j);
+  }
+  bool has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const {
+    return _tds.has_vertex(c, i, v, j);
+  }
+  bool has_vertex(const Facet & f, Vertex_handle v) const {
+    return _tds.has_vertex(f.first, f.second, v);
+  }
+  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const {
+    return _tds.has_vertex(c, i, v);
+  }
+  
+  bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const {
+    return _tds.are_equal(c, i, n, j);
+  }
+  bool are_equal(const Facet & f, const Facet & g) const {
+    return _tds.are_equal(f.first, f.second, g.first, g.second);
+  }
+  bool are_equal(const Facet & f, Cell_handle n, int j) const {
+    return _tds.are_equal(f.first, f.second, n, j);
+  }
+  //@}
+
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+  Cell_handle
+  periodic_locate(const Point & p, const Offset &o_p,
+	 Locate_type & lt, int & li, int & lj,
+	 Cell_handle start = Cell_handle()) const;
+#else // no CGAL_NO_STRUCTURAL_FILTERING
+#  ifndef CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+#    define CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
+#  endif // no CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+
+public:
+  Cell_handle
+  inexact_periodic_locate(const Point& p, const Offset &o_p,
+                 Cell_handle start = Cell_handle(),
+                 int max_num_cells = CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const;
+protected:
+  Cell_handle
+  exact_periodic_locate(const Point& p, const Offset &o_p,
+               Locate_type& lt,
+               int& li, int & lj,
+               Cell_handle start) const;
+
+  Cell_handle
+  generic_periodic_locate(const Point& p, const Offset &o_p,
+                 Locate_type& lt,
+                 int& li, int & lj,
+                 Cell_handle start,
+                 internal::Periodic_structural_filtering_3_tag) const {
+    return exact_periodic_locate(p, o_p, lt, li, lj, inexact_periodic_locate(p, o_p, start));
+  }
+
+  Cell_handle
+  generic_periodic_locate(const Point& p, const Offset &o_p,
+                 Locate_type& lt,
+                 int& li, int & lj,
+                 Cell_handle start,
+                 internal::No_periodic_structural_filtering_3_tag) const {
+    return exact_periodic_locate(p, o_p, lt, li, lj, start);
+  }
+
+  Orientation
+  inexact_orientation(const Point &p, const Point &q,
+                      const Point &r, const Point &s) const
+  {
+    const double px = to_double(p.x());
+    const double py = to_double(p.y());
+    const double pz = to_double(p.z());
+    const double qx = to_double(q.x());
+    const double qy = to_double(q.y());
+    const double qz = to_double(q.z());
+    const double rx = to_double(r.x());
+    const double ry = to_double(r.y());
+    const double rz = to_double(r.z());
+    const double sx = to_double(s.x());
+    const double sy = to_double(s.y());
+    const double sz = to_double(s.z());
+
+    const double pqx = qx - px;
+    const double pqy = qy - py;
+    const double pqz = qz - pz;
+    const double prx = rx - px;
+    const double pry = ry - py;
+    const double prz = rz - pz;
+    const double psx = sx - px;
+    const double psy = sy - py;
+    const double psz = sz - pz;
+
+    const double det = determinant(pqx, pqy, pqz,
+                                   prx, pry, prz,
+                                   psx, psy, psz);
+    if (det > 0) return POSITIVE;
+    if (det < 0) return NEGATIVE;
+    return ZERO;
+  }
+
+  Orientation
+  inexact_orientation(const Point &p, const Point &q,
+                      const Point &r, const Point &s,
+                      const Offset& o_p, const Offset& o_q,
+                      const Offset& o_r, const Offset& o_s) const
+  {
+    return inexact_orientation(construct_point(p, o_p),
+        construct_point(q, o_q),
+        construct_point(r, o_r),
+        construct_point(s, o_s));
+  }
+
+public:
+
+  Cell_handle
+  periodic_locate(const Point & p, const Offset &o_p,
+         Locate_type & lt, int & li, int & lj,
+         Cell_handle start = Cell_handle()) const
+  {
+    typedef Triangulation_structural_filtering_traits<Geometric_traits> TSFT;
+    typedef typename internal::Periodic_structural_filtering_selector_3<
+      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
+
+    return generic_periodic_locate(p, o_p, lt, li, lj, start, Should_filter_tag());
+  }
+
+  Cell_handle
+  inexact_locate(const Point& p,
+                 Cell_handle start = Cell_handle(),
+                 int max_num_cells = CGAL_PT3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const
+  {
+	  return inexact_periodic_locate(p, Offset(), start, max_num_cells);
+  }
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+protected:
+  /** @name Location helpers */ //@{
+//  Cell_handle periodic_locate(const Point & p, const Offset &o_p,
+//    Locate_type & lt, int & li, int & lj, Cell_handle start) const;
+
+  Bounded_side side_of_cell(const Point & p, const Offset &off,
+      Cell_handle c, Locate_type & lt, int & i, int & j) const;
+  //@}
+  
+public:
+  /** @name Point Location */ //@{
+  /** Wrapper function for locate if only the request point is given.
+    */
+  Cell_handle locate(const Point & p, Cell_handle start=Cell_handle()) const {
+    Locate_type lt;
+    int li, lj;
+    return locate( p, lt, li, lj, start);
+  }
+  
+  /** Wrapper function calling locate with an empty offset if there was no
+    * offset given.
+    */
+  Cell_handle locate(const Point & p, Locate_type & lt, int & li, int & lj,
+      Cell_handle start = Cell_handle()) const {
+    return periodic_locate(p, Offset(), lt, li, lj, start);
+  }
+
+  Bounded_side side_of_cell(const Point & p,
+      Cell_handle c, Locate_type & lt, int & i, int & j) const {
+    if (number_of_vertices() == 0) {
+      lt = EMPTY;
+      return ON_UNBOUNDED_SIDE;
+    }
+    return side_of_cell(p,Offset(),c,lt,i,j);
+  }
+  //@}
+
+private:
+  /** @name Insertion helpers */ //@{
+  template <class CellIt>
+  void insert_too_long_edges(Vertex_handle v,
+      const CellIt begin, const CellIt end);
+
+  template <class CellIt>
+  void delete_too_long_edges(const CellIt begin, const CellIt end);
+
+  template < class Conflict_tester, class Point_hider >
+  Vertex_handle periodic_insert(const Point& p, const Offset& o, Locate_type lt,
+      Cell_handle c, const Conflict_tester &tester,
+      Point_hider &hider, Vertex_handle vh = Vertex_handle());
+
+  template <class Point_iterator, class Offset_iterator>
+  void periodic_sort(Point_iterator /*p_begin*/, Point_iterator /*p_end*/,
+                     Offset_iterator /*o_begin*/, Offset_iterator /*o_end*/) const {
+    std::cout << "Periodic_sort not yet implemented" << std::endl;
+  }
+
+  Vertex_handle create_initial_triangulation(const Point &p);
+public:
+  std::vector<Vertex_handle> insert_dummy_points();
+  
+protected:
+  // this is needed for compatibility reasons
+  template <class Conflict_test, class OutputIteratorBoundaryFacets,
+      class OutputIteratorCells, class OutputIteratorInternalFacets>
+  Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
+         OutputIteratorInternalFacets>
+  find_conflicts(Cell_handle c,
+      const Conflict_test &tester,
+      Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
+      OutputIteratorInternalFacets> it) const {
+    Offset off = get_location_offset(tester, c);
+    return find_conflicts(c,off,tester,it);
+  }
+
+  template <class Conflict_test, class OutputIteratorBoundaryFacets,
+      class OutputIteratorCells, class OutputIteratorInternalFacets>
+  Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
+         OutputIteratorInternalFacets>
+  find_conflicts(Cell_handle c, const Offset &current_off,
+      const Conflict_test &tester,
+      Triple<OutputIteratorBoundaryFacets, OutputIteratorCells,
+      OutputIteratorInternalFacets> it) const;
+  //@}
+  
+protected:
+  // COMMON INSERTION for DELAUNAY and REGULAR TRIANGULATION
+  template < class Conflict_tester, class Point_hider >
+  Vertex_handle insert_in_conflict(const Point & p, Cell_handle start,
+      const Conflict_tester &tester, Point_hider &hider) {
+    Locate_type lt = Locate_type();
+    int li=0, lj=0;
+    Cell_handle c = periodic_locate(p, Offset(), lt, li, lj, start);
+    return insert_in_conflict(p,lt,c,li,lj,tester,hider);
+  }
+
+  template < class Conflict_tester, class Point_hider >
+  Vertex_handle insert_in_conflict(const Point & p, Locate_type lt,
+    Cell_handle c, int li, int lj, const Conflict_tester &tester,
+    Point_hider &hider);
+
+  template < class InputIterator, class Conflict_tester,
+      class Point_hider>
+  std::vector<Vertex_handle> insert_in_conflict(
+      InputIterator begin, InputIterator end, Cell_handle start,
+      Conflict_tester &tester, Point_hider &hider) {
+    Vertex_handle new_vertex;
+    std::vector<Vertex_handle> double_vertices;
+    Locate_type lt = Locate_type();
+    int li=0, lj=0;
+    CGAL_triangulation_assertion_code( Locate_type lta = Locate_type(); )
+    CGAL_triangulation_assertion_code( int ia = 0; )
+    CGAL_triangulation_assertion_code( int ja = 0; )
+    Cell_handle hint;
+    while (begin!=end) {
+      tester.set_point(*begin);
+      hint = periodic_locate(*begin, Offset(), lt, li, lj, start);
+      CGAL_triangulation_assertion_code( if (number_of_vertices() != 0) { );
+	CGAL_triangulation_assertion(side_of_cell(
+		*begin,Offset(), hint, lta, ia, ja) != ON_UNBOUNDED_SIDE);
+	CGAL_triangulation_assertion(lta == lt);
+	CGAL_triangulation_assertion(ia == li);
+	CGAL_triangulation_assertion(ja == lj);
+      CGAL_triangulation_assertion_code( } );
+
+      new_vertex = insert_in_conflict(*begin,lt,hint,li,lj,tester,hider);
+      if (lt == VERTEX) double_vertices.push_back(new_vertex);
+      start = new_vertex->cell();
+      begin++;
+    }
+    return double_vertices;
+  }
+  //@}
+
+private:
+  /** @name Removal helpers */ //@{
+  Vertex_triple make_vertex_triple(const Facet& f) const {
+    Cell_handle ch = f.first;
+    int i = f.second;
+    return Vertex_triple(ch->vertex(vertex_triple_index(i,0)),
+        ch->vertex(vertex_triple_index(i,1)),
+        ch->vertex(vertex_triple_index(i,2))); 
+  }
+
+  void make_canonical(Vertex_triple& t) const;
+
+  void make_hole(Vertex_handle v, std::map<Vertex_triple,Facet> &outer_map,
+      std::vector<Cell_handle> &hole);
+
+  template < class PointRemover >
+  void periodic_remove(Vertex_handle v, PointRemover &remover); 
+  //@}
+  
+protected:
+  /** @name Removal */ //@{
+  template < class PointRemover, class CT >
+  void remove(Vertex_handle v, PointRemover &remover, CT &ct);
+  //@}
+
+public:
+  /** @name Traversal */ //@{
+  Cell_iterator cells_begin() const {
+    return _tds.cells_begin();
+  }
+  Cell_iterator cells_end() const {
+    return _tds.cells_end();
+  }
+
+  Vertex_iterator vertices_begin() const {
+    return _tds.vertices_begin();
+  }
+  Vertex_iterator vertices_end() const {
+    return _tds.vertices_end();
+  }
+
+  Edge_iterator edges_begin() const {
+    return _tds.edges_begin();
+  }
+  Edge_iterator edges_end() const {
+    return _tds.edges_end();
+  }
+
+  Facet_iterator facets_begin() const {
+    return _tds.facets_begin();
+  }
+  Facet_iterator facets_end() const {
+    return _tds.facets_end();
+  }
+
+  Cell_iterator finite_cells_begin() const {
+    return _tds.cells_begin();
+  }
+  Cell_iterator finite_cells_end() const {
+    return _tds.cells_end();
+  }
+
+  Vertex_iterator finite_vertices_begin() const {
+    return _tds.vertices_begin();
+  }
+  Vertex_iterator finite_vertices_end() const {
+    return _tds.vertices_end();
+  }
+
+  Edge_iterator finite_edges_begin() const {
+    return _tds.edges_begin();
+  }
+  Edge_iterator finite_edges_end() const {
+    return _tds.edges_end();
+  }
+
+  Facet_iterator finite_facets_begin() const {
+    return _tds.facets_begin();
+  }
+  Facet_iterator finite_facets_end() const {
+    return _tds.facets_end();
+  }
+
+  All_cells_iterator all_cells_begin() const {
+    return _tds.cells_begin();
+  }
+  All_cells_iterator all_cells_end() const {
+    return _tds.cells_end();
+  }
+
+  All_vertices_iterator all_vertices_begin() const {
+    return _tds.vertices_begin();
+  }
+  All_vertices_iterator all_vertices_end() const {
+    return _tds.vertices_end();
+  }
+
+  All_edges_iterator all_edges_begin() const {
+    return _tds.edges_begin();
+  }
+  All_edges_iterator all_edges_end() const {
+    return _tds.edges_end();
+  }
+
+  All_facets_iterator all_facets_begin() const {
+    return _tds.facets_begin();
+  }
+  All_facets_iterator all_facets_end() const {
+    return _tds.facets_end();
+  }
+  
+  Unique_vertex_iterator unique_vertices_begin() const {
+    return CGAL::filter_iterator(vertices_end(), Domain_tester<Self>(this),
+	                         vertices_begin());
+  }
+  Unique_vertex_iterator unique_vertices_end() const {
+    return CGAL::filter_iterator(vertices_end(), Domain_tester<Self>(this));
+  }
+
+  // Geometric iterators
+  Periodic_tetrahedron_iterator periodic_tetrahedra_begin(
+      Iterator_type it = STORED) const {
+    return Periodic_tetrahedron_iterator(this, it);
+  }
+  Periodic_tetrahedron_iterator periodic_tetrahedra_end(
+      Iterator_type it = STORED) const {
+    return Periodic_tetrahedron_iterator(this, 1, it);
+  }
+
+  Periodic_triangle_iterator periodic_triangles_begin(
+      Iterator_type it = STORED) const {
+    return Periodic_triangle_iterator(this, it);
+  }
+  Periodic_triangle_iterator periodic_triangles_end(
+      Iterator_type it = STORED) const {
+    return Periodic_triangle_iterator(this, 1, it);
+  }
+
+  Periodic_segment_iterator periodic_segments_begin(
+      Iterator_type it = STORED) const {
+    return Periodic_segment_iterator(this, it);
+  }
+  Periodic_segment_iterator periodic_segments_end(
+      Iterator_type it = STORED) const {
+    return Periodic_segment_iterator(this, 1, it);
+  }
+
+  Periodic_point_iterator periodic_points_begin(
+      Iterator_type it = STORED) const {
+    return Periodic_point_iterator(this, it);
+  }
+  Periodic_point_iterator periodic_points_end(
+      Iterator_type it = STORED) const  {
+    return Periodic_point_iterator(this, 1, it);
+  }
+
+  // Circulators
+  Cell_circulator incident_cells(const Edge & e) const {
+    return _tds.incident_cells(e);
+  }
+  Cell_circulator incident_cells(Cell_handle c, int i, int j) const {
+    return _tds.incident_cells(c, i, j);
+  }
+  Cell_circulator incident_cells(const Edge & e, Cell_handle start) const {
+    return _tds.incident_cells(e, start);
+  }
+  Cell_circulator incident_cells(Cell_handle c, int i, int j, 
+      Cell_handle start) const {
+    return _tds.incident_cells(c, i, j, start);
+  }
+
+  Facet_circulator incident_facets(const Edge & e) const {
+    return _tds.incident_facets(e);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j) const {
+    return _tds.incident_facets(c, i, j);
+  }
+  Facet_circulator incident_facets(const Edge & e, const Facet & start) const {
+    return _tds.incident_facets(e, start);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j, 
+      const Facet & start) const {
+    return _tds.incident_facets(c, i, j, start);
+  }
+  Facet_circulator incident_facets(const Edge & e,
+      Cell_handle start, int f) const {
+    return _tds.incident_facets(e, start, f);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j, 
+      Cell_handle start, int f) const {
+    return _tds.incident_facets(c, i, j, start, f);
+  }
+
+  // around a vertex
+  template <class OutputIterator>
+  OutputIterator incident_cells(Vertex_handle v, OutputIterator cells) const {
+    return _tds.incident_cells(v, cells);
+  }
+
+  template <class OutputIterator>
+  OutputIterator incident_facets(Vertex_handle v, OutputIterator facets) const {
+    return _tds.incident_facets(v, facets);
+  }
+
+  template <class OutputIterator>
+  OutputIterator incident_edges(
+      Vertex_handle v, OutputIterator edges) const {
+    return _tds.incident_edges(v, edges);
+  }
+
+  template <class OutputIterator>
+  OutputIterator adjacent_vertices(
+      Vertex_handle v, OutputIterator vertices) const {
+    return _tds.adjacent_vertices(v, vertices);
+  }
+
+  //deprecated, don't use anymore
+  template <class OutputIterator>
+  OutputIterator incident_vertices(
+      Vertex_handle v, OutputIterator vertices) const {
+    return _tds.adjacent_vertices(v, vertices);
+  }
+
+  size_type degree(Vertex_handle v) const {
+    return _tds.degree(v);
+  }
+
+  // Functions forwarded from TDS.
+  int mirror_index(Cell_handle c, int i) const {
+    return _tds.mirror_index(c, i);
+  }
+
+  Vertex_handle mirror_vertex(Cell_handle c, int i) const {
+    return _tds.mirror_vertex(c, i);
+  }
+
+  Facet mirror_facet(Facet f) const {
+    return _tds.mirror_facet(f);
+  }
+  //@}
+  
+private:
+  /** @name Checking helpers */ //@{
+  /// calls has_self_edges for every cell of the triangulation
+  bool has_self_edges() const {
+    Cell_iterator it;
+    for ( it = all_cells_begin(); it != all_cells_end(); ++it )
+      if (has_self_edges(it)) return true;
+    return false;
+  }
+  bool has_self_edges(Cell_handle c) const;
+  //@}
+  
+public:
+  /** @name Checking */ //@{
+  bool is_valid(bool verbose = false, int level = 0) const;
+  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
+protected:
+  template <class ConflictTester>
+  bool is_valid_conflict(ConflictTester &tester, bool verbose = false,
+      int level = 0) const;
+  //@}
+
+protected:
+  /** @name Functors */ //@{
+  template < class Cmp >
+  class Perturbation_order;
+  //@}
+
+public:
+  // undocumented access functions
+  Offset get_offset(Cell_handle ch, int i) const {
+    if (is_1_cover()) return int_to_off(ch->offset(i));
+    Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i));
+    if (it != virtual_vertices.end())
+      return combine_offsets(it->second.second, int_to_off(ch->offset(i)));
+    else return combine_offsets(Offset(), int_to_off(ch->offset(i)));
+  }
+  Offset get_offset(Vertex_handle vh) const {
+    if (is_1_cover()) return Offset();
+    Virtual_vertex_map_it it = virtual_vertices.find(vh);
+    if (it != virtual_vertices.end()) return it->second.second;
+    else return Offset();
+  }
+  Vertex_handle get_original_vertex(Vertex_handle vh) const {
+    if (is_1_cover()) return vh;
+    Virtual_vertex_map_it it = virtual_vertices.find(vh);
+    if (it != virtual_vertices.end()) return it->second.first;
+    else return vh;
+  }
+  Offset combine_offsets(const Offset& o_c, const Offset& o_t) const {
+    Offset o_ct(_cover[0]*o_t.x(),_cover[1]*o_t.y(),_cover[2]*o_t.z());
+    return o_c + o_ct;
+  }
+
+  // These functions give the pair (vertex, offset) that corresponds to the
+  // i-th vertex of cell ch or vertex vh, respectively.
+  void get_vertex(Cell_handle ch, int i, Vertex_handle &vh, Offset &off) const;
+  void get_vertex(Vertex_handle vh_i, Vertex_handle &vh, Offset &off) const;
+
+protected:
+  // Auxiliary functions
+  int find_too_long_edges(std::map<Vertex_handle,
+      std::list<Vertex_handle> >& edges) const;
+  Cell_handle get_cell(const Vertex_handle* vh) const;
+  template<class Conflict_tester>
+  Offset get_location_offset(const Conflict_tester& tester,
+	  Cell_handle c) const;
+
+  Offset get_neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const;
+  
+  /** @name Friends */ //@{
+  friend class Perturbation_order<typename GT::Compare_xyz_3>;
+  friend std::istream& operator>> <>
+      (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr);
+  friend std::ostream& operator<< <>
+      (std::ostream& os, const Periodic_3_triangulation_3<GT,TDS> &tr);
+  //@}
+
+  // unused and undocumented function required to be compatible to
+  // Alpha_shape_3
+public:
+  Point point(Cell_handle c, int idx) const {
+    //    if (is_1_cover())
+      return point(periodic_point(c,idx));
+
+    Offset vec_off[4];
+    for (int i=0 ; i<4 ; i++) vec_off[i] = periodic_point(c,i).second;
+    int ox = vec_off[0].x();
+    int oy = vec_off[0].y();
+    int oz = vec_off[0].z();
+    for (int i=1 ; i<4 ; i++) {
+      ox = (std::min)(ox,vec_off[i].x());
+      oy = (std::min)(oy,vec_off[i].y());
+      oz = (std::min)(oz,vec_off[i].z());
+    }
+    Offset diff_off(-ox,-oy,-oz);
+    if (diff_off.is_null()) return point(periodic_point(c,idx));
+
+    for (unsigned int i=0 ; i<4 ; i++) vec_off[i] += diff_off;
+    Vertex_handle canonic_vh[4];
+    for (int i=0 ; i<4 ; i++) {
+      Virtual_vertex_map_it vvmit = virtual_vertices.find(c->vertex(i));
+      Vertex_handle orig_vh;
+      if (vvmit == virtual_vertices.end()) orig_vh = c->vertex(i);
+      else orig_vh = vvmit->second.first;
+      if (vec_off[i].is_null()) canonic_vh[i] = orig_vh;
+      else {
+	CGAL_assertion(virtual_vertices_reverse.find(orig_vh)
+	    != virtual_vertices_reverse.end());
+	canonic_vh[i] = virtual_vertices_reverse.find(orig_vh)
+	  ->second[9*vec_off[i][0]+3*vec_off[i][1]+vec_off[i][2]-1];
+      }
+    }
+    
+    std::vector<Cell_handle> cells;
+    incident_cells(canonic_vh[0], std::back_inserter(cells));
+    for (unsigned int i=0 ; i<cells.size() ; i++) {
+      CGAL_assertion(cells[i]->has_vertex(canonic_vh[0]));
+      if (cells[i]->has_vertex(canonic_vh[1])
+	  && cells[i]->has_vertex(canonic_vh[2])
+	  && cells[i]->has_vertex(canonic_vh[3]) )
+	return point(periodic_point(cells[i],cells[i]->index(canonic_vh[idx])));
+    }
+    CGAL_assertion(false);
+  return Point();
+  }
+};
+
+template < class GT, class TDS >
+inline void
+Periodic_3_triangulation_3<GT,TDS>::
+copy_multiple_covering(const Periodic_3_triangulation_3<GT,TDS> & tr) {  
+  // Write the respective offsets in the vertices to make them
+  // automatically copy with the tds.
+  for (Vertex_iterator vit = tr.vertices_begin() ;
+       vit != tr.vertices_end() ; ++vit) {
+    vit->set_offset(tr.get_offset(vit));
+  }
+  // copy the tds
+  _tds = tr.tds();
+  // make a list of all vertices that belong to the original
+  // domain and initialize the basic structure of
+  // virtual_vertices_reverse
+  std::list<Vertex_handle> vlist;
+  for (Vertex_iterator vit = vertices_begin() ;
+       vit != vertices_end() ; ++vit) {
+    if (vit->offset() == Offset()) {
+      vlist.push_back(vit);
+      virtual_vertices_reverse.insert(
+	  std::make_pair(vit,std::vector<Vertex_handle>(26)));
+      CGAL_triangulation_assertion(virtual_vertices_reverse.find(vit)
+	  ->second.size() == 26);
+    }
+  }     
+  // Iterate over all vertices that are not in the original domain
+  // and construct the respective entries to virtual_vertices and
+  // virtual_vertices_reverse
+  for (Vertex_iterator vit2 = vertices_begin() ;
+       vit2 != vertices_end() ; ++vit2) {
+    if (vit2->offset() != Offset()) {
+      //TODO: use some binding, maybe boost instead of the Finder.
+      typename std::list<Vertex_handle>::iterator vlist_it
+	= std::find_if(vlist.begin(), vlist.end(),
+		       Finder(this,vit2->point()));
+      Offset off = vit2->offset();
+      virtual_vertices.insert(std::make_pair(vit2,
+					     std::make_pair(*vlist_it,off)));
+      virtual_vertices_reverse.find(*vlist_it)
+	->second[9*off[0]+3*off[1]+off[2]-1]=vit2;
+      CGAL_triangulation_assertion(get_offset(vit2) == off);
+    }
+  }
+  // Cleanup vertex offsets
+  for (Vertex_iterator vit = vertices_begin() ;
+       vit != vertices_end() ; ++vit)
+    vit->clear_offset();
+  for (Vertex_iterator vit = tr.vertices_begin() ;
+       vit != tr.vertices_end() ; ++vit)
+    vit->clear_offset();
+  // Build up the too_long_edges container
+  too_long_edge_counter = 0;
+  too_long_edges.clear();
+  for (Vertex_iterator vit = vertices_begin() ;
+       vit != vertices_end() ; ++vit) 
+    too_long_edges[vit] = std::list<Vertex_handle>();
+  std::pair<Vertex_handle, Vertex_handle> edge_to_add;
+  Point p1,p2;
+  int i,j;
+  for (Edge_iterator eit = edges_begin() ;
+       eit != edges_end() ; ++eit) {
+    if (&*(eit->first->vertex(eit->second))
+	< &*(eit->first->vertex(eit->third))) {
+      i = eit->second; j = eit->third;
+    } else {
+      i = eit->third; j = eit->second;
+    }
+    edge_to_add = std::make_pair(eit->first->vertex(i),
+				 eit->first->vertex(j));
+    p1 = construct_point(eit->first->vertex(i)->point(),
+	get_offset(eit->first, i));
+    p2 = construct_point(eit->first->vertex(j)->point(),
+	get_offset(eit->first, j));
+    Vertex_handle v_no = eit->first->vertex(i);
+    if (squared_distance(p1,p2) > edge_length_threshold) {
+      CGAL_triangulation_assertion(
+	  find(too_long_edges[v_no].begin(),
+	       too_long_edges[v_no].end(),
+	       edge_to_add.second) == too_long_edges[v_no].end());
+      too_long_edges[v_no].push_back(edge_to_add.second);
+      too_long_edge_counter++;
+    }
+  }
+}
+
+template < class GT, class TDS >
+inline bool
+Periodic_3_triangulation_3<GT,TDS>::
+is_extensible_triangulation_in_1_sheet_h1() const {
+  if (!is_1_cover()) {
+    if (too_long_edge_counter == 0) return true;
+    else return false;
+  } else {
+    typename Geometric_traits::FT longest_edge_squared_length(0);
+    Segment s;
+    for (Periodic_segment_iterator psit = periodic_segments_begin(UNIQUE);
+ 	 psit != periodic_segments_end(UNIQUE) ; ++psit) {
+      s = construct_segment(*psit);
+      longest_edge_squared_length = (std::max)(longest_edge_squared_length,
+	  s.squared_length());
+    }
+    return (longest_edge_squared_length < edge_length_threshold);
+  }
+}
+
+template < class GT, class TDS >
+inline bool
+Periodic_3_triangulation_3<GT,TDS>::
+is_extensible_triangulation_in_1_sheet_h2() const {
+  typedef typename Geometric_traits::Construct_circumcenter_3
+    Construct_circumcenter;
+  typedef typename Geometric_traits::FT FT;
+  Construct_circumcenter construct_circumcenter
+    = _gt.construct_circumcenter_3_object();
+  for (Periodic_tetrahedron_iterator tit = periodic_tetrahedra_begin(UNIQUE) ;
+       tit != periodic_tetrahedra_end(UNIQUE) ; ++tit) {
+    Point cc = construct_circumcenter(
+	tit->at(0).first, tit->at(1).first,
+	tit->at(2).first, tit->at(3).first,
+	tit->at(0).second, tit->at(1).second,
+	tit->at(2).second, tit->at(3).second);
+
+    if ( !(FT(16)*squared_distance(cc,point(tit->at(0)))
+	    < (_domain.xmax()-_domain.xmin())*(_domain.xmax()-_domain.xmin())) )
+      return false;
+  }
+  return true;
+}
+
+template < class GT, class TDS >
+inline bool
+Periodic_3_triangulation_3<GT,TDS>::
+is_triangulation_in_1_sheet() const {
+  if (is_1_cover()) return true;
+  for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) {
+    if (virtual_vertices.find(vit) == virtual_vertices.end()) continue;
+    std::vector<Vertex_handle> nb_v;
+    std::set<Vertex_handle> nb_v_odom;
+    Vertex_handle vh;
+    Offset off;
+    adjacent_vertices(vit, std::back_inserter(nb_v));
+    for (unsigned int i=0; i<nb_v.size(); i++) {
+      get_vertex(nb_v[i],vh,off);
+      nb_v_odom.insert(vh);
+    }
+    if (nb_v.size() != nb_v_odom.size()) 
+      return false;
+  }
+  return true;
+}
+
+template < class GT, class TDS >
+inline bool
+Periodic_3_triangulation_3<GT,TDS>::
+is_vertex(const Point & p, Vertex_handle & v) const
+{
+  Locate_type lt;
+  int li, lj;
+  Cell_handle c = locate( p, lt, li, lj );
+  if ( lt != VERTEX )
+    return false;
+  v = c->vertex(li);
+  return true;
+}
+
+template < class GT, class TDS >
+inline void
+Periodic_3_triangulation_3<GT,TDS>::
+make_canonical(Vertex_triple& t) const
+{
+  int i = (&*(t.first) < &*(t.second))? 0 : 1;
+  if(i==0) {
+    i = (&*(t.first) < &*(t.third))? 0 : 2;
+  } else {
+    i = (&*(t.second) < &*(t.third))? 1 : 2;
+  }
+  Vertex_handle tmp; 
+  switch(i){
+  case 0: return;
+  case 1:
+    tmp = t.first;
+    t.first = t.second;
+    t.second = t.third;
+    t.third = tmp;
+    return;
+  default:
+    tmp = t.first;
+    t.first = t.third;
+    t.third = t.second;
+    t.second = tmp;
+  }
+}
+
+template < class GT, class TDS >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Periodic_triangle
+Periodic_3_triangulation_3<GT,TDS>::
+periodic_triangle(const Cell_handle c, int i) const
+{ 
+  CGAL_triangulation_precondition( number_of_vertices() != 0 );
+  CGAL_triangulation_precondition( i >= 0 && i <= 3 );
+  if ( (i&1)==0 ) 
+    return make_array(std::make_pair(c->vertex( (i+2)&3 )->point(),
+				     get_offset(c,(i+2)&3)),
+		      std::make_pair(c->vertex( (i+1)&3 )->point(),
+				     get_offset(c,(i+1)&3)),
+		      std::make_pair(c->vertex( (i+3)&3 )->point(),
+				     get_offset(c,(i+3)&3)) );
+  return make_array(std::make_pair(c->vertex( (i+1)&3 )->point(),
+				   get_offset(c,(i+1)&3)),
+		    std::make_pair(c->vertex( (i+2)&3 )->point(),
+				   get_offset(c,(i+2)&3)),
+		    std::make_pair(c->vertex( (i+3)&3 )->point(),
+				   get_offset(c,(i+3)&3)) );
+}
+
+/** Assumes a point, an offset, and a cell to start from.
+  * Gives the locate type and the simplex (cell and indices) containing p.
+  *
+  * Performs a remembering stochastic walk if the triangulation is not empty.
+  * After the walk the type of the simplex containing p is determined.
+  *
+  * returns the cell p lies in
+  * starts at cell "start"
+  * returns a cell Cell_handel if lt == CELL
+  * returns a facet (Cell_handle,li) if lt == FACET
+  * returns an edge (Cell_handle,li,lj) if lt == EDGE
+  * returns a vertex (Cell_handle,li) if lt == VERTEX
+  */
+template < class GT, class TDS >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
+Periodic_3_triangulation_3<GT,TDS>::
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+periodic_locate
+#else
+exact_periodic_locate
+#endif
+(const Point & p, const Offset &o_p,
+    Locate_type & lt, int & li, int & lj, Cell_handle start) const {
+  int cumm_off = 0;
+  Offset off_query = o_p;
+  if (number_of_vertices() == 0) {
+    lt = EMPTY;
+    return Cell_handle();
+  }
+  CGAL_triangulation_assertion(number_of_vertices() != 0);
+
+  if (start == Cell_handle()) {
+    start = cells_begin();
+  }
+
+  cumm_off = start->offset(0) | start->offset(1)
+    | start->offset(2) | start->offset(3);
+  if (is_1_cover() && cumm_off != 0) {
+    if (((cumm_off & 4) == 4) && (FT(2)*p.x()<(_domain.xmax()+_domain.xmin())))
+      off_query += Offset(1,0,0);
+    if (((cumm_off & 2) == 2) && (FT(2)*p.y()<(_domain.ymax()+_domain.ymin())))
+      off_query += Offset(0,1,0);
+    if (((cumm_off & 1) == 1) && (FT(2)*p.z()<(_domain.zmax()+_domain.zmin())))
+      off_query += Offset(0,0,1);
+  }
+
+  CGAL_triangulation_postcondition(start!=Cell_handle());
+  CGAL_triangulation_assertion(start->neighbor(0)->neighbor(
+      start->neighbor(0)->index(start))==start);
+  CGAL_triangulation_assertion(start->neighbor(1)->neighbor(
+      start->neighbor(1)->index(start))==start);
+  CGAL_triangulation_assertion(start->neighbor(2)->neighbor(
+      start->neighbor(2)->index(start))==start);
+  CGAL_triangulation_assertion(start->neighbor(3)->neighbor(
+      start->neighbor(3)->index(start))==start);
+
+  // We implement the remembering visibility/stochastic walk.
+  
+  // Remembers the previous cell to avoid useless orientation tests.
+  Cell_handle previous = Cell_handle();
+  Cell_handle c = start;
+  
+  // Stores the results of the 4 orientation tests.  It will be used
+  // at the end to decide if p lies on a face/edge/vertex/interior.
+  Orientation o[4];
+  
+  boost::rand48 rng;      
+  boost::uniform_smallint<> four(0, 3);
+  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die4(rng, four);
+
+  
+  // Now treat the cell c.
+try_next_cell:
+  // For the remembering stochastic walk,
+  // we need to start trying with a random index :
+  int i = die4();
+  // For the remembering visibility walk (Delaunay only), we don't :
+  // int i = 0;
+
+  cumm_off =
+    c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
+
+  bool simplicity_criterion = (cumm_off == 0) && (off_query.is_null());
+
+  // We know that the 4 vertices of c are positively oriented.
+  // So, in order to test if p is seen outside from one of c's facets,
+  // we just replace the corresponding point by p in the orientation
+  // test.  We do this using the arrays below.
+
+  Offset off[4];
+  const Point* pts[4] = { &(c->vertex(0)->point()),
+      &(c->vertex(1)->point()),
+      &(c->vertex(2)->point()),
+      &(c->vertex(3)->point()) };
+
+  if (!simplicity_criterion && is_1_cover() ) {
+    for (int i=0; i<4; i++) {
+      off[i] = int_to_off(c->offset(i));
+    }
+  }
+  
+  if (!is_1_cover()) {
+    // Just fetch the vertices of c as points with offsets
+    for (int i=0; i<4; i++) {
+      pts[i] = &(c->vertex(i)->point());
+      off[i] = get_offset(c,i);
+    }
+  }
+  
+  for (int j=0; j != 4; ++j, i = (i+1)&3) {
+    Cell_handle next = c->neighbor(i);
+    if (previous == next) {
+      o[i] = POSITIVE;
+      continue;
+    }
+    
+    CGAL_triangulation_assertion(next->neighbor(next->index(c)) == c);
+    
+    // We temporarily put p at i's place in pts.
+    const Point* backup = pts[i];
+    pts[i] = &p;
+    
+    if (simplicity_criterion && is_1_cover() ) {
+      o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]);
+      
+      if ( o[i] != NEGATIVE ) {
+        pts[i] = backup;
+        continue;
+      }
+    }
+    else {
+      Offset backup_off;
+      
+      backup_off = off[i];
+      off[i] = off_query;
+      o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3],
+          off[0], off[1], off[2], off[3]);
+
+      if ( o[i] != NEGATIVE ) {
+        pts[i] = backup;
+        off[i] = backup_off;
+        continue;
+      }
+    }
+
+    // Test whether we need to adapt the offset of the query point.
+    // This means, if we get out of the current cover.
+    off_query = combine_offsets(off_query, get_neighbor_offset(c,i,next));
+    previous = c;
+    c = next;
+    goto try_next_cell;
+  }
+
+  
+  // Ok, now we have found the cell. It remains to find the dimension of the
+  // intersected simplex.
+  // now p is in c or on its boundary
+  int sum = ( o[0] == COPLANAR )
+    + ( o[1] == COPLANAR )
+    + ( o[2] == COPLANAR )
+    + ( o[3] == COPLANAR );
+  switch (sum) {
+  case 0:
+      lt = CELL;
+      break;
+  case 1:
+      lt = FACET;
+      li = ( o[0] == COPLANAR ) ? 0 :
+          ( o[1] == COPLANAR ) ? 1 :
+          ( o[2] == COPLANAR ) ? 2 : 3;
+      break;
+  case 2:
+    lt = EDGE;
+    li = ( o[0] != COPLANAR ) ? 0 :
+        ( o[1] != COPLANAR ) ? 1 : 2;
+    lj = ( o[li+1] != COPLANAR ) ? li+1 :
+        ( o[li+2] != COPLANAR ) ? li+2 : li+3;
+    break;
+  case 3:
+    lt = VERTEX;
+    li = ( o[0] != COPLANAR ) ? 0 :
+        ( o[1] != COPLANAR ) ? 1 :
+        ( o[2] != COPLANAR ) ? 2 : 3;
+    break;
+  default:
+    // Vertex can not lie on four facets
+    CGAL_triangulation_assertion(false);
+  }
+  return c;
+}
+
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+template < class GT, class TDS >
+typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
+Periodic_3_triangulation_3<GT,TDS>::
+inexact_periodic_locate(const Point& p, const Offset& o_p,
+               Cell_handle start,
+               int n_of_turns) const
+{
+	int cumm_off = 0;
+	Offset off_query = o_p;
+	if (number_of_vertices() == 0) {
+		return Cell_handle();
+	}
+	CGAL_triangulation_assertion(number_of_vertices() != 0);
+
+	if (start == Cell_handle()) {
+		start = cells_begin();
+	}
+
+	cumm_off = start->offset(0) | start->offset(1)
+	    		| start->offset(2) | start->offset(3);
+	if (is_1_cover() && cumm_off != 0) {
+		if (((cumm_off & 4) == 4) && (FT(2)*p.x()<(_domain.xmax()+_domain.xmin())))
+			off_query += Offset(1,0,0);
+		if (((cumm_off & 2) == 2) && (FT(2)*p.y()<(_domain.ymax()+_domain.ymin())))
+			off_query += Offset(0,1,0);
+		if (((cumm_off & 1) == 1) && (FT(2)*p.z()<(_domain.zmax()+_domain.zmin())))
+			off_query += Offset(0,0,1);
+	}
+
+	CGAL_triangulation_postcondition(start!=Cell_handle());
+	CGAL_triangulation_assertion(start->neighbor(0)->neighbor(
+			start->neighbor(0)->index(start))==start);
+	CGAL_triangulation_assertion(start->neighbor(1)->neighbor(
+			start->neighbor(1)->index(start))==start);
+	CGAL_triangulation_assertion(start->neighbor(2)->neighbor(
+			start->neighbor(2)->index(start))==start);
+	CGAL_triangulation_assertion(start->neighbor(3)->neighbor(
+			start->neighbor(3)->index(start))==start);
+
+	// We implement the remembering visibility/stochastic walk.
+
+	// Remembers the previous cell to avoid useless orientation tests.
+	Cell_handle previous = Cell_handle();
+	Cell_handle c = start;
+
+	// Now treat the cell c.
+try_next_cell:
+  --n_of_turns;
+	cumm_off =
+			c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
+
+	bool simplicity_criterion = (cumm_off == 0) && (off_query.is_null());
+
+	// We know that the 4 vertices of c are positively oriented.
+	// So, in order to test if p is seen outside from one of c's facets,
+	// we just replace the corresponding point by p in the orientation
+	// test.  We do this using the arrays below.
+
+	Offset off[4];
+	const Point* pts[4] = { &(c->vertex(0)->point()),
+			&(c->vertex(1)->point()),
+			&(c->vertex(2)->point()),
+			&(c->vertex(3)->point()) };
+
+	if (!simplicity_criterion && is_1_cover() ) {
+		for (int i=0; i<4; i++) {
+			off[i] = int_to_off(c->offset(i));
+		}
+	}
+
+	if (!is_1_cover()) {
+		// Just fetch the vertices of c as points with offsets
+		for (int i=0; i<4; i++) {
+			pts[i] = &(c->vertex(i)->point());
+			off[i] = get_offset(c,i);
+		}
+	}
+
+	for (int i=0; i != 4; ++i) {
+		Cell_handle next = c->neighbor(i);
+		if (previous == next) {
+			continue;
+		}
+
+		// We temporarily put p at i's place in pts.
+		const Point* backup = pts[i];
+		pts[i] = &p;
+
+		if (simplicity_criterion && is_1_cover() ) {
+			if ( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE ) {
+				pts[i] = backup;
+				continue;
+			}
+		}
+		else {
+			Offset backup_off;
+
+			backup_off = off[i];
+			off[i] = off_query;
+
+			if ( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3],
+					off[0], off[1], off[2], off[3]) != NEGATIVE ) {
+				pts[i] = backup;
+				off[i] = backup_off;
+				continue;
+			}
+		}
+
+		// Test whether we need to adapt the offset of the query point.
+		// This means, if we get out of the current cover.
+		off_query = combine_offsets(off_query, get_neighbor_offset(c,i,next));
+		previous = c;
+		c = next;
+		if (n_of_turns)
+		  goto try_next_cell;
+	}
+
+	return c;
+}
+#endif
+
+
+/**
+ * returns
+ * ON_BOUNDED_SIDE if p inside the cell
+ * (for an infinite cell this means that p lies strictly in the half space
+ * limited by its finite facet)
+ * ON_BOUNDARY if p on the boundary of the cell
+ * (for an infinite cell this means that p lies on the *finite* facet)
+ * ON_UNBOUNDED_SIDE if p lies outside the cell
+ * (for an infinite cell this means that p is not in the preceding
+ * two cases)
+ * 
+ * lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
+ */
+// TODO: currently off is not used. It could probably be optimized
+// using off.
+template < class GT, class TDS >
+inline Bounded_side Periodic_3_triangulation_3<GT,TDS>::side_of_cell(
+    const Point & q, const Offset &off, Cell_handle c,
+    Locate_type & lt, int & i, int & j) const
+{
+  CGAL_triangulation_precondition( number_of_vertices() != 0 );
+
+  Orientation o0,o1,o2,o3;
+  o0 = o1 = o2 = o3 = ZERO;
+
+  int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
+  if ((cumm_off == 0) && (is_1_cover())) {
+    CGAL_triangulation_assertion(off == Offset());
+    const Point &p0  = c->vertex(0)->point();
+    const Point &p1  = c->vertex(1)->point();
+    const Point &p2  = c->vertex(2)->point();
+    const Point &p3  = c->vertex(3)->point();
+  
+    if (((o0 = orientation(q ,p1,p2,p3)) == NEGATIVE) ||
+        ((o1 = orientation(p0,q ,p2,p3)) == NEGATIVE) ||
+        ((o2 = orientation(p0,p1,q ,p3)) == NEGATIVE) ||
+        ((o3 = orientation(p0,p1,p2,q )) == NEGATIVE) ) {
+      return ON_UNBOUNDED_SIDE;
+    }
+  } else { // Special case for the periodic space.
+    Offset off_q;
+    Offset offs[4];
+    const Point *p[4];
+    for (int i=0; i<4; i++) {
+      p[i] = &(c->vertex(i)->point());
+      offs[i] = get_offset(c,i);
+    }
+    CGAL_triangulation_assertion(orientation(*p[0], *p[1], *p[2], *p[3],
+        offs[0], offs[1], offs[2], offs[3]) == POSITIVE);
+    bool found=false;
+    for (int i=0; (i<8)&&(!found); i++) {
+      if ((cumm_off | ((~i)&7)) == 7) {
+        o0 = o1 = o2 = o3 = NEGATIVE;
+        off_q = combine_offsets(off, int_to_off(i));
+
+        if (((o0 = orientation(      q,  *p[1],  *p[2],  *p[3], 
+                off_q  ,offs[1],offs[2],offs[3])) != NEGATIVE)&&
+            ((o1 = orientation(  *p[0],      q,  *p[2],  *p[3], 
+                offs[0],  off_q,offs[2],offs[3])) != NEGATIVE)&&
+            ((o2 = orientation(  *p[0],  *p[1],      q,  *p[3], 
+                offs[0],offs[1],  off_q,offs[3])) != NEGATIVE)&&
+            ((o3 = orientation(  *p[0],  *p[1],  *p[2],      q, 
+                offs[0],offs[1],offs[2],  off_q)) != NEGATIVE)) {
+          found = true;
+        }
+      }
+    }
+    if (!found) return ON_UNBOUNDED_SIDE;
+  }
+
+  // now all the oi's are >=0
+  // sum gives the number of facets p lies on
+  int sum = ( (o0 == ZERO) ? 1 : 0 ) 
+    + ( (o1 == ZERO) ? 1 : 0 ) 
+    + ( (o2 == ZERO) ? 1 : 0 ) 
+    + ( (o3 == ZERO) ? 1 : 0 );
+
+  switch (sum) {
+  case 0:
+    {
+      lt = CELL;
+      return ON_BOUNDED_SIDE;
+    }
+  case 1:
+    {
+      lt = FACET;
+      // i = index such that p lies on facet(i)
+      i = ( o0 == ZERO ) ? 0 :
+      ( o1 == ZERO ) ? 1 :
+      ( o2 == ZERO ) ? 2 :
+      3;
+      return ON_BOUNDARY;
+    }
+  case 2:
+    {
+      lt = EDGE;
+      // i = smallest index such that p does not lie on facet(i)
+      // i must be < 3 since p lies on 2 facets
+      i = ( o0 == POSITIVE ) ? 0 :
+      ( o1 == POSITIVE ) ? 1 :
+      2;
+      // j = larger index such that p not on facet(j)
+      // j must be > 0 since p lies on 2 facets
+      j = ( o3 == POSITIVE ) ? 3 :
+      ( o2 == POSITIVE ) ? 2 :
+      1;
+      return ON_BOUNDARY;
+    }
+  case 3:
+    {
+      lt = VERTEX;
+      // i = index such that p does not lie on facet(i)
+      i = ( o0 == POSITIVE ) ? 0 :
+      ( o1 == POSITIVE ) ? 1 :
+      ( o2 == POSITIVE ) ? 2 :
+      3;
+      return ON_BOUNDARY;
+    }
+  default:
+    {
+      // impossible : cannot be on 4 facets for a real tetrahedron
+      CGAL_triangulation_assertion(false);
+      return ON_BOUNDARY;
+    }
+  }
+} // side_of_cell
+
+template< class GT, class TDS >
+template< class CellIt >
+inline void Periodic_3_triangulation_3<GT,TDS>::
+    insert_too_long_edges(Vertex_handle v,
+        const CellIt begin, const CellIt end) {
+  CGAL_triangulation_precondition(number_of_vertices() != 0);
+  // add newly added edges to too_long_edges, if necessary.
+  Point p1,p2;
+  Offset omin;
+  std::pair< Vertex_handle, Vertex_handle > edge_to_add;
+  std::pair< Offset, Offset > edge_to_add_off;
+  std::list<Vertex_handle> empty_list;
+  too_long_edges[v] = empty_list;
+  // Iterate over all cells of the new star.
+  for (CellIt it = begin ; it != end ; ++it) {
+    // Consider all possible vertex pairs.
+    for (int k=0; k<4 ; k++) {
+    for (int j=0; j<4 ; j++) {
+      if (j==k) continue;
+      if (&*((*it)->vertex(j)) > &*((*it)->vertex(k))) continue;
+      // make the offsets canonical (wrt. to some notion)
+      // add to too_long_edges, if not yet added and if "too long"
+      CGAL_triangulation_precondition(
+	  &*((*it)->vertex(j))< &*((*it)->vertex(k)));
+
+      edge_to_add = std::make_pair((*it)->vertex(j), (*it)->vertex(k));
+      
+      p1 = construct_point((*it)->vertex(j)->point(), get_offset(*it, j));
+      p2 = construct_point((*it)->vertex(k)->point(), get_offset(*it, k));
+
+      if ((squared_distance(p1,p2) > edge_length_threshold)
+          && (find(too_long_edges[(*it)->vertex(j)].begin(),
+		  too_long_edges[(*it)->vertex(j)].end(),
+		  edge_to_add.second)
+	      == too_long_edges[(*it)->vertex(j)].end())
+      ){
+        too_long_edges[(*it)->vertex(j)].push_back(edge_to_add.second);
+        too_long_edge_counter++;
+      }
+    } }
+  }
+}
+
+template < class GT, class TDS >
+template < class CellIt >
+inline void Periodic_3_triangulation_3<GT,TDS>::
+    delete_too_long_edges(const CellIt begin, const CellIt end) {
+  std::pair< Vertex_handle, Vertex_handle > edge_to_delete, edge_to_delete2;
+  typename std::list< Vertex_handle >::iterator sit;
+  // Iterate over all cells that are in the star. That means that those cells
+  // are going to be deleted. Therefore, all of them have to be deleted from
+  // too_long_edges, if they are contained in it.
+  for (CellIt it = begin ; it != end ; ++it) {
+    for (int j=0; j<4 ; j++) {
+      for (int k=0; k<4; k++) {
+        if (&*((*it)->vertex(j)) < &*((*it)->vertex(k))) {
+          edge_to_delete = std::make_pair((*it)->vertex(j),(*it)->vertex(k));
+        } else {
+          edge_to_delete = std::make_pair((*it)->vertex(k),(*it)->vertex(j));
+        }
+        Vertex_handle v_no = edge_to_delete.first;
+        sit = find(too_long_edges[v_no].begin(),
+            too_long_edges[v_no].end(),
+            edge_to_delete.second);
+        if (sit != too_long_edges[v_no].end()) {
+          too_long_edges[v_no].erase(sit);
+          too_long_edge_counter--;
+        }
+      }
+    }
+  }
+}
+
+/*! \brief Insert point.
+*
+* Inserts the point p into the triangulation. It assumes that
+* the cell c containing p is already known.
+*
+* Implementation:
+* - some precondition checking
+* - find and mark conflicting cells --> find_conflicts
+* Conflicting cells are stored in the vector cells.
+* - backup hidden points
+* - Delete the edges of the marked cells from too_long_edges
+* - Insert the new vertex in the hole obtained by removing the
+*   conflicting cells (star-approach) --> _tds._insert_in_hole 
+* - find out about offsets
+* - Insert the newly added edges that are "too long"
+*   to too_long_edges
+* - reinsert hidden points
+*/
+template < class GT, class TDS >
+template < class Conflict_tester, class Point_hider >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
+Periodic_3_triangulation_3<GT,TDS>::periodic_insert(
+    const Point & p, const Offset& o,
+    Locate_type lt, Cell_handle c, const Conflict_tester &tester,
+    Point_hider &hider, Vertex_handle vh)
+{
+  Vertex_handle v;
+  CGAL_triangulation_assertion(number_of_vertices() != 0);
+  CGAL_triangulation_precondition_code(
+      Locate_type lt_assert; int i_assert; int j_assert;);
+  CGAL_triangulation_assertion(side_of_cell(tester.point(),o, c,
+      lt_assert, i_assert, j_assert) != ON_UNBOUNDED_SIDE);
+
+  tester.set_offset(o);
+
+  // This only holds for Delaunay
+  CGAL_triangulation_assertion(lt != VERTEX);
+  CGAL_USE(lt);
+
+  // Choose the periodic copy of tester.point() that is inside c.
+  Offset current_off = get_location_offset(tester, c);
+
+  CGAL_triangulation_assertion(side_of_cell(tester.point(),
+      combine_offsets(o,current_off),c,lt_assert,i_assert,j_assert)
+      != ON_UNBOUNDED_SIDE);
+  // If the new point is not in conflict with its cell, it is hidden.
+  if (!tester.test_initial_cell(c, current_off)) {
+    hider.hide_point(c,p);
+    return Vertex_handle();
+  }
+  // Ok, we really insert the point now.
+  // First, find the conflict region.
+  std::vector<Cell_handle> cells;
+  cells.reserve(32);
+
+  Facet facet;
+
+  find_conflicts(c, current_off, tester,
+      make_triple(Oneset_iterator<Facet>(facet),
+      std::back_inserter(cells),
+      Emptyset_iterator()));
+
+  // Remember the points that are hidden by the conflicting cells,
+  // as they will be deleted during the insertion.
+  hider.set_vertices(cells.begin(), cells.end());
+  
+  if (!is_1_cover())
+    delete_too_long_edges(cells.begin(), cells.end());
+  
+  // Insertion. Attention: facets[0].first MUST be in conflict!
+  // Compute the star and put it into the data structure.
+  // Store the new cells from the star in nbs.
+  v = _tds._insert_in_hole(cells.begin(), cells.end(),
+      facet.first, facet.second);
+  v->set_point(p);
+
+  //TODO: this could be done within the _insert_in_hole without losing any
+  //time because each cell is visited in any case.
+  //- Do timings to argue to modify _insert_in_conflicts if need be
+  //- Find the modified _insert_in_hole in the branch svn history of TDS
+  std::vector<Cell_handle> nbs;
+  incident_cells(v, std::back_inserter(nbs));
+  // For all neighbors of the newly added vertex v: fetch their offsets from
+  // the tester and reset them in the triangulation data structure.
+  for (typename std::vector<Cell_handle>::iterator cit = nbs.begin();
+      cit != nbs.end(); cit++) {
+    Offset off[4];
+    for (int i=0 ; i<4 ; i++) {
+      off[i] = (*cit)->vertex(i)->offset();
+    }
+    set_offsets(*cit, off[0], off[1], off[2], off[3]);
+  }
+  
+  for (typename std::vector<Vertex_handle>::iterator voit = v_offsets.begin();
+      voit != v_offsets.end() ; ++voit) {
+    (*voit)->clear_offset();
+  }
+  v_offsets.clear();
+
+  if (vh != Vertex_handle()) {
+    virtual_vertices[v] = Virtual_vertex(vh,o);
+    virtual_vertices_reverse[vh].push_back(v);
+  }
+
+  if (!is_1_cover())
+    insert_too_long_edges(v, nbs.begin(), nbs.end());
+
+  // Store the hidden points in their new cells.
+  hider.reinsert_vertices(v);
+  return v;
+}
+
+/** Inserts the first point to a triangulation.
+  *
+  * With inserting the first point the 3-sheeted covering is constructed.
+  * So first, the 27 vertices are inserted and are added to virtual_vertices
+  * Then 6*27 cells are created.
+  * Then all links are set.
+ */
+template < class GT, class TDS >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
+Periodic_3_triangulation_3<GT,TDS>::create_initial_triangulation(
+    const Point &p) {
+  /// Virtual vertices, one per periodic domain
+  Vertex_handle vir_vertices[3][3][3];
+  /// Virtual cells, 6 per periodic domain
+  Cell_handle cells[3][3][3][6];
+
+  // Initialise vertices:
+  vir_vertices[0][0][0] = _tds.create_vertex();
+  vir_vertices[0][0][0]->set_point(p);
+  virtual_vertices_reverse[vir_vertices[0][0][0]] =
+std::vector<Vertex_handle>();
+  for (int i=0; i<_cover[0]; i++) {
+    for (int j=0; j<_cover[1]; j++) {
+      for (int k=0; k<_cover[2]; k++) {
+        if ((i!=0)||(j!=0)||(k!=0)) {
+          // Initialise virtual vertices out of the domain for debugging
+          vir_vertices[i][j][k] =
+            _tds.create_vertex();
+          vir_vertices[i][j][k]->set_point(p); //+Offset(i,j,k));
+          virtual_vertices[vir_vertices[i][j][k]] =
+            Virtual_vertex(vir_vertices[0][0][0], Offset(i,j,k));
+          virtual_vertices_reverse[vir_vertices[0][0][0]].push_back(
+            vir_vertices[i][j][k]);
+        }
+        CGAL_triangulation_assertion(vir_vertices[i][j][k] != Vertex_handle());
+        CGAL_triangulation_assertion(vir_vertices[0][0][0]->point() == p);
+      }
+    }
+  }
+
+  // Create cells:
+  for (int i=0; i<_cover[0]; i++) {
+    for (int j=0; j<_cover[1]; j++) {
+      for (int k=0; k<_cover[2]; k++) {
+        for (int l=0; l<6; l++) {
+          // 6 cells per 'cube'
+          cells[i][j][k][l] = _tds.create_cell();
+          for (int n=0; n<4; n++)
+            CGAL_triangulation_assertion(cells[i][j][k][l] != Cell_handle());
+        }
+      }
+    }
+  }
+  // set vertex and neighbor information
+  // index to the right vertex: [number of cells][vertex][offset]
+  int vertex_ind[6][4][3] = {
+    { {0, 0, 0},  {0, 1, 0},  {0, 0, 1},  {1, 0, 0} },
+    { {1, 1, 0},  {0, 1, 1},  {1, 0, 1},  {1, 1, 1} },
+    { {1, 0, 0},  {0, 1, 1},  {0, 1, 0},  {0, 0, 1} },
+    { {1, 0, 0},  {0, 1, 1},  {0, 0, 1},  {1, 0, 1} },
+    { {1, 0, 0},  {0, 1, 1},  {1, 0, 1},  {1, 1, 0} },
+    { {1, 0, 0},  {0, 1, 1},  {1, 1, 0},  {0, 1, 0} }
+  };
+  int neighb_ind[6][4][4] = {
+    { { 0, 0, 0, 2},  { 0,-1, 0, 5},  { 0, 0,-1, 3},  {-1, 0, 0, 4} },
+    { { 0, 0, 1, 5},  { 1, 0, 0, 2},  { 0, 1, 0, 3},  { 0, 0, 0, 4} },
+    { {-1, 0, 0, 1},  { 0, 0, 0, 0},  { 0, 0, 0, 3},  { 0, 0, 0, 5} },
+    { { 0, 0, 1, 0},  { 0,-1, 0, 1},  { 0, 0, 0, 4},  { 0, 0, 0, 2} },
+    { { 0, 0, 0, 1},  { 1, 0, 0, 0},  { 0, 0, 0, 5},  { 0, 0, 0, 3} },
+    { { 0, 1, 0, 0},  { 0, 0,-1, 1},  { 0, 0, 0, 2},  { 0, 0, 0, 4} }
+  };
+  for (int i=0; i<_cover[0]; i++) {
+    for (int j=0; j<_cover[1]; j++) {
+      for (int k=0; k<_cover[2]; k++) {
+        int offset = 
+          (i==_cover[0]-1 ? 4 : 0) | 
+	  (j==_cover[1]-1 ? 2 : 0) | 
+	  (k==_cover[2]-1 ? 1 : 0);
+        for (int l=0; l<6; l++) {
+          // cell 0:
+          cells[i][j][k][l]->set_vertices(
+              vir_vertices
+                [(i+vertex_ind[l][0][0])%_cover[0]]
+                [(j+vertex_ind[l][0][1])%_cover[1]]
+                [(k+vertex_ind[l][0][2])%_cover[2]],
+              vir_vertices
+                [(i+vertex_ind[l][1][0])%_cover[0]]
+                [(j+vertex_ind[l][1][1])%_cover[1]]
+                [(k+vertex_ind[l][1][2])%_cover[2]],
+              vir_vertices
+                [(i+vertex_ind[l][2][0])%_cover[0]]
+                [(j+vertex_ind[l][2][1])%_cover[1]]
+                [(k+vertex_ind[l][2][2])%_cover[2]],
+              vir_vertices
+                [(i+vertex_ind[l][3][0])%_cover[0]]
+                [(j+vertex_ind[l][3][1])%_cover[1]]
+                [(k+vertex_ind[l][3][2])%_cover[2]]);
+          set_offsets(cells[i][j][k][l],
+              offset & (vertex_ind[l][0][0]*4 +
+                        vertex_ind[l][0][1]*2 +
+                        vertex_ind[l][0][2]*1),
+              offset & (vertex_ind[l][1][0]*4 +
+                        vertex_ind[l][1][1]*2 +
+                        vertex_ind[l][1][2]*1),
+              offset & (vertex_ind[l][2][0]*4 +
+                        vertex_ind[l][2][1]*2 +
+                        vertex_ind[l][2][2]*1),
+              offset & (vertex_ind[l][3][0]*4 +
+                        vertex_ind[l][3][1]*2 +
+                        vertex_ind[l][3][2]*1));
+          cells[i][j][k][l]->set_neighbors(
+              cells [(i+_cover[0]+neighb_ind[l][0][0])%_cover[0]]
+                    [(j+_cover[1]+neighb_ind[l][0][1])%_cover[1]]
+                    [(k+_cover[2]+neighb_ind[l][0][2])%_cover[2]]
+                    [         neighb_ind[l][0][3]       ],
+              cells [(i+_cover[0]+neighb_ind[l][1][0])%_cover[0]]
+                    [(j+_cover[1]+neighb_ind[l][1][1])%_cover[1]]
+                    [(k+_cover[2]+neighb_ind[l][1][2])%_cover[2]]
+                    [         neighb_ind[l][1][3]       ],
+              cells [(i+_cover[0]+neighb_ind[l][2][0])%_cover[0]]
+                    [(j+_cover[1]+neighb_ind[l][2][1])%_cover[1]]
+                    [(k+_cover[2]+neighb_ind[l][2][2])%_cover[2]]
+                    [         neighb_ind[l][2][3]       ],
+              cells [(i+_cover[0]+neighb_ind[l][3][0])%_cover[0]]
+                    [(j+_cover[1]+neighb_ind[l][3][1])%_cover[1]]
+                    [(k+_cover[2]+neighb_ind[l][3][2])%_cover[2]]
+                    [         neighb_ind[l][3][3]       ]
+          );
+        }
+      }
+    }
+  }
+  // set pointers from the vertices to incident cells.
+  for (int i=0; i<_cover[0]; i++) {
+    for (int j=0; j<_cover[1]; j++) {
+      for (int k=0; k<_cover[2]; k++) {
+        vir_vertices[i][j][k]->set_cell(cells[i][j][k][0]);
+      }
+    }
+  }
+  
+  _tds.set_dimension(3);
+
+  // create the base for too_long_edges;
+  CGAL_triangulation_assertion( too_long_edges.empty() );
+  CGAL_triangulation_assertion(too_long_edge_counter == 0);
+
+  for (Vertex_iterator vit = vertices_begin() ;
+       vit !=vertices_end() ; ++vit )
+    too_long_edges[vit] = std::list<Vertex_handle>();;
+
+  std::vector<Cell_handle> temp_inc_cells;
+  for (Vertex_iterator vit = vertices_begin() ;
+       vit !=vertices_end() ; ++vit ) {
+    temp_inc_cells.clear();
+    incident_cells(vit, std::back_inserter(temp_inc_cells));
+    for (unsigned int i=0 ; i<temp_inc_cells.size() ; i++) {
+      int k = temp_inc_cells[i]->index(vit);
+      for (int j=0; j<4 ; j++) {
+        if (j==k) continue;
+        if (&*vit > &*(temp_inc_cells[i]->vertex(j))) continue;
+        if ((find(too_long_edges[vit].begin(),
+                  too_long_edges[vit].end(),
+            temp_inc_cells[i]->vertex(j)) ==
+		too_long_edges[vit].end())
+        ){
+	  too_long_edges[vit].push_back(temp_inc_cells[i]->vertex(j));
+          too_long_edge_counter++;
+        }
+      }
+    }
+  }
+  return vir_vertices[0][0][0];
+}
+
+#include <CGAL/Periodic_3_triangulation_dummy_36.h>
+
+/** finds all cells that are in conflict with the currently added point
+  * (stored in tester).
+  *
+  * The result will be a hole of which the following data is returned:
+  * - boundary facets
+  * - cells
+  * - internal facets.
+  *
+  * c is the current cell, which must be in conflict.
+  * tester is the function object that tests if a cell is in conflict.
+  */
+template <class GT, class TDS>
+template <class Conflict_test,
+	  class OutputIteratorBoundaryFacets,
+          class OutputIteratorCells,
+	  class OutputIteratorInternalFacets>
+Triple<OutputIteratorBoundaryFacets,
+       OutputIteratorCells,
+       OutputIteratorInternalFacets>
+Periodic_3_triangulation_3<GT,TDS>::
+find_conflicts(Cell_handle d, const Offset &current_off,
+    const Conflict_test &tester,
+    Triple<OutputIteratorBoundaryFacets,
+    OutputIteratorCells,
+    OutputIteratorInternalFacets> it) const {
+  CGAL_triangulation_precondition( number_of_vertices() != 0 );
+  CGAL_triangulation_precondition( tester(d, current_off) );
+
+  std::stack<std::pair<Cell_handle, Offset> > cell_stack;
+  cell_stack.push(std::make_pair(d,current_off));
+  d->tds_data().mark_in_conflict();  
+  *it.second++ = d;
+
+  do {
+    Cell_handle c = cell_stack.top().first;
+    Offset current_off2 = cell_stack.top().second;
+    cell_stack.pop();
+
+    for (int i=0; i< 4; ++i) {
+      Cell_handle test = c->neighbor(i);
+      if (test->tds_data().is_in_conflict()) {
+	if (c < test) {
+	  *it.third++ = Facet(c, i); // Internal facet.
+	}
+	continue; // test was already in conflict.
+      }
+      if (test->tds_data().is_clear()) {
+	Offset o_test = current_off2 + get_neighbor_offset(c, i, test);
+	if (tester(test,o_test)) {
+	  if (c < test)
+	    *it.third++ = Facet(c, i); // Internal facet.
+	  
+	  cell_stack.push(std::make_pair(test,o_test));
+	  test->tds_data().mark_in_conflict();
+	  *it.second++ = test;
+	  continue;
+	}
+	test->tds_data().mark_on_boundary(); // test is on the boundary.
+      }
+      *it.first++ = Facet(c, i);
+      for (int j = 0 ; j<4 ; j++){
+	if (j==i) continue;
+	if (!c->vertex(j)->get_offset_flag()) {
+	  c->vertex(j)->set_offset(int_to_off(c->offset(j))-current_off2);
+	  v_offsets.push_back(c->vertex(j));
+	}
+      }
+    }
+  } while (!cell_stack.empty());
+  return it;
+}
+
+/*! \brief Insert point into triangulation.
+ *
+ * Inserts the point p into the triangulation. It expects
+ * - a cell to start the point location
+ * - a testing function to determine cells in conflict
+ * - a testing function to determine if a vertex is hidden.
+ *
+ * Implementation:
+ * - If the triangulation is empty call a special function
+ * (create_initial_triangulation) to construct the basic
+ * triangulation.
+ * - Run point location to get the cell c containing point p.
+ * - Call periodic_insert to insert p into the 3-cover.
+ * - Also insert the eight periodic copies of p.
+ */
+template < class GT, class TDS >
+template < class Conflict_tester, class Point_hider >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
+Periodic_3_triangulation_3<GT,TDS>::insert_in_conflict(const Point & p,
+    Locate_type lt, Cell_handle c, int li, int lj,
+    const Conflict_tester &tester, Point_hider &hider) {
+
+  CGAL_triangulation_assertion((_domain.xmin() <= p.x())
+      && (p.x() < _domain.xmax()));
+  CGAL_triangulation_assertion((_domain.ymin() <= p.y())
+      && (p.y() < _domain.ymax()));
+  CGAL_triangulation_assertion((_domain.zmin() <= p.z()) 
+      && (p.z() < _domain.zmax()));
+
+  if (number_of_vertices() == 0) {
+    return create_initial_triangulation(p);
+  }
+
+  if ((lt == VERTEX) &&
+      (tester.compare_weight(c->vertex(li)->point(),p)==0) ) {
+    return c->vertex(li);
+  }
+
+  Vertex_handle vstart;
+  if (!is_1_cover()) {
+    Virtual_vertex_map_it vvmit = virtual_vertices.find(c->vertex(0));
+    if (vvmit == virtual_vertices.end())
+      vstart = c->vertex(0);
+    else
+      vstart = vvmit->second.first;
+    CGAL_triangulation_assertion(virtual_vertices.find(vstart)
+	==virtual_vertices.end());
+    CGAL_triangulation_assertion(virtual_vertices_reverse.find(vstart)
+        != virtual_vertices_reverse.end());
+  }
+  CGAL_triangulation_assertion( number_of_vertices() != 0 );
+  CGAL_triangulation_expensive_assertion(is_valid());
+  Vertex_handle vh = periodic_insert(p, Offset(), lt, c, tester, hider);
+  if (is_1_cover()) {
+    return vh;
+  }
+  
+  for (Cell_iterator it = all_cells_begin() ;
+      it != all_cells_end() ; it++){
+    CGAL_triangulation_assertion(it->neighbor(0)->neighbor(
+        it->neighbor(0)->index(it))==it);
+    CGAL_triangulation_assertion(it->neighbor(1)->neighbor(
+        it->neighbor(1)->index(it))==it);
+    CGAL_triangulation_assertion(it->neighbor(2)->neighbor(
+        it->neighbor(2)->index(it))==it);
+    CGAL_triangulation_assertion(it->neighbor(3)->neighbor(
+        it->neighbor(3)->index(it))==it);
+  }
+
+  std::vector<Vertex_handle> start_vertices
+      = virtual_vertices_reverse.find(vstart)->second;
+  Cell_handle start;
+  virtual_vertices_reverse[vh] = std::vector<Vertex_handle>();
+  // insert 26 periodic copies
+  for (int i=0; i<_cover[0]; i++) {
+    for (int j=0; j<_cover[1]; j++) {
+      for (int k=0; k<_cover[2]; k++) {
+        if ((i!=0)||(j!=0)||(k!=0)) {
+          start = start_vertices[i*9+j*3+k-1]->cell();
+          c = periodic_locate(p, Offset(i,j,k), lt, li, lj, start);
+          periodic_insert(p, Offset(i,j,k), lt, c, tester, hider,vh);
+        }
+      }
+    }
+  }
+  CGAL_triangulation_expensive_assertion(is_valid());
+
+  // Fall back to 1-cover if the criterion that the longest edge is shorter
+  // than sqrt(0.166) is fulfilled.
+  if ( too_long_edge_counter == 0 ) {
+    CGAL_triangulation_expensive_assertion(is_valid());
+    convert_to_1_sheeted_covering();
+    CGAL_triangulation_expensive_assertion( is_valid() );
+  }
+  return vh;
+}
+
+/// tests if two vertices of one cell are just periodic copies of each other
+template < class GT, class TDS >
+inline bool Periodic_3_triangulation_3<GT,TDS>::has_self_edges(Cell_handle c) const {
+  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(1)) || 
+      (c->offset(0) != c->offset(1)));
+  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(2)) || 
+      (c->offset(0) != c->offset(2)));
+  CGAL_triangulation_assertion((c->vertex(0) != c->vertex(3)) || 
+      (c->offset(0) != c->offset(3)));
+  CGAL_triangulation_assertion((c->vertex(1) != c->vertex(2)) || 
+      (c->offset(1) != c->offset(2)));
+  CGAL_triangulation_assertion((c->vertex(1) != c->vertex(3)) || 
+      (c->offset(1) != c->offset(3)));
+  CGAL_triangulation_assertion((c->vertex(2) != c->vertex(3)) || 
+      (c->offset(2) != c->offset(3)));
+  return ((c->vertex(0) == c->vertex(1)) ||
+      (c->vertex(0) == c->vertex(2)) ||
+      (c->vertex(0) == c->vertex(3)) ||
+      (c->vertex(1) == c->vertex(2)) ||
+      (c->vertex(1) == c->vertex(3)) ||
+      (c->vertex(2) == c->vertex(3)));
+}
+
+/*! \brief Tests if the triangulation is valid.
+ *
+ * A triangulation is valid if
+ * - A cell is not its own neighbor.
+ * - A cell has no two equal neighbors
+ * - A cell has no two equal vertex-offset pairs
+ * - A cell is positively oriented.
+ * - The point of a neighbor of cell c that does not belong to c is not inside
+ *   the circumcircle of c.
+ */
+template < class GT, class TDS >
+bool
+Periodic_3_triangulation_3<GT,TDS>::
+is_valid(bool verbose, int level) const {
+  bool error = false;
+  for (Cell_iterator cit = cells_begin();
+       cit != cells_end(); ++cit) {
+    for (int i=0; i<4; i++) {
+      CGAL_triangulation_assertion(cit != cit->neighbor(i));
+      for (int j=i+1; j<4; j++) {
+        CGAL_triangulation_assertion(cit->neighbor(i) != cit->neighbor(j));
+        CGAL_triangulation_assertion(cit->vertex(i) != cit->vertex(j));
+      }
+    }
+    // Check positive orientation:
+    const Point *p[4]; Offset off[4];
+    for (int i=0; i<4; i++) {
+      p[i] = &cit->vertex(i)->point();
+      off[i] = get_offset(cit,i);
+    }
+    if (orientation(*p[0], *p[1], *p[2], *p[3],
+                   off[0], off[1], off[2], off[3]) != POSITIVE) {
+      if (verbose) {
+	std::cerr<<"Periodic_3_triangulation_3: wrong orientation:"<<std::endl;
+	std::cerr<<off[0]<<'\t'<<*p[0]<<'\n'
+		 <<off[1]<<'\t'<<*p[1]<<'\n'
+		 <<off[2]<<'\t'<<*p[2]<<'\n'
+		 <<off[3]<<'\t'<<*p[3]<<std::endl;
+      }
+      error = true;
+    }
+  }
+
+  if (!has_self_edges()) {
+    if (! _tds.is_valid(verbose, level) ) {
+      return false;
+    }
+  }
+
+  return !error;
+}
+
+template < class GT, class TDS >
+bool Periodic_3_triangulation_3<GT,TDS>::is_valid(Cell_handle ch,
+    bool verbose, int level) const {
+  if ( ! _tds.is_valid(ch,verbose,level) )
+    return false;
+  bool error = false;
+  const Point *p[4]; Offset off[4];
+  for (int i=0; i<4; i++) {
+    p[i] = &ch->vertex(i)->point();
+    off[i] = get_offset(ch,i);
+  }
+  if (orientation(*p[0], *p[1], *p[2], *p[3], 
+		  off[0], off[1], off[2], off[3]) != POSITIVE) {
+    error = true;
+  }
+  
+  return !error;
+}
+
+template < class GT, class TDS >
+template < class ConflictTester >
+bool Periodic_3_triangulation_3<GT,TDS>::
+is_valid_conflict(ConflictTester &tester, bool verbose, int level) const {
+  Cell_iterator it;
+  for ( it = cells_begin(); it != cells_end(); ++it ) {
+    is_valid(it, verbose, level);
+    for (int i=0; i<4; i++ ) {
+      Offset o_nb = get_neighbor_offset(it,i,it->neighbor(i));
+      Offset o_vt = get_offset(it->neighbor(i),
+				      it->neighbor(i)->index(it));
+      if (tester(it,
+		 it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point(),
+		 o_vt-o_nb)) {
+        if (verbose)
+          std::cerr << "non-empty sphere: "
+              <<it->vertex(0)->point()<<'\t'
+              <<it->vertex(1)->point()<<'\t'
+              <<it->vertex(2)->point()<<'\t'
+              <<it->vertex(3)->point()<<'\n'
+	      <<it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point()
+              <<'\t'<<o_vt-o_nb
+              << std::endl;
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
+template < class GT, class TDS >
+inline void Periodic_3_triangulation_3<GT,TDS>::make_hole(Vertex_handle v, 
+    std::map<Vertex_triple,Facet> &outer_map, std::vector<Cell_handle> &hole) {
+  
+  //CGAL_triangulation_precondition( all_vertices_begin()++ 
+  //    != all_vertices_end() );
+  
+  incident_cells(v, std::back_inserter(hole));
+
+  for (typename std::vector<Cell_handle>::iterator cit = hole.begin();
+       cit != hole.end(); ++cit) {
+    int indv = (*cit)->index(v);
+    Cell_handle opp_cit = (*cit)->neighbor( indv );
+    Facet f(opp_cit, opp_cit->index(*cit)); 
+    Vertex_triple vt = make_vertex_triple(f);
+    make_canonical(vt);
+    outer_map[vt] = f;
+    for (int i=0; i<4; i++)
+      if ( i != indv )
+        (*cit)->vertex(i)->set_cell(opp_cit);
+  }
+}
+
+/*! \brief Remove a vertex from the triangulation.
+ *
+ * Removes vertex v from the triangulation.
+ */
+template < class GT, class TDS >
+template < class PointRemover, class Conflict_tester>
+inline void Periodic_3_triangulation_3<GT,TDS>::remove(Vertex_handle v,
+    PointRemover &r, Conflict_tester &t) {
+  CGAL_expensive_precondition(is_vertex(v));
+  std::vector<Vertex_handle> vhrem;
+  if (!is_1_cover()) {
+    if (number_of_vertices() == 1) {
+      clear();
+      return;
+    }
+    Virtual_vertex_map_it vvmit = virtual_vertices.find(v);
+    if (vvmit != virtual_vertices.end()) v = vvmit->second.first;
+    CGAL_triangulation_assertion(virtual_vertices_reverse.find(v)
+        != virtual_vertices_reverse.end());
+    vhrem = virtual_vertices_reverse.find(v)->second;
+    virtual_vertices_reverse.erase(v);
+    CGAL_triangulation_assertion(vhrem.size()==26);
+    for (int i=0 ; i<26 ; i++) {
+      periodic_remove(vhrem[i],r);
+      virtual_vertices.erase(vhrem[i]);
+      CGAL_triangulation_expensive_assertion(is_valid());
+    }
+    periodic_remove(v,r);
+  } else {
+    periodic_remove(v,r);
+    if (!is_1_cover()) remove(v,r,t);
+  }
+  
+}
+
+/*! \brief Remove a vertex from the triangulation.
+ *
+ * Removes vertex v from the triangulation.
+ * It expects a reference to an instance of a PointRemover.
+ * 
+ * Implementation:
+ * - Compute the hole, that is, all cells incident to v. Cells outside of
+ *   this hole are not affected by the deletion of v.
+ * - Triangulate the hole. This is done computing the triangulation
+ *   in Euclidean space for the points on the border of the hole.
+ * - Sew this triangulation into the hole.
+ * - Test for all newly added edges, whether they are shorter than the
+ *   edge_length_threshold. If not, convert to 3-cover.
+ */
+template < class GT, class TDS >
+template < class PointRemover >
+inline void Periodic_3_triangulation_3<GT,TDS>::periodic_remove(Vertex_handle v,
+    PointRemover &remover) {
+
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
+  typedef PointRemover Point_remover;
+  typedef typename Point_remover::CellE_handle    CellE_handle;
+  typedef typename Point_remover::VertexE_handle  VertexE_handle;
+  typedef typename Point_remover::FacetE          FacetE;
+  typedef typename Point_remover::VertexE_triple  VertexE_triple;
+  typedef typename Point_remover::Finite_cellsE_iterator
+      Finite_cellsE_iterator;
+  typedef typename Point_remover::Vertex_triple_FacetE_map
+      Vertex_triple_FacetE_map;
+
+  // First compute the hole and its boundary vertices.
+  std::vector<Cell_handle> hole;
+  hole.reserve(64);
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_FacetE_map inner_map;
+
+  make_hole(v, outer_map, hole);
+
+  CGAL_triangulation_assertion(outer_map.size()==hole.size());
+  CGAL_triangulation_assertion(remover.hidden_points_begin() == 
+      remover.hidden_points_end());
+
+  if (!is_1_cover()) {
+    delete_too_long_edges(hole.begin(), hole.end());
+  }
+  
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::iterator
+      hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
+  {
+    remover.add_hidden_points(*hi);
+  }
+
+  // Build up the map between Vertices on the boundary and offsets
+  // collect all vertices on the boundary
+  std::vector<Vertex_handle> vertices;
+  vertices.reserve(64);
+
+  // The set is needed to ensure that each vertex is inserted only once.
+  std::set<Vertex_handle> tmp_vertices;
+  // The map connects vertices to offsets in the hole
+  std::map<Vertex_handle, Offset> vh_off_map;
+
+  for(typename std::vector<Cell_handle>::iterator cit = hole.begin();
+      cit != hole.end(); ++cit)
+  {
+    // Put all incident vertices in tmp_vertices.
+    for (int j=0; j<4; ++j){
+      if ((*cit)->vertex(j) != v){
+        tmp_vertices.insert((*cit)->vertex(j));
+        vh_off_map[(*cit)->vertex(j)] = int_to_off((*cit)->offset(j))
+            - int_to_off((*cit)->offset((*cit)->index(v)));
+      }
+    }
+  }
+
+  // Now output the vertices.
+  std::copy(tmp_vertices.begin(), tmp_vertices.end(),
+      std::back_inserter(vertices));
+
+  // create a Delaunay/Regular triangulation of the points on the boundary
+  // in Euclidean space and make a map from the vertices in remover.tmp
+  // towards the vertices in *this
+  
+  Unique_hash_map<VertexE_handle,Vertex_handle> vmap;
+  CellE_handle ch;
+  remover.tmp.clear();
+  
+  for(unsigned int i=0; i < vertices.size(); i++){
+    typedef typename Point_remover::Triangulation_R3::Point TRPoint;
+    CGAL_triangulation_assertion(get_offset(vertices[i])
+	+ combine_offsets(Offset(), vh_off_map[vertices[i]])
+	== combine_offsets(get_offset(vertices[i]),vh_off_map[vertices[i]]));
+    TRPoint trp = std::make_pair(vertices[i]->point(),
+	combine_offsets( get_offset(vertices[i]), vh_off_map[vertices[i]]) );
+    VertexE_handle vh = remover.tmp.insert(trp, ch);
+    vmap[vh] = vertices[i];
+    CGAL_triangulation_assertion(vmap.is_defined(vh));
+  }
+  CGAL_triangulation_assertion(remover.tmp.number_of_vertices() != 0);
+
+  // Construct the set of vertex triples of tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of tmp
+  for(Finite_cellsE_iterator it = remover.tmp.finite_cells_begin();
+      it != remover.tmp.finite_cells_end();
+      ++it){
+    VertexE_triple vt_aux;
+    for(int i=0; i < 4; i++){
+      FacetE f = std::pair<CellE_handle,int>(it,i);
+      vt_aux = VertexE_triple(
+          f.first->vertex(vertex_triple_index(f.second,0)),
+          f.first->vertex(vertex_triple_index(f.second,1)),
+          f.first->vertex(vertex_triple_index(f.second,2)));
+      if (vmap.is_defined(vt_aux.first)
+          && vmap.is_defined(vt_aux.second)
+          && vmap.is_defined(vt_aux.third) ) {
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],
+            vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+
+  // A structure for storing the new neighboring relations
+  typedef boost::tuple<Cell_handle, int, Cell_handle> Neighbor_relation;
+  std::vector<Neighbor_relation> nr_vec;
+  std::vector<Cell_handle> new_cells;
+
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+    
+    typename Vertex_triple_FacetE_map::iterator iit =
+        inner_map.find(o_vt_f_pair.first);
+    
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_FacetE_map::value_type i_vt_f_pair = *iit;
+    CellE_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+    
+    // create a new cell to glue to the outer surface
+    Cell_handle new_ch = _tds.create_cell();
+    new_cells.push_back(new_ch);
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                        vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+    set_offsets(new_ch, vh_off_map[vmap[i_ch->vertex(0)]],
+                        vh_off_map[vmap[i_ch->vertex(1)]],
+                        vh_off_map[vmap[i_ch->vertex(2)]],
+                        vh_off_map[vmap[i_ch->vertex(3)]]);
+    
+    // Update the edge length management
+    for( int i=0 ; i < 4 ; i++ ) {
+      for (int j=0 ; j < 4 ; j++) {
+        if (j==i) continue;
+        if (&*(new_ch->vertex(i)) > &*(new_ch->vertex(j))) continue;
+
+	Point p1 = construct_point(new_ch->vertex(i)->point(),
+	    get_offset(new_ch, i));
+	Point p2 = construct_point(new_ch->vertex(j)->point(),
+	    get_offset(new_ch, j));
+        Vertex_handle v_no = new_ch->vertex(i);
+
+        if (squared_distance(p1,p2) > edge_length_threshold) {
+	  // If the cell does not fulfill the edge-length criterion
+	  // revert all changes to the triangulation and transform it
+	  // to a triangulation in the needed covering space.
+          if (is_1_cover()) {
+	    _tds.delete_cells(new_cells.begin(), new_cells.end());
+	    convert_to_27_sheeted_covering();
+            return;
+          }
+          else if (find(too_long_edges[v_no].begin(),
+			too_long_edges[v_no].end(),
+			new_ch->vertex(j))
+		   == too_long_edges[v_no].end()) {
+            too_long_edges[v_no].push_back(new_ch->vertex(j));
+            too_long_edge_counter++;
+          }
+        }
+      }
+    }
+
+    // The neighboring relation needs to be stored temporarily in
+    // nr_vec. It cannot be applied directly because then we could not
+    // easily cancel the removing process if a cell is encountered
+    // that does not obey the edge-length criterion.
+    nr_vec.push_back(boost::make_tuple(o_ch,o_i,new_ch));
+    nr_vec.push_back(boost::make_tuple(new_ch,i_i,o_ch));
+
+    // for the other faces check, if they can also be glued
+    for(unsigned int i = 0; i < 4; i++){
+      if(i != i_i){
+	Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+        // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+	  nr_vec.push_back(boost::make_tuple(o_ch2,o_i2,new_ch));
+	  nr_vec.push_back(boost::make_tuple(new_ch,i,o_ch2));
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+
+  // finally set the neighboring relations
+  for (unsigned int i=0 ; i<nr_vec.size() ; i++) {
+    nr_vec[i].template get<0>()->set_neighbor(nr_vec[i].template get<1>(),nr_vec[i].template get<2>());
+  }
+  
+  _tds.delete_vertex(v);
+  _tds.delete_cells(hole.begin(), hole.end());
+  CGAL_triangulation_expensive_assertion(is_valid());
+}
+
+// ############################################################################
+// ############################################################################
+// ############################################################################
+template < class GT, class TDS >
+template < class Cmp >
+class Periodic_3_triangulation_3<GT, TDS>::Perturbation_order {
+
+  typedef GT Geometric_traits;
+  typedef typename Geometric_traits::Point_3 Point;
+  typedef typename Geometric_traits::Compare_xyz_3 Compare_xyz_3;
+  typedef typename Periodic_3_triangulation_3<GT, TDS>::Periodic_point
+      Periodic_point;
+  
+  Cmp _cmp;
+
+public:
+  Perturbation_order(const Cmp & cmp) : _cmp(cmp) {}
+
+  bool operator()(const Periodic_point *p, const Periodic_point *q) const {
+    return (_cmp(p->first, q->first, p->second, q->second) == SMALLER);
+  }
+};
+
+// ############################################################################
+// ############################################################################
+// ############################################################################
+
+/** \brief Delete each redundant cell and the not anymore needed data
+ *  structures.
+ * 
+ *  This function consists of four iterations over all cells and one
+ *  iteration over all vertices:
+ *  1. cell iteration: mark all cells that are to delete
+ *  2. cell iteration: redirect neighbors of remaining cells
+ *  3. cell iteration: redirect vertices of remaining cells
+ *  4. cell iteration: delete all cells marked in the 1. iteration
+ *  Vertex iteration: delete all vertices outside the original domain.
+ */
+template < class GT, class TDS >
+inline void 
+Periodic_3_triangulation_3<GT,TDS>::convert_to_1_sheeted_covering() {
+  // ###################################################################
+  // ### First cell iteration ##########################################
+  // ###################################################################
+  {
+    if (is_1_cover()) return;
+    bool to_delete, has_simplifiable_offset;
+    Virtual_vertex_map_it vvmit;
+    // First iteration over all cells: Mark the cells that are to delete.
+    // Cells are to delete if they cannot be translated anymore in the
+    // direction of one of the axes without yielding negative offsets.
+    for( Cell_iterator it = all_cells_begin() ;
+    it != all_cells_end() ; ++it ) {
+      to_delete = false;
+      // for all directions in 3D Space
+      for( int j=0 ; j<3 ; j++ ) {
+        has_simplifiable_offset = true;
+        // for all vertices of cell it
+        for( int i=0 ; i<4 ; i++ ) {
+          vvmit = virtual_vertices.find(it->vertex(i));
+          // if it->vertex(i) lies inside the original domain:
+          if (vvmit == virtual_vertices.end()) {
+            // the cell cannot be moved any more because if we did, then
+            // it->vertex(i) will get at least one negative offset.
+            has_simplifiable_offset = false;
+            // if it->vertex(i) lies outside the original domain:
+          } else {
+            // The cell can certainly be deleted if the offset contains a 2
+            to_delete = to_delete
+                || (vvmit->second.second[j] == 2) ;
+            // The cell can be moved into one direction only if the offset of
+            // all for vertices is >=1 for this direction. Since we already
+            // tested for 2 it is sufficient to test here for 1.
+            has_simplifiable_offset = has_simplifiable_offset
+                && (vvmit->second.second[j] == 1) ;
+          }
+        } 
+        // if the offset can be simplified, i.e. the cell can be moved, then
+        // it can be deleted.
+        if (has_simplifiable_offset)
+          to_delete = true;
+      }
+      // Mark all cells that are to delete. They cannot be deleted yet,
+      // because neighboring information still needs to be extracted.
+      if (to_delete) {
+        it->set_additional_flag(1);
+      }
+    }
+  }
+
+  // ###################################################################
+  // ### Second cell iteration #########################################
+  // ###################################################################
+  {
+    Vertex_handle vert[4], nbv[4];
+    Offset off[4];
+    Cell_handle nb, new_neighbor;
+    std::vector<Triple<Cell_handle, int, Cell_handle> > new_neighbor_relations;
+
+    // Second iteration over all cells: redirect neighbors where necessary
+    for (Cell_iterator it = all_cells_begin() ;
+        it != all_cells_end() ; ++it) {
+      // Skip all cells that are to delete.
+      if (it->get_additional_flag() == 1) continue;
+      
+      // Redirect neighbors: Only neighbors that are marked by the
+      // additional_flag have to be substituted by one of their periodic
+      // copies. The unmarked neighbors stay the same.
+      for ( int i = 0 ; i < 4 ; i++ ) {
+        if ( it->neighbor(i)->get_additional_flag() != 1 ) continue;
+        
+        nb = it->neighbor(i);
+        
+        for ( int j = 0 ; j < 4 ; j++ ) {
+          off[j] = Offset();
+          get_vertex( nb, j, vert[j], off[j]);
+        }
+        int x,y,z;
+        x = (std::min) ( (std::min) ( off[0][0], off[1][0] ),
+            (std::min) ( off[2][0], off[3][0] ) );
+        y = (std::min) ( (std::min) ( off[0][1], off[1][1] ),
+            (std::min) ( off[2][1], off[3][1] ) );
+        z = (std::min) ( (std::min) ( off[0][2], off[1][2] ),
+            (std::min) ( off[2][2], off[3][2] ) );
+        
+        // The vector from nb to the "original" periodic copy of nb, that is
+        // the copy that will not be deleted.
+        Offset difference_offset(x,y,z);
+        CGAL_triangulation_assertion( !difference_offset.is_null() );
+        
+        // We now have to find the "original" periodic copy of nb from
+        // its vertices. Therefore, we first have to find the vertices.
+        for ( int j = 0 ; j < 4 ; j++ ) {
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[0] >= 0);
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[1] >= 0);
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[2] >= 0);
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[0] < 3);
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[1] < 3);
+          CGAL_triangulation_assertion( (off[j]-difference_offset)[2] < 3);
+          
+          // find the Vertex_handles of the vertices of the "original"
+          // periodic copy of nb. If the vertex is inside the original
+          // domain, there is nothing to do
+          if ( (off[j]-difference_offset).is_null() ) {
+            nbv[j] = vert[j];
+            // If the vertex is outside the original domain, we have to search
+            // in virtual_vertices in the "wrong" direction. That means, we
+            // cannot use virtual_vertices.find but have to use
+            // virtual_vertices_reverse.
+          } else {
+            Offset nbo = off[j]-difference_offset;
+            nbv[j] = virtual_vertices_reverse.find(vert[j])
+              ->second[nbo[0]*9+nbo[1]*3+nbo[2]-1];
+          }
+        }
+        // Find the new neighbor by its 4 vertices
+        new_neighbor = get_cell( nbv );
+        
+        // Store the new neighbor relation. This cannot be applied yet because
+        // it would disturb the functioning of get_cell( ... )
+        new_neighbor_relations.push_back(make_triple(it, i, new_neighbor));
+      }
+    }
+    // Apply the new neighbor relations now.
+    for (unsigned int i=0 ; i<new_neighbor_relations.size() ; i++){
+      new_neighbor_relations[i].first->set_neighbor(
+          new_neighbor_relations[i].second,
+          new_neighbor_relations[i].third);
+    }
+  }
+  
+  // ###################################################################
+  // ### Third cell iteration ##########################################
+  // ###################################################################
+  {
+    Vertex_handle vert[4];
+    Offset off[4];
+    // Third iteration over all cells: redirect vertices where necessary
+    for (Cell_iterator it = all_cells_begin() ;
+        it != all_cells_end() ; ++it) {
+      // Skip all cells that are marked to delete
+      if (it->get_additional_flag() == 1) continue;
+      // Find the corresponding vertices of it in the original domain
+      // and set them as new vertices of it.
+      for ( int i = 0 ; i < 4 ; i++ ) {
+        off[i] = Offset();
+        get_vertex( it, i, vert[i], off[i]);
+        it->set_vertex( i, vert[i]);
+        CGAL_triangulation_assertion(vert[i]->point()[0] < _domain.xmax());
+        CGAL_triangulation_assertion(vert[i]->point()[1] < _domain.ymax());
+        CGAL_triangulation_assertion(vert[i]->point()[2] < _domain.zmax());
+        CGAL_triangulation_assertion(vert[i]->point()[0] >= _domain.xmin());
+        CGAL_triangulation_assertion(vert[i]->point()[1] >= _domain.ymin());
+        CGAL_triangulation_assertion(vert[i]->point()[2] >= _domain.zmin());
+        
+        // redirect also the cell pointer of the vertex.
+        it->vertex(i)->set_cell(it);
+      }
+      // Set the offsets.
+      set_offsets(it, off[0], off[1], off[2], off[3] );
+      CGAL_triangulation_assertion( int_to_off(it->offset(0)) == off[0] );
+      CGAL_triangulation_assertion( int_to_off(it->offset(1)) == off[1] );
+      CGAL_triangulation_assertion( int_to_off(it->offset(2)) == off[2] );
+      CGAL_triangulation_assertion( int_to_off(it->offset(3)) == off[3] );
+    }
+  }
+  
+  // ###################################################################
+  // ### Fourth cell iteration #########################################
+  // ###################################################################
+  {
+    // Delete the marked cells.
+    std::vector<Cell_handle> cells_to_delete;
+    for ( Cell_iterator cit = all_cells_begin() ;
+    cit != all_cells_end() ; ++cit ) {
+      if ( cit->get_additional_flag() == 1 )
+        cells_to_delete.push_back( cit );
+    }
+    _tds.delete_cells(cells_to_delete.begin(), cells_to_delete.end());
+  }
+  
+  // ###################################################################
+  // ### Vertex iteration ##############################################
+  // ###################################################################
+  {
+    // Delete all the vertices in virtual_vertices, that is all vertices
+    // outside the original domain.
+    std::vector<Vertex_handle> vertices_to_delete;
+    for ( Vertex_iterator vit = all_vertices_begin() ;
+	  vit != all_vertices_end() ; ++vit ) {
+      if ( virtual_vertices.count( vit ) != 0 ) {
+        CGAL_triangulation_assertion( virtual_vertices.count( vit ) == 1 );
+        vertices_to_delete.push_back( vit ) ;
+      }
+    }
+    _tds.delete_vertices(vertices_to_delete.begin(), vertices_to_delete.end());
+  }
+  _cover = make_array(1,1,1);
+  virtual_vertices.clear();
+  virtual_vertices_reverse.clear();
+}
+
+template < class GT, class TDS >
+inline void
+Periodic_3_triangulation_3<GT,TDS>::convert_to_27_sheeted_covering() {
+  if (_cover == make_array(3,3,3)) return;
+  CGAL_triangulation_precondition(is_1_cover());
+
+  // Create 27 copies of each vertex and write virtual_vertices and
+  // virtual_vertices_reverse
+  std::list<Vertex_handle> original_vertices;
+  // try to use std::copy instead of the following loop.
+  for (Vertex_iterator vit = vertices_begin() ; vit != vertices_end() ; ++vit)
+    original_vertices.push_back(vit);
+  for (typename std::list<Vertex_handle>::iterator vit
+	 = original_vertices.begin() ; vit != original_vertices.end() ; ++vit) {
+    Vertex_handle v_cp;
+    std::vector<Vertex_handle> copies;
+    for (int i=0; i<3; i++)
+      for (int j=0; j<3; j++)
+	for (int k=0; k<3; k++) {
+	  if (i==0 && j==0 && k==0) continue;
+	  v_cp = _tds.create_vertex(*vit);
+	  copies.push_back(v_cp);
+	  virtual_vertices.insert(std::make_pair(v_cp,
+	      std::make_pair(*vit,Offset(i,j,k))));
+	}
+    virtual_vertices_reverse.insert(std::make_pair(*vit,copies));
+  }
+
+  // Create 27 copies of each cell from the respective copies of the
+  // vertices and write virtual_cells and virtual_cells_reverse.
+  typedef std::map<Cell_handle, std::pair<Cell_handle, Offset> >
+    Virtual_cell_map;
+  typedef std::map<Cell_handle, std::vector<Cell_handle > >
+    Virtual_cell_reverse_map;
+  typedef typename Virtual_cell_reverse_map::const_iterator VCRMIT;
+
+  Virtual_cell_map virtual_cells;
+  Virtual_cell_reverse_map virtual_cells_reverse;
+  
+  std::list<Cell_handle> original_cells;
+  for (Cell_iterator cit = cells_begin() ; cit != cells_end() ; ++cit)
+    original_cells.push_back(cit);
+
+  // Store vertex offsets in a separate data structure
+  std::list< Offset > off_v;
+  for (typename std::list<Vertex_handle>::iterator vit
+	 = original_vertices.begin() ; vit != original_vertices.end() ; ++vit) {
+    Cell_handle ccc = (*vit)->cell();
+    int v_index = ccc->index(*vit);
+    off_v.push_back(int_to_off(ccc->offset(v_index)));
+  }
+
+  // Store neighboring offsets in a separate data structure
+  std::list< array<Offset,4> > off_nb;
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
+       cit != original_cells.end() ; ++cit) {
+    array<Offset,4> off_nb_c;
+    for (int i=0; i<4; i++){
+      Cell_handle ccc = *cit;
+      Cell_handle nnn = ccc->neighbor(i);
+      off_nb_c[i] = get_neighbor_offset(ccc,i,nnn);
+    }
+    off_nb.push_back(off_nb_c);
+  }
+
+  // Create copies of cells
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
+       cit != original_cells.end() ; ++cit) {
+    Cell_handle c_cp;
+    Vertex_handle v0,v1,v2,v3;
+    std::vector<Cell_handle> copies;
+    Virtual_vertex_reverse_map_it vvrmit[4];
+    Offset vvoff[4];
+    for (int i=0; i<4; i++) {
+	vvrmit[i] = virtual_vertices_reverse.find((*cit)->vertex(i));
+	CGAL_triangulation_assertion(
+	    vvrmit[i] != virtual_vertices_reverse.end());
+	vvoff[i] = int_to_off((*cit)->offset(i));
+    }
+    Vertex_handle vvh[4];
+    for (int n=0; n<26; n++) {
+      for (int i=0; i<4; i++) {
+	// Decomposition of n into an offset (nx,ny,nz):
+	// nx = (n+1)/9, ny = ((n+1)/3)%3, nz = (n+1)%3
+	int o_i = ((n+1)/9+vvoff[i].x()+3)%3;
+	int o_j = ((n+1)/3+vvoff[i].y()+3)%3;
+	int o_k = ((n+1)+vvoff[i].z()+3)%3;
+	int n_c = 9*o_i+3*o_j+o_k-1;
+	CGAL_triangulation_assertion(n_c >= -1);
+	if (n_c == -1) vvh[i] = (*cit)->vertex(i);
+	else           vvh[i] = vvrmit[i]->second[n_c];
+      }
+      c_cp = _tds.create_cell(vvh[0], vvh[1], vvh[2], vvh[3]);
+      copies.push_back(c_cp);
+    }
+    virtual_cells_reverse.insert(std::make_pair(*cit,copies));
+  }
+
+  // Set new vertices of boundary cells of the original domain.
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
+       cit != original_cells.end() ; ++cit) {
+    for (int i=0; i<4; i++) {
+      Virtual_vertex_reverse_map_it vvrmit
+	= virtual_vertices_reverse.find((*cit)->vertex(i));
+      CGAL_triangulation_assertion(vvrmit != virtual_vertices_reverse.end());
+      Offset vvoff = int_to_off((*cit)->offset(i));
+      if (!vvoff.is_null()) {
+	int n_c = 9*vvoff.x()+3*vvoff.y()+vvoff.z()-1;
+	CGAL_triangulation_assertion(n_c >= 0);
+	CGAL_triangulation_assertion(static_cast<unsigned int>(n_c) 
+	    < vvrmit->second.size());
+	(*cit)->set_vertex(i,vvrmit->second[n_c]);
+      }
+    }
+  }
+
+  // Set neighboring relations of cell copies
+  typename std::list< array<Offset,4> >::iterator oit = off_nb.begin() ; 
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin();
+       cit != original_cells.end() ; ++cit, ++oit) {
+    CGAL_triangulation_assertion( oit != off_nb.end() );
+    VCRMIT c_cp = virtual_cells_reverse.find(*cit);
+    CGAL_triangulation_assertion(c_cp != virtual_cells_reverse.end());
+    for (int i=0; i<4; i++) {
+      Cell_handle cit_nb = (*cit)->neighbor(i);
+      VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb);
+      CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end());
+      Offset nboff = (*oit)[i];
+      for (int n=0; n<26; n++) {
+	int n_nb;
+ 	if (nboff.is_null()) n_nb = n;
+ 	else {
+ 	  int o_i = ((n+1)/9-nboff.x()+3)%3;
+ 	  int o_j = ((n+1)/3-nboff.y()+3)%3;
+ 	  int o_k = (n+1-nboff.z()+3)%3;
+ 	  n_nb = 9*o_i+3*o_j+o_k-1;
+ 	}
+	if (n_nb == -1) {
+	  CGAL_triangulation_assertion(cit_nb->has_vertex(
+		  c_cp->second[n]->vertex((i+1)%4)) );
+	  CGAL_triangulation_assertion(cit_nb->has_vertex(
+		  c_cp->second[n]->vertex((i+2)%4)) );
+	  CGAL_triangulation_assertion(cit_nb->has_vertex(
+		  c_cp->second[n]->vertex((i+3)%4)) );
+	  c_cp->second[n]->set_neighbor(i,cit_nb);
+	}
+	else {
+	  CGAL_triangulation_assertion(n_nb >= 0);
+	  CGAL_triangulation_assertion(static_cast<unsigned int>(n_nb)
+	      <= c_cp_nb->second.size());
+	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+			 ->has_vertex(c_cp->second[n]->vertex((i+1)%4)) );
+	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+			 ->has_vertex(c_cp->second[n]->vertex((i+2)%4)) );
+	  CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+			 ->has_vertex(c_cp->second[n]->vertex((i+3)%4)) );
+	  c_cp->second[n]->set_neighbor(i,c_cp_nb->second[n_nb]);
+	}
+      }
+    }
+  }
+
+  // Set neighboring relations of original cells
+  oit = off_nb.begin();
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin();
+       cit != original_cells.end() ; ++cit, ++oit) {
+    CGAL_triangulation_assertion( oit != off_nb.end() );
+    for (int i=0; i<4; i++) {
+      Offset nboff = (*oit)[i];
+      if (!nboff.is_null()) {
+	Cell_handle cit_nb = (*cit)->neighbor(i);
+	VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb);
+	CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end());
+	int o_i = (3-nboff.x())%3;
+	int o_j = (3-nboff.y())%3;
+	int o_k = (3-nboff.z())%3;
+	int n_nb = 9*o_i+3*o_j+o_k-1;
+	CGAL_triangulation_assertion(n_nb >= 0);
+	CGAL_triangulation_assertion(static_cast<unsigned int>(n_nb)
+	    <= c_cp_nb->second.size());
+	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+		       ->has_vertex((*cit)->vertex((i+1)%4)) );
+	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+		       ->has_vertex((*cit)->vertex((i+2)%4)) );
+	CGAL_triangulation_assertion(c_cp_nb->second[n_nb]
+		       ->has_vertex((*cit)->vertex((i+3)%4)) );
+	(*cit)->set_neighbor(i,c_cp_nb->second[n_nb]);
+      }
+    }
+  }
+
+  // Set incident cells 
+  for (Cell_iterator cit = cells_begin() ; cit != cells_end() ; ++cit) {
+    for (int i=0 ; i<4 ; i++) {
+      cit->vertex(i)->set_cell(cit);
+    }
+  }
+
+  // Set offsets where necessary
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
+       cit != original_cells.end() ; ++cit) {
+    VCRMIT c_cp = virtual_cells_reverse.find(*cit);
+    CGAL_triangulation_assertion( c_cp != virtual_cells_reverse.end());
+    Offset off[4];
+    for (int i=0; i<4; i++)
+      off[i] = int_to_off((*cit)->offset(i));
+    if (off[0].is_null() && off[1].is_null()
+	&& off[2].is_null() && off[3].is_null()) continue;
+    for (int n=0; n<26; n++) {
+      Offset off_cp[4];
+      int o_i = (n+1)/9;
+      int o_j = ((n+1)/3)%3;
+      int o_k = (n+1)%3;
+      if (o_i!=2 && o_j!=2 && o_k !=2) continue;
+      for (int i=0; i<4; i++) {
+	off_cp[i] = Offset((o_i==2)?off[i].x():0,
+			   (o_j==2)?off[i].y():0,
+			   (o_k==2)?off[i].z():0);
+	CGAL_triangulation_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1);
+	CGAL_triangulation_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1);
+	CGAL_triangulation_assertion(off_cp[i].z() == 0 || off_cp[i].z() == 1);
+      }
+      set_offsets(c_cp->second[n],off_cp[0],off_cp[1],off_cp[2],off_cp[3]);
+    }
+  }
+
+  // Iterate over all original cells and reset offsets.
+  for (typename std::list<Cell_handle>::iterator cit = original_cells.begin() ;
+       cit != original_cells.end() ; ++cit) {
+    //This statement does not seem to have any effect
+    set_offsets(*cit, 0,0,0,0);
+    CGAL_triangulation_assertion((*cit)->offset(0) == 0);
+    CGAL_triangulation_assertion((*cit)->offset(1) == 0);
+    CGAL_triangulation_assertion((*cit)->offset(2) == 0);
+    CGAL_triangulation_assertion((*cit)->offset(3) == 0);
+  }
+
+  _cover = make_array(3,3,3);
+  CGAL_triangulation_expensive_assertion(is_valid());
+
+  // Set up too long edges data structure
+  int i=0;
+  for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) {
+    too_long_edges[vit] = std::list<Vertex_handle>();
+    ++i;
+  }
+  too_long_edge_counter = find_too_long_edges(too_long_edges);
+}
+
+// iterate over all edges and store the ones that are longer than
+// edge_length_threshold in edges. Return the number of too long edges.
+template < class GT, class TDS >
+inline int
+Periodic_3_triangulation_3<GT,TDS>::find_too_long_edges(
+    std::map<Vertex_handle, std::list<Vertex_handle> >& edges)
+const {
+  Point p1, p2;
+  int counter = 0;
+  Vertex_handle v_no,vh;
+  for (Edge_iterator eit = edges_begin();
+       eit != edges_end() ; eit++) {
+    p1 = construct_point(eit->first->vertex(eit->second)->point(),
+	get_offset(eit->first, eit->second));
+    p2 = construct_point(eit->first->vertex(eit->third)->point(),
+	get_offset(eit->first, eit->third));
+    if (squared_distance(p1,p2) > edge_length_threshold) {
+      if (&*(eit->first->vertex(eit->second)) <
+	  &*(eit->first->vertex(eit->third))) {
+	v_no = eit->first->vertex(eit->second);
+	vh = eit->first->vertex(eit->third);
+      } else {
+	v_no = eit->first->vertex(eit->third);
+	vh = eit->first->vertex(eit->second);
+      }
+      edges[v_no].push_back(vh);
+      counter++;
+    }
+  }
+  return counter;
+}
+
+template < class GT, class TDS >
+class Periodic_3_triangulation_3<GT,TDS>::Finder {
+  const Self* _t;
+  const Point & _p;
+public:
+  Finder(const Self* t, const Point &p) : _t(t), _p(p) {}
+  bool operator()(const Vertex_handle v) {
+    return _t->equal(v->point(), _p);
+  }
+};
+
+/** Find the cell that consists of the four given vertices
+ *
+ *  Iterates over all cells and compare the four vertices of each cell
+ *  with the four vertices in vh.
+ */
+template < class GT, class TDS >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Cell_handle
+Periodic_3_triangulation_3<GT,TDS>::get_cell(const Vertex_handle* vh) const {
+  bool contains_v[4];
+  std::vector<Cell_handle> cells;
+  incident_cells(vh[3],std::back_inserter(cells));
+  for ( typename std::vector<Cell_handle>::iterator it = cells.begin();
+       it != cells.end(); it++ ) {
+    CGAL_triangulation_assertion(
+	(*it)->vertex(0) == vh[3] || (*it)->vertex(1) == vh[3]
+      ||(*it)->vertex(2) == vh[3] || (*it)->vertex(3) == vh[3]) ;
+    for ( int j=0 ; j<3 ; j++ ) {
+      contains_v[j] = false;
+      contains_v[j] = ( (*it)->vertex(0) == vh[j] )
+          || ( (*it)->vertex(1) == vh[j] )
+          || ( (*it)->vertex(2) == vh[j] )
+          || ( (*it)->vertex(3) == vh[j] );
+    }
+    if (contains_v[0] && contains_v[1] && contains_v[2]) {
+      return (*it);
+    }
+  }
+  CGAL_triangulation_assertion(false);
+  return Cell_handle();
+}
+
+/*! \brief Get the offset of tester.point() such that 
+ * this point is in conflict with c w.r.t tester.get_offset().
+ *
+ * Implementation: Just try all eight possibilities.
+ */
+template < class GT, class TDS >
+template < class Conflict_tester >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Offset
+Periodic_3_triangulation_3<GT,TDS>::get_location_offset(
+    const Conflict_tester& tester, Cell_handle c) const {
+  CGAL_triangulation_precondition( number_of_vertices() != 0 );
+
+  //  CGAL_triangulation_precondition_code(Locate_type lt; int i; int j;);
+  //  CGAL_triangulation_precondition(side_of_cell(q,o,c,lt,i,j)
+  //      != ON_UNBOUNDED_SIDE);
+
+  int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3);
+  if (cumm_off == 0) {
+    // default case:
+    return Offset();
+  } else {
+    // Main idea seems to just test all possibilities.
+    for (int i=0; i<8; i++) {
+      if (((cumm_off | (~i))&7) == 7) {
+		  if (tester(c,int_to_off(i))) {
+			return int_to_off(i);
+        }
+      }
+    }
+  }
+  CGAL_triangulation_assertion(false);
+  return Offset();
+}
+
+/** Get the offset between the origins of the internal offset coordinate
+  * systems of two neighboring cells with respect from ch to nb.
+  *
+  * - Find two corresponding vertices from each cell
+  * - Return the difference of their offsets.
+  */
+template < class GT, class TDS >
+inline typename Periodic_3_triangulation_3<GT,TDS>::Offset
+Periodic_3_triangulation_3<GT,TDS>::get_neighbor_offset(
+    Cell_handle ch, int i, Cell_handle nb) const {
+  // Redundance in the signature!
+  CGAL_triangulation_precondition(ch->neighbor(i) == nb);
+  CGAL_triangulation_precondition(nb->neighbor(nb->index(ch)) == ch);
+  
+  Vertex_handle vertex_ch;
+  int index_ch, index_nb;
+  // ensure that vertex_ch \in nb and vertex_nb \in ch
+  index_ch = (i==0? 1 : 0);
+  vertex_ch = ch->vertex(index_ch);
+  index_nb = nb->index(vertex_ch);
+
+  return int_to_off(nb->offset(index_nb)) - int_to_off(ch->offset(index_ch));
+}
+
+/**
+ * - ch->offset(i) is an bit triple encapsulated in an integer. Each bit
+ *   represents the offset in one direction --> 2-cover!
+ * - it_to_off(int) decodes this again.
+ * - Finally the offset vector is multiplied by cover.
+ *   So if we are working in 3-cover we translate it to the neighboring
+ *   3-cover and not only to the neighboring domain.
+ */
+template < class GT, class TDS >
+inline void Periodic_3_triangulation_3<GT, TDS>::get_vertex(
+    Cell_handle ch, int i, Vertex_handle &vh, Offset &off) const {
+
+  off = combine_offsets(Offset(),int_to_off(ch->offset(i)));
+  vh = ch->vertex(i);
+  
+  if (is_1_cover()) return;
+  Vertex_handle vh_i = vh;
+  get_vertex(vh_i, vh, off);
+  return;
+}
+
+template < class GT, class TDS >
+inline void Periodic_3_triangulation_3<GT, TDS>::get_vertex(
+    Vertex_handle vh_i, Vertex_handle &vh, Offset &off) const {
+  
+  Virtual_vertex_map_it it = virtual_vertices.find(vh_i);
+
+  if (it == virtual_vertices.end()) {
+    // if ch->vertex(i) is not contained in virtual_vertices, then it is in
+    // the original domain.
+    vh = vh_i;
+    CGAL_triangulation_assertion(vh != Vertex_handle());
+  } else {
+    // otherwise it has to be looked up as well as its offset.
+    vh = it->second.first;
+    off += it->second.second;
+    CGAL_triangulation_assertion(vh->point().x() < _domain.xmax());
+    CGAL_triangulation_assertion(vh->point().y() < _domain.ymax());
+    CGAL_triangulation_assertion(vh->point().z() < _domain.zmax());
+    CGAL_triangulation_assertion(vh->point().x() >= _domain.xmin());
+    CGAL_triangulation_assertion(vh->point().y() >= _domain.ymin());
+    CGAL_triangulation_assertion(vh->point().z() >= _domain.zmin());
+  }
+}
+
+template < class GT, class TDS >
+std::istream & 
+operator>> (std::istream& is, Periodic_3_triangulation_3<GT,TDS> &tr)
+  // reads
+  // the current covering that guarantees the triangulation to be a
+  //     simplicial complex
+  // the number of vertices
+  // the non combinatorial information on vertices (points in case of 1-sheeted
+  //     covering, point-offset pairs otherwise)
+  //     ALL PERIODIC COPIES OF ONE VERTEX MUST BE STORED CONSECUTIVELY
+  // the number of cells
+  // the cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each cell
+  // the neighbors of each cell by their index in the preceding list of cells
+{
+  CGAL_triangulation_precondition(is.good());
+
+  typedef Periodic_3_triangulation_3<GT,TDS>       Triangulation;
+  typedef typename GT::FT FT;
+  typedef typename Triangulation::size_type             size_type;
+  typedef typename Triangulation::Vertex_handle         Vertex_handle;
+  typedef typename Triangulation::Cell_handle           Cell_handle;
+  typedef typename Triangulation::Offset                Offset;
+  typedef typename Triangulation::Iso_cuboid            Iso_cuboid;
+
+  tr.clear();
+
+  Iso_cuboid domain(0,0,0,1,1,1);
+  int cx=0, cy=0, cz=0;
+  size_type n=0;
+
+  if (is_ascii(is)) {
+    is >> domain;
+    is >> cx >> cy >> cz;
+    is >> n;
+  }
+  else {
+    is >> domain;
+    read(is,cx);
+    read(is,cy);
+    read(is,cz);
+    read(is,n);
+  }
+ 
+  CGAL_triangulation_assertion((n/(cx*cy*cz))*cx*cy*cz == n);
+
+  tr.tds().set_dimension((n==0?-2:3));
+  tr._domain = domain;
+  tr._gt.set_domain(domain);
+  tr._cover = make_array(cx,cy,cz);
+
+  if ( n==0 ) return is;
+
+  std::map< std::size_t, Vertex_handle > V;
+
+  if (cx==1 && cy==1 && cz==1) {
+    for (std::size_t i=0; i < n; i++) {
+      V[i] = tr.tds().create_vertex();
+      is >> *V[i];
+    }
+  } else {
+    Vertex_handle v,w;
+    std::vector<Vertex_handle> vv;
+    Offset off;
+    for (std::size_t i=0; i < n; i++) {
+      v = tr.tds().create_vertex();
+      V[i] = v;
+      is >> *V[i] >> off;
+      vv.clear();
+      for (int j=1; j<cx*cy*cz; j++) {
+        i++;
+        w = tr.tds().create_vertex();
+        V[i] = w;
+        is >> *V[i] >> off;
+        vv.push_back(w);
+        tr.virtual_vertices[w]=std::make_pair(v,off);
+      }
+      tr.virtual_vertices_reverse[v]=vv;
+    }
+  }
+  
+  std::map< std::size_t, Cell_handle > C;
+  std::size_t m;
+  tr._tds.read_cells(is, V, m, C);
+
+  // read offsets
+  int off[4] = {0,0,0,0};
+  for (std::size_t j=0 ; j < m; j++) {
+    if (is_ascii(is))
+      is >> off[0] >> off[1] >> off[2] >> off[3];
+    else {
+      read(is,off[0]);
+      read(is,off[1]);
+      read(is,off[2]);
+      read(is,off[3]);
+    }
+    tr.set_offsets(C[j],off[0],off[1],off[2],off[3]);
+  }
+  
+  // read potential other information
+  for (std::size_t j=0 ; j < m; j++)
+    is >> *(C[j]);
+
+  typedef typename Triangulation::Vertex_iterator VI;
+
+  int i=0;
+  for (VI vi = tr.vertices_begin();
+      vi != tr.vertices_end(); ++vi) {
+    tr.too_long_edges[vi]=std::list<Vertex_handle>();
+    ++i;
+  }
+
+  tr.edge_length_threshold = FT(0.166) * (tr._domain.xmax()-tr._domain.xmin())
+                                       * (tr._domain.xmax()-tr._domain.xmin());
+  tr.too_long_edge_counter = tr.find_too_long_edges(tr.too_long_edges);
+
+  CGAL_triangulation_expensive_assertion( tr.is_valid() );
+  return is;
+}
+    
+template < class GT, class TDS >
+std::ostream & 
+operator<< (std::ostream& os,const Periodic_3_triangulation_3<GT,TDS> &tr)
+// writes :
+// the number of vertices
+// the domain as six coordinates: xmin ymin zmin xmax ymax zmax
+// the current covering that guarantees the triangulation to be a
+//     simplicial complex
+// the non combinatorial information on vertices (points in case of 1-sheeted
+//     covering, point-offset pairs otherwise)
+//     ALL PERIODIC COPIES OF ONE VERTEX MUST BE STORED CONSECUTIVELY
+// the number of cells
+// the cells by the indices of their vertices in the preceding list
+// of vertices, plus the non combinatorial information on each cell
+// the neighbors of each cell by their index in the preceding list of cells
+{
+  typedef Periodic_3_triangulation_3<GT,TDS>       Triangulation;
+  typedef typename Triangulation::size_type        size_type;
+  typedef typename Triangulation::Vertex_handle    Vertex_handle;
+  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
+  typedef typename Triangulation::Cell_handle      Cell_handle;
+  typedef typename Triangulation::Cell_iterator    Cell_iterator;
+  typedef typename Triangulation::Covering_sheets  Covering_sheets;
+  typedef typename Triangulation::Offset           Offset;
+  typedef typename Triangulation::Virtual_vertex_map_it Virtual_vertex_map_it;
+  typedef typename Triangulation::Iso_cuboid       Iso_cuboid;
+
+  // outputs dimension, domain and number of vertices
+  Iso_cuboid domain = tr.domain();
+  Covering_sheets cover = tr.number_of_sheets();
+  size_type n = tr.number_of_vertices();
+
+  if (is_ascii(os))
+    os << domain << std::endl
+       << cover[0] << " " << cover[1] << " " << cover[2] << std::endl
+       << n*cover[0]*cover[1]*cover[2] << std::endl;       
+  else {
+    os << domain;
+    write(os,cover[0]);
+    write(os,cover[1]);
+    write(os,cover[2]);
+    write(os,n*cover[0]*cover[1]*cover[2]);
+  }
+
+  if (n == 0)
+    return os;
+ 
+  // write the vertices
+  Unique_hash_map<Vertex_handle, std::size_t > V;
+  std::size_t i=0;
+  if (tr.is_1_cover()) {
+    for (Vertex_iterator it=tr.vertices_begin(); it!=tr.vertices_end(); ++it) {
+      V[it] = i++;
+      os << it->point();
+      if (is_ascii(os))
+        os << std::endl;
+    }
+  } else {
+    Virtual_vertex_map_it vit, vvit;
+    std::vector<Vertex_handle> vv;
+    for (Vertex_iterator it=tr.vertices_begin(); it!=tr.vertices_end(); ++it) {
+      vit = tr.virtual_vertices.find(it);
+      if (vit != tr.virtual_vertices.end()) continue;
+      V[it]=i++;
+      if (is_ascii(os))
+        os << it->point() << std::endl
+           << Offset(0,0,0) << std::endl;
+      else os << it->point() << Offset(0,0,0);
+      CGAL_triangulation_assertion(tr.virtual_vertices_reverse.find(it)
+          != tr.virtual_vertices_reverse.end());
+      vv = tr.virtual_vertices_reverse.find(it)->second;
+      CGAL_triangulation_assertion(vv.size() == 26);
+      for (std::size_t j=0; j<vv.size(); j++) {
+        vvit = tr.virtual_vertices.find(vv[j]);
+        CGAL_triangulation_assertion(vvit != tr.virtual_vertices.end());
+        V[vv[j]] = i++;
+        if (is_ascii(os))
+          os << vv[j]->point() << std::endl
+             << vvit->second.second << std::endl;
+        else os << vv[j]->point() << vvit->second.second;
+      }
+    }
+  }
+  CGAL_triangulation_postcondition(i==tr._cover[0]*tr._cover[1]*tr._cover[2]*n);
+  
+  // asks the tds for the combinatorial information
+  tr.tds().print_cells(os, V);
+  
+  // write offsets
+  //for (unsigned int i=0 ; i<tr.number_of_cells() ; i++) {
+  for (Cell_iterator it=tr.cells_begin(); it!=tr.cells_end(); ++it) {
+    //Cell_handle ch = std::find(tr.cells_begin(), tr.cells_end(), i);
+    Cell_handle ch(it);
+    for (int j=0; j<4; j++) {
+      if(is_ascii(os)) {
+	os << ch->offset(j);
+        if ( j==3 )
+          os << std::endl;
+        else
+          os << ' ';
+      }
+      else write(os,ch->offset(j));
+    }
+  }
+  
+  // write the non combinatorial information on the cells
+  // using the << operator of Cell
+  // works because the iterator of the tds traverses the cells in the
+  // same order as the iterator of the triangulation
+  if(tr.number_of_vertices() != 0) {
+      for(Cell_iterator it=tr.cells_begin(); it != tr.cells_end(); ++it) {
+    os << *it; // other information
+    if(is_ascii(os))
+      os << std::endl;
+    }
+  }
+  return os ;
+}
+
+namespace internal {
+
+  /// Internal function used by operator==.
+  // This function tests and registers the 4 neighbors of c1/c2,
+  // and performs a bfs traversal
+  // Returns false if an inequality has been found.
+  //TODO: introduce offsets
+  template <class GT, class TDS1, class TDS2>
+  bool
+  test_next(const Periodic_3_triangulation_3<GT, TDS1> &t1,
+            const Periodic_3_triangulation_3<GT, TDS2> & /* needed_for_deducing_TDS2 */,
+            typename Periodic_3_triangulation_3<GT, TDS1>::Cell_handle c1,
+            typename Periodic_3_triangulation_3<GT, TDS2>::Cell_handle c2,
+            std::map<typename Periodic_3_triangulation_3<GT, TDS1>::Cell_handle,
+            typename Periodic_3_triangulation_3<GT, TDS2>::Cell_handle> &Cmap,
+            std::map<typename Periodic_3_triangulation_3<GT, TDS1>::Vertex_handle,
+            typename Periodic_3_triangulation_3<GT, TDS2>::Vertex_handle> &Vmap)
+  {  
+    typedef Periodic_3_triangulation_3<GT, TDS1> Tr1;
+    typedef Periodic_3_triangulation_3<GT, TDS2> Tr2;
+    typedef typename Tr1::Vertex_handle  Vertex_handle1;
+    typedef typename Tr1::Cell_handle    Cell_handle1;
+    typedef typename Tr2::Vertex_handle  Vertex_handle2;
+    typedef typename Tr2::Cell_handle    Cell_handle2;
+    typedef typename std::map<Cell_handle1, Cell_handle2>::const_iterator  Cit;
+    typedef typename std::map<Vertex_handle1, Vertex_handle2>::const_iterator Vit;
+
+    std::vector<std::pair<Cell_handle1, Cell_handle2> > queue;
+    queue.push_back(std::make_pair(c1,c2));
+    
+    while(! queue.empty()){
+      boost::tie(c1,c2) = queue.back();
+      queue.pop_back();
+  
+      // Precondition: c1, c2 have been registered as well as their 4 vertices.
+      CGAL_triangulation_precondition(t1.number_of_vertices() != 0);
+      CGAL_triangulation_precondition(Cmap[c1] == c2);
+      CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end());
+      CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end());
+      CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end());
+      CGAL_triangulation_precondition(Vmap.find(c1->vertex(3)) != Vmap.end());
+      
+
+      for (int i=0; i <= 3; ++i) {
+        Cell_handle1 n1 = c1->neighbor(i);
+        Cit cit = Cmap.find(n1);
+        Vertex_handle1 v1 = c1->vertex(i);
+        Vertex_handle2 v2 = Vmap[v1];
+        Cell_handle2 n2 = c2->neighbor(c2->index(v2));
+        if (cit != Cmap.end()) {
+          // n1 was already registered.
+          if (cit->second != n2)
+            return false;
+          continue;
+        }
+        // n1 has not yet been registered.
+        // We check that the new vertices match geometrically.
+        // And we register them.
+        Vertex_handle1 vn1 = n1->vertex(n1->index(c1));
+        Vertex_handle2 vn2 = n2->vertex(n2->index(c2));
+        Vit vit = Vmap.find(vn1);
+        if (vit != Vmap.end()) {
+          // vn1 already registered
+          if (vit->second != vn2)
+            return false;
+        }
+        else {
+          if (t1.geom_traits().compare_xyz_3_object()(vn1->point(),
+                                                      vn2->point()) != 0)
+            return false;
+          
+          // We register vn1/vn2.
+          Vmap.insert(std::make_pair(vn1, vn2));
+        }
+        
+        // We register n1/n2.
+        Cmap.insert(std::make_pair(n1, n2));
+        queue.push_back(std::make_pair(n1, n2));
+      }
+    }
+    return true;
+  }
+
+} // namespace internal
+
+
+template < class GT, class TDS1, class TDS2  >
+bool
+operator==(const Periodic_3_triangulation_3<GT,TDS1> &t1,
+     const Periodic_3_triangulation_3<GT,TDS2> &t2)
+{
+  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Vertex_handle
+      Vertex_handle1;
+  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Cell_handle  
+      Cell_handle1;
+  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Vertex_handle
+      Vertex_handle2;
+  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Vertex_handle
+      Vertex_iterator2;
+  typedef typename Periodic_3_triangulation_3<GT,TDS2>::Cell_handle
+      Cell_handle2;
+  
+  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Point      Point;
+  typedef typename Periodic_3_triangulation_3<GT,TDS1>::Offset     Offset;
+
+  // typedef typename Periodic_3_triangulation_3<GT,TDS1>
+  //     ::Geometric_traits::Compare_xyz_3                       Compare_xyz_3;
+  // Compare_xyz_3 cmp1 = t1.geom_traits().compare_xyz_3_object();
+  // Compare_xyz_3 cmp2 = t2.geom_traits().compare_xyz_3_object();
+  
+  // Some quick checks.
+  if (   t1.domain()           != t2.domain()
+      || t1.number_of_sheets() != t2.number_of_sheets())
+    return false;
+
+  if (   t1.number_of_vertices() != t2.number_of_vertices()
+      || t1.number_of_cells() != t2.number_of_cells())
+    return false;
+
+  // Special case for empty triangulations
+  if (t1.number_of_vertices() == 0)
+    return true;
+
+  // We will store the mapping between the 2 triangulations vertices and
+  // cells in 2 maps.
+  std::map<Vertex_handle1, Vertex_handle2> Vmap;
+  std::map<Cell_handle1, Cell_handle2> Cmap;
+
+  // find a common point
+  Vertex_handle1 v1 = static_cast<Vertex_handle1>(t1.vertices_begin());
+  Vertex_handle2 iv2;
+  for (Vertex_iterator2 vit2 = t2.vertices_begin() ;
+      vit2 != t2.vertices_end(); ++vit2) {
+    if (!t1.equal(vit2->point(), v1->point(),
+		  t2.get_offset(vit2), t1.get_offset(v1)))
+      continue;
+    iv2 = static_cast<Vertex_handle2>(vit2);
+    break;
+  }
+  if (iv2 == Vertex_handle2())
+    return false;
+  Vmap.insert(std::make_pair(v1, iv2));
+
+  // We pick one cell of t1, and try to match it against the
+  // cells of t2.
+  Cell_handle1 c = v1->cell();
+  Vertex_handle1 v2 = c->vertex((c->index(v1)+1)%4);
+  Vertex_handle1 v3 = c->vertex((c->index(v1)+2)%4);
+  Vertex_handle1 v4 = c->vertex((c->index(v1)+3)%4);
+  Point p2 = v2->point();
+  Point p3 = v3->point();
+  Point p4 = v4->point();
+  Offset o2 = t1.get_offset(v2);
+  Offset o3 = t1.get_offset(v3);
+  Offset o4 = t1.get_offset(v4);
+
+  std::vector<Cell_handle2> ics;
+  t2.incident_cells(iv2, std::back_inserter(ics));
+  for (typename std::vector<Cell_handle2>::const_iterator cit = ics.begin();
+       cit != ics.end(); ++cit) {
+    int inf = (*cit)->index(iv2);
+
+    if (t1.equal(p2, (*cit)->vertex((inf+1)%4)->point(),
+	      o2, t2.get_offset((*cit)->vertex((inf+1)%4))))
+      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+1)%4)));
+    else if (t1.equal(p2, (*cit)->vertex((inf+2)%4)->point(),
+	      o2, t2.get_offset((*cit)->vertex((inf+2)%4))))
+      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+2)%4)));
+    else if (t1.equal(p2, (*cit)->vertex((inf+3)%4)->point(),
+	      o2, t2.get_offset((*cit)->vertex((inf+3)%4))))
+      Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+3)%4)));
+    else
+      continue; // None matched v2.
+
+    if (t1.equal(p3, (*cit)->vertex((inf+1)%4)->point(),
+	      o3, t2.get_offset((*cit)->vertex((inf+1)%4))))
+      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+1)%4)));
+    else if (t1.equal(p3, (*cit)->vertex((inf+2)%4)->point(),
+	      o3, t2.get_offset((*cit)->vertex((inf+2)%4))))
+      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+2)%4)));
+    else if (t1.equal(p3, (*cit)->vertex((inf+3)%4)->point(),
+	      o3, t2.get_offset((*cit)->vertex((inf+3)%4))))
+      Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+3)%4)));
+    else
+      continue; // None matched v3.
+
+    if (t1.equal(p4, (*cit)->vertex((inf+1)%4)->point(),
+	      o4, t2.get_offset((*cit)->vertex((inf+1)%4))))
+      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+1)%4)));
+    else if (t1.equal(p4, (*cit)->vertex((inf+2)%4)->point(),
+	      o4, t2.get_offset((*cit)->vertex((inf+2)%4))))
+      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+2)%4)));
+    else if (t1.equal(p4, (*cit)->vertex((inf+3)%4)->point(),
+	      o4, t2.get_offset((*cit)->vertex((inf+3)%4))))
+      Vmap.insert(std::make_pair(v4,(*cit)->vertex((inf+3)%4)));
+    else
+      continue; // None matched v4.
+
+    // Found it !
+    Cmap.insert(std::make_pair(c, *cit));
+    break;
+  }
+
+  if (Cmap.size() == 0)
+    return false;
+
+  // We now have one cell, we need to compare in a bfs graph traversal
+  return internal::test_next(t1, t2, Cmap.begin()->first, Cmap.begin()->second, Cmap, Vmap);
+}
+
+template < class GT, class TDS1, class TDS2 >
+inline
+bool
+operator!=(const Periodic_3_triangulation_3<GT,TDS1> &t1,
+    const Periodic_3_triangulation_3<GT,TDS2> &t2)
+{
+  return ! (t1 == t2);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_dummy_36.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_dummy_36.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_dummy_36.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_dummy_36.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h
new file mode 100644
index 0000000..a25d628
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_filtered_traits_3.h
@@ -0,0 +1,203 @@
+// Copyright (c) 2004,2006-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+
+
+#ifndef CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
+#define CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
+
+#include <string>
+#include <CGAL/basic.h>
+#include <CGAL/config.h>
+#include <CGAL/Interval_nt.h>
+#include <CGAL/Uncertain.h>
+#include <CGAL/Profile_counter.h>
+
+namespace CGAL {
+
+// This template class is a wrapper that implements the filtering for any
+// predicate (dynamic filters with IA).
+
+// TODO :
+// - each predicate in the default kernel should define a tag that says if it
+//   wants to be filtered or not (=> all homogeneous predicate define this
+//   tag).  We could even test-suite that automatically.  It makes a strong
+//   new requirement on the kernel though...
+//   Could be done with a traits mechanism ?
+//   A default template could use the current IA, but other tags or whatever
+//   could specify no filtering at all, or static filtering...
+// - same thing for constructions => virtual operator() ?
+// - similarly, constructions should have a tag saying if they can throw or
+//   not, or we let all this up to the compiler optimizer to figure out ?
+// - Some caching could be done at the Point_2 level.
+
+template <class EP, class AP, class C2E, class C2A, bool Protection = true>
+class Filtered_periodic_predicate
+  : public Filtered_predicate<EP, AP, C2E, C2A, Protection>
+{
+  typedef Filtered_predicate<EP, AP, C2E, C2A, Protection> Base;
+public:
+  Filtered_periodic_predicate() : Base() {}
+
+  // These constructors are used for constructive predicates.
+  // You should try to avoid constructive predicates, as they will construct
+  // the exact values systematically (in the ctor), rather than lazily.
+  template <class OE, class OA> 
+  Filtered_periodic_predicate(const OE * oe, const OA * oa) 
+    : Base( EP(oe), AP(oa) )
+  {}
+};
+}
+
+#include <CGAL/Periodic_3_triangulation_traits_3.h>
+
+namespace CGAL
+{
+// The Offset_converter is parametrized by a usual kernel converter,
+// and adds the conversions for Offsets.
+template < typename Converter >
+struct Offset_converter_3
+  : public Converter
+{
+  typedef typename Converter::Source_kernel Source_kernel;
+  typedef typename Converter::Target_kernel Target_kernel;
+
+  typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
+                   ::Offset  Source_off;
+  typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
+                   ::Point_3  Source_pt;
+
+  typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
+                   ::Offset  Target_off;
+  typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
+                   ::Point_3  Target_pt;
+
+
+  using Converter::operator();
+
+  Target_off
+  operator()(const Source_off &off) const
+  {
+    return off;
+  }
+};
+
+// The argument is supposed to be a Filtered_kernel like kernel.
+template < typename K, typename Off >
+class Periodic_3_triangulation_filtered_traits_base_3
+  : public Periodic_3_triangulation_traits_base_3<K, Off>
+{
+  typedef Periodic_3_triangulation_traits_base_3<K, Off> Base;
+
+  // Exact traits is based on the exact kernel.
+  typedef future_release::Periodic_3_triangulation_traits_3<typename K::Exact_kernel,
+                                            Off>
+                                                   Exact_traits;
+  // Filtering traits is based on the filtering kernel.
+  typedef future_release::Periodic_3_triangulation_traits_3<typename K::Approximate_kernel,
+                                            Off>
+                                                   Filtering_traits;
+private:
+  typedef typename K::C2E C2E;
+  typedef typename K::C2F C2F;
+
+  typedef typename C2E::Target_kernel::Iso_cuboid_3 Exact_iso_cuboid_3;
+  typedef typename C2F::Target_kernel::Iso_cuboid_3 Approximate_iso_cuboid_3;
+ 
+public:
+  typedef typename K::Iso_cuboid_3 Iso_cuboid_3;
+
+  void set_domain(const Iso_cuboid_3& domain) {
+    C2E c2e;
+    C2F c2f;
+    this->_domain = domain;
+    this->_domain_e = c2e(this->_domain);
+    this->_domain_f = c2f(this->_domain);
+  }
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Compare_xyz_3,
+            typename Filtering_traits::Compare_xyz_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Compare_xyz_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Coplanar_orientation_3,
+            typename Filtering_traits::Coplanar_orientation_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Coplanar_orientation_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Orientation_3,
+            typename Filtering_traits::Orientation_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Orientation_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Coplanar_side_of_bounded_circle_3,
+            typename Filtering_traits::Coplanar_side_of_bounded_circle_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Coplanar_side_of_bounded_circle_3;
+
+  typedef Filtered_periodic_predicate<
+            typename Exact_traits::Compare_distance_3,
+            typename Filtering_traits::Compare_distance_3,
+            Offset_converter_3<C2E>,
+            Offset_converter_3<C2F> >  Compare_distance_3;
+
+  Compare_xyz_3 compare_xyz_3_object() const
+  { return Compare_xyz_3(&_domain_e,&_domain_f);}
+
+  Coplanar_orientation_3 coplanar_orientation_3_object() const
+  { return Coplanar_orientation_3(&_domain_e,&_domain_f); }
+
+  Orientation_3 orientation_3_object() const
+  { return Orientation_3(&_domain_e,&_domain_f);}
+
+  Coplanar_side_of_bounded_circle_3
+  coplanar_side_of_bounded_circle_3_object() const 
+  { return Coplanar_side_of_bounded_circle_3(&_domain_e,&_domain_f); }
+
+  // The following are inherited since they are constructions :
+  // Construct_segment_3
+  // Construct_triangle_3
+  // Construct_tetrahedron_3
+
+ protected:
+  Exact_iso_cuboid_3 _domain_e;
+  Approximate_iso_cuboid_3 _domain_f;
+};
+
+} //namespace CGAL
+
+#include <CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h>
+
+namespace CGAL {
+
+template < typename K, typename Off = typename CGAL::Periodic_3_offset_3 >
+class Periodic_3_triangulation_filtered_traits_3
+  : public Periodic_3_triangulation_statically_filtered_traits_3<
+  Periodic_3_triangulation_filtered_traits_base_3<K, Off> > {
+};
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_TRIANGULATION_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_hierarchy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_hierarchy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_hierarchy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_hierarchy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_iterators_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_iterators_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_iterators_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_iterators_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_remove_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_remove_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Periodic_3_triangulation_remove_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_remove_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h
new file mode 100644
index 0000000..93c0ab6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_statically_filtered_traits_3.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2001,2004,2008-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+ 
+#ifndef CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
+#define CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
+
+// This class gathers optimized predicates written by hand, using
+// a few steps of filtering.  It should work if the initial traits has
+// cartesian coordinates which fit exactly in doubles.
+//
+// Purely static filters code has been removed, since it requires additional
+// logic and is not plug'n play (requires users providing bounds).
+// If it should be provided again, it should probably be separate.
+
+#include <CGAL/basic.h>
+
+#include <CGAL/Kernel/function_objects.h>
+#include <CGAL/Cartesian/function_objects.h>
+
+#include <CGAL/internal/Static_filters/tools.h>
+#include <CGAL/internal/Static_filters/Periodic_3_orientation_3.h>
+
+// TODO :
+// - add more predicates :
+
+namespace CGAL {
+
+// The K_base argument is supposed to provide exact primitives.
+template < typename Traits >
+class Periodic_3_triangulation_statically_filtered_traits_3 : public Traits
+{
+  typedef Periodic_3_triangulation_statically_filtered_traits_3<Traits> Self;
+
+public:
+
+  typedef internal::Static_filters_predicates::Periodic_3_orientation_3<Traits>
+    Orientation_3;
+
+  Orientation_3 orientation_3_object() const {
+    return Orientation_3(&this->_domain,&this->_domain_e,&this->_domain_f);
+  }
+};
+
+} //namespace CGAL
+
+#endif // CGAL_PERIODIC_3_TRIANGULATION_STATICALLY_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_traits_3.h
new file mode 100644
index 0000000..d4ce63b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Periodic_3_triangulation_traits_3.h
@@ -0,0 +1,173 @@
+// Copyright (c) 2006-2009   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+
+#ifndef CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
+#define CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Periodic_3_offset_3.h>
+#include <CGAL/Periodic_3_construct_point_3.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Traits_with_offsets_adaptor.h>
+
+
+namespace CGAL { 
+
+template < class Kernel, class Off = typename CGAL::Periodic_3_offset_3 >
+class Periodic_3_triangulation_traits_base_3
+  : public Kernel
+{
+public:
+  typedef Kernel                                                 K;
+  typedef Off                                                    Offset;
+  typedef Periodic_3_triangulation_traits_base_3< K, Offset >    Self;  
+
+  typedef typename K::RT                RT;
+  typedef typename K::FT                FT;
+  typedef typename K::Point_3           Point_3;
+  typedef typename K::Vector_3          Vector_3;
+  typedef Offset                        Periodic_3_offset_3;
+  typedef typename K::Iso_cuboid_3      Iso_cuboid_3;
+
+  // The next typedef is there for backward compatibility
+  // Some users take their point type from the traits class.
+  // Before this type was Point
+  typedef Point_3 Point;
+
+  typedef typename K::Segment_3         Segment_3;
+  typedef typename K::Triangle_3        Triangle_3;
+  typedef typename K::Tetrahedron_3     Tetrahedron_3;
+
+  // Triangulation predicates
+  typedef Traits_with_offsets_adaptor<Self, typename K::Compare_xyz_3>
+      Compare_xyz_3;
+  typedef Traits_with_offsets_adaptor<Self, typename K::Orientation_3>
+      Orientation_3;
+  
+  // Triangulation constructions
+  typedef Periodic_3_construct_point_3<Self, typename K::Construct_point_3>
+      Construct_point_3;
+  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_segment_3>
+      Construct_segment_3;
+  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_triangle_3>
+      Construct_triangle_3;
+  typedef Traits_with_offsets_adaptor<Self, typename K::Construct_tetrahedron_3>
+      Construct_tetrahedron_3;
+
+  // Access
+  void set_domain(const Iso_cuboid_3& domain) {
+    _domain = domain;
+  }
+  
+  Iso_cuboid_3 get_domain() const {
+    return _domain;
+  }
+
+  // Operations
+  Compare_xyz_3
+  compare_xyz_3_object() const {
+    return Compare_xyz_3(&_domain);
+  }
+  Orientation_3
+  orientation_3_object() const {
+    return Orientation_3(&_domain);
+  }
+  Construct_point_3
+  construct_point_3_object() const {
+    return Construct_point_3(_domain);
+  }
+  Construct_segment_3
+  construct_segment_3_object() const {
+    return Construct_segment_3(&_domain);
+  }
+  Construct_triangle_3
+  construct_triangle_3_object() const {
+    return Construct_triangle_3(&_domain);
+  }
+  Construct_tetrahedron_3
+  construct_tetrahedron_3_object() const {
+    return Construct_tetrahedron_3(&_domain);
+  }
+
+protected:
+  Iso_cuboid_3 _domain;
+};
+
+namespace future_release
+{
+template < typename K, typename Off = CGAL::Periodic_3_offset_3 >
+class Periodic_3_triangulation_traits_3;
+}
+
+} //namespace CGAL
+
+// Partial specialization for Filtered_kernel<CK>.
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Periodic_3_triangulation_filtered_traits_3.h>
+
+namespace CGAL {
+// This declaration is needed to break the cyclic dependency.
+template < typename K, typename Off >
+class Periodic_3_triangulation_filtered_traits_3;
+
+namespace future_release {
+template < class K, class Off>
+class Periodic_3_triangulation_traits_3
+  : public Periodic_3_triangulation_traits_base_3<K, Off>
+{
+};
+
+template < typename CK, typename Off >
+class Periodic_3_triangulation_traits_3 < Filtered_kernel<CK>, Off>
+  : public Periodic_3_triangulation_filtered_traits_3 <
+  Filtered_kernel<CK>, Off >
+{
+public:
+  typedef Filtered_kernel<CK>  Kernel;
+};
+
+template < class Off >
+class Periodic_3_triangulation_traits_3<CGAL::Epick, Off>
+  : public Periodic_3_triangulation_filtered_traits_3<CGAL::Epick, Off>
+{
+  typedef CGAL::Epick Kernel;
+};
+
+}
+} //namespace CGAL
+
+#include <CGAL/Periodic_3_Delaunay_triangulation_traits_3.h>
+
+
+namespace CGAL
+{
+template < typename K, typename Off >
+class Periodic_3_Delaunay_triangulation_traits_3;
+
+// Periodic_3_triangulation_traits_3 should not be used as traits for Periodic_3_Delaunay_triangulation_3 anymore.
+template < class Kernel, class Off = typename CGAL::Periodic_3_offset_3 >
+class CGAL_DEPRECATED Periodic_3_triangulation_traits_3 : public Periodic_3_Delaunay_triangulation_traits_3<Kernel, Off>
+{
+};
+}
+
+#endif // CGAL_PERIODIC_3_TRIANGULATION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Plane_3.h b/3rdparty/CGAL-4.8/include/CGAL/Plane_3.h
new file mode 100644
index 0000000..448474c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Plane_3.h
@@ -0,0 +1,281 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+ 
+#ifndef CGAL_PLANE_3_H
+#define CGAL_PLANE_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Plane_3 : public R_::Kernel_base::Plane_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Point_2               Point_2;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Direction_3           Direction_3;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Segment_3             Segment_3;
+  typedef typename R_::Line_3                Line_3;
+  typedef typename R_::Ray_3                 Ray_3;
+  typedef typename R_::Circle_3              Circle_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Plane_3                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Plane_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Plane_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Plane_3() {}
+
+  Plane_3(const Rep& p)
+    : Rep(p) {}
+
+  Plane_3(const Point_3& p, const Point_3& q, const Point_3& r)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {}
+
+  Plane_3(const Point_3& p, const Direction_3& d)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, d)) {}
+
+  Plane_3(const Point_3& p, const Vector_3& v)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, v)) {}
+
+  Plane_3(const RT& a, const RT& b, const RT& c, const RT& d)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), a, b, c, d)) {}
+
+  Plane_3(const Line_3& l, const Point_3& p)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), l, p)) {}
+
+  Plane_3(const Segment_3& s, const Point_3& p)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), s, p)) {}
+
+  Plane_3(const Ray_3& r, const Point_3& p)
+    : Rep(typename R::Construct_plane_3()(Return_base_tag(), r, p)) {}
+
+  explicit Plane_3(const Circle_3& c)
+    : Rep(typename R::Construct_plane_3()(c)) {}
+
+  Plane_3 transform(const Aff_transformation_3 &t) const
+  {
+    return t.transform(*this);
+  }
+
+  Plane_3 opposite() const
+  {
+    return R().construct_opposite_plane_3_object()(*this);
+  }
+
+  //Vector_3     orthogonal_vector() const;
+  Direction_3 orthogonal_direction() const
+  {
+    return Direction_3(a(), b(), c());
+  }
+
+  typename cpp11::result_of<typename R::Compute_a_3( Plane_3)>::type
+  a() const
+  {
+    return R().compute_a_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_b_3( Plane_3)>::type
+  b() const
+  {
+    return R().compute_b_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_c_3( Plane_3)>::type
+  c() const
+  {
+    return R().compute_c_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_d_3( Plane_3)>::type
+  d() const
+  {
+    return R().compute_d_3_object()(*this);
+  }
+
+  bool has_on(const Point_3 &p) const
+  {
+    return R().has_on_3_object()(*this, p);
+  }
+
+  bool has_on(const Circle_3 &c) const
+  {
+    return R().has_on_3_object()(*this, c);
+  }  
+  
+  bool has_on(const Line_3 &l) const
+  {
+    return R().has_on_3_object()(*this, l);
+  }
+
+  Line_3 perpendicular_line(const Point_3 &p) const
+  {
+    return R().construct_perpendicular_line_3_object()(*this, p);
+  }
+
+  Point_3 projection(const Point_3 &p) const
+  {
+    return R().construct_projected_point_3_object()(*this, p);
+  }
+
+  Point_3 point() const
+  {
+    return R().construct_point_on_3_object()(*this);
+  }
+
+  Vector_3 base1() const
+  {
+    return R().construct_base_vector_3_object()(*this, 1);
+  }
+
+  Vector_3 base2() const
+  {
+    return R().construct_base_vector_3_object()(*this, 2);
+  }
+
+  Vector_3 orthogonal_vector() const
+  {
+    return R().construct_orthogonal_vector_3_object()(*this);
+  }
+
+  Point_2 to_2d(const Point_3 &p) const
+  {
+    return R().construct_projected_xy_point_2_object()(*this, p);
+  }
+
+  Point_3 to_3d(const Point_2 &p) const
+  {
+    return R().construct_lifted_point_3_object()(*this, p);
+  }
+
+
+  //Point_3      projection(const Point_3 &p) const;
+  //Direction_3  orthogonal_direction() const;
+
+  Oriented_side oriented_side(const Point_3 &p) const
+  {
+    return R().oriented_side_3_object()(*this, p);
+  }
+
+  bool has_on_positive_side(const Point_3 &p) const
+  {
+    return R().has_on_positive_side_3_object()(*this, p);
+  }
+
+  bool has_on_negative_side(const Point_3 &p) const
+  {
+    return R().has_on_negative_side_3_object()(*this, p);
+  }
+
+/*
+  bool         has_on(const Point_3 &p) const
+  {
+    return oriented_side(p) == ON_ORIENTED_BOUNDARY;
+  }
+  bool         has_on(const Line_3 &l) const
+  {
+    return has_on(l.point())
+       &&  has_on(l.point() + l.direction().to_vector());
+  }
+*/
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Plane_3<R> &p)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << p.a() << ' ' << p.b() <<  ' ' << p.c() << ' ' << p.d();
+    case IO::BINARY :
+        write(os, p.a());
+        write(os, p.b());
+        write(os, p.c());
+        write(os, p.d());
+        return os;
+        default:
+            os << "Plane_3(" << p.a() <<  ", " << p.b() <<   ", ";
+            os << p.c() << ", " << p.d() <<")";
+            return os;
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Plane_3<R> &p)
+{
+    typename R::RT a, b, c, d;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(a) >> iformat(b) >> iformat(c) >> iformat(d);
+        break;
+    case IO::BINARY :
+        read(is, a);
+        read(is, b);
+        read(is, c);
+        read(is, d);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+        p = Plane_3<R>(a, b, c, d);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_PLANE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Plane_separator.h b/3rdparty/CGAL-4.8/include/CGAL/Plane_separator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Plane_separator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Plane_separator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Point_2.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2.h
new file mode 100644
index 0000000..6c1ac87
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Point_2.h
@@ -0,0 +1,270 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_POINT_2_H
+#define CGAL_POINT_2_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Point_2 : public R_::Kernel_base::Point_2
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+  typedef typename R_::Kernel_base::Point_2  RPoint_2;
+
+  typedef Point_2                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Point_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef RPoint_2 Rep;
+  typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Point_2() {}
+
+  Point_2(const Origin& o)
+    : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), o))
+  {}
+
+  Point_2(const RPoint_2& p)
+    : RPoint_2(p)
+  {}
+
+  template < typename T1, typename T2 >
+  Point_2(const T1 &x, const T2 &y)
+    : Rep(typename R::Construct_point_2()(Return_base_tag(), x, y))
+  {}
+
+  Point_2(const RT& hx, const RT& hy, const RT& hw)
+    : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), hx, hy, hw))
+  {}
+
+  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
+  x() const
+  {
+    return typename R::Compute_x_2()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_y_2(Point_2)>::type
+  y() const
+  {
+    return typename R::Compute_y_2()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) );
+    return (i==0) ?  x() : y();
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_2(Point_2)>::type
+  operator[](int i) const
+  {
+      return cartesian(i);
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return typename R::Construct_cartesian_const_iterator_2()(*this);
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return typename R::Construct_cartesian_const_iterator_2()(*this,2);
+  }
+
+
+
+  typename cpp11::result_of<typename R::Compute_hx_2(Point_2)>::type
+  hx() const
+  {
+    return typename R::Compute_hx_2()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hy_2(Point_2)>::type
+  hy() const
+  {
+    return typename R::Compute_hy_2()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hw_2(Point_2)>::type
+  hw() const
+  {
+    return typename R::Compute_hw_2()(*this);
+  }
+
+  int dimension() const
+  {
+      return 2;
+  }
+
+  typename cpp11::result_of<typename R::Compute_hx_2(Point_2)>::type
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
+    return (i==0) ?  hx() : (i==1)? hy() : hw();
+  }
+
+  Bbox_2 bbox() const
+  {
+    return R().construct_bbox_2_object()(*this);
+  }
+
+  Point_2 transform(const Aff_transformation_2 &t) const
+  {
+    return t.transform(*this);
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Point_2<R>& p,const Cartesian_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << p.x() << ' ' << p.y();
+    case IO::BINARY :
+        write(os, p.x());
+        write(os, p.y());
+        return os;
+    default:
+        return os << "PointC2(" << p.x() << ", " << p.y() << ')';
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Point_2<R>& p,const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << p.hx() << ' ' << p.hy() << ' ' << p.hw();
+    case IO::BINARY :
+        write(os, p.hx());
+        write(os, p.hy());
+        write(os, p.hw());
+        return os;
+    default:
+        return os << "PointH2(" << p.hx() << ", "
+                                << p.hy() << ", "
+                                << p.hw() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Point_2<R>& p)
+{
+  return insert(os, p, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Point_2<R>& p, const Cartesian_tag&)
+{
+    typename R::FT x, y;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+	p = Point_2<R>(x, y);
+    return is;
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Point_2<R>& p, const Homogeneous_tag&)
+{
+  typename R::RT hx, hy, hw;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> hx >> hy >> hw;
+        break;
+    case IO::BINARY :
+        read(is, hx);
+        read(is, hy);
+        read(is, hw);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  if (is)
+    p = Point_2<R>(hx, hy, hw);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Point_2<R>& p)
+{
+  return extract(is, p, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_POINT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Iso_rectangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Iso_rectangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Iso_rectangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_2_Triangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Point_2_Triangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_2_Triangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_2_Triangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Point_3.h b/3rdparty/CGAL-4.8/include/CGAL/Point_3.h
new file mode 100644
index 0000000..7c7e88d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Point_3.h
@@ -0,0 +1,301 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_POINT_3_H
+#define CGAL_POINT_3_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Point_3 : public R_::Kernel_base::Point_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Point_3                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Point_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Point_3  Rep;
+  typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Point_3() {}
+
+  Point_3(const Origin& o)
+    : Rep(typename R::Construct_point_3()(Return_base_tag(), o))
+  {}
+
+  Point_3(const Rep& p)
+      : Rep(p) {}
+
+  template < typename T1, typename T2, typename T3 >
+  Point_3(const T1& x, const T2& y, const T3& z)
+    : Rep(typename R::Construct_point_3()(Return_base_tag(), x, y, z))
+  {}
+
+  Point_3(const RT& hx, const RT& hy, const RT& hz, const RT& hw)
+    : Rep(typename R::Construct_point_3()(Return_base_tag(), hx, hy, hz, hw))
+  {}
+
+  typename cpp11::result_of<typename R::Compute_x_3( Point_3)>::type
+  x() const
+  {
+    return typename R::Compute_x_3()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_y_3( Point_3)>::type
+  y() const
+  {
+    return typename R::Compute_y_3()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_z_3( Point_3)>::type
+  z() const
+  {
+    return typename R::Compute_z_3()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hx_3( Point_3)>::type
+  hx() const
+  {
+    return R().compute_hx_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hy_3( Point_3)>::type
+  hy() const
+  {
+    return R().compute_hy_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hz_3( Point_3)>::type
+  hz() const
+  {
+    return R().compute_hz_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hw_3( Point_3)>::type
+  hw() const
+  {
+    return R().compute_hw_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_3( Point_3)>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
+    if (i==0) return x();
+    if (i==1) return y();
+    return z();
+  }
+
+  RT
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
+    if (i==0) return hx();
+    if (i==1) return hy();
+    if (i==2) return hz();
+    return hw();
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_3(Point_3)>::type
+  operator[](int i) const
+  {
+      return cartesian(i);
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return typename R::Construct_cartesian_const_iterator_3()(*this);
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return typename R::Construct_cartesian_const_iterator_3()(*this,3);
+  }
+
+  int dimension() const
+  {
+      return 3;
+  }
+
+  Bbox_3 bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+  Point_3 transform(const Aff_transformation_3 &t) const
+  {
+    return t.transform(*this);
+  }
+
+};
+
+template <class R>
+inline
+bool
+operator==(const Origin& o, const Point_3<R>& p)
+{ return p == o; }
+
+template <class R>
+inline
+bool
+operator!=(const Origin& o, const Point_3<R>& p)
+{ return p != o; }
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Point_3<R>& p,const Cartesian_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << p.x() << ' ' << p.y() << ' ' << p.z();
+    case IO::BINARY :
+        write(os, p.x());
+        write(os, p.y());
+        write(os, p.z());
+        return os;
+    default:
+        return os << "PointC3(" << p.x() << ", " << p.y()
+                                         << ", " << p.z() << ')';
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Point_3<R>& p,const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << p.hx() << ' ' << p.hy() << ' ' << p.hz() << ' ' << p.hw();
+    case IO::BINARY :
+        write(os, p.hx());
+        write(os, p.hy());
+        write(os, p.hz());
+        write(os, p.hw());
+        return os;
+    default:
+        return os << "PointH3(" << p.hx() << ", "
+                                << p.hy() << ", "
+                                << p.hz() << ", "
+                                << p.hw() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Point_3<R>& p)
+{
+  return insert(os, p, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Point_3<R>& p, const Cartesian_tag&)
+{
+    typename R::FT x, y, z;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y) >> iformat(z);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        read(is, z);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+	p = Point_3<R>(x, y, z);
+    return is;
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Point_3<R>& p, const Homogeneous_tag&)
+{
+  typename R::RT hx, hy, hz, hw;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> hx >> hy >> hz >> hw;
+        break;
+    case IO::BINARY :
+        read(is, hx);
+        read(is, hy);
+        read(is, hz);
+        read(is, hw);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  if (is)
+    p = Point_3<R>(hx, hy, hz, hw);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Point_3<R>& p)
+{
+  return extract(is, p, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_POINT_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_container.h b/3rdparty/CGAL-4.8/include/CGAL/Point_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_set_2.h b/3rdparty/CGAL-4.8/include/CGAL/Point_set_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_set_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_set_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Point_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_with_normal_3.h b/3rdparty/CGAL-4.8/include/CGAL/Point_with_normal_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_with_normal_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_with_normal_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_with_psc_localisation.h b/3rdparty/CGAL-4.8/include/CGAL/Point_with_psc_localisation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_with_psc_localisation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_with_psc_localisation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_with_surface_index.h b/3rdparty/CGAL-4.8/include/CGAL/Point_with_surface_index.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_with_surface_index.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_with_surface_index.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Point_with_surface_index_geom_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Point_with_surface_index_geom_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Point_with_surface_index_geom_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Point_with_surface_index_geom_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Poisson_implicit_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Poisson_implicit_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Poisson_implicit_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Poisson_implicit_surface_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Poisson_mesh_cell_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Poisson_mesh_cell_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Poisson_mesh_cell_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Poisson_mesh_cell_criteria_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Poisson_reconstruction_function.h b/3rdparty/CGAL-4.8/include/CGAL/Poisson_reconstruction_function.h
new file mode 100644
index 0000000..82b62a8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Poisson_reconstruction_function.h
@@ -0,0 +1,1212 @@
+// Copyright (c) 2007-09  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Saboret, Pierre Alliez
+
+#ifndef CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
+#define CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
+
+#ifndef CGAL_DIV_NORMALIZED
+#  ifndef CGAL_DIV_NON_NORMALIZED
+#    define CGAL_DIV_NON_NORMALIZED 1
+#  endif
+#endif
+
+#include <vector>
+#include <deque>
+#include <algorithm>
+#include <cmath>
+#include <iterator>
+
+#include <CGAL/trace.h>
+#include <CGAL/Reconstruction_triangulation_3.h>
+#include <CGAL/spatial_sort.h>
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_solver_traits.h>
+#else
+#endif
+#include <CGAL/centroid.h>
+#include <CGAL/property_map.h>
+#include <CGAL/surface_reconstruction_points_assertions.h>
+#include <CGAL/poisson_refine_triangulation.h>
+#include <CGAL/Robust_circumcenter_filtered_traits_3.h>
+#include <CGAL/compute_average_spacing.h>
+#include <CGAL/Timer.h>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/array.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+/*! 
+  \file Poisson_reconstruction_function.h
+*/
+
+namespace CGAL {
+
+  namespace internal {
+template <class RT>
+bool
+invert(
+       const RT& a0,  const RT& a1,  const RT& a2,
+       const RT& a3,  const RT& a4,  const RT& a5,
+       const RT& a6,  const RT& a7,  const RT& a8,
+       RT& i0,   RT& i1,   RT& i2,
+       RT& i3,   RT& i4,   RT& i5,
+       RT& i6,   RT& i7,   RT& i8)
+{
+    // Compute the adjoint.
+    i0 = a4*a8 - a5*a7;
+    i1 = a2*a7 - a1*a8;
+    i2 = a1*a5 - a2*a4;
+    i3 = a5*a6 - a3*a8;
+    i4 = a0*a8 - a2*a6;
+    i5 = a2*a3 - a0*a5;
+    i6 = a3*a7 - a4*a6;
+    i7 = a1*a6 - a0*a7;
+    i8 = a0*a4 - a1*a3;
+
+    RT det = a0*i0 + a1*i3 + a2*i6;
+
+    if(det != 0) {
+      RT idet = (RT(1.0))/det;
+      i0 *= idet;
+      i1 *= idet;
+      i2 *= idet;
+      i3 *= idet;
+      i4 *= idet;
+      i5 *= idet;
+      i6 *= idet;
+      i7 *= idet;
+      i8 *= idet;
+      return true;
+    }
+
+    return false;
+}
+
+  }
+
+
+/// \cond SKIP_IN_MANUAL
+struct Poisson_visitor {
+  void before_insertion() const
+  {}
+};
+
+struct Poisson_skip_vertices { 
+  double ratio;
+  Random& m_random;
+  Poisson_skip_vertices(const double ratio, Random& random)
+    : ratio(ratio), m_random(random) {}
+
+  template <typename Iterator>
+  bool operator()(Iterator) const {
+    return m_random.get_double() < ratio;
+  }
+};
+
+// Given f1 and f2, two sizing fields, that functor wrapper returns
+//   max(f1, f2*f2)
+// The wrapper stores only pointers to the two functors.
+template <typename F1, typename F2>
+struct Special_wrapper_of_two_functions_keep_pointers {
+  F1 *f1;
+  F2 *f2;
+  Special_wrapper_of_two_functions_keep_pointers(F1* f1, F2* f2) 
+    : f1(f1), f2(f2) {}
+
+  template <typename X>
+  double operator()(const X& x) const {
+    return (std::max)((*f1)(x), CGAL::square((*f2)(x)));
+  }
+
+  template <typename X>
+  double operator()(const X& x) {
+    return (std::max)((*f1)(x), CGAL::square((*f2)(x)));
+  }
+}; // end struct Special_wrapper_of_two_functions_keep_pointers<F1, F2>
+/// \endcond 
+
+
+/*!
+\ingroup PkgPoissonSurfaceReconstruction
+
+\brief Implementation of the Poisson Surface Reconstruction method.
+  
+Given a set of 3D points with oriented normals sampled on the boundary
+of a 3D solid, the Poisson Surface Reconstruction method \cgalCite{Kazhdan06} 
+solves for an approximate indicator function of the inferred
+solid, whose gradient best matches the input normals. The output
+scalar function, represented in an adaptive octree, is then
+iso-contoured using an adaptive marching cubes.
+
+`Poisson_reconstruction_function` implements a variant of this
+algorithm which solves for a piecewise linear function on a 3D
+Delaunay triangulation instead of an adaptive octree.
+
+\tparam Gt Geometric traits class. 
+
+\cgalModels `ImplicitFunction`
+
+*/
+template <class Gt>
+class Poisson_reconstruction_function
+{
+// Public types
+public:
+
+  /// \name Types 
+  /// @{
+
+  typedef Gt Geom_traits; ///< Geometric traits class
+  /// \cond SKIP_IN_MANUAL
+  typedef Reconstruction_triangulation_3<Robust_circumcenter_filtered_traits_3<Gt> >
+                                                   Triangulation;
+  /// \endcond
+  typedef typename Triangulation::Cell_handle   Cell_handle;
+
+  // Geometric types
+  typedef typename Geom_traits::FT FT; ///< number type.
+  typedef typename Geom_traits::Point_3 Point; ///< point type.
+  typedef typename Geom_traits::Vector_3 Vector; ///< vector type.
+  typedef typename Geom_traits::Sphere_3 Sphere; 
+
+  /// @}
+
+// Private types
+private:
+
+  // Internal 3D triangulation, of type Reconstruction_triangulation_3.
+  // Note: poisson_refine_triangulation() requires a robust circumcenter computation.
+
+  // Repeat Triangulation types
+  typedef typename Triangulation::Triangulation_data_structure Triangulation_data_structure;
+  typedef typename Geom_traits::Ray_3 Ray;
+  typedef typename Geom_traits::Plane_3 Plane;
+  typedef typename Geom_traits::Segment_3 Segment;
+  typedef typename Geom_traits::Triangle_3 Triangle;
+  typedef typename Geom_traits::Tetrahedron_3 Tetrahedron;
+  typedef typename Triangulation::Vertex_handle Vertex_handle;
+  typedef typename Triangulation::Cell   Cell;
+  typedef typename Triangulation::Vertex Vertex;
+  typedef typename Triangulation::Facet  Facet;
+  typedef typename Triangulation::Edge   Edge;
+  typedef typename Triangulation::Cell_circulator  Cell_circulator;
+  typedef typename Triangulation::Facet_circulator Facet_circulator;
+  typedef typename Triangulation::Cell_iterator    Cell_iterator;
+  typedef typename Triangulation::Facet_iterator   Facet_iterator;
+  typedef typename Triangulation::Edge_iterator    Edge_iterator;
+  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
+  typedef typename Triangulation::Point_iterator   Point_iterator;
+  typedef typename Triangulation::Finite_vertices_iterator Finite_vertices_iterator;
+  typedef typename Triangulation::Finite_cells_iterator    Finite_cells_iterator;
+  typedef typename Triangulation::Finite_facets_iterator   Finite_facets_iterator;
+  typedef typename Triangulation::Finite_edges_iterator    Finite_edges_iterator;
+  typedef typename Triangulation::All_cells_iterator       All_cells_iterator;
+  typedef typename Triangulation::Locate_type Locate_type;
+
+// Data members.
+// Warning: the Surface Mesh Generation package makes copies of implicit functions,
+// thus this class must be lightweight and stateless.
+private:
+
+  // operator() is pre-computed on vertices of *m_tr by solving
+  // the Poisson equation Laplacian(f) = divergent(normals field).
+  boost::shared_ptr<Triangulation> m_tr;
+
+  mutable boost::shared_ptr<std::vector<boost::array<double,9> > > m_Bary;
+  mutable std::vector<Point> Dual;
+  mutable std::vector<Vector> Normal;
+
+  // contouring and meshing
+  Point m_sink; // Point with the minimum value of operator()
+  mutable Cell_handle m_hint; // last cell found = hint for next search
+
+  FT average_spacing;
+
+
+  /// function to be used for the different constructors available that are
+  /// doing the same thing but with default template parameters
+  template <typename InputIterator,
+            typename PointPMap,
+            typename NormalPMap,
+            typename Visitor
+  >
+  void forward_constructor(
+    InputIterator first,
+    InputIterator beyond,
+    PointPMap point_pmap,
+    NormalPMap normal_pmap,
+    Visitor visitor)
+  {
+    CGAL::Timer task_timer; task_timer.start();
+    CGAL_TRACE_STREAM << "Creates Poisson triangulation...\n";
+
+    // Inserts points in triangulation
+    m_tr->insert(
+      first,beyond,
+      point_pmap,
+      normal_pmap,
+      visitor);
+
+    // Prints status
+    CGAL_TRACE_STREAM << "Creates Poisson triangulation: " << task_timer.time() << " seconds, "
+                                                           << std::endl;
+  }
+
+
+// Public methods
+public:
+
+  /// \name Creation 
+  /// @{
+
+
+  /*! 
+    Creates a Poisson implicit function from the  range of points `[first, beyond)`. 
+
+    \tparam InputIterator iterator over input points. 
+
+    \tparam PointPMap is a model of `ReadablePropertyMap` with
+      a `value_type = Point`.  It can be omitted if `InputIterator`
+      `value_type` is convertible to `Point`. 
+    
+    \tparam NormalPMap is a model of `ReadablePropertyMap`
+      with a `value_type = Vector`.
+  */ 
+  template <typename InputIterator,
+            typename PointPMap,
+            typename NormalPMap
+  >
+  Poisson_reconstruction_function(
+    InputIterator first,  ///< iterator over the first input point.
+    InputIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: `value_type of InputIterator` -> `Point` (the position of an input point).
+    NormalPMap normal_pmap ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
+  )
+    : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
+    , average_spacing(CGAL::compute_average_spacing<CGAL::Sequential_tag>(first, beyond, point_pmap, 6))
+  {
+    forward_constructor(first, beyond, point_pmap, normal_pmap, Poisson_visitor());
+  }
+
+  /// \cond SKIP_IN_MANUAL
+  template <typename InputIterator,
+            typename PointPMap,
+            typename NormalPMap,
+            typename Visitor
+  >
+  Poisson_reconstruction_function(
+    InputIterator first,  ///< iterator over the first input point.
+    InputIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: `value_type of InputIterator` -> `Point` (the position of an input point).
+    NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
+    Visitor visitor)
+    : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
+    , average_spacing(CGAL::compute_average_spacing<CGAL::Sequential_tag>(first, beyond, point_pmap, 6))
+  {
+    forward_constructor(first, beyond, point_pmap, normal_pmap, visitor);
+  }
+
+  // This variant creates a default point property map = Identity_property_map and Visitor=Poisson_visitor
+  template <typename InputIterator,
+            typename NormalPMap
+  >
+  Poisson_reconstruction_function(
+    InputIterator first,  ///< iterator over the first input point.
+    InputIterator beyond, ///< past-the-end iterator over the input points.
+    NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point).
+    typename boost::enable_if<
+      boost::is_convertible<typename std::iterator_traits<InputIterator>::value_type, Point>
+    >::type* = 0
+  )
+  : m_tr(new Triangulation), m_Bary(new std::vector<boost::array<double,9> > )
+  , average_spacing(CGAL::compute_average_spacing<CGAL::Sequential_tag>(first, beyond, 6))
+  {
+    forward_constructor(first, beyond, 
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      make_dereference_property_map(first),
+#else
+      make_identity_property_map(
+      typename std::iterator_traits<InputIterator>::value_type()),
+#endif
+      normal_pmap, Poisson_visitor());
+    CGAL::Timer task_timer; task_timer.start();
+  }
+  /// \endcond
+
+  /// @}
+
+  /// \name Operations
+  /// @{
+
+  /// Returns a sphere bounding the inferred surface.
+  Sphere bounding_sphere() const
+  {
+    return m_tr->bounding_sphere();
+  }
+  
+  /// \cond SKIP_IN_MANUAL
+  const Triangulation& tr() const {
+    return *m_tr;
+  }
+  
+  // This variant requires all parameters.
+  template <class SparseLinearAlgebraTraits_d,
+            class Visitor>
+  bool compute_implicit_function(
+                                 SparseLinearAlgebraTraits_d solver,// = SparseLinearAlgebraTraits_d(),
+                                 Visitor visitor,
+                                 double approximation_ratio = 0,
+                                 double average_spacing_ratio = 5) 
+  {
+    CGAL::Timer task_timer; task_timer.start();
+    CGAL_TRACE_STREAM << "Delaunay refinement...\n";
+
+    // Delaunay refinement
+    const FT radius_edge_ratio_bound = 2.5;
+    const unsigned int max_vertices = (unsigned int)1e7; // max 10M vertices
+    const FT enlarge_ratio = 1.5;
+    const FT radius = sqrt(bounding_sphere().squared_radius()); // get triangulation's radius
+    const FT cell_radius_bound = radius/5.; // large
+
+    internal::Poisson::Constant_sizing_field<Triangulation> sizing_field(CGAL::square(cell_radius_bound));
+
+    std::vector<int> NB; 
+
+    NB.push_back( delaunay_refinement(radius_edge_ratio_bound,sizing_field,max_vertices,enlarge_ratio));
+
+    while(m_tr->insert_fraction(visitor)){
+
+      NB.push_back( delaunay_refinement(radius_edge_ratio_bound,sizing_field,max_vertices,enlarge_ratio));
+    }
+
+    if(approximation_ratio > 0. && 
+       approximation_ratio * std::distance(m_tr->input_points_begin(),
+                                           m_tr->input_points_end()) > 20) {
+
+      // Add a pass of Delaunay refinement.
+      //
+      // In that pass, the sizing field, of the refinement process of the
+      // triangulation, is based on the result of a poisson function with a
+      // sample of the input points. The ratio is 'approximation_ratio'.
+      //
+      // For optimization reasons, the cell criteria of the refinement
+      // process uses two sizing fields:
+      //
+      //   - the minimum of the square of 'coarse_poisson_function' and the
+      // square of the constant field equal to 'average_spacing',
+      //
+      //   - a second sizing field that is constant, and equal to:
+      //
+      //         average_spacing*average_spacing_ratio
+      //
+      // If a given cell is smaller than the constant second sizing field,
+      // then the cell is considered as small enough, and the first sizing
+      // field, more costly, is not evaluated.
+
+      typedef Filter_iterator<typename Triangulation::Input_point_iterator,
+                              Poisson_skip_vertices> Some_points_iterator;
+      //make it deterministic
+      Random random(0);
+      Poisson_skip_vertices skip(1.-approximation_ratio,random);
+      
+      CGAL_TRACE_STREAM << "SPECIAL PASS that uses an approximation of the result (approximation ratio: "
+                << approximation_ratio << ")" << std::endl;
+      CGAL::Timer approximation_timer; approximation_timer.start();
+
+      CGAL::Timer sizing_field_timer; sizing_field_timer.start();
+      Poisson_reconstruction_function<Geom_traits> 
+        coarse_poisson_function(Some_points_iterator(m_tr->input_points_end(),
+                                                     skip,
+                                                     m_tr->input_points_begin()),
+                                Some_points_iterator(m_tr->input_points_end(),
+                                                     skip),
+                                Normal_of_point_with_normal_pmap<Geom_traits>() );
+      coarse_poisson_function.compute_implicit_function(solver, Poisson_visitor(),
+                                                        0.);
+      internal::Poisson::Constant_sizing_field<Triangulation> 
+        min_sizing_field(CGAL::square(average_spacing));
+      internal::Poisson::Constant_sizing_field<Triangulation> 
+        sizing_field_ok(CGAL::square(average_spacing*average_spacing_ratio));
+
+      Special_wrapper_of_two_functions_keep_pointers<
+        internal::Poisson::Constant_sizing_field<Triangulation>,
+        Poisson_reconstruction_function<Geom_traits> > sizing_field2(&min_sizing_field,
+                                                                     &coarse_poisson_function);
+        
+      sizing_field_timer.stop();
+      std::cerr << "Construction time of the sizing field: " << sizing_field_timer.time() 
+                << " seconds" << std::endl;
+
+      NB.push_back( delaunay_refinement(radius_edge_ratio_bound,
+                                        sizing_field2,
+                                        max_vertices,
+                                        enlarge_ratio,
+                                        sizing_field_ok) );
+      approximation_timer.stop();
+      CGAL_TRACE_STREAM << "SPECIAL PASS END (" << approximation_timer.time() <<  " seconds)" << std::endl;
+    }
+
+    
+    // Prints status
+    CGAL_TRACE_STREAM << "Delaunay refinement: " << "added ";
+    for(std::size_t i = 0; i < NB.size()-1; i++){
+      CGAL_TRACE_STREAM << NB[i] << " + "; 
+    } 
+    CGAL_TRACE_STREAM << NB.back() << " Steiner points, "
+                      << task_timer.time() << " seconds, "
+                      << std::endl;
+    task_timer.reset();
+
+#ifdef CGAL_DIV_NON_NORMALIZED
+    CGAL_TRACE_STREAM << "Solve Poisson equation with non-normalized divergence...\n";
+#else
+    CGAL_TRACE_STREAM << "Solve Poisson equation with normalized divergence...\n";
+#endif
+
+    // Computes the Poisson indicator function operator()
+    // at each vertex of the triangulation.
+    double lambda = 0.1;
+    if ( ! solve_poisson(solver, lambda) )
+    {
+      std::cerr << "Error: cannot solve Poisson equation" << std::endl;
+      return false;
+    }
+
+    // Shift and orient operator() such that:
+    // - operator() = 0 on the input points,
+    // - operator() < 0 inside the surface.
+    set_contouring_value(median_value_at_input_vertices());
+
+    // Prints status
+    CGAL_TRACE_STREAM << "Solve Poisson equation: " << task_timer.time() << " seconds, "
+                                                    << std::endl;
+    task_timer.reset();
+
+    return true;
+  }
+  /// \endcond
+
+  /*!
+    This function must be called after the
+    insertion of oriented points. It computes the piecewise linear scalar
+    function operator() by: applying Delaunay refinement, solving for
+    operator() at each vertex of the triangulation with a sparse linear
+    solver, and shifting and orienting operator() such that it is 0 at all
+    input points and negative inside the inferred surface.
+
+    \tparam SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
+    If \ref thirdpartyEigen "Eigen" 3.1 (or greater) is available and `CGAL_EIGEN3_ENABLED`
+    is defined, an overload with \link Eigen_solver_traits <tt>Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> ></tt> \endlink
+    as default solver is provided.
+  
+    \param solver sparse linear solver.
+    \param smoother_hole_filling controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.
+
+    \return `false` if the linear solver fails. 
+  */ 
+  template <class SparseLinearAlgebraTraits_d>
+  bool compute_implicit_function(SparseLinearAlgebraTraits_d solver, bool smoother_hole_filling = false)
+  {
+    if (smoother_hole_filling)
+      return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor(),0.02,5);
+    else
+      return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor());
+  }
+
+  /// \cond SKIP_IN_MANUAL
+#ifdef CGAL_EIGEN3_ENABLED
+  // This variant provides the default sparse linear traits class = Eigen_solver_traits.
+  bool compute_implicit_function(bool smoother_hole_filling = false)
+  {
+    typedef Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
+    return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
+  }
+#endif
+
+  boost::tuple<FT, Cell_handle, bool> special_func(const Point& p) const
+  {
+    m_hint = m_tr->locate(p  ,m_hint  ); // no hint when we use hierarchy
+
+    if(m_tr->is_infinite(m_hint)) {
+      int i = m_hint->index(m_tr->infinite_vertex());
+      return boost::make_tuple(m_hint->vertex((i+1)&3)->f(),
+                               m_hint, true);
+    }
+
+    FT a,b,c,d;
+    barycentric_coordinates(p,m_hint,a,b,c,d);
+    return boost::make_tuple(a * m_hint->vertex(0)->f() +
+                             b * m_hint->vertex(1)->f() +
+                             c * m_hint->vertex(2)->f() +
+                             d * m_hint->vertex(3)->f(),
+                             m_hint, false);
+  }
+  /// \endcond
+
+  /*! 
+    `ImplicitFunction` interface: evaluates the implicit function at a 
+    given 3D query point. The function `compute_implicit_function()` must be 
+    called before the first call to `operator()`. 
+  */ 
+  FT operator()(const Point& p) const
+  {
+    m_hint = m_tr->locate(p ,m_hint); 
+
+    if(m_tr->is_infinite(m_hint)) {
+      int i = m_hint->index(m_tr->infinite_vertex());
+      return m_hint->vertex((i+1)&3)->f();
+    }
+
+    FT a,b,c,d;
+    barycentric_coordinates(p,m_hint,a,b,c,d);
+    return a * m_hint->vertex(0)->f() +
+           b * m_hint->vertex(1)->f() +
+           c * m_hint->vertex(2)->f() +
+           d * m_hint->vertex(3)->f();
+  }
+  
+  /// \cond SKIP_IN_MANUAL
+  void initialize_cell_indices()
+  {
+    int i=0;
+    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
+        fcit != m_tr->finite_cells_end();
+        ++fcit){
+      fcit->info()= i++;
+    }
+  }
+
+  void initialize_barycenters() const
+  {
+    m_Bary->resize(m_tr->number_of_cells());
+
+    for(std::size_t i=0; i< m_Bary->size();i++){
+      (*m_Bary)[i][0]=-1;
+    }
+  }
+
+  void initialize_cell_normals() const
+  {
+    Normal.resize(m_tr->number_of_cells());
+    int i = 0;
+    int N = 0;
+    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
+        fcit != m_tr->finite_cells_end();
+        ++fcit){
+      Normal[i] = cell_normal(fcit);
+      if(Normal[i] == NULL_VECTOR){
+        N++;
+      }
+      ++i;
+    }
+    std::cerr << N << " out of " << i << " cells have NULL_VECTOR as normal" << std::endl;
+  }
+
+  void initialize_duals() const
+  {
+    Dual.resize(m_tr->number_of_cells());    
+    int i = 0;
+    for(Finite_cells_iterator fcit = m_tr->finite_cells_begin();
+        fcit != m_tr->finite_cells_end();
+        ++fcit){
+      Dual[i++] = m_tr->dual(fcit);
+    }
+  }
+
+  void clear_duals() const
+  {
+    Dual.clear();
+  }
+
+  void clear_normals() const
+  {
+    Normal.clear();
+  }
+
+  void initialize_matrix_entry(Cell_handle ch) const
+  {
+    boost::array<double,9> & entry = (*m_Bary)[ch->info()];
+    const Point& pa = ch->vertex(0)->point();
+    const Point& pb = ch->vertex(1)->point();
+    const Point& pc = ch->vertex(2)->point();
+    const Point& pd = ch->vertex(3)->point();
+    
+    Vector va = pa - pd;
+    Vector vb = pb - pd;
+    Vector vc = pc - pd;
+    
+    internal::invert(va.x(), va.y(), va.z(),
+           vb.x(), vb.y(), vb.z(),
+           vc.x(), vc.y(), vc.z(),
+           entry[0],entry[1],entry[2],entry[3],entry[4],entry[5],entry[6],entry[7],entry[8]);
+  }
+  /// \endcond
+  
+  /// Returns a point located inside the inferred surface.
+  Point get_inner_point() const
+  {
+    // Gets point / the implicit function is minimum
+    return m_sink;
+  }
+
+  /// @}
+
+// Private methods:
+private:
+
+  /// Delaunay refinement (break bad tetrahedra, where
+  /// bad means badly shaped or too big). The normal of
+  /// Steiner points is set to zero.
+  /// Returns the number of vertices inserted.
+
+  template <typename Sizing_field>
+  unsigned int delaunay_refinement(FT radius_edge_ratio_bound, ///< radius edge ratio bound (ignored if zero)
+                                   Sizing_field sizing_field, ///< cell radius bound (ignored if zero)
+                                   unsigned int max_vertices, ///< number of vertices bound
+                                   FT enlarge_ratio) ///< bounding box enlarge ratio
+  {
+    return delaunay_refinement(radius_edge_ratio_bound,
+                               sizing_field,
+                               max_vertices,
+                               enlarge_ratio,
+                               internal::Poisson::Constant_sizing_field<Triangulation>());
+  }
+
+  template <typename Sizing_field, 
+            typename Second_sizing_field>
+  unsigned int delaunay_refinement(FT radius_edge_ratio_bound, ///< radius edge ratio bound (ignored if zero)
+                                   Sizing_field sizing_field, ///< cell radius bound (ignored if zero)
+                                   unsigned int max_vertices, ///< number of vertices bound
+                                   FT enlarge_ratio, ///< bounding box enlarge ratio
+                                   Second_sizing_field second_sizing_field)
+  {
+    Sphere elarged_bsphere = enlarged_bounding_sphere(enlarge_ratio);
+    unsigned int nb_vertices_added = poisson_refine_triangulation(*m_tr,radius_edge_ratio_bound,sizing_field,second_sizing_field,max_vertices,elarged_bsphere);
+
+    return nb_vertices_added;
+  }
+
+  /// Poisson reconstruction.
+  /// Returns false on error.
+  ///
+  /// @commentheading Template parameters:
+  /// @param SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
+  template <class SparseLinearAlgebraTraits_d>
+  bool solve_poisson(
+    SparseLinearAlgebraTraits_d solver, ///< sparse linear solver
+    double lambda)
+  {
+    CGAL_TRACE("Calls solve_poisson()\n");
+
+    double time_init = clock();
+
+    double duration_assembly = 0.0;
+    double duration_solve = 0.0;
+
+
+    initialize_cell_indices();
+    initialize_barycenters();
+
+    // get #variables
+    constrain_one_vertex_on_convex_hull();
+    m_tr->index_unconstrained_vertices();
+    unsigned int nb_variables = static_cast<unsigned int>(m_tr->number_of_vertices()-1);
+
+    CGAL_TRACE("  Number of variables: %ld\n", (long)(nb_variables));
+
+    // Assemble linear system A*X=B
+    typename SparseLinearAlgebraTraits_d::Matrix A(nb_variables); // matrix is symmetric definite positive
+    typename SparseLinearAlgebraTraits_d::Vector X(nb_variables), B(nb_variables);
+
+    initialize_duals();
+#ifndef CGAL_DIV_NON_NORMALIZED
+    initialize_cell_normals();
+#endif
+    Finite_vertices_iterator v, e;
+    for(v = m_tr->finite_vertices_begin(),
+        e = m_tr->finite_vertices_end();
+        v != e;
+        ++v)
+    {
+      if(!m_tr->is_constrained(v)) {
+#ifdef CGAL_DIV_NON_NORMALIZED
+        B[v->index()] = div(v); // rhs -> divergent
+#else // not defined(CGAL_DIV_NORMALIZED)
+        B[v->index()] = div_normalized(v); // rhs -> divergent
+#endif // not defined(CGAL_DIV_NORMALIZED)
+        assemble_poisson_row<SparseLinearAlgebraTraits_d>(A,v,B,lambda);
+      }
+    }
+
+    clear_duals();
+    clear_normals();
+    duration_assembly = (clock() - time_init)/CLOCKS_PER_SEC;
+    CGAL_TRACE("  Creates matrix: done (%.2lf s)\n", duration_assembly);
+
+    CGAL_TRACE("  Solve sparse linear system...\n");
+
+    // Solve "A*X = B". On success, solution is (1/D) * X.
+    time_init = clock();
+    double D;
+    if(!solver.linear_solver(A, B, X, D))
+      return false;
+    CGAL_surface_reconstruction_points_assertion(D == 1.0);
+    duration_solve = (clock() - time_init)/CLOCKS_PER_SEC;
+
+    CGAL_TRACE("  Solve sparse linear system: done (%.2lf s)\n", duration_solve);
+
+    // copy function's values to vertices
+    unsigned int index = 0;
+    for (v = m_tr->finite_vertices_begin(), e = m_tr->finite_vertices_end(); v!= e; ++v)
+      if(!m_tr->is_constrained(v))
+        v->f() = X[index++];
+
+    CGAL_TRACE("End of solve_poisson()\n");
+
+    return true;
+  }
+
+  /// Shift and orient the implicit function such that:
+  /// - the implicit function = 0 for points / f() = contouring_value,
+  /// - the implicit function < 0 inside the surface.
+  ///
+  /// Returns the minimum value of the implicit function.
+  FT set_contouring_value(FT contouring_value)
+  {
+    // median value set to 0.0
+    shift_f(-contouring_value);
+
+    // check value on convex hull (should be positive)
+    Vertex_handle v = any_vertex_on_convex_hull();
+    if(v->f() < 0.0)
+      flip_f();
+
+    // Update m_sink
+    FT sink_value = find_sink();
+    return sink_value;
+  }
+
+
+/// Gets median value of the implicit function over input vertices.
+  FT median_value_at_input_vertices() const
+  {
+    std::deque<FT> values;
+    Finite_vertices_iterator v, e;
+    for(v = m_tr->finite_vertices_begin(),
+        e= m_tr->finite_vertices_end();
+        v != e; 
+        v++)
+      if(v->type() == Triangulation::INPUT)
+        values.push_back(v->f());
+
+    std::size_t size = values.size();
+    if(size == 0)
+    {
+      std::cerr << "Contouring: no input points\n";
+      return 0.0;
+    }
+
+    std::sort(values.begin(),values.end());
+    std::size_t index = size/2;
+    // return values[size/2];
+    return 0.5 * (values[index] + values[index+1]); // avoids singular cases
+  }
+
+  void barycentric_coordinates(const Point& p,
+                               Cell_handle cell,
+                               FT& a,
+                               FT& b,
+                               FT& c,
+                               FT& d) const
+  {
+
+    //    const Point& pa = cell->vertex(0)->point();
+    // const Point& pb = cell->vertex(1)->point();
+    // const Point& pc = cell->vertex(2)->point();
+    const Point& pd = cell->vertex(3)->point();
+#if 1
+    //Vector va = pa - pd;
+    //Vector vb = pb - pd;
+    //Vector vc = pc - pd;
+    Vector vp = p - pd;
+
+    //FT i00, i01, i02, i10, i11, i12, i20, i21, i22;
+    //internal::invert(va.x(), va.y(), va.z(),
+    //       vb.x(), vb.y(), vb.z(),
+    //       vc.x(), vc.y(), vc.z(),
+    //       i00, i01, i02, i10, i11, i12, i20, i21, i22);
+    const boost::array<double,9> & i = (*m_Bary)[cell->info()];
+    if(i[0]==-1){
+      initialize_matrix_entry(cell);
+    }
+    //    UsedBary[cell->info()] = true;
+    a = i[0] * vp.x() + i[3] * vp.y() + i[6] * vp.z();
+    b = i[1] * vp.x() + i[4] * vp.y() + i[7] * vp.z();
+    c = i[2] * vp.x() + i[5] * vp.y() + i[8] * vp.z();
+    d = 1 - ( a + b + c);
+#else
+    FT v = volume(pa,pb,pc,pd);
+    a = std::fabs(volume(pb,pc,pd,p) / v);
+    b = std::fabs(volume(pa,pc,pd,p) / v);
+    c = std::fabs(volume(pb,pa,pd,p) / v);
+    d = std::fabs(volume(pb,pc,pa,p) / v);
+
+    std::cerr << "_________________________________\n";
+    std::cerr << aa << "  " << bb << "  " << cc << "  " << dd << std::endl;
+    std::cerr << a << "  " << b << "  " << c << "  " << d << std::endl;
+
+#endif
+  }
+
+  FT find_sink()
+  {
+    m_sink = CGAL::ORIGIN;
+    FT min_f = 1e38;
+    Finite_vertices_iterator v, e;
+    for(v = m_tr->finite_vertices_begin(),
+        e= m_tr->finite_vertices_end();
+        v != e;
+        v++)
+    {
+      if(v->f() < min_f)
+      {
+        m_sink = v->point();
+        min_f = v->f();
+      }
+    }
+    return min_f;
+  }
+
+  void shift_f(const FT shift)
+  {
+    Finite_vertices_iterator v, e;
+    for(v = m_tr->finite_vertices_begin(),
+        e = m_tr->finite_vertices_end();
+        v!= e;
+        v++)
+      v->f() += shift;
+  }
+
+  void flip_f()
+  {
+    Finite_vertices_iterator v, e;
+    for(v = m_tr->finite_vertices_begin(),
+          e = m_tr->finite_vertices_end();
+        v != e;
+        v++)
+      v->f() = -v->f();
+  }
+
+  Vertex_handle any_vertex_on_convex_hull()
+  {
+    Cell_handle ch = m_tr->infinite_vertex()->cell();
+    return  ch->vertex( (ch->index( m_tr->infinite_vertex())+1)%4);
+  }
+
+
+  void constrain_one_vertex_on_convex_hull(const FT value = 0.0)
+  {
+    Vertex_handle v = any_vertex_on_convex_hull();
+    m_tr->constrain(v);
+    v->f() = value;
+  }
+
+  // TODO: Some entities are computed too often
+  // - nn and area should not be computed for the face and its opposite face
+  // 
+  // divergent
+  FT div_normalized(Vertex_handle v)
+  {
+    std::vector<Cell_handle> cells;
+    cells.reserve(32);
+    m_tr->incident_cells(v,std::back_inserter(cells));
+  
+    FT div = 0;
+    typename std::vector<Cell_handle>::iterator it;
+    for(it = cells.begin(); it != cells.end(); it++)
+    {
+      Cell_handle cell = *it;
+      if(m_tr->is_infinite(cell))
+        continue;
+
+      // compute average normal per cell
+      Vector n = get_cell_normal(cell);
+
+      // zero normal - no need to compute anything else
+      if(n == CGAL::NULL_VECTOR)
+        continue;
+
+
+      // compute n'
+      int index = cell->index(v);
+      const Point& x = cell->vertex(index)->point();
+      const Point& a = cell->vertex((index+1)%4)->point();
+      const Point& b = cell->vertex((index+2)%4)->point();
+      const Point& c = cell->vertex((index+3)%4)->point();
+      Vector nn = (index%2==0) ? CGAL::cross_product(b-a,c-a) : CGAL::cross_product(c-a,b-a);
+      nn = nn / std::sqrt(nn*nn); // normalize
+      Vector p = a - x;
+      Vector q = b - x;
+      Vector r = c - x;
+      FT p_n = std::sqrt(p*p);
+      FT q_n = std::sqrt(q*q);
+      FT r_n = std::sqrt(r*r);
+      FT solid_angle = p*(CGAL::cross_product(q,r));
+      solid_angle = std::abs(solid_angle / (p_n*q_n*r_n + (p*q)*r_n + (q*r)*p_n + (r*p)*q_n));
+
+      FT area = std::sqrt(squared_area(a,b,c));
+      FT length = p_n + q_n + r_n;
+      div += n * nn * area / length ;
+    }
+    return div * FT(3.0);
+  }
+
+  FT div(Vertex_handle v)
+  {
+    std::vector<Cell_handle> cells;
+    cells.reserve(32);
+    m_tr->incident_cells(v,std::back_inserter(cells));
+  
+    FT div = 0.0;
+    typename std::vector<Cell_handle>::iterator it;
+    for(it = cells.begin(); it != cells.end(); it++)
+    {
+      Cell_handle cell = *it;
+      if(m_tr->is_infinite(cell))
+        continue;
+      
+      const int index = cell->index(v);
+      const Point& a = cell->vertex(m_tr->vertex_triple_index(index, 0))->point();
+      const Point& b = cell->vertex(m_tr->vertex_triple_index(index, 1))->point();
+      const Point& c = cell->vertex(m_tr->vertex_triple_index(index, 2))->point();
+      const Vector nn = CGAL::cross_product(b-a,c-a);
+
+      div+= nn * (//v->normal() + 
+                  cell->vertex((index+1)%4)->normal() +
+                  cell->vertex((index+2)%4)->normal() +
+                  cell->vertex((index+3)%4)->normal());
+    }
+    return div;
+  }
+
+  Vector get_cell_normal(Cell_handle cell)
+  {
+    return Normal[cell->info()];
+  }
+
+  Vector cell_normal(Cell_handle cell) const
+  {
+    const Vector& n0 = cell->vertex(0)->normal();
+    const Vector& n1 = cell->vertex(1)->normal();
+    const Vector& n2 = cell->vertex(2)->normal();
+    const Vector& n3 = cell->vertex(3)->normal();
+    Vector n = n0 + n1 + n2 + n3;
+    if(n != NULL_VECTOR){
+      FT sq_norm = n*n;
+      if(sq_norm != 0.0){
+        return n / std::sqrt(sq_norm); // normalize
+      }
+    }
+    return NULL_VECTOR;
+  }
+
+  // cotan formula as area(voronoi face) / len(primal edge)
+  FT cotan_geometric(Edge& edge)
+  {
+    Cell_handle cell = edge.first;
+    Vertex_handle vi = cell->vertex(edge.second);
+    Vertex_handle vj = cell->vertex(edge.third);
+
+    // primal edge
+    const Point& pi = vi->point();
+    const Point& pj = vj->point();
+    Vector primal = pj - pi;
+    FT len_primal = std::sqrt(primal * primal);
+    return area_voronoi_face(edge) / len_primal;
+  }
+
+  // spin around edge
+  // return area(voronoi face)
+  FT area_voronoi_face(Edge& edge)
+  {
+    // circulate around edge
+    Cell_circulator circ = m_tr->incident_cells(edge);
+    Cell_circulator done = circ;
+    std::vector<Point> voronoi_points;
+    voronoi_points.reserve(9);
+    do
+    {
+      Cell_handle cell = circ;
+      if(!m_tr->is_infinite(cell))
+        voronoi_points.push_back(Dual[cell->info()]);
+      else // one infinite tet, switch to another calculation
+        return area_voronoi_face_boundary(edge);
+      circ++;
+    }
+    while(circ != done);
+
+    if(voronoi_points.size() < 3)
+    {
+      CGAL_surface_reconstruction_points_assertion(false);
+      return 0.0;
+    }
+
+    // sum up areas
+    FT area = 0.0;
+    const Point& a = voronoi_points[0];
+    std::size_t nb_triangles = voronoi_points.size() - 1;
+    for(std::size_t i=1;i<nb_triangles;i++)
+    {
+      const Point& b = voronoi_points[i];
+      const Point& c = voronoi_points[i+1];
+      area += std::sqrt(squared_area(a,b,c));
+    }
+    return area;
+  }
+
+  // approximate area when a cell is infinite
+  FT area_voronoi_face_boundary(Edge& edge)
+  {
+    FT area = 0.0;
+    Vertex_handle vi = edge.first->vertex(edge.second);
+    Vertex_handle vj = edge.first->vertex(edge.third);
+
+    const Point& pi = vi->point();
+    const Point& pj = vj->point();
+    Point m = CGAL::midpoint(pi,pj);
+
+    // circulate around each incident cell
+    Cell_circulator circ = m_tr->incident_cells(edge);
+    Cell_circulator done = circ;
+    do
+    {
+      Cell_handle cell = circ;
+      if(!m_tr->is_infinite(cell))
+      {
+        // circumcenter of cell
+        Point c = Dual[cell->info()];
+        Tetrahedron tet = m_tr->tetrahedron(cell);
+
+        int i = cell->index(vi);
+        int j = cell->index(vj);
+        int k =  Triangulation_utils_3::next_around_edge(i,j);
+        int l =  Triangulation_utils_3::next_around_edge(j,i);
+
+        Vertex_handle vk = cell->vertex(k);
+        Vertex_handle vl = cell->vertex(l);
+
+        const Point& pk = vk->point();
+        const Point& pl = vl->point();
+
+        // if circumcenter is outside tet
+        // pick barycenter instead
+        if(tet.has_on_unbounded_side(c))
+        {
+          Point cell_points[4] = {pi,pj,pk,pl};
+          c = CGAL::centroid(cell_points, cell_points+4);
+        }
+
+        Point ck = CGAL::circumcenter(pi,pj,pk);
+        Point cl = CGAL::circumcenter(pi,pj,pl);
+
+        area += std::sqrt(squared_area(m,c,ck));
+        area += std::sqrt(squared_area(m,c,cl));
+      }
+      circ++;
+    }
+    while(circ != done);
+    return area;
+  }
+
+  /// Assemble vi's row of the linear system A*X=B
+  ///
+  /// @commentheading Template parameters:
+  /// @param SparseLinearAlgebraTraits_d Symmetric definite positive sparse linear solver.
+  template <class SparseLinearAlgebraTraits_d>
+  void assemble_poisson_row(typename SparseLinearAlgebraTraits_d::Matrix& A,
+                            Vertex_handle vi,
+                            typename SparseLinearAlgebraTraits_d::Vector& B,
+                            double lambda)
+  {
+    // for each vertex vj neighbor of vi
+    std::vector<Edge> edges;
+    m_tr->incident_edges(vi,std::back_inserter(edges));
+
+    double diagonal = 0.0;
+
+    for(typename std::vector<Edge>::iterator it = edges.begin();
+        it != edges.end();
+        it++)
+      {
+        Vertex_handle vj = it->first->vertex(it->third);
+        if(vj == vi){
+          vj = it->first->vertex(it->second);
+        }
+        if(m_tr->is_infinite(vj))
+          continue;
+
+        // get corresponding edge
+        Edge edge( it->first, it->first->index(vi), it->first->index(vj));
+        if(vi->index() < vj->index()){
+          std::swap(edge.second,  edge.third);
+        }
+
+        double cij = cotan_geometric(edge);
+
+        if(m_tr->is_constrained(vj)){
+          if(! is_valid(vj->f())){
+            std::cerr << "vj->f() = " << vj->f() << " is not valid" << std::endl;
+          }
+          B[vi->index()] -= cij * vj->f(); // change rhs
+          if(! is_valid( B[vi->index()])){
+            std::cerr << " B[vi->index()] = " <<  B[vi->index()] << " is not valid" << std::endl;
+          }
+
+        } else {
+          if(! is_valid(cij)){
+            std::cerr << "cij = " << cij << " is not valid" << std::endl;
+          }
+          A.set_coef(vi->index(),vj->index(), -cij, true /*new*/); // off-diagonal coefficient
+        }
+
+        diagonal += cij;
+      }
+    // diagonal coefficient
+    if (vi->type() == Triangulation::INPUT){
+      A.set_coef(vi->index(),vi->index(), diagonal + lambda, true /*new*/) ;
+    } else{
+      A.set_coef(vi->index(),vi->index(), diagonal, true /*new*/);
+    }
+  }
+  
+
+  /// Computes enlarged geometric bounding sphere of the embedded triangulation.
+  Sphere enlarged_bounding_sphere(FT ratio) const
+  {
+    Sphere bsphere = bounding_sphere(); // triangulation's bounding sphere
+    return Sphere(bsphere.center(), bsphere.squared_radius() * ratio*ratio);
+  }
+
+}; // end of Poisson_reconstruction_function
+
+
+} //namespace CGAL
+
+#endif // CGAL_POISSON_RECONSTRUCTION_FUNCTION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polychain_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polychain_2.h
new file mode 100644
index 0000000..542adfb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polychain_2.h
@@ -0,0 +1,859 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_POLYCHAIN_2_H
+#define CGAL_POLYCHAIN_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Polygon_2.h>
+#include <CGAL/intersections.h>
+
+
+// Polychainsegment_2
+
+namespace CGAL {
+
+namespace Qt {
+  template <typename K> class PainterOstream;
+}
+
+template <class Traits_P, class Container_P
+        = std::vector<typename Traits_P::Point_2> >
+class Polychainsegment_2 : public Polygon_2<Traits_P, Container_P> {
+
+  public:
+    typedef Traits_P Traits;
+    typedef Polygon_2<Traits_P, Container_P> Base;
+
+    // constructors
+
+    Polychainsegment_2() : Base() {}
+
+    Polychainsegment_2(
+        const Polychainsegment_2<Traits_P,Container_P>& pc)
+      : Base((Base) pc) {}
+
+    template <class InputIterator>
+    Polychainsegment_2(InputIterator first, InputIterator last,
+                       Traits p_traits = Traits())
+        : Base(first, last, p_traits)  {}
+
+
+    template< class K >
+    void draw(CGAL::Qt::PainterOstream<K>& stream) const {
+      typedef typename K::Segment_2 K_Segment_2;
+      typedef typename Polychainsegment_2<
+                        Traits_P,Container_P>::Vertex_const_iterator
+              VI;
+
+      if (this->size() > 1) {
+        VI source = this->vertices_begin();
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          stream << K_Segment_2(*source, *target);
+        }
+      }
+    }
+
+    template< class Stream >
+    void draw(Stream & str) const
+    {
+      typedef typename Traits_P::Segment_2 Segment_2;
+      typedef typename Polychainsegment_2<
+                        Traits_P,Container_P>::Vertex_const_iterator
+              VI;
+      if (this->size() > 1) {
+        VI source = this->vertices_begin();
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          str << Segment_2(*source, *target);
+        }
+      }
+    }
+
+} ;
+
+
+
+
+template <class Traits_P, class Container_P>
+std::ostream&
+operator<<(std::ostream &os,
+           const Polychainsegment_2<Traits_P,Container_P>& p)
+{
+  typename Polychainsegment_2<Traits_P,Container_P>
+              ::Vertex_const_iterator
+           i;
+
+  switch(os.iword(IO::mode)) {
+    case IO::ASCII :
+      os << p.size() << ' ';
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i << ' ';
+      }
+      return os;
+
+    case IO::BINARY :
+      os << p.size();
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i;
+      }
+      return os;
+
+    default:
+      os << "Polychainsegment_2(" << std::endl;
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << "  " << *i << std::endl;
+      }
+      os << ")" << std::endl;
+      return os;
+  }
+}
+
+
+
+
+
+/* the following not allowed in some compilers: */
+/*
+template< class Stream,
+          class Traits_P,
+          class Container_P = std::vector<typename Traits_P::Point_2>
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainsegment_2 <Traits_P, Container_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+*/
+
+
+/* instead, we use overloading */
+
+/*
+template< class Stream,
+          class Traits_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainsegment_2 <Traits_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+
+
+template< class Stream,
+          class Traits_P,
+          class Container_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainsegment_2 <Traits_P, Container_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+*/
+
+
+
+// Polychainray_2
+
+template <class Traits_P, class Container_P
+        = std::vector<typename Traits_P::Point_2> >
+class Polychainray_2 :
+  public Polychainsegment_2<Traits_P, Container_P> {
+
+public:
+    typedef Traits_P Traits;
+
+private:
+    typedef typename Traits_P::Direction_2 OutgoingDirection;
+    typedef Polychainsegment_2<Traits_P, Container_P> Base;
+
+    OutgoingDirection outgoing;
+
+public:
+
+    // constructors
+
+    Polychainray_2(): Base(), outgoing() {}
+
+    Polychainray_2(const Polychainray_2<Traits_P,Container_P>& pcr)
+      : Base((Base) pcr), outgoing(pcr.outgoing) {}
+
+    template <class InputIterator>
+    Polychainray_2(InputIterator first, InputIterator last,
+	           OutgoingDirection d,
+              Traits p_traits = Traits())
+        : Base(first, last, p_traits), outgoing(d)
+    {
+    }
+
+
+    // get_outgoing
+
+    OutgoingDirection get_outgoing() const {
+	return outgoing;
+    }
+
+
+    // drawing
+
+    template< class K >
+    void draw(CGAL::Qt::PainterOstream<K>& stream) const {
+      typedef typename K::Segment_2 K_Segment_2;
+      typedef typename K::Ray_2 K_Ray_2;
+      typedef typename
+	  Polychainray_2<Traits_P,Container_P>::Vertex_const_iterator VI;
+
+      CGAL_assertion( this->size() > 0 );
+
+      VI source = this->vertices_begin();
+      if (this->size() > 1) {
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          stream << K_Segment_2(*source, *target);
+        }
+      }
+      // now source contains the last point;
+      // draw outgoing ray from this point
+      stream << K_Ray_2(*source, this->get_outgoing());
+    }
+
+    template< class Stream >
+    void draw(Stream & stream) const {
+      typedef typename Traits_P::Segment_2 Segment_2;
+      typedef typename Traits_P::Ray_2 Ray_2;
+      typedef typename
+	  Polychainray_2<Traits_P,Container_P>::Vertex_const_iterator VI;
+
+      CGAL_assertion( this->size() > 0 );
+
+      VI source = this->vertices_begin();
+      if (this->size() > 1) {
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          stream << Segment_2(*source, *target);
+        }
+      }
+      // now source contains the last point;
+      // draw outgoing ray from this point
+      stream << Ray_2(*source, this->get_outgoing());
+    }
+
+
+} ;
+
+
+template <class Traits_P, class Container_P>
+std::ostream&
+operator<<(std::ostream &os,
+           const Polychainray_2<Traits_P,Container_P>& p)
+{
+  typename Polychainray_2<Traits_P,Container_P>::Vertex_const_iterator i;
+
+  switch(os.iword(IO::mode)) {
+    case IO::ASCII :
+      os << p.size() << ' ';
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i << ' ';
+      }
+      os << ", dout=" << p.get_outgoing() << ' ';
+      return os;
+
+    case IO::BINARY :
+      os << p.size();
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i;
+      }
+      os << p.get_outgoing();
+      return os;
+
+    default:
+      os << "Polychainray_2(" << std::endl;
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << "  " << *i << std::endl;
+      }
+      os << "dout=" << p.get_outgoing() << std::endl;
+      os << ")" << std::endl;
+      return os;
+  }
+}
+
+
+
+
+
+/*
+template< class Stream,
+          class Traits_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainray_2 <Traits_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+
+
+template< class Stream,
+          class Traits_P,
+          class Container_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainray_2 <Traits_P, Container_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+*/
+
+
+
+// Polychainline_2
+
+template <class Traits_P, class Container_P
+        = std::vector<typename Traits_P::Point_2> >
+class Polychainline_2 : public Polychainray_2<Traits_P, Container_P> {
+
+public:
+
+private:
+    typedef Traits_P Traits;
+    typedef typename Traits_P::Direction_2 IncomingDirection;
+    typedef typename Traits_P::Direction_2 OutgoingDirection;
+    typedef typename Traits_P::Line_2      Line_2;
+    typedef typename Traits_P::Ray_2       Ray_2;
+    typedef typename Traits_P::Segment_2   Segment_2;
+    typedef typename Traits_P::Point_2     Point_2;
+    typedef Polychainray_2<Traits_P, Container_P>  Base;
+    typedef Polychainline_2<Traits_P, Container_P> Self;
+
+    IncomingDirection incoming;
+    bool is_line_optimization;
+
+public:
+
+    // constructors
+
+    Polychainline_2() : Base(), incoming(),
+      is_line_optimization(false)
+    {}
+
+    Polychainline_2(const Self& pcl)
+      : Base((Base) pcl), incoming(pcl.incoming),
+        is_line_optimization(pcl.is_line_optimization)
+    {}
+
+    template <class InputIterator>
+    Polychainline_2(IncomingDirection dinc,
+	            InputIterator first, InputIterator last,
+	            OutgoingDirection dout,
+                    Traits p_traits = Traits())
+        : Base(first, last, dout, p_traits), incoming(dinc),
+          is_line_optimization(false)
+    {
+    }
+
+    void set_line_optimization() {
+      CGAL_assertion(this->size() == 1);
+      CGAL_assertion(this->incoming == - this->get_outgoing());
+      is_line_optimization = true;
+    }
+
+    // get_incoming
+
+    IncomingDirection get_incoming() const {
+	return incoming;
+    }
+
+
+    // unary minus operator
+    // that reverses the orientation of the polychainline
+
+    Self
+    operator-() const {
+      // first reverse list of points of polychainline
+
+      std::vector<typename Traits_P::Point_2> reverse;
+
+      unsigned int npts = this->size();
+
+      CGAL_SDG_DEBUG(std::cout << "pcl_reverse npts="
+          << npts << std::endl;);
+
+      reverse.resize(npts);
+
+      //std::reverse_copy(this->vertices_begin(),
+      //                  this->vertices_end(),
+      //                  reverse);
+
+      typedef typename Polychainline_2<
+                        Traits_P,Container_P>::Vertex_const_iterator
+              VI;
+
+      unsigned int i = npts - 1;
+
+      for (VI vi = this->vertices_begin();
+              vi != this->vertices_end();
+              ++vi)
+      {
+        //CGAL_SDG_DEBUG(std::cout << "debug pcl_reverse setting at " << i
+        //          << " value " << *vi << std::endl;);
+        reverse[i] = *vi;
+        --i;
+      }
+
+
+      // then also swap incoming and outgoing directions
+
+      //return Self(this->get_outgoing(),
+      //            reverse.begin(),
+      //            reverse.end(),
+      //            this->get_incoming());
+
+      Self pclreverse(this->get_outgoing(),
+                      reverse.begin(),
+                      reverse.end(),
+                      this->get_incoming());
+
+      if (is_line_optimization) {
+        pclreverse.set_line_optimization();
+      }
+
+      return pclreverse;
+    }
+
+    // line_first_intersection_point_with
+    typename Traits_P::Point_2
+    line_first_intersection_point_with(
+        const Polychainline_2<Traits_P,Container_P>& pcl)
+    {
+      CGAL_assertion(is_line_optimization);
+      Line_2 line((*this)[0], this->get_outgoing());
+
+      typedef typename
+	  Polychainline_2<Traits_P,Container_P>::
+                     Vertex_const_iterator
+          VI;
+
+      CGAL::Object result;
+
+      VI sourcepcl  = pcl.vertices_begin();
+      Ray_2 rayincpcl (*sourcepcl,  pcl.get_incoming());
+      result = CGAL::intersection(line, rayincpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+      if (pcl.size() > 1) {
+        VI targetpcl = sourcepcl+1;
+        for( ;
+            targetpcl != pcl.vertices_end();
+            ++sourcepcl, ++targetpcl)
+        {
+          Segment_2 testseg(*sourcepcl, *targetpcl);
+          result = CGAL::intersection(line, testseg);
+          if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+            return *ipoint;
+          }
+        }
+      }
+      Ray_2 rayoutpcl(*sourcepcl, pcl.get_outgoing());
+      result = CGAL::intersection(line, rayoutpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug error: no intersection found for "
+          << "this=" << *this << " pcl=" << pcl << std::endl;);
+
+      CGAL_assertion(false);
+
+      return Point_2();
+
+    } // end of line_first_intersection_point_with
+
+    // first_intersection_point_with
+    typename Traits_P::Point_2
+    first_intersection_point_with(
+        const Polychainline_2<Traits_P,Container_P>& pcl)
+    {
+      // for every piece of object,
+      // try intersecting with every piece of pcl
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug first_intersection entering this="
+          << *this << " pcl=" << pcl << std::endl;);
+
+      typedef typename
+	  Polychainline_2<Traits_P,Container_P>::
+                     Vertex_const_iterator
+          VI;
+
+      typedef typename std::vector<typename Traits_P::Segment_2>::
+               const_iterator SI;
+
+      CGAL_assertion( this->size() > 0 );
+      CGAL_assertion( pcl.size() > 0 );
+
+      if (this->is_line_optimization) {
+        return line_first_intersection_point_with(pcl);
+      }
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+          << "creating empty vectors" << std::endl;);
+#endif
+
+      // create two empty vectors for storing the segments
+      std::vector<Segment_2> segmentsthis;
+      std::vector<Segment_2> segmentspcl;
+
+      VI sourcethis = this->vertices_begin();
+      Ray_2 rayincthis(*sourcethis, this->get_incoming());
+      if (this->size() > 1) {
+        VI targetthis = sourcethis+1;
+        for( ;
+            targetthis != this->vertices_end();
+            ++sourcethis, ++targetthis)
+        {
+          segmentsthis.push_back(Segment_2(*sourcethis, *targetthis));
+        }
+      }
+      Ray_2 rayoutthis(*sourcethis, this->get_outgoing());
+
+      CGAL_assertion(this->size() == (segmentsthis.size() + 1));
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                     << "segmentsthis computed" << std::endl;);
+#endif
+
+
+      VI sourcepcl  = pcl.vertices_begin();
+      Ray_2 rayincpcl (*sourcepcl,  pcl.get_incoming());
+      if (pcl.size() > 1) {
+        VI targetpcl = sourcepcl+1;
+        for( ;
+            targetpcl != pcl.vertices_end();
+            ++sourcepcl, ++targetpcl)
+        {
+          segmentspcl.push_back(Segment_2(*sourcepcl, *targetpcl));
+        }
+      }
+      Ray_2 rayoutpcl(*sourcepcl, pcl.get_outgoing());
+
+      CGAL_assertion(pcl.size() == (segmentspcl.size() + 1));
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                     << "segmentspcl computed" << std::endl;);
+#endif
+
+
+      CGAL::Object result;
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                    << "trying rayincthis with pcl" << std::endl;);
+#endif
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayincthis
+                     << " with ray " << rayincpcl << std::endl;);
+#endif
+
+      result = CGAL::intersection(rayincthis, rayincpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+      for (SI sipcl = segmentspcl.begin();
+              sipcl != segmentspcl.end();
+              ++sipcl) {
+#if 0
+        CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayincthis
+                       << " with segment " << *sipcl << std::endl;);
+#endif
+
+        result = CGAL::intersection(rayincthis, *sipcl);
+        if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+          return *ipoint;
+        }
+      }
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayincthis
+                     << " with ray " << rayoutpcl << std::endl;);
+#endif
+
+      result = CGAL::intersection(rayincthis, rayoutpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                     << "trying segmentsthis with pcl" << std::endl;);
+#endif
+
+      for (SI sithis = segmentsthis.begin();
+              sithis != segmentsthis.end();
+              ++sithis) {
+
+#if 0
+        CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying segment " << *sithis
+                       << " with ray " << rayincpcl << std::endl;);
+#endif
+
+        result = CGAL::intersection(*sithis, rayincpcl);
+        if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+          return *ipoint;
+        }
+
+        for (SI sipcl = segmentspcl.begin();
+            sipcl != segmentspcl.end();
+            ++sipcl) {
+#if 0
+          CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying segment " << *sithis
+                         << " with segment " << *sipcl << std::endl;);
+#endif
+
+          result = CGAL::intersection(*sithis, *sipcl);
+          if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result))
+          {
+            return *ipoint;
+          }
+        }
+
+#if 0
+        CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+            << "trying segment " << *sithis
+            << " with ray " << rayoutpcl << std::endl;);
+#endif
+
+        result = CGAL::intersection(*sithis, rayoutpcl);
+        if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+          return *ipoint;
+        }
+
+      }
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                     << "trying rayoutthis with pcl" << std::endl;);
+#endif
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayoutthis
+                     << " with ray " << rayincpcl << std::endl;);
+#endif
+
+      result = CGAL::intersection(rayoutthis, rayincpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+      for (SI sipcl = segmentspcl.begin();
+              sipcl != segmentspcl.end();
+              ++sipcl) {
+#if 0
+        CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayoutthis
+                       << " with segment " << *sipcl << std::endl;);
+#endif
+
+        result = CGAL::intersection(rayoutthis, *sipcl);
+        if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+          return *ipoint;
+        }
+      }
+
+#if 0
+      CGAL_SDG_DEBUG(std::cout << "debug first_intersection "
+                << "trying ray " << rayoutthis
+                     << " with ray " << rayoutpcl << std::endl;);
+#endif
+
+      result = CGAL::intersection(rayoutthis, rayoutpcl);
+      if (const Point_2 *ipoint = CGAL::object_cast<Point_2>(&result)) {
+        return *ipoint;
+      }
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug error: no intersection found for "
+          << "this=" << *this << " pcl=" << pcl << std::endl;);
+
+      CGAL_assertion(false);
+
+      // philaris: added to avoid complaining from some compilers
+
+      return Point_2();
+
+    }
+
+
+    // drawing
+
+    template< class K >
+    void draw(CGAL::Qt::PainterOstream<K>& stream) const {
+      typedef typename K::Segment_2 K_Segment_2;
+      typedef typename K::Ray_2 K_Ray_2;
+      typedef typename
+	  Polychainline_2<Traits_P,Container_P>::Vertex_const_iterator VI;
+
+      CGAL_assertion( this->size() > 0 );
+
+      VI source = this->vertices_begin();
+
+      // draw outgoing ray from first point
+      stream << K_Ray_2(*source, this->get_incoming());
+
+      if (this->size() > 1) {
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          stream << K_Segment_2(*source, *target);
+        }
+      }
+
+      // now source contains the last point;
+      // draw outgoing ray from this point
+      stream << K_Ray_2(*source, this->get_outgoing());
+    }
+
+    template< class Stream >
+    void draw(Stream & stream) const {
+      typedef typename
+	  Polychainline_2<Traits_P,Container_P>::Vertex_const_iterator VI;
+
+      CGAL_assertion( this->size() > 0 );
+
+      VI source = this->vertices_begin();
+
+      // draw outgoing ray from first point
+      stream << Ray_2(*source, this->get_incoming());
+
+      if (this->size() > 1) {
+        VI target = source+1;
+        for( ; target!=this->vertices_end(); ++source, ++target)
+        {
+          stream << Segment_2(*source, *target);
+        }
+      }
+
+      // now source contains the last point;
+      // draw outgoing ray from this point
+      stream << Ray_2(*source, this->get_outgoing());
+    }
+
+} ;
+
+
+
+template <class Traits_P, class Container_P>
+std::ostream&
+operator<<(std::ostream &os,
+           const Polychainline_2<Traits_P,Container_P>& p)
+{
+  typename Polychainline_2<Traits_P,Container_P>::Vertex_const_iterator i;
+
+  switch(os.iword(IO::mode)) {
+    case IO::ASCII :
+      os << p.size() << ' ';
+      os << ", dinc=" << p.get_incoming() << ", ";
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i << ' ';
+      }
+      os << ", dout=" << p.get_outgoing() << ' ';
+      return os;
+
+    case IO::BINARY :
+      os << p.size();
+      os << p.get_incoming();
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i;
+      }
+      os << p.get_outgoing();
+      return os;
+
+    default:
+      os << "Polychainline_2(" << std::endl;
+      os << "dinc=" << p.get_incoming() << std::endl;
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << "  " << *i << std::endl;
+      }
+      os << "dout=" << p.get_outgoing() << std::endl;
+      os << ")" << std::endl;
+      return os;
+  }
+}
+
+
+/*
+template< class Stream,
+          class Traits_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainline_2 <Traits_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+
+
+template< class Stream,
+          class Traits_P,
+          class Container_P
+        >
+inline
+Stream& operator<<(Stream &s,
+                   const Polychainline_2 <Traits_P, Container_P> &P)
+{
+  P.draw(s);
+  return s;
+}
+*/
+
+
+
+} //namespace CGAL
+
+#endif // CGAL_POLYCHAIN_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_impl.h
new file mode 100644
index 0000000..be890c5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_impl.h
@@ -0,0 +1,159 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Wieger Wesselink <wieger at cs.ruu.nl>
+
+//-----------------------------------------------------------------------//
+//                          operator==
+//-----------------------------------------------------------------------//
+
+namespace CGAL {
+
+namespace i_polygon {
+template <class Equal_2, class Point_2>
+class Equal_pred {
+    Equal_2 m_equal_2;
+    Point_2 m_pt;
+public:
+    Equal_pred(Equal_2 equal_2, Point_2 const &pt)
+    : m_equal_2(equal_2), m_pt(pt) {}
+    bool operator()(Point_2 const &pt) const
+    { return m_equal_2(m_pt, pt); }
+};
+}
+
+template <class Traits_P, class Container1_P, class Container2_P>
+bool operator==( const Polygon_2<Traits_P,Container1_P> &x,
+                 const Polygon_2<Traits_P,Container2_P> &y )
+{
+  if (&x == &y)
+    return true;
+  typedef typename Traits_P::Equal_2 Equal_2;
+  typedef typename Traits_P::Point_2 Point_2;
+//  CGAL_polygon_precondition( (x.size() != 0) || (y.size() != 0));
+  if ((x.size() == 0) && (y.size() == 0)) return true;
+
+  if (x.size() != y.size()) return false;
+  Equal_2 equal_2 = x.traits_member().equal_2_object();
+  typename Polygon_2<Traits_P,Container1_P>::Vertex_const_iterator x_iter =
+    x.vertices_begin();
+
+  typename Polygon_2<Traits_P,Container2_P>::Vertex_const_iterator y_iter =
+    std::find_if(y.vertices_begin(), y.vertices_end(),
+    i_polygon::Equal_pred<Equal_2, Point_2>(equal_2, *x.vertices_begin()));
+
+  // if y doesn't contain the first point of x ...
+  if (y_iter == y.vertices_end()) return false;
+
+  ++x_iter;
+  ++y_iter;
+
+  while (y_iter != y.vertices_end()) {
+    if (!equal_2(*x_iter, *y_iter)) return false;
+    ++x_iter;
+    ++y_iter;
+  }
+
+  y_iter = y.vertices_begin();
+  while (x_iter != x.vertices_end()) {
+    if (!equal_2(*x_iter, *y_iter)) return false;
+    ++x_iter;
+    ++y_iter;
+  }
+
+  return true;
+}
+
+//-----------------------------------------------------------------------//
+//                          operator>>
+//-----------------------------------------------------------------------//
+
+template <class Traits_P, class Container_P>
+std::istream &
+operator>>(std::istream &is, Polygon_2<Traits_P,Container_P>& p)
+{
+  int n = 0; // number of vertices
+  is >> n;
+  typename Traits_P::Point_2 point;
+ 
+  if (is) {
+      p.erase(p.vertices_begin(),p.vertices_end());
+      for (int i=0; i<n; i++) {
+        is >> point;
+        p.push_back(point);
+      }
+  }
+ 
+  return is;
+}
+
+//-----------------------------------------------------------------------//
+//                          operator<<
+//-----------------------------------------------------------------------//
+
+template <class Traits_P, class Container_P>
+std::ostream&
+operator<<(std::ostream &os, const Polygon_2<Traits_P,Container_P>& p)
+{
+  typename Polygon_2<Traits_P,Container_P>::Vertex_const_iterator i;
+
+  switch(get_mode(os)) {
+    case IO::ASCII :
+      os << p.size() << ' ';
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i << ' ';
+      }
+      return os;
+
+    case IO::BINARY :
+      os << p.size();
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << *i;
+      }
+      return os;
+
+    default:
+      os << "Polygon_2(" << std::endl;
+      for (i = p.vertices_begin(); i != p.vertices_end(); ++i) {
+        os << "  " << *i << std::endl;
+      }
+      os << ")" << std::endl;
+      return os;
+  }
+}
+
+//-----------------------------------------------------------------------//
+//                          transform
+//-----------------------------------------------------------------------//
+
+template <class Transformation, class Traits_P, class Container_P>
+Polygon_2<Traits_P,Container_P>
+transform(const Transformation& t, const Polygon_2<Traits_P,Container_P>& p)
+{
+  typedef typename Polygon_2<Traits_P,Container_P>::Vertex_const_iterator VI;
+  Polygon_2<Traits_P,Container_P> result;
+  for (VI i = p.vertices_begin(); i != p.vertices_end(); ++i)
+    result.push_back(t(*i));
+  return result;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_simplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_simplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_simplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_simplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_2/polygon_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2/polygon_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_2/polygon_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_2/polygon_assertions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_2_algorithms.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2_algorithms.h
new file mode 100644
index 0000000..52478f0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_2_algorithms.h
@@ -0,0 +1,466 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Wieger Wesselink <wieger at cs.ruu.nl>
+
+/*!
+  \file Polygon_2_algorithms.h
+*/
+
+#ifndef CGAL_POLYGON_2_ALGORITHMS_H
+#define CGAL_POLYGON_2_ALGORITHMS_H
+
+#include <CGAL/basic.h>
+#include <CGAL/enum.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Polygon_2/polygon_assertions.h>
+
+/// 
+namespace CGAL {
+
+//-----------------------------------------------------------------------//
+//                  algorithms for sequences of 2D points
+//-----------------------------------------------------------------------//
+
+
+/// \addtogroup PkgPolygon2Functions
+/// @{
+
+/// Returns an iterator to the leftmost point from the range
+/// `[first,last)`. In case of a tie, the point
+/// with the smallest `y`-coordinate is taken.
+///
+/// \tparam Traits is a model of the concept `PolygonTraits_2`.
+/// 	  Only the members `Less_xy_2` and
+/// 	  `less_xy_2_object()` are used.
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+///
+///
+/// \sa `CGAL::right_vertex_2()`
+/// \sa `CGAL::top_vertex_2()`
+/// \sa `CGAL::bottom_vertex_2()`
+/// \sa `CGAL::Polygon_2`
+template <class ForwardIterator, class PolygonTraits>
+ForwardIterator left_vertex_2(ForwardIterator first,
+			      ForwardIterator last,
+			      const PolygonTraits& traits);
+
+/// Returns an iterator to the rightmost point from the range
+/// `[first,last)`. In case of a tie, the point
+/// with the largest `y`-coordinate is taken.
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  In fact, only the members `Less_xy_2` and
+/// 	  `less_xy_2_object()` are used.
+/// \tparam ForwardIterator must have`Traits::Point_2` as value type.
+///
+/// 
+/// \sa `CGAL::left_vertex_2()`
+/// \sa `CGAL::top_vertex_2()`
+/// \sa `CGAL::bottom_vertex_2()`
+/// \sa `CGAL::Polygon_2`
+template <class ForwardIterator, class PolygonTraits>
+ForwardIterator right_vertex_2(ForwardIterator first,
+			       ForwardIterator last,
+			       const PolygonTraits& traits);
+
+/// Returns an iterator to the topmost point from the range
+/// `[first,last)`. In case of a tie, the point
+/// with the largest `x`-coordinate is taken.
+///
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the members `Less_yx_2` and
+/// 	  `less_yx_2_object()` are used.
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+/// 
+/// \sa `CGAL::left_vertex_2()`
+/// \sa `CGAL::right_vertex_2()`
+/// \sa `CGAL::bottom_vertex_2()`
+/// \sa `CGAL::Polygon_2`
+template <class ForwardIterator, class PolygonTraits>
+ForwardIterator top_vertex_2(ForwardIterator first,
+			     ForwardIterator last,
+			     const PolygonTraits& traits);
+
+/// Returns an iterator to the bottommost point from the range
+/// `[first,last)`. In case of a tie, the point
+/// with the smallest `x`-coordinate is taken.
+///
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the members `Less_yx_2` and
+/// 	  `less_yx_2_object()` are used.
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+/// 
+/// \sa `CGAL::left_vertex_2()`
+/// \sa `CGAL::right_vertex_2()`
+/// \sa `CGAL::top_vertex_2()`
+/// \sa `CGAL::Polygon_2`
+/// \sa `PolygonTraits_2`
+template <class ForwardIterator, class PolygonTraits>
+ForwardIterator bottom_vertex_2(ForwardIterator first,
+				ForwardIterator last,
+				const PolygonTraits& traits);
+
+/// Computes the signed area of the polygon defined by the range of points
+/// `[first,last)`. The area is returned in the parameter
+/// `result`. The sign is positive for counterclockwise polygons, negative for
+/// clockwise polygons. If the polygon is not simple, the area is not well defined.
+/// The functionality is also available by the `polygon_area_2()` function, which
+/// returns the area instead of taking it as a parameter.
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Compute_area_2` : Computes the signed area of the
+/// 	    oriented triangle defined by 3 `Point_2` passed as arguments.
+///   - `FT`
+///   - `compute_area_2_object()`
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+/// 
+/// \sa `CGAL::polygon_area_2()`
+/// \sa `PolygonTraits_2`
+/// \sa `CGAL::orientation_2()`
+/// \sa `CGAL::Polygon_2`
+template <class ForwardIterator, class PolygonTraits>
+void 
+area_2( ForwardIterator first, ForwardIterator last,
+   	typename PolygonTraits::FT &result,
+        const PolygonTraits& traits)
+{
+  typedef typename PolygonTraits::FT FT;
+   result = FT(0);
+   // check if the polygon is empty
+   if (first == last) return;
+   ForwardIterator second = first; ++second;
+   // check if the polygon has only one point
+   if (second == last) return;
+   typename PolygonTraits::Compute_area_2 compute_area_2 =
+            traits.compute_area_2_object();
+   ForwardIterator third = second;
+   while (++third != last) {
+	result = result + compute_area_2(*first, *second, *third);
+	second = third;
+   }
+}
+
+/// Computes the signed area of the polygon defined by the range of points
+/// `[first,last)`.
+/// The sign is positive for counterclockwise polygons, negative for
+/// clockwise polygons. If the polygon is not simple, the area is not well defined.
+/// 
+/// \tparam Traits is a model of the concept `PolygonTraits_2`. Only the following members of this traits class are used:
+///   - `Compute_area_2` : Computes the signed area of the
+/// 	    oriented triangle defined by 3 `Point_2` passed as arguments.
+///   - `FT`
+///   - `compute_area_2_object`
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+/// 
+/// 
+/// \sa `PolygonTraits_2 `
+/// \sa `CGAL::orientation_2()`
+/// \sa `CGAL::Polygon_2 `
+template <class ForwardIterator, class PolygonTraits>
+typename PolygonTraits::FT 
+polygon_area_2( ForwardIterator first, ForwardIterator last,
+		const PolygonTraits& traits)
+{
+   typedef typename PolygonTraits::FT FT;
+   FT result = FT(0);
+   // check if the polygon is empty
+   if (first == last) return result;
+   ForwardIterator second = first; ++second;
+   // check if the polygon has only one point
+   if (second == last) return result;
+   typename PolygonTraits::Compute_area_2 compute_area_2 =
+            traits.compute_area_2_object();
+   ForwardIterator third = second;
+   while (++third != last) {
+	result = result + compute_area_2(*first, *second, *third);
+	second = third;
+   }
+   return result;
+}
+
+/// Checks if the polygon is convex.
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Less_xy_2`
+///   - `Orientation_2`
+///   - `less_xy_2_object`
+///   - `orientation_2_object`
+/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type.
+///
+/// \sa `PolygonTraits_2 `
+/// \sa `CGAL::Polygon_2 `
+template <class ForwardIterator, class PolygonTraits>
+bool is_convex_2(ForwardIterator first,
+		 ForwardIterator last,
+		 const PolygonTraits& traits);
+
+/// Checks if the polygon defined by the
+/// iterator range `[first,last)` is simple, that is, if the edges 
+/// do not intersect, except consecutive edges in their common vertex.
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Point_2`
+///   - `Less_xy_2`
+///   - `Orientation_2`
+///   - `less_xy_2_object()`
+///   - `orientation_2_object()`
+/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type.
+/// 
+/// ### Implementation##
+/// 
+/// The simplicity test is implemented by means of a plane sweep algorithm.
+/// The algorithm is quite robust when used with inexact number types.
+/// The running time is `O(n log n)`, where n is the number of vertices of the
+/// polygon.
+/// 
+/// \sa `PolygonTraits_2`
+/// \sa `CGAL::Polygon_2`
+template <class ForwardIterator, class PolygonTraits>
+bool is_simple_2(ForwardIterator first,
+		 ForwardIterator last,
+		 const PolygonTraits& traits);
+
+// In the following two functions we would like to use Traits::Point_2
+// instead of Point, but this is not allowed by g++ 2.7.2.
+///
+/// Computes on which side of a polygon a point lies.
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Less_xy_2`
+///   - `Compare_x_2`
+///   - `Compare_y_2`
+///   - `Orientation_2`
+///   - `less_xy_2_object()`
+///   - `compare_x_2_object()`
+///   - `compare_y_2_object()`
+///   - `orientation_2_object()`
+/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type.
+///
+/// \sa `PolygonTraits_2`
+/// \sa `CGAL::bounded_side_2()`
+/// \sa `CGAL::is_simple_2()`
+/// \sa `CGAL::Polygon_2`
+/// \sa `Oriented_side`
+template <class ForwardIterator, class Point, class Traits>
+Oriented_side oriented_side_2(ForwardIterator first,
+			      ForwardIterator last,
+			      const Point& point,
+			      const Traits& traits);
+
+/// Computes if a point lies inside a polygon.
+/// The polygon is defined by the sequence of points `[first,last)`.
+/// Being inside is defined by the odd-even rule. If we take a ray starting at the
+/// point and extending to infinity (in any direction), we count the number of
+/// intersections. If this number is odd, the point is inside, otherwise it is
+/// outside. If the point is on a polygon edge, a special value is returned.  A
+/// simple polygon divides the plane in an unbounded and a bounded region.
+/// According to the definition points in the bounded region are inside the polygon.
+/// 
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Compare_x_2`
+///   - `Compare_y_2`
+///   - `Orientation_2`
+///   - `compare_x_2_object()`
+///   - `compare_y_2_object()`
+///   - `orientation_2_object()`
+/// \tparam ForwardIterator must have `Traits::Point_2` as value type.
+/// 
+/// ### Implementation ###
+/// 
+/// The running time is linear in the number of vertices of the polygon.
+/// A horizontal ray is taken to count the number of intersections.
+/// Special care is taken that the result is correct even if there are degeneracies
+/// (if the ray passes through a vertex).
+///
+/// 
+/// \sa `PolygonTraits_2`
+/// \sa `CGAL::oriented_side_2()`
+/// \sa `CGAL::Polygon_2 `
+/// \sa \ref CGAL::Bounded_side
+template <class ForwardIterator, class Point, class PolygonTraits>
+Bounded_side bounded_side_2(ForwardIterator first,
+			    ForwardIterator last,
+			    const Point& point,
+			    const PolygonTraits& traits);
+
+/// Computes if a polygon is clockwise or counterclockwise oriented.
+/// \pre `is_simple_2(first, last, traits);`
+/// 
+/// \tparam Traits is a model of the concept
+/// 	  `PolygonTraits_2`.
+/// 	  Only the following members of this traits class are used:
+///   - `Less_xy_2`
+///   - `less_xy_2_object()`
+///   - `orientation_2_object()`
+/// \tparam ForwardIterator must have`Traits::Point_2` as value type.
+/// 
+/// 
+/// 
+/// \sa `PolygonTraits_2`
+/// \sa `CGAL::is_simple_2()`
+/// \sa `CGAL::Polygon_2`
+/// \sa `CGAL::Orientation`
+template <class ForwardIterator, class Traits>
+Orientation orientation_2(ForwardIterator first,
+			  ForwardIterator last,
+			  const Traits& traits);
+
+/// @}
+
+//-----------------------------------------------------------------------//
+//                         implementation
+//-----------------------------------------------------------------------//
+
+template <class ForwardIterator>
+inline
+ForwardIterator left_vertex_2(ForwardIterator first,
+			      ForwardIterator last)
+{  
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return left_vertex_2(first, last, K());
+}
+
+
+template <class ForwardIterator>
+inline
+ForwardIterator right_vertex_2(ForwardIterator first,
+			       ForwardIterator last)
+{ 
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return right_vertex_2(first, last, K());
+}
+
+
+template <class ForwardIterator>
+inline
+ForwardIterator top_vertex_2(ForwardIterator first,
+			     ForwardIterator last)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return top_vertex_2(first, last, K());
+}
+
+
+template <class ForwardIterator>
+inline
+ForwardIterator bottom_vertex_2(ForwardIterator first,
+				ForwardIterator last)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return bottom_vertex_2(first, last, K());
+}
+
+template <class ForwardIterator, class Numbertype>
+inline
+void area_2(ForwardIterator first,
+	    ForwardIterator last,
+	    Numbertype& result)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  area_2(first, last, result, K());
+}
+
+
+
+template <class ForwardIterator>
+inline
+bool is_convex_2(ForwardIterator first,
+		 ForwardIterator last)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return is_convex_2(first, last, K());
+}
+
+
+
+template <class ForwardIterator>
+inline
+bool is_simple_2(ForwardIterator first,
+		 ForwardIterator last)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return is_simple_2(first, last, K());
+}
+
+template <class ForwardIterator>
+inline
+Oriented_side oriented_side_2(
+  ForwardIterator first,
+  ForwardIterator last,
+  const typename std::iterator_traits<ForwardIterator>::value_type& point)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return oriented_side_2(first, last, point, K());
+}
+
+
+template <class ForwardIterator>
+inline
+Bounded_side bounded_side_2(
+  ForwardIterator first,
+  ForwardIterator last,
+  const typename std::iterator_traits<ForwardIterator>::value_type& point)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return bounded_side_2(first, last, point, K());
+}
+
+
+
+template <class ForwardIterator>
+inline
+Orientation orientation_2(ForwardIterator first,
+			  ForwardIterator last)
+{
+  typedef typename Kernel_traits<
+    typename std::iterator_traits<ForwardIterator>::value_type>::Kernel K; 
+  return orientation_2(first, last, K());
+}
+
+} //namespace CGAL
+
+#include <CGAL/Polygon_2/Polygon_2_algorithms_impl.h>
+
+#endif // CGAL_POLYGON_2_ALGORITHMS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_convex_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_convex_decomposition_2.h
new file mode 100644
index 0000000..b0e6df3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_convex_decomposition_2.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_POLYGON_CONVEX_DECOMPOSITION_H
+#define CGAL_POLYGON_CONVEX_DECOMPOSITION_H
+
+#include <CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h>
+#include <vector>
+
+namespace CGAL {
+
+/*!
+ * \class
+ * The O(n^4) optimal strategy for decomposing a polygon into convex
+ * sub-polygons.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Optimal_convex_decomposition_2 :
+  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
+						Tag_optimal_convex_parition>
+{
+public:
+  typedef Kernel_                                  Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
+  typedef typename Kernel::Point_2                 Point_2;
+};
+
+/*!
+ * \class
+ * Hertel and Mehlhorn's O(n) approximation strategy for decomposing a
+ * polygon into convex sub-polygons.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Hertel_Mehlhorn_convex_decomposition_2 :
+  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
+						Tag_approx_convex_parition>
+{
+public:
+  typedef Kernel_                                  Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
+  typedef typename Kernel::Point_2                 Point_2;
+};
+
+/*!
+ * \class
+ * Greene's O(n log(n)) approximation strategy for decomposing a polygon into
+ * convex sub-polygons.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Greene_convex_decomposition_2 :
+  public Polygon_decomposition_strategy_adapter<Kernel_, Container_,
+						Tag_Greene_convex_parition>
+{
+public:
+  typedef Kernel_                                  Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>      Polygon_2;
+  typedef typename Kernel::Point_2                 Point_2;
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/Weights.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/Weights.h
new file mode 100644
index 0000000..a70accf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/Weights.h
@@ -0,0 +1,766 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Yin Xu, Andreas Fabri and Ilker O. Yaz
+
+#ifndef CGAL_PMP_WEIGHTS_H
+#define CGAL_PMP_WEIGHTS_H
+/// @cond CGAL_DOCUMENT_INTERNAL
+
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/Kernel/global_functions_3.h>
+#include <CGAL/property_map.h>
+
+namespace CGAL {
+namespace internal {
+
+// Returns the cotangent value of half angle v0 v1 v2
+// using formula in -[Meyer02] Discrete Differential-Geometry Operators for- page 19
+// The potential problem with previous one (Cotangent_value) is that it does not produce symmetric results
+// (i.e. for v0, v1, v2 and v2, v1, v0 returned cot weights can be slightly different)
+// This one provides stable results.
+template<class PolygonMesh>
+struct Cotangent_value_Meyer_impl
+{
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  template <class VertexPointMap>
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const VertexPointMap& ppmap)
+  {
+    typedef typename Kernel_traits<
+      typename boost::property_traits<VertexPointMap>::value_type >::Kernel::Vector_3 Vector;
+    
+    Vector a = get(ppmap, v0) - get(ppmap, v1);
+    Vector b = get(ppmap, v2) - get(ppmap, v1);
+    
+    double dot_ab = a*b;
+    // rewritten for safer fp arithmetic
+    //double dot_aa = a.squared_length();
+    //double dot_bb = b.squared_length();
+    //double divider = CGAL::sqrt( dot_aa * dot_bb - dot_ab * dot_ab );
+
+    Vector cross_ab = CGAL::cross_product(a, b);
+    double divider = CGAL::sqrt(cross_ab*cross_ab);
+
+    if(divider == 0 /*|| divider != divider*/) 
+    {
+      CGAL::collinear(get(ppmap, v0), get(ppmap, v1), get(ppmap, v2)) ? 
+        CGAL_warning(!"Infinite Cotangent value with degenerate triangle!") :
+        CGAL_warning(!"Infinite Cotangent value due to floating point arithmetic!");
+      
+
+      return dot_ab > 0 ? (std::numeric_limits<double>::max)() :
+                         -(std::numeric_limits<double>::max)();
+    }
+    
+    return dot_ab / divider;
+  }
+};
+
+// Same as above but with a different API
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type>
+class Cotangent_value_Meyer
+{
+protected:
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef VertexPointMap Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  PolygonMesh& pmesh_;
+  Point_property_map ppmap;
+
+public:
+  
+  Cotangent_value_Meyer(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : pmesh_(pmesh_)
+    , ppmap(vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return pmesh_;
+  }
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    return Cotangent_value_Meyer_impl<PolygonMesh>()(v0,v1,v2,ppmap);
+  }
+};
+
+
+// imported from skeletonization
+template<class PolygonMesh,
+         class VertexPointMap =
+          typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type>
+class Cotangent_value_Meyer_secure
+{
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef VertexPointMap Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  PolygonMesh& pmesh_;
+  Point_property_map ppmap;
+
+public:
+  
+  Cotangent_value_Meyer_secure(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : pmesh_(pmesh_)
+    , ppmap(vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return pmesh_;
+  }
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    Vector a = get(ppmap, v0) - get(ppmap, v1);
+    Vector b = get(ppmap, v2) - get(ppmap, v1);
+    
+    double dot_ab = a*b;
+    double dot_aa = a.squared_length();
+    double dot_bb = b.squared_length();
+    double lb = -0.999, ub = 0.999;
+    double cosine = dot_ab / CGAL::sqrt(dot_aa) / CGAL::sqrt(dot_bb);
+    cosine = (cosine < lb) ? lb : cosine;
+    cosine = (cosine > ub) ? ub : cosine;
+    double sine = std::sqrt(1.0 - cosine * cosine);
+    return cosine / sine;
+  }
+};
+
+// Returns the cotangent value of half angle v0 v1 v2 by clamping between [1, 89] degrees
+// as suggested by -[Friedel] Unconstrained Spherical Parameterization-
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+  , class CotangentValue = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Cotangent_value_clamped : CotangentValue
+{
+  Cotangent_value_clamped()
+  {}
+public:
+
+  Cotangent_value_clamped(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    const double cot_1 = 57.289962;
+    const double cot_89 = 0.017455;
+    double value = CotangentValue::operator()(v0, v1, v2);
+    return (std::max)(cot_89, (std::min)(value, cot_1));
+  }
+};
+
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+  , class CotangentValue = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Cotangent_value_clamped_2 : CotangentValue
+{
+  Cotangent_value_clamped_2()
+  {}
+
+public:
+
+  Cotangent_value_clamped_2(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    const double cot_5 = 5.671282;
+    const double cot_175 = -cot_5;
+    double value = CotangentValue::operator()(v0, v1, v2);
+    return (std::max)(cot_175, (std::min)(value, cot_5));
+  }
+};
+
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+  , class CotangentValue = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Cotangent_value_minimum_zero : CotangentValue
+{
+  Cotangent_value_minimum_zero()
+  {}
+public:
+  Cotangent_value_minimum_zero(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    double value = CotangentValue::operator()(v0, v1, v2);
+    return (std::max)(0.0, value);
+  }
+};
+
+template<class PolygonMesh,
+         class CotangentValue = Cotangent_value_Meyer_impl<PolygonMesh> >
+struct Cotangent_value_minimum_zero_impl : CotangentValue
+{
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  template <class VertexPointMap>
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const VertexPointMap& ppmap)
+  {
+    double value = CotangentValue::operator()(v0, v1, v2,ppmap);
+    return (std::max)(0.0, value);
+  }
+};
+
+template<class PolygonMesh
+    , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+    , class CotangentValue
+           = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Voronoi_area : CotangentValue
+{
+  //Voronoi_area()
+  //{}
+  
+public:
+  Voronoi_area(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  //Voronoi_area(PolygonMesh& pmesh_)
+  //  : CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_))
+  //{}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::in_edge_iterator in_edge_iterator;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+
+  typedef VertexPointMap Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  double operator()(vertex_descriptor v0) {
+
+    //return 1.0;
+    double voronoi_area = 0.0;
+    BOOST_FOREACH(halfedge_descriptor he,
+                  halfedges_around_target( halfedge(v0,pmesh()), pmesh()) )
+    {
+      if( is_border(he,pmesh()) ) { continue; }
+
+      CGAL_assertion(CGAL::is_triangle_mesh(pmesh()));
+      CGAL_assertion( v0 == target(he, pmesh()) );
+      vertex_descriptor v1 = source(he, pmesh());
+      vertex_descriptor v_op = target(next(he, pmesh()), pmesh());
+
+      const Point& v0_p = get(this->ppmap, v0);
+      const Point& v1_p = get(this->ppmap, v1);
+      const Point& v_op_p = get(this->ppmap, v_op);
+
+      // (?) check if there is a better way to predicate triangle is obtuse or not
+      CGAL::Angle angle0 = CGAL::angle(v1_p, v0_p, v_op_p);
+      CGAL::Angle angle1 = CGAL::angle(v_op_p, v1_p, v0_p);
+      CGAL::Angle angle_op = CGAL::angle(v0_p, v_op_p, v1_p);
+
+      bool obtuse = (angle0 == CGAL::OBTUSE) || (angle1 == CGAL::OBTUSE) || (angle_op == CGAL::OBTUSE);
+
+      if(!obtuse) {
+        double cot_v1 = CotangentValue::operator()(v_op, v1, v0);
+        double cot_v_op = CotangentValue::operator()(v0, v_op, v1);
+
+        double term1 = cot_v1   * (v_op_p - v0_p).squared_length();
+        double term2 = cot_v_op * (v1_p  - v0_p).squared_length();
+        voronoi_area += (1.0 / 8.0) * (term1 + term2);
+      }
+      else {
+        double area_t = CGAL::sqrt(squared_area(v0_p, v1_p, v_op_p));
+        if(angle0 == CGAL::OBTUSE) {
+          voronoi_area += area_t / 2.0;
+        }
+        else {
+          voronoi_area += area_t / 4.0;
+        }
+      }
+    }
+    CGAL_warning(voronoi_area != 0 && "Zero voronoi area!");
+    return voronoi_area;
+  }
+};
+// Returns the cotangent value of half angle v0 v1 v2 by dividing the triangle area
+// as suggested by -[Mullen08] Spectral Conformal Parameterization-
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+  , class CotangentValue = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Cotangent_value_area_weighted : CotangentValue
+{
+  Cotangent_value_area_weighted()
+  {}
+
+public:
+
+  Cotangent_value_area_weighted(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    return CotangentValue::operator()(v0, v1, v2)
+      / CGAL::sqrt(squared_area(v0->point(), v1->point(), v2->point()));
+  }
+};
+/////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////// Edge Weight Calculators ///////////////////////////////////
+// Cotangent weight calculator 
+// Cotangent_value:               as suggested by -[Sorkine07] ARAP Surface Modeling-
+// Cotangent_value_area_weighted: as suggested by -[Mullen08] Spectral Conformal Parameterization-
+template< class PolygonMesh,
+          class CotangentValue = Cotangent_value_minimum_zero_impl<PolygonMesh> >
+struct Cotangent_weight_impl : CotangentValue
+{
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  // Returns the cotangent weight of specified halfedge_descriptor
+  // Edge orientation is trivial
+  template<class VertexPointMap>
+  double operator()(halfedge_descriptor he, PolygonMesh& pmesh, const VertexPointMap& ppmap)
+  {
+    vertex_descriptor v0 = target(he, pmesh);
+    vertex_descriptor v1 = source(he, pmesh);
+     // Only one triangle for border edges
+    if (is_border_edge(he, pmesh))
+     {
+       
+       halfedge_descriptor he_cw = opposite( next(he, pmesh) , pmesh );
+       vertex_descriptor v2 = source(he_cw, pmesh);
+       if (is_border_edge(he_cw, pmesh) )
+       {
+         halfedge_descriptor he_ccw = prev( opposite(he, pmesh) , pmesh );
+         v2 = source(he_ccw, pmesh);
+       }
+       return ( CotangentValue::operator()(v0, v2, v1, ppmap)/2.0 );
+     }
+     else
+     {
+       halfedge_descriptor he_cw = opposite( next(he, pmesh) , pmesh );
+       vertex_descriptor v2 = source(he_cw, pmesh);     
+       halfedge_descriptor he_ccw = prev( opposite(he, pmesh) , pmesh );
+       vertex_descriptor v3 = source(he_ccw, pmesh);
+
+        return ( CotangentValue::operator()(v0, v2, v1, ppmap)/2.0 +
+                 CotangentValue::operator()(v0, v3, v1, ppmap)/2.0 );
+     }
+  }
+};
+
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, vertex_point_t>::type
+  , class CotangentValue
+           = Cotangent_value_minimum_zero<PolygonMesh, VertexPointMap> >
+class Cotangent_weight : CotangentValue
+{
+  Cotangent_weight()
+  {}
+
+public:
+  Cotangent_weight(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  Cotangent_weight(PolygonMesh& pmesh_)
+    : CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_))
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  typedef typename boost::property_map<PolygonMesh,vertex_point_t>::type Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  // Returns the cotangent weight of specified halfedge_descriptor
+  // Edge orientation is trivial
+  double operator()(halfedge_descriptor he)
+  {
+    vertex_descriptor v0 = target(he, pmesh());
+    vertex_descriptor v1 = source(he, pmesh());
+     // Only one triangle for border edges
+    if (is_border_edge(he, pmesh()))
+     {
+       
+       halfedge_descriptor he_cw = opposite( next(he, pmesh()) , pmesh() );
+       vertex_descriptor v2 = source(he_cw, pmesh());
+       if (is_border_edge(he_cw, pmesh()) )
+       {
+         halfedge_descriptor he_ccw = prev( opposite(he, pmesh()) , pmesh() );
+         v2 = source(he_ccw, pmesh());
+       }
+       return ( CotangentValue::operator()(v0, v2, v1)/2.0 );
+     }
+     else
+     {
+       halfedge_descriptor he_cw = opposite( next(he, pmesh()) , pmesh() );
+       vertex_descriptor v2 = source(he_cw, pmesh());     
+       halfedge_descriptor he_ccw = prev( opposite(he, pmesh()) , pmesh() );
+       vertex_descriptor v3 = source(he_ccw, pmesh());
+
+        return ( CotangentValue::operator()(v0, v2, v1)/2.0 + CotangentValue::operator()(v0, v3, v1)/2.0 );
+     }
+  }
+};
+
+// Single cotangent from -[Chao10] Simple Geometric Model for Elastic Deformation
+template<class PolygonMesh,
+         class CotangentValue = Cotangent_value_Meyer_impl<PolygonMesh> >
+struct Single_cotangent_weight_impl : CotangentValue
+{
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  // Returns the cotangent of the opposite angle of the edge
+  // 0 for border edges (which does not have an opposite angle)
+  template <class VertexPointMap>
+  double operator()(halfedge_descriptor he, PolygonMesh& pmesh, const VertexPointMap& ppmap)
+  {
+    if(is_border(he, pmesh)) { return 0.0;}
+     
+    vertex_descriptor v0 = target(he, pmesh);
+    vertex_descriptor v1 = source(he, pmesh);
+
+    vertex_descriptor v_op = target(next(he, pmesh), pmesh);
+     return CotangentValue::operator()(v0, v_op, v1, ppmap);
+  }
+};
+
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type
+  , class CotangentValue = Cotangent_value_Meyer<PolygonMesh, VertexPointMap> >
+class Single_cotangent_weight : CotangentValue
+{
+  Single_cotangent_weight()
+  {}
+public:
+  Single_cotangent_weight(PolygonMesh& pmesh_, VertexPointMap vpmap_)
+    : CotangentValue(pmesh_, vpmap_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return CotangentValue::pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  typedef typename boost::property_map<PolygonMesh,vertex_point_t>::type Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  // Returns the cotangent of the opposite angle of the edge
+  // 0 for border edges (which does not have an opposite angle)
+  double operator()(halfedge_descriptor he)
+  {
+    if(is_border(he, pmesh())) { return 0.0;}
+     
+    vertex_descriptor v0 = target(he, pmesh());
+    vertex_descriptor v1 = source(he, pmesh());
+
+    vertex_descriptor v_op = target(next(he, pmesh()), pmesh());
+     return CotangentValue::operator()(v0, v_op, v1);
+  }
+};
+
+// Mean value calculator described in -[Floater04] Mean Value Coordinates-
+template<class PolygonMesh
+       , class VertexPointMap = typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type>
+class Mean_value_weight
+{
+  //Mean_value_weight()
+  //{}
+
+  PolygonMesh& pmesh_;
+  VertexPointMap vpmap_;
+
+public:
+  Mean_value_weight(PolygonMesh& pmesh_, VertexPointMap vpmap)
+    : pmesh_(pmesh_), vpmap_(vpmap)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return pmesh_;
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor  halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor    vertex_descriptor;
+
+  typedef VertexPointMap Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  // Returns the mean-value coordinate of specified halfedge_descriptor
+  // Returns different value for different edge orientation (which is a normal behaivour according to formula)
+  double operator()(halfedge_descriptor he)
+  {
+    vertex_descriptor v0 = target(he, pmesh());
+    vertex_descriptor v1 = source(he, pmesh());
+    Vector vec = v0->point() - v1->point();
+    double norm = CGAL::sqrt( vec.squared_length() );
+
+    // Only one triangle for border edges
+    if ( is_border_edge(he, pmesh()) )
+    {
+      halfedge_descriptor he_cw = opposite( next(he, pmesh()) , pmesh() );
+      vertex_descriptor v2 = source(he_cw, pmesh());
+      if ( is_border_edge(he_cw, pmesh()) )
+      {
+        halfedge_descriptor he_ccw = prev( opposite(he, pmesh()) , pmesh() );
+        v2 = source(he_ccw, pmesh());
+      }
+
+      return ( half_tan_value_2(v1, v0, v2)/norm);
+    }
+    else
+    {
+      halfedge_descriptor he_cw = opposite( next(he, pmesh()) , pmesh() );
+      vertex_descriptor v2 = source(he_cw, pmesh());     
+      halfedge_descriptor he_ccw = prev( opposite(he, pmesh()) , pmesh() );
+      vertex_descriptor v3 = source(he_ccw, pmesh());
+
+      return ( half_tan_value_2(v1, v0, v2)/norm + half_tan_value_2(v1, v0, v3)/norm);
+    }
+  }
+
+private:
+  // Returns the tangent value of half angle v0_v1_v2/2
+  double half_tan_value(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    Vector vec0 = v1->point() - v2->point();
+    Vector vec1 = v2->point() - v0->point();
+    Vector vec2 = v0->point() - v1->point();
+    double e0_square = vec0.squared_length();
+    double e1_square = vec1.squared_length();
+    double e2_square = vec2.squared_length();
+    double e0 = CGAL::sqrt(e0_square);
+    double e2 = CGAL::sqrt(e2_square);
+    double cos_angle = ( e0_square + e2_square - e1_square ) / 2.0 / e0 / e2;
+    cos_angle = (std::max)(-1.0, (std::min)(1.0, cos_angle)); // clamp into [-1, 1]
+    double angle = acos(cos_angle);
+    
+    return ( tan(angle/2.0) );
+  }
+
+  // My deviation built on Meyer_02
+  double half_tan_value_2(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2)
+  {
+    Vector a = v0->point() - v1->point();
+    Vector b = v2->point() - v1->point();
+    double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+    double dot_aa = a.squared_length();
+    double dot_bb = b.squared_length();
+    double dot_aa_bb = dot_aa * dot_bb;
+
+    double cos_rep = dot_ab;
+    double sin_rep = CGAL::sqrt(dot_aa_bb  - dot_ab * dot_ab);
+    double normalizer = CGAL::sqrt(dot_aa_bb); // |a|*|b|
+
+    return (normalizer - cos_rep) / sin_rep; // formula from [Floater04] page 4
+                                             // tan(Q/2) = (1 - cos(Q)) / sin(Q)
+  }
+};
+
+template< class PolygonMesh, 
+          class PrimaryWeight = Cotangent_weight<PolygonMesh>,
+          class SecondaryWeight = Mean_value_weight<PolygonMesh> >
+class Hybrid_weight : public PrimaryWeight, SecondaryWeight
+{
+  PrimaryWeight primary;
+  SecondaryWeight secondary;
+
+  Hybrid_weight()
+  {}
+
+public:
+  Hybrid_weight(PolygonMesh& pmesh_)
+    : primary(pmesh_), secondary(pmesh_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return primary.pmesh();
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+
+  double operator()(halfedge_descriptor he)
+  {
+    double weight = primary(he);
+    //if(weight < 0) { std::cout << "Negative weight" << std::endl; }
+    return (weight >= 0) ? weight : secondary(he);
+  }
+};
+
+// Trivial uniform weights (created for test purposes)
+template<class PolygonMesh>
+class Uniform_weight
+{
+public:
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+
+  double operator()(halfedge_descriptor /*e*/)
+  { return 1.0; }
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                              FAIRING                                   //
+template<class PolygonMesh>
+class Scale_dependent_weight_fairing
+{
+  PolygonMesh& pmesh_;
+public:
+  Scale_dependent_weight_fairing(PolygonMesh& pmesh_)
+    : pmesh_(pmesh_)
+  {}
+
+  PolygonMesh& pmesh()
+  {
+    return pmesh_;
+  }
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  typedef typename boost::property_map<PolygonMesh,vertex_point_t>::type Point_property_map;
+  typedef typename boost::property_traits<Point_property_map>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel::Vector_3  Vector;
+
+  double w_i(vertex_descriptor /*v_i*/) { return 1.0; }
+
+  double w_ij(halfedge_descriptor he)
+  {
+    Vector v = target(he, pmesh())->point() - source(he, pmesh())->point();
+    double divider = CGAL::sqrt(v.squared_length());
+    if(divider == 0.0) {
+      CGAL_warning(!"Scale dependent weight - zero length edge.");
+      return (std::numeric_limits<double>::max)();
+    }
+    return 1.0 / divider;
+  }
+};
+
+template<class PolygonMesh
+  , class VertexPointMap = typename boost::property_map<PolygonMesh, vertex_point_t>::type
+>
+class Cotangent_weight_with_voronoi_area_fairing
+{
+  typedef PolygonMesh PM;
+  typedef VertexPointMap VPMap;
+  Voronoi_area<PM, VPMap> voronoi_functor;
+  Cotangent_weight<PM, VPMap, Cotangent_value_Meyer<PM, VPMap> > cotangent_functor;
+
+public:
+  Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_)
+    : voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_))
+    , cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_))
+  {}
+
+  Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_, VPMap vpmap_)
+    : voronoi_functor(pmesh_, vpmap_)
+    , cotangent_functor(pmesh_, vpmap_)
+  {}
+
+  PM& pmesh()
+  {
+    return voronoi_functor.pmesh();
+  }
+
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+
+  double w_i(vertex_descriptor v_i)
+  {
+    return 0.5 / voronoi_functor(v_i);
+  }
+
+  double w_ij(halfedge_descriptor he) {
+
+    return cotangent_functor(he) * 2.0;
+  }
+};
+
+template<class PolygonMesh>
+class Uniform_weight_fairing
+{
+public:
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+
+  Uniform_weight_fairing(PolygonMesh&)
+  {}
+
+  double w_ij(halfedge_descriptor /*e*/) { return 1.0; }
+
+  double w_i(vertex_descriptor /*v_i*/) { return 1.0; }
+};
+////////////////////////////////////////////////////////////////////////////
+
+}//namespace internal
+
+
+}//namespace CGAL
+/// @endcond
+#endif //CGAL_PMP_WEIGHTS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/bbox.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/bbox.h
new file mode 100644
index 0000000..db03324
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/bbox.h
@@ -0,0 +1,88 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_BOUNDING_BOX_H
+#define CGAL_POLYGON_MESH_PROCESSING_BOUNDING_BOX_H
+
+#include <CGAL/Bbox_3.h>
+
+#include <boost/graph/graph_traits.hpp>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <boost/foreach.hpp>
+
+namespace CGAL {
+
+  namespace Polygon_mesh_processing {
+
+    /*!
+    * \ingroup PkgPolygonMeshProcessing
+    *  computes a bounding box of a polygon mesh.
+    *
+    * @tparam PolygonMesh a model of `HalfedgeListGraph`
+    *   that has an internal property map for `CGAL::vertex_point_t`
+    * @tparam NamedParameters a sequence of \ref namedparameters
+    *
+    * @param pmesh a polygon mesh
+    * @param np optional sequence of \ref namedparameters among the ones listed below
+    *
+    * \cgalNamedParamsBegin
+    *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+    * \cgalNamedParamsEnd
+    *
+    * @return a bounding box of `pmesh`
+    */
+    template<typename PolygonMesh, typename NamedParameters>
+    CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh,
+                        const NamedParameters& np)
+    {
+      using boost::choose_const_pmap;
+      using boost::get_param;
+      typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type
+        vpm = choose_const_pmap(get_param(np, CGAL::vertex_point),
+                                pmesh,
+                                CGAL::vertex_point);
+
+      typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+
+      halfedge_descriptor h0 = *(halfedges(pmesh).first);
+      CGAL::Bbox_3 bb = get(vpm, target(h0, pmesh)).bbox();
+      BOOST_FOREACH(halfedge_descriptor h, halfedges(pmesh))
+      {
+        bb += get(vpm, target(h, pmesh)).bbox();
+      }
+      return bb;
+    }
+
+    template<typename PolygonMesh>
+    CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh)
+    {
+      return bbox_3(pmesh,
+        CGAL::Polygon_mesh_processing::parameters::all_default());
+    }
+
+
+  }
+}
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_BOUNDING_BOX_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/border.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/border.h
new file mode 100644
index 0000000..f7df4b4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/border.h
@@ -0,0 +1,199 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_GET_BORDER_H
+#define CGAL_POLYGON_MESH_PROCESSING_GET_BORDER_H
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <set>
+
+namespace CGAL{
+namespace Polygon_mesh_processing {
+
+  namespace internal
+  {
+    template<typename PM
+           , typename FaceRange
+           , typename HalfedgeOutputIterator>
+    HalfedgeOutputIterator border_halfedges_impl(const FaceRange& faces
+                                               , HalfedgeOutputIterator out
+                                               , const PM& pmesh)
+    {
+      typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+      typedef typename boost::graph_traits<PM>::face_descriptor     face_descriptor;
+
+      //collect halfedges that appear only once
+      // the bool is true if the halfedge stored is the one of the face,
+      // false if it is its opposite
+      std::map<halfedge_descriptor, bool> border;
+      BOOST_FOREACH(face_descriptor f, faces)
+      {
+        BOOST_FOREACH(halfedge_descriptor h,
+          halfedges_around_face(halfedge(f, pmesh), pmesh))
+        {
+          //halfedge_descriptor is model of `LessThanComparable`
+          bool from_face = (h < opposite(h, pmesh));
+          halfedge_descriptor he = from_face
+            ? h
+            : opposite(h, pmesh);
+          if (border.find(he) != border.end())
+            border.erase(he); //even number of appearances
+          else
+            border.insert(std::make_pair(he, from_face));//odd number of appearances
+        }
+      }
+      //copy them in out
+      typedef typename std::map<halfedge_descriptor, bool>::value_type HD_bool;
+      BOOST_FOREACH(const HD_bool& hd, border)
+      {
+        if (hd.second)
+          *out++ = hd.first;
+        else
+          *out++ = opposite(hd.first, pmesh);
+      }
+      return out;
+    }
+
+    template<typename PM
+           , typename FaceRange
+           , typename FaceIndexMap
+           , typename HalfedgeOutputIterator>
+    HalfedgeOutputIterator border_halfedges_impl(const FaceRange& faces
+                                               , const FaceIndexMap& fmap
+                                               , HalfedgeOutputIterator out
+                                               , const PM& pmesh)
+    {
+      typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+      typedef typename boost::graph_traits<PM>::face_descriptor     face_descriptor;
+
+      std::vector<bool> present(num_faces(pmesh), false);
+      BOOST_FOREACH(face_descriptor fd, faces)
+        present[get(fmap, fd)] = true;
+
+      BOOST_FOREACH(face_descriptor fd, faces)
+        BOOST_FOREACH(halfedge_descriptor hd,
+                      halfedges_around_face(halfedge(fd, pmesh), pmesh))
+       {
+         halfedge_descriptor opp=opposite(hd, pmesh);
+         if (is_border(opp, pmesh) || !present[get(fmap,face(opp,pmesh))])
+           *out++ = opp;
+       }
+
+      return out;
+    }
+
+    struct Dummy_PM
+    {
+    public:
+      typedef bool vertex_property_type;
+    };
+
+  }//end namespace internal
+
+  /*!
+  \ingroup PkgPolygonMeshProcessing
+  * collects the border of a surface patch
+  * defined as a face range. The border is "seen from inside" the patch,
+  * i.e. the collected halfedges are
+  * the ones that belong to the input faces.
+  *
+  * @tparam PolygonMesh model of `HalfedgeGraph`
+  * @tparam FaceRange range of
+       `boost::graph_traits<PolygonMesh>::%face_descriptor`, model of `Range`.
+        Its iterator type is `InputIterator`.
+  * @tparam HalfedgeOutputIterator model of `OutputIterator`
+     holding `boost::graph_traits<PolygonMesh>::%halfedge_descriptor`
+     for patch border
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param pmesh the polygon mesh to which `faces` belong
+  * @param faces the range of faces defining the patch
+  *              around which the border is collected
+  * @param out the output iterator that collects halfedges that form the border
+  *            of `faces`, seen from inside the surface patch
+  * @param np optional sequence of \ref namedparameters among
+     the ones listed below
+
+  * \cgalNamedParamsBegin
+      \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+    \cgalNamedParamsEnd
+  *
+  * @returns `out`
+  */
+  template<typename PolygonMesh
+         , typename FaceRange
+         , typename HalfedgeOutputIterator
+         , typename NamedParameters>
+  HalfedgeOutputIterator border_halfedges(const FaceRange& faces
+                                  , const PolygonMesh& pmesh
+                                  , HalfedgeOutputIterator out
+                                  , const NamedParameters& np)
+  {
+    typedef PolygonMesh PM;
+    typedef typename GetFaceIndexMap<PM, NamedParameters>::type           FIMap;
+    typedef typename boost::property_map<typename internal::Dummy_PM,
+                                              CGAL::face_index_t>::type   Unset_FIMap;
+
+    if (boost::is_same<FIMap, Unset_FIMap>::value)
+    {
+      //face index map is not given in named parameters, nor as an internal property map
+      return internal::border_halfedges_impl(faces, out, pmesh);
+    }
+    //face index map given as a named parameter, or as an internal property map
+    FIMap fim = choose_param(get_param(np, face_index),
+                             get(CGAL::face_index, pmesh));
+    return internal::border_halfedges_impl(faces, fim, out, pmesh);
+  }
+
+  template<typename PolygonMesh
+         , typename HalfedgeOutputIterator>
+  HalfedgeOutputIterator border_halfedges(const PolygonMesh& pmesh
+                                        , HalfedgeOutputIterator out)
+  {
+    typedef PolygonMesh PM;
+    typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(pmesh))
+      if (is_border(hd, pmesh))
+        *out++ = hd;
+    return out;
+  }
+
+  template<typename PolygonMesh
+         , typename FaceRange
+         , typename HalfedgeOutputIterator>
+  HalfedgeOutputIterator border_halfedges(const FaceRange& faces
+                                        , const PolygonMesh& pmesh
+                                        , HalfedgeOutputIterator out)
+  {
+    return border_halfedges(faces, pmesh, out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+}
+} // end of namespace CGAL::Polygon_mesh_processing
+
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_GET_BORDER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/compute_normal.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/compute_normal.h
new file mode 100644
index 0000000..8515307
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/compute_normal.h
@@ -0,0 +1,371 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_COMPUTE_NORMAL_H
+#define CGAL_POLYGON_MESH_PROCESSING_COMPUTE_NORMAL_H
+
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/properties.h>
+#include <boost/graph/graph_traits.hpp>
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/global_functions_3.h>
+#include <CGAL/Kernel_traits.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <boost/type_traits.hpp>
+
+namespace CGAL{
+
+namespace Polygon_mesh_processing{
+
+namespace internal {
+
+  template<typename Point>
+  typename CGAL::Kernel_traits<Point>::Kernel::Vector_3
+  triangle_normal(const Point& p0, const Point& p1, const Point& p2)
+  {
+    return CGAL::cross_product(p2 - p1, p0 - p1);
+  }
+}
+
+template<typename Point, typename PM, typename VertexPointMap, typename Vector>
+void sum_normals(const PM& pmesh,
+                 typename boost::graph_traits<PM>::face_descriptor f,
+                 VertexPointMap vpmap,
+                 Vector& sum)
+{
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor he = halfedge(f, pmesh);
+  halfedge_descriptor end = he;
+  bool f_is_triangle = (he == next(next(next(he, pmesh), pmesh), pmesh));
+  /*it is useless to compute the normal 3 times on a triangle*/
+  do
+  {
+    const Point& prv = get(vpmap, target(prev(he, pmesh), pmesh));
+    const Point& curr = get(vpmap, target(he, pmesh));
+    const Point& nxt = get(vpmap, target(next(he, pmesh), pmesh));
+    Vector n = internal::triangle_normal(prv, curr, nxt);
+    sum = sum + n;
+
+    he = next(he, pmesh);
+  } while (he != end && !f_is_triangle);
+}
+
+
+/**
+* \ingroup PMP_normal_grp
+* computes the outward unit vector normal to face `f`.
+* @tparam PolygonMesh a model of `FaceGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param f the face on which the normal is computed
+* @param pmesh the polygon mesh containing `f`
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+* @return the computed normal. The return type is a 3D vector type. It is
+* either deduced from the `geom_traits` \ref namedparameters if provided,
+* or from the geometric traits class deduced from the point property map
+* of `pmesh`.
+*/
+template <typename PolygonMesh, typename NamedParameters>
+#ifdef DOXYGEN_RUNNING
+Vector_3
+#else
+typename GetGeomTraits<PolygonMesh, NamedParameters>::type::Vector_3
+#endif
+compute_face_normal(typename boost::graph_traits<PolygonMesh>::face_descriptor f
+                    , const PolygonMesh& pmesh
+                    , const NamedParameters& np)
+{
+  typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Kernel;
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  Vector normal = CGAL::NULL_VECTOR;
+  sum_normals<Point>(pmesh, f
+    , choose_const_pmap(get_param(np, CGAL::vertex_point), pmesh, CGAL::vertex_point)
+    , normal);
+
+  if (normal == CGAL::NULL_VECTOR)
+    return normal;
+  else
+  return normal / FT( std::sqrt( to_double(normal * normal) ) );
+}
+
+/**
+* \ingroup PMP_normal_grp
+* computes the outward unit vector normal for all faces of the polygon mesh.
+* @tparam PolygonMesh a model of `FaceGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+* @tparam FaceNormalMap a model of `WritablePropertyMap` with
+    `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and
+    `Kernel::Vector_3` as value type.
+*
+* @param pmesh the polygon mesh
+* @param fnm the property map in which the normals are written
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+          , typename FaceNormalMap
+          , typename NamedParameters>
+void
+compute_face_normals(const PolygonMesh& pmesh
+                   , FaceNormalMap fnm
+                   , const NamedParameters& np)
+{
+  typedef typename GetGeomTraits<PolygonMesh,NamedParameters>::type Kernel;
+
+  typename boost::graph_traits<PolygonMesh>::face_descriptor f;
+  BOOST_FOREACH(f, faces(pmesh)){
+    typename Kernel::Vector_3 vec = compute_face_normal(f, pmesh, np);
+    put(fnm, f, vec);
+  }
+}
+
+/**
+* \ingroup PMP_normal_grp
+* computes the unit normal at vertex `v` as the average of the normals of incident faces.
+* @tparam PolygonMesh a model of `FaceGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+*
+* @param v the vertex at which the normal is computed
+* @param pmesh the polygon mesh containing `v`
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+* @return the computed normal. The return type is a 3D vector type. It is
+* either deduced from the `geom_traits` \ref namedparameters if provided,
+* or the geometric traits class deduced from the point property map
+* of `pmesh`.
+*/
+template<typename PolygonMesh, typename NamedParameters>
+#ifdef DOXYGEN_RUNNING
+Vector_3
+#else
+typename GetGeomTraits<PolygonMesh, NamedParameters>::type::Vector_3
+#endif
+compute_vertex_normal(typename boost::graph_traits<PolygonMesh>::vertex_descriptor v,
+                      const PolygonMesh& pmesh,
+                      const NamedParameters& np
+                      )
+{
+  typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Kernel;
+  typedef typename Kernel::FT FT;
+
+  typedef typename GetFaceNormalMap<PolygonMesh, NamedParameters>::NoMap DefaultMap;
+
+  typedef typename boost::lookup_named_param_def <
+    CGAL::face_normal_t,
+    NamedParameters,
+    DefaultMap> ::type FaceNormalMap;
+
+  FaceNormalMap fnmap
+    = boost::choose_param(get_param(np, face_normal), DefaultMap());
+
+  bool fnmap_valid
+    = !boost::is_same<FaceNormalMap,
+                      DefaultMap
+                     >::value;
+
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+
+  Vector normal = CGAL::NULL_VECTOR;
+  halfedge_descriptor he = halfedge(v, pmesh);
+  // handle isolated vertices
+  if (he==boost::graph_traits<PolygonMesh>::null_halfedge()) return normal;
+  halfedge_descriptor end = he;
+  do
+    {
+    if (!is_border(he, pmesh))
+    {
+      Vector n = fnmap_valid ? get(fnmap, face(he, pmesh))
+                             : compute_face_normal(face(he, pmesh), pmesh, np);
+      normal = normal + n;
+    }
+    he = opposite(next(he, pmesh), pmesh);
+  } while (he != end);
+
+  if (normal == CGAL::NULL_VECTOR)
+    return normal;
+  else
+  return normal / FT( std::sqrt( to_double(normal * normal)  ) );
+}
+
+/**
+* \ingroup PMP_normal_grp
+* computes the outward unit vector normal for all vertices of the polygon mesh.
+* @tparam PolygonMesh a model of `FaceListGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+* @tparam VertexNormalMap a model of `WritablePropertyMap` with
+    `boost::graph_traits<PolygonMesh>::%vertex_descriptor` as key type and
+    the return type of `compute_vertex_normal()` as value type.
+*
+* @param pmesh the polygon mesh
+* @param vnm the property map in which the normals are written
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+          , typename VertexNormalMap
+          , typename NamedParameters
+          >
+void
+compute_vertex_normals(const PolygonMesh& pmesh
+                      , VertexNormalMap vnm
+                      , const NamedParameters& np
+                      )
+{
+  typedef typename GetGeomTraits<PolygonMesh,NamedParameters>::type Kernel;
+
+  typename boost::graph_traits<PolygonMesh>::vertex_descriptor v;
+  BOOST_FOREACH(v, vertices(pmesh)){
+    typename Kernel::Vector_3 vec = compute_vertex_normal(v, pmesh, np);
+    put(vnm, v, vec);
+  }
+}
+
+/**
+* \ingroup PMP_normal_grp
+* computes the outward unit vector normal for all vertices and faces of the polygon mesh.
+* @tparam PolygonMesh a model of `FaceListGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+* @tparam VertexNormalMap a model of `WritablePropertyMap` with
+    `boost::graph_traits<PolygonMesh>::%vertex_descriptor` as key type and
+    `Kernel::Vector_3` as value type.
+* @tparam FaceNormalMap a model of `ReadWritePropertyMap` with
+    `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and
+    `Kernel::Vector_3` as value type.
+*
+* @param pmesh the polygon mesh
+* @param vnm the property map in which the vertex normals are written
+* @param fnm the property map in which the face normals are written
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+          , typename VertexNormalMap
+          , typename FaceNormalMap
+          , typename NamedParameters
+          >
+void
+compute_normals(const PolygonMesh& pmesh
+                , VertexNormalMap vnm
+                , FaceNormalMap fnm
+                , const NamedParameters& np
+                )
+{
+  compute_face_normals(pmesh, fnm, np);
+  compute_vertex_normals(pmesh, vnm, np.face_normal_map(fnm));
+}
+
+///\cond SKIP_IN_MANUAL
+// compute_vertex_normal overloads
+template <typename PolygonMesh>
+typename CGAL::Kernel_traits< typename property_map_value<PolygonMesh, CGAL::vertex_point_t>::type>::Kernel::Vector_3
+compute_vertex_normal(
+  typename boost::graph_traits<PolygonMesh>::vertex_descriptor v,
+  const PolygonMesh& pmesh)
+{
+  return compute_vertex_normal(v, pmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+// compute_vertex_normals overloads
+template <typename PolygonMesh, typename VertexNormalMap>
+void
+compute_vertex_normals(const PolygonMesh& pmesh,
+                      VertexNormalMap vnm)
+{
+  compute_vertex_normals(pmesh, vnm,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+// compute_face_normal overload
+template <typename PolygonMesh>
+typename CGAL::Kernel_traits < typename property_map_value<PolygonMesh, CGAL::vertex_point_t>::type>::Kernel::Vector_3
+compute_face_normal(
+  typename boost::graph_traits<PolygonMesh>::face_descriptor f,
+  const PolygonMesh& pmesh)
+{
+  return compute_face_normal(f, pmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+// compute_face_normals overload
+template <typename PolygonMesh, typename FaceNormalMap>
+void
+compute_face_normals(const PolygonMesh& pmesh, FaceNormalMap fnm)
+{
+  compute_face_normals(pmesh, fnm,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+// compute_normals overload
+template <typename PolygonMesh, typename VertexNormalMap, typename FaceNormalMap>
+void
+compute_normals(const PolygonMesh& pmesh,
+                VertexNormalMap vnm,
+                FaceNormalMap fnm)
+{
+  compute_normals(pmesh, vnm, fnm,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/// \endcond
+
+}
+
+} // end of namespace CGAL::Polygon_mesh_processing
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_COMPUTE_NORMAL_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/connected_components.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/connected_components.h
new file mode 100644
index 0000000..686911c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/connected_components.h
@@ -0,0 +1,1116 @@
+// Copyright (c) 2011, 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot and Andreas Fabri
+
+#ifndef CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
+#define CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
+
+#include<set>
+#include<vector>
+
+#include <CGAL/boost/graph/named_function_params.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/connected_components.hpp>
+#include <boost/property_map/vector_property_map.hpp>
+
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/helpers.h>
+
+#include <CGAL/assertions.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Union_find.h>
+#include <CGAL/tuple.h>
+#include <CGAL/boost/graph/Dual.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/internal/corefinement/Polyhedron_constness_types.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#ifdef DOXYGEN_RUNNING
+#define CGAL_PMP_NP_TEMPLATE_PARAMETERS NamedParameters
+#define CGAL_PMP_NP_CLASS NamedParameters
+#endif
+
+
+namespace CGAL {
+ namespace internal{
+   namespace corefinement{
+
+template <typename Polyhedron>
+struct Compare_handle_ptr{
+  typedef typename Polyhedron::Facet_const_handle  Facet_const_handle;
+  typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
+  
+  bool operator()(Facet_const_handle f1,Facet_const_handle f2) const {
+    return &(*f1) < &(*f2);
+  }
+
+  bool operator()(Vertex_const_handle v1,Vertex_const_handle v2) const {
+    return &(*v1) < &(*v2);
+  }
+};
+
+struct Dummy_true{
+  template <typename T>
+  bool operator()(T) const  {return true;}
+};
+
+template <typename Polyhedron,typename HDS=typename Polyhedron::HalfedgeDS>
+class Build_polyhedron_subset : public ::CGAL::Modifier_base<HDS> {
+  typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
+  typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
+  typedef typename Polyhedron::Halfedge_const_handle Halfedge_const_handle;       
+  
+  typedef typename HDS::Vertex::Point Point;
+  std::list<Vertex_const_handle> points;
+  std::list< std::vector<unsigned int> > facets;
+    
+  template <typename Facet_iterator>
+  typename Polyhedron::Halfedge_const_handle get_facet_halfedge(Facet_iterator facet_it) const
+  {
+    return (*facet_it)->halfedge();
+  }
+
+  typename Polyhedron::Halfedge_const_handle get_facet_halfedge(typename Polyhedron::Facet_const_handle facet) const
+  {
+    return facet->halfedge();
+  }
+  
+public:
+  template <typename Facets_const_iterator>
+  Build_polyhedron_subset(const Polyhedron&,Facets_const_iterator begin,Facets_const_iterator end) 
+  {
+    typedef std::map<Vertex_const_handle,unsigned int,Compare_handle_ptr<Polyhedron> > Vertices;
+    Vertices vertices;
+    unsigned int index=0;
+    //get vertices and get face description relatively to the restricted set of vertices
+    for (Facets_const_iterator it=begin;it!=end;++it)
+    {
+      Halfedge_const_handle start=get_facet_halfedge(it);
+      Halfedge_const_handle curr=start;
+      facets.push_back(std::vector<unsigned int>());
+      std::vector<unsigned int>& indices = facets.back();
+      do{
+        bool is_new_vertex;
+        typename Vertices::iterator it_vertex;
+        ::CGAL::cpp11::tie(it_vertex,is_new_vertex)=vertices.insert(std::make_pair(curr->vertex(),index));
+        if (is_new_vertex) {
+          ++index;
+          points.push_back(curr->vertex());
+        }
+        indices.push_back(it_vertex->second);
+        curr=curr->next();
+      }while(curr!=start);
+    }
+  }
+  
+  void operator()( HDS& hds) {
+    ::CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+    B.begin_surface( points.size(), facets.size() );
+    for (typename std::list<Vertex_const_handle>::iterator it=points.begin();it!=points.end();++it)
+      B.add_vertex((*it)->point());
+    for (typename std::list< std::vector<unsigned int> >::iterator
+         it=facets.begin();it!=facets.end();++it)
+    {
+      B.begin_facet();
+      for (std::vector<unsigned int>::iterator it_i=it->begin();it_i!=it->end();++it_i)
+        B.add_vertex_to_facet(*it_i);
+      B.end_facet();
+    }
+    B.end_surface();
+  }
+};
+
+
+
+template <typename Polyhedron,typename Adjacency_criterium,typename Face_to_UF_handle_map,typename Result>
+void extract_connected_components(
+  Polyhedron& P,
+  const Adjacency_criterium& adjacent,
+  CGAL::Union_find<typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_handle>& uf,
+  Face_to_UF_handle_map& map_f2h,
+  Result&  result
+  )
+{
+  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_handle Facet_handle;
+  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Facet_iterator Facet_iterator;
+  typedef typename internal_IOP::Polyhedron_types_with_mpl<Polyhedron>::Halfedge_handle Halfedge_handle;
+  typedef ::CGAL::Union_find<Facet_handle> UF;
+  typedef typename UF::handle UF_handle;
+  typedef typename UF::iterator UF_iterator;
+
+//init union-find: each facet is in its own set  
+  for (Facet_iterator it=P.facets_begin();it!=P.facets_end();++it){
+    map_f2h.insert(std::make_pair(it,uf.make_set(it)));
+  }
+//merge 2 facets if they share a common edge  
+  for (Facet_iterator it=P.facets_begin();it!=P.facets_end();++it){
+    Facet_handle facet=it;
+    
+    UF_handle current=map_f2h.find(it)->second;
+    std::vector<Halfedge_handle> neighbors;
+    Halfedge_handle hedge=facet->halfedge();
+    do
+    {
+      neighbors.push_back( hedge->opposite() );
+      hedge=hedge->next();
+    }
+    while(hedge!=facet->halfedge());
+
+    std::size_t nb_edges=neighbors.size();
+    for (std::size_t i=0;i<nb_edges;++i){
+      if ( neighbors[i]->is_border() ) continue;
+      UF_handle neigh=map_f2h.find(neighbors[i]->facet())->second;
+      if ( adjacent(neighbors[i]) && !uf.same_set(current,neigh) ){
+        uf.unify_sets(current,neigh);
+      }
+    }
+  }
+  
+//recover merged sets
+  for (UF_iterator it=uf.begin();it!=uf.end();++it){
+    UF_handle master=uf.find(it);
+    result[*master].push_back(*it);
+  }
+}
+
+template <typename Polyhedron,typename Adjacency_criterium,typename Output_iterator>
+void extract_connected_components(const Polyhedron& P,const Adjacency_criterium& adjacent,Output_iterator out)
+{
+  typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
+  typedef ::CGAL::Union_find<Facet_const_handle> UF;
+  typedef typename UF::handle UF_handle;
+  typedef std::map<Facet_const_handle,std::list<Facet_const_handle>,Compare_handle_ptr<Polyhedron> > Result;
+  typedef std::map<Facet_const_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
+  
+  UF uf;
+  Facet_to_handle_map map_f2h;
+  Result result;
+  
+  extract_connected_components(P,adjacent,uf,map_f2h,result);
+  
+  for (typename Result::iterator it=result.begin();it!=result.end();++it)
+  {
+    typedef std::list<Facet_const_handle> Facets;
+    const Facets& facets=it->second;
+    Polyhedron new_poly;
+    Build_polyhedron_subset<Polyhedron> modifier(new_poly,facets.begin(),facets.end());
+    new_poly.delegate(modifier);
+    *out++=new_poly;
+  }
+}
+
+template <typename Polyhedron, typename Adjacency_criterium, typename Face_marker>
+void mark_connected_components(Polyhedron& P, const Adjacency_criterium& adjacent, Face_marker& face_marker)
+{
+  typedef typename Polyhedron::Facet_handle Facet_handle;
+  typedef ::CGAL::Union_find<Facet_handle> UF;
+  typedef typename UF::handle UF_handle;
+  typedef std::map<Facet_handle,std::list<Facet_handle>,Compare_handle_ptr<Polyhedron> > Result;
+  typedef std::map<Facet_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
+  
+  UF uf;
+  Facet_to_handle_map map_f2h;
+  Result result;
+  
+  extract_connected_components(P,adjacent,uf,map_f2h,result);
+  
+  for (typename Result::iterator it=result.begin();it!=result.end();++it)
+  {
+    face_marker.start_new_connected_component();
+    typedef std::list<Facet_handle> Facets;
+    const Facets& facets=it->second;
+    face_marker.mark(facets.begin(),facets.end());
+  }
+}
+
+template <typename Polyhedron, typename Adjacency_criterium, typename Face_marker, typename OutputIterator>
+OutputIterator
+mark_connected_components(Polyhedron& P, const Adjacency_criterium& adjacent, Face_marker& face_marker, OutputIterator out)
+{
+  typedef typename Polyhedron::Facet_handle Facet_handle;
+  typedef ::CGAL::Union_find<Facet_handle> UF;
+  typedef typename UF::handle UF_handle;
+  typedef std::map<Facet_handle,std::list<Facet_handle>,Compare_handle_ptr<Polyhedron> > Result;
+  typedef std::map<Facet_handle,UF_handle,Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
+
+  UF uf;
+  Facet_to_handle_map map_f2h;
+  Result result;
+
+  extract_connected_components(P,adjacent,uf,map_f2h,result);
+
+  for (typename Result::iterator it=result.begin();it!=result.end();++it)
+  {
+    face_marker.start_new_connected_component();
+    typedef std::list<Facet_handle> Facets;
+    const Facets& facets=it->second;
+    face_marker.mark(facets.begin(),facets.end());
+    *out++=*facets.begin();
+  }
+  return out;
+}
+
+template <typename Polyhedron,typename Output_iterator>
+void extract_connected_components(const Polyhedron& P,Output_iterator out)
+{
+  extract_connected_components(P,Dummy_true(),out);
+}
+
+template <typename Polyhedron, typename Polyhedron_facet_index_map>
+std::size_t
+init_facet_indices(
+  const Polyhedron& P,
+  Polyhedron_facet_index_map facet_index_map)
+{
+  //init facet indices
+  std::size_t index=0;
+  for (typename Polyhedron::Facet_const_iterator fit=P.facets_begin(),
+                                                 fit_end=P.facets_end();
+                                                 fit!=fit_end; ++fit)
+  {
+    put(facet_index_map, fit, index++);
+  }
+  return index;
+}
+
+// alternative method by propagation
+template <typename Polyhedron, typename Adjacency_criterium, typename Polyhedron_facet_index_map>
+std::size_t
+mark_connected_components_v2(
+  const Polyhedron& P,
+  const Adjacency_criterium& adjacent,
+  Polyhedron_facet_index_map facet_index_map,
+  std::vector<std::size_t>& patch_ids,
+  std::vector<std::size_t>& patch_sizes)
+{
+  typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle;
+
+  std::size_t max_id=(std::numeric_limits<std::size_t>::max)();
+  patch_ids.clear();
+  patch_ids.resize(P.size_of_facets(), max_id);
+
+  //traversal of the facets to discover connected components
+  std::size_t patch_id=0;
+  for (typename Polyhedron::Facet_const_iterator fit=P.facets_begin(),
+                                                 fit_end=P.facets_end();
+                                                 fit!=fit_end; ++fit)
+  {
+    std::size_t index=get(facet_index_map, fit);
+    if ( patch_ids[index]==max_id )
+    {
+      patch_sizes.push_back(0);
+      patch_ids[index]=patch_id;// set patch id
+      ++(patch_sizes.back());
+      std::vector<typename Polyhedron::Halfedge_const_handle> queue;
+      if ( adjacent(fit->halfedge()) )
+        queue.push_back( fit->halfedge()->opposite() );
+      if ( adjacent(fit->halfedge()->next()) )
+        queue.push_back( fit->halfedge()->next()->opposite() );
+      if ( adjacent(fit->halfedge()->next()->next()) )
+        queue.push_back( fit->halfedge()->next()->next()->opposite() );
+      while (!queue.empty())
+      {
+        Halfedge_handle h=queue.back();
+        queue.pop_back();
+        index=get(facet_index_map, h->facet());
+        if ( patch_ids[index]!=max_id ) continue;
+        patch_ids[index]=patch_id;
+        ++(patch_sizes.back());
+        if ( adjacent(h->next()) )
+          queue.push_back( h->next()->opposite() );
+        if ( adjacent(h->next()->next()) )
+          queue.push_back( h->next()->next()->opposite() );
+      }
+      ++patch_id;
+    }
+  }
+
+  return patch_id;
+}
+
+} } // end of namespace internal::corefinement
+
+namespace Polygon_mesh_processing{
+
+  namespace internal {
+    struct MoreSecond {
+      typedef std::pair<std::size_t,std::size_t> T;
+      bool operator()(const T& a, const T& b) const {
+        return a.second > b.second;
+      }
+    };
+
+    // A property map 
+    template <typename G>
+    struct No_constraint {
+      friend bool get(No_constraint<G>, typename boost::graph_traits<G>::edge_descriptor)
+      {
+        return false;
+      }
+    };
+
+    // A functor
+    template <typename G, typename EdgeConstraintMap = No_constraint<G> >
+    struct No_border {
+      No_border()
+      {}
+
+      No_border(const G & g, EdgeConstraintMap ecm = EdgeConstraintMap())
+        : g(&g), ecm(ecm)
+      {}
+
+      bool operator()(typename boost::graph_traits<G>::edge_descriptor e) const {
+        if (!is_border(e, *g)){
+          return !get(ecm, e);
+        }
+        return false;
+      }
+
+      const G* g;
+      EdgeConstraintMap ecm;
+    };
+
+}// namespace internal
+
+/*!
+ * \ingroup keep_connected_components_grp
+ *  discovers all the faces in the same connected component as `seed_face` and records them in `out`.
+ * `seed_face` will also be added in `out`.
+ *
+ *  \tparam PolygonMesh a model of `FaceGraph`
+ *  \tparam FaceOutputIterator a model of `OutputIterator` that accepts
+        faces of type
+        `boost::graph_traits<PolygonMesh>::%face_descriptor`.
+ *  \tparam NamedParameters a sequence of \ref namedparameters
+ *
+ *  \param seed_face a face of `pmesh` from which exploration starts to detect the connected component
+           that contains it
+ *  \param pmesh the polygon mesh
+ *  \param out the output iterator that collects faces from the same connected component as `seed_face`
+ *  \param np optional \ref namedparameters described below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{edge_is_constrained_map}  a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ *  \returns the output iterator.
+ *
+ */
+template <typename PolygonMesh
+          , typename FaceOutputIterator
+          , typename NamedParameters
+          >
+FaceOutputIterator
+connected_component(typename boost::graph_traits<PolygonMesh>::face_descriptor seed_face
+                    , const PolygonMesh& pmesh
+                    , FaceOutputIterator out
+                    , const NamedParameters& np)
+{
+  using boost::choose_param;
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  typedef typename boost::lookup_named_param_def <
+    CGAL::edge_is_constrained_t,
+    NamedParameters,
+    internal::No_constraint<PolygonMesh>//default
+  > ::type                                               EdgeConstraintMap;
+  EdgeConstraintMap ecmap
+    = choose_param(get_param(np, edge_is_constrained),
+                   internal::No_constraint<PolygonMesh>());
+
+  typedef typename boost::graph_traits<PolygonMesh>::face_descriptor face_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  std::set<face_descriptor> already_processed;
+  std::vector< face_descriptor > stack;
+  stack.push_back(seed_face);
+  while (!stack.empty())
+    {
+      seed_face=stack.back();
+      stack.pop_back();
+      if (!already_processed.insert(seed_face).second) continue;
+      *out++=seed_face;
+      BOOST_FOREACH(halfedge_descriptor hd,
+                    CGAL::halfedges_around_face(halfedge(seed_face, pmesh), pmesh) )
+      {
+        if(! get(ecmap, edge(hd, pmesh))){
+          face_descriptor neighbor = face( opposite(hd, pmesh), pmesh );
+          if ( neighbor != boost::graph_traits<PolygonMesh>::null_face() )
+            stack.push_back(neighbor);
+        }
+      }
+    }
+  return out;
+}
+
+template <typename PolygonMesh, typename OutputIterator>
+OutputIterator
+connected_component(typename boost::graph_traits<PolygonMesh>::face_descriptor seed_face,
+                    const PolygonMesh& pmesh,
+                    OutputIterator out)
+{
+  return connected_component(seed_face, pmesh, out,
+          CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/*!
+ * \ingroup keep_connected_components_grp
+ *  computes for each face the index of the corresponding connected component.
+ *
+ *  A property map for `CGAL::face_index_t` should be either available as an internal property map 
+ *  to `pmesh` or provided as one of the \ref namedparameters.
+ *
+ *  \tparam PolygonMesh a model of `FaceListGraph`
+ *  \tparam FaceComponentMap a model of `WritablePropertyMap` with
+        `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and
+        `boost::face_index` as value type.
+ *  \tparam NamedParameters a sequence of \ref namedparameters
+
+ * \param pmesh the polygon mesh
+ * \param fcm the property map with indices of components associated to faces in `pmesh`
+ * \param np optional \ref namedparameters described below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{edge_is_constrained_map} a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ *  \returns the number of connected components.
+ */
+
+template <typename PolygonMesh
+        , typename FaceComponentMap
+        , typename NamedParameters
+>
+typename boost::property_traits<FaceComponentMap>::value_type
+connected_components(const PolygonMesh& pmesh,
+                     FaceComponentMap fcm,
+                     const NamedParameters& np)
+{
+  using boost::choose_param;
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  typedef typename boost::lookup_named_param_def <
+    CGAL::edge_is_constrained_t,
+    NamedParameters,
+    internal::No_constraint<PolygonMesh>//default
+  > ::type                                               EdgeConstraintMap;
+  EdgeConstraintMap ecmap
+    = choose_param(get_param(np, edge_is_constrained),
+                   internal::No_constraint<PolygonMesh>());
+
+  typedef Dual<PolygonMesh>                              Dual;
+  typedef boost::filtered_graph<Dual,
+    internal::No_border<PolygonMesh,EdgeConstraintMap> > FiniteDual;
+  Dual dual(pmesh);
+
+  FiniteDual finite_dual(dual,
+    internal::No_border<PolygonMesh, EdgeConstraintMap>(pmesh, ecmap));
+
+  return boost::connected_components(finite_dual,
+    fcm,
+    boost::vertex_index_map(
+      choose_const_pmap(get_param(np, boost::face_index),
+                        pmesh,
+                        boost::face_index)
+    )
+  );
+}
+
+template <typename PolygonMesh, typename FaceComponentMap>
+typename boost::property_traits<FaceComponentMap>::value_type
+connected_components(const PolygonMesh& pmesh,
+                     FaceComponentMap fcm)
+{
+
+  return CGAL::Polygon_mesh_processing::connected_components(pmesh, fcm,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap
+        , typename NamedParameters>
+void keep_connected_components(PolygonMesh& pmesh
+                              , const ComponentRange& components_to_keep
+                              , const FaceComponentMap& fcm
+                              , const NamedParameters& np);
+
+/*!
+ * \ingroup keep_connected_components_grp
+ *  removes the small connected components and all isolated vertices.
+ *  Keep `nb_components_to_keep` largest connected components. 
+ *
+ * Property maps for `CGAL::face_index_t` and `CGAL::vertex_index_t`
+ * should be either available as internal property maps 
+ * to `pmesh` or provided as \ref namedparameters.
+ *
+ * \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+ * \tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * \param pmesh the polygon mesh
+ * \param nb_components_to_keep the number of components to be kept
+ * \param np optional \ref namedparameters described below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{edge_is_constrained_map} a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ *  \return the number of connected components removed (ignoring isolated vertices).
+ */
+template <typename PolygonMesh
+        , typename NamedParameters>
+std::size_t keep_largest_connected_components(PolygonMesh& pmesh
+                                            , std::size_t nb_components_to_keep
+                                            , const NamedParameters& np)
+{
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+
+  using boost::choose_param;
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  //FaceIndexMap
+  typedef typename GetFaceIndexMap<PM, NamedParameters>::type FaceIndexMap;
+  FaceIndexMap fim = choose_const_pmap(get_param(np, boost::face_index),
+                                       pmesh,
+                                       boost::face_index);
+
+  //vector_property_map
+  boost::vector_property_map<std::size_t, FaceIndexMap> face_cc(fim);
+  std::size_t num = connected_components(pmesh, face_cc, np);
+
+  // Even even we do not want to keep anything we need to first
+  // calculate the number of existing connected_components to get the
+  // correct return value.
+  if(nb_components_to_keep == 0) {
+    CGAL::clear(pmesh);
+    return num;
+  }
+
+  if((num == 1)|| (nb_components_to_keep > num) )
+    return 0;
+
+  std::vector< std::pair<std::size_t, std::size_t> > component_size(num);
+
+  for(std::size_t i=0; i < num; i++)
+    component_size[i] = std::make_pair(i,0);
+
+  BOOST_FOREACH(face_descriptor f, faces(pmesh))
+    ++component_size[face_cc[f]].second;
+
+  // we sort the range [0, num) by component size
+  std::sort(component_size.begin(), component_size.end(), internal::MoreSecond());
+  std::vector<std::size_t> cc_to_keep;
+  for(std::size_t i=0; i<nb_components_to_keep; ++i)
+    cc_to_keep.push_back( component_size[i].first );
+
+  keep_connected_components(pmesh, cc_to_keep, face_cc, np);
+
+  return num - nb_components_to_keep;
+}
+
+template <typename PolygonMesh>
+std::size_t keep_largest_connected_components(PolygonMesh& pmesh,
+                                              std::size_t nb_components_to_keep)
+{
+  return keep_largest_connected_components(pmesh,
+    nb_components_to_keep,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/*!
+ * \ingroup keep_connected_components_grp
+ *  removes connected components with less than a given number of faces.
+ *
+ * Property maps for `CGAL::face_index_t` and `CGAL::vertex_index_t`
+ * should be either available as internal property maps 
+ * to `pmesh` or provided as \ref namedparameters.
+ *
+ * \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+ * \tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * \param pmesh the polygon mesh
+ * \param threshold_components_to_keep the number of faces a component must have so that it is kept
+ * \param np optional \ref namedparameters described below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{edge_is_constrained_map} a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ *  \return the number of connected components removed (ignoring isolated vertices).
+ */
+template <typename PolygonMesh
+        , typename NamedParameters>
+std::size_t keep_large_connected_components(PolygonMesh& pmesh
+                                            , std::size_t threshold_components_to_keep
+                                            , const NamedParameters& np)
+{
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+
+  using boost::choose_param;
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  //FaceIndexMap
+  typedef typename GetFaceIndexMap<PM, NamedParameters>::type FaceIndexMap;
+  FaceIndexMap fim = choose_const_pmap(get_param(np, boost::face_index),
+                                       pmesh,
+                                       boost::face_index);
+
+  //vector_property_map
+  boost::vector_property_map<std::size_t, FaceIndexMap> face_cc(fim);
+  std::size_t num = connected_components(pmesh, face_cc, np);
+  std::vector< std::pair<std::size_t, std::size_t> > component_size(num);
+
+  for(std::size_t i=0; i < num; i++)
+    component_size[i] = std::make_pair(i,0);
+
+  BOOST_FOREACH(face_descriptor f, faces(pmesh))
+    ++component_size[face_cc[f]].second;
+
+
+  std::vector<std::size_t> cc_to_keep;
+  for(std::size_t i=0; i<num; ++i){
+    if(component_size[i].second >= threshold_components_to_keep){
+      cc_to_keep.push_back( component_size[i].first );
+    }
+  }
+
+  keep_connected_components(pmesh, cc_to_keep, face_cc, np);
+
+  return num - cc_to_keep.size();
+}
+
+
+template <typename PolygonMesh>
+std::size_t keep_large_connected_components(PolygonMesh& pmesh,
+                                            std::size_t threshold_components_to_keep)
+{
+  return keep_large_connected_components(pmesh,
+    threshold_components_to_keep,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap
+        , typename NamedParameters>
+void keep_or_remove_connected_components(PolygonMesh& pmesh
+                                        , const ComponentRange& components_to_keep
+                                        , const FaceComponentMap& fcm
+                                        , bool  keep
+                                        , const NamedParameters& np)
+{
+  typedef PolygonMesh PM;
+  using boost::choose_param;
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  typedef typename boost::graph_traits<PolygonMesh>::face_descriptor   face_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::face_iterator     face_iterator;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_iterator   vertex_iterator;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::edge_descriptor   edge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::edge_iterator     edge_iterator;
+
+  //VertexIndexMap
+  typedef typename GetVertexIndexMap<PM, NamedParameters>::type VertexIndexMap;
+  VertexIndexMap vim = choose_const_pmap(get_param(np, boost::vertex_index),
+                                         pmesh,
+                                         boost::vertex_index);
+
+  std::set<std::size_t> cc_to_keep;
+  BOOST_FOREACH(std::size_t i, components_to_keep)
+    cc_to_keep.insert(i);
+
+  boost::vector_property_map<bool, VertexIndexMap> keep_vertex(vim);
+  BOOST_FOREACH(vertex_descriptor v, vertices(pmesh)){
+    keep_vertex[v] = false;
+  }
+  BOOST_FOREACH(face_descriptor f, faces(pmesh)){
+    if (cc_to_keep.find(get(fcm,f)) != cc_to_keep.end())
+      put(fcm, f, keep ? 1 : 0);
+    else
+      put(fcm, f, keep ? 0 : 1);
+  }
+
+  BOOST_FOREACH(face_descriptor f, faces(pmesh)){
+    if (get(fcm, f) == 1){
+      BOOST_FOREACH(halfedge_descriptor h, halfedges_around_face(halfedge(f, pmesh), pmesh)){
+        vertex_descriptor v = target(h, pmesh);
+        keep_vertex[v] = true;
+      }
+    }
+  }
+
+  edge_iterator eb, ee;
+  for (boost::tie(eb, ee) = edges(pmesh); eb != ee;)
+  {
+    edge_descriptor e = *eb;
+    ++eb;
+    vertex_descriptor v = source(e, pmesh);
+    vertex_descriptor w = target(e, pmesh);
+    halfedge_descriptor h = halfedge(e, pmesh);
+    halfedge_descriptor oh = opposite(h, pmesh);
+    if (!keep_vertex[v] && !keep_vertex[w]){
+      // don't care about connectivity
+      // As vertices are not kept the faces and vertices will be removed later
+      remove_edge(e, pmesh);
+    }
+    else if (keep_vertex[v] && keep_vertex[w]){
+      face_descriptor fh = face(h, pmesh), ofh = face(oh, pmesh);
+      if (is_border(h, pmesh) && is_border(oh, pmesh)){
+#ifdef CGAL_CC_DEBUG
+        std::cerr << "null_face on both sides of " << e << " is kept\n";
+#endif
+      }
+      else if ((is_border(oh, pmesh) && get(fcm,fh)) ||
+        (is_border(h, pmesh) && get(fcm,ofh)) ||
+        (!is_border(oh, pmesh) && !is_border(h, pmesh) && get(fcm,fh) && get(fcm,ofh))){
+        // do nothing
+      }
+      else if (!is_border(h, pmesh) && get(fcm,fh) && !is_border(oh, pmesh) && !get(fcm,ofh)){
+        set_face(oh, boost::graph_traits<PolygonMesh>::null_face(), pmesh);
+      }
+      else if (!is_border(h, pmesh) && !get(fcm,fh) && !is_border(oh, pmesh) && get(fcm,ofh)){
+        set_face(h, boost::graph_traits<PolygonMesh>::null_face(), pmesh);
+      }
+      else {
+        // no face kept
+        CGAL_assertion((is_border(h, pmesh) || !get(fcm,fh)) && (is_border(oh, pmesh) || !get(fcm,ofh)));
+        // vertices pointing to e must change their halfedge
+        if (halfedge(v, pmesh) == oh){
+          set_halfedge(v, prev(h, pmesh), pmesh);
+        }
+        if (halfedge(w, pmesh) == h){
+          set_halfedge(w, prev(oh, pmesh), pmesh);
+        }
+        // shortcut the next pointers as e will be removed
+        set_next(prev(h, pmesh), next(oh, pmesh), pmesh);
+        set_next(prev(oh, pmesh), next(h, pmesh), pmesh);
+        remove_edge(e, pmesh);
+      }
+    }
+    else if (keep_vertex[v]){
+      if (halfedge(v, pmesh) == oh){
+        set_halfedge(v, prev(h, pmesh), pmesh);
+      }
+      set_next(prev(h, pmesh), next(oh, pmesh), pmesh);
+      remove_edge(e, pmesh);
+    }
+    else {
+      CGAL_assertion(keep_vertex[w]);
+      if (halfedge(w, pmesh) == h){
+        set_halfedge(w, prev(oh, pmesh), pmesh);
+      }
+      set_next(prev(oh, pmesh), next(h, pmesh), pmesh);
+      remove_edge(e, pmesh);
+    }
+  }
+
+  face_iterator fb, fe;
+  // We now can remove all vertices and faces not marked as kept
+  for (boost::tie(fb, fe) = faces(pmesh); fb != fe;){
+    face_descriptor f = *fb;
+    ++fb;
+    if (get(fcm,f) != 1){
+      remove_face(f, pmesh);
+    }
+  }
+  vertex_iterator b, e;
+  for (boost::tie(b, e) = vertices(pmesh); b != e;){
+    vertex_descriptor v = *b;
+    ++b;
+    if (!keep_vertex[v]){
+      remove_vertex(v, pmesh);
+    }
+  }
+}
+
+/*!
+* \ingroup keep_connected_components_grp
+* keeps the connected components designated by theirs ids in `components_to_keep`,
+* and removes the other connected components as well as all isolated vertices.
+* The connected component id of a face is given by `fcm`.
+*
+* \note If the removal of the connected components makes `pmesh` a non-manifold surface,
+* then the behavior of this function is undefined.
+*
+* Property maps for `CGAL::vertex_index_t`
+* should be either available as internal property map
+* to `pmesh` or provided as \ref namedparameters.
+*
+* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+* \tparam NamedParameters a sequence of \ref namedparameters
+* \tparam ComponentRange a range of ids convertible to `std::size`
+* \tparam FaceComponentMap a model of `ReadWritePropertyMap` with
+*         `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and
+*         `boost::face_index` as value type.
+*
+* \param components_to_keep the range of ids of connected components to keep
+* \param pmesh the polygon mesh
+* \param fcm the property map with indices of components associated to faces in `pmesh`.
+*        After calling this function, the values of `fcm` are undefined.
+* \param np optional \ref namedparameters described below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap
+        , typename NamedParameters>
+void keep_connected_components(PolygonMesh& pmesh
+                              , const ComponentRange& components_to_keep
+                              , const FaceComponentMap& fcm
+                              , const NamedParameters& np)
+{
+  keep_or_remove_connected_components(pmesh, components_to_keep, fcm, true, np);
+}
+
+/*!
+* \ingroup keep_connected_components_grp
+* Removes in `pmesh` the connected components designated by theirs ids
+* in `components_to_remove` as well as all isolated vertices.
+* The connected component id of a face is given by `fcm`.
+*
+* \note If the removal of the connected components makes `pmesh` a non-manifold surface,
+* then the behavior of this function is undefined.
+*
+* Property maps for `CGAL::vertex_index_t`
+* should be either available as internal property map
+* to `pmesh` or provided as \ref namedparameters.
+*
+*
+* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+* \tparam NamedParameters a sequence of \ref namedparameters
+* \tparam ComponentRange a range of ids convertible to `std::size`
+* \tparam FaceComponentMap a model of `ReadWritePropertyMap` with
+*         `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and
+*         `boost::face_index` as value type.
+*
+* \param components_to_remove the range of ids of connected components to remove
+* \param pmesh the polygon mesh
+* \param fcm the property map with indices of components associated to faces in `pmesh`.
+*        After calling this function, the values of `fcm` are undefined.
+* \param np optional \ref namedparameters described below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap
+        , typename NamedParameters>
+void remove_connected_components(PolygonMesh& pmesh
+                                , const ComponentRange& components_to_remove
+                                , const FaceComponentMap& fcm
+                                , const NamedParameters& np)
+{
+  if (components_to_remove.empty()) return;
+  keep_or_remove_connected_components(pmesh, components_to_remove, fcm, false, np);
+}
+
+/*!
+* \ingroup keep_connected_components_grp
+*  keeps the connected components not designated by the faces in `components_to_remove`,
+*  and removes the other connected components and all isolated vertices.
+*
+* Property maps for `CGAL::face_index_t` and `CGAL::vertex_index_t`
+* should be either available as internal property maps
+* to `pmesh` or provided as \ref namedparameters.
+*
+* \note If the removal of the connected components makes `pmesh` a non-manifold surface,
+* then the behavior of this function is undefined.
+*
+* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+* \tparam NamedParameters a sequence of \ref namedparameters
+* \tparam FaceRange a range of `boost::graph_traits<PolygonMesh>::%face_descriptor`
+*         indicating the connected components to be removed.
+*
+* \param components_to_remove a face range, including one face or more on each component to be removed
+* \param pmesh the polygon mesh
+* \param np optional \ref namedparameters described below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{edge_is_constrained_map} a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+        , typename FaceRange
+        , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+void remove_connected_components(PolygonMesh& pmesh
+                                , const FaceRange& components_to_remove
+                                , const CGAL_PMP_NP_CLASS& np)
+{
+  if (components_to_remove.empty()) return;
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+  using boost::choose_param;
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  //FaceIndexMap
+  typedef typename GetFaceIndexMap<PM, CGAL_PMP_NP_CLASS>::type FaceIndexMap;
+  FaceIndexMap fim = choose_const_pmap(get_param(np, boost::face_index),
+                                       pmesh,
+                                       boost::face_index);
+
+  //vector_property_map
+  boost::vector_property_map<std::size_t, FaceIndexMap> face_cc(fim);
+
+  connected_components(pmesh, face_cc, np);
+
+  std::vector<std::size_t> cc_to_remove;
+  BOOST_FOREACH(face_descriptor f, components_to_remove)
+    cc_to_remove.push_back( face_cc[f] );
+
+  remove_connected_components(pmesh, cc_to_remove, face_cc, np);
+}
+
+/*!
+* \ingroup keep_connected_components_grp
+*  keeps the connected components designated by the faces in `components_to_keep`,
+*  and removes the other connected components and all isolated vertices.
+*
+* Property maps for `CGAL::face_index_t` and `CGAL::vertex_index_t`
+* should be either available as internal property maps
+* to `pmesh` or provided as \ref namedparameters.
+*
+* \note If the removal of the connected components makes `pmesh` a non-manifold surface,
+* then the behavior of this function is undefined.
+*
+* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+* \tparam NamedParameters a sequence of \ref namedparameters
+* \tparam FaceRange a range of `boost::graph_traits<PolygonMesh>::%face_descriptor`
+*         indicating the connected components to be kept.
+*
+* \param pmesh the polygon mesh
+* \param components_to_keep a face range, including one face or more on each component to be kept
+* \param np optional \ref namedparameters described below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{edge_is_constrained_map} a property map containing the constrained-or-not status of each edge of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{face_index_map} a property map containing the index of each face of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{vertex_index_map} a property map containing the index of each vertex of `pmesh` \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh
+        , typename FaceRange
+        , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+void keep_connected_components(PolygonMesh& pmesh
+                             , const FaceRange& components_to_keep
+                             , const CGAL_PMP_NP_CLASS& np)
+{
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+
+  using boost::choose_param;
+  using boost::get_param;
+  using boost::choose_const_pmap;
+
+  //FaceIndexMap
+  typedef typename GetFaceIndexMap<PM, CGAL_PMP_NP_CLASS>::type FaceIndexMap;
+  FaceIndexMap fim = choose_const_pmap(get_param(np, boost::face_index),
+                                       pmesh,
+                                       boost::face_index);
+
+  //vector_property_map
+  boost::vector_property_map<std::size_t, FaceIndexMap> face_cc(fim);
+
+  connected_components(pmesh, face_cc, np);
+
+  std::vector<std::size_t> cc_to_keep;
+  BOOST_FOREACH(face_descriptor f, components_to_keep)
+    cc_to_keep.push_back( face_cc[f] );
+
+  keep_connected_components(pmesh, cc_to_keep, face_cc, np);
+}
+
+// non-documented overloads so that named parameters can be omitted
+
+template <typename PolygonMesh, typename FaceRange>
+void remove_connected_components(PolygonMesh& pmesh
+                                , const FaceRange& components_to_remove)
+{
+  remove_connected_components(pmesh, components_to_remove,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap>
+void keep_connected_components(PolygonMesh& pmesh
+                              , const ComponentRange& components_to_keep
+                              , const FaceComponentMap& fcm)
+{
+  keep_connected_components(pmesh, components_to_keep, fcm,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+template <typename PolygonMesh
+        , typename ComponentRange
+        , typename FaceComponentMap>
+void remove_connected_components(PolygonMesh& pmesh
+                                , const ComponentRange& components_to_remove
+                                , const FaceComponentMap& fcm )
+{
+    remove_connected_components(pmesh, components_to_remove, fcm,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+template <typename PolygonMesh, typename FaceRange>
+void keep_connected_components(PolygonMesh& pmesh
+                             , const FaceRange& components_to_keep)
+{
+  keep_connected_components(pmesh, components_to_keep,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+} // namespace Polygon_mesh_processing
+
+} // namespace CGAL
+
+#endif //CGAL_INTERNAL_POLYHEDRON_SUBSET_EXTRACTION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/distance.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/distance.h
new file mode 100644
index 0000000..ba90c8e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/distance.h
@@ -0,0 +1,182 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_DISTANCE_H
+#define CGAL_POLYGON_MESH_PROCESSING_DISTANCE_H
+
+#include <algorithm>
+#include <cmath>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_triangle_primitive.h>
+#include <CGAL/utility.h>
+#include <boost/foreach.hpp>
+
+/// \cond SKIP_IN_MANUAL
+
+namespace CGAL{
+namespace Polygon_mesh_processing {
+namespace internal{
+
+template <class Kernel, class OutputIterator>
+OutputIterator
+triangle_grid_sampling(const typename Kernel::Point_3& p0,
+                const typename Kernel::Point_3& p1,
+                const typename Kernel::Point_3& p2,
+                double distance,
+                OutputIterator out)
+{
+  const double d_p0p1 = CGAL::sqrt( CGAL::squared_distance(p0, p1) );
+  const double d_p0p2 = CGAL::sqrt( CGAL::squared_distance(p0, p2) );
+
+  const double n = (std::max)(std::ceil( d_p0p1 / distance ),
+                                   std::ceil( d_p0p2 / distance ));
+
+  for (double i=1; i<n; ++i)
+    for (double j=1; j<n-i; ++j)
+    {
+      const double c0=(1-(i+j)/n), c1=i/n, c2=j/n;
+      *out++=typename Kernel::Point_3(
+              p0.x()*c0+p1.x()*c1+p2.x()*c2,
+              p0.y()*c0+p1.y()*c1+p2.y()*c2,
+              p0.z()*c0+p1.z()*c1+p2.z()*c2
+            );
+    }
+  return out;
+}
+
+template <class Kernel, class OutputIterator>
+OutputIterator
+triangle_grid_sampling(const typename Kernel::Triangle_3& t, double distance, OutputIterator out)
+{
+  return triangle_grid_sampling<Kernel>(t[0], t[1], t[2], distance, out);
+}
+
+} //end of namespace internal
+
+template <class Kernel, class TriangleRange, class OutputIterator>
+OutputIterator
+sample_triangles(const TriangleRange& triangles, double distance, OutputIterator out)
+{
+  typedef typename Kernel::Point_3 Point_3;
+  typedef typename Kernel::Vector_3 Vector_3;
+  typedef typename Kernel::Triangle_3 Triangle_3;
+
+  std::set< std::pair<Point_3, Point_3> > sampled_edges;
+
+  // sample edges but skip endpoints
+  BOOST_FOREACH(const Triangle_3& t, triangles)
+  {
+    for (int i=0;i<3; ++i)
+    {
+      const Point_3& p0=t[i];
+      const Point_3& p1=t[(i+1)%3];
+      if ( sampled_edges.insert(CGAL::make_sorted_pair(p0, p1)).second )
+      {
+        const double d_p0p1 = CGAL::sqrt( CGAL::squared_distance(p0, p1) );
+
+        const double nb_pts = std::ceil( d_p0p1 / distance );
+        const Vector_3 step_vec = (p1 - p0) / nb_pts;
+        for (double i=1; i<nb_pts; ++i)
+        {
+          *out++=p0 + step_vec * i;
+        }
+      }
+    }
+  }
+
+  // sample triangles
+  BOOST_FOREACH(const Triangle_3& t, triangles)
+    out=internal::triangle_grid_sampling<Kernel>(t, distance, out);
+
+  //add endpoints
+  std::set< Point_3 > endpoints;
+  BOOST_FOREACH(const Triangle_3& t, triangles)
+    for(int i=0; i<3; ++i)
+    {
+      if ( endpoints.insert(t[i]).second ) *out++=t[i];
+    }
+  return out;
+}
+
+template <class Kernel, class TriangleRange1, class TriangleRange2>
+double approximated_Hausdorff_distance(
+  const TriangleRange1& triangles_1,
+  const TriangleRange2& triangles_2,
+  double targeted_precision
+)
+{
+  std::vector<typename Kernel::Point_3> sample_points;
+  sample_triangles<Kernel>( triangles_1,
+                            targeted_precision,
+                            std::back_inserter(sample_points) );
+  // std::ofstream out("/tmp/samples.xyz");
+  // std::copy(sample_points.begin(), sample_points.end(), std::ostream_iterator<typename Kernel::Point_3>(out,"\n"));
+
+  typedef typename TriangleRange2::const_iterator Triangle_iterator;
+  typedef AABB_triangle_primitive<Kernel, Triangle_iterator> Primitive;
+  typedef AABB_traits<Kernel, Primitive> Traits;
+  typedef AABB_tree< Traits > Tree;
+
+  Tree tree(triangles_2.begin(), triangles_2.end());
+  tree.accelerate_distance_queries();
+
+  double hdist = 0;
+  BOOST_FOREACH(const typename Kernel::Point_3& pt, sample_points)
+  {
+    double d = CGAL::sqrt( tree.squared_distance(pt) );
+    // if ( d > 1e-1 ) std::cout << pt << "\n";
+    if (d>hdist) hdist=d;
+  }
+
+  return hdist;
+}
+
+template <class Kernel, class TriangleRange1, class TriangleRange2>
+double approximated_symmetric_Hausdorff_distance(
+  const TriangleRange1& triangles_1,
+  const TriangleRange2& triangles_2,
+  double targeted_precision
+)
+{
+  return (std::max)(
+    approximated_Hausdorff_distance<Kernel>(triangles_1, triangles_2, targeted_precision),
+    approximated_Hausdorff_distance<Kernel>(triangles_2, triangles_1, targeted_precision)
+  );
+}
+
+
+///\todo add approximated_Hausdorff_distance(FaceGraph, FaceGraph)
+///\todo add approximated_Hausdorff_distance(TriangleRange, FaceGraph)
+///\todo add approximated_Hausdorff_distance(FaceGraph, TriangleRange)
+///\todo add approximated_Hausdorff_distance(PointRange, FaceGraph)
+///\todo add approximated_Hausdorff_distance(PointRange, TriangleRange)
+///\todo add barycentric_triangle_sampling(Triangle, PointPerAreaUnit)
+///\todo add random_triangle_sampling(Triangle, PointPerAreaUnit)
+/// \todo maybe we should use a sampling using epec to avoid being too far from the sampled triangle
+  
+
+
+
+} } // end of namespace CGAL::Polygon_mesh_processing
+
+/// \endcond
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_DISTANCE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/fair.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/fair.h
new file mode 100644
index 0000000..095a399
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/fair.h
@@ -0,0 +1,165 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_FAIR_H
+#define CGAL_POLYGON_MESH_PROCESSING_FAIR_H
+
+#include <CGAL/Polygon_mesh_processing/internal/fair_impl.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#if defined(CGAL_EIGEN3_ENABLED)
+#include <CGAL/Eigen_solver_traits.h>  // for sparse linear system solver
+#endif
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal {
+  // use non-default weight calculator and non-default solver
+  // WeightCalculator a model of `FairWeightCalculator`, can be omitted to use default Cotangent weights
+  // weight_calculator a function object to calculate weights, defaults to Cotangent weights and can be omitted
+  template<typename SparseLinearSolver,
+           typename WeightCalculator,
+           typename TriangleMesh,
+           typename VertexRange,
+           typename VertexPointMap>
+  bool fair(TriangleMesh& tmesh,
+    const VertexRange& vertices,
+    SparseLinearSolver solver,
+    WeightCalculator weight_calculator,
+    unsigned int continuity,
+    VertexPointMap vpmap)
+  {
+    CGAL::Polygon_mesh_processing::internal::Fair_Polyhedron_3
+       <TriangleMesh, SparseLinearSolver, WeightCalculator, VertexPointMap>
+       fair_functor(tmesh, vpmap, weight_calculator);
+    return fair_functor.fair(vertices, solver, continuity);
+  }
+
+} //end namespace internal
+
+  /*!
+  \ingroup PMP_meshing_grp
+  @brief fairs a region on a triangle mesh.
+  The points of the selected vertices are
+  relocated to yield an as-smooth-as-possible surface patch,
+  based on solving a linear bi-Laplacian system with boundary constraints,
+  described in \cgalCite{Botsch2008OnLinearVariational}.
+  The optional parameter `fairing_continuity` gives the ability to control the tangential
+  continuity C<sup>\a n</sup> of the output mesh.
+
+  The region described by `vertices` might contain multiple disconnected components.
+  Note that the mesh connectivity is not altered in any way,
+  only vertex locations get updated.
+
+  Fairing might fail if fixed vertices, which are used as boundary conditions,
+  do not suffice to solve constructed linear system.
+
+  Note that if the vertex range to which fairing is applied contains all the vertices of the triangle mesh,
+  fairing does not fail, but the mesh gets shrinked to `CGAL::ORIGIN`.
+
+  @tparam TriangleMesh a model of `FaceGraph` and `MutableFaceGraph`
+          that has an internal property map for `CGAL::vertex_point_t`
+  @tparam VertexRange a range of vertex descriptors of `TriangleMesh`, model of `Range`.
+          Its iterator type is `InputIterator`.
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param tmesh the triangle mesh with patches to be faired
+  @param vertices the vertices of the patches to be faired (the positions of only those vertices will be changed)
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `tmesh` \cgalParamEnd
+    \cgalParamBegin{fairing_continuity} tangential continuity of the output surface patch. The larger `fairing_continuity` gets, the more fixed vertices are required \cgalParamEnd
+    \cgalParamBegin{sparse_linear_solver} an instance of the sparse linear solver used for fairing \cgalParamEnd
+  \cgalNamedParamsEnd
+  
+  @return `true` if fairing is successful, otherwise no vertices are relocated
+
+  @pre `is_triangle_mesh(tmesh)`
+
+  @todo accuracy of solvers are not good, for example when there is no boundary condition pre_factor should fail, but it does not.
+  */
+  template<typename TriangleMesh,
+           typename VertexRange,
+           typename NamedParameters>
+  bool fair(TriangleMesh& tmesh,
+            const VertexRange& vertices,
+            const NamedParameters& np)
+  {
+    using boost::get_param;
+    using boost::choose_param;
+
+    CGAL_precondition(is_triangle_mesh(tmesh));
+
+#if defined(CGAL_EIGEN3_ENABLED)
+  #if EIGEN_VERSION_AT_LEAST(3,2,0)
+    typedef CGAL::Eigen_solver_traits<Eigen::SparseLU<
+      CGAL::Eigen_sparse_matrix<double>::EigenType, Eigen::COLAMDOrdering<int> >  >
+      Default_solver;
+  #else
+    typedef bool Default_solver;//compilation should crash
+      //if no solver is provided and Eigen version < 3.2
+  #endif
+#else
+    typedef bool Default_solver;//compilation should crash
+      //if no solver is provided and Eigen version < 3.2
+#endif
+
+#if defined(CGAL_EIGEN3_ENABLED)
+    CGAL_static_assertion_msg(
+      (!boost::is_same<typename GetSolver<NamedParameters, Default_solver>::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0),
+      "The function `fair` requires Eigen3 version 3.2 or later.");
+#else
+    CGAL_static_assertion_msg(
+      (!boost::is_same<typename GetSolver<NamedParameters, Default_solver>::type, bool>::value),
+      "The function `fair` requires Eigen3 version 3.2 or later.");
+#endif
+
+    typedef typename GetVertexPointMap < TriangleMesh, NamedParameters>::type VPMap;
+    typedef CGAL::internal::Cotangent_weight_with_voronoi_area_fairing<TriangleMesh, VPMap>
+      Default_Weight_calculator;
+
+    VPMap vpmap_ = choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, tmesh));
+
+    return internal::fair(tmesh, vertices,
+      choose_param(get_param(np, sparse_linear_solver), Default_solver()),
+      choose_param(get_param(np, weight_calculator), Default_Weight_calculator(tmesh, vpmap_)),
+      choose_param(get_param(np, fairing_continuity), 1),
+      vpmap_
+      );
+  }
+
+  template<typename TriangleMesh, typename VertexRange>
+  bool fair(TriangleMesh& tmesh, const VertexRange& vertices)
+  {
+    return fair(tmesh, vertices,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+} //end namespace Polygon_mesh_processing
+
+} //end namespace CGAL
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_FAIR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h
new file mode 100644
index 0000000..cfe4867
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h
@@ -0,0 +1,193 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+#ifndef CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYHEDRON_3_H
+#define CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYHEDRON_3_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h>
+#include <CGAL/Timer.h>
+#include <CGAL/trace.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <vector>
+
+namespace CGAL {
+namespace Polygon_mesh_processing {
+namespace internal {
+
+
+template<class PolygonMesh, class OutputIterator>
+struct Tracer_polyhedron 
+{
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+
+  Tracer_polyhedron(OutputIterator out,
+                    PolygonMesh& pmesh,
+                    std::vector<halfedge_descriptor>& P)
+    : out(out), pmesh(pmesh), P(P)
+  { }
+
+  template <class LookupTable>
+  halfedge_descriptor 
+  operator()(const LookupTable& lambda, 
+             int i, int k,
+             bool last = true)
+  {
+    if(i + 1 == k) { return P[i+1]; }
+
+    halfedge_descriptor h, g;
+    if(i+2 == k){
+      if(last)
+        {
+          h = P[i+1];
+          Euler::fill_hole(h,pmesh); }
+      else 
+        { h = Euler::add_face_to_border(prev(P[i+1],pmesh), P[i+2/*k*/], pmesh); }
+      
+      CGAL_assertion(face(h,pmesh) != boost::graph_traits<PolygonMesh>::null_face());
+      *out++ = face(h,pmesh);
+      return opposite(h,pmesh);
+    } 
+    else 
+    {
+      int la = lambda.get(i, k);
+      h = operator()(lambda, i, la, false);
+      g = operator()(lambda, la, k, false);
+
+      if(last)
+        {
+          h = g;
+          Euler::fill_hole(g,pmesh);
+        }
+      else 
+        { h = Euler::add_face_to_border(prev(h,pmesh), g, pmesh); }
+
+      CGAL_assertion(face(h,pmesh) != boost::graph_traits<PolygonMesh>::null_face());
+      *out++ = face(h,pmesh);
+      return opposite(h,pmesh);
+    }
+  }
+
+  OutputIterator out;
+  PolygonMesh& pmesh;
+  std::vector<halfedge_descriptor>& P;
+};
+
+// This function is used in test cases (since it returns not just OutputIterator but also Weight)
+template<class PolygonMesh, class OutputIterator, class VertexPointMap, class Kernel>
+std::pair<OutputIterator, CGAL::internal::Weight_min_max_dihedral_and_area> 
+triangulate_hole_polygon_mesh(PolygonMesh& pmesh, 
+            typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+            OutputIterator out,
+            VertexPointMap vpmap,
+            bool use_delaunay_triangulation,
+            const Kernel& k)
+{
+  typedef Halfedge_around_face_circulator<PolygonMesh>   Hedge_around_face_circulator;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  typedef typename Kernel::Point_3 Point_3;
+  
+  typedef std::map<vertex_descriptor, int>    Vertex_map;
+  typedef typename Vertex_map::iterator       Vertex_map_it;
+
+  CGAL::Timer timer; timer.start();
+
+  std::vector<Point_3>         P, Q;
+  std::vector<halfedge_descriptor> P_edges;
+  Vertex_map vertex_map;
+
+  int id = 0;
+  Hedge_around_face_circulator circ(border_halfedge,pmesh), done(circ);
+  do{
+    P.push_back(vpmap[target(*circ, pmesh)]);
+    Q.push_back(vpmap[target(next(opposite(next(*circ,pmesh),pmesh),pmesh),pmesh)]);
+    P_edges.push_back(*circ);
+    if(!vertex_map.insert(std::make_pair(target(*circ,pmesh), id++)).second) {
+      #ifndef CGAL_TEST_SUITE
+      CGAL_warning(!"Returning no output. Non-manifold vertex is found on boundary!");
+      #else
+      std::cerr << "W: Returning no output. Non-manifold vertex is found on boundary!\n";
+      #endif
+      return std::make_pair(out,
+                            CGAL::internal::Weight_min_max_dihedral_and_area::NOT_VALID());
+    }
+  } while (++circ != done);
+  
+  // existing_edges contains neighborhood information between boundary vertices
+  // more precisely if v_i is neighbor to any other vertex than v_(i-1) and v_(i+1),
+  // this edge is put into existing_edges
+  std::vector<std::pair<int, int> > existing_edges;
+  for(Vertex_map_it v_it = vertex_map.begin(); v_it != vertex_map.end(); ++v_it)
+  {
+    int v_it_id = v_it->second;
+    int v_it_prev = (v_it_id == 0)   ? (id-1) : (v_it_id-1);
+    int v_it_next = (v_it_id == id-1) ?  0    : (v_it_id+1);
+
+    Halfedge_around_target_circulator<PolygonMesh>
+      circ_vertex(halfedge(v_it->first,pmesh),pmesh),
+      done_vertex(circ_vertex);
+    do
+    {
+      Vertex_map_it v_it_neigh_it = vertex_map.find(source(*circ_vertex,pmesh));
+
+      if(v_it_neigh_it != vertex_map.end()) //other endpoint found in the map
+      {
+        int v_it_neigh_id = v_it_neigh_it->second;
+        if( v_it_neigh_id != v_it_prev && v_it_neigh_id != v_it_next )
+        { //there is an edge incident to v_it, which is not next or previous
+          //from vertex_map (checked by comparing IDs)
+          if(v_it_id < v_it_neigh_id) // to include each edge only once
+          { existing_edges.push_back(std::make_pair(v_it_id, v_it_neigh_id)); }
+        }
+      }
+    } while(++circ_vertex != done_vertex);
+  }
+
+  //#define CGAL_USE_WEIGHT_INCOMPLETE
+  #ifdef CGAL_USE_WEIGHT_INCOMPLETE
+  typedef CGAL::internal::Weight_calculator<Weight_incomplete<CGAL::internal::Weight_min_max_dihedral_and_area>,
+        CGAL::internal::Is_valid_existing_edges_and_degenerate_triangle> WC;
+  #else
+  typedef CGAL::internal::Weight_calculator<CGAL::internal::Weight_min_max_dihedral_and_area,
+        CGAL::internal::Is_valid_existing_edges_and_degenerate_triangle> WC;
+  #endif
+
+  CGAL::internal::Is_valid_existing_edges_and_degenerate_triangle is_valid(existing_edges);
+
+  // fill hole using polyline function, with custom tracer for PolygonMesh
+  Tracer_polyhedron<PolygonMesh, OutputIterator>
+    tracer(out, pmesh, P_edges);
+  CGAL::internal::Weight_min_max_dihedral_and_area weight = 
+    triangulate_hole_polyline(P, Q, tracer, WC(is_valid),
+      use_delaunay_triangulation, k)
+#ifdef CGAL_USE_WEIGHT_INCOMPLETE
+              .weight // get actual weight in Weight_incomplete
+#endif
+  ;
+
+  CGAL_TRACE_STREAM << "Hole filling: " << timer.time() << " sc." << std::endl; timer.reset();
+  return std::make_pair(tracer.out, weight);
+}
+
+}// namespace internal
+}// namespace Polygon_mesh_processing
+}// namespace CGAL
+#endif //CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h
new file mode 100644
index 0000000..626c3ce
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h
@@ -0,0 +1,1236 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+#ifndef CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYLINE_H
+#define CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYLINE_H
+
+#include <CGAL/Mesh_3/dihedral_angle_3.h>
+#include <CGAL/value_type_traits.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Triangulation_vertex_base_with_info_3.h>
+#include <CGAL/iterator.h>
+#include <CGAL/trace.h>
+#include <CGAL/use.h>
+
+#include <vector>
+#include <stack>
+#include <map>
+
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/unordered_set.hpp>
+
+namespace CGAL {
+namespace internal {
+
+/************************************************************************
+ * Lookup tables
+ ************************************************************************/
+// Wrapper around vector
+template<class T>
+class Lookup_table {
+public:
+  Lookup_table(int n, const T& t) : n(n), table(n*n, t) { }
+  void put(int i, int j, const T& t) {
+    CGAL_assertion(bound_check(i,j));
+    table[i*n + j] = t;
+  }
+  const T& get(int i, int j) const {
+    CGAL_assertion(bound_check(i,j));
+    return table[i*n + j];
+  }
+
+  int n;
+private:
+  bool bound_check(int i, int j) const {
+    CGAL_assertion(i >= 0 && i < n);
+    CGAL_assertion(j >= 0 && j < n);
+    CGAL_assertion(i < j); 
+    CGAL_USE(i);
+    CGAL_USE(j);
+    // previous implementation was based on directly vector and i supposed to be always smaller than j.
+    // this check actually can be removed and i =min(i,j) j = max(i,j) can be used for reflexive access 
+    return true;
+  }
+  std::vector<T> table;
+};
+
+// Wrapper around map, where if i,j is not found a default value is returned,
+// and if default value inserted i,j erased.
+template<class T>
+class Lookup_table_map {
+public:
+  Lookup_table_map(int n, const T& default_) : n(n), default_(default_) { }
+
+  void put(int i, int j, const T& t) {
+    CGAL_assertion(bound_check(i,j));
+    
+    if(t == default_) {
+      table.erase(std::make_pair(i,j));
+      return;
+    }
+    
+    std::pair<typename Map::iterator, bool> inserted = table.insert(std::make_pair(std::make_pair(i,j), t));
+    if(!inserted.second) { inserted.first->second = t;}
+  }
+  const T& get(int i, int j) const {
+    CGAL_assertion(bound_check(i,j));
+    typename Map::const_iterator ij = table.find(std::make_pair(i,j));
+    if(ij != table.end()) {
+      return ij->second;
+    }
+    return default_;
+  }
+
+  void set_range_to_default(int b, int e/*inclusive*/) {
+    // given a range b-e erase each entity which falls into b-e
+    // example: given range 2-6, entries need to be deleted  2-3, 2-4, 2-5, 2-6
+    //                                                            3-4, 3-5, 3-6
+    //                                                                 4-5, 4-6
+    //                                                                      5-6
+    typename Map::iterator it;
+    if(b == 0) { it = table.begin(); }
+    else       { 
+      it = table.upper_bound(std::make_pair(b-1, n)); // to find first entry where entry.first == b
+    }
+
+    while(it != table.end() && it->first.first != e) {
+      if(it->first.second <= e) 
+      { table.erase(it++); }
+      else 
+      { ++it; }
+    }
+  }
+
+  int n;
+private:
+  typedef std::map<std::pair<int,int>, T> Map;
+  bool bound_check(int i, int j) const {
+    CGAL_assertion(i >= 0 && i < n);
+    CGAL_assertion(j >= 0 && j < n);
+    CGAL_assertion(i < j);
+    CGAL_USE(i);
+    CGAL_USE(j);
+    return true;
+  }
+  Map table;
+  T default_;
+};
+
+/************************************************************************
+ * Is_valid classes (to be used in Weight_calculator)
+ ************************************************************************/
+struct Is_valid_existing_edges
+{
+  typedef std::vector<std::pair<int, int> > Edge_container;
+  
+  Is_valid_existing_edges(Edge_container& existing_edges) 
+    : existing_edges(existing_edges)
+  {
+    std::sort(existing_edges.begin(), existing_edges.end());
+#ifndef CGAL_NDEBUG
+    // all pairs need to be satisfy pair.first < pair.second
+    for(Edge_container::iterator it = existing_edges.begin(); it != existing_edges.end(); ++it) {
+      CGAL_assertion(it->first < it->second);
+    }
+#endif
+  }
+
+  template<class Point_3>
+  bool operator()(const std::vector<Point_3>&,
+                  int v0, int v1, int v2) const 
+  {
+    CGAL_assertion(v0 < v1 && v1 < v2);
+
+    if(v0 + 1 != v1 && // border edges can not be inside existing_edges, so no need to check
+       std::binary_search(existing_edges.begin(), existing_edges.end(), std::make_pair(v0,v1)) )
+    { return false; }
+
+    if(v1 + 1 != v2 &&
+      std::binary_search(existing_edges.begin(), existing_edges.end(), std::make_pair(v1,v2)) )
+    { return false; }
+    
+    if(std::binary_search(existing_edges.begin(), existing_edges.end(), std::make_pair(v2,v0)) )
+    { return false; }
+
+    return true;
+  }
+
+  Edge_container& existing_edges;
+};
+
+struct Is_not_degenerate_triangle
+{
+  template<class Point_3>
+  bool operator()(const std::vector<Point_3>& P,
+                  int v0, int v1, int v2) const 
+  {
+    return !CGAL::collinear(P[v0], P[v1], P[v2]);
+  }
+};
+
+// Combine above two
+struct Is_valid_existing_edges_and_degenerate_triangle
+{
+  Is_valid_existing_edges_and_degenerate_triangle(Is_valid_existing_edges::Edge_container& edges)
+    : is_valid_edges(edges) { }
+
+  template<class Point_3>
+  bool operator()(const std::vector<Point_3>& P,
+                  int v0, int v1, int v2) const 
+  {
+    return Is_not_degenerate_triangle()(P,v0,v1,v2)
+                      && is_valid_edges(P,v0,v1,v2);
+  }
+
+  Is_valid_existing_edges is_valid_edges;
+};
+
+/************************************************************************
+ * Weights
+ ************************************************************************/
+
+// First minimizes the worst dihedral angle between patch triangles, then the total surface area as a tiebreaker.
+class Weight_min_max_dihedral_and_area 
+{
+  template<class Weight_, class IsValid>
+  friend struct Weight_calculator;
+
+  template<class Weight_>
+  friend class Weight_incomplete;
+
+public:
+  // these two should not be used (used in test code)
+  std::pair<double,double> w;
+  Weight_min_max_dihedral_and_area(double angle, double area) : w(angle, area) { }
+
+// below required by Weight concept
+private:
+  template<class Point_3, class LookupTable>
+  Weight_min_max_dihedral_and_area(const std::vector<Point_3>& P, 
+                                   const std::vector<Point_3>& Q, 
+                                   int i, int j, int k, 
+                                   const LookupTable& lambda)
+  {
+    CGAL_assertion(i < j);
+    CGAL_assertion(j < k);
+    int n = static_cast<int>(P.size()) -1; // because the first and last point are equal
+    
+    // The CGAL::dihedral angle is measured between the oriented triangles, that is it goes from [-pi, pi]
+    // What we need is the angle between the normals of the triangles between [0, pi]
+    double ang_max = 0;
+
+    // Test each edge
+    int vertices[] = {i, j, k};
+    for(int e = 0; e < 3; ++e) 
+    {
+      int v0      = vertices[e];
+      int v1      = vertices[(e+1)%3];
+      int v_other = vertices[(e+2)%3];
+      double angle = 0;
+      // check whether the edge is border
+      if( (v0 + 1 == v1 || (v0 == n-1 && v1 == 0) ) && !Q.empty() ) {
+        angle = 180 - CGAL::abs( 
+          CGAL::Mesh_3::dihedral_angle(P[v0],P[v1],P[v_other],Q[v0]) );
+      }
+      else {
+        if(e == 2) { continue; }
+        if(lambda.get(v0, v1) != -1){
+          const Point_3& p01 = P[lambda.get(v0, v1)];
+          angle = 180 - CGAL::abs( 
+            CGAL::Mesh_3::dihedral_angle(P[v0],P[v1],P[v_other],p01) );
+        }
+      }
+      ang_max = (std::max)(ang_max, angle);
+    }
+   
+    w = std::make_pair(ang_max, CGAL::sqrt(CGAL::squared_area(P[i],P[j],P[k])));
+  }
+
+public:
+  Weight_min_max_dihedral_and_area operator+(const Weight_min_max_dihedral_and_area& w2) const 
+  {
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+
+    return Weight_min_max_dihedral_and_area((std::max)(w.first, w2.w.first), w.second + w2.w.second);
+  }
+
+  bool operator<(const Weight_min_max_dihedral_and_area& w2) const
+  {
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+
+    if(w.first == w2.w.first)
+    { return w.second < w2.w.second; }
+    return w.first < w2.w.first;
+  }
+
+  bool operator==(const Weight_min_max_dihedral_and_area& w2) const 
+  { return w.first == w2.w.first && w.second == w2.w.second; }
+
+  bool operator!=(const Weight_min_max_dihedral_and_area& w2) const 
+  { return !(*this == w2); }
+
+  static const Weight_min_max_dihedral_and_area DEFAULT() // rule: x + DEFAULT() == x
+  { return Weight_min_max_dihedral_and_area(0,0); }
+  static const Weight_min_max_dihedral_and_area NOT_VALID() 
+  { return Weight_min_max_dihedral_and_area(-1,-1); }
+
+  friend std::ostream& operator<<(std::ostream& out, const Weight_min_max_dihedral_and_area& w) {
+    out << "Max dihedral: " << w.w.first << ", Total area: " << w.w.second;
+    return out;
+  }
+};
+
+// For proof of concept. Tested weakly.
+class Weight_total_edge {
+  template<class Weight_, class IsValid>
+  friend struct Weight_calculator;
+
+private:
+  double total_length;
+
+  Weight_total_edge(double total_length = 0) : total_length(total_length) { }
+
+  template<class Point_3, class LookupTable>
+  Weight_total_edge(const std::vector<Point_3>& P, 
+                    const std::vector<Point_3>&, 
+                    int i, int j, int k, 
+                    const LookupTable&)
+    : total_length(0)
+  {
+    CGAL_assertion(i < j);
+    CGAL_assertion(j < k);
+    int n = P.size() -1; // because the first and last point are equal
+
+    // Test each edge
+    int vertices[] = {i, j, k};
+    for(int e = 0; e < 3; ++e) 
+    {
+      int v0      = vertices[e];
+      int v1      = vertices[(e+1)%3];
+        
+      // check whether the edge is border
+      bool border = (v0 + 1 == v1) || (v0 == n-1 && v1 == 0);
+      if(!border) {
+        total_length += CGAL::sqrt(CGAL::squared_distance(P[v0],P[v1]));
+      }
+    }
+  }
+
+public:
+  Weight_total_edge operator+(const Weight_total_edge& w2) const 
+  {
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+    return Weight_total_edge(total_length + w2.total_length);
+  }
+
+  bool operator<(const Weight_total_edge& w2) const
+  { 
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+    return total_length < w2.total_length; 
+  }
+
+  bool operator==(const Weight_total_edge& w2) const 
+  { return total_length == w2.total_length; }
+  bool operator!=(const Weight_total_edge& w2) const 
+  { return !(*this == w2); }
+
+  static const Weight_total_edge DEFAULT() { return Weight_total_edge(0); } // rule: x + DEFAULT() == x
+  static const Weight_total_edge NOT_VALID() { return Weight_total_edge(-1); }
+  friend std::ostream& operator<<(std::ostream& out, const Weight_total_edge& w) {
+    out << "Total edge length : " << w.total_length;
+    return out;
+  }
+};
+
+// Weights for incomplete patches. It maximize patch size, then ActualWeight as a tiebreaker.
+template<class ActualWeight>
+class Weight_incomplete
+{
+  template<class Weight_, class IsValid>
+  friend struct Weight_calculator;
+
+private:
+  template<class Point_3, class LookupTable>
+  Weight_incomplete(const std::vector<Point_3>& P, 
+    const std::vector<Point_3>& Q, 
+    int i, int j, int k, 
+    const LookupTable& lambda)
+    : weight(P,Q,i,j,k,lambda), patch_size(1)
+  { }
+
+  Weight_incomplete(const ActualWeight& weight, int patch_size) 
+    : weight(weight), patch_size(patch_size)
+  { }
+
+public:
+  Weight_incomplete operator+(const Weight_incomplete& w2) const 
+  {
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+
+    return Weight_incomplete(weight + w2.weight, patch_size + w2.patch_size);
+  }
+
+  bool operator<(const Weight_incomplete& w2) const
+  {
+    CGAL_assertion((*this) != NOT_VALID());
+    CGAL_assertion(w2 != NOT_VALID());
+
+    if(patch_size == w2.patch_size) {
+      return weight < w2.weight;
+    }
+    return patch_size > w2.patch_size; // if patch size is larger, then the weight is smaller
+  }
+
+  bool operator==(const Weight_incomplete& w2) const 
+  { return weight == w2.weight && patch_size == w2.patch_size; }
+
+  bool operator!=(const Weight_incomplete& w2) const 
+  { return !(*this == w2); }
+
+  static const Weight_incomplete DEFAULT() // rule: x + DEFAULT() == x
+  { return Weight_incomplete(ActualWeight::DEFAULT(), 0); }
+  static const Weight_incomplete NOT_VALID()
+  { return Weight_incomplete(ActualWeight::NOT_VALID(), 0); }
+
+  friend std::ostream& operator<<(std::ostream& out, const Weight_incomplete& w) {
+    out << "Patch size: " << w.patch_size << ", Actual weight: " << w.weight;
+    return out;
+  }
+
+  ActualWeight weight;
+  int patch_size;
+};
+
+// Weight calculator class is both responsible from calculating weights, and checking validity of triangle
+template<class Weight_, class IsValid>
+struct Weight_calculator 
+{
+  typedef Weight_ Weight;
+  Weight_calculator(const IsValid& is_valid = IsValid()) : is_valid(is_valid) { }
+
+  template<class Point_3, class LookupTable>
+  Weight operator()(const std::vector<Point_3>& P, 
+    const std::vector<Point_3>& Q, 
+    int i, int j, int k, 
+    const LookupTable& lambda) const 
+  {
+    if( !is_valid(P,i,j,k) ) 
+    { return Weight::NOT_VALID(); }
+    return Weight(P, Q, i,j,k, lambda);
+  }
+
+  IsValid is_valid;
+};
+/************************************************************************
+ * Tracer
+ ************************************************************************/
+// It can produce a patch from both complete and incomplete lambda
+template<class OutputIteratorValueType, class OutputIteratorPatch, class OutputIteratorHole>
+struct Tracer_polyline_incomplete {
+  Tracer_polyline_incomplete(OutputIteratorPatch out, OutputIteratorHole out_hole) 
+    : out(out), out_hole(out_hole)
+  { }
+
+  template <class LookupTable>
+  void
+  operator()(const LookupTable& lambda, int v0, int v1)
+  {
+    CGAL_assertion_code( const int n = lambda.n; )
+    std::stack<std::pair<int, int> > ranges;
+    ranges.push(std::make_pair(v0, v1));
+
+    while(!ranges.empty()) {
+      std::pair<int, int> r = ranges.top(); 
+      ranges.pop();
+      CGAL_assertion(r.first >= 0 && r.first < n);
+      CGAL_assertion(r.second >= 0 && r.second < n);
+
+      if(r.first + 1 == r.second) { continue; }
+
+      int la = lambda.get(r.first, r.second);
+      if(la == -1) {
+        *out_hole++ = std::make_pair(r.first, r.second);
+        continue;
+      }
+
+      CGAL_assertion(la >= 0 && la < n);
+      CGAL_assertion(r.first < la && r.second > la);
+      *out++ = OutputIteratorValueType(r.first, la, r.second);
+
+      ranges.push(std::make_pair(r.first, la));
+      ranges.push(std::make_pair(la, r.second));
+    }
+  }
+
+  OutputIteratorPatch out;
+  OutputIteratorHole  out_hole;
+};
+
+/************************************************************************
+ * Triangulate hole with support of 3D Triangulation
+ ************************************************************************/
+
+// to support incident_facets(Edge e) function for both dimension 2 and 3
+template<unsigned int Dimension, class Triangulator>
+struct Incident_facet_circulator;
+
+template<class Triangulator>
+struct Incident_facet_circulator_base 
+{
+  typedef typename Triangulator::Facet         Facet;
+  typedef typename Triangulator::Edge          Edge;
+  typedef typename Triangulator::Cell_handle   Cell_handle;
+
+  struct Edge_wrapper {
+    Edge_wrapper(Edge e) : e(e) { }
+
+    int vertex_first()
+    { return (std::min)(e.first->vertex(e.second)->info(), e.first->vertex(e.third)->info()); }
+    int vertex_second()
+    { return (std::max)(e.first->vertex(e.second)->info(), e.first->vertex(e.third)->info()); }
+    
+    Edge e;
+  };
+
+  // Finds the other vertex than e.v0 and e.v1 in facet f
+  // Note that this may return infinite vertex
+  int get_third(Facet f, Edge e) {
+    int v0_info = e.first->vertex(e.second)->info();
+    int v1_info = e.first->vertex(e.third )->info();
+    // warning: it should be designed to handle dimension 2 (e.g. f.first->vertex(3)->info() will crash)
+    for(int i = 0; i < 4; ++i) {
+      if(i == f.second) { continue; } // skip the vertex which is not on `f`
+      int f3 = f.first->vertex(i)->info();
+      if(f3 != v0_info && f3 != v1_info) {
+        return f3; 
+      }
+    }
+    CGAL_assertion(false);
+    return -1;
+  }
+
+  Edge_wrapper edge_first(Facet f, Edge e) {
+    int v0_info = (std::min)(e.first->vertex(e.second)->info(),
+                             e.first->vertex(e.third)->info());
+    return Edge(f.first, 
+                get_vertex_index(f.first, v0_info) , 
+                get_vertex_index(f.first, get_third(f,e)));
+  }
+
+  Edge_wrapper edge_second(Facet f, Edge e) {
+    int v1_info = (std::max)(e.first->vertex(e.second)->info(),
+                             e.first->vertex(e.third)->info());
+    return Edge(f.first,
+                get_vertex_index(f.first, v1_info),
+                get_vertex_index(f.first, get_third(f,e)));
+  }
+
+  int get_vertex_index(Cell_handle ch, int info) {
+    // warning: it should be designed to handle dimension 2 (e.g. f.first->vertex(3)->info() will crash)
+    for(int i = 0; i < 4; ++i) {
+      int v = ch->vertex(i)->info();
+      if(v == info) { return i; }
+    }
+    CGAL_assertion(false);
+    return -1;
+  }
+};
+
+// Use the fact that an edge can be incident to 2 facets in dimension 2
+// and all valid facets (which contains finite + infinite vertices but not the NULL vertex) are
+// pointed by index 3 in cells
+template<class Triangulator>
+struct Incident_facet_circulator<2, Triangulator>
+  : Incident_facet_circulator_base<Triangulator>
+{
+  typedef typename Triangulator::Facet         Facet;
+  typedef typename Triangulator::Edge          Edge;
+  typedef typename Triangulator::Triangulation Triangulation;
+  typedef typename Incident_facet_circulator_base<Triangulator>::Edge_wrapper Edge_wrapper;
+
+  Incident_facet_circulator(Edge_wrapper ew, const Triangulation&)
+    : f1( Facet(ew.e.first, 3) ),
+      f2( Facet(ew.e.first->neighbor(3 - ew.e.second - ew.e.third), 3) ),
+      it(f1), e(ew.e)
+  {
+     CGAL_assertion(f1 != f2);
+     CGAL_assertion(e.second < 3 && e.third < 3);
+  }
+  Incident_facet_circulator& operator++() {
+    it = it == f1 ? f2 : f1;
+    return *this;
+  }
+  operator bool() const { return it != f1; }
+
+  int get_third()
+  { return Incident_facet_circulator_base<Triangulator>::get_third(it, e); }
+  Edge_wrapper edge_first() 
+  { return Incident_facet_circulator_base<Triangulator>::edge_first(it, e); }
+  Edge_wrapper edge_second() 
+  { return Incident_facet_circulator_base<Triangulator>::edge_second(it, e); }
+
+  Facet f1, f2, it;
+  Edge e;
+};
+
+// Just a wrapper around Facet_circulator
+template<class Triangulator>
+struct Incident_facet_circulator<3, Triangulator>
+  : Incident_facet_circulator_base<Triangulator>
+{
+  typedef typename Triangulator::Facet            Facet;
+  typedef typename Triangulator::Edge             Edge;
+  typedef typename Triangulator::Triangulation    Triangulation;
+  typedef typename Triangulator::Facet_circulator Facet_circulator;
+  typedef typename Incident_facet_circulator_base<Triangulator>::Edge_wrapper Edge_wrapper;
+
+  Incident_facet_circulator(Edge_wrapper ew, const Triangulation& tr)
+    : it(tr.incident_facets(ew.e)), end(it), e(ew.e)
+  { }
+  Incident_facet_circulator& operator++() {
+    ++it;
+    return *this;
+  }
+  operator bool() const { return it != end; }
+  
+  int get_third() 
+  { return Incident_facet_circulator_base<Triangulator>::get_third(*it, e); }
+  Edge_wrapper edge_first() 
+  { return Incident_facet_circulator_base<Triangulator>::edge_first(*it, e); }
+  Edge_wrapper edge_second() 
+  { return Incident_facet_circulator_base<Triangulator>::edge_second(*it, e); }
+
+  Facet_circulator it;
+  Facet_circulator end;
+  Edge e;
+};
+
+// Another DS for search space, which can be used in triangulate_DT
+// It is useful for extending the search space of 3D Triangulation by appending new triangles
+struct Edge_graph 
+{
+  struct Edge_comp {
+    bool operator()(std::pair<int, int> p0, std::pair<int, int> p1) const {
+      if(p0.first > p0.second) { std::swap(p0.first, p0.second); }
+      if(p1.first > p1.second) { std::swap(p1.first, p1.second); }
+      return p0 < p1;
+    }
+  };
+
+  typedef boost::unordered_set<int> Vertex_container;
+  // contains edges as key, and each edge contains set of third vertices which denote neighbor facets to that edge
+  typedef std::map<std::pair<int, int>, Vertex_container, Edge_comp> Graph;
+
+  struct Edge_wrapper {
+    Edge_wrapper(std::pair<int, int> e) : e(e) { }
+
+    int vertex_first()  const { return (std::min)(e.first, e.second); }
+    int vertex_second() const { return (std::max)(e.first, e.second); }
+    std::pair<int, int> e;
+  };
+
+  struct Incident_facet_circulator
+  {
+    Incident_facet_circulator(Edge_wrapper ew, const Edge_graph& tr)
+    {
+      Graph::const_iterator it_e = tr.graph.find(ew.e);
+      CGAL_assertion(it_e != tr.graph.end());
+      it = it_e->second.begin();
+      end = it_e->second.end();
+      e = ew.e;
+    }
+    Incident_facet_circulator& operator++() {
+      ++it;
+      return *this;
+    }
+    operator bool() const { return it != end; }
+
+    int get_third() const { return *it; }
+    Edge_wrapper edge_first()  const { return std::make_pair(Edge_wrapper(e).vertex_first(), *it); }
+    Edge_wrapper edge_second() const { return std::make_pair(Edge_wrapper(e).vertex_second(), *it); }
+
+    Vertex_container::const_iterator it;
+    Vertex_container::const_iterator end;
+    std::pair<int, int> e;
+  };
+
+  template<class IncidentFacetCirculator, class Triangulation>
+  void init(const Triangulation& tr, const std::vector<bool>& edge_exist)
+  {
+    typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;
+
+    n = static_cast<int>(edge_exist.size());
+    for(Finite_edges_iterator eb = tr.finite_edges_begin(); eb != tr.finite_edges_end(); ++eb) 
+    {
+      int v0 = eb->first->vertex(eb->second)->info();
+      int v1 = eb->first->vertex(eb->third )->info();
+      Vertex_container& e_neighs = graph[std::make_pair(v0, v1)];
+
+      IncidentFacetCirculator fb(*eb, tr);
+      do {
+        int v2 = fb.get_third();
+        if(v2 == -1) { continue; }
+        e_neighs.insert(v2);
+      } while(++fb);
+    }
+
+    for(int i = 0; i < n; ++i) {
+      if(edge_exist[i]) { continue; }
+      int v0 = i == n-1 ? 0   : i;
+      int v1 = i == n-1 ? n-1 : i+1;
+      add_all_possible_to_edge(std::make_pair(v0, v1));
+    }
+  }
+
+  void add_all_possible_to_edge(std::pair<int, int> e) {
+    Vertex_container& e_neighs = graph[e];
+    for(int i = 0; i < n; ++i) {
+      if(i == e.first || i == e.second) { continue; }
+      e_neighs.insert(i);
+      graph[std::make_pair(i, e.first)].insert(e.second);
+      graph[std::make_pair(i, e.second)].insert(e.first);
+    }
+  }
+
+  Graph graph;
+  int n;
+};
+
+template<
+  class Kernel,
+  class Tracer,
+  class WeightCalculator,
+  template <class> class LookupTable = Lookup_table
+>
+class Triangulate_hole_polyline;
+
+// By default Lookup_table_map is used, since Lookup_table requires n*n mem.
+// Performance decrease is nearly 2x (for n = 10,000, for larger n Lookup_table just goes out of mem) 
+template<
+  class Kernel,
+  class Tracer,
+  class WeightCalculator,
+  template <class> class LookupTable = Lookup_table_map
+>
+class Triangulate_hole_polyline_DT 
+{
+  struct Auto_count {
+    typedef std::pair<typename Kernel::Point_3, int> result_type;
+
+    Auto_count(int count = 0) : count(count)  { }
+    result_type operator()(const typename Kernel::Point_3& p) const
+    { return std::make_pair(p, count++); }
+    mutable int count;
+  };
+
+public:
+  typedef typename WeightCalculator::Weight                   Weight;
+  typedef typename Kernel::Point_3                            Point_3;
+  typedef std::vector<Point_3>                                Polyline_3;
+
+  typedef Triangulation_vertex_base_with_info_3<int, Kernel>  VB_with_id;
+  typedef Triangulation_data_structure_3<VB_with_id>          TDS;
+  typedef Delaunay_triangulation_3<Kernel, TDS>               Triangulation;
+
+  typedef typename Triangulation::Finite_edges_iterator       Finite_edges_iterator;
+  typedef typename Triangulation::Facet_circulator            Facet_circulator;
+  typedef typename Triangulation::Cell_handle                 Cell_handle;
+  typedef typename Triangulation::Vertex_handle               Vertex_handle;
+  typedef typename Triangulation::Edge                        Edge;
+  typedef typename Triangulation::Facet                       Facet;
+
+  typedef Incident_facet_circulator<2, Triangulate_hole_polyline_DT> IFC_2;
+  typedef Incident_facet_circulator<3, Triangulate_hole_polyline_DT> IFC_3;
+
+  Weight operator()(const Polyline_3& P, 
+                    const Polyline_3& Q,
+                    Tracer& tracer,
+                    const WeightCalculator& WC) const
+  {
+    CGAL_assertion(P.front() == P.back());
+    CGAL_assertion(Q.empty() || (Q.front() == Q.back()));
+    CGAL_assertion(Q.empty() || (P.size() == Q.size()));
+
+    int n = static_cast<int>(P.size())-1; // because the first and last point are equal
+    Triangulation tr;
+    std::vector<bool> edge_exist;
+    std::pair<int, int> range(0, n-1);
+    boost::tuple<boost::optional<Edge>, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist);
+    if(!res.template get<2>()) {
+      #ifndef CGAL_TEST_SUITE
+      CGAL_warning(!"Returning no output. Dimension of 3D Triangulation is below 2!");
+      #else
+      std::cerr << "W: Returning no output. Dimension of 3D Triangulation is below 2!\n";
+      #endif
+      return Weight::NOT_VALID();
+    }
+
+    // all border edges inside 3D Triangulation
+    if(boost::get<1>(res)) {
+      LookupTable<Weight> W(n, Weight::DEFAULT()); // do not forget that these default values are not changed for [i, i+1]
+      LookupTable<int>    lambda(n,-1);
+
+      typename Incident_facet_circulator_base<Triangulate_hole_polyline_DT>::Edge_wrapper
+        e_start(*boost::get<0>(res)); 
+      if(tr.dimension() == 3) {
+        triangulate_DT<IFC_3>(P, Q, W, lambda, e_start, tr, WC, false);
+      }
+      else {
+        CGAL_assertion(tr.dimension() == 2);
+        triangulate_DT<IFC_2>(P, Q, W, lambda, e_start, tr, WC, false);
+      }
+
+      if(W.get(0, n-1) == Weight::NOT_VALID()) {
+        #ifndef CGAL_TEST_SUITE
+        CGAL_warning(!"Returning no output. No possible triangulation is found!");
+        #else
+        std::cerr << "W: Returning no output. No possible triangulation is found!\n";
+        #endif
+        return Weight::NOT_VALID();
+      }
+
+      tracer(lambda, 0, n-1);
+      return W.get(0,n-1);
+    }
+    
+    // How to handle missing border edges
+    #if 1
+    return fill_by_extra_triangles(tr, edge_exist, P, Q, tracer, WC);
+    #else
+    // This approach produce better patches when used with Weight_incomplete 
+    // (which should be arranged in internal::triangulate_hole_Polyhedron, triangulate_polyline)
+    return fill_by_incomplete_patches(tr, res.get<0>(), edge_exist, P, Q, tracer, WC);
+    #endif
+  }
+
+private:
+
+  /************************************************************************
+  * Main algorithm which construct a minimum patch top-down searching through the space of tr
+  *
+  * + Edge_DT should have:
+  *   - vertex_first() vertex_second() functions where vertex_first() always returns vertex with smaller id
+  * + IncidentFacetCirculator should have:
+  *   - constructor with Edge_DT and Triangulation_DT
+  *   - pre-increment, conversion to bool
+  *   - get_third() returning the third vertex of facet pointed by circulator
+  *   - edge_first() and edge_second() neighbor edges to get_third() vertex
+  ************************************************************************/
+  template<class IncidentFacetCirculator, class Edge_DT, class Triangulation_DT>
+  void triangulate_DT(const Polyline_3& P, 
+                      const Polyline_3& Q, 
+                      LookupTable<Weight>& W, 
+                      LookupTable<int>& lambda, 
+                      Edge_DT e,
+                      const Triangulation_DT& tr,
+                      const WeightCalculator& WC,
+                      const bool produce_incomplete) const
+  {
+    /**********************************************************************
+     *  + Default W value is Weight::DEFAULT(), default lambda value is -1.
+     *  + DEFAULT() is used to check whether the region (v0-v1) is processed.
+     *  + If a range v0-v1 does not contains any possible triangulation, then W[v0,v1] = NOT_VALID() and lambda[v0,v1] = -1
+     *  + Note that w + DEFAULT() == w must hold
+     */
+    int v0 = e.vertex_first();
+    int v1 = e.vertex_second();
+    CGAL_assertion(v0 < v1);  // vertex_first() should always return vertex with smaller index
+    CGAL_assertion(v0 != -1); // edge can not be incident to infinite vertex
+
+    if( v0 + 1 == v1 || // border edge - should not check v0 = 0, v1 = n-1, because it is the initial edge where the algorithm starts
+        W.get(v0, v1) != Weight::DEFAULT() ) // the range is previously processed
+    { return; }
+
+    int m_min = -1;
+    Weight w_min = Weight::NOT_VALID();
+
+    IncidentFacetCirculator fb(e, tr);
+    do {
+      int v2 = fb.get_third();
+      if(v2 < v0 || v2 > v1) { continue; } // this will also skip infinite vertex
+
+      if(WC(P,Q, v0,v2,v1, lambda) == Weight::NOT_VALID())
+      { continue; } // computed weight in here is not correct weight
+                    // since max dih angle requires neighbor ranges to be already computed. It is just for checking validity.
+      
+      Weight w = Weight::DEFAULT();
+
+      Edge_DT e0 = fb.edge_first(); // edge v0-v2
+      CGAL_assertion(e0.vertex_first() == v0 && e0.vertex_second() == v2);
+      triangulate_DT<IncidentFacetCirculator>(P, Q, W, lambda, e0, tr, WC, produce_incomplete); // region v0-v2
+      const Weight& we0 = W.get(v0, v2);
+
+      if(!produce_incomplete && we0 == Weight::NOT_VALID()) 
+      { continue; } // not producing incomplete patches and failed to fill sub-range v0-v2, so no reason to proceed
+      if(we0 != Weight::NOT_VALID()) // to not consider we0 if it is NOT_VALID (it is valid when produce_incomplete = true)
+      { w = w + we0; }
+
+      Edge_DT e1 = fb.edge_second(); // edge v2-v1
+      CGAL_assertion(e1.vertex_first() == v2 && e1.vertex_second() == v1);
+      triangulate_DT<IncidentFacetCirculator>(P, Q, W, lambda, e1, tr, WC, produce_incomplete); // region v2-v1
+      const Weight& we1 = W.get(v2, v1);
+
+      if(!produce_incomplete && we1 == Weight::NOT_VALID()) 
+      { continue; }
+      if(we1 != Weight::NOT_VALID()) // to not consider we1 if it is NOT_VALID (it is valid when produce_incomplete = true)
+      { w = w + we1; }
+
+      w = w + WC(P,Q, v0,v2,v1, lambda);
+      if(m_min == -1 || w < w_min){
+        w_min = w;
+        m_min = v2;
+      }
+    } while(++fb);
+
+    // can be m_min = -1 and w_min = NOT_VALID which means no possible triangulation between v0-v1
+    W.put(v0,v1, w_min);
+    lambda.put(v0,v1, m_min);
+  }
+
+  // returns [h.first-h.second edge, true if all edges inside 3D triangulation, true if tr.dimension() >= 2]
+  boost::tuple<boost::optional<Edge>, bool, bool>
+  construct_3D_triangulation(const Polyline_3& P,
+                             std::pair<int,int> h,
+                             Triangulation& tr,
+                             std::vector<bool>& edge_exist) const 
+  {
+    // construct 3D tr with P[h.first], P[h.second] also assign ids from h.first to h.second
+    boost::optional<Edge> e;
+    int n_border = h.second - h.first + 1;
+    tr.insert(boost::make_transform_iterator(boost::next(P.begin(), h.first), Auto_count(h.first)),
+              boost::make_transform_iterator(boost::next(P.begin(), h.second +1), Auto_count(h.first)));
+    tr.infinite_vertex()->info() = -1;
+
+    if(tr.dimension() < 2) { return boost::make_tuple(e, false, false); }
+
+    // check whether all edges are included in DT, and get v0-vn-1 edge
+    edge_exist.assign(n_border, false);
+    int nb_exists = 0;
+    Finite_edges_iterator v_first_v_second_edge; // range.first - range.second edge
+    for(Finite_edges_iterator eb = tr.finite_edges_begin();
+        eb != tr.finite_edges_end();
+        ++eb) 
+    {
+      int v0_id = eb->first->vertex(eb->second)->info();
+      int v1_id = eb->first->vertex(eb->third )->info();
+      if(v0_id > v1_id) { std::swap(v0_id, v1_id); }
+
+      // to start from v0 vn-1 edge
+      if(v0_id == h.first && v1_id == h.second) { v_first_v_second_edge = eb; }
+
+      // check whether the edge is border edge
+      int border_id = -1;
+      if(v0_id + 1 == v1_id)                         { border_id = v0_id; }
+      else if(v0_id == h.first && v1_id == h.second) { border_id = v1_id; }
+
+      if(border_id != -1 && !edge_exist[border_id - h.first]) {
+        ++nb_exists;
+        edge_exist[border_id - h.first] = true;
+      }
+    }
+    CGAL_assertion(n_border >= nb_exists);
+
+    bool is_3D_T_complete = (nb_exists == n_border);
+    if(edge_exist[n_border-1]) { e = *v_first_v_second_edge; }
+    return boost::make_tuple(e, is_3D_T_complete, true);
+  }
+
+  /************************************************************************
+  * Try to construct hole part by part.
+  *
+  * What need to be improved:
+  *  + if 3D triangulation does not contain the start-edge (edge between v0 vn-1) we directly switch to all space. 
+  *  + when switched to all-space, we use map based lookup tables.
+  ************************************************************************/
+  Weight fill_by_incomplete_patches(Triangulation& tr,
+                                    boost::optional<Edge> start_edge,
+                                    std::vector<bool>& edge_exist,
+                                    const Polyline_3& P, 
+                                    const Polyline_3& Q,
+                                    Tracer& tracer,
+                                    const WeightCalculator& WC) const
+  {
+    typedef std::pair<int, int> Range;
+    typedef std::back_insert_iterator<std::vector<Range> > Output_hole_iterator;
+    typedef Tracer_polyline_incomplete<boost::tuple<int, int, int>, Emptyset_iterator, Output_hole_iterator> Remaining_holes_tracer;
+    
+    std::vector<Range> remaining_holes;
+    
+    int n_all = P.size()-1;// because the first point and last point are equal
+    remaining_holes.push_back(Range(0, n_all-1)); // corresponds to start_edge 
+
+    LookupTable<Weight> W(n_all, Weight::DEFAULT()); // do not forget that these default values are not changed for [i, i+1]
+    LookupTable<int>    lambda(n_all,-1);
+
+    while(true) {
+      Range h = remaining_holes.back();
+      remaining_holes.pop_back();
+     
+      if(start_edge) {
+        typename IFC_3::Edge_wrapper e(*start_edge);
+        CGAL_assertion(h.first == e.vertex_first() && 
+                       h.second == e.vertex_second()); 
+      }
+
+      if(!start_edge) {
+        // switch to brute force 
+        Triangulate_hole_polyline<Kernel, Tracer, WeightCalculator, LookupTable> all_space;
+        all_space.triangulate_all(P, Q, WC, std::make_pair(h.first, h.second), W, lambda);
+        if(W.get(h.first, h.second) == Weight::NOT_VALID()) {
+          CGAL_warning(!"Returning no output. Filling hole with incomplete patches is not successful!");
+          return Weight::NOT_VALID();
+        }
+      }
+      else {
+        // run the algorithm
+        typename IFC_3::Edge_wrapper e(*start_edge);
+        if(tr.dimension() == 3) 
+        {
+          triangulate_DT<IFC_3>(P, Q, W, lambda, e, tr, WC, true);
+        }
+        else {
+          CGAL_assertion(tr.dimension() == 2);
+          triangulate_DT<IFC_2>(P, Q, W, lambda, e, tr, WC, true);
+        }
+        // check whether there is any improvement (at least we should construct one triangle)
+        if(W.get(h.first, h.second) == Weight::NOT_VALID()) {
+          // switch to brute force 
+          Triangulate_hole_polyline<Kernel, Tracer, WeightCalculator, LookupTable> all_space;
+          all_space.triangulate_all(P, Q, WC, std::make_pair(h.first, h.second), W, lambda);
+          if(W.get(h.first, h.second) == Weight::NOT_VALID()) {
+            CGAL_warning(!"Returning no output. Filling hole with incomplete patches is not successful!");
+            return Weight::NOT_VALID();
+          }
+        }
+        // gather remaining holes
+        Remaining_holes_tracer hole_tracer((Emptyset_iterator()), (Output_hole_iterator(remaining_holes)));
+        hole_tracer(lambda, e.vertex_first(), e.vertex_second());
+      }
+
+      if(remaining_holes.empty()) { break; }
+      // construct tr for next coming hole
+      h = remaining_holes.back();
+      tr.clear();
+      boost::tuple<boost::optional<Edge>, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist);
+      if(!boost::get<0>(res)) {
+        CGAL_warning(!"Returning no output. Filling hole with incomplete patches is not successful!");
+        return Weight::NOT_VALID();
+      }
+      start_edge = *boost::get<0>(res);
+      // clear related regions in W, lambda for next coming hole
+      W.set_range_to_default(h.first, h.second);
+      lambda.set_range_to_default(h.first, h.second);
+    }
+    tracer(lambda, 0, n_all-1);
+
+    // W.get(0, n_all -1) is not correct weight (since we do not update weights while we are filling remaining holes), 
+    // we need to recalculate it
+    std::stack<std::pair<int, int> > ranges;
+    ranges.push(std::make_pair(0, n_all-1));
+    Weight total_weight = Weight::DEFAULT();
+    while(!ranges.empty()) {
+      std::pair<int, int> r = ranges.top(); 
+      ranges.pop();
+      if(r.first + 1 == r.second) { continue; }
+      int la = lambda.get(r.first, r.second);
+      total_weight = total_weight + WC(P,Q, r.first,la,r.second, lambda);
+      ranges.push(std::make_pair(r.first, la));
+      ranges.push(std::make_pair(la, r.second));
+    }
+    return total_weight;
+  }
+  
+  /************************************************************************
+   * This approach extends the search space by adding extra triangles.
+   *
+   * + Initial search space is 3D Triangulation.
+   * + For each border edge which is not inside 3DT, we add all possible triangles containing that edge to the search space.
+   *   Example: say border edge [4-5] is not found in 3DT, then triangles = { [0,4,5] [1,4,5] [2,4,5] ... [ n-1,4,5] } 
+   *   are added to the search space.
+   *
+   * I guess this approach does not make the search space complete, since there are some cases that it still returns no patch.
+   ************************************************************************/
+  Weight fill_by_extra_triangles(const Triangulation& tr, 
+                                 const std::vector<bool>& edge_exist,
+                                 const Polyline_3& P, 
+                                 const Polyline_3& Q,
+                                 Tracer& tracer,
+                                 const WeightCalculator& WC) const
+  {
+    int n = static_cast<int>(edge_exist.size());
+    LookupTable<Weight> W(n, Weight::DEFAULT()); // do not forget that these default values are not changed for [i, i+1]
+    LookupTable<int>    lambda(n,-1);
+
+    Edge_graph edge_graph;
+
+    if(tr.dimension() == 3) 
+    { edge_graph.init<IFC_3>(tr, edge_exist); }
+    else 
+    { edge_graph.init<IFC_2>(tr, edge_exist); }
+
+    Edge_graph::Edge_wrapper e_start(std::make_pair(0, n-1));
+    triangulate_DT<Edge_graph::Incident_facet_circulator>
+      (P, Q, W, lambda, e_start, edge_graph, WC, false);
+    
+    if(W.get(0, n-1) == Weight::NOT_VALID()) {
+      #ifndef CGAL_TEST_SUITE
+      CGAL_warning(!"Returning no output. Filling hole with extra triangles is not successful!");
+      #else
+      std::cerr << "W: Returning no output. Filling hole with extra triangles is not successful!\n";
+      #endif
+      return Weight::NOT_VALID();
+    }
+
+    tracer(lambda, 0, n-1);
+    return W.get(0, n-1);
+  }
+}; // End of Triangulate_hole_polyline_DT
+
+/************************************************************************
+ * Triangulate hole by using all search space
+ ************************************************************************/
+template<
+  class Kernel,
+  class Tracer,
+  class WeightCalculator,
+  template <class> class LookupTable
+>
+class Triangulate_hole_polyline {
+public:
+  typedef typename WeightCalculator::Weight  Weight;
+  typedef typename Kernel::Point_3           Point_3;
+  typedef std::vector<Point_3>               Polyline_3;
+
+  Weight operator()(const Polyline_3& P,
+                    const Polyline_3& Q,
+                    Tracer& tracer,
+                    const WeightCalculator& WC) const
+  {
+    CGAL_assertion(P.front() == P.back());
+    CGAL_assertion(Q.empty() || (Q.front() == Q.back()));
+    CGAL_assertion(Q.empty() || (P.size() == Q.size()));
+    
+    int n = static_cast<int>(P.size()) - 1;                       // because the first and last point are equal
+    LookupTable<Weight> W(n,Weight::DEFAULT()); // do not forget that these default values are not changed for [i, i+1]
+    LookupTable<int>    lambda(n,-1);
+    
+    triangulate_all(P, Q, WC, std::make_pair(0,n-1), W, lambda);
+
+    if(W.get(0,n-1) == Weight::NOT_VALID()) {
+      #ifndef CGAL_TEST_SUITE
+      CGAL_warning(!"Returning no output. No possible triangulation is found!");
+      #else
+      std::cerr << "W: Returning no output. No possible triangulation is found!\n";
+      #endif
+      return Weight::NOT_VALID();
+    }
+
+    tracer(lambda, 0, n-1);
+    return W.get(0,n-1);
+  }
+
+  void triangulate_all(const Polyline_3& P,
+                       const Polyline_3& Q,
+                       const WeightCalculator& WC,
+                       std::pair<int, int> range,
+                       LookupTable<Weight>& W, 
+                       LookupTable<int>& lambda) const
+  {
+    for(int j = 2; j<= range.second; ++j) {              // determines range (2 - 3 - 4 )
+      for(int i=range.first; i<= range.second-j; ++i) {  // iterates over ranges and find min triangulation in those ranges 
+        int k = i+j;                                     // like [0-2, 1-3, 2-4, ...], [0-3, 1-4, 2-5, ...]
+
+        int m_min = -1;
+        Weight w_min = Weight::NOT_VALID();
+        // i is the range start (e.g. 1) k is the range end (e.g. 5) -> [1-5]. Now subdivide the region [1-5] with m -> 2,3,4
+        for(int m = i+1; m<k; ++m) { 
+          // now the regions i-m and m-k might be valid(constructed) patches,
+          if( W.get(i,m) == Weight::NOT_VALID() || W.get(m,k) == Weight::NOT_VALID() ) 
+          { continue; }
+
+          const Weight& w_imk = WC(P,Q,i,m,k, lambda);
+          if(w_imk == Weight::NOT_VALID()) 
+          { continue; }
+
+          const Weight& w = W.get(i,m) + W.get(m,k) + w_imk;
+          if(m_min == -1 || w < w_min) {
+            w_min = w;
+            m_min = m;
+          }
+        }
+
+        // can be m_min = -1 and w_min = NOT_VALID which means no possible triangulation between i-k
+        W.put(i,k,w_min);
+        lambda.put(i,k, m_min);
+      }
+    }
+  }
+};
+
+/***********************************************************************************
+ * Internal entry point for both polyline and Polyhedron_3 triangulation functions
+ ***********************************************************************************/
+template <
+  typename PointRange1,
+  typename PointRange2,
+  typename Tracer,
+  typename WeightCalculator,
+  typename Kernel
+>
+typename WeightCalculator::Weight
+triangulate_hole_polyline(const PointRange1& points,
+                          const PointRange2& third_points,
+                          Tracer& tracer,
+                          const WeightCalculator& WC,
+                          bool use_delaunay_triangulation,
+                          const Kernel&)
+{
+  typedef Kernel        K;
+  typedef typename K::Point_3    Point_3;
+  typedef CGAL::internal::Triangulate_hole_polyline_DT<K, Tracer, WeightCalculator> Fill_DT;
+  typedef CGAL::internal::Triangulate_hole_polyline<K, Tracer, WeightCalculator>    Fill;
+
+  std::vector<Point_3> P(boost::begin(points), boost::end(points));
+  std::vector<Point_3> Q(boost::begin(third_points), boost::end(third_points));
+
+  if(P.front() != P.back()){
+    P.push_back(P.front());
+    if( !Q.empty() && P.size() > Q.size()) {
+      Q.push_back(Q.front());
+    }
+  }
+
+  typename WeightCalculator::Weight w = use_delaunay_triangulation ?
+    Fill_DT().operator()(P,Q,tracer,WC) :
+    Fill().operator()(P,Q,tracer,WC);
+  CGAL_TRACE_STREAM << w << std::endl;
+  return w;
+}
+
+} // namespace internal
+
+} // namespace CGAL
+
+#endif // CGAL_HOLE_FILLING_TRIANGULATE_HOLE_POLYLINE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h
new file mode 100644
index 0000000..9786b6a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_INTERNAL_HOLE_FILLING_DO_NOT_USE_DT3
+#define CGAL_POLYGON_MESH_PROCESSING_INTERNAL_HOLE_FILLING_DO_NOT_USE_DT3
+
+#define CGAL_HOLE_FILLING_DO_NOT_USE_DT3
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_INTERNAL_HOLE_FILLING_DO_NOT_USE_DT3
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/experimental/experimental_code.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/experimental/experimental_code.h
new file mode 100644
index 0000000..ea27c03
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/experimental/experimental_code.h
@@ -0,0 +1,236 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+/************************************************************************
+ * Currently not useful code pieces, in case there will be any need in the future.
+ * Also they might not work when they plugged-in due to recent changes.
+ ************************************************************************/
+
+// It can produce a patch from both complete and incomplete lambda
+// WARNING: Not working good for all cases
+// For holes, this code first close them then erase them. 
+// However the algorithm might produce holes which are invalid to close (closing them breaks edge manifoldness, so erasing doesn't work)
+template<class Polyhedron, class OutputIteratorPatch, class OutputIteratorHole>
+struct Tracer_polyhedron_incomplete 
+{
+  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+  typedef typename Polyhedron::Facet_handle    Facet_handle;
+
+  Tracer_polyhedron_incomplete(OutputIteratorPatch out,
+                               OutputIteratorHole out_hole,
+                               Polyhedron& polyhedron,
+                               std::vector<Halfedge_handle>& P)
+    : out(out), out_hole(out_hole), polyhedron(polyhedron), P(P)
+  { }
+
+  template <class LookupTable>
+  void 
+  operator()(const LookupTable& lambda, int i, int k)
+  {
+    std::vector<Facet_handle> facets_to_delete;
+    (*this)(lambda, i, k, facets_to_delete, true);
+    for(typename std::vector<Facet_handle>::iterator it = facets_to_delete.begin(); 
+        it != facets_to_delete.end(); ++it)
+    {
+      *out_hole++=(*it)->halfedge(); // each deleted facet corresponds to a new hole
+      polyhedron.erase_facet((*it)->halfedge());
+    }
+  }
+
+private:
+  template <class LookupTable>
+  Halfedge_handle 
+  operator()(const LookupTable& lambda, 
+             int i, int k,
+             std::vector<Facet_handle>& facets_to_delete,
+             bool last)
+  {
+    if(i + 1 == k) { return P[i+1]; }
+
+    Halfedge_handle h, g;
+    if(i+2 == k){
+
+      if(last)
+      { h = polyhedron.fill_hole(P[i+1]); }
+      else 
+      { h = polyhedron.add_facet_to_border(P[i+1]->prev(), P[i+2/*k*/]); }
+
+      CGAL_assertion(h->facet() != Facet_handle());
+
+      int la = lambda.get(i, k);
+      if(la == -1) {
+        facets_to_delete.push_back(h->facet());
+      }
+      else {
+        *out++ = h->facet();
+      }
+      return h->opposite();
+    } 
+    else 
+    {
+      int la = lambda.get(i, k);
+      if(la == -1) {
+        if(last)
+        { h = polyhedron.fill_hole(P[i+1]); }
+        else 
+        { h = polyhedron.add_facet_to_border(P[i+1]->prev(), P[i+2/*k*/]); }
+        facets_to_delete.push_back(h->facet());
+        return h->opposite();
+      }
+      else {
+        h = operator()(lambda, i, la, facets_to_delete, false);
+        g = operator()(lambda, la, k, facets_to_delete, false);
+
+        if(last)
+        { h = polyhedron.fill_hole(g); }
+        else 
+        { h = polyhedron.add_facet_to_border(h->prev(), g); }
+
+        CGAL_assertion(h->facet() != Facet_handle());
+        *out++ = h->facet();
+        return h->opposite();
+      }
+    }
+  }
+
+public:
+  OutputIteratorPatch out;
+  OutputIteratorHole out_hole;
+  Polyhedron& polyhedron;
+  std::vector<Halfedge_handle>& P;
+};
+
+// Try closing holes by gathering incomplete patches together (an external approach)
+template <typename OutputIteratorValueType, typename InputIterator, typename OutputIterator>
+OutputIterator
+triangulate_hole_polyline_incomplete(InputIterator pbegin, InputIterator pend, 
+                                     InputIterator qbegin, InputIterator qend, 
+                                     OutputIterator out)
+{
+  
+  typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
+  typedef Weight_incomplete<Weight_min_max_dihedral_and_area>      Weight;
+  typedef Weight_calculator<Weight, Is_valid_degenerate_triangle>  WC;
+
+  typedef std::vector<boost::tuple<int, int, int> >                   Facet_vector; /* deliberately not OutputIteratorValueType*/
+  typedef std::back_insert_iterator<Facet_vector>                     OutIt;
+  typedef Tracer_polyline_incomplete<Facet_vector::value_type, OutIt> Tracer;
+  typedef std::pair<int, int> Range;
+   
+  std::vector<Point_3> P(pbegin, pend);
+  std::vector<Point_3> Q(qbegin, qend);
+
+  if(P.front() != P.back()){
+    P.push_back(P.front());
+    if( !Q.empty() && P.size() > Q.size()) {
+      Q.push_back(Q.front());
+    }
+  }
+  
+  std::vector<OutputIteratorValueType>   patch_facets;
+  std::stack<Range>                      remaining_holes;
+
+  remaining_holes.push(Range(0, P.size() -2));
+
+  while(!remaining_holes.empty()) {
+    Range h = remaining_holes.top();
+    remaining_holes.pop();
+
+    std::vector<Point_3> P_r(&P[h.first], (&P[h.second]) + 1);
+    std::vector<Point_3> Q_r;
+    if(!Q.empty()) { Q_r.insert(Q_r.begin(), &Q[h.first], (&Q[h.second]) + 1); };
+
+    Facet_vector new_facets;
+    OutIt new_facets_out(new_facets);
+    std::vector<Range> new_holes;
+    std::back_insert_iterator<std::vector<Range> > new_holes_out(new_holes);
+    Tracer tracer(new_facets_out, new_holes_out);
+
+    triangulate_hole_polyline(P_r, Q_r, tracer, WC(), true, true);
+
+    if(new_facets.empty()) {
+      new_holes.clear();
+      //triangulate_hole_polyline(P_r, Q_r, tracer, WC(), false, true);
+      if(new_facets.empty()) {
+        // if no patch facets created and also we are using brute force approach, then there is nothing to do,
+        // leave `out` intact and return
+        CGAL_warning(!"Returning no output. Filling hole with incomplete patches is not successful!");
+        return out;
+      }
+    }
+    // put new borders to remaining_holes
+    for(typename std::vector<Range>::iterator it = new_holes.begin(); it != new_holes.end(); ++it) {
+      remaining_holes.push(std::make_pair(it->first + h.first, it->second + h.first));
+    }
+    tracer.remaining_holes.clear();
+    for(Facet_vector::iterator it = new_facets.begin(); it != new_facets.end(); ++it) {
+      patch_facets.push_back(
+        OutputIteratorValueType(it->get<0>() + h.first, it->get<1>() + h.first, it->get<2>() + h.first));
+    }
+  }
+
+  return std::copy(patch_facets.begin(), patch_facets.end(), out);
+}
+
+// (for Polyhedron_3) Try closing holes by gathering incomplete patches together (an external approach)
+template<class Polyhedron, class OutputIterator>
+std::pair<OutputIterator, Weight_min_max_dihedral_and_area>
+triangulate_hole_Polyhedron_incomplete(Polyhedron& polyhedron, 
+                                       typename Polyhedron::Halfedge_handle border_halfedge, 
+                                       OutputIterator out)
+{
+  typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+  typedef typename Polyhedron::Facet_handle    Facet_handle;
+
+  Weight_min_max_dihedral_and_area weight_total = Weight_min_max_dihedral_and_area::DEFAULT();
+  std::vector<Facet_handle>   patch_facets;
+  std::stack<Halfedge_handle> remaining_holes;
+  remaining_holes.push(border_halfedge);
+
+  while(!remaining_holes.empty()) {
+    Halfedge_handle h = remaining_holes.top();
+    remaining_holes.pop();
+    std::vector<Halfedge_handle> holes_h;
+
+    std::size_t patch_facets_before = patch_facets.size();
+    Weight_min_max_dihedral_and_area w =
+      triangulate_hole_Polyhedron(polyhedron, h, back_inserter(patch_facets), back_inserter(holes_h), true);
+
+    if(patch_facets_before == patch_facets.size()) {
+      holes_h.clear();
+      patch_facets_before = patch_facets.size();
+      w = triangulate_hole_Polyhedron(polyhedron, h, back_inserter(patch_facets), back_inserter(holes_h), false);
+      if(patch_facets_before == patch_facets.size()) {
+        // if no patch facets created and also we are using brute force approach, then there is nothing to do,
+        // leave `out` intact and return
+        CGAL_warning(!"Returning no output. Filling hole with incomplete patches is not successful!");
+        return std::make_pair(out, Weight_min_max_dihedral_and_area::NOT_VALID());
+      }
+    }
+    // put new borders to remaining_holes and update weight
+    for(typename std::vector<Halfedge_handle>::iterator it = holes_h.begin(); it != holes_h.end(); ++it) {
+      //remaining_holes.push(*it);
+    }
+    weight_total = weight_total + w;
+  }
+
+  out = std::copy(patch_facets.begin(), patch_facets.end(), out);
+  return std::make_pair(out, weight_total);
+}
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h
new file mode 100644
index 0000000..4ea6bca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h
@@ -0,0 +1,134 @@
+// Copyright (c) 2008-2009  INRIA Sophia-Antipolis (France), ETH Zurich (Switzerland).
+// Copyright (c) 2010  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Camille Wormser, Pierre Alliez, Stephane Tayeb, Laurent Rineau
+//
+// File adapted from <CGAL/internal/AABB_tree/AABB_traversal_traits.h>
+//
+
+#ifndef CGAL_AABB_FILTERED_PROJECTION_TRAITS_H
+#define CGAL_AABB_FILTERED_PROJECTION_TRAITS_H
+
+#include <CGAL/internal/boost/property_map.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/internal/AABB_tree/AABB_node.h>
+#include <CGAL/internal/AABB_tree/Primitive_helper.h>
+
+namespace CGAL {
+namespace Polygon_mesh_processing {
+namespace internal {
+
+/**
+ * @class Projection_traits
+ */
+template <typename AABBTraits,
+          typename IndexPropertyMap,
+          bool keep = false>
+class Filtered_projection_traits
+{
+  typedef typename AABBTraits::FT FT;
+  typedef typename AABBTraits::Point_3 Point_3;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef typename AABBTraits::Bounding_box Bounding_box;
+  typedef typename AABBTraits::Primitive::Id Primitive_id;
+  typedef typename AABBTraits::Point_and_primitive_id Point_and_primitive_id;
+  typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
+  typedef ::CGAL::AABB_node<AABBTraits> Node;
+  typedef typename ::CGAL::AABB_tree<AABBTraits>::size_type size_type;
+
+  typedef typename boost::property_traits<IndexPropertyMap>::value_type Index_type;
+
+  typedef std::set<typename boost::remove_const<Index_type>::type> Set_of_indices;
+
+public:
+  template <typename IndexToIgnoreIterator>
+  Filtered_projection_traits(IndexToIgnoreIterator begin,
+                             IndexToIgnoreIterator end,
+                             const AABBTraits& aabb_traits,
+                             IndexPropertyMap index_map = IndexPropertyMap())
+    : m_closest_point_initialized(false),
+      set_of_indices(begin, end),
+      aabb_traits(aabb_traits),
+      index_map(index_map)
+  {
+  }
+
+  Filtered_projection_traits(Index_type index,
+                             const AABBTraits& aabb_traits,
+                             IndexPropertyMap index_map = IndexPropertyMap())
+    : m_closest_point_initialized(false),
+      set_of_indices(),
+      aabb_traits(aabb_traits),
+      index_map(index_map)
+  {
+    set_of_indices.insert(index);
+  }
+
+  bool go_further() const { return true; }
+
+  void intersection(const Point_3& query, const Primitive& primitive)
+  {
+    const Index_type& id = get(index_map, primitive.id());
+
+    if(keep != (set_of_indices.count(id) > 0)) return;
+    if(!m_closest_point_initialized) {
+      typedef CGAL::internal::Primitive_helper<AABBTraits> Helper;
+      m_closest_point = Helper::get_reference_point(primitive, aabb_traits);
+      m_closest_primitive = primitive.id();
+      m_closest_point_initialized = true;
+    }
+    Point_3 new_closest_point = aabb_traits.closest_point_object()
+      (query, primitive, m_closest_point);
+    if(new_closest_point != m_closest_point)
+    {
+      m_closest_primitive = primitive.id();
+      m_closest_point = new_closest_point; // this effectively shrinks the sphere
+    }
+  }
+
+  bool do_intersect(const Point_3& query, const Node& node) const
+  {
+    if(!m_closest_point_initialized) return true;
+    return AABBTraits().compare_distance_object()
+      (query, node.bbox(), m_closest_point) == CGAL::SMALLER;
+  }
+
+  bool found() { return m_closest_point_initialized; };
+
+  Point_3 closest_point() const { return m_closest_point; }
+  Point_and_primitive_id closest_point_and_primitive() const
+  {
+    return Point_and_primitive_id(m_closest_point, m_closest_primitive);
+  }
+
+private:
+  Point_3 m_closest_point;
+  typename Primitive::Id m_closest_primitive;
+  bool m_closest_point_initialized;
+  Set_of_indices set_of_indices;
+  const AABBTraits& aabb_traits;
+  IndexPropertyMap index_map;
+}; // end Filtered_projection_traits
+
+} // end namespace internal
+} // end namespace Polygon_mesh_processing
+} // end namespace CGAL
+
+#endif // CGAL_MESH_3_AABB_FILTERED_PROJECTION_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h
new file mode 100644
index 0000000..684cc59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h
@@ -0,0 +1,1613 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_REMESH_IMPL_H
+#define CGAL_POLYGON_MESH_PROCESSING_REMESH_IMPL_H
+
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/Polygon_mesh_processing/border.h>
+#include <CGAL/Polygon_mesh_processing/repair.h>
+#include <CGAL/Polygon_mesh_processing/measure.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_triangle_primitive.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h>
+
+#include <CGAL/property_map.h>
+#include <CGAL/iterator.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+
+#include <boost/bimap.hpp>
+#include <boost/bimap/multiset_of.hpp>
+#include <boost/bimap/set_of.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/range.hpp>
+#include <boost/unordered_map.hpp>
+#include <boost/unordered_set.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <map>
+#include <list>
+#include <vector>
+#include <iterator>
+#include <fstream>
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+#define CGAL_DUMP_REMESHING_STEPS
+#endif
+
+#ifdef CGAL_PMP_REMESHING_VERY_VERBOSE
+#define CGAL_PMP_REMESHING_VERBOSE
+#endif
+
+
+
+
+
+namespace CGAL {
+
+namespace PMP = Polygon_mesh_processing;
+
+namespace Polygon_mesh_processing {
+namespace internal {
+
+  enum Halfedge_status {
+    PATCH,       //h and hopp belong to the patch to be remeshed
+    PATCH_BORDER,//h belongs to the patch, hopp is MESH
+    MESH,        //h and hopp belong to the mesh, not the patch
+    MESH_BORDER  //h belongs to the mesh, face(hopp, pmesh) == null_face()
+  };
+
+  // A property map
+  template<typename Descriptor>
+  struct No_constraint_pmap
+  {
+  public:
+    typedef Descriptor                          key_type;
+    typedef bool                                value_type;
+    typedef value_type&                         reference;
+    typedef boost::read_write_property_map_tag  category;
+
+    friend bool get(const No_constraint_pmap& , const key_type& ) {
+      return false;
+    }
+    friend void put(No_constraint_pmap& , const key_type& , const bool ) {}
+  };
+
+  template <typename PM, typename FaceRange>
+  struct Border_constraint_pmap
+  {
+    typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+    typedef typename boost::graph_traits<PM>::edge_descriptor edge_descriptor;
+
+    boost::shared_ptr< std::set<edge_descriptor> > border_edges_ptr;
+    const PM* pmesh_ptr_;
+
+  public:
+    typedef edge_descriptor                     key_type;
+    typedef bool                                value_type;
+    typedef value_type&                         reference;
+    typedef boost::read_write_property_map_tag  category;
+
+    Border_constraint_pmap()
+      : border_edges_ptr(new std::set<edge_descriptor>() )
+      , pmesh_ptr_(NULL)
+    {}
+    Border_constraint_pmap(const PM& pmesh, const FaceRange& faces)
+      : border_edges_ptr(new std::set<edge_descriptor>() )
+      , pmesh_ptr_(&pmesh)
+    {
+      std::vector<halfedge_descriptor> border;
+      PMP::border_halfedges(faces, *pmesh_ptr_, std::back_inserter(border));
+
+      BOOST_FOREACH(halfedge_descriptor h, border)
+        border_edges_ptr->insert(edge(h, *pmesh_ptr_));
+    }
+
+    friend bool get(const Border_constraint_pmap<PM, FaceRange>& map,
+                    const edge_descriptor& e)
+    {
+      CGAL_assertion(map.pmesh_ptr_!=NULL);
+      return map.border_edges_ptr->count(e)!=0;
+    }
+
+    friend void put(Border_constraint_pmap<PM, FaceRange>& map,
+                    const edge_descriptor& e,
+                    const bool is)
+    {
+      CGAL_assertion(map.pmesh_ptr_ != NULL);
+      if (is)
+        map.border_edges_ptr->insert(e);
+      else
+        map.border_edges_ptr->erase(e);
+    }
+  };
+
+  template<typename PM,
+           typename EdgeConstraintMap,
+           typename VertexPointMap>
+  bool constraints_are_short_enough(const PM& pmesh,
+                                    EdgeConstraintMap ecmap,
+                                    VertexPointMap vpmap,
+                                    const double& high)
+  {
+    double sqh = high*high;
+    typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+    typedef typename boost::graph_traits<PM>::edge_descriptor     edge_descriptor;
+    BOOST_FOREACH(edge_descriptor e, edges(pmesh))
+    {
+      if (get(ecmap, e))
+      {
+        halfedge_descriptor h = halfedge(e, pmesh);
+        if (sqh < CGAL::squared_distance(get(vpmap, source(h, pmesh)),
+                                         get(vpmap, target(h, pmesh))))
+        {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+
+  template<typename PolygonMesh
+         , typename VertexPointMap
+         , typename GeomTraits
+         , typename EdgeIsConstrainedMap = No_constraint_pmap<
+              typename boost::graph_traits<PolygonMesh>::edge_descriptor>
+         , typename VertexIsConstrainedMap = No_constraint_pmap<
+              typename boost::graph_traits<PolygonMesh>::vertex_descriptor>
+  >
+  class Incremental_remesher
+  {
+    typedef PolygonMesh PM;
+    typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+    typedef typename boost::graph_traits<PM>::edge_descriptor     edge_descriptor;
+    typedef typename boost::graph_traits<PM>::vertex_descriptor   vertex_descriptor;
+    typedef typename boost::graph_traits<PM>::face_descriptor     face_descriptor;
+
+    typedef typename GeomTraits::Point_3    Point;
+    typedef typename GeomTraits::Vector_3   Vector_3;
+    typedef typename GeomTraits::Plane_3    Plane_3;
+    typedef typename GeomTraits::Triangle_3 Triangle_3;
+
+    typedef Incremental_remesher<PM, VertexPointMap
+                               , GeomTraits
+                               , EdgeIsConstrainedMap
+                               , VertexIsConstrainedMap
+                               > Self;
+
+  private:
+    typedef std::size_t                                  Patch_id;
+    typedef std::vector<Triangle_3>                      Triangle_list;
+    typedef std::vector<Patch_id>                        Patch_id_list;
+
+    typedef CGAL::AABB_triangle_primitive<GeomTraits,
+                     typename Triangle_list::iterator>    AABB_primitive;
+    typedef CGAL::AABB_traits<GeomTraits, AABB_primitive> AABB_traits;
+    typedef CGAL::AABB_tree<AABB_traits>                  AABB_tree;
+
+  public:
+    Incremental_remesher(PolygonMesh& pmesh
+                       , VertexPointMap& vpmap
+                       , const bool protect_constraints
+                       , EdgeIsConstrainedMap ecmap = EdgeIsConstrainedMap()
+                       , VertexIsConstrainedMap vcmap = VertexIsConstrainedMap()
+                       , const bool own_tree = true)//built by the remesher
+      : mesh_(pmesh)
+      , vpmap_(vpmap)
+      , own_tree_(own_tree)
+      , input_triangles_()
+      , input_patch_ids_()
+      , halfedge_status_map_()
+      , protect_constraints_(protect_constraints)
+      , patch_ids_map_()
+      , ecmap_(ecmap)
+      , vcmap_(vcmap)
+    {
+      CGAL_assertion(CGAL::is_triangle_mesh(mesh_));
+    }
+
+    ~Incremental_remesher()
+    {
+      if (own_tree_)
+        delete tree_ptr_;
+    }
+    
+    template<typename FaceRange>
+    void init_remeshing(const FaceRange& face_range)
+    {
+      tag_halfedges_status(face_range); //called first
+      Constraint_property_map cpmap(*this);
+
+      //build AABB tree of input surface
+      PMP::connected_components(mesh_,
+        boost::make_assoc_property_map(patch_ids_map_),// set patch_id() for each face
+        PMP::parameters::edge_is_constrained_map(cpmap));
+
+      BOOST_FOREACH(face_descriptor f, face_range)
+      {
+        input_triangles_.push_back(triangle(f));
+        input_patch_ids_.push_back(get_patch_id(f));
+      }
+      CGAL_assertion(input_triangles_.size() == input_patch_ids_.size());
+
+      tree_ptr_ = new AABB_tree(input_triangles_.begin(),
+                                input_triangles_.end());
+      tree_ptr_->accelerate_distance_queries();
+    }
+
+    // split edges of edge_range that have their length > high
+    template<typename EdgeRange>
+    void split_long_edges(const EdgeRange& edge_range,
+                          const double& high)
+    {
+      typedef boost::bimap<
+        boost::bimaps::set_of<halfedge_descriptor>,
+        boost::bimaps::multiset_of<double, std::greater<double> > >  Boost_bimap;
+      typedef typename Boost_bimap::value_type                       long_edge;
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Split long edges (" << high << ")...";
+      std::cout.flush();
+#endif
+      double sq_high = high*high;
+
+      //collect long edges
+      Boost_bimap long_edges;
+      BOOST_FOREACH(edge_descriptor e, edge_range)
+      {
+        double sqlen = sqlength(e);
+        if (sqlen > sq_high)
+        {
+          long_edges.insert(long_edge(halfedge(e, mesh_), sqlen));
+          put(ecmap_, e, false);
+        }
+        else
+          put(ecmap_, e, true);
+      }
+
+      //split long edges
+      unsigned int nb_splits = 0;
+      while (!long_edges.empty())
+      {
+        //the edge with longest length
+        typename Boost_bimap::right_map::iterator eit = long_edges.right.begin();
+        halfedge_descriptor he = eit->second;
+        double sqlen = eit->first;
+        long_edges.right.erase(eit);
+
+        //split edge
+        Point refinement_point = this->midpoint(he);
+        halfedge_descriptor hnew = CGAL::Euler::split_edge(he, mesh_);
+        CGAL_assertion(he == next(hnew, mesh_));
+        ++nb_splits;
+
+        //move refinement point
+        vertex_descriptor vnew = target(hnew, mesh_);
+        put(vpmap_, vnew, refinement_point);
+#ifdef CGAL_PMP_REMESHING_VERY_VERBOSE
+        std::cout << "   refinement point : " << refinement_point << std::endl;
+#endif
+
+        //check sub-edges
+        double sqlen_new = 0.25 * sqlen;
+        if (sqlen_new > sq_high)
+        {
+          //if it was more than twice the "long" threshold, insert them
+          long_edges.insert(long_edge(hnew, sqlen_new));
+          long_edges.insert(long_edge(next(hnew, mesh_), sqlen_new));
+        }
+        else
+        {
+          put(ecmap_, edge(hnew, mesh_), true);
+          put(ecmap_, edge(next(hnew, mesh_), mesh_), true);
+        }
+
+        //insert new edges to keep triangular faces, and update long_edges
+        if (!is_border(hnew, mesh_))
+        {
+          CGAL::Euler::split_face(hnew, next(next(hnew, mesh_), mesh_), mesh_);
+        }
+
+        //do it again on the other side if we're not on boundary
+        halfedge_descriptor hnew_opp = opposite(hnew, mesh_);
+        if (!is_border(hnew_opp, mesh_))
+        {
+          CGAL::Euler::split_face(prev(hnew_opp, mesh_), next(hnew_opp, mesh_), mesh_);
+        }
+      }
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << " done (" << nb_splits << " splits)." << std::endl;
+#endif
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("0-border_split.off");
+#endif
+    }
+
+    // PMP book :
+    // "visits all edges of the mesh
+    //if an edge is longer than the given threshold `high`, the edge
+    //is split at its midpoint and the two adjacent triangles are bisected (2-4 split)"
+    void split_long_edges(const double& high)
+    {
+      typedef boost::bimap<
+        boost::bimaps::set_of<halfedge_descriptor>,
+        boost::bimaps::multiset_of<double, std::greater<double> > >  Boost_bimap;
+      typedef typename Boost_bimap::value_type                       long_edge;
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Split long edges (" << high << ")..." << std::endl;
+#endif
+      double sq_high = high*high;
+
+      //collect long edges
+      Boost_bimap long_edges;
+      BOOST_FOREACH(edge_descriptor e, edges(mesh_))
+      {
+        if (!is_split_allowed(e))
+          continue;
+        double sqlen = sqlength(e);
+        if(sqlen > sq_high)
+          long_edges.insert(long_edge(halfedge(e, mesh_), sqlen));
+      }
+
+      //split long edges
+      unsigned int nb_splits = 0;
+      while (!long_edges.empty())
+      {
+        //the edge with longest length
+        typename Boost_bimap::right_map::iterator eit = long_edges.right.begin();
+        halfedge_descriptor he = eit->second;
+        double sqlen = eit->first;
+        long_edges.right.erase(eit);
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+        std::cout << "\r\t(" << long_edges.left.size() << " long edges, ";
+        std::cout << nb_splits << " splits)";
+        std::cout.flush();
+#endif
+
+        if (protect_constraints_ && !is_longest_on_faces(edge(he, mesh_)))
+          continue;
+
+        //split edge
+        Point refinement_point = this->midpoint(he);
+        halfedge_descriptor hnew = CGAL::Euler::split_edge(he, mesh_);
+        CGAL_assertion(he == next(hnew, mesh_));
+        ++nb_splits;
+
+        //move refinement point
+        vertex_descriptor vnew = target(hnew, mesh_);
+        put(vpmap_, vnew, refinement_point);
+#ifdef CGAL_PMP_REMESHING_VERY_VERBOSE
+        std::cout << "   Refinement point : " << refinement_point << std::endl;
+#endif
+
+        //after splitting
+        halfedge_descriptor hnew_opp = opposite(hnew, mesh_);
+        halfedge_added(hnew, status(he));
+        halfedge_added(hnew_opp, status(opposite(he, mesh_)));
+
+        //check sub-edges
+        double sqlen_new = 0.25 * sqlen;
+        if (sqlen_new > sq_high)
+        {
+          //if it was more than twice the "long" threshold, insert them
+          long_edges.insert(long_edge(hnew,              sqlen_new));
+          long_edges.insert(long_edge(next(hnew, mesh_), sqlen_new));
+        }
+
+        //insert new edges to keep triangular faces, and update long_edges
+        if (!is_on_border(hnew))
+        {
+          Patch_id patch_id = get_patch_id(face(hnew, mesh_));
+          halfedge_descriptor hnew2 = CGAL::Euler::split_face(hnew,
+                                                              next(next(hnew, mesh_), mesh_),
+                                                              mesh_);
+          Halfedge_status snew = (is_on_patch(hnew) || is_on_patch_border(hnew))
+            ? PATCH
+            : MESH;
+          halfedge_added(hnew2,                  snew);
+          halfedge_added(opposite(hnew2, mesh_), snew);
+          set_patch_id(face(hnew2, mesh_), patch_id);
+          set_patch_id(face(opposite(hnew2, mesh_), mesh_), patch_id);
+
+          if (snew == PATCH)
+          {
+            double sql = sqlength(hnew2);
+            if (sql > sq_high)
+              long_edges.insert(long_edge(hnew2, sql));
+          }
+        }
+
+        //do it again on the other side if we're not on boundary
+        if (!is_on_border(hnew_opp))
+        {
+          Patch_id patch_id = get_patch_id(face(hnew_opp, mesh_));
+          halfedge_descriptor hnew2 = CGAL::Euler::split_face(prev(hnew_opp, mesh_),
+                                                              next(hnew_opp, mesh_),
+                                                              mesh_);
+          Halfedge_status snew = (is_on_patch(hnew_opp) || is_on_patch_border(hnew_opp))
+             ? PATCH
+            : MESH;
+          halfedge_added(hnew2,                  snew);
+          halfedge_added(opposite(hnew2, mesh_), snew);
+          set_patch_id(face(hnew2, mesh_), patch_id);
+          set_patch_id(face(opposite(hnew2, mesh_), mesh_), patch_id);
+
+          if (snew == PATCH)
+          {
+            double sql = sqlength(hnew2);
+            if (sql > sq_high)
+              long_edges.insert(long_edge(hnew2, sql));
+          }
+        }
+      }
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << " done ("<< nb_splits << " splits)." << std::endl;
+#endif
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      CGAL_expensive_assertion(is_triangle_mesh(mesh_));
+      CGAL_assertion(halfedge_status_map_.size() == nb_valid_halfedges());
+      debug_status_map();
+      debug_self_intersections();
+#endif
+
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("1-edge_split.off");
+#endif
+    }
+
+    // PMP book :
+    // "collapses and thus removes all edges that are shorter than a
+    // threshold `low`. [...] testing before each collapse whether the collapse
+    // would produce an edge that is longer than `high`"
+    void collapse_short_edges(const double& low, const double& high)
+    {
+      typedef boost::bimap<
+        boost::bimaps::set_of<halfedge_descriptor>,
+        boost::bimaps::multiset_of<double, std::less<double> > >  Boost_bimap;
+      typedef typename Boost_bimap::value_type                    short_edge;
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Collapse short edges (" << low << ", " << high << ")..."
+                << std::endl;
+#endif
+      double sq_low = low*low;
+      double sq_high = high*high;
+
+      Boost_bimap short_edges;
+      BOOST_FOREACH(edge_descriptor e, edges(mesh_))
+      {
+        if (!is_collapse_allowed(e))
+          continue;
+        double sqlen = sqlength(e);
+        if (sqlen < sq_low)
+          short_edges.insert(short_edge(halfedge(e, mesh_), sqlen));
+      }
+
+      unsigned int nb_collapses = 0;
+      while (!short_edges.empty())
+      {
+        //the edge with shortest length
+        typename Boost_bimap::right_map::iterator eit = short_edges.right.begin();
+        halfedge_descriptor he = eit->second;
+        short_edges.right.erase(eit);
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+        std::cout << "\r\t(" << short_edges.left.size() << " short edges, ";
+        std::cout << nb_collapses << " collapses)";
+        std::cout.flush();
+#endif
+
+        //handle the boundary case :
+        //a PATCH_BORDER edge can be collapsed,
+        //and an edge incident to PATCH_BORDER can be collapsed,
+        //but only if the boundary vertex is kept,
+        //so re-insert opposite(he) to collapse it
+        if (!is_on_patch(he))
+        {
+          CGAL_assertion(!protect_constraints_);//is_collapse_allowed returned false
+          if (is_on_border(he) || is_on_mesh(he))
+          {
+            he = opposite(he, mesh_); //he now is PATCH_BORDER
+            CGAL_assertion(is_on_patch_border(he));
+          }
+        }//end if(not on PATCH)
+
+        //let's try to collapse he into vb
+        vertex_descriptor va = source(he, mesh_);
+        vertex_descriptor vb = target(he, mesh_);
+
+        if (is_on_patch_border(va) && !is_on_patch_border(vb))
+        {
+          he = opposite(he, mesh_);
+          va = source(he, mesh_);
+          vb = target(he, mesh_);
+          CGAL_assertion(is_on_patch_border(vb) && !is_on_patch_border(va));
+        }
+        else if (is_on_patch(va) && is_on_patch(vb))
+        {
+          if(!collapse_does_not_invert_face(he))
+          {
+            if (collapse_does_not_invert_face(opposite(he, mesh_)))
+            {
+              he = opposite(he, mesh_);
+              va = source(he, mesh_);
+              vb = target(he, mesh_);
+            }
+            else
+              continue;//both directions invert a face
+          }
+          CGAL_assertion(collapse_does_not_invert_face(he));
+        }
+
+        CGAL_assertion(is_collapse_allowed(edge(he, mesh_)));
+
+        if (degree(va, mesh_) < 3
+          || degree(vb, mesh_) < 3
+          || !CGAL::Euler::does_satisfy_link_condition(edge(he, mesh_), mesh_))//necessary to collapse
+          continue;
+
+        //check that collapse would not create an edge with length > high
+        //iterate on vertices va_i of the one-ring of va
+        bool collapse_ok = true;
+        BOOST_FOREACH(halfedge_descriptor ha, halfedges_around_target(va, mesh_))
+        {
+          vertex_descriptor va_i = source(ha, mesh_);
+          if (sqlength(vb, va_i) > sq_high)
+          {
+            collapse_ok = false;
+            break;
+          }
+        }
+        //before collapsing va into vb, check that it does not break a corner
+        //if it is allowed, perform the collapse
+        if (collapse_ok && !is_constrained(va) && !is_corner(va))
+        {
+          //"collapse va into vb along e"
+          // remove edges incident to va and vb, because their lengths will change
+          BOOST_FOREACH(halfedge_descriptor ha, halfedges_around_target(va, mesh_))
+          {
+            short_edges.left.erase(ha);
+            short_edges.left.erase(opposite(ha, mesh_));
+          }
+          BOOST_FOREACH(halfedge_descriptor hb, halfedges_around_target(vb, mesh_))
+          {
+            short_edges.left.erase(hb);
+            short_edges.left.erase(opposite(hb, mesh_));
+          }
+
+          //before collapse
+          bool mesh_border_case     = is_on_border(opposite(he, mesh_));
+          halfedge_descriptor ep_p  = prev(opposite(he, mesh_), mesh_);
+          halfedge_descriptor epo_p = opposite(ep_p, mesh_);
+          halfedge_descriptor en    = next(he, mesh_);
+          halfedge_descriptor en_p  = next(opposite(he, mesh_), mesh_);
+          Halfedge_status s_ep_p    = status(ep_p);
+          Halfedge_status s_epo_p   = status(epo_p);
+          Halfedge_status s_ep      = status(prev(he, mesh_));
+          Halfedge_status s_epo     = status(opposite(prev(he, mesh_), mesh_));
+
+          // merge halfedge_status to keep the more important on both sides
+          //do it before collapse is performed to be sure everything is valid
+          merge_status(en, s_epo, s_ep);
+          if (!mesh_border_case)
+            merge_status(en_p, s_epo_p, s_ep_p);
+
+          if (!mesh_border_case)
+            halfedge_and_opp_removed(prev(opposite(he, mesh_), mesh_));
+          halfedge_and_opp_removed(he);
+          halfedge_and_opp_removed(prev(he, mesh_));
+
+          //perform collapse
+          Point target_point = get(vpmap_, vb);
+          vertex_descriptor vkept = CGAL::Euler::collapse_edge(edge(he, mesh_), mesh_);
+          put(vpmap_, vkept, target_point);
+          ++nb_collapses;
+
+          fix_degenerate_faces(vkept, short_edges, sq_low);
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+          CGAL_assertion_code(std::size_t nbb = nb_valid_halfedges());
+          CGAL_assertion(nbb == halfedge_status_map_.size());
+          debug_status_map();
+          CGAL_assertion(!incident_to_degenerate(halfedge(vkept, mesh_)));
+#endif
+
+          //insert new/remaining short edges
+          BOOST_FOREACH(halfedge_descriptor ht, halfedges_around_target(vkept, mesh_))
+          {
+            if (!is_collapse_allowed(edge(ht, mesh_)))
+              continue;
+            double sqlen = sqlength(ht);
+            if (sqlen < sq_low)
+              short_edges.insert(short_edge(ht, sqlen));
+          }
+        }//end if(collapse_ok)
+      }
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << " done (" << nb_collapses << " collapses)." << std::endl;
+#endif
+
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("2-edge_collapse.off");
+#endif
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      CGAL_assertion(nb_valid_halfedges() == halfedge_status_map_.size());
+      CGAL_expensive_assertion(is_triangle_mesh(mesh_));
+      debug_status_map();
+      debug_self_intersections();
+      CGAL_assertion(0 == PMP::remove_degenerate_faces(mesh_,
+        PMP::parameters::vertex_point_map(vpmap_).geom_traits(GeomTraits())));
+#endif
+    }
+
+    // PMP book :
+    // "equalizes the vertex valences by flipping edges.
+    // The target valence is 6 and 4 for interior and boundary vertices, resp.
+    // The algo. tentatively flips each edge `e` and checks whether the deviation
+    // to the target valences decreases. If not, the edge is flipped back"
+    void equalize_valences()
+    {
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Equalize valences..." << std::endl;
+#endif
+      unsigned int nb_flips = 0;
+      BOOST_FOREACH(edge_descriptor e, edges(mesh_))
+      {
+        //only the patch edges are allowed to be flipped
+        halfedge_descriptor he = halfedge(e, mesh_);
+        if (!is_on_patch(he))
+          continue;
+
+        vertex_descriptor va = source(he, mesh_);
+        vertex_descriptor vb = target(he, mesh_);
+        vertex_descriptor vc = target(next(he, mesh_), mesh_);
+        vertex_descriptor vd = target(next(opposite(he, mesh_), mesh_), mesh_);
+
+        int deviation_pre = CGAL::abs(valence(va) - target_valence(va))
+                          + CGAL::abs(valence(vb) - target_valence(vb))
+                          + CGAL::abs(valence(vc) - target_valence(vc))
+                          + CGAL::abs(valence(vd) - target_valence(vd));
+
+        CGAL_assertion_code(Halfedge_status s1 = status(he));
+        CGAL_assertion_code(Halfedge_status s1o = status(opposite(he, mesh_)));
+
+        CGAL::Euler::flip_edge(he, mesh_);
+        ++nb_flips;
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+        std::cout << "\r\t(" << nb_flips << " flips)";
+        std::cout.flush();
+#endif
+        CGAL_assertion_code(Halfedge_status s2 = status(he));
+        CGAL_assertion_code(Halfedge_status s2o = status(opposite(he, mesh_)));
+        CGAL_assertion(s1 == s2   && s1 == PATCH);
+        CGAL_assertion(s1o == s2o && s1o == PATCH);
+        CGAL_assertion(nb_valid_halfedges() == halfedge_status_map_.size());
+        CGAL_assertion(!is_border(he, mesh_));
+
+        CGAL_assertion(
+             (vc == target(he, mesh_) && vd == source(he, mesh_))
+          || (vd == target(he, mesh_) && vc == source(he, mesh_)));
+
+        int deviation_post = CGAL::abs(valence(va) - target_valence(va))
+                          + CGAL::abs(valence(vb) - target_valence(vb))
+                          + CGAL::abs(valence(vc) - target_valence(vc))
+                          + CGAL::abs(valence(vd) - target_valence(vd));
+
+        //check that mesh does not become non-triangle,
+        //nor has inverted faces
+        if (deviation_pre <= deviation_post
+          || !check_normals(he)
+          || incident_to_degenerate(he)
+          || incident_to_degenerate(opposite(he, mesh_))
+          || !is_on_triangle(he)
+          || !is_on_triangle(opposite(he, mesh_))
+          || !check_normals(target(he, mesh_))
+          || !check_normals(source(he, mesh_)))
+        {
+          CGAL::Euler::flip_edge(he, mesh_);
+          --nb_flips;
+
+          CGAL_assertion_code(Halfedge_status s3 = status(he));
+          CGAL_assertion(s1 == s3);
+          CGAL_assertion(!is_border(he, mesh_));
+          CGAL_assertion(
+               (va == source(he, mesh_) && vb == target(he, mesh_))
+            || (vb == source(he, mesh_) && va == target(he, mesh_)));
+        }
+      }
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "\r\tdone ("<< nb_flips << " flips)" << std::endl;
+#endif
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      CGAL_assertion(nb_valid_halfedges() == halfedge_status_map_.size());
+      debug_status_map();
+      CGAL_assertion(0 == PMP::remove_degenerate_faces(mesh_
+                            , PMP::parameters::vertex_point_map(vpmap_)
+                            .geom_traits(GeomTraits())));
+      debug_self_intersections();
+#endif
+
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("3-edge_flips.off");
+#endif
+    }
+
+    // PMP book :
+    // "applies an iterative smoothing filter to the mesh.
+    // The vertex movement has to be constrained to the vertex tangent plane [...]
+    // smoothing algorithm with uniform Laplacian weights"
+    void tangential_relaxation(const bool smooth_along_features/*1d smoothing*/)
+    {
+      //todo : move border vertices along 1-dimensional features
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Tangential relaxation...";
+      std::cout.flush();
+#endif
+
+      //todo : use boost::vector_property_map to improve computing time
+      typedef std::map<vertex_descriptor, Vector_3> VNormalsMap;
+      VNormalsMap vnormals;
+      boost::associative_property_map<VNormalsMap> propmap_normals(vnormals);
+      std::map<vertex_descriptor, Point> barycenters;
+
+      // at each vertex, compute vertex normal
+      // at each vertex, compute barycenter of neighbors
+      BOOST_FOREACH(vertex_descriptor v, vertices(mesh_))
+      {
+        if (is_on_patch(v) && !is_constrained(v))
+        {
+        Vector_3 vn = PMP::compute_vertex_normal(v, mesh_
+                            , PMP::parameters::vertex_point_map(vpmap_)
+                            .geom_traits(GeomTraits()));
+        put(propmap_normals, v, vn);
+
+          Vector_3 move = CGAL::NULL_VECTOR;
+          unsigned int star_size = 0;
+          BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(v, mesh_))
+          {
+            move = move + Vector_3(get(vpmap_, v), get(vpmap_, source(h, mesh_)));
+            ++star_size;
+          }
+          CGAL_assertion(star_size > 0);
+          move = (1. / (double)star_size) * move;
+
+          barycenters[v] = get(vpmap_, v) + move;
+        }
+        else if (smooth_along_features
+              && !protect_constraints_
+              && is_on_patch_border(v)
+              && !is_corner(v)
+              && !is_constrained(v))
+        {
+          put(propmap_normals, v, CGAL::NULL_VECTOR);
+
+          std::vector<halfedge_descriptor> border_halfedges;
+          BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(v, mesh_))
+          {
+            if (is_on_patch_border(h) || is_on_patch_border(opposite(h, mesh_)))
+              border_halfedges.push_back(h);
+          }
+          if (border_halfedges.size() == 2)//others are corner cases
+          {
+            vertex_descriptor ph0 = source(border_halfedges[0], mesh_);
+            vertex_descriptor ph1 = source(border_halfedges[1], mesh_);
+            double dot = Vector_3(get(vpmap_, v), get(vpmap_, ph0))
+                       * Vector_3(get(vpmap_, v), get(vpmap_, ph1));
+            //check squared cosine is < 0.25 (~120 degrees)
+            if (0.25 < dot / (sqlength(border_halfedges[0]) * sqlength(border_halfedges[0])))
+              barycenters[v] = CGAL::midpoint(midpoint(border_halfedges[0]),
+                                              midpoint(border_halfedges[1]));
+          }
+        }
+      }
+
+      // compute moves
+      typedef typename std::map<vertex_descriptor, Point>::value_type VP_pair;
+      std::map<vertex_descriptor, Point> new_locations;
+      BOOST_FOREACH(const VP_pair& vp, barycenters)
+      {
+        vertex_descriptor v = vp.first;
+        Point pv = get(vpmap_, v);
+        Vector_3 nv = boost::get(propmap_normals, v);
+        Point qv = vp.second; //barycenter at v
+
+        new_locations[v] = qv + (nv * Vector_3(qv, pv)) * nv;
+      }
+
+      // perform moves
+      BOOST_FOREACH(const VP_pair& vp, new_locations)
+      {
+        put(vpmap_, vp.first, vp.second);
+      }
+
+      CGAL_assertion(is_valid(mesh_));
+
+      CGAL_assertion(is_triangle_mesh(mesh_));
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      debug_self_intersections();
+#endif
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "done." << std::endl;
+#endif
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("4-relaxation.off");
+#endif
+    }
+
+    struct Constraint_property_map
+    {
+      typedef boost::readable_property_map_tag      category;
+      typedef bool                                  value_type;
+      typedef bool                                  reference;
+      typedef edge_descriptor                       key_type;
+      const Self* remesher_ptr_;
+      Constraint_property_map(): remesher_ptr_(NULL) {}
+      Constraint_property_map(const Self& remesher)
+        : remesher_ptr_(&remesher) {}
+      friend bool get(const Constraint_property_map& m,
+                      const edge_descriptor& e) {
+        return m.remesher_ptr_->is_on_border(e) ||
+               m.remesher_ptr_->is_on_patch_border(e);
+      }
+    };
+
+    // PMP book :
+    // "maps the vertices back to the surface"
+    void project_to_surface()
+    {
+      //todo : handle the case of boundary vertices
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "Project to surface...";
+      std::cout.flush();
+#endif
+
+      BOOST_FOREACH(vertex_descriptor v, vertices(mesh_))
+      {
+        if (!is_on_patch(v) || is_constrained(v))
+          continue;
+        //note if v is constrained, it has not moved
+
+        Patch_id_property_map pid_pmap(*this);
+        internal::Filtered_projection_traits<typename AABB_tree::AABB_traits,
+                                             Patch_id_property_map,
+                                             true> /* keep primitives with matching IDs */
+        projection_traits(
+          get_patch_id(face(halfedge(v, mesh_), mesh_)),
+          tree_ptr_->traits(),
+          pid_pmap
+          );
+
+        tree_ptr_->traversal(get(vpmap_, v), projection_traits);
+        CGAL_assertion(projection_traits.found());
+
+        Point proj = projection_traits.closest_point();
+        put(vpmap_, v, proj);
+      }
+
+      CGAL_assertion(is_valid(mesh_));
+      CGAL_assertion(is_triangle_mesh(mesh_));
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      debug_self_intersections();
+#endif
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+      std::cout << "done." << std::endl;
+#endif
+
+#ifdef CGAL_DUMP_REMESHING_STEPS
+      dump("5-project.off");
+#endif
+    }
+
+private:
+  Patch_id get_patch_id(const face_descriptor& f) const
+  {
+    if (patch_ids_map_.empty())
+      return -1;
+    else
+      return patch_ids_map_.at(f);
+  }
+
+  void set_patch_id(const face_descriptor& f, const Patch_id& i)
+  {
+    if (patch_ids_map_.find(f) == patch_ids_map_.end())
+      patch_ids_map_.insert(std::make_pair(f, i));
+    else
+      patch_ids_map_[f] = i;
+  }
+
+  struct Patch_id_property_map
+  {
+    typedef boost::readable_property_map_tag     category;
+    typedef Patch_id                             value_type;
+    typedef Patch_id&                            reference;
+    typedef typename Triangle_list::const_iterator key_type;
+
+    const Self* remesher_ptr_;
+
+    Patch_id_property_map()
+      : remesher_ptr_(NULL) {}
+    Patch_id_property_map(const Self& remesher)
+      : remesher_ptr_(&remesher) {}
+
+    friend Patch_id get(const Patch_id_property_map& m, key_type tr_it)
+    {
+      //tr_it is an iterator from triangles_
+      std::size_t id_in_vec = std::distance(
+        m.remesher_ptr_->input_triangles().begin(), tr_it);
+
+      CGAL_assertion(0 <= id_in_vec);
+      CGAL_assertion(id_in_vec < m.remesher_ptr_->input_patch_ids().size());
+      CGAL_assertion(*tr_it == m.remesher_ptr_->input_triangles()[id_in_vec]);
+
+      return m.remesher_ptr_->input_patch_ids()[id_in_vec];
+    }
+  };
+
+  private:
+    Triangle_3 triangle(face_descriptor f) const
+    {
+      halfedge_descriptor h = halfedge(f, mesh_);
+      vertex_descriptor v1  = target(h, mesh_);
+      vertex_descriptor v2  = target(next(h, mesh_), mesh_);
+      vertex_descriptor v3  = target(next(next(h, mesh_), mesh_), mesh_);
+      return Triangle_3(get(vpmap_, v1), get(vpmap_, v2), get(vpmap_, v3));
+    }
+
+    double sqlength(const vertex_descriptor& v1,
+                    const vertex_descriptor& v2) const
+    {
+      return CGAL::squared_distance(get(vpmap_, v1), get(vpmap_, v2));
+    }
+
+    double sqlength(const halfedge_descriptor& h) const
+    {
+      vertex_descriptor v1 = target(h, mesh_);
+      vertex_descriptor v2 = source(h, mesh_);
+      return sqlength(v1, v2);
+    }
+
+    double sqlength(const edge_descriptor& e) const
+    {
+      return sqlength(halfedge(e, mesh_));
+    }
+
+    Point midpoint(const halfedge_descriptor& he) const
+    {
+      Point p1 = get(vpmap_, target(he, mesh_));
+      Point p2 = get(vpmap_, source(he, mesh_));
+      return CGAL::midpoint(p1, p2);
+    }
+
+    void dump(const char* filename) const
+    {
+      std::ofstream out(filename);
+      out << mesh_;
+      out.close();
+    }
+
+    int valence(const vertex_descriptor& v) const
+    {
+      return static_cast<int>(degree(v, mesh_));
+    }
+
+    int target_valence(const vertex_descriptor& v) const
+    {
+      return (is_border(v, mesh_)) ? 4 : 6;
+    }
+
+    bool is_on_triangle(const halfedge_descriptor& h) const
+    {
+      return h == next(next(next(h, mesh_), mesh_), mesh_);
+    }
+
+    bool is_longest_on_faces(const edge_descriptor& e) const
+    {
+      halfedge_descriptor h = halfedge(e, mesh_);
+      halfedge_descriptor hopp = opposite(h, mesh_);
+
+      //check whether h is the longest edge in its associated face
+      //overwise refinement will go for an endless loop
+      double sqh = sqlength(h);
+      return sqh >= sqlength(next(h, mesh_))
+          && sqh >= sqlength(next(next(h, mesh_), mesh_))
+          //do the same for hopp
+          && sqh >= sqlength(next(hopp, mesh_))
+          && sqh >= sqlength(next(next(hopp, mesh_), mesh_));
+    }
+
+    bool is_constrained(const edge_descriptor& e) const
+    {
+      return get(Constraint_property_map(*this), e);
+    }
+
+    bool is_split_allowed(const edge_descriptor& e) const
+    {
+      halfedge_descriptor h = halfedge(e, mesh_);
+      halfedge_descriptor hopp = opposite(h, mesh_);
+
+      if (protect_constraints_ && is_constrained(e))
+        return false;
+      else //allow splitting constraints
+      {
+        if (is_on_mesh(h) && is_on_mesh(hopp))
+          return false;
+        else if (is_on_mesh(h) && is_on_border(hopp))
+          return false;
+        else if (is_on_mesh(hopp) && is_on_border(h))
+          return false;
+        else
+          return true;
+      }
+    }
+
+    bool is_collapse_allowed(const edge_descriptor& e) const
+    {
+      halfedge_descriptor he = halfedge(e, mesh_);
+      halfedge_descriptor hopp = opposite(he, mesh_);
+
+      if (protect_constraints_ && is_constrained(e))
+        return false;
+      if (is_on_patch(he)) //hopp is also on patch
+      {
+        if (is_on_patch_border(next(he, mesh_)) && is_on_patch_border(prev(he, mesh_)))
+          return false;//too many cases to be handled
+        else if (is_on_patch_border(next(hopp, mesh_)) && is_on_patch_border(prev(hopp, mesh_)))
+          return false;//too many cases to be handled
+        else if (is_on_patch_border(target(he, mesh_)) && is_on_patch_border(source(he, mesh_)))
+          return false;//collapse would induce pinching the selection
+        else return true;
+      }
+      else if (is_on_patch_border(he))
+        return is_collapse_allowed_on_patch_border(he);
+      else if (is_on_patch_border(hopp))
+        return is_collapse_allowed_on_patch_border(hopp);
+      return false;
+    }
+
+    bool is_collapse_allowed_on_patch_border(const halfedge_descriptor& h) const
+    {
+      CGAL_precondition(is_on_patch_border(h));
+      halfedge_descriptor hopp = opposite(h, mesh_);
+
+      if (is_on_patch_border(next(h, mesh_)) && is_on_patch_border(prev(h, mesh_)))
+        return false;
+
+      if (is_on_patch_border(hopp))
+      {
+        if (is_on_patch_border(next(hopp, mesh_)) && is_on_patch_border(prev(hopp, mesh_)))
+          return false;
+        else
+          return true;
+      }
+      CGAL_assertion(is_on_mesh(hopp) || is_on_border(hopp));
+      return true;//we already checked we're not pinching a hole in the patch
+    }
+
+    bool collapse_does_not_invert_face(const halfedge_descriptor& h) const
+    {
+      vertex_descriptor vs = source(h, mesh_);
+      vertex_descriptor vt = target(h, mesh_);
+      
+      //backup source point
+      Point ps = get(vpmap_, vs);
+      //move source at target
+      put(vpmap_, vs, get(vpmap_, vt));
+
+      //collect normals to faces around vs AND vt
+      //vertices are at the same location, but connectivity is still be same,
+      //with plenty of degenerate triangles (which are common to both stars)
+      std::vector<Vector_3> normals;
+      BOOST_FOREACH(halfedge_descriptor hd,
+                    halfedges_around_target(h, mesh_))
+      {
+        Vector_3 n = compute_normal(face(hd, mesh_));
+        //n can be 0 in the splitting step because we remove degenerate faces
+        //only at the end of the splitting step
+        if(n != CGAL::NULL_VECTOR)
+          normals.push_back(n);
+      }
+      BOOST_FOREACH(halfedge_descriptor hd,
+                    halfedges_around_target(opposite(h, mesh_), mesh_))
+      {
+        Vector_3 n = compute_normal(face(hd, mesh_));
+        if(n != CGAL::NULL_VECTOR)
+          normals.push_back(n);
+      }
+
+      //check all normals have same orientation
+      bool res = true;
+      for(std::size_t i = 1; i < normals.size(); ++i)/*start at 1 on purpose*/
+      {
+        if (normals[i-1] * normals[i] <= 0.)
+        {
+          res = false;
+          break;
+        }
+      }
+      //restore position
+      put(vpmap_, vs, ps);
+      return res;
+    }
+
+    bool is_constrained(const vertex_descriptor& v) const
+    {
+      return get(vcmap_, v);
+    }
+
+    bool is_corner(const vertex_descriptor& v) const
+    {
+      unsigned int nb_incident_features = 0;
+      BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(v, mesh_))
+      {
+        if (is_on_border(h) || is_on_patch_border(h))
+          ++nb_incident_features;
+        if (nb_incident_features > 2)
+          return true;
+      }
+      return false;
+    }
+
+    Vector_3 compute_normal(const face_descriptor& f) const
+    {
+      halfedge_descriptor hd = halfedge(f, mesh_);
+      typename GeomTraits::Triangle_3
+        tr(get(vpmap_, target(hd, mesh_)),
+           get(vpmap_, target(next(hd, mesh_), mesh_)),
+           get(vpmap_, target(next(next(hd, mesh_), mesh_), mesh_)));
+
+      if (tr.is_degenerate())
+        return CGAL::NULL_VECTOR;
+      else
+        return PMP::compute_face_normal(f, mesh_);
+    }
+
+    template<typename FaceRange>
+    void tag_halfedges_status(const FaceRange& face_range)
+    {
+      //tag MESH,        //h and hopp belong to the mesh, not the patch
+      //tag MESH_BORDER  //h belongs to the mesh, face(hopp, pmesh) == null_face()
+      BOOST_FOREACH(halfedge_descriptor h, halfedges(mesh_))
+      {
+        //being part of the border of the mesh is predominant
+        if (is_border(h, mesh_))
+          halfedge_status_map_[h] = MESH_BORDER; //erase previous value if exists
+        else
+          halfedge_status_map_[h] = MESH;
+      }
+
+      //tag PATCH,       //h and hopp belong to the patch to be remeshed
+      BOOST_FOREACH(face_descriptor f, face_range)
+      {
+        BOOST_FOREACH(halfedge_descriptor h,
+                      halfedges_around_face(halfedge(f, mesh_), mesh_))
+        {
+          halfedge_status_map_[h] = PATCH;
+        }
+      }
+
+      internal::Border_constraint_pmap<PM, FaceRange> border_map(mesh_, face_range);
+      //override the border of PATCH
+      //tag PATCH_BORDER,//h belongs to the patch, hopp doesn't
+      BOOST_FOREACH(edge_descriptor e, edges(mesh_))
+      {
+        if (get(ecmap_, e) || get(border_map, e))
+        {
+          //deal with h and hopp for borders that are sharp edges to be preserved
+          halfedge_descriptor h = halfedge(e, mesh_);
+          if (halfedge_status_map_[h] == PATCH)
+            halfedge_status_map_[h] = PATCH_BORDER;
+
+          halfedge_descriptor hopp = opposite(h, mesh_);
+          if (halfedge_status_map_[hopp] == PATCH)
+            halfedge_status_map_[hopp] = PATCH_BORDER;
+
+          put(ecmap_, e, false);
+        }
+      }
+
+      CGAL_assertion(halfedge_status_map_.size() == nb_valid_halfedges());
+    }
+
+    Halfedge_status status(const halfedge_descriptor& h) const
+    {
+      typename boost::unordered_map <
+        halfedge_descriptor, Halfedge_status >::const_iterator
+          it = halfedge_status_map_.find(h);
+      if (it == halfedge_status_map_.end())
+        std::cout << "Something goes wrong with status function" << std::endl;
+      CGAL_assertion(it != halfedge_status_map_.end());
+      return it->second;
+    }
+
+    void merge_status(const halfedge_descriptor& en,
+                      const Halfedge_status& s_epo,
+                      const Halfedge_status& s_ep)
+    {
+      CGAL_assertion(halfedge_status_map_.find(en) != halfedge_status_map_.end());
+
+      //get missing data
+      halfedge_descriptor eno = opposite(en, mesh_);
+      Halfedge_status s_eno = status(eno);
+
+      if (s_epo == MESH_BORDER && s_eno == MESH_BORDER)
+        return;
+
+      if(s_epo == MESH_BORDER
+        || s_ep == MESH_BORDER
+        || s_epo == PATCH_BORDER
+        || s_ep == PATCH_BORDER)
+      {
+        halfedge_status_map_[en]  = s_epo;
+        halfedge_status_map_[eno] = s_ep;
+      }
+      // else keep current status for en and eno
+    }
+
+    template<typename Bimap>
+    void fix_degenerate_faces(const vertex_descriptor& v,
+                              Bimap& short_edges,
+                              const double& sq_low)
+    {
+      CGAL_assertion_code(std::size_t nb_done = 0);
+      boost::unordered_set<halfedge_descriptor> degenerate_faces;
+      BOOST_FOREACH(halfedge_descriptor h,
+                    halfedges_around_target(halfedge(v, mesh_), mesh_))
+      {
+        if (is_border(h, mesh_))
+          continue;
+        if (PMP::is_degenerated(h, mesh_, vpmap_, GeomTraits()))
+          degenerate_faces.insert(h);
+      }
+      while(!degenerate_faces.empty())
+      {
+        halfedge_descriptor h = *(degenerate_faces.begin());
+        degenerate_faces.erase(degenerate_faces.begin());
+
+        if (!PMP::is_degenerated(h, mesh_, vpmap_, GeomTraits()))
+          //this can happen when flipping h has consequences further in the mesh
+          continue;
+
+        //check that opposite is not also degenerate
+        if (degenerate_faces.find(opposite(h, mesh_)) != degenerate_faces.end())
+          degenerate_faces.erase(opposite(h, mesh_));
+
+        if(is_border(h, mesh_))
+          continue;
+
+        BOOST_FOREACH(halfedge_descriptor hf,
+                      halfedges_around_face(h, mesh_))
+        {
+          vertex_descriptor vc = target(hf, mesh_);
+          vertex_descriptor va = target(next(hf, mesh_), mesh_);
+          vertex_descriptor vb = target(next(next(hf, mesh_), mesh_), mesh_);
+          Vector_3 ab(get(vpmap_,va), get(vpmap_,vb));
+          Vector_3 ac(get(vpmap_,va), get(vpmap_,vc));
+          if (ab * ac < 0)
+          {
+            halfedge_descriptor hfo = opposite(hf, mesh_);
+            halfedge_descriptor h_ab = prev(hf, mesh_);
+            halfedge_descriptor h_ca = next(hf, mesh_);
+
+            short_edges.left.erase(hf);
+            short_edges.left.erase(hfo);
+
+            CGAL::Euler::flip_edge(hf, mesh_);
+            CGAL_assertion_code(++nb_done);
+
+            //update halfedge_status_map_
+            halfedge_status_map_[h_ab] = merge_status(h_ab, hf, hfo);
+            halfedge_status_map_[h_ca] = merge_status(h_ca, hf, hfo);
+            halfedge_status_map_[hf] =
+              (is_on_patch(h_ca) || is_on_patch_border(h_ca))
+              ? PATCH
+              : MESH;
+            halfedge_status_map_[hfo] = status(hf);
+#ifdef CGAL_PMP_REMESHING_DEBUG
+            debug_status_map();
+#endif
+
+            //insert new edges in 'short_edges'
+            if (is_collapse_allowed(edge(hf, mesh_)))
+            {
+              double sqlen = sqlength(hf);
+              if (sqlen < sq_low)
+                short_edges.insert(typename Bimap::value_type(hf, sqlen));
+            }
+
+            if (!is_border(hf, mesh_)
+              && PMP::is_degenerated(hf, mesh_, vpmap_, GeomTraits()))
+              degenerate_faces.insert(hf);
+            if (!is_border(hfo, mesh_)
+              && PMP::is_degenerated(hfo, mesh_, vpmap_, GeomTraits()))
+              degenerate_faces.insert(hfo);
+
+            break;
+          }
+        }
+      }
+#ifdef CGAL_PMP_REMESHING_DEBUG
+      debug_status_map();
+#endif
+    }
+
+    bool incident_to_degenerate(const halfedge_descriptor& he)
+    {
+      BOOST_FOREACH(halfedge_descriptor h,
+                    halfedges_around_target(he, mesh_))
+      {
+        if (is_border(h, mesh_))
+          continue;
+        if (PMP::is_degenerated(h, mesh_, vpmap_, GeomTraits()))
+          return true;
+      }
+      return false;
+    }
+
+    Halfedge_status merge_status(const halfedge_descriptor& h1,
+      const halfedge_descriptor& h2,
+      const halfedge_descriptor& h3)
+    {
+      Halfedge_status s1 = status(h1);
+      if (s1 == MESH_BORDER) return s1;
+      Halfedge_status s2 = status(h2);
+      if (s2 == MESH_BORDER) return s2;
+      Halfedge_status s3 = status(h3);
+      if (s3 == MESH_BORDER) return s3;
+      else if (s1 == PATCH_BORDER) return s1;
+      else if (s2 == PATCH_BORDER) return s2;
+      else if (s3 == PATCH_BORDER) return s3;
+
+      CGAL_assertion(s1 == s2 && s1 == s3);
+      return s1;
+    }
+
+    bool is_on_patch(const halfedge_descriptor& h) const
+    {
+      bool res =(status(h) == PATCH);
+      CGAL_assertion(res == (status(opposite(h, mesh_)) == PATCH));
+      return res;
+    }
+
+    bool is_on_patch(const face_descriptor& f) const
+    {
+      BOOST_FOREACH(halfedge_descriptor h,
+                    halfedges_around_face(halfedge(f, mesh_), mesh_))
+      {
+        if (is_on_patch(h) || is_on_patch_border(h))
+          return true;
+      }
+      return false;
+    }
+
+    bool is_on_patch(const vertex_descriptor& v) const
+    {
+      BOOST_FOREACH(halfedge_descriptor h,
+                    halfedges_around_target(v, mesh_))
+      {
+        if (!is_on_patch(h))
+          return false;
+      }
+      return true;
+    }
+
+public:
+    bool is_on_patch_border(const halfedge_descriptor& h) const
+    {
+      bool res = (status(h) == PATCH_BORDER);
+      if (res)
+      {
+        CGAL_assertion_code(Halfedge_status hs = status(opposite(h, mesh_)));
+        CGAL_assertion(hs == MESH_BORDER
+                    || hs == MESH
+                    || hs == PATCH_BORDER);//when 2 incident patches are remeshed
+      }
+      return res;
+    }
+    bool is_on_patch_border(const edge_descriptor& e) const
+    {
+      return is_on_patch_border(halfedge(e,mesh_))
+          || is_on_patch_border(opposite(halfedge(e, mesh_), mesh_));
+    }
+    bool is_on_patch_border(const vertex_descriptor& v) const
+    {
+      BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(v, mesh_))
+      {
+        if (is_on_patch_border(h) || is_on_patch_border(opposite(h, mesh_)))
+          return true;
+      }
+      return false;
+    }
+
+    bool is_on_border(const halfedge_descriptor& h) const
+    {
+      bool res = (status(h) == MESH_BORDER);
+      CGAL_assertion(res == is_border(h, mesh_));
+      CGAL_assertion(res == is_border(next(h, mesh_), mesh_));
+      return res;
+    }
+
+    bool is_on_border(const edge_descriptor& e) const
+    {
+      return is_on_border(halfedge(e, mesh_))
+          || is_on_border(opposite(halfedge(e, mesh_), mesh_));
+    }
+
+    bool is_on_mesh(const halfedge_descriptor& h) const
+    {
+      return status(h) == MESH;
+    }
+
+private:
+    void halfedge_added(const halfedge_descriptor& h,
+                        const Halfedge_status& s)
+    {
+      halfedge_status_map_.insert(std::make_pair(h, s));
+    }
+
+    void halfedge_and_opp_removed(const halfedge_descriptor& h)
+    {
+      halfedge_status_map_.erase(h);
+      halfedge_status_map_.erase(opposite(h, mesh_));
+    }
+
+    std::size_t nb_valid_halfedges() const
+    {
+      return static_cast<std::size_t>(
+        std::distance(halfedges(mesh_).first, halfedges(mesh_).second));
+    }
+
+    void debug_status_map() const
+    {
+      unsigned int nb_border = 0;
+      unsigned int nb_mesh = 0;
+      unsigned int nb_patch = 0;
+      unsigned int nb_patch_border = 0;
+
+      typedef typename boost::unordered_map <
+        halfedge_descriptor, Halfedge_status>::value_type
+          HD_pair;
+      BOOST_FOREACH(const HD_pair& hs, halfedge_status_map_)
+      {
+        if(is_on_patch(hs.first))              nb_patch++;
+        else if(is_on_patch_border(hs.first))  nb_patch_border++;
+        else if(is_on_mesh(hs.first))          nb_mesh++;
+        else if(is_on_border(hs.first))        nb_border++;
+        else CGAL_assertion(false);
+      }
+    }
+
+#ifdef CGAL_PMP_REMESHING_DEBUG
+    void debug_self_intersections() const
+    {
+      std::cout << "Test self intersections...";
+      std::vector<std::pair<face_descriptor, face_descriptor> > facets;
+      PMP::self_intersections(
+        mesh_,
+        std::back_inserter(facets),
+        PMP::parameters::vertex_point_map(vpmap_));
+      //CGAL_assertion(facets.empty());
+      std::cout << "done ("<< facets.size() <<" facets)." << std::endl;
+    }
+
+    void debug_self_intersections(const vertex_descriptor& v) const
+    {
+      std::cout << "Test self intersections...";
+      std::vector<std::pair<face_descriptor, face_descriptor> > facets;
+      PMP::self_intersections(
+        faces_around_target(halfedge(v, mesh_), mesh_),
+        mesh_,
+        std::back_inserter(facets),
+        PMP::parameters::vertex_point_map(vpmap_));
+      //CGAL_assertion(facets.empty());
+      std::cout << "done ("<< facets.size() <<" facets)." << std::endl;
+    }
+#endif
+
+    //warning : when v is on a sharp edge (angle <= 90 deg)
+    // which is not constrained (it's not mandatory)
+    //this test will return false, though normals are correct
+    bool check_normals(const vertex_descriptor& v) const
+    {
+      if (!is_on_patch(v))
+        return true;//not much to say if we are on a boundary/sharp edge
+
+      std::vector<Vector_3> normals;
+      BOOST_FOREACH(halfedge_descriptor hd,
+                    halfedges_around_target(halfedge(v, mesh_), mesh_))
+      {
+        Vector_3 n = compute_normal(face(hd, mesh_));
+        normals.push_back(n);
+        CGAL_assertion(n != CGAL::NULL_VECTOR);
+      }
+      //check all normals have same orientation
+      for (std::size_t i = 1; i < normals.size(); ++i)/*start at 1 on purpose*/
+      {
+        double dot = normals[i - 1] * normals[i];
+        if(dot <= 0.)
+          return false;
+      }
+      return true;
+    }
+
+    bool check_normals(const halfedge_descriptor& h) const
+    {
+      if (!is_on_patch(h))
+        return true;//nothing to say
+      Vector_3 n = compute_normal(face(h, mesh_));
+      Vector_3 no = compute_normal(face(opposite(h, mesh_), mesh_));
+      return n * no > 0.;
+    }
+
+  public:
+    const Triangle_list& input_triangles() const {
+      return input_triangles_;
+    }
+
+    const Patch_id_list& input_patch_ids() const {
+      return input_patch_ids_;
+    }
+
+    void update_constraints_property_map()
+    {
+      BOOST_FOREACH(edge_descriptor e, edges(mesh_))
+      {
+        if (is_on_patch_border(halfedge(e, mesh_))
+          || is_on_patch_border(opposite(halfedge(e, mesh_), mesh_)))
+          put(ecmap_, e, true);
+        else
+          put(ecmap_, e, false);
+      }
+    }
+
+  private:
+    PolygonMesh& mesh_;
+    VertexPointMap& vpmap_;
+    const AABB_tree* tree_ptr_;
+    bool own_tree_;
+    Triangle_list input_triangles_;
+    Patch_id_list input_patch_ids_;
+    boost::unordered_map<halfedge_descriptor, Halfedge_status> halfedge_status_map_;
+    bool protect_constraints_;
+    boost::unordered_map<face_descriptor, Patch_id> patch_ids_map_;
+    EdgeIsConstrainedMap ecmap_;
+    VertexIsConstrainedMap vcmap_;
+
+  };//end class Incremental_remesher
+}//end namespace internal
+}//end namespace Polygon_mesh_processing
+}//end namespace CGAL
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_REMESH_IMPL_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h
new file mode 100644
index 0000000..eb165f1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h
@@ -0,0 +1,160 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  Sebastien Loriot
+
+#include <CGAL/enum.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/array.h>
+
+#include <boost/optional.hpp>
+#include <boost/variant.hpp>
+
+
+#ifndef CGAL_INTERNAL_POLYGON_MESH_SLICER_AXIS_PARALLEL_PLANE_TRAITS_H
+#define CGAL_INTERNAL_POLYGON_MESH_SLICER_AXIS_PARALLEL_PLANE_TRAITS_H
+
+namespace CGAL{
+namespace Polygon_mesh_slicer_{
+
+template <class Traits>
+class Axis_parallel_plane_traits
+{
+  typedef typename Traits::FT FT;
+
+  const Traits& m_traits;
+  const int m_cst_coord; // 0, 1 or 2 indicates which coordinates is constant
+  const FT m_value; // indicates the value of the constant coordinate
+
+public:
+  typedef typename Traits::Plane_3 Plane_3;
+
+  Axis_parallel_plane_traits(int cst_coord, FT value, const Traits& traits)
+    : m_traits(traits)
+    , m_cst_coord(cst_coord)
+    , m_value(value)
+  {}
+
+  struct Oriented_side_3
+  {
+    const int m_cst_coord;
+    const FT m_value;
+    const typename Traits::Construct_cartesian_const_iterator_3 m_coord_iterator;
+
+    typedef Oriented_side result_type;
+
+    Oriented_side_3(const Axis_parallel_plane_traits<Traits>& traits)
+      : m_cst_coord(traits.m_cst_coord)
+      , m_value(traits.m_value)
+      , m_coord_iterator(traits.m_traits.construct_cartesian_const_iterator_3_object())
+    {}
+
+    result_type
+    operator()(const typename Traits::Plane_3&, const typename Traits::Point_3& pt) const
+    {
+      if ( *( m_coord_iterator(pt)+m_cst_coord) > m_value ) return ON_POSITIVE_SIDE;
+      if ( *( m_coord_iterator(pt)+m_cst_coord) < m_value ) return ON_NEGATIVE_SIDE;
+      return ON_ORIENTED_BOUNDARY;
+    }
+  };
+
+  struct Do_intersect_3{
+    const int m_cst_coord;
+    const FT m_value;
+
+    typedef bool result_type;
+
+    Do_intersect_3(int cst_coord, FT value)
+      : m_cst_coord(cst_coord)
+      , m_value(value)
+    {}
+
+    result_type
+    operator()(const typename Traits::Plane_3&, const Bbox_3& bbox) const
+    {
+      return (bbox.min)(m_cst_coord) <= m_value &&
+             (bbox.max)(m_cst_coord) >= m_value;
+    }
+  };
+
+  struct Intersect_3{
+    const int m_cst_coord;
+    const FT m_value;
+    const typename Traits::Construct_cartesian_const_iterator_3 m_coord_iterator;
+    const typename Traits::Construct_point_3 m_point_3;
+    const typename Traits::Construct_source_3 m_source_3;
+    const typename Traits::Construct_target_3 m_target_3;
+
+    typedef boost::variant<typename Traits::Point_3, typename Traits::Segment_3> Variant_type;
+    typedef boost::optional< Variant_type > result_type;
+
+    Intersect_3(const Axis_parallel_plane_traits<Traits>& traits)
+      : m_cst_coord(traits.m_cst_coord)
+      , m_value(traits.m_value)
+      , m_coord_iterator(traits.m_traits.construct_cartesian_const_iterator_3_object())
+      , m_point_3(traits.m_traits.construct_point_3_object())
+      , m_source_3(traits.m_traits.construct_source_3_object())
+      , m_target_3(traits.m_traits.construct_target_3_object())
+    {}
+
+    result_type
+    operator()( const typename Traits::Plane_3&,
+                const typename Traits::Segment_3& s) const
+    {
+      const typename Traits::Point_3& src = m_source_3(s);
+      const typename Traits::Point_3& tgt = m_target_3(s);
+
+      cpp11::array<FT,3> src_coords = {{ *m_coord_iterator(src),
+                                         *(m_coord_iterator(src)+1),
+                                         *(m_coord_iterator(src)+2) }};
+      cpp11::array<FT,3> tgt_coords = {{ *m_coord_iterator(tgt),
+                                         *(m_coord_iterator(tgt)+1),
+                                         *(m_coord_iterator(tgt)+2) }};
+
+      FT alpha = ( m_value - src_coords[m_cst_coord] ) / ( tgt_coords[m_cst_coord] - src_coords[m_cst_coord] );
+      src_coords[m_cst_coord]=m_value;
+      for (int i=1;i<3;++i)
+      {
+        int index = (m_cst_coord+i)%3;
+        src_coords[index]+=(tgt_coords[index]-src_coords[index])*alpha;
+      }
+
+      return Variant_type( m_point_3(src_coords[0], src_coords[1], src_coords[2]) );
+    }
+  };
+
+  Oriented_side_3 oriented_side_3_object() const
+  {
+    return Oriented_side_3(*this);
+  }
+
+  Do_intersect_3 do_intersect_3_object() const
+  {
+    return Do_intersect_3(m_cst_coord, m_value);
+  }
+
+  Intersect_3 intersect_3_object() const
+  {
+    return Intersect_3(*this);
+  }
+};
+
+} } // end of namespace CGAL::Polygon_mesh_slicer_
+
+
+#endif // CGAL_INTERNAL_POLYGON_MESH_SLICER_AXIS_PARALLEL_PLANE_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h
new file mode 100644
index 0000000..170d087
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h
@@ -0,0 +1,115 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  Sebastien Loriot
+
+
+#ifndef CGAL_INTERNAL_POLYGON_MESH_SLICER_TRAVERSAL_TRAITS_H
+#define CGAL_INTERNAL_POLYGON_MESH_SLICER_TRAVERSAL_TRAITS_H
+
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Triangle_3_Ray_3_do_intersect.h>
+#include <CGAL/internal/AABB_tree/Primitive_helper.h>
+#include <CGAL/enum.h>
+
+namespace CGAL{
+namespace Polygon_mesh_slicer_{
+
+template <typename AL_graph,
+          typename TriangleMesh,
+          typename VertexPointPmap,
+          typename AABBTraits,
+          class Traits>
+class Traversal_traits
+{
+/// typedefs
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor     edge_descriptor;
+  typedef typename AL_graph::vertex_descriptor                       AL_vertex_descriptor;
+  typedef std::pair<const vertex_descriptor, AL_vertex_descriptor>            Vertex_pair;
+  typedef std::map<vertex_descriptor, AL_vertex_descriptor>                  Vertices_map;
+/// container filled by `intersection()`
+  std::set<edge_descriptor>& m_all_coplanar_edges;
+  Vertices_map& m_vertices;
+  std::vector<edge_descriptor>& m_iedges;
+/// data members
+  TriangleMesh& m_tmesh;
+  const VertexPointPmap& m_vpmap;
+  const AABBTraits& m_aabb_traits;
+  const Traits& m_traits;
+  const typename AL_graph::vertex_descriptor null_vertex;
+/// predicates
+  typename Traits::Oriented_side_3 oriented_side_3;
+  typename Traits::Do_intersect_3 do_intersect_3;
+
+public:
+
+  Traversal_traits( std::set<edge_descriptor>& all_coplanar_edges,
+                    std::vector<edge_descriptor>& iedges,
+                    Vertices_map& vertices,
+                    TriangleMesh& tmesh,
+                    const VertexPointPmap& vpmap,
+                    const AABBTraits& aabb_traits,
+                    const Traits& traits)
+    : m_all_coplanar_edges(all_coplanar_edges)
+    , m_vertices(vertices)
+    , m_iedges(iedges)
+    , m_tmesh(tmesh)
+    , m_vpmap(vpmap)
+    , m_aabb_traits(aabb_traits)
+    , m_traits(traits)
+    , null_vertex( boost::graph_traits<AL_graph>::null_vertex() )
+    , oriented_side_3( m_traits.oriented_side_3_object() )
+    , do_intersect_3( m_traits.do_intersect_3_object() )
+  {}
+
+  bool go_further() const { return true; }
+
+  void intersection(const typename Traits::Plane_3& plane, const typename AABBTraits::Primitive& primitive)
+  {
+    typename boost::graph_traits<TriangleMesh>::edge_descriptor ed = primitive.id();
+
+    Oriented_side src = oriented_side_3(plane, get(m_vpmap, source(ed,m_tmesh)) );
+    Oriented_side tgt = oriented_side_3(plane, get(m_vpmap, target(ed,m_tmesh)) );
+
+    if (src==ON_ORIENTED_BOUNDARY)
+    {
+      if (tgt==ON_ORIENTED_BOUNDARY)
+        m_all_coplanar_edges.insert(ed);
+      else
+        m_vertices.insert( Vertex_pair (source(ed,m_tmesh), null_vertex) );
+    }
+    else{
+      if (tgt==ON_ORIENTED_BOUNDARY)
+          m_vertices.insert( Vertex_pair (target(ed,m_tmesh), null_vertex) );
+      else
+        if (src!=tgt)
+          return m_iedges.push_back(ed);
+    }
+  }
+
+  template<class Node>
+  bool do_intersect(const typename Traits::Plane_3& plane, const Node& node) const
+  {
+    return do_intersect_3(plane, node.bbox());
+  }
+};
+
+} } //end of namespace CGAL::Polygon_mesh_slicer_
+
+#endif // CGAL_INTERNAL_POLYGON_MESH_SLICER_TRAVERSAL_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/AABB_triangle_accessor_3_primitive.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/AABB_triangle_accessor_3_primitive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Operations_on_polyhedra/AABB_triangle_accessor_3_primitive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/AABB_triangle_accessor_3_primitive.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h
new file mode 100644
index 0000000..cff6da3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h
@@ -0,0 +1,107 @@
+// Copyright (c) 2013 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ilker O. Yaz and Sebastien Loriot
+
+
+#ifndef CGAL_POINT_INSIDE_POLYHEDRON_POINT_INSIDE_VERTICAL_RAY_CAST_H
+#define CGAL_POINT_INSIDE_POLYHEDRON_POINT_INSIDE_VERTICAL_RAY_CAST_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Origin.h>
+
+#include <boost/optional.hpp>
+#include <boost/none.hpp>
+
+namespace CGAL {
+namespace internal {
+
+// internal class for point inside test, using existing AABB tree
+template<class Kernel, class AABBTree>
+class Point_inside_vertical_ray_cast 
+{
+  typedef typename Kernel::Point_3       Point;
+  typedef typename Kernel::Ray_3         Ray;
+  typedef typename AABBTree::AABB_traits Traits;
+
+  static const unsigned int seed = 1340818006;
+
+public:
+  Bounded_side operator()(
+    const Point& point,
+    const AABBTree& tree,
+    typename Kernel::Construct_ray_3 ray_functor = Kernel().construct_ray_3_object(),
+    typename Kernel::Construct_vector_3 vector_functor = Kernel().construct_vector_3_object() ) const
+  {
+    const typename Traits::Bounding_box& bbox = tree.bbox();
+
+    if(   point.x() < bbox.xmin() || point.x() > bbox.xmax()
+      || point.y() < bbox.ymin() || point.y() > bbox.ymax()
+      || point.z() < bbox.zmin() || point.z() > bbox.zmax() )
+    {
+      return ON_UNBOUNDED_SIDE;
+    }
+
+    //the direction of the vertical ray depends on the position of the point in the bbox
+    //in order to limit the expected number of nodes visited.
+    Ray query = ray_functor(point, vector_functor(0,0,(2*point.z() <  tree.bbox().zmax()+tree.bbox().zmin()?-1:1)));
+    boost::optional<Bounded_side> res = is_inside_ray_tree_traversal<true>(query, tree);
+
+    if(res == boost::none)
+    {
+      CGAL::Random rg(seed); // seed some value for make it easy to debug
+      Random_points_on_sphere_3<Point> random_point(1.,rg);
+
+      do { //retry with a random ray
+        query = ray_functor(point, vector_functor(CGAL::ORIGIN,*random_point++));
+        res = is_inside_ray_tree_traversal<false>(query, tree);
+      } while (res == boost::none);
+    }
+    return *res;
+  }
+
+private:
+  template<bool ray_is_vertical>
+  boost::optional<Bounded_side>
+  is_inside_ray_tree_traversal(const Ray& ray, const AABBTree& tree) const
+  {
+    std::pair<boost::logic::tribool,std::size_t>
+      status( boost::logic::tribool(boost::logic::indeterminate), 0);
+
+    Ray_3_Triangle_3_traversal_traits<Traits, Kernel, Boolean_tag<ray_is_vertical> >
+      traversal_traits(status, tree.traits());
+
+    tree.traversal(ray, traversal_traits);
+
+    if ( !boost::logic::indeterminate(status.first) )
+    {
+      if (status.first) {
+        return (status.second&1) == 1 ? ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
+      }
+      //otherwise the point is on the facet
+      return ON_BOUNDARY;
+    }
+    return boost::optional<Bounded_side>(); // indeterminate
+  }
+};
+
+}// namespace internal
+}// namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h
new file mode 100644
index 0000000..a53726f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h
@@ -0,0 +1,231 @@
+// Copyright (c) 2013 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sebastien Loriot
+
+
+#ifndef CGAL_POINT_INSIDE_POLYHEDRON_RAY_3_TRIANGLE_3_TRAVERSAL_TRAITS_H
+#define CGAL_POINT_INSIDE_POLYHEDRON_RAY_3_TRIANGLE_3_TRAVERSAL_TRAITS_H
+
+#include <boost/logic/tribool.hpp>
+#include <CGAL/tags.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Triangle_3_Ray_3_do_intersect.h>
+#include <CGAL/internal/AABB_tree/Primitive_helper.h>
+#include <CGAL/internal/AABB_tree/AABB_node.h>
+
+namespace CGAL {
+namespace internal {
+
+template<typename AABBTraits, class Kernel, class Tag_ray_is_vertical=Tag_false>
+class Ray_3_Triangle_3_traversal_traits
+{
+protected:
+  //the status indicates whether the query point is strictly inside the polyhedron, and the number of intersected triangles if yes
+  std::pair<boost::logic::tribool,std::size_t>& m_status;
+  bool m_stop;
+  const AABBTraits& m_aabb_traits;
+  typedef typename AABBTraits::Primitive Primitive;
+  typedef CGAL::AABB_node<AABBTraits> Node;
+
+public:
+  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status,
+                                    const AABBTraits& aabb_traits)
+    :m_status(status),m_stop(false), m_aabb_traits(aabb_traits)
+  {m_status.first=true;}
+
+  bool go_further() const { return !m_stop; }
+
+  template<class Query>
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    internal::r3t3_do_intersect_endpoint_position_visitor visitor;
+    std::pair<bool,internal::R3T3_intersection::type> res=
+      internal::do_intersect(
+        (internal::Primitive_helper<AABBTraits>::get_datum(primitive, m_aabb_traits)),
+        query,Kernel(),visitor);
+    
+    if (res.first){
+      switch (res.second){
+        case internal::R3T3_intersection::CROSS_FACET:
+          ++m_status.second;
+        break;
+        case internal::R3T3_intersection::ENDPOINT_IN_TRIANGLE:
+          m_status.first=false;
+          m_stop=true;
+        break;
+        default:
+          m_status.first=boost::logic::indeterminate;
+          m_stop=true;
+      }
+    }
+  }
+  
+  template<class Query>
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return m_aabb_traits.do_intersect_object()(query, node.bbox());
+  }
+};
+
+
+//specialization for vertical ray
+template<typename AABBTraits, class Kernel>
+class Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_true>: 
+  public Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_false>
+{
+  typedef Ray_3_Triangle_3_traversal_traits<AABBTraits,Kernel,Tag_false> Base;
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Base::Primitive Primitive;
+  typedef CGAL::AABB_node<AABBTraits> Node;
+
+public:
+  Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status, const AABBTraits& aabb_traits)
+    :Base(status, aabb_traits){}
+
+  template <class Query>
+  bool do_intersect(const Query& query, const Bbox_3& bbox) const
+  {
+    const Point& source=query.point(0);
+    const Point& target=query.point(1);
+    
+    bool inc_z=target.z()>source.z();
+    
+    //the ray does not intersect the z-slab
+    if ( ( inc_z && source.z()>bbox.zmax() )|| (!inc_z && source.z()<bbox.zmin()) ) return false;
+    
+    //the source is not in the x-slab
+    if (source.x() > bbox.xmax() || source.x()<bbox.xmin()) return false;
+    //check if the source is not in the y-slab
+    return source.y() <= bbox.ymax() && source.y()>=bbox.ymin();
+  }
+
+  template <class Query>
+  bool do_intersect(const Query& query, const Node& node) const
+  {
+    return do_intersect(query,node.bbox());
+  }
+
+private:
+  typename Kernel::Point_2 x_project(const typename Kernel::Point_3& p) const{
+    return typename Kernel::Point_2(p.y(),p.z());
+  }
+  typename Kernel::Point_2 y_project(const typename Kernel::Point_3& p) const{
+    return typename Kernel::Point_2(p.x(),p.z());
+  }
+  typename Kernel::Point_2 z_project(const typename Kernel::Point_3& p) const{
+    return typename Kernel::Point_2(p.x(),p.y());
+  }
+public:
+  template<class Query>
+  void intersection(const Query& query, const Primitive& primitive)
+  {
+    typename Kernel::Triangle_3 t
+      = (internal::Primitive_helper<AABBTraits>::get_datum(primitive, this->m_aabb_traits));
+    if ( !do_intersect(query,t.bbox()) ) return;
+    
+    typename Kernel::Point_2 p0=z_project(t[0]);
+    typename Kernel::Point_2 p1=z_project(t[1]);
+    typename Kernel::Point_2 p2=z_project(t[2]);
+    int indices[3]={0,1,2}; //to track whether triangle points have been swapt
+    typename Kernel::Point_2 q=z_project( query.source() );
+    
+    Orientation orient_2=orientation(p0,p1,p2);
+    
+    //check whether the face has a normal vector in the xy-plane
+    if (orient_2==COLLINEAR){
+      //in that case the projection of the triangle along the z-axis is a segment.
+      const typename Kernel::Point_2& other_point = p0!=p1?p1:p2;
+      //~ if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
+      if ( orientation(p0,other_point,q) != COLLINEAR ) return;///no intersection
+      
+      //check if the ray source is above or below the triangle and compare it 
+      //with the direction of the ray
+      //TODO and if yes return
+      //this is just an optimisation, the current code is valid
+      
+      this->m_status.first=boost::logic::indeterminate;
+      this->m_stop=true;
+      return;
+    }
+    
+    
+    //regular case
+    if (orient_2==NEGATIVE){
+      std::swap(p1,p2);
+      std::swap(indices[1],indices[2]);
+    }
+    
+    //check whether the ray intersect the supporting plane
+    Orientation orient_3 = orientation(t[indices[0]],t[indices[1]],t[indices[2]],query.source());
+    if ( orient_3!=COPLANAR && 
+          (
+            //indicates whether the ray is oriented toward the positive side of the plane
+            ( POSITIVE == sign( query.to_vector().z() )  )
+              ==
+            //indicates whether the source of the ray is in the positive side of the plane
+            (orient_3==POSITIVE)
+          )
+    ) return; //no intersection
+    
+
+    //position against first segment
+    switch( orientation(p0,p1,q) ){
+      case COLLINEAR:
+        this->m_status.first=boost::logic::indeterminate;
+        this->m_stop=true;
+      case NEGATIVE:
+        return;
+      default:
+      {}
+    }
+    //position against second segment
+    switch( orientation(p1,p2,q) ){
+      case COLLINEAR:
+        this->m_status.first=boost::logic::indeterminate;
+        this->m_stop=true;
+      case NEGATIVE:
+        return;
+      default:
+      {}
+    }
+    //position against third segment
+    switch( orientation(p2,p0,q) ){
+      case COLLINEAR:
+        this->m_status.first=boost::logic::indeterminate;
+        this->m_stop=true;
+      case NEGATIVE:
+        return;
+      default:
+      {}
+    }
+
+    if (orient_3==COPLANAR){
+      //the endpoint is inside the triangle
+      this->m_status.first=false;
+      this->m_stop=true;
+    }
+    else
+      ++(this->m_status.second);
+  }
+};
+
+}// namespace internal
+}// namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h
new file mode 100644
index 0000000..a59f500
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h
@@ -0,0 +1,203 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_FAIR_POLYHEDRON_3_H
+#define CGAL_POLYGON_MESH_PROCESSING_FAIR_POLYHEDRON_3_H
+
+#include <map>
+#include <set>
+#include <CGAL/assertions.h>
+#include <CGAL/Polygon_mesh_processing/Weights.h>
+#include <CGAL/Timer.h>
+#include <CGAL/trace.h>
+#include <iterator>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal {
+
+// [On Linear Variational Surface Deformation Methods-2008]
+template<class PolygonMesh,
+         class SparseLinearSolver,
+         class WeightCalculator,
+         class VertexPointMap>
+class Fair_Polyhedron_3 {
+  // typedefs
+  typedef typename VertexPointMap::value_type Point_3;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  typedef  Halfedge_around_target_circulator<PolygonMesh>  Halfedge_around_vertex_circulator;
+
+  typedef SparseLinearSolver Sparse_linear_solver;
+  typedef typename Sparse_linear_solver::Matrix Solver_matrix;
+  typedef typename Sparse_linear_solver::Vector Solver_vector;
+
+// members
+  PolygonMesh& pmesh;
+  WeightCalculator weight_calculator;
+  VertexPointMap ppmap;
+
+public:
+  Fair_Polyhedron_3(PolygonMesh& pmesh
+      , VertexPointMap vpmap
+      , WeightCalculator weight_calculator)
+    : pmesh(pmesh)
+    , weight_calculator(weight_calculator)
+    , ppmap(vpmap)
+  { }
+  
+private:
+  double sum_weight(vertex_descriptor v) {
+  double weight = 0;
+  Halfedge_around_vertex_circulator circ(halfedge(v,pmesh),pmesh), done(circ);
+  do {
+    weight += weight_calculator.w_ij(*circ);
+    } while(++circ != done);
+    return weight;
+  }
+
+  // recursively computes a row (use depth parameter to compute L, L^2, L^3)
+  // Equation 6 in [On Linear Variational Surface Deformation Methods]
+  void compute_row(
+    vertex_descriptor v,
+    int row_id,                            // which row to insert in [ frees stay left-hand side ]
+    Solver_matrix& matrix, 
+    double& x, double& y, double& z,               // constants transfered to right-hand side
+    double multiplier,
+    const std::map<vertex_descriptor, std::size_t>& vertex_id_map,
+    unsigned int depth)
+  {
+    if(depth == 0) {
+      typename std::map<vertex_descriptor, std::size_t>::const_iterator vertex_id_it = vertex_id_map.find(v);
+      if(vertex_id_it != vertex_id_map.end()) {
+        int col_id = static_cast<int>(vertex_id_it->second);
+        matrix.add_coef(row_id, col_id, multiplier);
+      }
+      else { 
+        typename boost::property_traits<VertexPointMap>::reference p = ppmap[v];
+        x += multiplier * - p.x(); 
+        y += multiplier * - p.y(); 
+        z += multiplier * - p.z(); 
+      }
+    }
+    else {
+      double w_i = weight_calculator.w_i(v);
+
+      Halfedge_around_vertex_circulator circ(halfedge(v,pmesh),pmesh), done(circ);
+      do {
+        double w_i_w_ij = w_i * weight_calculator.w_ij(*circ) ;
+
+        vertex_descriptor nv = target(opposite(*circ,pmesh),pmesh);
+        compute_row(nv, row_id, matrix, x, y, z, -w_i_w_ij*multiplier, vertex_id_map, depth-1);
+      } while(++circ != done);
+
+      double w_i_w_ij_sum = w_i * sum_weight(v);
+      compute_row(v, row_id, matrix, x, y, z, w_i_w_ij_sum*multiplier, vertex_id_map, depth-1);
+    }
+  }
+
+public:
+  template<class VertexRange>
+  bool fair(const VertexRange& vertices
+    , SparseLinearSolver solver
+    , unsigned int fc)
+  {
+    int depth = static_cast<int>(fc) + 1;
+    if(depth < 0 || depth > 3) {
+      CGAL_warning(!"Continuity should be between 0 and 2 inclusively!");
+      return false; 
+    }
+
+    std::set<vertex_descriptor> interior_vertices(boost::begin(vertices),
+                                                  boost::end(vertices));
+    if(interior_vertices.empty()) { return true; }
+
+    CGAL::Timer timer; timer.start();
+    const std::size_t nb_vertices = interior_vertices.size();
+    Solver_vector X(nb_vertices), Bx(nb_vertices);
+    Solver_vector Y(nb_vertices), By(nb_vertices);
+    Solver_vector Z(nb_vertices), Bz(nb_vertices);
+
+    std::map<vertex_descriptor, std::size_t> vertex_id_map;
+    std::size_t id = 0;
+    BOOST_FOREACH(vertex_descriptor vd, interior_vertices)
+    {
+      if( !vertex_id_map.insert(std::make_pair(vd, id)).second ) {
+        CGAL_warning(!"Duplicate vertex is found!");
+        return false;
+      }
+      ++id;
+    }
+
+    Solver_matrix A(nb_vertices);
+
+    BOOST_FOREACH(vertex_descriptor vd, interior_vertices)
+    {
+      int v_id = static_cast<int>(vertex_id_map[vd]);
+      compute_row(vd, v_id, A, Bx[v_id], By[v_id], Bz[v_id], 1, vertex_id_map, depth);
+    }
+    CGAL_TRACE_STREAM << "**Timer** System construction: " << timer.time() << std::endl; timer.reset();
+
+    // factorize
+    double D;
+    bool prefactor_ok = solver.factor(A, D);
+    if(!prefactor_ok) {
+      CGAL_warning(!"pre_factor failed!");
+      return false;
+    }
+    CGAL_TRACE_STREAM << "**Timer** System factorization: " << timer.time() << std::endl; timer.reset();
+
+    // solve
+    bool is_all_solved = solver.linear_solver(Bx, X) && solver.linear_solver(By, Y) && solver.linear_solver(Bz, Z);
+    if(!is_all_solved) {
+      CGAL_warning(!"linear_solver failed!"); 
+      return false; 
+    }
+    CGAL_TRACE_STREAM << "**Timer** System solver: " << timer.time() << std::endl; timer.reset();
+
+    
+    /* This relative error is to large for cases that the results are not good */ 
+    /*
+    double rel_err_x = (A.eigen_object()*X - Bx).norm() / Bx.norm();
+    double rel_err_y = (A.eigen_object()*Y - By).norm() / By.norm();
+    double rel_err_z = (A.eigen_object()*Z - Bz).norm() / Bz.norm();
+    CGAL_TRACE_STREAM << "rel error: " << rel_err_x 
+                                << " " << rel_err_y
+                                << " " << rel_err_z << std::endl;
+                                */
+
+    // update 
+    id = 0;
+    BOOST_FOREACH(vertex_descriptor vd, interior_vertices)
+    {
+      put(ppmap, vd, Point_3(X[id], Y[id], Z[id]));
+      ++id;
+    }
+    return true;
+  }
+};
+
+}//namespace internal
+
+}//namespace Polygon_mesh_processing
+
+}//namespace CGAL
+#endif //CGAL_POLYGON_MESH_PROCESSING_FAIR_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h
new file mode 100644
index 0000000..79db38e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h
@@ -0,0 +1,386 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_PMP_BGL_NAMED_FUNCTION_PARAMS_H
+#define CGAL_PMP_BGL_NAMED_FUNCTION_PARAMS_H
+
+#include <CGAL/boost/graph/named_function_params.h>
+
+#define CGAL_PMP_NP_TEMPLATE_PARAMETERS T, typename Tag, typename Base
+#define CGAL_PMP_NP_CLASS CGAL::pmp_bgl_named_params<T,Tag,Base>
+
+namespace CGAL{
+
+  enum density_control_factor_t     { density_control_factor      };
+  enum use_delaunay_triangulation_t { use_delaunay_triangulation  };
+  enum fairing_continuity_t         { fairing_continuity };
+  enum sparse_linear_solver_t       { sparse_linear_solver };
+  enum geom_traits_t                { geom_traits };
+  enum number_of_iterations_t       { number_of_iterations };
+  enum protect_constraints_t        { protect_constraints };
+  enum vertex_is_constrained_t      { vertex_is_constrained };
+
+  //to be documented
+  enum smooth_along_features_t      { smooth_along_features };
+  enum face_normal_t                { face_normal };
+
+  //internal
+  enum weight_calculator_t          { weight_calculator };
+  enum all_default_t                { all_default };
+
+  template <typename T, typename Tag, typename Base = boost::no_property>
+  struct pmp_bgl_named_params
+    : CGAL::cgal_bgl_named_params<T, Tag, Base>
+  {
+    typedef CGAL::cgal_bgl_named_params<T, Tag, Base> base;
+    typedef pmp_bgl_named_params self;
+
+    pmp_bgl_named_params(T v = T()) : base(v) {}
+    pmp_bgl_named_params(T v, const Base& b) : base(v, b) {}
+
+    pmp_bgl_named_params<bool, all_default_t, self>
+    all_default() const
+    {
+      typedef pmp_bgl_named_params<bool, all_default_t, self> Params;
+      return Params(*this);
+    }
+
+    template <typename Double>
+    pmp_bgl_named_params<Double, density_control_factor_t, self>
+    density_control_factor(const Double& d) const
+    {
+      typedef pmp_bgl_named_params<Double, density_control_factor_t, self> Params;
+      return Params(d, *this);
+    }
+
+    template <typename Boolean>
+    pmp_bgl_named_params<Boolean, use_delaunay_triangulation_t, self>
+    use_delaunay_triangulation(const Boolean b) const
+    {
+      typedef pmp_bgl_named_params<Boolean, use_delaunay_triangulation_t, self> Params;
+      return Params(b, *this);
+    }
+
+    template <typename UnsignedInt>
+    pmp_bgl_named_params<UnsignedInt, fairing_continuity_t, self>
+    fairing_continuity(const UnsignedInt& ui) const
+    {
+      typedef pmp_bgl_named_params<UnsignedInt, fairing_continuity_t, self> Params;
+      return Params(ui, *this);
+    }
+
+    template<typename Solver>
+    pmp_bgl_named_params<Solver, sparse_linear_solver_t, self>
+    sparse_linear_solver(const Solver& s) const
+    {
+      typedef pmp_bgl_named_params<Solver, sparse_linear_solver_t, self> Params;
+      return Params(s, *this);
+    }
+
+    template<typename WeightCalc>
+    pmp_bgl_named_params<WeightCalc, weight_calculator_t, self>
+    weight_calculator(const WeightCalc& w) const
+    {
+      typedef pmp_bgl_named_params<WeightCalc, weight_calculator_t, self> Params;
+      return Params(w, *this);
+    }
+
+    template <typename FaceNormalMap>
+    pmp_bgl_named_params<FaceNormalMap, face_normal_t, self>
+    face_normal_map(const FaceNormalMap& m) const
+    {
+      typedef pmp_bgl_named_params<FaceNormalMap, face_normal_t, self> Params;
+      return Params(m, *this);
+    }
+
+    //overload
+    template <typename PointMap>
+    pmp_bgl_named_params<PointMap, boost::vertex_point_t, self>
+    vertex_point_map(const PointMap& p) const
+    {
+      typedef pmp_bgl_named_params<PointMap, boost::vertex_point_t, self> Params;
+      return Params(p, *this);
+    }
+
+    template<typename K>
+    pmp_bgl_named_params<K, geom_traits_t, self>
+    geom_traits(const K& k) const
+    {
+      typedef pmp_bgl_named_params<K, geom_traits_t, self> Params;
+      return Params(k, *this);
+    }
+
+    template<typename NT>
+    pmp_bgl_named_params<NT, number_of_iterations_t, self>
+    number_of_iterations(const NT& n) const
+    {
+      typedef pmp_bgl_named_params<NT, number_of_iterations_t, self> Params;
+      return Params(n, *this);
+    }
+
+    template<typename Boolean>
+    pmp_bgl_named_params<Boolean, protect_constraints_t, self>
+    protect_constraints(const Boolean b) const
+    {
+      typedef pmp_bgl_named_params<Boolean, protect_constraints_t, self> Params;
+      return Params(b, *this);
+    }
+
+    template<typename Boolean>
+    pmp_bgl_named_params<Boolean, smooth_along_features_t, self>
+      smooth_along_features(const Boolean b) const
+    {
+      typedef pmp_bgl_named_params<Boolean, smooth_along_features_t, self> Params;
+      return Params(b, *this);
+    }
+
+    template <typename VertexIsConstrained>
+    pmp_bgl_named_params<VertexIsConstrained, vertex_is_constrained_t, self>
+    vertex_is_constrained_map(const VertexIsConstrained& vm) const
+    {
+      typedef pmp_bgl_named_params<VertexIsConstrained, vertex_is_constrained_t, self> Params;
+      return Params(vm, *this);
+    }
+
+    //overload
+    template <typename EdgeIsConstrained>
+    pmp_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self>
+    edge_is_constrained_map(const EdgeIsConstrained& em) const
+    {
+      typedef pmp_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self> Params;
+      return Params(em, *this);
+    }
+
+    template <typename EdgeIsConstrainedParams>
+    pmp_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self>
+    edge_is_constrained_map_params(const EdgeIsConstrainedParams& em) const
+    {
+      typedef pmp_bgl_named_params<EdgeIsConstrainedParams,
+                                   edge_is_constrained_params_t, self> Params;
+      return Params(em, *this);
+    }
+
+    //overload
+    template <typename IndexMap>
+    pmp_bgl_named_params<IndexMap, boost::face_index_t, self>
+    face_index_map(const IndexMap& p) const
+    {
+      typedef pmp_bgl_named_params<IndexMap, boost::face_index_t, self> Params;
+      return Params(p, *this);
+    }
+
+    //overload
+    template <typename IndexMap>
+    pmp_bgl_named_params<IndexMap, boost::vertex_index_t, self>
+    vertex_index_map(const IndexMap& p) const
+    {
+      typedef pmp_bgl_named_params<IndexMap, boost::vertex_index_t, self> Params;
+      return Params(p, *this);
+    }
+
+  };
+
+namespace Polygon_mesh_processing{
+
+namespace parameters{
+
+  pmp_bgl_named_params<bool, all_default_t>
+  inline all_default()
+  {
+    typedef pmp_bgl_named_params<bool, all_default_t> Params;
+    return Params();
+  }
+
+  template <typename Double>
+  pmp_bgl_named_params<Double, density_control_factor_t>
+  density_control_factor(const Double& d)
+  {
+    typedef pmp_bgl_named_params<Double, density_control_factor_t> Params;
+    return Params(d);
+  }
+
+  template <typename Boolean>
+  pmp_bgl_named_params<Boolean, use_delaunay_triangulation_t>
+  use_delaunay_triangulation(const Boolean b)
+  {
+    typedef pmp_bgl_named_params<Boolean, use_delaunay_triangulation_t> Params;
+    return Params(b);
+  }
+
+  template <typename UnsignedInt>
+  pmp_bgl_named_params<UnsignedInt, fairing_continuity_t>
+  fairing_continuity(const UnsignedInt& ui)
+  {
+    typedef pmp_bgl_named_params<UnsignedInt, fairing_continuity_t> Params;
+    return Params(ui);
+  }
+
+  template<typename Solver>
+  pmp_bgl_named_params<Solver, sparse_linear_solver_t>
+  sparse_linear_solver(const Solver& s)
+  {
+    typedef pmp_bgl_named_params<Solver, sparse_linear_solver_t> Params;
+    return Params(s);
+  }
+
+  template<typename WeightCalc>
+  pmp_bgl_named_params<WeightCalc, weight_calculator_t>
+  weight_calculator(const WeightCalc& w)
+  {
+    typedef pmp_bgl_named_params<WeightCalc, weight_calculator_t> Params;
+    return Params(w);
+  }
+
+  template <typename FaceNormalMap>
+  pmp_bgl_named_params<FaceNormalMap, face_normal_t>
+  face_normal_map(const FaceNormalMap& m)
+  {
+    typedef pmp_bgl_named_params<FaceNormalMap, face_normal_t> Params;
+    return Params(m);
+  }
+
+  //overload
+  template <typename PointMap>
+  pmp_bgl_named_params<PointMap, boost::vertex_point_t>
+  vertex_point_map(const PointMap& p)
+  {
+    typedef pmp_bgl_named_params<PointMap, boost::vertex_point_t> Params;
+    return Params(p);
+  }
+
+  template<typename K>
+  pmp_bgl_named_params<K, geom_traits_t>
+  geom_traits(const K& k)
+  {
+    typedef pmp_bgl_named_params<K, geom_traits_t> Params;
+    return Params(k);
+  }
+
+  template<typename NT>
+  pmp_bgl_named_params<NT, number_of_iterations_t>
+    number_of_iterations(const NT& n)
+  {
+    typedef pmp_bgl_named_params<NT, number_of_iterations_t> Params;
+    return Params(n);
+  }
+
+  template <typename Boolean>
+  pmp_bgl_named_params<Boolean, protect_constraints_t>
+  protect_constraints(const Boolean b)
+  {
+    typedef pmp_bgl_named_params<Boolean, protect_constraints_t> Params;
+    return Params(b);
+  }
+
+  template<typename Boolean>
+  pmp_bgl_named_params<Boolean, smooth_along_features_t>
+  smooth_along_features(const Boolean b)
+  {
+    typedef pmp_bgl_named_params<Boolean, smooth_along_features_t> Params;
+    return Params(b);
+  }
+
+  template <typename VertexIsConstrained>
+  pmp_bgl_named_params<VertexIsConstrained, vertex_is_constrained_t>
+  vertex_is_constrained_map(const VertexIsConstrained& vm)
+  {
+    typedef pmp_bgl_named_params<VertexIsConstrained, vertex_is_constrained_t> Params;
+    return Params(vm);
+  }
+
+  //overload
+  template <typename EdgeIsConstrained>
+  pmp_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t>
+  edge_is_constrained_map(const EdgeIsConstrained& em)
+  {
+    typedef pmp_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t> Params;
+    return Params(em);
+  }
+
+  //overload
+  template <typename EdgeIsConstrainedParams>
+  pmp_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t>
+  edge_is_constrained_map_params(const EdgeIsConstrainedParams& em)
+  {
+    typedef pmp_bgl_named_params<EdgeIsConstrainedParams,
+                                 edge_is_constrained_params_t> Params;
+    return Params(em);
+  }
+
+  //overload
+  template <typename IndexMap>
+  pmp_bgl_named_params<IndexMap, boost::face_index_t>
+  face_index_map(IndexMap const& p)
+  {
+    typedef pmp_bgl_named_params<IndexMap, boost::face_index_t> Params;
+    return Params(p);
+  }
+
+  //overload
+  template <typename IndexMap>
+  pmp_bgl_named_params<IndexMap, boost::vertex_index_t>
+  vertex_index_map(const IndexMap& p)
+  {
+    typedef pmp_bgl_named_params<IndexMap, boost::vertex_index_t> Params;
+    return Params(p);
+  }
+
+} //namespace parameters
+} //namespace Polygon_mesh_processing
+
+#if BOOST_VERSION < 105100
+  template <class Tag1, class Tag2, class T1, class Base>
+  inline
+  typename boost::property_value< pmp_bgl_named_params<T1,Tag1,Base>, Tag2>::type
+  get_param(const pmp_bgl_named_params<T1,Tag1,Base>& p, Tag2 tag2)
+  {
+    enum { match = boost::detail::same_property<Tag1,Tag2>::value };
+    typedef typename
+      boost::property_value< pmp_bgl_named_params<T1,Tag1,Base>, Tag2>::type T2;
+    T2* t2 = 0;
+    typedef boost::detail::property_value_dispatch<match> Dispatcher;
+    return Dispatcher::const_get_value(p, t2, tag2);
+  }
+#endif
+
+} //namespace CGAL
+
+// partial specializations hate inheritance and we need to repeat
+// those here. this is rather fragile.
+namespace boost {
+  template <typename T, typename Tag, typename Base, typename Def>
+  struct lookup_named_param_def<Tag, CGAL::pmp_bgl_named_params<T, Tag, Base>, Def> {
+    typedef T type;
+    static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def&) {
+      return p.m_value;
+    }
+  };
+
+  template <typename Tag1, typename T, typename Tag, typename Base, typename Def>
+  struct lookup_named_param_def<Tag1, CGAL::pmp_bgl_named_params<T, Tag, Base>, Def> {
+    typedef typename lookup_named_param_def<Tag1, Base, Def>::type type;
+    static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def& def) {
+      return lookup_named_param_def<Tag1, Base, Def>::get(p.m_base, def);
+    }
+  };
+} // boost
+
+
+#endif //CGAL_PMP_BGL_NAMED_FUNCTION_PARAMS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h
new file mode 100644
index 0000000..9bd3a37
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h
@@ -0,0 +1,140 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_NAMED_PARAMETERS_HELPERS_H
+#define CGAL_NAMED_PARAMETERS_HELPERS_H
+
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+
+#include <CGAL/property_map.h>
+
+// shortcut for accessing the value type of the property map
+template <class Graph, class Property>
+class property_map_value {
+  typedef typename boost::property_map<Graph, Property>::const_type PMap;
+public:
+  typedef typename boost::property_traits<PMap>::value_type type;
+};
+
+template<typename PolygonMesh>
+class GetK
+{
+  typedef typename property_map_value<PolygonMesh,
+    boost::vertex_point_t>::type
+    Point;
+public:
+  typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
+};
+
+template<typename PolygonMesh, typename NamedParameters>
+class GetGeomTraits
+{
+  typedef typename GetK<PolygonMesh>::Kernel DefaultKernel;
+public:
+  typedef typename boost::lookup_named_param_def <
+    CGAL::geom_traits_t,
+    NamedParameters,
+    DefaultKernel
+  > ::type  type;
+};
+
+template<typename PolygonMesh, typename NamedParameters>
+class GetVertexPointMap
+{
+  typedef typename boost::property_map<PolygonMesh, boost::vertex_point_t>::const_type
+    DefaultVPMap_const;
+  typedef typename boost::property_map<PolygonMesh, boost::vertex_point_t>::type
+    DefaultVPMap;
+public:
+  typedef typename boost::lookup_named_param_def<
+    boost::vertex_point_t,
+    NamedParameters,
+    DefaultVPMap
+  > ::type  type;
+  typedef typename boost::lookup_named_param_def<
+    boost::vertex_point_t,
+    NamedParameters,
+    DefaultVPMap_const
+  > ::type  const_type;
+};
+
+template<typename PolygonMesh, typename NamedParameters>
+class GetFaceIndexMap
+{
+  typedef typename boost::property_map < PolygonMesh, boost::face_index_t>::type DefaultMap;
+public:
+  typedef typename boost::lookup_named_param_def <
+    boost::face_index_t,
+    NamedParameters,
+    DefaultMap
+  > ::type  type;
+};
+
+template<typename PolygonMesh, typename NamedParameters>
+class GetVertexIndexMap
+{
+  typedef typename boost::property_map < PolygonMesh, boost::vertex_index_t>::type DefaultMap;
+public:
+  typedef typename boost::lookup_named_param_def <
+    boost::vertex_index_t,
+    NamedParameters,
+    DefaultMap
+  > ::type  type;
+};
+
+template<typename PolygonMesh, typename NamedParameters>
+class GetFaceNormalMap
+{
+  struct DummyNormalPmap
+  {
+    typedef typename boost::graph_traits<PolygonMesh>::face_descriptor key_type;
+    typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type::Vector_3 value_type;
+    typedef value_type reference;
+    typedef boost::readable_property_map_tag category;
+
+    typedef DummyNormalPmap Self;
+    friend reference get(const Self&, const key_type&) { return CGAL::NULL_VECTOR; }
+  };
+
+public:
+  typedef DummyNormalPmap NoMap;
+  typedef typename boost::lookup_named_param_def <
+    CGAL::face_normal_t,
+    NamedParameters,
+    DummyNormalPmap//default
+  > ::type  type;
+};
+
+template<typename NamedParameters, typename DefaultSolver>
+class GetSolver
+{
+public:
+  typedef typename boost::lookup_named_param_def <
+    CGAL::sparse_linear_solver_t,
+    NamedParameters,
+    DefaultSolver
+  > ::type type;
+};
+
+
+
+#endif //CGAL_NAMED_PARAMETERS_HELPERS_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h
new file mode 100644
index 0000000..296c5b9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h
@@ -0,0 +1,335 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_REFINE_POLYHEDRON_3_H
+#define CGAL_POLYGON_MESH_PROCESSING_REFINE_POLYHEDRON_3_H
+
+#include <cmath>
+#include <map>
+#include <set>
+#include <list>
+
+#include <CGAL/assertions.h>
+#include <CGAL/trace.h>
+#include <CGAL/Timer.h>
+#include <CGAL/squared_distance_3.h>
+#include <CGAL/Kernel/global_functions_3.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <CGAL/boost/graph/properties.h>
+#include <boost/property_map/property_map.hpp>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal {
+
+template<class PolygonMesh, class VertexPointMap>
+class Refine_Polyhedron_3 {
+//// typedefs
+  typedef typename boost::property_traits<VertexPointMap>::value_type     Point_3;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor    vertex_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor  halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::face_descriptor      face_descriptor;
+
+  typedef Halfedge_around_face_circulator<PolygonMesh>    Halfedge_around_facet_circulator;
+  typedef Halfedge_around_target_circulator<PolygonMesh>  Halfedge_around_vertex_circulator;
+
+private:
+  PolygonMesh& pmesh;
+  VertexPointMap vpmap;
+  
+  bool flippable(halfedge_descriptor h) {
+    // this check is added so that edge flip does not break manifoldness
+    // it might happen when there is an edge where flip_edge(h) will be placed (i.e. two edges collide after flip)
+    vertex_descriptor v_tip_0 = target(next(h,pmesh),pmesh);
+    vertex_descriptor v_tip_1 = target(next(opposite(h,pmesh),pmesh),pmesh);
+    Halfedge_around_vertex_circulator v_cir(next(h,pmesh), pmesh), v_end(v_cir);
+    do {
+      if(target(opposite(*v_cir, pmesh),pmesh) == v_tip_1) { return false; }
+    } while(++v_cir != v_end);
+    
+    // also eliminate collinear triangle generation
+    if( CGAL::collinear(vpmap[v_tip_0], vpmap[v_tip_1], vpmap[target(h, pmesh)]) ||
+        CGAL::collinear(vpmap[v_tip_0], vpmap[v_tip_1], vpmap[target(opposite(h, pmesh),pmesh)]) ) {
+      return false;
+    }
+
+    return true;
+  }
+
+  bool relax(halfedge_descriptor h)
+  {
+    const Point_3& p = vpmap[target(h,pmesh)];
+    const Point_3& q = vpmap[target(opposite(h,pmesh),pmesh)];
+    const Point_3& r = vpmap[target(next(h,pmesh),pmesh)];
+    const Point_3& s = vpmap[target(next(opposite(h,pmesh),pmesh),pmesh)];
+    if( (CGAL::ON_UNBOUNDED_SIDE  != CGAL::side_of_bounded_sphere(p,q,r,s)) ||
+        (CGAL::ON_UNBOUNDED_SIDE  != CGAL::side_of_bounded_sphere(p,q,s,r)) )
+    {
+      if(flippable(h)) {
+        Euler::flip_edge(h,pmesh);
+        return true;
+      }
+    }
+    return false;
+  }
+
+  template<class VertexOutputIterator,
+           class FaceOutputIterator,
+           class FaceRange>
+  bool subdivide(const FaceRange& faces,
+                 const std::set<halfedge_descriptor>& border_edges,
+                 std::map<vertex_descriptor, double>& scale_attribute, 
+                 VertexOutputIterator& vertex_out,
+                 FaceOutputIterator& facet_out,
+                 std::vector<face_descriptor>& new_faces,
+                 double alpha)
+  {
+    BOOST_FOREACH(face_descriptor fd, faces)
+    {
+      CGAL_assertion(fd  != boost::graph_traits<PolygonMesh>::null_face());
+
+      vertex_descriptor vi = target(halfedge(fd,pmesh),pmesh);
+      vertex_descriptor vj = target(next(halfedge(fd,pmesh),pmesh),pmesh);
+      vertex_descriptor vk = target(prev(halfedge(fd,pmesh),pmesh),pmesh);
+      Point_3 c = CGAL::centroid(vpmap[vi], vpmap[vj], vpmap[vk]);
+      double sac  = (scale_attribute[vi] + scale_attribute[vj] + scale_attribute[vk])/3.0;
+      double dist_c_vi = CGAL::sqrt(CGAL::squared_distance(c,vpmap[vi]));
+      double dist_c_vj = CGAL::sqrt(CGAL::squared_distance(c,vpmap[vj]));
+      double dist_c_vk = CGAL::sqrt(CGAL::squared_distance(c,vpmap[vk]));
+      if((alpha * dist_c_vi > sac) &&
+         (alpha * dist_c_vj > sac) &&
+         (alpha * dist_c_vk > sac) &&
+         (alpha * dist_c_vi > scale_attribute[vi]) &&
+         (alpha * dist_c_vj > scale_attribute[vj]) &&
+         (alpha * dist_c_vk > scale_attribute[vk]))
+      {
+        halfedge_descriptor h = Euler::add_center_vertex(halfedge(fd,pmesh),pmesh);
+        put(vpmap, target(h,pmesh), c);
+          scale_attribute[target(h,pmesh)] = sac;
+          *vertex_out++ = target(h,pmesh);
+
+          // collect 2 new facets for next round 
+          face_descriptor h1 = face(opposite(next(h,pmesh),pmesh),pmesh);
+          face_descriptor h2 = face(opposite(h,pmesh),pmesh);
+          new_faces.push_back(h1); new_faces.push_back(h2);
+          *facet_out++ = h1;    *facet_out++ = h2;
+          // relax edges of the  patching mesh 
+          halfedge_descriptor e_ij = prev(h,pmesh);
+          halfedge_descriptor e_ik = next(opposite(h,pmesh),pmesh);
+          halfedge_descriptor e_jk = prev(opposite(next(h,pmesh),pmesh),pmesh);
+
+          if(border_edges.find(e_ij) == border_edges.end()){
+            relax(e_ij);
+          }
+          if(border_edges.find(e_ik) == border_edges.end()){
+            relax(e_ik);
+          }
+          if(border_edges.find(e_jk) == border_edges.end()){
+            relax(e_jk);
+          }
+      }
+    }
+    return !new_faces.empty();
+  }
+
+  template<typename FaceRange>
+  bool relax(const FaceRange& faces,
+             const std::vector<face_descriptor>& new_faces,
+             const std::set<halfedge_descriptor>& border_edges)
+  {
+    int flips = 0;
+    std::list<halfedge_descriptor> interior_edges;
+    std::set<halfedge_descriptor> included_map; 
+
+    collect_interior_edges(faces, border_edges, interior_edges, included_map);
+    collect_interior_edges(new_faces, border_edges, interior_edges, included_map);
+
+    CGAL_TRACE_STREAM << "Test " << interior_edges.size() << " edges " << std::endl;
+    //do not just use std::set (included_map) for iteration, the order effects the output (we like to make it deterministic)
+    BOOST_FOREACH(halfedge_descriptor h, interior_edges)
+    {
+      if (relax(h)) {
+        ++flips;
+      }
+    }
+
+    CGAL_TRACE_STREAM << "|flips| = " << flips << std::endl;
+    return flips > 0;
+  }
+
+  template<typename FaceRange>
+  void collect_interior_edges(const FaceRange& faces,
+        const std::set<halfedge_descriptor>& border_edges,
+        std::list<halfedge_descriptor>& interior_edges,
+        std::set<halfedge_descriptor>& included_map)
+  {
+    BOOST_FOREACH(face_descriptor fd, faces)
+    {
+      Halfedge_around_face_circulator<PolygonMesh> circ(halfedge(fd, pmesh), pmesh), done(circ);
+      do {
+        halfedge_descriptor h = *circ;
+        if (border_edges.find(h) == border_edges.end()){
+          // do not remove included_map and use if(&*h < &*oh) { interior_edges.push_back(h) } 
+          // which will change the order of edges from run to run
+          halfedge_descriptor oh = opposite(h, pmesh);
+          halfedge_descriptor h_rep = (h < oh) ? h : oh; // AF: was &*h < &*oh
+          if (included_map.insert(h_rep).second) {
+            interior_edges.push_back(h_rep);
+          }
+        }
+      } while (++circ != done);
+    }
+  }
+
+  double average_length(vertex_descriptor vh,
+                        const std::set<face_descriptor>& interior_map, 
+                        bool accept_internal_facets)
+  {
+    const Point_3& vp = vpmap[vh]; 
+    Halfedge_around_target_circulator<PolygonMesh> circ(halfedge(vh,pmesh),pmesh), done(circ);
+    int deg = 0;
+    double sum = 0;
+    do {
+      face_descriptor f(face(*circ,pmesh)), f_op(face(opposite(*circ,pmesh),pmesh));
+
+      if(!accept_internal_facets) {
+        if(interior_map.find(f) != interior_map.end() && interior_map.find(f_op) != interior_map.end())
+        { continue; } // which means current edge is an interior edge and should not be included in scale attribute calculation
+      }
+
+      const Point_3& vq = vpmap[target(opposite(*circ,pmesh),pmesh)];
+      sum += CGAL::sqrt(CGAL::squared_distance(vp, vq));
+      ++deg;
+    } while(++circ != done);
+
+    CGAL_assertion(deg != 0); // this might happen when accept_internal_facets = false but there is
+    return sum/deg;
+  }
+
+  template<typename FaceRange>
+  void calculate_scale_attribute(const FaceRange& faces,
+                                 const std::set<face_descriptor>& interior_map,
+                                 std::map<vertex_descriptor, double>& scale_attribute,
+                                 bool accept_internal_facets) 
+  {
+    BOOST_FOREACH(face_descriptor fd, faces)
+    {
+      Halfedge_around_face_circulator<PolygonMesh> circ(halfedge(fd,pmesh),pmesh), done(circ);
+      do {
+        vertex_descriptor v = target(*circ,pmesh);
+        std::pair<typename std::map<vertex_descriptor, double>::iterator, bool> v_insert 
+          = scale_attribute.insert(std::make_pair(v, 0));
+        if(!v_insert.second) { continue; } // already calculated
+        v_insert.first->second = average_length(v, interior_map, accept_internal_facets);
+      } while(++circ != done);
+    }
+  }
+
+  template<typename FaceRange>
+  bool contain_internal_facets(const FaceRange& faces,
+                               const std::set<face_descriptor>& interior_map) const
+  {
+    BOOST_FOREACH(face_descriptor fd, faces)
+    {
+      Halfedge_around_face_circulator<PolygonMesh> circ(halfedge(fd,pmesh),pmesh), done(circ);
+      do {
+        Halfedge_around_target_circulator<PolygonMesh> circ_v(*circ,pmesh), done_v(circ_v);
+        bool internal_v = true;
+        do {
+          face_descriptor f(face(*circ,pmesh)), f_op(face(opposite(*circ_v,pmesh),pmesh));
+
+          if(interior_map.find(f) == interior_map.end() || interior_map.find(f_op) == interior_map.end()) {
+            internal_v = false;
+            break;
+          } 
+        } while(++circ_v != done_v);
+
+        if(internal_v) { return true; }
+      } while(++circ != done);
+    }
+    return false;
+  }
+
+public:
+  Refine_Polyhedron_3(PolygonMesh& pmesh
+                    , VertexPointMap vpmap_)
+    : pmesh(pmesh)
+    , vpmap(vpmap_)
+  {}
+
+  template<class FaceRange, class FacetOutputIterator, class VertexOutputIterator>
+  void refine(const FaceRange& faces,
+              FacetOutputIterator& facet_out,
+              VertexOutputIterator& vertex_out,
+              double alpha)
+  {
+      // do not use just std::set, the order effects the output (for the same input we want to get same output)
+    std::set<face_descriptor> interior_map(boost::begin(faces), boost::end(faces));
+
+    // store boundary edges - to be used in relax 
+    std::set<halfedge_descriptor> border_edges;
+    BOOST_FOREACH(face_descriptor f, faces)
+    {
+      Halfedge_around_face_circulator<PolygonMesh> circ(halfedge(f,pmesh),pmesh), done(circ);
+      do {
+        if(interior_map.find(face(opposite(*circ,pmesh),pmesh)) == interior_map.end()) {
+          border_edges.insert(*circ);
+        }
+      } while(++circ != done);
+    }
+
+    // check whether there is any need to accept internal facets
+    bool accept_internal_facets = contain_internal_facets(faces, interior_map);
+    std::map<vertex_descriptor, double> scale_attribute;
+    calculate_scale_attribute(faces, interior_map, scale_attribute, accept_internal_facets);
+
+    std::vector<face_descriptor> all_faces(boost::begin(faces), boost::end(faces));
+    CGAL::Timer total_timer; total_timer.start();
+    for(int i = 0; i < 10; ++i)
+    {
+      std::vector<face_descriptor> new_faces;
+      CGAL::Timer timer; timer.start();
+      bool is_subdivided = subdivide(all_faces, border_edges, scale_attribute, vertex_out, facet_out, new_faces, alpha);
+      CGAL_TRACE_STREAM << "**Timer** subdivide() :" << timer.time() << std::endl; timer.reset();
+      if(!is_subdivided)
+        break;
+
+      bool is_relaxed = relax(faces, new_faces, border_edges);
+      CGAL_TRACE_STREAM << "**Timer** relax() :" << timer.time() << std::endl;
+      if(!is_relaxed)
+        break;
+      all_faces.insert(all_faces.end(), new_faces.begin(), new_faces.end());
+    }
+
+    CGAL_TRACE_STREAM << "**Timer** TOTAL: " << total_timer.time() << std::endl;
+  }
+
+}; //end class Refine_Polyhedron_3
+
+}//namespace internal
+
+}//namespace Polygon_mesh_processing
+
+}//namespace CGAL
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_REFINE_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/measure.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/measure.h
new file mode 100644
index 0000000..69a18f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/measure.h
@@ -0,0 +1,418 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_MEASURE_H
+#define CGAL_POLYGON_MESH_PROCESSING_MEASURE_H
+
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/properties.h>
+#include <boost/graph/graph_traits.hpp>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#ifdef DOXYGEN_RUNNING
+#define CGAL_PMP_NP_TEMPLATE_PARAMETERS NamedParameters
+#define CGAL_PMP_NP_CLASS NamedParameters
+#endif
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+  /**
+  * \ingroup measure_grp
+  * computes the length of an edge of a given polygon mesh.
+  * The edge is given by one of its halfedges, or the edge itself.
+  *
+  * @tparam PolygonMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param h one halfedge of the edge to compute the length
+  * @param pmesh the polygon mesh to which `h` belongs
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * \cgalNamedParamsBegin
+  *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  * @return the length of `h`. The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `pmesh`.
+  *
+  * @sa `face_border_length()`
+  */
+  template<typename PolygonMesh,
+           typename NamedParameters>
+#ifdef DOXYGEN_RUNNING
+  FT
+#else
+  typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
+#endif
+  edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h
+              , const PolygonMesh& pmesh
+              , const NamedParameters& np)
+  {
+    using boost::choose_const_pmap;
+    using boost::get_param;
+
+    typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type
+    vpm = choose_const_pmap(get_param(np, CGAL::vertex_point),
+                            pmesh,
+                            CGAL::vertex_point);
+
+    return CGAL::sqrt(CGAL::squared_distance(get(vpm, source(h, pmesh)),
+                                             get(vpm, target(h, pmesh))));
+  }
+
+  template<typename PolygonMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<PolygonMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h
+            , const PolygonMesh& pmesh)
+  {
+    return edge_length(h, pmesh,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+  // edge overloads
+  template<typename PolygonMesh,
+           typename NamedParameters>
+  typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
+  edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e
+              , const PolygonMesh& pmesh
+              , const NamedParameters& np)
+  {
+    return edge_length(halfedge(e,pmesh), pmesh, np);
+  }
+
+  template<typename PolygonMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<PolygonMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e
+            , const PolygonMesh& pmesh)
+  {
+    return edge_length(halfedge(e,pmesh), pmesh);
+  }
+
+  /**
+  * \ingroup measure_grp
+  * computes the length of the border polyline
+  * that contains a given halfedge.
+  *
+  * @tparam PolygonMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param h a halfedge of the border polyline of which the length is computed
+  * @param pmesh the polygon mesh to which `h` belongs
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * \cgalNamedParamsBegin
+  *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  * @return the length of the sequence of border edges of `face(h, pmesh)`.
+  * The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `pmesh`.
+  *
+  * @sa `edge_length()`
+  */
+  template<typename PolygonMesh,
+           typename NamedParameters>
+#ifdef DOXYGEN_RUNNING
+   FT
+#else
+  typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
+#endif
+  face_border_length(
+              typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h
+              , const PolygonMesh& pmesh
+              , const NamedParameters& np)
+  {
+    double result = 0.;
+    BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor haf,
+                  halfedges_around_face(h, pmesh))
+    {
+      result += edge_length(haf, pmesh, np);
+    }
+    return result;
+  }
+
+  template<typename PolygonMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<PolygonMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  face_border_length(
+              typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h
+              , const PolygonMesh& pmesh)
+  {
+    return face_border_length(h, pmesh,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+
+  /**
+  * \ingroup measure_grp
+  * computes the area of a face of a given
+  * triangulated surface mesh.
+  *
+  * @tparam TriangleMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param f the face of which the area is computed
+  * @param tmesh the triangulated surface mesh to which `f` belongs
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * \cgalNamedParamsBegin
+  *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  *  \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  *@pre `f != boost::graph_traits<TriangleMesh>::%null_face()`
+  *
+  * @return the area of `f`.
+  * The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `tmesh`.
+  *
+  * @sa `area()`
+  */
+  template<typename TriangleMesh,
+           typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+#ifdef DOXYGEN_RUNNING
+  FT
+#else
+  typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type::FT
+#endif
+  face_area(typename boost::graph_traits<TriangleMesh>::face_descriptor f
+            , const TriangleMesh& tmesh
+            , const CGAL_PMP_NP_CLASS& np)
+  {
+    using boost::choose_const_pmap;
+    using boost::get_param;
+
+    CGAL_precondition(boost::graph_traits<TriangleMesh>::null_face() != f);
+
+    typename GetVertexPointMap<TriangleMesh, CGAL_PMP_NP_CLASS>::const_type
+    vpm = choose_const_pmap(get_param(np, CGAL::vertex_point),
+                            tmesh,
+                            CGAL::vertex_point);
+
+    typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
+    halfedge_descriptor hd = halfedge(f, tmesh);
+    halfedge_descriptor nhd = next(hd, tmesh);
+
+    typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type traits;
+
+    return traits.compute_area_3_object()(get(vpm, source(hd, tmesh)),
+                                          get(vpm, target(hd, tmesh)),
+                                          get(vpm, target(nhd, tmesh)));
+  }
+
+  template<typename TriangleMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<TriangleMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  face_area(typename boost::graph_traits<TriangleMesh>::face_descriptor f
+            , const TriangleMesh& tmesh)
+  {
+    return face_area(f, tmesh,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  /**
+  * \ingroup measure_grp
+  * computes the area of a range of faces of a given
+  * triangulated surface mesh.
+  *
+  * @tparam FaceRange range of `boost::graph_traits<PolygonMesh>::%face_descriptor`,
+          model of `Range`.
+          Its iterator type is `InputIterator`.
+  * @tparam TriangleMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param face_range the range of faces of which the area is computed
+  * @param tmesh the triangulated surface mesh to which the faces of `face_range` belong
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * \cgalNamedParamsBegin
+  *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  *  \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  * @return sum of face areas of `faces`.
+  * The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `tmesh`.
+  *
+  * @sa `face_area()`
+  */
+  template<typename FaceRange,
+           typename TriangleMesh,
+           typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+#ifdef DOXYGEN_RUNNING
+  FT
+#else
+  typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type::FT
+#endif
+  area(FaceRange face_range
+     , const TriangleMesh& tmesh
+     , const CGAL_PMP_NP_CLASS& np)
+  {
+    typedef typename boost::graph_traits<TriangleMesh>::face_descriptor face_descriptor;
+    double result = 0.;
+    BOOST_FOREACH(face_descriptor f, face_range)
+    {
+      result += face_area(f, tmesh, np);
+    }
+    return result;
+  }
+
+  template<typename FaceRange, typename TriangleMesh>
+  double area(FaceRange face_range, const TriangleMesh& tmesh)
+  {
+    return area(face_range, tmesh,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  /**
+  * \ingroup measure_grp
+  * computes the surface area of a triangulated surface mesh.
+  *
+  * @tparam TriangleMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param tmesh the triangulated surface mesh
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * \cgalNamedParamsBegin
+  *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  *  \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  * @return the surface area of `tmesh`.
+  * The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `tmesh`.
+  *
+  * @sa `face_area()`
+  */
+  template<typename TriangleMesh
+         , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+#ifdef DOXYGEN_RUNNING
+  FT
+#else
+  typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type::FT
+#endif
+  area(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np)
+  {
+    return area(faces(tmesh), tmesh, np);
+  }
+
+  template<typename TriangleMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<TriangleMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  area(const TriangleMesh& tmesh)
+  {
+    return area(faces(tmesh), tmesh);
+  }
+
+  /**
+  * \ingroup measure_grp
+  * computes the volume of the domain bounded by
+  * a closed triangulated surface mesh.
+  *
+  * @tparam TriangleMesh a model of `HalfedgeGraph` that has an internal property map
+  *         for `CGAL::vertex_point_t`
+  * @tparam NamedParameters a sequence of \ref namedparameters
+  *
+  * @param tmesh the closed triangulated surface mesh bounding the volume
+  * @param np optional sequence of \ref namedparameters among the ones listed below
+  *
+  * @pre `tmesh` is closed
+  *
+  * \cgalNamedParamsBegin
+  *  \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+  *  \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  * \cgalNamedParamsEnd
+  *
+  * @return the volume bounded by `tmesh`.
+  * The return type `FT` is a number type. It is
+  * either deduced from the `geom_traits` \ref namedparameters if provided,
+  * or the geometric traits class deduced from the point property map
+  * of `tmesh`.
+  */
+  template<typename TriangleMesh
+         , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+#ifdef DOXYGEN_RUNNING
+  FT
+#else
+  typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type::FT
+#endif
+  volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np)
+  {
+    CGAL_assertion(is_triangle_mesh(tmesh));
+    CGAL_assertion(is_closed(tmesh));
+
+    using boost::choose_const_pmap;
+    using boost::get_param;
+
+    typename GetVertexPointMap<TriangleMesh, CGAL_PMP_NP_CLASS>::const_type
+      vpm = choose_const_pmap(get_param(np, CGAL::vertex_point),
+                              tmesh,
+                              CGAL::vertex_point);
+    typename GetGeomTraits<TriangleMesh, CGAL_PMP_NP_CLASS>::type::Point_3
+      origin(0, 0, 0);
+
+    typedef typename boost::graph_traits<TriangleMesh>::face_descriptor face_descriptor;
+
+    double volume = 0.;
+    BOOST_FOREACH(face_descriptor f, faces(tmesh))
+    {
+      volume += CGAL::volume(origin,
+        get(vpm, target(halfedge(f, tmesh), tmesh)),
+        get(vpm, target(next(halfedge(f, tmesh), tmesh), tmesh)),
+        get(vpm, target(prev(halfedge(f, tmesh), tmesh), tmesh)));
+    }
+    return volume;
+  }
+
+  template<typename TriangleMesh>
+  typename CGAL::Kernel_traits<typename property_map_value<TriangleMesh,
+    CGAL::vertex_point_t>::type>::Kernel::FT
+  volume(const TriangleMesh& tmesh)
+  {
+    return volume(tmesh,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+}
+}
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_MEASURE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h
new file mode 100644
index 0000000..4368a46
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h
@@ -0,0 +1,426 @@
+// Copyright (c) 2009-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau and Sebastien Loriot
+
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_ORIENT_POLYGON_SOUP
+#define CGAL_POLYGON_MESH_PROCESSING_ORIENT_POLYGON_SOUP
+
+#include <CGAL/tuple.h>
+#include <CGAL/array.h>
+#include <CGAL/assertions.h>
+#include <boost/foreach.hpp>
+
+#include <set>
+#include <map>
+#include <stack>
+#include <vector>
+#include <algorithm>
+#include <iostream>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal {
+
+template<class Point_3, class Polygon_3>
+class Polygon_soup_orienter
+{
+/// Index types
+  typedef typename std::iterator_traits<
+            typename Polygon_3::iterator >::value_type                     V_ID;
+  typedef typename std::vector<Polygon_3>::size_type                       P_ID;
+//  typedef int                                                             CC_ID;
+  typedef std::pair<V_ID, V_ID>                                       V_ID_pair;
+/// Container types
+  typedef std::vector<Point_3>                                           Points;
+  typedef std::vector<Polygon_3>                                       Polygons;
+  typedef std::map<V_ID_pair, std::set<P_ID> >                         Edge_map;
+  typedef typename Edge_map::iterator                         Edge_map_iterator;
+  typedef std::set<V_ID_pair>                                      Marked_edges;
+
+/// Data members
+  Points& points;             //< the set of input points
+  Polygons& polygons;         //< the set of input polygons
+  Edge_map edges;             //< the set of edges of the input polygons
+  Marked_edges marked_edges;  //< the set of singular edges or edges incident
+                              //<   to non-compatible orientation polygons
+
+  /// for each polygon referenced by its position in `polygons`, indicates
+  /// the connected component it belongs too after orientation.
+//  std::vector< CC_ID > polygon_cc_id;
+  /// for each vertex, indicates the list of polygon containing it
+  std::vector< std::vector<P_ID> > incident_polygons_per_vertex;
+
+/// Utility functions
+  V_ID_pair canonical_edge(V_ID i, V_ID j)
+  {
+    return i<j ? V_ID_pair(i,j):V_ID_pair(j,i);
+  }
+
+  bool is_edge_marked(V_ID i, V_ID j)
+  {
+    return marked_edges.count(canonical_edge(i,j)) > 0;
+  }
+
+  void set_edge_marked(V_ID i, V_ID j)
+  {
+    marked_edges.insert(canonical_edge(i,j));
+  }
+
+  cpp11::array<V_ID,3>
+  get_neighbor_vertices(V_ID v_id, P_ID polygon_index)
+  {
+    std::size_t nbv = polygons[polygon_index].size(), pvid=0;
+    for (; pvid!=nbv; ++pvid)
+      if (v_id==polygons[polygon_index][pvid]) break;
+    CGAL_assertion( pvid!=nbv );
+    V_ID prev = polygons[polygon_index][ (pvid+nbv-1)%nbv ];
+    V_ID next = polygons[polygon_index][ (pvid+1)%nbv ];
+    return make_array(prev,v_id,next);
+  }
+
+  std::pair<V_ID,P_ID>
+  next_cw_vertex_around_source(V_ID src, V_ID tgt)
+  {
+    typedef std::pair<V_ID,P_ID> VID_and_PID;
+    if ( is_edge_marked(src,tgt) ) return VID_and_PID(src,300612);
+    Edge_map_iterator em_it=edges.find(V_ID_pair(tgt, src));
+    if ( em_it==edges.end() ) return VID_and_PID(src,300612);// the vertex is on the border
+    CGAL_assertion(em_it->second.size()==1);
+    P_ID p_id = *(em_it->second.begin());
+    return VID_and_PID(get_neighbor_vertices(src, p_id)[2], p_id);
+  }
+
+  std::pair<V_ID,P_ID>
+  next_ccw_vertex_around_target(V_ID src, V_ID tgt)
+  {
+    typedef std::pair<V_ID,P_ID> VID_and_PID;
+    if ( is_edge_marked(src,tgt) ) return VID_and_PID(tgt,300612);
+    Edge_map_iterator em_it=edges.find(V_ID_pair(tgt, src));
+    if ( em_it==edges.end() ) return VID_and_PID(tgt,300612);// the vertex is on the border
+    CGAL_assertion(em_it->second.size()==1);
+    P_ID p_id = *(em_it->second.begin());
+    return VID_and_PID(get_neighbor_vertices(tgt, p_id)[0], p_id);
+  }
+
+  void inverse_orientation(const std::size_t index) {
+    std::reverse(polygons[index].begin(), polygons[index].end());
+  }
+
+  void replace_vertex_index_in_polygon(
+    std::size_t polygon_id,
+    V_ID old_index,
+    V_ID new_index)
+  {
+    BOOST_FOREACH(V_ID& i, polygons[polygon_id])
+      if( i==old_index )
+        i=new_index;
+  }
+
+/// Functions filling containers
+  void fill_edge_map() {
+    // Fill edges
+    edges.clear();
+    for(P_ID i = 0; i < polygons.size(); ++i)
+    {
+      const P_ID size = polygons[i].size();
+      for(P_ID j = 0; j < size; ++j) {
+        V_ID i0 = polygons[i][j];
+        V_ID i1 = polygons[i][ (j+1)%size];
+        edges[V_ID_pair(i0, i1)].insert(i);
+      }
+    }
+
+    // Fill non-manifold edges
+    marked_edges.clear();
+    for(P_ID i = 0; i < polygons.size(); ++i)
+    {
+      const P_ID size = polygons[i].size();
+      for(P_ID j = 0; j < size; ++j) {
+        V_ID i0 = polygons[i][j];
+        V_ID i1 = polygons[i][ (j+1)%size ];
+
+        std::size_t nb_edges = 0;
+        Edge_map_iterator em_it = edges.find( V_ID_pair(i0, i1) );
+        if ( em_it!=edges.end() ) nb_edges += em_it->second.size();
+        em_it = edges.find( V_ID_pair(i1, i0) );
+        if ( em_it!=edges.end() ) nb_edges += em_it->second.size();
+
+        if( nb_edges > 2 ) set_edge_marked(i0,i1);
+      }
+    }
+  }
+
+  void fill_incident_polygons_per_vertex()
+  {
+    incident_polygons_per_vertex.resize(points.size());
+
+    P_ID nb_polygons=polygons.size();
+    for(P_ID ip=0; ip<nb_polygons; ++ip)
+    {
+      BOOST_FOREACH(V_ID iv, polygons[ip])
+        incident_polygons_per_vertex[iv].push_back(ip);
+    }
+  }
+
+public:
+
+  Polygon_soup_orienter(Points& points, Polygons& polygons)
+    : points(points), polygons(polygons)
+  {
+    fill_edge_map();
+  }
+
+  /// We try to orient polygon consistently by walking in the dual graph, from
+  /// a not yet re-oriented polygon.
+  /// We have an edge between two polygons if they share an edge, and this edge
+  /// is shared by exactly two polygons. While walking along an edge, we reorient
+  /// the polygon we walked in if its orientation is not compatible with the one
+  /// we come from.
+  /// If the polygon was already marked as oriented, then we cut the dual edge
+  /// in the graph and the primal edge is marked.
+  /// At the same time, we assign an id to each polygon in the same connected
+  /// componenet of the dual graph.
+  void orient()
+  {
+    std::vector<bool> oriented;
+    std::stack<std::size_t> stack;
+//    polygon_cc_id.resize(polygons.size(), -1);
+
+    // We first consider all polygons as non-oriented
+    oriented.resize(polygons.size());
+
+    P_ID polygon_index = 0;
+
+//    CC_ID current_cc_index=-1;
+    while (polygon_index != polygons.size())
+    {
+      // We look for the first polygon not already oriented
+      while ( polygon_index != polygons.size() && oriented[polygon_index] ) {
+        ++polygon_index;
+      }
+      if(polygon_index == polygons.size()) break;
+
+//      ++ current_cc_index; // visit a new connected component
+
+      // we visit the connected component by crossing edges manifold edges
+      oriented[polygon_index] = true;
+      stack.push(polygon_index);
+      while(! stack.empty() )
+      {
+        const P_ID to_be_oriented_index = stack.top();
+        stack.pop();
+
+//        CGAL_assertion(polygon_cc_id[to_be_oriented_index]==-1);
+//        polygon_cc_id[to_be_oriented_index]=current_cc_index;
+
+        const P_ID size = polygons[to_be_oriented_index].size();
+        for(P_ID ih = 0 ; ih < size ; ++ih) {
+          P_ID ihp1 = (ih+1)%size;
+          const V_ID i1 = polygons[to_be_oriented_index][ih];
+          const V_ID i2 = polygons[to_be_oriented_index][ihp1];
+
+          if( is_edge_marked(i1,i2) ) continue;
+
+          // edge (i1,i2)
+          Edge_map_iterator it_same_orient = edges.find(V_ID_pair(i1, i2));
+          // edges (i2,i1)
+          Edge_map_iterator it_other_orient = edges.find(V_ID_pair(i2, i1));
+
+          CGAL_assertion(it_same_orient != edges.end());
+          CGAL_assertion(it_other_orient == edges.end() ||
+                         it_other_orient->second.size()==1);
+
+          if (it_same_orient->second.size() > 1)
+          {
+            CGAL_assertion(it_other_orient == edges.end());
+            // one neighbor but with the same orientation
+            P_ID index = *(it_same_orient->second.begin());
+            if(index == to_be_oriented_index)
+              index = *(++it_same_orient->second.begin());
+            if(oriented[index])
+            {
+              // polygon already oriented but its orientation is not compatible ---> mark the edge and continue
+              set_edge_marked(i1,i2);
+              continue; // next edge
+            }
+
+            // reverse the orientation
+            const P_ID size = polygons[index].size();
+            for(P_ID j = 0; j < size; ++j) {
+              V_ID i0 = polygons[index][j];
+              V_ID i1 = polygons[index][(j+1)%size];
+              Edge_map_iterator em_it = edges.find(V_ID_pair(i0, i1));
+              CGAL_assertion_code(const bool r = )
+                em_it->second.erase(index)
+              CGAL_assertion_code(!= 0);
+              CGAL_assertion(r);
+              if ( em_it->second.empty() ) edges.erase(em_it);
+            }
+            inverse_orientation(index);
+            for(P_ID j = 0; j < size; ++j) {
+              V_ID i0 = polygons[index][j];
+              V_ID i1 = polygons[index][(j+1)%size];
+              edges[V_ID_pair(i0, i1)].insert(index);
+            }
+            // "inverse the orientation of polygon #index
+            oriented[index] = true;
+            stack.push(index);
+          }
+          else{
+            if( it_other_orient != edges.end() ){
+              CGAL_assertion(it_same_orient->second.size() == 1);
+              CGAL_assertion(it_other_orient->second.size() == 1);
+              // one polygon, same orientation
+              const P_ID index = *(it_other_orient->second.begin());
+              if(oriented[index]) continue; //nothing todo already processed and correctly oriented
+              oriented[index] = true;
+              // "keep the orientation of polygon #index
+              stack.push(index);
+            }
+          }
+        } // end for on all edges of one
+      } // end while loop on the polygons of the connected component
+    } // end while loop on all non-oriented polygons remaining
+  }
+
+  /// A vertex is said to be singular if its link is neither a cycle nor a chain,
+  /// but several cycles and chains.
+  /// For each such vertex v, we consider each set of polygons incident to v
+  /// and sharing a non-marked edge incident to v. A copy of v is assigned to
+  /// each but one set of incident polygons.
+  void duplicate_singular_vertices()
+  {
+    fill_incident_polygons_per_vertex();
+    std::vector< std::pair<V_ID, std::vector<P_ID> > > vertices_to_duplicate;
+
+    V_ID nbv = static_cast<V_ID>( points.size() );
+    for (V_ID v_id = 0; v_id < nbv; ++v_id)
+    {
+      const std::vector< P_ID >& incident_polygons = incident_polygons_per_vertex[v_id];
+
+      if ( incident_polygons.empty() ) continue; //isolated vertex
+      std::set<P_ID> visited_polygons;
+
+      bool first_pass = true;
+      BOOST_FOREACH(P_ID p_id, incident_polygons)
+      {
+        if ( !visited_polygons.insert(p_id).second ) continue; // already visited
+
+        if (!first_pass)
+        {
+          vertices_to_duplicate.push_back(std::pair<V_ID, std::vector<P_ID> >());
+          vertices_to_duplicate.back().first=v_id;
+        }
+
+        const cpp11::array<V_ID,3>& neighbors = get_neighbor_vertices(v_id,p_id);
+
+        V_ID next = neighbors[2];
+
+        if( !first_pass)
+          vertices_to_duplicate.back().second.push_back(p_id);
+
+        do{
+          P_ID other_p_id;
+          cpp11::tie(next, other_p_id) = next_cw_vertex_around_source(v_id, next);
+          if (next==v_id) break;
+          visited_polygons.insert(other_p_id);
+          if( !first_pass)
+            vertices_to_duplicate.back().second.push_back(other_p_id);
+        }
+        while(next!=neighbors[0]);
+
+        if (next==v_id){
+          /// turn the otherway round
+          next = neighbors[0];
+          do{
+            P_ID other_p_id;
+            cpp11::tie(next, other_p_id) = next_ccw_vertex_around_target(next, v_id);
+            if (next==v_id) break;
+            visited_polygons.insert(other_p_id);
+            if( !first_pass)
+              vertices_to_duplicate.back().second.push_back(other_p_id);
+          }
+          while(true);
+        }
+        first_pass=false;
+      }
+    }
+
+    /// now duplicate the vertices
+    typedef std::pair<V_ID, std::vector<P_ID> > V_ID_and_Polygon_ids;
+    BOOST_FOREACH(const V_ID_and_Polygon_ids& vid_and_pids, vertices_to_duplicate)
+    {
+      V_ID new_index = static_cast<V_ID>(points.size());
+      points.push_back( points[vid_and_pids.first] );
+      BOOST_FOREACH(P_ID polygon_id, vid_and_pids.second)
+        replace_vertex_index_in_polygon(polygon_id, vid_and_pids.first, new_index);
+    }
+  }
+};
+} // namespace internal
+
+/**
+ * \ingroup PMP_repairing_grp
+ * tries to consistently orient a soup of polygons in 3D space.
+ * When it is not possible to produce a combinatorial manifold surface,
+ * some points are duplicated.
+ * Because a polygon soup does not have any connectivity (each point
+ * has as many occurences as the number of polygons it belongs to),
+ * duplicating one point (or a pair of points)
+ * amounts to duplicate the polygon to which it belongs.
+ *
+ * These points are either an endpoint of an edge incident to more
+ * than two polygons, an endpoint of an edge between 
+ * two polygons with incompatible orientations (during the re-orientation process),
+ * or more generally a point \a p at which the intersection
+ * of an infinitesimally small ball centered at \a p
+ * with the polygons incident to it is not a topological disk.
+ *
+ * The algorithm is described in \cgalCite{gueziec2001cutting}.
+ *
+ * @tparam Point the point type
+ * @tparam Polygon a `std::vector<std::size_t>` containing the indices
+ *         of the points of the face
+ *
+ * @param points points of the soup of polygons. Some points might be pushed back to resolve
+ *               non-manifold or non-orientability issues.
+ * @param polygons each element in the vector describes a polygon using the index of the points in `points`.
+ *                 If needed the order of the indices of a polygon might be reversed.
+ * @return `true`  if the orientation operation succeded.
+ * @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron.
+ *
+ */
+template <class Point, class Polygon>
+bool orient_polygon_soup(std::vector<Point>& points,
+                         std::vector<Polygon>& polygons)
+{
+  std::size_t inital_nb_pts = points.size();
+  internal::Polygon_soup_orienter<Point, Polygon> orienter(points, polygons);
+  orienter.orient();
+  orienter.duplicate_singular_vertices();
+
+  return inital_nb_pts==points.size();
+}
+
+} }//end namespace CGAL::Polygon_mesh_processing
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_ORIENT_POLYGON_SOUP
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orientation.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orientation.h
new file mode 100644
index 0000000..b3c487e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/orientation.h
@@ -0,0 +1,229 @@
+// Copyright (c) 2013 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ilker O. Yaz
+
+
+#ifndef CGAL_ORIENT_POLYGON_MESH_H
+#define CGAL_ORIENT_POLYGON_MESH_H
+
+#include <algorithm>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/Kernel_traits.h>
+
+#include <boost/foreach.hpp>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal{
+  template <class Less_xyz, class VPmap>
+  struct Compare_vertex_points_xyz_3{
+    Less_xyz less;
+    VPmap vpmap;
+
+   Compare_vertex_points_xyz_3(VPmap const& vpmap)
+	: vpmap(vpmap){}
+
+    typedef bool result_type;
+    template <class vertex_descriptor>
+    bool operator()(vertex_descriptor v1, vertex_descriptor v2) const
+    {
+      return less(get(vpmap, v1), get(vpmap, v2));
+    }
+
+  };
+} // end of namespace internal
+
+/**
+ * \ingroup PMP_orientation_grp
+ * tests whether a closed polygon mesh has a positive orientation.
+ * A closed polygon mesh is considered to have a positive orientation if the normal vectors
+ * to all its faces point outside the domain bounded by the polygon mesh.
+ * The normal vector to each face is chosen pointing on the side of the face
+ * where its sequence of vertices is seen counterclockwise.
+ * @pre `CGAL::is_closed(pmesh)`
+ * @pre If `pmesh` contains several connected components, they are oriented consistently.
+ *      In other words, the answer to this predicate would be the same for each
+ *      isolated connected component.
+ *
+ * @tparam PolygonMesh a model of `FaceListGraph` that has an internal property map
+ *         for `boost::vertex_point_t`
+ * @tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * @param pmesh the closed polygon mesh to be tested
+ * @param np optional sequence of \ref namedparameters among the ones listed below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ * \todo code : The following only handles polyhedron with one connected component
+ *       the code, the sample example and the plugin must be updated.
+ *
+ * \sa `CGAL::Polygon_mesh_processing::reverse_face_orientations()`
+ */
+template<typename PolygonMesh, typename NamedParameters>
+bool is_outward_oriented(const PolygonMesh& pmesh,
+                         const NamedParameters& np)
+{
+  CGAL_warning(CGAL::is_closed(pmesh));
+  CGAL_precondition(CGAL::is_valid(pmesh));
+
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  //VertexPointMap
+  typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type VPMap;
+  VPMap vpmap = choose_const_pmap(get_param(np, boost::vertex_point),
+                                  pmesh,
+                                  boost::vertex_point);
+  //Kernel
+  typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Kernel;
+
+  internal::Compare_vertex_points_xyz_3<typename Kernel::Less_xyz_3, VPMap >
+    less_xyz(vpmap);
+
+  typename boost::graph_traits<PolygonMesh>::vertex_iterator vbegin, vend;
+  cpp11::tie(vbegin, vend) = vertices(pmesh);
+  typename boost::graph_traits<PolygonMesh>::vertex_iterator v_min
+    = std::min_element(vbegin, vend, less_xyz);
+
+  const typename Kernel::Vector_3&
+    normal_v_min = compute_vertex_normal(*v_min, pmesh, np);
+
+  return normal_v_min[0] < 0 || (
+            normal_v_min[0] == 0 && (
+              normal_v_min[1] < 0  ||
+              ( normal_v_min[1]==0  && normal_v_min[2] < 0 )
+            )
+         );
+}
+
+///\cond SKIP_IN_MANUAL
+
+template<typename PolygonMesh>
+bool is_outward_oriented(const PolygonMesh& pmesh)
+{
+  return is_outward_oriented(pmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/// \endcond
+
+template<typename PolygonMesh>
+void reverse_orientation(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor first, PolygonMesh& pmesh)
+{
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+    if ( first == halfedge_descriptor())
+        return;
+    halfedge_descriptor last  = first;
+    halfedge_descriptor prev  = first;
+    halfedge_descriptor start = first;
+    first = next(first, pmesh);
+    vertex_descriptor  new_v = target( start, pmesh);
+    while (first != last) {
+      vertex_descriptor  tmp_v = target( first, pmesh);
+      set_target( first, new_v, pmesh);
+      set_halfedge(new_v, first, pmesh);
+        new_v = tmp_v;
+        halfedge_descriptor n = next(first, pmesh);
+        set_next(first, prev, pmesh);
+        prev  = first;
+        first = n;
+    }
+    set_target( start, new_v, pmesh);
+    set_halfedge( new_v, start, pmesh);
+    set_next(start, prev,pmesh);
+}
+
+/**
+* \ingroup PMP_orientation_grp
+* reverses for each face the order of the vertices along the face boundary.
+*
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+*/
+template<typename PolygonMesh>
+void reverse_face_orientations(PolygonMesh& pmesh)
+{
+  typedef typename boost::graph_traits<PolygonMesh>::face_descriptor face_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  BOOST_FOREACH(face_descriptor fd, faces(pmesh)){
+    reverse_orientation(halfedge(fd,pmesh),pmesh);
+  } 
+  // Note: A border edge is now parallel to its opposite edge.
+  // We scan all border edges for this property. If it holds, we
+  // reorient the associated hole and search again until no border
+  // edge with that property exists any longer. Then, all holes are
+  // reoriented.
+  BOOST_FOREACH(halfedge_descriptor h, halfedges(pmesh)){
+    if ( is_border(h,pmesh) &&
+         target(h,pmesh) == target(opposite(h,pmesh),pmesh)){
+      reverse_orientation(h, pmesh);
+    }
+  }
+}
+
+/**
+* \ingroup PMP_orientation_grp
+* reverses for each face in `face_range` the order of the vertices along the face boundary.
+* The function does not perform any control and if the orientation change of the faces
+* makes the polygon mesh invalid, the behavior is undefined.
+*
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+* @tparam FaceRange range of face descriptors, model of `Range`.
+*         Its iterator type is `InputIterator`.
+*/
+template<typename PolygonMesh, typename FaceRange>
+void reverse_face_orientations(const FaceRange& face_range, PolygonMesh& pmesh)
+{
+  typedef typename boost::graph_traits<PolygonMesh>::face_descriptor face_descriptor;
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
+  BOOST_FOREACH(face_descriptor fd, face_range){
+    reverse_orientation(halfedge(fd,pmesh),pmesh);
+  }
+
+  // Note: A border edge is now parallel to its opposite edge.
+  // We scan all border edges for this property. If it holds, we
+  // reorient the associated hole and search again until no border
+  // edge with that property exists any longer. Then, all holes are
+  // reoriented.
+  BOOST_FOREACH(face_descriptor fd, face_range)
+    BOOST_FOREACH(halfedge_descriptor hd,
+                  halfedges_around_face(halfedge(fd, pmesh), pmesh))
+    {
+      halfedge_descriptor ohd = opposite(hd, pmesh);
+      if ( is_border(ohd, pmesh) &&
+         target(hd,pmesh) == target(ohd,pmesh))
+      {
+        reverse_orientation(ohd, pmesh);
+      }
+    }
+}
+
+} // namespace Polygon_mesh_processing
+} // namespace CGAL
+#endif // CGAL_ORIENT_POLYGON_MESH_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h
new file mode 100644
index 0000000..7ab4762
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2009-2013 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau and Ilker O. Yaz
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH
+#define CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH
+
+#include <CGAL/IO/generic_print_polyhedron.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <CGAL/property_map.h>
+#include <set>
+
+namespace CGAL
+{
+namespace Polygon_mesh_processing
+{
+namespace internal
+{
+template <typename PM
+        , typename Point
+        , typename Polygon>
+class Polygon_soup_to_polygon_mesh
+{
+  const std::vector<Point>& _points;
+  const std::vector<Polygon>& _polygons;
+
+  typedef typename boost::property_map<PM, CGAL::vertex_point_t>::type Vpmap;
+  typedef typename boost::property_traits<Vpmap>::value_type Point_3;
+
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+
+public:
+  /**
+  * The constructor for modifier object.
+  * @param points points of the soup of polygons.
+  * @param polygons each element in the vector describes a polygon using the index of the points in the vector.
+  */
+  Polygon_soup_to_polygon_mesh(const std::vector<Point>& points,
+                               const std::vector<Polygon>& polygons)
+    : _points(points),
+      _polygons(polygons)
+  { }
+
+  void operator()(PM& pmesh)
+  {
+    Vpmap vpmap = get(CGAL::vertex_point, pmesh);
+
+    std::vector<vertex_descriptor> vertices(_points.size());
+    for (std::size_t i = 0, end = _points.size(); i < end; ++i)
+    {
+      Point_3 pi(_points[i][0], _points[i][1], _points[i][2]);
+      vertices[i] = add_vertex(pmesh);
+      put(vpmap, vertices[i], pi);
+    }
+
+    for (std::size_t i = 0, end = _polygons.size(); i < end; ++i)
+    {
+      const Polygon& polygon = _polygons[i];
+      const std::size_t size = polygon.size();
+
+      std::vector<vertex_descriptor> vr(size); //vertex range
+      vr.resize(size);
+      for (std::size_t j = 0; j < size; ++j)
+        vr[j] = vertices[polygon[j] ];
+
+      CGAL_assertion_code(face_descriptor fd = )
+      CGAL::Euler::add_face(vr, pmesh);
+      CGAL_assertion(fd != boost::graph_traits<PM>::null_face());
+    }
+  }
+};
+}//end namespace internal
+
+
+  /// \cond SKIP_IN_MANUAL
+  /**
+  * \ingroup PMP_repairing_grp
+  * returns `true` if the soup of polygons defines a valid polygon mesh
+  * that can be handled by `CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh()`.
+  *
+  * @tparam Polygon a `std::vector<std::size_t>` containing the indices
+  *         of the points of the polygon face
+  *
+  * @param polygons each element in the vector describes a polygon using the index of the vertices
+  *
+  */
+  template<class Polygon>
+  bool is_polygon_soup_a_polygon_mesh(const std::vector<Polygon>& polygons)
+  {
+    typedef typename std::iterator_traits<
+              typename Polygon::iterator >::value_type                   V_ID;
+
+    std::set< std::pair<V_ID, V_ID> > edge_set;
+    BOOST_FOREACH(const Polygon& polygon, polygons)
+    {
+      std::size_t nb_edges = polygon.size();
+      if (nb_edges<3) return false;
+      V_ID prev=polygon.back();
+      BOOST_FOREACH(V_ID id, polygon)
+        if (! edge_set.insert(std::pair<V_ID, V_ID>(prev,id)).second )
+          return false;
+        else
+          prev=id;
+    }
+
+    return true;
+  }
+  /// \endcond
+
+  /**
+  * \ingroup PMP_repairing_grp
+  * builds a polygon mesh from a soup of polygons.
+  * @pre the input polygon soup describes consistently oriented
+  * polygon mesh.
+  *
+  * @tparam PolygonMesh a model of `MutableFaceGraph` with an internal point property map
+  * @tparam Point a point type that has an operator `[]` to access coordinates
+  * @tparam Polygon a `std::vector<std::size_t>` containing the indices
+  *         of the points of the face
+  *
+  * @param points points of the soup of polygons
+  * @param polygons each element in the vector describes a polygon using the index of the points in `points`
+  * @param out the polygon mesh to be built
+  *
+  * \sa `CGAL::Polygon_mesh_processing::orient_polygon_soup()`
+  *
+  */
+  template<class PolygonMesh, class Point, class Polygon>
+  void polygon_soup_to_polygon_mesh(
+    const std::vector<Point>& points,
+    const std::vector<Polygon>& polygons,
+    PolygonMesh& out)
+  {
+    internal::Polygon_soup_to_polygon_mesh<PolygonMesh, Point, Polygon>
+      converter(points, polygons);
+    converter(out);
+  }
+
+}//end namespace Polygon_mesh_processing
+
+}// end namespace CGAL
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/refine.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/refine.h
new file mode 100644
index 0000000..a3978d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/refine.h
@@ -0,0 +1,119 @@
+// Copyright (c) 2013 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_REFINE_H
+#define CGAL_POLYGON_MESH_PROCESSING_REFINE_H
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/refine_impl.h>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+  /*!
+  \ingroup PMP_meshing_grp
+  @brief refines a region of a triangle mesh
+
+  @tparam TriangleMesh model of `MutableFaceGraph`
+          that has an internal property map for `CGAL::vertex_point_t`
+  @tparam FaceRange range of face descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+  @tparam FaceOutputIterator model of `OutputIterator`
+    holding `boost::graph_traits<TriangleMesh>::%face_descriptor` for patch faces
+  @tparam VertexOutputIterator model of `OutputIterator`
+    holding `boost::graph_traits<TriangleMesh>::%vertex_descriptor` for patch vertices
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param tmesh triangle mesh with patches to be refined
+  @param faces the range of faces defining the patches to refine
+  @param faces_out output iterator into which descriptors of new faces are recorded
+  @param vertices_out output iterator into which descriptors of new vertices are recorded
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `tmesh`
+      Instance of a class model of `ReadWritePropertyMap` \cgalParamEnd
+    \cgalParamBegin{density_control_factor} factor to control density of the output mesh,
+      where larger values lead to denser refinements.
+      The density of vertices of `faces_out` is this factor times higher than the vertices of `faces.` \cgalParamEnd
+  \cgalNamedParamsEnd
+
+
+  @return pair of `faces_out` and `vertices_out`
+
+  \pre `is_triangle_mesh(tmesh)`
+
+  @todo current algorithm iterates 10 times at most, since (I guess) there is no termination proof.
+  */
+  template<typename TriangleMesh,
+           typename FaceRange,
+           typename FaceOutputIterator,
+           typename VertexOutputIterator,
+           typename NamedParameters>
+  std::pair<FaceOutputIterator, VertexOutputIterator>
+    refine(TriangleMesh& tmesh,
+           const FaceRange& faces,
+           FaceOutputIterator faces_out,
+           VertexOutputIterator vertices_out,
+           const NamedParameters& np)
+  {
+    using boost::choose_pmap;
+    using boost::choose_param;
+    using boost::get_param;
+
+    CGAL_precondition(is_triangle_mesh(tmesh) );
+
+    typedef typename GetVertexPointMap<TriangleMesh,NamedParameters>::type VPmap;
+    VPmap vpm = choose_pmap(get_param(np, boost::vertex_point),
+                            tmesh,
+                            boost::vertex_point);
+
+    internal::Refine_Polyhedron_3<TriangleMesh, VPmap> refine_functor(tmesh, vpm);
+    refine_functor.refine(faces,
+      faces_out,
+      vertices_out,
+      choose_param(get_param(np, density_control_factor), CGAL::sqrt(2.)));
+    return std::make_pair(faces_out, vertices_out);
+  }
+
+///\cond SKIP_IN_MANUAL
+  template<typename TriangleMesh,
+    typename FaceRange,
+    typename FaceOutputIterator,
+    typename VertexOutputIterator>
+
+  std::pair<FaceOutputIterator, VertexOutputIterator>
+    refine(TriangleMesh& tmesh,
+           const FaceRange& faces,
+           FaceOutputIterator faces_out,
+           VertexOutputIterator vertices_out)
+  {
+    return refine(tmesh, faces, faces_out, vertices_out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+///\endcond
+}//end namespace Polygon_mesh_processing
+
+}//end namespace CGAL
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_REFINE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/remesh.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/remesh.h
new file mode 100644
index 0000000..a21b59b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/remesh.h
@@ -0,0 +1,278 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_REMESH_H
+#define CGAL_POLYGON_MESH_PROCESSING_REMESH_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+/*!
+* \ingroup PMP_meshing_grp
+* @brief remeshes a triangulated region of a polygon mesh.
+* This operation sequentially performs edge splits, edge collapses,
+* edge flips, Laplacian smoothing and projection to the initial surface
+* to generate a smooth mesh with a prescribed edge length.
+*
+* @tparam PolygonMesh model of `MutableFaceGraph` that 
+*         has an internal property map for `CGAL::vertex_point_t`.
+*         The descriptor types `boost::graph_traits<PolygonMesh>::%face_descriptor`
+*         and `boost::graph_traits<PolygonMesh>::%halfedge_descriptor` must be
+*         models of `Hashable`.
+* @tparam FaceRange range of `boost::graph_traits<PolygonMesh>::%face_descriptor`,
+          model of `Range`. Its iterator type is `InputIterator`.
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param pmesh a polygon mesh with triangulated surface patches to be remeshed
+* @param faces the range of triangular faces defining one or several surface patches to be remeshed
+* @param target_edge_length the edge length that is targetted in the remeshed patch
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* @pre if constraints protection is activated, the constrained edges should
+* not be longer than 4/3*`target_edge_length`
+*
+* \cgalNamedParamsBegin
+*  \cgalParamBegin{vertex_point_map} the property map with the points associated
+*    to the vertices of `pmesh`. Instance of a class model of `ReadWritePropertyMap`.
+*  \cgalParamEnd
+*  \cgalParamBegin{number_of_iterations} the number of iterations for the
+*    sequence of atomic operations performed (listed in the above description)
+*  \cgalParamEnd
+*  \cgalParamBegin{geom_traits} a geometric traits class instance, model of `Kernel`
+*  \cgalParamEnd
+*  \cgalParamBegin{edge_is_constrained_map} a property map containing the
+*    constrained-or-not status of each edge of pmesh. A constrained edge can be splitted
+*    or collapsed, but not flipped, nor its endpoints moved by smoothing.
+*    Note that patch boundary edges (i.e. incident to only one face in the range)
+*    are always considered as constrained edges.
+*  \cgalParamEnd
+*  \cgalParamBegin{vertex_is_constrained_map} a property map containing the
+*    constrained-or-not status of each vertex of pmesh. A constrained vertex
+*    cannot be modified at all during remeshing
+*  \cgalParamEnd
+*  \cgalParamBegin{protect_constraints} If `true`, the edges set as constrained
+*     in `edge_is_constrained_map` (or by default the boundary edges)
+*     are not splitted nor collapsed during remeshing.
+*     Note that around constrained edges that have their length higher than
+*     twice `target_edge_length`, remeshing will fail to provide
+*     good quality results. It can even fail to terminate because of cascading vertex
+*     insertions.
+*  \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+* @sa `split_long_edges()`
+*
+*@todo document `1d_smoothing`
+*@todo add possibility to provide a functor that projects to a prescribed surface
+*/
+template<typename PolygonMesh
+       , typename FaceRange
+       , typename NamedParameters>
+void isotropic_remeshing(const FaceRange& faces
+                       , const double& target_edge_length
+                       , PolygonMesh& pmesh
+                       , const NamedParameters& np)
+{
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+  using boost::choose_pmap;
+  using boost::get_param;
+  using boost::choose_param;
+
+  typedef typename GetGeomTraits<PM, NamedParameters>::type GT;
+
+  typedef typename GetVertexPointMap<PM, NamedParameters>::type VPMap;
+  VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                            pmesh,
+                            boost::vertex_point);
+
+  typedef typename boost::lookup_named_param_def <
+      CGAL::edge_is_constrained_t,
+      NamedParameters,
+      internal::Border_constraint_pmap<PM, FaceRange>//default
+    > ::type ECMap;
+  ECMap ecmap
+    = choose_param(get_param(np, edge_is_constrained),
+                   internal::Border_constraint_pmap<PM, FaceRange>(pmesh, faces));
+
+  typedef typename boost::lookup_named_param_def <
+      CGAL::vertex_is_constrained_t,
+      NamedParameters,
+      internal::No_constraint_pmap<vertex_descriptor>//default
+    > ::type VCMap;
+  VCMap vcmap = choose_param(get_param(np, vertex_is_constrained),
+                             internal::No_constraint_pmap<vertex_descriptor>());
+
+  double low = 4. / 5. * target_edge_length;
+  double high = 4. / 3. * target_edge_length;
+
+  bool protect = choose_param(get_param(np, protect_constraints), false);
+  if(protect)
+  {
+    std::string msg("Isotropic remeshing : protect_constraints cannot be set to");
+    msg.append(" true with constraints larger than 4/3 * target_edge_length.");
+    msg.append(" Remeshing aborted.");
+    CGAL_precondition_msg(
+      internal::constraints_are_short_enough(pmesh, ecmap, vpmap, high),
+      msg.c_str());
+  }
+
+  typename internal::Incremental_remesher<PM, VPMap, GT, ECMap, VCMap>
+    remesher(pmesh, vpmap, protect, ecmap, vcmap);
+  remesher.init_remeshing(faces);
+
+  unsigned int nb_iterations = choose_param(get_param(np, number_of_iterations), 1);
+  bool smoothing_1d = choose_param(get_param(np, smooth_along_features), false);
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+  std::cout << std::endl;
+  std::cout << "Remeshing (size = " << target_edge_length;
+  std::cout << ", #iter = " << nb_iterations << ")..." << std::endl;
+#endif
+
+  for (unsigned int i = 0; i < nb_iterations; ++i)
+  {
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+    std::cout << " * Iteration " << (i + 1) << " *" << std::endl;
+#endif
+
+    remesher.split_long_edges(high);
+    remesher.collapse_short_edges(low, high);
+    remesher.equalize_valences();
+    remesher.tangential_relaxation(smoothing_1d);
+    remesher.project_to_surface();
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+    std::cout << std::endl;
+#endif
+  }
+
+  remesher.update_constraints_property_map();
+
+#ifdef CGAL_PMP_REMESHING_VERBOSE
+  std::cout << "Remeshing done (size = " << target_edge_length;
+  std::cout << ", #iter = " << nb_iterations << ")." << std::endl;
+#endif
+}
+
+template<typename PolygonMesh
+       , typename FaceRange>
+void isotropic_remeshing(
+    const FaceRange& faces
+  , const double& target_edge_length
+  , PolygonMesh& pmesh)
+{
+  isotropic_remeshing(
+    faces,
+    target_edge_length,
+    pmesh,
+    parameters::all_default());
+}
+
+/*!
+* \ingroup PMP_meshing_grp
+* @brief splits the edges listed in `edges` into sub-edges
+* that are not longer than the given threshold `max_length`.
+*
+* Note this function is useful to split constrained edges before
+* calling `isotropic_remeshing()` with protection of constraints
+* activated (to match the constrained edge length required by the
+* remeshing algorithm to be guaranteed to terminate)
+*
+* @tparam PolygonMesh model of `MutableFaceGraph` that
+*         has an internal property map for `CGAL::vertex_point_t`.
+* @tparam EdgeRange range of `boost::graph_traits<PolygonMesh>::%edge_descriptor`,
+*   model of `Range`. Its iterator type is `InputIterator`.
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param pmesh a polygon mesh
+* @param edges the range of edges to be split if they are longer than given threshold
+* @param max_length the edge length above which an edge from `edges` is split
+*        into to sub-edges
+* @param np optional \ref namedparameters described below
+
+* \cgalNamedParamsBegin
+*  \cgalParamBegin{vertex_point_map} the property map with the points associated
+*    to the vertices of `pmesh`. Instance of a class model of `ReadWritePropertyMap`.
+*  \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+* @sa `isotropic_remeshing()`
+*
+*/
+template<typename PolygonMesh
+       , typename EdgeRange
+       , typename NamedParameters>
+void split_long_edges(const EdgeRange& edges
+                    , const double& max_length
+                    , PolygonMesh& pmesh
+                    , const NamedParameters& np)
+{
+  typedef PolygonMesh PM;
+  typedef typename boost::graph_traits<PM>::edge_descriptor edge_descriptor;
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+  using boost::choose_pmap;
+  using boost::choose_param;
+  using boost::get_param;
+
+  typedef typename GetGeomTraits<PM, NamedParameters>::type GT;
+  typedef typename GetVertexPointMap<PM, NamedParameters>::type VPMap;
+  VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                            pmesh,
+                            boost::vertex_point);
+
+  typedef typename boost::lookup_named_param_def <
+        CGAL::edge_is_constrained_t,
+        NamedParameters,
+        internal::No_constraint_pmap<edge_descriptor>//default
+      > ::type ECMap;
+  ECMap ecmap = choose_param(get_param(np, edge_is_constrained),
+                             internal::No_constraint_pmap<edge_descriptor>());
+  
+  typename internal::Incremental_remesher<PM, VPMap, GT, ECMap>
+    remesher(pmesh, vpmap, false/*protect constraints*/
+           , ecmap
+           , internal::No_constraint_pmap<vertex_descriptor>()
+           , false/*need aabb_tree*/);
+
+  remesher.split_long_edges(edges, max_length);
+}
+
+template<typename PolygonMesh, typename EdgeRange>
+void split_long_edges(const EdgeRange& edges
+                    , const double& max_length
+                    , PolygonMesh& pmesh)
+{
+  split_long_edges(edges,
+    max_length,
+    pmesh,
+    parameters::all_default());
+}
+
+} //end namespace Polygon_mesh_processing
+} //end namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/repair.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/repair.h
new file mode 100644
index 0000000..9163f9b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/repair.h
@@ -0,0 +1,845 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_REPAIR_H
+#define CGAL_POLYGON_MESH_PROCESSING_REPAIR_H
+
+#include <set>
+#include <vector>
+#include <boost/algorithm/minmax_element.hpp>
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <CGAL/Union_find.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+namespace CGAL{
+namespace Polygon_mesh_processing {
+
+namespace debug{
+  template <class TriangleMesh, class VertexPointMap>
+  std::ostream& dump_edge_neighborhood(
+    typename boost::graph_traits<TriangleMesh>::edge_descriptor ed,
+    TriangleMesh& tmesh,
+    const VertexPointMap& vpmap,
+    std::ostream& out)
+  {
+    typedef boost::graph_traits<TriangleMesh> GT;
+    typedef typename GT::halfedge_descriptor halfedge_descriptor;
+    typedef typename GT::vertex_descriptor vertex_descriptor;
+    typedef typename GT::face_descriptor face_descriptor;
+
+    halfedge_descriptor h = halfedge(ed, tmesh);
+
+    std::map<vertex_descriptor, int> vertices;
+    std::set<face_descriptor> faces;
+    int vindex=0;
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(h, tmesh))
+    {
+      if ( vertices.insert(std::make_pair(source(hd, tmesh), vindex)).second )
+        ++vindex;
+      if (!is_border(hd, tmesh))
+        faces.insert( face(hd, tmesh) );
+    }
+
+    h=opposite(h, tmesh);
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(h, tmesh))
+    {
+      if ( vertices.insert(std::make_pair(source(hd, tmesh), vindex)).second )
+        ++vindex;
+      if (!is_border(hd, tmesh))
+        faces.insert( face(hd, tmesh) );
+    }
+
+    std::vector<vertex_descriptor> ordered_vertices(vertices.size());
+    typedef std::pair<const vertex_descriptor, int> Pair_type;
+    BOOST_FOREACH(const Pair_type& p, vertices)
+      ordered_vertices[p.second]=p.first;
+
+    out << "OFF\n" << ordered_vertices.size() << " " << faces.size() << " 0\n";
+    BOOST_FOREACH(vertex_descriptor vd, ordered_vertices)
+      out << get(vpmap, vd) << "\n";
+    BOOST_FOREACH(face_descriptor fd, faces)
+    {
+      out << "3";
+      h=halfedge(fd,tmesh);
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h, tmesh))
+        out << " " << vertices[target(hd, tmesh)];
+      out << "\n";
+    }
+    return out;
+  }
+} //end of namespace debug
+
+template <class HalfedgeGraph, class VertexPointMap, class Traits>
+struct Less_vertex_point{
+  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
+  const Traits& m_traits;
+  const VertexPointMap& m_vpmap;
+  Less_vertex_point(const Traits& traits, const VertexPointMap& vpmap)
+    : m_traits(traits)
+    , m_vpmap(vpmap) {}
+  bool operator()(vertex_descriptor v1, vertex_descriptor v2) const{
+    return m_traits.less_xyz_3_object()(get(m_vpmap, v1), get(m_vpmap, v2));
+  }
+};
+
+template <class Traits>
+struct Less_along_ray{
+  const Traits& m_traits;
+  typename Traits::Point_3 m_source;
+  Less_along_ray(const Traits& traits,
+                 const typename Traits::Point_3& s)
+    : m_traits(traits)
+    , m_source(s)
+  {};
+  bool operator()( const typename Traits::Point_3& p1,
+                   const typename Traits::Point_3& p2) const
+  {
+    return m_traits.collinear_are_ordered_along_line_3_object()(m_source, p1, p2);
+  }
+};
+
+template <class Traits, class TriangleMesh, class VertexPointMap>
+bool is_degenerated(
+  typename boost::graph_traits<TriangleMesh>::halfedge_descriptor hd,
+  TriangleMesh& tmesh,
+  const VertexPointMap& vpmap,
+  const Traits& traits)
+{
+  CGAL_assertion(!is_border(hd, tmesh));
+
+  const typename Traits::Point_3& p1 = get(vpmap, target( hd, tmesh) );
+  const typename Traits::Point_3& p2 = get(vpmap, target(next(hd, tmesh), tmesh) );
+  const typename Traits::Point_3& p3 = get(vpmap, source( hd, tmesh) );
+  return traits.collinear_3_object()(p1, p2, p3);
+}
+
+template <class Traits, class TriangleMesh, class VertexPointMap>
+bool is_degenerated(
+  typename boost::graph_traits<TriangleMesh>::face_descriptor fd,
+  TriangleMesh& tmesh,
+  const VertexPointMap& vpmap,
+  const Traits& traits)
+{
+  return is_degenerated(halfedge(fd,tmesh), tmesh, vpmap, traits);
+}
+
+///\cond SKIP_IN_MANUAL
+template <class EdgeRange, class TriangleMesh, class NamedParameters>
+std::size_t remove_null_edges(
+                       const EdgeRange& edge_range,
+                       TriangleMesh& tmesh,
+                       const NamedParameters& np)
+{
+  CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
+
+  using boost::choose_const_pmap;
+  using boost::get_param;
+  using boost::choose_param;
+
+  typedef TriangleMesh TM;
+  typedef typename boost::graph_traits<TriangleMesh> GT;
+  typedef typename GT::edge_descriptor edge_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::vertex_descriptor vertex_descriptor;
+
+  typedef typename GetVertexPointMap<TM, NamedParameters>::type VertexPointMap;
+  VertexPointMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                                     tmesh,
+                                     boost::vertex_point);
+  typedef typename GetGeomTraits<TM, NamedParameters>::type Traits;
+  Traits traits = choose_param(get_param(np, geom_traits), Traits());
+
+  std::size_t nb_deg_faces = 0;
+
+  // collect edges of length 0
+  std::set<edge_descriptor> null_edges_to_remove;
+  BOOST_FOREACH(edge_descriptor ed, edge_range)
+  {
+    if ( traits.equal_3_object()(get(vpmap, target(ed, tmesh)), get(vpmap, source(ed, tmesh))) )
+      null_edges_to_remove.insert(ed);
+  }
+
+  while (!null_edges_to_remove.empty())
+  {
+    edge_descriptor ed = *null_edges_to_remove.begin();
+    null_edges_to_remove.erase(null_edges_to_remove.begin());
+
+    halfedge_descriptor h = halfedge(ed, tmesh);
+
+    if (CGAL::Euler::does_satisfy_link_condition(ed,tmesh))
+    {
+      // remove edges that could also be set for removal
+      if ( face(h, tmesh)!=GT::null_face() )
+      {
+        ++nb_deg_faces;
+        null_edges_to_remove.erase(edge(prev(h, tmesh), tmesh));
+      }
+      if (face(opposite(h, tmesh), tmesh)!=GT::null_face())
+      {
+        ++nb_deg_faces;
+        null_edges_to_remove.erase(edge(prev(opposite(h, tmesh), tmesh), tmesh));
+      }
+      //now remove the edge
+      CGAL::Euler::collapse_edge(ed, tmesh);
+    }
+    else{
+      //handle the case when the edge is incident to a triangle hole
+      //we first fill the hole and try again
+      if ( is_border(ed, tmesh) )
+      {
+        halfedge_descriptor hd = halfedge(ed,tmesh);
+        if (!is_border(hd,tmesh)) hd=opposite(hd,tmesh);
+        if (is_triangle(hd, tmesh))
+        {
+          Euler::fill_hole(hd, tmesh);
+          null_edges_to_remove.insert(ed);
+          continue;
+        }
+      }
+
+      // When the edge does not satisfy the link condition, it means that it cannot be
+      // collapsed as is. In the following we assume that there is no topological issue
+      // with contracting the edge (no volume will disappear).
+      // We start by marking the faces that are incident to an edge endpoint.
+      // If the set of marked faces is a topologically disk, then we simply remove all the simplicies
+      // inside the disk and star the hole with the edge vertex kept.
+      // If the set of marked faces is not a topological disk, it has some non-manifold vertices
+      // on its boundary. We need to mark additional faces to make it a topological disk.
+      // We can then apply the star hole procedure.
+      // Right now we additionally mark the smallest connected components of non-marked faces
+      // (using the numnber of faces)
+
+      //backup central point
+      typename Traits::Point_3 pt = get(vpmap, source(ed, tmesh));
+
+      // mark faces of the link of each endpoints of the edge which collapse is not topologically valid
+      std::set<face_descriptor> marked_faces;
+      //   first endpoint
+      BOOST_FOREACH( halfedge_descriptor hd, CGAL::halfedges_around_target(halfedge(ed,tmesh), tmesh) )
+        if (!is_border(hd,tmesh)) marked_faces.insert( face(hd, tmesh) );
+      //   second endpoint
+      BOOST_FOREACH( halfedge_descriptor hd, CGAL::halfedges_around_target(opposite(halfedge(ed, tmesh), tmesh), tmesh) )
+        if (!is_border(hd,tmesh)) marked_faces.insert( face(hd, tmesh) );
+
+      // extract the halfedges on the boundary of the marked region
+      std::vector<halfedge_descriptor> border;
+      BOOST_FOREACH(face_descriptor fd, marked_faces)
+        BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(halfedge(fd,tmesh), tmesh))
+        {
+          halfedge_descriptor hd_opp = opposite(hd, tmesh);
+          if ( is_border(hd_opp, tmesh) ||
+               marked_faces.count( face(hd, tmesh) )!=
+               marked_faces.count( face(hd_opp, tmesh) ) )
+          {
+            border.push_back( hd );
+          }
+        }
+
+      // define cc of border halfedges: two halfedges are in the same cc
+      // if they are on the border of the cc of non-marked faces.
+      typedef CGAL::Union_find<halfedge_descriptor> UF_ds;
+      UF_ds uf;
+      std::map<halfedge_descriptor, typename UF_ds::handle> handles;
+      // one cc per border halfedge
+      BOOST_FOREACH(halfedge_descriptor hd, border)
+        handles.insert( std::make_pair(hd, uf.make_set(hd)) );
+
+      // join cc's
+      BOOST_FOREACH(halfedge_descriptor hd, border)
+      {
+        CGAL_assertion( marked_faces.count( face( hd, tmesh) ) > 0);
+        CGAL_assertion( marked_faces.count( face( opposite(hd, tmesh), tmesh) ) == 0 );
+        halfedge_descriptor candidate = hd;
+
+        do{
+          candidate = prev( opposite(candidate, tmesh), tmesh );
+        } while( !marked_faces.count( face( opposite(candidate, tmesh), tmesh) ) );
+        uf.unify_sets( handles[hd], handles[opposite(candidate, tmesh)] );
+      }
+
+      std::size_t nb_cc = uf.number_of_sets();
+      if ( nb_cc != 1 )
+      {
+        // if more than one connected component is found then the patch
+        // made of marked faces contains "non-manifold" vertices.
+        // The smallest components need to be marked so that the patch
+        // made of marked faces is a topological disk
+
+        // we will explore in parallel the connected components and will stop
+        // when all but one connected component have been entirely explored.
+        // We add one face at a time for each cc in order to not explore a
+        // potentially very large cc.
+        std::vector< std::vector<halfedge_descriptor> > stacks_per_cc(nb_cc);
+        std::vector< std::set<face_descriptor> > faces_per_cc(nb_cc);
+        std::vector< bool > exploration_finished(nb_cc, false);
+
+
+        // init the stacks of halfedges using the cc of the boundary
+        std::size_t index=0;
+        std::map< halfedge_descriptor, std::size_t > ccs;
+        typedef std::pair<const halfedge_descriptor, typename UF_ds::handle> Pair_type;
+        BOOST_FOREACH(Pair_type p, handles)
+        {
+          halfedge_descriptor opp_hedge = opposite(p.first, tmesh);
+          if (is_border(opp_hedge, tmesh)) continue; // nothing to do on the boundary
+
+          typedef typename std::map< halfedge_descriptor, std::size_t >::iterator Map_it;
+          std::pair<Map_it, bool> insert_res=
+            ccs.insert( std::make_pair(*uf.find( p.second ), index) );
+          if (insert_res.second) ++index;
+
+          stacks_per_cc[ insert_res.first->second ].push_back( prev(opp_hedge, tmesh) );
+          stacks_per_cc[ insert_res.first->second ].push_back( next(opp_hedge, tmesh) );
+          faces_per_cc[ insert_res.first->second ].insert( face(opp_hedge, tmesh) );
+        }
+
+        std::size_t nb_ccs_to_be_explored = nb_cc;
+        index=0;
+        //explore the cc's
+        do{
+          // try to extract one more face for a given cc
+          do{
+            CGAL_assertion( !exploration_finished[index] );
+            halfedge_descriptor hd = stacks_per_cc[index].back();
+            stacks_per_cc[index].pop_back();
+            hd = opposite(hd, tmesh);
+            if ( !is_border(hd,tmesh) && !marked_faces.count(face(hd, tmesh) ) )
+            {
+              if ( faces_per_cc[index].insert( face(hd, tmesh) ).second )
+              {
+                stacks_per_cc[index].push_back( next(hd, tmesh) );
+                stacks_per_cc[index].push_back( prev(hd, tmesh) );
+                break;
+              }
+            }
+            if (stacks_per_cc[index].empty()) break;
+          }
+          while(true);
+          // the exploration of a cc is finished when its stack is empty
+          exploration_finished[index]=stacks_per_cc[index].empty();
+          if ( exploration_finished[index] ) --nb_ccs_to_be_explored;
+          if ( nb_ccs_to_be_explored==1 ) break;
+          while ( exploration_finished[(++index)%nb_cc] );
+          index=index%nb_cc;
+        }while(true);
+
+        /// \todo use the area criteria? this means maybe continue exploration of larger cc
+        // mark faces of completetly explored cc
+        for (index=0; index< nb_cc; ++index)
+          if( exploration_finished[index] )
+          {
+            BOOST_FOREACH(face_descriptor fd, faces_per_cc[index])
+              marked_faces.insert(fd);
+          }
+      }
+
+      // collect simplices to be removed
+      std::set<vertex_descriptor> vertices_to_keep;
+      std::set<halfedge_descriptor> halfedges_to_keep;
+      BOOST_FOREACH(halfedge_descriptor hd, border)
+        if (  !marked_faces.count(face(opposite(hd, tmesh), tmesh)) )
+        {
+          halfedges_to_keep.insert( hd );
+          vertices_to_keep.insert( target(hd, tmesh) );
+        }
+
+      // backup next,prev relationships to set after patch removal
+      std::vector< std::pair<halfedge_descriptor, halfedge_descriptor> > next_prev_halfedge_pairs;
+      halfedge_descriptor first_border_hd=*( halfedges_to_keep.begin() );
+      halfedge_descriptor current_border_hd=first_border_hd;
+      do{
+        halfedge_descriptor prev_border_hd=current_border_hd;
+        current_border_hd=next(current_border_hd, tmesh);
+        while( marked_faces.count( face( opposite(current_border_hd, tmesh), tmesh) ) )
+          current_border_hd=next(opposite(current_border_hd, tmesh), tmesh);
+        next_prev_halfedge_pairs.push_back( std::make_pair(prev_border_hd, current_border_hd) );
+      }while(current_border_hd!=first_border_hd);
+
+      // collect vertices and edges to remove and do remove faces
+      std::set<edge_descriptor> edges_to_remove;
+      std::set<vertex_descriptor> vertices_to_remove;
+      BOOST_FOREACH(face_descriptor fd, marked_faces)
+      {
+        halfedge_descriptor hd=halfedge(fd, tmesh);
+        for(int i=0; i<3; ++i)
+        {
+          if ( !halfedges_to_keep.count(hd) )
+            edges_to_remove.insert( edge(hd, tmesh) );
+          if ( !vertices_to_keep.count(target(hd,tmesh)) )
+            vertices_to_remove.insert( target(hd,tmesh) );
+          hd=next(hd, tmesh);
+        }
+        remove_face(fd, tmesh);
+      }
+
+      // remove vertices
+      BOOST_FOREACH(vertex_descriptor vd, vertices_to_remove)
+        remove_vertex(vd, tmesh);
+      // remove edges
+      BOOST_FOREACH(edge_descriptor ed, edges_to_remove)
+      {
+        null_edges_to_remove.erase(ed);
+        remove_edge(ed, tmesh);
+      }
+
+      // add a new face, set all border edges pointing to it
+      // and update halfedge vertex of patch boundary vertices
+      face_descriptor new_face = add_face(tmesh);
+      typedef std::pair<halfedge_descriptor, halfedge_descriptor> Pair_type;
+      BOOST_FOREACH(const Pair_type& p, next_prev_halfedge_pairs)
+      {
+        set_face(p.first, new_face, tmesh);
+        set_next(p.first, p.second, tmesh);
+        set_halfedge(target(p.first, tmesh), p.first, tmesh);
+      }
+      set_halfedge(new_face, first_border_hd, tmesh);
+      // triangulate the new face and update the coordinate of the central vertex
+      halfedge_descriptor new_hd=Euler::add_center_vertex(first_border_hd, tmesh);
+      put(vpmap, target(new_hd, tmesh), pt);
+
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(new_hd, tmesh))
+        if ( traits.equal_3_object()(get(vpmap, target(hd, tmesh)), get(vpmap, source(hd, tmesh))) )
+          null_edges_to_remove.insert(edge(hd, tmesh));
+
+      CGAL_assertion( is_valid(tmesh) );
+    }
+  }
+
+  return nb_deg_faces;
+}
+
+template <class EdgeRange, class TriangleMesh>
+std::size_t remove_null_edges(
+                       const EdgeRange& edge_range,
+                       TriangleMesh& tmesh)
+{
+  return remove_null_edges(edge_range, tmesh,
+                           parameters::all_default());
+}
+
+/// \ingroup PkgPolygonMeshProcessing
+/// removes the degenerate faces from a triangulated surface mesh.
+/// A face is considered degenerate if two of its vertices share the same location,
+/// or more generally if all its vertices are collinear.
+///
+/// @pre `CGAL::is_triangle_mesh(tmesh)`
+///
+/// @tparam TriangleMesh a model of `FaceListGraph` and `MutableFaceGraph`
+///        that has an internal property map for `boost::vertex_point_t`
+/// @tparam NamedParameters a sequence of \ref namedparameters
+///
+/// @param tmesh the  triangulated surface mesh to be repaired
+/// @param np optional \ref namedparameters described below
+///
+/// \cgalNamedParamsBegin
+///    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. The type of this map is model of `ReadWritePropertyMap` \cgalParamEnd
+///    \cgalParamBegin{geom_traits} a geometric traits class instance.
+///       The traits class must provide the nested type `Point_3`,
+///       and the nested functors :
+///         - `Compare_distance_3` to compute the distance between 2 points
+///         - `Collinear_are_ordered_along_line_3` to check whether 3 collinear points are ordered
+///         - `Collinear_3` to check whether 3 points are collinear
+///         - `Less_xyz_3` to compare lexicographically two points
+///         - `Equal_3` to check whether 2 points are identical
+///         -  for each functor Foo, a function `Foo foo_object()`
+///   \cgalParamEnd
+/// \cgalNamedParamsEnd
+///
+/// \return number of removed degenerate faces
+/// \endcond
+template <class TriangleMesh, class NamedParameters>
+std::size_t remove_degenerate_faces(TriangleMesh& tmesh,
+                                    const NamedParameters& np)
+{
+  CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
+
+  using boost::choose_const_pmap;
+  using boost::get_param;
+  using boost::choose_param;
+
+  typedef TriangleMesh TM;
+  typedef typename boost::graph_traits<TriangleMesh> GT;
+  typedef typename GT::edge_descriptor edge_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::vertex_descriptor vertex_descriptor;
+
+  typedef typename GetVertexPointMap<TM, NamedParameters>::type VertexPointMap;
+  VertexPointMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                                     tmesh,
+                                     boost::vertex_point);
+  typedef typename GetGeomTraits<TM, NamedParameters>::type Traits;
+  Traits traits = choose_param(get_param(np, geom_traits), Traits());
+
+// First remove edges of length 0
+  std::size_t nb_deg_faces = remove_null_edges(edges(tmesh), tmesh, np);
+
+// Then, remove triangles made of 3 collinear points
+  std::set<face_descriptor> degenerate_face_set;
+  BOOST_FOREACH(face_descriptor fd, faces(tmesh))
+    if ( is_degenerated(fd, tmesh, vpmap, traits) )
+      degenerate_face_set.insert(fd);
+  nb_deg_faces+=degenerate_face_set.size();
+
+  while (!degenerate_face_set.empty())
+  {
+    face_descriptor fd = *degenerate_face_set.begin();
+
+    // look whether an incident triangle is also degenerated
+    bool detect_cc_of_degenerate_triangles = false;
+    BOOST_FOREACH(halfedge_descriptor hd,
+                  halfedges_around_face(halfedge(fd, tmesh), tmesh) )
+    {
+      face_descriptor adjacent_face = face( opposite(hd, tmesh), tmesh );
+      if ( adjacent_face!=GT::null_face() &&
+           degenerate_face_set.count(adjacent_face) )
+      {
+        detect_cc_of_degenerate_triangles = true;
+        break;
+      }
+    }
+
+    if (!detect_cc_of_degenerate_triangles)
+    {
+      degenerate_face_set.erase(degenerate_face_set.begin());
+    // flip the longest edge of the triangle
+      const typename Traits::Point_3& p1 = get(vpmap, target( halfedge(fd, tmesh), tmesh) );
+      const typename Traits::Point_3& p2 = get(vpmap, target(next(halfedge(fd, tmesh), tmesh), tmesh) );
+      const typename Traits::Point_3& p3 = get(vpmap, source( halfedge(fd, tmesh), tmesh) );
+
+      CGAL_assertion(p1!=p2 && p1!=p3 && p2!=p3);
+
+      typename Traits::Compare_distance_3 compare_distance = traits.compare_distance_3_object();
+
+      halfedge_descriptor edge_to_flip;
+      if (compare_distance(p1,p2, p1,p3) != CGAL::SMALLER) // p1p2 > p1p3
+      {
+        if (compare_distance(p1,p2, p2,p3) != CGAL::SMALLER) // p1p2 > p2p3
+          // flip p1p2
+          edge_to_flip = next( halfedge(fd, tmesh), tmesh );
+        else
+          // flip p2p3
+          edge_to_flip = prev( halfedge(fd, tmesh), tmesh );
+      }
+      else
+        if (compare_distance(p1,p3, p2,p3) != CGAL::SMALLER) // p1p3>p2p3
+          //flip p3p1
+          edge_to_flip = halfedge(fd, tmesh);
+        else
+          //flip p2p3
+          edge_to_flip = prev( halfedge(fd, tmesh), tmesh );
+
+      face_descriptor opposite_face=face( opposite(edge_to_flip, tmesh), tmesh);
+      if ( opposite_face == GT::null_face() )
+        // simply remove the face
+        Euler::remove_face(edge_to_flip, tmesh);
+      else
+        Euler::flip_edge(edge_to_flip, tmesh);
+    }
+    else
+    {
+    // Process a connected component of degenerate faces
+      // get all the faces from the connected component
+      // and the boundary edges
+      std::set<face_descriptor> cc_faces;
+      std::vector<face_descriptor> queue;
+      std::vector<halfedge_descriptor> boundary_hedges;
+      std::vector<halfedge_descriptor> inside_hedges;
+      queue.push_back(fd);
+      cc_faces.insert(fd);
+
+      while(!queue.empty())
+      {
+        face_descriptor top=queue.back();
+        queue.pop_back();
+        BOOST_FOREACH(halfedge_descriptor hd,
+                      halfedges_around_face(halfedge(top, tmesh), tmesh) )
+        {
+          face_descriptor adjacent_face = face( opposite(hd, tmesh), tmesh );
+          if ( adjacent_face==GT::null_face() ||
+               !degenerate_face_set.count(adjacent_face) )
+            boundary_hedges.push_back(hd);
+          else
+            if (cc_faces.insert(adjacent_face).second)
+            {
+              inside_hedges.push_back(hd);
+              queue.push_back(adjacent_face);
+            }
+        }
+      }
+
+      #if 0
+      /// dump cc_faces
+      {
+      int id=0;
+      std::map<vertex_descriptor, int> vids;
+      BOOST_FOREACH(face_descriptor f, cc_faces)
+      {
+        if ( vids.insert( std::make_pair( target(halfedge(f, tmesh), tmesh), id) ).second ) ++id;
+        if ( vids.insert( std::make_pair( target(next(halfedge(f, tmesh), tmesh), tmesh), id) ).second ) ++id;
+        if ( vids.insert( std::make_pair( target(next(next(halfedge(f, tmesh), tmesh), tmesh), tmesh), id) ).second ) ++id;
+      }
+      std::ofstream output("/tmp/cc_faces.off");
+      output << std::setprecision(44);
+      output << "OFF\n" << vids.size() << " " << cc_faces.size() << " 0\n";
+      std::vector<typename Traits::Point_3> points(vids.size());
+      typedef std::pair<const vertex_descriptor, int> Pair_type;
+      BOOST_FOREACH(Pair_type p, vids)
+        points[p.second]=get(vpmap, p.first);
+      BOOST_FOREACH(typename Traits::Point_3 p, points)
+        output << p << "\n";
+      BOOST_FOREACH(face_descriptor f, cc_faces)
+      {
+        output << "3 "
+               << vids[ target(halfedge(f, tmesh), tmesh) ] << " "
+               << vids[ target(next(halfedge(f, tmesh), tmesh), tmesh) ] << " "
+               << vids[ target(next(next(halfedge(f, tmesh), tmesh), tmesh), tmesh) ] << "\n";
+      }
+
+      for (std::size_t pid=2; pid!=points.size(); ++pid)
+      {
+        CGAL_assertion(collinear(points[0], points[1], points[pid]));
+      }
+      }
+      #endif
+
+      // find vertices strictly inside the cc
+      std::set<vertex_descriptor> boundary_vertices;
+      BOOST_FOREACH(halfedge_descriptor hd, boundary_hedges)
+        boundary_vertices.insert( target(hd, tmesh) );
+      std::set<vertex_descriptor> inside_vertices;
+      BOOST_FOREACH(halfedge_descriptor hd, inside_hedges)
+      {
+        if (!boundary_vertices.count( target(hd, tmesh) ))
+          inside_vertices.insert( target(hd, tmesh) );
+        if (!boundary_vertices.count( source(hd, tmesh) ))
+          inside_vertices.insert( source(hd, tmesh) );
+      }
+
+      // update the face and halfedge vertex pointers on the boundary
+      BOOST_FOREACH(halfedge_descriptor h, boundary_hedges)
+      {
+        set_face(h, GT::null_face(), tmesh);
+        set_halfedge(target(h,tmesh), h, tmesh);
+      }
+      // update next/prev pointers of boundary_hedges
+      BOOST_FOREACH(halfedge_descriptor h, boundary_hedges)
+      {
+        halfedge_descriptor next_candidate = next( h, tmesh);
+        while (face(next_candidate, tmesh)!=GT::null_face())
+          next_candidate = next( opposite( next_candidate, tmesh), tmesh);
+        set_next(h, next_candidate, tmesh);
+      }
+      // remove degenerate faces
+      BOOST_FOREACH(face_descriptor f, cc_faces)
+        degenerate_face_set.erase(f);
+      BOOST_FOREACH(face_descriptor f, cc_faces)
+        remove_face(f, tmesh);
+      // remove interior edges
+      BOOST_FOREACH(halfedge_descriptor h, inside_hedges)
+        remove_edge(edge(h, tmesh), tmesh);
+      // remove interior vertices
+      BOOST_FOREACH(vertex_descriptor v, inside_vertices)
+        remove_vertex(v, tmesh);
+
+      // sort the boundary points along the common supporting line
+      //    we first need a reference point
+      typedef Less_vertex_point<TriangleMesh, VertexPointMap, Traits> Less_vertex;
+      std::pair<
+        typename std::set<vertex_descriptor>::iterator,
+        typename std::set<vertex_descriptor>::iterator > ref_vertices =
+        boost::minmax_element( boundary_vertices.begin(),
+                               boundary_vertices.end(),
+                               Less_vertex(traits, vpmap) );
+
+      //    and then we sort the vertices using this reference point
+      typedef Less_along_ray<Traits> Less_point;
+      typedef std::set<typename Traits::Point_3, Less_point> Sorted_point_set;
+      Sorted_point_set sorted_points( Less_point( traits, get(vpmap, *ref_vertices.first) ) );
+      BOOST_FOREACH(vertex_descriptor v, boundary_vertices)
+        sorted_points.insert( get(vpmap,v) );
+
+      CGAL_assertion( get( vpmap, *ref_vertices.first)==*sorted_points.begin() );
+      CGAL_assertion( get( vpmap, *ref_vertices.second)==*cpp11::prev(sorted_points.end()) );
+
+      // recover halfedges on the hole, bounded by the reference vertices
+      std::vector<halfedge_descriptor> side_one, side_two;
+      side_one.push_back( next( halfedge(*ref_vertices.first, tmesh), tmesh) );
+      while( target(side_one.back(), tmesh)!=*ref_vertices.second)
+        side_one.push_back( next(side_one.back(), tmesh) );
+      side_two.push_back( next(side_one.back(), tmesh) );
+      while( target(side_two.back(), tmesh)!=*ref_vertices.first )
+        side_two.push_back( next(side_two.back(), tmesh) );
+      // reverse the order of the second side so as to follow
+      // the same order than side one
+      std::reverse(side_two.begin(), side_two.end());
+      BOOST_FOREACH(halfedge_descriptor& h, side_two)
+        h=opposite(h, tmesh);
+
+      CGAL_assertion( source(side_one.front(), tmesh) == *ref_vertices.first );
+      CGAL_assertion( source(side_two.front(), tmesh) == *ref_vertices.first );
+      CGAL_assertion( target(side_one.back(), tmesh) == *ref_vertices.second );
+      CGAL_assertion( target(side_two.back(), tmesh) == *ref_vertices.second );
+
+      // now split each side to contains the same sequence of points
+      //    first side
+      int hi=0;
+      for (typename Sorted_point_set::iterator it=cpp11::next(sorted_points.begin()),
+                                               it_end=sorted_points.end(); it!=it_end; ++it)
+      {
+        CGAL_assertion( *cpp11::prev(it) == get(vpmap, source(side_one[hi], tmesh) ) );
+        if( *it != get(vpmap, target(side_one[hi], tmesh) ) ){
+          // split the edge and update the point
+          halfedge_descriptor h1 = next(opposite(side_one[hi], tmesh), tmesh);
+          put(vpmap,
+              target(Euler::split_edge(side_one[hi], tmesh), tmesh),
+              *it);
+          // split_edge updates the halfedge of the source vertex of h,
+          // since we reuse later the halfedge of the first refernce vertex
+          // we must set it as we need.
+          if ( source(h1,tmesh) == *ref_vertices.first)
+            set_halfedge(*ref_vertices.first, prev( prev(side_one[hi], tmesh), tmesh), tmesh );
+          // retriangulate the opposite face
+          if ( face(h1, tmesh) != GT::null_face())
+            Euler::split_face(h1, opposite(side_one[hi], tmesh), tmesh);
+        }
+        else
+          ++hi;
+      }
+      //    second side
+      hi=0;
+      for (typename Sorted_point_set::iterator it=cpp11::next(sorted_points.begin()),
+                                               it_end=sorted_points.end(); it!=it_end; ++it)
+      {
+        CGAL_assertion( *cpp11::prev(it) == get(vpmap, source(side_two[hi], tmesh) ) );
+        if( *it != get(vpmap, target(side_two[hi], tmesh) ) ){
+          // split the edge and update the point
+          halfedge_descriptor h2 = Euler::split_edge(side_two[hi], tmesh);
+          put(vpmap, target(h2, tmesh), *it);
+          // split_edge updates the halfedge of the source vertex of h,
+          // since we reuse later the halfedge of the first refernce vertex
+          // we must set it as we need.
+          if ( source(h2,tmesh) == *ref_vertices.first)
+            set_halfedge(*ref_vertices.first, opposite( prev(side_two[hi], tmesh), tmesh), tmesh );
+          // retriangulate the face
+          if ( face(h2, tmesh) != GT::null_face())
+            Euler::split_face(h2, next(side_two[hi], tmesh), tmesh);
+        }
+        else
+          ++hi;
+      }
+
+      CGAL_assertion( target(halfedge(*ref_vertices.first, tmesh), tmesh) == *ref_vertices.first );
+      CGAL_assertion( face(halfedge(*ref_vertices.first, tmesh), tmesh) == GT::null_face() );
+
+      // remove side1 and replace its opposite hedges by those of side2
+      halfedge_descriptor h_side2 = halfedge(*ref_vertices.first, tmesh);
+      halfedge_descriptor h_side1 = next(h_side2, tmesh);
+      while(true)
+      {
+        CGAL_assertion( get(vpmap, source(h_side1, tmesh)) == get(vpmap, target(h_side2, tmesh)) );
+        CGAL_assertion( get(vpmap, target(h_side1, tmesh)) == get(vpmap, source(h_side2, tmesh)) );
+        // backup target vertex
+        vertex_descriptor vertex_to_remove = target(h_side1, tmesh);
+        if (vertex_to_remove!=*ref_vertices.second){
+          vertex_descriptor replacement_vertex = source(h_side2, tmesh);
+          // replace the incident vertex
+          BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(h_side1, tmesh))
+            set_target(hd, replacement_vertex, tmesh);
+        }
+        // prev side2 hedge for next loop
+        halfedge_descriptor h_side2_for_next_turn = prev(h_side2, tmesh);
+        // replace the opposite of h_side1 by h_side2
+        halfedge_descriptor opposite_h_side1 = opposite( h_side1, tmesh);
+        face_descriptor the_face = face(opposite_h_side1, tmesh);
+        set_face(h_side2, the_face, tmesh);
+        if (the_face!=GT::null_face()) set_halfedge(the_face, h_side2, tmesh);
+        set_next(h_side2, next(opposite_h_side1, tmesh), tmesh);
+        set_next(prev(opposite_h_side1, tmesh), h_side2, tmesh);
+        // take the next hedges
+        edge_descriptor edge_to_remove = edge(h_side1, tmesh);
+        h_side1 = next(h_side1, tmesh);
+        // now remove the extra edge
+        remove_edge(edge_to_remove, tmesh);
+        // ... and the extra vertex if it's not the second reference
+        if (vertex_to_remove==*ref_vertices.second)
+        {
+          // update the halfedge pointer of the last vertex (others were already from side 2)
+          CGAL_assertion( target(opposite(h_side2, tmesh), tmesh) == vertex_to_remove );
+          set_halfedge(vertex_to_remove, opposite(h_side2, tmesh), tmesh);
+          break;
+        }
+        else
+          remove_vertex(vertex_to_remove , tmesh);
+        h_side2 = h_side2_for_next_turn;
+      }
+    }
+  }
+
+  return nb_deg_faces;
+}
+
+/// \cond SKIP_IN_MANUAL
+template<class TriangleMesh>
+std::size_t remove_degenerate_faces(TriangleMesh& tmesh)
+{
+  return remove_degenerate_faces(tmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+/// \endcond
+
+
+/// \ingroup PkgPolygonMeshProcessing
+/// removes the isolated vertices from any polygon mesh.
+/// A vertex is considered isolated if it is not incident to any simplex
+/// of higher dimension.
+///
+/// @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+///
+/// @param pmesh the polygon mesh to be repaired
+///
+/// @return number of removed isolated vertices
+///
+template <class PolygonMesh>
+std::size_t remove_isolated_vertices(PolygonMesh& pmesh)
+{
+  typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
+  std::vector<vertex_descriptor> to_be_removed;
+  
+  BOOST_FOREACH(vertex_descriptor v, vertices(pmesh))
+  {
+    if (CGAL::halfedges_around_target(v, pmesh).first
+      == CGAL::halfedges_around_target(v, pmesh).second)
+      to_be_removed.push_back(v);
+  }
+  std::size_t nb_removed = to_be_removed.size();
+  BOOST_FOREACH(vertex_descriptor v, to_be_removed)
+  {
+    remove_vertex(v, pmesh);
+  }
+  return nb_removed;
+}
+
+} } // end of CGAL::Polygon_mesh_processing
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_REPAIR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/self_intersections.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/self_intersections.h
new file mode 100644
index 0000000..7edcef0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/self_intersections.h
@@ -0,0 +1,404 @@
+// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Pierre Alliez, Laurent Rineau, Ilker O. Yaz
+
+// compute self-intersection of a CGAL triangle polyhedron mesh
+// original code from Lutz Kettner
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_SELF_INTERSECTIONS
+#define CGAL_POLYGON_MESH_PROCESSING_SELF_INTERSECTIONS
+
+#include <CGAL/box_intersection_d.h>
+#include <CGAL/intersections.h>
+#include <CGAL/Bbox_3.h>
+
+#include <vector>
+#include <exception>
+#include <boost/foreach.hpp>
+#include <boost/range.hpp>
+
+#include <boost/function_output_iterator.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/properties.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+namespace CGAL {
+namespace internal {
+template <class TM,//TriangleMesh
+          class Kernel,
+          class Box,
+          class OutputIterator,
+          class VertexPointMap>
+struct Intersect_facets
+{
+  // wrapper to check whether anything is inserted to output iterator
+  struct Output_iterator_with_bool 
+  {
+    Output_iterator_with_bool(OutputIterator* out, bool* intersected)
+      : m_iterator(out), m_intersected(intersected) { }
+
+    template<class T>
+    void operator()(const T& t) {
+      *m_intersected = true;
+      *(*m_iterator)++ = t; 
+    }
+
+    OutputIterator* m_iterator;
+    bool* m_intersected;
+  };
+// typedefs
+  typedef typename Kernel::Segment_3    Segment;
+  typedef typename Kernel::Triangle_3   Triangle;
+  typedef typename boost::graph_traits<TM>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::property_map<TM, boost::vertex_point_t>::const_type Ppmap;
+
+// members
+  const TM& m_tmesh;
+  const VertexPointMap m_vpmap;
+  mutable OutputIterator  m_iterator;
+  mutable bool            m_intersected;
+  mutable boost::function_output_iterator<Output_iterator_with_bool> m_iterator_wrapper;
+
+  typename Kernel::Construct_segment_3  segment_functor;
+  typename Kernel::Construct_triangle_3 triangle_functor;
+  typename Kernel::Do_intersect_3       do_intersect_3_functor;
+
+  
+  Intersect_facets(const TM& tmesh, OutputIterator it, VertexPointMap vpmap, const Kernel& kernel)
+    : 
+    m_tmesh(tmesh),
+    m_vpmap(vpmap),
+    m_iterator(it),
+    m_intersected(false),
+    m_iterator_wrapper(Output_iterator_with_bool(&m_iterator, &m_intersected)),
+    segment_functor(kernel.construct_segment_3_object()),
+    triangle_functor(kernel.construct_triangle_3_object()),
+    do_intersect_3_functor(kernel.do_intersect_3_object())
+  { }
+
+  void operator()(const Box* b,
+    const Box* c) const
+  {
+    halfedge_descriptor h  = halfedge(b->info(),m_tmesh);
+
+    // check for shared egde --> no intersection
+    if(face(opposite(h,m_tmesh),m_tmesh) == c->info() ||
+       face(opposite(next(h,m_tmesh),m_tmesh),m_tmesh) == c->info() ||
+       face(opposite(next(next(h,m_tmesh),m_tmesh),m_tmesh),m_tmesh) == c->info())
+      return;
+
+    // check for shared vertex --> maybe intersection, maybe not
+    halfedge_descriptor g = halfedge(c->info(),m_tmesh);
+    halfedge_descriptor v;
+
+    if(target(h,m_tmesh) == target(g,m_tmesh))
+      v = g;
+    if(target(h,m_tmesh) == target(next(g,m_tmesh),m_tmesh))
+      v = next(g,m_tmesh);
+    if(target(h,m_tmesh) == target(next(next(g,m_tmesh),m_tmesh),m_tmesh))
+      v = next(next(g,m_tmesh),m_tmesh);
+
+    if(v == halfedge_descriptor()){
+      h = next(h,m_tmesh);
+      if(target(h,m_tmesh) == target(g,m_tmesh))
+        v = g;
+      if(target(h,m_tmesh) == target(next(g,m_tmesh),m_tmesh))
+        v = next(g,m_tmesh);
+      if(target(h,m_tmesh) == target(next(next(g,m_tmesh),m_tmesh),m_tmesh))
+        v = next(next(g,m_tmesh),m_tmesh);
+      if(v == halfedge_descriptor()){
+        h = next(h,m_tmesh);
+        if(target(h,m_tmesh) == target(g,m_tmesh))
+          v = g;
+        if(target(h,m_tmesh) == target(next(g,m_tmesh),m_tmesh))
+          v = next(g,m_tmesh);
+        if(target(h,m_tmesh) == target(next(next(g,m_tmesh),m_tmesh),m_tmesh))
+          v = next(next(g,m_tmesh),m_tmesh);
+      }
+    }
+
+    if(v != halfedge_descriptor()){
+      // found shared vertex: 
+      CGAL_assertion(target(h,m_tmesh) == target(v,m_tmesh));
+      // geometric check if the opposite segments intersect the triangles
+      Triangle t1 = triangle_functor( get(m_vpmap,target(h,m_tmesh)),
+                                      get(m_vpmap, target(next(h,m_tmesh),m_tmesh)),
+                                      get(m_vpmap, target(next(next(h,m_tmesh),m_tmesh),m_tmesh)));
+      Triangle t2 = triangle_functor( get(m_vpmap, target(v,m_tmesh)),
+                                      get(m_vpmap, target(next(v,m_tmesh),m_tmesh)),
+                                      get(m_vpmap, target(next(next(v,m_tmesh),m_tmesh),m_tmesh)));
+      
+      Segment s1 = segment_functor( get(m_vpmap, target(next(h,m_tmesh),m_tmesh)),
+                                    get(m_vpmap, target(next(next(h,m_tmesh),m_tmesh),m_tmesh)));
+      Segment s2 = segment_functor( get(m_vpmap, target(next(v,m_tmesh),m_tmesh)),
+                                    get(m_vpmap, target(next(next(v,m_tmesh),m_tmesh),m_tmesh)));
+      
+      if(do_intersect_3_functor(t1,s2)){
+        *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
+      } else if(do_intersect_3_functor(t2,s1)){
+        *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
+      }
+      return;
+    }
+    
+    // check for geometric intersection
+    Triangle t1 = triangle_functor( get(m_vpmap, target(h,m_tmesh)),
+                                    get(m_vpmap, target(next(h,m_tmesh),m_tmesh)),
+                                    get(m_vpmap, target(next(next(h,m_tmesh),m_tmesh),m_tmesh)));
+    Triangle t2 = triangle_functor( get(m_vpmap, target(g,m_tmesh)),
+                                    get(m_vpmap, target(next(g,m_tmesh),m_tmesh)),
+                                    get(m_vpmap, target(next(next(g,m_tmesh),m_tmesh),m_tmesh)));
+    if(do_intersect_3_functor(t1, t2)){
+      *m_iterator_wrapper++ = std::make_pair(b->info(), c->info());
+    }
+  } // end operator ()
+}; // end struct Intersect_facets
+
+struct Throw_at_output {
+  class Throw_at_output_exception: public std::exception
+  { };
+
+  template<class T>
+  void operator()(const T& /* t */) const {
+    throw Throw_at_output_exception();
+  }
+};
+
+}// namespace internal
+
+namespace Polygon_mesh_processing {
+
+#ifndef DOXYGEN_RUNNING
+template <class TriangleMesh
+        , class FaceRange
+        , class OutputIterator
+        , class NamedParameters
+>
+OutputIterator
+self_intersections( const FaceRange& face_range,
+                    const TriangleMesh& tmesh,
+                    OutputIterator out,
+                    const NamedParameters& np);
+#endif
+
+/** 
+ * \ingroup PMP_intersection_grp
+ * detects and records self-intersections of a triangulated surface mesh.
+ * This function depends on the package \ref PkgBoxIntersectionDSummary
+ * @pre `CGAL::is_triangle_mesh(tmesh)`
+ *
+ * @tparam TriangleMesh a model of `FaceListGraph` that has an internal property map
+*         for `CGAL::vertex_point_t`
+ * @tparam OutputIterator a model of `OutputIterator` holding objects of type 
+ *   `std::pair<boost::graph_traits<TriangleMesh>::%face_descriptor, boost::graph_traits<TriangleMesh>::%face_descriptor>`
+ * @tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * @param tmesh the triangulated surface mesh to be checked
+ * @param out output iterator to be filled with all pairs of non-adjacent faces that intersect
+ * @param np optional sequence of \ref namedparameters among the ones listed below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `SelfIntersectionTraits` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ * @return `out`
+ */
+template <class TriangleMesh
+        , class OutputIterator
+#ifdef DOXYGEN_RUNNING
+        , class NamedParameters
+#else //avoid ambiguity with self_intersections(faces, tmesh, out)
+        , class P, class T, class R
+#endif
+>
+OutputIterator
+self_intersections(const TriangleMesh& tmesh
+                 , OutputIterator out
+#ifdef DOXYGEN_RUNNING
+                 , const NamedParameters& np)
+#else
+                 , const pmp_bgl_named_params<P,T,R>& np)
+#endif
+{
+  return self_intersections(faces(tmesh), tmesh, out, np);
+}
+
+/// \cond SKIP_IN_MANUAL
+template <class TriangleMesh, class OutputIterator>
+OutputIterator
+self_intersections(const TriangleMesh& tmesh, OutputIterator out)
+{
+  return self_intersections(tmesh, out,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+/// \endcond
+
+/*!
+ * \ingroup PMP_intersection_grp
+ * Same as above but the self-intersections reported
+ * are only limited to the faces in `face_range`.
+ *
+ * @pre `CGAL::is_triangle_mesh(tmesh)`
+ *
+ * @tparam FaceRange range of `boost::graph_traits<PolygonMesh>::%face_descriptor`,
+ *  model of `Range`.
+ * Its iterator type is `RandomAccessIterator`.
+ * @tparam TriangleMesh a model of `FaceListGraph` that has an internal property map
+ *         for `CGAL::vertex_point_t`
+ * @tparam OutputIterator a model of `OutputIterator` holding objects of type
+ *   `std::pair<boost::graph_traits<TriangleMesh>::%face_descriptor, boost::graph_traits<TriangleMesh>::%face_descriptor>`
+ * @tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * @param face_range the range of faces to check for self-intersection.
+ * @param tmesh the triangulated surface mesh to be checked
+ * @param out output iterator to be filled with all pairs of non-adjacent faces that intersect
+ * @param np optional sequence of \ref namedparameters among the ones listed below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+ *    \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `SelfIntersectionTraits` \cgalParamEnd
+ * \cgalNamedParamsEnd
+
+ */
+template <class TriangleMesh
+        , class FaceRange
+        , class OutputIterator
+        , class NamedParameters
+>
+OutputIterator
+self_intersections( const FaceRange& face_range,
+                    const TriangleMesh& tmesh,
+                    OutputIterator out,
+                    const NamedParameters& np)
+{
+  CGAL_precondition(CGAL::is_triangle_mesh(tmesh));
+
+  typedef TriangleMesh TM;
+  typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
+  typedef typename CGAL::Box_intersection_d::Box_with_info_d<double, 3, face_descriptor> Box;
+
+  // make one box per facet
+  std::vector<Box> boxes;
+  boxes.reserve(
+    std::distance( boost::begin(face_range), boost::end(face_range) )
+  );
+
+  typedef typename GetVertexPointMap<TM, NamedParameters>::const_type VertexPointMap;
+  VertexPointMap vpmap = choose_const_pmap(get_param(np, boost::vertex_point),
+                                           tmesh,
+                                           boost::vertex_point);
+
+  BOOST_FOREACH(face_descriptor f, face_range)
+  {
+    boxes.push_back(Box( get(vpmap, target(halfedge(f,tmesh),tmesh)).bbox()
+      + get(vpmap, target(next(halfedge(f, tmesh), tmesh), tmesh)).bbox()
+      + get(vpmap, target(next(next(halfedge(f, tmesh), tmesh), tmesh), tmesh)).bbox(),
+    f));
+  }
+  // generate box pointers
+  std::vector<const Box*> box_ptr;
+  box_ptr.reserve(num_faces(tmesh));
+
+  BOOST_FOREACH(Box& b, boxes)
+    box_ptr.push_back(&b);
+
+  // compute self-intersections filtered out by boxes
+  typedef typename GetGeomTraits<TM, NamedParameters>::type GeomTraits;
+  CGAL::internal::Intersect_facets<TM,GeomTraits,Box,OutputIterator,VertexPointMap>
+    intersect_facets(tmesh, out, vpmap,
+      boost::choose_param(get_param(np, geom_traits), GeomTraits()));
+
+  std::ptrdiff_t cutoff = 2000;
+  CGAL::box_self_intersection_d(box_ptr.begin(), box_ptr.end(),intersect_facets,cutoff);
+  return intersect_facets.m_iterator;
+}
+
+/// \cond SKIP_IN_MANUAL
+template <class TriangleMesh
+        , class FaceRange
+        , class OutputIterator
+>
+OutputIterator self_intersections(const FaceRange& face_range,
+                                  const TriangleMesh& tmesh,
+                                  OutputIterator out)
+{
+  return self_intersections(face_range, tmesh, out,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+/// \endcond
+
+/**
+ * \ingroup PMP_intersection_grp
+ * tests if a triangulated surface mesh self-intersects.
+ * This function depends on the package \ref PkgBoxIntersectionDSummary
+ * @pre `CGAL::is_triangle_mesh(tmesh)`
+ *
+ * @tparam TriangleMesh a model of `FaceListGraph` that has an internal property map
+ *         for `CGAL::vertex_point_t`
+ * @tparam NamedParameters a sequence of \ref namedparameters
+ *
+ * @param tmesh the triangulated surface mesh to be tested
+ * @param np optional sequence of \ref namedparameters among the ones listed below
+ *
+ * \cgalNamedParamsBegin
+ *    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `tmesh` \cgalParamEnd
+ *    \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `SelfIntersectionTraits` \cgalParamEnd
+ * \cgalNamedParamsEnd
+ *
+ * @return true if `tmesh` self-intersects
+ */
+template <class TriangleMesh
+        , class NamedParameters
+          >
+bool does_self_intersect(const TriangleMesh& tmesh
+                        , const NamedParameters& np)
+{
+  CGAL_precondition(CGAL::is_triangle_mesh(tmesh));
+
+  try
+  {
+    typedef boost::function_output_iterator<CGAL::internal::Throw_at_output> OutputIterator;
+    self_intersections(tmesh, OutputIterator(), np);
+  }
+  catch( CGAL::internal::Throw_at_output::Throw_at_output_exception& ) 
+  { return true; }
+
+  return false;
+}
+
+/// \cond SKIP_IN_MANUAL
+template <class TriangleMesh>
+bool does_self_intersect(const TriangleMesh& tmesh)
+{
+  return does_self_intersect(tmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+/// \endcond
+
+}// end namespace Polygon_mesh_processing
+
+}// namespace CGAL
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_SELF_INTERSECTIONS
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/stitch_borders.h
new file mode 100644
index 0000000..6e2e997
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/stitch_borders.h
@@ -0,0 +1,385 @@
+// Copyright (c) 2014 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+
+#ifndef CGAL_STITCH_POLYGON_MESH_H
+#define CGAL_STITCH_POLYGON_MESH_H
+
+#include <CGAL/Modifier_base.h>
+#include <CGAL/HalfedgeDS_decorator.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/properties.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <set>
+#include <vector>
+#include <utility>
+#include <boost/range.hpp>
+#include <boost/foreach.hpp>
+
+#ifdef DOXYGEN_RUNNING
+#define CGAL_PMP_NP_TEMPLATE_PARAMETERS NamedParameters
+#define CGAL_PMP_NP_CLASS NamedParameters
+#endif
+
+namespace CGAL{
+
+namespace Polygon_mesh_processing{
+
+namespace internal{
+
+template <typename PM, typename VertexPointMap>
+struct Less_for_halfedge
+{
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor
+    halfedge_descriptor;
+  typedef typename boost::property_traits<VertexPointMap>::reference Point;
+
+  Less_for_halfedge(const PM& pmesh_,
+                    const VertexPointMap& vpmap_)
+    : pmesh(pmesh_),
+      vpmap(vpmap_)
+  {}
+
+  bool operator()(halfedge_descriptor h1,
+                  halfedge_descriptor h2) const
+  {
+    Point s1 = get(vpmap,target(opposite(h1, pmesh), pmesh));
+    Point t1 = get(vpmap,target(h1, pmesh));
+    Point s2 = get(vpmap,target(opposite(h2, pmesh), pmesh));
+    Point t2 = get(vpmap,target(h2, pmesh));
+    return
+    ( s1 < t1?  std::make_pair(s1,t1) : std::make_pair(t1, s1) )
+    <
+    ( s2 < t2?  std::make_pair(s2,t2) : std::make_pair(t2, s2) );
+  }
+
+  const PM& pmesh;
+  const VertexPointMap& vpmap;
+};
+
+template <typename PM, typename OutputIterator, typename LessHedge, typename VertexPointMap>
+OutputIterator
+detect_duplicated_boundary_edges
+(PM& pmesh, OutputIterator out, LessHedge less_hedge, const VertexPointMap& vpmap)
+{
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+  typedef std::set<halfedge_descriptor, LessHedge> Border_halfedge_set;
+
+  Border_halfedge_set border_halfedge_set(less_hedge);
+  BOOST_FOREACH(halfedge_descriptor he, halfedges(pmesh))
+  {
+    if ( !CGAL::is_border(he, pmesh) )
+      continue;
+    typename Border_halfedge_set::iterator set_it;
+    bool insertion_ok;
+    CGAL::cpp11::tie(set_it, insertion_ok)
+      = border_halfedge_set.insert(he);
+
+    if ( !insertion_ok )
+      if ( get(vpmap, source(he,pmesh))==get(vpmap, target(*set_it,pmesh)) &&
+           get(vpmap, target(he,pmesh))==get(vpmap, source(*set_it,pmesh)) )
+        *out++ = std::make_pair(*set_it, he);
+  }
+  return out;
+}
+
+template <class PM, typename VertexPointMap, typename HalfedgePairsRange>
+struct Naive_border_stitching_modifier
+  : CGAL::Modifier_base<PM>
+{
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+  typedef typename std::pair<halfedge_descriptor, halfedge_descriptor> halfedges_pair;
+  typedef typename boost::property_traits<VertexPointMap>::value_type Point;
+
+  typedef HalfedgePairsRange To_stitch;
+
+  Naive_border_stitching_modifier(const To_stitch& to_stitch_,
+                                  VertexPointMap vpmap_)
+    : to_stitch(to_stitch_)
+    , vpmap(vpmap_)
+  {}
+
+  void update_target_vertex(halfedge_descriptor h,
+                            vertex_descriptor v_kept,
+                            PM& pmesh)
+  {
+    halfedge_descriptor start = h;
+    do{
+      set_target(h, v_kept, pmesh);
+      h = opposite(next(h, pmesh), pmesh);
+    } while( h != start );
+  }
+
+  void operator()(PM& pmesh)
+  {
+    /// Merge the vertices
+    std::vector<vertex_descriptor> vertices_to_delete;
+    // since there might be several vertices with identical point
+    // we use the following map to choose one vertex per point
+    std::map<Point, vertex_descriptor> vertices_kept;
+
+    BOOST_FOREACH(const halfedges_pair hk, to_stitch)
+    {
+      halfedge_descriptor h1 = hk.first;
+      halfedge_descriptor h2 = hk.second;
+
+      CGAL_assertion(CGAL::is_border(h1, pmesh));
+      CGAL_assertion(CGAL::is_border(h2, pmesh));
+      CGAL_assertion(!CGAL::is_border(opposite(h1, pmesh), pmesh));
+      CGAL_assertion(!CGAL::is_border(opposite(h2, pmesh), pmesh));
+
+      vertex_descriptor h1_tgt = target(h1, pmesh);
+      vertex_descriptor h2_src = source(h2, pmesh);
+
+      //update vertex pointers: target of h1 vs source of h2
+      vertex_descriptor v_to_keep = h1_tgt;
+      std::pair<typename std::map<Point, vertex_descriptor>::iterator, bool >
+        insert_res =
+        vertices_kept.insert( std::make_pair(get(vpmap, v_to_keep), v_to_keep) );
+
+      if (!insert_res.second && v_to_keep != insert_res.first->second)
+      {
+        v_to_keep = insert_res.first->second;
+        //we remove h1->vertex()
+        vertices_to_delete.push_back( h1_tgt );
+        update_target_vertex(h1, v_to_keep, pmesh);
+      }
+      if (v_to_keep != h2_src)
+      {
+        //we remove h2->opposite()->vertex()
+        vertices_to_delete.push_back( h2_src );
+        update_target_vertex(opposite(h2, pmesh), v_to_keep, pmesh);
+      }
+      set_halfedge(v_to_keep, h1, pmesh);
+
+      vertex_descriptor h1_src = source(h1, pmesh);
+      vertex_descriptor h2_tgt = target(h2, pmesh);
+
+      //update vertex pointers: target of h1 vs source of h2
+      v_to_keep = h2_tgt;
+      insert_res =
+          vertices_kept.insert( std::make_pair(get(vpmap, v_to_keep), v_to_keep) );
+      if (!insert_res.second && v_to_keep != insert_res.first->second)
+      {
+        v_to_keep = insert_res.first->second;
+        //we remove h2->vertex()
+        vertices_to_delete.push_back( h2_tgt );
+        update_target_vertex(h2, v_to_keep, pmesh);
+      }
+      if (v_to_keep!=h1_src)
+      {
+        //we remove h1->opposite()->vertex()
+        vertices_to_delete.push_back( h1_src );
+        update_target_vertex(opposite(h1, pmesh), v_to_keep, pmesh);
+      }
+      set_halfedge(v_to_keep, opposite(h1,pmesh), pmesh);
+    }
+
+    /// Update next/prev of neighbor halfedges (that are not set for stiching)
+    /// _______   _______
+    ///        | |
+    ///        | |
+    /// In order to avoid having to maintain a set with halfedges to stitch
+    /// we do on purpose next-prev linking that might not be useful but that
+    /// is harmless and still less expensive than doing queries in a set
+    BOOST_FOREACH(const halfedges_pair hk, to_stitch)
+    {
+      halfedge_descriptor h1 = hk.first;
+      halfedge_descriptor h2 = hk.second;
+
+      //link h2->prev() to h1->next()
+      halfedge_descriptor pr = prev(h2, pmesh);
+      halfedge_descriptor nx = next(h1, pmesh);
+      set_next(pr, nx, pmesh);
+
+      //link h1->prev() to h2->next()
+      pr = prev(h1, pmesh);
+      nx = next(h2, pmesh);
+      set_next(pr, nx, pmesh);
+    }
+
+    /// update HDS connectivity, removing the second halfedge
+    /// of each the pair and its opposite
+    BOOST_FOREACH(const halfedges_pair hk, to_stitch)
+    {
+      halfedge_descriptor h1 = hk.first;
+      halfedge_descriptor h2 = hk.second;
+
+    ///Set face-halfedge relationship
+      //h2 and its opposite will be removed
+      set_face(h1, face(opposite(h2, pmesh), pmesh), pmesh);
+      set_halfedge(face(h1, pmesh), h1, pmesh);
+      //update next/prev pointers
+      halfedge_descriptor tmp = prev(opposite(h2, pmesh), pmesh);
+      set_next(tmp, h1, pmesh);
+      tmp = next(opposite(h2, pmesh), pmesh);
+      set_next(h1, tmp, pmesh);
+
+    /// remove the extra halfedges
+      remove_edge(edge(h2, pmesh), pmesh);
+    }
+
+    //remove the extra vertices
+    BOOST_FOREACH(vertex_descriptor vd, vertices_to_delete)
+    {
+      remove_vertex(vd, pmesh);
+    }
+  }
+
+private:
+  const To_stitch& to_stitch;
+  VertexPointMap vpmap;
+};
+
+} //end of namespace internal
+
+
+
+/*!
+* \ingroup PMP_repairing_grp
+* Stitches together border halfedges in a polygon mesh.
+* The halfedges to be stitched are provided in `hedge_pairs_to_stitch`.
+* For each pair `p` in this vector, `p.second` and its opposite will be removed
+* from `pmesh`.
+*
+* The vertices that get removed from `pmesh` are selected as follows:
+* The pair of halfedges in `hedge_pairs_to_stitch` are processed linearly.
+* Let `p` be such a pair.
+* If the target of `p.first` has not been marked for deletion,
+* then the source of `p.second` is.
+* If the target of `p.second` has not been marked for deletion,
+* then the source of `p.first` is.
+* A vertex is marked for deletion if its corresponding point has already be seen
+* with a vertex previously handled.
+*
+* \pre For each halfedge in a pair of `hedge_pairs_to_stitch`, the corresponding
+*      edge is neither degenerated nor incident to a degenerate edge.
+*
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+*        that has a property map for `boost::vertex_point_t`
+* @tparam HalfedgePairsRange a range of
+*         `std::pair<boost::graph_traits<PolygonMesh>::%halfedge_descriptor,
+*         boost::graph_traits<PolygonMesh>::%halfedge_descriptor>`,
+*         model of `Range`.
+*         Its iterator type is `InputIterator`.
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param pmesh the polygon mesh to be modified by stitching
+* @param hedge_pairs_to_stitch a range of `std::pair` of halfedges to be stitched together
+* @param np optional \ref namedparameters described below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+* \cgalNamedParamsEnd
+*/
+template <typename PolygonMesh,
+          typename HalfedgePairsRange,
+          typename NamedParameters>
+void stitch_borders(PolygonMesh& pmesh,
+                    const HalfedgePairsRange& hedge_pairs_to_stitch,
+                    const NamedParameters& np)
+{
+  using boost::choose_param;
+  using boost::get_param;
+
+  typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type VPMap;
+  VPMap vpm = choose_const_pmap(get_param(np, boost::vertex_point),
+                                pmesh,
+                                boost::vertex_point);
+
+  internal::Naive_border_stitching_modifier<PolygonMesh, VPMap, HalfedgePairsRange>
+    modifier(hedge_pairs_to_stitch, vpm);
+
+  modifier(pmesh);
+}
+
+///\cond SKIP_IN_MANUAL
+template <typename PolygonMesh, typename HalfedgePairsRange>
+void stitch_borders(PolygonMesh& pmesh,
+                    const HalfedgePairsRange& hedge_pairs_to_stitch)
+{
+  stitch_borders(pmesh, hedge_pairs_to_stitch,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+///\endcond
+
+/// \ingroup PMP_repairing_grp
+/// Same as the other overload but the pairs of halfedges to be stitched
+/// are automatically found amongst all border halfedges.
+/// Two border halfedges `h1` and `h2` are set to be stitched
+/// if the points associated to the source and target vertices of `h1` are
+/// the same as those of the target and source vertices of `h2` respectively.
+///
+/// \pre `pmesh` does not contains any degenerate border edge.
+///
+/// @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+///        that has a property map for `boost::vertex_point_t`
+/// @tparam NamedParameters a sequence of \ref namedparameters
+///
+/// @param pmesh the polygon mesh to be modified by stitching
+/// @param np optional sequence of \ref namedparameters among the ones listed below
+///
+/// \cgalNamedParamsBegin
+///    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+/// \cgalNamedParamsEnd
+///
+template <typename PolygonMesh, class CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+void stitch_borders(PolygonMesh& pmesh, const CGAL_PMP_NP_CLASS& np)
+{
+  using boost::choose_param;
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor
+    halfedge_descriptor;
+  std::vector< std::pair<halfedge_descriptor, halfedge_descriptor> > hedge_pairs_to_stitch;
+
+  typedef typename GetVertexPointMap<PolygonMesh, CGAL_PMP_NP_CLASS>::const_type VPMap;
+  VPMap vpm = choose_const_pmap(get_param(np, boost::vertex_point),
+                                pmesh,
+                                boost::vertex_point);
+
+  internal::detect_duplicated_boundary_edges(pmesh,
+    std::back_inserter(hedge_pairs_to_stitch),
+    internal::Less_for_halfedge<PolygonMesh, VPMap>(pmesh, vpm), vpm);
+
+  stitch_borders(pmesh, hedge_pairs_to_stitch, np);
+}
+
+
+///\cond SKIP_IN_MANUAL
+template <typename PolygonMesh>
+void stitch_borders(PolygonMesh& pmesh)
+{
+  stitch_borders(pmesh,
+    CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+///\endcond
+
+} //end of namespace Polygon_mesh_processing
+
+} //end of namespace CGAL
+
+
+#endif //CGAL_STITCH_POLYGON_MESH_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_faces.h
new file mode 100644
index 0000000..91bde2f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_faces.h
@@ -0,0 +1,381 @@
+// Copyright (c) 2010-2011  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H
+#define CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H
+
+#include <CGAL/HalfedgeDS_decorator.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <boost/range/size.hpp>
+#include <boost/foreach.hpp>
+
+#include <queue>
+#include <vector>
+#include <utility>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+namespace internal {
+
+template <class PM
+          , typename VertexPointMap
+          , typename Kernel>
+class Triangulate_modifier
+{
+  typedef Kernel Traits;
+
+  typedef typename boost::graph_traits<PM>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<PM>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<PM>::face_descriptor face_descriptor;
+  typedef typename boost::graph_traits<PM>::edge_descriptor edge_descriptor;
+  typedef typename Kernel::Point_3 Point;
+
+  typedef CGAL::Triangulation_2_filtered_projection_traits_3<Traits>   P_traits;
+
+  typedef CGAL::Triangulation_vertex_base_with_info_2<halfedge_descriptor,
+                                                      P_traits>        Vb;
+
+  struct Face_info {
+    typename boost::graph_traits<PM>::halfedge_descriptor e[3];
+    bool is_external;
+  };
+
+  typedef CGAL::Triangulation_face_base_with_info_2<Face_info,
+                                                    P_traits>          Fb1;
+  typedef CGAL::Constrained_triangulation_face_base_2<P_traits, Fb1>   Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb>                  TDS;
+  typedef CGAL::No_intersection_tag                                    Itag;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<P_traits,
+                                                     TDS,
+                                                     Itag>             CDTbase;
+  typedef CGAL::Constrained_triangulation_plus_2<CDTbase>              CDT;
+
+  VertexPointMap _vpmap;
+
+public:
+  Triangulate_modifier(VertexPointMap vpmap)
+    : _vpmap(vpmap)
+  {
+  }
+
+  bool is_external(typename CDT::Face_handle fh) const {
+    return fh->info().is_external;
+  }
+
+  void triangulate_face(face_descriptor f, PM& pmesh)
+  {
+    typename Traits::Vector_3 normal =
+      Polygon_mesh_processing::compute_face_normal(f, pmesh);
+
+    P_traits cdt_traits(normal);
+    CDT cdt(cdt_traits);
+
+    // Halfedge_around_facet_circulator
+    typedef typename CDT::Vertex_handle Tr_Vertex_handle;
+    halfedge_descriptor start = halfedge(f, pmesh);
+    halfedge_descriptor h = start;
+    Tr_Vertex_handle previous, first;
+    do
+    {
+      Tr_Vertex_handle vh = cdt.insert(_vpmap[target(h, pmesh)]);
+      if (first == Tr_Vertex_handle()) {
+        first = vh;
+      }
+      vh->info() = h;
+      if(previous != Tr_Vertex_handle() && previous != vh) {
+        cdt.insert_constraint(previous, vh);
+      }
+      previous = vh;
+      h = next(h, pmesh);
+
+    } while( h != start );
+    cdt.insert_constraint(previous, first);
+
+    // sets mark is_external
+    for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(),
+          end = cdt.all_faces_end();
+        fit != end; ++fit)
+    {
+      fit->info().is_external = false;
+    }
+    std::queue<typename CDT::Face_handle> face_queue;
+    face_queue.push(cdt.infinite_vertex()->face());
+    while(! face_queue.empty() )
+    {
+      typename CDT::Face_handle fh = face_queue.front();
+      face_queue.pop();
+
+      if(fh->info().is_external)
+        continue;
+
+      fh->info().is_external = true;
+      for(int i = 0; i <3; ++i)
+      {
+        if(!cdt.is_constrained(typename CDT::Edge(fh, i)))
+        {
+          face_queue.push(fh->neighbor(i));
+        }
+      }
+    }
+
+    // then modify the polyhedron
+    // make_hole. (see comment in function body)
+    this->make_hole(halfedge(f, pmesh), pmesh);
+
+    for(typename CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(),
+          end = cdt.finite_edges_end();
+        eit != end; ++eit)
+    {
+      typename CDT::Face_handle fh = eit->first;
+      const int index = eit->second;
+      typename CDT::Face_handle opposite_fh = fh->neighbor(eit->second);
+      const int opposite_index = opposite_fh->index(fh);
+
+      const Tr_Vertex_handle va = fh->vertex(cdt. cw(index));
+      const Tr_Vertex_handle vb = fh->vertex(cdt.ccw(index));
+
+      if( ! (is_external(fh) && is_external(opposite_fh))//not both fh are external
+          && ! cdt.is_constrained(*eit) )                  //and edge is not constrained
+      {
+        // strictly internal edge
+        halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh),
+          hnewopp = opposite(hnew, pmesh);
+
+        fh->info().e[index] = hnew;
+        opposite_fh->info().e[opposite_index] = hnewopp;
+
+        set_target(hnew,    target(va->info(), pmesh), pmesh);
+        set_target(hnewopp, target(vb->info(), pmesh), pmesh);
+      }
+      if( cdt.is_constrained(*eit) ) //edge is constrained
+      {
+        if(!is_external(fh)) {
+          fh->info().e[index] = va->info();
+        }
+        if(!is_external(opposite_fh)) {
+          opposite_fh->info().e[opposite_index] = vb->info();
+        }
+      }
+    }
+    for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(),
+          end = cdt.finite_faces_end();
+        fit != end; ++fit)
+    {
+      if(!is_external(fit))
+      {
+        halfedge_descriptor h0 = fit->info().e[0];
+        halfedge_descriptor h1 = fit->info().e[1];
+        halfedge_descriptor h2 = fit->info().e[2];
+        CGAL_assertion(h0 != halfedge_descriptor());
+        CGAL_assertion(h1 != halfedge_descriptor());
+        CGAL_assertion(h2 != halfedge_descriptor());
+
+        set_next(h0, h1, pmesh);
+        set_next(h1, h2, pmesh);
+        set_next(h2, h0, pmesh);
+
+        Euler::fill_hole(h0, pmesh);
+      }
+    }
+  }
+
+  template<typename FaceRange>
+  void operator()(FaceRange face_range, PM& pmesh)
+  {
+    // One need to store facet handles into a vector, because the list of
+    // facets of the polyhedron will be modified during the loop, and
+    // that invalidates the range [facets_begin(), facets_end()[.
+    std::vector<face_descriptor> facets;
+    facets.reserve(std::distance(boost::begin(face_range), boost::end(face_range)));
+
+    //only consider non-triangular faces
+    BOOST_FOREACH(face_descriptor fit, face_range)
+      if ( next( next( halfedge(fit, pmesh), pmesh), pmesh)
+        !=       prev( halfedge(fit, pmesh), pmesh) )
+        facets.push_back(fit);
+
+    // Iterates on the vector of face descriptors
+    BOOST_FOREACH(face_descriptor f, facets)
+    {
+      this->triangulate_face(f, pmesh);
+    }
+  }
+
+  void make_hole(halfedge_descriptor h, PM& pmesh)
+  {
+    //we are not using Euler::make_hole because it has a precondition
+    //that the hole is not made on the boundary of the mesh
+    //here we allow making a hole on the boundary, and the pair(s) of
+    //halfedges that become border-border are fixed by the connectivity
+    //setting made in operator()
+    CGAL_assertion(!is_border(h, pmesh));
+    face_descriptor fd = face(h, pmesh);
+
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h, pmesh))
+    {
+      CGAL::internal::set_border(hd, pmesh);
+    }
+    remove_face(fd, pmesh);
+  }
+
+
+}; // end class Triangulate_modifier
+
+}//end namespace internal
+
+/**
+* \ingroup PMP_meshing_grp
+* triangulates a single face of a polygon mesh. This function depends on the package \ref PkgTriangulation2Summary
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+*         that has an internal property map for `boost::vertex_point_t`
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param f face to be triangulated
+* @param pmesh the polygon mesh to which the face to be triangulated belongs
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template<typename PolygonMesh, typename NamedParameters>
+void triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor f,
+                      PolygonMesh& pmesh,
+                      const NamedParameters& np)
+{
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  //VertexPointMap
+  typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::type VPMap;
+  VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                            pmesh,
+                            boost::vertex_point);
+  //Kernel
+  typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Kernel;
+
+  internal::Triangulate_modifier<PolygonMesh, VPMap, Kernel> modifier(vpmap);
+  modifier.triangulate_face(f, pmesh);
+}
+
+template<typename PolygonMesh>
+void triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor f,
+                      PolygonMesh& pmesh)
+{
+  triangulate_face(f, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/**
+* \ingroup PMP_meshing_grp
+* triangulates given faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2Summary
+*
+* @tparam FaceRange range of `boost::graph_traits<PolygonMesh>::%face_descriptor`,
+          model of `Range`.
+          Its iterator type is `InputIterator`.
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+*         that has an internal property map for `boost::vertex_point_t`
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param face_range the range of faces to be triangulated
+* @param pmesh the polygon mesh to be triangulated
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename FaceRange, typename PolygonMesh, typename NamedParameters>
+void triangulate_faces(FaceRange face_range,
+                       PolygonMesh& pmesh,
+                       const NamedParameters& np)
+{
+  using boost::choose_const_pmap;
+  using boost::get_param;
+
+  //VertexPointMap
+  typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::type VPMap;
+  VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point),
+                            pmesh,
+                            boost::vertex_point);
+  //Kernel
+  typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Kernel;
+
+  internal::Triangulate_modifier<PolygonMesh, VPMap, Kernel> modifier(vpmap);
+  modifier(face_range, pmesh);
+}
+
+template <typename FaceRange, typename PolygonMesh>
+void triangulate_faces(FaceRange face_range, PolygonMesh& pmesh)
+{
+  triangulate_faces(face_range, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+/**
+* \ingroup PMP_meshing_grp
+* triangulates all faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2Summary
+* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
+*         that has an internal property map for `boost::vertex_point_t`
+* @tparam NamedParameters a sequence of \ref namedparameters
+*
+* @param pmesh the polygon mesh to be triangulated
+* @param np optional sequence of \ref namedparameters among the ones listed below
+*
+* \cgalNamedParamsBegin
+*    \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+*    \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+* \cgalNamedParamsEnd
+*
+*/
+template <typename PolygonMesh, typename NamedParameters>
+void triangulate_faces(PolygonMesh& pmesh,
+                       const NamedParameters& np)
+{
+  triangulate_faces(faces(pmesh), pmesh, np);
+}
+
+template <typename PolygonMesh>
+void triangulate_faces(PolygonMesh& pmesh)
+{
+  triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
+}
+
+} // end namespace Polygon_mesh_processing
+
+} // end namespace CGAL
+
+#endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_hole.h
new file mode 100644
index 0000000..6eec6bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_processing/triangulate_hole.h
@@ -0,0 +1,406 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ilker O. Yaz
+
+#ifndef CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_HOLE_H
+#define CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_HOLE_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h>
+#include <CGAL/Polygon_mesh_processing/refine.h>
+#include <CGAL/Polygon_mesh_processing/fair.h>
+
+#include <CGAL/Polygon_mesh_processing/internal/named_function_params.h>
+#include <CGAL/Polygon_mesh_processing/internal/named_params_helper.h>
+
+#include <CGAL/boost/graph/helpers.h>
+
+#include <boost/tuple/tuple.hpp>
+
+#include <vector>
+
+namespace CGAL {
+
+namespace Polygon_mesh_processing {
+
+  /*!
+  \ingroup hole_filling_grp
+  triangulates a hole in a polygon mesh.
+  The hole must not contain any non-manifold vertex.
+  The patch generated does not introduce non-manifold edges nor degenerate triangles.
+  If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`.
+
+  @tparam PolygonMesh a model of `MutableFaceGraph`
+          that has an internal property map for `CGAL::vertex_point_t`
+  @tparam OutputIterator a model of `OutputIterator`
+    holding `boost::graph_traits<PolygonMesh>::%face_descriptor` for patch faces.
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param pmesh polygon mesh containing the hole
+  @param border_halfedge a border halfedge incident to the hole
+  @param out iterator over patch faces
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+     \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+     \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space \cgalParamEnd
+     \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  \cgalNamedParamsEnd
+
+  @return `out`
+
+  \todo handle islands
+  @todo Replace border_halfedge by a range of border halfedges.
+        The first one would describe the hole,
+        the other ones would describe the islands.
+  @todo Then, insert the holes vertices in the set of possibilities
+        for connecting vertices together
+  @todo handle the case where an island is reduced to a point
+  */  
+  template<typename PolygonMesh,
+           typename OutputIterator,
+           typename NamedParameters>
+  OutputIterator
+  triangulate_hole(PolygonMesh& pmesh,
+              typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+              OutputIterator out,
+              const NamedParameters& np)
+  {
+    using boost::choose_param;
+    using boost::get_param;
+
+    bool use_dt3 =
+#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3
+      false;
+#else
+      choose_param(get_param(np, use_delaunay_triangulation), true);
+#endif
+
+    CGAL_precondition(face(border_halfedge, pmesh) == boost::graph_traits<PolygonMesh>::null_face());
+
+    return internal::triangulate_hole_polygon_mesh(pmesh,
+      border_halfedge,
+      out,
+      choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, pmesh)),
+      use_dt3,
+      choose_param(get_param(np, geom_traits), typename GetGeomTraits<PolygonMesh,NamedParameters>::type()))
+      .first;
+  }
+
+  template<typename PolygonMesh, typename OutputIterator>
+  OutputIterator
+    triangulate_hole(PolygonMesh& pmesh,
+      typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+      OutputIterator out)
+  {
+    return triangulate_hole(pmesh, border_halfedge, out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  template<typename PM, typename VertexRange>
+  void test_in_edges(const PM& pmesh, const VertexRange& patch)
+  {
+    BOOST_FOREACH(typename boost::graph_traits<PM>::vertex_descriptor v0, patch)
+    {
+      typename boost::graph_traits<PM>::in_edge_iterator e, e_end;
+      for (boost::tie(e, e_end) = in_edges(v0, pmesh); e != e_end; e++)
+      {
+        typename boost::graph_traits<PM>::halfedge_descriptor he = halfedge(*e, pmesh);
+        if (is_border(he, pmesh)) { continue; }
+
+        CGAL_assertion(v0 == target(he, pmesh) || v0 == source(he, pmesh));
+      }
+    }
+  }
+
+  /*!
+  \ingroup  hole_filling_grp
+  @brief triangulates and refines a hole in a polygon mesh.
+
+  @tparam PolygonMesh must be model of `MutableFaceGraph`
+          that has an internal property map for `CGAL::vertex_point_t`
+  @tparam FacetOutputIterator model of `OutputIterator`
+     holding `boost::graph_traits<PolygonMesh>::%face_descriptor` for patch faces.
+  @tparam VertexOutputIterator model of `OutputIterator`
+     holding `boost::graph_traits<PolygonMesh>::%vertex_descriptor` for patch vertices.
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param pmesh polygon mesh which has the hole
+  @param border_halfedge a border halfedge incident to the hole
+  @param face_out output iterator over patch faces
+  @param vertex_out output iterator over patch vertices without including the boundary
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+     \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+     \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()` \cgalParamEnd
+     \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space \cgalParamEnd
+     \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  \cgalNamedParamsEnd
+
+  @return pair of `face_out` and `vertex_out`
+
+  \sa CGAL::Polygon_mesh_processing::triangulate_hole()
+  \sa CGAL::Polygon_mesh_processing::refine()
+
+  \todo handle islands
+  */
+  template<typename PolygonMesh,
+           typename FaceOutputIterator,
+           typename VertexOutputIterator,
+           typename NamedParameters>
+  std::pair<FaceOutputIterator, VertexOutputIterator>
+    triangulate_and_refine_hole(PolygonMesh& pmesh,
+      typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+      FaceOutputIterator face_out,
+      VertexOutputIterator vertex_out,
+      const NamedParameters& np)
+  {
+    std::vector<typename boost::graph_traits<PolygonMesh>::face_descriptor> patch;
+    triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np);
+    face_out = std::copy(patch.begin(), patch.end(), face_out);
+
+    test_in_edges(pmesh, vertices(pmesh));
+
+    return refine(pmesh, patch, face_out, vertex_out, np);
+  }
+
+  template<typename PolygonMesh,
+           typename FaceOutputIterator,
+           typename VertexOutputIterator>
+  std::pair<FaceOutputIterator, VertexOutputIterator>
+    triangulate_and_refine_hole(PolygonMesh& pmesh,
+       typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+       FaceOutputIterator face_out,
+       VertexOutputIterator vertex_out)
+  {
+    return triangulate_and_refine_hole(pmesh, border_halfedge,
+      face_out, vertex_out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  /*!
+  \ingroup  hole_filling_grp
+  @brief triangulates, refines and fairs a hole in a polygon mesh.
+
+  @tparam PolygonMesh a model of `MutableFaceGraph`
+          that has an internal property map for `CGAL::vertex_point_t`
+  @tparam FaceOutputIterator model of `OutputIterator`
+      holding `boost::graph_traits<PolygonMesh>::%face_descriptor` for patch faces
+  @tparam VertexOutputIterator model of `OutputIterator`
+      holding `boost::graph_traits<PolygonMesh>::%vertex_descriptor` for patch vertices
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param pmesh polygon mesh which has the hole
+  @param border_halfedge a border halfedge incident to the hole
+  @param face_out output iterator over patch faces
+  @param vertex_out output iterator over patch vertices without including the boundary
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+     \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh` \cgalParamEnd
+     \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space \cgalParamEnd
+     \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()` \cgalParamEnd
+     \cgalParamBegin{fairing_continuity} tangential continuity of the output surface patch \cgalParamEnd
+     \cgalParamBegin{sparse_linear_solver} an instance of the sparse linear solver used for fairing \cgalParamEnd
+     \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  \cgalNamedParamsEnd
+
+  @return tuple of
+  - `bool`: `true` if fairing is successful
+  - `face_out`
+  - `vertex_out`
+
+  \sa CGAL::Polygon_mesh_processing::triangulate_hole()
+  \sa CGAL::Polygon_mesh_processing::refine()
+  \sa CGAL::Polygon_mesh_processing::fair()
+
+  \todo handle islands
+  */
+  template<typename PolygonMesh,
+           typename FaceOutputIterator,
+           typename VertexOutputIterator,
+           typename NamedParameters>
+  CGAL::cpp11::tuple<bool, FaceOutputIterator, VertexOutputIterator>
+  triangulate_refine_and_fair_hole(PolygonMesh& pmesh,
+    typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+    FaceOutputIterator face_out,
+    VertexOutputIterator vertex_out,
+    const NamedParameters& np)
+  {
+    std::vector<typename boost::graph_traits<PolygonMesh>::vertex_descriptor> patch;
+
+    CGAL_assertion(CGAL::is_triangle_mesh(pmesh));
+
+    face_out = triangulate_and_refine_hole
+      (pmesh, border_halfedge, face_out, std::back_inserter(patch), np).first;
+
+    CGAL_assertion(CGAL::is_triangle_mesh(pmesh));
+
+    test_in_edges(pmesh, patch);
+
+    bool fair_success = fair(pmesh, patch, np);
+
+    vertex_out = std::copy(patch.begin(), patch.end(), vertex_out);
+    return CGAL::cpp11::make_tuple(fair_success, face_out, vertex_out);
+  }
+
+  template<typename PolygonMesh,
+           typename FaceOutputIterator,
+           typename VertexOutputIterator>
+  CGAL::cpp11::tuple<bool, FaceOutputIterator, VertexOutputIterator>
+  triangulate_refine_and_fair_hole(PolygonMesh& pmesh,
+        typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
+        FaceOutputIterator face_out,
+        VertexOutputIterator vertex_out)
+  {
+    return triangulate_refine_and_fair_hole(pmesh, border_halfedge,
+      face_out, vertex_out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  /*!
+  \ingroup  hole_filling_grp
+  creates triangles to fill the hole defined by points in the range `points`.
+  Triangles are recorded into `out` using the indices of the input points in the range `points`.
+  Note that no degenerate triangles will be produced.
+  If no triangulation can be found, then nothing is recorded in `out`.
+
+  If faces incident to the polyline outside the hole are known,
+  it is recommended to use this function.
+  The point range `third_points` indicates for each pair of consecutive points in the range `points`,
+  the third point of the face this segment is incident to. It influences the choice
+  of the best triangulation while avoiding overfolding.
+
+  Note that the ranges `points` and `third_points` may or may not contain duplicated first point at the end of sequence.
+
+  @pre `third_points.size() == points.size()`
+
+  @tparam PointRange range of points, model of `Range`.
+    Its iterator type is `InputIterator`.
+  @tparam OutputIterator model of `OutputIterator`, to collect patch faces.
+     A specialization for `CGAL::value_type_traits<OutputIterator>` must be available,
+     and the corresponding value type `type` must have
+     a constructor `type(int p0, int p1, int p2)` available.
+     The indices correspond to the ones of input points in `points`.
+  @tparam NamedParameters a sequence of \ref namedparameters
+
+  @param points the range of input points
+  @param third_points the range of third points
+  @param out iterator over output patch triangles, described by indices of points
+             in `points`
+  @param np optional sequence of \ref namedparameters among the ones listed below
+
+  \cgalNamedParamsBegin
+     \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space \cgalParamEnd
+     \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd
+  \cgalNamedParamsEnd
+
+  \todo handle islands
+  */
+  template <typename PointRange1,
+            typename PointRange2,
+            typename OutputIterator,
+            typename NamedParameters>
+  OutputIterator
+  triangulate_hole_polyline(const PointRange1& points,
+                            const PointRange2& third_points,
+                            OutputIterator out,
+                            const NamedParameters& np)
+  {
+    using boost::choose_param;
+    using boost::get_param;
+
+    bool use_dt3 =
+#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3
+      false;
+#else
+      choose_param(get_param(np, use_delaunay_triangulation), true);
+#endif
+
+    typedef CGAL::internal::Weight_min_max_dihedral_and_area      Weight;
+    typedef CGAL::internal::Weight_calculator<Weight,
+                  CGAL::internal::Is_not_degenerate_triangle>  WC;
+    typedef std::vector<std::pair<int, int> > Holes;
+    typedef std::back_insert_iterator<Holes>  Holes_out;
+
+    Holes holes;//just to check there is no holes left
+
+    typedef typename value_type_traits<OutputIterator>::type OutputIteratorValueType;
+    CGAL::internal::Tracer_polyline_incomplete<OutputIteratorValueType, OutputIterator, Holes_out>
+      tracer(out, Holes_out(holes));
+    
+    typedef typename PointRange1::iterator InIterator;
+    typedef typename std::iterator_traits<InIterator>::value_type Point;
+
+    triangulate_hole_polyline(points, third_points, tracer, WC(),
+      use_dt3,
+      choose_param(get_param(np, CGAL::geom_traits),
+        typename CGAL::Kernel_traits<Point>::Kernel()));
+
+    CGAL_assertion(holes.empty());
+    return tracer.out;
+  }
+
+  template <typename PointRange1,
+            typename PointRange2,
+            typename OutputIterator>
+  OutputIterator
+  triangulate_hole_polyline(const PointRange1& points,
+                            const PointRange2& third_points,
+                            OutputIterator out)
+  {
+    return triangulate_hole_polyline(points, third_points, out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+  /*!
+  \ingroup  hole_filling_grp
+  same as above but the range of third points is omitted. They are not
+  taken into account in the cost computation that leads the hole filling. 
+*/
+  template <typename PointRange,
+            typename OutputIterator,
+            typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
+  OutputIterator
+  triangulate_hole_polyline(const PointRange& points,
+                            OutputIterator out,
+                            const CGAL_PMP_NP_CLASS& np)
+  {
+    typedef typename std::iterator_traits<
+      typename PointRange::iterator>::value_type Point;
+    std::vector< Point > third_points;
+    return triangulate_hole_polyline(points, third_points, out, np);
+  }
+
+  template <typename PointRange,
+            typename OutputIterator>
+  OutputIterator
+  triangulate_hole_polyline(const PointRange& points,
+                            OutputIterator out)
+  {
+    return triangulate_hole_polyline(points, out,
+      CGAL::Polygon_mesh_processing::parameters::all_default());
+  }
+
+} //end namespace Polygon_mesh_processing
+
+} //end namespace CGAL
+
+#endif //CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_HOLE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_slicer.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_slicer.h
new file mode 100644
index 0000000..6e49aec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_mesh_slicer.h
@@ -0,0 +1,545 @@
+// Copyright (c) 2013,2014,2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Ilker O. Yaz and Sebastien Loriot
+
+#ifndef CGAL_POLYGON_MESH_SLICER_H
+#define CGAL_POLYGON_MESH_SLICER_H
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
+#include <CGAL/tuple.h>
+
+#include <vector>
+#include <set>
+
+#include <boost/foreach.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h>
+#include <CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h>
+
+#include <boost/variant.hpp>
+
+#include <CGAL/boost/graph/split_graph_into_polylines.h>
+
+namespace CGAL {
+
+/// \ingroup PkgPolygonMeshProcessing
+/// Function object that computes the intersection of a plane with
+/// a triangulated surface mesh.
+///
+/// \tparam TriangleMesh a triangulated surface mesh, model of `FaceGraph` and `HalfedgeListGraph`
+/// \tparam Traits a model of `AABBGeomTraits`
+/// \tparam VertexPointMap a model of `ReadablePropertyMap` with
+///         `boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key and
+///         `Traits::Point_3` as value type.
+///         The default is `typename boost::property_map< TriangleMesh, vertex_point_t>::%type`.
+/// \tparam AABBTree must be an instantiation of `CGAL::AABB_tree` able to handle
+///         the edges of `TriangleMesh`, having its `edge_descriptor` as primitive id.
+///         The default is `CGAL::AABB_tree<CGAL::AABB_traits<
+///                  Traits, CGAL::AABB_halfedge_graph_segment_primitive<TriangleMesh> > >`
+/// \tparam UseParallelPlaneOptimization if `true`, the code will use specific
+///         predicates and constructions in case the functor is called with a plane
+///         orthogonal to a frame axis, the non-null coefficient being 1 or -1.
+///         The default is `true`.
+///
+/// The implemenation of this class depends on the package \ref PkgAABB_treeSummary.
+/// \todo Shall we document more in details what is required?
+///       `Traits` must provide:
+///        - `Plane_3`
+///        - `Point_3`
+///        - `Segment_3`
+///        - `Oriented_side_3` with `Oriented_side operator()(Plane_3, Point_3)`
+///        - `Do_intersect_3` with `boost::optional<variant<Point_3,Segment_3> operator()(Plane_3,Segment_3)`
+///        - `Do_intersect_3` with `bool operator()(Plane_3, Bbox_3)`
+///
+/// \todo If we keep the traits for plane orthogonal to a frame axis, `Traits` must also provide:
+///       - `FT`
+///       - `Construct_cartesian_const_iterator_3` with `Iterator operator()(Point_3)` `Iterator` being a random access iterator with `FT` as value type
+///       - `Construct_point_3` with `Point_3 operator()(FT,FT,FT)`; `Construct_source_3` with  `const Point_3& operator()(Segment_3)`
+///       - `Construct_target_3` with `const Point_3& operator()(Segment_3)`
+///
+/// \todo `_object()` functions must also be provided
+template<class TriangleMesh,
+  class Traits,
+  class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type,
+  class AABBTree = AABB_tree<
+                       AABB_traits<Traits,
+                         AABB_halfedge_graph_segment_primitive<TriangleMesh> > >,
+  bool UseParallelPlaneOptimization=true>
+class Polygon_mesh_slicer
+{
+/// Polygon_mesh typedefs
+  typedef typename boost::graph_traits<TriangleMesh>               graph_traits;
+  typedef typename graph_traits::vertex_descriptor            vertex_descriptor;
+  typedef typename graph_traits::edge_descriptor                edge_descriptor;
+  typedef typename graph_traits::halfedge_descriptor        halfedge_descriptor;
+  typedef typename graph_traits::face_descriptor                face_descriptor;
+
+/// Geometric typedefs
+  typedef typename Traits::Plane_3                                      Plane_3;
+  typedef typename Traits::Segment_3                                  Segment_3;
+  typedef typename Traits::Point_3                                      Point_3;
+  typedef typename Traits::FT                                                FT;
+
+/// typedefs for internal graph to get connectivity of the polylines
+  typedef boost::variant<vertex_descriptor, edge_descriptor>     AL_vertex_info;
+  typedef boost::adjacency_list <
+                              boost::vecS,
+                              boost::vecS,
+                              boost::undirectedS,
+                              AL_vertex_info >                         AL_graph;
+  typedef typename AL_graph::vertex_descriptor             AL_vertex_descriptor;
+  typedef std::pair<AL_vertex_descriptor, AL_vertex_descriptor>  AL_vertex_pair;
+  typedef std::map<vertex_descriptor, AL_vertex_descriptor>        Vertices_map;
+  typedef std::pair<const vertex_descriptor,AL_vertex_descriptor>   Vertex_pair;
+/// Traversal traits
+  typedef Polygon_mesh_slicer_::Traversal_traits<
+    AL_graph,
+    TriangleMesh,
+    VertexPointMap,
+    typename AABBTree::AABB_traits,
+    Traits >                                           General_traversal_traits;
+
+  typedef Polygon_mesh_slicer_::Traversal_traits<
+    AL_graph,
+    TriangleMesh,
+    VertexPointMap,
+    typename AABBTree::AABB_traits,
+    Polygon_mesh_slicer_::Axis_parallel_plane_traits<Traits>
+  >                                              Axis_parallel_traversal_traits;
+/// Auxiliary classes
+  // compare the faces using the halfedge descriptors
+  struct Compare_face{
+    TriangleMesh& m_tmesh;
+    Compare_face(TriangleMesh& tmesh)
+      :m_tmesh(tmesh)
+    {}
+
+    bool operator()(halfedge_descriptor hd1, halfedge_descriptor hd2) const
+    {
+      return face(hd1,m_tmesh) < face(hd2,m_tmesh);
+    }
+  };
+
+  typedef std::map< halfedge_descriptor, AL_vertex_pair, Compare_face > AL_edge_map;
+
+  template <class OutputIterator, class Traits_>
+  struct Polyline_visitor{
+    AL_graph& al_graph;
+    TriangleMesh& m_tmesh;
+    const Plane_3& m_plane;
+    VertexPointMap m_vpmap;
+    typename Traits_::Intersect_3 intersect_3;
+    OutputIterator out;
+
+    Polyline_visitor( TriangleMesh& tmesh,
+                      AL_graph& al_graph,
+                      const Plane_3& plane,
+                      VertexPointMap vpmap,
+                      const Traits_& traits,
+                      OutputIterator out)
+      : al_graph(al_graph)
+      , m_tmesh(tmesh)
+      , m_plane(plane)
+      , m_vpmap(vpmap)
+      , intersect_3( traits.intersect_3_object() )
+      , out(out)
+    {}
+
+    std::vector< Point_3 > current_poly;
+    void start_new_polyline()
+    {
+      current_poly.clear();
+    }
+    void add_node(AL_vertex_descriptor node_id)
+    {
+      AL_vertex_info v = al_graph[node_id];
+      if (const vertex_descriptor* vd_ptr = boost::get<vertex_descriptor>(&v) )
+      {
+        current_poly.push_back( get(m_vpmap, *vd_ptr) );
+      }
+      else
+      {
+        edge_descriptor ed = boost::get<edge_descriptor>(v);
+        Segment_3 s(
+          get(m_vpmap, source(ed, m_tmesh)),
+          get(m_vpmap,target(ed, m_tmesh))
+        );
+        typename cpp11::result_of<typename Traits_::Intersect_3(Plane_3, Segment_3)>::type
+          inter = intersect_3(m_plane, s);
+        CGAL_assertion(inter != boost::none);
+        const Point_3* pt_ptr = boost::get<Point_3>(&(*inter));
+        current_poly.push_back( *pt_ptr );
+      }
+    }
+
+    void end_polyline()
+    {
+      CGAL_assertion(!current_poly.empty());
+      *out++=current_poly;
+    }
+  };
+
+/// member variables
+  const AABBTree* m_tree_ptr;
+  TriangleMesh& m_tmesh;
+  VertexPointMap m_vpmap;
+  Traits m_traits;
+  bool m_own_tree;
+
+/// Convenience graph functions
+  edge_descriptor next_edge(edge_descriptor ed) const
+  {
+    return edge( next( halfedge(ed, m_tmesh), m_tmesh), m_tmesh );
+  }
+
+  edge_descriptor next_of_opposite_edge(edge_descriptor ed) const
+  {
+    return edge( next( opposite( halfedge(ed, m_tmesh), m_tmesh), m_tmesh), m_tmesh );
+  }
+
+  face_descriptor opposite_face(edge_descriptor ed) const
+  {
+    return face( opposite( halfedge(ed, m_tmesh), m_tmesh), m_tmesh);
+  }
+/// Other private functions
+  /// handle edge insertion in the adjacency_list graph
+  /// we add an edge betweem two edge_descriptor if they
+  /// share a common facet
+  void update_al_graph_connectivity(
+    edge_descriptor ed,
+    AL_vertex_descriptor vd,
+    AL_edge_map& al_edge_map,
+    AL_graph& al_graph) const
+  {
+      typename AL_edge_map::iterator itm;
+      bool new_insertion;
+
+      halfedge_descriptor hd=halfedge(ed, m_tmesh);
+
+      if (face(hd, m_tmesh)!=graph_traits::null_face())
+      {
+        cpp11::tie(itm, new_insertion) =
+          al_edge_map.insert( std::pair< halfedge_descriptor, AL_vertex_pair >
+            (hd, AL_vertex_pair(vd, AL_graph::null_vertex())) );
+        if (!new_insertion)
+        {
+          CGAL_assertion(itm->second.second==AL_graph::null_vertex());
+          itm->second.second=vd;
+          add_edge( itm->second.first,
+                    itm->second.second,
+                    al_graph);
+        }
+      }
+
+      hd=opposite(hd, m_tmesh);
+      if (face(hd, m_tmesh)!=graph_traits::null_face())
+      {
+        cpp11::tie(itm, new_insertion) =
+          al_edge_map.insert( std::pair< halfedge_descriptor, AL_vertex_pair >
+            (hd, AL_vertex_pair(vd, AL_graph::null_vertex())) );
+        if (!new_insertion)
+        {
+          CGAL_assertion(itm->second.second==AL_graph::null_vertex());
+          itm->second.second=vd;
+          add_edge( itm->second.first,
+                    itm->second.second,
+                    al_graph);
+        }
+      }
+  }
+
+  std::pair<int, FT>
+  axis_parallel_plane_info(const Plane_3& plane) const
+  {
+    FT a = m_traits.compute_a_3_object()(plane);
+    FT b = m_traits.compute_b_3_object()(plane);
+    FT c = m_traits.compute_c_3_object()(plane);
+    FT d = m_traits.compute_d_3_object()(plane);
+
+    if (a==0)
+    {
+      if (b==0)
+      {
+        if (c==1 || c==-1)
+          return std::pair<int,FT>(2, -d*c); /// z=-d
+      }
+      else
+      {
+        if (c==0 && (b==1 || b==-1))
+          return std::pair<int,FT>(1, -d*b); /// y=-d
+      }
+    }
+    else
+      if (b==0 && c==0 && ( a==1 || a==-1))
+        return std::pair<int,FT>(0, -d*a); /// x=-d
+    return std::pair<int,FT>(-1, 0);
+  }
+
+public:
+
+  /**
+  * Constructor using `edges(tmesh)` to initialize the
+  * internal `AABB_tree`.
+  * @param tmesh the triangulated surface mesh to be sliced.
+  *              It must be valid and non modified as long
+  *              as the functor is used.
+  * @param vpmap an instance of the vertex point property map associated to `tmesh`
+  * @param traits a traits class instance, can be omitted
+  */
+  Polygon_mesh_slicer(const TriangleMesh& tmesh,
+                      VertexPointMap vpmap,
+                      const Traits& traits = Traits())
+  : m_tmesh(const_cast<TriangleMesh&>(tmesh))
+  , m_vpmap(vpmap)
+  , m_traits(traits)
+  , m_own_tree(true)
+  {
+    m_tree_ptr = new AABBTree(edges(m_tmesh).first,
+                              edges(m_tmesh).second,
+                              m_tmesh,
+                              m_vpmap);
+  }
+
+  /**
+  * Constructor using a pre-built `AABB_tree` of edges provided by the user.
+  * @param tmesh the triangulated surface mesh to be sliced.
+  *              It must be valid and non modified as long
+  *              as the functor is used.
+  * @param tree must be initialized with all the edges of `tmesh`
+  * @param vpmap an instance of the vertex point property map associated to `tmesh`
+  * @param traits a traits class instance, can be omitted
+  */
+  Polygon_mesh_slicer(const TriangleMesh& tmesh,
+                      const AABBTree& tree,
+                      VertexPointMap vpmap,
+                      const Traits& traits = Traits())
+    : m_tree_ptr(&tree)
+    , m_tmesh(const_cast<TriangleMesh&>(tmesh))
+    , m_vpmap(vpmap)
+    , m_traits(traits)
+    , m_own_tree(false)
+  { }
+
+  /**
+  * Constructor using `edges(tmesh)` to initialize the
+  * internal `AABB_tree`. The vertex point property map used
+  * is `get(CGAL::vertex_point, tmesh)`
+  * @param tmesh the triangulated surface mesh to be sliced.
+  *              It must be valid and non modified as long
+  *              as the functor is used.
+  * @param traits a traits class instance, can be omitted
+  */
+  Polygon_mesh_slicer(const TriangleMesh& tmesh,
+                      const Traits& traits = Traits())
+  : m_tmesh(const_cast<TriangleMesh&>(tmesh))
+  , m_vpmap(get(boost::vertex_point, m_tmesh))
+  , m_traits(traits)
+  , m_own_tree(true)
+  {
+    m_tree_ptr = new AABBTree(edges(m_tmesh).first,
+                              edges(m_tmesh).second,
+                              m_tmesh,
+                              m_vpmap);
+  }
+
+  /**
+  * Constructor using a `AABB_tree` provided by the user.
+  * The vertex point property map used is `get(CGAL::vertex_point, tmesh)`
+  * @param tmesh the triangulated surface mesh to be sliced.
+  *              It must be valid and non modified as long
+  *              as the functor is used.
+  * @param tree must be initialized with all the edges of `tmesh`
+  * @param traits a traits class instance, can be omitted
+  */
+  Polygon_mesh_slicer(const TriangleMesh& tmesh,
+                      const AABBTree& tree,
+                      const Traits& traits = Traits())
+    : m_tree_ptr(&tree)
+    , m_tmesh(const_cast<TriangleMesh&>(tmesh))
+    , m_vpmap(get(boost::vertex_point, m_tmesh))
+    , m_traits(traits)
+    , m_own_tree(false)
+  { }
+
+  /**
+   * Constructs the intersecting polylines of `plane` with the input triangulated surface mesh.
+   * @tparam OutputIterator an output iterator accepting polylines.
+   *              A polyline is provided as `std::vector<Traits::Point_3>`.
+   *              A polyline is closed if its first and last point are identical.
+   * @param plane the plane to intersect the triangulated surface mesh with
+   * @param out output iterator of polylines
+   */
+  template <class OutputIterator>
+  OutputIterator operator() (const Plane_3& plane,
+                             OutputIterator out) const
+  {
+    CGAL_precondition(!plane.is_degenerate());
+
+    // containers for storing edges wrt their position with the plane
+    std::set<edge_descriptor> all_coplanar_edges;
+    std::vector<edge_descriptor> iedges;
+    Vertices_map vertices;
+
+    // get all edges intersected by the plane and classify them
+
+    std::pair<int, FT> app_info = axis_parallel_plane_info(plane);
+    if (!UseParallelPlaneOptimization || app_info.first==-1)
+    {
+      General_traversal_traits ttraits(
+        all_coplanar_edges,
+        iedges,
+        vertices,
+        m_tmesh,
+        m_vpmap,
+        m_tree_ptr->traits(),
+        m_traits);
+      m_tree_ptr->traversal(plane, ttraits);
+    }
+    else
+    {
+      Polygon_mesh_slicer_::Axis_parallel_plane_traits<Traits>
+        traits(app_info.first, app_info.second, m_traits);
+
+      Axis_parallel_traversal_traits ttraits(
+        all_coplanar_edges,
+        iedges,
+        vertices,
+        m_tmesh,
+        m_vpmap,
+        m_tree_ptr->traits(),
+        traits);
+      m_tree_ptr->traversal(plane, ttraits);
+    }
+
+    // init output graph
+    AL_graph al_graph;
+
+    // add nodes for each vertex in the plane
+    BOOST_FOREACH(Vertex_pair& vdp, vertices)
+    {
+      vdp.second=add_vertex(al_graph);
+      al_graph[vdp.second]=vdp.first;
+    }
+
+    Compare_face less_face(m_tmesh);
+    AL_edge_map al_edge_map( less_face );
+
+    // Filter coplanar edges: we consider only coplanar edges incident to one non-coplanar facet
+    //   for each such edge, add the corresponding nodes in the adjacency-list graph as well as
+    //   the edge
+    BOOST_FOREACH(const edge_descriptor ed, all_coplanar_edges)
+    {
+      if (  face(halfedge(ed, m_tmesh), m_tmesh)==graph_traits::null_face() ||
+            opposite_face(ed)==graph_traits::null_face()  ||
+            !all_coplanar_edges.count( next_edge(ed) ) ||
+            !all_coplanar_edges.count( next_of_opposite_edge(ed) ) )
+      {
+        typename Vertices_map::iterator it_insert1, it_insert2;
+        bool is_new;
+
+        // Each coplanar edge is connecting two nodes
+        //  handle source
+        cpp11::tie(it_insert1, is_new) =
+          vertices.insert(
+              Vertex_pair(
+                source(ed,m_tmesh), AL_graph::null_vertex()
+              )
+          );
+        if (is_new)
+        {
+          it_insert1->second=add_vertex(al_graph);
+          al_graph[it_insert1->second]=it_insert1->first;
+        }
+        //  handle target
+        cpp11::tie(it_insert2, is_new) =
+          vertices.insert(
+              Vertex_pair(
+                target(ed,m_tmesh), AL_graph::null_vertex()
+              )
+          );
+        if (is_new)
+        {
+          it_insert2->second=add_vertex(al_graph);
+          al_graph[it_insert2->second]=it_insert2->first;
+        }
+        // add the edge into the adjacency-list graph
+        CGAL_assertion( it_insert1->second!=AL_graph::null_vertex() );
+        CGAL_assertion( it_insert2->second!=AL_graph::null_vertex() );
+        add_edge(it_insert1->second, it_insert2->second, al_graph);
+      }
+    }
+
+    // for each edge intersected in its interior, creates a node in
+    // an adjacency-list graph and put an edge between two such nodes
+    // when the corresponding edges shares a common face
+    BOOST_FOREACH(edge_descriptor ed, iedges)
+    {
+      AL_vertex_descriptor vd=add_vertex(al_graph);
+      al_graph[vd]=ed;
+      update_al_graph_connectivity(ed, vd, al_edge_map, al_graph);
+    }
+
+    // If one of the node above is not connected in its two incident faces
+    // then it must be connected to a vertex (including those in the set
+    // of coplanar edges)
+    typedef std::pair<halfedge_descriptor, AL_vertex_pair> Halfedge_and_vertices;
+    BOOST_FOREACH(Halfedge_and_vertices hnv,al_edge_map)
+    {
+      if (hnv.second.second==AL_graph::null_vertex())
+      {
+        //get the edge and test opposite vertices (if the edge is not on the boundary)
+        vertex_descriptor vd = target( next(hnv.first, m_tmesh), m_tmesh);
+        typename Vertices_map::iterator itv=vertices.find(vd);
+        CGAL_assertion( itv!=vertices.end() );
+        add_edge(itv->second, hnv.second.first, al_graph);
+      }
+    }
+
+    CGAL_assertion(num_vertices(al_graph)==iedges.size()+vertices.size());
+
+    // now assemble the edges of al_graph to define polylines,
+    // putting them in the output iterator
+    if (!UseParallelPlaneOptimization || app_info.first==-1)
+    {
+      Polyline_visitor<OutputIterator, Traits> visitor(m_tmesh, al_graph, plane, m_vpmap, m_traits, out);
+      split_graph_into_polylines(al_graph, visitor);
+      return visitor.out;
+    }
+    else
+    {
+      typedef Polygon_mesh_slicer_::Axis_parallel_plane_traits<Traits> App_traits;
+      App_traits app_traits(app_info.first, app_info.second, m_traits);
+
+      Polyline_visitor<OutputIterator, App_traits> visitor
+        (m_tmesh, al_graph, plane, m_vpmap, app_traits, out);
+      split_graph_into_polylines(al_graph, visitor);
+      return visitor.out;
+    }
+  }
+
+  ~Polygon_mesh_slicer()
+  {
+    if (m_own_tree) delete m_tree_ptr;
+  }
+};
+
+}// end of namespace CGAL
+#endif //CGAL_POLYGON_MESH_SLICER_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_offset_builder_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_offset_builder_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_offset_builder_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_offset_builder_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_offset_builder_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_offset_builder_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_offset_builder_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_offset_builder_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_set_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_set_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_set_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_set_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_triangulation_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_triangulation_decomposition_2.h
new file mode 100644
index 0000000..a37a817
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_triangulation_decomposition_2.h
@@ -0,0 +1,204 @@
+// Copyright (c) 2013  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Efi Fogel   <efifogel at gmail.com>
+
+#ifndef CGAL_POLYGON_TRIANGULATION_DECOMPOSITION_2_H
+#define CGAL_POLYGON_TRIANGULATION_DECOMPOSITION_2_H
+
+#include <CGAL/General_polygon_set_2.h>
+
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Triangulation_face_base_with_info_2.h>
+#include <CGAL/Polygon_2.h>
+#include <iostream>
+#include <vector>
+#include <list>
+
+namespace CGAL {
+
+/*! \class Polygon_triangulation_decomposition Polygon_triangulation_decomposition.h
+ * Constrained triangulation decomposition strategy.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Polygon_triangulation_decomposition_2 {
+public:
+  typedef Kernel_                                       Kernel;
+  typedef Container_                                    Container;
+
+  typedef CGAL::Polygon_2<Kernel, Container>            Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel, Container> Polygon_with_holes_2;
+
+private:
+  struct Face_info {
+    Face_info() {}
+    int nesting_level;
+    bool in_domain() { return nesting_level % 2 == 1; }
+  };
+
+  // Triangulation types
+  typedef CGAL::Triangulation_vertex_base_2<Kernel>                     VB;
+  typedef CGAL::Triangulation_face_base_with_info_2<Face_info, Kernel>  FBI;
+  typedef CGAL::Constrained_triangulation_face_base_2<Kernel, FBI>      FB;
+  typedef CGAL::Triangulation_data_structure_2<VB, FB>                  TDS;
+  typedef CGAL::Exact_predicates_tag                                    Itag;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<Kernel, TDS, Itag> CDT;
+
+public:
+  /*! Default constructor. */
+  Polygon_triangulation_decomposition_2() {}
+
+  // Destructor
+  ~Polygon_triangulation_decomposition_2() {}
+
+  /*! Decompose a polygon-with-holes into convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator_>
+  OutputIterator_ operator()(const Polygon_2& pgm, OutputIterator_ oi) const
+  {
+    CDT cdt;
+
+    // Insert boundary:
+    insert_polygon(cdt, pgm);
+
+    // Mark facets that are inside the domain bounded by the polygon
+    mark_domains(cdt);
+
+    typename CDT::Finite_faces_iterator fit;
+    for (fit = cdt.finite_faces_begin(); fit != cdt.finite_faces_end(); ++fit) {
+      if (! fit->info().in_domain()) continue;
+      typename CDT::Vertex_handle vh0 = fit->vertex(0);
+      typename CDT::Vertex_handle vh1 = fit->vertex(1);
+      typename CDT::Vertex_handle vh2 = fit->vertex(2);
+      Polygon_2 pgn;
+      pgn.push_back(vh0->point());
+      pgn.push_back(vh1->point());
+      pgn.push_back(vh2->point());
+      *oi++ = pgn;
+    }
+    return oi;
+  }
+
+  /*! Decompose a polygon-with-holes into convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator_>
+  OutputIterator_
+  operator()(const Polygon_with_holes_2& pgm, OutputIterator_ oi) const
+  {
+    CDT cdt;
+
+    // Insert outer boundary:
+    const Polygon_2& outer_pgn = pgm.outer_boundary();
+    insert_polygon(cdt, outer_pgn);
+
+    // Insert holes:
+    typename Polygon_with_holes_2::Hole_const_iterator ith;
+    for (ith = pgm.holes_begin(); ith != pgm.holes_end(); ++ith)
+      insert_polygon(cdt, *ith);
+
+    // Mark facets that are inside the domain bounded by the polygon
+    mark_domains(cdt);
+
+    typename CDT::Finite_faces_iterator fit;
+    for (fit = cdt.finite_faces_begin(); fit != cdt.finite_faces_end(); ++fit) {
+      if (! fit->info().in_domain()) continue;
+      typename CDT::Vertex_handle vh0 = fit->vertex(0);
+      typename CDT::Vertex_handle vh1 = fit->vertex(1);
+      typename CDT::Vertex_handle vh2 = fit->vertex(2);
+      Polygon_2 pgn;
+      pgn.push_back(vh0->point());
+      pgn.push_back(vh1->point());
+      pgn.push_back(vh2->point());
+      *oi++ = pgn;
+    }
+    return oi;
+  }
+
+private:
+  void mark_domains(CDT& cdt, typename CDT::Face_handle start, int index,
+                    std::list<typename CDT::Edge>& border) const
+  {
+    if (start->info().nesting_level != -1) return;
+    std::list<typename CDT::Face_handle> queue;
+    queue.push_back(start);
+    while (! queue.empty()) {
+      typename CDT::Face_handle fh = queue.front();
+      queue.pop_front();
+      if (fh->info().nesting_level == -1) {
+        fh->info().nesting_level = index;
+        for (int i = 0; i < 3; i++) {
+          typename CDT::Edge e(fh,i);
+          typename CDT::Face_handle n = fh->neighbor(i);
+          if (n->info().nesting_level == -1) {
+            if (cdt.is_constrained(e)) border.push_back(e);
+            else queue.push_back(n);
+          }
+        }
+      }
+    }
+  }
+
+  // Explore set of facets connected with non constrained edges,
+  // and attribute to each such set a nesting level.
+  // We start from facets incident to the infinite vertex, with a nesting
+  // level of 0. Then we recursively consider the non-explored facets incident
+  // to constrained edges bounding the former set and increase the nesting
+  // level by 1.
+  // Facets in the domain are those with an odd nesting level.
+  void mark_domains(CDT& cdt) const
+  {
+    typename CDT::All_faces_iterator it;
+    for (it = cdt.all_faces_begin(); it != cdt.all_faces_end(); ++it)
+      it->info().nesting_level = -1;
+
+    std::list<typename CDT::Edge> border;
+    mark_domains(cdt, cdt.infinite_face(), 0, border);
+    while (! border.empty()) {
+      typename CDT::Edge e = border.front();
+      border.pop_front();
+      typename CDT::Face_handle n = e.first->neighbor(e.second);
+      if (n->info().nesting_level == -1)
+        mark_domains(cdt, n, e.first->info().nesting_level+1, border);
+    }
+  }
+
+  template <typename Polygon_>
+  void insert_polygon(CDT& cdt, const Polygon_& pgn) const
+  {
+    typedef Polygon_                                    Polygon_2;
+    if (pgn.is_empty()) return;
+    typedef typename Polygon_2::Vertex_circulator       Vertex_circulator;
+
+    Vertex_circulator v_start = pgn.vertices_circulator();
+    typename CDT::Vertex_handle vt_prev = cdt.insert(*v_start);
+    Vertex_circulator v_curr = v_start;
+    do {
+      ++v_curr;
+      typename CDT::Vertex_handle vt_curr = cdt.insert(*v_curr);
+      cdt.insert_constraint(vt_prev, vt_curr);
+      vt_prev = vt_curr;
+    } while (v_curr != v_start);
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polygon_vertical_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_vertical_decomposition_2.h
new file mode 100644
index 0000000..013b3c2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polygon_vertical_decomposition_2.h
@@ -0,0 +1,280 @@
+// Copyright (c) 2013  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Efi Fogel   <efifogel at gmail.com>
+
+#ifndef CGAL_POLYGON_VERTICAL_DECOMPOSITION_2_H
+#define CGAL_POLYGON_VERTICAL_DECOMPOSITION_2_H
+
+#include <CGAL/Polygon_2.h>
+#include <CGAL/General_polygon_set_2.h>
+#include <CGAL/Arr_vertical_decomposition_2.h>
+
+#include <vector>
+#include <list>
+
+namespace CGAL {
+
+/*!
+ * \class
+ * Vertical decomposition strategy.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Polygon_vertical_decomposition_2 {
+public:
+  typedef Kernel_                                        Kernel;
+  typedef Container_                                     Container;
+
+  typedef CGAL::Polygon_2<Kernel, Container>             Polygon_2;
+  typedef CGAL::Polygon_with_holes_2<Kernel, Container>  Polygon_with_holes_2;
+
+  typedef CGAL::Arr_segment_traits_2<Kernel>             Arr_segment_traits;
+  typedef CGAL::Gps_segment_traits_2<Kernel, Container, Arr_segment_traits>
+                                                         Traits_2;
+  typedef CGAL::General_polygon_set_2<Traits_2>          General_polygon_set_2;
+  typedef typename General_polygon_set_2::Arrangement_2  Arrangement_2;
+
+  typedef typename Arrangement_2::Halfedge_const_iterator
+    Halfedge_const_iterator;
+  typedef typename Arrangement_2::Face_const_iterator    Face_const_iterator;
+
+  typedef typename Arrangement_2::Vertex_const_handle    Vertex_const_handle;
+  typedef typename Arrangement_2::Halfedge_const_handle  Halfedge_const_handle;
+  typedef typename Arrangement_2::Face_const_handle      Face_const_handle;
+
+  typedef typename Arrangement_2::Vertex_handle          Vertex_handle;
+  typedef typename Arrangement_2::Halfedge_handle        Halfedge_handle;
+  typedef typename Arrangement_2::Face_handle            Face_handle;
+
+  typedef std::pair<Vertex_const_handle, std::pair<CGAL::Object, CGAL::Object> >
+                                                         Vert_decomp_entry;
+  typedef std::list<Vert_decomp_entry>                   Vert_decomp_list;
+
+  typedef typename Kernel::Point_2                       Point_2;
+
+  typedef typename Arrangement_2::Outer_ccb_const_iterator
+    Outer_ccb_const_iterator;
+
+private:
+  typedef typename Arrangement_2::X_monotone_curve_2     Segment_2;
+  typedef typename Kernel::Line_2                        Line_2;
+
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+
+  // An arrangement observer, used to receive notifications of face splits and
+  // face mergers.
+  class My_observer : public CGAL::Arr_observer<Arrangement_2> {
+  public:
+    My_observer(Arrangement_2& arr) : Arr_observer<Arrangement_2>(arr) {}
+
+    virtual void after_split_face(Face_handle f, Face_handle new_f,
+                                  bool /* is_hole */)
+    { if (f->contained()) new_f->set_contained(true); }
+  };
+
+  // Kernel functors:
+  typedef typename Kernel::Compare_x_2                   Compare_x_2;
+  typedef typename Kernel::Intersect_2                   Intersect_2;
+  typedef typename Kernel::Equal_2                       Equal_2;
+
+  // Data members:
+  const Traits_2* m_traits;
+  bool m_own_traits;    // inidicates whether the kernel should be freed up.
+
+  Compare_x_2 f_cmp_x;
+  Intersect_2 f_intersect;
+  Equal_2     f_equal;
+
+public:
+  /*! Default constructor. */
+  Polygon_vertical_decomposition_2() :
+    m_traits(NULL),
+    m_own_traits(false)
+  { init(); }
+
+  /*! Constructor */
+  Polygon_vertical_decomposition_2(const Traits_2& traits) :
+    m_traits(&traits),
+    m_own_traits(false)
+  { init(); }
+
+  /*! Initialize */
+  void init()
+  {
+    // Allocate the traits if not provided.
+    if (m_traits == NULL) {
+      m_traits = new Traits_2;
+      m_own_traits = true;
+    }
+
+    // Obtain kernel functors.
+    const Kernel* kernel = m_traits;
+    f_cmp_x = kernel->compare_x_2_object();
+    f_intersect = kernel->intersect_2_object();
+    f_equal = kernel->equal_2_object();
+  }
+
+  // Destructor
+  ~Polygon_vertical_decomposition_2()
+  {
+    if (m_own_traits) {
+      if (m_traits) {
+        delete m_traits;
+        m_traits = NULL;
+      }
+      m_own_traits = false;
+    }
+  }
+
+  /*! Obtain the traits
+   * \return the traits
+   */
+  const Traits_2& traits() const { return *m_traits; }
+
+  /*! Decompose a polygon into convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator_>
+  OutputIterator_ operator()(const Polygon_2& pgn, OutputIterator_ oi) const
+  { return decomp(pgn, oi); }
+
+  /*! Decompose a polygon with holes into convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator_>
+  OutputIterator_
+  operator()(const Polygon_with_holes_2& pgn, OutputIterator_ oi) const
+  { return decomp(pgn, oi); }
+
+private:
+  /*!
+   * Decompose a polygon-with-holes into convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename Polygon_, typename OutputIterator_>
+  OutputIterator_ decomp(const Polygon_& pgn, OutputIterator_ oi) const
+  {
+    const Traits_2& traits = *m_traits;
+    General_polygon_set_2 gps(traits);
+    gps.insert(pgn);
+    Arrangement_2& arr = gps.arrangement();
+    My_observer obs(arr);
+    vertical_decomposition(arr);
+    Face_const_iterator fi;
+    for (fi = arr.faces_begin(); fi != arr.faces_end(); ++fi) {
+      if (! fi->contained()) continue;
+      CGAL_assertion(fi->number_of_outer_ccbs() == 1);
+      Outer_ccb_const_iterator oci = fi->outer_ccbs_begin();
+      Halfedge_const_iterator first = *oci;
+      Halfedge_const_iterator curr = first;
+      Polygon_2 pgn;
+      do {
+        pgn.push_back(curr->target()->point());
+        curr = curr->next();
+      } while (curr != first);
+      *oi++ = pgn;
+    }
+    return oi;
+  }
+
+  // Add a vertical segment from the given vertex to some other arrangement
+  // feature.
+  Halfedge_const_handle
+  add_vertical_segment(Arrangement_2& arr, Vertex_handle v, CGAL::Object obj)
+    const
+  {
+    Segment_2 seg;
+    Vertex_const_handle vh;
+    Halfedge_const_handle hh;
+    Face_const_handle fh;
+    Vertex_handle v2;
+
+    if (CGAL::assign(vh, obj)) {
+      // The given feature is a vertex.
+      seg = Segment_2(v->point(), vh->point());
+      v2 = arr.non_const_handle(vh);
+    }
+    else if (CGAL::assign(hh, obj)) {
+      // The given feature is a halfedge. We ignore fictitious halfedges.
+      if (hh->is_fictitious())
+        return Halfedge_const_handle();
+
+      // Check whether v lies in the interior of the x-range of the edge (in
+      // which case this edge should be split).
+      if (f_cmp_x(v->point(), hh->target()->point()) == CGAL::EQUAL) {
+        // In case the target of the edge already has the same x-coordinate as
+        // the vertex v, just connect these two vertices.
+        seg = Segment_2(v->point(), hh->target()->point());
+        v2 = arr.non_const_handle(hh->target());
+      }
+      else {
+        // Compute the vertical projection of v onto the segment associated
+        // with the halfedge. Split the edge and connect v with the split point.
+        Line_2 supp_line(hh->source()->point(), hh->target()->point());
+        Line_2 vert_line(v->point(),
+                         Point_2(v->point().x(), v->point().y() + 1));
+        Point_2 point;
+        CGAL::assign(point, f_intersect(supp_line, vert_line));
+        seg = Segment_2(v->point(), point);
+        arr.split_edge(arr.non_const_handle(hh),
+                       Segment_2(hh->source()->point(), point),
+                       Segment_2(point, hh->target()->point()));
+        v2 = arr.non_const_handle(hh->target());
+      }
+    }
+    // Ignore faces and empty objects.
+    else return Halfedge_const_handle();
+
+    // Add the vertical segment to the arrangement using its two end vertices.
+    return arr.insert_at_vertices(seg, v, v2);
+  }
+
+  // Construct the vertical decomposition of the given arrangement.
+  void vertical_decomposition(Arrangement_2& arr) const
+  {
+    // For each vertex in the arrangment, locate the feature that lies
+    // directly below it and the feature that lies directly above it.
+    Vert_decomp_list vd_list;
+    CGAL::decompose(arr, std::back_inserter(vd_list));
+
+    // Go over the vertices (given in ascending lexicographical xy-order),
+    // and add segements to the feautres below and above it.
+    typename Vert_decomp_list::iterator it, prev = vd_list.end();
+    for (it = vd_list.begin(); it != vd_list.end(); ++it) {
+      // If the feature above the previous vertex is not the current vertex,
+      // add a vertical segment to the feature below the vertex.
+      Vertex_const_handle v;
+      if ((prev == vd_list.end()) ||
+          !CGAL::assign(v, prev->second.second) ||
+          !f_equal(v->point(), it->first->point()))
+        add_vertical_segment(arr, arr.non_const_handle(it->first),
+                             it->second.first);
+      // Add a vertical segment to the feature above the vertex.
+      add_vertical_segment(arr, arr.non_const_handle(it->first),
+                           it->second.second);
+      prev = it;
+    }
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polygon_with_holes_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polygon_with_holes_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polygon_with_holes_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polygon_with_holes_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/PolyhedralSurf_neighbors.h b/3rdparty/CGAL-4.8/include/CGAL/PolyhedralSurf_neighbors.h
new file mode 100644
index 0000000..b3aced4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/PolyhedralSurf_neighbors.h
@@ -0,0 +1,321 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+#ifndef CGAL_POLYHEDRALSURF_NEIGHBORS_H_
+#define CGAL_POLYHEDRALSURF_NEIGHBORS_H_
+
+#include <queue>
+#include <algorithm>
+#include <list>
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+//---------------------------------------------------------------------------
+//T_Gate : element of the priority queue. A gate is a halfedge and a
+//number giving the max distance from v to the vertices of the
+//triangle incident to the halfedge.
+//---------------------------------------------------------------------------
+template < class TriangleMesh > class T_Gate
+{
+  typedef typename boost::property_map<TriangleMesh,CGAL::vertex_point_t>::type VPM;
+  typedef typename boost::property_traits<VPM>::value_type Point_3;
+  typedef typename Kernel_traits<Point_3>::Kernel Kernel;
+
+public:
+  typedef typename Kernel::FT       FT;
+  typedef typename Kernel::Vector_3 Vector_3;
+
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor    vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor  halfedge_descriptor;
+ 
+  T_Gate(FT d, const halfedge_descriptor he);
+  FT& d() { return m_d;}
+  const FT d() const { return m_d;}            
+  const halfedge_descriptor he() { return m_he;}
+
+private:
+  FT m_d;
+  halfedge_descriptor m_he;
+};
+
+//////////////IMPLEMENTATION//////////////////////////
+template < class TriangleMesh > 
+T_Gate<TriangleMesh>::T_Gate(FT d, 
+					    const halfedge_descriptor he)
+  : m_d(d), m_he(he)
+{}
+
+//---------------------------------------------------------------------------
+// functor for priority queue
+// order so that the top element is the smallest in the queue
+//---------------------------------------------------------------------------
+template<class g>
+struct compare_gates 
+{       
+        bool operator()(const g& g1, 
+                        const g& g2) const
+        {       
+                return g1.d() > g2.d();
+        }
+};
+
+//---------------------------------------------------------------------------
+//T_PolyhedralSurf_neighbors : MAIN class for computation, it uses the
+//class Gate and the functor compare_gates for the definition of a
+//priority queue
+//---------------------------------------------------------------------------
+template < class TriangleMesh >
+class T_PolyhedralSurf_neighbors
+{
+
+  typedef typename boost::property_map<TriangleMesh,CGAL::vertex_point_t>::const_type VPM;
+  typedef typename boost::property_traits<VPM>::value_type Point_3;
+  typedef typename Kernel_traits<Point_3>::Kernel Kernel;
+
+public:
+  typedef typename Kernel::FT        FT;
+  typedef typename Kernel::Vector_3  Vector_3;
+
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor     vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef CGAL::Halfedge_around_target_circulator<TriangleMesh>
+  Halfedge_around_vertex_const_circulator;
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_iterator   Vertex_const_iterator;
+  typedef T_Gate<TriangleMesh> Gate;
+
+  T_PolyhedralSurf_neighbors(const TriangleMesh& P);
+  // vertex_neigh stores the vertex v and its 1Ring neighbors contour
+  // stores halfedges, oriented CW, following the 1Ring disk border
+  // OneRingSize is the max distance from v to its OneRing
+  // neighbors. (the tag is_visited is not mofified)
+  void compute_one_ring(const vertex_descriptor v,
+			std::vector<vertex_descriptor> &vertex_neigh,
+			std::list<halfedge_descriptor> &contour,
+			FT &OneRingSize);
+  // call compute_one_ring and expand the contour (circle of halfedges
+  // CW), vertex_neigh are vertices on and inside the contour (there
+  // tag is_visited is set to true, but reset to false at the end),
+  // size is such that gates with distance less than size*OneRingSize
+  // are processed
+  void compute_neighbors(const vertex_descriptor v,
+			 std::vector<vertex_descriptor> &vertex_neigh,
+			 std::list<halfedge_descriptor> &contour,
+			 const FT size); 
+  //vertex tags is_visited are set to false
+  void reset_is_visited_map(std::vector<vertex_descriptor> &vces);
+
+
+  Gate make_gate(const vertex_descriptor v,
+                 const halfedge_descriptor he)
+  {
+    Point_3 p0 = get(vpm, v),
+      p1 = get(vpm, target(he,P)),
+      p2 = get(vpm, target(next(he,P),P)),
+      p3 = get(vpm, target(prev(he,P),P));
+    Vector_3 p0p1 = p0 - p1,
+      p0p2 = p0 - p2,
+      p0p3 = p0 - p3;
+    FT d1 = p0p1*p0p1,
+      d2 = p0p2*p0p2,
+      d3 = p0p3*p0p3;
+    FT d = CGAL::sqrt( (std::max)( (std::max)(d1,d2), d3) );
+    return Gate(d,he);
+  }
+
+ protected:
+  /*
+  //tag to visit vertices
+  struct Vertex_cmp{//comparison is wrt vertex addresses
+    bool operator()(const vertex_descriptor a, const vertex_descriptor b) const{
+      return &*a < &*b;
+    }
+  };
+  */
+  const TriangleMesh& P;
+  VPM vpm;
+  typedef std::map<vertex_descriptor, bool/*, Vertex_cmp*/> Vertex2bool_map;
+  Vertex2bool_map is_visited_map;
+};
+
+//////////////IMPLEMENTATION//////////////////////////
+template < class TriangleMesh >
+T_PolyhedralSurf_neighbors < TriangleMesh >::
+T_PolyhedralSurf_neighbors(const TriangleMesh& P)
+  :P(P), vpm(get(vertex_point,P))
+{
+  //init the is_visited_map
+  Vertex_const_iterator itb, ite;
+  boost::tie(itb,ite) = vertices(P);
+  for(;itb!=ite;itb++) is_visited_map[*itb] = false; 
+}
+
+template < class TriangleMesh >
+void T_PolyhedralSurf_neighbors < TriangleMesh >::
+compute_one_ring(const vertex_descriptor v,
+		 std::vector<vertex_descriptor> &vertex_neigh,
+		 std::list<halfedge_descriptor> &contour,
+		 FT &OneRingSize)
+{
+  vertex_neigh.push_back(v);
+  Halfedge_around_vertex_const_circulator he_circ(halfedge(v,P),P),
+                                    he_end = he_circ;
+  do {
+    if ( is_border(*he_circ,P) )//then he and he->next follow the contour CW
+	{contour.push_back(*he_circ);
+          contour.push_back(next(*he_circ,P));}
+    else contour.push_back(opposite(prev(*he_circ,P),P));//not border, he->prev->opp on contour CW
+    vertex_neigh.push_back(target(opposite(*he_circ,P),P));
+      he_circ++;
+  } while (he_circ != he_end);
+
+  //compute OneRingSize = distance(v, 1Ring)
+  OneRingSize = 0;
+  typename std::vector<vertex_descriptor>::const_iterator itb = vertex_neigh.begin(),
+    ite = vertex_neigh.end();
+  itb++;//the first vertex v is the center to which distances are
+	//computed from, for other 1ring neighbors
+  Point_3 p0 = get(vpm, v), p;
+  Vector_3 p0p;
+  FT d = OneRingSize;
+  for (; itb != ite; itb++){
+
+    p = get(vpm, *itb);
+    p0p = p0 - p;
+    d =  CGAL::sqrt(p0p*p0p);
+    if (d > OneRingSize) OneRingSize = d;
+  }
+}
+
+template < class TriangleMesh >
+void T_PolyhedralSurf_neighbors < TriangleMesh >::
+compute_neighbors(const vertex_descriptor v,
+		  std::vector<vertex_descriptor> &vertex_neigh,
+		  std::list<halfedge_descriptor> &contour,
+		  const FT size)  
+{
+  FT OneRingSize;
+  compute_one_ring(v, vertex_neigh, contour, OneRingSize);
+  const FT d_max = OneRingSize*size;
+  std::priority_queue< Gate, std::vector< Gate >, compare_gates< Gate > > GatePQ;
+  // tag neighbors 
+  typename std::vector<vertex_descriptor>::const_iterator itbv = vertex_neigh.begin(),
+    itev = vertex_neigh.end();
+  for (; itbv != itev; itbv++) is_visited_map.find(*itbv)->second = true;
+
+  // init GatePQ
+  typename std::list<halfedge_descriptor>::const_iterator itb = contour.begin(),
+                                       ite = contour.end();
+  for (; itb != ite; itb++) {
+    if (!( is_border(*itb,P) )) GatePQ.push(make_gate(v, *itb));
+  }
+  // init d_current
+  Gate firstGate = GatePQ.top();
+  FT d_current = firstGate.d();
+  // main loop
+  while ( !GatePQ.empty() && d_current <= d_max ) {
+    Gate gate = GatePQ.top();
+    GatePQ.pop();
+    d_current = gate.d();
+    halfedge_descriptor he = gate.he(), he1, he2;
+    vertex_descriptor v1;
+    // find the gate on the contour
+    typename std::list<halfedge_descriptor>::iterator pos_he, pos_prev, pos_next, iter;
+   
+    pos_he = find(contour.begin(), contour.end(), he);
+    iter = pos_he;
+    /**
+       there are different cases to expand the contour : 
+       (case 3) he is not on the contour, nothing to do
+       (case 2) he is on the contour and either the previous or the next 
+       following edge in the triangle is also on the contour, then delete
+       these 2 he from the contour and add the third one to the contour 
+       and the PQ.
+       (case1) the vertex opposite to he is not visited, then the he is removed
+       from the contour, the two others are added to the contour and PQ, the 
+       vertex is set visited.
+    */
+
+    // if the gate is not encountered on the contour (case 3)
+    if ( pos_he == contour.end() ) continue;
+    // simulate a circulator on the contour: 
+    // find the prev and next pos on coutour
+    if ( ite != (++iter) ) pos_next = iter;
+    else pos_next = contour.begin();
+    iter = pos_he;
+    if ( iter != contour.begin() ) pos_prev = --iter;
+    else pos_prev = --contour.end();
+
+    if ( next(he,P) == *pos_next )
+      {  // case 2a
+	//contour
+	he1 = opposite(prev(he,P),P);
+	contour.insert(pos_he, he1);
+	contour.erase(pos_he);
+	contour.erase(pos_next);
+	//GatePQ
+	if ( !is_border(he1,P) ) GatePQ.push(make_gate(v, he1));
+	continue;
+      }
+    else if ( prev(he,P) == *pos_prev )
+      {  // case 2b
+	//contour
+	he1 = opposite(next(he,P),P);
+	contour.insert(pos_prev, he1);
+	contour.erase(pos_prev);
+	contour.erase(pos_he);
+	//GatePQ
+	if ( ! is_border(he1,P) ) GatePQ.push(make_gate(v, he1));
+	continue;
+      }
+    v1 = target(next(he,P),P);
+    if ( !is_visited_map.find(v1)->second )
+      {  // case 1
+	//vertex
+	is_visited_map.find(v1)->second = true;
+	vertex_neigh.push_back(v1);
+	//contour
+	he1 = opposite(prev(he,P),P);
+	he2 = opposite(next(he,P),P);
+	contour.insert(pos_he, he1);
+	contour.insert(pos_he, he2);
+	contour.erase(pos_he);
+	//GatePQ
+	if ( ! is_border(he1,P) ) GatePQ.push(make_gate(v, he1));
+	if ( ! is_border(he2,P) ) GatePQ.push(make_gate(v, he2));
+	continue;
+      }
+    //else do nothing (keep the he on the contour, and continue) to
+    //prevent a change of the topology.
+  }// end while
+  
+  reset_is_visited_map(vertex_neigh);
+}
+
+template < class TriangleMesh >
+void T_PolyhedralSurf_neighbors < TriangleMesh >::
+reset_is_visited_map(std::vector<vertex_descriptor> &vces)
+{
+  typename std::vector<vertex_descriptor>::const_iterator 
+    itb = vces.begin(), ite = vces.end();
+  for (;itb != ite; itb++) is_visited_map[*itb] = false;
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_3.h
new file mode 100644
index 0000000..3728b8a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_3.h
@@ -0,0 +1,804 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// Copyright (c) 2011 GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+//
+//******************************************************************************
+
+#ifndef CGAL_POLYHEDRAL_MESH_DOMAIN_3_H
+#define CGAL_POLYHEDRAL_MESH_DOMAIN_3_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h>
+
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
+#include <CGAL/Mesh_3/Triangle_accessor_primitive.h>
+#include <CGAL/Triangle_accessor_3.h>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <sstream>
+
+#include <CGAL/Random.h>
+#include <CGAL/point_generators_3.h>
+#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
+#include <CGAL/Mesh_3/Profile_counter.h>
+
+#include <boost/optional.hpp>
+#include <boost/none.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/contains.hpp>
+#include <CGAL/tuple.h>
+#include <boost/format.hpp>
+#include <boost/variant.hpp>
+#include <boost/math/special_functions/round.hpp>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/enumerable_thread_specific.h>
+#endif
+
+namespace CGAL {
+
+namespace Mesh_3 {
+
+namespace details {
+
+inline
+double
+max_length(const Bbox_3& b)
+{
+  return (std::max)(b.xmax()-b.xmin(),
+                    (std::max)(b.ymax()-b.ymin(),b.zmax()-b.zmin()) );
+}
+
+
+// -----------------------------------
+// Surface_patch_index_generator
+// To use patch_id enclosed in AABB_primitives or not
+// -----------------------------------
+template < typename Subdomain_index, typename Polyhedron, typename Tag >
+struct Surface_patch_index_generator
+{
+  typedef std::pair<Subdomain_index,Subdomain_index>  Surface_patch_index;
+  typedef Surface_patch_index                         type;
+
+  template < typename Primitive_id >
+  Surface_patch_index operator()(const Primitive_id&)
+  { return Surface_patch_index(0,1); }
+};
+
+template < typename Subdomain_index, typename Polyhedron >
+struct Surface_patch_index_generator<Subdomain_index, Polyhedron, CGAL::Tag_true>
+{
+  typedef typename Polyhedron::Face::Patch_id Surface_patch_index;
+  typedef Surface_patch_index   type;
+
+  template < typename Primitive_id >
+  Surface_patch_index operator()(const Primitive_id& primitive_id)
+  { return primitive_id->patch_id(); }
+};
+
+
+// -----------------------------------
+// Index_generator
+// Don't use boost::variant if types are the same type
+// -----------------------------------
+template < typename Subdomain_index, typename Surface_patch_index >
+struct Index_generator
+{
+  typedef boost::variant<Subdomain_index,Surface_patch_index> Index;
+  typedef Index                                         type;
+};
+
+template < typename T >
+struct Index_generator<T, T>
+{
+  typedef T       Index;
+  typedef Index   type;
+};
+
+// -----------------------------------
+// Geometric traits generator
+// -----------------------------------
+template < typename Gt,
+           typename Use_exact_intersection_construction_tag >
+struct IGT_generator {};
+
+template < typename Gt >
+struct IGT_generator<Gt,CGAL::Tag_true>
+{
+#ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+  typedef CGAL::Mesh_3::Robust_intersection_traits_3_new<Gt> type;
+#else // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+  typedef CGAL::Mesh_3::Robust_intersection_traits_3<Gt> type;
+#endif // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS
+  typedef type Type;
+};
+
+template < typename Gt >
+struct IGT_generator<Gt,CGAL::Tag_false>
+{
+  typedef Gt type;
+  typedef type Type;
+};
+
+}  // end namespace details
+
+}  // end namespace Mesh_3
+
+
+/**
+ * @class Polyhedral_mesh_domain_3
+ *
+ *
+ */
+template<class Polyhedron,
+         class IGT_,
+         class TriangleAccessor=Triangle_accessor_3<Polyhedron,IGT_>,
+         class Use_patch_id_tag=Tag_false,
+         class Use_exact_intersection_construction_tag = CGAL::Tag_true>
+class Polyhedral_mesh_domain_3
+{
+  typedef typename Mesh_3::details::IGT_generator<
+    IGT_,Use_exact_intersection_construction_tag>::type IGT;
+
+public:
+  /// Geometric object types
+  typedef typename IGT::Point_3    Point_3;
+  typedef typename IGT::Segment_3  Segment_3;
+  typedef typename IGT::Ray_3      Ray_3;
+  typedef typename IGT::Line_3     Line_3;
+  typedef typename IGT::Vector_3   Vector_3;
+  typedef typename IGT::Sphere_3   Sphere_3;
+
+  //-------------------------------------------------------
+  // Index Types
+  //-------------------------------------------------------
+  /// Type of indexes for cells of the input complex
+  typedef int Subdomain_index;
+  typedef boost::optional<Subdomain_index> Subdomain;
+  /// Type of indexes for surface patch of the input complex
+  typedef typename Mesh_3::details::Surface_patch_index_generator<
+    Subdomain_index,Polyhedron,Use_patch_id_tag>::type    Surface_patch_index;
+  typedef boost::optional<Surface_patch_index>            Surface_patch;
+  /// Type of indexes to characterize the lowest dimensional face of the input
+  /// complex on which a vertex lie
+  typedef typename Mesh_3::details::Index_generator<
+    Subdomain_index, Surface_patch_index>::type           Index;
+
+  typedef CGAL::cpp11::tuple<Point_3,Index,int> Intersection;
+
+
+  typedef typename IGT::FT         FT;
+
+  // Kernel_traits compatibility
+  typedef IGT R;
+
+private:
+  typedef Mesh_3::Triangle_accessor_primitive<
+    TriangleAccessor, IGT>                              AABB_primitive;
+  typedef class AABB_traits<IGT,AABB_primitive>         AABB_traits;
+  typedef class AABB_tree<AABB_traits>                  AABB_tree_;
+private:
+  typedef typename AABB_tree_::Primitive_id              AABB_primitive_id;
+  typedef typename AABB_tree_::Primitive Primitive;
+  typedef typename AABB_traits::Bounding_box            Bounding_box;
+
+public:
+
+  /// Default constructor
+  Polyhedral_mesh_domain_3()
+    : tree_()
+    , bounding_tree_(&tree_)
+    , p_rng_(NULL)
+    , delete_rng_(true)
+  {
+    p_rng_ = new CGAL::Random(0);
+  }
+
+  /**
+   * @brief Constructor. Contruction from a polyhedral surface
+   * @param polyhedron the polyhedron describing the polyhedral surface
+   */
+  Polyhedral_mesh_domain_3(const Polyhedron& p,
+                           CGAL::Random* p_rng = NULL)
+    : tree_(TriangleAccessor().triangles_begin(p),
+            TriangleAccessor().triangles_end(p))
+    , bounding_tree_(&tree_) // the bounding tree is tree_
+    , p_rng_(p_rng)
+    , delete_rng_(false)
+  {
+    if(!p.is_pure_triangle()) {
+      std::cerr << "Your input polyhedron must be triangulated!\n";
+      CGAL_error_msg("Your input polyhedron must be triangulated!");
+    }
+    if(!p_rng_)
+    {
+      p_rng_ = new CGAL::Random(0);
+      delete_rng_ = true;
+    }
+  }
+
+  Polyhedral_mesh_domain_3(const Polyhedron& p,
+                           const Polyhedron& bounding_polyhedron,
+                           CGAL::Random* p_rng = NULL)
+    : tree_(TriangleAccessor().triangles_begin(p),
+            TriangleAccessor().triangles_end(p))
+    , bounding_tree_(new AABB_tree_(TriangleAccessor().triangles_begin(bounding_polyhedron),
+                                    TriangleAccessor().triangles_end(bounding_polyhedron)))
+    , p_rng_(p_rng)
+    , delete_rng_(false)
+  {
+    tree_.insert(TriangleAccessor().triangles_begin(bounding_polyhedron),
+                 TriangleAccessor().triangles_end(bounding_polyhedron));
+    tree_.build();
+    bounding_tree_->build();
+    if(!p_rng_)
+    {
+      p_rng_ = new CGAL::Random(0);
+      delete_rng_ = true;
+    }
+  }
+
+  /**
+   * Constructor.
+   *
+   * Constructor from a sequence of polyhedral surfaces, and a bounding
+   * polyhedral surface.
+   *
+   * @param InputPolyhedraPtrIterator must an iterator of a sequence of
+   * pointers to polyhedra
+   *
+   * @param bounding_polyhedron reference to the bounding surface
+   */
+  template <typename InputPolyhedraPtrIterator>
+  Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
+                           InputPolyhedraPtrIterator end,
+                           const Polyhedron& bounding_polyhedron,
+                           CGAL::Random* p_rng = NULL)
+    : p_rng_(p_rng)
+    , delete_rng_(false)
+  {
+    if(begin != end) {
+      for(; begin != end; ++begin) {
+        tree_.insert(TriangleAccessor().triangles_begin(**begin),
+                     TriangleAccessor().triangles_end(**begin));
+      }
+      tree_.insert(TriangleAccessor().triangles_begin(bounding_polyhedron),
+                   TriangleAccessor().triangles_end(bounding_polyhedron));
+      tree_.build();
+      bounding_tree_ =
+        bounding_polyhedron.empty() ?
+        0 :
+        new AABB_tree_(TriangleAccessor().triangles_begin(bounding_polyhedron),
+                       TriangleAccessor().triangles_end(bounding_polyhedron));
+      if(!bounding_polyhedron.empty()) {
+        bounding_tree_->build();
+      }
+    }
+    else {
+      tree_.rebuild(TriangleAccessor().triangles_begin(bounding_polyhedron),
+                    TriangleAccessor().triangles_end(bounding_polyhedron));
+      bounding_tree_ = &tree_;
+    }
+    if(!p_rng_)
+    {
+      p_rng_ = new CGAL::Random(0);
+      delete_rng_ = true;
+    }
+  }
+
+  /**
+   * Constructor.
+   *
+   * Constructor from a sequence of polyhedral surfaces, without bounding
+   * surface. The domain will always answer false to "is_in_domain"
+   * queries.
+   *
+   * @param InputPolyhedraPtrIterator must an iterator of a sequence of
+   * pointers to polyhedra
+   */
+  template <typename InputPolyhedraPtrIterator>
+  Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
+                           InputPolyhedraPtrIterator end,
+                           CGAL::Random* p_rng = NULL)
+    : p_rng_(p_rng)
+    , delete_rng_(false)
+  {
+    if(begin != end) {
+      for(; begin != end; ++begin) {
+        tree_.insert(TriangleAccessor().triangles_begin(**begin),
+                     TriangleAccessor().triangles_end(**begin));
+      }
+      tree_.build();
+    }
+    bounding_tree_ = 0;
+    if(!p_rng_)
+    {
+      p_rng_ = new CGAL::Random(0);
+      delete_rng_ = true;
+    }
+  }
+
+  /// Destructor
+  ~Polyhedral_mesh_domain_3() {
+    if(bounding_tree_ != 0 && bounding_tree_ != &tree_) {
+      delete bounding_tree_;
+    }
+    if(delete_rng_)
+      delete p_rng_;
+  }
+
+  /**
+   * Constructs  a set of \ccc{n} points on the surface, and output them to
+   *  the output iterator \ccc{pts} whose value type is required to be
+   *  \ccc{std::pair<Points_3, Index>}.
+   */
+  struct Construct_initial_points
+  {
+    Construct_initial_points(const Polyhedral_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    template<class OutputIterator>
+    OutputIterator operator()(OutputIterator pts, const int n = 8) const;
+
+  private:
+    const Polyhedral_mesh_domain_3& r_domain_;
+  };
+
+  Construct_initial_points construct_initial_points_object() const
+  {
+    return Construct_initial_points(*this);
+  }
+
+
+  /**
+   * Returns a bounding box of the domain
+   */
+  Bbox_3 bbox() const {
+    return tree_.bbox();
+  }
+
+
+  /**
+   * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the
+   *  domain, the parameter index is set to the index of the subdomain
+   *  including $p$. It is set to the default value otherwise.
+   */
+  struct Is_in_domain
+  {
+    Is_in_domain(const Polyhedral_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    Subdomain operator()(const Point_3& p) const;
+  private:
+    const Polyhedral_mesh_domain_3& r_domain_;
+  };
+
+  Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); }
+
+  Point_3 project_on_surface(const Point_3& p) const
+  {
+    return tree_.closest_point(p);
+  }
+
+  /// Allowed query types
+  typedef boost::mpl::vector<Segment_3, Ray_3, Line_3> Allowed_query_types;
+
+  /**
+   * Returns true is the element \ccc{type} intersect properly any of the
+   * surface patches describing the either the domain boundary or some
+   * subdomain boundary.
+   * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * Parameter index is set to the index of the intersected surface patch
+   * if \ccc{true} is returned and to the default \ccc{Surface_patch_index}
+   * value otherwise.
+   */
+  struct Do_intersect_surface
+  {
+    Do_intersect_surface(const Polyhedral_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    template <typename Query>
+    typename boost::enable_if<typename boost::mpl::contains<Allowed_query_types,
+                                                            Query>::type,
+                              Surface_patch>::type
+    operator()(const Query& q) const
+    {
+      CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION));
+
+      boost::optional<AABB_primitive_id> primitive_id = r_domain_.tree_.any_intersected_primitive(q);
+      if ( primitive_id )
+      {
+        r_domain_.cache_primitive(q, *primitive_id);
+        return Surface_patch(r_domain_.make_surface_index(*primitive_id));
+      } else {
+        return Surface_patch();
+      }
+    }
+
+  private:
+    const Polyhedral_mesh_domain_3& r_domain_;
+  };
+
+  Do_intersect_surface do_intersect_surface_object() const
+  {
+    return Do_intersect_surface(*this);
+  }
+
+  /**
+   * Returns a point in the intersection of the primitive \ccc{type}
+   * with some boundary surface.
+   * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}.
+   * The integer \ccc{dimension} is set to the dimension of the lowest
+   * dimensional face in the input complex containing the returned point, and
+   * \ccc{index} is set to the index to be stored at a mesh vertex lying
+   * on this face.
+   */
+  struct Construct_intersection
+  {
+    Construct_intersection(const Polyhedral_mesh_domain_3& domain)
+      : r_domain_(domain) {}
+
+    template <typename Query>
+    typename boost::enable_if<typename boost::mpl::contains<Allowed_query_types,
+                                                            Query>::type,
+                              Intersection>::type
+    operator()(const Query& q) const
+    {
+      CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION));
+      typedef typename AABB_tree_::template Intersection_and_primitive_id<Query>::Type
+        Intersection_and_primitive_id;
+      typedef boost::optional<Intersection_and_primitive_id> AABB_intersection;
+      typedef Point_3 Bare_point;
+
+      AABB_intersection intersection;
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      if(r_domain_.query_is_cached(q))
+      {
+        const AABB_primitive_id primitive_id = r_domain_.cached_primitive_id();
+        typename cpp11::result_of<
+          typename IGT::Intersect_3(typename Primitive::Datum, Query)>::type o
+            = IGT().intersect_3_object()(Primitive(primitive_id).datum(),q);
+        intersection = o ?
+          Intersection_and_primitive_id(*o, primitive_id) :
+          AABB_intersection();
+      } else
+#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+      {
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+        CGAL_precondition(r_domain_.do_intersect_surface_object()(q));
+#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+
+        intersection = r_domain_.tree_.any_intersection(q);
+      }
+      if ( intersection )
+      {
+        // Get primitive
+        AABB_primitive_id primitive_id = intersection->second;
+
+        // intersection may be either a point or a segment
+#if CGAL_INTERSECTION_VERSION > 1
+        if ( const Bare_point* p_intersect_pt =
+             boost::get<Bare_point>( &(intersection->first) ) )
+#else
+        if ( const Bare_point* p_intersect_pt =
+             object_cast<Bare_point>( &(intersection->first) ) )
+#endif
+        {
+          return Intersection(*p_intersect_pt,
+                              r_domain_.index_from_surface_patch_index(
+                                r_domain_.make_surface_index(primitive_id)),
+                              2);
+        }
+#if CGAL_INTERSECTION_VERSION > 1
+        else if ( const Segment_3* p_intersect_seg =
+                  boost::get<Segment_3>(&(intersection->first)))
+#else
+        else if ( const Segment_3* p_intersect_seg =
+                  object_cast<Segment_3>(&(intersection->first)))
+#endif
+        {
+          CGAL_MESH_3_PROFILER("Mesh_3 profiler: Intersection is a segment");
+
+          return Intersection(p_intersect_seg->source(),
+                              r_domain_.index_from_surface_patch_index(
+                                r_domain_.make_surface_index(primitive_id)),
+                              2);
+        }
+        else {
+#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+          std::stringstream stream;
+          stream.precision(17);
+          set_pretty_mode(stream);
+          stream <<
+            "Mesh_3 error : AABB_tree any_intersection result is "
+            "not a point nor a segment\n";
+          if(intersection->first.empty()) {
+            stream <<  "The intersection is empty!";
+          } else {
+            stream <<  "The intersection typeinfo name is ";
+            stream <<  intersection->first.type().name();
+          }
+          stream << "\nThe query was: ";
+          stream << q << std::endl;
+          stream << "The intersecting primitive in the AABB tree was: "
+                 << AABB_primitive(intersection->second).datum() << std::endl;
+          CGAL_error_msg(stream.str().c_str());
+#endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+        }
+      }
+
+      // Should not happen
+      // unless CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 is defined
+      return Intersection();
+    }
+
+  private:
+    const Polyhedral_mesh_domain_3& r_domain_;
+  };
+
+  Construct_intersection construct_intersection_object() const
+  {
+    return Construct_intersection(*this);
+  }
+
+
+  /**
+   * Returns the index to be stored in a vertex lying on the surface identified
+   * by \c index.
+   */
+  Index index_from_surface_patch_index(const Surface_patch_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the index to be stored in a vertex lying in the subdomain
+   * identified by \c index.
+   */
+  Index index_from_subdomain_index(const Subdomain_index& index) const
+  { return Index(index); }
+
+  /**
+   * Returns the \c Surface_patch_index of the surface patch
+   * where lies a vertex with dimension 2 and index \c index.
+   */
+  Surface_patch_index surface_patch_index(const Index& index) const
+  { return boost::get<Surface_patch_index>(index); }
+
+  /**
+   * Returns the index of the subdomain containing a vertex
+   *  with dimension 3 and index \c index.
+   */
+  Subdomain_index subdomain_index(const Index& index) const
+  { return boost::get<Subdomain_index>(index); }
+
+  // -----------------------------------
+  // Backward Compatibility
+  // -----------------------------------
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index   Surface_index;
+
+  Index index_from_surface_index(const Surface_index& index) const
+  { return index_from_surface_patch_index(index); }
+
+  Surface_index surface_index(const Index& index) const
+  { return surface_patch_index(index); }
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  // -----------------------------------
+  // End backward Compatibility
+  // -----------------------------------
+
+public:
+  Surface_patch_index make_surface_index(
+    const AABB_primitive_id& primitive_id = AABB_primitive_id() ) const
+  {
+    Mesh_3::details::Surface_patch_index_generator<Subdomain_index,
+                                                   Polyhedron,
+                                                   Use_patch_id_tag> generator;
+
+    return generator(primitive_id);
+  }
+
+  // Undocumented function, used to implement a sizing field that
+  // computes lfs using this AABB tree. That avoids to rebuild the same
+  // tree.
+  typedef AABB_tree_ AABB_tree;
+  const AABB_tree& aabb_tree() const {
+    return tree_;
+  }
+
+protected:
+  void add_primitives(const Polyhedron& p)
+  {
+    tree_.insert(TriangleAccessor().triangles_begin(p),
+                 TriangleAccessor().triangles_end(p));
+
+    tree_.build();
+  }
+
+private:
+  /// The AABB tree: intersection detection and more
+  AABB_tree_ tree_;
+
+  AABB_tree_* bounding_tree_;
+
+  // cache queries and intersected primitive
+  typedef typename boost::make_variant_over<Allowed_query_types>::type Cached_query;
+  struct Query_cache
+  {
+    Query_cache() : has_cache(false) {}
+    bool has_cache;
+    Cached_query cached_query;
+    AABB_primitive_id cached_primitive_id;
+  };
+#ifdef CGAL_LINKED_WITH_TBB
+  mutable tbb::enumerable_thread_specific<Query_cache> query_cache;
+#else
+  mutable Query_cache query_cache;
+#endif
+
+  //random number generator for Construct_initial_points
+  CGAL::Random* p_rng_;
+  bool delete_rng_;
+
+public:
+
+  template <typename Query>
+  void cache_primitive(const Query& q,
+                       const AABB_primitive_id id) const
+  {
+#ifdef CGAL_LINKED_WITH_TBB
+    Query_cache &qc = query_cache.local();
+    qc.cached_query = Cached_query(q);
+    qc.has_cache = true;
+    qc.cached_primitive_id = id;
+#else
+    query_cache.cached_query = Cached_query(q);
+    query_cache.has_cache = true;
+    query_cache.cached_primitive_id = id;
+#endif
+  }
+
+  template <typename Query>
+  bool query_is_cached(const Query& q) const {
+#ifdef CGAL_LINKED_WITH_TBB
+    Query_cache &qc = query_cache.local();
+    return qc.has_cache && (qc.cached_query == Cached_query(q));
+#else
+    return query_cache.has_cache 
+      && (query_cache.cached_query == Cached_query(q));
+#endif
+  }
+
+  AABB_primitive_id cached_primitive_id() const {
+#ifdef CGAL_LINKED_WITH_TBB
+    return query_cache.local().cached_primitive_id;
+#else
+    return query_cache.cached_primitive_id;
+#endif
+  }
+
+  void set_random_generator(CGAL::Random* p_rng)
+  {
+    if(delete_rng_) delete p_rng_;
+    if(!p_rng)
+    {
+      p_rng_ = new CGAL::Random(0);
+      delete_rng_ = true;
+    }
+    else {
+      p_rng_ = p_rng;
+      delete_rng_ = false;
+    }
+  }
+
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Polyhedral_mesh_domain_3 Self;
+  Polyhedral_mesh_domain_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Polyhedral_mesh_domain_3
+
+
+
+
+
+template<typename P_, typename IGT_, typename TA,
+         typename Tag, typename E_tag_>
+template<class OutputIterator>
+OutputIterator
+Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::
+Construct_initial_points::operator()(OutputIterator pts,
+                                     const int n) const
+{
+  typename IGT::Construct_ray_3 ray = IGT().construct_ray_3_object();
+  typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object();
+
+  const Bounding_box bbox = r_domain_.tree_.bbox();
+  const Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2),
+                        FT( (bbox.ymin() + bbox.ymax()) / 2),
+                        FT( (bbox.zmin() + bbox.zmax()) / 2) );
+
+  CGAL::Random& rng = *(r_domain_.p_rng_);
+  Random_points_on_sphere_3<Point_3> random_point(1., rng);
+
+  int i = n;
+# ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << "construct initial points:" << std::endl;
+# endif
+  // Point construction by ray shooting from the center of the enclosing bbox
+  while ( i > 0 )
+  {
+    const Ray_3 ray_shot = ray(center, vector(CGAL::ORIGIN,*random_point));
+
+#ifdef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
+    Intersection intersection = r_domain_.construct_intersection_object()(ray_shot);
+    if(CGAL::cpp0x::get<2>(intersection) != 0) {
+#else
+    if(r_domain_.do_intersect_surface_object()(ray_shot)) {
+      Intersection intersection = r_domain_.construct_intersection_object()(ray_shot);
+#endif
+      *pts++ = std::make_pair(CGAL::cpp0x::get<0>(intersection),
+                              CGAL::cpp0x::get<1>(intersection));
+
+      --i;
+
+#ifdef CGAL_MESH_3_VERBOSE
+      std::cerr << boost::format("\r             \r"
+                                 "%1%/%2% initial point(s) found...")
+        % (n - i)
+        % n;
+# endif
+    }
+    ++random_point;
+  }
+
+#ifdef CGAL_MESH_3_VERBOSE
+  std::cerr << std::endl;
+#endif
+  return pts;
+}
+
+
+template<typename P_, typename IGT_, typename TA,
+         typename Tag, typename E_tag_>
+typename Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::Subdomain
+Polyhedral_mesh_domain_3<P_,IGT_,TA,Tag,E_tag_>::
+Is_in_domain::operator()(const Point_3& p) const
+{
+  if(r_domain_.bounding_tree_ == 0) return Subdomain();
+
+  internal::Point_inside_vertical_ray_cast<IGT_, AABB_tree_> inside_functor;
+  Bounded_side side = inside_functor(p, *(r_domain_.bounding_tree_));
+
+  if(side == CGAL::ON_UNBOUNDED_SIDE) { return Subdomain(); }
+  else { return Subdomain(Subdomain_index(1)); } // case ON_BOUNDARY && ON_BOUNDED_SIDE
+}
+
+
+
+
+}  // end namespace CGAL
+
+
+#endif // POLYHEDRAL_MESH_TRAITS_3_H_
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
new file mode 100644
index 0000000..a4fe82a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
@@ -0,0 +1,245 @@
+// Copyright (c) 2009-2010 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description :
+//
+//******************************************************************************
+
+#ifndef CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
+#define CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
+
+#include <CGAL/Mesh_3/config.h>
+
+#include <CGAL/Random.h>
+#include <CGAL/Polyhedral_mesh_domain_3.h>
+#include <CGAL/Mesh_domain_with_polyline_features_3.h>
+#include <CGAL/Mesh_polyhedron_3.h>
+
+#include <CGAL/Mesh_3/Detect_polylines_in_polyhedra.h>
+#include <CGAL/Mesh_3/Polyline_with_context.h>
+#include <CGAL/Mesh_3/Detect_features_in_polyhedra.h>
+
+#include <CGAL/enum.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <string>
+#include <vector>
+#include <fstream>
+
+
+namespace CGAL {
+
+/**
+ * @class Polyhedral_mesh_domain_with_features_3
+ *
+ *
+ */
+template < class IGT_,
+           class Polyhedron_ = typename Mesh_polyhedron_3<IGT_>::type,
+           class TriangleAccessor=Triangle_accessor_3<Polyhedron_,IGT_>,
+           class Use_patch_id_tag = Tag_true,
+           class Use_exact_intersection_construction_tag = Tag_true >
+class Polyhedral_mesh_domain_with_features_3
+  : public Mesh_domain_with_polyline_features_3<
+      Polyhedral_mesh_domain_3< Polyhedron_,
+                                IGT_,
+                                TriangleAccessor,
+                                Use_patch_id_tag,
+                                Use_exact_intersection_construction_tag > >
+{
+  typedef Mesh_domain_with_polyline_features_3<
+    Polyhedral_mesh_domain_3<
+      Polyhedron_, IGT_, TriangleAccessor,
+      Use_patch_id_tag, Use_exact_intersection_construction_tag > > Base;
+  
+public:
+  typedef Polyhedron_ Polyhedron;
+  
+  // Index types
+  typedef typename Base::Index                Index;
+  typedef typename Base::Corner_index         Corner_index;
+  typedef typename Base::Curve_segment_index  Curve_segment_index;
+  typedef typename Base::Surface_patch_index  Surface_patch_index;
+  typedef typename Base::Subdomain_index      Subdomain_index;
+  
+  // Backward compatibility
+#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+  typedef Surface_patch_index                 Surface_index;
+#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
+
+  typedef typename Base::R         R;
+  typedef typename Base::Point_3   Point_3;
+  typedef typename Base::FT        FT;
+  
+  typedef CGAL::Tag_true           Has_features;
+
+  /// Constructors
+  Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
+    CGAL::Random* p_rng = NULL);
+  Polyhedral_mesh_domain_with_features_3(const std::string& filename,
+    CGAL::Random* p_rng = NULL);
+
+  // The following is needed, because otherwise, when a "const char*" is
+  // passed, the constructors templates are a better match, than the
+  // constructor with `std::string`.
+  Polyhedral_mesh_domain_with_features_3(const char* filename,
+    CGAL::Random* p_rng = NULL);
+
+  template <typename T1, typename T2>
+  Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b,
+                                         CGAL::Random* p_rng = NULL)
+    : Base(a, b)
+  { this->set_random_generator(p_rng); }
+
+
+  template <typename T1, typename T2, typename T3>
+  Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b, const T3& c,
+                                         CGAL::Random* p_rng = NULL)
+    : Base(a, b, c)
+  { this->set_random_generator(p_rng); }
+
+  /// Destructor
+  ~Polyhedral_mesh_domain_with_features_3() {}
+
+  /// Detect features
+  void initialize_ts(Polyhedron& p);
+
+  void detect_features(FT angle_in_degree, Polyhedron& p);
+  void detect_features(FT angle_in_degree = FT(60)) { detect_features(angle_in_degree, polyhedron_); }
+
+private:
+  Polyhedron polyhedron_;
+
+public:
+  const Polyhedron& polyhedron() const { return polyhedron_; }
+  
+private:
+  // Disabled copy constructor & assignment operator
+  typedef Polyhedral_mesh_domain_with_features_3 Self;
+  Polyhedral_mesh_domain_with_features_3(const Self& src);
+  Self& operator=(const Self& src);
+
+};  // end class Polyhedral_mesh_domain_with_features_3
+
+
+template < typename GT_, typename P_, typename TA_,
+           typename Tag_, typename E_tag_>
+Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
+Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
+                                       CGAL::Random* p_rng)
+  : Base()
+  , polyhedron_(p)
+{
+  this->add_primitives(polyhedron_);
+  this->set_random_generator(p_rng);
+}
+
+template < typename GT_, typename P_, typename TA_,
+           typename Tag_, typename E_tag_>
+Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
+Polyhedral_mesh_domain_with_features_3(const char* filename,
+                                       CGAL::Random* p_rng)
+  : Base()
+  , polyhedron_()
+{
+  // Create input polyhedron
+  std::ifstream input(filename);
+  input >> polyhedron_;
+  this->add_primitives(polyhedron_);
+  this->set_random_generator(p_rng);
+}
+
+template < typename GT_, typename P_, typename TA_,
+           typename Tag_, typename E_tag_>
+Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
+Polyhedral_mesh_domain_with_features_3(const std::string& filename,
+                                       CGAL::Random* p_rng)
+  : Base()
+  , polyhedron_()
+{
+  // Create input polyhedron
+  std::ifstream input(filename.c_str());
+  input >> polyhedron_;
+  this->add_primitives(polyhedron_);
+  this->set_random_generator(p_rng);
+}
+
+
+template < typename GT_, typename P_, typename TA_,
+           typename Tag_, typename E_tag_>
+void
+Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
+initialize_ts(Polyhedron& p)
+{
+  std::size_t ts = 0;
+  for(typename Polyhedron::Vertex_iterator v = p.vertices_begin(),
+      end = p.vertices_end() ; v != end ; ++v)
+  {
+    v->set_time_stamp(ts++);
+  }
+  for(typename Polyhedron::Facet_iterator fit = p.facets_begin(),
+       end = p.facets_end() ; fit != end ; ++fit )
+  {
+    fit->set_time_stamp(ts++);
+  }
+  for(typename Polyhedron::Halfedge_iterator hit = p.halfedges_begin(),
+       end = p.halfedges_end() ; hit != end ; ++hit )
+  {
+    hit->set_time_stamp(ts++);
+  }
+}
+
+
+template < typename GT_, typename P_, typename TA_,
+           typename Tag_, typename E_tag_>
+void
+Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
+detect_features(FT angle_in_degree, Polyhedron& p)
+{
+  initialize_ts(p);
+  // Get sharp features
+  Mesh_3::detect_features(p,angle_in_degree);
+  
+  // Get polylines
+  typedef std::vector<Point_3> Bare_polyline;
+  typedef Mesh_3::Polyline_with_context<Surface_patch_index, Curve_segment_index,
+    Bare_polyline > Polyline;
+  
+  std::vector<Polyline> polylines;
+  typedef std::back_insert_iterator<std::vector<Polyline> > Output_iterator;
+
+  Mesh_3::detect_polylines<Polyhedron,Polyline,Output_iterator>(
+    &p, std::back_inserter(polylines));
+    
+  // Insert polylines in domain
+  Mesh_3::Extract_bare_polyline<Polyline> extractor;
+  
+  this->add_features(
+    boost::make_transform_iterator(polylines.begin(),extractor),
+    boost::make_transform_iterator(polylines.end(),extractor));
+}
+
+} //namespace CGAL
+
+
+#endif // CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_3.h
new file mode 100644
index 0000000..2329603
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_3.h
@@ -0,0 +1,1546 @@
+// Copyright (c) 1997  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>)
+
+#ifndef CGAL_POLYHEDRON_3_H
+#define CGAL_POLYHEDRON_3_H 1
+
+#include <CGAL/basic.h>
+#include <algorithm>
+#include <cstddef>
+
+#include <CGAL/HalfedgeDS_iterator.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/N_step_adaptor_derived.h>
+#include <CGAL/Polyhedron_items_3.h>
+#include <CGAL/HalfedgeDS_default.h>
+#include <CGAL/HalfedgeDS_const_decorator.h>
+#include <CGAL/HalfedgeDS_decorator.h>
+#include <CGAL/Modifier_base.h>
+#include <CGAL/IO/Verbose_ostream.h>
+#include <CGAL/Polyhedron_traits_3.h>
+
+
+namespace CGAL {
+
+template <class VertexBase>
+class I_Polyhedron_vertex  : public VertexBase  {
+public:
+    typedef VertexBase                            Base;
+    //typedef typename Base::HalfedgeDS              HDS;
+    typedef typename Base::Point                   Point;
+    typedef Point                                  Point_3;
+
+    // Handles have to explicitly repeated, although they are derived
+    typedef typename Base::Vertex_handle           Vertex_handle;
+    typedef typename Base::Halfedge_handle         Halfedge_handle;
+    typedef typename Base::Face_handle             Face_handle;
+    typedef typename Base::Face_handle             Facet_handle;
+    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
+    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
+    typedef typename Base::Face_const_handle       Face_const_handle;
+    typedef typename Base::Face_const_handle       Facet_const_handle;
+    typedef typename Base::Halfedge                Halfedge;
+    typedef typename Base::Face                    Face;
+    typedef typename Base::Face                    Facet;
+
+    // Supported options by HDS.
+    typedef typename Base::Supports_vertex_halfedge
+                                                  Supports_vertex_halfedge;
+    typedef typename Base::Supports_vertex_point  Supports_vertex_point;
+
+    // Circulator category.
+    typedef typename Halfedge::Supports_halfedge_prev  Supports_prev;
+
+public:
+    // Circulator category.
+    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
+    typedef typename Ctr::iterator_category circulator_category;
+
+    // Circulators around a vertex and around a facet.
+    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
+                                         Halfedge_around_facet_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
+                                        Halfedge_around_vertex_circulator;
+
+    typedef I_HalfedgeDS_facet_circ<
+        Halfedge_const_handle,
+        circulator_category>       Halfedge_around_facet_const_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ<
+        Halfedge_const_handle,
+        circulator_category>      Halfedge_around_vertex_const_circulator;
+
+
+
+    typedef typename Halfedge_around_vertex_circulator::size_type
+        size_type;
+    typedef typename Halfedge_around_vertex_circulator::difference_type
+        difference_type;
+
+public:
+    // We need to repeat the constructors here.
+    I_Polyhedron_vertex() {}
+    I_Polyhedron_vertex( const VertexBase& b) : VertexBase(b) {}
+    I_Polyhedron_vertex( const Point_3& p) : VertexBase(p) {}
+
+// New Access Functions (not provided in VertexBase).
+
+    Halfedge_around_vertex_circulator vertex_begin() {
+        // a circulator of halfedges around the vertex (clockwise).
+        return Halfedge_around_vertex_circulator( this->halfedge());
+    }
+    Halfedge_around_vertex_const_circulator vertex_begin() const {
+        // a circulator of halfedges around the vertex (clockwise).
+        return Halfedge_around_vertex_const_circulator( this->halfedge());
+    }
+
+    // the degree of the vertex, i.e., edges emanating from this vertex
+    std::size_t vertex_degree() const {
+        return this->halfedge()->vertex_degree();
+    }
+    size_type degree() const { return vertex_degree(); } //backwards compatible
+
+    // returns true if the vertex has exactly two incident edges
+    bool is_bivalent() const { return  this->halfedge()->is_bivalent(); }
+
+    // returns true if the vertex has exactly three incident edges
+    bool is_trivalent() const { return  this->halfedge()->is_trivalent(); }
+
+    // No longer hidden. Now the restricted version with precondition.
+    // sets incident halfedge to h. Precondition: h is incident, i.e.,
+    // h->vertex() == v.
+    void  set_halfedge( Halfedge_handle hh) {
+        CGAL_assertion( &*(hh->vertex()) == this);
+        Base::set_halfedge(hh);
+    }
+};
+
+// A halfedge is an oriented edge. Both orientations exist, i.e.
+// an edge is represented by two opposite halfedges. The geometric
+// relations are as follows:
+//
+//              _ _ _   .
+//             /        |\.
+//                      | \.
+//           /             \ next half
+//                          \ edge
+//         /                 \.
+//
+//        |                   O  incident vertex
+//                facet      ,
+//        |                 /| |
+//                         / | | opposite
+//         \                 | | half edge
+//                      half | |
+//           \          edge | | /
+//                           | |/
+//             \_ _ _ _ _ _    '
+//
+
+template <class HalfedgeBase>
+class I_Polyhedron_halfedge : public HalfedgeBase {
+public:
+    typedef HalfedgeBase                          Base;
+    typedef typename Base::HalfedgeDS              HDS;
+
+    // Handles have to explicitly repeated, although they are derived
+    typedef typename Base::Vertex_handle           Vertex_handle;
+    typedef typename Base::Halfedge_handle         Halfedge_handle;
+    typedef typename Base::Face_handle             Face_handle;
+    typedef typename Base::Face_handle             Facet_handle;
+    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
+    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
+    typedef typename Base::Face_const_handle       Face_const_handle;
+    typedef typename Base::Face_const_handle       Facet_const_handle;
+
+    typedef typename Base::Vertex                  Vertex;
+    typedef typename Base::Face                    Face;
+    typedef typename Base::Face                    Facet;
+
+    // Supported options by HDS.
+    typedef typename Base::Supports_halfedge_prev Supports_halfedge_prev;
+    typedef typename Base::Supports_halfedge_vertex
+                                                  Supports_halfedge_vertex;
+    typedef typename Base::Supports_halfedge_face Supports_halfedge_face;
+
+    // Circulator category.
+    typedef typename Base::Supports_halfedge_prev Supports_prev;
+
+public:
+    // Circulator category.
+    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
+    typedef typename Ctr::iterator_category circulator_category;
+
+    // Circulators around a vertex and around a facet.
+    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
+                                         Halfedge_around_facet_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
+                                        Halfedge_around_vertex_circulator;
+
+    typedef I_HalfedgeDS_facet_circ<
+        Halfedge_const_handle,
+        circulator_category>       Halfedge_around_facet_const_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ<
+        Halfedge_const_handle,
+        circulator_category>      Halfedge_around_vertex_const_circulator;
+
+
+
+public:
+    I_Polyhedron_halfedge() {}
+    I_Polyhedron_halfedge( const HalfedgeBase& b) : HalfedgeBase(b) {}
+
+// New Access Functions (not provided in HalfedgeBase).
+
+    // Change semantic of prev: it is always available at this level.
+    // If the HDS does not provide a prev-function, the previous
+    // halfedge will be searched around the incident facet.
+private:
+    Halfedge_handle       find_prev( Halfedge_handle,       Tag_true) {
+        return Base::prev();
+    }
+    Halfedge_const_handle find_prev( Halfedge_const_handle, Tag_true) const {
+        return Base::prev();
+    }
+    Halfedge_handle find_prev( Halfedge_handle h, Tag_false) const {
+        CGAL_precondition( &*h != this); // we have at least 2-gons
+        while ( &*(h->next()) != this)
+            h = h->next();
+        return h;
+    }
+    Halfedge_const_handle find_prev( Halfedge_const_handle h, Tag_false) const{
+        CGAL_precondition( &*h != this); // we have at least 2-gons
+        while ( &*(h->next()) != this)
+            h = h->next();
+        return h;
+    }
+
+public:
+    Halfedge_handle       prev() {
+        return find_prev( this->next(), Supports_halfedge_prev());
+    }
+    Halfedge_const_handle prev() const {
+        return find_prev( this->next(), Supports_halfedge_prev());
+    }
+
+    // Make face-functions also available as facet-functions.
+    Face_handle           facet()       { return this->face();}
+    Face_const_handle     facet() const { return this->face();}
+
+
+    // the next halfedge around the vertex (clockwise). This is equal to
+    // `h.next()->opposite()'.
+    Halfedge_handle       next_on_vertex() { return this->next()->opposite(); }
+    Halfedge_const_handle next_on_vertex() const {
+        return this->next()->opposite();
+    }
+
+    // the previous halfedge around the vertex (counterclockwise). Is
+    // equal to `h.opposite()->prev()'.
+    Halfedge_handle       prev_on_vertex() { return this->opposite()->prev(); }
+    Halfedge_const_handle prev_on_vertex() const {
+        return this->opposite()->prev();
+    }
+
+    bool is_border_edge() const {
+        // is true if `h' or `h.opposite()' is a border halfedge.
+        return (this->opposite()->is_border() || this->is_border());
+    }
+
+    // a circulator of halfedges around the vertex (clockwise).
+    Halfedge_around_vertex_circulator vertex_begin() {
+        return Halfedge_around_vertex_circulator(
+            HDS::halfedge_handle(this));
+    }
+    Halfedge_around_vertex_const_circulator vertex_begin() const {
+        return Halfedge_around_vertex_const_circulator(
+            HDS::halfedge_handle(this));
+    }
+
+    // a circulator of halfedges around the facet (counterclockwise).
+    Halfedge_around_facet_circulator facet_begin() {
+        return Halfedge_around_facet_circulator(
+            HDS::halfedge_handle(this));
+    }
+    Halfedge_around_facet_const_circulator facet_begin() const {
+        return Halfedge_around_facet_const_circulator(
+            HDS::halfedge_handle(this));
+    }
+
+    // the degree of the incident vertex, i.e., edges emanating from this
+    // vertex
+    std::size_t vertex_degree() const {
+        return circulator_size( vertex_begin());
+    }
+
+    // the degree of the incident facet, i.e., edges on the boundary of this
+    // facet
+    std::size_t facet_degree() const {
+        return circulator_size( facet_begin());
+    }
+
+    // returns true if the incident vertex has exactly two incident edges
+    bool is_bivalent() const {
+        CGAL_precondition( this != &* (this->next()->opposite()));
+        return  (this == &* (this->next()->opposite()->next()->opposite()));
+    }
+
+    // returns true if the incident vertex has exactly three incident edges
+    bool is_trivalent() const {
+        CGAL_precondition( this != &* (this->next()->opposite()));
+        return  (   this != &* (this->next()->opposite()->next()->opposite())
+                 && this == &* (this->next()->opposite()->next()->opposite()
+                                ->next()->opposite()));
+    }
+
+    // returns true if the incident facet is a triangle.
+    bool is_triangle() const {
+        CGAL_precondition( this != &* (this->next()));
+        CGAL_precondition( this != &* (this->next()->next()));
+        return  (this == &* (this->next()->next()->next()));
+    }
+
+    // returns true if the incident facet is a quadrilateral.
+    bool is_quad()     const {
+        CGAL_precondition( this != &* (this->next()));
+        CGAL_precondition( this != &* (this->next()->next()));
+        return  (this == &* (this->next()->next()->next()->next()));
+    }
+
+
+private:
+    // Hide some other functions of H.
+    void  set_next( Halfedge_handle hh)  { Base::set_next(hh);}
+    void  set_prev( Halfedge_handle hh)  { Base::set_prev(hh);}
+    void  set_vertex( Vertex_handle vv)  { Base::set_vertex(vv);}
+    void  set_face( Face_handle ff)      { Base::set_face(ff);}
+    void  set_facet( Face_handle ff)     { set_face(ff);}
+};
+
+
+template <class FacetBase>
+class I_Polyhedron_facet  : public FacetBase  {
+public:
+    typedef FacetBase                             Base;
+    //typedef typename Base::HalfedgeDS              HDS;
+    typedef typename Base::Plane                   Plane;
+    typedef Plane                                  Plane_3;
+
+    // Handles have to explicitly repeated, although they are derived
+    typedef typename Base::Vertex_handle           Vertex_handle;
+    typedef typename Base::Halfedge_handle         Halfedge_handle;
+    typedef typename Base::Face_handle             Face_handle;
+    typedef typename Base::Face_handle             Facet_handle;
+    typedef typename Base::Vertex_const_handle     Vertex_const_handle;
+    typedef typename Base::Halfedge_const_handle   Halfedge_const_handle;
+    typedef typename Base::Face_const_handle       Face_const_handle;
+    typedef typename Base::Face_const_handle       Facet_const_handle;
+    typedef typename Base::Vertex                  Vertex;
+    typedef typename Base::Halfedge                Halfedge;
+
+    // Supported options by HDS.
+    typedef typename Base::Supports_face_halfedge Supports_face_halfedge;
+    typedef typename Base::Supports_face_plane    Supports_face_plane;
+
+    // No longer required.
+    typedef Tag_false                             Supports_face_normal;
+
+    // Circulator category.
+    typedef typename Halfedge::Supports_halfedge_prev  Supports_prev;
+
+public:
+    // Circulator category.
+    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
+    typedef typename Ctr::iterator_category circulator_category;
+
+    // Circulators around a vertex and around a facet.
+    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
+                                         Halfedge_around_facet_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
+                                        Halfedge_around_vertex_circulator;
+
+    typedef I_HalfedgeDS_facet_circ<
+        Halfedge_const_handle,
+        circulator_category>       Halfedge_around_facet_const_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ<
+        Halfedge_const_handle,
+        circulator_category>      Halfedge_around_vertex_const_circulator;
+
+
+
+    typedef typename Halfedge_around_vertex_circulator::size_type
+        size_type;
+    typedef typename Halfedge_around_vertex_circulator::difference_type
+        difference_type;
+
+public:
+    // We need to repeat the constructors here.
+    I_Polyhedron_facet() {}
+    I_Polyhedron_facet( const FacetBase& b) : FacetBase(b) {}
+
+// New Access Functions (not provided in FacetBase).
+
+    Halfedge_around_facet_circulator facet_begin() {
+        // a circulator of halfedges around the facet (counterclockwise).
+        return Halfedge_around_facet_circulator( this->halfedge());
+    }
+    Halfedge_around_facet_const_circulator facet_begin() const {
+        // a circulator of halfedges around the facet (counterclockwise).
+        return Halfedge_around_facet_const_circulator( this->halfedge());
+    }
+
+    // the degree of the incident facet, i.e., edges on the boundary of this
+    // facet
+    std::size_t facet_degree() const {return this->halfedge()->facet_degree();}
+    size_type size() const { return facet_degree(); } // backwards compatible
+
+    // returns true if the facet is a triangle.
+    bool is_triangle() const { return this->halfedge()->is_triangle(); }
+
+    // returns true if the facet is a quadrilateral.
+    bool is_quad()     const { return this->halfedge()->is_quad(); }
+
+    // No longer hidden. Now the restricted version with precondition.
+    // sets incident halfedge to h. Precondition: h is incident, i.e.,
+    // h->face() == v.
+    void  set_halfedge( Halfedge_handle hh) {
+        CGAL_assertion( &*(hh->facet()) == this);
+        Base::set_halfedge(hh);
+    }
+};
+
+
+template < class Items>
+class I_Polyhedron_derived_items_3 {
+public:
+    template < class Refs, class Traits>
+    class Vertex_wrapper {
+    public:
+        typedef typename Items::template Vertex_wrapper<Refs,Traits> VWrap;
+        typedef typename VWrap::Vertex Vertex_base;
+        typedef I_Polyhedron_vertex< Vertex_base> Vertex;
+    };
+    template < class Refs, class Traits>
+    class Halfedge_wrapper {
+    public:
+        typedef typename Items::template Halfedge_wrapper<Refs,Traits> HWrap;
+        typedef typename HWrap::Halfedge Halfedge_base;
+        typedef I_Polyhedron_halfedge< Halfedge_base> Halfedge;
+    };
+    template < class Refs, class Traits>
+    class Face_wrapper {
+    public:
+        typedef typename Items::template Face_wrapper<Refs,Traits> FWrap;
+        typedef typename FWrap::Face Face_base;
+        typedef I_Polyhedron_facet< Face_base> Face;
+    };
+};
+
+
+template < class PolyhedronTraits_3,
+           class PolyhedronItems_3 = Polyhedron_items_3,
+           template < class T, class I, class A>
+           class T_HDS = HalfedgeDS_default,
+           class Alloc = CGAL_ALLOCATOR(int)>
+class Polyhedron_3 {
+    //
+    // DEFINITION
+    //
+    // The boundary representation of a 3d-polyhedron P of the type
+    // Polyhedron consists of vertices, edges and facets. The
+    // vertices are points in space. The edges are straight line
+    // segments. The facets are planar polygons. We restrict here
+    // the facets to be simple planar polygons without holes and the
+    // boundary of the polyhedron to be an oriented 2-manifold. Thus
+    // facets are consistently oriented and an edge is incident to
+    // exactly two facets. We restrict the representation further
+    // that an edge has two distinct incident endpoints and
+    // following duality that an edge has two distinct incident
+    // facets. The class Polyhedron is able to guarantee
+    // the combinatorial properties, but not all geometric
+    // properties. Support functions are provided for testing
+    // geometric properties, e.g. test for self intersections which
+    // is  too expensive to be guaranteed as a class invariant.
+public:
+    typedef Polyhedron_3< PolyhedronTraits_3, PolyhedronItems_3, T_HDS, Alloc>
+                                                  Self;
+    typedef PolyhedronTraits_3                    Traits;
+    typedef PolyhedronItems_3                     Items;
+    typedef I_Polyhedron_derived_items_3<Items>   Derived_items;
+    typedef T_HDS< Traits, Derived_items, Alloc>  HDS;
+    typedef HDS                                   HalfedgeDS;
+
+    // portability with older CGAL release
+    typedef HDS                                   Halfedge_data_structure;
+
+    typedef Alloc                                 Allocator;
+    typedef Alloc                                 allocator_type; // STL name
+
+    // Container stuff.
+    typedef typename HDS::size_type               size_type;
+    typedef typename HDS::difference_type         difference_type;
+    typedef typename HDS::iterator_category       iterator_category;
+    typedef typename HDS::Supports_removal        Supports_removal;
+
+    // Geometry
+    typedef typename Traits::Point_3              Point_3;
+    typedef Point_3                               Point;
+    typedef typename Traits::Plane_3              Plane_3;
+    // No longer required.
+    //typedef typename Traits::Normal               Normal;
+
+    // Items
+    typedef typename HDS::Vertex                  Vertex;
+    typedef typename HDS::Halfedge                Halfedge;
+    typedef typename HDS::Face                    Face;
+
+    typedef typename Vertex::Base                 VBase;
+    typedef typename Halfedge::Base               HBase;
+    typedef typename Face::Base                   FBase;
+
+    // Handles and Iterators
+    typedef typename HDS::Vertex_handle           Vertex_handle;
+    typedef typename HDS::Halfedge_handle         Halfedge_handle;
+    typedef typename HDS::Face_handle             Face_handle;
+    typedef typename HDS::Vertex_iterator         Vertex_iterator;
+    typedef typename HDS::Halfedge_iterator       Halfedge_iterator;
+    typedef typename HDS::Face_iterator           Face_iterator;
+
+    typedef typename HDS::Vertex_const_handle     Vertex_const_handle;
+    typedef typename HDS::Halfedge_const_handle   Halfedge_const_handle;
+    typedef typename HDS::Face_const_handle       Face_const_handle;
+    typedef typename HDS::Vertex_const_iterator   Vertex_const_iterator;
+    typedef typename HDS::Halfedge_const_iterator Halfedge_const_iterator;
+    typedef typename HDS::Face_const_iterator     Face_const_iterator;
+
+    // Auxiliary iterators for convenience
+    typedef Project_point<Vertex>                 Proj_point;
+    typedef Iterator_project<Vertex_iterator, Proj_point>
+                                                  Point_iterator;
+    typedef Iterator_project<Vertex_const_iterator, Proj_point,
+        const Point_3&, const Point_3*>           Point_const_iterator;
+
+    typedef Project_plane<Face>                   Proj_plane;
+    typedef Iterator_project<Face_iterator, Proj_plane>
+                                                  Plane_iterator;
+    typedef Iterator_project<Face_const_iterator, Proj_plane,
+        const Plane_3&, const Plane_3*>           Plane_const_iterator;
+
+    typedef N_step_adaptor_derived<Halfedge_iterator, 2>
+                                                  Edge_iterator;
+    typedef N_step_adaptor_derived<Halfedge_const_iterator, 2>
+                                                  Edge_const_iterator;
+
+    // All face related types get a related facet type name.
+    typedef Face                                  Facet;
+    typedef Face_handle                           Facet_handle;
+    typedef Face_iterator                         Facet_iterator;
+    typedef Face_const_handle                     Facet_const_handle;
+    typedef Face_const_iterator                   Facet_const_iterator;
+
+    // Supported options by HDS.
+    typedef typename VBase::Supports_vertex_halfedge
+                                                  Supports_vertex_halfedge;
+    typedef typename HBase::Supports_halfedge_prev  Supports_halfedge_prev;
+    typedef typename HBase::Supports_halfedge_prev  Supports_prev;
+    typedef typename HBase::Supports_halfedge_vertex
+                                                  Supports_halfedge_vertex;
+    typedef typename HBase::Supports_halfedge_face  Supports_halfedge_face;
+    typedef typename FBase::Supports_face_halfedge  Supports_face_halfedge;
+
+    // Supported options especially for Polyhedron_3.
+    typedef typename VBase::Supports_vertex_point   Supports_vertex_point;
+    typedef typename FBase::Supports_face_plane     Supports_face_plane;
+
+    // No longer required.
+    typedef Tag_false                               Supports_face_normal;
+
+    // Renamed versions for facet
+    typedef Supports_halfedge_face  Supports_halfedge_facet;
+    typedef Supports_face_halfedge  Supports_facet_halfedge;
+    typedef Supports_face_plane     Supports_facet_plane;
+    // No longer required.
+    typedef Supports_face_normal    Supports_facet_normal;
+
+public:
+    // Circulator category.
+    typedef HalfedgeDS_circulator_traits<Supports_prev> Ctr;
+    typedef typename Ctr::iterator_category circulator_category;
+
+    // Circulators around a vertex and around a facet.
+    typedef I_HalfedgeDS_facet_circ< Halfedge_handle, circulator_category>
+                                         Halfedge_around_facet_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ< Halfedge_handle, circulator_category>
+                                        Halfedge_around_vertex_circulator;
+
+    typedef I_HalfedgeDS_facet_circ<
+        Halfedge_const_handle,
+        circulator_category>       Halfedge_around_facet_const_circulator;
+
+    typedef I_HalfedgeDS_vertex_circ<
+        Halfedge_const_handle,
+        circulator_category>      Halfedge_around_vertex_const_circulator;
+
+
+
+protected:
+    HDS     hds_;  // the boundary representation.
+    Traits  m_traits;
+
+public:
+    HDS& hds() { return hds_; }
+    const HDS& hds() const { return hds_; }
+
+// CREATION
+public:
+
+    Polyhedron_3( const Traits& trts = Traits()) : m_traits(trts) {}
+        // the empty polyhedron `P'.
+
+    Polyhedron_3( size_type v, size_type h, size_type f,
+                  const Traits& traits = Traits())
+    : hds_(v,h,f), m_traits(traits) {}
+        // a polyhedron `P' with storage reserved for v vertices, h
+        // halfedges, and f facets. The reservation sizes are a hint for
+        // optimizing storage allocation.
+
+    void reserve( size_type v, size_type h, size_type f) {
+        // reserve storage for v vertices, h halfedges, and f facets. The
+        // reservation sizes are a hint for optimizing storage allocation.
+        // If the `capacity' is already greater than the requested size
+        // nothing happens. If the `capacity' changes all iterators and
+        // circulators invalidates.
+        hds_.reserve(v,h,f);
+    }
+
+protected:
+    Halfedge_handle
+    make_triangle( Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) {
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        Halfedge_handle h  = hds_.edges_push_back( Halfedge(), Halfedge());
+        h->HBase::set_next( hds_.edges_push_back( Halfedge(), Halfedge()));
+        h->next()->HBase::set_next( hds_.edges_push_back( Halfedge(),
+                                                         Halfedge()));
+        h->next()->next()->HBase::set_next( h);
+        decorator.set_prev( h, h->next()->next());
+        decorator.set_prev( h->next(), h);
+        decorator.set_prev( h->next()->next(), h->next());
+        h->opposite()->HBase::set_next( h->next()->next()->opposite());
+        h->next()->opposite()->HBase::set_next( h->opposite());
+        h->next()->next()->opposite()->HBase::set_next(
+            h->next()->opposite());
+        decorator.set_prev( h->opposite(), h->next()->opposite());
+        decorator.set_prev( h->next()->opposite(),
+                            h->next()->next()->opposite());
+        decorator.set_prev( h->next()->next()->opposite(), h->opposite());
+        // the vertices
+        decorator.set_vertex( h, v1);
+        decorator.set_vertex( h->next(), v2);
+        decorator.set_vertex( h->next()->next(), v3);
+        decorator.set_vertex( h->opposite(), v3);
+        decorator.set_vertex( h->next()->opposite(), v1);
+        decorator.set_vertex( h->next()->next()->opposite(), v2);
+        decorator.set_vertex_halfedge( h);
+        decorator.set_vertex_halfedge( h->next());
+        decorator.set_vertex_halfedge( h->next()->next());
+        // the facet
+        Facet_handle f = decorator.faces_push_back( Facet());
+        decorator.set_face( h, f);
+        decorator.set_face( h->next(), f);
+        decorator.set_face( h->next()->next(), f);
+        decorator.set_face_halfedge( h);
+        return h;
+    }
+
+    Halfedge_handle
+    make_tetrahedron( Vertex_handle v1,
+                      Vertex_handle v2,
+                      Vertex_handle v3,
+                      Vertex_handle v4) {
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        Halfedge_handle h  = make_triangle(v1,v2,v3);
+        // The remaining tip.
+        Halfedge_handle g  = hds_.edges_push_back( Halfedge(), Halfedge());
+        decorator.insert_tip( g->opposite(), h->opposite());
+        decorator.close_tip( g);
+        decorator.set_vertex( g, v4);
+        Halfedge_handle e  = hds_.edges_push_back( Halfedge(), Halfedge());
+        Halfedge_handle d  = hds_.edges_push_back( Halfedge(), Halfedge());
+        decorator.insert_tip( e->opposite(), h->next()->opposite());
+        decorator.insert_tip( e, g);
+        decorator.insert_tip( d->opposite(),h->next()->next()->opposite());
+        decorator.insert_tip( d, e);
+        decorator.set_vertex_halfedge( g);
+        // facets
+        Facet_handle f = decorator.faces_push_back( Facet());
+        decorator.set_face( h->opposite(), f);
+        decorator.set_face( g, f);
+        decorator.set_face( e->opposite(), f);
+        decorator.set_face_halfedge( g);
+        f = decorator.faces_push_back( Facet());
+        decorator.set_face( h->next()->opposite(), f);
+        decorator.set_face( e, f);
+        decorator.set_face( d->opposite(), f);
+        decorator.set_face_halfedge( e);
+        f = decorator.faces_push_back( Facet());
+        decorator.set_face( h->next()->next()->opposite(), f);
+        decorator.set_face( d, f);
+        decorator.set_face( g->opposite(), f);
+        decorator.set_face_halfedge( d);
+        return h;
+    }
+
+public:
+    Halfedge_handle make_tetrahedron() {
+        // the combinatorial structure of a tetrahedron is added to the
+        // actual polyhedral surface. Returns an arbitrary halfedge of
+        // this structure.
+        reserve( 4 + size_of_vertices(),
+                12 + size_of_halfedges(),
+                 4 + size_of_facets());
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        return make_tetrahedron( decorator.vertices_push_back( Vertex()),
+                                 decorator.vertices_push_back( Vertex()),
+                                 decorator.vertices_push_back( Vertex()),
+                                 decorator.vertices_push_back( Vertex()));
+    }
+
+    Halfedge_handle make_tetrahedron( const Point_3& p1,
+                                      const Point_3& p2,
+                                      const Point_3& p3,
+                                      const Point_3& p4) {
+        reserve( 4 + size_of_vertices(),
+                12 + size_of_halfedges(),
+                 4 + size_of_facets());
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        return make_tetrahedron( decorator.vertices_push_back( Vertex(p1)),
+                                 decorator.vertices_push_back( Vertex(p2)),
+                                 decorator.vertices_push_back( Vertex(p3)),
+                                 decorator.vertices_push_back( Vertex(p4)));
+
+    }
+
+    Halfedge_handle make_triangle() {
+        // the combinatorial structure of a single triangle with border
+        // edges is added to the actual polyhedral surface. Returns an
+        // arbitrary halfedge of this structure.
+        reserve( 3 + size_of_vertices(),
+                 6 + size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        return make_triangle( decorator.vertices_push_back( Vertex()),
+                              decorator.vertices_push_back( Vertex()),
+                              decorator.vertices_push_back( Vertex()));
+    }
+
+    Halfedge_handle make_triangle( const Point_3& p1,
+                                   const Point_3& p2,
+                                   const Point_3& p3) {
+        // the single triangle p_1, p_2, p_3 with border edges is added to
+        // the actual polyhedral surface. Returns an arbitrary halfedge of
+        // this structure.
+        reserve( 3 + size_of_vertices(),
+                 6 + size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        return make_triangle( decorator.vertices_push_back( Vertex(p1)),
+                              decorator.vertices_push_back( Vertex(p2)),
+                              decorator.vertices_push_back( Vertex(p3)));
+    }
+
+// Access Member Functions
+
+    allocator_type get_allocator() const { return hds_.get_allocator(); }
+
+    size_type size_of_vertices() const { return hds_.size_of_vertices();}
+        // number of vertices.
+
+    size_type size_of_halfedges() const { return hds_.size_of_halfedges();}
+        // number of all halfedges (including border halfedges).
+
+    size_type size_of_facets() const { return hds_.size_of_faces();}
+        // number of facets.
+
+    bool empty() const { return size_of_halfedges() == 0; }
+
+    bool is_empty() const { return size_of_halfedges() == 0; }
+
+    size_type capacity_of_vertices() const {
+        // space reserved for vertices.
+        return hds_.capacity_of_vertices();
+    }
+
+    size_type capacity_of_halfedges() const {
+        // space reserved for halfedges.
+        return hds_.capacity_of_halfedges();
+    }
+
+    size_type capacity_of_facets() const {
+        // space reserved for facets.
+        return hds_.capacity_of_faces();
+    }
+
+    std::size_t bytes() const {
+        // bytes used for the polyhedron.
+        return sizeof(Self) - sizeof(HDS) + hds_.bytes();
+    }
+
+    std::size_t bytes_reserved() const {
+        // bytes reserved for the polyhedron.
+        return sizeof(Self) - sizeof(HDS) + hds_.bytes_reserved();
+    }
+
+    Vertex_iterator vertices_begin() { return hds_.vertices_begin();}
+        // iterator over all vertices.
+
+    Vertex_iterator vertices_end() { return hds_.vertices_end();}
+
+    Halfedge_iterator halfedges_begin() { return hds_.halfedges_begin();}
+        // iterator over all halfedges
+
+    Halfedge_iterator halfedges_end() { return hds_.halfedges_end();}
+
+    Facet_iterator facets_begin() { return hds_.faces_begin();}
+        // iterator over all facets
+
+    Facet_iterator facets_end() { return hds_.faces_end();}
+
+    // The constant iterators and circulators.
+
+    Vertex_const_iterator vertices_begin() const {
+        return hds_.vertices_begin();
+    }
+    Vertex_const_iterator vertices_end() const {
+        return hds_.vertices_end();
+    }
+
+    Halfedge_const_iterator halfedges_begin() const {
+      return hds_.halfedges_begin();
+    }
+    Halfedge_const_iterator halfedges_end() const {
+        return hds_.halfedges_end();
+    }
+    Facet_const_iterator facets_begin() const { return hds_.faces_begin();}
+    Facet_const_iterator facets_end()   const { return hds_.faces_end();}
+
+    // Auxiliary iterators for convinience
+    Point_iterator       points_begin()       { return vertices_begin();}
+    Point_iterator       points_end()         { return vertices_end();}
+
+    Point_const_iterator points_begin() const { return vertices_begin();}
+    Point_const_iterator points_end()   const { return vertices_end();}
+
+    Plane_iterator       planes_begin()       { return facets_begin();}
+    Plane_iterator       planes_end()         { return facets_end();}
+
+    Plane_const_iterator planes_begin() const { return facets_begin();}
+    Plane_const_iterator planes_end()   const { return facets_end();}
+
+    Edge_iterator        edges_begin()        { return halfedges_begin();}
+        // iterator over all edges. The iterator refers to halfedges, but
+        // enumerates only one of the two corresponding opposite
+        // halfedges.
+    Edge_iterator        edges_end()          { return halfedges_end();}
+        // end of the range over all edges.
+
+    Edge_const_iterator  edges_begin()  const { return halfedges_begin();}
+    Edge_const_iterator  edges_end()    const { return halfedges_end();}
+
+    Traits&       traits()       { return m_traits; }
+    const Traits& traits() const { return m_traits; }
+
+
+// Combinatorial Predicates
+
+    bool is_closed() const {
+        for ( Halfedge_const_iterator i = halfedges_begin();
+              i != halfedges_end(); ++i) {
+            if ( i->is_border())
+                return false;
+        }
+        return true;
+    }
+
+private:
+    bool is_pure_bivalent( Tag_true) const {
+        for ( Vertex_const_iterator i = vertices_begin();
+              i != vertices_end(); ++i)
+            if ( ! i->is_bivalent())
+                return false;
+        return true;
+    }
+    bool is_pure_bivalent( Tag_false) const {
+        for ( Halfedge_const_iterator i = halfedges_begin();
+              i != halfedges_end(); ++i)
+            if ( ! i->is_bivalent())
+                return false;
+        return true;
+    }
+
+public:
+    // returns true if all vertices have exactly two incident edges
+    bool is_pure_bivalent() const {
+        return is_pure_bivalent( Supports_vertex_halfedge());
+    }
+
+private:
+    bool is_pure_trivalent( Tag_true) const {
+        for ( Vertex_const_iterator i = vertices_begin();
+              i != vertices_end(); ++i)
+            if ( ! i->is_trivalent())
+                return false;
+        return true;
+    }
+    bool is_pure_trivalent( Tag_false) const {
+        for ( Halfedge_const_iterator i = halfedges_begin();
+              i != halfedges_end(); ++i)
+            if ( ! i->is_trivalent())
+                return false;
+        return true;
+    }
+
+public:
+    // returns true if all vertices have exactly three incident edges
+    bool is_pure_trivalent() const {
+        return is_pure_trivalent( Supports_vertex_halfedge());
+    }
+
+private:
+    bool is_pure_triangle( Tag_true) const {
+        for ( Facet_const_iterator i = facets_begin();
+              i != facets_end(); ++i)
+            if ( ! i->is_triangle())
+                return false;
+        return true;
+    }
+    bool is_pure_triangle( Tag_false) const {
+        for ( Halfedge_const_iterator i = halfedges_begin();
+              i != halfedges_end(); ++i)
+            if ( ! i->is_border() && ! i->is_triangle())
+                return false;
+        return true;
+    }
+
+public:
+    // returns true if all facets are triangles
+    bool is_pure_triangle() const {
+        return is_pure_triangle( Supports_facet_halfedge());
+    }
+
+private:
+    bool is_pure_quad( Tag_true) const {
+        for ( Facet_const_iterator i = facets_begin();
+              i != facets_end(); ++i)
+            if ( ! i->is_quad())
+                return false;
+        return true;
+    }
+    bool is_pure_quad( Tag_false) const {
+        for ( Halfedge_const_iterator i = halfedges_begin();
+              i != halfedges_end(); ++i)
+            if ( ! i->is_border() && ! i->is_quad())
+                return false;
+        return true;
+    }
+
+public:
+    // returns true if all facets are quadrilaterals
+    bool is_pure_quad() const {
+        return is_pure_quad( Supports_facet_halfedge());
+    }
+
+
+// Geometric Predicates
+
+    bool
+    is_triangle( Halfedge_const_handle h1) const {
+        Halfedge_const_handle h2 = h1->next();
+        Halfedge_const_handle h3 = h1->next()->next();
+        // check halfedge combinatorics.
+        // exact two edges at vertices 1, 2, 3.
+        if ( h1->opposite()->next() != h3->opposite())    return false;
+        if ( h2->opposite()->next() != h1->opposite())    return false;
+        if ( h3->opposite()->next() != h2->opposite())    return false;
+        // The facet is a triangle.
+        if ( h1->next()->next()->next() != h1) return false;
+
+        if ( check_tag( Supports_halfedge_face())
+             &&  ! h1->is_border_edge())
+            return false;  // implies h2 and h3
+        CGAL_assertion( ! h1->is_border() || ! h1->opposite()->is_border());
+
+        // Assert consistency.
+        CGAL_assertion( h1 != h2);
+        CGAL_assertion( h1 != h3);
+        CGAL_assertion( h3 != h2);
+
+        // check prev pointer.
+        CGAL_assertion_code( HalfedgeDS_items_decorator<HDS> D;)
+        CGAL_assertion(D.get_prev(h1) == Halfedge_handle() ||
+                       D.get_prev(h1) == h3);
+        CGAL_assertion(D.get_prev(h2) == Halfedge_handle() ||
+                       D.get_prev(h2) == h1);
+        CGAL_assertion(D.get_prev(h3) == Halfedge_handle() ||
+                       D.get_prev(h3) == h2);
+
+        // check vertices.
+        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h2->opposite()));
+        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h3->opposite()));
+        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h1->opposite()));
+
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h1) != D.get_vertex(h2));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h1) != D.get_vertex(h3));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h2) != D.get_vertex(h3));
+
+        // check facets.
+        CGAL_assertion( D.get_face(h1) == D.get_face(h2));
+        CGAL_assertion( D.get_face(h1) == D.get_face(h3));
+
+        return true;
+    }
+
+    bool
+    is_tetrahedron( Halfedge_const_handle h1) const {
+        Halfedge_const_handle h2 = h1->next();
+        Halfedge_const_handle h3 = h1->next()->next();
+        Halfedge_const_handle h4 = h1->opposite()->next();
+        Halfedge_const_handle h5 = h2->opposite()->next();
+        Halfedge_const_handle h6 = h3->opposite()->next();
+        // check halfedge combinatorics.
+        // at least three edges at vertices 1, 2, 3.
+        if ( h4 == h3->opposite())    return false;
+        if ( h5 == h1->opposite())    return false;
+        if ( h6 == h2->opposite())    return false;
+        // exact three edges at vertices 1, 2, 3.
+        if ( h4->opposite()->next() != h3->opposite())    return false;
+        if ( h5->opposite()->next() != h1->opposite())    return false;
+        if ( h6->opposite()->next() != h2->opposite())    return false;
+        // three edges at v4.
+        if ( h4->next()->opposite() != h5) return false;
+        if ( h5->next()->opposite() != h6) return false;
+        if ( h6->next()->opposite() != h4) return false;
+        // All facets are triangles.
+        if ( h1->next()->next()->next() != h1) return false;
+        if ( h4->next()->next()->next() != h4) return false;
+        if ( h5->next()->next()->next() != h5) return false;
+        if ( h6->next()->next()->next() != h6) return false;
+        // all edges are non-border edges.
+        if ( h1->is_border()) return false;  // implies h2 and h3
+        CGAL_assertion( ! h2->is_border());
+        CGAL_assertion( ! h3->is_border());
+        if ( h4->is_border()) return false;
+        if ( h5->is_border()) return false;
+        if ( h6->is_border()) return false;
+
+        // Assert consistency.
+        CGAL_assertion( h1 != h2);
+        CGAL_assertion( h1 != h3);
+        CGAL_assertion( h3 != h2);
+        CGAL_assertion( h4 != h5);
+        CGAL_assertion( h5 != h6);
+        CGAL_assertion( h6 != h4);
+
+        // check prev pointer.
+        CGAL_assertion_code( HalfedgeDS_items_decorator<HDS> D;)
+        CGAL_assertion(D.get_prev(h1) == Halfedge_handle() ||
+                       D.get_prev(h1) == h3);
+        CGAL_assertion(D.get_prev(h2) == Halfedge_handle() ||
+                       D.get_prev(h2) == h1);
+        CGAL_assertion(D.get_prev(h3) == Halfedge_handle() ||
+                       D.get_prev(h3) == h2);
+        CGAL_assertion(D.get_prev(h4) == Halfedge_handle() ||
+                  D.get_prev(h4) == h1->opposite());
+        CGAL_assertion(D.get_prev(h5) == Halfedge_handle() ||
+                  D.get_prev(h5) == h2->opposite());
+        CGAL_assertion(D.get_prev(h6) == Halfedge_handle() ||
+                  D.get_prev(h6) == h3->opposite());
+
+        // check vertices.
+        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h2->opposite()));
+        CGAL_assertion( D.get_vertex(h1) == D.get_vertex( h5->opposite()));
+        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h3->opposite()));
+        CGAL_assertion( D.get_vertex(h2) == D.get_vertex( h6->opposite()));
+        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h1->opposite()));
+        CGAL_assertion( D.get_vertex(h3) == D.get_vertex( h4->opposite()));
+        CGAL_assertion( D.get_vertex(h4) == D.get_vertex( h5));
+        CGAL_assertion( D.get_vertex(h4) == D.get_vertex( h6));
+
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h1) != D.get_vertex(h2));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h1) != D.get_vertex(h3));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h1) != D.get_vertex(h4));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h2) != D.get_vertex(h3));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h2) != D.get_vertex(h4));
+        CGAL_assertion( ! check_tag( Supports_halfedge_vertex()) ||
+                   D.get_vertex(h3) != D.get_vertex(h4));
+
+        // check facets.
+        CGAL_assertion( D.get_face(h1) == D.get_face(h2));
+        CGAL_assertion( D.get_face(h1) == D.get_face(h3));
+        CGAL_assertion( D.get_face(h4) == D.get_face(h4->next()));
+        CGAL_assertion( D.get_face(h4) == D.get_face(h1->opposite()));
+        CGAL_assertion( D.get_face(h5) == D.get_face(h5->next()));
+        CGAL_assertion( D.get_face(h5) == D.get_face(h2->opposite()));
+        CGAL_assertion( D.get_face(h6) == D.get_face(h6->next()));
+        CGAL_assertion( D.get_face(h6) == D.get_face(h3->opposite()));
+
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h1) != D.get_face(h4));
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h1) != D.get_face(h5));
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h1) != D.get_face(h6));
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h4) != D.get_face(h5));
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h4) != D.get_face(h6));
+        CGAL_assertion( ! check_tag( Supports_halfedge_face()) ||
+                   D.get_face(h5) != D.get_face(h6));
+
+        return true;
+    }
+
+// Euler Operators (Combinatorial Modifications)
+//
+// The following Euler operations modify consistently the combinatorial
+// structure of the polyhedral surface. The geometry remains unchanged.
+
+    Halfedge_handle split_facet( Halfedge_handle h, Halfedge_handle g) {
+        // split the facet incident to `h' and `g' into two facets with
+        // new diagonal between the two vertices denoted by `h' and `g'
+        // respectively. The second (new) facet is a copy of the first
+        // facet. It returns the new diagonal. The time is proportional to
+        // the distance from `h' to `g' around the facet. Precondition:
+        // `h' and `g' are incident to the same facet. `h != g' (no
+        // loops). `h->next() != g' and `g->next() != h' (no multi-edges).
+        reserve( size_of_vertices(),
+                 2 + size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( D.get_face(h) == D.get_face(g));
+        CGAL_precondition( h != g);
+        CGAL_precondition( h != g->next());
+        CGAL_precondition( h->next() != g);
+        return D.split_face( h, g);
+    }
+
+    Halfedge_handle join_facet( Halfedge_handle h) {
+        // join the two facets incident to h. The facet incident to
+        // `h->opposite()' gets removed. Both facets might be holes.
+        // Returns the predecessor of h. The invariant `join_facet(
+        // split_facet( h, g))' returns h and keeps the polyhedron
+        // unchanged. The time is proportional to the size of the facet
+        // removed and the time to compute `h.prev()'. Precondition:
+        // `HDS' supports removal of facets. The degree of both
+        // vertices incident to h is at least three (no antennas).
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( circulator_size(h->vertex_begin())
+                           >= size_type(3));
+        CGAL_precondition( circulator_size(h->opposite()->vertex_begin())
+                           >= size_type(3));
+        return D.join_face(h);
+    }
+
+    Halfedge_handle split_vertex( Halfedge_handle h, Halfedge_handle g) {
+        // split the vertex incident to `h' and `g' into two vertices and
+        // connects them with a new edge. The second (new) vertex is a
+        // copy of the first vertex. It returns the new edge. The time is
+        // proportional to the distance from `h' to `g' around the vertex.
+        // Precondition: `h' and `g' are incident to the same vertex. `h
+        // != g' (no antennas). `h->next() != g' and `g->next() != h'.
+        reserve( 1 + size_of_vertices(),
+                 2 + size_of_halfedges(),
+                 size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( D.get_vertex(h) == D.get_vertex(g));
+        CGAL_precondition( h != g);
+        return D.split_vertex( h, g);
+    }
+
+    Halfedge_handle join_vertex( Halfedge_handle h) {
+        // join the two vertices incident to h. The vertex denoted by
+        // `h->opposite()' gets removed. Returns the predecessor of h. The
+        // invariant `join_vertex( split_vertex( h, g))' returns h and
+        // keeps the polyhedron unchanged. The time is proportional to
+        // the degree of the vertex removed and the time to compute
+        // `h.prev()'.
+        // Precondition: `HDS' supports removal of vertices. The size of
+        // both facets incident to h is at least four (no multi-edges)
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( circulator_size( h->facet_begin())
+                           >= size_type(4));
+        CGAL_precondition( circulator_size( h->opposite()->facet_begin())
+                           >= size_type(4));
+        return D.join_vertex(h);
+    }
+
+    Halfedge_handle split_edge( Halfedge_handle h) {
+        return split_vertex( h->prev(), h->opposite())->opposite();
+    }
+
+    Halfedge_handle flip_edge( Halfedge_handle h) {
+        HalfedgeDS_items_decorator<HDS> D;
+        return D.flip_edge(h);
+    }
+
+    Halfedge_handle create_center_vertex( Halfedge_handle h) {
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_assertion( circulator_size( h->facet_begin())
+                        >= size_type(3));
+        return D.create_center_vertex(h);
+    }
+
+    Halfedge_handle erase_center_vertex( Halfedge_handle h) {
+        HalfedgeDS_decorator<HDS> D(hds_);
+        return D.erase_center_vertex(h);
+    }
+
+// Euler Operators Modifying Genus
+
+    Halfedge_handle split_loop( Halfedge_handle h,
+                                Halfedge_handle i,
+                                Halfedge_handle j) {
+        // cut the polyhedron into two parts along the cycle (h,i,j).
+        // Three copies of the vertices and two new triangles will be
+        // created. h,i,j will be incident to the first new triangle. The
+        // returnvalue will be an halfedge iterator denoting the new
+        // halfegdes of the second new triangle which was h beforehand.
+        // Precondition: h,i,j are distinct, consecutive vertices of the
+        // polyhedron and form a cycle: i.e. `h->vertex() == i->opposite()
+        // ->vertex()', ..., `j->vertex() == h->opposite()->vertex()'. The
+        // six facets incident to h,i,j are all distinct.
+        reserve( 3 + size_of_vertices(),
+                 6 + size_of_halfedges(),
+                 2 + size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( h != i);
+        CGAL_precondition( h != j);
+        CGAL_precondition( i != j);
+        CGAL_precondition( D.get_vertex(h) == D.get_vertex(i->opposite()));
+        CGAL_precondition( D.get_vertex(i) == D.get_vertex(j->opposite()));
+        CGAL_precondition( D.get_vertex(j) == D.get_vertex(h->opposite()));
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(i));
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(j));
+        CGAL_precondition( D.get_face(i) == Facet_handle() ||
+                           D.get_face(i) != D.get_face(j));
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(h->opposite()));
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(i->opposite()));
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(j->opposite()));
+        CGAL_precondition( D.get_face(i) == Facet_handle() ||
+                           D.get_face(i) != D.get_face(h->opposite()));
+        CGAL_precondition( D.get_face(i) == Facet_handle() ||
+                           D.get_face(i) != D.get_face(i->opposite()));
+        CGAL_precondition( D.get_face(i) == Facet_handle() ||
+                           D.get_face(i) != D.get_face(j->opposite()));
+        CGAL_precondition( D.get_face(j) == Facet_handle() ||
+                           D.get_face(j) != D.get_face(h->opposite()));
+        CGAL_precondition( D.get_face(j) == Facet_handle() ||
+                           D.get_face(j) != D.get_face(i->opposite()));
+        CGAL_precondition( D.get_face(j) == Facet_handle() ||
+                           D.get_face(j) != D.get_face(j->opposite()));
+        CGAL_precondition( D.get_face(h->opposite()) == Facet_handle() ||
+            D.get_face(h->opposite()) != D.get_face(i->opposite()));
+        CGAL_precondition( D.get_face(h->opposite()) == Facet_handle() ||
+            D.get_face(h->opposite()) != D.get_face(j->opposite()));
+        CGAL_precondition( D.get_face(i->opposite()) == Facet_handle() ||
+            D.get_face(i->opposite()) != D.get_face(j->opposite()));
+        return D.split_loop( h, i, j);
+    }
+
+    Halfedge_handle join_loop( Halfedge_handle h, Halfedge_handle g) {
+        // glues the boundary of two facets together. Both facets and the
+        // vertices of g gets removed. Returns an halfedge iterator for h.
+        // The invariant `join_loop( h, split_loop( h, i, j))' returns h
+        // and keeps the polyhedron unchanged. Precondition: `HDS'
+        // supports removal of vertices and facets. The facets denoted by
+        // h and g have equal size.
+        HalfedgeDS_decorator<HDS> D(hds_);
+        CGAL_precondition( D.get_face(h) == Facet_handle() ||
+                           D.get_face(h) != D.get_face(g));
+        CGAL_precondition( circulator_size( h->facet_begin())
+                           >= size_type(3));
+        CGAL_precondition( circulator_size( h->facet_begin())
+                           == circulator_size( g->facet_begin()));
+        return D.join_loop( h, g);
+    }
+
+// Modifying Facets and Holes
+
+    Halfedge_handle make_hole( Halfedge_handle h) {
+        // removes incident facet and makes all halfedges incident to the
+        // facet to border edges. Returns h. Precondition: `HDS'
+        // supports removal of facets. `! h.is_border()'.
+        HalfedgeDS_decorator<HDS> D(hds_);
+        return D.make_hole(h);
+    }
+
+    Halfedge_handle fill_hole( Halfedge_handle h) {
+        // fill a hole with a new created facet. Makes all border
+        // halfedges of the hole denoted by h incident to the new facet.
+        // Returns h. Precondition: `h.is_border()'.
+        reserve( size_of_vertices(),
+                 size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        return D.fill_hole(h);
+    }
+
+    Halfedge_handle add_vertex_and_facet_to_border( Halfedge_handle h,
+                                                    Halfedge_handle g) {
+        // creates a new facet within the hole incident to h and g by
+        // connecting the tip of g with the tip of h with two new
+        // halfedges and a new vertex and filling this separated part of
+        // the hole with a new facet. Returns the new halfedge incident to
+        // the new facet and the new vertex. Precondition: `h->is_border(
+        // )', `g->is_border()', `h != g', and g can be reached along the
+        // same hole starting with h.
+        CGAL_precondition( h != g);
+        reserve( 1 + size_of_vertices(),
+                 4 + size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        Halfedge_handle hh = D.add_face_to_border( h, g);
+        CGAL_assertion( hh == g->next());
+        D.split_vertex( g, hh->opposite());
+        return g->next();
+    }
+
+    Halfedge_handle add_facet_to_border( Halfedge_handle h,
+                                         Halfedge_handle g) {
+        // creates a new facet within the hole incident to h and g by
+        // connecting the tip of g with the tip of h with a new halfedge
+        // and filling this separated part of the hole with a new facet.
+        // Returns the new halfedge incident to the new facet.
+        // Precondition: `h->is_border()', `g->is_border()', `h != g',
+        // `h->next() != g', and g can be reached along the same hole
+        // starting with h.
+        CGAL_precondition( h != g);
+        CGAL_precondition( h->next() != g);
+        reserve( size_of_vertices(),
+                 2 + size_of_halfedges(),
+                 1 + size_of_facets());
+        HalfedgeDS_decorator<HDS> D(hds_);
+        return D.add_face_to_border( h, g);
+    }
+
+// Erasing
+
+    void erase_facet( Halfedge_handle h) {
+        // removes the incident facet of h and changes all halfedges
+        // incident to the facet into border edges or removes them from
+        // the polyhedral surface if they were already border edges. See
+        // `make_hole(h)' for a more specialized variant. Precondition:
+        // `Traits' supports removal.
+        HalfedgeDS_decorator<HDS> D(hds_);
+        D.erase_face(h);
+    }
+
+    void erase_connected_component( Halfedge_handle h) {
+        // removes the vertices, halfedges, and facets that belong to the
+        // connected component of h. Precondition: `Traits' supports
+        // removal.
+        HalfedgeDS_decorator<HDS> D(hds_);
+        D.erase_connected_component(h);
+    }
+
+    /// Erases the small connected components and the isolated vertices.
+    ///
+    /// @commentheading Preconditions:
+    /// supports vertices, halfedges, and removal operation.
+    ///
+    /// @commentheading Template Parameters:
+    /// @param nb_components_to_keep the number of large connected components to keep.
+    ///
+    /// @return the number of connected components erased (ignoring isolated vertices).
+    unsigned int keep_largest_connected_components(unsigned int nb_components_to_keep)
+    {
+        HalfedgeDS_decorator<HDS> D(hds_);
+        return D.keep_largest_connected_components(nb_components_to_keep);
+    }
+
+    void clear() { hds_.clear(); }
+        // removes all vertices, halfedges, and facets.
+
+    void erase_all() { clear(); }
+        // equivalent to `clear()'. Depricated.
+
+// Special Operations on Polyhedral Surfaces
+
+    void delegate( Modifier_base<HDS>& modifier) {
+        // calls the `operator()' of the `modifier'. Precondition: The
+        // `modifier' returns a consistent representation.
+        modifier( hds_);
+        CGAL_expensive_postcondition( is_valid());
+    }
+
+// Operations with Border Halfedges
+
+    size_type size_of_border_halfedges() const {
+        // number of border halfedges. An edge with no incident facet
+        // counts as two border halfedges. Precondition: `normalize_border
+        // ()' has been called and no halfedge insertion or removal and no
+        // change in border status of the halfedges have occured since
+        // then.
+        return hds_.size_of_border_halfedges();
+    }
+
+    size_type size_of_border_edges() const {
+        // number of border edges. If `size_of_border_edges() ==
+        // size_of_border_halfedges()' all border edges are incident to a
+        // facet on one side and to a hole on the other side.
+        // Precondition: `normalize_border()' has been called and no
+        // halfedge insertion or removal and no change in border status of
+        // the halfedges have occured since then.
+        return hds_.size_of_border_edges();
+    }
+
+    Halfedge_iterator border_halfedges_begin() {
+        // halfedge iterator starting with the border edges. The range [
+        // `halfedges_begin(), border_halfedges_begin()') denotes all
+        // non-border edges. The range [`border_halfedges_begin(),
+        // halfedges_end()') denotes all border edges. Precondition:
+        // `normalize_border()' has been called and no halfedge insertion
+        // or removal and no change in border status of the halfedges have
+        // occured since then.
+        return hds_.border_halfedges_begin();
+    }
+    Halfedge_const_iterator border_halfedges_begin() const {
+        return hds_.border_halfedges_begin();
+    }
+
+    // Convenient edge iterator
+    Edge_iterator border_edges_begin() { return border_halfedges_begin(); }
+    Edge_const_iterator border_edges_begin() const {
+        return border_halfedges_begin();
+    }
+
+    bool normalized_border_is_valid( bool verbose = false) const {
+        // checks whether all non-border edges precedes the border edges.
+        HalfedgeDS_const_decorator<HDS> decorator(hds_);
+        bool valid = decorator.normalized_border_is_valid( verbose);
+        for ( Halfedge_const_iterator i = border_halfedges_begin();
+              valid && (i != halfedges_end()); (++i, ++i)) {
+            if ( i->is_border()) {
+                Verbose_ostream verr(verbose);
+                verr << "    both halfedges of an edge are border "
+                        "halfedges." << std::endl;
+                valid = false;
+            }
+        }
+        return valid;
+    }
+
+    void normalize_border() {
+        // sorts halfedges such that the non-border edges precedes the
+        // border edges.
+        hds_.normalize_border();
+        CGAL_postcondition( normalized_border_is_valid());
+    }
+
+protected:            // Supports_face_plane
+    void inside_out_geometry( Tag_false) {}
+    void inside_out_geometry( Tag_true) {
+        typename Traits::Construct_opposite_plane_3 opp
+            = traits().construct_opposite_plane_3_object();
+        std::transform( planes_begin(), planes_end(), planes_begin(), opp);
+    }
+
+public:
+    void inside_out() {
+        // reverse facet orientation.
+        HalfedgeDS_decorator<HDS> decorator(hds_);
+        decorator.inside_out();
+        inside_out_geometry( Supports_face_plane());
+    }
+
+    bool is_valid( bool verb = false, int level = 0) const {
+        // checks the combinatorial consistency.
+        Verbose_ostream verr(verb);
+        verr << "begin CGAL::Polyhedron_3<...>::is_valid( verb=true, "
+                          "level = " << level << "):" << std::endl;
+        HalfedgeDS_const_decorator<HDS> D(hds_);
+        bool valid = D.is_valid( verb, level + 3);
+        // All halfedges.
+        Halfedge_const_iterator i   = halfedges_begin();
+        Halfedge_const_iterator end = halfedges_end();
+        size_type  n = 0;
+        for( ; valid && (i != end); ++i) {
+            verr << "halfedge " << n << std::endl;
+            // At least triangular facets and distinct geometry.
+            valid = valid && ( i->next() != i);
+            valid = valid && ( i->next()->next() != i);
+            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
+                               D.get_vertex(i) != D.get_vertex(i->opposite()));
+            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
+                               D.get_vertex(i) != D.get_vertex(i->next()));
+            valid = valid && ( ! check_tag( Supports_halfedge_vertex()) ||
+                        D.get_vertex(i) != D.get_vertex(i->next()->next()));
+            if ( ! valid) {
+                verr << "    incident facet is not at least a triangle."
+                     << std::endl;
+                break;
+            }
+            // Distinct facets on each side of an halfegde.
+            valid = valid && ( ! check_tag( Supports_halfedge_face()) ||
+                               D.get_face(i) != D.get_face(i->opposite()));
+            if ( ! valid) {
+                verr << "    both incident facets are equal." << std::endl;
+                break;
+            }
+            ++n;
+        }
+        valid = valid && (n == size_of_halfedges());
+        if ( n != size_of_halfedges())
+            verr << "counting halfedges failed." << std::endl;
+
+        verr << "end of CGAL::Polyhedron_3<...>::is_valid(): structure is "
+             << ( valid ? "valid." : "NOT VALID.") << std::endl;
+        return valid;
+    }
+};
+
+} //namespace CGAL
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#endif
+
+#include <CGAL/IO/Polyhedron_iostream.h>
+
+#endif // CGAL_POLYHEDRON_3_H //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_copy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_copy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_copy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_copy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_decorator_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_decorator_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_decorator_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_decorator_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_incremental_builder_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_incremental_builder_3.h
new file mode 100644
index 0000000..faf009a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_incremental_builder_3.h
@@ -0,0 +1,915 @@
+// Copyright (c) 1997  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>)
+
+#ifndef CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H
+#define CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H 1
+
+#include <CGAL/basic.h>
+#include <CGAL/Random_access_adaptor.h>
+#include <CGAL/HalfedgeDS_decorator.h>
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/IO/Verbose_ostream.h>
+#include <vector>
+#include <cstddef>
+
+namespace CGAL {
+
+template < class HalfedgeDS_>
+class Polyhedron_incremental_builder_3 {
+public:
+    typedef HalfedgeDS_                     HDS; // internal
+    typedef HalfedgeDS_                     HalfedgeDS;
+    typedef typename HDS::Vertex            Vertex;
+    typedef typename HDS::Halfedge          Halfedge;
+    typedef typename HDS::Face              Face;
+    typedef typename HDS::Vertex_handle     Vertex_handle;
+    typedef typename HDS::Halfedge_handle   Halfedge_handle;
+    typedef typename HDS::Face_handle       Face_handle;
+    typedef typename HDS::Face_handle       Facet_handle;
+    typedef typename Vertex::Base           VBase;
+    typedef typename Halfedge::Base         HBase;
+    typedef typename Vertex::Point          Point_3;
+    typedef typename HDS::size_type         size_type;
+
+protected:
+    typedef typename HDS::Supports_vertex_halfedge  Supports_vertex_halfedge;
+    typedef typename HDS::Supports_removal          Supports_removal;
+    typedef typename HDS::Vertex_iterator           Vertex_iterator;
+    typedef typename HDS::Halfedge_iterator         Halfedge_iterator;
+    typedef Random_access_adaptor<Vertex_iterator>  Random_access_index;
+
+    bool                      m_error;
+    bool                      m_verbose;
+    HDS&                      hds;
+    size_type                 rollback_v;
+    size_type                 rollback_f;
+    size_type                 rollback_h;
+    size_type                 new_vertices;
+    size_type                 new_faces;
+    size_type                 new_halfedges;
+    Face_handle               current_face;
+    Random_access_index       index_to_vertex_map;
+    std::vector< Halfedge_handle>  vertex_to_edge_map;
+
+    Halfedge_handle           g1;      // first halfedge, 0 denotes none.
+    Halfedge_handle           gprime;
+    Halfedge_handle           h1;      // current halfedge
+    size_type                 w1;      // first vertex.
+    size_type                 w2;      // second vertex.
+    size_type                 v1;      // current vertex
+    bool                      first_vertex;
+    bool                      last_vertex;
+
+    CGAL_assertion_code( int check_protocoll;)  // use to check protocoll.
+    // states for checking: 0 = created, 1 = constructing, 2 = make face.
+
+    // Implement the vertex_to_edge_map either with an array or
+    // the halfedge pointer in the vertices (if supported).
+    // ----------------------------------------------------
+    void initialize_vertex_to_edge_map( size_type  n, bool mode, Tag_true) {
+        vertex_to_edge_map.clear();
+        vertex_to_edge_map.resize(n);
+        if ( mode) {
+            // go through all halfedges and keep a halfedge for each
+            // vertex found in a hashmap.
+            size_type i = 0;
+            for ( Vertex_iterator vi = hds.vertices_begin();
+                  vi != hds.vertices_end();
+                  ++vi) {
+                set_vertex_to_edge_map( i, vi->halfedge());
+                ++i;
+            }
+        }
+    }
+    void initialize_vertex_to_edge_map( size_type n, bool mode, Tag_false){
+        vertex_to_edge_map.clear();
+        vertex_to_edge_map.resize(n);
+        if ( mode) {
+            // go through all halfedges and keep a halfedge for each
+            // vertex found in a hashmap.
+            typedef Unique_hash_map< Vertex_iterator, Halfedge_handle> V_map;
+            Halfedge_handle hh;
+            V_map v_map( hh, hds.size_of_vertices());
+            for ( Halfedge_iterator hi = hds.halfedges_begin();
+                  hi != hds.halfedges_end();
+                  ++hi) {
+                v_map[ hi->vertex()] = hi;
+            }
+            size_type i = 0;
+            for ( Vertex_iterator vi = hds.vertices_begin();
+                  vi != hds.vertices_end();
+                  ++vi) {
+                //set_vertex_to_edge_map( i, v_map[ index_to_vertex_map[i]]);
+                set_vertex_to_edge_map( i, v_map[ vi]);
+                ++i;
+            }
+        }
+    }
+    void initialize_vertex_to_edge_map( size_type n, bool mode) {
+        initialize_vertex_to_edge_map(n, mode, Supports_vertex_halfedge());
+    }
+    void push_back_vertex_to_edge_map( Halfedge_handle h, Tag_true) {
+        push_back_vertex_to_edge_map( h, Tag_false());
+    }
+    void push_back_vertex_to_edge_map( Halfedge_handle h, Tag_false) {
+        vertex_to_edge_map.push_back(h);
+    }
+    void push_back_vertex_to_edge_map( Halfedge_handle h) {
+        push_back_vertex_to_edge_map( h, Supports_vertex_halfedge());
+    }
+    Halfedge_handle get_vertex_to_edge_map( size_type i, Tag_true) {
+        // Use the halfedge pointer within the vertex.
+        //CGAL_assertion( index_to_vertex_map[i]->halfedge() == get_vertex_to_edge_map(i, Tag_false()));
+        return index_to_vertex_map[i]->halfedge();
+    }
+    Halfedge_handle get_vertex_to_edge_map( size_type i, Tag_false) {
+        // Use the self-managed array vertex_to_edge_map.
+        return vertex_to_edge_map[i];
+    }
+    Halfedge_handle get_vertex_to_edge_map( size_type i) {
+        return get_vertex_to_edge_map( i, Supports_vertex_halfedge());
+    }
+    void set_vertex_to_edge_map( size_type i, Halfedge_handle h, Tag_true) {
+        set_vertex_to_edge_map( i, h, Tag_false());
+        // Use the halfedge pointer within the vertex.
+        index_to_vertex_map[i]->VBase::set_halfedge(h);
+    }
+    void set_vertex_to_edge_map( size_type i, Halfedge_handle h, Tag_false) {
+        // Use the self-managed array vertex_to_edge_map.
+        CGAL_assertion(i < vertex_to_edge_map.size());
+        vertex_to_edge_map[i] = h;
+    }
+    void set_vertex_to_edge_map( size_type i, Halfedge_handle h) {
+        set_vertex_to_edge_map( i, h, Supports_vertex_halfedge());
+    }
+
+// An Incremental Builder for Polyhedral Surfaces
+// ----------------------------------------------
+// DEFINITION
+//
+// Polyhedron_incremental_builder_3<HDS> is an auxiliary class that
+// supports the incremental construction of polyhedral surfaces. This is
+// for example convinient when constructing polyhedral surfaces from
+// files. The incremental construction starts with a list of all point
+// coordinates and concludes with a list of all facet polygons. Edges are
+// not explicitly specified. They are derived from the incidence
+// information provided from the facet polygons. These are given as a
+// sequence of vertex indices. The correct protocol of method calls to
+// build a polyhedral surface can be stated as regular expression:
+//
+// `begin_surface (add_vertex | (begin_facet add_vertex_to_facet*
+//  end_facet))* end_surface '
+//
+// PARAMETERS
+//
+// `HDS' is the halfedge data structure used to represent the
+// polyhedral surface that is to be constructed.
+//
+// CREATION
+public:
+    bool error() const { return m_error; }
+
+    Polyhedron_incremental_builder_3( HDS& h, bool verbose = false)
+        // stores a reference to the halfedge data structure `h' in the
+        // internal state. The previous polyhedral surface in `h'
+        // remains unchanged. The incremental builder adds the new
+        // polyhedral surface to the old one.
+      : m_error( false), m_verbose( verbose), hds(h) {
+        CGAL_assertion_code(check_protocoll = 0;)
+    }
+
+    ~Polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
+    {
+        CGAL_destructor_assertion( check_protocoll == 0);
+    }
+
+// OPERATIONS
+    enum { RELATIVE_INDEXING = 0, ABSOLUTE_INDEXING = 1};
+
+
+    void begin_surface( std::size_t v, std::size_t f, std::size_t h = 0,
+                        int mode = RELATIVE_INDEXING);
+        // starts the construction. v is the number of new
+        // vertices to expect, f the number of new facets, and h the number of
+        // new halfedges. If h is unspecified (`== 0') it is estimated using
+        // Euler equations (plus 5% for the so far unkown holes and genus
+        // of the object). These values are used to reserve space in the
+        // polyhedron representation `HDS'. If the representation
+        // supports insertion these values do not restrict the class of
+        // readable polyhedrons. If the representation does not support
+        // insertion the object must fit in the reserved sizes.
+        //    If `mode' is set to ABSOLUTE_INDEXING the incremental builder
+        // uses absolute indexing and the vertices of the old polyhedral 
+        // surface can be used in new facets. Otherwise relative indexing is 
+        // used starting with new indices for the new construction.
+
+
+    Vertex_handle add_vertex( const Point_3& p) {
+        // adds p to the vertex list.
+        CGAL_assertion( check_protocoll == 1);
+        if ( hds.size_of_vertices() >= hds.capacity_of_vertices()) {
+            Verbose_ostream verr( m_verbose);
+            verr << " " << std::endl;
+            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
+                 << std::endl;
+            verr << "add_vertex(): capacity error: more than " << new_vertices
+                 << " vertices added." << std::endl;
+            m_error = true;
+            return Vertex_handle();
+        }
+        HalfedgeDS_decorator<HDS> decorator(hds);
+        Vertex_handle v = decorator.vertices_push_back( Vertex(p));
+        index_to_vertex_map.push_back( v);
+        decorator.set_vertex_halfedge( v, Halfedge_handle());
+        push_back_vertex_to_edge_map( Halfedge_handle());
+        ++new_vertices;
+        return v;
+    }
+
+    // returns handle for the vertex of index i
+    Vertex_handle vertex( std::size_t i) {
+        if ( i < new_vertices)
+            return index_to_vertex_map[i];
+        return Vertex_handle();
+    }
+
+    Facet_handle begin_facet() {
+        // starts a facet.
+        if ( m_error)
+            return Facet_handle();
+        CGAL_assertion( check_protocoll == 1);
+        CGAL_assertion_code( check_protocoll = 2;)
+        if ( hds.size_of_faces() >= hds.capacity_of_faces()) {
+            Verbose_ostream verr( m_verbose);
+            verr << " " << std::endl;
+            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
+                 << std::endl;
+            verr << "begin_facet(): capacity error: more than " << new_vertices
+                 << " facets added." << std::endl;
+            m_error = true;
+            return Facet_handle();
+        }
+        // initialize all status variables.
+        first_vertex = true;  // denotes 'no vertex yet'
+        g1 =  Halfedge_handle();  // denotes 'no halfedge yet'
+        last_vertex = false;
+
+        HalfedgeDS_decorator<HDS> decorator(hds);
+        current_face = decorator.faces_push_back( Face());
+        return current_face;
+    }
+
+    void add_vertex_to_facet( std::size_t i);
+        // adds a vertex with index i to the current facet. The first
+        // point added with `add_vertex()' has the index 0.
+
+    Halfedge_handle end_facet() {
+        // ends a facet.
+        if ( m_error)
+            return Halfedge_handle();
+        CGAL_assertion( check_protocoll == 2);
+        CGAL_assertion( ! first_vertex);
+        // cleanup all static status variables
+        add_vertex_to_facet( w1);
+        if ( m_error)
+            return Halfedge_handle();
+        last_vertex = true;
+        add_vertex_to_facet( w2);
+        if ( m_error)
+            return Halfedge_handle();
+        CGAL_assertion( check_protocoll == 2);
+        CGAL_assertion_code( check_protocoll = 1;)
+        HalfedgeDS_items_decorator<HDS> decorator;
+        Halfedge_handle h = get_vertex_to_edge_map(w1);
+        decorator.set_face_halfedge( current_face, h);
+        ++new_faces;
+        return h;
+    }
+
+    template <class InputIterator>
+    Halfedge_handle add_facet( InputIterator first, InputIterator beyond) {
+        // synonym for begin_facet(), a call to add_vertex_to_facet() for each iterator
+        // value type, and end_facet().
+        begin_facet();
+        for ( ; ! m_error && first != beyond; ++first)
+            add_vertex_to_facet( *first);
+        if ( m_error)
+            return Halfedge_handle();
+        return end_facet();
+    }
+
+    template <class InputIterator>
+    bool test_facet( InputIterator first, InputIterator beyond) {
+        // tests if the facet described by the vertex indices in the 
+        // range [first,beyond) can be inserted without creating a 
+        // a non-manifold (and therefore invalid) situation.
+        // First, create a copy of the indices and close it cyclically
+        std::vector< std::size_t> indices( first, beyond);
+        if ( indices.size() < 3)
+            return false;
+        indices.push_back( indices[0]);
+        return test_facet_indices( indices);
+    }
+
+    bool test_facet_indices( std::vector< std::size_t> indices);
+
+    void end_surface();
+        // ends the construction.
+
+    bool check_unconnected_vertices();
+        // returns `true' if unconnected vertices are detected. If `verb'
+        // is set to `true' debug information about the unconnected
+        // vertices is printed.
+
+    bool remove_unconnected_vertices( Tag_true);
+    bool remove_unconnected_vertices( Tag_false) {
+        return ! check_unconnected_vertices();
+    }
+    bool remove_unconnected_vertices() {
+        // returns `true' if all unconnected vertices could be removed
+        // successfully.
+        return remove_unconnected_vertices( Supports_removal());
+    }
+
+    void rollback();
+
+protected:
+    Halfedge_handle lookup_hole( std::size_t w) {
+        CGAL_assertion( w < new_vertices);
+        return lookup_hole( get_vertex_to_edge_map( w));
+    }
+
+    size_type find_vertex( Vertex_handle v) {
+        // Returns 0 if v == NULL.
+        if ( v == Vertex_handle() )
+            return 0;
+        size_type n = 0;
+        typename HDS::Vertex_iterator it = hds.vertices_begin();
+        while ( it != v) {
+            CGAL_assertion( it != hds.vertices_end());
+            ++n;
+            ++it;
+        }
+        n = n - rollback_v;
+        return n;
+    }
+
+    size_type find_facet( Face_handle f) {
+        // Returns 0 if f == NULL.
+        if ( f == Face_handle())
+            return 0;
+        size_type n = 0;
+        typename HDS::Face_iterator it = hds.faces_begin();
+        while ( it != f) {
+            CGAL_assertion( it != hds.faces_end());
+            ++n;
+            ++it;
+        }
+        n = n - rollback_f;
+        return n;
+    }
+
+    Halfedge_handle lookup_halfedge( size_type w, size_type v) {
+        // Pre: 0 <= w,v < new_vertices
+        // Case a: It exists an halfedge g from w to v:
+        //     g must be a border halfedge and the facet of g->opposite()
+        //     must be set and different from the current facet.
+        //     Set the facet of g to the current facet. Return the
+        //     halfedge pointing to g.
+        // Case b: It exists no halfedge from w to v:
+        //     Create a new pair of halfedges g and g->opposite().
+        //     Set the facet of g to the current facet and g->opposite()
+        //     to a border halfedge. Assign the vertex references.
+        //     Set g->opposite()->next() to g. Return g->opposite().
+        typedef typename HDS::Supports_halfedge_vertex 
+            Supports_halfedge_vertex;
+        Assert_compile_time_tag( Supports_halfedge_vertex(), Tag_true());
+        CGAL_assertion( w < new_vertices);
+        CGAL_assertion( v < new_vertices);
+        CGAL_assertion( ! last_vertex);
+        HalfedgeDS_items_decorator<HDS> decorator;
+        Halfedge_handle e = get_vertex_to_edge_map( w);
+        if ( e != Halfedge_handle()) {
+            CGAL_assertion( e->vertex() == index_to_vertex_map[w]);
+            // check that the facet has no self intersections
+            if ( current_face != Face_handle()
+                 && current_face == decorator.get_face(e)) {
+                Verbose_ostream verr( m_verbose);
+                verr << " " << std::endl;
+                verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
+                     << std::endl;
+                verr << "lookup_halfedge(): input error: facet "
+                     << new_faces << " has a self intersection at vertex "
+                     << w << "." << std::endl;
+                m_error = true;
+                return Halfedge_handle();
+            }
+            Halfedge_handle start_edge( e);
+            do {
+                if ( e->next()->vertex() == index_to_vertex_map[v]) {
+                    if ( ! e->next()->is_border()) {
+                        Verbose_ostream verr( m_verbose);
+                        verr << " " << std::endl;
+                        verr << "CGAL::Polyhedron_incremental_builder_3"
+                                "<HDS>::" << std::endl;
+                        verr << "lookup_halfedge(): input error: facet "
+                             << new_faces << " shares a halfedge from "
+                                "vertex " <<  w << " to vertex " << v
+                             << " with";
+                        if (  m_verbose && current_face != Face_handle())
+                            verr << " facet "
+                                 << find_facet( decorator.get_face(e->next()))
+                                 << '.' << std::endl;
+                        else
+                            verr << " another facet." << std::endl;
+                        m_error = true;
+                        return Halfedge_handle();
+                    }
+                    CGAL_assertion( ! e->next()->opposite()->is_border());
+                    if ( current_face != Face_handle() && current_face ==
+                         decorator.get_face( e->next()->opposite())) {
+                        Verbose_ostream verr( m_verbose);
+                        verr << " " << std::endl;
+                        verr << "CGAL::Polyhedron_incremental_builder_3"
+                                "<HDS>::" << std::endl;
+                        verr << "lookup_halfedge(): input error: facet "
+                             << new_faces << " has a self intersection "
+                                "at the halfedge from vertex " << w
+                             << " to vertex " << v << "." << std::endl;
+                        m_error = true;
+                        return Halfedge_handle();
+                    }
+                    decorator.set_face( e->next(), current_face);
+                    // The following line prevents e->next() to be picked
+                    // by get_vertex_to_edge_map(v) in an upcoming call
+                    // of lookup_halfedge(v, *)
+                    set_vertex_to_edge_map( v, e->next()->next()->opposite());
+                    return e;
+                }
+                e = e->next()->opposite();
+            } while ( e != start_edge);
+        }
+        // create a new halfedge
+        if ( hds.size_of_halfedges() >= hds.capacity_of_halfedges()) {
+            Verbose_ostream verr( m_verbose);
+            verr << " " << std::endl;
+            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
+                 << std::endl;
+            verr << "lookup_halfedge(): capacity error: more than "
+                 << new_halfedges << " halfedges added while creating facet"
+                 << new_faces << '.' << std::endl;
+            m_error = true;
+            return Halfedge_handle();
+        }
+        e = hds.edges_push_back( Halfedge(), Halfedge());
+        new_halfedges++;
+        new_halfedges++;
+        decorator.set_face( e, current_face);
+        e->HBase::set_vertex( index_to_vertex_map[v]);
+        e->HBase::set_next( Halfedge_handle());
+        decorator.set_prev( e, e->opposite());
+        e = e->opposite();
+        e->HBase::set_vertex( index_to_vertex_map[w]);
+        e->HBase::set_next( e->opposite());
+        return e;
+    }
+
+    Halfedge_handle lookup_hole( Halfedge_handle e) {
+        // Halfedge e points to a vertex w. Walk around w to find a hole
+        // in the facet structure. Report an error if none exist. Return
+        // the halfedge at this hole that points to the vertex w.
+        CGAL_assertion( e != Halfedge_handle());
+        HalfedgeDS_items_decorator<HDS> decorator;
+        Halfedge_handle start_edge( e);
+        do {
+            if ( e->next()->is_border()) {
+                return e;
+            }
+            e = e->next()->opposite();
+        } while ( e != start_edge);
+
+        Verbose_ostream verr( m_verbose);
+        verr << " " << std::endl;
+        verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::" << std::endl;
+        verr << "lookup_hole(): input error: at vertex "
+             << find_vertex( e->vertex())
+             << " a closed surface already exists and facet "
+             << new_faces << " is nonetheless adjacent." << std::endl;
+        if (  m_verbose && current_face != Face_handle()) {
+            verr << "             The closed cycle of facets is:";
+            do {
+                if ( ! e->is_border())
+                    verr << " " << find_facet( decorator.get_face(e));
+                e = e->next()->opposite();
+            } while ( e != start_edge);
+            verr << '.' << std::endl;
+        }
+        m_error = true;
+        return Halfedge_handle();
+    }
+};
+
+template < class HDS>
+void
+Polyhedron_incremental_builder_3<HDS>::
+rollback() {
+    CGAL_assertion( rollback_v <= hds.size_of_vertices());
+    CGAL_assertion( rollback_h <= hds.size_of_halfedges());
+    CGAL_assertion( rollback_f <= hds.size_of_faces());
+    if ( rollback_v == 0 && rollback_h == 0 && rollback_f == 0) {
+        hds.clear();
+    } else {
+        while ( rollback_v != hds.size_of_vertices())
+            hds.vertices_pop_back();
+        CGAL_assertion((( hds.size_of_halfedges() - rollback_h) & 1) == 0);
+        while ( rollback_h != hds.size_of_halfedges())
+            hds.edges_pop_back();
+        while ( rollback_f != hds.size_of_faces())
+            hds.faces_pop_back();
+    }
+    m_error = false;
+    CGAL_assertion_code( check_protocoll = 0;)
+}
+
+template < class HDS>  CGAL_MEDIUM_INLINE
+void
+Polyhedron_incremental_builder_3<HDS>::
+begin_surface( std::size_t v, std::size_t f, std::size_t h, int mode) {
+    CGAL_assertion( check_protocoll == 0);
+    CGAL_assertion_code( check_protocoll = 1;)
+    CGAL_assertion( ! m_error);
+    if ( mode == RELATIVE_INDEXING) {
+        new_vertices  = 0;
+        new_faces     = 0;
+        new_halfedges = 0;
+        rollback_v    = hds.size_of_vertices();
+        rollback_f    = hds.size_of_faces();
+        rollback_h    = hds.size_of_halfedges();
+    } else {
+        new_vertices  = hds.size_of_vertices();
+        new_faces     = hds.size_of_faces();
+        new_halfedges = hds.size_of_halfedges();
+        rollback_v    = 0;
+        rollback_f    = 0;
+        rollback_h    = 0;
+    }
+    if ( h == 0) {
+        // Use the Eulerian equation for connected planar graphs. We do
+        // not know the number of facets that are holes and we do not
+        // know the genus of the surface. So we add 12 and a factor of
+        // 5 percent.
+      h = (std::size_t)((double)(v + f - 2 + 12) * 2.1);
+    }
+    hds.reserve( hds.size_of_vertices()  + v,
+                 hds.size_of_halfedges() + h,
+                 hds.size_of_faces()     + f);
+    if ( mode == RELATIVE_INDEXING) {
+        index_to_vertex_map = Random_access_index( hds.vertices_end());
+        index_to_vertex_map.reserve(v);
+        initialize_vertex_to_edge_map( v, false);
+    } else {
+        index_to_vertex_map = Random_access_index( hds.vertices_begin(),
+                                                   hds.vertices_end());
+        index_to_vertex_map.reserve( hds.size_of_vertices() + v);
+        initialize_vertex_to_edge_map( hds.size_of_vertices() + v, true);
+    }
+}
+
+template < class HDS>
+void
+Polyhedron_incremental_builder_3<HDS>::
+add_vertex_to_facet( std::size_t v2) {
+    if ( m_error)
+        return;
+    CGAL_assertion( check_protocoll == 2);
+    if ( v2 >= new_vertices) {
+        Verbose_ostream verr( m_verbose);
+        verr << " " << std::endl;
+        verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::"
+             << std::endl;
+        verr << "add_vertex_to_facet(): vertex index " << v2
+             << " is out-of-range [0," << new_vertices-1 << "]."
+             << std::endl;
+        m_error = true;
+        return;
+    }
+    HalfedgeDS_items_decorator<HDS> decorator;
+
+    if ( first_vertex) {
+        CGAL_assertion( ! last_vertex);
+        w1 = v2;
+        first_vertex = false;
+        return;
+    }
+    if ( g1 == Halfedge_handle()) {
+        CGAL_assertion( ! last_vertex);
+        gprime  = lookup_halfedge( w1, v2);
+        if ( m_error)
+            return;
+        h1 = g1 = gprime->next();
+        v1 = w2 = v2;
+        return;
+    }
+    // g1, h1, v1, w1, w2 are set. Insert halfedge.
+    // Lookup v1-->v2
+    Halfedge_handle hprime;
+    if ( last_vertex)
+        hprime = gprime;
+    else {
+        hprime = lookup_halfedge( v1, v2);
+        if ( m_error)
+            return;
+    }
+    Halfedge_handle h2 = hprime->next();
+    CGAL_assertion( ! last_vertex || h2 == g1);
+    Halfedge_handle prev = h1->next();
+    h1->HBase::set_next( h2);
+    decorator.set_prev( h2, h1);
+
+    if ( get_vertex_to_edge_map( v1) == Halfedge_handle()) {  // case 1:
+        h2->opposite()->HBase::set_next( h1->opposite());
+        decorator.set_prev( h1->opposite(), h2->opposite());
+    } else {                                                  // case 2:
+        bool b1 = h1->opposite()->is_border();
+        bool b2 = h2->opposite()->is_border();
+        if ( b1 && b2) {
+            Halfedge_handle hole = lookup_hole( v1);
+            if ( m_error)
+                return;
+            CGAL_assertion( hole != Halfedge_handle());
+            h2->opposite()->HBase::set_next( hole->next());
+            decorator.set_prev( hole->next(), h2->opposite());
+            hole->HBase::set_next( h1->opposite());
+            decorator.set_prev( h1->opposite(), hole);
+        } else if ( b2) {                                     // case 2.b:
+            CGAL_assertion( prev->is_border());
+            h2->opposite()->HBase::set_next( prev);
+            decorator.set_prev( prev, h2->opposite());
+        } else if ( b1) {                                     // case 2.c:
+            CGAL_assertion( hprime->is_border());
+            hprime->HBase::set_next( h1->opposite());
+            decorator.set_prev( h1->opposite(), hprime);
+        } else if ( h2->opposite()->next() == h1->opposite()) {// case 2.d:
+            // f1 == f2
+            CGAL_assertion( decorator.get_face( h1->opposite()) ==
+                       decorator.get_face( h2->opposite()));
+        } else {                                              // case 2.e:
+            if ( prev == h2) {                                // case _i:
+                // nothing to be done, hole is closed.
+            } else {                                          // case _ii:
+                CGAL_assertion( prev->is_border());
+                CGAL_assertion( hprime->is_border());
+                hprime->HBase::set_next( prev);
+                decorator.set_prev( prev, hprime);
+                // Check whether the halfedges around v1 are connected.
+                // It is sufficient to check it for h1 to prev.
+                // Assert loop termination:
+                CGAL_assertion_code( std::size_t k = 0;)
+                // Look for a hole in the facet complex starting at h1.
+                Halfedge_handle hole;
+                Halfedge_handle e = h1;
+                do {
+                    if ( e->is_border())
+                        hole = e;
+                    e = e->next()->opposite();
+                    CGAL_assertion( k++ < hds.size_of_halfedges());
+                } while ( e->next() != prev && e != h1);
+                if ( e == h1) {
+                    // disconnected facet complexes
+                    if ( hole != Halfedge_handle()) {
+                        // The complex can be connected with
+                        // the hole at hprime.
+                        hprime->HBase::set_next( hole->next());
+                        decorator.set_prev( hole->next(), hprime);
+                        hole->HBase::set_next( prev);
+                        decorator.set_prev( prev, hole);
+                    } else {
+                        Verbose_ostream verr( m_verbose);
+                        verr << " " << std::endl;
+                        verr << "CGAL::Polyhedron_incremental_builder_3<"
+                                "HDS>::" << std::endl;
+                        verr << "add_vertex_to_facet(): input error: "
+                                "disconnected facet complexes at vertex "
+                             << v1 << ":" << std::endl;
+
+                        if ( m_verbose && current_face != Face_handle()) {
+                            verr << "           involved facets are:";
+                            do {
+                                if ( ! e->is_border())
+                                    verr << " " << find_facet(
+                                                decorator.get_face(e));
+                                e = e->next()->opposite();
+                            } while ( e != h1);
+                            verr << " (closed cycle) and";
+                            e = hprime;
+                            do {
+                                if ( ! e->is_border())
+                                    verr << " " << find_facet(
+                                                decorator.get_face(e));
+                            } while ( e != hprime);
+                            verr << "." << std::endl;
+                        }
+                        m_error = true;
+                        return;
+                    }
+                }
+            }
+        }
+    }
+    if ( h1->vertex() == index_to_vertex_map[v1])
+        set_vertex_to_edge_map( v1, h1);
+    CGAL_assertion( h1->vertex() == index_to_vertex_map[v1]);
+    h1 = h2;
+    v1 = v2;
+}
+
+template < class HDS>
+bool
+Polyhedron_incremental_builder_3<HDS>::
+test_facet_indices( std::vector< std::size_t> indices) {
+    typedef typename HDS::Supports_halfedge_vertex Supports_halfedge_vertex;
+    Assert_compile_time_tag( Supports_halfedge_vertex(), Tag_true());
+    // tests if the facet described by the vertex indices can be inserted 
+    // without creating a non-manifold (and therefore invalid) situation.
+    // indices are cyclically closed once.
+    std::size_t n = indices.size() - 1;
+    // Test if a vertex is not twice in the indices
+    for ( std::size_t i = 0; i < n; ++i) {
+        CGAL_precondition( indices[i] < new_vertices);
+        // check if vertex indices[i] is already in the sequence [0..i-1]
+        for ( std::size_t k = 0; k < i; ++k) {
+            if ( indices[k] == indices[i])
+                return false;
+        }
+    }
+    // Test non-manifold halfedges
+    for ( std::size_t i = 0; i < n; ++i) {
+        // halfedge goes from vertex indices[i] to indices[i+1]
+        // we know already that the halfedge is only once in the sequence
+        // (otherwise the end-vertices would be twice in the sequence too)
+        // check if halfedge is already in the HDS and is not border halfedge
+        Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
+        Vertex_handle   w = index_to_vertex_map[indices[i+1]];
+        if ( v != Halfedge_handle()
+             && get_vertex_to_edge_map(indices[i+1]) != Halfedge_handle()) {
+            // cycle through halfedge-loop and find edge to indices[i+1]
+            Halfedge_handle vstart = v;
+            do {
+                v = v->next()->opposite();
+            } while ( v->next()->vertex() != w && v != vstart);
+            if ( v->next()->vertex() == w && ! v->next()->is_border())
+                return false;
+        }
+    }
+    // test non-manifold vertices
+    for ( std::size_t i = 0; i < n; ++i) {
+        // since we don't allow duplicates in indices[..] and we 
+        // tested for non-manifold halfedges already, we just need to check
+        // if the vertex indices[i] is not a closed manifold yet.
+        Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
+        if ( v != Halfedge_handle()) {
+            Halfedge_handle vstart = v;
+            do {
+                v = v->next()->opposite();
+            } while ( ! v->is_border() && v != vstart);
+            if ( ! v->is_border())
+                return false;
+        }
+    }
+    
+    //Test if all halfedges of the new face 
+    //are possibly consecutive border halfedges in the HDS.
+    //Possibly because it may be not directly encoded in the HDS
+    //(using next() function ). This situation can occur when one or
+    //more facets share only a vertex: For example, the new facet we try to add
+    //would make the vertex indices[i] a manifold but this should be forbidden
+    //if a facet only incident to that vertex has already been inserted.
+    //We check this for each vertex of the sequence.
+    for ( std::size_t i = 0; i < n; ++i) {
+      std::size_t prev_index=indices[ (i-1+n)%n];
+      std::size_t next_index=indices[ (i+1)%n];
+      Vertex_handle   previous_vertex = index_to_vertex_map[ prev_index ];
+      Vertex_handle   next_vertex     = index_to_vertex_map[ next_index ];
+      
+      Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
+      
+      if ( v == Halfedge_handle() || 
+           get_vertex_to_edge_map(prev_index) == Halfedge_handle() ||
+           get_vertex_to_edge_map(next_index) == Halfedge_handle()
+         ) continue;
+      
+      Halfedge_handle start=v;
+      //halfedges pointing to/running out from vertex indices[i]
+      //and that need to be possibly consecutive
+      Halfedge_handle previous=Halfedge_handle(),next=Halfedge_handle();
+      
+      //look for a halfedge incident to vertex indices[i]
+      //and which opposite is incident to previous_vertex
+      do{
+        if (v->opposite()->vertex()==previous_vertex){
+          previous=v;
+          CGAL_precondition(previous->is_border());
+          break;
+        }
+        v = v->next()->opposite();
+      }
+      while (v!=start);
+      
+      if (previous!=Halfedge_handle()){
+        v=v->next()->opposite();
+        //previous and next are already consecutive in the HDS
+        if (v->opposite()->vertex()==next_vertex) continue;
+        
+        //look for a border halfedge which opposite is
+        //incident to next_vertex: set next halfedge
+        do
+        {
+          if (v->opposite()->vertex()==next_vertex){
+            next=v->opposite();
+            break;
+          }
+          v=v->next()->opposite();
+        }
+        while(v!=previous);
+        if (next==Halfedge_handle()) continue;
+        
+        //check if no constraint prevents
+        //previous and next to be adjacent: 
+        do{
+          v=v->next()->opposite();
+          if ( v->opposite()->is_border() ) break;
+        }
+        while (v!=previous);
+        if (v==previous) return false;
+        start=v;
+      }
+    }
+    
+    return true;
+}
+
+
+template < class HDS>  CGAL_MEDIUM_INLINE
+void
+Polyhedron_incremental_builder_3<HDS>::
+end_surface() {
+    if ( m_error)
+        return;
+    CGAL_assertion( check_protocoll == 1);
+    CGAL_assertion_code( check_protocoll = 0;)
+}
+
+template < class HDS>
+bool
+Polyhedron_incremental_builder_3<HDS>::
+check_unconnected_vertices() {
+    if ( m_error)
+        return false;
+    bool unconnected = false;
+    Verbose_ostream verr( m_verbose);
+    for ( std::size_t i = 0; i < new_vertices; i++) {
+        if ( get_vertex_to_edge_map( i) == Halfedge_handle()) {
+            verr << "CGAL::Polyhedron_incremental_builder_3<HDS>::\n"
+                 << "check_unconnected_vertices( verb = true): "
+                 << "vertex " << i << " is unconnected." << std::endl;
+            unconnected = true;
+        }
+    }
+    return unconnected;
+}
+
+template < class HDS>
+bool
+Polyhedron_incremental_builder_3<HDS>::
+remove_unconnected_vertices( Tag_true) {
+    if ( m_error)
+        return true;
+    for( std::size_t i = 0; i < new_vertices; i++) {
+        if( get_vertex_to_edge_map( i) == Halfedge_handle()) {
+            hds.vertices_erase( index_to_vertex_map[i]);
+        }
+    }
+    return true;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_items_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_items_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_items_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_items_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_items_with_id_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_items_with_id_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_items_with_id_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_items_with_id_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_min_items_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_min_items_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_min_items_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_min_items_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyhedron_traits_with_normals_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polyhedron_traits_with_normals_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyhedron_traits_with_normals_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyhedron_traits_with_normals_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyline_constraint_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_constraint_hierarchy_2.h
new file mode 100644
index 0000000..07906b9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyline_constraint_hierarchy_2.h
@@ -0,0 +1,1174 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Olivier Billet, Mariette Yvinec
+
+#ifndef CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
+#define CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
+
+#include <CGAL/basic.h>
+#include <utility>
+#include <map>
+#include <set> 
+#include <list> 
+#include <CGAL/Skiplist.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/triangulation_assertions.h>
+
+namespace CGAL {
+
+// T               is expected to be Vertex_handle
+// Compare         is a comparison operator for type T
+// Data            is intended to store info on a Vertex
+template <class T, class Compare, class Data>
+class Polyline_constraint_hierarchy_2
+{
+public:
+  typedef Data                                    Point;
+  typedef T                                       Vertex_handle;
+  typedef std::pair<T, T>                         Edge;
+  typedef std::pair<T, T>                         Constraint;
+  typedef std::pair<T, T>                         Subconstraint;
+
+private:
+  class Node {
+  public:
+    explicit Node(Vertex_handle vh, bool input = false)
+      : vertex_(vh), point_(vh->point()), id(-1), input(input)
+    {}
+    Point& point() { return point_; }
+    const Point& point() const { return point_; }
+    Vertex_handle vertex() const { return vertex_; }
+  private:
+    Vertex_handle vertex_;
+    Point point_;
+  public:
+    int id;
+    bool input;
+  };
+
+  typedef CGAL::Skiplist<Node>  Vertex_list;
+  typedef std::list<Constraint> Constraint_list;
+
+public:
+  // the base line is always 
+  class Point_it 
+    : public boost::iterator_adaptor<
+    Point_it
+    , typename Vertex_list::all_iterator 
+    , Point
+    >
+  {
+  public:
+    Point_it() : Vertex_it::iterator_adaptor_() {}
+    Point_it(typename Vertex_list::all_iterator it) : Point_it::iterator_adaptor_(it) {}
+  private:
+    friend class boost::iterator_core_access;
+    Point& dereference() const { return this->base()->point(); }
+  };
+
+  // only nodes with a vertex_handle that is still in the triangulation
+  class Vertex_it 
+    : public boost::iterator_adaptor<
+    Vertex_it
+    , typename Vertex_list::skip_iterator 
+    , Vertex_handle
+    , boost::use_default
+    , Vertex_handle>
+  {
+  public:
+    Vertex_it() : Vertex_it::iterator_adaptor_() {}
+    Vertex_it(typename Vertex_list::skip_iterator it) : Vertex_it::iterator_adaptor_(it) {}
+    operator Point_it() const { return Point_it(this->base()); }
+    bool& input() { return this->base()->input; }
+  private:
+    friend class boost::iterator_core_access;
+    Vertex_handle dereference() const { return this->base()->vertex(); }
+  };
+
+  typedef typename Constraint_list::iterator Constraint_it;
+
+  struct Constraint_id {
+    Vertex_list* second;
+
+    Constraint_id(): second(NULL) {}
+
+    Constraint_id(Vertex_list* vl)
+      : second(vl)
+    {}
+
+    Vertex_list* vl_ptr() const {return second;}
+
+    operator std::pair<std::pair<Vertex_handle, Vertex_handle>,Vertex_list*>()
+    { 
+      if (second!=NULL){
+        return std::make_pair(std::make_pair(second->front().vertex(),
+                                             second->back().vertex()),second);
+      } 
+      return std::make_pair(std::make_pair(Vertex_handle(),Vertex_handle()),second);
+    }
+
+    bool operator == (const Constraint_id& other) const
+    {
+      return second == other.second;
+    }
+    bool operator != (const Constraint_id& other) const
+    {
+      return second != other.second;
+    }
+
+    bool operator<(const Constraint_id& other) const{
+      return second < other.second;
+    }
+  };
+
+  class Pair_compare {
+    Compare comp;
+
+  public:
+    Pair_compare(const Compare& comp) : comp(comp) {}
+
+    bool operator()(const Edge& e1, const Edge& e2) const {
+      if(comp(e1.first, e2.first)) {
+        return true;
+      } else if((! comp(e2.first, e1.first)) && //  !less(e1,e2) && !less(e2,e1) == equal
+                comp(e1.second, e2.second)) {
+        return true;
+      } else {
+        return false;
+      }
+    }
+  };
+
+  class Context {
+    friend class Polyline_constraint_hierarchy_2<T,Compare,Data>;
+  private:
+    Vertex_list*    enclosing;
+    Vertex_it       pos;
+  public:
+    Context() : enclosing(NULL) {}
+
+    Context(const Context& hc)
+      : enclosing(hc.enclosing), pos(hc.pos)
+    {}
+
+    Vertex_it    vertices_begin() { return enclosing->skip_begin();}
+    Vertex_it    current() {return pos;}
+    Vertex_it    vertices_end() {return enclosing->skip_end();}
+    Constraint_id  id() { return enclosing; }
+    std::size_t    number_of_vertices() const {return enclosing->skip_size(); }
+  };                                           
+
+  typedef std::list<Context>              Context_list;
+  typedef typename Context_list::iterator Context_iterator;
+
+  typedef std::set<Constraint_id>           Constraint_set;
+  typedef std::map<Edge, Context_list*,
+		   Pair_compare>            Sc_to_c_map;
+  typedef typename Constraint_set::iterator C_iterator;
+  typedef typename Sc_to_c_map::const_iterator    Sc_iterator;
+  typedef Sc_iterator Subconstraint_iterator;
+  
+private:
+  // data for the 1d hierarchy
+  Compare          comp;
+  Constraint_set   constraint_set;
+  Sc_to_c_map      sc_to_c_map;
+  std::map<std::pair<Vertex_handle, Vertex_handle>,
+	   Constraint_id,
+	   Pair_compare> constraint_map;
+  
+public:
+  Polyline_constraint_hierarchy_2(const Compare& comp)
+    : comp(comp)
+    , sc_to_c_map(Pair_compare(comp))
+    , constraint_map(Pair_compare(comp))
+  { }
+  Polyline_constraint_hierarchy_2(const Polyline_constraint_hierarchy_2& ch); 
+  ~Polyline_constraint_hierarchy_2(){ clear();}
+  void clear();
+  Polyline_constraint_hierarchy_2& operator=(const Polyline_constraint_hierarchy_2& ch);
+
+  // Query 
+  bool is_subconstrained_edge(T va, T vb) const;
+  bool is_constrained_edge(T va, T vb) const;
+  bool is_constrained_vertex(T v) const;
+
+  Vertex_it vertices_in_constraint_begin(Constraint_id cid) const
+  { return cid.vl_ptr()->skip_begin(); }
+  Vertex_it vertices_in_constraint_end(Constraint_id cid) const
+  { return cid.vl_ptr()->skip_end(); }
+
+  Vertex_it vertices_in_constraint_begin(Vertex_handle va, Vertex_handle vb) const
+  { Constraint_id cid = constraint_map.find(make_edge(va,vb))->second;
+    return cid.vl_ptr()->skip_begin(); }
+
+  Vertex_it vertices_in_constraint_end(Vertex_handle va, Vertex_handle vb) const
+  { Constraint_id cid = constraint_map.find(make_edge(va,vb))->second;
+    return cid.vl_ptr()->skip_end(); }
+
+  Point_it points_in_constraint_begin(Constraint_id cid) const
+  { return cid.vl_ptr()->all_begin(); }
+  Point_it points_in_constraint_end(Constraint_id cid) const
+  { return cid.vl_ptr()->all_end(); }
+
+  bool enclosing_constraint(Edge he, Constraint& hc) const;
+  bool enclosing_constraint(T  vaa, T  vbb, T& va, T& vb) const;
+  bool enclosing_constraints(T vaa, T  vbb,  Constraint_list& hcl) const;
+  bool next_along_sc(T va, T vb, T& w) const;
+  void oriented_end(T va, T vb, T& vc) const;
+
+  Context context(T va, T vb);
+  std::size_t number_of_enclosing_constraints(T va, T vb) const;
+  Context_iterator contexts_begin(T va, T vb) const;
+  Context_iterator contexts_end(T va, T vb) const;
+  std::size_t number_of_constraints() const  { return constraint_set.size();}
+  std::size_t number_of_subconstraints()const {return sc_to_c_map.size();}
+  
+
+  // insert/remove
+  void add_Steiner(T va, T vb, T vx);
+  Vertex_list* insert_constraint(T va, T vb);
+  void append_constraint(Constraint_id cid, T va, T vb);
+  void swap(Constraint_id first, Constraint_id second);
+  void remove_constraint(Constraint_id cid);
+
+  void remove_constraint(Vertex_handle va, Vertex_handle vb)
+  {
+    remove_constraint(constraint_map[make_edge(va,vb)]);
+  }
+
+  void split_constraint(T va, T vb, T vc);
+
+  void simplify(Vertex_it u,
+                Vertex_it v,
+                Vertex_it w);
+
+  std::size_t remove_points_without_corresponding_vertex(Constraint_id);
+  std::size_t remove_points_without_corresponding_vertex();
+
+  Constraint_id concatenate(Constraint_id first, Constraint_id second);
+  Constraint_id concatenate2(Constraint_id first, Constraint_id second);
+  Constraint_id split(Constraint_id first, Vertex_it vcit);
+  Constraint_id split2(Constraint_id first, Vertex_it vcit);
+
+  void remove_Steiner(T v, T va, T vb);
+
+  // iterators
+
+  Subconstraint_iterator subconstraint_begin() const
+  { 
+    return sc_to_c_map.begin(); 
+  }
+
+  Subconstraint_iterator subconstraint_end() const
+  { 
+    return sc_to_c_map.end();   
+  }
+
+  Sc_iterator sc_begin() const{ return sc_to_c_map.begin(); }
+  Sc_iterator sc_end()   const{ return sc_to_c_map.end();   }
+  C_iterator  c_begin()  const{ return constraint_set.begin(); }
+  C_iterator  c_end()    const{ return constraint_set.end();   }
+  
+  // Helper functions
+  void copy(const Polyline_constraint_hierarchy_2& ch);
+  void copy(const Polyline_constraint_hierarchy_2& ch, std::map<Vertex_handle,Vertex_handle>& vmap);
+  void swap(Polyline_constraint_hierarchy_2& ch);
+
+private: 
+  Edge      make_edge(T va, T vb) const;
+  Vertex_it get_pos(T va, T vb) const;
+  bool      get_contexts(T va, T vb, 
+			 Context_iterator& ctxt, 
+			 Context_iterator& past) const;
+
+  bool      get_contexts(T va, T vb, Context_list*&) const;
+
+  //to_debug
+public:
+  void   print() const;
+};
+
+template <class T, class Compare, class Data>
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+Polyline_constraint_hierarchy_2(const Polyline_constraint_hierarchy_2& ch)
+  : comp(ch.comp)
+  , sc_to_c_map(Pair_compare(comp))
+  , constraint_map(Pair_compare(comp))
+{
+  copy(ch);
+}
+
+template <class T, class Compare, class Data>
+Polyline_constraint_hierarchy_2<T,Compare,Data>&
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+operator=(const Polyline_constraint_hierarchy_2& ch){
+  copy(ch);
+  return *this;
+}
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+copy(const Polyline_constraint_hierarchy_2& ch1)
+{
+  // create a identity transfer vertex map
+  std::map<Node, Node>  vmap;
+  C_iterator cit1 = ch1.c_begin();
+  for( ; cit1 != ch1.c_end(); ++cit1) {
+    Vertex_it vit = cit1->second->begin();
+    for( ; vit != cit1->second->end(); ++vit) {
+      vmap[*vit] = *vit;
+    }
+  }
+  copy(ch1, vmap);
+}
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+copy(const Polyline_constraint_hierarchy_2& ch1, std::map<Vertex_handle,Vertex_handle>& vmap)
+  // copy with a transfer vertex map
+{
+  std::map<Vertex_list*,Vertex_list*> vlmap;
+  clear();
+  // copy constraint_set
+  C_iterator cit1 = ch1.c_begin();
+  for( ; cit1 != ch1.c_end(); ++cit1) {
+    Vertex_list* hvl1 = cit1->vl_ptr();
+    Vertex_list* hvl2 = new Vertex_list;
+    vlmap[hvl1] = hvl2;
+    Vertex_it vit = hvl1->skip_begin(), end = hvl1->skip_end();
+    for( ; vit != end; ++vit) hvl2->push_back(Node(vmap[*vit]));
+    constraint_set.insert(hvl2);
+  }
+  // copy sc_to_c_map
+  Sc_iterator scit1 = ch1.sc_begin();
+  for( ; scit1 != ch1.sc_end(); ++scit1) {
+    //vertices of the subconstraints
+    Vertex_handle uu2 = vmap[scit1->first.first];
+    Vertex_handle vv2 = vmap[scit1->first.second];
+    Context_list* hcl1  = scit1->second;
+    Context_list* hcl2  = new Context_list;
+    Context_iterator cit1 = hcl1->begin();
+    for( ; cit1 != hcl1->end(); ++cit1){
+      // vertices of the enclosing constraints
+      Context ctxt2;
+      ctxt2.enclosing = vlmap[cit1->enclosing];
+      ctxt2.pos = ctxt2.enclosing->skip_begin();
+      Vertex_it aux = cit1->enclosing->skip_begin();
+      while( aux != cit1->pos) {
+	++aux;
+	++ctxt2.pos;
+      }
+      hcl2->push_back(ctxt2);
+    }
+    sc_to_c_map[make_edge(uu2,vv2)] = hcl2;
+  }
+
+  comp = ch1.comp;
+  return;
+}
+
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+swap(Polyline_constraint_hierarchy_2& ch)
+{
+  constraint_set.swap(ch.constraint_set);
+  sc_to_c_map.swap(ch.sc_to_c_map);
+}
+
+
+/*
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+is_constrained_edge(T va, T vb) const
+{
+  return( c_to_sc_map.find(make_edge(va, vb)) != c_to_sc_map.end() );
+}
+*/
+
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+is_subconstrained_edge(T va, T vb) const
+{
+  return( sc_to_c_map.find(make_edge(va, vb)) != sc_to_c_map.end() );
+}
+
+
+// af: obsolete
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+enclosing_constraint(Edge he, Constraint& hc) const
+{
+  Context_iterator hcit, past;
+  if ( !get_contexts(he.first,he.second, hcit ,past)) return false;
+  hc = make_edge(hcit->enclosing->front(), hcit->enclosing->back());
+  return true;
+}
+
+
+// used by Constrained_triangulation_plus_2::intersect with Exact_intersection_tag
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+enclosing_constraint(T  vaa, T  vbb, T& va, T& vb) const
+{
+  Context_iterator hcit, past;
+  if ( !get_contexts(vaa,vbb, hcit ,past)) return false;
+  // va = hcit->enclosing->front().vertex();
+  // vb = hcit->enclosing->back().vertex();
+  // Vertex_list* vl = hcit->enclosing;
+  Vertex_it pos = hcit->pos;
+  if(vaa != *pos){
+    std::swap(vaa,vbb);
+  }
+  while(!pos.input()){
+    --pos;
+  }
+  va = *pos;
+  pos = hcit->pos;
+  ++pos;
+  CGAL_triangulation_assertion(vbb == *pos);
+  while(!pos.input()){
+    ++pos;
+  }
+  vb = *pos;
+  return true;
+}
+
+// af: obsolete
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+enclosing_constraints(T vaa, T vbb , Constraint_list& hcl) const
+{
+  Context_iterator hcit, past;
+  if ( !get_contexts(vaa,vbb, hcit ,past)) return false;
+  for (; hcit!=past; hcit++) {
+    hcl.push_back(make_edge(hcit->enclosing->front(), 
+			    hcit->enclosing->back())); 
+  }
+  return true;
+}
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+context(T va, T vb)
+{
+  Context_iterator hcit, past;
+  if(!get_contexts(va,vb, hcit ,past)) CGAL_triangulation_assertion(false);
+  return *hcit;
+}
+
+template <class T, class Compare, class Data>
+std::size_t 
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+number_of_enclosing_constraints(T va, T vb) const
+{
+  Context_list* hcl = NULL;
+  CGAL_triangulation_assertion_code( bool found = ) get_contexts(va,vb,hcl);
+  CGAL_triangulation_assertion(found);
+  return hcl->size();
+}
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context_iterator
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+contexts_begin(T va, T vb) const
+{
+   Context_iterator first, last;
+   if( !get_contexts(va,vb,first,last))  CGAL_triangulation_assertion(false);
+   return first;
+}
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Context_iterator
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+contexts_end(T va, T vb) const
+{   
+   Context_iterator first, last;
+   if( !get_contexts(va,vb,first,last))  CGAL_triangulation_assertion(false);
+   return last;
+} 
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+swap(Constraint_id first, Constraint_id second){
+    // We have to look at all subconstraints
+  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == first.vl_ptr()){
+	ctit->enclosing = 0;
+	break;
+      }
+    }
+  }
+    // We have to look at all subconstraints
+  for(Vertex_it it = second.vl_ptr()->skip_begin(), succ = it, end = second.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == second.vl_ptr()){
+	ctit->enclosing = first.vl_ptr();
+	break;
+      }
+    }
+  }   
+  // We have to look at all subconstraints
+  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == 0){
+	ctit->enclosing = second.vl_ptr();
+	break;
+      }
+    }
+  }
+  first.vl_ptr()->swap(*second.vl_ptr());
+}
+
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+remove_constraint(Constraint_id cid){
+  constraint_set.erase(cid);
+  
+  // We have to look at all subconstraints
+  for(Vertex_it it = cid.vl_ptr()->skip_begin(), succ = it, end = cid.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and remove the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == cid.vl_ptr()){
+	    hcl->erase(ctit);
+		break;
+      }
+    }
+    // If the constraint passes several times through the same subconstraint,
+    // the above loop maybe removes them in the wrong order
+
+    // If this was the only context in the list, delete the context list
+    if(hcl->empty()){
+      sc_to_c_map.erase(scit);
+      delete hcl;
+    }
+  }
+  delete cid.vl_ptr();
+}
+
+
+// This function removes vertex v from the polyline constraint
+// It only works for one polyline passing through v
+// and for the case that the constrained edge u,w has no intersections
+template <class T, class Compare, class Data>
+void Polyline_constraint_hierarchy_2<T,Compare,Data>::simplify(Vertex_it uc,
+                                                       Vertex_it vc,
+                                                       Vertex_it wc)
+
+{
+  Vertex_handle u = *uc, v = *vc, w = *wc;
+  typename Sc_to_c_map::iterator uv_sc_iter = sc_to_c_map.find(make_edge(u, v));
+  CGAL_assertion_msg( uv_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
+  Context_list*  uv_hcl = uv_sc_iter->second;
+  CGAL_assertion_msg(uv_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
+  if(*(uv_hcl->front().current()) != u) {
+    std::swap(u,w);
+    uv_sc_iter = sc_to_c_map.find(make_edge(u, v));
+    CGAL_assertion_msg( uv_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
+    uv_hcl = (*uv_sc_iter).second;
+    CGAL_assertion_msg(uv_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
+  }
+  // now u,v, and w are ordered along the polyline constraint
+  if(vc.input()){
+    uc.input() = true;
+    wc.input() = true;
+  }
+  typename Sc_to_c_map::iterator vw_sc_iter = sc_to_c_map.find(make_edge(v, w));
+  CGAL_assertion_msg( vw_sc_iter != sc_to_c_map.end(), "not a subconstraint" );
+  Context_list*  vw_hcl = vw_sc_iter->second;
+  CGAL_assertion_msg(vw_hcl->size() == 1, "more than one constraint passing through the subconstraint" );
+  Vertex_list* vertex_list = uv_hcl->front().id().vl_ptr();
+  CGAL_assertion_msg(vertex_list  == vw_hcl->front().id().vl_ptr(), "subconstraints from different polyline constraints" );
+  // Remove the list item which points to v
+  vertex_list->skip(vc.base());
+  
+  // Remove the entries for [u,v] and [v,w]
+  sc_to_c_map.erase(uv_sc_iter);
+  sc_to_c_map.erase(vw_sc_iter);
+  delete vw_hcl;
+  // reuse other context list
+  sc_to_c_map[make_edge(u,w)] = uv_hcl;
+}
+
+
+template <class T, class Compare, class Data>
+std::size_t
+Polyline_constraint_hierarchy_2<T,Compare,Data>::remove_points_without_corresponding_vertex(Constraint_id cid)
+{
+  std::size_t n = 0;
+  for(Point_it it = points_in_constraint_begin(cid); 
+      it != points_in_constraint_end(cid); ++it) { 
+    if(cid.vl_ptr()->is_skipped(it.base())) {
+      it = cid.vl_ptr()->erase(it.base());
+      ++n;
+    }
+  }
+  return n;
+}
+
+template <class T, class Compare, class Data>
+std::size_t
+Polyline_constraint_hierarchy_2<T,Compare,Data>::remove_points_without_corresponding_vertex()
+{
+  std::size_t n = 0;
+  for(C_iterator it = constraint_set.begin(); it!= constraint_set.end(); ++it){
+    n+= remove_points_without_corresponding_vertex(*it);
+  }
+  return n;
+}
+
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
+Polyline_constraint_hierarchy_2<T,Compare,Data>::concatenate(Constraint_id first, Constraint_id second)
+{
+  constraint_set.erase(first);
+  constraint_set.erase(second);
+  // We have to look at all subconstraints
+  for(Vertex_it it = second.vl_ptr()->skip_begin(), succ = it, end = second.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == second.vl_ptr()){
+	ctit->enclosing = first.vl_ptr();
+	break;
+      }
+    }
+  }
+  // now we really concatenate the vertex lists
+  // Note that all iterators pointing into second remain valid.
+  // This concerns user code, as well as  the data member "pos" of the Context class
+  first.vl_ptr()->pop_back(); // because it is the same as second.front()
+  Vertex_it back_it = first.vl_ptr()->skip_end();
+  --back_it;
+  first.vl_ptr()->splice(first.vl_ptr()->skip_end(), *(second.vl_ptr()), second.vl_ptr()->skip_begin(), second.vl_ptr()->skip_end());
+
+  // Note that for VC8 with iterator debugging the iterators pointing into second
+  // are NOT valid      So we have to update them
+  for(Vertex_it it = back_it, succ = it, end = first.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and update pos in the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == first.vl_ptr()){
+	ctit->pos = it;
+	break;
+      }
+    }
+    }
+  constraint_set.insert(first);
+
+  delete second.vl_ptr();
+  return first;
+}
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
+Polyline_constraint_hierarchy_2<T,Compare,Data>::concatenate2(Constraint_id first, Constraint_id second)
+{  
+  constraint_set.erase(first);
+  constraint_set.erase(second);
+  // We have to look at all subconstraints
+  for(Vertex_it it = first.vl_ptr()->skip_begin(), succ = it, end = first.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == first.vl_ptr()){
+	ctit->enclosing = second.vl_ptr();
+	break;
+      }
+    }
+  }
+  // now we really concatenate the vertex lists
+  // Note that all iterators pointing into second remain valid.
+  first.vl_ptr()->pop_back(); // because it is the same as second.front()
+  Vertex_it back_it = first.vl_ptr()->skip_end();
+  --back_it;
+  second.vl_ptr()->splice(second.vl_ptr()->skip_begin(), *(first.vl_ptr()), first.vl_ptr()->skip_begin(), first.vl_ptr()->skip_end());
+
+  // Note that for VC8 with iterator debugging the iterators pointing into second
+  // are NOT valid      So we have to update them
+  for(Vertex_it it = back_it, succ = it, end = first.vl_ptr()->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and update pos in the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == second.vl_ptr()){
+	ctit->pos = it;
+	break;
+      }
+    }
+  }
+  constraint_set.insert(second);
+
+  delete first.vl_ptr();
+  return second.vl_ptr();
+}
+
+
+  // split a constraint in two constraints, so that vcit becomes the first
+  // vertex of the new constraint
+  // returns the new constraint 
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
+Polyline_constraint_hierarchy_2<T,Compare,Data>::split(Constraint_id first, Vertex_it vcit)
+{
+  constraint_set.erase(first);
+  Vertex_list* second = new Vertex_list;
+  second->splice(second->skip_end(), *(first.vl_ptr()), vcit.base(), first.vl_ptr()->skip_end());
+  first.vl_ptr()->push_back(second->front()); // Duplicate the common vertex
+  Vertex_it vit = second->skip_begin();
+  vit.input() = true;
+  vit = first.vl_ptr()->skip_end();
+  --vit;
+  vit.input() = true;
+  constraint_set.insert(first);
+  constraint_set.insert(second);
+ // We have to look at all subconstraints
+  for(Vertex_it it = second->skip_begin(), succ = it, end = second->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == first.vl_ptr()){
+	ctit->enclosing = second;
+	break;
+      }
+    }
+  }
+  return second;
+}
+
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Constraint_id
+Polyline_constraint_hierarchy_2<T,Compare,Data>::split2(Constraint_id first, Vertex_it vcit)
+{
+  constraint_set.erase(first);
+  Vertex_list* second = new Vertex_list;
+  second->splice(second->skip_end(), *first.vl_ptr(), first.vl_ptr()->skip_begin(), vcit.base());
+  second->push_back(first.vl_ptr()->front()); // Duplicate the common vertex
+  Vertex_it vit = second->skip_end();
+  --vit;
+  vit.input() = true;
+  vit = first.vl_ptr()->skip_begin();
+  vit.input() = true;
+  constraint_set.insert(first);
+  constraint_set.insert(second);
+ // We have to look at all subconstraints
+  for(Vertex_it it = second->skip_begin(), succ = it, end = second->skip_end(); 
+      ++succ != end; 
+      ++it){
+    typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ));
+    CGAL_triangulation_assertion(scit != sc_to_c_map.end());
+    Context_list* hcl = scit->second;
+
+    // and replace the context of the constraint
+    for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+      if(ctit->enclosing == first.vl_ptr()){
+	ctit->enclosing = second;
+	break;
+      }
+    }
+  }
+  return second;
+}
+
+
+/*
+when a constraint is inserted,
+it is, at first, both  a constraint and a subconstraint
+ */
+template <class T, class Compare, class Data>
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Vertex_list*
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+insert_constraint(T va, T vb){
+  Edge        he = make_edge(va, vb);
+  Vertex_list*  children = new Vertex_list; 
+  Context_list* fathers;
+
+  typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
+  if(scit == sc_to_c_map.end()){
+    fathers = new Context_list;
+    sc_to_c_map.insert(std::make_pair(he,fathers));
+  } else {
+    fathers = scit->second;
+  }
+
+  children->push_front(Node(va, true));  // was he.first
+  children->push_back(Node(vb, true));   // was he.second
+  constraint_set.insert(children);
+  Context ctxt;
+  ctxt.enclosing = children;
+  ctxt.pos     = children->skip_begin();
+  fathers->push_front(ctxt);
+
+  constraint_map[he] = children;
+  return children;
+}
+
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+append_constraint(Constraint_id cid, T va, T vb){
+  Edge        he = make_edge(va, vb);
+  Context_list* fathers;
+
+  typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
+  if(scit == sc_to_c_map.end()){
+    fathers = new Context_list;
+    sc_to_c_map.insert(std::make_pair(he,fathers));
+  } else {
+    fathers = scit->second;
+  }
+
+  typename Vertex_list::skip_iterator bit = cid.vl_ptr()->skip_end();
+  --bit;
+  cid.vl_ptr()->push_back(Node(vb, true));
+  Context ctxt;
+  ctxt.enclosing = cid.vl_ptr();
+  ctxt.pos     = bit;
+  fathers->push_front(ctxt);
+}
+
+
+template <class T, class Compare, class Data>
+void Polyline_constraint_hierarchy_2<T,Compare,Data>::
+clear()
+{
+  C_iterator cit;
+  Sc_iterator scit;
+  // clean and delete vertices lists
+  for(cit=constraint_set.begin(); cit != constraint_set.end();  cit++){
+    cit->vl_ptr()->clear();
+    delete cit->vl_ptr();
+  }
+  // clean and delete context lists
+  for(scit=sc_to_c_map.begin(); scit != sc_to_c_map.end(); scit++){
+    (*scit).second->clear();
+    delete (*scit).second;
+  }
+  sc_to_c_map.clear();
+  constraint_set.clear();
+  constraint_map.clear();
+}
+
+
+template <class T, class Compare, class Data>
+bool Polyline_constraint_hierarchy_2<T,Compare,Data>::
+next_along_sc(T va, T vb, T& w) const
+{
+  // find the next vertex after vb along any enclosing constrained
+  // return false if there is no ....
+  Context_iterator  ctxtit, past;
+  if(!get_contexts(va, vb, ctxtit, past)) CGAL_triangulation_assertion(false);
+
+  Vertex_it pos;
+  for( ; ctxtit != past; ctxtit++){
+    pos = ctxtit->pos;
+    if((*pos)==va) {
+      ++pos; ++pos;
+      if (pos != ctxtit->enclosing->end()) {  w=(*pos); return true;}
+    }
+    else {
+      if (pos != ctxtit->enclosing->begin()) {--pos; w=(*pos); return true;}
+    }
+  }
+  return false;
+}
+
+
+
+/*
+  Attention, le point v DOIT etre un point de Steiner,
+  et les segments va,v et v,vb sont des sous contraintes.
+*/
+template <class T, class Compare, class Data>
+void Polyline_constraint_hierarchy_2<T,Compare,Data>::
+remove_Steiner(T v, T va, T vb)
+{
+  // remove a Steiner point
+  CGAL_precondition(!is_constrained_vertex(v));
+ 
+  Context_list*  hcl1;
+  Context_list*  hcl2;
+  if(!get_contexts(va,v,hcl1)) CGAL_triangulation_assertion(false);
+  if(!get_contexts(v,vb,hcl2)) CGAL_triangulation_assertion(false);
+
+  Vertex_it      pos;
+  for(Context_iterator ctit=hcl1->begin(); ctit != hcl1->end(); ctit++){
+    pos = ctit->pos;
+    if((*pos)==va) pos++;
+    pos = ctit->enclosing->erase(pos);
+    ctit->pos = --pos;
+  }
+
+  sc_to_c_map.erase(make_edge(va,v));
+  sc_to_c_map.erase(make_edge(v,vb));
+  delete hcl2;
+  sc_to_c_map.insert(std::make_pair(make_edge(va,vb),hcl1));
+}
+
+
+
+/*
+  same as add_Steiner
+  precondition : va,vb est une souscontrainte. 
+*/
+template <class T, class Compare, class Data>
+void Polyline_constraint_hierarchy_2<T,Compare,Data>::
+split_constraint(T va, T vb, T vc){
+  add_Steiner(va, vb, vc);
+}
+
+
+template <class T, class Compare, class Data>
+void 
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+add_Steiner(T va, T vb, T vc){
+  Context_list* hcl=NULL;
+  if(!get_contexts(va,vb,hcl)) CGAL_triangulation_assertion(false);
+
+  Context_list* hcl2 = new  Context_list;
+
+  Vertex_it      pos;
+  Context  ctxt;
+  for(Context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) {
+    // insert vc in enclosing constraint
+    pos = ctit->current();
+    ++pos;
+    pos = ctit->enclosing->insert(pos.base(), Node(vc));
+    --pos;
+    
+    // set ctxt to the context of (vc,vb)
+    // change *ctit in hcl to the context of (va,vc)
+    // add ctxt to hcl2 list
+    ctxt.enclosing = ctit->enclosing;  
+    if(*pos == va) {
+      ctit->pos = pos;
+      ctxt.pos = ++pos;
+    }
+    else { //(*pos)==vb
+      ctxt.pos = pos;
+      ctit->pos = ++pos;
+    }
+    hcl2->push_back(ctxt);
+  }
+
+  Context_list* hcl3;
+  if (get_contexts(va,vc,hcl3)) { // (va,vc) is already a subconstraint
+    hcl3->splice(hcl3->end(), *hcl);
+    delete hcl;
+  }
+  else   sc_to_c_map.insert(std::make_pair(make_edge(va,vc), hcl));
+
+  if (get_contexts(vc,vb,hcl3)) {// (vc,vb) is already a subconstraint
+    hcl3->splice(hcl3->end(),*hcl2);
+
+    delete hcl2;
+  }
+  else  sc_to_c_map.insert(std::make_pair(make_edge(vc,vb), hcl2));
+    
+  
+  sc_to_c_map.erase(make_edge(va,vb));
+  return;
+}
+
+
+template <class T, class Compare, class Data>
+inline
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Edge
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+make_edge(T va, T vb) const
+{
+  return comp(va, vb) ? Edge(va,vb) : Edge(vb,va);
+}
+
+template <class T, class Compare, class Data>
+inline
+bool
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+get_contexts(T va, T vb, Context_list* & hcl) const
+{
+  Sc_iterator sc_iter = sc_to_c_map.find(make_edge(va,vb));
+  if( sc_iter == sc_to_c_map.end() )    return(false);
+  hcl = (*sc_iter).second;
+  return true;
+}
+
+template <class T, class Compare, class Data>
+inline
+bool
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+get_contexts(T va, T vb, 
+	     Context_iterator& ctxt, 
+	     Context_iterator& past) const
+{
+  Context_list* hcl;
+  if (!get_contexts(va,vb,hcl)) return false;
+  ctxt = hcl->begin();
+  past = hcl->end();
+  return true;    
+}
+
+
+
+template <class T, class Compare, class Data>
+inline
+typename Polyline_constraint_hierarchy_2<T,Compare,Data>::Vertex_it
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+get_pos(T va, T vb) const
+  //return pos in the first context
+{
+    return (*sc_to_c_map.find(make_edge(va,vb))).second->begin().pos;
+}
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+oriented_end(T va, T vb, T& vc) const
+{
+  Context_iterator ctxt, past;
+  if(!get_contexts(va,vb, ctxt, past) ) CGAL_triangulation_assertion(false);
+  if(*(ctxt->pos) == va)
+    vc = ctxt->enclosing->back();
+  else
+    vc = ctxt->enclosing->front();
+}
+
+
+template <class T, class Compare, class Data>
+void
+Polyline_constraint_hierarchy_2<T,Compare,Data>::
+print() const
+{ 
+  C_iterator hcit;
+  std::map<T,int>  vertex_num;
+  int num = 0;
+  for(hcit = c_begin(); hcit != c_end();  hcit++) {
+    Constraint_id cid = (*hcit);
+    Vertex_it vit =cid.vl_ptr()->skip_begin(), end = cid.vl_ptr()->skip_end();
+    for (;vit != end; vit++){
+      num ++;
+      vertex_num.insert(std::make_pair((*vit), num));
+    }
+  }
+//  typename std::map<T,int>::iterator vnit = vertex_num.begin();
+//  for(; vnit != vertex_num.end(); vnit++) {
+//    vnit->second = ++num;
+//    std::cerr << "vertex num " << num  << " " << vnit->first->point()
+//	      << std::endl;
+//  }
+
+  C_iterator cit=c_begin();
+  Sc_iterator scit=sc_begin();
+
+  for(; cit != c_end();  cit++){
+    std::cout << std::endl ;
+    std::cout << "constraint " ;
+    std::cout << cit->vl_ptr();
+    std::cout << "  subconstraints " ;
+    Vertex_it vit = (*cit).vl_ptr()->skip_begin(), end = (*cit).vl_ptr()->skip_end();
+    for(; vit != end; vit++){
+      std::cout << vertex_num[*vit]  <<" ";
+    }
+    vit = (*cit).vl_ptr()->skip_begin(), end = (*cit).vl_ptr()->skip_end();
+    for(; vit != end; vit++){
+      std::cout << (*vit)->point()  <<" ";
+    }
+  }
+  std::cout << std::endl ;
+  for(;scit != sc_end(); scit++){
+    std::cout << "subconstraint " ;
+    std::cout << vertex_num[scit->first.first] << " " 
+	      << vertex_num[scit->first.second];
+    Context_iterator cb, ce;
+    get_contexts(scit->first.first, scit->first.second, cb, ce);
+    
+    std::cout << "  enclosing " ;
+    for(; cb != ce; cb++) { 
+      std::cout << cb->id().vl_ptr();
+      std::cout <<  "   " ;
+    }
+    std::cout << std::endl ;
+  }
+  return; 
+}
+
+
+} //namespace CGAL
+#endif // CGAL_POLYLINE_CONSTRAINT_HIERARCHY_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h
new file mode 100644
index 0000000..499807e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h
@@ -0,0 +1,114 @@
+// Copyright (c) 2012 Geometry Factory. All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+//
+#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
+#define CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
+
+#include <CGAL/algorithm.h>
+
+namespace CGAL {
+
+namespace Polyline_simplification_2
+{
+/// \ingroup PkgPolylineSimplification2Classes
+
+/// This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines,
+/// possibly scaled based on a factor.
+///
+/// \cgalModels `PolylineSimplificationCostFunction`.
+template<class FT>
+class Hybrid_squared_distance_cost
+{
+
+public:
+
+  /// Initializes the cost function with the specified `ratio`
+  Hybrid_squared_distance_cost( FT ratio ) : mSquaredRatio(ratio*ratio) {}
+
+  /// Compute the hybrid squared distance cost.
+  /// 
+  /// Given a vertex in constraint iterator `vicq` computes `vicp=std::prev(vicq)` and `vicr=std::next(vicq)`,
+  /// returns the maximal square distance between each point along the original subpolyline,
+  /// between `vicp` and `vicr`,
+  /// and the straight line segment from `*vicp->point() to *vicr->point()` divided by the smallest of
+  /// - the square of the ratio given to the constructor of the cost function,
+  /// - and the shortest squared distance between that segment and each of the vertices adjacent to `vicq`.
+  ///
+  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
+  /// is model of  `PolylineSimplificationVertexBase_2`.
+ template<class CDT>
+ boost::optional<typename CDT::Geom_traits::FT>
+    operator()(  const Constrained_triangulation_plus_2<CDT>& pct
+                 , typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator vicq) const
+  {
+    typedef typename Constrained_triangulation_plus_2<CDT>::Points_in_constraint_iterator Points_in_constraint_iterator;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Vertex_circulator Vertex_circulator;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Geom_traits Geom_traits ;
+    typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance;
+    typedef typename Geom_traits::Construct_segment_2        Construct_segment;
+    typedef typename Geom_traits::Segment_2                  Segment;
+    typedef typename Geom_traits::Point_2                    Point;                   
+
+    Compute_squared_distance compute_squared_distance = pct.geom_traits().compute_squared_distance_2_object() ;
+    Construct_segment        construct_segment        = pct.geom_traits().construct_segment_2_object() ;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
+
+    Vertices_in_constraint_iterator vicp = boost::prior(vicq); 
+    Vertices_in_constraint_iterator vicr = boost::next(vicq); 
+
+    Point const& lP = (*vicp)->point();
+    Point const& lR = (*vicr)->point();
+
+    Segment lP_R = construct_segment(lP, lR) ;
+
+    FT d1(0);
+    Points_in_constraint_iterator pp(vicp), rr(vicr);
+    ++pp;
+
+    for ( ;pp != rr; ++pp )
+      d1 = (std::max)(d1, compute_squared_distance( lP_R, *pp ) ) ;
+
+    FT d2 = mSquaredRatio;
+
+    Vertex_circulator vc = pct.incident_vertices(*vicq), done(vc);
+    do {
+      if((vc != pct.infinite_vertex()) && (vc != *vicp) && (vc != *vicr)){
+	d2 = (std::min)(d2, compute_squared_distance(vc->point(), (*vicq)->point()));
+      }
+      ++vc;
+    }while(vc != done);
+
+    return d1 / d2;
+  }
+
+private:
+
+  FT mSquaredRatio ;
+
+};
+
+
+} // namespace Polyline_simplification_2
+
+
+} //namespace CGAL
+
+#endif // CGAL_POLYLINE_SIMPLIFICATION_2_HYBRID_SQUARED_DISTANCE_COST_H
+
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h
new file mode 100644
index 0000000..e6aea07
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h
@@ -0,0 +1,117 @@
+// Copyright (c) 2012 Geometry Factory. All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+//
+#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
+#define CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
+
+#include <CGAL/algorithm.h>
+
+namespace CGAL {
+
+namespace Polyline_simplification_2
+{
+/// \ingroup PkgPolylineSimplification2Classes
+
+
+/// This class is a cost function which calculates the cost as a scaled variant of the square of the distance between the original and simplified polylines.
+///
+/// \cgalModels  `PolylineSimplificationCostFunction`
+class Scaled_squared_distance_cost
+{
+
+public:
+
+  /// Initializes the cost function.
+  Scaled_squared_distance_cost() {}
+
+  /// Given a vertex in constraint iterator `vicq` computes `vicp=std::prev(vicq)` and `vicr=std::next(vicq)`,
+  /// returns the maximum of the square distances between each point along the original subpolyline
+  /// between `vicp` and `vicr`,
+  /// and the straight line segment  from `*vicp->point() to *vicr->point()` divided by the shortest squared distance between
+  /// that segment and each of the vertices adjacent to `vicq`.
+  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
+  /// is model of  `PolylineSimplificationVertexBase_2`.
+    template<class CDT>
+    boost::optional<typename CDT::Geom_traits::FT>
+    operator()(const Constrained_triangulation_plus_2<CDT>& pct
+               , typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator vicq) const
+  {
+    typedef typename Constrained_triangulation_plus_2<CDT>::Points_in_constraint_iterator Points_in_constraint_iterator;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Vertex_circulator Vertex_circulator;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Geom_traits Geom_traits ;
+    typedef typename Geom_traits::FT                                  FT;
+    typedef typename Geom_traits::Compute_squared_distance_2 Compute_squared_distance;
+    typedef typename Geom_traits::Construct_segment_2        Construct_segment;
+    typedef typename Geom_traits::Segment_2                  Segment;
+    typedef typename Geom_traits::Point_2                    Point;                   
+
+    Compute_squared_distance compute_squared_distance = pct.geom_traits().compute_squared_distance_2_object() ;
+    Construct_segment        construct_segment        = pct.geom_traits().construct_segment_2_object() ;
+    typedef typename Constrained_triangulation_plus_2<CDT>::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
+
+    Vertices_in_constraint_iterator vicp = boost::prior(vicq); 
+    Vertices_in_constraint_iterator vicr = boost::next(vicq); 
+
+    Point const& lP = (*vicp)->point();
+    Point const& lR = (*vicr)->point();
+     
+    Segment lP_R = construct_segment(lP, lR) ;
+
+    FT d1(0);
+    Points_in_constraint_iterator pp(vicp), rr(vicr);
+    ++pp;
+    
+    for ( ;pp != rr; ++pp )
+      d1 = (std::max)(d1, compute_squared_distance( lP_R, *pp ) ) ;
+
+    
+    FT d2;
+    bool d2_uninitialized = true;
+
+    Vertex_circulator vc = pct.incident_vertices(*vicq), done(vc);
+    do {
+      if((vc != pct.infinite_vertex()) && (vc != *vicp) && (vc != *vicr)){
+        if(d2_uninitialized){
+          d2 = compute_squared_distance(vc->point(), (*vicq)->point());
+	  d2_uninitialized = false;
+        } else {
+          d2 = (std::min)(d2, compute_squared_distance(vc->point(), (*vicq)->point()));
+        }
+      }
+      ++vc;
+    }while(vc != done);
+
+    return d2_uninitialized ? 
+      boost::optional<FT>(boost::none) :
+      boost::optional<FT>(d1 / d2);
+  }
+
+};
+
+
+
+} // namespace Polyline_simplification_2
+
+
+} //namespace CGAL
+
+#endif // CGAL_POLYLINE_SIMPLIFICATION_2_SCALED_SQUARED_DISTANCE_COST_H
+
+
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h
new file mode 100644
index 0000000..8d2cc59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h
@@ -0,0 +1,68 @@
+// Copyright (c) 2012 Geometry Factory. All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+//
+#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
+#define CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
+
+
+namespace CGAL {
+
+namespace Polyline_simplification_2
+{
+
+/// \ingroup PkgPolylineSimplification2Classes
+
+
+/// This class is a stop predicate returning `true` when the cost for 
+/// simplifying a vertex is greater than a certain threshold.
+///
+/// \cgalModels `PolylineSimplificationStopPredicate`.
+class Stop_above_cost_threshold
+{
+public :
+
+  /// Initializes it with the given threshold value.
+  Stop_above_cost_threshold( double threshold ) : mThres(threshold) {}
+
+  /// Returns `true` when `cost` is smaller or equal than the threshold.
+  /// \tparam CDT  must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that
+  /// is model of  `PolylineSimplificationVertexBase_2`.
+
+  template<class CDT>
+  bool operator()(const Constrained_triangulation_plus_2<CDT>&
+                  , typename Constrained_triangulation_plus_2<CDT>::Vertex_handle
+                  , typename CDT::Geom_traits::FT          cost
+                 , std::size_t
+                 , std::size_t
+                 ) const
+  {
+    return cost >= mThres ;
+  }
+
+private:
+
+  double mThres ;
+};
+
+} // namespace Polyline_simplification_2
+
+} //namespace CGAL
+
+#endif // CGAL_POLYLINE_SIMPLIFICATION_2_STOP_ABOVE_COST_THRESHOLD_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polyline_simplification_2/Vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/Vertex_base_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/simplify.h b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/simplify.h
new file mode 100644
index 0000000..f2bb6e6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polyline_simplification_2/simplify.h
@@ -0,0 +1,472 @@
+// Copyright (c) 2012 Geometry Factory. All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri
+//
+#ifndef CGAL_POLYLINE_SIMPLIFICATION_2_SIMPLIFY_H
+#define CGAL_POLYLINE_SIMPLIFICATION_2_SIMPLIFY_H
+
+#include <list>
+
+#include <CGAL/Polyline_simplification_2/Vertex_base_2.h>
+#include <CGAL/Polyline_simplification_2/Squared_distance_cost.h>
+#include <CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h>
+#include <CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h>
+#include <CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h>
+#include <CGAL/Polyline_simplification_2/Stop_below_count_threshold.h>
+#include <CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h>
+#include <CGAL/Modifiable_priority_queue.h>
+#include <CGAL/algorithm.h>
+
+// Needed for Polygon_2
+
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Constrained_triangulation_plus_2.h>
+#include <list>
+
+
+namespace CGAL {
+
+#ifndef DOXYGEN_RUNNING
+
+template < class CDT >
+class Constrained_triangulation_plus_2;
+
+
+template <class PolygonTraits_2, class Container>
+class Polygon_2;
+
+#endif
+
+namespace Polyline_simplification_2 {
+
+template <typename PCT, typename CostFunction, typename StopFunction>
+class Polyline_simplification_2
+{
+public:
+
+  typedef typename PCT::Point Point;
+  typedef typename PCT::Constraint_id Constraint_id;
+  typedef typename PCT::Constraint_iterator Constraint_iterator;
+  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
+  //typedef typename PCT::Points_in_constraint_iterator Points_in_constraint_iterator;
+  typedef typename PCT::Vertex_handle Vertex_handle;
+  typedef typename PCT::Vertex_circulator Vertex_circulator;
+
+  typedef typename PCT::Geom_traits::FT FT;
+  
+  PCT& pct;
+  CostFunction cost;
+  StopFunction stop;
+  std::size_t pct_initial_number_of_vertices, number_of_unremovable_vertices;
+
+  
+  struct Compare_cost 
+  { 
+    bool operator() ( Vertices_in_constraint_iterator const& x, 
+                      Vertices_in_constraint_iterator const& y ) const 
+    { 
+      return (*x)->cost() < (*y)->cost(); 
+    }
+  } ;
+  
+  struct Id_map : public boost::put_get_helper<std::size_t, Id_map>
+  { 
+    typedef boost::readable_property_map_tag category;
+    typedef std::size_t                      value_type;
+    typedef value_type                       reference;
+    typedef Vertices_in_constraint_iterator  key_type;
+    
+    reference operator[] ( key_type const& x ) const { return x.base()->id ; }
+  } ;
+  
+  typedef CGAL::Modifiable_priority_queue<Vertices_in_constraint_iterator,Compare_cost,Id_map> MPQ ;
+  
+  MPQ* mpq;
+
+  Polyline_simplification_2(PCT& pct, CostFunction cost, StopFunction stop)
+    : pct(pct), cost(cost), stop(stop), pct_initial_number_of_vertices(pct.number_of_vertices()), number_of_unremovable_vertices(0)
+  {
+    int m = initialize_indices();
+    initialize_unremovable();
+    Compare_cost cc;
+    Id_map idm;
+    mpq =  new MPQ(m, cc, idm);
+    initialize_costs();
+  }
+
+  Polyline_simplification_2(PCT& pct, Constraint_id cid, CostFunction cost, StopFunction stop)
+    : pct(pct), cost(cost), stop(stop), pct_initial_number_of_vertices(pct.number_of_vertices()), number_of_unremovable_vertices(0)
+  {
+    int m = initialize_indices(cid);
+    initialize_unremovable();
+    Compare_cost cc;
+    Id_map idm;
+    mpq =  new MPQ(m, cc, idm);
+    initialize_costs(cid);
+  }
+
+
+
+  ~Polyline_simplification_2()
+  {
+    delete mpq;
+  }
+
+  void initialize_unremovable()
+  {
+    std::set<Vertex_handle> vertices;
+    Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
+    for(; cit!=e; ++cit){
+      Constraint_id cid = *cit;
+      Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
+      (*it)->set_removable(false);
+      for(; it != pct.vertices_in_constraint_end(cid); ++it){
+        if(vertices.find(*it) != vertices.end()){
+          (*it)->set_removable(false);
+        } else {
+          vertices.insert(*it);
+        }
+      }
+      it = boost::prior(it);
+      (*it)->set_removable(false);
+    }
+  }
+
+  // For all polyline constraints we compute the cost of all unremovable and not removed vertices
+  int
+  initialize_costs(Constraint_id cid)
+  {
+    int n=0;
+    for(Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
+        it != pct.vertices_in_constraint_end(cid);
+        ++it){
+      if((*it)->is_removable()){
+        boost::optional<FT> dist = cost(pct, it);
+        if(dist){
+          (*it)->set_cost(*dist);
+          (*mpq).push(it);
+          ++n;
+        } else {
+          // no need to set the costs as this vertex is not in the priority queue
+        } 
+      }
+    }
+    return n;
+  }  
+  
+  void
+  initialize_costs()
+  {
+    int n=0;
+    Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
+    for(; cit!=e; ++cit){
+      n+= initialize_costs(*cit);
+    }
+  }
+
+  bool
+  is_removable(Vertices_in_constraint_iterator it)
+  {
+    typedef typename PCT::Geom_traits Geom_traits;
+    if(! (*it)->is_removable()) {
+      return false;
+    }
+    
+    Vertex_handle vh = *it;
+    Vertices_in_constraint_iterator u = boost::prior(it);
+    Vertex_handle uh = *u;
+    Vertices_in_constraint_iterator w = boost::next(it);
+    Vertex_handle wh = *w;
+    
+    typename Geom_traits::Orientation_2 orientation_2 = pct.geom_traits().orientation_2_object();
+    CGAL::Orientation o = orientation_2(uh->point(), vh->point(), wh->point());
+    if(o == CGAL::COLLINEAR){
+      return true;
+    }
+    if(o == CGAL::LEFT_TURN){
+      std::swap(uh,wh);
+    }
+    
+    // uh, vh, wh perform a right turn 
+    const Point& up = uh->point();
+    const Point& wp = wh->point();
+    Vertex_circulator circ = pct.incident_vertices(vh);
+    while(circ != uh){
+      ++circ;
+    }
+    ++circ;
+    if(circ == wh){
+      typename PCT::Edge e;
+      CGAL_assertion_code( bool b = ) pct.is_edge(uh,wh,e.first,e.second);
+      CGAL_assertion(b);
+      return ! pct.is_constrained(e);
+    }
+    while(circ != wh){
+      o = orientation_2(up, circ->point(), wp);
+      if(orientation_2(up, wp, circ->point()) != CGAL::RIGHT_TURN){
+        return false;
+      }
+      ++circ;
+    }
+    return true;
+  }
+
+
+  int
+  initialize_indices(Constraint_id cid, int id = 0)
+  {
+    for(Vertices_in_constraint_iterator it = pct.vertices_in_constraint_begin(cid);
+        it != pct.vertices_in_constraint_end(cid);
+        ++it){
+      it.base()->id = id++;
+    }
+    return id;
+  }
+  
+  int
+  initialize_indices()
+  {
+    int id = 0;
+    Constraint_iterator b = pct.constraints_begin(), e = pct.constraints_end();
+    for(; b!=e; ++b){
+      id = initialize_indices(*b, id);
+    }
+    return id;
+  }
+  
+bool
+operator()()
+{
+  if((*mpq).empty()){
+      return false;
+    }
+  Vertices_in_constraint_iterator v = (*mpq).top();
+  (*mpq).pop();
+  if(stop(pct, *v, (*v)->cost(), pct_initial_number_of_vertices, pct.number_of_vertices())){
+    return false;
+  }
+  if(is_removable(v)){
+    Vertices_in_constraint_iterator u = boost::prior(v), w = boost::next(v);
+    pct.simplify(v);
+    
+    if((*u)->is_removable()){
+      boost::optional<FT> dist = cost(pct, u);
+      if(! dist){
+        std::cerr << "undefined cost not handled yet" << std::endl;
+      } else {
+        (*u)->set_cost(*dist);
+        if((*mpq).contains(u)){
+        (*mpq).update(u, true);
+        }
+      }
+    }
+    
+    if((*w)->is_removable()){
+      boost::optional<FT> dist = cost(pct, w);
+      if(! dist){
+        std::cerr << "undefined cost not handled yet" << std::endl;
+      } else {
+        (*w)->set_cost(*dist);
+        if((*mpq).contains(w)){
+        (*mpq).update(w, true);
+        }
+
+      }
+    }
+  } else {
+    ++number_of_unremovable_vertices;
+  }
+  return true;
+}
+
+  std::size_t
+  number_of_removed_vertices() const
+  {
+    return pct_initial_number_of_vertices - pct.number_of_vertices();
+  }
+
+  };
+
+/*!
+\ingroup  PkgPolylineSimplification2Functions
+
+Simplifies a single polygon.
+
+\tparam Traits must be a model of `ConstrainedDelaunayTriangulationTraits_2`
+\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`.
+\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
+
+\attention Any \cgal kernel can be used for `Traits`, but as the traits
+class is used for internally using a constrained Delaunay triangulation,
+it should be a kernel with at least exact predicates.
+*/
+template <class Traits, class Container, class CostFunction, class StopFunction>
+                  CGAL::Polygon_2<Traits,Container>
+                  simplify(const CGAL::Polygon_2<Traits,Container>& polygon,
+                           CostFunction cost,
+                           StopFunction stop)
+{
+  typedef Traits K;
+  typedef typename K::Point_2 Point_2;
+
+  typedef Vertex_base_2< K > Vb;
+  typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, CGAL::Exact_predicates_tag> CDT;
+  typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
+  typedef typename PCT::Constraint_id Constraint_id;
+  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
+
+  PCT pct;
+
+  Constraint_id cid = pct.insert_constraint(polygon);
+
+  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(pct, cost, stop);
+  while(simplifier()){}
+
+  CGAL::Polygon_2<Traits,Container> result;
+  Vertices_in_constraint_iterator beg = pct.vertices_in_constraint_begin(cid);
+  Vertices_in_constraint_iterator end = pct.vertices_in_constraint_end(cid);
+  for(; beg!=end;){
+    Point_2 p = (*beg)->point();
+    ++beg;
+    if(beg!=end){
+      result.push_back(p);
+    }
+  }
+  return result;
+}
+
+/*!
+\ingroup  PkgPolylineSimplification2Functions
+
+Simplifies an open or closed polyline given as an iterator range of 2D \cgal points.
+
+\tparam PointIterator must be an iterator with value type `CGAL::Kernel::Point_2`.
+\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
+\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
+\tparam PointOutputIterator must be an output iterator to which `CGAL::Kernel::Point_2` can be assigned.
+*/
+  template <class PointIterator, class CostFunction, class StopFunction, class PointOutputIterator>
+  PointOutputIterator
+  simplify(PointIterator b, PointIterator e,
+           CostFunction cost,
+           StopFunction stop,
+           PointOutputIterator out,
+           bool close = false)
+{
+  typedef typename std::iterator_traits<PointIterator>::value_type Point_2;
+  typedef typename CGAL::Kernel_traits<Point_2>::type K;
+  typedef Vertex_base_2< K > Vb;
+  typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, CGAL::Exact_predicates_tag> CDT;
+  typedef CGAL::Constrained_triangulation_plus_2<CDT>       PCT;
+  typedef typename PCT::Constraint_id Constraint_id;
+  typedef typename PCT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
+
+  PCT pct;
+
+  Constraint_id cid = pct.insert_constraint(b,e, close);
+
+  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(pct, cost, stop);
+  while(simplifier()){}
+
+  Vertices_in_constraint_iterator beg = pct.vertices_in_constraint_begin(cid);
+  Vertices_in_constraint_iterator end = pct.vertices_in_constraint_end(cid);
+  for(; beg!=end;){
+    Point_2 p = (*beg)->point();
+    ++beg;
+    if((!close) || (beg!=end)){
+      *out++ = p;
+    }
+  }
+  return out;
+}
+
+
+/*!
+\ingroup  PkgPolylineSimplification2Functions
+
+Simplifies a single polyline in a triangulation with polylines as constraints. 
+
+\param ct The underlying constrained Delaunay triangulation which embeds the polyline constraints
+\param cid The constraint identifier of the polyline constraint to simplify
+\param cost The cost function
+\param stop The stop function
+\param remove_points  If `true` the function \link CGAL::Constrained_triangulation_plus_2::remove_points_without_corresponding_vertex() `ct.remove_points_without_corresponding_vertex()` \endlink is called.
+\returns the number of removed vertices
+\tparam CDT  must be `CGAL::Constrained_triangulation_plus_2` with a vertex type that
+is model of  `PolylineSimplificationVertexBase_2`.
+\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
+\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
+*/
+template <class CDT, class CostFunction, class StopFunction>
+std::size_t
+simplify(CGAL::Constrained_triangulation_plus_2<CDT>& ct,
+         typename CGAL::Constrained_triangulation_plus_2<CDT>::Constraint_id cid,
+         CostFunction cost,
+         StopFunction stop,
+         bool remove_points = true)
+{
+  typedef CGAL::Constrained_triangulation_plus_2<CDT> PCT;
+  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(ct, cid, cost, stop);
+
+  while(simplifier()){}
+  if(remove_points){
+    ct.remove_points_without_corresponding_vertex(cid);
+  }
+  return simplifier.number_of_removed_vertices();
+}
+
+/*!
+\ingroup  PkgPolylineSimplification2Functions
+Simplifies all polylines in a triangulation with polylines as constraints.
+\param ct The underlying constrained Delaunay triangulation which embeds the polyline constraints
+\param cost The cost function
+\param stop The stop function
+\param remove_points If `true` the function \link CGAL::Constrained_triangulation_plus_2::remove_points_without_corresponding_vertex() `ct.remove_points_without_corresponding_vertex()`\endlink is called.
+\returns the number of removed vertices
+\tparam CDT  must be `CGAL::Constrained_triangulation_plus_2` with a vertex type that
+is model of  `PolylineSimplificationVertexBase_2`.
+\tparam CostFunction must be a model of `PolylineSimplificationCostFunction`
+\tparam StopFunction must be a model of `PolylineSimplificationStopPredicate`
+*/
+
+template <class CDT, class CostFunction, class StopFunction>
+std::size_t
+simplify(CGAL::Constrained_triangulation_plus_2<CDT>& ct,
+         CostFunction cost,
+         StopFunction stop,
+         bool remove_points = true)
+{
+  typedef CGAL::Constrained_triangulation_plus_2<CDT> PCT;
+  Polyline_simplification_2<PCT, CostFunction, StopFunction> simplifier(ct, cost, stop);
+
+  while(simplifier()){}
+  if(remove_points){
+    ct.remove_points_without_corresponding_vertex();
+  }
+  return simplifier.number_of_removed_vertices();
+}
+
+
+
+} // namespace polyline_simplification_2
+} // namespace CGAL 
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Algebraic_structure_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Algebraic_structure_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Algebraic_structure_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Algebraic_structure_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/CORE_Expr_root_stack.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/CORE_Expr_root_stack.h
new file mode 100644
index 0000000..4d5da40
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/CORE_Expr_root_stack.h
@@ -0,0 +1,268 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_POLYNOMIAL_CORE_SOLVER_H
+#define CGAL_POLYNOMIAL_CORE_SOLVER_H
+#include <CGAL/Polynomial/basic.h>
+#include <CGAL/CORE_Expr.h>
+#include <CGAL/Polynomial/internal/CORE_polynomial.h>
+#include <CGAL/Polynomial/internal/Root_stack_traits_base.h>
+#include <CGAL/CORE_BigInt.h>
+
+#include <iostream>
+
+/*namespace CGAL {
+double to_double(const CORE::BigInt &bi)
+{
+  return bi.doubleValue();
+  }
+
+
+  } //namespace CGAL*/
+
+namespace CGAL { namespace POLYNOMIAL {
+
+
+class CORE_Expr_root_stack
+{
+protected:
+  typedef CORE_Expr_root_stack This;
+  //typedef CORE::Poly<CORE::BigInt> BIP;
+public:
+
+  typedef internal::CORE_polynomial Function;
+  typedef Function::NT Coef;
+  typedef CORE::Sturm<Coef> CORE_Sturm;
+  
+
+  struct Traits: public internal::Root_stack_traits_base<Function> {
+    
+  };
+
+  typedef CORE::Expr Root;
+
+  CORE_Expr_root_stack(const Function &f,
+		       const Root &lb,
+		       const Root &ub,
+		       const Traits &tr): f_(f), ub_(ub),  cur_valid_(false), tr_(tr), one_even_left_(false){
+    initialize(lb);
+  }
+
+  CORE_Expr_root_stack():  num_roots_(0){}
+
+  const Root& top() const
+  {
+    CGAL_precondition(!empty());
+    if(!cur_valid_) make_cur_valid();
+    return cur_;
+  }
+  void pop() {
+    if (!one_even_left_) {
+      --num_roots_;
+      cur_valid_=false;
+      CGAL_precondition(num_roots_>=0);
+    } else {
+      one_even_left_=false;
+    }
+  }
+
+  bool empty() const
+  {
+    if (num_roots_ != 0 && !cur_valid_) {
+      make_cur_valid();
+    }
+    return num_roots_==0;
+  }
+
+
+  std::ostream &write(std::ostream &out) const {
+    return out << f_ << ": " << cur_ << std::endl;
+  }
+protected:
+  void make_cur_valid() const {
+    CGAL_precondition(!cur_valid_);
+    if (num_roots_==0) {
+      no_roots();
+    } else {
+      make_root();
+      enforce_upper_bound();
+    }
+  }
+
+  Function f_;
+  CORE_Sturm sturm_;
+  Root  ub_;
+  mutable Root cur_;
+  mutable bool cur_valid_;
+  mutable int num_roots_;
+  mutable CORE::BigFloat bflb_, bfub_;
+  Traits tr_;
+  mutable bool one_even_left_;
+  mutable int offset_in_interval_;
+  mutable CGAL::Sign last_sign_;
+
+  void initialize(const Root& lb) {
+    if (f_.degree()<=0) {
+      no_roots();
+      return;
+    } else {
+      //std::cout <<"solving " << f_ << std::endl;
+      f_.contract();
+      //std::cout << f_.core_polynomial() << std::endl;
+      sturm_= CORE_Sturm(f_.core_polynomial()/*, false*/); //BigInt to BigRat
+      
+      offset_in_interval_=0;
+      //CORE::BigFloat bflb, bfub;
+      
+      /*if (lb == -std::numeric_limits<Root>::infinity()){
+	bflb_= -f_.core_polynomial().CauchyUpperBound();
+	} else {*/
+      CORE::BigFloat offset(.5);
+      CGAL_postcondition(offset.isExact());
+      bflb_= bf_lower_bound(lb);
+      CGAL_postcondition(bflb_.isExact());
+      do {
+	bflb_ -= offset; // hack to get around assuming core is consistent with 0 endpoint
+	last_sign_=CGAL::sign(f_.core_polynomial().eval(bflb_));
+      } while (last_sign_==CGAL::ZERO);
+      CGAL_postcondition(bflb_.isExact());
+
+      bfub_= bf_upper_bound(ub_);
+      CGAL_precondition(bflb_ < bfub_);
+      
+      
+      //std::cout << " in interval: " << bflb_ << " " << bfub_ << std::endl;
+      num_roots_= sturm_.numberOfRoots(bflb_, bfub_);
+      //std::cout << "nr= " << num_roots_ << std::endl;
+      //CORE::Expr testr;
+      ++num_roots_;
+      do {
+	--num_roots_;
+	if ( num_roots_ == 0) {
+	  no_roots();
+	  return;
+	}
+	make_root();
+      } while (cur_ < lb);
+      //make_cur_root(testr);
+    }
+    //std::cout << "There are " << num_roots_ << " roots.\n";
+    enforce_upper_bound();
+  }
+
+  void enforce_upper_bound() const {
+    if (cur_ < ub_) return;
+    else {
+      //std::cout << "Rejected " << cur_ << std::endl;
+      no_roots();
+    }
+  }
+
+  void make_root() const {
+    CGAL_precondition(num_roots_!=0);
+    //std::cout << "making root: " << CGAL::to_double(bflb_) << " " << CGAL::to_double(bfub_) << std::endl;
+  
+    CORE::BFInterval bfi;
+    bfi= sturm_.isolateRoot(1+offset_in_interval_, bflb_, bfub_);
+   
+    //std::cout << "got: " << CGAL::to_double(bfi.first) << " " << CGAL::to_double(bfi.second) << std::endl;
+    //int nr= sturm_.numberOfRoots(bfi.first, bfi.second);
+    //int nr=1;
+    CGAL::Sign cur_sign=CGAL::sign(f_.core_polynomial().eval(bfi.second));
+    if (cur_sign==0) {
+      Traits::Sign_after sa= tr_.sign_after_object();
+      cur_sign= sa(f_, bfi.second);
+      ++offset_in_interval_;
+    } else {
+      offset_in_interval_=0;
+      bflb_= bfi.second;
+    }
+    CGAL_precondition(cur_sign!= CGAL::ZERO);
+    CGAL_precondition(last_sign_ != CGAL::ZERO);
+    if (last_sign_== cur_sign) {
+      one_even_left_=true;
+      //std::cout << "it is even" << std::endl;
+    } else {
+      one_even_left_=false;
+    }
+    last_sign_= cur_sign;
+    //std::cout << nr << " " << bfi.first << " " << bfi.second <<  std::endl;
+    cur_= CORE::Expr(f_.core_polynomial(), bfi);
+    cur_valid_=true;
+    //cur_ =Root(e/*/f_.scale()*/, nr);
+    //std::cout << "root= " << cur_ <<  " " << e << std::endl;
+  }
+
+  void no_roots() const {
+    //ub_= CORE::Expr(0);
+    cur_= infinity<Root>();
+    num_roots_=0;
+    one_even_left_=false;
+    cur_valid_=false;
+  }
+
+  /*void initialize_counters(const Root &lb) {
+    std::cout << "Computing strum of " << poly_ << "..." << std::flush;
+    CORE_Sturm sturm(poly_);
+    std::cout << "done." << std::endl;
+    num_roots_=0;
+    CGAL_assertion(-ub_ != infinity<Root>());
+    num_roots_= sturm.numberOfRoots();
+    if (lb== -infinity<Root>() && ub_== infinity<Root>()) {
+      counter_=0;
+    }
+    else if (ub_ == infinity<Root>()) {
+      std::cout << bf_lower_bound(lb.representation()) << std::endl;
+      //num_roots_= sturm.numberOfRootsAbove(bf_lower_bound(lb.representation()));
+      counter_ = sturm.numberOfRootsBelow(bf_lower_bound(lb.representation()));
+    }
+    else if (lb == infinity<Root>()) {
+      //num_roots_= sturm.numberOfRootsBelow(bf_upper_bound(ub_.representation()));
+      counter_ = 0;
+    }
+    else {
+      counter_= sturm.numberOfRootsBelow(bf_lower_bound(lb.representation()));
+      
+    }
+    }*/
+
+  //! There are probably better ways of doing this
+  Coef bf_lower_bound(const CORE::Expr &rt) const
+  {
+    machine_double lb, ub;
+    rt.doubleInterval(lb, ub);
+    return Coef(lb);
+  }
+
+  //! There are probably better ways of doing this
+  Coef bf_upper_bound(const CORE::Expr &rt) const
+  {
+    machine_double lb, ub;
+    rt.doubleInterval(lb, ub);
+    return Coef(ub);
+  }
+};
+
+inline std::ostream &operator<<(std::ostream &out, const CORE_Expr_root_stack &o) {
+  return o.write(out);
+}
+
+} } //namespace CGAL::POLYNOMIAL;
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/CORE_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/CORE_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/CORE_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/CORE_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Chinese_remainder_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Chinese_remainder_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Chinese_remainder_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Chinese_remainder_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Degree.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Degree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Degree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Degree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Fixed_polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Fixed_polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Fixed_polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Fixed_polynomial.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Fraction_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Fraction_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Fraction_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Fraction_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Get_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Get_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Get_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Get_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Interpolator.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Interpolator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Interpolator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Interpolator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Interval_polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Interval_polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Interval_polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Interval_polynomial.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Modular_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Modular_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Modular_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Modular_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Monomial_representation.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Monomial_representation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Monomial_representation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Monomial_representation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Numeric_root_stack.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Numeric_root_stack.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Numeric_root_stack.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Numeric_root_stack.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Polynomial.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Polynomial_type.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Polynomial_type.h
new file mode 100644
index 0000000..3a73f5a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Polynomial_type.h
@@ -0,0 +1,1468 @@
+// Copyright (c) 2008 Max-Planck-Institute Saarbruecken (Germany)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer <hemmer at informatik.uni-mainz.de> 
+//                 Arno Eigenwillig <arno at mpi-inf.mpg.de>
+//                 Michael Seel <seel at mpi-inf.mpg.de>
+//                 
+// ============================================================================
+
+// TODO: The comments are all original EXACUS comments and aren't adapted. So
+//         they may be wrong now.
+
+/*! \file CGAL/Polynomial.h
+ *  \brief Defines class CGAL::Polynomial.
+ *  
+ *  Polynomials in one variable (or more, by recursion)
+ */
+
+#ifndef CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
+#define CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
+
+#define CGAL_icoeff(T) typename CGAL::First_if_different<       \
+typename CGAL::internal::Innermost_coefficient_type<T>::Type, T, 1>::Type  
+
+#define CGAL_int(T) typename CGAL::First_if_different< int,   \
+typename CGAL::internal::Innermost_coefficient_type<T>::Type , 2>::Type 
+
+
+#include <CGAL/ipower.h>
+#include <cstdio>
+#include <sstream>
+#include <CGAL/Polynomial/misc.h>
+
+#include <CGAL/use.h>
+#include <CGAL/tss.h>
+
+namespace CGAL {
+
+template <class NT> class Polynomial;
+template <class NT> class Scalar_factor_traits;
+template <class NT> Polynomial<NT> operator - (const Polynomial<NT>& p);
+
+namespace internal {
+
+template <class NT> class Polynomial_rep;
+
+// \brief tag type to distinguish a certain constructor of \c CGAL::Polynomial
+class Creation_tag {};
+
+//
+// The internal representation class Polynomial_rep<NT>
+//
+
+// \brief  internal representation class for \c CGAL::Polynomial
+template <class NT_> class Polynomial_rep 
+{ 
+  typedef NT_ NT;
+  typedef std::vector<NT> Vector;
+  typedef typename Vector::size_type      size_type;
+  typedef typename Vector::iterator       iterator;
+  typedef typename Vector::const_iterator const_iterator;
+  Vector coeff;
+
+  Polynomial_rep() : coeff() {}
+  Polynomial_rep(Creation_tag, size_type s) : coeff(s,NT(0)) {}
+
+  Polynomial_rep(size_type n, ...);
+
+#ifdef CGAL_USE_LEDA
+  Polynomial_rep(const LEDA::array<NT>& coeff_)
+    : coeff(coeff_.size())
+  {
+    for (int i = 0; i < coeff_.size(); i++) {
+      coeff[i] = coeff_[i + coeff_.low()];
+    }
+  }
+#endif // CGAL_USE_LEDA
+
+  template <class Forward_iterator>
+  Polynomial_rep(Forward_iterator first, Forward_iterator last) 
+    : coeff(first,last)
+  {}
+
+  void reduce() {
+    while ( coeff.size()>1 && CGAL::is_zero(coeff.back())) coeff.pop_back();
+  }
+
+  void simplify_coefficients() {
+    typename Algebraic_structure_traits<NT>::Simplify simplify;
+    for (iterator i = coeff.begin(); i != coeff.end(); i++) {
+      simplify(*i);
+    }
+  }
+
+  friend class Polynomial<NT>;
+};  // class Polynomial_rep<NT_>
+
+template <class NT>
+Polynomial_rep<NT>::Polynomial_rep(size_type n, ...)
+  : coeff(n)
+{
+  // varargs, hence not inline, otherwise g++-3.1 -O2 makes trouble
+  va_list ap; va_start(ap, n);
+  for (size_type i = 0; i < n; i++) {
+    coeff[i] = *(va_arg(ap, const NT*));
+  }
+  va_end(ap);
+}
+
+}// namespace internal
+
+//
+// The actual class Polynomial<NT>
+//
+
+/*! \ingroup CGAL_Polynomial
+  \brief polynomials in one variable (or more, by recursion)
+
+  An instance of the data type \c CGAL::Polynomial represents a
+  polynomial <I>p = a<SUB>0</SUB> + a<SUB>1</SUB>*x + ...
+  + a<SUB>d</SUB>*x<SUP>d</SUP></I> from the ring
+  NT[x]. The data type offers standard ring operations, comparison
+  operations (e.g. for symbolic computation with an infimaximal \e x ),
+  and various algebraic operations (gcd, resultant).
+
+  \c CGAL:Polynomial offers a full set of algebraic operators, i.e.
+  binary +, -, *, / as well as +=, -=, *=, /=; not only for polynomials
+  but also for a polynomial and a number of the coefficient type.
+  (The / operator must only be used for integral divisions, i.e.
+  those with remainder zero.)
+  Unary + and - and (in)equality ==, != are also provided.
+  If the member function \c sign() (see ibid.) is defined for
+  a coefficient type, then so are the comparison operators
+  <, >, <=, >= corresponding to the \c sign() of the difference.
+  The \c sign() of a polynomial is the \c sign() of its leading
+  coefficient, hence comparing by the \c sign() of the difference
+  amounts to lexicographic comparison of the coefficient sequence,
+  with the coefficient of the highest power taking precedence over
+  those of lower powers.
+
+  \c NT must be at least a model of \c IntegralDomainWithoutDiv.
+  For all operations naturally involving division, a \c IntegralDomain
+  is required. If more than a \c IntegralDomain is required, this is documented.
+
+  \c NT can itself be an instance of \c CGAL::Polynomial, yielding a
+  crude form of multivariate polynomials. They behave correctly from an
+  algebraic point of view (in particular w.r.t. gcd and resultant
+  computation), but not always as a user would expect. For example, the
+  leading coefficient of a polynomial from (NT[x])[y] naturally is an
+  element of NT[x]. Similarly, computing derivations, resultants, etc.
+  always happens w.r.t. the outmost variable.
+
+  Inexact and limited-precision types can be used as coefficients,
+  but at the user's risk. The algorithms implemented were written with
+  exact number types in mind.
+
+  This data type is implemented as a handle type with value semantics
+  (i.e. if you change it, it clones its representation by calling
+  \c copy_on_write(), hence no
+  aliasing occurs) using \c LiS::Handle (without unification).  The
+  coefficients are stored in a vector of \c NT entries. Arithmetic
+  operations are implemented naively: + and - need a number of NT
+  operations which is linear in the degree while * is quadratic.
+  The advanced algebraic operations are implemented with classical
+  non-modular methods.
+
+  The important invariant to be preserved by all methods is that
+  the coefficient sequence does not contain leading zero coefficients
+  (where leading means at the high-degree end), with the excpetion that
+  the zero polynomial is represented by a single zero coefficient.
+  An empty coefficient sequence denotes an undefined value.
+
+  Many functions modifying a \c CGAL::Polynomial appear both as a member
+  function (returning \c void ) which modifies the present object
+  and as a non-member function returning a new \c CGAL::Polynomial
+  while leaving their argument unchanged. The former is more efficient
+  when the old value is no longer referenced elsewhere whereas the
+  latter is more convenient.
+  \b History: This data type has evolved out of \c RPolynomial 
+  from Michael Seel's PhD thesis.  */ 
+
+template <class NT_>
+class Polynomial 
+  : public Handle_with_policy< internal::Polynomial_rep<NT_> >,
+    public boost::ordered_field_operators1< Polynomial<NT_> , 
+           boost::ordered_field_operators2< Polynomial<NT_> , NT_ ,  
+           boost::ordered_field_operators2< Polynomial<NT_> , CGAL_icoeff(NT_),
+           boost::ordered_field_operators2< Polynomial<NT_> , CGAL_int(NT_)  > > > > 
+{
+  typedef typename internal::Innermost_coefficient_type<NT_>::Type Innermost_coefficient_type; 
+public: 
+
+  //! \name Typedefs 
+  //@{ 
+  //! coefficient type of this instance 
+  typedef NT_ NT; 
+  //! representation pointed to by this handle 
+  typedef internal::Polynomial_rep<NT> Rep;
+  //! base class  
+  typedef Handle_with_policy< Rep > Base;
+  //! container used to store coefficient sequence
+  typedef typename Rep::Vector    Vector;
+  //! container's size type
+  typedef typename Rep::size_type size_type;
+  //! container's iterator (random access)
+  typedef typename Rep::iterator  iterator;
+  //! container's const iterator (random access)
+  typedef typename Rep::const_iterator const_iterator;
+  //! the Self type
+  typedef Polynomial<NT> Self; 
+  //@}
+  
+
+protected:
+  //! \name Protected methods
+  //@{
+  //! access to the internal coefficient sequence
+  Vector& coeffs() { return this->ptr()->coeff; }
+  //! const access to the internal coefficient sequence
+  const Vector& coeffs() const { return this->ptr()->coeff; }
+  //! create an empty polynomial with s coefficients (degree up to s-1)
+  Polynomial(internal::Creation_tag f, size_type s)
+    : Base(internal::Polynomial_rep<NT>(f,s) )
+    {}
+    //! non-const access to coefficient \c i
+    /*! The polynomial's representation must not be shared between
+     *  different handles when this function is called.
+     *  This can be ensured by calling \c copy_on_write().
+     *
+     *  If assertions are enabled, the index \c i is range-checked.
+     */
+    NT& coeff(unsigned int i) {
+      CGAL_precondition(!this->is_shared() && i<(this->ptr()->coeff.size()));
+      return this->ptr()->coeff[i]; 
+    }
+
+    //! remove leading zero coefficients
+    void reduce() { this->ptr()->reduce(); }
+    //! remove leading zero coefficients and warn if there were any
+    void reduce_warn() {
+      CGAL_precondition( this->ptr()->coeff.size() > 0 );
+      if (this->ptr()->coeff.back() == NT(0)) {
+        CGAL_warning_msg(false, "unexpected degree loss (zero divisor?)");
+        this->ptr()->reduce();
+      }
+    }
+    //@}
+
+//
+// Constructors of Polynomial<NT>
+//
+private:
+    static Self& get_default_instance(){
+      CGAL_STATIC_THREAD_LOCAL_VARIABLE(Self, x, 0);
+      return x;      
+    }
+public:
+
+    //! \name Constructors
+
+    //! default constructor
+    Polynomial() : Base(static_cast<const Base&>(get_default_instance())) {}
+
+    //! copy constructor: copy existing polynomial (shares rep)
+    Polynomial(const Self& p) : Base(static_cast<const Base&>(p)) {}
+        
+    //! construct the constant polynomial a0 from any type convertible to NT
+    template <class T>
+      explicit Polynomial(const T& a0)
+      : Base(Rep(internal::Creation_tag(), 1))
+      { coeff(0) = NT(a0); reduce(); simplify_coefficients(); } 
+          
+    //! construct the constant polynomial a0
+    explicit Polynomial(const NT& a0)
+      : Base(Rep(1, &a0))
+      { reduce(); simplify_coefficients(); }
+      
+    //! construct the polynomial a0 + a1*x
+    Polynomial(const NT& a0, const NT& a1)
+      : Base(Rep(2, &a0,&a1))
+      { reduce(); simplify_coefficients(); }
+
+    //! construct the polynomial a0 + a1*x + a2*x^2
+    Polynomial(const NT& a0,const NT& a1,const NT& a2)
+      : Base(Rep(3, &a0,&a1,&a2))
+      { reduce(); simplify_coefficients(); }
+      
+    //! construct the polynomial a0 + a1*x + ... + a3*x^3
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3)
+      : Base(Rep(4, &a0,&a1,&a2,&a3))
+      { reduce(); simplify_coefficients(); }
+
+    //! construct the polynomial a0 + a1*x + ... + a4*x^4
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
+        const NT& a4)
+      : Base(Rep(5, &a0,&a1,&a2,&a3,&a4))
+      { reduce(); simplify_coefficients(); }
+      
+    //! construct the polynomial a0 + a1*x + ... + a5*x^5
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
+        const NT& a4, const NT& a5)
+      : Base(Rep(6, &a0,&a1,&a2,&a3,&a4,&a5))
+      { reduce(); simplify_coefficients(); }
+
+    //! construct the polynomial a0 + a1*x + ... + a6*x^6
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
+        const NT& a4, const NT& a5, const NT& a6)
+      : Base(Rep(7, &a0,&a1,&a2,&a3,&a4,&a5,&a6))
+      { reduce(); simplify_coefficients(); }
+
+    //! construct the polynomial a0 + a1*x + ... + a7*x^7
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
+        const NT& a4, const NT& a5, const NT& a6, const NT& a7)
+      : Base(Rep(8, &a0,&a1,&a2,&a3,&a4,&a5,&a6,&a7))
+      { reduce(); simplify_coefficients(); }
+      
+    //! construct the polynomial a0 + a1*x + ... + a8*x^8
+    Polynomial(const NT& a0,const NT& a1,const NT& a2, const NT& a3,
+        const NT& a4, const NT& a5, const NT& a6, const NT& a7,
+        const NT& a8)
+      : Base(Rep(9, &a0,&a1,&a2,&a3,&a4,&a5,&a6,&a7,&a8))
+      { reduce(); simplify_coefficients(); }
+      
+    /*! \brief construct the polynomial whose coefficients are determined
+     *  by the iterator range.
+     *
+     *  Let <TT>a0 = *first</TT>, <TT>a1 = *++first</TT>, ...,
+     *  <TT>ad = *it</TT>, where <TT>++it == last</TT>.
+     *  Then the polynomial constructed is a0 + a1*x + ... + ad*x<SUP>d</SUP>
+     */
+    template <class Forward_iterator>
+    Polynomial(Forward_iterator first, Forward_iterator last)
+      : Base(Rep(first,last)) 
+      { reduce(); simplify_coefficients(); }
+                              
+#if defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING)
+    /*! \brief construct a polynomial from a LEDA \c array
+     *
+     *  The coefficients are determined by \c c[c.low()] up to
+     *  \c c[c.high()] of the array \c c. The lowest array element
+     *  \c c[c.low()] is always used for the constant term and so on,
+     *  irrespective of whether \c c.low() is zero or not.
+     */
+    Polynomial(const LEDA::array<NT>& c)
+      : Base(Rep(c))
+      { reduce(); simplify_coefficients(); }
+#endif // defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING)
+                                
+//
+// Public member functions
+//
+
+public:
+    //! \name Public Methods
+    //@{
+
+    //! a random access iterator pointing to the constant coefficient
+    const_iterator begin() const { return this->ptr()->coeff.begin(); }
+    //! a random access iterator pointing beyond the leading coefficient
+    const_iterator end()   const { return this->ptr()->coeff.end(); }
+
+    //! the degree \e d of the polynomial
+    /*! The degree of the zero polynomial is 0.
+     *  The degree of an undefined polynomial is -1.
+     */
+  int degree() const { return static_cast<int>(this->ptr()->coeff.size())-1; } 
+
+    //! const access to the coefficient of x^i
+    const NT& operator[](unsigned int i) const {
+      CGAL_precondition( i<(this->ptr()->coeff.size()) );
+      return this->ptr()->coeff[i];
+    }
+
+    //! the number of non-zero terms of the polynomial
+    /*! For an undefined polynomial, this is set to -1. */
+    int number_of_terms() const {
+      int terms = 0;
+      if (degree() < 0) return -1;
+      for (int i = 0; i <= degree(); i++) {
+        if ((*this)[i] != NT(0)) terms++;
+      }
+      return terms;
+    }
+
+    //! the leading coefficient a<SUB>d</SUB> of the polynomial
+    const NT& lcoeff() const {
+      CGAL_precondition( this->ptr()->coeff.size() > 0 );
+      return this->ptr()->coeff.back();
+    }
+    
+
+    /*! \brief evaluate the polynomial at \c x
+     *
+     *  \c x can have another type \c NTX than the coefficient type \c NT.
+     *  The result type is defined by CGAL::Coercion_traits<>
+     */
+    // Note that there is no need to provide a special version for intervals.
+    // This was shown by some benchmarks of George Tzoumas, for the 
+    // Interval Newton method used in the Voronoi Diagram of Ellipses
+    template <class NTX>
+      typename Coercion_traits<NTX,NT>::Type 
+      evaluate(const NTX& x_) const {
+      typedef Coercion_traits<NTX,NT> CT;
+      typename CT::Cast cast;
+        
+      CGAL_precondition( degree() >= 0 );
+      int d = degree();
+      typename CT::Type x = cast(x_);
+      typename CT::Type y=cast(this->ptr()->coeff[d]);
+      while (--d >= 0){
+        //    y = y*x + cast(this->ptr()->coeff[d]);
+        y *= x;
+        y += cast(this->ptr()->coeff[d]);
+      }
+      return y; 
+    }
+public:
+    //! evaluates the polynomial as a homogeneous polynomial
+    //! in fact returns evaluate(u/v)*v^degree()
+   
+    template <class NTX>
+      typename Coercion_traits<NTX,NT>::Type 
+      evaluate_homogeneous(const NTX& u_, 
+          const NTX& v_,
+          int hom_degree = -1) const {
+      if(hom_degree == -1 ) hom_degree = degree();
+      CGAL_precondition( hom_degree >= degree());
+      CGAL_precondition( hom_degree >= 0 );
+      typedef Coercion_traits<NTX,NT> CT;
+      typedef typename CT::Type Type;
+      typename CT::Cast cast;
+
+      Type u = cast(u_);
+      Type v = cast(v_);
+      Type monom;
+      Type y(0);
+      for(int i = 0; i <= hom_degree; i++){
+        monom = CGAL::ipower(v,hom_degree-i)*CGAL::ipower(u,i);
+        if(i <= degree())
+          y += monom * cast(this->ptr()->coeff[i]);  
+      }
+      return y;
+    }
+
+private:
+    // NTX not decomposable
+    template <class NTX, class TAG >
+      CGAL::Sign sign_at_(const NTX& x, TAG) const{
+      CGAL_precondition(degree()>=0);
+      return CGAL::sign(evaluate(x));
+    }
+    // NTX decomposable
+    
+    template <class NTX>
+      CGAL::Sign sign_at_(const NTX& x, CGAL::Tag_true) const{
+      CGAL_precondition(degree()>=0);
+      typedef Fraction_traits<NTX> FT;
+      typedef typename FT::Numerator_type Numerator_type;
+      typedef typename FT::Denominator_type Denominator_type;
+      Numerator_type num;
+      Denominator_type den;
+      typename FT::Decompose decompose;
+      decompose(x,num,den);
+      CGAL_precondition(CGAL::sign(den) == CGAL::POSITIVE);
+
+      typedef Coercion_traits< Numerator_type , Denominator_type > CT;
+      typename CT::Cast cast;
+      return CGAL::sign(evaluate_homogeneous(cast(num),cast(den)));
+    }
+public:
+    //! evaluates the sign of the Polynomial at x
+    template <class NTX>
+      CGAL::Sign sign_at(const NTX& x) const{
+      // the sign with evaluate_homogeneous is called
+      // if NTX is decaomposable
+      // and NT would be changed by NTX 
+      typedef typename Fraction_traits<NTX>::Is_fraction Is_fraction;
+      typedef typename Coercion_traits<NT,NTX>::Type Type;
+      typedef typename ::boost::mpl::if_c<
+      ::boost::is_same<Type,NT>::value, Is_fraction, CGAL::Tag_false
+        >::type If_decomposable_AND_Type_equals_NT;
+            
+      return sign_at_(x,If_decomposable_AND_Type_equals_NT());
+    }
+    
+    
+    // for the benefit of mem_fun1 & friends who don't like const ref args
+    template <class NTX>
+      typename CGAL::Coercion_traits<NT,NTX>::Type 
+      evaluate_arg_by_value(NTX x) const { return evaluate(x); } 
+
+    /*!  \brief evaluate the polynomial with all coefficients replaced by
+     *  their absolute values
+     *
+     *  That is, the function computes <I>|a<SUB>0</SUB>| +
+     *  |a<SUB>1</SUB>|*x + ... + |a<SUB>d</SUB>|*x<SUP>d</SUP></I>.
+     *  As with \c evaluate(), \c x can be of a type other than \c NT.
+     *  \pre Requires \c CGAL::Algebraic_structure_traits::Abs for NT.
+     */
+   
+    template <class NTX> 
+      typename Coercion_traits<NTX,NT>::Type 
+      evaluate_absolute(const NTX& x) const {
+      typedef typename Coercion_traits<NTX,NT>::Type Type;
+      typedef typename Coercion_traits<NTX,NT>::Cast Cast;
+      Type xx(Cast()(x));
+      CGAL_precondition( degree() >= 0 );
+      typename Real_embeddable_traits<Type>::Abs abs;
+      int d = degree();
+      Type y(abs(Cast()(this->ptr()->coeff[d])));
+      while (--d >= 0) y = y*xx + abs(Cast()(this->ptr()->coeff[d]));
+      return y;
+    } 
+
+    /*! \brief evaluate the polynomial with all coefficients replaced by
+     *  their absolute values
+     *
+     *  This is a specialization for \c x is of type CGAL::Interval.
+     */
+    // TODO: Interval isn't available either!!
+/*    Interval evaluate_absolute(const Interval& x) const {
+      CGAL_precondition( degree() >= 0 );
+      typename Algebraic_structure_traits<Interval>::Abs abs;
+      typename Algebraic_structure_traits<NT>::To_Interval to_Interval;
+      int d = 0;
+      Interval y(to_Interval(this->ptr()->coeff[d]));
+      while (++d <= degree()) 
+      y+=abs(pow(x,d)*to_Interval(this->ptr()->coeff[d]));
+      return y;
+      } */
+    /*! \brief return the sign of the leading coefficient
+     *
+     *  For univariate real polynomials, this is the sign
+     *  of the limit process \e x --> oo.
+     *  Also available as non-member function.
+     */
+    CGAL::Sign sign() const {
+//        CGAL_static_assertion( (boost::is_same< typename Real_embeddable_traits<NT>::Is_real_embeddable,
+//                              CGAL::Tag_true>::value) );
+      return CGAL::sign(lcoeff());
+    }
+
+    //! return sign of difference
+    CGAL::Comparison_result compare(const Polynomial& p2) const {
+      typename Real_embeddable_traits<NT>::Compare compare;
+      typename Real_embeddable_traits<NT>::Sgn sign;
+      CGAL_precondition(degree() >= 0);
+      CGAL_precondition(p2.degree() >= 0);
+
+      if (this->is_identical(p2)) return CGAL::EQUAL;
+
+      int d1 = degree();
+      int d2 = p2.degree();
+      if (d1 > d2) {
+        return sign((*this)[d1]);
+      } else if (d1 < d2) {
+        return -sign(p2[d2]);
+      }
+
+      for (int i = d1; i >= 0; i--) {
+        CGAL::Comparison_result s = compare((*this)[i], p2[i]);
+        if (s != CGAL::EQUAL) return s;
+      }
+      return CGAL::EQUAL;
+    }
+
+    //! return sign of difference with constant "polynomial"
+    CGAL::Comparison_result compare(const NT& p2) const {
+      typename Real_embeddable_traits<NT>::Compare compare;
+      typename Real_embeddable_traits<NT>::Sgn sign;
+      CGAL_precondition(degree() >= 0);
+
+      if (degree() > 0) {
+        return sign(lcoeff());
+      } else {
+        return compare((*this)[0], p2);
+      }
+    }
+
+    //! return true iff this is the zero polynomial
+    bool is_zero() const
+    { return degree()==0 && this->ptr()->coeff[0]==NT(0); }
+
+    //! return \c -p if \c p.sign()<0 and \c p otherwise
+    Polynomial<NT> abs() const
+    { return ( sign()<0 )?  -*this : *this; }
+
+    //! return the gcd of all coefficients
+    /*! The content is defined as 1 for the zero polynomial. */
+    NT content() const {
+      CGAL_precondition(degree() >= 0);
+      if (is_zero()) return NT(0);
+        
+      return content_( typename Algebraic_structure_traits< NT >::Algebraic_category() );
+    }
+
+private:
+    NT content_( Unique_factorization_domain_tag ) const {
+      typename Algebraic_structure_traits<NT>::Integral_division idiv;
+      typename Algebraic_structure_traits<NT>::Unit_part    upart;
+      typename Algebraic_structure_traits<NT>::Gcd          gcd;
+      const_iterator it = this->ptr()->coeff.begin(), ite = this->ptr()->coeff.end();
+      while (*it == NT(0)) it++;
+      NT d = idiv(*it, upart(*it));
+      for( ; it != ite; it++) {
+        if (d == NT(1)) return d;
+        if (*it != NT(0)) d = gcd(d, *it);
+      }
+      return d;
+    }
+
+    NT content_( Field_tag ) const {
+      return NT(1);
+    }
+
+public:
+    
+    //! return the unit part of the polynomial
+    /*! It is defined as the unit part of the leading coefficient. */
+    NT unit_part() const {
+      typename Algebraic_structure_traits<NT>::Unit_part upart;
+      return upart(lcoeff());
+    }
+
+    //! turn p(x) into its derivative p'(x)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void diff() {
+      CGAL_precondition( degree() >= 0 );
+      if (is_zero()) return;
+      this->copy_on_write();
+      if (degree() == 0) { coeff(0) = NT(0); return; }
+      coeff(0) = coeff(1); // avoid redundant multiplication by NT(1)
+      for (int i = 2; i <= degree(); i++) coeff(i-1) = coeff(i) * NT(i);
+      this->ptr()->coeff.pop_back();
+      reduce(); // in case NT has positive characteristic
+    }
+
+    //! replace p(x) by p(a*x)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void scale_up(const NT& a) {
+      CGAL_precondition( degree() >= 0 );
+      if (degree() == 0) return;
+      this->copy_on_write();
+      NT a_to_j = a;
+      for (int j = 1; j <= degree(); j++) {
+        coeff(j) *= a_to_j; 
+        a_to_j *= a;
+      }
+      reduce_warn();
+    }
+
+    //! replace p(x) by b<SUP>d</SUP> * p(x/b)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void scale_down(const NT& b)
+    {
+      CGAL_precondition( degree() >= 0 );
+      if (degree() == 0) return;
+      this->copy_on_write();
+      NT b_to_n_minus_j = b;
+      for (int j = degree() - 1; j >= 0; j--) {
+        coeff(j) *= b_to_n_minus_j; 
+        b_to_n_minus_j *= b;
+      }
+      reduce_warn();
+    }
+
+    //! replace p(x) by b<SUP>d</SUP> * p(a*x/b)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void scale(const NT& a, const NT& b) { scale_up(a); scale_down(b); }
+
+    //! replace p(x) by p(x+1)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void translate_by_one()
+    {   // implemented using Ruffini-Horner, see [Akritas, 1989]
+      CGAL_precondition( degree() >= 0 );
+      this->copy_on_write();
+      const int n = degree();
+      for (int j = n-1; j >= 0; j--) {
+        for (int i = j; i < n; i++) coeff(i) += coeff(i+1); 
+      }
+    }
+
+    //! replace p(x) by p(x+c)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void translate(const NT& c)
+    {   // implemented using Ruffini-Horner, see [Akritas, 1989]
+      CGAL_precondition( degree() >= 0 );
+      this->copy_on_write();
+      const int n = degree();
+      for (int j = n-1; j >= 0; j--) {
+        for (int i = j; i < n; i++) coeff(i) += c*coeff(i+1);
+      }
+    }
+
+    //! replace p by b<SUP>d</SUP> * p(x+a/b)
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void translate(const NT& a, const NT& b) 
+    {   // implemented using Mehlhorn's variant of Ruffini-Horner
+      CGAL_precondition( degree() >= 0 );
+      this->copy_on_write();
+      const int n = degree();
+
+      NT b_to_n_minus_j = b;
+      for (int j = n-1; j >= 0; j--) {
+        coeff(j) *= b_to_n_minus_j;
+        b_to_n_minus_j *= b;
+      }
+
+      for (int j = n-1; j >= 0; j--) {
+        coeff(j) += a*coeff(j+1);
+        for (int i = j+1; i < n; i++) {
+          coeff(i) = b*coeff(i) + a*coeff(i+1); 
+        }
+        coeff(n) *= b;
+      }
+      reduce_warn();
+    }
+
+    //! replace p by x<SUP>d</SUP> * p(1/x), i.e. reverse the coefficient sequence
+    /*! Also available as non-member function which returns the result
+     *  instead of overwriting the argument. */
+    void reversal() {
+      CGAL_precondition( degree() >= 0 );
+      this->copy_on_write();
+      NT t;
+      for (int l = 0, r = degree(); l < r; l++, r--) {
+        t = coeff(l); coeff(l) = coeff(r); coeff(r) = t;
+      }
+      reduce();
+    }
+
+    //! divide \e P(x) by \e x , discarding the remainder \e p(0)
+    void divide_by_x() {
+      CGAL_precondition(degree() >= 0);
+      if (is_zero()) return;
+      this->copy_on_write();
+      for (int i = 0; i < degree(); i++) {
+        coeff(i) = coeff(i+1);
+      }
+      coeffs().pop_back();
+    }
+
+    //! invoke \c CGAL::Algebraic_structure_traits::Simplify on all coefficients
+    void simplify_coefficients() { this->ptr()->simplify_coefficients(); }
+
+    //! write polynomial to \c os in \c LiS::IO::PRETTY format
+    /*! The output is intended to be Maple-readable; see module
+     *  \link CGAL_io CGAL I/O Support \endlink.
+     *
+     * Example: A \c CGAL::Polynomial<int> with a value of
+     * 4<I>x</I><SUP>2</SUP> - 1 will be written as
+     * <TT> 4*x^2 + (-1) </TT> by this function.
+     */
+    void output_maple(std::ostream& os) const;
+    //! write polynomial to \c os in a format readable by \c input_ascii()
+    void output_ascii(std::ostream& os) const;
+    //! write polynomial to \c os in \c LiS::IO::BENCHMARK format
+    void output_benchmark(std::ostream& os) const;
+
+    //! implement \c CGAL::Scalar_factor_traits::Scalar_div for polynomials
+    void scalar_div(const typename
+        Scalar_factor_traits< Polynomial<NT> >::Scalar& b) {
+      typename Scalar_factor_traits<NT>::Scalar_div sdiv;
+      this->copy_on_write();
+      for (int i = degree(); i >= 0; --i) {
+        sdiv(coeff(i), b);
+      }
+    };
+
+    //@}
+
+//
+// Static member functions
+//
+
+    //! \name Static member functions
+    //@{
+
+    /*! \brief division with remainder on polynomials
+     *
+     * Given \c f and \c g, compute quotient \c q and remainder \c r
+     * such that <I>f = g*q + r</I> and deg(<I>r</I>) < deg(<I>g</I>).
+     *
+     * \pre \c g!=0. NT is a field, or \c f and \c g are such that
+     * the division can be performed in NT anyway.
+     */
+    static void euclidean_division (const Polynomial<NT>& f,
+        const Polynomial<NT>& g,
+        Polynomial<NT>& q, Polynomial<NT>& r);
+
+    /*! \brief pseudo division with remainder on polynomials
+     *
+     * Given \c f and \c g != 0, compute quotient \c q and remainder \c r
+     * such that <I>D*f = g*q + r</I> and deg(<I>r</I>) < deg(<I>g</I>),
+     * where \e D = lcoeff(<I>g</I>)^max(0, deg(<I>f</I>)-deg(<I>g</I>)+1)
+     *
+     * This is similar to \c euclidean_division() except that multiplying
+     * by \e D makes sure that the division can be performed over any ring.
+     */
+    static void pseudo_division(const Polynomial<NT>& f,
+        const Polynomial<NT>& g, 
+        Polynomial<NT>& q, Polynomial<NT>& r, NT& D);
+
+
+    /*! \brief read a polynomial from \c is
+     *
+     * The expected format is:
+     * <TT><B>P[</B></TT><I>d</I> <TT><B>(</B></TT><I>i</I><TT><B>,</B></TT>
+     * <I>ai</I><TT><B>)</B></TT> ... <TT><B>]</B></TT> 
+     * with coefficients in arbitrary order (but without
+     * repetitions). <I>d</I> is the degree and <I>ai</I> is the coefficient
+     * of <I>x<SUP>i</SUP></I>. Missing coefficients are set to zero.
+     * Whitespace is ignored.
+     * The format of the coefficients must be understandable for
+     * <TT> is >> iformat(ai) </TT>.
+     *
+     * Example: A \c CGAL::Polynomial<int> with a value of
+     * 4<I>x</I><SUP>2</SUP> - 1 has to be written as
+     * \c P[2(2,4)(0,-1)] or \c P[2(2,4)(1,0)(0,-1)]
+     * or similarly with permuted coefficients.
+     */
+    static Polynomial<NT> input_ascii(std::istream& is);
+
+    //@}
+
+//
+// Arithmetic Operations, Part II:
+// implementing two-address arithmetic (incl. mixed-mode) by member functions
+//
+
+// ...for polynomials
+    Polynomial<NT>& operator += (const Polynomial<NT>& p1) {
+      this->copy_on_write();
+      int d = (std::min)(degree(),p1.degree()), i;
+      for(i=0; i<=d; ++i) coeff(i) += p1[i];
+      while (i<=p1.degree()) this->ptr()->coeff.push_back(p1[i++]);
+      reduce(); return (*this);
+    }
+
+    Polynomial<NT>& operator -= (const Polynomial<NT>& p1) 
+      {
+        this->copy_on_write();
+        int d = (std::min)(degree(),p1.degree()), i;
+        for(i=0; i<=d; ++i) coeff(i) -= p1[i];
+        while (i<=p1.degree()) this->ptr()->coeff.push_back(-p1[i++]);
+        reduce(); return (*this);
+      }
+
+    Polynomial<NT>& operator *= (const Polynomial<NT>& p2)
+      { 
+        // TODO: use copy on write 
+        Polynomial<NT> p1 = (*this);
+        typedef typename Polynomial<NT>::size_type size_type;
+        CGAL_precondition(p1.degree()>=0 && p2.degree()>=0);
+        internal::Creation_tag TAG;
+        Polynomial<NT>  p(TAG, size_type(p1.degree()+p2.degree()+1) ); 
+        // initialized with zeros
+        for (int i=0; i <= p1.degree(); ++i)
+          for (int j=0; j <= p2.degree(); ++j)
+            p.coeff(i+j) += (p1[i]*p2[j]); 
+        p.reduce();
+        return (*this) = p ;
+      }
+
+    Polynomial<NT>& operator /= (const Polynomial<NT>& p2)
+      { 
+        // TODO: use copy on write 
+        CGAL_precondition(!p2.is_zero());
+        if ((*this).is_zero()) return (*this);
+
+        Polynomial<NT> p1 = (*this);
+        typedef Algebraic_structure_traits< Polynomial<NT> > AST; 
+        // Precondition: q with p1 == p2 * q must exist within NT[x].
+        // If this holds, we can perform Euclidean division even over a ring NT
+        // Proof: The quotients of each division that occurs are precisely
+        //   the terms of q and hence in NT.
+        Polynomial<NT> q, r;
+        Polynomial<NT>::euclidean_division(p1, p2, q, r);
+        CGAL_USE_TYPE(AST);
+        CGAL_postcondition( !AST::Is_exact::value || p2 * q == p1);
+        return (*this) = q;
+      }
+
+
+    // ...and in mixed-mode arithmetic
+    Polynomial<NT>& operator += (const NT& num)
+      { this->copy_on_write(); coeff(0) += (NT)num; return *this; }
+
+    Polynomial<NT>& operator -= (const NT& num)
+      { this->copy_on_write(); coeff(0) -= (NT)num; return *this; }
+
+    Polynomial<NT>& operator *= (const NT& num) {
+      CGAL_precondition(degree() >= 0);
+      this->copy_on_write();
+      for(int i=0; i<=degree(); ++i) coeff(i) *= (NT)num; 
+      reduce();
+      return *this;
+    }
+
+    Polynomial<NT>& operator /= (const NT& num)
+      {
+        CGAL_precondition(num != NT(0));
+        CGAL_precondition(degree() >= 0);
+        if (is_zero()) return *this;
+        this->copy_on_write();
+        typename Algebraic_structure_traits<NT>::Integral_division idiv;
+        for(int i = 0; i <= degree(); ++i) coeff(i) = idiv(coeff(i), num);
+        reduce_warn();
+        return *this;
+      }// ...and in mixed-mode arithmetic
+                              
+    // TODO: avoid  NT(num)
+    Polynomial<NT>& operator += (CGAL_int(NT) num)
+      { return *this += NT(num); } 
+    Polynomial<NT>& operator -= (CGAL_int(NT) num)
+      { return *this -= NT(num); } 
+    Polynomial<NT>& operator *= (CGAL_int(NT) num)
+      { return *this *= NT(num); } 
+    Polynomial<NT>& operator /= (CGAL_int(NT) num)
+      { return *this /= NT(num); }  
+                              
+    // TODO: avoid  NT(num)
+    Polynomial<NT>& operator += (const CGAL_icoeff(NT)& num)
+      { return *this += NT(num); } 
+    Polynomial<NT>& operator -= (const CGAL_icoeff(NT)& num)
+      { return *this -= NT(num); } 
+    Polynomial<NT>& operator *= (const CGAL_icoeff(NT)& num)
+      { return *this *= NT(num); } 
+    Polynomial<NT>& operator /= (const CGAL_icoeff(NT)& num)
+      { return *this /= NT(num); }
+
+    // special operation to implement (pseudo-)division and the like
+    void minus_offsetmult(const Polynomial<NT>& p, const NT& b, int k)
+    {
+      CGAL_precondition(!this->is_shared());
+      int pd = p.degree();
+      CGAL_precondition(degree() >= pd+k);
+      for (int i = 0; i <= pd; i++) coeff(i+k) -= b*p[i];
+      reduce();
+    }
+    
+    friend Polynomial<NT> operator - <> (const Polynomial<NT>&);   
+}; // class Polynomial<NT_>
+
+// Arithmetic Operators, Part III:
+// implementation of unary operators and three-address arithmetic
+// by friend functions
+//
+
+template <class NT> inline
+Polynomial<NT> operator + (const Polynomial<NT>& p) {
+  CGAL_precondition(p.degree() >= 0);
+  return p;
+}
+
+template <class NT> 
+Polynomial<NT> operator - (const Polynomial<NT>& p) {
+  CGAL_precondition(p.degree()>=0);
+  Polynomial<NT> res(p.coeffs().begin(),p.coeffs().end());
+  typename Polynomial<NT>::iterator it, ite=res.coeffs().end();
+  for(it=res.coeffs().begin(); it!=ite; ++it) *it = -*it;
+  return res;
+}
+
+
+
+
+template <class NT> inline
+Polynomial<NT> operator * (const Polynomial<NT>& p1, 
+    const Polynomial<NT>& p2)
+{
+  typedef typename Polynomial<NT>::size_type size_type;
+  CGAL_precondition(p1.degree()>=0 && p2.degree()>=0);
+  internal::Creation_tag TAG;
+  Polynomial<NT>  p(TAG, size_type(p1.degree()+p2.degree()+1) ); 
+  // initialized with zeros
+  for (int i=0; i <= p1.degree(); ++i)
+    for (int j=0; j <= p2.degree(); ++j)
+      p.coeff(i+j) += (p1[i]*p2[j]); 
+  p.reduce();
+  return p;
+}
+
+
+//
+// Comparison Operators
+//
+
+// polynomials only
+template <class NT> inline
+bool operator == (const Polynomial<NT>& p1, const Polynomial<NT>& p2) {
+  CGAL_precondition(p1.degree() >= 0);
+  CGAL_precondition(p2.degree() >= 0);
+  if (p1.is_identical(p2)) return true;
+  if (p1.degree() != p2.degree()) return false;
+  for (int i = p1.degree(); i >= 0; i--) if (p1[i] != p2[i]) return false;
+  return true;
+}
+template <class NT> inline
+bool operator < (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+{ return ( p1.compare(p2) < 0 ); } 
+template <class NT> inline
+bool operator > (const Polynomial<NT>& p1, const Polynomial<NT>& p2)
+{ return ( p1.compare(p2) > 0 ); } 
+
+// operators NT
+template <class NT> inline 
+bool operator == (const NT& num, const Polynomial<NT>& p) {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == num;
+}
+template <class NT> inline
+bool operator == (const Polynomial<NT>& p, const NT& num)  {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == num;
+}
+template <class NT> inline
+bool operator < (const NT& num, const Polynomial<NT>& p) 
+{ return ( p.compare(num) > 0 );}
+template <class NT> inline
+bool operator < (const Polynomial<NT>& p,const NT& num) 
+{ return ( p.compare(num) < 0 );}
+template <class NT> inline
+bool operator > (const NT& num, const Polynomial<NT>& p) 
+{ return ( p.compare(num) < 0 );}
+template <class NT> inline
+bool operator > (const Polynomial<NT>& p,const NT& num) 
+{ return ( p.compare(num) > 0 );}
+
+
+// compare int #################################
+template <class NT> inline
+bool operator == (const CGAL_int(NT)& num, const Polynomial<NT>& p)  {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == NT(num);
+}
+template <class NT> inline
+bool operator == (const Polynomial<NT>& p, const CGAL_int(NT)& num)  {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == NT(num);
+}
+template <class NT> inline
+bool operator < (const CGAL_int(NT)& num, const Polynomial<NT>& p) 
+{ return ( p.compare(NT(num)) > 0 );}
+template <class NT> inline
+bool operator < (const Polynomial<NT>& p, const CGAL_int(NT)& num) 
+{ return ( p.compare(NT(num)) < 0 );}
+template <class NT> inline
+bool operator > (const CGAL_int(NT)& num, const Polynomial<NT>& p) 
+{ return ( p.compare(NT(num)) < 0 );}
+template <class NT> inline
+bool operator > (const Polynomial<NT>& p, const CGAL_int(NT)& num) 
+{ return ( p.compare(NT(num)) > 0 );}
+
+// compare icoeff ###################################
+template <class NT> inline
+bool operator == (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p)  {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == NT(num);
+}
+template <class NT> inline
+bool operator == (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num)  {
+  CGAL_precondition(p.degree() >= 0);
+  return p.degree() == 0 && p[0] == NT(num);
+}
+template <class NT> inline
+bool operator < (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p) 
+{ return ( p.compare(NT(num)) > 0 );}
+template <class NT> inline
+bool operator < (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num) 
+{ return ( p.compare(NT(num)) < 0 );}
+
+
+template <class NT> inline
+bool operator > (const CGAL_icoeff(NT)& num, const Polynomial<NT>& p) 
+{ return ( p.compare(NT(num)) < 0 );}
+template <class NT> inline
+bool operator > (const Polynomial<NT>& p, const CGAL_icoeff(NT)& num) 
+{ return ( p.compare(NT(num)) > 0 );}
+
+//
+// Algebraically non-trivial operations
+//
+
+// 1) Euclidean and pseudo-division of polynomials
+// (implementation of static member functions)
+
+template <class NT>
+void Polynomial<NT>::euclidean_division(
+    const Polynomial<NT>& f, const Polynomial<NT>& g,
+    Polynomial<NT>& q, Polynomial<NT>& r)
+{
+  typedef Algebraic_structure_traits<NT> AST;
+  typename AST::Integral_division idiv;
+  int fd = f.degree(), gd = g.degree();
+  if ( fd < gd ) {
+    q = Polynomial<NT>(NT(0)); r = f;
+
+    CGAL_postcondition( !AST::Is_exact::value || f == q*g + r); 
+    return;
+  }
+  // now we know fd >= gd 
+  int qd = fd-gd, delta = qd+1, rd = fd;
+
+  internal::Creation_tag TAG;    
+  q = Polynomial<NT>(TAG, delta ); 
+  r = f; r.copy_on_write();
+  while ( qd >= 0 ) {
+    NT Q = idiv(r[rd], g[gd]);
+    q.coeff(qd) += Q;
+    r.minus_offsetmult(g,Q,qd);
+    r.simplify_coefficients();
+    if (r.is_zero()) break;
+    rd = r.degree();
+    qd = rd - gd;
+  }
+  q.simplify_coefficients();
+
+  CGAL_postcondition( !AST::Is_exact::value || f == q*g + r);
+}
+
+#ifndef CGAL_POLY_USE_OLD_PSEUDODIV
+
+template <class NT>
+void Polynomial<NT>::pseudo_division(
+    const Polynomial<NT>& A, const Polynomial<NT>& B,
+    Polynomial<NT>& Q, Polynomial<NT>& R, NT& D)
+{
+  typedef Algebraic_structure_traits<NT> AST;
+  // pseudo-division with incremental multiplication by lcoeff(B)
+  // see [Cohen, 1993], algorithm 3.1.2
+
+  CGAL_precondition(!B.is_zero());
+  int delta = A.degree() - B.degree();
+
+  if (delta < 0 || A.is_zero()) {
+    Q = Polynomial<NT>(NT(0)); R = A; D = NT(1);
+       
+    CGAL_USE_TYPE(AST);
+    CGAL_postcondition( !AST::Is_exact::value || Polynomial<NT>(D)*A == Q*B + R);
+    return;
+  }
+  const NT d = B.lcoeff();
+  int e = delta + 1;
+  D = CGAL::ipower(d, e);
+  internal::Creation_tag TAG;
+  Q = Polynomial<NT>(TAG, e);
+  R = A; R.copy_on_write(); R.simplify_coefficients();
+
+  // invariant: d^(deg(A)-deg(B)+1 - e) * A == Q*B + R
+  do { // here we have delta == R.degree() - B.degree() >= 0 && R != 0
+    NT lR = R.lcoeff();
+    for (int i = delta+1; i <= Q.degree(); i++) Q.coeff(i) *= d;
+    Q.coeff(delta) = lR;              // Q = d*Q + lR * X^delta
+    for (int i = 0; i <= R.degree(); i++) R.coeff(i) *= d;
+    R.minus_offsetmult(B, lR, delta); // R = d*R - lR * X^delta * B
+    R.simplify_coefficients();
+    e--;
+    delta = R.degree() - B.degree();
+  } while (delta > 0 || (delta == 0 && !R.is_zero()));
+  // funny termination condition because deg(0) = 0, not -\infty
+
+  NT q = CGAL::ipower(d, e);
+  Q *= q; Q.simplify_coefficients();
+  R *= q; R.simplify_coefficients();
+
+  CGAL_postcondition( !AST::Is_exact::value || Polynomial<NT>(D)*A == Q*B + R);
+}
+
+#else
+
+template <class NT>
+void Polynomial<NT>::pseudo_division(
+    const Polynomial<NT>& f, const Polynomial<NT>& g, 
+    Polynomial<NT>& q, Polynomial<NT>& r, NT& D)
+{
+  typedef Algebraic_structure_traits<NT> AST;
+  // pseudo-division with one big multiplication with lcoeff(g)^{...}
+  typename Algebraic_structure_traits<NT>::Integral_division idiv;
+
+  int fd=f.degree(), gd=g.degree();
+  if ( fd < gd ) {
+    q = Polynomial<NT>(NT(0)); r = f; D = NT(1); 
+
+    CGAL_postcondition( !AST::Is_exact::value  || Polynomial<NT>(D)*f==q*g+r);
+    return;
+  }
+  // now we know rd >= gd 
+  int qd = fd-gd, delta = qd+1, rd = fd;
+  internal::Creation_tag TAG;
+  q = Polynomial<NT>(TAG, delta );
+  NT G = g[gd]; // highest order coeff of g
+  D = CGAL::ipower(G, delta);
+  Polynomial<NT> res = D*f;
+  res.simplify_coefficients();
+  while ( qd >= 0 ) {
+    NT F = res[rd];    // highest order coeff of res
+    NT t = idiv(F, G); // sure to be integral by multiplication of D
+    q.coeff(qd) = t;   // store q coeff
+    res.minus_offsetmult(g,t,qd); 
+    res.simplify_coefficients();
+    if (res.is_zero()) break;
+    rd = res.degree();
+    qd = rd - gd;
+  }
+  r = res; // already simplified
+  q.simplify_coefficients();
+
+  CGAL_postcondition( !AST::Is_exact::value  || Polynomial<NT>(D)*f==q*g+r);
+}
+
+template <class NT> inline
+Polynomial<NT> division(const Polynomial<NT>& p1, 
+    const Polynomial<NT>& p2,
+    Integral_domain_tag)
+{
+  typedef Algebraic_structure_traits<NT> AST;
+  CGAL_precondition(!p2.is_zero());
+  if ( p1.is_zero() ) return p1;
+  Polynomial<NT> q,r; NT D;
+  Polynomial<NT>::pseudo_division(p1,p2,q,r,D);
+  q/=D;
+
+  CGAL_postcondition( !AST::Is_exact::value || p2 * q == p1);
+  return q;
+}
+
+template <class NT> inline
+Polynomial<NT> division(const Polynomial<NT>& p1, 
+    const Polynomial<NT>& p2,
+    Field_tag)
+{
+  typedef Algebraic_structure_traits<NT> AST;
+  CGAL_precondition(!p2.is_zero());
+  if (p1.is_zero()) return p1;
+  Polynomial<NT> q,r;
+  Polynomial<NT>::euclidean_division(p1,p2,q,r);
+  CGAL_postcondition( !AST::Is_exact::value  || p2 * q == p1);
+  return q;
+}
+
+#endif // CGAL_POLY_USE_OLD_PSEUDODIV
+
+//
+// I/O Operations
+//
+
+/*! \ingroup CGAL_Polynomial
+ *  \relates CGAL::Polynomial
+ *  \brief output \c p to \c os
+ *
+ *  Output \c p in a format as specified by
+ *  \c LiS::get_mode(os), see \link LiS_io LiS I/O Support \endlink.
+ *  Currently, the output for \c LiS::IO::BINARY happens to be
+ *  identical to \c LiS::IO::ASCII.
+ */
+template <class NT>
+std::ostream& operator << (std::ostream& os, const Polynomial<NT>& p) {
+  switch(CGAL::get_mode(os)) {
+  case CGAL::IO::PRETTY:
+    p.output_maple(os); break;
+  default:
+    p.output_ascii(os); break;
+  }
+  return os;
+}
+
+/*! \ingroup CGAL_Polynomial
+ *  \relates CGAL::Polynomial
+ *  \brief try to read a polynomial from \c is into \c p
+ *
+ *  \c is must be in a mode that supports input of polynomials
+ *  (\c LiS::IO::ASCII or \c LiS::IO::BINARY) and the input from
+ *  \c is must have the format of output to a stream of the same mode.
+ */
+template <class NT>
+std::istream& operator >> (std::istream& is, Polynomial<NT>& p) {
+  CGAL_precondition(!CGAL::is_pretty(is));
+  p = Polynomial<NT>::input_ascii(is);
+  return is;
+}
+
+
+template <class NT> inline
+void print_maple_monomial(std::ostream& os, const NT& coeff,
+    const char *var, int expn)
+{
+  if (expn == 0 || coeff != NT(1)) {
+    os << CGAL::oformat(coeff, Parens_as_product_tag());
+    if (expn >= 1) os << "*";
+  }
+  if (expn >= 1) {
+    os << var;
+    if (expn > 1) os << "^" << CGAL::oformat(expn);
+  }
+}
+
+// fwd declaration of Polynomial_traits_d
+template <typename Polynomial_d> class Polynomial_traits_d;
+
+template <class NT>
+void Polynomial<NT>::output_maple(std::ostream& os) const {
+  const Polynomial<NT>& p = *this;
+  const char *varname;
+  char vnbuf[42];
+    
+  // use variable names x, y, z, w1, w2, w3, ...
+  if (Polynomial_traits_d<NT>::d < 3) {
+    static const char *varnames[] = { "x", "y", "z" };
+    varname = varnames[Polynomial_traits_d<NT>::d];
+  } else {
+    std::sprintf(vnbuf, "w%d", Polynomial_traits_d<NT>::d - 2);
+    varname = vnbuf;
+  }
+    
+  int i = p.degree();
+  CGAL::print_maple_monomial(os, p[i], varname, i);
+  while (--i >= 0) {
+    if (p[i] != NT(0)) {
+      os << " + ";
+      CGAL::print_maple_monomial(os, p[i], varname, i);
+    }
+  }
+}
+
+template <class NT>
+void Polynomial<NT>::output_ascii(std::ostream &os) const {
+  const Polynomial<NT> &p = *this;
+  if (p.is_zero()) { os << "P[0 (0," << oformat(NT(0)) << ")]"; return; }
+
+  os << "P[" << oformat(p.degree());
+  for (int i = 0; i <= p.degree(); i++) {
+    if (p[i] != NT(0)) os << "(" << CGAL::oformat(i) << ","
+                          << CGAL::oformat(p[i]) << ")";
+  }
+  os << "]";
+}
+
+template <class NT>
+void Polynomial<NT>::output_benchmark(std::ostream &os) const {
+  typedef typename Polynomial_traits_d< Polynomial<NT> >::Innermost_coefficient_type 
+    Innermost_coefficient_type;
+  typedef std::pair< Exponent_vector, Innermost_coefficient_type >
+    Exponents_coeff_pair;
+  typedef typename Polynomial_traits_d< Polynomial<NT> >::Monomial_representation Gmr;
+    
+  std::vector< Exponents_coeff_pair > monom_rep;
+  Gmr gmr;
+  gmr( *this, std::back_inserter( monom_rep ) );
+    
+  os << Benchmark_rep< Polynomial< NT > >::get_benchmark_name() << "( ";
+    
+  for( typename std::vector< Exponents_coeff_pair >::iterator it = monom_rep.begin();
+       it != monom_rep.end(); ++it ) {
+    if( it != monom_rep.begin() )
+      os << ", ";
+    os << "( " << bmformat( it->second ) << ", ";
+    it->first.output_benchmark(os);
+    os << " )";        
+  }
+  os << " )";
+}
+
+// Benchmark_rep specialization 
+template < class NT >
+class Benchmark_rep< CGAL::Polynomial< NT > > {
+  const CGAL::Polynomial< NT >& t;
+public:
+  //! initialize with a const reference to \a t.
+  Benchmark_rep( const CGAL::Polynomial< NT >& tt) : t(tt) {}
+  //! perform the output, calls \c operator\<\< by default.
+  std::ostream& operator()( std::ostream& out) const { 
+    t.output_benchmark( out );
+    return out;
+  }
+    
+  static std::string get_benchmark_name() {
+    std::stringstream ss;
+    ss << "Polynomial< " << Polynomial_traits_d< Polynomial< NT > >::d;
+        
+    std::string coeff_name = Benchmark_rep< NT >::get_benchmark_name();
+        
+    if( coeff_name != "" )
+      ss << ", " << coeff_name;
+        
+    ss << " >";
+    return ss.str();
+  }
+};
+
+// Moved to internal namespace because of name clashes
+// TODO: Is this OK?
+namespace internal {
+
+inline static void swallow(std::istream &is, char d) {
+  char c;
+  do c = is.get(); while (isspace(c));
+  if (c != d) CGAL_error_msg( "input error: unexpected character in polynomial");
+}
+} // namespace internal
+
+template <class NT>
+Polynomial<NT> Polynomial<NT>::input_ascii(std::istream &is) {
+  char c;
+  int degr = -1, i=0;
+
+  internal::swallow(is, 'P');
+  internal::swallow(is, '[');
+  is >> CGAL::iformat(degr);
+  if (degr < 0) {
+    CGAL_error_msg( "input error: negative degree of polynomial specified");
+  }
+  internal::Creation_tag TAG;
+  Polynomial<NT> p(TAG, degr+1);
+
+  do c = is.get(); while (isspace(c));
+  do {
+    if (c != '(') CGAL_error_msg( "input error: ( expected");
+    is >> CGAL::iformat(i);
+    if (!(i >= 0 && i <= degr && p[i] == NT(0))) {
+      CGAL_error_msg( "input error: invalid exponent in polynomial");
+    };
+    internal::swallow(is, ',');
+    is >> CGAL::iformat(p.coeff(i));
+    internal::swallow(is, ')');
+    do c = is.get(); while (isspace(c));
+  } while (c != ']');
+
+  p.reduce();
+  p.simplify_coefficients();
+  return p;
+}
+
+template <class COEFF>
+struct Needs_parens_as_product<Polynomial<COEFF> >{
+  typedef Polynomial<COEFF> Poly;
+  bool operator()(const Poly& x){ return (x.degree() > 0); }
+};
+
+
+
+} //namespace CGAL
+
+#undef CGAL_icoeff
+#undef CGAL_int
+
+#endif // CGAL_POLYNOMIAL_POLYNOMIAL_TYPE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Real_embeddable_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Real_embeddable_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Real_embeddable_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Real_embeddable_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Root_stack_default_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Root_stack_default_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Root_stack_default_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Root_stack_default_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Scalar_factor_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Scalar_factor_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Scalar_factor_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Scalar_factor_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Sturm_root_stack.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Sturm_root_stack.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Sturm_root_stack.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Sturm_root_stack.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/Sturm_root_stack_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/Sturm_root_stack_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/Sturm_root_stack_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/Sturm_root_stack_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/bezout_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/bezout_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/bezout_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/bezout_matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/determinant.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/determinant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/determinant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/determinant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/fwd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/hgdelta_update.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/hgdelta_update.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/hgdelta_update.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/hgdelta_update.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Alternation_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Alternation_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Alternation_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Alternation_counter.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/CORE_polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/CORE_polynomial.h
new file mode 100644
index 0000000..9855d00
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/CORE_polynomial.h
@@ -0,0 +1,278 @@
+// Copyright (c) 2005,2006  Stanford University (USA).
+// 
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$ $Date$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_POLYNOMIAL_POLYNOMIAL_POLYCORE_KERNEL_H
+#define CGAL_POLYNOMIAL_POLYNOMIAL_POLYCORE_KERNEL_H
+#include <CGAL/Polynomial/basic.h>
+
+#include <CGAL/CORE_Expr.h>
+#include <CGAL/CORE/poly/Poly.h>
+#include <CGAL/CORE_BigFloat.h>
+#include <CGAL/CORE_Expr.h>
+#include <CGAL/CORE_BigRat.h>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+
+struct CORE_polynomial {
+  typedef CORE::Polynomial<CORE::BigRat> P;
+  typedef CORE::BigRat NT;
+
+  template <class It>
+  CORE_polynomial(It b, It e): p_(std::vector<NT> (b,e)) {
+    /*for (int i=0; i<= degree(); ++i){
+      CGAL_precondition(P::getCoeffi(i).err()==0);
+      }*/
+  }
+  CORE_polynomial(){
+  }
+  CORE_polynomial(NT n): p_(0, &n){
+  }
+  CORE_polynomial(int d): p_(d){}
+  CORE_polynomial(const P&p): p_(p){
+    /*for (int i=0; i<= degree(); ++i){
+      CGAL_precondition(p_.getCoeffi(i).err()==0);
+      }*/
+  }
+
+  NT operator[](unsigned int i) const {
+    return p_.getCoeffi(i);
+  }
+
+  /*NT &operator[](unsigned int i) {
+    return p_.getCoeffi(i);
+    }*/
+
+  NT operator()(const NT &nt) const {
+    return p_.eval(nt);
+  }
+
+  bool operator==(const CORE_polynomial&o ) const {
+    if (p_.getTrueDegree() != o.p_.getTrueDegree()) {
+      return false;
+    } else {
+      for (int i=0; i<= p_.getTrueDegree(); ++i) {
+	if (operator[](i) != o[i]) return false;
+      }
+    }
+    return true;
+  }
+  
+  void contract()  {
+    p_.contract();
+  }
+
+  bool operator!=(const CORE_polynomial&o ) const {
+    return !operator==(o);
+  }
+
+  CORE_polynomial operator/(const NT &nt) const {
+    P ret(p_.getTrueDegree());
+    for (int i=0; i<= degree(); ++i){
+      ret.setCoeff(i, operator[](i)/nt);
+      //CGAL_assertion(rr);
+    }
+    return CORE_polynomial(ret);
+  }
+
+  CORE_polynomial operator-() const {
+    P ret(p_.getTrueDegree());
+    for (int i=0; i<= degree(); ++i){
+      ret.setCoeff(i, -operator[](i));
+      //CGAL_assertion(setr);
+    }
+    return CORE_polynomial(ret);
+  }
+
+  CORE_polynomial operator-(const CORE_polynomial &o) const {
+    CORE_polynomial r(core_polynomial());
+    r.p_-=o.core_polynomial();
+    return r;
+  }
+
+
+  CORE_polynomial operator+(const CORE_polynomial &o) const {
+    CORE_polynomial r(core_polynomial());
+    r.p_+=o.core_polynomial();
+    return r;
+  }
+
+  CORE_polynomial operator*(const CORE_polynomial &o) const {
+    CORE_polynomial r(core_polynomial());
+    r.p_*=o.core_polynomial();
+    return r;
+  }
+
+  CORE::Expr operator()(const CORE::Expr &nt) const {
+    return p_.eval(nt);
+  }
+
+  int degree() const {
+    return p_.getTrueDegree();
+  }
+
+  const P &core_polynomial() const {
+    return p_;
+  }
+
+  //! write it in maple format
+  template <class C, class T>
+  void write(std::basic_ostream<C,T> &out) const
+  {
+    std::basic_ostringstream<C,T> s;
+    s.flags(out.flags());
+    s.imbue(out.getloc());
+    s.precision(12);
+    if (degree()<0) {
+      s << "0";
+    }
+    else {
+      for (int i=0; i<= degree(); ++i) {
+	if (i==0) {
+	  if (p_.getCoeffi(i) != 0) s << p_.getCoeffi(i);
+	}
+	else {
+	  if ( p_.getCoeffi(i) != 0 ) {
+	    if (p_.getCoeffi(i) >0) s << "+";
+	    s << p_.getCoeffi(i) << "*t";
+	    if (i != 1) {
+	      s << "^" << i;
+	    }
+	  }
+	}
+      }
+    }
+
+    out << s.str();
+  }
+
+
+ //! Read very stylized input
+  template <class charT, class Traits>
+  void read(std::basic_istream<charT, Traits> &in) {
+    std::vector<NT> coefs;
+    bool pos=(in.peek()!='-');
+    if (in.peek() == '+' || in.peek() == '-') {
+      char c;
+      in >> c;
+    }
+    char v='\0';
+    while (true) {
+      char vc, t;
+      NT coef;
+      // eat
+      in >> coef;
+      //coef.makeExact();
+      if (!in.good()) return;
+      unsigned int pow;
+      char p= in.peek();
+      if (in.peek() =='*') {
+	in >> t >> vc;
+	if (t != '*') {
+	  in.setstate(std::ios_base::failbit);
+	  return;
+	  //return in;
+	}
+	if ( !(v=='\0' || v== vc)) {
+	  in.setstate(std::ios_base::failbit);
+	  return;
+	  //return in;
+	}
+	v=vc;
+	p=in.peek();
+	if (in.peek() =='^') {
+	  char c;
+	  in  >> c >> pow;
+	}
+	else {
+	  pow=1;
+	}
+      }
+      else {
+	pow=0;
+      }
+
+      if (coefs.size() <=pow) {
+	coefs.resize(pow+1);
+      }
+
+      if (!pos) coef=-coef;
+      coefs[pow]=coef;
+
+      char n= in.peek();
+      if (n=='+' || n=='-') {
+	pos= (n!='-');
+	char e;
+	in >> e;
+      } else {
+	/*bool f= in.fail();
+	  bool g= in.good();
+	  bool e= in.eof();
+	  bool b= in.bad();*/
+	// This is necessary since peek could have failed if we hit the end of the buffer
+	// it would better to do without peek, but that is too messy
+	in.clear();
+	//std::cout << f << g << e << b<<std::endl;
+	break;
+      }
+    }
+    
+    p_.operator=(P(coefs));
+  }
+
+  bool is_constant() const {
+    return degree() < 1;
+  }
+
+  typedef const NT* iterator;
+  iterator begin() const {
+    return p_.coeff;
+  }
+  iterator end() const {
+    return p_.coeff+p_.degree+1;
+  }
+
+
+protected:
+  P p_;
+};
+
+template < class C, class Tr>
+inline std::ostream &operator<<(std::basic_ostream<C, Tr> &out,
+				const CORE_polynomial &poly)
+{
+  poly.write(out);
+  return out;
+}
+
+template <class C, class Tr>
+inline std::istream &operator>>(std::basic_istream<C, Tr> &in,
+				CORE_polynomial &poly)
+{
+  poly.read(in);
+  return in;
+}
+
+inline CORE_polynomial operator*(const CORE_polynomial::NT &a,
+			  const CORE_polynomial &p){
+  //CORE_polynomial::NT ac(a);
+  return CORE_polynomial(CORE_polynomial::P(0, &a)*p.core_polynomial());
+}
+
+} } } //namespace CGAL::POLYNOMIAL::internal
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Descartes_root_count.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Descartes_root_count.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Descartes_root_count.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Descartes_root_count.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Double_with_infinity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Double_with_infinity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Double_with_infinity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Double_with_infinity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_function.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_function.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_has_root.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_has_root.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_has_root.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_has_root.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_root_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_root_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_root_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_root_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_are_negations.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_are_negations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_are_negations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_are_negations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_polynomial_rational_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_polynomial_rational_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_polynomial_rational_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_polynomial_rational_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_bound_evaluator.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_bound_evaluator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_bound_evaluator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_bound_evaluator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_multiplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_multiplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_multiplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_multiplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_number.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_number.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_number.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_number.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Construct_filtered_function.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Construct_filtered_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Construct_filtered_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Construct_filtered_function.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_has_root.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_has_root.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_has_root.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_has_root.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_root_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_root_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_root_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_root_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_are_negations.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_are_negations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_are_negations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_are_negations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_multiplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_multiplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_multiplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_multiplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_sign_above_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_sign_above_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_sign_above_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_sign_above_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_root_bound_evaluator.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_root_bound_evaluator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_root_bound_evaluator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_root_bound_evaluator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_at_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_at_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_at_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_sign_at_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_standard_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_standard_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_standard_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Filtered_rational/Filtered_standard_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Fixed_polynomial_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Fixed_polynomial_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Fixed_polynomial_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Fixed_polynomial_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/GSL_numeric_solver.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/GSL_numeric_solver.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/GSL_numeric_solver.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/GSL_numeric_solver.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Isolating_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Isolating_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Isolating_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Isolating_interval.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h
new file mode 100644
index 0000000..c9153c8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h
@@ -0,0 +1,135 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+
+#ifdef CGAL_HAVE_TNT
+#include <TNT/tnt_array2d.h>
+#include <TNT/tnt_array1d.h>
+#include <TNT/jama_eig.h>
+#endif
+
+#include <algorithm>
+#include <functional>
+#include <iterator>
+
+//#include <iomanip>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+#if CGAL_HAVE_TNT
+//static const double max_error_value =0.00005;
+
+template <bool CLEAN, class NT>
+static void jama_compute_roots(const NT *begin, const NT *end,  NT lb,
+NT ub, std::vector<NT> &roots)
+{
+    int degree= end-begin-1;
+    TNT::Array2D<NT> arr(degree, degree, 0.0);
+    for (int i=0; i< degree; ++i) {
+        arr[0][i]=-begin[degree-i-1]/begin[degree];
+    }
+    for (int i=0; i+1< degree; ++i) {
+        arr[i+1][i]=1;
+    }
+
+    JAMA::Eigenvalue<NT> ev(arr);
+    TNT::Array1D<NT> real, imag;
+    ev.getImagEigenvalues(imag);
+    ev.getRealEigenvalues(real);
+    CGAL_Polynomial_assertion(imag.dim1()== real.dim1());
+
+    /*NT tol;
+    if (CLEAN) tol=.00005;
+    else tol=0;*/
+
+    for (int i=0; i< real.dim1(); ++i) {
+        if (root_is_good(real[i], imag[i], lb-tol, ub)) {
+            roots.push_back(real[i]/*polish_root(begin, end, real[i])*/);
+        } else {
+        }
+    }
+    std::sort(roots.begin(), roots.end(), std::greater<NT>());
+    if (CLEAN) filter_roots(begin, end, lb, roots);
+}
+
+#endif
+
+
+CGAL_INLINE_FUNCTION
+void jama_polynomial_compute_roots(const double *begin, const double *end,
+double lb, double ub,
+std::vector<double> &roots)
+{
+  std::ptrdiff_t degree= end-begin-1;
+    switch( degree) {
+        case -1:
+        case 0:
+            break;
+        case 1:
+            compute_linear_roots(begin,end, lb, ub, roots);
+            break;
+        case 2:
+            compute_quadratic_roots(begin, end, lb, ub, roots);
+            break;
+        default:
+#ifdef CGAL_HAVE_TNT
+	  jama_compute_roots<false>(begin, end, lb, ub, roots);
+#else
+	  CGAL_error();
+#endif
+	  //jama_compute_roots<false>(begin, end, lb, ub, roots);
+    }
+}
+
+
+CGAL_INLINE_FUNCTION
+void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end,
+double lb, double ub,
+std::vector<double> &roots)
+{
+  std::ptrdiff_t degree= end-begin-1;
+    switch( degree) {
+        case -1:
+        case 0:
+            break;
+        case 1:
+            compute_linear_cleaned_roots(begin,end, lb, ub, roots);
+            break;
+        case 2:
+            compute_quadratic_cleaned_roots(begin, end, lb, ub, roots);
+            break;
+        default:
+#ifdef CGAL_HAVE_TNT
+	  jama_compute_roots<true>(begin, end, lb, ub, roots);
+#else
+	  CGAL_error();
+#endif
+    }
+}
+
+
+} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Is_even_multiplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Is_even_multiplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Is_even_multiplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Is_even_multiplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Is_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Is_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Is_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Is_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Isolating_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Isolating_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Isolating_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Isolating_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Lower_bound_root.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Lower_bound_root.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Lower_bound_root.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Lower_bound_root.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Multiplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Multiplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Multiplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Multiplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Rational_between_roots.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Rational_between_roots.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Rational_between_roots.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Rational_between_roots.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Root_container.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Root_container.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Root_container.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Root_container.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_above.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_above.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_above.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_above.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_at.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_at.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_at.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_at.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_below.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_below.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_below.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_below.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_between_roots.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_between_roots.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/Sign_between_roots.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/Sign_between_roots.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/To_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/To_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/To_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/To_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/predicate_template.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/predicate_template.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Kernel/predicate_template.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Kernel/predicate_template.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Polynomial_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Polynomial_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Polynomial_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Polynomial_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Are_negations.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Are_negations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Are_negations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Are_negations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Bezier_root_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Bezier_root_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Bezier_root_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Bezier_root_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Compare_isolated_roots_in_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Compare_isolated_roots_in_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Compare_isolated_roots_in_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Compare_isolated_roots_in_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Construct_function.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Construct_function.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Construct_function.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Construct_function.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Derivative.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Derivative.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Derivative.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Derivative.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Descartes_has_root.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Descartes_has_root.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Descartes_has_root.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Descartes_has_root.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Descartes_root_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Descartes_root_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Descartes_root_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Descartes_root_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Euclidean_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Euclidean_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Euclidean_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Euclidean_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Evaluate_polynomial.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Evaluate_polynomial.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Evaluate_polynomial.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Evaluate_polynomial.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Invert_variable.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Invert_variable.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Invert_variable.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Invert_variable.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Map_rational_interval_to_positive.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Map_rational_interval_to_positive.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Map_rational_interval_to_positive.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Map_rational_interval_to_positive.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Monic_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Monic_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Monic_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Monic_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Negate_variable.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Negate_variable.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Negate_variable.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Negate_variable.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Primitive_part_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Primitive_part_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Primitive_part_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Primitive_part_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Pseudo_quotient.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Pseudo_quotient.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Pseudo_quotient.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Pseudo_quotient.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Pseudo_remainder.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Pseudo_remainder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Pseudo_remainder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Pseudo_remainder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Quotient.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Quotient.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Quotient.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Quotient.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Quotient_remainder.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Quotient_remainder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Quotient_remainder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Quotient_remainder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_multiplicity.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_multiplicity.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_multiplicity.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_multiplicity.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_translate_zero.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_translate_zero.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Rational_translate_zero.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Rational_translate_zero.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Reduced_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Reduced_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Reduced_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Reduced_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Remainder.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Remainder.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Remainder.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Remainder.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Shift_power.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Shift_power.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Shift_power.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Shift_power.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_above_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_above_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_above_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_above_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_at_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_at_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_at_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_at_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_below_rational.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_below_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sign_below_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sign_below_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Standard_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Standard_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Standard_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Standard_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_root_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_root_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_root_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_root_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_sequence_base.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_sequence_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Sturm_sequence_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Sturm_sequence_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Subresultant_Sturm_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Subresultant_Sturm_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Rational/Subresultant_Sturm_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Rational/Subresultant_Sturm_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Root_stack_traits_base.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Root_stack_traits_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Root_stack_traits_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Root_stack_traits_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sign_variations_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sign_variations_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sign_variations_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sign_variations_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Simple_interval_root.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Simple_interval_root.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Simple_interval_root.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Simple_interval_root.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Statistics.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Statistics.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Statistics.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Statistics.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sturm_isolating_interval.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sturm_isolating_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sturm_isolating_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sturm_isolating_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sturm_root_rep.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sturm_root_rep.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/Sturm_root_rep.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Sturm_root_rep.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h
new file mode 100644
index 0000000..bac3c74
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h
@@ -0,0 +1,467 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+
+/*#ifdef _MSC_VER
+#pragma warning(disable:1572)
+#endif*/
+
+
+//#include "numeric_solvers_support.C"
+
+// Taken from http://www.worldserver.com/turk/opensource/
+
+/* Copyright (C) 1978-1999 Ken Turkowski. <turk_at_computer.org>
+ *
+ * All rights reserved.
+ *
+ * Warranty Information
+ *  Even though I have reviewed this software, I make no warranty
+ *  or representation, either express or implied, with respect to this
+ *  software, its quality, accuracy, merchantability, or fitness for a
+ *  particular purpose.  As a result, this software is provided "as is,"
+ *  and you, its user, are assuming the entire risk as to its quality
+ *  and accuracy.
+ *
+ * This code may be used and freely distributed as long as it includes
+ * this copyright notice and the above warranty information.
+ */
+
+#include <cmath>
+#include <iomanip>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+
+# define FLOAT double
+
+static const unsigned int MAXN= 55;
+//# define PARAMFLOAT double_t
+
+/*******************************************************************************
+ * FindCubicRoots
+ *
+ *	Solve:
+ *		coeff[3] * x^3 + coeff[2] * x^2 + coeff[1] * x + coeff[0] = 0
+ *
+ *	returns:
+ *		3 - 3 real roots
+ *		1 - 1 real root (2 complex conjugate)
+ *******************************************************************************/
+
+static long
+FindCubicRoots(const FLOAT coeff[4], FLOAT x[3])
+{
+  FLOAT a1 = coeff[2] / coeff[3];
+  FLOAT a2 = coeff[1] / coeff[3];
+  FLOAT a3 = coeff[0] / coeff[3];
+
+  double Q = (a1 * a1 - 3 * a2) / 9;
+  double R = (2 * a1 * a1 * a1 - 9 * a1 * a2 + 27 * a3) / 54;
+  double Qcubed = Q * Q * Q;
+  double d = Qcubed - R * R;
+
+  /* Three real roots */
+  if (d >= 0) {
+    double theta = std::acos(R / std::sqrt(Qcubed));
+    double sqrtQ = std::sqrt(Q);
+    x[0] = -2 * sqrtQ * std::cos( theta           / 3) - a1 / 3;
+    x[1] = -2 * sqrtQ * std::cos((theta + 2 * CGAL_PI) / 3) - a1 / 3;
+    x[2] = -2 * sqrtQ * std::cos((theta + 4 * CGAL_PI) / 3) - a1 / 3;
+    return (3);
+  }
+
+  /* One real root */
+  else {
+    double e = std::pow(std::sqrt(-d) + ::CGAL::abs(R), 1. / 3.);
+    if (R > 0)
+      e = -e;
+    x[0] = (e + Q / e) - a1 / 3.;
+    return (1);
+  }
+}
+
+
+/*******************************************************************************
+ * FindPolynomialRoots
+ *
+ * The Bairstow and Newton correction formulae are used for a simultaneous
+ * linear and quadratic iterated synthetic division.  The coefficients of
+ * a polynomial of degree n are given as a[i] (i=0,i,..., n) where a[0] is
+ * the constant term.  The coefficients are scaled by dividing them by
+ * their geometric mean.  The Bairstow or Newton iteration method will
+ * nearly always converge to the number of figures carried, fig, either to
+ * root values or to their reciprocals.  If the simultaneous Newton and
+ * Bairstow iteration fails to converge on root values or their
+ * reciprocals in maxiter iterations, the convergence requirement will be
+ * successively reduced by one decimal figure.  This program anticipates
+ * and protects against loss of significance in the quadratic synthetic
+ * division.  (Refer to "On Programming the Numerical Solution of
+ * Polynomial Equations," by K. W. Ellenberger, Commun. ACM 3 (Dec. 1960),
+ * 644-647.)  The real and imaginary part of each root is stated as u[i]
+ * and v[i], respectively, together with the corresponding constant,
+ * conv[i], used in the convergence test.  This program has been used
+ * successfully for over a year on the Bendix G15-D (Intercard System) and
+ * has recently been coded for the IBM 709 (Fortran system).
+ *
+ * ACM algorithm #30 - Numerical Solution of the Polynomial Equation
+ * K. W. Ellenberger
+ * Missle Division, North American Aviation, Downey, California
+ * Converted to C, modified, optimized, and structured by
+ * Ken Turkowski
+ * CADLINC, Inc., Palo Alto, California
+ *******************************************************************************/
+
+static void
+FindPolynomialRoots(
+		    const FLOAT     *a,                               /* Coefficients */
+		    FLOAT           *u,                               /* Real component of each root */
+		    FLOAT           *v,                               /* Imaginary component of each root */
+		    FLOAT           *conv,                            /* Convergence constant associated with each root */
+		    long            n,                                /* Degree of polynomial (order-1) */
+		    long            maxiter,                          /* Maximum number of iterations */
+		    long            fig                               /* The number of decimal figures to be computed */
+		    )
+{
+  int number_of_ITERATE=0;
+  int number_of_INIT=0;
+  CGAL_precondition(static_cast<unsigned int>(fig) < MAXN);
+  int i;
+  int j;
+  FLOAT h[MAXN + 3], b[MAXN + 3], c[MAXN + 3], d[MAXN + 3], e[MAXN + 3];
+  /* [-2 : n] */
+  FLOAT K, ps, qs, pt, qt, s, rev, r= std::numeric_limits<double>::infinity();
+  int t;
+  FLOAT p=std::numeric_limits<double>::infinity(), q=std::numeric_limits<double>::infinity();
+
+  /* Zero elements with negative indices */
+  b[2 + -1] = b[2 + -2] =
+    c[2 + -1] = c[2 + -2] =
+    d[2 + -1] = d[2 + -2] =
+    e[2 + -1] = e[2 + -2] =
+    h[2 + -1] = h[2 + -2] = 0.0;
+
+  /* Copy polynomial coefficients to working storage */
+  for (j = n; j >= 0; j--)
+    h[2 + j] = *a++;                          /* Note reversal of coefficients */
+
+  t = 1;
+  K = std::pow(10.0, (double)(fig));            /* Relative accuracy */
+
+  for (; h[2 + n] == 0.0; n--) {                /* Look for zero high-order coeff. */
+    *u++ = 0.0;
+    *v++ = 0.0;
+    *conv++ = K;
+  }
+
+ INIT:
+  ++number_of_INIT;
+  if (number_of_INIT > 1000) {
+    std::cerr << "Too many INITs" << std::flush;
+    return;
+  }
+
+  if (n == 0)
+    return;
+
+  ps = qs = pt = qt = s = 0.0;
+  rev = 1.0;
+  K = std::pow(10.0, (double)(fig));
+
+  if (n == 1) {
+    r = -h[2 + 1] / h[2 + 0];
+    goto LINEAR;
+  }
+
+  for (j = n; j >= 0; j--)                      /* Find geometric mean of coeff's */
+    if (h[2 + j] != 0.0)
+      s += std::log( ::CGAL::abs(h[2 + j]));
+  s = std::exp(s / (n + 1));
+
+  for (j = n; j >= 0; j--)                      /* Normalize coeff's by mean */
+    h[2 + j] /= s;
+
+  if ( ::CGAL::abs(h[2 + 1] / h[2 + 0]) < ::CGAL::abs(h[2 + n - 1] / h[2 + n])) {
+  REVERSE:
+    t = -t;
+    for (j = (n - 1) / 2; j >= 0; j--) {
+      s = h[2 + j];
+      h[2 + j] = h[2 + n - j];
+      h[2 + n - j] = s;
+    }
+  }
+  if (qs != 0.0) {
+    p = ps;
+    q = qs;
+  }
+  else {
+    if (h[2 + n - 2] == 0.0) {
+      q = 1.0;
+      p = -2.0;
+    }
+    else {
+      q = h[2 + n] / h[2 + n - 2];
+      p = (h[2 + n - 1] - q * h[2 + n - 3]) / h[2 + n - 2];
+    }
+    if (n == 2)
+      goto QADRTIC;
+    r = 0.0;
+  }
+ ITERATE:
+  ++number_of_ITERATE;
+  if (number_of_ITERATE > 1000) {
+    std::cerr << "Too many ITERATEs" << std::flush;
+    return;
+  }
+  for (i = maxiter; i > 0; i--) {
+
+    for (j = 0; j <= n; j++) {                /* BAIRSTOW */
+      b[2 + j] = h[2 + j] - p * b[2 + j - 1] - q * b[2 + j - 2];
+      c[2 + j] = b[2 + j] - p * c[2 + j - 1] - q * c[2 + j - 2];
+    }
+    if ((h[2 + n - 1] != 0.0) && (b[2 + n - 1] != 0.0)) {
+      if ( ::CGAL::abs(h[2 + n - 1] / b[2 + n - 1]) >= K) {
+	b[2 + n] = h[2 + n] - q * b[2 + n - 2];
+      }
+      if (b[2 + n] == 0.0)
+	goto QADRTIC;
+      if (K < ::CGAL::abs(h[2 + n] / b[2 + n]))
+	goto QADRTIC;
+    }
+
+    for (j = 0; j <= n; j++) {                /* NEWTON */
+      /* Calculate polynomial at r */
+      d[2 + j] = h[2 + j] + r * d[2 + j - 1];
+      /* Calculate derivative at r */
+      e[2 + j] = d[2 + j] + r * e[2 + j - 1];
+    }
+    if (d[2 + n] == 0.0)
+      goto LINEAR;
+    if (K < ::CGAL::abs(h[2 + n] / d[2 + n]))
+      goto LINEAR;
+
+    c[2 + n - 1] = -p * c[2 + n - 2] - q * c[2 + n - 3];
+    s = c[2 + n - 2] * c[2 + n - 2] - c[2 + n - 1] * c[2 + n - 3];
+    if (s == 0.0) {
+      p -= 2.0;
+      q *= (q + 1.0);
+    }
+    else {
+      p += (b[2 + n - 1] * c[2 + n - 2] - b[2 + n] * c[2 + n - 3]) / s;
+      q += (-b[2 + n - 1] * c[2 + n - 1] + b[2 + n] * c[2 + n - 2]) / s;
+    }
+    if (e[2 + n - 1] == 0.0)
+      r -= 1.0;                             /* Minimum step */
+    else
+      r -= d[2 + n] / e[2 + n - 1];         /* Newton's iteration */
+  }
+  ps = pt;
+  qs = qt;
+  pt = p;
+  qt = q;
+  if (rev < 0.0)
+    K /= 10.0;
+  rev = -rev;
+  goto REVERSE;
+
+ LINEAR:
+  if (t < 0)
+    r = 1.0 / r;
+  n--;
+  *u++ = r;
+  *v++ = 0.0;
+  *conv++ = K;
+
+  for (j = n; j >= 0; j--) {                    /* Polynomial deflation by lin-nomial */
+    if ((d[2 + j] != 0.0) && ( ::CGAL::abs(h[2 + j] / d[2 + j]) < K))
+      h[2 + j] = d[2 + j];
+    else
+      h[2 + j] = 0.0;
+  }
+
+  if (n == 0)
+    return;
+  goto ITERATE;
+
+ QADRTIC:
+  if (t < 0) {
+    p /= q;
+    q = 1.0 / q;
+  }
+  n -= 2;
+
+  if (0.0 < (q - (p * p / 4.0))) {              /* Two complex roots */
+    *(u + 1) = *u = -p / 2.0;
+    u += 2;
+    s = sqrt(q - (p * p / 4.0));
+    *v++ = s;
+    *v++ = -s;
+  }                                             /* Two real roots */
+  else {
+    s = std::sqrt(((p * p / 4.0)) - q);
+    if (p < 0.0)
+      *u++ = -p / 2.0 + s;
+    else
+      *u++ = -p / 2.0 - s;
+    *u = q / u[-1];
+    ++u;                                      // moved from lhs of before
+    *v++ = 0.0;
+    *v++ = 0.0;
+  }
+  *conv++ = K;
+  *conv++ = K;
+
+  for (j = n; j >= 0; j--) {                    /* Polynomial deflation by quadratic */
+    if ((b[2 + j] != 0.0) && ( ::CGAL::abs(h[2 + j] / b[2 + j]) < K))
+      h[2 + j] = b[2 + j];
+    else
+      h[2 + j] = 0.0;
+  }
+  goto INIT;
+}
+
+
+#undef MAXN
+
+template <bool CLEAN>
+static void Turkowski_polynomial_compute_roots_t(const double *begin, 
+						 const double *end,
+						 double lb, double ub,
+						 std::vector<double> &roots)
+{
+  std::size_t numc= end-begin;
+  double rp[MAXN];
+  double cp[MAXN];
+  double cc[MAXN];
+
+  /*for (unsigned int i=0; i< numc; ++i){
+    rp[i]= std::numeric_limits<double>::infinity();
+    }*/
+
+  for (unsigned int i=0; i< MAXN; ++i){
+    cc[i]=std::numeric_limits<double>::infinity();
+    rp[i]=std::numeric_limits<double>::infinity();
+    cc[i]=std::numeric_limits<double>::infinity();
+  }
+
+  FindPolynomialRoots(begin, rp, cp, cc, static_cast<long>(numc)-1, 10*static_cast<long>(numc), 40);
+
+  /*if (CLEAN) {
+    lb-= .000005;
+    }*/
+  double last= -std::numeric_limits<double>::infinity();
+  for (std::size_t i=0; i< numc-1; ++i) {
+    /* std::cout << "Trying " <<  rp[i] << "+" << std::setprecision(10) <<  cp[i] << "i "
+       << cc[i] << "\n";*/
+    if (cc[i] > 10000 && root_is_good(rp[i], cp[i], lb, ub)) {
+      roots.push_back(rp[i]);
+      /*std::cout << "Good was " <<  rp[i] << "+" <<std::setprecision(10) <<  cp[i] << "i "
+	<< cc[i] << "\n";*/
+    } else if (CLEAN && root_is_good(rp[i], cp[i], last, ub) && last < rp[i] && rp[i] <= lb) {
+      last= rp[i];
+    }
+    /*else {
+      std::cout << "Rejected " << rp[i] << "+" << cp[i] << "i\n";
+      }*/
+  }
+  std::sort(roots.begin(), roots.end(), std::greater<double>());
+  
+  if (CLEAN) filter_solver_roots(begin, end, lb, ub, last, roots);
+}
+
+CGAL_INLINE_FUNCTION
+void Turkowski_polynomial_compute_roots(const double *begin, const double *end, 
+					double lb, double ub, 
+					std::vector<double> &roots)
+{
+
+  std::ptrdiff_t degree= end-begin-1;
+  switch( degree) {
+  case -1:
+  case 0:
+    break;
+  case 1:
+    compute_linear_roots(begin,end, lb, ub, roots);
+    break;
+  case 2:
+    compute_quadratic_roots(begin, end, lb, ub, roots);
+    break;
+  case 3:
+    {
+      double rd[3];
+      int numr= FindCubicRoots(begin, rd);
+      for (int i=numr-1; i>=0; --i) {
+	if (rd[i] >= lb && rd[i] < ub) roots.push_back(rd[i]);
+      }
+      std::sort(roots.begin(), roots.end(), std::greater<double>());
+      break;
+    }
+  default:
+    Turkowski_polynomial_compute_roots_t<false>(begin, end, lb, ub, roots);
+
+  }
+
+}
+
+CGAL_INLINE_FUNCTION
+void Turkowski_polynomial_compute_cleaned_roots(const double *begin, const double *end, 
+						double lb, double ub,
+						std::vector<double> &roots)
+{
+  std::ptrdiff_t degree= end-begin-1;
+  switch( degree) {
+  case -1:
+  case 0:
+    break;
+  case 1:
+    compute_linear_cleaned_roots(begin,end, lb, ub, roots);
+    break;
+  case 2:
+    compute_quadratic_cleaned_roots(begin, end, lb, ub, roots);
+    break;
+  case 3:
+    {
+      double rd[3];
+      int numr= FindCubicRoots(begin, rd);
+      double last=-std::numeric_limits<double>::infinity();
+      for (int i=numr-1; i>=0; --i) {
+	if (rd[i]< ub && rd[i] >= lb) roots.push_back(rd[i]);
+	if (rd[i] < lb && rd[i] > last){
+	  last=rd[i];
+	}
+      }
+      std::sort(roots.begin(), roots.end(), std::greater<double>());
+      filter_solver_roots(begin, end, lb, ub, last, roots);
+      break;
+    }
+  default:
+    Turkowski_polynomial_compute_roots_t<true>(begin, end, lb, ub, roots);
+  }
+}
+
+
+} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/config.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/config.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/config.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_leaf_nodes.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_leaf_nodes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_leaf_nodes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_leaf_nodes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_node_bases.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_node_bases.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_node_bases.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_node_bases.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_operation_nodes.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_operation_nodes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/filtered_function_operation_nodes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/filtered_function_operation_nodes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/interval_arithmetic.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/interval_arithmetic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/interval_arithmetic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/interval_arithmetic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/macros.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/nt_converters.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/nt_converters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/nt_converters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/nt_converters.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers.h
new file mode 100644
index 0000000..8c02d95
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers.h
@@ -0,0 +1,118 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H
+#define CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H
+#include <CGAL/Polynomial/basic.h>
+#include <vector>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+
+// JAMA
+CGAL_EXPORT
+void jama_polynomial_compute_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+CGAL_EXPORT
+void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+// GSL
+CGAL_EXPORT
+void gsl_polynomial_compute_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+CGAL_EXPORT
+void gsl_polynomial_compute_cleaned_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+// Turkowski
+CGAL_EXPORT
+void Turkowski_polynomial_compute_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+CGAL_EXPORT
+void Turkowski_polynomial_compute_cleaned_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots);
+
+/*struct GSL_numeric_solver {
+  void operator()(const double *begin, const double *end,
+          double lb, double ub,
+          std::vector<double> &roots) const {
+    gsl_polynomial_compute_roots(begin, end, lb, ub, roots);
+  }
+};
+
+struct GSL_cleaned_numeric_solver {
+  void operator()(const double *begin, const double *end,
+          double lb, double ub,
+std::vector<double> &roots) const {
+gsl_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
+}
+};*/
+
+struct JAMA_numeric_solver
+{
+    void operator()(const double *begin, const double *end,
+        double lb, double ub,
+        std::vector<double> &roots) const
+    {
+        jama_polynomial_compute_roots(begin, end, lb, ub, roots);
+    }
+};
+
+struct JAMA_cleaned_numeric_solver
+{
+    void operator()(const double *begin, const double *end,
+        double lb, double ub,
+        std::vector<double> &roots) const
+    {
+        jama_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
+    }
+};
+
+struct Turkowski_numeric_solver
+{
+    void operator()(const double *begin, const double *end,
+        double lb, double ub,
+        std::vector<double> &roots) const
+    {
+        Turkowski_polynomial_compute_roots(begin, end, lb, ub, roots);
+    }
+};
+
+struct Turkowski_cleaned_numeric_solver
+{
+    void operator()(const double *begin, const double *end,
+        double lb, double ub,
+        std::vector<double> &roots) const
+    {
+        Turkowski_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
+    }
+};
+
+} } } //namespace CGAL::POLYNOMIAL::internal
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h>
+#include <CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_impl.h
new file mode 100644
index 0000000..c9153c8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_impl.h
@@ -0,0 +1,135 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+
+#ifdef CGAL_HAVE_TNT
+#include <TNT/tnt_array2d.h>
+#include <TNT/tnt_array1d.h>
+#include <TNT/jama_eig.h>
+#endif
+
+#include <algorithm>
+#include <functional>
+#include <iterator>
+
+//#include <iomanip>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+#if CGAL_HAVE_TNT
+//static const double max_error_value =0.00005;
+
+template <bool CLEAN, class NT>
+static void jama_compute_roots(const NT *begin, const NT *end,  NT lb,
+NT ub, std::vector<NT> &roots)
+{
+    int degree= end-begin-1;
+    TNT::Array2D<NT> arr(degree, degree, 0.0);
+    for (int i=0; i< degree; ++i) {
+        arr[0][i]=-begin[degree-i-1]/begin[degree];
+    }
+    for (int i=0; i+1< degree; ++i) {
+        arr[i+1][i]=1;
+    }
+
+    JAMA::Eigenvalue<NT> ev(arr);
+    TNT::Array1D<NT> real, imag;
+    ev.getImagEigenvalues(imag);
+    ev.getRealEigenvalues(real);
+    CGAL_Polynomial_assertion(imag.dim1()== real.dim1());
+
+    /*NT tol;
+    if (CLEAN) tol=.00005;
+    else tol=0;*/
+
+    for (int i=0; i< real.dim1(); ++i) {
+        if (root_is_good(real[i], imag[i], lb-tol, ub)) {
+            roots.push_back(real[i]/*polish_root(begin, end, real[i])*/);
+        } else {
+        }
+    }
+    std::sort(roots.begin(), roots.end(), std::greater<NT>());
+    if (CLEAN) filter_roots(begin, end, lb, roots);
+}
+
+#endif
+
+
+CGAL_INLINE_FUNCTION
+void jama_polynomial_compute_roots(const double *begin, const double *end,
+double lb, double ub,
+std::vector<double> &roots)
+{
+  std::ptrdiff_t degree= end-begin-1;
+    switch( degree) {
+        case -1:
+        case 0:
+            break;
+        case 1:
+            compute_linear_roots(begin,end, lb, ub, roots);
+            break;
+        case 2:
+            compute_quadratic_roots(begin, end, lb, ub, roots);
+            break;
+        default:
+#ifdef CGAL_HAVE_TNT
+	  jama_compute_roots<false>(begin, end, lb, ub, roots);
+#else
+	  CGAL_error();
+#endif
+	  //jama_compute_roots<false>(begin, end, lb, ub, roots);
+    }
+}
+
+
+CGAL_INLINE_FUNCTION
+void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end,
+double lb, double ub,
+std::vector<double> &roots)
+{
+  std::ptrdiff_t degree= end-begin-1;
+    switch( degree) {
+        case -1:
+        case 0:
+            break;
+        case 1:
+            compute_linear_cleaned_roots(begin,end, lb, ub, roots);
+            break;
+        case 2:
+            compute_quadratic_cleaned_roots(begin, end, lb, ub, roots);
+            break;
+        default:
+#ifdef CGAL_HAVE_TNT
+	  jama_compute_roots<true>(begin, end, lb, ub, roots);
+#else
+	  CGAL_error();
+#endif
+    }
+}
+
+
+} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support.h
new file mode 100644
index 0000000..61de4d6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_SUPPORT_H
+#define CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_SUPPORT_H
+#include <CGAL/Polynomial/basic.h>
+#include <vector>
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+
+template <class NT>
+inline bool root_is_good(NT r, NT c, NT lb, NT ub, NT tol=.0000005)
+{
+  if (std::abs(c) < tol && r > lb && r < ub) {
+        return true;
+    } else return false;
+}
+
+
+void compute_quadratic_roots(const double *begin, const double *end,
+			     double lb, double ub,
+			     std::vector<double> &roots);
+
+void compute_quadratic_cleaned_roots(const double *begin, const double *end,
+				     double lb, double ub, 
+				     std::vector<double> &roots);
+
+void compute_linear_roots(const double *begin, const double *end,
+			  double lb, double ub,
+			  std::vector<double> &roots);
+
+void compute_linear_cleaned_roots(const double *begin, const double *end,
+				  double lb, double ub, 
+				  std::vector<double> &roots);
+
+
+
+void filter_solver_roots(const double *begin, const double *end,
+			 double lb, double ub, double last,
+			 std::vector<double> &roots);
+
+} } } //namespace CGAL::POLYNOMIAL::internal
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Polynomial/internal/numeric_solvers_support_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h
new file mode 100644
index 0000000..516bd52
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h
@@ -0,0 +1,276 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+
+#include <CGAL/Polynomial/Polynomial.h>
+#include <CGAL/Polynomial/internal/Rational/Derivative.h>
+#include <CGAL/Polynomial/Interval_polynomial.h>
+
+/*#ifdef _MSC_VER
+#pragma warning(disable:1572)
+#endif*/
+
+namespace CGAL { namespace POLYNOMIAL { namespace internal {
+
+static double max_error_value=.00005;
+
+namespace {
+template <bool CLEAN, class NT>
+inline void compute_quadratic_roots_t(const NT *begin, const NT * /*end*/,  NT lb, NT ub,
+std::vector<NT> &roots)
+{
+  NT max_error=0;
+  if (CLEAN) max_error=max_error_value;
+  CGAL_Polynomial_assertion(begin[2] != 0);
+  
+  NT desc= begin[1]*begin[1]-4*begin[0]*begin[2];
+  if (desc <= 0) return;
+  
+  NT ur= (-begin[1]+sqrt(desc))/(2*begin[2]);
+  NT lr= (-begin[1]-sqrt(desc))/(2*begin[2]);
+  if (begin[2]< 0) std::swap(lr, ur);
+  if (lr > lb-max_error && lr < ub) {
+    roots.push_back(ur);
+    if (lr > lb-max_error && lr < ub && (!CLEAN || /*lr > lb+max_error ||*/ begin[2] >0)){
+      roots.push_back(lr);
+    }
+  } else {
+    // only upper
+    if (ur > lb-max_error && ur < ub && (!CLEAN || /*ur > lb+max_error ||*/ begin[2] <0)){
+      roots.push_back(ur);
+    }
+
+
+  }
+
+  // drop even roots
+  /*if (ur >lb-max_error && ur < ub){
+    if (!CLEAN || sign(begin[2]) != POSITIVE){
+    roots.push_back(ur);
+    if (lr >lb-max_error && lr < ub){
+    roots.push_back(lr);
+    }
+    }
+    } else {
+    if (lr > lb-max_error && lr <ub){
+    if (!CLEAN || sign(begin[2]) != NEGATIVE){
+    roots.push_back(lr);
+    }
+    }
+    }*/
+}
+}
+
+CGAL_INLINE_FUNCTION
+void compute_quadratic_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots)
+{
+    return compute_quadratic_roots_t<false>(begin, end, lb, ub, roots);
+}
+
+CGAL_INLINE_FUNCTION
+void compute_quadratic_cleaned_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots)
+{
+    return compute_quadratic_roots_t<true>(begin, end, lb, ub, roots);
+}
+
+namespace {
+template <bool CLEAN, class NT>
+inline void compute_linear_roots_t(const NT *begin, const NT *,
+					  NT lb, NT ub,
+					  std::vector<NT> &roots)
+{
+    if (CLEAN &&  begin[1]>0 ) return;
+    //NT max_error=0;
+    //if (CLEAN) max_error=max_error_value;
+    NT r= -CGAL::to_double(begin[0]/begin[1]);
+    if ((CLEAN || r > lb) && r < ub) {
+        roots.push_back(r);
+    }
+}
+}
+
+CGAL_INLINE_FUNCTION
+void compute_linear_roots(const double *begin, const double *end,
+double lb, double ub, std::vector<double> &roots)
+{
+    return compute_linear_roots_t<false>(begin, end, lb, ub, roots);
+}
+
+CGAL_INLINE_FUNCTION
+void compute_linear_cleaned_roots(const double *begin, const double *end,
+				  double lb, double ub, std::vector<double> &roots)
+{
+    return compute_linear_roots_t<true>(begin, end, lb, ub, roots);
+}
+
+
+namespace {
+template <class NT>
+ inline void filter_roots_t(const NT *begin, const NT *end,
+				  NT lb, NT ub, NT last_root, std::vector<NT> &roots)
+{
+// if we are not close to the current time, then we are fine
+    if (roots.empty()) return;
+    //if (roots.back() > lb+ .0005) return;
+
+    //double eps= .0005;
+    /*double last_root=-std::numeric_limits<double>::infinity();
+
+    while (roots.back() < lb) {
+      last_root= roots.back();
+      roots.pop_back();
+      }*/
+    //if (roots.back() > lb+eps) return;
+
+    //typedef CGAL_POLYNOMIAL_NS::Polynomial<NT> Fn;
+
+    typedef CGAL_POLYNOMIAL_NS::Interval_polynomial IFn;
+    typedef CGAL_POLYNOMIAL_NS::internal::Derivative<IFn> Diff;
+    typedef typename IFn::NT INT;
+    
+
+    /*bool popped=false;*/
+    // if the last valid root is closer than last, consider it as doubtful instead
+    if (lb-last_root > roots.back()-lb) {
+      last_root= roots.back();
+      roots.pop_back();
+      /*popped=true;*/
+    } /*else {
+      last_root=lb;
+      }*/
+
+    INT vi;
+    if (last_root== -std::numeric_limits<double>::infinity()){
+      if ((end-begin)%2==1) {
+	vi= std::numeric_limits<double>::infinity();
+      } else {
+	vi = -*(end-1);
+      }
+    } else {
+      IFn fi(begin, end);
+      if (roots.empty()) {
+	Interval_arithmetic_guard guard;
+        if (ub== std::numeric_limits<double>::infinity()) {
+          vi = 10*lb + 1000;
+        } else {
+          vi = fi((INT(lb)+INT(ub))/2.0);
+        }
+      } else {
+	Interval_arithmetic_guard guard;
+	vi = fi((INT(last_root)+INT(roots.back()))/2.0);
+      }
+    }
+    
+    if (vi.inf() > 0) {
+      return;
+    } else if (vi.sup() < 0){
+      roots.push_back(last_root);
+    
+      /*if (!popped) {
+	IFn f(begin, end);
+	std::cout << "Adding last due to sign of " << vi << std::endl;
+	std::cout << "last " << last_root << " lb " << lb << " poly " << f << std::endl;
+	}*/
+      return;
+    }
+    Interval_arithmetic_guard guard;
+    Diff dx;
+    IFn f(begin, end);
+    IFn d= dx(f);
+
+    INT dv= d(roots.back());
+    // switch
+    //while (sign(d(roots.back().representation()))== ZERO) d= dx_(d);
+    while (dv.inf() <= 0 && dv.sup() >= 0) {
+      d= dx(d);
+      dv= d(roots.back());
+    }
+    // switch
+    //if (sign(d(roots.back().representation()))==POSITIVE){
+    if (dv.sup() < 0) {
+        roots.push_back(last_root);
+	/*if (!popped) {
+	  IFn f(begin, end);
+	  std::cout << "Adding last due to deriv of " << vi << std::endl;
+	  std::cout << "last " << last_root << " lb " << lb << " poly " << f << std::endl;
+	  }*/
+    }
+}
+}
+
+CGAL_INLINE_FUNCTION
+void filter_solver_roots(const double *begin, const double *end,
+			 double lb, double ub, double last,
+			 std::vector<double> &roots)
+{
+  filter_roots_t(begin, end, lb, ub, last, roots);
+}
+
+
+/*void polynomial_compute_roots(const double *begin, const double *end,  double lb,
+                  double ub, std::vector<double> &roots){
+#ifdef POLYNOMIAL_USE_GSL
+    gsl_polynomial_compute_roots(begin, end, lb, ub, roots);
+#else
+    jama_polynomial_compute_roots(begin, end, lb, ub, roots);
+#endif
+}
+
+void polynomial_compute_cleaned_roots(const double *begin, const double *end,  double lb,
+                      double ub, std::vector<double> &roots){
+#ifdef POLYNOMIAL_USE_GSL
+gsl_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
+#else
+jama_polynomial_compute_cleaned_roots(begin, end, lb, ub, roots);
+#endif
+}*/
+
+CGAL_INLINE_FUNCTION
+double evaluate_polynomial(const double *b, const double *e, double t)
+{
+#ifdef POLYNOMIAL_USE_GSL
+    return gsl_evaluate_polynomial(b, e, t);
+#else
+    if (b==e) return 0.0;
+
+    const double *rit=e-1;
+    double result = *rit;
+    --rit;
+    for (; rit != b-1; --rit) {
+        result *= t;
+        result += (*rit);
+    }
+    return result;
+#endif
+}
+
+
+} } } //namespace CGAL::POLYNOMIAL::internal
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/polynomial_generators.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/polynomial_generators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/internal/polynomial_generators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/internal/polynomial_generators.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/misc.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/misc.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/misc.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/misc.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_filter.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_filter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_filter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_filter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utils.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/modular_gcd_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/modular_gcd_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_converters.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_converters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_converters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_converters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd_implementations.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd_implementations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd_implementations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd_implementations.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd_ntl.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd_ntl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/polynomial_gcd_ntl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/polynomial_gcd_ntl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/prs_resultant.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/prs_resultant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/prs_resultant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/prs_resultant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/resultant.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/resultant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/resultant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/resultant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/square_free_factorize.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/square_free_factorize.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/square_free_factorize.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/square_free_factorize.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/sturm_habicht_sequence.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/sturm_habicht_sequence.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/sturm_habicht_sequence.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/sturm_habicht_sequence.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial/subresultants.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial/subresultants.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial/subresultants.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial/subresultants.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomial_type_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomial_type_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomial_type_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomial_type_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomials_1_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomials_1_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomials_1_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomials_1_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomials_1_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomials_1_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomials_1_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomials_1_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomials_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomials_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomials_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomials_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomials_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomials_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomials_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomials_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polynomials_for_line_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polynomials_for_line_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polynomials_for_line_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polynomials_for_line_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d.h b/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d.h
new file mode 100644
index 0000000..70d6979
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d.h
@@ -0,0 +1,933 @@
+// Copyright (c) 1997-2001  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>
+
+#ifndef CGAL_POLYTOPE_DISTANCE_D_H
+#define CGAL_POLYTOPE_DISTANCE_D_H
+
+// includes
+// --------
+#include <CGAL/Optimisation/basic.h>
+#include <CGAL/function_objects.h>
+#include <boost/functional.hpp>
+
+#include <CGAL/QP_options.h>
+#include <CGAL/QP_solver/QP_solver.h>
+#include <CGAL/QP_models.h>
+#include <CGAL/QP_solver/functors.h>
+#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
+#include <CGAL/QP_solver/QP_full_exact_pricing.h>
+
+namespace CGAL {
+
+// To determine the polytope distance, we set up the following QP:
+// 
+// We let v-w be nonnegative vectors such that
+// v-w = p-q, where p and q are the points that realize the
+// optimal distance. That way, we obtain a nonnegative QP
+// 
+//
+//min (v-w)^T(w-v)
+//     v-w - \sum x_i p_i + \sum y_j q_j    = 0
+//           \sum x_i                       = 1
+//                           \sum y_j       = 1
+//     v, w, x, y >= 0
+
+namespace PD_detail {
+  // The functors necessary to realize access to A
+  // 
+  // A has the form
+  //    I  -I    -P    Q
+  //    0   0     1    0
+  //    0   0     0    1
+  // where  I and -I are blocks of size d*d, and the 0's and 1's are
+  // rows vectors of 0's and 1's 
+  //
+  // we have one functor for a fixed column, and one functor for the
+  // whole matrix
+
+  // functor for a fixed column of A
+  template <class NT, class Iterator>
+  class A_column : public std::unary_function <int, NT>
+  {
+  public:
+    typedef NT result_type;
+    A_column()
+    {}
+  
+    A_column (int j, int d, bool in_p, Iterator it)
+      : j_ (j), d_ (d), in_p_ (in_p), it_ (it), nt_0_ (0), nt_1_ (1)
+    {}
+
+    result_type operator() (int i) const
+    {
+      if (j_ < d_) {
+	// column for v
+	return (i == j_ ? nt_1_ : nt_0_);
+      }
+      if (j_ < 2*d_) {
+	// column for w
+	return (i == j_-d_ ? -nt_1_ : nt_0_);
+      }
+      // point column
+      if (in_p_) {
+	// column for P
+	if (i < d_) return -(*(it_ + i));
+	if (i == d_) return *(it_ + d_); // homogenizing coordinate
+	return nt_0_;
+      } else {
+	// column for Q
+	if (i < d_) return (*(it_ + i));
+	if (i == d_+1) return *(it_ + d_); // homogenizing coordinate
+	return nt_0_;
+      }
+      // never get here
+    }
+    
+  private:
+    int j_;                  // column number
+    int d_;                  // dimension
+    bool in_p_;              // point in P ?
+    Iterator it_;            // the iterator through the column's point
+    NT nt_0_;
+    NT nt_1_; 
+  };
+  
+  // functor for matrix A
+  template <class NT, class Access_coordinate_begin_d,
+	    class Point_iterator >
+  class A_matrix : public std::unary_function
+  <int, boost::transform_iterator <A_column
+    <NT, typename Access_coordinate_begin_d::Coordinate_iterator>, 
+				   boost::counting_iterator<int> > >
+  { 
+    typedef PD_detail::A_column
+    <NT, typename Access_coordinate_begin_d::Coordinate_iterator> A_column;
+  public:
+    typedef  boost::transform_iterator
+    <A_column, boost::counting_iterator<int> > result_type;
+    
+    A_matrix ()
+    {}
+
+    A_matrix (int d, 
+	      Access_coordinate_begin_d da_coord,
+	      Point_iterator P, 
+	      int r, 
+	      Point_iterator Q) 
+      : d_ (d), da_coord_ (da_coord), P_ (P), r_ (r), Q_ (Q)
+    {}
+
+    result_type operator () (int j) const
+    { 
+      if (j < 2*d_) {
+	// column of v or w
+	return result_type
+	  (0, A_column (j, d_, false  /*dummy*/, 
+			da_coord_ (*P_) /*dummy*/));
+      }
+      if (j < 2*d_+r_) {
+	// column of P
+	return result_type
+	  (0, A_column (j , d_, true, da_coord_ (*(P_+(j-2*d_)))));
+      }
+      // column of Q
+      return result_type
+	(0, A_column (j, d_, false, da_coord_ (*(Q_+(j-2*d_-r_))))); 
+    }
+
+  private:
+    int d_;                  // dimension
+    Access_coordinate_begin_d da_coord_; // data accessor
+    Point_iterator P_;       // point set P
+    int r_;                  // size of point set P
+    Point_iterator Q_;       // point set Q
+  };
+
+  // The functor necessary to realize access to b
+  // b has the form
+  // 0
+  // 0
+  // 1  (row d)
+  // 1  (row d+1)
+
+  template <class NT>
+  class B_vector : public std::unary_function<int, NT>
+  {
+  public:
+    typedef NT result_type;
+    B_vector()
+    {}
+
+    B_vector (int d)
+      : d_ (d), nt_0_ (0), nt_1_ (1)
+    {}
+
+    result_type operator() (int i) const
+    {
+      return ( (i == d_ || i == d_+1) ? nt_1_ : nt_0_);
+    }
+
+  private:
+    int d_;
+    NT nt_0_;
+    NT nt_1_;
+  };
+
+
+  // The functors necessary to realize access to D
+  // 
+  // D has the form
+  //   I  -I    0
+  //  -I   I    0
+  //   0   0    0
+  // where all I and -I are blocks of size d*d
+  //
+  // we have one functor for a fixed row, and one functor for the
+  // whole matrix
+
+  // functor for a fixed row of D; note that we have to return 2D in
+  // order to please the QP_solver
+  template <class NT> 
+  class D_row : public std::unary_function <int, NT> 
+  {
+  public:
+    typedef NT result_type;
+    D_row () 
+    {}
+    D_row (int i, int d) 
+      : i_ (i), d_ (d), nt_0_ (0), nt_2_ (2)
+    {}
+    
+    result_type operator () (int j) const
+    {
+      if (j < d_) {
+	//  I ( 1 iff i = j)
+	// -I (-1 iff i = j + d)
+	//  0
+	if (i_ == j) return nt_2_;
+	if (i_ == j + d_) return -nt_2_;
+	return nt_0_;
+      }
+      if (j < 2*d_) {
+	// -I (-1 iff i = j - d)
+	//  I ( 1 iff i = j)
+	//  0
+	if (i_ == j - d_) return -nt_2_;
+	if (i_ == j) return nt_2_;
+	return nt_0_;
+      }
+      // 0
+      // 0
+      // 0
+      return nt_0_;
+    }
+  private:
+    int i_; // row number
+    int d_; // dimension
+    NT nt_0_;
+    NT nt_2_;
+  };
+
+  // functor for matrix D
+  template <class NT>
+  class D_matrix : public std::unary_function
+  <int, boost::transform_iterator<D_row<NT>,
+				  boost::counting_iterator<int> > >
+  { 
+  public:
+    typedef boost::transform_iterator<D_row<NT>,
+	    boost::counting_iterator<int> > result_type; 
+    D_matrix ()
+    {}
+    D_matrix (int d)
+      :  d_ (d)
+    {}
+
+    result_type operator()(int i) const 
+    {
+      return result_type (0, D_row<NT>(i, d_));
+    }
+
+  private:
+    int d_; // dimension
+  };
+}
+
+// Class interfaces
+// ================
+template < class Traits_ >
+class Polytope_distance_d {
+public:
+  // self
+  typedef  Traits_                    Traits;
+  typedef  Polytope_distance_d<Traits>
+  Self;
+
+  // types from the traits class
+  typedef  typename Traits::Point_d   Point;
+
+  typedef  typename Traits::Rep_tag   Rep_tag;
+
+  typedef  typename Traits::RT        RT;
+  typedef  typename Traits::FT        FT;
+
+  typedef  typename Traits::Access_dimension_d
+  Access_dimension_d;
+  typedef  typename Traits::Access_coordinates_begin_d
+  Access_coordinates_begin_d;
+
+  typedef  typename Traits::Construct_point_d
+  Construct_point_d;
+
+  typedef  typename Traits::ET        ET;
+  typedef  typename Traits::NT        NT; 
+
+private:
+  // private types
+  typedef  std::vector<Point>         Point_vector;
+  typedef  std::vector<ET>            ET_vector;
+    
+  typedef  QP_access_by_index
+  <typename std::vector<Point>::const_iterator, int> Point_by_index;
+    
+  typedef  std::vector<NT>            NT_vector;
+  typedef  std::vector<NT_vector>     NT_matrix;
+  
+  typedef  std::vector<int>           Index_vector;
+public:    
+  // public types
+  typedef  typename Point_vector::const_iterator
+  Point_iterator;
+    
+  typedef typename Index_vector::const_iterator IVCI;
+  typedef CGAL::Join_input_iterator_1< IVCI, Point_by_index >
+  Support_point_iterator;
+
+  typedef typename Index_vector::const_iterator
+  Support_point_index_iterator;
+    
+  typedef  typename ET_vector::const_iterator
+  Coordinate_iterator;
+
+private:
+  
+  // QP solver iterator types
+  typedef PD_detail::A_matrix <NT, Access_coordinates_begin_d,
+			       Point_iterator> A_matrix;
+  typedef boost::transform_iterator<
+    A_matrix, boost::counting_iterator<int> > A_iterator;
+
+  typedef PD_detail::B_vector <NT> B_vector;
+  typedef boost::transform_iterator<
+    B_vector, boost::counting_iterator<int> > B_iterator;
+
+  typedef CGAL::Const_oneset_iterator<CGAL::Comparison_result> R_iterator;  
+  typedef CGAL::Const_oneset_iterator<NT> C_iterator; 
+
+  typedef PD_detail::D_matrix <NT> D_matrix;
+  typedef boost::transform_iterator <
+    D_matrix, boost::counting_iterator<int> > D_iterator;
+
+  // Program type
+  typedef CGAL::Nonnegative_quadratic_program_from_iterators
+      <A_iterator, B_iterator, R_iterator, D_iterator, C_iterator> QP;
+
+  // Tags
+  typedef QP_solver_impl::QP_tags <Tag_false, Tag_true> QP_tags;
+
+  // Solver types
+  typedef  CGAL::QP_solver <QP, ET, QP_tags > Solver;
+
+  typedef  typename Solver::Pricing_strategy Pricing_strategy;
+
+public:    
+
+  // creation
+  Polytope_distance_d( const Traits&  traits  = Traits())
+    : nt_0(0), nt_1(1),
+      tco( traits), da_coord (tco.access_coordinates_begin_d_object()),
+      d( -1), solver(0) 
+  {}
+    
+  template < class InputIterator1, class InputIterator2 >
+  Polytope_distance_d( InputIterator1 p_first,
+		       InputIterator1 p_last,
+		       InputIterator2 q_first,
+		       InputIterator2 q_last,
+		       const Traits&  traits = Traits())
+    : nt_0(0), nt_1(1), 
+      tco( traits), da_coord (tco.access_coordinates_begin_d_object()),
+      solver(0)
+  {
+    set( p_first, p_last, q_first, q_last);
+  }
+
+  ~Polytope_distance_d() {    
+    if (solver)
+      delete solver;
+  }
+
+  // access to point sets
+  int  ambient_dimension( ) const { return d; }
+    
+  int  number_of_points( ) const { return static_cast<int>(p_points.size()+q_points.size());}
+    
+  int  number_of_points_p( ) const { return static_cast<int>(p_points.size()); }
+  int  number_of_points_q( ) const { return static_cast<int>(q_points.size()); }
+    
+  Point_iterator  points_p_begin( ) const { return p_points.begin(); }
+  Point_iterator  points_p_end  ( ) const { return p_points.end  (); }
+    
+  Point_iterator  points_q_begin( ) const { return q_points.begin(); }
+  Point_iterator  points_q_end  ( ) const { return q_points.end  (); }
+    
+  // access to support points
+  int
+  number_of_support_points( ) const
+  { return is_finite() ? 
+      static_cast<int>(p_support_indices.size()+q_support_indices.size()) : 0; }
+    
+  int  number_of_support_points_p() const { return static_cast<int>(p_support_indices.size());}
+  int  number_of_support_points_q() const { return static_cast<int>(q_support_indices.size());}
+    
+  Support_point_iterator
+  support_points_p_begin() const
+  { return Support_point_iterator(
+				  p_support_indices.begin(),
+				  Point_by_index( p_points.begin())); }
+    
+  Support_point_iterator
+  support_points_p_end() const
+  { return Support_point_iterator(
+				  is_finite() ? p_support_indices.end()
+				  : p_support_indices.begin(),
+				  Point_by_index( p_points.begin())); }
+    
+  Support_point_iterator
+  support_points_q_begin() const
+  { return Support_point_iterator(
+				  q_support_indices.begin(),
+				  Point_by_index( q_points.begin())); }
+    
+  Support_point_iterator
+  support_points_q_end() const
+  { return Support_point_iterator(
+				  is_finite() ? q_support_indices.end()
+				  : q_support_indices.begin(),
+				  Point_by_index( q_points.begin())); }
+
+  Support_point_index_iterator
+  support_points_p_indices_begin() const
+  { return p_support_indices.begin(); }
+    
+  Support_point_index_iterator
+  support_points_p_indices_end() const
+  { return p_support_indices.end(); }
+
+  Support_point_index_iterator
+  support_points_q_indices_begin() const
+  { return q_support_indices.begin(); }
+
+  Support_point_index_iterator
+  support_points_q_indices_end() const
+  { return q_support_indices.end(); }
+    
+  // access to realizing points (rational representation)
+  Coordinate_iterator
+  realizing_point_p_coordinates_begin( ) const { return p_coords.begin(); }
+    
+  Coordinate_iterator
+  realizing_point_p_coordinates_end  ( ) const { return p_coords.end  (); }
+    
+  Coordinate_iterator
+  realizing_point_q_coordinates_begin( ) const { return q_coords.begin(); }
+    
+  Coordinate_iterator
+  realizing_point_q_coordinates_end  ( ) const { return q_coords.end  (); }
+    
+  // access to squared distance (rational representation)
+  ET  squared_distance_numerator  ( ) const
+  { return solver->solution_numerator(); }
+    
+  ET  squared_distance_denominator( ) const
+  { return solver->solution_denominator(); }
+    
+  // access to realizing points and squared distance
+  // NOTE: an implicit conversion from ET to RT must be available!
+  Point
+  realizing_point_p( ) const
+  { CGAL_optimisation_precondition( is_finite());
+  return tco.construct_point_d_object()
+    ( ambient_dimension(),
+      realizing_point_p_coordinates_begin(),
+      realizing_point_p_coordinates_end  ()); }
+    
+  Point
+  realizing_point_q( ) const
+  { CGAL_optimisation_precondition( is_finite());
+  return tco.construct_point_d_object()
+    ( ambient_dimension(),
+      realizing_point_q_coordinates_begin(),
+      realizing_point_q_coordinates_end  ()); }
+    
+  FT
+  squared_distance( ) const
+  { 
+    return FT( squared_distance_numerator  ()) /
+      FT( squared_distance_denominator()); }
+    
+  bool  is_finite( ) const
+  { return ( number_of_points_p() > 0) && ( number_of_points_q() > 0); }
+    
+  bool  is_zero( ) const
+  { return CGAL_NTS is_zero( squared_distance_numerator()); }
+    
+  bool  is_degenerate( ) const { return ( ! is_finite()); }
+    
+  // modifiers
+  template < class InputIterator1, class InputIterator2 >
+  void
+  set( InputIterator1 p_first, InputIterator1 p_last,
+       InputIterator2 q_first, InputIterator2 q_last)
+  { 
+    p_points.clear();
+    q_points.clear();
+    std::copy( p_first, p_last, std::back_inserter( p_points));
+    std::copy( q_first, q_last, std::back_inserter( q_points));
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( p_points.begin(), p_points.end())
+       && check_dimension( q_points.begin(), q_points.end()),
+       "Not all points have the same dimension.");
+
+    compute_distance(); 
+  }
+    
+  template < class InputIterator >
+  void
+  set_p( InputIterator p_first, InputIterator p_last)
+  { 
+    p_points.clear();
+    std::copy( p_first, p_last, std::back_inserter( p_points));
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( p_points.begin(), p_points.end()),
+       "Not all points have the same dimension.");
+
+    compute_distance(); 
+  }
+    
+  template < class InputIterator >
+  void
+  set_q( InputIterator q_first, InputIterator q_last)
+  {
+    q_points.clear();
+    std::copy( q_first, q_last, std::back_inserter( q_points));
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( q_points.begin(), q_points.end()),
+       "Not all points have the same dimension.");
+  
+    compute_distance(); 
+  }
+    
+  void
+  insert_p( const Point& p)
+  { 
+    CGAL_optimisation_precondition
+      ( ( ! is_finite()) ||
+	( tco.access_dimension_d_object()( p) == d));
+    p_points.push_back( p);
+    set_dimension(); // it might no longer be -1 
+    compute_distance(); 
+  }
+    
+  void
+  insert_q( const Point& q)
+  { 
+    CGAL_optimisation_precondition
+      ( ( ! is_finite()) ||
+	( tco.access_dimension_d_object()( q) == d));
+    q_points.push_back( q); 
+    set_dimension(); // it might no longer be -1 
+    compute_distance(); 
+  }
+    
+  template < class InputIterator1, class InputIterator2 >
+  void
+  insert( InputIterator1 p_first, InputIterator1 p_last,
+	  InputIterator2 q_first, InputIterator2 q_last)
+  { 
+    CGAL_optimisation_precondition_code(int old_r = static_cast<int>(p_points.size()));
+    CGAL_optimisation_precondition_code(int old_s = static_cast<int>(q_points.size()));
+    p_points.insert( p_points.end(), p_first, p_last);
+    q_points.insert( q_points.end(), q_first, q_last);
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( p_points.begin()+old_r, p_points.end())
+       && check_dimension( q_points.begin()+old_s, q_points.end()),
+       "Not all points have the same dimension.");
+    compute_distance(); 
+  }
+    
+  template < class InputIterator >
+  void
+  insert_p( InputIterator p_first, InputIterator p_last)
+  { 
+    CGAL_optimisation_precondition_code(int old_r = static_cast<int>(p_points.size()));
+    p_points.insert( p_points.end(), p_first, p_last);
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( p_points.begin()+old_r, p_points.end()),
+       "Not all points have the same dimension.");
+    compute_distance(); 
+  }
+    
+  template < class InputIterator >
+  void
+  insert_q( InputIterator q_first, InputIterator q_last)
+  { 
+    CGAL_optimisation_precondition_code( int old_s = static_cast<int>(q_points.size()));
+    q_points.insert( q_points.end(), q_first, q_last);
+    set_dimension();
+    CGAL_optimisation_precondition_msg
+      (check_dimension( q_points.begin()+old_s, q_points.end()),
+       "Not all points have the same dimension.");
+    compute_distance(); 
+  }
+    
+  void
+  clear( )
+  { 
+    p_points.clear();
+    q_points.clear();
+    compute_distance(); 
+  }
+    
+  // validity check
+  bool  is_valid( bool verbose = false, int level = 0) const;
+    
+  // traits class access
+  const Traits&  traits( ) const { return tco; }
+    
+
+private:
+  NT nt_0;
+  NT nt_1;
+
+  Traits                     tco;        // traits class object
+  Access_coordinates_begin_d da_coord;   // data accessor object
+    
+  Point_vector             p_points;  // points of P
+  Point_vector             q_points;  // points of Q
+  int                      d;         // dimension of input points
+    
+  ET_vector                p_coords;          // realizing point of P
+  ET_vector                q_coords;          // realizing point of Q
+    
+  Solver                   *solver;    // quadratic programming solver
+    
+  Index_vector             p_support_indices;
+  Index_vector             q_support_indices;
+    
+private:    
+  // set dimension of input points
+  void
+  set_dimension( )
+  { 
+    d = ( p_points.size() > 0 ?
+	  tco.access_dimension_d_object()( p_points[ 0]) :
+	  q_points.size() > 0 ?
+	  tco.access_dimension_d_object()( q_points[ 0]) :
+	  -1); 
+  }
+    
+  // check dimension of input points
+  template < class InputIterator >
+  bool
+  check_dimension( InputIterator first, InputIterator last)
+  { return ( std::find_if
+	     ( first, last,
+	       CGAL::compose1_1
+	       ( boost::bind2nd(std::not_equal_to<int>(), d),
+		 tco.access_dimension_d_object()))
+	     == last); }
+    
+  // compute (squared) distance
+  void
+  compute_distance( )
+  {
+    // clear support points
+    p_support_indices.clear();
+    q_support_indices.clear();
+    if ( ( p_points.size() == 0) || ( q_points.size() == 0)) return;
+        
+    // construct program
+    int n = 2 * d + static_cast<int>(p_points.size() + q_points.size());
+    int m = d + 2;
+    CGAL_optimisation_precondition (p_points.size() > 0);
+    QP qp (n, m, 
+	   A_iterator 
+	   (boost::counting_iterator<int>(0), 
+	    A_matrix (d, da_coord, p_points.begin(), static_cast<int>(p_points.size()), 
+			 q_points.begin())),
+	   B_iterator (boost::counting_iterator<int>(0), B_vector (d)), 
+	   R_iterator (CGAL::EQUAL), 
+	   D_iterator (boost::counting_iterator<int>(0), D_matrix (d)),
+	   C_iterator (nt_0));
+
+    delete solver;
+    Quadratic_program_options options;
+    options.set_pricing_strategy(pricing_strategy(NT()));
+    solver = new Solver(qp, options);
+    CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL);
+    // compute support and realizing points
+    ET  et_0 = 0;
+    int r = static_cast<int>(p_points.size());
+    p_coords.resize( ambient_dimension()+1);
+    q_coords.resize( ambient_dimension()+1);
+    std::fill( p_coords.begin(), p_coords.end(), et_0);
+    std::fill( q_coords.begin(), q_coords.end(), et_0);
+    for (int i = 0; i < solver->number_of_basic_original_variables(); ++i) {
+      ET  value = solver->basic_original_variables_numerator_begin()[ i];
+      int index = solver->basic_original_variable_indices_begin()[ i];
+      if (index < 2*d) continue; // v or w variable
+      if (index < 2*d + r) {
+	// a point of p
+	for ( int j = 0; j < d; ++j) {
+	  p_coords[ j]
+	    += value * ET(da_coord (p_points[ index-2*d ])[ j]);
+	}
+	p_support_indices.push_back( index-2*d);
+      } else {
+	// a point of q
+	for ( int j = 0; j < d; ++j) {
+	  q_coords[ j]
+	    += value * ET(da_coord (q_points[ index-2*d-r])[ j]);
+	}
+	q_support_indices.push_back( index-2*d-r);
+      }
+    }
+    p_coords[ d] = q_coords[ d] = solver->variables_common_denominator();
+  }
+    
+  template < class NT >
+  Quadratic_program_pricing_strategy pricing_strategy( NT) {
+    return QP_PARTIAL_FILTERED_DANTZIG;
+  }
+  
+  Quadratic_program_pricing_strategy pricing_strategy( ET) {
+    return QP_PARTIAL_DANTZIG;
+  }
+    
+};
+
+// Function declarations
+// =====================
+// output operator
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os,
+              const Polytope_distance_d<Traits_>& poly_dist);
+
+
+// ============================================================================
+
+// Class implementation
+// ====================
+
+// validity check
+template < class Traits_ >
+bool
+Polytope_distance_d<Traits_>::
+is_valid( bool verbose, int level) const
+{
+  using namespace std;
+
+  CGAL::Verbose_ostream verr( verbose);
+  verr << "CGAL::Polytope_distance_d<Traits>::" << endl;
+  verr << "is_valid( true, " << level << "):" << endl;
+  verr << "  |P+Q| = " << number_of_points_p()
+       <<          '+' << number_of_points_q()
+       <<   ", |S| = " << number_of_support_points_p()
+       <<          '+' << number_of_support_points_q() << endl;
+
+  if ( is_finite()) {
+
+    // compute normal vector
+    ET_vector  normal( d), diff( d);
+    ET  et_0 = 0, den = p_coords[d];
+    CGAL_optimisation_assertion (den > et_0);
+    CGAL_optimisation_assertion (den == q_coords[d]);
+    int i, j;
+    for ( j = 0; j < d; ++j) normal[ j] = p_coords[ j] - q_coords[ j];
+
+    // check correctness of computed squared distance
+    verr << "  checking squared_distance..." << flush;
+    ET sqr_dist_num (0);
+    for ( j = 0; j < d; ++j)
+      sqr_dist_num += normal[ j] * normal[ j];
+    ET sqr_dist_den = 
+      p_coords[ d] * p_coords[ d];
+    if (sqr_dist_num * squared_distance_denominator() !=
+	sqr_dist_den * squared_distance_numerator())
+      return CGAL::_optimisation_is_valid_fail
+	( verr, "realizing points don't have correct squared distance");
+
+
+    // check P
+    // -------
+    verr << "  checking P..." << flush;
+        
+    // check point set
+    for ( i = 0; i < number_of_points_p(); ++i) {
+      for ( j = 0; j < d; ++j) {
+	// compute (a positive multiple of) p^* - p_i
+	diff[ j] = 
+	  ET(da_coord(p_points[ i])[d]) * p_coords[ j] - 
+	  den * ET(da_coord( p_points[ i])[ j]);
+      }
+      if ( std::inner_product( diff.begin(), diff.end(),
+			       normal.begin(), et_0) > et_0)
+	return CGAL::_optimisation_is_valid_fail
+	  ( verr, "polytope P is not separated by its hyperplane");
+    }
+        
+    verr << "passed." << endl;
+
+    // check Q
+    // -------
+    verr << "  checking Q..." << flush;
+        
+    // check point set
+    for ( i = 0; i < number_of_points_q(); ++i) {
+      for ( j = 0; j < d; ++j) {
+	// compute (a positive multiple of) q^* - q_i
+	diff[ j] = 
+	  ET(da_coord(q_points[ i])[d]) * q_coords[ j] - 
+	  den * ET(da_coord( q_points[ i])[ j]);
+      }
+      if ( std::inner_product( diff.begin(), diff.end(),
+			       normal.begin(), et_0) < et_0)
+	return CGAL::_optimisation_is_valid_fail
+	  ( verr, "polytope Q is not separated by its hyperplane");
+    }
+        
+    verr << "passed." << endl;
+  }
+
+  verr << "  object is valid!" << endl;
+  return( true);
+}
+
+// output operator
+template < class Traits_ >
+std::ostream&
+operator << ( std::ostream& os,
+              const Polytope_distance_d<Traits_>& poly_dist)
+{
+  using namespace std;
+
+  typedef  typename Polytope_distance_d<Traits_>::Point  Point;
+  typedef  ostream_iterator<Point>       Os_it;
+  typedef  typename Traits_::ET          ET;
+  typedef  ostream_iterator<ET>          Et_it;
+
+  switch ( CGAL::get_mode( os)) {
+
+  case CGAL::IO::PRETTY:
+    os << "CGAL::Polytope_distance_d( |P+Q| = "
+       << poly_dist.number_of_points_p() << '+'
+       << poly_dist.number_of_points_q() << ", |S| = "
+       << poly_dist.number_of_support_points_p() << '+'
+       << poly_dist.number_of_support_points_q() << endl;
+    os << "  P = {" << endl;
+    os << "    ";
+    copy( poly_dist.points_p_begin(), poly_dist.points_p_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  Q = {" << endl;
+    os << "    ";
+    copy( poly_dist.points_q_begin(), poly_dist.points_q_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  S_P = {" << endl;
+    os << "    ";
+    copy( poly_dist.support_points_p_begin(),
+	  poly_dist.support_points_p_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  S_Q = {" << endl;
+    os << "    ";
+    copy( poly_dist.support_points_q_begin(),
+	  poly_dist.support_points_q_end(),
+	  Os_it( os, ",\n    "));
+    os << "}" << endl;
+    os << "  p = ( ";
+    copy( poly_dist.realizing_point_p_coordinates_begin(),
+	  poly_dist.realizing_point_p_coordinates_end(),
+	  Et_it( os, " "));
+    os << ")" << endl;
+    os << "  q = ( ";
+    copy( poly_dist.realizing_point_q_coordinates_begin(),
+	  poly_dist.realizing_point_q_coordinates_end(),
+	  Et_it( os, " "));
+    os << ")" << endl;
+    os << "  squared distance = "
+       << poly_dist.squared_distance_numerator() << " / "
+       << poly_dist.squared_distance_denominator() << endl;
+    break;
+
+  case CGAL::IO::ASCII:
+    os << poly_dist.number_of_points_p() << endl;
+    copy( poly_dist.points_p_begin(),
+	  poly_dist.points_p_end(),
+	  Os_it( os, "\n"));
+    os << poly_dist.number_of_points_q() << endl;
+    copy( poly_dist.points_q_begin(),
+	  poly_dist.points_q_end(),
+	  Os_it( os, "\n"));
+    break;
+
+  case CGAL::IO::BINARY:
+    os << poly_dist.number_of_points_p() << endl;
+    copy( poly_dist.points_p_begin(),
+	  poly_dist.points_p_end(),
+	  Os_it( os));
+    os << poly_dist.number_of_points_q() << endl;
+    copy( poly_dist.points_q_begin(),
+	  poly_dist.points_q_end(),
+	  Os_it( os));
+    break;
+
+  default:
+    CGAL_optimisation_assertion_msg( false,
+				     "CGAL::get_mode( os) invalid!");
+    break; }
+
+  return( os);
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_POLYTOPE_DISTANCE_D_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Polytope_distance_d_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Polytope_distance_d_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Prevent_deref.h b/3rdparty/CGAL-4.8/include/CGAL/Prevent_deref.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Prevent_deref.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Prevent_deref.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Profile_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Profile_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Profile_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Profile_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Profile_timer.h b/3rdparty/CGAL-4.8/include/CGAL/Profile_timer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Profile_timer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Profile_timer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Projection_traits_xy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Projection_traits_xy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Projection_traits_xy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Projection_traits_xy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Projection_traits_xz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Projection_traits_xz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Projection_traits_xz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Projection_traits_xz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Projection_traits_yz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Projection_traits_yz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Projection_traits_yz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Projection_traits_yz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_functions.h b/3rdparty/CGAL-4.8/include/CGAL/QP_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_models.h b/3rdparty/CGAL-4.8/include/CGAL/QP_models.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_models.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_models.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_options.h b/3rdparty/CGAL-4.8/include/CGAL/QP_options.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_options.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_options.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solution.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solution.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solution.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solution.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/Initialization.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/Initialization.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/Initialization.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/Initialization.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__filtered_base.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__filtered_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__filtered_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__filtered_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__filtered_base_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__filtered_base_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__filtered_base_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__filtered_base_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__partial_base.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__partial_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP__partial_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP__partial_base.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse.h
new file mode 100644
index 0000000..99f0380
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse.h
@@ -0,0 +1,1136 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp 
+//                 Kaspar Fischer 
+                                                                               
+#ifndef CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
+#define CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
+
+#include <CGAL/QP_solver/basic.h>
+#include <CGAL/IO/Verbose_ostream.h>
+#include <vector>
+
+namespace CGAL {
+                    
+// =================
+// class declaration
+// =================
+template < class ET_, class Is_LP_ >
+class QP_basis_inverse;
+
+// ===============
+// class interface
+// ===============
+template < class ET_, class Is_LP_ >
+class QP_basis_inverse {
+  public:
+    // self
+    typedef  ET_                        ET;
+    typedef  Is_LP_                     Is_LP;
+    typedef  QP_basis_inverse<ET,Is_LP>
+                                        Self;
+
+  private:
+    
+    // private types
+    typedef std::vector<ET>             Row;
+    typedef std::vector<Row>            Matrix;
+
+  public:
+
+    /*
+     * Note: Some member functions below are suffixed with '_'.
+     * They are member templates and their declaration is "hidden",
+     * because they are also implemented in the class interface.
+     * This is a workaround for M$-VC++, which otherwise fails to
+     * instantiate them correctly.
+     */
+
+    // creation and initialization
+    // ---------------------------
+    QP_basis_inverse( CGAL::Verbose_ostream&  verbose_ostream);
+
+    // set-up
+    void  set( int n, int m, int nr_equalities);
+    
+    // init
+    template < class InputIterator >                            // phase I
+    void  init_( unsigned int art_size, InputIterator art_first);
+
+    /*
+    template < class InputIterator >                            // phase II
+    void  init_( ...);
+    */
+
+    // transition to phase II
+    template < class InputIterator >                            // QP case
+    void  transition_( InputIterator twice_D_it);
+
+    void  transition( );                                        // LP case
+
+    // access
+    // ------
+    const ET&  denominator( ) const { return d; }
+
+    const ET&  entry( unsigned int row, unsigned int column) const
+        { return entry( row, column, Is_LP()); }
+
+    // multiplication functions
+    // ------------------------
+    // matrix-vector multiplication ( y = M v )
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply( ForwardIterator v_l_it, ForwardIterator v_x_it,
+                     OutputIterator y_l_it,  OutputIterator y_x_it) const
+        { multiply( v_l_it, v_x_it, y_l_it, y_x_it, Is_LP(), Tag_true()); }
+    
+    // special matrix-vector multiplication functions for LPs
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply_l( ForwardIterator v_x_it, OutputIterator y_l_it) const
+        { CGAL_qpe_assertion( is_LP || is_phaseI);
+          multiply__l( v_x_it, y_l_it); }
+    
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply_x( ForwardIterator v_l_it, OutputIterator y_x_it) const
+        { CGAL_qpe_assertion( is_LP || is_phaseI);
+	  multiply__x( v_l_it, y_x_it); }
+    
+    // vector-matrix multiplication ( x^T = u^T M )
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply_transposed( ForwardIterator u_l_it, ForwardIterator u_x_it,
+                                OutputIterator x_l_it,  OutputIterator x_x_it)
+                                                                          const
+        { multiply( u_l_it, u_x_it, x_l_it, x_x_it); } // M_B^{-1} is symmetric
+    
+    // special vector-matrix multiplication functions for LPs
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply_transposed_l( ForwardIterator u_x_it,
+                                  OutputIterator x_l_it) const
+        { multiply_l( u_x_it, x_l_it); }        // Note: M_B^{-1} is symmetric
+    
+    template < class ForwardIterator, class OutputIterator >  inline
+    void  multiply_transposed_x( ForwardIterator u_l_it,
+                                  OutputIterator x_x_it) const
+        { multiply_x( u_l_it, x_x_it); }        // Note: M_B^{-1} is symmetric
+    
+    // vector-vector multiplication ( y = u^T v )
+    template < class InputIterator1, class InputIterator2 >  inline
+    typename std::iterator_traits<InputIterator1>::value_type
+    inner_product( InputIterator1 u_l_it, InputIterator1 u_x_it,
+		   InputIterator2 v_l_it, InputIterator2 v_x_it) const
+        { return inner_product_l( u_l_it, v_l_it)
+	       + inner_product_x( u_x_it, v_x_it); }
+    
+    template < class InputIterator1, class InputIterator2 >  inline
+    typename std::iterator_traits<InputIterator1>::value_type
+    inner_product_l( InputIterator1 u_l_it, InputIterator2 v_l_it) const
+        { return inner_product( u_l_it, v_l_it, s); }
+    
+    template < class InputIterator1, class InputIterator2 >  inline
+    typename std::iterator_traits<InputIterator1>::value_type
+    inner_product_x( InputIterator1 u_x_it, InputIterator2 v_x_it) const
+        { return inner_product( u_x_it, v_x_it, b); }
+	
+    
+    // update functions
+    // ----------------
+    // entering of original variable (update type U1)
+    template < class ForwardIterator >
+    void  enter_original_( ForwardIterator y_l_it,
+			   ForwardIterator y_x_it, const ET& z);
+    
+    // leaving of original variable (update type U2)
+    void  leave_original( );
+    
+    // entering of slack variable (update type U3)
+    void  enter_slack( );
+
+    // leaving of slack variable (update type U4)
+    template < class ForwardIterator >
+    void  leave_slack_( ForwardIterator u_x_it);
+    
+    // replacing of original by original variable (update type U5)
+    template < class ForwardIterator >
+    void  enter_original_leave_original_( ForwardIterator y, unsigned int k);
+    
+    // replacing of slack by slack variable (update type U6)
+    template < class ForwardIterator >
+    void  enter_slack_leave_slack_( ForwardIterator u, unsigned int k);
+    
+    // replacing of slack by original variable (update type U7)
+    template < class ForwardIterator1, class ForwardIterator2 >
+    void  enter_original_leave_slack_( ForwardIterator1 y, ForwardIterator2 u);
+    
+    // replacing of original by slack variable (update type U8)
+    void  enter_slack_leave_original( );
+    
+    
+    // replacing of original by original variable with precondition in QP-case
+    // for phaseII                               (update type UZ_1)
+    template < class ForwardIterator >
+    void  z_replace_original_by_original(ForwardIterator y_l_it,
+                                         ForwardIterator y_x_it,
+                                         const ET& s_delta, const ET& s_nu,
+					                     unsigned int k_i);
+
+
+    // replacing of original by slack variable with precondition in QP-case
+    // for phaseII                               (update type UZ_2)
+    void  z_replace_original_by_slack( );
+
+
+    // replacing of slack by original variable with precondition in QP-case
+    // for phaseII                               (update type UZ_3)
+    template < class ForwardIterator >
+    void  z_replace_slack_by_original(ForwardIterator y_l_it,
+                                      ForwardIterator y_x_it,
+				      ForwardIterator u_x_it, const ET& hat_kappa,
+				      const ET& hat_nu);
+
+
+    // replacing of slack by slack variable with precondition in QP-case
+    // for phaseII                               (update type UZ_4)
+    template < class ForwardIterator >
+    void  z_replace_slack_by_slack(ForwardIterator u_x_it, unsigned int k_j);
+    
+
+    // copying of reduced basis inverse row in (upper) C-half
+    template < class OutIt >
+    void  copy_row_in_C(OutIt y_l_it, OutIt y_x_it, unsigned int k);
+    
+    // copying of reduced basis inverse row in (lower) B_O-half
+    template < class OutIt >
+    void  copy_row_in_B_O(OutIt y_l_it, OutIt y_x_it, unsigned int k);
+
+
+    // swap functions
+    void  swap_variable( unsigned int j)                // ``to the end'' of R
+        { CGAL_qpe_assertion( j < b);
+	  swap_variable( j, Is_LP()); }
+    void  swap_constraint( unsigned int i)              // ``to the end'' of P
+        { CGAL_qpe_assertion( i < s);
+	  swap_constraint( i, Is_LP()); }
+
+  private:
+    
+    // constants
+    const ET                 et0, et1, et2;
+                                        
+    // data members
+    Matrix                   M;         // basis inverse, stored row-wise
+    ET                       d;         // denominator
+
+    unsigned int             l;         // minimum of `n' and `m'
+    unsigned int             s;         // size of `E \cup S_N'
+    unsigned int             b;         // size of `B_O'
+
+    bool                     is_phaseI; // flag indicating phase I
+    bool                     is_phaseII;// flag indicating phase II
+    const bool               is_LP;     // flag indicating a linear    program
+    const bool               is_QP;     // flag indicating a quadratic program
+
+    CGAL::Verbose_ostream&   vout;      // used for diagnostic output
+
+    Row                      x_l, tmp_l;  // used in the 
+    Row                      x_x, tmp_x;  // update functions
+
+    // private member functions
+    // ------------------------
+    // set-up
+    void  set( Tag_false);        // QP case
+    void  set( Tag_true );        // LP case
+
+    // init
+    template < class InIt >                                     // QP case
+    void  init_( unsigned int art_size, InIt art_first, Tag_false);
+    template < class InIt >                                     // LP case
+    void  init_( unsigned int art_size, InIt art_first, Tag_true );
+
+    // access
+    const ET&  entry( unsigned int row,
+		      unsigned int column, Tag_false) const;    // QP case
+    const ET&  entry( unsigned int row,
+		      unsigned int column, Tag_true ) const;    // LP case
+
+    // matrix-vector multiplication
+    template < class ForIt, class OutIt, class Use1stArg >      // QP case
+    void  multiply_( ForIt v_l_it, ForIt v_x_it,
+		     OutIt y_l_it, OutIt y_x_it, Tag_false, Use1stArg) const;
+    template < class ForIt, class OutIt, class  DummyArg >      // LP case
+    void  multiply_( ForIt v_l_it, ForIt v_x_it,
+		     OutIt y_l_it, OutIt y_x_it, Tag_true,   DummyArg) const;
+
+    // special matrix-vector multiplication functions for LPs
+    template < class ForIt, class OutIt >
+    void  multiply__l_( ForIt v_x_it, OutIt y_l_it) const;
+    template < class ForIt, class OutIt >
+    void  multiply__x_( ForIt v_l_it, OutIt y_x_it) const;
+
+    // in-place update
+    template < class ForIt >                                    // QP case
+    void  update_inplace_QP_( ForIt  y_l_it, ForIt  y_x_it,
+			      const ET&  d_new, const ET&  d_old);
+    template < class ForIt1, class ForIt2 >                     // LP case
+    void  update_inplace_LP_( ForIt1 x_x_it, ForIt2 y_x_it,
+			      const ET&  d_new, const ET&  d_old);
+			      
+    template < class ForIt >                                  // QP case only
+    void  z_update_inplace( ForIt psi1_l_it, ForIt psi1_x_it,
+                            ForIt psi2_l_it, ForIt psi2_x_it,
+			    const ET& omega0, const ET& omega1,
+			    const ET& omega2, const ET& omega3); 
+
+    void  update_entry( ET& entry,   const ET& d_new,
+			const ET& y, const ET& d_old) const;
+
+    // swap functions
+    void  swap_variable  ( unsigned int, Tag_true );            // LP case
+    void  swap_variable  ( unsigned int, Tag_false);            // QP case
+    void  swap_constraint( unsigned int, Tag_true );            // LP case
+    void  swap_constraint( unsigned int, Tag_false);            // QP case	
+    
+    // diagnostic output
+    void  print( );
+
+// ----------------------------------------------------------------------------
+
+// ===============================
+// class implementation (template)
+// ===============================
+
+  public:
+
+    // creation and initialization
+    // ---------------------------
+    // init
+    template < class InputIterator >
+    void
+    init( unsigned int art_size, InputIterator art_first)
+    {
+	CGAL_qpe_assertion_msg( art_size <= l, \
+	    "There are more equality constraints than original variables!");
+
+        init( art_size, art_first, Is_LP());
+	d = et1;
+        CGAL_qpe_assertion( s == art_size);
+        CGAL_qpe_assertion( b == art_size);
+
+	is_phaseI  = true;
+	is_phaseII = false;
+
+        if ( x_x.size() < art_size) {
+            x_x.insert( x_x.end(), art_size-x_x.size(), et0);
+        }
+	
+        if ( tmp_x.size() < art_size) {
+            tmp_x.insert( tmp_x.end(), art_size-tmp_x.size(), et0);
+        }
+        
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+        }
+    }
+
+    // transition to phase II
+    template < class InputIterator >                            // QP case
+    void  transition( InputIterator twice_D_it)
+    {
+	typename Matrix::iterator  m_it1, m_it2, p_begin, r_begin;
+	typename Row   ::iterator  x_it;
+	unsigned int      row, col;
+
+	// fill missing rows
+	for (row= 0; row< s; ++ row) {
+	    CGAL_qpe_assertion(M[row].size()==0);
+	    M[row].insert(M[row].end(), row+1, et0);
+	}
+
+	// compute new basis inverse [ upper-left part: -(Q^T * 2 D_B * Q) ]
+	// -----------------------------------------------------------------
+	// compute 'Q^T * 2 D_B' ( Q = A_B^-1 )	
+	p_begin = M.begin();
+	r_begin = M.begin();
+	if (b > 0) r_begin += l+s-1;   	// initialize only if for loops 
+					// are entered
+	for ( col = 0; col < b; ++col, ++twice_D_it) {
+            ++p_begin;
+
+	    // get column of D (D symmetric)
+	    std::copy( *twice_D_it, *twice_D_it+b, x_l.begin());
+
+	    // compute 'Q^T * 2 D_Bj'
+	    multiply__l( x_l.begin(), x_x.begin());
+
+	    // store resulting column in 'P' and 'R'
+	    x_it  = x_x.begin();
+	    m_it2 = r_begin;
+	    for ( row = l+col; row >= l; --row, --m_it2, ++x_it) {
+		(*m_it2)[ row] = *x_it;
+	    }
+	    m_it1 = p_begin;
+	    for ( row = col+1; row <  s; ++row, ++m_it1, ++x_it) {
+		(*m_it1)[ col] = *x_it;
+	    }
+	}
+
+	// compute '(Q^T * 2 D_B) * Q' ( Q = A_B^-1 )
+	m_it1 = M.begin();
+	m_it2 = r_begin;
+	for ( row = 0; row < s; ++row, ++m_it1, --m_it2) {
+
+	    // get row of '(Q^T * 2 D_B)' (stored in 'P' and 'R')
+	    std::copy(m_it1->begin()  ,m_it1->begin()+row,    x_l.begin());
+	    std::copy(m_it2->begin()+l,m_it2->begin()+(l+b-row),
+	    	x_l.begin()+row);
+
+	    // compute '(Q^T * 2 D_B)_i * Q'
+	    multiply__l( x_l.begin(), x_x.begin());
+
+	    // negate and store result in 'P'
+	    std::transform( x_x.begin(), x_x.begin()+row+1,
+			    m_it1->begin(), std::negate<ET>());
+
+	    // clean up in 'R'
+	    std::fill_n( m_it2->begin()+l, b-row, et0);
+	}
+
+	// scale A_B^-1
+	m_it1 = M.begin()+l;
+	for ( row = 0; row < s; ++row, ++m_it1) {
+	    std::transform( m_it1->begin(), m_it1->begin()+s, m_it1->begin(),
+			    boost::bind2nd( std::multiplies<ET>(), d));
+	}
+
+	// new denominator: |det(A_B)|^2
+	d *= d;
+
+	// update status
+	transition();
+    }
+
+    // update functions
+    // ----------------
+    // entering of original variable (update type U1)
+    template < class ForwardIterator >
+    void
+    enter_original( ForwardIterator y_l_it,
+                    ForwardIterator y_x_it, const ET& z)
+    {
+        // assert QP case
+        Assert_compile_time_tag( Tag_false(), Is_LP());
+    
+        // update matrix in-place
+        // ----------------------
+        // handle sign of new denominator
+        CGAL_qpe_assertion( z != et0);
+        bool  z_neg = ( z < et0);
+
+        // update matrix
+        update_inplace_QP( y_l_it, y_x_it, z, ( z_neg ? -d : d));
+                                                                      
+        // append new row and column ("after R")
+        // -------------------------------------
+        typename Row::iterator  row_it;
+	ForwardIterator           y_it;
+        unsigned int            col, k = l+(++b);
+    
+//      // allocate new row, if necessary
+//      // BG: replaced this by the ensure_physical_row construct below
+//      if ( k <= M.size()) {
+//           row_it = M[ k-1].begin();
+//      } else {
+//           row_it = M.insert( M.end(), Row( k, et0))->begin();
+//           x_x.push_back( et0);
+// 	     tmp_x.push_back( et0);
+//      }
+	ensure_physical_row(k-1);
+	row_it = M[ k-1].begin();
+    
+        // store entries in new row
+        for (   col = 0,                              y_it = y_l_it;
+                col < s;
+              ++col,     ++row_it,                  ++y_it         ) {
+            *row_it = ( z_neg ? *y_it : -( *y_it));
+        }
+        for (   col = l,     row_it += l-s,           y_it = y_x_it;
+                col < k-1;
+              ++col,       ++row_it,                ++y_it         ) {
+            *row_it = ( z_neg ? *y_it : -( *y_it));
+        }
+        *row_it = ( z_neg ? -d : d);
+    
+        // store new denominator
+	// ---------------------
+        d = ( z_neg ? -z : z);
+        CGAL_qpe_assertion( d > et0);
+    
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+        }
+    }
+    
+    // leaving of slack variable (update type U4)
+    template < class ForwardIterator >
+    void
+    leave_slack( ForwardIterator u_x_it)
+    {
+        // assert QP case
+        Assert_compile_time_tag( Tag_false(), Is_LP());
+    
+        // update matrix in-place
+        // ----------------------
+        // compute new row/column of basis inverse
+        multiply( u_x_it,                               // dummy (not used)
+		  u_x_it, x_l.begin(), x_x.begin(),
+		  Tag_false(),                          // QP
+		  Tag_false());                         // ignore 1st argument
+        ET    z     = -inner_product_x( x_x.begin(), u_x_it);
+        bool  z_neg = ( z < et0);
+        CGAL_qpe_assertion( z != et0);
+    
+        // update matrix
+        update_inplace_QP( x_l.begin(), x_x.begin(), z, ( z_neg ? -d : d));
+                                                                      
+        // insert new row and column ("after P")
+        // -------------------------------------
+        typename Row   ::iterator  row_it, x_it;
+        typename Matrix::iterator  col_it;
+        unsigned int               col, k = l+b;
+    
+        // store entries in new row
+	if (M[s].size()==0) {
+	   // row has to be filled first
+	   M[s].insert(M[s].end(), s+1, et0);
+	}
+        for (   col = 0,   row_it = M[ s].begin(),        x_it = x_l.begin();
+                col < s;
+              ++col,     ++row_it,                      ++x_it              ) {
+            *row_it = ( z_neg ? *x_it : -( *x_it));
+        }
+        *row_it = ( z_neg ? -d : d);
+    
+        for (   col = l,   col_it = M.begin()+l,          x_it = x_x.begin();
+                col < k;
+              ++col,     ++col_it,                      ++x_it              ) {
+            (*col_it)[ s] = ( z_neg ? *x_it : -( *x_it));
+        }
+        ++s;
+    
+        // store new denominator
+	// ---------------------
+        d = ( z_neg ? -z : z);
+        CGAL_qpe_assertion( d > et0);
+    
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+	}
+    }
+
+    // replacing of original variable (update type U5) [ replace column ]
+    template < class RandomAccessIterator >
+    void
+    enter_original_leave_original( RandomAccessIterator y_x_it, unsigned int k)
+    {
+        // assert LP case or phase I
+	CGAL_qpe_assertion( is_LP || is_phaseI);
+	CGAL_qpe_assertion( k < b);
+
+        // update matrix in place
+        // ----------------------
+        typename Matrix::iterator  matrix_it;
+        typename Row   ::iterator     row_it, row_k_it, row_k;
+
+        // handle sign of new denominator
+        ET    z     = y_x_it[ k];
+        bool  z_neg = ( z < et0);
+        if ( z_neg) d = -d;
+
+	// QP (in phase I)?
+	matrix_it = M.begin();
+	if ( is_QP) matrix_it += l;
+	row_k = ( matrix_it+k)->begin();
+
+        // rows: 0..s-1 without k
+        unsigned int  row, col;
+	ET            minus_y;
+        for (   row = 0;
+                row < s;
+              ++row,     ++matrix_it, ++y_x_it) {
+	    if ( row != k) {
+
+		// columns: 0..b-1
+		minus_y = -( *y_x_it);
+		for (   col = 0, row_it = matrix_it->begin(), row_k_it = row_k;
+			col < b;
+		      ++col,   ++row_it,                    ++row_k_it       ){
+        
+		    // update in place
+		    update_entry( *row_it, z, minus_y * *row_k_it, d);
+		}
+	    }
+        }
+
+	// rows: k (flip signs, if necessary)
+	if ( z_neg) {
+	    for (   col = 0,   row_it = row_k;
+		    col < b;
+		  ++col,     ++row_it        ) {
+        
+		*row_it = -( *row_it);
+	    }
+	}
+
+        // store new denominator
+        // ---------------------
+        d = ( z_neg ? -z : z);
+        CGAL_qpe_assertion( d > et0);
+
+	// diagnostic output
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+	}
+    }
+    
+    // replacing of slack variable (update type U6) [ replace row ]
+    template < class ForwardIterator >
+    void
+    enter_slack_leave_slack( ForwardIterator u_x_it, unsigned int k)
+    {
+        // assert LP case or phase I
+	CGAL_qpe_assertion( is_LP || is_phaseI);
+	CGAL_qpe_assertion( k < s);
+
+        // compute new row of basis inverse
+        multiply__l( u_x_it, x_x.begin());
+
+        // update matrix in place
+        // ----------------------
+        typename Matrix::iterator  matrix_it;
+        typename Row   ::iterator     row_it, x_it;
+
+        // handle sign of new denominator
+        ET    z     = x_x[ k];
+        bool  z_neg = ( z < et0);
+        if ( z_neg) d = -d;
+
+	// QP (in phase I)?
+	matrix_it = M.begin();
+	if ( is_QP) matrix_it += l;
+
+        // rows: 0..s-1
+        unsigned int          row, col;
+	ET            minus_m_row;
+        for (   row = 0;
+                row < s;
+              ++row,     ++matrix_it) {
+
+	    // columns: 0..b-1
+	    minus_m_row = -( *matrix_it)[ k];
+	    for (   col = 0,   row_it = matrix_it->begin(), x_it = x_x.begin();
+		    col < b;
+		  ++col,     ++row_it,                    ++x_it             ){
+
+		if ( col != k) {                // all columns but k
+
+		    // update in place
+		    update_entry( *row_it, z, minus_m_row * *x_it, d);
+
+		} else {                        // column k
+
+		    // flip sign, if necessary
+		    if ( z_neg) *row_it = -( *row_it);
+
+		}
+	    }
+	}
+
+        // store new denominator
+        // ---------------------
+        d = ( z_neg ? -z : z);
+        CGAL_qpe_assertion( d > et0);
+
+	// diagnostic output
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+	}
+    }
+    
+    // replacing of slack by original variable (update type U7) [ grow ]
+    template < class ForwardIterator1, class ForwardIterator2 >
+    void  enter_original_leave_slack( ForwardIterator1 y_x_it,
+				      ForwardIterator2 u_x_it)
+    {
+        // assert LP case or phase I
+	CGAL_qpe_assertion( is_LP || is_phaseI);
+
+        // update matrix in-place
+        // ----------------------
+        // compute new row of basis inverse
+        multiply__l( u_x_it, x_x.begin());
+        ET    z     = d*u_x_it[ b] - inner_product_x( y_x_it, u_x_it);
+        bool  z_neg = ( z < et0);
+        CGAL_qpe_assertion( z != et0);
+	
+        // update matrix
+	update_inplace_LP( x_x.begin(), y_x_it, z, ( z_neg ? -d : d));
+                                                  
+        // append new row and column
+        // -------------------------
+        typename Matrix::iterator  matrix_it;
+        typename Row   ::iterator     row_it, x_it;
+        unsigned int                  row, col;
+
+	// QP (in phase I)?
+	if ( is_QP) {
+	    ensure_physical_row(l+b);
+	    row_it = M[l+b].begin();
+	    matrix_it = M.begin() + l;
+	} else {
+	    row_it = M[s].begin();
+	    matrix_it = M.begin();
+	} 	
+	
+	// store 'x_x' in new row 
+	x_it = x_x.begin();
+	for ( col = 0; col < b; ++col, ++row_it, ++x_it) {
+		*row_it = ( z_neg ? *x_it : -( *x_it));
+	}
+        *row_it = ( z_neg ? -d : d);
+	
+	// store 'y_x' in new col
+	for ( row = 0; row < s; ++row, ++matrix_it, ++y_x_it) {
+		(*matrix_it)[b] = ( z_neg ? *y_x_it : -( *y_x_it));
+	}
+	++s; ++b;
+    
+        // store new denominator
+	// ---------------------
+        d = ( z_neg ? -z : z);
+        CGAL_qpe_assertion( d > et0);
+    
+        CGAL_qpe_debug {
+            if ( vout.verbose()) print();
+        }
+    }
+  // due to basis_matrix_stays_regular fix, needs reconsideration
+  //private:
+
+    // private member functions
+    // ------------------------
+    // init (QP case)
+    template < class InIt >  inline
+    void
+    init( unsigned int art_size, InIt art_first, Tag_false)
+    {
+	// only Q is used to store A_B^-1 in phase I
+        for ( s = l, b = 0; b < art_size; ++s, ++b, ++art_first) {
+	    ensure_physical_row(s);
+            M[ s][ b] = ( art_first->second ? -et1 : et1);
+        }
+
+        s = art_size;
+    }
+
+    // init (LP case)
+    template < class InIt >  inline
+    void
+    init( unsigned int art_size, InIt art_first, Tag_true)
+    {
+        for ( s = 0; s < art_size; ++s, ++art_first) {
+	    std::fill_n( M[ s].begin(), art_size, et0);
+	    M[ s][ s] = ( art_first->second ? -et1 : et1);
+	}
+	b = art_size;
+    }
+    
+    // append row in Q if no allocated row available
+    void ensure_physical_row (unsigned int row) {
+    	unsigned int rows = static_cast<unsigned int>(M.size());
+	CGAL_qpe_assertion(rows >= row);
+	if (rows == row) {
+            M.push_back(Row(row+1, et0));
+	    
+	    // do we have to grow x_x?
+	    CGAL_qpe_assertion(x_x.size() >= row-l);
+	    if (x_x.size() == row-l)
+	       x_x.push_back(et0);
+	    
+	    // do we have to grow tmp_x?
+	    CGAL_qpe_assertion(tmp_x.size() >= row-l);
+	    if (tmp_x.size() == row-l)
+	       tmp_x.push_back(et0);
+	    
+            CGAL_qpe_assertion(M[row].size()==row+1);
+	    CGAL_qpe_debug {
+	      if ( vout.verbose()) {
+                    vout << "physical row " << (row) << " appended in Q\n";
+	      }
+            }
+	}
+    }
+    
+    // matrix-vector multiplication (QP case)
+    template < class ForIt, class OutIt, class Use1stArg >
+    void
+    multiply( ForIt v_l_it, ForIt v_x_it,
+              OutIt y_l_it, OutIt y_x_it, Tag_false,
+	      Use1stArg use_1st_arg) const
+    {
+	// use 'LP' functions in phase I
+	if ( is_phaseI) {
+	    multiply__l( v_x_it, y_l_it);
+	    multiply__x( v_l_it, y_x_it);
+	    return;
+	}
+
+	// phase II
+        typename Matrix::const_iterator  matrix_it;
+        typename Row   ::const_iterator     row_it;     // left  of diagonal
+        typename Matrix::const_iterator  column_it;     // right of diagonal
+        ForIt                                 v_it;
+    
+        unsigned int  row, count, k = l+b;
+        ET            sum;
+    
+        // compute  P v_l + Q^T v_x	
+        for (   row = 0,   matrix_it = M.begin();
+                row < s;
+              ++row,                                                ++y_l_it) {
+            sum = et0;
+
+	    // P v_l
+	    if ( check_tag( use_1st_arg)) {
+
+		// P: left of diagonal (including)
+		for (   row_it =  matrix_it->begin(),            v_it = v_l_it;
+			row_it != matrix_it->end();
+		      ++row_it,                                ++v_it) {
+		    sum += *row_it * *v_it;
+		}
+
+		// P: right of diagonal (excluding)
+		for (   count = row+1,   column_it  = ++matrix_it;
+			count < s;
+		      ++count,         ++column_it,                ++v_it) {
+		    sum += (*column_it)[ row] * *v_it;
+		}
+	    }
+    
+            // Q^T:
+            for (   count = 0,       column_it  = M.begin()+l,   v_it = v_x_it;
+                    count < b;
+                  ++count,         ++column_it,                ++v_it) {
+                sum += (*column_it)[ row] * *v_it;
+            }
+    
+            // store result
+            *y_l_it = sum;
+        }
+    
+        // compute  Q v_l + R v_x
+        for (   row = l,   matrix_it = M.begin()+l;
+                row < k;
+              ++row,                                                ++y_x_it) {
+            sum = et0;
+
+	    // Q v_l
+	    if ( check_tag( use_1st_arg)) {
+
+		// Q:
+		for (   count = 0,  row_it = matrix_it->begin(), v_it = v_l_it;
+			count < s;
+		      ++count,    ++row_it,                    ++v_it) {
+		    sum += *row_it * *v_it;
+		}
+	    }
+    
+	    // R: left of diagonal (including)
+            for (                row_it =  matrix_it->begin()+l, v_it = v_x_it;
+                                 row_it != matrix_it->end();
+                               ++row_it,                       ++v_it) {
+                sum += *row_it * *v_it;
+            }
+    
+            // R: right of diagonal (excluding)
+            for (   count = row+1,   column_it = ++matrix_it;
+                    count < k;
+                  ++count,         ++column_it,                ++v_it) {
+                sum += (*column_it)[ row] * *v_it;
+            }
+    
+            // store result
+            *y_x_it = sum;
+        }
+    }
+    
+    // matrix-vector multiplication (LP case)
+    template < class ForIt, class OutIt, class Dummy > inline
+    void
+    multiply( ForIt v_l_it, ForIt v_x_it,
+              OutIt y_l_it, OutIt y_x_it, Tag_true, Dummy) const
+    {
+        multiply__l( v_x_it, y_l_it);
+        multiply__x( v_l_it, y_x_it);
+    }
+    
+    // special matrix-vector multiplication functions for LPs
+    template < class ForIt, class OutIt > inline
+    void
+    multiply__l( ForIt v_x_it, OutIt y_l_it) const
+    {
+        typename Matrix::const_iterator  matrix_it = M.begin();
+        typename Matrix::const_iterator  column_it;
+        ForIt                                 v_it;
+    
+        unsigned int  row, count;
+        ET            sum;
+    
+	// QP?
+	if ( is_QP) matrix_it += l;
+
+        // compute  Q^T v_x
+        for ( row = 0; row < s; ++row,                              ++y_l_it) {
+            sum = et0;
+    
+            for (   count = 0,   column_it = matrix_it,   v_it = v_x_it;
+                    count < b;
+                  ++count,     ++column_it,             ++v_it) {
+                sum += (*column_it)[ row] * *v_it;
+            }
+    
+            *y_l_it = sum;
+        }
+    }
+    
+    template < class ForIt, class OutIt > inline
+    void
+    multiply__x( ForIt v_l_it, OutIt y_x_it) const
+    {
+        typename Matrix::const_iterator  matrix_it = M.begin();
+        unsigned int  row;
+
+	// QP?
+	if ( is_QP) matrix_it += l;
+
+        // compute  Q v_l
+        for (   row = 0;
+                row < b;
+              ++row,     ++matrix_it, ++y_x_it) {
+
+	    *y_x_it = inner_product( matrix_it->begin(), v_l_it, s);
+	}
+    }
+    
+    // vector-vector multiplication  
+    template < class InIt1, class InIt2 > inline
+    typename std::iterator_traits<InIt1>::value_type  
+    inner_product( InIt1 u_it, InIt2 v_it, unsigned int n) const
+    {
+	typedef  typename std::iterator_traits<InIt1>::value_type  NT;
+    
+        // compute u^T v
+	NT sum = NT( 0);
+        for ( unsigned int count = 0; count < n; ++count, ++u_it, ++v_it) {
+            sum += NT(*u_it) * NT(*v_it);
+        }
+    
+        return sum;
+    }
+    
+    // in-place update
+    template < class ForIt >                                    // QP case
+    void  update_inplace_QP( ForIt y_l_it, ForIt y_x_it,
+			     const ET& d_new, const ET& d_old)
+    {
+        typename Matrix::      iterator  matrix_it;
+        typename Row   ::      iterator     row_it;
+        typename Row   ::const_iterator      y_it1, y_it2;
+    
+        unsigned int  row, col, k = l+b;
+    
+        // rows: 0..s-1  ( P )
+        for (   row = 0,   y_it1 = y_l_it,   matrix_it = M.begin();
+                row < s;
+              ++row,     ++y_it1,          ++matrix_it            ) {
+    
+            // columns: 0..row  ( P )
+            for (   row_it =  matrix_it->begin(),   y_it2 = y_l_it;
+                    row_it != matrix_it->end();
+                  ++row_it,                       ++y_it2         ) {
+    
+                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
+            }
+        }
+    
+        // rows: l..k-1  ( Q R )
+        for (   row = l,   y_it1 = y_x_it,   matrix_it += l-s;
+                row < k;
+              ++row,     ++y_it1,          ++matrix_it       ) {
+    
+            // columns: 0..s-1  ( Q )
+            for (   col = 0,   row_it =  matrix_it->begin(),   y_it2 = y_l_it;
+                    col < s;
+                  ++col,     ++row_it,                       ++y_it2         ){
+    
+                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
+            }
+    
+            // columns: l..k-1  ( R )
+            for (              row_it += l-s,                  y_it2 = y_x_it;
+                               row_it != matrix_it->end();
+                             ++row_it,                       ++y_it2         ){
+    
+                update_entry( *row_it, d_new, *y_it1 * *y_it2, d_old);
+            }
+        }
+    }
+    
+    template < class ForIt1, class ForIt2 >                     // LP case
+    void  update_inplace_LP( ForIt1 x_x_it, ForIt2 y_x_it,
+			     const ET& d_new, const ET& d_old)
+    {
+        typename Matrix::      iterator  matrix_it;
+        typename Row   ::      iterator     row_it;
+	ForIt1                                x_it;
+    
+        unsigned int  row, col;
+	ET            y;
+
+	// QP (in phase I)?
+	matrix_it = M.begin();
+	if ( is_QP) matrix_it += l;
+
+        // rows: 0..s-1  ( Q )
+        for (   row = 0;
+                row < s;
+              ++row,     ++y_x_it, ++matrix_it) {
+    
+            // columns: 0..b-1  ( Q )
+	    y = *y_x_it;
+            for (   col = 0,   row_it =  matrix_it->begin(),   x_it = x_x_it;
+		    col < b;
+		  ++col,     ++row_it,                       ++x_it         ){
+    
+                update_entry( *row_it, d_new, y * *x_it, d_old);
+            }
+        }
+    }
+    
+    
+    template < class RandomAccessIterator >
+    typename std::iterator_traits<RandomAccessIterator>::value_type 
+    inv_M_B_row_dot_col( int row, RandomAccessIterator u_l_it) const
+    {
+	typename Row::const_iterator row_it;
+	if ( is_QP) {
+	    row_it = M[l + row].begin();
+	} else {
+	    row_it = M[row].begin();
+	}
+	return inner_product(row_it, u_l_it, b);	
+    }
+
+};
+
+// ----------------------------------------------------------------------------
+
+// =============================
+// class implementation (inline)
+// =============================
+
+// creation
+template < class ET_, class Is_LP_ >  inline
+QP_basis_inverse<ET_,Is_LP_>::
+QP_basis_inverse( CGAL::Verbose_ostream&  verbose_ostream)
+    : et0( 0), et1( 1), et2( 2),
+      is_LP( check_tag( Is_LP())), is_QP( ! is_LP),
+      vout( verbose_ostream)
+{ }
+
+// transition (LP case)
+template < class ET_, class Is_LP_ >  inline
+void  QP_basis_inverse<ET_,Is_LP_>::
+transition( )
+{
+    is_phaseI  = false;
+    is_phaseII = true;
+
+    CGAL_qpe_debug {
+	if ( vout.verbose()) print();
+    }
+}
+
+// set-up (QP case)
+template < class ET_, class Is_LP_ >  inline
+void  QP_basis_inverse<ET_,Is_LP_>::
+set( Tag_false)
+{
+    M.reserve( l);
+    // only allocate empty rows
+    for ( unsigned int i = 0; i < l; ++i )
+       M.push_back(Row(0, et0)); 
+}
+    
+// set-up (LP case)
+template < class ET_, class Is_LP_ >  inline
+void  QP_basis_inverse<ET_,Is_LP_>::
+set( Tag_true)
+{
+    M.reserve( l);
+    for ( unsigned int i = 0; i < l; ++i) M.push_back( Row( l, et0));
+}
+
+// access (QP case)
+template < class ET_, class Is_LP_ >  inline
+const ET_&  QP_basis_inverse<ET_,Is_LP_>::
+entry( unsigned int r, unsigned int c, Tag_false) const
+{
+    CGAL_qpe_assertion( ( r < s) || ( ( r >= l) && ( r < l+b)));
+    CGAL_qpe_assertion( ( c < s) || ( ( c >= l) && ( c < l+b)));
+    return ( c < r ? M[ r][ c] : M[ c][ r]);
+}
+
+// access (LP case)
+template < class ET_, class Is_LP_ >  inline
+const ET_&  QP_basis_inverse<ET_,Is_LP_>::
+entry( unsigned int r, unsigned int c, Tag_true) const
+{
+    CGAL_qpe_assertion( r < s);
+    CGAL_qpe_assertion( c < b);
+    return M[ r][ c];
+}
+
+// in-place update
+template < class ET_, class Is_LP_ >  inline
+void  QP_basis_inverse<ET_,Is_LP_>::
+update_entry( ET& entry, const ET& d_new, const ET& y, const ET& d_old) const
+{
+    entry *= d_new;
+    entry += y;
+    entry = CGAL::integral_division(entry, d_old);
+}
+
+} //namespace CGAL
+
+#include <CGAL/QP_solver/QP_basis_inverse_impl.h>
+
+#endif // CGAL_QP_SOLVER_QP_BASIS_INVERSE_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse_impl.h
new file mode 100644
index 0000000..677676e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_basis_inverse_impl.h
@@ -0,0 +1,713 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr 
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp 
+//                 Kaspar Fischer 
+
+namespace CGAL {
+
+// =============================
+// class implementation (cont'd)
+// =============================
+
+// creation and initialization
+// ---------------------------
+// set-up
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+set( int n, int m, int nr_equalities)
+{
+    CGAL_qpe_assertion( n >= 0);
+    CGAL_qpe_assertion( m >= 0);
+    b = s = 0;
+    // l is the maximum size of the basis in phase I
+    l = (std::min)( n+nr_equalities+1, m);
+    if ( ! M.empty()) M.clear();
+    set( Is_LP());
+    
+    if ( ! x_l.empty()) x_l.clear();
+    if ( ! x_x.empty()) x_x.clear();
+       
+    x_l.insert( x_l.end(), l, et0);
+    x_x.insert( x_x.end(), l, et0); // has to grow later QP-case
+    
+    if ( ! tmp_l.empty()) tmp_l.clear();
+    if ( ! tmp_x.empty()) tmp_x.clear();
+
+    tmp_l.insert( tmp_l.end(), l, et0);
+    tmp_x.insert( tmp_x.end(), l, et0); // has to grow later QP-case
+
+}
+
+// update functions
+// ----------------
+// leaving of original variable (update type U2)
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+leave_original( )
+{
+    // assert QP case
+    Assert_compile_time_tag( Tag_false(), Is_LP());
+
+    // determine new denominator (`z')
+    --b;
+    ET    z     = M[ l+b][ l+b];
+    bool  z_neg = ( z < et0);
+    CGAL_qpe_assertion( z != et0);
+
+    // update matrix in place
+    update_inplace_QP( M[ l+b].begin(), M[ l+b].begin()+l,
+		       -z, ( z_neg ? d : -d));
+                                                                 
+    // store new denominator
+    d = ( z_neg ? -z : z);
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+}
+
+// entering of slack variable (update type U3)
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+enter_slack( )
+{
+    // assert QP case
+    Assert_compile_time_tag( Tag_false(), Is_LP());
+
+    // determine new denominator (`z')
+    --s;
+    ET    z     = M[ s][ s];
+    bool  z_neg = ( z < et0);
+    CGAL_qpe_assertion( z != et0);
+
+    // update matrix in place
+    typename Matrix::iterator  col_it;
+    typename Row   ::iterator    x_it;
+    unsigned int               col;
+    for (   col = 0,   col_it = M.begin()+l,   x_it = x_x.begin();
+            col < b;
+          ++col,     ++col_it,               ++x_it              ) {
+        *x_it = (*col_it)[ s];
+    }
+    update_inplace_QP( M[ s].begin(), x_x.begin(), -z, ( z_neg ? d : -d));
+
+    // store new denominator
+    d = ( z_neg ? -z : z);
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+}
+
+// replacing of original by slack variable (update type U8)
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+enter_slack_leave_original( )
+{
+    // assert LP case or phase I
+    CGAL_qpe_assertion( is_LP || is_phaseI);
+
+    // update matrix in-place
+    // ----------------------
+    typename Matrix::iterator  matrix_it;
+    typename Row   ::iterator       x_it;
+    unsigned int                     row;
+
+    // QP (in phase I)?
+    matrix_it = M.begin();
+    if ( is_QP) matrix_it += l;
+
+    // get last column of basis inverse (store it in 'x_x')
+    --s; --b;
+    for (   row = 0,   x_it = x_x.begin();
+	    row < s;
+	  ++row,     ++x_it,               ++matrix_it) {
+	*x_it = (*matrix_it)[ b];
+    }
+    ET    z     = (*matrix_it)[ b];
+    bool  z_neg = ( z < et0);
+    CGAL_qpe_assertion( z != et0);
+
+    // update matrix
+    update_inplace_LP( matrix_it->begin(), x_x.begin(), -z, ( z_neg ? d : -d));
+
+    // store new denominator
+    // ---------------------
+    d = ( z_neg ? -z : z);
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+}
+
+
+// replacing of original by original variable with precondition in QP-case
+// for phaseII                               (update type UZ_1)
+template < class ET_, class Is_LP_ >
+template < class ForwardIterator >
+void  QP_basis_inverse<ET_,Is_LP_>::
+z_replace_original_by_original(ForwardIterator y_l_it,
+                               ForwardIterator y_x_it, const ET& s_delta,
+                               const ET& s_nu, unsigned int k_i)
+{
+
+    // assert QP case and phaseII
+    CGAL_qpe_assertion(is_QP && is_phaseII);
+
+
+    // prepare \hat{k}_{1} -scalar
+    ET  hat_k_1 = *(y_x_it + k_i);
+
+    // prepare \hat{\rho} -vector in x_l, x_x
+    copy_row_in_B_O(x_l.begin(), x_x.begin(), k_i);
+    
+    // prepare \hat{v} -vector in tmp_l, tmp_x
+    
+    // tmp_l -part
+    std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(),
+        compose2_2(std::plus<ET>(), Identity<ET>(),
+        boost::bind1st(std::multiplies<ET>(), s_delta)));
+    
+    // tmp_x -part    
+    std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(),
+        compose2_2(std::plus<ET>(), Identity<ET>(),
+        boost::bind1st(std::multiplies<ET>(), s_delta)));
+    tmp_x[k_i] -= d;
+    
+    // prepare \hat{k}_{2} -scalar
+    ET  hat_k_2 = s_nu - (et2 * s_delta * hat_k_1);
+    
+    CGAL_qpe_assertion( d != et0);
+        
+    // update matrix in place
+    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
+                      hat_k_1 * hat_k_1, -hat_k_2, -hat_k_1, d*d);
+    
+    // store new denominator
+    d = CGAL::integral_division(hat_k_1 * hat_k_1, d);
+
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+    
+}
+
+
+// replacing of original by slack variable with precondition in QP-case
+// for phaseII                               (update type UZ_2)
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+z_replace_original_by_slack( )
+{
+
+    // assert QP case and phaseII
+    CGAL_qpe_assertion(is_QP && is_phaseII);
+
+    // adapt s and b
+    --s; --b;
+
+    // prepare \hat{\rho} -vector in x_l, x_x
+    copy_row_in_B_O(x_l.begin(), x_x.begin(), b);
+    
+    // prepare \hat{\varrho} -vector in tmp_l, tmp_x
+    copy_row_in_C(tmp_l.begin(), tmp_x.begin(), s);
+    
+    // prepare \hat{\kappa} -scalar
+    ET  hat_kappa = M[l+b][s];
+    
+    // prepare \hat{\xi} -scalar
+    ET hat_xi = M[s][s];
+        
+    CGAL_qpe_assertion( d != et0);
+    
+    // update matrix in place
+    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
+                           hat_kappa * hat_kappa, hat_xi, -hat_kappa, d * d);
+		     
+    // store new denominator
+    d = CGAL::integral_division(hat_kappa * hat_kappa, d);
+
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+
+}
+
+
+// replacing of slack by original variable with precondition in QP-case
+// for phaseII                               (update type UZ_3)
+template < class ET_, class Is_LP_ >
+template < class ForwardIterator >
+void  QP_basis_inverse<ET_,Is_LP_>::
+z_replace_slack_by_original(ForwardIterator y_l_it,
+                            ForwardIterator y_x_it,
+			                ForwardIterator u_x_it, const ET& hat_kappa,
+		                    const ET& hat_nu)
+{
+    // assert QP case and phaseII
+    CGAL_qpe_assertion(is_QP && is_phaseII);
+    
+    // get copies of y_l_it and y_x_it for later use
+    ForwardIterator y_l_it_copy = y_l_it;
+    ForwardIterator y_x_it_copy = y_x_it;
+
+    CGAL_qpe_assertion( d != et0);
+    
+    // prepare \hat{\phi}
+     
+    // prepare \hat{\varphi} -vector in x_l, x_x
+    multiply(u_x_it, u_x_it, x_l.begin(), x_x.begin(), Tag_false(),
+             Tag_false());
+	     
+    // prepare \hat{\kappa} -scalar
+    
+    // prepare \hat{\nu} -scalar
+   
+    // update matrix in place
+    z_update_inplace(x_l.begin(), x_x.begin(), y_l_it, y_x_it,
+                     hat_kappa * hat_kappa, -hat_nu, hat_kappa, d * d);    
+    
+    // append new rows and columns
+    // ---------------------------
+    typename Row   ::iterator  row_it, x_l_it, x_x_it;
+    typename Matrix::iterator  matrix_it;
+    unsigned int               count;
+    
+    // insert new row and column at the end of block P
+    CGAL_qpe_assertion(M.size()>=s+1);
+    if (M[s].size()==0) {
+	// row has to be filled first
+        M[s].insert(M[s].end(), s+1, et0);
+    }
+     
+    
+    // P-block: left of diagonal (including element on diagonal)
+    y_l_it = y_l_it_copy;
+    for (  row_it = M[s].begin(), x_l_it = x_l.begin();
+           row_it != M[s].end() - 1;
+	 ++row_it,  ++x_l_it,  ++y_l_it                ) {
+        *row_it = 
+	  CGAL::integral_division((hat_nu * *x_l_it)-(hat_kappa * *y_l_it), d);  
+    } 
+    *row_it = -hat_nu;
+     
+    // Q-block
+    y_x_it = y_x_it_copy;
+    for (  matrix_it = M.begin()+l, count = 0, x_x_it = x_x.begin();
+           count < b;
+	 ++matrix_it,  ++count, ++x_x_it, ++y_x_it                  ) {
+        (*matrix_it)[s] = 
+	  CGAL::integral_division((hat_nu * *x_x_it) - (hat_kappa * *y_x_it), d);
+    }
+          
+    // insert new row and column at the end of blocks Q and R
+    ensure_physical_row(l+b);
+    
+    // Q-block
+    for (  row_it = M[l+b].begin(), count = 0, x_l_it = x_l.begin();
+           count < s;
+	 ++row_it,  ++count,  ++x_l_it                              ) {
+        *row_it = CGAL::integral_division(-hat_kappa * *x_l_it, d);
+    }
+    *row_it = hat_kappa;
+    
+    // R-block
+    for (  row_it = M[l+b].begin()+l, count = 0, x_x_it = x_x.begin();
+           count < b;
+	 ++row_it,  ++count,  ++x_x_it                                ) {
+        *row_it = CGAL::integral_division(-hat_kappa * *x_x_it, d);
+    }
+    *row_it = et0;
+    
+    //adapt s and b
+    ++s; ++b; 
+
+    // store new denominator
+    d = CGAL::integral_division(hat_kappa * hat_kappa, d);
+
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+		     
+}
+
+
+// replacing of slack by slack variable with precondition in QP-case
+// for phaseII                               (update type UZ_4)
+template < class ET_, class Is_LP_ >
+template < class ForwardIterator >
+void  QP_basis_inverse<ET_,Is_LP_>::
+z_replace_slack_by_slack(ForwardIterator u_x_it, unsigned int k_j)
+{
+
+    // assert QP case and phaseII
+    CGAL_qpe_assertion(is_QP && is_phaseII);
+
+    // prepare \hat{v} -vector in x_l, x_x
+    multiply(u_x_it, u_x_it, x_l.begin(), x_x.begin(),Tag_false(),
+             Tag_false());
+    x_l[k_j] -= d;
+    
+    // prepare \hat{\varrho} -vector in tmp_l, tmp_x
+    copy_row_in_C(tmp_l.begin(), tmp_x.begin(), k_j);
+    
+    // prepare \hat{k}_{1} -scalar
+    ET  hat_k_1 = inner_product_x(tmp_x.begin(), u_x_it);
+    
+    // prepare \hat{k}_{3} -scalar
+    ET  hat_k_3 = -M[k_j][k_j];
+    
+    CGAL_qpe_assertion( d != et0);    
+    
+    // update matrix in place
+    z_update_inplace(x_l.begin(), x_x.begin(), tmp_l.begin(), tmp_x.begin(),
+                     hat_k_1 * hat_k_1, -hat_k_3, -hat_k_1, d * d);
+		     
+    // store new denominator
+    d = CGAL::integral_division(hat_k_1 * hat_k_1, d);
+
+    CGAL_qpe_assertion( d > et0);
+
+    CGAL_qpe_debug {
+        if ( vout.verbose()) print();
+    }
+      
+}
+
+
+// copying of reduced basis inverse row in (upper) C-half
+template < class ET_, class Is_LP_ >
+template < class OutIt >
+void  QP_basis_inverse<ET_,Is_LP_>::
+copy_row_in_C(OutIt y_l_it, OutIt y_x_it, unsigned int r)
+{
+    typename Matrix::const_iterator  matrix_it;
+    typename Row   ::const_iterator     row_it;
+    unsigned int  count;
+    
+    // P-block: left of diagonal (including element on diagonal)
+    matrix_it = M.begin()+r;
+    for (  row_it = matrix_it->begin();
+           row_it != matrix_it->end(); 
+	 ++row_it, ++y_l_it            ) {
+        *y_l_it = *row_it;    
+    }
+    
+    // P-block: right of diagonal (excluding element on diagonal)
+    for (  matrix_it = M.begin()+r+1, count = r+1;
+           count < s; 
+	 ++matrix_it,  ++count,  ++y_l_it         ) {
+        *y_l_it = (*matrix_it)[r];
+    }
+    
+    // Q-block
+    for (  matrix_it = M.begin()+l, count = 0;
+           count < b;
+	 ++matrix_it,  ++count,  ++y_x_it     ) {
+	*y_x_it = (*matrix_it)[r]; 
+    } 
+}
+
+
+// copying of reduced basis inverse row in (lower) B_O-half
+template < class ET_, class Is_LP_ >
+template < class OutIt >
+void  QP_basis_inverse<ET_,Is_LP_>::
+copy_row_in_B_O(OutIt y_l_it, OutIt y_x_it, unsigned int r)
+{
+    typename Matrix::const_iterator  matrix_it;
+    typename Row   ::const_iterator     row_it;
+    unsigned int  count;
+    
+    // Q-block
+    matrix_it = M.begin()+l+r;
+    for (  row_it = matrix_it->begin(), count = 0;
+           count < s;
+	 ++row_it,  ++count,  ++y_l_it           ) {
+        *y_l_it = *row_it;
+    }
+    
+    // R-block: left of diagonal (including element on diagonal)
+    for (  row_it = matrix_it->begin()+l; 
+           row_it != matrix_it->end();
+	 ++row_it,  ++y_x_it            ) {
+        *y_x_it = *row_it;
+    }
+    
+    // R-block: right of diagonal (excluding element on diagonal)
+    for (  matrix_it = M.begin()+l+r+1, count = r+1;
+           count < b;
+	 ++matrix_it,  ++count,  ++y_x_it           ) {
+        *y_x_it = (*matrix_it)[l+r];
+    }
+
+}
+
+template < class ET_, class Is_LP_ >
+template < class ForIt >
+void  QP_basis_inverse<ET_,Is_LP_>::
+z_update_inplace( ForIt psi1_l_it, ForIt psi1_x_it,
+                  ForIt psi2_l_it, ForIt psi2_x_it,
+	             const ET& omega0, const ET& omega1,
+		         const ET& omega2, const ET& omega3)
+{
+    typename Matrix::      iterator  matrix_it;
+    typename Row   ::      iterator     row_it;
+    typename Row   ::const_iterator      y_it1_r, y_it1_c, y_it2_r, y_it2_c;
+	
+    unsigned int  row, col, k = l+b;
+    ET           u_elem;
+
+    // rows: 0..s-1  ( P )
+    for (  row = 0, matrix_it = M.begin(),
+           y_it1_r = psi1_l_it,  y_it2_r = psi2_l_it;
+	   row < s;
+         ++row, ++matrix_it, ++y_it1_r, ++y_it2_r  ) {
+	      
+        // columns: 0..row  ( P )
+        for (   row_it =  matrix_it->begin(),
+	        y_it1_c = psi1_l_it,  y_it2_c = psi2_l_it;
+                row_it != matrix_it->end();
+              ++row_it,  ++y_it1_c,  ++y_it2_c            ) {
+                
+            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
+	    u_elem *= omega2;
+	    u_elem += omega1 * *y_it1_r * *y_it1_c;
+            update_entry( *row_it, omega0, u_elem, omega3);
+        } 
+    }
+	
+    // rows: l..k-1  ( Q R )
+    for (  row = l, matrix_it = M.begin()+l,
+	   y_it1_r = psi1_x_it,  y_it2_r = psi2_x_it;
+	   row != k;
+	 ++row,  ++matrix_it,  ++y_it1_r,  ++y_it2_r ) {
+	    
+        // columns: 0..s-1  ( Q )
+        for (   col = 0,   row_it =  matrix_it->begin(),
+	        y_it1_c = psi1_l_it,  y_it2_c = psi2_l_it;
+                col < s;
+              ++col, ++row_it,  ++y_it1_c,  ++y_it2_c     ){
+    
+            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
+	       u_elem *= omega2;
+	       u_elem += omega1 * *y_it1_r * *y_it1_c; 
+	       update_entry( *row_it, omega0, u_elem, omega3);
+        }
+    
+        // columns: l..k-1  ( R )
+        for (  row_it = matrix_it->begin()+l,
+	       y_it1_c = psi1_x_it,  y_it2_c = psi2_x_it;
+               row_it != matrix_it->end();
+             ++row_it,  ++y_it1_c,  ++y_it2_c            ){
+		 
+            u_elem = (*y_it1_r * *y_it2_c) + (*y_it2_r * *y_it1_c);
+            u_elem *= omega2;
+	        u_elem += omega1 * *y_it1_r * *y_it1_c;     
+            update_entry( *row_it, omega0, u_elem, omega3);
+        }
+	    
+    } 
+	
+} 
+
+
+// swap functions
+// --------------
+// swap variable ``to the end'' of R
+template < class ET_, class Is_LP_ >                            // LP case
+void  QP_basis_inverse<ET_,Is_LP_>::
+swap_variable( unsigned int j, Tag_true)
+{
+    unsigned int  k = b-1;
+    if ( j == k) return;
+
+    // swap rows
+    // ---------
+    typename Row::iterator   row_j_it = M[ j].begin();
+    typename Row::iterator   row_k_it = M[ k].begin();
+    unsigned int  count;
+
+    // swap entries 0..b-1 (row <-> row) [in Q]
+    for (   count = 0;
+            count < b;
+          ++count,     ++row_j_it, ++row_k_it) {
+        std::iter_swap( row_j_it, row_k_it);
+    }
+}
+
+template < class ET_, class Is_LP_ >                            // QP case
+void  QP_basis_inverse<ET_,Is_LP_>::
+swap_variable( unsigned int j, Tag_false)
+{
+    unsigned int  i = l+j, k = l+b-1;
+    if ( i == k) return;
+
+    // swap rows and columns
+    // ---------------------
+    typename    Row::iterator   row_i_it = M[ i].begin();
+    typename    Row::iterator   row_k_it = M[ k].begin();
+    typename Matrix::iterator  matrix_it = M.begin()+(i+1);
+    unsigned int  count;
+
+    // swap entries 0..s-1 (row <-> row) [in Q]
+    for (   count = 0;
+            count < s;
+          ++count,     ++row_i_it, ++row_k_it) {
+        std::iter_swap( row_i_it, row_k_it);
+    }
+
+    if ( is_phaseII) {
+
+	// swap entries l..i-1 (row <-> row) [in R]
+	for (   count = l,   row_i_it += l-s,   row_k_it += l-s;
+		count < i;
+	      ++count,     ++row_i_it,        ++row_k_it       ) {
+	    std::iter_swap( row_i_it, row_k_it);
+	}
+
+	// swap entries i+1..k-1 (column <-> row) [in R]
+	for ( ++count,                        ++row_k_it;
+		count < k;
+	      ++count,     ++matrix_it,       ++row_k_it) {
+	    std::swap( ( *matrix_it)[ i], *row_k_it);
+	}
+
+	// swap entries i,i with k,k (entry <-> entry) [in R]
+	std::iter_swap( row_i_it, row_k_it);
+    }
+}
+
+// swap constraint ``to the end'' of P
+template < class ET_, class Is_LP_ >                            // LP case
+void  QP_basis_inverse<ET_,Is_LP_>::
+swap_constraint( unsigned int i, Tag_true)
+{
+    unsigned int  k = s-1;
+    if ( i == k) return;
+
+    // swap columns
+    // ------------
+    typename Matrix::iterator  matrix_it = M.begin();
+    unsigned int  count;
+
+    // swap entries 0..s-1 (column <-> column) [in Q]
+    for (   count = 0;
+            count < s;
+          ++count,     ++matrix_it) {
+        std::swap( ( *matrix_it)[ i], ( *matrix_it)[ k]);
+    }
+}
+
+template < class ET_, class Is_LP_ >                            // QP case
+void  QP_basis_inverse<ET_,Is_LP_>::
+swap_constraint( unsigned int i, Tag_false)
+{
+ 
+    if ( i == s-1) return;
+
+    // swap rows and columns
+    // ---------------------
+    typename    Row::iterator   row_i_it = M[ i].begin();
+    typename    Row::iterator   row_k_it = M[ s-1].begin();
+    typename Matrix::iterator  matrix_it = M.begin()+i;
+    unsigned int  count;
+
+    if ( is_phaseI) {
+
+	// skip empty P
+	matrix_it =M.begin() + l;
+
+    } else {
+
+	// swap entries 0..i-1 (row <-> row) [in P]
+	for (   count =  0;
+		count < i;
+	      ++count,      ++row_i_it, ++row_k_it) {
+	    std::iter_swap( row_i_it, row_k_it);
+	}
+
+	// swap entries i+1..s-2 (column <-> row) [in P]
+	for ( count = i + 1, ++matrix_it, ++row_k_it;
+		count < s-1;
+	      ++count,     ++matrix_it, ++row_k_it) {
+	    std::swap( ( *matrix_it)[ i], *row_k_it);
+	}
+	// the remaining two entries to be swapped on the main diagonal
+	std::swap(M[i][i], M[s-1][s-1]);
+
+	// advance to Q
+	matrix_it = M.begin() + l;
+    }
+
+    // swap entries l..l+b (column <-> column) [in Q]
+    for (   count = 0;
+            count < b;
+          ++count,     ++matrix_it) {
+        std::swap( ( *matrix_it)[ i], ( *matrix_it)[ s-1]);
+    }
+}
+
+// diagnostic output
+// -----------------
+template < class ET_, class Is_LP_ >
+void  QP_basis_inverse<ET_,Is_LP_>::
+print( )
+{
+    // P
+    if ( is_LP || is_phaseII) {
+	for ( unsigned int row = 0; row < s; ++row) {
+	    std::copy( M[ row].begin(),
+		       M[ row].begin() + ( is_LP ? s : row+1),
+		       std::ostream_iterator<ET>( vout.out(), " "));
+	    vout.out() << std::endl;
+	}
+	if ( is_QP) vout.out() << "= = = = = = = = = =" << std::endl;
+    }
+
+    // Q & R
+    if ( is_QP) {
+	for ( unsigned int row = l; row < l+b; ++row) {
+	    std::copy( M[ row].begin(), M[ row].begin()+s,
+		       std::ostream_iterator<ET>( vout.out(), " "));
+	    if ( is_phaseII) {
+		vout.out() << "|| ";
+		std::copy( M[ row].begin()+l, M[ row].end(),
+			   std::ostream_iterator<ET>( vout.out(), " "));
+	    }
+	    vout.out() << std::endl;
+	}
+    }
+    vout.out() << "denominator = " << d << std::endl;
+}
+
+} //namespace CGAL
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_exact_bland_pricing.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_exact_bland_pricing.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_exact_bland_pricing.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_exact_bland_pricing.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_full_exact_pricing.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_full_exact_pricing.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_full_exact_pricing.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_full_exact_pricing.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_full_filtered_pricing.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_full_filtered_pricing.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_full_filtered_pricing.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_full_filtered_pricing.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_functions_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_functions_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_functions_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_functions_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_exact_pricing.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_exact_pricing.h
new file mode 100644
index 0000000..aac1842
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_exact_pricing.h
@@ -0,0 +1,252 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp 
+//                 Kaspar Fischer
+
+#ifndef CGAL_QP_PARTIAL_EXACT_PRICING_H
+#define CGAL_QP_PARTIAL_EXACT_PRICING_H
+
+// includes
+#include <CGAL/QP_solver/QP__partial_base.h>
+
+namespace CGAL {
+
+// =================
+// class declaration
+// =================
+template < typename Q, typename ET, typename Tags >
+class QP_partial_exact_pricing;
+
+// ===============
+// class interface
+// ===============
+template < typename Q, typename ET, typename Tags >
+class QP_partial_exact_pricing : public QP__partial_base<Q,ET,Tags> {
+
+    // self
+    typedef  QP_pricing_strategy<Q,ET,Tags>       Base;
+    typedef  QP__partial_base<Q,ET,Tags>          Partial_base;
+    typedef  QP_partial_exact_pricing<Q,ET,Tags>  Self;
+
+    // types from the pricing base class
+    typedef  typename Tags::Is_nonnegative           Is_nonnegative;
+    typedef  typename Partial_base::Index_iterator        Index_iterator;
+    typedef  typename Partial_base::Index_const_iterator  Index_const_iterator;
+
+  public:
+
+    // creation
+    QP_partial_exact_pricing( bool     randomize = false,
+			       Random&  random    = get_default_random());
+
+    // operations
+    int  pricing(int& direction );
+    
+    // creation
+    ~QP_partial_exact_pricing(){ };
+
+  private:
+    int pricing_helper(int& direction, Tag_true  /*is_in_standard_form*/);
+    int pricing_helper(int& direction, Tag_false /*is_in_standard_form*/);
+};
+
+// ----------------------------------------------------------------------------
+
+// =============================
+// class implementation (inline)
+// =============================
+
+// construction
+template < typename Q, typename ET, typename Tags >  inline
+QP_partial_exact_pricing<Q,ET,Tags>::
+QP_partial_exact_pricing( bool  randomize, Random&  random)
+    : Base( "partial exact"),
+      Partial_base( randomize, random)
+{ }
+    
+// operations
+template < typename Q, typename ET, typename Tags >
+int  QP_partial_exact_pricing<Q,ET,Tags>::
+pricing(int& direction )
+{
+  return (pricing_helper(direction, Is_nonnegative()));
+}
+
+template < typename Q, typename ET, typename Tags >
+int  QP_partial_exact_pricing<Q,ET,Tags>::
+pricing_helper(int& /*direction*/, Tag_true /*is_in_standard_form*/)
+{
+    Index_const_iterator  it, min_it;
+    ET mu, min_mu = this->et0;
+
+    // loop over all active non-basic variables
+    CGAL_qpe_debug {
+	this->vout() << "active variables:" << std::endl;
+    }
+    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
+
+        // don't price artificial variables
+	if (this->solver().is_artificial( *it) ||
+	    this->solver().is_basic( *it))  // added by kf
+	  continue;
+
+	// compute mu_j
+	mu = this->mu_j( *it);
+
+	CGAL_qpe_debug {
+	    this->vout() << "  mu_" << *it << ": " << mu << std::endl;
+	}
+
+	// new minimum?
+	if ( mu < min_mu) { min_it = it; min_mu = mu; }
+    }
+
+    // no entering variable found so far?
+    if ( ( min_mu == this->et0) && ( this->inactive_set_begin() <
+                                     this->inactive_set_end())) {
+
+	// loop over all inactive non-basic variables
+	CGAL_qpe_debug {
+	    this->vout() << "inactive variables:" << std::endl;
+	}
+	Index_const_iterator  active_it;
+	for ( it = this->inactive_set_begin(); it != this->inactive_set_end(); ++it) {
+
+	    // don't price artificial variables
+	    if (this->solver().is_artificial( *it)) continue;
+	    
+	    // compute mu_j
+	    mu = this->mu_j( *it);
+
+	    CGAL_qpe_debug {
+		this->vout() << "  mu_" << *it << ": " << mu << std::endl;
+	    }
+
+	    // candidate for entering?
+	    if ( mu < this->et0) {
+
+		// make variable active
+		active_it = it;
+		this->activating( active_it);
+
+		// new minimum?
+		if ( mu < min_mu) { min_it = active_it; min_mu = mu; }
+	    }
+	}
+    }
+    CGAL_qpe_debug { 
+      this->vout() << std::endl;
+    }
+
+    // return index of entering variable, if any
+    if ( min_mu < this->et0) {
+	int  j = *min_it;
+	this->entering_basis( min_it);
+	return j;
+    }
+
+    // no entering variable found
+    return -1;
+}
+template < typename Q, typename ET, typename Tags >
+int  QP_partial_exact_pricing<Q,ET,Tags>::
+pricing_helper(int& direction, Tag_false /*is_in_standard_form*/)
+{
+    Index_const_iterator  it, min_it;
+    int                   min_j = -1;
+    ET                    mu, min_mu =  this->et0;
+
+    // loop over all active non-basic variables
+    CGAL_qpe_debug {
+	this->vout() << "active variables:" << std::endl;
+    }
+    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
+
+        // don't price artificial variables
+	if (this->solver().is_artificial( *it) ||
+	    this->solver().is_basic( *it))  // added by kf
+	  continue;
+
+	// compute mu_j
+	mu = this->mu_j( *it);
+
+	if (this->price_dantzig (*it, mu, this->et0, min_j, min_mu, direction))
+	  min_it = it;
+    }
+
+    // no entering variable found so far?
+    if ( ( min_j == -1) && ( this->inactive_set_begin() <
+                             this->inactive_set_end())) 
+      {
+
+	// loop over all inactive non-basic variables
+	CGAL_qpe_debug {
+	    this->vout() << "inactive variables:" << std::endl;
+	}
+	Index_const_iterator  active_it;
+	for ( it = this->inactive_set_begin(); 
+	      it != this->inactive_set_end(); ++it) {
+
+	  // don't price basics/artificials
+	  CGAL_qpe_assertion (!this->solver().is_basic(*it));
+	  if (this->solver().is_artificial( *it)) continue;
+	    
+	  // compute mu_j
+	  mu = this->mu_j( *it);
+
+	  CGAL_qpe_debug {
+	    this->vout() << "  mu_" << *it << ": " << mu << std::endl;
+	  }
+
+	  // candidate for entering?
+	  if ( this->is_improving(*it, mu, this->et0)) {
+
+	    // make variable active
+	    active_it = it;
+	    this->activating( active_it);
+
+	    // new minimum?
+	    if (this->price_dantzig (*active_it, mu, this->et0, 
+			       min_j, min_mu, direction))
+	      min_it = active_it;
+	  }
+	}
+      }
+    CGAL_qpe_debug { 
+      this->vout() << std::endl;
+    }
+
+    // return index of entering variable, if any
+    if ( min_j >= 0) {
+      CGAL_qpe_assertion(min_j == *min_it);
+      this->entering_basis( min_it);
+      return min_j;
+    }
+
+    // no entering variable found
+    return -1;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_QP_PARTIAL_EXACT_PRICING_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_filtered_pricing.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_filtered_pricing.h
new file mode 100644
index 0000000..e1c13cd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_partial_filtered_pricing.h
@@ -0,0 +1,432 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp
+//                 Kaspar Fischer 
+
+#ifndef CGAL_QP_PARTIAL_FILTERED_PRICING_H
+#define CGAL_QP_PARTIAL_FILTERED_PRICING_H
+
+// MSVC detection
+#include <boost/config.hpp>
+
+// includes
+#include <CGAL/QP_solver/QP__partial_base.h>
+#include <CGAL/QP_solver/QP__filtered_base.h>
+
+
+// MSVC complains about inheritance through dominance when only one
+// base implements virtual functions from the top of the diamond.
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4250)
+#endif
+
+namespace CGAL {
+
+// =================
+// class declaration
+// =================
+template < typename Q, typename ET, typename Tags, class NT_ = double, class ET2NT_ =
+    To_double<ET> >
+class QP_partial_filtered_pricing;
+
+// ===============
+// class interface
+// ===============
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
+class QP_partial_filtered_pricing
+    : public QP__partial_base <Q,ET,Tags>,
+      public QP__filtered_base<Q,ET,Tags,NT_,ET2NT_> {
+
+    // self
+    typedef  QP_pricing_strategy<Q,ET,Tags>          Base;
+    typedef  QP__partial_base<Q,ET,Tags>             Partial_base;
+    typedef  QP__filtered_base<Q,ET,Tags, NT_, ET2NT_>  Filtered_base;
+    typedef  QP_partial_filtered_pricing<Q, ET, Tags, NT_, ET2NT_>  Self;
+
+    // types from the base class
+    typedef  typename Tags::Is_nonnegative           Is_nonnegative;
+    typedef  typename Partial_base::Index_iterator        Index_iterator;
+    typedef  typename Partial_base::Index_const_iterator  Index_const_iterator;
+
+    using Base::price_dantzig;
+    using Base::is_improving;
+
+  public:
+
+    // number type
+    typedef  NT_                        NT;
+    typedef  ET2NT_                     ET2NT;
+
+    // creation
+    QP_partial_filtered_pricing( bool     randomize = false,
+				  Random&  random    = get_default_random(),
+				  ET2NT    et2nt     = ET2NT());
+
+    // operations
+    int  pricing(int& direction );
+
+    void  init( );
+    void  transition( );
+    
+    
+    // cleanup
+    ~QP_partial_filtered_pricing() {};
+
+  private:
+  int pricing_helper(int& direction, Tag_true  /*is_in_standard_form*/);
+  int pricing_helper(int& direction, Tag_false /*is_in_standard_form*/);
+};
+
+// ----------------------------------------------------------------------------
+
+// =============================
+// class implementation (inline)
+// =============================
+
+// construction
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
+QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+QP_partial_filtered_pricing( bool randomize, Random& random, ET2NT et2nt)
+    : Base( "partial filtered"),
+      Partial_base( randomize, random),
+      Filtered_base( et2nt)
+{ }
+    
+// operations
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
+void  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+init( )
+{
+     Partial_base::init();
+    Filtered_base::init();
+}
+
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >  inline
+void  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+transition( )
+{
+     Partial_base::transition();
+    Filtered_base::transition();
+}
+
+
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
+int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+pricing(int& direction ) 
+{
+  return (pricing_helper(direction, Is_nonnegative()));
+}
+
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
+int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+pricing_helper(int& /*direction*/, Tag_true /*is_in_standard_form*/ )
+{
+    // initialize filtered computation
+    this->init_NT();
+
+    // loop over all active non-basic variables
+    CGAL_qpe_debug {
+	this->vout() << "active variables:" << std::endl;
+    }
+
+    Index_const_iterator  it, min_it;
+    NT                            mu, min_mu = this->nt0;
+    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
+
+	// don't price artificial variables
+	if (this->solver().is_artificial( *it) ||
+	    this->solver().is_basic( *it))  // added by kf
+	  continue;
+
+	// compute mu_j
+	mu = this->mu_j_NT( *it);
+
+	CGAL_qpe_debug {
+	    this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
+	}
+
+	// new minimum?
+	if ( mu < min_mu) { min_it = it; min_mu = mu; }
+    }
+
+    // exact check of entering variable
+    if ( min_mu < this->nt0) {
+	if ( this->mu_j( *min_it) >= this->et0) {
+
+	    // exact check failed!
+	    CGAL_qpe_debug {
+		this->vout() << "--> exact check of entering variable failed!"
+		       << std::endl;
+	    }
+
+	    // reject entering variable
+	    min_mu = this->nt0;
+	}
+    } else {
+	CGAL_qpe_debug {
+	    this->vout() << "--> no entering variable found yet" << std::endl;
+	}
+    }
+
+    // no entering variable found so far?
+    if ( ( min_mu == this->nt0) &&
+         ( this->inactive_set_begin() < this->inactive_set_end())) {
+
+	// loop over all inactive non-basic variables
+	CGAL_qpe_debug {
+	    this->vout() << "inactive variables:" << std::endl;
+	}
+	Index_const_iterator  active_it;
+	for ( it = this->inactive_set_begin(); it != this->inactive_set_end(); ++it) {
+
+	    // don't price artificial variables
+	    if (this->solver().is_artificial( *it)) continue;
+
+	    // compute mu_j
+	    mu = this->mu_j_NT( *it);
+
+	    CGAL_qpe_debug {
+		this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
+	    }
+
+	    // candidate for entering?
+	    if ( mu < this->nt0) {
+
+		// make variable active
+		active_it = it;
+		this->activating( active_it);
+
+		// new minimum?
+		if ( mu < min_mu) { min_it = active_it; min_mu = mu; }
+	    }
+	}
+
+	// exact check of entering variable
+	if ( min_mu < this->nt0) {
+	    if ( this->mu_j( *min_it) >= this->et0) {
+
+		// exact check failed!
+		CGAL_qpe_debug {
+		    this->vout() << "--> exact check of entering variable failed!"
+			   << std::endl;
+		}
+
+		// reject entering variable
+		min_mu = this->nt0;
+	    }
+	} else {
+	    CGAL_qpe_debug {
+		this->vout() << "--> still no entering variable found" << std::endl;
+	    }
+	}
+    }
+
+    // certify non-existance of entering variable, if necessary
+    if ( min_mu == this->nt0) {
+
+	// update row and column maxima
+	this->update_maxima();
+
+	// loop over all non-basic variables again
+	for ( it = this->active_set_begin(); it != this->inactive_set_end(); ++it) {
+
+	    // don't price artificial variables
+	    if (this->solver().is_artificial( *it)) continue;
+
+	    // certify 'mu_j >= 0'
+	    if ( ! this->certify_mu_j_NT( *it)) {
+
+		// entering variable missed by inexact arithmetic
+		min_it = it;
+		break;
+	    }
+	}
+    }
+    CGAL_qpe_debug { 
+      this->vout() << std::endl;
+    }
+
+    // return index of entering variable, if any
+    if ( min_mu < this->nt0) {
+	int  j = *min_it;
+        this->entering_basis( min_it);
+	return j;
+    }
+
+    // no entering variable found
+    return -1;
+}
+template < typename Q, typename ET, typename Tags, class NT_, class ET2NT_ >
+int  QP_partial_filtered_pricing<Q,ET,Tags,NT_,ET2NT_>::
+pricing_helper(int& direction, Tag_false /*is_in_standard_form*/ )
+{
+    // initialize filtered computation
+    this->init_NT();
+
+    // loop over all active non-basic variables
+    CGAL_qpe_debug {
+	this->vout() << "active variables:" << std::endl;
+    }
+
+    Index_const_iterator  it, min_it;    
+    int min_j = -1;
+    NT  mu, min_mu = this->nt0;
+    for ( it = this->active_set_begin(); it != this->active_set_end(); ++it) {
+
+	// don't price artificial variables
+	if (this->solver().is_artificial( *it) ||
+	    this->solver().is_basic( *it))  // added by kf
+	  continue;
+
+	// compute mu_j
+	mu = this->mu_j_NT( *it);
+
+	if (price_dantzig (*it, mu, this->nt0, min_j, min_mu, direction))
+	  min_it = it;
+    }
+
+    if ( min_j >= 0 ) {
+        // exact check; do we really have an entering variable
+	if ( !this->is_improving(min_j, this->mu_j( min_j), this->et0)) {
+
+	    // exact check failed!
+	    CGAL_qpe_debug {
+		this->vout() << "--> exact check of entering variable failed!"
+		       << std::endl;
+	    }
+
+	    // reject entering variable
+	    min_j = -1;
+	    min_mu = this->nt0;
+	}
+    } else {
+	CGAL_qpe_debug {
+	    this->vout() << "--> no entering variable found yet" << std::endl;
+	}
+    }
+
+    // no entering variable found so far?
+    if ( ( min_j == -1) &&
+         ( this->inactive_set_begin() < this->inactive_set_end())) {
+
+	// loop over all inactive non-basic variables
+	CGAL_qpe_debug {
+	    this->vout() << "inactive variables:" << std::endl;
+	}
+	Index_const_iterator  active_it;
+	for ( it = this->inactive_set_begin(); 
+	      it != this->inactive_set_end(); ++it) {
+
+	    // don't price artificial variables
+	    if (this->solver().is_artificial( *it)) continue;
+
+	    // compute mu_j
+	    mu = this->mu_j_NT( *it);
+
+	    CGAL_qpe_debug {
+		this->vout() << "  mu_" << *it << " [NT]: " << mu << std::endl;
+	    }
+
+	    // candidate for entering?
+	    if (is_improving(*it, mu, this->nt0)) {
+
+		// make variable active
+		active_it = it;
+		this->activating( active_it);
+		
+		// new minimum
+		if (price_dantzig (*active_it, mu, this->nt0, 
+			            min_j, min_mu, direction))
+		  min_it = active_it;
+	    }
+	}
+
+	if ( min_j >= 0) {	
+	    // exact check of entering variable
+	    if (!this->is_improving(min_j, this->mu_j( min_j), this->et0)) {
+
+		// exact check failed!
+		CGAL_qpe_debug {
+		    this->vout() << 
+		      "--> exact check of entering variable failed!"
+		      << std::endl;
+		}
+
+		// reject entering variable
+		min_j = -1;
+		min_mu = this->nt0;
+	    }
+	} else {
+	    CGAL_qpe_debug {
+		this->vout() << 
+		  "--> still no entering variable found" 
+		  << std::endl;
+	    }
+	}
+    }
+
+    // certify non-existance of entering variable, if necessary
+    if ( min_j == -1) {
+
+	// update row and column maxima
+	this->update_maxima();
+
+	// loop over all non-basic variables again
+	for ( it = this->active_set_begin(); 
+	      it != this->inactive_set_end(); ++it) {
+
+	    // don't price artificial variables
+	    if (this->solver().is_artificial( *it)) continue;
+
+	    if ( ! this->certify_mu_j_NT( *it)) {
+
+		// entering variable missed by inexact arithmetic
+	      min_j = *it;
+	      min_it = it;
+	      break;
+	    }
+	}
+    }
+    CGAL_qpe_debug { 
+      this->vout() << std::endl;
+    }
+
+    // return index of entering variable, if any
+    if ( min_j >= 0) {
+      CGAL_qpe_assertion(min_j == *min_it);
+      this->entering_basis( min_it);
+      return min_j;
+    }
+
+    // no entering variable found
+    return -1;
+}
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_QP_PARTIAL_FILTERED_PRICING_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_pricing_strategy.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_pricing_strategy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_pricing_strategy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_pricing_strategy.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solution_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solution_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solution_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solution_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver.h
new file mode 100644
index 0000000..f3e6cf2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver.h
@@ -0,0 +1,1999 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licenseges holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Kaspar Fischer
+//               : Bernd Gaertner <gaertner at inf.ethz.ch>
+//               : Sven Schoenherr 
+//               : Franz Wessendorp 
+
+#ifndef CGAL_QP_SOLVER_H
+#define CGAL_QP_SOLVER_H
+
+#include <CGAL/iterator.h>
+#include <CGAL/QP_solver/basic.h>
+#include <CGAL/QP_solver/functors.h>
+#include <CGAL/QP_options.h>
+#include <CGAL/QP_solution.h>
+#include <CGAL/QP_solver/QP_basis_inverse.h>
+#include <CGAL/QP_solver/QP_pricing_strategy.h>
+#include <CGAL/QP_solver/QP_full_exact_pricing.h>
+#include <CGAL/QP_solver/QP_partial_exact_pricing.h>
+#include <CGAL/QP_solver/QP_full_filtered_pricing.h>
+#include <CGAL/QP_solver/QP_partial_filtered_pricing.h>
+#include <CGAL/QP_solver/QP_exact_bland_pricing.h>
+
+#include <CGAL/algorithm.h>
+
+#include <CGAL/IO/Verbose_ostream.h>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <vector>
+#include <numeric>
+#include <algorithm>
+
+namespace CGAL {
+
+// ==================
+// class declarations
+// ==================
+template < typename Q, typename ET, typename Tags  >
+class QP_solver;
+
+template <class ET>
+class QP_solution; 
+
+namespace QP_solver_impl {   // namespace for implemenation details
+  // --------------
+  // Tags generator
+  // --------------
+  template < typename Linear, 
+	     typename Nonnegative >
+  struct QP_tags {
+    typedef Linear                Is_linear;
+    typedef Nonnegative           Is_nonnegative;
+  };
+
+  template < class Q, class Is_linear >
+  struct D_selector {};
+
+  template <class Q>
+  struct D_selector<Q, Tag_false> // quadratic
+  {
+    typedef typename Q::D_iterator D_iterator;
+  };
+
+  template <class Q>
+  struct D_selector<Q, Tag_true> // linear
+  {
+    // dummy type, not used
+    typedef int** D_iterator;
+  };
+
+  template < class Q, class Is_nonnegative >
+  struct Bd_selector {};
+
+  template < class Q >
+  struct Bd_selector<Q, Tag_false> // nonstandard form
+  {
+    typedef typename Q::FL_iterator FL_iterator;
+    typedef typename Q::L_iterator L_iterator;
+    typedef typename Q::FU_iterator FU_iterator;
+    typedef typename Q::U_iterator U_iterator;
+  };
+
+  template < class Q >
+  struct Bd_selector<Q, Tag_true> // standard form
+  {
+    // dummy types, not used
+    typedef int* FL_iterator;
+    typedef int* L_iterator;
+    typedef int* FU_iterator;
+    typedef int* U_iterator;
+  };
+
+  // only allow filtered pricing if NT = double
+  template <typename Q, typename ET, typename Tags, typename NT>
+  struct Filtered_pricing_strategy_selector
+  {
+    typedef QP_full_exact_pricing<Q, ET, Tags> FF;
+    typedef QP_partial_exact_pricing<Q, ET, Tags> PF;
+  };
+
+  template <typename Q, typename ET, typename Tags>
+  struct Filtered_pricing_strategy_selector<Q, ET, Tags, double> 
+  {
+    typedef QP_full_filtered_pricing<Q, ET, Tags> FF;
+    typedef QP_partial_filtered_pricing<Q, ET, Tags> PF;
+  };
+
+} // end of namespace for implementation details
+
+// ================
+// class interfaces
+// ================
+
+
+template < typename Q, typename ET, typename Tags >
+class QP_solver : public QP_solver_base<ET> {
+
+public: // public types
+  typedef  QP_solver<Q, ET, Tags> Self;
+  typedef  QP_solver_base<ET> Base;
+  
+  // types from the QP
+  typedef  typename Q::A_iterator   A_iterator;
+  typedef  typename Q::B_iterator   B_iterator;
+  typedef  typename Q::C_iterator   C_iterator;
+  typedef  CGAL::Comparison_result Row_type;
+  typedef  typename Q::R_iterator Row_type_iterator;
+  
+  // the remaining types might not be present in the qp, so the
+  // following selectors generate dummy types for them 
+  typedef  typename QP_solver_impl::
+  D_selector<Q, typename Tags::Is_linear>::
+  D_iterator D_iterator;
+  typedef typename QP_solver_impl::
+  Bd_selector<Q, typename Tags::Is_nonnegative>::
+  L_iterator L_iterator;
+  typedef typename QP_solver_impl::
+  Bd_selector<Q, typename Tags::Is_nonnegative>::
+  U_iterator U_iterator;
+  typedef typename QP_solver_impl::
+  Bd_selector<Q, typename Tags::Is_nonnegative>::
+  FL_iterator FL_iterator;
+  typedef typename QP_solver_impl::
+  Bd_selector<Q, typename Tags::Is_nonnegative>::
+  FU_iterator FU_iterator;
+
+  // types from the Tags
+  typedef  typename Tags::Is_linear    Is_linear;
+  typedef  typename Tags::Is_nonnegative Is_nonnegative;
+
+  // friends
+  template <class Q_, class ET_>
+  friend bool has_linearly_independent_equations 
+  (const Q_& qp, const ET_& dummy);
+
+private: // private types
+
+  // types of original problem:
+  typedef  typename std::iterator_traits<A_iterator>::value_type  A_column;
+  typedef  typename std::iterator_traits<D_iterator>::value_type  D_row;
+  
+  typedef  typename std::iterator_traits<A_column  >::value_type  A_entry;
+  typedef  typename std::iterator_traits<B_iterator>::value_type  B_entry;
+  typedef  typename std::iterator_traits<C_iterator>::value_type  C_entry;
+  typedef  typename std::iterator_traits<D_row     >::value_type  D_entry;
+  typedef  typename std::iterator_traits<L_iterator>::value_type  L_entry;
+  typedef  typename std::iterator_traits<U_iterator>::value_type  U_entry;
+  
+  // slack columns:
+  //
+  // The following two types are used to (conceptually) add to the matrix A
+  // additional columns that model the constraints "x_s>=0" for the slack
+  // variables x_s.  Of course, we do not store the column (which is just
+  // plus/minus a unit vector), but maintain a pair (int,bool): the first
+  // entry says in which column the +-1 is and the second entry of the pair
+  // says whether it is +1 (false) or -1 (true).
+  typedef  std::pair<int,bool>        Slack_column;
+  typedef  std::vector<Slack_column>  A_slack;
+
+  // artificial columns
+  //
+  // Artificial columns that are (conceptually) added to the matrix A are
+  // handled exactly like slack columns (see above).
+  typedef  std::pair<int,bool>        Art_column;
+  typedef  std::vector<Art_column>    A_art;
+
+  // special artificial column:
+  //
+  // Also for the special artificial variable we (conceptually) add a column
+  // to A. This column contains only +-1's (but it may contain several nonzero
+  // entries).
+  typedef  std::vector<A_entry>       S_art;
+  
+  // auxiliary objective vector (i.e., the objective vector for phase I):
+  typedef  std::vector<C_entry>       C_aux;
+
+public: // export some additional types:
+  
+  typedef  typename Base::Indices     Indices; 
+  typedef  typename Base::Index_mutable_iterator   Index_iterator;
+  typedef  typename Base::Index_const_iterator     Index_const_iterator;
+ 
+  // For problems in nonstandard form we also export the following type, which
+  // for an original variable will say whether it sits at is lower, upper, at
+  // its lower and upper (fixed) bound, or at zero, or whether the variable is
+  // basic:
+  enum  Bound_index  { LOWER, ZERO, UPPER, FIXED, BASIC };
+
+private:
+  typedef  std::vector<Bound_index>    Bound_index_values;
+  typedef  typename Bound_index_values::iterator
+  Bound_index_value_iterator;
+  typedef  typename Bound_index_values::const_iterator
+  Bound_index_value_const_iterator;
+  
+  // values (variables' numerators):
+  typedef  std::vector<ET>            Values;
+  typedef  typename Values::iterator  Value_iterator;
+  typedef  typename Values::const_iterator
+  Value_const_iterator;
+    
+  // access values by basic index functor:
+  typedef  CGAL::Value_by_basic_index<Value_const_iterator>
+  Value_by_basic_index;
+
+  // access to original problem by basic variable/constraint index:
+  typedef  QP_vector_accessor<A_column, false, false >  A_by_index_accessor;
+  typedef  boost::transform_iterator
+  < A_by_index_accessor,Index_const_iterator >
+  A_by_index_iterator;
+
+  // todo kf: following can be removed once we have all these (outdated)
+  // accessors removed:
+  typedef  QP_vector_accessor< B_iterator, false, false >
+  B_by_index_accessor;
+  typedef  boost::transform_iterator
+  < B_by_index_accessor, Index_const_iterator >
+  B_by_index_iterator;
+
+  typedef  QP_vector_accessor< C_iterator, false, false >
+  C_by_index_accessor;
+  typedef  boost::transform_iterator
+  <C_by_index_accessor, Index_const_iterator >
+  C_by_index_iterator;
+
+  typedef  QP_matrix_accessor< A_iterator, false, true, false, false>
+  A_accessor;
+  typedef  boost::function1<typename A_accessor::result_type, int>
+  A_row_by_index_accessor;
+  typedef  boost::transform_iterator 
+  < A_row_by_index_accessor, Index_iterator >
+  A_row_by_index_iterator;
+
+  // Access to the matrix D sometimes converts to ET, and 
+  // sometimes retruns the original input type
+  typedef  QP_matrix_pairwise_accessor< D_iterator, ET >
+  D_pairwise_accessor;
+  typedef boost::transform_iterator 
+  < D_pairwise_accessor, Index_const_iterator>
+  D_pairwise_iterator;
+  typedef  QP_matrix_pairwise_accessor< D_iterator, D_entry >
+  D_pairwise_accessor_input_type;
+  typedef  boost::transform_iterator
+  < D_pairwise_accessor_input_type, Index_const_iterator >
+  D_pairwise_iterator_input_type;
+
+  // access to special artificial column by basic constraint index:
+  typedef  QP_vector_accessor< typename S_art::const_iterator, false, false>
+  S_by_index_accessor;
+  typedef  boost::transform_iterator
+  < S_by_index_accessor, Index_iterator >
+  S_by_index_iterator;
+  
+public:
+    
+  typedef  typename A_slack::const_iterator
+  A_slack_iterator;
+
+  typedef  typename A_art::const_iterator
+  A_artificial_iterator;
+    
+  typedef  typename C_aux::const_iterator
+  C_auxiliary_iterator;
+
+  typedef typename Base::Variable_numerator_iterator
+  Variable_numerator_iterator;
+
+  typedef  Index_const_iterator       Basic_variable_index_iterator;
+  typedef  Value_const_iterator       Basic_variable_numerator_iterator;
+  typedef  Index_const_iterator       Basic_constraint_index_iterator;
+        
+  typedef  QP_pricing_strategy<Q, ET, Tags>  Pricing_strategy;
+
+private:
+  // compile time tag for symbolic perturbation, should be moved into traits
+  // class when symbolic perturbation is to be implemented
+  Tag_false                is_perturbed;
+    
+  // some constants
+  const ET                 et0, et1, et2;
+
+  // verbose output streams
+  mutable Verbose_ostream  vout;      // used for any  diagnostic output
+  mutable Verbose_ostream  vout1;     // used for some diagnostic output
+  mutable Verbose_ostream  vout2;     // used for more diagnostic output
+  mutable Verbose_ostream  vout3;     // used for full diagnostic output
+  mutable Verbose_ostream  vout4;     // used for output of basis inverse
+  mutable Verbose_ostream  vout5;     // used for output of validity tests
+    
+  // pricing strategy
+  Pricing_strategy*        strategyP;
+
+  // given QP
+  int                      qp_n;      // number of variables
+  int                      qp_m;      // number of constraints
+    
+  // min x^T D x + c^T x + c0
+  A_iterator               qp_A;      // constraint matrix
+  B_iterator               qp_b;      // right-hand-side vector
+  C_iterator               qp_c;      // objective vector
+  C_entry                  qp_c0;     // constant term in objective function
+  // attention: qp_D represents *twice* the matrix D
+  D_iterator               qp_D;      // objective matrix
+  Row_type_iterator        qp_r;      // row-types of constraints
+  FL_iterator              qp_fl;     // lower bound finiteness vector
+  L_iterator               qp_l;      // lower bound vector
+  FU_iterator              qp_fu;     // upper bound finiteness vector
+  U_iterator               qp_u;      // upper bound vector
+
+  A_slack                  slack_A;   // slack part of constraint matrix
+
+  // auxiliary problem    
+  A_art                    art_A;     // artificial part of constraint matrix
+  // Note: in phase I there is an
+  // additional "fake" column attached
+  // to this "matrix", see init_basis()
+
+  S_art                    art_s;     // special artificial column for slacks
+  int                      art_s_i;   // art_s_i>=0  -> index of special
+  //                artificial column
+  // art_s_i==-1 -> no sp. art. col
+  // art_s_i==-2 -> sp. art. col removed
+  //                after it left basis 
+  int                      art_basic; // number of basic artificial variables
+  C_aux                    aux_c;     // objective function for phase I
+  // initially has the same size as A_art
+
+  Indices                  B_O;       // basis (original variables)
+  // Note: the size of B_O is always
+  // correct, i.e., equals the number of
+  // basic original variables, plus (in
+  // phase I) the number of basic
+  // artificial variables.
+
+  Indices                  B_S;       // basis (   slack variables)
+    
+  Indices                  C;         // basic constraints ( C = E+S_N )
+  // Note: the size of C is always
+  // correct, i.e., corresponds to the
+  // size of the (conceptual) set
+  // $E\cup S_N$.
+
+  Indices                  S_B;       // nonbasic constraints ( S_B '=' B_S)
+    
+  QP_basis_inverse<ET,Is_linear>
+  inv_M_B;   // inverse of basis matrix
+
+  const ET&                d;         // reference to `inv_M_B.denominator()'
+    
+  Values                   x_B_O;     // basic variables (original)
+  // Note: x_B_O is only enlarged,
+  // so its size need not be |B|.
+
+  Values                   x_B_S;     // basic variables (slack)
+  Values                   lambda;    // lambda (from KKT conditions)
+  Bound_index_values       x_O_v_i;   // bounds value index vector
+  // the following vectors are updated
+  // with each update in order to avoid
+  // evaluating a matrix vector
+  // multiplication
+  Values                   r_C;       // r_C = A_{C,N_O}x_{N_O}
+  // Note: r_C.size() == C.size().
+
+  Values                   r_S_B;     // r_S_B = A_{S_B,N_O}x_{N_O}
+
+  // The following to variables are initialized (if used at all) in
+  // transition().  They are not used in case Is_linear or
+  // Is_nonnegative is set to Tag_true.
+  Values                   r_B_O;     // r_B_O = 2D_{B_O,N_O}x_{N_O}
+  Values                   w;         // w = 2D_{O, N_O}x_{N_O}
+    
+  int                      m_phase;   // phase of the Simplex method
+  Quadratic_program_status                   m_status;  // status of last pivot step
+  int                      m_pivots;  // number of pivot steps
+    
+  bool                     is_phaseI; // flag indicating phase I
+  bool                     is_phaseII;// flag indicating phase II
+  bool                     is_RTS_transition; // flag indicating transition
+  // from Ratio Test Step1 to Ratio
+  // Test Step2                                           
+  const bool               is_LP;     // flag indicating a linear program
+  const bool               is_QP;     // flag indicating a quadratic program
+
+  // the following flag indicates whether the program is in equational form
+  // AND still has all its equations; this is given in phase I for any
+  // program in equational form, but it may change if redundant constraints
+  // get removed from the basis. If no_ineq == true, the program is treated
+  // in a more efficient manner, since in that case we need no bookkeeping 
+  // for basic constraints
+  bool                     no_ineq;   
+  bool                     has_ineq;  // !no_ineq
+
+  const bool               is_nonnegative; // standard form, from Tag
+
+  // additional variables
+  int                      l;         // minimum of 'qp_n+e+1' and 'qp_m'
+  // Note: this is an upper bound for
+  // the size of the reduced basis in
+  // phase I (in phase II, the reduced
+  // basis size can be arbitrarily
+  // large)
+    
+  int 		     e;         // number of equality constraints
+    
+  // Given a variable number i, in_B[i] is -1 iff x_i is not in the current
+  // basis.  If the number in_B[i] is >=0, it is the basis heading of x_i.
+  Indices                  in_B;      // variable   in basis, -1 if non-basic
+
+  // Given a number i in {0,...,qp_m-1} of a constraint, 
+  Indices                  in_C;      // constraint in basis, -1 if non-basic
+  // Note: in_C is only maintained if
+  // there are inequality constraints.
+
+  Values                   b_C;       // exact version of `qp_b'
+  // restricted to basic constraints C
+  Values                   minus_c_B; // exact version of `-qp_c'
+  // restricted to basic variables B_O
+  // Note: minus_c_B is only enlarged,
+  // so its size need not be |B|.
+
+  Values                   A_Cj;      // exact version of j-th column of A
+  // restricted to basic constraints C
+  Values                   two_D_Bj;  // exact version of twice the j-th
+  // column of D restricted to B_O
+  // Note: tmp_x_2 is only enlarged,
+  // so its size need not be |B|.
+    
+  int                      j;         // index of entering variable `x_j'
+    
+  int                      i;         // index of leaving variable `x_i'
+  ET                       x_i;       // numerator of leaving variable `x_i'
+  ET                       q_i;       // corresponding `q_i'
+  int                      direction; // indicates whether the current
+  // entering variable x_j is increased
+  // or decreased
+  Bound_index              ratio_test_bound_index;  // indicates for leaving
+  // original variables which bound
+  // was hit with upper bounding
+
+  ET                       mu;        //   numerator of `t_j'
+  ET                       nu;        // denominator of `t_j'
+    
+  Values                   q_lambda;  // length dependent on C
+  Values                   q_x_O;     // used in the ratio test & update
+  // Note: q_x_O is only enlarged,
+  // so its size need not be |B|.
+
+  Values                   q_x_S;     // 
+
+  Values                   tmp_l;     // temporary vector of size l
+  Values                   tmp_x;     // temporary vector of s. >= B_O.size()
+  // Note: tmp_x is only enlarged,
+  // so its size need not be |B|.
+
+  Values                   tmp_l_2;   // temporary vector of size l
+  Values                   tmp_x_2;   // temporary vector of s. >= B_O.size()
+  // Note: tmp_x_2 is only enlarged,
+  // so its size need not be |B|.
+  // Diagnostics
+  struct Diagnostics {
+    bool redundant_equations;
+  };
+    
+  Diagnostics              diagnostics;
+
+public:
+
+  /*
+   * Note: Some member functions below are suffixed with '_'.
+   * They are member templates and their declaration is "hidden",
+   * because they are also implemented in the class interface.
+   * This is a workaround for M$-VC++, which otherwise fails to
+   * instantiate them correctly.
+   */
+
+  // creation & initialization
+  // -------------------------
+  // creation
+  QP_solver(const Q& qp, 
+	    const Quadratic_program_options& options = 
+	    Quadratic_program_options());
+
+  virtual ~QP_solver()
+  {
+    if (strategyP != static_cast<Pricing_strategy*>(0))
+      delete strategyP;
+  }
+
+	      
+private:
+  // set-up of QP
+  void set( const Q& qp); 
+  void set_D (const Q& qp, Tag_true is_linear);
+  void set_D (const Q& qp, Tag_false is_linear);
+	         
+  // set-up of explicit bounds
+  void set_explicit_bounds(const Q& qp); 
+  void set_explicit_bounds(const Q& qp, Tag_true /*is_nonnegative*/); 
+  void set_explicit_bounds(const Q& qp, Tag_false /*is_nonnegative*/);
+
+  // initialization (of phase I)
+  void  init( );
+    
+  // initialization (of phase II)
+  /*
+    template < class InputIterator >
+    void  init( InputIterator  basic_variables_first,
+    InputIterator  basic_variables_beyond);
+  */
+    
+  // operations
+  // ----------
+  // pivot step
+  Quadratic_program_status  pivot( )
+  { CGAL_qpe_assertion( phase() > 0);
+  CGAL_qpe_assertion( phase() < 3);
+  pivot_step();
+  return status(); }
+
+  // solve QP
+  Quadratic_program_status  solve( )
+  { CGAL_qpe_assertion( phase() > 0);
+  while ( phase() < 3) { pivot_step(); }
+  return status(); }
+
+public:
+
+  // access
+  // ------
+  // access to QP
+  int  number_of_variables  ( ) const { return qp_n; }
+  int  number_of_constraints( ) const { return qp_m; }
+    
+  A_iterator  a_begin( ) const { return qp_A;      }
+  A_iterator  a_end  ( ) const { return qp_A+qp_n; }
+    
+  B_iterator  b_begin( ) const { return qp_b;      }
+  B_iterator  b_end  ( ) const { return qp_b+qp_m; }
+    
+  C_iterator  c_begin( ) const { return qp_c;      }
+  C_iterator  c_end  ( ) const { return qp_c+qp_n; }
+
+  C_entry     c_0    ( ) const { return qp_c0;}
+    
+  D_iterator  d_begin( ) const { return qp_D;      }
+  D_iterator  d_end  ( ) const { return qp_D+qp_n; }
+    
+  Row_type_iterator  row_type_begin( ) const { return qp_r;      }
+  Row_type_iterator  row_type_end  ( ) const { return qp_r+qp_m; }
+
+  // access to current status
+  int     phase     ( ) const { return m_phase;  }
+  Quadratic_program_status  status    ( ) const { return m_status; }
+  int     iterations( ) const { return m_pivots; }
+    
+  // access to common denominator
+  const ET& variables_common_denominator( ) const 
+  { 
+    CGAL_qpe_assertion (d > 0);
+    return d; 
+  }
+
+  // access to current solution
+  ET  solution_numerator( ) const;
+
+  // access to current solution
+  ET  solution_denominator( ) const { return et2*d*d; }
+    
+  // access to original variables
+  int  number_of_original_variables( ) const { return qp_n; }
+    
+  // access to slack variables
+  int  number_of_slack_variables( ) const { return static_cast<int>(slack_A.size()); }
+
+  // access to artificial variables
+  int  number_of_artificial_variables( ) const { return static_cast<int>(art_A.size()); }
+    
+  C_auxiliary_iterator
+  c_auxiliary_value_iterator_begin( ) const { return aux_c.begin(); }
+  C_auxiliary_iterator
+  c_auxiliary_value_iterator_end( ) const {return aux_c.end(); }
+
+  // access to basic variables
+  int  number_of_basic_variables( ) const { return static_cast<int>(B_O.size()+B_S.size()); }
+  int  number_of_basic_original_variables( ) const { return static_cast<int>(B_O.size()); }
+  int  number_of_basic_slack_variables( ) const { return static_cast<int>(B_S.size()); }
+
+  Basic_variable_index_iterator
+  basic_original_variable_indices_begin( ) const { return B_O.begin(); }
+  Basic_variable_index_iterator
+  basic_original_variable_indices_end  ( ) const { return B_O.end(); }
+    
+  Basic_variable_numerator_iterator
+  basic_original_variables_numerator_begin( ) const { return x_B_O.begin(); }
+  Basic_variable_numerator_iterator
+  basic_original_variables_numerator_end  ( ) const { return x_B_O.begin()
+							+ B_O.size(); }
+
+public: // only the pricing strategies (including user-defined ones
+        // need access to this) -- make them friends?
+
+  // access to working variables
+  int  number_of_working_variables( ) const { return static_cast<int>(in_B.size()); }
+  
+  bool is_basic( int j) const
+  { 
+    CGAL_qpe_assertion(j >= 0);
+    CGAL_qpe_assertion(j < number_of_working_variables());
+    return (in_B[ j] >= 0);
+  }
+  
+  bool is_original(int j) const
+  {
+    CGAL_qpe_assertion(j >= 0);
+    CGAL_qpe_assertion(j < number_of_working_variables());
+    return (j < qp_n);    
+  }
+    
+  bool phaseI( ) const {return is_phaseI;}
+  
+  bool is_artificial(int k) const;
+
+  int get_l() const;
+
+  // Returns w[j] for an original variable x_j.
+  ET w_j_numerator(int j) const
+  { 
+    CGAL_qpe_assertion((0 <= j) && (j < qp_n) && is_phaseII);
+    return w[j];
+  }
+  
+  Bound_index nonbasic_original_variable_bound_index(int i) const
+    // Returns on which bound the nonbasic variable x_i is currently
+    // sitting:
+    //
+    // - LOWER: the variable is sitting on its lower bound.
+    // - UPPER: the variable is sitting on its upper bound.
+    // - FIXED: the variable is sitting on its lower and upper bound.
+    // - ZERO: the variable has value zero and is sitting on its lower
+    //   bound, its upper bound, or betweeen the two bounds.
+    //
+    // Note: in the latter case you can call state_of_zero_nonbasic_variable()
+    // to find out which bound is active, if any.
+  {
+    CGAL_assertion(!check_tag(Is_nonnegative()) &&
+		   !is_basic(i) && i < qp_n);
+    if (x_O_v_i[i] == BASIC) {
+      CGAL_qpe_assertion(false);
+    }
+    return x_O_v_i[i];  
+  };
+  
+  int state_of_zero_nonbasic_variable(int i) const
+    // Returns -1 if the original variable x_i equals its lower bound,
+    // 0 if it lies strictly between its lower and upper bound, and 1 if
+    // it coincides with its upper bound.
+    // 
+    // See also the documentation of nonbasic_original_variable_bound_index()
+    // above.
+  {
+    CGAL_assertion(!check_tag(Is_nonnegative()) &&
+		   !is_basic(i) && i < qp_n && x_O_v_i[i] == ZERO);
+    if (*(qp_fl+i) && CGAL::is_zero(*(qp_l+i)))
+      return -1;
+    if (*(qp_fu+i) && CGAL::is_zero(*(qp_u+i)))
+      return 1;
+    return 0;
+  }
+  
+private:
+  // miscellaneous
+  // -------------
+  // setting the pricing strategy:
+  void  set_pricing_strategy ( Quadratic_program_pricing_strategy strategy);
+
+  // diagnostic output
+  void  set_verbosity( int verbose = 0, std::ostream& stream = std::cout);
+
+
+public:
+  // access to indices of basic constraints
+  int  number_of_basic_constraints( ) const { return static_cast<int>(C.size()); }
+
+  Basic_constraint_index_iterator
+  basic_constraint_indices_begin( ) const { return C.begin(); }
+  Basic_constraint_index_iterator
+  basic_constraint_indices_end  ( ) const { return C.end(); }
+
+  // helper functions
+  template < class RndAccIt1, class RndAccIt2, class NT >  
+  NT  mu_j_( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& dd) const;
+
+  ET  dual_variable( int i)
+  {
+    for ( int j = 0; j < qp_m; ++j) {
+      tmp_x[ j] = inv_M_B.entry( j, i);
+    }
+    return std::inner_product( tmp_x.begin(), tmp_x.begin()+qp_m,
+			       minus_c_B.begin(), et0);
+  }
+
+public:
+  // public access to compressed lambda (used in filtered base)
+  Value_const_iterator get_lambda_begin() const
+  {
+    return lambda.begin();
+  }
+  Value_const_iterator get_lambda_end() const
+  {
+    return lambda.begin() + C.size();
+  }
+  
+
+private:    
+
+  // private member functions
+  // ------------------------
+  // initialization
+  void  init_basis( );
+  void  init_basis__slack_variables( int s_i, Tag_true  has_no_inequalities);
+  void  init_basis__slack_variables( int s_i, Tag_false has_no_inequalities);
+  void  init_basis__slack_variables( int s_i, bool has_no_inequalities) {
+    if (has_no_inequalities)
+      init_basis__slack_variables (s_i, Tag_true());
+    else 
+      init_basis__slack_variables (s_i, Tag_false());
+  }
+
+  void  init_basis__constraints    ( int s_i, Tag_true  has_no_inequalities);
+  void  init_basis__constraints    ( int s_i, Tag_false has_no_inequalities);
+  void  init_basis__constraints    ( int s_i, bool has_no_inequalities) {
+    if (has_no_inequalities)
+      init_basis__constraints (s_i, Tag_true());
+    else 
+      init_basis__constraints (s_i, Tag_false());
+  }
+
+  void  init_x_O_v_i();
+  void  init_r_C(Tag_true  /*is_nonnegative*/);
+  void  init_r_C(Tag_false /*is_nonnegative*/);
+  void  init_r_S_B(Tag_true  /*is_nonnegative*/);
+  void  init_r_S_B(Tag_false /*is_nonnegative*/);
+
+  void  init_r_B_O();
+  void  init_w();
+
+
+  void  init_solution( );
+  void  init_solution__b_C( Tag_true  has_no_inequalities);
+  void  init_solution__b_C( Tag_false has_no_inequalities); 
+  void  init_solution__b_C( bool has_no_inequalities) {
+    if (has_no_inequalities)
+      init_solution__b_C (Tag_true());
+    else
+      init_solution__b_C (Tag_false());
+  }
+
+  void  init_additional_data_members( );
+    
+  // function needed for set up of auxiliary problem for symbolic perturbation
+  int  signed_leading_exponent( int row);
+  // This is a variant of set_up_auxiliary_problem for symbolic perturbation
+  // for the perturbed case
+  void  set_up_auxiliary_problemI( Tag_true is_perturbed);
+
+  void  set_up_auxiliary_problem();
+
+  // transition (to phase II)
+  void  transition( );
+  void  transition( Tag_true  is_linear);
+  void  transition( Tag_false is_linear);
+    
+  // pivot step
+  void  pivot_step( );
+
+  // pricing
+  void  pricing( );
+
+  template < class NT, class It >
+  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
+			    Tag_true  has_no_inequalities) const;
+  template < class NT, class It >
+  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
+			    Tag_false has_no_inequalities) const;
+  template < class NT, class It >
+  void  mu_j__linear_part_( NT& mu_j, int j, It lambda_it,
+			    bool has_no_inequalities) const {
+    if (has_no_inequalities)
+      mu_j__linear_part_ (mu_j, j, lambda_it, Tag_true());
+    else
+      mu_j__linear_part_ (mu_j, j, lambda_it, Tag_false());
+  }
+
+
+//   template < class NT, class It >
+//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
+// 			       Tag_true  is_linear) const;
+//   template < class NT, class It >
+//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
+// 			       Tag_false is_linear) const;
+//   template < class NT, class It >
+//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
+// 			       Tag_false is_linear,
+// 			       Tag_true  is_symmetric) const;
+//   template < class NT, class It >
+//   void  mu_j__quadratic_part_( NT& mu_j, int j, It x_it,
+// 			       Tag_false is_linear,
+// 			       Tag_false is_symmetric) const;
+
+  template < class NT, class It >
+  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it, 
+				    const NT& dd,
+				    Tag_true  has_no_inequalities) const;
+  template < class NT, class It >
+  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it, 
+				    const NT& dd,
+				    Tag_false has_no_inequalities) const;
+
+  template < class NT, class It >
+  void  mu_j__slack_or_artificial_( NT& mu_j, int j, It lambda_it,
+				    const NT& dd,
+				    bool has_no_inequalities) const {
+    if (has_no_inequalities)
+      mu_j__slack_or_artificial_ (mu_j, j, lambda_it, dd, Tag_true());
+    else
+      mu_j__slack_or_artificial_ (mu_j, j, lambda_it, dd, Tag_false());
+  }
+
+  // ratio test
+  void  ratio_test_init( );
+  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
+			       Tag_true  has_no_inequalities);
+  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
+			       Tag_false has_no_inequalities);
+  void  ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j,
+			       bool has_no_inequalities) {
+    if (has_no_inequalities) 
+      ratio_test_init__A_Cj (A_Cj_it, j, Tag_true());
+    else
+      ratio_test_init__A_Cj (A_Cj_it, j, Tag_false());
+  }
+
+  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
+				 Tag_true  is_linear);
+  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
+				 Tag_false is_linear);
+  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
+				 Tag_false is_linear,
+				 Tag_true  has_no_inequalities);
+  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
+				 Tag_false is_linear,
+				 Tag_false has_no_inequalities);
+  void  ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j,
+				 Tag_false is_linear,
+				 bool has_no_inequalities) {
+    if (has_no_inequalities)
+      ratio_test_init__2_D_Bj( two_D_Bj_it, j, is_linear, Tag_true());
+    else
+      ratio_test_init__2_D_Bj( two_D_Bj_it, j, is_linear, Tag_false());
+  }
+
+
+  void  ratio_test_1( );
+  void  ratio_test_1__q_x_O( Tag_true  is_linear);
+  void  ratio_test_1__q_x_O( Tag_false is_linear);
+  void  ratio_test_1__q_x_S( Tag_true  has_no_inequalities);
+  void  ratio_test_1__q_x_S( Tag_false has_no_inequalities);
+  void  ratio_test_1__q_x_S( bool has_no_inequalities) {
+    if (has_no_inequalities)
+      ratio_test_1__q_x_S (Tag_true());
+    else
+      ratio_test_1__q_x_S (Tag_false());
+  }
+
+  void  ratio_test_1__t_min_j(Tag_true  /*is_nonnegative*/);  
+  void  ratio_test_1__t_min_j(Tag_false /*is_nonnegative*/);
+    
+  void  ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
+			   Value_iterator x_it, Value_iterator   q_it,
+			   Tag_true  no_check);
+  void  ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
+			   Value_iterator x_it, Value_iterator   q_it,
+			   Tag_false  no_check);
+    
+  // replaces the above two functions
+  void  ratio_test_1__t_min_B(Tag_true has_no_inequalities );
+  void  ratio_test_1__t_min_B(Tag_false has_no_inequalities ); 
+  void  ratio_test_1__t_min_B(bool has_no_inequalities ) {
+    if (has_no_inequalities)
+      ratio_test_1__t_min_B (Tag_true());
+    else
+      ratio_test_1__t_min_B (Tag_false());
+  }
+   
+  void  ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
+			      Value_iterator x_it, Value_iterator q_it,
+			      Tag_true  /*is_nonnegative*/);
+  void  ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
+			      Value_iterator x_it, Value_iterator q_it,
+			      Tag_false /*is_nonnegative*/);
+  void  ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
+			      Value_iterator x_it, Value_iterator q_it,
+			      Tag_true  /*is_nonnegative*/);
+  void  ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
+			      Value_iterator x_it, Value_iterator q_it,
+			      Tag_false /*is_nonnegative*/);
+			     
+  void  test_implicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+				     int& i_min, ET& d_min, ET& q_min);
+  void  test_implicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+				     int& i_min, ET& d_min, ET& q_min);
+  void  test_explicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+				     int& i_min, ET& d_min, ET& q_min);
+  void  test_explicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+				     int& i_min, ET& d_min, ET& q_min);
+  void  test_mixed_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+				  int& i_min, ET& d_min, ET& q_min);
+  void  test_mixed_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+				  int& i_min, ET& d_min, ET& q_min);    
+                                    
+  void  ratio_test_1__t_j( Tag_true  is_linear);
+  void  ratio_test_1__t_j( Tag_false is_linear);
+
+  void  ratio_test_2( Tag_true  is_linear);
+  void  ratio_test_2( Tag_false is_linear);
+  void  ratio_test_2__p( Tag_true  has_no_inequalities);
+  void  ratio_test_2__p( Tag_false has_no_inequalities);   
+  void  ratio_test_2__p( bool has_no_inequalities) {
+    if (has_no_inequalities)
+      ratio_test_2__p (Tag_true());
+    else
+      ratio_test_2__p (Tag_false());
+  }
+
+  // update
+  void  update_1( );
+  void  update_1( Tag_true  is_linear);
+  void  update_1( Tag_false is_linear);
+
+  void  update_2( Tag_true  is_linear);
+  void  update_2( Tag_false is_linear);
+
+  void  replace_variable( );
+  void  replace_variable( Tag_true  has_no_inequalities);
+  void  replace_variable( Tag_false has_no_inequalities);
+  void  replace_variable( bool has_no_inequalities) {
+    if (has_no_inequalities)
+      replace_variable (Tag_true());
+    else
+      replace_variable (Tag_false());
+  }
+
+  void  replace_variable_original_original( );
+  // update of the vector r
+  void  replace_variable_original_original_upd_r(Tag_true
+						 /*is_nonnegative*/);
+  void  replace_variable_original_original_upd_r(Tag_false
+						 /*is_nonnegative*/);
+
+  void  replace_variable_original_slack( );
+  // update of the vector r
+  void  replace_variable_original_slack_upd_r(Tag_true /*is_nonnegative*/);
+  void  replace_variable_original_slack_upd_r(Tag_false /*is_nonnegative*/);
+
+  void  replace_variable_slack_original( );
+  // update of the vector r
+  void  replace_variable_slack_original_upd_r(Tag_true /*is_nonnegative*/);
+  void  replace_variable_slack_original_upd_r(Tag_false /*is_nonnegative*/);
+    
+  void  replace_variable_slack_slack( );
+  // update of the vector r
+  void  replace_variable_slack_slack_upd_r(Tag_true /*is_nonnegative*/);
+  void  replace_variable_slack_slack_upd_r(Tag_false /*is_nonnegative*/);
+    
+  void  remove_artificial_variable_and_constraint( );
+  // update of the vector r
+  void  remove_artificial_variable_and_constraint_upd_r(Tag_true
+							/*is_nonnegative*/);
+  void  remove_artificial_variable_and_constraint_upd_r(Tag_false
+							/*is_nonnegative*/);    
+    
+  void  expel_artificial_variables_from_basis( );
+    
+  // update that occurs only with upper bounding in ratio test step 1
+  void  enter_and_leave_variable( );
+
+  void  enter_variable( );
+  // update of the vectors w and r
+  void  enter_variable_original_upd_w_r(Tag_true /*is_nonnegative*/);
+  void  enter_variable_original_upd_w_r(Tag_false /*is_nonnegative*/);
+  void  enter_variable_slack_upd_w_r(Tag_true /*is_nonnegative*/);
+  void  enter_variable_slack_upd_w_r(Tag_false /*is_nonnegative*/);
+    
+  void  leave_variable( );
+  // update of the vectors w and r
+  void  leave_variable_original_upd_w_r(Tag_true /*is_nonnegative*/);    
+  void  leave_variable_original_upd_w_r(Tag_false /*is_nonnegative*/);
+  void  leave_variable_slack_upd_w_r(Tag_true /*is_nonnegative*/);
+  void  leave_variable_slack_upd_w_r(Tag_false /*is_nonnegative*/);
+    
+  void  z_replace_variable( );
+  void  z_replace_variable( Tag_true has_no_inequalities);
+  void  z_replace_variable( Tag_false has_no_inequalities);
+  void  z_replace_variable( bool has_no_inequalities) {
+    if (has_no_inequalities) 
+      z_replace_variable (Tag_true());
+    else
+      z_replace_variable (Tag_false());
+  }
+    
+  void  z_replace_variable_original_by_original( );
+  // update of the vectors w and r
+  void  z_replace_variable_original_by_original_upd_w_r(Tag_true 
+							/*is_nonnegative*/);
+  void  z_replace_variable_original_by_original_upd_w_r(Tag_false 
+							/*is_nonnegative*/);
+    
+  void  z_replace_variable_original_by_slack( );
+  // update of the vectors w and r    
+  void  z_replace_variable_original_by_slack_upd_w_r(Tag_true 
+						     /*is_nonnegative*/);
+  void  z_replace_variable_original_by_slack_upd_w_r(Tag_false
+						     /*is_nonnegative*/);
+    
+  void  z_replace_variable_slack_by_original( );
+  // update of the vectors w and r
+  void  z_replace_variable_slack_by_original_upd_w_r(Tag_true
+						     /*is_nonnegative*/);
+  void  z_replace_variable_slack_by_original_upd_w_r(Tag_false
+						     /*is_nonnegative*/);
+    
+  void  z_replace_variable_slack_by_slack( );
+  // update of the vectors w and r
+  void  z_replace_variable_slack_by_slack_upd_w_r(Tag_true
+						  /*is_nonnegative*/);
+  void  z_replace_variable_slack_by_slack_upd_w_r(Tag_false
+						  /*is_nonnegative*/);
+    
+  // update of the parts r_C and r_S_B
+  void  update_r_C_r_S_B__j(ET& x_j);
+  void  update_r_C_r_S_B__j_i(ET& x_j, ET& x_i);
+  void  update_r_C_r_S_B__i(ET& x_i);
+    
+  // update of w and r_B_O 
+  void  update_w_r_B_O__j(ET& x_j);
+  void  update_w_r_B_O__j_i(ET& x_j, ET& x_i);
+  void  update_w_r_B_O__i(ET& x_i);
+    
+    
+  bool  basis_matrix_stays_regular( );
+
+  // current solution
+  void  compute_solution(Tag_true  /*is_nonnegative*/);
+  void  compute_solution(Tag_false /*is_nonnegative*/);
+
+  void  compute__x_B_S( Tag_false  has_no_inequalities,
+			Tag_false /*is_nonnegative*/);
+  void  compute__x_B_S( Tag_false  has_no_inequalities,
+			Tag_true  /*is_nonnegative*/);
+  void  compute__x_B_S( Tag_true  has_no_inequalities,
+			Tag_false /*is_nonnegative*/);
+  void  compute__x_B_S( Tag_true  has_no_inequalities,
+			Tag_true  /*is_nonnegative*/);
+  void  compute__x_B_S( bool  has_no_inequalities,
+			Tag_true  is_nonnegative) {
+    if (has_no_inequalities)
+      compute__x_B_S (Tag_true(), is_nonnegative);
+    else
+      compute__x_B_S (Tag_false(), is_nonnegative);
+  }
+    
+  void  compute__x_B_S( bool  has_no_inequalities,
+			Tag_false  is_nonnegative) {
+    if (has_no_inequalities)
+      compute__x_B_S (Tag_true(), is_nonnegative);
+    else
+      compute__x_B_S (Tag_false(), is_nonnegative);
+  }  
+
+  void  multiply__A_S_BxB_O( Value_iterator in, Value_iterator out) const;
+    
+  ET    multiply__A_ixO(int row) const;
+  void  multiply__A_CxN_O(Value_iterator out) const;
+  bool  check_r_C(Tag_true  /*is_nonnegative*/) const;
+  bool  check_r_C(Tag_false /*is_nonnegative*/) const;
+    
+  void  multiply__A_S_BxN_O(Value_iterator out) const;
+  bool  check_r_S_B(Tag_true  /*is_nonnegative*/) const;
+  bool  check_r_S_B(Tag_false /*is_nonnegative*/) const;
+    
+  void  multiply__2D_B_OxN_O(Value_iterator out) const;
+  bool  check_r_B_O(Tag_true  /*is_nonnegative*/) const;
+  bool  check_r_B_O(Tag_false /*is_nonnegative*/) const;
+        
+  void  multiply__2D_OxN_O(Value_iterator out) const;
+  bool  check_w(Tag_true  /*is_nonnegative*/) const;
+  bool  check_w(Tag_false /*is_nonnegative*/) const;
+    
+  // utility routines for QP's in nonstandard form:
+  ET original_variable_value_under_bounds(int i) const;
+  ET nonbasic_original_variable_value (int i) const;
+
+public: 
+  // for original variables
+  ET variable_numerator_value(int i) const;
+  ET unbounded_direction_value(int i) const;
+  ET lambda_numerator(int i) const
+  {
+    // we use the vector lambda which conforms to C (basic constraints)
+    CGAL_qpe_assertion (i >= 0);
+    CGAL_qpe_assertion (i <= qp_m);
+    if (no_ineq)
+      return lambda[i];
+    else {
+      int k = in_C[i];     // position of i in C
+      if (k != -1) 
+	return lambda[k];
+      else 
+	return et0;
+    }   
+}
+
+private:
+  // check basis inverse
+  bool  check_basis_inverse( );
+  bool  check_basis_inverse( Tag_true  is_linear);
+  bool  check_basis_inverse( Tag_false is_linear);
+
+  // diagnostic output
+  void  print_program ( ) const;
+  void  print_basis   ( ) const;
+  void  print_solution( ) const;
+  void  print_ratio_1_original(int k, const ET& x_k, const ET& q_k);
+  void  print_ratio_1_slack(int k, const ET& x_k, const ET& q_k);
+
+  const char*  variable_type( int k) const;
+    
+  // ensure container size
+  template <class Container>
+  void ensure_size(Container& c, typename Container::size_type desired_size) {
+    typedef typename Container::value_type Value_type;
+    for (typename Container::size_type i=c.size(); i < desired_size; ++i) {
+      c.push_back(Value_type());
+    }
+  }
+    
+private:
+
+private:  // (inefficient) access to bounds of variables:
+  // Given an index of an original or slack variable, returns whether
+  // or not the variable has a finite lower bound.
+  bool has_finite_lower_bound(int i) const;
+
+  // Given an index of an original or slack variable, returns whether
+  // or not the variable has a finite upper bound.
+  bool has_finite_upper_bound(int i) const;
+
+  // Given an index of an original or slack variable, returns its
+  // lower bound.
+  ET lower_bound(int i) const;
+
+  // Given an index of an original variable, returns its upper bound.
+  ET upper_bound(int i) const;
+
+  struct Bnd { // (inefficient) utility class representing a possibly
+    // infinite bound
+    enum Kind { MINUS_INF=-1, FINITE=0, PLUS_INF=1 };
+    const Kind kind;      // whether the bound is finite or not
+    const ET value;       // bound's value in case it is finite
+
+    Bnd(bool is_upper, bool is_finite, const ET& value) 
+      : kind(is_upper? (is_finite? FINITE : PLUS_INF) :
+	     (is_finite? FINITE : MINUS_INF)),
+	value(value) {}
+    Bnd(Kind kind, const ET& value) : kind(kind), value(value) {}
+    
+    bool operator==(const ET& v) const { return kind == FINITE && value == v; }
+    bool operator==(const Bnd& b) const {
+      return kind == b.kind && (kind != FINITE || value == b.value);
+    }
+    bool operator!=(const Bnd& b) const { return !(*this == b); }
+    bool operator<(const ET& v) const { return kind == FINITE && value < v; }
+    bool operator<(const Bnd& b) const {
+      return kind < b.kind ||
+	(kind == b.kind && kind == FINITE && value < b.value);
+    }
+    bool operator<=(const Bnd& b) const { return *this < b || *this == b; }
+    bool operator>(const ET& v) const { return kind == FINITE && value > v; }
+    bool operator>(const Bnd& b)  const { return !(*this <= b); }
+    bool operator>=(const Bnd& b) const { return !(*this < b); }
+    
+    Bnd operator*(const ET& f) const { return Bnd(kind, value*f); }
+  };
+
+  // Given an index of an original, slack, or artificial variable,
+  // return its lower bound.
+  Bnd lower_bnd(int i) const;
+
+  // Given an index of an original, slack, or artificial variable,
+  // return its upper bound.
+  Bnd upper_bnd(int i) const;
+
+private:
+  bool is_value_correct() const;
+  // ----------------------------------------------------------------------------
+
+  // ===============================
+  // class implementation (template)
+  // ===============================
+
+public:
+
+  // pricing
+  // -------
+  // The solver provides three methods to compute mu_j; the first
+  // two below take additional information (which the pricing
+  // strategy either provides in exact- or NT-form), and the third
+  // simply does the exact computation. (Note: internally, we use
+  // the third version, too, see ratio_test_1__t_j().)
+
+  // computation of mu_j with standard form
+  template < class RndAccIt1, class RndAccIt2, class NT >  
+  NT
+  mu_j( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& dd) const
+  {
+    NT  mu_j;
+
+    if ( j < qp_n) {                                // original variable
+
+      // [c_j +] A_Cj^T * lambda_C
+      mu_j = ( is_phaseI ? NT( 0) : dd * NT(*(qp_c+ j)));
+      mu_j__linear_part( mu_j, j, lambda_it, no_ineq);
+
+      // ... + 2 D_Bj^T * x_B
+      mu_j__quadratic_part( mu_j, j, x_it, Is_linear());
+
+    } else {                                        // slack or artificial
+
+      mu_j__slack_or_artificial( mu_j, j, lambda_it, dd,
+				 no_ineq);
+
+    }
+
+    return mu_j;
+  }
+    
+  // computation of mu_j with upper bounding
+  template < class RndAccIt1, class RndAccIt2, class NT >  
+  NT
+  mu_j( int j, RndAccIt1 lambda_it, RndAccIt2 x_it, const NT& w_j,
+	const NT& dd) const
+  {
+    NT  mu_j;
+
+    if ( j < qp_n) {                                // original variable
+
+      // [c_j +] A_Cj^T * lambda_C
+      mu_j = ( is_phaseI ? NT( 0) : dd * NT(*(qp_c+ j)));
+      mu_j__linear_part( mu_j, j, lambda_it, no_ineq);
+
+      // ... + 2 D_Bj^T * x_B + 2 D_Nj x_N
+      mu_j__quadratic_part( mu_j, j, x_it, w_j, dd, Is_linear());
+
+    } else {                                        // slack or artificial
+
+      mu_j__slack_or_artificial( mu_j, j, lambda_it, dd,
+				 no_ineq);
+
+    }
+
+    return mu_j;
+  }
+
+  // computation of mu_j (exact, both for upper bounding and standard form)
+  ET
+  mu_j( int j) const
+  {
+    CGAL_qpe_assertion(!is_basic(j));
+    
+    if (!check_tag(Is_nonnegative()) &&
+	!check_tag(Is_linear()) &&
+	!is_phaseI && is_original(j)) {
+      return mu_j(j,
+		  lambda.begin(),
+		  basic_original_variables_numerator_begin(),
+		  w_j_numerator(j),
+		  variables_common_denominator());
+    } else {
+      return mu_j(j,
+		  lambda.begin(),
+		  basic_original_variables_numerator_begin(),
+		  variables_common_denominator());
+    }
+  }
+
+private:
+
+  // pricing (private helper functions)
+  // ----------------------------------
+  template < class NT, class It > inline                      // no ineq.
+  void
+  mu_j__linear_part( NT& mu_j, int j, It lambda_it, Tag_true) const
+  {
+    mu_j += inv_M_B.inner_product_l( lambda_it, *(qp_A+ j));
+  }
+
+  template < class NT, class It > inline                      // has ineq.
+  void
+  mu_j__linear_part( NT& mu_j, int j, It lambda_it, Tag_false) const
+  {
+    mu_j += inv_M_B.inner_product_l
+      ( lambda_it,
+	A_by_index_iterator( C.begin(),
+			     A_by_index_accessor( *(qp_A + j))));
+  }
+
+  template < class NT, class It > inline                     
+  void
+  mu_j__linear_part( NT& mu_j, int j, It lambda_it, 
+		     bool has_no_inequalities) const {
+    if (has_no_inequalities) 
+      mu_j__linear_part (mu_j, j, lambda_it, Tag_true());
+    else
+      mu_j__linear_part (mu_j, j, lambda_it, Tag_false());     
+  }
+
+  template < class NT, class It > inline          // LP case, standard form
+  void
+  mu_j__quadratic_part( NT&, int, It, Tag_true) const
+  {
+    // nop
+  }
+    
+  template < class NT, class It > inline          // LP case, upper bounded
+  void
+  mu_j__quadratic_part( NT&, int, It, const NT& /*w_j*/, const NT& /*dd*/,
+			Tag_true) const
+  {
+    // nop
+  }    
+
+  template < class NT, class It > inline          // QP case, standard form
+  void
+  mu_j__quadratic_part( NT& mu_j, int j, It x_it, Tag_false) const
+  {
+    if ( is_phaseII) {
+      // 2 D_Bj^T * x_B
+      mu_j += inv_M_B.inner_product_x
+	( x_it,
+	  D_pairwise_iterator_input_type( B_O.begin(),
+			       D_pairwise_accessor_input_type(qp_D, j)));
+    }
+  }
+
+  template < class NT, class It > inline          // QP case, upper bounded
+  void
+  mu_j__quadratic_part( NT& mu_j, int j, It x_it, const NT& w_j,
+			const NT& dd, Tag_false) const
+  {
+    if ( is_phaseII) {
+      mu_j += dd * w_j;
+      // 2 D_Bj^T * x_B
+      mu_j += inv_M_B.inner_product_x
+	( x_it,
+	  D_pairwise_iterator_input_type( B_O.begin(),
+			       D_pairwise_accessor_input_type(qp_D, j)));
+    }
+  }
+
+
+  template < class NT, class It >  inline                     // no ineq.
+  void
+  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, const NT& dd, Tag_true) const
+  {
+    j -= qp_n;
+    // artificial variable
+    // A_j^T * lambda
+    mu_j = lambda_it[ j];
+    if ( art_A[ j].second) mu_j = -mu_j;
+
+    // c_j + ...
+    mu_j += dd*NT(aux_c[ j]);
+
+  }
+
+  template < class NT, class It >  inline                     // has ineq.
+  void
+  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, const NT& dd, Tag_false) const
+  {
+    j -= qp_n;
+
+    if ( j < static_cast<int>(slack_A.size())) {                 // slack variable
+
+      // A_Cj^T * lambda_C
+      mu_j = lambda_it[ in_C[ slack_A[ j].first]];
+      if ( slack_A[ j].second) mu_j = -mu_j;
+
+    } else {                                        // artificial variable
+      j -= static_cast<int>(slack_A.size());
+
+      // A_Cj^T * lambda_C
+      mu_j = lambda_it[ in_C[ art_A[ j].first]];
+      if ( art_A[ j].second) mu_j = -mu_j;
+
+      // c_j + ...
+      mu_j += dd*NT(aux_c[ j]);
+    }
+  }
+
+  template < class NT, class It >  inline
+  void
+  mu_j__slack_or_artificial( NT& mu_j, int j, It lambda_it, 
+			     const NT& dd, bool has_no_inequalities) const {
+    if (has_no_inequalities)
+      mu_j__slack_or_artificial (mu_j, j, lambda_it, dd, Tag_true());
+    else
+      mu_j__slack_or_artificial (mu_j, j, lambda_it, dd, Tag_false());
+  }
+
+  
+  
+};
+
+// ----------------------------------------------------------------------------
+
+// =============================
+// class implementation (inline)
+// =============================
+
+// initialization
+// --------------
+
+// transition
+// ----------
+template < class Q, typename ET, typename Tags >  inline                                 // QP case
+void  QP_solver<Q, ET, Tags>::
+transition( Tag_false)
+{
+  typedef  Creator_2< D_iterator, int, 
+    D_pairwise_accessor >  D_transition_creator_accessor;
+
+  typedef  Creator_2< Index_iterator, D_pairwise_accessor,
+    D_pairwise_iterator >  D_transition_creator_iterator;
+
+  // initialization of vector w and vector r_B_O:
+  if (!check_tag(Is_nonnegative())) {
+    init_w();                      
+    init_r_B_O();
+  }
+
+  // here is what we need in the transition: an iterator that steps through 
+  // the basic indices, where dereferencing
+  // yields an iterator through the corresponding row of D, restricted 
+  // to the basic indices. This means that we select the principal minor of D 
+  // corresponding to the current basis.
+ 
+  // To realize this, we transform B_O.begin() via the function h where
+  //   h(i) = D_pairwise_iterator
+  //           (B_O.begin(), 
+  //            D_pairwise_accessor(qp_D, i))
+
+
+  inv_M_B.transition 
+    (boost::make_transform_iterator 
+     (B_O.begin(),
+      boost::bind 
+      (D_transition_creator_iterator(), B_O.begin(), 
+       boost::bind (D_transition_creator_accessor(), qp_D, _1))));
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+transition( Tag_true)
+{
+  inv_M_B.transition();
+}
+
+// ratio test
+// ----------
+template < typename Q, typename ET, typename Tags > inline                                  // LP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__2_D_Bj( Value_iterator, int, Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags > inline                                  // QP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false)
+{
+  if ( is_phaseII) {
+    ratio_test_init__2_D_Bj( two_D_Bj_it, j_,
+			     Tag_false(), no_ineq);
+  }
+}
+
+template < typename Q, typename ET, typename Tags > inline                                  // QP, no ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false,
+			 Tag_true )
+{
+  // store exact version of `2 D_{B_O,j}'
+  D_pairwise_accessor  d_accessor( qp_D, j_);
+  std::copy( D_pairwise_iterator( B_O.begin(), d_accessor),
+	     D_pairwise_iterator( B_O.end  (), d_accessor),
+	     two_D_Bj_it);
+}
+
+template < typename Q, typename ET, typename Tags > inline                                  // QP, has ineq
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__2_D_Bj( Value_iterator two_D_Bj_it, int j_, Tag_false,
+			 Tag_false)
+{
+  // store exact version of `2 D_{B_O,j}'
+  if ( j_ < qp_n) {                               // original variable
+    ratio_test_init__2_D_Bj( two_D_Bj_it, j_, Tag_false(), Tag_true());
+  } else {                                        // slack variable
+    std::fill_n( two_D_Bj_it, B_O.size(), et0);
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__q_x_O( Tag_true)
+{
+  inv_M_B.multiply_x( A_Cj.begin(), q_x_O.begin());
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // QP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__q_x_O( Tag_false)
+{
+  if ( is_phaseI) {                                   // phase I
+    inv_M_B.multiply_x(     A_Cj.begin(),    q_x_O.begin());
+  } else {                                            // phase II
+    inv_M_B.multiply  (     A_Cj.begin(), two_D_Bj.begin(),
+			    q_lambda.begin(),    q_x_O.begin());
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__q_x_S( Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__q_x_S( Tag_false)
+{
+  // A_S_BxB_O * q_x_O
+  multiply__A_S_BxB_O( q_x_O.begin(), q_x_S.begin());
+
+  // ( A_S_BxB_O * q_x_O) - A_S_Bxj
+  if ( j < qp_n) {
+    std::transform( q_x_S.begin(),
+		    q_x_S.begin()+S_B.size(),
+		    A_by_index_iterator( S_B.begin(),
+					 A_by_index_accessor( *(qp_A + j))),
+		    q_x_S.begin(),
+		    compose2_2( std::minus<ET>(),
+				Identity<ET>(),
+				boost::bind1st( std::multiplies<ET>(), d)));
+  }
+
+  // q_x_S = -+ ( A_S_BxB_O * q_x_O - A_S_Bxj)
+  Value_iterator  q_it = q_x_S.begin();
+  Index_iterator  i_it;
+  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++q_it) {
+    if ( ! slack_A[ *i_it - qp_n].second) *q_it = -(*q_it);
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // no check
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_i( Index_iterator, Index_iterator,
+		   Value_iterator, Value_iterator, Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // check
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_i( Index_iterator i_it, Index_iterator end_it,
+		   Value_iterator x_it, Value_iterator   q_it, Tag_false)
+{
+  // check `t_i's
+  for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it) {
+    // BLAND rule: In case the ratios are the same, only update if the new index
+    // is smaller. The special artificial variable is always made to leave first.
+    if ( (*q_it > et0) && (
+                           (( *x_it * q_i) < ( x_i * *q_it)) ||
+                           ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
+                           )
+        ) {
+      i = *i_it; x_i = *x_it; q_i = *q_it;
+    }
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_j( Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // QP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_j( Tag_false)
+{
+  if ( is_phaseII) {
+
+    // compute `nu' and `mu_j' 
+    mu = mu_j(j);
+    nu = inv_M_B.inner_product(     A_Cj.begin(), two_D_Bj.begin(),
+				    q_lambda.begin(),    q_x_O.begin());
+    if ( j < qp_n) {                                // original variable
+      nu -= d*ET( (*(qp_D + j))[ j]);
+    }
+    CGAL_qpe_assertion_msg(nu <= et0,
+			   "nu <= et0 violated -- is your D matrix positive semidefinite?");
+
+    // check `t_j'
+    CGAL_qpe_assertion(mu != et0);
+    // bg: formula below compares abs values, assuming mu < 0
+    if ( ( nu < et0) && ( ( (mu < et0 ? mu : -mu) * q_i) > ( x_i * nu))) {
+      i = -1; q_i = et1;
+    }
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+ratio_test_2( Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_2__p( Tag_true)
+{
+  // get column index of entering variable in basis
+  int  col = in_B[ j];
+ 
+  CGAL_qpe_assertion( col >= 0);
+  col += l;
+
+  // get (last) column of `M_B^{-1}' (Note: `p_...' is stored in `q_...')
+  Value_iterator  it;
+  int             row;
+  unsigned int    k;
+  for (   k = 0,            row = 0,   it = q_lambda.begin();
+	  k < C.size();
+	  ++k,              ++row,     ++it                   ) {
+    *it = inv_M_B.entry( row, col);
+  }
+  for (   k = 0,            row = l,   it = q_x_O.begin();
+	  k < B_O.size();
+	  ++k,              ++row,     ++it                   ) {
+    *it = inv_M_B.entry( row, col);
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_2__p( Tag_false)
+{
+  Value_iterator  v_it;
+  Index_iterator  i_it;
+
+  // compute 'p_lambda' and 'p_x_O' (Note: `p_...' is stored in `q_...')
+  // -------------------------------------------------------------------
+
+  // type of entering variable
+  if ( j < qp_n) {                                        // original
+
+    // use 'no_ineq' variant
+    ratio_test_2__p( Tag_true());
+
+  } else {                                                // slack
+
+    j -= qp_n;
+
+    // get column A_{S_j,B_O}^T (i.e. row of A_{S_B,B_O})
+    int             row  = slack_A[ j].first;
+    bool            sign = slack_A[ j].second;
+
+    for (   i_it =  B_O.begin(),   v_it = tmp_x.begin();
+	    i_it != B_O.end();
+	    ++i_it,                ++v_it                ) {
+      *v_it = ( sign ? 
+		*((*(qp_A+ *i_it))+ row) : - (*((*(qp_A + *i_it))+ row)));
+    }
+
+    // compute  ( p_l | p_x_O )^T = M_B^{-1} * ( 0 | A_{S_j,B_O} )^T
+    std::fill_n( tmp_l.begin(), C.size(), et0);
+    inv_M_B.multiply( tmp_l     .begin(), tmp_x  .begin(),
+		      q_lambda.begin(),   q_x_O.begin());
+
+    j += qp_n;
+  }
+
+  // compute 'p_x_S'
+  // ---------------
+  // A_S_BxB_O * p_x_O
+  multiply__A_S_BxB_O( q_x_O.begin(), q_x_S.begin());
+
+  // p_x_S = +- ( A_S_BxB_O * p_x_O)
+  for (   i_it =  B_S.begin(),   v_it = q_x_S.begin();
+	  i_it != B_S.end();
+	  ++i_it,                ++v_it                ) {
+    if ( ! slack_A[ *i_it - qp_n].second) *v_it = -(*v_it);
+  }
+}
+
+// update
+// ------
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+update_1( Tag_true)
+{
+  // replace leaving with entering variable
+  if ((i == j) && (i >= 0)) {
+    enter_and_leave_variable();
+  } else {
+    replace_variable();
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // QP case
+void  QP_solver<Q, ET, Tags>::
+update_1( Tag_false)
+{
+  if ( is_phaseI) {                                   // phase I
+
+    // replace leaving with entering variable
+    if ((i == j) && (i >= 0)) {
+      enter_and_leave_variable();
+    } else {
+      replace_variable();
+    }
+
+  } else {                                            // phase II
+        
+    if ((i == j) && (i >= 0)) {
+      enter_and_leave_variable();
+    } else {
+
+      if ( ( i >= 0) && basis_matrix_stays_regular()) {
+
+	// leave variable from basis, if
+	// - some leaving variable was found  and
+	// - basis matrix stays regular
+	leave_variable();
+
+      } else {
+
+	// enter variable into basis, if
+	// - no leaving variable was found  or
+	// - basis matrix would become singular when variable i leaves
+
+	if ( i < 0 ) {
+	  enter_variable();
+	} else {
+	  z_replace_variable();
+	}
+      }
+    }
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // LP case
+void  QP_solver<Q, ET, Tags>::
+update_2( Tag_true)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // no ineq.
+void  QP_solver<Q, ET, Tags>::
+replace_variable( Tag_true)
+{
+  replace_variable_original_original();
+  strategyP->leaving_basis( i);
+}
+
+template < typename Q, typename ET, typename Tags >  inline                                 // has ineq.
+void  QP_solver<Q, ET, Tags>::
+replace_variable( Tag_false)
+{
+  // determine type of variables
+  bool  enter_original = ( (j < qp_n) || (j >= static_cast<int>( qp_n+slack_A.size())));
+  bool  leave_original = ( (i < qp_n) || (i >= static_cast<int>( qp_n+slack_A.size())));
+
+  // update basis & basis inverse
+  if ( leave_original) {
+    if ( enter_original) {                              // orig  <--> orig
+      replace_variable_original_original();
+    } else {                                            // slack <--> orig
+      replace_variable_slack_original();
+    }
+
+    // special artificial variable removed?
+    if ( is_phaseI && ( i == art_s_i)) {
+      // remove the fake column - it corresponds
+      // to the special artificial variable which is
+      // (like all artificial variables) not needed
+      // anymore once it leaves the basis. Note:
+      // regular artificial variables are only removed
+      // from the problem after phase I
+      // art_s_i == -1 -> there is no special artificial variable
+      // art_s_i == -2 -> there was a special artificial variable, 
+      // but has been removed  
+      art_s_i = -2;
+      art_A.pop_back();
+      CGAL_qpe_assertion(in_B[in_B.size()-1] == -1); // really removed?
+      in_B.pop_back();
+      // BG: shouldn't the pricing strategy be notfied also here?
+    } else {
+      strategyP->leaving_basis( i);
+    }
+  } else {
+    if ( enter_original) {                              // orig  <--> slack
+      replace_variable_original_slack();
+    } else {                                            // slack <--> slack
+      replace_variable_slack_slack();
+    }
+    strategyP->leaving_basis( i);
+  }
+}
+
+template < typename Q, typename ET, typename Tags >  inline
+bool  QP_solver<Q, ET, Tags>::
+basis_matrix_stays_regular()
+{
+  CGAL_qpe_assertion( is_phaseII);
+  int new_row, k;
+    
+  if ( has_ineq && (i >= qp_n)) {	// slack variable
+    new_row = slack_A[ i-qp_n].first;
+    A_row_by_index_accessor  a_accessor =
+      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
+    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+	       A_row_by_index_iterator( B_O.end  (), a_accessor),
+	       tmp_x.begin());	   
+    inv_M_B.multiply( tmp_x.begin(),                        // dummy (not used)
+		      tmp_x.begin(), tmp_l_2.begin(), tmp_x_2.begin(),
+		      Tag_false(),                                 // QP
+		      Tag_false());                             // ignore 1st argument
+    return ( -inv_M_B.inner_product_x( tmp_x_2.begin(), tmp_x.begin()) != et0);
+
+	
+  } else {						// check original variable
+    k = l+in_B[ i];
+    return ( inv_M_B.entry( k, k) != et0);
+  }
+
+  /* ToDo: check, if really not needed in 'update_1':
+     - basis has already minimal size  or
+     || ( B_O.size()==C.size()) 
+  */
+}
+
+// current solution
+// ----------------
+template < typename Q, typename ET, typename Tags >  inline             // no inequalities, upper bounded
+void  QP_solver<Q, ET, Tags>::
+compute__x_B_S( Tag_true  /*has_equalities_only_and_full_rank*/,
+                Tag_false /*is_nonnegative*/)
+{
+  // nop
+}
+
+template < typename Q, typename ET, typename Tags >  inline             // no inequalities, standard form
+void  QP_solver<Q, ET, Tags>::
+compute__x_B_S( Tag_true /*has_equalities_only_and_full_rank*/,
+                Tag_true /*is_nonnegative*/)
+{
+  // nop
+}
+
+
+template < typename Q, typename ET, typename Tags >  inline             // has inequalities, upper bounded
+void  QP_solver<Q, ET, Tags>::
+compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/,
+                Tag_false /*is_nonnegative*/)
+{
+  // A_S_BxB_O * x_B_O
+  multiply__A_S_BxB_O( x_B_O.begin(), x_B_S.begin());
+
+  // b_S_B - ( A_S_BxB_O * x_B_O)
+  B_by_index_accessor  b_accessor( qp_b);
+  std::transform( B_by_index_iterator( S_B.begin(), b_accessor),
+		  B_by_index_iterator( S_B.end  (), b_accessor),
+		  x_B_S.begin(),
+		  x_B_S.begin(),
+		  compose2_2( std::minus<ET>(),
+			      boost::bind1st( std::multiplies<ET>(), d),
+			      Identity<ET>()));
+				
+  // b_S_B - ( A_S_BxB_O * x_B_O) - r_S_B
+  std::transform(x_B_S.begin(), x_B_S.begin()+S_B.size(),
+		 r_S_B.begin(), x_B_S.begin(),
+		 compose2_2(std::minus<ET>(),
+			    Identity<ET>(),
+			    boost::bind1st( std::multiplies<ET>(), d)));
+                        
+
+  // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O)
+  Value_iterator  x_it = x_B_S.begin();
+  Index_iterator  i_it;
+  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it) {
+    if ( slack_A[ *i_it - qp_n].second) *x_it = -(*x_it);
+  }
+       
+}
+
+
+
+template < typename Q, typename ET, typename Tags >  inline             // has inequalities, standard form
+void  QP_solver<Q, ET, Tags>::
+compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/,
+                Tag_true  /*is_nonnegative*/)
+{
+  // A_S_BxB_O * x_B_O
+  multiply__A_S_BxB_O( x_B_O.begin(), x_B_S.begin());
+
+  // b_S_B - ( A_S_BxB_O * x_B_O)
+  B_by_index_accessor  b_accessor( qp_b);
+  std::transform( B_by_index_iterator( S_B.begin(), b_accessor),
+		  B_by_index_iterator( S_B.end  (), b_accessor),
+		  x_B_S.begin(),
+		  x_B_S.begin(),
+		  compose2_2( std::minus<ET>(),
+			      boost::bind1st( std::multiplies<ET>(), d),
+			      Identity<ET>()));
+
+  // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O)
+  Value_iterator  x_it = x_B_S.begin();
+  Index_iterator  i_it;
+  for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it) {
+    if ( slack_A[ *i_it - qp_n].second) *x_it = -(*x_it);
+  }
+       
+}
+
+} //namespace CGAL
+
+#include <CGAL/QP_solver/Unbounded_direction.h>
+#include <CGAL/QP_solver/QP_solver_nonstandardform_impl.h>
+#include <CGAL/QP_solver/QP_solver_bounds_impl.h>
+#include <CGAL/QP_solver/QP_solver_impl.h>
+
+#endif // CGAL_QP_SOLVER_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_bounds_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_bounds_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_bounds_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_bounds_impl.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_impl.h
new file mode 100644
index 0000000..0499768
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_impl.h
@@ -0,0 +1,3390 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp
+//                 Kaspar Fischer
+
+#include <CGAL/QP_solver/Initialization.h>
+
+namespace CGAL {
+
+// =============================
+// class implementation (cont'd)
+// =============================
+
+// transition (to phase II)
+// ------------------------
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+transition( )
+{
+    CGAL_qpe_debug {
+	if ( vout.verbose()) {
+	    vout2 << std::endl
+		  << "----------------------" << std::endl
+		  << 'T';
+	    vout1 << "[ t"; vout  << "ransition to phase II"; vout1 << " ]";
+	    vout  << std::endl;
+	    vout2 << "----------------------";
+	}
+    }
+
+    // update status
+    m_phase    = 2;
+    is_phaseI  = false;
+    is_phaseII = true;
+
+    // remove artificial variables
+    in_B.erase( in_B.begin()+qp_n+slack_A.size(), in_B.end());
+    //ensure_size(tmp_x_2, tmp_x.size());
+    // update basis inverse
+    CGAL_qpe_debug {
+	vout4 << std::endl << "basis-inverse:" << std::endl;
+    }
+    transition( Is_linear());
+    CGAL_qpe_debug {
+        check_basis_inverse();
+    }
+
+    // initialize exact version of `-qp_c' (implicit conversion to ET)
+    C_by_index_accessor  c_accessor( qp_c);
+    std::transform( C_by_index_iterator( B_O.begin(), c_accessor),
+                    C_by_index_iterator( B_O.end  (), c_accessor),
+                    minus_c_B.begin(), std::negate<ET>());
+    
+    // compute initial solution of phase II
+    compute_solution(Is_nonnegative());
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout.verbose()) print_solution();
+    }
+
+    // notify pricing strategy
+    strategyP->transition();
+}
+
+// access
+// ------
+// numerator of current solution; the denominator is 2*d*d, so we should
+// compute here d*d*(x^T2Dx + x^T2c + 2c0)
+template < typename Q, typename ET, typename Tags >
+ET QP_solver<Q, ET, Tags>::
+solution_numerator( ) const
+{
+    ET   s, z = et0;
+    int  i, j;
+
+    if (check_tag(Is_nonnegative()) || is_phaseI) {
+      // standard form or phase I; it suffices to go
+      // through the basic variables; all D- and c-entries
+      // are obtained through the appropriate iterators 
+      Index_const_iterator  i_it;
+      Value_const_iterator  x_i_it, c_it;
+
+      // foreach i
+      x_i_it =       x_B_O.begin();
+      c_it = minus_c_B  .begin();
+      for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++x_i_it, ++c_it){
+        i = *i_it;
+
+        // compute quadratic part: 2D_i x
+        s = et0;
+        if ( is_QP && is_phaseII) {
+	  // half the off-diagonal contribution
+	  s += std::inner_product(x_B_O.begin(), x_i_it,
+				  D_pairwise_iterator(
+					 B_O.begin(),
+					 D_pairwise_accessor( qp_D, i)),
+				  et0);
+	  // the other half
+	  s *= et2;
+	  // diagonal contribution
+	  s += ET( (*(qp_D + i))[ i]) * *x_i_it;
+        }
+        // add linear part: 2c_i
+        s -= d * et2 * ET( *c_it);
+
+        // add x_i(2D_i x + 2c_i)
+        z += s * *x_i_it; // endowed with a factor of d*d now
+      }
+    } else {
+      // nonstandard form and phase II, 
+      // take all original variables into account; all D- and c-entries
+      // are obtained from the input data directly
+      // order in i_it and j_it matches original variable order
+      if (is_QP) {
+	// quadratic part
+	i=0;
+	for (Variable_numerator_iterator 
+	       i_it = this->original_variables_numerator_begin(); 
+	     i_it < this->original_variables_numerator_end(); ++i_it, ++i) {
+	  // do something only if *i_it != 0
+	  if (*i_it == et0) continue;
+	  s = et0; // contribution of i-th row
+	  Variable_numerator_iterator j_it = 
+	    this->original_variables_numerator_begin();
+	  // half the off-diagonal contribution
+	  j=0;
+	  for (; j<i; ++j_it, ++j)
+	    s += ET(*((*(qp_D+i))+j)) * *j_it;
+	  // the other half
+	  s *= et2;
+	  // the diagonal entry
+	  s += ET(*((*(qp_D+i))+j)) * *j_it;
+	  // accumulate
+	  z += s * *i_it;
+	}
+      }
+      // linear part
+      j=0; s = et0;
+      for (Variable_numerator_iterator 
+	     j_it = this->original_variables_numerator_begin();
+	   j_it < this->original_variables_numerator_end(); ++j_it, ++j)
+	s +=  et2 * ET(*(qp_c+j)) * *j_it;
+      z += d * s;
+    }
+    // finally, add the constant term (phase II only)
+    if (is_phaseII) z += et2 * ET(qp_c0) * d * d;
+    return z;
+}
+
+// pivot step
+// ----------
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+pivot_step( )
+{
+    ++m_pivots;
+
+    
+  
+    // diagnostic output
+    CGAL_qpe_debug {
+        vout2 << std::endl
+              << "==========" << std::endl
+              << "Pivot Step" << std::endl
+              << "==========" << std::endl;
+    }
+  
+  
+    vout  << "[ phase " << ( is_phaseI ? "I" : "II")
+	  << ", iteration " << m_pivots << " ]" << std::endl;
+    
+	    
+    // pricing
+    // -------
+    pricing();
+
+	    
+    // check for optimality
+    if ( j < 0) {
+
+        if ( is_phaseI) {                               // phase I
+	    // since we no longer assume full row rank and subsys assumption
+	    // we have to strengthen the precondition for infeasibility
+            if (this->solution_numerator() > et0) {    
+	      // problem is infeasible
+	        m_phase  = 3;
+	        m_status = QP_INFEASIBLE;
+	        
+		vout << "  ";
+		vout << "problem is INFEASIBLE" << std::endl;
+	       
+	    } else {  // Drive/remove artificials out of basis
+	        expel_artificial_variables_from_basis();
+	        transition();
+	    }
+        } else {                                        // phase II
+
+	    // optimal solution found
+	    m_phase  = 3;
+            m_status = QP_OPTIMAL;
+  
+	    vout << "  ";
+	    vout  << "solution is OPTIMAL" << std::endl;
+            
+        }
+        return;
+    }
+
+	    
+    // ratio test & update (step 1)
+    // ----------------------------
+    // initialize ratio test
+    ratio_test_init();
+    
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose() && is_QP && is_phaseII) {
+	    vout2.out() << std::endl
+			<< "----------------------------" << std::endl
+			<< "Ratio Test & Update (Step 1)" << std::endl
+			<< "----------------------------" << std::endl;
+	}
+    }
+
+    // loop (step 1)
+    do {
+
+        // ratio test
+        ratio_test_1();
+
+        // check for unboundedness
+        if ( q_i == et0) {
+            m_phase  = 3;
+            m_status = QP_UNBOUNDED;
+            
+	    vout << "  ";
+	    vout << "problem is UNBOUNDED" << std::endl;
+	    
+	    CGAL_qpe_debug {
+		//nu should be zero in this case
+		// note: (-1)/hat{\nu} is stored instead of \hat{\nu}
+		// todo kf: as this is just used for an assertion check,
+		// all the following lines should only be executed if
+		// assertions are enabled...
+		nu = inv_M_B.inner_product(     A_Cj.begin(), two_D_Bj.begin(),
+		    q_lambda.begin(),    q_x_O.begin());
+	        if (is_QP) {
+		    if (j < qp_n) {
+		        nu -= d*ET(*((*(qp_D+j))+j));
+		    }
+		}
+		CGAL_qpe_assertion(nu == et0);
+            }
+            return;
+        }
+	
+        // update
+        update_1();
+
+    } while ( j >= 0);
+
+    // ratio test & update (step 2)
+    // ----------------------------
+/*    
+    if ( i >= 0) {
+
+	// diagnostic output
+	CGAL_qpe_debug {
+	    vout2 << std::endl
+		  << "----------------------------" << std::endl
+		  << "Ratio Test & Update (Step 2)" << std::endl
+		  << "----------------------------" << std::endl;
+	}
+
+	// compute index of entering variable
+	j += in_B.size();
+
+	// loop (step 2)
+	while ( ( i >= 0) && basis_matrix_stays_regular()) {
+
+	    // update
+	    update_2( Is_linear());
+
+	    // ratio test
+	    ratio_test_2( Is_linear());
+	}
+    }
+*/
+    // instead of the above piece of code we now have
+    // diagnostic output
+    if (is_RTS_transition) {
+        is_RTS_transition = false;
+     
+        CGAL_qpe_debug {
+            vout2 << std::endl
+		  << "----------------------------" << std::endl
+		  << "Ratio Test & Update (Step 2)" << std::endl
+		  << "----------------------------" << std::endl;
+        }
+
+        // compute index of entering variable
+        j += static_cast<int>(in_B.size());
+
+        ratio_test_2( Is_linear());
+    
+        while ((i >= 0) && basis_matrix_stays_regular()) {
+        
+	    update_2(Is_linear());
+	
+	    ratio_test_2(Is_linear());
+	
+        }
+    } 
+
+
+
+    // ratio test & update (step 3)
+    // ----------------------------
+    CGAL_qpe_assertion_msg( i < 0, "Step 3 should never be reached!");
+
+    // diagnostic output
+    
+    if ( vout.verbose()) print_basis();
+    if ( vout.verbose()) print_solution();
+
+    // transition to phase II (if possible)
+    // ------------------------------------
+    if ( is_phaseI && ( art_basic == 0)) {
+	CGAL_qpe_debug {
+	    if ( vout2.verbose()) {
+		vout2.out() << std::endl
+			    << "all artificial variables are nonbasic"
+			    << std::endl;
+	    }
+	}
+	transition();
+    }
+}
+
+// pricing
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+pricing( )
+{
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) {
+	    vout2 << std::endl
+		  << "-------" << std::endl
+		  << "Pricing" << std::endl
+		  << "-------" << std::endl;
+	}
+    }
+
+    // call pricing strategy
+    j = strategyP->pricing(direction);
+
+    // diagnostic output
+
+    if ( vout.verbose()) {
+      if ( j < 0) {
+	CGAL_qpe_debug {
+	  vout2 << "entering variable: none" << std::endl;
+	}
+      } else {
+	vout  << "  ";
+	vout  << "entering: ";
+	vout  << j;
+	CGAL_qpe_debug {
+	  vout2 << " (" << variable_type( j) << ')' << std::endl;
+	  vout2 << "direction: "
+		<< ((direction == 1) ? "positive" : "negative") << std::endl;
+	}
+      }
+    }
+}
+
+// initialization of ratio-test
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+ratio_test_init( )
+{
+    // store exact version of `A_Cj' (implicit conversion)
+    ratio_test_init__A_Cj( A_Cj.begin(), j, no_ineq);
+
+    // store exact version of `2 D_{B_O,j}'
+    ratio_test_init__2_D_Bj( two_D_Bj.begin(), j, Is_linear());
+}
+
+template < typename Q, typename ET, typename Tags >                                         // no ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_true)
+{
+    // store exact version of `A_Cj' (implicit conversion)
+    if ( j_ < qp_n) {                                   // original variable
+
+	CGAL::cpp11::copy_n( *(qp_A + j_), qp_m, A_Cj_it);
+
+    } else {                                            // artificial variable
+
+	unsigned int  k = j_;
+	k -= qp_n;
+	std::fill_n( A_Cj_it, qp_m, et0);
+	A_Cj_it[ k] = ( art_A[ k].second ? -et1 : et1);
+    }
+}
+
+template < typename Q, typename ET, typename Tags >                                        // has ineq.
+void  QP_solver<Q, ET, Tags>::
+ratio_test_init__A_Cj( Value_iterator A_Cj_it, int j_, Tag_false)
+{
+    // store exact version of `A_Cj' (implicit conversion)
+    if ( j_ < qp_n) {                                   // original variable
+      A_by_index_accessor  a_accessor( *(qp_A + j_));
+      std::copy( A_by_index_iterator( C.begin(), a_accessor),
+                 A_by_index_iterator( C.end  (), a_accessor),
+                 A_Cj_it);
+
+    } else {
+      unsigned int  k = j_;
+      k -= qp_n;
+      std::fill_n( A_Cj_it, C.size(), et0);
+
+      if ( k < static_cast<unsigned int>(slack_A.size())) {                      // slack variable
+
+        A_Cj_it[ in_C[ slack_A[ k].first]] = ( slack_A[ k].second ? -et1
+						                      :  et1);
+
+      } else {                                        // artificial variable
+        k -= static_cast<unsigned int>(slack_A.size());
+
+        if ( j_ != art_s_i) {                           // normal art.
+
+          A_Cj_it[ in_C[ art_A[ k].first]] = ( art_A[ k].second ? -et1
+						                      :  et1);
+
+        } else {                                        // special art.
+          S_by_index_accessor  s_accessor( art_s.begin());
+          std::copy( S_by_index_iterator( C.begin(), s_accessor),
+                     S_by_index_iterator( C.end  (), s_accessor),
+                     A_Cj_it);
+        }	
+      }
+    }
+}
+
+// ratio test (step 1)
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+ratio_test_1( )
+{
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) {
+	    vout2.out() << std::endl;
+	    if ( is_LP || is_phaseI) {
+		vout2.out() << "----------" << std::endl
+			    << "Ratio Test" << std::endl
+			    << "----------" << std::endl;
+	    } else {
+		vout2.out() << "Ratio Test (Step 1)" << std::endl
+			    << "-------------------" << std::endl;
+	    }
+	    if ( vout3.verbose()) {
+		vout3.out() << "    A_Cj: ";
+		std::copy( A_Cj.begin(), A_Cj.begin()+C.size(),
+			   std::ostream_iterator<ET>( vout3.out()," "));
+		vout3.out() << std::endl;
+		if ( is_QP && is_phaseII) {
+		    vout3.out() << "  2 D_Bj: ";
+		    std::copy( two_D_Bj.begin(), two_D_Bj.begin()+B_O.size(),
+			       std::ostream_iterator<ET>( vout3.out()," "));
+		    vout3.out() << std::endl;
+		}
+		vout3.out() << std::endl;
+	    }
+	}
+    }
+    
+    // compute `q_lambda' and `q_x'
+    ratio_test_1__q_x_O( Is_linear());
+    ratio_test_1__q_x_S( no_ineq);
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout3.verbose()) {
+	    if ( is_QP && is_phaseII) {
+		vout3.out() << "q_lambda: ";
+		std::copy( q_lambda.begin(), q_lambda.begin()+C.size(),
+			   std::ostream_iterator<ET>( vout3.out()," "));
+		vout3.out() << std::endl;
+	    }
+	    vout3.out() << "   q_x_O: ";
+	    std::copy( q_x_O.begin(), q_x_O.begin()+B_O.size(),
+		       std::ostream_iterator<ET>( vout3.out()," "));
+	    vout3.out() << std::endl;
+
+	    if ( has_ineq) {
+		vout3.out() << "   q_x_S: ";
+		std::copy( q_x_S.begin(), q_x_S.begin()+B_S.size(),
+			   std::ostream_iterator<ET>( vout3.out()," "));
+		vout3.out() << std::endl;
+	    }
+	    vout3.out() << std::endl;
+	}
+    }
+
+    // check `t_i's
+    x_i = et1;                                          // trick: initialize
+    q_i = et0;                                          // minimum with +oo
+
+    // computation of t_{min}^{j}
+    ratio_test_1__t_min_j(Is_nonnegative());
+    CGAL_qpe_debug { // todo kf: at first sight, this debug message should
+                     // only be output for problems in nonstandard form...
+        if (vout2.verbose()) {
+            vout2.out() << "t_min_j: " << x_i << '/' << q_i << std::endl;
+            vout2.out() << std::endl;
+        }
+    }    
+
+    // what happens, if all original variables are nonbasic?
+/*
+    ratio_test_1__t_i(   B_O.begin(),   B_O.end(),
+		       x_B_O.begin(), q_x_O.begin(), Tag_false());
+    ratio_test_1__t_i(   B_S.begin(),   B_S.end(),
+		       x_B_S.begin(), q_x_S.begin(), no_ineq);
+*/		       
+    ratio_test_1__t_min_B(no_ineq);    
+
+    // check `t_j'
+    ratio_test_1__t_j( Is_linear());
+
+    // diagnostic output
+    CGAL_qpe_debug {
+        if ( vout2.verbose()) {
+            for ( unsigned int k = 0; k < static_cast<unsigned int>(B_O.size()); ++k) {
+                print_ratio_1_original(k, x_B_O[k], q_x_O[k]);
+            }     
+            if ( has_ineq) {
+                for ( unsigned int k = 0; k < static_cast<unsigned int>(B_S.size()); ++k) {
+                    /*
+                    vout2.out() << "t_S_" << k << ": "
+				    << x_B_S[ k] << '/' << q_x_S[ k]
+				    << ( ( q_i > et0) && ( i == B_S[ k]) ? " *":"")
+				    << std::endl;
+				    */
+				    print_ratio_1_slack(k, x_B_S[k], q_x_S[k]);
+                }
+            }
+	    if ( is_QP && is_phaseII) {
+		vout2.out() << std::endl
+			    << "  t_j: " << mu << '/' << nu
+			    << ( ( q_i > et0) && ( i < 0) ? " *" : "")
+			    << std::endl;
+	    }
+	    vout2.out() << std::endl;
+	}
+    }
+    if ( q_i > et0) {
+      if ( i < 0) {
+	vout2 << "leaving variable: none" << std::endl;
+      } else {
+	vout << ", ";
+	vout  << "leaving: ";
+	vout  << i;
+	CGAL_qpe_debug {
+	  if ( vout2.verbose()) {
+	    if ( ( i < qp_n) || ( i >= static_cast<int>( qp_n+slack_A.size())) ) {
+	      vout2.out() << " (= B_O[ " << in_B[ i] << "]: "
+			  << variable_type( i) << ')';
+	    } else {
+	      vout2.out() << " (= B_S[ " << in_B[ i] << "]: slack)";
+	    }
+	  }
+	  vout2 << std::endl;
+	}
+	
+      }
+    }
+    
+}
+
+
+template < typename Q, typename ET, typename Tags >                         // Standard form
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_min_j(Tag_true /*is_nonnegative*/)
+{
+}
+
+// By the pricing step we have the following precondition
+// direction == +1 => x_O_v_i[j] == (LOWER v ZERO)
+// direction == -1 => x_O_v_i[j] == (UPPER v ZERO) 
+template < typename Q, typename ET, typename Tags >                         // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_min_j(Tag_false /*is_nonnegative*/)
+{
+    if (j < qp_n) {                                 // original variable
+        if (direction == 1) {
+            if (x_O_v_i[j] == LOWER) {              // has lower bound value
+                if (*(qp_fu+j)) {                   // has finite upper bound
+                    x_i = (*(qp_u+j) - *(qp_l+j));
+                    q_i = et1;
+                    i = j;
+                    ratio_test_bound_index = UPPER;
+                } else {                            // has infinite upper bound
+                    x_i = et1;
+                    q_i = et0;
+                }
+            } else {                                // has value zero
+                if (*(qp_fu+j)) {                   // has finite upper bound
+                    x_i = *(qp_u+j);
+                    q_i = et1;
+                    i = j;
+                    ratio_test_bound_index = UPPER;
+                } else {                            // has infinite upper bound
+                    x_i = et1;
+                    q_i = et0;                    
+                }
+            }
+        } else {                                    // direction == -1
+            if (x_O_v_i[j] == UPPER) {              // has upper bound value
+                if (*(qp_fl+j)) {                   // has finite lower bound
+                    x_i = (*(qp_u+j) - *(qp_l+j));
+                    q_i = et1;
+                    i = j;
+                    ratio_test_bound_index = LOWER;
+                } else {                            // has infinite lower bound
+                    x_i = et1;
+                    q_i = et0;
+                }
+            } else {                                // has value zero
+                if (*(qp_fl+j)) {                   // has finite lower bound
+                    x_i = -(*(qp_l+j));
+                    q_i = et1;
+                    i = j;
+                    ratio_test_bound_index = LOWER;
+                } else {                            // has infinite lower bound
+                    x_i = et1;
+                    q_i = et0;
+                }
+            }
+        }
+    } else {                                        // slack or artificial var
+        x_i = et1;
+        q_i = et0;
+    }
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_min_B(Tag_true  /*has_equalities_only_and_full_rank*/)
+{
+    ratio_test_1_B_O__t_i(B_O.begin(), B_O.end(), x_B_O.begin(),
+                        q_x_O.begin(), Is_nonnegative());
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1__t_min_B(Tag_false /*has_equalities_only_and_full_rank*/)
+{
+    ratio_test_1_B_O__t_i(B_O.begin(), B_O.end(), x_B_O.begin(),
+                        q_x_O.begin(), Is_nonnegative());
+    ratio_test_1_B_S__t_i(B_S.begin(), B_S.end(), x_B_S.begin(),
+                        q_x_S.begin(), Is_nonnegative());
+}    
+
+// ratio test for the basic original variables
+template < typename Q, typename ET, typename Tags >                         // Standard form
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
+                    Value_iterator x_it, Value_iterator q_it,
+                    Tag_true  /*is_nonnegative*/)
+{    
+    for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+        test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
+    }
+}
+
+// ratio test for the basic original variables                    
+template < typename Q, typename ET, typename Tags >                         // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1_B_O__t_i(Index_iterator i_it, Index_iterator end_it,
+                    Value_iterator x_it, Value_iterator q_it,
+                    Tag_false /*is_nonnegative*/)
+{
+    if (is_phaseI) {
+        if (direction == 1) {
+            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+                test_mixed_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
+            }
+        } else {
+            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+                test_mixed_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
+            }
+        }
+    } else {
+        if (direction == 1) {
+            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+                test_explicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
+            }
+        } else {
+            for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+                test_explicit_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
+            }
+        }
+    }
+}
+
+// ratio test for the basic slack variables
+template < typename Q, typename ET, typename Tags >                         // Standard form
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
+                Value_iterator x_it, Value_iterator q_it,
+                Tag_true  /*is_nonnegative*/)
+{
+    for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+        test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
+    }
+}
+
+// ratio test for the basic slack variables
+template < typename Q, typename ET, typename Tags >                         // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+ratio_test_1_B_S__t_i(Index_iterator i_it, Index_iterator end_it,
+                Value_iterator x_it, Value_iterator q_it,
+                Tag_false /*is_nonnegative*/)
+{
+    if (direction == 1) {
+        for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+            test_implicit_bounds_dir_pos(*i_it, *x_it, *q_it, i, x_i, q_i);
+        }
+    } else {
+        for ( ; i_it != end_it; ++i_it, ++x_it, ++q_it ) {
+            test_implicit_bounds_dir_neg(*i_it, *x_it, *q_it, i, x_i, q_i);
+        }    
+    }
+}
+
+// test for one basic variable with implicit bounds only,
+// note that this function writes the member variables i, x_i, q_i
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_implicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{   
+    if (q_k > et0) {
+      // BLAND rule: In case the ratios are the same, only update if the new index
+      // is smaller. The special artificial variable is always made to leave first.
+      if ((x_k * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == d_min * q_k)) ) {
+        i_min = k;
+        d_min = x_k;
+        q_min = q_k;
+      }
+    }
+}
+
+// test for one basic variable with implicit bounds only,
+// note that this function writes the member variables i, x_i, q_i
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_implicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{
+    if (q_k < et0) {
+      // BLAND rule: In case the ratios are the same, only update if the new index
+      // is smaller. The special artificial variable is always made to leave first.
+      if ((x_k * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == -(d_min * q_k))) ) {
+        i_min = k;
+        d_min = x_k;
+        q_min = -q_k;
+      }
+    }
+}
+
+// test for one basic variable with explicit bounds only,
+// note that this function writes the member variables i, x_i, q_i and
+// ratio_test_bound_index, although the second and third variable name
+// are in the context of upper bounding misnomers
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_explicit_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{
+    if (q_k > et0) {                                // check for lower bound
+        if (*(qp_fl+k)) {
+            ET  diff = x_k - (d * ET(*(qp_l+k)));
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = q_k;
+                ratio_test_bound_index = LOWER;
+            }
+        }
+    } else {                                        // check for upper bound
+        if ((q_k < et0) && (*(qp_fu+k))) {
+            ET  diff = (d * ET(*(qp_u+k))) - x_k;
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = -q_k;
+                ratio_test_bound_index = UPPER;
+            }    
+        }
+    }
+}
+
+// test for one basic variable with explicit bounds only,
+// note that this function writes the member variables i, x_i, q_i and
+// ratio_test_bound_index, although the second and third variable name
+// are in the context of upper bounding misnomers
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_explicit_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{
+    if (q_k < et0) {                                // check for lower bound
+        if (*(qp_fl+k)) {
+            ET  diff = x_k - (d * ET(*(qp_l+k)));
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = -q_k;
+                ratio_test_bound_index = LOWER;
+            }
+        }
+    } else {                                        // check for upper bound
+        if ((q_k > et0) && (*(qp_fu+k))) {
+            ET  diff = (d * ET(*(qp_u+k))) - x_k;
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = q_k;
+                ratio_test_bound_index = UPPER;
+            }    
+        }
+    }
+}
+
+// test for one basic variable with mixed bounds,
+// note that this function writes the member variables i, x_i, q_i and
+// ratio_test_bound_index, although the second and third variable name
+// are in the context of upper bounding misnomers
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_mixed_bounds_dir_pos(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{
+    if (q_k > et0) {                                // check for lower bound
+        if (k < qp_n) {                             // original variable
+            if (*(qp_fl+k)) {
+                ET  diff = x_k - (d * ET(*(qp_l+k)));
+                // BLAND rule: In case the ratios are the same, only update if the new index
+                // is smaller. The special artificial variable is always made to leave first.
+                if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k))) {
+                  i_min = k;
+                  d_min = diff;
+                  q_min = q_k;
+                  ratio_test_bound_index = LOWER;
+              } // phase  I II switch
+              
+            }
+        } else {                                    // artificial variable
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((x_k * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == d_min * q_k))) {
+                i_min = k;
+                d_min = x_k;
+                q_min = q_k;
+            }
+        }
+    } else {                                        // check for upper bound
+        if ((q_k < et0) && (k < qp_n) && *(qp_fu+k)) {
+            ET  diff = (d * ET(*(qp_u+k))) - x_k;
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = -q_k;
+                ratio_test_bound_index = UPPER;
+            }
+        }
+    }
+}
+
+// test for one basic variable with mixed bounds,
+// note that this function writes the member variables i, x_i, q_i and
+// ratio_test_bound_index, although the second and third variable name
+// are in the context of upper bounding misnomers
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+test_mixed_bounds_dir_neg(int k, const ET& x_k, const ET& q_k, 
+                                int& i_min, ET& d_min, ET& q_min)
+{
+    if (q_k < et0) {                                // check for lower bound
+        if (k < qp_n) {                             // original variable
+            if (*(qp_fl+k)) {
+                ET  diff = x_k - (d * ET(*(qp_l+k)));
+                // BLAND rule: In case the ratios are the same, only update if the new index
+                // is smaller. The special artificial variable is always made to leave first.
+                if ((diff * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == -(d_min * q_k))) ) {
+                    i_min = k;
+                    d_min = diff;
+                    q_min = -q_k;
+                    ratio_test_bound_index = LOWER;
+                }
+            }
+        } else {                                    // artificial variable
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((x_k * q_min < -(d_min * q_k)) || ((k < i_min) && (i_min != art_s_i) && (x_k * q_min == -(d_min * q_k))) ) {
+                i_min = k;
+                d_min = x_k;
+                q_min = -q_k;
+            }
+        }
+    } else {                                        // check for upper bound
+        if ((q_k > et0) && (k < qp_n) && *(qp_fu+k)) {
+            ET  diff = (d * ET(*(qp_u+k))) - x_k;
+            // BLAND rule: In case the ratios are the same, only update if the new index
+            // is smaller. The special artificial variable is always made to leave first.
+            if ((diff * q_min < d_min * q_k) || ((k < i_min) && (i_min != art_s_i) && (diff * q_min == d_min * q_k)) ) {
+                i_min = k;
+                d_min = diff;
+                q_min = q_k;
+                ratio_test_bound_index = UPPER;
+            }
+        }
+    }
+}    
+
+
+template < typename Q, typename ET, typename Tags >                                         // QP case
+void
+QP_solver<Q, ET, Tags>::
+ratio_test_2( Tag_false)
+{
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) {
+	    vout2.out() << std::endl
+			<< "Ratio Test (Step 2)" << std::endl
+			<< "-------------------" << std::endl;
+	}
+    }
+
+    // compute `p_lambda' and `p_x' (Note: `p_...' is stored in `q_...')
+    ratio_test_2__p( no_ineq);
+ 
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout3.verbose()) {
+	    vout3.out() << "p_lambda: ";
+	    std::copy( q_lambda.begin(), q_lambda.begin()+C.size(),
+		       std::ostream_iterator<ET>( vout3.out()," "));
+	    vout3.out() << std::endl;
+	    vout3.out() << "   p_x_O: ";
+	    std::copy( q_x_O.begin(), q_x_O.begin()+B_O.size(),
+		       std::ostream_iterator<ET>( vout3.out()," "));
+	    vout3.out() << std::endl;
+	    if ( has_ineq) {
+		vout3.out() << "   p_x_S: ";
+		std::copy( q_x_S.begin(), q_x_S.begin()+B_S.size(),
+			   std::ostream_iterator<ET>( vout3.out()," "));
+		vout3.out() << std::endl;
+	    }
+	    vout3.out() << std::endl;
+	}
+    }
+    
+    // Idea here: At this point, the goal is to increase \mu_j until either we
+    // become optimal (\mu_j=0), or one of the variables in x^*_\hat{B} drops
+    // down to zero.
+    //
+    // Let us see first how this is done in the standard-form case (where
+    // Sven's thesis applies).  Eq. (2.11) in Sven's thesis holds, and by
+    // multlying it by $M_\hat{B}^{-1}$ we obtain an equation for \lambda and
+    // x^*_\hat{B}.  The interesting equation (the one for x^*_\hat{B}) looks
+    // more or less as follows:
+    //
+    //    x(mu_j)      = x(0) + mu_j      q_it                          (1)
+    //
+    // where q_it is the vector from (2.12).  In paritcular, for
+    // mu_j=mu_j(t_1) (i.e., if we plug the value of mu_j at the beginning of
+    // this ratio step 2 into (1)) we have
+    //
+    //    x(mu_j(t_1)) = x(0) + mu_j(t_1) q_it                          (2)
+    //
+    // where x(mu_j(t_1)) is the current solution of the solver at this point
+    // (i.e., at the beginning of ratio step 2).
+    //
+    // By subtracting (2) from (1) we can thus eliminate the "unkown" x(0)
+    // (which is cheaper than computing it):
+    //
+    //    x(mu_j) = x(mu_j(t_1)) + (mu_j-mu_j(t_1)) q_it
+    //                             ----------------
+    //                                  := delta
+    //
+    // In order to compute for each variable x_k in \hat{B} the value of mu_j
+    // for which x_k(mu_j) = 0, we thus evaluate
+    //
+    //                x(mu_j(t_1))_k
+    //    delta_k:= - --------------
+    //                    q_it_k
+    //
+    // The first variable in \hat{B} that hits zero "in the future" is then
+    // the one whose delta_k equals
+    //
+    //    delta_min:= min {delta_k | k in \hat{B} and (q_it)_k < 0 }
+    //    
+    // So in order to handle the standard-form case, we would compute this
+    // minimum.  Once we have delta_min, we need to check whether we get
+    // optimal BEFORE a variable drops to zero.  As delta = mu_j - mu_j(t_1),
+    // the latter is precisely the case if delta_min >= -mu_j(t_1).
+    //
+    // (Note: please forget the crap identitiy between (2.11) and (2.12); the
+    // notation is misleading.)
+    //
+    // Now to the nonstandard-form case.
+    
+    // fw: By definition delta_min >= 0, such that initializing
+    // delta_min with -mu_j(t_1) has the desired effect that a basic variable
+    // is leaving only if 0 <= delta_min < -mu_j(t_1).
+    //
+    // The only initialization of delta_min as fraction x_i/q_i that works is
+    // x_i=mu_j(t_1); q_i=-1; (see below).
+    //
+    // Since mu_j(t_1) has been computed in ratio test step 1 we can
+    // reuse it.
+      
+    x_i = mu;                                     // initialize minimum
+    q_i = -et1;                                        // with -mu_j(t_1) 
+
+    Value_iterator  x_it = x_B_O.begin();
+    Value_iterator  q_it = q_x_O.begin();
+    Index_iterator  i_it;
+    for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++x_it, ++q_it) {
+      // BLAND rule: In case the ratios are the same, only update if the new index
+      // is smaller. The special artificial variable is always made to leave first.
+      if ( (*q_it < et0) && (
+              (( *x_it * q_i) < ( x_i * *q_it)) ||
+              ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
+            )
+          ) {
+        i = *i_it; x_i = *x_it; q_i = *q_it;
+      }
+    }
+    x_it = x_B_S.begin();
+    q_it = q_x_S.begin();
+    for ( i_it = B_S.begin(); i_it != B_S.end(); ++i_it, ++x_it, ++q_it) {
+      // BLAND rule: In case the ratios are the same, only update if the new index
+      // is smaller. The special artificial variable is always made to leave first.
+      if ( ( *q_it < et0) && (
+             (( *x_it * q_i) < ( x_i * *q_it)) ||
+             ( (*i_it < i) && (i != art_s_i) && (( *x_it * q_i) == ( x_i * *q_it)) )
+            )
+          ){
+          i = *i_it; x_i = *x_it; q_i = *q_it;
+      }
+    }
+
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) {
+	    for ( unsigned int k = 0; k < static_cast<unsigned int>(B_O.size()); ++k) {
+		vout2.out() << "mu_j_O_" << k << ": - "
+			    << x_B_O[ k] << '/' << q_x_O[ k]
+			    << ( ( q_i < et0) && ( i == B_O[ k]) ? " *" : "")
+			    << std::endl;
+	    }
+	    for ( unsigned int k = 0; k < static_cast<unsigned int>(B_S.size()); ++k) {
+		vout2.out() << "mu_j_S_" << k << ": - "
+			    << x_B_S[ k] << '/' << q_x_S[ k]
+			    << ( ( q_i < et0) && ( i == B_S[ k]) ? " *" : "")
+			    << std::endl;
+	    }
+	    vout2.out() << std::endl;
+	}
+    }
+    if ( i < 0) {
+      vout2 << "leaving variable: none" << std::endl;
+    } else {
+      vout1 << ", ";
+      vout  << "leaving"; vout2 << " variable"; vout << ": ";
+      vout  << i;
+      if ( vout2.verbose()) {
+	if ( i < qp_n) {
+	  vout2.out() << " (= B_O[ " << in_B[ i] << "]: original)"
+		      << std::endl;
+	} else {
+	  vout2.out() << " (= B_S[ " << in_B[ i] << "]: slack)"
+		      << std::endl;
+	}
+      }
+    }
+    
+}
+
+// update (step 1)
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+update_1( )
+{
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) {
+	    vout2.out() << std::endl;
+	    if ( is_LP || is_phaseI) {
+		vout2.out() << "------" << std::endl
+			    << "Update" << std::endl
+			    << "------" << std::endl;
+	    } else {
+		vout2.out() << "Update (Step 1)" << std::endl
+			    << "---------------" << std::endl;
+	    }
+	}
+    }
+
+    // update basis & basis inverse
+    update_1( Is_linear());
+    CGAL_qpe_assertion(check_basis_inverse());
+    
+    // check the updated vectors r_C and r_S_B
+    CGAL_expensive_assertion(check_r_C(Is_nonnegative()));
+    CGAL_expensive_assertion(check_r_S_B(Is_nonnegative()));
+    
+    // check the vectors r_B_O and w in phaseII for QPs
+    CGAL_qpe_debug {
+        if (is_phaseII && is_QP) {
+            CGAL_expensive_assertion(check_r_B_O(Is_nonnegative()));
+            CGAL_expensive_assertion(check_w(Is_nonnegative()));
+        }
+    }
+
+    // compute current solution
+    compute_solution(Is_nonnegative());
+    
+    // check feasibility 
+    CGAL_qpe_debug {
+      if (j < 0 && !is_RTS_transition) // todo kf: is this too conservative?
+                 // Note: the above condition is necessary because of the
+                 // following.  In theory, it is true that the current
+                 // solution is at this point in the solver always
+                 // feasible. However, the solution has its x_j-entry equal to
+                 // the current t from the pricing, and is not zero (in the
+                 // standard-form case) or the current lower/upper bound
+                 // of the variable (in the non-standard-form case), resp., as
+                 // the routines is_solution_feasible() and
+                 // is_solution_feasible_for_auxiliary_problem() assume.
+	if (is_phaseI) {
+	  CGAL_expensive_assertion(
+            is_solution_feasible_for_auxiliary_problem());
+	} else {
+	  CGAL_expensive_assertion(is_solution_feasible());
+	}
+      else
+	vout2 << "(feasibility not checked in intermediate step)" << std::endl;
+      CGAL_expensive_assertion(check_tag(Is_nonnegative()) ||
+			       r_C.size() == C.size());
+    }
+	 
+}
+
+// update (step 2)
+template < typename Q, typename ET, typename Tags >                                         // QP case
+void
+QP_solver<Q, ET, Tags>::
+update_2( Tag_false)
+{
+    CGAL_qpe_debug {
+	vout2 << std::endl
+	      << "Update (Step 2)" << std::endl
+	      << "---------------" << std::endl;
+    }
+
+    // leave variable from basis
+    leave_variable();
+    CGAL_qpe_debug {
+        check_basis_inverse();
+    }
+    
+    // check the updated vectors r_C, r_S_B, r_B_O and w
+    CGAL_expensive_assertion(check_r_C(Is_nonnegative()));
+    CGAL_expensive_assertion(check_r_S_B(Is_nonnegative()));
+    CGAL_expensive_assertion(check_r_B_O(Is_nonnegative()));
+    CGAL_expensive_assertion(check_w(Is_nonnegative()));
+
+    // compute current solution
+    compute_solution(Is_nonnegative());
+}
+ 
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+expel_artificial_variables_from_basis( )
+{
+    int row_ind;
+    ET r_A_Cj;
+    
+    CGAL_qpe_debug {
+        vout2 << std::endl
+	      << "---------------------------------------------" << std::endl
+	      << "Expelling artificial variables from the basis" << std::endl
+	      << "---------------------------------------------" << std::endl;
+    }
+  
+
+  
+    for (unsigned int i_ = 0; i_ < static_cast<unsigned int>(qp_n + slack_A.size()); ++i_) {
+      if (!is_basic(i_)) { 
+      ratio_test_init__A_Cj( A_Cj.begin(), i_, no_ineq);
+      }
+    }
+
+    
+    // try to pivot the artificials out of the basis
+    // Note that we do not notify the pricing strategy about variables
+    // leaving the basis, furthermore the pricing strategy does not
+    // know about variables entering the basis.
+    // The partial pricing strategies that keep the set of nonbasic vars
+    // explicitly are synchronized during transition from phaseI to phaseII 
+    for (unsigned int i_ = static_cast<unsigned int>(qp_n + slack_A.size()); i_ < static_cast<unsigned int>(in_B.size()); ++i_) {
+      if (is_basic(i_)) { 					// is basic
+        row_ind = in_B[i_];  
+        
+        //CGAL_qpe_assertion(row_ind >= 0);
+        
+	    
+        // determine first possible entering variable,
+        // if there is any
+        for (unsigned int j_ = 0; j_ < static_cast<unsigned int>(qp_n + slack_A.size()); ++j_) {
+	        if (!is_basic(j_)) {  				// is nonbasic
+            ratio_test_init__A_Cj( A_Cj.begin(), j_, no_ineq);
+                        
+            r_A_Cj = inv_M_B.inv_M_B_row_dot_col(row_ind, A_Cj.begin());
+                       
+            if (r_A_Cj != et0) {
+              ratio_test_1__q_x_O(Is_linear());
+              i = i_;
+              j = j_;
+              update_1(Is_linear());
+              break;
+            } 
+          }
+        }
+      }
+    }
+  
+    if ((art_basic != 0) && no_ineq) {
+      // the vector in_C was not used in phase I, but now we remove redundant
+      // constraints and switch to has_ineq treatment, hence we need it to
+      // be correct at this stage
+      for (int i=0; i<qp_m; ++i)
+        in_C.push_back(i);
+      }
+      diagnostics.redundant_equations = (art_basic != 0);
+
+      // now reset the no_ineq and has_ineq flags to match the situation
+      no_ineq = no_ineq && !diagnostics.redundant_equations;
+      has_ineq = !no_ineq;
+    
+      // remove the remaining ones with their corresponding equality constraints
+      // Note: the special artificial variable can always be driven out of the
+      // basis
+      for (unsigned int i_ = static_cast<unsigned int>(qp_n + slack_A.size()); i_ < static_cast<unsigned int>(in_B.size()); ++i_) {
+        if (in_B[i_] >= 0) {
+          i = i_;
+          CGAL_qpe_debug {
+            vout2 << std::endl
+            << "~~> removing artificial variable " << i
+            << " and its equality constraint" << std::endl
+            << std::endl;
+          }
+        remove_artificial_variable_and_constraint();
+      }
+    }
+}
+
+
+// replace variable in basis
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+replace_variable( )
+{
+    CGAL_qpe_debug {
+	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
+	      << " replaces basic (" << variable_type( i) << ") variable " << i
+	      << std::endl << std::endl;
+    }
+
+    // replace variable
+    replace_variable( no_ineq);
+
+    // pivot step done
+    i = j = -1;
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_original( )
+{
+    // updates for the upper bounded case
+    replace_variable_original_original_upd_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // replace original variable [ in: j | out: i ]
+    in_B  [ i] = -1;
+    in_B  [ j] = k;
+       B_O[ k] = j;
+
+    minus_c_B[ k] = 
+      ( is_phaseI ? 
+	( j < qp_n ? et0 : -aux_c[j-qp_n-slack_A.size()]) : -ET( *(qp_c+ j)));
+
+    if ( is_phaseI) {
+	if ( j >= qp_n) ++art_basic;
+	if ( i >= qp_n) --art_basic;
+    }
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+	    
+    // update basis inverse
+    inv_M_B.enter_original_leave_original( q_x_O.begin(), k);
+}
+
+// update of the vector r for U_5 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_original_upd_r(Tag_true )
+{
+}
+
+// update of the vector r for U_5 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_original_upd_r(Tag_false )
+{
+    ET      x_j, x_i;
+    
+    if (is_artificial(j)) {
+        if (!is_artificial(i)) {
+            x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+            update_r_C_r_S_B__i(x_i);
+            // update x_O_v_i
+            x_O_v_i[i] = ratio_test_bound_index;
+        }
+    } else {
+        x_j = nonbasic_original_variable_value(j);
+        if (is_artificial(i)) {
+            update_r_C_r_S_B__j(x_j);
+        } else {
+            x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+            update_r_C_r_S_B__j_i(x_j, x_i);
+            // update x_O_v_i
+            x_O_v_i[i] = ratio_test_bound_index;
+        }
+        // update x_O_v_i
+        x_O_v_i[j] = BASIC;
+    }
+}
+
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_slack( )
+{
+    
+    // updates for the upper bounded case
+    replace_variable_slack_slack_upd_r(Is_nonnegative()); 
+    
+    int  k = in_B[ i];
+
+    // replace slack variable [ in: j | out: i ]
+    in_B  [ i] = -1;
+    in_B  [ j] = k;
+       B_S[ k] = j;
+       S_B[ k] = slack_A[ j-qp_n].first;
+
+    // replace inequality constraint [ in: i | out: j ]
+    int old_row = S_B[ k];
+    int new_row = slack_A[ i-qp_n].first;
+    k = in_C[ old_row];
+
+    in_C[ old_row] = -1;
+    in_C[ new_row] = k;
+       C[ k      ] = new_row;
+
+     b_C[ k] = ET( *(qp_b+ new_row));
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    A_row_by_index_accessor  a_accessor =
+      boost::bind( A_accessor( qp_A, 0, qp_n), _1, new_row);
+    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+	       A_row_by_index_iterator( B_O.end  (), a_accessor),
+	       tmp_x.begin());
+    if ( art_s_i > 0) {                                 // special artificial
+	tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
+    }
+    inv_M_B.enter_slack_leave_slack( tmp_x.begin(), k);
+}
+
+// update of the vector r for U_6 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_slack_upd_r(Tag_true )
+{
+}
+
+// update of the vector r for U_6 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_slack_upd_r(Tag_false )
+{
+    int     sigma_j = slack_A[ j-qp_n].first;
+    
+    // swap r_gamma_C(sigma_j) in r_C with r_gamma_S_B(sigma_i) in r_S_B
+    std::swap(r_C[in_C[sigma_j]], r_S_B[in_B[i]]); 
+}
+
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_original( )
+{
+    // updates for the upper bounded case
+    replace_variable_slack_original_upd_r(Is_nonnegative()); 
+     
+    int  k = in_B[ i];
+
+    // leave original variable [ out: i ]
+    in_B  [ B_O.back()] = k;
+       B_O[ k] = B_O.back();
+       in_B  [ i         ] = -1;
+       B_O.pop_back();
+
+    minus_c_B[ k] = minus_c_B[ B_O.size()];
+
+    if ( is_phaseI && ( i >= qp_n)) --art_basic;
+
+    // enter slack variable [ in: j ]
+    int  old_row = slack_A[ j-qp_n].first;
+    in_B  [ j] = static_cast<int>(B_S.size());
+       B_S.push_back( j);
+       S_B.push_back( old_row);
+
+    // leave inequality constraint [ out: j ]
+    int  l = in_C[ old_row];
+     b_C[ l       ] = b_C[ C.size()-1];
+       C[ l       ] = C.back();
+    in_C[ C.back()] = l;
+    in_C[ old_row ] = -1;
+       C.pop_back();
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    inv_M_B.swap_variable( k);
+    inv_M_B.swap_constraint( l);
+    inv_M_B.enter_slack_leave_original();
+}
+
+// update of the vector r for U_8 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_original_upd_r(Tag_true )
+{
+}
+
+// update of the vector r for U_8 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_slack_original_upd_r(Tag_false )
+{
+    if (!is_artificial(i)) {
+        ET  x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+        update_r_C_r_S_B__i(x_i);
+    }
+    
+    int     sigma_j = slack_A[ j-qp_n].first;
+    
+    // append r_gamma_C(sigma_j) from r_C to r_S_B:
+    r_S_B.push_back(r_C[in_C[sigma_j]]);
+    
+    // remove r_gamma_C(sigma_j) from r_C:
+    r_C[in_C[sigma_j]] = r_C.back();
+    r_C.pop_back();
+    
+    // update x_O_v_i
+    if (!is_artificial(i)) // original and not artificial?
+      x_O_v_i[i] = ratio_test_bound_index;
+}
+
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_slack( )
+{
+    // updates for the upper bounded case
+    replace_variable_original_slack_upd_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // enter original variable [ in: j ]
+
+    minus_c_B[ B_O.size()]
+      = ( is_phaseI ? 
+	  ( j < qp_n ? et0 : -aux_c[j-qp_n-slack_A.size()]) 
+	  : -ET( *(qp_c+ j)));
+    
+
+    in_B  [ j] = static_cast<int>(B_O.size());
+       B_O.push_back( j);
+
+    if ( is_phaseI && ( j >= qp_n)) ++art_basic;
+
+    // leave slack variable [ out: i ]
+       B_S[ k         ] = B_S.back();
+       S_B[ k         ] = S_B.back();
+    in_B  [ B_S.back()] = k;
+    in_B  [ i         ] = -1; 
+       B_S.pop_back();
+       S_B.pop_back();
+
+    // enter inequality constraint [ in: i ]
+    int new_row = slack_A[ i-qp_n].first;
+
+     b_C[ C.size()] = ET( *(qp_b+ new_row));
+    in_C[ new_row ] = static_cast<int>(C.size());
+       C.push_back( new_row);
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    A_row_by_index_accessor  a_accessor =
+      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
+    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+	       A_row_by_index_iterator( B_O.end  (), a_accessor),
+	       tmp_x.begin());
+    if ( art_s_i > 0) {                                 // special art.
+	tmp_x[ in_B[ art_s_i]] = ET( art_s[ new_row]);
+    }
+    inv_M_B.enter_original_leave_slack( q_x_O.begin(), tmp_x.begin());
+    
+}
+
+// update of the vector r for U_7 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_slack_upd_r(Tag_true )
+{
+}
+
+// update of the vector r for U_7 with upper bounding, note that we 
+// need the headings C, and S_{B} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+replace_variable_original_slack_upd_r(Tag_false )
+{
+    if (!is_artificial(j)) {
+        ET x_j = nonbasic_original_variable_value(j);
+        update_r_C_r_S_B__j(x_j);
+    }
+    
+    // append r_gamma_S_B(sigma_i) from r_S_B to r_C
+    r_C.push_back(r_S_B[in_B[i]]);
+    
+    // remove r_gamma_S_B(sigma_i) from r_S_B
+    r_S_B[in_B[i]] = r_S_B.back();
+    r_S_B.pop_back();
+    
+    // update x_O_v_i
+    if (!is_artificial(j)) {
+        x_O_v_i[j] = BASIC;
+    }
+}
+
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+remove_artificial_variable_and_constraint( )
+{
+    // updates for the upper bounded case
+    remove_artificial_variable_and_constraint_upd_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // leave artificial (original) variable [ out: i ]
+    in_B  [ B_O.back()] = k;
+       B_O[ k] = B_O.back();
+       in_B  [ i         ] = -1;
+       B_O.pop_back();
+
+    minus_c_B[ k] = minus_c_B[ B_O.size()];
+
+    if ( is_phaseI && ( i >= qp_n)) --art_basic;
+
+    int old_row = art_A[i - qp_n - slack_A.size()].first;
+
+    // leave its equality constraint 
+    int  l = in_C[ old_row];
+     b_C[ l       ] = b_C[ C.size()-1];
+       C[ l       ] = C.back();
+    in_C[ C.back()] = l;
+    in_C[ old_row ] = -1;
+       C.pop_back();
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    inv_M_B.swap_variable( k);
+    inv_M_B.swap_constraint( l);
+    inv_M_B.enter_slack_leave_original();
+}
+
+// update of the vector r with upper bounding for the removal of an
+// artificial variable with its equality constraint, note that we 
+// need the headings C before it is updated
+template < typename Q, typename ET, typename Tags >                                 // Standard form
+void  QP_solver<Q, ET, Tags>::
+remove_artificial_variable_and_constraint_upd_r(Tag_true )
+{
+}
+
+// update of the vector r with upper bounding for the removal of an
+// artificial variable with its equality constraint, note that we 
+// need the headings C before it is updated
+template < typename Q, typename ET, typename Tags >                                 // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+remove_artificial_variable_and_constraint_upd_r(Tag_false )
+{
+    int sigma_i = art_A[i - qp_n - slack_A.size()].first;
+    
+    // remove r_gamma_C(sigma_i) from r_C
+    r_C[in_C[sigma_i]] = r_C.back();
+    r_C.pop_back();
+}
+
+// update that occurs only with upper bounding in ratio test step 1
+template < typename Q, typename ET, typename Tags >            
+void  QP_solver<Q, ET, Tags>::
+enter_and_leave_variable( )
+{
+    
+    CGAL_qpe_assertion((i == j) && (i >= 0));
+    
+    CGAL_qpe_debug {
+	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
+	      << " enters and leaves basis" << std::endl << std::endl;
+    }
+
+    
+    ET diff;
+    ET x_j = nonbasic_original_variable_value(j);
+    
+    if (ratio_test_bound_index == LOWER) {
+        diff = x_j - ET(*(qp_l+j));
+    } else {
+        diff = x_j - ET(*(qp_u+j));
+    }
+    
+    if (is_phaseI) {
+        update_r_C_r_S_B__j(diff);
+    } else {
+        update_w_r_B_O__j(diff);
+        update_r_C_r_S_B__j(diff);
+    }
+    
+    x_O_v_i[j] = ratio_test_bound_index;
+    
+    // notify pricing strategy (it has called enter_basis on i before)
+    strategyP->leaving_basis (i);
+
+    // variable entered and left basis
+    i = -1; j = -1;
+}
+
+
+
+// enter variable into basis
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+enter_variable( )
+{
+  CGAL_qpe_assertion (is_phaseII);
+    CGAL_qpe_debug {
+	vout2 << "--> nonbasic (" << variable_type( j) << ") variable "
+	      << j << " enters basis" << std::endl << std::endl;
+    }
+
+    // update basis & basis inverse:
+    if (no_ineq || (j < qp_n)) {              // original variable
+    
+        // updates for the upper bounded case:
+        enter_variable_original_upd_w_r(Is_nonnegative());
+
+	// enter original variable [ in: j ]:
+	if (minus_c_B.size() <= B_O.size()) { // Note: minus_c_B and the
+					      // containers resized in this
+					      // if-block are only enlarged
+					      // and never made smaller
+					      // (while B_O always has the
+					      // correct size). We check here
+					      // whether we need to enlarge
+					      // them.
+	  CGAL_qpe_assertion(minus_c_B.size() == B_O.size());
+	    minus_c_B.push_back(et0);
+	        q_x_O.push_back(et0);
+	      tmp_x  .push_back(et0);
+	      tmp_x_2.push_back(et0);
+	     two_D_Bj.push_back(et0);
+	        x_B_O.push_back(et0);
+	}
+	minus_c_B[B_O.size()] = -ET(*(qp_c+ j)); // Note: B_O has always the
+					       // correct size.
+	
+	in_B[j] = static_cast<int>(B_O.size());
+	B_O.push_back(j);
+
+	// diagnostic output
+	CGAL_qpe_debug {
+	    if (vout2.verbose())
+	      print_basis();
+	}
+	    
+	// update basis inverse
+	// note: (-1)\hat{\nu} is stored instead of \hat{\nu}
+	inv_M_B.enter_original(q_lambda.begin(), q_x_O.begin(), -nu);
+	
+    } else {                                  // slack variable
+
+        // updates for the upper bounded case:
+        enter_variable_slack_upd_w_r(Is_nonnegative());
+
+	// enter slack variable [ in: j ]:
+	in_B  [ j] = static_cast<int>(B_S.size());
+	   B_S.push_back( j);
+	   S_B.push_back( slack_A[ j-qp_n].first);
+
+	// leave inequality constraint [ out: j ]:
+	int old_row = slack_A[ j-qp_n].first;
+	int k = in_C[old_row];
+	
+	// reflect change of active constraints heading C in b_C:
+	b_C[ k] = b_C[C.size()-1];
+		
+	   C[ k] = C.back();
+	in_C[ C.back()      ] = k;
+	in_C[ old_row       ] = -1;
+	   C.pop_back();
+	
+	// diagnostic output:
+	CGAL_qpe_debug {
+	    if (vout2.verbose())
+	      print_basis();
+	}
+
+	// update basis inverse:
+	inv_M_B.swap_constraint(k);  // swap to back
+	inv_M_B.enter_slack();       // drop drop
+    }
+
+    // variable entered:
+    j -= static_cast<int>(in_B.size());
+}
+
+// update of the vectors w and r for U_1 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+enter_variable_original_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_1 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded     
+void  QP_solver<Q, ET, Tags>::
+enter_variable_original_upd_w_r(Tag_false )
+{
+
+    ET      x_j = nonbasic_original_variable_value(j);
+
+    // Note: w needs to be updated before r_C, r_S_B
+    update_w_r_B_O__j(x_j);
+    update_r_C_r_S_B__j(x_j);
+    
+    // append w_j to r_B_O
+    if (!check_tag(Is_linear())) // (kf.)
+      r_B_O.push_back(w[j]);
+    
+    // update x_O_v_i
+    x_O_v_i[j] = BASIC;
+}
+
+// update of the vectors w and r for U_3 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+enter_variable_slack_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_3 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded     
+void  QP_solver<Q, ET, Tags>::
+enter_variable_slack_upd_w_r(Tag_false )
+{
+    
+    int     sigma_j = slack_A[ j-qp_n].first;       
+    
+    // append r_gamma_C(sigma_j) to r_S_B
+    r_S_B.push_back(r_C[in_C[sigma_j]]);
+    
+    // remove r_gamma_C(sigma_j) from r_C   
+    r_C[in_C[sigma_j]] = r_C.back();
+    r_C.pop_back();
+}
+
+// leave variable from basis
+template < typename Q, typename ET, typename Tags >
+void
+QP_solver<Q, ET, Tags>::
+leave_variable( )
+{
+    CGAL_qpe_debug {
+	vout2 << "<-- basic (" << variable_type( i) << ") variable "
+	      << i << " leaves basis" << std::endl << std::endl;
+    }
+
+    // update basis & basis inverse
+    int  k = in_B[ i];
+    if ( no_ineq || ( i < qp_n)) {                      // original variable
+        
+        // updates for the upper bounded case
+        leave_variable_original_upd_w_r(Is_nonnegative());
+
+	// leave original variable [ out: i ]
+	in_B  [ B_O.back()] = k;
+	in_B  [ i         ] = -1; 
+	//in_B  [ B_O.back()] = k;
+	   B_O[ k] = B_O.back(); B_O.pop_back();
+
+	minus_c_B [ k] = minus_c_B [ B_O.size()];
+	  two_D_Bj[ k] =   two_D_Bj[ B_O.size()];
+	  
+
+	// diagnostic output
+	CGAL_qpe_debug {
+	    if ( vout2.verbose()) print_basis();
+	}
+
+	// update basis inverse
+	inv_M_B.swap_variable( k);
+	inv_M_B.leave_original();
+
+    } else {                                            // slack variable
+        
+        // updates for the upper bounded case
+        leave_variable_slack_upd_w_r(Is_nonnegative());
+
+	// leave slack variable [ out: i ]
+	in_B  [ B_S.back()] = k;      // former last var moves to position k
+	in_B  [ i         ] = -1;     // i gets deleted
+	   B_S[ k] = B_S.back(); B_S.pop_back();
+	   S_B[ k] = S_B.back(); S_B.pop_back();
+
+	// enter inequality constraint [ in: i ]
+	int new_row = slack_A[ i-qp_n].first;
+
+	A_Cj[ C.size()] = ( j < qp_n ? ET( *((*(qp_A + j))+ new_row)) : et0);
+
+	 b_C[ C.size()] = ET( *(qp_b+ new_row));
+	in_C[ new_row ] = static_cast<int>(C.size());
+	   C.push_back( new_row);
+
+	// diagnostic output
+	CGAL_qpe_debug {
+	    if ( vout2.verbose()) print_basis();
+	}
+
+	// update basis inverse
+	A_row_by_index_accessor  a_accessor =
+	  boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
+	std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+		   A_row_by_index_iterator( B_O.end  (), a_accessor),
+		   tmp_x.begin());
+	inv_M_B.leave_slack( tmp_x.begin());
+    }
+
+    // notify pricing strategy
+    strategyP->leaving_basis( i);
+
+    // variable left
+    i = -1;
+}
+
+// update of the vectors w and r for U_2 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+leave_variable_original_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_2 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+leave_variable_original_upd_w_r(Tag_false )
+{
+
+    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+    
+    // Note: w needs to be updated before r_C, r_S_B
+    update_w_r_B_O__i(x_i);
+    update_r_C_r_S_B__i(x_i);    
+    
+    // remove r_beta_O(i) from r_B_O
+    if (!check_tag(Is_linear())) { // (kf.)
+      r_B_O[in_B[i]] = r_B_O.back();
+      r_B_O.pop_back();
+    }
+    
+    // update x_O_v_i
+    x_O_v_i[i] = ratio_test_bound_index;
+}
+
+// update of the vectors w and r for U_4 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+leave_variable_slack_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_4 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+leave_variable_slack_upd_w_r(Tag_false )
+{
+    
+    // append r_gamma_S_B(sigma_i) to r_C
+    r_C.push_back(r_S_B[in_B[i]]);
+    
+    // remove r_gamma_S_B(sigma_i) from r_S_B
+    r_S_B[in_B[i]] = r_S_B.back();
+    r_S_B.pop_back();
+}
+
+
+// replace variable in basis QP-case, transition to Ratio Test Step 2
+template < typename Q, typename ET, typename Tags >
+void QP_solver<Q, ET, Tags>::
+z_replace_variable( )
+{
+    CGAL_qpe_debug {
+	vout2 <<   "<--> nonbasic (" << variable_type( j) << ") variable " << j
+	      << " z_replaces basic (" << variable_type( i) << ") variable " << i
+	      << std::endl << std::endl;
+    }
+
+    // replace variable
+    z_replace_variable( no_ineq);
+
+    // pivot step not yet completely done
+    i = -1;
+    j -= static_cast<int>(in_B.size());
+    is_RTS_transition = true;
+}
+
+
+template < typename Q, typename ET, typename Tags >  inline                           // no inequalities
+void QP_solver<Q, ET, Tags>::
+z_replace_variable( Tag_true)
+{
+    z_replace_variable_original_by_original();
+    strategyP->leaving_basis(i);
+
+}
+
+
+template < typename Q, typename ET, typename Tags >  inline                          // has inequalities
+void QP_solver<Q, ET, Tags>::
+z_replace_variable( Tag_false)
+{
+    // determine type of variables
+    bool  enter_original = ( (j < qp_n) || (j >= static_cast<int>( qp_n+slack_A.size())));
+    bool  leave_original = ( (i < qp_n) || (i >= static_cast<int>( qp_n+slack_A.size())));
+
+    // update basis and basis inverse
+    if ( leave_original) {
+        if ( enter_original) {               
+	    z_replace_variable_original_by_original();
+	} else {                             
+	    z_replace_variable_original_by_slack();
+	}
+    } else {
+        if ( enter_original) {
+	    z_replace_variable_slack_by_original();
+	} else {
+	    z_replace_variable_slack_by_slack();
+	}
+    }
+    strategyP->leaving_basis( i);
+}
+
+
+// replacement with precond det(M_{B \setminus \{i\}})=0
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_original( )
+{
+    // updates for the upper bounded case
+    z_replace_variable_original_by_original_upd_w_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // replace original variable [ in: j | out: i ]
+    in_B  [ i] = -1;
+    in_B  [ j] = k;
+       B_O[ k] = j;
+
+    minus_c_B[ k] = -ET( *(qp_c+ j));
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+	
+    // compute s_delta
+    D_pairwise_accessor  d_accessor( qp_D, j);
+    ET                   s_delta =d_accessor(j)-d_accessor(i); 
+    	    
+    // update basis inverse
+    // note: (-1)\hat{\nu} is stored instead of \hat{\nu}
+    inv_M_B.z_replace_original_by_original( q_lambda.begin(), q_x_O.begin(), 
+        s_delta, -nu, k);
+
+}
+
+// update of the vectors w and r for U_Z_1 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form      
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_original_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_Z_1 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                           
+// Upper bounded      
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_original_upd_w_r(Tag_false )
+{
+
+    ET      x_j = nonbasic_original_variable_value(j);
+    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+    
+    // Note: w needs to be updated before r_C, r_S_B
+    update_w_r_B_O__j_i(x_j, x_i);
+    update_r_C_r_S_B__j_i(x_j, x_i);
+    
+    // replace r_beta_O(i) with w_j    
+    r_B_O[in_B[i]] = w[j];
+    
+    // update x_O_v_i
+    x_O_v_i[j] = BASIC;
+    x_O_v_i[i] = ratio_test_bound_index;    
+}
+
+
+// replacement with precond det(M_{B \setminus \{i\}})=0
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_slack( )
+{
+    // updates for the upper bounded case
+    z_replace_variable_original_by_slack_upd_w_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // leave original variable [ out: i ]
+    in_B  [ B_O.back()] = k;
+       B_O[ k] = B_O.back();
+       in_B  [ i         ] = -1;
+       B_O.pop_back();
+
+    minus_c_B[ k] = minus_c_B[ B_O.size()];
+
+    // enter slack variable [ in: j ]
+    int  old_row = slack_A[ j-qp_n].first;
+    in_B  [ j] = static_cast<int>(B_S.size());
+       B_S.push_back( j);
+       S_B.push_back( old_row);
+
+    // leave inequality constraint [ out: j ]
+    int  l = in_C[ old_row];
+     b_C[ l       ] = b_C[ C.size()-1];
+       C[ l       ] = C.back();
+    in_C[ C.back()] = l;
+    in_C[ old_row ] = -1;
+       C.pop_back();
+    
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    inv_M_B.swap_variable( k);
+    inv_M_B.swap_constraint( l);
+    inv_M_B.z_replace_original_by_slack( );
+
+}
+
+// update of the vectors w and r for U_Z_2 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                         // Standard form
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_slack_upd_w_r(Tag_true )
+{
+}
+
+
+// update of the vectors w and r for U_Z_2 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                         // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_original_by_slack_upd_w_r(Tag_false )
+{
+
+    ET      x_i = (ratio_test_bound_index == LOWER) ? *(qp_l+i) : *(qp_u+i);
+    
+    // Note: w needs to be updated before r_C, r_S_B
+    update_w_r_B_O__i(x_i);
+    update_r_C_r_S_B__i(x_i);
+    
+    int     sigma_j = slack_A[ j-qp_n].first;
+    
+    // append r_gamma_C(sigma_j) to r_S_B
+    r_S_B.push_back(r_C[in_C[sigma_j]]);
+    
+    // remove r_gamma_C(sigma_j) from r_C
+    r_C[in_C[sigma_j]] = r_C.back();
+    r_C.pop_back();
+    
+    // remove r_beta_O(i) from r_B_O    
+    if (!check_tag(Is_linear())) { // (kf.)
+      r_B_O[in_B[i]] = r_B_O.back();
+      r_B_O.pop_back();
+    }
+    
+    // update x_O_v_i
+    x_O_v_i[i] = ratio_test_bound_index;
+}
+
+
+// replacement with precond det(M_{B \setminus \{i\}})=0
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_original( )
+{
+    // updates for the upper bounded case
+    z_replace_variable_slack_by_original_upd_w_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+    if (minus_c_B.size() <= B_O.size()) {  // Note: minus_c_B and the
+					   // containers resized in this
+					   // if-block are only enlarged
+					   // and never made smaller
+					   // (while B_O always has the
+					   // correct size). We check here
+					   // whether we need to enlarge
+					   // them.
+      CGAL_qpe_assertion(minus_c_B.size() == B_O.size());
+	 minus_c_B.push_back(et0);
+	     q_x_O.push_back(et0);
+	   tmp_x  .push_back(et0);
+	   tmp_x_2.push_back(et0);
+	  two_D_Bj.push_back(et0);
+	     x_B_O.push_back(et0);
+    }
+
+    // enter original variable [ in: j ]
+
+    minus_c_B[ B_O.size()] = -ET( *(qp_c+ j));
+    
+
+    in_B  [ j] = static_cast<int>(B_O.size());
+       B_O.push_back( j);
+
+
+    // leave slack variable [ out: i ]
+       B_S[ k         ] = B_S.back();
+       S_B[ k         ] = S_B.back();
+    in_B  [ B_S.back()] = k;
+    in_B  [ i         ] = -1; 
+       B_S.pop_back();
+       S_B.pop_back();
+
+    // enter inequality constraint [ in: i ]
+    int new_row = slack_A[ i-qp_n].first;
+
+     b_C[ C.size()] = ET( *(qp_b+ new_row));
+    in_C[ new_row ] = static_cast<int>(C.size());
+       C.push_back( new_row);
+    
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    // --------------------
+
+    // prepare u
+    A_row_by_index_accessor  a_accessor =
+      boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row);
+    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+	       A_row_by_index_iterator( B_O.end  (), a_accessor),
+	       tmp_x.begin());
+    
+    
+    // prepare kappa
+    ET  kappa = d * ET(*((*(qp_A + j))+new_row)) 
+                - inv_M_B.inner_product_x( tmp_x.begin(), q_x_O.begin());
+		
+	// note: (-1)/hat{\nu} is stored instead of \hat{\nu}	 
+    inv_M_B.z_replace_slack_by_original( q_lambda.begin(), q_x_O.begin(),
+                                          tmp_x.begin(), kappa, -nu);    
+}
+
+// update of the vectors w and r for U_Z_3 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                            // Standard form
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_original_upd_w_r(Tag_true )
+{
+}
+
+// update of the vectors w and r for U_Z_3 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                             // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_original_upd_w_r(Tag_false )
+{
+
+    ET      x_j = nonbasic_original_variable_value(j);
+
+    // Note: w needs to be updated before r_C, r_S_B    
+    update_w_r_B_O__j(x_j);
+    update_r_C_r_S_B__j(x_j);
+        
+    // append r_gamma_S_B(sigma_i) to r_C
+    r_C.push_back(r_S_B[in_B[i]]);
+    
+    // remove r_gamma_S_B(sigma_i) from r_S_B
+    r_S_B[in_B[i]] = r_S_B.back();
+    r_S_B.pop_back();
+    
+    // append w_j to r_B_O    
+    if (!check_tag(Is_linear())) // (kf.)
+      r_B_O.push_back(w[j]);
+    
+    // update x_O_v_i
+    x_O_v_i[j] = BASIC;
+}
+
+
+// replacement with precond det(M_{B \setminus \{i\}})=0
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_slack( )
+{
+    // updates for the upper bounded case
+    z_replace_variable_slack_by_slack_upd_w_r(Is_nonnegative());
+    
+    int  k = in_B[ i];
+
+    // replace slack variable [ in: j | out: i ]
+    in_B  [ i] = -1;
+    in_B  [ j] = k;
+       B_S[ k] = j;
+       S_B[ k] = slack_A[ j-qp_n].first;
+
+    // replace inequality constraint [ in: i | out: j ]
+    int old_row = S_B[ k];
+    int new_row = slack_A[ i-qp_n].first;
+    k = in_C[ old_row];
+
+    in_C[ old_row] = -1;
+    in_C[ new_row] = k;
+       C[ k      ] = new_row;
+
+     b_C[ k] = ET( *(qp_b+ new_row));
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	    if ( vout2.verbose()) print_basis();
+    }
+
+    // update basis inverse
+    // --------------------
+    A_row_by_index_accessor  a_accessor =
+      boost::bind ( A_accessor( qp_A, 0, qp_n), _1, new_row);
+    std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor),
+	       A_row_by_index_iterator( B_O.end  (), a_accessor),
+	       tmp_x.begin());
+
+
+    inv_M_B.z_replace_slack_by_slack( tmp_x.begin(), k);
+}
+
+// update of the vectors w and r for U_Z_4 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                             // Standard form
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_slack_upd_w_r(Tag_true )
+{
+}
+
+
+// update of the vectors w and r for U_Z_4 with upper bounding, note that we 
+// need the headings C, S_{B}, B_{O} before they are updated
+template < typename Q, typename ET, typename Tags >                             // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+z_replace_variable_slack_by_slack_upd_w_r(Tag_false )
+{
+    
+    int     sigma_j = slack_A[ j-qp_n].first;
+    
+    // swap r_sigma_j in r_C with r_sigma_i in r_S_B
+    std::swap(r_C[in_C[sigma_j]], r_S_B[in_B[i]]);           
+}
+
+// update of the vectors r_C and r_S_B with "x_j" column
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_r_C_r_S_B__j(ET& x_j)
+{
+    // update of vector r_{C}
+    A_by_index_accessor     a_accessor_j(*(qp_A + j));
+    
+    A_by_index_iterator     A_C_j_it(C.begin(), a_accessor_j);
+    
+    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
+                                                    ++r_C_it, ++A_C_j_it) {
+        *r_C_it -= x_j * ET(*A_C_j_it); 
+    }
+    
+    // update of r_{S_{B}}
+    A_by_index_iterator     A_S_B_j_it(S_B.begin(), a_accessor_j);
+        
+    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
+                                                ++r_S_B_it, ++A_S_B_j_it) {
+        *r_S_B_it -= x_j * ET(*A_S_B_j_it);
+    }   
+}
+
+// update of the vectors r_C and r_S_B with "x_j" and "x_i" column
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_r_C_r_S_B__j_i(ET& x_j, ET& x_i)
+{
+    // update of vector r_{C}
+    A_by_index_accessor     a_accessor_j(*(qp_A+j));
+    A_by_index_accessor     a_accessor_i(*(qp_A+i));
+    
+    A_by_index_iterator     A_C_j_it(C.begin(), a_accessor_j);
+    A_by_index_iterator     A_C_i_it(C.begin(), a_accessor_i);
+    
+    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
+                                        ++r_C_it, ++A_C_j_it, ++A_C_i_it) {
+        *r_C_it += (x_i * ET(*A_C_i_it)) - (x_j * ET(*A_C_j_it)); 
+    }
+    
+    // update of vector r_{S_{B}}
+    A_by_index_iterator     A_S_B_j_it(S_B.begin(), a_accessor_j);
+    A_by_index_iterator     A_S_B_i_it(S_B.begin(), a_accessor_i);
+
+    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
+                                    ++r_S_B_it, ++A_S_B_j_it, ++A_S_B_i_it) {
+        *r_S_B_it += (x_i * ET(*A_S_B_i_it)) - (x_j * ET(*A_S_B_j_it)); 
+    }
+}
+
+// update of the vectors r_C and r_S_B with "x_i'" column
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_r_C_r_S_B__i(ET& x_i)
+{
+    // update of vector r_{C}
+    A_by_index_accessor     a_accessor_i(*(qp_A+i));
+    A_by_index_iterator     A_C_i_it(C.begin(), a_accessor_i);
+    
+    for (Value_iterator r_C_it = r_C.begin(); r_C_it != r_C.end(); 
+                                                    ++r_C_it, ++A_C_i_it) {
+        *r_C_it += x_i * ET(*A_C_i_it); 
+    }
+    
+    // update of r_{S_{B}}
+    A_by_index_iterator     A_S_B_i_it(S_B.begin(), a_accessor_i);
+    
+    for (Value_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
+                                                ++r_S_B_it, ++A_S_B_i_it) {
+        *r_S_B_it += x_i * ET(*A_S_B_i_it);
+    }   
+}
+
+
+// Update of w and r_B_O with "x_j" column.
+//
+// todo: could be optimized slightly by factoring out the factor 2
+// (which is implicitly contained in the pairwise accessor for D).
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_w_r_B_O__j(ET& x_j)
+{
+  // assertion checking:
+  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
+
+  // Note: we only do anything it we are dealing with a QP.
+  if (!check_tag(Is_linear())) {
+    D_pairwise_accessor     d_accessor_j(qp_D, j);
+    
+    // update of vector w:
+    for (int it = 0; it < qp_n; ++it)
+      w[it] -= d_accessor_j(it) * x_j;
+    
+    // update of r_B_O:
+    D_pairwise_iterator D_B_O_j_it(B_O.begin(), d_accessor_j);
+    for (Value_iterator r_B_O_it = r_B_O.begin();
+	 r_B_O_it != r_B_O.end();
+	 ++r_B_O_it, ++D_B_O_j_it)
+        *r_B_O_it -= *D_B_O_j_it * x_j;
+  }
+}
+
+// update of w and r_B_O with "x_j" and "x_i" column
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_w_r_B_O__j_i(ET& x_j, ET& x_i)
+{
+  // assertion checking:
+  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
+
+  // Note: we only do anything it we are dealing with a QP.
+  if (!check_tag(Is_linear())) {
+    D_pairwise_accessor     d_accessor_i(qp_D, i);
+    D_pairwise_accessor     d_accessor_j(qp_D, j);
+    
+    // update of vector w
+    for (int it = 0; it < qp_n; ++it)
+        w[it] += (d_accessor_i(it) * x_i) - (d_accessor_j(it) * x_j);
+    
+    // update of r_B_O
+    D_pairwise_iterator D_B_O_j_it(B_O.begin(), d_accessor_j);
+    D_pairwise_iterator D_B_O_i_it(B_O.begin(), d_accessor_i);
+    for (Value_iterator r_B_O_it = r_B_O.begin();
+	 r_B_O_it != r_B_O.end();
+	 ++r_B_O_it, ++D_B_O_j_it, ++D_B_O_i_it)
+        *r_B_O_it += (*D_B_O_i_it * x_i) - (*D_B_O_j_it * x_j);
+  }
+}
+
+// update of w and r_B_O with "x_i" column
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+update_w_r_B_O__i(ET& x_i)
+{
+  CGAL_expensive_assertion(!check_tag(Is_nonnegative()));
+
+  // Note: we only do anything it we are dealing with a QP.
+  if (!check_tag(Is_linear())) {
+
+    // update of vector w:
+    D_pairwise_accessor     d_accessor_i(qp_D, i);
+    
+    for (int it = 0; it < qp_n; ++it)
+        w[it] += d_accessor_i(it) * x_i;
+    
+    // update of r_B_O:
+    D_pairwise_iterator D_B_O_i_it(B_O.begin(), d_accessor_i);
+    for (Value_iterator r_B_O_it = r_B_O.begin();
+	 r_B_O_it != r_B_O.end();
+	 ++r_B_O_it, ++D_B_O_i_it)
+        *r_B_O_it += *D_B_O_i_it * x_i;
+  }
+}
+
+// Compute solution, meaning compute the solution vector x and the KKT
+// coefficients lambda.
+template < typename Q, typename ET, typename Tags >                                      // Standard form
+void  QP_solver<Q, ET, Tags>::
+compute_solution(Tag_true)
+{
+  // compute current solution, original variables and lambdas
+  inv_M_B.multiply( b_C.begin(), minus_c_B.begin(),
+		    lambda.begin(), x_B_O.begin());
+  
+  // compute current solution, slack variables
+  compute__x_B_S(no_ineq, Is_nonnegative());
+}
+
+// Compute solution, meaning compute the solution vector x and the KKT
+// coefficients lambda.
+template < typename Q, typename ET, typename Tags >                                      // Upper bounded
+void  QP_solver<Q, ET, Tags>::
+compute_solution(Tag_false)
+{ 
+  // compute the difference b_C - r_C
+  std::transform(b_C.begin(), b_C.begin()+C.size(), // Note: r_C.size() ==
+						    // C.size() always holds,
+						    // whereas b_C.size() >=
+						    // C.size() in general.
+		 r_C.begin(),  tmp_l.begin(), std::minus<ET>());
+        
+  // compute the difference minus_c_B - r_B_O:
+  if (is_phaseII && is_QP) {
+    std::transform(minus_c_B.begin(), minus_c_B.begin() + B_O.size(), 
+		   r_B_O.begin(), tmp_x.begin(), std::minus<ET>());
+    
+    // compute current solution, original variables and lambdas:
+    inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
+		      lambda.begin(), x_B_O.begin());
+  } else {                                          // r_B_O == 0
+    
+    // compute current solution, original variables and lambdas        
+    inv_M_B.multiply( tmp_l.begin(), minus_c_B.begin(),
+		      lambda.begin(), x_B_O.begin());
+  }
+  
+  // compute current solution, slack variables
+  compute__x_B_S( no_ineq, Is_nonnegative());
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+multiply__A_S_BxB_O(Value_iterator in, Value_iterator out) const
+{
+  // initialize with zero vector
+  std::fill_n( out, B_S.size(), et0);
+  
+  // foreach original column of A in B_O (artificial columns are zero in S_B
+  A_column              a_col;                             // except special)
+  Index_const_iterator  row_it, col_it;
+  Value_iterator        out_it;
+  //ET                    in_value;
+  for ( col_it = B_O.begin(); col_it != B_O.end(); ++col_it, ++in) {
+    const ET in_value = *in;
+    out_it   = out;
+    
+    if ( *col_it < qp_n) {	                        // original variable
+      a_col = *(qp_A+ *col_it);
+      
+      // foreach row of A in S_B
+      for ( row_it = S_B.begin(); row_it != S_B.end(); ++row_it,
+	      ++out_it) {
+	*out_it += ET( a_col[ *row_it]) * in_value;
+      }
+    } else {
+      if ( *col_it == art_s_i) {                  // special artificial
+	
+	// foreach row of 'art_s'
+	for ( row_it = S_B.begin(); row_it != S_B.end(); ++row_it,
+		++out_it) {
+	  *out_it += ET( art_s[ *row_it]) * in_value;
+	}
+      }
+    }
+  }
+}
+
+// compare the updated vector r_{C} with t_r_C=A_{C, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                         // Standard form
+bool  QP_solver<Q, ET, Tags>::
+check_r_C(Tag_true) const
+{
+    return true;
+}
+
+// compare the updated vector r_{C} with t_r_C=A_{C, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                         // Upper bounded
+bool  QP_solver<Q, ET, Tags>::
+check_r_C(Tag_false) const
+{
+    Values                  t_r_C;
+    // compute t_r_C from scratch
+    t_r_C.resize(C.size(), et0);
+    multiply__A_CxN_O(t_r_C.begin());
+    
+    // compare r_C and the from scratch computed t_r_C
+    bool failed = false;
+    int count = 0;
+    Value_const_iterator t_r_C_it = r_C.begin();
+    for (Value_const_iterator r_C_it = r_C.begin(); r_C_it != r_C.end();
+                                    ++r_C_it, ++t_r_C_it, ++count) {
+        if (*r_C_it != *t_r_C_it) {
+            failed = true;
+        }
+    }
+    return (!failed);
+}
+
+// compare the updated vector r_{S_B} with t_r_S_B=A_{S_B, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                             // Standard form
+bool  QP_solver<Q, ET, Tags>::
+check_r_S_B(Tag_true) const
+{
+    return true;
+}
+
+// compare the updated vector r_{S_B} with t_r_S_B=A_{S_B, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                             // Upper bounded
+bool  QP_solver<Q, ET, Tags>::
+check_r_S_B(Tag_false) const
+{
+    Values                  t_r_S_B;
+    // compute t_r_S_B from scratch
+    t_r_S_B.resize(S_B.size(), et0);
+    multiply__A_S_BxN_O(t_r_S_B.begin());
+    
+    // compare r_S_B and the from scratch computed t_r_S_B
+    bool failed = false;
+    int count = 0;
+    Value_const_iterator    t_r_S_B_it = t_r_S_B.begin();
+    for (Value_const_iterator r_S_B_it = r_S_B.begin(); r_S_B_it != r_S_B.end();
+                                    ++r_S_B_it, ++t_r_S_B_it, ++count) {
+        if (*r_S_B_it != *t_r_S_B_it) {
+            failed = true;
+        }
+    }
+    return (!failed);
+}
+
+
+// computes r_{B_{O}}:=2D_{B_O, N_O}x_{N_O} with upper bounding
+// OPTIMIZATION: If D is symmetric we can multiply by two at the end of the
+// computation of entry of r_B_O instead of each access to D
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+multiply__2D_B_OxN_O(Value_iterator out) const
+{
+    //initialize
+    std::fill_n( out, B_O.size(), et0);
+
+    Value_iterator          out_it;
+    ET                      value;
+    
+    // foreach entry in r_B_O
+    out_it = out;
+    for (Index_const_iterator row_it = B_O.begin(); row_it != B_O.end();
+                                                        ++row_it, ++out_it) {
+        D_pairwise_accessor d_accessor_i(qp_D, *row_it);
+        for (int i = 0; i < qp_n; ++i) {
+            if (!is_basic(i)) {
+                value = nonbasic_original_variable_value(i);
+                *out_it += d_accessor_i(i) * value;
+            }
+        }    
+    }
+}
+
+// compares the updated vector r_{B_O} with t_r_B_O=2D_{B_O, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                                // Standard form
+bool  QP_solver<Q, ET, Tags>::
+check_r_B_O(Tag_true) const
+{
+    return true;
+}
+
+// compares the updated vector r_{B_O} with t_r_B_O=2D_{B_O, N_O}x_{N_O}
+template < typename Q, typename ET, typename Tags >                                 // Upper bounded
+bool  QP_solver<Q, ET, Tags>::
+check_r_B_O(Tag_false) const
+{
+    Values                  t_r_B_O;
+    // compute t_r_B_O from scratch
+    t_r_B_O.resize(B_O.size(), et0);
+    multiply__2D_B_OxN_O(t_r_B_O.begin());
+    
+    // compare r_B_O and the from scratch computed t_r_B_O
+    bool failed = false;
+    int count = 0;
+    Value_const_iterator    t_r_B_O_it = t_r_B_O.begin();
+    for (Value_const_iterator r_B_O_it = r_B_O.begin(); r_B_O_it != r_B_O.end();
+                                    ++r_B_O_it, ++t_r_B_O_it, ++count) {
+        if (*r_B_O_it != *t_r_B_O_it) {
+            failed = true;
+        }
+    }
+    return (!failed);   
+}
+
+// compares the updated vector w with t_w=2D_{O,N_O}*x_N_O
+template < typename Q, typename ET, typename Tags >                             // Standard form
+bool  QP_solver<Q, ET, Tags>::
+check_w(Tag_true) const
+{
+    return true;
+}
+
+// compares the updated vector w with t_w=2D_O_N_O*x_N_O
+template < typename Q, typename ET, typename Tags >                             // Upper bounded
+bool  QP_solver<Q, ET, Tags>::
+check_w(Tag_false) const
+{
+    Values              t_w;
+    // compute t_w from scratch
+    t_w.resize( qp_n, et0);
+    multiply__2D_OxN_O(t_w.begin());
+    
+    // compare w and the from scratch computed t_w
+    bool  failed = false;
+    Value_const_iterator    t_w_it = t_w.begin();
+    for (int i = 0; i < qp_n; ++i, ++t_w_it) {
+        if (w[i] != *t_w_it) {
+            failed = true;
+        }
+    }
+    return (!failed);
+}
+
+// check basis inverse
+template < typename Q, typename ET, typename Tags >
+bool
+QP_solver<Q, ET, Tags>::
+check_basis_inverse()
+{
+    // diagnostic output
+    CGAL_qpe_debug {
+	vout4 << "check: " << std::flush;
+    }
+    bool ok;
+    if (is_phaseI) {
+    	ok = check_basis_inverse(Tag_true());
+    } else {
+        ok = check_basis_inverse( Is_linear());
+    }
+
+    // diagnostic output
+    CGAL_qpe_debug {
+	if ( ok) {
+	    vout4 << "check ok";
+	} else {
+	    vout4 << "check failed";
+	}
+	vout4 << std::endl;
+    }
+
+    return ok;
+}
+
+template < typename Q, typename ET, typename Tags >                                         // LP case
+bool  QP_solver<Q, ET, Tags>::
+check_basis_inverse( Tag_true)
+{
+    CGAL_qpe_debug {
+	vout4 << std::endl;
+    }
+    bool res = true;
+    unsigned int    row, rows =   static_cast<unsigned int>(C.size());
+    unsigned int    col, cols = static_cast<unsigned int>(B_O.size());
+    Index_iterator  i_it = B_O.begin();
+    Value_iterator  q_it;
+
+    
+    // BG: is this a real check?? How does the special artifical
+    // variable come in, e.g.? OK: it comes in through
+    // ratio_test_init__A_Cj
+    for ( col = 0; col < cols; ++col, ++i_it) {
+	ratio_test_init__A_Cj( tmp_l.begin(), *i_it,
+			       no_ineq);
+	inv_M_B.multiply_x( tmp_l.begin(), q_x_O.begin());
+
+	CGAL_qpe_debug {
+       	    if ( vout4.verbose()) {
+		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << " ||  ";
+		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << std::endl;
+	    }
+	}
+
+	q_it = q_x_O.begin();
+	for ( row = 0; row < rows; ++row, ++q_it) {
+	    if ( *q_it != ( row == col ? d : et0)) {
+		if ( ! vout4.verbose()) {
+		    std::cerr << std::endl << "basis-inverse check: ";
+		}
+		std::cerr << "failed ( row=" << row << " | col=" << col << " )"
+		          << std::endl;
+		res = false;
+	    }
+	}
+    }
+
+    return res;
+}
+
+template < typename Q, typename ET, typename Tags >                                         // QP case
+bool  QP_solver<Q, ET, Tags>::
+check_basis_inverse( Tag_false)
+{
+    bool res = true;
+    unsigned int    row, rows =   static_cast<unsigned int>(C.size());
+    unsigned int    col, cols = static_cast<unsigned int>(B_O.size());
+    Value_iterator  v_it;
+    Index_iterator  i_it;
+
+    CGAL_qpe_debug {
+	vout4 << std::endl;
+    }
+    // left part of M_B
+    std::fill_n( tmp_l.begin(), rows, et0);
+    for ( col = 0; col < rows; ++col) {
+
+	// get column of A_B^T (i.e. row of A_B)
+	row = ( has_ineq ? C[ col] : col);
+	v_it = tmp_x.begin();
+	for ( i_it = B_O.begin(); i_it != B_O.end(); ++i_it, ++v_it) {
+	    *v_it = ( *i_it < qp_n ? *((*(qp_A+ *i_it))+ row) :  // original
+		      art_A[ *i_it - qp_n].first != static_cast<int>(row) ? et0 :// artific.
+		      ( art_A[ *i_it - qp_n].second ? -et1 : et1));
+	}
+// 	if ( art_s_i >= 0) {              // special artificial variable?
+// 	  CGAL_qpe_assertion (static_cast<int>(in_B.size()) == art_s_i+1);  
+// 	  // the special artificial variable has never been
+// 	  // removed from the basis, consider it
+// 	  tmp_x[ in_B[ art_s_i]] = art_s[ row];
+// 	} 
+// BG: currently, this check only runs in phase II, where we have no
+// articficials
+	CGAL_qpe_assertion (art_s_i < 0);
+	
+	inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
+			  q_lambda.begin(), q_x_O.begin());
+
+	CGAL_qpe_debug {
+	    if ( vout4.verbose()) {
+		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << "| ";
+		std::copy( tmp_x.begin(), tmp_x.begin()+cols,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << " ||  ";
+		std::copy( q_lambda.begin(), q_lambda.begin()+rows,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << " |  ";
+		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << std::endl;
+	    }
+	}
+
+	v_it = q_lambda.begin();
+	for ( row = 0; row < rows; ++row, ++v_it) {
+	    if ( *v_it != ( row == col ? d : et0)) {
+		if ( ! vout4.verbose()) {
+		    std::cerr << std::endl << "basis-inverse check: ";
+		}
+		std::cerr << "failed ( row=" << row << " | col=" << col << " )"
+		          << std::endl;
+		//		return false;
+		res = false;
+	    }
+	}
+	v_it = std::find_if( q_x_O.begin(), q_x_O.begin()+cols,
+			     boost::bind2nd( std::not_equal_to<ET>(), et0));
+	if ( v_it != q_x_O.begin()+cols) {
+	    if ( ! vout4.verbose()) {
+		std::cerr << std::endl << "basis-inverse check: ";
+	    }
+	    std::cerr << "failed ( row=" << rows+(v_it-q_x_O.begin())
+		      << " | col=" << col << " )" << std::endl;
+	    // ToDo: return false;
+	    res = false;
+	}
+    }
+    vout4 << "= = = = = = = = = =" << std::endl;
+
+    // right part of M_B
+    if ( is_phaseI) std::fill_n( tmp_x.begin(), B_O.size(), et0);
+    i_it = B_O.begin();
+    for ( col = 0; col < cols; ++col, ++i_it) {
+	ratio_test_init__A_Cj  ( tmp_l.begin(), *i_it, 
+				 no_ineq);
+	ratio_test_init__2_D_Bj( tmp_x.begin(), *i_it, Tag_false());
+	inv_M_B.multiply( tmp_l.begin(), tmp_x.begin(),
+			  q_lambda.begin(), q_x_O.begin());
+
+	CGAL_qpe_debug {
+	    if ( vout4.verbose()) {
+		std::copy( tmp_l.begin(), tmp_l.begin()+rows,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << "| ";
+		std::copy( tmp_x.begin(), tmp_x.begin()+cols,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << " ||  ";
+		std::copy( q_lambda.begin(), q_lambda.begin()+rows,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << " |  ";
+		std::copy( q_x_O.begin(), q_x_O.begin()+cols,
+			   std::ostream_iterator<ET>( vout4.out(), " "));
+		vout4.out() << std::endl;
+	    }
+	}
+
+	v_it = std::find_if( q_lambda.begin(), q_lambda.begin()+rows,
+			     boost::bind2nd( std::not_equal_to<ET>(), et0));
+	if ( v_it != q_lambda.begin()+rows) {
+	    if ( ! vout4.verbose()) {
+		std::cerr << std::endl << "basis-inverse check: ";
+	    }
+	    std::cerr << "failed ( row=" << v_it-q_lambda.begin()
+		      << " | col=" << col << " )" << std::endl;
+	    //	    return false;
+	    res = false;
+	}
+	v_it = q_x_O.begin();
+	for ( row = 0; row < cols; ++row, ++v_it) {
+	    if ( *v_it != ( row == col ? d : et0)) {
+		if ( ! vout4.verbose()) {
+		    std::cerr << std::endl << "basis-inverse check: ";
+		}
+		std::cerr << "failed ( row=" << row+rows << " | col="
+			  << col << " )" << std::endl;
+		//		return false;
+		res = false;
+	    }
+	}
+    }
+    return res;
+}
+
+// filtered strategies are only allowed if the input type as
+// indicated by C_entry is double; this may still fail if the
+// types of some other program entries are not double, but 
+// since the filtered stuff is internal anyway, we can probably
+// live with this simple check
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+set_pricing_strategy
+( Quadratic_program_pricing_strategy strategy)
+{
+    CGAL_qpe_assertion( phase() != 1);
+    CGAL_qpe_assertion( phase() != 2);
+
+    if (strategy == QP_DANTZIG)
+      strategyP = new QP_full_exact_pricing<Q, ET, Tags>;
+    else if (strategy == QP_FILTERED_DANTZIG)    
+      // choose between FF (double) and FE (anything else)
+      strategyP = 
+	new typename QP_solver_impl::Filtered_pricing_strategy_selector
+	<Q, ET, Tags, C_entry>::FF;
+    else if (strategy == QP_PARTIAL_DANTZIG)
+      strategyP = new QP_partial_exact_pricing<Q, ET, Tags>;
+    else if (strategy == QP_PARTIAL_FILTERED_DANTZIG
+	     || strategy == QP_CHOOSE_DEFAULT)   
+      // choose between PF (double) and PE (anything else)
+      strategyP = 
+	new typename QP_solver_impl::Filtered_pricing_strategy_selector
+	<Q, ET, Tags, C_entry>::PF;
+    else if (strategy == QP_BLAND) 
+      strategyP = new QP_exact_bland_pricing<Q, ET, Tags>;
+    CGAL_qpe_assertion(strategyP != static_cast<Pricing_strategy*>(0));
+   
+    if ( phase() != -1) strategyP->set( *this, vout2);
+}
+
+// diagnostic output
+// -----------------
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+set_verbosity( int verbose, std::ostream& stream)
+{
+    vout  = Verbose_ostream( verbose >  0, stream);
+    vout1 = Verbose_ostream( verbose == 1, stream);
+    vout2 = Verbose_ostream( verbose >= 2, stream);
+    vout3 = Verbose_ostream( verbose >= 3, stream);
+    vout4 = Verbose_ostream( verbose == 4, stream);
+    vout5 = Verbose_ostream( verbose == 5, stream);
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+print_program( ) const
+{
+    int  row, i;
+
+    // objective function
+    vout4.out() << std::endl << "objective function:" << std::endl;
+    if ( is_QP) {
+	vout4.out() << "--> output of MATRIX must go here <--";
+	vout4.out() << std::endl;
+    }
+    std::copy( qp_c, qp_c+qp_n,
+	       std::ostream_iterator<C_entry>( vout4.out(), " "));
+    vout4.out() << "(+ " << qp_c0 << ") ";
+    vout4.out() << std::endl;
+    vout4.out() << std::endl;
+
+    // constraints
+    vout4.out() << "constraints:" << std::endl;
+    for ( row = 0; row < qp_m; ++row) {
+
+	// original variables
+	for (i = 0; i < qp_n; ++i) 
+	  vout4.out() << *((*(qp_A+ i))+row) << ' ';
+
+	// slack variables
+	if ( ! slack_A.empty()) {
+	    vout4.out() << " |  ";
+	    for ( i = 0; i < static_cast<int>(slack_A.size()); ++i) {
+		vout4.out() << ( slack_A[ i].first != row ? " 0" :
+		               ( slack_A[ i].second ? "-1" : "+1")) << ' ';
+	    }
+	}
+
+	// artificial variables
+	if ( ! art_A.empty()) {
+	    vout4.out() << " |  ";
+	    for ( i = 0; i < static_cast<int>(art_A.size()); ++i) {
+	      if (art_s_i == i+qp_n+static_cast<int>(slack_A.size()))
+		vout4.out() << " * ";          // for special artificial column
+	      vout4.out() << ( art_A[ i].first != row ? " 0" :
+		             ( art_A[ i].second ? "-1" : "+1")) << ' ';
+	    }
+	}
+	if ( ! art_s.empty()) vout4.out() << " |  " << art_s[ row] << ' ';
+
+	// rhs
+	vout4.out() << " |  "
+		    << ( *(qp_r+ row) == CGAL::EQUAL      ? ' ' :
+		       ( *(qp_r+ row) == CGAL::SMALLER ? '<' : '>')) << "=  "
+		    << *(qp_b+ row);
+		    if (!is_nonnegative) {
+		        vout4.out() << " - " << multiply__A_ixO(row);
+		    }
+		    vout4.out() << std::endl;
+    }
+    vout4.out() << std::endl;
+    
+    // explicit bounds
+    if (!is_nonnegative) {
+        vout4.out() << "explicit bounds:" << std::endl; 
+        for (int i = 0; i < qp_n; ++i) {
+            if (*(qp_fl+i)) {                   // finite lower bound
+                vout4.out() << *(qp_l+i);
+            } else {                            // infinite lower bound
+                vout4.out() << "-inf";
+            }
+            vout4.out() << " <= x_" << i << " <= ";
+            if (*(qp_fu+i)) {
+                vout4.out() << *(qp_u+i);
+            } else {
+                vout4.out() << "inf";
+            }
+            vout4.out() << std::endl;
+        }
+    }
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+print_basis( ) const
+{
+    char label;
+    vout << "  basis: ";
+    CGAL_qpe_debug {
+      vout2 << "basic variables" << ( has_ineq ? "  " : "") << ":  ";
+    }
+    std::copy( B_O.begin(), B_O.end  (),
+	       std::ostream_iterator<int>( vout.out(), " "));
+    CGAL_qpe_debug {
+      if ( vout2.verbose()) {
+	if ( has_ineq && ( ! slack_A.empty())) {
+	  vout2.out() << " |  ";
+	  std::copy( B_S.begin(), B_S.end(),
+		     std::ostream_iterator<int>( vout2.out(), " "));
+	}
+	if ( is_phaseI) {
+	  vout2.out() << " (# of artificials: " << art_basic << ')';
+	}
+	if ( has_ineq) {
+	  vout2.out() << std::endl
+		      << "basic constraints:  ";
+	  for (Index_const_iterator i_it = 
+		 C.begin(); i_it != C.end(); ++i_it) {
+	    label = (*(qp_r+ *i_it) == CGAL::EQUAL) ? 'e' : 'i';
+	    vout2.out() << *i_it << ":" << label << " ";
+	  }
+	  /*
+	    std::copy( C.begin(), C.begin()+(C.size()-slack_A.size()),
+	    std::ostream_iterator<int>( vout2.out(), " "));
+	    if ( ! slack_A.empty()) {
+	    vout2.out() << " |  ";
+	    std::copy( C.end() - slack_A.size(), C.end(),
+	    std::ostream_iterator<int>( vout2.out(), " "));
+	    }
+	  */
+	}
+	if ( vout3.verbose()) {
+	  vout3.out() << std::endl
+		      << std::endl
+		      << "    in_B: ";
+	  std::copy( in_B.begin(), in_B.end(),
+		     std::ostream_iterator<int>( vout3.out(), " "));
+	  if ( has_ineq) {
+	    vout3.out() << std::endl
+			<< "    in_C: ";
+	    std::copy( in_C.begin(), in_C.end(),
+		       std::ostream_iterator<int>( vout3.out(), " "));
+	  }
+	}
+      }
+    }
+    vout.out() << std::endl;
+    CGAL_qpe_debug {
+      vout4 << std::endl << "basis-inverse:" << std::endl;
+    }
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+print_solution( ) const
+{
+  CGAL_qpe_debug {
+    if ( vout3.verbose()) {
+	   vout3.out() << std::endl
+            << "     b_C: ";
+	   std::copy( b_C.begin(), b_C.begin()+C.size(),
+		   std::ostream_iterator<ET>( vout3.out()," "));
+	   vout3.out() << std::endl
+            << "  -c_B_O: ";
+	   std::copy( minus_c_B.begin(), minus_c_B.begin()+B_O.size(),
+		   std::ostream_iterator<ET>( vout3.out()," "));
+	   if (!is_nonnegative) {
+	       vout3.out() << std::endl
+                << "     r_C: ";
+	       std::copy( r_C.begin(), r_C.begin()+r_C.size(),
+	           std::ostream_iterator<ET>( vout3.out(), " "));
+	       vout3.out() << std::endl
+	           << "   r_B_O: ";
+	       std::copy( r_B_O.begin(), r_B_O.begin()+r_B_O.size(),
+	           std::ostream_iterator<ET>( vout3.out(), " "));
+	       if (r_B_O.size() == 0)
+		 vout3.out() << "< will only be allocated in phase II>";
+
+	   }
+	   vout3.out() << std::endl;
+    }
+    if ( vout2.verbose()) {
+        vout2.out() << std::endl << "  lambda: ";
+        std::copy( lambda.begin(), lambda.begin()+C.size(),
+            std::ostream_iterator<ET>( vout2.out(), " "));
+        vout2.out() << std::endl << "   x_B_O: ";
+        std::copy( x_B_O.begin(), x_B_O.begin()+B_O.size(),
+            std::ostream_iterator<ET>( vout2.out(), " "));
+        vout2.out() << std::endl;
+        if (!is_nonnegative) {
+            vout2.out() << "   x_N_O: ";
+            for (int i = 0; i < qp_n; ++i) {
+                if (!is_basic(i)) {
+                    vout2.out() << d * 
+		      nonbasic_original_variable_value(i);
+                    vout2.out() << " ";    
+                }
+            }
+            vout2.out() << std::endl;
+        }
+        if ( has_ineq) {
+            vout2.out() << "   x_B_S: ";
+            std::copy( x_B_S.begin(), x_B_S.begin()+B_S.size(),
+                std::ostream_iterator<ET>( vout2.out()," "));
+            vout2.out() << std::endl;
+        }
+        const ET denom = inv_M_B.denominator();
+        vout2.out() << "   denominator: " << denom << std::endl;
+        vout2.out() << std::endl;
+    }
+  }
+  vout << "  ";
+  vout.out() 
+    << "solution: " 
+    << solution_numerator() << " / " << solution_denominator() 
+    << "  ~= " 
+    << to_double
+    (CGAL::Quotient<ET>(solution_numerator(), solution_denominator()))
+    << std::endl;
+  CGAL_qpe_debug {
+      vout2 << std::endl;
+  }
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+print_ratio_1_original(int k, const ET& x_k, const ET& q_k)
+{
+    if (is_nonnegative) {                      // => direction== 1
+        if (q_k > et0) {                            // check for lower bound
+            vout2.out() << "t_O_" << k << ": "
+            << x_k << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+            << std::endl;
+        } else if (q_k < et0) {                     // check for upper bound
+            vout2.out() << "t_O_" << k << ": "
+            << "inf" << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+            << std::endl;
+        } else {                                    // q_k == 0
+            vout2.out() << "t_O_" << k << ": "
+            << "inf"
+            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+            << std::endl;
+        }
+    } else {                                        // upper bounded
+        if (q_k * ET(direction) > et0) {            // check for lower bound
+            if (B_O[k] < qp_n) {                         // original variable
+                if (*(qp_fl+B_O[k])) {                   // finite lower bound
+                    vout2.out() << "t_O_" << k << ": "
+                    << x_k - (d * ET(*(qp_l+B_O[k]))) << '/' << q_k
+                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                    << std::endl;
+                } else {                            // lower bound -infinity
+                    vout2.out() << "t_O_" << k << ": "
+                    << "-inf" << '/' << q_k
+                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                    << std::endl;                
+                }
+            } else {                                // artificial variable
+                vout2.out() << "t_O_" << k << ": "
+                << x_k << '/' << q_k
+                << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                << std::endl;
+            }
+        } else if (q_k * ET(direction) < et0) {     // check for upper bound
+            if (B_O[k] < qp_n) {                         // original variable
+                if (*(qp_fu+B_O[k])) {                   // finite upper bound
+                    vout2.out() << "t_O_" << k << ": "
+                    << (d * ET(*(qp_l+B_O[k]))) - x_k << '/' << q_k
+                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                    << std::endl;                    
+                } else {                            // upper bound infinity
+                    vout2.out() << "t_O_" << k << ": "
+                    << "inf" << '/' << q_k
+                    << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                    << std::endl;
+                }
+            } else {                                // artificial variable
+                vout2.out() << "t_O_" << k << ": "
+                << "inf" << '/' << q_k
+                << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+                << std::endl;
+            }
+        } else {                                    // q_k == 0
+            vout2.out() << "t_O_" << k << ": "
+            <<  "inf"
+            << ( ( q_i != et0) && ( i == B_O[ k]) ? " *" : "")
+            << std::endl;
+        }
+    }
+}
+
+template < typename Q, typename ET, typename Tags >
+void  QP_solver<Q, ET, Tags>::
+print_ratio_1_slack(int k, const ET& x_k, const ET& q_k)
+{
+    if (is_nonnegative) {                      // => direction == 1
+        if (q_k > et0) {                            // check for lower bound
+            vout2.out() << "t_S_" << k << ": "
+            << x_k << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
+            << std::endl;
+        } else {                                    // check for upper bound
+            vout2.out() << "t_S_" << k << ": "
+            << "inf" << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
+            << std::endl;        
+        }
+    } else {                                        // upper bounded
+        if (q_k * ET(direction) > et0) {            // check for lower bound
+            vout2.out() << "t_S_" << k << ": "
+            << x_k << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
+            << std::endl;            
+        } else if (q_k * ET(direction) < et0) {     // check for upper bound
+            vout2.out() << "t_S_" << k << ": "
+            << "inf" << '/' << q_k
+            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
+            << std::endl;
+        } else {                                    // q_k == 0
+            vout2.out() << "t_S_" << k << ": "
+            << "inf"
+            << ( ( q_i != et0) && ( i == B_S[ k]) ? " *" : "")
+            << std::endl;
+        }
+    }
+}
+
+
+template < typename Q, typename ET, typename Tags >
+const char*  QP_solver<Q, ET, Tags>::
+variable_type( int k) const
+{
+    return ( k <        qp_n                 ? "original"  :
+	   ( k < static_cast<int>( qp_n+slack_A.size()) ? "slack"     :
+	                                       "artificial"));
+}
+
+template < typename Q, typename ET, typename Tags > 
+bool QP_solver<Q, ET, Tags>::
+is_artificial(int k) const
+{
+    return (k >= static_cast<int>(qp_n+slack_A.size())); 
+}
+
+template < typename Q, typename ET, typename Tags > 
+int QP_solver<Q, ET, Tags>::
+get_l() const
+{
+    return l;
+}
+
+} //namespace CGAL
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/Unbounded_direction.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/Unbounded_direction.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/Unbounded_direction.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/Unbounded_direction.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/assertions.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/assertions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/QP_solver/basic.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/basic.h
new file mode 100644
index 0000000..691b6e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/basic.h
@@ -0,0 +1,35 @@
+// Copyright (c) 1997-2007  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr
+//                 Bernd Gaertner <gaertner at inf.ethz.ch>
+//                 Franz Wessendorp
+//                 Kaspar Fischer
+
+#ifndef CGAL_QP_SOLVER_BASIC_H
+#define CGAL_QP_SOLVER_BASIC_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Quotient.h>
+#include <CGAL/QP_solver/assertions.h>
+#include <CGAL/QP_solver/debug.h>
+#include <boost/functional.hpp>
+
+#endif // CGAL_QP_SOLVER_BASIC_H
+
+// ===== EOF ==================================================================
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/debug.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/QP_solver/functors.h b/3rdparty/CGAL-4.8/include/CGAL/QP_solver/functors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/QP_solver/functors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/QP_solver/functors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/AlphaShapeGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/AlphaShapeGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/AlphaShapeGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/AlphaShapeGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/CGAL_Qt_config.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/CGAL_Qt_config.h
new file mode 100644
index 0000000..89e5b3b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/CGAL_Qt_config.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_QT_CONFIG_H
+#define CGAL_QT_CONFIG_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(CGAL_Qt5_DLL)
+#  if defined(CGAL_Qt5_EXPORTS)
+#    define CGAL_QT_EXPORT Q_DECL_EXPORT
+#  else
+#    define CGAL_QT_EXPORT Q_DECL_IMPORT
+#  endif
+#else
+// empty definition
+#  define CGAL_QT_EXPORT
+#endif
+
+#endif // CGAL_QT_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/CircularArcGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/CircularArcGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/CircularArcGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/CircularArcGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/Converter.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/Converter.h
new file mode 100644
index 0000000..87ec13c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/Converter.h
@@ -0,0 +1,187 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+#ifndef CGAL_QT_CONVERTER_H
+#define CGAL_QT_CONVERTER_H
+
+#include <QPointF>
+#include <QLineF>
+#include <QRectF>
+#include <QPolygonF>
+#include <list>
+
+#include <CGAL/intersection_2.h>
+#include <CGAL/auto_link/Qt.h>
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace CGAL {
+
+namespace internal {
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF( Circular_arc_point_2 )
+
+template < class K, bool b = has_Circular_arc_point_2< K >::value >
+struct get_Circular_arc_point_2
+{
+    struct type { };
+};
+
+template < class K >
+struct get_Circular_arc_point_2< K, true >
+{
+    typedef typename K::Circular_arc_point_2 type;
+};
+
+}
+
+namespace Qt {
+
+template <typename K>
+class Converter {
+public:
+  typedef typename K::Point_2              CGAL_Point_2;
+  typedef typename K::Segment_2            CGAL_Segment_2;
+  typedef typename K::Ray_2                CGAL_Ray_2;
+  typedef typename K::Line_2               CGAL_Line_2;
+  typedef typename K::Triangle_2           CGAL_Triangle_2;
+  typedef typename K::Iso_rectangle_2      CGAL_Iso_rectangle_2;
+  typedef typename internal::get_Circular_arc_point_2< K >::type
+    CGAL_Circular_arc_point_2;
+
+private:
+  bool clippingRectIsInitialized;
+  CGAL_Iso_rectangle_2 clippingRect;
+  
+
+public:
+
+  Converter()
+    : clippingRectIsInitialized(false)
+  {
+  }
+
+  Converter(QRectF rect)
+  {
+    if(rect.isValid()) {
+      clippingRect = this->operator()(rect);
+      clippingRectIsInitialized = true;
+    }
+    else
+      clippingRectIsInitialized = false;
+  }
+
+  CGAL_Point_2 operator()(const QPointF& qp) const
+  {
+    return CGAL_Point_2(qp.x(), qp.y());
+  }
+
+
+  QPointF operator()(const CGAL_Point_2& p) const
+  {
+    return QPointF(to_double(p.x()), to_double(p.y()));
+  }
+
+  QPointF operator()(const CGAL_Circular_arc_point_2& p) const
+  {
+    return QPointF(to_double(p.x()), to_double(p.y()));
+  }
+
+      
+  CGAL_Segment_2 operator()(const QLineF& qs) const
+  {
+    return CGAL_Segment_2(operator()(qs.p1()), operator()(qs.p2()));
+  }
+ 
+  QLineF operator()(const CGAL_Segment_2 &s) const
+  {
+    return QLineF(operator()(s.source()), operator()(s.target()));
+  }
+
+  
+  CGAL_Iso_rectangle_2 operator()(const QRectF& qr) const
+  {
+    return CGAL_Iso_rectangle_2(operator()(qr.bottomLeft()), operator()(qr.topRight()));
+  }
+
+
+  QRectF operator()(const CGAL_Iso_rectangle_2& r) const
+  {
+    return QRectF(operator()(r[3]), operator()(r[1])).normalized();  // top left, bottom right
+  }
+
+
+  QRectF operator()(const CGAL::Bbox_2& bb) const
+  {
+    return QRectF(bb.xmin(),
+		  bb.ymin(),
+		  bb.xmax()-bb.xmin(),
+		  bb.ymax()-bb.ymin());
+  }
+
+     
+  QLineF operator()(const CGAL_Ray_2 &r) const
+  {
+    CGAL_assertion(clippingRectIsInitialized);
+    Object o = CGAL::intersection(r, clippingRect);
+    typedef CGAL_Segment_2 Segment_2;
+    typedef CGAL_Point_2 Point_2;
+    if(const Segment_2 *s = CGAL::object_cast<Segment_2>(&o)){
+      return this->operator()(*s);
+    } else if(const Point_2 *p = CGAL::object_cast<Point_2>(&o)){
+      return QLineF(operator()(*p), operator()(*p));
+    }
+    return QLineF();
+  }
+
+  QLineF operator()(const CGAL_Line_2 &l) const
+  {
+    CGAL_assertion(clippingRectIsInitialized);
+    Object o = CGAL::intersection(l, clippingRect);
+    typedef CGAL_Segment_2 Segment_2;
+    typedef CGAL_Point_2 Point_2;
+    if(const Segment_2 *s = CGAL::object_cast<Segment_2>(&o)){
+      return this->operator()(*s);
+    } else if(const Point_2 *p = CGAL::object_cast<Point_2>(&o)){
+      return QLineF(operator()(*p), operator()(*p));
+    }
+    return QLineF();
+  }
+
+  QPolygonF operator()(const CGAL_Triangle_2 &t) const
+  {
+    QPolygonF qp;
+    qp << operator()(t.vertex(0)) << operator()(t.vertex(1)) << operator()(t.vertex(2));
+    return qp;
+  }
+
+
+  void operator()(std::list< CGAL_Point_2 >& p, const QPolygonF& qp) const
+  {
+    for(int i = 0; i < qp.size(); i++){
+      p.push_back(operator()(qp[i]));
+    }
+  }
+
+};
+
+} // namespace Qt
+} // namespace CGAL
+#endif // CGAL_QT_CONVERTER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/CreateOpenGLContext.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/CreateOpenGLContext.h
new file mode 100644
index 0000000..429e04d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/CreateOpenGLContext.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2015  GeometryFactory SARL (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau and Maxime Gimeno
+#ifndef CGAL_QT_CREATE_OPENGL_CONTEXT_H
+#define CGAL_QT_CREATE_OPENGL_CONTEXT_H
+#include <QOpenGLContext>
+#include <QGLContext>
+namespace CGAL{
+namespace Qt{
+inline QGLContext* createOpenGLContext()
+{
+    QOpenGLContext *context = new QOpenGLContext();
+    QSurfaceFormat format;
+    format.setVersion(2,1);
+    format.setProfile(QSurfaceFormat::CompatibilityProfile);
+    context->setFormat(format);
+    QGLContext *result = QGLContext::fromOpenGLContext(context);
+    result->create();
+    return result;
+}
+} // namespace Qt
+} // namespace CGAL
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h
new file mode 100644
index 0000000..ad649c0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h
@@ -0,0 +1,301 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
+#define CGAL_QT_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
+
+#include <CGAL/Qt/ConstrainedTriangulationGraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+#include <QBrush>
+#include <QPen>
+#include <list>
+
+namespace CGAL {
+
+namespace Qt {
+
+template <typename T>
+class DelaunayMeshTriangulationGraphicsItem
+  : public ConstrainedTriangulationGraphicsItem<T>
+{
+  typedef ConstrainedTriangulationGraphicsItem<T> Base;
+  typedef typename T::Geom_traits Geom_traits;
+  typedef typename T::Point Point;
+
+public:
+  DelaunayMeshTriangulationGraphicsItem(T  * t_)
+    : Base(t_)
+    , visible_in_domain(true)
+    , visible_blind_faces(false)
+    , visible_voronoi(false)
+    , visible_seeds(false)
+    , visible_inside_edges(false)
+    , seeds_begin()
+    , seeds_end()
+    , in_domain_brush(::Qt::blue)
+    , blind_brush(::Qt::gray)
+  {
+    setSeedsPen(QPen(::Qt::black, 10.));
+  }
+  
+  void operator()(typename T::Face_handle fh);
+
+  const QBrush& facesInDomainBrush() const
+  {
+    return in_domain_brush;
+  }
+
+  void setFacesInDomainBrush(const QBrush& brush)
+  {
+    in_domain_brush = brush;
+  }
+
+  const QBrush& blindFacesBrush() const
+  {
+    return blind_brush;
+  }
+
+  void setBlindFacesBrush(const QBrush& brush)
+  {
+    blind_brush = brush;
+  }
+
+  bool visibleFacesInDomain() const
+  {
+    return visible_in_domain;
+  }
+
+  void setVisibleFacesInDomain(const bool b)
+  {
+    visible_in_domain = b;
+    this->update();
+  }
+
+  bool visibleBlindFaces() const
+  {
+    return visible_blind_faces;
+  }
+
+  void setVisibleBlindFaces(const bool b)
+  {
+    visible_blind_faces = b;
+    this->update();
+  }
+
+  bool visibleSeeds() const
+  {
+    return visible_seeds;
+  }
+
+  void setVisibleSeeds(const bool b,
+    typename std::list<Point>::iterator begin,
+    typename std::list<Point>::iterator end)
+  {
+    visible_seeds = b;
+    seeds_begin = begin;
+    seeds_end = end;
+    this->update();
+  }
+
+  const QPen& voronoiPen() const
+  {
+    return voronoi_pen;
+  }
+
+  void setVoronoiPen(const QPen& pen)
+  {
+    voronoi_pen = pen;
+  }
+
+  const QPen& seedsPen() const
+  {
+    return seeds_pen;
+  }
+
+  void setSeedsPen(const QPen& pen)
+  {
+    seeds_pen = pen;
+  }
+
+  bool visibleVoronoiEdges() const
+  {
+    return visible_voronoi;
+  }
+
+  void setVisibleVoronoiEdges(const bool b)
+  {
+    visible_voronoi = b;
+    this->update();
+  }
+
+  bool visibleInsideEdges() const
+  {
+    return visible_inside_edges;
+  }
+
+  void setVisibleInsideEdges(const bool b)
+  {
+    visible_inside_edges = b;
+    this->update();
+  }
+
+
+protected:
+  void drawAll(QPainter *painter);
+  void paintSeeds(QPainter *painter);
+
+  bool visible_in_domain;
+  bool visible_blind_faces;
+  bool visible_voronoi;
+  bool visible_seeds;
+  bool visible_inside_edges;
+  typename std::list<Point>::iterator seeds_begin, seeds_end;
+  
+  QBrush in_domain_brush;
+  QBrush blind_brush;
+  QPen voronoi_pen;
+  QPen seeds_pen;
+};
+
+template <typename T>
+void 
+DelaunayMeshTriangulationGraphicsItem<T>::drawAll(QPainter *painter)
+{
+  if(visibleFacesInDomain())
+  {
+    this->painterostream = PainterOstream<typename T::Geom_traits>(painter);
+    painter->setBrush(facesInDomainBrush());
+    painter->setPen(::Qt::NoPen);
+    for(typename T::Finite_faces_iterator fit = this->t->finite_faces_begin();
+	fit != this->t->finite_faces_end();
+	++fit){
+      if(fit->is_in_domain()){
+	this->painterostream << this->t->triangle(fit);
+      }
+    }
+    painter->setBrush(::Qt::NoBrush);
+  }
+  if(visibleInsideEdges())
+  {
+    this->painterostream = PainterOstream<typename T::Geom_traits>(painter);
+    painter->setBrush(::Qt::NoBrush);
+    painter->setPen(this->edgesPen());
+    for(typename T::Finite_faces_iterator fit = this->t->finite_faces_begin();
+        fit != this->t->finite_faces_end();
+        ++fit){
+      if(fit->is_in_domain()){
+        this->painterostream << this->t->triangle(fit);
+      }
+    }
+    painter->setBrush(::Qt::NoBrush);
+  }
+  if(visibleBlindFaces())
+  {
+    this->painterostream = PainterOstream<typename T::Geom_traits>(painter);
+    painter->setBrush(blindFacesBrush());
+    painter->setPen(::Qt::NoPen);
+    for(typename T::Finite_faces_iterator fit = this->t->finite_faces_begin();
+	fit != this->t->finite_faces_end();
+	++fit){
+      if(fit->is_blind()){
+	this->painterostream << this->t->triangle(fit);
+      }
+    }
+    painter->setBrush(::Qt::NoBrush);
+  }
+  if(this->visibleVoronoiEdges())
+  {
+    painter->setBrush(::Qt::NoBrush);
+    painter->setPen(::Qt::darkGreen);
+    //painter->setPen(this->voronoiPen());
+
+    this->painterostream = PainterOstream<typename T::Geom_traits>(painter);
+    typedef CGAL::Cvd_cell_2<T> Cvd_cell;
+    for(typename T::Finite_vertices_iterator
+          vit = this->t->finite_vertices_begin();
+          vit != this->t->finite_vertices_end();
+          ++vit)
+    {
+      Cvd_cell cell = CGAL::dual(*(this->t), vit);
+      for(typename Cvd_cell::segment_iterator sit = cell.segments_begin();
+        sit != cell.segments_end();
+        ++sit)
+      {
+        this->painterostream << *sit;
+      }
+      for(typename Cvd_cell::ray_iterator rit = cell.rays_begin();
+        rit != cell.rays_end();
+        ++rit)
+      {
+        this->painterostream << *rit;
+      }
+    }
+  }
+  paintSeeds(painter);
+
+  Base::drawAll(painter);
+}
+
+template <typename T>
+void
+DelaunayMeshTriangulationGraphicsItem<T>::paintSeeds(QPainter *painter)
+{
+  if(this->visibleSeeds())
+  {
+    Converter<Geom_traits> convert;
+    painter->setPen(this->seedsPen());
+    QMatrix matrix = painter->matrix();
+    painter->resetMatrix();
+
+    typename std::list<Point>::iterator sit;
+    for(sit = seeds_begin; sit != seeds_end; ++sit)
+      painter->drawPoint(matrix.map(convert(*sit)));
+
+    painter->setMatrix(matrix);
+  }
+}
+
+template <typename T>
+void 
+DelaunayMeshTriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
+{
+  if(visibleFacesInDomain()) {
+    if(fh->is_in_domain()){
+      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
+      this->m_painter->setBrush(facesInDomainBrush());
+      this->m_painter->setPen(::Qt::NoPen) ;
+      this->painterostream << this->t->triangle(fh);
+    }
+  }
+  if(visibleBlindFaces()) {
+    if(fh->is_blind()){
+      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
+      this->m_painter->setBrush(blindFacesBrush());
+      this->m_painter->setPen(::Qt::NoPen) ;
+      this->painterostream << this->t->triangle(fh);
+    }
+  }
+  Base::operator()(fh);
+}
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_Q_DELAUNAY_MESH_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow.h
new file mode 100644
index 0000000..6339c81
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow.h
@@ -0,0 +1,135 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_DEMOS_MAIN_WINDOW_H
+#define CGAL_QT_DEMOS_MAIN_WINDOW_H
+
+#include <iostream>
+#include <QVector>
+#include <QMainWindow>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+
+#include <CGAL/auto_link/Qt.h>
+#include <CGAL/export/Qt.h>
+#include <CGAL/Qt/resources.h>
+
+// forward declaration
+class QLabel;
+class QGraphicsView;
+class QAction;
+class QMenu;
+
+namespace CGAL {
+namespace Qt {
+
+// forward declaration
+class GraphicsViewNavigation;
+
+class CGAL_QT_EXPORT DemosMainWindow : public QMainWindow 
+{
+  Q_OBJECT
+
+public:
+  enum Option { NoOption = 0x0,
+		Size     = 0x1,
+		Position = 0x2,
+		State    = 0x4};
+
+  Q_DECLARE_FLAGS(Options, Option)
+
+  virtual void dragEnterEvent(QDragEnterEvent *event);
+  virtual void dropEvent(QDropEvent *event);
+
+  virtual void open(QString)
+  {
+    std::cerr << "You should implement open(QString);" << std::endl; 
+  }
+
+public:
+  unsigned int maxNumberOfRecentFiles() const ;
+
+public Q_SLOTS:
+  void setMaxNumberOfRecentFiles(const unsigned int);
+
+private:
+  QMenu* getMenu(QString objectName, QString title);
+  void popupAboutBox(QString title, QString html_resource_name);
+  QMenu* getHelpMenu();
+
+protected:
+  DemosMainWindow (QWidget * parent = 0, ::Qt::WindowFlags flags = 0 );
+  ~DemosMainWindow();
+  void setupStatusBar();
+  void addNavigation(QGraphicsView*);
+  void setupOptionsMenu(QMenu* menu  = 0);
+  void addAboutCGAL(QMenu* menu  = 0);
+  void addAboutDemo(QString htmlResourceName, QMenu* menu  = 0);
+  void setupExportSVG(QAction*, QGraphicsView*);
+
+  void addRecentFiles(QMenu* menu, QAction* insertBefore = 0);
+
+  void writeState(QString groupname = "MainWindow");
+  void readState(QString groupname = "MainWindow",
+		 Options what_to_save = Options(Size|State));
+
+protected Q_SLOTS:
+  void setUseAntialiasing(bool checked);
+  void setUseOpenGL(bool checked);
+  void popupAboutCGAL();
+  void popupAboutDemo();
+
+  void exportSVG();
+
+  void openRecentFile_aux();
+  void addToRecentFiles(QString fileName);
+  void updateRecentFileActions();
+
+Q_SIGNALS:
+  void openRecentFile(QString filename);
+
+protected:
+  QGraphicsView* view;
+  GraphicsViewNavigation* navigation;
+  QLabel* xycoord ;
+
+  QAction *actionUse_OpenGL;
+  QAction *actionUse_Antialiasing;
+  QAction *actionAbout;
+  QAction *actionAboutCGAL;
+
+  QString aboutHtmlResource;
+
+  QAction* recentFilesSeparator;
+  unsigned int maxNumRecentFiles;
+  QVector<QAction*> recentFileActs;
+}; // end class DemosMainWindow
+
+} // namespace Qt
+} // namespace CGAL
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(CGAL::Qt::DemosMainWindow::Options)
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/DemosMainWindow_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_DEMOS_MAIN_WINDOW_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow_impl.h
new file mode 100644
index 0000000..32fa867
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/DemosMainWindow_impl.h
@@ -0,0 +1,474 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Qt/GraphicsViewNavigation.h>
+#include <QApplication>
+#include <QLabel>
+#include <QFile>
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QMenu>
+#include <QMenuBar>
+#include <QAction>
+#include <QMessageBox>
+#include <QStatusBar>
+#include <QGraphicsView>
+#include <QGLWidget>
+#include <QTextStream>
+#include <QSettings>
+#include <QUrl>
+#include <QDesktopWidget>
+#include <QRegExp>
+#include <QSvgGenerator>
+#include <QtCore>
+#include <QtOpenGL>
+
+#include <CGAL/config.h> // needed to get CGAL_VERSION_STR
+#include <CGAL/Qt/DemosMainWindow.h>
+#include <iostream>
+
+namespace CGAL {
+namespace Qt {
+
+CGAL_INLINE_FUNCTION
+DemosMainWindow::DemosMainWindow(QWidget * parent, ::Qt::WindowFlags flags)
+  : QMainWindow(parent, flags),
+    maxNumRecentFiles(10),
+    recentFileActs(maxNumRecentFiles)
+{
+  // prepare the QLabel xycoord for inclusion in the statusBar()
+  xycoord = new QLabel(" -0.00000 , -0.00000 ", this);
+  xycoord->setAlignment(::Qt::AlignHCenter);
+  xycoord->setMinimumSize(xycoord->sizeHint());
+  xycoord->clear();
+
+  actionUse_OpenGL = new QAction(this);
+  actionUse_OpenGL->setObjectName("actionUse_OpenGL");
+  actionUse_OpenGL->setCheckable(true);
+  actionUse_OpenGL->setText(tr("Use &OpenGL"));
+  actionUse_OpenGL->setStatusTip(tr("Make Qt use OpenGL to display the graphical items, instead of its native painting system."));
+  actionUse_OpenGL->setShortcut(tr("Ctrl+G"));
+
+  actionUse_Antialiasing = new QAction(this);
+  actionUse_Antialiasing->setObjectName("actionUse_Antialiasing");
+  actionUse_Antialiasing->setCheckable(true);
+  actionUse_Antialiasing->setText(tr("Use &anti-aliasing"));
+  actionUse_Antialiasing->setStatusTip(tr("Make Qt use anti-aliasing when displaying the graphical items."));
+  actionUse_Antialiasing->setShortcut(tr("Ctrl+A"));
+
+  actionAboutCGAL = new QAction(this);
+  actionAboutCGAL->setObjectName("actionAboutCGAL");
+  actionAboutCGAL->setText(tr("About &CGAL..."));
+
+  actionAbout = new QAction(this);
+  actionAbout->setObjectName("actionAbout");
+  actionAbout->setText(tr("&About..."));
+
+  setAcceptDrops(true);
+}
+
+CGAL_INLINE_FUNCTION
+DemosMainWindow::~DemosMainWindow()
+{
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+  if (event->mimeData()->hasFormat("text/uri-list"))
+    event->acceptProposedAction();
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::dropEvent(QDropEvent *event)
+{
+  Q_FOREACH(QUrl url, event->mimeData()->urls()) {
+    QString filename = url.toLocalFile();
+    this->open(filename);
+  }
+  event->acceptProposedAction();
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::addNavigation(QGraphicsView* graphicsView)
+{
+  navigation = new CGAL::Qt::GraphicsViewNavigation();
+  graphicsView->viewport()->installEventFilter(navigation);
+  graphicsView->installEventFilter(navigation);
+  QObject::connect(navigation, SIGNAL(mouseCoordinates(QString)),
+		   xycoord, SLOT(setText(QString)));
+  view = graphicsView;
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setupStatusBar()
+{
+  this->statusBar()->addWidget(new QLabel(this), 1);
+  this->statusBar()->addWidget(xycoord, 0);
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setupOptionsMenu(QMenu* menuOptions)
+{
+  // search for the Options menu
+  if(!menuOptions) {
+    menuOptions = getMenu("menuOptions", tr("&Options"));
+  }
+
+  // if not found, then create it
+  if(!menuOptions) {
+    menuOptions = new QMenu(this->menuBar());
+    menuOptions->setTitle(tr("&Options"));
+    this->menuBar()->addAction(menuOptions->menuAction());
+    menuOptions->setObjectName("menuOptions");
+  }
+
+  if(!menuOptions->isEmpty()) {
+    menuOptions->addSeparator();
+  }
+  menuOptions->addAction(actionUse_OpenGL);
+  menuOptions->addAction(actionUse_Antialiasing);
+  connect(actionUse_Antialiasing, SIGNAL(toggled(bool)),
+          this, SLOT(setUseAntialiasing(bool)));
+  connect(actionUse_OpenGL, SIGNAL(toggled(bool)),
+          this, SLOT(setUseOpenGL(bool)));
+  actionUse_Antialiasing->setChecked(true);
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setupExportSVG(QAction* action, QGraphicsView* view)
+{
+  this->view = view;
+  connect(action, SIGNAL(triggered(bool)),
+	  this, SLOT(exportSVG()));
+}
+
+CGAL_INLINE_FUNCTION
+void DemosMainWindow::exportSVG()
+{
+  QString fileName = QFileDialog::getSaveFileName(this,
+						  tr("Export to SVG"),
+						  ".",
+						  tr("SVG (*.svg)\n"));
+
+  QSvgGenerator svg;
+  svg.setFileName(fileName);
+
+  svg.setSize(this->view->size());
+  svg.setViewBox(this->view->sceneRect());
+  svg.setTitle(tr("%1 drawing").arg(qApp->applicationName()));
+  svg.setDescription(tr("Generated using %1").arg(qApp->applicationName()));
+
+  QPainter painter;
+  painter.begin(&svg);
+  this->view->render(&painter);
+  painter.end();
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setUseAntialiasing(bool checked)
+{
+  view->setRenderHint(QPainter::Antialiasing, checked);
+  view->setRenderHint(QPainter::HighQualityAntialiasing, checked);
+
+  statusBar()->showMessage(tr("Antialiasing %1activated").arg(checked?"":"de-"),
+                           1000);
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setUseOpenGL(bool checked)
+{ 
+  if(checked) {
+    QGLWidget* new_viewport = new QGLWidget;
+
+    // Setup the format to allow antialiasing with OpenGL:
+    // one need to activate the SampleBuffers, if the graphic driver allows
+    // this.
+    QGLFormat glformat = new_viewport->format();
+    glformat.setOption(QGL::SampleBuffers);
+    new_viewport->setFormat(glformat);
+
+    view->setViewport(new_viewport);
+  }
+  else {
+    view->setViewport(new QWidget);
+  }
+  statusBar()->showMessage(tr("OpenGL %1activated").arg(checked?"":"de-"),
+                           1000);
+  view->viewport()->installEventFilter(navigation);
+  view->setFocus();
+}
+
+CGAL_INLINE_FUNCTION
+QMenu* 
+DemosMainWindow::getMenu(QString objectName, QString title)
+{
+  QMenu* menu = NULL;
+
+  QString title2 = title;
+  title2.remove('&');
+  // search if a menu has objectName()==objectName
+  menu = this->findChild<QMenu*>(objectName);
+
+  // then search if a menu has title()==title
+  if(menu) {
+    return menu;
+  } else {
+    Q_FOREACH(menu, this->findChildren<QMenu*>()) {
+      if(menu->title() == title ||
+         menu->title() == title2) {
+        return menu;
+      }
+    }
+  }
+  return NULL;
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::popupAboutBox(QString title, QString html_resource_name)
+{
+  QFile about_CGAL(html_resource_name);
+  about_CGAL.open(QIODevice::ReadOnly);
+  QString about_CGAL_txt = QTextStream(&about_CGAL).readAll();
+#ifdef CGAL_VERSION_STR
+  QString cgal_version(CGAL_VERSION_STR);
+#  ifdef CGAL_FAKE_PUBLIC_RELEASE
+  cgal_version.replace(QRegExp("-Ic?.*"), "");
+#  endif
+  about_CGAL_txt.replace("<!--CGAL_VERSION-->",
+                         QString(" (version %1)")
+                         .arg(cgal_version));
+#endif
+  QMessageBox mb(QMessageBox::NoIcon,
+                 title,
+                 about_CGAL_txt,
+                 QMessageBox::Ok,
+                 this);
+
+  QLabel* mb_label = mb.findChild<QLabel*>("qt_msgbox_label");
+  if(mb_label) {
+    mb_label->setTextInteractionFlags(mb_label->textInteractionFlags() | 
+                                      ::Qt::LinksAccessibleByMouse | 
+                                      ::Qt::LinksAccessibleByKeyboard);
+  }
+  else {
+    std::cerr << "Cannot find child \"qt_msgbox_label\" in QMessageBox\n"
+              << "  with Qt version " << QT_VERSION_STR << "!\n";
+  }
+  mb.exec();
+}
+
+CGAL_INLINE_FUNCTION
+QMenu* DemosMainWindow::getHelpMenu()
+{
+  QMenu* menuHelp = getMenu("menuHelp", tr("&Help"));
+  if(!menuHelp) {
+    menuHelp = new QMenu(this->menuBar());
+    menuHelp->setTitle(tr("&Help"));
+    this->menuBar()->addAction(menuHelp->menuAction());
+    menuHelp->setObjectName("menuHelp");
+  }
+  return menuHelp;
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::addAboutCGAL(QMenu* menuHelp)
+{
+  if(!menuHelp) {
+    menuHelp = getHelpMenu();
+  }
+  menuHelp->addAction(actionAboutCGAL);
+
+  connect(actionAboutCGAL, SIGNAL(triggered()),
+          this, SLOT(popupAboutCGAL()));
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::addAboutDemo(QString htmlResourceName, QMenu* menuHelp)
+{
+  if(!menuHelp) {
+    menuHelp = getHelpMenu();
+  }
+  menuHelp->addAction(actionAbout);
+  aboutHtmlResource = htmlResourceName;
+
+  connect(actionAbout, SIGNAL(triggered()),
+          this, SLOT(popupAboutDemo()));
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::popupAboutCGAL()
+{
+  popupAboutBox(tr("About CGAL..."),
+                ":/cgal/help/about_CGAL.html");
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::popupAboutDemo()
+{
+  popupAboutBox(tr("About the demo..."),
+                aboutHtmlResource);
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::setMaxNumberOfRecentFiles(const unsigned int i)
+{
+  maxNumRecentFiles = i;
+  recentFileActs.resize(maxNumRecentFiles);
+}
+
+CGAL_INLINE_FUNCTION
+unsigned int 
+DemosMainWindow::maxNumberOfRecentFiles() const
+{
+  return maxNumRecentFiles;
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::openRecentFile_aux()
+{
+  QAction *action = qobject_cast<QAction *>(sender());
+  if (action)
+    emit openRecentFile(action->data().toString());
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::addToRecentFiles(QString fileName)
+{
+  QSettings settings;
+  QStringList files = settings.value("recentFileList").toStringList();
+  files.removeAll(fileName);
+  files.prepend(fileName);
+  while (files.size() > (int)maxNumberOfRecentFiles())
+    files.removeLast();
+
+  settings.setValue("recentFileList", files);
+
+  updateRecentFileActions();
+}
+
+CGAL_INLINE_FUNCTION
+void
+DemosMainWindow::addRecentFiles(QMenu* menu, QAction* insertBeforeAction)
+{
+  if(!insertBeforeAction) {
+    recentFilesSeparator = menu->addSeparator();
+  }
+
+  for (unsigned int i = 0; i < maxNumberOfRecentFiles(); ++i) {
+    recentFileActs[i] = new QAction(this);
+    recentFileActs[i]->setVisible(false);
+    connect(recentFileActs[i], SIGNAL(triggered()),
+            this, SLOT(openRecentFile_aux()));
+    if(insertBeforeAction)
+      menu->insertAction(insertBeforeAction, recentFileActs[i]);
+    else
+      menu->addAction(recentFileActs[i]);
+  }
+
+  if(insertBeforeAction) {
+    recentFilesSeparator = menu->insertSeparator(insertBeforeAction);
+  }
+
+  recentFilesSeparator->setVisible(false);
+
+  updateRecentFileActions();
+}
+
+CGAL_INLINE_FUNCTION
+void 
+DemosMainWindow::updateRecentFileActions()
+{
+  QSettings settings;
+  QStringList files = settings.value("recentFileList").toStringList();
+
+  int numRecentFiles = qMin(files.size(), (int)this->maxNumberOfRecentFiles());
+  
+  for (int i = 0; i < numRecentFiles; ++i) {
+    QString strippedName = QFileInfo(files[i]).fileName();
+    QString text = tr("&%1 %2").arg(i).arg(strippedName);
+    recentFileActs[i]->setText(text);
+    recentFileActs[i]->setData(files[i]);
+    recentFileActs[i]->setVisible(true);
+  }
+  for (unsigned int j = numRecentFiles; j < maxNumberOfRecentFiles(); ++j)
+    recentFileActs[j]->setVisible(false);
+  
+  recentFilesSeparator->setVisible(numRecentFiles > 0);
+}
+
+CGAL_INLINE_FUNCTION
+void DemosMainWindow::writeState(QString groupname)
+{
+  QSettings settings;
+
+  settings.beginGroup(groupname);
+  settings.setValue("size", size());
+  settings.setValue("pos", pos());
+  settings.setValue("state", saveState());
+  settings.endGroup();
+}
+
+CGAL_INLINE_FUNCTION
+void DemosMainWindow::readState(QString groupname, Options /*what_to_save*/)
+{
+  QSettings settings;
+  
+  settings.beginGroup(groupname);
+  resize(settings.value("size", this->size()).toSize());
+
+  QDesktopWidget* desktop = qApp->desktop();
+  QPoint pos = settings.value("pos", this->pos()).toPoint();
+  if(desktop->availableGeometry(pos).contains(pos)) {
+    move(pos);
+  }
+  QByteArray mainWindowState = settings.value("state").toByteArray();
+  if(!mainWindowState.isNull()) {
+    this->restoreState(mainWindowState);
+  }
+  settings.endGroup();
+}
+
+
+} // namespace Qt
+} // namespace CGAL
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsItem.h
new file mode 100644
index 0000000..4a3ccdf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsItem.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_ITEM_H
+#define CGAL_QT_GRAPHICS_ITEM_H
+
+#include <CGAL/export/Qt.h>
+#include <CGAL/auto_link/Qt.h>
+
+#include <QObject>
+#include <QGraphicsItem>
+#ifndef Q_MOC_RUN
+#  include <CGAL/Object.h>
+#endif
+
+
+
+namespace CGAL {
+namespace Qt {
+
+class CGAL_QT_EXPORT GraphicsItem : public QObject, public QGraphicsItem {
+
+  Q_OBJECT
+
+public Q_SLOTS:
+
+  virtual void modelChanged() = 0;
+};
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircleInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircleInput.h
new file mode 100644
index 0000000..9cf92d8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircleInput.h
@@ -0,0 +1,211 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
+
+#include <QGraphicsView>
+#include <QRectF>
+#include <QPointF>
+#include <QGraphicsItem>
+#include <QGraphicsEllipseItem> 
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Qt/GraphicsViewInput.h>
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename K>
+class GraphicsViewCircleInput : public GraphicsViewInput
+{
+public:
+  GraphicsViewCircleInput(QObject *parent, QGraphicsScene* s, int pointsOnCircle=1); 
+
+protected:
+    
+  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  virtual void keyPressEvent(QKeyEvent *event);
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+
+  
+
+private:
+
+  typedef typename K::Point_2 Point_2;
+  int m_pointsOnCircle; // 1, 2 or 3
+  int count;
+  QGraphicsEllipseItem *qcircle;
+  QPointF qp, qq, qr;
+  Point_2 p, q, r;
+  QGraphicsScene *scene_;  
+  Converter<K> convert;
+};
+
+
+template <typename K>
+GraphicsViewCircleInput<K>::GraphicsViewCircleInput(QObject *parent, QGraphicsScene* s, int pointsOnCircle)
+  : GraphicsViewInput(parent), m_pointsOnCircle(pointsOnCircle), 
+    count(0), qcircle(new QGraphicsEllipseItem()), scene_(s)
+{
+  qcircle->hide();
+  s->addItem(qcircle);
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{ 
+  if(event->modifiers()  & ::Qt::ShiftModifier){
+    return;
+  }
+  if(m_pointsOnCircle < 3){
+    if(count == 0){
+      qp = event->scenePos();
+      p = convert(qp);
+      count = 1;
+    } else {
+      qq = event->scenePos();
+      if(qp != qq){
+	qcircle->hide();
+	q = convert(qq);
+	if(m_pointsOnCircle == 1){
+	  typename K::FT sd = squared_distance(p,q);
+	  Q_EMIT generate(CGAL::make_object(std::make_pair(p, sd)));
+	} else {
+	  Q_EMIT generate(CGAL::make_object(std::make_pair(p, q)));
+	}
+	count = 0;
+      } 
+    }
+  } else {
+    if(count == 0){
+      qp = event->scenePos();
+      p = convert(qp);
+      count = 1;
+    } else if(count == 1){
+      qq = event->scenePos();
+      if(qp != qq){
+	q = convert(qq);
+	count = 2;
+      }
+    } else { // count == 2
+      qr  = event->scenePos();
+      r = convert(qr);
+      typename K::Collinear_2 collinear;
+      if(! collinear(p,q,r)){
+	Q_EMIT generate(CGAL::make_object(CGAL::make_array(p,q,r)));
+	count = 0;
+      }
+    }
+  }
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircleInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  CGAL::Bbox_2 bb;
+  typename K::Construct_circle_2 construct_circle;
+  if(count == 0){
+    qcircle->hide();
+    return;
+  } else if(count == 1) {
+    qq = event->scenePos();
+    q = convert(qq);
+    if(qp == qq){
+      qcircle->hide();
+      return;
+    } else {
+      if(m_pointsOnCircle == 1){
+	typename K::FT sd = squared_distance(p,q);
+	bb = construct_circle(p, sd).bbox();
+      } else {
+	bb = construct_circle(p, q).bbox();
+      }
+    }
+  } else { // count == 2
+    qr = event->scenePos();
+    r = convert(qr);
+    typename K::Collinear_2 collinear;
+    if(collinear(p,q,r)){
+      qcircle->hide();
+      return;
+    } else {
+      bb = construct_circle(p, q, r).bbox();
+    }
+  }
+  qcircle->setRect(bb.xmin(), bb.ymin(), bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin());
+  qcircle->show();
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircleInput<K>::keyPressEvent ( QKeyEvent * event ) 
+{
+  if(event->key() == ::Qt::Key_Delete){
+    if(count>0){
+      --count;
+    }
+  }
+}
+
+
+
+template <typename K>
+bool 
+GraphicsViewCircleInput<K>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::KeyPress) {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    keyPressEvent(keyEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+} // namespace Qt
+
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_CIRCLE_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircularArcInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircularArcInput.h
new file mode 100644
index 0000000..46a2653
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewCircularArcInput.h
@@ -0,0 +1,214 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
+
+#include <QGraphicsView>
+#include <QRectF>
+#include <QPointF>
+#include <QGraphicsItem>
+#include <QGraphicsEllipseItem> 
+#include <QGraphicsLineItem> 
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/CircularArcGraphicsItem.h>
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename K>
+class GraphicsViewCircularArcInput : public GraphicsViewInput
+{
+public:
+  GraphicsViewCircularArcInput(QObject *parent, QGraphicsScene* s); 
+  ~GraphicsViewCircularArcInput();
+
+protected:
+    
+  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  virtual void keyPressEvent(QKeyEvent *event);
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+
+  
+
+private:
+  typedef typename K::Circular_arc_2 Circular_arc_2;
+  typedef typename K::Line_arc_2 Line_arc_2;
+  typedef typename K::Point_2 Point_2;
+  typedef typename K::Segment_2 Segment_2;
+
+  int count;
+  QGraphicsLineItem *qline;
+  CircularArcGraphicsItem<K> *qcarc;
+  QPointF qp, qq, qr;
+  Point_2 p, q, r, ap, aq, ar;
+  QGraphicsScene *scene_;  
+  Converter<K> convert;
+};
+
+
+template <typename K>
+GraphicsViewCircularArcInput<K>::GraphicsViewCircularArcInput(QObject *parent, QGraphicsScene* s)
+  : GraphicsViewInput(parent), count(0), scene_(s)
+{
+  qline = new QGraphicsLineItem();
+  qcarc = new CircularArcGraphicsItem<K>();
+  qline->hide();
+  qcarc->hide();
+  s->addItem(qline);
+  s->addItem(qcarc);
+}
+
+
+template <typename K>
+GraphicsViewCircularArcInput<K>::~GraphicsViewCircularArcInput()
+{
+  // do not delete qline and qcarc, because 's' owns them and will delete them.
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircularArcInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if(event->modifiers()  & ::Qt::ShiftModifier){
+    return;
+  }
+  if(count == 0){
+    qp = event->scenePos();
+    p = convert(qp);
+    qline->setLine(QLineF(qp, qp));
+    qline->show();
+    count = 1;
+  } else if(count == 1){
+    qq = event->scenePos();
+    qline->setLine(QLineF(qp, qq));
+    q = convert(qq);
+    if( (event->button() == ::Qt::RightButton) && (p != q) ){
+      qline->hide();
+      Q_EMIT generate(CGAL::make_object(Line_arc_2(Segment_2(p,q))));
+      count = 0;
+    } else {
+      count = 2;
+    }
+  } else if(count == 2){
+    qr  = event->scenePos();
+    r = convert(qr);
+    typename K::Collinear_2 collinear;
+    if(! collinear(p,q,r)){
+      qcarc->hide();
+      Q_EMIT generate(make_object(qcarc->arc()));
+      count = 0;
+    }
+  }
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircularArcInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  if(count == 0){
+    qcarc->hide();
+    qline->hide();
+    return;
+  } else if(count == 1) {
+    qcarc->hide();
+    qq = event->scenePos();
+    q = convert(qq);
+    qline->setLine(QLineF(qp, qq));
+    qline->show();
+  } else if(count == 2){
+    qline->hide();
+    qr = event->scenePos();
+    r = convert(qr);
+    typename K::Collinear_2 collinear;
+    if(collinear(p,q,r)){
+      qcarc->hide();
+      return;
+    } else {
+      if(CGAL::orientation(p, q, r) == CGAL::RIGHT_TURN) {
+	ap = p; ar = r; aq = q;
+	qcarc->setArc(Circular_arc_2(p,r,q));
+      } else {
+	ap = q; ar = r; aq = p;
+	qcarc->setArc(Circular_arc_2(q,r,p));
+      }
+      qcarc->show();
+    }
+  }
+}
+
+
+template <typename K>
+void 
+GraphicsViewCircularArcInput<K>::keyPressEvent ( QKeyEvent * event ) 
+{
+  if(event->key() == ::Qt::Key_Delete){
+    if(count>0){
+      --count;
+    }
+  }
+  
+  if(event->key() == ::Qt::Key_Escape){
+    count = 0;
+  }
+}
+
+
+
+template <typename K>
+bool 
+GraphicsViewCircularArcInput<K>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::KeyPress) {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    keyPressEvent(keyEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_CIRCULAR_ARC_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewInput.h
new file mode 100644
index 0000000..a814416
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewInput.h
@@ -0,0 +1,58 @@
+
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_INPUT_H
+
+#include <CGAL/export/Qt.h>
+#include <CGAL/auto_link/Qt.h>
+
+#ifndef Q_MOC_RUN
+#  include <CGAL/Object.h>
+#endif
+#include <QObject>
+
+namespace CGAL {
+namespace Qt {
+class CGAL_QT_EXPORT GraphicsViewInput  : public QObject
+{
+  Q_OBJECT
+
+public:
+  GraphicsViewInput(QObject* parent) 
+    : QObject(parent)
+  {}
+
+Q_SIGNALS:
+  void generate(CGAL::Object o);
+  void modelChanged();
+
+public Q_SLOTS:
+
+  virtual void processInput(CGAL::Object /*o*/) {}
+
+};
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h
new file mode 100644
index 0000000..34f4f55
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h
@@ -0,0 +1,158 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
+
+#include <QGraphicsView>
+#include <QRectF>
+#include <QPointF>
+#include <QGraphicsItem>
+#include <QGraphicsRectItem> 
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Qt/GraphicsViewInput.h>
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename K>
+class GraphicsViewIsoRectangleInput : public GraphicsViewInput
+{
+public:
+  GraphicsViewIsoRectangleInput(QObject *parent, QGraphicsScene* s); 
+  ~GraphicsViewIsoRectangleInput();
+
+protected:
+    
+  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  virtual void keyPressEvent(QKeyEvent *event);
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+
+  
+
+private:
+
+  typedef typename K::Point_2 Point_2;
+  QPointF qp, qq, qr;
+  Point_2 p, q, r;
+  QGraphicsRectItem *rectItem;
+  QPointF rect_first_point;
+  QGraphicsScene *scene_;  
+  Converter<K> convert;
+};
+
+
+template <typename K>
+GraphicsViewIsoRectangleInput<K>::GraphicsViewIsoRectangleInput(QObject *parent, QGraphicsScene* s)
+  : GraphicsViewInput(parent), rectItem(new QGraphicsRectItem), scene_(s)
+{
+  rectItem->setBrush(QBrush());
+  scene_->addItem(rectItem);
+  rectItem->hide();
+  rectItem->setZValue(10000);
+}
+
+template <typename K>
+GraphicsViewIsoRectangleInput<K>::~GraphicsViewIsoRectangleInput()
+{
+  delete rectItem;
+}
+
+
+template <typename K>
+void 
+GraphicsViewIsoRectangleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if(event->modifiers()  & ::Qt::ShiftModifier){
+    return;
+  }
+  if(event->button() == ::Qt::LeftButton) {
+    if(rectItem->isVisible()) {
+      // we have clicked twice
+      Q_EMIT generate(CGAL::make_object(convert(rectItem->rect())));
+      rectItem->hide();
+    } else { 
+      // we enter a first point
+      rect_first_point = event->scenePos();
+      rectItem->setRect(QRectF(rect_first_point, rect_first_point));
+      rectItem->show();
+    }
+  }
+}
+
+
+template <typename K>
+void 
+GraphicsViewIsoRectangleInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  // todo: only do this if no modifiers are pressed at the same time
+  if(rectItem->isVisible()) {
+    rectItem->setRect(QRectF(rect_first_point,
+			     event->scenePos()));
+  }
+}
+
+
+template <typename K>
+void 
+GraphicsViewIsoRectangleInput<K>::keyPressEvent ( QKeyEvent * event ) 
+{
+}
+
+
+
+template <typename K>
+bool 
+GraphicsViewIsoRectangleInput<K>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::KeyPress) {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    keyPressEvent(keyEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+} // namespace Qt
+
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_ISO_RECTANGLE_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewLineInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewLineInput.h
new file mode 100644
index 0000000..091fcb7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewLineInput.h
@@ -0,0 +1,182 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
+
+#include <QGraphicsView>
+#include <QRectF>
+#include <QPointF>
+#include <QGraphicsItem>
+#include <QGraphicsLineItem> 
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/utility.h>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename K>
+class GraphicsViewLineInput : public GraphicsViewInput
+{
+public:
+  GraphicsViewLineInput(QObject *parent, QGraphicsScene* s);
+
+protected:
+    
+  virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+  virtual void keyPressEvent(QKeyEvent *event);
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+
+  
+
+private:
+
+  QRectF boundingRect();
+  QLineF qlinef();
+
+  bool second;
+  QGraphicsLineItem line;
+  QPointF qsp, qtp;
+  typename K::Point_2 sp, tp;
+  typename K::Line_2 l;
+  QGraphicsScene *scene_;  
+  Converter<K> convert;
+};
+
+template <typename K>
+QRectF
+GraphicsViewLineInput<K>::boundingRect()
+{
+  QRectF rect = CGAL::Qt::viewportsBbox(scene_);
+  return rect;
+}
+
+
+template <typename K>
+GraphicsViewLineInput<K>::GraphicsViewLineInput(QObject *parent, QGraphicsScene* s)
+  : GraphicsViewInput(parent), second(false), scene_(s)
+{}
+
+
+template <typename K>
+QLineF
+GraphicsViewLineInput<K>::qlinef()
+{
+
+  sp = convert(qsp);
+  tp = convert(qtp);
+  typename K::Line_2  l(sp,tp);
+  QRectF qrect(boundingRect());
+  typename K::Iso_rectangle_2 rect;
+  rect = convert(qrect);
+  Object o = intersection(l,rect);
+  typename K::Segment_2 s;
+  assign(s, o);
+  return convert(s);
+}
+
+template <typename K>
+void 
+GraphicsViewLineInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{  
+  if(event->modifiers()  & ::Qt::ShiftModifier){
+    return;
+  }
+  if(second){
+      qtp = event->scenePos();
+      sp = convert(qsp);
+      tp = convert(qtp);
+      scene_->removeItem(&line);
+      Q_EMIT generate(CGAL::make_object(typename K::Line_2(sp,tp)));
+  } else {
+    qsp = event->scenePos();
+    qtp = QPointF(qsp.x()+1, qsp.y());
+    line.setLine(qlinef());
+    scene_->addItem(&line);
+  }
+  second = !second;
+}
+
+
+
+
+template <typename K>
+void 
+GraphicsViewLineInput<K>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  qtp = event->scenePos();
+  if(qtp == qsp){
+    qtp = QPointF(qsp.x()+1, qsp.y());
+  } 
+  line.setLine(qlinef());
+}
+
+
+template <typename K>
+void 
+GraphicsViewLineInput<K>::keyPressEvent ( QKeyEvent * event ) 
+{
+  if(event->key() != ::Qt::Key_Delete){ // need an anchored namespace to get away from CGAL::Qt
+    return;
+  }
+  if(second){
+    scene_->removeItem(&line);
+    second = false;
+  }
+}
+
+
+
+template <typename K>
+bool 
+GraphicsViewLineInput<K>::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mousePressEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return true;
+  } else if (event->type() == QEvent::KeyPress) {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    keyPressEvent(keyEvent);
+    return true;
+  } else{
+    // standard event processing
+    return QObject::eventFilter(obj, event);
+  }
+} 
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_LINE_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation.h
new file mode 100644
index 0000000..f5314a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation.h
@@ -0,0 +1,77 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
+#define CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
+
+#include <CGAL/auto_link/Qt.h>
+#include <CGAL/export/Qt.h>
+
+#include <QObject>
+#include <QPointF>
+#include <QString>
+#include <QCursor>
+#include <QRect>
+#include <QRectF>
+
+class QGraphicsView;
+class QGraphicsScene;
+class QEvent;
+class QGraphicsRectItem;
+
+namespace CGAL {
+namespace Qt {
+
+class CGAL_QT_EXPORT GraphicsViewNavigation: public QObject {
+
+  Q_OBJECT
+
+  Q_SIGNALS:
+  void mouseCoordinates(QString);
+
+public:
+  GraphicsViewNavigation();
+  ~GraphicsViewNavigation();
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+
+  void scaleView(QGraphicsView*, qreal scaleFactor);
+  void translateView(QGraphicsView*, int dx,  int dy);
+  void drag_to(QGraphicsView*, QPoint new_pos);
+  void display_parameters(QGraphicsView*);
+
+  QGraphicsRectItem* rectItem;
+  QPointF rect_first_point;
+  bool dragging;
+  QPointF dragging_start;
+  QCursor cursor_backup;
+};
+
+} // namespace Qt
+} // namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/GraphicsViewNavigation_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation_impl.h
new file mode 100644
index 0000000..0570920
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewNavigation_impl.h
@@ -0,0 +1,351 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Qt/GraphicsViewNavigation.h>
+#include <CGAL/Qt/utility.h> // for mapToScene(QGraphicsView*, QRect)
+#include <cmath>
+#include <iostream>
+#include <boost/format.hpp>
+
+#include <QEvent>
+#include <QMouseEvent>
+#include <QWheelEvent>
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <QGraphicsRectItem>
+#include <QFlags>
+#include <QScrollBar>
+
+namespace CGAL {
+namespace Qt {
+
+  CGAL_INLINE_FUNCTION
+  GraphicsViewNavigation::GraphicsViewNavigation()
+    : rectItem(new QGraphicsRectItem),
+      dragging(false)
+  {
+    QColor rect_color(250, 221, 0);
+    rect_color.setAlpha(50);
+    rectItem->setBrush(rect_color);
+    rect_color.setAlpha(255);
+    rectItem->setPen(QPen(rect_color, 0, ::Qt::DashLine));
+    rectItem->hide();
+    rectItem->setZValue(10000);
+  }
+
+  CGAL_INLINE_FUNCTION
+  GraphicsViewNavigation::~GraphicsViewNavigation()
+  {
+    delete rectItem;
+  }
+
+  CGAL_INLINE_FUNCTION
+  bool 
+  GraphicsViewNavigation::eventFilter(QObject *obj, QEvent *event)
+  {
+    QGraphicsView* v = qobject_cast<QGraphicsView*>(obj);
+    if(v == NULL) {
+      QWidget* viewport = qobject_cast<QWidget*>(obj);
+      if(viewport == NULL) {
+        return false;
+      }
+      v = qobject_cast<QGraphicsView*>(viewport->parent());
+      if(v == NULL) {
+        return false;
+      }
+    }
+    switch(event->type()) 
+    {
+    case QEvent::KeyPress: {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+      int offset = 10;
+      if( (keyEvent->modifiers() & ::Qt::ShiftModifier)
+          || (keyEvent->modifiers() & ::Qt::ControlModifier) ) {
+        offset = 20;
+      }
+      switch (keyEvent->key()) {
+      case ::Qt::Key_Up:
+        translateView(v, 0, -offset);
+        break;
+      case ::Qt::Key_Down:
+        translateView(v, 0, offset);
+        break;
+      case ::Qt::Key_Left:
+        translateView(v, -offset, 0);
+        break;
+      case ::Qt::Key_Right:
+        translateView(v, offset, 0);
+        break;
+      case ::Qt::Key_PageUp:
+        v->rotate(-6);
+        break;
+      case ::Qt::Key_PageDown:
+        v->rotate(6);
+        break;
+      case ::Qt::Key_Plus:
+        scaleView(v, 1.2);
+        break;
+      case ::Qt::Key_Minus:
+        scaleView(v, 1 / 1.2);
+        break;
+      case ::Qt::Key_Control:
+        cursor_backup = v->cursor();
+        v->setCursor(::Qt::CrossCursor);
+      default:
+        return false;
+      }
+      //         display_parameters();
+      return true;
+      break;
+    } // end case KeyPress
+    case QEvent::KeyRelease: {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+      if(keyEvent->key() == ::Qt::Key_Control) {
+        if(rectItem->isVisible() ) {
+          dragging = false;
+          v->scene()->removeItem(rectItem);
+          rectItem->hide();
+        }
+        v->setCursor(cursor_backup);
+        return true;
+      }
+      return false;
+      break;
+    } // end case KeyRelease
+    case QEvent::Wheel: {
+      QWheelEvent *wheelEvent = static_cast<QWheelEvent*>(event);
+      if(wheelEvent->orientation() != ::Qt::Vertical) {
+        return false;
+      }
+      double zoom_ratio = 240.0;
+      if( (wheelEvent->modifiers() & ::Qt::ShiftModifier)
+          || (wheelEvent->modifiers() & ::Qt::ControlModifier) ) {
+        zoom_ratio = 120.0;
+      }
+      scaleView(v, pow((double)2, -wheelEvent->delta() / zoom_ratio));
+
+      //         display_parameters();
+      return true;
+      break;
+    } // end case Wheel
+    case QEvent::MouseButtonPress: {
+      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
+      if( (mouseEvent->modifiers() == (::Qt::ControlModifier | ::Qt::ShiftModifier))
+          && mouseEvent->button() == ::Qt::RightButton )
+      {
+        QPoint offset = mouseEvent->pos() - v->viewport()->rect().center();
+        translateView(v, offset.x(), offset.y());
+        return true;
+      }
+      else if( mouseEvent->modifiers() == ::Qt::ControlModifier ) {
+        if(mouseEvent->button() == ::Qt::LeftButton) {
+          rect_first_point = v->mapToScene(mouseEvent->pos());
+          rectItem->setRect(QRectF(rect_first_point, QSizeF(0.,0.)));
+          rectItem->show();
+          v->scene()->addItem(rectItem);
+          return true;
+        }
+        else if( mouseEvent->button() == ::Qt::RightButton) {
+          dragging = true;
+          dragging_start = v->mapToScene(mouseEvent->pos());
+          v->setCursor(::Qt::ClosedHandCursor);
+          return true;
+        }
+      }
+      return false;
+      break;
+    } // end case MouseRelease
+    case QEvent::MouseMove: {
+      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
+      QPointF pos = v->mapToScene(mouseEvent->pos());
+      QString xy = QString(" ") + QString::number(pos.x(),'g', 6) + " , " + QString::number(pos.y(),'g', 6) + " ";
+      emit mouseCoordinates(xy);
+      if(rectItem->isVisible()) {
+	QPointF size = v->mapToScene(mouseEvent->pos());
+	size = size - rect_first_point;
+        rectItem->setRect(rect_first_point.x(),
+			  rect_first_point.y(),
+			  size.x(),
+			  size.y());
+      }
+      if( dragging )
+      {
+//         std::cerr << boost::format("mouseMove: globalpos=(%1%, %2%)\n"
+//                                    "           pos=(%3%, %4%)\n"
+//                                    "           sender=%5% (class %6%), parent class %7%\n")
+//           % mouseEvent->globalPos().x()
+//           % mouseEvent->globalPos().y()
+//           % mouseEvent->pos().x()
+//           % mouseEvent->pos().y()
+//           % (&*obj)
+//           % obj->metaObject()->className()
+//           % obj->parent()->metaObject()->className();
+
+//         drag_to(mouseEvent->pos());
+      }
+      break;
+    } // end MouseMove
+    case QEvent::MouseButtonRelease: {
+      QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
+      if(rectItem->isVisible() && mouseEvent->button() == ::Qt::LeftButton){
+        v->setSceneRect(v->sceneRect() | rectItem->rect());
+        v->fitInView(rectItem->rect(), ::Qt::KeepAspectRatio);
+        v->scene()->removeItem(rectItem);
+        rectItem->hide();
+        return true;
+      }
+      else if(  mouseEvent->button() == ::Qt::RightButton ) {
+        if(dragging) {
+          dragging = false;
+          drag_to(v, mouseEvent->pos());
+          v->setCursor(cursor_backup);
+          return true;
+        }
+      }
+      return false;
+      break;
+    } // end MouseRelease
+    default:
+      return false;
+    } // end switch
+    return false;
+  }
+
+
+  CGAL_INLINE_FUNCTION
+  void 
+  GraphicsViewNavigation::scaleView(QGraphicsView* v, qreal scaleFactor)
+  {
+    QPointF center = v->mapToScene(v->viewport()->rect().center());
+//     qreal factor = v->matrix().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width();
+    //if (factor < 0.001 || factor > 2000)
+    //    return;
+
+    v->scale(scaleFactor, scaleFactor);
+    QPoint offset = v->mapFromScene(center) - v->viewport()->rect().center();
+    translateView(v, offset.x(), offset.y());
+  }
+
+  CGAL_INLINE_FUNCTION
+  void GraphicsViewNavigation::drag_to(QGraphicsView* v, QPoint new_pos)
+  {
+    QPoint dragging_start_in_view = v->mapFromScene(dragging_start);
+    QPoint offset = new_pos - dragging_start_in_view;
+//     std::cerr << boost::format("drag_to: origin=(%1%, %2%)\n"
+//                                "         offset=(%3%, %4%)\n")
+//       % dragging_start_in_view.x() % dragging_start_in_view.y()
+//       % offset.x() % offset.y();
+    translateView(v, -offset.x(), -offset.y());
+    dragging_start_in_view = v->mapFromScene(dragging_start);
+//     std::cerr << boost::format("         after=(%1%, %2%)\n")
+//       % dragging_start_in_view.x() % dragging_start_in_view.y();
+  }
+
+  CGAL_INLINE_FUNCTION
+  void GraphicsViewNavigation::translateView(QGraphicsView* v, int dx,  int dy)
+  {
+    if( dx == 0 && dy == 0 ) {
+      return;
+    }
+
+    int horizontalScrollBarValue = v->horizontalScrollBar()->value();
+    int verticalScrollBarValue = v->verticalScrollBar()->value();
+
+    if( (horizontalScrollBarValue + dx <= 
+         v->horizontalScrollBar()->maximum()) &&
+        (horizontalScrollBarValue + dx >=
+         v->horizontalScrollBar()->minimum()) &&
+        (verticalScrollBarValue + dy <= 
+         v->verticalScrollBar()->maximum()) &&
+        (verticalScrollBarValue + dy >=
+         v->verticalScrollBar()->minimum()) )
+    {
+      v->horizontalScrollBar()->setValue(horizontalScrollBarValue + dx);
+      v->verticalScrollBar()->setValue(verticalScrollBarValue + dy);
+    }
+    else
+    {
+      QRect vp_rect = v->viewport()->rect();
+      QPointF new_center = v->mapToScene(vp_rect.center() + QPoint(dx, dy));
+      vp_rect |= vp_rect.translated(dx, dy);
+      QRectF rect = mapToScene(v, vp_rect);
+      v->setSceneRect(v->sceneRect() | rect);
+      v->centerOn(new_center);
+
+      // QGraphicsView::centerOn makes rounding errors.
+      // The following two "if" make them unnoticable when dx==0 or dy==0.
+      if(dx == 0) {
+        v->horizontalScrollBar()->setValue(horizontalScrollBarValue);
+      }
+      if(dy == 0) {
+        v->verticalScrollBar()->setValue(verticalScrollBarValue);
+      }
+    }
+//     display_parameters();
+  }
+
+  CGAL_INLINE_FUNCTION
+  void GraphicsViewNavigation::display_parameters(QGraphicsView* v)
+  {
+    std::cerr << 
+      boost::format("matrix translation=(%1%, %2%)\n"
+                    "       rotation=(%3% - %4% )\n"
+                    "                (%5% - %6% )\n")
+      % v->matrix().dx()
+      % v->matrix().dy()
+      % v->matrix().m11()
+      % v->matrix().m12()
+      % v->matrix().m21()
+      % v->matrix().m22();
+
+    QRect vp_rect = v->viewport()->rect();
+    QPoint vp_top_left = vp_rect.topLeft();
+    QPoint vp_bottom_right = vp_rect.bottomRight();
+    QPointF top_left = v->mapToScene(vp_top_left);
+    QPointF bottom_right = v->mapToScene(vp_bottom_right);
+
+    std::cerr <<
+      boost::format("view=(%1% - %2%) x (%3% - %4%)\n")
+      % top_left.x() % bottom_right.x()
+      % top_left.y() % bottom_right.y();
+    std::cerr <<
+      boost::format("viewport=(%1% - %2%) x (%3% - %4%)\n")
+      % vp_top_left.x() % vp_bottom_right.x()
+      % vp_top_left.y() % vp_bottom_right.y();
+    std::cerr <<
+      boost::format("scrollbars=(%1% <= %2% <= %3%) x (%4% <= %5% <= %6%)\n")
+      % v->horizontalScrollBar()->minimum() 
+      % v->horizontalScrollBar()->value()
+      % v->horizontalScrollBar()->maximum()
+      % v->verticalScrollBar()->minimum() 
+      % v->verticalScrollBar()->value()
+      % v->verticalScrollBar()->maximum();
+  }
+
+} // namespace Qt
+} // namespace CGAL
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPointInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPointInput.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/GraphicsViewPointInput.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPointInput.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h
new file mode 100644
index 0000000..2817e2a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h
@@ -0,0 +1,197 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
+
+#include <list>
+
+#include <QGraphicsView>
+#include <QGraphicsItem>
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+
+#include <CGAL/Polygon_with_holes_2.h>
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/PolygonWithHolesGraphicsItem.h>
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/array.h>
+
+namespace CGAL {
+namespace Qt {
+
+  /*
+    We store a polygon with holes and display it with a graphics item
+    We use a PolygonInput tool for entering the boundary and the holes
+    We forward most events directly to the polygon input tool
+    We only deal with events when the polygon input is not active
+    - left click: enter new polygon
+    - right click: return result
+    - backspace: delete last polygon
+    - esc: return with empty result
+
+    todo: check that polygons don't intersect
+   */
+
+
+
+template <typename K>
+class GraphicsViewPolygonWithHolesInput : public GraphicsViewInput
+{
+public:
+  GraphicsViewPolygonWithHolesInput(QObject *parent, QGraphicsScene* s); 
+  ~GraphicsViewPolygonWithHolesInput();
+  
+public Q_SLOTS:
+  void processInput(CGAL::Object o);
+
+typedef CGAL::Polygon_2<K> Polygon;
+typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes;
+
+protected:
+    
+  virtual void keyPressEvent(QKeyEvent *event);
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+private:
+
+  Polygon polygon;
+  std::list<Polygon> holes; 
+  Polygon_with_holes pwh;  // this one collects the input polygons
+
+  CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes> * pwhItem;
+  CGAL::Qt::GraphicsViewPolylineInput<K> * pi;
+
+  bool polygon_input;
+  typedef typename K::Point_2 Point_2;
+  QGraphicsScene *scene_;  
+};
+
+
+template <typename K>
+GraphicsViewPolygonWithHolesInput<K>::GraphicsViewPolygonWithHolesInput(QObject *parent, QGraphicsScene* s)
+  : GraphicsViewInput(parent), scene_(s), polygon_input(false)
+{
+  pwhItem = new CGAL::Qt::PolygonWithHolesGraphicsItem<Polygon_with_holes>(&pwh);
+  pwhItem->setBrush(::Qt::yellow);
+  scene_->addItem(pwhItem);
+  pwhItem->hide();
+  
+  pi = new CGAL::Qt::GraphicsViewPolylineInput<K>(parent,s);
+  QObject::connect(pi, SIGNAL(generate(CGAL::Object)),
+		   this, SLOT(processInput(CGAL::Object)));
+
+  QObject::connect(this, SIGNAL(modelChanged()),
+		   pwhItem, SLOT(modelChanged()));
+
+}
+
+template <typename K>
+GraphicsViewPolygonWithHolesInput<K>::~GraphicsViewPolygonWithHolesInput()
+{
+  //delete pwhItem;
+  //delete pi;
+}
+
+
+template <typename K>
+void
+GraphicsViewPolygonWithHolesInput<K>::processInput(CGAL::Object o)
+{
+   std::list<Point_2> points;
+  if(CGAL::assign(points, o)){
+    if((points.size() == 1)&& polygon.size()>0){
+    
+    } else {
+      polygon.clear();
+      if(points.front() == points.back()){
+	points.pop_back();
+      }
+      polygon.insert(polygon.vertices_begin(), points.begin(), points.end());
+      if(holes.empty()){
+	if(polygon.orientation() == CGAL::CLOCKWISE){
+	  polygon.reverse_orientation();
+	}
+      } else {
+	if(polygon.orientation() == CGAL::COUNTERCLOCKWISE){
+	  polygon.reverse_orientation();
+	}
+      }
+      holes.push_back(polygon);
+      typename std::list<Polygon>::iterator it = holes.begin();
+      it++;
+      pwh = Polygon_with_holes(holes.front(), it, holes.end());
+    }
+    Q_EMIT( modelChanged());
+    polygon_input = false;
+  } 
+}
+
+
+template <typename K>
+void 
+GraphicsViewPolygonWithHolesInput<K>::keyPressEvent ( QKeyEvent * event ) 
+{
+}
+
+
+
+template <typename K>
+bool 
+GraphicsViewPolygonWithHolesInput<K>::eventFilter(QObject *obj, QEvent *event)
+{
+  if(polygon_input){
+    return pi->eventFilter(obj, event);
+  } else {
+    if (event->type() == QEvent::GraphicsSceneMousePress) {
+      QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+      
+      if(mouseEvent->modifiers()  & ::Qt::ShiftModifier){
+	return QObject::eventFilter(obj, event);;
+      }
+      if(mouseEvent->button() == ::Qt::LeftButton) {
+	polygon_input = true;
+	return pi->eventFilter(obj, event);
+      } else if(mouseEvent->button() == ::Qt::RightButton) {
+	Q_EMIT( generate(CGAL::make_object(pwh)));
+	pwh.clear();
+	holes.clear();
+	polygon_input = false;
+	Q_EMIT( modelChanged());
+      }
+      return true;
+    } else if (event->type() == QEvent::KeyPress) {
+      QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+      keyPressEvent(keyEvent);
+      return true;
+    } else{
+      // standard event processing
+      return QObject::eventFilter(obj, event);
+    }
+  }
+} 
+
+} // namespace Qt
+
+} // namespace CGAL
+
+#endif // CGAL_QT_GRAPHICS_VIEW_POLYGON_WITH_HOLES_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput.h
new file mode 100644
index 0000000..918cc70
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput.h
@@ -0,0 +1,117 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
+#define CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
+
+#include <CGAL/auto_link/Qt.h>
+#include <CGAL/export/Qt.h>
+
+#include <QPolygonF>
+#include <QPointF>
+
+#include <CGAL/Qt/GraphicsViewInput.h>
+#include <CGAL/Qt/Converter.h>
+#include <QGraphicsLineItem>
+
+class QGraphicsScene;
+class QGraphicsSceneMouseEvent;
+class QGraphicsItem;
+class QGraphicsPathItem;
+class QGraphicsLineItem;
+class QKeyEvent;
+class QEvent;
+class QObject;
+
+namespace CGAL {
+namespace Qt {
+
+class CGAL_QT_EXPORT GraphicsViewPolylineInput_non_templated_base : public GraphicsViewInput
+{
+public:
+  void setNumberOfVertices(int n)
+  {
+    n_ = n;
+  }
+  
+  bool eventFilter(QObject *obj, QEvent *event);
+  
+protected:
+  // protected constructor
+  GraphicsViewPolylineInput_non_templated_base(QObject* parent, 
+                                     QGraphicsScene* s,
+                                     int n = 0,
+                                     bool closed = true);
+
+
+  // mousePressEvent returns true iff the event is consummed
+  bool mousePressEvent(QGraphicsSceneMouseEvent *event);
+
+  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+
+  // keyPressEvent returns true iff the event is consummed
+  bool keyPressEvent(QKeyEvent *event);
+
+  void rubberbands(const QPointF& p);
+
+  virtual void generate_polygon() = 0;
+
+protected:
+  QPolygonF polygon;
+  bool closed_;
+
+private:
+  QGraphicsPathItem *path_item;
+  QGraphicsLineItem *b, *e;
+  int n_;
+  QPointF sp;
+  QGraphicsScene *scene_;
+}; // end class GraphicsViewPolylineInput_non_templated_base
+
+template <typename K>
+class GraphicsViewPolylineInput : public GraphicsViewPolylineInput_non_templated_base
+{
+public:
+  GraphicsViewPolylineInput(QObject* parent, QGraphicsScene* s, int n = 0, bool closed = true)
+    : GraphicsViewPolylineInput_non_templated_base(parent, s, n, closed)
+  {
+  }
+
+protected:
+  void generate_polygon() {
+    std::list<typename K::Point_2> points;
+    Converter<K> convert;
+    convert(points, this->polygon); 
+    if(closed_ && points.size()>2){
+      points.push_back(points.front());
+    }
+    Q_EMIT( generate(CGAL::make_object(points)));
+  }
+}; // end class GraphicsViewPolylineInput
+
+} // namespace Qt
+} // namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/GraphicsViewPolylineInput_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h
new file mode 100644
index 0000000..5932a1b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h
@@ -0,0 +1,206 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <QGraphicsItem>
+#include <QGraphicsPathItem> 
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QPolygonF>
+#include <QPainterPath>
+#include <QEvent>
+#include <QKeyEvent>
+
+namespace CGAL {
+namespace Qt {
+
+CGAL_INLINE_FUNCTION
+GraphicsViewPolylineInput_non_templated_base::
+GraphicsViewPolylineInput_non_templated_base(QObject* parent,
+                                   QGraphicsScene* s,
+                                   int n,
+                                   bool closed)
+  : GraphicsViewInput(parent), closed_(closed), path_item(NULL), b(NULL), e(NULL), n_(n), scene_(s)
+{}
+
+
+CGAL_INLINE_FUNCTION
+bool
+GraphicsViewPolylineInput_non_templated_base::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{ 
+  if( event->modifiers() ){
+    return false;
+  }
+  if( event->button() != ::Qt::RightButton
+      && event->button() != ::Qt::LeftButton ){
+    return false;
+  }
+  polygon.push_back(event->scenePos());
+  if(path_item){
+    scene_->removeItem(path_item);
+    delete path_item;
+    path_item = NULL;
+  }
+  if( (event->button() == ::Qt::RightButton) || (polygon.size() == n_) ){
+    // call the virtual function generate_polygon(), that emit a
+    // CGAL::Object containing a list of points
+    generate_polygon();
+    polygon.clear();
+    if(b){
+      scene_->removeItem(b);
+      delete b;
+      b = NULL;
+    }
+    if(e){
+      scene_->removeItem(e);
+      delete e;
+      e = NULL;
+    }
+    return true;
+  }
+  if(event->button() == ::Qt::LeftButton){
+    QPainterPath qpp;
+    qpp.addPolygon(polygon);
+    path_item = new QGraphicsPathItem(qpp);
+    path_item->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+    scene_->addItem(path_item);
+    return true;
+  }
+  return false;
+}
+
+
+CGAL_INLINE_FUNCTION
+void 
+GraphicsViewPolylineInput_non_templated_base::rubberbands(const QPointF& p)
+{
+  if(polygon.empty()){
+    return;
+  }
+  if(!b && closed_ ){
+    b = new QGraphicsLineItem();
+    b->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+    scene_->addItem(b);
+  }
+  if( !e){
+    e = new QGraphicsLineItem();    
+    e->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+    scene_->addItem(e);
+  }
+  if(closed_){
+    QLineF bLine(polygon.front(), p);
+    b->setLine(bLine);
+  }
+  QLineF eLine(polygon.back(), p);
+  e->setLine(eLine); 
+}
+
+
+CGAL_INLINE_FUNCTION
+void 
+GraphicsViewPolylineInput_non_templated_base::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+  sp = event->scenePos();
+  rubberbands(sp);
+}
+
+
+CGAL_INLINE_FUNCTION
+bool
+GraphicsViewPolylineInput_non_templated_base::keyPressEvent ( QKeyEvent * event ) 
+{
+  if( event->modifiers() )
+    return false;
+
+  switch(event->key())
+  {
+  case ::Qt::Key_Delete:
+  case ::Qt::Key_Escape:
+  case ::Qt::Key_Backspace:
+    break;
+  default:
+    return false;
+  }
+  if(polygon.empty()){
+    return true;
+  }
+  polygon.pop_back();
+  if(polygon.empty()){
+    if(b){
+      scene_->removeItem(b);
+      delete b;
+      b = NULL;
+    }
+    if(e){
+      scene_->removeItem(e);
+      delete e;
+      e = NULL;
+    }
+    return true;
+  }
+  if(path_item){
+    scene_->removeItem(path_item);
+    delete path_item;
+    path_item = NULL;
+  }
+  QPainterPath qpp;
+  qpp.addPolygon(polygon);
+  path_item = new QGraphicsPathItem(qpp);
+  path_item->setPen(QPen(::Qt::red, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+  scene_->addItem(path_item);
+  rubberbands(sp);
+  return true;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+bool 
+GraphicsViewPolylineInput_non_templated_base::eventFilter(QObject *obj, QEvent *event)
+{
+  if (event->type() == QEvent::GraphicsSceneMousePress) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    if(!mousePressEvent(mouseEvent)) {
+      // standard event processing if mousePressEvent has returned false
+      return QObject::eventFilter(obj, event);
+    }
+  } else if (event->type() == QEvent::GraphicsSceneMouseMove) {
+    QGraphicsSceneMouseEvent *mouseEvent = static_cast<QGraphicsSceneMouseEvent *>(event);
+    mouseMoveEvent(mouseEvent);
+    return QObject::eventFilter(obj, event);
+  } else if (event->type() == QEvent::KeyPress) {
+    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    if(!keyPressEvent(keyEvent)) {
+      return QObject::eventFilter(obj, event);
+    }
+  }
+  // standard event processing if keyPressEvent has returned false
+  return QObject::eventFilter(obj, event);
+}
+
+} // namespace Qt
+} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/LineGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/LineGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/LineGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/LineGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PainterOstream.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PainterOstream.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/PainterOstream.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/PainterOstream.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PointsGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PointsGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/PointsGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/PointsGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h
new file mode 100644
index 0000000..5f18f72
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h
@@ -0,0 +1,194 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
+#define CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/bounding_box.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+#include <CGAL/Fuzzy_iso_box.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename KdTree>
+class PointsInKdTreeGraphicsItem : public GraphicsItem
+{
+  typedef typename std::iterator_traits<typename KdTree::iterator>::value_type Point_2;
+  typedef typename CGAL::Kernel_traits<Point_2>::Kernel Traits;
+  typedef typename Traits::Iso_rectangle_2 Iso_rectangle_2;
+
+  typedef CGAL::Fuzzy_iso_box<typename KdTree::Traits> Fuzzy_iso_box;
+
+
+  // Instead of first collecting points into a container, and then draw them
+  // we use an output iterator that draws them on the fly
+  template <typename K>
+  class Draw : public std::iterator<std::output_iterator_tag, void, void, void, void> {
+    QPainter* painter;
+    QMatrix* matrix;
+    Converter<K> convert;
+  public:
+    Draw(QPainter* painter, QMatrix* matrix)
+      : painter(painter), matrix(matrix)
+    {}
+
+    Draw& operator=(const Point_2& p)
+    {
+      QPointF point = matrix->map(convert(p));
+      painter->drawPoint(point);
+      return *this;
+    }
+
+    Draw& operator++()
+    {
+      return *this;
+    }
+
+    Draw& operator*()
+    {
+      return *this;
+    }
+
+
+    Draw& operator++(int)
+    {
+      return *this;
+    }
+
+  };
+
+
+public:
+  PointsInKdTreeGraphicsItem(KdTree* p_);
+
+  void modelChanged();
+
+public:
+  QRectF boundingRect() const;
+
+  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+  
+
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+protected:
+  void updateBoundingBox();
+
+  KdTree * kdtree;
+  QPainter* m_painter;
+  PainterOstream<Traits> painterostream;
+  Converter<Traits> convert;
+
+  QRectF bounding_rect;
+
+  QPen vertices_pen;
+  bool draw_vertices;
+};
+
+
+template <typename KdTree>
+PointsInKdTreeGraphicsItem<KdTree>::PointsInKdTreeGraphicsItem(KdTree * p_)
+  :  kdtree(p_), painterostream(0),  draw_vertices(true)   
+{
+  setVerticesPen(QPen(::Qt::red, 3.));
+  if(kdtree->size() == 0){
+    this->hide();
+  }
+  updateBoundingBox();
+  setZValue(3);
+  setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
+}
+
+template <typename KdTree>
+QRectF 
+PointsInKdTreeGraphicsItem<KdTree>::boundingRect() const
+{
+  return bounding_rect;
+}
+
+
+
+
+
+
+template <typename KdTree>
+void 
+PointsInKdTreeGraphicsItem<KdTree>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem *option,
+                                    QWidget * /*widget*/)
+{
+  Iso_rectangle_2 isor = convert(option->exposedRect);
+  Fuzzy_iso_box range(isor.vertex(0), isor.vertex(2));
+  painter->setPen(verticesPen());
+  QMatrix matrix = painter->matrix();
+  painter->resetMatrix();
+  Draw<Traits> draw(painter, &matrix);
+  kdtree->search(draw, range);
+}
+
+// We let the bounding box only grow, so that when vertices get removed
+// the maximal bbox gets refreshed in the GraphicsView
+template <typename KdTree>
+void 
+PointsInKdTreeGraphicsItem<KdTree>::updateBoundingBox()
+{
+  prepareGeometryChange();
+  if(kdtree->size() == 0){
+    return;
+  }
+  bounding_rect = convert(CGAL::bounding_box(kdtree->begin(), kdtree->end()));
+}
+
+
+template <typename KdTree>
+void 
+PointsInKdTreeGraphicsItem<KdTree>::modelChanged()
+{
+  if((kdtree->size() == 0) ){
+    this->hide();
+  } else if((kdtree->size() > 0) && (! this->isVisible())){
+    this->show();
+  }
+  updateBoundingBox();
+  update();
+}
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_POINTS_IN_KD_TREE_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/PolygonGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PolygonGraphicsItem.h
new file mode 100644
index 0000000..b123ea0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/PolygonGraphicsItem.h
@@ -0,0 +1,191 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_POLYGON_GRAPHICS_ITEM_H
+#define CGAL_QT_POLYGON_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/apply_to_range.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename P>
+class PolygonGraphicsItem : public GraphicsItem
+{
+  typedef typename P::Traits Traits;
+public:
+  PolygonGraphicsItem(P* p_);
+
+  void modelChanged();
+
+public:
+  QRectF boundingRect() const;
+  
+  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+  
+
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  const QPen& edgesPen() const
+  {
+    return edges_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+  void setEdgesPen(const QPen& pen)
+  {
+    edges_pen = pen;
+  }
+
+  bool drawVertices() const
+  {
+    return draw_vertices;
+  }
+
+  void setDrawVertices(const bool b)
+  {
+    draw_vertices = b;
+    update();
+  }
+
+  bool drawEdges() const
+  {
+    return draw_edges;
+  }
+
+  void setDrawEdges(const bool b)
+  {
+    draw_edges = b;
+    update();
+  }
+
+protected:
+  void updateBoundingBox();
+
+  P * poly;
+  QPainter* m_painter;
+  PainterOstream<Traits> painterostream;
+
+  typename P::Point_2 p;
+  QRectF bounding_rect;
+
+  QPen vertices_pen;
+  QPen edges_pen;
+  bool draw_edges;
+  bool draw_vertices;
+};
+
+
+template <typename P>
+PolygonGraphicsItem<P>::PolygonGraphicsItem(P * p_)
+  :  poly(p_), painterostream(0),
+     draw_edges(true), draw_vertices(true)   
+{
+  setVerticesPen(QPen(::Qt::red, 3.));
+  setEdgesPen(QPen(::Qt::black, 0));
+  updateBoundingBox();
+  setZValue(3);
+}
+
+template <typename P>
+QRectF 
+PolygonGraphicsItem<P>::boundingRect() const
+{
+  return bounding_rect;
+}
+
+
+
+
+template <typename P>
+void 
+PolygonGraphicsItem<P>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem * /*option*/,
+                                    QWidget * /*widget*/)
+{
+  painter->setPen(this->edgesPen());
+  painterostream = PainterOstream<Traits>(painter);
+  if(drawEdges()) {
+    for(typename P::Edge_const_iterator eit = poly->edges_begin();
+        eit != poly->edges_end();
+        ++eit){
+      painterostream << *eit;
+    }
+  }
+
+  if(drawVertices()) {
+    Converter<Traits> convert;
+
+    painter->setPen(verticesPen());
+    QMatrix matrix = painter->matrix();
+    painter->resetMatrix();
+    for(typename P::Vertex_iterator it = poly->vertices_begin();
+        it != poly->vertices_end();
+        it++){
+      QPointF point = matrix.map(convert(*it));
+      painter->drawPoint(point);
+    }
+  }
+}
+
+// We let the bounding box only grow, so that when vertices get removed
+// the maximal bbox gets refreshed in the GraphicsView
+template <typename P>
+void 
+PolygonGraphicsItem<P>::updateBoundingBox()
+{
+  Converter<Traits> convert;
+  prepareGeometryChange();
+  if(poly->size() == 0){
+    return;
+  }
+  bounding_rect = convert(poly->bbox());
+}
+
+
+template <typename P>
+void 
+PolygonGraphicsItem<P>::modelChanged()
+{
+  updateBoundingBox();
+  update();
+}
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_POLYGON_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PolylinesGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PolylinesGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/PolylinesGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/PolylinesGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/PowerdiagramGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/PowerdiagramGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/PowerdiagramGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/PowerdiagramGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/RegularGridGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/RegularGridGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/RegularGridGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/RegularGridGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/RegularTriangulationGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/RegularTriangulationGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/RegularTriangulationGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/RegularTriangulationGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h
new file mode 100644
index 0000000..2a8b49a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h
@@ -0,0 +1,283 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
+#define CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/utility.h>
+//#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+
+
+namespace CGAL {
+
+namespace Qt {
+
+template <typename T>
+class SegmentDelaunayGraphGraphicsItem : public GraphicsItem
+{ 
+  typedef typename T::Geom_traits Geom_traits;
+  typedef typename T::Point_2 Point_2;
+  typedef typename Kernel_traits<Point_2> ::Kernel Kern;
+
+  T* t;
+  QPainter* m_painter;
+  PainterOstream<Kern> painterostream;
+
+  QPen vertices_pen, segment_pen, voronoi_pen ;
+  Bbox_2 bb;
+  bool bb_initialized;
+
+public:
+  SegmentDelaunayGraphGraphicsItem(T  * t_)
+    : t(t_), painterostream(0),
+      segment_pen(::Qt::blue, 0),
+      voronoi_pen(::Qt::blue, 0)
+  {
+  }
+  
+
+  void updateBoundingBox();
+
+  void modelChanged();
+
+
+  QRectF boundingRect() const;
+ 
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ 
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+
+  const QPen& segmentPen() const
+  {
+    return segment_pen;
+  }
+
+  void setSegmentPen(const QPen& pen)
+  {
+    segment_pen = pen;
+  }
+
+
+
+  const QPen& voronoiPen() const
+  {
+    return voronoi_pen;
+  }
+
+  void setVoronoiPen(const QPen& pen)
+  {
+    voronoi_pen = pen;
+  }
+
+
+protected:
+  void drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option);
+ void drawDualEdge(QPainter *painter, typename T::Edge e);
+
+
+
+};
+
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::drawDualEdge(QPainter * /*painter*/, typename T::Edge e)
+{
+   CGAL_precondition( ! t->is_infinite(e) );
+
+    typename Geom_traits::Line_2          l;
+    typename Geom_traits::Segment_2       s;
+    typename Geom_traits::Ray_2           r;
+    CGAL::Parabola_segment_2<Geom_traits> ps;
+
+    Object o = t->primal(e);
+
+    if (CGAL::assign(l, o)) { /* m_painter->setPen(::Qt::cyan); std::cerr << "line " << std::endl; */ painterostream << l; }
+    else if (CGAL::assign(s, o)) { /* m_painter->setPen(::Qt::magenta); std::cerr << "segment " << std::endl; */ painterostream << s;}
+    else if (CGAL::assign(r, o))  { /* m_painter->setPen(::Qt::darkMagenta);  std::cerr << "ray " << r << std::endl;  */ painterostream << r; }
+    else if (CGAL::assign(ps, o)) { /* std::cerr << "ps  " << std::endl; */ painterostream << ps;}
+    else { std::cerr << "unknown" << std::endl; }
+
+    /* m_painter->setPen(::Qt::black); */
+
+}
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option)
+{
+  QRectF rect = option->exposedRect;
+  m_painter = painter;
+  painterostream = PainterOstream<Kern>(m_painter, rect);
+  m_painter->setPen(this->voronoiPen());
+  typename T::Finite_edges_iterator eit = t->finite_edges_begin();
+  for (; eit != t->finite_edges_end(); ++eit) {
+    drawDualEdge(m_painter, *eit);
+  }
+  {
+    m_painter->setPen(this->segmentPen());
+      typename T::Finite_vertices_iterator vit;
+      for (vit = t->finite_vertices_begin();
+	   vit != t->finite_vertices_end(); ++vit) {
+	typename T::Site_2 s = vit->site();
+	if ( s.is_segment() ) {
+	  painterostream << s.segment();
+	}
+      }
+    }
+    {
+    m_painter->setPen(this->verticesPen());
+    QMatrix matrix = m_painter->matrix();
+    m_painter->resetMatrix();
+    Converter<Kern> convert;
+      typename T::Finite_vertices_iterator vit;
+      for (vit = t->finite_vertices_begin();
+	   vit != t->finite_vertices_end(); ++vit) {
+	typename T::Site_2 s = vit->site();
+	if ( s.is_input() ) {
+	  //*widget << CGAL::RED;
+	} else {
+	  //*widget << CGAL::YELLOW;
+	}
+	if ( s.is_point() ) {
+          QPointF point = matrix.map(convert(s.point()));
+          m_painter->drawPoint(point);
+	}
+      }
+    }
+
+}
+
+/*
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::operator()(typename T::Face_handle fh)
+{
+  if(visibleFacesInDomain()) {
+    if(fh->is_in_domain()){
+      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
+      this->m_painter->setBrush(facesInDomainBrush());
+      this->m_painter->setPen(::Qt::NoPen) ;
+      this->painterostream << this->t->triangle(fh);
+    }
+  }
+  Base::operator()(fh);
+}
+*/
+
+
+template <typename T>
+QRectF 
+SegmentDelaunayGraphGraphicsItem<T>::boundingRect() const
+{
+
+  QRectF rect = CGAL::Qt::viewportsBbox(scene());
+  return rect;
+}
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::modelChanged()
+{
+  if((t->number_of_vertices() == 0) ){
+    this->hide();
+  } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
+    this->show();
+  }
+  update();
+}
+
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::updateBoundingBox()
+{
+  prepareGeometryChange();
+  if(t->number_of_vertices() == 0){
+    bb = Bbox_2(0,0,0,0);
+    bb_initialized = false;
+    return;
+  } else if(! bb_initialized){
+    //    bb = t->finite_vertices_begin()->point().bbox();
+    bb_initialized = true;
+  }
+  /*
+  if(t->dimension() <2){
+    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
+	it != t->finite_vertices_end();
+	++it){
+      bb = bb + it->point().bbox();
+    }
+  } else {
+    typename T::Vertex_handle inf = t->infinite_vertex();
+    typename T::Vertex_circulator vc = t->incident_vertices(inf), done(vc);
+    do {
+      bb = bb + vc->point().bbox();
+      ++vc;
+    } while(vc != done);
+  }
+  bounding_rect = QRectF(bb.xmin(),
+                         bb.ymin(),
+                         bb.xmax()-bb.xmin(),
+                         bb.ymax()-bb.ymin());
+  */
+}
+
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphGraphicsItem<T>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem *option,
+                                    QWidget * /*widget*/)
+{
+
+//   painter->drawRect(boundingRect());
+  //  if ( t->dimension()<2 || option->exposedRect.contains(boundingRect()) ) {
+
+    drawAll(painter, option);
+    //  } else {
+    //    std::cerr << "else" << std::endl;
+    //  }
+}
+
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_SEGMENT_DELAUNAY_GRAPH_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h
new file mode 100644
index 0000000..58f3fa4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h
@@ -0,0 +1,318 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_QT_SEGMENT_DELAUNAY_GRAPH_LINF_GRAPHICS_ITEM_H
+#define CGAL_QT_SEGMENT_DELAUNAY_GRAPH_LINF_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/utility.h>
+//#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <CGAL/Polychain_2.h>
+
+
+namespace CGAL {
+
+namespace Qt {
+
+template <typename T>
+class SegmentDelaunayGraphLinfGraphicsItem : public GraphicsItem
+{ 
+  typedef typename T::Geom_traits Geom_traits;
+  typedef typename T::Point_2 Point_2;
+  typedef typename Kernel_traits<Point_2> ::Kernel Kern;
+
+  T* t;
+  QPainter* m_painter;
+  PainterOstream<Kern> painterostream;
+
+  QPen vertices_pen, segment_pen, voronoi_pen ;
+  Bbox_2 bb;
+  bool bb_initialized;
+
+public:
+  SegmentDelaunayGraphLinfGraphicsItem(T  * t_)
+    : t(t_), painterostream(0),
+      segment_pen(::Qt::blue),
+      voronoi_pen(::Qt::blue)
+  {
+  }
+  
+
+  void updateBoundingBox();
+
+  void modelChanged();
+
+
+  QRectF boundingRect() const;
+ 
+  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ 
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+
+  const QPen& segmentPen() const
+  {
+    return segment_pen;
+  }
+
+  void setSegmentPen(const QPen& pen)
+  {
+    segment_pen = pen;
+  }
+
+
+
+  const QPen& voronoiPen() const
+  {
+    return voronoi_pen;
+  }
+
+  void setVoronoiPen(const QPen& pen)
+  {
+    voronoi_pen = pen;
+  }
+
+
+protected:
+  void drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option);
+  void drawDualEdge(QPainter *painter, typename T::Edge e);
+
+
+
+};
+
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::drawDualEdge(QPainter * /*painter*/, typename T::Edge e)
+{
+  CGAL_precondition( ! t->is_infinite(e) );
+
+  CGAL::Polychainline_2<Geom_traits>      pcl;
+  CGAL::Polychainray_2<Geom_traits>       pcr;
+  CGAL::Polychainsegment_2<Geom_traits>   pcs;
+//  CGAL::Polychainline_2<Kern>         pcl;
+//  CGAL::Polychainray_2<Kern>          pcr;
+//  CGAL::Polychainsegment_2<Kern>      pcs;
+
+//  std::cout << "debug drawDE pcl type= " 
+//            << typeid(pcl).name() << std::endl;
+//  std::cout << "debug drawDE pcr type= " 
+//            << typeid(pcr).name() << std::endl;
+//  std::cout << "debug drawDE pcs type= " 
+//            << typeid(pcs).name() << std::endl;
+
+  Object o = t->primal(e);
+
+  //std::cout << "debug drawDE trying to assign object at "
+  //          << &o << std::endl;
+
+  if (CGAL::assign(pcl, o)) { 
+    /* m_painter->setPen(::Qt::cyan); 
+       std::cerr << "line " << std::endl; */ 
+//    std::cout << "debug drawDE pcl-assigned object at "
+//              << &o << std::endl;
+    //painterostream << pcl; 
+    pcl.draw(painterostream);      
+  }
+  else if (CGAL::assign(pcr, o)) { 
+    /* m_painter->setPen(::Qt::magenta); 
+       std::cerr << "segment " << std::endl; */ 
+//    std::cout << "debug drawDE pcr-assigned object at "
+//              << &o << std::endl;
+    //painterostream << pcr;
+    pcr.draw(painterostream);      
+  }
+  else if (CGAL::assign(pcs, o))  { 
+    /* m_painter->setPen(::Qt::darkMagenta);  
+       std::cerr << "ray " << r << std::endl;  */ 
+//    std::cout << "debug drawDE pcs-assigned object at "
+//              << &o << std::endl;
+    //painterostream << pcs; 
+    pcs.draw(painterostream);      
+  }
+  else { 
+    std::cerr << "error: drawDualEdge unknown curve" << std::endl; 
+  }
+
+  /* m_painter->setPen(::Qt::black); */
+}
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::drawAll(QPainter *painter, const QStyleOptionGraphicsItem *option)
+{
+  QRectF rect = option->exposedRect;
+  m_painter = painter;
+  painterostream = PainterOstream<Kern>(m_painter, rect);
+  m_painter->setPen(this->voronoiPen());
+  typename T::Finite_edges_iterator eit = t->finite_edges_begin();
+  for (; eit != t->finite_edges_end(); ++eit) {
+    drawDualEdge(m_painter, *eit);
+  }
+  {
+    m_painter->setPen(this->segmentPen());
+      typename T::Finite_vertices_iterator vit;
+      for (vit = t->finite_vertices_begin();
+	   vit != t->finite_vertices_end(); ++vit) {
+	typename T::Site_2 s = vit->site();
+	if ( s.is_segment() ) {
+	  painterostream << s.segment();
+	}
+      }
+    }
+    {
+    m_painter->setPen(this->verticesPen());
+    QMatrix matrix = m_painter->matrix();
+    m_painter->resetMatrix();
+    Converter<Kern> convert;
+      typename T::Finite_vertices_iterator vit;
+      for (vit = t->finite_vertices_begin();
+	   vit != t->finite_vertices_end(); ++vit) {
+	typename T::Site_2 s = vit->site();
+	if ( s.is_input() ) {
+	  //*widget << CGAL::RED;
+	} else {
+	  //*widget << CGAL::YELLOW;
+	}
+	if ( s.is_point() ) {
+          QPointF point = matrix.map(convert(s.point()));
+          m_painter->drawPoint(point);
+	}
+      }
+    }
+
+}
+
+/*
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::operator()(typename T::Face_handle fh)
+{
+  if(visibleFacesInDomain()) {
+    if(fh->is_in_domain()){
+      this->painterostream = PainterOstream<typename T::Geom_traits>(this->m_painter);
+      this->m_painter->setBrush(facesInDomainBrush());
+      this->m_painter->setPen(::Qt::NoPen) ;
+      this->painterostream << this->t->triangle(fh);
+    }
+  }
+  Base::operator()(fh);
+}
+*/
+
+
+template <typename T>
+QRectF 
+SegmentDelaunayGraphLinfGraphicsItem<T>::boundingRect() const
+{
+
+  QRectF rect = CGAL::Qt::viewportsBbox(scene());
+  return rect;
+}
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::modelChanged()
+{
+  if((t->number_of_vertices() == 0) ){
+    this->hide();
+  } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
+    this->show();
+  }
+  update();
+}
+
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::updateBoundingBox()
+{
+  prepareGeometryChange();
+  if(t->number_of_vertices() == 0){
+    bb = Bbox_2(0,0,0,0);
+    bb_initialized = false;
+    return;
+  } else if(! bb_initialized){
+    //    bb = t->finite_vertices_begin()->point().bbox();
+    bb_initialized = true;
+  }
+  /*
+  if(t->dimension() <2){
+    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
+	it != t->finite_vertices_end();
+	++it){
+      bb = bb + it->point().bbox();
+    }
+  } else {
+    typename T::Vertex_handle inf = t->infinite_vertex();
+    typename T::Vertex_circulator vc = t->incident_vertices(inf), done(vc);
+    do {
+      bb = bb + vc->point().bbox();
+      ++vc;
+    } while(vc != done);
+  }
+  bounding_rect = QRectF(bb.xmin(),
+                         bb.ymin(),
+                         bb.xmax()-bb.xmin(),
+                         bb.ymax()-bb.ymin());
+  */
+}
+
+
+
+template <typename T>
+void 
+SegmentDelaunayGraphLinfGraphicsItem<T>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem *option,
+                                    QWidget * /*widget*/)
+{
+
+//   painter->drawRect(boundingRect());
+  //  if ( t->dimension()<2 || option->exposedRect.contains(boundingRect()) ) {
+
+    drawAll(painter, option);
+    //  } else {
+    //    std::cerr << "else" << std::endl;
+    //  }
+}
+
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_SEGMENT_DELAUNAY_GRAPH_LINF_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentsGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentsGraphicsItem.h
new file mode 100644
index 0000000..cd27e37
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/SegmentsGraphicsItem.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
+#define CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/bounding_box.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename P>
+class SegmentsGraphicsItem : public GraphicsItem
+{
+  typedef typename P::value_type Segment_2;
+  typedef typename CGAL::Kernel_traits<Segment_2>::Kernel Traits;
+
+public:
+  SegmentsGraphicsItem(P* p_);
+
+  void modelChanged();
+
+public:
+  QRectF boundingRect() const;
+  
+  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+  
+
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+  bool drawVertices() const
+  {
+    return draw_vertices;
+  }
+
+  void setDrawVertices(const bool b)
+  {
+    draw_vertices = b;
+    update();
+  }
+
+protected:
+  void updateBoundingBox();
+
+  P * segments;
+  QPainter* m_painter;
+  PainterOstream<Traits> painterostream;
+
+
+  QRectF bounding_rect;
+
+  QPen vertices_pen;
+  bool draw_edges;
+  bool draw_vertices;
+};
+
+
+template <typename P>
+SegmentsGraphicsItem<P>::SegmentsGraphicsItem(P * p_)
+  :  segments(p_), painterostream(0),
+     draw_edges(true), draw_vertices(true)   
+{
+  setVerticesPen(QPen(::Qt::red, 3.));
+
+  updateBoundingBox();
+  setZValue(3);
+}
+
+template <typename P>
+QRectF 
+SegmentsGraphicsItem<P>::boundingRect() const
+{
+  return bounding_rect;
+}
+
+
+
+
+template <typename P>
+void 
+SegmentsGraphicsItem<P>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem * /*option*/,
+                                    QWidget * /*widget*/)
+{
+
+  painterostream = PainterOstream<Traits>(painter);
+  painter->setPen(QPen(::Qt::black, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+    for(typename P::iterator it = segments->begin();
+        it != segments->end();
+        it++){
+      painterostream << *it;
+    }
+}
+
+// We let the bounding box only grow, so that when vertices get removed
+// the maximal bbox gets refreshed in the GraphicsView
+template <typename P>
+void 
+SegmentsGraphicsItem<P>::updateBoundingBox()
+{
+  Converter<Traits> convert;
+  prepareGeometryChange();
+  if(segments->size() == 0){
+    return;
+  }
+  Bbox_2 bb = segments->begin()->bbox();
+  for(typename P::iterator it = segments->begin();
+      it != segments->end();
+      ++it){
+    bb = bb + it->bbox();
+  }
+
+  bounding_rect = convert(bb);
+}
+
+
+template <typename P>
+void 
+SegmentsGraphicsItem<P>::modelChanged()
+{
+  updateBoundingBox();
+  update();
+}
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_SEGMENTS_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/StreamLinesGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/StreamLinesGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/StreamLinesGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/StreamLinesGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/TriangulationGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/TriangulationGraphicsItem.h
new file mode 100644
index 0000000..6bdf5cf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/TriangulationGraphicsItem.h
@@ -0,0 +1,309 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
+#define CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/apply_to_range.h>
+#include <CGAL/Qt/PainterOstream.h>
+#include <CGAL/Qt/GraphicsItem.h>
+#include <CGAL/Qt/Converter.h>
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+namespace CGAL {
+namespace Qt {
+
+template <typename T>
+class TriangulationGraphicsItem : public GraphicsItem
+{
+  typedef typename T::Geom_traits Geom_traits;
+public:
+  TriangulationGraphicsItem(T* t_);
+
+  void modelChanged();
+
+public:
+
+  QRectF boundingRect() const;
+  
+  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+  
+  virtual void operator()(typename T::Face_handle fh);
+
+  const QPen& verticesPen() const
+  {
+    return vertices_pen;
+  }
+
+  QPen& verticesPen()
+  {
+    return vertices_pen;
+  }
+  const QPen& edgesPen() const
+  {
+    return edges_pen;
+  }
+
+  QPen& edgesPen()
+  {
+    return edges_pen;
+  }
+
+  void setVerticesPen(const QPen& pen)
+  {
+    vertices_pen = pen;
+  }
+
+  void setEdgesPen(const QPen& pen)
+  {
+    edges_pen = pen;
+  }
+
+  bool visibleVertices() const
+  {
+    return visible_vertices;
+  }
+
+  void setVisibleVertices(const bool b)
+  {
+    visible_vertices = b;
+    update();
+  }
+
+  bool visibleEdges() const
+  {
+    return visible_edges;
+  }
+
+  void setVisibleEdges(const bool b)
+  {
+    visible_edges = b;
+    update();
+  }
+
+protected:
+  virtual void drawAll(QPainter *painter);
+  void paintVertices(QPainter *painter);
+  void paintOneVertex(const typename T::Point& point);
+  virtual void paintVertex(typename T::Vertex_handle vh);
+  void updateBoundingBox();
+
+  T * t;
+  QPainter* m_painter;
+  PainterOstream<Geom_traits> painterostream;
+
+  typename T::Vertex_handle vh;
+  typename T::Point p;
+  CGAL::Bbox_2 bb;  
+  bool bb_initialized;
+  QRectF bounding_rect;
+
+  QPen vertices_pen;
+  QPen edges_pen;
+  bool visible_edges;
+  bool visible_vertices;
+};
+
+
+template <typename T>
+TriangulationGraphicsItem<T>::TriangulationGraphicsItem(T * t_)
+  :  t(t_), painterostream(0),
+     bb(0,0,0,0), bb_initialized(false),
+     visible_edges(true), visible_vertices(true)
+{
+  setVerticesPen(QPen(::Qt::red, 4.));
+  setEdgesPen(QPen(::Qt::black, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin));
+  if(t->number_of_vertices() == 0){
+    this->hide();
+  }
+  updateBoundingBox();
+  setZValue(3);
+}
+
+template <typename T>
+QRectF 
+TriangulationGraphicsItem<T>::boundingRect() const
+{
+  return bounding_rect;
+}
+
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
+{
+  if(visible_edges) {
+    for (int i=0; i<3; i++) {
+      if (fh < fh->neighbor(i) || t->is_infinite(fh->neighbor(i))){
+        m_painter->setPen(this->edgesPen());
+        painterostream << t->segment(fh,i);
+      }
+    }
+  }
+  if(visible_vertices) {
+    for (int i=0; i<3; i++) {
+      paintVertex(fh->vertex(i));
+    }
+  }
+}
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::drawAll(QPainter *painter)
+{
+  painterostream = PainterOstream<Geom_traits>(painter);
+ 
+  if(visibleEdges()) {
+    for(typename T::Finite_edges_iterator eit = t->finite_edges_begin();
+        eit != t->finite_edges_end();
+        ++eit){
+      painterostream << t->segment(*eit);
+    }
+  }
+  paintVertices(painter);
+}
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::paintVertices(QPainter *painter)
+{
+  if(visibleVertices()) {
+    Converter<Geom_traits> convert;
+
+    painter->setPen(verticesPen());
+    QMatrix matrix = painter->matrix();
+    painter->resetMatrix();
+    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
+        it != t->finite_vertices_end();
+        it++){
+      QPointF point = matrix.map(convert(it->point()));
+      painter->drawPoint(point);
+    }
+  }
+}
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::paintOneVertex(const typename T::Point& point)
+{
+  Converter<Geom_traits> convert;
+
+  m_painter->setPen(this->verticesPen());
+  QMatrix matrix = m_painter->matrix();
+  m_painter->resetMatrix();
+  m_painter->drawPoint(matrix.map(convert(point)));
+  m_painter->setMatrix(matrix);
+}
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::paintVertex(typename T::Vertex_handle vh)
+{
+  Converter<Geom_traits> convert;
+
+  m_painter->setPen(this->verticesPen());
+  QMatrix matrix = m_painter->matrix();
+  m_painter->resetMatrix();
+  m_painter->drawPoint(matrix.map(convert(vh->point())));
+  m_painter->setMatrix(matrix);
+}
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::paint(QPainter *painter, 
+                                    const QStyleOptionGraphicsItem *option,
+                                    QWidget * /*widget*/)
+{
+  painter->setPen(this->edgesPen());
+//   painter->drawRect(boundingRect());
+  if ( t->dimension()<2 || option->exposedRect.contains(boundingRect()) ) {
+    drawAll(painter);
+  } else {
+    m_painter = painter;
+    painterostream = PainterOstream<Geom_traits>(painter);
+    CGAL::apply_to_range (*t, 
+                          typename T::Point(option->exposedRect.left(),
+                                            option->exposedRect.bottom()), 
+                          typename T::Point(option->exposedRect.right(),
+                                            option->exposedRect.top()), 
+                          *this);
+  }
+}
+
+// We let the bounding box only grow, so that when vertices get removed
+// the maximal bbox gets refreshed in the GraphicsView
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::updateBoundingBox()
+{
+  prepareGeometryChange();
+  if(t->number_of_vertices() == 0){
+    bb = Bbox_2(0,0,0,0);
+    bb_initialized = false;
+    return;
+  } else if(! bb_initialized){
+    bb = t->finite_vertices_begin()->point().bbox();
+    bb_initialized = true;
+  }
+  
+  if(t->dimension() <2){
+    for(typename T::Finite_vertices_iterator it = t->finite_vertices_begin();
+	it != t->finite_vertices_end();
+	++it){
+      bb = bb + it->point().bbox();
+    }
+  } else {
+    typename T::Vertex_handle inf = t->infinite_vertex();
+    typename T::Vertex_circulator vc = t->incident_vertices(inf), done(vc);
+    do {
+      bb = bb + vc->point().bbox();
+      ++vc;
+    } while(vc != done);
+  }
+  bounding_rect = QRectF(bb.xmin(),
+                         bb.ymin(),
+                         bb.xmax()-bb.xmin(),
+                         bb.ymax()-bb.ymin());
+}
+
+
+template <typename T>
+void 
+TriangulationGraphicsItem<T>::modelChanged()
+{
+  if((t->number_of_vertices() == 0) ){
+    this->hide();
+  } else if((t->number_of_vertices() > 0) && (! this->isVisible())){
+    this->show();
+  }
+  updateBoundingBox();
+  update();
+}
+
+
+} // namespace Qt
+} // namespace CGAL
+
+#endif // CGAL_QT_TRIANGULATION_GRAPHICS_ITEM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Qt/VoronoiGraphicsItem.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/VoronoiGraphicsItem.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Qt/VoronoiGraphicsItem.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Qt/VoronoiGraphicsItem.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/debug.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/debug.h
new file mode 100644
index 0000000..e5ee869
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/debug.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_DEBUG_H
+#define CGAL_QT_DEBUG_H
+
+#include <CGAL/auto_link/Qt.h>
+#include <CGAL/export/Qt.h>
+
+#include <QString>
+
+namespace CGAL {
+namespace Qt {
+
+/**
+ *  Must be used like that:
+ *     CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
+ *  or
+ *     CGAL::Qt:traverse_resources(":"); // view all resources
+ *  and displays the resources tree on std::cerr.
+ */
+CGAL_QT_EXPORT void traverse_resources(const QString& name,
+                                        const QString& dirname = QString(),
+                                        int indent = 0);
+
+/**
+ * Call this in the end of an OpenGL implementation to check if it returns errors. 
+ */
+CGAL_QT_EXPORT void opengl_check_errors(unsigned int line);
+
+} // namespace Qt
+} // namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/debug_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_DEBUG_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/debug_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/debug_impl.h
new file mode 100644
index 0000000..7454f19
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/debug_impl.h
@@ -0,0 +1,83 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Qt/debug.h>
+#include <QDir>
+#include <iostream>
+#include <CGAL/gl.h>
+#include <qopenglfunctions.h>
+namespace CGAL {
+namespace Qt {
+
+
+CGAL_INLINE_FUNCTION
+void traverse_resources(const QString& name, const QString& dirname, int indent)
+{
+  std::cerr << qPrintable(QString(indent, ' '))
+            << qPrintable(name);
+  QString fullname = 
+    dirname.isEmpty() ?
+    name :
+    dirname + "/" + name;
+  QDir dir(fullname);
+  if(dir.exists()) {
+    std::cerr << "/\n";
+    Q_FOREACH(QString path, dir.entryList())
+    {
+      traverse_resources(path, fullname, indent + 2);
+    }
+  }
+  else {
+    std::cerr << "\n";
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void opengl_check_errors(unsigned int line)
+{
+ GLenum error = ::glGetError();
+ while (error != GL_NO_ERROR)
+ {
+   if(error == GL_INVALID_ENUM)
+     std::cerr << "An unacceptable value is specified for an enumerated argument." << "@" << line << std::endl;
+   if(error == GL_INVALID_VALUE)
+     std::cerr << "A numeric argument is out of range." << "@" << line << std::endl;
+   if(error == GL_INVALID_OPERATION)
+     std::cerr << "The specified operation is not allowed in the current state." << "@" << line << std::endl;
+   if(error == GL_INVALID_FRAMEBUFFER_OPERATION)
+     std::cerr << "The framebuffer object is not complete." << "@" << line << std::endl;
+   if(error == GL_OUT_OF_MEMORY)
+     std::cerr << "There is not enough memory left to execute the command." << "@" << line << std::endl;
+   if(error == GL_STACK_UNDERFLOW)
+     std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to underflow." << "@" << line << std::endl;
+   if(error == GL_STACK_OVERFLOW)
+     std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to overflow." << "@" << line << std::endl;
+   error = ::glGetError();
+ }
+}
+} // namesapce Qt
+} // namespace CGAL
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/resources.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/resources.h
new file mode 100644
index 0000000..7091018
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/resources.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2011  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_RESOURCES_H
+#define CGAL_QT_RESOURCES_H
+
+#include <CGAL/export/Qt.h>
+
+// cannot use namespaces because of the Q_INIT_RESOURCE macro
+CGAL_QT_EXPORT void CGAL_Qt_init_resources();
+
+#define CGAL_QT_INIT_RESOURCES do { CGAL_Qt_init_resources(); } while(0)
+// The do{}while(0) trick is used to make that macro value a regular
+// statement and not a compound statement.
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/resources_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_RESOURCES_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/resources_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/resources_impl.h
new file mode 100644
index 0000000..85508db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/resources_impl.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2011  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <QDir>
+#include <CGAL/Qt/resources.h>
+
+// cannot use namespaces because of the Q_INIT_RESOURCE macro
+CGAL_INLINE_FUNCTION
+void CGAL_Qt_init_resources() {
+  Q_INIT_RESOURCE(File);
+  Q_INIT_RESOURCE(Triangulation_2); 
+  Q_INIT_RESOURCE(Input);
+  Q_INIT_RESOURCE(CGAL);
+}
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/utility.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/utility.h
new file mode 100644
index 0000000..83d03ac
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/utility.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_QT_UTILITY_H
+#define CGAL_QT_UTILITY_H
+
+#include <QRectF>
+#include <QRect>
+
+#include <CGAL/auto_link/Qt.h>
+#include <CGAL/export/Qt.h>
+
+class QGraphicsScene;
+class QGraphicsView;
+
+namespace CGAL {
+namespace Qt {
+
+CGAL_QT_EXPORT QRectF mapToScene(const QGraphicsView* v, const QRect rect);
+CGAL_QT_EXPORT QRectF viewportsBbox(const QGraphicsScene*);
+
+} // namespace Qt
+} // namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Qt/utility_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_QT_UTILITY_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Qt/utility_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Qt/utility_impl.h
new file mode 100644
index 0000000..4fea345
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Qt/utility_impl.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+   
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Qt/utility.h>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QList>
+#include <QPoint>
+#include <QPointF>
+
+namespace CGAL {
+namespace Qt {
+
+CGAL_INLINE_FUNCTION
+QRectF mapToScene(const QGraphicsView* v, const QRect rect)
+{
+  QPointF top_left = v->mapToScene(rect.topLeft());
+  QPointF size = v->mapToScene(rect.bottomRight());
+  size -= top_left;
+  return QRectF(top_left.x(),
+		top_left.y(),
+		size.x(),
+		size.y());
+}
+
+CGAL_INLINE_FUNCTION
+QRectF viewportsBbox(const QGraphicsScene* scene) {
+   QRectF rect;
+   Q_FOREACH(QGraphicsView* view, scene->views())
+   {
+     rect |= mapToScene(view, view->viewport()->rect());
+   }
+   rect = rect.normalized();
+   return rect;
+}
+
+} // namespace Qt
+} // namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Quotient.h b/3rdparty/CGAL-4.8/include/CGAL/Quotient.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Quotient.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Quotient.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Quotient_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Quotient_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Quotient_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Quotient_fwd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/Gmpfr_make_unique.h b/3rdparty/CGAL-4.8/include/CGAL/RS/Gmpfr_make_unique.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/Gmpfr_make_unique.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/Gmpfr_make_unique.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/ak_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/ak_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/ak_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/ak_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/ak_z_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/ak_z_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/ak_z_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/ak_z_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/algebraic_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/algebraic_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/algebraic_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/algebraic_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/algebraic_z_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/algebraic_z_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/algebraic_z_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/algebraic_z_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/bisection_refiner_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/bisection_refiner_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/bisection_refiner_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/bisection_refiner_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/comparator_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/comparator_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/comparator_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/comparator_1.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/RS/dyadic.h b/3rdparty/CGAL-4.8/include/CGAL/RS/dyadic.h
new file mode 100644
index 0000000..9f35ea8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/RS/dyadic.h
@@ -0,0 +1,438 @@
+// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author: Luis Peñaranda <luis.penaranda at gmx.com>
+
+#ifndef CGAL_RS_DYADIC_H
+#define CGAL_RS_DYADIC_H
+
+#include <stdio.h>
+#include <math.h>
+#include <gmp.h>
+#include <mpfr.h>
+#include <CGAL/assertions.h>
+
+// for c++, compile with -lgmpxx
+#ifdef __cplusplus
+#include <iostream>
+#endif
+
+#define CGALRS_dyadic_struct            __mpfr_struct
+#define CGALRS_dyadic_t                 mpfr_t
+#define CGALRS_dyadic_ptr               mpfr_ptr
+#define CGALRS_dyadic_srcptr            mpfr_srcptr
+
+// some auxiliary defines
+#define CGALRS_dyadic_set_prec(D,P) \
+ ( mpfr_set_prec( (D), (P)>MPFR_PREC_MIN?(P):MPFR_PREC_MIN) )
+
+#define CGALRS_dyadic_prec_round(D,P) \
+ ( mpfr_prec_round( (D), (P)>MPFR_PREC_MIN?(P):MPFR_PREC_MIN, GMP_RNDN) )
+
+#define CGALRS_dyadic_set_exp(D,E) \
+ ( CGAL_assertion( (E) <= mpfr_get_emax() && \
+                   (E) >= mpfr_get_emin() ) ,\
+   mpfr_set_exp(D,E) )
+
+// init functions
+#define CGALRS_dyadic_init(D)          mpfr_init2(D,MPFR_PREC_MIN)
+#define CGALRS_dyadic_init2(D,P)       mpfr_init2(D,P)
+#define CGALRS_dyadic_clear(D)         mpfr_clear(D)
+
+inline void CGALRS_dyadic_set(CGALRS_dyadic_ptr rop,CGALRS_dyadic_srcptr op){
+        if(rop!=op){
+                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
+                mpfr_set(rop,op,GMP_RNDN);
+        }
+        CGAL_assertion(mpfr_equal_p(rop,op)!=0);
+}
+
+inline void CGALRS_dyadic_set_z(CGALRS_dyadic_ptr rop,mpz_srcptr z){
+        size_t prec;
+        prec=mpz_sizeinbase(z,2)-(mpz_tstbit(z,0)?0:mpz_scan1(z,0));
+        CGALRS_dyadic_set_prec(rop,prec);
+        mpfr_set_z(rop,z,GMP_RNDN);
+        CGAL_assertion(!mpfr_cmp_z(rop,z));
+}
+
+inline void CGALRS_dyadic_set_si(CGALRS_dyadic_ptr rop,long s){
+        CGALRS_dyadic_set_prec(rop,sizeof(long));
+        mpfr_set_si(rop,s,GMP_RNDN);
+        CGAL_assertion(!mpfr_cmp_si(rop,s));
+}
+
+inline void CGALRS_dyadic_set_ui(CGALRS_dyadic_ptr rop,unsigned long u){
+        CGALRS_dyadic_set_prec(rop,sizeof(unsigned long));
+        mpfr_set_ui(rop,u,GMP_RNDN);
+        CGAL_assertion(!mpfr_cmp_ui(rop,u));
+}
+
+inline void CGALRS_dyadic_set_fr(CGALRS_dyadic_ptr rop,mpfr_srcptr op){
+        if(rop!=op){
+                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
+                mpfr_set(rop,op,GMP_RNDN);
+                CGAL_assertion(mpfr_equal_p(rop,op)!=0);
+        }
+}
+
+#define CGALRS_dyadic_init_set(R,D) \
+ ( CGALRS_dyadic_init(R), CGALRS_dyadic_set((R), (D)) )
+#define CGALRS_dyadic_init_set_z(R,Z) \
+ ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_z((R), (Z)) )
+#define CGALRS_dyadic_init_set_si(R,I) \
+ ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_si((R), (I)) )
+#define CGALRS_dyadic_init_set_ui(R,I) \
+ ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_ui((R), (I)) )
+#define CGALRS_dyadic_init_set_fr(R,F) \
+ ( CGALRS_dyadic_init(R), CGALRS_dyadic_set_fr((R), (F)) )
+
+#define CGALRS_dyadic_get_fr(M,D)      mpfr_set(M,D,GMP_RNDN)
+#define CGALRS_dyadic_get_d(D,RM)      mpfr_get_d(D,RM)
+inline void CGALRS_dyadic_get_exactfr(mpfr_ptr rop,CGALRS_dyadic_srcptr op){
+        if(rop!=op){
+                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
+                mpfr_set(rop,op,GMP_RNDN);
+                CGAL_assertion(mpfr_equal_p(rop,op)!=0);
+        }
+}
+
+#define CGALRS_dyadic_canonicalize(D)  ()
+
+// comparison functions
+#define CGALRS_dyadic_sgn(D)    mpfr_sgn(D)
+#define CGALRS_dyadic_zero(D)   mpfr_zero_p(D)
+#define CGALRS_dyadic_cmp(D,E)  mpfr_cmp(D,E)
+
+// arithmetic functions
+#define CGALRS_dyadic_add(R,D,E)        CGALRS_dyadic_ll_add(R,D,E,0)
+#define CGALRS_dyadic_sub(R,D,E)        CGALRS_dyadic_ll_sub(R,D,E,0)
+#define CGALRS_dyadic_mul(R,D,E)        CGALRS_dyadic_ll_mul(R,D,E,0)
+
+inline void CGALRS_dyadic_neg(CGALRS_dyadic_ptr rop,CGALRS_dyadic_srcptr op){
+        if(rop!=op)
+                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op));
+        mpfr_neg(rop,op,GMP_RNDN);
+        CGAL_assertion(
+                rop==op||
+                (!mpfr_cmpabs(rop,op)&&
+                ((CGALRS_dyadic_zero(op)&&CGALRS_dyadic_zero(rop))||
+                 (CGALRS_dyadic_sgn(op)!=CGALRS_dyadic_sgn(rop)))));
+}
+
+// low-level addition:
+// add op1 and op2 and reserve b bits for future lowlevel operations
+inline void CGALRS_dyadic_ll_add(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 CGALRS_dyadic_srcptr op2,
+                                 mp_prec_t b){
+        mp_exp_t l,r,temp1,temp2;
+        mp_prec_t rop_prec;
+        if(mpfr_zero_p(op1)){
+                if(rop!=op2)
+                        CGALRS_dyadic_set(rop,op2);
+                return;
+        }
+        if(mpfr_zero_p(op2)){
+                if(rop!=op1)
+                        CGALRS_dyadic_set(rop,op1);
+                return;
+        }
+        l=mpfr_get_exp(op1)>mpfr_get_exp(op2)?
+                mpfr_get_exp(op1):
+                mpfr_get_exp(op2);
+        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
+        temp2=mpfr_get_exp(op2)-(mp_exp_t)mpfr_get_prec(op2);
+        r=temp1>temp2?temp2:temp1;
+        CGAL_assertion(l>r);
+
+        rop_prec=b+1+(mp_prec_t)(l-r);
+        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
+                rop_prec>=mpfr_get_prec(op2));
+        if(rop==op1||rop==op2)
+                CGALRS_dyadic_prec_round(rop,rop_prec);
+        else
+                CGALRS_dyadic_set_prec(rop,rop_prec);
+        CGAL_assertion_code(int round=)
+        mpfr_add(rop,op1,op2,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_add_z(CGALRS_dyadic_ptr rop,
+                                CGALRS_dyadic_srcptr op1,
+                                mpz_srcptr z){
+        mp_exp_t l,r;
+        mp_prec_t rop_prec;
+        if(mpfr_zero_p(op1)){
+                CGALRS_dyadic_set_z(rop,z);
+                return;
+        }
+        if(!mpz_sgn(z)){
+                if(rop!=op1)
+                        CGALRS_dyadic_set(rop,op1);
+                return;
+        }
+        l=mpfr_get_exp(op1)>(mp_exp_t)mpz_sizeinbase(z,2)?
+                mpfr_get_exp(op1):
+                mpz_sizeinbase(z,2);
+        r=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1)<0?
+                mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1):
+                0;
+        CGAL_assertion(l>r);
+
+        rop_prec=1+(mp_prec_t)(l-r);
+        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
+                rop_prec>=(mp_prec_t)mpz_sizeinbase(z,2));
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(rop,rop_prec);
+        else
+                CGALRS_dyadic_set_prec(rop,rop_prec);
+        CGAL_assertion_code(int round=)
+        mpfr_add_z(rop,op1,z,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+// low-level subtraction:
+// subtract op2 to op1 and reserve b bits for future lowlevel operations
+inline void CGALRS_dyadic_ll_sub(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 CGALRS_dyadic_srcptr op2,
+                                 mp_prec_t b){
+        mp_exp_t l,r,temp1,temp2;
+        mp_prec_t rop_prec;
+        if(mpfr_zero_p(op1)){
+                CGALRS_dyadic_neg(rop,op2);
+                return;
+        }
+        if(mpfr_zero_p(op2)){
+                if(rop!=op1)
+                        CGALRS_dyadic_set(rop,op1);
+                return;
+        }
+        l=mpfr_get_exp(op1)>mpfr_get_exp(op2)?
+                mpfr_get_exp(op1):
+                mpfr_get_exp(op2);
+        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
+        temp2=mpfr_get_exp(op2)-(mp_exp_t)mpfr_get_prec(op2);
+        r=temp1>temp2?temp2:temp1;
+        CGAL_assertion(l>r);
+
+        rop_prec=b+1+(mp_prec_t)(l-r);
+        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
+                rop_prec>=mpfr_get_prec(op2));
+        if(rop==op1||rop==op2)
+                CGALRS_dyadic_prec_round(rop,rop_prec);
+        else
+                CGALRS_dyadic_set_prec(rop,rop_prec);
+        CGAL_assertion_code(int round=)
+        mpfr_sub(rop,op1,op2,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+// low-level multiplication:
+// multiply op1 and op2 and reserve b bits for future lowlevel operations
+inline void CGALRS_dyadic_ll_mul(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 CGALRS_dyadic_srcptr op2,
+                                 mp_prec_t b){
+        if(rop==op1||rop==op2)
+                CGALRS_dyadic_prec_round(rop,b+mpfr_get_prec(op1)+mpfr_get_prec(op2));
+        else
+                CGALRS_dyadic_set_prec(rop,b+mpfr_get_prec(op1)+mpfr_get_prec(op2));
+        CGAL_assertion_code(int round=)
+        mpfr_mul(rop,op1,op2,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_mul_z(CGALRS_dyadic_ptr rop,
+                                CGALRS_dyadic_srcptr op1,
+                                mpz_srcptr z){
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(
+                        rop,
+                        mpfr_get_prec(op1)+mpz_sizeinbase(z,2));
+        else
+                CGALRS_dyadic_set_prec(
+                        rop,
+                        mpfr_get_prec(op1)+mpz_sizeinbase(z,2));
+        CGAL_assertion_code(int round=)
+        mpfr_mul_z(rop,op1,z,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_mul_si(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 long s){
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(rop,mpfr_get_prec(op1)+sizeof(long));
+        else
+                CGALRS_dyadic_set_prec(rop,mpfr_get_prec(op1)+sizeof(long));
+        CGAL_assertion_code(int round=)
+        mpfr_mul_si(rop,op1,s,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_mul_ui(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 unsigned long u){
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(
+                        rop,
+                        mpfr_get_prec(op1)+sizeof(unsigned long));
+        else
+                CGALRS_dyadic_set_prec(
+                        rop,
+                        mpfr_get_prec(op1)+sizeof(unsigned long));
+        CGAL_assertion_code(int round=)
+        mpfr_mul_ui(rop,op1,u,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_pow_ui(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 unsigned long u){
+        if(!u){
+                CGAL_assertion_msg(!mpfr_zero_p(op1),"0^0");
+                CGALRS_dyadic_set_ui(rop,1);
+                return;
+        }
+        if(u==1){
+                if(rop!=op1)
+                        CGALRS_dyadic_set(rop,op1);
+                return;
+        }
+        if(mpfr_zero_p(op1)){
+                CGAL_assertion_msg(u!=0,"0^0");
+                CGALRS_dyadic_set_ui(rop,0);
+                return;
+        }
+        if(!mpfr_cmp_ui(op1,1)){
+                if(rop!=op1)
+                        CGALRS_dyadic_set(rop,op1);
+                return;
+        }
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(rop,u*mpfr_get_prec(op1));
+        else
+                CGALRS_dyadic_set_prec(rop,u*mpfr_get_prec(op1));
+        CGAL_assertion_code(int round=)
+        mpfr_pow_ui(rop,op1,u,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_addmul(CGALRS_dyadic_ptr rop,
+                                 CGALRS_dyadic_srcptr op1,
+                                 CGALRS_dyadic_srcptr op2){
+        CGALRS_dyadic_t temp;
+        CGALRS_dyadic_init(temp);
+        CGALRS_dyadic_mul(temp,op1,op2);
+        CGALRS_dyadic_add(rop,rop,temp);
+        CGALRS_dyadic_clear(temp);
+}
+
+inline void CGALRS_dyadic_addmul_si(CGALRS_dyadic_ptr rop,
+                                    CGALRS_dyadic_srcptr op1,
+                                    long op2){
+        CGALRS_dyadic_t temp;
+        CGALRS_dyadic_init(temp);
+        CGALRS_dyadic_mul_si(temp,op1,op2);
+        CGALRS_dyadic_add(rop,rop,temp);
+        CGALRS_dyadic_clear(temp);
+}
+
+inline void CGALRS_dyadic_addmul_ui(CGALRS_dyadic_ptr rop,
+                                    CGALRS_dyadic_srcptr op1,
+                                    unsigned long u){
+        //CGALRS_dyadic_t temp;
+        //CGALRS_dyadic_init(temp);
+        //CGALRS_dyadic_mul_ui(temp,op1,u);
+        //CGALRS_dyadic_add(rop,rop,temp);
+        //CGALRS_dyadic_clear(temp);
+        CGALRS_dyadic_t temp;
+        mp_exp_t l,r,temp1,temp2;
+        mp_prec_t rop_prec;
+        if(u==0||mpfr_zero_p(op1))
+                return;
+        if(u==1){
+                CGALRS_dyadic_add(rop,rop,op1);
+                return;
+        }
+        // TODO: if(op1==1)
+        // calculate temp=op1*u
+        mpfr_init2(temp,mpfr_get_prec(op1)+sizeof(unsigned int));
+        CGAL_assertion_code(int round1=)
+        mpfr_mul_ui(temp,op1,u,GMP_RNDN);
+        CGAL_assertion(!round1);
+        // calculate the precision needed for rop
+        l=mpfr_get_exp(op1)>0?mpfr_get_exp(op1):0;
+        temp1=mpfr_get_exp(op1)-(mp_exp_t)mpfr_get_prec(op1);
+        temp2=sizeof(unsigned long);
+        r=temp1>temp2?temp2:temp1;
+        CGAL_assertion(l>r);
+        rop_prec=sizeof(unsigned long)+1+(mp_prec_t)(l-r);
+        CGAL_assertion(rop_prec>=mpfr_get_prec(op1)&&
+                rop_prec>=mpfr_get_prec(rop));
+        // set precision and add
+        CGALRS_dyadic_prec_round(rop,rop_prec);
+        CGAL_assertion_code(int round2=)
+        mpfr_add(rop,rop,temp,GMP_RNDN);
+        CGAL_assertion(!round2);
+}
+
+inline void CGALRS_dyadic_mul_2exp(CGALRS_dyadic_ptr rop,
+                                   CGALRS_dyadic_srcptr op1,
+                                   unsigned long ui){
+        // mpfr_mul_2ui does change the mantissa!
+        if(rop==op1)
+                CGALRS_dyadic_prec_round(
+                        rop,
+                        sizeof(unsigned long)+mpfr_get_prec(op1));
+        else
+                CGALRS_dyadic_set_prec(
+                        rop,
+                        sizeof(unsigned long)+mpfr_get_prec(op1));
+        CGAL_assertion_code(int round=)
+        mpfr_mul_2ui(rop,op1,ui,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+inline void CGALRS_dyadic_div_2exp(CGALRS_dyadic_ptr rop,
+                                   CGALRS_dyadic_srcptr op1,
+                                   unsigned long ui){
+        // mpfr_div_2ui does not change the mantissa... am I sure?
+        CGAL_assertion_code(int round=)
+        mpfr_div_2ui(rop,op1,ui,GMP_RNDN);
+        CGAL_assertion(!round);
+}
+
+// miscellaneous functions
+#define CGALRS_dyadic_midpoint(R,D,E) \
+ ( CGALRS_dyadic_ll_add(R,D,E,1) , mpfr_div_2ui(R,R,1,GMP_RNDN) )
+#define CGALRS_dyadic_swap(D,E)         mpfr_swap(D,E)
+
+// I/O functions
+#define CGALRS_dyadic_out_str(F,D)      mpfr_out_str(F,10,0,D,GMP_RNDN)
+#ifdef __cplusplus
+inline std::ostream& operator<<(std::ostream &s,CGALRS_dyadic_srcptr op){
+        mp_exp_t exponent;
+        mpz_t mantissa;
+        mpz_init(mantissa);
+        exponent=mpfr_get_z_exp(mantissa,op);
+        s<<"["<<mantissa<<","<<exponent<<"]";
+        return s;
+}
+#endif
+
+#endif  // CGAL_RS_DYADIC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/exact_signat_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/exact_signat_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/exact_signat_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/exact_signat_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/functors_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/functors_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/functors_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/functors_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/functors_z_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/functors_z_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/functors_z_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/functors_z_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/polynomial_converter_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/polynomial_converter_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/polynomial_converter_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/polynomial_converter_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/rs23_k_isolator_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/rs23_k_isolator_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/rs23_k_isolator_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/rs23_k_isolator_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/rs2_calls.h b/3rdparty/CGAL-4.8/include/CGAL/RS/rs2_calls.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/rs2_calls.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/rs2_calls.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/rs2_isolator_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/rs2_isolator_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/rs2_isolator_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/rs2_isolator_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/rs3_k_refiner_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/rs3_k_refiner_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/rs3_k_refiner_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/rs3_k_refiner_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/rs3_refiner_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/rs3_refiner_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/rs3_refiner_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/rs3_refiner_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/RS/signat_1.h b/3rdparty/CGAL-4.8/include/CGAL/RS/signat_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/RS/signat_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/RS/signat_1.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Random.h b/3rdparty/CGAL-4.8/include/CGAL/Random.h
new file mode 100644
index 0000000..665dd78
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Random.h
@@ -0,0 +1,254 @@
+// Copyright (c) 1997-2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schoenherr <sven at inf.ethz.ch>, Sylvain Pion, Andreas Fabri
+
+#ifndef CGAL_RANDOM_H
+#define CGAL_RANDOM_H
+
+#include <string>
+#include <utility>
+#include <CGAL/basic.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+#include <boost/random/uniform_smallint.hpp>
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/random/uniform_01.hpp>
+#include <boost/random/variate_generator.hpp>
+
+namespace CGAL {
+
+class Random {
+public:
+  // types
+  
+  struct State {
+    std::string rng;
+    unsigned int random_value, val, seed;
+    
+    State()
+    {}
+    
+    State(std::string rng, 
+          unsigned int random_value, 
+          unsigned int val, 
+          unsigned int seed)
+      : rng(rng), random_value(random_value), val(val), seed(seed)
+    {}
+  };
+  // creation
+  CGAL_EXPORT Random( );
+  CGAL_EXPORT Random( unsigned int  seed);
+  
+  // seed
+  CGAL_EXPORT unsigned int get_seed ( ) const;
+    
+  // operations
+  bool get_bool( )
+  {
+    return( static_cast< bool>( rng() & 1));
+  }
+
+
+  template <typename IntType>
+  IntType
+  uniform_smallint(IntType lower, IntType upper)
+  {
+    // uniform_smallint has a closed interval, CGAL a halfopen
+    boost::uniform_smallint<IntType> dist(lower,upper-1);
+    boost::variate_generator<boost::rand48&, boost::uniform_smallint<IntType> > generator(rng,dist);
+    
+    return generator();
+  }
+
+  template <typename IntType>
+  IntType
+  uniform_smallint(IntType lower)
+  {
+    return uniform_smallint<IntType>(lower,9);
+  }
+
+  template <typename IntType>
+  IntType
+  uniform_smallint()
+  {
+    return uniform_smallint<IntType>(0,9);
+  }
+
+  template <typename IntType>
+  IntType
+  uniform_int(IntType lower, IntType upper)
+  {
+    // uniform_int has a closed interval, CGAL a halfopen
+    boost::uniform_int<IntType> dist(lower,upper);
+    boost::variate_generator<boost::rand48&, boost::uniform_int<IntType> > generator(rng,dist);
+    
+    return generator();
+  }
+
+
+  template <typename IntType>
+  IntType
+  uniform_int(IntType lower)
+  {
+    return uniform_int<IntType>(lower,9);
+  }
+
+  template <typename IntType>
+  IntType
+  uniform_int()
+  {
+    return uniform_int<IntType>(0,9);
+  }
+ 
+
+  
+  template <typename IntType>
+  IntType
+  operator () (IntType upper)
+  {
+    return uniform_int<IntType>(0, upper-1);
+  }
+ 
+  int
+  get_int(int lower, int upper)
+  {
+    return uniform_int<int>(lower,upper-1);
+  }
+
+
+  template <typename RealType>
+  RealType
+  uniform_real( RealType lower, RealType upper)
+  {
+    // uniform_real as well as CGAL have a halfopen interval
+    boost::uniform_real<RealType> dist(lower,upper);
+    boost::variate_generator<boost::rand48&, boost::uniform_real<RealType> > generator(rng,dist);
+    
+    return generator();
+  }
+
+
+  template <typename RealType>
+  RealType
+  uniform_real( RealType lower)
+  {
+    return uniform_real<RealType>(lower, 1.0);
+  }
+
+
+  template <typename RealType>
+  RealType
+  uniform_real()
+  {
+    return uniform_real<RealType>(0.0, 1.0);
+  }
+
+
+  template <typename RealType>
+  RealType
+  uniform_01()
+  {
+    // uniform_01 as well as CGAL have a halfopen interval
+    boost::uniform_01<RealType> dist;
+    boost::variate_generator<boost::rand48&, boost::uniform_01<RealType> > generator(rng,dist);
+    
+    return generator();
+  }
+
+
+  double
+  get_double( double lower = 0.0, double upper = 1.0)
+  {
+    return uniform_real<double>(lower, upper);
+  }
+
+    // state 
+    CGAL_EXPORT void save_state( State& state) const;
+    CGAL_EXPORT void restore_state( const State& state);
+
+    // Computes a random int value smaller than 2^b.
+    // It's supposed to be fast, useful for randomized algorithms.
+    // The distribution is not perfectly flat, but this is a sacrifice against
+    // efficiency.
+    template <int b>
+    int get_bits()
+    {
+	CGAL_assertion(0<b && b<16);
+        if (val == 0) {
+            random_value = (421U * random_value + 2073U) % 32749U;
+            val = random_value;
+        }
+        int ret = val & ((1<<b)-1);
+        val >>= 1; // Shifting by b would be slightly better, but is slower.
+        return ret;
+    }
+
+    
+  bool    operator==(Random rd) const
+  {
+    return (rng == rd.rng) 
+      && (random_value == rd.random_value)
+      && (val == rd.val)
+      && (seed == rd.seed);
+  }
+
+  private:
+    // data members
+    unsigned int random_value; // Current 15 bits random value.
+    unsigned int val; // random_value shifted by used bits.
+    unsigned int seed; 
+    boost::rand48 rng;
+};
+
+#ifndef CGAL_HEADER_ONLY
+// Global variables
+// ================
+CGAL_EXPORT extern  Random  default_random;
+#endif // CGAL_HEADER_ONLY
+
+#ifdef CGAL_HEADER_ONLY
+inline Random& get_default_random()
+{
+  static Random default_random;
+  return default_random;
+}
+#else // CGAL_HEADER_ONLY
+inline Random& get_default_random()
+{ return default_random; }
+#endif // CGAL_HEADER_ONLY
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Random_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_RANDOM_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_access_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Random_access_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_access_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_access_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_access_value_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Random_access_value_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_access_value_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_access_value_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_convex_hull_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Random_convex_hull_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_convex_hull_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_convex_hull_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_convex_set_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Random_convex_set_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_convex_set_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_convex_set_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Random_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Random_impl.h
new file mode 100644
index 0000000..16cb9e0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Random_impl.h
@@ -0,0 +1,94 @@
+// Copyright (c) 1997-2001
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Schönherr <sven at inf.ethz.ch>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <ctime>
+#include <sstream>
+
+namespace CGAL {
+
+// Class implementation (continued)
+// ================================
+
+// constructors
+CGAL_INLINE_FUNCTION
+Random::
+Random( )
+    :  val(0)
+{
+    // get system's time
+    std::time_t s;
+    std::time( &s);
+    seed = (unsigned int)s;
+
+    // initialize random numbers generator
+    rng.seed(static_cast<boost::int32_t>(seed));
+    random_value = get_int(0, 1<<15);
+}
+
+CGAL_INLINE_FUNCTION
+Random::
+Random( unsigned int  seed)
+    : val(0), seed(seed)
+{
+    // initialize random numbers generator
+    rng.seed(static_cast<boost::int32_t>(seed));
+    random_value = get_int(0, 1<<15);
+}
+
+// seed
+CGAL_INLINE_FUNCTION
+unsigned int
+Random::get_seed () const
+{
+  return seed;
+}
+
+// state
+CGAL_INLINE_FUNCTION
+void
+Random::save_state( Random::State& state) const
+{
+  std::ostringstream os;
+  os << rng;
+  state = Random::State(os.str(),random_value, val, seed);
+}
+
+CGAL_INLINE_FUNCTION
+void
+Random::restore_state( const Random::State& state)
+{
+  std::istringstream is(state.rng);
+  is >> rng;
+  random_value = state.random_value;
+  val = state.val;
+  seed = state.seed;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_polygon_2_sweep.h b/3rdparty/CGAL-4.8/include/CGAL/Random_polygon_2_sweep.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_polygon_2_sweep.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_polygon_2_sweep.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Random_polygon_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Random_polygon_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Random_polygon_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Random_polygon_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Range_segment_tree_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Range_segment_tree_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Range_segment_tree_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Range_segment_tree_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Range_tree_d.h b/3rdparty/CGAL-4.8/include/CGAL/Range_tree_d.h
new file mode 100644
index 0000000..a7b731b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Range_tree_d.h
@@ -0,0 +1,623 @@
+// Copyright (c) 1997  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Gabriele Neyer
+
+
+#ifndef CGAL_RANGE_TREE_D_H
+#define CGAL_RANGE_TREE_D_H
+
+#include <algorithm>
+#include <iterator>
+#include <functional>
+#include <CGAL/Tree_base.h>
+#include <list>
+#include <vector>
+
+// A d-dimensional Range Tree or a multilayer tree consisting of Range 
+// and other trees that are derived public 
+// Tree_base<C_Data, C_Window, C_Interface>
+// can be construced within this class.
+// C_Data: container class which contains the d-dimensional data the tree holds.
+// C_Window: Query window -- a d-dimensional interval
+// C_Interface: Interface for the class with functions that allow to 
+// access the data.
+// cf. file Tree_interface.h, class point_interface for the requirements.
+
+namespace CGAL {
+
+template <class C_Data, class C_Window, class C_Interface>
+class Range_tree_d;
+
+template <class C_Data, class C_Window, class C_Interface>
+struct Range_tree_node: public Tree_node_base<Range_tree_node<C_Data, C_Window, C_Interface> >
+{
+  private:
+  typedef  C_Data Data;
+  typedef  C_Window Window;
+  typedef typename C_Interface::Key Key;
+  typedef  C_Interface Interface;
+  typedef typename Tree_base< C_Data,  C_Window>::Tree_base_type Tree_base_type;
+  //  protected:
+  //typedef Range_tree_d< C_Data,  C_Window,  C_Interface> rT_d;
+public:
+  friend class Range_tree_d< C_Data,  C_Window,  C_Interface>;
+
+  typedef Tree_node_base<Range_tree_node<C_Data, C_Window, C_Interface> >  Base;
+
+  Range_tree_node()
+    : sublayer(0)
+  {} 
+
+  Range_tree_node( Range_tree_node    * p_left,
+		   Range_tree_node    * p_right,
+		   const  Data & v_obj,
+		   const  Key  & v_key )
+    : Base(p_left, p_right), object( v_obj ), key( v_key ), sublayer(0)
+  {}
+  
+  Range_tree_node( Range_tree_node    * p_left,
+		   Range_tree_node    * p_right,
+		   const  Key  & v_key )
+    : Base(p_left, p_right), key( v_key ), sublayer(0)
+  {}
+
+  virtual ~Range_tree_node()
+  {
+    if (sublayer != 0)
+      delete sublayer;
+  }
+  
+  Data object;
+  Key key;
+  Tree_base_type *sublayer;
+};
+
+
+template <class C_Data, class C_Window, class C_Interface>
+class Range_tree_d: public Tree_base< C_Data,  C_Window>
+{
+ private:
+  typedef  C_Data Data;
+  typedef  C_Window Window;
+  typedef typename C_Interface::Key Key;
+  typedef  C_Interface Interface;
+  typedef Tree_base< C_Data,  C_Window>  tbt;
+protected:
+  //  typedef Range_tree_d< C_Data,  C_Window,  C_Interface> rT_d;
+  Tree_base<C_Data, C_Window> *sublayer_tree;
+  C_Interface m_interface;
+  int is_built;
+
+ 
+  // A vertex is of this type:
+  //  struct Range_tree_node;
+
+  friend struct Range_tree_node<C_Data,C_Window,C_Interface>;
+
+  typedef Range_tree_node<C_Data,C_Window,C_Interface> Range_tree_node2;
+  typedef Range_tree_node<C_Data,C_Window,C_Interface> *link_type;
+
+  static link_type& left(link_type x) { 
+    return x->left_link;
+  }
+  static link_type& right(link_type x) {
+    return x->right_link;   
+  }
+
+  static link_type& parent(link_type x) {
+    return x->parent_link;
+  }
+
+  link_type header;
+  link_type node;
+  link_type rightmost(){return right(header);}
+  link_type leftmost(){return left(header);}
+  link_type root() const {
+    if(header!=0)
+      return header->parent_link;
+    // return parent(header);
+    else 
+      return 0;
+  }
+
+  bool is_less_equal(const Key&  x, const Key&  y) const
+  {
+    return (!m_interface.comp(y,x));
+  }  
+  
+  // this tree is not a recursion anchor
+  bool is_anchor() const {return false;}
+
+  // returns true, if the object lies inside of win
+  bool is_inside( C_Window const &win,  C_Data const& object) const
+  {
+    if(is_less_equal(m_interface.get_left(win), m_interface.get_key(object)) 
+       && m_interface.comp(m_interface.get_key(object),m_interface.get_right(win)))
+   //half open
+//       && is_less_equal(m_interface.get_key(object),m_interface.get_right(win)))
+   //closed interval
+    {
+      return sublayer_tree->is_inside(win,object);
+    }
+
+    return false;
+  }
+
+
+  // merge sort algorithms that takes O(n) time if the sequence to
+  // be sorted consists of two sorted subsequences.
+  template <class T>
+  void dynamic_merge(const T& first, const T& last) // af: was not const
+  {
+    T prev, current=first;
+    T current_first, current_middle, current_last;
+
+    std::list<T> startpoints, tmp_startpoints;
+    startpoints.push_back(current);
+    prev = current++;
+
+    while(current!=last)
+    {
+      if (m_interface.comp(m_interface.get_key(*current),m_interface.get_key(*prev)))
+	startpoints.push_back(current);
+      prev = current++;
+    }
+    while(startpoints.size()>1)
+    {
+      while(startpoints.size()>1)
+      {
+	current_first = startpoints.front();
+	startpoints.erase(startpoints.begin());
+	current_middle = startpoints.front();
+	startpoints.erase(startpoints.begin());
+	if(startpoints.size()>0)
+	  current_last = startpoints.front();
+	else 
+	  current_last = last;
+	tmp_startpoints.push_back(current_first);
+	std::inplace_merge(current_first, current_middle, current_last, 
+		      m_interface.key_comp);
+      }
+      if(startpoints.size()>0)
+      {
+	tmp_startpoints.push_back(startpoints.front());
+	startpoints.erase(startpoints.begin());
+      }
+      startpoints.swap(tmp_startpoints);
+    }
+  }
+
+
+  // recursive function 
+  // (current,last) describe an interval of length n of sorted elements,
+  // for this interval a tree is build containing these elements.
+  // the most left child is returend in prevchild.
+
+  template <class T>
+  void build_range_tree(int n, link_type& leftchild, 
+			link_type& rightchild,
+			link_type& prevchild, 
+			link_type& leftmostlink,
+			T& current, 
+			const T& last,
+			T& sublevel_first,
+			T& sublevel_last)
+  {
+    // only two elements ==> two leaves and a parent is constructed
+    if (n==2)
+    {
+      sublevel_first = current;
+
+      link_type  vleft = new Range_tree_node2( 0, 0,
+                                  (*current), m_interface.get_key(*current) ); 
+      //CGAL_NIL CGAL_NIL first two arguments
+      CGAL_Tree_assertion( vleft != 0);
+
+      ++current;
+      link_type  vright = new Range_tree_node2( 0,0,
+                                  (*current), m_interface.get_key(*current) ); 
+      //CGAL_NIL CGAL_NIL first two arguments
+      CGAL_Tree_assertion( vright != 0);
+      current++;
+      sublevel_last = current;
+
+      link_type  vparent = new Range_tree_node2( vleft, vright, vleft->key );
+      CGAL_Tree_assertion( vparent != 0);
+
+      vleft->parent_link = vparent;
+      vright->parent_link = vparent;
+      leftchild = vleft;
+      rightchild = vright;
+      prevchild = vparent;
+      if ( leftmostlink == 0)
+	leftmostlink = leftchild;
+
+      Tree_base<C_Data, C_Window> *g = sublayer_tree->clone();
+      
+      T sub_first = sublevel_first;
+      T sub_last = sublevel_last;
+   
+      g->make_tree(sub_first, sub_last);
+      
+      vparent->sublayer= g;
+    }
+    else
+      // only one element ==> one leaf is constructed
+      if(n==1)
+      {
+	sublevel_first = current;
+	link_type vright = new Range_tree_node2( 0, 0,
+	                           (*current), m_interface.get_key(*current) );
+	//CGAL_NIL CGAL_NIL first two arguments
+        CGAL_Tree_assertion( vright != 0); //CGAL_NIL
+	current++;
+	sublevel_last = current;
+	prevchild = vright;
+	rightchild = vright;
+      }
+      else
+      {
+	// recursiv call for the construction. the interval is devided.
+	T sublevel_left, sublevel_right;
+	build_range_tree(n - (int)n/2, leftchild, rightchild, 
+			 prevchild, leftmostlink, current, last, 
+			 sublevel_first, sublevel_left);
+	link_type vparent = new Range_tree_node2( prevchild, 0,
+                                        rightchild->key );
+	//CGAL_NIL argument
+        CGAL_Tree_assertion( vparent != 0);
+
+	prevchild->parent_link = vparent;
+
+	build_range_tree((int)n/2, leftchild, rightchild, 
+			 prevchild, leftmostlink, current, 
+			 last, sublevel_right, sublevel_last);
+	vparent->right_link = prevchild;
+	prevchild->parent_link = vparent;
+	prevchild = vparent;
+	Tree_base<C_Data, C_Window> *g = sublayer_tree->clone();
+	T sub_first = sublevel_first;
+	T sub_last = sublevel_last;
+	g->make_tree(sub_first, sub_last);
+	vparent->sublayer = g;
+      }
+  }
+
+
+
+  void delete_tree(link_type v)
+  {
+    if (v->left_link != 0)
+    { 
+       delete_tree(left(v));
+       delete_tree(right(v));
+    }
+    delete v;
+  }	    
+		    
+  
+  // the vertex from that the way from root to the left interval bound 
+  // and the right interval bound splits.
+  link_type findSplitNode(Window const &key)
+  {
+    link_type v = root();
+
+    while(v->left_link!=0)
+    {
+//      if(m_interface.comp(m_interface.get_right(key), v->key))
+      if(is_less_equal(m_interface.get_right(key), v->key))
+	v = left(v);
+      else 
+	if(m_interface.comp(v->key, m_interface.get_left(key)))
+	  v = right(v);
+	else
+	  break;
+    }
+
+    return v;
+  }
+
+  template <class T>
+  void report_subtree(link_type v, 
+		      T result)
+  {
+    if(left(v)!=0)
+    {
+      report_subtree(left(v), result);
+      report_subtree(right(v), result);
+    }
+    else
+      (*result++)=v->object;
+  }
+
+  bool is_valid(link_type& v, link_type&  leftmost_child, 
+		link_type& rightmost_child) const
+  {
+    link_type leftmost_child_l, rightmost_child_l,  leftmost_child_r, 
+      rightmost_child_r;
+    if (v->sublayer != 0)
+    {
+      Tree_base<C_Data, C_Window> *T= v->sublayer;
+      if(! T->is_valid())
+	return false;
+    }
+    if(left(v)!=0)
+    {
+      if(!is_valid(left(v), leftmost_child_l, rightmost_child_l))
+	return false;
+      if(!is_valid(right(v), leftmost_child_r, rightmost_child_r))
+	return false;
+      if(m_interface.comp(v->key, rightmost_child_l->key) || 
+	 m_interface.comp(rightmost_child_l->key, v->key))
+	return false;
+      rightmost_child = rightmost_child_r;
+      leftmost_child = leftmost_child_l;
+    }
+    else
+    {
+      rightmost_child = v;
+      leftmost_child = v;      
+    }
+    return true;
+  }
+
+
+
+
+public:
+
+  // construction of a tree
+  Range_tree_d(Range_tree_d const &fact, bool):
+    sublayer_tree(fact.sublayer_tree->clone()), is_built(false), header(0)
+  {}
+
+  // construction of a tree
+  Range_tree_d(Tree_base<C_Data, C_Window> const &fact):
+    sublayer_tree(fact.clone()), is_built(false), header(0) 
+  {}
+
+  // destruction
+  virtual ~Range_tree_d()
+  {
+    link_type v=root();   
+
+    if (v!=0)
+      delete_tree(v);
+    if (header!=0)
+      delete header;
+    if (sublayer_tree!=0)
+      delete sublayer_tree;
+  }
+
+
+ // a prototype of the tree is returned
+  Tree_base<C_Data, C_Window> *clone() const 
+  { 
+    return new Range_tree_d(*this, true); 
+  }
+  
+  bool make_tree(const typename std::list< C_Data>::iterator& beg, 
+		 const typename std::list< C_Data>::iterator& end,
+		 typename tbt::lit * =0){ 
+    return make_tree_impl(beg,end);
+  }
+
+#ifdef stlvector
+  bool make_tree(const typename std::vector< C_Data>::iterator& beg, 
+		 const typename std::vector< C_Data>::iterator& end,
+		 typename tbt::vbit * =0){ 
+    return make_tree_impl(beg,end);
+  }
+#endif
+#ifdef carray
+  bool make_tree(const C_Data *beg, 
+		 const C_Data *end){
+    return make_tree_impl(beg,end);
+  }
+#endif
+
+  // the tree is build according to the input elements in [first,last)
+  template<class T>
+  inline  
+  bool make_tree_impl(T first, 
+		      T last) // af: was &   todo: can we turn it in const& ??  
+  {
+    link_type leftchild, rightchild, prevchild, leftmostlink;
+
+    if(!is_built)
+      is_built = true;
+    else
+      return false;
+    
+    if(first == last) {
+      is_built = false;
+      return true;
+    }
+
+    int n = static_cast<int>(std::distance(first,last));
+    dynamic_merge(first, last);
+    
+    leftmostlink = 0;
+    T sublevel_first, sublevel_last;
+    
+    build_range_tree(n, leftchild, rightchild, prevchild, 
+		     leftmostlink, first, last, 
+		     sublevel_first, sublevel_last);
+    
+    header = new Range_tree_node2();
+    header->right_link = rightchild;
+    header->parent_link = prevchild;
+    header->left_link = leftmostlink;
+
+    return true;
+  }
+
+
+  std::back_insert_iterator< std::list< C_Data> > window_query
+          ( C_Window const &win, 
+	    std::back_insert_iterator< std::list< C_Data> > out,
+	    typename tbt::lbit * =0){
+    return window_query_impl(win,out);
+  }
+
+
+  std::back_insert_iterator< std::vector< C_Data> > window_query
+          ( C_Window const &win, 
+	    std::back_insert_iterator< std::vector< C_Data> > out,
+	    typename tbt::vbit * =0){
+    return window_query_impl(win,out);
+  }
+
+
+#ifdef carray
+  C_Data *window_query( C_Window const &win, C_Data *out){
+    return window_query_impl(win,out);
+  }
+#endif
+
+#ifdef ostreamiterator
+  std::ostream_iterator< C_Data>  window_query( C_Window const &win, 
+		     std::ostream_iterator< C_Data> out,
+		     typename tbt::oit *dummy=0){
+    return window_query_impl(win,out);
+  }
+#endif
+
+  // all elements that ly in win are inserted in result
+  template <class X>
+  inline  
+  X window_query_impl( C_Window const &win, X result)
+  {
+    if(is_less_equal(m_interface.get_right(win), m_interface.get_left(win)))
+       return result;
+    if(root()==0)
+      return result;
+    link_type split_node = findSplitNode(win);
+    if(left(split_node)==0)
+    {
+      if(is_inside(win,split_node->object))
+	(*result++)=split_node->object;
+    }	  
+    else
+    {
+      link_type v = (link_type) split_node->left_link;
+
+      while(left(v)!=0)
+      {
+	if(is_less_equal(m_interface.get_left(win),v->key))
+	{
+	  link_type w = right(v);
+	  if(left(w)!=0)
+	  {
+	    Tree_base<C_Data, C_Window> *T= (w)->sublayer;
+	    if(T->is_anchor())
+	      report_subtree(w,result);
+	    else
+	      T->window_query(win, result);
+	  }
+	  else
+	    if(is_inside(win,w->object))
+	      (*result++)=(w)->object;
+	  v = left(v);
+	}
+	else
+	  v = right(v);
+      }                 // end while
+      if(is_inside(win,v->object))
+	(*result++)=v->object;
+      v = right(split_node);
+      while(right(v)!=0)
+      {
+//	if(is_less_equal(v->key, m_interface.get_right(win))) closed interval
+	if(m_interface.comp(v->key, m_interface.get_right(win))) 
+	  //half open interval
+	{
+	  if(left(left(v))!=0)
+	  {
+	    Tree_base<C_Data, C_Window> *T= (left(v))->sublayer;
+	    if(T->is_anchor())
+	      report_subtree(left(v),result);
+	    else
+	      T->window_query(win, result);
+	  }
+	  else
+	  {
+	    if(is_inside(win,left(v)->object))
+	      (*result++)=left(v)->object; 
+	  }
+	  v = right(v);
+	}
+	else
+	  v = left(v);
+      }//end while
+      if(is_inside(win,v->object))
+      {
+	(*result++)=v->object; 
+      }
+    }
+    return result;
+  }
+
+  std::back_insert_iterator< std::list< C_Data> > enclosing_query( C_Window const &win, 
+			     std::back_insert_iterator< std::list< C_Data> > out,
+			     typename tbt::lbit * =0){
+    return enclosing_query_impl(win,out);
+  }
+
+  std::back_insert_iterator< std::vector< C_Data> > enclosing_query( C_Window const &win, 
+			     std::back_insert_iterator< std::vector< C_Data> > out,
+			     typename tbt::vbit * =0){
+    return enclosing_query_impl(win,out);
+  }
+
+
+#ifdef carray
+  C_Data *enclosing_query( C_Window const &win, C_Data *out){
+    return enclosing_query_impl(win,out);
+  }
+#endif
+
+#ifdef ostreamiterator
+  std::ostream_iterator< C_Data>  enclosing_query( C_Window const &win, 
+			     std::ostream_iterator< C_Data> out,
+			     typename tbt::oit *dummy=0){
+    return enclosing_query_impl(win,out);
+  }
+#endif
+
+  // a window query is performed 
+  template <class T>
+  inline
+  T enclosing_query_impl(C_Window const &win, T result)
+  {
+    return window_query_impl(win, result);
+  }
+
+  bool is_valid() const
+  {
+    link_type u,v,w;
+    u=v=w=root();
+    if(v!=0)
+      return is_valid(u, v, w);
+    return true;
+  }
+};
+
+} //namespace CGAL
+#endif // CGAL_RANGE_TREE_D_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Range_tree_k.h b/3rdparty/CGAL-4.8/include/CGAL/Range_tree_k.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Range_tree_k.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Range_tree_k.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Rational_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Rational_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Rational_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Rational_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Ray_2.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2.h
new file mode 100644
index 0000000..b5bb85f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Ray_2.h
@@ -0,0 +1,275 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_RAY_2_H
+#define CGAL_RAY_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Ray_2 : public R_::Kernel_base::Ray_2
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_2               Point_2;
+  typedef typename R_::Direction_2           Direction_2;
+  typedef typename R_::Vector_2              Vector_2;
+  typedef typename R_::Line_2                Line_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+
+  typedef typename R_::Kernel_base::Ray_2    RRay_2;
+
+  typedef Ray_2                              Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef RRay_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_   R;
+
+  Ray_2() {}
+
+  Ray_2(const RRay_2& r)
+    : RRay_2(r) {}
+
+  Ray_2(const Point_2 &sp, const Point_2 &secondp)
+    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, secondp)) {}
+
+  Ray_2(const Point_2 &sp, const Direction_2 &d)
+    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, d)) {}
+
+  Ray_2(const Point_2 &sp, const Vector_2 &v)
+    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, v)) {}
+
+  Ray_2(const Point_2 &sp, const Line_2 &l)
+    : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, l)) {}
+
+
+  typename cpp11::result_of<typename R_::Construct_source_2( Ray_2)>::type
+  source() const
+  {
+    return R().construct_source_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R_::Construct_second_point_2( Ray_2)>::type
+  second_point() const
+  {
+    return R().construct_second_point_2_object()(*this);
+  }
+
+
+  Point_2
+  point(int i) const
+  {
+    CGAL_kernel_precondition( i >= 0 );
+    
+    typename R::Construct_vector_2 construct_vector;
+    typename R::Construct_scaled_vector_2 construct_scaled_vector;
+    typename R::Construct_translated_point_2 construct_translated_point;
+    if (i == 0) return source();
+    if (i == 1) return second_point();
+    return construct_translated_point(source(),
+				      construct_scaled_vector(construct_vector(source(), 
+									       second_point()),
+							      FT(i)));
+  }
+
+
+  typename cpp11::result_of<typename R_::Construct_source_2( Ray_2 )>::type
+  start() const
+  {
+    return source();
+  }
+
+  bool is_horizontal() const
+  {
+    return R().equal_y_2_object()(source(), second_point());
+  }
+
+  bool is_vertical() const
+  {
+    return R().equal_x_2_object()(source(), second_point());
+  }
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_2_object()(*this);
+  }
+
+  Direction_2
+  direction() const
+  {
+    typename R::Construct_vector_2 construct_vector;
+    typename R::Construct_direction_2 construct_direction;
+    return construct_direction( construct_vector(source(), second_point()) );
+  }
+
+
+  Vector_2
+  to_vector() const
+  {
+    typename R::Construct_vector_2 construct_vector;
+    return construct_vector(source(), second_point());
+  }
+
+  bool
+  has_on(const Point_2 &p) const
+  {
+    typename R::Construct_vector_2  construct_vector;
+    return p == source() ||
+         ( R().collinear_2_object()(source(), p, second_point()) &&
+           Direction_2(construct_vector( source(), p)) == direction() );
+  }
+
+
+
+  bool
+  collinear_has_on(const Point_2 &p) const
+  {
+    return R().collinear_has_on_2_object()(*this, p);
+  }
+
+  Ray_2
+  opposite() const
+  {
+    return Ray_2( source(), - direction() );
+  }
+
+  Line_2
+  supporting_line() const
+  {
+    return R().construct_line_2_object()(source(), second_point());
+  }
+
+  bool
+  operator==(const Ray_2& r) const
+  {
+    return R().equal_2_object()(*this, r);
+  }
+
+  bool
+  operator!=(const Ray_2& r) const
+  {
+    return !(*this == r);
+  }
+
+  Ray_2 
+  transform(const Aff_transformation_2 &t) const
+  {
+    return Ray_2(t.transform(source()), t.transform(second_point()));
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Ray_2<R>& r, const Cartesian_tag&) 
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << r.source() << ' ' << r.second_point();
+    case IO::BINARY :
+        return os << r.source() << r.second_point();
+    default:
+        return os << "RayC2(" << r.source() <<  ", " << r.second_point() << ")";
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Ray_2<R>& r, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << r.source() << ' ' << r.second_point();
+    case IO::BINARY :
+        return os << r.source() << r.second_point();
+    default:
+       return os << "RayH2(" << r.source() <<  ", " << r.second_point() << ")";
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Ray_2<R>& r)
+{
+  return insert(os, r, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Ray_2<R>& r, const Cartesian_tag&) 
+{
+    typename R::Point_2 p, q;
+    is >> p >> q;
+    if (is)
+        r = Ray_2<R>(p, q);
+    return is;
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Ray_2<R>& r, const Homogeneous_tag&) 
+{
+  typename R::Point_2 p, q;
+  is >> p >> q;
+  if (is)
+    r = Ray_2<R>(p, q);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Ray_2<R>& r)
+{
+  return extract(is, r, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif  // CGAL_RAY_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection.h
new file mode 100644
index 0000000..1c4dc28
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection.h
@@ -0,0 +1,82 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman
+
+
+#ifndef CGAL_RAY_2_BBOX_2_INTERSECTION_H
+#define CGAL_RAY_2_BBOX_2_INTERSECTION_H
+
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Ray_2.h>
+#include <CGAL/kernel_assertions.h>
+#include <CGAL/number_utils.h>
+
+namespace CGAL {
+
+class Bbox_2_Ray_2_pair_impl;
+
+class CGAL_EXPORT Bbox_2_Ray_2_pair {
+public:
+    enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT};
+    ~Bbox_2_Ray_2_pair() ;
+    Bbox_2_Ray_2_pair() ;
+    Bbox_2_Ray_2_pair(Bbox_2_Ray_2_pair const &o) ;
+    Bbox_2_Ray_2_pair(Bbox_2 const &box,
+                      double x, double y, double dx, double dy) ;
+    Bbox_2_Ray_2_pair& operator=(Bbox_2_Ray_2_pair const &o) ;
+    Intersection_results intersection_type() const;
+    bool intersection(double &x, double &y) const;
+    bool intersection(double &x1, double &y1, double &x2, double &y2) const;
+protected:
+    Bbox_2_Ray_2_pair_impl *pimpl;
+};
+
+CGAL_EXPORT bool do_intersect_ray_2(
+    const Bbox_2 &box, double x, double y, double dx, double dy);
+
+template <class Ray>
+bool do_intersect_ray_2(
+    const Bbox_2 &box,
+    const Ray &ray)
+{
+    double startx = to_double(ray->start().x());
+    double starty = to_double(ray->start().y());
+    double dx = to_double(ray->direction().to_vector().x());
+    double dy = to_double(ray->direction().to_vector().y());
+    return do_intersect_ray_2(box, startx, starty, dx, dy);
+}
+
+template <class Ray>
+inline bool do_intersect_ray_2(
+    const Ray &ray,
+    const Bbox_2 &box)
+{
+    return do_intersect_ray_2(box, ray);
+}
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Ray_2_Bbox_2_intersection_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection_impl.h
new file mode 100644
index 0000000..3f0943b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Bbox_2_intersection_impl.h
@@ -0,0 +1,208 @@
+// Copyright (c) 2000
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Geert-Jan Giezeman
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/Simple_cartesian.h>
+typedef CGAL::Simple_cartesian<double> Rcart;
+
+
+namespace CGAL {
+
+class Bbox_2_Ray_2_pair_impl
+{
+public:
+    Bbox_2_Ray_2_pair_impl():_known(false) {}
+    Bbox_2_Ray_2_pair_impl(Bbox_2 const &bbox, Rcart::Point_2 const &pt,
+                Rcart::Vector_2 const &dir)
+        :_box(bbox), _known(false), _ref_point(pt), _dir(dir), _min(0.0) {}
+    Ray_2< Rcart > _ray;
+    Bbox_2 _box;
+    bool _known;
+    Bbox_2_Ray_2_pair::Intersection_results _result;
+    Rcart::Point_2 _ref_point;
+    Rcart::Vector_2 _dir;
+    double _min, _max;
+};
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair::~Bbox_2_Ray_2_pair()
+{
+    delete pimpl;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair()
+{
+    pimpl = new Bbox_2_Ray_2_pair_impl;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair(Bbox_2_Ray_2_pair const &o)
+{
+    pimpl = new Bbox_2_Ray_2_pair_impl(*o.pimpl);
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair::Bbox_2_Ray_2_pair(
+    Bbox_2 const &bbox, double x, double y, double dx, double dy)
+{
+    pimpl = new Bbox_2_Ray_2_pair_impl(bbox,
+                    Rcart::Point_2(x,y), Rcart::Vector_2(dx,dy));
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair &
+Bbox_2_Ray_2_pair::operator=(Bbox_2_Ray_2_pair const &o)
+{
+    *pimpl = *o.pimpl;
+    return *this;
+}
+
+CGAL_INLINE_FUNCTION
+Bbox_2_Ray_2_pair::Intersection_results
+Bbox_2_Ray_2_pair::intersection_type() const
+{
+    if (pimpl->_known)
+        return pimpl->_result;
+    pimpl->_known = true;
+    bool to_infinity = true;
+// first on x value
+    if (pimpl->_dir.x() == 0.0) {
+        if (pimpl->_ref_point.x() < pimpl->_box.xmin()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        if (pimpl->_ref_point.x() > pimpl->_box.xmax()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+    } else {
+        double newmin, newmax;
+        if (pimpl->_dir.x() > 0.0) {
+            newmin =(pimpl->_box.xmin()-pimpl->_ref_point.x())/pimpl->_dir.x();
+            newmax =(pimpl->_box.xmax()-pimpl->_ref_point.x())/pimpl->_dir.x();
+        } else {
+            newmin =(pimpl->_box.xmax()-pimpl->_ref_point.x())/pimpl->_dir.x();
+            newmax =(pimpl->_box.xmin()-pimpl->_ref_point.x())/pimpl->_dir.x();
+        }
+        if (newmin > pimpl->_min)
+            pimpl->_min = newmin;
+        if (to_infinity) {
+            pimpl->_max = newmax;
+        } else {
+            if (newmax < pimpl->_max)
+                pimpl->_max = newmax;
+        }
+        if (pimpl->_max < pimpl->_min){
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        to_infinity = false;
+    }
+// now on y value
+    if (pimpl->_dir.y() == 0.0) {
+        if (pimpl->_ref_point.y() < pimpl->_box.ymin()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        if (pimpl->_ref_point.y() > pimpl->_box.ymax()) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+    } else {
+        double newmin, newmax;
+        if (pimpl->_dir.y() > 0.0) {
+            newmin =(pimpl->_box.ymin()-pimpl->_ref_point.y())/pimpl->_dir.y();
+            newmax =(pimpl->_box.ymax()-pimpl->_ref_point.y())/pimpl->_dir.y();
+        } else {
+            newmin =(pimpl->_box.ymax()-pimpl->_ref_point.y())/pimpl->_dir.y();
+            newmax =(pimpl->_box.ymin()-pimpl->_ref_point.y())/pimpl->_dir.y();
+        }
+        if (newmin > pimpl->_min)
+            pimpl->_min = newmin;
+        if (to_infinity) {
+            pimpl->_max = newmax;
+        } else {
+            if (newmax < pimpl->_max)
+                pimpl->_max = newmax;
+        }
+        if (pimpl->_max < pimpl->_min) {
+            pimpl->_result = NO_INTERSECTION;
+            return pimpl->_result;
+        }
+        to_infinity = false;
+    }
+    CGAL_kernel_assertion(!to_infinity);
+    if (pimpl->_max == pimpl->_min) {
+        pimpl->_result = POINT;
+        return pimpl->_result;
+    }
+    pimpl->_result = SEGMENT;
+    return pimpl->_result;
+}
+
+CGAL_INLINE_FUNCTION
+bool Bbox_2_Ray_2_pair::
+intersection(double &x1, double &y1, double &x2, double &y2) const
+{
+    if (!pimpl->_known)
+        intersection_type();
+    if (pimpl->_result != SEGMENT)
+        return false;
+    Rcart::Point_2 p1(pimpl->_ref_point + pimpl->_min*pimpl->_dir);
+    Rcart::Point_2 p2(pimpl->_ref_point + pimpl->_max*pimpl->_dir);
+    x1 = p1.x();
+    y1 = p1.y();
+    x2 = p2.x();
+    y2 = p2.y();
+    return true;
+}
+
+CGAL_INLINE_FUNCTION
+bool Bbox_2_Ray_2_pair::intersection(double &x, double &y) const
+{
+    if (!pimpl->_known)
+        intersection_type();
+    if (pimpl->_result != POINT)
+        return false;
+    Rcart::Point_2 pt = pimpl->_ref_point + pimpl->_min*pimpl->_dir;
+    x = pt.x();
+    y = pt.y();
+    return true;
+}
+
+CGAL_INLINE_FUNCTION
+bool do_intersect_ray_2(
+    const Bbox_2 &box, double x, double y, double dx, double dy)
+{
+    Bbox_2_Ray_2_pair pair(box, x, y, dx, dy);
+    return pair.intersection_type() != Bbox_2_Ray_2_pair::NO_INTERSECTION;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Ray_2_Triangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_2_Triangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Ray_2_Triangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Ray_2_Triangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Ray_3.h b/3rdparty/CGAL-4.8/include/CGAL/Ray_3.h
new file mode 100644
index 0000000..d63d3ec
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Ray_3.h
@@ -0,0 +1,244 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_RAY_3_H
+#define CGAL_RAY_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Ray_3 : public R_::Kernel_base::Ray_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Direction_3           Direction_3;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Line_3                Line_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Ray_3                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Ray_3    Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Ray_3() {}
+
+  Ray_3(const Rep& r)
+    : Rep(r) {}
+
+  Ray_3(const Point_3& sp, const Point_3& secondp)
+    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, secondp)) {}
+
+  Ray_3(const Point_3& sp, const Vector_3& v)
+    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, v)) {}
+
+  Ray_3(const Point_3& sp, const Direction_3& d)
+    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, d)) {}
+
+  Ray_3(const Point_3& sp, const Line_3& l)
+    : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, l)) {}
+
+  Ray_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Ray_3(t.transform(this->source()),
+                 t.transform(this->second_point()));
+    // NB : Homogeneous used direction() instead of second_point().
+  }
+
+/*
+  const Point_3 &   start() const;
+  const Point_3 &   source() const
+  {
+      return get_pointee_or_identity(base).e0;
+  }
+
+  Direction_3 direction() const;
+  Vector_3    to_vector() const;
+  Line_3      supporting_line() const;
+  Ray_3       opposite() const;
+
+  bool        is_degenerate() const;
+  bool        collinear_has_on(const Point_3 &p) const;
+*/
+
+  typename cpp11::result_of<typename R::Construct_point_on_3(Ray_3, int)>::type
+  point(int i) const // TODO : use Qrt
+  {
+    return R().construct_point_on_3_object()(*this, i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_source_3(Ray_3)>::type
+  source() const
+  {
+    return R().construct_source_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_second_point_3(Ray_3)>::type
+  second_point() const
+  {
+    return R().construct_second_point_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_source_3(Ray_3)>::type
+  start() const
+  {
+    return source();
+  }
+
+  bool has_on(const Point_3 &p) const
+  {
+    return R().has_on_3_object()(*this, p);
+  }
+
+  Direction_3
+  direction() const
+  {
+    typename R::Construct_vector_3 construct_vector;
+    typename R::Construct_direction_3 construct_direction;
+    return construct_direction( construct_vector(source(), second_point()) );
+  }
+
+  Ray_3
+  opposite() const
+  {
+    return Ray_3( source(), - direction() );
+  }
+
+  Vector_3
+  to_vector() const
+  {
+    typename R::Construct_vector_3 construct_vector;
+    return construct_vector(source(), second_point());
+  }
+
+  Line_3
+  supporting_line() const
+  {
+    return R().construct_line_3_object()(source(), second_point());
+  }
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Ray_3<R>& r, const Cartesian_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << r.start() << ' ' << r.direction();
+    case IO::BINARY :
+        return os<< r.start() << r.direction();
+    default:
+        return os << "RayC3(" << r.start() <<  ", " << r.direction() << ")";
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Ray_3<R>& r, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+      case IO::ASCII :
+          return os << r.start() << ' ' << r.direction();
+      case IO::BINARY :
+          return os<< r.start() << r.direction();
+      default:
+          return os << "RayH3(" << r.start() <<  ", " << r.direction() << ")";
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Ray_3<R>& r)
+{
+  return insert(os, r, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Ray_3<R>& r, const Cartesian_tag&)
+{
+    typename R::Point_3 p;
+    typename R::Direction_3 d;
+
+    is >> p >> d;
+
+    if (is)
+        r = Ray_3<R>(p, d);
+    return is;
+}
+
+template <class R >
+std::istream&
+extract(std::istream& is, Ray_3<R>& r, const Homogeneous_tag&)
+{
+  typename R::Point_3 p;
+  typename R::Direction_3 d;
+  is >> p >> d;
+  if (is)
+    r = Ray_3<R>(p, d);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Ray_3<R>& r)
+{
+  return extract(is, r, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_RAY_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Real_embeddable_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Real_embeddable_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Real_embeddable_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Real_embeddable_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Real_timer.h b/3rdparty/CGAL-4.8/include/CGAL/Real_timer.h
new file mode 100644
index 0000000..c75ac96
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Real_timer.h
@@ -0,0 +1,133 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifndef CGAL_REAL_TIMER_H
+#define CGAL_REAL_TIMER_H 1
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+// For the numerical limits
+#include <cfloat>
+
+namespace CGAL {
+
+// SECTION: A Timer Measuring Real-Time
+// ========================================================================
+// 
+// DEFINITION
+// 
+// A timer `t' of type Real_timer is an object with a state. It is either
+// running or it is stopped. The state is controlled with `t.start()'
+// and `t.stop()'. The timer counts the time elapsed since its creation
+// or last reset. It counts only the time where it is in the running
+// state. The time information is given in seconds.
+
+class CGAL_EXPORT Real_timer {
+private:
+    double      elapsed;
+    double      started;
+    int         interv;
+    bool        running;
+
+#ifdef CGAL_HEADER_ONLY
+    static bool& get_static_realtimer_m_failed()
+    {
+      static bool m_failed = false;
+      return m_failed;
+    }
+#else // CGAL_HEADER_ONLY
+    static bool m_failed;
+    static bool& get_static_realtimer_m_failed()
+    { return Real_timer::m_failed; }
+#endif // CGAL_HEADER_ONLY
+
+    double   get_real_time()     const; // in seconds
+    double   compute_precision() const; // in seconds
+public:
+    Real_timer() : elapsed(0.0), started(0.0), interv(0), running(false) {}
+
+    void     start();
+    void     stop ();
+    void     reset();
+    bool     is_running() const { return running; }
+
+    double   time()       const;
+    int      intervals()  const { return interv; }
+    double   precision()  const;
+    // Returns timer precison. Computes it dynamically at first call.
+    // Returns -1.0 if timer system call fails, which, for a proper coded
+    // test towards precision leads to an immediate stop of an otherwise 
+    // infinite loop (fixed tolerance * total time >= precision).
+    double   max BOOST_PREVENT_MACRO_SUBSTITUTION ()        const { return DBL_MAX; }
+};
+
+
+// -----------------------------------------------------------------------
+
+// Member functions for Real_timer
+// ===========================
+
+inline void Real_timer::start() {
+    CGAL_precondition( ! running);
+    started = get_real_time();
+    running = true;
+    ++ interv;
+}
+
+inline void Real_timer::stop() {
+    CGAL_precondition( running);
+    double t = get_real_time();
+    elapsed += (t - started);
+    started = 0.0;
+    running = false;
+}
+
+inline void Real_timer::reset() {
+    interv  = 0;
+    elapsed = 0.0;
+    if (running) {
+	started = get_real_time();
+	++ interv;
+    } else {
+        started = 0.0;
+    }
+}
+
+inline double Real_timer::time() const {
+    if (running) {
+        double t = get_real_time();
+	return elapsed + (t - started);
+    }
+    return elapsed;
+}
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Real_timer_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_REAL_TIMER_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Real_timer_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Real_timer_impl.h
new file mode 100644
index 0000000..d986d30
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Real_timer_impl.h
@@ -0,0 +1,112 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#if defined (_MSC_VER)
+#  include <sys/timeb.h>
+#  include <sys/types.h>
+
+#elif defined (__MINGW32__)
+#  include <sys/timeb.h>
+#  include <sys/types.h>
+
+#else
+// If none of the above PC compilers, use POSIX fct. gettimeofday()
+#  include <sys/time.h>
+#endif
+
+namespace CGAL {
+
+// Member functions for Real_timer
+// =====================================
+
+CGAL_INLINE_FUNCTION
+double Real_timer::get_real_time() const {
+    // Depends on the operating system.
+    // Returns a (weakly ;-) monotone increasing time in seconds (with
+    // possible wrap-around in case of overflow, see max()), or 0.0
+    // if the system call for the time failed. If the system call
+    // failed the static flag 'm_failed' is set and can be used
+    // by the caller.
+#if   defined(_MSC_VER)
+    struct _timeb  t;
+    _ftime(&t);
+    return double(t.time) + double(t.millitm) / 1000.0;
+#elif defined (__MINGW32__)
+    struct timeb t;
+    ftime(&t);
+    return double(t.time) + double(t.millitm) / 1000.0;
+#else // ! _MSC_VER && ! __MINGW32__//
+    struct timeval t;
+    int ret = gettimeofday( &t, NULL);
+    CGAL_warning_msg( ret == 0, "Call to gettimeofday() in class "
+                      "CGAL::Real_timer failed - timings will be 0.");
+    if ( ret == 0) {
+        return double(t.tv_sec) + double(t.tv_usec) / 1000000;
+    }
+    get_static_realtimer_m_failed() = true;
+    return 0.0;
+#endif // ! _MSC_VER && ! __MINGW32__//
+}
+
+CGAL_INLINE_FUNCTION
+double Real_timer::compute_precision() const {
+    // Computes timer precision in seconds dynamically. Note that
+    // the timer system call is probably non-trivial and will show
+    // up in this time here (probably for one call). But that is just
+    // fine that the call to the timer itself if reported as noise
+    // in the precision.
+    double min_res = DBL_MAX;
+    for ( int i = 0; i < 5; ++i) {
+        double current = get_real_time();
+        if ( get_static_realtimer_m_failed() )
+            return -1.0;
+        double next    = get_real_time();
+        while ( current >= next) { // wait until timer increases
+            next = get_real_time();
+            if ( get_static_realtimer_m_failed() )
+                return -1.0;
+        }
+        // Get the minimum timing difference of all runs.
+        if ( min_res > next - current)
+            min_res = next - current;
+    }
+    return min_res;
+}
+
+CGAL_INLINE_FUNCTION
+double Real_timer::precision() const {
+    // computes precision upon first call
+    // returns -1.0 if timer system call fails.
+    static double prec = compute_precision();
+    return prec;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Reconstruction_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Reconstruction_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Reconstruction_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Reconstruction_triangulation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Rectangular_p_center_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Rectangular_p_center_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Rectangular_p_center_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Rectangular_p_center_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Referenced_argument.h b/3rdparty/CGAL-4.8/include/CGAL/Referenced_argument.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Referenced_argument.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Referenced_argument.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_complex_d.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_complex_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_complex_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_complex_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_grid_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_grid_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_grid_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_grid_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_3.h
new file mode 100644
index 0000000..6060008
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_3.h
@@ -0,0 +1,2326 @@
+// Copyright (c) 1999-2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion
+//                 Christophe Delage <Christophe.Delage at sophia.inria.fr>
+//                 Clement Jamin
+
+#ifndef CGAL_REGULAR_TRIANGULATION_3_H
+#define CGAL_REGULAR_TRIANGULATION_3_H
+
+#include <CGAL/basic.h>
+
+#include <set>
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <CGAL/point_generators_3.h>
+# include <tbb/parallel_for.h>
+# include <tbb/enumerable_thread_specific.h>
+# include <tbb/concurrent_vector.h>
+#endif
+
+#include <CGAL/Triangulation_3.h>
+#include <CGAL/Regular_triangulation_cell_base_3.h>
+#include <boost/bind.hpp>
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+#include <CGAL/Spatial_sort_traits_adapter_3.h>
+#include <CGAL/internal/info_check.h>
+
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/mpl/and.hpp>
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+# include <CGAL/Mesh_3/Profiling_tools.h>
+#endif
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+#include <CGAL/point_generators_3.h>
+#endif
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4355) // complaint about using 'this' to
+#endif                          // initialize a member
+
+namespace CGAL {
+
+  /************************************************
+   *
+   * Regular_triangulation_3 class
+   *
+   ************************************************/
+
+  template < class Gt, class Tds_ = Default, class Lock_data_structure_ = Default >
+  class Regular_triangulation_3
+  : public Triangulation_3<
+      Gt,
+      typename Default::Get<Tds_, Triangulation_data_structure_3 <
+        Triangulation_vertex_base_3<Gt>,
+        Regular_triangulation_cell_base_3<Gt> > >::type,
+      Lock_data_structure_>
+  {
+    typedef Regular_triangulation_3<Gt, Tds_, Lock_data_structure_> Self;
+
+    typedef typename Default::Get<Tds_, Triangulation_data_structure_3 <
+      Triangulation_vertex_base_3<Gt>,
+      Regular_triangulation_cell_base_3<Gt> > >::type Tds;
+
+    typedef Triangulation_3<Gt,Tds,Lock_data_structure_> Tr_Base;
+
+  public:
+
+    typedef Tds                                   Triangulation_data_structure;
+    typedef Gt                                    Geom_traits;
+
+    typedef typename Tr_Base::Concurrency_tag     Concurrency_tag;
+    typedef typename Tr_Base::Lock_data_structure Lock_data_structure;
+
+    typedef typename Tr_Base::Vertex_handle       Vertex_handle;
+    typedef typename Tr_Base::Cell_handle         Cell_handle;
+    typedef typename Tr_Base::Vertex              Vertex;
+    typedef typename Tr_Base::Cell                Cell;
+    typedef typename Tr_Base::Facet               Facet;
+    typedef typename Tr_Base::Edge                Edge;
+
+    typedef typename Tr_Base::size_type           size_type;
+    typedef typename Tr_Base::Locate_type         Locate_type;
+    typedef typename Tr_Base::Cell_iterator       Cell_iterator;
+    typedef typename Tr_Base::Facet_iterator      Facet_iterator;
+    typedef typename Tr_Base::Edge_iterator       Edge_iterator;
+    typedef typename Tr_Base::Facet_circulator    Facet_circulator;
+
+    typedef typename Tr_Base::Finite_vertices_iterator Finite_vertices_iterator;
+    typedef typename Tr_Base::Finite_cells_iterator    Finite_cells_iterator;
+    typedef typename Tr_Base::Finite_facets_iterator   Finite_facets_iterator;
+    typedef typename Tr_Base::Finite_edges_iterator    Finite_edges_iterator;
+    typedef typename Tr_Base::All_cells_iterator       All_cells_iterator;
+
+    typedef typename Gt::Weighted_point_3            Weighted_point;
+    typedef typename Gt::Bare_point                  Bare_point;
+    typedef typename Gt::Segment_3                   Segment;
+    typedef typename Gt::Triangle_3                  Triangle;
+    typedef typename Gt::Tetrahedron_3               Tetrahedron;
+
+    // types for dual:
+    typedef typename Gt::Line_3        Line;
+    typedef typename Gt::Ray_3         Ray;
+    typedef typename Gt::Plane_3       Plane;
+    typedef typename Gt::Object_3      Object;
+
+    //Tag to distinguish Delaunay from Regular triangulations
+    typedef Tag_true   Weighted_tag;
+
+    using Tr_Base::cw;
+    using Tr_Base::ccw;
+#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2
+    using Tr_Base::geom_traits;
+#endif
+    using Tr_Base::number_of_vertices;
+    using Tr_Base::dimension;
+    using Tr_Base::finite_facets_begin;
+    using Tr_Base::finite_facets_end;
+    using Tr_Base::finite_vertices_begin;
+    using Tr_Base::finite_vertices_end;
+    using Tr_Base::finite_cells_begin;
+    using Tr_Base::finite_cells_end;
+    using Tr_Base::finite_edges_begin;
+    using Tr_Base::finite_edges_end;
+    using Tr_Base::tds;
+    using Tr_Base::infinite_vertex;
+    using Tr_Base::next_around_edge;
+    using Tr_Base::vertex_triple_index;
+    using Tr_Base::mirror_vertex;
+    using Tr_Base::mirror_index;
+    using Tr_Base::orientation;
+    using Tr_Base::coplanar_orientation;
+    using Tr_Base::adjacent_vertices;
+    using Tr_Base::construct_segment;
+    using Tr_Base::incident_facets;
+    using Tr_Base::insert_in_conflict;
+    using Tr_Base::is_infinite;
+    using Tr_Base::is_valid_finite;
+    using Tr_Base::locate;
+    using Tr_Base::side_of_segment;
+    using Tr_Base::side_of_edge;
+    using Tr_Base::find_conflicts;
+    using Tr_Base::is_valid;
+
+    Regular_triangulation_3(const Gt & gt = Gt(), Lock_data_structure *lock_ds = NULL)
+      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
+    {}
+
+    Regular_triangulation_3(Lock_data_structure *lock_ds, const Gt & gt = Gt())
+      : Tr_Base(lock_ds, gt), hidden_point_visitor(this)
+    {}
+
+    Regular_triangulation_3(const Regular_triangulation_3 & rt)
+      : Tr_Base(rt), hidden_point_visitor(this)
+    {
+      CGAL_triangulation_postcondition( is_valid() );
+    }
+
+    //insertion
+    template < typename InputIterator >
+    Regular_triangulation_3(InputIterator first, InputIterator last,
+      const Gt & gt = Gt(), Lock_data_structure *lock_ds = NULL)
+      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
+    {
+      insert(first, last);
+    }
+
+    template < typename InputIterator >
+    Regular_triangulation_3(InputIterator first, InputIterator last,
+      Lock_data_structure *lock_ds, const Gt & gt = Gt())
+      : Tr_Base(gt, lock_ds), hidden_point_visitor(this)
+    {
+      insert(first, last);
+    }
+
+  private:
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+    std::vector<Vertex_handle> 
+    add_temporary_points_on_far_sphere(const size_t num_points)
+    {
+      std::vector<Vertex_handle> far_sphere_vertices;
+
+      const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000;
+      if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS)
+      {
+        // Add temporary vertices on a "far sphere" to reduce contention on
+        // the infinite vertex
+
+        // Get bbox
+        const Bbox_3 &bbox = *this->get_bbox();
+        // Compute radius for far sphere
+        const double& xdelta = bbox.xmax() - bbox.xmin();
+        const double& ydelta = bbox.ymax() - bbox.ymin();
+        const double& zdelta = bbox.zmax() - bbox.zmin();
+        const double radius = 1.3 * 0.5 * std::sqrt(xdelta*xdelta +
+          ydelta*ydelta +
+          zdelta*zdelta);
+
+        // WARNING - TODO: this code has to be fixed because Vector_3 is not 
+        // required by the traits concept
+        const typename Gt::Vector_3 center(
+          bbox.xmin() + 0.5*xdelta,
+          bbox.ymin() + 0.5*ydelta,
+          bbox.zmin() + 0.5*zdelta);
+        Random_points_on_sphere_3<Point> random_point(radius);
+        const int NUM_PSEUDO_INFINITE_VERTICES = static_cast<int>(
+          tbb::task_scheduler_init::default_num_threads() * 3.5);
+        std::vector<Point> points_on_far_sphere;
+        for (int i = 0 ; i < NUM_PSEUDO_INFINITE_VERTICES ; ++i, ++random_point)
+          points_on_far_sphere.push_back(*random_point + center);
+
+        spatial_sort(points_on_far_sphere.begin(),
+          points_on_far_sphere.end(),
+          geom_traits());
+
+        std::vector<Point>::const_iterator it_p = points_on_far_sphere.begin();
+        std::vector<Point>::const_iterator it_p_end = points_on_far_sphere.end();
+        for (; it_p != it_p_end ; ++it_p)
+        {
+          Locate_type lt;
+          Cell_handle c;
+          int li, lj;
+
+          c = locate(*it_p, lt, li, lj, hint);
+          Vertex_handle v = insert(*it_p, lt, c, li, lj);
+          hint = (v == Vertex_handle() ? c : v->cell());
+
+          far_sphere_vertices.push_back(v);
+        }
+      }
+
+      return far_sphere_vertices;
+    }
+
+    void remove_temporary_points_on_far_sphere(
+      const std::vector<Vertex_handle> & far_sphere_vertices)
+    {
+      if (!far_sphere_vertices.empty())
+      {
+        // Remove the temporary vertices on far sphere
+        remove(far_sphere_vertices.begin(), far_sphere_vertices.end());
+      }
+    }
+#endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+
+  public:
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+    template < class InputIterator >
+    std::ptrdiff_t
+      insert( InputIterator first, InputIterator last,
+      typename boost::enable_if<
+      boost::is_convertible<
+      typename std::iterator_traits<InputIterator>::value_type,
+      Weighted_point
+      >
+      >::type* = NULL
+      )
+#else
+    template < class InputIterator >
+    std::ptrdiff_t
+      insert( InputIterator first, InputIterator last)
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+    {
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Regular_tri_3::insert]");
+#endif
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+      WallClockTimer t;
+#endif
+
+      size_type n = number_of_vertices();
+      std::vector<Weighted_point> points(first, last);
+      spatial_sort (points.begin(), points.end(), geom_traits());
+
+    // Parallel
+#ifdef CGAL_LINKED_WITH_TBB
+      if (this->is_parallel())
+      {
+        size_t num_points = points.size();
+        Cell_handle hint;
+        
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+        std::vector<Vertex_handle> far_sphere_vertices = 
+          add_temporary_points_on_far_sphere(num_points);
+#endif
+      
+        size_t i = 0;
+        // Insert "num_points_seq" points sequentially
+        // (or more if dim < 3 after that)
+        size_t num_points_seq = (std::min)(num_points, (size_t)100);
+        while (dimension() < 3 || i < num_points_seq)
+        {
+          Locate_type lt;
+          Cell_handle c;
+          int li, lj;
+
+          c = locate (points[i], lt, li, lj, hint);
+          Vertex_handle v = insert (points[i], lt, c, li, lj);
+
+          hint = (v == Vertex_handle() ? c : v->cell());
+          ++i;
+        }
+
+        tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint->vertex(0));
+        tbb::parallel_for(
+          tbb::blocked_range<size_t>( i, num_points ),
+          Insert_point<Self>(*this, points, tls_hint)
+        );
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+        remove_temporary_points_on_far_sphere(far_sphere_vertices);
+#endif
+      }
+      // Sequential
+      else
+#endif // CGAL_LINKED_WITH_TBB
+      {
+        Cell_handle hint;
+        for (typename std::vector<Weighted_point>::const_iterator p = points.begin(),
+          end = points.end(); p != end; ++p)
+        {
+          Locate_type lt;
+          Cell_handle c;
+          int li, lj;
+          c = locate (*p, lt, li, lj, hint);
+
+          Vertex_handle v = insert (*p, lt, c, li, lj);
+
+          hint = v == Vertex_handle() ? c : v->cell();
+        }
+      }
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+      std::cerr << "Points inserted in " << t.elapsed() << " seconds." << std::endl;
+#endif
+      return number_of_vertices() - n;
+    }
+
+
+#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+  private:
+    //top stands for tuple-or-pair
+    template <class Info>
+    const Weighted_point& top_get_first(const std::pair<Weighted_point,Info>& pair) const { return pair.first; }
+    template <class Info>
+    const Info& top_get_second(const std::pair<Weighted_point,Info>& pair) const { return pair.second; }
+    template <class Info>
+    const Weighted_point& top_get_first(const boost::tuple<Weighted_point,Info>& tuple) const { return boost::get<0>(tuple); }
+    template <class Info>
+    const Info& top_get_second(const boost::tuple<Weighted_point,Info>& tuple) const { return boost::get<1>(tuple); }
+
+    template <class Tuple_or_pair,class InputIterator>
+    std::ptrdiff_t insert_with_info(InputIterator first,InputIterator last)
+    {
+      size_type n = number_of_vertices();
+      std::vector<std::ptrdiff_t> indices;
+      std::vector<Weighted_point> points;
+      std::vector<typename Triangulation_data_structure::Vertex::Info> infos;
+      std::ptrdiff_t index=0;
+      for (InputIterator it=first;it!=last;++it){
+        Tuple_or_pair pair = *it;
+        points.push_back( top_get_first(pair) );
+        infos.push_back ( top_get_second(pair) );
+        indices.push_back(index++);
+      }
+
+      typedef Spatial_sort_traits_adapter_3<Geom_traits,Weighted_point*> Search_traits;
+
+      spatial_sort( indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits()) );
+#ifdef CGAL_LINKED_WITH_TBB
+      if (this->is_parallel())
+      {
+        size_t num_points = points.size();
+        Cell_handle hint;
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+        std::vector<Vertex_handle> far_sphere_vertices =
+          add_temporary_points_on_far_sphere(num_points);
+#endif
+
+        size_t i = 0;
+        // Insert "num_points_seq" points sequentially
+        // (or more if dim < 3 after that)
+        size_t num_points_seq = (std::min)(num_points, (size_t)100);
+        while (dimension() < 3 || i < num_points_seq)
+        {
+          Locate_type lt;
+          Cell_handle c;
+          int li, lj;
+          c = locate(points[indices[i]], lt, li, lj, hint);
+
+          Vertex_handle v = insert(points[indices[i]], lt, c, li, lj);
+          if (v != Vertex_handle()){
+            v->info() = infos[indices[i]];
+            hint = v->cell();
+          }
+          else
+            hint = c;
+
+          ++i;
+        }
+
+        tbb::enumerable_thread_specific<Vertex_handle> tls_hint(hint->vertex(0));
+        tbb::parallel_for(
+          tbb::blocked_range<size_t>(i, num_points),
+          Insert_point_with_info<Self>(*this, points, infos, indices, tls_hint)
+          );
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE
+        remove_temporary_points_on_far_sphere(far_sphere_vertices);
+#endif
+      }
+      // Sequential
+      else
+#endif // CGAL_LINKED_WITH_TBB
+      {
+        Cell_handle hint;
+        for (typename std::vector<std::ptrdiff_t>::const_iterator
+          it = indices.begin(), end = indices.end();
+          it != end; ++it)
+        {
+          Locate_type lt;
+          Cell_handle c;
+          int li, lj;
+          c = locate (points[*it], lt, li, lj, hint);
+
+          Vertex_handle v = insert (points[*it], lt, c, li, lj);
+          if (v!=Vertex_handle()){
+            v->info()=infos[*it];
+            hint=v->cell();
+          }
+          else
+            hint=c;
+        }
+      }
+
+      return number_of_vertices() - n;
+    }
+
+  public:
+
+    template < class InputIterator >
+    std::ptrdiff_t
+      insert( InputIterator first,
+      InputIterator last,
+      typename boost::enable_if<
+      boost::is_convertible<
+      typename std::iterator_traits<InputIterator>::value_type,
+      std::pair<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type>
+      >
+      >::type* = NULL
+      )
+    {return insert_with_info< std::pair<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);}
+
+    template <class  InputIterator_1,class InputIterator_2>
+    std::ptrdiff_t
+      insert( boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > first,
+      boost::zip_iterator< boost::tuple<InputIterator_1,InputIterator_2> > last,
+      typename boost::enable_if<
+      boost::mpl::and_<
+      typename boost::is_convertible< typename std::iterator_traits<InputIterator_1>::value_type, Weighted_point >,
+      typename boost::is_convertible< typename std::iterator_traits<InputIterator_2>::value_type, typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type >
+      >
+      >::type* =NULL
+      )
+    {return insert_with_info< boost::tuple<Weighted_point,typename internal::Info_check<typename Triangulation_data_structure::Vertex>::type> >(first,last);}
+#endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
+
+
+    Vertex_handle insert(const Weighted_point & p, Vertex_handle hint,
+                         bool *could_lock_zone = NULL)
+    {
+      return insert(p,
+                    hint == Vertex_handle() ? this->infinite_cell() : hint->cell(),
+                    could_lock_zone);
+    }
+
+    Vertex_handle insert(const Weighted_point & p,
+      Cell_handle start = Cell_handle(), bool *could_lock_zone = NULL);
+
+    Vertex_handle insert(const Weighted_point & p, Locate_type lt,
+      Cell_handle c, int li, int, bool *could_lock_zone = NULL);
+
+    template <class CellIt>
+    Vertex_handle
+      insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
+      Cell_handle begin, int i);
+
+    template <class CellIt>
+    Vertex_handle
+      insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
+      Cell_handle begin, int i, Vertex_handle newv);
+
+    template <class OutputIteratorBoundaryFacets,
+    class OutputIteratorCells,
+    class OutputIteratorInternalFacets>
+      Triple<OutputIteratorBoundaryFacets,
+      OutputIteratorCells,
+      OutputIteratorInternalFacets>
+      find_conflicts(const Weighted_point &p, Cell_handle c,
+      OutputIteratorBoundaryFacets bfit,
+      OutputIteratorCells cit,
+      OutputIteratorInternalFacets ifit
+      , bool *could_lock_zone = NULL
+      , const Facet *this_facet_must_be_in_the_cz = NULL
+      , bool *the_facet_is_in_its_cz = NULL
+      ) const
+    {
+      CGAL_triangulation_precondition(dimension() >= 2);
+
+      std::vector<Cell_handle> cells;
+      cells.reserve(32);
+      std::vector<Facet> facets;
+      facets.reserve(64);
+
+      if (dimension() == 2) {
+        Conflict_tester_2 tester(p, this);
+        if (! tester (c)) return make_triple (bfit, cit, ifit);
+        ifit = Tr_Base::find_conflicts
+          (c, tester,
+          make_triple(std::back_inserter(facets),
+          std::back_inserter(cells),
+          ifit)
+          , could_lock_zone
+          , this_facet_must_be_in_the_cz
+          , the_facet_is_in_its_cz
+          ).third;
+      }
+      else {
+        Conflict_tester_3 tester(p, this);
+        if (! tester (c)) return make_triple (bfit, cit, ifit);
+        ifit = Tr_Base::find_conflicts
+          (c, tester,
+          make_triple(std::back_inserter(facets),
+          std::back_inserter(cells),
+          ifit)
+          , could_lock_zone
+          , this_facet_must_be_in_the_cz
+          , the_facet_is_in_its_cz
+          ).third;
+      }
+
+      // Reset the conflict flag on the boundary.
+      for(typename std::vector<Facet>::iterator fit=facets.begin();
+        fit != facets.end(); ++fit) {
+          fit->first->neighbor(fit->second)->tds_data().clear();
+          *bfit++ = *fit;
+      }
+
+      // Reset the conflict flag in the conflict cells.
+      for(typename std::vector<Cell_handle>::iterator ccit=cells.begin();
+        ccit != cells.end(); ++ccit) {
+          (*ccit)->tds_data().clear();
+          *cit++ = *ccit;
+      }
+      return make_triple(bfit, cit, ifit);
+    }
+
+    template <class OutputIteratorBoundaryFacets, class OutputIteratorCells>
+    std::pair<OutputIteratorBoundaryFacets, OutputIteratorCells>
+      find_conflicts(const Weighted_point &p, Cell_handle c,
+      OutputIteratorBoundaryFacets bfit,
+      OutputIteratorCells cit
+      , bool *could_lock_zone = NULL
+      ) const
+    {
+      Triple<OutputIteratorBoundaryFacets,
+        OutputIteratorCells,
+        Emptyset_iterator> t = find_conflicts(p, c, bfit, cit,
+                                              Emptyset_iterator(),
+                                              could_lock_zone);
+      return std::make_pair(t.first, t.second);
+    }
+
+    // Returns the vertices on the interior of the conflict hole.
+    template <class OutputIterator>
+    OutputIterator
+      vertices_inside_conflict_zone(const Weighted_point&p, Cell_handle c,
+      OutputIterator res) const
+    {
+      CGAL_triangulation_precondition(dimension() >= 2);
+
+      // Get the facets on the boundary of the hole, and the cells of the hole
+      std::vector<Cell_handle> cells;
+      std::vector<Facet> facets;
+      find_conflicts(p, c, std::back_inserter(facets),
+        std::back_inserter(cells), Emptyset_iterator());
+
+      // Put all vertices on the hole in 'vertices'
+      const int d = dimension();
+      std::set<Vertex_handle> vertices;
+      for (typename std::vector<Cell_handle>::const_iterator
+        it = cells.begin(),
+        end = cells.end(); it != end; ++it)
+      {
+        for(int i = 0; i <= d; ++i) {
+          vertices.insert((*it)->vertex(i));
+        }
+      }
+      // Then extract the vertices of the boundary and remove them from
+      // 'vertices'
+      if (dimension() == 3) {
+        for (typename std::vector<Facet>::const_iterator i = facets.begin();
+          i != facets.end(); ++i) {
+            vertices.erase(i->first->vertex((i->second+1)&3));
+            vertices.erase(i->first->vertex((i->second+2)&3));
+            vertices.erase(i->first->vertex((i->second+3)&3));
+        }
+      } else {
+        for (typename std::vector<Facet>::const_iterator i = facets.begin();
+          i != facets.end(); ++i) {
+            vertices.erase(i->first->vertex(cw(i->second)));
+            vertices.erase(i->first->vertex(ccw(i->second)));
+        }
+      }
+
+      return std::copy(vertices.begin(), vertices.end(), res);
+    }
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+    // Returns the vertices on the boundary of the conflict hole.
+    template <class OutputIterator>
+    OutputIterator
+      vertices_in_conflict(const Weighted_point&p, Cell_handle c, OutputIterator res) const
+    {
+      return vertices_on_conflict_zone_boundary(p, c, res);
+    }
+#endif // CGAL_NO_DEPRECATED_CODE
+
+    // Returns the vertices on the boundary of the conflict hole.
+    template <class OutputIterator>
+    OutputIterator
+      vertices_on_conflict_zone_boundary(const Weighted_point&p, Cell_handle c,
+      OutputIterator res) const
+    {
+      CGAL_triangulation_precondition(dimension() >= 2);
+
+      // Get the facets on the boundary of the hole.
+      std::vector<Facet> facets;
+      find_conflicts(p, c, std::back_inserter(facets),
+        Emptyset_iterator(), Emptyset_iterator());
+
+      // Then extract uniquely the vertices.
+      std::set<Vertex_handle> vertices;
+      if (dimension() == 3) {
+        for (typename std::vector<Facet>::const_iterator i = facets.begin();
+          i != facets.end(); ++i) {
+            vertices.insert(i->first->vertex((i->second+1)&3));
+            vertices.insert(i->first->vertex((i->second+2)&3));
+            vertices.insert(i->first->vertex((i->second+3)&3));
+        }
+      } else {
+        for (typename std::vector<Facet>::const_iterator i = facets.begin();
+          i != facets.end(); ++i) {
+            vertices.insert(i->first->vertex(cw(i->second)));
+            vertices.insert(i->first->vertex(ccw(i->second)));
+        }
+      }
+
+      return std::copy(vertices.begin(), vertices.end(), res);
+    }
+
+    void remove (Vertex_handle v);
+    // Concurrency-safe
+    // See Triangulation_3::remove for more information
+    bool remove (Vertex_handle v, bool *could_lock_zone);
+
+    template < typename InputIterator >
+    size_type remove(InputIterator first, InputIterator beyond)
+    {
+      CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond));
+      size_type n = number_of_vertices();
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+      WallClockTimer t;
+#endif
+
+      // Parallel
+#ifdef CGAL_LINKED_WITH_TBB
+      if (this->is_parallel())
+      {
+        // TODO: avoid that by asking for ramdom-access iterators?
+        std::vector<Vertex_handle> vertices(first, beyond);
+        tbb::concurrent_vector<Vertex_handle> vertices_to_remove_sequentially;
+
+        tbb::parallel_for(
+          tbb::blocked_range<size_t>( 0, vertices.size()),
+          Remove_point<Self>(*this, vertices, vertices_to_remove_sequentially)
+        );
+
+        // Do the rest sequentially
+        for ( typename tbb::concurrent_vector<Vertex_handle>::const_iterator
+                it = vertices_to_remove_sequentially.begin(),
+                it_end = vertices_to_remove_sequentially.end()
+            ; it != it_end
+            ; ++it)
+        {
+          remove(*it);
+        }
+      }
+      // Sequential
+      else
+#endif // CGAL_LINKED_WITH_TBB
+      {
+        while (first != beyond) {
+          remove(*first);
+          ++first;
+        }
+      }
+
+#ifdef CGAL_TRIANGULATION_3_PROFILING
+      std::cerr << "Points removed in " << t.elapsed() << " seconds." << std::endl;
+#endif
+      return n - number_of_vertices();
+    }
+
+    
+    template <class OutputItCells>
+    void remove_and_give_new_cells(Vertex_handle v, OutputItCells cit)
+    {
+      Self tmp;
+      Vertex_remover<Self> remover (tmp);
+      Tr_Base::remove_and_give_new_cells(v, remover, cit);
+
+      CGAL_triangulation_expensive_postcondition(is_valid());
+    }
+
+
+    // DISPLACEMENT
+    Vertex_handle move_point(Vertex_handle v, const Weighted_point & p);
+
+    // Displacement works only for Regular triangulation
+    // without hidden points at any time
+    Vertex_handle move_if_no_collision(Vertex_handle v, const Weighted_point & p);
+    Vertex_handle move(Vertex_handle v, const Weighted_point & p);
+
+    // REMOVE CLUSTER - works only when Regular has no hidden point at all
+    // "regular as Delaunay"
+    template < typename InputIterator >
+    size_type remove_cluster(InputIterator first, InputIterator beyond)
+    {
+      Self tmp;
+      Vertex_remover<Self> remover (tmp);
+      return Tr_Base::remove(first, beyond, remover);
+    }
+
+  protected:
+
+    Oriented_side
+      side_of_oriented_power_sphere(const Weighted_point &p0,
+      const Weighted_point &p1,
+      const Weighted_point &p2,
+      const Weighted_point &p3,
+      const Weighted_point &p,
+      bool perturb = false) const;
+
+    Oriented_side
+      side_of_oriented_power_circle(const Weighted_point &p0,
+      const Weighted_point &p1,
+      const Weighted_point &p2,
+      const Weighted_point &p,
+      bool perturb = false) const;
+
+    Bounded_side
+      side_of_bounded_power_circle(const Weighted_point &p0,
+      const Weighted_point &p1,
+      const Weighted_point &p2,
+      const Weighted_point &p,
+      bool perturb = false) const;
+
+    Bounded_side
+      side_of_bounded_power_segment(const Weighted_point &p0,
+      const Weighted_point &p1,
+      const Weighted_point &p,
+      bool perturb = false) const;
+
+
+  public:
+
+    // Queries
+    Bounded_side
+      side_of_power_sphere(Cell_handle c, const Weighted_point &p,
+      bool perturb = false) const;
+
+    Bounded_side
+      side_of_power_circle(const Facet & f, const Weighted_point & p,
+      bool /* perturb */ = false) const
+    {
+      return side_of_power_circle(f.first, f.second, p);
+    }
+
+    Bounded_side
+      side_of_power_circle(Cell_handle c, int i, const Weighted_point &p,
+      bool perturb = false) const;
+
+    Bounded_side
+      side_of_power_segment(Cell_handle c, const Weighted_point &p,
+      bool perturb = false) const;
+
+    Vertex_handle
+      nearest_power_vertex_in_cell(const Bare_point& p,
+      Cell_handle c)  const;
+
+    Vertex_handle
+      nearest_power_vertex(const Bare_point& p, Cell_handle c =
+      Cell_handle()) const;
+
+    bool is_Gabriel(Cell_handle c, int i) const;
+    bool is_Gabriel(Cell_handle c, int i, int j) const;
+    bool is_Gabriel(const Facet& f)const ;
+    bool is_Gabriel(const Edge& e) const;
+    bool is_Gabriel(Vertex_handle v) const;
+
+
+    // Dual functions
+    Bare_point dual(Cell_handle c) const;
+
+    Object dual(const Facet & f) const
+    { return dual( f.first, f.second ); }
+
+    Object dual(Cell_handle c, int i) const;
+
+    template < class Stream>
+    Stream& draw_dual(Stream & os)
+    {
+      for (Finite_facets_iterator fit = finite_facets_begin(),
+        end = finite_facets_end();
+        fit != end; ++fit) {
+          Object o = dual(*fit);
+          if      (const Segment    *s = object_cast<Segment>(&o))    os << *s;
+          else if (const Ray        *r = object_cast<Ray>(&o))        os << *r;
+          else if (const Bare_point *p = object_cast<Bare_point>(&o)) os << *p;
+      }
+      return os;
+    }
+
+    bool is_valid(bool verbose = false, int level = 0) const;
+
+  protected:
+    bool
+      less_power_distance(const Bare_point &p,
+      const Weighted_point &q,
+      const Weighted_point &r)  const
+    {
+      return
+        geom_traits().compare_power_distance_3_object()(p, q, r) == SMALLER;
+    }
+
+    Bare_point
+      construct_weighted_circumcenter(const Weighted_point &p,
+      const Weighted_point &q,
+      const Weighted_point &r,
+      const Weighted_point &s) const
+    {
+      return geom_traits().construct_weighted_circumcenter_3_object()(p,q,r,s);
+    }
+
+    Bare_point
+      construct_weighted_circumcenter(const Weighted_point &p,
+      const Weighted_point &q,
+      const Weighted_point &r) const
+    {
+      return geom_traits().construct_weighted_circumcenter_3_object()(p,q,r);
+    }
+
+    Line
+      construct_perpendicular_line(const Plane &pl, const Bare_point &p) const
+    {
+      return geom_traits().construct_perpendicular_line_3_object()(pl, p);
+    }
+
+    Plane
+      construct_plane(const Bare_point &p, const Bare_point &q, const Bare_point &r) const
+    {
+      return geom_traits().construct_plane_3_object()(p, q, r);
+    }
+
+    Ray
+      construct_ray(const Bare_point &p, const Line &l) const
+    {
+      return geom_traits().construct_ray_3_object()(p, l);
+    }
+
+    Object
+      construct_object(const Bare_point &p) const
+    {
+      return geom_traits().construct_object_3_object()(p);
+    }
+
+    Object
+      construct_object(const Segment &s) const
+    {
+      return geom_traits().construct_object_3_object()(s);
+    }
+
+    Object
+      construct_object(const Ray &r) const
+    {
+      return geom_traits().construct_object_3_object()(r);
+    }
+
+    Vertex_handle
+      nearest_power_vertex(const Bare_point &p,
+      Vertex_handle v,
+      Vertex_handle w) const
+    {
+      // In case of equality, v is returned.
+      CGAL_triangulation_precondition(v != w);
+      if (is_infinite(v))	  return w;
+      if (is_infinite(w))	  return v;
+      return less_power_distance(p, w->point(), v->point()) ? w : v;
+    }
+
+    Oriented_side
+      power_test(const Weighted_point &p, const Weighted_point &q) const
+    {
+      CGAL_triangulation_precondition(this->equal(p, q));
+      return geom_traits().power_test_3_object()(p, q);
+    }
+
+    Oriented_side
+      power_test(const Weighted_point &p, const Weighted_point &q,
+      const Weighted_point &r) const
+    {
+      CGAL_triangulation_precondition(this->collinear(p, q, r));
+      return geom_traits().power_test_3_object()(p, q, r);
+    }
+
+    Oriented_side
+      power_test(const Weighted_point &p, const Weighted_point &q,
+      const Weighted_point &r, const Weighted_point &s) const
+    {
+      CGAL_triangulation_precondition(this->coplanar(p, q, r, s));
+      return geom_traits().power_test_3_object()(p, q, r, s);
+    }
+
+    Oriented_side
+      power_test(const Weighted_point &p, const Weighted_point &q,
+      const Weighted_point &r, const Weighted_point &s,
+      const Weighted_point &t) const
+    {
+      return geom_traits().power_test_3_object()(p, q, r, s, t);
+    }
+
+    bool in_conflict_3(const Weighted_point &p, const Cell_handle c) const
+    {
+      return side_of_power_sphere(c, p, true) == ON_BOUNDED_SIDE;
+    }
+
+    bool in_conflict_2(const Weighted_point &p, const Cell_handle c, int i) const
+    {
+      return side_of_power_circle(c, i, p, true) == ON_BOUNDED_SIDE;
+    }
+
+    bool in_conflict_1(const Weighted_point &p, const Cell_handle c) const
+    {
+      return side_of_power_segment(c, p, true) == ON_BOUNDED_SIDE;
+    }
+
+    bool in_conflict_0(const Weighted_point &p, const Cell_handle c) const
+    {
+      return power_test(c->vertex(0)->point(), p) == ON_POSITIVE_SIDE;
+    }
+
+    bool in_conflict(const Weighted_point &p, const Cell_handle c) const
+    {
+      switch (dimension()) {
+      case 0: return in_conflict_0(p, c);
+      case 1: return in_conflict_1(p, c);
+      case 2: return in_conflict_2(p, c, 3);
+      case 3: return in_conflict_3(p, c);
+      }
+      return true;
+    }
+
+    class Conflict_tester_3
+    {
+      const Weighted_point &p;
+      const Self *t;
+
+    public:
+
+      Conflict_tester_3(const Weighted_point &pt, const Self *tr)
+        : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const {
+        return t->in_conflict_3(p, c);
+      }
+
+      bool test_initial_cell(const Cell_handle c) const {
+        return operator()(c);
+      }
+      Oriented_side compare_weight(const Weighted_point &wp1,
+        const Weighted_point &wp2) const
+      {
+        return t->power_test (wp1, wp2);
+      }
+    };
+
+    class Conflict_tester_2
+    {
+      const Weighted_point &p;
+      const Self *t;
+    public:
+
+      Conflict_tester_2(const Weighted_point &pt, const Self *tr)
+        : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const
+      {
+        return t->in_conflict_2(p, c, 3);
+      }
+      bool test_initial_cell(const Cell_handle c) const {
+        return operator()(c);
+      }
+      Oriented_side compare_weight(const Weighted_point &wp1,
+        const Weighted_point &wp2) const
+      {
+        return t->power_test (wp1, wp2);
+      }
+    };
+
+    class Conflict_tester_1
+    {
+      const Weighted_point &p;
+      const Self *t;
+
+    public:
+
+      Conflict_tester_1(const Weighted_point &pt, const Self *tr)
+        : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const
+      {
+        return t->in_conflict_1(p, c);
+      }
+      bool test_initial_cell(const Cell_handle c) const {
+        return operator()(c);
+      }
+      Oriented_side compare_weight(const Weighted_point &wp1,
+        const Weighted_point &wp2) const
+      {
+        return t->power_test (wp1, wp2);
+      }
+    };
+
+    class Conflict_tester_0
+    {
+      const Weighted_point &p;
+      const Self *t;
+
+    public:
+
+      Conflict_tester_0(const Weighted_point &pt, const Self *tr)
+        : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const
+      {
+        return t->in_conflict_0(p, c);
+      }
+      bool test_initial_cell(const Cell_handle c) const {
+        return operator()(c);
+      }
+      int compare_weight(const Weighted_point &wp1,
+        const Weighted_point &wp2) const
+      {
+        return t->power_test (wp1, wp2);
+      }
+    };
+
+    // Sequential version
+    // "dummy" is here to allow the specialization (see below)
+    // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6
+    template<typename Concurrency_tag_, typename dummy = void>
+    class Hidden_point_visitor
+    {
+      Self *t;
+      mutable std::vector<Vertex_handle> vertices;
+      mutable std::vector<Weighted_point> hidden_points;
+
+    public:
+
+      Hidden_point_visitor(Self *tr) : t(tr) {}
+
+      template <class InputIterator>
+      void process_cells_in_conflict(InputIterator start, InputIterator end) const
+      {
+        int dim = t->dimension();
+        while (start != end) {
+          std::copy((*start)->hidden_points_begin(),
+            (*start)->hidden_points_end(),
+            std::back_inserter(hidden_points));
+
+          for (int i=0; i<=dim; i++) {
+            Vertex_handle v = (*start)->vertex(i);
+            if (v->cell() != Cell_handle()) {
+              vertices.push_back(v);
+              v->set_cell(Cell_handle());
+            }
+          }
+          start ++;
+        }
+      }
+      void reinsert_vertices(Vertex_handle v) {
+        Cell_handle hc = v->cell();
+        for (typename std::vector<Vertex_handle>::iterator
+          vi = vertices.begin(); vi != vertices.end(); ++vi) {
+            if ((*vi)->cell() != Cell_handle()) continue;
+            hc = t->locate ((*vi)->point(), hc);
+            hide_point(hc, (*vi)->point());
+            t->tds().delete_vertex(*vi);
+        }
+        vertices.clear();
+        for (typename std::vector<Weighted_point>::iterator
+          hp = hidden_points.begin(); hp != hidden_points.end(); ++hp) {
+            hc = t->locate (*hp, hc);
+            hide_point (hc, *hp);
+        }
+        hidden_points.clear();
+      }
+      Vertex_handle replace_vertex(Cell_handle c, int index,
+        const Weighted_point &p) {
+          Vertex_handle v = c->vertex(index);
+          hide_point(c, v->point());
+          v->set_point(p);
+          return v;
+      }
+      void hide_point(Cell_handle c, const Weighted_point &p) {
+        c->hide_point(p);
+      }
+    };
+
+#ifdef CGAL_LINKED_WITH_TBB
+    // Parallel version specialization
+    template<typename dummy>
+    class Hidden_point_visitor<Parallel_tag, dummy>
+    {
+      typedef Hidden_point_visitor<Parallel_tag> HPV;
+
+      Self *t;
+      mutable tbb::enumerable_thread_specific<std::vector<Vertex_handle> >  vertices;
+      mutable tbb::enumerable_thread_specific<std::vector<Weighted_point> > hidden_points;
+
+    public:
+
+      Hidden_point_visitor(Self *tr) : t(tr) {}
+
+      template <class InputIterator>
+      void process_cells_in_conflict(InputIterator start, InputIterator end) const
+      {
+        int dim = t->dimension();
+        while (start != end) {
+          std::copy((*start)->hidden_points_begin(),
+            (*start)->hidden_points_end(),
+            std::back_inserter(hidden_points.local()));
+
+          for (int i=0; i<=dim; i++) {
+            Vertex_handle v = (*start)->vertex(i);
+            if (v->cell() != Cell_handle()) {
+              vertices.local().push_back(v);
+              v->set_cell(Cell_handle());
+            }
+          }
+          start ++;
+        }
+      }
+      void reinsert_vertices(Vertex_handle v) {
+        Cell_handle hc = v->cell();
+        for (typename std::vector<Vertex_handle>::iterator
+          vi = vertices.local().begin(); vi != vertices.local().end(); ++vi) {
+            if ((*vi)->cell() != Cell_handle()) continue;
+            hc = t->locate ((*vi)->point(), hc);
+            hide_point(hc, (*vi)->point());
+            t->tds().delete_vertex(*vi);
+        }
+        vertices.local().clear();
+        for (typename std::vector<Weighted_point>::iterator
+          hp = hidden_points.local().begin(); hp != hidden_points.local().end(); ++hp) {
+            hc = t->locate (*hp, hc);
+            hide_point (hc, *hp);
+        }
+        hidden_points.local().clear();
+      }
+      Vertex_handle replace_vertex(Cell_handle c, int index,
+        const Weighted_point &p) {
+          Vertex_handle v = c->vertex(index);
+          hide_point(c, v->point());
+          v->set_point(p);
+          return v;
+      }
+      void hide_point(Cell_handle c, const Weighted_point &p) {
+        c->hide_point(p);
+      }
+    };
+
+  // Functor for parallel insert(begin, end) function
+  template <typename RT>
+  class Insert_point
+  {
+    typedef typename RT::Weighted_point                 Weighted_point;
+    typedef typename RT::Vertex_handle                  Vertex_handle;
+
+    RT                                                  & m_rt;
+    const std::vector<Weighted_point>                   & m_points;
+    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
+
+  public:
+    // Constructor
+    Insert_point(RT & rt,
+                 const std::vector<Weighted_point> & points,
+                 tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
+    : m_rt(rt), m_points(points), m_tls_hint(tls_hint)
+    {}
+
+    // Constructor
+    Insert_point(const Insert_point &ip)
+    : m_rt(ip.m_rt), m_points(ip.m_points), m_tls_hint(ip.m_tls_hint)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]");
+#endif
+
+      Vertex_handle &hint = m_tls_hint.local();
+      for( size_t i_point = r.begin() ; i_point != r.end() ; ++i_point)
+      {
+        bool success = false;
+        const Weighted_point &p = m_points[i_point];
+        while(!success)
+        {
+          if (m_rt.try_lock_vertex(hint) && m_rt.try_lock_point(p))
+          {
+            bool could_lock_zone;
+            Locate_type lt;
+            int li, lj;
+
+            Cell_handle c = m_rt.locate (p, lt, li, lj, hint->cell(), 
+                                         &could_lock_zone);
+            Vertex_handle v;
+            if (could_lock_zone)
+              v = m_rt.insert (p, lt, c, li, lj, &could_lock_zone);
+
+            if (could_lock_zone)
+            {
+              hint = (v == Vertex_handle() ? c->vertex(0) : v);
+              m_rt.unlock_all_elements();
+              success = true;
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              ++bcounter;
+#endif
+            }
+            else
+            {
+              m_rt.unlock_all_elements();
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              bcounter.increment_branch_1(); // THIS is a late withdrawal!
+#endif
+            }
+          }
+          else
+          {
+            m_rt.unlock_all_elements();
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+          }
+        }
+      }
+    }
+  };
+
+  // Functor for parallel insert_with_info(begin, end) function
+  template <typename RT>
+  class Insert_point_with_info
+  {
+    typedef typename RT::Weighted_point                         Weighted_point;
+    typedef typename RT::Vertex_handle                          Vertex_handle;
+    typedef typename RT::Triangulation_data_structure::Vertex::Info Info;
+
+    RT                                                  & m_rt;
+    const std::vector<Weighted_point>                   & m_points;
+    const std::vector<Info>                             & m_infos;
+    const std::vector<std::ptrdiff_t>                   & m_indices;
+    tbb::enumerable_thread_specific<Vertex_handle>      & m_tls_hint;
+
+  public:
+    // Constructor
+    Insert_point_with_info(RT & rt,
+      const std::vector<Weighted_point> & points,
+      const std::vector<Info> & infos,
+      const std::vector<std::ptrdiff_t> & indices,
+      tbb::enumerable_thread_specific<Vertex_handle> & tls_hint)
+    : m_rt(rt), m_points(points), m_infos(infos), m_indices(indices), 
+      m_tls_hint(tls_hint)
+    {}
+
+    // Constructor
+    Insert_point_with_info(const Insert_point_with_info &ip)
+    : m_rt(ip.m_rt), m_points(ip.m_points), m_infos(ip.m_infos), 
+      m_indices(ip.m_indices), m_tls_hint(ip.m_tls_hint)
+    {}
+
+    // operator()
+    void operator()(const tbb::blocked_range<size_t>& r) const
+    {
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+      static Profile_branch_counter_3 bcounter(
+        "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]");
+#endif
+
+      Vertex_handle &hint = m_tls_hint.local();
+      for (size_t i_idx = r.begin() ; i_idx != r.end() ; ++i_idx)
+      {
+        bool success = false;
+        std::ptrdiff_t i_point = m_indices[i_idx];
+        const Weighted_point &p = m_points[i_point];
+        while (!success)
+        {
+          if (m_rt.try_lock_vertex(hint) && m_rt.try_lock_point(p))
+          {
+            bool could_lock_zone;
+            Locate_type lt;
+            int li, lj;
+
+            Cell_handle c = m_rt.locate(p, lt, li, lj, hint->cell(),
+              &could_lock_zone);
+            Vertex_handle v;
+            if (could_lock_zone)
+              v = m_rt.insert(p, lt, c, li, lj, &could_lock_zone);
+
+            if (could_lock_zone)
+            {
+              if (v == Vertex_handle())
+              {
+                hint = c->vertex(0);
+              }
+              else
+              {
+                v->info() = m_infos[i_point];
+                hint = v;
+              }
+
+              m_rt.unlock_all_elements();
+              success = true;
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              ++bcounter;
+#endif
+            }
+            else
+            {
+              m_rt.unlock_all_elements();
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+              bcounter.increment_branch_1(); // THIS is a late withdrawal!
+#endif
+            }
+          }
+          else
+          {
+            m_rt.unlock_all_elements();
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+            bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+          }
+        }
+      }
+    }
+  };
+
+  // Functor for parallel remove(begin, end) function
+  template <typename RT>
+  class Remove_point
+  {
+    typedef typename RT::Weighted_point                 Weighted_point;
+    typedef typename RT::Vertex_handle                  Vertex_handle;
+
+    RT                                    & m_rt;
+    const std::vector<Vertex_handle>      & m_vertices;
+    tbb::concurrent_vector<Vertex_handle> & m_vertices_to_remove_sequentially;
+
+  public:
+    // Constructor
+    Remove_point(RT & rt,
+                 const std::vector<Vertex_handle> & vertices,
+                 tbb::concurrent_vector<Vertex_handle> & 
+                   vertices_to_remove_sequentially)
+    : m_rt(rt), m_vertices(vertices), 
+      m_vertices_to_remove_sequentially(vertices_to_remove_sequentially)
+    {}
+
+    // Constructor
+    Remove_point(const Remove_point &rp)
+    : m_rt(rp.m_rt), m_vertices(rp.m_vertices),
+      m_vertices_to_remove_sequentially(rp.m_vertices_to_remove_sequentially)
+    {}
+
+    // operator()
+    void operator()( const tbb::blocked_range<size_t>& r ) const
+    {
+      for( size_t i_vertex = r.begin() ; i_vertex != r.end() ; ++i_vertex)
+      {
+        Vertex_handle v = m_vertices[i_vertex];
+        bool could_lock_zone, needs_to_be_done_sequentially;
+        do
+        {
+          needs_to_be_done_sequentially =
+            !m_rt.remove(v, &could_lock_zone);
+          m_rt.unlock_all_elements();
+        } while (!could_lock_zone);
+
+        if (needs_to_be_done_sequentially)
+          m_vertices_to_remove_sequentially.push_back(v);
+      }
+    }
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+    Hidden_point_visitor<Concurrency_tag> &get_hidden_point_visitor()
+    {
+      return hidden_point_visitor;
+    }
+
+    template < class RegularTriangulation_3 >
+    class Vertex_remover;
+
+    template < class RegularTriangulation_3 >
+    class Vertex_inserter;
+
+    Hidden_point_visitor<Concurrency_tag> hidden_point_visitor;
+  };
+
+
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    nearest_power_vertex_in_cell(const Bare_point& p,
+    Cell_handle c) const
+    // Returns the finite vertex of the cell c with smaller
+    // power distance  to p.
+  {
+    CGAL_triangulation_precondition(dimension() >= 1);
+    Vertex_handle nearest = nearest_power_vertex(p,
+      c->vertex(0),
+      c->vertex(1));
+    if (dimension() >= 2) {
+      nearest = nearest_power_vertex(p, nearest, c->vertex(2));
+      if (dimension() == 3)
+        nearest = nearest_power_vertex(p, nearest, c->vertex(3));
+    }
+    return nearest;
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    nearest_power_vertex(const Bare_point& p, Cell_handle start) const
+  {
+    if (number_of_vertices() == 0)
+      return Vertex_handle();
+
+    // Use a brute-force algorithm if dimension < 3.
+    if (dimension() < 3) {
+      Finite_vertices_iterator vit = finite_vertices_begin();
+      Vertex_handle res = vit;
+      ++vit;
+      for (Finite_vertices_iterator end = finite_vertices_end(); vit != end; ++vit)
+        res = nearest_power_vertex(p, res, vit);
+      return res;
+    }
+
+    Locate_type lt;
+    int li, lj;
+    // I put the cast here temporarily
+    // until we solve the traits class pb of regular triangulation
+    Cell_handle c = locate(static_cast<Weighted_point>(p), lt, li, lj, start);
+
+    // - start with the closest vertex from the located cell.
+    // - repeatedly take the nearest of its incident vertices if any
+    // - if not, we're done.
+    Vertex_handle nearest = nearest_power_vertex_in_cell(p, c);
+    std::vector<Vertex_handle> vs;
+    vs.reserve(32);
+    while (true) {
+      Vertex_handle tmp = nearest;
+      adjacent_vertices(nearest, std::back_inserter(vs));
+      for (typename std::vector<Vertex_handle>::const_iterator
+        vsit = vs.begin(); vsit != vs.end(); ++vsit)
+        tmp = nearest_power_vertex(p, tmp, *vsit);
+      if (tmp == nearest)
+        break;
+      vs.clear();
+      nearest = tmp;
+    }
+    return nearest;
+  }
+
+template < class Gt, class Tds, class Lds >
+typename Regular_triangulation_3<Gt,Tds,Lds>::Bare_point
+Regular_triangulation_3<Gt,Tds,Lds>::
+dual(Cell_handle c) const
+{
+  CGAL_triangulation_precondition(dimension()==3);
+  CGAL_triangulation_precondition( ! is_infinite(c) );
+
+  return c->weighted_circumcenter(geom_traits());
+}
+
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Object
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    dual(Cell_handle c, int i) const
+  {
+    CGAL_triangulation_precondition(dimension()>=2);
+    CGAL_triangulation_precondition( ! is_infinite(c,i) );
+
+    if ( dimension() == 2 ) {
+      CGAL_triangulation_precondition( i == 3 );
+      return construct_object(
+        construct_weighted_circumcenter(c->vertex(0)->point(),
+        c->vertex(1)->point(),
+        c->vertex(2)->point()) );
+    }
+
+    // dimension() == 3
+    Cell_handle n = c->neighbor(i);
+    if ( ! is_infinite(c) && ! is_infinite(n) )
+      return construct_object(construct_segment( dual(c), dual(n) ));
+
+    // either n or c is infinite
+    int in;
+    if ( is_infinite(c) )
+      in = n->index(c);
+    else {
+      n = c;
+      in = i;
+    }
+    // n now denotes a finite cell, either c or c->neighbor(i)
+    int ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
+    if ( (in&1) == 1 )
+      std::swap(ind[0], ind[1]);
+    const Weighted_point& p = n->vertex(ind[0])->point();
+    const Weighted_point& q = n->vertex(ind[1])->point();
+    const Weighted_point& r = n->vertex(ind[2])->point();
+
+    Line l =
+      construct_perpendicular_line( construct_plane(p,q,r),
+      construct_weighted_circumcenter(p,q,r) );
+    return construct_object(construct_ray( dual(n), l));
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  Oriented_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_oriented_power_sphere(const Weighted_point &p0,
+    const Weighted_point &p1,
+    const Weighted_point &p2,
+    const Weighted_point &p3,
+    const Weighted_point &p, bool perturb) const
+  {
+    CGAL_triangulation_precondition( orientation(p0, p1, p2, p3) == POSITIVE );
+
+    using namespace boost;
+
+    Oriented_side os = power_test(p0, p1, p2, p3, p);
+
+    if (os != ON_ORIENTED_BOUNDARY || !perturb)
+      return os;
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    // We sort the points lexicographically.
+    const Weighted_point * points[5] = {&p0, &p1, &p2, &p3, &p};
+    std::sort(points, points + 5,
+      boost::bind(geom_traits().compare_xyz_3_object(),
+      boost::bind(Dereference<Weighted_point>(), _1),
+      boost::bind(Dereference<Weighted_point>(), _2)) == SMALLER);
+
+    // We successively look whether the leading monomial, then 2nd monomial
+    // of the determinant has non null coefficient.
+    for (int i=4; i>1; --i) {
+      if (points[i] == &p)
+        return ON_NEGATIVE_SIDE; // since p0 p1 p2 p3 are non coplanar
+      // and positively oriented
+      Orientation o;
+      if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
+        return o;
+      if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
+        return o;
+      if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
+        return o;
+      if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
+        return o;
+    }
+
+    CGAL_triangulation_assertion(false);
+    return ON_NEGATIVE_SIDE;
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  Bounded_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_power_sphere(Cell_handle c, const Weighted_point &p,
+    bool perturb) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    int i3;
+    if ( ! c->has_vertex( infinite_vertex(), i3 ) ) {
+      return Bounded_side( side_of_oriented_power_sphere(c->vertex(0)->point(),
+        c->vertex(1)->point(),
+        c->vertex(2)->point(),
+        c->vertex(3)->point(),
+        p, perturb) );
+    }
+    // else infinite cell :
+    int i0,i1,i2;
+    if ( (i3%2) == 1 ) {
+      i0 = (i3+1)&3;
+      i1 = (i3+2)&3;
+      i2 = (i3+3)&3;
+    }
+    else {
+      i0 = (i3+2)&3;
+      i1 = (i3+1)&3;
+      i2 = (i3+3)&3;
+    }
+
+    // general case
+    Orientation o = orientation(c->vertex(i0)->point(),
+      c->vertex(i1)->point(),
+      c->vertex(i2)->point(), p);
+    if (o != ZERO)
+      return Bounded_side(o);
+
+    // else p coplanar with i0,i1,i2
+    return side_of_bounded_power_circle(c->vertex(i0)->point(),
+      c->vertex(i1)->point(),
+      c->vertex(i2)->point(),
+      p, perturb);
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  Bounded_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_bounded_power_circle(const Weighted_point &p0,
+    const Weighted_point &p1,
+    const Weighted_point &p2,
+    const Weighted_point &p, bool perturb) const
+  {
+    CGAL_triangulation_precondition(coplanar_orientation(p0, p1, p2) != 0);
+    if (coplanar_orientation(p0, p1, p2) == POSITIVE)
+      return Bounded_side (side_of_oriented_power_circle(p0, p1, p2, p, perturb));
+    // Wrong because the low level power test already does a coplanar orientation
+    // test.
+    // return Bounded_side (- side_of_oriented_power_circle (p0, p2, p1, p,
+    // perturb));
+    return Bounded_side (side_of_oriented_power_circle(p0, p2, p1, p, perturb));
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  Oriented_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_oriented_power_circle(const Weighted_point &p0,
+    const Weighted_point &p1,
+    const Weighted_point &p2,
+    const Weighted_point &p, bool perturb) const
+  {
+    CGAL_triangulation_precondition( coplanar_orientation(p0, p1, p2) == POSITIVE );
+
+    using namespace boost;
+
+    Oriented_side os = power_test(p0, p1, p2, p);
+
+    if (os != ON_ORIENTED_BOUNDARY || !perturb)
+      return os;
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    // We sort the points lexicographically.
+    const Weighted_point * points[4] = {&p0, &p1, &p2, &p};
+    std::sort(points, points + 4,
+      boost::bind(geom_traits().compare_xyz_3_object(),
+      boost::bind(Dereference<Weighted_point>(), _1),
+      boost::bind(Dereference<Weighted_point>(), _2)) == SMALLER);
+
+    // We successively look whether the leading monomial, then 2nd monomial
+    // of the determinant has non null coefficient.
+    // 2 iterations are enough (cf paper)
+    for (int i=3; i>1; --i) {
+      if (points[i] == &p)
+        return ON_NEGATIVE_SIDE; // since p0 p1 p2 are non collinear
+      // and positively oriented
+      Orientation o;
+      if (points[i] == &p2 && (o = coplanar_orientation(p0,p1,p)) != COPLANAR )
+        return o;
+      if (points[i] == &p1 && (o = coplanar_orientation(p0,p,p2)) != COPLANAR )
+        return o;
+      if (points[i] == &p0 && (o = coplanar_orientation(p,p1,p2)) != COPLANAR )
+        return o;
+    }
+
+    CGAL_triangulation_assertion(false);
+    return ON_NEGATIVE_SIDE;
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  Bounded_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_power_circle(Cell_handle c, int i, const Weighted_point &p,
+    bool perturb) const
+  {
+    CGAL_triangulation_precondition( dimension() >= 2 );
+    int i3 = 5;
+    if ( dimension() == 2 ) {
+      CGAL_triangulation_precondition( i == 3 );
+      // the triangulation is supposed to be valid, ie the facet
+      // with vertices 0 1 2 in this order is positively oriented
+      if ( ! c->has_vertex( infinite_vertex(), i3 ) )
+        return Bounded_side( side_of_oriented_power_circle(c->vertex(0)->point(),
+        c->vertex(1)->point(),
+        c->vertex(2)->point(),
+        p, perturb) );
+      // else infinite facet
+      // v1, v2 finite vertices of the facet such that v1,v2,infinite
+      // is positively oriented
+      Vertex_handle v1 = c->vertex( ccw(i3) ),
+        v2 = c->vertex( cw(i3) );
+      CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
+        mirror_vertex(c, i3)->point()) == NEGATIVE);
+      Orientation o = coplanar_orientation(v1->point(), v2->point(), p);
+      if ( o != ZERO )
+        return Bounded_side( o );
+      // case when p collinear with v1v2
+      return side_of_bounded_power_segment(v1->point(),
+        v2->point(),
+        p, perturb);
+    }// dim 2
+
+    // else dimension == 3
+    CGAL_triangulation_precondition( (i >= 0) && (i < 4) );
+    if ( ( ! c->has_vertex(infinite_vertex(),i3) ) || ( i3 != i ) ) {
+      // finite facet
+      // initialization of i0 i1 i2, vertices of the facet positively
+      // oriented (if the triangulation is valid)
+      int i0 = (i>0) ? 0 : 1;
+      int i1 = (i>1) ? 1 : 2;
+      int i2 = (i>2) ? 2 : 3;
+      CGAL_triangulation_precondition(this->coplanar(c->vertex(i0)->point(),
+        c->vertex(i1)->point(),
+        c->vertex(i2)->point(), p));
+      return side_of_bounded_power_circle(c->vertex(i0)->point(),
+        c->vertex(i1)->point(),
+        c->vertex(i2)->point(),
+        p, perturb);
+    }
+    //else infinite facet
+    // v1, v2 finite vertices of the facet such that v1,v2,infinite
+    // is positively oriented
+    Vertex_handle v1 = c->vertex( next_around_edge(i3,i) ),
+      v2 = c->vertex( next_around_edge(i,i3) );
+    Orientation o = (Orientation)
+      (coplanar_orientation( v1->point(), v2->point(),
+      c->vertex(i)->point()) *
+      coplanar_orientation( v1->point(), v2->point(), p));
+    // then the code is duplicated from 2d case
+    if ( o != ZERO )
+      return Bounded_side( -o );
+    // because p is in f iff
+    // it is not on the same side of v1v2 as c->vertex(i)
+    // case when p collinear with v1v2 :
+    return side_of_bounded_power_segment(v1->point(),
+      v2->point(),
+      p, perturb);
+  }
+
+  template < class Gt, class Tds, class Lds >
+  Bounded_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_bounded_power_segment(const Weighted_point &p0,
+    const Weighted_point &p1,
+    const Weighted_point &p, bool perturb) const
+  {
+    Oriented_side os = power_test(p0, p1, p);
+
+    if (os != ON_ORIENTED_BOUNDARY || !perturb)
+      return Bounded_side(os);
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    switch (this->collinear_position(p0, p, p1)) {
+    case Tr_Base::BEFORE: case Tr_Base::AFTER:
+      return ON_UNBOUNDED_SIDE;
+    case Tr_Base::MIDDLE:
+      return ON_BOUNDED_SIDE;
+    default:
+      ;
+    }
+
+    CGAL_triangulation_assertion(false);
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  template < class Gt, class Tds, class Lds >
+  Bounded_side
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    side_of_power_segment(Cell_handle c, const Weighted_point &p,
+    bool perturb) const
+  {
+    CGAL_triangulation_precondition( dimension() == 1 );
+    if ( ! is_infinite(c,0,1) )
+      return side_of_bounded_power_segment(c->vertex(0)->point(),
+      c->vertex(1)->point(),
+      p, perturb);
+    Locate_type lt; int i;
+    Bounded_side soe = side_of_edge( p, c, lt, i );
+    if (soe != ON_BOUNDARY)
+      return soe;
+    // Either we compare weights, or we use the finite neighboring edge
+    Cell_handle finite_neighbor = c->neighbor(c->index(infinite_vertex()));
+    CGAL_triangulation_assertion(!is_infinite(finite_neighbor,0,1));
+    return side_of_bounded_power_segment(finite_neighbor->vertex(0)->point(),
+      finite_neighbor->vertex(1)->point(),
+      p, perturb);
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_Gabriel(const Facet& f) const
+  {
+    return is_Gabriel(f.first, f.second);
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_Gabriel(Cell_handle c, int i) const
+  {
+    CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i));
+    typename Geom_traits::Side_of_bounded_orthogonal_sphere_3
+      side_of_bounded_orthogonal_sphere =
+      geom_traits().side_of_bounded_orthogonal_sphere_3_object();
+
+    if ((!is_infinite(c->vertex(i))) &&
+      side_of_bounded_orthogonal_sphere(
+      c->vertex(vertex_triple_index(i,0))->point(),
+      c->vertex(vertex_triple_index(i,1))->point(),
+      c->vertex(vertex_triple_index(i,2))->point(),
+      c->vertex(i)->point()) == ON_BOUNDED_SIDE ) return false;
+
+    Cell_handle neighbor = c->neighbor(i);
+    int in = neighbor->index(c);
+
+    if ((!is_infinite(neighbor->vertex(in))) &&
+      side_of_bounded_orthogonal_sphere(
+      c->vertex(vertex_triple_index(i,0))->point(),
+      c->vertex(vertex_triple_index(i,1))->point(),
+      c->vertex(vertex_triple_index(i,2))->point(),
+      neighbor->vertex(in)->point()) == ON_BOUNDED_SIDE ) return false;
+
+    return true;
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_Gabriel(const Edge& e) const
+  {
+    return is_Gabriel(e.first, e.second, e.third);
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_Gabriel(Cell_handle c, int i, int j) const
+  {
+    CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j));
+    typename Geom_traits::Side_of_bounded_orthogonal_sphere_3
+      side_of_bounded_orthogonal_sphere =
+      geom_traits().side_of_bounded_orthogonal_sphere_3_object();
+
+    Facet_circulator fcirc = incident_facets(c,i,j),
+      fdone(fcirc);
+    Vertex_handle v1 = c->vertex(i);
+    Vertex_handle v2 = c->vertex(j);
+    do {
+      // test whether the vertex of cc opposite to *fcirc
+      // is inside the sphere defined by the edge e = (s, i,j)
+      Cell_handle cc = (*fcirc).first;
+      int ii = (*fcirc).second;
+      if (!is_infinite(cc->vertex(ii)) &&
+        side_of_bounded_orthogonal_sphere( v1->point(),
+        v2->point(),
+        cc->vertex(ii)->point())
+        == ON_BOUNDED_SIDE ) return false;
+    } while(++fcirc != fdone);
+    return true;
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_Gabriel(Vertex_handle v) const
+  {
+    return nearest_power_vertex( v->point().point(), v->cell()) == v;
+  }
+
+  // Returns
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    insert(const Weighted_point & p, Cell_handle start, bool *could_lock_zone)
+  {
+    Locate_type lt;
+    int li, lj;
+
+    // Parallel
+    if (could_lock_zone)
+    {
+      Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone);
+      if (*could_lock_zone)
+        return insert(p, lt, c, li, lj, could_lock_zone);
+      else
+        return Vertex_handle();
+    }
+    // Sequential
+    else
+    {
+      Cell_handle c = locate(p, lt, li, lj, start);
+      return insert(p, lt, c, li, lj);
+    }
+  }
+
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    insert(const Weighted_point & p, Locate_type lt, Cell_handle c,
+           int li, int lj, bool *could_lock_zone)
+  {
+    switch (dimension()) {
+    case 3:
+      {
+        Conflict_tester_3 tester (p, this);
+        return insert_in_conflict(p, lt,c,li,lj, tester,
+                                  get_hidden_point_visitor(),
+                                  could_lock_zone);
+      }
+    case 2:
+      {
+        Conflict_tester_2 tester (p, this);
+        return insert_in_conflict(p, lt,c,li,lj, tester,
+                                  get_hidden_point_visitor(),
+                                  could_lock_zone);
+      }
+    case 1:
+      {
+        Conflict_tester_1 tester (p, this);
+        return insert_in_conflict(p, lt,c,li,lj, tester,
+                                  get_hidden_point_visitor(),
+                                  could_lock_zone);
+      }
+    }
+
+    Conflict_tester_0 tester (p, this);
+    return insert_in_conflict(p, lt,c,li,lj, tester,
+                              get_hidden_point_visitor(),
+                              could_lock_zone);
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  template <class CellIt>
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
+    Cell_handle begin, int i)
+  {
+    CGAL_triangulation_precondition(cell_begin != cell_end);
+
+    get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end);
+
+    Vertex_handle v =
+      Tr_Base::insert_in_hole(p, cell_begin, cell_end, begin, i);
+
+    // Store the hidden points in their new cells and hide vertices that
+    // have to be hidden
+    get_hidden_point_visitor().reinsert_vertices(v);
+    return v;
+  }
+
+
+  template < class Gt, class Tds, class Lds >
+  template <class CellIt>
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    insert_in_hole(const Weighted_point & p, CellIt cell_begin, CellIt cell_end,
+    Cell_handle begin, int i, Vertex_handle newv)
+  {
+    CGAL_triangulation_precondition(cell_begin != cell_end);
+
+    get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end);
+
+    Vertex_handle v =
+      Tr_Base::insert_in_hole(p, cell_begin, cell_end, begin, i, newv);
+
+    // Store the hidden points in their new cells and hide vertices that
+    // have to be hidden
+    get_hidden_point_visitor().reinsert_vertices(v);
+    return v;
+  }
+
+  template <class Gt, class Tds, class Lds >
+  template <class RegularTriangulation_3>
+  class Regular_triangulation_3<Gt, Tds, Lds>::Vertex_remover {
+    typedef RegularTriangulation_3 Regular;
+    typedef typename Gt::Point_3 Point;
+  public:
+    typedef typename std::vector<Point>::iterator
+      Hidden_points_iterator;
+
+    Vertex_remover(Regular &tmp_) : tmp(tmp_) {}
+
+    Regular &tmp;
+
+    void add_hidden_points(Cell_handle ch) {
+      std::copy (ch->hidden_points_begin(), ch->hidden_points_end(),
+        std::back_inserter(hidden));
+    }
+
+    Hidden_points_iterator hidden_points_begin() {
+      return hidden.begin();
+    }
+    Hidden_points_iterator hidden_points_end() {
+      return hidden.end();
+    }
+
+    Bounded_side side_of_bounded_circle(const Point &p, const Point &q,
+      const Point &r, const Point &s, bool perturb = false) const {
+        return tmp.side_of_bounded_power_circle(p,q,r,s,perturb);
+    }
+
+  private:
+    // The removal of v may un-hide some points,
+    // Space functions output them.
+    std::vector<Point> hidden;
+  };
+
+  // The displacement method works only
+  // on regular triangulation without hidden points at any time
+  // the vertex inserter is used only
+  // for the purpose of displacements
+  template <class Gt, class Tds, class Lds >
+  template <class RegularTriangulation_3>
+  class Regular_triangulation_3<Gt, Tds, Lds>::Vertex_inserter {
+    typedef RegularTriangulation_3 Regular;
+  public:
+    typedef Nullptr_t Hidden_points_iterator;
+
+    Vertex_inserter(Regular &tmp_) : tmp(tmp_) {}
+
+    Regular &tmp;
+
+    void add_hidden_points(Cell_handle) {}
+    Hidden_points_iterator hidden_points_begin() { return NULL; }
+    Hidden_points_iterator hidden_points_end() { return NULL; }
+
+    Vertex_handle insert(const Weighted_point& p,
+      Locate_type lt, Cell_handle c, int li, int lj) {
+        return tmp.insert(p, lt, c, li, lj);
+    }
+
+    Vertex_handle insert(const Weighted_point& p, Cell_handle c) {
+      return tmp.insert(p, c);
+    }
+
+    Vertex_handle insert(const Weighted_point& p) {
+      return tmp.insert(p);
+    }
+  };
+
+  template < class Gt, class Tds, class Lds >
+  void
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    remove(Vertex_handle v)
+  {
+    Cell_handle c;
+    if (dimension() > 0)
+      c = v->cell()->neighbor(v->cell()->index(v));
+
+    Self tmp;
+    Vertex_remover<Self> remover(tmp);
+    Tr_Base::remove(v,remover);
+
+    // Re-insert the points that v was hiding.
+    for (typename Vertex_remover<Self>::Hidden_points_iterator
+      hi = remover.hidden_points_begin();
+      hi != remover.hidden_points_end(); ++hi) {
+        Vertex_handle hv = insert (*hi, c);
+        if (hv != Vertex_handle()) c = hv->cell();
+    }
+    CGAL_triangulation_expensive_postcondition (is_valid());
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    remove(Vertex_handle v, bool *could_lock_zone)
+  {
+    bool removed = true;
+
+    // Locking vertex v...
+    if (!this->try_lock_vertex(v))
+    {
+      *could_lock_zone = false;
+    }
+    else
+    {
+      Vertex_handle hint = (v->cell()->vertex(0) == v ?
+        v->cell()->vertex(1) : v->cell()->vertex(0));
+
+      Self tmp;
+      Vertex_remover<Self> remover(tmp);
+      removed = Tr_Base::remove(v, remover, could_lock_zone);
+
+      if (*could_lock_zone && removed)
+      {
+        // Re-insert the points that v was hiding.
+        for (typename Vertex_remover<Self>::Hidden_points_iterator
+          hi = remover.hidden_points_begin();
+          hi != remover.hidden_points_end(); ++hi)
+        {
+          bool could_lock_zone = false;
+          Vertex_handle hv;
+          while (!could_lock_zone)
+          {
+            hv = insert (*hi, hint, &could_lock_zone);
+          }
+          if (hv != Vertex_handle())
+            hint = hv;
+        }
+        CGAL_triangulation_expensive_postcondition (is_valid());
+      }
+    }
+
+    return removed;
+  }
+
+  // Again, verbatim copy from Delaunay.
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    move_point(Vertex_handle v, const Weighted_point & p)
+  {
+    CGAL_triangulation_precondition(! is_infinite(v));
+    CGAL_triangulation_expensive_precondition(is_vertex(v));
+
+    // Dummy implementation for a start.
+
+    // Remember an incident vertex to restart
+    // the point location after the removal.
+    Cell_handle c = v->cell();
+    Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0);
+    CGAL_triangulation_assertion(old_neighbor != v);
+
+    remove(v);
+
+    if (dimension() <= 0)
+      return insert(p);
+    return insert(p, old_neighbor->cell());
+  }
+
+  // Displacement works only for Regular triangulation
+  // without hidden points at any time
+  template < class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    move_if_no_collision(Vertex_handle v, const Weighted_point &p)
+  {
+    Self tmp;
+    Vertex_remover<Self> remover (tmp);
+    Vertex_inserter<Self> inserter (*this);
+    Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter);
+
+    CGAL_triangulation_expensive_postcondition(is_valid());
+    return res;
+  }
+
+  template <class Gt, class Tds, class Lds >
+  typename Regular_triangulation_3<Gt,Tds,Lds>::Vertex_handle
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    move(Vertex_handle v, const Weighted_point &p) {
+      CGAL_triangulation_precondition(!is_infinite(v));
+      if(v->point() == p) return v;
+      Self tmp;
+      Vertex_remover<Self> remover (tmp);
+      Vertex_inserter<Self> inserter (*this);
+      return Tr_Base::move(v,p,remover,inserter);
+  }
+
+  template < class Gt, class Tds, class Lds >
+  bool
+    Regular_triangulation_3<Gt,Tds,Lds>::
+    is_valid(bool verbose, int level) const
+  {
+    if ( ! Tr_Base::is_valid(verbose,level) ) {
+      if (verbose)
+        std::cerr << "invalid base triangulation" << std::endl;
+      CGAL_triangulation_assertion(false);
+      return false;
+    }
+
+    switch ( dimension() ) {
+    case 3:
+      {
+        for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end(); it != end; ++it) {
+          is_valid_finite(it, verbose, level);
+          for(int i=0; i<4; i++) {
+            if ( !is_infinite
+              (it->neighbor(i)->vertex(it->neighbor(i)->index(it))) ) {
+                if ( side_of_power_sphere
+                  (it,
+                  it->neighbor(i)->vertex(it->neighbor(i)->index(it))->point())
+                  == ON_BOUNDED_SIDE ) {
+                    if (verbose)
+                      std::cerr << "non-empty sphere " << std::endl;
+                    CGAL_triangulation_assertion(false);
+                    return false;
+                }
+            }
+          }
+        }
+        break;
+      }
+    case 2:
+      {
+        for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end(); it!= end; ++it) {
+          is_valid_finite((*it).first, verbose, level);
+          for(int i=0; i<3; i++) {
+            if( !is_infinite
+              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
+              ->index((*it).first))) ) {
+                if ( side_of_power_circle
+                  ( (*it).first, 3,
+                  (*it).first->neighbor(i)->
+                  vertex( (((*it).first)->neighbor(i))
+                  ->index((*it).first) )->point() )
+                  == ON_BOUNDED_SIDE ) {
+                    if (verbose)
+                      std::cerr << "non-empty circle " << std::endl;
+                    CGAL_triangulation_assertion(false);
+                    return false;
+                }
+            }
+          }
+        }
+        break;
+      }
+    case 1:
+      {
+        for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end(); it != end; ++it) {
+          is_valid_finite((*it).first, verbose, level);
+          for(int i=0; i<2; i++) {
+            if( !is_infinite
+              ((*it).first->neighbor(i)->vertex( (((*it).first)->neighbor(i))
+              ->index((*it).first))) ) {
+                if ( side_of_power_segment
+                  ( (*it).first,
+                  (*it).first->neighbor(i)->
+                  vertex( (((*it).first)->neighbor(i))
+                  ->index((*it).first) )->point() )
+                  == ON_BOUNDED_SIDE ) {
+                    if (verbose)
+                      std::cerr << "non-empty edge " << std::endl;
+                    CGAL_triangulation_assertion(false);
+                    return false;
+                }
+            }
+          }
+        }
+        break;
+      }
+    }
+    if (verbose)
+      std::cerr << "valid Regular triangulation" << std::endl;
+    return true;
+  }
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_REGULAR_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_adaptation_policies_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_adaptation_policies_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_adaptation_policies_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_adaptation_policies_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_adaptation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_adaptation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_adaptation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_adaptation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_euclidean_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_euclidean_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_euclidean_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_euclidean_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_euclidean_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_euclidean_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_euclidean_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_euclidean_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Regular_triangulation_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Regular_triangulation_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Residue.h b/3rdparty/CGAL-4.8/include/CGAL/Residue.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Residue.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Residue.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Ridges.h b/3rdparty/CGAL-4.8/include/CGAL/Ridges.h
new file mode 100644
index 0000000..9df6b91
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Ridges.h
@@ -0,0 +1,916 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+#ifndef CGAL_RIDGE_3_H_
+#define CGAL_RIDGE_3_H_
+
+#include <utility>
+#include <list>
+#include <map>
+
+#include <CGAL/basic.h>
+#include <CGAL/Min_sphere_d.h>
+#include <CGAL/Optimisation_d_traits_3.h>
+#include <CGAL/barycenter.h>
+#include <CGAL/property_map.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+ 
+enum Ridge_interrogation_type {MAX_RIDGE, MIN_RIDGE, CREST_RIDGE};
+
+enum Ridge_type {NO_RIDGE=0, 
+		 MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE, 
+		 MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE};
+ 
+//are ridges tagged as elliptic or hyperbolic using 3rd or 4th order
+//differential quantitities?
+//with Ridge_order_3 P1 and P2 are not used and the sharpness is not defined.
+enum Ridge_order {Ridge_order_3 = 3, Ridge_order_4 = 4};
+  
+//---------------------------------------------------------------------------
+//Ridge_line : a connected sequence of edges of a
+//TriangularPolyhedralSurface crossed by a
+//ridge (with a barycentric coordinate to compute the crossing point),
+//with a Ridge_type and weights : strength and sharpness. Note
+//sharpness is only available (more precisely only meaningful)
+//if the Ridge_approximation has
+//been computed with the Ridge_order Ridge_order_4.
+//(else, if it is computed with Ridge_order_3 it keeps its initial
+//value 0)
+//--------------------------------------------------------------------------
+template < class TriangleMesh > class Ridge_line
+{
+  typedef typename boost::property_map<TriangleMesh,CGAL::vertex_point_t>::type VPM;
+  typedef typename boost::property_traits<VPM>::value_type Point_3;
+  typedef typename Kernel_traits<Point_3>::Kernel Kernel; 
+public:
+  
+  typedef typename Kernel::FT         FT;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
+  typedef std::pair< halfedge_descriptor, FT> ridge_halfhedge; 
+
+  Ridge_type line_type() const {return m_line_type;}
+  Ridge_type& line_type() {return m_line_type;}
+
+  const FT strength() const {return m_strength;}
+  FT& strength() {return m_strength;}
+
+  const FT sharpness() const {return m_sharpness;}
+  FT& sharpness() {return m_sharpness;}
+
+  const std::list<ridge_halfhedge>* line() const { return &m_line;}
+  std::list<ridge_halfhedge>* line() { return &m_line;}
+
+  //constructor
+  Ridge_line(const TriangleMesh& P);
+  
+  /* The output is : line_type, strength, sharpness, list of points of
+     the polyline. An insert operator << is also available.
+   */
+  template <class VertexPointMap>
+  void dump_4ogl(std::ostream& out_stream, VertexPointMap vpm) const ;
+
+  template <class VertexPointMap>
+  void dump_verbose(std::ostream& out_stream, VertexPointMap vpm) const ;
+
+protected:
+  const TriangleMesh& P;
+  //one of MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE,
+  //MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE or MIN_CREST_RIDGE
+  Ridge_type m_line_type;  
+  std::list<ridge_halfhedge> m_line;
+  FT m_strength;// = integral of ppal curvature along the line
+  FT m_sharpness;// = (integral of second derivative of curvature
+		 // along the line) multiplied by the squared of 
+                 // the size of the model
+		 // (which is the radius of the smallest enclosing
+		 // ball)
+};
+
+//--------------------------------------------------------------------------
+// IMPLEMENTATION OF Ridge_line members
+//--------------------------------------------------------------------------
+
+ //constructor
+template < class TriangleMesh >
+Ridge_line<TriangleMesh>::
+Ridge_line(const TriangleMesh& P) 
+  : P(P), m_strength(0.), m_sharpness(0.)
+{}
+   
+
+template < class TriangleMesh >
+template <class VertexPointMap>
+void Ridge_line<TriangleMesh>::
+dump_4ogl(std::ostream& out_stream,
+          VertexPointMap vpm) const
+{
+  out_stream << line_type() << " "
+	     << strength() << " "
+	     << sharpness() << " ";
+  typedef typename boost::property_traits<VertexPointMap>::value_type Point_3;
+  typename std::list<ridge_halfhedge >::const_iterator
+    iter = line()->begin(), 
+    ite =  line()->end();
+  for (;iter!=ite;iter++){
+    //he: p->q, r is the crossing point
+    Point_3 p = get(vpm, target(opposite(iter->first,P),P)),
+      q = get(vpm,target(iter->first,P));
+    Point_3 r = CGAL::barycenter(p, iter->second, q);
+    out_stream << " " << r ;	
+  }
+  out_stream  << std::endl;  
+}
+
+//verbose output
+template < class TriangleMesh >
+template <class VertexPointMap>
+void Ridge_line<TriangleMesh>::
+dump_verbose(std::ostream& out_stream, VertexPointMap vpm) const
+{
+  typedef typename boost::property_traits<VertexPointMap>::value_type Point_3;
+  out_stream << "Line type is : " << line_type() << std::endl
+	     << "Strength is :  " << strength() << std::endl
+	     << "Sharpness is : " << sharpness() << std::endl
+	     << "Polyline point coordinates are : " << std::endl;
+
+  typename std::list<ridge_halfhedge>::const_iterator
+    iter = line()->begin(), 
+    ite =  line()->end();
+  for (;iter!=ite;iter++){
+    //he: p->q, r is the crossing point
+    Point_3 p = get(vpm, target(opposite(iter->first,P),P)),
+      q = get(vpm,target(iter->first,P));
+    Point_3 r = CGAL::barycenter(p, iter->second, q);
+    out_stream << r << std::endl;	
+  }
+}
+
+template <class TriangleMesh>
+std::ostream& 
+operator<<(std::ostream& out_stream, const Ridge_line<TriangleMesh>& ridge_line)
+{
+  ridge_line.dump_verbose(out_stream);
+  return out_stream;
+}
+
+
+
+//---------------------------------------------------------------------------
+//Ridge_approximation
+//--------------------------------------------------------------------------
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+class Ridge_approximation
+{
+  typedef typename boost::property_map<TriangleMesh,vertex_point_t>::const_type VPM;
+  typedef typename boost::property_traits<VPM>::value_type Point_3;
+  typedef typename Kernel_traits<Point_3>::Kernel Kernel;
+ public:  
+  typedef typename Kernel::FT        FT;
+  typedef typename Kernel::Vector_3  Vector_3;
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor     vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor   halfedge_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::face_descriptor      face_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::face_iterator    face_iterator;
+
+
+  //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap
+  CGAL_static_assertion((boost::is_same<vertex_descriptor, typename VertexFTMap::key_type>::value));
+  CGAL_static_assertion((boost::is_same<vertex_descriptor, typename VertexVectorMap::key_type>::value));
+  CGAL_static_assertion((boost::is_same<FT, typename VertexFTMap::value_type>::value));
+  CGAL_static_assertion((boost::is_same<Vector_3, typename VertexVectorMap::value_type>::value));
+
+  typedef std::pair< halfedge_descriptor, FT>    Ridge_halfhedge;
+  typedef CGAL::Ridge_line<TriangleMesh>  Ridge_line;
+
+  Ridge_approximation(const TriangleMesh &P,
+		      const VertexFTMap& vertex2k1_pm, 
+		      const VertexFTMap& vertex2k2_pm,
+		      const VertexFTMap& vertex2b0_pm, 
+		      const VertexFTMap& vertex2b3_pm,
+		      const VertexVectorMap& vertex2d1_pm, 
+		      const VertexVectorMap& vertex2d2_pm,
+		      const VertexFTMap& vertex2P1_pm, 
+		      const VertexFTMap& vertex2P2_pm);
+ 
+  template <class OutputIterator>
+  OutputIterator compute_max_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
+  template <class OutputIterator>
+  OutputIterator compute_min_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
+  template <class OutputIterator>
+  OutputIterator compute_crest_ridges(OutputIterator it, Ridge_order ord = Ridge_order_3);
+  
+  //Find MAX_RIDGE, MIN_RIDGE or CREST_RIDGE ridges iterate on P facets,
+  //find a non-visited, regular (i.e. if there is a coherent
+  //orientation of ppal dir at the facet vertices), 2Xing triangle,
+  //follow non-visited, regular, 2Xing triangles in both sens to
+  //create a Ridge line.  Each time an edge is added the strength and
+  //sharpness(if Ridge_order_4) are updated.
+  template <class OutputIterator>
+  OutputIterator compute_ridges(Ridge_interrogation_type r_type, 
+			  OutputIterator ridge_lines_it,
+			  Ridge_order ord = Ridge_order_3);
+
+ protected:
+  const TriangleMesh& P;
+  FT squared_model_size;//squared radius of the smallest enclosing sphere of the TriangleMesh
+		//used to make the sharpness scale independant and iso indep
+  Ridge_order tag_order;
+
+  typedef std::map<face_descriptor, bool> Facet2bool_map_type;
+  Facet2bool_map_type is_visited_map;
+
+  //Property maps
+  const VertexFTMap &k1, &k2, &b0, &b3, &P1, &P2;
+  const VertexVectorMap &d1, &d2;
+
+  VPM vpm;
+
+  //is a facet crossed by a BLUE, RED or CREST_RIDGE ridge? if so, return
+  //the crossed edges and more precise type from MAX_ELLIPTIC_RIDGE,
+  //MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE, MIN_ELLIPTIC_RIDGE,
+  //MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE or NO_RIDGE
+  Ridge_type facet_ridge_type(const face_descriptor f, 
+			      halfedge_descriptor& he1, 
+			      halfedge_descriptor& he2,
+			      Ridge_interrogation_type r_type);
+  
+  //is an edge crossed by a BLUE/RED ridge? (color is MAX_RIDGE or
+  //MIN_RIDGE ).  As we only test edges of regular triangles, the ppal
+  //direction at endpoints d_p and d_q cannot be orthogonal. If both
+  //extremalities vanish, we consider no crossing occurs. If only one
+  //of them vanishes, we consider it as an positive infinitesimal and
+  //apply the general rule. The general rule is that for both
+  //non-vanishing extremalities, a crossing occurs if their sign
+  //differ; Assuming the accute rule to orient the ppal directions,
+  //there is a crossing iff d_p.d_q * b_p*b_q < 0
+  void xing_on_edge(const halfedge_descriptor he, 
+		    bool& is_crossed, 
+		    Ridge_interrogation_type color);
+ 
+  //given a ridge segment of a given color, in a triangle crossing he1
+  //(v_p1 -> v_q1) and he2 (v_p2 -> v_q2) return true if it is
+  //elliptic, false if it is hyperbolic.
+  bool tag_as_elliptic_hyperbolic(const Ridge_interrogation_type color,
+				  const halfedge_descriptor he1, 
+				  const halfedge_descriptor he2);
+
+  //for the computation with tag_order == 3 only
+  //for a ridge segment [r1,r2] in a triangle (v1,v2,v3), let r = r2 -
+  //r1 and normalize, the projection of a point p on the line (r1,r2)
+  //is pp=r1+tr, with t=(p-r1)*r then the vector v starting at p is
+  //pointing to the ridge line (r1,r2) if (pp-p)*v >0. Return the sign
+  //of b, for a ppal direction pointing to the ridge segment,
+  //appearing at least at two vertices of the facet.
+  //
+  // for color = MAX_RIDGE, sign = 1 if MAX_ELLIPTIC_RIDGE, -1 if
+  // MAX_HYPERBOLIC_RIDGE 
+  //
+  // for color = MIN_RIDGE, sign = -1 if MIN_ELLIPTIC_RIDGE, 1 if
+  // MIN_HYPERBOLIC_RIDGE
+  int b_sign_pointing_to_ridge(const vertex_descriptor v1, 
+			       const vertex_descriptor v2,
+			       const vertex_descriptor v3,
+			       const Vector_3 r1, const Vector_3 r2, 
+			       const Ridge_interrogation_type color);
+
+  //a ridge line begins with a segment in a triangle given by the 2 he
+  //crossed
+  void init_ridge_line(Ridge_line* ridge_line, 
+		       const halfedge_descriptor h1, 
+		       const halfedge_descriptor h2, 
+		       const Ridge_type r_type);
+  //When the line is extended with a he, the bary coord of the
+  //crossing point is computed, the pair (he,coord) is added and the
+  //weights are updated 
+  void addback(Ridge_line* ridge_line, 
+	       const halfedge_descriptor he, 
+	       const Ridge_type r_type);
+  void addfront(Ridge_line* ridge_line, 
+		const halfedge_descriptor he,
+		const Ridge_type r_type);
+
+  //compute the barycentric coordinate of the xing point (blue or red)
+  //for he: p->q (wrt the extremality values b0/3).  coord is st
+  //xing_point = coord*p + (1-coord)*q
+  FT bary_coord(const halfedge_descriptor he, 
+		const Ridge_type r_type);
+};
+
+
+// IMPLEMENTATION OF Ridge_approximation members
+/////////////////////////////////////////////////////////////////////////////
+//constructor
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap >::
+Ridge_approximation(const TriangleMesh &p,
+                    const VertexFTMap& vertex2k1_pm, 
+                    const VertexFTMap& vertex2k2_pm,
+                    const VertexFTMap& vertex2b0_pm, 
+                    const VertexFTMap& vertex2b3_pm,
+                    const VertexVectorMap& vertex2d1_pm, 
+                    const VertexVectorMap& vertex2d2_pm,
+                    const VertexFTMap& vertex2P1_pm, 
+                    const VertexFTMap& vertex2P2_pm)
+  : P(p), k1(vertex2k1_pm), k2(vertex2k2_pm), b0(vertex2b0_pm), b3(vertex2b3_pm), 
+          P1(vertex2P1_pm), P2(vertex2P2_pm), d1(vertex2d1_pm), d2(vertex2d2_pm),
+          vpm(get(CGAL::vertex_point,p))
+{
+  //init the is_visited_map and check that the mesh is a triangular one.
+  face_iterator itb,ite; 
+  boost::tie(itb,ite) = faces(P);
+  for(;itb!=ite;itb++) {
+    is_visited_map[*itb] = false;
+  }
+  CGAL_precondition( is_triangle_mesh(p) );
+
+  std::vector<Point_3> points;
+  BOOST_FOREACH(vertex_descriptor v, vertices(p)){
+    points.push_back(get(vpm,v));
+  }
+  
+  CGAL::Min_sphere_d<CGAL::Optimisation_d_traits_3<Kernel> > 
+    min_sphere(points.begin(), points.end());
+  squared_model_size = min_sphere.squared_radius();
+  //maybe better to use CGAL::Min_sphere_of_spheres_d ?? but need to create spheres?
+
+  tag_order = Ridge_order_3;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+template <class OutputIterator>
+OutputIterator
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+compute_max_ridges(OutputIterator it, Ridge_order ord)
+{
+  compute_ridges(MAX_RIDGE, it, ord);
+  return it;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+template <class OutputIterator>
+OutputIterator
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+compute_min_ridges(OutputIterator it, Ridge_order ord)
+{
+  compute_ridges(MIN_RIDGE, it, ord);
+  return it;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+template <class OutputIterator>
+OutputIterator
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+compute_crest_ridges(OutputIterator it, Ridge_order ord)
+{
+  compute_ridges(CREST_RIDGE, it, ord);
+  return it;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+template <class OutputIterator>
+OutputIterator
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+compute_ridges(Ridge_interrogation_type r_type, OutputIterator ridge_lines_it, Ridge_order ord)
+{
+  tag_order = ord;
+
+  //reinit the is_visited_map
+  face_iterator itb,ite;
+  boost::tie(itb,ite) = faces(P);
+  for(;itb!=ite;itb++) is_visited_map[*itb] = false;
+  
+  boost::tie(itb,ite) = faces(P);
+  for(;itb!=ite;itb++)
+    {
+      face_descriptor f = *itb;
+      if (is_visited_map.find(f)->second) continue;
+      is_visited_map.find(f)->second = true;
+      halfedge_descriptor h1, h2, curhe1, curhe2, curhe;
+      
+      //h1 h2 are the hedges crossed if any, r_type should be
+      //MAX_RIDGE, MIN_RIDGE or CREST_RIDGE ; cur_ridge_type should be
+      //MAX_ELLIPTIC_RIDGE, MAX_HYPERBOLIC_RIDGE, MAX_CREST_RIDGE,
+      //MIN_ELLIPTIC_RIDGE, MIN_HYPERBOLIC_RIDGE, MIN_CREST_RIDGE or NO_RIDGE
+      Ridge_type cur_ridge_type = facet_ridge_type(f,h1,h2,r_type);
+      if ( cur_ridge_type == NO_RIDGE ) continue;
+      
+      //a ridge_line is begining and stored
+      Ridge_line* cur_ridge_line = new Ridge_line(P);
+      init_ridge_line(cur_ridge_line, h1, h2, cur_ridge_type);
+      *ridge_lines_it++ = cur_ridge_line;
+    
+      //next triangle adjacent to h1 (push_front)
+      if ( ! is_border_edge(h1,P) ) 
+	{
+	  f = face(opposite(h1,P),P);
+	  curhe = h1;
+	  while (cur_ridge_type == facet_ridge_type(f,curhe1,curhe2,r_type))
+	    {
+	      //follow the ridge from curhe
+	      if (is_visited_map.find(f)->second) break;
+	      is_visited_map.find(f)->second = true;
+	      if (opposite(curhe,P) == curhe1) curhe = curhe2;
+	      else curhe = curhe1;//curhe stays at the ridge extremity
+	      addfront(cur_ridge_line, curhe, cur_ridge_type);
+	      if ( ! is_border_edge(curhe,P) ) f = face(opposite(curhe,P),P);
+	      else break;
+	    }
+	  //exit from the while if
+	  //1. border or already visited (this is a ridge loop)
+	  //2. not same type, then do not set visisted cause a MAX_ELLIPTIC_RIDGE
+	  //	  follows a MAX_HYPERBOLIC_RIDGE
+	}
+
+      //next triangle adjacent to h2 (push_back)
+      if ( ! is_border_edge(h2,P) ) 
+	{
+	  f = face(opposite(h2,P),P);
+	  curhe = h2;
+	  while (cur_ridge_type ==
+		 facet_ridge_type(f,curhe1,curhe2,r_type))
+	    {
+	      //follow the ridge from curhe
+	      if (is_visited_map.find(f)->second) break;
+	      is_visited_map.find(f)->second = true;
+	      if (opposite(curhe,P) == curhe1) curhe = curhe2;
+	      else curhe = curhe1;
+	      addback(cur_ridge_line, curhe, cur_ridge_type);
+	      if ( ! is_border_edge(curhe,P) ) f = face(opposite(curhe,P),P);
+	      else break;
+	    }
+	} 
+    }
+  return ridge_lines_it;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+Ridge_type
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+facet_ridge_type(const face_descriptor f, halfedge_descriptor& he1, halfedge_descriptor&
+		 he2, Ridge_interrogation_type r_type)
+{
+  //polyhedral data
+  //we have v1--h1-->v2--h2-->v3--h3-->v1
+  const halfedge_descriptor h1 = halfedge(f,P);
+  const vertex_descriptor v2 = target(h1,P);
+  const halfedge_descriptor h2 = next(h1,P);
+  const vertex_descriptor v3 = target(h2,P);
+  const halfedge_descriptor h3 = next(h2,P);
+  const vertex_descriptor v1 = target(h3,P);
+
+  //check for regular facet
+  //i.e. if there is a coherent orientation of ppal dir at the facet vertices
+  if ( d1[v1]*d1[v2] * d1[v1]*d1[v3] * d1[v2]*d1[v3] < 0 ) 
+    return NO_RIDGE;
+   
+  //determine potential crest color
+  //MAX_CREST_RIDGE if |sum(k1)|>|sum(k2)| sum over facet vertices vi
+  //MIN_CREST_RIDGE if |sum(k1)|<|sum(k2)|
+  Ridge_type crest_color = NO_RIDGE;
+  if (r_type == CREST_RIDGE) 
+    {
+      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) > CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
+	crest_color = MAX_CREST_RIDGE; 
+      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) < CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
+	crest_color = MIN_CREST_RIDGE;
+      if ( CGAL::abs(k1[v1]+k1[v2]+k1[v3]) == CGAL::abs(k2[v1]+k2[v2]+k2[v3]) ) 
+	return NO_RIDGE;
+    }
+  
+  //compute Xing on the 3 edges
+  bool h1_is_crossed = false, h2_is_crossed = false, h3_is_crossed = false;
+  if ( r_type == MAX_RIDGE || crest_color == MAX_CREST_RIDGE ) 
+    {
+      xing_on_edge(h1, h1_is_crossed, MAX_RIDGE);
+      xing_on_edge(h2, h2_is_crossed, MAX_RIDGE);
+      xing_on_edge(h3, h3_is_crossed, MAX_RIDGE);
+    }
+  if ( r_type == MIN_RIDGE || crest_color == MIN_CREST_RIDGE ) 
+    {
+      xing_on_edge(h1, h1_is_crossed, MIN_RIDGE);
+      xing_on_edge(h2, h2_is_crossed, MIN_RIDGE);
+      xing_on_edge(h3, h3_is_crossed, MIN_RIDGE);
+    }
+
+  //there are either 0 or 2 crossed edges
+  if ( !h1_is_crossed && !h2_is_crossed && !h3_is_crossed ) 
+    return NO_RIDGE; 
+  if (h1_is_crossed && h2_is_crossed && !h3_is_crossed)
+    {
+      he1 = h1; 
+      he2 = h2;
+    }
+  if (h1_is_crossed && !h2_is_crossed && h3_is_crossed)
+    {
+      he1 = h1; 
+      he2 = h3;
+    }
+  if (!h1_is_crossed && h2_is_crossed && h3_is_crossed)
+    {
+      he1 = h2; 
+      he2 = h3;
+    }
+  //check there is no other case (just one edge crossed)
+  CGAL_postcondition ( !( (h1_is_crossed && !h2_is_crossed && !h3_is_crossed)
+			  || (!h1_is_crossed && h2_is_crossed && !h3_is_crossed)
+			  || (!h1_is_crossed && !h2_is_crossed && h3_is_crossed)) );
+
+  //There is a ridge segment in the triangle, determine its type elliptic/hyperbolic
+  bool is_elliptic;  
+  if ( r_type == MAX_RIDGE || crest_color == MAX_CREST_RIDGE ) 
+    is_elliptic = tag_as_elliptic_hyperbolic(MAX_RIDGE, he1, he2);
+  else is_elliptic = tag_as_elliptic_hyperbolic(MIN_RIDGE, he1, he2);
+  
+  if (r_type == MAX_RIDGE) 
+    {if (is_elliptic) return MAX_ELLIPTIC_RIDGE;
+    else return MAX_HYPERBOLIC_RIDGE; }
+  if (crest_color == MAX_CREST_RIDGE && is_elliptic) return MAX_CREST_RIDGE;
+
+  if (r_type == MIN_RIDGE) 
+    {if (is_elliptic) return MIN_ELLIPTIC_RIDGE;
+    else return MIN_HYPERBOLIC_RIDGE; }
+  if (crest_color == MIN_CREST_RIDGE && is_elliptic) return MIN_CREST_RIDGE;
+  
+  return NO_RIDGE;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+void
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+xing_on_edge(const halfedge_descriptor he, bool& is_crossed, Ridge_interrogation_type color)
+{
+  is_crossed = false;
+  FT sign = 0;
+  FT b_p, b_q; // extremalities at p and q for he: p->q
+  Vector_3  d_p = d1[target(opposite(he,P),P)],
+    d_q = d1[target(he,P)]; //ppal dir
+  if ( color == MAX_RIDGE ) {
+    b_p = b0[target(opposite(he,P),P)];
+    b_q = b0[target(he,P)];
+  }
+  else {     
+    b_p = b3[target(opposite(he,P),P)];
+    b_q = b3[target(he,P)];
+  }
+  if ( b_p == 0 && b_q == 0 ) return;
+  if ( b_p == 0 && b_q !=0 ) sign = d_p*d_q * b_q;
+  if ( b_p != 0 && b_q ==0 ) sign = d_p*d_q * b_p;
+  if ( b_p != 0 && b_q !=0 ) sign = d_p*d_q * b_p * b_q;
+  if ( sign < 0 ) is_crossed = true;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+bool 
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+tag_as_elliptic_hyperbolic(const Ridge_interrogation_type color,
+                           const halfedge_descriptor he1, 
+                           const halfedge_descriptor he2)
+{
+  const vertex_descriptor v_p1 = target(opposite(he1,P),P), v_q1 = target(he1,P),
+    v_p2 = target(opposite(he2,P),P), v_q2 = target(he2,P); // hei: pi->qi
+
+  FT coord1, coord2;
+  if (color == MAX_RIDGE) 
+    {
+      coord1 = CGAL::abs(b0[v_q1]) / ( CGAL::abs(b0[v_p1]) + CGAL::abs(b0[v_q1]) );
+      coord2 = CGAL::abs(b0[v_q2]) / ( CGAL::abs(b0[v_p2]) + CGAL::abs(b0[v_q2]) ); 
+    }
+  else 
+    {
+      coord1 = CGAL::abs(b3[v_q1]) / ( CGAL::abs(b3[v_p1]) + CGAL::abs(b3[v_q1]) );
+      coord2 = CGAL::abs(b3[v_q2]) / ( CGAL::abs(b3[v_p2]) + CGAL::abs(b3[v_q2]) ); 
+    }
+
+  if ( tag_order == Ridge_order_3 ) {
+    Vector_3 r1 = CGAL::barycenter(get(vpm, v_p1), coord1, get(vpm, v_q1)) - ORIGIN,
+             r2 = CGAL::barycenter(get(vpm,v_p2), coord2, get(vpm,v_q2)) - ORIGIN; 
+    //identify the 3 different vertices v_p1, v_q1 and v3 = v_p2 or v_q2
+    vertex_descriptor v3;
+    if (v_p2 == v_p1 || v_p2 == v_q1) v3 = v_q2;
+    else v3 = v_p2;
+
+    int b_sign = b_sign_pointing_to_ridge(v_p1, v_q1, v3, r1, r2, color); 
+
+    if (color == MAX_RIDGE) 
+      if (b_sign == 1) return true; 
+      else return false;
+    else if (b_sign == -1) return true; 
+      else return false;
+  }
+  else {//tag_order == Ridge_order_4, check the sign of the meanvalue of the signs
+    //      of Pi at the two crossing points
+    FT sign_P;
+    if (color == MAX_RIDGE) 
+      sign_P =  P1[v_p1]*coord1 + P1[v_q1]*(1-coord1) 
+	+ P1[v_p2]*coord2 + P1[v_q2]*(1-coord2);
+    else sign_P =  P2[v_p1]*coord1 + P2[v_q1]*(1-coord1) 
+	+ P2[v_p2]*coord2 + P2[v_q2]*(1-coord2);
+
+    if ( sign_P < 0 ) return true; else return false;
+  }
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+int Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+b_sign_pointing_to_ridge(const vertex_descriptor v1, 
+                         const vertex_descriptor v2,
+                         const vertex_descriptor v3,
+                         const Vector_3 r1, const Vector_3 r2, 
+                         const Ridge_interrogation_type color)
+{
+  Vector_3 r = r2 - r1, dv1, dv2, dv3;
+  FT bv1, bv2, bv3;
+  if ( color == MAX_RIDGE ) {
+    bv1 = b0[v1];
+    bv2 = b0[v2];
+    bv3 = b0[v3];
+    dv1 = d1[v1];
+    dv2 = d1[v2];
+    dv3 = d1[v3];
+  }
+  else {
+    bv1 = b3[v1];
+    bv2 = b3[v2];
+    bv3 = b3[v3];
+    dv1 = d2[v1];
+    dv2 = d2[v2];
+    dv3 = d2[v3];    
+  }
+  if ( r != CGAL::NULL_VECTOR ) r = r/CGAL::sqrt(r*r);
+  FT sign1, sign2, sign3;
+  sign1 = bv1*(r1 - (get(vpm, v1)-ORIGIN) + (((get(vpm, v1)-ORIGIN)-r1)*r)*r )*dv1;
+  sign2 = bv2*(r1 - (get(vpm, v2)-ORIGIN) + (((get(vpm, v2)-ORIGIN)-r1)*r)*r )*dv2;
+  sign3 = bv3*(r1 - (get(vpm, v3)-ORIGIN) + (((get(vpm, v3)-ORIGIN)-r1)*r)*r )*dv3;
+  
+  int compt = 0;
+  if ( sign1 > 0 ) compt++; else if (sign1 < 0) compt--;
+  if ( sign2 > 0 ) compt++; else if (sign2 < 0) compt--;
+  if ( sign3 > 0 ) compt++; else if (sign3 < 0) compt--;
+  
+  if (compt > 0) return 1; else return -1;
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+void Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+init_ridge_line(Ridge_line* ridge_line, 
+		const halfedge_descriptor h1, 
+		const halfedge_descriptor h2, 
+		const Ridge_type r_type)
+{
+  ridge_line->line_type() = r_type;
+  ridge_line->line()->push_back(Ridge_halfhedge(h1, bary_coord(h1,r_type)));
+  addback(ridge_line, h2, r_type);
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+void Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+addback(Ridge_line* ridge_line, const halfedge_descriptor he,
+	const Ridge_type r_type)
+{
+  halfedge_descriptor he_cur = ( --(ridge_line->line()->end()) )->first;
+  FT coord_cur = ( --(ridge_line->line()->end()) )->second;//bary_coord(he_cur);
+  FT coord = bary_coord(he,r_type);
+  vertex_descriptor v_p = target(opposite(he,P),P), v_q = target(he,P),
+    v_p_cur = target(opposite(he_cur,P),P), v_q_cur = target(he_cur,P); // he: p->q
+  Vector_3 segment = CGAL::barycenter(get(vpm, v_p), coord, get(vpm, v_q)) -
+                     CGAL::barycenter(get(vpm, v_p_cur), coord_cur, get(vpm, v_q_cur));
+
+  FT k1x, k2x; //abs value of the ppal curvatures at the Xing point on he.
+  FT k_second = 0; // abs value of the second derivative of the curvature
+               // along the line of curvature
+  k1x = CGAL::abs(k1[v_p]) * coord + CGAL::abs(k1[v_q]) * (1-coord) ;   
+  k2x = CGAL::abs(k2[v_p]) * coord + CGAL::abs(k2[v_q]) * (1-coord) ;   
+
+  if ( (ridge_line->line_type() == MAX_ELLIPTIC_RIDGE) 
+       || (ridge_line->line_type() == MAX_HYPERBOLIC_RIDGE) 
+       || (ridge_line->line_type() == MAX_CREST_RIDGE) ) {
+    ridge_line->strength() += k1x * CGAL::sqrt(segment * segment); 
+    if (tag_order == Ridge_order_4) { 
+      if (k1x != k2x) 
+	k_second =CGAL::abs(( CGAL::abs(P1[v_p]) * coord + CGAL::abs(P1[v_q]) * (1-coord) )/(k1x-k2x));
+      ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
+  }
+  if ( (ridge_line->line_type() == MIN_ELLIPTIC_RIDGE) 
+       || (ridge_line->line_type() == MIN_HYPERBOLIC_RIDGE) 
+       || (ridge_line->line_type() == MIN_CREST_RIDGE) ) {
+   ridge_line->strength() += k2x * CGAL::sqrt(segment * segment); 
+   if (tag_order == Ridge_order_4) {
+     if (k1x != k2x) 
+       k_second =CGAL::abs(( CGAL::abs(P2[v_p]) * coord + CGAL::abs(P2[v_q]) * (1-coord) )/(k1x-k2x));
+     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
+   } 
+  ridge_line->line()->push_back( Ridge_halfhedge(he, coord));
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+void Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap  >::
+addfront(Ridge_line* ridge_line, 
+	 const halfedge_descriptor he, 
+	 const Ridge_type r_type)
+{
+  halfedge_descriptor he_cur = ( ridge_line->line()->begin() )->first;
+  FT coord_cur = ( ridge_line->line()->begin() )->second;
+  FT coord = bary_coord(he,r_type);
+  vertex_descriptor v_p = target(opposite(he,P),P), v_q = target(he,P),
+    v_p_cur = target(opposite(he_cur,P),P), v_q_cur = target(he_cur,P); // he: p->q
+  Vector_3 segment = CGAL::barycenter(get(vpm, v_p), coord, get(vpm, v_q)) -
+                     CGAL::barycenter(get(vpm, v_p_cur), coord_cur, get(vpm, v_q_cur));
+
+  FT k1x, k2x; //abs value of the ppal curvatures at the Xing point on he.
+  FT k_second = 0.; // abs value of the second derivative of the curvature
+               // along the line of curvature
+  k1x = CGAL::abs(k1[v_p]) * coord + CGAL::abs(k1[v_q]) * (1-coord) ;   
+  k2x = CGAL::abs(k2[v_p]) * coord + CGAL::abs(k2[v_q]) * (1-coord) ;   
+
+  if ( (ridge_line->line_type() == MAX_ELLIPTIC_RIDGE) 
+       || (ridge_line->line_type() == MAX_HYPERBOLIC_RIDGE) 
+       || (ridge_line->line_type() == MAX_CREST_RIDGE) ) {
+    ridge_line->strength() += k1x * CGAL::sqrt(segment * segment); 
+   if (tag_order == Ridge_order_4) {
+     if (k1x != k2x) 
+       k_second =CGAL::abs(( CGAL::abs(P1[v_p]) * coord + CGAL::abs(P1[v_q]) * (1-coord) )/(k1x-k2x));
+     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
+  }
+  if ( (ridge_line->line_type() == MIN_ELLIPTIC_RIDGE) 
+       || (ridge_line->line_type() == MIN_HYPERBOLIC_RIDGE) 
+       || (ridge_line->line_type() == MIN_CREST_RIDGE) ) {
+   ridge_line->strength() += k2x * CGAL::sqrt(segment * segment); 
+   if (tag_order == Ridge_order_4) {
+     if (k1x != k2x) 
+       k_second =CGAL::abs(( CGAL::abs(P2[v_p]) * coord + CGAL::abs(P2[v_q]) * (1-coord) )/(k1x-k2x));
+     ridge_line->sharpness() += k_second * CGAL::sqrt(segment * segment) * squared_model_size; }
+   } 
+  ridge_line->line()->push_front( Ridge_halfhedge(he, coord));
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap > 
+typename Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap>::FT 
+Ridge_approximation< TriangleMesh, VertexFTMap , VertexVectorMap>::
+bary_coord(const halfedge_descriptor he, const Ridge_type r_type)
+{
+  FT b_p = 0., b_q = 0.; // extremalities at p and q for he: p->q
+  if ( (r_type == MAX_ELLIPTIC_RIDGE) 
+       || (r_type == MAX_HYPERBOLIC_RIDGE) 
+       || (r_type == MAX_CREST_RIDGE) ) {
+    b_p = b0[target(opposite(he,P),P)];
+    b_q = b0[target(he,P)];    
+  }
+  if ( (r_type == MIN_ELLIPTIC_RIDGE) 
+       || (r_type == MIN_HYPERBOLIC_RIDGE) 
+       || (r_type == MIN_CREST_RIDGE) ) {
+    b_p = b3[target(opposite(he,P),P)];
+    b_q = b3[target(he,P)];    
+  }
+  //denominator cannot be 0 since there is no crossing when both extremalities are 0
+  return CGAL::abs(b_q) / ( CGAL::abs(b_q) + CGAL::abs(b_p) );
+}
+  
+
+//---------------------------------------------------------------------------
+//Global functions
+//--------------------------------------------------------------------------
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap,
+           class OutputIterator>
+OutputIterator compute_max_ridges(const TriangleMesh &P,
+                                  const VertexFTMap& vertex2k1_pm, 
+                                  const VertexFTMap& vertex2k2_pm,
+                                  const VertexFTMap& vertex2b0_pm, 
+                                  const VertexFTMap& vertex2b3_pm,
+                                  const VertexVectorMap& vertex2d1_pm, 
+                                  const VertexVectorMap& vertex2d2_pm,
+                                  const VertexFTMap& vertex2P1_pm, 
+                                  const VertexFTMap& vertex2P2_pm,
+                                  OutputIterator it, 
+                                  Ridge_order order = Ridge_order_3)
+{
+  typedef Ridge_approximation < TriangleMesh, 
+                                VertexFTMap, VertexVectorMap > Ridge_approximation;
+  
+  Ridge_approximation ridge_approximation(P, 
+					  vertex2k1_pm, vertex2k2_pm,
+					  vertex2b0_pm, vertex2b3_pm,
+					  vertex2d1_pm, vertex2d2_pm,
+					  vertex2P1_pm, vertex2P2_pm );
+  return ridge_approximation.compute_max_ridges(it, order);  
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap,
+           class OutputIterator>
+OutputIterator compute_min_ridges(const TriangleMesh &P,
+                                  const VertexFTMap& vertex2k1_pm, 
+                                  const VertexFTMap& vertex2k2_pm,
+                                  const VertexFTMap& vertex2b0_pm, 
+                                  const VertexFTMap& vertex2b3_pm,
+                                  const VertexVectorMap& vertex2d1_pm, 
+                                  const VertexVectorMap& vertex2d2_pm,
+                                  const VertexFTMap& vertex2P1_pm, 
+                                  const VertexFTMap& vertex2P2_pm,
+                                  OutputIterator it, 
+                                  Ridge_order order = Ridge_order_3)
+{
+  typedef Ridge_approximation < TriangleMesh, 
+                                VertexFTMap, VertexVectorMap > Ridge_approximation;
+  
+  Ridge_approximation ridge_approximation(P, 
+					  vertex2k1_pm, vertex2k2_pm,
+					  vertex2b0_pm, vertex2b3_pm,
+					  vertex2d1_pm, vertex2d2_pm,
+					  vertex2P1_pm, vertex2P2_pm );
+  return ridge_approximation.compute_min_ridges(it, order);  
+}
+
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap,
+           class OutputIterator>
+OutputIterator compute_crest_ridges(const TriangleMesh &P,
+				    const VertexFTMap& vertex2k1_pm, 
+				    const VertexFTMap& vertex2k2_pm,
+				    const VertexFTMap& vertex2b0_pm, 
+				    const VertexFTMap& vertex2b3_pm,
+				    const VertexVectorMap& vertex2d1_pm, 
+				    const VertexVectorMap& vertex2d2_pm,
+				    const VertexFTMap& vertex2P1_pm, 
+				    const VertexFTMap& vertex2P2_pm,
+				    OutputIterator it, 
+				    Ridge_order order = Ridge_order_3)
+{
+  typedef Ridge_approximation < TriangleMesh, 
+                                VertexFTMap, VertexVectorMap > Ridge_approximation;
+  
+  Ridge_approximation ridge_approximation(P, 
+					  vertex2k1_pm, vertex2k2_pm,
+					  vertex2b0_pm, vertex2b3_pm,
+					  vertex2d1_pm, vertex2d2_pm,
+					  vertex2P1_pm, vertex2P2_pm );
+  return ridge_approximation.compute_crest_ridges(it, order);  
+}
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Robust_circumcenter_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Robust_circumcenter_filtered_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Robust_circumcenter_filtered_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Robust_circumcenter_filtered_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Robust_circumcenter_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Robust_circumcenter_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Robust_circumcenter_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Robust_circumcenter_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Robust_construction.h b/3rdparty/CGAL-4.8/include/CGAL/Robust_construction.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Robust_construction.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Robust_construction.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Root_for_circles_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/Root_for_circles_2_2.h
new file mode 100644
index 0000000..cdd4a51
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Root_for_circles_2_2.h
@@ -0,0 +1,137 @@
+// Copyright (c) 2003-2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Monique Teillaud, Sylvain Pion
+
+// Partially supported by the IST Programme of the EU as a Shared-cost
+// RTD (FET Open) Project under Contract No  IST-2000-26473 
+// (ECG - Effective Computational Geometry for Curves and Surfaces) 
+// and a STREP (FET Open) Project under Contract No  IST-006413 
+// (ACS -- Algorithms for Complex Shapes)
+
+#ifndef CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
+#define CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
+
+#include <iostream>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Root_of_traits.h>
+#include <CGAL/Handle_for.h>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+
+template < typename RT_ >
+class Root_for_circles_2_2 {
+
+  typedef RT_                                                              RT;
+  typedef typename Root_of_traits< RT >::RootOf_2    Root_of_2;
+  typedef typename Root_of_traits< RT >::RootOf_1    FT;
+
+  private:
+    Handle_for<Root_of_2> x_;
+    Handle_for<Root_of_2> y_;
+    
+  public:
+  Root_for_circles_2_2(){}
+  
+  Root_for_circles_2_2(const Root_of_2& r1, const Root_of_2& r2)
+    : x_(r1), y_(r2)
+  {
+    // When it is an interval this assertion dont compile
+    //CGAL_assertion((r1.is_rational() || r2.is_rational()) || 
+    //               (r1.gamma() == r2.gamma()));
+  }
+
+  const Root_of_2& x() const 
+  { return get_pointee_or_identity(x_); }
+    
+  const Root_of_2& y() const 
+  { return get_pointee_or_identity(y_); }
+
+  CGAL::Bbox_2 bbox() const
+  {
+    CGAL::Interval_nt<> 
+     ix=to_interval(x()),
+     iy=to_interval(y());
+    return CGAL::Bbox_2(ix.inf(),iy.inf(),
+	                ix.sup(),iy.sup());
+    /*
+      const Root_of_2 &ox = x();
+      const Root_of_2 &oy = y();
+
+      if(ox.is_rational() || oy.is_rational()) {
+        CGAL::Interval_nt<> 
+          ix=to_interval(ox),
+          iy=to_interval(oy);
+        return CGAL::Bbox_2(ix.inf(),iy.inf(),
+	                ix.sup(),iy.sup());
+      }
+
+      // delta must be the same
+      // WE HAVE TO TEST THE EXECUTION TIME
+      // IT STILL NOT POSSIBLE BECAUSE OF THE 
+      // PROBLEM ON THE ARRANGEMENT
+      // (it is very likely to make it better with this changing)
+      const CGAL::Interval_nt<true> alpha1 = to_interval(ox.alpha());
+      const CGAL::Interval_nt<true> beta1 = to_interval(ox.beta());
+      const CGAL::Interval_nt<true> alpha2 = to_interval(oy.alpha());
+      const CGAL::Interval_nt<true> beta2 = to_interval(oy.beta());
+      const CGAL::Interval_nt<true> g = to_interval(ox.gamma());
+      const CGAL::Interval_nt<true> sqrtg = CGAL::sqrt(g);
+      const CGAL::Interval_nt<true> ix = alpha1 + beta1 * sqrtg;
+      const CGAL::Interval_nt<true> iy = alpha2 + beta2 * sqrtg;
+      return CGAL::Bbox_2(ix.inf(),iy.inf(),
+	                ix.sup(),iy.sup());
+    */
+  }
+
+  template < typename RT >
+  friend bool operator == ( const Root_for_circles_2_2<RT>& r1,
+   	                    const Root_for_circles_2_2<RT>& r2 );
+
+};
+  
+template < typename RT >
+bool 
+operator == ( const Root_for_circles_2_2<RT>& r1,
+	      const Root_for_circles_2_2<RT>& r2 )
+{ if (CGAL::identical(r1.x_, r2.x_) && CGAL::identical(r1.y_, r2.y_))
+	  return true;
+  return (r1.x() == r2.x()) && (r1.y() == r2.y()); 
+}
+
+template < typename RT >
+std::ostream &
+operator<<(std::ostream & os, const Root_for_circles_2_2<RT> &r)
+{ return os << r.x() << " " << r.y() << " "; }
+
+template < typename RT >
+std::istream &
+operator>>(std::istream & is, Root_for_circles_2_2<RT> &r)
+{
+  typedef typename Root_of_traits< RT >::RootOf_2         Root_of_2;
+  Root_of_2 x,y;
+  
+  is >> x >> y;
+  if(is)
+    r = Root_for_circles_2_2<RT>(x,y);
+  return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_ROOT_FOR_CIRCLES_2_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Root_for_spheres_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/Root_for_spheres_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Root_for_spheres_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Root_for_spheres_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Root_of_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Root_of_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Root_of_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Root_of_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Root_of_traits_specializations.h b/3rdparty/CGAL-4.8/include/CGAL/Root_of_traits_specializations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Root_of_traits_specializations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Root_of_traits_specializations.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Rotational_sweep_visibility_2.h b/3rdparty/CGAL-4.8/include/CGAL/Rotational_sweep_visibility_2.h
new file mode 100644
index 0000000..46b34a4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Rotational_sweep_visibility_2.h
@@ -0,0 +1,935 @@
+// Copyright (c) 2013 Technical University Braunschweig (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s):  Kan Huang <huangkandiy at gmail.com>
+//
+
+#ifndef CGAL_ROTATIONAL_SWEEP_VISIBILITY_2_H
+#define CGAL_ROTATIONAL_SWEEP_VISIBILITY_2_H
+
+#include <CGAL/Visibility_2/visibility_utils.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/bounding_box.h>
+#include <CGAL/assertions.h>
+#include <boost/unordered_map.hpp> 
+#include <iterator>
+
+
+namespace CGAL {
+
+template<class Arrangement_2_ , class RegularizationCategory = CGAL::Tag_true >
+class Rotational_sweep_visibility_2 {
+public:
+  typedef Arrangement_2_                                Arrangement_2;
+  typedef typename Arrangement_2::Traits_2              Traits_2;
+  typedef typename Arrangement_2::Geometry_traits_2     Geometry_traits_2;
+  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
+  typedef typename Arrangement_2::Vertex_handle         Vertex_handle;
+  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
+  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
+  typedef typename Arrangement_2::
+    Ccb_halfedge_const_circulator                 Ccb_halfedge_const_circulator;
+  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  typedef typename Arrangement_2::Face_handle           Face_handle;
+
+  typedef typename Geometry_traits_2::Kernel            K;
+  typedef typename Geometry_traits_2::Point_2           Point_2;
+  typedef typename Geometry_traits_2::Ray_2             Ray_2;
+  typedef typename Geometry_traits_2::Segment_2         Segment_2;
+  typedef typename Geometry_traits_2::Line_2            Line_2;
+  typedef typename Geometry_traits_2::Vector_2          Vector_2;
+  typedef typename Geometry_traits_2::Direction_2       Direction_2;
+  typedef typename Geometry_traits_2::FT                Number_type;
+  typedef typename Geometry_traits_2::Object_2          Object_2;
+
+  typedef RegularizationCategory              Regularization_category;
+  typedef CGAL::Tag_true                      Supports_general_polygon_category;
+  typedef CGAL::Tag_true                      Supports_simple_polygon_category;
+
+private:
+  typedef std::vector<Point_2>                          Points;
+  typedef Vertex_const_handle                           VH;
+  typedef std::vector<VH>                               VHs;
+  typedef Halfedge_const_handle                         EH;
+  typedef std::vector<EH>                               EHs;
+
+  class Less_edge: public std::binary_function<EH, EH, bool> {
+    const Geometry_traits_2* geom_traits;
+  public:
+    Less_edge() {}
+    Less_edge(const Geometry_traits_2* traits):geom_traits(traits) {}
+    bool operator() (const EH e1, const EH e2) const {
+      if (e1 == e2)
+        return false;
+      else {
+         return &(*e1)<&(*e2);
+     }
+// if (e1->source() == e2->source())
+//   return Visibility_2::compare_xy_2(geom_traits,
+//      e1->target()->point(), e2->target()->point()) == SMALLER;
+// else
+//   return Visibility_2::compare_xy_2(geom_traits,
+//      e1->source()->point(), e2->source()->point()) == SMALLER;
+
+    }
+  };
+
+  class Less_vertex: public std::binary_function<VH, VH, bool> {
+    const Geometry_traits_2* geom_traits;
+  public:
+    Less_vertex() {}
+    Less_vertex(const Geometry_traits_2* traits):geom_traits(traits) {}
+    bool operator() (const VH v1, const VH v2) const {
+      if (v1 == v2)
+        return false;
+      else
+        // I know this is dirty but it speeds up by 25%. Michael 
+        return &(*v1)<&(*v2);
+//        return Visibility_2::
+//          compare_xy_2(geom_traits, v1->point(), v2->point()) == SMALLER;
+    }
+  };
+
+  class Closer_edge: public std::binary_function<EH, EH, bool> {
+    const Geometry_traits_2* geom_traits;
+    Point_2 q;
+  public:
+    Closer_edge() {}
+    Closer_edge(const Geometry_traits_2* traits, const Point_2& q) :
+        geom_traits(traits), q(q) {}
+
+    int vtype(const Point_2& c, const Point_2& p) const {
+      switch(Visibility_2::orientation_2(geom_traits, q, c, p)) {
+      case COLLINEAR:
+        if (Visibility_2::less_distance_to_point_2(geom_traits, q, c, p))
+          return 0;
+        else
+          return 3;
+      case RIGHT_TURN:
+        return 1;
+      case LEFT_TURN:
+        return 2;
+      }
+
+      return -1;
+    }
+
+    bool operator() (const EH& e1, const EH& e2) const {
+      if (e1 == e2)
+        return false;
+      const Point_2& s1=e1->source()->point(),
+                     t1=e1->target()->point(),
+                     s2=e2->source()->point(),
+                     t2=e2->target()->point();
+      if (e1->source() == e2->source()) {
+
+        int vt1 = vtype(s1, t1),
+            vt2 = vtype(s1, t2);
+        if (vt1 != vt2)
+          return vt1 > vt2;
+        else
+          return (Visibility_2::orientation_2(geom_traits, s1, t2, t1)==
+                  Visibility_2::orientation_2(geom_traits, s1, t2, q));
+      }
+
+      if (e1->target() == e2->source()) {
+//          const Point_2& p1 = s1,
+//                   p2 = t2,
+//                   c = s2;
+        int vt1 = vtype(t1, s1),
+            vt2 = vtype(t1, t2);
+        if (vt1 != vt2)
+          return vt1 > vt2;
+        else
+          return (Visibility_2::orientation_2(geom_traits, s2, t2, s1)==
+                  Visibility_2::orientation_2(geom_traits, s2, t2, q));
+      }
+
+      if (e1->source() == e2->target()) {
+//            const Point_2& p1 = t1,
+//                     p2 = s2,
+//                     c = s1;
+        int vt1 = vtype(s1, t1),
+            vt2 = vtype(s1, s2);
+        if (vt1 != vt2)
+          return vt1 > vt2;
+        else return (Visibility_2::orientation_2(geom_traits, s1, s2, t1)==
+                     Visibility_2::orientation_2(geom_traits, s1, s2, q));
+      }
+
+      if (e1->target() == e2->target()) {
+//              const Point_2& p1 = s1,
+//                       p2 = s2,
+//                       c = t1;
+        int vt1 = vtype(t1, s1),
+            vt2 = vtype(t1, s2);
+        if (vt1 != vt2)
+          return vt1 > vt2;
+        else return (Visibility_2::orientation_2(geom_traits, t1, s2, s1)==
+                     Visibility_2::orientation_2(geom_traits, t1, s2, q));
+      }
+
+      Orientation e1q = Visibility_2::orientation_2(geom_traits, s1, t1, q);
+      switch (e1q)
+      {
+      case COLLINEAR:
+        if (Visibility_2::collinear(geom_traits, q, s2, t2)) {
+          //q is collinear with e1 and e2.
+          return (Visibility_2::less_distance_to_point_2(geom_traits, q, s1, s2)
+             || Visibility_2::less_distance_to_point_2(geom_traits, q, t1, t2));
+        }
+        else {
+          //q is collinear with e1 not with e2.
+          if (Visibility_2::collinear(geom_traits, s2, t2, s1))
+            return (Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                    == Visibility_2::orientation_2(geom_traits, s2, t2, t1));
+          else
+            return (Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                    == Visibility_2::orientation_2(geom_traits, s2, t2, s1));
+        }
+      case RIGHT_TURN:
+        switch (Visibility_2::orientation_2(geom_traits, s1, t1, s2)) {
+        case COLLINEAR:
+          return Visibility_2::orientation_2(geom_traits, s1, t1, t2)!=e1q;
+        case RIGHT_TURN:
+          if (Visibility_2::orientation_2(geom_traits, s1, t1, t2) == LEFT_TURN)
+            return Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                == Visibility_2::orientation_2(geom_traits, s2, t2, s1);
+          else
+            return false;
+        case LEFT_TURN:
+          if(Visibility_2::orientation_2(geom_traits, s1, t1, t2) == RIGHT_TURN)
+            return Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                == Visibility_2::orientation_2(geom_traits, s2, t2, s1);
+          else
+            return true;
+        }
+      case LEFT_TURN:
+        switch (Visibility_2::orientation_2(geom_traits, s1, t1, s2)) {
+        case COLLINEAR:
+          return Visibility_2::orientation_2(geom_traits, s1, t1, t2)!=e1q;
+        case LEFT_TURN:
+          if(Visibility_2::orientation_2(geom_traits, s1, t1, t2) == RIGHT_TURN)
+            return Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                == Visibility_2::orientation_2(geom_traits, s2, t2, s1);
+          else
+            return false;
+        case RIGHT_TURN:
+          if (Visibility_2::orientation_2(geom_traits, s1, t1, t2) == LEFT_TURN)
+            return Visibility_2::orientation_2(geom_traits, s2, t2, q)
+                == Visibility_2::orientation_2(geom_traits, s2, t2, s1);
+          else
+            return true;
+        }
+      }
+
+      return false;
+    }
+
+  };
+  
+  const Arrangement_2 *p_arr;
+  const Geometry_traits_2 *geom_traits;
+
+
+  mutable Point_2 q;                               //query point
+  mutable Points polygon;                          //visibility polygon
+
+  mutable std::map<VH, EHs, Less_vertex> incident_edges;
+
+  mutable std::map<EH, int, Less_edge> edx;        //index of active edges in
+                                                   //the heap
+
+  mutable std::set<EH, Closer_edge> active_edges;  //a set of edges that
+                                                   //intersect the current
+                                                   //vision ray.
+
+  mutable VHs vs;                           //angular sorted vertices
+  mutable EHs bad_edges;                    //edges that pass the query point
+  mutable VH  cone_end1;                    //an end of visibility cone
+  mutable VH  cone_end2;                    //another end of visibility cone
+
+  mutable typename Points::size_type cone_end1_idx;
+                                            //index of cone_end1->point() in
+                                            //visibility polygon
+
+  mutable typename Points::size_type cone_end2_idx;
+                                            //index of cone_end2->point() in
+                                            //visibility polygon
+
+  mutable bool is_vertex_query;
+  mutable bool is_edge_query;
+  mutable bool is_face_query;
+  mutable bool is_big_cone;               //whether the angle of
+                                          //visibility_cone is greater than pi.
+
+public:
+  Rotational_sweep_visibility_2(): p_arr(NULL), geom_traits(NULL) {}
+  Rotational_sweep_visibility_2(const Arrangement_2& arr): p_arr(&arr) {
+    geom_traits = p_arr->geometry_traits();
+  }
+
+  const std::string name() const { return std::string("R_visibility_2"); }
+  
+  template <typename VARR> 
+  typename VARR::Face_handle 
+  compute_visibility(
+          const Point_2& q, const Halfedge_const_handle e, VARR& arr_out) const
+  {
+    arr_out.clear();
+    bad_edges.clear();
+    this->q = q;
+
+    if (Visibility_2::compare_xy_2(geom_traits, q, e->target()->point())==EQUAL)
+    {
+      is_vertex_query = true;
+      is_edge_query = false;
+      is_face_query = false;
+      cone_end1 = e->source();
+      cone_end2 = e->next()->target();
+      is_big_cone = CGAL::right_turn(cone_end1->point(), q, cone_end2->point());
+
+      typename Arrangement_2::
+                Halfedge_around_vertex_const_circulator first, curr;
+      first = curr = e->target()->incident_halfedges();
+      do {
+        if (curr->face() == e->face())
+          bad_edges.push_back(curr);
+        else if (curr->twin()->face() == e->face())
+          bad_edges.push_back(curr->twin());
+      } while (++curr != first);
+    }
+    else {
+      is_vertex_query = false;
+      is_edge_query = true;
+      is_face_query = false;
+      cone_end1 = e->source();
+      cone_end2 = e->target();
+      bad_edges.push_back(e);
+      is_big_cone = false;
+    }
+    visibility_region_impl(e->face(), q);
+
+    //decide which inside of the visibility butterfly is needed.
+    typename Points::size_type small_idx, big_idx;
+    if ( cone_end1_idx < cone_end2_idx ) {
+      small_idx = cone_end1_idx;
+      big_idx = cone_end2_idx;
+    }
+    else {
+      small_idx = cone_end2_idx;
+      big_idx = cone_end1_idx;
+    }
+    typename Points::size_type next_idx = small_idx + 1;
+    bool is_between;
+    //indicate whether the shape between small_idx and big_idx is the visibility
+    //region required.
+    if (CGAL::right_turn(cone_end1->point(), q, cone_end2->point())) {
+      is_between = false;
+      while (next_idx != big_idx) {
+        if (CGAL::left_turn(cone_end1->point(), q, polygon[next_idx]) ||
+            CGAL::left_turn(q, cone_end2->point(), polygon[next_idx]))
+        {
+          is_between = true;
+          break;
+        }
+        next_idx++;
+      }
+    }
+    else {
+      is_between = true;
+      while (next_idx != big_idx) {
+        if (CGAL::right_turn(cone_end1->point(), q, polygon[next_idx]) ||
+            CGAL::right_turn(q, cone_end2->point(), polygon[next_idx]))
+        {
+          is_between = false;
+          break;
+        }
+        next_idx++;
+      }
+    }
+
+    typename Points::iterator first = polygon.begin();
+    std::advance(first, small_idx);
+    typename Points::iterator last = polygon.begin();
+    std::advance(last, big_idx);
+
+    if (is_between) {
+      Points polygon_out(first, last+1);
+      if (is_vertex_query)
+        polygon_out.push_back(q);
+      Visibility_2::report_while_handling_needles<Rotational_sweep_visibility_2>
+        (geom_traits, q, polygon_out, arr_out);
+    }
+    else {
+      Points polygon_out(polygon.begin(), first+1);
+      if (is_vertex_query) polygon_out.push_back(q);
+      for (typename Points::size_type i = big_idx; i != polygon.size(); i++) {
+        polygon_out.push_back(polygon[i]);
+      }
+      Visibility_2::report_while_handling_needles<Rotational_sweep_visibility_2>
+        (geom_traits, q, polygon_out, arr_out);
+    }
+
+    Visibility_2::conditional_regularize(arr_out, Regularization_category());
+
+    if (arr_out.faces_begin()->is_unbounded())
+      return ++arr_out.faces_begin();
+    else
+      return arr_out.faces_begin();
+  }
+
+  template <typename VARR> 
+  typename VARR::Face_handle 
+  compute_visibility(
+          const Point_2& q, const Face_const_handle f, VARR& arr_out) const
+  {
+    arr_out.clear();
+    this->q = q;
+    is_vertex_query = false;
+    is_edge_query = false;
+    is_face_query = true;
+
+    visibility_region_impl(f, q);
+
+    Visibility_2::report_while_handling_needles<Rotational_sweep_visibility_2>
+      (geom_traits, q, polygon, arr_out);
+
+    Visibility_2::conditional_regularize(arr_out, Regularization_category());
+
+    if (arr_out.faces_begin()->is_unbounded())
+      return ++arr_out.faces_begin();
+    else
+      return arr_out.faces_begin();
+  }
+
+bool is_attached() const {
+  return (p_arr != NULL);
+}
+
+void attach(const Arrangement_2& arr) {
+  p_arr = &arr;
+  geom_traits = p_arr->geometry_traits();
+}
+
+void detach() {
+  p_arr = NULL;
+  geom_traits = NULL;
+}
+
+const Arrangement_2& arrangement_2() const {
+  return *p_arr;
+}
+
+private:
+  //get the neighbor of v along edge e
+  VH get_neighbor(const EH e, const VH v) const {
+    if (e->source() == v)
+      return e->target();
+    else
+      return e->source();
+  }
+
+  //check whether ray(q->dp) intersects segment(p1, p2)
+  bool do_intersect_ray(const Point_2& q,
+                        const Point_2& dp,
+                        const Point_2& p1,
+                        const Point_2& p2) const
+  {
+    return (CGAL::orientation(q, dp, p1) != CGAL::orientation(q, dp, p2) &&
+            CGAL::orientation(q, p1, dp) == CGAL::orientation(q, p1, p2));
+  }
+
+  //arrange vertices that on a same vision ray in a 'funnel' order
+  void funnel(typename VHs::size_type i, typename VHs::size_type j) const {
+    VHs right, left;
+    //whether the edges incident to a vertex block the left side and right side
+    //of current vision ray.
+    bool block_left(false), block_right(false);
+    VH former = vs[i], nb;
+    for (typename VHs::size_type l=i; l<j; l++) {
+      bool left_v(false), right_v(false), has_predecessor(false);
+        EHs& edges = incident_edges[vs[l]];
+        for (typename EHs::size_type k=0; k<edges.size(); k++) {
+          nb = get_neighbor(edges[k], vs[l]);
+        if ( nb == former )  {
+          has_predecessor = true;
+          break;
+        }
+        if (CGAL::left_turn(q, vs[l]->point(), nb->point()))
+          left_v = true;
+        else
+          right_v = CGAL::right_turn(q, vs[l]->point(), nb->point());
+      }
+      if (has_predecessor) {
+        //if the current vertex connects to the vertex before by an edge,
+        //the vertex before can help it to block.
+        block_left = block_left || left_v;
+        block_right = block_right || right_v;
+      }
+      else {
+        block_left = left_v;
+        block_right = right_v;
+      }
+      if (block_left && block_right) {
+        //when both sides are blocked,
+        //there is no need to change the vertex after.
+        right.push_back(vs[l]);
+        break;
+      }
+      else {
+        if (block_left)
+          left.push_back(vs[l]);
+        else
+          right.push_back(vs[l]);
+      }
+      former = vs[l];
+    }
+    for (typename VHs::size_type l=0; l!=right.size(); l++)
+      vs[i+l] = right[l];
+    for (typename VHs::size_type l=0; l!=left.size(); l++)
+      vs[i+l+right.size()] = left[left.size()-1-l];
+  }
+
+
+
+  void visibility_region_impl(const Face_const_handle f, const Point_2& q) const
+  {
+    vs.clear();
+    polygon.clear();
+    active_edges = std::set<EH, Closer_edge>(Closer_edge(geom_traits, q));
+    incident_edges = std::map<VH, EHs, Less_vertex>(Less_vertex(geom_traits));
+    edx  = std::map<EH, int, Less_edge>(Less_edge(geom_traits));
+
+    EHs relevant_edges; //edges that can affect the visibility of query point.
+    Arrangement_2 bbox;
+    if (is_face_query)
+      input_face(f);
+    else
+      input_face(f, relevant_edges, bbox);
+    //the following code is the initiation of vision ray.
+    //the direction of the initial ray is between the direction from q to last
+    //vertex in vs and positive x-axis. By choosing this direction, we make sure
+    //that all plane is swept and there is not needle at the beginning of
+    //sweeping.
+    Vector_2 dir;
+    if (Direction_2(-1, 0) < Direction_2(Vector_2(q, vs.back()->point())))
+      dir = Vector_2(1, 0) + Vector_2(q, vs.back()->point());
+    else
+      dir = Vector_2(0, -1);
+    Point_2 dp = q + dir;
+
+    //initiation of active_edges. for face queries,
+    //all edges on the boundary can affect visibility.
+    //for non-face queries, only relevant_edges has to be considered.
+    if (is_face_query) {
+      Ccb_halfedge_const_circulator curr = f->outer_ccb();
+      Ccb_halfedge_const_circulator circ = curr;
+      do {
+        if (do_intersect_ray(
+                    q, dp, curr->target()->point(), curr->source()->point()))
+          active_edges.insert(curr);
+
+      } while (++curr != circ);
+
+      typename Arrangement_2::Hole_const_iterator hi;
+      for (hi = f->holes_begin(); hi != f->holes_end(); ++hi) {
+        Ccb_halfedge_const_circulator curr = circ = *hi;
+        do {
+          if (do_intersect_ray(
+                      q, dp, curr->target()->point(), curr->source()->point()))
+            active_edges.insert(curr);
+        } while (++curr != circ);
+      }
+    }
+    else {
+      for (typename EHs::size_type i=0; i!=relevant_edges.size(); i++)
+        if (do_intersect_ray(q, dp, relevant_edges[i]->source()->point(),
+                                    relevant_edges[i]->target()->point()))
+          active_edges.insert(relevant_edges[i]);
+    }
+
+    //angular sweep begins
+//    std::cout<<active_edges.size()<<std::endl;
+    for (typename VHs::size_type i=0; i!=vs.size(); i++) {
+      VH vh = vs[i];
+      EH closest_e = *active_edges.begin();
+      EHs& edges = incident_edges[vh];
+      EHs insert_ehs, remove_ehs;
+      for (typename EHs::size_type j=0; j!=edges.size(); j++) {
+        EH& e = edges[j];
+        if (active_edges.find(e) == active_edges.end())
+          insert_ehs.push_back(e);
+        else
+          remove_ehs.push_back(e);
+      }
+      typename EHs::size_type insert_cnt = insert_ehs.size();
+      typename EHs::size_type remove_cnt = remove_ehs.size();
+      if (insert_cnt == 1 && remove_cnt == 1) {
+        const EH& ctemp_eh = *active_edges.find(remove_ehs.front());
+        EH& temp_eh = const_cast<EH&>(ctemp_eh);
+        temp_eh = insert_ehs.front();
+      }
+      else {
+        for (typename EHs::size_type j=0; j!=remove_cnt; j++)
+          active_edges.erase(remove_ehs[j]);
+        for (typename EHs::size_type j=0; j!=insert_cnt; j++)
+          active_edges.insert(insert_ehs[j]);
+      }
+
+      if (closest_e != *active_edges.begin()) {
+        //when the closest edge changed
+        if (is_face_query) {
+          if (remove_cnt > 0 && insert_cnt > 0) {
+            //some edges are added and some are deleted,
+            //which means the vertex swept is part of visibility polygon.
+            update_visibility(vh->point());
+          }
+          if (remove_cnt == 0 && insert_cnt > 0) {
+            //only add some edges, means the view ray is blocked by new edges.
+            //therefore first add the intersection of view ray and
+            //former closet edge, then add the vertice swept.
+            update_visibility(ray_seg_intersection(q,
+                                                   vh->point(),
+                                                   closest_e->target()->point(),
+                                                   closest_e->source()->point())
+                              );
+            update_visibility(vh->point());
+          }
+          if (remove_cnt > 0 && insert_cnt == 0) {
+            //only delete some edges, means some block is moved and the view ray
+            //can reach the segments after the block.
+            update_visibility(vh->point());
+            update_visibility(
+                ray_seg_intersection(q,
+                                     vh->point(),
+                                     (*active_edges.begin())->target()->point(),
+                                     (*active_edges.begin())->source()->point()
+                                     )
+            );
+          }
+        }
+        else {
+          //extra work here for edge/vertex query is the index of cone_end1 and
+          //cone_end2 will be recorded.
+          if (remove_cnt > 0 && insert_cnt > 0) {
+            //some edges are added and some are deleted,
+            //which means the vertice swept is part of visibility polygon.
+            if (update_visibility(vh->point())) {
+              if (vh == cone_end1)
+                cone_end1_idx = polygon.size()-1;
+              else if (vh == cone_end2)
+                cone_end2_idx = polygon.size()-1;
+            }
+          }
+          if (remove_cnt == 0 && insert_cnt > 0) {
+            //only add some edges, means the view ray is blocked by new edges.
+            //therefore first add the intersection of view ray and former closet
+            //edge, then add the vertice swept.
+            update_visibility(ray_seg_intersection(q,
+                                                   vh->point(),
+                                                   closest_e->target()->point(),
+                                                   closest_e->source()->point())
+                              );
+            if (update_visibility(vh->point())) {
+              if (vh == cone_end1)
+                cone_end1_idx = polygon.size()-1;
+              else if (vh == cone_end2)
+                cone_end2_idx = polygon.size()-1;
+            }
+          }
+          if (remove_cnt > 0 && insert_cnt == 0) {
+            //only delete some edges, means some block is removed and the vision
+            //ray can reach the segments after the block.
+            if (update_visibility(vh->point())) {
+              if (vh == cone_end1)
+                cone_end1_idx = polygon.size()-1;
+              else if (vh == cone_end2)
+                cone_end2_idx = polygon.size()-1;
+            }
+            update_visibility(
+                ray_seg_intersection(q,
+                                     vh->point(),
+                                     (*active_edges.begin())->target()->point(),
+                                     (*active_edges.begin())->source()->point())
+            );
+          }
+        }
+      }
+    }
+  }
+
+  void print_edge(const EH e) const {
+    std::cout << e->source()->point() <<"->"<< e->target()->point() <<std::endl;
+  }
+
+  //compute the intersection of ray(q->dp) and segment(s, t)
+  //if they are collinear then return the endpoint which is closer to q.
+
+  Point_2 ray_seg_intersection(
+      const Point_2& q, const Point_2& dp,  // the ray
+      const Point_2& s, const Point_2& t)   // the segment
+  const
+  {
+    if (CGAL::collinear(q, dp, s)) {
+      if (CGAL::collinear(q, dp, t)) {
+        if (CGAL::compare_distance_to_point(q, s, t)==CGAL::SMALLER)
+          return s;
+        else
+          return t;
+      }
+      else
+        return s;
+    }
+    Ray_2 ray(q,dp);
+    Segment_2 seg(s,t);
+    CGAL::Object result = CGAL::intersection(ray, seg);
+    return *(CGAL::object_cast<Point_2>(&result));
+  }
+
+  //check if p has been discovered before, if not update the visibility polygon
+  bool update_visibility(const Point_2& p) const {
+    if (polygon.empty()) {
+      polygon.push_back(p);
+      return true;
+    }
+    else if (Visibility_2::compare_xy_2(geom_traits, polygon.back(), p)
+             != EQUAL)
+    {
+      polygon.push_back(p);
+      return true;
+    }
+    return false;
+  }
+
+  //functor to decide which vertex is swept earlier by the rotational sweeping
+  //ray
+  class Is_swept_earlier:public std::binary_function<VH, VH, bool> {
+    const Point_2& q;
+    const Geometry_traits_2* geom_traits;
+  public:
+    Is_swept_earlier(const Point_2& q, const Geometry_traits_2* traits) :
+        q(q), geom_traits(traits) {}
+
+    bool operator() (const VH v1, const VH v2) const {
+      const Point_2& p1 = v1->point();
+      const Point_2& p2 = v2->point();
+      int qua1 = quadrant(q, p1);
+      int qua2 = quadrant(q, p2);
+      if (qua1 < qua2)
+        return true;
+      if (qua1 > qua2)
+        return false;
+      if (collinear(q, p1, p2))
+        return (CGAL::compare_distance_to_point(q, p1, p2) == CGAL::SMALLER);
+      else
+        return CGAL::right_turn(p1, q, p2);
+    }
+
+    //return the quadrant of p with respect to o.
+    int quadrant(const Point_2& o, const Point_2& p) const {
+      typename Geometry_traits_2::Compare_x_2 compare_x =
+                geom_traits->compare_x_2_object();
+
+      typename Geometry_traits_2::Compare_y_2 compare_y =
+                geom_traits->compare_y_2_object();
+
+      Comparison_result dx = compare_x(p, o);
+      Comparison_result dy = compare_y(p, o);
+      if (dx==LARGER && dy!=SMALLER)
+        return 1;
+      if (dx!=LARGER && dy==LARGER)
+        return 2;
+      if (dx==SMALLER && dy!=LARGER)
+        return 3;
+      if (dx!=SMALLER && dy==SMALLER)
+        return 4;
+      return 0;
+    }
+  };
+
+  //when the query point is in face, every edge is good.
+  void input_neighbor_f( const Halfedge_const_handle e) const {
+    VH v = e->target();
+    if (!incident_edges.count(v))
+      vs.push_back(v);
+    incident_edges[v].push_back(e);
+    incident_edges[v].push_back(e->next());
+  }
+
+  //check if p is in the visibility cone
+  bool is_in_cone(const Point_2& p) const{
+    if (is_big_cone)
+      return (!CGAL::right_turn(cone_end1->point(), q, p)) ||
+              (!CGAL::left_turn(cone_end2->point(), q, p));
+    else
+      return (!CGAL::right_turn(cone_end1->point(), q, p)) &&
+              (!CGAL::left_turn(cone_end2->point(), q, p));
+  }
+
+  //for vertex and edge query: the visibility is limited in a cone.
+  void input_edge(const Halfedge_const_handle e,
+                  EHs& good_edges) const {
+    for (typename EHs::size_type i = 0; i < bad_edges.size(); i++)
+      if (e == bad_edges[i])
+        return;
+    VH v1 = e->target();
+    VH v2 = e->source();
+    //an edge will affect visibility only if it has an endpoint in the
+    //visibility cone or it crosses the boundary of the cone.
+    if (is_in_cone(v1->point()) || is_in_cone(v2->point()) ||
+            do_intersect_ray(q, cone_end1->point(), v1->point(), v2->point()))
+    {
+      good_edges.push_back(e);
+      if (!incident_edges.count(v1))
+        vs.push_back(v1);
+      incident_edges[v1].push_back(e);
+      if (!incident_edges.count(v2))
+        vs.push_back(v2);
+      incident_edges[v2].push_back(e);
+    }
+  }
+
+  //for face query: traverse the face to get all edges
+  //and sort vertices in counter-clockwise order.
+  void input_face (Face_const_handle fh) const
+  {
+    Ccb_halfedge_const_circulator curr = fh->outer_ccb();
+    Ccb_halfedge_const_circulator circ = curr;
+    do {
+      CGAL_assertion(curr->face() == fh);
+      input_neighbor_f(curr);
+    } while (++curr != circ);
+
+    typename Arrangement_2::Hole_const_iterator hi;
+    for (hi = fh->holes_begin(); hi != fh->holes_end(); ++hi) {
+      Ccb_halfedge_const_circulator curr = *hi, circ = *hi;
+      do {
+        CGAL_assertion(curr->face() == fh);
+        input_neighbor_f(curr);
+      } while (++curr != circ);
+    }
+
+    std::sort(vs.begin(), vs.end(), Is_swept_earlier(q, geom_traits));
+
+    for (typename VHs::size_type i=0; i!=vs.size(); i++) {
+      typename VHs::size_type j = i+1;
+      while (j != vs.size()) {
+        if (!CGAL::collinear(q, vs[i]->point(), vs[j]->point()))
+          break;
+        j++;
+      }
+      if (j-i>1)
+        funnel(i, j);
+      i = j-1;
+    }
+  }
+  //for vertex or edge query: traverse the face to get all edges
+  //and sort vertices in counter-clockwise order.
+  void input_face (Face_const_handle fh,
+                   EHs& good_edges,
+                   Arrangement_2& bbox) const
+  {
+    Ccb_halfedge_const_circulator curr = fh->outer_ccb();
+    Ccb_halfedge_const_circulator circ = curr;
+    do {
+      CGAL_assertion(curr->face() == fh);
+      input_edge(curr, good_edges);
+    } while (++curr != circ);
+
+    typename Arrangement_2::Hole_const_iterator hi;
+    for (hi = fh->holes_begin(); hi != fh->holes_end(); ++hi) {
+      Ccb_halfedge_const_circulator curr = circ = *hi;
+      do {
+        CGAL_assertion(curr->face() == fh);
+        input_edge(curr, good_edges);
+      } while (++curr != circ);
+    }
+
+    //create a box that cover all vertices such that during the sweeping,
+    //the vision ray will always intersect at least an edge.
+    //this box doesn't intersect any relevant_edge.
+    Points points;
+    for (typename VHs::size_type i=0; i<vs.size(); i++) {
+      points.push_back(vs[i]->point());
+    }
+    points.push_back(q);
+    //first get the bounding box of all relevant points.
+    typename Geometry_traits_2::Iso_rectangle_2 bb =
+                                    bounding_box(points.begin(), points.end());
+
+    Number_type xmin, xmax, ymin, ymax;
+    typename Geometry_traits_2::Compute_x_2 compute_x =
+                                            geom_traits->compute_x_2_object();
+
+    typename Geometry_traits_2::Compute_y_2 compute_y =
+                                            geom_traits->compute_y_2_object();
+
+    //make the box a little bigger than bb so that it won't intersect any
+    //relevant_edge.
+    xmin = compute_x((bb.min)())-1;
+    ymin = compute_y((bb.min)())-1;
+    xmax = compute_x((bb.max)())+1;
+    ymax = compute_y((bb.max)())+1;
+    Point_2 box[4] = {Point_2(xmin, ymin), Point_2(xmax, ymin),
+                      Point_2(xmax, ymax), Point_2(xmin, ymax)};
+
+    Halfedge_handle e1 = bbox.insert_in_face_interior(Segment_2(box[0], box[1]),
+                                                      bbox.unbounded_face());
+
+    Halfedge_handle e2 = bbox.insert_from_left_vertex(Segment_2(box[1], box[2]),
+                                                      e1->target());
+
+    Halfedge_handle e3 = bbox.insert_from_right_vertex(Segment_2(box[2],box[3]),
+                                                       e2->target());
+
+    bbox.insert_at_vertices(Segment_2(box[0], box[3]),
+                            e1->source(), e3->target());
+
+    circ = curr = e1->face()->outer_ccb();
+    do {
+      VH v = curr->target();
+      vs.push_back(v);
+      incident_edges[v].push_back(curr);
+      incident_edges[v].push_back(curr->next());
+      good_edges.push_back(curr);
+    } while(++curr != circ);
+
+    std::sort(vs.begin(), vs.end(), Is_swept_earlier(q, geom_traits));
+
+    for (typename VHs::size_type i=0; i!=vs.size(); i++) {
+      typename VHs::size_type j = i+1;
+      while (j != vs.size()) {
+        if (!CGAL::collinear(q, vs[i]->point(), vs[j]->point()))
+          break;
+        j++;
+      }
+      if (j-i>1)
+        funnel(i, j);
+      i = j-1;
+    }
+  }
+
+};
+} // end namespace CGAL
+
+
+
+#endif
+
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Runge_kutta_integrator_2.h b/3rdparty/CGAL-4.8/include/CGAL/Runge_kutta_integrator_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Runge_kutta_integrator_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Runge_kutta_integrator_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scalar_factor_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Scalar_factor_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Scalar_factor_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Scalar_factor_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h
new file mode 100644
index 0000000..8d9c7aa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h
@@ -0,0 +1,1221 @@
+//Copyright (C) 2014  INRIA - Sophia Antipolis
+//
+//This program is free software: you can redistribute it and/or modify
+//it under the terms of the GNU General Public License as published by
+//the Free Software Foundation, either version 3 of the License, or
+//(at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//GNU General Public License for more details.
+//
+//You should have received a copy of the GNU General Public License
+//along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+// Author(s):      Thijs van Lankveld
+
+#ifndef CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
+#define CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
+
+//#include <omp.h>
+#ifdef CGAL_LINKED_WITH_TBB
+#include "tbb/blocked_range.h"
+#include "tbb/parallel_for.h"
+#endif // CGAL_LINKED_WITH_TBB
+
+#include <sstream>
+#include <fstream>
+
+#include <boost/function_output_iterator.hpp>
+#include <boost/lexical_cast.hpp>
+#include <string>
+
+#include <CGAL/Mesh_3/dihedral_angle_3.h>
+
+
+namespace CGAL {
+
+  
+template < class Gt, class FS, class wA, class Ct >
+class
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+Finite_point_iterator: public Finite_vertices_iterator {
+    typedef Finite_vertices_iterator    Base;
+    typedef Finite_point_iterator       Self;
+
+public:
+    Finite_point_iterator(): Base() {}
+    Finite_point_iterator( const Base& b ): Base(b) {}
+
+    operator Point&() const { return this->point(); }
+}; // class Finite_point_iterator
+
+
+template < class Gt, class FS, class wA, class Ct >
+class
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+In_surface_tester {
+    const Shape* _s;
+
+public:
+    In_surface_tester() {}
+    In_surface_tester( const Shape* s ): _s(s) {}
+
+    inline bool operator()( const Cell_iterator& /* c */ ) const {
+        return false;
+    }
+
+    inline bool operator()( const Edge_iterator& e ) const {
+        typename Shape::Classification_type cl = _s->classify( e );
+        return cl == Shape::REGULAR || cl == Shape::SINGULAR;
+    }
+
+    inline bool operator()( const Facet_iterator& f ) const {
+        typename Shape::Classification_type cl = _s->classify( f );
+        return cl == Shape::REGULAR || cl == Shape::SINGULAR;
+    }
+
+    inline bool operator()( const Vertex_iterator& v ) const {
+        return !_s->is_infinite( v );
+    }
+}; // In_surface_tester
+
+
+namespace internal {
+  namespace Scale_space {
+
+    struct Inc {
+      unsigned int * i;
+      
+      Inc(unsigned int& i)
+        : i(&i)
+      {}
+      
+      template <typename T>
+      void operator()(const T&) const
+      {
+        ++(*i);
+      }
+      
+    };
+
+    template <typename T>
+    struct operator_less
+    {
+      bool operator() (const T& a, const T& b) const
+      {
+	return &*a < &*b;
+      }
+    };
+
+  }
+}
+
+// Compute the number of neighbors of a point that lie within a fixed radius.
+template < class Gt, class FS, class wA, class Ct >
+class
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+ComputeNN {
+public:
+    typedef std::vector< Point >        Pointset;
+    typedef std::vector< unsigned int >	CountVec;
+
+private:
+    typename Gt::Compare_squared_distance_3 compare;
+
+    const Pointset&     _pts;
+    const Search_tree&  _tree;
+    const FT           _sq_rd;
+    CountVec&           _nn;
+
+public:
+    ComputeNN(const Pointset& points, const Search_tree&  tree,
+              const FT& sq_radius, CountVec& nn)
+      : _pts(points), _tree(tree), _sq_rd(sqrt(sq_radius)), _nn(nn) {}
+    
+#ifdef CGAL_LINKED_WITH_TBB
+    void operator()( const tbb::blocked_range< std::size_t >& range ) const {
+        for( std::size_t i = range.begin(); i != range.end(); ++i )
+            (*this)( i );
+    }
+#endif // CGAL_LINKED_WITH_TBB
+    void operator()( const std::size_t& i ) const {
+
+      Sphere sp(_pts[i], _sq_rd);
+
+      internal::Scale_space::Inc inc(_nn[i]);
+      _tree.search(boost::make_function_output_iterator(inc),sp);
+    }
+}; // class ComputeNN
+
+
+// Advance a point to a coarser scale.
+template < class Gt, class FS, class wA, class Ct >
+class
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+AdvanceSS {
+public:
+    typedef std::vector< Point >            Pointset;
+    typedef std::vector< unsigned int >	    CountVec;
+
+private:
+    const Search_tree&  _tree;
+    const CountVec&     _nn;
+    Pointset&           _pts;
+    
+public:
+    AdvanceSS(const Search_tree& tree, const CountVec& nn, Pointset& points)
+      : _tree(tree), _nn(nn),_pts(points) {}
+    
+#ifdef CGAL_LINKED_WITH_TBB
+    void operator()( const tbb::blocked_range< std::size_t >& range ) const {
+        for( std::size_t i = range.begin(); i != range.end(); ++i )
+            (*this)( i );
+    }
+#endif // CGAL_LINKED_WITH_TBB
+    void operator()( const std::size_t& i ) const {
+        // If the neighborhood is too small, the vertex is not moved.
+        if( _nn[i] < 4 )
+            return;
+
+        Static_search search(_tree, _pts[i], _nn[i]);
+
+	Point barycenter (0., 0., 0.);
+	FT weight_sum = 0.;
+        unsigned int column = 0;
+	// Compute total weight
+        for( typename Static_search::iterator nit = search.begin();
+             nit != search.end() && column < _nn[i];
+             ++nit, ++column )
+	  weight_sum += (1.0 / _nn[boost::get<1>(nit->first)]);
+
+	column = 0;
+	// Compute barycenter
+        for( typename Static_search::iterator nit = search.begin();
+             nit != search.end() && column < _nn[i];
+             ++nit, ++column )
+	  {
+	    Vector v (CGAL::ORIGIN, boost::get<0>(nit->first));
+	    barycenter = barycenter + ((1.0 / _nn[boost::get<1>(nit->first)]) / weight_sum) * v;
+	  }
+	
+	CGAL::cpp11::array<FT, 6> covariance = {{ 0., 0., 0., 0., 0., 0. }};
+	column = 0;
+	// Compute covariance matrix of Weighted PCA
+        for( typename Static_search::iterator nit = search.begin();
+             nit != search.end() && column < _nn[i];
+             ++nit, ++column )
+	  {
+	    Vector v (barycenter, boost::get<0>(nit->first));
+	    FT w = (1.0 / _nn[boost::get<1>(nit->first)]);
+	    v = w*v;
+	    covariance[0] += w * v.x () * v.x ();
+	    covariance[1] += w * v.x () * v.y ();
+	    covariance[2] += w * v.x () * v.z ();
+	    covariance[3] += w * v.y () * v.y ();
+	    covariance[4] += w * v.y () * v.z ();
+	    covariance[5] += w * v.z () * v.z ();
+	  }
+
+        // Compute the weighted least-squares planar approximation of the point set.
+	CGAL::cpp11::array<FT, 9> eigenvectors = {{ 0., 0., 0.,
+						    0., 0., 0.,
+						    0., 0., 0. }};
+	CGAL::cpp11::array<FT, 3> eigenvalues = {{ 0., 0., 0. }};
+	wA::diagonalize_selfadjoint_covariance_matrix
+	  (covariance, eigenvalues, eigenvectors);
+
+        // The vertex is moved by projecting it onto the plane
+        // through the barycenter and orthogonal to the Eigen vector with smallest Eigen value.
+	Vector norm (eigenvectors[0], eigenvectors[1], eigenvectors[2]);
+	Vector b2p (barycenter, _pts[i]);
+
+	_pts[i] = barycenter + b2p - ((norm * b2p) * norm);
+    }
+}; // class AdvanceSS
+
+
+template < class Gt, class FS, class wA, class Ct >
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+Scale_space_surface_reconstruction_3( unsigned int neighbors, unsigned int samples)
+  : _generator (0),_mean_neighbors(neighbors), _samples(samples), _squared_radius(-1), _shape(0) {}
+
+template < class Gt, class FS, class wA, class Ct >
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+Scale_space_surface_reconstruction_3( FT sq_radius )
+: _mean_neighbors(0), _samples(0), _squared_radius(sq_radius),_shape(0) {
+    CGAL_precondition( sq_radius >= 0 );
+}
+
+template < class Gt, class FS, class wA, class Ct >
+inline bool
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+is_handled( Cell_handle c, unsigned int li ) const {
+    switch( li ) {
+    case 0: return ( c->info()&1 ) != 0;
+    case 1: return ( c->info()&2 ) != 0;
+    case 2: return ( c->info()&4 ) != 0;
+    case 3: return ( c->info()&8 ) != 0;
+    }
+    return false;
+}
+
+template < class Gt, class FS, class wA, class Ct >
+inline void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+mark_handled( Cell_handle c, unsigned int li ) {
+    switch( li ) {
+    case 0: c->info() |= 1; return;
+    case 1: c->info() |= 2; return;
+    case 2: c->info() |= 4; return;
+    case 3: c->info() |= 8; return;
+    }
+}
+
+template < class Gt, class FS, class wA, class Ct >
+inline void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+mark_opposite_handled( Facet f )  {
+
+  Classification_type cl = _shape->classify (f);
+
+  // If cell is singular, simply mark mirror facet as handled
+  if (cl == Shape::SINGULAR)
+    {
+      Facet mirror = _shape->mirror_facet (f);
+      mark_handled (mirror);
+    }
+  // If cell is regular, get corresponding bubble and mark
+  // facets of the other layer of the bubble as handled
+  else if (cl == Shape::REGULAR)
+    {
+      Facet fac = (_shape->classify (f.first) == Shape::EXTERIOR)
+	? f
+	: _shape->mirror_facet (f);
+
+      typename std::map<Facet, std::size_t>::iterator
+	search = _map_f2b.find (fac);
+
+      if (search == _map_f2b.end ())
+	return;
+      
+      unsigned int layer = (_bubbles[search->second][0].find (fac) == _bubbles[search->second][0].end ())
+	? 0 : 1;
+
+      typename std::set<Facet>::iterator it = _bubbles[search->second][layer].begin ();
+
+      // If bubble has already been handled, no need to do it again
+      if (is_handled (*it))
+	return;
+      
+      for (;it != _bubbles[search->second][layer].end (); ++ it)
+	{
+	  _garbage.push_back (ordered_facet_indices (*it));
+	  mark_handled (*it);
+	}
+      
+    }
+
+
+}
+
+
+  template < class Gt, class FS, class wA, class Ct >
+inline typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Triple
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+ordered_facet_indices( const Facet& f ) const {
+    if( (f.second&1) == 0 )
+        return make_array<unsigned int>( f.first->vertex( (f.second+2)&3 )->info(),
+                                         f.first->vertex( (f.second+1)&3 )->info(),
+                                         f.first->vertex( (f.second+3)&3 )->info() );
+    else
+        return make_array<unsigned int>( f.first->vertex( (f.second+1)&3 )->info(),
+                                         f.first->vertex( (f.second+2)&3 )->info(),
+                                         f.first->vertex( (f.second+3)&3 )->info() );
+}
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+collect_shell( Cell_handle c, unsigned int li, bool separate_shells, bool force_manifold ) {
+    // Collect one surface mesh from the alpha-shape in a fashion similar to ball-pivoting.
+    // Invariant: the facet is regular or singular.
+
+
+    // To stop stack overflows: use own stack.
+    std::stack<Facet> stack;
+    stack.push( Facet(c, li) );
+
+    Facet f;
+    Cell_handle n, p;
+    int ni, pi;
+    Vertex_handle a;
+    Classification_type cl;
+    bool processed = false;
+
+    while( !stack.empty() ) {
+        f = stack.top();
+        stack.pop();
+
+        // Check if the cell was already handled.
+        // Note that this is an extra check that in many cases is not necessary.
+        if( is_handled(f) )
+            continue;
+
+        // The facet is part of the surface.
+        CGAL_assertion( !_shape->is_infinite(f) );
+        mark_handled(f);
+        // Output the facet as a triple of indices.
+        _surface.push_back( ordered_facet_indices(f) );
+        if( !processed ) {
+	  if (separate_shells || _shells.size () == 0)
+	    {
+	      _shells.push_back( --_surface.end() );
+	      _index ++;
+	    }
+            processed = true;
+        }
+
+	// Save in which shell the facet is stored
+	_map_f2s[f] = _index-1;
+
+	// If the surface is required to be manifold,
+	// the opposite layer should be ignored
+	if (force_manifold)
+	  mark_opposite_handled (f);
+		
+        // Pivot over each of the facet's edges and continue the surface at the next regular or singular facet.
+        for( int i = 0; i < 4; ++i ) {
+            // Skip the current facet.
+	  if( i == f.second || is_handled(f.first, i) )
+                continue;
+
+            // Rotate around the edge (starting from the shared facet in the current cell) until a regular or singular facet is found.
+            n = f.first;
+            ni = i;
+            a = f.first->vertex( f.second );
+            cl = _shape->classify( Facet(n, ni) );
+	    
+            while( cl != Shape::REGULAR && cl != Shape::SINGULAR ) {
+                p = n;
+                n = n->neighbor(ni);
+                ni = n->index(a);
+                pi = n->index(p);
+                a = n->vertex(pi);
+                cl = _shape->classify( Facet(n, ni) );
+            }
+
+            // Continue the surface at the next regular or singular facet.
+            stack.push( Facet(n, ni) );
+        }
+
+    }
+
+}
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+collect_facets (bool separate_shells, bool force_manifold) {
+
+
+  // We check each of the facets: if it is not handled and either regular or singular,
+  // we start collecting the next surface from here.
+  for( Finite_facets_iterator fit = _shape->finite_facets_begin(); fit != _shape->finite_facets_end(); ++fit ) {
+    switch( _shape->classify( *fit ) ) {
+    case Shape::REGULAR:
+      // Build a surface from the outer cell.
+      if( _shape->classify(fit->first) == Shape::EXTERIOR )
+	collect_shell( *fit, separate_shells, force_manifold );
+      else
+	collect_shell( _shape->mirror_facet( *fit ), separate_shells, force_manifold );
+      break;
+    case Shape::SINGULAR:
+      // Build a surface from both incident cells.
+      collect_shell( *fit, separate_shells, force_manifold );
+      collect_shell( _shape->mirror_facet( *fit ), separate_shells, force_manifold );
+      break;
+    default:
+      break;
+    }
+  }
+
+}
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+collect_facets_quick( ) {
+    // Collect all facets from the alpha-shape in an unordered fashion.
+    for( Finite_facets_iterator fit = _shape->finite_facets_begin(); fit != _shape->finite_facets_end(); ++fit ) {
+        switch( _shape->classify( *fit ) ) {
+            case Shape::REGULAR:
+                // Collect the outer cell.
+                if( _shape->classify(fit->first) == Shape::EXTERIOR )
+                    _surface.push_back( ordered_facet_indices( *fit ) );
+                else
+                    _surface.push_back( ordered_facet_indices( _shape->mirror_facet( *fit ) ) );
+                break;
+            case Shape::SINGULAR:
+                // Collect both incident cells.
+                _surface.push_back( ordered_facet_indices( *fit ) );
+                _surface.push_back( ordered_facet_indices( _shape->mirror_facet( *fit ) ) );
+                break;
+            default:
+                break;
+        }
+    }
+}
+
+template < class Gt, class FS, class wA, class Ct >
+const typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Shape&
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+shape() const {
+	if( !has_shape() )
+        _shape = Shape_construction_3().construct( _shape, _squared_radius );
+    return *_shape;
+}
+
+template < class Gt, class FS, class wA, class Ct >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::FT
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+estimate_neighborhood_squared_radius( unsigned int neighbors, unsigned int samples ) {
+    typename Gt::Compute_squared_distance_3 squared_distance = Gt().compute_squared_distance_3_object();
+
+    unsigned int handled = 0;
+    unsigned int checked = 0;
+    FT radius = 0;
+        
+    if( !_tree.is_built() )
+        _tree.build();
+
+    for(typename Search_tree::const_iterator it = _tree.begin(); it != _tree.end(); ++it ) {
+        unsigned int left = (unsigned int)( _tree.size() - handled );
+        if( samples >= left || _generator.get_double() < double(samples - checked) / left ) {
+            // The neighborhood should contain the point itself as well.
+          Static_search search( _tree, boost::get<0>(*it), neighbors+1 );
+          radius += sqrt( to_double( squared_distance( boost::get<0>(*it), boost::get<0>(( search.end()-1 )->first ) ) ) );
+            ++checked;
+        }
+        ++handled;
+    }
+    radius /= double(checked);
+
+    set_neighborhood_squared_radius( radius * radius );
+    return radius;
+}
+
+// Doxygen has a bug where it cannot link the declaration and implementation
+// of methods with a templated parameter.
+#ifndef DOXYGEN_RUNNING
+template < class Gt, class FS, class wA, class Ct >
+template < class InputIterator >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::FT
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples,
+                              typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* ) {
+    clear();
+	insert( begin, end );
+	return estimate_neighborhood_squared_radius( neighbors, samples );
+}
+#endif // DOXYGEN_RUNNING
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+increase_scale( unsigned int iterations ) {
+    typedef std::vector< unsigned int >		CountVec;
+
+    // This method must be called after filling the point collection.
+    if( iterations == 0 || _tree.empty() ) return;
+
+    if( !has_neighborhood_squared_radius() )
+        estimate_neighborhood_squared_radius();
+
+    for( unsigned int iter = 0; iter < iterations; ++iter ) {
+
+        _tree.clear();
+	_tree.reserve (_points.size());
+
+	for (std::size_t i = 0; i < _points.size (); ++ i)
+	  _tree.insert (boost::make_tuple(_points[i], i));
+
+        if( !_tree.is_built() )
+            _tree.build();
+
+        // Collect the number of neighbors of each point.
+        // This can be done concurrently.
+        CountVec neighbors( _tree.size(), 0 );
+        try_parallel( ComputeNN( _points, _tree, _squared_radius, neighbors ), 0, _tree.size() );
+       
+        // Compute the transformed point locations.
+        // This can be done concurrently.
+        try_parallel( AdvanceSS( _tree, neighbors, _points ), 0, _tree.size() );
+
+    }
+
+}
+
+template < class Gt, class FS, class wA, class Ct >
+template< class F >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+try_parallel( const F& func, std::size_t begin, std::size_t end, Sequential_tag ) const {
+    for( std::size_t i = begin; i < end; ++i ) func( i );
+}
+    
+template < class Gt, class FS, class wA, class Ct >
+template< class F >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+try_parallel( const F& func, std::size_t begin, std::size_t end, Parallel_tag ) const {
+#ifdef CGAL_LINKED_WITH_TBB
+    tbb::parallel_for( tbb::blocked_range< std::size_t >( begin, end ), func );
+#else // CGAL_LINKED_WITH_TBB
+    try_parallel( func, begin, end, Sequential_tag() );
+#endif // CGAL_LINKED_WITH_TBB
+}
+
+template < class Gt, class FS, class wA, class Ct >
+template < class InputIterator >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+construct_shape( InputIterator begin, InputIterator end,
+                 typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* ) {
+    deinit_shape();
+    if( !has_neighborhood_squared_radius() )
+        estimate_neighborhood_squared_radius();
+    _shape = Shape_construction_3().construct( begin, end, _squared_radius );
+}
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+collect_surface (bool separate_shells, bool force_manifold, FT border_angle) {
+
+    clear_surface();
+    if( !has_shape() )
+        construct_shape();
+
+    if( !has_neighborhood_squared_radius() )
+      estimate_neighborhood_squared_radius();
+
+    // If shells are not separated and no manifold constraint is given,
+    // then the quick collection of facets can be applied
+    if (!separate_shells && !force_manifold)
+      {
+	collect_facets_quick ();
+	_shells.push_back (_surface.begin ());
+      }
+    else
+      {
+	// Init shell index
+	_index = 0;
+
+	// Collect all surface meshes from the alpha-shape in a fashion similar to ball-pivoting.
+	// Reset the facet handled markers.
+	for( All_cells_iterator cit = _shape->all_cells_begin(); cit != _shape->all_cells_end(); ++cit )
+	  cit->info() = 0;
+
+	if (force_manifold)
+	  {
+	    // If manifold surface is wanted, small volumes (bubbles) are first detected in
+	    // order to know which layer to ignore when collecting facets
+	    detect_bubbles(border_angle);
+	  }
+
+	collect_facets (separate_shells, force_manifold);
+
+	if (force_manifold)
+	  {
+	    // Even when taking into account facets, some nonmanifold features might remain
+	    fix_nonmanifold_edges();
+	    fix_nonmanifold_vertices();
+	  }
+      }
+}
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+find_two_other_vertices(const Facet& f, Vertex_handle v,
+			Vertex_handle& v1, Vertex_handle& v2) {
+  Vertex_handle vother = f.first->vertex (f.second);
+  bool v1found = false;
+  
+  for (unsigned int i = 0; i < 4; ++ i)
+    {
+      Vertex_handle vi = f.first->vertex (i);
+      if (vi != v && vi != vother)
+	{
+	  if (v1found)
+	    {
+	      v2 = vi;
+	      return;
+	    }
+	  else
+	    {
+	      v1 = vi;
+	      v1found = true;
+	    }
+	}
+    }
+}
+
+
+
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+detect_bubbles(FT border_angle) {
+
+  std::set<Cell_handle> done;
+
+  unsigned int nb_facets_removed = 0;
+  
+  unsigned int nb_skipped = 0;
+  for (Cell_iterator cit = _shape->cells_begin (); cit != _shape->cells_end (); ++ cit)
+    {
+      if (_shape->is_infinite (cit))
+	continue;
+      if (_shape->classify (cit) != Shape::INTERIOR)
+	continue;
+      if (done.find (cit) != done.end ())
+	continue;
+
+      std::set<VEdge> borders;
+      std::vector<Cell_handle> cells;
+      std::stack<Cell_handle> todo;
+      todo.push (cit);
+
+      // Get all cells of volume and all borders
+      while (!(todo.empty ()))
+	{
+	  Cell_handle c = todo.top ();
+	  todo.pop ();
+
+	  if (!(done.insert (c).second))
+	    continue;
+
+	  cells.push_back (c);
+
+	  for (unsigned int i = 0; i < 4; ++ i)
+	    {
+	      if (_shape->classify (c->neighbor (i)) == Shape::INTERIOR)
+		todo.push (c->neighbor (i));
+	      else
+		{
+		  // Test if edge is proper border
+		  for (unsigned int j = 0; j < 3; ++ j)
+		    {
+		      unsigned int i0 = (i + j + 1)%4;
+		      unsigned int i1 = (i + (j+1)%3 + 1)%4;
+                      CGAL_assertion (i0 != i && i1 != i);
+		      Edge edge (c, i0, i1);
+
+		      if (_shape->classify (edge) != Shape::REGULAR)
+			continue;
+
+		      VEdge vedge = (c->vertex (i0) < c->vertex (i1))
+			? std::make_pair (c->vertex (i0), c->vertex (i1))
+			: std::make_pair (c->vertex (i1), c->vertex (i0));
+
+		      if (borders.find (vedge) != borders.end ())
+			continue;
+
+		      Facet_circulator start = _shape->incident_facets (edge);
+		      Facet_circulator circ = start;
+		      unsigned int cnt = 0;
+		      do
+			{
+			  if (_shape->classify (*circ) == Shape::SINGULAR
+			      || _shape->classify (*circ) == Shape::REGULAR)
+			    ++ cnt;
+			  ++ circ;
+			}
+		      while (circ != start);
+
+		      // If edge is non-manifold, use as border
+		      if (cnt > 2)
+			{
+			  borders.insert (vedge);
+			  continue;
+			}
+
+		      // Else, if facets in cell are regular and angle is
+		      // under _border_angle limit, use as border
+		      Facet f0 (c, i);
+		      Facet f1 (c, (i + (j+2)%3 + 1)%4);
+
+		      if (_shape->classify (f0) != Shape::REGULAR
+			  || _shape->classify (f1) != Shape::REGULAR)
+			continue;
+		      
+		      double angle = CGAL::Mesh_3::dihedral_angle (vedge.first->point (),
+								   vedge.second->point (),
+								   c->vertex (i)->point (),
+								   c->vertex ((i + (j+2)%3 + 1)%4)->point ());
+
+		      if (-border_angle < angle && angle < border_angle)
+			{
+			  borders.insert (vedge);
+			}
+		    }
+
+		}
+	    }
+	}
+
+      int layer = -1;
+
+      // Try to generate bubble from the volume found
+      _bubbles.push_back (Bubble());
+      std::set<Facet> done;
+      for (unsigned int c = 0; c < cells.size (); ++ c)
+	{
+	  for (unsigned int ii = 0; ii < 4; ++ ii)
+	    {
+	      Facet start = _shape->mirror_facet (Facet (cells[c], ii));
+
+	      if (_shape->classify (start) != Shape::REGULAR)
+		continue;
+
+	      if (done.find (start) != done.end ())
+		continue;
+
+	      ++ layer;
+	      
+	      std::stack<Facet> stack;
+	      stack.push (start);
+
+	      Facet f;
+	      Cell_handle n, p;
+	      int ni, pi;
+	      Vertex_handle a;
+	      Classification_type cl;
+
+	      // A bubble is well formed is the border contains one loop that
+	      // separates two layers.
+	      // If the number of layers is different than 2, the volume is completely ignored.
+	      while( !stack.empty() )
+		{
+		  f = stack.top();
+		  stack.pop();
+
+		  if (!(done.insert (f).second))
+		    continue;
+
+		  if (_shape->classify (f.first) == Shape::EXTERIOR)
+		    {
+		      if (layer < 2)
+			{
+			  _bubbles.back ()[layer].insert (f);
+			  _map_f2b[f] = _bubbles.size () - 1;
+			}
+		      else
+			{
+			  nb_facets_removed ++;
+			  mark_handled (f);
+			  _garbage.push_back (ordered_facet_indices (f));
+			}
+		    }
+		  else
+		    {
+		      if (layer < 2)
+			{
+			  _bubbles.back ()[layer].insert (_shape->mirror_facet (f));
+			  _map_f2b[_shape->mirror_facet (f)] = _bubbles.size () - 1;
+			}
+		      else
+			{
+			  nb_facets_removed ++;
+			  mark_handled (_shape->mirror_facet (f));
+			  _garbage.push_back (ordered_facet_indices (_shape->mirror_facet (f)));
+			}
+ 		    }
+
+
+		  for( int i = 0; i < 4; ++i )
+		    {
+		      // Skip the current facet.
+		      if( i == f.second)
+			continue;
+
+		      n = f.first;
+		      ni = i;
+		      a = f.first->vertex( f.second );
+		      cl = _shape->classify( Facet(n, ni) );
+
+		      int n0 = -1, n1 = -1;
+		      bool n0found = false;
+		      for (int j = 0; j < 4; ++ j)
+			{
+			  if (j != ni && j != f.second)
+			    {
+			      if (n0found)
+				{
+				  n1 = j;
+				  break;
+				}
+			      else
+				{
+				  n0 = j;
+				  n0found = true;
+				}
+			    }
+			}
+
+		      VEdge vedge = (n->vertex (n0) < n->vertex (n1))
+			? std::make_pair (n->vertex (n0), n->vertex (n1))
+			: std::make_pair (n->vertex (n1), n->vertex (n0));
+
+		      // If the edge is a border, propagation stops in this direction.
+		      if (borders.find (vedge) != borders.end ())
+			continue;
+		      
+		      while( cl != Shape::REGULAR && cl != Shape::SINGULAR ) {
+			p = n;
+			n = n->neighbor(ni);
+			ni = n->index(a);
+			pi = n->index(p);
+			a = n->vertex(pi);
+			cl = _shape->classify( Facet(n, ni) );
+		      }
+		      
+		      stack.push (Facet (n, ni));
+
+		    }
+
+		}
+	    }
+
+	}
+            
+      // If number of layers is != 2, ignore volume and discard bubble
+      if (layer != 1)
+	{
+	  nb_skipped ++;
+	  for (unsigned int i = 0; i < 2; ++ i)
+	    for (typename std::set<Facet>::iterator fit = _bubbles.back()[i].begin ();
+		   fit != _bubbles.back()[i].end (); ++ fit)
+	      {
+		mark_handled (*fit);
+		_map_f2b.erase (*fit);
+		_garbage.push_back (ordered_facet_indices (*fit));
+		nb_facets_removed ++;
+	      }
+	  _bubbles.pop_back ();
+	}
+      
+    }
+}
+  
+
+template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+fix_nonmanifold_edges() {
+
+  typedef std::map<std::pair<VEdge, unsigned int>, std::set<Triple> > Edge_shell_map_triples;
+  typedef typename Edge_shell_map_triples::iterator Edge_shell_map_triples_iterator;
+
+  unsigned int nb_facets_removed = 0;
+
+  unsigned int nb_nm_edges = 0;
+
+  // Store for each pair edge/shell the incident facets
+  Edge_shell_map_triples eshell_triples;
+  std::map<Triple, Facet> map_t2f;
+  
+  for (typename Map_facet_to_shell::iterator fit = _map_f2s.begin ();
+       fit != _map_f2s.end (); ++ fit)
+    {
+      Facet f = fit->first;
+      Triple t = ordered_facet_indices (f);
+      map_t2f[t] = f;
+	      
+      for (unsigned int k = 0; k < 3; ++ k)
+	{
+	  Vertex_handle v0 = f.first->vertex ((f.second + k + 1)%4);
+	  Vertex_handle v1 = f.first->vertex ((f.second + (k+1)%3 + 1)%4);
+	  VEdge vedge = (v0 < v1) ? std::make_pair (v0, v1) : std::make_pair (v1, v0);
+		  
+	  std::pair<Edge_shell_map_triples_iterator, bool>
+	    search = eshell_triples.insert (std::make_pair (std::make_pair (vedge, fit->second),
+							    std::set<Triple>()));
+
+	  search.first->second.insert (t);
+	}
+    }
+
+  for (Edge_shell_map_triples_iterator eit = eshell_triples.begin ();
+       eit != eshell_triples.end (); ++ eit)
+    {
+      // If an edge has more than 2 incident facets for one shell, it is non-manifold
+      if (eit->second.size () < 3)
+	continue;
+
+      ++ nb_nm_edges;
+
+      Triple_iterator tit = _shells[eit->first.second];
+      Triple_iterator end = (eit->first.second == _shells.size () - 1)
+	? _surface.end () : _shells[eit->first.second + 1];
+
+      // Remove facets until the edge is manifold in this shell
+      while (tit != end && eit->second.size () > 2)
+	{
+	  Triple_iterator current = tit ++;
+
+	  typename std::set<Triple>::iterator search = eit->second.find (*current);
+
+	  if (search != eit->second.end ())
+	    {
+	      if (current == _shells[eit->first.second])
+		_shells[eit->first.second] = tit;
+
+	      _garbage.push_back (*current);
+	      _map_f2s.erase (map_t2f[*current]);
+	      _surface.erase (current);
+
+	      ++ nb_facets_removed;
+	      eit->second.erase (search);
+	    }
+
+	}
+	  
+    }
+}
+
+
+
+  template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+fix_nonmanifold_vertices() {
+
+  typedef ::CGAL::Union_find<Facet> UF;
+  typedef typename UF::handle UF_handle;
+
+
+  typedef std::map<std::pair<Vertex_handle, unsigned int>, std::vector<Facet> > Vertex_shell_map_facets;
+  typedef typename Vertex_shell_map_facets::iterator Vertex_shell_map_facet_iterator;
+
+  // For faster facet removal, we sort the triples of each shell as a preprocessing
+  for (unsigned int i = 0; i < _shells.size (); ++ i)
+    {
+      Triple_iterator begin = _shells[i];
+      Triple_iterator end = (i+1 == _shells.size ()) ? _surface.end () : _shells[i+1];
+      
+      Tripleset tmp;
+      tmp.splice (tmp.end(), _surface, begin, end);
+      
+      tmp.sort();
+      _shells[i] = tmp.begin ();      
+      _surface.splice(end, tmp, tmp.begin(), tmp.end());
+    }
+
+  unsigned int nb_facets_removed = 0;
+  unsigned int nb_nm_vertices = 0;
+  // Removing facets to fix non-manifold vertices might make some other vertices
+  // become non-manifold, therefore we iterate until no facet needs to be removed.
+  do
+    {
+      nb_nm_vertices = 0;
+      nb_facets_removed = 0;
+
+      // Store for each pair vertex/shell the incident facets
+      Vertex_shell_map_facets vshell_facets;
+
+      for (typename Map_facet_to_shell::iterator fit = _map_f2s.begin ();
+	   fit != _map_f2s.end (); ++ fit)
+	{
+	  Facet f = fit->first;
+	  
+	  for (unsigned int k = 0; k < 3; ++ k)
+	    {
+	      Vertex_handle v = f.first->vertex ((f.second+k+1)%4);
+
+	      std::pair<Vertex_shell_map_facet_iterator, bool>
+		search = vshell_facets.insert (std::make_pair (std::make_pair (v, fit->second),
+							       std::vector<Facet>()));
+	      search.first->second.push_back (f);
+
+	    }
+	  
+	}
+
+      for (Vertex_shell_map_facet_iterator fit = vshell_facets.begin ();
+	   fit != vshell_facets.end (); ++ fit)
+	{
+	  if (fit->second.size () < 2)
+	    continue;
+
+	  Vertex_handle vit = fit->first.first;
+	  unsigned int shell = fit->first.second;
+
+	  UF uf;
+	  std::map<Facet, UF_handle> map_f2h;
+	  
+	  for (unsigned int i = 0; i < fit->second.size (); ++ i)
+	    map_f2h.insert (std::make_pair (fit->second[i], uf.make_set (fit->second[i])));
+
+	  std::map<Vertex_handle, Facet> map_v2f;
+	    
+	  for (unsigned int i = 0; i < fit->second.size (); ++ i)
+	    {
+	      Vertex_handle v1, v2;
+	      find_two_other_vertices (fit->second[i], vit, v1, v2);
+	      std::pair<typename std::map<Vertex_handle, Facet>::iterator, bool>
+		insertion1 = map_v2f.insert (std::make_pair (v1, fit->second[i]));
+	      if (!(insertion1.second))
+		uf.unify_sets (map_f2h[fit->second[i]], map_f2h[insertion1.first->second]);
+	      std::pair<typename std::map<Vertex_handle, Facet>::iterator, bool>
+		insertion2 = map_v2f.insert (std::make_pair (v2, fit->second[i]));
+	      if (!(insertion2.second))
+		uf.unify_sets (map_f2h[fit->second[i]], map_f2h[insertion2.first->second]);
+	    }
+
+	  if (uf.number_of_sets () > 1)
+	    {
+	      ++ nb_nm_vertices;
+
+	      typedef std::map<UF_handle, std::vector<Facet>, internal::Scale_space::operator_less<UF_handle> > Map_uf_sets;
+	      Map_uf_sets map_h2f;
+	      for (unsigned int i = 0; i < fit->second.size (); ++ i)
+		{
+		  UF_handle handle = uf.find (map_f2h[fit->second[i]]);
+
+		  std::pair<typename Map_uf_sets::iterator, bool>
+		    insertion = map_h2f.insert (std::make_pair (handle, std::vector<Facet>()));
+
+		  insertion.first->second.push_back (fit->second[i]);
+		}
+
+	      typename Map_uf_sets::iterator largest = map_h2f.end ();
+	      std::size_t nb_largest = 0;
+	      for (typename Map_uf_sets::iterator ufit = map_h2f.begin (); ufit != map_h2f.end (); ++ ufit)
+		{
+		  std::size_t size = ufit->second.size ();
+		  if (size > nb_largest)
+		    {
+		      nb_largest = size;
+		      largest = ufit;
+		    }
+		}
+
+	      std::vector<Triple> triples;
+
+	      for (typename Map_uf_sets::iterator ufit = map_h2f.begin (); ufit != map_h2f.end (); ++ ufit)
+		{
+		  if (ufit == largest)
+		    continue;
+		  for (unsigned int i = 0; i < ufit->second.size (); ++ i)
+		    {
+		      _map_f2s.erase (ufit->second[i]);
+		      triples.push_back (ordered_facet_indices (ufit->second[i]));
+		    }
+		}
+	      std::sort (triples.begin (), triples.end ());
+
+	      Triple_iterator tit = _shells[shell];
+	      Triple_iterator end = (shell == _shells.size () - 1)
+		? _surface.end () : _shells[shell + 1];
+
+	      unsigned int tindex = 0;
+	      
+	      while (tit != end && tindex < triples.size ())
+		{
+		  Triple_iterator current = tit ++;
+
+		  if (*current == triples[tindex])
+		    {
+		      if (current == _shells[shell])
+			_shells[shell] = tit;
+
+		      _garbage.push_back (*current);
+		      _surface.erase (current);
+
+		      ++ nb_facets_removed;
+		      ++ tindex;
+		    }
+
+		}
+	    }
+
+	}
+
+    }
+  while (nb_nm_vertices != 0);
+
+}
+
+
+
+  template < class Gt, class FS, class wA, class Ct >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+  reconstruct_surface( unsigned int iterations, bool separate_shells,
+		       bool force_manifold, FT border_angle) {
+
+    // Smooth the scale space.
+    increase_scale( iterations );
+
+    // Mesh the perturbed points.
+    collect_surface (separate_shells, force_manifold, border_angle);
+
+}
+
+/// \cond internal_doc
+template < class Gt, class FS, class wA, class Ct >
+template < class InputIterator >
+void
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::
+reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations,
+		     bool separate_shells, bool force_manifold, FT border_angle,
+                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type*) {
+  
+    // Compute the radius for which the mean ball would contain the required number of neighbors.
+      clear();
+    insert( begin, end );
+
+    reconstruct_surface (iterations, separate_shells, force_manifold, border_angle);
+}
+/// \endcond
+
+template < class Gt, class FS, class wA, class Ct >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Triple_const_iterator
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::shell_begin( std::size_t shell ) const {
+    CGAL_assertion( shell >= 0 && shell < _shells.size() );
+    return _shells[ shell ];
+}
+
+template < class Gt, class FS, class wA, class Ct >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Triple_iterator
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::shell_begin( std::size_t shell ) {
+    CGAL_assertion( shell >= 0 && shell < _shells.size() );
+    return _shells[ shell ];
+}
+
+template < class Gt, class FS, class wA, class Ct >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Triple_const_iterator
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::shell_end( std::size_t shell ) const {
+    CGAL_assertion( shell >= 0 && shell < _shells.size() );
+    if( shell == _shells.size()-1 )
+        return _surface.end();
+    return _shells[ shell+1 ];
+}
+
+template < class Gt, class FS, class wA, class Ct >
+typename Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::Triple_iterator
+Scale_space_surface_reconstruction_3<Gt,FS,wA,Ct>::shell_end( std::size_t shell ) {
+    CGAL_assertion( shell >= 0 && shell < _shells.size() );
+    if( shell == _shells.size()-1 )
+        return _surface.end();
+    return _shells[ shell+1 ];
+}
+
+} // namespace CGAL
+
+#endif // CGAL_SCALE_SPACE_RECONSTRUCTION_3_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_IMPL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Scale_space_surface_reconstruction_3.h b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_surface_reconstruction_3.h
new file mode 100644
index 0000000..a089d89
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Scale_space_surface_reconstruction_3.h
@@ -0,0 +1,965 @@
+//Copyright (C) 2014  INRIA - Sophia Antipolis
+//
+//This program is free software: you can redistribute it and/or modify
+//it under the terms of the GNU General Public License as published by
+//the Free Software Foundation, either version 3 of the License, or
+//(at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//GNU General Public License for more details.
+//
+//You should have received a copy of the GNU General Public License
+//along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+// Author(s):      Thijs van Lankveld
+
+#ifndef CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
+#define CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
+
+#include <iostream>
+#include <list>
+#include <map>
+#include <vector>
+
+#include <CGAL/utility.h>
+#include <CGAL/is_iterator.h>
+#include <CGAL/Default.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Search_traits_adapter.h>
+#include <CGAL/Orthogonal_incremental_neighbor_search.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Fuzzy_sphere.h>
+#include <CGAL/Random.h>
+#include <CGAL/Union_find.h>
+#include <CGAL/Default_diagonalize_traits.h>
+
+#include <CGAL/Scale_space_reconstruction_3/Shape_construction_3.h>
+
+#include <boost/mpl/and.hpp>
+
+namespace CGAL {
+  
+
+/// computes a triangulated surface mesh interpolating a point set.
+/** \ingroup PkgScaleSpaceReconstruction3Classes
+ *  This class stores several of the (intermediate) results. This makes it
+ *  easier and more efficient to adjust the parameter settings based on
+ *  preliminary results, or to further increase the scale to improve the
+ *  results. The class stores the point set at the current scale and the
+ *  reconstructed surface, possibly with iterators over the shells.
+ *
+ *  The class also stores the parameters for estimating the optimal
+ *  neighborhood radius and either the lastest estimate or the manually set
+ *  radius. This way, the radius can be estimated (again) whenever necessary.
+ *  Also note that both increasing the scale and reconstructing the
+ *  surface use this radius. By changing or re-estimating the radius between
+ *  these operations, they can use separate parameter settings.
+ *
+ *  The surface can be constructed either for a fixed neighborhood radius, or
+ *  for a dynamic radius. When constructing the surface for exactly one
+ *  neighborhood radius, it is faster to set `FS` to `Tag_true`. If
+ *  the correct neighborhood radius should be changed or estimated multiple
+ *  times, it is faster to set `FS` to `Tag_false`.
+ *
+ *  It is undefined whether a surface with fixed radius may have its radius
+ *  changed, but if so, this will likely require more computation time than
+ *  changing the radius of a dynamic surface. In either case, it is possible to
+ *  change the point set while maintaining the same radius.
+ *
+ *  The surface can be stored either as an unordered collection of triangles, 
+ *  or as a collection ordered by shells. A shell is a maximally connected
+ *  component of the surface where connected facets are locally oriented
+ *  towards the same side of the surface.
+ *  
+ *  \tparam Gt is the geometric traits class. It must be a model of
+ *  `DelaunayTriangulationTraits_3`. It must have a `RealEmbeddable` field
+ *  number type. Generally, `Exact_predicates_inexact_constructions_kernel` is
+ *  preferred.
+ *  \tparam FS determines whether the surface is expected to be constructed
+ *  for a fixed neighborhood radius. It must be a `Boolean_tag` type. The default value is
+ *  `Tag_true`. Note that the value of this parameter does not change the result but
+ *  only has an impact on the run-time.
+ *  \tparam wA must be a model of `DiagonalizeTraits` and determines
+ *  how to diagonalize a weighted covariance matrix to approximate a
+ *  weighted point set. It can be omitted: if Eigen 3 (or greater) is
+ *  available and `CGAL_EIGEN3_ENABLED` is defined then an overload
+ *  using `Eigen_diagonalize_traits` is provided. Otherwise, the
+ *  internal implementation `Diagonalize_traits` is used.
+ *  \tparam Ct indicates whether to use concurrent processing. It must be
+ *  either `Sequential_tag` or `Parallel_tag` (the default value).
+ */
+template < class Gt, class FS = Tag_true,
+	   class wA = CGAL::Default_diagonalize_traits<typename Gt::FT, 3>, class Ct = Parallel_tag >
+class Scale_space_surface_reconstruction_3 {
+
+public:
+    typedef typename Gt::Point_3                        Point;          ///< defines the point type.
+    typedef boost::tuple<Point, std::size_t>                           Point_and_size_t;
+
+private:
+    // Searching for neighbors.
+    typedef Search_traits_3< Gt >                       Traits_base;
+typedef CGAL::Search_traits_adapter<Point_and_size_t,
+  CGAL::Nth_of_tuple_property_map<0, Point_and_size_t>,
+  Traits_base>                                              Search_traits;
+    typedef Orthogonal_k_neighbor_search< Search_traits >
+                                                        Static_search;
+    typedef Orthogonal_incremental_neighbor_search< Search_traits >
+                                                        Dynamic_search;
+    typedef typename Dynamic_search::Tree               Search_tree;
+    typedef Fuzzy_sphere< Search_traits >               Sphere;
+    typedef CGAL::Random                                Random;
+
+    // Constructing the surface.
+    typedef CGAL::Shape_construction_3< Gt, FS >        Shape_construction_3;
+
+    typedef typename Shape_construction_3::Shape           Shape;
+    typedef typename Shape_construction_3::Triangulation   Triangulation;
+
+    typedef typename Shape::Vertex_handle               Vertex_handle;
+    typedef typename Shape::Cell_handle                 Cell_handle;
+    typedef typename Shape::Facet                       Facet;
+    typedef typename Shape::Edge                        Edge;
+    typedef std::pair<Vertex_handle, Vertex_handle>     VEdge;
+
+  
+    
+    typedef typename Shape::Vertex_iterator             Vertex_iterator;
+    typedef typename Shape::Cell_iterator               Cell_iterator;
+    typedef typename Shape::Facet_iterator              Facet_iterator;
+    typedef typename Shape::Edge_iterator               Edge_iterator;
+
+    typedef typename Shape::Finite_cells_iterator      Finite_cells_iterator;
+    typedef typename Shape::Finite_facets_iterator      Finite_facets_iterator;
+    typedef typename Shape::Finite_edges_iterator       Finite_edges_iterator;
+    typedef typename Shape::Finite_vertices_iterator    Finite_vertices_iterator;
+
+    typedef typename Shape::Facet_circulator            Facet_circulator;
+  
+    typedef typename Shape::All_cells_iterator          All_cells_iterator;
+
+    typedef typename Shape::Classification_type         Classification_type;
+
+     typedef std::map<Facet, unsigned int> Map_facet_to_shell;
+    typedef typename CGAL::cpp11::array<std::set<Facet>, 2 >   Bubble;
+  
+public:
+/// \name Types
+/// \{
+    typedef typename Gt::FT                             FT;             ///< defines the field number type.
+  	typedef typename Gt::Vector_3                        Vector;          ///< defines the vector type.
+  typedef typename Gt::Plane_3                        Plane;          ///< defines the plane type.
+  typedef typename Gt::Triangle_3                        Triangle;          ///< defines the triangle type.
+
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type                            Point_iterator;         ///< defines an iterator over the points.
+    typedef const unspecified_type                      Point_const_iterator;   ///< defines a constant iterator over the points.
+#else // DOXYGEN_RUNNING
+
+  // typedef typename Search_tree::iterator              Point_iterator;
+  // typedef typename Search_tree::const_iterator        Point_const_iterator;
+  typedef typename std::vector<Point>::iterator                          Point_iterator;
+  typedef typename std::vector<Point>::const_iterator                          Point_const_iterator;
+#endif // DOXYGEN_RUNNING
+
+    typedef CGAL::cpp11::array< unsigned int, 3 >       Triple;                 ///< defines a triple of point indices indicating a triangle of the surface.
+private:
+    typedef std::list< Triple >                         Tripleset;              ///< defines a collection of triples.
+    // Note that this is a list for two reasons: iterator validity for the shell iterators, and memory requirements for the expected huge collections.
+
+public:
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type                            Triple_iterator;        ///< defines an iterator over the triples.
+    typedef const unspecified_type                      Triple_const_iterator;  ///< defines a constant iterator over the triples.
+#else // DOXYGEN_RUNNING
+    typedef Tripleset::iterator                         Triple_iterator;
+    typedef Tripleset::const_iterator                   Triple_const_iterator;
+#endif // DOXYGEN_RUNNING
+
+/// \}
+
+private:
+    typedef std::vector< Triple_iterator >              TripleIterSet;
+    
+private:
+    class Finite_point_iterator;
+    class In_surface_tester;
+    typedef Filter_iterator< Facet_iterator, In_surface_tester >
+                                                    Surface_facets_iterator;
+
+    // Parallel processing functors.
+    class ComputeNN;
+    class AdvanceSS;
+
+private:
+    Search_tree     _tree;              // To quickly search for nearest neighbors.
+
+	Random          _generator;         // For sampling random points.
+
+    unsigned int    _mean_neighbors;    // The number of nearest neighbors in the mean neighborhood.
+    unsigned int    _samples;           // The number of sample points for estimating the neighborhood radius.
+
+    FT              _squared_radius;    // The squared neighborhood radius.
+
+    // The shape must be a pointer, because the alpha of a Fixed_alpha_shape_3
+    // can only be set at construction and its assignment operator is private.
+    // We want to be able to set the alpha after constructing the scale-space
+    // reconstructer object.
+	Shape*          _shape;
+
+    // The surface. If the surface is collected per shell, the triples of the
+    // same shell are stored consecutively.
+    Tripleset       _surface;
+
+    // The shells can be accessed through iterators to the surface.
+    TripleIterSet   _shells;
+
+    // If the surface is forced to be manifold, removed facets are stored
+    Tripleset _garbage;
+
+    // Map TDS facets to shells
+   Map_facet_to_shell _map_f2s;
+  //    std::map<Facet, unsigned int> _map_f2s;
+    unsigned int _index;
+
+  std::vector<Bubble> _bubbles;
+  std::map<Facet, std::size_t> _map_f2b;
+  
+    typedef std::vector<Point> Pointset;
+    Pointset _points;
+
+public:
+/// \name Constructors
+/// \{
+    /// constructs a surface reconstructor that will automatically estimate the neighborhood radius.
+    /** \param neighbors is the number of neighbors a point's neighborhood should
+     *  contain on average.
+     *  \param samples is the number of points sampled to estimate the
+     *  neighborhood radius.
+     */
+  Scale_space_surface_reconstruction_3( unsigned int neighbors, unsigned int samples);
+
+    /// constructs a surface reconstructor with a given neighborhood radius.
+    /** \param sq_radius is the squared radius of the neighborhood.
+     *
+     *  \pre `sq_radius` is not negative.
+     */
+	Scale_space_surface_reconstruction_3( FT sq_radius );
+
+/// \}
+	~Scale_space_surface_reconstruction_3() { deinit_shape(); }
+
+private:
+    void deinit_shape() { if( _shape != 0 ) { delete _shape; _shape = 0; } }
+
+    void clear_tree() { _tree.clear(); }
+  void clear_surface() { _shells.clear(); _surface.clear(); _garbage.clear(); deinit_shape(); }
+    
+    // SURFACE COLLECTION
+	// Once a facet is added to the surface, it is marked as handled.
+	bool is_handled( Cell_handle c, unsigned int li ) const;
+	inline bool is_handled( const Facet& f ) const { return is_handled( f.first, f.second ); }
+	void mark_handled( Cell_handle c, unsigned int li );
+        void mark_opposite_handled( Facet f );
+	inline void mark_handled( Facet f ) { mark_handled( f.first, f.second ); }
+    
+    // Get the indices of the points of the facet ordered to point
+    // towardds the outside of the shape.
+    Triple ordered_facet_indices( const Facet& f ) const;
+
+    //  Collect the triangles of one shell of the surface.
+  void collect_shell( Cell_handle c, unsigned int li, bool separate_shells, bool force_manifold);
+
+    //  Collect the triangles of one shell of the surface.
+  void collect_shell( const Facet& f, bool separate_shells, bool force_manifold) {
+    collect_shell( f.first, f.second, separate_shells, force_manifold );
+	}
+
+    //  Collect the triangles of the complete surface.
+  void collect_facets( bool separate_shells, bool force_manifold );
+  void collect_facets_quick( );
+
+
+private:
+    //  Get the shape of the scale space.
+    /*  If the shape does not exist, it is  constructed first.
+     *  \return the shape of the scale space.
+     */
+    const Shape& shape() const;
+
+public:
+/// \name Point Set Manipulation
+/// \{
+    /// inserts a collection of points into the scale-space at the current scale.
+    /** \tparam InputIterator is an iterator over the point collection.
+     *  The value type of the iterator must be a `Point`.
+     *
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *
+     *  \note Inserting the points does not automatically construct or
+     *  update the surface.
+     *
+     *  \note In order to construct the surface, call
+     *  `reconstruct_surface()` after inserting the points.
+     *
+     *  \warning Inserting new points may invalidate the neighborhood radius if
+     *  it was previously estimated.
+     *
+     *  \sa `insert(const Point& p)`.
+     */
+	template < class InputIterator >
+#ifdef DOXYGEN_RUNNING
+	void insert( InputIterator begin, InputIterator end ) {
+#else // DOXYGEN_RUNNING
+	void insert( InputIterator begin, InputIterator end,
+                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
+#endif // DOXYGEN_RUNNING
+         	_tree.reserve (std::distance(begin,end) + _points.size());
+		
+		_points.insert(_points.end(), begin, end);
+		
+                while(begin!=end)
+                  _tree.insert( boost::make_tuple(*(begin ++),0) );
+	}
+    
+    /// inserts a point into the scale-space at the current scale.
+    /** \param p is the point to insert.
+     *
+     *  \note Inserting the point does not automatically construct or
+     *  update the surface.
+     *
+     *  \note In order to construct the surface, call
+     *  `#reconstruct_surface()`.
+     *
+     *  \warning Inserting a new point may invalidate the neighborhood radius
+     *  if it was previously estimated.
+     *
+     *  \sa `insert(InputIterator begin, InputIterator end)`.
+     */
+	void insert( const Point& p ) {
+          _tree.insert( boost::make_tuple(p,0) );
+                _points.push_back(p);
+	}
+    
+    /// clears the stored scale-space surface reconstruction data.
+    /** This includes discarding the surface, the scale-space and all its
+     *  points, and any estimation of the neighborhood radius. 
+     *
+     *  Methods called after this point may have to re-estimate the
+     *  neighborhood radius. This method does not discard the parameters for
+     *  estimating this radius (the mean number of neighbors and the sample
+     *  size).
+     */
+    void clear() {
+		clear_tree();
+        clear_surface();
+	_map_f2s.clear ();
+	_bubbles.clear ();
+	_map_f2b.clear ();
+	
+        _squared_radius = -1;
+    }
+
+/// \}
+    
+private:
+    //  checks whether the shape has been constructed.
+    /*  The shape contains the structure of the point cloud.
+     *
+     *  Until the shape is constructed, the surface is undefined.
+     *  \return true if the shape exists and false otherwise.
+     *  \sa construct_shape(InputIterator begin, InputIterator end).
+     */
+	bool has_shape() const { return _shape != 0; }
+
+public:
+/// \name Neighborhood Size Estimation
+/// \{
+    /// estimates the neighborhood radius.
+    /** This method is equivalent to running
+     *  <code>[estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() )](\ref estimate_neighborhood_squared_radius)</code>.
+     *
+     *  This method can be called by the scale-space and surface construction
+     *  methods if the neighborhood radius is not set when they are called.
+     *
+     *  \return the estimated neighborhood radius.
+     *
+     *  \note This method processes the point set at the current scale. The
+     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
+     *
+     *  \warning If the surface was already constructed, estimating the
+     *  neighborhood radius will automatically adjust the surface.
+     *
+     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
+     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
+     *  \sa `estimate_neighborhood_squared_radius(unsigned int neighbors, unsigned int samples)`.
+     *  \sa `increase_scale(unsigned int iterations)`.
+     *  \sa `reconstruct_surface()`.
+     */
+    inline FT estimate_neighborhood_squared_radius() {
+        return estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() );
+    }
+
+    /// estimates the neighborhood radius based on a number of sample points.
+    /** The neighborhood radius is expressed as the radius of the smallest ball
+     *  centered on a point such that the ball contains at least a specified
+     *  number of points, not counting the point itself.
+     *
+     *  The neighborhood radius is set to the mean of these radii, taken over a
+     *  number of point samples.
+     *
+     *  \param neighbors is the number of neighbors a point's neighborhood
+     *  should contain on average, not counting the point itself.
+     *  \param samples is the number of points sampled to estimate the
+     *  neighborhood radius.
+     *  \return the estimated neighborhood radius.
+     *
+     *  \note This method processes the point set at the current scale. The
+     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
+     *
+     *  \warning If the surface was already constructed, estimating the
+     *  neighborhood radius will automatically adjust the surface.
+     *
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     */
+	FT estimate_neighborhood_squared_radius( unsigned int neighbors, unsigned int samples );
+
+
+    /// sets the squared radius of the neighborhood.
+    /** The neighborhood radius is used by
+     *  `#[increase_scale()` to
+     *  compute the point set at the desired scale and by
+     *  `reconstruct_surface()` to
+     *  construct a surface from the point set at the current scale.
+     *
+     *  \param sq_radius is the squared radius of the neighborhood.
+     *
+     *  \note If the neighborhood squared radius is negative when the point set
+     *  is smoothed or when the surface is computed, the neighborhood radius
+     *  will be computed automatically.
+     *
+     *  \warning If the surface was already constructed, changing the
+     *  neighborhood radius will automatically adjust the surface.
+     *
+     *  \sa `neighborhood_squared_radius()`.
+     *  \sa `has_neighborhood_squared_radius()`.
+     *  \sa `increase_scale(unsigned int iterations)`.
+     *  \sa `reconstruct_surface()`.
+     */
+    void set_neighborhood_squared_radius( const FT& sq_radius ) {
+        _squared_radius = sq_radius;
+		if( has_neighborhood_squared_radius() && has_shape() )
+            Shape_construction_3().change_scale( _shape, _squared_radius );
+    }
+
+    /// gives the squared radius of the neighborhood.
+    /** The neighborhood radius is used by
+     *  `#increase_scale()` to
+     *  compute the point set at the desired scale and by
+     *  `#reconstruct_surface()` to
+     *  construct a surface from the point set at the current scale.
+     *
+     *  \return the squared radius of the neighborhood, or -1 if the
+     *  neighborhood radius has not yet been set.
+     *
+     *  \sa `increase_scale(unsigned int iterations)`.
+     *  \sa `reconstruct_surface()`.
+     */
+    FT neighborhood_squared_radius() const { return _squared_radius; }
+
+    /// checks whether the neighborhood radius has been set.
+    /** The radius can be set manually, or estimated automatically.
+     *
+     *  \return `true` iff the radius has been either set manually or estimated.
+     *
+     *  \sa `set_neighborhood_squared_radius()`.
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     */
+    bool has_neighborhood_squared_radius() const {
+        return sign( _squared_radius ) == POSITIVE;
+    }
+    
+    /// \cond internal_doc
+    /// estimates the neighborhood radius of a collection of points.
+    /** This method is equivalent to running
+     *  `clear()` followed by
+     *  <code>[insert(begin, end)](\ref insert)</code> and
+     *  finally <code>[estimate_neighborhood_squared_radius( mean_number_of_neighbors(), neighborhood_sample_size() )](\ref estimate_neighborhood_squared_radius)</code>.
+     *
+     *  This method can be called by the scale-space and surface construction
+     *  methods if the neighborhood radius is not set when they are called.
+     *
+     *  \tparam InputIterator is an iterator over the point collection.
+     *  The value type of the iterator must be a `Point`.
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *  \return the estimated neighborhood radius.
+     *
+     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
+     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     *  \sa `insert(InputIterator begin, InputIterator end)`.
+     */
+	template < class InputIterator >
+#ifdef DOXYGEN_RUNNING
+    FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end ) {
+#else // DOXYGEN_RUNNING
+    FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end,
+                     typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
+#endif // DOXYGEN_RUNNING
+        return estimate_neighborhood_squared_radius( begin, end, mean_number_of_neighbors(), neighborhood_sample_size() );
+    }
+    /// \endcond
+
+    /// \cond internal_doc
+    /// estimates the neighborhood radius of a collection of points based on a number of sample points.
+    /** The neighborhood radius is expressed as the radius of the smallest ball
+     *  centered on a point such that the ball contains at least a specified
+     *  number of points, not counting the point itself.
+     *
+     *  The neighborhood radius is set to the mean of these radii, taken over a
+     *  number of point samples.
+     *  
+     *  This method is equivalent to running
+     *  `clear()` followed by
+     *  <code>[insert(begin, end)](\ref insert)</code> and finally
+     *  <code>[estimate_neighborhood_squared_radius(neighbors, samples)](\ref estimate_neighborhood_squared_radius)</code>.
+     *
+     *  \tparam InputIterator is an iterator over the point collection.
+     *  The value type of the iterator must be a `Point`.
+     *
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *  \param neighbors is the number of neighbors a point's neighborhood
+     *  should contain on average, not counting the point itself.
+     *  \param samples is the number of points sampled to estimate the
+     *  neighborhood radius.
+     *  \return the estimated neighborhood radius.
+     *
+     *  \sa `estimate_neighborhood_squared_radius(unsigned int neighbors, unsigned int samples)`.
+     */
+	template < class InputIterator >
+#ifdef DOXYGEN_RUNNING
+	FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples );
+#else // DOXYGEN_RUNNING
+	FT estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples,
+                                         typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL);
+#endif // DOXYGEN_RUNNING
+    /// \endcond
+/// \}
+
+/// \name Neighborhood Size Estimation Parameters
+/// \{
+    /// gives the mean number of neighbors an estimated neighborhood should contain.
+    /** This number is only used if the neighborhood radius has not been set
+     *  manually.
+     *
+     *  When the neighborhood radius is estimated, it should on average contain
+     *  this many neighbors, not counting the neighborhood center.
+     *
+     *  \return the number of neighbors a neighborhood ball centered on a point
+     *  should contain on average when the radius is estimated, not counting
+     *  the point itself.
+     *
+     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
+     *  \sa `has_neighborhood_squared_radius()`.
+     *  \sa `neighborhood_sample_size()`.
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     */
+    unsigned int mean_number_of_neighbors() const { return _mean_neighbors; }
+
+    /// gives the number of sample points the neighborhood estimation uses.
+    /** This number is only used if the neighborhood radius has not been set
+     *  manually.
+     *
+     *  If the number of samples is larger than the point cloud, every point is
+     *  used and the optimal neighborhood radius is computed exactly instead of
+     *  estimated.
+     *
+     *  \return the number of points sampled for neighborhood estimation.
+     *
+     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
+     *  \sa `has_neighborhood_squared_radius()`.
+     *  \sa `mean_number_of_neighbors()`.
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     */
+    unsigned int neighborhood_sample_size() const { return _samples; }  
+
+    /// sets the mean number of neighbors an estimated neighborhood should contain.
+    /** This number is only used if the neighborhood radius has not been set
+     *  manually.
+     *
+     *  When the neighborhood radius is estimated, it should on average contain
+     *  this many neighbors, not counting the neighborhood center.
+     *
+     *  \param neighbors is the number of neighbors a neighborhood ball centered on a point
+     *  should contain on average when the radius is estimated, not counting
+     *  the point itself.
+     *
+     *  \note This does not start the estimation process.
+     *
+     *  \sa `mean_number_of_neighbors()`.
+     *  \sa `has_neighborhood_squared_radius()`.
+     *  \sa `set_neighborhood_sample_size(unsigned int samples)`.
+     */
+    void set_mean_number_of_neighbors( unsigned int neighbors ) { _mean_neighbors = neighbors; }
+    
+    /// sets the number of sample points the neighborhood estimation uses.
+    /** This number is only used if the neighborhood radius has not been set
+     *  manually.
+     *
+     *  If the number of samples is larger than the point cloud, every point is
+     *  used and the optimal neighborhood radius is computed exactly instead of
+     *  estimated.
+     *
+     *  \param samples is the number of points to sample for neighborhood
+     *  estimation.
+     *
+     *  \note This does not start the estimation process.
+     *
+     *  \sa `neighborhood_sample_size()`.
+     *  \sa `has_neighborhood_squared_radius()`.
+     *  \sa `set_mean_number_of_neighbors(unsigned int neighbors)`.
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     */
+    void set_neighborhood_sample_size( unsigned int samples ) { _samples = samples; }
+/// \}
+
+    
+/// \name Scale-Space Manipulation
+/// \{
+    /// increases the scale by a number of iterations.
+    /** Each iteration the scale is increased, the points set at a higher scale
+     *  is computed. At a higher scale, the points set is smoother.
+     *
+     *  If the neighborhood radius has not been set before, it is automatically
+     *  estimated using `estimate_neighborhood_squared_radius()`.
+     *
+     *  \param iterations is the number of iterations to perform. If
+     *  `iterations` is 0, nothing happens.
+     *
+     *  \note This method processes the point set at the current scale. The
+     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
+     *
+     *  \note If the surface was already constructed, increasing the scale
+     *  will not automatically adjust the surface.
+     *
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     *  \sa `reconstruct_surface()`.
+     */
+	void increase_scale( unsigned int iterations = 1 );
+
+    /// \cond internal_doc
+    /// constructs a scale-space of a collection of points.
+    /** If the neighborhood radius has not been set before, it is automatically
+     *  estimated using `estimate_neighborhood_squared_radius()`.
+     *
+     *  This method is equivalent to running
+     *  `clear()` followed by
+     *  <code>[insert(begin, end)](\ref insert)</code> and finally
+     *  <code>[increase_scale(iterations)](\ref increase_scale)</code>.
+     *
+     *  \tparam InputIterator is an iterator over the point collection.
+     *  The value type of the iterator must be a `Point`.
+     *
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *  \param iterations is the number of iterations to perform. If
+     *  `iterations` is 0, nothing happens.
+     *
+     *  \sa `insert(InputIterator begin, InputIterator end)`.
+     *  \sa `estimate_neighborhood_squared_radius(InputIterator begin, InputIterator end)`.
+     *  \sa `increase_scale(unsigned int iterations)`.
+     *  \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
+     */
+	template < class InputIterator >
+	void construct_scale_space( InputIterator begin, InputIterator end, unsigned int iterations = 1,
+                                    typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
+        clear();
+		insert( begin, end );
+		increase_scale( iterations );
+	}
+    ///\endcond
+
+/// \}
+private:
+    // constructs the scale-space from a triangulation.
+    void construct_scale_space( Triangulation& tr ) {
+        insert( tr.finite_vertices_begin(), tr.finite_vertices_end() );
+    }
+
+    // tries to perform a functor in parallel.
+    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end, Sequential_tag ) const;
+    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end, Parallel_tag ) const;
+    template< class F > void try_parallel( const F& func, std::size_t begin, std::size_t end ) const { try_parallel( func, begin, end, Ct() );}
+    
+private:
+/// \name Shape
+/// \{
+    /// constructs the shape of the points at a fixed scale.
+    /** The shape contains geometric and connectivity information
+     *  of the scale space.
+     *
+     *  If the neighborhood radius has not been set before, it is automatically
+     *  estimated.
+     */
+    void construct_shape() {
+		construct_shape( points_begin(), points_end() );
+    }
+    
+    /// constructs the shape from an existing triangulation.
+    /** The shape contains geometric and connectivity information
+     *  of the scale space.
+     *
+     *  \param tr is the triangulation to construct the shape of.
+     *
+     *  \note This does not set the current scale-space.
+     *  To set this as well, use `construct_scale_space(Triangulation& tr)`.
+     *
+     *  \note If the neighborhood radius has not been set before, it is automatically
+     *  estimated.
+     */
+    void construct_shape(Triangulation& tr ) {
+        deinit_shape();
+        if( !has_neighborhood_squared_radius() )
+            estimate_neighborhood_squared_radius();
+        _shape = Shape_construction_3()( *tr, _squared_radius );
+	}
+
+    /// constructs the shape from a collection of points.
+    /** The shape contains geometric and connectivity information
+     *  of the scale space.
+     *
+     *  \tparam InputIterator is an iterator over the point sample.
+     *  The value type of the iterator must be a `Point`.
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *
+     *  \note This does not set the current scale-space.
+     *  To set this as well, use `insert( InputIterator begin, InputIterator end )`.
+     *
+     *  \note If the neighborhood radius has not been set before, it is automatically
+     *  estimated.
+     *
+     *  \sa `is_constructed()`.
+     */
+	template < class InputIterator >
+#ifdef DOXYGEN_RUNNING
+	void construct_shape( InputIterator begin, InputIterator end );
+#else // DOXYGEN_RUNNING
+	void construct_shape( InputIterator begin, InputIterator end,
+                              typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL );
+#endif // DOXYGEN_RUNNING
+    
+    // collects the surface mesh from the shape.
+    // If the sahep does not yet exist, it is constructed.
+	void collect_surface (bool separate_shells, bool force_manifold, FT border_angle );
+
+    // detects the non-manifold features of the shape
+    void find_two_other_vertices(const Facet& f, Vertex_handle v,
+				 Vertex_handle& v1, Vertex_handle& v2);
+    void detect_bubbles( FT border_angle );
+    void fix_nonmanifold_edges();
+    void fix_nonmanifold_vertices();
+    
+/// \}
+
+public:
+/// \name Surface Reconstruction
+/// \{
+    /// constructs a triangle mesh from the point set at a fixed scale.
+    /** The order of the points at the current scale is the same as the order
+     *  at the original scale, meaning that the surface can interpolate the
+     *  point set at the original scale by applying the indices of the surface
+     *  triangles to the original point set.
+     *
+     *  After construction, the triangles of the surface can be iterated using
+     *  `surface_begin()` and `surface_end()`.
+     *
+     *  If the neighborhood radius has not been set before, it is automatically
+     *  estimated using `estimate_neighborhood_squared_radius()`.
+     *
+     *  \param separate_shells determines whether to collect the surface per shell. 
+     *  \param force_manifold determines if the surface is forced to be 2-manifold.
+     *  \param border_angle sets the maximal angle between two facets
+     *  such that the edge is seen as a border.
+     *
+     *  If the output is forced to be 2-manifold, some almost flat
+     *  volume bubbles are detected. To do so, border edges must be
+     *  estimated.
+     *
+     *  An edge adjacent to 2 regular facets is considered as a border
+     *  if it is also adjacent to a singular facet or if the angle
+     *  between the two regular facets is lower than this parameter
+     *  (set to 45° by default).
+     *
+     *  \note This method processes the point set at the current scale. The
+     *  points can be set with <code>[insert(begin, end)](\ref insert)</code>.
+     *  \note `border_angle` is not used if `force_manifold` is set to false.
+     *
+     *  \sa `estimate_neighborhood_squared_radius()`.
+     *  \sa `increase_scale(unsigned int iterations)`.
+     */
+    void reconstruct_surface(bool separate_shells = true,
+			     bool force_manifold = false,
+			     FT border_angle = 45)
+    {
+      reconstruct_surface(0, separate_shells, force_manifold, border_angle);
+    }
+
+    /// gives the number of triangles of the surface.
+    std::size_t number_of_triangles() const { return _surface.size(); }
+    
+    /// gives the number of points of the surface.
+    std::size_t number_of_points() const { return _tree.size(); }
+
+
+    /// gives the number of shells of the surface.
+    std::size_t number_of_shells() const {
+        return _shells.size();
+    }
+
+    /// \cond internal_doc
+    void reconstruct_surface( unsigned int iterations, bool separate_shells = true,
+			      bool force_manifold = false, FT border_angle = 45);
+    /// \endcond
+
+    /// \cond internal_doc
+    /// constructs a surface mesh from a collection of points at a fixed scale.
+    /** This method is equivalent to running
+     *  `clear()` followed by
+     *  <code>[insert(begin, end)](\ref insert)</code> and finally
+     *  <code>[reconstruct_surface(iterations)](\ref reconstruct_surface)</code>.
+     *
+     *  If the neighborhood radius has not been set before, it is automatically
+     *  estimated using `estimate_neighborhood_squared_radius()`.
+     *
+     *  \tparam InputIterator is an iterator over the point collection.
+     *  The value type of the iterator must be a `Point`.
+     *
+     *  \param begin is an iterator to the first point of the collection.
+     *  \param end is a past-the-end iterator for the point collection.
+     *  \param iterations is the number of scale increase iterations to apply.
+     *  If `iterations` is 0, the point set at the current scale is used.
+     *  \param separate_shells determines whether to collect the surface per shell. 
+     *  \param force_manifold determines if the surface is forced to be 2-manifold.
+     *  
+     *  \sa `reconstruct_surface(unsigned int iterations)`.
+     *  \sa `insert(InputIterator begin, InputIterator end)`.
+     *  \sa `estimate_neighborhood_squared_radius(InputIterator begin, InputIterator end)`.
+     *  \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
+     */
+	template < class InputIterator >
+#ifdef DOXYGEN_RUNNING
+	  void reconstruct_surface( InputIterator begin, InputIterator end,
+				    unsigned int iterations = 0, bool separate_shells = true,
+				    bool force_manifold = false, FT border_angle = 45);
+#else // DOXYGEN_RUNNING
+	void reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations = 0,
+				  bool separate_shells = true, bool force_manifold = false, FT border_angle = 45,
+                                  typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL );
+#endif // DOXYGEN_RUNNING
+    /// \endcond
+/// \}
+
+public:
+/// \name Iterators
+/// \{
+    /// gives an iterator to the first point at the current scale.
+    Point_const_iterator points_begin() const { return _points.begin(); }
+    /// gives an iterator to the first point at the current scale.
+    /** \warning Changes to the scale-space do not cause an automatic update to
+     *  the surface.
+     */
+    Point_iterator points_begin() { return _points.begin(); }
+
+    /// gives a past-the-end iterator of the points at the current scale.
+    Point_const_iterator points_end() const { return _points.end(); }
+    /// gives a past-the-end iterator of the points at the current scale.
+    /** \warning Changes to the scale-space do not cause an automatic update to
+     *  the surface.
+     */
+    Point_iterator points_end() { return _points.end(); }
+
+    /// gives an iterator to the first triple in the surface.
+    Triple_const_iterator surface_begin() const { return _surface.begin(); }
+    /// gives an iterator to the first triple in the surface.
+    /** \warning Changes to the surface may change its topology.
+     */
+    Triple_iterator surface_begin() { return _surface.begin(); }
+    
+    /// gives a past-the-end iterator of the triples in the surface.
+    Triple_const_iterator surface_end() const { return _surface.end(); }
+    /// gives a past-the-end iterator of the triples in the surface.
+    /** \warning Changes to the surface may change its topology.
+     */
+    Triple_iterator surface_end() { return _surface.end(); }
+
+    /// gives an iterator to the first triple in a given shell.
+    /** \param shell is the index of the shell to access.
+     *
+     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
+     */
+    Triple_const_iterator shell_begin( std::size_t shell ) const;
+    /// gives an iterator to the first triple in a given shell.
+    /** \param shell is the index of the shell to access.
+     *
+     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
+     *
+     *  \warning Changes to a shell may invalidate the topology of the surface.
+     */
+    Triple_iterator shell_begin( std::size_t shell );
+
+    /// gives a past-the-end iterator of the triples in a given shell.
+    /** \param shell is the index of the shell to access.
+     *
+     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
+     */
+    Triple_const_iterator shell_end( std::size_t shell ) const;
+
+    /// gives a past-the-end iterator of the triples in a given shell.
+    /** \param shell is the index of the shell to access.
+     *
+     *  \pre `shell` is in the range [ 0, `number_of_shells()` ).
+     *
+     *  \warning Changes to a shell may invalidate the topology of the surface.
+     */
+    Triple_iterator shell_end( std::size_t shell );
+
+    /// gives an iterator to the first triple of the garbage facets
+    /// that may be discarded if 2-manifold output is required.
+    Triple_const_iterator garbage_begin() const { return _garbage.begin(); }
+    /// gives an iterator to the first triple of the garbage facets
+    /// that may be discarded if 2-manifold output is required.
+    Triple_iterator garbage_begin() { return _garbage.begin(); }
+    
+    /// gives a past-the-end iterator of the triples of the garbage facets
+    /// that may be discarded if 2-manifold output is required.
+    Triple_const_iterator garbage_end() const { return _garbage.end(); }
+    /// gives a past-the-end iterator of the triples of the garbage facets
+    /// that may be discarded if 2-manifold output is required.
+    Triple_iterator garbage_end() { return _garbage.end(); }
+
+/// \}
+}; // class Scale_space_surface_reconstruction_3
+
+} // namespace CGAL
+
+template< typename T >
+std::ostream&
+operator<<( std::ostream& os, const CGAL::cpp11::array< T, 3 >& t ) {
+    return os << t[0] << " " << t[1] << " " << t[2];
+}
+
+template< typename T >
+std::istream&
+operator>>( std::istream& is, CGAL::cpp11::array< T, 3 >& t ) {
+    return is >> get<0>(t) >> get<1>(t) >> get<2>(t);
+}
+
+#include <CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h>
+
+#endif // CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Search_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Search_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Search_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Search_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Search_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Search_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Search_traits_adapter.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_adapter.h
new file mode 100644
index 0000000..125bc0b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_adapter.h
@@ -0,0 +1,180 @@
+// Copyright (c) 2011 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_SEARCH_TRAITS_WITH_INFO
+#define CGAL_SEARCH_TRAITS_WITH_INFO
+
+#include <CGAL/Kd_tree_rectangle.h>
+#include <CGAL/Euclidean_distance.h> //for default distance specialization
+#include <CGAL/property_map.h>
+#include <CGAL/assertions.h>
+
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL{
+
+using ::get;
+  
+template <class Point_with_info,class PointPropertyMap,class Base_traits>
+class Search_traits_adapter;
+  
+template <class Point_with_info,class PointPropertyMap,class Base_distance>
+class Distance_adapter;
+  
+namespace internal{
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_typedef_Iso_box_d,Iso_box_d,false)
+
+template <class T,bool Has_iso_box_d=Has_typedef_Iso_box_d<T>::value >
+struct Get_iso_box_d;
+
+template <class T>
+struct Get_iso_box_d<T,false>
+{
+  typedef void type;
+};
+
+template <class T>
+struct Get_iso_box_d<T,true>
+{
+  typedef typename T::Iso_box_d type;
+};
+  
+  template <class Point_with_info,class PointPropertyMap,class Base_traits>
+  struct Spatial_searching_default_distance< ::CGAL::Search_traits_adapter<Point_with_info,PointPropertyMap,Base_traits> >{
+    typedef ::CGAL::Distance_adapter<Point_with_info,
+                                                 PointPropertyMap,
+                                                 typename Spatial_searching_default_distance<Base_traits>::type> type;
+  };
+
+} //namespace internal
+  
+  
+template <class Point_with_info,class PointPropertyMap,class Base_traits>
+class Search_traits_adapter : public Base_traits{
+  PointPropertyMap ppmap;
+
+  CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag,
+                           typename boost::property_traits<PointPropertyMap>::category
+                         >::value ) );
+public:
+  typedef Base_traits Base;
+  typedef typename internal::Get_iso_box_d<Base>::type Iso_box_d;
+
+  Search_traits_adapter(const PointPropertyMap& ppmap_=PointPropertyMap(),
+                          const Base_traits& base=Base_traits()
+  ):Base_traits(base),ppmap(ppmap_){}
+
+  typedef typename Base_traits::Cartesian_const_iterator_d      Cartesian_const_iterator_d;
+  typedef Point_with_info                                       Point_d;
+  typedef typename Base_traits::FT                              FT;
+  typedef typename Base_traits::Dimension                       Dimension;
+  
+
+  struct Construct_cartesian_const_iterator_d: public Base_traits::Construct_cartesian_const_iterator_d{
+    PointPropertyMap ppmap;
+    using Base_traits::Construct_cartesian_const_iterator_d::operator();
+    
+    Construct_cartesian_const_iterator_d(const typename Base_traits::Construct_cartesian_const_iterator_d& base, const PointPropertyMap& ppmap_)
+      :Base_traits::Construct_cartesian_const_iterator_d(base), ppmap(ppmap_){}
+    
+    typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p) const
+    { return this->operator() (get(ppmap,p)); }
+
+    typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p, int)  const
+    { return this->operator() (get(ppmap,p),0); }
+  };
+  
+  struct Construct_iso_box_d: public Base::Construct_iso_box_d{
+    PointPropertyMap ppmap;
+    typedef typename Base_traits::FT  FT; // needed for VC++, because otherwise it is taken from the private typedef of the base class
+
+    Iso_box_d operator() () const {
+      return static_cast<const typename Base::Construct_iso_box_d* >(this)->operator() ();
+    }
+    Iso_box_d operator() (const Point_with_info& p, const Point_with_info& q) const
+    {
+      return static_cast<const typename Base::Construct_iso_box_d* >(this)->operator() (get(ppmap,p),get(ppmap,q));
+    }
+  };
+  
+  const PointPropertyMap& point_property_map() const {return ppmap;}
+  
+  Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const {
+    return Construct_cartesian_const_iterator_d(
+      static_cast<const Base*>(this)->construct_cartesian_const_iterator_d_object(),
+      ppmap);
+  }
+};
+
+template <class Point_with_info,class PointPropertyMap,class Base_distance>
+class Distance_adapter : public Base_distance {
+  PointPropertyMap ppmap;
+  typedef typename Base_distance::FT FT;
+
+  CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag,
+                           typename boost::property_traits<PointPropertyMap>::category
+                         >::value ) );
+public:
+    
+  Distance_adapter( const PointPropertyMap& ppmap_=PointPropertyMap(),
+                         const Base_distance& distance=Base_distance()
+  ):Base_distance(distance),ppmap(ppmap_){}
+
+  using Base_distance::transformed_distance;
+  
+  typedef Point_with_info Point_d;
+  typedef typename Base_distance::Query_item Query_item;
+
+  const PointPropertyMap& point_property_map() const {return ppmap;}    
+
+  FT transformed_distance(const Query_item& p1, const Point_with_info& p2) const
+  {
+    return this->transformed_distance(p1,get(ppmap,p2));
+  }
+
+  template <class FT,class Dimension>
+  FT min_distance_to_rectangle(const Query_item& p, const CGAL::Kd_tree_rectangle<FT,Dimension>& b) const
+  {
+    return static_cast<const Base_distance*>(this)->min_distance_to_rectangle(p,b);
+  }
+
+  template <class FT,class Dimension>
+  FT min_distance_to_rectangle(const Query_item& p, const CGAL::Kd_tree_rectangle<FT,Dimension>& b,std::vector<FT>& dists) 
+  {
+    return static_cast<Base_distance*>(this)->min_distance_to_rectangle(p,b,dists);
+  }
+
+  template <class FT,class Dimension>
+  FT max_distance_to_rectangle(const Query_item& p,const CGAL::Kd_tree_rectangle<FT,Dimension>& b) const
+  {
+    return static_cast<const Base_distance*>(this)->max_distance_to_rectangle(p,b);
+  }  
+  template <class FT,class Dimension>
+  FT max_distance_to_rectangle(const Query_item& p,const CGAL::Kd_tree_rectangle<FT,Dimension>& b,std::vector<FT>& dists)
+  {
+    return static_cast<Base_distance*>(this)->max_distance_to_rectangle(p,b,dists);
+  }  
+};
+
+}//namespace CGAL
+
+#endif //CGAL_SEARCH_TRAITS_WITH_INFO
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_d.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Search_traits_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Search_traits_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Search_traits_vertex_handle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Search_traits_vertex_handle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Search_traits_vertex_handle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Search_traits_vertex_handle_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2.h
new file mode 100644
index 0000000..92f6c2a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_2.h
@@ -0,0 +1,310 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_SEGMENT_2_H
+#define CGAL_SEGMENT_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Segment_2 : public R_::Kernel_base::Segment_2
+{
+  typedef typename R_::RT                     RT;
+  typedef typename R_::FT                     FT;
+  typedef typename R_::Point_2                Point_2;
+  typedef typename R_::Direction_2            Direction_2;
+  typedef typename R_::Vector_2               Vector_2;
+  typedef typename R_::Line_2                 Line_2;
+  typedef typename R_::Aff_transformation_2   Aff_transformation_2;
+  typedef typename R_::Kernel_base::Segment_2 RSegment_2;
+
+  typedef Segment_2                           Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef RSegment_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_                               R;
+
+  Segment_2() {}
+
+  // conversion from implementation class object to interface class object
+  Segment_2(const RSegment_2& s)
+    : RSegment_2(s) {}
+
+  Segment_2(const Point_2 &sp, const Point_2 &ep)
+    :  RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {}
+
+  typename cpp11::result_of<typename R::Construct_source_2( Segment_2)>::type
+  source() const
+  { 
+    return R_().construct_source_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_target_2( Segment_2)>::type
+  target() const
+  {
+    return R_().construct_target_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_source_2( Segment_2)>::type
+  start() const
+  {
+    return source();
+  }
+
+  typename cpp11::result_of<typename R::Construct_target_2( Segment_2)>::type
+  end() const
+  {
+    return target();
+  }
+
+  
+  typename cpp11::result_of<typename R_::Construct_min_vertex_2(Segment_2)>::type
+  min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
+  
+  typename cpp11::result_of<typename R_::Construct_max_vertex_2( Segment_2)>::type
+  max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+
+  typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2, int)>::type
+  vertex(int i) const;
+
+  typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2, int)>::type
+  point(int i) const;
+
+  typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2, int)>::type
+  operator[](int i) const;
+
+  bool        is_horizontal() const;
+  bool        is_vertical() const;
+  bool        has_on(const Point_2 &p) const;  
+  bool        collinear_has_on(const Point_2 &p) const;
+  FT          squared_length() const;
+
+  bool        is_degenerate() const;
+
+  Bbox_2      bbox() const
+  {
+    return R().construct_bbox_2_object()(*this);
+  }
+
+  bool
+  operator==(const Segment_2 &s) const
+  {
+    return R().equal_2_object()(*this, s);
+  }
+
+  bool
+  operator!=(const Segment_2 &s) const
+  {
+    return !(*this == s);
+  }
+
+
+  Direction_2
+  direction() const
+  {
+    typename R::Construct_vector_2 construct_vector;
+    return Direction_2( construct_vector( source(), target()));
+  }
+
+  Vector_2
+  to_vector() const
+  {
+    typename R::Construct_vector_2 construct_vector;
+    return construct_vector( source(), target());
+  }
+
+  Line_2
+  supporting_line() const
+  {
+    typename R::Construct_line_2 construct_line;  
+    return construct_line(*this);
+  }
+
+  Segment_2
+  opposite() const
+  {
+    return R().construct_opposite_segment_2_object()(*this);
+  }
+
+  Segment_2
+  transform(const Aff_transformation_2 &t) const
+  {
+    return Segment_2(t.transform(source()), t.transform(target()));
+  }
+};
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_min_vertex_2( Segment_2<R_> )>::type
+Segment_2<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  typename R_::Less_xy_2 less_xy; 
+  return less_xy(source(),target()) ? source() : target();
+}
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_max_vertex_2( Segment_2<R_> )>::type
+Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  typename R_::Less_xy_2 less_xy; 
+  return less_xy(source(),target()) ? target() : source();
+}
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
+Segment_2<R_>::vertex(int i) const
+{
+  return (i%2 == 0) ? source() : target();
+}
+
+template < class R_ >
+inline
+typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
+Segment_2<R_>::point(int i) const
+{
+  return vertex(i);
+}
+
+template < class R_ >
+inline
+typename cpp11::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
+Segment_2<R_>::operator[](int i) const
+{
+  return vertex(i);
+}
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+bool
+Segment_2<R_>::is_horizontal() const
+{
+  return R_().equal_y_2_object()(source(), target());
+}
+
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+bool
+Segment_2<R_>::is_vertical() const
+{
+  return R_().equal_x_2_object()(source(), target());
+}
+
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+bool
+Segment_2<R_>::
+has_on(const typename R_::Point_2 &p) const
+{
+  return R_().are_ordered_along_line_2_object()(source(), 
+					       p, 
+					       target());
+}
+
+
+template < class R_ >
+inline
+bool
+Segment_2<R_>::
+collinear_has_on(const typename R_::Point_2 &p) const
+{
+  return R_().collinear_has_on_2_object()
+               (*this, p);
+}
+
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename Segment_2<R_>::FT
+Segment_2<R_>::squared_length() const
+{
+ return R_().compute_squared_length_2_object()(*this);
+}
+
+
+template < class R_ >
+inline
+bool
+Segment_2<R_>::is_degenerate() const
+{
+  return R().is_degenerate_2_object()(*this);
+}
+
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Segment_2<R> &s)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << s.source() << ' ' << s.target();
+    case IO::BINARY :
+        return os << s.source() << s.target();
+    default:
+        return os << "Segment_2(" << s.source() <<  ", " << s.target() << ")";
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Segment_2<R> &s)
+{
+    typename R::Point_2 p, q;
+
+    is >> p >> q;
+
+    if (is)
+        s = Segment_2<R>(p, q);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif //  CGAL_SEGMENT_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_2_Triangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_2_Triangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_2_Triangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_2_Triangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_3.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_3.h
new file mode 100644
index 0000000..11c3a76
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_3.h
@@ -0,0 +1,226 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_SEGMENT_3_H
+#define CGAL_SEGMENT_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Segment_3 : public R_::Kernel_base::Segment_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Vector_3              Vector_3;
+  typedef typename R_::Direction_3           Direction_3;
+  typedef typename R_::Line_3                Line_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Segment_3                          Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<1>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Segment_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Segment_3() {}
+
+  Segment_3(const Rep& s)
+      : Rep(s) {}
+
+  Segment_3(const Point_3& sp, const Point_3& ep)
+    : Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {}
+
+  typename cpp11::result_of<typename R::Construct_source_3(Segment_3)>::type
+  source() const
+  { 
+    return R_().construct_source_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_target_3(Segment_3)>::type
+  target() const
+  {
+    return R_().construct_target_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Construct_source_3(Segment_3)>::type
+  start() const
+  {
+    return source();
+  }
+
+  typename cpp11::result_of<typename R::Construct_target_3(Segment_3)>::type
+  end() const
+  {
+    return target();
+  }
+ 
+  typename cpp11::result_of<typename R_::Construct_min_vertex_3(Segment_3)>::type
+  min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+
+  typename cpp11::result_of<typename R_::Construct_max_vertex_3(Segment_3)>::type
+  max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+
+  typename cpp11::result_of<typename R_::Construct_vertex_3(Segment_3, int)>::type
+  vertex(int i) const;
+
+  typename cpp11::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
+  point(int i) const
+  { return vertex(i); }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
+  operator[](int i) const
+  { return vertex(i); }
+
+
+  Segment_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Segment_3(t.transform(this->source()), t.transform(this->target()));
+  }
+
+  FT squared_length() const
+  {
+    return squared_distance(this->target(), this->source());
+  }
+
+  Vector_3 to_vector() const
+  {
+    return R().construct_vector_3_object()(*this);
+  }
+
+  bool has_on(const Point_3 &p) const
+  { // TODO : use one predicate.
+    return R_().are_ordered_along_line_3_object()(source(), 
+					         p, 
+					         target());
+  }
+
+  Segment_3 opposite() const
+  {
+    return R().construct_opposite_segment_3_object()(*this);
+  }
+
+  Direction_3 direction() const
+  {
+    typename R::Construct_vector_3 construct_vector;
+    return Direction_3( construct_vector( source(), target()));
+  }
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+  Bbox_3 bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+  Line_3
+  supporting_line() const
+  {
+    return R().construct_line_3_object()(*this);
+  }
+
+};
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_min_vertex_3( Segment_3<R_> ) >::type
+Segment_3<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  typename R_::Less_xyz_3 less_xyz; 
+  return less_xyz(source(),target()) ? source() : target();
+}
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_max_vertex_3( Segment_3<R_> ) >::type
+Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+{
+  typename R_::Less_xyz_3 less_xyz; 
+  return less_xyz(source(),target()) ? target() : source();
+}
+
+template < class R_ >
+CGAL_KERNEL_INLINE
+typename cpp11::result_of<typename R_::Construct_vertex_3( Segment_3<R_>, int ) >::type
+Segment_3<R_>::vertex(int i) const
+{
+  return (i%2 == 0) ? source() : target();
+}
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Segment_3<R> &s)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << s.source() << ' ' << s.target();
+    case IO::BINARY :
+        return os << s.source() << s.target();
+    default:
+        return os << "Segment_3(" << s.source() <<  ", " << s.target() << ")";
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Segment_3<R> &s)
+{
+    typename R::Point_3 p, q;
+
+    is >> p >> q;
+
+    if (is)
+        s = Segment_3<R>(p, q);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2.h
new file mode 100644
index 0000000..2a3400b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2.h
@@ -0,0 +1,2043 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
+
+#include <iostream>
+#include <vector>
+#include <list>
+#include <set>
+#include <map>
+#include <algorithm>
+#include <boost/tuple/tuple.hpp>
+
+#include <CGAL/Segment_Delaunay_graph_2/basic.h>
+
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Segment_Delaunay_graph_storage_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_vertex_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_face_base_2.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+
+#include <CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h>
+#include <CGAL/Segment_Delaunay_graph_2/edge_list.h>
+#include <CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Constructions_C2.h>
+
+#include <CGAL/Iterator_project.h>
+#include <CGAL/utility.h>
+
+#include <CGAL/spatial_sort.h>
+#include <CGAL/Spatial_sort_traits_adapter_2.h>
+
+#include <boost/iterator/counting_iterator.hpp>
+
+/*
+  Conventions:
+  ------------
+  1. we treat segments as open; the endpoints are separate objects
+  2. a segment of length zero is treated as a point
+  3. a point is deleted only if it has no segment adjacent to it
+  4. when a segment is deleted it's endpoints are not deleted
+  5. the user can force the deletion of endpoints; this is only done
+     if condition 3 is met.
+  6. when objects are written to a stream we distinguish between
+     points and segments; points start by a 'p' and segments by an 's'.
+*/
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraph_2 {
+
+namespace Internal {
+
+  template<typename Edge, typename LTag> struct Which_list;
+
+  // use the in-place edge list
+  template<typename E>
+  struct Which_list<E,Tag_true>
+  {
+    typedef E                           Edge;
+    typedef In_place_edge_list_for_sdg<Edge>    List;
+  };
+
+  // do not use the in-place edge list
+  template<typename E>
+  struct Which_list<E,Tag_false>
+  {
+    typedef E                                 Edge;
+    // change the following to Tag_false in order to use
+    // CGAL's Unique_hash_map
+    typedef Tag_true                          Use_stl_map_tag;
+    typedef Edge_list<Edge,Use_stl_map_tag>   List;
+  };
+
+
+  template < class Node >
+  struct Project_site_2 {
+    typedef Node                   argument_type;
+    typedef typename Node::Site_2  Site;
+    typedef Site                   result_type;
+    Site& operator()(const Node& x) const { 
+      static Site s;
+      s = x.site();
+      return s;
+    }
+    //    const Site& operator()(const Node& x) const { return x.site(); }
+  };
+
+  template < class Node, class Site_t >
+  struct Project_input_to_site_2 {
+    typedef Node                   argument_type;
+    typedef Site_t                 Site;
+    typedef Site                   result_type;
+    Site& operator()(const Node& x) const {
+      static Site s;
+      if ( boost::tuples::get<2>(x) /*x.third*/ ) { // it is a point
+	//	s = Site::construct_site_2(*x.first);
+	s = Site::construct_site_2( *boost::tuples::get<0>(x) );
+      } else {
+	//	s = Site::construct_site_2(*x.first, *x.second);
+	s = Site::construct_site_2
+	  (*boost::tuples::get<0>(x), *boost::tuples::get<1>(x));
+      }
+      return s;
+    }
+  };
+
+  template<typename T, typename U>
+  struct Check_type_equality_for_info
+  {
+    Check_type_equality_for_info()
+    {
+      ERROR__INFO_TYPES_OF_insert_AND_Storage_traits_with_info_2_MUST_MATCH
+	(T(), U());
+    }
+  };
+
+  template<typename T>
+  struct Check_type_equality_for_info<T,T>
+  {
+  };
+
+} // namespace Internal
+
+} //namespace SegmentDelaunayGraph_2
+
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx >
+class Segment_Delaunay_graph_hierarchy_2;
+
+template<class Gt, class ST, class D_S, class LTag >
+class Segment_Delaunay_graph_Linf_2;
+
+
+template<class Gt,
+	 class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
+	 class D_S = Triangulation_data_structure_2 < 
+                Segment_Delaunay_graph_vertex_base_2<ST>,
+                Segment_Delaunay_graph_face_base_2<Gt> >,
+	 class LTag = Tag_false >
+class Segment_Delaunay_graph_2
+  : private Triangulation_2<
+          Segment_Delaunay_graph_traits_wrapper_2<Gt>, D_S >
+{
+  friend class Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>;
+  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_true,D_S,LTag,
+   Segment_Delaunay_graph_2<Gt,ST,D_S,LTag> >;
+  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_false,D_S,LTag,
+   Segment_Delaunay_graph_2<Gt,ST,D_S,LTag> >;
+  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_true,D_S,LTag,
+   Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag> >;
+  friend class Segment_Delaunay_graph_hierarchy_2<Gt,ST,Tag_false,D_S,LTag,
+   Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag> >;
+protected:
+  // LOCAL TYPES
+  //------------
+  typedef Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>       Self;
+
+  typedef Segment_Delaunay_graph_traits_wrapper_2<Gt>   Modified_traits;
+  typedef Triangulation_2<Modified_traits,D_S>           DG;
+  typedef DG                                            Delaunay_graph;
+
+  typedef LTag                                          List_tag;
+
+public:
+  // PUBLIC TYPES
+  //-------------
+  typedef D_S                                     Data_structure;
+  typedef D_S                                     Triangulation_data_structure;
+  typedef Gt                                     Geom_traits;
+  typedef ST                                     Storage_traits;
+  typedef typename Gt::Site_2                    Site_2;
+  typedef typename Gt::Point_2                   Point_2;
+
+  typedef typename D_S::Edge                      Edge;
+  typedef typename D_S::Vertex_handle             Vertex_handle;
+  typedef typename D_S::Face_handle               Face_handle;
+  typedef typename D_S::Vertex                    Vertex;
+  typedef typename D_S::Face                      Face;
+
+  typedef typename D_S::size_type                 size_type;
+
+  typedef typename D_S::Vertex_circulator         Vertex_circulator;
+  typedef typename D_S::Edge_circulator           Edge_circulator;
+  typedef typename D_S::Face_circulator           Face_circulator;
+
+  typedef typename D_S::Face_iterator             All_faces_iterator;
+  typedef typename D_S::Vertex_iterator           All_vertices_iterator;
+  typedef typename D_S::Edge_iterator             All_edges_iterator;
+
+  typedef typename DG::Finite_faces_iterator     Finite_faces_iterator;
+  typedef typename DG::Finite_vertices_iterator  Finite_vertices_iterator;
+  typedef typename DG::Finite_edges_iterator     Finite_edges_iterator;
+
+  typedef typename Storage_traits::Point_container     Point_container;
+  typedef typename Storage_traits::Point_handle        Point_handle;
+  typedef typename Storage_traits::const_Point_handle  const_Point_handle;
+
+protected:
+  typedef typename Geom_traits::Arrangement_type_2  AT2;
+  typedef typename AT2::Arrangement_type            Arrangement_type;
+
+  // these containers should have point handles and should replace the
+  // point container...
+  typedef boost::tuples::tuple<Point_handle,Point_handle,bool>  Site_rep_2;
+
+  struct Site_rep_less_than {
+    // less than for site reps
+    bool operator()(const Site_rep_2& x, const Site_rep_2& y) const {
+      Point_handle x1 = boost::tuples::get<0>(x);
+      Point_handle y1 = boost::tuples::get<0>(y);
+
+      if ( &(*x1) < &(*y1) ) { return true; }
+      if ( &(*y1) < &(*x1) ) { return false; }
+
+      Point_handle x2 = boost::tuples::get<1>(x);
+      Point_handle y2 = boost::tuples::get<1>(y);
+
+      return &(*x2) < &(*y2);
+    }
+  };
+
+  typedef std::set<Site_rep_2,Site_rep_less_than>  Input_sites_container;
+  typedef typename Input_sites_container::const_iterator
+  All_inputs_iterator;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
+  Project_input_to_site_2<Site_rep_2, Site_2>
+  Proj_input_to_site;
+
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Project_site_2<Vertex>
+  Proj_site;
+
+  struct Point_handle_less_than {
+    // less than
+    bool operator()(const const_Point_handle& x,
+		    const const_Point_handle& y) const {
+      return &(*x) < &(*y);
+    }
+  };
+
+  typedef std::pair<Point_handle,Point_handle>   Point_handle_pair;
+
+  typedef std::map<Point_handle,Point_handle,Point_handle_less_than>
+  Handle_map;
+
+public:
+  typedef Iterator_project<All_inputs_iterator, Proj_input_to_site>
+  Input_sites_iterator;
+
+  typedef Iterator_project<Finite_vertices_iterator, 
+                           Proj_site>            Output_sites_iterator;
+protected:
+  // LOCAL VARIABLE(S)
+  //------------------
+  // the container of points
+  Point_container pc_;
+  Input_sites_container isc_;
+  Storage_traits st_;
+#ifdef CGAL_SDG_NO_FACE_MAP
+  std::vector<Face_handle> fhc_;
+#endif
+
+protected:
+  // MORE LOCAL TYPES
+  //-----------------
+  typedef typename Gt::Intersections_tag        Intersections_tag;
+
+  typedef std::map<Face_handle,bool>            Face_map;
+  typedef std::vector<Edge>                     Edge_vector;
+
+  typedef std::list<Vertex_handle>              Vertex_list;
+  typedef typename Vertex_list::iterator        Vertex_list_iterator;
+
+  typedef Triple<Vertex_handle,Vertex_handle,Vertex_handle>
+  Vertex_triple;
+
+  typedef Vertex_handle                         Vh_triple[3];
+  typedef std::map<Face_handle,Sign>            Sign_map;
+
+  typedef std::pair<Face_handle,Face_handle>    Face_pair;
+
+  typedef typename Storage_traits::Storage_site_2   Storage_site_2;
+
+  // the edge list
+  typedef typename
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Which_list<Edge,List_tag>::List 
+  List;
+
+
+protected:
+  // types for insert on segment functions
+  typedef Vertex_triple (Self::*Insert_on_Type)(
+      const Storage_site_2& ss, const Site_2& t,
+      Vertex_handle v, const Tag_true&);
+  Insert_on_Type insert_point_on_segment_ptr;
+
+  typedef Vertex_triple (Self::*Insert_Exact_on_Type)(
+      const Storage_site_2& ss, const Site_2& t,
+      Vertex_handle v);
+  Insert_Exact_on_Type insert_exact_point_on_segment_ptr;
+
+  Vertex_triple
+  insert_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+			  Vertex_handle v, const Tag_true&);
+
+  Vertex_triple
+  insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+				Vertex_handle v);
+
+private:
+  // CREATION helper
+  template<class ITag>
+  inline
+  void setup_if_intersecting_pointer(ITag tag) {
+    setup_if_intersecting_pointer_with_tag(tag);
+  }
+
+  void setup_if_intersecting_pointer_with_tag(Tag_false) {
+    insert_point_on_segment_ptr = NULL;
+  }
+
+  void setup_if_intersecting_pointer_with_tag(Tag_true) {
+    insert_point_on_segment_ptr = &Self::insert_point_on_segment;
+  }
+
+  void setup_insert_on_pointers_l2(void) {
+    Intersections_tag itag;
+    setup_if_intersecting_pointer(itag);
+    insert_exact_point_on_segment_ptr = &Self::insert_exact_point_on_segment;
+  }
+
+public:
+  // CREATION
+  //---------
+  Segment_Delaunay_graph_2(const Geom_traits& gt = Geom_traits(),
+			   const Storage_traits& st = Storage_traits())
+    : DG(gt), st_(st)
+  {
+    setup_insert_on_pointers_l2();
+  }
+
+  template< class Input_iterator >
+  Segment_Delaunay_graph_2(Input_iterator first, Input_iterator beyond,
+			   const Geom_traits& gt = Geom_traits(),
+			   const Storage_traits& st = Storage_traits())
+    : DG(gt), st_(st)
+  {
+    setup_insert_on_pointers_l2();
+    insert(first, beyond);
+  }
+
+  Segment_Delaunay_graph_2(const Self& other);
+  Self& operator=(const Self& other);
+
+public:
+  // ACCESS METHODS
+  // --------------
+  const Geom_traits&  geom_traits() const { return DG::geom_traits(); }
+
+  const Storage_traits&  storage_traits() const { return st_; }
+
+  const Data_structure&   data_structure() const { return this->_tds; }
+  const Triangulation_data_structure& tds() const { return this->_tds; }
+  const Point_container&  point_container() const { return pc_; }
+
+  inline size_type number_of_input_sites() const {
+    return isc_.size();
+  }
+
+  inline size_type number_of_output_sites() const {
+    return number_of_vertices();
+  }
+
+  inline size_type number_of_vertices() const {
+    return DG::number_of_vertices();
+  }
+
+  inline size_type number_of_faces() const {
+    return DG::number_of_faces();
+  }
+
+  inline Vertex_handle infinite_vertex() const {
+    return DG::infinite_vertex();
+  }
+
+  inline Face_handle infinite_face() const {
+    return DG::infinite_face();
+  }
+
+  inline Vertex_handle finite_vertex() const {
+    return DG::finite_vertex();
+  }
+
+  inline int dimension() const {
+    return DG::dimension();
+  }
+
+  using Delaunay_graph::cw;
+  using Delaunay_graph::ccw;
+  using Delaunay_graph::delete_vertex;
+  using Delaunay_graph::delete_face;
+public:
+  // TRAVERSAL OF THE DUAL GRAPH
+  //----------------------------
+  inline Finite_faces_iterator finite_faces_begin() const {
+    return DG::finite_faces_begin();
+  }
+
+  inline Finite_faces_iterator finite_faces_end() const {
+    return DG::finite_faces_end();
+  }
+
+  inline Finite_vertices_iterator finite_vertices_begin() const {
+    return DG::finite_vertices_begin();
+  }
+
+  inline Finite_vertices_iterator finite_vertices_end() const {
+    return DG::finite_vertices_end();
+  }
+
+  inline Finite_edges_iterator finite_edges_begin() const {
+    return DG::finite_edges_begin();    
+  }
+
+  inline Finite_edges_iterator finite_edges_end() const {
+    return DG::finite_edges_end();    
+  }
+
+  inline All_faces_iterator all_faces_begin() const {
+    return DG::all_faces_begin();
+  }
+
+  inline All_faces_iterator all_faces_end() const {
+    return DG::all_faces_end();
+  }
+
+  inline All_vertices_iterator all_vertices_begin() const {
+    return DG::all_vertices_begin();
+  }
+
+  inline All_vertices_iterator all_vertices_end() const {
+    return DG::all_vertices_end();
+  }
+
+  inline All_edges_iterator all_edges_begin() const {
+    return DG::all_edges_begin();
+  }
+
+  inline All_edges_iterator all_edges_end() const {
+    return DG::all_edges_end();
+  }
+
+  inline Input_sites_iterator input_sites_begin() const {
+    return Input_sites_iterator(isc_.begin());
+  }
+
+  inline Input_sites_iterator input_sites_end() const {
+    return Input_sites_iterator(isc_.end());
+  }
+
+  inline Output_sites_iterator output_sites_begin() const {
+    return Output_sites_iterator(finite_vertices_begin());
+  }
+
+  inline Output_sites_iterator output_sites_end() const {
+    return Output_sites_iterator(finite_vertices_end());    
+  }
+
+public:
+  // CIRCULATORS
+  //------------
+  inline Face_circulator
+  incident_faces(Vertex_handle v,
+		 Face_handle f = Face_handle()) const {
+    return DG::incident_faces(v, f);
+  }
+
+  inline Vertex_circulator
+  incident_vertices(Vertex_handle v,
+		    Face_handle f = Face_handle()) const { 
+    return DG::incident_vertices(v, f);
+  }
+
+  inline Edge_circulator
+  incident_edges(Vertex_handle v,
+		 Face_handle f = Face_handle()) const {
+    return DG::incident_edges(v, f);
+  }
+ 
+public:
+  // PREDICATES
+  //-----------
+  inline bool is_infinite(const Vertex_handle& v) const {
+    return DG::is_infinite(v);
+  }
+
+  inline bool is_infinite(const Face_handle& f) const {
+    return DG::is_infinite(f);
+  }
+
+  inline bool is_infinite(const Face_handle& f, int i) const {
+    return DG::is_infinite(f, i);
+  }
+
+  inline bool is_infinite(const Edge& e) const {
+    return is_infinite(e.first, e.second);
+  }
+
+  inline bool is_infinite(const Edge_circulator& ec) const {
+    return DG::is_infinite(ec);
+  }
+
+public:
+  // INSERTION METHODS
+  //------------------
+  template<class Input_iterator>
+  inline size_type insert(Input_iterator first, Input_iterator beyond) {
+    return insert(first, beyond, Tag_false());
+  }
+
+  template<class Input_iterator>
+  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_false)
+  {
+    // do it the obvious way: insert them as they come;
+    // one might think though that it might be better to first insert
+    // all end points and then all segments, or a variation of that.
+    size_type n_before = number_of_vertices();
+    for (Input_iterator it = first; it != beyond; ++it) {
+      insert(*it);
+    }
+    size_type n_after = number_of_vertices();
+    return n_after - n_before;
+  }
+
+  //insert a range of points using spatial sorting
+  std::size_t insert_points(std::vector<Point_2>& points)
+  {
+    size_type n = this->number_of_vertices();
+    spatial_sort (points.begin(), points.end(), geom_traits());
+    Vertex_handle hint;
+    for (typename std::vector<Point_2>::const_iterator
+          p = points.begin(), end = points.end(); p != end; ++p)
+    {
+      hint = insert(*p, hint);
+    }
+
+    return this->number_of_vertices() - n;
+  }
+
+  template <class PointIterator>
+  std::size_t insert_points(PointIterator first, PointIterator beyond)
+  {
+    std::vector<Point_2> points (first, beyond);
+    return insert_points(points);
+  }
+
+  template <class IndicesIterator>
+  std::size_t insert_segments( const std::vector<Point_2>& points,
+                               IndicesIterator indices_first,
+                               IndicesIterator indices_beyond )
+  {
+    typedef std::vector<std::ptrdiff_t> Vertex_indices;
+    typedef std::vector<Vertex_handle> Vertices;
+
+    Vertex_indices vertex_indices;
+    vertex_indices.resize(points.size());
+
+    std::copy(boost::counting_iterator<std::ptrdiff_t>(0),
+              boost::counting_iterator<std::ptrdiff_t>(points.size()),
+              std::back_inserter(vertex_indices));
+
+    size_type n = this->number_of_vertices();
+    Spatial_sort_traits_adapter_2<Gt,const Point_2*> sort_traits(&(points[0]));
+
+    spatial_sort(vertex_indices.begin(), vertex_indices.end(), sort_traits);
+
+    Vertices vertices;
+    vertices.resize(points.size());
+
+    Vertex_handle hint;
+    for(typename Vertex_indices::const_iterator
+          it_pti = vertex_indices.begin(), end = vertex_indices.end();
+          it_pti != end; ++it_pti)
+    {
+      hint = insert(points[*it_pti], hint);
+      vertices[*it_pti] = hint;
+    }
+
+    for(IndicesIterator it_cst=indices_first, end=indices_beyond;
+        it_cst!=end; ++it_cst)
+    {
+      Vertex_handle v1 = vertices[it_cst->first];
+      Vertex_handle v2 = vertices[it_cst->second];
+      if(v1 != v2) insert(v1, v2);
+    }
+
+    return this->number_of_vertices() - n;
+  }
+
+  template <class PointIterator, class IndicesIterator>
+  std::size_t insert_segments(PointIterator points_first,
+                              PointIterator points_beyond,
+                              IndicesIterator indices_first,
+                              IndicesIterator indices_beyond)
+  {
+    std::vector<Point_2> points (points_first, points_beyond);
+    return insert_segments(points, indices_first, indices_beyond);
+  }
+
+  static const Point_2& get_source(const std::pair<Point_2, Point_2>& segment){
+    return segment.first;
+  }
+  static const Point_2& get_target(const std::pair<Point_2, Point_2>& segment){
+    return segment.second;
+  }
+
+  template <class Segment_2>
+  static const Point_2& get_source(const Segment_2& segment){
+    return segment.source();
+  }
+  template <class Segment_2>
+  static const Point_2& get_target(const Segment_2& segment){
+    return segment.target();
+  }
+
+  static const Point_2& get_source(const Site_2& segment){
+    return segment.source_of_supporting_site();
+  }
+
+  static const Point_2& get_target(const Site_2& segment){
+    return segment.target_of_supporting_site();
+  }
+
+  template <class SegmentIterator>
+  std::size_t insert_segments(SegmentIterator first, SegmentIterator beyond)
+  {
+    std::vector<Point_2> points;
+    for (SegmentIterator s_it=first; s_it!=beyond; ++s_it)
+    {
+      points.push_back( get_source(*s_it) );
+      points.push_back( get_target(*s_it) );
+    }
+
+    std::vector< std::pair<std::size_t, std::size_t> > segment_indices;
+    std::size_t nb_segments = points.size() / 2;
+    segment_indices.reserve( nb_segments );
+    for (std::size_t k=0; k < nb_segments; ++k)
+      segment_indices.push_back( std::make_pair(2*k,2*k+1) );
+
+    return insert_segments( points,
+                            segment_indices.begin(),
+                            segment_indices.end() );
+  }
+
+  template <class Input_iterator>
+  inline size_type
+  insert_range(Input_iterator first, Input_iterator beyond, Site_2){
+    std::vector<Point_2> points;
+    std::vector<Point_2> segment_points;
+    std::vector< std::pair<std::size_t, std::size_t> > segment_indices;
+    std::vector<Site_2> non_input_segments;
+
+    for (Input_iterator it=first; it!=beyond; ++it)
+    {
+      if ( it->is_input() )
+      {
+        if (it->is_point() ) points.push_back( it->point() );
+        else{
+          segment_points.push_back( it->source_of_supporting_site() );
+          segment_points.push_back( it->target_of_supporting_site() );
+          segment_indices.push_back( std::make_pair(segment_points.size()-2,
+                                                    segment_points.size()-1 ));
+        }
+      }
+      else
+        non_input_segments.push_back(*it);
+    }
+    //insert the points
+    size_type n = insert_points(points);
+    //insert the segments
+    n += insert_segments( segment_points,
+                          segment_indices.begin(),
+                          segment_indices.end() );
+    //insert non-input sites
+    std::random_shuffle( non_input_segments.begin(), non_input_segments.end() );
+    n += insert(non_input_segments.begin(),
+                non_input_segments.end(), Tag_false() );
+    return n;
+  }
+
+  template <class Input_iterator>
+  inline size_type
+  insert_range(Input_iterator first, Input_iterator beyond, Point_2){
+    return insert_points(first, beyond);
+  }
+
+  template <class Input_iterator, class Segment_2>
+  inline size_type
+  insert_range(Input_iterator first, Input_iterator beyond, Segment_2){
+    return insert_segments(first, beyond);
+  }
+
+  template<class Input_iterator>
+  inline size_type
+  insert(Input_iterator first, Input_iterator beyond, Tag_true)
+  {
+    return
+      insert_range(first, beyond,
+                   typename std::iterator_traits<Input_iterator>::value_type()
+      );
+  }
+
+  // insert a point
+  inline Vertex_handle insert(const Point_2& p) {
+    // update input site container
+    Point_handle ph = register_input_site(p);
+    Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
+    return insert_point(ss, p, Vertex_handle());
+  }
+
+  inline Vertex_handle insert(const Point_2& p, Vertex_handle vnear) {
+    // update input site container
+    Point_handle ph = register_input_site(p);
+    Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
+    return insert_point(ss, p, vnear);
+  }
+
+protected:
+  // insert a point without registering it in the input sites
+  // container: useful for the hierarchy
+  inline Vertex_handle insert_no_register(const Storage_site_2& ss,
+					  const Point_2& p,
+					  Vertex_handle vnear) {
+    return insert_point(ss, p, vnear);
+  }
+
+public:
+  // insert a segment
+  inline Vertex_handle insert(const Point_2& p0, const Point_2& p1) {
+    // update input site container
+    Point_handle_pair php = register_input_site(p0, p1);
+    Storage_site_2 ss =
+      st_.construct_storage_site_2_object()(php.first, php.second);
+    Vertex_handle v = insert_segment(ss, Site_2::construct_site_2(p0, p1),
+				     Vertex_handle());
+    if ( v == Vertex_handle() ) {
+      unregister_input_site(php.first, php.second);
+    }
+    return v;
+  }
+
+  // inserting a segment whose endpoints have already been inserted
+  // update input site container
+  inline Vertex_handle insert(const Vertex_handle& v0,
+			      const Vertex_handle& v1) {
+    CGAL_precondition( v0->storage_site().is_point() &&
+		       v1->storage_site().is_point() );
+
+    Point_handle h0 = v0->storage_site().point();
+    Point_handle h1 = v1->storage_site().point();
+    Storage_site_2 ss = st_.construct_storage_site_2_object()(h0, h1);
+
+    // update input site container
+    Point_handle_pair php = register_input_site(h0, h1);
+
+    if ( number_of_vertices() == 2 ) {
+      return insert_third(ss, v0, v1);
+    }
+
+    Vertex_handle v = insert_segment_interior(ss.site(), ss, v0);
+    if ( v == Vertex_handle() ) {
+      unregister_input_site(php.first, php.second);
+    }
+    return v;
+  }
+
+  inline Vertex_handle insert(const Point_2& p0, const Point_2& p1, 
+			      Vertex_handle vnear) {
+    // update input site container
+    Point_handle_pair php = register_input_site(p0, p1);
+    Storage_site_2 ss =
+      st_.construct_storage_site_2_object()(php.first, php.second);
+    Vertex_handle v =
+      insert_segment(ss, Site_2::construct_site_2(p0, p1), vnear);
+    if ( v == Vertex_handle() ) {
+      unregister_input_site(php.first, php.second);
+    }
+    return v;
+  }
+
+  inline Vertex_handle insert(const Site_2& t) {
+    return insert(t, Vertex_handle());
+  }
+
+  Vertex_handle insert(const Site_2& t, Vertex_handle vnear)
+  {
+    // the intended use is to unify the calls to insert(...);
+    // thus the site must be an exact one; 
+    CGAL_precondition( t.is_input() );
+
+    // update input site container
+
+    if ( t.is_segment() ) {
+      Point_handle_pair php =
+	register_input_site( t.source_of_supporting_site(),
+			     t.target_of_supporting_site() );
+      Storage_site_2 ss =
+	st_.construct_storage_site_2_object()(php.first, php.second);
+      Vertex_handle v = insert_segment(ss, t, vnear);
+      if ( v == Vertex_handle() ) {
+	unregister_input_site( php.first, php.second );
+      }
+      return v;
+    } else if ( t.is_point() ) {
+      Point_handle ph = register_input_site( t.point() );
+      Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
+      return insert_point(ss, t.point(), vnear);
+    } else {
+      CGAL_precondition ( t.is_defined() );
+      return Vertex_handle(); // to avoid compiler error
+    }
+  }
+
+protected:
+  template<class SSite>
+  inline void convert_info1(SSite& ss_trg, const SSite& ss_src,
+			    bool is_src, int,
+			    typename SSite::Has_info_tag const* = 0) const
+  {
+    //    std::cerr << "converting info..." << std::flush;
+    typename Storage_traits::Convert_info convert = st_.convert_info_object();
+
+    ss_trg.set_info( convert(ss_src.info(), is_src) );
+    //    std::cerr << " done!" << std::endl;
+  }
+
+  template<class SSite>
+  inline void convert_info1(SSite& /*  ss_trg */,
+			    const SSite& /* ss_src */, bool, char) const
+  {
+  }
+
+  void convert_info(Storage_site_2& ss_trg,
+		    const Storage_site_2& ss_src, bool is_src) const {
+    CGAL_precondition( ss_src.is_segment() && ss_trg.is_point() );
+    CGAL_precondition( ss_src.is_input() && ss_trg.is_input() );
+    CGAL_assertion( (is_src && same_points(ss_src.source_site(), ss_trg)) ||
+		    (!is_src && same_points(ss_src.target_site(), ss_trg))
+		    );
+    convert_info1(ss_trg, ss_src, is_src, 0);
+  }
+
+  template<class SSite>
+  inline void merge_info1(Vertex_handle v, const SSite& ss, int,
+			  typename SSite::Has_info_tag const* = 0)
+  {
+    //    std::cerr << "merging info..." << std::flush;
+    Storage_site_2 ss_v = v->storage_site();
+
+    typename Storage_traits::Merge_info merge = st_.merge_info_object();
+
+    ss_v.set_info( merge(ss_v.info(), ss.info()) );
+    v->set_site(ss_v);
+    //    std::cerr << " done!" << std::endl;
+  }
+
+  template<class SSite>
+  inline void merge_info1(Vertex_handle, const SSite&, char) const
+  {
+  }
+
+  // merges the info of the storage site of the vertex handle with the
+  // info of the given site; the vertex_handle contains the storage
+  // site with the new info
+  inline void merge_info(Vertex_handle v, const Storage_site_2& ss)  {
+    CGAL_precondition( (v->storage_site().is_segment() &&
+			ss.is_segment() &&
+			same_segments(v->site(), ss.site())) ||
+		       (v->storage_site().is_point() &&
+			ss.is_point() &&
+			same_points(v->site(), ss.site())) ||
+    		       (v->storage_site().is_point() &&	ss.is_segment())
+    		       );
+    merge_info1(v, ss, 0);
+  }
+
+public:
+  template<typename Info_t>
+  inline Vertex_handle insert(const Site_2& t,
+			      const Info_t& info) {
+    return insert(t, info, Vertex_handle());
+  }
+
+  template<typename Info_t>
+  Vertex_handle insert(const Site_2& t,
+		       const Info_t& info,
+		       Vertex_handle vnear)
+  {
+    typedef typename Storage_traits::Info Info;
+    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
+      Check_type_equality_for_info<Info_t, Info>();
+    // the intended use is to unify the calls to insert(...);
+    // thus the site must be an exact one; 
+    CGAL_precondition( t.is_input() );
+
+    // update input site container
+
+    if ( t.is_segment() ) {
+      Point_handle_pair php =
+	register_input_site( t.source_of_supporting_site(),
+			     t.target_of_supporting_site() );
+      Storage_site_2 ss =
+	st_.construct_storage_site_2_object()(php.first, php.second);
+      ss.set_info(info);
+      Vertex_handle v = insert_segment(ss, t, vnear);
+      if ( v == Vertex_handle() ) {
+	unregister_input_site( php.first, php.second );
+      }
+      return v;
+    } else if ( t.is_point() ) {
+      Point_handle ph = register_input_site( t.point() );
+      Storage_site_2 ss = st_.construct_storage_site_2_object()(ph);
+      ss.set_info(info);
+      return insert_point(ss, t.point(), vnear);
+    } else {
+      CGAL_precondition ( t.is_defined() );
+      return Vertex_handle(); // to avoid compiler error
+    }
+  }
+
+  // REMOVAL METHODS
+  //----------------
+protected:
+  bool is_star(const Vertex_handle& v) const;
+  bool is_linear_chain(const Vertex_handle& v0, const Vertex_handle& v1,
+		       const Vertex_handle& v2) const;
+  bool is_flippable(const Face_handle& f, int i) const;
+
+  void minimize_degree(const Vertex_handle& v);
+
+  // this method does not really do the job as intended, i.e., for removal
+  void equalize_degrees(const Vertex_handle& v, Self& small_d,
+			std::map<Vertex_handle,Vertex_handle>& vmap,
+			List& l) const;
+
+  void expand_conflict_region_remove(const Face_handle& f,
+				     const Site_2& t,
+				     const Storage_site_2& ss,
+				     List& l, Face_map& fm,
+				     Sign_map& sign_map);
+
+  void find_conflict_region_remove(const Vertex_handle& v,
+				   const Vertex_handle& vnearest,
+				   List& l, Face_map& fm, Sign_map& vm);
+
+  template<class OutputItFaces>
+  OutputItFaces get_faces(const List& l, OutputItFaces fit) const
+  {
+    // map that determines if a face has been visited
+    std::map<Face_handle,bool> fmap;
+
+    // compute the initial face
+    Edge e_front = l.front();
+    Face_handle fstart = e_front.first->neighbor(e_front.second);
+
+    // do the recursion
+    return get_faces(l, fstart, fmap, fit);
+  }
+
+  template<class OutputItFaces>
+  OutputItFaces get_faces(const List& l, Face_handle f,
+			  std::map<Face_handle,bool>& fmap,
+			  OutputItFaces fit) const
+  {
+    // if the face has been visited return
+    if ( fmap.find(f) != fmap.end() ) { return fit; }
+
+    // mark the face as visited
+    fmap[f] = true;
+
+    // output the face
+    *fit++ = f;
+
+    // recursively go to neighbors
+    for (int i = 0; i < 3; i++) {
+      Face_handle n = f->neighbor(i);
+      Edge ee(n, n->index( this->_tds.mirror_vertex(f,i) ));
+      if ( !l.is_in_list(ee) ) {
+	fit = get_faces(l, n, fmap, fit);
+      }
+    }
+    return fit;
+  }
+
+  size_type count_faces(const List& l) const;
+
+  void fill_hole(const Self& small_d, const Vertex_handle& v, const List& l,
+		 std::map<Vertex_handle,Vertex_handle>& vmap);
+
+  bool remove_first(const Vertex_handle& v);
+  bool remove_second(const Vertex_handle& v);
+  bool remove_third(const Vertex_handle& v);
+
+  void compute_small_diagram(const Vertex_handle& v, Self& small_d) const;
+  void compute_vertex_map(const Vertex_handle& v, const Self& small_d,
+			  std::map<Vertex_handle,Vertex_handle>& vmap) const;
+  void remove_degree_d_vertex(const Vertex_handle& v);
+
+  bool remove_base(const Vertex_handle& v);
+
+public:
+  bool remove(const Vertex_handle& v);
+
+protected:
+  inline void unregister_input_site(const Point_handle& h)
+  {
+    Site_rep_2 rep(h, h, true);
+    typename Input_sites_container::iterator it = isc_.find(rep);
+    CGAL_assertion( it != isc_.end() );
+
+    pc_.erase(h);
+    isc_.erase(it);
+  }
+
+  inline void unregister_input_site(const Point_handle& h1,
+				    const Point_handle& h2)
+  {   
+    Site_rep_2 rep(h1, h2, false);
+    typename Input_sites_container::iterator it = isc_.find(rep);
+    
+    Site_rep_2 sym_rep(h2, h1, false);
+    typename Input_sites_container::iterator sym_it = isc_.find(sym_rep);
+
+    CGAL_assertion( it != isc_.end() || sym_it != isc_.end() );
+
+    if ( it != isc_.end() ) { isc_.erase(it); }
+    if ( sym_it != isc_.end() ) { isc_.erase(sym_it); }
+
+    Site_rep_2 r1(h1, h1, true);
+    if ( isc_.find(r1) == isc_.end() ) { isc_.insert(r1); }
+
+    Site_rep_2 r2(h2, h2, true);
+    if ( isc_.find(r2) == isc_.end() ) { isc_.insert(r2); }
+  }
+
+  inline Point_handle register_input_site(const Point_2& p)
+  {
+    std::pair<Point_handle,bool> it = pc_.insert(p);
+    Site_rep_2 rep(it.first, it.first, true);
+    isc_.insert( rep );
+    return it.first;
+  }
+
+  inline
+  Point_handle_pair register_input_site(const Point_2& p0, const Point_2& p1)
+  {
+    std::pair<Point_handle,bool> it1 = pc_.insert(p0);
+    std::pair<Point_handle,bool> it2 = pc_.insert(p1);
+    Site_rep_2 rep(it1.first, it2.first, false);
+    isc_.insert( rep );
+    return Point_handle_pair(it1.first, it2.first);
+  }
+
+  inline
+  Point_handle_pair register_input_site(const Point_handle& h0,
+					const Point_handle& h1)
+  {
+    CGAL_precondition( h0 != h1 );
+    Site_rep_2 rep(h0, h1, false);
+    isc_.insert( rep );
+    return Point_handle_pair(h0, h1);
+  }
+
+  Vertex_handle  insert_first(const Storage_site_2& ss, const Point_2& p);
+  Vertex_handle  insert_second(const Storage_site_2& ss, const Point_2& p);
+  Vertex_handle  insert_third(const Storage_site_2& ss, const Point_2& p);
+  Vertex_handle  insert_third(const Site_2& t, const Storage_site_2& ss);
+  Vertex_handle  insert_third(const Storage_site_2& ss, Vertex_handle v0,
+			      Vertex_handle v1);
+
+  Vertex_handle insert_point(const Storage_site_2& ss, const Point_2& p,
+			     Vertex_handle vnear);
+  Vertex_handle insert_point(const Storage_site_2& ss,
+			     const Site_2& t, Vertex_handle vnear);
+  Vertex_handle insert_point2(const Storage_site_2& ss,
+			      const Site_2& t, Vertex_handle vnear);
+
+  Vertex_handle insert_segment(const Storage_site_2& ss, const Site_2& t,
+			       Vertex_handle vnear);
+
+  Vertex_handle insert_segment_interior(const Site_2& t,
+					const Storage_site_2& ss,
+					Vertex_handle vnear);
+
+  template<class ITag>
+  inline
+  Vertex_handle insert_intersecting_segment(const Storage_site_2& ss,
+					    const Site_2& t,
+					    Vertex_handle v,
+					    ITag tag) {
+    return insert_intersecting_segment_with_tag(ss, t, v, tag);
+  }
+
+  Vertex_handle
+  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				       const Site_2& t,
+				       Vertex_handle v, Tag_false);
+
+  Vertex_handle
+  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				       const Site_2& t,
+				       Vertex_handle v, Tag_true);
+
+
+
+public:
+  // NEAREST NEIGHBOR LOCATION
+  //--------------------------
+  inline Vertex_handle nearest_neighbor(const Point_2& p) const {
+    return nearest_neighbor(Site_2::construct_site_2(p), Vertex_handle());
+  }
+
+  inline Vertex_handle nearest_neighbor(const Point_2& p,
+					Vertex_handle vnear) const {
+    return nearest_neighbor(Site_2::construct_site_2(p), vnear);
+  }
+
+protected:
+  Vertex_handle nearest_neighbor(const Site_2& p,
+				 Vertex_handle vnear) const;
+
+
+protected:
+  // I/O METHODS
+  //------------
+  typedef std::map<const_Point_handle,size_type,Point_handle_less_than>
+  Point_handle_mapper;
+
+  typedef std::vector<Point_handle> Point_handle_vector;
+
+  void file_output(std::ostream&, const Storage_site_2&,
+		   Point_handle_mapper&) const;
+
+  void file_output(std::ostream&, Point_handle_mapper&,
+		   bool print_point_container) const;
+
+  void file_input(std::istream&, Storage_site_2&,
+		  const Point_handle_vector&, const Tag_true&) const;
+  void file_input(std::istream&, Storage_site_2&,
+		  const Point_handle_vector&, const Tag_false&) const;
+  void file_input(std::istream&, bool read_handle_vector,
+		  Point_handle_vector&);
+
+public:
+  void file_input(std::istream& is) {
+    Point_handle_vector P;
+    file_input(is, true, P);
+  }
+
+  void file_output(std::ostream& os) const {
+    Point_handle_mapper P;
+    size_type inum = 0;
+    for (const_Point_handle ph = pc_.begin(); ph != pc_.end(); ++ph) {
+      P[ph] = inum++;
+    }
+    file_output(os, P, true);
+  }
+
+  template< class Stream >
+  Stream& draw_dual(Stream& str) const
+  {
+    Finite_edges_iterator eit = finite_edges_begin();
+    for (; eit != finite_edges_end(); ++eit) {
+      draw_dual_edge(*eit, str);
+    }
+    return str;
+  }
+
+  template < class Stream > 
+  Stream& draw_skeleton(Stream& str) const
+  {
+    Finite_edges_iterator eit = finite_edges_begin();
+    for (; eit != finite_edges_end(); ++eit) {
+      Site_2 p = eit->first->vertex(  cw(eit->second) )->site();
+      Site_2 q = eit->first->vertex( ccw(eit->second) )->site();
+
+      bool is_endpoint_of_seg =
+	( p.is_segment() && q.is_point() &&
+	  is_endpoint_of_segment(q, p) ) ||
+	( p.is_point() && q.is_segment() &&
+	  is_endpoint_of_segment(p, q) );
+
+      if ( !is_endpoint_of_seg ) {
+	draw_dual_edge(*eit, str);
+      }
+    }
+    return str;
+  }
+
+  // MK: this has to be rewritten. all the checking must be done in
+  // the geometric traits class.
+  template< class Stream >
+  Stream& draw_dual_edge(Edge e, Stream& str) const
+  {
+    CGAL_precondition( !is_infinite(e) );
+
+    typename Geom_traits::Line_2              l;
+    typename Geom_traits::Segment_2           s;
+    typename Geom_traits::Ray_2               r;
+    CGAL::Parabola_segment_2<Gt>              ps;
+
+    Object o = primal(e);
+
+    if (CGAL::assign(l, o))   str << l;
+    if (CGAL::assign(s, o))   str << s; 
+    if (CGAL::assign(r, o))   str << r;
+    if (CGAL::assign(ps, o))  ps.draw(str);
+
+    return str;
+  }
+
+  template< class Stream >
+  inline
+  Stream& draw_dual_edge(Edge_circulator ec, Stream& str) const {
+    return draw_dual_edge(*ec, str);
+  }
+
+  template< class Stream >
+  inline
+  Stream& draw_dual_edge(Finite_edges_iterator eit, Stream& str) const {
+    return draw_dual_edge(*eit, str);
+  }
+
+public:
+  // VALIDITY CHECK
+  //---------------
+  bool is_valid(bool verbose = false, int level = 1) const;
+
+public:
+  // MISCELLANEOUS
+  //--------------
+  void clear() {
+    DG::clear();
+    pc_.clear();
+    isc_.clear();
+  }
+
+  void swap(Segment_Delaunay_graph_2& sdg) {
+    DG::swap(sdg);
+    pc_.swap(sdg.pc_);
+    isc_.swap(sdg.isc_);
+  }
+
+  //////////////////////////////////////////////////////////////////////
+  // THE METHODS BELOW ARE LOCAL
+  //////////////////////////////////////////////////////////////////////
+
+protected:
+  // THE COPY METHOD
+  //------------------------------------------------------------------
+  // used in the copy constructor and assignment operator
+
+  Storage_site_2
+  copy_storage_site(const Storage_site_2& ss_other,
+		    Handle_map& hm, const Tag_false&);
+
+  Storage_site_2
+  copy_storage_site(const Storage_site_2& ss_other,
+		    Handle_map& hm, const Tag_true&);
+
+  void copy(Segment_Delaunay_graph_2& other);
+  void copy(Segment_Delaunay_graph_2& other, Handle_map& hm);
+
+protected:
+  // HELPER METHODS FOR COMBINATORIAL OPERATIONS ON THE DATA STRUCTURE
+  //------------------------------------------------------------------
+
+  // getting the degree of a vertex
+  inline
+  typename Data_structure::size_type degree(const Vertex_handle& v) const {
+    return this->_tds.degree(v);
+  }
+
+  // getting the symmetric edge
+  inline Edge sym_edge(const Edge e) const {
+    return sym_edge(e.first, e.second);
+  }
+
+  inline Edge sym_edge(const Face_handle& f, int i) const {
+    Face_handle f_sym = f->neighbor(i);
+#ifdef CGAL_SDG_ALTERNATE_SYMEDGE_IMPLEMENTATION_BY_AF
+    int count = ( f_sym->neighbor(0) == f );
+    int i_sym = 0;
+    if ( f_sym->neighbor(1) == f ) {
+      ++count;
+      i_sym = 1;
+    }
+    if ( f_sym->neighbor(2) == f ) {
+      ++count;
+      i_sym = 2;
+    }
+    if ( count == 1 ) {
+      return Edge(f_sym, i_sym);
+    }
+    return Edge(f_sym, f_sym->index( f->vertex(i) ));
+#else
+    return Edge(  f_sym, f_sym->index( this->_tds.mirror_vertex(f, i) )  );
+#endif
+  }
+
+  Edge flip(Face_handle& f, int i) {
+    CGAL_precondition ( f != Face_handle() );
+    CGAL_precondition (i == 0 || i == 1 || i == 2);
+    CGAL_precondition( this->dimension()==2 ); 
+
+    CGAL_precondition( f->vertex(i) != this->_tds.mirror_vertex(f, i) );
+
+    this->_tds.flip(f, i);
+
+    return Edge(f, ccw(i));
+  }
+
+  inline Edge flip(Edge e) {
+    return flip(e.first, e.second);
+  }
+
+  inline bool is_degree_2(const Vertex_handle& v) const {
+    Face_circulator fc = incident_faces(v);
+    Face_circulator fc1 = fc;
+    ++(++fc1);
+    return ( fc == fc1 );
+  }
+
+  inline Vertex_handle insert_degree_2(Edge e) {
+    return this->_tds.insert_degree_2(e.first,e.second);
+  }
+
+  inline Vertex_handle insert_degree_2(Edge e, const Storage_site_2& ss) {
+    Vertex_handle v = insert_degree_2(e);
+    v->set_site(ss);
+    return v;
+  }
+
+  inline void remove_degree_2(Vertex_handle v) {
+    CGAL_precondition( is_degree_2(v) );
+    this->_tds.remove_degree_2(v);
+  }
+
+  inline void remove_degree_3(Vertex_handle v) {
+    CGAL_precondition( degree(v) == 3 );
+    this->_tds.remove_degree_3(v, Face_handle());
+  }
+
+  inline Vertex_handle create_vertex(const Storage_site_2& ss) {
+    Vertex_handle v = this->_tds.create_vertex();
+    v->set_site(ss);
+    return v;
+  }
+
+  inline Vertex_handle create_vertex_dim_up(const Storage_site_2& ss) {
+    Vertex_handle v = this->_tds.insert_dim_up(infinite_vertex());
+    v->set_site(ss);
+    return v;
+  }
+
+protected:
+  // HELPER METHODS FOR CREATING STORAGE SITES
+  //------------------------------------------
+  inline
+  Storage_site_2 split_storage_site(const Storage_site_2& ss0,
+				    const Storage_site_2& ss1,
+				    bool first)
+  {
+    // Split the first storage site which is a segment using the
+    // second storage site which is an exact point
+    // i denotes whether the first or second half is to be created
+    CGAL_precondition( ss0.is_segment() && ss1.is_point() );
+
+    return st_.construct_storage_site_2_object()(ss0, ss1, first);
+  }
+
+public:
+  // METHODS FOR ACCESSING THE PRIMAL GRAPH
+  //---------------------------------------
+  // used primarily for visualization
+  inline Point_2 primal(const Face_handle& f) const {
+    return circumcenter(f);
+  }
+
+  Object primal(const Edge e) const;
+
+  inline Object primal(const Edge_circulator& ec) const {
+    return primal(*ec); 
+  }
+
+  inline Object primal(const Finite_edges_iterator& ei) const {
+    return primal(*ei);
+  }
+
+protected:
+  void print_error_message() const;
+
+  void print_error_message(const Tag_false&) const
+  {
+    static int i = 0;
+
+    if ( i == 0 ) {
+      i++;
+      std::cerr << "SDG::Insert aborted: intersecting segments found"
+		<< std::endl;
+    }
+  }
+
+  void print_error_message(const Tag_true&) const {}
+
+  //protected:
+public:
+  // wrappers for constructions
+  inline Point_2 circumcenter(const Face_handle& f) const {
+    CGAL_precondition( this->dimension()==2 || !is_infinite(f) );
+    return circumcenter(f->vertex(0)->site(),
+			f->vertex(1)->site(),
+			f->vertex(2)->site());
+  }
+
+  inline Point_2 circumcenter(const Site_2& t0, const Site_2& t1, 
+			      const Site_2& t2) const {
+    return
+    geom_traits().construct_svd_vertex_2_object()(t0, t1, t2);
+  }
+
+protected:
+  // HELPER METHODS FOR INSERTION
+  //-----------------------------
+  void initialize_conflict_region(const Face_handle& f, List& l);
+
+  std::pair<Face_handle,Face_handle>
+  find_faces_to_split(const Vertex_handle& v, const Site_2& t) const;
+
+  void expand_conflict_region(const Face_handle& f, const Site_2& t,
+			      const Storage_site_2& ss,
+#ifdef CGAL_SDG_NO_FACE_MAP
+			      List& l,
+#else
+			      List& l, Face_map& fm,
+			      std::map<Face_handle,Sign>& sign_map,
+#endif
+			      Triple<bool, Vertex_handle,
+			      Arrangement_type>& vcross);
+
+  Vertex_handle add_bogus_vertex(Edge e, List& l);
+  Vertex_list   add_bogus_vertices(List& l);
+  void          remove_bogus_vertices(Vertex_list& vl);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+  void retriangulate_conflict_region(Vertex_handle v, List& l);
+#else
+  void retriangulate_conflict_region(Vertex_handle v, List& l,
+				     Face_map& fm);
+#endif
+
+
+// choosing the correct bisector constructors
+private:
+  template <typename T, typename Tag_has_bisector_constructions>
+  struct ConstructionHelper {};
+
+  // take constructors from L2
+  template <typename T>
+  struct ConstructionHelper<T, Tag_false>
+  {
+    typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
+              Construct_sdg_bisector_2<Gt,
+                Integral_domain_without_division_tag>
+            tagbis;
+    typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
+              Construct_sdg_bisector_ray_2<Gt,
+                Integral_domain_without_division_tag>
+            tagbisray;
+    typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
+              Construct_sdg_bisector_segment_2<Gt,
+                Integral_domain_without_division_tag>
+            tagbisseg;
+  };
+
+  // constructors from traits
+  template <typename T>
+  struct ConstructionHelper<T, Tag_true>
+  {
+    typedef
+            typename T:: template Construct_sdg_bisector_2
+              <Gt, Integral_domain_without_division_tag>
+            tagbis;
+    typedef
+            typename T:: template Construct_sdg_bisector_ray_2
+              <Gt, Integral_domain_without_division_tag>
+            tagbisray;
+    typedef
+            typename T:: template Construct_sdg_bisector_segment_2
+              <Gt, Integral_domain_without_division_tag>
+            tagbisseg;
+  };
+
+  template <typename T>
+  struct ConstructionChooser
+  {
+    typedef typename ConstructionHelper<T, typename T::Tag_has_bisector_constructions>::tagbis tagbis;
+    typedef typename ConstructionHelper<T, typename T::Tag_has_bisector_constructions>::tagbisray tagbisray;
+    typedef typename ConstructionHelper<T, typename T::Tag_has_bisector_constructions>::tagbisseg tagbisseg;
+  };
+
+
+protected:
+  // TYPES AND ACCESS METHODS FOR VISUALIZATION
+  //-------------------------------------------
+
+  // types
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_circle_2<Gt,Integral_domain_without_division_tag>
+  Construct_sdg_circle_2;
+
+  typedef typename
+          ConstructionChooser<Geom_traits>::tagbis
+          Construct_sdg_bisector_2;
+  typedef typename
+          ConstructionChooser<Geom_traits>::tagbisray
+          Construct_sdg_bisector_ray_2;
+  typedef typename
+          ConstructionChooser<Geom_traits>::tagbisseg
+          Construct_sdg_bisector_segment_2;
+
+  // access
+  inline Construct_sdg_circle_2
+  construct_sdg_circle_2_object() const{
+    return Construct_sdg_circle_2();
+  }
+
+  inline Construct_sdg_bisector_2
+  construct_sdg_bisector_2_object() const {
+    return Construct_sdg_bisector_2();
+  }
+
+  inline Construct_sdg_bisector_ray_2
+  construct_sdg_bisector_ray_2_object() const {
+    return Construct_sdg_bisector_ray_2();
+  }
+
+  inline Construct_sdg_bisector_segment_2
+  construct_sdg_bisector_segment_2_object() const { 
+    return Construct_sdg_bisector_segment_2(); 
+  }
+
+protected:
+  // WRAPPERS FOR GEOMETRIC PREDICATES
+  //----------------------------------
+  inline
+  bool same_points(const Storage_site_2& p, const Storage_site_2& q) const {
+    return geom_traits().equal_2_object()(p.site(), q.site());
+  }
+
+  inline
+  bool same_segments(const Storage_site_2& t, Vertex_handle v) const {
+    if ( is_infinite(v) ) { return false; }
+    if ( t.is_point() || v->storage_site().is_point() ) { return false; }
+    return same_segments(t.site(), v->site());
+  }
+
+  inline
+  bool is_endpoint_of_segment(const Storage_site_2& p,
+			      const Storage_site_2& s) const
+  {
+    CGAL_precondition( p.is_point() && s.is_segment() );
+    return ( same_points(p, s.source_site()) ||
+	     same_points(p, s.target_site()) );
+  }
+
+  inline
+  bool is_degenerate_segment(const Storage_site_2& s) const {
+    CGAL_precondition( s.is_segment() );
+    return same_points(s.source_site(), s.target_site());
+  }
+
+  // returns:
+  //   ON_POSITIVE_SIDE if q is closer to t1
+  //   ON_NEGATIVE_SIDE if q is closer to t2
+  //   ON_ORIENTED_BOUNDARY if q is on the bisector of t1 and t2
+  inline
+  Oriented_side side_of_bisector(const Storage_site_2 &t1,
+				 const Storage_site_2 &t2,
+				 const Storage_site_2 &q) const {
+    return
+      geom_traits().oriented_side_of_bisector_2_object()(t1.site(),
+							 t2.site(),
+							 q.site());
+  }
+
+  inline
+  Sign incircle(const Storage_site_2 &t1, const Storage_site_2 &t2,
+		const Storage_site_2 &t3, const Storage_site_2 &q) const {
+#ifdef CGAL_PROFILE_SDG_DUMP_INCIRCLE
+    typedef typename Geom_traits::FT  FT;
+    if ( !Algebraic_structure_traits<FT>::Is_exact::value ) {
+      std::ofstream ofs("incircle.cin", std::ios_base::app);
+      ofs.precision(16);
+      ofs << t1.site() << " ";
+      ofs << t2.site() << " ";
+      ofs << t3.site() << " ";
+      ofs <<  q.site() << std::endl;
+      ofs.close();
+    }
+#endif
+    return geom_traits().vertex_conflict_2_object()(t1.site(),
+						    t2.site(),
+						    t3.site(),
+						    q.site());
+  }
+
+  inline
+  Sign incircle(const Storage_site_2 &t1, const Storage_site_2 &t2,
+		const Storage_site_2 &q) const {
+    return geom_traits().vertex_conflict_2_object()(t1.site(),
+						    t2.site(),
+						    q.site());
+  }
+
+  inline
+  Sign incircle(const Face_handle& f, const Storage_site_2& q) const {
+    return incircle(f, q.site());
+  }
+
+  inline
+  bool finite_edge_interior(const Storage_site_2& t1,
+			    const Storage_site_2& t2,
+			    const Storage_site_2& t3,
+			    const Storage_site_2& t4,
+			    const Storage_site_2& q, Sign sgn) const {
+    return
+      geom_traits().finite_edge_interior_conflict_2_object()
+      (t1.site(), t2.site(), t3.site(), t4.site(), q.site(), sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Face_handle& f, int i,
+			    const Storage_site_2& q, Sign sgn) const {
+    CGAL_precondition( !is_infinite(f) &&
+		       !is_infinite(f->neighbor(i)) );
+    return finite_edge_interior( f->vertex( ccw(i) )->site(),
+				 f->vertex(  cw(i) )->site(),
+				 f->vertex(     i  )->site(),
+				 this->_tds.mirror_vertex(f, i)->site(),
+				 q.site(), sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Storage_site_2& t1,
+			    const Storage_site_2& t2,
+			    const Storage_site_2& t3,
+			    const Storage_site_2& q,
+			    Sign sgn) const {
+    return geom_traits().finite_edge_interior_conflict_2_object()(t1.site(),
+								  t2.site(),
+								  t3.site(),
+								  q.site(),
+								  sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Storage_site_2& t1,
+			    const Storage_site_2& t2,
+			    const Storage_site_2& q,
+			    Sign sgn) const {
+    return
+      geom_traits().finite_edge_interior_conflict_2_object()(t1.site(),
+							     t2.site(),
+							     q.site(),
+							     sgn);
+  }
+
+  bool finite_edge_interior(const Face_handle& f, int i,
+			    const Storage_site_2& p, Sign sgn,
+			    int j) const {
+    return finite_edge_interior(f, i, p.site(), sgn, j);
+  }
+
+  inline
+  bool infinite_edge_interior(const Storage_site_2& t2,
+			      const Storage_site_2& t3,
+			      const Storage_site_2& t4,
+			      const Storage_site_2& q, Sign sgn) const {
+    return
+      geom_traits().infinite_edge_interior_conflict_2_object()
+      (t2.site(), t3.site(), t4.site(), q.site(), sgn);
+  }
+
+  inline
+  bool infinite_edge_interior(const Face_handle& f, int i,
+			      const Storage_site_2& q, Sign sgn) const
+  {
+    return infinite_edge_interior(f, i, q, sgn);
+  }
+
+  inline
+  bool edge_interior(const Face_handle& f, int i,
+		     const Storage_site_2& t, Sign sgn) const {
+    return edge_interior(f, i, t.site(), sgn);
+  }
+
+  inline
+  bool edge_interior(const Edge& e,
+		     const Storage_site_2& t, Sign sgn) const {
+    return edge_interior(e.first, e.second, t, sgn);
+  }
+
+  inline Arrangement_type
+  arrangement_type(const Storage_site_2& t, const Vertex_handle& v) const {
+    if ( is_infinite(v) ) { return AT2::DISJOINT; }
+    return arrangement_type(t, v->storage_site());
+  }
+
+  inline
+  Arrangement_type arrangement_type(const Storage_site_2& p,
+				    const Storage_site_2& q) const {
+    return arrangement_type(p.site(), q.site());
+  }
+
+  inline
+  bool are_parallel(const Storage_site_2& p, const Storage_site_2& q) const {
+    return geom_traits().are_parallel_2_object()(p.site(), q.site());
+  }
+
+  inline Oriented_side
+  oriented_side(const Storage_site_2& s1, const Storage_site_2& s2,
+                const Storage_site_2& supp,
+		const Storage_site_2& p) const
+  {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return
+      geom_traits().oriented_side_2_object()(
+          s1.site(), s2.site(), supp.site(), p.site());
+  }
+
+  inline Oriented_side
+  oriented_side(const Storage_site_2& s1, const Storage_site_2& s2,
+		const Storage_site_2& s3, const Storage_site_2& supp,
+		const Storage_site_2& p) const {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return geom_traits().oriented_side_2_object()(s1.site(),
+						  s2.site(),
+						  s3.site(),
+						  supp.site(), p.site());
+  }
+
+
+  //-------
+
+  inline
+  bool same_points(const Site_2& p, const Site_2& q) const {
+    return geom_traits().equal_2_object()(p, q);
+  }
+
+  inline
+  bool same_segments(const Site_2& t, Vertex_handle v) const {
+    if ( is_infinite(v) ) { return false; }
+    if ( t.is_point() || v->site().is_point() ) { return false; }
+    return same_segments(t, v->site());
+  }
+
+  inline
+  bool same_segments(const Site_2& p, const Site_2& q) const {
+    CGAL_precondition( p.is_segment() && q.is_segment() );
+
+    return
+      (same_points(p.source_site(), q.source_site()) &&
+       same_points(p.target_site(), q.target_site())) ||
+      (same_points(p.source_site(), q.target_site()) &&
+       same_points(p.target_site(), q.source_site()));
+  }
+
+  inline
+  bool is_endpoint_of_segment(const Site_2& p, const Site_2& s) const
+  {
+    CGAL_precondition( p.is_point() && s.is_segment() );
+    return ( same_points(p, s.source_site()) ||
+	     same_points(p, s.target_site()) );
+  }
+
+  inline
+  bool is_degenerate_segment(const Site_2& s) const {
+    CGAL_precondition( s.is_segment() );
+    return same_points(s.source_site(), s.target_site());
+  }
+
+  // returns:
+  //   ON_POSITIVE_SIDE if q is closer to t1
+  //   ON_NEGATIVE_SIDE if q is closer to t2
+  //   ON_ORIENTED_BOUNDARY if q is on the bisector of t1 and t2
+  inline
+  Oriented_side side_of_bisector(const Site_2 &t1, const Site_2 &t2,
+				 const Site_2 &q) const {
+    return geom_traits().oriented_side_of_bisector_2_object()(t1, t2, q);
+  }
+
+  inline
+  Sign incircle(const Site_2 &t1, const Site_2 &t2,
+		const Site_2 &t3, const Site_2 &q) const {
+#ifdef CGAL_PROFILE_SDG_DUMP_INCIRCLE
+    typedef typename Geom_traits::FT  FT;
+    if ( !Algebraic_structure_traits<FT>::Is_exact::value ) {
+      std::ofstream ofs("incircle.cin", std::ios_base::app);
+      ofs.precision(16);
+      ofs << t1 << " ";
+      ofs << t2 << " ";
+      ofs << t3 << " ";
+      ofs <<  q << std::endl;
+      ofs.close();
+    }
+#endif
+    return geom_traits().vertex_conflict_2_object()(t1, t2, t3, q);
+  }
+
+  inline
+  Sign incircle(const Site_2 &t1, const Site_2 &t2,
+		const Site_2 &q) const {
+    return geom_traits().vertex_conflict_2_object()(t1, t2, q);
+  }
+
+  inline
+  Sign incircle(const Face_handle& f, const Site_2& q) const;
+
+  inline
+  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
+		const Vertex_handle& v) const {
+    CGAL_precondition( !is_infinite(v0) && !is_infinite(v1)
+		       && !is_infinite(v) );
+
+    return incircle( v0->site(), v1->site(), v->site());
+  }
+
+  Sign incircle(const Vertex_handle& v0, const Vertex_handle& v1,
+		const Vertex_handle& v2, const Vertex_handle& v) const;
+
+  inline
+  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
+			    const Site_2& t3, const Site_2& t4,
+			    const Site_2& q,  Sign sgn) const {
+    return
+      geom_traits().finite_edge_interior_conflict_2_object()
+      (t1,t2,t3,t4,q,sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Face_handle& f, int i,
+			    const Site_2& q, Sign sgn) const {
+    CGAL_precondition( !is_infinite(f) &&
+		       !is_infinite(f->neighbor(i)) );
+    return finite_edge_interior( f->vertex( ccw(i) )->site(),
+				 f->vertex(  cw(i) )->site(),
+				 f->vertex(     i  )->site(),
+				 this->_tds.mirror_vertex(f, i)->site(),
+				 q, sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
+			    const Vertex_handle& v3, const Vertex_handle& v4,
+			    const Vertex_handle& v, Sign sgn) const {
+    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
+		       !is_infinite(v3) && !is_infinite(v4) &&
+		       !is_infinite(v) );
+    return finite_edge_interior( v1->site(), v2->site(),
+				 v3->site(), v4->site(),
+				 v->site(), sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
+			    const Site_2& t3, const Site_2& q,
+			    Sign sgn) const {
+    return
+    geom_traits().finite_edge_interior_conflict_2_object()(t1,t2,t3,q,sgn);
+  }
+
+  inline
+  bool finite_edge_interior(const Site_2& t1, const Site_2& t2,
+			    const Site_2& q,  Sign sgn) const {
+    return
+    geom_traits().finite_edge_interior_conflict_2_object()(t1,t2,q,sgn);
+  }
+
+  bool finite_edge_interior(const Face_handle& f, int i,
+			    const Site_2& p, Sign sgn, int) const;
+
+  bool finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
+			    const Vertex_handle& v3, const Vertex_handle& v4,
+			    const Vertex_handle& v, Sign, int) const;
+
+  inline
+  bool infinite_edge_interior(const Site_2& t2, const Site_2& t3,
+			      const Site_2& t4, const Site_2& q,
+			      Sign sgn) const {
+    return
+      geom_traits().infinite_edge_interior_conflict_2_object()
+      (t2,t3,t4,q,sgn);
+  }
+
+
+  bool infinite_edge_interior(const Face_handle& f, int i,
+			      const Site_2& q, Sign sgn) const;
+
+  bool infinite_edge_interior(const Vertex_handle& v1,
+			      const Vertex_handle& v2,
+			      const Vertex_handle& v3,
+			      const Vertex_handle& v4,
+			      const Vertex_handle& v,
+			      Sign sgn) const;
+
+  bool edge_interior(const Face_handle& f, int i,
+		     const Site_2& t, Sign sgn) const;
+
+  bool edge_interior(const Edge& e,
+		     const Site_2& t, Sign sgn) const {
+    return edge_interior(e.first, e.second, t, sgn);
+  }
+
+  bool edge_interior(const Vertex_handle& v1,
+		     const Vertex_handle& v2,
+		     const Vertex_handle& v3,
+		     const Vertex_handle& v4,
+		     const Vertex_handle& v,
+		     Sign sgn) const;
+
+  inline Arrangement_type
+  arrangement_type(const Site_2& t, const Vertex_handle& v) const {
+    if ( is_infinite(v) ) { return AT2::DISJOINT; }
+    return arrangement_type(t, v->site());
+  }
+
+  Arrangement_type arrangement_type(const Site_2& p, const Site_2& q) const;
+
+  inline
+  bool are_parallel(const Site_2& p, const Site_2& q) const {
+    return geom_traits().are_parallel_2_object()(p, q);
+  }
+
+  inline Oriented_side
+  oriented_side(const Site_2& s1, const Site_2&s2,
+                const Site_2& supp, const Site_2& p) const
+  {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return geom_traits().oriented_side_2_object()(s1, s2, supp, p);
+  }
+
+  inline Oriented_side
+  oriented_side(const Site_2& s1, const Site_2& s2, const Site_2& s3,
+		const Site_2& supp, const Site_2& p) const {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return geom_traits().oriented_side_2_object()(s1, s2, s3, supp, p);
+  }
+
+  bool is_degenerate_edge(const Site_2& p1,
+			  const Site_2& p2,
+			  const Site_2& p3,
+			  const Site_2& p4) const {
+    return geom_traits().is_degenerate_edge_2_object()
+      (p1, p2, p3, p4);
+  }
+
+  bool is_degenerate_edge(const Vertex_handle& v1,
+			  const Vertex_handle& v2,
+			  const Vertex_handle& v3,
+			  const Vertex_handle& v4) const {
+    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) &&
+		       !is_infinite(v3) && !is_infinite(v4) );
+
+    return is_degenerate_edge(v1->site(), v2->site(),
+			      v3->site(), v4->site());
+  }
+
+  bool is_degenerate_edge(const Face_handle& f, int i) const {
+    Vertex_handle v1 = f->vertex( ccw(i) );
+    Vertex_handle v2 = f->vertex(  cw(i) );
+    Vertex_handle v3 = f->vertex(     i  );
+    Vertex_handle v4 = this->_tds.mirror_vertex(f, i);
+
+    return is_degenerate_edge(v1, v2, v3, v4);
+  }
+
+  bool is_degenerate_edge(const Edge& e) const {
+    return is_degenerate_edge(e.first, e.second);
+  }
+
+  Vertex_handle first_endpoint_of_segment(const Vertex_handle& v) const;
+  Vertex_handle second_endpoint_of_segment(const Vertex_handle& v) const;
+
+}; // Segment_Delaunay_graph_2
+
+
+template<class Gt, class D_S, class LTag>
+std::istream& operator>>(std::istream& is,
+			 Segment_Delaunay_graph_2<Gt,D_S,LTag>& sdg)
+{
+  sdg.file_input(is);
+  return is;
+}
+
+template<class Gt, class D_S, class LTag>
+std::ostream& operator<<(std::ostream& os,
+			 const Segment_Delaunay_graph_2<Gt,D_S,LTag>& sdg)
+{
+  sdg.file_output(os);
+  return os;
+}
+
+} //namespace CGAL
+
+
+#include <CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h>
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h
new file mode 100644
index 0000000..bfbcd23
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h
@@ -0,0 +1,473 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
+
+#include <CGAL/Segment_Delaunay_graph_2/basic.h>
+#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h>
+
+#include <CGAL/Filtered_predicate.h>
+#include <CGAL/Filtered_construction.h>
+
+#include <CGAL/number_utils_classes.h>
+#include <CGAL/Cartesian_converter.h>
+
+namespace CGAL {
+
+
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+// the filtered Traits class
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+
+template<class CK_t, class CK_MTag, class EK_t, class EK_MTag,
+	 class FK_t, class FK_MTag, class C2E_t, class C2F_t,
+	 class ITag>
+class Segment_Delaunay_graph_filtered_traits_base_2
+{
+private:
+  typedef
+  Segment_Delaunay_graph_filtered_traits_base_2<CK_t, CK_MTag,
+						EK_t, EK_MTag,
+						FK_t, FK_MTag,
+						C2E_t, C2F_t,
+						ITag>  Self;
+
+  typedef Segment_Delaunay_graph_traits_base_2<CK_t,CK_MTag,ITag> CK_traits;
+  typedef Segment_Delaunay_graph_traits_base_2<FK_t,FK_MTag,ITag> FK_traits;
+  typedef Segment_Delaunay_graph_traits_base_2<EK_t,EK_MTag,ITag> EK_traits;
+
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<CK_t,ITag>  CK;
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<FK_t,ITag>  FK;
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<EK_t,ITag>  EK;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,EK,C2E_t>   C2E;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,FK,C2F_t>   C2F;
+
+  typedef
+  Cartesian_converter<FK, CK, To_double<typename FK::RT> >  F2C_t;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<FK,CK,F2C_t>   F2C;
+
+  typedef
+  Cartesian_converter<EK, CK, To_double<typename EK::RT> >  E2C_t;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<EK,CK,E2C_t>   E2C;
+  
+  // Types for the construction kernel
+  typedef typename CK::Point_2                CK_Point_2;
+  typedef typename CK::Line_2                 CK_Line_2;
+  typedef typename CK::Segment_2              CK_Segment_2;
+  typedef typename CK::Ray_2                  CK_Ray_2;
+
+  typedef typename CK::Site_2                 CK_Site_2;
+
+  typedef typename CK::FT                     CK_FT;
+  typedef typename CK::RT                     CK_RT;
+
+  // Types for the exact kernel
+  typedef typename EK::Point_2                EK_Point_2;
+  typedef typename EK::Line_2                 EK_Line_2;
+  typedef typename EK::Segment_2              EK_Segment_2;
+  typedef typename EK::Ray_2                  EK_Ray_2;
+
+  typedef typename EK::Site_2                 EK_Site_2;
+
+  typedef typename EK::FT                     EK_FT;
+  typedef typename EK::RT                     EK_RT;
+
+  // Types for the filtering kernel
+  typedef typename FK::Point_2                FK_Point_2;
+  typedef typename FK::Line_2                 FK_Line_2;
+  typedef typename FK::Segment_2              FK_Segment_2;
+  typedef typename FK::Ray_2                  FK_Ray_2;
+
+  typedef typename FK::Site_2                 FK_Site_2;
+
+  typedef typename FK::FT                     FK_FT;
+  typedef typename FK::RT                     FK_RT;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  TYPE DEFINITIONS
+  //-----------------------------------------------------------------------
+
+  // BASIC TYPES
+  //------------
+  typedef CK_t                          R;
+  typedef CK_MTag                       Method_tag;
+  typedef ITag                          Intersections_tag;
+
+  typedef CK_t                          Construction_kernel;
+  typedef FK_t                          Filtering_kernel;
+  typedef EK_t                          Exact_kernel;
+
+  typedef CK_traits                     Construction_traits;
+  typedef FK_traits                     Filtering_traits;
+  typedef EK_traits                     Exact_traits;
+
+  typedef CK_MTag                       Construction_traits_method_tag;
+  typedef FK_MTag                       Filtering_traits_method_tag;
+  typedef EK_MTag                       Exact_traits_method_tag;
+
+  typedef typename CK::Point_2          Point_2;
+  typedef typename CK::Line_2           Line_2;
+  typedef typename CK::Segment_2        Segment_2;
+  typedef typename CK::Ray_2            Ray_2;
+  //  typedef typename CK::Circle_2         Circle_2;
+  typedef typename CK::Site_2           Site_2;
+
+  typedef typename CK::Object_2         Object_2;
+
+  typedef typename CK::FT               FT;
+  typedef typename CK::RT               RT;
+
+  typedef typename CK::Rep_tag          Rep_tag;
+
+protected:
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Arrangement_enum
+  Arrangement_enum;
+
+private:
+  typedef typename CK_traits::Construct_svd_vertex_2
+  CK_Construct_svd_vertex_2;
+
+  typedef typename FK_traits::Construct_svd_vertex_2
+  FK_Construct_svd_vertex_2;
+
+  typedef typename EK_traits::Construct_svd_vertex_2
+  EK_Construct_svd_vertex_2;
+
+public:
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //---------------------------------
+  typedef typename CK::Construct_object_2     Construct_object_2;
+  typedef typename CK::Assign_2               Assign_2;
+
+  // CONSTRUCTIONS
+  //--------------
+  // vertex and Voronoi circle
+  typedef
+  Filtered_construction<CK_Construct_svd_vertex_2,
+			EK_Construct_svd_vertex_2,
+			FK_Construct_svd_vertex_2,
+			C2E, C2F, E2C, F2C>
+  Construct_svd_vertex_2;
+
+  // L2 traits do not contain bisector constructions
+  typedef Tag_false Tag_has_bisector_constructions;
+
+  //  typedef typename CK::Construct_site_2   Construct_site_2;
+
+  //  typedef typename CK_traits::Construct_sdg_circle_2
+  //  Construct_sdg_circle_2;
+
+private:
+  // PREDICATES FOR THE TWO KERNELS
+  //-------------------------------
+#if 1
+  // Predicates for the filtering kernel
+  typedef typename FK_traits::Compare_x_2        FK_Compare_x_2;
+  typedef typename FK_traits::Compare_y_2        FK_Compare_y_2;
+  typedef typename FK_traits::Orientation_2      FK_Orientation_2;
+  typedef typename FK_traits::Equal_2            FK_Equal_2;
+  typedef typename FK_traits::Are_parallel_2     FK_Are_parallel_2;
+
+  typedef typename FK_traits::Oriented_side_of_bisector_2
+  FK_Oriented_side_of_bisector_2;
+
+  typedef typename FK_traits::Vertex_conflict_2  FK_Vertex_conflict_2;
+
+  typedef typename FK_traits::Finite_edge_interior_conflict_2
+  FK_Finite_edge_interior_conflict_2;
+
+  typedef typename FK_traits::Infinite_edge_interior_conflict_2
+  FK_Infinite_edge_interior_conflict_2;
+
+  typedef typename FK_traits::Is_degenerate_edge_2
+  FK_Is_degenerate_edge_2;
+
+  typedef typename FK_traits::Arrangement_type_2 FK_Arrangement_type_2;
+  typedef typename FK_traits::Oriented_side_2    FK_Oriented_side_2;
+
+  // Predicates for the exact kernel
+  typedef typename EK_traits::Compare_x_2        EK_Compare_x_2;
+  typedef typename EK_traits::Compare_y_2        EK_Compare_y_2;
+  typedef typename EK_traits::Orientation_2      EK_Orientation_2;
+  typedef typename EK_traits::Equal_2            EK_Equal_2;
+  typedef typename EK_traits::Are_parallel_2     EK_Are_parallel_2;
+
+  typedef typename EK_traits::Oriented_side_of_bisector_2
+  EK_Oriented_side_of_bisector_2;
+
+  typedef typename EK_traits::Vertex_conflict_2  EK_Vertex_conflict_2;
+
+  typedef typename EK_traits::Finite_edge_interior_conflict_2
+  EK_Finite_edge_interior_conflict_2;
+
+  typedef typename EK_traits::Infinite_edge_interior_conflict_2
+  EK_Infinite_edge_interior_conflict_2;
+
+  typedef typename EK_traits::Is_degenerate_edge_2
+  EK_Is_degenerate_edge_2;
+
+  typedef typename EK_traits::Arrangement_type_2 EK_Arrangement_type_2;
+  typedef typename EK_traits::Oriented_side_2    EK_Oriented_side_2;
+
+#else
+  // Predicates for the filtering kernel
+  typedef Sdg_compare_x_2<FK>                    FK_Compare_x_2;
+  typedef Sdg_compare_y_2<FK>                    FK_Compare_y_2;
+  typedef Sdg_orientation_C2<FK>                 FK_Orientation_2;
+  typedef Sdg_are_same_points_C2<FK>             FK_Equal_2;
+  typedef Sdg_are_parallel_C2<FK>                FK_Are_parallel_2;
+
+  typedef Sdg_oriented_side_of_bisector_C2<FK,FK_MTag>
+  FK_Oriented_side_of_bisector_2;
+
+  typedef Sdg_incircle_2<FK,FK_MTag>             FK_Vertex_conflict_2;
+
+  typedef Sdg_finite_edge_interior_2<FK,FK_MTag>
+  FK_Finite_edge_interior_conflict_2;
+
+  typedef Sdg_infinite_edge_interior_2<FK,FK_MTag>
+  FK_Infinite_edge_interior_conflict_2;
+
+  typedef Sdg_is_degenerate_edge_C2<FK,FK_MTag>  FK_Is_degenerate_edge_2;
+  typedef Sdg_arrangement_type_C2<FK>            FK_Arrangement_type_2;
+  typedef Sdg_oriented_side_C2<FK,FK_MTag>       FK_Oriented_side_2;
+
+  // Predicates for the exact kernel
+  typedef Sdg_compare_x_2<EK>                    EK_Compare_x_2;
+  typedef Sdg_compare_y_2<EK>                    EK_Compare_y_2;
+  typedef Sdg_orientation_C2<EK>                 EK_Orientation_2;
+  typedef Sdg_are_same_points_C2<EK>             EK_Equal_2;
+  typedef Sdg_are_parallel_C2<EK>                EK_Are_parallel_2;
+
+  typedef Sdg_oriented_side_of_bisector_C2<EK,EK_MTag>
+  EK_Oriented_side_of_bisector_2;
+
+  typedef Sdg_incircle_2<EK,EK_MTag>             EK_Vertex_conflict_2;
+
+  typedef Sdg_finite_edge_interior_2<EK,EK_MTag>
+  EK_Finite_edge_interior_conflict_2;
+
+  typedef Sdg_infinite_edge_interior_2<EK,EK_MTag>
+  EK_Infinite_edge_interior_conflict_2;
+
+  typedef Sdg_is_degenerate_edge_C2<EK,EK_MTag>  EK_Is_degenerate_edge_2;
+  typedef Sdg_arrangement_type_C2<EK>            EK_Arrangement_type_2;
+  typedef Sdg_oriented_side_C2<EK,EK_MTag>       EK_Oriented_side_2;
+#endif
+
+public:
+  // PREDICATES
+  //-----------
+  typedef
+  Filtered_predicate<EK_Compare_x_2, FK_Compare_x_2, C2E, C2F>
+  Compare_x_2;
+
+  typedef
+  Filtered_predicate<EK_Compare_y_2, FK_Compare_y_2, C2E, C2F>
+  Compare_y_2;
+
+  typedef
+  Filtered_predicate<EK_Orientation_2, FK_Orientation_2, C2E, C2F>
+  Orientation_2;
+
+  typedef
+  Filtered_predicate<EK_Equal_2, FK_Equal_2, C2E, C2F>
+  Equal_2;
+
+  typedef
+  Filtered_predicate<EK_Are_parallel_2,	FK_Are_parallel_2, C2E, C2F>
+  Are_parallel_2;
+
+  typedef
+  Filtered_predicate<EK_Oriented_side_of_bisector_2,
+		     FK_Oriented_side_of_bisector_2, C2E, C2F>
+  Oriented_side_of_bisector_2;
+
+  typedef
+  Filtered_predicate<EK_Vertex_conflict_2,
+		     FK_Vertex_conflict_2, C2E, C2F>
+  Vertex_conflict_2;
+
+  typedef
+  Filtered_predicate<EK_Finite_edge_interior_conflict_2,
+		     FK_Finite_edge_interior_conflict_2, C2E, C2F>
+  Finite_edge_interior_conflict_2;
+
+  typedef
+  Filtered_predicate<EK_Infinite_edge_interior_conflict_2,
+		     FK_Infinite_edge_interior_conflict_2, C2E, C2F>
+  Infinite_edge_interior_conflict_2;
+
+  typedef
+  Filtered_predicate<EK_Is_degenerate_edge_2,
+		     FK_Is_degenerate_edge_2, C2E, C2F>
+  Is_degenerate_edge_2;
+
+  typedef typename CK::Less_x_2 Less_x_2;
+  typedef typename CK::Less_y_2 Less_y_2;
+
+private:
+  typedef
+  Filtered_predicate<EK_Arrangement_type_2, FK_Arrangement_type_2, C2E, C2F>
+  Arrangement_type_2_base;
+
+public:
+  struct Arrangement_type_2
+    : public Arrangement_type_2_base, public Arrangement_enum
+  {};
+
+  typedef
+  Filtered_predicate<EK_Oriented_side_2, FK_Oriented_side_2, C2E, C2F>
+  Oriented_side_2;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  ACCESS TO OBJECTS
+  //-----------------------------------------------------------------------
+
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //---------------------------------
+  Assign_2
+  assign_2_object() const {
+    return Assign_2();
+  }
+
+  Construct_object_2
+  construct_object_2_object() const { 
+    return Construct_object_2();
+  }
+
+  // CONSTRUCTIONS
+  //--------------
+  Construct_svd_vertex_2
+  construct_svd_vertex_2_object() const { 
+    return Construct_svd_vertex_2();
+  }
+
+  /*
+  Construct_site_2
+  construct_site_2_object() const { 
+    return Construct_site_2();
+  }
+  */
+
+  /*
+  Construct_sdg_circle_2
+  construct_sdg_circle_2_object() const {
+    return Construct_sdg_circle_2();
+  }
+  */
+
+  // PREDICATES
+  //-----------
+  Compare_x_2
+  compare_x_2_object() const {
+    return Compare_x_2();
+  }
+
+  Compare_y_2
+  compare_y_2_object() const {
+    return Compare_y_2();
+  }
+
+  Orientation_2
+  orientation_2_object() const {
+    return Orientation_2();
+  }
+
+  Equal_2
+  equal_2_object() const {
+    return Equal_2();
+  }
+
+  Are_parallel_2
+  are_parallel_2_object() const {
+    return Are_parallel_2();
+  }
+
+  Oriented_side_of_bisector_2
+  oriented_side_of_bisector_2_object() const {
+    return Oriented_side_of_bisector_2();
+  }
+
+  Vertex_conflict_2
+  vertex_conflict_2_object() const {
+    return Vertex_conflict_2();
+  }
+
+  Finite_edge_interior_conflict_2
+  finite_edge_interior_conflict_2_object() const {
+    return Finite_edge_interior_conflict_2();
+  }
+
+  Infinite_edge_interior_conflict_2
+  infinite_edge_interior_conflict_2_object() const {
+    return Infinite_edge_interior_conflict_2();
+  }
+
+  Is_degenerate_edge_2
+  is_degenerate_edge_2_object() const {
+    return Is_degenerate_edge_2();
+  }
+
+  Arrangement_type_2
+  arrangement_type_2_object() const {
+    return Arrangement_type_2();
+  }
+
+  Oriented_side_2
+  oriented_side_2_object() const {
+    return Oriented_side_2();
+  }
+
+  Less_x_2
+  less_x_2_object() const {
+    return Less_x_2();
+  }
+
+  Less_y_2
+  less_y_2_object() const {
+    return Less_y_2();
+  }
+};
+
+
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h
new file mode 100644
index 0000000..894508f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h
@@ -0,0 +1,117 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h>
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraph_2 {
+
+//-----------------------------------------------------------------------------
+
+
+
+template<class K, class Method_tag>
+class Oriented_side_C2
+  : public Basic_predicates_C2<K>
+{
+private:
+
+  typedef Basic_predicates_C2<K>              Base;
+  typedef Voronoi_vertex_C2<K,Method_tag>     Voronoi_vertex_2;
+  
+  typedef typename Base::Point_2              Point_2;
+  typedef typename Base::Segment_2            Segment_2;
+  typedef typename Base::Line_2               Line_2;
+  typedef typename Base::Site_2               Site_2;
+  typedef typename Base::FT                   FT;
+  typedef typename Base::RT                   RT;
+
+
+  using Base::compute_supporting_line;
+  using Base::compute_perpendicular;
+
+public:
+  typedef typename Base::Oriented_side        Oriented_side;
+  typedef Oriented_side                       result_type;
+  typedef Site_2                              argument_type;
+
+  // computes the oriented side of the Voronoi vertex of s1, s2, inf
+  // wrt the line that passes through the point p and its direction
+  // is the direction of the supporting line of s, rotated by 90
+  // degrees counterclockwise.
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s, const Site_2& p) const
+  {
+    CGAL_precondition(s1.is_point() || s2.is_point());
+    CGAL_precondition(s1.is_segment() || s2.is_segment());
+
+    return this->operator()((s1.is_point()? s1: s2), s, p);
+  }
+
+  // computes the oriented side of the point q
+  // wrt the line that is passes through the point p and its direction
+  // is the direction of the supporting line of s, rotated by 90
+  // degrees counterclockwise.
+  Oriented_side operator()(const Site_2& q, 
+			   const Site_2& s, const Site_2& p) const
+  {
+    CGAL_precondition( q.is_point() );
+    CGAL_precondition( s.is_segment() && p.is_point() );
+
+    Line_2 l = compute_supporting_line( s );
+    Line_2 lp = compute_perpendicular(l, p.point());
+
+    return lp.oriented_side(q.point());
+  }
+
+  // computes the oriented side of the Voronoi vertex of s1, s2, s3
+  // wrt the line that is passes through the point p and its direction
+  // is the direction of the supporting line of s, rotated by 90
+  // degrees counterclockwise.
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s3,
+			   const Site_2& s, const Site_2& p) const
+  {
+    CGAL_precondition( s.is_segment() && p.is_point() );
+
+    Voronoi_vertex_2 v(s1, s2, s3);
+    Line_2 l = compute_supporting_line( s );
+    Line_2 lp = compute_perpendicular(l, p.point());
+
+    return v.oriented_side(lp);
+  }
+};
+
+
+//-----------------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraph_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_ORIENTED_SIDE_C2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h
new file mode 100644
index 0000000..80bc825
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h
@@ -0,0 +1,3287 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+// class implementation continued
+//=================================
+
+namespace CGAL {
+
+//====================================================================
+//====================================================================
+//                   CONSTRUCTORS
+//====================================================================
+//====================================================================
+
+// copy constructor
+template<class Gt, class ST, class D_S, class LTag>
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+Segment_Delaunay_graph_2(const Segment_Delaunay_graph_2& other)
+  : DG(other.geom_traits())
+{
+  Segment_Delaunay_graph_2&
+    non_const_other = const_cast<Segment_Delaunay_graph_2&>(other);
+  copy(non_const_other);
+  CGAL_postcondition( is_valid() );
+}
+
+// assignment operator
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Self&
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+operator=(const Self& other)
+{
+  if ( this != &other ) {
+    Segment_Delaunay_graph_2&
+      non_const_other = const_cast<Segment_Delaunay_graph_2&>(other);
+    copy(non_const_other);
+  }
+  return (*this);
+}
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR INSERTION
+//====================================================================
+//====================================================================
+
+//--------------------------------------------------------------------
+// insertion of first three sites
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_first(const Storage_site_2& ss, const Point_2& )
+{
+  CGAL_precondition( number_of_vertices() == 0 );
+
+  Vertex_handle v = this->_tds.insert_second();
+  v->set_site(ss);
+  return v;
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_second(const Storage_site_2& ss, const Point_2& p)
+{
+  CGAL_precondition( number_of_vertices() == 1 );
+  // p0 is actually a point
+  Site_2 p0 = finite_vertices_begin()->site();
+  // MK: change the equality test between points by the functor in
+  // geometric traits
+  Site_2 tp = Site_2::construct_site_2(p);
+  if ( same_points(tp,p0) ) {
+    // merge info of identical sites
+    merge_info(finite_vertices_begin(), ss);
+    return finite_vertices_begin();
+  }
+
+  return create_vertex_dim_up(ss);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_third(const Storage_site_2& ss, const Point_2& p)
+{
+  Site_2 t = Site_2::construct_site_2(p);
+  return insert_third(t, ss);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_third(const Site_2& t, const Storage_site_2& ss)
+{
+  CGAL_precondition( number_of_vertices() == 2 );
+
+  // p0 and p1 are actually points
+  Vertex_handle v0 = finite_vertices_begin();
+  Vertex_handle v1 = ++finite_vertices_begin();
+  Site_2 t0 = v0->site();
+  Site_2 t1 = v1->site();
+
+  if ( same_points(t, t0) ) {
+    // merge info of identical sites
+    merge_info(v0, ss);
+    return v0;
+  }
+  if ( same_points(t, t1) ) {
+    // merge info of identical sites
+    merge_info(v1, ss);
+    return v1;
+  }
+
+  Vertex_handle v = create_vertex_dim_up(ss);
+
+  Face_handle f(finite_faces_begin());
+
+  Site_2 s1 = f->vertex(0)->site();
+  Site_2 s2 = f->vertex(1)->site();
+  Site_2 s3 = f->vertex(2)->site();
+
+  Sign s12i3 = geom_traits().vertex_conflict_2_object()(s1, s2, s3);
+  Sign s21i3 = geom_traits().vertex_conflict_2_object()(s2, s1, s3);
+
+  CGAL_assertion(s12i3 != ZERO);
+  CGAL_assertion(s21i3 != ZERO);
+
+  if ( s12i3 != s21i3 ) {
+    if ( s21i3 == NEGATIVE ) {
+      f->reorient();
+      for (int i = 0; i < 3; i++) {
+	f->neighbor(i)->reorient();
+      }
+    }
+  } else {
+    typename Geom_traits::Compare_x_2 compare_x =
+      geom_traits().compare_x_2_object();
+
+    Comparison_result xcmp12 = compare_x(s1, s2);
+    if ( xcmp12 == SMALLER ) {        // x1 < x2
+      Comparison_result xcmp23 = compare_x(s2, s3);
+      if ( xcmp23 == SMALLER ) {            // x2 < x3
+	flip(f, f->index(v1));
+      } else {
+	Comparison_result xcmp31 = compare_x(s3, s1);
+	if ( xcmp31 == SMALLER ) {          // x3 < x1
+	  flip(f, f->index(v0));
+	} else {                            // x1 < x3 < x2
+	  flip(f, f->index(v)); 
+	}
+      }
+    } else if ( xcmp12 == LARGER ) {  // x1 > x2
+      Comparison_result xcmp32 = compare_x(s3, s2);
+      if ( xcmp32 == SMALLER ) {            // x3 < x2
+	flip(f, f->index(v1));
+      } else {
+	Comparison_result xcmp13 = compare_x(s1, s3);
+	if ( xcmp13 == SMALLER ) {          // x1 < x3
+	  flip(f, f->index(v0));
+	} else {                            // x2 < x3 < x1
+	  flip(f, f->index(v));
+	}
+      }
+    } else {                          // x1 == x2
+      typename Geom_traits::Compare_y_2 compare_y =
+	geom_traits().compare_y_2_object();
+
+      Comparison_result ycmp12 = compare_y(s1, s2);
+      if ( ycmp12 == SMALLER ) {      // y1 < y2
+	Comparison_result ycmp23 = compare_y(s2, s3);
+	if ( ycmp23 == SMALLER ) {          // y2 < y3
+	  flip(f, f->index(v1));
+	} else {
+	  Comparison_result ycmp31 = compare_y(s3, s1);
+	  if ( ycmp31 == SMALLER ) {        // y3 < y1
+	    flip(f, f->index(v0));
+	  } else {                          // y1 < y3 < y2
+	    flip(f, f->index(v));
+	  }
+	}
+      } else if ( ycmp12 == LARGER ) { // y1 > y2
+	Comparison_result ycmp32 = compare_y(s3, s2);
+	if ( ycmp32 == SMALLER ) {           // y3 < y2
+	  flip(f, f->index(v1));
+	} else {
+	  Comparison_result ycmp13 = compare_y(s1, s3);
+	  if ( ycmp13 == SMALLER ) {         // y1 < y3
+	    flip(f, f->index(v0));
+	  } else {                           // y2 < y3 < y1
+	    flip(f, f->index(v));
+	  }
+	}
+      } else {
+	// this line should never have been reached
+	CGAL_error();
+      }
+    }
+  }
+
+  return v;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_third(const Storage_site_2& ss, Vertex_handle , Vertex_handle )
+{
+  CGAL_precondition( number_of_vertices() == 2 );
+
+  //  this can only be the case if the first site is a segment
+  CGAL_precondition( dimension() == 1 );
+
+  Vertex_handle v = create_vertex_dim_up(ss);
+
+  Face_circulator fc = incident_faces(v);
+
+  while ( true ) {
+    Face_handle f(fc);
+    if ( !is_infinite(f) ) {
+      flip(f, f->index(v));
+      break;
+    }
+    ++fc;
+  }
+  
+  return v;
+}
+
+//--------------------------------------------------------------------
+// insertion of a point
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_point(const Storage_site_2& ss, const Point_2& p, Vertex_handle vnear)
+{
+  size_type n = number_of_vertices();
+  if ( n == 0 ) {
+    return insert_first(ss, p);
+  } else if ( n == 1 ) {
+    return insert_second(ss, p);
+  } else if ( n == 2 ) {
+    return insert_third(ss, p);
+  }
+
+  Site_2 t = Site_2::construct_site_2(p);
+  return insert_point(ss, t, vnear);
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_point(const Storage_site_2& ss, const Site_2& t,
+	     Vertex_handle vnear)
+{
+  CGAL_precondition( t.is_point() );
+  CGAL_assertion( number_of_vertices() > 2 );
+
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  // MK::ERROR: I need to write a insert_point_no_search method that
+  // does not search for the nearest neighbor; this should be used by
+  // insert_point. Below the first version of the code is correct. The
+  // second is what the insert_point method should do before calling
+  // insert_point_no_search.
+
+  // first find the nearest neighbor
+#if 1
+  Vertex_handle  vnearest = nearest_neighbor( t, vnear );
+#else
+  Vertex_handle vnearest;
+  if ( vnear == Vertex_handle() ) {
+    vnearest = nearest_neighbor( t, vnear );
+  } else {
+    vnearest = vnear;
+  }
+#endif
+
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+  //*********************************************************************
+
+
+  // check is the point has already been inserted or lies on
+  // a segment already inserted
+  Arrangement_type at_res = arrangement_type(t, vnearest);
+  if ( vnearest->is_point() ) {
+    if ( at_res == AT2::IDENTICAL ) {
+      // merge info of identical sites
+      merge_info(vnearest, ss);
+      return vnearest;
+    }
+  } else {
+    CGAL_assertion( vnearest->is_segment() );
+    CGAL_assertion( at_res != AT2::TOUCH_1 );
+    CGAL_assertion( at_res != AT2::TOUCH_2 );
+    CGAL_assertion( at_res == AT2::DISJOINT || at_res == AT2::INTERIOR );
+    if ( at_res == AT2::INTERIOR ) {
+      CGAL_assertion( t.is_input() );
+
+      Vertex_triple vt = (this->*insert_exact_point_on_segment_ptr)(
+          ss, t, vnearest);
+      return vt.first;
+    } else {
+      // the point to be inserted does not belong to the interior of a
+      // segment
+      CGAL_assertion( at_res == AT2::DISJOINT );
+    }
+  }
+
+  return insert_point2(ss, t, vnearest);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_point2(const Storage_site_2& ss, const Site_2& t,
+	      Vertex_handle vnearest)
+{
+  CGAL_precondition( t.is_point() );
+  CGAL_assertion( number_of_vertices() > 2 );
+
+  CGAL_expensive_precondition
+    ( nearest_neighbor(t, vnearest) == vnearest );
+
+  // find the first conflict
+
+#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
+  // verify that there are no intersections...
+  Vertex_circulator vc = incident_vertices(vnearest);
+  Vertex_circulator vc_start = vc;
+  do {
+    Vertex_handle vv(vc);
+    Arrangement_type at_res = arrangement_type(t, vv);
+
+    CGAL_assertion( at_res == AT2::DISJOINT );
+    ++vc;
+  } while ( vc != vc_start );
+#endif
+
+  // first look for conflict with vertex
+  Face_circulator fc_start = incident_faces(vnearest);
+  Face_circulator fc = fc_start;
+  Face_handle start_f;
+  Sign s;
+
+#ifndef CGAL_SDG_NO_FACE_MAP
+  std::map<Face_handle,Sign> sign_map;
+#endif
+
+  do {
+    Face_handle f(fc);
+
+    s = incircle(f, t);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+    f->tds_data().set_incircle_sign(s);
+#else
+    sign_map[f] = s;
+#endif
+
+    if ( s == NEGATIVE ) {
+      start_f = f;
+      break;
+    }
+    ++fc;
+  } while ( fc != fc_start );
+
+  // we are not in conflict with a Voronoi vertex, so we have to
+  // be in conflict with the interior of a Voronoi edge
+  if ( s != NEGATIVE ) {
+    Edge_circulator ec_start = incident_edges(vnearest);
+    Edge_circulator ec = ec_start;
+
+    bool interior_in_conflict(false);
+    Edge e;
+    do {
+      e = *ec;
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+      Sign s1 = e.first->tds_data().incircle_sign();
+      Sign s2 = e.first->neighbor(e.second)->tds_data().incircle_sign();
+#else
+      Sign s1 = sign_map[e.first];
+      Sign s2 = sign_map[e.first->neighbor(e.second)];
+#endif
+
+      if ( s1 == s2 ) {
+	interior_in_conflict = edge_interior(e, t, s1);
+      } else {
+	// It seems that there was a problem here when one of the
+	// signs was positive and the other zero. In this case we
+	// still check pretending that both signs where positive
+	interior_in_conflict = edge_interior(e, t, POSITIVE);
+      }
+
+      if ( interior_in_conflict ) { break; }
+      ++ec;
+    } while ( ec != ec_start );
+
+#ifndef CGAL_SDG_NO_FACE_MAP
+    sign_map.clear();
+#endif
+
+    CGAL_assertion( interior_in_conflict );
+
+    return insert_degree_2(e, ss);
+  }
+
+
+  // we are in conflict with a Voronoi vertex; start from that and 
+  // find the entire conflict region and then repair the diagram
+  List l;
+#ifndef CGAL_SDG_NO_FACE_MAP
+  Face_map fm;
+#endif
+
+  Triple<bool, Vertex_handle, Arrangement_type>
+    vcross(false, Vertex_handle(), AT2::DISJOINT);
+
+  // MK:: NEED TO WRITE A FUNCTION CALLED find_conflict_region WHICH
+  // IS GIVEN A STARTING FACE, A LIST, A FACE MAP, A VERTEX MAP AND A
+  // LIST OF FLIPPED EDGES AND WHAT IS DOES IS INITIALIZE THE CONFLICT 
+  // REGION AND EXPANDS THE CONFLICT REGION.
+  initialize_conflict_region(start_f, l);
+#ifdef CGAL_SDG_NO_FACE_MAP
+  expand_conflict_region(start_f, t, ss, l, vcross);
+#else
+  expand_conflict_region(start_f, t, ss, l, fm, sign_map, vcross);
+#endif
+
+  CGAL_assertion( !vcross.first );
+
+  Vertex_handle v = create_vertex(ss);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+  retriangulate_conflict_region(v, l);
+#else
+  retriangulate_conflict_region(v, l, fm);
+#endif
+
+  return v;
+}
+
+//--------------------------------------------------------------------
+// insertion of a point that lies on a segment
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Face_pair
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+find_faces_to_split(const Vertex_handle& v, const Site_2& t) const
+{
+  CGAL_precondition( v->is_segment() );
+
+#ifndef CGAL_NO_ASSERTIONS
+  {
+    // count number of adjacent infinite faces
+    Face_circulator fc = incident_faces(v);
+    Face_circulator fc_start = fc;
+    int n_inf = 0;
+    do {
+      if ( is_infinite(fc) ) { n_inf++; }
+      fc++;
+    } while ( fc != fc_start );
+    CGAL_assertion( n_inf % 2 == 0 );
+  }
+#endif
+
+  Face_circulator fc1 = incident_faces(v);
+  Face_circulator fc2 = fc1; ++fc2;
+  Face_circulator fc_start = fc1;
+  Face_handle f1, f2;
+  bool found_f1 = false, found_f2 = false;
+  Site_2 sitev_supp = v->site().supporting_site();
+  do {
+    Face_handle ff1(fc1), ff2(fc2);
+
+    Oriented_side os1, os2;
+
+    if ( is_infinite(ff1) ) {
+      int id_v = ff1->index(v);
+      int cw_v = this->cw( id_v );
+      int ccw_v = this->ccw( id_v );
+
+      Site_2 sv_ep;
+      if ( is_infinite( ff1->vertex(cw_v) ) ) {
+	CGAL_assertion(  !is_infinite( ff1->vertex(ccw_v) )  );
+	CGAL_assertion( ff1->vertex(ccw_v)->site().is_point() );
+	sv_ep = ff1->vertex(ccw_v)->site();
+        os1 = oriented_side(v->site(), sv_ep, sitev_supp, t);
+      } else {
+	CGAL_assertion(  !is_infinite( ff1->vertex( cw_v) )  );
+	CGAL_assertion( ff1->vertex( cw_v)->site().is_point() );
+	sv_ep = ff1->vertex( cw_v)->site();
+        os1 = oriented_side(sv_ep, v->site(), sitev_supp, t);
+      }
+    } else {
+      os1 = oriented_side(fc1->vertex(0)->site(),
+			  fc1->vertex(1)->site(),
+			  fc1->vertex(2)->site(),
+			  sitev_supp, t);
+    }
+
+    if ( is_infinite(ff2) ) {
+      int id_v = ff2->index(v);
+      int cw_v = this->cw( id_v );
+      int ccw_v = this->ccw( id_v );
+
+      Site_2 sv_ep;
+      if ( is_infinite( ff2->vertex(cw_v) ) ) {
+	CGAL_assertion(  !is_infinite( ff2->vertex(ccw_v) )  );
+	CGAL_assertion( ff2->vertex(ccw_v)->site().is_point() );
+	sv_ep = ff2->vertex(ccw_v)->site();
+        os2 = oriented_side(v->site(), sv_ep, sitev_supp, t);
+      } else {
+	CGAL_assertion(  !is_infinite( ff2->vertex( cw_v) )  );
+	CGAL_assertion( ff2->vertex( cw_v)->site().is_point() );
+	sv_ep = ff2->vertex( cw_v)->site();
+        os2 = oriented_side(sv_ep, v->site(), sitev_supp, t);
+      }
+    } else {
+      os2 = oriented_side(fc2->vertex(0)->site(),
+			  fc2->vertex(1)->site(),
+			  fc2->vertex(2)->site(),
+			  sitev_supp, t);
+    }
+
+    if ( !found_f1 &&
+	 os1 != ON_POSITIVE_SIDE && os2 == ON_POSITIVE_SIDE ) {
+      f1 = ff2;
+      found_f1 = true;
+    }
+
+    if ( !found_f2 &&
+         os1 != ON_NEGATIVE_SIDE && os2 == ON_NEGATIVE_SIDE ) {
+      f2 = ff2;
+      found_f2 = true;
+    }
+
+    if ( found_f1 && found_f2 ) { break; }
+
+    ++fc1, ++fc2;
+  } while ( fc_start != fc1 ); 
+
+
+  CGAL_assertion( found_f1 && found_f2 );
+  CGAL_assertion( f1 != f2 );
+
+  return Face_pair(f1, f2);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_triple
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+			      Vertex_handle v)
+{
+  // splits the segment site v->site() in two and inserts represented by t
+  // on return the three vertices are, respectively, the vertex
+  // corresponding to t and the two subsegments of v->site()
+
+  CGAL_assertion( t.is_point() );
+  CGAL_assertion( t.is_input() );
+
+  Storage_site_2 ssitev = v->storage_site();  
+
+  CGAL_assertion( ssitev.is_segment() );
+
+  Face_pair fpair = find_faces_to_split(v, t);
+
+  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
+    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
+
+  // now I need to update the sites for vertices v1 and v2
+  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
+  Storage_site_2 ssv1 = split_storage_site(ssitev, ss, true);
+  v1->set_site( ssv1 );
+
+  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
+  Storage_site_2 ssv2 = split_storage_site(ssitev, ss, false);
+  v2->set_site( ssv2 );
+
+  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
+  Vertex_handle vsx =
+    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
+
+  vsx->set_site(ss);
+  // merge info of point and segment; the point lies on the segment
+  merge_info(vsx, ssitev);
+
+  return Vertex_triple(vsx, v1, v2);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_triple
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_point_on_segment(const Storage_site_2& ss, const Site_2& ,
+			Vertex_handle v, const Tag_true&)
+{
+  // splits the segment site v->site() in two and inserts the point of
+  // intersection of t and v->site()
+  // on return the three vertices are, respectively, the point of
+  // intersection and the two subsegments of v->site()
+
+  Storage_site_2 ssitev = v->storage_site();
+  Storage_site_2 ssx = st_.construct_storage_site_2_object()(ss, ssitev);
+
+  Face_pair fpair = find_faces_to_split(v, ssx.site());
+
+  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
+    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
+
+  // now I need to update the sites for vertices v1 and v2
+  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
+  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
+
+  Storage_site_2 ssv1 =
+    st_.construct_storage_site_2_object()(ssitev, ss, true);
+
+  Storage_site_2 ssv2 =
+    st_.construct_storage_site_2_object()(ssitev, ss, false);
+
+  v1->set_site( ssv1 );
+  v2->set_site( ssv2 );
+
+  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
+  Vertex_handle vsx =
+    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
+
+  vsx->set_site(ssx);
+
+  return Vertex_triple(vsx, v1, v2);
+}
+
+//--------------------------------------------------------------------
+// insertion of a segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_segment(const Storage_site_2& ss, const Site_2& t, Vertex_handle vnear)
+{
+  CGAL_precondition( t.is_segment() );
+  CGAL_precondition( t.is_input() );
+
+  if ( is_degenerate_segment(t) ) {
+    Storage_site_2 ss_src = ss.source_site();
+    convert_info(ss_src, ss, true);
+    return insert_point(ss_src, t.source(), vnear);
+  }
+
+  Storage_site_2 ss_src = ss.source_site();
+  convert_info(ss_src, ss, true);
+  Storage_site_2 ss_trg = ss.target_site();
+  convert_info(ss_trg, ss, false);
+
+  Vertex_handle v0 = insert_point( ss_src, t.source(), vnear );
+  CGAL_assertion( is_valid() );
+  Vertex_handle v1 = insert_point( ss_trg, t.target(), v0 );
+  CGAL_assertion( is_valid() );
+
+  if ( number_of_vertices() == 2 ) {
+    return insert_third(ss, v0, v1);
+  }
+
+  return insert_segment_interior(t, ss, v0);
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_segment_interior(const Site_2& t, const Storage_site_2& ss,
+			Vertex_handle vnearest)
+{
+  CGAL_precondition( t.is_segment() );
+  CGAL_precondition( number_of_vertices() > 2 );
+
+  CGAL_assertion( vnearest != Vertex_handle() );
+
+  // find the first conflict
+
+  // first look if there are intersections...
+  Vertex_circulator vc = incident_vertices(vnearest);
+  Vertex_circulator vc_start = vc;
+  do {
+    Vertex_handle vv(vc);
+    if ( is_infinite(vv) ) {
+      vc++;
+      continue;
+    }
+
+    Arrangement_type at_res = arrangement_type(t, vv);
+
+    if ( vv->is_segment() ) {
+      if ( at_res == AT2::DISJOINT || at_res == AT2::TOUCH_1 ||
+	   at_res == AT2::TOUCH_2 || at_res == AT2::TOUCH_11 ||
+	   at_res == AT2::TOUCH_12 || at_res == AT2::TOUCH_21 ||
+	   at_res == AT2::TOUCH_22 ) {
+	// do nothing
+      } else if ( at_res == AT2::IDENTICAL ) {
+	// merge info of identical items
+	merge_info(vv, ss);
+	return vv;
+      } else if ( at_res == AT2::CROSSING ) {
+	Intersections_tag itag;
+	return insert_intersecting_segment(ss, t, vv, itag);
+      } else if ( at_res == AT2::TOUCH_11_INTERIOR_1 ) {
+	Vertex_handle vp = second_endpoint_of_segment(vv);	
+	Storage_site_2 ssvp = vp->storage_site();
+	Storage_site_2 sss = split_storage_site(ss, ssvp, false);
+
+	Storage_site_2 sss1 = split_storage_site(ss, ssvp, true);
+	// merge the info of the first (common) subsegment
+	merge_info(vv, sss1);
+	// merge the info of the (common) splitting endpoint
+	merge_info(vp, ss);
+
+	return insert_segment_interior(sss.site(), sss, vp);
+      } else if ( at_res == AT2::TOUCH_12_INTERIOR_1 ) {
+	Vertex_handle vp = first_endpoint_of_segment(vv);	
+	Storage_site_2 ssvp = vp->storage_site();
+	Storage_site_2 sss = split_storage_site(ss, ssvp, true);
+
+	/*Storage_site_2 sss1 =*/
+  split_storage_site(ss, ssvp, false);
+	// merge the info of the second (common) subsegment
+	//	merge_info(vv, sss);
+	// merge the info of the (common) splitting endpoint
+	merge_info(vp, ss);
+
+	return insert_segment_interior(sss.site(), sss, vp);
+      } else {
+	// this should never be reached; the only possible values for
+	// at_res are DISJOINT, CROSSING, TOUCH_11_INTERIOR_1
+	// and TOUCH_12_INTERIOR_1
+	CGAL_error();
+      }
+    } else {
+      CGAL_assertion( vv->is_point() );
+      if ( at_res == AT2::INTERIOR ) {
+	Storage_site_2 ssvv = vv->storage_site();
+	if ( ssvv.is_input() ) {
+	  Storage_site_2 ss1 = split_storage_site(ss, ssvv, true);
+	  Storage_site_2 ss2 = split_storage_site(ss, ssvv, false);
+	  // merge the info of the splitting point and the segment
+	  merge_info(vv, ss);
+	  insert_segment_interior(ss1.site(), ss1, vv);
+	  return insert_segment_interior(ss2.site(), ss2, vv);
+	} else {
+	  // this should never be reached; the only possible values for
+	  // at_res are DISJOINT and INTERIOR
+	  CGAL_error();
+	}
+      }
+    }
+    ++vc;
+  } while ( vc != vc_start );
+
+  // first look for conflict with vertex
+  Face_circulator fc_start = incident_faces(vnearest);
+  Face_circulator fc = fc_start;
+  Face_handle start_f;
+  Sign s;
+
+#ifndef CGAL_SDG_NO_FACE_MAP
+  std::map<Face_handle,Sign> sign_map;
+#endif
+
+  do {
+    Face_handle f(fc);
+
+    s = incircle(f, t);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+    f->tds_data().set_incircle_sign(s);
+#else
+    sign_map[f] = s;
+#endif
+
+    if ( s == NEGATIVE ) {
+      start_f = f;
+      break;
+    }
+    ++fc;
+  } while ( fc != fc_start );
+
+  // segments must have a conflict with at least one vertex
+  CGAL_assertion( s == NEGATIVE );
+
+  // we are in conflict with a Voronoi vertex; start from that and 
+  // find the entire conflict region and then repair the diagram
+  List l;
+#ifndef CGAL_SDG_NO_FACE_MAP
+  Face_map fm;
+#endif
+
+  Triple<bool, Vertex_handle, Arrangement_type>
+    vcross(false, Vertex_handle(), AT2::DISJOINT);
+
+  // MK:: NEED TO WRITE A FUNCTION CALLED find_conflict_region WHICH
+  // IS GIVEN A STARTING FACE, A LIST, A FACE MAP, A VERTEX MAP AND A
+  // LIST OF FLIPPED EDGES AND WHAT IS DOES IS INITIALIZE THE CONFLICT 
+  // REGION AND EXPANDS THE CONFLICT REGION.
+  initialize_conflict_region(start_f, l);
+#ifdef CGAL_SDG_NO_FACE_MAP
+  expand_conflict_region(start_f, t, ss, l, vcross);
+#else
+  expand_conflict_region(start_f, t, ss, l, fm, sign_map, vcross);
+#endif
+
+  CGAL_assertion( vcross.third == AT2::DISJOINT ||
+		  vcross.third == AT2::CROSSING ||
+		  vcross.third == AT2::INTERIOR );
+
+  // the following condition becomes true only if intersecting
+  // segments are found
+  if ( vcross.first ) {
+    if ( t.is_segment() ) {
+      if ( vcross.third == AT2::CROSSING ) {
+	Intersections_tag itag;
+	return insert_intersecting_segment(ss, t, vcross.second, itag);
+      } else if ( vcross.third == AT2::INTERIOR ) {
+	Storage_site_2 ssvv = vcross.second->storage_site();
+	Storage_site_2 ss1 = split_storage_site(ss, ssvv, true);
+	Storage_site_2 ss2 = split_storage_site(ss, ssvv, false);
+	// merge the info of the splitting point and the segment
+	merge_info(vcross.second, ss);
+	insert_segment_interior(ss1.site(), ss1, vcross.second);
+	return insert_segment_interior(ss2.site(), ss2, vcross.second);
+      } else {
+	// this should never be reached; the only possible values for
+	// vcross.third are CROSSING, INTERIOR and DISJOINT
+	CGAL_error();
+      }
+    }
+  }
+
+  // no intersecting segment has been found; we insert the segment as
+  // usual...
+  Vertex_handle v = create_vertex(ss);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+  retriangulate_conflict_region(v, l);
+#else
+  retriangulate_conflict_region(v, l, fm);
+#endif
+
+  return v;
+}
+
+
+//--------------------------------------------------------------------
+// insertion of an intersecting segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_intersecting_segment_with_tag(const Storage_site_2& /* ss */,
+				     const Site_2& /* t */, Vertex_handle /* v */,
+				     Tag_false)
+{
+#if defined(__POWERPC__) && \
+  defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
+  // hack to avoid nasty warning for G++ 3.4 on Darwin
+  static int i;
+#else
+  static int i = 0;
+#endif
+  if ( i == 0 ) {
+    i = 1;
+    print_error_message();
+  }
+  return Vertex_handle();
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				     const Site_2& t, Vertex_handle v,
+				     Tag_true tag)
+{
+  CGAL_precondition( t.is_segment() && v->is_segment() );
+
+  const Storage_site_2& ssitev = v->storage_site();
+  Site_2 sitev = ssitev.site();
+
+  if ( same_segments(t, sitev) ) {
+    merge_info(v, ss);
+    return v;
+  }
+
+  Vertex_triple vt = (this->*insert_point_on_segment_ptr)(ss, t, v, tag);
+
+  Vertex_handle vsx = vt.first;
+  
+  Storage_site_2 ss3 = st_.construct_storage_site_2_object()(ss, ssitev, true);
+  Storage_site_2 ss4 = st_.construct_storage_site_2_object()(ss, ssitev, false);
+  Site_2 s3 = ss3.site();
+  Site_2 s4 = ss4.site();
+
+  insert_segment_interior(s3, ss3, vsx);
+  insert_segment_interior(s4, ss4, vsx);
+  return vsx;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// helper methods for insertion (find conflict region)
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+initialize_conflict_region(const Face_handle& f, List& l)
+{
+
+
+  l.clear();
+  for (int i = 0; i < 3; i++) {
+    l.push_back(sym_edge(f, i));
+  }
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+expand_conflict_region(const Face_handle& f, const Site_2& t,
+		       const Storage_site_2& ss,
+#ifdef CGAL_SDG_NO_FACE_MAP
+		       List& l,
+#else
+		       List& l, Face_map& fm,
+		       std::map<Face_handle,Sign>& sign_map,
+#endif
+		       Triple<bool,Vertex_handle,Arrangement_type>& vcross)
+{
+#ifdef CGAL_SDG_NO_FACE_MAP
+  if ( f->tds_data().is_in_conflict() ) { return; }
+#else
+  if ( fm.find(f) != fm.end() ) { return; }
+#endif
+
+  // this is done to stop the recursion when intersecting segments
+  // are found
+  if ( vcross.first ) { return; }
+
+  // setting fm[f] to true means that the face has been reached and
+  // that the face is available for recycling. If we do not want the
+  // face to be available for recycling we must set this flag to
+  // false.
+#ifdef CGAL_SDG_NO_FACE_MAP
+  f->tds_data().mark_in_conflict();
+  fhc_.push_back(f);
+#else
+  fm[f] = true;
+#endif
+
+  //  CGAL_assertion( fm.find(f) != fm.end() );
+
+  for (int i = 0; i < 3; i++) {
+    Face_handle n = f->neighbor(i);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+    bool face_registered = n->tds_data().is_in_conflict();
+#else
+    bool face_registered = (fm.find(n) != fm.end());
+#endif
+
+    if ( !face_registered ) {
+      for (int j = 0; j < 3; j++) {
+	Vertex_handle vf = n->vertex(j);
+
+	if ( is_infinite(vf) ) { continue; }
+
+	Arrangement_type at_res = arrangement_type(t, vf);
+
+	CGAL_assertion( vcross.third == AT2::DISJOINT ||
+			vcross.third == AT2::CROSSING ||
+			vcross.third == AT2::INTERIOR );
+
+	if ( vf->is_segment() ) {
+	  CGAL_assertion( at_res != AT2::IDENTICAL );
+	  CGAL_assertion( at_res != AT2::TOUCH_11_INTERIOR_1 );
+	  CGAL_assertion( at_res != AT2::TOUCH_12_INTERIOR_1 );
+
+	  if ( at_res == AT2::CROSSING ) {
+	    vcross.first = true;
+	    vcross.second = vf;
+	    vcross.third = AT2::CROSSING;
+	    l.clear();
+#ifdef CGAL_SDG_NO_FACE_MAP
+	    fhc_.clear();
+#else
+	    fm.clear();
+#endif
+	    return;
+	  } else {
+	    CGAL_assertion ( at_res == AT2::DISJOINT ||
+			     at_res == AT2::TOUCH_1 ||
+			     at_res == AT2::TOUCH_2 ||
+			     at_res == AT2::TOUCH_11 ||
+			     at_res == AT2::TOUCH_12 ||
+			     at_res == AT2::TOUCH_21 ||
+			     at_res == AT2::TOUCH_22 );
+	    // we do nothing in these cases
+	  }
+	} else {
+	  CGAL_assertion( vf->is_point() );
+	  if ( at_res == AT2::INTERIOR ) {
+	    vcross.first = true;
+	    vcross.second = vf;
+	    vcross.third = AT2::INTERIOR;
+	    l.clear();
+#ifdef CGAL_SDG_NO_FACE_MAP
+	    fhc_.clear();
+#else
+	    fm.clear();
+#endif
+	    return;
+	  }
+	}
+      }
+    }
+
+    Sign s = incircle(n, t);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+    n->tds_data().set_incircle_sign(s);
+
+    Sign s_f = f->tds_data().incircle_sign();
+#else
+    sign_map[n] = s;
+
+    Sign s_f = sign_map[f];
+#endif
+
+    if ( s == POSITIVE ) { continue; }
+    if ( s != s_f ) { continue; }
+
+    bool interior_in_conflict = edge_interior(f, i, t, s);
+
+    if ( !interior_in_conflict ) { continue; }
+
+    if ( face_registered ) { continue; }
+
+    Edge e = sym_edge(f, i);
+
+    CGAL_assertion( l.is_in_list(e) );
+    int j = this->_tds.mirror_index(f, i);
+    Edge e_before = sym_edge(n, ccw(j));
+    Edge e_after = sym_edge(n, cw(j));
+    if ( !l.is_in_list(e_before) ) {
+      l.insert_before(e, e_before);
+    }
+    if ( !l.is_in_list(e_after) ) {
+      l.insert_after(e, e_after);
+    }
+    l.remove(e);
+
+#ifdef CGAL_SDG_NO_FACE_MAP
+    expand_conflict_region(n, t, ss, l, vcross);
+#else
+    expand_conflict_region(n, t, ss, l, fm, sign_map, vcross);
+#endif
+
+    // this is done to stop the recursion when intersecting segments
+    // are found
+    //    if ( fm.size() == 0 && l.size() == 0 ) { return; }
+    if ( vcross.first ) { return; }
+  } // for-loop
+}
+
+
+//--------------------------------------------------------------------
+// retriangulate conflict region
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+add_bogus_vertex(Edge e, List& l)
+{
+  Edge esym = sym_edge(e);
+  Face_handle g1 = e.first;
+  CGAL_assertion_code(Face_handle g2 = esym.first);
+
+  Vertex_handle v = insert_degree_2(e);
+
+  Face_circulator fc(v);
+  Face_handle f1(fc);
+  Face_handle f2(++fc);
+  int i1 = f1->index(v);
+  int i2 = f2->index(v);
+
+  CGAL_assertion( ((f1->neighbor(i1) == g1) && (f2->neighbor(i2) == g2)) ||
+		  ((f1->neighbor(i1) == g2) && (f2->neighbor(i2) == g1)) );
+
+  Edge ee, eesym;
+  if ( f1->neighbor(i1) == g1 ) {
+    ee = Edge(f2, i2);
+    eesym = Edge(f1, i1);
+  } else {
+    ee = Edge(f1, i1);
+    eesym = Edge(f2, i2);
+  }
+
+  l.replace(e, ee);
+  l.replace(esym, eesym);
+
+  return v;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_list
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+add_bogus_vertices(List& l)
+{
+#if defined(USE_INPLACE_LIST) && defined(CGAL_SDG_NO_FACE_MAP)
+  Vertex_list vertex_list;
+
+  Edge e_start = l.front();
+  Edge e = e_start;
+
+  std::list<Edge> edge_list;
+
+  do {
+    Edge esym = sym_edge(e);
+    if ( l.is_in_list(esym) ) {
+      if ( !esym.first->tds_data().is_selected(esym.second) ) {
+	e.first->tds_data().mark_selected(e.second);
+	edge_list.push_back(e);
+      }
+    }
+    e = l.next(e);
+  } while ( e != e_start );
+
+  e_start = l.front();
+  e = e_start;
+  do {
+    if ( e.first->tds_data().is_selected(e.second) ) {
+      e.first->tds_data().mark_unselected(e.second);
+    }
+  } while ( e != e_start );
+
+  typename std::list<Edge>::iterator it;
+
+  for (it = edge_list.begin();  it != edge_list.end(); ++it) {
+    Vertex_handle v = add_bogus_vertex(*it, l);
+    vertex_list.push_back(v);
+  }
+
+  return vertex_list;
+#else
+  Vertex_list vertex_list;
+
+  std::set<Edge> edge_list;
+
+  edge_list.clear();
+
+  Edge e_start = l.front();
+  Edge e = e_start;
+
+  do {
+    Edge esym = sym_edge(e);
+    if ( l.is_in_list(esym) &&
+	 edge_list.find(esym) == edge_list.end() ) {
+      edge_list.insert(e);
+    }
+    e = l.next(e);
+  } while ( e != e_start );
+
+  typename std::set<Edge>::iterator it;
+
+  for (it = edge_list.begin();  it != edge_list.end(); ++it) {
+    Vertex_handle v = add_bogus_vertex(*it, l);
+    vertex_list.push_back(v);
+  }
+
+  return vertex_list;
+#endif
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_bogus_vertices(Vertex_list& vl)
+{
+  while ( vl.size() > 0 ) {
+    Vertex_handle v = vl.front();
+    vl.pop_front();
+    remove_degree_2(v);
+  }
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+#ifdef CGAL_SDG_NO_FACE_MAP
+retriangulate_conflict_region(Vertex_handle v, List& l)
+#else
+retriangulate_conflict_region(Vertex_handle v, List& l,
+			      Face_map& fm)
+#endif
+
+{
+  // 1. add the bogus vetrices
+  Vertex_list dummy_vertices = add_bogus_vertices(l);
+
+  // 2. repair the face pointers...
+  Edge e_start = l.front();
+  Edge eit = e_start;
+  do {
+    CGAL_assertion_code(Edge esym =) sym_edge(eit);
+    Face_handle f = eit.first;
+    int k = eit.second;
+    CGAL_assertion( !l.is_in_list(esym) );
+#ifdef CGAL_SDG_NO_FACE_MAP
+    CGAL_assertion( !f->tds_data().is_in_conflict() );
+#else
+    CGAL_assertion( fm.find(f) == fm.end() );
+#endif
+    f->vertex(ccw(k))->set_face(f);
+    f->vertex( cw(k))->set_face(f);
+    eit = l.next(eit);
+  } while ( eit != e_start );
+
+  // 3. copy the edge list to a vector of edges and clear the edge list
+  // MK:: here I actually need to copy the edges to an std::list<Edge>, or
+  // even better add iterators to the list of type List
+  std::vector<Edge> ve(l.size());
+
+  Edge efront = l.front();
+  Edge e = efront;
+  unsigned int k = 0;
+  do {
+    ve[k] = e;
+    ++k;
+    e = l.next(e);
+  } while ( e != efront );
+
+  l.clear();
+
+  // 4. retriangulate the hole
+  this->_tds.star_hole(v, ve.begin(), ve.end());
+
+  // 5. remove the bogus vertices
+  remove_bogus_vertices(dummy_vertices);
+
+  // 6. remove the unused faces
+#ifdef CGAL_SDG_NO_FACE_MAP
+  typename std::vector<Face_handle>::iterator it;
+  for (it = fhc_.begin(); it != fhc_.end(); ++it) {
+    (*it)->tds_data().clear();
+    this->_tds.delete_face( *it );
+  }
+
+  fhc_.clear();
+#else
+  typename Face_map::iterator it;
+  for (it = fm.begin(); it != fm.end(); ++it) {
+    Face_handle fh = (*it).first;
+    this->_tds.delete_face(fh);
+  }
+
+  fm.clear();
+#endif
+
+  // 7. DONE!!!!
+}
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR REMOVAL
+//====================================================================
+//====================================================================
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+is_star(const Vertex_handle& v) const
+{
+  CGAL_precondition( v->storage_site().is_point() );
+
+  Vertex_circulator vc_start = incident_vertices(v);
+  Vertex_circulator vc = vc_start;
+  Storage_site_2 p = v->storage_site();
+
+  size_type count = 0;
+  do {
+    Storage_site_2 ss = vc->storage_site();
+    if ( ss.is_segment() && is_endpoint_of_segment(p, ss) ) {
+      ++count;
+      //      if ( count == 3 ) { break; }
+      if ( count == 3 ) { return true; }
+    }
+    ++vc;
+  } while ( vc != vc_start );
+
+  return false;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+is_linear_chain(const Vertex_handle& v0, const Vertex_handle& v1,
+		const Vertex_handle& v2) const
+{
+  Site_2 tt[3] = { v0->site(), v1->site(), v2->site() };
+
+  if ( tt[1].is_point() &&
+       tt[0].is_segment() &&
+       tt[2].is_segment() &&
+       is_endpoint_of_segment(tt[1], tt[0]) &&
+       is_endpoint_of_segment(tt[1], tt[2]) ) {
+    typename Geom_traits::Equal_2 are_equal = geom_traits().equal_2_object();
+    Site_2 s_end[2];
+    if (  are_equal( tt[1], tt[0].source_site() )  ) {
+      s_end[0] = tt[0].target_site();
+    } else {
+      s_end[0] = tt[0].source_site();
+    }
+
+    if (  are_equal( tt[1], tt[2].source_site() )  ) {
+      s_end[1] = tt[2].target_site();
+    } else {
+      s_end[1] = tt[2].source_site();
+    }
+
+    typename Geom_traits::Orientation_2 orientation =
+      geom_traits().orientation_2_object();
+
+    return orientation(s_end[0], s_end[1], tt[1]) == COLLINEAR;
+  }
+  return false;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+is_flippable(const Face_handle& f, int i) const
+{
+  CGAL_assertion( !is_infinite(f->vertex( cw(i) )) );
+
+  Vertex_handle v_other = f->vertex( ccw(i) );
+  Vertex_handle v0 = f->vertex( i );
+  Vertex_handle v1 = this->_tds.mirror_vertex( f, i );
+
+  if ( is_infinite(v_other) || is_infinite(v0) || is_infinite(v1) ) {
+    return false;
+  }
+
+  Vertex_handle v = f->vertex( cw(i) );
+
+  Storage_site_2 ss = v->storage_site();
+  Storage_site_2 ss_other = v_other->storage_site();
+  if ( ss_other.is_point() && ss.is_segment() &&
+       is_endpoint_of_segment(ss_other,	ss) && is_star(v_other) ) {
+    return false;
+  }
+
+  if ( is_linear_chain(v0, v_other, v1) ) { return false; }
+
+  return (v0 != v1) && is_degenerate_edge(f, i);
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+minimize_degree(const Vertex_handle& v)
+{
+  CGAL_precondition ( degree(v) > 3 );
+
+  Face_circulator fc_start = incident_faces(v);
+  Face_circulator fc = incident_faces(v);
+  bool found(false);
+  do {
+    Face_handle f = Face_handle(fc);
+    int i = ccw( f->index(v) );
+
+    CGAL_assertion( f->vertex( cw(i) ) == v );
+
+    if ( is_flippable(f,i) ) {
+      Edge e = flip(f, i);
+      f = e.first;
+
+      if ( !f->has_vertex(v) ) {
+	f = e.first->neighbor(e.second);
+	CGAL_assertion( f->has_vertex(v) );
+      }
+
+      fc = --( incident_faces(v,f) );
+      fc_start = fc;
+      found = true;
+    } else {
+      ++fc;
+      found = false;
+    }
+  } while ( found || fc != fc_start );
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+equalize_degrees(const Vertex_handle& v, Self& small_d,
+		 std::map<Vertex_handle,Vertex_handle>& vmap,
+		 List& l) const
+{
+  size_type deg = degree(v);
+  CGAL_assertion( l.size() <= deg );
+  if ( l.size() == deg ) { return; }
+#if 0
+  std::cerr << "size of l  : " << l.size() << std::endl;
+  std::cerr << "degree of v: " << deg << std::endl;
+#endif
+
+  //  typedef std::map<Edge,Edge>  Edge_map;
+  // maps edges on the boundary of the conflict region from the small
+  // diagram to edges of the star of v in the small diagram
+  //  Edge_map emap;
+
+  Edge e_small_start = l.front();
+  Edge e_small = e_small_start;
+  bool found;
+  Edge e_small_begin;
+  Edge e_large_begin;
+  do {
+    found = false;
+    Vertex_handle v_sml_src = e_small.first->vertex(cw(e_small.second));
+    Vertex_handle v_sml_trg = e_small.first->vertex(ccw(e_small.second));
+
+    // first we find a first edge in common
+    Face_circulator fc_start = incident_faces(v);
+    Face_circulator fc = fc_start;
+
+    do {
+      int id = fc->index(v);
+      Vertex_handle v_lrg_src = fc->vertex(ccw(id));
+      Vertex_handle v_lrg_trg = fc->vertex(cw(id));
+      if ( vmap[v_sml_src] == v_lrg_src && vmap[v_sml_trg] == v_lrg_trg ) {
+	found = true;
+	e_large_begin = Edge(fc, id);
+	e_small_begin = e_small;
+	break;
+      }
+    } while ( ++fc != fc_start );
+    if ( found ) { break; }
+    e_small = l.next(e_small);
+  } while ( e_small != e_small_start );
+
+  CGAL_assertion( found );
+
+  Face_circulator fc_start = incident_faces(v, e_large_begin.first);
+  Face_circulator fc = fc_start;
+  e_small = e_small_begin;
+  do {
+    int id = fc->index(v);
+    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
+    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
+    Vertex_handle vlrg_src = fc->vertex(ccw(id));
+    Vertex_handle vlrg_trg = fc->vertex(cw(id));
+    if ( vmap[vsml_src] != vlrg_src || vmap[vsml_trg] != vlrg_trg ) {
+      Edge e_small_prev = l.previous(e_small);
+      std::cerr << "size of l: " << l.size() << std::endl;
+      l.remove(e_small);
+
+      std::cerr << "size of l: " << l.size() << std::endl;
+
+      Edge e_small_new = small_d.flip(e_small);
+      Edge e_small_new_sym = small_d.sym_edge(e_small_new);
+      Face_handle f1 = e_small_new.first;
+      Face_handle f2 = e_small_new_sym.first;
+
+      if ( f2->vertex(e_small_new_sym.second) == vsml_src ) {
+	std::swap(f1, f2);
+	std::swap(e_small_new, e_small_new_sym);
+	CGAL_assertion( f1->vertex(e_small_new.second) == vsml_src );
+	CGAL_assertion( f2->vertex(e_small_new_sym.second) == vsml_trg );
+      }
+
+      Edge to_list1(f1, cw(e_small_new.second));
+      Edge to_list2(f2, ccw(e_small_new_sym.second));
+
+      e_small = small_d.sym_edge(to_list1);
+
+      l.insert_after(e_small_prev, e_small);
+      std::cerr << "size of l: " << l.size() << std::endl;
+      l.insert_after(e_small, small_d.sym_edge(to_list2));
+      std::cerr << "size of l: " << l.size() << std::endl;
+    } else {
+      e_small = l.next(e_small);
+      ++fc;
+    }
+    CGAL_assertion( l.size() <= deg );
+  } while ( fc != fc_start );
+
+#if 0
+  std::cerr << "size of l  : " << l.size() << std::endl;
+  std::cerr << "degree of v: " << deg << std::endl;
+#endif
+
+#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)  
+  // we go around the boundary of the conflict region verify that all
+  // edges are there
+  CGAL_assertion( l.size() == degree(v) );
+  e_small = e_small_begin;
+  fc_start = incident_faces(v, e_large_begin.first);
+  fc = fc_start;
+  do {
+    int id = fc->index(v);
+    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
+    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
+    Vertex_handle vlrg_src = fc->vertex(ccw(id));
+    Vertex_handle vlrg_trg = fc->vertex(cw(id));
+    CGAL_assertion(vmap[vsml_src] == vlrg_src && vmap[vsml_trg] == vlrg_trg );
+
+    // go to next edge
+    e_small = l.next(e_small);
+  } while ( ++fc != fc_start );
+#endif
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+expand_conflict_region_remove(const Face_handle& f, const Site_2& t,
+			      const Storage_site_2& ss,
+			      List& l, Face_map& fm, Sign_map& sign_map)
+{
+  if ( fm.find(f) != fm.end() ) { return; }
+
+  // setting fm[f] to true means that the face has been reached and
+  // that the face is available for recycling. If we do not want the
+  // face to be available for recycling we must set this flag to
+  // false.
+  fm[f] = true;
+
+  //  CGAL_assertion( fm.find(f) != fm.end() );
+
+  for (int i = 0; i < 3; i++) {
+    Face_handle n = f->neighbor(i);
+
+    bool face_registered = (fm.find(n) != fm.end());
+
+    Sign s = incircle(n, t);
+
+    sign_map[n] = s;
+
+    Sign s_f = sign_map[f];
+
+    if ( s == POSITIVE ) { continue; }
+    if ( s != s_f ) { continue; }
+
+    bool interior_in_conflict = edge_interior(f, i, t, s);
+
+    if ( !interior_in_conflict ) { continue; }
+
+    if ( face_registered ) { continue; }
+
+    Edge e = sym_edge(f, i);
+
+    CGAL_assertion( l.is_in_list(e) );
+    int j = this->_tds.mirror_index(f, i);
+    Edge e_before = sym_edge(n, ccw(j));
+    Edge e_after = sym_edge(n, cw(j));
+    if ( !l.is_in_list(e_before) ) {
+      l.insert_before(e, e_before);
+    }
+    if ( !l.is_in_list(e_after) ) {
+      l.insert_after(e, e_after);
+    }
+    l.remove(e);
+
+    expand_conflict_region_remove(n, t, ss, l, fm, sign_map);
+  } // for-loop
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+find_conflict_region_remove(const Vertex_handle& v,
+			    const Vertex_handle& vnearest,
+			    List& l, Face_map& fm, Sign_map&)
+{
+  CGAL_precondition( vnearest != Vertex_handle() );
+  Storage_site_2 ss = v->storage_site();
+  Site_2 t = ss.site();
+
+  // find the first conflict
+
+  // first look for conflict with vertex
+  Face_circulator fc_start = incident_faces(vnearest);
+  Face_circulator fc = fc_start;
+  Face_handle start_f;
+  Sign s;
+
+  Sign_map sign_map;
+
+  do {
+    Face_handle f(fc);
+
+    s = incircle(f, t);
+
+    sign_map[f] = s;
+
+    if ( s == NEGATIVE ) {
+      start_f = f;
+      break;
+    }
+    ++fc;
+  } while ( fc != fc_start );
+
+  CGAL_assertion( s == NEGATIVE );
+
+  // we are not in conflict with a Voronoi vertex, so we have to
+  // be in conflict with the interior of a Voronoi edge
+  if ( s != NEGATIVE ) {
+    Edge_circulator ec_start = incident_edges(vnearest);
+    Edge_circulator ec = ec_start;
+
+    bool interior_in_conflict(false);
+    Edge e;
+    do {
+      e = *ec;
+
+      Sign s1 = sign_map[e.first];
+      Sign s2 = sign_map[e.first->neighbor(e.second)];
+
+      if ( s1 == s2 ) {
+	interior_in_conflict = edge_interior(e, t, s1);
+      } else {
+	// It seems that there was a problem here when one of the
+	// signs was positive and the other zero. In this case we
+	// still check pretending that both signs where positive
+	interior_in_conflict = edge_interior(e, t, POSITIVE);
+      }
+
+      if ( interior_in_conflict ) { break; }
+      ++ec;
+    } while ( ec != ec_start );
+
+    sign_map.clear();
+
+    CGAL_assertion( interior_in_conflict );
+
+    l.push_back(e);
+    l.push_back(sym_edge(e));
+    return;
+  }
+
+  initialize_conflict_region(start_f, l);
+  expand_conflict_region_remove(start_f, t, ss,	l, fm, sign_map);
+}
+
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::size_type
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+count_faces(const List& l) const
+{
+  std::vector<Face_handle> flist;
+  get_faces(l, std::back_inserter(flist));
+  return flist.size();
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+fill_hole(const Self& small_d, const Vertex_handle& v, const List& l,
+	  std::map<Vertex_handle,Vertex_handle>& vmap)
+{
+#if 0
+  std::cerr << "size of l  : " << l.size() << std::endl;
+  std::cerr << "degree of v: " << degree(v) << std::endl;
+#endif
+
+  typedef std::map<Edge,Edge>  Edge_map;
+  // maps edges on the boundary of the conflict region from the small
+  // diagram to edges of the star of v in the small diagram
+  Edge_map emap;
+
+  Edge e_sml_sym = sym_edge(l.front());
+
+  Vertex_handle v_sml_src = e_sml_sym.first->vertex(ccw(e_sml_sym.second));
+  Vertex_handle v_sml_trg = e_sml_sym.first->vertex(cw(e_sml_sym.second));
+
+  // first we find a first edge in common
+  Face_circulator fc_start = incident_faces(v);
+  Face_circulator fc = fc_start;
+  Face_circulator fc_begin;
+  CGAL_assertion_code( bool found = false; )
+  do {
+    int id = fc->index(v);
+    Vertex_handle v_lrg_src = fc->vertex(ccw(id));
+    Vertex_handle v_lrg_trg = fc->vertex(cw(id));
+    if ( vmap[v_sml_src] == v_lrg_src && vmap[v_sml_trg] == v_lrg_trg ) {
+      CGAL_assertion_code( found = true; )
+      fc_begin = fc;
+      break;
+    }
+  } while ( ++fc != fc_start );
+  CGAL_assertion( found );
+
+  // container of faces to delete
+  std::list<Face_handle> to_delete;
+
+  // next we go around the boundary of the conflict region and map all edges
+  Edge e_small = l.front();
+  fc_start = incident_faces(v, fc_begin);
+  fc = fc_start;
+  do {
+    int id = fc->index(v);
+#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
+    Vertex_handle vsml_src = e_small.first->vertex(cw(e_small.second));
+    Vertex_handle vsml_trg = e_small.first->vertex(ccw(e_small.second));
+    Vertex_handle vlrg_src = fc->vertex(ccw(id));
+    Vertex_handle vlrg_trg = fc->vertex(cw(id));
+    CGAL_assertion(vmap[vsml_src] == vlrg_src && vmap[vsml_trg] == vlrg_trg );
+#endif
+    // set mapping
+    emap[e_small] = sym_edge(fc, id);
+    // keep face for deletion
+    to_delete.push_back(fc);
+    // go to next edge
+    e_small = l.next(e_small);
+  } while ( ++fc != fc_start );
+
+
+  // map the faces of the small diagram with the new faces of the
+  // large diagram
+  std::map<Face_handle,Face_handle> fmap;
+  std::vector<Face_handle> f_small, f_large;
+
+  small_d.get_faces(l, std::back_inserter(f_small));
+  for (unsigned int i = 0; i < f_small.size(); i++) {
+    Face_handle f = this->_tds.create_face();
+    fmap[ f_small[i] ] = f;
+    f_large.push_back(f);
+  }
+
+  CGAL_assertion( l.size() == degree(v) );
+  CGAL_assertion( f_small.size() == f_large.size() );
+  CGAL_assertion( f_small.size() == l.size() - 2 );
+  CGAL_assertion( f_small.size() == count_faces(l) );
+
+  // set the vertices for the new faces; also set the face for each
+  // vertex
+  for (typename std::vector<Face_handle>::iterator fit = f_small.begin();
+       fit != f_small.end(); ++fit) {
+    Face_handle ff_small = *fit;
+    Face_handle f = fmap[ff_small];
+
+    for (int i = 0; i < 3; ++i) {
+      CGAL_assertion( vmap.find(ff_small->vertex(i)) != vmap.end() );
+      f->set_vertex(i, vmap[ff_small->vertex(i)]);
+      // we are setting the face for each vertex a lot of times; we
+      // could possibly do it faster if we use the edges on the
+      // boundary of the conflict region
+      // in fact we may not even need it since the make_hole method
+      // updates the faces of the vertices of the boundary of the
+      // hole, and we do not introduce any new vertices
+      f->vertex(i)->set_face(f);
+    }
+  }
+
+  // set the neighbors for each face
+  for (typename std::vector<Face_handle>::iterator fit = f_small.begin();
+       fit != f_small.end(); ++fit) {
+    Face_handle ff_small = *fit;
+
+    for (int i = 0; i < 3; i++) {
+      Face_handle f = fmap[ff_small];
+      Face_handle n_small = ff_small->neighbor(i);
+      if ( fmap.find(n_small) != fmap.end() ) {
+	// this is one of the new faces
+	f->set_neighbor(i, fmap[n_small]);
+      } else {
+	// otherwise it is one of the old faces outside the conflict
+	// region; we have to use the edge map in this case
+	Edge e_small_sym = small_d.sym_edge(ff_small, i);
+	CGAL_assertion(emap.find(e_small_sym) != emap.end());
+
+	Edge e_large = emap[e_small_sym];
+	f->set_neighbor(i, e_large.first);
+	e_large.first->set_neighbor(e_large.second, f);
+      }
+    }
+  }
+
+  // delete the unused faces and the vertex
+  while ( !to_delete.empty() ) {
+    delete_face(to_delete.front());
+    to_delete.pop_front();
+  }
+  delete_vertex(v);
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_first(const Vertex_handle& v)
+{
+  Delaunay_graph::remove_first(v);
+  return true;
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_second(const Vertex_handle& v)
+{
+  Delaunay_graph::remove_second(v);
+  return true;
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_third(const Vertex_handle& v)
+{
+  if ( is_degree_2(v) ) {
+    CGAL_assertion( v->storage_site().is_point() );
+    Face_handle fh( incident_faces(v) );
+    int i = fh->index(v);
+    flip(fh, i);
+  } else if ( degree(v) == 4 ) {
+    Edge_circulator ec = incident_edges(v);
+    for (int i = 0; i < 4; i++) {
+      Edge e = *ec;
+      Edge sym = sym_edge(e);
+      if ( e.first->vertex(e.second) !=	sym.first->vertex(sym.second) ) {
+	flip(e);
+	break;
+      }
+      ++ec;
+    }
+  }
+
+  this->_tds.remove_dim_down( v );
+  return true;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+compute_small_diagram(const Vertex_handle& v, Self& small_d) const
+{
+  Vertex_circulator vc_start = incident_vertices(v);
+  Vertex_circulator vc = vc_start;
+
+  // insert all neighboring sites
+  do {
+    if ( !is_infinite(vc) ) {
+      Site_2 t = vc->site();
+      if ( t.is_input() ) {
+	small_d.insert(t);
+      } else if ( t.is_point() ) {
+	small_d.insert(t.supporting_site(0));
+	/*Vertex_handle vnear =*/ small_d.insert(t.supporting_site(1));
+	//	vh_small = sdg_small.nearest_neighbor(t, vnear);
+      } else {
+	CGAL_assertion( t.is_segment() );
+	/*Vertex_handle vnear =*/ small_d.insert(t.supporting_site());
+	//	vh_small = sdg_small.nearest_neighbor(t, vnear);
+      }
+      //      CGAL_assertion( vh_small != Vertex_handle() );
+      //      vmap[vh_small] = vh_large;
+    }
+    ++vc;
+  } while ( vc != vc_start );
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+compute_vertex_map(const Vertex_handle& v, const Self& small_d,
+		   std::map<Vertex_handle,Vertex_handle>& vmap) const
+{
+  Vertex_circulator vc_start = incident_vertices(v);
+  Vertex_circulator vc = vc_start;
+  Vertex_handle vh_large, vh_small;
+
+  do {
+    vh_large = Vertex_handle(vc);
+    if ( is_infinite(vh_large) ) {
+      vh_small = small_d.infinite_vertex();
+      vmap[vh_small] = vh_large;
+    } else { 
+#if !defined(CGAL_NO_ASSERTIONS) && !defined(NDEBUG)
+      vh_small = Vertex_handle();
+#endif
+      Site_2 t = vc->site();
+      if ( t.is_input() ) {
+	if ( t.is_segment() ) {
+	  Vertex_handle vv = small_d.nearest_neighbor( t.source() );
+	  Vertex_circulator vvc_start = small_d.incident_vertices(vv);
+	  Vertex_circulator vvc = vvc_start;
+	  do {
+	    if ( small_d.same_segments(t, vvc) ) {
+	      vh_small = vvc;
+	      break;
+	    }
+	  } while ( ++vvc != vvc_start );
+	  CGAL_assertion( small_d.same_segments(t, vh_small) );
+	} else {
+	  CGAL_assertion( t.is_point() );
+	  vh_small = small_d.nearest_neighbor( t.point() );
+	  CGAL_assertion( small_d.same_points(t, vh_small->site()) );
+	}
+      } else if ( t.is_segment() ) {
+	Vertex_handle vv =
+	  small_d.nearest_neighbor( t.source_site(), Vertex_handle() );
+	Vertex_circulator vvc_start = small_d.incident_vertices(vv);
+	Vertex_circulator vvc = vvc_start;
+	do {
+	  if ( small_d.same_segments(t, vvc) ) {
+	    vh_small = vvc;
+	    break;
+	  }
+	} while ( ++vvc != vvc_start );
+	CGAL_assertion( small_d.same_segments(t, vh_small) );
+      } else {
+	CGAL_assertion( t.is_point() );
+	vh_small = small_d.nearest_neighbor( t, Vertex_handle() );
+	CGAL_assertion( small_d.same_points(t, vh_small->site()) );
+      }
+      CGAL_assertion( vh_small != Vertex_handle() );
+      vmap[vh_small] = vh_large;
+    }
+    ++vc;
+  } while ( vc != vc_start );
+}
+
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_degree_d_vertex(const Vertex_handle& v)
+{
+#if 0
+  Self sdg_small;
+  compute_small_diagram(v, sdg_small);
+  std::map<Vertex_handle,Vertex_handle> vmap;
+  compute_vertex_map(v, sdg_small, vmap);
+
+  // find nearest neighbor of v in small diagram
+  Site_2 t = v->site();
+  Vertex_handle vn;
+
+  CGAL_assertion( t.is_input() );
+
+  if ( t.is_point() ) {
+    vn = sdg_small.nearest_neighbor( t.point() );
+  } else {
+    vn = sdg_small.nearest_neighbor( t.source() );
+  }
+  CGAL_assertion( vn != Vertex_handle() );
+
+  List l;
+  Face_map fm;
+  Sign_map sign_map;
+
+  sdg_small.find_conflict_region_remove(v, vn, l, fm, sign_map);
+
+  fm.clear();
+  sign_map.clear();
+
+  equalize_degrees(v, sdg_small, vmap, l);
+
+  fill_hole(sdg_small, v, l, vmap);
+
+  l.clear();
+  return;
+
+#else
+  minimize_degree(v);
+  size_type deg = degree(v);
+  if ( deg == 3 ) {
+    remove_degree_3(v);
+    return;
+  }
+  if ( deg == 2 ) {
+    remove_degree_2(v);
+    return;
+  }
+  
+  Self sdg_small;
+  compute_small_diagram(v, sdg_small);
+
+  if ( sdg_small.number_of_vertices() <= 2 ) {
+    CGAL_assertion( sdg_small.number_of_vertices() == 2 );
+    CGAL_assertion( deg == 4 );
+    Edge_circulator ec_start = incident_edges(v);
+    Edge_circulator ec = ec_start;
+    do {
+      if ( is_infinite(*ec) ) { break; }
+      ++ec;
+    } while ( ec != ec_start );
+    CGAL_assertion( is_infinite(ec) );
+    flip(*ec);
+    remove_degree_3(v);
+    return;
+  }
+
+  std::map<Vertex_handle,Vertex_handle> vmap;
+  compute_vertex_map(v, sdg_small, vmap);
+
+  // find nearest neighbor of v in small diagram
+  Site_2 t = v->site();
+  Vertex_handle vn;
+
+  CGAL_assertion( t.is_input() );
+
+  // here we find a site in the small diagram that serves as a
+  // starting point for finding all conflicts.
+  // To do that we find the nearest neighbor of t if t is a point;
+  // t is guarranteed to have a conflict with its nearest neighbor
+  // If t is a segment, then one endpoint of t is enough; t is
+  // guarranteed to have a conflict with the Voronoi edges around
+  // this endpoint
+  if ( t.is_point() ) {
+    vn = sdg_small.nearest_neighbor( t.point() );
+  } else {
+    vn = sdg_small.nearest_neighbor( t.source() );
+  }
+  CGAL_assertion( vn != Vertex_handle() );
+
+  List l;
+  Face_map fm;
+  Sign_map sign_map;
+
+  sdg_small.find_conflict_region_remove(v, vn, l, fm, sign_map);
+
+  fill_hole(sdg_small, v, l, vmap);
+
+  l.clear();
+  fm.clear();
+  sign_map.clear();
+#endif
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove_base(const Vertex_handle& v)
+{
+  Storage_site_2 ssv = v->storage_site();
+  CGAL_precondition( ssv.is_input() );
+
+  // first consider the case where we have up to 2 points
+  size_type n = number_of_vertices();
+
+  if ( n == 1 ) {
+    return remove_first(v);
+  } else if ( n == 2 ) {
+    return remove_second(v);
+  } 
+
+  // secondly check if the point to be deleted is adjacent to a segment
+  if ( ssv.is_point() ) {
+    Vertex_circulator vc_start = incident_vertices(v);
+    Vertex_circulator vc = vc_start;
+
+    do {
+      Storage_site_2 ss = vc->storage_site();
+      if ( ss.is_segment() && is_endpoint_of_segment(ssv, ss) ) {
+	return false;
+      }
+      ++vc;
+    } while ( vc != vc_start );
+  }
+
+  // now do the deletion
+  if ( n == 3 ) {
+    return remove_third(v);
+  }
+
+  size_type deg = degree(v);
+  if ( deg == 2 ) {
+    remove_degree_2(v);
+  } else if ( deg == 3 ) {
+    remove_degree_3(v);
+  } else {
+    remove_degree_d_vertex(v);
+  }
+
+  return true;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+remove(const Vertex_handle& v)
+{
+  CGAL_precondition( !is_infinite(v) );
+  const Storage_site_2& ss = v->storage_site();
+
+  if ( !ss.is_input() ) { return false; }
+
+  Point_handle h1, h2;
+  bool is_point = ss.is_point();
+  if ( is_point ) {
+    h1 = ss.point();
+  } else {
+    CGAL_assertion( ss.is_segment() );   
+    h1 = ss.source_of_supporting_site();
+    h2 = ss.target_of_supporting_site();
+  }
+
+  bool success = remove_base(v);
+
+  if ( success ) {
+    // unregister the input site
+    if ( is_point ) {
+      unregister_input_site( h1 );
+    } else {
+      unregister_input_site( h1, h2 );
+    }
+  }
+  return success;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// combinatorial operations
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// point location
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+nearest_neighbor(const Site_2& p,
+		 Vertex_handle start_vertex) const
+{
+  CGAL_precondition( p.is_point() );
+
+  if ( number_of_vertices() == 0 ) {
+    return Vertex_handle();
+  }
+
+  if ( start_vertex == Vertex_handle() ) {
+    start_vertex = finite_vertex();
+  }
+
+  //  if ( start_vertex == NULL ) { return start_vertex; }
+
+  Vertex_handle vclosest;
+  Vertex_handle v = start_vertex;
+
+  if ( number_of_vertices() < 3 ) {
+    vclosest = v;
+    Finite_vertices_iterator vit = finite_vertices_begin();
+    for (; vit != finite_vertices_end(); ++vit) {
+      Vertex_handle v1(vit);
+      if ( v1 != vclosest /*&& !is_infinite(v1)*/ ) {
+	Site_2 t0 = vclosest->site();
+	Site_2 t1 = v1->site();
+	if ( side_of_bisector(t0, t1, p) == ON_NEGATIVE_SIDE ) {
+	  vclosest = v1;
+	}
+      }
+    }
+    return vclosest;
+  }
+
+  do {
+    vclosest = v;
+    Site_2 t0 = v->site();
+    //    if ( t0.is_point() && same_points(p, t0) ) {
+    //      return vclosest;
+    //    }
+    Vertex_circulator vc_start = incident_vertices(v);
+    Vertex_circulator vc = vc_start;
+    do {
+      if ( !is_infinite(vc) ) {
+	Vertex_handle v1(vc);
+	Site_2 t1 = v1->site();
+	Oriented_side os = side_of_bisector(t0, t1, p);
+
+	if ( os == ON_NEGATIVE_SIDE ) {
+	  v = v1;
+	  break;
+	}
+      }
+      ++vc;
+    } while ( vc != vc_start );
+  } while ( vclosest != v );
+
+  return vclosest;
+}
+
+//----------------------------------------------------------------------
+//----------------------------------------------------------------------
+// methods for the predicates
+//----------------------------------------------------------------------
+//----------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+Sign
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+incircle(const Face_handle& f, const Site_2& q) const
+{
+  if ( !is_infinite(f) ) {
+    return incircle(f->vertex(0)->site(),
+		    f->vertex(1)->site(),
+		    f->vertex(2)->site(), q);
+  }
+
+  int inf_i(-1); // to avoid compiler warning
+  for (int i = 0; i < 3; i++) {
+    if ( is_infinite(f->vertex(i)) ) {
+      inf_i = i;
+      break;
+    }
+  }
+  return incircle( f->vertex( ccw(inf_i) )->site(),
+		   f->vertex(  cw(inf_i) )->site(), q );
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+Sign
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+incircle(const Vertex_handle& v0, const Vertex_handle& v1,
+	      const Vertex_handle& v2, const Vertex_handle& v) const
+{
+  CGAL_precondition( !is_infinite(v) );
+
+  if ( !is_infinite(v0) && !is_infinite(v1) &&
+       !is_infinite(v2) ) {
+    return incircle(v0->site(), v1->site(),
+		    v2->site(), v->site());
+  }
+
+  if ( is_infinite(v0) ) {
+    CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) );
+    return incircle( v1->site(), v2->site(), v->site());
+  }
+  if ( is_infinite(v1) ) {
+    CGAL_precondition( !is_infinite(v0) && !is_infinite(v2) );
+    return incircle( v2->site(), v0->site(), v->site());
+  }
+
+  CGAL_assertion( is_infinite(v2) );
+  CGAL_precondition( !is_infinite(v0) && !is_infinite(v1) );
+  return incircle( v0->site(), v1->site(), v->site());
+}
+
+
+// this the finite edge interior predicate for a degenerate edge
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+finite_edge_interior(const Face_handle& f, int i, const Site_2& q,
+		     Sign sgn, int) const
+{
+  if ( !is_infinite( this->_tds.mirror_vertex(f, i) ) ) {
+    CGAL_precondition( is_infinite(f->vertex(i)) );
+
+    Face_handle g = f->neighbor(i);
+    int j = this->_tds.mirror_index(f, i);
+
+    return finite_edge_interior(g, j, q, sgn, 0 /* degenerate */);
+  }
+
+  CGAL_precondition( is_infinite( this->_tds.mirror_vertex(f, i) ) );
+
+  Site_2 t1 = f->vertex( ccw(i) )->site();
+  Site_2 t2 = f->vertex(  cw(i) )->site();
+
+  if ( is_infinite(f->vertex(i)) ) {
+    return finite_edge_interior(t1, t2, q, sgn);
+  }
+
+  Site_2 t3 = f->vertex(i)->site();
+  return finite_edge_interior(t1, t2, t3, q, sgn);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+finite_edge_interior(const Vertex_handle& v1, const Vertex_handle& v2,
+		     const Vertex_handle& v3, const Vertex_handle& v4,
+		     const Vertex_handle& v, Sign sgn, int) const
+{
+  CGAL_precondition( !is_infinite(v1) && !is_infinite(v2) && 
+		     !is_infinite(v) );
+  if ( !is_infinite( v4 ) ) {
+    CGAL_precondition( is_infinite(v3) );
+
+    return
+      finite_edge_interior(v2, v1, v4, v3, v, sgn, 0 /* degenerate */);
+  }
+
+  CGAL_precondition( is_infinite( v4 ) );
+
+  Site_2 t1 = v1->site();
+  Site_2 t2 = v2->site();
+  Site_2 q = v->site();
+
+  if ( is_infinite(v3) ) {
+    return finite_edge_interior(t1, t2, q, sgn);
+  }
+
+  Site_2 t3 = v3->site();
+  return finite_edge_interior(t1, t2, t3, q, sgn);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+infinite_edge_interior(const Face_handle& f, int i,
+		       const Site_2& q, Sign sgn) const
+{
+  if ( !is_infinite( f->vertex(ccw(i)) ) ) {
+    CGAL_precondition( is_infinite( f->vertex(cw(i)) ) );
+    Face_handle g = f->neighbor(i);
+    int j = this->_tds.mirror_index(f, i);
+
+    return infinite_edge_interior(g, j, q, sgn);
+  }
+
+  CGAL_precondition( is_infinite( f->vertex(ccw(i)) ) );
+
+  Site_2 t2 = f->vertex(  cw(i) )->site();
+  Site_2 t3 = f->vertex(     i  )->site();
+  Site_2 t4 = this->_tds.mirror_vertex(f, i)->site();
+
+  return infinite_edge_interior(t2, t3, t4, q, sgn);
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+infinite_edge_interior(const Vertex_handle& v1,
+		       const Vertex_handle& v2,
+		       const Vertex_handle& v3,
+		       const Vertex_handle& v4,
+		       const Vertex_handle& v, Sign sgn) const
+{
+  CGAL_precondition( !is_infinite(v3) && !is_infinite(v4) && 
+		     !is_infinite(v) );
+
+  if ( !is_infinite( v1 ) ) {
+    CGAL_precondition( is_infinite( v2 ) );
+
+    return infinite_edge_interior(v2, v1, v4, v3, v, sgn);
+  }
+
+  CGAL_precondition( is_infinite( v1 ) );
+
+  Site_2 t2 = v2->site();
+  Site_2 t3 = v3->site();
+  Site_2 t4 = v4->site();
+  Site_2 q = v->site();
+
+  return infinite_edge_interior(t2, t3, t4, q, sgn);
+}
+
+
+
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+edge_interior(const Vertex_handle& v1,
+	      const Vertex_handle& v2,
+	      const Vertex_handle& v3,
+	      const Vertex_handle& v4,
+	      const Vertex_handle& v, Sign sgn) const
+{
+  CGAL_precondition( !is_infinite(v) );
+
+  bool is_inf_v1 = is_infinite(v1);
+  bool is_inf_v2 = is_infinite(v2);
+  bool is_inf_v3 = is_infinite(v3);
+  bool is_inf_v4 = is_infinite(v4);
+
+  bool result;
+
+  if ( !is_inf_v1 && !is_inf_v2 && !is_inf_v3 && !is_inf_v4 ) {
+    result = finite_edge_interior(v1, v2, v3, v4, v, sgn);
+  } else if ( is_inf_v3 || is_inf_v4 ) {
+    result = finite_edge_interior(v1, v2, v3, v4, v, sgn, 0/* degenerate */);
+  } else {
+    result = infinite_edge_interior(v1, v2, v3, v4, v, sgn);
+  }
+
+  return result;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+edge_interior(const Face_handle& f, int i,
+	      const Site_2& q, Sign sgn) const
+{
+  Face_handle g = f->neighbor(i);
+
+  bool is_inf_f = is_infinite(f);
+  bool is_inf_g = is_infinite(g);
+
+  bool result;
+
+  if ( !is_inf_f && !is_inf_g ) {
+    result = finite_edge_interior(f, i, q, sgn);
+  } else if ( !is_inf_f || !is_inf_g ) {
+    result = finite_edge_interior(f, i, q, sgn, 0 /* denegerate */);
+  } else {
+    if ( !is_infinite(f, i) ) {
+      result = finite_edge_interior(f, i, q, sgn, 0 /* degenerate */);
+    } else {
+      result = infinite_edge_interior(f, i, q, sgn);
+    }
+  }
+
+  return result;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Arrangement_type
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+arrangement_type(const Site_2& p, const Site_2& q) const
+{
+  typedef typename Geom_traits::Arrangement_type_2  AT2;
+  typedef typename AT2::result_type                 Arrangement_type;
+
+  Arrangement_type res = geom_traits().arrangement_type_2_object()(p, q);
+
+  // The valeus that have to be treated are the following:
+  // DISJOINT, TOUCH_1, TOUCH_2, CROSSING, IDENTICAL, INTERIOR,
+  // TOUCH_11_INTERIOR_1, TOUCH_12_INTERIOR_1, TOUCH_21_INTERIOR_1 and
+  // TOUCH_22_INTERIOR_1.
+  //
+  // The remaining values will either never appear because of one of
+  // the following reasons:
+  // 1. we insert the endpoints of the segments first and then the
+  //    interior (OVERLAPPING_*, INTERIOR_*, TOUCH_*_INTERIOR_2).
+  // 2. the values have no meaning since we consider the segments to
+  //    be open (TOUCH_INTERIOR_*). In this case, the conflict will
+  //    appear when we test with the endpoint.
+  // 3. a conflict will first happen with an endpoint before testing
+  //    for the segment (TOUCH_2*_INTERIOR_1). In this case the
+  //    segment to be inserted will first find an endpoint in its
+  //    interior before actually finding that there is another segment
+  //    it overlaps with.
+
+  CGAL_assertion( res != AT2::INTERIOR_1 );
+  CGAL_assertion( res != AT2::INTERIOR_2 );
+
+  CGAL_assertion( res != AT2::OVERLAPPING_11 );
+  CGAL_assertion( res != AT2::OVERLAPPING_12 );
+  CGAL_assertion( res != AT2::OVERLAPPING_21 );
+  CGAL_assertion( res != AT2::OVERLAPPING_22 );
+
+  CGAL_assertion( res != AT2::TOUCH_11_INTERIOR_2 );
+  CGAL_assertion( res != AT2::TOUCH_21_INTERIOR_2 );
+  CGAL_assertion( res != AT2::TOUCH_12_INTERIOR_2 );
+  CGAL_assertion( res != AT2::TOUCH_22_INTERIOR_2 );
+
+  CGAL_assertion( res != AT2::TOUCH_21_INTERIOR_1 );
+  CGAL_assertion( res != AT2::TOUCH_22_INTERIOR_1 );
+
+  if ( res == AT2::TOUCH_INTERIOR_12 || res == AT2::TOUCH_INTERIOR_21 ||
+       res == AT2::TOUCH_INTERIOR_11 || res == AT2::TOUCH_INTERIOR_22 ) {
+    return AT2::DISJOINT;
+  }
+  if ( res == AT2::TOUCH_11 || res == AT2::TOUCH_12 ||
+       res == AT2::TOUCH_21 || res == AT2::TOUCH_22 ) {
+    return AT2::DISJOINT;
+  }
+
+  return res;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// embedding and visualization methods and constructions for primal
+// and dual
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+// primal
+template<class Gt, class ST, class D_S, class LTag>
+Object
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+primal(const Edge e) const
+{
+  CGAL_precondition( !is_infinite(e) );
+
+  if ( this->dimension() == 1 ) {
+    Site_2 p = (e.first)->vertex(cw(e.second))->site();
+    Site_2 q = (e.first)->vertex(ccw(e.second))->site();
+
+    return make_object(construct_sdg_bisector_2_object()(p,q));
+  }
+
+  // dimension == 2
+  // none of the two adjacent faces is infinite
+  if( (!is_infinite(e.first)) &&
+      (!is_infinite(e.first->neighbor(e.second))) ) {
+    Site_2 p = (e.first)->vertex( ccw(e.second) )->site();
+    Site_2 q = (e.first)->vertex(  cw(e.second) )->site();
+    Site_2 r = (e.first)->vertex(     e.second  )->site();
+    Site_2 s = this->_tds.mirror_vertex(e.first, e.second)->site();
+    return construct_sdg_bisector_segment_2_object()(p,q,r,s);
+  }
+
+  // both of the adjacent faces are infinite
+  if ( is_infinite(e.first) &&
+       is_infinite(e.first->neighbor(e.second)) )  {
+    Site_2 p = (e.first)->vertex(cw(e.second))->site();
+    Site_2 q = (e.first)->vertex(ccw(e.second))->site();
+    return make_object(construct_sdg_bisector_2_object()(p,q));
+  }
+
+  // only one of the adjacent faces is infinite
+  CGAL_assertion( is_infinite( e.first ) ||
+		  is_infinite( e.first->neighbor(e.second) )
+		  );
+
+  CGAL_assertion( !(is_infinite( e.first ) &&
+		    is_infinite( e.first->neighbor(e.second) )
+		    )
+		  );
+
+  CGAL_assertion( is_infinite(e.first->vertex(e.second)) ||
+		  is_infinite(this->_tds.mirror_vertex(e.first, e.second)) );
+
+  Edge ee = e;
+  if ( is_infinite( e.first->vertex(e.second) )  ) {
+    ee = sym_edge(e);
+  }
+  Site_2 p = ee.first->vertex( ccw(ee.second) )->site();
+  Site_2 q = ee.first->vertex(  cw(ee.second) )->site();
+  Site_2 r = ee.first->vertex(     ee.second  )->site();
+
+  return make_object(construct_sdg_bisector_ray_2_object()(p,q,r));
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// validity test method
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+template<class Gt, class ST, class D_S, class LTag>
+bool Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+is_valid(bool verbose, int level) const
+{
+  if (level < 0) { return true; }
+
+  if (number_of_vertices() <= 1) {
+    if ( verbose && number_of_vertices() == 1 ) {
+      std::cerr << "SDGDS is ok... " << std::flush;
+    }
+    return true;
+  }
+
+  // level 0 test: check the TDS
+  bool result = data_structure().is_valid(verbose, level);
+
+  if ( result && verbose ) {
+    std::cerr << "SDGDS is ok... " << std::flush;
+  }
+
+  if (level == 0) { return result; }
+
+  // level 1 test: do the incircle tests
+  if (number_of_vertices() < 3)  { return true; }
+
+  for (All_edges_iterator eit = all_edges_begin();
+       eit != all_edges_end(); ++eit) {
+    Edge e = *eit;
+    Face_handle f = e.first;
+
+    Vertex_handle v = this->_tds.mirror_vertex(f, e.second);
+
+    if ( f->vertex(e.second) == v ) { continue; }
+    if ( !is_infinite(v) ) {
+      result = result &&
+	( incircle(f, v->site()) != NEGATIVE );
+    }
+    Edge sym_e = sym_edge(e);
+    f = sym_e.first;
+    v = this->_tds.mirror_vertex(f, sym_e.second);
+
+    if ( !is_infinite(v) ) {
+      result = result &&
+	( incircle(f, v->site()) != NEGATIVE );
+    }
+  }
+
+  if ( result && verbose ) {
+    std::cerr << "Segment Delaunay graph is ok..." << std::flush;
+  }
+  if ( !result && verbose ) {
+    std::cerr << "Segment Delaunay graph is NOT valid..." << std::flush;
+  }
+
+  return result;
+}
+
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// misc
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+print_error_message() const
+{
+  std::cerr << std::endl;
+  std::cerr << "ATTENTION:" << std::endl;
+  std::cerr << "A segment-segment intersection was found."
+	    << std::endl;
+  std::cerr << "The Segment_Delaunay_graph_2 class is not configured"
+	    << " to handle this situation." << std::endl;
+  std::cerr << "Please look at the documentation on how to handle"
+	    << " this behavior." << std::endl;
+  std::cerr << std::endl;
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// the copy method
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Storage_site_2
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+copy_storage_site(const Storage_site_2& ss_other, Handle_map& hm,
+		  const Tag_false&)
+{
+  if ( ss_other.is_segment() ) {
+    Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
+    Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
+    return st_.construct_storage_site_2_object()(p0, p1);
+  } else {
+    Point_handle p0 = hm[ ss_other.point() ];
+    return st_.construct_storage_site_2_object()(p0);
+  }
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Storage_site_2
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+copy_storage_site(const Storage_site_2& ss_other, Handle_map& hm,
+		  const Tag_true&)
+{
+  if ( ss_other.is_segment() ) {
+    if ( ss_other.is_input() ) {
+      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
+      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
+      return st_.construct_storage_site_2_object()(p0, p1);
+    } else if ( ss_other.is_input(0) ) {
+      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
+      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
+      Point_handle p4 = hm[ ss_other.source_of_crossing_site(1) ];
+      Point_handle p5 = hm[ ss_other.target_of_crossing_site(1) ];
+      return st_.construct_storage_site_2_object()(p0, p1, p4, p5, true);
+    } else if ( ss_other.is_input(1) ) {
+      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
+      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
+      Point_handle p2 = hm[ ss_other.source_of_crossing_site(0) ];
+      Point_handle p3 = hm[ ss_other.target_of_crossing_site(0) ];
+      return st_.construct_storage_site_2_object()(p0, p1, p2, p3, false);
+    } else {
+      Point_handle p0 = hm[ ss_other.source_of_supporting_site() ];
+      Point_handle p1 = hm[ ss_other.target_of_supporting_site() ];
+      Point_handle p2 = hm[ ss_other.source_of_crossing_site(0) ];
+      Point_handle p3 = hm[ ss_other.target_of_crossing_site(0) ];
+      Point_handle p4 = hm[ ss_other.source_of_crossing_site(1) ];
+      Point_handle p5 = hm[ ss_other.target_of_crossing_site(1) ];
+      return st_.construct_storage_site_2_object()(p0, p1, p2, p3, p4, p5);
+    }
+  } else {
+    if ( ss_other.is_input() ) {
+      Point_handle p0 = hm[ ss_other.point() ];
+      return st_.construct_storage_site_2_object()(p0);
+    } else {
+      Point_handle p2 = hm[ ss_other.source_of_supporting_site(0) ];
+      Point_handle p3 = hm[ ss_other.target_of_supporting_site(0) ];
+      Point_handle p4 = hm[ ss_other.source_of_supporting_site(1) ];
+      Point_handle p5 = hm[ ss_other.target_of_supporting_site(1) ];
+      return st_.construct_storage_site_2_object()(p2, p3, p4, p5);
+    }
+  }
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+copy(Segment_Delaunay_graph_2& other)
+{
+  // copy the insert_on method pointers
+  insert_point_on_segment_ptr = other.insert_point_on_segment_ptr;
+  insert_exact_point_on_segment_ptr =
+    other.insert_exact_point_on_segment_ptr;
+
+  // first copy the point container
+  pc_ = other.pc_;
+
+  // copy storage traits
+  st_ = other.st_;
+
+  // first create a map between the old point handles and the new ones
+  Handle_map hm;
+
+  Point_handle it_other = other.pc_.begin();
+  Point_handle it_this = pc_.begin();
+  for (; it_other != other.pc_.end(); ++it_other, ++it_this) {
+    hm.insert( Point_handle_pair(it_other, it_this) );
+  }
+
+  copy(other, hm);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+copy(Segment_Delaunay_graph_2& other, Handle_map& hm)
+{
+  // second, copy the site representation info for the input sites
+  // using the correct handles (i.e., the handles from the new point
+  // container
+  isc_.clear();
+  typename Input_sites_container::iterator iit_other = other.isc_.begin();
+  for (; iit_other != other.isc_.end(); ++iit_other) {
+    Site_rep_2 old_srep = *iit_other;
+    Site_rep_2 new_srep( hm[boost::tuples::get<0>(old_srep)],
+			 hm[boost::tuples::get<1>(old_srep)],
+			 boost::tuples::get<2>(old_srep) );
+    isc_.insert( new_srep );
+  }
+  
+  CGAL_assertion( pc_.size() == other.pc_.size() );
+  CGAL_assertion( isc_.size() == other.isc_.size() );
+
+#ifndef CGAL_NO_ASSERTIONS
+  {
+    Point_handle it_other = other.pc_.begin();
+    Point_handle it_this = pc_.begin();
+    for (; it_other != other.pc_.end(); ++it_other, ++it_this) {
+      CGAL_assertion( *it_other == *it_this );
+    }
+  }
+#endif
+
+  // then copy the diagram
+  DG::operator=(other);
+
+  // now we have to update the sotrage sites in each vertex of the
+  // diagram and also update the 
+
+  // then update the storage sites for each vertex
+  Intersections_tag itag;
+
+  Finite_vertices_iterator vit_other = other.finite_vertices_begin();
+  Finite_vertices_iterator vit_this = finite_vertices_begin();
+  for (; vit_other != other.finite_vertices_end(); vit_other++,
+	 vit_this++) {
+    Storage_site_2 ss_other = vit_other->storage_site();
+
+#ifndef CGAL_NO_ASSERTIONS
+    Storage_site_2 ss_this = vit_this->storage_site();
+    if ( ss_other.is_segment() ) {
+      CGAL_assertion( ss_this.is_segment() );
+      CGAL_assertion( same_segments(ss_this.site(), ss_other.site()) );
+    } else {
+      CGAL_assertion( ss_this.is_point() );
+      CGAL_assertion( same_points(ss_this.site(), ss_other.site()) );
+    }
+#endif
+
+    Storage_site_2 new_ss_this = copy_storage_site(ss_other, hm, itag);
+    vit_this->set_site( new_ss_this );
+  }
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// getting endpoints of segments
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+first_endpoint_of_segment(const Vertex_handle& v) const
+{
+  CGAL_assertion( v->is_segment() );
+  Site_2 fe = v->site().source_site();
+  Vertex_circulator vc_start = incident_vertices(v);
+  Vertex_circulator vc = vc_start;
+  do {
+    // Vertex_handle vv(vc);
+    if ( !is_infinite(vc) && vc->is_point() ) {
+      if ( same_points(fe, vc->site()) ) {
+	return Vertex_handle(vc);
+      }
+    }
+    vc++;
+  } while ( vc != vc_start );
+
+  // we should never reach this point
+  CGAL_error();
+  return Vertex_handle();
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+second_endpoint_of_segment(const Vertex_handle& v) const
+{
+  CGAL_assertion( v->is_segment() );
+  Site_2 fe = v->site().target_site();
+  Vertex_circulator vc_start = incident_vertices(v);
+  Vertex_circulator vc = vc_start;
+  do {
+    //      Vertex_handle vv(vc);
+    if ( !is_infinite(vc) && vc->is_point() ) {
+      if ( same_points(fe, vc->site()) ) {
+	return Vertex_handle(vc);
+      }
+    }
+    vc++;
+  } while ( vc != vc_start );
+
+  // we should never reach this point
+  CGAL_error();
+  return Vertex_handle();
+}
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+// file I/O
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+file_output(std::ostream& os, const Storage_site_2& t,
+	    Point_handle_mapper& P) const
+{
+  CGAL_precondition( t.is_defined() );
+
+  if ( t.is_point() ) {
+    // 0 for point
+    os << 0;
+    if ( is_ascii(os) ) { os << ' '; }
+    if ( t.is_input() ) {
+      // 0 for input
+      os << 0;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.point()];
+    } else {
+      // 1 for non-input
+      os << 1;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site(0)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site(0)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site(1)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site(1)];
+    }
+  } else { // t is a segment
+    // 1 for segment
+    os << 1;
+    if ( is_ascii(os) ) { os << ' '; }
+    if ( t.is_input() ) {
+      // 0 for input
+      os << 0;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site()];
+    } else if ( t.is_input(0) ) {
+      // 1 for input source
+      os << 1;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_crossing_site(1)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_crossing_site(1)];
+    } else if ( t.is_input(1) ) {
+      // 2 for input target
+      os << 2;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_crossing_site(0)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_crossing_site(0)];
+    } else {
+      // 3 for non-input src & trg
+      os << 3;
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_supporting_site()];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_crossing_site(0)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_crossing_site(0)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.source_of_crossing_site(1)];
+      if ( is_ascii(os) ) { os << ' '; }
+      os << P[t.target_of_crossing_site(1)];
+    }
+  }
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+file_input(std::istream& is, Storage_site_2& t,
+	   const Point_handle_vector& P, const Tag_false&) const
+{
+  int type, input;
+  is >> type >> input;
+  CGAL_assertion( type == 0 || type == 1 );
+  CGAL_assertion( input == 0 );
+  if ( type == 0 ) {
+    // we have an input point
+    size_type p;
+    is >> p;
+    t = st_.construct_storage_site_2_object()(P[p]);
+  } else {
+    CGAL_assertion( type == 1 );
+    // we have an input segment
+    size_type p1, p2;
+    is >> p1 >> p2;
+    t = st_.construct_storage_site_2_object()(P[p1], P[p2]);
+  }
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+file_input(std::istream& is, Storage_site_2& t,
+	   const Point_handle_vector& P, const Tag_true&) const
+{
+  int type, input;
+  is >> type >> input;
+  CGAL_assertion( type == 0 || type == 1 );
+  CGAL_assertion( input >= 0 && input <= 3 );
+  if ( type == 0 ) {
+    // we have a point
+    if ( input == 0 ) {
+      // we have an input point
+      size_type p;
+      is >> p;
+      t = st_.construct_storage_site_2_object()(P[p]);
+    } else {
+      // we have a point that is the intersection of two segments
+      CGAL_assertion( input == 1 );
+      size_type p1, p2, q1, q2;
+      is >> p1 >> p2 >> q1 >> q2;
+      t = st_.construct_storage_site_2_object()(P[p1], P[p2], P[q1], P[q2]);
+    }
+  } else {
+    // we have a segment
+    CGAL_assertion( type == 1 );
+    if ( input == 0 ) {
+      // we have an input segment
+      size_type p1, p2;
+      is >> p1 >> p2;
+      t = st_.construct_storage_site_2_object()(P[p1], P[p2]);
+    } else if ( input < 3 ) {
+      // we have a segment whose source or target is input but not both
+      size_type p1, p2, q1, q2;
+      is >> p1 >> p2 >> q1 >> q2;
+      t = st_.construct_storage_site_2_object()(P[p1], P[p2],
+						P[q1], P[q2], input == 1);
+    } else {
+      // we have a segment whose neither its source nor its target is input
+      CGAL_assertion( input == 3 );
+      size_type p1, p2, q1, q2, r1, r2;
+      is >> p1 >> p2 >> q1 >> q2 >> r1 >> r2;
+      t = st_.construct_storage_site_2_object()(P[p1], P[p2],
+						P[q1], P[q2],
+						P[r1], P[r2]);      
+    }
+  }
+}
+
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+file_output(std::ostream& os, Point_handle_mapper& P,
+	    bool print_point_container) const
+{
+  // ouput to a file
+  size_type n = this->_tds.number_of_vertices();
+  size_type m = this->_tds.number_of_full_dim_faces();
+
+  CGAL_assertion( n >= 1 );
+
+  if( is_ascii(os) ) {
+    os << n << ' ' << m << ' ' << dimension() << std::endl;
+  } else {
+    os << n << m << dimension();
+  }
+
+  // points in point container and input sites container
+  if ( print_point_container ) {
+    if ( is_ascii(os) ) { os << std::endl; }
+    os << pc_.size();
+    if ( is_ascii(os) ) { os << std::endl; }
+    for (const_Point_handle ph = pc_.begin(); ph != pc_.end(); ++ph) {
+      os << *ph;
+      if ( is_ascii(os) ) { os << std::endl; }
+    }
+
+    // print the input sites container
+    if ( is_ascii(os) ) { os << std::endl; }
+    os << isc_.size();
+    if ( is_ascii(os) ) { os << std::endl; }
+    for (typename Input_sites_container::const_iterator it = isc_.begin();
+	 it != isc_.end(); ++it) {
+      os << P[boost::tuples::get<0>(*it)];
+      if ( is_ascii(os) ) { os << " "; }
+      os << P[boost::tuples::get<1>(*it)];
+      if ( is_ascii(os) ) { os << std::endl; }
+    }
+  }
+
+  std::map<Vertex_handle,size_type> V;
+  std::map<Face_handle,size_type> F;
+
+  // first vertex (infinite vertex) 
+  size_type inum = 0;
+  V[infinite_vertex()] = inum++;
+  
+  // finite vertices
+  if (is_ascii(os)) os << std::endl;
+  for (Finite_vertices_iterator vit = finite_vertices_begin();
+       vit != finite_vertices_end(); ++vit) {
+    V[vit] = inum++;
+    //    os << vit->site();
+    file_output(os, vit->storage_site(), P);
+    // write non-combinatorial info of the vertex
+    //    os << *vit ;
+    if ( is_ascii(os) ) { os << std::endl; }
+  }
+  if ( is_ascii(os) ) { os << std::endl; }
+
+  // vertices of the faces
+  inum = 0;
+  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
+  for(All_faces_iterator fit = all_faces_begin();
+      fit != all_faces_end(); ++fit) {
+    F[fit] = inum++;
+    for(int j = 0; j < dim ; ++j) {
+      os << V[ fit->vertex(j) ];
+      if( is_ascii(os) ) { os << ' '; }
+    }
+    // write non-combinatorial info of the face
+    //    os << *fit ;
+    if( is_ascii(os) ) { os << std::endl; }
+  }
+  if( is_ascii(os) ) { os << std::endl; }
+    
+  // neighbor pointers of the  faces
+  for( All_faces_iterator it = all_faces_begin();
+       it != all_faces_end(); ++it) {
+    for(int j = 0; j < dimension()+1; ++j){
+      os << F[ it->neighbor(j) ];
+      if( is_ascii(os) ) { os << ' '; }
+    }
+    if( is_ascii(os) ) { os << std::endl; }
+  }
+
+  if ( is_ascii(os) ) { os << std::endl; }
+}
+
+
+
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
+file_input(std::istream& is, bool read_handle_vector,
+	   Point_handle_vector& P)
+{
+  //input from file
+  size_type n, m;
+  int d;
+  is >> n >> m >> d;
+
+  CGAL_assertion( n >= 1 );
+
+  size_type i = 0;
+  Storage_site_2 ss;
+
+  if ( read_handle_vector ) {
+    pc_.clear();
+    size_type np;
+    is >> np;
+    for (; i < np; i++) {
+      Point_2 p;
+      is >> p;
+      std::pair<Point_handle,bool> res = pc_.insert(p);
+      P.push_back(res.first);
+      CGAL_assertion( P[i] == res.first );
+    }
+
+    // now read the input sites container
+    isc_.clear();
+    size_type nisc;
+    is >> nisc;
+    int id1, id2;
+    for (i = 0; i < nisc; i++) {
+      is >> id1 >> id2;
+      isc_.insert( Site_rep_2(P[id1], P[id2], id1 == id2) );
+    }
+  }
+
+  if ( n == 1 ) {
+    CGAL_assertion( d == -1 );
+    if ( number_of_vertices() > 0 ) { clear(); }
+    return;
+  }
+  if ( n == 2 ) {
+    CGAL_assertion( d == 0 );
+    if ( number_of_vertices() > 0 ) { clear(); }
+    file_input(is, ss, P, Intersections_tag());
+    insert_first(ss, *ss.point());
+    return;
+  }
+  if ( n == 3 ) {
+    CGAL_assertion( d == 1 );
+    if ( number_of_vertices() > 0 ) { clear(); }
+    file_input(is, ss, P, Intersections_tag());
+    insert_first(ss, *ss.point());  
+    file_input(is, ss, P, Intersections_tag());
+    insert_second(ss, *ss.point());  
+    return;
+  }
+
+  if (this->_tds.number_of_vertices() != 0) { this->_tds.clear(); }
+
+  this->_tds.set_dimension(d);
+
+  std::vector<Vertex_handle> V(n);
+  std::vector<Face_handle> F(m);
+
+  // first vertex (infinite vertex)
+  V[0] = this->_tds.create_vertex();
+  this->set_infinite_vertex(V[0]);
+  i = 1;
+
+  // read vertices
+  for (; i < n; ++i) {
+    V[i] = this->_tds.create_vertex();
+    file_input(is, ss, P, Intersections_tag());
+    V[i]->set_site(ss);
+    // read non-combinatorial info of the vertex
+    //    is >> *(V[i]);
+  }
+  
+  // Creation of the faces
+  int index;
+  int dim = (dimension() == -1 ? 1 : dimension() + 1);
+
+  for (i = 0; i < m; ++i) {
+    F[i] = this->_tds.create_face();
+    for (int j = 0; j < dim ; ++j){
+      is >> index;
+      F[i]->set_vertex(j, V[index]);
+      // The face pointer of vertices is set too often,
+      // but otherwise we had to use a further map
+      V[index]->set_face(F[i]);
+    }
+    // read in non-combinatorial info of the face
+    //      is >> *(F[i]) ;
+  }
+
+  // Setting the neighbor pointers 
+  for (i = 0; i < m; ++i) {
+    for (int j = 0; j < dimension()+1; ++j){
+      is >> index;
+      F[i]->set_neighbor(j, F[index]);
+    }
+  }
+}
+
+
+} //namespace CGAL
+
+// EOF
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h
new file mode 100644
index 0000000..9602cfa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h
@@ -0,0 +1,1153 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+
+// class implementation continued
+//=================================
+
+namespace CGAL {
+
+
+//===========================================================================
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  constructors
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+init_hierarchy(const Geom_traits& gt)
+{
+  hierarchy[0] = this; 
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i] = new Base(gt);
+  }
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+Segment_Delaunay_graph_hierarchy_2(const Gt& gt)
+  : Base(gt)
+{ 
+  init_hierarchy(gt);
+}
+
+
+// copy constructor duplicates vertices and faces
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+Segment_Delaunay_graph_hierarchy_2
+(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx> &sdg)
+    : Base(sdg.geom_traits())
+{ 
+  // create an empty triangulation to be able to delete it !
+  init_hierarchy(sdg.geom_traits());
+  copy(sdg);
+} 
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  destructor
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+~Segment_Delaunay_graph_hierarchy_2()
+{
+  clear();
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i){ 
+    delete hierarchy[i];
+  }
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+// assignment operator
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx> &
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+operator=(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx> &sdg)
+{
+  if ( this != &sdg ) {
+    copy(sdg);
+  }
+  return *this;
+}
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR INSERTION
+//====================================================================
+//====================================================================
+
+//--------------------------------------------------------------------
+// insertion of a point
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+std::pair<bool,int>
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_point(const Point_2& p, const Storage_site_2& ss, int level,
+	     Vertex_handle* vertices)
+{
+  CGAL_precondition( level != UNDEFINED_LEVEL );
+
+  int new_level = level;
+
+  bool lies_on_seg = false;
+
+  Vertex_handle vertex;
+  Vertex_handle vs1, vs2;
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  Site_2 t = Site_2::construct_site_2(p);
+
+  nearest_neighbor(t, vnear, false);
+
+  size_type n = hierarchy[0]->number_of_vertices();
+  if ( n > 2 ) {
+    Arrangement_type at_res = this->arrangement_type(t, vnear[0]);
+
+    CGAL_assertion( at_res == AT2::DISJOINT ||
+		    at_res == AT2::INTERIOR ||
+		    at_res == AT2::IDENTICAL );
+
+    if ( vnear[0]->is_point() ) {
+      if ( at_res == AT2::IDENTICAL ) {
+	vertex = vnear[0];
+	merge_info(vertex, ss);
+      } else {
+	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
+      }
+    } else { // nearest neighbor is a segment
+      CGAL_assertion( vnear[0]->is_segment() );
+      CGAL_assertion( at_res == AT2::DISJOINT ||
+		      at_res == AT2::INTERIOR );
+
+      if ( at_res == AT2::INTERIOR ) {
+	CGAL_assertion( t.is_input() );
+	lies_on_seg = true;
+
+	int vnear_level = find_level(vnear[0]);
+
+	// I need to find the level of the nearest neighbor that t
+	// lies on and update the level of t
+	if ( new_level < vnear_level ) {
+	  new_level = vnear_level;
+	}
+
+	Vertex_triple vt =
+	  hierarchy[0]->insert_exact_point_on_segment(ss, t, vnear[0]);
+	vertex = vt.first;
+	vs1 = vt.second;
+	vs2 = vt.third;
+      } else {
+	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
+      }
+    }
+  } else if ( n == 0 ) {
+    vertex = hierarchy[0]->insert_first(ss, p);
+  } else if ( n == 1 ) {
+    vertex = hierarchy[0]->insert_second(ss, p);
+  } else if ( n == 2 ) {
+    vertex = hierarchy[0]->insert_third(ss, p);
+  }
+
+  CGAL_assertion( vertex != Vertex_handle() );
+
+  if ( vertices != NULL ) { vertices[0] = vertex; }
+
+  // insert at other levels
+  Vertex_handle previous = vertex;
+  Vertex_handle vs1_prev = vs1;
+  Vertex_handle vs2_prev = vs2;
+
+  //  Storage_site_2 ss = vertex->storage_site();
+
+  int k = 1;
+  while ( k <= new_level ) {
+    size_type nv = hierarchy[k]->number_of_vertices();
+    if ( nv > 2 ) {
+      if ( nv < sdg_hierarchy_2__minsize ) {
+	CGAL_assertion( vnear[k] == Vertex_handle() );
+	vnear[k] = hierarchy[k]->nearest_neighbor(p);
+      }
+      Arrangement_type at_res = this->arrangement_type(t, vnear[k]->site());
+      if ( at_res == AT2::INTERIOR ) {
+	Vertex_triple vt =
+	  hierarchy[k]->insert_exact_point_on_segment(ss, t, vnear[k]);
+	vertex = vt.first;
+	vs1 = vt.second;
+	vs2 = vt.third;
+
+	CGAL_assertion( (same_segments(vs1_prev->site(), vs1->site()) &&
+			 same_segments(vs2_prev->site(), vs2->site())) ||
+			(same_segments(vs1_prev->site(), vs2->site()) &&
+			 same_segments(vs2_prev->site(), vs1->site())) );
+	if ( same_segments(vs1_prev->site(), vs1->site()) ) {
+	  vs1->set_down(vs1_prev);
+	  vs1_prev->set_up(vs1);
+	  vs1_prev = vs1;
+
+	  vs2->set_down(vs2_prev);
+	  vs2_prev->set_up(vs2);
+	  vs2_prev = vs2;
+	} else {
+	  vs1->set_down(vs2_prev);
+	  vs2_prev->set_up(vs1);
+	  vs2_prev = vs1;
+
+	  vs2->set_down(vs1_prev);
+	  vs1_prev->set_up(vs2);
+	  vs1_prev = vs2;
+	}
+      } else {
+	vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);	
+      }
+    } else if ( nv == 2 ) {
+      vertex = hierarchy[k]->insert_third(t, ss);
+    } else { // nv == 0 || nv == 1
+      vertex = hierarchy[k]->insert_no_register(ss, p, vnear[k]);
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    if ( vertices != NULL ) { vertices[k] = vertex; }
+
+    vertex->set_down(previous); // link with other levels
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+  return std::make_pair(lies_on_seg, new_level);
+}
+
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_point(const Site_2& t, const Storage_site_2& ss,
+	     int low, int high, Vertex_handle vbelow,
+	     Vertex_handle* vertices)
+{
+  CGAL_precondition( low >= 1 && low <= high );
+  CGAL_precondition( vbelow != Vertex_handle() );
+
+  Vertex_handle vertex;
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  nearest_neighbor(t, vnear, false);
+
+  Vertex_handle previous = vbelow;
+
+  // insert at all levels
+  int k = low;
+  while ( k <= high ) {
+    // MK::ERROR: this is a hack. I need to change the code in the
+    // segment Delaunay graph class, so that I can insert sites as
+    // the first, second, or third site...; actually this is
+    // problematic only if the number of vertices is exactly 2; it
+    // cannot be smaller since we already have added the endpoints
+    // of the segment at level k.
+    size_type n = hierarchy[k]->number_of_vertices();
+    if ( n > 2 ) {
+      vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);
+    } else if ( n == 2 ) {
+      vertex = hierarchy[k]->insert_third(t, ss);
+    } else {
+      if ( ss.is_input() ) {
+	vertex = hierarchy[k]->insert_no_register(ss, t.point(), vnear[k]);
+      } else {
+	break;
+      }
+      // ideally what should be instead of the break-statement above is the
+      // following statement(s) in the #if-#endif block
+#if 0
+    } else if ( n == 1 ) {
+      vertex = hierarchy[k]->insert_second(t, ss);
+    } else {
+      CGAL_assertion( n == 0 );
+      vertex = hierarchy[k]->insert_first(t, ss);
+#endif
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    if ( vertices != NULL ) { vertices[k] = vertex; }
+
+    vertex->set_down(previous); // link with other levels
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+}
+
+
+//--------------------------------------------------------------------
+// insertion of a segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_segment(const Point_2& p0, const Point_2& p1,
+	       const Storage_site_2& ss, int level)
+{
+  // the tag is true so we DO insert segments in hierarchy
+  if ( level == UNDEFINED_LEVEL ) {
+    level = random_level();
+  }
+
+  Site_2 t = Site_2::construct_site_2(p0, p1);
+
+  if ( is_degenerate_segment(t) ) {
+    Storage_site_2 ss_src = ss.source_site();
+    convert_info(ss_src, ss, true);
+    return insert_point(p0, ss_src, level);
+  }
+
+  Vertex_handle vertices0[sdg_hierarchy_2__maxlevel];
+  Vertex_handle vertices1[sdg_hierarchy_2__maxlevel];
+
+  Storage_site_2 ss_src = ss.source_site();
+  convert_info(ss_src, ss, true);
+#if 1
+  insert_point(p0, ss_src, level, vertices0);
+#else
+  std::pair<bool,int> res = insert_point(p0, ss_src, level, vertices0);
+  if ( res.first ) { level = res.second; }
+#endif
+
+  Storage_site_2 ss_trg = ss.target_site();
+  convert_info(ss_trg, ss, false);
+  insert_point(p1, ss_trg, level, vertices1);
+
+  CGAL_assertion( vertices0[0] != Vertex_handle() );
+  CGAL_assertion( vertices1[0] != Vertex_handle() );
+
+  Vertex_handle vertex;
+
+  if ( hierarchy[0]->number_of_vertices() == 2 ) {
+    static Segments_in_hierarchy_tag stag;
+
+    vertex = hierarchy[0]->insert_third(ss, vertices0[0], vertices1[0]);
+    insert_segment_in_upper_levels(t, vertex->storage_site(),
+				   vertex, vertices0, level, stag);
+  } else {
+    vertex = insert_segment_interior(t, ss, vertices0, level);
+  }
+
+  return vertex;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_segment_interior(const Site_2& t, const Storage_site_2& ss,
+			const Vertex_handle* vertices, int level)
+{
+  // insert the interior of a segment, and DO insert segments in
+  // upper levels of the hierarchy
+  CGAL_precondition( t.is_segment() );
+  CGAL_precondition( this->number_of_vertices() >= 2 );
+
+  CGAL_assertion( vertices[0] != Vertex_handle() );
+  // MK: add here code that checks if the inserted segment has already
+  // been inserted; MAYBE THIS IS NOT NEEDED; I ALREADY DO IT IN
+  // arrangement_type
+
+  // the tags
+  static Intersections_tag          itag;
+  static Segments_in_hierarchy_tag  stag;
+
+  // find the first conflict
+
+  // first look if there are intersections...
+  Vertex_circulator vc = hierarchy[0]->incident_vertices(vertices[0]);
+  Vertex_circulator vc_start = vc;
+  do {
+    Vertex_handle vv(vc);
+    if ( is_infinite(vv) ) {
+      vc++;
+      continue;
+    }
+
+    Arrangement_type at_res = this->arrangement_type(t, vv);
+    if ( vv->is_segment() ) {
+      if ( at_res == AT2::DISJOINT || at_res == AT2::TOUCH_1 ||
+	   at_res == AT2::TOUCH_2 || at_res == AT2::TOUCH_11 ||
+	   at_res == AT2::TOUCH_12 || at_res == AT2::TOUCH_21 ||
+	   at_res == AT2::TOUCH_22 ) {
+	// do nothing
+      } else if ( at_res == AT2::IDENTICAL ) {
+	// merge info of identical items
+	merge_info(vv, ss);
+	return vv;
+      } else if ( at_res == AT2::CROSSING ) {
+	return insert_intersecting_segment_with_tag(ss, t, vv, level,
+						    itag, stag);
+      } else if ( at_res == AT2::TOUCH_11_INTERIOR_1 ) {
+	Vertex_handle vp = second_endpoint_of_segment(vv);
+
+	Storage_site_2 sss = split_storage_site(ss, vp->storage_site(), true);
+	// merge the info of the first (common) subsegment
+	merge_info(vv, sss);
+
+	return insert_segment_on_point(ss, vp, level, 1);
+      } else if ( at_res == AT2::TOUCH_12_INTERIOR_1 ) {
+	Vertex_handle vp = first_endpoint_of_segment(vv);
+	return insert_segment_on_point(ss, vp, level, 0);
+      } else {
+	// this should never be reached; the only possible values for
+	// at_res are DISJOINT, CROSSING, TOUCH_11_INTERIOR_1
+	// and TOUCH_12_INTERIOR_1
+	CGAL_error();
+      }
+    } else {
+      CGAL_assertion( vv->is_point() );
+      if ( at_res == AT2::INTERIOR ) {
+	Storage_site_2 svv = vv->storage_site();
+	if ( svv.is_input() ) {
+	  return insert_segment_on_point(ss, vv, level, 2);
+	} else {
+	  // MK::ERROR:: not ready yet
+	  CGAL_error();
+	}
+      }
+    }
+    ++vc;
+  } while ( vc != vc_start );
+
+  // first look for conflict with vertex
+  Face_circulator fc_start = hierarchy[0]->incident_faces(vertices[0]);
+  Face_circulator fc = fc_start;
+  Face_handle start_f;
+  Sign s;
+
+  std::map<Face_handle,Sign> sign_map;
+
+  do {
+    Face_handle f(fc);
+
+    s = incircle(f, t);
+
+    sign_map[f] = s;
+
+    if ( s == NEGATIVE ) {
+      start_f = f;
+      break;
+    }
+    ++fc;
+  } while ( fc != fc_start );
+
+  // segments must have a conflict with at least one vertex
+  CGAL_assertion( s == NEGATIVE );
+
+  // we are in conflict with a Voronoi vertex; start from that and 
+  // find the entire conflict region and then repair the diagram
+  List l;
+  Face_map fm;
+
+  Triple<bool, Vertex_handle, Arrangement_type>
+    vcross(false, Vertex_handle(), AT2::DISJOINT);
+
+  hierarchy[0]->initialize_conflict_region(start_f, l);
+  hierarchy[0]->expand_conflict_region(start_f, t, ss, l, fm,
+				       sign_map, vcross);
+
+  CGAL_assertion( vcross.third == AT2::DISJOINT ||
+		  vcross.third == AT2::CROSSING ||
+		  vcross.third == AT2::INTERIOR );
+
+  // the following condition becomes true only if intersecting
+  // segments are found
+  if ( vcross.first ) {
+    if ( t.is_segment() ) {
+      if ( vcross.third == AT2::CROSSING ) {
+	Intersections_tag itag;
+	return insert_intersecting_segment_with_tag(ss, t, vcross.second,
+						    level, itag, stag);
+      } else if ( vcross.third == AT2::INTERIOR ) {
+	return insert_segment_on_point(ss, vcross.second, level, 2);
+      } else {
+	// this should never be reached; the only possible values for
+	// vcross.third are CROSSING, INTERIOR and DISJOINT
+	CGAL_error();
+      }
+    }
+  }
+
+  // no intersecting segment has been found; we insert the segment as
+  // usual...
+  Vertex_handle v = hierarchy[0]->create_vertex(ss);
+
+  hierarchy[0]->retriangulate_conflict_region(v, l, fm);
+
+  insert_segment_in_upper_levels(t, ss, v, vertices, level, stag);
+
+  return v;
+}
+
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_segment_in_upper_levels(const Site_2& t, const Storage_site_2& ss,
+			       Vertex_handle vbelow,
+			       const Vertex_handle* vertices,
+			       int level, Tag_true /* stag */)
+{
+  CGAL_precondition( vertices != NULL );
+  CGAL_precondition( vbelow != Vertex_handle() );
+
+  // insert at all upper levels
+  Vertex_handle previous = vbelow;
+  Vertex_handle vertex = vbelow;
+
+  int k = 1;
+  while ( k <= level ) {
+    if ( hierarchy[k]->number_of_vertices() == 2 ) {
+      Vertex_handle v0(hierarchy[k]->finite_vertices_begin());
+      Vertex_handle v1(++(hierarchy[k]->finite_vertices_begin()));
+      CGAL_precondition( v0 != Vertex_handle() &&
+			 v1 != Vertex_handle() );
+      vertex = hierarchy[k]->insert_third(ss, v0, v1);
+    } else {
+      vertex = hierarchy[k]->insert_segment_interior(t, ss, vertices[k]);
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    vertex->set_down(previous); // link with level above
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+}
+
+//--------------------------------------------------------------------
+// insertion of a segment that goes through a point
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_segment_on_point(const Storage_site_2& ss,
+			const Vertex_handle& v,
+			int level, int which)
+{  
+  // inserts the segment represented by ss in the case where this
+  // segment goes through a point which has already been inserted and
+  // corresponds to the vertex handle v
+  CGAL_precondition( ss.is_segment() );
+  CGAL_precondition( v->is_point() );
+
+  Storage_site_2 ssv = v->storage_site();
+  Site_2 sv = ssv.site();
+
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  nearest_neighbor(sv, vnear, false);
+
+  int v_level = find_level(v);
+
+  if ( v_level < level ) {
+    Vertex_handle vbelow = vnear[v_level];
+
+    insert_point(sv, ssv, v_level + 1, level, vbelow, vnear);
+  }
+
+  // merge the info of the (common) splitting endpoint
+  merge_info(v, ss);
+
+  if ( which == 2 ) {
+    Storage_site_2 ss1 = this->split_storage_site(ss, ssv, true);
+    Storage_site_2 ss2 = this->split_storage_site(ss, ssv, false);
+
+    insert_segment_interior(ss1.site(), ss1, vnear, level);
+    return insert_segment_interior(ss2.site(), ss2, vnear, level);
+  }
+
+  Storage_site_2 ss1 = this->split_storage_site(ss, ssv, which == 0);
+  return insert_segment_interior(ss1.site(), ss1, vnear, level);
+}
+
+//--------------------------------------------------------------------
+// insertion of an intersecting segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				     const Site_2& t, Vertex_handle v,
+				     int level,
+				     Tag_true itag, Tag_false /* stag */)
+{
+  CGAL_precondition( t.is_segment() && v->is_segment() );
+
+  const Storage_site_2& ssitev = v->storage_site();
+  Site_2 sitev = ssitev.site();
+
+  if ( same_segments(t, sitev) ) {
+    merge_info(v, ss);
+    return v;
+  }
+
+  Vertex_triple vt = hierarchy[0]->insert_point_on_segment(ss, t, v, itag);
+
+  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
+
+  Vertex_handle vsx = vt.first;
+  verticesx[0] = vsx;
+
+  bool compute_new_level = true;
+  int new_level = compute_new_level ? random_level() : level;
+  if ( new_level > 0 ) {
+    Storage_site_2 ssx = vsx->storage_site();
+    Site_2 sx = ssx.site();
+    insert_point(sx, ssx, 1, new_level, vsx, verticesx);
+  }
+
+  Storage_site_2 ss3 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
+  Storage_site_2 ss4 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
+
+  Site_2 s3 = ss3.site();
+  Site_2 s4 = ss4.site();
+
+  insert_segment_interior(s3, ss3, verticesx, level);
+  insert_segment_interior(s4, ss4, verticesx, level);
+  return vsx;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				     const Site_2& t, Vertex_handle v,
+				     int level,
+				     Tag_true itag, Tag_true /* stag */)
+{
+  CGAL_precondition( t.is_segment() && v->is_segment() );
+
+  CGAL_expensive_precondition( arrangement_type(t, v->site()) );
+
+  const Storage_site_2& ssitev = v->storage_site();
+  Site_2 sitev = ssitev.site();
+
+  if ( same_segments(t, sitev) ) {
+    // MK::ERROR: I may need to insert it to levels higher than its
+    // previous level...
+    merge_info(v, ss);
+    return v;
+  }
+
+  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
+
+  int levelv = find_level(v);
+
+  Vertex_handle vcross = v;
+  Vertex_handle v1_old, v2_old, vsx_old;
+
+  int k = 0;
+  while ( k <= levelv ) {
+    Vertex_handle vcross_up = vcross->up();
+
+    Vertex_triple vt =
+      hierarchy[k]->insert_point_on_segment(ss, t, vcross, itag);
+
+    // now I need to update the sites for vertices v1 and v2
+    Vertex_handle vsx = vt.first;
+    Vertex_handle v1 = vt.second;
+    Vertex_handle v2 = vt.third;
+
+    CGAL_assertion( v1->is_segment() && v2->is_segment() );
+
+    if ( k > 0 ) {
+      CGAL_assertion( (same_segments(v1->site(), v1_old->site()) &&
+		       same_segments(v2->site(), v2_old->site())) ||
+		      (same_segments(v1->site(), v2_old->site()) &&
+		       same_segments(v2->site(), v1_old->site()))
+		      );
+      if ( same_segments(v1->site(), v1_old->site()) ) {
+	v1->set_down(v1_old);
+	v2->set_down(v2_old);
+	v1_old->set_up(v1);
+	v2_old->set_up(v2);
+      } else {
+	v1->set_down(v2_old);
+	v2->set_down(v1_old);
+	v1_old->set_up(v2);
+	v2_old->set_up(v1);
+      }
+      vsx_old->set_up(vsx);
+      vsx->set_down(vsx_old);
+    }
+
+    v1_old = v1;
+    v2_old = v2;
+    vsx_old = vsx;
+
+    verticesx[k] = vsx;
+
+    vcross = vcross_up;
+    k++;
+  }
+
+  if ( levelv < level ) {
+    Storage_site_2 ssx = verticesx[0]->storage_site();
+    Site_2 sx = ssx.site();
+
+    insert_point(sx, ssx, levelv + 1, level, verticesx[levelv], verticesx);
+  }
+
+  Storage_site_2 ss3 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
+
+  Storage_site_2 ss4 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
+
+  Site_2 s3 = ss3.site();
+  Site_2 s4 = ss4.site();
+
+  insert_segment_interior(s3, ss3, verticesx, level);
+  insert_segment_interior(s4, ss4, verticesx, level);
+  return verticesx[0];
+}
+
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR REMOVAL
+//====================================================================
+//====================================================================
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+bool
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+remove(const Vertex_handle& v)
+{
+  CGAL_precondition( !is_infinite(v) );
+  const Storage_site_2& ss = v->storage_site();
+
+  if ( !ss.is_input() ) { return false; }
+
+  Point_handle h1, h2;
+  bool is_point = ss.is_point();
+  if ( is_point ) {
+    h1 = ss.point();
+  } else {
+    CGAL_assertion( ss.is_segment() );   
+    h1 = ss.source_of_supporting_site();
+    h2 = ss.target_of_supporting_site();
+  }
+
+  // remove at level 0
+  Vertex_handle u = v->up();
+  bool success = hierarchy[0]->remove_base(v);
+  if ( !success ) { return false; }
+
+  // remove at higher levels
+  unsigned int l = 1;
+  Vertex_handle vv = u;
+  while ( u != Vertex_handle() ) {
+    if ( l >= sdg_hierarchy_2__maxlevel) { break; }
+    vv = u;
+    u = vv->up();
+    success = hierarchy[l++]->remove_base(vv);
+    CGAL_assertion( success );
+  }
+
+  // unregister the input site
+  if ( is_point ) {
+    this->unregister_input_site( h1 );
+  } else {
+    this->unregister_input_site( h1, h2 );
+  }
+
+  return true;
+}
+
+//===========================================================================
+//===========================================================================
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  nearest neighbor location
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+typename
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::Vertex_handle
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+nearest_neighbor(const Point_2& p, bool force_point) const
+{
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+  //  nearest_neighbor(Site_2(p), vnear, force_point);
+
+  Site_2 t = Site_2::construct_site_2(p);
+
+  nearest_neighbor(t, vnear, force_point);
+  return vnear[0];
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+nearest_neighbor(const Site_2& t,
+		 Vertex_handle vnear[sdg_hierarchy_2__maxlevel],
+		 bool /* force_point */) const
+{
+  CGAL_precondition( t.is_point() );
+
+  Vertex_handle nearest;
+  int level  = sdg_hierarchy_2__maxlevel;
+
+  // find the highest level with enough vertices
+  while ( hierarchy[--level]->number_of_vertices() 
+	  < sdg_hierarchy_2__minsize ) {
+    if ( !level ) break;  // do not go below 0
+  }
+  for (unsigned int i = level + 1; i < sdg_hierarchy_2__maxlevel; i++) {
+    vnear[i] = Vertex_handle();
+  }
+
+  while ( level > 0 ) {
+    vnear[level] = nearest =
+      hierarchy[level]->nearest_neighbor(t, nearest);  
+
+    CGAL_assertion( !hierarchy[level]->is_infinite(vnear[level]) );
+    CGAL_assertion( vnear[level] != Vertex_handle() );
+    // go at the same vertex on level below
+    nearest = nearest->down();
+    --level;
+  }
+  vnear[0] = hierarchy[0]->nearest_neighbor(t, nearest);
+  // at level 0
+}
+
+
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  miscellaneous methods
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+copy(const Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx> &sdg)
+{
+#ifndef CGAL_NO_ASSERTIONS
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    CGAL_assertion( hierarchy[i]->pc_.size() == 0 );
+    CGAL_assertion( hierarchy[i]->isc_.size() == 0 );
+
+    CGAL_assertion( sdg.hierarchy[i]->pc_.size() == 0 );
+    CGAL_assertion( sdg.hierarchy[i]->isc_.size() == 0 );
+  }
+#endif
+
+  // first copy the point container and input point container
+  this->pc_ = sdg.pc_;
+
+  // first create a map between the old point handles and the new ones
+  Handle_map hm;
+
+  Point_handle it_other = sdg.hierarchy[0]->pc_.begin();
+  Point_handle it_this = hierarchy[0]->pc_.begin();
+  for (; it_other != sdg.hierarchy[0]->pc_.end(); ++it_other, ++it_this) {
+    hm.insert( Point_handle_pair(it_other, it_this) );
+  }
+
+  {
+    for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+      hierarchy[i]->copy(*sdg.hierarchy[i], hm);
+    }
+  }
+
+  //up and down have been copied in straightforward way
+  // compute a map at lower level
+  std::map< Vertex_handle, Vertex_handle > V;
+  {
+    for(Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
+	it != hierarchy[0]->finite_vertices_end(); ++it) {
+      if ( it->up() != Vertex_handle() ) {
+	V[ it->up()->down() ] = it;
+      }
+    }
+  }
+  {
+    for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+      for(Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
+	  it != hierarchy[i]->finite_vertices_end(); ++it) {
+	// down pointer goes in original instead in copied triangulation
+	it->set_down(V[it->down()]);
+	// make reverse link
+	it->down()->set_up( it );
+	// make map for next level
+	if ( it->up() != Vertex_handle() ) {
+	  V[ it->up()->down() ] = it;
+	}
+      }
+    }
+  }
+
+  // the point container and the input sites container are copied by
+  // the operator= of the one-level classes
+  //  hierarchy[0]->pc_ = sdg.hierarchy[0]->pc_;
+  //  hierarchy[0]->isc_ = sdg.hierarchy[0]->isc_;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+clear()
+{
+  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->clear();
+  }
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+swap(Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>& other)
+{
+  Base* temp;
+  Base::swap(other);
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    temp = hierarchy[i];
+    hierarchy[i] = other.hierarchy[i];
+    other.hierarchy[i]= temp;
+  }
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  validity check
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+bool
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+is_valid(bool verbose, int level) const
+{
+  bool result(true);
+
+  //verify correctness of triangulation at all levels
+  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    if ( verbose ) {
+      std::cerr << "Level " << i << ": " << std::flush;
+    }
+    result = result && hierarchy[i]->is_valid(verbose, level);
+    if ( verbose ) {
+      std::cerr << std::endl;
+    }
+  }
+  //verify that lower level has no down pointers
+  for( Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
+       it != hierarchy[0]->finite_vertices_end(); ++it) {
+    result = result && ( it->down() == Vertex_handle() );
+  }
+
+  //verify that other levels has down pointer and reciprocal link is fine
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    for( Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
+	 it != hierarchy[i]->finite_vertices_end(); ++it) {
+      Vertex_handle vit(it);
+      result = result && ( it->down()->up() == vit );
+    }
+  }
+  return result;
+}
+
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  local helper methods
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+print_error_message() const
+{
+  std::cerr << std::endl;
+  std::cerr << "ATTENTION:" << std::endl;
+  std::cerr << "A segment-segment intersection was found."
+	    << std::endl;
+  std::cerr << "The Segment_Delaunay_graph_hierarchy_2 class is not"
+	    << " configured to handle this situation." << std::endl;
+  std::cerr << "Please look at the documentation on how to handle"
+	    << " this behavior." << std::endl;
+  std::cerr << std::endl;
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  file I/O
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+file_output(std::ostream& os) const
+{
+  typedef std::map<Vertex_handle,int>        Vertex_map;
+  typedef typename Base::const_Point_handle  const_Point_handle;
+
+  // compute the point handle mapper
+  typename Base::Point_handle_mapper P;
+  size_type inum = 0;
+  for (const_Point_handle ph = this->pc_.begin(); ph != this->pc_.end(); ++ph) {
+    P[ph] = inum++;
+  }
+
+  // write each level of the hierarchy
+  hierarchy[0]->file_output(os, P, true);
+  if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->file_output(os, P, false);
+    if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  }
+
+  Vertex_map* V = new Vertex_map[sdg_hierarchy_2__maxlevel];
+
+  // create the map of vertex indices
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    int inum = 0;
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      V[i][vit] = inum++;
+    }
+  }
+
+  Vertex_map* V_up   = new Vertex_map[sdg_hierarchy_2__maxlevel];
+  Vertex_map* V_down = new Vertex_map[sdg_hierarchy_2__maxlevel];
+
+  // create the map of up and down pointers
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      if ( vit->up() != Vertex_handle() ) {
+	V_up[i][vit] = V[i+1][vit->up()];
+      } else {
+	V_up[i][vit] = -1;
+      }
+
+      if ( vit->down() != Vertex_handle() ) {
+	V_down[i][vit] = V[i-1][vit->down()];
+      } else {
+	V_down[i][vit] = -1;
+      }
+    }
+  }
+
+  // write up and down pointer info
+  if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    os << i;
+    if ( is_ascii(os) ) { os << " "; }
+    os << hierarchy[i]->number_of_vertices();
+    if ( is_ascii(os) ) { os << std::endl; }
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      os << V[i][vit];
+      if ( is_ascii(os) ) { os << " "; }
+      os << V_down[i][vit];
+      if ( is_ascii(os) ) { os << " "; }
+      os << V_up[i][vit];
+      if ( is_ascii(os) ) { os << std::endl; }
+    }
+    if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  }
+
+  delete[] V;
+  delete[] V_up;
+  delete[] V_down;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag, class SDGLx>
+void
+Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>::
+file_input(std::istream& is)
+{
+  typedef std::vector<Vertex_handle>  Vertex_vector;
+
+  // firstly, read the segment Delaunay graph at each level
+  clear();
+  typename Base::Point_handle_vector P;
+  hierarchy[0]->file_input(is, true, P);
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->file_input(is, false, P);
+  }
+
+  Vertex_vector* V = new Vertex_vector[sdg_hierarchy_2__maxlevel];
+
+  // secondly, create the map of vertex indices
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    V[i].resize(hierarchy[i]->number_of_vertices());
+    int j = 0;
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit, ++j) {
+      V[i][j] = vit;
+    }
+  }
+
+  // read the correspondences between up and down pointers and set
+  // them appropriately
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    unsigned int level;
+    int vnum;
+    is >> level >> vnum;
+    for (int k = 0; k < vnum; k++) {
+      int ithis, iup, idown;
+      is >> ithis >> idown >> iup;
+      if ( idown != -1 ) { V[i][ithis]->set_down(V[i-1][idown]); }
+      if ( iup != -1 )   { V[i][ithis]->set_up(V[i+1][iup]); }
+    }
+  }
+
+  delete[] V;
+}
+
+
+//--------------------------------------------------------------------
+
+
+} //namespace CGAL
+
+
+// EOF
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h
new file mode 100644
index 0000000..ae5714c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h
@@ -0,0 +1,286 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
+
+#include <CGAL/Segment_Delaunay_graph_2/basic.h>
+#include <CGAL/Segment_Delaunay_graph_2/Predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Constructions_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
+
+namespace CGAL {
+
+namespace Internal {
+
+  template<class K,class BooleanTag> struct Which_arrangement_type;
+
+  // Tag_true means that we want to support intersections
+  template<class K>
+  struct Which_arrangement_type<K,Tag_true>
+  {
+    typedef
+    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_C2<K>
+    Arrangement_type;
+  };
+
+  // Tag_false means that we do not want to support intersections
+  template<class K>
+  struct Which_arrangement_type<K,Tag_false>
+  {
+    typedef
+    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_non_intersecting_C2<K>
+    Arrangement_type;
+  };
+
+} // namespace Internal
+
+
+//-----------------------------------------------------------------------
+// the Traits class
+//-----------------------------------------------------------------------
+
+template<class R, class MTag, class ITag>
+class Segment_Delaunay_graph_traits_base_2
+{
+public:
+  //-----------------------------------------------------------------------
+  //                  TYPE DEFINITIONS
+  //-----------------------------------------------------------------------
+
+  // BASIC TYPES
+  //------------
+  
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<R,ITag>  Kernel;
+  typedef Kernel                                              K;
+  typedef R                                                   Rep;
+  typedef MTag                                                Method_tag;
+
+  // the following tag controls how support intersections in the
+  // traits. If it is Tag_true then we fully support intersections.
+  // If it is Tag_true it is assumed that no intersections appear in
+  // the data and so there is limited support for intersections.
+  typedef ITag                                    Intersections_tag;
+
+  typedef typename Kernel::Point_2                Point_2;
+  typedef typename Kernel::Line_2                 Line_2;
+  typedef typename Kernel::Segment_2              Segment_2;
+  typedef typename Kernel::Ray_2                  Ray_2;
+  //  typedef typename Kernel::Circle_2               Circle_2;
+
+  typedef typename Kernel::Site_2                 Site_2;
+  typedef typename Kernel::Object_2               Object_2;
+
+  typedef typename Kernel::FT                     FT;
+  typedef typename Kernel::RT                     RT;
+
+protected:
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::Arrangement_enum
+  Arrangement_enum;
+
+public:
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //-------------------------------
+  typedef typename Kernel::Construct_object_2     Construct_object_2;
+  typedef typename Kernel::Assign_2               Assign_2;
+
+  // CONSTRUCTIONS
+  //--------------
+  // vertex and Voronoi circle
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_svd_vertex_2<K,MTag>
+  Construct_svd_vertex_2;
+
+  /*
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_svd_circle_2<K,MTag>
+  Construct_svd_circle_2;
+  */
+
+  // PREDICATES
+  //-----------
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Compare_x_2<K>
+  Compare_x_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Compare_y_2<K>
+  Compare_y_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Orientation_C2<K>
+  Orientation_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_points_C2<K>
+  Equal_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_parallel_C2<K>
+  Are_parallel_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_of_bisector_C2<K,MTag>
+  Oriented_side_of_bisector_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Vertex_conflict_C2<K,MTag>
+  Vertex_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Finite_edge_interior_conflict_C2<K,MTag>
+  Finite_edge_interior_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Infinite_edge_interior_conflict_C2<K,MTag>
+  Infinite_edge_interior_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Is_degenerate_edge_C2<K,MTag>
+  Is_degenerate_edge_2;
+
+#ifdef CGAL_SDG_USE_SIMPLIFIED_ARRANGEMENT_TYPE_PREDICATE
+  typedef typename
+  Internal::Which_arrangement_type<K,ITag>::Arrangement_type
+  Arrangement_type_2;
+#else
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Arrangement_type_C2<K>
+  Arrangement_type_2;
+#endif
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_C2<K,MTag>
+  Oriented_side_2;
+
+  typedef typename R::Less_x_2 Less_x_2;
+  typedef typename R::Less_y_2 Less_y_2;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  ACCESS TO OBJECTS
+  //-----------------------------------------------------------------------
+
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //---------------------------------
+  Assign_2
+  assign_2_object() const {
+    return Assign_2();
+  }
+
+  Construct_object_2
+  construct_object_2_object() const { 
+    return Construct_object_2();
+  }
+
+  // CONSTRUCTIONS
+  //--------------
+  Construct_svd_vertex_2
+  construct_svd_vertex_2_object() const { 
+    return Construct_svd_vertex_2();
+  }
+
+  // L2 traits do not contain bisector constructions
+  typedef Tag_false Tag_has_bisector_constructions;
+
+  /*
+  Construct_svd_circle_2
+  construct_svd_circle_2_object() const {
+    return Construct_svd_circle_2();
+  }
+  */
+
+  // PREDICATES
+  //-----------
+  Compare_x_2
+  compare_x_2_object() const {
+    return Compare_x_2();
+  }
+
+  Compare_y_2
+  compare_y_2_object() const {
+    return Compare_y_2();
+  }
+
+  Orientation_2
+  orientation_2_object() const {
+    return Orientation_2();
+  }
+
+  Equal_2
+  equal_2_object() const {
+    return Equal_2();
+  }
+
+  Are_parallel_2
+  are_parallel_2_object() const {
+    return Are_parallel_2();
+  }
+
+  Oriented_side_of_bisector_2
+  oriented_side_of_bisector_2_object() const {
+    return Oriented_side_of_bisector_2();
+  }
+
+  Vertex_conflict_2
+  vertex_conflict_2_object() const {
+    return Vertex_conflict_2();
+  }
+
+  Finite_edge_interior_conflict_2
+  finite_edge_interior_conflict_2_object() const {
+    return Finite_edge_interior_conflict_2();
+  }
+
+  Infinite_edge_interior_conflict_2
+  infinite_edge_interior_conflict_2_object() const {
+    return Infinite_edge_interior_conflict_2();
+  }
+
+  Is_degenerate_edge_2
+  is_degenerate_edge_2_object() const {
+    return Is_degenerate_edge_2();
+  }
+
+  Arrangement_type_2
+  arrangement_type_2_object() const {
+    return Arrangement_type_2();
+  }
+
+  Oriented_side_2
+  oriented_side_2_object() const {
+    return Oriented_side_2();
+  }
+
+  Less_x_2
+  less_x_2_object() const {
+    return Less_x_2();
+  }
+
+  Less_y_2
+  less_y_2_object() const {
+    return Less_y_2();
+  }
+};
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/edge_list.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/edge_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/edge_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/edge_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2.h
new file mode 100644
index 0000000..3efd83b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2.h
@@ -0,0 +1,414 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_H
+
+#include <iostream>
+#include <vector>
+#include <list>
+#include <set>
+#include <map>
+#include <algorithm>
+#include <boost/tuple/tuple.hpp>
+
+#include <CGAL/Segment_Delaunay_graph_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Segment_Delaunay_graph_storage_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_vertex_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_face_base_2.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+
+#include <CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h>
+#include <CGAL/Segment_Delaunay_graph_2/edge_list.h>
+#include <CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Constructions_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h>
+
+#include <CGAL/Iterator_project.h>
+#include <CGAL/utility.h>
+
+#include <CGAL/spatial_sort.h>
+#include <CGAL/Spatial_sort_traits_adapter_2.h>
+
+#include <boost/iterator/counting_iterator.hpp>
+
+/*
+  Conventions:
+  ------------
+  1. we treat segments as open; the endpoints are separate objects
+  2. a segment of length zero is treated as a point
+  3. a point is deleted only if it has no segment adjacent to it
+  4. when a segment is deleted it's endpoints are not deleted
+  5. the user can force the deletion of endpoints; this is only done
+     if condition 3 is met.
+  6. when objects are written to a stream we distinguish between
+     points and segments; points start by a 'p' and segments by an 's'.
+*/
+
+
+namespace CGAL {
+
+template<class Gt,
+	 class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
+	 class D_S = Triangulation_data_structure_2 <
+                Segment_Delaunay_graph_vertex_base_2<ST>,
+                Segment_Delaunay_graph_face_base_2<Gt> >,
+	 class LTag = Tag_false >
+class Segment_Delaunay_graph_Linf_2
+  : public Segment_Delaunay_graph_2< Gt, ST, D_S, LTag >
+{
+protected:
+  typedef Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>  Self;
+  typedef Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>       Base;
+
+public:
+  typedef Gt                                     Geom_traits;
+  typedef ST                                     Storage_traits;
+
+  typedef typename Base::Site_2                  Site_2;
+  typedef typename Base::Point_2                 Point_2;
+
+  typedef typename Base::Finite_vertices_iterator Finite_vertices_iterator;
+
+  typedef typename Base::All_faces_iterator All_faces_iterator;
+  typedef typename Base::All_vertices_iterator All_vertices_iterator;
+  typedef typename Base::All_edges_iterator All_edges_iterator;
+
+  typedef typename Base::Vertex_handle  Vertex_handle;
+  typedef typename Base::Face_handle    Face_handle;
+  typedef typename Base::Edge           Edge;
+  typedef typename Base::Face           Face;
+
+  typedef typename Base::Vertex_circulator     Vertex_circulator;
+  typedef typename Base::Face_circulator       Face_circulator;
+
+protected:
+  typedef typename Base::Intersections_tag Intersections_tag;
+  typedef typename Base::Face_pair        Face_pair;
+  typedef typename Base::Storage_site_2   Storage_site_2;
+
+  typedef typename Base::Vertex_triple    Vertex_triple;
+
+
+protected:
+  using Base::split_storage_site;
+  using Base::merge_info;
+  using Base::oriented_side;
+
+public:
+  using Base::cw;
+  using Base::ccw;
+  using Base::dimension;
+  using Base::number_of_vertices;
+  using Base::number_of_faces;
+  using Base::number_of_input_sites;
+  using Base::number_of_output_sites;
+  using Base::all_vertices_begin;
+  using Base::all_vertices_end;
+  using Base::all_edges_begin;
+  using Base::all_edges_end;
+  using Base::all_faces_begin;
+  using Base::all_faces_end;
+  using Base::tds;
+  using Base::incident_vertices;
+  using Base::incident_faces;
+  using Base::infinite_vertex;
+  using Base::is_infinite;
+  using Base::storage_traits;
+
+private:
+  // CREATION helper
+  template<class ITag>
+  inline
+  void setup_if_intersecting_pointer(ITag tag) {
+    setup_if_intersecting_pointer_with_tag(tag);
+  }
+
+  void setup_if_intersecting_pointer_with_tag(Tag_false) {
+    Base::insert_point_on_segment_ptr = NULL;
+  }
+
+  void setup_if_intersecting_pointer_with_tag(Tag_true) {
+    Base::insert_point_on_segment_ptr =
+      static_cast<typename Base::Insert_on_Type>(
+        &Self::insert_point_on_segment);
+  }
+
+  void setup_insert_on_pointers_linf(void) {
+    Intersections_tag itag;
+    setup_if_intersecting_pointer(itag);
+    Base::insert_exact_point_on_segment_ptr =
+      static_cast<typename Base::Insert_Exact_on_Type>(
+        &Self::insert_exact_point_on_segment);
+  }
+
+public:
+  // CREATION
+  //---------
+  Segment_Delaunay_graph_Linf_2(const Geom_traits& gt = Geom_traits(),
+			   const Storage_traits& st = Storage_traits())
+    : Base(gt,st)
+  {
+    setup_insert_on_pointers_linf();
+  }
+
+  template< class Input_iterator >
+  Segment_Delaunay_graph_Linf_2(Input_iterator first, Input_iterator beyond,
+			   const Geom_traits& gt = Geom_traits(),
+			   const Storage_traits& st = Storage_traits())
+    : Base(gt, st)
+  {
+    setup_insert_on_pointers_linf();
+    Base::insert(first, beyond);
+  }
+
+  Segment_Delaunay_graph_Linf_2(const Self& other)
+    : Base(other) {}
+
+  Self& operator=(const Self& other)
+  {
+    if ( this != &other ) {
+      Base::operator=(other);
+    }
+    return (*this);
+  }
+
+
+public:
+
+// print face in standard output
+  void face_output(const char *before, Face_handle f,
+                   const char *after) const;
+
+  Oriented_side
+  oriented_side_face_tiebreak(
+    Face_handle f, const Vertex_handle& v, const Site_2 & sitev,
+    const Site_2 & sitev_supp, const Site_2 & t) const;
+
+
+  Face_pair
+  find_faces_to_split(const Vertex_handle& v, const Site_2& t,
+                      unsigned int & flips_nop,
+                      unsigned int & flips_pon) const;
+
+  Vertex_triple
+  insert_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+			  Vertex_handle v, const Tag_true&);
+
+  Vertex_triple
+  insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+				Vertex_handle v);
+
+
+  // Linf tiebreaker for finite vertex
+  inline Oriented_side
+  oriented_side(const Site_2& s1, const Site_2& s2, const Site_2& s3,
+		const Site_2& supp, const Site_2& p,
+                const Point_2& pt ) const {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return Base::geom_traits().oriented_side_2_object()(
+        s1, s2, s3, supp, p, pt);
+  }
+
+  // Linf tiebreaker for infinite vertex
+  inline Oriented_side
+  oriented_side(const Site_2& s1, const Site_2& s2,
+		const Site_2& supp, const Site_2& p,
+                const Point_2& pt ) const {
+    CGAL_precondition( supp.is_segment() && p.is_point() );
+    return Base::geom_traits().oriented_side_2_object()(
+        s1, s2, supp, p, pt);
+  }
+
+
+  void file_output_verbose(std::ostream& os) const {
+    const char inf_vertex[] = "infinite vertex";
+    const char v_id[] = {'p', 'q', 'r', 's'};
+
+    os << "SDG verbose output" << std::endl;
+    os << "==================" << std::endl;
+    os << "dimension of sdg = " << dimension() << std::endl;
+    os << "number of vertices in sdg = "
+      << number_of_vertices() << std::endl;
+    os << "number of faces in sdg = " << number_of_faces() << std::endl;
+    os << "number of input sites in sdg = "
+      << number_of_input_sites() << std::endl;
+    os << "number of output sites in sdg = "
+      << number_of_output_sites() << std::endl;
+    // print the vertices of the segment Delaunay graph
+    os << std::endl;
+    os << "Output sites / vertices of sdg:" << std::endl;
+    os << "-------------------------------" << std::endl;
+    Finite_vertices_iterator     fvit;
+    All_vertices_iterator avit;
+    Vertex_handle vh;
+
+    if (dimension() < 2) {
+      CGAL_assertion(number_of_faces() == 0);
+    }
+
+    int v_count=0;
+    for (avit = all_vertices_begin();
+         avit != all_vertices_end();
+         ++avit) {
+      vh = avit;
+      if (is_infinite(vh)) {
+        os << "vertex " << ++v_count << " : " << inf_vertex << std::endl;
+      } else {
+        os << "vertex " << ++v_count << " : " << avit->site() << std::endl;
+      }
+    }
+
+    os << std::endl;
+    os << "Edges of sdg:" << std::endl;
+    os << "-------------" << std::endl;
+
+    All_edges_iterator eit = all_edges_begin();
+    for (int k = 1; eit != all_edges_end(); ++eit, ++k) {
+      Edge e = *eit;
+      // get the vertices defining the edge
+
+      /*Vertex_handle v[] = {
+        (e.first)->vertex(ccw(e.second)),
+        (this->dimension() == 1 ?
+          (e.first)->vertex(cw(e.second)):
+          (e.first)->vertex(e.second))
+      };*/
+      Vertex_handle v[] = {
+        (e.first)->vertex(ccw(e.second)),
+        (e.first)->vertex(cw(e.second))
+      };
+
+
+      os << "--- Edge " << k << " ---" << std::endl;
+      for (int i = 0; i < 2; i++) {
+        // check if the vertex is the vertex at infinity; if yes, print
+        // the corresponding string, otherwise print the site
+        if ( is_infinite(v[i]) ) {
+          os << v_id[i] << ": " << inf_vertex << std::endl;
+        } else {
+          os << v_id[i] << ": " << v[i]->site() << std::endl;
+        }
+      }
+      os << std::endl;
+    }
+
+    os << std::endl;
+    os << "Faces of sdg:" << std::endl;
+    os << "-------------" << std::endl;
+
+    All_faces_iterator fit = all_faces_begin();
+    for (int k = 1; fit != all_faces_end(); ++fit, ++k) {
+      Face f = *fit;
+      // get the vertices defining the face
+      Vertex_handle v[] = { f.vertex(0),
+        f.vertex(1),
+        f.vertex(2)
+      };
+
+      os << "--- Face " << k << " ---" << std::endl;
+      for (int i = 0; i < 3; i++) {
+        // check if the vertex is the vertex at infinity; if yes, print
+        // the corresponding string, otherwise print the site
+        if ( is_infinite(v[i]) ) {
+          os << v_id[i] << ": " << inf_vertex << std::endl;
+        } else {
+          os << v_id[i] << ": " << v[i]->site() << std::endl;
+        }
+      }
+      os << std::endl;
+    }
+
+    if (dimension() > 1) {
+      os << std::endl;
+      os << "Voronoi edges of sdg:" << std::endl;
+      os << "---------------------" << std::endl;
+
+      All_edges_iterator efit = all_edges_begin();
+      for (int k = 1; efit != all_edges_end(); ++efit, ++k) {
+        Edge e = *efit;
+        // get the vertices defining the Voronoi edge
+        Vertex_handle v[] = {
+          (e.first)->vertex( ccw(e.second) ),
+          (e.first)->vertex(  cw(e.second) ),
+          (e.first)->vertex(     e.second  ),
+          (this->dimension() == 1) ?
+            (e.first)->vertex(   e.second  ) :
+            tds().mirror_vertex(e.first, e.second)
+        };
+
+        os << "--- Voronoi Edge " << k << " ---" << std::endl;
+        for (int i = 0; i < 4; i++) {
+          // check if the vertex is the vertex at infinity; if yes, print
+          // the corresponding string, otherwise print the site
+          if ( is_infinite(v[i]) ) {
+            os << v_id[i] << ": " << inf_vertex << std::endl;
+          } else {
+            os << v_id[i] << ": " << v[i]->site() << std::endl;
+          }
+        }
+        os << std::endl;
+      }
+    }
+
+    // a counterclockwise traversal of the vertices adjacent to the
+    // infinite_vertex is a clockwise traversal of the convex hull
+    os << std::endl;
+    os << "Convex-hull of sdg:" << std::endl;
+    os << "-------------------" << std::endl;
+    Vertex_handle v_inf = infinite_vertex();
+    Vertex_circulator	 vc1 = incident_vertices(v_inf);
+    Vertex_circulator	 vc2 = vc1;
+    CGAL_precondition(is_infinite(v_inf));
+    /*if (is_infinite(v_inf)){
+      os << "vertex 0 : " << inf_vertex << std::endl;
+    }*/
+    if (vc1 != 0) {
+      unsigned int cnt = 0;
+      do {
+        vh = vc1;
+        CGAL_assertion(! is_infinite(vh));
+        if (is_infinite(vh)) {
+          os << "vertex " << ++cnt << " : " << inf_vertex << std::endl;
+        } else {
+          os << "vertex " << ++cnt << " : " << vc1->site() << std::endl;
+        }
+      } while (++vc1 != vc2);
+    }
+
+    os << "=======================" << std::endl;
+    os << "SDG verbose output ends" << std::endl;
+    os << "=======================" << std::endl;
+
+  }
+
+};
+
+} //namespace CGAL
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h>
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h
new file mode 100644
index 0000000..5ca68db
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h
@@ -0,0 +1,1950 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_PREDICATES_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_PREDICATES_C2_H
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_x_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_y_2.h>
+
+#include <CGAL/Polychain_2.h>
+
+#include <CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h>
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+template<class K>
+struct Basic_predicates_C2
+ : public CGAL::SegmentDelaunayGraph_2::Basic_predicates_C2<K>
+{
+public:
+  //-------------------------------------------------------------------
+  // TYPES
+  //-------------------------------------------------------------------
+
+  typedef CGAL::SegmentDelaunayGraph_2::Basic_predicates_C2<K> Base;
+
+  typedef typename K::RT                  RT;
+  typedef typename K::FT                  FT;
+  typedef typename K::Point_2             Point_2;
+  typedef typename K::Segment_2           Segment_2;
+  typedef typename K::Site_2              Site_2;
+  typedef typename K::Oriented_side       Oriented_side;
+  typedef typename K::Bounded_side        Bounded_side;
+  typedef typename K::Comparison_result   Comparison_result;
+  typedef typename K::Sign                Sign;
+  typedef typename K::Orientation         Orientation;
+  typedef typename K::Compute_scalar_product_2
+                        Compute_scalar_product_2;
+  typedef typename K::Boolean             Boolean;
+  typedef typename K::Direction_2         Direction_2;
+  typedef typename K::Vector_2            Vector_2;
+  typedef typename K::Compare_x_2         Compare_x_2;
+  typedef typename K::Compare_y_2         Compare_y_2;
+
+  typedef typename CGAL::Polychainline_2<K> Polychainline_2;
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>  Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K>
+          Are_same_segments_2;
+
+  typedef SegmentDelaunayGraph_2::Compare_x_2<K> Compare_x_2_Sites_Type;
+  typedef SegmentDelaunayGraph_2::Compare_y_2<K> Compare_y_2_Sites_Type;
+
+  typedef unsigned int Bearing;
+
+private:
+  typedef typename K::Intersections_tag ITag;
+  typedef Bisector_Linf<K>              Bisector_Linf_Type;
+
+  typedef typename Algebraic_structure_traits<RT>::Algebraic_category RT_Category;
+  typedef typename Algebraic_structure_traits<FT>::Algebraic_category FT_Category;
+public:
+
+  typedef typename Base::Line_2               Line_2;
+  typedef typename Base::Homogeneous_point_2  Homogeneous_point_2;
+
+public:    //    compute_supporting_line(q.supporting_segment(), a1, b1, c1);
+    //    compute_supporting_line(r.supporting_segment(), a2, b2, c2);
+
+  //-------------------------------------------------------------------
+  // BASIC CONSTRUCTIONS
+  //-------------------------------------------------------------------
+
+  using Base::compute_supporting_line;
+
+  // compute horizontal line l that goes through p,
+  // and leaves q on the oriented side s
+  // s: has to be either +1 or -1 (not 0)
+  // q: should not be on line l
+  static
+  Line_2
+  compute_horizontal_side_line(
+      const Point_2& p, const Point_2& q, Oriented_side s)
+  {
+    CGAL_precondition(s != ON_ORIENTED_BOUNDARY);
+
+    RT b, c;
+
+    b = RT(1);
+    c = - p.y();
+
+    // direction is (1, 0)
+
+    Compare_y_2 cmpy;
+    if (((cmpy(q, p) == LARGER) &&
+         (s == ON_NEGATIVE_SIDE)   ) ||
+        ((cmpy(q, p) == SMALLER) &&
+         (s == ON_POSITIVE_SIDE)   )   ) {
+      b = -b;
+      c = -c;
+    }
+    return Line_2(RT(0), b, c);
+  }
+
+  // compute vertical line l that goes through p,
+  // and leaves q on the oriented side s
+  // s: has to be either +1 or -1 (not 0)
+  // q: should not be on line l
+  static
+  Line_2
+  compute_vertical_side_line(
+      const Point_2& p, const Point_2& q, Oriented_side s)
+  {
+    CGAL_precondition(s != ON_ORIENTED_BOUNDARY);
+
+    RT a, c;
+
+    a = RT(1);
+    c = - p.x();
+
+    // direction is (0, -1)
+
+    Compare_x_2 cmpx;
+    if (((cmpx(q, p) == LARGER) &&
+         (s == ON_NEGATIVE_SIDE)   ) ||
+        ((cmpx(q, p) == SMALLER) &&
+         (s == ON_POSITIVE_SIDE)   )   ) {
+      a = -a;
+      c = -c;
+    }
+    return Line_2(a, RT(0), c);
+  }
+
+
+  //using Base::compute_projection;
+
+  static
+  Homogeneous_point_2
+  compute_linf_projection_hom(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_degenerate() );
+    CGAL_precondition(
+        (CGAL::sign(l.a()) != ZERO) || (CGAL::sign(l.b()) != ZERO) );
+
+    Sign signa = CGAL::sign(l.a());
+    Sign signb = CGAL::sign(l.b());
+
+    RT hx, hy, hw;
+
+    if (signa == ZERO) { // l is horizontal
+      // l.a() == 0  =>  y = -c/b
+      hx = p.x() * l.b();
+      hy = - l.c();
+      hw = l.b();
+    } else if (signb == ZERO) { // l is vertical
+      // l.b() == 0  =>  x = -c/a
+      hx = - l.c();
+      hy = p.y() * l.a();
+      hw = l.a();
+    } else {
+      // here both l.a() and l.b() are non-zero
+      if ( signa == signb ) {
+        hx = l.b() * ( p.x() - p.y() ) - l.c();
+        hy = l.a() * ( p.y() - p.x() ) - l.c();
+        hw = l.a() + l.b();
+      } else { // signa != signb
+        hx = -l.b() * ( p.x() + p.y() ) - l.c();
+        hy = l.a() * ( p.x() + p.y() ) + l.c();
+        hw = l.a() - l.b();
+      }
+    }
+
+    return Homogeneous_point_2(hx, hy, hw);
+  }
+
+  static
+  Point_2
+  compute_linf_projection_nonhom(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_degenerate() );
+    CGAL_precondition(
+        (CGAL::sign(l.a()) != ZERO) || (CGAL::sign(l.b()) != ZERO) );
+
+    Sign signa = CGAL::sign(l.a());
+    Sign signb = CGAL::sign(l.b());
+
+    RT hx, hy, hw;
+
+    if (signa == ZERO) { // l is horizontal
+      // l.a() == 0  =>  y = -c/b
+      hx = p.x() * l.b();
+      hy = - l.c();
+      hw = l.b();
+    } else if (signb == ZERO) { // l is vertical
+      // l.b() == 0  =>  x = -c/a
+      hx = - l.c();
+      hy = p.y() * l.a();
+      hw = l.a();
+    } else {
+      // here both l.a() and l.b() are non-zero
+      if ( signa == signb ) {
+        hx = l.b() * ( p.x() - p.y() ) - l.c();
+        hy = l.a() * ( p.y() - p.x() ) - l.c();
+        hw = l.a() + l.b();
+      } else { // signa != signb
+        hx = -l.b() * ( p.x() + p.y() ) - l.c();
+        hy = l.a() * ( p.x() + p.y() ) + l.c();
+        hw = l.a() - l.b();
+      }
+    }
+
+    return Point_2(hx, hy, hw);
+  }
+
+  static
+  Homogeneous_point_2
+  compute_horizontal_projection_hom(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_horizontal() );
+
+    CGAL_precondition(
+        (CGAL::sign(l.a()) != ZERO) );
+
+    RT hx, hy, hw;
+
+    hx = - l.b() * p.y() - l.c();
+    hy = p.y() * l.a();
+    hw = l.a();
+
+    return Homogeneous_point_2(hx, hy, hw);
+  }
+
+  static
+  Point_2
+  compute_horizontal_projection(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_horizontal() );
+    CGAL_precondition(
+        (CGAL::sign(l.a()) != ZERO) );
+
+    RT hx, hy, hw;
+
+    hx = - l.b() * p.y() - l.c();
+    hy = p.y() * l.a();
+    hw = l.a();
+
+    return Point_2(hx, hy, hw);
+  }
+
+  static
+  Homogeneous_point_2
+  compute_vertical_projection_hom(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_horizontal() );
+    CGAL_precondition(
+        (CGAL::sign(l.b()) != ZERO) );
+
+    RT hx, hy, hw;
+
+    hx = p.x() * l.b();
+    hy = - l.a() * p.x() - l.c();
+    hw = l.b();
+
+    return Homogeneous_point_2(hx, hy, hw);
+  }
+
+  static
+  Point_2
+  compute_vertical_projection(const Line_2& l, const Point_2& p)
+  {
+    //CGAL_precondition( ! l.is_horizontal() );
+    CGAL_precondition(
+        (CGAL::sign(l.b()) != ZERO) );
+
+    RT hx, hy, hw;
+
+    hx = p.x() * l.b();
+    hy = - l.a() * p.x() - l.c();
+    hw = l.b();
+
+    return Point_2(hx, hy, hw);
+  }
+
+
+  //using Base::projection_on_line;
+
+  using Base::midpoint;
+
+  using Base::compute_perpendicular;
+
+  // compute_cw_perpendicular is opposite of compute_perpendicular
+  static
+  Line_2 compute_cw_perpendicular(const Line_2& l, const Point_2& p)
+  {
+    RT a, b, c;
+    a = l.b();
+    b = -l.a();
+    c = -l.b() * p.x() + l.a() * p.y();
+    return Line_2(a, b, c);
+  }
+
+  static
+  Line_2 compute_linf_perpendicular(const Line_2& l, const Point_2& p)
+  {
+    RT a, b, c;
+    a = RT( - CGAL::sign(l.b()) );
+    b = RT( CGAL::sign(l.a()) );
+    c = - a * p.x() - b * p.y();
+    return Line_2(a, b, c);
+  }
+
+  using Base::opposite_line;
+
+  // philaris: similar to compute_supporting_line
+  static
+  Line_2 compute_line_from_to(const Point_2& p, const Point_2&q)
+  {
+    RT a, b, c;
+    a = p.y() - q.y();
+    b = q.x() - p.x();
+
+    CGAL_assertion((CGAL::sign(a) != ZERO) ||
+                   (CGAL::sign(b) != ZERO))   ;
+
+    c = p.x() * q.y() - q.x() * p.y();
+
+    return Line_2(a, b, c);
+  }
+
+  // compute line from a point and a direction
+  inline static
+  Line_2 compute_line_dir(
+      const Homogeneous_point_2& p, const Direction_2& d)
+  {
+    return Line_2( -d.dy()*p.hw(), d.dx()*p.hw(),
+                   -(-d.dy()*p.hx() +d.dx()*p.hy()) );
+  }
+
+  // compute bisector of two parallel lines
+  inline static
+  Line_2 parallel_bis(const Line_2& lp, const Line_2& lq)
+  {
+    RT bisa, bisb, bisc;
+    if ( CGAL::sign ( lq.a() ) != ZERO ) {
+      bisa = RT(2) * lp.a() * lq.a();
+      bisb = RT(2) * lp.a() * lq.b();
+      bisc = lp.a() * lq.c() + lp.c() * lq.a();
+    } else {
+      bisa = RT(2) * lp.a() * lq.b();
+      bisb = RT(2) * lp.b() * lq.b();
+      bisc = lp.c() * lq.b() + lp.b() * lq.c();
+    }
+    return Line_2(bisa, bisb, bisc);
+  }
+
+  /* use point p for y coordinate of line */
+  static
+  Line_2 compute_horizontal_line_from_to(const Point_2& p, const Point_2&q)
+  {
+    RT b, c;
+    Compare_x_2 cmpx;
+    Comparison_result cmpxqp = cmpx(q,p);
+    CGAL_assertion(cmpxqp != EQUAL);
+    b = (cmpxqp == SMALLER) ? RT(-1) : RT(1);
+    c = (cmpxqp == SMALLER) ? p.y() : -p.y();
+    return Line_2(RT(0), b, c);
+  }
+
+  /* use point p for x coordinate of line */
+  static
+  Line_2 compute_vertical_line_from_to(const Point_2& p, const Point_2&q)
+  {
+    RT a, c;
+    Compare_y_2 cmpy;
+    Comparison_result cmpypq = cmpy(p,q);
+    CGAL_assertion(cmpypq != EQUAL);
+    a = (cmpypq == SMALLER) ? RT(-1) : RT(1);
+    //a = RT(CGAL::sign(p.y() - q.y()));
+    c = (cmpypq == SMALLER) ? p.x() : -p.x();
+    return Line_2(a, RT(0), c);
+  }
+
+
+  // neg slope 45 degree line passing through p
+  inline
+  static
+  Line_2 compute_neg_45_line_at(const Point_2 & p)
+  {
+    return Line_2(p.hw() , p.hw(), -p.hx()-p.hy());
+  }
+
+  // pos slope 45 degree line passing through p
+  inline
+  static
+  Line_2 compute_pos_45_line_at(const Point_2 & p)
+  {
+    return Line_2(RT(1),RT(-1),p.y()-p.x());
+  }
+
+  // horizontal line passing through p
+  inline
+  static
+  Line_2 compute_hor_line_at(const Point_2 & p)
+  {
+    return Line_2(RT(0), p.hw(), - p.hy());
+  }
+
+  // vertical line passing through p
+  inline
+  static
+  Line_2 compute_ver_line_at(const Point_2 & p)
+  {
+    return Line_2(p.hw(), RT(0), - p.hx());
+  }
+
+  static
+  RT compute_linf_distance(const Point_2& p, const Point_2& q)
+  {
+    return (CGAL::max)(
+              CGAL::abs(p.x() - q.x()),
+              CGAL::abs(p.y() - q.y()));
+  }
+
+  static
+  std::pair<RT,RT>
+  compute_linf_distance(const Point_2& p, const Line_2& l)
+  {
+    const RT nomin = CGAL::abs(l.a() * p.x() + l.b() * p.y() + l.c());
+    const RT denom = CGAL::abs(
+          l.a() +
+          ( CGAL::sign(l.a()) == CGAL::sign(l.b())? l.b() : -l.b() ) );
+    return std::pair<RT,RT>(nomin, denom);
+  }
+
+  static
+  void compute_intersection_of_lines(
+      const Line_2& l1, const Line_2& l2,
+      RT& hx, RT& hy, RT& hw)
+  {
+    hx = l1.b() * l2.c() - l1.c() * l2.b();
+    hy = l1.c() * l2.a() - l1.a() * l2.c();
+    hw = l1.a() * l2.b() - l1.b() * l2.a();
+  }
+
+  inline
+  static
+  RT coord_at(const Line_2 &l, const RT & val, const bool return_y_coord)
+  {
+    return (return_y_coord)?
+      (l.a() * val + l.c()) / (- l.b()) :
+      (l.b() * val + l.c()) / (- l.a()) ;
+  }
+
+  inline
+  static
+  bool touch_same_side(
+      const Site_2 & p, const Site_2 & q, const Line_2 & l,
+      const bool samexpq, const bool pos_slope)
+  {
+    const RT common_coord = (samexpq) ? p.point().x() : p.point().y();
+    const RT otherp = (samexpq) ? p.point().y() : p.point().x();
+    const RT otherq = (samexpq) ? q.point().y() : q.point().x();
+    const RT lineval = coord_at(l, common_coord, samexpq);
+    return (CGAL::sign(lineval - otherp) == CGAL::sign(otherp - otherq)) ?
+      samexpq == pos_slope :
+      samexpq != pos_slope ;
+  }
+
+  inline
+  static
+  bool is_orth_dist_smaller_than_pt_dist(
+      const RT & closest_coord, const Line_2 & l,
+      const Site_2 & p, const Site_2 & q,
+      const bool samexpq)
+  {
+    const RT lineval = coord_at(l, closest_coord, ! samexpq);
+    return CGAL::abs(lineval - ((samexpq) ? p.point().x() : p.point().y()))
+           <
+           CGAL::abs((samexpq)? p.point().y() - q.point().y() :
+                                p.point().x() - q.point().x()  ) ;
+  }
+
+
+public:
+  //-------------------------------------------------------------------
+  // BASIC PREDICATES
+  //-------------------------------------------------------------------
+  static
+  Comparison_result
+  compare_linf_distances_to_line(const Line_2& l, const Point_2& p,
+                                    const Point_2& q)
+  {
+    Homogeneous_point_2 hp = compute_linf_projection_hom(l, p);
+    Homogeneous_point_2 hq = compute_linf_projection_hom(l, q);
+
+    RT dlp = (CGAL::max)(CGAL::abs(p.x() - hp.x()),
+                         CGAL::abs(p.y() - hp.y()));
+
+    RT dlq = (CGAL::max)(CGAL::abs(q.x() - hq.x()),
+                         CGAL::abs(q.y() - hq.y()));
+
+    Comparison_result crude = CGAL::compare(dlp, dlq);
+
+    if (crude != EQUAL) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout
+          << "compare_linf_distances_to_line refining"
+          << std::endl;);
+      return crude;
+    }
+  }
+
+  static
+  Comparison_result
+  compare_linf_distances_to_lines(const Point_2& p,
+				     const Line_2& l1,
+                                     const Line_2& l2)
+  {
+    Homogeneous_point_2 hl1 = compute_linf_projection_hom(l1, p);
+    Homogeneous_point_2 hl2 = compute_linf_projection_hom(l2, p);
+
+    RT dl1p = (CGAL::max)(CGAL::abs(hl1.x() - p.x()),
+                          CGAL::abs(hl1.y() - p.y()));
+
+    RT dl2p = (CGAL::max)(CGAL::abs(hl2.x() - p.x()),
+                          CGAL::abs(hl2.y() - p.y()));
+
+    Comparison_result crude = CGAL::compare(dl1p, dl2p);
+
+    if (crude != EQUAL) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout << "compare_linf_distances_to_lines refining"
+                     << std::endl;);
+      return crude;
+    }
+  }
+
+  using Base::oriented_side_of_line;
+
+  using Base::is_on_positive_halfspace;
+
+  /* compares the Linf distances pq and pr;
+     if the Linf distances pq are the same, then try to break ties
+     by comparing the minima of the dx and dy distance components
+   */
+  static
+  Comparison_result
+  compare_distance_to_point_linf(
+      const Point_2& p, const Point_2& q, const Point_2& r)
+  {
+    const RT pqdx = CGAL::abs(p.x()-q.x());
+    const RT pqdy = CGAL::abs(p.y()-q.y());
+    const bool pqdxlarger = CGAL::compare(pqdx, pqdy) == LARGER;
+    const RT & pqmax = pqdxlarger ? pqdx : pqdy;
+    const RT & pqmin = pqdxlarger ? pqdy : pqdx;
+
+    const RT prdx = CGAL::abs(p.x()-r.x());
+    const RT prdy = CGAL::abs(p.y()-r.y());
+    const bool prdxlarger = CGAL::compare(prdx, prdy) == LARGER;
+    const RT & prmax = prdxlarger ? prdx : prdy;
+    const RT & prmin = prdxlarger ? prdy : prdx;
+
+    const Comparison_result resmax = CGAL::compare(pqmax, prmax);
+
+    if (resmax == EQUAL) {
+      CGAL_SDG_DEBUG(std::cout <<
+          "debug cmpdistlinf break ties with min" << std::endl;);
+      return CGAL::compare(pqmin, prmin);
+    } else {
+      return resmax;
+    }
+  }
+
+  static
+  Bounded_side
+  bounded_side_of_bbox(
+      const Point_2& p, const Point_2& q, const Point_2& r)
+  {
+    // precondition: p, q, r should be monotone points.
+    // Predicate bounded_side_of_bbox (P_bbox) returns:
+    //  0 if p = q,
+    //  0 if r = p or r = q (ON_BOUNDARY),
+    // -1 if r is strictly outside the bounding box of p,q
+    //    (ON_UNBOUNDED_SIDE),
+    // +1 if r is strictly inside the bounding box of p,q
+    //    (ON_BOUNDED_SIDE).
+    // If p and q are on the same vertical or horizontal
+    // line but are not the same point, then the bounding
+    // box of p and q degenerates to the line segment pq.
+
+    CGAL_SDG_DEBUG(std::cout << "debug bounded_side_of_bbox (p q r) = ("
+                   << p << ") (" << q << ") (" << r << ")" << std::endl; );
+
+    if ((CGAL::compare(p.x(), q.x()) == EQUAL) &&
+        (CGAL::compare(p.y(), q.y()) == EQUAL)    ) {
+      return ON_BOUNDARY;
+    }
+
+    Comparison_result cmpxpr, cmpxrq, cmpypr, cmpyrq;
+
+    cmpxpr = CGAL::compare(p.x(), r.x());
+    cmpxrq = CGAL::compare(r.x(), q.x());
+    cmpypr = CGAL::compare(p.y(), r.y());
+    cmpyrq = CGAL::compare(r.y(), q.y());
+
+    Comparison_result comp =
+      CGAL::compare(cmpxpr*cmpxrq + cmpypr*cmpyrq, 0);
+
+    CGAL_SDG_DEBUG(std::cout << "debug bounded_side_of_bbox returns ";);
+
+    switch(comp) {
+      case SMALLER:
+        CGAL_SDG_DEBUG(std::cout << "ON_UNBOUNDED_SIDE" << std::endl;);
+        return ON_UNBOUNDED_SIDE;
+      case EQUAL:
+        CGAL_SDG_DEBUG(std::cout << "ON_BOUNDARY" << std::endl;);
+        return ON_BOUNDARY;
+      case LARGER:
+        CGAL_SDG_DEBUG(std::cout << "ON_BOUNDED_SIDE" << std::endl;);
+        return ON_BOUNDED_SIDE;
+      default:
+        CGAL_SDG_DEBUG(std::cout << "error: should never reach here";);
+        CGAL_assertion( false );
+        return ON_BOUNDARY;
+    }
+  }
+
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the positive halfplane of oriented line l
+  static
+  Boolean
+  intersects_segment_positive_halfplane(
+      const Site_2 & s,
+      const Line_2 & l)
+  {
+    Segment_2 seg = s.segment();
+
+    Point_2 ssrc = seg.source();
+    Point_2 strg = seg.target();
+
+    CGAL_SDG_DEBUG(std::cout
+      << "debug: intersects_segment_positive_halfplane "
+      << "s=" << s
+      << " l=" << l.a() << " " << l.b() << " " << l.c()
+                   << std::endl;);
+
+    Oriented_side oslsrc = oriented_side_of_line(l, ssrc);
+    Oriented_side osltrg = oriented_side_of_line(l, strg);
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: intersects_segment_positive_halfplane "
+          << "oslsrc=" << oslsrc << " osltrg=" << osltrg
+                     << std::endl;);
+
+    if ((oslsrc == ON_POSITIVE_SIDE) ||
+        (osltrg == ON_POSITIVE_SIDE)   )
+    {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the negative halfplane of oriented line l
+  static
+  Boolean
+  intersects_segment_negative_halfplane(
+      const Site_2 & s,
+      const Line_2 & l)
+  {
+    Segment_2 seg = s.segment();
+
+    Point_2 ssrc = seg.source();
+    Point_2 strg = seg.target();
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: intersects_segment_negative_halfplane "
+        << "s=" << s
+        << " l=" << l.a() << " " << l.b() << " " << l.c()
+        << std::endl;);
+
+    Oriented_side oslsrc = oriented_side_of_line(l, ssrc);
+    Oriented_side osltrg = oriented_side_of_line(l, strg);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: intersects_segment_negative_halfplane "
+        << "oslsrc=" << oslsrc << " osltrg=" << osltrg
+        << std::endl;);
+
+    if ((oslsrc == ON_NEGATIVE_SIDE) ||
+        (osltrg == ON_NEGATIVE_SIDE)   )
+    {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the following infinite box:
+  // the only finite corner of the infinite box is corner
+  // and if you traverse the infinite box ccw, then
+  // you meet points in that order: q, corner, p
+  static
+  Boolean
+  intersects_segment_interior_inf_box(const Site_2 & s,
+      const Site_2 & q, const Site_2 & p,
+      const Comparison_result & cmpxpq, const Comparison_result & cmpypq)
+  {
+    CGAL_assertion(cmpxpq != EQUAL);
+    CGAL_assertion(cmpypq != EQUAL);
+    CGAL_assertion(s.is_segment());
+    const Segment_2 seg = s.segment();
+
+    const Point_2 ssrc = seg.source();
+    const Point_2 strg = seg.target();
+
+    const Point_2 qq = q.point();
+    const Point_2 pp = p.point();
+
+    const bool eqcmp = cmpxpq == cmpypq;
+
+    Are_same_points_2 same_points;
+    Compare_x_2 cmpx;
+    Compare_y_2 cmpy;
+
+    bool is_ssrc_positive;
+    if (same_points(q, s.source_site()) ||
+        same_points(p, s.source_site())   ) {
+      is_ssrc_positive = false;
+    } else {
+      const bool conflp = eqcmp ?
+        (cmpx(pp, ssrc) == cmpxpq) : (cmpy(pp, ssrc) == cmpypq) ;
+      const bool conflq = eqcmp ?
+        (cmpy(ssrc, qq) == cmpypq) : (cmpx(ssrc, qq) == cmpxpq) ;
+      is_ssrc_positive = (conflp && conflq);
+    }
+    if (is_ssrc_positive) {
+      CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
+                     << "src endpoint inside" << std::endl;);
+      return true;
+    }
+
+    bool is_strg_positive;
+    if (same_points(q, s.target_site()) ||
+        same_points(p, s.target_site())   ) {
+      is_strg_positive = false;
+    } else {
+      const bool conflp = eqcmp ?
+        (cmpx(pp, strg) == cmpxpq) : (cmpy(pp, strg) == cmpypq) ;
+      const bool conflq = eqcmp ?
+        (cmpy(strg, qq) == cmpypq) : (cmpx(strg, qq) == cmpxpq) ;
+      is_strg_positive = (conflp && conflq);
+    }
+
+    if (is_strg_positive) {
+      CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
+                     << "trg endpoint inside" << std::endl;);
+      return true;
+    } else {
+      // here you have to check if the interior is inside
+
+      CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
+                     << "try for interior to be inside" << std::endl;);
+
+      const Point_2 corner = eqcmp ?
+        Point_2( pp.x(), qq.y() ) :
+        Point_2( qq.x(), pp.y() ) ;
+
+      // in fact, here you can intersect the segment
+      // with the ray starting from corner and going to the
+      // direction of the center of the infinite box
+
+      const RT one(1);
+
+      const Point_2 displaced ( corner.x() + (-cmpypq)*one ,
+                                corner.y() + cmpxpq * one   );
+
+      const Line_2 l = compute_line_from_to(corner, displaced);
+
+      const Line_2 lseg = compute_supporting_line(s.supporting_site());
+
+      RT hx, hy, hw;
+      compute_intersection_of_lines(l, lseg, hx, hy, hw);
+
+      if (CGAL::sign(hw) == ZERO) {
+        return false;
+      } else {
+        const Point_2 ip ( hx, hy, hw );
+        const Line_2 lqc = compute_line_from_to(qq, corner);
+        const Line_2 lcp = compute_line_from_to(corner, pp);
+        const Oriented_side os_lqc_ip = oriented_side_of_line(lqc, ip);
+        const Oriented_side os_lcp_ip = oriented_side_of_line(lcp, ip);
+
+        const Comparison_result cmpxsrcip = cmpx(ssrc, ip);
+        const Comparison_result cmpysrcip = cmpy(ssrc, ip);
+        const Comparison_result cmpxiptrg = cmpx(ip, strg);
+        const Comparison_result cmpyiptrg = cmpy(ip, strg);
+
+        // philaris: to check
+        Boolean is_ip_inside_segment =
+          (CGAL::sign(cmpxsrcip * cmpxiptrg +
+                      cmpysrcip * cmpyiptrg   )) == POSITIVE;
+
+        if ((os_lqc_ip == ON_POSITIVE_SIDE) &&
+            (os_lcp_ip == ON_POSITIVE_SIDE) &&
+            is_ip_inside_segment ) {
+          return true;
+        } else {
+          return false;
+        }
+      }
+    }
+  } // end of intersects_segment_interior_inf_box
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the following infinite box:
+  // the only finite corner of the infinite box is corner
+  // and if you traverse the infinite box ccw, then
+  // you meet points in that order: q, corner, p
+  static
+  Boolean
+  intersects_segment_interior_inf_box(const Site_2 & s,
+      const Site_2 & q, const Point_2 & corner,
+      const Site_2 & p)
+  {
+    CGAL_assertion(s.is_segment());
+    Segment_2 seg = s.segment();
+
+    Point_2 ssrc = seg.source();
+    Point_2 strg = seg.target();
+
+    Point_2 qq = q.point();
+    Point_2 pp = p.point();
+
+    Line_2 lqc = compute_line_from_to(qq, corner);
+    Line_2 lcp = compute_line_from_to(corner, pp);
+
+    Are_same_points_2 same_points;
+
+    bool is_ssrc_positive;
+    if (same_points(q, s.source_site()) ||
+        same_points(p, s.source_site())   ) {
+      is_ssrc_positive = false;
+    } else {
+      Oriented_side os_lqc_ssrc = oriented_side_of_line(lqc, ssrc);
+      Oriented_side os_lcp_ssrc = oriented_side_of_line(lcp, ssrc);
+      is_ssrc_positive =
+        ((os_lqc_ssrc == ON_POSITIVE_SIDE) &&
+         (os_lcp_ssrc == ON_POSITIVE_SIDE)    ) ;
+    }
+
+    bool is_strg_positive;
+    if (same_points(q, s.target_site()) ||
+        same_points(p, s.target_site())   ) {
+      is_strg_positive = false;
+    } else {
+      Oriented_side os_lqc_strg = oriented_side_of_line(lqc, strg);
+      Oriented_side os_lcp_strg = oriented_side_of_line(lcp, strg);
+      is_strg_positive =
+        ((os_lqc_strg == ON_POSITIVE_SIDE) &&
+         (os_lcp_strg == ON_POSITIVE_SIDE)    ) ;
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug qcp= (" << q << ") (" << corner
+        << ") (" << p << ")"
+        << " isssrcpos=" << is_ssrc_positive
+        << " isstrgpos=" << is_strg_positive
+        << std::endl;);
+
+    if (is_ssrc_positive || is_strg_positive) {
+      CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
+                     << "endpoint inside" << std::endl;);
+      return true;
+    } else {
+      // here you have to check if the interior is inside
+
+      CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
+                     << "try for interior to be inside" << std::endl;);
+
+      // in fact, here you can intersect the segment
+      // with the ray starting from corner and going to the
+      // direction of the center of the infinite box
+
+      Compare_x_2 cmpx;
+      Compare_y_2 cmpy;
+
+      Comparison_result cmpxpq = cmpx(pp,qq);
+      Comparison_result cmpypq = cmpy(pp,qq);
+
+      RT one(1);
+
+      Point_2 displaced ( corner.x() + (-cmpypq)*one ,
+                          corner.y() + cmpxpq * one   );
+
+      Line_2 l = compute_line_from_to(corner, displaced);
+
+      Line_2 lseg = compute_supporting_line(s.supporting_site());
+
+      RT hx, hy, hw;
+
+      compute_intersection_of_lines(l, lseg, hx, hy, hw);
+
+      if (CGAL::sign(hw) == ZERO) {
+        return false;
+      } else {
+        Point_2 ip ( hx/hw, hy/hw);
+        Oriented_side os_lqc_ip = oriented_side_of_line(lqc, ip);
+        Oriented_side os_lcp_ip = oriented_side_of_line(lcp, ip);
+
+        Compare_x_2 cmpx;
+        Compare_y_2 cmpy;
+
+        Comparison_result cmpxsrcip = cmpx(ssrc, ip);
+        Comparison_result cmpysrcip = cmpy(ssrc, ip);
+        Comparison_result cmpxiptrg = cmpx(ip, strg);
+        Comparison_result cmpyiptrg = cmpy(ip, strg);
+
+        // philaris: to check
+        Boolean is_ip_inside_segment =
+          (CGAL::sign(cmpxsrcip * cmpxiptrg +
+                      cmpysrcip * cmpyiptrg   )) == POSITIVE;
+
+        if ((os_lqc_ip == ON_POSITIVE_SIDE) &&
+            (os_lcp_ip == ON_POSITIVE_SIDE) &&
+            is_ip_inside_segment ) {
+          return true;
+        } else {
+          return false;
+        }
+      }
+    }
+  } // end of intersects_segment_interior_inf_box
+
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the following infinite box:
+  // this infinite box is a 90 degree wedge defined
+  // by the intersection of the halfplanes
+  // with supporting lines lhor and lver, where
+  // the halfplanes are both on the positive or negative
+  // sides of the supporting lines
+  static
+  Boolean
+  intersects_segment_side_of_wedge(const Site_2 & s,
+      const Line_2 & lhor, const Line_2 & lver,
+      Oriented_side orside)
+  {
+    CGAL_assertion(s.is_segment());
+    Segment_2 seg = s.segment();
+
+    CGAL_SDG_DEBUG(std::cout << "debug sofw s=" << s
+                   << " orside=" << orside << std::endl;);
+
+    Point_2 ssrc = seg.source();
+    Point_2 strg = seg.target();
+
+    Oriented_side os_lhor_ssrc = oriented_side_of_line(lhor, ssrc);
+    Oriented_side os_lver_ssrc = oriented_side_of_line(lver, ssrc);
+
+    Oriented_side os_lhor_strg = oriented_side_of_line(lhor, strg);
+    Oriented_side os_lver_strg = oriented_side_of_line(lver, strg);
+
+    if (((os_lhor_ssrc == orside) &&
+         (os_lver_ssrc == orside)) ||
+        ((os_lhor_strg == orside) &&
+         (os_lver_strg == orside))   ) {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug intersects_segment_side_of_wedge "
+              << "endpoint inside" << std::endl;);
+      return true;
+    } else {
+      // here we have to check if the interior is inside
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug intersects_segment_side_of_wedge "
+          << "try for interior to be inside" << std::endl;);
+
+      // in fact, here you can intersect the segment
+      // with the ray starting from corner and going to the
+      // direction of the center of the infinite box
+
+      // corner has homogenuous coordinates cx, cy, cw
+      RT cx, cy, cw;
+      compute_intersection_of_lines(lhor, lver, cx, cy, cw);
+
+      CGAL_assertion( CGAL::sign(cw) != ZERO );
+
+      Point_2 corner ( cx, cy, cw );
+
+      CGAL_SDG_DEBUG(std::cout << "debug corner=" << corner << std::endl;);
+
+      RT one(1);
+
+      Point_2 displaced (
+          corner.x() + ( (+orside)*CGAL::sign(lver.a()) ) * one ,
+          corner.y() +   (+orside)*CGAL::sign(lhor.b())   * one   );
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug displaced=" << displaced << std::endl;);
+
+      Line_2 l = compute_line_from_to(corner, displaced);
+
+      Line_2 lseg = compute_supporting_line(s.supporting_site());
+
+      RT hx, hy, hw;
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: intersects_segment_side_of_wedge "
+          << " l=" << l.a() << " " << l.b() << " " << l.c()
+          << " lseg=" << lseg.a() << " " << lseg.b() << " " << lseg.c()
+          << std::endl;);
+
+      compute_intersection_of_lines(l, lseg, hx, hy, hw);
+
+      if (CGAL::sign(hw) == ZERO) {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug l and lseg are parallel" << std::endl;);
+        return false;
+      } else {
+        Point_2 ip ( hx, hy, hw );
+        CGAL_SDG_DEBUG(std::cout << "debug ip=" << ip << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug ip_hom="
+            << hx << ' ' << hy << ' ' << hw << std::endl;);
+        Oriented_side os_lhor_ip = oriented_side_of_line(lhor, ip);
+        Oriented_side os_lver_ip = oriented_side_of_line(lver, ip);
+
+        Compare_x_2 cmpx;
+        Compare_y_2 cmpy;
+
+        Comparison_result cmpxsrcip = cmpx(ssrc, ip);
+        Comparison_result cmpysrcip = cmpy(ssrc, ip);
+        Comparison_result cmpxiptrg = cmpx(ip, strg);
+        Comparison_result cmpyiptrg = cmpy(ip, strg);
+
+        // philaris: to check
+        Boolean is_ip_inside_segment =
+          (CGAL::sign(cmpxsrcip * cmpxiptrg +
+                      cmpysrcip * cmpyiptrg   )) == POSITIVE;
+
+        if ((os_lhor_ip == orside) &&
+            (os_lver_ip == orside) &&
+            is_ip_inside_segment      ) {
+          return true;
+        } else {
+          return false;
+        }
+      }
+    }
+  } // end of intersects_segment_side_of_wedge
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the following infinite box:
+  // this infinite box is a 90 degree wedge defined
+  // by the intersection of the positive halfplanes
+  // with supporting lines lhor and lver
+  static
+  Boolean
+  intersects_segment_positive_of_wedge(const Site_2 & s,
+      const Line_2 & lhor, const Line_2 & lver)
+  {
+    return intersects_segment_side_of_wedge(
+        s, lhor, lver, ON_POSITIVE_SIDE);
+  }
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the following infinite box:
+  // this infinite box is a 90 degree wedge defined
+  // by the intersection of the positive halfplanes
+  // with supporting lines lhor and lver
+  static
+  Boolean
+  intersects_segment_negative_of_wedge(const Site_2 & s,
+      const Line_2 & lhor, const Line_2 & lver)
+  {
+    return intersects_segment_side_of_wedge(
+        s, lhor, lver, ON_NEGATIVE_SIDE);
+  }
+
+  // returns true if and only if
+  // the interior of t has non-empty intersection
+  // with the interior of the following infinite box:
+  // the only finite corner of the infinite box is p
+  // and this infinite box is a 90 degree wedge defined
+  // by the intersection of the halfplanes
+  // with supporting lines lhor and lver through p, where
+  // the halfplanes are both on the positive or negative
+  // sides of the supporting lines. The positive or negative
+  // side depends on the relative position of p with respect to s
+
+  static
+  Boolean
+  intersects_segment_interior_inf_wedge_sp(const Site_2 & s,
+                                           const Site_2 & p,
+                                           const Site_2 & t)
+  {
+    CGAL_assertion( t.is_segment() );
+    CGAL_assertion( s.is_segment() );
+    CGAL_assertion(! is_site_h_or_v(s));
+
+    Segment_2 seg = s.segment();
+
+    Point_2 ssrc = seg.source();
+    Point_2 strg = seg.target();
+
+    Point_2 pp = p.point();
+
+    Sign dxs = CGAL::sign(strg.x() - ssrc.x());
+    Sign dys = CGAL::sign(strg.y() - ssrc.y());
+
+    Line_2 lseg = compute_supporting_line(s.supporting_site());
+    Oriented_side os_lseg_p = oriented_side_of_line(lseg, pp);
+
+    CGAL_assertion( os_lseg_p != ON_ORIENTED_BOUNDARY );
+
+    //sandeep: lhor, lver remains same for left turn and right turn
+
+    if (dxs == NEGATIVE && dys == NEGATIVE) {
+
+      Line_2 lhor = Line_2(0,1,-pp.y());
+      Line_2 lver = Line_2(-1,0,pp.x());
+
+      return intersects_segment_side_of_wedge(t,
+                                       lhor, lver,
+                                       os_lseg_p);
+    } else if (dxs == POSITIVE && dys == NEGATIVE) {
+
+      Line_2 lhor = Line_2(0,-1,pp.y());
+      Line_2 lver = Line_2(-1,0,pp.x());
+
+      return intersects_segment_side_of_wedge(t,
+                                       lhor, lver,
+                                       os_lseg_p);
+    } else if (dxs == POSITIVE && dys == POSITIVE) {
+
+      Line_2 lhor = Line_2(0,-1,pp.y());
+      Line_2 lver = Line_2(1,0,-pp.x());
+
+      return intersects_segment_side_of_wedge(t,
+                                       lhor, lver,
+                                       os_lseg_p);
+    } else {//dxs == NEGATIVE and dys == POSITIVE
+
+      Line_2 lhor = Line_2(0,1,-pp.y());
+      Line_2 lver = Line_2(1,0,-pp.x());
+
+      return intersects_segment_side_of_wedge(t,
+                                       lhor, lver,
+                                       os_lseg_p);
+    }
+
+  } // end of intersects_segment_interior_inf_wedge_sp
+
+
+  // returns true if and only if
+  // the interior of s has non-empty intersection
+  // with the interior of the bounding box of q, p
+  // precondition: the bounding box should be non-trivial,
+  // i.e., it should not be a segment
+  static
+  Boolean
+  intersects_segment_interior_bbox(const Site_2 & s,
+      const Site_2 & q,
+      const Site_2 & p)
+  {
+    CGAL_precondition(s.is_segment());
+    CGAL_precondition(p.is_point());
+    CGAL_precondition(q.is_point());
+
+    Point_2 pp = p.point();
+    Point_2 qq = q.point();
+
+    CGAL_assertion_code( Compare_x_2 cmpx; )
+    CGAL_assertion_code( Compare_y_2 cmpy; )
+    CGAL_assertion(cmpx(pp,qq) != EQUAL);
+    CGAL_assertion(cmpy(pp,qq) != EQUAL);
+
+    Point_2 corner1 ( pp.x(), qq.y());
+    Point_2 corner2 ( qq.x(), pp.y());
+
+    if (CGAL::orientation( qq, corner1, pp ) == LEFT_TURN) {
+      return intersects_segment_interior_inf_box(s, q, corner1, p)
+          && intersects_segment_interior_inf_box(s, p, corner2, q);
+    } else {
+      return intersects_segment_interior_inf_box(s, q, corner2, p)
+          && intersects_segment_interior_inf_box(s, p, corner1, q);
+    }
+  } // end of intersects_segment_interior_bbox
+
+  // returns true if and only if
+  // the non-horizontal/non-vertical segment at site s
+  // has positive slope
+  static
+  Boolean
+  has_positive_slope(const Site_2 & s)
+  {
+    CGAL_precondition(s.is_segment());
+    CGAL_precondition(! is_site_h_or_v(s));
+    Compare_x_2 cmpx;
+    Compare_y_2 cmpy;
+    Point_2 src = s.supporting_site().source();
+    Point_2 trg = s.supporting_site().target();
+    return cmpx(src, trg) == cmpy(src, trg);
+  }
+
+  inline
+  static
+  bool
+  has_positive_slope(const Line_2 & l) {
+    return (CGAL::sign(l.a()) + CGAL::sign(l.b()) == 0);
+  }
+
+  inline
+  static
+  Boolean
+  have_same_slope(const Site_2 & s, const Site_2 & t)
+  {
+    CGAL_precondition(s.is_segment());
+    CGAL_precondition(t.is_segment());
+    Compare_x_2 cmpx;
+    Compare_y_2 cmpy;
+    Point_2 ssrc = s.supporting_site().source();
+    Point_2 strg = s.supporting_site().target();
+    Comparison_result scmpx = cmpx(ssrc, strg);
+    Comparison_result scmpy = cmpy(ssrc, strg);
+    Point_2 tsrc = t.supporting_site().source();
+    Point_2 ttrg = t.supporting_site().target();
+    Comparison_result tcmpx = cmpx(tsrc, ttrg);
+    Comparison_result tcmpy = cmpy(tsrc, ttrg);
+    CGAL_SDG_DEBUG(std::cout << "debug have_same_slope"
+        << " scmpx=" << scmpx << " scmpy=" << scmpy
+        << " tcmpx=" << tcmpx << " tcmpy=" << tcmpy
+        << std::endl;);
+    if (   ((scmpx == EQUAL) && (tcmpx == EQUAL)) // vertical
+        || ((scmpy == EQUAL) && (tcmpy == EQUAL)) // horizontal
+        || ((scmpx == scmpy) && (tcmpx == tcmpy)) // positive
+        || ((scmpx != EQUAL) && (scmpy != EQUAL) &&
+            (tcmpx != EQUAL) && (tcmpy != EQUAL) &&
+            (scmpx != scmpy) && (tcmpx != tcmpy)) // negative
+       ) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  inline
+  static
+  Boolean
+  is_site_h_or_v(const Site_2 & s)
+  {
+    return is_site_horizontal(s) || is_site_vertical(s);
+  }
+
+  inline
+  static
+  Boolean
+  is_site_horizontal(const Site_2 & s)
+  {
+    CGAL_assertion(s.is_segment());
+    return s.supporting_site().segment().is_horizontal();
+  }
+
+  inline
+  static
+  Boolean
+  is_site_vertical(const Site_2 & s)
+  {
+    CGAL_assertion(s.is_segment());
+    return s.supporting_site().segment().is_vertical();
+  }
+
+  inline
+  static
+  Boolean
+  is_line_h_or_v(const Line_2 & l)
+  {
+    return (CGAL::sign(l.a()) == ZERO) || (CGAL::sign(l.b()) == ZERO);
+  }
+
+  inline
+  static
+  Boolean
+  test_star(const Site_2 & p, const Site_2 & u,
+            const Site_2 & v, const Site_2 & t) {
+    CGAL_precondition(p.is_point());
+    CGAL_precondition(u.is_segment());
+    CGAL_precondition(v.is_segment());
+    CGAL_precondition(t.is_segment());
+
+    Are_same_points_2 same_points;
+
+    Point_2 pu =
+      (same_points(p, u.source_site()) ? u.target_site() : u.source_site())
+       .point();
+    Point_2 pv =
+      (same_points(p, v.source_site()) ? v.target_site() : v.source_site())
+       .point();
+    Point_2 pt =
+      (same_points(p, t.source_site()) ? t.target_site() : t.source_site())
+       .point();
+
+    Orientation oupt = CGAL::orientation(pu, p.point(), pt);
+    Orientation otpv = CGAL::orientation(pt, p.point(), pv);
+
+    return (oupt == LEFT_TURN) && (otpv == LEFT_TURN);
+  }
+
+  static
+  Boolean
+  are_in_same_open_halfspace_of(
+      const Site_2 & p, const Site_2 & q, const Site_2 & r)
+  {
+    CGAL_precondition(p.is_point() && q.is_point() && r.is_segment());
+    Line_2 lseg = compute_supporting_line(r.supporting_site());
+    Oriented_side os_lseg_p = oriented_side_of_line(lseg, p.point());
+    if ( os_lseg_p == ON_ORIENTED_BOUNDARY ) {
+      return false;
+    }
+    Oriented_side os_lseg_q = oriented_side_of_line(lseg, q.point());
+    return os_lseg_p == os_lseg_q;
+  }
+
+  inline
+  static
+  RT horseg_y_coord(const Site_2 & s) {
+    CGAL_assertion(s.is_segment());
+    CGAL_assertion(is_site_horizontal(s));
+    return s.supporting_site().source_site().point().y();
+  }
+
+  inline
+  static
+  RT verseg_x_coord(const Site_2 & s) {
+    CGAL_assertion(s.is_segment());
+    CGAL_assertion(is_site_vertical(s));
+    return s.supporting_site().source_site().point().x();
+  }
+
+  inline
+  static
+  RT hvseg_coord(const Site_2 & s, const bool is_hor) {
+    CGAL_assertion(s.is_segment());
+    CGAL_assertion(is_site_horizontal(s) == is_hor);
+    CGAL_assertion(is_site_vertical(s) == (! is_hor));
+    return is_hor ? s.supporting_site().source_site().point().y() :
+                    s.supporting_site().source_site().point().x() ;
+  }
+
+  inline static
+  bool check_if_exact(const Site_2& , unsigned int ,
+		      const Tag_false&)
+  {
+    return true;
+  }
+
+  inline static
+  bool check_if_exact(const Site_2& s, unsigned int i,
+		      const Tag_true&)
+  {
+    return s.is_input(i);
+  }
+
+  // determines if the segment s is on the positive halfspace as
+  // defined by the supporting line of the segment supp; the line l
+  // is supposed to be the supporting line of the segment supp and we
+  // pass it so that we do not have to recompute it
+  static bool
+  is_on_positive_halfspace(const Site_2& supp,
+			   const Site_2& s, const Line_2& l)
+  {
+    CGAL_precondition( supp.is_segment() && s.is_segment() );
+    Are_same_points_2 same_points;
+    Are_same_segments_2 same_segments;
+
+    if ( same_segments(supp.supporting_site(),
+		       s.supporting_site()) ) {
+      return false;
+    }
+
+    if ( same_points(supp.source_site(), s.source_site()) ||
+	 same_points(supp.target_site(), s.source_site()) ) {
+      return oriented_side_of_line(l, s.target()) == ON_POSITIVE_SIDE;
+    }
+
+    if ( same_points(supp.source_site(), s.target_site()) ||
+	 same_points(supp.target_site(), s.target_site()) ) {
+      return oriented_side_of_line(l, s.source()) == ON_POSITIVE_SIDE;
+    }
+
+    ITag itag;
+
+    if ( !check_if_exact(s, 0, itag) &&
+	 same_segments(supp.supporting_site(),
+		       s.crossing_site(0)) ) {
+      return oriented_side_of_line(l, s.target()) == ON_POSITIVE_SIDE;
+    }
+
+    if ( !check_if_exact(s, 1, itag) &&
+	 same_segments(supp.supporting_site(),
+		       s.crossing_site(1)) ) {
+      return oriented_side_of_line(l, s.source()) == ON_POSITIVE_SIDE;
+    }
+
+    return Base::is_on_positive_halfspace(l, s.segment());
+  }
+
+  // The bearing of a line l is defined as a number in {0, 1, ..., 7},
+  // encoding each permissible ordered pair (sign(l.a), sign(l.b)).
+  // There are 8 permissible pairs; pair (ZERO, ZERO) is not allowed.
+  // A line with pair (NEG, POS) has bearing 0 and as this line rotates
+  // counterclockwise we get consecutive bearings. Observe that
+  // axis-parallel lines have odd bearings (1, 3, 5, 7).
+
+  inline static Bearing
+  bearing(const Line_2 & l) {
+    const Sign sa = CGAL::sign(l.a());
+    const Sign sb = CGAL::sign(l.b());
+    if (sa == NEGATIVE) {
+      return 1-sb;
+    } else if (sa == ZERO) {
+      return (sb == NEGATIVE) ? 3 : 7;
+    } else { // sa == POSITIVE
+      return 5+sb;
+    }
+  }
+
+private:
+  inline static bool
+  have_same_bearing(const Line_2 & l1, const Line_2 & l2) {
+    return (CGAL::sign(l1.a()) == CGAL::sign(l2.a())) &&
+           (CGAL::sign(l1.b()) == CGAL::sign(l2.b()))    ;
+  }
+
+  inline static bool
+  have_opposite_bearing(const Line_2 & l1, const Line_2 & l2) {
+    return (CGAL::sign(l1.a()) == -CGAL::sign(l2.a())) &&
+           (CGAL::sign(l1.b()) == -CGAL::sign(l2.b()))    ;
+  }
+
+  inline static bool
+  bearing_outside(
+      const Bearing bprev,
+      const Bearing br,
+      const Bearing bnext)
+  {
+    CGAL_assertion(bprev <= 7);
+    CGAL_assertion(br <= 7);
+    CGAL_assertion(bnext <= 7);
+    CGAL_assertion(bprev != bnext);
+    CGAL_assertion(bprev != br);
+    CGAL_assertion(bnext != br);
+    Bearing i(bprev);
+    while (true) {
+      i = (i + 1) % 8;
+      if (i == bnext) {
+        return true;
+      } else if (i == br) {
+        return false;
+      }
+    }
+  }
+
+public:
+  // absolute bearing difference between low and high
+  inline static unsigned int
+  bearing_diff(const Bearing low, const Bearing high)
+  {
+    CGAL_assertion(low <= 7);
+    CGAL_assertion(high <= 7);
+    return high > low ? high - low : 8 + high - low;
+  }
+
+  // Orient the segments p, q, r so that they go counterclockwise
+  // around the Linf square. The orientations are saved as lines
+  // l[0], l[1], l[2] in the l array.
+  static void
+  orient_lines_linf(const Site_2& p, const Site_2& q, const Site_2& r,
+      Line_2 l[])
+  {
+    CGAL_precondition( p.is_segment() && q.is_segment() &&
+		       r.is_segment() );
+
+    l[0] = compute_supporting_line(p.supporting_site());
+    l[1] = compute_supporting_line(q.supporting_site());
+    l[2] = compute_supporting_line(r.supporting_site());
+
+    bool is_oriented[3] = {false, false, false};
+
+    if ( is_on_positive_halfspace(p, q, l[0]) ||
+	 is_on_positive_halfspace(p, r, l[0]) ) {
+      is_oriented[0] = true;
+    } else {
+      l[0] = opposite_line(l[0]);
+      if ( is_on_positive_halfspace(p, q, l[0]) ||
+	   is_on_positive_halfspace(p, r, l[0]) ) {
+	is_oriented[0] = true;
+      } else {
+	l[0] = opposite_line(l[0]);
+      }
+    }
+
+    if ( is_on_positive_halfspace(q, p, l[1]) ||
+	 is_on_positive_halfspace(q, r, l[1]) ) {
+      is_oriented[1] = true;
+    } else {
+       l[1] = opposite_line(l[1]);
+      if ( is_on_positive_halfspace(q, p, l[1]) ||
+	   is_on_positive_halfspace(q, r, l[1]) ) {
+	is_oriented[1] = true;
+      } else {
+	l[1] = opposite_line(l[1]);
+      }
+    }
+
+    if ( is_on_positive_halfspace(r, p, l[2]) ||
+	 is_on_positive_halfspace(r, q, l[2]) ) {
+      is_oriented[2] = true;
+    } else {
+      l[2] = opposite_line(l[2]);
+      if ( is_on_positive_halfspace(r, p, l[2]) ||
+	   is_on_positive_halfspace(r, q, l[2]) ) {
+	is_oriented[2] = true;
+      } else {
+	l[2] = opposite_line(l[2]);
+      }
+    }
+
+    if ( is_oriented[0] && is_oriented[1] && is_oriented[2] ) {
+      return;
+    }
+
+    int i_no(-1);
+    for (int i = 0; i < 3; i++) {
+      if ( !is_oriented[i] ) {
+	i_no = i;
+	CGAL_assertion( is_oriented[(i+1)%3] && is_oriented[(i+2)%3] );
+	break;
+      }
+    }
+
+    CGAL_assertion( i_no != -1 );
+
+    CGAL_SDG_DEBUG( std::cout << "orient_lines_linf i_no: "
+        << p << ' ' << q << ' ' << ' ' << r << " i_no=" << i_no
+        << std::endl;);
+
+    for (int j = 1; j < 3; j++) {
+      if (have_same_bearing(l[i_no], l[(i_no+j)%3])) {
+        l[i_no] = opposite_line(l[i_no]);
+        is_oriented[i_no] = true;
+      } else if (have_opposite_bearing(l[i_no], l[(i_no+j)%3])) {
+        is_oriented[i_no] = true;
+      }
+      if (is_oriented[i_no]) break;
+    }
+
+    if (is_oriented[i_no]) {
+      return;
+    }
+
+    CGAL_SDG_DEBUG( std::cout << "orient_lines_linf lonely bearing: "
+        << p << ' ' << q << ' ' << ' ' << r << " i_no=" << i_no
+        << std::endl;);
+    const unsigned int iprev = (i_no+2)%3;
+    const unsigned int inext = (i_no+1)%3;
+    const Bearing bprev = bearing(l[iprev]);
+    const Bearing bnext = bearing(l[inext]);
+    CGAL_SDG_DEBUG( std::cout << "orient_lines_linf"
+        << " bprev=" << bprev << " bnext=" << bnext
+        << std::endl;);
+    CGAL_assertion(bprev != bnext);
+    CGAL_assertion_code( const Bearing diffbear = (bnext - bprev)%8 );
+    CGAL_assertion(diffbear != 1);
+    CGAL_assertion(diffbear != 7);
+    const Bearing br = bearing(l[i_no]);
+    if ( bearing_outside(bprev, br, bnext) ) {
+      CGAL_assertion_code( const Bearing bropp = (br+4)%8 );
+      CGAL_assertion( ! bearing_outside(bprev, bropp, bnext) );
+      l[i_no] = opposite_line(l[i_no]);
+      is_oriented[i_no] = true;
+    } else {
+      CGAL_assertion( ! bearing_outside(bprev, br, bnext) );
+      const Bearing bropp = (br+4)%8;
+      if ( ! bearing_outside(bprev, bropp, bnext) ) {
+        CGAL_assertion( diffbear == 6 );
+        CGAL_assertion( br % 2 == 1 ); // undecided is axis-parallel
+        const Site_2 & sprev = iprev == 0 ? p : (iprev == 1? q : r);
+        Bearing brcorrect = (bprev+5)%8;
+        if (Base::is_on_positive_halfspace(l[inext], sprev.segment())) {
+          brcorrect = (bprev+1)%8;
+        } else {
+          CGAL_assertion_code(
+              const Site_2 & snext = inext == 0 ? p : (inext == 1? q : r) );
+          CGAL_assertion(
+              Base::is_on_positive_halfspace(l[iprev], snext.segment()) );
+        }
+        if (brcorrect == bropp) {
+          l[i_no] = opposite_line(l[i_no]);
+        } else {
+          CGAL_assertion(brcorrect == br);
+        }
+      }
+      is_oriented[i_no] = true;
+    }
+    CGAL_assertion(is_oriented[i_no]);
+  }
+
+  inline static bool
+  are_parallel_lines(const Line_2 & lp, const Line_2 & lq) {
+    return lp.a() * lq.b() == lq.a() * lp.b();
+  }
+
+  inline static Direction_2
+  direction(const Line_2 & l) {
+    return Direction_2(l.b(), -l.a());
+  }
+
+  // compute correct bisector direction of two consecutive lines,
+  // that are already correctly oriented from sites with orient_lines_linf
+  static Direction_2
+  dir_from_lines(const Line_2& lp, const Line_2& lq)
+  {
+    Bisector_Linf_Type linf_bisect_direction;
+    const unsigned int bdiff = bearing_diff(bearing(lp), bearing(lq));
+    CGAL_assertion(bdiff != 0);
+    if (bdiff < 4) {
+      return linf_bisect_direction(direction(lq), -direction(lp));
+    } else if (bdiff > 4) {
+      return linf_bisect_direction(direction(lp), -direction(lq));
+    } else {
+      CGAL_assertion(bdiff == 4);
+      const Sign sgn = CGAL::sign(lp.a() * lq.b() - lq.a() * lp.b());
+      if (sgn == POSITIVE) {
+        return linf_bisect_direction(direction(lq), -direction(lp));
+      } else {
+        CGAL_assertion(sgn == NEGATIVE);
+        return linf_bisect_direction(direction(lp), -direction(lq));
+      }
+    }
+  }
+
+  // Compute the bisecting line between sites p and q, such that
+  // the sites are correctly oriented according to lines lp and lq,
+  // respectively
+  static Line_2
+  bisector_linf_line(const Site_2& p, const Site_2& q,
+      const Line_2 & lp, const Line_2 & lq)
+  {
+    if (are_parallel_lines(lp, lq)) {
+      return parallel_bis(lp, lq);
+    } else {
+      return bisector_linf_line_nonpar(p, q, lp, lq);
+    }
+  }
+
+  inline static Line_2
+  bisector_linf_line_nonpar(const Site_2& p, const Site_2& q,
+      const Line_2 & lp, const Line_2 & lq)
+  {
+    const bool is_psrc_q = is_endpoint_of(p.source_site(), q);
+    const bool is_ptrg_q = is_endpoint_of(p.target_site(), q);
+    const bool have_common_pq = is_psrc_q || is_ptrg_q;
+    Homogeneous_point_2 xpq;
+    if (have_common_pq) {
+      xpq = is_psrc_q ? p.source() : p.target();
+    } else {
+      RT hx, hy, hw;
+      compute_intersection_of_lines(lp, lq, hx, hy, hw);
+      CGAL_SDG_DEBUG( std::cout << "debug xpq hom="
+        << hx << ' ' << hy << ' ' << hw << std::endl; );
+      xpq = Homogeneous_point_2(hx, hy, hw);
+    }
+    const Direction_2 dirbpq = dir_from_lines(lp, lq);
+    CGAL_SDG_DEBUG( std::cout << "debug xpq hom="
+        << xpq.hx() << ' ' << xpq.hy() << ' ' << xpq.hw()
+        << " dirbpq=" << dirbpq << std::endl; );
+    return compute_line_dir(xpq, dirbpq);
+  }
+
+  // check whether the point p is an endpoint of the segment s
+  inline static
+  bool is_endpoint_of(const Site_2& p, const Site_2& s)
+  {
+    CGAL_precondition( p.is_point() && s.is_segment() );
+    Are_same_points_2 same_points;
+    return ( same_points(p, s.source_site()) ||
+	     same_points(p, s.target_site())   );
+  }
+
+  // Orient the segment s and return result as a line.
+  // Site p is a point which is an endpoint of s and
+  // p_before_s is true if p is just before s in the
+  // Voronoi vertex.
+  static Line_2
+  orient_line_endp(const Site_2& p, const Site_2& s, const bool p_before_s)
+  {
+    return compute_line_from_to(
+        p_before_s ? p.point() : other_site(p, s).point(),
+        p_before_s ? other_site(p, s).point() : p.point()  );
+  }
+
+  // Orient the segment s and return result as a line.
+  // Site p is a point which is not an endpoint of s.
+  // Site p must not be on the line defined by s.
+  static Line_2
+  orient_line_nonendp(const Site_2& p, const Site_2& s)
+  {
+    Line_2 lseg = compute_supporting_line(s.supporting_site());
+    Oriented_side os = oriented_side_of_line(lseg, p.point());
+    if (os != ON_POSITIVE_SIDE) {
+      CGAL_assertion( os == ON_NEGATIVE_SIDE );
+      lseg = opposite_line(lseg);
+    }
+    return lseg;
+  }
+
+  // given that point site p is an endpoint of segment seg,
+  // return the other endpoint of seg (as a site)
+  inline static
+  const Site_2 other_site(const Site_2& p, const Site_2& seg)
+  {
+    CGAL_precondition( p.is_point() && seg.is_segment() );
+    Are_same_points_2 same_points;
+    if ( same_points(p, seg.source_site()) ){
+      return seg.target_site();
+    } else {
+      CGAL_assertion(same_points(p, seg.target_site()));
+      return seg.source_site();
+    }
+  }
+
+  // Given corner with bearing cb (0: bottom right, 2: top right,
+  // 4: top left, 6: bottom left) and another point p, return the
+  // (smallest) square having that corner and passing through p.
+  static
+  Point_2 center_from_corner_and_pt(
+      const Point_2 & corner, const Bearing cb, const Point_2 & p)
+  {
+    CGAL_precondition(cb % 2 == 0);
+    const FT absdifx = CGAL::abs(corner.x() - p.x());
+    const FT absdify = CGAL::abs(corner.y() - p.y());
+    const Comparison_result cmp = CGAL::compare(absdifx, absdify);
+    if (cmp == SMALLER) {
+      const FT ox = corner.x() + FT((cb < 3) ? -1: +1)*absdify/FT(2);
+      const FT oy = (corner.y() + p.y())/FT(2);
+      return Point_2(ox, oy);
+    } else {
+      const FT ox = (corner.x() + p.x())/FT(2);
+      const FT oy = corner.y() + FT((cb % 6 == 0) ? +1: -1)*absdifx/FT(2);
+      return Point_2(ox, oy);
+    }
+  }
+
+  inline
+  static
+  Point_2 center_from_opposite_corners(
+      const Point_2 & c, const Point_2 & d)
+  {
+    return Point_2(c.x() + d.x(), c.y() + d.y(), RT(2));
+  }
+
+  inline
+  static
+  Point_2 center_from_same_side_corners(
+      const Point_2 & c, const Point_2 & d, const Bearing bside)
+  {
+    CGAL_precondition(bside % 2 == 1);
+    const FT ax = (bside % 4 == 1) ?
+      RT(2)*c.x() + c.y() - d.y() : c.x() + d.x();
+    const FT ay = (bside % 4 == 1) ?
+      c.y() + d.y() : RT(2)*c.y() + d.x() - c.y();
+    return Point_2(ax, ay, RT(2));
+  }
+
+  inline
+  static
+  bool points_inside_touching_sides_v(
+      const Line_2 & ls, const Site_2 & pt_site,
+      const Site_2 & other_s, const Site_2 & t, const Point_2 & v)
+  {
+    CGAL_precondition(pt_site.is_point());
+    CGAL_precondition(t.is_point());
+    CGAL_USE(other_s);
+    CGAL_SDG_DEBUG(std::cout << "debug points_inside_touching_sides_v "
+        << "ls: " << ls.a() << ' ' << ls.b() << ' ' <<  ls.c()
+        << " pt_site=" << pt_site << " other_s=" << other_s
+        << " t=" << t << " v=" << v << std::endl;);
+    const Point_2 corner =
+      compute_linf_projection_nonhom(ls, v);
+    const Line_2 ltest = has_positive_slope(ls) ?
+      compute_pos_45_line_at(v): compute_neg_45_line_at(v);
+    CGAL_assertion(
+        oriented_side_of_line(ltest, v) == ON_ORIENTED_BOUNDARY);
+    const Oriented_side ost = oriented_side_of_line(ltest, t.point());
+    const Oriented_side osx = oriented_side_of_line(ltest, corner);
+    CGAL_SDG_DEBUG(std::cout << "debug points_inside_touching_sides_v"
+        << " ltest: " << ltest.a() << ' ' << ltest.b() << ' ' <<  ltest.c()
+        << " v=" << v << " ost=" << ost
+        << " corner=" << corner << " osx=" << osx << std::endl;);
+    if (ost == osx) {
+      const Point_2 & p = pt_site.point();
+      const Oriented_side osp = oriented_side_of_line(ltest, p);
+      if (ost == osp) {
+        // +-pi/2 slope line through corner and v
+        const Line_2 lcv = has_positive_slope(ls) ?
+          compute_neg_45_line_at(v): compute_pos_45_line_at(v);
+        const Oriented_side oslt = oriented_side_of_line(lcv, t.point());
+        const Oriented_side oslp = oriented_side_of_line(lcv, p);
+        if (oslt != oslp) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  inline
+  static
+  bool points_inside_touching_sides_v(
+      const Site_2 & s, const Site_2 & pt_site,
+      const Site_2 & other_s, const Site_2 & t, const Point_2 & v)
+  {
+    CGAL_precondition(t.is_point());
+    CGAL_precondition(pt_site.is_point());
+    CGAL_precondition(s.is_segment());
+    CGAL_SDG_DEBUG(std::cout << "debug points_inside_touching_sides_v "
+        << "s=" << s
+        << " pt_site=" << pt_site << " other_s=" << other_s
+        << " t=" << t << std::endl;);
+    CGAL_assertion(! is_site_h_or_v(s));
+    if (other_s.is_segment()) {
+      // shortcut: when the point pt_site is on a corner of
+      // the Linf square, because it is the endpoint of the
+      // other site which is a segment; return false immediately
+      if ((! is_site_h_or_v(other_s)) &&
+          is_endpoint_of(pt_site, other_s)) {
+        return false;
+      }
+    }
+    const Line_2 ls = compute_supporting_line(s.supporting_site());
+    return points_inside_touching_sides_v(ls, pt_site, other_s, t, v);
+  }
+
+  // Check if point p's Voronoi area has zero area, because point p
+  // is sandwiched between two segments with agreeing slope and
+  // direction. As a result: vpqr and vqps coincide in edge conflicts.
+  inline static
+  bool
+  zero_voronoi_area(const Site_2& p, const Site_2& r, const Site_2& s)
+  {
+    Are_same_points_2 same_points;
+    if (p.is_segment()) { return false; }
+    if (r.is_point() || s.is_point()) { return false; }
+    const bool is_p_rsrc = same_points(p, r.source_site());
+    const bool is_p_rtrg =
+      (! is_p_rsrc) && same_points(p, r.target_site());
+    const bool is_p_endp_of_r = is_p_rsrc || is_p_rtrg;
+    if (is_p_endp_of_r) {
+      const bool is_p_ssrc = same_points(p, s.source_site());
+      const bool is_p_strg =
+        (! is_p_ssrc) && same_points(p, s.target_site());
+      const bool is_p_endp_of_s = is_p_ssrc || is_p_strg;
+      if (is_p_endp_of_s) {
+        if (is_site_horizontal(r) && is_site_horizontal(s)) { return true; }
+        if (is_site_vertical(r) && is_site_vertical(s)) { return true; }
+        if ((! is_site_h_or_v(r)) && (! is_site_h_or_v(s))) {
+          const bool pos_r = has_positive_slope(r);
+          const bool pos_s = has_positive_slope(s);
+          if (pos_r == pos_s) {
+            const Line_2 l = pos_r ? compute_neg_45_line_at(p.point()) :
+              compute_pos_45_line_at(p.point()) ;
+            const Oriented_side osr =
+              oriented_side_of_line(l, is_p_rsrc ? r.target() : r.source());
+            const Oriented_side oss =
+              oriented_side_of_line(l, is_p_ssrc ? s.target() : s.source());
+            if (osr != oss) { return true; }
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+  // Check if point p is on the line of the axis-parallel segment s.
+  // It returns true only for an axis-parallel segment s argument.
+  static inline bool is_on_hv_seg_line(const Site_2 & p, const Site_2 & s)
+  {
+    CGAL_precondition(p.is_point());
+    CGAL_precondition(s.is_segment());
+    Compare_x_2_Sites_Type scmpx;
+    Compare_y_2_Sites_Type scmpy;
+    const bool is_hor = is_site_horizontal(s);
+    const bool is_ver = (! is_hor) && is_site_vertical(s);
+    if (is_hor || is_ver) {
+      return ( (is_hor) ?
+               scmpy(p, s.source_site()) : scmpx(p, s.source_site()) )
+          == EQUAL;
+    } else {
+      return false;
+    }
+  }
+
+
+}; // end of struct Basic_predicates_C2
+
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_PREDICATES_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h
new file mode 100644
index 0000000..35f0e49
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h
@@ -0,0 +1,793 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BISECTOR_LINF_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BISECTOR_LINF_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+#include <CGAL/Polychain_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+template< class K >
+class Bisector_Linf
+{
+
+public:
+
+  typedef typename K::Site_2    Site_2;
+
+  typedef CGAL::Polychainline_2<K> Polychainline;
+  typedef Polychainline            result_type;
+  typedef Site_2                   argument_type;
+
+  typedef typename K::Direction_2  Direction_2;
+  typedef Direction_2              dir_result_type;
+  typedef Direction_2              dir_argument_type;
+
+
+private:
+  typedef typename K::Segment_2 Segment_2;
+  typedef typename K::FT        FT;
+  typedef typename K::RT        RT;
+
+  typedef typename K::Line_2             Full_Line_2;
+  typedef typename K::Point_2            Point_2;
+  typedef typename K::Vector_2           Vector_2;
+  typedef typename K::Sign               Sign;
+
+  typedef typename K::Compare_x_2  Compare_x_2;
+  typedef typename K::Compare_y_2  Compare_y_2;
+
+  typedef SegmentDelaunayGraph_2::Are_parallel_C2<K>    Are_parallel_2;
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K> Are_same_points_2;
+  Compare_x_2 compare_x_2;
+  Compare_y_2 compare_y_2;
+
+private:
+  result_type bisector(const Site_2& p, const Site_2& q) const {
+    if (p.is_point() && q.is_point()) {
+      return bisector_PP(p, q);
+    } else if (p.is_point() && q.is_segment()) {
+      return bisector_PS(p, q);
+    } else if (p.is_segment() && q.is_point()) {
+      return - bisector_PS(q, p);
+    } else { // p.is_segment() and q.is_segment()
+      return bisector_SS(p, q);
+    }
+  }
+
+  result_type bisector_PP(const Site_2& p, const Site_2& q) const {
+    // adapt from constructions
+    CGAL_assertion(p.is_point() && q.is_point());
+    Point_2 pp = p.point();
+    Point_2 pq = q.point();
+    //CGAL_SDG_DEBUG(std::cout << "debug bisector infinite "
+    //          << "p=" << pp << " q=" << pq << std::endl;);
+
+    Compare_x_2 compare_x_2;
+    Compare_y_2 compare_y_2;
+    CGAL_assertion_code( Are_same_points_2 are_same_points; )
+    CGAL_assertion( !(are_same_points(p, q)) );
+    Comparison_result cmpx = compare_x_2(pp, pq);
+    Comparison_result cmpy = compare_y_2(pp, pq);
+    Comparison_result cmpabsdxy =
+      CGAL::compare( CGAL::abs(pp.x()-pq.x()),
+                     CGAL::abs(pp.y()-pq.y()) );
+    unsigned int npts;
+    Point_2 points[2];
+
+    // (final) direction of bisector d=(-cmpy, cmpx)
+    // the bisector should leave p to the right and q to the left
+    Direction_2 d (
+                   (cmpy == EQUAL)? 0 :
+                   (  cmpy  == SMALLER )? +1 : -1,
+                   (cmpx == EQUAL)? 0 :
+                   (  cmpx  == SMALLER )? -1 : +1);
+
+    //CGAL_SDG_DEBUG(std::cout << "debug: final direction d = "
+    //    << d << std::endl;) ;
+
+    // midpoint m of two points p and q
+    Point_2 m = midpoint(pp, pq);
+
+    if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
+      // bisector is line going through m with direction d;
+      // we will store this line as the union of two rays starting
+      // at m with directions -d (incoming) and d (outgoing)
+      npts = 1;
+      points[0] = m;
+    } else {
+      // bisector consists of two rays and a middle segment;
+
+      npts = 2;
+
+      // compute length of middle segment
+      FT seglenhalf (CGAL::abs(
+                               CGAL::abs(pp.x()-pq.x()) -
+                               CGAL::abs(pp.y()-pq.y()))  /FT(2) );
+
+      // construct endpoints of middle segment of bisector
+      Point_2 p1, p2;
+      if (cmpabsdxy == SMALLER) {
+        // middle segment is horizontal
+        Point_2 p1temp (m.x() - seglenhalf, m.y());
+        Point_2 p2temp (m.x() + seglenhalf, m.y());
+        p1 = p1temp;
+        p2 = p2temp;
+      } else { // cmpabsdxy is LARGER
+        // middle segment is vertical
+        Point_2 p1temp (m.x(), m.y() - seglenhalf);
+        Point_2 p2temp (m.x(), m.y() + seglenhalf);
+        p1 = p1temp;
+        p2 = p2temp;
+      }
+
+      // swap endpoints of segment if necessary
+      if ( (cmpabsdxy == SMALLER ? cmpy : -cmpx) == LARGER ) {
+        std::swap(p1, p2);
+      }
+
+      points[0] = p1;
+      points[1] = p2;
+    }
+
+    Polychainline pcl(-d, points, points+npts, d);
+
+    //CGAL_SDG_DEBUG(std::cout <<
+    //    "debug bisector is " << pcl << std::endl;);
+
+    return pcl;
+
+  }
+
+  result_type bisector_PS(const Site_2& p, const Site_2& q) const {
+
+    CGAL_SDG_DEBUG(std::cout << "bisector_PS entering with p=" << p
+              << " q=" << q << std::endl;);
+
+    CGAL_assertion(p.is_point() && q.is_segment());
+    Point_2 pnt = p.point();
+    Segment_2 seg = q.segment();
+    Full_Line_2 lseg = q.supporting_site().segment().supporting_line();
+
+    Are_same_points_2 same_points;
+    Compare_x_2 compare_x_2;
+    Compare_y_2 compare_y_2;
+
+    if (same_points(p,q.source_site()) ||
+        same_points(p,q.target_site())) {
+      //p must be one of the end point of segment q,
+      //and the bisector is a line passing through p
+      Point_2 points[1];
+      unsigned int npts = 1;
+
+      points[0] = pnt;
+
+      Point_2 pq = (same_points(p,q.source_site())) ?
+                    seg.target() : seg.source();
+
+      Comparison_result cmpx = compare_x_2(pnt, pq);
+      Comparison_result cmpy = compare_y_2(pnt, pq);
+
+      Direction_2 d (
+                     (cmpy == EQUAL)? 0 :
+                     (  cmpy  == SMALLER )? +1 : -1,
+                     (cmpx == EQUAL)? 0 :
+                     (  cmpx  == SMALLER )? -1 : +1);
+
+      Polychainline pcl(-d, points, points+npts, d);
+      return pcl;
+
+    }
+    else {
+      Oriented_side side = lseg.oriented_side(pnt);
+
+      // point pp sould not lie on the supporting line of q
+      CGAL_assertion(! (side == ON_ORIENTED_BOUNDARY));
+
+      Point_2 points[3];
+      unsigned int npts;
+      if (q.supporting_site().segment().is_horizontal()) {
+        // segment site is horizontal
+        // pver is vertical projection from point site on to segment site
+        npts = 2;
+        Point_2 pver;
+        pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+
+        Point_2 m = midpoint(pnt, pver);
+        FT seglenhalf ( CGAL::abs(pnt.y()-pver.y()) / FT(2) );
+
+        Direction_2 dinc, dout;
+
+        Comparison_result cmp = compare_y_2(pnt, pver);
+        if (cmp == LARGER) {
+          points[0] = Point_2(m.x() + seglenhalf, m.y());
+          points[1] = Point_2(m.x() - seglenhalf, m.y());
+          dinc = Direction_2 ( +1, +1 );
+          dout = Direction_2 ( -1, +1 );
+        } else {
+          CGAL_assertion(cmp == SMALLER);
+          points[0] = Point_2(m.x() - seglenhalf, m.y());
+          points[1] = Point_2(m.x() + seglenhalf, m.y());
+          dinc = Direction_2 ( -1, -1 );
+          dout = Direction_2 ( +1, -1 );
+        }
+
+        Polychainline pcl(dinc, points, points+npts, dout);
+        return pcl;
+      }//end of horizontal segment case
+      else if(q.supporting_site().segment().is_vertical()) {
+        //segment site is vertical
+        // phor is the projection of pnt on seg
+        npts = 2;
+        Point_2 phor;
+        phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+
+        Point_2 m = midpoint(pnt, phor);
+        FT seglenhalf ( CGAL::abs(pnt.x()-phor.x()) / FT(2) );
+
+        Direction_2 dinc, dout;
+
+        Comparison_result cmp = compare_x_2(pnt, phor);
+        if (cmp == LARGER) {
+          points[0] = Point_2(m.x(), m.y() - seglenhalf);
+          points[1] = Point_2(m.x(), m.y() + seglenhalf);
+          dinc = Direction_2 ( +1, -1 );
+          dout = Direction_2 ( +1, +1 );
+        } else {
+          points[0] = Point_2(m.x(), m.y() + seglenhalf);
+          points[1] = Point_2(m.x(), m.y() - seglenhalf);
+          dinc = Direction_2 ( -1, +1 );
+          dout = Direction_2 ( -1, -1 );
+        }
+
+        Polychainline pcl(dinc, points, points+npts, dout);
+        return pcl;
+      }// end of the vertical segment case
+      else {//the segment is neither horizontal nor vertical
+        Point_2 phor,pver;
+        phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+        pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+        //pfirst and plast are points on the supporting line of seg
+        Point_2 pfirst, plast;
+        //pcfirst and pclast are points on the bisector
+        Point_2 pcfirst, pclast;
+
+        // segment with positive slope will have pfirst as phor
+        // segment with negative slope will have pfirst as pver
+        bool has_lseg_pos_slope =
+          CGAL::sign(lseg.a()) != CGAL::sign(lseg.b());
+        pfirst = has_lseg_pos_slope ? phor : pver;
+        plast  = has_lseg_pos_slope ? pver : phor;
+
+        FT two = FT(2);
+        Point_2 pmid_pfirst_pnt = midpoint(pfirst, pnt);
+        Point_2 pmid_plast_pnt = midpoint(plast, pnt);
+        FT seglenhalffirst (CGAL::abs(
+                                      CGAL::abs(pnt.x()-pfirst.x()) -
+                                      CGAL::abs(pnt.y()-pfirst.y()))
+                            / two );
+        FT seglenhalflast (CGAL::abs(
+                                     CGAL::abs(pnt.x()-plast.x()) -
+                                     CGAL::abs(pnt.y()-plast.y()))
+                           / two );
+
+        if (has_lseg_pos_slope) {
+          //segment with positive slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                  && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+                // pcfirst is center of square,
+                // pfirst = phor, upward direction
+                // pclast is center of sqaure, plast = pver, left direction
+                pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                                  pmid_pfirst_pnt.y()+seglenhalffirst);
+                pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast,
+                                 pmid_plast_pnt.y());
+          }
+          else {
+            //pfirst = phor , pcfirst in downward direction
+            //plast = pvor , pclast in right direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                              pmid_pfirst_pnt.y()-seglenhalffirst);
+            pclast = Point_2(pmid_plast_pnt.x()+seglenhalflast,
+                             pmid_plast_pnt.y());
+          }
+        }
+        else {
+          //segment with negative slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+                // pcfirst is center of square,
+                // pfirst = pver, right direction
+                // pclast is center of sqaure, plast = phor, upward dir
+                pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
+                                  pmid_pfirst_pnt.y());
+                pclast = Point_2(pmid_plast_pnt.x(),
+                                 pmid_plast_pnt.y()+seglenhalflast);
+              }
+          else {
+            //pfirst = pver , pcfirst in left direction
+            //plast = phor , pclast in downward direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x()-seglenhalffirst,
+                              pmid_pfirst_pnt.y());
+            pclast = Point_2(pmid_plast_pnt.x(),
+                             pmid_plast_pnt.y()-seglenhalflast);
+          }
+        }//end of pcfirst and pclast
+
+        // compute direction
+        Direction_2 d (
+            ( CGAL::sign(lseg.a()) == NEGATIVE ? +1 : -1 ) ,
+            ( CGAL::sign(lseg.b()) == NEGATIVE ? +1 : -1 )  ) ;
+        if (side == ON_POSITIVE_SIDE) {
+          d = -d;
+        }
+
+        //compute pmid and then pcmid = mid point of pmid and pnt
+        Full_Line_2 lmidp (pnt, d);
+        CGAL::Object pmidobject = intersection(lmidp, lseg);
+        Point_2 pmid;
+        if(CGAL::assign(pmid, pmidobject)){
+          points[1] = midpoint(pmid, pnt);
+        } else {
+          CGAL_assertion(false);
+          CGAL_error();
+        }
+        npts = 3;
+        points[0]=pcfirst;
+        points[2]=pclast;
+
+        Polychainline pcl(d, points, points+npts, d);
+
+        //CGAL_SDG_DEBUG(std::cout << "about to return pcl" << std::endl;);
+        return pcl;
+      }//end of general segment case, seg != hor or ver
+
+    }
+
+
+  }//end of bisector_PS
+
+
+  result_type bisector_SS(const Site_2& p, const Site_2& q) const {
+    CGAL_precondition( p.is_segment() && q.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "bisector_SS entering with p=" << p
+              << " q=" << q << std::endl;);
+
+    // another precondition:
+    // p and q have no intersection in the interior of any segment
+    // (but maybe they intersect at their endpoints)
+
+    // another precondition:
+    // p, q may be parallel but do not have the same supporting line
+
+    Are_same_points_2 are_same_points;
+
+    bool is_psrc_qsrc =
+      are_same_points(p.source_site(), q.source_site());
+    bool is_psrc_qtrg =
+      are_same_points(p.source_site(), q.target_site());
+    bool is_mid_psrc = is_psrc_qsrc || is_psrc_qtrg;
+    bool is_ptrg_qsrc =
+      are_same_points(p.target_site(), q.source_site());
+    bool is_ptrg_qtrg =
+      are_same_points(p.target_site(), q.target_site());
+    bool is_mid_ptrg = is_ptrg_qsrc || is_ptrg_qtrg;
+
+    bool have_common_endp = is_mid_psrc || is_mid_ptrg;
+
+    bool optimize_for_line(false);
+
+    Are_parallel_2 are_parallel;
+
+    // compute supporting lines of segments
+    Full_Line_2 lp ( p.supporting_site().segment() );
+    Full_Line_2 lq ( q.supporting_site().segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "bisector_SS lp = "
+      << lp.a() << ' ' << lp.b() << ' ' << lp.c() << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "bisector_SS lq = "
+      << lq.a() << ' ' << lq.b() << ' ' << lq.c() << std::endl;);
+
+    Point_2 points[1];
+    Direction_2 dinc, dout;
+
+    if ((! have_common_endp) && are_parallel(p, q)) {
+      // here p and q are parallel,
+      // but not on the same supporting line (precondition)
+
+      // here lp.a lq.b - lq.a lp.b = 0
+
+      // the bisector line bis of the two lines lp and lq
+      RT bisa, bisb, bisc;
+
+      if ( CGAL::sign ( lq.a() ) != ZERO ) {
+        bisa = RT(2) * lp.a() * lq.a();
+        bisb = RT(2) * lp.a() * lq.b();
+        bisc = lp.a() * lq.c() + lp.c() * lq.a();
+      } else {
+        bisa = RT(2) * lp.a() * lq.b();
+        bisb = RT(2) * lp.b() * lq.b();
+        bisc = lp.c() * lq.b() + lp.b() * lq.c();
+      }
+
+      CGAL_SDG_DEBUG(std::cout << "bisector_SS parallel bis = "
+        << bisa << ' ' << bisb << ' ' << bisc << std::endl;);
+
+      Point_2 psrc = p.segment().source();
+
+      Sign s = CGAL::sign(
+          bisa * psrc.x() + bisb * psrc.y() + bisc);
+
+      CGAL_assertion(s != ZERO);
+
+      if (s == POSITIVE) {
+        bisa = -bisa;
+        bisb = -bisb;
+        bisc = -bisc;
+      }
+
+      // convert bis to the polychainline format
+
+      Direction_2 d ( bisb, -bisa);
+
+      if (CGAL::sign(bisa) == ZERO) {
+        // use point of bis line with x=0
+        Point_2 mid (RT(0), -bisc, bisb);
+        points[0] = mid;
+      } else {
+        // use point of bis line with y=0
+        Point_2 mid (-bisc, RT(0), bisa);
+        points[0] = mid;
+      }
+
+      dinc = -d;
+      dout = d;
+
+      optimize_for_line = true;
+
+    } else {
+      // here p and q are not parallel
+
+      if (have_common_endp) {
+        // intersection is common point here
+        bool is_mid_qsrc = is_psrc_qsrc || is_ptrg_qsrc;
+        const Point_2& mid  = is_mid_psrc ? p.source() : p.target();
+        const Point_2& prep = is_mid_psrc ? p.target() : p.source();
+        const Point_2& qrep = is_mid_qsrc ? q.target() : q.source();
+
+        Direction_2 dirp ( Vector_2(mid, prep) );
+        Direction_2 dirq ( Vector_2(mid, qrep) );
+
+        Direction_2 d =
+          dirq.counterclockwise_in_between(dirp, -dirp) ?
+            compute_linf_bisecting_direction(dirp, dirq) :
+            compute_linf_bisecting_direction(dirq, dirp) ;
+
+        CGAL_SDG_DEBUG(std::cout << "debug bisector_SS: " <<
+            "common endpoint case: dirp=" << dirp <<
+            " dirq=" << dirq << " d=" << d << std::endl;);
+
+        /* philaris: the bisector is double */
+        points[0] = mid;
+        dinc = d;
+        dout = d;
+
+      } else {
+
+        // compute intersection point of two lines
+        Point_2 mid;
+
+        // really compute intersection point of two lines
+        CGAL_SDG_DEBUG(std::cout << "debug bisector_SS lp=" <<
+            lp.a() << ' ' << lp.b() << ' ' << lp.c() << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug bisector_SS lq=" <<
+            lq.a() << ' ' << lq.b() << ' ' << lq.c() << std::endl;);
+
+        mid = Point_2 ( - lp.c() * lq.b() + lq.c() * lp.b(),
+            - lp.a() * lq.c() + lq.a() * lp.c(),
+            + lp.a() * lq.b() - lq.a() * lp.b() );
+
+        points[0] = mid;
+
+        CGAL_SDG_DEBUG(std::cout << "debug bisector_SS mid=" <<
+            mid << std::endl;);
+
+        // check if mid is inside one of the segments
+
+        Point_2 psrc = p.segment().source();
+        Point_2 ptrg = p.segment().target();
+        Point_2 qsrc = q.segment().source();
+        Point_2 qtrg = q.segment().target();
+
+        Comparison_result cmpxpsm = compare_x_2(psrc, mid);
+        Comparison_result cmpxmpt = compare_x_2(mid, ptrg);
+        Comparison_result cmpypsm = compare_y_2(psrc, mid);
+        Comparison_result cmpympt = compare_y_2(mid, ptrg);
+
+        Comparison_result cmpxqsm = compare_x_2(qsrc, mid);
+        Comparison_result cmpxmqt = compare_x_2(mid, qtrg);
+        Comparison_result cmpyqsm = compare_y_2(qsrc, mid);
+        Comparison_result cmpymqt = compare_y_2(mid, qtrg);
+
+        if ((cmpxpsm == cmpxmpt) && (cmpypsm == cmpympt))
+        {
+          // mid is inside p
+          CGAL_SDG_DEBUG(std::cout <<
+              "debug bisector_SS mid in p" << std::endl;);
+
+          // take any endpoint of q not the same as mid
+          Point_2 qrep = ( (cmpxqsm == EQUAL) || (cmpyqsm == EQUAL) )
+              ? qtrg : qsrc;
+
+          Direction_2 dirq    ( Vector_2(mid, qrep) );
+          Direction_2 dirpsrc ( Vector_2(mid, psrc) );
+          Direction_2 dirptrg ( Vector_2(mid, ptrg) );
+
+          CGAL_SDG_DEBUG(std::cout << "debug bisector_SS psrc=" << psrc
+              << " ptrg=" <<  ptrg << std::endl;);
+
+          if (dirq.counterclockwise_in_between(dirpsrc, dirptrg))
+          {
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS q btw psrc ptrg" << std::endl;);
+            dout = compute_linf_bisecting_direction(dirpsrc, dirq);
+            dinc = compute_linf_bisecting_direction(dirq, dirptrg);
+          } else
+          {
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS q not btw psrc ptrg" << std::endl;);
+            dout = compute_linf_bisecting_direction(dirptrg, dirq);
+            dinc = compute_linf_bisecting_direction(dirq, dirpsrc);
+          }
+
+          CGAL_SDG_DEBUG(std::cout <<
+              "debug bisector_SS dinc=" << dinc << std::endl;);
+          CGAL_SDG_DEBUG(std::cout <<
+              "debug bisector_SS dout=" << dout << std::endl;);
+
+        } else {
+          if ((cmpxqsm == cmpxmqt) && (cmpyqsm == cmpymqt))
+          {
+            // mid is inside q
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS mid in q" << std::endl;);
+
+            // take any endpoint of p not the same as mid
+            Point_2 prep = ( (cmpxpsm == EQUAL) || (cmpypsm == EQUAL) )
+                ? ptrg : psrc;
+
+            Direction_2 dirp    ( Vector_2(mid, prep) );
+            Direction_2 dirqsrc ( Vector_2(mid, qsrc) );
+            Direction_2 dirqtrg ( Vector_2(mid, qtrg) );
+
+            if (dirp.counterclockwise_in_between(dirqsrc, dirqtrg))
+            {
+              CGAL_SDG_DEBUG(std::cout <<
+                  "debug bisector_SS spt" << std::endl;);
+              dinc = compute_linf_bisecting_direction(dirqsrc, dirp);
+              dout = compute_linf_bisecting_direction(dirp, dirqtrg);
+            } else
+            {
+              CGAL_SDG_DEBUG(std::cout <<
+                  "debug bisector_SS tps" << std::endl;);
+              dinc = compute_linf_bisecting_direction(dirqtrg, dirp);
+              dout = compute_linf_bisecting_direction(dirp, dirqsrc);
+            }
+
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS dinc=" << dinc << std::endl;);
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS dout=" << dout << std::endl;);
+
+          } else {
+            // here mid is neither inside p nor inside q
+            CGAL_SDG_DEBUG(std::cout <<
+                "debug bisector_SS mid not in p, q" << std::endl;);
+
+            CGAL_SDG_DEBUG(std::cout
+                << "debug bisector_SS cmpxpsm cmpypsm cmpxqsm cmpyqsm is"
+                << cmpxpsm << cmpypsm << cmpxqsm << cmpyqsm << std::endl;);
+
+            // take any endpoint of p not the same as mid
+            Point_2 prep =
+              ( CGAL::has_larger_distance_to_point(mid, ptrg, psrc) )
+                ? ptrg : psrc;
+
+            // take any endpoint of q not the same as mid
+            Point_2 qrep =
+              ( CGAL::has_larger_distance_to_point(mid, qtrg, qsrc) )
+                ? qtrg : qsrc;
+
+            Direction_2 dirp ( Vector_2(mid, prep) );
+            Direction_2 dirq ( Vector_2(mid, qrep) );
+
+            CGAL_SDG_DEBUG(std::cout << "debug bisector_SS dirp="
+                << dirp << " dirq=" << dirq << std::endl;);
+
+            Direction_2 d =
+              dirq.counterclockwise_in_between(dirp, -dirp) ?
+              compute_linf_bisecting_direction(dirp, dirq) :
+              - compute_linf_bisecting_direction(dirq, dirp) ;
+
+            CGAL_SDG_DEBUG(std::cout << "debug bisector_SS d="
+                << d << std::endl;);
+
+            dinc = -d;
+            dout = d;
+          }
+        }
+      } // end of compute intersection numerically
+    } // end of case of non-parallel segments
+
+    //CGAL_SDG_DEBUG(std::cout << "debug bisector_SS points[0]="
+    //  << points[0] << std::endl;);
+
+    Polychainline pcl (dinc, points, points + 1, dout);
+
+    if (optimize_for_line) {
+      pcl.set_line_optimization();
+    }
+
+    return pcl;
+
+  }
+
+
+  Direction_2
+  compute_linf_bisecting_direction(
+        Direction_2 dirp, Direction_2 dirq) const
+  {
+    // precondition:
+    // dirq is strictly after (counterclockwise) dirp
+    // and dirq is less than 180 degrees after dirp
+    CGAL_assertion( dirq.counterclockwise_in_between(dirp, -dirp) );
+
+    CGAL_SDG_DEBUG(std::cout << "debug dir1 = " << dirp
+              << " dir2 = " << dirq << std::endl;);
+
+    RT two(2);
+    RT plusone(+1);
+    RT minusone(-1);
+
+    RT A (dirp.dx());
+    RT B (dirp.dy());
+    RT C (dirq.dx());
+    RT D (dirq.dy());
+
+    CGAL_SDG_DEBUG(std::cout << "debug ABCD = " << A << ' ' << B << ' '
+              << C << ' ' << D << std::endl;);
+
+    if ((CGAL::sign(A) == POSITIVE) &&
+        (CGAL::sign(B) != NEGATIVE)    ) {
+      // A > 0 and B >= 0
+
+      if ((CGAL::sign(C) == POSITIVE) &&
+          (CGAL::sign(D) != NEGATIVE)    ) {
+        // C > 0 and D >= 0
+        return Direction_2 (two*A*C+A*D+B*C,
+                            two*B*D+A*D+B*C);
+      }
+      else if ((CGAL::sign(C) != POSITIVE) &&
+          (CGAL::sign(D) == POSITIVE)    ) {
+        // C <= 0 and D > 0
+        return Direction_2 (A*D+B*C,
+                            two*B*D+A*D-B*C);
+      }
+      else {
+        // here C < 0 and D <= 0
+        return Direction_2( minusone, plusone);
+      }
+    }
+    else if ((CGAL::sign(A) != POSITIVE) &&
+        (CGAL::sign(B) == POSITIVE)    ) {
+      // A <= 0 and B > 0
+      if ((CGAL::sign(C) != POSITIVE) &&
+          (CGAL::sign(D) == POSITIVE)    ) {
+        // C <= 0 and D > 0
+        return Direction_2 (-two*A*C+A*D+B*C,
+                             two*B*D-A*D-B*C);
+      }
+      else if ((CGAL::sign(C) == NEGATIVE) &&
+          (CGAL::sign(D) != POSITIVE)    ) {
+        // C < 0 and D <= 0
+        return Direction_2 (-two*A*C-A*D+B*C,
+                            -A*D-B*C);
+      }
+      else {
+        // here C >= 0 and D < 0
+        return Direction_2( minusone, minusone);
+      }
+    }
+    else if ((CGAL::sign(A) == NEGATIVE) &&
+        (CGAL::sign(B) != POSITIVE)    ) {
+      // A < 0 and B <= 0
+      if ((CGAL::sign(C) == NEGATIVE) &&
+          (CGAL::sign(D) != POSITIVE)    ) {
+        // C < 0 and D <= 0
+        return Direction_2 (-two*A*C-A*D-B*C,
+                            -two*B*D-A*D-B*C);
+      }
+      else if ((CGAL::sign(C) != NEGATIVE) &&
+          (CGAL::sign(D) == NEGATIVE)    ) {
+        // C >= 0 and D < 0
+        return Direction_2 (-A*D-B*C,
+                            -two*B*D-A*D+B*C);
+      }
+      else {
+        // here C > 0 and D >= 0
+        return Direction_2( plusone, minusone);
+      }
+    }
+    else {
+      // here A >= 0 and B < 0
+      if ((CGAL::sign(C) != NEGATIVE) &&
+          (CGAL::sign(D) == NEGATIVE)    ) {
+        // C >= 0 and D < 0
+        return Direction_2 ( two*A*C-A*D-B*C,
+                            -two*B*D+A*D+B*C);
+      }
+      else if ((CGAL::sign(C) == POSITIVE) &&
+          (CGAL::sign(D) != NEGATIVE)    ) {
+        // C > 0 and D >= 0
+        return Direction_2 ( two*A*C+A*D-B*C,
+                             A*D+B*C);
+      }
+      else {
+        // here C <= 0 and D > 0
+        return Direction_2( plusone, plusone);
+      }
+    }
+
+  }
+
+
+
+public:
+  result_type operator()(const Site_2& p, const Site_2& q) const
+  {
+    return bisector(p, q);
+  }
+
+  dir_result_type operator()(
+      const dir_argument_type& d1, const dir_argument_type& d2) const
+  {
+    return compute_linf_bisecting_direction(d1, d2);
+  }
+
+};
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ARE_PARALLEL_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h
new file mode 100644
index 0000000..c593ede
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h
@@ -0,0 +1,1274 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_CONSTRUCTIONS_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_CONSTRUCTIONS_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+#include <CGAL/enum.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+
+#include <CGAL/Polychain_2.h>
+#include <CGAL/intersections.h>
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+
+//***********************************************************************
+//***********************************************************************
+//                            CONSTRUCTIONS
+//***********************************************************************
+//***********************************************************************
+
+
+//-----------------------------------------------------------------------
+//                  Segment Delaunay graph site
+//-----------------------------------------------------------------------
+template<class Site,class ITag> class Construct_sdg_site_2;
+
+template<class Site>
+class Construct_sdg_site_2<Site,Tag_true>
+{
+public:
+  typedef Site                             Site_2;
+  typedef typename Site_2::Point_2         Point_2;
+  typedef Site_2                           result_type;
+
+public:
+  result_type operator()(const Point_2& p) const {
+    return Site_2(p);
+  }
+
+  result_type operator()(const Point_2& p0, const Point_2& p1) const {
+    return Site_2(p0, p1);
+  }
+
+  result_type operator()(const Point_2& p0, const Point_2& p1,
+                         const Point_2& q0, const Point_2& q1) const {
+    return Site_2(p0, p1, q0, q1);
+  }
+
+  result_type operator()(const Point_2& p0, const Point_2& p1,
+                         const Point_2& q0, const Point_2& q1,
+                         bool b) const {
+    return Site_2(p0, p1, q0, q1, b);
+  }
+
+  result_type operator()(const Point_2& p0, const Point_2& p1,
+                         const Point_2& q0, const Point_2& q1,
+                         const Point_2& r0, const Point_2& r1) const {
+    return Site_2(p0, p1, q0, q1, r0, r1);
+  }
+};
+
+
+template<class Site>
+class Construct_sdg_site_2<Site,Tag_false>
+{
+public:
+  typedef Site                             Site_2;
+  typedef typename Site_2::Point_2         Point_2;
+  typedef Site_2                           result_type;
+
+public:
+  result_type operator()(const Point_2& p) const {
+    return Site_2(p);
+  }
+
+  result_type operator()(const Point_2& p0, const Point_2& p1) const {
+    return Site_2(p0, p1);
+  }
+};
+
+
+
+
+//-----------------------------------------------------------------------
+//                  Segment Delaunay graph Voronoi vertex
+//-----------------------------------------------------------------------
+
+template<class K, class M>
+class Construct_svd_vertex_2
+{
+public:
+  typedef typename K::Site_2                Site_2;
+  typedef Voronoi_vertex_C2<K,M>            Voronoi_vertex_2;
+  typedef typename K::Point_2               Point_2;
+  typedef Point_2                           result_type;
+
+public:
+  Point_2 operator()(const Site_2& s1, const Site_2& s2,
+                     const Site_2& s3) const
+  {
+    Voronoi_vertex_2 v(s1, s2, s3);
+    return v.point();
+  }
+};
+
+
+
+//-----------------------------------------------------------------------
+//                  Segment Delaunay graph Voronoi circle
+//-----------------------------------------------------------------------
+
+
+template<class Gt, class M>
+class Construct_sdg_circle_2
+{
+public:
+  typedef typename Gt::Site_2                 Site_2;
+  typedef Voronoi_vertex_C2<Gt,M>             Voronoi_vertex_2;
+  typedef typename Gt::Iso_rectangle_2        Iso_rectangle_2;
+  typedef Iso_rectangle_2                     result_type;
+
+public:
+  Iso_rectangle_2 operator() (const Site_2& s1, const Site_2& s2,
+                       const Site_2& s3) const
+  {
+    Voronoi_vertex_2 v(s1, s2, s3);
+    return v.circle();
+  }
+};
+
+
+
+//-----------------------------------------------------------------------
+//                    Segment Delaunay graph Voronoi bisector
+//-----------------------------------------------------------------------
+
+
+template<class Gt, class M>
+class Construct_sdg_bisector_2
+{
+public:
+  typedef typename Gt::Site_2                 Site_2;
+  typedef typename Gt::Point_2                Point_2;
+  typedef typename Gt::Direction_2            Direction_2;
+  typedef typename Gt::Segment_2              Segment_2;
+  typedef typename Gt::Line_2                 Line_2;
+
+  typedef CGAL::Polychainline_2<Gt>           Polychainline;
+  typedef Polychainline                       result_type;
+
+  typedef typename Gt::Compare_x_2            Compare_x_2;
+  typedef typename Gt::Compare_y_2            Compare_y_2;
+  typedef typename Gt::Equal_2                Equal_2;
+
+  typedef typename Gt::FT                     FT;
+
+public:
+  result_type
+      operator()(const Site_2& p, const Site_2& q) const
+  {
+    CGAL_assertion( !(p.is_segment() && q.is_segment()) );
+
+    CGAL_SDG_DEBUG( std::cout << "debug construct bisector line "
+              << "p=" << p << " q=" << q << std::endl; );
+
+    if ( p.is_point() && q.is_point() ) {
+      Point_2 pp = p.point();
+      Point_2 pq = q.point();
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+      CGAL_assertion_code ( Equal_2 are_same_points );
+      CGAL_assertion( !(are_same_points(p, q)) );
+      Comparison_result cmpx = compare_x_2(pp, pq);
+      Comparison_result cmpy = compare_y_2(pp, pq);
+      Comparison_result cmpabsdxy =
+          CGAL::compare( CGAL::abs(pp.x()-pq.x()),
+                         CGAL::abs(pp.y()-pq.y()) );
+      unsigned int npts;
+      Point_2 points[2];
+
+      // (final) direction of bisector d=(-cmpy, cmpx)
+      // the bisector should leave p to the right and q to the left
+      Direction_2 d (
+              (cmpy == EQUAL)? 0 :
+              (  cmpy  == SMALLER )? +1 : -1,
+              (cmpx == EQUAL)? 0 :
+              (  cmpx  == SMALLER )? -1 : +1);
+
+      // midpoint m of two points p and q
+      Point_2 m = midpoint(pp, pq);
+
+      if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
+          // bisector is line going through m with direction d;
+          // we will store this line as the union of two rays starting
+          // at m with directions -d (incoming) and d (outgoing)
+          npts = 1;
+          points[0] = m;
+      } else {
+          // bisector consists of two rays and a middle segment;
+
+          npts = 2;
+
+          // compute length of middle segment
+          FT half(0.5);
+          FT seglenhalf ( half *
+                  CGAL::abs(
+                      CGAL::abs(pp.x()-pq.x()) -
+                      CGAL::abs(pp.y()-pq.y()))   );
+
+          // construct endpoints of middle segment of bisector
+          Point_2 p1, p2;
+          if (cmpabsdxy == SMALLER) {
+              // middle segment is horizontal
+              Point_2 p1temp (m.x() - seglenhalf, m.y());
+              Point_2 p2temp (m.x() + seglenhalf, m.y());
+              p1 = p1temp;
+              p2 = p2temp;
+          } else { // cmpabsdxy is LARGER
+              // middle segment is vertical
+              Point_2 p1temp (m.x(), m.y() - seglenhalf);
+              Point_2 p2temp (m.x(), m.y() + seglenhalf);
+              p1 = p1temp;
+              p2 = p2temp;
+          }
+
+          // swap endpoints of segment if necessary
+          if ( (cmpabsdxy == SMALLER ? cmpy : -cmpx) == LARGER ) {
+              std::swap(p1, p2);
+          }
+
+          points[0] = p1;
+          points[1] = p2;
+      }
+
+      Polychainline pcl(-d, points, points+npts, d);
+
+      //CGAL_SDG_DEBUG( std::cout << "debug construct bisector line is "
+      //  << pcl << std::endl; );
+
+      return pcl;
+    }// end of point - point case
+
+    if ( (p.is_point() && q.is_segment())
+        || (p.is_segment() && q.is_point()) ) {
+
+      Point_2 pnt = (p.is_point()) ? p.point() : q.point();
+      Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment();
+
+      Site_2 sitep = (p.is_point()) ? p : q;
+      Site_2 sites = (p.is_point()) ? q : p;
+
+      Point_2 points[3];
+      unsigned int npts;
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+      Equal_2     are_same_points;
+
+      if (are_same_points(sitep,sites.source_site())
+          || are_same_points(sitep,sites.target_site())) {
+        npts = 1;
+        points[0] = pnt;
+        Point_2 pseg = (are_same_points(sitep,sites.source_site())) ?
+          seg.target() : seg.source();
+
+        Comparison_result cmpx = compare_x_2(pnt, pseg);
+        Comparison_result cmpy = compare_y_2(pnt, pseg);
+
+        Direction_2 d (
+                       (cmpy == EQUAL)? 0 :
+                       (  cmpy  == SMALLER )? +1 : -1,
+                       (cmpx == EQUAL)? 0 :
+                       (  cmpx  == SMALLER )? -1 : +1);
+        if (q.is_point()) {
+          d = -d;
+        }
+
+        Polychainline pcl(-d, points, points+npts, d);
+        return pcl;
+      } else {
+        // pnt is not end point of seg
+        // seg must not be horizontal or vertical
+        CGAL_assertion(
+            !( sites.supporting_site().segment().is_horizontal() ||
+               sites.supporting_site().segment().is_vertical()     ) );
+        Line_2 lseg = sites.supporting_site().segment().supporting_line();
+        Point_2 phor, pver;
+        phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+        pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+        //pfirst and plast are points on the supporting line of seg
+        Point_2 pfirst, plast;
+        //pcfirst and pclast are points on the bisector
+        Point_2 pcfirst, pclast;
+        // segment with positive slope will have pfirst as phor
+        // segment with negative slope will have pfirst as pver
+        pfirst = (compare_x_2(seg.source(),seg.target())
+                  == compare_y_2(seg.source(),seg.target()))
+                 ? phor : pver;
+        plast = (compare_x_2(seg.source(),seg.target())
+                 == compare_y_2(seg.source(),seg.target()))
+                ? pver : phor;
+
+        FT half = FT(0.5);
+        Point_2 pmid_pfirst_pnt = midpoint(pfirst, pnt);
+        Point_2 pmid_plast_pnt = midpoint(plast, pnt);
+        FT seglenhalffirst ( half *
+                            CGAL::abs(
+                                      CGAL::abs(pnt.x()-pfirst.x()) -
+                                      CGAL::abs(pnt.y()-pfirst.y()))   );
+        FT seglenhalflast ( half *
+                           CGAL::abs(
+                                     CGAL::abs(pnt.x()-plast.x()) -
+                                     CGAL::abs(pnt.y()-plast.y()))   );
+
+        if (compare_x_2(seg.source(),seg.target())
+            == compare_y_2(seg.source(),seg.target())) {
+          //segment with positive slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+                //pcfirst is center of square,
+                //pfirst = phor, upward direction
+                //pclast is center of sqaure, plast = pver, left direction
+                pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                                  pmid_pfirst_pnt.y()+seglenhalffirst);
+                pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast,
+                                 pmid_plast_pnt.y());
+              } else {
+                //pfirst = phor , pcfirst in downward direction
+                //plast = pvor , pclast in right direction
+                pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                                  pmid_pfirst_pnt.y()-seglenhalffirst);
+                pclast = Point_2(pmid_plast_pnt.x()+seglenhalflast,
+                                 pmid_plast_pnt.y());
+              }
+        }
+        else {
+          //segment with negative slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+                //pcfirst is center of square,
+                //pfirst = pver, right direction
+                //pclast is center of sqaure, plast = phor, upward direction
+                pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
+                                  pmid_pfirst_pnt.y());
+                pclast = Point_2(pmid_plast_pnt.x(),
+                                 pmid_plast_pnt.y()+seglenhalflast);
+              } else {
+                //pfirst = pver , pcfirst in left direction
+                //plast = phor , pclast in downward direction
+                pcfirst = Point_2(pmid_pfirst_pnt.x()-seglenhalffirst,
+                                  pmid_pfirst_pnt.y());
+                pclast = Point_2(pmid_plast_pnt.x(),
+                                 pmid_plast_pnt.y()-seglenhalflast);
+              }
+        }//end of pcfirst and pclast
+
+        //compute pmid and then pcmid = mid point of pmid and pnt
+        Line_2 lmid(pnt,pcfirst);
+        Line_2 lmidp = lmid.perpendicular(pnt);
+        CGAL::Object pmidobject = intersection(lmidp, lseg);
+        Point_2 pmid;
+        if(CGAL::assign(pmid, pmidobject)){
+          points[1] = midpoint(pmid, pnt);
+        }
+        npts = 3;
+        points[0]=pcfirst;
+        points[2]=pclast;
+
+        CGAL_SDG_DEBUG( std::cout << "debug: point1 = " << points[0]
+            << " point2 = " << points[1] << " point3 = "
+            << points[2] << std::endl; );
+
+        if (p.is_segment()) {
+          std::swap(points[0], points[2]);
+        }
+        CGAL_SDG_DEBUG( std::cout << "debug: point1 = " << points[0]
+            << " point2 = " << points[1] << " point3 = "
+            << points[2] << std::endl; );
+
+        Line_2 ld(pnt,pcfirst);
+
+        Direction_2 d(ld.perpendicular(pcfirst));
+
+        Polychainline pcl(d, points, points+npts, d);
+        CGAL_SDG_DEBUG( std::cout
+            << "debug about to return pcl=" << pcl << std::endl ;);
+        return pcl;
+
+      }
+    }
+    // this part should never be reached
+    // philaris: avoid complaining by some compilers
+    return Polychainline();
+  }
+};
+
+//-----------------------------------------------------------------------
+//                 Segment Delaunay graph Voronoi bisecting ray
+//-----------------------------------------------------------------------
+
+template<class Gt, class M>
+class Construct_sdg_bisector_ray_2
+{
+public:
+  typedef typename Gt::Site_2                  Site_2;
+  typedef typename Gt::Point_2                 Point_2;
+  typedef typename Gt::Direction_2             Direction_2;
+  typedef typename Gt::Line_2                  Line_2;
+  typedef typename Gt::Segment_2               Segment_2;
+  typedef typename Gt::Construct_svd_vertex_2  Construct_svd_vertex_2;
+  typedef CGAL::Polychainline_2<Gt>            Polychainline;
+  typedef CGAL::Polychainray_2<Gt>             Polychainray;
+  typedef Polychainray                         result_type;
+
+  typedef typename Gt::Compare_x_2       Compare_x_2;
+  typedef typename Gt::Compare_y_2       Compare_y_2;
+  typedef typename Gt::Equal_2           Equal_2;
+
+  typedef typename Gt::FT           FT;
+
+  result_type
+      operator()(const Site_2& p, const Site_2& q,
+                   const Site_2& r) const
+  {
+
+    CGAL_SDG_DEBUG( std::cout << "debug construct bisector ray "
+              << "p=" << p << " q=" << q << " r=" << r << std::endl; );
+
+    // compute pqr vertex
+    Point_2 v = Construct_svd_vertex_2()(p, q, r);
+
+    CGAL_SDG_DEBUG( std::cout << "debug construct bisector ray "
+              << "p=" << p << " q=" << q << " r=" << r
+              << " has v(pqr)=" << v << std::endl; );
+
+    //CGAL_SDG_DEBUG( std::cout
+    //    << "debug in ray computing bisector" << std::endl; );
+
+    // compute oriented bisector between p and q
+
+    if ( p.is_point() && q.is_point() ) {
+      Point_2 pp = p.point();
+      Point_2 pq = q.point();
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+      CGAL_assertion_code ( Equal_2 are_same_points );
+      CGAL_assertion( !(are_same_points(p, q)) );
+      Comparison_result cmpx = compare_x_2(pp, pq);
+      Comparison_result cmpy = compare_y_2(pp, pq);
+      Comparison_result cmpabsdxy =
+          CGAL::compare( CGAL::abs(pp.x()-pq.x()),
+                         CGAL::abs(pp.y()-pq.y()) );
+      unsigned int npts;
+      Point_2 points[3];
+
+      // (final) direction of bisector d=(-cmpy, cmpx)
+      // the bisector should leave p to the right and q to the left
+      Direction_2 d (
+              (cmpy == EQUAL)? 0 :
+              (  cmpy  == SMALLER )? +1 : -1,
+              (cmpx == EQUAL)? 0 :
+              (  cmpx  == SMALLER )? -1 : +1);
+
+      // bisector ray always starts with v
+      points[0] = v;
+
+      if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
+          // bisector ray consists of a ray starting at v
+          npts = 1;
+      } else {
+          // midpoint m of two points p and q
+          Point_2 m = midpoint(pp, pq);
+
+          // compute length of middle segment
+          FT half(0.5);
+          FT seglenhalf ( half *
+                  CGAL::abs(
+                      CGAL::abs(pp.x()-pq.x()) -
+                      CGAL::abs(pp.y()-pq.y()))   );
+
+          // construct endpoints of middle segment of bisector
+          Point_2 p1, p2;
+          if (cmpabsdxy == SMALLER) {
+              // middle segment is horizontal
+              Point_2 p1temp (m.x() - seglenhalf, m.y());
+              Point_2 p2temp (m.x() + seglenhalf, m.y());
+              p1 = p1temp;
+              p2 = p2temp;
+          } else { // cmpabsdxy is LARGER
+              // middle segment is vertical
+              Point_2 p1temp (m.x(), m.y() - seglenhalf);
+              Point_2 p2temp (m.x(), m.y() + seglenhalf);
+              p1 = p1temp;
+              p2 = p2temp;
+          }
+
+          // swap endpoints of segment if necessary
+          if ( (cmpabsdxy == SMALLER ? cmpy : -cmpx) == LARGER ) {
+              std::swap(p1, p2);
+          }
+
+          // oriented line from p1 to p2
+          Line_2 l(p1, p2);
+
+          if (l.perpendicular(p1).has_on_positive_side(v)) {
+              npts = 3;
+              points[1] = p1;
+              points[2] = p2;
+          } else if (l.perpendicular(p2).has_on_positive_side(v)) {
+              npts = 2;
+              points[1] = p2;
+          } else {
+              npts = 1;
+          }
+
+      }
+
+      Polychainray pcr(points, points+npts, d);
+
+      CGAL_SDG_DEBUG( std::cout
+          << "debug construct bisector ray is " << pcr << std::endl; );
+
+      return pcr;
+    }
+
+    if ( (p.is_point() && q.is_segment())
+        || (p.is_segment() && q.is_point()) ) {
+
+      Point_2 pnt = (p.is_point()) ? p.point() : q.point();
+      Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment();
+
+      Site_2 sitep = (p.is_point()) ? p : q;
+      Site_2 sites = (p.is_point()) ? q : p;
+
+      Point_2 points[4];
+      unsigned int npts;
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+      Equal_2     are_same_points;
+
+      if (are_same_points(sitep,sites.source_site())
+          || are_same_points(sitep,sites.target_site())) {
+        npts = 1;
+        points[0] = v;
+        Point_2 pseg =
+          (are_same_points(sitep,sites.source_site())) ?
+            seg.target() : seg.source();
+
+        Comparison_result cmpx = compare_x_2(pnt, pseg);
+        Comparison_result cmpy = compare_y_2(pnt, pseg);
+
+        Direction_2 d (
+                       (cmpy == EQUAL)? 0 :
+                       (  cmpy  == SMALLER )? +1 : -1,
+                       (cmpx == EQUAL)? 0 :
+                       (  cmpx  == SMALLER )? -1 : +1);
+
+        if (q.is_point()) {
+          d = -d;
+        }
+
+        Polychainray pcr(points, points+npts, d);
+
+        CGAL_SDG_DEBUG( std::cout
+            << "debug construct bisector ray is " << pcr << std::endl; );
+
+        return pcr;
+
+      } else {
+        // pnt is not end point of seg
+        // seg must not be horizontal or vertical
+        CGAL_assertion(
+            !( sites.supporting_site().segment().is_horizontal() ||
+               sites.supporting_site().segment().is_vertical()     ) );
+        // bisector ray always starts with v
+        points[0] = v;
+        Line_2 lseg = sites.supporting_site().segment().supporting_line();
+        Point_2 phor, pver;
+        phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+        pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+        //pfirst and plast are points on the supporting line of seg
+        Point_2 pfirst, plast;
+        //pcfirst and pclast are points on the bisector
+        Point_2 pcfirst, pclast;
+        // segment with positive slope will have pfirst as phor
+        // segment with negative slope will have pfirst as pver
+        pfirst = (compare_x_2(seg.source(),seg.target())
+                  == compare_y_2(seg.source(),seg.target()))
+        ? phor : pver;
+        plast = (compare_x_2(seg.source(),seg.target())
+                 == compare_y_2(seg.source(),seg.target()))
+        ? pver : phor;
+
+        FT half = FT(0.5);
+        Point_2 pmid_pfirst_pnt = midpoint(pfirst, pnt);
+        Point_2 pmid_plast_pnt = midpoint(plast, pnt);
+        FT seglenhalffirst ( half *
+                            CGAL::abs(
+                                      CGAL::abs(pnt.x()-pfirst.x()) -
+                                      CGAL::abs(pnt.y()-pfirst.y()))   );
+        FT seglenhalflast ( half *
+                           CGAL::abs(
+                                     CGAL::abs(pnt.x()-plast.x()) -
+                                     CGAL::abs(pnt.y()-plast.y()))   );
+
+        if (compare_x_2(seg.source(),seg.target())
+            == compare_y_2(seg.source(),seg.target())) {
+          //segment with positive slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+            //pcfirst is center of square , pfirst = phor, upward direction
+            //pclast is center of sqaure, plast = pver, left direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                              pmid_pfirst_pnt.y()+seglenhalffirst);
+            pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast,
+                              pmid_plast_pnt.y());
+          } else {
+            //pfirst = phor , pcfirst in downward direction
+            //plast = pvor , pclast in right direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                              pmid_pfirst_pnt.y()-seglenhalffirst);
+            pclast = Point_2(pmid_plast_pnt.x()+seglenhalflast,
+                              pmid_plast_pnt.y());
+          }
+        }
+        else {
+          //segment with negative slope
+          if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                && lseg.has_on_positive_side(pnt))
+              || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+            //pcfirst is center of square , pfirst = pver, right direction
+            //pclast is center of sqaure, plast = phor, upward direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
+                              pmid_pfirst_pnt.y());
+            pclast = Point_2(pmid_plast_pnt.x(),
+                              pmid_plast_pnt.y()+seglenhalflast);
+          } else {
+            //pfirst = pver , pcfirst in left direction
+            //plast = phor , pclast in downward direction
+            pcfirst = Point_2(pmid_pfirst_pnt.x()-seglenhalffirst,
+                              pmid_pfirst_pnt.y());
+            pclast = Point_2(pmid_plast_pnt.x(),
+                              pmid_plast_pnt.y()-seglenhalflast);
+          }
+        }//end of pcfirst and pclast
+
+        //compute pmid and then pcmid = mid point of pmid and pnt
+        Line_2 lmid(pnt,pcfirst);
+        Line_2 lmidp = lmid.perpendicular(pnt);
+        CGAL::Object pmidobject = intersection(lmidp, lseg);
+        Point_2 pmid;
+        if(CGAL::assign(pmid, pmidobject)){
+          points[2] = midpoint(pmid, pnt);
+        }
+
+        points[1]=pcfirst;
+        points[3]=pclast;
+
+        CGAL_SDG_DEBUG( std::cout << "debug: point1 = " << points[1] <<
+        " point2 = " << points[2] << " point3 = "
+        << points[3] << std::endl; );
+
+        if (p.is_segment()) {
+          std::swap(points[1], points[3]);
+        }
+        CGAL_SDG_DEBUG( std::cout << "debug: point1 = " << points[1] <<
+        " point2 = " << points[2] << " point3 = "
+        << points[3] << std::endl; );
+
+        //oriented line from pcfirst to pnt
+        Line_2 l(points[1], pnt);
+
+        Direction_2 d(l.perpendicular(pnt));
+        if (p.is_point()) {
+          d = -d;
+        }
+
+        if (l.perpendicular(pnt).has_on_positive_side(v)) {
+          if ( (p.is_segment() && l.has_on_positive_side(v))
+              ||(p.is_point() && l.has_on_negative_side(v)) ) {
+            npts = 4;
+          } else {
+            npts = 3;
+            points[1] = points[2];
+            points[2] = points[3];
+          }
+        }
+        else {
+          if ( (p.is_segment() && l.has_on_negative_side(v))
+              ||(p.is_point() && l.has_on_positive_side(v)) ) {
+            npts = 2;
+            points[1] = points[3];
+          }
+          else {
+            npts = 1;
+          }
+        }
+
+        Polychainray pcr(points, points+npts, d);
+        CGAL_SDG_DEBUG( std::cout << "debug construct bisector ray is "
+            << pcr << std::endl; );
+        return pcr;
+
+      }
+
+    }
+
+    // the following code should never be executed
+    CGAL_SDG_DEBUG( std::cout
+        << "debug construct bisector ray error " << std::endl; );
+    CGAL_assertion(false);
+    return Polychainray();
+  }
+};
+
+
+//-----------------------------------------------------------------------
+//              Segment Delaunay graph Voronoi bisecting segment
+//-----------------------------------------------------------------------
+
+
+template<class Gt, class M>
+class Construct_sdg_bisector_segment_2
+{
+public:
+  typedef typename Gt::Site_2                   Site_2;
+  typedef typename Gt::Point_2                  Point_2;
+  typedef typename Gt::Direction_2              Direction_2;
+  typedef typename Gt::Line_2                   Line_2;
+  typedef typename Gt::Segment_2                Segment_2;
+  typedef typename Gt::Construct_svd_vertex_2   Construct_svd_vertex_2;
+  typedef CGAL::Polychainsegment_2<Gt>          Polychainsegment;
+
+  typedef CGAL::Object                          Object_2;
+  typedef Object_2                              result_type;
+
+  typedef typename Gt::Compare_x_2       Compare_x_2;
+  typedef typename Gt::Compare_y_2       Compare_y_2;
+  typedef typename Gt::Equal_2           Equal_2;
+
+  typedef typename Gt::FT                FT;
+
+  result_type operator()(const Site_2& p, const Site_2& q,
+                         const Site_2& r, const Site_2& s) const
+  {
+    return CGAL::make_object(pcsbis(p, q, r, s));
+  }
+
+  Polychainsegment pcsbis(const Site_2& p, const Site_2& q,
+                          const Site_2& r, const Site_2& s) const
+  {
+    CGAL_SDG_DEBUG( std::cout << "debug construct bisector segment "
+        << "p=" << p << " q=" << q << " r=" << r << " s=" << s
+        << std::endl; );
+
+    Construct_svd_vertex_2 circumcenter;
+    Point_2 vpqr = circumcenter(p, q, r);
+    Point_2 vqps = circumcenter(q, p, s);
+
+    CGAL_SDG_DEBUG( std::cout << "debug construct bisector segment "
+        << "p=" << p << " q=" << q << " r=" << r << " s=" << s
+        << " has v(pqr)=" << vpqr << " v(qps)=" << vqps << std::endl; );
+
+    Compare_x_2 compare_x_2;
+    Compare_y_2 compare_y_2;
+
+    Comparison_result cmpx_vpqr_vqps =
+      compare_x_2(vpqr, vqps);
+
+    Comparison_result cmpy_vpqr_vqps =
+      compare_y_2(vpqr, vqps);
+
+    CGAL_SDG_DEBUG( std::cout << "debug bis segment vpqr="
+      << vpqr << " vqps=" << vqps
+      << " cmpx=" << cmpx_vpqr_vqps
+      << " cmpy=" << cmpy_vpqr_vqps
+      << std::endl; );
+
+    if ( (cmpx_vpqr_vqps == EQUAL) &&
+         (cmpy_vpqr_vqps == EQUAL)    ) {
+      // philaris: here vpqr and vqps are the same point,
+      // therefore the bisector segment is (vpqr,vqps),
+      // which is trivial
+      Point_2 points[2];
+      points[0] = vpqr;
+      points[1] = vqps;
+      Polychainsegment pcs(points, points+2);
+
+      CGAL_SDG_DEBUG( std::cout
+          << "debug construct bisector segment is (trivial) "
+          << pcs << std::endl; );
+      return pcs;
+    }
+
+    if ( p.is_point() && q.is_point() ) {
+      Point_2 pp = p.point();
+      Point_2 pq = q.point();
+
+      CGAL_assertion_code( Equal_2 are_same_points );
+      CGAL_assertion( ! (are_same_points(p, q)) );
+      Comparison_result cmpx = compare_x_2(pp, pq);
+      Comparison_result cmpy = compare_y_2(pp, pq);
+      Comparison_result cmpabsdxy =
+          CGAL::compare( CGAL::abs(pp.x()-pq.x()),
+                         CGAL::abs(pp.y()-pq.y()) );
+      unsigned int npts;
+      Point_2 points[4];
+
+      // (final) direction of bisector d=(-cmpy, cmpx)
+      // the bisector should leave p to the right and q to the left
+      Direction_2 d (
+              (cmpy == EQUAL)? 0 :
+              (  cmpy  == SMALLER )? +1 : -1,
+              (cmpx == EQUAL)? 0 :
+              (  cmpx  == SMALLER )? -1 : +1);
+
+      // bisector segment always starts with vpqr
+      points[0] = vpqr;
+
+      if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
+        // bisector ray is line segment (vpqr,vqps)
+        npts = 2;
+      } else {
+        // midpoint m of two points p and q
+        Point_2 m = midpoint(pp, pq);
+
+        // compute length of middle segment
+        FT half(0.5);
+        FT seglenhalf ( half *
+            CGAL::abs(
+              CGAL::abs(pp.x()-pq.x()) -
+              CGAL::abs(pp.y()-pq.y()))   );
+
+        // construct endpoints of middle segment of bisector
+        Point_2 p1, p2;
+        if (cmpabsdxy == SMALLER) {
+          // middle segment is horizontal
+          Point_2 p1temp (m.x() - seglenhalf, m.y());
+          Point_2 p2temp (m.x() + seglenhalf, m.y());
+          p1 = p1temp;
+          p2 = p2temp;
+        } else { // cmpabsdxy is LARGER
+          // middle segment is vertical
+          Point_2 p1temp (m.x(), m.y() - seglenhalf);
+          Point_2 p2temp (m.x(), m.y() + seglenhalf);
+          p1 = p1temp;
+          p2 = p2temp;
+        }
+
+        // swap endpoints of segment if necessary
+        if ( (cmpabsdxy == SMALLER ? cmpy : -cmpx) == LARGER ) {
+          std::swap(p1, p2);
+        }
+
+        // oriented line from p1 to p2
+        Line_2 l(p1, p2);
+
+        if (l.perpendicular(p1).has_on_positive_side(vpqr)) {
+          npts = 4;
+          points[1] = p1;
+          points[2] = p2;
+        } else if (l.perpendicular(p2).has_on_positive_side(vpqr)) {
+          npts = 3;
+          points[1] = p2;
+        } else {
+          npts = 2;
+        }
+
+        CGAL_SDG_DEBUG( std::cout << "debug p1=" << p1 << " p2=" << p2
+          << " vpqr=" << vpqr << " vqps=" << vqps << std::endl; );
+
+        CGAL_assertion(l.perpendicular(vpqr).
+                         has_on_negative_side(vqps));
+
+        while (npts > 2) {
+          if (l.perpendicular(points[npts-2]).
+                has_on_negative_side(vqps)) {
+            break;
+          } else {
+            npts = npts - 1;
+          }
+        }
+      }
+
+      // bisector segment always ends with vpqr
+      points[npts-1] = vqps;
+
+      Polychainsegment pcs(points, points+npts);
+
+      //CGAL_SDG_DEBUG( std::cout << "debug construct bisector segment is "
+      //  << pcs << std::endl; );
+
+      return pcs;
+    } // end of two points case
+    else if ( (p.is_point() && q.is_segment()) ||
+              (q.is_point() && p.is_segment()) ) {
+      //one site is point and one site is segment
+      unsigned int npts;
+      Point_2 points[5];
+      points[0] = vpqr;
+      Equal_2 are_same_points;
+      // check if p is point and is an endpoint of q
+      // or if q is a point and is an end point of p
+      if (   ( p.is_point() &&
+              (are_same_points(p, q.source_site()) ||
+               are_same_points(p, q.target_site())   ) )
+          || (q.is_point() &&
+              (are_same_points(q, p.source_site()) ||
+               are_same_points(q, p.target_site())   ) ) )
+      {
+        npts = 2;
+      }
+      else {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug bisector segment "
+            << "p=" << p << " q=" << q << std::endl; );
+        //pnt is the point site and seg is the segment site
+        Point_2 pnt = (p.is_point()) ? p.point() : q.point();
+        Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment();
+        Site_2 siteseg = (p.is_point()) ? q : p;
+        // lseg is the suporting line of the segment site
+        Line_2 lseg = siteseg.supporting_site().segment().supporting_line();
+        // segment site is horizontal
+        if (lseg.is_horizontal()) {
+        //pver is vertical projection from point site on to segment site
+          Point_2 pver;
+          pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+
+          Point_2 m = midpoint(pnt, pver);
+          FT half = FT(0.5);
+          FT seglenhalf ( half * CGAL::abs(pnt.y()-pver.y()) );
+
+          Comparison_result cmp = compare_y_2(pnt, pver);
+          if (cmp == LARGER) {
+            points[1] = Point_2(m.x() + seglenhalf, m.y());
+            points[2] = Point_2(m.x() - seglenhalf, m.y());
+          } else {
+            CGAL_assertion(cmp == SMALLER);
+            points[1] = Point_2(m.x() - seglenhalf, m.y());
+            points[2] = Point_2(m.x() + seglenhalf, m.y());
+          }
+
+          if (p.is_segment()) {
+            std::swap(points[1], points[2]);
+          }
+          // oriented line from p1 to p2
+          Line_2 l(points[1], points[2]);
+
+          if (l.perpendicular(points[1]).has_on_positive_side(vpqr)) {
+            npts = 4;
+            //points[1] = p1;
+            //points[2] = p2;
+          } else if (l.perpendicular(points[2]).
+                     has_on_positive_side(vpqr)) {
+            npts = 3;
+            points[1] = points[2];
+          } else {
+            npts = 2;
+          }
+
+          CGAL_SDG_DEBUG(std::cout
+              << "debug construct bisector segment npts="
+              << npts << std::endl; );
+
+          /*CGAL_assertion((l.perpendicular(vpqr).
+                         has_on_negative_side(vqps)) ||
+                         ((compare_x_2(vpqr, vqps) == EQUAL) and
+                          (compare_y_2(vpqr, vqps) == EQUAL))
+                         );*/
+
+          while (npts > 2) {
+            if (l.perpendicular(points[npts-2]).
+                has_on_negative_side(vqps)) {
+              break;
+            } else {
+              npts = npts - 1;
+            }
+          }
+          CGAL_SDG_DEBUG( std::cout
+              << "debug bisector segment after cutting points, npts="
+              << npts << std::endl; );
+        }//end of horizontal segment case
+        else if (lseg.is_vertical()) {
+          //segment site is vertical
+          // phor is the projection of pnt on seg
+          Point_2 phor;
+          phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+
+          Point_2 m = midpoint(pnt, phor);
+          FT half = FT(0.5);
+          FT seglenhalf ( half * CGAL::abs(pnt.x()-phor.x()) );
+
+          npts = 4;
+
+          Comparison_result cmp = compare_x_2(pnt, phor);
+          if (cmp == LARGER) {
+            points[1] = Point_2(m.x(), m.y() - seglenhalf);
+            points[2] = Point_2(m.x(), m.y() + seglenhalf);
+          } else {
+            points[1] = Point_2(m.x(), m.y() + seglenhalf);
+            points[2] = Point_2(m.x(), m.y() - seglenhalf);
+          }
+
+          if (p.is_segment()) {
+            std::swap(points[1], points[2]);
+          }
+          Line_2 l(points[1], points[2]);
+
+          if (l.perpendicular(points[1]).has_on_positive_side(vpqr)) {
+            npts = 4;
+            //points[1] = p1;
+            //points[2] = p2;
+          } else if (l.perpendicular(points[2]).
+                     has_on_positive_side(vpqr)) {
+            npts = 3;
+            points[1] = points[2];
+          } else {
+            npts = 2;
+          }
+
+          CGAL_SDG_DEBUG( std::cout
+              << "debug bis segment npts=" << npts << " vpqr="
+              << vpqr << " vqps=" << vqps << std::endl; );
+
+
+          // philaris: assertion does not work always
+          // because of inexact arithmetic
+          //CGAL_assertion(l.perpendicular(vpqr).
+          //                has_on_negative_side(vqps));
+
+          while (npts > 2) {
+            if (l.perpendicular(points[npts-2]).
+                has_on_negative_side(vqps)) {
+              break;
+            } else {
+              npts = npts - 1;
+            }
+          }
+        }// end of the vertical segment case
+        else {//the segment is neither horizontal nor vertical
+          Point_2 phor,pver;
+          phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
+          pver = Point_2(pnt.x(), lseg.y_at_x(pnt.x()));
+          //pfirst and plast are points on the supporting line of seg
+          Point_2 pfirst, plast;
+          //pcfirst and pclast are points on the bisector
+          Point_2 pcfirst, pclast;
+
+          // segment with positive slope will have pfirst as phor
+          // segment with negative slope will have pfirst as pver
+          pfirst = (compare_x_2(seg.source(),seg.target())
+                    == compare_y_2(seg.source(),seg.target()))
+                    ? phor : pver;
+          plast = (compare_x_2(seg.source(),seg.target())
+                    == compare_y_2(seg.source(),seg.target()))
+                    ? pver : phor;
+
+          FT half = FT(0.5);
+          Point_2 pmid_pfirst_pnt = midpoint(pfirst, pnt);
+          Point_2 pmid_plast_pnt = midpoint(plast, pnt);
+          FT seglenhalffirst ( half *
+                              CGAL::abs(
+                                      CGAL::abs(pnt.x()-pfirst.x()) -
+                                      CGAL::abs(pnt.y()-pfirst.y()))   );
+          FT seglenhalflast ( half *
+                                CGAL::abs(
+                                      CGAL::abs(pnt.x()-plast.x()) -
+                                      CGAL::abs(pnt.y()-plast.y()))   );
+
+          if (compare_x_2(seg.source(),seg.target())
+              == compare_y_2(seg.source(),seg.target())) {
+            //segment with positive slope
+            if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                  && lseg.has_on_positive_side(pnt))
+                || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+              //pcfirst is center of square, pfirst = phor, upward direction
+              //pclast is center of sqaure, plast = pver, left direction
+              pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                                pmid_pfirst_pnt.y()+seglenhalffirst);
+              pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast,
+                                pmid_plast_pnt.y());
+            } else {
+              //pfirst = phor , pcfirst in downward direction
+              //plast = pvor , pclast in right direction
+              pcfirst = Point_2(pmid_pfirst_pnt.x(),
+                                pmid_pfirst_pnt.y()-seglenhalffirst);
+              pclast = Point_2(pmid_plast_pnt.x()+seglenhalflast,
+                               pmid_plast_pnt.y());
+            }
+          }
+          else {
+            //segment with negative slope
+            if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
+                  && lseg.has_on_positive_side(pnt))
+                || (compare_x_2(seg.source(),seg.target()) == LARGER
+                  && lseg.has_on_negative_side(pnt)) ) {
+              //pcfirst is center of square , pfirst = pver, right direction
+              //pclast is center of sqaure, plast = phor, upward direction
+              pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
+                                pmid_pfirst_pnt.y());
+              pclast = Point_2(pmid_plast_pnt.x(),
+                               pmid_plast_pnt.y()+seglenhalflast);
+            } else {
+              //pfirst = pver , pcfirst in left direction
+              //plast = phor , pclast in downward direction
+              pcfirst = Point_2(pmid_pfirst_pnt.x()-seglenhalffirst,
+                                pmid_pfirst_pnt.y());
+              pclast = Point_2(pmid_plast_pnt.x(),
+                               pmid_plast_pnt.y()-seglenhalflast);
+            }
+          }//end of pcfirst and pclast
+
+          //compute pmid and then pcmid = mid point of pmid and pnt
+          Line_2 lmid(pnt,pcfirst);
+          Line_2 lmidp = lmid.perpendicular(pnt);
+          CGAL::Object pmidobject = intersection(lmidp, lseg);
+          Point_2 pmid;
+          if(CGAL::assign(pmid, pmidobject)){
+            points[2] = midpoint(pmid, pnt);
+          }
+
+          points[1]=pcfirst;
+          points[3]=pclast;
+
+          CGAL_SDG_DEBUG( std::cout << "debug: point1 = " << points[1] <<
+          " point2 = " << points[2] << " point3 = "
+          << points[3] << std::endl; );
+
+          if (p.is_segment()) {
+            std::swap(points[1], points[3]);
+          }
+
+          CGAL_SDG_DEBUG( std::cout << "debug: after possible swap: "
+                    << "point1 = " << points[1] <<
+                    " point2 = " << points[2] << " point3 = "
+                    << points[3] << std::endl; );
+
+          //oriented line from pcfirst to pnt
+          Line_2 l(points[1], pnt);
+
+          // philaris: probably not needed, but check more
+          //CGAL_assertion((l.perpendicular(vpqr).
+          //                has_on_negative_side(vqps)) ||
+          //               (vpqr == vqps));
+
+          if (l.perpendicular(pnt).has_on_positive_side(vpqr)) {
+            if ( (p.is_segment() && l.has_on_positive_side(vpqr))
+                ||(p.is_point() && l.has_on_negative_side(vpqr)) ) {
+              npts = 5;
+            } else {
+              npts = 4;
+              points[1] = points[2];
+              points[2] = points[3];
+            }
+          }
+          else {
+            if ( (p.is_segment() && l.has_on_negative_side(vpqr))
+                ||(p.is_point() && l.has_on_positive_side(vpqr)) ) {
+              npts = 3;
+              points[1] = points[3];
+            }
+            else {
+              npts = 2;
+            }
+          }
+
+          CGAL_SDG_DEBUG( std::cout << "debug first check npts="
+              << npts << std::endl; );
+
+          if ((npts == 3) &&
+              ((p.is_segment() && ! l.has_on_positive_side(vqps))
+               ||(p.is_point() && ! l.has_on_negative_side(vqps)))) {
+            npts = 2;
+          }
+          if (npts == 4) {
+            if (! l.perpendicular(pnt).has_on_negative_side(vqps)) {
+              npts = 2;
+            } else {
+              if ((p.is_segment() && ! l.has_on_positive_side(vqps))
+                  ||(p.is_point() && ! l.has_on_negative_side(vqps))) {
+                npts = 3;
+              }
+            }
+          }
+          if (npts == 5) {
+            if (l.perpendicular(pnt).has_on_negative_side(vqps)) {
+              if ( (p.is_segment() && l.has_on_positive_side(vqps))
+                  ||(p.is_point() && l.has_on_negative_side(vqps)) ) {
+                npts = 5;
+              } else {
+                npts = 4;
+              }
+            }
+            else {
+              if ( (p.is_segment() && l.has_on_negative_side(vpqr))
+                  ||(p.is_point() && l.has_on_positive_side(vpqr)) ) {
+                npts = 3;
+              }
+              else {
+                npts = 2;
+              }
+            }
+          }
+
+        }//end of general segment case, seg != hor or ver
+      }// end of point-seg case where pnt is not end point of segment
+      points[npts-1] = vqps;
+      Polychainsegment pcs(points, points+npts);
+
+      CGAL_SDG_DEBUG( std::cout << "debug: construct bisector segment is "
+          << pcs << " with npts = " << npts << std::endl; );
+
+      return pcs;
+    }//end of point segment case
+    else { //  p and q both are segment
+      unsigned int npts = 2;
+      Point_2 points[2];
+      points[0] = vpqr;
+      points[npts-1] = vqps;
+      Polychainsegment pcs(points, points+npts);
+
+      CGAL_SDG_DEBUG( std::cout << "debug construct bisector segment is "
+        << pcs << std::endl; );
+
+      return pcs;
+    } // end of segment segment case
+
+  }
+};
+
+
+//-----------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_CONSTRUCTIONS_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h
new file mode 100644
index 0000000..cd066e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h
@@ -0,0 +1,522 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h>
+
+#include <CGAL/Filtered_predicate.h>
+#include <CGAL/Filtered_construction.h>
+
+#include <CGAL/number_utils_classes.h>
+#include <CGAL/Cartesian_converter.h>
+
+#include <CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h>
+
+namespace CGAL {
+
+
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+// the filtered Traits class
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+
+template<class CK_t, class CK_MTag, class EK_t, class EK_MTag,
+	 class FK_t, class FK_MTag, class C2E_t, class C2F_t,
+	 class ITag>
+class Segment_Delaunay_graph_Linf_filtered_traits_base_2
+ : public Segment_Delaunay_graph_filtered_traits_base_2
+            <CK_t, CK_MTag, EK_t, EK_MTag,
+             FK_t, FK_MTag, C2E_t, C2F_t, ITag>
+{
+private:
+  typedef
+  Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK_t, CK_MTag,
+						EK_t, EK_MTag,
+						FK_t, FK_MTag,
+						C2E_t, C2F_t,
+						ITag>  Self;
+
+  typedef
+  Segment_Delaunay_graph_filtered_traits_base_2
+            <CK_t, CK_MTag, EK_t, EK_MTag,
+             FK_t, FK_MTag, C2E_t, C2F_t, ITag>  Base;
+
+  typedef Segment_Delaunay_graph_Linf_traits_base_2<CK_t,CK_MTag,ITag> CK_traits;
+  typedef Segment_Delaunay_graph_Linf_traits_base_2<FK_t,FK_MTag,ITag> FK_traits;
+  typedef Segment_Delaunay_graph_Linf_traits_base_2<EK_t,EK_MTag,ITag> EK_traits;
+
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<CK_t,ITag>  CK;
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<FK_t,ITag>  FK;
+  typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2<EK_t,ITag>  EK;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,EK,C2E_t>   C2E;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<CK,FK,C2F_t>   C2F;
+
+  typedef
+  Cartesian_converter<FK, CK, To_double<typename FK::RT> >  F2C_t;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<FK,CK,F2C_t>   F2C;
+
+  typedef
+  Cartesian_converter<EK, CK, To_double<typename EK::RT> >  E2C_t;
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter<EK,CK,E2C_t>   E2C;
+
+  // Types for the construction kernel
+  typedef typename CK::Point_2                CK_Point_2;
+  typedef typename CK::Line_2                 CK_Line_2;
+  typedef typename CK::Segment_2              CK_Segment_2;
+  typedef typename CK::Ray_2                  CK_Ray_2;
+  typedef typename CK::Direction_2            CK_Direction_2;
+  typedef typename CK::Vector_2               CK_Vector_2;
+
+  typedef typename CK::Site_2                 CK_Site_2;
+
+  typedef typename CK::FT                     CK_FT;
+  typedef typename CK::RT                     CK_RT;
+
+  // Types for the exact kernel
+  typedef typename EK::Point_2                EK_Point_2;
+  typedef typename EK::Line_2                 EK_Line_2;
+  typedef typename EK::Segment_2              EK_Segment_2;
+  typedef typename EK::Ray_2                  EK_Ray_2;
+  typedef typename EK::Direction_2            EK_Direction_2;
+  typedef typename EK::Vector_2               EK_Vector_2;
+
+  typedef typename EK::Site_2                 EK_Site_2;
+
+  typedef typename EK::FT                     EK_FT;
+  typedef typename EK::RT                     EK_RT;
+
+  // Types for the filtering kernel
+  typedef typename FK::Point_2                FK_Point_2;
+  typedef typename FK::Line_2                 FK_Line_2;
+  typedef typename FK::Segment_2              FK_Segment_2;
+  typedef typename FK::Ray_2                  FK_Ray_2;
+  typedef typename FK::Direction_2            FK_Direction_2;
+  typedef typename FK::Vector_2               FK_Vector_2;
+
+  typedef typename FK::Site_2                 FK_Site_2;
+
+  typedef typename FK::FT                     FK_FT;
+  typedef typename FK::RT                     FK_RT;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  TYPE DEFINITIONS
+  //-----------------------------------------------------------------------
+
+  // BASIC TYPES
+  //------------
+  typedef CK_t                          R;
+  typedef CK_MTag                       Method_tag;
+  typedef ITag                          Intersections_tag;
+
+  typedef CK_t                          Construction_kernel;
+  typedef FK_t                          Filtering_kernel;
+  typedef EK_t                          Exact_kernel;
+
+  typedef CK_traits                     Construction_traits;
+  typedef FK_traits                     Filtering_traits;
+  typedef EK_traits                     Exact_traits;
+
+  typedef CK_MTag                       Construction_traits_method_tag;
+  typedef FK_MTag                       Filtering_traits_method_tag;
+  typedef EK_MTag                       Exact_traits_method_tag;
+
+  typedef typename CK::Point_2          Point_2;
+  typedef typename CK::Line_2           Line_2;
+  typedef typename CK::Segment_2        Segment_2;
+  typedef typename CK::Ray_2            Ray_2;
+  typedef typename CK::Direction_2      Direction_2;
+  typedef typename CK::Vector_2         Vector_2;
+  typedef typename CK::Comparison_result      Comparison_result;
+  typedef typename CK::Sign             Sign;
+  typedef typename CK::Boolean          Boolean;
+  //  typedef typename CK::Circle_2         Circle_2;
+  typedef typename CK::Site_2           Site_2;
+
+  typedef typename CK::Object_2         Object_2;
+
+  typedef typename CK::FT               FT;
+  typedef typename CK::RT               RT;
+
+  typedef typename CK::Rep_tag          Rep_tag;
+
+protected:
+  typedef
+  typename Base::Arrangement_enum
+  Arrangement_enum;
+
+private:
+  typedef typename CK_traits::Construct_svd_vertex_2
+  CK_Construct_svd_vertex_2;
+
+  typedef typename FK_traits::Construct_svd_vertex_2
+  FK_Construct_svd_vertex_2;
+
+  typedef typename EK_traits::Construct_svd_vertex_2
+  EK_Construct_svd_vertex_2;
+
+
+  //typedef typename CK_traits::Construct_sdg_bisector_2
+  //CK_Construct_sdg_bisector_2;
+
+  //typedef typename FK_traits::Construct_sdg_bisector_2
+  //FK_Construct_sdg_bisector_2;
+
+  //typedef typename EK_traits::Construct_sdg_bisector_2
+  //EK_Construct_sdg_bisector_2;
+
+public:
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //---------------------------------
+  typedef typename CK::Construct_object_2     Construct_object_2;
+  typedef typename CK::Assign_2               Assign_2;
+
+  // CONSTRUCTIONS
+  //--------------
+  // vertex, bisector, and Voronoi circle
+  typedef
+  Filtered_construction<CK_Construct_svd_vertex_2,
+			EK_Construct_svd_vertex_2,
+			FK_Construct_svd_vertex_2,
+			C2E, C2F, E2C, F2C>
+  Construct_svd_vertex_2;
+
+  //typedef
+  //Filtered_construction<CK_Construct_sdg_bisector_2,
+  //			EK_Construct_sdg_bisector_2,
+  //			FK_Construct_sdg_bisector_2,
+  //			C2E, C2F, E2C, F2C>
+  //Construct_sdg_bisector_2;
+
+  // Linf traits contain bisector constructions
+  typedef Tag_true Tag_has_bisector_constructions;
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_2<Gt, M>
+  {};
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_ray_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_ray_2<Gt, M>
+  {};
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_segment_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_segment_2<Gt, M>
+  {};
+
+  //  typedef typename CK::Construct_site_2   Construct_site_2;
+
+  //  typedef typename CK_traits::Construct_sdg_circle_2
+  //  Construct_sdg_circle_2;
+
+private:
+  // PREDICATES FOR THE TWO KERNELS
+  //-------------------------------
+#if 1
+  // Predicates for the filtering kernel
+  typedef typename FK_traits::Compare_x_2        FK_Compare_x_2;
+  typedef typename FK_traits::Compare_y_2        FK_Compare_y_2;
+  typedef typename FK_traits::Orientation_2      FK_Orientation_2;
+  typedef typename FK_traits::Equal_2            FK_Equal_2;
+  typedef typename FK_traits::Are_parallel_2     FK_Are_parallel_2;
+
+  typedef typename FK_traits::Oriented_side_of_bisector_2
+  FK_Oriented_side_of_bisector_2;
+
+  typedef typename FK_traits::Vertex_conflict_2  FK_Vertex_conflict_2;
+
+  typedef typename FK_traits::Finite_edge_interior_conflict_2
+  FK_Finite_edge_interior_conflict_2;
+
+  typedef typename FK_traits::Infinite_edge_interior_conflict_2
+  FK_Infinite_edge_interior_conflict_2;
+
+  typedef typename FK_traits::Is_degenerate_edge_2
+  FK_Is_degenerate_edge_2;
+
+  typedef typename FK_traits::Arrangement_type_2 FK_Arrangement_type_2;
+  typedef typename FK_traits::Oriented_side_2    FK_Oriented_side_2;
+
+  // Predicates for the exact kernel
+  typedef typename EK_traits::Compare_x_2        EK_Compare_x_2;
+  typedef typename EK_traits::Compare_y_2        EK_Compare_y_2;
+  typedef typename EK_traits::Orientation_2      EK_Orientation_2;
+  typedef typename EK_traits::Equal_2            EK_Equal_2;
+  typedef typename EK_traits::Are_parallel_2     EK_Are_parallel_2;
+
+  typedef typename EK_traits::Oriented_side_of_bisector_2
+  EK_Oriented_side_of_bisector_2;
+
+  typedef typename EK_traits::Vertex_conflict_2  EK_Vertex_conflict_2;
+
+  typedef typename EK_traits::Finite_edge_interior_conflict_2
+  EK_Finite_edge_interior_conflict_2;
+
+  typedef typename EK_traits::Infinite_edge_interior_conflict_2
+  EK_Infinite_edge_interior_conflict_2;
+
+  typedef typename EK_traits::Is_degenerate_edge_2
+  EK_Is_degenerate_edge_2;
+
+  typedef typename EK_traits::Arrangement_type_2 EK_Arrangement_type_2;
+  typedef typename EK_traits::Oriented_side_2    EK_Oriented_side_2;
+
+#else
+  // Predicates for the filtering kernel
+  typedef Sdg_compare_x_2<FK>                    FK_Compare_x_2;
+  typedef Sdg_compare_y_2<FK>                    FK_Compare_y_2;
+  typedef Sdg_orientation_C2<FK>                 FK_Orientation_2;
+  typedef Sdg_are_same_points_C2<FK>             FK_Equal_2;
+  typedef Sdg_are_parallel_C2<FK>                FK_Are_parallel_2;
+
+  typedef Sdg_oriented_side_of_bisector_C2<FK,FK_MTag>
+  FK_Oriented_side_of_bisector_2;
+
+  typedef Sdg_incircle_2<FK,FK_MTag>             FK_Vertex_conflict_2;
+
+  typedef Sdg_finite_edge_interior_2<FK,FK_MTag>
+  FK_Finite_edge_interior_conflict_2;
+
+  typedef Sdg_infinite_edge_interior_2<FK,FK_MTag>
+  FK_Infinite_edge_interior_conflict_2;
+
+  typedef Sdg_is_degenerate_edge_C2<FK,FK_MTag>  FK_Is_degenerate_edge_2;
+  typedef Sdg_arrangement_type_C2<FK>            FK_Arrangement_type_2;
+  typedef Sdg_oriented_side_C2<FK,FK_MTag>       FK_Oriented_side_2;
+
+  // Predicates for the exact kernel
+  typedef Sdg_compare_x_2<EK>                    EK_Compare_x_2;
+  typedef Sdg_compare_y_2<EK>                    EK_Compare_y_2;
+  typedef Sdg_orientation_C2<EK>                 EK_Orientation_2;
+  typedef Sdg_are_same_points_C2<EK>             EK_Equal_2;
+  typedef Sdg_are_parallel_C2<EK>                EK_Are_parallel_2;
+
+  typedef Sdg_oriented_side_of_bisector_C2<EK,EK_MTag>
+  EK_Oriented_side_of_bisector_2;
+
+  typedef Sdg_incircle_2<EK,EK_MTag>             EK_Vertex_conflict_2;
+
+  typedef Sdg_finite_edge_interior_2<EK,EK_MTag>
+  EK_Finite_edge_interior_conflict_2;
+
+  typedef Sdg_infinite_edge_interior_2<EK,EK_MTag>
+  EK_Infinite_edge_interior_conflict_2;
+
+  typedef Sdg_is_degenerate_edge_C2<EK,EK_MTag>  EK_Is_degenerate_edge_2;
+  typedef Sdg_arrangement_type_C2<EK>            EK_Arrangement_type_2;
+  typedef Sdg_oriented_side_C2<EK,EK_MTag>       EK_Oriented_side_2;
+#endif
+
+public:
+  // PREDICATES
+  //-----------
+  //typedef
+  //Filtered_predicate<EK_Compare_x_2, FK_Compare_x_2, C2E, C2F>
+  //Compare_x_2;
+
+  //typedef
+  //Filtered_predicate<EK_Compare_y_2, FK_Compare_y_2, C2E, C2F>
+  //Compare_y_2;
+
+  typedef
+  Filtered_predicate<EK_Orientation_2, FK_Orientation_2, C2E, C2F>
+  Orientation_2;
+
+  //typedef
+  //Filtered_predicate<EK_Equal_2, FK_Equal_2, C2E, C2F>
+  //Equal_2;
+
+  //typedef
+  //Filtered_predicate<EK_Are_parallel_2, FK_Are_parallel_2, C2E, C2F>
+  //Are_parallel_2;
+
+  typedef
+  Filtered_predicate<EK_Oriented_side_of_bisector_2,
+		     FK_Oriented_side_of_bisector_2, C2E, C2F>
+  Oriented_side_of_bisector_2;
+
+  typedef
+  Filtered_predicate<EK_Vertex_conflict_2,
+		     FK_Vertex_conflict_2, C2E, C2F>
+  Vertex_conflict_2;
+
+  typedef
+  Filtered_predicate<EK_Finite_edge_interior_conflict_2,
+		     FK_Finite_edge_interior_conflict_2, C2E, C2F>
+  Finite_edge_interior_conflict_2;
+
+  typedef
+  Filtered_predicate<EK_Infinite_edge_interior_conflict_2,
+		     FK_Infinite_edge_interior_conflict_2, C2E, C2F>
+  Infinite_edge_interior_conflict_2;
+
+  //typedef
+  //Filtered_predicate<EK_Is_degenerate_edge_2,
+  //		     FK_Is_degenerate_edge_2, C2E, C2F>
+  //Is_degenerate_edge_2;
+
+private:
+  typedef
+  Filtered_predicate<EK_Arrangement_type_2, FK_Arrangement_type_2, C2E, C2F>
+  Arrangement_type_2_base;
+
+public:
+  struct Arrangement_type_2
+    : public Arrangement_type_2_base, public Arrangement_enum
+  {};
+
+  typedef
+  Filtered_predicate<EK_Oriented_side_2, FK_Oriented_side_2, C2E, C2F>
+  Oriented_side_2;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  ACCESS TO OBJECTS
+  //-----------------------------------------------------------------------
+
+  // OBJECT CONSTRUCTION & ASSIGNMENT
+  //---------------------------------
+  Assign_2
+  assign_2_object() const {
+    return Assign_2();
+  }
+
+  Construct_object_2
+  construct_object_2_object() const {
+    return Construct_object_2();
+  }
+
+  // CONSTRUCTIONS
+  //--------------
+  Construct_svd_vertex_2
+  construct_svd_vertex_2_object() const {
+    return Construct_svd_vertex_2();
+  }
+
+  //Construct_sdg_bisector_2
+  //construct_sdg_bisector_2_object() const {
+  //  return Construct_sdg_bisector_2();
+  //}
+
+  /*
+  Construct_site_2
+  construct_site_2_object() const {
+    return Construct_site_2();
+  }
+  */
+
+  /*
+  Construct_sdg_circle_2
+  construct_sdg_circle_2_object() const {
+    return Construct_sdg_circle_2();
+  }
+  */
+
+  // PREDICATES
+  //-----------
+  //Compare_x_2
+  //compare_x_2_object() const {
+  //  return Compare_x_2();
+  //}
+
+  //Compare_y_2
+  //compare_y_2_object() const {
+  //  return Compare_y_2();
+  //}
+
+  //Orientation_2
+  //orientation_2_object() const {
+  //  return Orientation_2();
+  //}
+
+  //Equal_2
+  //equal_2_object() const {
+  //  return Equal_2();
+  //}
+
+  //Are_parallel_2
+  //are_parallel_2_object() const {
+  //  return Are_parallel_2();
+  //}
+
+  Oriented_side_of_bisector_2
+  oriented_side_of_bisector_2_object() const {
+    return Oriented_side_of_bisector_2();
+  }
+
+  Vertex_conflict_2
+  vertex_conflict_2_object() const {
+    return Vertex_conflict_2();
+  }
+
+  Finite_edge_interior_conflict_2
+  finite_edge_interior_conflict_2_object() const {
+    return Finite_edge_interior_conflict_2();
+  }
+
+  Infinite_edge_interior_conflict_2
+  infinite_edge_interior_conflict_2_object() const {
+    return Infinite_edge_interior_conflict_2();
+  }
+
+  //Is_degenerate_edge_2
+  //is_degenerate_edge_2_object() const {
+  //  return Is_degenerate_edge_2();
+  //}
+
+  //Arrangement_type_2
+  //arrangement_type_2_object() const {
+  //  return Arrangement_type_2();
+  //}
+
+  Oriented_side_2
+  oriented_side_2_object() const {
+    return Oriented_side_2();
+  }
+};
+
+
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h
new file mode 100644
index 0000000..a48cdfa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h
@@ -0,0 +1,1449 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FINITE_EDGE_INTERIOR_CONFLICT_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FINITE_EDGE_INTERIOR_CONFLICT_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4800)
+// complaint about performance where we can't do anything
+#endif
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//------------------------------------------------------------------------
+
+template<class K, class Method_tag>
+class Finite_edge_interior_conflict_C2
+  : public Basic_predicates_C2<K>
+{
+public:
+
+  typedef Basic_predicates_C2<K>              Base;
+  typedef Voronoi_vertex_C2<K,Method_tag>     Voronoi_vertex_2;
+
+  typedef typename Base::Point_2              Point_2;
+  typedef typename Base::Segment_2            Segment_2;
+  typedef typename Base::Line_2               Line_2;
+  typedef typename Base::Site_2               Site_2;
+  typedef typename Base::FT                   FT;
+  typedef typename Base::RT                   RT;
+
+  typedef typename Base::Comparison_result    Comparison_result;
+  typedef typename Base::Sign                 Sign;
+  typedef typename Base::Orientation          Orientation;
+  typedef typename Base::Oriented_side        Oriented_side;
+  typedef typename Base::Boolean              Boolean;
+
+  typedef typename Base::Homogeneous_point_2  Homogeneous_point_2;
+
+
+  using Base::opposite_line;
+  using Base::compute_supporting_line;
+  using Base::oriented_side_of_line;
+  using Base::compare_linf_distances_to_line;
+  using Base::compare_linf_distances_to_lines;
+  using Base::compute_linf_perpendicular;
+  //using Base::projection_on_line;
+  using Base::compute_linf_projection_hom;
+  using Base::compute_linf_projection_nonhom;
+  using Base::compute_vertical_projection;
+  using Base::compute_horizontal_projection;
+  using Base::intersects_segment_interior_bbox;
+  using Base::intersects_segment_positive_of_wedge;
+  using Base::intersects_segment_negative_of_wedge;
+  using Base::intersects_segment_interior_inf_box;
+  using Base::intersects_segment_interior_inf_wedge_sp;
+  using Base::is_site_h_or_v;
+  using Base::zero_voronoi_area;
+
+
+private:
+  typedef typename Base::Compare_x_2          Compare_x_2_points;
+  typedef typename Base::Compare_y_2          Compare_y_2_points;
+
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K>
+          Are_same_segments_2;
+
+  typedef typename K::Intersections_tag       ITag;
+
+private:
+  Are_same_points_2    same_points;
+  Are_same_segments_2  same_segments;
+
+  Compare_x_2_points cmpx;
+  Compare_y_2_points cmpy;
+
+private:
+
+  //--------------------------------------------------------------------
+  //--------------------------------------------------------------------
+  //--------------------------------------------------------------------
+
+  Boolean
+  is_interior_in_conflict_both(const Site_2& p, const Site_2& q,
+			       const Site_2& r, const Site_2& s,
+			       const Site_2& t, Method_tag tag) const
+  {
+    Boolean   in_conflict(false);
+
+    if ( zero_voronoi_area(p, r, s) || zero_voronoi_area(q, r, s) ) {
+      return true;
+    }
+
+    if ( p.is_point() && q.is_point() ) {
+      in_conflict = is_interior_in_conflict_both_pp(p, q, r, s, t, tag);
+
+    } else if ( p.is_segment() && q.is_segment() ) {
+
+      in_conflict = is_interior_in_conflict_both_ss(p, q, r, s, t, tag);
+
+    } else if ( p.is_point() && q.is_segment() ) {
+
+      in_conflict = is_interior_in_conflict_both_ps(p, q, r, s, t, tag);
+
+    } else { // p is a segment and q is a point
+
+      in_conflict = is_interior_in_conflict_both_sp(p, q, r, s, t, tag);
+    }
+
+    return in_conflict;
+  }
+
+  //--------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_both_pp(const Site_2& sp, const Site_2& sq,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& t, Method_tag ) const
+  {
+    CGAL_precondition( sp.is_point() && sq.is_point() );
+
+    Point_2 p = sp.point(), q = sq.point();
+
+    if ( t.is_point() ) { return true; }
+
+    // here t is a segment
+    Line_2 lt = compute_supporting_line(t.supporting_site());
+
+    Oriented_side op, oq;
+
+    if ( same_points(sp, t.source_site()) ||
+	 same_points(sp, t.target_site()) ) {
+      op = ON_ORIENTED_BOUNDARY;
+    } else {
+      op = oriented_side_of_line(lt, p);
+    }
+
+    if ( same_points(sq, t.source_site()) ||
+	 same_points(sq, t.target_site()) ) {
+      oq = ON_ORIENTED_BOUNDARY;
+    } else {
+      oq = oriented_side_of_line(lt, q);
+    }
+
+
+    if ((op == ON_POSITIVE_SIDE && oq == ON_NEGATIVE_SIDE) ||
+	(op == ON_NEGATIVE_SIDE && oq == ON_POSITIVE_SIDE) ||
+	(op == ON_ORIENTED_BOUNDARY || oq == ON_ORIENTED_BOUNDARY)) {
+      return true;
+    }
+
+    Comparison_result res =
+      compare_linf_distances_to_line(lt, p, q);
+
+    if ( res == EQUAL ) { return true; }
+
+    Voronoi_vertex_2 vpqr(sp, sq, r);
+    Voronoi_vertex_2 vqps(sq, sp, s);
+
+
+    Line_2 lperp;
+    if ( res == SMALLER ) {
+      // p is closer to lt than q
+      lperp = compute_linf_perpendicular(lt, p);
+    } else {
+      // q is closer to lt than p
+      lperp = compute_linf_perpendicular(lt, q);
+    }
+
+    Oriented_side opqr = vpqr.oriented_side(lperp);
+    Oriented_side oqps = vqps.oriented_side(lperp);
+
+    return ( opqr == oqps );
+  }
+
+  //--------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_both_ss(const Site_2& p, const Site_2& q,
+				  const Site_2& , const Site_2& ,
+				  const Site_2& , Method_tag) const
+  {
+    CGAL_precondition( p.is_segment() && q.is_segment() );
+    CGAL_USE(p);
+    CGAL_USE(q);
+    return true;
+  }
+
+  //--------------------------------------------------------------------
+
+  Boolean
+  is_interior_in_conflict_both_ps(const Site_2& p, const Site_2& q,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& t, Method_tag tag) const
+  {
+    CGAL_precondition( p.is_point() && q.is_segment() );
+
+    if ( same_points(p, q.source_site()) ||
+	 same_points(p, q.target_site()) ) {
+      return false;
+    }
+
+    if ( t.is_point() ) {
+      return is_interior_in_conflict_both_ps_p(p, q, r, s, t, tag);
+    }
+    return is_interior_in_conflict_both_ps_s(p, q, r, s, t, tag);
+  }
+
+  //--------------------------------------------------------------------
+
+  Boolean
+  is_interior_in_conflict_both_ps_p(const Site_2& p, const Site_2& q,
+				    const Site_2& r, const Site_2& s,
+				    const Site_2& t, Method_tag ) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+
+    Comparison_result res =
+      compare_linf_distances_to_line(lq, p.point(), t.point());
+
+    //if ( res != SMALLER ) { return true; }
+    if (certainly( res != SMALLER ) ) { return true; }
+    if (! is_certain( res != SMALLER ) ) {
+      return indeterminate<Boolean>();
+    }
+
+    Voronoi_vertex_2 vpqr(p, q, r);
+    Voronoi_vertex_2 vqps(q, p, s);
+
+    Line_2 lperp = compute_linf_perpendicular(lq, p.point());
+
+    Oriented_side opqr = vpqr.oriented_side(lperp);
+    Oriented_side oqps = vqps.oriented_side(lperp);
+
+    return (opqr == oqps);
+  }
+
+  //--------------------------------------------------------------------
+
+  bool check_if_exact(const Site_2&, const Tag_false&) const
+  {
+    return true;
+  }
+
+  bool check_if_exact(const Site_2& t1, const Tag_true&) const
+  {
+    return t1.is_input();
+  }
+
+  Boolean
+  is_interior_in_conflict_both_ps_s(const Site_2& sp, const Site_2& sq,
+				    const Site_2& r, const Site_2& s,
+				    const Site_2& st, Method_tag ) const
+  {
+    CGAL_precondition( st.is_segment() );
+
+    Point_2 p = sp.point();
+    //    Segment_2 q = sq.segment(), t = st.segment();
+
+    Line_2 lq = compute_supporting_line(sq.supporting_site());
+
+    if ( oriented_side_of_line(lq, p) == ON_NEGATIVE_SIDE ) {
+      lq = opposite_line(lq);
+    }
+
+    if ( same_points(sp, st.source_site()) ||
+	 same_points(sp, st.target_site()) ) {
+
+      Line_2 lqperp = compute_linf_perpendicular(lq, p);
+
+      Voronoi_vertex_2 vpqr(sp, sq, r);
+      Voronoi_vertex_2 vqps(sq, sp, s);
+
+      Oriented_side opqr = vpqr.oriented_side(lqperp);
+      Oriented_side oqps = vqps.oriented_side(lqperp);
+
+      CGAL_SDG_DEBUG( std::cout
+          << "debug endpt case computing ondifparabarcs" << std::endl; );
+      Boolean   on_different_parabola_arcs =
+	 ((opqr == ON_NEGATIVE_SIDE) & (oqps == ON_POSITIVE_SIDE)) |
+	 ((opqr == ON_POSITIVE_SIDE) & (oqps == ON_NEGATIVE_SIDE));
+
+      //if ( !on_different_parabola_arcs ) { return true; }
+      if (certainly( !on_different_parabola_arcs ) ) { return true; }
+      if (! is_certain( !on_different_parabola_arcs ) ) {
+        return indeterminate<Boolean>();
+      }
+
+      Site_2 t1;
+      if ( same_points(sp, st.source_site()) ) {
+	t1 = st.target_site();
+      } else {
+	t1 = st.source_site();
+      }
+
+      Oriented_side o_t1;
+
+      if ( same_points(t1, sq.source_site()) ||
+	   same_points(t1, sq.target_site()) ) {
+	o_t1 = ON_ORIENTED_BOUNDARY;
+      } else if (  !check_if_exact(t1, ITag()) &&
+		   ( same_segments(t1.supporting_site(0),
+				   sq.supporting_site()) ||
+		     same_segments(t1.supporting_site(1),
+				   sq.supporting_site()) )  ) {
+	o_t1 = ON_ORIENTED_BOUNDARY;
+      } else {
+	o_t1 = oriented_side_of_line(lq, t1.point());
+      }
+
+      if ( o_t1 == ON_NEGATIVE_SIDE ) {
+	return true;
+      }
+
+      Comparison_result res =
+	compare_linf_distances_to_line(lq, p, t1.point());
+
+      return ( res == LARGER );
+    } // end of case: point p is an endpoint of segment t
+
+    Line_2 lt = compute_supporting_line(st.supporting_site());
+
+    if ( oriented_side_of_line(lt, p) == ON_NEGATIVE_SIDE ) {
+      lt = opposite_line(lt);
+    }
+
+    Comparison_result res =
+      CGAL::compare(lt.a() * lq.b(), lt.b() * lq.a());
+    bool are_parallel = (res == EQUAL);
+
+    if ( are_parallel ) {
+      Sign sgn = CGAL::sign(lt.a() * lq.a() + lt.b() * lq.b());
+      bool have_opposite_directions = (sgn == NEGATIVE);
+      if ( have_opposite_directions ) { lq = opposite_line(lq); }
+
+      if ( oriented_side_of_line(lq, p) == oriented_side_of_line(lt, p) ) {
+	return true;
+      }
+
+      if ( have_opposite_directions ) {
+	lq = opposite_line(lq);
+      }
+    }
+
+    Line_2 l = compute_linf_perpendicular(lt, p);
+
+    Voronoi_vertex_2 vpqr(sp, sq, r);
+    Voronoi_vertex_2 vqps(sq, sp, s);
+
+    Oriented_side o_l_pqr = vpqr.oriented_side(l);
+    Oriented_side o_l_qps = vqps.oriented_side(l);
+    if (certainly( (o_l_pqr == ON_POSITIVE_SIDE) &
+	           (o_l_qps == ON_NEGATIVE_SIDE) ) )
+        return false;
+    if (certainly( (o_l_pqr == ON_NEGATIVE_SIDE) &
+	           (o_l_qps == ON_POSITIVE_SIDE) ) )
+	return true;
+    if (! is_certain((o_l_pqr == -o_l_qps) & (o_l_pqr != ZERO)))
+        return indeterminate<Boolean>();
+
+    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+    //>>>>>>>>>> HERE I NEED TO CHECK THE BOUNDARY CASES <<<<<<
+    //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+    Line_2 lqperp = compute_linf_perpendicular(lq, p);
+
+    Oriented_side opqr = vpqr.oriented_side(lqperp);
+    Oriented_side oqps = vqps.oriented_side(lqperp);
+
+    CGAL_SDG_DEBUG( std::cout
+        << "debug computing ondifparabarcs" << std::endl; );
+
+    Boolean   on_different_parabola_arcs = (opqr == -oqps) & (opqr != ZERO);
+
+    // if ( !on_different_parabola_arcs ) { return true; }
+    if (certainly( !on_different_parabola_arcs ) ) { return true; }
+    if (! is_certain( !on_different_parabola_arcs ) ) {
+      return indeterminate<Boolean>(); }
+
+    Homogeneous_point_2 pv = compute_linf_projection_hom(lq, p);
+    Homogeneous_point_2 hp(p);
+
+    pv = Base::midpoint(pv, hp);
+
+    Oriented_side o_l_pv = oriented_side_of_line(l, pv);
+
+    CGAL_assertion( o_l_pv != ON_ORIENTED_BOUNDARY );
+
+    CGAL_assertion( o_l_pqr != ON_ORIENTED_BOUNDARY ||
+		    o_l_qps != ON_ORIENTED_BOUNDARY );
+
+    if ( o_l_pqr == ON_ORIENTED_BOUNDARY ) {
+      return ( o_l_qps == o_l_pv );
+    } else {
+      return ( o_l_pqr == o_l_pv );
+    }
+
+  }
+
+  //--------------------------------------------------------------------
+
+  Boolean
+  is_interior_in_conflict_both_sp(const Site_2& p, const Site_2& q,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& t, Method_tag tag) const
+  {
+    return is_interior_in_conflict_both_ps(q, p, s, r, t, tag);
+  }
+
+
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_touch(const Site_2& p, const Site_2& q,
+				const Site_2& r, const Site_2& s,
+				const Site_2& t, Method_tag tag) const
+  {
+    // checks if interior of voronoi edge is in conflict if both extrema
+    // of the voronoi edge touch the corresponding circles.
+    // return true if interior is in conflict; false otherwise
+    if ( t.is_segment() ) { return false; }
+
+#if 1
+    CGAL_assertion( p.is_segment() || q.is_segment() );
+
+    bool are_same_sites_rs (false);
+    if (r.is_point() && s.is_point()) {
+      if (same_points(r, s)) {
+        are_same_sites_rs = true;
+      }
+    } else {
+      if (r.is_segment() && s.is_segment()) {
+        if (same_segments(r, s)) {
+          are_same_sites_rs = true;
+        }
+      }
+    }
+
+    if (are_same_sites_rs) {
+      // philaris: the text would give false
+      // philaris: for segments, we have to refine later
+      if (r.is_point() && s.is_point()) {
+        CGAL_SDG_DEBUG(std::cout << "debug is_interior_in_conflict_touch"
+            << " about to return false with same points" << std::endl; );
+        return false;
+      }
+    } else {
+      Voronoi_vertex_2 vpqr(p, q, r);
+      Voronoi_vertex_2 vqps(q, p, s);
+
+      if ( vpqr.incircle_no_easy(s) == ZERO &&
+          vqps.incircle_no_easy(r) == ZERO ) {
+        CGAL_SDG_DEBUG(std::cout << "debug is_interior_in_conflict_touch"
+            << " about to return false with both ZERO" << std::endl; );
+        return false;
+      }
+    }
+
+    if ( p.is_segment() && q.is_segment() ) {
+      return true;
+    }
+#else
+    // OLD CODE: buggy if the edge is degenerate
+    if ( (p.is_point() && q.is_point()) ||
+	 (p.is_segment() && q.is_segment()) ) {
+      return true;
+    }
+#endif
+
+    if ( p.is_point() && q.is_segment() ) {
+      Line_2 lq = compute_supporting_line(q.supporting_site());
+
+      Comparison_result res =
+	compare_linf_distances_to_line(lq, p.point(), t.point());
+
+      return (res != SMALLER);
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug is_interior_in_conflict_touch"
+        << " recursion with permuted input" << std::endl; );
+    return is_interior_in_conflict_touch(q, p, s, r, t, tag);
+  }
+
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+
+
+  bool
+  is_interior_in_conflict_none(const Site_2& p, const Site_2& q,
+			       const Site_2& r, const Site_2& s,
+			       const Site_2& t, Method_tag tag) const
+  {
+    if ( t.is_segment() ) { return false; }
+
+    bool in_conflict(false);
+
+    if ( p.is_point() && q.is_point() ) {
+      in_conflict = is_interior_in_conflict_none_pp(p, q, r, s, t, tag);
+    } else if ( p.is_point() && q.is_segment() ) {
+      in_conflict = is_interior_in_conflict_none_ps(p, q, r, s, t, tag);
+    } else if ( p.is_segment() && q.is_point() ) {
+      in_conflict = is_interior_in_conflict_none_sp(p, q, r, s, t, tag);
+    } else { // both p and q are segments
+      in_conflict = is_interior_in_conflict_none_ss(p, q, r, s, t, tag);
+    }
+
+    return in_conflict;
+  }
+
+  //------------------------------------------------------------------------
+
+
+  bool
+  is_interior_in_conflict_none_pp(const Site_2& p, const Site_2& q,
+				  const Site_2& , const Site_2& ,
+				  const Site_2& t, Method_tag ) const
+  {
+    CGAL_precondition( p.is_point() && q.is_point() && t.is_point() );
+    CGAL_USE(p);
+    CGAL_USE(q);
+    CGAL_USE(t);
+    return false;
+  }
+
+  //------------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_none_ps(const Site_2& sp, const Site_2& sq,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& st, Method_tag ) const
+  {
+    CGAL_precondition( sp.is_point() && sq.is_segment() && st.is_point() );
+
+    if ( same_points(sp, sq.source_site()) ||
+	 same_points(sp, sq.target_site()) ) {
+      return false;
+    }
+
+    Line_2 lq = compute_supporting_line(sq.supporting_site());
+
+    Voronoi_vertex_2 vpqr(sp, sq, r);
+    Voronoi_vertex_2 vqps(sq, sp, s);
+
+    Point_2 p = sp.point(), t = st.point();
+
+    Line_2 lperp = compute_linf_perpendicular(lq, t);
+
+    Oriented_side op = oriented_side_of_line(lq, p);
+    Oriented_side ot = oriented_side_of_line(lq, t);
+
+    bool on_same_side =
+      ((op == ON_POSITIVE_SIDE && ot == ON_POSITIVE_SIDE) ||
+       (op == ON_NEGATIVE_SIDE && ot == ON_NEGATIVE_SIDE));
+
+    Comparison_result res =
+      compare_linf_distances_to_line(lq, t, p);
+
+    Oriented_side opqr = vpqr.oriented_side(lperp);
+    Oriented_side oqps = vqps.oriented_side(lperp);
+
+    bool on_different_side =
+      ((opqr == ON_POSITIVE_SIDE && oqps == ON_NEGATIVE_SIDE) ||
+       (opqr == ON_NEGATIVE_SIDE && oqps == ON_POSITIVE_SIDE));
+
+    return ( on_same_side && (res == SMALLER) && on_different_side );
+  }
+
+  //------------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_none_sp(const Site_2& p, const Site_2& q,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& t, Method_tag tag) const
+  {
+    return is_interior_in_conflict_none_ps(q, p, s, r, t, tag);
+  }
+
+  //------------------------------------------------------------------------
+
+  bool
+  is_interior_in_conflict_none_ss(const Site_2& p, const Site_2& q,
+				  const Site_2& r, const Site_2& s,
+				  const Site_2& t, Method_tag ) const
+  {
+    CGAL_precondition( p.is_segment() && q.is_segment() && t.is_point() );
+
+    Voronoi_vertex_2 vpqr(p, q, r);
+    Voronoi_vertex_2 vqps(q, p, s);
+
+    Line_2 lp = compute_supporting_line(p.supporting_site());
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+
+    // first orient lp according to its Voronoi vertices
+    if ( vpqr.is_degenerate_Voronoi_circle() ) {
+      Site_2 tpqr = Site_2::construct_site_2(vpqr.degenerate_point());
+
+      if ( same_points(tpqr, p.source_site()) ||
+	   same_points(tpqr, p.target_site()) ) {
+	if ( vqps.oriented_side(lp) != ON_POSITIVE_SIDE ) {
+	  lp = opposite_line(lp);
+	}
+      }
+    } else {
+      if ( vpqr.oriented_side(lp) != ON_POSITIVE_SIDE ) {
+	lp = opposite_line(lp);
+      }
+    }
+#if 0 // OLD CODE
+    if (  ( vpqr.is_degenerate_Voronoi_circle() &&
+	    same_points(vpqr.degenerate_point(), p.source_site()) ) ||
+	  ( vpqr.is_degenerate_Voronoi_circle() &&
+	    same_points(vpqr.degenerate_point(), p.target_site()) )  ) {
+      if ( vqps.oriented_side(lp) != ON_POSITIVE_SIDE ) {
+	lp = opposite_line(lp);
+      }
+    } else {
+      if ( vpqr.oriented_side(lp) != ON_POSITIVE_SIDE ) {
+	lp = opposite_line(lp);
+      }
+    }
+#endif
+
+    // then orient lq according to its Voronoi vertices
+    if ( vpqr.is_degenerate_Voronoi_circle() ) {
+      Site_2 tpqr = Site_2::construct_site_2(vpqr.degenerate_point());
+
+      if ( same_points(tpqr, q.source_site()) ||
+	   same_points(tpqr, q.target_site()) ) {
+	if ( vqps.oriented_side(lq) != ON_POSITIVE_SIDE ) {
+	  lq = opposite_line(lq);
+	}
+      }
+    } else {
+      if ( vpqr.oriented_side(lq) != ON_POSITIVE_SIDE ) {
+	lq = opposite_line(lq);
+      }
+    }
+#if 0 // OLD CODE
+    if (  ( vpqr.is_degenerate_Voronoi_circle() &&
+	    same_points(vpqr.degenerate_point(), q.source_site()) ) ||
+	  ( vpqr.is_degenerate_Voronoi_circle() &&
+	    same_points(vpqr.degenerate_point(), q.target_site()) )  ) {
+      if ( vqps.oriented_side(lq) != ON_POSITIVE_SIDE ) {
+	lq = opposite_line(lq);
+      }
+    } else {
+      if ( vpqr.oriented_side(lq) != ON_POSITIVE_SIDE ) {
+	lq = opposite_line(lq);
+      }
+    }
+#endif
+
+    Point_2 tp = t.point();
+
+    // check if t is on the same side as the Voronoi vertices
+    Oriented_side ot_lp = oriented_side_of_line(lp, tp);
+    Oriented_side ot_lq = oriented_side_of_line(lq, tp);
+
+    if ( ot_lp != ON_POSITIVE_SIDE || ot_lq != ON_POSITIVE_SIDE ) {
+      return false;
+    }
+
+    Line_2 lperp;
+
+    Comparison_result res =
+      compare_linf_distances_to_lines(tp, lp, lq);
+
+    if ( res == SMALLER ) {
+      lperp = compute_linf_perpendicular(lp, tp);
+    } else {
+      lperp = compute_linf_perpendicular(lq, tp);
+    }
+
+    CGAL_precondition( ot_lp != ON_ORIENTED_BOUNDARY &&
+		       ot_lq != ON_ORIENTED_BOUNDARY );
+
+    // check of lperp separates the two Voronoi vertices
+    Oriented_side opqr_perp = vpqr.oriented_side(lperp);
+    Oriented_side oqps_perp = vqps.oriented_side(lperp);
+
+    bool on_different_side =
+      (opqr_perp == ON_POSITIVE_SIDE &&
+       oqps_perp == ON_NEGATIVE_SIDE) ||
+      (opqr_perp == ON_NEGATIVE_SIDE &&
+       oqps_perp == ON_POSITIVE_SIDE);
+
+    return ( on_different_side );
+  }
+
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+
+public:
+  typedef Boolean           result_type;
+  typedef Site_2            argument_type;
+
+  Boolean   operator()(const Site_2& p, const Site_2& q, const Site_2& r,
+		       const Site_2& s, const Site_2& t, Sign sgn) const
+  {
+    Boolean retval;
+    CGAL_SDG_DEBUG(
+        std::cout << "debug finite-edge-int-cf entering (p,q,r,s,t,sgn)= "
+        << p << ' ' << q << ' ' << r << ' ' << s << ' ' << t
+        << ' ' << sgn << std::endl; );
+    if ( sgn == POSITIVE ) {
+      retval = is_interior_in_conflict_none(p, q, r, s, t, Method_tag());
+    } else if ( sgn == NEGATIVE ) {
+      retval = is_interior_in_conflict_both(p, q, r, s, t, Method_tag());
+    } else {
+      retval = is_interior_in_conflict_touch(p, q, r, s, t, Method_tag());
+    }
+    CGAL_SDG_DEBUG( std::cout <<
+        "debug finite-edge-int-cf with (p,q,r,s,t,sgn)= "
+        << p << ' ' << q << ' ' << r << ' ' << s << ' ' << t
+        << ' ' << sgn << " returns " << retval << std::endl; );
+    return retval;
+  }
+
+
+  // philaris: tocheck
+  Boolean   operator()(const Site_2& p, const Site_2& q, const Site_2& r,
+		       const Site_2& t, Sign sgn) const
+  {
+    CGAL_SDG_DEBUG(
+        std::cout << "debug finite-edge-int-cf entering (p,q,r,t,sgn)= ("
+        << p << ") (" << q << ") (" << r <<  " (r not ignored)) ("
+        << t << ")  "
+        << sgn << std::endl; );
+
+    /*
+    if ( t.is_point() ) {
+      return ( sgn == NEGATIVE );
+    }
+    */
+
+    // if p, q, t are points, then return (sgn == NEGATIVE)
+    if (t.is_point() && p.is_point() && q.is_point()) {
+      CGAL_SDG_DEBUG( std::cout <<
+          "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+          << p << ") (" << q << ") (" << r <<  " ) ("
+          << t << ")  "
+          << sgn << " returns " << (sgn==NEGATIVE) << std::endl; );
+      return ( sgn == NEGATIVE );
+    }
+
+    if (t.is_point() && (sgn == NEGATIVE)) {
+      bool is_p_pnt = p.is_point();
+      bool is_q_pnt = q.is_point();
+      bool parabola_case = (is_p_pnt && (! is_q_pnt)) ||
+                           (is_q_pnt && (! is_p_pnt))   ;
+      if (parabola_case) {
+        if (is_p_pnt) {
+          Point_2 pp = p.point();
+          Line_2 lq = compute_supporting_line(q.supporting_site());
+          if ( oriented_side_of_line(lq, pp)
+              == ON_NEGATIVE_SIDE ) {
+            lq = opposite_line(lq);
+          }
+          Voronoi_vertex_2 vpqr(p, q, r);
+          Line_2 lqperp = compute_linf_perpendicular(lq, p.point());
+          Oriented_side opqr = vpqr.oriented_side(lqperp);
+          Boolean on_different_parabola_arcs = (opqr == ON_NEGATIVE_SIDE);
+
+          //if ( !on_different_parabola_arcs ) { return true; }
+          if (certainly( ! on_different_parabola_arcs ) ) {
+            CGAL_SDG_DEBUG( std::cout
+                << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << true << std::endl; );
+            return true;
+          }
+          if (! is_certain( ! on_different_parabola_arcs ) ) {
+            return indeterminate<Boolean>();
+          }
+        }
+        if (is_q_pnt) {
+          Point_2 qq = q.point();
+          Line_2 lp = compute_supporting_line(p.supporting_site());
+          if ( oriented_side_of_line(lp, qq)
+              == ON_NEGATIVE_SIDE ) {
+            lp = opposite_line(lp);
+          }
+          Line_2 lpperp = compute_linf_perpendicular(lp, qq);
+          Voronoi_vertex_2 vpqr(p, q, r);
+          Oriented_side opqr = vpqr.oriented_side(lpperp);
+          Boolean on_different_parabola_arcs =
+            (opqr == ON_POSITIVE_SIDE);
+
+          //if ( !on_different_parabola_arcs ) { return true; }
+          if (certainly( ! on_different_parabola_arcs ) ) {
+            CGAL_SDG_DEBUG( std::cout
+                << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << true << std::endl; );
+            return true;
+          }
+          if (! is_certain( ! on_different_parabola_arcs ) ) {
+            return indeterminate<Boolean>();
+          }
+        }
+        CGAL_SDG_DEBUG( std::cout <<
+            "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+            << p << ") (" << q << ") (" << r <<  ") ("
+            << t << ")  "
+            << sgn << " returns " << false << std::endl; );
+        return false;
+      }
+
+      CGAL_SDG_DEBUG( std::cout <<
+          "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+          << p << ") (" << q << ") (" << r <<  ") ("
+          << t << ")  "
+          << sgn << " returns " << true << std::endl; );
+      return true;
+    }
+
+    // here and on, t is a segment
+    // or t is a point and sgn != NEGATIVE
+
+    if ( sgn != NEGATIVE ) {
+      // philaris: tocheck
+
+      // philaris: here, I assert that sgn is never zero
+      // tocheck
+      CGAL_assertion( sgn == POSITIVE );
+
+      CGAL_assertion( p.is_point() || q.is_point() );
+      CGAL_assertion( p.is_segment() || q.is_segment() );
+
+      CGAL_assertion(t.is_point());
+
+      if ( p.is_point() && q.is_segment() ) {
+        if (same_points(p, q.source_site()) ||
+            same_points(p, q.target_site())   ) {
+          CGAL_SDG_DEBUG( std::cout <<
+              "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+              << p << ") (" << q << ") (" << r <<  ") ("
+              << t << ")  "
+              << sgn << " returns " << false << std::endl; );
+          return false;
+        } else { // p is not endpoint of q
+
+          CGAL_SDG_DEBUG( std::cout << "debug fecf p is not endpoint of q"
+            << std::endl; );
+
+          CGAL_assertion( ! is_site_h_or_v(q) ) ;
+
+          Line_2 lseg = compute_supporting_line(q.supporting_site());
+
+          Oriented_side ossegp =
+            oriented_side_of_line(lseg, p.point());
+
+          Oriented_side ossegt =
+            oriented_side_of_line(lseg, t.point());
+
+          CGAL_assertion(ossegp != ON_ORIENTED_BOUNDARY);
+          CGAL_assertion(ossegt != ON_ORIENTED_BOUNDARY);
+
+          if (ossegp != ossegt) {
+            CGAL_SDG_DEBUG( std::cout <<
+                "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << false << std::endl; );
+            return false;
+          } else {
+            // here, t and p are on the same side of q
+
+            CGAL_SDG_DEBUG(
+                std::cout << "debug fecf: t and p on the same side of q"
+                << std::endl; );
+
+            // compute linf projection of infinite
+            // Voronoi vertex (p, inf, q)
+
+            Point_2 proj_of_infv;
+            bool has_lseg_neg_slope =
+              CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
+
+            if (has_lseg_neg_slope) {
+              proj_of_infv =
+                compute_horizontal_projection(lseg, p.point());
+            } else {
+              proj_of_infv =
+                compute_vertical_projection(lseg, p.point());
+            }
+
+            // compute linf projection of pqr Voronoi vertex
+            Voronoi_vertex_2 vpqr(p, q, r);
+
+            Point_2 proj_of_vpqr =
+              compute_linf_projection_nonhom(lseg, vpqr.point());
+
+            Line_2 line_inf =
+              compute_linf_perpendicular(lseg, proj_of_infv);
+
+            Line_2 line_fin =
+              compute_linf_perpendicular(lseg, proj_of_vpqr);
+
+            Oriented_side os_line_inf =
+              oriented_side_of_line(line_inf, t.point());
+
+            Oriented_side os_line_fin =
+              oriented_side_of_line(line_fin, t.point());
+
+            Boolean retval = ( os_line_inf == os_line_fin) ? false : true;
+
+            CGAL_SDG_DEBUG( std::cout <<
+                "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << retval << std::endl; );
+
+            return retval;
+
+          } // end of case where
+            // t, p are on the same side of q
+        } // end of case where p is not endpoint of q
+      } // end of case where p is point and q is segment
+
+      if ( p.is_segment() && q.is_point() ) {
+        if (same_points(q, p.source_site()) ||
+            same_points(q, p.target_site())   ) {
+          CGAL_SDG_DEBUG( std::cout <<
+              "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+              << p << ") (" << q << ") (" << r <<  ") ("
+              << t << ")  "
+              << sgn << " returns " << false << std::endl; );
+          return false;
+        } else { // q is not endpoint of p
+          CGAL_assertion( ! is_site_h_or_v(p) );
+
+          Line_2 lseg = compute_supporting_line(p.supporting_site());
+
+          Oriented_side ossegq =
+            oriented_side_of_line(lseg, q.point());
+
+          Oriented_side ossegt =
+            oriented_side_of_line(lseg, t.point());
+
+          CGAL_assertion(ossegq != ON_ORIENTED_BOUNDARY);
+          CGAL_assertion(ossegt != ON_ORIENTED_BOUNDARY);
+
+          if (ossegq != ossegt) {
+            CGAL_SDG_DEBUG( std::cout <<
+              "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+              << p << ") (" << q << ") (" << r <<  ") ("
+              << t << ")  "
+              << sgn << " returns " << false << std::endl; );
+            return false;
+          } else {
+            // here, t and q are on the same side of p
+
+            // compute linf projection of infinite
+            // Voronoi vertex (p, inf, q)
+
+            Point_2 proj_of_infv;
+            bool has_lseg_neg_slope =
+              CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
+
+            if (has_lseg_neg_slope) {
+              proj_of_infv =
+                compute_vertical_projection(lseg, q.point());
+            } else {
+              proj_of_infv =
+                compute_horizontal_projection(lseg, q.point());
+            }
+
+            // compute linf projection of pqr Voronoi vertex
+            Voronoi_vertex_2 vpqr(p, q, r);
+
+            Point_2 proj_of_vpqr =
+              compute_linf_projection_nonhom(lseg, vpqr.point());
+
+            Line_2 line_inf =
+              compute_linf_perpendicular(lseg, proj_of_infv);
+
+            Line_2 line_fin =
+              compute_linf_perpendicular(lseg, proj_of_vpqr);
+
+            Oriented_side os_line_inf =
+              oriented_side_of_line(line_inf, t.point());
+
+            Oriented_side os_line_fin =
+              oriented_side_of_line(line_fin, t.point());
+
+            Boolean retval = ( os_line_inf == os_line_fin) ? false : true;
+
+            CGAL_SDG_DEBUG( std::cout <<
+                "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << retval << std::endl; );
+
+            return retval;
+
+          } // end of case where
+            // t, q are on the same side of p
+        } // end of case where q is not endpoint of p
+      } // end of case where q is point and p is segment
+
+      CGAL_SDG_DEBUG( std::cout <<
+          "debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
+          << p << ") (" << q << ") (" << r <<  ") ("
+          << t << ")  "
+          << sgn << " returns " << false << std::endl; );
+
+      return false;
+    }
+
+    // here and on, sgn == NEGATIVE
+
+    if ( p.is_segment() || q.is_segment() ) {
+      // philaris: p and q are consecutive on convex hull
+      // therefore, one of them is a point and the other is a segment
+      CGAL_assertion( p.is_point() || q.is_point() );
+
+      // philaris:
+
+      CGAL_assertion( p.is_point() ?
+                      ((! same_points(p, q.source_site())) &&
+                       (! same_points(p, q.target_site())))    :
+                      ((! same_points(q, p.source_site())) &&
+                       (! same_points(q, p.target_site())))
+                    ) ;
+
+      //sandeep: if t is segment and it not intersects the wedge
+      //as defined by s and p in the basic predicate
+      //intersects_segment_interior_inf_wedge_sp
+      // then return false
+      if (t.is_segment()) {
+        bool result;
+
+        if (p.is_point()) {
+          CGAL_assertion(q.is_segment());
+          //p may be end point of t
+          if ( same_points(p,t.source_site())
+               || same_points(p,t.target_site()) ) {
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << true << std::endl; );
+            return true;
+          } else {
+            if (same_points(q.source_site(), t.source_site()) ||
+                same_points(q.source_site(), t.target_site()) ||
+                same_points(q.target_site(), t.source_site()) ||
+                same_points(q.target_site(), t.target_site())   ) {
+              result = true;
+            } else {
+              Point_2 pp = p.point();
+              Line_2 lq = compute_supporting_line(q.supporting_site());
+              if ( oriented_side_of_line(lq, pp)
+                   == ON_NEGATIVE_SIDE ) {
+                lq = opposite_line(lq);
+              }
+              Line_2 lqperp = compute_linf_perpendicular(lq, pp);
+              Voronoi_vertex_2 vpqr(p, q, r);
+              Oriented_side opqr = vpqr.oriented_side(lqperp);
+              Boolean on_different_parabola_arcs =
+                (opqr == ON_NEGATIVE_SIDE);
+
+              //if ( !on_different_parabola_arcs ) { return true; }
+              if (certainly( ! on_different_parabola_arcs ) ) {
+                CGAL_SDG_DEBUG(
+                    std::cout
+                    << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                    << p << ") (" << q << ") (" << r <<  ") ("
+                    << t << ")  "
+                    << sgn << " returns " << true << std::endl; );
+                return true;
+              }
+              if (! is_certain( ! on_different_parabola_arcs ) ) {
+                return indeterminate<Boolean>();
+              }
+
+              // here, we are on different parabola arcs
+
+              CGAL_SDG_DEBUG( std::cout
+                  << "debug fecf pqrt on diff parab arcs" << std::endl; );
+
+              CGAL_SDG_DEBUG( std::cout
+                 << "debug fecf call intersects( " << q << ", "
+                 << p << ", " << t << ")" << std::endl; ) ;
+              result = intersects_segment_interior_inf_wedge_sp(q,p,t);
+            }
+          }
+        } else { // p is segment and q is point
+          CGAL_assertion(q.is_point());
+          //q may be endpoint of t
+          if (   same_points(q,t.source_site())
+              || same_points(q,t.target_site())) {
+            CGAL_SDG_DEBUG( std::cout
+                << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                << p << ") (" << q << ") (" << r <<  ") ("
+                << t << ")  "
+                << sgn << " returns " << true << std::endl; );
+            return true;
+          } else {
+            if (same_points(p.source_site(), t.source_site()) ||
+                same_points(p.source_site(), t.target_site()) ||
+                same_points(p.target_site(), t.source_site()) ||
+                same_points(p.target_site(), t.target_site())   ) {
+              result = true;
+            } else {
+              Point_2 qq = q.point();
+              Line_2 lp = compute_supporting_line(p.supporting_site());
+              if ( oriented_side_of_line(lp, qq)
+                   == ON_NEGATIVE_SIDE ) {
+                lp = opposite_line(lp);
+              }
+              Line_2 lpperp = compute_linf_perpendicular(lp, qq);
+              Voronoi_vertex_2 vpqr(p, q, r);
+              Oriented_side opqr = vpqr.oriented_side(lpperp);
+              Boolean on_different_parabola_arcs =
+                (opqr == ON_POSITIVE_SIDE);
+
+              //if ( !on_different_parabola_arcs ) { return true; }
+              if (certainly( ! on_different_parabola_arcs ) ) {
+                CGAL_SDG_DEBUG(
+                    std::cout
+                    << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+                    << p << ") (" << q << ") (" << r <<  ") ("
+                    << t << ")  "
+                    << sgn << " returns " << true << std::endl; );
+                return true;
+              }
+              if (! is_certain( ! on_different_parabola_arcs ) ) {
+                return indeterminate<Boolean>();
+              }
+
+              // here, we are on different parabola arcs
+
+              CGAL_SDG_DEBUG( std::cout
+                  << "debug fecf pqrt on diff parab arcs" << std::endl; );
+
+              CGAL_SDG_DEBUG( std::cout
+                 << "debug fecf call intersects( " << p << ", "
+                 << q << ", " << t << ")" << std::endl; ) ;
+              result = intersects_segment_interior_inf_wedge_sp(p,q,t);
+            }
+          }
+        }
+
+        if (result == false) {
+          CGAL_SDG_DEBUG( std::cout
+              << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+              << p << ") (" << q << ") (" << r <<  ") ("
+              << t << ")  "
+              << sgn << " returns " << false << std::endl; );
+          return false;
+        }
+      }//end of t is segment
+
+      // philaris: tocheck
+      CGAL_SDG_DEBUG( std::cout
+          << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+          << p << ") (" << q << ") (" << r <<  ") ("
+          << t << ")  "
+          << sgn << " returns " << true << std::endl; );
+      // philaris: always return true
+      return true;
+    }
+
+    // here p and q are points and s is a segment
+
+    bool p_is_endpoint =
+      same_points(p, t.source_site()) || same_points(p, t.target_site());
+    bool q_is_endpoint =
+      same_points(q, t.source_site()) || same_points(q, t.target_site());
+
+    // philaris: change for Linf
+    if ((cmpx(p.point(), q.point()) == EQUAL) ||
+        (cmpy(p.point(), q.point()) == EQUAL)    ) {
+      // if p or q have one same coordinate, behave like in L2
+      return ( p_is_endpoint && q_is_endpoint );
+    } else {
+      // philaris: tocheck
+      CGAL_assertion(sgn == NEGATIVE);
+      CGAL_SDG_DEBUG( std::cout
+          << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
+          << p << ") (" << q << ") (" << r <<  ") ("
+          << t << ")  "
+          << sgn << " returns " << true << std::endl; );
+      return true;
+    }
+  }
+
+  Boolean   operator()(const Site_2& p, const Site_2& q, const Site_2& t,
+		       Sign sgn) const
+  {
+    CGAL_SDG_DEBUG(
+        std::cout << "debug finite-edge-int-cf entering (p,q,t,sgn)= "
+        << p << ' ' << q << ' ' << t << ' '
+        << "(sgn " << sgn << " not ignored)"  << std::endl; );
+
+    CGAL_assertion( ! ( p.is_segment() && q.is_segment()) );
+
+    if ( p.is_segment() || q.is_segment() ) {
+      Site_2 siteseg = (p.is_point())? q: p;
+
+      if ( is_site_h_or_v(siteseg) ) {
+        if (p.is_point()) {
+          CGAL_assertion( same_points(p, q.source_site()) ||
+                          same_points(p, q.target_site())   ) ;
+        } else {
+          CGAL_assertion( same_points(q, p.source_site()) ||
+                          same_points(q, p.target_site())   ) ;
+        }
+        CGAL_SDG_DEBUG(
+            std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+            << p << ' ' << q << ' ' << t << ' '
+            << "(sgn " << sgn << " not ignored)" << " returns "
+            << false << std::endl; );
+        return false;
+      }
+
+      CGAL_assertion(! is_site_h_or_v(siteseg));
+      // t is segment
+      if (t.is_segment()) {
+        CGAL_assertion(sgn == NEGATIVE);
+        // sandeep if t does not intersect the wedge as defined by
+        //intersects_segment_interior_inf_wedge_sp(seg,pt,t) then return true
+        // this works if p or q is point
+        bool result;
+        if (p.is_point()) { // p is point, q is segment
+          CGAL_assertion((! same_points(p, q.source_site())) &&
+                         (! same_points(p, q.target_site()))    );
+          result = intersects_segment_interior_inf_wedge_sp(q,p,t);
+        } else { // q is point and p is segment
+          CGAL_assertion((! same_points(q, p.source_site())) &&
+                         (! same_points(q, p.target_site()))    );
+          result = intersects_segment_interior_inf_wedge_sp(p,q,t);
+        }
+
+        CGAL_SDG_DEBUG(
+            std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+            << p << ' ' << q << ' ' << t << ' '
+            << "(sgn " << sgn << " not ignored)" << " returns "
+            << result << std::endl; );
+
+        if (result == true) {
+          return true;
+        } else {
+          return false;
+        }
+        //return false;
+      }
+
+      CGAL_assertion(t.is_point());
+
+      if (sgn == POSITIVE) {
+        if (p.is_point() && q.is_segment()) {
+          if (same_points(p, q.source_site()) ||
+              same_points(p, q.target_site())   ) {
+            CGAL_SDG_DEBUG(
+                std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+                << p << ' ' << q << ' ' << t << ' '
+                << "(sgn " << sgn << " not ignored)" << " returns "
+                << false << std::endl; );
+            return false;
+          }
+        } // end of case: p: point, q: segment
+        else
+        // if (p.is_segment() && q.is_point())
+        {
+          if (same_points(q, p.source_site()) ||
+              same_points(q, p.target_site())   ) {
+            CGAL_SDG_DEBUG(
+                std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+                << p << ' ' << q << ' ' << t << ' '
+                << "(sgn " << sgn << " not ignored)" << " returns "
+                << false << std::endl; );
+            return false;
+          }
+        } // end of case: p: segment, q: point
+
+        Point_2 pnt = (p.is_point())? p.point(): q.point();
+        Line_2 lseg = (p.is_point()) ?
+          compute_supporting_line(q.supporting_site()) :
+          compute_supporting_line(p.supporting_site()) ;
+
+        Oriented_side ossegpnt =
+          oriented_side_of_line(lseg, pnt);
+
+        Oriented_side ossegt =
+          oriented_side_of_line(lseg, t.point());
+
+        CGAL_assertion(ossegpnt != ON_ORIENTED_BOUNDARY);
+        CGAL_assertion(ossegt != ON_ORIENTED_BOUNDARY);
+
+        if (ossegpnt != ossegt) {
+          CGAL_SDG_DEBUG(
+              std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+              << p << ' ' << q << ' ' << t << ' '
+              << "(sgn " << sgn << " not ignored)" << " returns "
+              << false << std::endl; );
+          return false;
+        } else {
+          // here, t and pnt are on the same side of seg
+
+          Point_2 proj_hor =
+            compute_horizontal_projection(lseg, pnt);
+
+          Point_2 proj_ver =
+            compute_vertical_projection(lseg, pnt);
+
+          Line_2 lineh =
+            compute_linf_perpendicular(lseg, proj_hor);
+
+          Line_2 linev =
+            compute_linf_perpendicular(lseg, proj_ver);
+
+          Oriented_side os_lineh =
+            oriented_side_of_line(lineh, t.point());
+
+          Oriented_side os_linev =
+            oriented_side_of_line(linev, t.point());
+
+          Boolean retval = ( os_lineh == os_linev ) ? false : true;
+
+          CGAL_SDG_DEBUG(
+              std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+              << p << ' ' << q << ' ' << t << ' '
+              << "(sgn " << sgn << " not ignored)" << " returns "
+              << retval << std::endl; );
+
+          return retval;
+
+        } // end of case: t and pnt on the same side of seg
+
+      } // end of case: sgn == POSITIVE
+
+      return false;
+    } // end of case: any of p, q is a segment
+
+    CGAL_SDG_DEBUG(
+        std::cout << "debug tocheck here p, q points" << std::endl; );
+
+    // both p and q are points
+    if ( t.is_point() ) {
+      // philaris: adaptation as follows:
+      // predicate: position of t related to bbox(p, q)
+
+      Comparison_result cmpxpt = cmpx(p.point(), t.point());
+      Comparison_result cmpxtq = cmpx(t.point(), q.point());
+      Comparison_result cmpypt = cmpy(p.point(), t.point());
+      Comparison_result cmpytq = cmpy(t.point(), q.point());
+
+      //Sign s1 = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq );
+      Sign s1 = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq);
+
+      CGAL_assertion( s1 != ZERO );
+
+      CGAL_SDG_DEBUG( std::cout << "debug finite-edge-int-cf (p,q,t)= "
+        << p << ' ' << q << ' ' << t
+        << "  s1= " << s1 << std::endl; );
+
+      CGAL_SDG_DEBUG(
+          std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+          << p << ' ' << q << ' ' << t << ' '
+          << "(sgn " << sgn << " not ignored)" << " returns "
+          << ( s1 == NEGATIVE ) << std::endl; );
+
+      return ( s1 == NEGATIVE );
+    }
+
+    CGAL_SDG_DEBUG( std::cout << "debug tocheck" << std::endl; );
+
+    bool bp =
+      same_points(p, t.source_site()) || same_points(p, t.target_site());
+    bool bq =
+      same_points(q, t.source_site()) || same_points(q, t.target_site());
+
+    Comparison_result cmpxpq = cmpx(p.point(), q.point());
+    Comparison_result cmpypq = cmpy(p.point(), q.point());
+
+    if ((cmpxpq == EQUAL) || (cmpypq == EQUAL)) {
+      CGAL_SDG_DEBUG(
+          std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+          << p << ' ' << q << ' ' << t << ' '
+          << "(sgn " << sgn << " not ignored)" << " returns "
+          << ( bp && bq ) << std::endl; );
+      return ( bp && bq );
+    } else {
+      // check if interior of segment has non-empty intersection
+      // with the bounding box of p, q
+      Boolean retval = intersects_segment_interior_bbox(t, p, q);
+      CGAL_SDG_DEBUG(
+          std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
+          << p << ' ' << q << ' ' << t << ' '
+          << "(sgn " << sgn << " not ignored)" << " returns "
+          << retval << std::endl; );
+      return retval;
+    }
+  }
+
+};
+
+
+//------------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FINITE_EDGE_INTERIOR_CONFLICT_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h
new file mode 100644
index 0000000..8a2e942
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h
@@ -0,0 +1,727 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Orientation_Linf_2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//-----------------------------------------------------------------------------
+
+template<class K, class Method_tag>
+class Infinite_edge_interior_conflict_C2
+  : public Basic_predicates_C2<K>
+{
+public:
+
+  typedef Basic_predicates_C2<K>              Base;
+
+  typedef typename K::Site_2           Site_2;
+  typedef typename K::Point_2          Point_2;
+  typedef typename K::Direction_2      Direction_2;
+  typedef typename K::RT               RT;
+  typedef typename K::Boolean          Boolean;
+
+  typedef typename K::Compare_x_2 Compare_x_2;
+  typedef typename K::Compare_y_2 Compare_y_2;
+
+  Compare_x_2 cmpx;
+  Compare_y_2 cmpy;
+
+  typedef Boolean                      result_type;
+  struct argument_type {};
+
+private:
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+
+  Are_same_points_2    same_points;
+  Are_same_segments_2  same_segments;
+
+  typedef Orientation_Linf_2<K>        Orientation_Linf_2_Type;
+
+  Orientation_Linf_2_Type  or_linf;
+
+  using Base::bounded_side_of_bbox;
+  using Base::compute_line_from_to;
+  using Base::oriented_side_of_line;
+  using Base::compute_supporting_line;
+  using Base::compute_vertical_projection;
+  using Base::compute_horizontal_projection;
+  using Base::compute_linf_projection_nonhom;
+  using Base::is_site_h_or_v;
+  using Base::zero_voronoi_area;
+
+  typedef typename Base::Line_2        Line_2;
+
+public:
+  Boolean   operator()(const Site_2& q, const Site_2& s, const Site_2& r,
+		       const Site_2& t, Sign sgn) const
+  {
+
+    CGAL_SDG_DEBUG(
+        std::cout << "debug infinite-edge-int-cf entering (q,s,r,t,sgn)= "
+        << q << ' ' << s << ' ' << r << ' ' << t
+        << ' ' << sgn << std::endl;);
+
+    if (sgn == NEGATIVE) {
+      if (zero_voronoi_area(q, s, r)) { return true; }
+    }
+
+    if ( t.is_segment() ) {
+      if (q.is_point() && s.is_point() && r.is_point()) {
+        if (sgn == NEGATIVE) {
+          CGAL_SDG_DEBUG(std::cout << "debug return tocheck" << std::endl;);
+          if (same_points(q, t.source_site()) ||
+              same_points(q, t.target_site())   ) {
+            // this works because endpoints of a segment are
+            // inserted before its interior
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << false << std::endl;);
+            return false;
+          } else {
+
+            // here q is point
+            if ( ! is_site_h_or_v(t) ) {
+
+              Line_2 lt = compute_supporting_line(t.supporting_site());
+
+              // Linf-project point q to line lt
+
+              Point_2 projq =
+                compute_linf_projection_nonhom(lt, q.point());
+
+              Line_2 lq = compute_line_from_to(projq, q.point());
+
+              Oriented_side oss =
+                oriented_side_of_line(lq, s.point());
+
+              Oriented_side osr =
+                oriented_side_of_line(lq, r.point());
+
+              if ((oss == ON_NEGATIVE_SIDE) &&
+                  (osr == ON_POSITIVE_SIDE)    ) {
+                CGAL_SDG_DEBUG(
+                    std::cout
+                    << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+                    << q << ' ' << s << ' ' << r << ' ' << t
+                    << ' ' << sgn << " returns "
+                    << false << std::endl;);
+                return false;
+              }
+            } // case where t is neither horizontal nor vertical
+
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << true << std::endl;);
+            return true;
+          }
+        }
+      } // end of case where q, s, r are all points
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug tocheck q,s,r not all points" << std::endl;);
+
+      if (sgn == NEGATIVE) {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug not all pts return true tocheck" << std::endl;);
+
+        if (q.is_point()) {
+          bool is_q_tsrc = same_points(q, t.source_site());
+          bool is_q_ttrg = same_points(q, t.target_site());
+
+          CGAL_assertion(! (is_q_tsrc || is_q_ttrg));
+
+          if (is_q_tsrc || is_q_ttrg) {
+            // philaris: this code should never be executed
+
+            CGAL_assertion_code(
+            bool is_q_ssrc = same_points(q, s.source_site());
+            bool is_q_strg = same_points(q, s.target_site());
+            bool is_q_rsrc = same_points(q, r.source_site());
+            bool is_q_rtrg = same_points(q, r.target_site());
+            );
+
+            CGAL_assertion(
+                (is_q_ssrc || is_q_strg) &&
+                (is_q_rsrc || is_q_rtrg)    );
+
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf tocheck com (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << true << std::endl;);
+            return true;
+          }
+
+          CGAL_assertion( ! (is_q_tsrc || is_q_ttrg) );
+
+          // here q is point
+          if ( ! is_site_h_or_v(t) ) {
+
+            Line_2 lt = compute_supporting_line(t.supporting_site());
+
+            // Linf-project point q to line lt
+
+            Point_2 projq =
+              compute_linf_projection_nonhom(lt, q.point());
+
+            Line_2 lq = compute_line_from_to(projq, q.point());
+
+            Point_2 srep;
+            if (s.is_point()) {
+              srep = s.point();
+            } else {
+              // s is segment
+              CGAL_assertion( ! is_site_h_or_v(s) ) ;
+
+              Direction_2 d (s.supporting_site().segment());
+              Line_2 ls = compute_supporting_line(s.supporting_site());
+              if (CGAL::sign(d.dx()) == CGAL::sign(d.dy())) {
+                srep = compute_horizontal_projection(
+                    ls, q.point());
+              } else {
+                srep = compute_vertical_projection(
+                    ls, q.point());
+              }
+            }
+            Oriented_side oss =
+              oriented_side_of_line(lq, srep);
+
+            Point_2 rrep;
+            if (r.is_point()) {
+              rrep = r.point();
+            } else {
+              // r is segment
+              CGAL_assertion( ! is_site_h_or_v(r) ) ;
+
+              Direction_2 d (r.supporting_site().segment());
+              Line_2 lr = compute_supporting_line(r.supporting_site());
+              if (CGAL::sign(d.dx()) == CGAL::sign(d.dy())) {
+                rrep = compute_vertical_projection(
+                    lr, q.point());
+              } else {
+                rrep = compute_horizontal_projection(
+                    lr, q.point());
+              }
+
+            }
+            Oriented_side osr =
+              oriented_side_of_line(lq, rrep);
+
+            if ((oss == ON_NEGATIVE_SIDE) &&
+                (osr == ON_POSITIVE_SIDE)    ) {
+              CGAL_SDG_DEBUG(
+                  std::cout
+                  << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+                  << q << ' ' << s << ' ' << r << ' ' << t
+                  << ' ' << sgn << " returns "
+                  << false << std::endl;);
+              return false;
+            }
+          } // case where t is neither horizontal nor vertical
+
+
+
+          //CGAL_assertion(false);
+
+          // philaris: tocheck more
+
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << true << std::endl;);
+
+          return true;
+
+        }
+
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << true << std::endl;);
+
+        return true;
+      }
+
+      // philaris: tocheck
+      CGAL_SDG_DEBUG(
+          std::cout
+          << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= "
+          << q << ' ' << s << ' ' << r << ' ' << t
+          << ' ' << sgn << " returns "
+          << false << std::endl;);
+      return false;
+    } // end of case where t is segment
+
+    // here and below, t is always a point
+
+    if ( q.is_segment() ) {
+
+      // philaris: difference from L2 here;
+      // in L2, r and s are endpoints of q
+      // in Linf they still have to be points, but
+      // they do not have to be endpoints of q
+      // (this has to be checked)
+      CGAL_assertion(s.is_point() && r.is_point());
+
+      if ( is_site_h_or_v(q) )
+      {
+        // in this case r and s must be endpoints of q
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << ( sgn == NEGATIVE ) << std::endl;);
+        return ( sgn == NEGATIVE );
+      } 
+      else
+      {
+        if (sgn == NEGATIVE) {
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << true << std::endl;);
+          return true;
+        }
+
+        // here sgn is non-negative
+
+        bool is_s_endp_of_q =
+          same_points(s, q.source_site()) ||
+          same_points(s, q.target_site());
+        bool is_r_endp_of_q =
+          same_points(r, q.source_site()) ||
+          same_points(r, q.target_site());
+
+        Line_2 l;
+        bool is_conflicting_side_of_q = false;
+
+        if (is_s_endp_of_q && is_r_endp_of_q) {
+          // check if t is on positive side of rs
+          l = compute_line_from_to(r.point(), s.point());
+          if (oriented_side_of_line(l, t.point()) ==
+              ON_POSITIVE_SIDE) {
+            is_conflicting_side_of_q = true;
+          }
+        } else {
+          l = compute_supporting_line(q.supporting_site());
+          Oriented_side sidelt =
+            oriented_side_of_line(l, t.point());
+          if (is_s_endp_of_q) {
+            // here r is not endpoint of q
+            Oriented_side sidelr =
+              oriented_side_of_line(l, r.point());
+            CGAL_assertion(sidelr != ON_ORIENTED_BOUNDARY);
+            if (sidelt == sidelr) {
+              is_conflicting_side_of_q = true;
+            }
+          } else {
+            // here s is not endpoint of q
+            Oriented_side sidels =
+              oriented_side_of_line(l, s.point());
+            CGAL_assertion(sidels != ON_ORIENTED_BOUNDARY);
+            if (sidelt == sidels) {
+              is_conflicting_side_of_q = true;
+            }
+          }
+        } // end of case: some of s, r is not endpoint of q
+
+        if (! is_conflicting_side_of_q) {
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << false << std::endl;);
+          return false;
+        }
+
+        // here is_conflicting_side_of_q is true;
+
+        CGAL_SDG_DEBUG(std::cout <<
+            "debug infcf is_cf_side_of_q" << std::endl;);
+
+        // compute infinite square such that:
+        // if you traverse it ccw, then it meets r and then s
+
+        Comparison_result A = cmpx(s.point(), r.point());
+        Comparison_result B = cmpy(s.point(), r.point());
+
+        CGAL_assertion((A != EQUAL) && (B != EQUAL));
+
+        // corner point of infinite square
+        Point_2 corner;
+        if (A == B) {
+          corner = Point_2(s.point().x(), r.point().y());
+        } else {
+          corner = Point_2(r.point().x(), s.point().y());
+        }
+
+        Line_2 lr = compute_line_from_to(r.point(), corner);
+        Line_2 ls = compute_line_from_to(corner, s.point());
+
+        Oriented_side sidelrt =
+          oriented_side_of_line(lr, t.point());
+
+        Oriented_side sidelst =
+          oriented_side_of_line(ls, t.point());
+
+        if ((sidelrt == ON_NEGATIVE_SIDE) ||
+            (sidelst == ON_NEGATIVE_SIDE)   ) {
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << false << std::endl;);
+          return false;
+        } else {
+          // both sidelrt and sidelst are non-negative
+          if (sidelrt == ON_ORIENTED_BOUNDARY) {
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << false << std::endl;);
+            return false;
+          } else if (sidelst == ON_ORIENTED_BOUNDARY) {
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << false << std::endl;);
+            return false;
+          } else {
+            CGAL_SDG_DEBUG(
+                std::cout
+                << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+                << q << ' ' << s << ' ' << r << ' ' << t
+                << ' ' << sgn << " returns "
+                << true << std::endl;);
+            return true;
+          }
+        }
+
+      } // end of case: q is neither horizontal nor vertical
+
+    }
+
+    // here and below both q and t are points
+
+    if ( s.is_point() && r.is_point() && same_points(s, r) ) {
+      // MK::ERROR: write this code using the compare_x_2 and
+      //    compare_y_2 predicates instead of computing the inner
+      //    product...
+      // philaris: adaptation to Linf
+
+      CGAL_SDG_DEBUG(std::cout <<
+          "debug infcf s=r and is point" << std::endl;);
+
+      Comparison_result cmpxst = cmpx(s.point(), t.point());
+      Comparison_result cmpxtq = cmpx(t.point(), q.point());
+      Comparison_result cmpyst = cmpy(s.point(), t.point());
+      Comparison_result cmpytq = cmpy(t.point(), q.point());
+
+      //Sign sgn1 = -sign_of( cmpxst * cmpxtq + cmpyst * cmpytq );
+      Sign sgn1 = CGAL::compare(0, cmpxst * cmpxtq + cmpyst * cmpytq);
+
+      CGAL_assertion( sgn1 != ZERO );
+
+      CGAL_SDG_DEBUG(
+          std::cout
+          << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+          << q << ' ' << s << ' ' << r << ' ' << t
+          << ' ' << sgn << " returns "
+          << (sgn1 == POSITIVE) << std::endl;);
+      return (sgn1 == POSITIVE);
+    }
+
+    // still here, both q and t are points
+
+    if ( s.is_segment() && r.is_segment() && same_segments(s, r) ) {
+      CGAL_SDG_DEBUG(std::cout <<
+          "debug infcf s=r and is segment" << std::endl;);
+
+      if ( same_points(q, s.source_site()) ||
+           same_points(q, s.target_site())   )  {
+        // here point q is endpoint of segment s
+        Site_2 ss;
+        if ( same_points(q, s.source_site()) ) {
+          ss = s.target_site();
+        } else {
+          ss = s.source_site();
+        }
+        // MK::ERROR: write this code using the compare_x_2 and
+        //    compare_y_2 predicates instead of computing the inner
+        //    product...
+        // philaris: adaptation to Linf
+
+        Comparison_result cmpxst = cmpx(ss.point(), t.point());
+        Comparison_result cmpxtq = cmpx(t.point(), q.point());
+        Comparison_result cmpyst = cmpy(ss.point(), t.point());
+        Comparison_result cmpytq = cmpy(t.point(), q.point());
+
+        //Sign sgn1 = -sign_of( cmpxst * cmpxtq + cmpyst * cmpytq );
+        Sign sgn1 = CGAL::compare(0, cmpxst * cmpxtq + cmpyst * cmpytq);
+
+        CGAL_assertion( sgn1 != ZERO );
+
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << (sgn1 == POSITIVE) << std::endl;);
+
+        return (sgn1 == POSITIVE);
+      }
+      else
+      {
+        // here point q is not endpoint of segment s
+
+        CGAL_assertion(sgn == NEGATIVE);
+
+        CGAL_assertion(! is_site_h_or_v(s));
+
+        // compute infinite square with corner at q
+        // and with center at infinity at
+        // direction SE, NE, NW, or SW;
+        // the direction goes from segment s to point q
+
+        Line_2 l = compute_supporting_line(s.supporting_site());
+
+        Point_2 phor =
+          compute_horizontal_projection(l, q.point());
+
+        Point_2 pver =
+          compute_vertical_projection(l, q.point());
+
+        // if (phor, q, pver) is a right turn,
+        // then lines are (phor,q) and (q,pver)
+        // else if (phor, q, pver) is a left turn,
+        // then lines are (pver,q) and (q,phor)
+
+        Line_2 l1, l2;
+
+        if (CGAL::orientation(phor, q.point(), pver) == RIGHT_TURN) {
+          l1 = compute_line_from_to(phor, q.point());
+          l2 = compute_line_from_to(q.point(), pver);
+        } else {
+          l1 = compute_line_from_to(pver, q.point());
+          l2 = compute_line_from_to(q.point(), phor);
+        }
+
+        // the square is defined by the intersection
+        // of the positive halfspaces supported
+        // by lines l1 and l2
+
+        Oriented_side osl1 =
+          oriented_side_of_line(l1, t.point());
+
+        Oriented_side osl2 =
+          oriented_side_of_line(l2, t.point());
+
+        CGAL_SDG_DEBUG(std::cout << "debug iecf osl1=" << osl1
+          << " osl2=" << osl2 << std::endl;);
+
+        Boolean retval =
+          (osl1 !=
+           ON_NEGATIVE_SIDE) &&
+          (osl2 !=
+           ON_NEGATIVE_SIDE)     ;
+
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << retval << std::endl;);
+
+        return retval;
+
+      }
+    }
+
+    // philaris: here there is significant difference of Linf
+    // with relation to L2
+
+    // q is on the Linf convex hull with neighbors (in this hull)
+    // s and r
+
+    // here q is a point and s is different from r
+
+    if (sgn == NEGATIVE) {
+      CGAL_SDG_DEBUG(std::cout <<
+          "debug infinite-edge-int-cf special NEG" << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug infcf special (q,s,r,t,sgn)= "
+        << q << ' ' << s << ' ' << r << ' ' << t
+        << ' ' << sgn << std::endl;);
+
+      if (s.is_point() && r.is_point()) {
+        if ((bounded_side_of_bbox(
+                q.point(), s.point(), t.point()) == ON_BOUNDED_SIDE) &&
+            (bounded_side_of_bbox(
+                q.point(), r.point(), t.point()) == ON_BOUNDED_SIDE))
+        {
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << false << std::endl;);
+          return false;
+          // otherwise, it will return true later
+        }
+      } else {
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << true << std::endl;);
+        return true;
+      }
+    } else if (sgn == POSITIVE) {
+      CGAL_SDG_DEBUG(
+          std::cout << "debug infinite-edge-int-cf special POS"
+          << std::endl;);
+      if (s.is_point() && r.is_point()) {
+        if ((bounded_side_of_bbox(
+               t.point(), s.point(), q.point()) ==
+                 ON_BOUNDED_SIDE) &&
+            (bounded_side_of_bbox(
+               t.point(), r.point(), q.point()) ==
+                 ON_BOUNDED_SIDE))
+        {
+          CGAL_SDG_DEBUG(
+              std::cout
+              << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+              << q << ' ' << s << ' ' << r << ' ' << t
+              << ' ' << sgn << " returns "
+              << true << std::endl;);
+          return true;
+          // otherwise it will return false later
+        }
+      } else if (s.is_segment() && r.is_segment()) {
+        // here s and r are both segments
+
+        // philaris: I assert that q is an endpoint of both s and r
+
+        CGAL_assertion(
+            same_points(q, s.source_site()) ||
+            same_points(q, s.target_site())
+            );
+
+        CGAL_assertion(
+            same_points(q, r.source_site()) ||
+            same_points(q, r.target_site())
+            );
+
+        // Since s and r are different, the infinite vertices
+        // (q,s,inf) and (q,inf,r) of the Voronoi diagram
+        // have the following property:
+        // if they are connected, their line has +-45 deg slope
+        // and this line goes through point q.
+        // This line is Linf-perpendicular to both s and r.
+        // Since q is not in conflict with any of (q,s,inf),
+        // (q,inf,r), it is enough to check if t is in the
+        // infinite box with corner q containing neither
+        // of these: (q,s,inf), (q,inf,r), any point of s, r.
+
+        Point_2 otherpnt =
+          (same_points(q, s.source_site())) ?
+          s.segment().target():
+          s.segment().source();
+
+        CGAL_assertion(
+            or_linf(t.point(), q.point(), otherpnt) ==
+            DEGENERATE );
+
+        Bounded_side bside =
+          bounded_side_of_bbox(t.point(), otherpnt, q.point());
+
+        CGAL_assertion(bside != ON_BOUNDARY);
+
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " returns "
+            << (bside == ON_BOUNDED_SIDE) << std::endl;);
+        return (bside == ON_BOUNDED_SIDE);
+
+      } else {
+        // here one of s, r is point and the other is a segment
+        CGAL_SDG_DEBUG(
+            std::cout
+            << "debug infinite-edge-int-cf with (q,s,r,t,sgn) "
+            << q << ' ' << s << ' ' << r << ' ' << t
+            << ' ' << sgn << " tocheck one seg one pnt in s, r"
+            << std::endl; ) ;
+      }
+    }
+    // here it might be sgn == ZERO
+
+    CGAL_SDG_DEBUG(
+        std::cout
+        << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
+        << q << ' ' << s << ' ' << r << ' ' << t
+        << ' ' << sgn << " returns "
+        << ( sgn == NEGATIVE ) << std::endl;);
+    return ( sgn == NEGATIVE );
+  }
+
+};
+
+
+//-----------------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h
new file mode 100644
index 0000000..7be1cb0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h
@@ -0,0 +1,192 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTATION_LINF_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTATION_LINF_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+
+#include <CGAL/Orientation_Linf_2.h>
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//-----------------------------------------------------------------------------
+
+
+
+template<class K>
+class Orientation_Linf_C2
+  : private Basic_predicates_C2<K>
+{
+private:
+  typedef Basic_predicates_C2<K>              Base;
+
+private:
+  typedef typename Base::Point_2              Point_2;
+  typedef typename Base::Segment_2            Segment_2;
+  typedef typename Base::Site_2               Site_2;
+  typedef typename Base::FT                   FT;
+  typedef typename Base::RT                   RT;
+
+  typedef typename Base::Comparison_result    Comparison_result;
+  typedef typename Base::Oriented_side        Oriented_side;
+  typedef typename Base::Sign                 Sign;
+
+  // the orientation Linf predicate for three points 
+  typedef Orientation_Linf_2<K>               Orientation_Linf_points_2;
+  
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+
+  typedef typename K::Intersections_tag       ITag;
+
+  Are_same_points_2    same_points;
+  Are_same_segments_2  same_segments;
+
+  bool have_common_support(const Site_2& p, const Site_2& q) const
+  {
+    CGAL_precondition( !p.is_input() && !q.is_input() );
+
+    return
+      same_segments(p.supporting_site(0), q.supporting_site(0)) ||
+      same_segments(p.supporting_site(0), q.supporting_site(1)) ||
+      same_segments(p.supporting_site(1), q.supporting_site(0)) ||
+      same_segments(p.supporting_site(1), q.supporting_site(1));
+  }
+
+  bool have_common_support(const Site_2& p, const Site_2& q,
+			   Site_2& support) const
+  {
+    CGAL_precondition( !p.is_input() && !q.is_input() );
+
+    if ( same_segments(p.supporting_site(0),
+		       q.supporting_site(0)) ||
+	 same_segments(p.supporting_site(0),
+		       q.supporting_site(1)) ) {
+      support = p.supporting_site(0);
+      return true;
+    } else if ( same_segments(p.supporting_site(1),
+			      q.supporting_site(0)) ||
+		same_segments(p.supporting_site(1),
+			      q.supporting_site(1)) ) {
+      support =  p.supporting_site(1);
+      return true;
+    }
+    return false;
+  }
+
+  bool is_endpoint(const Site_2& p, const Site_2& s) const
+  {
+    return same_points(s.source_site(), p) ||
+      same_points(s.target_site(), p);
+  }
+
+  //-------------------------------------------------------------
+
+  OrientationLinf predicate(const Site_2& p, const Site_2& q,
+			const Site_2& r, const Tag_false&) const
+  {
+    return Orientation_Linf_points_2()(
+	    p.point(), q.point(), r.point());
+  }
+
+  OrientationLinf predicate(const Site_2& p, const Site_2& q,
+			const Site_2& r, const Tag_true&) const
+  {
+#if 1
+    // do geometric filtering
+    bool pe = p.is_input();
+    bool qe = q.is_input();
+    bool re = r.is_input();
+    Site_2 support;
+    if ( !pe && !qe && !re ) {
+      if ( have_common_support(p, q, support) &&
+	   have_common_support(support, r) ) {
+	return DEGENERATE;
+      }
+    } else if ( !pe && !qe ) {
+      if ( have_common_support(p, q, support) &&
+	   is_endpoint(r, support) ) {
+	return DEGENERATE;
+      }
+    } else if ( !pe && !re ) {
+      if ( have_common_support(p, r, support) &&
+	   is_endpoint(q, support) ) {
+	return DEGENERATE;
+      }
+    } else if ( !qe && !re ) {
+      if ( have_common_support(q, r, support) &&
+	   is_endpoint(p, support) ) {
+	return DEGENERATE;
+      }
+    } else if ( !pe ) {
+      Site_2 s0 = p.supporting_site(0);
+      Site_2 s1 = p.supporting_site(1);
+      if ( (is_endpoint(q, s0) && is_endpoint(r, s0)) ||
+	   (is_endpoint(q, s1) && is_endpoint(r, s1)) ) {
+	return DEGENERATE;
+      }
+    } else if ( !qe ) {
+      Site_2 s0 = q.supporting_site(0);
+      Site_2 s1 = q.supporting_site(1);
+      if ( (is_endpoint(p, s0) && is_endpoint(r, s0)) ||
+	   (is_endpoint(p, s1) && is_endpoint(r, s1)) ) {
+	return DEGENERATE;
+      }
+    } else if ( !re ) {
+      Site_2 s0 = r.supporting_site(0);
+      Site_2 s1 = r.supporting_site(1);
+      if ( (is_endpoint(q, s0) && is_endpoint(p, s0)) ||
+	   (is_endpoint(q, s1) && is_endpoint(p, s1)) ) {
+	return DEGENERATE;
+      }
+    }
+#endif
+
+    return predicate(p, q, r, Tag_false());
+  }
+
+public:
+  typedef OrientationLinf              result_type;
+  typedef Site_2                       argument_type;
+
+  OrientationLinf operator()(const Site_2& p, const Site_2& q,
+                             const Site_2& r) const
+  {
+    CGAL_precondition( p.is_point() && q.is_point() && r.is_point() );
+
+    return predicate(p, q, r, ITag());
+  }
+};
+
+
+//-----------------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTATION_LINF_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h
new file mode 100644
index 0000000..e1b3014
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h
@@ -0,0 +1,498 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_x_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_y_2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//-----------------------------------------------------------------------------
+
+
+
+template<class K, class Method_tag>
+class Oriented_side_C2
+  : public Basic_predicates_C2<K>
+{
+private:
+
+  typedef Basic_predicates_C2<K>              Base;
+  typedef Voronoi_vertex_C2<K,Method_tag>     Voronoi_vertex_2;
+
+  typedef typename Base::Point_2              Point_2;
+  typedef typename Base::Segment_2            Segment_2;
+  typedef typename Base::Line_2               Line_2;
+  typedef typename Base::Site_2               Site_2;
+  typedef typename Base::FT                   FT;
+  typedef typename Base::RT                   RT;
+  typedef typename Base::Comparison_result    Comparison_result;
+
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K> Are_same_points_2;
+  Are_same_points_2                same_points;
+
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+  Are_same_segments_2              same_segments;
+
+  typedef SegmentDelaunayGraph_2::Compare_x_2<K> Compare_x_2_Sites_Type;
+  Compare_x_2_Sites_Type scmpx;
+  typedef SegmentDelaunayGraph_2::Compare_y_2<K> Compare_y_2_Sites_Type;
+  Compare_y_2_Sites_Type scmpy;
+
+  using Base::compute_supporting_line;
+  using Base::compute_linf_perpendicular;
+  using Base::oriented_side_of_line;
+  using Base::compute_vertical_projection;
+  using Base::compute_horizontal_projection;
+  using Base::is_site_h_or_v;
+  using Base::compare_distance_to_point_linf;
+
+public:
+  typedef typename Base::Oriented_side        Oriented_side;
+  typedef Oriented_side                       result_type;
+  typedef Site_2                              argument_type;
+
+  // computes the oriented side of the Voronoi vertex of s1, s2, s3
+  // wrt the line that passes through the point p and its direction
+  // is the direction of the supporting line of s, rotated by 90
+  // degrees counterclockwise.
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s3,
+			   const Site_2& s, const Site_2& p) const
+  {
+    CGAL_precondition( s.is_segment() && p.is_point() );
+
+    Voronoi_vertex_2 v(s1, s2, s3);
+    Line_2 l = compute_supporting_line( s.supporting_site() );
+    Line_2 lp = compute_linf_perpendicular(l, p.point());
+
+    Oriented_side retval = v.oriented_side(lp);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: Oriented_side_C2 (s1,s2,s3,s,p)= ("
+        << s1 << ") (" << s2 << ") (" << s3 << ") ("
+        << s << ") (" << p << ") "
+        << "returns " << retval
+        << std::endl;);
+
+    return retval;
+  }
+
+  // tie breaker for finite vertex
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s3,
+			   const Site_2& s, const Site_2& p,
+                           const Point_2 & pt) const
+  {
+    CGAL_precondition( s.is_segment() && p.is_point() );
+    CGAL_USE(pt);
+
+    Voronoi_vertex_2 v(s1, s2, s3);
+    Line_2 l = compute_supporting_line( s.supporting_site() );
+    Line_2 lp = compute_linf_perpendicular(l, p.point());
+
+    Oriented_side retval = v.oriented_side(lp);
+
+    bool is_s1_pnt = s1.is_point();
+    bool is_s2_pnt = s2.is_point();
+    bool is_s3_pnt = s3.is_point();
+
+    CGAL_assertion( ! (is_s1_pnt && is_s2_pnt && is_s3_pnt) );
+
+    // tie breaker in case at least one site is a point and
+    // the segment to split is not axis-parallel
+    if ((is_s1_pnt || is_s2_pnt || is_s3_pnt) &&
+        (! is_site_h_or_v(s))) {
+      if (retval == ON_ORIENTED_BOUNDARY) {
+        unsigned int num_pts =
+          (is_s1_pnt? 1 : 0) +
+          (is_s2_pnt? 1 : 0) +
+          (is_s3_pnt? 1 : 0) ;
+        CGAL_assertion( num_pts == 1 || num_pts == 2 );
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: Oriented_side_C2 num_pts=" << num_pts
+            << std::endl;);
+
+        if (num_pts == 1) {
+          const Site_2 * site_ptr;
+          if (is_s1_pnt) {
+            site_ptr = &s1;
+          } else if (is_s2_pnt) {
+            site_ptr = &s2;
+          } else {
+            site_ptr = &s3;
+          }
+          FT dist;
+          bool is_cand = test_candidate(*site_ptr, p, v, dist);
+          if (is_cand) {
+            // override retval = 0
+            retval = - oriented_side_of_line(lp, site_ptr->point());
+          }
+        } else { // num_pts == 2
+          const Site_2 * a;
+          const Site_2 * b;
+
+          if (! is_s1_pnt) {
+            a = &s2;
+            b = &s3;
+          } else if (! is_s2_pnt) {
+            a = &s1;
+            b = &s3;
+          } else { // not is_s3_pnt
+            a = &s1;
+            b = &s2;
+          }
+
+          FT distpa (0);
+          bool is_a_cand = test_candidate(*a, p, v, distpa);
+          FT distpb (0);
+          bool is_b_cand = test_candidate(*b, p, v, distpb);
+          unsigned int num_candidates =
+            (is_a_cand? 1 : 0) +
+            (is_b_cand? 1 : 0) ;
+          CGAL_SDG_DEBUG(std::cout
+              << "debug: Oriented_side_C2 two points, num_candidates="
+              << num_candidates << std::endl;);
+          const Site_2 * test_site_ptr;
+          if (num_candidates == 1) {
+            test_site_ptr = (is_a_cand) ? a : b;
+            retval = - oriented_side_of_line(lp, test_site_ptr->point());
+          } else if (num_candidates == 2) {
+            Comparison_result testab = CGAL::compare(distpa, distpb);
+            if (testab != EQUAL) {
+              test_site_ptr = (testab == SMALLER) ? a : b;
+              retval = - oriented_side_of_line(lp, test_site_ptr->point());
+            }
+          } // end of case of num_candidates == 2
+        } // end of case of num_pts == 2
+      } // end of case ON_ORIENTED_BOUNDARY
+    } // end of case of at least a point and non-hv seg s
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: Oriented_side_C2 (s1,s2,s3,s,p)= ("
+        << s1 << ") (" << s2 << ") (" << s3 << ") ("
+        << s << ") (" << p << ") "
+        << "tiebreaker returns " << retval
+        << std::endl;);
+
+    return retval;
+  }
+
+  // computes the oriented side of the Voronoi vertex of s1, s2, inf
+  // wrt the line that passes through the point p and its direction
+  // is the direction of the supporting line of s, rotated by 90
+  // degrees counterclockwise.
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s, const Site_2& p) const
+  {
+    CGAL_precondition( s.is_segment() && p.is_point() );
+
+    Line_2 lseg = compute_supporting_line( s.supporting_site() );
+    Line_2 lp = compute_linf_perpendicular(lseg, p.point());
+    bool has_lseg_neg_slope;
+
+    // Voronoi_vertex_2 v(s1, s2, inf);
+    // compute linf projection of v(s1, s2, inf) on segment s,
+    // which will be the test point for the orientation test
+
+    Point_2 testpnt;
+
+    bool is_s1_segment = s1.is_segment();
+    bool is_s2_segment = s2.is_segment();
+
+    CGAL_assertion(
+        (is_s1_segment && (same_segments(s, s1) ||
+                            same_segments(s, s1.supporting_site())))
+        ||
+        (is_s2_segment && (same_segments(s, s2) ||
+                            same_segments(s, s2.supporting_site()))));
+
+    bool are_both_segments = is_s1_segment && is_s2_segment;
+
+    // boolean variable of:
+    // point in {s1,s2} being endpoint of the segment in {s1,s2}
+    bool are_endp_s1s2 =
+           (is_s1_segment &&
+            ( same_points(s2, s1.source_site()) ||
+              same_points(s2, s1.target_site())   ) )
+           ||
+           (is_s2_segment &&
+            ( same_points(s1, s2.source_site()) ||
+              same_points(s1, s2.target_site())   ) )  ;
+
+    if (are_both_segments) {
+      // the two segments must have a common endpoint,
+      // which is the linf projection
+
+      CGAL_assertion( is_site_h_or_v(s1) || is_site_h_or_v(s2) );
+
+      if (same_points(s1.source_site(), s2.source_site()) ||
+          same_points(s1.source_site(), s2.target_site())   ) {
+        testpnt = s1.source_site().point();
+      } else {
+        CGAL_assertion(
+          same_points(s1.target_site(), s2.source_site()) ||
+          same_points(s1.target_site(), s2.target_site())   );
+        testpnt = s1.target_site().point();
+      }
+
+    } else {
+      // here, there is a point and a segment in {s1, s2}
+
+      if ( are_endp_s1s2 )
+      { // here the point in {s1,s2}
+        // is endpoint of the segment in {s1,s2}
+        if (is_s1_segment) {
+          testpnt = s2.point();
+        } else {
+          CGAL_assertion(is_s2_segment);
+          testpnt = s1.point();
+        }
+      } // end of case: point is endpoint of segment
+      else {
+        // here, the point is not endpoint of the segment
+
+        CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
+              << s1 << ") (" << s2 << ") ("
+              << s << ") (" << p << ") "
+              << "case of s1/s2 no endpoint relation"
+              << std::endl;);
+
+        CGAL_assertion( ! is_site_h_or_v(s) );
+
+        has_lseg_neg_slope =
+          CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
+
+        if (has_lseg_neg_slope) {
+          if (is_s1_segment) {
+            testpnt =
+              compute_horizontal_projection(lseg, s2.point());
+          } else {
+            testpnt =
+              compute_vertical_projection(lseg, s1.point());
+          }
+        } else {
+          // here, segment has positive slope
+          if (is_s1_segment) {
+            testpnt =
+              compute_vertical_projection(lseg, s2.point());
+          } else {
+            testpnt =
+              compute_horizontal_projection(lseg, s1.point());
+          }
+        } // end of case: seg has positive slope
+      } // end of case: point is not endpoint of segment
+
+    } // end of case: a point and a segment in {s1, s2}
+
+
+    Oriented_side retval =
+      oriented_side_of_line(lp, testpnt);
+
+    CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
+              << s1 << ") (" << s2 << ") ("
+              << s << ") (" << p << ") "
+              << "returns " << retval
+              << std::endl;);
+
+    return retval;
+  }
+
+  // tie breaker for infinite vertex
+  Oriented_side operator()(const Site_2& s1, const Site_2& s2,
+			   const Site_2& s, const Site_2& p,
+                           const Point_2 & pt) const
+  {
+    CGAL_precondition( s.is_segment() && p.is_point() );
+    CGAL_USE(pt);
+
+    Line_2 lseg = compute_supporting_line( s.supporting_site() );
+    Line_2 lp = compute_linf_perpendicular(lseg, p.point());
+
+    // Voronoi_vertex_2 v(s1, s2, inf);
+    // compute linf projection of v(s1, s2, inf) on segment s,
+    // which will be the test point for the orientation test
+
+    Point_2 testpnt;
+
+    bool is_s1_segment = s1.is_segment();
+    bool is_s2_segment = s2.is_segment();
+
+    CGAL_assertion(
+        (is_s1_segment && (same_segments(s, s1) ||
+                            same_segments(s, s1.supporting_site())))
+        ||
+        (is_s2_segment && (same_segments(s, s2) ||
+                            same_segments(s, s2.supporting_site()))));
+
+    bool are_both_segments = is_s1_segment && is_s2_segment;
+
+    // boolean variable of:
+    // point in {s1,s2} being endpoint of the segment in {s1,s2}
+    bool are_endp_s1s2 =
+           (is_s1_segment &&
+            ( same_points(s2, s1.source_site()) ||
+              same_points(s2, s1.target_site())   ) )
+           ||
+           (is_s2_segment &&
+            ( same_points(s1, s2.source_site()) ||
+              same_points(s1, s2.target_site())   ) )  ;
+
+    if (are_both_segments) {
+      // the two segments must have a common endpoint,
+      // which is the linf projection
+
+      CGAL_assertion( is_site_h_or_v(s1) || is_site_h_or_v(s2) );
+
+      if (same_points(s1.source_site(), s2.source_site()) ||
+          same_points(s1.source_site(), s2.target_site())   ) {
+        testpnt = s1.source_site().point();
+      } else {
+        CGAL_assertion(
+          same_points(s1.target_site(), s2.source_site()) ||
+          same_points(s1.target_site(), s2.target_site())   );
+        testpnt = s1.target_site().point();
+      }
+
+    } else {
+      // here, there is a point and a segment in {s1, s2}
+
+      if ( are_endp_s1s2 )
+      { // here the point in {s1,s2}
+        // is endpoint of the segment in {s1,s2}
+        if (is_s1_segment) {
+          testpnt = s2.point();
+        } else {
+          CGAL_assertion(is_s2_segment);
+          testpnt = s1.point();
+        }
+      } // end of case: point is endpoint of segment
+      else {
+        // here, the point is not endpoint of the segment
+
+        CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
+              << s1 << ") (" << s2 << ") ("
+              << s << ") (" << p << ") "
+              << "case of s1/s2 no endpoint relation"
+              << std::endl;);
+
+        CGAL_assertion( ! is_site_h_or_v(s) );
+
+        bool has_lseg_neg_slope =
+          CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
+
+        if (has_lseg_neg_slope) {
+          if (is_s1_segment) {
+            testpnt =
+              compute_horizontal_projection(lseg, s2.point());
+          } else {
+            testpnt =
+              compute_vertical_projection(lseg, s1.point());
+          }
+        } else {
+          // here, segment has positive slope
+          if (is_s1_segment) {
+            testpnt =
+              compute_vertical_projection(lseg, s2.point());
+          } else {
+            testpnt =
+              compute_horizontal_projection(lseg, s1.point());
+          }
+        } // end of case: seg has positive slope
+      } // end of case: point is not endpoint of segment
+
+    } // end of case: a point and a segment in {s1, s2}
+
+
+    Oriented_side retval =
+      oriented_side_of_line(lp, testpnt);
+
+    if (retval == ON_ORIENTED_BOUNDARY) {
+      // philaris: tocheck this later
+      CGAL_assertion(! are_both_segments);
+      // philaris: tocheck this later
+      CGAL_assertion(! are_endp_s1s2);
+
+      CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
+              << s1 << ") (" << s2 << ") ("
+              << s << ") (" << p << ") "
+              << "trying to fix ZERO"
+              << std::endl;);
+      if (is_s1_segment) {
+        testpnt = s2.point();
+      } else {
+        testpnt = s1.point();
+      }
+      retval = - oriented_side_of_line(lp, testpnt);
+    }
+
+
+    CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
+              << s1 << ") (" << s2 << ") ("
+              << s << ") (" << p << ") "
+              << "tiebreaker returns " << retval
+              << std::endl;);
+
+    return retval;
+  }
+
+
+private:
+
+  inline
+  bool test_candidate(const Site_2& c, const Site_2& p,
+                      const Voronoi_vertex_2& v, FT& distpc)
+    const
+  {
+    if (c.is_segment()) return false;
+    // here c is point
+    if (scmpx(p, c) == EQUAL) {
+      distpc = CGAL::abs(p.point().y() - c.point().y());
+      FT squareside = FT(2)*CGAL::abs(p.point().y() - v.point().y());
+      if (CGAL::compare(distpc, squareside) == SMALLER) {
+        return true;
+      }
+    } else if (scmpy(p, c) == EQUAL) {
+      distpc = CGAL::abs(p.point().x() - c.point().x());
+      FT squareside = FT(2)*CGAL::abs(p.point().x() - v.point().x());
+      if (CGAL::compare(distpc, squareside) == SMALLER) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+};
+
+
+//-----------------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h
new file mode 100644
index 0000000..5b3a0e0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h
@@ -0,0 +1,357 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_OF_BISECTOR_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_OF_BISECTOR_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//------------------------------------------------------------------------
+//------------------------------------------------------------------------
+
+template<class K, class Method_tag>
+class Oriented_side_of_bisector_C2
+  : public Basic_predicates_C2<K>
+{
+private:
+  typedef Basic_predicates_C2<K>             Base;
+  typedef typename Base::Line_2              Line_2;
+  typedef typename Base::RT                  RT;
+  typedef typename Base::FT                  FT;
+  typedef typename Base::Comparison_result   Comparison_result;
+  typedef typename Base::Sign                Sign;
+  typedef typename Base::Orientation         Orientation;
+  typedef typename Base::Homogeneous_point_2 Homogeneous_point_2;
+
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+
+private:
+  Are_same_points_2    same_points;
+  Are_same_segments_2  same_segments;
+
+public:
+  typedef typename Base::Oriented_side      Oriented_side;
+  typedef typename Base::Site_2             Site_2;
+  typedef typename Base::Point_2            Point_2;
+  typedef typename Base::Segment_2          Segment_2;
+
+  using Base::compute_supporting_line;
+  using Base::compute_linf_perpendicular;
+  using Base::compute_linf_projection_hom;
+  using Base::opposite_line;
+  using Base::oriented_side_of_line;
+  using Base::compute_linf_distance;
+  using Base::compare_distance_to_point_linf;
+
+private:
+  bool is_endpoint(const Site_2& p, const Site_2& s) const
+  {
+    CGAL_precondition( p.is_point() && s.is_segment() );
+    return
+      same_points(p, s.source_site()) || same_points(p, s.target_site());
+  }
+
+  bool is_degenerate(const Site_2& s) const
+  {
+    CGAL_precondition( s.is_segment() );
+    return same_points( s.source_site(), s.target_site() );
+  }
+
+  //-----------------------------------------------------------------
+
+  Comparison_result
+  compare_distances_pp(const Site_2& p1, const Site_2& p2,
+		       const Site_2& q) const
+  {
+    CGAL_precondition( p1.is_point() && p2.is_point() );
+    CGAL_precondition( !same_points(p1,p2) );
+
+    if ( same_points(q, p1) ) { return SMALLER; }
+    if ( same_points(q, p2) ) { return LARGER; }
+
+    //CGAL_SDG_DEBUG(std::cout << "debug compare_distances_pp" << std::endl;);
+
+    return
+      compare_distance_to_point_linf(q.point(), p1.point(), p2.point());
+  }
+
+  //-----------------------------------------------------------------
+
+  Comparison_result
+  compare_distances_sp(const Site_2& s, const Site_2& p,
+		       const Site_2& q) const
+  {
+
+    //CGAL_SDG_DEBUG(std::cout << "debug compare_distances_sp entering "
+    //  << "(s =" << s << ") p=(" << p << ") q=(" << q << ")"
+    //  << std::endl;);
+
+    CGAL_precondition( s.is_segment() && p.is_point() );
+    CGAL_precondition( !is_degenerate(s) );
+
+    if ( same_points(q, p) ) { return LARGER; }
+    if ( same_points(q, s.source_site()) ) { return SMALLER; }
+    if ( same_points(q, s.target_site()) ) { return SMALLER; }
+
+
+    const bool is_src = same_points(p, s.source_site());
+    const bool is_trg = same_points(p, s.target_site());
+
+    if ( is_src || is_trg ) {
+      Line_2 ls = compute_supporting_line(s.supporting_site());
+      Line_2 lp = compute_linf_perpendicular(ls, p.point());
+
+      if ( is_trg ) {
+	lp = opposite_line(lp);
+      }
+
+      const Oriented_side os = oriented_side_of_line(lp, q.point());
+
+      CGAL_SDG_DEBUG(std::cout << "debug compare_distances_sp "
+          << " is_src=" << is_src << " is_trg=" << is_trg
+          << " has os=" << os << std::endl;);
+
+      if ( os == ON_POSITIVE_SIDE ) {
+	return LARGER;
+      } else if ( os == ON_NEGATIVE_SIDE) {
+	return SMALLER;
+      } else {
+        // philaris: here, point is closer, not interior of segment
+        //return LARGER;
+        return EQUAL;
+      }
+    }
+
+    const Point_2 pp = p.point(), qq = q.point();
+    const Line_2 ls = compute_supporting_line(s.supporting_site());
+
+    const Point_2 ssrc = s.source();
+    const Line_2 lsrc = compute_linf_perpendicular(ls, ssrc);
+    const Oriented_side os_src = oriented_side_of_line(lsrc, qq);
+    if ( os_src != ON_NEGATIVE_SIDE ) {
+      return compare_distance_to_point_linf(qq, ssrc, pp);
+    }
+
+    const Point_2 strg = s.target();
+    const Line_2 ltrg = compute_linf_perpendicular(ls, strg);
+    const Oriented_side os_trg = oriented_side_of_line(ltrg, qq);
+    if ( os_trg != ON_POSITIVE_SIDE ) {
+      return compare_distance_to_point_linf(qq, strg, pp);
+    }
+
+    const RT d2_p = compute_linf_distance(pp, qq);
+    const std::pair<RT,RT> d2_s = compute_linf_distance(qq, ls);
+    return CGAL::compare(d2_s.first, d2_p * d2_s.second);
+  }
+
+  //-----------------------------------------------------------------
+
+  Comparison_result
+  compare_distances_ss(const Site_2& s1, const Site_2& s2,
+		       const Site_2& q) const
+  {
+    CGAL_precondition( s1.is_segment() && s2.is_segment() );
+    CGAL_precondition( !is_degenerate(s1) );
+    CGAL_precondition( !is_degenerate(s2) );
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare_distances_ss "
+        << "entering with s1=" << s1 << " s2=" << s2
+        << " q=" << q << std::endl;);
+
+    const bool is_on_s1 = is_endpoint(q, s1);
+    const bool is_on_s2 = is_endpoint(q, s2);
+
+    if ( is_on_s1 && is_on_s2 ) {
+      return EQUAL;
+    } else if ( is_on_s1 && !is_on_s2 ) {
+      return SMALLER;
+    } else if ( !is_on_s1 && is_on_s2 ) {
+      return LARGER;
+    }
+
+    if ( same_segments(s1, s2) ) {
+      return EQUAL;
+    }
+
+    const Point_2 qq = q.point();
+
+    const Point_2 ssrc1 = s1.source(), strg1 = s1.target();
+
+    const Line_2 ls1 = compute_supporting_line(s1.supporting_site());
+    const Line_2 lsrc1 = compute_linf_perpendicular(ls1, ssrc1);
+    const Line_2 ltrg1 = compute_linf_perpendicular(ls1, strg1);
+
+    const Point_2 ssrc2 = s2.source(), strg2 = s2.target();
+
+    const Line_2 ls2 = compute_supporting_line(s2.supporting_site());
+    const Line_2 lsrc2 = compute_linf_perpendicular(ls2, ssrc2);
+    const Line_2 ltrg2 = compute_linf_perpendicular(ls2, strg2);
+
+    // idx1 and idx2 indicate if q is to the left (source endpoint
+    // side), the right side (target endpoint side) or inside
+    // the band of s1 and s2 respectively; if q is on the boundary of
+    // the band we assign it to the adjacent halfplane; for left
+    // halfplane the value is -1; for the band the value is 0; for the
+    // right halfplane the value is 1.
+    int idx1(0), idx2(0);
+
+    const Oriented_side os_src1 = oriented_side_of_line(lsrc1, qq);
+    Oriented_side os_trg1;
+    if ( os_src1 != ON_NEGATIVE_SIDE ) {
+      idx1 = -1;
+      os_trg1 = ON_POSITIVE_SIDE;
+    } else {
+      os_trg1 = oriented_side_of_line(ltrg1, qq);
+      if ( os_trg1 != ON_POSITIVE_SIDE ) {
+	idx1 = 1;
+      }
+    }
+
+    const Oriented_side os_src2 = oriented_side_of_line(lsrc2, qq);
+    Oriented_side os_trg2;
+    if ( os_src2 != ON_NEGATIVE_SIDE ) {
+      idx2 = -1;
+      os_trg2 = ON_POSITIVE_SIDE;
+    } else {
+      os_trg2 = oriented_side_of_line(ltrg2, qq);
+      if ( os_trg2 != ON_POSITIVE_SIDE ) {
+	idx2 = 1;
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare_distances_ss "
+        << " os_src1=" << os_src1 << " os_trg1=" << os_trg1
+        << " os_src2=" << os_src2 << " os_trg2=" << os_trg2 << std::endl;);
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare_distances_ss "
+        << " idx=" << idx1 << " idx2=" << idx2 << std::endl;);
+
+    CGAL_assertion( idx1 >= -1 && idx1 <= 1 );
+    CGAL_assertion( idx2 >= -1 && idx2 <= 1 );
+
+    if ( idx1 == -1 ) {
+      if ( idx2 == -1 ) {
+	if ( same_points(s1.source_site(), s2.source_site()) ) {
+	  return EQUAL;
+	}
+	return compare_distance_to_point_linf(qq, ssrc1, ssrc2);
+      } else if ( idx2 == 1 ) {
+	if ( same_points(s1.source_site(), s2.target_site()) ) {
+	  return EQUAL;
+	}
+	return compare_distance_to_point_linf(qq, ssrc1, strg2);
+      } else {
+        const RT d2_s1 = compute_linf_distance(ssrc1, qq);
+        const std::pair<RT,RT> d2_s2 = compute_linf_distance(qq, ls2);
+        return CGAL::compare(d2_s1 * d2_s2.second, d2_s2.first);
+      }
+    } else if ( idx1 == 1 ) {
+      if ( idx2 == -1 ) {
+	if ( same_points(s1.target_site(), s2.source_site()) ) {
+	  return EQUAL;
+	}
+	return compare_distance_to_point_linf(qq, strg1, ssrc2);
+      } else if ( idx2 == 1 ) {
+	if ( same_points(s1.target_site(), s2.target_site()) ) {
+	  return EQUAL;
+	}
+	return compare_distance_to_point_linf(qq, strg1, strg2);
+      } else {
+        // here closest2 is inside segment s2
+        const RT d2_s1 = compute_linf_distance(strg1, qq);
+        const std::pair<RT,RT> d2_s2 = compute_linf_distance(qq, ls2);
+        return CGAL::compare(d2_s1 * d2_s2.second, d2_s2.first);
+      }
+    } else {
+      // here closest1 is inside segment s1
+      CGAL_assertion( idx1 == 0 );
+      const std::pair<RT,RT> d2_s1 = compute_linf_distance(qq, ls1);
+      if ( idx2 == -1 ) {
+        if (is_endpoint(s2.source_site(), s1)) { return SMALLER; }
+        const RT d2_s2 = compute_linf_distance(qq, ssrc2);
+        return CGAL::compare(d2_s1.first, d2_s2 * d2_s1.second);
+      } else if ( idx2 == 1 ) {
+        if (is_endpoint(s2.target_site(), s1)) { return SMALLER; }
+        const RT d2_s2 = compute_linf_distance(qq, strg2);
+        return CGAL::compare(d2_s1.first, d2_s2 * d2_s1.second);
+      } else {
+        CGAL_assertion( idx2 == 0 );
+        const std::pair<RT,RT> d2_s2 = compute_linf_distance(qq, ls2);
+        return CGAL::compare(d2_s1.first * d2_s2.second,
+                             d2_s2.first * d2_s1.second);
+      }
+    }
+  }
+
+  //-----------------------------------------------------------------
+  //-----------------------------------------------------------------
+
+  Oriented_side
+  compare_distances(const Site_2& t1, const Site_2& t2,
+		    const Site_2& q) const
+  {
+    Comparison_result r;
+
+    if ( t1.is_point() && t2.is_point() ) {
+      r = compare_distances_pp(t1, t2, q);
+      //CGAL_SDG_DEBUG(std::cout << "debug compare_distances pp result"
+      //          << " t1=" << t1 << " t2=" << t2
+      //          << " q=" << q << "  res=" << r << std::endl;);
+    } else if ( t1.is_segment() && t2.is_point() ) {
+      r = compare_distances_sp(t1, t2, q);
+      //CGAL_SDG_DEBUG(std::cout << "debug compare_distances sp result"
+      //          << " t1=" << t1 << " t2=" << t2
+      //          << " q=" << q << "  res=" << r << std::endl;);
+    } else if ( t1.is_point() && t2.is_segment() ) {
+      r = opposite( compare_distances_sp(t2, t1, q) );
+    } else {
+      r = compare_distances_ss(t1, t2, q);
+    }
+
+    return -r;
+  }
+
+public:
+  typedef Oriented_side              result_type;
+  typedef Site_2                     argument_type;
+
+
+  Oriented_side
+  operator()(const Site_2& t1, const Site_2& t2, const Site_2& q) const
+  {
+    CGAL_precondition( q.is_point() );
+    return compare_distances(t1, t2, q);
+  }
+};
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_ORIENTED_SIDE_OF_BISECTOR_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h
new file mode 100644
index 0000000..36dbfaf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_x_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_y_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Orientation_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h>
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h
new file mode 100644
index 0000000..52a5560
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h
@@ -0,0 +1,768 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+namespace CGAL {
+
+// print face in standard output
+template<class Gt, class ST, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::
+face_output(const char *before, Face_handle f,
+	    const char *after) const
+{
+  std::cout << before;
+  if (is_infinite(f->vertex(0))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << f->vertex(0)->site();
+  }
+  if (is_infinite(f->vertex(1))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << f->vertex(1)->site();
+  }
+  if (is_infinite(f->vertex(2))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << f->vertex(2)->site();
+  }
+  std::cout << after;
+}
+
+
+//--------------------------------------------------------------------
+// insertion of a point that lies on a segment
+//--------------------------------------------------------------------
+
+// tiebreak with face oriented side
+template<class Gt, class ST, class D_S, class LTag>
+Oriented_side
+Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::
+oriented_side_face_tiebreak(
+    Face_handle f, const Vertex_handle& v, const Site_2 & sitev,
+    const Site_2 & sitev_supp, const Site_2 & t) const
+{
+  Oriented_side os;
+  if ( is_infinite(f) ) {
+    int id_v = f->index(v);
+    int cw_v = this->cw( id_v );
+    int ccw_v = this->ccw( id_v );
+
+    Site_2 sv_ep;
+    if ( is_infinite( f->vertex(cw_v) ) ) {
+      CGAL_assertion(  !is_infinite( f->vertex(ccw_v) )  );
+      CGAL_assertion( f->vertex(ccw_v)->site().is_point() );
+      sv_ep = f->vertex(ccw_v)->site();
+      CGAL_SDG_DEBUG( std::cout <<
+          "debug sv_ep = " << sv_ep << std::endl;
+          );
+      os = oriented_side(sitev, sv_ep, sitev_supp, t, t.point());
+    } else {
+      CGAL_assertion(  !is_infinite( f->vertex( cw_v) )  );
+      CGAL_assertion( f->vertex( cw_v)->site().is_point() );
+      sv_ep = f->vertex( cw_v)->site();
+      CGAL_SDG_DEBUG( std::cout <<
+          "debug sv_ep = " << sv_ep << std::endl;
+          );
+      os = oriented_side(sv_ep, sitev, sitev_supp, t, t.point());
+    }
+  } else {
+    os = oriented_side(f->vertex(0)->site(),
+        f->vertex(1)->site(),
+        f->vertex(2)->site(),
+        sitev_supp, t, t.point());
+  }
+  return os;
+}
+
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::Face_pair
+Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::
+find_faces_to_split(const Vertex_handle& v, const Site_2& t,
+    unsigned int & flips_nop,
+    unsigned int & flips_pon) const
+{
+  CGAL_precondition( v->is_segment() );
+
+  CGAL_SDG_DEBUG(std::cout << "debug: impl find_faces_to_split enters "
+      << "with v=" << v->site() << " t=" << t << std::endl; );
+
+#ifndef CGAL_NO_ASSERTIONS
+  {
+    // count number of adjacent infinite faces
+    Face_circulator fc = incident_faces(v);
+    Face_circulator fc_start = fc;
+    int n_inf = 0;
+    int n_faces = 0;
+    do {
+      if ( is_infinite(fc) ) { n_inf++; }
+      fc++;
+      n_faces++;
+    } while ( fc != fc_start );
+
+    CGAL_SDG_DEBUG( std::cout
+        << "debug: impl find_faces_to_split: n_faces="
+        << n_faces << std::endl; );
+    CGAL_SDG_DEBUG( std::cout
+        << "debug: impl find_faces_to_split: n_inf="
+        << n_inf << std::endl; );
+
+    // philaris: the (n_inf in {0,2,4}) assertion is very
+    // specific to L2; it seems that in general, this should
+    // be an even number (for Linf, at least)
+    //CGAL_assertion( n_inf == 0 || n_inf == 2 || n_inf == 4 );
+
+    // philaris: tocheck
+    CGAL_assertion( n_inf % 2 == 0 );
+  }
+#endif
+
+  Face_circulator fc1 = incident_faces(v);
+  Face_circulator fc2 = fc1; ++fc2;
+  Face_circulator fc_start = fc1;
+  Face_handle f1, f2;
+  bool found_f1 = false, found_f2 = false;
+  bool os0_fc_start = false;
+  bool first_found_f1 = false;
+  CGAL_assertion_code( bool first_found_f2 = false; );
+  Face_handle f0_no, f0_op, f0_po, f0_on;
+
+#ifndef CGAL_NO_ASSERTIONS
+  bool is_nop(false);
+  bool is_pon(false);
+
+  bool is_set_f0_on(false);
+  bool is_set_f0_op(false);
+  bool is_set_f0_no(false);
+  bool is_set_f0_po(false);
+#endif
+
+  bool connect_all_nop(false);
+  bool connect_all_pon(false);
+
+  unsigned int count_nop_zeros(0);
+  unsigned int count_pon_zeros(0);
+  unsigned int count_zeros(0);
+
+  Site_2 sitev = v->site();
+  Site_2 sitev_supp = v->site().supporting_site();
+
+  CGAL_SDG_DEBUG( std::cout
+      << "debug: impl find_faces_to_split: vsite="
+      << v->site() << " with supporting site="
+      << v->site().supporting_site() << std::endl; );
+
+  do {
+
+    CGAL_SDG_DEBUG(std::cout << "debug impl start (found_f1 found_f2)= "
+                   << found_f1 << " " << found_f2 << std::endl;);
+
+    Face_handle ff1(fc1), ff2(fc2);
+    Oriented_side os1, os2;
+
+#ifdef CGAL_SDG_VERBOSE
+    face_output("debug ff1=[", ff1, "]\n");
+    face_output("debug ff2=[", ff2, "]\n");
+#endif
+
+    if ( is_infinite(ff1) ) {
+      int id_v = ff1->index(v);
+      int cw_v = this->cw( id_v );
+      int ccw_v = this->ccw( id_v );
+
+      Site_2 sv_ep;
+      if ( is_infinite( ff1->vertex(cw_v) ) ) {
+        CGAL_assertion(  !is_infinite( ff1->vertex(ccw_v) )  );
+        CGAL_assertion( ff1->vertex(ccw_v)->site().is_point() );
+        sv_ep = ff1->vertex(ccw_v)->site();
+        CGAL_SDG_DEBUG( std::cout <<
+            "debug sv_ep = " << sv_ep << std::endl;
+            );
+        os1 = oriented_side(sitev, sv_ep, sitev_supp, t);
+      } else {
+        CGAL_assertion(  !is_infinite( ff1->vertex( cw_v) )  );
+        CGAL_assertion( ff1->vertex( cw_v)->site().is_point() );
+        sv_ep = ff1->vertex( cw_v)->site();
+        CGAL_SDG_DEBUG( std::cout <<
+            "debug sv_ep = " << sv_ep << std::endl;
+            );
+        os1 = oriented_side(sv_ep, sitev, sitev_supp, t);
+      }
+    } else {
+      os1 = oriented_side(fc1->vertex(0)->site(),
+                          fc1->vertex(1)->site(),
+                          fc1->vertex(2)->site(),
+                          sitev_supp, t);
+    }
+
+    CGAL_SDG_DEBUG( std::cout <<
+        "debug os1 = " << os1 << std::endl; );
+
+    if ( is_infinite(ff2) ) {
+      int id_v = ff2->index(v);
+      int cw_v = this->cw( id_v );
+      int ccw_v = this->ccw( id_v );
+
+      Site_2 sv_ep;
+      if ( is_infinite( ff2->vertex(cw_v) ) ) {
+        CGAL_assertion(  !is_infinite( ff2->vertex(ccw_v) )  );
+        CGAL_assertion( ff2->vertex(ccw_v)->site().is_point() );
+        sv_ep = ff2->vertex(ccw_v)->site();
+        os2 = oriented_side(sitev, sv_ep, sitev_supp, t);
+      } else {
+        CGAL_assertion(  !is_infinite( ff2->vertex( cw_v) )  );
+        CGAL_assertion( ff2->vertex( cw_v)->site().is_point() );
+        sv_ep = ff2->vertex( cw_v)->site();
+        os2 = oriented_side(sv_ep, sitev, sitev_supp, t);
+      }
+    } else {
+      os2 = oriented_side(fc2->vertex(0)->site(),
+                          fc2->vertex(1)->site(),
+                          fc2->vertex(2)->site(),
+                          sitev_supp, t);
+    }
+
+    CGAL_SDG_DEBUG( std::cout <<
+        "debug os2 = " << os2 << std::endl; );
+
+#ifdef CGAL_SDG_VERBOSE
+    face_output("debug ff1=[", ff1, "] has os1=");
+    std::cout << os1 << std::endl;
+    face_output("debug ff2=[", ff2, "] has os2=");
+    std::cout << os2 << std::endl;
+#endif
+
+    if (os1 == ON_ORIENTED_BOUNDARY) {
+      ++count_zeros;
+      if (fc_start == fc1) {
+        CGAL_SDG_DEBUG(std::cout << "debug impl start face has os=0"
+            << std::endl;);
+        os0_fc_start = true;
+      }
+      if (os2 == ON_NEGATIVE_SIDE) {
+        CGAL_assertion(! is_set_f0_on);
+        CGAL_assertion_code( is_set_f0_on = true ) ;
+        f0_on = ff1;
+        CGAL_SDG_DEBUG(std::cout << "debug impl found f0_on "
+          << std::endl;);
+      } else if (os2 == ON_POSITIVE_SIDE) {
+        CGAL_assertion(! is_set_f0_op);
+        CGAL_assertion_code( is_set_f0_op = true ) ;
+        f0_op = ff1;
+        CGAL_SDG_DEBUG(std::cout << "debug impl found f0_op "
+          << std::endl;);
+      }
+    }
+
+    if ( !found_f1 &&
+         os1 != ON_POSITIVE_SIDE && os2 == ON_POSITIVE_SIDE ) {
+      f1 = ff2;
+      found_f1 = true;
+      count_nop_zeros = count_zeros;
+      count_zeros = 0;
+      CGAL_SDG_DEBUG(std::cout << "debug impl found_f1 set to true "
+          << "with os1=" << os1 << std::endl;);
+#ifndef CGAL_NO_ASSERTIONS
+      if (os1 == ON_ORIENTED_BOUNDARY) {
+        CGAL_assertion(! is_nop);
+        is_nop = true;
+      }
+#endif
+      if ( !found_f2 ) {
+        first_found_f1 = true;
+      }
+    }
+
+    // philaris: change to be more symmetric:
+    // before it was:
+    //   os1 == ON_POSITIVE_SIDE && os2 != ON_POSITIVE_SIDE
+    if ( !found_f2 &&
+	 os1 != ON_NEGATIVE_SIDE && os2 == ON_NEGATIVE_SIDE ) {
+      f2 = ff2;
+      found_f2 = true;
+      count_pon_zeros = count_zeros;
+      count_zeros = 0;
+      CGAL_SDG_DEBUG(std::cout << "debug impl found_f2 set to true "
+          << "with os1=" << os1 << std::endl;);
+#ifndef CGAL_NO_ASSERTIONS
+      if (os1 == ON_ORIENTED_BOUNDARY) {
+        CGAL_assertion(! is_pon);
+        is_pon = true;
+      }
+#endif
+      CGAL_assertion_code(
+      if ( !found_f1 ) {
+        first_found_f2 = true;
+      }
+      );
+    }
+
+    if (os2 == ON_ORIENTED_BOUNDARY) {
+      if (os1 == ON_NEGATIVE_SIDE) {
+        CGAL_assertion(! is_set_f0_no);
+        CGAL_assertion_code( is_set_f0_no = true );
+        f0_no = ff2;
+        CGAL_SDG_DEBUG(std::cout << "debug impl found f0_no "
+          << std::endl;);
+      } else if (os1 == ON_POSITIVE_SIDE) {
+        CGAL_assertion(! is_set_f0_po);
+        CGAL_assertion_code( is_set_f0_po = true );
+        f0_po = ff2;
+        CGAL_SDG_DEBUG(std::cout << "debug impl found f0_po "
+          << std::endl;);
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug impl end (found_f1 found_f2)= "
+                   << found_f1 << " " << found_f2 << std::endl;);
+
+    if ( found_f1 && found_f2 && (!os0_fc_start) ) { break; }
+
+    ++fc1, ++fc2;
+  } while ( fc_start != fc1 );
+
+  CGAL_SDG_DEBUG(std::cout << "debug after loop count_zeros="
+      << count_zeros << std::endl;);
+
+#ifndef CGAL_NO_ASSERTIONS
+  if (is_nop) {
+    CGAL_assertion( f1 != f0_op );
+    CGAL_assertion( f1 != f0_no );
+    CGAL_assertion( f2 != f0_no );
+    CGAL_assertion( f2 != f0_op );
+  }
+  if (is_pon) {
+    CGAL_assertion( f2 != f0_on );
+    CGAL_assertion( f2 != f0_po );
+    CGAL_assertion( f1 != f0_po );
+    CGAL_assertion( f1 != f0_on );
+  }
+  if (is_nop && is_pon) {
+    CGAL_assertion( f0_op != f0_on );
+    CGAL_assertion( f0_no != f0_po );
+  }
+#endif
+
+  // add missing counted zeros
+  if (count_zeros > 0) {
+    if (first_found_f1) {
+      count_nop_zeros = count_nop_zeros + count_zeros;
+    } else { // here first_found_f2
+      CGAL_assertion(first_found_f2);
+      count_pon_zeros = count_pon_zeros + count_zeros;
+    }
+  }
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug count_nop_zeros=" << count_nop_zeros << std::endl;
+  std::cout << "debug count_pon_zeros=" << count_pon_zeros << std::endl;
+#endif
+
+  Oriented_side os_f0_no(ON_ORIENTED_BOUNDARY);
+  Oriented_side os_f0_op(ON_ORIENTED_BOUNDARY);
+  if (count_nop_zeros > 0) {
+    os_f0_no = oriented_side_face_tiebreak(f0_no, v, sitev, sitev_supp, t);
+    if (count_nop_zeros > 1) {
+      os_f0_op = oriented_side_face_tiebreak(f0_op, v, sitev, sitev_supp, t);
+    } else {
+      os_f0_op = os_f0_no;
+    }
+    if (os_f0_op == ON_NEGATIVE_SIDE) {
+      // do nothing
+    } else if (os_f0_no == ON_POSITIVE_SIDE) {
+      CGAL_SDG_DEBUG(std::cerr << "debug f1 updated"
+          << std::endl;);
+      f1 = f0_no;
+    } else {
+      connect_all_nop = true;
+    }
+  }
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug os_f0_no=" << os_f0_no
+    << " os_f0_op=" << os_f0_op
+    << " connect_all_nop=" << connect_all_nop << std::endl;
+#endif
+
+  Oriented_side os_f0_po(ON_ORIENTED_BOUNDARY);
+  Oriented_side os_f0_on(ON_ORIENTED_BOUNDARY);
+  if (count_pon_zeros > 0) {
+    os_f0_po = oriented_side_face_tiebreak(f0_po, v, sitev, sitev_supp, t);
+    if (count_pon_zeros > 1) {
+      os_f0_on = oriented_side_face_tiebreak(f0_on, v, sitev, sitev_supp, t);
+    } else {
+      os_f0_on = os_f0_po;
+    }
+    if (os_f0_on == ON_POSITIVE_SIDE) {
+      // do nothing
+    } else if (os_f0_po == ON_NEGATIVE_SIDE) {
+      CGAL_SDG_DEBUG(std::cerr << "debug f2 updated"
+          << std::endl;);
+      f2 = f0_po;
+    } else {
+      connect_all_pon = true;
+    }
+  }
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug os_f0_po=" << os_f0_po
+    << " os_f0_on=" << os_f0_on
+    << " connect_all_pon=" << connect_all_pon << std::endl;
+#endif
+
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug find_faces_to_split results" << std::endl;
+  face_output("debug f1=[", f1, "]\n");
+  face_output("debug f2=[", f2, "]\n");
+  if (is_nop) {
+    face_output("debug f0_no=[", f0_no, "]\n");
+    face_output("debug f0_op=[", f0_op, "]\n");
+    std::cout << "debug f0_no, f0_op "
+      << ((f0_no == f0_op)? "equal" : "not equal") << std::endl;
+  } else {
+    std::cout << "debug f0_no=UNSET" << std::endl;
+    std::cout << "debug f0_op=UNSET" << std::endl;
+    std::cout << "debug f0_no, f0_op UNSET" << std::endl;
+  }
+  if (is_pon) {
+    face_output("debug f0_po=[", f0_po, "]\n");
+    face_output("debug f0_on=[", f0_on, "]\n");
+    std::cout << "debug f0_po, f0_on "
+      << ((f0_po == f0_on)? "equal" : "not equal") << std::endl;
+  } else {
+    std::cout << "debug f0_po=UNSET" << std::endl;
+    std::cout << "debug f0_on=UNSET" << std::endl;
+    std::cout << "debug f0_po, f0_on UNSET" << std::endl;
+  }
+#endif
+
+  CGAL_assertion( found_f1 && found_f2 );
+  CGAL_assertion( f1 != f2 );
+
+  CGAL_assertion( is_nop == is_set_f0_no );
+  CGAL_assertion( is_nop == is_set_f0_op );
+  CGAL_assertion( is_pon == is_set_f0_po );
+  CGAL_assertion( is_pon == is_set_f0_on );
+
+  CGAL_assertion( first_found_f1 || first_found_f2);
+  CGAL_assertion( ! (first_found_f1 && first_found_f2) );
+
+  CGAL_assertion((! connect_all_nop) || (count_nop_zeros > 0));
+  if (connect_all_nop) {
+    flips_nop = count_nop_zeros;
+  } else {
+    flips_nop = 0;
+  }
+
+  CGAL_assertion((! connect_all_pon) || (count_pon_zeros > 0));
+  if (connect_all_pon) {
+    flips_pon = count_pon_zeros;
+  } else {
+    flips_pon = 0;
+  }
+
+  return Face_pair(f1, f2);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::Vertex_triple
+Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::
+insert_exact_point_on_segment(const Storage_site_2& ss, const Site_2& t,
+			      Vertex_handle v)
+{
+  // splits the segment site v->site() in two and inserts represented by t
+  // on return the three vertices are, respectively, the vertex
+  // corresponding to t and the two subsegments of v->site()
+
+  CGAL_assertion( t.is_point() );
+  CGAL_assertion( t.is_input() );
+
+  unsigned int flips_nop, flips_pon;
+
+  Storage_site_2 ssitev = v->storage_site();
+
+  CGAL_assertion( ssitev.is_segment() );
+
+  Face_pair fpair = find_faces_to_split(v, t, flips_nop, flips_pon);
+
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug ins exact flips_nop=" << flips_nop
+    << " flips_pon=" << flips_pon
+    << std::endl;
+#endif
+
+  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
+    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
+
+  // now I need to update the sites for vertices v1 and v2
+  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
+  Storage_site_2 ssv1 = split_storage_site(ssitev, ss, true);
+  v1->set_site( ssv1 );
+
+  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
+  Storage_site_2 ssv2 = split_storage_site(ssitev, ss, false);
+  v2->set_site( ssv2 );
+
+  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
+
+  Face_handle otherf;
+  int f_i = -1;
+  if (flips_nop > 0) {
+    otherf = qqf->neighbor(qqf->index(v1));
+    f_i = this->_tds.mirror_index(qqf, qqf->index(v1));
+  }
+
+  Face_handle otherg;
+  int g_i = -1;
+  if (flips_pon > 0) {
+    Face_handle qqg = boost::tuples::get<3>(qq); //qq.fourth;
+    otherg = qqg->neighbor(qqg->index(v2));
+    g_i = this->_tds.mirror_index(qqg, qqg->index(v2));
+  }
+
+  Vertex_handle vsx =
+    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
+
+  if (flips_nop > 0) {
+    CGAL_assertion( f_i != -1 );
+#ifdef CGAL_SDG_VERBOSE
+    std::cout << "debug flip_nop>0 otherf=";
+    face_output("[", otherf, "]");
+    std::cout << " at f_i=" << f_i << std::endl;
+#endif
+    unsigned int remaining_nop = flips_nop;
+    Face_handle next_face = otherf;
+    int next_i = f_i;
+    while (remaining_nop > 0) {
+      const Face_handle current_face = next_face;
+      const int current_i = next_i;
+      if (remaining_nop > 1) {
+        next_face = current_face->neighbor(ccw(current_i));
+        next_i = this->_tds.mirror_index(current_face, ccw(current_i));
+      }
+#ifdef CGAL_SDG_VERBOSE
+      std::cout << "debug remaining_nop=" << remaining_nop;
+      face_output(" flip curf=[", current_face, "]");
+      std::cout << " at f_i=" << current_i << std::endl;
+#endif
+      this->_tds.flip(current_face, current_i);
+      --remaining_nop;
+    }
+  }
+
+  if (flips_pon > 0) {
+    CGAL_assertion( g_i != -1 );
+#ifdef CGAL_SDG_VERBOSE
+    std::cout << "debug flip otherg=";
+    face_output("[", otherg, "]");
+    std::cout << " at g_i=" << g_i << std::endl;
+#endif
+    unsigned int remaining_pon = flips_pon;
+    Face_handle next_face = otherg;
+    int next_i = g_i;
+    while (remaining_pon > 0) {
+      const Face_handle current_face = next_face;
+      const int current_i = next_i;
+      if (remaining_pon > 1) {
+        next_face = current_face->neighbor(ccw(current_i));
+        next_i = this->_tds.mirror_index(current_face, ccw(current_i));
+      }
+#ifdef CGAL_SDG_VERBOSE
+      std::cout << "debug remaining_pon=" << remaining_pon;
+      face_output(" flip curg=[", current_face, "]");
+      std::cout << " at g_i=" << current_i << std::endl;
+#endif
+      this->_tds.flip(current_face, current_i);
+      --remaining_pon;
+    }
+  }
+
+  vsx->set_site(ss);
+  // merge info of point and segment; the point lies on the segment
+  merge_info(vsx, ssitev);
+
+#ifndef CGAL_NO_ASSERTIONS
+  // check if vsx has exactly: 4 + flips_nop + flips_pon neighbors
+  {
+    // count number of adjacent faces of vsx
+    Face_circulator fc = incident_faces(vsx);
+    Face_circulator fc_start = fc;
+    unsigned int n_faces = 0;
+    do {
+      fc++;
+      n_faces++;
+    } while ( fc != fc_start );
+
+    CGAL_SDG_DEBUG( std::cout
+        << "debug: impl insert_exact_point_on_segment: n_faces="
+        << n_faces << std::endl; );
+    CGAL_assertion( n_faces == 4 + flips_nop + flips_pon );
+  }
+#endif
+
+  return Vertex_triple(vsx, v1, v2);
+}
+
+template<class Gt, class ST, class D_S, class LTag>
+typename Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::Vertex_triple
+Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag>::
+insert_point_on_segment(const Storage_site_2& ss, const Site_2& ,
+			Vertex_handle v, const Tag_true&)
+{
+  // splits the segment site v->site() in two and inserts the point of
+  // intersection of t and v->site()
+  // on return the three vertices are, respectively, the point of
+  // intersection and the two subsegments of v->site()
+
+  unsigned int flips_nop(0), flips_pon(0);
+
+  Storage_site_2 ssitev = v->storage_site();
+  Storage_site_2 ssx =
+    storage_traits().construct_storage_site_2_object()(ss, ssitev);
+
+  #ifdef CGAL_SDG_VERBOSE
+  Site_2 sitev = ssitev.site();
+  std::cout << "debug insert_point_on_segment intsec="
+    << ssx.site() << " v=" << sitev << std::endl ;
+  #endif
+  Face_pair fpair = find_faces_to_split(v, ssx.site(), flips_nop, flips_pon);
+
+#ifdef CGAL_SDG_VERBOSE
+  std::cout << "debug ins flips_nop=" << flips_nop
+    << " flips_pon=" << flips_pon
+    << std::endl;
+#endif
+
+  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
+    qq = this->_tds.split_vertex(v, fpair.first, fpair.second);
+
+  // now I need to update the sites for vertices v1 and v2
+  Vertex_handle v1 = boost::tuples::get<0>(qq); //qq.first;
+  Vertex_handle v2 = boost::tuples::get<1>(qq); //qq.second;
+
+  Storage_site_2 ssv1 =
+    storage_traits().construct_storage_site_2_object()(ssitev, ss, true);
+
+  Storage_site_2 ssv2 =
+    storage_traits().construct_storage_site_2_object()(ssitev, ss, false);
+
+  v1->set_site( ssv1 );
+  v2->set_site( ssv2 );
+
+  Face_handle qqf = boost::tuples::get<2>(qq); //qq.third;
+
+  Face_handle otherf;
+  int f_i = -1;
+  if (flips_nop > 0) {
+    otherf = qqf->neighbor(qqf->index(v1));
+    f_i = this->_tds.mirror_index(qqf, qqf->index(v1));
+  }
+
+  Face_handle otherg;
+  int g_i = -1;
+  if (flips_pon > 0) {
+    Face_handle qqg = boost::tuples::get<3>(qq); //qq.fourth;
+    otherg = qqg->neighbor(qqg->index(v2));
+    g_i = this->_tds.mirror_index(qqg, qqg->index(v2));
+  }
+
+  Vertex_handle vsx =
+    this->_tds.insert_in_edge(qqf, cw(qqf->index(v1)));
+
+  if (flips_nop > 0) {
+    CGAL_assertion( f_i != -1 );
+#ifdef CGAL_SDG_VERBOSE
+    std::cout << "debug flip_nop>0 otherf=";
+    face_output("[", otherf, "]");
+    std::cout << " at f_i=" << f_i << std::endl;
+#endif
+    unsigned int remaining_nop = flips_nop;
+    Face_handle next_face = otherf;
+    int next_i = f_i;
+    while (remaining_nop > 0) {
+      const Face_handle current_face = next_face;
+      const int current_i = next_i;
+      if (remaining_nop > 1) {
+        next_face = current_face->neighbor(ccw(current_i));
+        next_i = this->_tds.mirror_index(current_face, ccw(current_i));
+      }
+#ifdef CGAL_SDG_VERBOSE
+      std::cout << "debug remaining_nop=" << remaining_nop;
+      face_output(" flip curf=[", current_face, "]");
+      std::cout << " at f_i=" << current_i << std::endl;
+#endif
+      this->_tds.flip(current_face, current_i);
+      --remaining_nop;
+    }
+  }
+
+  if (flips_pon > 0) {
+    CGAL_assertion( g_i != -1 );
+#ifdef CGAL_SDG_VERBOSE
+    std::cout << "debug flip otherg=";
+    face_output("[", otherg, "]");
+    std::cout << " at g_i=" << g_i << std::endl;
+#endif
+    unsigned int remaining_pon = flips_pon;
+    Face_handle next_face = otherg;
+    int next_i = g_i;
+    while (remaining_pon > 0) {
+      const Face_handle current_face = next_face;
+      const int current_i = next_i;
+      if (remaining_pon > 1) {
+        next_face = current_face->neighbor(ccw(current_i));
+        next_i = this->_tds.mirror_index(current_face, ccw(current_i));
+      }
+#ifdef CGAL_SDG_VERBOSE
+      std::cout << "debug remaining_pon=" << remaining_pon;
+      face_output(" flip curg=[", current_face, "]");
+      std::cout << " at g_i=" << current_i << std::endl;
+#endif
+      this->_tds.flip(current_face, current_i);
+      --remaining_pon;
+    }
+  }
+
+  vsx->set_site(ssx);
+
+#ifndef CGAL_NO_ASSERTIONS
+  // check if vsx has exactly: 4 + flips_nop + flips_pon neighbors
+  {
+    // count number of adjacent faces of vsx
+    Face_circulator fc = incident_faces(vsx);
+    Face_circulator fc_start = fc;
+    unsigned int n_faces = 0;
+    do {
+      fc++;
+      n_faces++;
+    } while ( fc != fc_start );
+
+    CGAL_SDG_DEBUG( std::cout
+        << "debug: impl insert_point_on_segment: n_faces="
+        << n_faces << std::endl; );
+    CGAL_assertion( n_faces == 4 + flips_nop + flips_pon );
+  }
+#endif
+
+  return Vertex_triple(vsx, v1, v2);
+}
+
+} //namespace CGAL
+
+// EOF
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h
new file mode 100644
index 0000000..fc69d32
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h
@@ -0,0 +1,1219 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+// class implementation continued
+//=================================
+
+namespace CGAL {
+
+
+//===========================================================================
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  constructors
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+init_hierarchy(const Geom_traits& gt)
+{
+  hierarchy[0] = this; 
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i] = new Base(gt);
+  }
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+Segment_Delaunay_graph_Linf_hierarchy_2(const Gt& gt)
+  : Base(gt)
+{ 
+  init_hierarchy(gt);
+}
+
+
+// copy constructor duplicates vertices and faces
+template<class Gt, class ST, class STag, class D_S, class LTag>
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+Segment_Delaunay_graph_Linf_hierarchy_2
+(const Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
+    : Base(sdg.geom_traits())
+{ 
+  // create an empty triangulation to be able to delete it !
+  init_hierarchy(sdg.geom_traits());
+  copy(sdg);
+} 
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  destructor
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
+~Segment_Delaunay_graph_Linf_hierarchy_2()
+{
+  clear();
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i){ 
+    delete hierarchy[i];
+  }
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+// assignment operator
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag> &
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+operator=(const Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
+{
+  if ( this != &sdg ) {
+    copy(sdg);
+  }
+  return *this;
+}
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR INSERTION
+//====================================================================
+//====================================================================
+
+//--------------------------------------------------------------------
+// insertion of a point
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+std::pair<bool,int>
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_point(const Point_2& p, const Storage_site_2& ss, int level,
+	     Vertex_handle* vertices)
+{
+  CGAL_SDG_DEBUG(std::cout << "debug hier insert_point " << p << " at level "
+                 << level << std::endl;);
+
+  CGAL_precondition( level != UNDEFINED_LEVEL );
+
+  int new_level = level;
+
+  bool lies_on_seg = false;
+
+  Vertex_handle vertex;
+  Vertex_handle vs1, vs2;
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  Site_2 t = Site_2::construct_site_2(p);
+
+  nearest_neighbor(t, vnear, false);
+
+  size_type n = hierarchy[0]->number_of_vertices();
+  if ( n > 2 ) {
+    Arrangement_type at_res = this->arrangement_type(t, vnear[0]);
+
+    CGAL_assertion( at_res == AT2::DISJOINT ||
+		    at_res == AT2::INTERIOR ||
+		    at_res == AT2::IDENTICAL );
+
+    if ( vnear[0]->is_point() ) {
+      CGAL_SDG_DEBUG(std::cout << "debug hier insert_point nearest is point"
+                     << std::endl;);
+      if ( at_res == AT2::IDENTICAL ) {
+	vertex = vnear[0];
+	merge_info(vertex, ss);
+      } else {
+	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
+      }
+    } else { // nearest neighbor is a segment
+      CGAL_assertion( vnear[0]->is_segment() );
+      CGAL_assertion( at_res == AT2::DISJOINT ||
+		      at_res == AT2::INTERIOR );
+
+      if ( at_res == AT2::INTERIOR ) {
+	CGAL_assertion( t.is_input() );
+	lies_on_seg = true;
+
+	int vnear_level = find_level(vnear[0]);
+
+	// I need to find the level of the nearest neighbor that t
+	// lies on and update the level of t
+	if ( new_level < vnear_level ) {
+	  new_level = vnear_level;
+	}
+
+	Vertex_triple vt =
+	  hierarchy[0]->insert_exact_point_on_segment(ss, t, vnear[0]);
+	vertex = vt.first;
+	vs1 = vt.second;
+	vs2 = vt.third;
+      } else {
+	vertex = hierarchy[0]->insert_point2(ss, t, vnear[0]);
+      }
+    }
+  } else if ( n == 0 ) {
+    vertex = hierarchy[0]->insert_first(ss, p);
+  } else if ( n == 1 ) {
+    vertex = hierarchy[0]->insert_second(ss, p);
+  } else if ( n == 2 ) {
+    vertex = hierarchy[0]->insert_third(ss, p);
+  }
+
+  CGAL_assertion( vertex != Vertex_handle() );
+
+  if ( vertices != NULL ) { vertices[0] = vertex; }
+
+  // insert at other levels
+  Vertex_handle previous = vertex;
+  Vertex_handle vs1_prev = vs1;
+  Vertex_handle vs2_prev = vs2;
+
+  //  Storage_site_2 ss = vertex->storage_site();
+
+  int k = 1;
+  while ( k <= new_level ) {
+    size_type nv = hierarchy[k]->number_of_vertices();
+    if ( nv > 2 ) {
+      if ( nv < sdg_hierarchy_2__minsize ) {
+	CGAL_assertion( vnear[k] == Vertex_handle() );
+	vnear[k] = hierarchy[k]->nearest_neighbor(p);
+      }
+      Arrangement_type at_res = this->arrangement_type(t, vnear[k]->site());
+      if ( at_res == AT2::INTERIOR ) {
+	Vertex_triple vt =
+	  hierarchy[k]->insert_exact_point_on_segment(ss, t, vnear[k]);
+	vertex = vt.first;
+	vs1 = vt.second;
+	vs2 = vt.third;
+
+	CGAL_assertion( (same_segments(vs1_prev->site(), vs1->site()) &&
+			 same_segments(vs2_prev->site(), vs2->site())) ||
+			(same_segments(vs1_prev->site(), vs2->site()) &&
+			 same_segments(vs2_prev->site(), vs1->site())) );
+	if ( same_segments(vs1_prev->site(), vs1->site()) ) {
+	  vs1->set_down(vs1_prev);
+	  vs1_prev->set_up(vs1);
+	  vs1_prev = vs1;
+
+	  vs2->set_down(vs2_prev);
+	  vs2_prev->set_up(vs2);
+	  vs2_prev = vs2;
+	} else {
+	  vs1->set_down(vs2_prev);
+	  vs2_prev->set_up(vs1);
+	  vs2_prev = vs1;
+
+	  vs2->set_down(vs1_prev);
+	  vs1_prev->set_up(vs2);
+	  vs1_prev = vs2;
+	}
+      } else {
+	vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);	
+      }
+    } else if ( nv == 2 ) {
+      vertex = hierarchy[k]->insert_third(t, ss);
+    } else { // nv == 0 || nv == 1
+      vertex = hierarchy[k]->insert_no_register(ss, p, vnear[k]);
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    if ( vertices != NULL ) { vertices[k] = vertex; }
+
+    vertex->set_down(previous); // link with other levels
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+  return std::make_pair(lies_on_seg, new_level);
+}
+
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_point(const Site_2& t, const Storage_site_2& ss,
+	     int low, int high, Vertex_handle vbelow,
+	     Vertex_handle* vertices)
+{
+  CGAL_precondition( low >= 1 && low <= high );
+  CGAL_precondition( vbelow != Vertex_handle() );
+
+  Vertex_handle vertex;
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  nearest_neighbor(t, vnear, false);
+
+  Vertex_handle previous = vbelow;
+
+  // insert at all levels
+  int k = low;
+  while ( k <= high ) {
+    // MK::ERROR: this is a hack. I need to change the code in the
+    // segment Delaunay graph class, so that I can insert sites as
+    // the first, second, or third site...; actually this is
+    // problematic only if the number of vertices is exactly 2; it
+    // cannot be smaller since we already have added the endpoints
+    // of the segment at level k.
+    size_type n = hierarchy[k]->number_of_vertices();
+    if ( n > 2 ) {
+      vertex = hierarchy[k]->insert_point(ss, t, vnear[k]);
+    } else if ( n == 2 ) {
+      vertex = hierarchy[k]->insert_third(t, ss);
+    } else {
+      if ( ss.is_input() ) {
+	vertex = hierarchy[k]->insert_no_register(ss, t.point(), vnear[k]);
+      } else {
+	break;
+      }
+      // ideally what should be instead of the break-statement above is the
+      // following statement(s) in the #if-#endif block
+#if 0
+    } else if ( n == 1 ) {
+      vertex = hierarchy[k]->insert_second(t, ss);
+    } else {
+      CGAL_assertion( n == 0 );
+      vertex = hierarchy[k]->insert_first(t, ss);
+#endif
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    if ( vertices != NULL ) { vertices[k] = vertex; }
+
+    vertex->set_down(previous); // link with other levels
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+}
+
+
+//--------------------------------------------------------------------
+// insertion of a segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_segment(const Point_2& p0, const Point_2& p1,
+	       const Storage_site_2& ss, int level)
+{
+
+  CGAL_SDG_DEBUG(std::cout << "debug hier insert_segment " 
+                 << p0 << ' ' << p1 << std::endl;);
+
+  // the tag is true so we DO insert segments in hierarchy
+  if ( level == UNDEFINED_LEVEL ) {
+    level = random_level();
+  }
+
+  Site_2 t = Site_2::construct_site_2(p0, p1);
+
+  if ( is_degenerate_segment(t) ) {
+    Storage_site_2 ss_src = ss.source_site();
+    convert_info(ss_src, ss, true);
+    return insert_point(p0, ss_src, level);
+  }
+
+  Vertex_handle vertices0[sdg_hierarchy_2__maxlevel];
+  Vertex_handle vertices1[sdg_hierarchy_2__maxlevel];
+
+  Storage_site_2 ss_src = ss.source_site();
+  convert_info(ss_src, ss, true);
+#if 1
+  insert_point(p0, ss_src, level, vertices0);
+#else
+  std::pair<bool,int> res = insert_point(p0, ss_src, level, vertices0);
+  if ( res.first ) { level = res.second; }
+#endif
+
+  Storage_site_2 ss_trg = ss.target_site();
+  convert_info(ss_trg, ss, false);
+  insert_point(p1, ss_trg, level, vertices1);
+
+  CGAL_assertion( vertices0[0] != Vertex_handle() );
+  CGAL_assertion( vertices1[0] != Vertex_handle() );
+
+  Vertex_handle vertex;
+
+  if ( hierarchy[0]->number_of_vertices() == 2 ) {
+    static Segments_in_hierarchy_tag stag;
+
+    vertex = hierarchy[0]->insert_third(ss, vertices0[0], vertices1[0]);
+    insert_segment_in_upper_levels(t, vertex->storage_site(),
+				   vertex, vertices0, level, stag);
+  } else {
+    vertex = insert_segment_interior(t, ss, vertices0, level);
+  }
+
+  return vertex;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_segment_interior(const Site_2& t, const Storage_site_2& ss,
+			const Vertex_handle* vertices, int level)
+{
+  // insert the interior of a segment, and DO insert segments in
+  // upper levels of the hierarchy
+  CGAL_precondition( t.is_segment() );
+  CGAL_precondition( this->number_of_vertices() >= 2 );
+
+  CGAL_assertion( vertices[0] != Vertex_handle() );
+  // MK: add here code that checks if the inserted segment has already
+  // been inserted; MAYBE THIS IS NOT NEEDED; I ALREADY DO IT IN
+  // arrangement_type
+
+  // the tags
+  static Intersections_tag          itag;
+  static Segments_in_hierarchy_tag  stag;
+
+  CGAL_SDG_DEBUG(std::cout << "debug insert_segment_interior t=" << t 
+                 << " at level " << level << std::endl;);
+
+  // find the first conflict
+
+  // first look if there are intersections...
+  Vertex_circulator vc = hierarchy[0]->incident_vertices(vertices[0]);
+  Vertex_circulator vc_start = vc;
+  do {
+    Vertex_handle vv(vc);
+    if ( is_infinite(vv) ) {
+      vc++;
+      continue;
+    }
+
+    Arrangement_type at_res = this->arrangement_type(t, vv);
+    if ( vv->is_segment() ) {
+      if ( at_res == AT2::DISJOINT || at_res == AT2::TOUCH_1 ||
+	   at_res == AT2::TOUCH_2 || at_res == AT2::TOUCH_11 ||
+	   at_res == AT2::TOUCH_12 || at_res == AT2::TOUCH_21 ||
+	   at_res == AT2::TOUCH_22 ) {
+	// do nothing
+      } else if ( at_res == AT2::IDENTICAL ) {
+	// merge info of identical items
+	merge_info(vv, ss);
+	return vv;
+      } else if ( at_res == AT2::CROSSING ) {
+        CGAL_SDG_DEBUG(std::cout << "debug insert_segment_interior crossing "
+                       << t << " and " << *vv << std::endl;);
+	return insert_intersecting_segment_with_tag(ss, t, vv, level,
+						    itag, stag);
+      } else if ( at_res == AT2::TOUCH_11_INTERIOR_1 ) {
+	Vertex_handle vp = second_endpoint_of_segment(vv);
+
+	Storage_site_2 sss = split_storage_site(ss, vp->storage_site(), true);
+	// merge the info of the first (common) subsegment
+	merge_info(vv, sss);
+
+	return insert_segment_on_point(ss, vp, level, 1);
+      } else if ( at_res == AT2::TOUCH_12_INTERIOR_1 ) {
+	Vertex_handle vp = first_endpoint_of_segment(vv);
+	return insert_segment_on_point(ss, vp, level, 0);
+      } else {
+	// this should never be reached; the only possible values for
+	// at_res are DISJOINT, CROSSING, TOUCH_11_INTERIOR_1
+	// and TOUCH_12_INTERIOR_1
+	CGAL_error();
+      }
+    } else {
+      CGAL_assertion( vv->is_point() );
+      if ( at_res == AT2::INTERIOR ) {
+	Storage_site_2 svv = vv->storage_site();
+	if ( svv.is_input() ) {
+	  return insert_segment_on_point(ss, vv, level, 2);
+	} else {
+	  // MK::ERROR:: not ready yet
+	  CGAL_error();
+	}
+      }
+    }
+    ++vc;
+  } while ( vc != vc_start );
+
+
+
+  CGAL_SDG_DEBUG(std::cout << "debug insert_segment_interior t=" << t 
+                 << " start looking for vert cf " << std::endl;);
+
+  // first look for conflict with vertex
+  Face_circulator fc_start = hierarchy[0]->incident_faces(vertices[0]);
+  Face_circulator fc = fc_start;
+  Face_handle start_f;
+  Sign s;
+
+  std::map<Face_handle,Sign> sign_map;
+
+  do {
+    Face_handle f(fc);
+
+    s = incircle(f, t);
+
+    sign_map[f] = s;
+
+    if ( s == NEGATIVE ) {
+      start_f = f;
+      break;
+    }
+    ++fc;
+  } while ( fc != fc_start );
+
+  // segments must have a conflict with at least one vertex
+  CGAL_assertion( s == NEGATIVE );
+
+#ifdef CGAL_SDG_VERBOSE
+  // debug
+  std::cout << "debug hier insert_segment_interior t=" 
+    << t << " with " 
+    << (is_infinite(start_f)? "infinite" : "finite") 
+    << " face [" ;
+  if (is_infinite(start_f->vertex(0))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << start_f->vertex(0)->site();
+  }
+  if (is_infinite(start_f->vertex(1))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << start_f->vertex(1)->site();
+  }
+  if (is_infinite(start_f->vertex(2))) {
+    std::cout << " infv";
+  } else {
+    std::cout << ' ' << start_f->vertex(2)->site();
+  }
+  std::cout << "] has sign s=" << s << std::endl; 
+
+#endif
+
+  // we are in conflict with a Voronoi vertex; start from that and 
+  // find the entire conflict region and then repair the diagram
+  List l;
+  Face_map fm;
+
+  Triple<bool, Vertex_handle, Arrangement_type>
+    vcross(false, Vertex_handle(), AT2::DISJOINT);
+
+  hierarchy[0]->initialize_conflict_region(start_f, l);
+  hierarchy[0]->expand_conflict_region(start_f, t, ss, l, fm,
+				       sign_map, vcross);
+
+  CGAL_assertion( vcross.third == AT2::DISJOINT ||
+		  vcross.third == AT2::CROSSING ||
+		  vcross.third == AT2::INTERIOR );
+
+  // the following condition becomes true only if intersecting
+  // segments are found
+  if ( vcross.first ) {
+    if ( t.is_segment() ) {
+      if ( vcross.third == AT2::CROSSING ) {
+	Intersections_tag itag;
+	return insert_intersecting_segment_with_tag(ss, t, vcross.second,
+						    level, itag, stag);
+      } else if ( vcross.third == AT2::INTERIOR ) {
+	return insert_segment_on_point(ss, vcross.second, level, 2);
+      } else {
+	// this should never be reached; the only possible values for
+	// vcross.third are CROSSING, INTERIOR and DISJOINT
+	CGAL_error();
+      }
+    }
+  }
+
+  // no intersecting segment has been found; we insert the segment as
+  // usual...
+  Vertex_handle v = hierarchy[0]->create_vertex(ss);
+
+  hierarchy[0]->retriangulate_conflict_region(v, l, fm);
+
+  insert_segment_in_upper_levels(t, ss, v, vertices, level, stag);
+
+  return v;
+}
+
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_segment_in_upper_levels(const Site_2& t, const Storage_site_2& ss,
+			       Vertex_handle vbelow,
+			       const Vertex_handle* vertices,
+			       int level, Tag_true /* stag */)
+{
+  CGAL_precondition( vertices != NULL );
+  CGAL_precondition( vbelow != Vertex_handle() );
+
+  // insert at all upper levels
+  Vertex_handle previous = vbelow;
+  Vertex_handle vertex = vbelow;
+
+  int k = 1;
+  while ( k <= level ) {
+    if ( hierarchy[k]->number_of_vertices() == 2 ) {
+      Vertex_handle v0(hierarchy[k]->finite_vertices_begin());
+      Vertex_handle v1(++(hierarchy[k]->finite_vertices_begin()));
+      CGAL_precondition( v0 != Vertex_handle() &&
+			 v1 != Vertex_handle() );
+      vertex = hierarchy[k]->insert_third(ss, v0, v1);
+    } else {
+      vertex = hierarchy[k]->insert_segment_interior(t, ss, vertices[k]);
+    }
+
+    CGAL_assertion( vertex != Vertex_handle() );
+
+    vertex->set_down(previous); // link with level above
+    previous->set_up(vertex);
+    previous = vertex;
+    k++;
+  }
+}
+
+//--------------------------------------------------------------------
+// insertion of a segment that goes through a point
+//--------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_segment_on_point(const Storage_site_2& ss,
+			const Vertex_handle& v,
+			int level, int which)
+{  
+  // inserts the segment represented by ss in the case where this
+  // segment goes through a point which has already been inserted and
+  // corresponds to the vertex handle v
+  CGAL_precondition( ss.is_segment() );
+  CGAL_precondition( v->is_point() );
+
+  Storage_site_2 ssv = v->storage_site();
+  Site_2 sv = ssv.site();
+
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+
+  nearest_neighbor(sv, vnear, false);
+
+  int v_level = find_level(v);
+
+  if ( v_level < level ) {
+    Vertex_handle vbelow = vnear[v_level];
+
+    insert_point(sv, ssv, v_level + 1, level, vbelow, vnear);
+  }
+
+  // merge the info of the (common) splitting endpoint
+  merge_info(v, ss);
+
+  if ( which == 2 ) {
+    Storage_site_2 ss1 = this->split_storage_site(ss, ssv, true);
+    Storage_site_2 ss2 = this->split_storage_site(ss, ssv, false);
+
+    insert_segment_interior(ss1.site(), ss1, vnear, level);
+    return insert_segment_interior(ss2.site(), ss2, vnear, level);
+  }
+
+  Storage_site_2 ss1 = this->split_storage_site(ss, ssv, which == 0);
+  return insert_segment_interior(ss1.site(), ss1, vnear, level);
+}
+
+//--------------------------------------------------------------------
+// insertion of an intersecting segment
+//--------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				     const Site_2& t, Vertex_handle v,
+				     int level,
+				     Tag_true itag, Tag_false /* stag */)
+{
+  CGAL_precondition( t.is_segment() && v->is_segment() );
+
+  const Storage_site_2& ssitev = v->storage_site();
+  Site_2 sitev = ssitev.site();
+
+  if ( same_segments(t, sitev) ) {
+    merge_info(v, ss);
+    return v;
+  }
+
+  Vertex_triple vt = hierarchy[0]->insert_point_on_segment(ss, t, v, itag);
+
+  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
+
+  Vertex_handle vsx = vt.first;
+  verticesx[0] = vsx;
+
+  bool compute_new_level = true;
+  int new_level = compute_new_level ? random_level() : level;
+  if ( new_level > 0 ) {
+    Storage_site_2 ssx = vsx->storage_site();
+    Site_2 sx = ssx.site();
+    insert_point(sx, ssx, 1, new_level, vsx, verticesx);
+  }
+
+  Storage_site_2 ss3 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
+  Storage_site_2 ss4 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
+
+  Site_2 s3 = ss3.site();
+  Site_2 s4 = ss4.site();
+
+  insert_segment_interior(s3, ss3, verticesx, level);
+  insert_segment_interior(s4, ss4, verticesx, level);
+  return vsx;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				     const Site_2& t, Vertex_handle v,
+				     int level,
+				     Tag_true itag, Tag_true /* stag */)
+{
+  CGAL_precondition( t.is_segment() && v->is_segment() );
+
+  CGAL_expensive_precondition( arrangement_type(t, v->site()) );
+
+  const Storage_site_2& ssitev = v->storage_site();
+  Site_2 sitev = ssitev.site();
+
+  if ( same_segments(t, sitev) ) {
+    // MK::ERROR: I may need to insert it to levels higher than its
+    // previous level...
+    merge_info(v, ss);
+    return v;
+  }
+
+  Vertex_handle verticesx[sdg_hierarchy_2__maxlevel];
+
+  int levelv = find_level(v);
+
+  Vertex_handle vcross = v;
+  Vertex_handle v1_old, v2_old, vsx_old;
+
+  int k = 0;
+  while ( k <= levelv ) {
+    Vertex_handle vcross_up = vcross->up();
+
+    Vertex_triple vt =
+      hierarchy[k]->insert_point_on_segment(ss, t, vcross, itag);
+
+    // now I need to update the sites for vertices v1 and v2
+    Vertex_handle vsx = vt.first;
+    Vertex_handle v1 = vt.second;
+    Vertex_handle v2 = vt.third;
+
+    CGAL_assertion( v1->is_segment() && v2->is_segment() );
+
+    if ( k > 0 ) {
+      CGAL_assertion( (same_segments(v1->site(), v1_old->site()) &&
+		       same_segments(v2->site(), v2_old->site())) ||
+		      (same_segments(v1->site(), v2_old->site()) &&
+		       same_segments(v2->site(), v1_old->site()))
+		      );
+      if ( same_segments(v1->site(), v1_old->site()) ) {
+	v1->set_down(v1_old);
+	v2->set_down(v2_old);
+	v1_old->set_up(v1);
+	v2_old->set_up(v2);
+      } else {
+	v1->set_down(v2_old);
+	v2->set_down(v1_old);
+	v1_old->set_up(v2);
+	v2_old->set_up(v1);
+      }
+      vsx_old->set_up(vsx);
+      vsx->set_down(vsx_old);
+    }
+
+    v1_old = v1;
+    v2_old = v2;
+    vsx_old = vsx;
+
+    verticesx[k] = vsx;
+
+    vcross = vcross_up;
+    k++;
+  }
+
+  if ( levelv < level ) {
+    Storage_site_2 ssx = verticesx[0]->storage_site();
+    Site_2 sx = ssx.site();
+
+    insert_point(sx, ssx, levelv + 1, level, verticesx[levelv], verticesx);
+  }
+
+  Storage_site_2 ss3 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, true);
+
+  Storage_site_2 ss4 =
+    this->st_.construct_storage_site_2_object()(ss, ssitev, false);
+
+  Site_2 s3 = ss3.site();
+  Site_2 s4 = ss4.site();
+
+  insert_segment_interior(s3, ss3, verticesx, level);
+  insert_segment_interior(s4, ss4, verticesx, level);
+  return verticesx[0];
+}
+
+
+//====================================================================
+//====================================================================
+//                   METHODS FOR REMOVAL
+//====================================================================
+//====================================================================
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+remove(const Vertex_handle& v)
+{
+  CGAL_precondition( !is_infinite(v) );
+  const Storage_site_2& ss = v->storage_site();
+
+  if ( !ss.is_input() ) { return false; }
+
+  Point_handle h1, h2;
+  bool is_point = ss.is_point();
+  if ( is_point ) {
+    h1 = ss.point();
+  } else {
+    CGAL_assertion( ss.is_segment() );   
+    h1 = ss.source_of_supporting_site();
+    h2 = ss.target_of_supporting_site();
+  }
+
+  // remove at level 0
+  Vertex_handle u = v->up();
+  bool success = hierarchy[0]->remove_base(v);
+  if ( !success ) { return false; }
+
+  // remove at higher levels
+  unsigned int l = 1;
+  Vertex_handle vv = u;
+  while ( u != Vertex_handle() ) {
+    if ( l >= sdg_hierarchy_2__maxlevel) { break; }
+    vv = u;
+    u = vv->up();
+    success = hierarchy[l++]->remove_base(vv);
+    CGAL_assertion( success );
+  }
+
+  // unregister the input site
+  if ( is_point ) {
+    this->unregister_input_site( h1 );
+  } else {
+    this->unregister_input_site( h1, h2 );
+  }
+
+  return true;
+}
+
+//===========================================================================
+//===========================================================================
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  nearest neighbor location
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+typename
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::Vertex_handle 
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+nearest_neighbor(const Point_2& p, bool force_point) const
+{
+  Vertex_handle vnear[sdg_hierarchy_2__maxlevel];
+  //  nearest_neighbor(Site_2(p), vnear, force_point);
+
+  Site_2 t = Site_2::construct_site_2(p);
+
+  nearest_neighbor(t, vnear, force_point);
+  return vnear[0];
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+nearest_neighbor(const Site_2& t,
+		 Vertex_handle vnear[sdg_hierarchy_2__maxlevel],
+		 bool /* force_point */) const
+{
+  CGAL_precondition( t.is_point() );
+
+  Vertex_handle nearest;
+  int level  = sdg_hierarchy_2__maxlevel;
+
+  // find the highest level with enough vertices
+  while ( hierarchy[--level]->number_of_vertices() 
+	  < sdg_hierarchy_2__minsize ) {
+    if ( !level ) break;  // do not go below 0
+  }
+  for (unsigned int i = level + 1; i < sdg_hierarchy_2__maxlevel; i++) {
+    vnear[i] = Vertex_handle();
+  }
+
+  while ( level > 0 ) {
+    vnear[level] = nearest =
+      hierarchy[level]->nearest_neighbor(t, nearest);  
+
+    CGAL_assertion( !hierarchy[level]->is_infinite(vnear[level]) );
+    CGAL_assertion( vnear[level] != Vertex_handle() );
+    // go at the same vertex on level below
+    nearest = nearest->down();
+    --level;
+  }
+  vnear[0] = hierarchy[0]->nearest_neighbor(t, nearest);
+  // at level 0
+}
+
+
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  miscellaneous methods
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::   
+copy(const Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag> &sdg)
+{
+#ifndef CGAL_NO_ASSERTIONS
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    CGAL_assertion( hierarchy[i]->pc_.size() == 0 );
+    CGAL_assertion( hierarchy[i]->isc_.size() == 0 );
+
+    CGAL_assertion( sdg.hierarchy[i]->pc_.size() == 0 );
+    CGAL_assertion( sdg.hierarchy[i]->isc_.size() == 0 );
+  }
+#endif
+
+  // first copy the point container and input point container
+  this->pc_ = sdg.pc_;
+
+  // first create a map between the old point handles and the new ones
+  Handle_map hm;
+
+  Point_handle it_other = sdg.hierarchy[0]->pc_.begin();
+  Point_handle it_this = hierarchy[0]->pc_.begin();
+  for (; it_other != sdg.hierarchy[0]->pc_.end(); ++it_other, ++it_this) {
+    hm.insert( Point_handle_pair(it_other, it_this) );
+  }
+
+  {
+    for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+      hierarchy[i]->copy(*sdg.hierarchy[i], hm);
+    }
+  }
+
+  //up and down have been copied in straightforward way
+  // compute a map at lower level
+  std::map< Vertex_handle, Vertex_handle > V;
+  {
+    for(Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
+	it != hierarchy[0]->finite_vertices_end(); ++it) {
+      if ( it->up() != Vertex_handle() ) {
+	V[ it->up()->down() ] = it;
+      }
+    }
+  }
+  {
+    for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+      for(Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
+	  it != hierarchy[i]->finite_vertices_end(); ++it) {
+	// down pointer goes in original instead in copied triangulation
+	it->set_down(V[it->down()]);
+	// make reverse link
+	it->down()->set_up( it );
+	// make map for next level
+	if ( it->up() != Vertex_handle() ) {
+	  V[ it->up()->down() ] = it;
+	}
+      }
+    }
+  }
+
+  // the point container and the input sites container are copied by
+  // the operator= of the one-level classes
+  //  hierarchy[0]->pc_ = sdg.hierarchy[0]->pc_;
+  //  hierarchy[0]->isc_ = sdg.hierarchy[0]->isc_;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
+clear()
+{
+  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->clear();
+  }
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
+swap(Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>& other)
+{
+  Base* temp;
+  Base::swap(other);
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    temp = hierarchy[i];
+    hierarchy[i] = other.hierarchy[i];
+    other.hierarchy[i]= temp;
+  }
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  validity check
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+template<class Gt, class ST, class STag, class D_S, class LTag>
+bool
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>:: 
+is_valid(bool verbose, int level) const
+{
+  // philaris: the level argument has to do with debugging level
+  // philaris: the level argument is not related to the hierarchy levels
+
+  bool result(true);
+
+#define DEBUGVALIDHIER true
+//#undef DEBUGVALIDHIER
+
+#ifdef DEBUGVALIDHIER  
+  std::cout << "debug hierarchy is_valid entering" 
+    << " level=" << level << std::endl;
+#endif
+
+  //verify correctness of triangulation at all levels
+  for(unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+#ifdef DEBUGVALIDHIER  
+    std::cout << "debug hierarchy is_valid level " << i << std::endl;
+#endif
+    if ( verbose ) {
+      std::cerr << "Level " << i << ": " << std::flush;
+    }
+    bool is_valid_level = hierarchy[i]->is_valid(verbose, level);
+
+#ifdef DEBUGVALIDHIER  
+    std::cout << "debug level=" << i 
+      << " validity=" << is_valid_level << std::endl;
+#endif
+
+    result = result && is_valid_level;
+    if ( verbose ) {
+      std::cerr << std::endl;
+    }
+  }
+  //verify that lower level has no down pointers
+  for( Finite_vertices_iterator it = hierarchy[0]->finite_vertices_begin(); 
+       it != hierarchy[0]->finite_vertices_end(); ++it) {
+    result = result && ( it->down() == Vertex_handle() );
+  }
+
+  //verify that other levels has down pointer and reciprocal link is fine
+  for(unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    for( Finite_vertices_iterator it = hierarchy[i]->finite_vertices_begin(); 
+	 it != hierarchy[i]->finite_vertices_end(); ++it) {
+      Vertex_handle vit(it);
+      result = result && ( it->down()->up() == vit );
+    }
+  }
+#ifdef DEBUGVALIDHIER  
+  std::cout << "debug hierarchy is_valid returns " << result << std::endl;
+#endif
+  return result;
+}
+
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  local helper methods
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+print_error_message() const
+{
+  std::cerr << std::endl;
+  std::cerr << "WARNING:" << std::endl;
+  std::cerr << "A segment-segment intersection was found."
+	    << std::endl;
+  std::cerr << "The Segment_Delaunay_graph_Linf_hierarchy_2 class is not"
+	    << " configured to handle this situation." << std::endl;
+  std::cerr << "Please look at the documentation on how to handle"
+	    << " this behavior." << std::endl;
+  std::cerr << std::endl;
+}
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//  file I/O
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+file_output(std::ostream& os) const
+{
+  typedef std::map<Vertex_handle,int>        Vertex_map;
+  typedef typename Base::const_Point_handle  const_Point_handle;
+
+  // compute the point handle mapper
+  typename Base::Point_handle_mapper P;
+  size_type inum = 0;
+  for (const_Point_handle ph = this->pc_.begin(); ph != this->pc_.end(); ++ph) {
+    P[ph] = inum++;
+  }
+
+  // write each level of the hierarchy
+  hierarchy[0]->file_output(os, P, true);
+  if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->file_output(os, P, false);
+    if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  }
+
+  Vertex_map* V = new Vertex_map[sdg_hierarchy_2__maxlevel];
+
+  // create the map of vertex indices
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    int inum = 0;
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      V[i][vit] = inum++;
+    }
+  }
+
+  Vertex_map* V_up   = new Vertex_map[sdg_hierarchy_2__maxlevel];
+  Vertex_map* V_down = new Vertex_map[sdg_hierarchy_2__maxlevel];
+
+  // create the map of up and down pointers
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      if ( vit->up() != Vertex_handle() ) {
+	V_up[i][vit] = V[i+1][vit->up()];
+      } else {
+	V_up[i][vit] = -1;
+      }
+
+      if ( vit->down() != Vertex_handle() ) {
+	V_down[i][vit] = V[i-1][vit->down()];
+      } else {
+	V_down[i][vit] = -1;
+      }
+    }
+  }
+
+  // write up and down pointer info
+  if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    os << i;
+    if ( is_ascii(os) ) { os << " "; }
+    os << hierarchy[i]->number_of_vertices();
+    if ( is_ascii(os) ) { os << std::endl; }
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit) {
+      os << V[i][vit];
+      if ( is_ascii(os) ) { os << " "; }
+      os << V_down[i][vit];
+      if ( is_ascii(os) ) { os << " "; }
+      os << V_up[i][vit];
+      if ( is_ascii(os) ) { os << std::endl; }
+    }
+    if ( is_ascii(os) ) { os << std::endl << std::endl; }
+  }
+
+  delete[] V;
+  delete[] V_up;
+  delete[] V_down;
+}
+
+template<class Gt, class ST, class STag, class D_S, class LTag>
+void
+Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>::
+file_input(std::istream& is)
+{
+  typedef std::vector<Vertex_handle>  Vertex_vector;
+
+  // firstly, read the segment Delaunay graph at each level
+  clear();
+  typename Base::Point_handle_vector P;
+  hierarchy[0]->file_input(is, true, P);
+  for (unsigned int i = 1; i < sdg_hierarchy_2__maxlevel; ++i) {
+    hierarchy[i]->file_input(is, false, P);
+  }
+
+  Vertex_vector* V = new Vertex_vector[sdg_hierarchy_2__maxlevel];
+
+  // secondly, create the map of vertex indices
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    V[i].resize(hierarchy[i]->number_of_vertices());
+    int j = 0;
+    for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
+	 vit != hierarchy[i]->finite_vertices_end(); ++vit, ++j) {
+      V[i][j] = vit;
+    }
+  }
+
+  // read the correspondences between up and down pointers and set
+  // them appropriately
+  for (unsigned int i = 0; i < sdg_hierarchy_2__maxlevel; ++i) {
+    unsigned int level;
+    int vnum;
+    is >> level >> vnum;
+    for (int k = 0; k < vnum; k++) {
+      int ithis, iup, idown;
+      is >> ithis >> idown >> iup;
+      if ( idown != -1 ) { V[i][ithis]->set_down(V[i-1][idown]); }
+      if ( iup != -1 )   { V[i][ithis]->set_up(V[i+1][iup]); }
+    }
+  }
+
+  delete[] V;
+}
+
+
+//--------------------------------------------------------------------
+
+
+} //namespace CGAL
+
+
+// EOF
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h
new file mode 100644
index 0000000..63cb8f6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h
@@ -0,0 +1,173 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
+
+namespace CGAL {
+
+//-----------------------------------------------------------------------
+// the Traits class
+//-----------------------------------------------------------------------
+
+template<class R, class MTag, class ITag>
+class Segment_Delaunay_graph_Linf_traits_base_2
+ : public Segment_Delaunay_graph_traits_base_2<R, MTag, ITag>
+{
+public:
+  //-----------------------------------------------------------------------
+  //                  TYPE DEFINITIONS
+  //-----------------------------------------------------------------------
+
+  // BASIC TYPES
+  //------------
+  
+  typedef Segment_Delaunay_graph_traits_base_2<R, MTag, ITag> Base;
+
+  typedef typename Base::Kernel Kernel;
+  typedef Kernel   K;
+
+  typedef typename Kernel::Iso_rectangle_2        Iso_rectangle_2;
+  typedef typename Kernel::Direction_2            Direction_2;
+  typedef typename Kernel::Vector_2               Vector_2;
+
+  typedef typename Kernel::Sign                   Sign;
+  typedef typename Kernel::Boolean                Boolean;
+
+  // CONSTRUCTIONS
+  //--------------
+  // vertex and bisector
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Construct_svd_vertex_2<K,MTag>
+  Construct_svd_vertex_2;
+
+  //typedef
+  //CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Construct_sdg_bisector_2<K,MTag>
+  //Construct_sdg_bisector_2;
+
+  // Linf traits contain bisector constructions
+  typedef Tag_true Tag_has_bisector_constructions;
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_2<Gt, M>
+  {};
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_ray_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_ray_2<Gt, M>
+  {};
+
+  template<class Gt, class M>
+  class Construct_sdg_bisector_segment_2
+   : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::
+            Construct_sdg_bisector_segment_2<Gt, M>
+  {};
+
+  // PREDICATES
+  //-----------
+
+  // used by triangulation 
+  //typedef
+  //CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Orientation_Linf_C2<K>
+  //Orientation_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Oriented_side_of_bisector_C2<K,MTag>
+  Oriented_side_of_bisector_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Vertex_conflict_C2<K,MTag>
+  Vertex_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Finite_edge_interior_conflict_C2<K,MTag>
+  Finite_edge_interior_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Infinite_edge_interior_conflict_C2<K,MTag>
+  Infinite_edge_interior_conflict_2;
+
+  typedef
+  CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Oriented_side_C2<K,MTag>
+  Oriented_side_2;
+
+public:
+  //-----------------------------------------------------------------------
+  //                  ACCESS TO OBJECTS
+  //-----------------------------------------------------------------------
+
+  // CONSTRUCTIONS
+  //--------------
+  Construct_svd_vertex_2
+  construct_svd_vertex_2_object() const { 
+    return Construct_svd_vertex_2();
+  }
+
+  //Construct_sdg_bisector_2
+  //construct_sdg_bisector_2_object() const {
+  //  return Construct_sdg_bisector_2();
+  //}
+
+  // PREDICATES
+  //-----------
+
+  //Orientation_2
+  //orientation_2_object() const {
+  //  return Orientation_2();
+  //}
+
+  Oriented_side_of_bisector_2
+  oriented_side_of_bisector_2_object() const {
+    return Oriented_side_of_bisector_2();
+  }
+
+  Vertex_conflict_2
+  vertex_conflict_2_object() const {
+    return Vertex_conflict_2();
+  }
+
+  Finite_edge_interior_conflict_2
+  finite_edge_interior_conflict_2_object() const {
+    return Finite_edge_interior_conflict_2();
+  }
+
+  Infinite_edge_interior_conflict_2
+  infinite_edge_interior_conflict_2_object() const {
+    return Infinite_edge_interior_conflict_2();
+  }
+
+  Oriented_side_2
+  oriented_side_2_object() const {
+    return Oriented_side_2();
+  }
+};
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h
new file mode 100644
index 0000000..df2ff1e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h
@@ -0,0 +1,1455 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VERTEX_CONFLICT_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VERTEX_CONFLICT_C2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Orientation_Linf_2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+//---------------------------------------------------------------------
+
+template<class K, class Method_tag>
+class Vertex_conflict_C2
+  : public Basic_predicates_C2<K>
+{
+private:
+
+  typedef Basic_predicates_C2<K> Base;
+  using Base::compute_supporting_line;
+  using Base::oriented_side_of_line;
+  //using Base::opposite_line;
+  using Base::compute_linf_perpendicular;
+  using Base::compute_line_from_to;
+  using Base::compute_horizontal_line_from_to;
+  using Base::compute_vertical_line_from_to;
+  using Base::compute_horizontal_side_line;
+  using Base::compute_vertical_side_line;
+  using Base::compute_perpendicular;
+  using Base::compute_cw_perpendicular;
+  using Base::compute_horizontal_projection;
+  using Base::compute_vertical_projection;
+  using Base::intersects_segment_interior_inf_box;
+  using Base::intersects_segment_positive_of_wedge;
+  using Base::intersects_segment_negative_of_wedge;
+  using Base::has_positive_slope;
+  using Base::is_site_h_or_v;
+
+  typedef typename Base::Line_2              Line_2;
+
+  typedef typename K::Point_2                Point_2;
+  typedef typename K::Segment_2              Segment_2;
+  typedef typename K::Site_2                 Site_2;
+  typedef typename K::FT                     FT;
+  typedef typename K::RT                     RT;
+  //typedef typename K::Orientation            Orientation;
+  typedef typename K::Sign                   Sign;
+
+  typedef Voronoi_vertex_C2<K,Method_tag>    Voronoi_vertex_2;
+
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+
+  typedef typename K::Intersections_tag      ITag;
+
+  // the orientation Linf predicate for three points
+  typedef Orientation_Linf_2<K>              Orientation_Linf_points_2;
+
+  typedef typename K::Compare_x_2 Compare_x_2;
+  typedef typename K::Compare_y_2 Compare_y_2;
+
+  Compare_x_2 cmpx;
+  Compare_y_2 cmpy;
+  Orientation_Linf_points_2 orientation_linf;
+
+
+private:
+  Are_same_points_2    same_points;
+  Are_same_segments_2  same_segments;
+
+  bool is_on_common_support(const Site_2& s1, const Site_2& s2,
+			    const Point_2& p) const
+  {
+    CGAL_precondition( !s1.is_input() && !s2.is_input() );
+
+    if (  same_segments(s1.supporting_site(0),
+			s2.supporting_site(0)) ||
+	  same_segments(s1.supporting_site(0),
+			s2.supporting_site(1))  ) {
+      Site_2 support = s1.supporting_site(0);
+      Site_2 tp = Site_2::construct_site_2(p);
+
+      return (  same_points(support.source_site(), tp) ||
+		same_points(support.target_site(), tp)  );
+    } else if (  same_segments(s1.supporting_site(1),
+			       s2.supporting_site(1)) ||
+		 same_segments(s1.supporting_site(1),
+			       s2.supporting_site(0))  ) {
+      Site_2 support = s1.supporting_site(1);
+      Site_2 tp = Site_2::construct_site_2(p);
+
+      return (  same_points(support.source_site(), tp) ||
+		same_points(support.target_site(), tp)  );
+    }
+    return false;
+  }
+
+  bool have_common_support(const Site_2& p, const Site_2& q) const
+  {
+    CGAL_precondition( !p.is_input() && !q.is_input() );
+
+    return
+      same_segments(p.supporting_site(0), q.supporting_site(0)) ||
+      same_segments(p.supporting_site(0), q.supporting_site(1)) ||
+      same_segments(p.supporting_site(1), q.supporting_site(1)) ||
+      same_segments(p.supporting_site(1), q.supporting_site(0));
+  }
+
+  bool have_common_support(const Site_2& s, const Point_2& p1,
+			   const Point_2& p2) const
+  {
+    CGAL_precondition( !s.is_input() );
+
+    Site_2 t = Site_2::construct_site_2(p1, p2);
+
+    return ( same_segments(s.supporting_site(0), t) ||
+	     same_segments(s.supporting_site(1), t) );
+  }
+
+private:
+  Sign incircle_ppp(const Site_2& p, const Site_2& q,
+		    const Site_2& t, const Tag_false&) const
+  {
+    Point_2 pp = p.point(), qp = q.point(), tp = t.point();
+
+    // MK::ERROR: here I should call a kernel object, not a
+    // function...; actually here (and everywhere in this class)
+    // use the orientation predicate for sites; it does some
+    // geometric filtering...
+    // philaris: I think we call an object now
+    OrientationLinf o = orientation_linf(pp, qp, tp);
+
+    if ( o != DEGENERATE ) {
+      return (o == LEFT_TURN) ? POSITIVE : NEGATIVE;
+    }
+
+    // here orientation Linf is degenerate
+
+    // return NEGATIVE if t is strictly inside the bounding box
+    // of p and q, otherwise return POSITIVE;
+    // ZERO is not possible (because t should not be equal
+    // to either p or q)
+
+    Comparison_result cmpxpt = cmpx(pp, tp);
+    Comparison_result cmpxtq = cmpx(tp, qp);
+    Comparison_result cmpypt = cmpy(pp, tp);
+    Comparison_result cmpytq = cmpy(tp, qp);
+
+    //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq );
+    Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq);
+
+    CGAL_assertion( s != ZERO );
+
+    return s;
+  }
+
+  Sign incircle_ppp(const Site_2& p, const Site_2& q,
+		    const Site_2& t, const Tag_true&) const
+  {
+    Orientation o = DEGENERATE; // the initialization was done in
+                               // order a compiler warning
+
+    // do some geometric filtering...
+    bool p_exact = p.is_input();
+    bool q_exact = q.is_input();
+    bool t_exact = t.is_input();
+    bool filtered = false;
+    // the following if-statement does the gometric filtering...
+    // maybe it is not so important since this will only be
+    // activated if a lot of intersection points appear on the
+    // convex hull
+    if ( !p_exact || !q_exact || !t_exact ) {
+      if ( !p_exact && !q_exact && !t_exact ) {
+	if ( have_common_support(p, q) &&
+	     have_common_support(q, t) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( !p_exact && !q_exact && t_exact ) {
+	if ( is_on_common_support(p, q, t.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( !p_exact && q_exact && !t_exact ) {
+	if ( is_on_common_support(p, t, q.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( p_exact && !q_exact && !t_exact ) {
+	if ( is_on_common_support(t, q, p.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( !p_exact && q_exact && t_exact ) {
+	if ( have_common_support(p, q.point(), t.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( p_exact && !q_exact && t_exact ) {
+	if ( have_common_support(q, p.point(), t.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      } else if ( p_exact && q_exact && !t_exact ) {
+	if ( have_common_support(t, p.point(), q.point()) ) {
+	  o = COLLINEAR;
+	  filtered = true;
+	}
+      }
+    }
+
+    Point_2 pp = p.point(), qp = q.point(), tp = t.point();
+
+    if ( !filtered ) {
+      // MK::ERROR: here I should call a kernel object, not a
+      // function...; actually here (and everywhere in this class)
+      // use the orientation predicate for sites; it does some
+      // geometric filtering...
+      // philaris: I think we call an object now
+      o = orientation_linf(pp, qp, tp);
+    }
+
+    if ( o != DEGENERATE ) {
+      return (o == LEFT_TURN) ? POSITIVE : NEGATIVE;
+    }
+
+    // here orientation Linf is degenerate
+
+    // return NEGATIVE if t is strictly inside the bounding box
+    // of p and q, otherwise return POSITIVE;
+    // ZERO is not possible (because t should not be equal
+    // to either p or q)
+
+    Comparison_result cmpxpt = cmpx(pp, tp);
+    Comparison_result cmpxtq = cmpx(tp, qp);
+    Comparison_result cmpypt = cmpy(pp, tp);
+    Comparison_result cmpytq = cmpy(tp, qp);
+
+    //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq );
+    Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq);
+
+    CGAL_assertion( s != ZERO );
+
+    return s;
+  }
+
+
+  // check if (p, inf, q) conflicts with t
+  Sign incircle_p(const Site_2& p, const Site_2& q,
+		  const Site_2& t) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    if ( p.is_point() && q.is_point() ) {
+
+#if 1
+      return incircle_ppp(p, q, t, ITag());
+
+#else
+      Orientation o = DEGENERATE; // the initialization was done in
+                                 // order a compiler warning
+
+      // do some geometric filtering...
+      bool p_exact = p.is_input();
+      bool q_exact = q.is_input();
+      bool t_exact = t.is_input();
+      bool filtered = false;
+      // the following if-statement does the gometric filtering...
+      // maybe it is not so important since this will only be
+      // activated if a lot of intersection points appear on the
+      // convex hull
+      if ( !p_exact || !q_exact || !t_exact ) {
+	if ( !p_exact && !q_exact && !t_exact ) {
+	  if ( have_common_support(p, q) &&
+	       have_common_support(q, t) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( !p_exact && !q_exact && t_exact ) {
+	  if ( is_on_common_support(p, q, t.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( !p_exact && q_exact && !t_exact ) {
+	  if ( is_on_common_support(p, t, q.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( p_exact && !q_exact && !t_exact ) {
+	  if ( is_on_common_support(t, q, p.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( !p_exact && q_exact && t_exact ) {
+	  if ( have_common_support(p, q.point(), t.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( p_exact && !q_exact && t_exact ) {
+	  if ( have_common_support(q, p.point(), t.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	} else if ( p_exact && q_exact && !t_exact ) {
+	  if ( have_common_support(t, p.point(), q.point()) ) {
+	    o = COLLINEAR;
+	    filtered = true;
+	  }
+	}
+      }
+
+      Point_2 pp = p.point(), qp = q.point(), tp = t.point();
+
+      if ( !filtered ) {
+	// MK::ERROR: here I should call a kernel object, not a
+	// function...; actually here (and everywhere in this class)
+	// use the orientation predicate for sites; it does some
+	// geometric filtering...
+	// philaris: I think we call an object now
+	o = orientation_linf(pp, qp, tp);
+      }
+
+      if ( o != DEGENERATE ) {
+	return (o == LEFT_TURN) ? POSITIVE : NEGATIVE;
+      }
+
+      // here orientation Linf is degenerate
+
+      // return NEGATIVE if t is strictly inside the bounding box
+      // of p and q, otherwise return POSITIVE;
+      // ZERO is not possible (because t should not be equal
+      // to either p or q)
+
+      Comparison_result cmpxpt = cmpx(pp, tp);
+      Comparison_result cmpxtq = cmpx(tp, qp);
+      Comparison_result cmpypt = cmpy(pp, tp);
+      Comparison_result cmpytq = cmpy(tp, qp);
+
+      //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq );
+      Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq);
+
+      CGAL_assertion( s != ZERO );
+
+      return s;
+#endif
+    }
+
+    // here the pair of p, q contains a point and a segment
+
+    CGAL_assertion( p.is_point() || q.is_point() );
+
+    CGAL_SDG_DEBUG( std::cout << "debug incircle_p of p=" << p
+                   << " q=" << q << " t=" << t << std::endl; );
+
+    // philaris: here, for Linf there are differences from L2
+
+    if ((q.is_segment() && is_site_h_or_v(q)) ||
+        (p.is_segment() && is_site_h_or_v(p))   ) {
+      // the case of horizontal or vertical segment is the same
+      // as in L2
+      Orientation o;
+      if ( p.is_point() && q.is_segment() ) {
+        CGAL_assertion( same_points(p, q.source_site()) ||
+            same_points(p, q.target_site()) );
+        Point_2 pq =
+          same_points(p, q.source_site()) ? q.target() : q.source();
+        o = orientation_linf(p.point(), pq, t.point());
+      } else { // p is a segment and q is a point
+        CGAL_assertion( same_points(q, p.source_site()) ||
+            same_points(q, p.target_site()) );
+        Point_2 pp =
+          same_points(q, p.source_site()) ? p.target() : p.source();
+        o = orientation_linf(pp, q.point(), t.point());
+      }
+      if ( CGAL::is_certain(o == RIGHT_TURN) )  {
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_p about to return "
+          << (CGAL::get_certain( o == RIGHT_TURN ) ? NEGATIVE : POSITIVE)
+                       << std::endl ;);
+        return CGAL::get_certain( o == RIGHT_TURN ) ? NEGATIVE : POSITIVE;
+      }
+      return CGAL::Uncertain<CGAL::Sign>::indeterminate();
+    } else {
+      // here the segment is neither horizontal nor vertical
+      if ( p.is_point() && q.is_segment() ) {
+
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p: p point, q segment" << std::endl; );
+
+        Point_2 pnt = p.point();
+
+        // compute slope of segment q
+        Line_2 l = compute_supporting_line(q.supporting_site());
+        bool is_positive_slope =
+          CGAL::sign(l.a()) != CGAL::sign(l.b());
+
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_p: q has "
+          << (is_positive_slope ? "positive" : "negative")
+          << " slope" << std::endl; );
+
+
+        Oriented_side side_of_pnt;
+        if (same_points(q.source_site(), p) ||
+            same_points(q.target_site(), p)   ) {
+          side_of_pnt = ON_ORIENTED_BOUNDARY;
+        } else {
+          side_of_pnt = oriented_side_of_line(l, pnt);
+        }
+
+        if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
+          CGAL_assertion(same_points(q.source_site(), p) ||
+                         same_points(q.target_site(), p)   );
+        } else {
+          // here, side_of_pnt is non-zero
+          Oriented_side side_of_t = oriented_side_of_line(l, t.point());
+          if (side_of_t == - side_of_pnt) {
+            // p and t on different sides of segment q
+            return POSITIVE;
+          }
+        }
+
+        Line_2 lhor;
+        Line_2 lver;
+
+        bool is_same_qsrc_p = same_points(q.source_site(), p);
+        bool is_same_qtrg_p = same_points(q.target_site(), p);
+
+        Segment_2 seg = q.segment();
+
+        if (is_same_qsrc_p || is_same_qtrg_p) {
+          const Point_2 otherpnt =
+            is_same_qsrc_p ? seg.target() : seg.source();
+          lhor = compute_horizontal_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE );
+          lver = compute_vertical_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                   ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE);
+        } else {
+          // here point p is not on segment q
+          Point_2 pnt_on_seg;
+          if (is_positive_slope) {
+            pnt_on_seg = compute_vertical_projection(l, pnt);
+            lver = compute_line_from_to(pnt_on_seg, pnt);
+            lhor = compute_cw_perpendicular(lver, pnt_on_seg);
+
+            if ( cmpx(pnt, t.point()) == EQUAL ) {
+              Comparison_result cytprj = cmpy(t.point(), pnt_on_seg);
+
+              if (cytprj == EQUAL) {
+                // here t equals the projection
+                return POSITIVE;
+              }
+
+              Comparison_result cypntt = cmpy(pnt, t.point());
+
+              if (cypntt == cytprj) {
+                return POSITIVE;
+              } else {
+                return NEGATIVE;
+              }
+            } // end of case where pnt and t have same x
+
+          } else { // is_negative_slope
+            pnt_on_seg = compute_horizontal_projection(l, pnt);
+            lhor = compute_line_from_to(pnt_on_seg, pnt);
+            lver = compute_cw_perpendicular(lhor, pnt_on_seg);
+
+            if ( cmpy(pnt, t.point()) == EQUAL ) {
+              Comparison_result cxtprj = cmpx(t.point(), pnt_on_seg);
+
+              if (cxtprj == EQUAL) {
+                // here t equals the projection
+                return POSITIVE;
+              }
+
+              Comparison_result cxpntt = cmpx(pnt, t.point());
+
+              if (cxpntt == cxtprj) {
+                return POSITIVE;
+              } else {
+                return NEGATIVE;
+              }
+            } // end of case where pnt and t have same y
+
+          }
+        } // end of else of if (is_same_qsrc_p or is_same_qtrg_p)
+
+        // here, use lhor and lver to decide about t
+        // philaris: negative means conflict
+        //           positive means no conflict
+
+        CGAL_SDG_DEBUG(std::cout
+            << "CGAL_SDG_DEBUG: debug incircle_p lhor=("
+            << lhor.a() << " " << lhor.b() << " " << lhor.c()
+            << ") lver=("
+            << lver.a() << " " << lver.b() << " " << lver.c()
+                       << ")" << std::endl ;);
+
+        Oriented_side osh =
+          oriented_side_of_line(lhor, t.point());
+
+        Oriented_side osv =
+          oriented_side_of_line(lver, t.point());
+
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_p osh=" << osh
+                       << " osv=" << osv << std::endl; );
+
+        if ((osh !=
+             ON_NEGATIVE_SIDE) &&
+            (osv !=
+             ON_NEGATIVE_SIDE))
+        {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_p about to return NEG" << std::endl; );
+          return NEGATIVE;
+        } else {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_p about to return POS" << std::endl; );
+          return POSITIVE;
+        }
+
+      } else { // p is a segment and q is a point
+
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p: p segment, q point" << std::endl; );
+
+        // compute slope of segment p
+        Line_2 l = compute_supporting_line(p.supporting_site());
+        bool is_positive_slope =
+          CGAL::sign(l.a()) != CGAL::sign(l.b());
+
+        Point_2 pnt = q.point();
+
+        Oriented_side side_of_pnt;
+        if (same_points(p.source_site(), q) ||
+            same_points(p.target_site(), q)   ) {
+          side_of_pnt = ON_ORIENTED_BOUNDARY;
+        } else {
+          side_of_pnt = oriented_side_of_line(l, pnt);
+        }
+
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_p"
+           << " side_of_pnt=" << side_of_pnt << std::endl; );
+
+        if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
+          CGAL_assertion(same_points(p.source_site(), q) ||
+                         same_points(p.target_site(), q)   );
+        } else {
+          // here, side_of_pnt is non-zero
+          Oriented_side side_of_t = oriented_side_of_line(l, t.point());
+          if (side_of_t == - side_of_pnt) {
+            // q and t on different sides of segment p
+            return POSITIVE;
+          }
+        }
+
+        Line_2 lhor;
+        Line_2 lver;
+
+        bool is_same_psrc_q = same_points(p.source_site(), q);
+        bool is_same_ptrg_q = same_points(p.target_site(), q);
+
+        Segment_2 seg = p.segment();
+
+        if (is_same_psrc_q || is_same_ptrg_q) {
+          const Point_2 otherpnt = is_same_psrc_q ? seg.target() : seg.source();
+          lhor = compute_horizontal_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE );
+          lver = compute_vertical_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE );
+        } else {
+          // here point q is not on segment p
+
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_p q not on p" << std::endl; );
+
+          Point_2 pnt_on_seg;
+          if (is_positive_slope) {
+            pnt_on_seg = compute_horizontal_projection(l, pnt);
+            lhor = compute_horizontal_line_from_to(pnt, pnt_on_seg);
+            lver = compute_perpendicular(lhor, pnt_on_seg);
+
+            if ( cmpy(pnt, t.point()) == EQUAL ) {
+              Comparison_result cxtprj = cmpx(t.point(), pnt_on_seg);
+
+              if (cxtprj == EQUAL) {
+                // here t equals the projection
+                return POSITIVE;
+              }
+
+              Comparison_result cxpntt = cmpx(pnt, t.point());
+
+              if (cxpntt == cxtprj) {
+                return POSITIVE;
+              } else {
+                return NEGATIVE;
+              }
+            } // end of case where pnt and t have same y
+
+          } else { // is_negative_slope
+            pnt_on_seg = compute_vertical_projection(l, pnt);
+            lver = compute_vertical_line_from_to(pnt, pnt_on_seg);
+            lhor = compute_perpendicular(lver, pnt_on_seg);
+
+            if ( cmpx(pnt, t.point()) == EQUAL ) {
+              Comparison_result cytprj = cmpy(t.point(), pnt_on_seg);
+
+              if (cytprj == EQUAL) {
+                // here t equals the projection
+                return POSITIVE;
+              }
+
+              Comparison_result cypntt = cmpy(pnt, t.point());
+
+              if (cypntt == cytprj) {
+                return POSITIVE;
+              } else {
+                return NEGATIVE;
+              }
+            } // end of case where pnt and t have same x
+
+          }
+        } // end of else of if (is_same_psrc_q or is_same_ptrg_q)
+
+        // here, use lhor and lver to decide about t
+        // philaris: negative means conflict
+        //           positive means no conflict
+
+        CGAL_SDG_DEBUG(std::cout
+            << "CGAL_SDG_DEBUG: debug vc incircle_p lhor=("
+            << lhor.a() << " " << lhor.b() << " " << lhor.c()
+            << ") lver=("
+            << lver.a() << " " << lver.b() << " " << lver.c()
+                       << ")" << std::endl ;);
+
+        Oriented_side osh =
+          oriented_side_of_line(lhor, t.point());
+
+        Oriented_side osv =
+          oriented_side_of_line(lver, t.point());
+
+        CGAL_SDG_DEBUG(std::cout << "debug vc incircle_p osh=" << osh
+            << " osv=" << osv << std::endl; );
+
+        if ((osh !=
+             ON_NEGATIVE_SIDE) &&
+            (osv !=
+             ON_NEGATIVE_SIDE))
+        {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_p about to return NEG"
+              << std::endl; );
+          return NEGATIVE;
+        } else {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_p about to return POS"
+              << std::endl; );
+          return POSITIVE;
+        }
+
+      } // end of case where p is a segment and q is a point
+    } // end of case where segment is neither horizontal nor vertical
+  }
+
+  //-----------------------------------------------------------------------
+
+  // philaris: here Linf is very different from L2
+  Sign incircle_pps(const Site_2& p, const Site_2& q,
+		    const Site_2& t) const
+  {
+    CGAL_precondition( p.is_point() && q.is_point() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_pps p=" << p
+      << " q=" << q << " t=" << t << std::endl; );
+
+    const bool is_p_tsrc = same_points(p, t.source_site());
+    const bool is_p_ttrg = same_points(p, t.target_site());
+
+    const bool is_q_tsrc = same_points(q, t.source_site());
+    const bool is_q_ttrg = same_points(q, t.target_site());
+
+    const bool is_p_on_t = is_p_tsrc || is_p_ttrg;
+    const bool is_q_on_t = is_q_tsrc || is_q_ttrg;
+
+    if ( is_p_on_t && is_q_on_t ) {
+	// if t is the segment joining p and q then t must be a vertex
+	// on the convex hull
+	return NEGATIVE;
+    } else {
+      // here, neither p nor q is on t
+      if (is_site_h_or_v(t)) {
+        // here segment is horizontal or vertical;
+        // there are similarities with L2 case here
+
+        if ( is_p_on_t ) {
+          // p is an endpoint of t
+          // in this case the p,q,oo vertex is destroyed only if the
+          // other endpoint of t is beyond
+          Point_2 pt = is_p_tsrc ? t.target() : t.source();
+          Orientation o = CGAL::orientation(p.point(), q.point(), pt);
+          CGAL_SDG_DEBUG(std::cout << "debug incircle_pps p is endp of t: "
+                         << "p = " << p << ", q = " << q << ", t = " << t
+                         << " o = " << o << std::endl; );
+          return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE;
+        } else if ( is_q_on_t ) {
+          Point_2 pt = is_q_tsrc ? t.target() : t.source();
+          Orientation o = CGAL::orientation(p.point(), q.point(), pt);
+          CGAL_SDG_DEBUG(std::cout << "debug incircle_pps q is endp of t: "
+                         << "p = " << p << ", q = " << q << ", t = " << t
+                         << " o = " << o << std::endl; );
+          return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE;
+        } else {
+          // We immediately return POSITIVE here.
+          // This only works because the segment t is hor. or ver. !
+          // If t is neither hor. or ver., we have a more complicated
+          // decision procedure (see below).
+          // Since we insert endpoints of segments first, p and q cannot
+          // be consecutive points on the convex hull, because of the
+          // endpoints of t.
+          return POSITIVE;
+        }
+      } else {
+        // here segment is neither horizontal nor vertical
+
+        // consider corner of infinite square going through
+        // p and q (if you traverse this square ccw, you meet
+        // q first, then p)
+
+        Point_2 pp = p.point();
+        Point_2 qq = q.point();
+
+        Comparison_result cmpxpq = cmpx(pp, qq);
+        Comparison_result cmpypq = cmpy(pp, qq);
+
+        if ((cmpxpq == EQUAL) || (cmpypq == EQUAL)) {
+          if (! (is_p_tsrc || is_q_tsrc)) {
+            if (CGAL::right_turn(pp, qq, t.segment().source())) {
+              return NEGATIVE;
+            }
+          }
+          if (! (is_p_ttrg || is_q_ttrg)) {
+            if (CGAL::right_turn(pp, qq, t.segment().target())) {
+              return NEGATIVE;
+            }
+          }
+          return POSITIVE;
+        } else {
+          // here, p and q do not have any same coordinate
+          if (intersects_segment_interior_inf_box(t, q, p, cmpxpq, cmpypq)) {
+            return NEGATIVE;
+          } else {
+            return POSITIVE;
+          }
+        } // end of case where p and q do not have any same coordinate
+
+        // philaris: execution should never reach here
+        // philaris: code added to avoid warnings on some compilers
+        CGAL_assertion( false );
+        return ZERO;
+
+      } // end of case where segment is neither horizontal nor vertical
+    } // end of case where neither p nor q is on t
+  } // end of incircle_pps
+
+
+  Sign incircle_sps(const Site_2& p, const Site_2& q,
+		    const Site_2& t) const
+  {
+    CGAL_precondition( p.is_segment() && q.is_point() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_sps p=" << p
+      << " q=" << q << " t=" << t << std::endl; );
+
+    bool is_q_tsrc = same_points(q, t.source_site());
+    bool is_q_ttrg = same_points(q, t.target_site());
+
+    bool is_q_on_t = is_q_tsrc || is_q_ttrg;
+
+    bool is_q_psrc = same_points(q, p.source_site());
+    bool is_q_ptrg = same_points(q, p.target_site());
+
+    bool is_q_on_p = is_q_psrc || is_q_ptrg;
+
+
+    if ( is_q_on_t && is_q_on_p) {
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_sps "
+        << "is_q_on_t && is_q_on_p" << std::endl; );
+
+      Point_2 pother = is_q_psrc ? p.target() : p.source();
+      Point_2 tother = is_q_tsrc ? t.target() : t.source();
+
+      Orientation o = CGAL::orientation(pother, q.point(), tother);
+
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_sps or( "
+        << pother << ", " << q.point() << ", " << tother << " ) = "
+        << o << std::endl; );
+
+      if (o != RIGHT_TURN) {
+        return POSITIVE;
+      } else {
+        if (is_site_h_or_v(p) || is_site_h_or_v(t)) {
+          return NEGATIVE;
+        } else {
+          bool has_p_pos_slope = has_positive_slope(p);
+          if (has_p_pos_slope) {
+            return cmpy(pother, q.point()) == cmpy(tother, q.point()) ?
+                   NEGATIVE : POSITIVE;
+          } else {
+            return cmpx(pother, q.point()) == cmpx(tother, q.point()) ?
+                   NEGATIVE : POSITIVE;
+          }
+        }
+      }
+    } else {
+      // philaris: serious difference for Linf here, related to L2
+
+      if ( is_site_h_or_v(p) ) {
+        return POSITIVE;
+      } else {
+        CGAL_assertion(! is_site_h_or_v(p));
+
+        // compute slope of segment p
+        Line_2 l = compute_supporting_line(p.supporting_site());
+        bool is_positive_slope =
+          CGAL::sign(l.a()) != CGAL::sign(l.b());
+
+        Point_2 pnt = q.point();
+
+        Oriented_side side_of_pnt =
+          oriented_side_of_line(l, pnt);
+
+        if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
+          CGAL_assertion(same_points(p.source_site(), q) ||
+                         same_points(p.target_site(), q)   );
+        }
+
+        Line_2 lhor;
+        Line_2 lver;
+
+        bool is_same_psrc_q = same_points(p.source_site(), q);
+        bool is_same_ptrg_q = same_points(p.target_site(), q);
+
+        Point_2 pnt_on_seg;
+        Segment_2 seg = p.segment();
+
+        if (is_same_psrc_q || is_same_ptrg_q) {
+          pnt_on_seg = pnt;
+          Point_2 otherpnt;
+          if (is_same_psrc_q) {
+            otherpnt = seg.target();
+          } else if (is_same_ptrg_q) {
+            otherpnt = seg.source();
+          } else {
+            // unreachable
+            CGAL_assertion( false );
+          }
+
+          lhor = compute_horizontal_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE );
+          lver = compute_vertical_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE );
+        } else {
+          // here point q is not on segment p
+
+          CGAL_SDG_DEBUG(std::cout
+              << "debug: here point q is not on segment p"
+              << std::endl; );
+
+          if (is_positive_slope) {
+            pnt_on_seg = compute_horizontal_projection(l, pnt);
+            lhor = compute_horizontal_line_from_to(pnt, pnt_on_seg);
+            lver = compute_perpendicular(lhor, pnt_on_seg);
+          } else { // is_negative_slope
+            pnt_on_seg = compute_vertical_projection(l, pnt);
+            CGAL_SDG_DEBUG(std::cout
+                << "debug: pnt_on_seg = " << pnt_on_seg
+                << std::endl; );
+            lver = compute_vertical_line_from_to(pnt, pnt_on_seg);
+            lhor = compute_perpendicular(lver, pnt_on_seg);
+          }
+        } // end of else of if (is_same_psrc_q or is_same_ptrg_q)
+
+        // here, use lhor and lver to decide about t
+        // philaris: negative means conflict
+        //           positive means no conflict
+
+        CGAL_SDG_DEBUG(std::cout << "debug: sps "
+          << " lhor=" << lhor.a() << " " << lhor.b() << " " << lhor.c()
+          << " lver=" << lver.a() << " " << lver.b() << " " << lver.c()
+          << std::endl; );
+
+        // philaris: careful here
+        //if (intersects_segment_positive_halfplane(t, lhor) and
+        //    intersects_segment_positive_halfplane(t, lver)    )
+        if (intersects_segment_positive_of_wedge(t, lhor, lver))
+        {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_sps about to return NEG"
+              << std::endl; );
+          return NEGATIVE;
+        } else {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_sps does not cross wedge, "
+              << "check for common endpoint of p and t"
+              << std::endl; );
+
+          bool is_psrc_tsrc =
+            same_points(p.source_site(), t.source_site());
+          bool is_psrc_ttrg =
+            same_points(p.source_site(), t.target_site());
+          bool is_ptrg_tsrc =
+            same_points(p.target_site(), t.source_site());
+          bool is_ptrg_ttrg =
+            same_points(p.target_site(), t.target_site());
+
+          Point_2 testp, otherp;
+
+          if (is_psrc_tsrc || is_ptrg_tsrc) {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_sps tsrc endp of p"
+                << std::endl; );
+
+            if (same_points(q, t.target_site())) {
+              if ( is_site_h_or_v(t) ) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_sps horver-non seg comm"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            }
+
+            testp = t.source_site().point();
+            otherp = t.target_site().point();
+          } else if (is_psrc_ttrg || is_ptrg_ttrg) {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_sps ttrg endp of p"
+                << std::endl; );
+
+            if (same_points(q, t.source_site())) {
+              if ( is_site_h_or_v(t) ) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_sps horver-non seg comm"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            }
+
+            testp = t.target_site().point();
+            otherp = t.source_site().point();
+          } else {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_sps fail endp, return POS"
+                << std::endl; );
+            return POSITIVE;
+          }
+
+          // here p and t have common endpoint testp
+
+          CGAL_SDG_DEBUG(std::cout << "debug testp=" << testp << " pnt="
+            << pnt << " pnt_on_seg=" << pnt_on_seg << std::endl; );
+
+          // check if testp equals pnt_on_seg
+
+          if ((cmpx(testp, pnt_on_seg) == EQUAL ) &&
+              (cmpy(testp, pnt_on_seg) == EQUAL )   ) {
+            // here testp is the same as pnt_on_seg
+
+            Oriented_side oscandidate =
+              oriented_side_of_line(is_positive_slope? lhor : lver,
+                                    otherp);
+
+            if (oscandidate == ON_POSITIVE_SIDE) {
+
+              Oriented_side osq = oriented_side_of_line(l, q.point());
+              Oriented_side ost = oriented_side_of_line(l, otherp);
+
+              CGAL_assertion(osq != ON_ORIENTED_BOUNDARY);
+
+              CGAL_SDG_DEBUG(std::cout << "debug p=" << p << " q=" << q
+                  << " t=" << t << " osq="<< osq
+                  << " ost=" << ost << std::endl;);
+
+              if (osq == ost) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_sps sameside return NEG"
+                    << std::endl; );
+                return NEGATIVE;
+              } else {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_sps diffside return POS"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            } else {
+              CGAL_SDG_DEBUG(std::cout
+                  << "debug incircle_sps NOT othert on POS return POS"
+                  << std::endl; );
+              return POSITIVE;
+            }
+          } else {
+            // here, testp is not the same as pnt_on_seg
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_sps diffpnts return POS"
+                << std::endl; );
+            return POSITIVE;
+          }
+
+        } // end of case where segment does not intersect
+          // positive part of wedge
+
+      } // end of case where p is non-hor and non-ver
+    } // end of case where q is not on t
+  } // end of function incircle_sps
+
+
+  Sign incircle_pss(const Site_2& p, const Site_2& q,
+		    const Site_2& t) const
+  {
+    CGAL_precondition( p.is_point() && q.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_pss (piqt) = ("
+        << p << ") inf (" << q << ") (" << t << ")" << std::endl; );
+
+    bool is_p_tsrc = same_points(p, t.source_site());
+    bool is_p_ttrg = same_points(p, t.target_site());
+
+    bool is_p_on_t = is_p_tsrc || is_p_ttrg;
+
+    bool is_p_qsrc = same_points(p, q.source_site());
+    bool is_p_qtrg = same_points(p, q.target_site());
+
+    bool is_p_on_q = is_p_qsrc || is_p_qtrg;
+
+    if ( is_p_on_t && is_p_on_q ) {
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_pss "
+        << "is_p_on_t && is_p_on_q" << std::endl; );
+
+      Point_2 qother = is_p_qsrc ? q.target() : q.source();
+      Point_2 tother = is_p_tsrc ? t.target() : t.source();
+
+      Orientation o = CGAL::orientation(qother, p.point(), tother);
+
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_pss or( "
+        << qother << ", " << p.point() << ", " << tother << " ) = "
+        << o << std::endl; );
+
+      if (o != LEFT_TURN) {
+        return POSITIVE;
+      } else {
+        if ( is_site_h_or_v(q) || is_site_h_or_v(t) ) {
+          return NEGATIVE;
+        } else {
+          bool has_q_pos_slope = has_positive_slope(q);
+          if (has_q_pos_slope) {
+            return cmpx(qother, p.point()) == cmpx(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          } else {
+            return cmpy(qother, p.point()) == cmpy(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          }
+        }
+      }
+
+      return (o == LEFT_TURN) ? NEGATIVE : POSITIVE;
+    } else {
+      // philaris: serious difference for Linf here, related to L2
+
+      if ( is_site_h_or_v(q) ) {
+        return POSITIVE;
+      } else {
+        CGAL_assertion(! is_site_h_or_v(q));
+
+        Point_2 pnt = p.point();
+
+        // compute slope of segment q
+        Line_2 l = compute_supporting_line(q.supporting_site());
+        bool is_positive_slope =
+          CGAL::sign(l.a()) != CGAL::sign(l.b());
+
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_pss: q has " <<
+          (is_positive_slope ? "positive" : "negative") <<
+          " slope" << std::endl; );
+
+        Oriented_side side_of_pnt =
+          oriented_side_of_line(l, pnt);
+
+        if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
+          CGAL_assertion(same_points(q.source_site(), p) ||
+                         same_points(q.target_site(), p)   );
+        }
+
+        Line_2 lhor;
+        Line_2 lver;
+
+        bool is_same_qsrc_p = same_points(q.source_site(), p);
+        bool is_same_qtrg_p = same_points(q.target_site(), p);
+
+        Point_2 pnt_on_seg;
+        Segment_2 seg = q.segment();
+
+        if (is_same_qsrc_p || is_same_qtrg_p) {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug: pss: p is endpoint of q" << std::endl; );
+          pnt_on_seg = pnt;
+          Point_2 otherpnt;
+          if (is_same_qsrc_p) {
+            otherpnt = seg.target();
+          } else if (is_same_qtrg_p) {
+            otherpnt = seg.source();
+          } else {
+            // unreachable
+            CGAL_assertion( false );
+          }
+
+          lhor = compute_horizontal_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                    ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE );
+          lver = compute_vertical_side_line(
+                   pnt, otherpnt,
+                   is_positive_slope ?
+                   ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE);
+        } else {
+          // here point p is not on segment q
+
+          CGAL_SDG_DEBUG(std::cout
+              << "debug: pss from pt to pt on seg" << std::endl; );
+
+          if (is_positive_slope) {
+            pnt_on_seg = compute_vertical_projection(l, pnt);
+            lver = compute_vertical_line_from_to(pnt, pnt_on_seg);
+            lhor = compute_cw_perpendicular(lver, pnt_on_seg);
+          } else { // is_negative_slope
+            pnt_on_seg = compute_horizontal_projection(l, pnt);
+            lhor = compute_horizontal_line_from_to(pnt, pnt_on_seg);
+            lver = compute_cw_perpendicular(lhor, pnt_on_seg);
+          }
+        } // end of else of if (is_same_qsrc_p or is_same_qtrg_p)
+
+        // here, use lhor and lver to decide about t
+        // philaris: negative means conflict
+        //           positive means no conflict
+
+        CGAL_SDG_DEBUG(std::cout << "debug incircle_pss lhor=("
+          << lhor.a() << " " << lhor.b() << " " << lhor.c()
+          << ") lver=("
+          << lver.a() << " " << lver.b() << " " << lver.c()
+          << ")" << std::endl; );
+
+        // philaris: careful here
+        //if (intersects_segment_negative_halfplane(t, lhor) and
+        //    intersects_segment_negative_halfplane(t, lver)    )
+        if (intersects_segment_negative_of_wedge(t, lhor, lver))
+        {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_pss about to return NEG" << std::endl; );
+          return NEGATIVE;
+        } else {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug incircle_pss does not cross wedge, "
+              << "check for common endpoint of q and t"
+              << std::endl; );
+
+          bool is_qsrc_tsrc =
+            same_points(q.source_site(), t.source_site());
+          bool is_qsrc_ttrg =
+            same_points(q.source_site(), t.target_site());
+          bool is_qtrg_tsrc =
+            same_points(q.target_site(), t.source_site());
+          bool is_qtrg_ttrg =
+            same_points(q.target_site(), t.target_site());
+
+          Point_2 testt, othert;
+
+          if (is_qsrc_tsrc || is_qtrg_tsrc) {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_pss tsrc endp of q" << std::endl; );
+
+            if (same_points(p, t.target_site())) {
+              if ( is_site_h_or_v(t) ) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_sps horver-non seg comm"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            }
+
+            testt = t.source_site().point();
+            othert = t.target_site().point();
+          } else if (is_qsrc_ttrg || is_qtrg_ttrg) {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_pss ttrg endp of q" << std::endl; );
+
+            if (same_points(p, t.source_site())) {
+              if ( is_site_h_or_v(t) ) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_pss horver-non seg comm"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            }
+
+            testt = t.target_site().point();
+            othert = t.source_site().point();
+          } else {
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_pss fail endp, return POS"
+                << std::endl; );
+            return POSITIVE;
+          }
+
+          // here p and t have common endpoint testt
+
+          CGAL_SDG_DEBUG(std::cout << "debug testt=" << testt
+            << " pnt_on_seg=" << pnt_on_seg << std::endl; );
+
+          // check if testp equals pnt_on_seg
+
+          if ((cmpx(testt, pnt_on_seg) == EQUAL ) &&
+              (cmpy(testt, pnt_on_seg) == EQUAL )   ) {
+            // here testt is the same as pnt_on_seg
+
+            Oriented_side oscandidate =
+              oriented_side_of_line(is_positive_slope? lhor : lver,
+                                    othert);
+            CGAL_SDG_DEBUG(std::cout << "debug oscandidate="
+                << oscandidate << std::endl; );
+
+            CGAL_SDG_DEBUG(std::cout << "debug vc other=" << othert
+                << " pnt_on_seg=" << pnt_on_seg << std::endl; );
+
+            if (oscandidate == ON_POSITIVE_SIDE) {
+
+              Oriented_side osp = oriented_side_of_line(l, p.point());
+              Oriented_side ost = oriented_side_of_line(l, othert);
+
+              CGAL_assertion(osp != ON_ORIENTED_BOUNDARY);
+
+              CGAL_SDG_DEBUG(std::cout << "debug p=" << p << " q=" << q
+                  << " t=" << t << " osp="<< osp
+                  << " ost=" << ost << std::endl;);
+
+              if (osp == ost) {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_pss sameside return NEG"
+                    << std::endl; );
+                return NEGATIVE;
+              } else {
+                CGAL_SDG_DEBUG(std::cout
+                    << "debug incircle_pss diffside return POS"
+                    << std::endl; );
+                return POSITIVE;
+              }
+            } else {
+              CGAL_SDG_DEBUG(std::cout
+                  << "debug incircle_pss NOT othert on POS return POS"
+                  << std::endl; );
+              return POSITIVE;
+            }
+          } else {
+            // here, testt is not the same as pnt_on_seg
+            CGAL_SDG_DEBUG(std::cout
+                << "debug incircle_pss diffpnts return POS"
+                << std::endl; );
+            return POSITIVE;
+          }
+
+        } // end of case where segment does not intersect
+          // negative side of wedge
+
+      } // end of case of non-hor and non-ver segment q
+    } // end of case where p is not on t
+  } // end of function incircle_pss
+
+
+  // check if (p, inf, q) conflicts with t
+  Sign incircle_s(const Site_2& p, const Site_2& q,
+		  const Site_2& t) const
+  {
+    CGAL_precondition( t.is_segment() );
+
+    if ( p.is_point() && q.is_point() ) {
+      return incircle_pps(p, q, t);
+    } else if ( p.is_point() && q.is_segment() ) {
+      return incircle_pss(p, q, t);
+    } else { // p is a segment and q is a point
+      return incircle_sps(p, q, t);
+    }
+  }
+
+
+public:
+  typedef Site_2      argument_type;
+  typedef Sign        result_type;
+
+
+  Sign operator()(const Site_2& p, const Site_2& q,
+		  const Site_2& r, const Site_2& t) const
+  {
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: Vertex_conflict entering (pqrt)= ("
+        << p << ") (" << q << ") (" << r << ") (" << t << ")"
+        << std::endl; );
+
+
+#ifdef CGAL_PROFILE
+    // In case CGAL profile is called then output the sites in case of
+    // a filter failure
+    if ( Algebraic_structure_traits<FT>::Is_exact::value ) {
+      int np = 0;
+      if ( p.is_point() ) ++np;
+      if ( q.is_point() ) ++np;
+      if ( r.is_point() ) ++np;
+      std::string suffix("-failure-log.cin");
+      std::string fname;
+      if ( np == 3 ) {
+	fname = "ppp";
+      } else if ( np == 2 ) {
+	fname = "pps";
+      } else if ( np == 1 ) {
+	fname = "pss";
+      } else {
+	fname = "sss";
+      }
+      fname += suffix;
+      std::ofstream ofs(fname.c_str(), std::ios_base::app);
+      ofs.precision(16);
+      ofs << p << std::endl;
+      ofs << q << std::endl;
+      ofs << r << std::endl;
+      ofs << t << std::endl;
+      ofs << "=======" << std::endl;
+      ofs.close();
+    }
+#endif
+
+    Voronoi_vertex_2 v(p, q, r);
+
+    CGAL_SDG_DEBUG(
+        Point_2 temppt = v.point();
+        std::cout
+          << "debug Voronoi_vertex_2 v=" << temppt << std::endl; );
+
+    Sign retval = v.incircle(t);
+
+    CGAL_SDG_DEBUG(std::cout << "debug: Vertex_conflict (pqrt)= ("
+        << p << ") (" << q << ") ("  << r << ") (" << t << ") returns "
+        << retval << std::endl; );
+
+    return retval;
+  }
+
+
+
+
+  // check if (p, q, inf) conflicts with t
+  Sign operator()(const Site_2& p, const Site_2& q,
+		  const Site_2& t) const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug: Vertex_conflict (pqit)= ("
+        << p << ") (" << q << ") inf (" << t << ")"
+        << std::endl; );
+
+#ifdef CGAL_PROFILE
+    // In case CGAL profile is called then output the sites in case of
+    // a filter failure
+    if ( Algebraic_structure_traits<FT>::Is_exact::value ) {
+      std::ofstream ofs("failure-log.cin", std::ios_base::app);
+      ofs.precision(16);
+      ofs << p << std::endl;
+      ofs << q << std::endl;
+      ofs << t << std::endl;
+      ofs << "=======" << std::endl;
+      ofs.close();
+    }
+#endif
+
+    CGAL_assertion( !(p.is_segment() && q.is_segment()) );
+
+    // philaris: the assertion that the point is endpoint of
+    // the segment is not true in Linf (in contrast with L2)
+    /*
+    if ( p.is_point() && q.is_segment() ) {
+      // p must be an endpoint of q
+      CGAL_assertion( same_points(p, q.source_site()) ||
+		      same_points(p, q.target_site()) );
+    } else if ( p.is_segment() && q.is_point() ) {
+      // q must be an endpoint of p
+      CGAL_assertion( same_points(p.source_site(), q) ||
+		      same_points(p.target_site(), q) );
+    }
+    */
+
+    Sign retval;
+
+    if ( t.is_point() ) {
+      //      return incircle_p(p, q, t);
+      retval = incircle_p(q, p, t);
+    } else {
+      // MK::ERROR: do geometric filtering when orientation is called.
+      //    return incircle_s(p, q, t);
+      retval = incircle_s(q, p, t);
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug: Vertex_conflict (pqit)= ("
+        << p << ") (" << q << ") inf (" << t << ")"
+        << " returns " << retval << std::endl; );
+    return retval;
+  }
+
+
+};
+
+//---------------------------------------------------------------------
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VERTEX_CONFLICT_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h
new file mode 100644
index 0000000..b779cab
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_C2_H
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+namespace Internal {
+
+  template<class K,class M> struct Which_Voronoi_vertex_base_C2;
+
+  template<class K>
+  struct Which_Voronoi_vertex_base_C2<K,Integral_domain_without_division_tag>
+  {
+    typedef Voronoi_vertex_ring_C2<K>          Base;
+  };
+
+  template<class K>
+  struct Which_Voronoi_vertex_base_C2<K,Field_with_sqrt_tag>
+  {
+    typedef Voronoi_vertex_sqrt_field_new_C2<K>    Base;
+  };
+} // namespace Internal
+
+//----------------------------------------------------------------------
+
+template<class K, class M>
+class Voronoi_vertex_C2
+  : public Internal::Which_Voronoi_vertex_base_C2<K,M>::Base
+{
+private:
+  typedef typename Internal::Which_Voronoi_vertex_base_C2<K,M>::Base  Base;
+
+protected:
+  typedef typename Base::Site_2   Site_2;
+public:
+  Voronoi_vertex_C2(const Site_2& p, const Site_2& q,
+		    const Site_2& r)
+    : Base(p, q, r) {}
+};
+
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h
new file mode 100644
index 0000000..e6f1427
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h
@@ -0,0 +1,3972 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_RING_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_RING_C2_H
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_x_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_y_2.h>
+#include <CGAL/Side_of_bounded_square_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h>
+#include <CGAL/tuple.h>
+
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+#ifndef CGAL_CFG_NO_CPP0X_TUPLE
+#if (defined(_MSC_VER) && (_MSC_VER < 1700))
+#define sdg_tuple_maker cpp11::make_tuple
+#else
+#define sdg_tuple_maker std::forward_as_tuple
+#endif
+#else
+#define sdg_tuple_maker cpp11::make_tuple
+#endif
+
+template<class K>
+class Voronoi_vertex_ring_C2
+  : public Basic_predicates_C2<K>
+{
+public:
+  typedef Basic_predicates_C2<K> Base;
+
+  typedef enum {PPP = 0, PPS, PSS, SSS} vertex_t;
+  struct PPP_Type {};
+  struct PPS_Type {};
+  struct PSS_Type {};
+  struct SSS_Type {};
+
+  typedef typename Base::Point_2             Point_2;
+  typedef typename Base::Segment_2           Segment_2;
+  typedef typename Base::Line_2              Line_2;
+  typedef typename Base::Direction_2         Direction_2;
+  typedef typename Base::Site_2              Site_2;
+  typedef typename Base::FT                  FT;
+  typedef typename Base::RT                  RT;
+
+  typedef typename Base::Homogeneous_point_2 Homogeneous_point_2;
+
+  typedef typename Base::Orientation         Orientation;
+  typedef typename Base::Comparison_result   Comparison_result;
+  typedef typename Base::Oriented_side       Oriented_side;
+  typedef typename Base::Bounded_side        Bounded_side;
+  typedef typename Base::Sign                Sign;
+
+  typedef typename Base::Polychainline_2     Polychainline_2;
+
+  typedef typename Base::Bearing Bearing;
+
+  using Base::compute_supporting_line;
+  using Base::compute_linf_projection_hom;
+  using Base::compute_linf_projection_nonhom;
+  using Base::oriented_side_of_line;
+  using Base::opposite_line;
+  using Base::compute_line_from_to;
+  using Base::compute_horizontal_projection;
+  using Base::compute_vertical_projection;
+  using Base::compute_linf_perpendicular;
+  using Base::is_site_horizontal;
+  using Base::is_site_vertical;
+  using Base::is_site_h_or_v;
+  using Base::is_line_h_or_v;
+  using Base::test_star;
+  using Base::compute_neg_45_line_at;
+  using Base::compute_pos_45_line_at;
+  using Base::compute_hor_line_at;
+  using Base::compute_ver_line_at;
+  using Base::has_positive_slope;
+  using Base::are_in_same_open_halfspace_of;
+  using Base::horseg_y_coord;
+  using Base::verseg_x_coord;
+  using Base::hvseg_coord;
+  using Base::compute_intersection_of_lines;
+  using Base::is_orth_dist_smaller_than_pt_dist;
+  using Base::touch_same_side;
+  using Base::coord_at;
+  using Base::orient_lines_linf;
+  using Base::compute_line_dir;
+  using Base::bisector_linf_line;
+  using Base::is_endpoint_of;
+  using Base::orient_line_endp;
+  using Base::orient_line_nonendp;
+  using Base::bearing;
+  using Base::bearing_diff;
+  using Base::center_from_corner_and_pt;
+  using Base::points_inside_touching_sides_v;
+  using Base::center_from_opposite_corners;
+  using Base::center_from_same_side_corners;
+  using Base::is_on_hv_seg_line;
+
+private:
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>
+          Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K>
+          Are_same_segments_2;
+  typedef Side_of_bounded_square_2<K>    Side_of_bounded_square_2_Type;
+  typedef Bisector_Linf<K>               Bisector_Linf_Type;
+
+  typedef SegmentDelaunayGraph_2::Compare_x_2<K> Compare_x_2_Sites_Type;
+  typedef SegmentDelaunayGraph_2::Compare_y_2<K> Compare_y_2_Sites_Type;
+
+  Are_same_points_2                same_points;
+  Are_same_segments_2              same_segments;
+  Side_of_bounded_square_2_Type    side_of_bounded_square;
+  Bisector_Linf_Type               bisector_linf;
+  Compare_x_2_Sites_Type           scmpx;
+  Compare_y_2_Sites_Type           scmpy;
+
+private:
+  //--------------------------------------------------------------------------
+
+  inline void
+  compute_v_if_not_computed() const {
+    if (! is_v_computed) {
+      compute_vertex(p_, q_, r_);
+      is_v_computed = true;
+    }
+  }
+
+  void
+  compute_ppp(const Site_2& sp, const Site_2& sq, const Site_2& sr)
+  const
+  {
+    CGAL_precondition( sp.is_point() && sq.is_point() &&
+		       sr.is_point() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug vring entering compute_ppp"
+        << std::endl;);
+
+    Point_2 p = sp.point(), q = sq.point(), r = sr.point();
+
+    compute_ppp(p, q, r);
+  }
+
+  void
+  compute_ppp(const Point_2& p, const Point_2& q, const Point_2& r)
+  const
+  {
+    RT x_min, x_max, y_min, y_max;
+    RT two_x_center, two_y_center;
+    RT two(2);
+
+    bool is_set_x_center(false);
+    bool is_set_y_center(false);
+    bool is_set_x_max(false);
+    bool is_set_y_max(false);
+    bool is_set_x_min(false);
+    bool is_set_y_min(false);
+
+    Comparison_result cmpxqp = CGAL::compare(q.x(), p.x());
+
+    if (cmpxqp == SMALLER) { // q.x() < p.x()
+      x_min = q.x();
+      x_max = p.x();
+    } else if (cmpxqp == LARGER) { // q.x() > p.x()
+      x_min = p.x();
+      x_max = q.x();
+    } else { // q.x() = p.x()
+      x_min = p.x();
+      x_max = p.x();
+      two_y_center = p.y() + q.y();
+      is_set_y_center = true;
+
+      CGAL_SDG_DEBUG(std::cout << "debug set " <<
+        " py, qy =" << p.y() << ' ' << q.y() <<
+        " two_y_center=" << two_y_center << std::endl;);
+
+      Comparison_result cmpxrothers = CGAL::compare(r.x(), p.x());
+      if (cmpxrothers == SMALLER) {
+        CGAL_SDG_DEBUG(std::cout << "debug r is left of p, q" << std::endl;);
+        Comparison_result cmpyrp = CGAL::compare(r.y(), p.y());
+        Comparison_result cmpyrq = CGAL::compare(r.y(), q.y());
+        if (((cmpyrp == LARGER)  && (cmpyrq == LARGER)) ||
+            ((cmpyrp == SMALLER) && (cmpyrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpyrp == LARGER) {
+            y_min = two_y_center - r.y();
+            is_set_y_min = true;
+            CGAL_SDG_DEBUG(std::cout << "debug set y_min=" <<
+              y_min << std::endl;);
+          } else {
+            y_max = two_y_center - r.y();
+            is_set_y_max = true;
+            CGAL_SDG_DEBUG(std::cout << "debug set y_max=" <<
+              y_max << std::endl;);
+          }
+        }
+      } else if (cmpxrothers == LARGER) {
+        CGAL_SDG_DEBUG(std::cout << "debug r is right of p, q" << std::endl;);
+        Comparison_result cmpyrp = CGAL::compare(r.y(), p.y());
+        Comparison_result cmpyrq = CGAL::compare(r.y(), q.y());
+        if (((cmpyrp == LARGER)  && (cmpyrq == LARGER)) ||
+            ((cmpyrp == SMALLER) && (cmpyrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpyrp == LARGER) {
+            y_min = two_y_center - r.y();
+            is_set_y_min = true;
+            CGAL_SDG_DEBUG(std::cout << "debug set y_min=" <<
+              y_min << std::endl;);
+          } else {
+            y_max = two_y_center - r.y();
+            is_set_y_max = true;
+            CGAL_SDG_DEBUG(std::cout << "debug set y_max=" <<
+              y_max << std::endl;);
+          }
+        }
+      } else {
+        // not possible
+      }
+    }
+
+    Comparison_result cmpyqp = CGAL::compare(q.y(), p.y());
+
+    if (cmpyqp == SMALLER) { // q.y() < p.y()
+      if (! is_set_y_min) {
+        y_min = q.y();
+      }
+      if (! is_set_y_max) {
+        y_max = p.y();
+      }
+    } else if (cmpyqp == LARGER) { // q.y() > p.y()
+      if (! is_set_y_min) {
+        y_min = p.y();
+      }
+      if (! is_set_y_max) {
+        y_max = q.y();
+      }
+    } else { //  q.y() = p.y()
+      if (! is_set_y_min) {
+        y_min = p.y();
+      }
+      if (! is_set_y_max) {
+        y_max = p.y();
+      }
+      two_x_center = p.x() + q.x();
+      is_set_x_center = true;
+
+      Comparison_result cmpyrothers = CGAL::compare(r.y(), p.y());
+      if (cmpyrothers == SMALLER) {
+        Comparison_result cmpxrp = CGAL::compare(r.x(), p.x());
+        Comparison_result cmpxrq = CGAL::compare(r.x(), q.x());
+        if (((cmpxrp == LARGER)  && (cmpxrq == LARGER)) ||
+            ((cmpxrp == SMALLER) && (cmpxrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpxrp == LARGER) {
+            x_min = two_x_center - r.x();
+            is_set_x_min = true;
+          } else {
+            x_max = two_x_center - r.x();
+            is_set_x_max = true;
+          }
+        }
+      } else if (cmpyrothers == LARGER) {
+        Comparison_result cmpxrp = CGAL::compare(r.x(), p.x());
+        Comparison_result cmpxrq = CGAL::compare(r.x(), q.x());
+        if (((cmpxrp == LARGER)  && (cmpxrq == LARGER)) ||
+            ((cmpxrp == SMALLER) && (cmpxrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpxrp == LARGER) {
+            x_min = two_x_center - r.x();
+            is_set_x_min = true;
+          } else {
+            x_max = two_x_center - r.x();
+            is_set_x_max = true;
+          }
+        }
+      } else {
+        // not possible
+      }
+
+    }
+
+    Comparison_result cmpxrmin = CGAL::compare(r.x(), x_min);
+    Comparison_result cmpxrmax = CGAL::compare(r.x(), x_max);
+    if (cmpxrmin == SMALLER) {
+	// here r.x() < x_min <= x_max
+        if (! is_set_x_min) {
+          x_min = r.x();
+        }
+    } else if (cmpxrmin == LARGER) {
+      // here r.x() > x_min
+      if (cmpxrmax == LARGER) {
+        // here x_min <= x_max < r.x()
+        if (! is_set_x_max) {
+          x_max = r.x();
+        }
+      } else if (cmpxrmax == SMALLER) {
+        // x_min < r.x() < x_max
+        // do nothing
+      } else { // r.x() = x_max
+        // r.x() = p.x() || r.x() = q.x()
+        if (CGAL::compare(r.x(), p.x()) == EQUAL) {
+          two_y_center = p.y() + r.y();
+          //Comparison_result cmpyqp = CGAL::compare(q.y(),p.y());
+          Comparison_result cmpyqr = CGAL::compare(q.y(),r.y());
+          if ((cmpyqp == LARGER) && (cmpyqr == LARGER)) {
+            y_min = two_y_center - q.y();
+            is_set_y_min = true;
+          }
+          if ((cmpyqp == SMALLER) && (cmpyqr == SMALLER)) {
+            y_max = two_y_center - q.y();
+            is_set_y_max = true;
+          }
+        } else {
+          two_y_center = q.y() + r.y();
+          Comparison_result cmpypq = CGAL::compare(p.y(),q.y());
+          Comparison_result cmpypr = CGAL::compare(p.y(),r.y());
+          if ((cmpypq == LARGER) && (cmpypr == LARGER)) {
+            y_min = two_y_center - p.y();
+            is_set_y_min = true;
+          }
+          if ((cmpypq == SMALLER) && (cmpypr == SMALLER)) {
+            y_max = two_y_center - p.y();
+            is_set_y_max = true;
+          }
+        }
+        is_set_y_center = true;
+      }
+    } else {
+      // here r.x() = x_min
+      // r.x() = p.x() || r.x() = q.x()
+      if (CGAL::compare(r.x(), p.x()) == EQUAL) {
+        CGAL_SDG_DEBUG(std::cout << "debug r.x = p.x" << std::endl;);
+        // r.x() = p.x()
+        two_y_center = p.y() + r.y();
+        //Comparison_result cmpyqp = CGAL::compare(q.y(),p.y());
+        Comparison_result cmpyqr = CGAL::compare(q.y(),r.y());
+        if ((cmpyqp == LARGER) && (cmpyqr == LARGER)) {
+          CGAL_SDG_DEBUG(std::cout << "debug q is above p, r" << std::endl;);
+          y_min = two_y_center - q.y();
+          is_set_y_min = true;
+        }
+        if ((cmpyqp == SMALLER) && (cmpyqr == SMALLER)) {
+          CGAL_SDG_DEBUG(std::cout << "debug q is below p, r" << std::endl;);
+          y_max = two_y_center - q.y();
+          is_set_y_max = true;
+        }
+      } else {
+        // r.x() = q.x()
+        CGAL_SDG_DEBUG(std::cout << "debug r.x = q.x" << std::endl;);
+        two_y_center = q.y() + r.y();
+        Comparison_result cmpypq = CGAL::compare(p.y(),q.y());
+        Comparison_result cmpypr = CGAL::compare(p.y(),r.y());
+        if ((cmpypq == LARGER) && (cmpypr == LARGER)) {
+          CGAL_SDG_DEBUG(std::cout << "debug p is above q, r" << std::endl;);
+          y_min = two_y_center - p.y();
+          is_set_y_min = true;
+        }
+        if ((cmpypq == SMALLER) && (cmpypr == SMALLER)) {
+          CGAL_SDG_DEBUG(std::cout << "debug p is below q, r" << std::endl;);
+          y_max = two_y_center - p.y();
+          is_set_y_max = true;
+        }
+      }
+      is_set_y_center = true;
+    }
+
+    Comparison_result cmpyrmin = CGAL::compare(r.y(), y_min);
+    Comparison_result cmpyrmax = CGAL::compare(r.y(), y_max);
+    if (cmpyrmin == SMALLER) {
+      // here r.y() < y_min <= y_max
+      if (! is_set_y_min) {
+        y_min = r.y();
+      }
+    } else if (cmpyrmin == LARGER) {
+      // here r.y() > y_min
+      if (cmpyrmax == LARGER) {
+        // here y_min <= y_max < r.y()
+        if (! is_set_y_max) {
+          y_max = r.y();
+        }
+      } else if (cmpyrmax == SMALLER) {
+        // y_min < r.y() < y_max
+        // do nothing
+      } else { // r.y() = y_max
+        // r.y() = p.y() || r.y() = q.y()
+        if (CGAL::compare(r.y(), p.y()) == EQUAL) {
+          two_x_center = p.x() + r.x();
+          //Comparison_result cmpxqp = CGAL::compare(q.x(),p.x());
+          Comparison_result cmpxqr = CGAL::compare(q.x(),r.x());
+          if ((cmpxqp == LARGER) && (cmpxqr == LARGER)) {
+            x_min = two_x_center - q.x();
+            is_set_x_min = true;
+          }
+          if ((cmpxqp == SMALLER) && (cmpxqr == SMALLER)) {
+            x_max = two_x_center - q.x();
+            is_set_x_max = true;
+          }
+        } else {
+          two_x_center = q.x() + r.x();
+          Comparison_result cmpxpq = CGAL::compare(p.x(),q.x());
+          Comparison_result cmpxpr = CGAL::compare(p.x(),r.x());
+          if ((cmpxpq == LARGER) && (cmpxpr == LARGER)) {
+            x_min = two_x_center - p.x();
+            is_set_x_min = true;
+          }
+          if ((cmpxpq == SMALLER) && (cmpxpr == SMALLER)) {
+            x_max = two_x_center - p.x();
+            is_set_x_max = true;
+          }
+        }
+        is_set_x_center = true;
+      }
+    } else {
+      // here r.y() = y_min
+      // r.y() = p.y() || r.y() = q.y()
+      if (CGAL::compare(r.y(), p.y()) == EQUAL) {
+        two_x_center = p.x() + r.x();
+        //Comparison_result cmpxqp = CGAL::compare(q.x(),p.x());
+        Comparison_result cmpxqr = CGAL::compare(q.x(),r.x());
+        if ((cmpxqp == LARGER) && (cmpxqr == LARGER)) {
+          x_min = two_x_center - q.x();
+          is_set_x_min = true;
+        }
+        if ((cmpxqp == SMALLER) && (cmpxqr == SMALLER)) {
+          x_max = two_x_center - q.x();
+          is_set_x_max = true;
+        }
+      } else {
+        two_x_center = q.x() + r.x();
+        Comparison_result cmpxpq = CGAL::compare(p.x(),q.x());
+        Comparison_result cmpxpr = CGAL::compare(p.x(),r.x());
+        if ((cmpxpq == LARGER) && (cmpxpr == LARGER)) {
+          x_min = two_x_center - p.x();
+          is_set_x_min = true;
+        }
+        if ((cmpxpq == SMALLER) && (cmpxpr == SMALLER)) {
+          x_max = two_x_center - p.x();
+          is_set_x_max = true;
+        }
+      }
+      is_set_x_center = true;
+    }
+
+    Comparison_result cmpsides =
+	CGAL::compare(x_max - x_min, y_max - y_min);
+
+    // if bounding box is non-square and points are not
+    // on corners of it, then grow it to become square
+    switch(cmpsides) {
+      case SMALLER:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug vring rectangle has to be made fatter" << std::endl;);
+        // make rectangle fatter
+        if (is_set_x_center) {
+          CGAL_SDG_DEBUG(std::cout
+              << "debug vring x_center already set" << std::endl;);
+          // grow in both sides
+          break;
+        }
+        // grow only if any point is inside vertical sides
+	if (((CGAL::compare(p.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(p.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(p.y(), y_min) == LARGER)     ) ||
+	    ((CGAL::compare(q.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(q.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(q.y(), y_min) == LARGER)     ) ||
+	    ((CGAL::compare(r.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(r.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(r.y(), y_min) == LARGER)     )   )
+        { // grow rectangle to the right
+          CGAL_SDG_DEBUG(std::cout << "debug vring grow right" << std::endl;);
+          x_max = x_min + y_max - y_min;
+        } else
+        { // grow rectangle to the left
+          CGAL_SDG_DEBUG(std::cout << "debug vring grow left" << std::endl;);
+          x_min = x_max - y_max + y_min;
+        }
+        break;
+      case LARGER:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug vring rectangle has to be made taller" << std::endl;);
+        // make rectangle taller
+        if (is_set_y_center) {
+          // grow in both sides
+          CGAL_SDG_DEBUG(std::cout << "y_center already set" << std::endl;);
+          break;
+        }
+        // grow only if any point is inside horizontal sides
+	if (((CGAL::compare(p.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(p.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(p.x(), x_min) == LARGER)     ) ||
+	    ((CGAL::compare(q.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(q.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(q.x(), x_min) == LARGER)     ) ||
+	    ((CGAL::compare(r.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(r.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(r.x(), x_min) == LARGER)     )   )
+        { // grow rectangle upwards
+          CGAL_SDG_DEBUG(std::cout
+              << "debug vring grow upwards" << std::endl;);
+          y_max = y_min + x_max - x_min;
+        } else
+        { // grow rectangle downwards
+          CGAL_SDG_DEBUG(std::cout
+              << "debug vring grow downwards" << std::endl;);
+          y_min = y_max - x_max + x_min;
+        }
+        break;
+      case EQUAL:
+        // do nothing
+        break;
+    }
+
+    ux_ = x_min + x_max;
+    uy_ = y_min + y_max;
+    uz_ = RT(2) ;
+  }
+
+  //--------------------------------------------------------------------------
+
+  void
+  compute_pss(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    CGAL_precondition( p.is_point() && q.is_segment() &&
+		       r.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug: compute_pss entering p=" << p
+       << " q=" << q << " r=" << r << std::endl;);
+
+    const bool pq =
+      same_points(p, q.source_site()) || same_points(p, q.target_site());
+    const bool pr =
+      same_points(p, r.source_site()) || same_points(p, r.target_site());
+
+    if ( pq && pr ) {
+      // philaris: result should be point p
+      const Point_2 pp = p.point();
+      ux_ = pp.hx();
+      uy_ = pp.hy();
+      uz_ = pp.hw();
+      return;
+    }
+    const bool is_q_hor = is_site_horizontal(q);
+    const bool is_q_ver = is_site_vertical(q);
+    const bool is_r_hor = is_site_horizontal(r);
+    const bool is_r_ver = is_site_vertical(r);
+    const bool is_q_hv = is_q_hor || is_q_ver;
+    const bool is_r_hv = is_r_hor || is_r_ver;
+    if (is_q_hv && is_r_hv) {
+      compute_pss_both_hv(p, q, r, is_q_hor, is_r_hor, pq, pr);
+    } else {
+      if (pq || pr) {
+        compute_pss_endp(p, q, r,
+            is_q_hv, is_q_hor, pq, is_r_hv, is_r_hor, pr);
+      } else {
+        compute_pss_nonendp(p, q, r,
+            is_q_hv, is_q_hor, is_r_hv, is_r_hor);
+      }
+    }
+  }
+
+  // PSS case when not both segments are axis-parallel and p is
+  // not an endpoint of any of the segments q and r
+  inline void
+  compute_pss_nonendp(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hv, const bool is_q_hor,
+      const bool is_r_hv, const bool is_r_hor)
+  const
+  {
+    CGAL_USE(is_q_hv);
+    CGAL_USE(is_q_hor);
+    CGAL_USE(is_r_hv);
+    CGAL_USE(is_r_hor);
+    const Line_2 lq = orient_line_nonendp(p, q);
+    const Line_2 lr = orient_line_nonendp(p, r);
+    const unsigned int bq = bearing(lq);
+    const unsigned int br = bearing(lr);
+    const unsigned int bdiff = bearing_diff(bq, br);
+    CGAL_assertion( bdiff != 0 );
+    CGAL_assertion( bdiff != 7 );
+
+    if (bdiff == 1) {
+      compute_pss_corner_and_pt(p, q, r, lq, lr, bq, br);
+    } else if (bdiff == 2) {
+      compute_pss_nonhv_consecutive(p, q, r, lq, lr, bq, br);
+    } else if ((bdiff == 3) || (bdiff == 4)) {
+      compute_pss_ortho_wedge(p, q, r, lq, lr, bq, br);
+    } else if (bdiff == 5) {
+      compute_pss_side_p_known(p, q, r, lq, lr, bq, br);
+    } else if (bdiff == 6) {
+      compute_pss_lines_side(p, lq, lr, (br+1)%8);
+    } else {
+      CGAL_assertion( false );
+    }
+    CGAL_assertion_code( is_v_computed = true );
+    CGAL_assertion( oriented_side_of_line(lq, this->point()) != ZERO );
+    CGAL_assertion( oriented_side_of_line(lr, this->point()) != ZERO );
+  }
+
+  inline void
+  compute_pss_lines_side(const Site_2& p,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bside)
+  const
+  {
+    CGAL_precondition(bside % 2 == 1);
+    const bool side_ver = (bside % 4 == 1);
+    const FT pcoord = (side_ver) ? p.point().x() : p.point().y();
+    const FT qcoord = coord_at(lq, pcoord, side_ver);
+    const FT rcoord = coord_at(lr, pcoord, side_ver);
+    const FT sidelen = CGAL::abs(qcoord-rcoord);
+    const int sgn = (bside < 4) ? -1 : +1;
+    const RT two(2);
+    ux_ = side_ver ? (two*pcoord + sgn*sidelen) : (qcoord+rcoord);
+    uy_ = side_ver ? (qcoord+rcoord) : (two*pcoord + sgn*sidelen);
+    uz_ = two;
+  }
+
+  inline void
+  compute_pss_side_p_known(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br)
+  const
+  {
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    const Bearing bside = (br + ((br % 2 == 0) ? 1 : 2)) % 8;
+    const bool l_compute_y = (bside % 4 == 1) ? true : false;
+    const FT pcoord = l_compute_y ? p.point().x() : p.point().y();
+    const FT qcoord = coord_at(lq, pcoord, l_compute_y);
+    const FT rcoord = coord_at(lr, pcoord, l_compute_y);
+    const Point_2 qcorner =
+      l_compute_y ? Point_2(pcoord, qcoord) : Point_2(qcoord, pcoord);
+    const Point_2 rcorner =
+      l_compute_y ? Point_2(pcoord, rcoord) : Point_2(rcoord, pcoord);
+    const Point_2 v =
+      center_from_same_side_corners(rcorner, qcorner, bside);
+    ux_ = v.hx();
+    uy_ = v.hy();
+    uz_ = v.hw();
+  }
+
+  inline void
+  compute_pss_ortho_wedge(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br)
+  const
+  {
+    CGAL_USE(q);
+    CGAL_USE(r);
+    const FT xp = p.point().x();
+    const FT yp = p.point().y();
+    const bool lq_compute_y = ((bq / 2) % 2 == 0) ? false : true;
+    const FT & lq_from_p = lq_compute_y ? xp : yp;
+    const FT & lr_from_p = lq_compute_y ? yp : xp;
+    const FT qcoord = coord_at(lq, lq_from_p, lq_compute_y);
+    const FT rcoord = coord_at(lr, lr_from_p, ! lq_compute_y);
+    const FT qdist = (bq < 4) ? qcoord - lr_from_p :
+                                lr_from_p - qcoord;
+    CGAL_assertion(CGAL::sign(qdist) == POSITIVE);
+    const FT rdist = (bq <= 1) || (bq >= 6) ? rcoord - lq_from_p :
+                                              lq_from_p - rcoord;
+    CGAL_assertion(CGAL::sign(rdist) == POSITIVE);
+    const Comparison_result cmpqr = CGAL::compare(qdist, rdist);
+    const bool q_closer = (cmpqr == SMALLER);
+    const Point_2 corner =
+      q_closer ?
+      (lq_compute_y ? Point_2(xp, qcoord) : Point_2(qcoord, yp)) :
+      (lq_compute_y ? Point_2(rcoord, yp) : Point_2(xp, rcoord)) ;
+    const Bearing bnonhv = (bq % 2 == 1) ? br : bq;
+    CGAL_assertion(bnonhv % 2 == 0);
+    const Line_2 lcorner = (bnonhv % 4 == 0)?
+        compute_neg_45_line_at(corner) :
+        compute_pos_45_line_at(corner) ;
+    const Line_2 & lother = q_closer ? lr : lq;
+    RT hx, hy, hw;
+    compute_intersection_of_lines(lother, lcorner, hx, hy, hw);
+    const Point_2 v =
+      center_from_opposite_corners(Point_2(hx, hy, hw), corner);
+    ux_ = v.hx();
+    uy_ = v.hy();
+    uz_ = v.hw();
+  }
+
+  inline void
+  compute_pss_nonhv_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br)
+  const
+  {
+    const Bearing bqr = (bq+1)%8;
+    return (bqr % 4) == 1 ?
+      compute_pss_x_consecutive(p, q, r, lq, lr, bq, br, bqr) :
+      compute_pss_y_consecutive(p, q, r, lq, lr, bq, br, bqr) ;
+  }
+
+  inline void
+  compute_pss_x_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br,
+      const Bearing bqr)
+  const
+  {
+    CGAL_precondition((bqr == 1) || (bqr == 5));
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    CGAL_USE(br);
+    const FT xp = p.point().x();
+    const FT x =
+      (lr.b()*(lq.b()*xp + lq.c()) - lq.b()*lr.c()) /
+      (lr.b()*(lq.b() -lq.a()) + lq.b()*lr.a()) ;
+    const FT yq = (lq.a()*x + lq.c())/(-lq.b());
+    const FT yr = (lr.a()*x + lr.c())/(-lr.b());
+
+    const FT yp = p.point().y();
+    if (CGAL::compare(yp, yq) == ((bqr == 1) ? SMALLER : LARGER)) {
+      // p close to q
+      const FT xs = coord_at(lq, yp, false);
+      const FT ys = coord_at(lr, xs, true);
+      ux_ = RT(2)*xs + (yp - ys);
+      uy_ = yp + ys;
+    } else if (CGAL::compare(yp, yr) == ((bqr == 1) ? LARGER : SMALLER)) {
+      // p close to r
+      const FT xs = coord_at(lr, yp, false);
+      const FT ys = coord_at(lq, xs, true);
+      ux_ = RT(2)*xs + (ys - yp);
+      uy_ = yp + ys;
+    } else {
+      // p on opposite side of two lines (or on its corners)
+      ux_ = xp + x;
+      uy_ = yq + yr;
+    }
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_pss_y_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br,
+      const Bearing bqr)
+  const
+  {
+    CGAL_precondition((bqr == 3) || (bqr == 7));
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    CGAL_USE(br);
+    const FT yp = p.point().y();
+    const FT y =
+      (lr.a()*(lq.a()*yp - lq.c()) + lq.a()*lr.c()) /
+      (lr.a()*(lq.a() + lq.b()) - lq.a()*lr.b()) ;
+    const FT xq = (lq.b()*y + lq.c())/(-lq.a());
+    const FT xr = (lr.b()*y + lr.c())/(-lr.a());
+
+    const FT xp = p.point().x();
+    if (CGAL::compare(xp, xq) == ((bqr == 3) ? LARGER : SMALLER)) {
+      // p close to q
+      const FT ys = coord_at(lq, xp, true);
+      const FT xs = coord_at(lr, ys, false);
+      ux_ = xp + xs;
+      uy_ = RT(2)*ys + (xs - xp);
+    } else if (CGAL::compare(xp, xr) == ((bqr == 3) ? SMALLER : LARGER)) {
+      // p close to r
+      const FT ys = coord_at(lr, xp, true);
+      const FT xs = coord_at(lq, ys, false);
+      ux_ = xp + xs;
+      uy_ = RT(2)*ys + (xp - xs);
+    } else {
+      // p on opposite side of two lines (or on its corners)
+      ux_ = xq + xr;
+      uy_ = yp + y;
+    }
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_pss_corner_and_pt(const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br)
+  const
+  {
+    const Bearing cb = (bq % 2 == 0) ? bq : br;
+    Point_2 v;
+    const bool is_qsrc_r = is_endpoint_of(q.source_site(), r);
+    if (is_qsrc_r) {
+      v = center_from_corner_and_pt(q.source(), cb, p.point());
+    } else {
+      const bool is_qtrg_r = is_endpoint_of(q.target_site(), r);
+      if (is_qtrg_r) {
+        v = center_from_corner_and_pt(q.target(), cb, p.point());
+      } else {
+        RT cx, cy, cw;
+        compute_intersection_of_lines(lq, lr, cx, cy, cw);
+        v = center_from_corner_and_pt(Point_2(cx, cy, cw), cb, p.point());
+      }
+    }
+    ux_ = v.hx();
+    uy_ = v.hy();
+    uz_ = v.hw();
+  }
+
+
+  // PSS case when not both segments are axis-parallel and p is
+  // an endpoint of one of the segments
+  inline void
+  compute_pss_endp(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hv, const bool is_q_hor, const bool pq,
+      const bool is_r_hv, const bool is_r_hor, const bool pr)
+  const
+  {
+    CGAL_precondition(pq || pr);
+    CGAL_USE(pr);
+    const Line_2 lendp = orient_line_endp(p, (pq ? q : r), pq);
+    const Line_2 lnon = orient_line_nonendp(p, (pq ? r : q));
+    CGAL_SDG_DEBUG(std::cout << "debug compute_pss_endp lendp="
+        << lendp.a() << ' ' << lendp.b() << ' ' << lendp.c() << ' '
+        << std::endl ; );
+    CGAL_SDG_DEBUG(std::cout << "debug compute_pss_endp lnon="
+        << lnon.a() << ' ' << lnon.b() << ' ' << lnon.c() << ' '
+        << std::endl ; );
+    const Line_2 llbis = bisector_linf_line(
+        (pq ? q : r), (pq ? r : q), lendp, lnon);
+    Line_2 lperp;
+    const bool is_hv = pq ? is_q_hv : is_r_hv;
+    if (is_hv) {
+      const bool is_hor = pq ? is_q_hor : is_r_hor;
+      lperp = is_hor ? compute_ver_line_at(p.point()) :
+                       compute_hor_line_at(p.point()) ;
+    } else {
+      lperp = has_positive_slope(pq ? q : r) ?
+        compute_neg_45_line_at(p.point()) :
+        compute_pos_45_line_at(p.point()) ;
+    }
+    CGAL_SDG_DEBUG(std::cout << "debug compute_pss_endp llbis="
+        << llbis.a() << ' ' << llbis.b() << ' ' << llbis.c() << ' '
+        << std::endl ; );
+    CGAL_SDG_DEBUG(std::cout << "debug compute_pss_endp lperp="
+        << lperp.a() << ' ' << lperp.b() << ' ' << lperp.c() << ' '
+        << std::endl ; );
+    compute_intersection_of_lines(llbis, lperp, ux_, uy_, uz_);
+    CGAL_SDG_DEBUG(std::cout << "debug compute_pss_endp vertex="
+        << ux_ << ' ' << uy_ << ' ' << uz_ << ' '
+        << Point_2(ux_, uy_, uz_) << std::endl ; );
+    CGAL_assertion_code( is_v_computed = true );
+    CGAL_assertion( oriented_side_of_line(lendp, this->point()) != ZERO );
+    CGAL_assertion( oriented_side_of_line(lnon, this->point()) != ZERO );
+  }
+
+  // both segments are axis-parallel
+  inline void
+  compute_pss_both_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr)
+  const
+  {
+    CGAL_precondition(! (pq && pr));
+    if (is_q_hor == is_r_hor) {
+      // parallel segments
+      const RT q_coord = hvseg_coord(q, is_q_hor);
+      const RT r_coord = hvseg_coord(r, is_r_hor);
+      RT & upar = is_q_hor ? ux_ : uy_;
+      RT & uort = is_q_hor ? uy_ : ux_;
+      upar = RT(2)*(is_q_hor ? p.point().x() : p.point().y())
+        + (( pq || pr ) ? RT(0) :
+                          RT(is_q_hor ? +1 : -1)*(r_coord - q_coord));
+      uort = q_coord + r_coord;
+      uz_ = RT(2);
+    } else {
+      return compute_pss_both_hv_nonpar(
+          p, q, r, is_q_hor, is_r_hor, pq, pr);
+    }
+  }
+
+  // one segment is horizontal and the other is vertical
+  inline void
+  compute_pss_both_hv_nonpar(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr)
+  const
+  {
+    CGAL_precondition(is_q_hor != is_r_hor);
+    if (pq || pr) {
+      const RT q_coord = hvseg_coord(q, is_q_hor);
+      const RT r_coord = hvseg_coord(r, is_r_hor);
+      const bool is_touched_hor = pq ? is_q_hor : is_r_hor;
+      const RT coord_c = is_touched_hor ? p.point().x() : p.point().y();
+      const RT radius = CGAL::abs(coord_c - (pq ? r_coord : q_coord));
+      RT & upar = is_touched_hor ? ux_ : uy_;
+      RT & uort = is_touched_hor ? uy_ : ux_;
+      const Site_2 & sother =
+        pq ? (same_points(p, q.source_site()) ?
+              q.target_site() : q.source_site()) :
+             (same_points(p, r.source_site()) ?
+              r.target_site() : r.source_site());
+      const bool test = is_touched_hor ?
+        (scmpx(p, sother) == LARGER) : (scmpy(p, sother) == SMALLER);
+      const RT sgn = RT( (pq ? +1: -1)* (test ? -1 : +1) );
+      upar = coord_c;
+      uort = (pq ? q_coord : r_coord) + sgn*radius;
+      uz_ = RT(1);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss vv="
+          << Point_2(ux_, uy_, uz_) << " radius=" << radius << std::endl;);
+      CGAL_assertion_code( const Point_2 pother = sother.point() );
+      CGAL_assertion(pq ?
+          CGAL::left_turn(Point_2(ux_,uy_,uz_), p.point(), pother) :
+          CGAL::left_turn(pother, p.point(), Point_2(ux_,uy_,uz_)) );
+      return;
+    } else {
+      return compute_pss_both_hv_nonpar_nonendp(
+               p, q, r, is_q_hor, is_r_hor, pq, pr);
+    }
+  }
+
+  // one segment is horizontal and the other is vertical and
+  // the point p is not an endpoint of the segments
+  inline void
+  compute_pss_both_hv_nonpar_nonendp(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr)
+  const
+  {
+    CGAL_precondition(! (pq || pr));
+    CGAL_USE(pq);
+    CGAL_USE(pr);
+    const RT q_coord = hvseg_coord(q, is_q_hor);
+    const RT r_coord = hvseg_coord(r, is_r_hor);
+    const RT p_coord_q = is_q_hor ? p.point().y() : p.point().x();
+    const RT p_coord_r = is_r_hor ? p.point().y() : p.point().x();
+    const RT sdistq = p_coord_q - q_coord;
+    const RT sdistr = p_coord_r - r_coord;
+    const RT distq = CGAL::abs(sdistq);
+    const RT distr = CGAL::abs(sdistr);
+    const RT & dx = is_r_hor ? distq : distr;
+    const RT & dy = is_r_hor ? distr : distq;
+    const Comparison_result cmp = CGAL::compare(dx, dy);
+    if (cmp == LARGER) {
+      ux_ = is_q_hor ? (r_coord + p_coord_r) : (q_coord + p_coord_q);
+      uy_ = is_q_hor ? (RT(2)*q_coord + CGAL::sign(sdistq)*dx) :
+                       (RT(2)*r_coord + CGAL::sign(sdistr)*dx) ;
+    } else if (cmp == SMALLER) {
+      uy_ = is_r_hor ? (r_coord + p_coord_r) : (q_coord + p_coord_q);
+      ux_ = is_r_hor ? (RT(2)*q_coord + CGAL::sign(sdistq)*dy) :
+                       (RT(2)*r_coord + CGAL::sign(sdistr)*dy) ;
+    } else {
+      ux_ = is_q_hor ? (r_coord + p_coord_r) : (q_coord + p_coord_q);
+      uy_ = is_q_hor ? (q_coord + p_coord_q) : (r_coord + p_coord_r);
+    }
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_pss_bisectors(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    const bool pq =
+      same_points(p, q.source_site()) || same_points(p, q.target_site());
+    Polychainline_2 goodbisector;
+    if (pq) {
+      goodbisector = bisector_linf(p, q);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss bpq p=" << p
+          << " q=" << q << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss bpq ="
+          << goodbisector << std::endl;);
+    } else {
+      goodbisector = bisector_linf(r, p);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss brp r=" << r
+          << " p=" << p << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss brp ="
+          << goodbisector << std::endl;);
+    }
+
+    Polychainline_2 bqr = bisector_linf(q, r);
+    CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss bqr q=" << q
+        << " r=" << r << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss bqr ="
+        << bqr << std::endl;);
+
+    Point_2 vv = goodbisector.first_intersection_point_with(bqr);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring compute_pss vv=" << vv << std::endl;);
+
+    ux_ = vv.hx();
+    uy_ = vv.hy();
+    uz_ = vv.hw();
+
+  }
+
+
+
+  //--------------------------------------------------------------------------
+
+  inline void
+  compute_pps_endp_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r, const bool is_r_horizontal)
+  const
+  {
+    CGAL_USE(r);
+    const Site_2 & A = p_endp_r ? p : q;
+    const Site_2 & B = p_endp_r ? q : p;
+    const RT Apar = is_r_horizontal ? A.point().x() : A.point().y();
+    const RT Aort = is_r_horizontal ? A.point().y() : A.point().x();
+    const RT Bpar = is_r_horizontal ? B.point().x() : B.point().y();
+    const RT Bort = is_r_horizontal ? B.point().y() : B.point().x();
+    const RT dpar = Apar - Bpar;
+    const RT dort = Aort - Bort;
+    const RT absdpar = CGAL::abs(dpar);
+
+    RT & upar = is_r_horizontal ? ux_ : uy_;
+    RT & uort = is_r_horizontal ? uy_ : ux_;
+
+    if (2*absdpar < CGAL::abs(dort)) {
+      upar = RT(2)*Apar;
+      uort = RT(2)*Aort - dort;
+      uz_ = RT(2);
+    } else {
+      upar = Apar;
+      uort = Aort - CGAL::sign(dort)*absdpar;
+      uz_ = RT(1);
+    }
+  }
+
+  inline void
+  compute_pps_nonendp_hv_samecoord(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_r_horizontal)
+  const
+  {
+    const RT ppar = is_r_horizontal ? p.point().x() : p.point().y();
+    const RT port = is_r_horizontal ? p.point().y() : p.point().x();
+    const RT qort = is_r_horizontal ? q.point().y() : q.point().x();
+    RT & upar = is_r_horizontal ? ux_ : uy_;
+    RT & uort = is_r_horizontal ? uy_ : ux_;
+    const RT segort = (is_r_horizontal)?
+      horseg_y_coord(r) : verseg_x_coord(r);
+    const RT sumort = port + qort;
+    uort = sumort;
+    const int vhsign = is_r_horizontal ? +1 : -1;
+    const int distsign = CGAL::abs(segort-qort) < CGAL::abs(segort-port) ?
+      +1: -1;
+    upar = RT(2)*ppar - RT(vhsign*distsign)*(RT(2)*segort-sumort);
+    uz_ = RT(2);
+  }
+
+  /* compute pps vertex when the points p, q are not endpoints of
+   * segment r, and when segment r is axis-parallel
+   */
+  inline void
+  compute_pps_nonendp_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+                         const bool is_r_horizontal)
+  const
+  {
+    if ((is_r_horizontal     && (scmpx(p, q) == EQUAL)) ||
+        ((! is_r_horizontal) && (scmpy(p, q) == EQUAL))   ) {
+      return compute_pps_nonendp_hv_samecoord(p, q, r, is_r_horizontal);
+    }
+
+    // here, the segment is axis-parallel and the two points:
+    // either: are not sharing a coordinate
+    // or: they share a coordinate AND
+    //     the line connecting the two points is parallel to the segment
+    const Point_2 pp = p.point();
+    const Point_2 qq = q.point();
+    Line_2 l = compute_supporting_line(r);
+    if (oriented_side_of_line(l, pp) == NEGATIVE) {
+      l = opposite_line(l);
+    }
+    CGAL_assertion(oriented_side_of_line(l, pp) == POSITIVE);
+    CGAL_assertion(oriented_side_of_line(l, qq) == POSITIVE);
+
+    const Comparison_result perpcomp =
+      is_r_horizontal ? scmpy(p, q) : scmpx(p, q);
+
+    const RT coordr = hvseg_coord(r, is_r_horizontal);
+
+    RT & upar = is_r_horizontal ? ux_ : uy_;
+    RT & uort = is_r_horizontal ? uy_ : ux_;
+
+    if (perpcomp == EQUAL) {
+      const RT pqdist = is_r_horizontal ?
+        CGAL::abs(pp.x()-qq.x()) : CGAL::abs(pp.y()-qq.y());
+      const RT signrdist = (is_r_horizontal ? pp.y() : pp.x()) - coordr;
+      Comparison_result comp = CGAL::compare(pqdist, CGAL::abs(signrdist));
+      upar = is_r_horizontal ? pp.x() + qq.x() : pp.y() + qq.y();
+      if (comp == LARGER) {
+        uort = RT(2)*coordr + CGAL::sign(signrdist)*pqdist;
+      } else {
+        uort = coordr + (is_r_horizontal ? pp.y() : pp.x());
+      }
+      uz_ = RT(2);
+      return;
+    }
+    // here, perpcomp is not EQUAL
+    const Sign signla = CGAL::sign(l.a());
+    const Sign signlb = CGAL::sign(l.b());
+    const Sign & testsign = is_r_horizontal ? signlb : signla;
+    CGAL_assertion(testsign != ZERO);
+    const Point_2 & farp =
+      testsign == POSITIVE ?
+        (perpcomp == SMALLER ? qq : pp) :
+        (perpcomp == SMALLER ? pp : qq) ;
+    CGAL_assertion(Base::compare_linf_distances_to_line(
+          l, farp == pp ? qq : pp , farp) == SMALLER);
+    const RT pqdist = (CGAL::max)(
+      CGAL::abs(pp.x()-qq.x()), CGAL::abs(pp.y()-qq.y()));
+
+    const RT sdistf = (is_r_horizontal ? farp.y() : farp.x()) - coordr;
+    CGAL_assertion(CGAL::sign(sdistf) == testsign);
+
+    if (CGAL::compare(CGAL::abs(sdistf), pqdist) == LARGER) {
+      const bool is_p_farthest = farp == pp;
+      const Point_2 & closep = (is_p_farthest)? qq : pp;
+      upar = RT(2)* (is_r_horizontal ? closep.x() : closep.y()) +
+        (is_r_horizontal? -1 : +1) * (is_p_farthest? -1 : +1) * sdistf;
+      uort = RT(2)*coordr + sdistf;
+    } else {
+      upar = is_r_horizontal ? pp.x() + qq.x() : pp.y() + qq.y();
+      uort = RT(2)*coordr + CGAL::sign(sdistf)*pqdist;
+    }
+    uz_ = RT(2);
+    return;
+  }
+
+  inline void
+  compute_pps_endp_slope(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r, const bool pos_slope)
+  const
+  {
+    CGAL_USE(r);
+    const Site_2 & A = p_endp_r ? p : q;
+    const Site_2 & B = p_endp_r ? q : p;
+    const RT Ax = A.point().x();
+    const RT Ay = A.point().y();
+    const RT Bx = B.point().x();
+    const RT By = B.point().y();
+    const RT dx = Ax - Bx;
+    const RT dy = Ay - By;
+    const RT absdx = CGAL::abs(dx);
+    const RT absdy = CGAL::abs(dy);
+
+    if (absdx > absdy) {
+      ux_ = RT(2)*Ax - dx;
+      uy_ = RT(2)*Ay - RT(pos_slope? -1 : +1)*dx;
+    } else {
+      ux_ = RT(2)*Ax - RT(pos_slope? -1 : +1)*dy;
+      uy_ = RT(2)*Ay - dy;
+    }
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_pps_endp(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r)
+  const
+  {
+    const bool is_r_horizontal = is_site_horizontal(r);
+    if (is_r_horizontal || is_site_vertical(r)) {
+      return compute_pps_endp_hv(p, q, r, p_endp_r, is_r_horizontal);
+    } else {
+      const bool pos_slope = has_positive_slope(r);
+      return compute_pps_endp_slope(p, q, r, p_endp_r, pos_slope);
+    }
+  }
+
+  /* compute pps vertex when the points p, q are not endpoints of
+   * segment r, when segment r is not axis-parallel, and when the
+   * two points p and q do not share any coordinate
+   */
+  inline void
+  compute_pps_nonendp_nonhv_nonsamec
+  (const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    Line_2 l = compute_supporting_line(r);
+    if (oriented_side_of_line(l, p.point()) == NEGATIVE) {
+      l = opposite_line(l);
+    }
+    CGAL_assertion(oriented_side_of_line(l, p.point()) == POSITIVE);
+    CGAL_assertion(oriented_side_of_line(l, q.point()) == POSITIVE);
+
+    const bool pos_slope = has_positive_slope(r);
+    const Comparison_result first_comp =
+      (pos_slope) ? scmpy(p, q) : scmpx(p, q);
+    const Comparison_result second_comp =
+      (pos_slope) ? scmpx(p, q) : scmpy(p, q);
+
+    const Sign signla = CGAL::sign(l.a());
+    const Sign signlb = CGAL::sign(l.b());
+    const Comparison_result first_value =
+      (signlb == POSITIVE)? SMALLER : LARGER;
+
+    const Comparison_result second_value =
+      (signla == NEGATIVE)? SMALLER : LARGER;
+
+    if (first_comp == first_value) {
+      const RT pcoord = pos_slope ? p.point().x() : p.point().y();
+      const RT lineval = coord_at(l, pcoord, pos_slope);
+      const Point_2 corner = pos_slope?
+        Point_2(pcoord, lineval) : Point_2(lineval, pcoord);
+      const RT sidelen = (CGAL::max)(CGAL::abs(corner.x() - q.point().x()),
+                                     CGAL::abs(corner.y() - q.point().y()));
+      ux_ = RT(2)*corner.x() + signla*sidelen;
+      uy_ = RT(2)*corner.y() + signlb*sidelen;
+      uz_ = RT(2);
+      return;
+    }
+    if (second_comp == second_value) {
+      const RT qcoord = pos_slope ? q.point().y() : q.point().x();
+      const RT lineval = coord_at(l, qcoord, ! pos_slope);
+      const Point_2 corner = pos_slope?
+        Point_2(lineval, qcoord) : Point_2(qcoord, lineval);
+      const RT sidelen = (CGAL::max)(CGAL::abs(corner.x() - p.point().x()),
+                                     CGAL::abs(corner.y() - p.point().y()));
+      ux_ = RT(2)*corner.x() + signla*sidelen;
+      uy_ = RT(2)*corner.y() + signlb*sidelen;
+      uz_ = RT(2);
+      return;
+    }
+
+    CGAL_assertion((first_comp  == -first_value ) &&
+                   (second_comp == -second_value)    );
+
+    const RT px = p.point().x();
+    const RT py = p.point().y();
+    const RT qx = q.point().x();
+    const RT qy = q.point().y();
+    const RT pqdist = (CGAL::max)(CGAL::abs(px - qx), CGAL::abs(py - qy));
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring pqdist=" << pqdist << std::endl;);
+
+    const RT & pcoord = pos_slope ? px : py;
+    const RT plineval = coord_at(l, pcoord, pos_slope);
+    const RT & pothercoord = pos_slope ? py : px;
+    const RT plen = CGAL::abs(plineval -  pothercoord);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring plen=" << plen << std::endl;);
+    if (CGAL::compare(pqdist, plen) != SMALLER) {
+      // here, appropriate projection of p on supporting line of segment r
+      // is shorter than Linf p, q distance
+      const Point_2 corner = pos_slope?
+        Point_2(pcoord, plineval) : Point_2(plineval, pcoord);
+      ux_ = RT(2)*corner.x() + signla*pqdist;
+      uy_ = RT(2)*corner.y() + signlb*pqdist;
+      uz_ = RT(2);
+      return;
+    }
+
+    const RT & qcoord = pos_slope ? qy : qx;
+    const RT qlineval = coord_at(l, qcoord, ! pos_slope);
+    const RT & qothercoord = pos_slope ? qx : qy;
+    const RT qlen = CGAL::abs(qlineval -  qothercoord);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring qlen=" << qlen << std::endl;);
+    if (CGAL::compare(pqdist, qlen) != SMALLER) {
+      // here, appropriate projection of q on supporting line of segment r
+      // is shorter than Linf p, q distance
+      const Point_2 corner = pos_slope?
+        Point_2(qlineval, qcoord) : Point_2(qcoord, qlineval);
+      ux_ = RT(2)*corner.x() + signla*pqdist;
+      uy_ = RT(2)*corner.y() + signlb*pqdist;
+      uz_ = RT(2);
+      return;
+    }
+
+    CGAL_assertion((pqdist < plen) && (pqdist < qlen));
+
+    // here, compute corner opposite of corner on line of segment r
+    const Point_2 opposite_corner = pos_slope ?
+      Point_2(qx, py) : Point_2(px, qy);
+    CGAL_SDG_DEBUG(std::cout << "debug: vring opposite_corner="
+        << opposite_corner << std::endl;);
+
+    const Point_2 corner =
+      compute_linf_projection_nonhom(l, opposite_corner);
+
+    ux_ = corner.x() + opposite_corner.x();
+    uy_ = corner.y() + opposite_corner.y();
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_pps_nonendp_nonhv(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    const bool samexpq = scmpx(p, q) == EQUAL;
+    const bool sameypq = (samexpq)? false : make_certain(scmpy(p, q) == EQUAL);
+    if (! (samexpq || sameypq)) {
+      return compute_pps_nonendp_nonhv_nonsamec(p, q, r);
+    } else {
+      // samexpq || sameypq
+      CGAL_assertion(samexpq != sameypq);
+      Line_2 l = compute_supporting_line(r);
+      const FT common_coord = (samexpq) ? p.point().x() : p.point().y();
+      const FT sumdiffpq = (samexpq) ?
+        p.point().y() + q.point().y() :
+        p.point().x() + q.point().x();
+      const bool pos_slope = has_positive_slope(r);
+      FT vsamecoord;
+      if (touch_same_side(p, q, l, samexpq, pos_slope)) {
+        vsamecoord = common_coord +
+          (pos_slope? +1: -1)*
+            (coord_at(l, common_coord, samexpq) - (sumdiffpq/FT(2)));
+      } else {
+        const FT closest_coord =
+          (samexpq)? ((pos_slope)? q.point().y() : p.point().y()):
+                     ((pos_slope)? p.point().x() : q.point().x());
+        if (is_orth_dist_smaller_than_pt_dist(
+              closest_coord, l, p, q, samexpq)) {
+          vsamecoord =
+            coord_at(l, closest_coord, sameypq) +
+            (((samexpq) ? (q.point().y() - p.point().y()) :
+                          (p.point().x() - q.point().x())  ) / FT(2)) ;
+        } else {
+          const Line_2 lc (
+              (samexpq) ? 1 : (2 * ((pos_slope) ? +1 : -1)),
+              (samexpq) ? (2 * ((pos_slope) ? +1 : -1)) : 1 ,
+              ((pos_slope)? -1 : +1 ) * sumdiffpq - common_coord);
+          RT hx, hy, hz;
+          compute_intersection_of_lines(l, lc, hx, hy, hz);
+          vsamecoord = ((samexpq ? hx/hz : hy/hz) + common_coord)/ FT(2);
+        }
+      }
+      const FT vdiffcoord = sumdiffpq/FT(2);
+      ux_ = (samexpq) ? vsamecoord : vdiffcoord;
+      uy_ = (samexpq) ? vdiffcoord : vsamecoord;
+      uz_ = RT(1);
+    }
+  }
+
+  inline void
+  compute_pps_nonendp(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    const bool is_r_horizontal = is_site_horizontal(r);
+    if (is_r_horizontal || is_site_vertical(r)) {
+      return compute_pps_nonendp_hv(p, q, r, is_r_horizontal);
+    } else {
+      return compute_pps_nonendp_nonhv(p, q, r);
+    }
+  }
+
+  void
+  compute_pps(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    CGAL_precondition( p.is_point() && q.is_point() &&
+		       r.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring compute_pps entering p=" << p
+        << " q=" << q << " r=" << r << std::endl;);
+
+    bool p_endp_r = is_endpoint_of(p, r);
+    bool q_endp_r = is_endpoint_of(q, r);
+
+    if (p_endp_r || q_endp_r) {
+      return compute_pps_endp(p, q, r, p_endp_r);
+    }
+    CGAL_assertion(are_in_same_open_halfspace_of(p, q, r));
+    return compute_pps_nonendp(p, q, r);
+  }
+
+
+  void
+  compute_pps_bisectors(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    CGAL_precondition( p.is_point() && q.is_point() &&
+		       r.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vring compute_pps_bisectors entering p=" << p
+        << " q=" << q << " r=" << r << std::endl;);
+
+    bool p_endp_r = is_endpoint_of(p, r);
+    bool q_endp_r = is_endpoint_of(q, r);
+    Polychainline_2 bpq = bisector_linf(p, q);
+    CGAL_SDG_DEBUG(std::cout << "debug: bpq p="
+        << p << " q=" << q << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "debug: bpq =" << bpq << std::endl;);
+
+    CGAL_assertion(! (p_endp_r && q_endp_r));
+
+    bool samexpq = (scmpx(p, q) == EQUAL);
+    bool sameypq = (scmpy(p, q) == EQUAL);
+
+    bool samecoordpq = samexpq || sameypq ;
+
+    Polychainline_2 goodbisector;
+    if (p_endp_r) {
+      goodbisector = bisector_linf(r, p);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring brp r="
+          << r << " p=" << p << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring brp res="
+          << goodbisector << std::endl;);
+    } else if (q_endp_r) {
+      goodbisector = bisector_linf(q, r);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring bqr q="
+          << q << " r=" << r << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring bqr res="
+          << goodbisector << std::endl;);
+    } else if (samecoordpq) {
+      CGAL_SDG_DEBUG(std::cout << "debug vring PPS samecoordpq"
+          << std::endl;);
+
+      // check which of points p, q is closer to segment r
+
+      bool use_bqr;
+
+      Line_2 l = compute_supporting_line(r.supporting_site());
+
+      if (((CGAL::sign(l.a()) == ZERO) && sameypq) ||
+          ((CGAL::sign(l.b()) == ZERO) && samexpq)   )  {
+        // here l is horizontal or vertical and parallel to pq;
+        // bqr or brp are equally good
+        use_bqr = true;
+      } else {
+        // here l and segment are neither hor. nor ver.
+        Point_2 proj;
+
+        // philaris: tofix with RT
+        FT projft, pft, qft;
+        if (samexpq) {
+          // compute vertical projection
+          proj = compute_vertical_projection(l, p.point());
+          projft = proj.y();
+          pft = p.point().y();
+          qft = q.point().y();
+
+        } else {
+          CGAL_assertion(sameypq);
+          // compute horizontal projection
+          proj = compute_horizontal_projection(l, p.point());
+          projft = proj.x();
+          pft = p.point().x();
+          qft = q.point().x();
+        }
+        Comparison_result cpq, cqproj;
+        cpq    = CGAL::compare(pft, qft);
+        cqproj = CGAL::compare(qft, projft);
+        if (cpq == cqproj) {
+          use_bqr = true;
+        } else {
+          use_bqr = false;
+        }
+      } // end of case of neither hor nor ver segment
+
+      if (use_bqr) {
+        goodbisector = bisector_linf(q, r);
+        CGAL_SDG_DEBUG(std::cout << "debug: vring bqr q="
+            << q << " r=" << r << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug: vring bqr res="
+            << goodbisector << std::endl;);
+      } else {
+        goodbisector = bisector_linf(r, p);
+        CGAL_SDG_DEBUG(std::cout << "debug: vring brp r="
+            << r << " p=" << p << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug: vring brp res="
+            << goodbisector << std::endl;);
+      }
+    } else {
+      goodbisector = bisector_linf(q, r);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring bqr q="
+          << q << " r=" << r << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring bqr res="
+          << goodbisector << std::endl;);
+    }
+
+
+    Point_2 vv = bpq.first_intersection_point_with(goodbisector);
+
+    CGAL_SDG_DEBUG(std::cout << "debug: PPS returns with vv="
+        << vv << std::endl;);
+
+    ux_ = vv.hx();
+    uy_ = vv.hy();
+    uz_ = vv.hw();
+  }
+
+  //--------------------------------------------------------------------------
+
+  void
+  compute_sss(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    CGAL_precondition( p.is_segment() && q.is_segment() &&
+		       r.is_segment() );
+    const bool is_psrc_q = is_endpoint_of(p.source_site(), q);
+    const bool is_psrc_r = is_endpoint_of(p.source_site(), r);
+    const bool is_ptrg_q = is_endpoint_of(p.target_site(), q);
+    const bool is_ptrg_r = is_endpoint_of(p.target_site(), r);
+
+    if (is_psrc_q && is_psrc_r) {
+      ux_ = p.source().hx();
+      uy_ = p.source().hy();
+      uz_ = p.source().hw();
+    } else if (is_ptrg_q && is_ptrg_r) {
+      ux_ = p.target().hx();
+      uy_ = p.target().hy();
+      uz_ = p.target().hw();
+    } else {
+      // here, not all segments have a common point
+
+      const bool is_p_hor = is_site_horizontal(p);
+      const bool is_q_hor = is_site_horizontal(q);
+      const bool is_r_hor = is_site_horizontal(r);
+
+      const bool is_p_hv = is_p_hor || is_site_vertical(p);
+      const bool is_q_hv = is_q_hor || is_site_vertical(q);
+      const bool is_r_hv = is_r_hor || is_site_vertical(r);
+
+      if (is_p_hv && is_q_hv && is_r_hv) {
+        return compute_sss_hv(p, q, r, is_p_hor, is_q_hor, is_r_hor);
+      }
+
+      Line_2 lines[3];
+      orient_lines_linf(p, q, r, lines);
+
+      compute_sss_bisectors(p, q, r, lines);
+      CGAL_assertion_code( is_v_computed = true );
+      CGAL_assertion( oriented_side_of_line(lines[0], this->point()) != ZERO );
+      CGAL_assertion( oriented_side_of_line(lines[1], this->point()) != ZERO );
+      CGAL_assertion( oriented_side_of_line(lines[2], this->point()) != ZERO );
+    }
+  }
+
+  // SSS: all sites are axis-parallel
+  inline void
+  compute_sss_hv(const Site_2 & p, const Site_2 & q, const Site_2 & r,
+      const bool is_p_hor, const bool is_q_hor, const bool is_r_hor)
+  const
+  {
+    CGAL_precondition(! (is_p_hor && is_q_hor && is_r_hor));
+    CGAL_precondition(is_p_hor || is_q_hor || is_r_hor);
+    const unsigned int num_hor =
+      (is_p_hor ? 1 : 0) + (is_q_hor ? 1 : 0) + (is_r_hor ? 1 : 0);
+    CGAL_assertion((num_hor == 1) || (num_hor == 2));
+    const bool are_common_hor = num_hor == 2;
+    const bool is_odd_hor = ! are_common_hor;
+
+    const Site_2 & odd = (is_odd_hor) ?
+      (is_p_hor ? p : (is_q_hor ? q : r)) :
+      (is_p_hor ? (is_q_hor ? r : q) : p);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_horizontal(odd) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_vertical(odd) );
+    const Site_2 & prev = (is_odd_hor) ?
+      (is_p_hor ? r : (is_q_hor ? p : q)) :
+      (is_p_hor ? (is_q_hor ? q : p) : r);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_vertical(prev) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_horizontal(prev) );
+    const Site_2 & next = (is_odd_hor) ?
+      (is_p_hor ? q : (is_q_hor ? r : p)) :
+      (is_p_hor ? (is_q_hor ? p : r) : q);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_vertical(next) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_horizontal(next) );
+
+    const RT prevc = hvseg_coord(prev, are_common_hor);
+    const RT nextc = hvseg_coord(next, are_common_hor);
+    RT & umid = is_odd_hor ? ux_ : uy_;
+    RT & udis = is_odd_hor ? uy_ : ux_;
+    umid = prevc + nextc;
+    udis = RT(2)*hvseg_coord(odd, is_odd_hor) +
+           RT(are_common_hor ? +1 : -1) * (prevc - nextc);
+    uz_ = RT(2);
+  }
+
+  inline void
+  compute_sss_bisectors(const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2 lines[])
+  const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug vring compute_sss_bisectors"
+        << " p=" << p << " q=" << q  << " r=" << r << std::endl;);
+    Line_2 bpq = bisector_linf_line(p, q, lines[0], lines[1]);
+    Line_2 bqr = bisector_linf_line(q, r, lines[1], lines[2]);
+    compute_intersection_of_lines(bpq, bqr, ux_, uy_, uz_);
+  }
+
+  inline void
+  compute_sss_bisectors_old(
+      const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug vring compute_sss_bisectors_old"
+        << " p=" << p << " q=" << q  << " r=" << r << std::endl;);
+    Polychainline_2 bpq = bisector_linf(p, q);
+    Polychainline_2 bqr = bisector_linf(q, r);
+    Point_2 vv = bpq.first_intersection_point_with(bqr);
+    ux_ = vv.hx();
+    uy_ = vv.hy();
+    uz_ = vv.hw();
+  }
+
+  //--------------------------------------------------------------------------
+
+  void
+  analyze_vertex(const Site_2& s1, const Site_2& s2, const Site_2& s3)
+  {
+    if ( s1.is_point() && s2.is_point() && s3.is_point() ) {
+      v_type = PPP;
+    } else if ( s1.is_segment() && s2.is_point() && s3.is_point() ) {
+      pps_idx = 1;
+      v_type = PPS;
+    } else if ( s1.is_point() && s2.is_segment() && s3.is_point() ) {
+      pps_idx = 2;
+      v_type = PPS;
+    } else if ( s1.is_point() && s2.is_point() && s3.is_segment() ) {
+      pps_idx = 0;
+      v_type = PPS;
+    } else if ( s1.is_point() && s2.is_segment() && s3.is_segment() ) {
+      v_type = PSS;
+    } else if ( s1.is_segment() && s2.is_point() && s3.is_segment() ) {
+      v_type = PSS;
+    } else if ( s1.is_segment() && s2.is_segment() && s3.is_point() ) {
+      v_type = PSS;
+    } else {
+      v_type = SSS;
+    }
+  }
+
+  void
+  compute_vertex(const Site_2& s1, const Site_2& s2, const Site_2& s3)
+  const
+  {
+    CGAL_assertion( ! is_v_computed );
+    CGAL_SDG_DEBUG(std::cout << "debug vring compute_vertex "
+        << s1 << ' ' << s2 << ' ' << s3 << std::endl;);
+    if ( v_type == PPP ) {
+      compute_ppp(s1, s2, s3);
+
+    } else if ( s1.is_segment() && s2.is_point() && s3.is_point() ) {
+      compute_pps(s2, s3, s1);
+    } else if ( s1.is_point() && s2.is_segment() && s3.is_point() ) {
+      compute_pps(s3, s1, s2);
+    } else if ( s1.is_point() && s2.is_point() && s3.is_segment() ) {
+      compute_pps(s1, s2, s3);
+
+    } else if ( s1.is_point() && s2.is_segment() && s3.is_segment() ) {
+      compute_pss(s1, s2, s3);
+    } else if ( s1.is_segment() && s2.is_point() && s3.is_segment() ) {
+      compute_pss(s2, s3, s1);
+    } else if ( s1.is_segment() && s2.is_segment() && s3.is_point() ) {
+      compute_pss(s3, s1, s2);
+    } else {
+      compute_sss(s1, s2, s3);
+    }
+    is_v_computed = true;
+  }
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  //                           the orientation test
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  Orientation
+  orientation(const Line_2& l, PPP_Type) const
+  {
+    Sign s_uz = CGAL::sign(uz_);
+    Sign s_l =
+      CGAL::sign(l.a() * ux_ + l.b() * uy_ + l.c() * uz_);
+
+    return s_uz * s_l;
+  }
+
+
+  //--------------------------------------------------------------------------
+
+  Orientation
+  orientation(const Line_2& l, PPS_Type) const
+  {
+    Sign s_uz = CGAL::sign(uz_);
+    Sign s_l = CGAL::sign(l.a() * ux_ + l.b() * uy_ + l.c() * uz_);
+
+    return s_uz * s_l;
+  }
+
+
+  //--------------------------------------------------------------------------
+
+  // the cases PSS and SSS are identical
+  template<class Type>
+  Orientation
+  orientation(const Line_2& l, Type) const
+  {
+    Sign s_uz = CGAL::sign(uz_);
+    Sign s_l = CGAL::sign(l.a() * ux_ + l.b() * uy_ + l.c() * uz_);
+
+    return s_uz * s_l;
+  }
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  //                              the incircle test
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  //--------------------------------------------------------------------------
+  //  the incircle test when the fourth site is a point
+  //--------------------------------------------------------------------------
+
+  //--------------------------------------------------------------------------
+
+  Sign check_easy_degeneracies(const Site_2& t, PPS_Type,
+			       bool& use_result) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    use_result = false;
+    if (  ( p_.is_point() && same_points(p_, t) ) ||
+	  ( q_.is_point() && same_points(q_, t) ) ||
+	  ( r_.is_point() && same_points(r_, t) )  ) {
+      use_result = true;
+      return ZERO;
+    }
+
+    if (
+      ( p_.is_segment() && is_endpoint_of(t, p_) ) ||
+      ( q_.is_segment() && is_endpoint_of(t, q_) ) ||
+      ( r_.is_segment() && is_endpoint_of(t, r_) )  )
+    {
+      use_result = true;
+      return POSITIVE;
+    }
+
+    if (
+      ( p_.is_segment() && is_on_hv_seg_line(t, p_) ) ||
+      ( q_.is_segment() && is_on_hv_seg_line(t, q_) ) ||
+      ( r_.is_segment() && is_on_hv_seg_line(t, r_) )  )
+    {
+      use_result = true;
+      return POSITIVE;
+    }
+
+    return ZERO;
+  }
+
+  inline
+  Sign check_easy_degeneracies(const Site_2& t, PSS_Type,
+			       bool& use_result) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    return check_easy_degeneracies(t, PPS_Type(), use_result);
+  }
+
+  inline
+  Sign check_easy_degeneracies(const Site_2& t, SSS_Type,
+			       bool& use_result) const
+  {
+    CGAL_precondition( t.is_point() );
+    use_result = false;
+    if (is_endpoint_of(t, p_) || is_endpoint_of(t, q_) ||
+        is_endpoint_of(t, r_) ) {
+      use_result = true;
+      return POSITIVE;
+    }
+    return ZERO;
+  }
+
+  //--------------------------------------------------------------------------
+
+  template<class Type>
+  inline
+  Sign incircle_p(const Site_2& st, Type type) const
+  {
+    CGAL_precondition( st.is_point() );
+
+    bool use_result(false);
+    Sign s = check_easy_degeneracies(st, type, use_result);
+    if ( use_result ) { return s; }
+
+    return incircle_p_no_easy(st, type);
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& st, PPP_Type) const
+  {
+    CGAL_precondition( st.is_point() );
+
+    Point_2 t = st.point();
+
+    Bounded_side bs =
+      side_of_bounded_square(p_.point(), q_.point(), r_.point(), t);
+
+    switch(bs) {
+      case ON_UNBOUNDED_SIDE:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns POSITIVE" << std::endl;);
+        return POSITIVE;
+      case ON_BOUNDED_SIDE:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns NEGATIVE" << std::endl;);
+        return NEGATIVE;
+      default:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns ZERO" << std::endl;);
+        return ZERO;
+    }
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p_no_easy(const Site_2& st, PPS_Type ) const
+  {
+    CGAL_precondition( st.is_point() );
+    compute_v_if_not_computed();
+
+    CGAL_SDG_DEBUG(std::cout << "debug vring incircle_p_no_easy PPS p="
+      << p_ << " q=" << q_  << " r=" << r_ << " t=" << st
+      << std::endl;);
+
+    Point_2 t = st.point();
+
+    Point_2 pointref = p_ref().point();
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug vring incircle_p_no_easy PPS pointref="
+        << pointref << std::endl;);
+
+    RT vx = ux_ - pointref.x() * uz_;
+    RT vy = uy_ - pointref.y() * uz_;
+
+    RT Rs =
+      (CGAL::max) ( CGAL::abs(vx), CGAL::abs(vy) );
+
+    RT scalediffdvtx = ux_ - t.x() * uz_;
+    RT scalediffdvty = uy_ - t.y() * uz_;
+
+    RT Rs1 =
+      (CGAL::max)(
+        CGAL::abs(scalediffdvtx),
+        CGAL::abs(scalediffdvty) );
+
+
+    Sign crude = CGAL::sign(Rs1 - Rs);
+
+    if (crude != ZERO) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug vring refining in incircle_p_no_easy PPS pqr=("
+          << p_ << ", " << q_ << ", " << r_ << "), "
+          << "t=" << t
+          << std::endl;);
+      // here crude == ZERO, so
+      // we might have to refine
+
+      // tocheck
+
+      const cpp11::tuple<
+        const Site_2 &, const Site_2 &, const Site_2 &> sites =
+         r_.is_segment() ? sdg_tuple_maker(p_, q_, r_) :
+        (p_.is_segment() ? sdg_tuple_maker(q_, r_, p_) :
+                           sdg_tuple_maker(r_, p_, q_) );
+
+      const Site_2 & p1 = cpp11::get<0>(sites);
+      const Site_2 & p2 = cpp11::get<1>(sites);
+      const Site_2 & s  = cpp11::get<2>(sites);
+
+      const RT d_fine = (CGAL::min)(CGAL::abs(scalediffdvtx),
+                                    CGAL::abs(scalediffdvty));
+      for (size_t i = 0; i < 2; ++i) {
+        const Site_2 & cur = (i == 0) ? p1 : p2;
+        const Point_2 pref = cur.point();
+        const RT scalediffdvpx = ux_ - pref.x() * uz_;
+        const RT scalediffdvpy = uy_ - pref.y() * uz_;
+
+        Comparison_result sidecmp = EQUAL;
+        const bool p_t_samex =
+          CGAL::compare(scalediffdvpx, scalediffdvtx) == EQUAL;
+        const bool p_t_on_same_ver_side =
+          (p_t_samex) &&
+          (CGAL::compare(CGAL::abs(scalediffdvpx), Rs1) == EQUAL) ;
+        if (p_t_on_same_ver_side) {
+          sidecmp = CGAL::compare(d_fine, CGAL::abs(scalediffdvpy));
+        }
+        const bool p_t_samey =
+          CGAL::compare(scalediffdvpy, scalediffdvty) == EQUAL;
+        const bool p_t_on_same_hor_side =
+          (p_t_samey) &&
+          (CGAL::compare(CGAL::abs(scalediffdvpy), Rs1) == EQUAL) ;
+        if (p_t_on_same_hor_side) {
+          sidecmp = CGAL::compare(d_fine, CGAL::abs(scalediffdvpx));
+        }
+        CGAL_SDG_DEBUG(std::cout << "vring test with p=" << cur
+            << ", sidecmp=" << sidecmp << std::endl; );
+        if (sidecmp == SMALLER) {
+          return NEGATIVE;
+        } else if (sidecmp == LARGER) {
+          return POSITIVE;
+        }
+      }
+
+      const bool is_s_hor = is_site_horizontal(s);
+      const bool is_s_ver = is_site_vertical(s);
+
+      const bool is_p1_endp_of_s = is_endpoint_of(p1, s);
+      const bool is_p2_endp_of_s = is_endpoint_of(p2, s);
+
+      // check for p, q with same coordinate and r non-hv segment
+      if ((! (is_s_hor || is_s_ver)) &&
+          (! (is_p1_endp_of_s || is_p2_endp_of_s))
+         ) {
+        CGAL_SDG_DEBUG(std::cout << "debug vring seg=" << s
+            << " is non-axis parallel"
+            << " and no points are its endpoints" << std::endl;);
+        const bool pqsamex = scmpx(p1, p2) == EQUAL;
+        bool pqsamey (false);
+        if (pqsamex) {
+          CGAL_SDG_DEBUG(std::cout << "debug vring points have same x, "
+              << " might be on same Linf vertical side"
+              << std::endl;);
+        } else {
+          pqsamey = scmpy(p1, p2) == EQUAL;
+          if (pqsamey) {
+            CGAL_SDG_DEBUG(std::cout << "debug vring points have same y, "
+                << " might be on same Linf horizontal side" << std::endl;);
+          }
+        }
+        if (pqsamex || pqsamey) {
+          Line_2 lr = compute_supporting_line(s.supporting_site());
+          Homogeneous_point_2 rref = compute_linf_projection_hom(lr, point());
+          if ( pqsamex && (CGAL::compare(rref.x(), pointref.x()) == EQUAL) ) {
+            RT scalediffdvry = uy_ - rref.y() * uz_;
+            if (CGAL::sign(scalediffdvry) == CGAL::sign(scalediffdvty)) {
+              if (CGAL::compare(CGAL::abs(scalediffdvtx),
+                                CGAL::abs(scalediffdvty)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of pqsamex and rref same x case
+          if ( pqsamey && (CGAL::compare(rref.y(), pointref.y()) == EQUAL) ) {
+            RT scalediffdvrx = ux_ - rref.x() * uz_;
+            if (CGAL::sign(scalediffdvrx) == CGAL::sign(scalediffdvtx)) {
+              if (CGAL::compare(CGAL::abs(scalediffdvty),
+                                CGAL::abs(scalediffdvtx)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of pqsamey and rref same y case
+        } // end of case: pqsamex || pqsamey
+      } // end of non-hv segment r case with p, q non-endpoints of r
+
+      return ZERO;
+
+      //FT radius_fine = linf_fine_radius(vv, p, q, r, type);
+
+      //return CGAL::compare(d_fine, radius_fine);
+
+    }
+
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p_no_easy(const Site_2& st, PSS_Type ) const
+  {
+    CGAL_precondition( st.is_point() );
+    compute_v_if_not_computed();
+    const Point_2 t = st.point();
+
+    const Point_2 pref = p_ref().point();
+
+    const RT xref = pref.x();
+    const RT yref = pref.y();
+
+    const RT vx = ux_ - xref * uz_;
+    const RT vy = uy_ - yref * uz_;
+
+    const RT Rs =
+      (CGAL::max) ( CGAL::abs(vx), CGAL::abs(vy) );
+
+    const RT tx = t.x() ;
+    const RT ty = t.y() ;
+
+    const RT scalediffdvtx = ux_ - tx * uz_;
+    const RT scalediffdvty = uy_ - ty * uz_;
+
+    const RT Rs1 =
+      (CGAL::max)(
+        CGAL::abs(scalediffdvtx),
+        CGAL::abs(scalediffdvty) );
+
+    const Sign s_Q = CGAL::sign(Rs1 - Rs);
+
+    if (s_Q != ZERO) {
+      return s_Q;
+    } else {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug vring refining in incircle_p_no_easy PSS pqr=("
+          << p_ << ", " << q_ << ", " << r_ << "), "
+          << "t=" << t
+          << std::endl;);
+      // here crude == ZERO, so
+      // we might have to refine
+
+      // tocheck
+
+      const cpp11::tuple<
+        const Site_2 &, const Site_2 &, const Site_2 &> sites =
+         p_.is_point() ? sdg_tuple_maker(p_, q_, r_) :
+        (q_.is_point() ? sdg_tuple_maker(q_, r_, p_) :
+                         sdg_tuple_maker(r_, p_, q_) );
+
+      const Site_2 & pt_site = cpp11::get<0>(sites);
+      const Site_2 & s1 = cpp11::get<1>(sites);
+      const Site_2 & s2 = cpp11::get<2>(sites);
+
+      const bool is_s1src_s2 = is_endpoint_of(s1.source_site(), s2);
+      const bool is_s1trg_s2 = is_endpoint_of(s1.target_site(), s2);
+
+      if (is_s1src_s2 || is_s1trg_s2) {
+        if ((is_site_h_or_v(s1) && (! is_site_h_or_v(s2))) ||
+            (is_site_h_or_v(s2) && (! is_site_h_or_v(s1)))   )
+        {
+          CGAL_SDG_DEBUG(std::cout << "debug vring "
+              << "s1, s2 candidates" << std::endl; );
+          if (is_site_horizontal(s1) || is_site_horizontal(s2)) {
+            Site_2 s1test = is_s1src_s2?
+                       (s1.source_site()):
+                       (s1.target_site());
+            if (scmpx(s1test, st)
+                == EQUAL)
+            {
+              // return NEGATIVE or ZERO
+              Point_2 s1ref =
+                      (is_s1src_s2?
+                       s1.source_site(): s1.target_site())
+                      .point();
+              RT scalediffdvs1y = uy_ - s1ref.y() * uz_;
+              Comparison_result test =
+                CGAL::compare(
+                    CGAL::abs(scalediffdvty),
+                    CGAL::abs(scalediffdvs1y));
+              return (test == SMALLER) ? NEGATIVE : ZERO;
+            }
+          } else { // one of q, r is vertical
+            if (scmpy(is_s1src_s2?
+                      s1.source_site(): s1.target_site(), st)
+                == EQUAL)
+            {
+              // return NEGATIVE or ZERO
+              CGAL_SDG_DEBUG(std::cout << "debug vring "
+                  << "vertical case" << std::endl; );
+              Point_2 s1ref =
+                      (is_s1src_s2?
+                       s1.source_site(): s1.target_site())
+                      .point();
+              RT scalediffdvs1x = ux_ - s1ref.x() * uz_;
+              CGAL_SDG_DEBUG(std::cout << "debug vring "
+                  << "scalediffdvs1x=" << scalediffdvs1x
+                  << " scalediffdvtx=" << scalediffdvtx << std::endl; );
+              Comparison_result test =
+                CGAL::compare(
+                    CGAL::abs(scalediffdvtx),
+                    CGAL::abs(scalediffdvs1x));
+              return (test == SMALLER) ? NEGATIVE : ZERO;
+            }
+          }
+        }
+      }
+
+      const RT d_fine = (CGAL::min)(CGAL::abs(scalediffdvtx),
+                                    CGAL::abs(scalediffdvty));
+      const Point_2 pref = pt_site.point();
+      const RT scalediffdvpx = ux_ - pref.x() * uz_;
+      const RT scalediffdvpy = uy_ - pref.y() * uz_;
+      Comparison_result sidecmp = EQUAL;
+      const bool p_t_samex =
+        CGAL::compare(scalediffdvpx, scalediffdvtx) == EQUAL;
+      const bool p_t_on_same_ver_side =
+        (p_t_samex) &&
+        (CGAL::compare(CGAL::abs(scalediffdvpx), Rs1) == EQUAL) ;
+      if (p_t_on_same_ver_side) {
+        sidecmp = CGAL::compare(d_fine, CGAL::abs(scalediffdvpy));
+      }
+      const bool p_t_samey =
+        CGAL::compare(scalediffdvpy, scalediffdvty) == EQUAL;
+      const bool p_t_on_same_hor_side =
+        (p_t_samey) &&
+        (CGAL::compare(CGAL::abs(scalediffdvpy), Rs1) == EQUAL) ;
+      if (p_t_on_same_hor_side) {
+        sidecmp = CGAL::compare(d_fine, CGAL::abs(scalediffdvpx));
+      }
+      CGAL_SDG_DEBUG(std::cout << "debug: PSS temporary sidecmp = "
+          << sidecmp << std::endl;);
+      if (sidecmp == SMALLER) {
+        return NEGATIVE;
+      } else if (sidecmp == LARGER) {
+        return POSITIVE;
+      }
+
+      if (p_t_samex || p_t_samey) {
+        return ZERO;
+      }
+
+      if (! is_site_h_or_v(s1)) {
+        // here s1 is non-axis parallel
+        // therefore, it touches the square at a corner
+        if (points_inside_touching_sides_v(
+              s1, pt_site, s2, st, this->point())) {
+          return NEGATIVE;
+        }
+      }
+
+      if (! is_site_h_or_v(s2)) {
+        // here s2 is non-axis parallel
+        // therefore, it touches the square at a corner
+        if (points_inside_touching_sides_v(
+              s2, pt_site, s1, st, this->point())) {
+          return NEGATIVE;
+        }
+      }
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug vring PSS P return final ZERO"
+          << std::endl;);
+      return ZERO;
+    }
+
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p_no_easy(const Site_2& st, SSS_Type ) const
+  {
+    CGAL_precondition( st.is_point() );
+    compute_v_if_not_computed();
+
+    Point_2 t = st.point();
+
+    Line_2 l = compute_supporting_line(p_.supporting_site());
+    Homogeneous_point_2 hp = compute_linf_projection_hom(l, point());
+
+    RT dup =
+      (CGAL::max)(CGAL::abs(ux_ - hp.x() * uz_),
+                  CGAL::abs(uy_ - hp.y() * uz_));
+
+    RT scalediffdvtx = ux_ - t.x() * uz_;
+    RT scalediffdvty = uy_ - t.y() * uz_;
+
+    RT dut =
+      (CGAL::max)(
+        CGAL::abs(scalediffdvtx),
+        CGAL::abs(scalediffdvty) );
+
+    Sign crude_sign = CGAL::sign(dut - dup);
+    if (crude_sign != ZERO) {
+      return crude_sign;
+    } else {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug vring refining in incircle_p_no_easy SSS pqr=("
+          << p_ << ", " << q_ << ", " << r_ << "), "
+          << "t=" << t
+          << std::endl;);
+
+      const Site_2 * s1_ptr;
+      const Site_2 * s2_ptr;
+
+      const Site_2 * s1ptr_arr[] = {&p_, &q_, &r_};
+      const Site_2 * s2ptr_arr[] = {&q_, &r_, &p_};
+
+      for (int i = 0; i < 3; i++) {
+        s1_ptr = s1ptr_arr[i];
+        s2_ptr = s2ptr_arr[i];
+
+        CGAL_SDG_DEBUG(std::cout << "debug vring check for candidates"
+            << "(s1, s2) = " << *s1_ptr << ", " << *s2_ptr << std::endl; );
+
+        bool is_s1src_s2 = is_endpoint_of((*s1_ptr).source_site(), *s2_ptr);
+        bool is_s1trg_s2 = is_endpoint_of((*s1_ptr).target_site(), *s2_ptr);
+
+        if (is_s1src_s2 || is_s1trg_s2) {
+          if ((is_site_h_or_v(*s1_ptr) && (! is_site_h_or_v(*s2_ptr))) ||
+              (is_site_h_or_v(*s2_ptr) && (! is_site_h_or_v(*s1_ptr)))   )
+          {
+            CGAL_SDG_DEBUG(std::cout << "debug vring "
+                << "s1, s2 candidates" << std::endl; );
+            if (is_site_horizontal(*s1_ptr) || is_site_horizontal(*s2_ptr)) {
+              Site_2 s1test = is_s1src_s2?
+                ((*s1_ptr).source_site()):
+                ((*s1_ptr).target_site());
+              if (scmpx(s1test, st)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                Point_2 s1ref =
+                  (is_s1src_s2?
+                   (*s1_ptr).source_site(): (*s1_ptr).target_site())
+                  .point();
+                RT scalediffdvs1y = uy_ - s1ref.y() * uz_;
+                Comparison_result test =
+                  CGAL::compare(
+                      CGAL::abs(scalediffdvty),
+                      CGAL::abs(scalediffdvs1y));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            } else { // one of q, r is vertical
+              if (scmpy(is_s1src_s2?
+                    (*s1_ptr).source_site(): (*s1_ptr).target_site(), st)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                CGAL_SDG_DEBUG(std::cout << "debug vring "
+                    << "vertical case" << std::endl; );
+                Point_2 s1ref =
+                  (is_s1src_s2?
+                   (*s1_ptr).source_site(): (*s1_ptr).target_site())
+                  .point();
+                RT scalediffdvs1x = ux_ - s1ref.x() * uz_;
+                CGAL_SDG_DEBUG(std::cout << "debug vring "
+                    << "scalediffdvs1x=" << scalediffdvs1x
+                    << " scalediffdvtx=" << scalediffdvtx << std::endl; );
+                Comparison_result test =
+                  CGAL::compare(
+                      CGAL::abs(scalediffdvtx),
+                      CGAL::abs(scalediffdvs1x));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            }
+          }
+        }
+      } // end for
+
+
+
+
+
+      return ZERO;
+    }
+  }
+
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& t) const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug: entering vring incircle_p with "
+      << "v_type=" << v_type << " p="
+      << p_ << " q=" << q_ << " r=" << r_ << " t=" << t
+      << std::endl;);
+
+    if ( is_degenerate_Voronoi_circle() ) {
+      return POSITIVE;
+    }
+
+    Sign s(ZERO);
+    switch ( v_type ) {
+    case PPP:
+      s = incircle_p(t, PPP_Type());
+      break;
+    case PPS:
+      s = incircle_p(t, PPS_Type());
+      break;
+    case PSS:
+      s = incircle_p(t, PSS_Type());
+      break;
+    case SSS:
+      s = incircle_p(t, SSS_Type());
+      break;
+    }
+
+    return s;
+  }
+
+  Sign incircle_p_no_easy(const Site_2& t) const
+  {
+    Sign s(ZERO);
+    switch ( v_type ) {
+    case PPP:
+      s = incircle_p(t, PPP_Type());
+      break;
+    case PPS:
+      s = incircle_p_no_easy(t, PPS_Type());
+      break;
+    case PSS:
+      s = incircle_p_no_easy(t, PSS_Type());
+      break;
+    case SSS:
+      s = incircle_p_no_easy(t, SSS_Type());
+      break;
+    }
+
+    return s;
+  }
+
+  //--------------------------------------------------------------------------
+
+  //--------------------------------------------------------------------------
+  //  the incircle test when the fourth site is a segment
+  //--------------------------------------------------------------------------
+
+  //--------------------------------------------------------------------------
+
+  Oriented_side
+  oriented_side_l2(const Line_2& l, const Point_2& p, PPP_Type) const
+  {
+    Sign s_uz = CGAL::sign(uz_);
+
+    RT px = uz_ * p.x() - ux_;
+    RT py = uz_ * p.y() - uy_;
+
+    Sign s1 = CGAL::sign(l.b() * px - l.a() * py);
+
+    return s_uz * s1;
+  }
+
+  Oriented_side
+  oriented_side_l2(const Line_2& l, const Point_2& p, PPS_Type) const
+  {
+    RT dx = ux_ - uz_ * p.x();
+    RT dy = uy_ - uz_ * p.y();
+
+    return CGAL::sign(uz_) * CGAL::sign(dy * l.a() - dx * l.b());
+  }
+
+  // the cases PSS and SSS are identical
+  template<class Type>
+  Oriented_side
+  oriented_side_l2(const Line_2& l, const Point_2& p, Type) const
+  {
+    RT px = p.x();
+    RT py = p.y();
+
+    RT dx = ux_ - px * uz_;
+    RT dy = uy_ - py * uz_;
+
+    RT a = l.a();
+    RT b = l.b();
+
+    return CGAL::sign(uz_) * CGAL::sign(a * dy - b * dx);
+  }
+
+
+  // philaris:
+  template<class Type>
+  Oriented_side
+  oriented_side_linf(const Line_2& l, const Point_2& p, Type) const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug oriented_side_linf " << std::endl;);
+
+    Point_2 vv (ux_, uy_, uz_);
+
+    Line_2 l1 = compute_linf_perpendicular(l, vv);
+
+    return oriented_side_of_line(l1, p);
+  }
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+
+  Sign incircle(const Line_2& l, PPP_Type) const
+  {
+
+    Point_2 pref = p_ref().point();
+    Homogeneous_point_2 hp = compute_linf_projection_hom(l, point());
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle l PPP: pref="
+      << pref << std::endl;);
+
+    RT dul = (CGAL::max)(
+        CGAL::abs(ux_ - hp.x() * uz_),
+        CGAL::abs(uy_ - hp.y() * uz_));
+
+    RT dupref = (CGAL::max)(
+        CGAL::abs(ux_ - pref.x() * uz_),
+        CGAL::abs(uy_ - pref.y() * uz_));
+
+    Comparison_result cr = CGAL::compare(dul, dupref);
+
+    if ( cr == LARGER ) { return POSITIVE; }
+    if ( cr == SMALLER ) { return NEGATIVE; }
+
+    // here cr == EQUAL == ZERO, so
+    // we might have to refine
+    CGAL_SDG_DEBUG(std::cout
+      << "debug vring refining in incircle l PPP pqr=("
+      << p_ << ", " << q_ << ", " << r_ << "), "
+      << "hp(x,y)=" << hp.x() << ' ' << hp.y()
+      << ", l: " << l.a() << ' ' << l.b() << ' ' <<  l.c()
+      << ", u(x,y,z)= " << ux_ << ' ' << uy_ << ' ' << uz_
+      << std::endl;);
+
+    Comparison_result other = linf_refine(l, hp);
+
+    if (cr != other) {
+      CGAL_SDG_DEBUG(std::cout
+          << "incircle l PPP instead of 0 returning " << other
+          << std::endl;);
+    }
+
+    return other;
+
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle(const Line_2& l, PPS_Type) const
+  {
+    Point_2 pref = p_ref().point();
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle l PPS: pref="
+      << pref << std::endl;);
+
+    RT vx = ux_ - pref.x() * uz_;
+    RT vy = uy_ - pref.y() * uz_;
+
+    RT dupref = (CGAL::max)(CGAL::abs(vx), CGAL::abs(vy));
+
+    Homogeneous_point_2 hp = compute_linf_projection_hom(l, point());
+
+    RT dul = (CGAL::max)(
+        CGAL::abs(ux_ - hp.x() * uz_),
+        CGAL::abs(uy_ - hp.y() * uz_));
+
+    Sign cr = CGAL::sign(dul - dupref);
+
+    if (cr != ZERO) {
+      return cr;
+    }
+
+    // here cr == EQUAL == ZERO, so
+    // we might have to refine
+    CGAL_SDG_DEBUG(std::cout
+      << "debug vring refining in incircle l PPS pqr=("
+      << p_ << ", " << q_ << ", " << r_ << "), "
+      << "hp(x,y)=" << hp.x() << ' ' << hp.y()
+      << ", l: " << l.a() << ' ' << l.b() << ' ' <<  l.c()
+      << ", u(x,y,z)= " << ux_ << ' ' << uy_ << ' ' << uz_
+      << std::endl;);
+
+    Comparison_result other = linf_refine(l, hp);
+
+    if (cr != other) {
+      CGAL_SDG_DEBUG(std::cout
+          << "incircle l PPS instead of 0 returning " << other
+          << std::endl;);
+    }
+
+    return other;
+  }
+
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle(const Line_2& l, PSS_Type) const
+  {
+    Point_2 pref = p_ref().point();
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle l PSS: pref="
+      << pref << std::endl;);
+
+    RT vx = ux_ - (pref.x() ) * uz_;
+    RT vy = uy_ - (pref.y() ) * uz_;
+
+    RT dupref = (CGAL::max)(CGAL::abs(vx), CGAL::abs(vy));
+
+    Homogeneous_point_2 lhp = compute_linf_projection_hom(l, point());
+
+    RT dul = (CGAL::max)(
+        CGAL::abs(ux_ - lhp.x() * uz_),
+        CGAL::abs(uy_ - lhp.y() * uz_));
+
+    Sign cr = CGAL::sign(dul - dupref);
+
+    if (cr != ZERO) {
+      return cr;
+    }
+
+    // here cr == EQUAL == ZERO, so
+    // we might have to refine
+    CGAL_SDG_DEBUG(std::cout
+      << "debug vring refining in incircle l PSS pqr=("
+      << p_ << ", " << q_ << ", " << r_ << "), "
+      << "hp(x,y)=" << lhp.x() << ' ' << lhp.y()
+      << ", l: " << l.a() << ' ' << l.b() << ' ' <<  l.c()
+      << ", u(x,y,z)= " << ux_ << ' ' << uy_ << ' ' << uz_
+      << std::endl;);
+
+    Comparison_result other = linf_refine(l, lhp);
+
+    if (cr != other) {
+      CGAL_SDG_DEBUG(std::cout
+          << "incircle l PSS instead of 0 returning " << other
+          << std::endl;);
+    }
+
+    return other;
+
+  }
+
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle(const Line_2& l, SSS_Type) const
+  {
+    Line_2 lref = compute_supporting_line(p_.supporting_site());
+    Homogeneous_point_2 lrefhp =
+      compute_linf_projection_hom(lref, point());
+    RT dulref = (CGAL::max)(
+        CGAL::abs(ux_ - lrefhp.x() * uz_),
+        CGAL::abs(uy_ - lrefhp.y() * uz_));
+
+    Homogeneous_point_2 lhp = compute_linf_projection_hom(l, point());
+    RT dul = (CGAL::max)(
+        CGAL::abs(ux_ - lhp.x() * uz_),
+        CGAL::abs(uy_ - lhp.y() * uz_));
+
+    Sign cr = CGAL::sign(dul - dulref);
+
+    if (cr != ZERO) {
+      return cr;
+    }
+
+    // here cr == EQUAL == ZERO, so
+    // we might have to refine
+    CGAL_SDG_DEBUG(std::cout
+      << "debug vring refining in incircle l PSS pqr=("
+      << p_ << ", " << q_ << ", " << r_ << "), "
+      << "lhp(x,y)=" << lhp.x() << ' ' << lhp.y()
+      << ", l: " << l.a() << ' ' << l.b() << ' ' <<  l.c()
+      << ", u(x,y,z)= " << ux_ << ' ' << uy_ << ' ' << uz_
+      << std::endl;);
+
+    Comparison_result other = linf_refine(l, lhp);
+
+    if (cr != other) {
+      CGAL_SDG_DEBUG(std::cout
+          << "incircle l SSS instead of 0 returning " << other
+          << std::endl;);
+    }
+
+    return other;
+  }
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  template<class Type>
+  Sign incircle_s(const Site_2& t, Type type) const
+  {
+    CGAL_precondition( t.is_segment() );
+
+    if ( v_type == PPP || v_type == PPS ) {
+      if (  p_.is_point() && q_.is_point() &&
+	    is_endpoint_of(p_, t) && is_endpoint_of(q_, t)  ) {
+	return NEGATIVE;
+      }
+
+      if (  p_.is_point() && r_.is_point() &&
+	    is_endpoint_of(p_, t) && is_endpoint_of(r_, t)  ){
+	return NEGATIVE;
+      }
+
+      if (  q_.is_point() && r_.is_point() &&
+	    is_endpoint_of(q_, t) && is_endpoint_of(r_, t)  ){
+	return NEGATIVE;
+      }
+    }
+
+    if ( v_type == PSS ) {
+      if ( p_.is_segment() &&
+	   same_segments(p_.supporting_site(),
+			 t.supporting_site()) ) {
+	return POSITIVE;
+      }
+      if ( q_.is_segment() &&
+	   same_segments(q_.supporting_site(),
+			 t.supporting_site()) ) {
+	return POSITIVE;
+      }
+      if ( r_.is_segment() &&
+	   same_segments(r_.supporting_site(),
+			 t.supporting_site()) ) {
+	return POSITIVE;
+      }
+    }
+
+    Sign retval = incircle_s_no_easy(t, type);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug vring incircle_s: about to return retval of"
+        << " incircle_s_no_easy = " << retval << std::endl;);
+
+    return retval;
+  }
+
+  template<class Type>
+  Sign incircle_s_no_easy(const Site_2& t, Type type) const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug vring fn incircle_s_no_easy pqrt= ("
+        << p_ << ") (" << q_ << ") (" << r_ << ") (" << t << ")"
+        << std::endl;);
+
+    bool is_p_point = p_.is_point();
+    bool is_q_point = q_.is_point();
+    bool is_r_point = r_.is_point();
+
+    unsigned int numpts_in_pqr =
+      ((is_p_point)? 1 : 0) +
+      ((is_q_point)? 1 : 0) +
+      ((is_r_point)? 1 : 0)  ;
+
+    bool is_p_tsrc(false);
+    CGAL_assertion_code( bool has_p_endp_tsrc(false); )
+    if ( is_p_point ) {
+      if ( same_points(p_, t.source_site()) ) {
+        is_p_tsrc = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // p is segment
+      if (same_points(p_.source_site(), t.source_site()) ||
+          same_points(p_.target_site(), t.source_site())   ) {
+        has_p_endp_tsrc = true;
+      }
+    }
+#endif
+
+    bool is_q_tsrc(false);
+    CGAL_assertion_code( bool has_q_endp_tsrc(false); )
+    if ( is_q_point ) {
+      if ( same_points(q_, t.source_site()) ) {
+        is_q_tsrc = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // q is segment
+      if (same_points(q_.source_site(), t.source_site()) ||
+          same_points(q_.target_site(), t.source_site())   ) {
+        has_q_endp_tsrc = true;
+      }
+    }
+#endif
+
+    bool is_r_tsrc(false);
+    CGAL_assertion_code( bool has_r_endp_tsrc(false); )
+    if ( is_r_point ) {
+      if ( same_points(r_, t.source_site()) ) {
+        is_r_tsrc = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // r is segment
+      if (same_points(r_.source_site(), t.source_site()) ||
+          same_points(r_.target_site(), t.source_site())   ) {
+        has_r_endp_tsrc = true;
+      }
+    }
+#endif
+
+#ifndef CGAL_NO_ASSERTIONS
+    unsigned int num_common_endp_tsrc =
+      ((has_p_endp_tsrc)? 1 : 0) +
+      ((has_q_endp_tsrc)? 1 : 0) +
+      ((has_r_endp_tsrc)? 1 : 0)  ;
+    CGAL_USE(num_common_endp_tsrc);
+    CGAL_SDG_DEBUG(
+    std::cout << "debug num_common_endp_tsrc="
+      << num_common_endp_tsrc << std::endl;
+    );
+#endif
+
+    unsigned int numendpts_of_t = 0;
+
+    Sign d1, d2;
+    if ( is_p_tsrc || is_q_tsrc || is_r_tsrc ) {
+      d1 = ZERO;
+      ++numendpts_of_t;
+    } else {
+      d1 = incircle_p(t.source_site());
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s_no_easy d1="
+        << d1 << " with tsrc=" << t.source_site() << std::endl;);
+
+    if ( d1 == NEGATIVE ) { return NEGATIVE; }
+
+
+    bool is_p_ttrg(false);
+    CGAL_assertion_code( bool has_p_endp_ttrg(false); )
+    if ( is_p_point ) {
+      if ( same_points(p_, t.target_site()) ) {
+        is_p_ttrg = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // p is segment
+      if (same_points(p_.source_site(), t.target_site()) ||
+          same_points(p_.target_site(), t.target_site())   ) {
+        has_p_endp_ttrg = true;
+      }
+    }
+#endif
+
+    bool is_q_ttrg(false);
+    CGAL_assertion_code( bool has_q_endp_ttrg(false); )
+    if ( is_q_point ) {
+      if ( same_points(q_, t.target_site()) ) {
+        is_q_ttrg = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // q is segment
+      if (same_points(q_.source_site(), t.target_site()) ||
+          same_points(q_.target_site(), t.target_site())   ) {
+        has_q_endp_ttrg = true;
+      }
+    }
+#endif
+
+    bool is_r_ttrg(false);
+    CGAL_assertion_code( bool has_r_endp_ttrg(false); )
+    if ( is_r_point ) {
+      if ( same_points(r_, t.target_site()) ) {
+        is_r_ttrg = true;
+      }
+    }
+#ifndef CGAL_NO_ASSERTIONS
+    else { // r is segment
+      if (same_points(r_.source_site(), t.target_site()) ||
+          same_points(r_.target_site(), t.target_site())   ) {
+        has_r_endp_ttrg = true;
+      }
+    }
+#endif
+
+#ifndef CGAL_NO_ASSERTIONS
+    unsigned int num_common_endp_ttrg =
+      ((has_p_endp_ttrg)? 1 : 0) +
+      ((has_q_endp_ttrg)? 1 : 0) +
+      ((has_r_endp_ttrg)? 1 : 0)  ;
+    CGAL_USE(num_common_endp_ttrg);
+    CGAL_SDG_DEBUG(
+    std::cout << "debug num_common_endp_ttrg="
+      << num_common_endp_ttrg << std::endl;
+    );
+#endif
+
+    if ( is_p_ttrg || is_q_ttrg || is_r_ttrg ) {
+      d2 = ZERO;
+      ++numendpts_of_t;
+    } else {
+      d2 = incircle_p(t.target_site());
+    }
+    if ( d2 == NEGATIVE ) { return NEGATIVE; }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s_no_easy d2="
+        << d2 << std::endl;);
+
+    CGAL_assertion(numendpts_of_t < 2);
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s_no_easy numendpts_of_t= "
+      << numendpts_of_t << std::endl;);
+
+    compute_v_if_not_computed();
+
+    if (numendpts_of_t > 0) {
+      bool is_t_horizontal = is_site_horizontal(t);
+      bool is_t_vertical   = is_site_vertical(t);
+
+      if (is_t_horizontal || is_t_vertical) {
+        CGAL_assertion(numendpts_of_t == 1);
+
+        // set endp to endpoint in {p,q,r}
+        Site_2 endp;
+        if ( is_p_tsrc || is_q_tsrc || is_r_tsrc ) {
+          endp = t.source_site();
+        } else {
+          endp = t.target_site();
+        }
+
+        // numothers will be the number of segments
+        // in {p,q,r} that have endp as an endpoint
+        unsigned int numothers = 0;
+
+        // a possible segment in {p,q,r} which has endpoint endp
+        Site_2 other;
+
+        // if there is a segment in {p,q,r}, try its endpoints
+        if (numpts_in_pqr < 3) {
+
+          if ((! is_p_point) && is_endpoint_of(endp, p_)) {
+            numothers++;
+            other = p_;
+          }
+
+          if ((! is_q_point) && is_endpoint_of(endp, q_)) {
+            numothers++;
+            other = q_;
+          }
+
+          if ((! is_r_point) && is_endpoint_of(endp, r_)) {
+            numothers++;
+            other = r_;
+          }
+
+        } // end of case: numpts_in_pqr < 3
+
+        CGAL_assertion(numothers < 2);
+
+        if (numothers == 1) {
+          bool is_other_horizontal = is_site_horizontal(other);
+          bool is_other_vertical = is_site_vertical(other);
+
+          if ((is_t_horizontal && is_other_horizontal) ||
+              (is_t_vertical && is_other_vertical)       ) {
+            return POSITIVE;
+          }
+        } else {
+          CGAL_assertion(numothers == 0);
+          Point_2 vv(ux_, uy_,uz_);
+
+          Comparison_result ptcmpxve =
+            CGAL::compare(vv.x(), endp.point().x());
+          Comparison_result ptcmpyve =
+            CGAL::compare(vv.y(), endp.point().y());
+
+          CGAL_SDG_DEBUG(std::cout << "debug vv = " << vv << std::endl;);
+
+          if ( ( (ptcmpxve == EQUAL) && is_t_horizontal ) ||
+               ( (ptcmpyve == EQUAL) && is_t_vertical   )    ) {
+            return ZERO;
+          }
+
+        } // end of case numothers == 0
+      }  // endif (is_t_horizontal || is_t_vertical)
+    } // endif ((numendpts_of_t > 0) && (numpts_in_pqr < 3))
+
+    bool is_tsrc_endp_of_p (false);
+    bool is_tsrc_endp_of_q (false);
+    bool is_tsrc_endp_of_r (false);
+    bool is_ttrg_endp_of_p (false);
+    bool is_ttrg_endp_of_q (false);
+    bool is_ttrg_endp_of_r (false);
+
+    if (! is_p_point) {
+      is_tsrc_endp_of_p = same_points(t.source_site(), p_.source_site())
+                       || same_points(t.source_site(), p_.target_site());
+      is_ttrg_endp_of_p = same_points(t.target_site(), p_.source_site())
+                       || same_points(t.target_site(), p_.target_site());
+    }
+    if (! is_q_point) {
+      is_tsrc_endp_of_q = same_points(t.source_site(), q_.source_site())
+                       || same_points(t.source_site(), q_.target_site());
+      is_ttrg_endp_of_q = same_points(t.target_site(), q_.source_site())
+                       || same_points(t.target_site(), q_.target_site());
+    }
+    if (! is_r_point) {
+      is_tsrc_endp_of_r = same_points(t.source_site(), r_.source_site())
+                       || same_points(t.source_site(), r_.target_site());
+      is_ttrg_endp_of_r = same_points(t.target_site(), r_.source_site())
+                       || same_points(t.target_site(), r_.target_site());
+    }
+
+    if (is_tsrc_endp_of_p && is_tsrc_endp_of_q) {
+      if (test_star(t.source_site(), p_, q_, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_p && is_ttrg_endp_of_q) {
+      if (test_star(t.target_site(), p_, q_, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_tsrc_endp_of_q && is_tsrc_endp_of_r) {
+      if (test_star(t.source_site(), q_, r_, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_q && is_ttrg_endp_of_r) {
+      if (test_star(t.target_site(), q_, r_, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_tsrc_endp_of_r && is_tsrc_endp_of_p) {
+      if (test_star(t.source_site(), r_, p_, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_r && is_ttrg_endp_of_p) {
+      if (test_star(t.target_site(), r_, p_, t)) {
+        return NEGATIVE;
+      }
+    }
+
+    Line_2 l = compute_supporting_line(t.supporting_site());
+    Sign sl = incircle(l, type);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug vring incircle_s_no_easy: incircle l returned "
+        << sl << std::endl;);
+
+    if ( sl == POSITIVE ) { return sl; }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s_no_easy sl=" << sl <<
+      " d1=" << d1 << " d2=" << d2 << std::endl;);
+
+    CGAL_SDG_DEBUG(std::cout << "debug vring numpts_in_pqr="
+        << numpts_in_pqr << std::endl;);
+
+    // philaris: here we have a serious change related to L2
+    if ( sl == ZERO && (d1 == ZERO || d2 == ZERO) ) {
+
+      // if some site in {p,q,r} is a point and it is also:
+      // an endpoint of t and an endpoint of another site in {p,q,r}
+
+      Site_2 sqpnt, other_t, other_seg;
+
+      if (compute_helper(p_, q_, r_, t, sqpnt, other_t, other_seg)) {
+
+        CGAL_assertion(sqpnt.is_point());
+        CGAL_assertion(other_t.is_point());
+        CGAL_assertion(other_seg.is_point());
+
+        Point_2 vv (ux_, uy_, uz_);
+
+        CGAL_SDG_DEBUG(std::cout << "debug vring incircle_s_no_easy "
+            << "compute_helper true, "
+            << "  vv=" << vv << "  sqpnt= " << sqpnt
+            << "  other_t=" << other_t
+            << "  other_seg=" << other_seg
+            << std::endl;);
+
+        Line_2 lvs =
+          compute_line_from_to(vv, sqpnt.point());
+
+        Oriented_side os_t =
+          oriented_side_of_line(lvs, other_t.point());
+        Oriented_side os_s =
+          oriented_side_of_line(lvs, other_seg.point());
+
+        CGAL_assertion(os_s != ON_ORIENTED_BOUNDARY);
+
+        if (os_t == os_s) {
+          Line_2 lseg =
+            compute_line_from_to(sqpnt.point(), other_seg.point());
+
+          Oriented_side os_seg_vv =
+           oriented_side_of_line(lseg, vv);
+          Oriented_side os_seg_t =
+           oriented_side_of_line(lseg, other_t.point());
+
+          if (os_seg_t == os_seg_vv) {
+            return NEGATIVE;
+          } else {
+            if (os_seg_t == ON_ORIENTED_BOUNDARY) {
+              return ZERO;
+            } else {
+              return POSITIVE;
+            }
+          }
+        } // end of case: os_t == os_s
+      } // end of case where
+
+      return ZERO;
+    }
+
+    Oriented_side os1 = oriented_side_linf(l, t.source(), type);
+    Oriented_side os2 = oriented_side_linf(l, t.target(), type);
+
+    CGAL_SDG_DEBUG(std::cout << "debug vring incircle_s_no_easy: os1="
+        << os1 << " os2="
+        << os2 << std::endl;);
+
+    if ( sl == ZERO ) {
+      if (os1 == ON_ORIENTED_BOUNDARY || os2 == ON_ORIENTED_BOUNDARY) {
+	return ZERO;
+      }
+      return ( os1 == os2 ) ? POSITIVE : ZERO;
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s_no_easy non-zero sl: os1="
+      << os1 << " os2=" << os2 << std::endl;);
+
+    return (os1 == os2) ? POSITIVE : NEGATIVE;
+  }
+
+  inline
+  bool
+  compute_helper(const Site_2& p, const Site_2& q, const Site_2& r,
+      const Site_2& t,
+      Site_2& sqpnt, Site_2& other_of_t, Site_2& other_of_seg)
+  const
+  {
+    CGAL_assertion(t.is_segment());
+
+    const bool is_p_point = p.is_point();
+    const bool is_q_point = q.is_point();
+    const bool is_r_point = r.is_point();
+
+    const unsigned int numpts =
+      ((is_p_point)? 1 : 0) +
+      ((is_q_point)? 1 : 0) +
+      ((is_r_point)? 1 : 0)  ;
+
+    CGAL_SDG_DEBUG(std::cout << "debug vring compute_helper #pts="
+        << numpts << std::endl;);
+
+    if (numpts == 3) {
+      return false;
+    }
+
+    // here and on, there are 1 or 2 points in {p,q,r}
+
+
+    bool is_p_tsrc(false);
+    bool is_p_endp_of_t(false);
+    if (is_p_point) {
+      is_p_tsrc = same_points(p, t.source_site());
+      const bool is_p_ttrg = same_points(p, t.target_site());
+      is_p_endp_of_t = is_p_tsrc || is_p_ttrg;
+
+      if (is_p_endp_of_t) {
+        sqpnt = p;
+      }
+    }
+
+    bool is_q_tsrc(false);
+    bool is_q_endp_of_t(false);
+    if (is_q_point) {
+      is_q_tsrc = same_points(q, t.source_site());
+      const bool is_q_ttrg = same_points(q, t.target_site());
+      is_q_endp_of_t = is_q_tsrc || is_q_ttrg;
+      if (is_q_endp_of_t) {
+        sqpnt = q;
+      }
+    }
+
+    bool is_r_tsrc(false);
+    bool is_r_endp_of_t(false);
+
+    if (is_r_point) {
+      is_r_tsrc = same_points(r, t.source_site());
+      const bool is_r_ttrg = same_points(r, t.target_site());
+      is_r_endp_of_t = is_r_tsrc || is_r_ttrg;
+      if (is_r_endp_of_t) {
+        sqpnt = r;
+      }
+    }
+
+    const unsigned int numendpts_of_t =
+      ((is_p_endp_of_t)? 1 : 0) +
+      ((is_q_endp_of_t)? 1 : 0) +
+      ((is_r_endp_of_t)? 1 : 0)  ;
+
+    CGAL_SDG_DEBUG(std::cout << "debug compute_helper #endpts_of_t=" <<
+      numendpts_of_t << std::endl;);
+
+    if (numendpts_of_t == 0) {
+
+      bool have_common_p_tsrc(false),
+           have_common_p_ttrg(false),
+           have_common_p_t(false);
+
+      if (! is_p_point) {
+        CGAL_assertion( ! same_segments(p, t) );
+        const bool is_psrc_tsrc =
+          same_points(p.source_site(), t.source_site());
+        const bool is_ptrg_tsrc =
+          same_points(p.target_site(), t.source_site());
+        const bool is_psrc_ttrg =
+          same_points(p.source_site(), t.target_site());
+        const bool is_ptrg_ttrg =
+          same_points(p.target_site(), t.target_site());
+        have_common_p_tsrc = is_psrc_tsrc || is_ptrg_tsrc;
+        have_common_p_ttrg = is_psrc_ttrg || is_ptrg_ttrg;
+        have_common_p_t = have_common_p_tsrc || have_common_p_ttrg;
+      }
+
+      bool have_common_q_tsrc(false),
+           have_common_q_ttrg(false),
+           have_common_q_t(false);
+
+      if (! is_q_point) {
+        CGAL_assertion( ! same_segments(q, t) );
+        const bool is_qsrc_tsrc = same_points(q.source_site(), t.source_site());
+        const bool is_qtrg_tsrc = same_points(q.target_site(), t.source_site());
+        const bool is_qsrc_ttrg = same_points(q.source_site(), t.target_site());
+        const bool is_qtrg_ttrg = same_points(q.target_site(), t.target_site());
+        have_common_q_tsrc = is_qsrc_tsrc || is_qtrg_tsrc;
+        have_common_q_ttrg = is_qsrc_ttrg || is_qtrg_ttrg;
+        have_common_q_t = have_common_q_tsrc || have_common_q_ttrg;
+      }
+
+      bool have_common_r_tsrc(false),
+           have_common_r_ttrg(false),
+           have_common_r_t(false);
+
+      if (! is_r_point) {
+        CGAL_assertion( ! same_segments(r, t) );
+        const bool is_rsrc_tsrc = same_points(r.source_site(), t.source_site());
+        const bool is_rtrg_tsrc = same_points(r.target_site(), t.source_site());
+        const bool is_rsrc_ttrg = same_points(r.source_site(), t.target_site());
+        const bool is_rtrg_ttrg = same_points(r.target_site(), t.target_site());
+        have_common_r_tsrc = is_rsrc_tsrc || is_rtrg_tsrc;
+        have_common_r_ttrg = is_rsrc_ttrg || is_rtrg_ttrg;
+        have_common_r_t = have_common_r_tsrc || have_common_r_ttrg;
+      }
+
+      const unsigned int numcommon =
+      ((have_common_p_t)? 1 : 0) +
+      ((have_common_q_t)? 1 : 0) +
+      ((have_common_r_t)? 1 : 0)  ;
+
+      CGAL_SDG_DEBUG(std::cout << "debug compute_helper #numcommon=" <<
+        numcommon << std::endl;);
+
+      CGAL_assertion(numcommon < 3);
+
+      if (numcommon < 2) {
+        return false;
+      }
+
+      // here, numcommon == 2
+
+      const unsigned int numcommon_tsrc =
+      ((have_common_p_tsrc)? 1 : 0) +
+      ((have_common_q_tsrc)? 1 : 0) +
+      ((have_common_r_tsrc)? 1 : 0)  ;
+
+      const unsigned int numcommon_ttrg =
+      ((have_common_p_ttrg)? 1 : 0) +
+      ((have_common_q_ttrg)? 1 : 0) +
+      ((have_common_r_ttrg)? 1 : 0)  ;
+
+      CGAL_assertion( numcommon_tsrc + numcommon_ttrg == 2 );
+
+      if ( numcommon_tsrc == numcommon_ttrg )  { // both equal 1
+        return false;
+      }
+
+      // here either numcommon_tsrc==2 or numcommon_ttrg==2
+
+      if (numcommon_tsrc > 0) {
+        // here, numcommon_tsrc == 2
+        sqpnt = t.source_site();
+        other_of_t = t.target_site();
+      } else {
+        // here, numcommon_ttrg == 2
+        sqpnt = t.target_site();
+        other_of_t = t.source_site();
+      }
+
+      if (have_common_p_t && have_common_q_t) {
+        compute_helper_two_seg(p, q, sqpnt, other_of_seg);
+      } else if (have_common_q_t && have_common_r_t) {
+        compute_helper_two_seg(q, r, sqpnt, other_of_seg);
+      } else if (have_common_r_t && have_common_p_t) {
+        compute_helper_two_seg(r, p, sqpnt, other_of_seg);
+      } else {
+        CGAL_assertion(false);
+      }
+
+      return true;
+    }
+
+    // philaris: tocheck
+    CGAL_assertion( numendpts_of_t == 1 );
+
+    if (is_p_tsrc || is_q_tsrc || is_r_tsrc) {
+      other_of_t = t.target_site();
+    } else {
+      other_of_t = t.source_site();
+    }
+
+    if (is_p_endp_of_t) {
+      if (q.is_segment()) {
+        bool is_p_qsrc = same_points(p, q.source_site());
+        bool is_p_qtrg = same_points(p, q.target_site());
+        if (is_p_qsrc || is_p_qtrg) {
+          other_of_seg = is_p_qsrc ? q.target_site() : q.source_site();
+          return true;
+        }
+      }
+      if (r.is_segment()) {
+        bool is_p_rsrc = same_points(p, r.source_site());
+        bool is_p_rtrg = same_points(p, r.target_site());
+        if (is_p_rsrc || is_p_rtrg) {
+          other_of_seg = is_p_rsrc ? r.target_site() : r.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_p_endp_of_t
+
+    if (is_q_endp_of_t) {
+      if (r.is_segment()) {
+        bool is_q_rsrc = same_points(q, r.source_site());
+        bool is_q_rtrg = same_points(q, r.target_site());
+        if (is_q_rsrc || is_q_rtrg) {
+          other_of_seg = is_q_rsrc ? r.target_site() : r.source_site();
+          return true;
+        }
+      }
+
+      if (p.is_segment()) {
+        bool is_q_psrc = same_points(q, p.source_site());
+        bool is_q_ptrg = same_points(q, p.target_site());
+        if (is_q_psrc || is_q_ptrg) {
+          other_of_seg = is_q_psrc ? p.target_site() : p.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_q_endp_of_t
+
+    if (is_r_endp_of_t) {
+      if (p.is_segment()) {
+        bool is_r_psrc = same_points(r, p.source_site());
+        bool is_r_ptrg = same_points(r, p.target_site());
+        if (is_r_psrc || is_r_ptrg) {
+          other_of_seg = is_r_psrc ? p.target_site() : p.source_site();
+          return true;
+        }
+      }
+
+      if (q.is_segment()) {
+        bool is_r_qsrc = same_points(r, q.source_site());
+        bool is_r_qtrg = same_points(r, q.target_site());
+        if (is_r_qsrc || is_r_qtrg) {
+          other_of_seg = is_r_qsrc ? q.target_site() : q.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_r_endp_of_t
+
+    CGAL_SDG_DEBUG(std::cout << "debug compute_helper about to return false"
+        << std::endl;);
+    return false;
+
+  }
+
+  inline
+  void
+  compute_helper_two_seg(
+      const Site_2& a, const Site_2& b,
+      const Site_2& common_site, Site_2& other_of_seg)
+  const
+  {
+    CGAL_assertion(a.is_segment());
+    CGAL_assertion(b.is_segment());
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug compute_helper_two_seg entering with "
+        << a << " and " << b << " having common "
+        << common_site << std::endl;);
+
+    if (is_site_h_or_v(a)) {
+      if ( same_points(common_site, b.source_site()) ) {
+        other_of_seg = b.target_site();
+      } else {
+        other_of_seg = b.source_site();
+      }
+    } else {
+      CGAL_assertion(is_site_h_or_v(b));
+
+      if ( same_points(common_site, a.source_site()) ) {
+        other_of_seg = a.target_site();
+      } else {
+        other_of_seg = a.source_site();
+      }
+
+    }
+  } // end of compute_helper_two_seg
+
+
+  //--------------------------------------------------------------------------
+
+
+
+  Sign incircle_s(const Site_2& t) const
+  {
+    CGAL_precondition( t.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s (pqrt) = "
+      << "(" << p_ << ") (" << q_ << ") (" << r_ << ") "
+      << "(" << t << ")" << std::endl;);
+
+    if ( is_degenerate_Voronoi_circle() ) {
+      // case 1: the new segment is not adjacent to the center of the
+      //         degenerate Voronoi circle
+      if (  !same_points( p_ref(), t.source_site() ) &&
+	    !same_points( p_ref(), t.target_site() )  ) {
+	return POSITIVE;
+      }
+
+      CGAL_assertion( v_type == PSS );
+
+      if ( p_.is_segment() &&
+	   same_segments(p_.supporting_site(),
+			 t.supporting_site()) ) {
+	return ZERO;
+      }
+
+      if ( q_.is_segment() &&
+	   same_segments(q_.supporting_site(),
+			 t.supporting_site()) ) {
+	return ZERO;
+      }
+
+      if ( r_.is_segment() &&
+	   same_segments(r_.supporting_site(),
+			 t.supporting_site()) ) {
+	return ZERO;
+      }
+
+      Site_2 pr;
+      Site_2 sp, sq;
+      if ( p_.is_point() ) {
+	CGAL_assertion( q_.is_segment() && r_.is_segment() );
+	pr = p_;
+	sp = q_;
+	sq = r_;
+      } else if ( q_.is_point() ) {
+	CGAL_assertion( r_.is_segment() && p_.is_segment() );
+	pr = q_;
+	sp = r_;
+	sq = p_;
+      } else {
+	CGAL_assertion( p_.is_segment() && q_.is_segment() );
+	pr = r_;
+	sp = p_;
+	sq = q_;
+      }
+
+      Point_2 pq = sq.source(), pp = sp.source(), pt = t.source();
+
+      if ( same_points(sp.source_site(), pr) ) { pp = sp.target(); }
+      if ( same_points(sq.source_site(), pr) ) { pq = sq.target(); }
+      if ( same_points( t.source_site(), pr) ) { pt =  t.target(); }
+
+      Point_2 pr_ = pr.point();
+
+      if ( CGAL::orientation(pr_, pp, pt) == LEFT_TURN &&
+	   CGAL::orientation(pr_, pq, pt) == RIGHT_TURN ) {
+	return NEGATIVE;
+      }
+      return ZERO;
+    } // if ( is_degenerate_Voronoi_circle() )
+
+    Sign s(ZERO);
+    switch ( v_type ) {
+    case PPP:
+      s = incircle_s(t, PPP_Type());
+      break;
+    case PPS:
+      s = incircle_s(t, PPS_Type());
+      break;
+    case PSS:
+      s = incircle_s(t, PSS_Type());
+      break;
+    case SSS:
+      s = incircle_s(t, SSS_Type());
+      break;
+    }
+
+    return s;
+  }
+
+  Sign incircle_s_no_easy(const Site_2& t) const
+  {
+    Sign s(ZERO);
+    switch ( v_type ) {
+    case PPP:
+      s = incircle_s_no_easy(t, PPP_Type());
+      break;
+    case PPS:
+      s = incircle_s_no_easy(t, PPS_Type());
+      break;
+    case PSS:
+      s = incircle_s_no_easy(t, PSS_Type());
+      break;
+    case SSS:
+      s = incircle_s_no_easy(t, SSS_Type());
+      break;
+    }
+
+    return s;
+  }
+
+  //--------------------------------------------------------------------------
+  //  subpredicates for the incircle test
+  //--------------------------------------------------------------------------
+
+
+public:
+  bool is_degenerate_Voronoi_circle() const
+  {
+    if ( v_type != PSS ) { return false; }
+
+    if ( p_.is_point() ) {
+      return ( is_endpoint_of(p_, q_) && is_endpoint_of(p_, r_) );
+    } else if ( q_.is_point() ) {
+      return ( is_endpoint_of(q_, p_) && is_endpoint_of(q_, r_) );
+    } else {
+      CGAL_assertion( r_.is_point() );
+      return ( is_endpoint_of(r_, p_) && is_endpoint_of(r_, q_) );
+    }
+  }
+
+
+  //--------------------------------------------------------------------------
+
+private:
+
+  //--------------------------------------------------------------------------
+  //  the reference point (valid if v_type != SSS)
+  //--------------------------------------------------------------------------
+
+  Site_2 p_ref() const
+  {
+    CGAL_precondition ( v_type != SSS );
+
+
+    if ( v_type == PPS ) {
+      //CGAL_SDG_DEBUG(std::cout << "debug p_ref pps_idx="
+      //    << pps_idx << std::endl;);
+
+      if ( pps_idx == 0 ) {
+        CGAL_assertion( p_.is_point());
+        return p_;
+      }
+
+      if ( pps_idx == 1 ) {
+        CGAL_assertion( q_.is_point());
+        return q_;
+      }
+
+      //CGAL_SDG_DEBUG(std::cout << "debug p_ref about to return r="
+      //    << r_ << std::endl;);
+
+      CGAL_assertion( r_.is_point());
+      return r_;
+    }
+
+    if ( p_.is_point() ) {
+      return p_;
+    } else if ( q_.is_point() ) {
+      return q_;
+    } else {
+      CGAL_assertion( r_.is_point() );
+      return r_;
+    }
+  }
+
+
+public:
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  //                           access methods
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  inline FT x(Integral_domain_without_division_tag) const {
+    return CGAL::to_double(hx()) / CGAL::to_double(hw());
+  }
+  inline FT y(Integral_domain_without_division_tag) const {
+    return CGAL::to_double(hy()) / CGAL::to_double(hw());
+  }
+
+  inline FT x(Field_tag) const { return hx() / hw(); }
+  inline FT y(Field_tag) const { return hy() / hw(); }
+
+  inline FT x() const {
+      typedef Algebraic_structure_traits<FT> AST;
+      return x(typename AST::Algebraic_category());
+  }
+
+  inline FT y() const {
+      typedef Algebraic_structure_traits<FT> AST;
+      return y(typename AST::Algebraic_category());
+  }
+
+  FT hx() const {
+    CGAL_assertion( is_v_computed );
+    return ux_;
+  }
+
+  FT hy() const {
+    CGAL_assertion( is_v_computed );
+    return uy_;
+  }
+
+  FT hw() const {
+    CGAL_assertion( is_v_computed );
+    return uz_;
+  }
+
+  FT radius() const {
+    switch (v_type) {
+    case PPP:    case PPS:    case PSS:
+      {
+	Point_2 pref = p_ref().point();
+	//FT absdx = CGAL::abs(x() - pref.x());
+	//FT absdy = CGAL::abs(y() - pref.y());
+        return (CGAL::max)( CGAL::abs(x() - pref.x()),
+		            CGAL::abs(y() - pref.y()) );
+      }
+      break;
+    case SSS:
+      {
+	Line_2 l = compute_supporting_line(p_.supporting_site());
+	Homogeneous_point_2 q = compute_linf_projection_hom(l, point());
+
+	FT dx = CGAL::abs(x() - q.x());
+	FT dy = CGAL::abs(y() - q.y());
+	return (CGAL::max)(dx, dy);
+      }
+      break;
+    default:
+      return FT(0);
+    }
+  }
+
+  Point_2 point() const {
+    if ( is_degenerate_Voronoi_circle() ) {
+      return degenerate_point();
+    }
+    compute_v_if_not_computed();
+    return Point_2(x(), y());
+  }
+
+
+  Point_2 degenerate_point() const
+  {
+    CGAL_precondition( is_degenerate_Voronoi_circle() );
+    return p_ref().point();
+  }
+
+  // philaris: the circle is in fact an Iso_rectangle_2
+  typename K::Iso_rectangle_2 circle() const
+  {
+    typedef typename K::Iso_rectangle_2  Iso_rectangle_2;
+    Point_2 pleftbot (point().x()-radius(), point().y()-radius());
+    Point_2 prghttop (point().x()+radius(), point().y()+radius());
+    return Iso_rectangle_2(pleftbot, prghttop);
+  }
+
+  vertex_t type() const { return v_type; }
+
+public:
+  Voronoi_vertex_ring_C2(const Site_2& p,
+			 const Site_2& q,
+			 const Site_2& r)
+    : p_(p), q_(q), r_(r), is_v_computed(false)
+  {
+    CGAL_SDG_DEBUG(std::cout << "Voronoi_vertex_ring_C2()" << std::endl;);
+    analyze_vertex(p, q, r);
+  }
+
+  //--------------------------------------------------------------------------
+
+  Sign incircle(const Site_2& t) const
+  {
+    Sign s;
+
+    CGAL_SDG_DEBUG(std::cout << "debug ring incircle t=" << t << std::endl;);
+
+    if ( t.is_point() ) {
+      s = incircle_p(t);
+    } else {
+      CGAL_SDG_DEBUG(std::cout << "debug about to run incircle_s with t="
+        << t << std::endl;);
+      s = incircle_s(t);
+    }
+
+    return s;
+  }
+
+  Sign incircle_no_easy(const Site_2& t) const
+  {
+    Sign s;
+
+    if ( t.is_point() ) {
+      s = incircle_p_no_easy(t);
+    } else {
+      s = incircle_s_no_easy(t);
+    }
+
+    return s;
+  }
+
+  //--------------------------------------------------------------------------
+
+
+  Orientation orientation(const Line_2& l) const
+  {
+    CGAL_assertion( is_v_computed);
+    Orientation o(COLLINEAR);
+    switch ( v_type ) {
+    case PPP:
+      o = orientation(l, PPP_Type());
+      break;
+    case PPS:
+      o = orientation(l, PPS_Type());
+      break;
+    case PSS:
+      o = orientation(l, PSS_Type());
+      break;
+    case SSS:
+      o = orientation(l, SSS_Type());
+      break;
+    }
+
+    return o;
+  }
+
+  Oriented_side oriented_side(const Line_2& l) const
+  {
+    compute_v_if_not_computed();
+    Orientation o = orientation(l);
+
+    if ( o == COLLINEAR ) { return ON_ORIENTED_BOUNDARY; }
+    return ( o == LEFT_TURN ) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE;
+  }
+
+
+  // L_inf refinement
+  inline
+  Comparison_result
+  linf_refine( const Line_2& l, Homogeneous_point_2& lrefhp ) const
+  {
+    CGAL_assertion( is_v_computed );
+    Point_2 vv ( ux_, uy_, uz_ );
+
+    bool is_l_h_or_v = is_line_h_or_v(l);
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    FT difxvl = vv.x() - lrefhp.x();
+    FT difyvl = vv.y() - lrefhp.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+
+    // lref is corner if and only if the line is not axis-parallel
+    CGAL_assertion( (cmplabsxy == EQUAL) == (! is_l_h_or_v) );
+
+    Oriented_side oslvv (ON_ORIENTED_BOUNDARY);
+    if ((p_.is_segment() || q_.is_segment() || r_.is_segment()) &&
+        is_l_h_or_v) {
+      oslvv = oriented_side_of_line(l, vv);
+      CGAL_assertion(oslvv != ON_ORIENTED_BOUNDARY);
+    }
+
+    // The following boolean variables are used to:
+    // compute whether lref agrees with the x and y coordinates
+    // of some of the points in p, q, r
+    bool corner_agree_pt_x(false);
+    bool corner_agree_pt_y(false);
+
+    if (p_.is_point()) {
+      Point_2 pp = p_.point();
+      FT difxvp = vv.x() - pp.x();
+      FT difyvp = vv.y() - pp.y();
+      FT absdifxvp = CGAL::abs(difxvp);
+      FT absdifyvp = CGAL::abs(difyvp);
+      Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+      if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+          compare_p = CGAL::compare(absdifyvl, absdifyvp);
+          corner_agree_pt_x = true;
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+          CGAL_assertion(compare_p == EQUAL);
+          compare_p = CGAL::compare(absdifxvl, absdifxvp);
+          corner_agree_pt_y = true;
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslpsrc =
+          oriented_side_of_line(l, p_.source_site().point());
+        Oriented_side oslptrg =
+          oriented_side_of_line(l, p_.target_site().point());
+        if (((oslpsrc != oslvv) && (oslptrg != oslvv)) &&
+            ((oslpsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslptrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_p = SMALLER;
+        }
+      }
+    }
+
+    if (q_.is_point()) {
+      Point_2 qq = q_.point();
+      FT difxvq = vv.x() - qq.x();
+      FT difyvq = vv.y() - qq.y();
+      FT absdifxvq = CGAL::abs(difxvq);
+      FT absdifyvq = CGAL::abs(difyvq);
+      Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+      if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+          compare_q = CGAL::compare(absdifyvl, absdifyvq);
+          corner_agree_pt_x = true;
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+          CGAL_assertion(compare_q == EQUAL);
+          compare_q = CGAL::compare(absdifxvl, absdifxvq);
+          corner_agree_pt_y = true;
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslqsrc =
+          oriented_side_of_line(l, q_.source_site().point());
+        Oriented_side oslqtrg =
+          oriented_side_of_line(l, q_.target_site().point());
+        if (((oslqsrc != oslvv) && (oslqtrg != oslvv)) &&
+            ((oslqsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslqtrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_q = SMALLER;
+        }
+      }
+    }
+
+    if (r_.is_point()) {
+      Point_2 rr = r_.point();
+      FT difxvr = vv.x() - rr.x();
+      FT difyvr = vv.y() - rr.y();
+      FT absdifxvr = CGAL::abs(difxvr);
+      FT absdifyvr = CGAL::abs(difyvr);
+      Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+      if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+          compare_r = CGAL::compare(absdifyvl, absdifyvr);
+          corner_agree_pt_x = true;
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+          CGAL_assertion(compare_r == EQUAL);
+          compare_r = CGAL::compare(absdifxvl, absdifxvr);
+          corner_agree_pt_y = true;
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslrsrc =
+          oriented_side_of_line(l, r_.source_site().point());
+        Oriented_side oslrtrg =
+          oriented_side_of_line(l, r_.target_site().point());
+        if (((oslrsrc != oslvv) && (oslrtrg != oslvv)) &&
+            ((oslrsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslrtrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_r = SMALLER;
+        }
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug linf_refine compare p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    if (corner_agree_pt_x && corner_agree_pt_y) {
+      CGAL_assertion(! is_l_h_or_v);
+      const unsigned int count_larger =
+        (compare_p ? 1 : 0) +
+        (compare_q ? 1 : 0) +
+        (compare_r ? 1 : 0) ;
+      if (count_larger >= 2) {
+        // two points (among p, q, r) hide the line l from the vertex vv
+        return LARGER;
+      }
+    }
+    return EQUAL;
+
+  }
+
+  inline
+  Comparison_result
+  linf_refinement( Homogeneous_point_2& lrefhp ) const
+  {
+    CGAL_assertion( is_v_computed );
+    Point_2 vv ( ux_, uy_, uz_ );
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    FT difxvl = vv.x() - lrefhp.x();
+    FT difyvl = vv.y() - lrefhp.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    if (p_.is_point()) {
+      Point_2 pp = p_.point();
+      FT difxvp = vv.x() - pp.x();
+      FT difyvp = vv.y() - pp.y();
+      FT absdifxvp = CGAL::abs(difxvp);
+      FT absdifyvp = CGAL::abs(difyvp);
+      Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+      if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+          compare_p = CGAL::compare(absdifyvl, absdifyvp);
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+          CGAL_assertion(compare_p == EQUAL);
+          compare_p = CGAL::compare(absdifxvl, absdifxvp);
+        }
+      }
+    }
+
+    if (q_.is_point()) {
+      Point_2 qq = q_.point();
+      FT difxvq = vv.x() - qq.x();
+      FT difyvq = vv.y() - qq.y();
+      FT absdifxvq = CGAL::abs(difxvq);
+      FT absdifyvq = CGAL::abs(difyvq);
+      Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+      if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+          compare_q = CGAL::compare(absdifyvl, absdifyvq);
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+          CGAL_assertion(compare_q == EQUAL);
+          compare_q = CGAL::compare(absdifxvl, absdifxvq);
+        }
+      }
+    }
+
+    if (r_.is_point()) {
+      Point_2 rr = r_.point();
+      FT difxvr = vv.x() - rr.x();
+      FT difyvr = vv.y() - rr.y();
+      FT absdifxvr = CGAL::abs(difxvr);
+      FT absdifyvr = CGAL::abs(difyvr);
+      Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+      if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+      {
+        if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+          compare_r = CGAL::compare(absdifyvl, absdifyvr);
+        }
+      }
+      if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+      {
+        if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+          CGAL_assertion(compare_r == EQUAL);
+          compare_r = CGAL::compare(absdifxvl, absdifxvr);
+        }
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    /*
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      // tocheck
+      return LARGER;
+    }
+    */
+    return EQUAL;
+
+  }
+
+
+
+  //--------------------------------------------------------------------------
+
+private:
+  const Site_2& p_, q_, r_;
+
+  vertex_t v_type;
+
+  // index that indicates the refence point for the case PPS
+  short pps_idx;
+
+  // philaris: different types are not needed any more
+  // the case ppp
+  //RT ux_ppp, uy_ppp, uz_ppp;
+
+  // the case pps
+  //Sqrt_1 ux_pps, uy_pps, uz_pps;
+
+  // the case pss and sss
+  //Sqrt_3 ux, uy, uz;
+
+  mutable bool is_v_computed;
+
+  mutable RT ux_, uy_, uz_;
+};
+
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_RING_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h
new file mode 100644
index 0000000..672f862
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h
@@ -0,0 +1,4744 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_SQRT_FIELD_NEW_C2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_SQRT_FIELD_NEW_C2_H
+
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_x_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Compare_y_2.h>
+#include <CGAL/Side_of_bounded_square_2.h>
+#include <CGAL/Orientation_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h>
+
+namespace CGAL {
+
+namespace SegmentDelaunayGraphLinf_2 {
+
+template<class K>
+class Voronoi_vertex_sqrt_field_new_C2
+  : public Basic_predicates_C2<K>
+{
+public:
+  typedef Basic_predicates_C2<K> Base;
+
+  using Base::compute_supporting_line;
+  using Base::oriented_side_of_line;
+  using Base::opposite_line;
+  using Base::compute_linf_projection_hom;
+  using Base::compute_linf_projection_nonhom;
+  using Base::compute_linf_perpendicular;
+  using Base::compute_line_from_to;
+  using Base::compute_horizontal_projection;
+  using Base::compute_vertical_projection;
+  using Base::has_positive_slope;
+  using Base::have_same_slope;
+  using Base::is_site_horizontal;
+  using Base::is_site_vertical;
+  using Base::is_site_h_or_v;
+  using Base::is_line_h_or_v;
+  using Base::test_star;
+  using Base::compute_neg_45_line_at;
+  using Base::compute_pos_45_line_at;
+  using Base::compute_hor_line_at;
+  using Base::compute_ver_line_at;
+  using Base::are_in_same_open_halfspace_of;
+  using Base::horseg_y_coord;
+  using Base::verseg_x_coord;
+  using Base::hvseg_coord;
+  using Base::coord_at;
+  using Base::touch_same_side;
+  using Base::is_orth_dist_smaller_than_pt_dist;
+  using Base::compute_intersection_of_lines;
+  using Base::orient_lines_linf;
+  using Base::are_parallel_lines;
+  using Base::direction;
+  using Base::compute_line_dir;
+  using Base::parallel_bis;
+  using Base::dir_from_lines;
+  using Base::bisector_linf_line;
+  using Base::is_endpoint_of;
+  using Base::orient_line_endp;
+  using Base::orient_line_nonendp;
+  using Base::bearing;
+  using Base::bearing_diff;
+  using Base::center_from_corner_and_pt;
+  using Base::points_inside_touching_sides_v;
+  using Base::center_from_opposite_corners;
+  using Base::center_from_same_side_corners;
+  using Base::is_on_hv_seg_line;
+
+  typedef enum {PPP = 0, PPS, PSS, SSS} vertex_t;
+  struct PPP_Type {};
+  struct PPS_Type {};
+  struct PSS_Type {};
+  struct SSS_Type {};
+
+  typedef typename Base::Point_2             Point_2;
+  typedef typename Base::Segment_2           Segment_2;
+  typedef typename Base::Line_2              Line_2;
+  typedef typename Base::Site_2              Site_2;
+  typedef typename Base::Direction_2         Direction_2;
+  typedef typename Base::FT                  FT;
+  typedef typename Base::RT                  RT;
+
+  typedef typename Base::Homogeneous_point_2 Homogeneous_point_2;
+
+  typedef typename Base::Orientation         Orientation;
+  typedef typename Base::Comparison_result   Comparison_result;
+  typedef typename Base::Oriented_side       Oriented_side;
+  typedef typename Base::Bounded_side        Bounded_side;
+  typedef typename Base::Sign                Sign;
+  typedef typename Base::Compute_scalar_product_2 Compute_scalar_product_2;
+
+  typedef typename Base::Polychainline_2     Polychainline_2;
+
+  typedef typename Base::Bearing Bearing;
+
+private:
+  typedef SegmentDelaunayGraph_2::Are_same_points_C2<K>   Are_same_points_2;
+  typedef SegmentDelaunayGraph_2::Are_same_segments_C2<K> Are_same_segments_2;
+  typedef Side_of_bounded_square_2<K>    Side_of_bounded_square_2_Type;
+  typedef Orientation_Linf_2<K>          Orientation_Linf_points_2;
+  typedef Bisector_Linf<K>               Bisector_Linf_Type;
+
+  typedef SegmentDelaunayGraph_2::Compare_x_2<K> Compare_x_2_Sites_Type;
+  typedef SegmentDelaunayGraph_2::Compare_y_2<K> Compare_y_2_Sites_Type;
+
+  typedef typename K::Compare_x_2 Compare_x_2_Points_Type;
+  typedef typename K::Compare_y_2 Compare_y_2_Points_Type;
+
+  Are_same_points_2     same_points;
+  Are_same_segments_2   same_segments;
+  Side_of_bounded_square_2_Type    side_of_bounded_square;
+  Compare_x_2_Sites_Type           scmpx;
+  Compare_y_2_Sites_Type           scmpy;
+  Compare_x_2_Points_Type          cmpx;
+  Compare_y_2_Points_Type          cmpy;
+  Orientation_Linf_points_2 or_linf;
+  Bisector_Linf_Type bisector_linf;
+  Bisector_Linf_Type linf_bisect_direction;
+
+private:
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  // Voronoi vertex computation
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  //--------------------------------------------------------------------------
+  // the Voronoi vertex of three points
+  //--------------------------------------------------------------------------
+
+  void
+  compute_vv(const Site_2& sp, const Site_2& sq, const Site_2& sr,
+	     const PPP_Type&) const
+  {
+    CGAL_precondition( sp.is_point() && sq.is_point() &&
+		       sr.is_point() );
+
+    //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew entering compute_vv" << std::endl;);
+
+    // the following check is not really needed in this
+    if ( is_vv_computed ) { return; }
+    is_vv_computed = true;
+
+    Point_2 p = sp.point(), q = sq.point(), r = sr.point();
+
+    return compute_vv_points(p, q, r);
+  }
+
+  inline
+  void
+  compute_vv_points(
+      const Point_2 & p, const Point_2 & q, const Point_2 & r)
+  const
+  {
+    //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew (p q r) = " <<
+    //  p << ' ' << q << ' ' << r << std::endl;);
+
+    FT x_min, x_max, y_min, y_max;
+    FT x_center, y_center;
+    FT half(0.5);
+    FT two(2);
+
+    bool is_set_x_center(false);
+    bool is_set_y_center(false);
+    bool is_set_x_max(false);
+    bool is_set_y_max(false);
+    bool is_set_x_min(false);
+    bool is_set_y_min(false);
+
+    Comparison_result cmpxqp = CGAL::compare(q.x(), p.x());
+
+    if (cmpxqp == SMALLER) { // q.x() < p.x()
+      x_min = q.x();
+      x_max = p.x();
+    } else if (cmpxqp == LARGER) { // q.x() > p.x()
+      x_min = p.x();
+      x_max = q.x();
+    } else { // q.x() = p.x()
+      x_min = p.x();
+      x_max = p.x();
+      y_center = half * (p.y() + q.y());
+      is_set_y_center = true;
+
+      //CGAL_SDG_DEBUG(std::cout << "debug set y_center=" <<
+      //  y_center << std::endl;);
+
+      Comparison_result cmpxrothers = CGAL::compare(r.x(), p.x());
+      if (cmpxrothers == SMALLER) {
+        //CGAL_SDG_DEBUG(std::cout << "debug r is left of p, q" << std::endl;);
+        Comparison_result cmpyrp = CGAL::compare(r.y(), p.y());
+        Comparison_result cmpyrq = CGAL::compare(r.y(), q.y());
+        if (((cmpyrp == LARGER)  && (cmpyrq == LARGER)) ||
+            ((cmpyrp == SMALLER) && (cmpyrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpyrp == LARGER) {
+            y_min = two*y_center - r.y();
+            is_set_y_min = true;
+            //CGAL_SDG_DEBUG(std::cout << "debug set y_min=" <<
+            //  y_min << std::endl;);
+          } else {
+            y_max = two*y_center - r.y();
+            is_set_y_max = true;
+            //CGAL_SDG_DEBUG(std::cout << "debug set y_max=" <<
+            //  y_max << std::endl;);
+          }
+        }
+      } else if (cmpxrothers == LARGER) {
+        //CGAL_SDG_DEBUG(std::cout << "debug r is right of p, q" << std::endl;);
+        Comparison_result cmpyrp = CGAL::compare(r.y(), p.y());
+        Comparison_result cmpyrq = CGAL::compare(r.y(), q.y());
+        if (((cmpyrp == LARGER)  && (cmpyrq == LARGER)) ||
+            ((cmpyrp == SMALLER) && (cmpyrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpyrp == LARGER) {
+            y_min = two*y_center - r.y();
+            is_set_y_min = true;
+            //CGAL_SDG_DEBUG(std::cout << "debug set y_min=" <<
+            //  y_min << std::endl;);
+          } else {
+            y_max = two*y_center - r.y();
+            is_set_y_max = true;
+            //CGAL_SDG_DEBUG(std::cout << "debug set y_max=" <<
+            //  y_max << std::endl;);
+          }
+        }
+      } else {
+        // not possible
+      }
+    }
+
+    Comparison_result cmpyqp = CGAL::compare(q.y(), p.y());
+
+    if (cmpyqp == SMALLER) { // q.y() < p.y()
+      if (! is_set_y_min) {
+        y_min = q.y();
+      }
+      if (! is_set_y_max) {
+        y_max = p.y();
+      }
+    } else if (cmpyqp == LARGER) { // q.y() > p.y()
+      if (! is_set_y_min) {
+        y_min = p.y();
+      }
+      if (! is_set_y_max) {
+        y_max = q.y();
+      }
+    } else { //  q.y() = p.y()
+      if (! is_set_y_min) {
+        y_min = p.y();
+      }
+      if (! is_set_y_max) {
+        y_max = p.y();
+      }
+      x_center = half * (p.x() + q.x());
+      is_set_x_center = true;
+
+      Comparison_result cmpyrothers = CGAL::compare(r.y(), p.y());
+      if (cmpyrothers == SMALLER) {
+        Comparison_result cmpxrp = CGAL::compare(r.x(), p.x());
+        Comparison_result cmpxrq = CGAL::compare(r.x(), q.x());
+        if (((cmpxrp == LARGER)  && (cmpxrq == LARGER)) ||
+            ((cmpxrp == SMALLER) && (cmpxrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpxrp == LARGER) {
+            x_min = two*x_center - r.x();
+            is_set_x_min = true;
+          } else {
+            x_max = two*x_center - r.x();
+            is_set_x_max = true;
+          }
+        }
+      } else if (cmpyrothers == LARGER) {
+        Comparison_result cmpxrp = CGAL::compare(r.x(), p.x());
+        Comparison_result cmpxrq = CGAL::compare(r.x(), q.x());
+        if (((cmpxrp == LARGER)  && (cmpxrq == LARGER)) ||
+            ((cmpxrp == SMALLER) && (cmpxrq == SMALLER))
+           ) {
+          // do fix
+          if (cmpxrp == LARGER) {
+            x_min = two*x_center - r.x();
+            is_set_x_min = true;
+          } else {
+            x_max = two*x_center - r.x();
+            is_set_x_max = true;
+          }
+        }
+      } else {
+        // not possible
+      }
+
+    }
+
+    Comparison_result cmpxrmin = CGAL::compare(r.x(), x_min);
+    Comparison_result cmpxrmax = CGAL::compare(r.x(), x_max);
+    if (cmpxrmin == SMALLER) {
+	// here r.x() < x_min <= x_max
+        if (! is_set_x_min) {
+          x_min = r.x();
+        }
+    } else if (cmpxrmin == LARGER) {
+      // here r.x() > x_min
+      if (cmpxrmax == LARGER) {
+        // here x_min <= x_max < r.x()
+        if (! is_set_x_max) {
+          x_max = r.x();
+        }
+      } else if (cmpxrmax == SMALLER) {
+        // x_min < r.x() < x_max
+        // do nothing
+      } else { // r.x() = x_max
+        // r.x() = p.x() || r.x() = q.x()
+        if (CGAL::compare(r.x(), p.x()) == EQUAL) {
+          y_center = half * (p.y() + r.y());
+          //Comparison_result cmpyqp = CGAL::compare(q.y(),p.y());
+          Comparison_result cmpyqr = CGAL::compare(q.y(),r.y());
+          if ((cmpyqp == LARGER) && (cmpyqr == LARGER)) {
+            y_min = two*y_center - q.y();
+            is_set_y_min = true;
+          }
+          if ((cmpyqp == SMALLER) && (cmpyqr == SMALLER)) {
+            y_max = two*y_center - q.y();
+            is_set_y_max = true;
+          }
+        } else {
+          y_center = half * (q.y() + r.y());
+          Comparison_result cmpypq = CGAL::compare(p.y(),q.y());
+          Comparison_result cmpypr = CGAL::compare(p.y(),r.y());
+          if ((cmpypq == LARGER) && (cmpypr == LARGER)) {
+            y_min = two*y_center - p.y();
+            is_set_y_min = true;
+          }
+          if ((cmpypq == SMALLER) && (cmpypr == SMALLER)) {
+            y_max = two*y_center - p.y();
+            is_set_y_max = true;
+          }
+        }
+        is_set_y_center = true;
+      }
+    } else {
+      // here r.x() = x_min
+      // r.x() = p.x() || r.x() = q.x()
+      if (CGAL::compare(r.x(), p.x()) == EQUAL) {
+        //CGAL_SDG_DEBUG(std::cout << "debug r.x = p.x" << std::endl;);
+        // r.x() = p.x()
+        y_center = half * (p.y() + r.y());
+        //Comparison_result cmpyqp = CGAL::compare(q.y(),p.y());
+        Comparison_result cmpyqr = CGAL::compare(q.y(),r.y());
+        if ((cmpyqp == LARGER) && (cmpyqr == LARGER)) {
+          //CGAL_SDG_DEBUG(std::cout << "debug q is above p, r" << std::endl;);
+          y_min = two*y_center - q.y();
+          is_set_y_min = true;
+        }
+        if ((cmpyqp == SMALLER) && (cmpyqr == SMALLER)) {
+          //CGAL_SDG_DEBUG(std::cout << "debug q is below p, r" << std::endl;);
+          y_max = two*y_center - q.y();
+          is_set_y_max = true;
+        }
+      } else {
+        // r.x() = q.x()
+        //CGAL_SDG_DEBUG(std::cout << "debug r.x = q.x" << std::endl;);
+        y_center = half * (q.y() + r.y());
+        Comparison_result cmpypq = CGAL::compare(p.y(),q.y());
+        Comparison_result cmpypr = CGAL::compare(p.y(),r.y());
+        if ((cmpypq == LARGER) && (cmpypr == LARGER)) {
+          //CGAL_SDG_DEBUG(std::cout << "debug p is above q, r" << std::endl;);
+          y_min = two*y_center - p.y();
+          is_set_y_min = true;
+        }
+        if ((cmpypq == SMALLER) && (cmpypr == SMALLER)) {
+          //CGAL_SDG_DEBUG(std::cout << "debug p is below q, r" << std::endl;);
+          y_max = two*y_center - p.y();
+          is_set_y_max = true;
+        }
+      }
+      is_set_y_center = true;
+    }
+
+    Comparison_result cmpyrmin = CGAL::compare(r.y(), y_min);
+    Comparison_result cmpyrmax = CGAL::compare(r.y(), y_max);
+    if (cmpyrmin == SMALLER) {
+      // here r.y() < y_min <= y_max
+      if (! is_set_y_min) {
+        y_min = r.y();
+      }
+    } else if (cmpyrmin == LARGER) {
+      // here r.y() > y_min
+      if (cmpyrmax == LARGER) {
+        // here y_min <= y_max < r.y()
+        if (! is_set_y_max) {
+          y_max = r.y();
+        }
+      } else if (cmpyrmax == SMALLER) {
+        // y_min < r.y() < y_max
+        // do nothing
+      } else { // r.y() = y_max
+        // r.y() = p.y() || r.y() = q.y()
+        if (CGAL::compare(r.y(), p.y()) == EQUAL) {
+          x_center = half * (p.x() + r.x());
+          //Comparison_result cmpxqp = CGAL::compare(q.x(),p.x());
+          Comparison_result cmpxqr = CGAL::compare(q.x(),r.x());
+          if ((cmpxqp == LARGER) && (cmpxqr == LARGER)) {
+            x_min = two*x_center - q.x();
+            is_set_x_min = true;
+          }
+          if ((cmpxqp == SMALLER) && (cmpxqr == SMALLER)) {
+            x_max = two*x_center - q.x();
+            is_set_x_max = true;
+          }
+        } else {
+          x_center = half * (q.x() + r.x());
+          Comparison_result cmpxpq = CGAL::compare(p.x(),q.x());
+          Comparison_result cmpxpr = CGAL::compare(p.x(),r.x());
+          if ((cmpxpq == LARGER) && (cmpxpr == LARGER)) {
+            x_min = two*x_center - p.x();
+            is_set_x_min = true;
+          }
+          if ((cmpxpq == SMALLER) && (cmpxpr == SMALLER)) {
+            x_max = two*x_center - p.x();
+            is_set_x_max = true;
+          }
+        }
+        is_set_x_center = true;
+      }
+    } else {
+      // here r.y() = y_min
+      // r.y() = p.y() || r.y() = q.y()
+      if (CGAL::compare(r.y(), p.y()) == EQUAL) {
+        x_center = half * (p.x() + r.x());
+        //Comparison_result cmpxqp = CGAL::compare(q.x(),p.x());
+        Comparison_result cmpxqr = CGAL::compare(q.x(),r.x());
+        if ((cmpxqp == LARGER) && (cmpxqr == LARGER)) {
+          x_min = two*x_center - q.x();
+          is_set_x_min = true;
+        }
+        if ((cmpxqp == SMALLER) && (cmpxqr == SMALLER)) {
+          x_max = two*x_center - q.x();
+          is_set_x_max = true;
+        }
+      } else {
+        x_center = half * (q.x() + r.x());
+        Comparison_result cmpxpq = CGAL::compare(p.x(),q.x());
+        Comparison_result cmpxpr = CGAL::compare(p.x(),r.x());
+        if ((cmpxpq == LARGER) && (cmpxpr == LARGER)) {
+          x_min = two*x_center - p.x();
+          is_set_x_min = true;
+        }
+        if ((cmpxpq == SMALLER) && (cmpxpr == SMALLER)) {
+          x_max = two*x_center - p.x();
+          is_set_x_max = true;
+        }
+      }
+      is_set_x_center = true;
+    }
+
+    Comparison_result cmpsides =
+	CGAL::compare(x_max - x_min, y_max - y_min);
+
+    // if bounding box is non-square and points are not
+    // on corners of it, then grow it to become square
+    switch(cmpsides) {
+      case SMALLER:
+        //CGAL_SDG_DEBUG(std::cout << "rectangle has to be made fatter" << std::endl;);
+        // make rectangle fatter
+        if (is_set_x_center) {
+          //CGAL_SDG_DEBUG(std::cout << "x_center already set" << std::endl;);
+          // grow in both sides
+          break;
+        }
+        // grow only if any point is inside vertical sides
+	if (((CGAL::compare(p.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(p.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(p.y(), y_min) == LARGER)     ) ||
+	    ((CGAL::compare(q.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(q.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(q.y(), y_min) == LARGER)     ) ||
+	    ((CGAL::compare(r.x(), x_min) == EQUAL)   &&
+	     (CGAL::compare(r.y(), y_max) == SMALLER) &&
+	     (CGAL::compare(r.y(), y_min) == LARGER)     )   )
+        { // grow rectangle to the right
+          //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew grow right" << std::endl;);
+          x_max = x_min + y_max - y_min;
+        } else
+        { // grow rectangle to the left
+          //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew grow left" << std::endl;);
+          x_min = x_max - y_max + y_min;
+        }
+        break;
+      case LARGER:
+        //CGAL_SDG_DEBUG(std::cout << "debug rectangle has to be made taller" << std::endl;);
+        // make rectangle taller
+        if (is_set_y_center) {
+          // grow in both sides
+          //CGAL_SDG_DEBUG(std::cout << "debug y_center already set" << std::endl;);
+          break;
+        }
+        // grow only if any point is inside horizontal sides
+	if (((CGAL::compare(p.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(p.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(p.x(), x_min) == LARGER)     ) ||
+	    ((CGAL::compare(q.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(q.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(q.x(), x_min) == LARGER)     ) ||
+	    ((CGAL::compare(r.y(), y_min) == EQUAL)   &&
+	     (CGAL::compare(r.x(), x_max) == SMALLER) &&
+	     (CGAL::compare(r.x(), x_min) == LARGER)     )   )
+        { // grow rectangle upwards
+          //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew grow upwards" << std::endl;);
+          y_max = y_min + x_max - x_min;
+        } else
+        { // grow rectangle downwards
+          //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew grow downwards" << std::endl;);
+          y_min = y_max - x_max + x_min;
+        }
+        break;
+      case EQUAL:
+        // do nothing
+        break;
+    }
+
+    FT ux, uy, uz;
+
+    ux = x_min + x_max;
+    uy = y_min + y_max;
+    uz = FT(2) ;
+
+    //CGAL_SDG_DEBUG(std::cout << "debug vsqrnew sets vv = "
+    //          << ux/uz << ' ' << uy/uz << std::endl;);
+
+    vv = Point_2(ux / uz, uy / uz);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // the Voronoi vertex of two points and a segment
+  //--------------------------------------------------------------------------
+
+  inline void
+  compute_pps_endp_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r, const bool is_r_horizontal) const
+  {
+    CGAL_USE(r);
+    const Site_2 & A = p_endp_r ? p : q;
+    const Site_2 & B = p_endp_r ? q : p;
+    const FT Apar = is_r_horizontal ? A.point().x() : A.point().y();
+    const FT Aort = is_r_horizontal ? A.point().y() : A.point().x();
+    const FT Bpar = is_r_horizontal ? B.point().x() : B.point().y();
+    const FT Bort = is_r_horizontal ? B.point().y() : B.point().x();
+    const FT dpar = Apar - Bpar;
+    const FT dort = Aort - Bort;
+    const FT absdpar = CGAL::abs(dpar);
+    FT vx_, vy_;
+    FT & vpar = is_r_horizontal ? vx_ : vy_;
+    FT & vort = is_r_horizontal ? vy_ : vx_;
+
+    if (2*absdpar < CGAL::abs(dort)) {
+      vpar = Apar;
+      vort = Aort - (dort)/(FT(2));
+    } else {
+      vpar = Apar;
+      vort = Aort - CGAL::sign(dort)*absdpar;
+    }
+    vv = Point_2(vx_, vy_);
+  }
+
+  inline void
+  compute_pps_endp_slope(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r, const bool pos_slope) const
+  {
+    CGAL_USE(r);
+    const Site_2 & A = p_endp_r ? p : q;
+    const Site_2 & B = p_endp_r ? q : p;
+    const FT Ax = A.point().x();
+    const FT Ay = A.point().y();
+    const FT Bx = B.point().x();
+    const FT By = B.point().y();
+    const FT dx = Ax - Bx;
+    const FT dy = Ay - By;
+    const FT absdx = CGAL::abs(dx);
+    const FT absdy = CGAL::abs(dy);
+    FT x_, y_;
+    if (absdx > absdy) {
+      x_ = FT(2)*Ax - dx;
+      y_ = FT(2)*Ay - FT(pos_slope? -1 : +1)*dx;
+    } else {
+      x_ = FT(2)*Ax - FT(pos_slope? -1 : +1)*dy;
+      y_ = FT(2)*Ay - dy;
+    }
+    vv = Point_2(x_/FT(2), y_/FT(2));
+  }
+
+  inline void
+  compute_pps_endp(const Site_2& p, const Site_2& q, const Site_2& r,
+                   const bool p_endp_r) const
+  {
+    const bool is_r_horizontal = is_site_horizontal(r);
+    if (is_r_horizontal || is_site_vertical(r)) {
+      return compute_pps_endp_hv(p, q, r, p_endp_r, is_r_horizontal);
+    } else {
+      const bool pos_slope = has_positive_slope(r);
+      return compute_pps_endp_slope(p, q, r, p_endp_r, pos_slope);
+    }
+  }
+
+  inline void
+  compute_pps_nonendp_hv_samecoord(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_r_horizontal) const
+  {
+    const FT ppar = is_r_horizontal ? p.point().x() : p.point().y();
+    const FT port = is_r_horizontal ? p.point().y() : p.point().x();
+    const FT qort = is_r_horizontal ? q.point().y() : q.point().x();
+    FT vx_, vy_;
+    FT & vpar = is_r_horizontal ? vx_ : vy_;
+    FT & vort = is_r_horizontal ? vy_ : vx_;
+    const FT segort = (is_r_horizontal)?
+      horseg_y_coord(r) : verseg_x_coord(r);
+    const FT sumort = port + qort;
+    vort = sumort/FT(2);
+    const int vhsign = is_r_horizontal ? +1 : -1;
+    const int distsign = CGAL::abs(segort-qort) < CGAL::abs(segort-port) ?
+      +1: -1;
+    vpar = ppar - FT(vhsign*distsign)*(segort-vort);
+    vv = Point_2(vx_, vy_);
+    CGAL_SDG_DEBUG(std::cout << "debug: PPS returns with vv=" << vv << std::endl;);
+  }
+
+  /* compute pps vertex when the points p, q are not endpoints of
+   * segment r, and when segment r is axis-parallel
+   */
+  inline void
+  compute_pps_nonendp_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+                         const bool is_r_horizontal) const
+  {
+    if ((is_r_horizontal       && (scmpx(p, q) == EQUAL)) ||
+        ((! is_r_horizontal) && (scmpy(p, q) == EQUAL))   ) {
+      return compute_pps_nonendp_hv_samecoord(p, q, r, is_r_horizontal);
+    }
+
+    // here, the segment is axis-parallel and the two points:
+    // either: are not sharing a coordinate
+    // or: they share a coordinate AND
+    //     the line connecting the two points is parallel to the segment
+    const Point_2 pp = p.point();
+    const Point_2 qq = q.point();
+    Line_2 l = compute_supporting_line(r);
+    if (oriented_side_of_line(l, pp) == NEGATIVE) {
+      l = opposite_line(l);
+    }
+    CGAL_assertion(oriented_side_of_line(l, pp) == POSITIVE);
+    CGAL_assertion(oriented_side_of_line(l, qq) == POSITIVE);
+
+    const Comparison_result perpcomp =
+      is_r_horizontal ? scmpy(p, q) : scmpx(p, q);
+
+    const RT coordr = hvseg_coord(r, is_r_horizontal);
+
+    if (perpcomp == EQUAL) {
+      const RT pqdist = is_r_horizontal ?
+        CGAL::abs(pp.x()-qq.x()) : CGAL::abs(pp.y()-qq.y());
+      const RT signrdist = (is_r_horizontal ? pp.y() : pp.x()) - coordr;
+      Comparison_result comp = CGAL::compare(pqdist, CGAL::abs(signrdist));
+      vv = Point_2(is_r_horizontal ?
+                     (pp.x() + qq.x()) :
+                     (comp == LARGER) ?
+                       RT(2)*coordr + CGAL::sign(signrdist)*pqdist :
+                       coordr + pp.x(),
+                   is_r_horizontal ?
+                     (comp == LARGER) ?
+                       RT(2)*coordr + CGAL::sign(signrdist)*pqdist :
+                       coordr + pp.y() :
+                     (pp.y() + qq.y()),
+                   RT(2));
+      return;
+    }
+
+    // here, perpcomp is not EQUAL
+    const Sign signla = CGAL::sign(l.a());
+    const Sign signlb = CGAL::sign(l.b());
+    const Sign & testsign = is_r_horizontal ? signlb : signla;
+    CGAL_assertion(testsign != ZERO);
+    const Point_2 & farp =
+      testsign == POSITIVE ?
+        (perpcomp == SMALLER ? qq : pp) :
+        (perpcomp == SMALLER ? pp : qq) ;
+    CGAL_assertion(Base::compare_linf_distances_to_line(
+          l, farp == pp ? qq : pp , farp) == SMALLER);
+    const RT pqdist = (CGAL::max)(
+      CGAL::abs(pp.x()-qq.x()), CGAL::abs(pp.y()-qq.y()));
+
+    const RT sdistf = (is_r_horizontal ? farp.y() : farp.x()) - coordr;
+    CGAL_assertion(CGAL::sign(sdistf) == testsign);
+
+    if (CGAL::compare(CGAL::abs(sdistf), pqdist) == LARGER) {
+      const bool is_p_farthest = farp == pp;
+      const Point_2 & closep = (is_p_farthest)? qq : pp;
+      vv = Point_2(is_r_horizontal ?
+                   (RT(2) * closep.x() - (is_p_farthest? -1 : +1) * sdistf) :
+                   (RT(2)*coordr + sdistf),
+                   is_r_horizontal ?
+                   (RT(2)*coordr + sdistf) :
+                   (RT(2) * closep.y() + (is_p_farthest? -1 : +1) * sdistf),
+                   RT(2));
+    } else {
+      vv = Point_2(is_r_horizontal ?
+                   (pp.x() + qq.x()) :
+                   (RT(2)*coordr + CGAL::sign(sdistf)*pqdist),
+                   is_r_horizontal ?
+                   (RT(2)*coordr + CGAL::sign(sdistf)*pqdist) :
+                   (pp.y() + qq.y()),
+                   RT(2));
+    }
+    return;
+  }
+
+  /* compute pps vertex when the points p, q are not endpoints of
+   * segment r, when segment r is not axis-parallel, and when the
+   * two points p and q do not share any coordinate
+   */
+  inline void
+  compute_pps_nonendp_nonhv_nonsamec
+  (const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    Line_2 l = compute_supporting_line(r);
+    if (oriented_side_of_line(l, p.point()) == NEGATIVE) {
+      l = opposite_line(l);
+    }
+    CGAL_assertion(oriented_side_of_line(l, p.point()) == POSITIVE);
+    CGAL_assertion(oriented_side_of_line(l, q.point()) == POSITIVE);
+
+    const bool pos_slope = has_positive_slope(r);
+    const Comparison_result first_comp =
+      (pos_slope) ? scmpy(p, q) : scmpx(p, q);
+    const Comparison_result second_comp =
+      (pos_slope) ? scmpx(p, q) : scmpy(p, q);
+
+    const Sign signla = CGAL::sign(l.a());
+    const Sign signlb = CGAL::sign(l.b());
+    const Comparison_result first_value =
+      (signlb == POSITIVE)? SMALLER : LARGER;
+
+    const Comparison_result second_value =
+      (signla == NEGATIVE)? SMALLER : LARGER;
+
+    if (first_comp == first_value) {
+      const FT pcoord = pos_slope ? p.point().x() : p.point().y();
+      const FT lineval = coord_at(l, pcoord, pos_slope);
+      const Point_2 corner = pos_slope?
+        Point_2(pcoord, lineval) : Point_2(lineval, pcoord);
+      const FT sidelen = (CGAL::max)(CGAL::abs(corner.x() - q.point().x()),
+                                     CGAL::abs(corner.y() - q.point().y()));
+      vv = Point_2(FT(2)*corner.x() + signla*sidelen,
+                   FT(2)*corner.y() + signlb*sidelen,
+                   FT(2));
+      return;
+    }
+    if (second_comp == second_value) {
+      const FT qcoord = pos_slope ? q.point().y() : q.point().x();
+      const FT lineval = coord_at(l, qcoord, ! pos_slope);
+      const Point_2 corner = pos_slope?
+        Point_2(lineval, qcoord) : Point_2(qcoord, lineval);
+      const FT sidelen = (CGAL::max)(CGAL::abs(corner.x() - p.point().x()),
+                                     CGAL::abs(corner.y() - p.point().y()));
+      vv = Point_2(FT(2)*corner.x() + signla*sidelen,
+                   FT(2)*corner.y() + signlb*sidelen,
+                   FT(2));
+      return;
+    }
+
+    CGAL_assertion((first_comp  == -first_value ) &&
+                   (second_comp == -second_value)    );
+
+    const FT px = p.point().x();
+    const FT py = p.point().y();
+    const FT qx = q.point().x();
+    const FT qy = q.point().y();
+    const FT pqdist = (CGAL::max)(CGAL::abs(px - qx), CGAL::abs(py - qy));
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vsqrt pqdist=" << pqdist << std::endl;);
+
+    const FT & pcoord = pos_slope ? px : py;
+    const FT plineval = coord_at(l, pcoord, pos_slope);
+    const FT & pothercoord = pos_slope ? py : px;
+    const FT plen = CGAL::abs(plineval -  pothercoord);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vsqrt plen=" << plen << std::endl;);
+    if (CGAL::compare(pqdist, plen) != SMALLER) {
+      // here, appropriate projection of p on supporting line of segment r
+      // is shorter than Linf p, q distance
+      const Point_2 corner = pos_slope?
+        Point_2(pcoord, plineval) : Point_2(plineval, pcoord);
+      vv = Point_2(FT(2)*corner.x() + signla*pqdist,
+                   FT(2)*corner.y() + signlb*pqdist,
+                   FT(2));
+      return;
+    }
+
+    const FT & qcoord = pos_slope ? qy : qx;
+    const FT qlineval = coord_at(l, qcoord, ! pos_slope);
+    const FT & qothercoord = pos_slope ? qx : qy;
+    const FT qlen = CGAL::abs(qlineval -  qothercoord);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: vsqrt qlen=" << qlen << std::endl;);
+    if (CGAL::compare(pqdist, qlen) != SMALLER) {
+      // here, appropriate projection of q on supporting line of segment r
+      // is shorter than Linf p, q distance
+      const Point_2 corner = pos_slope?
+        Point_2(qlineval, qcoord) : Point_2(qcoord, qlineval);
+      vv = Point_2(FT(2)*corner.x() + signla*pqdist,
+                   FT(2)*corner.y() + signlb*pqdist,
+                   FT(2));
+      return;
+    }
+
+    CGAL_assertion((pqdist < plen) && (pqdist < qlen));
+
+    // here, compute corner opposite of corner on line of segment r
+    const Point_2 opposite_corner = pos_slope ?
+      Point_2(qx, py) : Point_2(px, qy);
+    CGAL_SDG_DEBUG(std::cout << "debug: vsqrt opposite_corner="
+        << opposite_corner << std::endl;);
+
+    const Point_2 corner =
+      compute_linf_projection_nonhom(l, opposite_corner);
+
+    vv = Point_2(corner.x() + opposite_corner.x(),
+                 corner.y() + opposite_corner.y(),
+                 FT(2));
+  }
+
+  inline void
+  compute_pps_nonendp_nonhv(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    const bool samexpq = scmpx(p, q) == EQUAL;
+    const bool sameypq = (samexpq)? false : make_certain(scmpy(p, q) == EQUAL);
+    if (! (samexpq || sameypq)) {
+      return compute_pps_nonendp_nonhv_nonsamec(p, q, r);
+    } else {
+      // samexpq || sameypq
+      CGAL_assertion(samexpq != sameypq);
+      Line_2 l = compute_supporting_line(r);
+      const FT common_coord = (samexpq) ? p.point().x() : p.point().y();
+      const FT sumdiffpq = (samexpq) ?
+        p.point().y() + q.point().y() :
+        p.point().x() + q.point().x();
+      const bool pos_slope = has_positive_slope(r);
+      FT vsamecoord;
+      if (touch_same_side(p, q, l, samexpq, pos_slope)) {
+        vsamecoord = common_coord +
+          (pos_slope? +1: -1)*
+            (coord_at(l, common_coord, samexpq) - (sumdiffpq/FT(2)));
+      } else {
+        const FT closest_coord =
+          (samexpq)? ((pos_slope)? q.point().y() : p.point().y()):
+                     ((pos_slope)? p.point().x() : q.point().x());
+        if (is_orth_dist_smaller_than_pt_dist(
+              closest_coord, l, p, q, samexpq)) {
+          vsamecoord =
+            coord_at(l, closest_coord, sameypq) +
+            (((samexpq) ? (q.point().y() - p.point().y()) :
+                          (p.point().x() - q.point().x())  ) / FT(2)) ;
+        } else {
+          const Line_2 lc (
+              (samexpq) ? 1 : (2 * ((pos_slope) ? +1 : -1)),
+              (samexpq) ? (2 * ((pos_slope) ? +1 : -1)) : 1 ,
+              ((pos_slope)? -1 : +1 ) * sumdiffpq - common_coord);
+          RT hx, hy, hz;
+          compute_intersection_of_lines(l, lc, hx, hy, hz);
+          vsamecoord = ((samexpq ? hx/hz : hy/hz) + common_coord)/ FT(2);
+        }
+      }
+      const FT vdiffcoord = sumdiffpq/FT(2);
+      vv = (samexpq) ? Point_2(vsamecoord, vdiffcoord) :
+                       Point_2(vdiffcoord, vsamecoord) ;
+    }
+  }
+
+  inline void
+  compute_pps_nonendp(const Site_2& p, const Site_2& q, const Site_2& r)
+  const
+  {
+    const bool is_r_horizontal = is_site_horizontal(r);
+    if (is_r_horizontal || is_site_vertical(r)) {
+      return compute_pps_nonendp_hv(p, q, r, is_r_horizontal);
+    } else {
+      return compute_pps_nonendp_nonhv(p, q, r);
+    }
+  }
+
+  void
+  compute_vv(const Site_2& sp, const Site_2& sq, const Site_2& sr,
+	     const PPS_Type& type) const
+  {
+    CGAL_precondition( sp.is_point() && sq.is_point() &&
+		       sr.is_segment() );
+    CGAL_USE(type);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: compute_vv PPS entering p=" << sp
+        << " q=" << sq << " r=" << sr << std::endl;);
+
+    if ( is_vv_computed ) { return; }
+    is_vv_computed = true;
+
+    const bool p_endp_r = is_endpoint_of(sp, sr);
+    const bool q_endp_r = is_endpoint_of(sq, sr);
+
+    if (p_endp_r || q_endp_r) {
+      return compute_pps_endp(sp, sq, sr, p_endp_r);
+    }
+    CGAL_assertion(are_in_same_open_halfspace_of(sp, sq, sr));
+    return compute_pps_nonendp(sp, sq, sr);
+  }
+
+  inline
+  void compute_vv_bisectors(
+      const Site_2& sp, const Site_2& sq, const Site_2& sr,
+      const PPS_Type&) const
+  {
+    Polychainline_2 bpq = bisector_linf(sp, sq);
+    CGAL_SDG_DEBUG(std::cout << "debug: bpq p=" << sp << " q=" << sq << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "debug: bpq =" << bpq << std::endl;);
+
+    bool samexpq = (scmpx(sp, sq) == EQUAL);
+    bool sameypq = (scmpy(sp, sq) == EQUAL);
+
+    CGAL_assertion(! (samexpq && sameypq));
+
+    bool samecoordpq = samexpq || sameypq ;
+
+    Polychainline_2 goodbisector;
+    if (is_endpoint_of(sp, sr)) {
+      goodbisector = bisector_linf(sr, sp);
+      CGAL_SDG_DEBUG(std::cout << "debug: brp r=" << sr << " p=" << sp << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: brp res=" << goodbisector << std::endl;);
+    } else if (is_endpoint_of(sq, sr)) {
+      goodbisector = bisector_linf(sq, sr);
+      CGAL_SDG_DEBUG(std::cout << "debug: bqr q=" << sq << " r=" << sr << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: bqr res=" << goodbisector << std::endl;);
+    } else if (samecoordpq) {
+      CGAL_SDG_DEBUG(std::cout << "debug PPS samecoordpq" << std::endl;);
+
+      // check which of points p, q is closer to segment r
+
+      bool use_bqr;
+
+      Line_2 l = compute_supporting_line(sr);
+
+      if (((CGAL::sign(l.a()) == ZERO) && sameypq) ||
+          ((CGAL::sign(l.b()) == ZERO) && samexpq)   )  {
+        // here l is horizontal or vertical and parallel to pq;
+        // bqr or brp are equally good
+        use_bqr = true;
+      } else {
+        // here l and segment are neither hor. nor ver.
+        Point_2 proj;
+        FT projft, pft, qft;
+        if (samexpq) {
+          // compute vertical projection
+          proj = compute_vertical_projection(l, sp.point());
+          projft = proj.y();
+          pft = sp.point().y();
+          qft = sq.point().y();
+
+
+        } else {
+          CGAL_assertion(sameypq);
+          // compute horizontal projection
+          proj = compute_horizontal_projection(l, sp.point());
+          projft = proj.x();
+          pft = sp.point().x();
+          qft = sq.point().x();
+        }
+        Comparison_result cpq, cqproj;
+        cpq    = CGAL::compare(pft, qft);
+        cqproj = CGAL::compare(qft, projft);
+        if (cpq == cqproj) {
+          use_bqr = true;
+        } else {
+          use_bqr = false;
+        }
+      } // end of case of neither hor nor ver segment
+
+      if (use_bqr) {
+        goodbisector = bisector_linf(sq, sr);
+        CGAL_SDG_DEBUG(std::cout << "debug: bqr q=" << sq << " r=" << sr << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug: bqr res=" << goodbisector << std::endl;);
+      } else {
+        goodbisector = bisector_linf(sr, sp);
+        CGAL_SDG_DEBUG(std::cout << "debug: brp r=" << sr << " p=" << sp << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug: brp res=" << goodbisector << std::endl;);
+      }
+    } else {
+      goodbisector = bisector_linf(sq, sr);
+      CGAL_SDG_DEBUG(std::cout << "debug: bqr q=" << sq << " r=" << sr << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: bqr res=" << goodbisector << std::endl;);
+    }
+
+    vv = bpq.first_intersection_point_with(goodbisector);
+    CGAL_SDG_DEBUG(std::cout << "debug: PPS returns with vv=" << vv << std::endl;);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // the Voronoi vertex of a point and two segments
+  // also: the Voronoi vertex of a point and two lines
+  //--------------------------------------------------------------------------
+
+
+  void
+  compute_vv(const Site_2& sp, const Site_2& sq, const Site_2& sr,
+	     const PSS_Type&) const
+  {
+#ifdef CGAL_PROFILE
+    // In case CGAL profile is called then output the sites in case of
+    // a filter failure
+    if ( Algebraic_structure_traits<FT>::Is_exact::value ) {
+      std::ofstream ofs("vv-failure-log.cin", std::ios_base::app);
+      ofs.precision(16);
+      ofs << sp << std::endl;
+      ofs << sq << std::endl;
+      ofs << sr << std::endl;
+      ofs << "=======" << std::endl;
+      ofs.close();
+    }
+#endif
+
+    CGAL_precondition( sp.is_point() && sq.is_segment() &&
+		       sr.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: computevv PSS entering p=" << sp
+        << " q=" << sq << " r=" << sr << std::endl;);
+
+    if ( is_vv_computed ) { return; }
+    is_vv_computed = true;
+
+    const bool pq = is_endpoint_of(sp, sq);
+    const bool pr = is_endpoint_of(sp, sr);
+
+    Point_2 pp = sp.point();
+
+    if ( pq && pr ) {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug field_new setting vv = pp = "
+          << pp << std::endl;);
+      vv = pp;
+      return;
+    }
+    const bool is_q_hor = is_site_horizontal(sq);
+    const bool is_q_ver = is_site_vertical(sq);
+    const bool is_r_hor = is_site_horizontal(sr);
+    const bool is_r_ver = is_site_vertical(sr);
+    const bool is_q_hv = is_q_hor || is_q_ver;
+    const bool is_r_hv = is_r_hor || is_r_ver;
+    if (is_q_hv && is_r_hv) {
+      compute_pss_both_hv(sp, sq, sr, is_q_hor, is_r_hor, pq, pr);
+    } else {
+      if (pq || pr) {
+        compute_pss_endp(sp, sq, sr,
+            is_q_hv, is_q_hor, pq, is_r_hv, is_r_hor, pr);
+      } else {
+        compute_pss_nonendp(sp, sq, sr,
+            is_q_hv, is_q_hor, is_r_hv, is_r_hor);
+      }
+    }
+  }
+
+  // PSS case when not both segments are axis-parallel and p is
+  // not an endpoint of any of the segments q and r
+  inline void
+  compute_pss_nonendp(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hv, const bool is_q_hor,
+      const bool is_r_hv, const bool is_r_hor) const
+  {
+    CGAL_USE(is_q_hv);
+    CGAL_USE(is_q_hor);
+    CGAL_USE(is_r_hv);
+    CGAL_USE(is_r_hor);
+    const Line_2 lq = orient_line_nonendp(p, q);
+    const Line_2 lr = orient_line_nonendp(p, r);
+    const Bearing bq = bearing(lq);
+    const Bearing br = bearing(lr);
+    const Bearing bdiff = bearing_diff(bq, br);
+    CGAL_assertion( bdiff != 0 );
+    CGAL_assertion( bdiff != 7 );
+
+    if (bdiff == 1) {
+      compute_pss_corner_and_pt(p, lq, lr, bq, br);
+    } else if (bdiff == 2) {
+      compute_pss_nonhv_consecutive(p, q, r, lq, lr, bq, br);
+    } else if ((bdiff == 3) || (bdiff == 4)) {
+      compute_pss_ortho_wedge(p, q, r, lq, lr, bq, br);
+    } else if (bdiff == 5) {
+      compute_pss_side_p_known(p, q, r, lq, lr, bq, br);
+    } else if (bdiff == 6) {
+      compute_pss_lines_side(p, lq, lr, (br+1)%8);
+    } else {
+      CGAL_assertion( false );
+    }
+    CGAL_assertion( oriented_side_of_line(lq, this->point()) != ZERO );
+    CGAL_assertion( oriented_side_of_line(lr, this->point()) != ZERO );
+  }
+
+  inline void
+  compute_pss_lines_side(const Site_2& p,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bside) const
+  {
+    CGAL_precondition(bside % 2 == 1);
+    const bool side_ver = (bside % 4 == 1);
+    FT pcoord = (side_ver) ? p.point().x() : p.point().y();
+    FT qcoord = coord_at(lq, pcoord, side_ver);
+    FT rcoord = coord_at(lr, pcoord, side_ver);
+    FT sidelen = CGAL::abs(qcoord-rcoord);
+    const int sgn = (bside < 4) ? -1 : +1;
+    vv = side_ver ?
+      Point_2(pcoord + sgn*sidelen/FT(2), (qcoord+rcoord)/FT(2)) :
+      Point_2((qcoord+rcoord)/FT(2), pcoord + sgn*sidelen/FT(2)) ;
+  }
+
+  inline void
+  compute_pss_side_p_known(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br) const
+  {
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    const Bearing bside = (br + ((br % 2 == 0) ? 1 : 2)) % 8;
+    const bool l_compute_y = (bside % 4 == 1) ? true : false;
+    const FT pcoord = l_compute_y ? p.point().x() : p.point().y();
+    const FT qcoord = coord_at(lq, pcoord, l_compute_y);
+    const FT rcoord = coord_at(lr, pcoord, l_compute_y);
+    const Point_2 qcorner =
+      l_compute_y ? Point_2(pcoord, qcoord) : Point_2(qcoord, pcoord);
+    const Point_2 rcorner =
+      l_compute_y ? Point_2(pcoord, rcoord) : Point_2(rcoord, pcoord);
+    vv = center_from_same_side_corners(rcorner, qcorner, bside);
+  }
+
+  inline void
+  compute_pss_ortho_wedge(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br) const
+  {
+    CGAL_USE(q);
+    CGAL_USE(r);
+    const FT xp = p.point().x();
+    const FT yp = p.point().y();
+    const bool lq_compute_y = ((bq / 2) % 2 == 0) ? false : true;
+    const FT & lq_from_p = lq_compute_y ? xp : yp;
+    const FT & lr_from_p = lq_compute_y ? yp : xp;
+    const FT qcoord = coord_at(lq, lq_from_p, lq_compute_y);
+    const FT rcoord = coord_at(lr, lr_from_p, ! lq_compute_y);
+    const FT qdist = (bq < 4) ? qcoord - lr_from_p :
+                                lr_from_p - qcoord;
+    CGAL_assertion(CGAL::sign(qdist) == POSITIVE);
+    const FT rdist = (bq <= 1) || (bq >= 6) ? rcoord - lq_from_p :
+                                              lq_from_p - rcoord;
+    CGAL_assertion(CGAL::sign(rdist) == POSITIVE);
+    const Comparison_result cmpqr = CGAL::compare(qdist, rdist);
+    const bool q_closer = (cmpqr == SMALLER);
+    const Point_2 corner =
+      q_closer ?
+      (lq_compute_y ? Point_2(xp, qcoord) : Point_2(qcoord, yp)) :
+      (lq_compute_y ? Point_2(rcoord, yp) : Point_2(xp, rcoord)) ;
+    const Bearing bnonhv = (bq % 2 == 1) ? br : bq;
+    CGAL_assertion(bnonhv % 2 == 0);
+    const Line_2 lcorner = (bnonhv % 4 == 0)?
+        compute_neg_45_line_at(corner) :
+        compute_pos_45_line_at(corner) ;
+    const Line_2 & lother = q_closer ? lr : lq;
+    RT hx, hy, hw;
+    compute_intersection_of_lines(lother, lcorner, hx, hy, hw);
+    vv = center_from_opposite_corners(Point_2(hx, hy, hw), corner);
+  }
+
+  inline void
+  compute_pss_nonhv_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br) const
+  {
+    const Bearing bqr = (bq+1)%8;
+    return (bqr % 4) == 1 ?
+      compute_pss_x_consecutive(p, q, r, lq, lr, bq, br, bqr) :
+      compute_pss_y_consecutive(p, q, r, lq, lr, bq, br, bqr) ;
+  }
+
+  inline void
+  compute_pss_x_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br,
+      const Bearing bqr) const
+  {
+    CGAL_precondition((bqr == 1) || (bqr == 5));
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    CGAL_USE(br);
+    const FT xp = p.point().x();
+    const FT x =
+      (lr.b()*(lq.b()*xp + lq.c()) - lq.b()*lr.c()) /
+      (lr.b()*(lq.b() -lq.a()) + lq.b()*lr.a()) ;
+    const FT yq = (lq.a()*x + lq.c())/(-lq.b());
+    const FT yr = (lr.a()*x + lr.c())/(-lr.b());
+
+    const FT yp = p.point().y();
+    if (CGAL::compare(yp, yq) == ((bqr == 1) ? SMALLER : LARGER)) {
+      // p close to q
+      const FT xs = coord_at(lq, yp, false);
+      const FT ys = coord_at(lr, xs, true);
+      vv = Point_2(RT(2)*xs + (yp - ys), yp + ys, RT(2));
+    } else if (CGAL::compare(yp, yr) == ((bqr == 1) ? LARGER : SMALLER)) {
+      // p close to r
+      const FT xs = coord_at(lr, yp, false);
+      const FT ys = coord_at(lq, xs, true);
+      vv = Point_2(RT(2)*xs + (ys - yp), yp + ys, RT(2));
+    } else {
+      // p on opposite side of two lines (or on its corners)
+      vv = Point_2(xp + x, yq + yr, RT(2));
+    }
+  }
+
+  inline void
+  compute_pss_y_consecutive(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br,
+      const Bearing bqr) const
+  {
+    CGAL_precondition((bqr == 3) || (bqr == 7));
+    CGAL_USE(q);
+    CGAL_USE(r);
+    CGAL_USE(bq);
+    CGAL_USE(br);
+    const FT yp = p.point().y();
+    const FT y =
+      (lr.a()*(lq.a()*yp - lq.c()) + lq.a()*lr.c()) /
+      (lr.a()*(lq.a() + lq.b()) - lq.a()*lr.b()) ;
+    const FT xq = (lq.b()*y + lq.c())/(-lq.a());
+    const FT xr = (lr.b()*y + lr.c())/(-lr.a());
+
+    const FT xp = p.point().x();
+    if (CGAL::compare(xp, xq) == ((bqr == 3) ? LARGER : SMALLER)) {
+      // p close to q
+      const FT ys = coord_at(lq, xp, true);
+      const FT xs = coord_at(lr, ys, false);
+      vv = Point_2(xp + xs, RT(2)*ys + (xs - xp), RT(2));
+    } else if (CGAL::compare(xp, xr) == ((bqr == 3) ? SMALLER : LARGER)) {
+      // p close to r
+      const FT ys = coord_at(lr, xp, true);
+      const FT xs = coord_at(lq, ys, false);
+      vv = Point_2(xp + xs, RT(2)*ys + (xp - xs), RT(2));
+    } else {
+      // p on opposite side of two lines (or on its corners)
+      vv = Point_2(xq + xr, yp + y, RT(2));
+    }
+  }
+
+  inline void
+  compute_pss_corner_and_pt(const Site_2& p,
+      const Line_2& lq, const Line_2 & lr,
+      const Bearing bq, const Bearing br) const
+  {
+    RT cx, cy, cw;
+    compute_intersection_of_lines(lq, lr, cx, cy, cw);
+    const Bearing cb = (bq % 2 == 0) ? bq : br;
+    vv = center_from_corner_and_pt(Point_2(cx, cy, cw), cb, p.point());
+  }
+
+  // PSS case when not both segments are axis-parallel and p is
+  // an endpoint of one of the segments
+  inline void
+  compute_pss_endp(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hv, const bool is_q_hor, const bool pq,
+      const bool is_r_hv, const bool is_r_hor, const bool pr) const
+  {
+    CGAL_precondition(pq || pr);
+    CGAL_USE(pr);
+    const Line_2 lendp = orient_line_endp(p, (pq ? q : r), pq);
+    const Line_2 lnon = orient_line_nonendp(p, (pq ? r : q));
+    const Line_2 llbis = bisector_linf_line(
+        (pq ? q : r), (pq ? r : q), lendp, lnon);
+    Line_2 lperp;
+    const bool is_hv = pq ? is_q_hv : is_r_hv;
+    if (is_hv) {
+      const bool is_hor = pq ? is_q_hor : is_r_hor;
+      lperp = is_hor ? compute_ver_line_at(p.point()) :
+                       compute_hor_line_at(p.point()) ;
+    } else {
+      lperp = has_positive_slope(pq ? q : r) ?
+        compute_neg_45_line_at(p.point()) :
+        compute_pos_45_line_at(p.point()) ;
+    }
+    RT ux, uy, uz;
+    compute_intersection_of_lines(llbis, lperp, ux, uy, uz);
+    vv = Point_2(ux, uy, uz);
+    CGAL_assertion( oriented_side_of_line(lendp, this->point()) != ZERO );
+    CGAL_assertion( oriented_side_of_line(lnon, this->point()) != ZERO );
+  }
+
+  // both segments are axis-parallel
+  inline void
+  compute_pss_both_hv(const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr) const
+  {
+    CGAL_precondition(! (pq && pr));
+    if (is_q_hor == is_r_hor) {
+      // parallel segments
+      const RT q_coord = hvseg_coord(q, is_q_hor);
+      const RT r_coord = hvseg_coord(r, is_r_hor);
+      RT ux_, uy_, uz_;
+      RT & upar = is_q_hor ? ux_ : uy_;
+      RT & uort = is_q_hor ? uy_ : ux_;
+      upar = RT(2)*(is_q_hor ? p.point().x() : p.point().y())
+        + (( pq || pr ) ? RT(0) :
+                          RT(is_q_hor ? +1 : -1)*(r_coord - q_coord));
+      uort = q_coord + r_coord;
+      uz_ = RT(2);
+      vv = Point_2(ux_, uy_, uz_);
+    } else {
+      return compute_pss_both_hv_nonpar(
+          p, q, r, is_q_hor, is_r_hor, pq, pr);
+    }
+  }
+
+  // one segment is horizontal and the other is vertical
+  inline void
+  compute_pss_both_hv_nonpar(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr) const
+  {
+    CGAL_precondition(is_q_hor != is_r_hor);
+    if (pq || pr) {
+      const RT q_coord = hvseg_coord(q, is_q_hor);
+      const RT r_coord = hvseg_coord(r, is_r_hor);
+      const bool is_touched_hor = pq ? is_q_hor : is_r_hor;
+      const RT coord_c = is_touched_hor ? p.point().x() : p.point().y();
+      const RT radius = CGAL::abs(coord_c - (pq ? r_coord : q_coord));
+      RT ux_, uy_, uz_;
+      RT & upar = is_touched_hor ? ux_ : uy_;
+      RT & uort = is_touched_hor ? uy_ : ux_;
+      const Site_2 & sother =
+        pq ? (same_points(p, q.source_site()) ?
+              q.target_site() : q.source_site()) :
+             (same_points(p, r.source_site()) ?
+              r.target_site() : r.source_site());
+      const bool test = is_touched_hor ?
+        (scmpx(p, sother) == LARGER) : (scmpy(p, sother) == SMALLER);
+      const RT sgn = RT( (pq ? +1: -1)* (test ? -1 : +1) );
+      upar = coord_c;
+      uort = (pq ? q_coord : r_coord) + sgn*radius;
+      uz_ = RT(1);
+      CGAL_SDG_DEBUG(std::cout << "debug: vring compute_pss vv="
+          << Point_2(ux_, uy_, uz_) << " radius=" << radius << std::endl;);
+      CGAL_assertion_code( const Point_2 pother = sother.point() );
+      CGAL_assertion(pq ?
+          CGAL::left_turn(Point_2(ux_,uy_,uz_), p.point(), pother) :
+          CGAL::left_turn(pother, p.point(), Point_2(ux_,uy_,uz_)) );
+      vv = Point_2(ux_, uy_, uz_);
+      return;
+    } else {
+      return compute_pss_both_hv_nonpar_nonendp(
+               p, q, r, is_q_hor, is_r_hor, pq, pr);
+    }
+  }
+
+  // one segment is horizontal and the other is vertical and
+  // the point p is not an endpoint of the segments
+  inline void
+  compute_pss_both_hv_nonpar_nonendp(
+      const Site_2& p, const Site_2& q, const Site_2& r,
+      const bool is_q_hor, const bool is_r_hor,
+      const bool pq, const bool pr) const
+  {
+    CGAL_precondition(! (pq || pr));
+    CGAL_USE(pq);
+    CGAL_USE(pr);
+    const RT q_coord = hvseg_coord(q, is_q_hor);
+    const RT r_coord = hvseg_coord(r, is_r_hor);
+    const RT p_coord_q = is_q_hor ? p.point().y() : p.point().x();
+    const RT p_coord_r = is_r_hor ? p.point().y() : p.point().x();
+    const RT sdistq = p_coord_q - q_coord;
+    const RT sdistr = p_coord_r - r_coord;
+    const RT distq = CGAL::abs(sdistq);
+    const RT distr = CGAL::abs(sdistr);
+    const RT & dx = is_r_hor ? distq : distr;
+    const RT & dy = is_r_hor ? distr : distq;
+    const Comparison_result cmp = CGAL::compare(dx, dy);
+    RT ux_, uy_, uz_;
+    if (cmp == LARGER) {
+      ux_ = is_q_hor ? r_coord + p_coord_r : q_coord + p_coord_q;
+      uy_ = is_q_hor ? (RT(2)*q_coord + CGAL::sign(sdistq)*dx) :
+                       (RT(2)*r_coord + CGAL::sign(sdistr)*dx) ;
+    } else if (cmp == SMALLER) {
+      uy_ = is_r_hor ? r_coord + p_coord_r : q_coord + p_coord_q;
+      ux_ = is_r_hor ? (RT(2)*q_coord + CGAL::sign(sdistq)*dy) :
+                       (RT(2)*r_coord + CGAL::sign(sdistr)*dy) ;
+    } else {
+      ux_ = is_q_hor ? r_coord + p_coord_r : q_coord + p_coord_q;
+      uy_ = is_q_hor ? q_coord + p_coord_q : r_coord + p_coord_r;
+    }
+    uz_ = RT(2);
+    vv = Point_2(ux_, uy_, uz_);
+  }
+
+  inline void
+  compute_vv_bisectors(
+      const Site_2& sp, const Site_2& sq, const Site_2& sr,
+      const PSS_Type&) const
+  {
+    const bool pq = is_endpoint_of(sp, sq);
+    Polychainline_2 goodbisector;
+    if (pq) {
+      goodbisector = bisector_linf(sp, sq);
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: computevv bpq p=" << sp << " q=" << sq << std::endl;);
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: computevv bpq =" << goodbisector << std::endl;);
+    } else {
+      goodbisector = bisector_linf(sr, sp);
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: computevv brp r=" << sr << " p=" << sp << std::endl;);
+      CGAL_SDG_DEBUG(std::cout << "debug: computevv brp ="
+          << goodbisector << std::endl;);
+    }
+
+    Polychainline_2 bqr = bisector_linf(sq, sr);
+    CGAL_SDG_DEBUG(std::cout << "debug: computevv bqr q="
+        << sq << " r=" << sr << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "debug: computevv bqr ="
+        << bqr << std::endl;);
+
+    vv = goodbisector.first_intersection_point_with(bqr);
+    CGAL_SDG_DEBUG(std::cout
+        << "debug: computevv PSS vv=" << vv << std::endl;);
+  }
+
+
+
+  //--------------------------------------------------------------------------
+  // the Voronoi vertex of three segments
+  //--------------------------------------------------------------------------
+
+  void
+  compute_vv(const Site_2& sp, const Site_2& sq, const Site_2& sr,
+	     const SSS_Type&) const
+  {
+    CGAL_precondition( sp.is_segment() && sq.is_segment() &&
+		       sr.is_segment() );
+
+    if ( is_vv_computed ) { return; }
+    is_vv_computed = true;
+
+    const bool is_psrc_q = is_endpoint_of(sp.source_site(), sq);
+    const bool is_psrc_r = is_endpoint_of(sp.source_site(), sr);
+    const bool is_ptrg_q = is_endpoint_of(sp.target_site(), sq);
+    const bool is_ptrg_r = is_endpoint_of(sp.target_site(), sr);
+
+    if (is_psrc_q && is_psrc_r) {
+      vv = sp.source();
+    } else if (is_ptrg_q && is_ptrg_r) {
+      vv = sp.target();
+    } else {
+      // here, not all segments have a common point
+      const bool is_p_hor = is_site_horizontal(sp);
+      const bool is_q_hor = is_site_horizontal(sq);
+      const bool is_r_hor = is_site_horizontal(sr);
+
+      const bool is_p_hv = is_p_hor || is_site_vertical(sp);
+      const bool is_q_hv = is_q_hor || is_site_vertical(sq);
+      const bool is_r_hv = is_r_hor || is_site_vertical(sr);
+
+      if (is_p_hv && is_q_hv && is_r_hv) {
+        return compute_vv_sss_hv(sp, sq, sr, is_p_hor, is_q_hor, is_r_hor);
+      }
+
+      Line_2 lines[3];
+      orient_lines_linf(sp, sq, sr, lines);
+
+      const bool have_common_pq = is_psrc_q || is_ptrg_q;
+      const bool have_common_rp = is_psrc_r || is_ptrg_r;
+
+#ifndef CGAL_NO_ASSERTIONS
+      const bool is_qsrc_r = is_endpoint_of(sq.source_site(), sr);
+      const bool is_qtrg_r = is_endpoint_of(sq.target_site(), sr);
+      const bool have_common_qr = is_qsrc_r || is_qtrg_r;
+
+      const unsigned int num_common =
+        ((have_common_pq) ? 1 : 0) +
+        ((have_common_qr) ? 1 : 0) +
+        ((have_common_rp) ? 1 : 0)  ;
+
+      // num_common can be 3 if the three segments create a triangle;
+      // trivial assertion
+      CGAL_assertion(num_common <= 3);
+
+      const unsigned int num_hv =
+        ((is_p_hv) ? 1 : 0) +
+        ((is_q_hv) ? 1 : 0) +
+        ((is_r_hv) ? 1 : 0)  ;
+
+      // this is a trivial assertion
+      CGAL_assertion(num_hv <= 3);
+
+      CGAL_SDG_DEBUG(
+        std::cout
+            << "debug: vsqr num_common=" << num_common
+            << " pq=" << have_common_pq
+            << " qr=" << have_common_qr
+            << " rp=" << have_common_rp
+            << " num_hv=" << num_hv
+            << std::endl;
+      );
+#endif
+
+      bool bpqset(false);
+      bool bqrset(false);
+      bool brpset(false);
+
+      Line_2 bpq;
+      if ((is_p_hv && is_q_hv && have_common_pq) ) {
+        const Point_2 xpq = is_psrc_q ? sp.source() : sp.target();
+        Direction_2 dirbpq = dir_from_lines(lines[0], lines[1]);
+        bpq = compute_line_dir(xpq, dirbpq);
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr bpq p=" << sp << " q=" << sq << std::endl;);
+        //CGAL_SDG_DEBUG(std::cout
+        //    << "debug: vsqr bpq =" << bpq << std::endl;);
+        bpqset = true;
+      }
+
+      Line_2 bqr;
+      if ((! bpqset) || (is_q_hv && is_r_hv) ||
+          (! have_common_rp)) {
+        bqr = bisector_linf_line(sq, sr, lines[1], lines[2]);
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr bqr q=" << sq << " r=" << sr << std::endl;);
+        //CGAL_SDG_DEBUG(std::cout
+        //    << "debug: vsqr bqr =" << bqr << std::endl;);
+        bqrset = true;
+      }
+
+      Line_2 brp;
+      if ((! (bpqset && bqrset))) {
+        if (are_parallel_lines(lines[0], lines[2])) {
+          brp = parallel_bis(lines[0], lines[2]);
+        } else {
+          Point_2 xrp;
+          if (have_common_rp) {
+            xrp = is_psrc_r ? sp.source() : sp.target();
+          } else {
+            RT hx, hy, hz;
+            compute_intersection_of_lines(lines[0], lines[2], hx, hy, hz);
+            xrp = Point_2(hx, hy, hz);
+          }
+          Direction_2 dirbrp = dir_from_lines(lines[2], lines[0]);
+          brp = compute_line_dir(xrp, dirbrp);
+        }
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr brp r=" << sr << " p=" << sp << std::endl;);
+        //CGAL_SDG_DEBUG(std::cout
+        //    << "debug: vsqr brp =" << brp << std::endl;);
+        brpset = true;
+      }
+
+      CGAL_assertion((bpqset && bqrset) || (bqrset && brpset)
+          || (brpset && bpqset));
+
+      RT ux, uy, uz;
+      if (bpqset && bqrset) {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr SSS using bpq bqr" << std::endl;);
+        compute_intersection_of_lines(bpq, bqr, ux, uy, uz);
+      } else if (bqrset && brpset) {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr SSS using bqr brp" << std::endl;);
+        compute_intersection_of_lines(bqr, brp, ux, uy, uz);
+      } else {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug: vsqr SSS using brp bpq" << std::endl;);
+        compute_intersection_of_lines(brp, bpq, ux, uy, uz);
+      }
+      vv = Point_2(ux, uy, uz);
+      CGAL_SDG_DEBUG(std::cout
+          << "debug: vsqr SSS vv=" << vv << std::endl;);
+      CGAL_assertion( oriented_side_of_line(lines[0], this->point()) != ZERO );
+      CGAL_assertion( oriented_side_of_line(lines[1], this->point()) != ZERO );
+      CGAL_assertion( oriented_side_of_line(lines[2], this->point()) != ZERO );
+    }
+  }
+
+
+  // SSS: all sites are axis-parallel
+  inline void
+  compute_vv_sss_hv(const Site_2 & p, const Site_2 & q, const Site_2 & r,
+      const bool is_p_hor, const bool is_q_hor, const bool is_r_hor)
+  const
+  {
+    CGAL_precondition(! (is_p_hor && is_q_hor && is_r_hor));
+    CGAL_precondition(is_p_hor || is_q_hor || is_r_hor);
+    const unsigned int num_hor =
+      (is_p_hor ? 1 : 0) + (is_q_hor ? 1 : 0) + (is_r_hor ? 1 : 0);
+    CGAL_assertion((num_hor == 1) || (num_hor == 2));
+    const bool are_common_hor = num_hor == 2;
+    const bool is_odd_hor = ! are_common_hor;
+
+    const Site_2 & odd = (is_odd_hor) ?
+      (is_p_hor ? p : (is_q_hor ? q : r)) :
+      (is_p_hor ? (is_q_hor ? r : q) : p);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_horizontal(odd) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_vertical(odd) );
+    const Site_2 & prev = (is_odd_hor) ?
+      (is_p_hor ? r : (is_q_hor ? p : q)) :
+      (is_p_hor ? (is_q_hor ? q : p) : r);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_vertical(prev) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_horizontal(prev) );
+    const Site_2 & next = (is_odd_hor) ?
+      (is_p_hor ? q : (is_q_hor ? r : p)) :
+      (is_p_hor ? (is_q_hor ? p : r) : q);
+    CGAL_assertion( (! (num_hor == 1)) || is_site_vertical(next) );
+    CGAL_assertion( (! (num_hor == 2)) || is_site_horizontal(next) );
+
+    const RT prevc = hvseg_coord(prev, are_common_hor);
+    const RT nextc = hvseg_coord(next, are_common_hor);
+    const RT umid = prevc + nextc;
+    const RT udis = RT(2)*hvseg_coord(odd, is_odd_hor) +
+      RT(are_common_hor ? +1 : -1) * (prevc - nextc);
+    vv = is_odd_hor ? Point_2(umid, udis, RT(2)) :
+                      Point_2(udis, umid, RT(2)) ;
+  }
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  // Voronoi Linf radius computation
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  template<class Type>
+  inline
+  FT
+  linf_radius(const Point_2& vv,
+		 const Site_2& p, const Site_2& /*q*/, const Site_2& /*r*/,
+		 const Type&) const
+  {
+    CGAL_precondition( p.is_point() );
+
+    Point_2 pp = p.point();
+    FT dx = CGAL::abs(vv.x() - pp.x());
+    FT dy = CGAL::abs(vv.y() - pp.y());
+
+    return (CGAL::max)(dx, dy);
+  }
+
+  inline
+  FT
+  linf_radius_pps(const Point_2& vv,
+                  const Site_2& p, const Site_2& q,
+                  const bool is_dx_max,
+                  const FT & diffdvtx, const FT & diffdvty
+                 ) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_point() );
+
+    const Sign sgnmaxdiff = CGAL::sign( is_dx_max ? diffdvtx : diffdvty );
+
+    const Point_2 qq = q.point();
+    const FT diffdvqx = vv.x() - qq.x();
+    const FT diffdvqy = vv.y() - qq.y();
+    const FT absdvqx = CGAL::abs(diffdvqx);
+    const FT absdvqy = CGAL::abs(diffdvqy);
+    const bool q_dx_max = CGAL::compare(absdvqx, absdvqy) == LARGER;
+    if (is_dx_max == q_dx_max) {
+      if (CGAL::sign( q_dx_max ? diffdvqx : diffdvqy ) == sgnmaxdiff) {
+        return q_dx_max ? absdvqx : absdvqy;
+      }
+    }
+
+    const Point_2 pp = p.point();
+    const FT diffdvpx = vv.x() - pp.x();
+    const FT diffdvpy = vv.y() - pp.y();
+    const FT absdvpx = CGAL::abs(diffdvpx);
+    const FT absdvpy = CGAL::abs(diffdvpy);
+    return (CGAL::max)(absdvpx, absdvpy);
+  }
+
+  inline
+  FT
+  linf_radius(const Point_2& vv,
+		 const Site_2& p, const Site_2& q, const Site_2& r,
+		 const SSS_Type&) const
+  {
+    CGAL_assertion( p.is_segment() && q.is_segment() && r.is_segment() );
+    CGAL_USE(q);
+    CGAL_USE(r);
+
+    Line_2 l = compute_supporting_line(p.supporting_site());
+    Homogeneous_point_2 pref = compute_linf_projection_hom(l, vv);
+
+    FT dx = CGAL::abs(vv.x() - pref.x());
+    FT dy = CGAL::abs(vv.y() - pref.y());
+    return (CGAL::max)(dx, dy);
+  }
+
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  // Voronoi Linf fine radius computation
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+  inline
+  FT
+  linf_fine_radius(const Point_2& vv,
+                   const Site_2& p, const Site_2& q, const Site_2& r,
+                   const PPP_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_point() && r.is_point());
+
+    Point_2 pp = p.point();
+    FT minp = (CGAL::min)(CGAL::abs(vv.x() - pp.x()),
+                          CGAL::abs(vv.y() - pp.y()));
+
+    Point_2 qq = q.point();
+    FT minq = (CGAL::min)(CGAL::abs(vv.x() - qq.x()),
+                          CGAL::abs(vv.y() - qq.y()));
+
+    Point_2 rr = r.point();
+    FT minr = (CGAL::min)(CGAL::abs(vv.x() - rr.x()),
+                          CGAL::abs(vv.y() - rr.y()));
+
+    return (CGAL::max)(minp, (CGAL::max)(minq, minr));
+  }
+
+  inline
+  FT
+  linf_fine_radius(const Point_2& vv,
+                   const Site_2& p, const Site_2& q, const Site_2& r,
+                   const PPS_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_point() && r.is_segment());
+
+    Point_2 pp = p.point();
+    FT minp = (CGAL::min)(CGAL::abs(vv.x() - pp.x()),
+                        CGAL::abs(vv.y() - pp.y()));
+
+    Point_2 qq = q.point();
+    FT minq = (CGAL::min)(CGAL::abs(vv.x() - qq.x()),
+                        CGAL::abs(vv.y() - qq.y()));
+
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+    FT drx = CGAL::abs(vv.x() - rref.x());
+    FT dry = CGAL::abs(vv.y() - rref.y());
+    FT minr = (CGAL::min)(drx, dry);
+
+    return (CGAL::max)(minp, (CGAL::max)(minq, minr));
+  }
+
+  inline
+  FT
+  linf_fine_radius(const Point_2& vv,
+                   const Site_2& p, const Site_2& q, const Site_2& r,
+                   const PSS_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_segment() && r.is_segment());
+
+    Point_2 pp = p.point();
+    FT minp = (CGAL::min)(CGAL::abs(vv.x() - pp.x()),
+                        CGAL::abs(vv.y() - pp.y()));
+
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+    Homogeneous_point_2 qref = compute_linf_projection_hom(lq, vv);
+    FT dqx = CGAL::abs(vv.x() - qref.x());
+    FT dqy = CGAL::abs(vv.y() - qref.y());
+    FT minq = (CGAL::min)(dqx, dqy);
+
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+    FT drx = CGAL::abs(vv.x() - rref.x());
+    FT dry = CGAL::abs(vv.y() - rref.y());
+    FT minr = (CGAL::min)(drx, dry);
+
+    return (CGAL::max)(minp, (CGAL::max)(minq, minr));
+  }
+
+
+  inline
+  FT
+  linf_fine_radius(const Point_2& vv,
+                   const Site_2& p, const Site_2& q, const Site_2& r,
+                   const SSS_Type&) const
+  {
+    CGAL_assertion( p.is_segment() && q.is_segment() && r.is_segment() );
+
+    Line_2 lp = compute_supporting_line(p.supporting_site());
+    Homogeneous_point_2 pref = compute_linf_projection_hom(lp, vv);
+    FT dpx = CGAL::abs(vv.x() - pref.x());
+    FT dpy = CGAL::abs(vv.y() - pref.y());
+    FT minp = (CGAL::min)(dpx, dpy);
+
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+    Homogeneous_point_2 qref = compute_linf_projection_hom(lq, vv);
+    FT dqx = CGAL::abs(vv.x() - qref.x());
+    FT dqy = CGAL::abs(vv.y() - qref.y());
+    FT minq = (CGAL::min)(dqx, dqy);
+
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+    FT drx = CGAL::abs(vv.x() - rref.x());
+    FT dry = CGAL::abs(vv.y() - rref.y());
+    FT minr = (CGAL::min)(drx, dry);
+
+    return (CGAL::max)(minp, (CGAL::max)(minq, minr));
+  }
+
+  // L_inf refinement for non-axis parallel lines
+  template<class TypePSSorSSS> // for PSS and SSS return false
+  inline
+  Comparison_result
+  linf_refine_nonhv(const Point_2& ,
+              const Site_2& , const Site_2& , const Site_2& ,
+              const Line_2& , Homogeneous_point_2& ,
+              const TypePSSorSSS &
+             ) const
+  {
+    return EQUAL;
+  }
+
+  // L_inf refinement for non-axis parallel lines PPS case
+  inline
+  Comparison_result
+  linf_refine_nonhv(const Point_2& vv,
+              const Site_2& p, const Site_2& q, const Site_2& r,
+              const Line_2& l, Homogeneous_point_2& lref,
+              const PPS_Type &
+             ) const
+  {
+    CGAL_assertion(p.is_point());
+    CGAL_assertion(q.is_point());
+    CGAL_assertion(r.is_segment());
+    CGAL_USE(vv);
+    CGAL_USE(lref);
+    if (points_inside_touching_sides_v(l, p, r, q, this->point())) {
+      return LARGER;
+    }
+    return EQUAL;
+  }
+
+  // L_inf refinement for non-axis parallel lines PPP case
+  inline
+  Comparison_result
+  linf_refine_nonhv(const Point_2& vv,
+              const Site_2& p, const Site_2& q, const Site_2& r,
+              const Line_2& l, Homogeneous_point_2& lref,
+              const PPP_Type &
+             ) const
+  {
+    CGAL_assertion(p.is_point());
+    CGAL_assertion(q.is_point());
+    CGAL_assertion(r.is_point());
+    CGAL_USE(vv);
+    CGAL_USE(lref);
+    if (points_inside_touching_sides_v(l, p, q, r, this->point())) {
+      return LARGER;
+    }
+    if (points_inside_touching_sides_v(l, q, r, p, this->point())) {
+      return LARGER;
+    }
+    if (points_inside_touching_sides_v(l, r, p, q, this->point())) {
+      return LARGER;
+    }
+    return EQUAL;
+  }
+
+  // L_inf refinement
+  template<class Type>
+  inline
+  Comparison_result
+  linf_refine(const Point_2& vv,
+              const Site_2& p, const Site_2& q, const Site_2& r,
+              const Line_2& l, Homogeneous_point_2& lref,
+              const Type & type
+             ) const
+  {
+    const bool is_l_h_or_v = is_line_h_or_v(l);
+
+    if (! is_l_h_or_v) {
+      return linf_refine_nonhv(vv, p, q, r, l, lref, type);
+    }
+
+    FT difxvl = vv.x() - lref.x();
+    FT difyvl = vv.y() - lref.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    CGAL_SDG_DEBUG(std::cout << "debug linf_refine cmplabsxy = "
+      << cmplabsxy << std::endl;);
+
+    if ((cmplabsxy == EQUAL) && is_l_h_or_v) {
+      return POSITIVE;
+    }
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    Oriented_side oslvv (ON_ORIENTED_BOUNDARY);
+    if (p.is_segment() || q.is_segment() || r.is_segment()) {
+      oslvv = oriented_side_of_line(l, vv);
+      CGAL_assertion(oslvv != ON_ORIENTED_BOUNDARY);
+    }
+
+    if (p.is_point()) {
+      Point_2 pp = p.point();
+      FT difxvp = vv.x() - pp.x();
+      FT difyvp = vv.y() - pp.y();
+      FT absdifxvp = CGAL::abs(difxvp);
+      FT absdifyvp = CGAL::abs(difyvp);
+      Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+      CGAL_SDG_DEBUG(std::cout << "debug linf_refine cmplabsxy = "
+          << cmplabsxy << " cmppabsxy=" << cmppabsxy << std::endl;);
+      if (cmplabsxy != EQUAL) {
+        if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+        {
+          if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+            compare_p = CGAL::compare(absdifyvl, absdifyvp);
+          }
+        }
+        if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+        {
+          if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+            CGAL_assertion(compare_p == EQUAL);
+            compare_p = CGAL::compare(absdifxvl, absdifxvp);
+          }
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslpsrc =
+          oriented_side_of_line(l, p.source_site().point());
+        Oriented_side oslptrg =
+          oriented_side_of_line(l, p.target_site().point());
+        if (((oslpsrc != oslvv) && (oslptrg != oslvv)) &&
+            ((oslpsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslptrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_p = SMALLER;
+        }
+      }
+    }
+
+    if (q.is_point()) {
+      Point_2 qq = q.point();
+      FT difxvq = vv.x() - qq.x();
+      FT difyvq = vv.y() - qq.y();
+      FT absdifxvq = CGAL::abs(difxvq);
+      FT absdifyvq = CGAL::abs(difyvq);
+      Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+      CGAL_SDG_DEBUG(std::cout << "debug linf_refine cmplabsxy = "
+          << cmplabsxy << " cmpqabsxy=" << cmpqabsxy << std::endl;);
+      if (cmplabsxy != EQUAL) {
+        if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+        {
+          if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+            compare_q = CGAL::compare(absdifyvl, absdifyvq);
+          }
+        }
+        if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+        {
+          if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+            CGAL_assertion(compare_q == EQUAL);
+            compare_q = CGAL::compare(absdifxvl, absdifxvq);
+          }
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslqsrc =
+          oriented_side_of_line(l, q.source_site().point());
+        Oriented_side oslqtrg =
+          oriented_side_of_line(l, q.target_site().point());
+        if (((oslqsrc != oslvv) && (oslqtrg != oslvv)) &&
+            ((oslqsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslqtrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_q = SMALLER;
+        }
+      }
+    }
+
+    if (r.is_point()) {
+      Point_2 rr = r.point();
+      FT difxvr = vv.x() - rr.x();
+      FT difyvr = vv.y() - rr.y();
+      FT absdifxvr = CGAL::abs(difxvr);
+      FT absdifyvr = CGAL::abs(difyvr);
+      Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+      CGAL_SDG_DEBUG(std::cout << "debug linf_refine cmplabsxy = "
+          << cmplabsxy << " cmprabsxy=" << cmprabsxy << std::endl;);
+      if (cmplabsxy != EQUAL) {
+        if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+        {
+          if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+            compare_r = CGAL::compare(absdifyvl, absdifyvr);
+          }
+        }
+        if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+        {
+          if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+            CGAL_assertion(compare_r == EQUAL);
+            compare_r = CGAL::compare(absdifxvl, absdifxvr);
+          }
+        }
+      }
+    } else {
+      if (is_l_h_or_v) {
+        Oriented_side oslrsrc =
+          oriented_side_of_line(l, r.source_site().point());
+        Oriented_side oslrtrg =
+          oriented_side_of_line(l, r.target_site().point());
+        if (((oslrsrc != oslvv) && (oslrtrg != oslvv)) &&
+            ((oslrsrc != ON_ORIENTED_BOUNDARY) ||
+             (oslrtrg != ON_ORIENTED_BOUNDARY)   )         ) {
+          compare_r = SMALLER;
+        }
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug linf_refine compare p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    /*
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      // tocheck
+      return LARGER;
+    }
+    */
+    return EQUAL;
+
+  }
+
+  inline
+  Comparison_result
+  linf_refinement(const Point_2& vv,
+                  const Site_2& p, const Site_2& q, const Site_2& r,
+                  const Line_2& l, Homogeneous_point_2& lref,
+                  const PPP_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_point() && r.is_point());
+    CGAL_USE(l);
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    FT difxvl = vv.x() - lref.x();
+    FT difyvl = vv.y() - lref.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    Point_2 pp = p.point();
+    FT difxvp = vv.x() - pp.x();
+    FT difyvp = vv.y() - pp.y();
+    FT absdifxvp = CGAL::abs(difxvp);
+    FT absdifyvp = CGAL::abs(difyvp);
+    Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+    if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+        compare_p = CGAL::compare(absdifyvl, absdifyvp);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+        CGAL_assertion(compare_p == EQUAL);
+        compare_p = CGAL::compare(absdifxvl, absdifxvp);
+      }
+    }
+
+    Point_2 qq = q.point();
+    FT difxvq = vv.x() - qq.x();
+    FT difyvq = vv.y() - qq.y();
+    FT absdifxvq = CGAL::abs(difxvq);
+    FT absdifyvq = CGAL::abs(difyvq);
+    Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+    if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+        compare_q = CGAL::compare(absdifyvl, absdifyvq);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+        CGAL_assertion(compare_q == EQUAL);
+        compare_q = CGAL::compare(absdifxvl, absdifxvq);
+      }
+    }
+
+    Point_2 rr = r.point();
+    FT difxvr = vv.x() - rr.x();
+    FT difyvr = vv.y() - rr.y();
+    FT absdifxvr = CGAL::abs(difxvr);
+    FT absdifyvr = CGAL::abs(difyvr);
+    Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+    if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+        compare_r = CGAL::compare(absdifyvl, absdifyvr);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+        CGAL_assertion(compare_r == EQUAL);
+        compare_r = CGAL::compare(absdifxvl, absdifxvr);
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare PPP p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      // tocheck
+      return LARGER;
+    }
+    return EQUAL;
+  }
+
+
+  inline
+  Comparison_result
+  linf_refinement(const Point_2& vv,
+                  const Site_2& p, const Site_2& q, const Site_2& r,
+                  const Line_2& l, Homogeneous_point_2& lref,
+                  const PPS_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_point() && r.is_segment());
+    CGAL_USE(l);
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    FT difxvl = vv.x() - lref.x();
+    FT difyvl = vv.y() - lref.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    Point_2 pp = p.point();
+    FT difxvp = vv.x() - pp.x();
+    FT difyvp = vv.y() - pp.y();
+    FT absdifxvp = CGAL::abs(difxvp);
+    FT absdifyvp = CGAL::abs(difyvp);
+    Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+    if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+        compare_p = CGAL::compare(absdifyvl, absdifyvp);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+        CGAL_assertion(compare_p == EQUAL);
+        compare_p = CGAL::compare(absdifxvl, absdifxvp);
+      }
+    }
+
+    Point_2 qq = q.point();
+    FT difxvq = vv.x() - qq.x();
+    FT difyvq = vv.y() - qq.y();
+    FT absdifxvq = CGAL::abs(difxvq);
+    FT absdifyvq = CGAL::abs(difyvq);
+    Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+    if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+        compare_q = CGAL::compare(absdifyvl, absdifyvq);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+        CGAL_assertion(compare_q == EQUAL);
+        compare_q = CGAL::compare(absdifxvl, absdifxvq);
+      }
+    }
+
+    /* do nothing for line */
+    /*
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+
+    Point_2 rr (rref.x(), rref.y());
+    FT difxvr = vv.x() - rr.x();
+    FT difyvr = vv.y() - rr.y();
+    FT absdifxvr = CGAL::abs(difxvr);
+    FT absdifyvr = CGAL::abs(difyvr);
+    Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+    if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+        compare_r = CGAL::compare(absdifyvl, absdifyvr);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+        CGAL_assertion(compare_r == EQUAL);
+        compare_r = CGAL::compare(absdifxvl, absdifxvr);
+      }
+    }
+    */
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare PPS p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      // tocheck
+      return LARGER;
+    }
+    return EQUAL;
+  }
+
+
+  inline
+  Comparison_result
+  linf_refinement(const Point_2& vv,
+                  const Site_2& p, const Site_2& q, const Site_2& r,
+                  const Line_2& l, Homogeneous_point_2& lref,
+                  const PSS_Type&) const
+  {
+    CGAL_precondition(
+        p.is_point() && q.is_segment() && r.is_segment());
+    CGAL_USE(l);
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    FT difxvl = vv.x() - lref.x();
+    FT difyvl = vv.y() - lref.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    CGAL_SDG_DEBUG(std::cout << "debug vv=" << vv << std::endl;);
+
+    Point_2 pp = p.point();
+    FT difxvp = vv.x() - pp.x();
+    FT difyvp = vv.y() - pp.y();
+    FT absdifxvp = CGAL::abs(difxvp);
+    FT absdifyvp = CGAL::abs(difyvp);
+    Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+    if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+        compare_p = CGAL::compare(absdifyvl, absdifyvp);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+        CGAL_SDG_DEBUG(std::cout << "debug difyvl==difyvp" << std::endl;);
+        CGAL_assertion(compare_p == EQUAL);
+        compare_p = CGAL::compare(absdifxvl, absdifxvp);
+      }
+    }
+
+    /* do nothing for line */
+    /*
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+    Homogeneous_point_2 qref = compute_linf_projection_hom(lq, vv);
+
+    Point_2 qq (qref.x(), qref.y());
+    FT difxvq = vv.x() - qq.x();
+    FT difyvq = vv.y() - qq.y();
+    FT absdifxvq = CGAL::abs(difxvq);
+    FT absdifyvq = CGAL::abs(difyvq);
+    Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+    if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+        compare_q = CGAL::compare(absdifyvl, absdifyvq);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+        CGAL_assertion(compare_q == EQUAL);
+        compare_q = CGAL::compare(absdifxvl, absdifxvq);
+      }
+    }
+    */
+
+    /* do nothing for line */
+    /*
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+
+    Point_2 rr (rref.x(), rref.y());
+    FT difxvr = vv.x() - rr.x();
+    FT difyvr = vv.y() - rr.y();
+    FT absdifxvr = CGAL::abs(difxvr);
+    FT absdifyvr = CGAL::abs(difyvr);
+    Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+    if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+        compare_r = CGAL::compare(absdifyvl, absdifyvr);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+        CGAL_assertion(compare_r == EQUAL);
+        compare_r = CGAL::compare(absdifxvl, absdifxvr);
+      }
+    }
+    */
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare PSS p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    /*
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      return LARGER;
+    }
+    */
+    return EQUAL;
+  }
+
+  inline
+  Comparison_result
+  linf_refinement(const Point_2& vv,
+                  const Site_2& p, const Site_2& q, const Site_2& r,
+                  const Line_2& l, Homogeneous_point_2& lref,
+                  const SSS_Type&) const
+  {
+    CGAL_precondition(
+        p.is_segment() && q.is_segment() && r.is_segment());
+    CGAL_USE(vv);
+    CGAL_USE(l);
+    CGAL_USE(lref);
+
+    Comparison_result compare_p(EQUAL);
+    Comparison_result compare_q(EQUAL);
+    Comparison_result compare_r(EQUAL);
+
+    /*
+    FT difxvl = vv.x() - lref.x();
+    FT difyvl = vv.y() - lref.y();
+    FT absdifxvl = CGAL::abs(difxvl);
+    FT absdifyvl = CGAL::abs(difyvl);
+    Comparison_result cmplabsxy = CGAL::compare(absdifxvl, absdifyvl);
+    */
+
+    // philaris: (cmplabsxy == EQUAL) means that lref is
+    // one of the corners of the square with center vv
+
+    /* do nothing for line */
+    /*
+    Line_2 lp = compute_supporting_line(p.supporting_site());
+    Homogeneous_point_2 pref = compute_linf_projection_hom(lp, vv);
+
+    Point_2 pp (pref.x(), pref.y());
+    FT difxvp = vv.x() - pp.x();
+    FT difyvp = vv.y() - pp.y();
+    FT absdifxvp = CGAL::abs(difxvp);
+    FT absdifyvp = CGAL::abs(difyvp);
+    Comparison_result cmppabsxy = CGAL::compare(absdifxvp, absdifyvp);
+    if (! ( (cmplabsxy == SMALLER) && (cmppabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvp) == EQUAL) {
+        compare_p = CGAL::compare(absdifyvl, absdifyvp);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmppabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvp) == EQUAL) {
+        CGAL_assertion(compare_p == EQUAL);
+        compare_p = CGAL::compare(absdifxvl, absdifxvp);
+      }
+    }
+    */
+
+    /* do nothing for line */
+    /*
+    Line_2 lq = compute_supporting_line(q.supporting_site());
+    Homogeneous_point_2 qref = compute_linf_projection_hom(lq, vv);
+
+    Point_2 qq (qref.x(), qref.y());
+    FT difxvq = vv.x() - qq.x();
+    FT difyvq = vv.y() - qq.y();
+    FT absdifxvq = CGAL::abs(difxvq);
+    FT absdifyvq = CGAL::abs(difyvq);
+    Comparison_result cmpqabsxy = CGAL::compare(absdifxvq, absdifyvq);
+    if (! ( (cmplabsxy == SMALLER) && (cmpqabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvq) == EQUAL) {
+        compare_q = CGAL::compare(absdifyvl, absdifyvq);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmpqabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvq) == EQUAL) {
+        CGAL_assertion(compare_q == EQUAL);
+        compare_q = CGAL::compare(absdifxvl, absdifxvq);
+      }
+    }
+    */
+
+    /* do nothing for line */
+    /*
+    Line_2 lr = compute_supporting_line(r.supporting_site());
+    Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+
+    Point_2 rr (rref.x(), rref.y());
+    FT difxvr = vv.x() - rr.x();
+    FT difyvr = vv.y() - rr.y();
+    FT absdifxvr = CGAL::abs(difxvr);
+    FT absdifyvr = CGAL::abs(difyvr);
+    Comparison_result cmprabsxy = CGAL::compare(absdifxvr, absdifyvr);
+    if (! ( (cmplabsxy == SMALLER) && (cmprabsxy == SMALLER) ))
+    {
+      if (CGAL::compare(difxvl, difxvr) == EQUAL) {
+        compare_r = CGAL::compare(absdifyvl, absdifyvr);
+      }
+    }
+    if (! ( (cmplabsxy == LARGER ) && (cmprabsxy == LARGER ) ))
+    {
+      if (CGAL::compare(difyvl, difyvr) == EQUAL) {
+        CGAL_assertion(compare_r == EQUAL);
+        compare_r = CGAL::compare(absdifxvl, absdifxvr);
+      }
+    }
+    */
+
+    CGAL_SDG_DEBUG(std::cout << "debug compare SSS p q r = "
+      << compare_p << " " << compare_q << " " << compare_r << std::endl;);
+
+    if ((compare_p == SMALLER) ||
+        (compare_q == SMALLER) ||
+        (compare_r == SMALLER)   ) {
+      return SMALLER;
+    }
+    if ((compare_p == LARGER) ||
+        (compare_q == LARGER) ||
+        (compare_r == LARGER)   ) {
+      return LARGER;
+    }
+    return EQUAL;
+  }
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  // the incircle test --- start
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+
+  // given the Voronoi vertex vv or p, q and r, returns the result of
+  // the incircle test when the query object t is a point
+  template<class Type>
+  Sign incircle_p(const Point_2& vv,
+		  const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const Type& type) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug vsqr incircle_p entering pqr = ("
+        << p << ", " << q << ", " << r << "), " << "t=" << t
+        << " with known vv=" << vv << std::endl;);
+
+    CGAL_assertion(r.is_segment()); // the PPP case is handled elsewhere
+
+    // p segment implies q segment
+    CGAL_assertion(p.is_point() || q.is_segment());
+
+    const Point_2 tt = t.point();
+    const FT diffdvtx = vv.x() - tt.x();
+    const FT diffdvty = vv.y() - tt.y();
+
+    CGAL_SDG_DEBUG(std::cout << "debug diffdvtx=" << diffdvtx
+      << " diffdvty=" << diffdvty << std::endl;);
+
+    const FT absdvtx = CGAL::abs(diffdvtx);
+    const FT absdvty = CGAL::abs(diffdvty);
+    const FT d = (CGAL::max)(absdvtx, absdvty);
+    const FT radius = linf_radius(vv, p, q, r, type);
+
+    Comparison_result crude = CGAL::compare(d, radius);
+
+    CGAL_SDG_DEBUG(std::cout << "debug d=" << d
+      << " radius=" << radius
+      << " comparison=" << crude << std::endl;);
+
+    if (crude != ZERO) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout << "debug vsqr refining in incircle_p pqr=("
+        << p << ", " << q << ", " << r << "), "
+        << "t=" << t
+        << std::endl;);
+      // here crude == ZERO, so
+      // we might have to refine
+
+      Sign retval (ZERO);
+
+      bool is_p_hor (false);
+      bool is_p_ver (false);
+      bool is_q_hor (false);
+      bool is_q_ver (false);
+      bool is_r_hor (false);
+      bool is_r_ver (false);
+      bool is_t_endp_of_q (false);
+      bool is_t_endp_of_r (false);
+      bool is_p_endp_of_q (false);
+      bool is_p_endp_of_r (false);
+      bool is_q_endp_of_r (false);
+      bool is_t_endp_of_p (false);
+
+      if (p.is_segment()) {
+        is_p_hor = is_site_horizontal(p);
+        is_p_ver = is_site_vertical(p);
+        is_t_endp_of_p = is_endpoint_of(t,p);
+      }
+      if (q.is_segment()) {
+        is_q_hor = is_site_horizontal(q);
+        is_q_ver = is_site_vertical(q);
+        is_t_endp_of_q = is_endpoint_of(t,q);
+        if (p.is_point()) {
+          is_p_endp_of_q = is_endpoint_of(p,q);
+        }
+      }
+
+      // r is segment anyway
+      is_r_hor = is_site_horizontal(r);
+      is_r_ver = is_site_vertical(r);
+      is_t_endp_of_r = is_endpoint_of(t,r);
+      if (p.is_point()) {
+        is_p_endp_of_r = is_endpoint_of(p,r);
+      }
+      if (q.is_point()) {
+        is_q_endp_of_r = is_endpoint_of(q,r);
+      }
+
+      // check if t is endpoint of a hor/ver segment;
+      // this code is only reached in validity tests
+      if (is_t_endp_of_p && (is_p_hor || is_p_ver)) {
+        retval = (CGAL::sign(is_p_hor ? diffdvtx : diffdvty) != ZERO ) ?
+          POSITIVE : ZERO;
+        CGAL_SDG_DEBUG(std::cout << "debug vsqr t on p hor/ver retval="
+            << retval << std::endl;);
+        return retval;
+      }
+      if (is_t_endp_of_q && (is_q_hor || is_q_ver)) {
+        retval = (CGAL::sign(is_q_hor ? diffdvtx : diffdvty) != ZERO ) ?
+          POSITIVE : ZERO;
+        CGAL_SDG_DEBUG(std::cout << "debug vsqr t on q hor/ver retval="
+            << retval << std::endl;);
+        return retval;
+      }
+      if (is_t_endp_of_r && (is_r_hor || is_r_ver)) {
+        retval = (CGAL::sign(is_r_hor ? diffdvtx : diffdvty) != ZERO ) ?
+          POSITIVE : ZERO;
+        CGAL_SDG_DEBUG(std::cout << "debug vsqr t on r hor/ver retval="
+            << retval << std::endl;);
+        return retval;
+      }
+
+      FT d_fine = (CGAL::min)(absdvtx, absdvty);
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug d=" << d << " d_fine=" << d_fine << std::endl;);
+
+      Point_2 pref, qref, rref;
+
+      FT diffdvpx;
+      FT diffdvpy;
+      FT diffdvqx;
+      FT diffdvqy;
+      FT diffdvrx;
+      FT diffdvry;
+
+
+      const bool is_p_hv = is_p_hor || is_p_ver;
+      const bool is_q_hv = is_q_hor || is_q_ver;
+      const bool is_r_hv = is_r_hor || is_r_ver;
+
+      if (p.is_segment() && q.is_segment()) {
+        const bool is_psrc_q = is_endpoint_of(p.source_site(), q);
+        const bool is_ptrg_q = is_endpoint_of(p.target_site(), q);
+        if (is_psrc_q || is_ptrg_q) {
+          if ((is_p_hv && (! is_q_hv)) ||
+              (is_q_hv && (! is_p_hv))   ) {
+            CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                << "p, q candidates" << std::endl; );
+            if (is_p_hor || is_q_hor) {
+              if (scmpx(is_psrc_q? p.source_site(): p.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                pref = (is_psrc_q?
+                          p.source_site(): p.target_site()).point();
+                diffdvpy = vv.y() - pref.y();
+                Comparison_result test =
+                  CGAL::compare(absdvty, CGAL::abs(diffdvpy));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+
+              }
+            } else { // one of p, q is vertical
+              if (scmpy(is_psrc_q? p.source_site(): p.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                pref = (is_psrc_q?
+                          p.source_site(): p.target_site()).point();
+                diffdvpx = vv.x() - pref.x();
+                CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                    << "diffdvpx=" << diffdvpx
+                    << " absdvtx=" << absdvtx << std::endl; );
+                Comparison_result test =
+                  CGAL::compare(absdvtx, CGAL::abs(diffdvpx));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+
+              }
+            }
+          }
+        }
+      }
+
+      if (q.is_segment()) {
+        const bool is_qsrc_r = is_endpoint_of(q.source_site(), r);
+        const bool is_qtrg_r = is_endpoint_of(q.target_site(), r);
+        if (is_qsrc_r || is_qtrg_r) {
+          if ((is_site_h_or_v(q) && (! is_site_h_or_v(r))) ||
+              (is_site_h_or_v(r) && (! is_site_h_or_v(q)))   ) {
+            CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                << "q, r candidates" << std::endl; );
+            if (is_q_hor || is_r_hor) {
+              if (scmpx(is_qsrc_r? q.source_site(): q.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                qref = (is_qsrc_r?
+                          q.source_site(): q.target_site()).point();
+                diffdvqy = vv.y() - qref.y();
+                Comparison_result test =
+                  CGAL::compare(absdvty, CGAL::abs(diffdvqy));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            } else { // one of q, r is vertical
+              if (scmpy(is_qsrc_r? q.source_site(): q.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                    << "vertical case" << std::endl; );
+                qref = (is_qsrc_r?
+                          q.source_site(): q.target_site()).point();
+                diffdvqx = vv.x() - qref.x();
+                CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                    << "diffdvqx=" << diffdvqx
+                    << " absdvtx=" << absdvtx << std::endl; );
+                Comparison_result test =
+                  CGAL::compare(absdvtx, CGAL::abs(diffdvqx));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            }
+          }
+        }
+      }
+
+      if (p.is_segment()) {
+        const bool is_rsrc_p = is_endpoint_of(r.source_site(), p);
+        const bool is_rtrg_p = is_endpoint_of(r.target_site(), p);
+        if (is_rsrc_p || is_rtrg_p) {
+          if ((is_site_h_or_v(r) && (! is_site_h_or_v(p))) ||
+              (is_site_h_or_v(p) && (! is_site_h_or_v(r)))   ) {
+            CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                << "r, p candidates" << std::endl; );
+            if (is_r_hor || is_p_hor) {
+              if (scmpx(is_rsrc_p? r.source_site(): r.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                rref = (is_rsrc_p?
+                          r.source_site(): r.target_site()).point();
+                diffdvry = vv.y() - rref.y();
+                Comparison_result test =
+                  CGAL::compare(absdvty, CGAL::abs(diffdvry));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            } else { // one of r, p is vertical
+              if (scmpy(is_rsrc_p? r.source_site(): r.target_site(), t)
+                  == EQUAL)
+              {
+                // return NEGATIVE or ZERO
+                CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                    << "vertical case" << std::endl; );
+                rref = (is_rsrc_p?
+                          r.source_site(): r.target_site()).point();
+                diffdvrx = vv.x() - rref.x();
+                CGAL_SDG_DEBUG(std::cout << "debug vsqr "
+                    << "diffdvrx=" << diffdvrx
+                    << " absdvtx=" << absdvtx << std::endl; );
+                Comparison_result test =
+                  CGAL::compare(absdvtx, CGAL::abs(diffdvrx));
+                return (test == SMALLER) ? NEGATIVE : ZERO;
+              }
+            }
+          }
+        }
+      }
+
+      // check if p, t are endpoints of different segments
+      // among q, r
+      bool pt_endps_of_diff_qr =
+        (is_t_endp_of_q && is_p_endp_of_r) ||
+        (is_t_endp_of_r && is_p_endp_of_q)   ;
+
+      CGAL_SDG_DEBUG( std::cout << "debug pt_endps_of_diff_qr = "
+          << pt_endps_of_diff_qr << std::endl;);
+
+      if (p.is_point()) {
+        pref = p.point();
+        diffdvpx = vv.x() - pref.x();
+        diffdvpy = vv.y() - pref.y();
+        if (v_type == PSS) {
+          Comparison_result test (EQUAL);
+          // check if p and t lie on the same side of the Linf-square
+          if (  (CGAL::compare(diffdvpx, diffdvtx) == EQUAL) ) {
+            CGAL_SDG_DEBUG(std::cout << "debug on same vertical side "
+                << " p=" << p << " t=" << t << std::endl;);
+            FT absdvpy = CGAL::abs(diffdvpy);
+            CGAL_SDG_DEBUG(std::cout << "debug vsqr absdvty=" << absdvty
+                << " absdvpy=" << absdvpy << std::endl;);
+            CGAL_SDG_DEBUG(std::cout << "debug vsqr abs diff ty py ="
+                << absdvty - absdvpy << std::endl;);
+            if (pt_endps_of_diff_qr) {
+              test = EQUAL;
+            } else {
+              test = CGAL::compare(absdvty, absdvpy);
+            }
+          } else if (CGAL::compare(diffdvpy, diffdvty) == EQUAL) {
+            CGAL_SDG_DEBUG(std::cout << "debug on same horizontal side "
+                << " p=" << p << " t=" << t << std::endl;);
+            FT absdvpx = CGAL::abs(diffdvpx);
+            if (pt_endps_of_diff_qr) {
+              test = EQUAL;
+            } else {
+              test = CGAL::compare(absdvtx, absdvpx);
+            }
+          }
+          CGAL_SDG_DEBUG(std::cout << "debug test=" << test << std::endl;);
+
+          if (test == SMALLER) {
+            return NEGATIVE;
+          } else if (test == LARGER) {
+            return POSITIVE;
+          }
+
+          if ((v_type == PSS) && (! is_q_hv) && (! is_r_hv)) {
+            if (test == EQUAL) {
+              if (points_inside_touching_sides_v(q, p, r, t, vv)) {
+                return NEGATIVE;
+              }
+              if (points_inside_touching_sides_v(r, p, q, t, vv)) {
+                return NEGATIVE;
+              }
+              CGAL_SDG_DEBUG(std::cout
+                  << "debug equivalent points and two non-hv segments,"
+                  << " thus return zero" << std::endl;);
+              return ZERO;
+            }
+          }
+
+        }
+      } else {
+        // tocheck and tofix
+        CGAL_assertion(
+            p.is_segment() && q.is_segment());
+        return ZERO;
+      }
+
+      CGAL_assertion(p.is_point());
+
+      CGAL_SDG_DEBUG(std::cout << "debug diffdvpx=" << diffdvpx
+        << " diffdvpy=" << diffdvpy << std::endl;);
+
+      if (CGAL::compare(diffdvpx, diffdvtx) == EQUAL) {
+        CGAL_SDG_DEBUG(std::cout << "debug diffdvpx="
+            << "diffdvtx=" << diffdvpx << std::endl;);
+        if (CGAL::compare(CGAL::abs(diffdvpx), d) == EQUAL) {
+          if (pt_endps_of_diff_qr) {
+            retval = ZERO;
+          } else {
+            retval = CGAL::compare(d_fine, CGAL::abs(diffdvpy));
+            CGAL_SDG_DEBUG(std::cout << "debug d_fine=" << d_fine
+              << " absdiffdvpy=" << CGAL::abs(diffdvpy)
+              << " comparison=" << retval << std::endl;);
+          }
+        }
+      }
+      if (CGAL::compare(diffdvpy, diffdvty) == EQUAL) {
+        if (CGAL::compare(CGAL::abs(diffdvpy), d) == EQUAL) {
+          if (pt_endps_of_diff_qr) {
+            retval = ZERO;
+          } else {
+            retval = CGAL::compare(d_fine, CGAL::abs(diffdvpx));
+            CGAL_SDG_DEBUG(std::cout << "debug d_fine=" << d_fine
+              << " absdiffdvpx=" << CGAL::abs(diffdvpx)
+              << " comparison=" << retval << std::endl;);
+          }
+        }
+      }
+      if (retval == SMALLER) {
+        return NEGATIVE;
+      }
+      if (retval == LARGER) {
+        return POSITIVE;
+      }
+
+      if (q.is_point()) {
+        qref = q.point();
+        diffdvqx = vv.x() - qref.x();
+        diffdvqy = vv.y() - qref.y();
+      } else {
+        // tocheck and tofix
+        // here q and r are segments and p is point
+        CGAL_assertion(p.is_point());
+        if ((is_q_hv && ! is_r_hv) ||
+            (is_r_hv && ! is_q_hv)   ) {
+          Line_2 lnap;
+          Homogeneous_point_2 sref;
+          bool samex;
+          if (is_q_hv && ! is_r_hv) {
+            CGAL_SDG_DEBUG(std::cout << "debug q:ap r:non-ap"
+                << std::endl;);
+            if (is_p_endp_of_q) {
+              samex = is_q_ver ? true : false;
+              lnap = compute_supporting_line(r.supporting_site());
+            } else {
+              return ZERO;
+            }
+          } else
+          { // here, we have: (is_r_hv && ! is_q_hv)
+            CGAL_SDG_DEBUG(std::cout << "debug q:non-ap r:ap"
+                << std::endl;);
+            if (is_p_endp_of_r) {
+              samex = is_r_ver ? true : false;
+              lnap = compute_supporting_line(q.supporting_site());
+            } else {
+              return ZERO;
+            }
+          }
+          sref = compute_linf_projection_hom(lnap, vv);
+          CGAL_SDG_DEBUG(std::cout << "debug sref ="
+               << sref.x() << ' ' << sref.y() << std::endl;);
+          if (samex) {
+            CGAL_SDG_DEBUG(std::cout << "debug samex case" << std::endl;);
+            FT diffdvsy = vv.y() - sref.y();
+            if (CGAL::sign(diffdvsy) == CGAL::sign(diffdvty)) {
+              if (CGAL::compare(CGAL::abs(diffdvtx),
+                                CGAL::abs(diffdvty)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of samex case
+          else { // samey case
+            CGAL_SDG_DEBUG(std::cout << "debug samey case" << std::endl;);
+            FT diffdvsx = vv.x() - sref.x();
+            if (CGAL::sign(diffdvsx) == CGAL::sign(diffdvtx)) {
+              if (CGAL::compare(CGAL::abs(diffdvty),
+                                CGAL::abs(diffdvtx)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of samey case
+        }
+        Line_2 lq = compute_supporting_line(q.supporting_site());
+        //qref = compute_linf_projection_nonhom(lq, vv);
+        Homogeneous_point_2 hqref = compute_linf_projection_hom(lq, vv);
+        diffdvqx = vv.x() - hqref.x();
+        diffdvqy = vv.y() - hqref.y();
+      }
+
+      if (q.is_point()) {
+        CGAL_SDG_DEBUG(std::cout << "debug diffdvqx=" << diffdvqx
+            << " diffdvqy=" << diffdvqy << std::endl;);
+
+        if (CGAL::compare(diffdvqx, diffdvtx) == EQUAL) {
+          CGAL_SDG_DEBUG(std::cout << "debug diffdvqx="
+              << " diffdvtx=" << diffdvtx
+              << std::endl;);
+          if (CGAL::compare(CGAL::abs(diffdvqx), d) == EQUAL) {
+            retval = CGAL::compare(d_fine, CGAL::abs(diffdvqy));
+            CGAL_SDG_DEBUG(std::cout << "debug d_fine=" << d_fine
+                << " absdiffdvqy=" << CGAL::abs(diffdvqy)
+                << " comparison=" << retval << std::endl;);
+          }
+        }
+        if (CGAL::compare(diffdvqy, diffdvty) == EQUAL) {
+          if (CGAL::compare(CGAL::abs(diffdvqy), d) == EQUAL) {
+            retval = CGAL::compare(d_fine, CGAL::abs(diffdvqx));
+            CGAL_SDG_DEBUG(std::cout << "debug d_fine=" << d_fine
+                << " absdiffdvqx=" << CGAL::abs(diffdvqx)
+                << " comparison=" << retval << std::endl;);
+          }
+        }
+        if (retval == SMALLER) {
+          return NEGATIVE;
+        }
+
+        if (retval == LARGER) {
+          return POSITIVE;
+        }
+      }
+
+      if (q.is_segment() && (! is_q_hv)) {
+        if (CGAL::compare(d_fine, d) == SMALLER) {
+          CGAL_assertion(p.is_point());
+          if (points_inside_touching_sides_v(q, p, r, t, vv)) {
+            return NEGATIVE;
+          }
+          if (! is_r_hv) {
+            if (points_inside_touching_sides_v(r, p, q, t, vv)) {
+              return NEGATIVE;
+            }
+          }
+        }
+      }
+
+      // check for p, q with same coordinate and r non-hv segment
+      if ((! (is_r_hor || is_r_ver)) &&
+          (! (is_p_endp_of_r || is_q_endp_of_r))
+         ) {
+        CGAL_SDG_DEBUG(std::cout << "debug r is non-axis parallel"
+            << " and neither p nor q endpoints" << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug d=" << d <<
+            " d_fine=" << d_fine << std::endl;);
+        bool pqsamex = CGAL::compare(diffdvpx, diffdvqx) == EQUAL;
+        bool pqsamey (false);
+        if (pqsamex) {
+          CGAL_SDG_DEBUG(std::cout << "debug p, q have same x, "
+              << "might be on same Linf vertical side"
+              << std::endl;);
+        } else {
+          pqsamey = CGAL::compare(diffdvpy, diffdvqy) == EQUAL;
+          if (pqsamey) {
+            CGAL_SDG_DEBUG(std::cout << "debug p, q have same y, "
+                << "might be on same Linf horizontal side" << std::endl;);
+          }
+        }
+        if (pqsamex || pqsamey) {
+          Line_2 lr = compute_supporting_line(r.supporting_site());
+          Homogeneous_point_2 rref = compute_linf_projection_hom(lr, vv);
+          if ( pqsamex && (CGAL::compare(pref.x(), rref.x()) == EQUAL) ) {
+            FT diffdvry = vv.y() - rref.y();
+            if (CGAL::sign(diffdvry) == CGAL::sign(diffdvty)) {
+              if (CGAL::compare(CGAL::abs(diffdvtx),
+                                CGAL::abs(diffdvty)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of pqsamex and rref same x case
+          if ( pqsamey && (CGAL::compare(pref.y(), rref.y()) == EQUAL) ) {
+            FT diffdvrx = vv.x() - rref.x();
+            if (CGAL::sign(diffdvrx) == CGAL::sign(diffdvtx)) {
+              if (CGAL::compare(CGAL::abs(diffdvty),
+                                CGAL::abs(diffdvtx)) == SMALLER) {
+                return NEGATIVE;
+              }
+            }
+          } // end of pqsamey and rref same y case
+        } // end of case: pqsamex or pqsamey
+      } // end of non-hv segment r case with p, q non-endpoints of r
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug in refinement return final zero" << std::endl;);
+
+      return ZERO;
+
+      //FT radius_fine = linf_fine_radius(vv, p, q, r, type);
+
+      //return CGAL::compare(d_fine, radius_fine);
+
+    } // end of case of crude == ZERO
+  }
+
+
+
+
+  //--------------------------------------------------------------------------
+  // the first three objects are points and the query object is also a point
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PPP_Type&) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_point() );
+    CGAL_precondition( r.is_point() );
+    CGAL_precondition( t.is_point() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_p entering" << std::endl;);
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_p (p q r t)= "
+      << p << ' ' << q << ' ' << r << ' ' << t
+      << std::endl;);
+
+    Bounded_side bs =
+      side_of_bounded_square(p.point(), q.point(), r.point(), t.point());
+
+    switch(bs) {
+      case ON_UNBOUNDED_SIDE:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns POSITIVE" << std::endl;);
+        return POSITIVE;
+      case ON_BOUNDED_SIDE:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns NEGATIVE" << std::endl;);
+        return NEGATIVE;
+      default:
+        CGAL_SDG_DEBUG(std::cout
+            << "debug incircle_p returns ZERO" << std::endl;);
+        return ZERO;
+    }
+  }
+
+  //--------------------------------------------------------------------------
+  // the first three objects are two points and a segment and the query
+  // object is a point
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PPS_Type& type) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_point() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_point() );
+
+    // easy degeneracies --- start
+
+    // if t is one of p or q then we know the result which is ZERO
+    if (  same_points(p, t) || same_points(q, t)  ) {
+      return ZERO;
+    }
+
+    const bool endp_t_of_r = is_endpoint_of(t, r);
+    if (endp_t_of_r) {
+      if (! is_site_h_or_v(r)) {
+        // For a non-axis-parallel segment, the possible return values
+        // are either ZERO or POSITIVE. In the non-axis-parallel case,
+        // the point t can be at the corner of the Linf-square and thus the
+        // possibility of ZERO cannot be excluded. However, this code seems
+        // to be reached only in validations and POSITIVE seems to be
+        // acceptable.
+        return POSITIVE;
+      } else {
+        // here r is axis-parallel:
+        // if p or q are endpoints of r, return POSITIVE
+        if (is_endpoint_of(p, r) || is_endpoint_of(q, r)) {
+          return POSITIVE;
+        }
+      }
+    } else {
+      if (is_on_hv_seg_line(t, r)) { return POSITIVE; }
+    }
+
+    // easy degeneracies --- end
+
+    compute_vv(p, q, r, type);
+    return incircle_p(vv, p, q, r, t, type);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // the first three objects are a point and two segments and the query
+  // object is a point
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PSS_Type& type) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_segment() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_point() );
+
+    // easy degeneracies --- start
+
+    // if p is a common point for q and r, then the Voronoi vertex of
+    // p, q, and r is p. Since t cannot be the same as p, the result
+    // is POSITIVE
+    if ( is_endpoint_of(p, q) && is_endpoint_of(p, r) ) {
+      return POSITIVE;
+    }
+
+    // if p and t are the same point, then return ZERO
+    if ( same_points(p, t) ) { return ZERO; }
+
+    // if t is an endpoint of either q or r, then t has to be outside
+    // the Voronoi circle and thus the result is POSITIVE
+    // philaris: this is only reached in validity checks
+    if ( is_endpoint_of(t, q) || is_endpoint_of(t, r) ) {
+      return POSITIVE;
+    }
+
+
+    // philaris: addition for Linf
+
+    if (is_endpoint_of(p, q)) {
+      if (is_site_horizontal(q)) {
+        if (scmpy(p,t) == EQUAL) {
+          Site_2 other =
+            same_points(p, q.source_site()) ?
+            q.target_site() : q.source_site();
+          if (scmpx(other, p) == scmpx(p, t)) {
+            return POSITIVE;
+          }
+        }
+      }
+      if (is_site_vertical(q)) {
+        if (scmpx(p,t) == EQUAL) {
+          Site_2 other =
+            same_points(p, q.source_site()) ?
+            q.target_site() : q.source_site();
+          if (scmpy(other, p) == scmpy(p, t)) {
+            return POSITIVE;
+          }
+        }
+      }
+    }
+
+    if (is_endpoint_of(p, r)) {
+      if (is_site_horizontal(r)) {
+        if (scmpy(p,t) == EQUAL) {
+          Site_2 other =
+            same_points(p, r.source_site()) ?
+            r.target_site() : r.source_site();
+          if (scmpx(other, p) == scmpx(p, t)) {
+            return POSITIVE;
+          }
+        }
+      }
+      if (is_site_vertical(r)) {
+        if (scmpx(p,t) == EQUAL) {
+          Site_2 other =
+            same_points(p, r.source_site()) ?
+            r.target_site() : r.source_site();
+          if (scmpy(other, p) == scmpy(p, t)) {
+            return POSITIVE;
+          }
+        }
+      }
+    }
+
+    // easy degeneracies --- end
+
+    compute_vv(p, q, r, type);
+    return incircle_p(vv, p, q, r, t, type);
+  }
+
+  //--------------------------------------------------------------------------
+  // the first three objects are segments and the query object is a point
+  //--------------------------------------------------------------------------
+
+  Sign incircle_p(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const SSS_Type& type) const
+  {
+    CGAL_precondition( p.is_segment() );
+    CGAL_precondition( q.is_segment() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_point() );
+
+    // easy degeneracies --- start
+
+    // if t is an endpoint of p, q or r, then t has to lie outside the
+    // Voronoi circle of p, q and r and thus the result is positive
+    if ( is_endpoint_of(t, p) || is_endpoint_of(t, q) ||
+         is_endpoint_of(t, r) ) {
+      return POSITIVE;
+    }
+
+    // easy degeneracies --- end
+
+    compute_vv(p, q, r, type);
+    return incircle_p(vv, p, q, r, t, type);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // the incircle test when the query object is a line
+  //--------------------------------------------------------------------------
+
+  template<class Type>
+  inline
+  Sign
+  incircle_xxxl(const Point_2& vv,
+		const Site_2& p, const Site_2& q, const Site_2& r,
+		const Line_2& l, const Type& type) const
+  {
+    FT radius = linf_radius(vv, p, q, r, type);
+
+    // compute Linf distance of vv from l
+    Homogeneous_point_2 lref = compute_linf_projection_hom(l, vv);
+    FT absdvlx = CGAL::abs(vv.x() - lref.x());
+    FT absdvly = CGAL::abs(vv.y() - lref.y());
+    FT d = (CGAL::max)(absdvlx, absdvly);
+
+    Comparison_result crude = CGAL::compare(d, radius);
+
+    if (crude != ZERO) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout << "debug vsqr refining in xxxl pqr=("
+        << p << ", " << q << ", " << r << "), "
+        << "lref=" << lref.x() << ' ' << lref.y()
+        << ", l: " << l.a() << ' ' << l.b() << ' ' <<  l.c()
+        << std::endl;);
+      // here crude == ZERO, so
+      // we might have to refine
+
+      Comparison_result other =
+        linf_refine(vv, p, q, r, l, lref, type);
+
+      if (crude != other) {
+        CGAL_SDG_DEBUG(std::cout << "xxxl instead of 0 returning " << other <<
+          std::endl;);
+      }
+
+      return other;
+
+    }
+  }
+
+
+  // philaris: I might have to change that,
+  // it seems in L2 that an L2-perpendicular to l is computed
+  // that goes through vv
+  inline
+  Oriented_side
+  oriented_side_l2(const Point_2& vv, const Line_2& l, const Point_2& p) const
+  {
+    Line_2 l1(l.b(), -l.a(), l.a() * vv.y() - l.b() * vv.x());
+
+    return oriented_side_of_line(l1, p);
+  }
+
+  // philaris: the linf version of the oriented_side predicate
+  inline
+  Oriented_side
+  oriented_side_linf(const Point_2& vv, const Line_2& l, const Point_2& p) const
+  {
+    CGAL_SDG_DEBUG(std::cout << "debug oriented_side_linf " << std::endl;);
+
+    Line_2 l1 = compute_linf_perpendicular(l, vv);
+
+    return oriented_side_of_line(l1, p);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // generic incircle test when the query object is a segment
+  //--------------------------------------------------------------------------
+
+  // first check is at least one of the endpoints of s is in conflict
+  // with the Voronoi circle; in this case return NEGATIVE
+  // otherwise test against the supporting line l of t; if l does not
+  // conflict with the Voronoi circle return POSITIVE, otherwise check
+  // if the endpoints of t are on the same oriented side of the line
+  // perpendicular to l, passing through the Voronoi vertex of p, q,
+  // and r, and respond accordingly: if they are on the same side
+  // there is no conflict, otherwise there is a conflict.
+  template<class Type>
+  Sign incircle_xxxs(const Site_2& p, const Site_2& q, const Site_2& r,
+		     const Site_2& t, const Type& type) const
+  {
+    CGAL_precondition( t.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug fn incircle_xxxs pqrt= ("
+        << p << ") ("
+        << q << ") (" << r << ") (" << t << ")" << std::endl;);
+
+    bool is_p_point = p.is_point();
+    bool is_q_point = q.is_point();
+    bool is_r_point = r.is_point();
+
+    unsigned int numpts_in_pqr =
+      ((is_p_point)? 1 : 0) +
+      ((is_q_point)? 1 : 0) +
+      ((is_r_point)? 1 : 0)  ;
+
+    bool is_p_tsrc(false);
+    if ( is_p_point && same_points(p, t.source_site()) ) {
+      is_p_tsrc = true;
+    }
+    bool is_q_tsrc(false);
+    if ( is_q_point && same_points(q, t.source_site()) ) {
+      is_q_tsrc = true;
+    }
+    bool is_r_tsrc(false);
+    if ( is_r_point && same_points(r, t.source_site()) ) {
+      is_r_tsrc = true;
+    }
+
+    unsigned int numendpts_of_t = 0;
+
+    Sign d1, d2;
+    if ( is_p_tsrc || is_q_tsrc || is_r_tsrc ) {
+      d1 = ZERO;
+      ++numendpts_of_t;
+    } else {
+      d1 = incircle_p(p, q, r, t.source_site(), type);
+    }
+
+    if (  certainly(d1 == NEGATIVE)  ) { return NEGATIVE; }
+    if (  !is_certain(d1 == NEGATIVE)  ) { return indeterminate<Sign>(); }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_xxxs d1=" << d1 << std::endl;);
+
+    bool is_p_ttrg(false);
+    if ( is_p_point && same_points(p, t.target_site()) ) {
+      is_p_ttrg = true;
+    }
+    bool is_q_ttrg(false);
+    if ( is_q_point && same_points(q, t.target_site()) ) {
+      is_q_ttrg = true;
+    }
+    bool is_r_ttrg(false);
+    if ( is_r_point && same_points(r, t.target_site()) ) {
+      is_r_ttrg = true;
+    }
+
+    if ( is_p_ttrg || is_q_ttrg || is_r_ttrg ) {
+      d2 = ZERO;
+      ++numendpts_of_t;
+    } else {
+      d2 = incircle_p(p, q, r, t.target_site(), type);
+    }
+
+    if (  certainly( d2 == NEGATIVE )  ) { return NEGATIVE; }
+    if (  !is_certain( d2 == NEGATIVE )  ) { return indeterminate<Sign>(); }
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_xxxs d2=" << d2 << std::endl;);
+
+    CGAL_assertion(numendpts_of_t < 2);
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_xxxs numendpts_of_t= "
+      << numendpts_of_t << std::endl;);
+
+    if (numendpts_of_t > 0) {
+      bool is_t_horizontal = is_site_horizontal(t);
+      bool is_t_vertical   = is_site_vertical(t);
+
+      if (is_t_horizontal || is_t_vertical) {
+        CGAL_assertion(numendpts_of_t == 1);
+
+        // set endp to endpoint in {p,q,r}
+        Site_2 endp;
+        if ( is_p_tsrc || is_q_tsrc || is_r_tsrc ) {
+          endp = t.source_site();
+        } else {
+          endp = t.target_site();
+        }
+
+
+        // numothers will be the number of segments
+        // in {p,q,r} that have endp as an endpoint
+        unsigned int numothers = 0;
+
+        // a possible segment in {p,q,r} which has endpoint endp
+        Site_2 other;
+
+        // if there is a segment in {p,q,r}, try its endpoints
+        if (numpts_in_pqr < 3) {
+          if ((! is_p_point) && is_endpoint_of(endp, p)) {
+            numothers++;
+            other = p;
+          }
+
+          if ((! is_q_point) && is_endpoint_of(endp, q)) {
+            numothers++;
+            other = q;
+          }
+
+          if ((! is_r_point) && is_endpoint_of(endp, r)) {
+            numothers++;
+            other = r;
+          }
+        }
+
+        CGAL_assertion(numothers < 2);
+
+        if (numothers == 1) {
+          bool is_other_horizontal = is_site_horizontal(other);
+          bool is_other_vertical = is_site_vertical(other);
+
+          if ((is_t_horizontal && is_other_horizontal) ||
+              (is_t_vertical && is_other_vertical)       ) {
+            return POSITIVE;
+          }
+        } else {
+          CGAL_assertion(numothers == 0);
+          compute_vv(p, q, r, type);
+
+          Comparison_result ptcmpxve =
+            CGAL::compare(vv.x(), endp.point().x());
+          Comparison_result ptcmpyve =
+            CGAL::compare(vv.y(), endp.point().y());
+
+          CGAL_SDG_DEBUG(std::cout << "debug vv = " << vv << std::endl;);
+
+          if ( ( (ptcmpxve == EQUAL) && is_t_horizontal ) ||
+               ( (ptcmpyve == EQUAL) && is_t_vertical   )    ) {
+            return ZERO;
+          }
+
+        } // end of case numothers == 0
+      }  // endif (is_t_horizontal || is_t_vertical)
+    } // endif ((numendpts_of_t > 0)
+
+    bool is_tsrc_endp_of_p (false);
+    bool is_tsrc_endp_of_q (false);
+    bool is_tsrc_endp_of_r (false);
+    bool is_ttrg_endp_of_p (false);
+    bool is_ttrg_endp_of_q (false);
+    bool is_ttrg_endp_of_r (false);
+
+    if (! is_p_point) {
+      is_tsrc_endp_of_p = same_points(t.source_site(), p.source_site())
+                       || same_points(t.source_site(), p.target_site());
+      is_ttrg_endp_of_p = same_points(t.target_site(), p.source_site())
+                       || same_points(t.target_site(), p.target_site());
+    }
+    if (! is_q_point) {
+      is_tsrc_endp_of_q = same_points(t.source_site(), q.source_site())
+                       || same_points(t.source_site(), q.target_site());
+      is_ttrg_endp_of_q = same_points(t.target_site(), q.source_site())
+                       || same_points(t.target_site(), q.target_site());
+    }
+    if (! is_r_point) {
+      is_tsrc_endp_of_r = same_points(t.source_site(), r.source_site())
+                       || same_points(t.source_site(), r.target_site());
+      is_ttrg_endp_of_r = same_points(t.target_site(), r.source_site())
+                       || same_points(t.target_site(), r.target_site());
+    }
+
+    if (is_tsrc_endp_of_p && is_tsrc_endp_of_q) {
+      if (test_star(t.source_site(), p, q, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_p && is_ttrg_endp_of_q) {
+      if (test_star(t.target_site(), p, q, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_tsrc_endp_of_q && is_tsrc_endp_of_r) {
+      if (test_star(t.source_site(), q, r, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_q && is_ttrg_endp_of_r) {
+      if (test_star(t.target_site(), q, r, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_tsrc_endp_of_r && is_tsrc_endp_of_p) {
+      if (test_star(t.source_site(), r, p, t)) {
+        return NEGATIVE;
+      }
+    }
+    if (is_ttrg_endp_of_r && is_ttrg_endp_of_p) {
+      if (test_star(t.target_site(), r, p, t)) {
+        return NEGATIVE;
+      }
+    }
+
+    bool same_slope_at_corner(false);
+    if (numendpts_of_t > 0) {
+      CGAL_assertion(numendpts_of_t == 1);
+      CGAL_assertion(is_p_point);
+      if (! is_r_point) { // there is at least one segment in p, q, r
+        if (   (is_tsrc_endp_of_r && (is_p_tsrc || is_q_tsrc))
+            || (is_ttrg_endp_of_r && (is_p_ttrg || is_q_ttrg))
+           ) {
+          if (have_same_slope(r, t)) {
+            same_slope_at_corner = true;
+          }
+        }
+        if (   (is_tsrc_endp_of_q && (is_p_tsrc))
+            || (is_ttrg_endp_of_q && (is_p_ttrg))
+           ) {
+          if (have_same_slope(q, t)) {
+            same_slope_at_corner = true;
+          }
+        }
+      }
+    }
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_xxxs: same_slope_at_corner="
+        << same_slope_at_corner << std::endl;);
+
+    Line_2 l = compute_supporting_line(t.supporting_site());
+    compute_vv(p, q, r, type);
+    Sign sl(ZERO);
+    if (! same_slope_at_corner) {
+      sl = incircle_xxxl(vv, p, q, r, l, type);
+    }
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_xxxs: incircle_xxxl returned sl="
+        << sl << std::endl;);
+
+    if (  certainly( sl == POSITIVE )  ) { return sl; }
+    if (  !is_certain( sl == POSITIVE )  ) { return indeterminate<Sign>(); }
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_xxxs sl=" << sl <<
+      " d1=" << d1 << " d2=" << d2 << std::endl;);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug numpts_in_pqr=" << numpts_in_pqr << std::endl;);
+
+    // philaris: here we have a serious change related to L2
+    if ( sl == ZERO && (d1 == ZERO || d2 == ZERO) ) {
+
+      // if some site in {p,q,r} is a point and it is also:
+      // an endpoint of t and an endpoint of another site in {p,q,r}
+
+      // or if t has a common endpoint with a segment in {p,q,r}
+
+      Site_2 sqpnt, other_t, other_seg;
+
+      if (compute_helper(p, q, r, t, sqpnt, other_t, other_seg)) {
+
+        CGAL_assertion(sqpnt.is_point());
+        CGAL_assertion(other_t.is_point());
+        CGAL_assertion(other_seg.is_point());
+
+        CGAL_SDG_DEBUG(std::cout
+          << "debug incircle_xxxs compute_helper true, "
+          << "  vv=" << vv << "  sqpnt= " << sqpnt
+          << "  other_t=" << other_t
+          << "  other_seg=" << other_seg
+          << std::endl;);
+
+
+        Line_2 lvs =
+          compute_line_from_to(vv, sqpnt.point());
+
+
+
+        Oriented_side os_t =
+          oriented_side_of_line(lvs, other_t.point());
+        Oriented_side os_s =
+          oriented_side_of_line(lvs, other_seg.point());
+
+        CGAL_assertion(os_s != ON_ORIENTED_BOUNDARY);
+
+        if (os_t == os_s) {
+          Line_2 lseg =
+            compute_line_from_to(sqpnt.point(), other_seg.point());
+
+          Oriented_side os_seg_vv =
+           oriented_side_of_line(lseg, vv);
+          Oriented_side os_seg_t =
+           oriented_side_of_line(lseg, other_t.point());
+
+          if (os_seg_t == os_seg_vv) {
+            return NEGATIVE;
+          } else {
+            if (os_seg_t == ON_ORIENTED_BOUNDARY) {
+              return ZERO;
+            } else {
+              return POSITIVE;
+            }
+          }
+        } // end of case: os_t == os_s
+      } // end of case where
+
+
+      return ZERO;
+    }
+
+    Oriented_side os1 = oriented_side_linf(vv, l, t.source());
+    Oriented_side os2 = oriented_side_linf(vv, l, t.target());
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_xxxs: os1=" << os1 << " os2="
+        << os2 << std::endl;);
+
+    if ( sl == ZERO ) {
+      if (os1 == ON_ORIENTED_BOUNDARY || os2 == ON_ORIENTED_BOUNDARY) {
+	return ZERO;
+      }
+      return ( os1 == os2 ) ? POSITIVE : ZERO;
+    }
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_xxxs non-zero sl=" << sl << " : os1="
+        << os1 << " os2=" << os2 << std::endl;);
+
+    return (os1 == os2) ? POSITIVE : NEGATIVE;
+  }
+
+
+  inline
+  bool
+  compute_helper(const Site_2& p, const Site_2& q, const Site_2& r,
+      const Site_2& t,
+      Site_2& sqpnt, Site_2& other_of_t, Site_2& other_of_seg)
+  const
+  {
+    CGAL_assertion(t.is_segment());
+
+    const bool is_p_point = p.is_point();
+    const bool is_q_point = q.is_point();
+    const bool is_r_point = r.is_point();
+
+    const unsigned int numpts =
+      ((is_p_point)? 1 : 0) +
+      ((is_q_point)? 1 : 0) +
+      ((is_r_point)? 1 : 0)  ;
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug compute_helper #pts=" << numpts << std::endl;);
+
+    if (numpts == 3) {
+      return false;
+    }
+
+    // here and on, there are 0, 1 or 2 points in {p,q,r}
+
+
+    bool is_p_tsrc(false);
+    bool is_p_endp_of_t(false);
+
+    if (is_p_point) {
+      is_p_tsrc = same_points(p, t.source_site());
+      const bool is_p_ttrg = same_points(p, t.target_site());
+      is_p_endp_of_t = is_p_tsrc || is_p_ttrg;
+
+      if (is_p_endp_of_t) {
+        sqpnt = p;
+      }
+    }
+
+    bool is_q_tsrc(false);
+    bool is_q_endp_of_t(false);
+
+    if (is_q_point) {
+      is_q_tsrc = same_points(q, t.source_site());
+      const bool is_q_ttrg = same_points(q, t.target_site());
+      is_q_endp_of_t = is_q_tsrc || is_q_ttrg;
+      if (is_q_endp_of_t) {
+        sqpnt = q;
+      }
+    }
+
+    bool is_r_tsrc(false);
+    bool is_r_endp_of_t(false);
+
+    if (is_r_point) {
+      is_r_tsrc = same_points(r, t.source_site());
+      const bool is_r_ttrg = same_points(r, t.target_site());
+      is_r_endp_of_t = is_r_tsrc || is_r_ttrg;
+      if (is_r_endp_of_t) {
+        sqpnt = r;
+      }
+    }
+
+    const unsigned int numendpts_of_t =
+      ((is_p_endp_of_t)? 1 : 0) +
+      ((is_q_endp_of_t)? 1 : 0) +
+      ((is_r_endp_of_t)? 1 : 0)  ;
+
+    CGAL_SDG_DEBUG(std::cout << "debug compute_helper #endpts_of_t=" <<
+      numendpts_of_t << std::endl;);
+
+    if (numendpts_of_t == 0) {
+
+      bool have_common_p_tsrc(false),
+           have_common_p_ttrg(false),
+           have_common_p_t(false),
+           is_ptrg_endp_of_t(false);
+
+      if (! is_p_point) {
+        CGAL_assertion( ! same_segments(p, t) );
+        const bool is_psrc_tsrc = same_points(p.source_site(), t.source_site());
+        const bool is_ptrg_tsrc = same_points(p.target_site(), t.source_site());
+        const bool is_psrc_ttrg = same_points(p.source_site(), t.target_site());
+        const bool is_ptrg_ttrg = same_points(p.target_site(), t.target_site());
+        have_common_p_tsrc = is_psrc_tsrc || is_ptrg_tsrc;
+        have_common_p_ttrg = is_psrc_ttrg || is_ptrg_ttrg;
+        have_common_p_t = have_common_p_tsrc || have_common_p_ttrg;
+        is_ptrg_endp_of_t = is_ptrg_tsrc || is_ptrg_ttrg;
+      }
+
+      bool have_common_q_tsrc(false),
+           have_common_q_ttrg(false),
+           have_common_q_t(false),
+           is_qtrg_endp_of_t(false);
+
+      if (! is_q_point) {
+        CGAL_assertion( ! same_segments(q, t) );
+        const bool is_qsrc_tsrc = same_points(q.source_site(), t.source_site());
+        const bool is_qtrg_tsrc = same_points(q.target_site(), t.source_site());
+        const bool is_qsrc_ttrg = same_points(q.source_site(), t.target_site());
+        const bool is_qtrg_ttrg = same_points(q.target_site(), t.target_site());
+        have_common_q_tsrc = is_qsrc_tsrc || is_qtrg_tsrc;
+        have_common_q_ttrg = is_qsrc_ttrg || is_qtrg_ttrg;
+        have_common_q_t = have_common_q_tsrc || have_common_q_ttrg;
+        is_qtrg_endp_of_t = is_qtrg_tsrc || is_qtrg_ttrg;
+      }
+
+      bool have_common_r_tsrc(false),
+           have_common_r_ttrg(false),
+           have_common_r_t(false),
+           is_rtrg_endp_of_t(false);
+
+      if (! is_r_point) {
+        CGAL_assertion( ! same_segments(r, t) );
+        const bool is_rsrc_tsrc = same_points(r.source_site(), t.source_site());
+        const bool is_rtrg_tsrc = same_points(r.target_site(), t.source_site());
+        const bool is_rsrc_ttrg = same_points(r.source_site(), t.target_site());
+        const bool is_rtrg_ttrg = same_points(r.target_site(), t.target_site());
+        have_common_r_tsrc = is_rsrc_tsrc || is_rtrg_tsrc;
+        have_common_r_ttrg = is_rsrc_ttrg || is_rtrg_ttrg;
+        have_common_r_t = have_common_r_tsrc || have_common_r_ttrg;
+        is_rtrg_endp_of_t = is_rtrg_tsrc || is_rtrg_ttrg;
+      }
+
+      const unsigned int numcommon =
+        ((have_common_p_t)? 1 : 0) +
+        ((have_common_q_t)? 1 : 0) +
+        ((have_common_r_t)? 1 : 0)  ;
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug compute_helper #numcommon="
+          << numcommon << std::endl;);
+
+      CGAL_assertion(numcommon < 3);
+
+      if (numcommon == 0) {
+        return false;
+      }
+
+      // here, numcommon equals 1 or 2
+
+      const unsigned int numcommon_tsrc =
+        ((have_common_p_tsrc)? 1 : 0) +
+        ((have_common_q_tsrc)? 1 : 0) +
+        ((have_common_r_tsrc)? 1 : 0)  ;
+
+      const unsigned int numcommon_ttrg =
+        ((have_common_p_ttrg)? 1 : 0) +
+        ((have_common_q_ttrg)? 1 : 0) +
+        ((have_common_r_ttrg)? 1 : 0)  ;
+
+
+      if (numcommon == 1) {
+        if (numcommon_tsrc > 0) {
+          // here, numcommon_tsrc == 1
+          sqpnt = t.source_site();
+          other_of_t = t.target_site();
+        } else {
+          // here, numcommon_ttrg == 1
+          sqpnt = t.target_site();
+          other_of_t = t.source_site();
+        }
+
+        if (have_common_p_t) {
+          other_of_seg = (is_ptrg_endp_of_t) ?
+                         p.source_site() :
+                         p.target_site();
+        } else if (have_common_q_t) {
+          other_of_seg = (is_qtrg_endp_of_t) ?
+                         q.source_site() :
+                         q.target_site();
+        } else if (have_common_r_t) {
+          other_of_seg = (is_rtrg_endp_of_t) ?
+                         r.source_site() :
+                         r.target_site();
+        } else {
+          CGAL_assertion(false);
+        }
+
+        return true;
+
+      }
+
+      CGAL_assertion( numcommon == 2 );
+
+      CGAL_assertion( numcommon_tsrc + numcommon_ttrg == 2 );
+
+      if ( numcommon_tsrc == numcommon_ttrg )  { // both equal 1
+        CGAL_SDG_DEBUG(std::cout
+            << "debug compute_helper #numcommon tsrc ttrg equal"
+            << std::endl;);
+        return false;
+      }
+
+      // here either numcommon_tsrc==2 or numcommon_ttrg==2
+
+      if (numcommon_tsrc > 0) {
+        // here, numcommon_tsrc == 2
+        sqpnt = t.source_site();
+        other_of_t = t.target_site();
+      } else {
+        // here, numcommon_ttrg == 2
+        sqpnt = t.target_site();
+        other_of_t = t.source_site();
+      }
+
+      if (have_common_p_t && have_common_q_t) {
+        compute_helper_two_seg(p, q, sqpnt, other_of_seg);
+      } else if (have_common_q_t && have_common_r_t) {
+        compute_helper_two_seg(q, r, sqpnt, other_of_seg);
+      } else if (have_common_r_t && have_common_p_t) {
+        compute_helper_two_seg(r, p, sqpnt, other_of_seg);
+      } else {
+        CGAL_assertion(false);
+      }
+
+      return true;
+    }
+
+    // philaris: tocheck
+    CGAL_assertion( numendpts_of_t == 1 );
+
+    if (is_p_tsrc || is_q_tsrc || is_r_tsrc) {
+      other_of_t = t.target_site();
+    } else {
+      other_of_t = t.source_site();
+    }
+
+    if (is_p_endp_of_t) {
+      if (q.is_segment()) {
+        const bool is_p_qsrc = same_points(p, q.source_site());
+        if (is_p_qsrc || same_points(p, q.target_site())) {
+          other_of_seg = is_p_qsrc ? q.target_site() : q.source_site();
+          return true;
+        }
+      }
+      if (r.is_segment()) {
+        const bool is_p_rsrc = same_points(p, r.source_site());
+        if (is_p_rsrc || same_points(p, r.target_site())) {
+          other_of_seg = is_p_rsrc ? r.target_site() : r.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_p_endp_of_t
+
+    if (is_q_endp_of_t) {
+      if (r.is_segment()) {
+        const bool is_q_rsrc = same_points(q, r.source_site());
+        if (is_q_rsrc || same_points(q, r.target_site())) {
+          other_of_seg = is_q_rsrc ? r.target_site() : r.source_site();
+          return true;
+        }
+      }
+
+      if (p.is_segment()) {
+        const bool is_q_psrc = same_points(q, p.source_site());
+        if (is_q_psrc || same_points(q, p.target_site())) {
+          other_of_seg = is_q_psrc ? p.target_site() : p.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_q_endp_of_t
+
+    if (is_r_endp_of_t) {
+      if (p.is_segment()) {
+        const bool is_r_psrc = same_points(r, p.source_site());
+        if (is_r_psrc || same_points(r, p.target_site())) {
+          other_of_seg = is_r_psrc ? p.target_site() : p.source_site();
+          return true;
+        }
+      }
+
+      if (q.is_segment()) {
+        const bool is_r_qsrc = same_points(r, q.source_site());
+        if (is_r_qsrc || same_points(r, q.target_site())) {
+          other_of_seg = is_r_qsrc ? q.target_site() : q.source_site();
+          return true;
+        }
+      }
+
+    } // end of case: is_r_endp_of_t
+
+    return false;
+
+  }
+
+
+
+
+  inline
+  void
+  compute_helper_two_seg(
+      const Site_2& a, const Site_2& b,
+      const Site_2& common_site, Site_2& other_of_seg)
+  const
+  {
+    CGAL_assertion(a.is_segment());
+    CGAL_assertion(b.is_segment());
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug compute_helper_two_seg entering with "
+        << a << " and " << b << " having common "
+        << common_site << std::endl;);
+
+    if (is_site_h_or_v(a)) {
+      if ( same_points(common_site, b.source_site()) ) {
+        other_of_seg = b.target_site();
+      } else {
+        other_of_seg = b.source_site();
+      }
+    } else {
+      CGAL_assertion(is_site_h_or_v(b));
+
+      if ( same_points(common_site, a.source_site()) ) {
+        other_of_seg = a.target_site();
+      } else {
+        other_of_seg = a.source_site();
+      }
+
+    }
+  } // end of compute_helper_two_seg
+
+
+  //--------------------------------------------------------------------------
+  // the first three objects are points and the query object is a segment
+  //--------------------------------------------------------------------------
+
+  Sign incircle_s(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PPP_Type& type) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_point() );
+    CGAL_precondition( r.is_point() );
+    CGAL_precondition( t.is_segment() );
+
+    // easy degeneracies --- start
+
+    // check if the endpoints of t are two of p, q and r
+    unsigned int n_ends = 0;
+    bool end_pt = is_endpoint_of(p, t);
+    bool end_qt = is_endpoint_of(q, t);
+    bool end_rt = is_endpoint_of(r, t);
+    if ( end_pt ) ++n_ends;
+    if ( end_qt ) ++n_ends;
+    if ( end_rt ) ++n_ends;
+
+    CGAL_assertion( n_ends < 3 );
+    if ( n_ends == 2 ) { return NEGATIVE; }
+
+    /*
+#ifndef CGAL_DISABLE_AM_CODE
+    // code added in previous version by Andreas + Monique -- start
+    Site_2 const *pp1 = NULL;
+    if ( end_pt ) pp1 = &p;
+    else if ( end_qt ) pp1 = &q;
+    else if ( end_rt ) pp1 = &r;
+    if ( pp1 != NULL ) {
+      // As the Voronoi circle and the segment t touch in p1,
+      // it is enough to check that the center and the non-touching
+      // point of the segment
+      // are not in the same halfspace defined by the tangent line through p1
+      Point_2 p1 = pp1->point();
+      Point_2 p2 = other_site(*pp1, t).point();
+      compute_vv(p, q, r, type);
+
+      // philaris: this has to be changed
+
+      CGAL_SDG_DEBUG(std::cout << "debug: unreachable" << std::endl;);
+
+      Compute_scalar_product_2 csp;
+      return -CGAL::sign( csp(vv - p1, p2 - p1) );
+    }
+    // code added in previous version by Andreas + Monique -- end
+#endif // CGAL_DISABLE_AM_CODE
+    */
+
+    // easy degeneracies --- end
+
+    return incircle_xxxs(p, q, r, t, type);
+  }
+
+  //--------------------------------------------------------------------------
+  // the first three objects are two points and a segment and the
+  // query object is a segment
+  //--------------------------------------------------------------------------
+
+  Sign incircle_s(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PPS_Type& type) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_point() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_segment() );
+
+    // easy degeneracies --- start
+
+    // philaris: removed some of easy degeneracies
+
+    // check if the endpoints of t are p and q
+    bool end_pt = is_endpoint_of(p, t);
+    bool end_qt = is_endpoint_of(q, t);
+
+    if ( end_pt && end_qt ) { return NEGATIVE; }
+
+    /*
+
+#ifndef CGAL_DISABLE_AM_CODE
+    // code added in previous version by Andreas + Monique -- start
+    Site_2 const *pp1 = &p, *pp2 = &q;
+    if ( !end_qt ) { std::swap(pp1, pp2); }
+
+    if ( is_endpoint_of(*pp2, t) ) {
+      Point_2 p1 = other_site(*pp2, t).point();
+      Point_2 p2 = pp2->point();
+      compute_vv(p, q, r, type);
+
+      Compute_scalar_product_2 csp;
+      return -CGAL::sign( csp(vv - p2, p1 - p2) );
+    }
+    // code added in previous version by Andreas + Monique -- end
+#endif // CGAL_DISABLE_AM_CODE
+    */
+
+    // easy degeneracies --- end
+
+    Sign retval = incircle_xxxs(p, q, r, t, type);
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s: about to return retval of"
+      << "incircle_xxxs = " << retval << std::endl;);
+
+    return retval;
+  }
+
+  //--------------------------------------------------------------------------
+  // the first three objects are a point and two segments and the query
+  // object is a segment
+  //--------------------------------------------------------------------------
+
+  Sign incircle_s(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const PSS_Type& type) const
+  {
+    CGAL_precondition( p.is_point() );
+    CGAL_precondition( q.is_segment() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s PSS (pqrt) = "
+      << "(" << p << ") (" << q << ") (" << r << ") "
+      << "(" << t << ")" << std::endl;);
+
+    // easy degeneracies --- start
+
+    bool is_p_endp_of_q = is_endpoint_of(p, q);
+    bool is_p_endp_of_r = is_endpoint_of(p, r);
+    bool is_p_endp_of_t = is_endpoint_of(p, t);
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug incircle_s p is endp of q,r,t = "
+        << is_p_endp_of_q << is_p_endp_of_r << is_p_endp_of_t
+        << std::endl;);
+
+    // check if p is a common endpoint of q and r, in which case the
+    // Voronoi circle degenerates to p
+    if ( is_p_endp_of_q && is_p_endp_of_r ) {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug incircle_s voronoi circle degenerates to p="
+          << p << std::endl;);
+      // case 1: the new segment is not adjacent to the center of the
+      //         degenerate Voronoi circle, i.e., not adjacent to p
+      if ( ! is_p_endp_of_t ) { return POSITIVE; }
+
+      // check if t has the same support as either q or r
+      if ( same_segments(q.supporting_site(), t.supporting_site()) ) {
+	return ZERO;
+      }
+
+      if ( same_segments(r.supporting_site(), t.supporting_site()) ) {
+	return ZERO;
+      }
+
+      CGAL_SDG_DEBUG(std::cout
+          << "debug incircle_s q, r, t have p as endpoint"
+          << std::endl;);
+
+      Point_2 r_ = r.source(), q_ = q.source(), t_ = t.source();
+
+      if ( same_points(q.source_site(), p) ) { q_ = q.target(); }
+      if ( same_points(r.source_site(), p) ) { r_ = r.target(); }
+      if ( same_points(t.source_site(), p) ) { t_ =  t.target(); }
+
+      Point_2 p_ = p.point();
+
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_s"
+        << "  p_=" << p_ << "  q_= " << q_
+        << "  r_=" << r_ << "  t_= " << t_
+        << std::endl;);
+
+      if ( CGAL::orientation(p_, q_, t_) == LEFT_TURN &&
+	   CGAL::orientation(p_, r_, t_) == RIGHT_TURN ) {
+	return NEGATIVE;
+      }
+      return ZERO;
+    }
+
+    // here, voronoi circle does not degenerate to a point
+
+    // philaris: remove
+    /*
+#ifndef CGAL_DISABLE_M_CODE
+    // code added by Menelaos -- begin
+
+    // in the code that follows we check whether one endpoint of the
+    // query segment t is the same as the point p of a PSS circle. in
+    // this case the result is known by taking the other point of t
+    // and checking against the tangent to the Voronoi circle at p.
+    if ( is_endpoint_of(p, t) ) {
+      Point_2 p1 = p.point();
+      Point_2 p2 = other_site(p, t).point();
+      compute_vv(p, q, r, type);
+      Compute_scalar_product_2 csp;
+      return -CGAL::sign( csp(vv - p1, p2 - p1) );
+    }
+    // code added by Menelaos -- end
+#endif // CGAL_DISABLE_M_CODE
+    */
+
+    // philaris: with assertions
+    // check if t has the same support as either q or r
+    if ( same_segments(q.supporting_site(), t.supporting_site()) ) {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug q=" << q << " t=" << t << std::endl; );
+      // philaris: the following assertion is too strong
+      //CGAL_assertion(
+      //    same_points(q.source_site(), t.source_site()) ||
+      //    same_points(q.source_site(), t.target_site()) ||
+      //    same_points(q.target_site(), t.source_site()) ||
+      //    same_points(q.target_site(), t.target_site())   );
+      // philaris: the following assertion is too strong and does not
+      // work for inexact arithmetic;
+      // philaris: I also remove it because of validity tests
+      //CGAL_assertion(is_p_endp_of_q && is_p_endp_of_t);
+      return POSITIVE;
+    }
+    if ( same_segments(r.supporting_site(), t.supporting_site()) ) {
+      CGAL_SDG_DEBUG(std::cout
+          << "debug r=" << r << " t=" << t
+          << " have support " << r.supporting_site()  << std::endl; );
+
+      // philaris: r and t share a point, which must be p
+
+      // philaris: the assertion below fails in some cases,
+      //           maybe because of inexact arithmetic
+      // philaris: I also remove it because of validity tests
+      //CGAL_assertion(is_p_endp_of_r && is_p_endp_of_t);
+
+      // philaris: I also remove the following assertion
+      //CGAL_assertion(
+      //    same_points(r.source_site(), t.source_site()) ||
+      //    same_points(r.source_site(), t.target_site()) ||
+      //    same_points(r.target_site(), t.source_site()) ||
+      //    same_points(r.target_site(), t.target_site())   );
+      return POSITIVE;
+    }
+
+    if ( is_p_endp_of_q && is_p_endp_of_t ) {
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_s orientation"
+        << " is_p_endp_of_q && is_p_endp_of_t"
+        << std::endl;);
+      Point_2 qother =
+        same_points(p, q.source_site()) ? q.target() : q.source();
+      Point_2 tother =
+        same_points(p, t.source_site()) ? t.target() : t.source();
+      Orientation o = CGAL::orientation(qother, p.point(), tother);
+
+      CGAL_SDG_DEBUG(std::cout << "debug vsqrt "
+          << "q^ = " << qother << ", p = " << p.point()
+          << ", t^ = " << tother
+          << " o = " << o << std::endl; );
+
+      if (o != RIGHT_TURN) {
+        return POSITIVE;
+      } else {
+        if (is_site_h_or_v(q) || is_site_h_or_v(t)) {
+          return NEGATIVE;
+        } else {
+          bool has_q_pos_slope = has_positive_slope(q);
+          if (has_q_pos_slope) {
+            CGAL_SDG_DEBUG(std::cout << "debug vsqrt "
+                << "q has positive slope" << std::endl; );
+
+            return cmpy(qother, p.point()) == cmpy(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          } else {
+            CGAL_SDG_DEBUG(std::cout << "debug vsqrt "
+                << "q has has negative slope" << std::endl; );
+            return cmpx(qother, p.point()) == cmpx(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          }
+        }
+      }
+      //return (o == RIGHT_TURN)? NEGATIVE : POSITIVE;
+    } // end of case (is_p_endp_of_q && is_p_endp_of_t) {
+
+    if ( is_p_endp_of_r && is_p_endp_of_t ) {
+      CGAL_SDG_DEBUG(std::cout << "debug incircle_s orientation"
+        << " is_p_endp_of_r && is_p_endp_of_t"
+        << std::endl;);
+      Point_2 rother =
+        same_points(p, r.source_site()) ? r.target() : r.source();
+      Point_2 tother =
+        same_points(p, t.source_site()) ? t.target() : t.source();
+      Orientation o = CGAL::orientation(rother, p.point(), tother);
+
+      if (o != LEFT_TURN) {
+        return POSITIVE;
+      } else {
+        if (is_site_h_or_v(r) || is_site_h_or_v(t)) {
+          return NEGATIVE;
+        } else {
+          bool has_r_pos_slope = has_positive_slope(r);
+          if (has_r_pos_slope) {
+            return cmpx(rother, p.point()) == cmpx(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          } else {
+            return cmpy(rother, p.point()) == cmpy(tother, p.point()) ?
+                   NEGATIVE : POSITIVE;
+          }
+        }
+      }
+    } // end of case (is_p_endp_of_r && is_p_endp_of_t)
+
+    // easy degeneracies --- end
+
+    return incircle_xxxs(p, q, r, t, type);
+  }
+
+
+  //--------------------------------------------------------------------------
+  // the first three objects are segments and the query object is also
+  // a segment
+  //--------------------------------------------------------------------------
+
+  inline
+  Sign incircle_s(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t, const SSS_Type& type) const
+  {
+    CGAL_precondition( p.is_segment() );
+    CGAL_precondition( q.is_segment() );
+    CGAL_precondition( r.is_segment() );
+    CGAL_precondition( t.is_segment() );
+
+    return incircle_xxxs(p, q, r, t, type);
+  }
+
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+  // the incircle test --- end
+  //--------------------------------------------------------------------------
+  //--------------------------------------------------------------------------
+
+
+
+  vertex_t
+  compute_type(const Site_2& s1, const Site_2& s2, const Site_2& s3) const
+  {
+    int npts = 0;
+    if ( s1.is_point() ) ++npts;
+    if ( s2.is_point() ) ++npts;
+    if ( s3.is_point() ) ++npts;
+
+    switch ( npts ) {
+    case 0:
+      return SSS;
+      break;
+    case 1:
+      return PSS;
+      break;
+    case 2:
+      return PPS;
+      break;
+    default:
+      return PPP;
+    }
+  }
+
+
+  Sign incircle_p(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    switch ( v_type ) {
+    case PPP:
+      return incircle_p(p, q, r, t, PPP_Type());
+    case PPS:
+      if ( p.is_segment() ) {
+	return incircle_p(q, r, p, t, PPS_Type());
+      } else if ( q.is_segment() ) {
+	return incircle_p(r, p, q, t, PPS_Type());
+      } else {
+	return incircle_p(p, q, r, t, PPS_Type());
+      }
+    case PSS:
+      if ( p.is_point() ) {
+	return incircle_p(p, q, r, t, PSS_Type());
+      } else if ( q.is_point() ) {
+	return incircle_p(q, r, p, t, PSS_Type());
+      } else {
+	return incircle_p(r, p, q, t, PSS_Type());
+      }
+      return incircle_p(p, q, r, t, PSS_Type());
+    default: // case SSS
+      return incircle_p(p, q, r, t, SSS_Type());
+    }
+  }
+
+
+
+  Sign incircle_s(const Site_2& p, const Site_2& q, const Site_2& r,
+		  const Site_2& t) const
+  {
+    CGAL_precondition( t.is_segment() );
+
+    CGAL_SDG_DEBUG(std::cout << "debug incircle_s (pqrt) = "
+      << "(" << p << ") (" << q << ") (" << r << ") "
+      << "(" << t << ")" << std::endl;);
+
+    switch ( v_type ) {
+    case PPP:
+      return incircle_s(p, q, r, t, PPP_Type());
+    case PPS:
+      if ( p.is_segment() ) {
+	return incircle_s(q, r, p, t, PPS_Type());
+      } else if ( q_.is_segment() ) {
+	return incircle_s(r, p, q, t, PPS_Type());
+      } else {
+	return incircle_s(p, q, r, t, PPS_Type());
+      }
+    case PSS:
+      if ( p.is_point() ) {
+	return incircle_s(p, q, r, t, PSS_Type());
+      } else if ( q.is_point() ) {
+	return incircle_s(q, r, p, t, PSS_Type());
+      } else {
+	return incircle_s(r, p, q, t, PSS_Type());
+      }
+    default: // case SSS
+      return incircle_s(p, q, r, t, SSS_Type());
+    }
+  }
+
+
+public:
+  Voronoi_vertex_sqrt_field_new_C2(const Site_2& p,
+				   const Site_2& q,
+				   const Site_2& r)
+    : p_(p), q_(q), r_(r), is_vv_computed(false)
+  {
+    v_type = compute_type(p, q, r);
+  }
+
+
+  inline bool is_degenerate_Voronoi_circle() const
+  {
+    if ( v_type != PSS ) { return false; }
+
+    if ( p_.is_point() ) {
+      return ( is_endpoint_of(p_, q_) && is_endpoint_of(p_, r_) );
+    } else if ( q_.is_point() ) {
+      return ( is_endpoint_of(q_, p_) && is_endpoint_of(q_, r_) );
+    } else {
+      CGAL_assertion( r_.is_point() );
+      return ( is_endpoint_of(r_, p_) && is_endpoint_of(r_, q_) );
+    }
+  }
+
+
+  Point_2 degenerate_point() const
+  {
+    CGAL_precondition( is_degenerate_Voronoi_circle() );
+    if ( p_.is_point() ) return p_.point();
+    if ( q_.is_point() ) return q_.point();
+    return r_.point();
+  }
+
+
+  Point_2 point() const
+  {
+    if ( is_degenerate_Voronoi_circle() ) {
+      return degenerate_point();
+    }
+
+    if ( !is_vv_computed ) {
+      switch ( v_type ) {
+      case PPP:
+	compute_vv(p_, q_, r_, PPP_Type());
+	break;
+      case PPS:
+	if ( p_.is_segment() ) {
+	  compute_vv(q_, r_, p_, PPS_Type());
+	} else if ( q_.is_segment() ) {
+	  compute_vv(r_, p_, q_, PPS_Type());
+	} else {
+	  compute_vv(p_, q_, r_, PPS_Type());
+	}
+	break;
+      case PSS:
+	if ( p_.is_point() ) {
+	  compute_vv(p_, q_, r_, PSS_Type());
+	} else if ( q_.is_point() ) {
+	  compute_vv(q_, r_, p_, PSS_Type());
+	} else {
+	  compute_vv(r_, p_, q_, PSS_Type());
+	}
+	break;
+      default: // case SSS:
+	compute_vv(p_, q_, r_, SSS_Type());
+	break;
+      }
+    }
+
+    return vv;
+  }
+
+
+  inline Sign incircle(const Site_2& t) const
+  {
+
+    CGAL_SDG_DEBUG(std::cout
+        << "debug field_new incircle t=" << t << std::endl;);
+
+    if ( t.is_point() ) {
+      return incircle_p(p_, q_, r_, t);
+    }
+    CGAL_SDG_DEBUG(std::cout
+        << "debug about to run incircle_s (pqrt) ="
+        << "(" << p_ << ") (" << q_ << ") (" << r_ << ") "
+        << "(" << t << ")" << std::endl;);
+    return incircle_s(p_, q_, r_, t);
+  }
+
+
+  inline Sign operator()(const Site_2& p, const Site_2& q, const Site_2& r,
+			 const Site_2& t) const
+  {
+    if ( t.is_point() ) {
+      return incircle_p(p, q, r, t);
+    }
+    return incircle_s(p, q, r, t);
+  }
+
+private:
+
+  template<class Type>
+  Sign incircle_p_no_easy(const Point_2& vv,
+			  const Site_2& p, const Site_2& q, const Site_2& r,
+			  const Site_2& t, const Type& type) const
+  {
+    CGAL_precondition( t.is_point() );
+
+    FT radius = linf_radius(vv, p, q, r, type);
+
+    Point_2 tt = t.point();
+
+    FT absdvtx = CGAL::abs(vv.x() - tt.x());
+    FT absdvty = CGAL::abs(vv.y() - tt.y());
+
+    FT d = (CGAL::max)(absdvtx, absdvty);
+
+    Comparison_result crude = CGAL::compare(d, radius);
+
+    if (crude != ZERO) {
+      return crude;
+    } else {
+      CGAL_SDG_DEBUG(std::cout << "debug vsqr refining in noeasy pqr=("
+        << p << ", " << q << ", " << r << "), "
+        << "t=" << t
+        << std::endl;);
+      // here crude == ZERO, so
+      // we might have to refine
+
+      FT radius_fine = linf_fine_radius(vv, p, q, r, type);
+
+      FT d_fine = (CGAL::min)(absdvtx, absdvty);
+
+      return CGAL::compare(d_fine, radius_fine);
+
+    }
+  }
+
+
+  Sign incircle_p_no_easy(const Site_2& p, const Site_2& q, const Site_2& r,
+			  const Site_2& t) const
+  {
+    Sign s(ZERO);
+    switch ( v_type ) {
+    case PPP:
+      s = incircle_p(p, q, r, t, PPP_Type());
+      break;
+    case PPS:
+      PPS_Type pps;
+      if ( p.is_segment() ) {
+	compute_vv(q, r, p, pps);
+	s = incircle_p_no_easy(vv, q, r, p, t, pps);
+      } else if ( q.is_segment() ) {
+	compute_vv(r, p, q, pps);
+	s = incircle_p_no_easy(vv, r, p, q, t, pps);
+      } else {
+	compute_vv(p, q, r, pps);
+	s = incircle_p_no_easy(vv, p, q, r, t, pps);
+      }
+      break;
+    case PSS:
+      PSS_Type pss;
+      if ( p.is_point() ) {
+	compute_vv(p, q, r, pss);
+	s = incircle_p_no_easy(vv, p, q, r, t, pss);
+      } else if ( q.is_point() ) {
+	compute_vv(q, r, p, pss);
+	s = incircle_p_no_easy(vv, q, r, p, t, pss);
+      } else {
+	compute_vv(r, p, q, pss);
+	s = incircle_p_no_easy(vv, r, p, q, t, pss);
+      }
+      break;
+    case SSS:
+      SSS_Type sss;
+      compute_vv(p, q, r, sss);
+      s = incircle_p_no_easy(vv, p, q, r, t, sss);
+      break;
+    }
+
+    return s;
+  }
+
+
+  Sign incircle_s_no_easy(const Site_2& p, const Site_2& q, const Site_2& r,
+			  const Site_2& t) const
+  {
+    switch ( v_type ) {
+    case PPP:
+      return incircle_xxxs(p, q, r, t, PPP_Type());
+    case PPS:
+      if ( p.is_segment() ) {
+	return incircle_xxxs(q, r, p, t, PPS_Type());
+      } else if ( q_.is_segment() ) {
+	return incircle_xxxs(r, p, q, t, PPS_Type());
+      } else {
+	return incircle_xxxs(p, q, r, t, PPS_Type());
+      }
+    case PSS:
+      if ( p.is_point() ) {
+	return incircle_xxxs(p, q, r, t, PSS_Type());
+      } else if ( q.is_point() ) {
+	return incircle_xxxs(q, r, p, t, PSS_Type());
+      } else {
+	return incircle_xxxs(r, p, q, t, PSS_Type());
+      }
+    default: // case SSS:
+      return incircle_xxxs(p, q, r, t, SSS_Type());
+    }
+  }
+
+
+
+
+public:
+  inline Sign incircle_no_easy(const Site_2& t) const
+  {
+    Sign s;
+
+    if ( t.is_point() ) {
+      s = incircle_p_no_easy(p_, q_, r_, t);
+    } else {
+      s = incircle_s_no_easy(p_, q_, r_, t);
+    }
+
+    return s;
+  }
+
+
+  Orientation orientation(const Line_2& l) const
+  {
+    switch ( v_type ) {
+    case PPP:
+      compute_vv(p_, q_, r_, PPP_Type());
+      break;
+    case PPS:
+      if ( p_.is_segment() ) {
+	compute_vv(q_, r_, p_, PPS_Type());
+      } else if ( q_.is_segment() ) {
+	compute_vv(r_, p_, q_, PPS_Type());
+      } else {
+	compute_vv(p_, q_, r_, PPS_Type());
+      }
+      break;
+    case PSS:
+      if ( p_.is_point() ) {
+	compute_vv(p_, q_, r_, PSS_Type());
+      } else if ( q_.is_point() ) {
+	compute_vv(q_, r_, p_, PSS_Type());
+      } else {
+	compute_vv(r_, p_, q_, PSS_Type());
+      }
+      break;
+    default: // case SSS:
+      compute_vv(p_, q_, r_, SSS_Type());
+      break;
+    }
+
+    return CGAL::sign(l.a() * vv.x() + l.b() * vv.y() + l.c());
+  }
+
+
+  inline Oriented_side oriented_side(const Line_2& l) const
+  {
+    return orientation(l);
+  }
+
+private:
+  // the defining sites of the Voronoi vertex
+  const Site_2& p_, &q_, &r_;
+
+  // indicates whether the Voronoi vertex has been computed
+  mutable bool is_vv_computed;
+
+  // the type of the Voronoi vertex
+  vertex_t v_type;
+
+  // the computed Voronoi vertex is cached in this variable
+  mutable Point_2 vv;
+};
+
+
+
+
+
+} //namespace SegmentDelaunayGraphLinf_2
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_VORONOI_VERTEX_SQRT_FIELD_NEW_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h
new file mode 100644
index 0000000..0e3333f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_H
+
+#include <CGAL/basic.h>
+
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS \
+  CGAL::SegmentDelaunayGraphLinf_2
+
+#ifndef CGAL_SDG_VERBOSE
+#define CGAL_SDG_DEBUG(a)
+#else
+#define CGAL_SDG_DEBUG(a) { a }
+#endif
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h
new file mode 100644
index 0000000..f4acfa9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h
@@ -0,0 +1,245 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_FILTERED_TRAITS_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_FILTERED_TRAITS_2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h>
+
+// includes for the default parameters of the filtered traits
+#ifdef CGAL_USE_GMP
+#include <CGAL/Gmpq.h>
+#else
+#include <CGAL/Quotient.h>
+#include <CGAL/MP_Float.h>
+#endif
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Interval_arithmetic.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/number_utils_classes.h>
+
+namespace CGAL {
+
+#define SDG2_INS CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal
+
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+// the filtered Traits classes
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+
+// this traits class does support intersecting segments
+template<class CK,
+	 class CK_MTag = Field_with_sqrt_tag,
+#ifdef CGAL_USE_GMP
+	 class EK      = Simple_cartesian< Gmpq >,
+#else
+	 class EK      = Simple_cartesian< Quotient<MP_Float> >,
+#endif
+	 class EK_MTag = Field_tag,
+	 class FK      = Simple_cartesian< Interval_nt<false> >,
+	 class FK_MTag = Field_with_sqrt_tag,
+	 class C2E     = Cartesian_converter<CK, EK>,
+	 class C2F     =
+	 Cartesian_converter<CK, FK, To_interval<typename CK::RT> > >
+struct Segment_Delaunay_graph_Linf_filtered_traits_2
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, CK_MTag,
+							 EK, EK_MTag,
+							 FK, FK_MTag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
+  }
+};
+
+
+template<class CK, class EK, class EK_MTag, class FK, class FK_MTag,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, Field_tag,
+						EK, EK_MTag,
+						FK, FK_MTag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
+							 EK, EK_MTag,
+							 FK, FK_MTag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
+  }
+};
+
+template<class CK, class CK_MTag, class EK, class FK, class FK_MTag,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, CK_MTag,
+						EK, Field_tag,
+						FK, FK_MTag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, CK_MTag,
+							 EK, Integral_domain_without_division_tag,
+							 FK, FK_MTag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
+  }
+};
+
+template<class CK, class CK_MTag, class EK, class EK_MTag, class FK,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, CK_MTag,
+						EK, EK_MTag,
+						FK, Field_tag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, CK_MTag,
+							 EK, EK_MTag,
+							 FK, Integral_domain_without_division_tag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
+  }
+};
+
+template<class CK, class CK_MTag, class EK, class FK,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, CK_MTag,
+						EK, Field_tag,
+						FK, Field_tag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, CK_MTag,
+							 EK, Integral_domain_without_division_tag,
+							 FK, Integral_domain_without_division_tag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
+  }
+};
+
+template<class CK, class EK, class EK_MTag, class FK,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, Field_tag,
+						 EK, EK_MTag,
+						 FK, Field_tag,
+						 C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
+							 EK, EK_MTag,
+							 FK, Integral_domain_without_division_tag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
+  }
+};
+
+template<class CK, class EK, class FK, class FK_MTag,
+	 class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, Field_tag,
+						EK, Field_tag,
+						FK, FK_MTag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
+							 EK, Integral_domain_without_division_tag,
+							 FK, FK_MTag,
+							 C2E, C2F,
+							 Tag_true>
+{
+public:
+  Segment_Delaunay_graph_Linf_filtered_traits_2() {
+    SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
+  }
+};
+
+template<class CK, class EK, class FK, class C2E, class C2F>
+struct Segment_Delaunay_graph_Linf_filtered_traits_2<CK, Field_tag,
+						EK, Field_tag,
+						FK, Field_tag,
+						C2E, C2F>
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
+							 EK, Integral_domain_without_division_tag,
+							 FK, Integral_domain_without_division_tag,
+							 C2E, C2F,
+							 Tag_true>
+{};
+
+//=========================================================================
+
+
+// this traits class does NOT support intersecting segments
+template<class CK,
+	 class CK_MTag = Field_with_sqrt_tag,
+#ifdef CGAL_USE_GMP
+	 class EK      = Simple_cartesian< Gmpq >,
+#else
+	 class EK      = Simple_cartesian< MP_Float >,
+#endif
+	 class EK_MTag = Integral_domain_without_division_tag,
+	 class FK      = Simple_cartesian< Interval_nt<false> >,
+	 class FK_MTag = Field_with_sqrt_tag,
+	 class C2E     = Cartesian_converter<CK, EK>,
+	 class C2F     =
+	 Cartesian_converter<CK, FK, To_interval<typename CK::RT> > >
+struct Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2
+  : public Segment_Delaunay_graph_Linf_filtered_traits_base_2<CK, CK_MTag,
+							 EK, EK_MTag,
+							 FK, FK_MTag,
+							 C2E, C2F,
+							 Tag_false>
+{
+  Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2() {
+    SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,CK_MTag,2>();
+    SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,EK_MTag,4>();
+    SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,FK_MTag,6>();
+  }
+};
+
+#undef SDG2_INS
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_FILTERED_TRAITS_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h
new file mode 100644
index 0000000..e7e15b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h
@@ -0,0 +1,79 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HIERARCHY_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HIERARCHY_2_H
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2.h>
+#include <CGAL/Segment_Delaunay_graph_hierarchy_2.h>
+
+namespace CGAL {
+
+template < class Gt,
+	   class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
+	   class STag = Tag_false,
+	   class D_S = Triangulation_data_structure_2<
+              Segment_Delaunay_graph_hierarchy_vertex_base_2<
+		Segment_Delaunay_graph_vertex_base_2<ST> >,
+              Segment_Delaunay_graph_face_base_2<Gt> >,
+	   class LTag = Tag_false>
+class Segment_Delaunay_graph_Linf_hierarchy_2
+  : public Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,
+             Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag> >
+{
+  protected:
+  typedef Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,
+             Segment_Delaunay_graph_Linf_2<Gt,ST,D_S,LTag> >
+          Base;
+  typedef Segment_Delaunay_graph_Linf_hierarchy_2<Gt,ST,STag,D_S,LTag>
+          Self;
+
+  public:
+  // CONSTRUCTORS
+  //-------------
+  Segment_Delaunay_graph_Linf_hierarchy_2(const Gt& gt = Gt())
+    : Base(gt) {}
+
+  template<class Input_iterator>
+  Segment_Delaunay_graph_Linf_hierarchy_2(Input_iterator first,
+				     Input_iterator beyond,
+				     const Gt& gt=Gt())
+    : Base(first, beyond, gt)
+  {
+  }
+
+  Segment_Delaunay_graph_Linf_hierarchy_2(const Self& other)
+    : Base(other) {}
+
+  Self& operator=(const Self& other)
+  {
+    if ( this != &other ) {
+      Base::operator=(other);
+    }
+    return *this;
+  }
+
+};
+
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HIERARCHY_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h
new file mode 100644
index 0000000..b3ad1c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h
@@ -0,0 +1,166 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_TRAITS_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_TRAITS_2_H
+
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/basic.h>
+
+#include <CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h>
+
+#include <CGAL/Filtered_kernel.h>
+#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
+
+
+namespace CGAL {
+
+//-----------------------------------------------------------------------
+// the Traits classes
+//-----------------------------------------------------------------------
+
+// this traits class does support intersecting segments
+
+// the following definition is okay when giving Field_with_sqrt_tag
+// for all other tags I need a specialization
+template<class R,
+	 class MTag =
+	 typename Algebraic_structure_traits<typename R::FT>::Algebraic_category
+	 /*Field_tag*/>
+struct Segment_Delaunay_graph_Linf_traits_2
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,MTag,Tag_true> {};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<R,Field_with_kth_root_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Field_with_sqrt_tag,Tag_true> {};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<R,Field_with_root_of_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Field_with_sqrt_tag,Tag_true> {};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<R,Field_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Integral_domain_without_division_tag,Tag_true> {};
+
+
+// Concept checking
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<R,Integral_domain_without_division_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Integral_domain_without_division_tag,Tag_true>
+{
+  Segment_Delaunay_graph_Linf_traits_2() {
+    THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
+    ( R() );
+  }
+};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<R,Euclidean_ring_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Integral_domain_without_division_tag,Tag_true>
+{
+  Segment_Delaunay_graph_Linf_traits_2() {
+    THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
+    ( R() );
+  }
+};
+
+// Specializations for filtered_kernel
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<Filtered_kernel<R>,Field_tag>
+  : public
+  Segment_Delaunay_graph_filtered_traits_2<R,Field_tag,
+					   typename Filtered_kernel<R>::Exact_kernel,
+					   Field_tag,
+					   typename Filtered_kernel<R>::Approximate_kernel,
+					   Field_with_sqrt_tag>
+{};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_2<Filtered_kernel<R>,Field_with_sqrt_tag>
+  : public
+  Segment_Delaunay_graph_filtered_traits_2<R,Field_with_sqrt_tag,
+					   typename Filtered_kernel<R>::Exact_kernel,
+					   Field_tag,
+					   typename Filtered_kernel<R>::Approximate_kernel,
+					   Field_with_sqrt_tag>
+{};
+
+//=========================================================================
+
+// this traits class does NOT support intersecting segments
+template<class R,
+	 class MTag = 
+	 typename Algebraic_structure_traits<typename R::FT>::Algebraic_category
+	 /*Integral_domain_without_division_tag*/>
+struct Segment_Delaunay_graph_Linf_traits_without_intersections_2
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,MTag,Tag_false> {};
+
+template<class R>
+struct Segment_Delaunay_graph_Linf_traits_without_intersections_2<R,Field_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Integral_domain_without_division_tag,Tag_false>
+{
+  Segment_Delaunay_graph_Linf_traits_without_intersections_2() {
+    THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
+    ( R() );
+  }
+};
+
+template<class R>
+struct
+Segment_Delaunay_graph_Linf_traits_without_intersections_2<R,Euclidean_ring_tag>
+  : public Segment_Delaunay_graph_Linf_traits_base_2<R,Integral_domain_without_division_tag,Tag_false>
+{
+  Segment_Delaunay_graph_Linf_traits_without_intersections_2() {
+    THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
+    ( R() );
+  }
+};
+
+
+// Specialization for filtered_kernel
+template<class R>
+struct
+Segment_Delaunay_graph_Linf_traits_without_intersections_2<Filtered_kernel<R>,
+						      Integral_domain_without_division_tag>
+  : public
+  Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,Integral_domain_without_division_tag,
+					    typename Filtered_kernel<R>::Exact_kernel,
+					    Integral_domain_without_division_tag,
+					    typename Filtered_kernel<R>::Approximate_kernel,
+					    Field_with_sqrt_tag>
+{};
+
+template<class R>
+struct
+Segment_Delaunay_graph_Linf_traits_without_intersections_2<Filtered_kernel<R>,
+						      Field_with_sqrt_tag>
+  : public
+  Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,
+					    Field_with_sqrt_tag,
+					    typename Filtered_kernel<R>::Exact_kernel,
+					    Integral_domain_without_division_tag,
+					    typename Filtered_kernel<R>::Approximate_kernel,
+					    Field_with_sqrt_tag>
+{};
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_TRAITS_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h
new file mode 100644
index 0000000..9077dd0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h
@@ -0,0 +1,507 @@
+// Copyright (c) 2003,2004,2005,2006  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+
+
+#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
+#define CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
+
+#include <map>
+
+#include <boost/random/random_number_generator.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/geometric_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+
+#include <CGAL/Segment_Delaunay_graph_2/basic.h>
+
+#include <CGAL/Segment_Delaunay_graph_2.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/Segment_Delaunay_graph_vertex_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h>
+#include <CGAL/Segment_Delaunay_graph_face_base_2.h>
+
+
+namespace CGAL {
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+// parameterization of the hierarchy
+#ifdef CGAL_SDG_HIERARCHY_DEMO
+const unsigned int sdg_hierarchy_2__ratio    = 3;
+const unsigned int sdg_hierarchy_2__minsize  = 5;
+#else
+const unsigned int sdg_hierarchy_2__ratio    = 30;
+const unsigned int sdg_hierarchy_2__minsize  = 20;
+#endif
+const unsigned int sdg_hierarchy_2__maxlevel = 5;
+// maximal number of points is 30^5 = 24 millions !
+
+//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+template < class Gt,
+	   class ST = Segment_Delaunay_graph_storage_traits_2<Gt>,
+	   class STag = Tag_false,
+	   class D_S = Triangulation_data_structure_2<
+              Segment_Delaunay_graph_hierarchy_vertex_base_2<
+		Segment_Delaunay_graph_vertex_base_2<ST> >,
+              Segment_Delaunay_graph_face_base_2<Gt> >,
+	   class LTag = Tag_false,
+           class SDGLx = Segment_Delaunay_graph_2<Gt,ST,D_S,LTag> >
+class Segment_Delaunay_graph_hierarchy_2
+  : public SDGLx
+{
+protected:
+  typedef Segment_Delaunay_graph_hierarchy_2<Gt,ST,STag,D_S,LTag,SDGLx>  Self;
+
+public:
+  // PUBLIC TYPES
+  //-------------
+  typedef SDGLx    Base;
+
+  typedef typename Base::Geom_traits        Geom_traits;
+  typedef typename Base::Storage_traits     Storage_traits;
+
+  typedef typename Geom_traits::Point_2     Point_2;
+  typedef typename Geom_traits::Site_2      Site_2;
+
+  typedef typename Base::Vertex_handle      Vertex_handle;
+  typedef typename Base::Face_handle        Face_handle;
+  typedef typename Base::Edge               Edge;
+
+  typedef typename Base::Vertex_circulator         Vertex_circulator;
+  typedef typename Base::Edge_circulator           Edge_circulator;
+  typedef typename Base::Face_circulator           Face_circulator;
+
+  typedef typename Base::All_faces_iterator        All_faces_iterator;
+  typedef typename Base::Finite_faces_iterator     Finite_faces_iterator;
+  typedef typename Base::All_vertices_iterator     All_vertices_iterator;
+  typedef typename Base::Finite_vertices_iterator  Finite_vertices_iterator;
+  typedef typename Base::All_edges_iterator        All_edges_iterator;
+  typedef typename Base::Finite_edges_iterator     Finite_edges_iterator;
+
+  typedef typename Base::Input_sites_iterator      Input_sites_iterator;
+  typedef typename Base::Output_sites_iterator     Output_sites_iterator;
+
+  typedef typename Base::Point_handle              Point_handle;
+
+protected:
+  typedef typename Base::Handle_map                Handle_map;
+  typedef typename Base::Point_handle_pair         Point_handle_pair;
+
+  using Base::merge_info;
+  using Base::same_segments;
+  using Base::is_degenerate_segment;
+  using Base::convert_info;
+  using Base::second_endpoint_of_segment;
+  using Base::split_storage_site;
+  using Base::first_endpoint_of_segment;
+  using Base::incircle;
+
+public:
+  using Base::is_infinite;
+
+  typedef typename Base::Point_container           Point_container;
+  typedef typename Base::size_type                 size_type;
+
+  typedef typename Base::Intersections_tag         Intersections_tag;
+
+  typedef STag                            Insert_segments_in_hierarchy_tag;
+  typedef STag                            Segments_in_hierarchy_tag;
+
+protected:
+  // LOCAL TYPES
+  //------------
+  typedef typename Base::Storage_site_2            Storage_site_2;
+  typedef typename Base::List                      List;
+  typedef typename Base::Face_map                  Face_map;
+  typedef typename Base::Vertex_triple             Vertex_triple;
+
+  typedef typename Base::Arrangement_type          Arrangement_type;
+  typedef typename Base::AT2                       AT2;
+
+protected:
+  // LOCAL VARIABLES
+  //----------------
+  static const int UNDEFINED_LEVEL = -1;
+
+  // here is the stack of triangulations which form the hierarchy
+  Base*   hierarchy[sdg_hierarchy_2__maxlevel];
+  boost::rand48  random; // random generator
+public:
+  // CONSTRUCTORS
+  //-------------
+  Segment_Delaunay_graph_hierarchy_2(const Gt& gt = Gt());
+
+  template<class Input_iterator>
+  Segment_Delaunay_graph_hierarchy_2(Input_iterator first,
+				     Input_iterator beyond,
+				     const Gt& gt=Gt())
+    : Base(gt)
+  {
+    init_hierarchy(gt);
+    insert(first, beyond);
+  }
+
+  Segment_Delaunay_graph_hierarchy_2(const Self& sdg);
+  Self& operator=(const Self& sdg);
+
+  // DESTRUCTOR
+  //-----------
+  ~Segment_Delaunay_graph_hierarchy_2();
+
+public:
+  // ACCESS METHODS
+  //---------------
+  const Base& diagram(unsigned int i) const  {
+    CGAL_precondition( i < sdg_hierarchy_2__maxlevel );
+    return *hierarchy[i];
+  }
+
+public:
+  // INSERTION METHODS
+  //------------------
+  template<class Input_iterator>
+  size_type insert(Input_iterator first, Input_iterator beyond) {
+    return insert(first, beyond, Tag_false());
+  }
+
+  template<class Input_iterator>
+  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_true)
+  {
+    std::vector<Site_2> site_vec;
+    for (Input_iterator it = first; it != beyond; ++it) {
+      site_vec.push_back(Site_2(*it));
+    }
+
+    boost::random_number_generator<boost::rand48> rng(random);
+    std::random_shuffle(site_vec.begin(), site_vec.end(),rng);
+    return insert(site_vec.begin(), site_vec.end(), Tag_false());
+  }
+
+  template<class Input_iterator>
+  size_type insert(Input_iterator first, Input_iterator beyond,	Tag_false)
+  {
+    // do it the obvious way: insert them as they come;
+    // one might think though that it might be better to first insert
+    // all end points and then all segments, or a variation of that.
+    size_type n_before = this->number_of_vertices();
+    for (Input_iterator it = first; it != beyond; ++it) {
+      insert(*it);
+    }
+    size_type n_after = this->number_of_vertices();
+    return n_after - n_before;
+  }
+
+  Vertex_handle  insert(const Point_2& p) {
+    Point_handle ph = this->register_input_site(p);
+    Storage_site_2 ss = 
+      this->st_.construct_storage_site_2_object()(ph);
+    return insert_point(p, ss, UNDEFINED_LEVEL);
+  }
+
+  Vertex_handle  insert(const Point_2& p0, const Point_2& p1) {
+    Point_handle_pair php = this->register_input_site(p0,p1);
+    Storage_site_2 ss =
+      this->st_.construct_storage_site_2_object()(php.first, php.second);
+    Vertex_handle v = insert_segment(p0, p1, ss, UNDEFINED_LEVEL);
+    if ( v == Vertex_handle() ) {
+      this->unregister_input_site( php.first, php.second );
+    }
+    return v;
+  }
+
+  Vertex_handle insert(const Vertex_handle& v0, const Vertex_handle& v1) {
+    return hierarchy[0]->insert(v0, v1);
+  }
+
+  Vertex_handle insert(const Point_2& p, Vertex_handle) {
+    return insert(p);
+  }
+
+  Vertex_handle insert(const Point_2& p0, const Point_2& p1,
+		       Vertex_handle) {
+    return insert(p0, p1);
+  }
+
+  Vertex_handle  insert(const Site_2& t) {
+    // the intended use is to unify the calls to insert(...);
+    // thus the site must be an exact one; 
+    CGAL_precondition( t.is_input() );
+
+    if ( t.is_segment() ) {
+      Point_handle_pair php =
+	this->register_input_site(t.source(), t.target());
+      Storage_site_2 ss =
+	this->st_.construct_storage_site_2_object()(php.first, php.second);
+      Vertex_handle v =
+	insert_segment(t.source(), t.target(), ss, UNDEFINED_LEVEL);
+      if ( v == Vertex_handle() ) {
+	this->unregister_input_site( php.first, php.second );
+      }
+      return v;
+    } else if ( t.is_point() ) {
+      Point_handle ph = this->register_input_site( t.point() );
+      Storage_site_2 ss = this->st_.construct_storage_site_2_object()(ph);
+      return insert_point(t.point(), ss, UNDEFINED_LEVEL);
+    } else {
+      CGAL_precondition ( t.is_defined() );
+      return Vertex_handle(); // to avoid compiler error
+    }
+  }
+
+  inline Vertex_handle insert(const Site_2& t, Vertex_handle) {
+    return insert(t);
+  }
+
+  template<class Info_t>
+  inline
+  Vertex_handle insert(const Site_2& t, const Info_t& info)
+  {
+    typedef typename Storage_traits::Info Info;
+    CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal::
+      Check_type_equality_for_info<Info_t, Info>();
+    // the intended use is to unify the calls to insert(...);
+    // thus the site must be an exact one; 
+    CGAL_precondition( t.is_input() );
+
+    if ( t.is_segment() ) {
+      Point_handle_pair php =
+	this->register_input_site(t.source(), t.target());
+      Storage_site_2 ss =
+	this->st_.construct_storage_site_2_object()(php.first, php.second);
+      ss.set_info(info);
+      Vertex_handle v =
+	insert_segment(t.source(), t.target(), ss, UNDEFINED_LEVEL);
+      if ( v == Vertex_handle() ) {
+	this->unregister_input_site( php.first, php.second );
+      }
+      return v;
+    } else if ( t.is_point() ) {
+      Point_handle ph = this->register_input_site( t.point() );
+      Storage_site_2 ss = this->st_.construct_storage_site_2_object()(ph);
+      ss.set_info(info);
+      return insert_point(t.point(), ss, UNDEFINED_LEVEL);
+    } else {
+      CGAL_precondition ( t.is_defined() );
+      return Vertex_handle(); // to avoid compiler error
+    }
+  }
+
+  template<class Info_t>
+  inline
+  Vertex_handle insert(const Site_2& t, const Info_t& info, Vertex_handle)
+  {
+    return insert(t, info);
+  }
+
+protected:
+  Vertex_handle insert_point(const Point_2& p, const Storage_site_2& ss,
+			     int level) {
+    if ( level == UNDEFINED_LEVEL ) {
+      level = random_level();
+    }
+
+    Vertex_handle vertices[sdg_hierarchy_2__maxlevel];
+  
+    insert_point(p, ss, level, vertices);
+
+    return vertices[0];
+  }
+
+  //  std::pair<bool,Vertex_triple>
+  std::pair<bool,int>
+                insert_point(const Point_2& p, const Storage_site_2& ss,
+			     int level, Vertex_handle* vertices);
+
+  void          insert_point(const Site_2& t, const Storage_site_2& ss,
+			     int low, int high, Vertex_handle vbelow,
+			     Vertex_handle* vertices);
+
+  Vertex_handle insert_segment(const Point_2& p0, const Point_2& p1,
+			       const Storage_site_2& ss, int level); 
+
+  Vertex_handle insert_segment_interior(const Site_2& t,
+					const Storage_site_2& ss,
+					const Vertex_handle* vertices0,
+					int level);
+
+  void insert_segment_in_upper_levels(const Site_2& t,
+				      const Storage_site_2& ss,
+				      Vertex_handle vbelow,
+				      const Vertex_handle* vertices0,
+				      int level, Tag_true);
+
+  void insert_segment_in_upper_levels(const Site_2& ,
+				      const Storage_site_2& ,
+				      Vertex_handle ,
+				      const Vertex_handle* ,
+				      int , Tag_false) {}
+
+  Vertex_handle insert_segment_on_point(const Storage_site_2& ss,
+					const Vertex_handle& v,
+					int level, int which);
+
+  template<class Tag>
+  Vertex_handle
+  insert_intersecting_segment_with_tag(const Storage_site_2&,
+				       const Site_2& ,
+				       Vertex_handle ,
+				       int , Tag_false /* itag */, Tag) {
+#if defined(__POWERPC__) && \
+  defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
+    // hack to avoid nasty warning for G++ 3.4 on Darwin
+    static int i;
+#else
+    static int i = 0;
+#endif
+    if ( i == 0 ) {
+      i = 1;
+      print_error_message();
+    }
+    return Vertex_handle();
+  }
+
+  Vertex_handle
+  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				       const Site_2& t,
+				       Vertex_handle v,
+				       int level,
+				       Tag_true itag, Tag_false stag);
+
+  Vertex_handle
+  insert_intersecting_segment_with_tag(const Storage_site_2& ss,
+				       const Site_2& t,
+				       Vertex_handle v,
+				       int level,
+				       Tag_true itag, Tag_true stag);
+
+public:
+  // REMOVAL METHODS
+  //----------------
+  bool remove(const Vertex_handle& v);
+
+public:
+  // NEAREST NEIGHBOR LOCATION
+  //--------------------------
+  Vertex_handle  nearest_neighbor(const Point_2& p,
+				  bool force_point = false) const;
+
+  Vertex_handle  nearest_neighbor(const Point_2& p, Vertex_handle) const
+  {
+    return nearest_neighbor(p);
+  }
+
+protected:
+  void nearest_neighbor(const Site_2& p,
+			Vertex_handle vnear[sdg_hierarchy_2__maxlevel],
+			bool force_point) const; 
+
+public:
+  // MISCELLANEOUS
+  //--------------
+  void init_hierarchy(const Geom_traits& gt);
+
+  void copy(const Segment_Delaunay_graph_hierarchy_2& sdgh);
+
+  void swap(Segment_Delaunay_graph_hierarchy_2& sdgh);
+  void clear();
+
+public:
+  // FILE I/O
+  //---------
+  void file_input(std::istream&);
+  void file_output(std::ostream&) const;
+
+public:
+  // VALIDITY CHECK
+  //---------------
+  bool is_valid(bool verbose = false, int level = 1) const;
+
+protected:
+  // LOCAL HELPER METHODS
+  //---------------------
+  int random_level() {
+    boost::geometric_distribution<> proba(1.0/sdg_hierarchy_2__ratio);
+    boost::variate_generator<boost::rand48&, boost::geometric_distribution<> > die(random, proba);
+
+    return (std::min)(die(), (int)sdg_hierarchy_2__maxlevel)-1;
+  }
+
+  int find_level(Vertex_handle v) const {
+    CGAL_precondition( v != Vertex_handle() );
+    int level = 0;
+    Vertex_handle vertex = v;
+    while ( vertex->up() != Vertex_handle() ) {
+      vertex = vertex->up();
+      level++;
+    }
+
+    return level;
+  }
+
+  Vertex_handle
+  vertex_at_level(const Vertex_handle& v, unsigned int k) const
+  {
+    CGAL_precondition( k <= sdg_hierarchy_2__maxlevel );
+
+    unsigned int level = 0;
+    Vertex_handle v_at_level = v;
+    while ( level < k ) {
+      v_at_level = v_at_level->up();
+      level++;
+    }
+    return v_at_level;
+  }
+
+  void print_error_message() const;
+};
+
+
+
+template<class Gt, class STag, class D_S, class LTag>
+std::istream& operator>>(std::istream& is,
+			 Segment_Delaunay_graph_hierarchy_2<Gt,STag,D_S,LTag>&
+			 sdgh)
+{
+  sdgh.file_input(is);
+  return is;
+}
+
+template<class Gt, class STag, class D_S, class LTag>
+std::ostream& operator<<(std::ostream& os,
+			 const
+			 Segment_Delaunay_graph_hierarchy_2<Gt,STag,D_S,LTag>&
+			 sdgh)
+{
+  sdgh.file_output(os);
+  return os;
+}
+			 
+
+} //namespace CGAL
+
+
+#include <CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h>
+
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_simple_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_simple_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_simple_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_simple_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_tree_d.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_tree_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_tree_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_tree_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Segment_tree_k.h b/3rdparty/CGAL-4.8/include/CGAL/Segment_tree_k.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Segment_tree_k.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Segment_tree_k.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3.h
new file mode 100644
index 0000000..500e577
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+/**
+* \ingroup PkgPointSetShapeDetection3
+* \file CGAL/Shape_detection_3.h
+* Convenience header file including the headers of this package.
+*/
+
+
+#ifndef CGAL_SHAPE_DETECTION_3_H
+#define CGAL_SHAPE_DETECTION_3_H
+
+#include <CGAL/Shape_detection_3/Efficient_RANSAC.h>
+#include <CGAL/Shape_detection_3/Efficient_RANSAC_traits.h>
+#include <CGAL/Shape_detection_3/Plane.h>
+#include <CGAL/Shape_detection_3/Cylinder.h>
+#include <CGAL/Shape_detection_3/Cone.h>
+#include <CGAL/Shape_detection_3/Torus.h>
+#include <CGAL/Shape_detection_3/Sphere.h>
+
+#endif //CGAL_SHAPE_DETECTION_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cone.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cone.h
new file mode 100644
index 0000000..4fac364
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cone.h
@@ -0,0 +1,480 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_CONE_H
+#define CGAL_SHAPE_DETECTION_3_CONE_H
+
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/number_utils.h>
+#include <cmath>
+
+/*!
+ \file Cone.h
+ */
+
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+  /*!
+   \brief Cone implements Shape_base.
+    The cone is represented by its apex, the axis and the opening angle.
+    This representation models an open infinite single-cone.
+    \tparam Traits a model of `EfficientRANSACTraits`
+   \ingroup PkgPointSetShapeDetection3Shapes
+   */
+
+  template <class Traits>
+  class Cone : public Shape_base<Traits> {
+    using Shape_base<Traits>::update_label;
+
+  public:
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Point_map Point_map;
+     ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+     ///< property map to access the unoriented normal of an input point.
+    typedef typename Traits::FT FT; ///< number type.
+    typedef typename Traits::Point_3 Point_3;///< point type.
+    typedef typename Traits::Vector_3 Vector_3;///< vector type.
+    /// \endcond
+
+
+    Cone() : Shape_base<Traits>(), m_wrap(false) {}
+      
+    /*!
+      The opening angle between the axis and the surface of the cone.
+     */
+    FT angle() const {
+        return m_angle;
+    }
+    
+    /*!
+      The apex of the cone.
+     */
+    Point_3 apex() const {
+        return m_apex;
+    }
+    
+    /*!
+      The axis points from the apex into the cone.
+     */
+    Vector_3 axis() const {
+        return m_axis;
+    }
+    
+    /*!
+      Helper function to write apex, axis and angle of the cone and
+      number of assigned points into a string.
+     */
+    /// \cond SKIP_IN_MANUAL
+    std::string info() const {
+        std::stringstream sstr;
+        
+        sstr << "Type: cone apex: (" << this->get_x(m_apex) << ", " << this->get_y(m_apex);
+        sstr << ", " << this->get_z(m_apex) << ") axis: (" << this->get_x(m_axis) << ", ";
+        sstr << this->get_y(m_axis) << ", " << this->get_z(m_axis) << ") angle:" << m_angle;
+        sstr << " #Pts: " << this->m_indices.size();
+        
+        return sstr.str();
+    }
+
+    /*!
+    Computes squared Euclidean distance from query point to the shape.
+    */ 
+    FT squared_distance(const Point_3 &p) const {
+      Vector_3 toApex = this->constr_vec(m_apex, p);
+      FT a = this->sqlen(toApex);
+
+      // projection on axis
+      FT b = this->scalar_pdct(toApex, m_axis);
+
+      // distance to axis
+      if (a - b * b <= 0)
+        return 0;
+
+      FT l = CGAL::sqrt(a - b * b);
+      FT c = m_cos_ang * l;
+      FT d = m_neg_sin_ang * b;
+
+      // far on other side?
+      return (b < 0 && c - d < 0) ? a : CGAL::abs(c + d) * CGAL::abs(c + d);
+    }
+    /// \endcond
+
+  protected:
+      /// \cond SKIP_IN_MANUAL
+    virtual void create_shape(const std::vector<std::size_t> &indices) {
+      Point_3 p1 = this->point(indices[0]);
+      Point_3 p2 = this->point(indices[1]);
+      Point_3 p3 = this->point(indices[2]);
+
+      Vector_3 n1 = this->normal(indices[0]);
+      Vector_3 n2 = this->normal(indices[1]);
+      Vector_3 n3 = this->normal(indices[2]);
+
+      // first calculate intersection of three planes -> apex
+
+      Vector_3 lineDir = this->cross_pdct(n1, n2);
+      FT length = CGAL::sqrt(this->sqlen(lineDir));
+      if (length == 0)
+        return;
+
+      lineDir = this->scale(lineDir, (FT)1.0 / length);
+
+      // lineDir not normalized direction of intersection lines
+      //  of two planes (p1, n1) and (p2, n2)
+      // get point on line by moving point p1 onto line
+      Vector_3 orthLineInPlane = this->cross_pdct(n1, lineDir);
+      length = CGAL::sqrt(this->sqlen(orthLineInPlane));
+      if (length == 0)
+        return;
+
+      orthLineInPlane = this->scale(orthLineInPlane, (FT)1.0 / length);
+
+      // distance of p1 to (p2, n2)
+      FT d = this->scalar_pdct(this->constr_vec(CGAL::ORIGIN, p1), n2)
+        - this->scalar_pdct(this->constr_vec(CGAL::ORIGIN, p2), n2);
+      // projection of orthLineInPlane onto p2
+      FT l = this->scalar_pdct(orthLineInPlane, n2);
+      if (l == 0)
+        return;
+
+      Point_3 pointOnLine = this->transl(
+        p1, this->scale(orthLineInPlane, -d/l));
+
+      // distance of pLineDir to (p3, n3)
+      d = this->scalar_pdct(this->constr_vec(CGAL::ORIGIN, pointOnLine), n3)
+        - this->scalar_pdct(this->constr_vec(CGAL::ORIGIN, p3), n3);
+      l = this->scalar_pdct(lineDir, n3);
+      if (l == 0)
+        return;
+
+      m_apex = this->transl(pointOnLine, this->scale(lineDir, -d/l));
+
+      // 2. find axis
+      Vector_3 v1 = this->constr_vec(m_apex, p1);
+      length = CGAL::sqrt(this->sqlen(v1));
+      if (length == 0)
+        return;
+      v1 = this->scale(v1, (FT)1.0 / length);
+      Point_3 c1 = this->transl(m_apex, v1);
+
+      Vector_3 v2 = this->constr_vec(m_apex, p2);
+      length = CGAL::sqrt(this->sqlen(v2));
+      if (length == 0)
+        return;
+      v2 = this->scale(v2, (FT)1.0 / length);
+      Point_3 c2 = this->transl(m_apex, v2);
+
+      Vector_3 v3 = this->constr_vec(m_apex, p3);
+      length = CGAL::sqrt(this->sqlen(v3));
+      if (length == 0)
+        return;
+      v3 = this->scale(v3, (FT)1.0 / length);
+      Point_3 c3 = this->transl(m_apex, v3);
+
+      m_axis = this->cross_pdct(this->constr_vec(c2, c1), this->constr_vec(c3, c1));
+      m_axis = (this->scalar_pdct(orthLineInPlane, m_axis) < 0) ? 
+        this->scale(m_axis, FT(-1)) : m_axis;
+      length = CGAL::sqrt(this->sqlen(m_axis));
+      if (length == 0)
+        return;
+      m_axis = this->scale(m_axis, (FT)1.0 / length);
+
+      m_angle = acos(this->scalar_pdct(v1, m_axis)) + acos(this->scalar_pdct(v2, m_axis)) + acos(this->scalar_pdct(v3, m_axis));
+      m_angle /= (FT)3.0;
+      if (m_angle < 0 || m_angle > CGAL_PI / (FT)2.12)
+        return;
+
+      m_neg_sin_ang = -sin(m_angle);
+      m_cos_ang = cos(m_angle);
+
+      this->m_is_valid = true;
+    }
+
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &dists) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+          Vector_3 to_apex = this->constr_vec(m_apex, this->point(indices[i]));
+
+          FT a = this->sqlen(to_apex);
+
+          // projection on axis
+          FT b = this->scalar_pdct(to_apex, m_axis);
+
+          // distance to axis
+          FT l = CGAL::sqrt(a - b * b);
+          FT c = m_cos_ang * l;
+          FT d = m_neg_sin_ang * b;
+
+          // far on other side?
+          dists[i] = 
+            (b < 0 && c - d < 0) ? a : CGAL::abs(c + d) * CGAL::abs(c + d);
+        }
+      }
+
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices, 
+                               std::vector<FT> &angles) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+          // construct vector orthogonal to axis in direction of the point
+        Vector_3 a = this->constr_vec(m_apex, this->point(indices[i]));
+
+          Vector_3 b = this->cross_pdct(m_axis, 
+                                         this->cross_pdct(m_axis, a));
+          b = (this->scalar_pdct(a, b) < 0) ? this->scale(b, FT(-1)) : b;
+          FT length = CGAL::sqrt(this->sqlen(b));
+
+          if (length == 0) {
+            angles[i] = (FT)1.0;
+            continue;
+          }
+
+          b = this->scale(b, (FT)1.0 / length);
+          b = this->sum_vectors(
+            this->scale(b, m_cos_ang), 
+            this->scale(m_axis, m_neg_sin_ang));
+
+          angles[i] = CGAL::abs(this->scalar_pdct(this->normal(indices[i]), b));
+        }
+      }
+
+    virtual FT cos_to_normal(const Point_3 &p, const Vector_3 &n) const {
+      // construct vector orthogonal to axis in direction of the point
+      Vector_3 a = this->constr_vec(m_apex, p);
+      Vector_3 b = this->cross_pdct(m_axis, this->cross_pdct(m_axis, a));
+      b = (this->scalar_pdct(a, b) < 0) ? this->scale(b, FT(-1)) : b;
+      FT length = CGAL::sqrt(this->sqlen(b));
+      if (length == 0) {
+        return (FT)1.0;
+      }
+
+      b = this->scale(b, (FT)1.0 / length);
+      b = this->sum_vectors(
+        this->scale(b, m_cos_ang), 
+        this->scale(m_axis, m_neg_sin_ang));
+
+      return CGAL::abs(this->scalar_pdct(n, b));
+    }
+      
+    virtual std::size_t minimum_sample_size() const {
+          return 3;
+      }
+
+    virtual void post_wrap(const std::vector<unsigned int> &bitmap,
+      const std::size_t &u_extent,
+      const std::size_t &v_extent,
+      std::vector<unsigned int> &labels) const {
+      if (!m_wrap)
+        return;
+      // handle top index separately
+      unsigned int nw = bitmap[u_extent - 1];
+      unsigned int l = bitmap[0];
+
+      // Special case v_extent is just 1
+      if (v_extent == 1) {
+        if (nw && nw != l) {
+          l = (std::min<unsigned int>)(nw, l);
+          update_label(labels, (std::max<unsigned int>)(nw, l), l);
+        }
+
+        return;
+      }
+
+      unsigned int w = bitmap[2 * u_extent - 1];
+      unsigned int sw;
+
+      if (l) {
+        if (nw && nw != l) {
+          l = (std::min<unsigned int>)(nw, l);
+          update_label(labels, (std::max<unsigned int>)(nw, l), l);
+        }
+        else if (w && w != l) {
+          l = (std::min<unsigned int>)(w, l);
+          update_label(labels, (std::max<unsigned int>)(w, l), l);
+        }
+      }
+
+      // handle mid indices
+      for (std::size_t y = 1;y<v_extent - 1;y++) {
+        l = bitmap[y * u_extent];
+        if (!l)
+          continue;
+
+        nw = bitmap[y * u_extent - 1];
+        w = bitmap[(y + 1) * u_extent - 1];
+        sw = bitmap[(y + 2) * u_extent - 1];
+
+        if (nw && nw != l) {
+          l = (std::min<unsigned int>)(nw, l);
+          update_label(labels, (std::max<unsigned int>)(nw, l), l);
+        }
+        if (w && w != l) {
+          l = (std::min<unsigned int>)(w, l);
+          update_label(labels, (std::max<unsigned int>)(w, l), l);
+        }
+        else if (sw && sw != l) {
+          l = (std::min<unsigned int>)(sw, l);
+          update_label(labels, (std::max<unsigned int>)(sw, l), l);
+        }
+      }
+
+      // handle last index
+      l = bitmap[(v_extent - 1) * u_extent];
+      if (!l)
+        return;
+
+      nw = bitmap[(v_extent - 1) * u_extent - 1];
+      w = bitmap[u_extent * v_extent - 1];
+
+      if (nw && nw != l) {
+        l = (std::min<unsigned int>)(nw, l);
+        update_label(labels, (std::max<unsigned int>)(nw, l), l);
+      }
+      else if (w && w != l) {
+        l = (std::min<unsigned int>)(w, l);
+        update_label(labels, (std::max<unsigned int>)(w, l), l);
+      }
+    }
+
+    virtual void parameters(const std::vector<std::size_t> &indices,
+      std::vector<std::pair<FT, FT> > &parameterSpace,
+      FT &cluster_epsilon,
+      FT min[2],
+      FT max[2]) const {
+
+      // Create basis d1, d2
+      Vector_3 d1 = this->constr_vec(
+        ORIGIN, this->constr_pt(FT(0), FT(0), FT(1)));
+      Vector_3 d2 = this->cross_pdct(m_axis, d1);
+      FT l = this->sqlen(d2);
+      if (l < (FT)0.0001) {
+        d1 = this->constr_vec(ORIGIN, this->constr_pt(FT(1), FT(0), FT(0)));
+        d2 = this->cross_pdct(m_axis, d1);
+        l = this->sqlen(d2);
+      }
+      d2 = this->scale(d2, FT(1) / CGAL::sqrt(l));
+
+      d1 = this->cross_pdct(m_axis, d2);
+      l = CGAL::sqrt(this->sqlen(d1));
+      if (l == 0)
+        return;
+
+      d1 = this->scale(d1, (FT)1.0 / l);
+
+      if (m_angle > CGAL_M_PI_4) {
+        // Projection onto a disk preserving distance to apex
+
+        m_wrap = false;
+
+        // First index separately to initialize min/max
+        Vector_3 d = this->constr_vec(m_apex, this->point(indices[0]));
+        FT l = this->scalar_pdct(d, m_axis) / m_cos_ang;
+        FT u = this->scalar_pdct(d, d1);
+        FT v = this->scalar_pdct(d, d2);
+        FT l2 = CGAL::sqrt(u * u + v * v);
+        u = u * l/l2;
+        v = v * l/l2;
+        min[0] = max[0] = u;
+        min[1] = max[1] = v;
+        parameterSpace[0] = std::pair<FT, FT>(u, v);
+
+        for (std::size_t i = 1;i<indices.size();i++) {
+          d = this->constr_vec(m_apex, this->point(indices[i]));
+          l = this->scalar_pdct(d, m_axis) / m_cos_ang;
+          u = this->scalar_pdct(d, d1);
+          v = this->scalar_pdct(d, d2);
+          l2 = CGAL::sqrt(u * u + v * v);
+          u = u * l/l2;
+          v = v * l/l2;
+
+          min[0] = (std::min<FT>)(min[0], u);
+          max[0] = (std::max<FT>)(max[0], u);
+
+          min[1] = (std::min<FT>)(min[1], v);
+          max[1] = (std::max<FT>)(max[1], v);
+
+          parameterSpace[i] = std::pair<FT, FT>(u, v);
+        }
+      }
+      else {
+        // Map onto triangle.
+        // u coordinate is arclength
+        // v coordinate is distance to apex
+
+        Vector_3 d = this->constr_vec(m_apex, this->point(indices[0]));
+        FT v = this->scalar_pdct(d, m_axis) / m_cos_ang;
+        FT phi = atan2(this->scalar_pdct(d, d2), this->scalar_pdct(d, d1));
+        FT radPerDist = -m_neg_sin_ang * v;
+        FT u = FT(phi + CGAL_PI);// * radPerDist;
+        FT avg_v = v;
+
+        min[0] = max[0] = u;
+        min[1] = max[1] = v;
+        parameterSpace[0] = std::pair<FT, FT>(u, v);
+        for (std::size_t i = 1;i<indices.size();i++) {
+          d = this->constr_vec(m_apex, this->point(indices[i]));
+          v = this->scalar_pdct(d, m_axis) / m_cos_ang;
+          phi = atan2(this->scalar_pdct(d, d2), this->scalar_pdct(d, d1));
+          radPerDist = -m_neg_sin_ang * v;
+          u = FT(phi + CGAL_PI);// * radPerDist;
+
+          min[0] = (std::min<FT>)(min[0], u);
+          max[0] = (std::max<FT>)(max[0], u);
+
+          min[1] = (std::min<FT>)(min[1], v);
+          max[1] = (std::max<FT>)(max[1], v);
+
+          avg_v += v;
+
+          parameterSpace[i] = std::pair<FT, FT>(u, v);
+        }
+
+        // Scale u parameter by average circumference to arc length
+        avg_v /= indices.size();
+        const FT scale = -m_neg_sin_ang * avg_v;
+
+        m_wrap = (min[0] + 2 * CGAL_PI - max[0]) * scale < cluster_epsilon;
+
+        for (std::size_t i = 0;i<parameterSpace.size();i++) {
+          std::pair<FT, FT> p = parameterSpace[i];
+          parameterSpace[i] = std::pair<FT, FT>(p.first * scale, p.second);
+        }
+
+        min[0] *= scale;
+        max[0] *= scale;
+      }
+    }
+
+    virtual bool supports_connected_component() const {
+      return true;
+    }
+
+  private:
+    FT m_angle;
+    Point_3 m_apex;
+    Vector_3 m_axis;
+    FT m_neg_sin_ang, m_cos_ang;
+    mutable bool m_wrap;
+      /// \endcond
+  };
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cylinder.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cylinder.h
new file mode 100644
index 0000000..c0e7c31
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Cylinder.h
@@ -0,0 +1,399 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_CYLINDER_H
+#define CGAL_SHAPE_DETECTION_3_CYLINDER_H
+
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/number_utils.h>
+#include <cmath>
+
+/*!
+ \file Cylinder.h
+ */
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+    /*!
+     \brief Cylinder implements Shape_base. The cylinder is represented
+     by the axis, i.e. a point and direction, and the radius. The cylinder is
+     unbounded, thus caps are not modelled.
+     \tparam Traits a model of `EfficientRANSACTraits` with the additional 
+             requirement for cylinders (see `EfficientRANSACTraits` documentation).
+     \ingroup PkgPointSetShapeDetection3Shapes
+     */
+  template <class Traits>
+  class Cylinder : public Shape_base<Traits> {
+    using Shape_base<Traits>::update_label;
+
+  public:
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Point_map Point_map;
+     ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+     ///< property map to access the unoriented normal of an input point.
+    typedef typename Traits::Vector_3 Vector_3; ///< vector type.
+    typedef typename Traits::Point_3 Point_3; ///< point type.
+    typedef typename Traits::FT FT; ///< number type.
+    /// \endcond
+
+    typedef typename Traits::Line_3 Line_3; ///< line type.
+
+  public:
+    Cylinder() : Shape_base<Traits>() {}
+
+    /*!
+      Axis of the cylinder.
+     */
+    Line_3 axis() const {
+      return m_axis;
+    }
+
+    /*!
+      Radius of the cylinder.
+     */
+    FT radius() const {
+      return m_radius;
+    }
+
+    /// \cond SKIP_IN_MANUAL
+
+    /*!
+      Helper function to write axis and radius of the cylinder and number of assigned points into a string.
+     */
+    std::string info() const {
+      std::stringstream sstr;
+      Point_3 c = this->constr_point_on(m_axis);
+      Vector_3 a = this->constr_vec(m_axis);
+
+      sstr << "Type: cylinder center: (" << this->get_x(c) << ", " << this->get_y(c) << ", " << this->get_z(c) << ") axis: (" << this->get_x(a) << ", " << this->get_y(a) << ", " << this->get_z(a) << ") radius:" << m_radius
+        << " #Pts: " <<  this->m_indices.size();
+
+      return sstr.str();
+    }
+
+    /*!
+      Computes squared Euclidean distance from query point to the shape.
+      */ 
+    FT squared_distance(const Point_3 &p) const {
+      Vector_3 a = this->constr_vec(m_axis);
+      a = this->scale(a, (FT)1.0 / CGAL::sqrt(this->sqlen(a)));
+
+      Vector_3 v = this->constr_vec(m_point_on_axis, p);
+      v = this->sum_vectors(v, this->scale(a, -this->scalar_pdct(v, a)));
+      FT d = CGAL::sqrt(this->sqlen(v)) - m_radius;
+
+      return d * d;
+    }
+    /// \endcond
+
+  protected:
+      /// \cond SKIP_IN_MANUAL
+    
+    // ------------------------------------------------------------------------
+    // Utilities
+    // ------------------------------------------------------------------------
+    using Shape_base<Traits>::constr_vec;
+    Vector_3 constr_vec(const Line_3& l) const
+    { return this->m_traits.construct_vector_3_object()(l); }
+    Point_3 constr_point_on(const Line_3& l) const
+    { return this->m_traits.construct_point_on_3_object()(l, 0); }
+
+    virtual void create_shape(const std::vector<std::size_t> &indices) {
+      Point_3 p1 = this->point(indices[0]);
+      Point_3 p2 = this->point(indices[1]);
+
+      Vector_3 n1 = this->normal(indices[0]);
+      Vector_3 n2 = this->normal(indices[1]);
+
+      Vector_3 axis = this->cross_pdct(n1, n2);
+      FT axisL = CGAL::sqrt(this->sqlen(axis));
+      if (axisL < (FT)0.0001) {
+        return;
+      }
+      axis = this->scale(axis, FT(1.0) / axisL);
+
+      // establish two directions in the plane axis * x = 0, 
+      // whereas xDir is the projected n1
+      Vector_3 xDir = this->sum_vectors(
+        n1, this->scale(axis, -this->scalar_pdct(n1, axis)));
+      xDir = this->scale(xDir, (FT)1.0 / CGAL::sqrt(this->sqlen(xDir)));
+      Vector_3 yDir = this->cross_pdct(axis, xDir);
+      yDir = this->scale(yDir, (FT)1.0 / CGAL::sqrt(this->sqlen(yDir)));
+
+      FT n2x = this->scalar_pdct(n2, yDir);
+      FT n2y = -this->scalar_pdct(n2, xDir);
+
+      Vector_3 dist = this->constr_vec(p1, p2);
+
+      FT Ox = this->scalar_pdct(xDir, dist);
+      FT Oy = this->scalar_pdct(yDir, dist);
+
+      FT lineDist = n2x * Ox + n2y * Oy;
+
+      m_radius = lineDist / n2x;
+      m_point_on_axis = this->transl(p1, this->scale(xDir, m_radius));
+      m_radius = CGAL::abs(m_radius);
+
+      m_axis = this->m_traits.construct_line_3_object()(m_point_on_axis, axis);
+
+      if (squared_distance(p1) > this->m_epsilon ||
+          (cos_to_normal(p1, n1) < this->m_normal_threshold))
+        return;
+
+      this->m_is_valid = true;
+      this->m_wrap_u = true;
+    }
+
+    virtual void parameters(const std::vector<std::size_t> &indices,
+                            std::vector<std::pair<FT, FT> > &parameterSpace,
+                            FT &cluster_epsilon,
+                            FT min[2],
+                            FT max[2]) const {
+      Vector_3 d1 = this->constr_vec(
+        ORIGIN, this->constr_pt(FT(0), FT(0), FT(1)));
+      Vector_3 a = this->constr_vec(m_axis);
+      a = this->scale(a, (FT)1.0 / CGAL::sqrt(this->sqlen(a)));
+
+      Vector_3 d2 = this->cross_pdct(a, d1);
+      FT l = this->sqlen(d2);
+      if (l < (FT)0.0001) {
+        d1 = this->constr_vec(ORIGIN, this->constr_pt(FT(1), FT(0), FT(0)));
+        d2 = this->cross_pdct(this->constr_vec(m_axis), d1);
+        l = this->sqlen(d2);
+      }
+      d2 = this->scale(d2, FT(1) / CGAL::sqrt(l));
+
+      d1 = this->cross_pdct(this->constr_vec(m_axis), d2);
+      FT length = CGAL::sqrt(this->sqlen(d1));
+      if (length == 0)
+        return;
+
+      d1 = this->scale(d1, (FT)1.0 / length);
+
+      // first one separate for initializing min/max
+      Vector_3 vec = this->constr_vec(m_point_on_axis, this->point(indices[0]));
+      FT v = this->scalar_pdct(vec, a);
+      vec = this->sum_vectors(vec, this->scale(a, -this->scalar_pdct(vec, a)));
+      length = CGAL::sqrt(this->sqlen(vec));
+      vec = this->scale(vec, (FT)1.0 / length);
+
+      FT a1 = this->scalar_pdct(vec, d1);
+      a1 = (a1 < (FT) -1.0) ? (FT) -1.0 : ((a1 > (FT) 1.0) ? (FT) 1.0 : a1);
+      a1 = acos(a1);
+      FT a2 = this->scalar_pdct(vec, d2);
+      a2 = (a2 < (FT) -1.0) ? (FT) -1.0 : ((a2 > (FT) 1.0) ? (FT) 1.0 : a2);
+      a2 = acos(a2);
+
+      FT u = FT((a2 < CGAL_M_PI_2) ? 2 * CGAL_PI - a1 : a1) * m_radius;
+
+      parameterSpace[0] = std::pair<FT, FT>(u, v);
+
+      min[0] = max[0] = u;
+      min[1] = max[1] = v;
+
+      for (std::size_t i = 0;i<indices.size();i++) {
+        vec = this->constr_vec(m_point_on_axis, this->point(indices[i]));
+        v = this->scalar_pdct(vec, a);
+        vec = this->sum_vectors(vec, this->scale(a, -this->scalar_pdct(vec, a)));
+        length = CGAL::sqrt(this->sqlen(vec));
+        vec = this->scale(vec, (FT)1.0 / length);
+
+        a1 = this->scalar_pdct(vec, d1);
+        a1 = (a1 < (FT) -1.0) ? (FT) -1.0 : ((a1 > (FT) 1.0) ? (FT) 1.0 : a1);
+        a1 = acos(a1);
+        a2 = this->scalar_pdct(vec, d2);
+        a2 = (a2 < (FT) -1.0) ? (FT) -1.0 : ((a2 > (FT) 1.0) ? (FT) 1.0 : a2);
+        a2 = acos(a2);
+
+        u = FT((a2 < CGAL_M_PI_2) ? 2 * CGAL_PI - a1 : a1) * m_radius;
+        min[0] = (std::min<FT>)(min[0], u);
+        max[0] = (std::max<FT>)(max[0], u);
+
+        min[1] = (std::min<FT>)(min[1], v);
+        max[1] = (std::max<FT>)(max[1], v);
+
+        parameterSpace[i] = std::pair<FT, FT>(u, v);
+      }
+
+      // Is close to wrapping around?
+      FT diff_to_full_range = min[0] + FT(CGAL_PI * 2.0 * m_radius) - max[0];
+      if (diff_to_full_range < cluster_epsilon) {
+        m_wrap_u = true;
+        FT frac = (max[0] - min[0]) / cluster_epsilon;
+
+        if (frac < 1)
+          return;
+
+        FT trunc = floor(frac);
+        frac = frac - trunc;
+
+        if (frac < (FT) 0.5) {
+          cluster_epsilon = (max[0] - min[0]) / (trunc * FT(0.99999));
+        }
+      }
+      else m_wrap_u = false;
+    }
+    
+    // The u coordinate corresponds to the rotation around the axis and
+    // therefore needs to be wrapped around.
+    virtual void post_wrap(const std::vector<unsigned int> &bitmap,
+      const std::size_t &u_extent,
+      const std::size_t &v_extent,
+      std::vector<unsigned int> &labels) const {
+        if (!m_wrap_u)
+          return;
+
+        // handle top index separately
+        unsigned int nw = bitmap[u_extent - 1];
+        unsigned int l = bitmap[0];
+
+        // Special case v_extent is just 1
+        if (v_extent == 1) {
+          if (nw && nw != l) {
+            l = (std::min<unsigned int>)(nw, l);
+            update_label(labels, (std::max<unsigned int>)(nw, l), l);
+          }
+
+          return;
+        }
+
+        unsigned int w = bitmap[2 * u_extent - 1];
+        unsigned int sw;
+
+        if (l) {
+          if (nw && nw != l) {
+            l = (std::min<unsigned int>)(nw, l);
+            update_label(labels, (std::max<unsigned int>)(nw, l), l);
+          }
+          else if (w && w != l) {
+            l = (std::min<unsigned int>)(w, l);
+            update_label(labels, (std::max<unsigned int>)(w, l), l);
+          }
+        }
+        
+        // handle mid indices
+        for (std::size_t y = 1;y<v_extent - 1;y++) {
+          l = bitmap[y * u_extent];
+          if (!l)
+            continue;
+
+          nw = bitmap[y * u_extent - 1];
+          w = bitmap[(y + 1) * u_extent - 1];
+          sw = bitmap[(y + 2) * u_extent - 1];
+
+          if (nw && nw != l) {
+            l = (std::min<unsigned int>)(nw, l);
+            update_label(labels, (std::max<unsigned int>)(nw, l), l);
+          }
+          if (w && w != l) {
+            l = (std::min<unsigned int>)(w, l);
+            update_label(labels, (std::max<unsigned int>)(w, l), l);
+          }
+          else if (sw && sw != l) {
+            l = (std::min<unsigned int>)(sw, l);
+            update_label(labels, (std::max<unsigned int>)(sw, l), l);
+          }
+        }
+
+        // handle last index
+        l = bitmap[(v_extent - 1) * u_extent];
+        if (!l)
+          return;
+
+        nw = bitmap[(v_extent - 1) * u_extent - 1];
+        w = bitmap[u_extent * v_extent - 1];
+
+        if (nw && nw != l) {
+          l = (std::min<unsigned int>)(nw, l);
+          update_label(labels, (std::max<unsigned int>)(nw, l), l);
+        }
+        else if (w && w != l) {
+          l = (std::min<unsigned int>)(w, l);
+          update_label(labels, (std::max<unsigned int>)(w, l), l);
+        }
+    }
+
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &dists) const {
+      Vector_3 a = this->constr_vec(m_axis);
+      a = this->scale(a, (FT)1.0 / CGAL::sqrt(this->sqlen(a)));
+      for (std::size_t i = 0;i<indices.size();i++) {
+        Vector_3 v = this->constr_vec(m_point_on_axis, this->point(indices[i]));
+
+        v = this->sum_vectors(v, this->scale(a, -this->scalar_pdct(v, a)));
+        dists[i] = CGAL::sqrt(this->sqlen(v)) - m_radius;
+          dists[i] = dists[i] * dists[i];
+        }
+      }
+
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices, 
+                              std::vector<FT> &angles) const {
+      Vector_3 a = this->constr_vec(m_axis);
+      a = this->scale(a, (FT)1.0 / CGAL::sqrt(this->sqlen(a)));
+      for (std::size_t i = 0;i<indices.size();i++) {
+        Vector_3 v = this->constr_vec(m_point_on_axis, this->point(indices[i]));
+
+        v = this->sum_vectors(v, this->scale(a, -this->scalar_pdct(v, a)));
+        FT length = CGAL::sqrt(this->sqlen(v));
+          if (length == 0) {
+            angles[i] = (FT)1.0;
+            continue;
+          }
+        v = this->scale(v, (FT)1.0 / length);
+        angles[i] = CGAL::abs(this->scalar_pdct(v, this->normal(indices[i])));
+      }
+    }
+
+    FT cos_to_normal(const Point_3 &p, const Vector_3 &n) const {
+      Vector_3 a = this->constr_vec(m_axis);
+      a = this->scale(a, (FT)1.0 / CGAL::sqrt(this->sqlen(a)));
+
+      Vector_3 v = this->constr_vec(m_point_on_axis, p);
+      v = this->sum_vectors(v, this->scale(a, -this->scalar_pdct(v, a)));
+
+      FT length = CGAL::sqrt(this->sqlen(v));
+      if (length == 0)
+       return (FT)1.0;
+
+      v = this->scale(v, (FT)1.0 / length);
+      return CGAL::abs(this->scalar_pdct(v, n));
+    }
+
+    virtual std::size_t minimum_sample_size() const {
+      return 2;
+    }
+
+    virtual bool supports_connected_component() const {
+      return true;
+    }
+
+  private:
+    FT m_radius;
+    Line_3 m_axis;
+    Point_3 m_point_on_axis;
+    mutable bool m_wrap_u;
+      
+    /// \endcond
+  };
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC.h
new file mode 100644
index 0000000..634ca2b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC.h
@@ -0,0 +1,912 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_H
+#define CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_H
+
+#include <CGAL/Shape_detection_3/Octree.h>
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/Random.h>
+
+//for octree ------------------------------
+#include <boost/iterator/filter_iterator.hpp>
+#include <CGAL/bounding_box.h>
+#include <CGAL/Iterator_range.h>
+//----------
+
+#include <vector>
+#include <cmath>
+#include <limits>
+#include <fstream>
+#include <sstream>
+
+//boost --------------
+#include <boost/iterator/counting_iterator.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+//---------------------
+
+
+/*! 
+  \file Efficient_RANSAC.h
+*/
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+
+/*!
+\ingroup PkgPointSetShapeDetection3
+\brief A shape detection algorithm using a RANSAC method.
+
+Given a point set in 3D space with unoriented normals, sampled on surfaces,
+this class enables to detect subsets of connected points lying on the surface of primitive shapes.
+Each input point is assigned to either none or at most one detected primitive
+shape. The implementation follows \cgalCite{schnabel2007efficient}.
+
+\tparam Traits a model of `EfficientRANSACTraits`
+
+*/
+  template <class Traits>
+  class Efficient_RANSAC {
+  public:
+
+    /// \cond SKIP_IN_MANUAL
+    struct Filter_unassigned_points {
+      Filter_unassigned_points() : m_shape_index(dummy) {}
+      Filter_unassigned_points(const std::vector<int> &shapeIndex)
+        : m_shape_index(shapeIndex) {}
+
+      bool operator()(std::size_t x) {
+        if (x < m_shape_index.size())
+          return m_shape_index[x] == -1;
+        else return true; // to prevent infinite incrementing
+      }
+      const std::vector<int>&  m_shape_index;
+      std::vector<int> dummy;
+    };
+
+    typedef boost::filter_iterator<Filter_unassigned_points,
+      boost::counting_iterator<std::size_t> > Point_index_iterator;
+    ///< iterator for indices of points.
+    /// \endcond
+
+    /// \name Types 
+    /// @{
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Input_range::iterator Input_iterator;
+    typedef typename Traits::FT FT; ///< number type.
+    typedef typename Traits::Point_3 Point; ///< point type.
+    typedef typename Traits::Vector_3 Vector; ///< vector type.
+    /// \endcond
+
+    typedef typename Traits::Input_range Input_range;
+    ///< Model of the concept `Range` with random access iterators, providing input points and normals
+    /// through the following two property maps.
+
+    typedef typename Traits::Point_map Point_map;
+    ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+    ///< property map to access the unoriented normal of an input point
+    typedef Shape_base<Traits> Shape; ///< shape type.
+
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Shape_range;
+#else
+    struct Shape_range : public Iterator_range<
+      typename std::vector<boost::shared_ptr<Shape> >::const_iterator> {
+      typedef Iterator_range<
+        typename std::vector<boost::shared_ptr<Shape> >::const_iterator> Base;
+
+      Shape_range(boost::shared_ptr<std::vector<boost::shared_ptr<Shape> > >
+        extracted_shapes) : Base(make_range(extracted_shapes->begin(),
+        extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {}
+    private:
+      boost::shared_ptr<std::vector<boost::shared_ptr<Shape> > >
+        m_extracted_shapes; // keeps a reference to the shape vector
+    };
+#endif
+    ///< An `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr<Shape>`.
+
+
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Point_index_range;
+    ///< An `Iterator_range` with a bidirectional iterator with value type `std::size_t`
+    ///  as indices into the input data that has not been assigned to a shape.
+    ///  As this range class has no `size()` method, the method 
+    ///  `Efficient_RANSAC::number_of_unassigned_points()` is provided.
+#else 
+    typedef Iterator_range<Point_index_iterator>
+      Point_index_range;
+#endif     
+
+    /// @}
+    
+    /// \name Parameters 
+    /// @{
+      /*!
+       %Parameters for the shape detection algorithm. They are explained in detail 
+       in Section \ref Point_set_shape_detection_3Parameters  of the User Manual.
+       */
+    struct Parameters {
+      Parameters()
+        : probability((FT) 0.01)
+        , min_points((std::numeric_limits<std::size_t>::max)())
+        , epsilon(-1)
+        , normal_threshold((FT) 0.9)
+        , cluster_epsilon(-1)
+      {}
+
+      FT probability;         ///< Probability to control search endurance. %Default value: 5%.
+      std::size_t min_points; ///< Minimum number of points of a shape. %Default value: 1% of total number of input points.
+      FT epsilon;             ///< Maximum tolerance Euclidian distance from a point and a shape. %Default value: 1% of bounding box diagonal.
+      FT normal_threshold;	  ///< Maximum tolerance normal deviation from a point's normal to the normal on shape at projected point. %Default value: 0.9 (around 25 degrees).
+      FT cluster_epsilon;	    ///< Maximum distance between points to be considered connected. %Default value: 1% of bounding box diagonal.
+    };
+    /// @}
+
+  private:
+    typedef internal::Octree<internal::DirectPointAccessor<Traits> >
+      Direct_octree;
+    typedef internal::Octree<internal::IndexedPointAccessor<Traits> >
+      Indexed_octree;
+    //--------------------------------------------typedef
+
+    // Creates a function pointer for instancing shape instances.
+    template <class ShapeT>
+    static Shape *factory() {
+      return new ShapeT;
+    }
+
+  public:
+
+  /// \name Initialization
+  /// @{
+
+    /*! 
+      Constructs an empty shape detection engine.
+    */ 
+    Efficient_RANSAC(Traits t = Traits())
+      : m_traits(t)
+      , m_direct_octrees(NULL)
+      , m_global_octree(NULL)
+      , m_num_subsets(0)
+      , m_num_available_points(0)
+      , m_num_total_points(0)
+      , m_valid_iterators(false)
+    {}
+
+    /*! 
+      Releases all memory allocated by this instances including shapes.
+    */ 
+    ~Efficient_RANSAC() {
+      clear();
+    }
+
+    /*!
+      Retrieves the traits class.
+     */
+    const Traits&
+    traits() const
+    {
+      return m_traits;
+    }
+
+    /*!
+      Sets the input data. The range must stay valid
+      until the detection has been performed and the access to the
+      results is no longer required. The data in the input is reordered by the methods
+      `detect()` and `preprocess()`. This function first calls `clear()`.
+    */
+    void set_input(
+      Input_range& input_range,
+      ///< range of input data.
+      Point_map point_map = Point_map(),
+      ///< property map to access the position of an input point.
+      Normal_map normal_map = Normal_map()
+      ///< property map to access the normal of an input point.
+      ) {
+        m_point_pmap = point_map;
+        m_normal_pmap = normal_map;
+
+        m_input_iterator_first = input_range.begin();
+        m_input_iterator_beyond = input_range.end();
+
+        clear();
+
+        m_extracted_shapes = 
+          boost::make_shared<std::vector<boost::shared_ptr<Shape> > >();
+
+        m_num_available_points = m_num_total_points = std::distance(
+          m_input_iterator_first, m_input_iterator_beyond);
+
+        m_valid_iterators = true;
+    }
+    /*!
+      Registers in the detection engine the shape type `ShapeType` that must inherit from `Shape_base`.
+      For example, for registering a plane as detectable shape you should call
+      `ransac.add_shape_factory< Shape_detection_3::Plane<Traits> >();`. Note
+      that if your call is within a template, you should add the `template`
+      keyword just before `add_shape_factory`: 
+      `ransac.template add_shape_factory< Shape_detection_3::Plane<Traits> >();`.
+    */ 
+    template <class Shape_type>
+    void add_shape_factory() {
+      m_shape_factories.push_back(factory<Shape_type>);
+    }
+
+    /*!
+      Constructs internal data structures required for the shape detection.
+      These structures only depend on the input data, i.e. the points and
+      normal vectors. This method is called by `detect()`, if it was not called
+      before by the user.
+    */ 
+    bool preprocess() {
+      if (m_num_total_points == 0)
+        return false;
+
+      // Generation of subsets
+      m_num_subsets = (std::size_t)(std::max<std::ptrdiff_t>)((std::ptrdiff_t)
+        std::floor(std::log(double(m_num_total_points))/std::log(2.))-9, 2);
+
+      // SUBSET GENERATION ->
+      // approach with increasing subset sizes -> replace with octree later on
+      Input_iterator last = m_input_iterator_beyond - 1;
+      std::size_t remainingPoints = m_num_total_points;
+
+      m_available_octree_sizes.resize(m_num_subsets);
+      m_direct_octrees = new Direct_octree *[m_num_subsets];
+      for (int s = int(m_num_subsets) - 1;s >= 0;--s) {
+        std::size_t subsetSize = remainingPoints;
+        std::vector<std::size_t> indices(subsetSize);
+        if (s) {
+          subsetSize >>= 1;
+          for (std::size_t i = 0;i<subsetSize;i++) {
+            std::size_t index = default_random(2);
+            index = index + (i<<1);
+            index = (index >= remainingPoints) ? remainingPoints - 1 : index;
+            indices[i] = index;
+          }
+
+          // move points to the end of the point vector
+          std::size_t j = subsetSize;
+          do {
+            j--;
+            typename std::iterator_traits<Input_iterator>::value_type
+              tmp = (*last);
+            *last = m_input_iterator_first[indices[std::size_t(j)]];
+            m_input_iterator_first[indices[std::size_t(j)]] = tmp;
+            last--;
+          } while (j > 0);
+          m_direct_octrees[s] = new Direct_octree(
+            m_traits, last + 1,
+            last + subsetSize + 1,
+            m_point_pmap, m_normal_pmap,
+            remainingPoints - subsetSize);
+        }
+        else
+          m_direct_octrees[0] = new Direct_octree(
+            m_traits, m_input_iterator_first,
+            m_input_iterator_first + (subsetSize),
+            m_point_pmap, m_normal_pmap,
+          0);
+
+        m_available_octree_sizes[s] = subsetSize;
+        m_direct_octrees[s]->createTree();
+
+        remainingPoints -= subsetSize;
+      }
+
+      m_global_octree = new Indexed_octree(
+        m_traits, m_input_iterator_first, m_input_iterator_beyond,
+        m_point_pmap, m_normal_pmap);
+      m_global_octree->createTree();
+
+      return true;
+    }
+
+    /// @}
+
+    /// \name Memory Management
+    /// @{
+    /*!
+      Removes all shape types registered for detection.
+     */ 
+    void clear_shape_factories() {
+      m_shape_factories.clear();
+    }
+
+    /*!
+      Frees memory allocated for the internal search structures but keeps the detected shapes.
+      It invalidates the range retrieved using `unassigned_points()`.
+     */ 
+    void clear_octrees() {
+      // If there is no data yet, there are no data structures.
+      if (!m_valid_iterators)
+        return;
+
+      if (m_global_octree) {
+        delete m_global_octree;
+        m_global_octree = NULL;
+      }
+
+      if (m_direct_octrees) {
+        for (std::size_t i = 0;i<m_num_subsets;i++) 
+          delete m_direct_octrees[i];
+        delete [] m_direct_octrees;
+
+        m_direct_octrees = NULL;
+      }
+
+      m_num_subsets = 0;
+    }
+
+    /*!
+      Calls `clear_octrees()` and removes all detected shapes.
+      All internal structures are cleaned, including formerly detected shapes.
+      Thus iterators and ranges retrieved through `shapes()` and `indices_of_unassigned_points()` 
+      are invalidated.
+    */ 
+    void clear() {
+      // If there is no data yet, there are no data structures.
+      if (!m_valid_iterators)
+        return;
+
+      std::vector<int>().swap(m_shape_index);
+
+      m_extracted_shapes = 
+        boost::make_shared<std::vector<boost::shared_ptr<Shape> > >();
+      
+      m_num_available_points = m_num_total_points;
+
+      clear_octrees();
+    }
+    /// @}
+
+    /// \name Detection 
+    /// @{
+    /*! 
+      Performs the shape detection. Shape types considered during the detection
+      are those registered using `add_shape_factory()`.
+
+      \return `true` if shape types have been registered and
+              input data has been set. Otherwise, `false` is returned.
+    */ 
+    bool detect(
+      const Parameters &options = Parameters()
+      ///< %Parameters for shape detection.
+                ) {
+      // No shape types for detection or no points provided, exit
+      if (m_shape_factories.size() == 0 ||
+          (m_input_iterator_beyond - m_input_iterator_first) == 0)
+        return false;
+
+      if (m_num_subsets == 0 || m_global_octree == 0) {
+        if (!preprocess())
+          return false;
+      }
+
+      // Reset data structures possibly used by former search
+      m_extracted_shapes = 
+        boost::make_shared<std::vector<boost::shared_ptr<Shape> > >();
+      m_num_available_points = m_num_total_points;
+
+      for (std::size_t i = 0;i<m_num_subsets;i++) {
+        m_available_octree_sizes[i] = m_direct_octrees[i]->size();
+      }
+
+      // Use bounding box diagonal as reference for default values
+      Bbox_3 bbox = m_global_octree->boundingBox();
+      FT bbox_diagonal = (FT) CGAL::sqrt(
+          (bbox.xmax() - bbox.xmin()) * (bbox.xmax() - bbox.xmin())
+        + (bbox.ymax() - bbox.ymin()) * (bbox.ymax() - bbox.ymin()) 
+        + (bbox.zmax() - bbox.zmin()) * (bbox.zmax() - bbox.zmin()));
+
+      m_options = options;
+
+      // Epsilon or cluster_epsilon have been set by the user?
+      // If not, derive from bounding box diagonal
+      m_options.epsilon = (m_options.epsilon < 0)
+        ? bbox_diagonal * (FT) 0.01 : m_options.epsilon;
+
+      m_options.cluster_epsilon = (m_options.cluster_epsilon < 0) 
+        ? bbox_diagonal * (FT) 0.01 : m_options.cluster_epsilon;
+
+      // Minimum number of points has been set?
+      m_options.min_points = 
+        (m_options.min_points >= m_num_available_points) ? 
+          (std::size_t)((FT)0.01 * m_num_available_points) : 
+          m_options.min_points;
+      m_options.min_points = (m_options.min_points < 10) ? 10 : m_options.min_points;
+      
+      // Initializing the shape index
+      m_shape_index.assign(m_num_available_points, -1);
+
+      // List of all randomly drawn candidates
+      // with the minimum number of points
+      std::vector<Shape *> candidates;
+
+      // Identifying minimum number of samples
+      std::size_t required_samples = 0;
+      for (std::size_t i = 0;i<m_shape_factories.size();i++) {
+        Shape *tmp = (Shape *) m_shape_factories[i]();
+        required_samples = (std::max<std::size_t>)(required_samples, tmp->minimum_sample_size());
+        delete tmp;
+      }
+
+      std::size_t first_sample; // first sample for RANSAC
+
+      FT best_expected = 0;
+
+      // number of points that have been assigned to a shape
+      std::size_t num_invalid = 0;
+
+      std::size_t generated_candidates = 0;
+      std::size_t failed_candidates = 0;
+      bool force_exit = false;
+      bool keep_searching = true;
+      
+      do { // main loop
+        best_expected = 0;
+
+        if (keep_searching)
+          do {
+            // Generate candidates
+            //1. pick a point p1 randomly among available points
+            std::set<std::size_t> indices;
+            bool done = false;
+            do {
+              do 
+              first_sample = default_random(m_num_available_points);
+              while (m_shape_index[first_sample] != -1);
+
+              done = m_global_octree->drawSamplesFromCellContainingPoint(
+                get(m_point_pmap, 
+                *(m_input_iterator_first + first_sample)),
+                select_random_octree_level(),
+                indices,
+                m_shape_index,
+                required_samples);
+
+            } while (m_shape_index[first_sample] != -1 || !done);
+
+            generated_candidates++;
+
+            //add candidate for each type of primitives
+            for(typename std::vector<Shape *(*)()>::iterator it =
+              m_shape_factories.begin(); it != m_shape_factories.end(); it++)	{
+                Shape *p = (Shape *) (*it)();
+                //compute the primitive and says if the candidate is valid
+                p->compute(indices,
+                  m_input_iterator_first,
+                  m_traits,
+                  m_point_pmap,
+                  m_normal_pmap,
+                  m_options.epsilon, 
+                  m_options.normal_threshold);
+
+                if (p->is_valid()) {
+                  improve_bound(p, m_num_available_points - num_invalid, 1, 500);
+
+                  //evaluate the candidate
+                  if(p->max_bound() >= m_options.min_points && p->score() > 0) {
+                    if (best_expected < p->expected_value())
+                      best_expected = p->expected_value();
+
+                    candidates.push_back(p);
+                  }
+                  else {
+                    failed_candidates++;
+                    delete p;
+                  }        
+                }
+                else {
+                  failed_candidates++;
+                  delete p;
+                }
+            }
+
+            if (failed_candidates >= 10000)
+              force_exit = true;
+            
+            keep_searching = (stop_probability(m_options.min_points,
+              m_num_available_points - num_invalid, 
+              generated_candidates, m_global_octree->maxLevel())
+                    > m_options.probability);
+        } while( !force_exit
+          && stop_probability((std::size_t) best_expected,
+                             m_num_available_points - num_invalid, 
+                             generated_candidates,
+                             m_global_octree->maxLevel()) 
+                > m_options.probability
+          && keep_searching);
+        // end of generate candidate
+
+        if (force_exit) {
+          break;
+        }
+
+        if (candidates.empty())
+          continue;
+
+        // Now get the best candidate in the current set of all candidates
+        // Note that the function sorts the candidates:
+        //  the best candidate is always the last element of the vector
+        
+        Shape *best_candidate = 
+          get_best_candidate(candidates, m_num_available_points - num_invalid);
+
+        // If search is done and the best candidate is too small, we are done.
+        if (!keep_searching && best_candidate->m_score < m_options.min_points)
+          break;
+
+        if (!best_candidate)
+          continue;
+
+        best_candidate->m_indices.clear();
+
+        best_candidate->m_score = 
+          m_global_octree->score(best_candidate,
+                                 m_shape_index,
+                                 FT(3) * m_options.epsilon,
+                                 m_options.normal_threshold);
+
+        best_expected = static_cast<FT>(best_candidate->m_score);
+
+        best_candidate->connected_component(best_candidate->m_indices,
+                                            m_options.cluster_epsilon);
+        
+        // check score against min_points and clear out candidates if too low
+        if (best_candidate->indices_of_assigned_points().size() <
+          m_options.min_points) 
+        {
+          for (std::size_t i = 0;i < candidates.size() - 1;i++) {
+            if (best_candidate->is_same(candidates[i])) {
+              delete candidates[i];
+              candidates[i] = NULL;
+            }
+          }
+
+          candidates.back() = NULL;
+          delete best_candidate;
+          best_candidate = NULL;
+
+          // Trimming candidates list
+          std::size_t empty = 0, occupied = 0;
+          while (empty < candidates.size()) {
+            while (empty < candidates.size() && candidates[empty]) empty++;
+
+            if (empty >= candidates.size())
+              break;
+
+            if (occupied < empty)
+              occupied = empty + 1;
+
+            while (occupied < candidates.size() && !candidates[occupied])
+              occupied++;
+
+            if (occupied >= candidates.size())
+              break;
+            candidates[empty] = candidates[occupied];
+            candidates[occupied] = NULL;
+            empty++;
+            occupied++;
+          }
+
+          candidates.resize(empty);
+        }
+        else
+          if (stop_probability((std::size_t) best_candidate->expected_value(),
+                            (m_num_available_points - num_invalid),
+                            generated_candidates,
+                            m_global_octree->maxLevel())
+                <= m_options.probability) {
+
+            // Remove candidate from list
+            candidates.back() = NULL;
+
+            //1. add best candidate to final result.
+            m_extracted_shapes->push_back(
+                                    boost::shared_ptr<Shape>(best_candidate));
+
+            //2. remove the points
+            const std::vector<std::size_t> &indices_points_best_candidate =
+              best_candidate->indices_of_assigned_points();
+
+            for (std::size_t i = 0;i<indices_points_best_candidate.size();i++) {
+              m_shape_index[indices_points_best_candidate.at(i)] =
+                int(m_extracted_shapes->size()) - 1;
+
+              num_invalid++;
+              
+              for (std::size_t j = 0;j<m_num_subsets;j++) {
+                if (m_direct_octrees[j] && m_direct_octrees[j]->m_root) {
+                  std::size_t offset = m_direct_octrees[j]->offset();
+
+                  if (offset <= indices_points_best_candidate.at(i) &&
+                      (indices_points_best_candidate.at(i) - offset) 
+                      < m_direct_octrees[j]->size()) {
+                    m_available_octree_sizes[j]--;
+                  }
+                }
+              }
+            }
+
+            //2.3 Remove the points from the subtrees        
+
+            generated_candidates--;
+            failed_candidates = 0;
+            best_expected = 0;
+
+            std::vector<std::size_t> subset_sizes(m_num_subsets);
+            subset_sizes[0] = m_available_octree_sizes[0];
+            for (std::size_t i = 1;i<m_num_subsets;i++) {
+              subset_sizes[i] = subset_sizes[i-1] + m_available_octree_sizes[i];
+            }
+  
+  
+            //3. Remove points from candidates common with extracted primitive
+            //#pragma omp parallel for
+            best_expected = 0;
+            for (std::size_t i=0;i< candidates.size()-1;i++) {
+              if (candidates[i]) {
+                candidates[i]->update_points(m_shape_index);
+                candidates[i]->compute_bound(
+                  subset_sizes[candidates[i]->m_nb_subset_used - 1],
+                  m_num_available_points - num_invalid);
+  
+                if (candidates[i]->max_bound() < m_options.min_points) {
+                  delete candidates[i];
+                  candidates[i] = NULL;
+                }
+                else {
+                  best_expected = (candidates[i]->expected_value() > best_expected) ?
+                    candidates[i]->expected_value() : best_expected;
+                }
+              }
+            }
+  
+            std::size_t start = 0, end = candidates.size() - 1;
+            while (start < end) {
+              while (candidates[start] && start < end) start++;
+              while (!candidates[end] && start < end) end--;
+              if (!candidates[start] && candidates[end] && start < end) {
+                candidates[start] = candidates[end];
+                candidates[end] = NULL;
+                start++;
+                end--;
+              }
+            }
+  
+            if (candidates[end]) end++;
+  
+            candidates.resize(end);
+          }
+        keep_searching = (stop_probability(m_options.min_points,
+            m_num_available_points - num_invalid,
+            generated_candidates, 
+            m_global_octree->maxLevel())
+              > m_options.probability);
+      }
+      while((keep_searching
+        && FT(m_num_available_points - num_invalid) >= m_options.min_points)
+        || best_expected >= m_options.min_points);
+
+      // Clean up remaining candidates.
+      for (std::size_t i = 0;i<candidates.size();i++)
+        delete candidates[i];
+
+      candidates.resize(0);
+
+      m_num_available_points -= num_invalid;
+ 
+      return true;
+    }
+
+    /// @}
+
+    /// \name Access
+    /// @{            
+    /*!
+      Returns an `Iterator_range` with a bidirectional iterator with value type
+      `boost::shared_ptr<Shape>` over the detected shapes in the order of detection.
+      Depending on the chosen probability
+      for the detection, the shapes are ordered with decreasing size.
+    */
+    Shape_range shapes() const {
+      return Shape_range(m_extracted_shapes);
+    }
+      
+    /*! 
+      Number of points not assigned to a shape.
+    */ 
+    std::size_t number_of_unassigned_points() {
+      return m_num_available_points;
+    }
+    
+    /*! 
+      Returns an `Iterator_range` with a bidirectional iterator with value type `std::size_t`
+      as indices into the input data that has not been assigned to a shape. 
+    */ 
+    Point_index_range indices_of_unassigned_points() {
+      Filter_unassigned_points fup(m_shape_index);
+
+      Point_index_iterator p1 =
+        boost::make_filter_iterator<Filter_unassigned_points>(
+        fup,
+        boost::counting_iterator<std::size_t>(0),
+        boost::counting_iterator<std::size_t>(m_shape_index.size()));
+
+      return make_range(p1, Point_index_iterator(p1.end()));
+    }
+    /// @}
+
+  private:
+    int select_random_octree_level() {
+      return (int) default_random(m_global_octree->maxLevel() + 1);
+    }
+
+    Shape* get_best_candidate(std::vector<Shape* >& candidates,
+                            const std::size_t num_available_points) {
+      if (candidates.size() == 1)
+        return candidates.back();
+
+      int index_worse_candidate = 0;
+      bool improved = true;
+
+      while (index_worse_candidate < (int)candidates.size() - 1 && improved) {
+        improved = false;
+
+        typename Shape::Compare_by_max_bound comp;
+
+        std::sort(candidates.begin() + index_worse_candidate,
+                  candidates.end(),
+                  comp);
+
+        //refine the best one 
+        improve_bound(candidates.back(),
+                     num_available_points, m_num_subsets,
+                     m_options.min_points);
+
+        int position_stop;
+
+        //Take all those intersecting the best one, check for equal ones
+        for (position_stop = int(candidates.size()) - 1;
+             position_stop > index_worse_candidate;
+             position_stop--) {
+          if (candidates.back()->min_bound() >
+            candidates.at(position_stop)->max_bound())
+            break;//the intervals do not overlaps anymore
+
+          if (candidates.at(position_stop)->max_bound()
+              <= m_options.min_points)
+            break;  //the following candidate doesnt have enough points!
+
+          //if we reach this point, there is an overlap
+          //  between best one and position_stop
+          //so request refining bound on position_stop
+          improved |= improve_bound(candidates.at(position_stop),
+                                   num_available_points,
+                                   m_num_subsets,
+                                   m_options.min_points);
+
+          //test again after refined
+          if (candidates.back()->min_bound() >
+            candidates.at(position_stop)->max_bound()) 
+            break;//the intervals do not overlaps anymore
+        }
+
+        index_worse_candidate = position_stop;
+      }
+
+      return candidates.back();
+    }
+
+    bool improve_bound(Shape *candidate,
+                      std::size_t num_available_points,
+                      std::size_t max_subset,
+                      std::size_t min_points) {
+      if (candidate->m_nb_subset_used >= max_subset)
+        return false;
+
+      if (candidate->m_nb_subset_used >= m_num_subsets)
+        return false;
+
+      candidate->m_nb_subset_used =
+        (candidate->m_nb_subset_used >= m_num_subsets) ? 
+        m_num_subsets - 1 : candidate->m_nb_subset_used;
+
+      //what it does is add another subset and recompute lower and upper bound
+      //the next subset to include is provided by m_nb_subset_used
+
+      std::size_t num_points_evaluated = 0;
+      for (std::size_t i=0;i<candidate->m_nb_subset_used;i++)
+        num_points_evaluated += m_available_octree_sizes[i];
+
+      // need score of new subset as well as sum of
+      // the score of the previous considered subset
+      std::size_t new_score = 0;
+      std::size_t new_sampled_points = 0;
+
+      do {
+        new_score = m_direct_octrees[candidate->m_nb_subset_used]->score(
+          candidate, 
+          m_shape_index, 
+          m_options.epsilon,
+          m_options.normal_threshold);
+
+        candidate->m_score += new_score;
+        
+        num_points_evaluated += 
+          m_available_octree_sizes[candidate->m_nb_subset_used];
+
+        new_sampled_points +=
+          m_available_octree_sizes[candidate->m_nb_subset_used];
+
+        candidate->m_nb_subset_used++;
+      } while (new_sampled_points < min_points &&
+        candidate->m_nb_subset_used < m_num_subsets);
+
+      candidate->m_score = candidate->m_indices.size();
+
+      candidate->compute_bound(num_points_evaluated, num_available_points);
+
+      return true;
+    }
+    
+    inline FT stop_probability(std::size_t largest_candidate, std::size_t num_pts, std::size_t num_candidates, std::size_t octree_depth) const {
+      return (std::min<FT>)(std::pow((FT) 1.f - (FT) largest_candidate / FT(num_pts * octree_depth * 4), (int) num_candidates), (FT) 1);
+    }
+    
+  private:
+    Parameters m_options;
+
+    // Traits class.
+    Traits m_traits;
+
+    // Octrees build on input data for quick shape evaluation and
+    // sample selection within an octree cell.
+    Direct_octree **m_direct_octrees;
+    Indexed_octree *m_global_octree;
+    std::vector<std::size_t> m_available_octree_sizes;
+    std::size_t m_num_subsets;
+
+    // maps index into points to assigned extracted primitive
+    std::vector<int> m_shape_index;
+    std::size_t m_num_available_points; 
+    std::size_t m_num_total_points;
+
+    //give the index of the subset of point i
+    std::vector<int> m_index_subsets;
+
+    boost::shared_ptr<std::vector<boost::shared_ptr<Shape> > > m_extracted_shapes;
+
+    std::vector<Shape *(*)()> m_shape_factories;
+
+    // iterators of input data
+    bool m_valid_iterators;
+    Input_iterator m_input_iterator_first, m_input_iterator_beyond; 
+    Point_map m_point_pmap;
+    Normal_map m_normal_pmap;
+  };
+}
+}
+
+#endif // CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h
new file mode 100644
index 0000000..1f12816
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h
@@ -0,0 +1,185 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_TRAITS_H
+#define CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_TRAITS_H
+
+#include <CGAL/Search_traits_3.h>
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+    /*!
+      \ingroup PkgPointSetShapeDetection3
+      \brief %Default traits class to use the shape detection class `Efficient_RANSAC`.
+      \cgalModels `EfficientRANSACTraits`
+
+      \tparam Gt a model of the concept `#Kernel` with `Gt::FT` being `float` or `double`.
+
+      \tparam InputRange is a model of `Range` with random access iterators, 
+              providing input points and normals through the following two property maps.
+
+      \tparam InputPointMap is a model of `ReadablePropertyMap` with `std::iterator_traits<Input_range::iterator>::%value_type` as key type and `Geom_traits::Point_3` as value type.
+
+
+      \tparam InputNormalMap is a model of `ReadablePropertyMap` with `std::iterator_traits<Input_range::iterator>::%value_type` as key type and `Geom_traits::Vector_3` as value type.
+    */
+  template <class Gt,
+            class InputRange,
+            class InputPointMap,
+            class InputNormalMap>
+  struct Efficient_RANSAC_traits {
+    ///
+    typedef typename Gt::FT FT;
+    ///
+    typedef typename Gt::Point_3 Point_3;
+    ///
+    typedef typename Gt::Vector_3 Vector_3;
+    ///
+    typedef typename Gt::Sphere_3 Sphere_3;
+    ///
+    typedef typename Gt::Line_3 Line_3;
+    ///
+    typedef typename Gt::Circle_2 Circle_2;
+    ///
+    typedef typename Gt::Plane_3 Plane_3;
+    ///
+    typedef typename Gt::Point_2 Point_2;
+    ///
+    typedef typename Gt::Vector_2 Vector_2;
+    ///
+    typedef InputRange Input_range;
+    ///
+    typedef InputPointMap Point_map;
+    ///
+    typedef InputNormalMap Normal_map;
+    ///
+    typedef CGAL::Search_traits_3<Gt> Search_traits;
+    ///
+    Efficient_RANSAC_traits(const Gt& gt =  Gt())
+      : m_gt(gt) {}
+
+    typedef typename Gt::Construct_point_3 Construct_point_3;
+    Construct_point_3 construct_point_3_object() const 
+    { return m_gt.construct_point_3_object(); }
+
+    typedef typename Gt::Construct_vector_3 Construct_vector_3;
+    Construct_vector_3 construct_vector_3_object() const
+    { return m_gt.construct_vector_3_object(); }
+
+    typedef typename Gt::Construct_point_2 Construct_point_2;
+    Construct_point_2 construct_point_2_object() const 
+    { return m_gt.construct_point_2_object(); }
+
+    typedef typename Gt::Construct_vector_2 Construct_vector_2;
+    Construct_vector_2 construct_vector_2_object() const
+    { return m_gt.construct_vector_2_object(); }
+
+    typedef typename Gt::Construct_sphere_3 Construct_sphere_3;
+    Construct_sphere_3 construct_sphere_3_object() const
+    { return m_gt.construct_sphere_3_object(); }
+    
+    typedef typename Gt::Construct_line_3 Construct_line_3;
+    Construct_line_3 construct_line_3_object() const
+    { return m_gt.construct_line_3_object(); }
+
+    typedef typename Gt::Construct_circle_2 Construct_circle_2;
+    Construct_circle_2 construct_circle_2_object() const
+    { return m_gt.construct_circle_2_object(); }
+    
+    typedef typename Gt::Construct_point_on_3 Construct_point_on_3;
+    Construct_point_on_3 construct_point_on_3_object() const
+    { return m_gt.construct_point_on_3_object(); }
+
+    typedef typename Gt::Compute_x_2 Compute_x_2;
+    Compute_x_2 compute_x_2_object() const
+    { return m_gt.compute_x_2_object(); }
+
+    typedef typename Gt::Compute_y_2 Compute_y_2;
+    Compute_y_2 compute_y_2_object() const
+    { return m_gt.compute_y_2_object(); }
+
+    typedef typename Gt::Compute_x_3 Compute_x_3;
+    Compute_x_3 compute_x_3_object() const
+    { return m_gt.compute_x_3_object(); }
+    
+    typedef typename Gt::Compute_y_3 Compute_y_3;
+    Compute_y_3 compute_y_3_object() const
+    { return m_gt.compute_y_3_object(); }
+    
+    typedef typename Gt::Compute_z_3 Compute_z_3;
+    Compute_z_3 compute_z_3_object() const
+    { return m_gt.compute_z_3_object(); }
+
+    typedef typename Gt::Compute_squared_length_3 Compute_squared_length_3;
+    Compute_squared_length_3 compute_squared_length_3_object() const
+    { return m_gt.compute_squared_length_3_object(); }
+
+    typedef typename Gt::Compute_squared_length_2 Compute_squared_length_2;
+    Compute_squared_length_2 compute_squared_length_2_object() const
+    { return m_gt.compute_squared_length_2_object(); }
+    
+    typedef typename Gt::Construct_scaled_vector_3 Construct_scaled_vector_3;
+    Construct_scaled_vector_3 construct_scaled_vector_3_object() const
+    { return m_gt.construct_scaled_vector_3_object(); }
+    
+    typedef typename Gt::Construct_sum_of_vectors_3 Construct_sum_of_vectors_3;
+    Construct_sum_of_vectors_3 construct_sum_of_vectors_3_object() const
+    { return m_gt.construct_sum_of_vectors_3_object(); }
+
+    typedef typename Gt::Construct_translated_point_3 Construct_translated_point_3;
+    Construct_translated_point_3 construct_translated_point_3_object() const
+    { return m_gt.construct_translated_point_3_object(); }
+    
+    typedef typename Gt::Compute_scalar_product_3 Compute_scalar_product_3;
+    Compute_scalar_product_3 compute_scalar_product_3_object() const
+    { return m_gt.compute_scalar_product_3_object(); }
+    
+    typedef typename Gt::Construct_cross_product_vector_3 Construct_cross_product_vector_3;
+    Construct_cross_product_vector_3 construct_cross_product_vector_3_object() const
+    { return m_gt.construct_cross_product_vector_3_object(); }
+
+    typedef typename Gt::Construct_center_3 Construct_center_3;
+    Construct_center_3 construct_center_3_object() const
+    { return m_gt.construct_center_3_object(); }
+
+    typedef typename Gt::Construct_center_2 Construct_center_2;
+    Construct_center_2 construct_center_2_object() const
+    { return m_gt.construct_center_2_object(); }
+
+    typedef typename Gt::Compute_squared_radius_3 Compute_squared_radius_3;
+    Compute_squared_radius_3 compute_squared_radius_3_object() const
+    { return m_gt.compute_squared_radius_3_object(); }
+
+    typedef typename Gt::Compute_squared_radius_2 Compute_squared_radius_2;
+    Compute_squared_radius_2 compute_squared_radius_2_object() const
+    { return m_gt.compute_squared_radius_2_object(); }
+    
+    typedef typename Gt::Collinear_2 Collinear_2;
+    Collinear_2 collinear_2_object() const
+    { return m_gt.collinear_2_object(); }
+
+  private:
+    Gt m_gt;
+  };
+
+} } // end of namespace CGAL::Shape_detection_3
+
+#endif // CGAL_SHAPE_DETECTION_3_EFFICIENT_RANSAC_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Octree.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Octree.h
new file mode 100644
index 0000000..4f95926
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Octree.h
@@ -0,0 +1,727 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_OCTREE_H
+#define CGAL_SHAPE_DETECTION_3_OCTREE_H
+
+#include <limits>
+#include <stack>
+
+#include <CGAL/Random.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Shape_detection_3/Shape_base.h>
+
+
+extern int scoreTime;
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+  
+    template<class Traits> 
+    class Efficient_RANSAC;
+    
+  namespace internal {
+
+    const std::size_t size_t_max = (std::numeric_limits<std::size_t>::max)();
+  
+    template<class Sdt>
+    class DirectPointAccessor {
+    public:
+      typedef Sdt Sd_traits;
+      typedef typename Sd_traits::Input_range::iterator Input_iterator;
+
+      DirectPointAccessor() {}
+      DirectPointAccessor(const Input_iterator &begin,
+                          const Input_iterator &beyond, 
+                          std::size_t offset) : m_first(begin), m_offset(offset) {
+        m_beyond = (beyond == begin) ? begin : beyond - 1;
+      }
+
+      Input_iterator at(std::size_t i) {
+        return m_first + i;
+      }
+
+      std::size_t index(std::size_t i) {
+        return i + m_offset;
+      }
+
+      std::size_t offset() {
+        return m_offset;
+      }
+
+      std::size_t size() {
+        return m_beyond - m_first + 1;
+      }
+
+      Input_iterator first() {
+        return m_first;
+      }
+
+      Input_iterator beyond() {
+        return m_beyond;
+      }
+
+      void setData(Input_iterator &begin, Input_iterator &beyond) {
+        m_beyond = (beyond == begin) ? begin : beyond - 1;
+      }
+
+      void swap(std::size_t a, std::size_t b) {
+        typename std::iterator_traits<Input_iterator>::value_type tmp;
+        tmp = m_first[a];
+        m_first[a] = m_first[b];
+        m_first[b] = tmp;
+      }
+
+    protected:
+      Input_iterator m_first;
+
+    private:
+      Input_iterator m_beyond;
+      std::size_t m_offset;
+    };
+
+    template<class Sdt>
+    class IndexedPointAccessor {
+    public:
+      typedef Sdt Sd_traits;
+      typedef typename Sd_traits::Input_range::iterator Input_iterator;
+
+      IndexedPointAccessor() {}
+      IndexedPointAccessor(const Input_iterator &begin,
+                           const Input_iterator &beyond, std::size_t)
+                           : m_first(begin) {
+        m_beyond = (beyond == begin) ? begin : beyond - 1;
+        m_indices.resize(size());
+        for (std::size_t i = 0;i<size();i++)
+          m_indices[i] = i;
+      }
+
+      Input_iterator at(std::size_t i) {
+        return m_first + m_indices[i];
+      }
+
+      std::size_t index(std::size_t i) {
+        return m_indices[i];
+      }
+
+      std::size_t offset() {
+        return 0;
+      }
+
+      Input_iterator first() {
+        return m_first;
+      }
+
+      Input_iterator beyond() {
+        return m_beyond;
+      }
+
+      void setData(Input_iterator &begin, Input_iterator &beyond) {
+        m_beyond = (beyond == begin) ? begin : beyond - 1;
+        m_indices.resize(size());
+        for (std::size_t i = 0;i<size();i++)
+          m_indices[i] = i;
+      }
+
+      std::size_t size() {
+        return m_beyond - m_first + 1;
+      }
+
+      void swap(std::size_t a, std::size_t b) {
+        std::size_t tmp = m_indices[a];
+        m_indices[a] = m_indices[b];
+        m_indices[b] = tmp;
+      }
+
+    protected:
+      Input_iterator m_first;
+
+    private:
+      std::vector<std::size_t> m_indices;
+      Input_iterator m_beyond;
+    };
+
+    template<class PointAccessor>
+    class Octree : public PointAccessor {
+
+      typedef typename PointAccessor::Sd_traits Sd_traits;
+      typedef typename Sd_traits::Input_range::iterator Input_iterator;
+      typedef Shape_base<Sd_traits> Shape;
+      typedef typename Sd_traits::Point_3 Point_3;
+      typedef typename Sd_traits::Vector_3 Vector_3;
+      typedef typename Sd_traits::FT FT;
+      typedef typename Sd_traits::Point_map Point_map;
+      typedef typename Sd_traits::Normal_map Normal_map;
+
+      template<class Sd_traits>
+        friend class ::CGAL::Shape_detection_3::Efficient_RANSAC;
+
+      struct Cell {
+        std::size_t first, last;
+        Cell *child[8];
+        Point_3 center;
+        std::size_t level;
+
+        Cell(std::size_t first, std::size_t last, Point_3 center, std::size_t level)
+          : first(first), last(last), center(center), level(level) {
+            memset(child, 0, sizeof(Cell *) * 8);
+        }
+
+        bool isLeaf() const {
+          for (std::size_t i = 0;i<8;i++) {
+            if (child[i])
+              return false;
+          }
+          return true;
+        }
+
+        std::size_t size() const {
+          if (first == size_t_max || last == size_t_max)
+            return 0;
+          else return (last - first + 1);
+        }
+      };
+
+      // --------------------------------------------------------------------------
+      // Utilities
+      // --------------------------------------------------------------------------
+      FT get_x(const Vector_3& v){ return m_traits.compute_x_3_object()(v); }
+      FT get_y(const Vector_3& v){ return m_traits.compute_y_3_object()(v); }
+      FT get_z(const Vector_3& v){ return m_traits.compute_z_3_object()(v); }
+      FT get_x(const Point_3& p){ return m_traits.compute_x_3_object()(p); }
+      FT get_y(const Point_3& p){ return m_traits.compute_y_3_object()(p); }
+      FT get_z(const Point_3& p){ return m_traits.compute_z_3_object()(p); }
+      FT get_coord(const Point_3& p, unsigned int d)
+      {
+        CGAL_assertion(d >= 0 && d < 3);
+        switch (d)
+        {
+          case 0: return get_x(p);
+          case 1: return get_y(p);
+          case 2: return get_z(p);
+          default: return FT(0);
+        }
+      }
+
+      Point_3 constr_pt(FT x, FT y, FT z) const
+      { return m_traits.construct_point_3_object()(x, y, z); }
+      Vector_3 constr_vec(const Point_3& p, const Point_3& q) const
+      { return m_traits.construct_vector_3_object()(p, q); }
+
+      Point_3 transl(const Point_3& p, const Vector_3 &v)
+      { return m_traits.construct_translated_point_3_object()(p, v); }
+        
+    public:
+      Octree(Sd_traits const& traits) 
+        : m_traits(traits), m_bucket_size(20), m_set_max_level(10), m_root(NULL) {}
+      Octree(Sd_traits const& traits,
+             const Input_iterator &first,
+             const Input_iterator &beyond,
+             Point_map& point_pmap,
+             Normal_map& normal_pmap,
+             std::size_t offset = 0,
+             std::size_t bucketSize = 20, 
+             std::size_t maxLevel = 10)
+             : PointAccessor(first, beyond, offset),
+               m_traits(traits),
+               m_root(NULL),
+               m_bucket_size(bucketSize),
+               m_set_max_level(maxLevel),
+               m_point_pmap (point_pmap),
+               m_normal_pmap (normal_pmap) {}
+
+      ~Octree() {
+        if (!m_root)
+          return;
+
+        std::stack<Cell *> stack;
+        stack.push(m_root);
+        while (!stack.empty()) {
+          Cell *cell = stack.top();
+          stack.pop();
+
+          for (std::size_t i = 0;i<8;i++)
+            if (cell->child[i])
+              stack.push(cell->child[i]);
+
+          delete cell;
+        }
+      }
+
+      // Sorting data in a way such that points of one cell
+      // are always in one range and ordered child-wise:
+      // +---+---+
+      // | 1.| 0.|
+      // +---+---+
+      // | 3.| 2.|
+      // +---+---+
+      // z max before z min, then y max before y min, then x max before x min
+      void createTree() {
+        buildBoundingCube();
+        std::size_t count = 0;
+        m_max_level = 0;
+
+        std::stack<Cell *> stack;
+        m_root = new Cell(0, this->size() - 1, m_center, 0);
+        stack.push(m_root);
+        while (!stack.empty()) {
+          Cell *cell= stack.top();
+          stack.pop();
+
+          m_max_level = std::max<std::size_t>(m_max_level, cell->level);
+          if (cell->level == m_set_max_level)
+            continue;
+          
+          std::size_t zLowYHighXSplit, zLowYLowXSplit, zLowYSplit;
+          std::size_t zHighYSplit, zHighYHighXSplit, zHighYLowXSplit;
+
+          std::size_t zSplit = split(cell->first, cell->last, 2, get_z(cell->center));
+
+          if (zSplit != size_t_max) {
+
+            zLowYSplit = split(cell->first, zSplit, 1, get_y(cell->center));
+            if (zLowYSplit != size_t_max) {
+              zLowYLowXSplit = split(cell->first,
+                                     zLowYSplit, 0, get_x(cell->center));
+              zLowYHighXSplit = split(zLowYSplit + 1,
+                                      zSplit, 0, get_x(cell->center)); 
+            }
+            else {
+              zLowYLowXSplit = size_t_max;
+              zLowYHighXSplit = split(cell->first, zSplit, 0, get_x(cell->center));
+            }
+
+            zHighYSplit = split(zSplit + 1, cell->last, 1, get_y(cell->center));  
+
+            if (zHighYSplit != size_t_max) {
+              zHighYHighXSplit = split(zHighYSplit + 1,
+                                       cell->last, 0, get_x(cell->center));
+              zHighYLowXSplit = split(zSplit + 1,
+                                      zHighYSplit, 0, get_x(cell->center));
+            }
+            else {
+              zHighYLowXSplit = size_t_max;
+              zHighYHighXSplit = split(zSplit + 1,
+                                       cell->last, 0, get_x(cell->center));
+            }
+          }
+          else {
+            zLowYSplit = size_t_max;
+            zLowYLowXSplit = size_t_max;
+            zLowYHighXSplit = size_t_max;
+
+            zHighYSplit = split(cell->first,
+                                cell->last,
+                                1,
+                                get_y(cell->center)); 
+
+            if (zHighYSplit != size_t_max) {
+              zHighYHighXSplit = split(zHighYSplit + 1, 
+                                       cell->last, 
+                                       0, 
+                                       get_x(cell->center));
+
+              zHighYLowXSplit = split(cell->first, 
+                                      zHighYSplit,
+                                      0, 
+                                      get_x(cell->center)); 
+            }
+            else {
+              zHighYLowXSplit = size_t_max;
+              zHighYHighXSplit = split(cell->first,
+                                       cell->last, 
+                                       0,
+                                       get_x(cell->center));
+            }
+          }
+
+
+          FT width = m_width / (1<<(cell->level + 1));
+
+          if (zSplit != size_t_max) {
+            if (zLowYSplit != size_t_max) {
+              if (zLowYLowXSplit != size_t_max) {
+
+                if (cell->first <= zLowYLowXSplit) {
+                  //---
+                  cell->child[7] = new Cell(cell->first,
+                                            zLowYLowXSplit, 
+                                            transl(cell->center, constr_vec(
+                                              ORIGIN, constr_pt(-width,-width,-width))),
+                                            cell->level + 1);
+
+                  if (cell->child[7]->size() > m_bucket_size)
+                    stack.push(cell->child[7]);
+                }
+              }
+              else zLowYLowXSplit = cell->first - 1;
+
+              if (zLowYLowXSplit < zLowYSplit || zLowYLowXSplit == size_t_max) {
+                //+--
+                cell->child[6] = new Cell(zLowYLowXSplit + 1,
+                                          zLowYSplit, 
+                                          transl(cell->center, constr_vec(
+                                            ORIGIN, constr_pt(width,-width,-width))),
+                                          cell->level + 1);
+
+                if (cell->child[6]->size() > m_bucket_size)
+                  stack.push(cell->child[6]);
+              }
+            }
+            else zLowYSplit = cell->first - 1;
+
+            if (zLowYHighXSplit != size_t_max) {
+
+              if (zLowYSplit < zLowYHighXSplit || zLowYSplit == size_t_max) {
+                //-+-
+                cell->child[5] = new Cell(zLowYSplit + 1, 
+                                          zLowYHighXSplit, 
+                                          transl(cell->center, constr_vec(
+                                            ORIGIN, constr_pt(-width, width,-width))),
+                                          cell->level + 1);
+
+                if (cell->child[5]->size() > m_bucket_size)
+                  stack.push(cell->child[5]);
+              }
+            }
+            else zLowYHighXSplit = zLowYSplit;
+
+            if (zLowYHighXSplit < zSplit || zLowYHighXSplit == size_t_max) {
+              //++-
+              cell->child[4] = new Cell(zLowYHighXSplit + 1,
+                                        zSplit, 
+                                        transl(cell->center, constr_vec(
+                                          ORIGIN, constr_pt(width, width,-width))),
+                                        cell->level + 1);
+
+              if (cell->child[4]->size() > m_bucket_size)
+                stack.push(cell->child[4]);
+            }
+          }
+          else zSplit = cell->first - 1;
+
+          if (zHighYSplit != size_t_max) {
+            if (zHighYLowXSplit != size_t_max) {
+
+              if (zSplit < zHighYLowXSplit || zSplit == size_t_max) {
+                //--+
+                cell->child[3] = new Cell(zSplit + 1,
+                                          zHighYLowXSplit,
+                                          transl(cell->center, constr_vec(
+                                            ORIGIN, constr_pt(-width,-width, width))),
+                                          cell->level + 1);
+
+                if (cell->child[3]->size() > m_bucket_size)
+                  stack.push(cell->child[3]);
+              }
+            }
+            else zHighYLowXSplit = zSplit;
+
+            if (zHighYLowXSplit < zHighYSplit || zHighYLowXSplit == size_t_max) {
+              //+-+
+              cell->child[2] = new Cell(zHighYLowXSplit + 1,
+                                        zHighYSplit, 
+                                        transl(cell->center, constr_vec(
+                                          ORIGIN, constr_pt(width,-width, width))),
+                                        cell->level + 1);
+
+              if (cell->child[2]->size() > m_bucket_size)
+                stack.push(cell->child[2]);
+            }
+
+          }
+          else zHighYSplit = zSplit;
+
+          if (zHighYHighXSplit != size_t_max) {
+            if (zHighYSplit < zHighYHighXSplit || zHighYSplit == size_t_max) {
+              //-++
+              cell->child[1] = new Cell(zHighYSplit + 1,
+                                        zHighYHighXSplit, 
+                                        transl(cell->center, constr_vec(
+                                          ORIGIN, constr_pt(-width, width, width))), 
+                                        cell->level + 1);
+
+              if (cell->child[1]->size() > m_bucket_size)
+                stack.push(cell->child[1]);
+            }
+          }
+          else zHighYHighXSplit = zHighYSplit;
+
+          if (zHighYHighXSplit <= cell->last || zHighYHighXSplit == size_t_max) {
+            if (zHighYHighXSplit < cell->last || zHighYHighXSplit == size_t_max) {
+              //+++
+              cell->child[0] = new Cell(zHighYHighXSplit + 1, 
+                                        cell->last,
+                                        transl(cell->center, constr_vec(
+                                          ORIGIN, constr_pt(width, width, width))),
+                                        cell->level + 1);
+
+              if (cell->child[0]->size() > m_bucket_size)
+                stack.push(cell->child[0]);
+            }
+          }
+
+          std::size_t sum = 0;
+          for (std::size_t i = 0;i<8;i++)
+            sum += (cell->child[i]) ? cell->child[i]->size() : 0;
+
+          count++;
+        }
+      }
+
+      bool drawSamplesFromCellContainingPoint(const Point_3 &p,
+                                              std::size_t level,
+                                              std::set<std::size_t>& indices,
+                                              const std::vector<int>& shapeIndex,
+                                              std::size_t requiredSamples) {
+
+        bool upperZ, upperY, upperX;
+        Cell *cur = m_root;
+
+        while (cur && cur->level < level) {
+          upperX = get_x(cur->center) <= get_x(p);
+          upperY = get_y(cur->center) <= get_y(p);
+          upperZ = get_z(cur->center) <= get_z(p);
+
+          if (upperZ) {
+            if (upperY)
+              cur = (upperX) ? cur->child[0] : cur->child[1];
+            else cur = (upperX) ? cur->child[2] : cur->child[3];
+          }
+          else {
+            if (upperY)
+              cur = (upperX) ? cur->child[4] : cur->child[5];
+            else cur = (upperX) ? cur->child[6] : cur->child[7];
+          }
+        }
+
+        if (cur) {
+          std::size_t enough = 0;
+          for (std::size_t i = cur->first;i<=cur->last;i++) {
+            std::size_t j = this->index(i);
+            if (shapeIndex[j] == -1) {
+              enough++;
+              if (enough >= requiredSamples)
+                break;
+            }
+          }
+          if (enough >= requiredSamples) {
+            do {
+              std::size_t p = CGAL::default_random.
+                uniform_int<std::size_t>(0, cur->size() - 1);
+              std::size_t j = this->index(cur->first + p);
+              if (shapeIndex[j] == -1)
+                indices.insert(j);
+            } while (indices.size() < requiredSamples);
+
+            return true;
+          }
+          else return false;
+        }
+        else return false;
+      }
+
+      std::size_t maxLevel() {
+        return m_max_level;
+      }
+
+      std::size_t fullScore(Shape *candidate,
+                       std::vector<int> &shapeIndex,
+                       FT epsilon, 
+                       FT normal_threshold) {
+
+        std::vector<std::size_t> indices(m_root->size());
+        for (std::size_t i = 0;i<m_root->size();i++) {
+          indices[i] = index(m_root->first + i);
+        }
+        
+        candidate->cost_function(this->begin() + m_root->first, 
+                                 this->begin() + m_root->last,
+                                 shapeIndex,
+                                 epsilon, 
+                                 normal_threshold, 
+                                 indices);
+
+        return candidate->m_indices.size();
+      }
+
+      std::size_t score(Shape *candidate, 
+                   std::vector<int> &shapeIndex,
+                   FT epsilon,
+                   FT normal_threshold) {
+
+        std::stack<Cell *> stack;
+        stack.push(m_root);
+
+        while(!stack.empty()) {
+          Cell *cell = stack.top();
+          stack.pop();
+
+          FT width = m_width / (1<<(cell->level));
+
+          FT diag = CGAL::sqrt(FT(3) * width * width) + epsilon;
+
+          FT dist = candidate->squared_distance(cell->center);
+
+          if (dist > (diag * diag))
+            continue;
+
+          // differ between full or partial overlap?
+          // if full overlap further traversal of this branch is not necessary
+          if (cell->isLeaf()) {
+            std::vector<std::size_t> indices;
+            indices.reserve(cell->size());
+            for (std::size_t i = 0;i<cell->size();i++) {
+              if (shapeIndex[this->index(cell->first + i)] == -1) {
+                indices.push_back(this->index(cell->first + i));
+              }
+            }
+
+            candidate->cost_function(epsilon, 
+                                     normal_threshold, 
+                                     indices);
+          }
+          else {
+            for (std::size_t i = 0;i<8;i++)
+              if (cell->child[i])
+                stack.push(cell->child[i]);
+          }
+
+        }
+
+        return candidate->m_indices.size();
+      }
+
+      void setBucketSize(std::size_t bucketSize) {
+        m_bucket_size = bucketSize;
+      }
+
+      const Bbox_3 &boundingBox() {
+        return m_bBox;
+      }
+        
+      const Bbox_3 &buildBoundingCube() {
+        FT min[] = {(std::numeric_limits<FT>::max)(),
+                    (std::numeric_limits<FT>::max)(),
+                    (std::numeric_limits<FT>::max)()};
+        FT max[] = {(std::numeric_limits<FT>::min)(),
+                    (std::numeric_limits<FT>::min)(),
+                    (std::numeric_limits<FT>::min)()};
+
+        for (std::size_t i = 0;i<this->size();i++) {
+          Point_3 p = get(m_point_pmap, *this->at(i));
+          min[0] = (std::min<FT>)(min[0], get_x(p));
+          min[1] = (std::min<FT>)(min[1], get_y(p));
+          min[2] = (std::min<FT>)(min[2], get_z(p));
+          max[0] = (std::max<FT>)(max[0], get_x(p));
+          max[1] = (std::max<FT>)(max[1], get_y(p));
+          max[2] = (std::max<FT>)(max[2], get_z(p));
+        }
+
+        m_bBox = Bbox_3(min[0], min[1], min[2], max[0], max[1], max[2]);
+
+        m_width = (std::max)(max[0] - min[0], 
+          (std::max)(max[1] - min[1], max[2] - min[2])) * (FT) 0.5;
+        m_center = constr_pt((min[0] + max[0]) * (FT) 0.5,
+                             (min[1] + max[1]) * (FT) 0.5,
+                             (min[2] + max[2]) * (FT) 0.5);
+
+        return m_bBox;
+      }
+
+      // returns index of last point below threshold
+      std::size_t split(std::size_t first, std::size_t last, std::size_t dimension, FT threshold) {
+        if (last == size_t_max || first == size_t_max) 
+          return size_t_max;
+
+        if (first > last)
+          return first - 1;
+
+        std::size_t origFirst = first;
+
+        while(first < last) {
+          // find first above threshold
+          Point_3 p1 = get(m_point_pmap, *this->at(first));
+          FT v1 = get_coord(p1, static_cast<unsigned int>(dimension));
+          while (get_coord(
+                   get(m_point_pmap, *this->at(first)),
+                   static_cast<unsigned int>(dimension)) < threshold
+                 && first < last) {
+            first++;
+          }
+
+          // check if last has been reached
+          if (first == last) {
+            return (get_coord(
+                      get(m_point_pmap, *this->at(first)),
+                      static_cast<unsigned int>(dimension)) < threshold) ?
+                   first : (first == origFirst) ? size_t_max : first - 1;
+          }
+
+          // find last below threshold
+          p1 = get(m_point_pmap, *this->at(last));
+          v1 = get_coord(p1, static_cast<unsigned int>(dimension));
+          while (get_coord(
+                   get(m_point_pmap, *this->at(last)),
+                   static_cast<unsigned int>(dimension)) >= threshold
+                 && last > first) {
+            last--;
+          }
+
+          // check if first has been reached
+          if (last == first) {
+            return (get_coord(
+                      get(m_point_pmap, *this->at(first)),
+                      static_cast<unsigned int>(dimension)) < threshold) ?
+                    first : (first == origFirst) ? size_t_max : first - 1;
+          }
+
+          this->swap(first, last);
+          p1 = get(m_point_pmap, *this->at(first));
+          v1 = get_coord(p1, static_cast<unsigned int>(dimension));
+          p1 = get(m_point_pmap, *this->at(last));
+          v1 = get_coord(p1, static_cast<unsigned int>(dimension));
+          first++;
+          last--;
+        }
+
+        return (get_coord(
+                  get(m_point_pmap, *this->at(first)),
+                  static_cast<unsigned int>(dimension)) < threshold) ?
+               first : (first == origFirst) ? size_t_max : first - 1;
+      }
+
+      Sd_traits m_traits;
+      Bbox_3 m_bBox;
+      Cell *m_root;
+      Point_3 m_center;
+      FT m_width;
+      std::size_t m_bucket_size;
+      std::size_t m_set_max_level;
+      std::size_t m_max_level;
+      Point_map m_point_pmap;
+      Normal_map m_normal_pmap;
+    };
+  }
+  }
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Plane.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Plane.h
new file mode 100644
index 0000000..64af70b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Plane.h
@@ -0,0 +1,211 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_PLANE_H
+#define CGAL_SHAPE_DETECTION_3_PLANE_H
+
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/number_utils.h>
+
+/*!
+ \file Plane.h
+ */
+namespace CGAL {
+  namespace Shape_detection_3 {
+    /*!
+     \ingroup PkgPointSetShapeDetection3Shapes
+     \brief Plane implements Shape_base. The plane is represented by the normal vector and the distance to the origin.
+     \tparam Traits a model of `EfficientRANSACTraits` with the additional 
+             requirement for planes (see `EfficientRANSACTraits` documentation).
+     */
+  template <class Traits>
+  class Plane : public Shape_base<Traits> {
+  public:
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Point_map Point_map;
+     ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+     ///< property map to access the unoriented normal of an input point.
+    typedef typename Traits::FT FT; ///< number type.
+    typedef typename Traits::Point_3 Point_3; ///< point type.
+    typedef typename Traits::Vector_3 Vector_3;
+    /// \endcond
+
+    typedef typename Traits::Plane_3 Plane_3;///< plane type for conversion operator.
+
+  public:
+    Plane() : Shape_base<Traits>() {}
+
+    /*!
+      Conversion operator to `Plane_3` type.
+     */
+    operator Plane_3() const {
+      return Plane_3(this->get_x(m_normal), this->get_y(m_normal), this->get_z(m_normal), m_d);
+    }
+            
+    /*!
+      Normal vector of the plane.
+     */
+    Vector_3 plane_normal() const {
+      return m_normal;
+    }
+            
+    /*!
+      Signed distance from the origin.
+     */
+    FT d() const {
+      return m_d;
+    }
+    
+    /// \cond SKIP_IN_MANUAL
+    /*!
+      Computes squared Euclidean distance from query point to the shape.
+     */
+    FT squared_distance(const Point_3 &p) const {
+      FT d = this->scalar_pdct(
+        this->constr_vec(p, m_point_on_primitive), m_normal);
+      return d * d;
+    }
+
+    
+    /*!
+      Helper function to write the plane equation and
+      number of assigned points into a string.
+     */
+    std::string info() const {
+      std::stringstream sstr;
+      sstr << "Type: plane (" << this->get_x(m_normal) << ", " << this->get_y(m_normal) 
+        << ", " << this->get_z(m_normal) << ")x - " << m_d << "= 0"
+        << " #Pts: " << this->m_indices.size();
+
+      return sstr.str();
+    }
+    /// \endcond
+
+  protected:
+      /// \cond SKIP_IN_MANUAL
+    virtual void create_shape(const std::vector<std::size_t> &indices) {
+      Point_3 p1 = this->point(indices[0]);
+      Point_3 p2 = this->point(indices[1]);
+      Point_3 p3 = this->point(indices[2]);
+
+      m_normal = this->cross_pdct(
+        this->constr_vec(p2, p1), this->constr_vec(p3, p1));
+
+      FT length = CGAL::sqrt(this->sqlen(m_normal));
+
+      // Are the points almost singular?
+      if (length < (FT)0.0001) {
+        return;
+      }
+
+      m_normal = this->scale(m_normal, (FT)1.0 / length);
+      m_d = -(this->get_x(p1) * this->get_x(m_normal) 
+        + this->get_y(p1) * this->get_y(m_normal) 
+        + this->get_z(p1) * this->get_z(m_normal));
+
+      //check deviation of the 3 normal
+      Vector_3 l_v = this->constr_vec();
+      for (std::size_t i = 0;i<3;i++) {
+        l_v = this->normal(indices[i]);
+
+        if (CGAL::abs(this->scalar_pdct(l_v, m_normal))
+            < this->m_normal_threshold * CGAL::sqrt(this->sqlen(l_v))) {
+          this->m_is_valid = false;
+          return;
+        }
+
+        m_point_on_primitive = p1;
+        m_base1 = this->cross_pdct(this->constr_vec(p2, p1), m_normal);
+        m_base1 = this->scale(m_base1, ((FT)1.0 / CGAL::sqrt(this->sqlen(m_base1))));
+
+        m_base2 = this->cross_pdct(m_base1, m_normal);
+        m_base2 = this->scale(m_base2, ((FT)1.0 / CGAL::sqrt(this->sqlen(m_base2))));
+      }
+
+      this->m_is_valid = true;
+    }
+
+    virtual void parameters(const std::vector<std::size_t> &indices,
+                            std::vector<std::pair<FT, FT> > &parameterSpace,
+                            FT &,                    
+                            FT min[2],
+                            FT max[2]) const {
+      // Transform first point before to initialize min/max
+      Vector_3 p = this->constr_vec(
+        m_point_on_primitive, this->point(indices[0]));
+      FT u = this->scalar_pdct(p, m_base1);
+      FT v = this->scalar_pdct(p, m_base2);
+      parameterSpace[0] = std::pair<FT, FT>(u, v);
+      min[0] = max[0] = u;
+      min[1] = max[1] = v;
+
+      for (std::size_t i = 1;i<indices.size();i++) {
+        p = this->constr_vec(m_point_on_primitive, this->point(indices[i]));
+        u = this->scalar_pdct(p, m_base1);
+        v = this->scalar_pdct(p, m_base2);
+        min[0] = (std::min<FT>)(min[0], u);
+        max[0] = (std::max<FT>)(max[0], u);
+        min[1] = (std::min<FT>)(min[1], v);
+        max[1] = (std::max<FT>)(max[1], v);
+        parameterSpace[i] = std::pair<FT, FT>(u, v);
+      }
+    }
+    
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &dists) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+        const FT d = this->scalar_pdct(
+          this->constr_vec(m_point_on_primitive, this->point(indices[i])), 
+          m_normal);
+        dists[i] = d * d;
+      }
+    }
+
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices, 
+                               std::vector<FT> &angles) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+        angles[i] = CGAL::abs(
+          this->scalar_pdct(this->normal(indices[i]), m_normal));
+      }
+    }
+
+    FT cos_to_normal(const Point_3 &, const Vector_3 &n) const{
+      return CGAL::abs(this->scalar_pdct(n, m_normal));
+    } 
+    
+    virtual std::size_t minimum_sample_size() const {
+      return 3;
+    }
+
+    virtual bool supports_connected_component() const {
+      return true;
+    }
+
+  private:
+    Point_3 m_point_on_primitive;
+    Vector_3 m_base1, m_base2, m_normal;
+    FT m_d;
+    /// \endcond
+  };
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Shape_base.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Shape_base.h
new file mode 100644
index 0000000..a1c381a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Shape_base.h
@@ -0,0 +1,702 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_SHAPE_BASE_H
+#define CGAL_SHAPE_DETECTION_3_SHAPE_BASE_H
+
+#include <vector>
+#include <set>
+#include <boost/tuple/tuple.hpp>
+#include <CGAL/Kd_tree.h>
+#include <CGAL/Fuzzy_sphere.h>
+#include <CGAL/property_map.h>
+#include <CGAL/number_utils.h>
+#include <CGAL/Random.h>
+
+/*!
+ \file Shape_base.h
+ */
+
+#ifndef CGAL_M_PI_2
+#define CGAL_M_PI_2 1.57079632679489661923
+#endif
+#ifndef CGAL_M_PI_4
+#define CGAL_M_PI_4 0.785398163397448309616
+#endif
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+  namespace internal {
+    template<class PointAccessor>
+    class Octree;
+  }
+    
+    /*!
+     \ingroup PkgPointSetShapeDetection3Shapes
+     \brief Base class for shape types defining an interface to construct a
+            shape from a set of points and to compute the point distance and normal
+            deviation from the surface normal. It is used during detection to
+            identify the inliers from the input data and to extract the largest
+            connected component in inlier points.
+     */
+  template <class Traits>
+  class Shape_base {
+    /// \cond SKIP_IN_MANUAL
+    template <class T>
+    friend class Efficient_RANSAC;
+    template<class PointAccessor>
+    friend class internal::Octree;
+    /// \endcond
+
+  public:
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Input_range::iterator Input_iterator;
+      ///< random access iterator for input data.
+    typedef typename Traits::Point_map Point_map;
+      ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+      ///< property map to access the unoriented normal of an input point.
+    typedef Shape_base<Traits> Shape;
+      ///< own type.
+    /// \endcond
+
+    typedef typename Traits::FT FT; ///< number type.
+    typedef typename Traits::Point_3 Point_3; ///< point type.
+    typedef typename Traits::Vector_3 Vector_3; ///< vector type.
+
+    // \todo The property maps should be passed here instead of `compute`
+    Shape_base() :
+    m_is_valid(false),
+      m_lower_bound((std::numeric_limits<FT>::min)()),
+      m_upper_bound((std::numeric_limits<FT>::min)()),
+      m_score(0),
+      m_sum_expected_value(0),
+      m_nb_subset_used(0),
+      m_has_connected_component(false) {
+    }
+
+    virtual ~Shape_base() {}
+      
+    /*!
+      returns the indices of the points in the input range assigned to this shape.
+     */
+    const std::vector<std::size_t> & indices_of_assigned_points() const {
+      return m_indices;
+    }
+      
+    /*!
+      returns a string containing the shape type
+      and the numerical parameters.
+     */
+    virtual std::string info() const {
+      return std::string();
+    }
+
+    /*!
+      Computes the squared Euclidean distance from the query point `p` to the shape.
+     */
+    virtual FT squared_distance(const Point_3 &p) const = 0;
+
+  protected:
+      
+    /*!
+      Constructs the shape based on a minimal set of samples from the
+      input data.
+     */
+    virtual void create_shape(const std::vector<std::size_t> &indices) = 0;
+    
+    /*!
+      Determines the largest cluster of inlier points. A point belongs to a cluster
+      if there is a point in the cluster closer than `cluster_epsilon` distance.
+     */
+    virtual std::size_t connected_component(
+      std::vector<std::size_t> &indices, FT cluster_epsilon) {
+      if (indices.size() == 0)
+        return 0;
+
+      if (m_has_connected_component)
+        return m_score;
+
+      m_has_connected_component = true;
+      if (!this->supports_connected_component())
+        return connected_component_kdTree(indices, cluster_epsilon);
+      
+      // Fetching parameters
+      FT min[] = {0,0}, max[] = {0,0};
+
+      std::vector<std::pair<FT, FT> > parameter_space;
+      parameter_space.resize(indices.size());
+
+      parameters(m_indices, parameter_space, cluster_epsilon, min, max);
+
+      // Determine required size of bitmap
+      std::size_t u_extent = std::size_t(ceil((max[0] - min[0]) / cluster_epsilon));
+      std::size_t v_extent = std::size_t(ceil((max[1] - min[1]) / cluster_epsilon));
+
+      // Handle singular case
+      u_extent = (u_extent == 0) ? 1 : u_extent;
+      v_extent = (v_extent == 0) ? 1 : v_extent;
+
+      std::vector<unsigned int> bitmap;
+      bitmap.resize(u_extent * v_extent, 0);
+
+      // Fill bitmap
+      for (std::size_t i = 0;i<parameter_space.size();i++) {
+        int u = (int)((parameter_space[i].first - min[0]) / cluster_epsilon);
+        int v = (int)((parameter_space[i].second - min[1]) / cluster_epsilon);
+
+        u = (u < 0) ? 0 : (((std::size_t)u >= u_extent) ? (int)u_extent - 1 : u);
+        v = (v < 0) ? 0 : (((std::size_t)v >= v_extent) ? (int)v_extent - 1 : v);
+
+        bitmap[v * int(u_extent) + u] = true;
+      }
+
+      // Iterate through the bitmap
+      std::vector<unsigned int> map;
+      map.reserve(64);
+      map.resize(2);
+
+      for (std::size_t y = 0;y<v_extent;y++) {
+        for (std::size_t x = 0;x<u_extent;x++) {
+          if (!bitmap[y * u_extent + x])
+            continue;
+
+          unsigned int w = (x > 0) ?
+            bitmap[y  * u_extent + x - 1] : 0;
+
+          unsigned int n = (y > 0) ?
+            bitmap[(y - 1) * u_extent + x] : 0;
+
+          unsigned int nw = (x > 0 && y > 0) ?
+            bitmap[(y - 1) * u_extent + x - 1] : 0;
+
+          unsigned int ne = ((x + 1 < u_extent) && y > 0) ?
+            bitmap[(y - 1) * u_extent + x + 1] : 0;
+
+          // Find smallest set label;
+          unsigned int curLabel = static_cast<unsigned int>(map.size());
+
+          curLabel = (w != 0) ?
+            (std::min<unsigned int>)(curLabel, w) : curLabel;
+
+          curLabel = (n != 0) ?
+            (std::min<unsigned int>)(curLabel, n) : curLabel;
+
+          curLabel = (nw != 0) ?
+            (std::min<unsigned int>)(curLabel, nw) : curLabel;
+
+          curLabel = (ne != 0) ? 
+            (std::min<unsigned int>)(curLabel, ne) : curLabel;
+
+          // Update merge map.
+          if (curLabel != map.size()) {
+            if (w > curLabel) update_label(map, w, curLabel);
+            if (nw > curLabel) update_label(map, nw, curLabel);
+            if (n > curLabel) update_label(map, n, curLabel);
+            if (ne > curLabel) update_label(map, ne, curLabel);
+          }
+          else map.push_back(static_cast<unsigned int>(map.size()));
+
+          bitmap[y * u_extent + x] = curLabel;
+        }
+      }
+
+      // post_wrap to handle boundaries in different shape types.
+      if (map.size() > 3)
+        post_wrap(bitmap, u_extent, v_extent, map);
+
+      // Propagate label changes
+      for (unsigned int j = 3; j < static_cast<unsigned int>(map.size()); j++)
+        update_label(map, j, map[j]);
+
+      // Update labels
+      for (std::size_t y = 0;y<v_extent;y++)
+        for (std::size_t x = 0;x<u_extent;x++) {
+          unsigned int label = bitmap[y * u_extent + x];
+
+          if (!label)
+            continue;
+
+          if (map[label] != label)
+            bitmap[y * u_extent + x] = map[label];
+        }
+
+      // Count points per label.
+      std::vector<unsigned int> count(map.size(), 0);
+
+      for (std::size_t i = 0;i<parameter_space.size();i++) {
+        int u = (int)((parameter_space[i].first - min[0]) / cluster_epsilon);
+        int v = (int)((parameter_space[i].second - min[1]) / cluster_epsilon);
+        
+        u = (u < 0) ? 0 : (((std::size_t)u >= u_extent) ? (int)u_extent - 1 : u);
+        v = (v < 0) ? 0 : (((std::size_t)v >= v_extent) ? (int)v_extent - 1 : v);
+
+        count[bitmap[v * int(u_extent) + u]]++;
+      }
+
+      // Find largest component. Start at index 2 as 0/1 are reserved for
+      // basic free/occupied bitmap labels.
+      unsigned int largest = 2;
+      for (unsigned int i = 3; i < static_cast<unsigned int>(count.size()); i++)
+        largest = (count[largest] < count[i]) ? i : largest;
+
+      // Extract sought-after indices.
+      std::vector<std::size_t> comp_indices;
+      comp_indices.reserve(count[largest]);
+
+      for (std::size_t i = 0;i<parameter_space.size();i++) {
+        int u = (int)((parameter_space[i].first - min[0]) / cluster_epsilon);
+        int v = (int)((parameter_space[i].second - min[1]) / cluster_epsilon);
+        
+        u = (u < 0) ? 0 : (((std::size_t)u >= u_extent) ? (int)u_extent - 1 : u);
+        v = (v < 0) ? 0 : (((std::size_t)v >= v_extent) ? (int)v_extent - 1 : v);
+
+        if (bitmap[v * int(u_extent) + u] == largest)
+          comp_indices.push_back(indices[i]);
+      }
+
+      indices = comp_indices;
+
+      return m_score = indices.size();
+    }
+    
+    /*!
+      Determines the largest cluster with a point-to-point
+      distance not larger than `cluster_epsilon`. This general version performs
+      a region growing within the inliers using a kd-tree.
+     */
+    std::size_t connected_component_kdTree(std::vector<std::size_t> &indices,
+                                           FT cluster_epsilon) {
+      typedef boost::tuple<Point_3, std::size_t> Point_and_size_t;
+      typedef CGAL::Search_traits_adapter<Point_and_size_t,
+        CGAL::Nth_of_tuple_property_map<0, Point_and_size_t>,
+        typename Traits::Search_traits> Search_traits_adapter;
+
+      typedef CGAL::Kd_tree<Search_traits_adapter> Kd_Tree;
+      typedef CGAL::Fuzzy_sphere<Search_traits_adapter> Fuzzy_sphere;
+
+      m_has_connected_component = true;
+      
+      std::vector<Point_and_size_t> pts;
+      std::vector<std::size_t> label_map;
+      pts.resize(indices.size());
+      label_map.resize(indices.size(), 0);
+
+      for (std::size_t i = 0;i < indices.size();i++) {
+        pts[i] = Point_and_size_t(point(indices[i]), i);
+      }
+
+      // construct kd tree
+      Kd_Tree tree(pts.begin(), pts.end());
+      
+      std::stack<std::size_t> stack;
+      std::size_t unlabeled = pts.size();
+      std::size_t label = 1;
+      std::size_t best = 0;
+      std::size_t best_size = 0;
+
+      for (std::size_t i = 0;i<pts.size();i++) {
+        if (label_map[i] != 0)
+          continue;
+
+        std::size_t assigned = 0;
+
+        stack.push(i);
+        while(!stack.empty()) {
+          std::vector<Point_and_size_t> near_points;
+
+          std::size_t p = stack.top();
+          stack.pop();
+
+          Fuzzy_sphere fs(pts[p], cluster_epsilon, 0);
+          tree.search(std::back_inserter(near_points), fs);
+
+          for (std::size_t j = 0;j<near_points.size();j++) {
+            std::size_t index = boost::get<1>(near_points[j]);
+            if (index == p)
+              continue;
+
+            if (label_map[index] != label) {
+              label_map[index] = label;
+              assigned++;
+              stack.push(index);
+            }
+          }
+        }
+        
+        // Track most prominent label and remaining points
+        unlabeled -= assigned;
+        if (assigned > best_size) {
+          best = label;
+          best_size = assigned;
+        }
+
+        label++;
+
+        // Can we stop already?
+        if (unlabeled <= best_size)
+          break;
+      }
+
+      std::vector<std::size_t> tmp_indices;
+      tmp_indices.reserve(best_size);
+      for (std::size_t i = 0;i<pts.size();i++) {
+        if (label_map[i] == best)
+          tmp_indices.push_back(indices[i]);
+      }
+
+      indices = tmp_indices;
+      
+      return indices.size();
+    }
+
+    /*!
+      Computes the squared Euclidean distance from a set of points to the shape.
+      The distances will be stored in the so called parameter.
+     */
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &distances) const = 0;
+
+    /*!
+      Computes the deviation of the point normal from the surface normal at the
+      projected point in form of the dot product and writes the result into the
+      provided `angles` vector.
+     */
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices,
+                               std::vector<FT> &angles) const = 0;
+
+    /*!
+      Returns minimal number of sample points required for construction.
+     */
+    virtual std::size_t minimum_sample_size() const = 0;
+
+    /*!
+      Retrieves the point location from its index.
+     */
+    typename boost::property_traits< typename Traits::Point_map >::reference
+    point(std::size_t i) const {
+      return get(this->m_point_pmap, *(this->m_first + i));
+    }
+    
+    /*!
+      Retrieves the normal vector from its index.
+     */
+    typename boost::property_traits< typename Traits::Normal_map >::reference
+    normal(std::size_t i) const {
+      return get(this->m_normal_pmap, *(this->m_first + i));
+    }
+
+    /*!
+      Retrieves the traits class.
+     */
+    const Traits&
+    traits() const
+    {
+      return m_traits;
+    }
+
+    /// \cond SKIP_IN_MANUAL
+    struct Compare_by_max_bound {
+        bool operator() (const Shape *a, const Shape *b) {
+            return a->max_bound() < b->max_bound();
+        }
+    };
+      
+    FT expected_value() const {
+      return (m_lower_bound + m_upper_bound) / 2.f;
+    }
+
+    FT inline min_bound() const {
+      return  m_lower_bound;
+    }
+
+    FT inline max_bound() const {
+      return  m_upper_bound;
+    }
+
+    virtual void post_wrap(const std::vector<unsigned int> &bitmap,
+                   const std::size_t &u_extent,
+                   const std::size_t &v_extent,
+                   std::vector<unsigned int> &labels) const {
+      // Avoid compiler warnings about unused parameters.
+      (void) bitmap;
+      (void) u_extent;
+      (void) v_extent;
+      (void) labels;
+    }
+
+    // return last computed score, or -1 if no score yet
+    FT inline score() const {
+      return FT(m_score);
+    } 
+
+    int inline subsets() const {
+      return m_nb_subset_used;
+    }
+
+    // sorting is performed by expected value
+    operator FT() const {
+      return expected_value();
+    }
+
+    void inline update_label(std::vector<unsigned int> &labels, unsigned int i,
+                             unsigned int &new_value) const {
+      if (labels[i] != i)
+        update_label(labels, labels[i], new_value);
+
+      if (new_value < labels[i])
+        labels[i] = new_value;
+      else
+        new_value = labels[i];
+    }
+
+    void update_points(const std::vector<int> &shape_index) {
+      if (!m_indices.size())
+        return;
+      std::size_t start = 0, end = m_indices.size() - 1;
+      while (start < end) {
+        while (shape_index[m_indices[start]] == -1
+          && start < end) start++;
+
+        while (shape_index[m_indices[end]] != -1
+          && start < end) end--;
+
+        if (shape_index[m_indices[start]] != -1
+          && shape_index[m_indices[end]] == -1
+          && start < end) {
+          std::size_t tmp = m_indices[start];
+          m_indices[start] = m_indices[end];
+          m_indices[end] = tmp;
+        }
+      }
+      m_indices.resize(end);
+      m_score = m_indices.size();
+    }
+
+    bool is_valid() const {
+      return m_is_valid;
+    }
+
+    // Two shapes are considered the same if from 18 points randomly selected
+    // from the shapes at least 12 match both shapes
+    bool is_same(const Shape_base *other) const {
+      if (!other)
+        return false;
+      if (other->m_indices.size() == 0)
+        return true;
+
+      const std::size_t num = 9;
+      int score = 0;
+      std::vector<std::size_t> indices(num);
+      for (std::size_t i = 0;i<num;i++)
+        indices[i] = m_indices[default_random(m_indices.size())];
+      
+      std::vector<FT> dists(num), angles(num);
+      other->squared_distance(indices, dists);
+      other->cos_to_normal(indices, angles);
+
+      for (std::size_t i = 0;i<num;i++)
+        if (dists[i] <= m_epsilon && angles[i] > m_normal_threshold)
+          score++;
+
+      if (score < 3)
+        return false;
+
+      for (std::size_t i = 0;i<num;i++)
+        indices[i] = other->m_indices[default_random(other->m_indices.size())];
+
+      this->squared_distance(indices, dists);
+      this->cos_to_normal(indices, angles);
+
+      for (std::size_t i = 0;i<num;i++)
+        if (dists[i] <= m_epsilon && angles[i] > m_normal_threshold)
+          score++;
+
+      return (score >= 12);
+    }
+
+    virtual void parameters(const std::vector<std::size_t>& indices,
+                            std::vector<std::pair<FT, FT> >& parameter_space,
+                            FT &cluster_epsilon,
+                            FT min[2],
+                            FT max[2]) const {
+      // Avoid compiler warnings about unused parameters.
+      (void)indices;
+      (void)parameter_space;
+      (void)cluster_epsilon;
+      (void)min;
+      (void)max;
+    }
+
+    void compute(const std::set<std::size_t>& indices,
+                 Input_iterator first,
+                 Traits traits,
+                 Point_map point_pmap,
+                 Normal_map normal_pmap,
+                 FT epsilon,
+                 FT normal_threshold) {
+      if (indices.size() < minimum_sample_size())
+        return;
+
+      m_first = first;
+      m_traits = traits;
+      m_point_pmap = point_pmap;
+      m_normal_pmap = normal_pmap;
+      m_epsilon = epsilon;
+      m_normal_threshold = normal_threshold;
+
+      std::vector<std::size_t> output(indices.begin(), indices.end());
+
+      create_shape(output);
+    }
+
+    inline bool operator<(const Shape &c) const {
+      return expected_value() < c.expected_value();
+    }
+
+    std::size_t cost_function(FT epsilon,
+                         FT normal_threshold,
+                         const std::vector<std::size_t> &indices) {
+      std::vector<FT> dists, angles;
+      dists.resize(indices.size());
+      squared_distance(indices, dists);
+      angles.resize(indices.size());
+      cos_to_normal(indices, angles);
+
+      std::size_t score_before = m_indices.size();
+
+      FT eps = epsilon * epsilon;
+      for (std::size_t i = 0;i<indices.size();i++) {
+          if (dists[i] <= eps && angles[i] > normal_threshold)
+            m_indices.push_back(indices[i]);
+        }
+
+      return m_indices.size() - score_before;
+    }
+
+    template<typename T> bool is_finite(T arg) {
+      return arg == arg && 
+        arg != std::numeric_limits<T>::infinity() &&
+        arg != -std::numeric_limits<T>::infinity();
+    }
+
+    void compute_bound(const std::size_t num_evaluated_points,
+                       const std::size_t num_available_points) {
+      hypergeometrical_dist(-2 - num_evaluated_points,
+                            -2 - num_available_points,
+                            -1 - signed(m_indices.size()),
+                            m_lower_bound, m_upper_bound);
+
+      m_lower_bound = -1 - m_lower_bound;
+      m_upper_bound = -1 - m_upper_bound;
+    }
+
+    void hypergeometrical_dist(const std::ptrdiff_t UN, 
+                               const std::ptrdiff_t x,
+                               const std::ptrdiff_t n, 
+                               FT &low,
+                               FT &high) {                           
+      const FT q = FT(x * n * double(UN - x) * (UN - n) / (UN - 1));
+      const FT sq = CGAL::sqrt(q);
+      low  = (x * n - sq) / UN;
+      high = (x * n + sq)/UN;
+
+      if (!is_finite<FT>(low) || !is_finite<FT>(high)) {
+        low = high = 0;
+      }
+    }
+
+
+    virtual bool supports_connected_component() const {
+      return false;
+    };
+
+    
+    // ------------------------------------------------------------------------
+    // Utilities
+    // ------------------------------------------------------------------------
+    FT get_x(const Vector_3& v) const { return m_traits.compute_x_3_object()(v); }
+    FT get_y(const Vector_3& v) const { return m_traits.compute_y_3_object()(v); }
+    FT get_z(const Vector_3& v) const { return m_traits.compute_z_3_object()(v); }
+    FT get_x(const Point_3& p) const { return m_traits.compute_x_3_object()(p); }
+    FT get_y(const Point_3& p) const { return m_traits.compute_y_3_object()(p); }
+    FT get_z(const Point_3& p) const { return m_traits.compute_z_3_object()(p); }
+    
+    Point_3 constr_pt() const
+    { return m_traits.construct_point_3_object()(ORIGIN); }
+    Point_3 constr_pt(FT x, FT y, FT z) const
+    { return m_traits.construct_point_3_object()(x, y, z); }
+    Vector_3 constr_vec() const
+    { return m_traits.construct_vector_3_object()(NULL_VECTOR); }
+    Vector_3 constr_vec(const Point_3& p, const Point_3& q) const
+    { return m_traits.construct_vector_3_object()(p, q); }
+
+    FT sqlen(const Vector_3& v) const
+    { return m_traits.compute_squared_length_3_object()(v); }
+    Vector_3 scale(const Vector_3& v, FT scale) const
+    { return m_traits.construct_scaled_vector_3_object()(v, scale); }
+    Vector_3 sum_vectors(const Vector_3& u, const Vector_3& v) const
+    { return m_traits.construct_sum_of_vectors_3_object()(u, v); }
+    Point_3 transl(const Point_3& p, const Vector_3 &v) const
+    { return m_traits.construct_translated_point_3_object()(p, v); }
+    FT scalar_pdct(const Vector_3& u, const Vector_3& v) const
+    { return m_traits.compute_scalar_product_3_object()(u, v); }
+    Vector_3 cross_pdct(const Vector_3& u, const Vector_3& v) const
+    { return m_traits.construct_cross_product_vector_3_object()(u, v); }
+
+  protected:
+    /// \endcond
+    // 
+    /// \cond SKIP_IN_MANUAL
+    /*!
+      Contains indices of the inliers of the candidate, access
+      to the point and normal data is provided via property maps.
+     */
+    std::vector<std::size_t> m_indices;
+
+    FT m_epsilon;
+
+    //deviation of normal, used during first check of the 3 normal
+    FT m_normal_threshold;
+
+    bool m_is_valid;
+    FT m_lower_bound;
+    FT m_upper_bound;
+
+    std::size_t m_score;
+
+    FT m_sum_expected_value;
+
+    //count the number of subset used so far for the score,
+    //and thus indicate the next one to use
+    std::size_t m_nb_subset_used;
+    bool m_has_connected_component;
+
+    Input_iterator m_first;
+
+    Traits m_traits;
+    Point_map m_point_pmap;
+    Normal_map m_normal_pmap;
+    /// \endcond
+  };  
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Sphere.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Sphere.h
new file mode 100644
index 0000000..93c9b66
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Sphere.h
@@ -0,0 +1,565 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_SPHERE_H
+#define CGAL_SHAPE_DETECTION_3_SPHERE_H
+
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/number_utils.h>
+#include <cmath>
+
+
+/*!
+ \file Sphere.h
+ */
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+    /*!
+     \ingroup PkgPointSetShapeDetection3Shapes
+     \brief Sphere implements Shape_base. The sphere is represented by its center and the radius.
+     \tparam Traits a model of `EfficientRANSACTraits` with the additional 
+             requirement for spheres (see `EfficientRANSACTraits` documentation).
+     */
+  template <class Traits>
+  class Sphere : public Shape_base<Traits> {
+    using Shape_base<Traits>::update_label;
+
+  public:    
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Point_map Point_map;
+      ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+      ///< property map to access the unoriented normal of an input point.
+    typedef typename Traits::Vector_3 Vector_3;
+      ///< vector type.
+    typedef typename Traits::Sphere_3 Sphere_3;
+      ///< sphere type.
+    typedef typename Traits::FT FT;
+      ///< number type.
+    typedef typename Traits::Point_3 Point_3;
+      ///< point type.
+    /// \endcond
+
+  public:
+    Sphere() : Shape_base<Traits>() {}
+
+    /*!
+      Conversion operator to convert to `Sphere_3` type.
+     */
+    operator Sphere_3() const {
+      return m_sphere;
+    }
+
+    /*!
+      Access to the center.
+     */
+    Point_3 center() const {
+      return this->sph_center(m_sphere);
+    }
+      
+    /*!
+      Access to the radius of the sphere.
+     */
+    FT radius() const {
+      return CGAL::sqrt(this->sqradius(m_sphere));
+    }
+
+    /// \cond SKIP_IN_MANUAL
+    /*!
+      Computes the squared Euclidean distance from query point to the shape.
+      */
+    FT squared_distance(const Point_3 &p) const {
+      const FT d = CGAL::sqrt(
+        this->sqlen(this->constr_vec(
+          p, this->sph_center(m_sphere)))) 
+        - CGAL::sqrt(this->sqradius(m_sphere));
+      return d * d;
+    }
+    
+    /*!
+      Helper function to write center, 
+      radius of the sphere and number of assigned points into a string.
+     */
+    std::string info() const {
+      std::stringstream sstr;
+      Point_3 c = this->sph_center(m_sphere);
+      FT r = CGAL::sqrt(this->sqradius(m_sphere));
+
+      sstr << "Type: sphere center: (" << this->get_x(c) << ", " << this->get_y(c);
+      sstr << ", " << this->get_z(c) << ") radius:" << r;
+      sstr << " #Pts: " <<  this->m_indices.size();
+
+      return sstr.str();
+    }
+    /// \endcond
+  protected:
+      /// \cond SKIP_IN_MANUAL
+
+    // ------------------------------------------------------------------------
+    // Utilities
+    // ------------------------------------------------------------------------
+    Sphere_3 constr_sphere(const Point_3& c, FT r) const
+    { return this->m_traits.construct_sphere_3_object()(c, r); }
+    Point_3 sph_center(const Sphere_3& s) const
+    { return this->m_traits.construct_center_3_object()(s); }
+    FT sqradius(const Sphere_3& s) const
+    { return this->m_traits.compute_squared_radius_3_object()(s); }
+
+    void create_shape(const std::vector<std::size_t> &indices) {
+      Point_3 p1 = this->point(indices[0]);
+      Point_3 p2 = this->point(indices[1]);
+      Point_3 p3 = this->point(indices[2]);
+
+      Vector_3 n1 = this->normal(indices[0]);
+      Vector_3 n2 = this->normal(indices[1]);
+      Vector_3 n3 = this->normal(indices[2]);
+
+
+      // Determine center: select midpoint of shortest line segment
+      // between p1 and p2. Implemented from "3D game engine design" by Eberly 2001
+      Vector_3 diff = this->constr_vec(p2, p1);
+      FT a = this->scalar_pdct(n1, n1);
+      FT b = -this->scalar_pdct(n1, n2);
+      FT c = this->scalar_pdct(n2, n2);
+      FT d = this->scalar_pdct(n1, diff);
+
+      FT det = CGAL::abs(a * c - b * b);
+
+      // degenerated when nearly parallel
+      if (det < (FT)0.00001) {
+        this->m_is_valid = false;
+        return;
+      }
+
+      FT e = -this->scalar_pdct(n2, diff);
+      FT invDet = (FT) 1.0 / det;
+      FT s = (b * e - c * d) * invDet;
+      FT t = (d * b - a * e) * invDet;
+
+      Vector_3 v_transl = this->sum_vectors(
+        this->constr_vec(CGAL::ORIGIN, this->transl(p1, this->scale(n1, s))),
+        this->constr_vec(CGAL::ORIGIN, this->transl(p2, this->scale(n2, t))));
+      Point_3 center = this->transl(
+        CGAL::ORIGIN, this->scale(v_transl, (FT)0.5));
+
+      Vector_3 v1 = (this->constr_vec(center, p1));
+      Vector_3 v2 = (this->constr_vec(center, p2));
+      FT d1 = CGAL::sqrt(this->sqlen(v1));
+      FT d2 = CGAL::sqrt(this->sqlen(v2));
+
+      if (CGAL::abs(d1 - d2) > (FT)2.0 * this->m_epsilon) {
+        this->m_is_valid = false;
+        return;
+      }
+
+      v1 = this->scale(v1, (FT)1.0 / d1);
+      v2 = this->scale(v2, (FT)1.0 / d2);
+
+      if (this->scalar_pdct(n1, v1) < this->m_normal_threshold ||
+          this->scalar_pdct(n2, v2) < this->m_normal_threshold) {
+        this->m_is_valid = false;
+        return;
+      }
+
+      Vector_3 v3 = this->constr_vec(center, p3);
+      FT d3 = CGAL::sqrt(this->sqlen(v3));
+      v3 = this->scale(v3, (FT)1.0 / d3);
+
+      FT radius = (d1 + d2) * (FT)0.5;
+
+      if (CGAL::abs(d3 - radius) > this->m_epsilon ||
+          this->scalar_pdct(n3, v3) < this->m_normal_threshold) {
+        this->m_is_valid = false;
+        return;
+      }
+
+      this->m_is_valid = true;
+
+      m_sphere = this->constr_sphere(center, radius * radius);
+    }
+
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &dists) const {
+
+      FT radius = CGAL::sqrt(this->sqradius(m_sphere));
+
+      for (std::size_t i = 0;i<indices.size();i++) {
+        dists[i] = CGAL::sqrt(this->sqlen(this->constr_vec(
+          this->sph_center(m_sphere), this->point(indices[i]))))
+          - radius;
+
+        dists[i] = dists[i] * dists[i];
+      }
+    }
+
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices, 
+                               std::vector<FT> &angles) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+        Vector_3 n = this->constr_vec(
+          this->point(indices[i]),
+          this->sph_center(m_sphere));
+
+        FT length = CGAL::sqrt(this->sqlen(n));
+        if (length == 0) {
+          angles[i] = (FT)1.0;
+          continue;
+        }
+
+        n = this->scale(n, (FT)1.0 / length);
+        angles[i] = CGAL::abs(this->scalar_pdct(this->normal(indices[i]), n));
+      }
+    }
+
+    virtual FT cos_to_normal(const Point_3 &p, const Vector_3 &n) const {
+      Vector_3 sphere_normal = this->constr_vec(p, this->sph_center(m_sphere));
+      FT length = (FT)(CGAL::sqrt(this->sqlen(n)));
+      if (length == 0)
+        return 1;
+
+      sphere_normal = this->scale(sphere_normal, (FT)1.0 / length);
+      return CGAL::abs(this->scalar_pdct(sphere_normal, n));
+    }
+      
+    virtual std::size_t minimum_sample_size() const {
+      return 3;
+    }
+
+    // Maps to the range [-1,1]^2
+    static void concentric_mapping(FT phi, FT proj, FT rad, FT &x, FT &y) {
+      phi = (phi < FT(-CGAL_M_PI_4)) ? phi + FT(2 * CGAL_PI) : phi;
+      proj = (proj < FT(-1.0)) ? FT(-1.0) : ((proj > FT(1.0)) ? FT(1.0) : proj);
+      FT r = FT(acos(double(CGAL::abs(proj)))) / FT(CGAL_M_PI_2);
+
+      FT a = 0, b = 0;
+      if (phi < FT(CGAL_M_PI_4)) {
+        a = r;
+        b = phi * r / FT(CGAL_M_PI_4);
+      }
+      else if (phi < FT(3.0 * CGAL_M_PI_4)) {
+        a = -FT(phi - CGAL_M_PI_2) * r / FT(CGAL_M_PI_4);
+        b = r;
+      }
+      else if (phi < FT(5.0 * CGAL_M_PI_4)) {
+        a = -r;
+        b = (phi - FT(CGAL_PI)) * (-r) / FT(CGAL_M_PI_4);
+      }
+      else {
+        a = (phi - 3 * FT(CGAL_M_PI_2)) * r / FT(CGAL_M_PI_4);
+        b = -r;
+      }
+
+      x = a;
+      y = b;
+
+      // Map into hemisphere
+      if (proj >= 0)
+        y += 1;
+      else
+        y = -1 - y;
+
+      // Scale to surface distance
+      x = FT(x * CGAL_M_PI_2 * rad);
+      y = FT(y * CGAL_M_PI_2 * rad);
+    }
+
+    virtual void parameters(const std::vector<std::size_t> &indices,
+                            std::vector<std::pair<FT, FT> > &parameterSpace,
+                            FT &cluster_epsilon,
+                            FT min[2],
+                            FT max[2]) const {
+      Vector_3 axis = this->constr_vec();
+      FT rad = radius();
+      // Take average normal as axis
+      for (std::size_t i = 0;i<indices.size();i++)
+        axis = this->sum_vectors(axis, this->normal(indices[i]));
+      axis = this->scale(axis, FT(1) / CGAL::sqrt(this->sqlen(axis)));
+
+      // create basis d1, d2
+      Vector_3 d1 = this->constr_vec(
+        ORIGIN, this->constr_pt(FT(0), FT(0), FT(1)));
+      Vector_3 d2 = this->cross_pdct(axis, d1);
+      FT l = this->sqlen(d2);
+      if (l < (FT)0.0001) {
+        d1 = this->constr_vec(ORIGIN, this->constr_pt(FT(1), FT(0), FT(0)));
+        d2 = this->cross_pdct(axis, d1);
+        l = this->sqlen(d2);
+      }
+      d2 = this->scale(d2, FT(1) / CGAL::sqrt(l));
+
+      d1 = this->cross_pdct(axis, d2);
+      l = CGAL::sqrt(this->sqlen(d1));
+      if (l == 0)
+        return;
+
+      d1 = this->scale(d1, (FT)1.0 / l);
+
+      // Process first point separately to initialize min/max
+      Vector_3 vec = this->constr_vec(
+        this->sph_center(m_sphere), this->point(indices[0]));
+
+      // sign indicates northern or southern hemisphere
+      FT proj = (this->scalar_pdct(axis, vec)) / rad;
+      FT phi = atan2(this->scalar_pdct(vec, d2), this->scalar_pdct(vec, d1));
+      FT x = FT(0), y = FT(0);
+      concentric_mapping(phi, proj, rad, x, y);
+      CGAL_assertion( x==x && y==y); // check not nan's
+
+      min[0] = max[0] = x;
+      min[1] = max[1] = y;
+
+      parameterSpace[0] = std::pair<FT, FT>(x, y);
+
+      for (std::size_t i = 1;i<indices.size();i++) {
+        Vector_3 vec = this->constr_vec(
+          this->sph_center(m_sphere), this->point(indices[i]));
+        // sign indicates northern or southern hemisphere
+        proj = (this->scalar_pdct(axis, vec)) / rad;
+        phi = atan2(this->scalar_pdct(vec, d2), this->scalar_pdct(vec, d1));
+
+        concentric_mapping(phi, proj, rad, x, y);
+        CGAL_assertion( x==x && y==y); // check not nan's
+
+        min[0] = (std::min<FT>)(min[0], x);
+        max[0] = (std::max<FT>)(max[0], x);
+
+        min[1] = (std::min<FT>)(min[1], y);
+        max[1] = (std::max<FT>)(max[1], y);
+
+        parameterSpace[i] = std::pair<FT, FT>(x, y);
+      }
+
+      // Is close to wrapping around? Check all three directions separately
+      m_wrap_right = abs(max[0] - CGAL_M_PI_2 * rad) < (cluster_epsilon * 0.5);
+      m_wrap_left = abs(min[0] + CGAL_M_PI_2 * rad) < (cluster_epsilon * 0.5);
+
+      FT diff_top = CGAL::abs(-FT(CGAL_PI * rad) - min[1]) 
+        + FT(CGAL_PI * rad) - max[1];
+      m_wrap_top = diff_top < cluster_epsilon;
+
+      if (m_wrap_top || m_wrap_left || m_wrap_right) {
+        FT fl = FT(floor((CGAL_PI * rad) / cluster_epsilon));
+
+        if (fl > 0.9) {
+          FT adjusted_cf = FT(CGAL_PI * rad) / fl;
+
+          if ( (adjusted_cf < (2 * cluster_epsilon)))
+            cluster_epsilon = adjusted_cf;
+        }
+
+        // center bitmap at equator
+        FT required_space = ceil(
+          (std::max<FT>)(CGAL::abs(min[1]), max[1]) / cluster_epsilon)
+          * cluster_epsilon;
+        min[1] = -required_space;
+        max[1] = required_space;
+      }
+
+      m_equator = std::size_t((abs(min[1])) / cluster_epsilon - 0.5);
+    }
+
+    virtual void post_wrap(const std::vector<unsigned int> &bitmap,
+      const std::size_t &u_extent,
+      const std::size_t &v_extent,
+      std::vector<unsigned int> &labels) const {
+        unsigned int l;
+        unsigned int nw, n, ne;
+        if (m_wrap_top && v_extent > 2) {
+          // Handle first index separately.
+          l = bitmap[0];
+          if (l) {
+            n = bitmap[(v_extent - 1) * u_extent];
+
+            if (u_extent == 1) {
+              if (n && l != n) {
+                l = (std::min<unsigned int>)(n, l);
+                update_label(labels, (std::max<unsigned int>)(n, l), l);
+                return;
+              }
+            }
+
+            ne = bitmap[(v_extent - 1) * u_extent + 1];
+
+            if (n && n != l) {
+              l = (std::min<unsigned int>)(n, l);
+              update_label(labels, (std::max<unsigned int>)(n, l), l);
+            }
+            else if (ne && ne != l) {
+              l = (std::min<unsigned int>)(ne, l);
+              update_label(labels, (std::max<unsigned int>)(ne, l), l);
+            }
+          }
+
+          for (std::size_t i = 1;i<u_extent - 1;i++) {
+            l = bitmap[i];
+            if (!l)
+              continue;
+
+            nw = bitmap[(v_extent - 1) * u_extent + i - 1];
+            n = bitmap[(v_extent - 1) * u_extent + i];
+            ne = bitmap[(v_extent - 1) * u_extent + i + 1];
+
+            if (nw && nw != l) {
+              l = (std::min<unsigned int>)(nw, l);
+              update_label(labels, (std::max<unsigned int>)(nw, l), l);
+            }
+            if (n && n != l) {
+              l = (std::min<unsigned int>)(n, l);
+              update_label(labels, (std::max<unsigned int>)(n, l), l);
+            }
+            else if (ne && ne != l) {
+              l = (std::min<unsigned int>)(ne, l);
+              update_label(labels, (std::max<unsigned int>)(ne, l), l);
+            }
+          }
+
+          // Handle last index separately
+          l = bitmap[u_extent - 1];
+          if (l) {
+            n = bitmap[u_extent * v_extent - 1];
+            nw = bitmap[u_extent * v_extent - 2];
+
+            if (n && n != l) {
+              l = (std::min<unsigned int>)(n, l);
+              update_label(labels, (std::max<unsigned int>)(n, l), l);
+            }
+            else if (nw && nw != l) {
+              l = (std::min<unsigned int>)(nw, l);
+              update_label(labels, (std::max<unsigned int>)(nw, l), l);
+            }
+          }
+        }
+
+        // Walk upwards on the right side in the northern hemisphere
+        if (m_wrap_right && v_extent > 2) {
+          // First index
+          l = bitmap[(m_equator + 1) * u_extent - 1];
+          unsigned int ws = bitmap[(m_equator + 3) * u_extent - 1];
+          
+          if (l && ws && l != ws) {
+            l = (std::min<unsigned int>)(ws, l);
+            update_label(labels, (std::max<unsigned int>)(ws, l), l);
+          }
+
+          for (std::size_t i = 1;i<(v_extent>>1) - 1;i++) {
+            l = bitmap[(m_equator - i + 1) * u_extent - 1];
+            if (!l)
+              continue;
+
+            unsigned int wn = bitmap[(m_equator + i) * u_extent - 1];
+            unsigned int w = bitmap[(m_equator + i + 1) * u_extent - 1];
+            ws = bitmap[(m_equator + i + 2) * u_extent - 1];
+
+            if (wn && wn != l) {
+              l = (std::min<unsigned int>)(wn, l);
+              update_label(labels, (std::max<unsigned int>)(wn, l), l);
+            }
+            if (w && w != l) {
+              l = (std::min<unsigned int>)(w, l);
+              update_label(labels, (std::max<unsigned int>)(w, l), l);
+            }
+            else if (ws && ws != l) {
+              l = (std::min<unsigned int>)(ws, l);
+              update_label(labels, (std::max<unsigned int>)(ws, l), l);
+            }
+          }
+
+          // Last index
+          l = bitmap[u_extent - 1];
+          if (l) {
+            unsigned int w = bitmap[u_extent * v_extent - 1];
+            unsigned int wn = bitmap[(v_extent - 1) * u_extent - 1];
+
+            if (w && w != l) {
+              l = (std::min<unsigned int>)(w, l);
+              update_label(labels, (std::max<unsigned int>)(w, l), l);
+            }
+            else if (wn && wn != l) {
+              l = (std::min<unsigned int>)(wn, l);
+              update_label(labels, (std::max<unsigned int>)(wn, l), l);
+            }
+          }
+        }
+
+        if (m_wrap_left && v_extent > 2) {
+          // First index
+          l = bitmap[(m_equator) * u_extent];
+          unsigned int es = bitmap[(m_equator + 2) * u_extent];
+
+          if (l && l != es) {
+            l = (std::min<unsigned int>)(es, l);
+            update_label(labels, (std::max<unsigned int>)(es, l), l);
+          }
+
+          for (std::size_t i = 1;i<(v_extent>>1) - 1;i++) {
+            l = bitmap[(m_equator - i) * u_extent];
+            if (!l)
+              continue;
+
+            unsigned int en = bitmap[(m_equator + i) * u_extent];
+            unsigned int e = bitmap[(m_equator + i + 1) * u_extent];
+            es = bitmap[(m_equator + i + 2) * u_extent];
+
+            if (en && en != l) {
+              l = (std::min<unsigned int>)(en, l);
+              update_label(labels, (std::max<unsigned int>)(en, l), l);
+            }
+            if (e && e != l) {
+              l = (std::min<unsigned int>)(e, l);
+              update_label(labels, (std::max<unsigned int>)(e, l), l);
+            }
+            else if (es && es != l) {
+              l = (std::min<unsigned int>)(es, l);
+              update_label(labels, (std::max<unsigned int>)(es, l), l);
+            }
+          }
+
+          // Last index
+          l = bitmap[0];
+          if (l) {
+            unsigned int w = bitmap[(v_extent - 1) * u_extent];
+            unsigned int wn = bitmap[(v_extent - 2) * u_extent];
+
+            if (w && w != l) {
+              l = (std::min<unsigned int>)(w, l);
+              update_label(labels, (std::max<unsigned int>)(w, l), l);
+            }
+            else if (wn && wn != l) {
+              l = (std::min<unsigned int>)(wn, l);
+              update_label(labels, (std::max<unsigned int>)(wn, l), l);
+            }
+          }
+        }
+    }
+
+    virtual bool supports_connected_component() const {
+      return true;
+    }
+    
+  private:
+    Sphere_3 m_sphere;
+    mutable bool m_wrap_right, m_wrap_top, m_wrap_left;
+    mutable std::size_t m_equator;
+/// \endcond
+  };
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Torus.h b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Torus.h
new file mode 100644
index 0000000..15a04e9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Shape_detection_3/Torus.h
@@ -0,0 +1,407 @@
+// Copyright (c) 2015 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
+//
+
+#ifndef CGAL_SHAPE_DETECTION_3_TORUS_H
+#define CGAL_SHAPE_DETECTION_3_TORUS_H
+
+#include <CGAL/Shape_detection_3/Shape_base.h>
+#include <CGAL/Circle_2.h>
+#include <CGAL/number_utils.h>
+#include <cmath>
+
+/*!
+ \file Torus.h
+ */
+
+namespace CGAL {
+  namespace Shape_detection_3 {
+    /*!
+      \ingroup PkgPointSetShapeDetection3Shapes
+      \brief Torus implements Shape_base. The torus is represented by the
+      symmetry axis, its center on the axis and the major and minor radii.
+     \tparam Traits a model of `EfficientRANSACTraits` with the additional 
+             requirement for tori (see `EfficientRANSACTraits` documentation).
+     */
+  template <class Traits>
+  class Torus : public Shape_base<Traits> {
+  public:
+    /// \cond SKIP_IN_MANUAL
+    typedef typename Traits::Point_map Point_map;
+     ///< property map to access the location of an input point.
+    typedef typename Traits::Normal_map Normal_map;
+     ///< property map to access the unoriented normal of an input point.
+    typedef typename Traits::FT FT;
+    ///< number type.
+    typedef typename Traits::Point_3 Point_3;
+    ///< point type.
+    typedef typename Traits::Vector_3 Vector_3;
+    ///< vector type.
+    typedef typename Traits::Vector_2 Vector_2;
+    ///< 2D vector type.
+    typedef typename Traits::Point_2 Point_2;
+    ///< 2D point type used during construction.
+    typedef typename Traits::Circle_2 Circle_2;
+     ///< cricle type used during construction.
+    /// \endcond
+
+    Torus() : Shape_base<Traits>() {}
+      
+    /*!
+      Direction of symmetry axis.
+     */
+    Vector_3 axis() const {
+      return m_axis;
+    }
+
+    /*!
+      Center point on symmetry axis.
+     */
+    Point_3 center() const {
+      return m_center;
+    }
+      
+    /*!
+      Major radius of the torus.
+     */
+    FT major_radius() const {
+      return m_majorRad;
+    }
+      
+    /*!
+      Minor radius of the torus.
+      */
+    FT minor_radius() const {
+      return m_minorRad;
+    }
+
+    /// \cond SKIP_IN_MANUAL
+
+    /*!
+      Helper function to write center point, symmetry axis
+      and the two radii into a string.
+     */
+    std::string info() const {
+      std::stringstream sstr;
+      sstr << "Type: torus center(" << this->get_x(m_center) << ", " << this->get_y(m_center);
+      sstr << ", " << this->get_z(m_center) << ") axis(" << this->get_x(m_axis) << ", ";
+      sstr << this->get_y(m_axis) << ", " << this->get_z(m_axis) << ") major radius = ";
+      sstr << m_majorRad << " minor radius = " << m_minorRad << " #Pts: ";
+      sstr << this->m_indices.size();
+
+      return sstr.str();
+    }
+
+    /*!
+      Computes squared Euclidean distance from query point to the shape.
+      */
+    FT squared_distance(const Point_3 &p) const {
+      const Vector_3 d = this->constr_vec(m_center, p);
+      
+      // height over symmetry plane
+      const FT height = this->scalar_pdct(d, m_axis);
+
+      // distance from axis in plane
+      const FT l = CGAL::sqrt(this->scalar_pdct(d, d) - height * height);
+
+      // inPlane distance from circle
+      const FT l2 = m_majorRad - l;
+
+      // distance from torus
+      const FT squared_dist = CGAL::sqrt(height * height + l2 * l2) - m_minorRad;
+
+      return squared_dist * squared_dist;
+    }
+    /// \endcond
+
+  protected:
+    /// \cond SKIP_IN_MANUAL
+
+    // ------------------------------------------------------------------------
+    // Utilities
+    // ------------------------------------------------------------------------
+    FT get_x_2(const Vector_2& v) const { return this->m_traits.compute_x_2_object()(v); }
+    FT get_y_2(const Vector_2& v) const { return this->m_traits.compute_y_2_object()(v); }
+    FT get_x_2(const Point_2& p) const { return this->m_traits.compute_x_2_object()(p); }
+    FT get_y_2(const Point_2& p) const { return this->m_traits.compute_y_2_object()(p); }
+
+    Circle_2 constr_circle(const Point_2& a, const Point_2& b,const Point_2& c) const
+    { return this->m_traits.construct_circle_2_object()(a, b, c); }
+    Point_2 circle_center(const Circle_2& s) const
+    { return this->m_traits.construct_center_2_object()(s); }
+    FT sqradius(const Circle_2& s) const
+    { return this->m_traits.compute_squared_radius_2_object()(s); }
+    Point_2 constr_point_2(FT a, FT b) const
+    { return this->m_traits.construct_point_2_object()(a, b); }
+    Vector_2 constr_vec_2(const Point_2 &a, const Point_2 &b) const
+    { return this->m_traits.construct_vector_2_object()(a, b); }
+    FT sqlen_2(const Vector_2& v) const
+    { return this->m_traits.compute_squared_length_2_object()(v); }
+    bool collinear_2(const Point_2& p, const Point_2& q, const Point_2& r) const
+    { return this->m_traits.collinear_2_object()(p, q, r); }
+
+    void create_shape(const std::vector<std::size_t> &indices) {
+      std::vector<Point_3> p;
+      std::vector<Vector_3> n;
+
+      p.resize(indices.size());
+      n.resize(indices.size());
+
+      for (std::size_t i = 0;i<indices.size();i++) {
+        p[i] = this->point(indices[i]);
+        n[i] = this->normal(indices[i]);
+      }
+
+      // Implemented method from 'Geometric least-squares fitting of spheres, cylinders, cones and tori' by G. Lukacs,A.D. Marshall, R. R. Martin
+      const FT a01 = this->scalar_pdct(this->cross_pdct(n[0], n[1]), n[2]);
+      const FT b01 = this->scalar_pdct(this->cross_pdct(n[0], n[1]), n[3]);
+      const FT a0 = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[1], p[2]), n[0]), n[2]);
+      const FT b0 = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[1], p[3]), n[0]), n[3]);
+      const FT a1 = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[2], p[0]), n[1]), n[2]);
+      const FT b1 = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[3], p[0]), n[1]), n[3]);
+      const FT a = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[2], p[0]), this->constr_vec(p[0], p[1])), n[2]);
+      const FT b = this->scalar_pdct(this->cross_pdct(this->constr_vec(p[3], p[0]), this->constr_vec(p[0], p[1])), n[3]);
+
+      FT div = (b1 * a01 - b01 * a1);
+      if (div == 0)
+        return;
+
+      div = (FT)1.0 / div;
+      const FT r = ((a01 * b + b1 * a0 - b0 * a1 - b01 * a)) * div * (FT)0.5;
+      const FT q = (b * a0 - b0 * a) * div;
+
+      FT root = r * r - q;
+      if (r * r - q < 0)
+        root = 0;
+
+      const FT y1 = -r - CGAL::sqrt(root);
+      const FT y2 = -r + CGAL::sqrt(root);
+      FT x1 = (a01 * y1 + a0);
+      FT x2 =  (a01 * y2 + a0);
+
+      if (x1 == 0 || x2 == 0)
+        return;
+
+      x1 = -(a1 * y1 + a) / x1;
+      x2 = -(a1 * y2 + a) / x2;
+
+      // 1. center + axis
+      FT majorRad1 = FLT_MAX, minorRad1 = FLT_MAX, dist1 = FLT_MAX;
+      Point_3 c1 = this->constr_pt();
+      Vector_3 axis1 = this->constr_vec();
+      if (is_finite(x1) && is_finite(y1)) {
+        c1 = this->transl(p[0], this->scale(n[0], x1));
+        axis1 = this->constr_vec(this->transl(p[1], this->scale(n[1], y1)), c1);
+
+        FT l = this->sqlen(axis1);
+        if (l > (FT)0.00001 && l == l) {
+          axis1 = this->scale(axis1, FT(1.0) / CGAL::sqrt(l));
+          dist1 = getCircle(c1, axis1, p, majorRad1, minorRad1);
+        }
+      }
+
+      // 2. center + axis
+      FT majorRad2 = 0, minorRad2 = 0, dist2 = FLT_MAX;
+      Point_3 c2 = this->constr_pt();
+      Vector_3 axis2 = this->constr_vec();
+      if (is_finite(x2) && is_finite(y2)) {
+        c2 = this->transl(p[0], this->scale(n[0], x2));
+        axis2 = this->constr_vec(this->transl(p[1], this->scale(n[1], y2)), c2);
+
+        FT l = this->sqlen(axis2);
+        if (l > (FT)0.00001 && l == l) {
+          axis2 = this->scale(axis2, FT(1.0) / CGAL::sqrt(l));
+          dist2 = getCircle(c2, axis2, p, majorRad2, minorRad2);
+        }
+      }
+
+      if (dist1 < dist2) {
+        m_center = c1;
+        m_axis = axis1;
+        m_majorRad = majorRad1;
+        m_minorRad = CGAL::sqrt(minorRad1);
+      }
+      else {
+        m_center = c2;
+        m_axis = axis2;
+        m_majorRad = majorRad2;
+        m_minorRad = CGAL::sqrt(minorRad2);
+      }
+
+      // Drop if shape is probably sphere
+      if (m_majorRad < this->m_epsilon) {
+        this->m_is_valid = false;
+
+        return;
+      }
+
+      //validate points and normals
+      for (std::size_t i = 0;i<indices.size();i++) {
+        // check distance
+        if (squared_distance(p[i]) > this->m_epsilon) {
+          this->m_is_valid = false;
+          return;
+        }
+
+        // check normal deviation
+        Vector_3 d = this->constr_vec(m_center, p[i]);
+
+        Vector_3 in_plane = this->cross_pdct(m_axis,
+          this->cross_pdct(m_axis, d));
+        if (this->scalar_pdct(in_plane, d) < 0)
+          in_plane = this->scale(in_plane, FT(-1.0));
+
+        FT length = CGAL::sqrt(this->sqlen(in_plane));
+        if (length == 0)
+          return;
+
+        in_plane = this->scale(in_plane, FT(1.0) / length);
+
+        d = this->constr_vec((this->transl(m_center, this->scale(in_plane, m_majorRad))), p[i]);
+
+        length = CGAL::sqrt(this->sqlen(d));
+        if (length == 0)
+          return;
+
+        d = this->scale(d, FT(1.0) / length);
+        if (CGAL::abs(this->scalar_pdct(d, n[i])) < this->m_normal_threshold) {
+          this->m_is_valid = false;
+          return;
+        }
+      }
+
+      this->m_is_valid = true;
+    }
+
+    virtual void squared_distance(const std::vector<std::size_t> &indices,
+                                  std::vector<FT> &dists) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+        Point_3 po = this->point(indices[i]);
+        Vector_3 d = this->constr_vec(m_center, po);
+        // height over symmetry plane
+        const FT p = this->scalar_pdct(d, m_axis);
+        // distance from axis in plane
+        FT l = CGAL::sqrt(this->scalar_pdct(d, d) - p * p);
+
+        // inPlane distance from circle
+        const FT l2 = m_majorRad - l;
+
+        // distance from torus
+        l = CGAL::sqrt(p * p + l2 * l2) - m_minorRad;
+        dists[i] = l * l;
+      }
+    }
+
+    virtual void cos_to_normal(const std::vector<std::size_t> &indices, 
+                               std::vector<FT> &angles) const {
+      for (std::size_t i = 0;i<indices.size();i++) {
+        Vector_3 d = this->constr_vec(m_center, this->point(indices[i]));
+
+        Vector_3 in_plane = this->cross_pdct(m_axis,
+                                              this->cross_pdct(m_axis, d));
+        if (this->scalar_pdct(in_plane, d) < 0)
+          in_plane = this->scale(in_plane, FT(-1.0));
+
+        FT length = (FT) CGAL::sqrt(this->sqlen(in_plane));
+
+        // If length is 0 the point is on the axis, maybe in the apex. We
+        // accept any normal for that position.
+        if (length == 0) {
+          angles[i] = (FT)1.0;
+          continue;
+        }
+
+        in_plane = this->scale(in_plane,FT(1.0) / CGAL::sqrt(this->sqlen(in_plane)));
+
+        d = this->constr_vec((this->transl(m_center, this->scale(in_plane, m_majorRad))), this->point(indices[i]));
+        d = this->scale(d, FT(1.0) / CGAL::sqrt(this->sqlen(d)));
+        angles[i] = CGAL::abs(this->scalar_pdct(d, this->normal(indices[i])));
+      }
+    }
+
+    FT cos_to_normal(const Point_3 &p, const Vector_3 &n) const {
+      Vector_3 d = this->constr_vec(m_center, p);
+
+      Vector_3 in_plane = this->cross_pdct(m_axis,
+                                           this->cross_pdct(m_axis, d));
+      if (this->scalar_pdct(in_plane, d) < 0)
+        in_plane = -in_plane;
+      
+      float length = CGAL::sqrt(this->sqlen(in_plane));
+
+      // If length is 0 the point is on the axis, maybe in the apex. We
+      // accept any normal for that position.
+      if (length == 0) {
+        return (FT)1.0;
+      }
+
+      in_plane = in_plane / CGAL::sqrt(this->sqlen(in_plane));
+
+      d = p - (m_center + this->scalar_pdct(in_plane, m_majorRad));
+      d = d / CGAL::sqrt(this->sqlen(d));
+
+      return CGAL::abs(d * n);
+    }
+      
+    virtual std::size_t minimum_sample_size() const {
+        return 4;
+    }
+
+    virtual bool supports_connected_component() const {
+      return false;
+    }
+
+  private:
+    FT getCircle(Point_3 &center, const Vector_3 &axis, std::vector<Point_3> p, FT &majorRad, FT &minorRad) const {
+      // create spin image
+      std::vector<Point_2> pts;
+      pts.resize(p.size());
+      for (unsigned int i = 0;i<p.size();i++) {
+        Vector_3 d = this->constr_vec(center, p[i]);
+        FT e = this->scalar_pdct(d, axis);
+        FT f = this->scalar_pdct(d, d) - e * e;
+        if (f <= 0)
+          pts[i] = this->constr_point_2(e, (FT) 0);
+        else
+          pts[i] = this->constr_point_2(e, CGAL::sqrt(this->scalar_pdct(d, d) - e * e));
+      }
+
+      if (this->collinear_2(pts[0], pts[1], pts[2])) {
+        return (std::numeric_limits<FT>::max)();
+      }
+
+      Circle_2 c = this->constr_circle(pts[0], pts[1], pts[2]);
+      minorRad = this->sqradius(c);
+      majorRad = this->get_y_2(this->circle_center(c));
+      center = this->transl(center, this->scale(axis, this->get_x_2(this->circle_center(c))));
+
+      return CGAL::abs(
+        this->sqlen_2(this->constr_vec_2(this->circle_center(c), pts[3])) - this->sqradius(c));
+    }
+
+    Point_3 m_center;
+    Vector_3 m_axis;
+    FT m_majorRad;
+    FT m_minorRad;
+    /// \endcond
+  };
+}
+}
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Side_of_bounded_square_2.h b/3rdparty/CGAL-4.8/include/CGAL/Side_of_bounded_square_2.h
new file mode 100644
index 0000000..001df0d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Side_of_bounded_square_2.h
@@ -0,0 +1,579 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+//ON_UNBOUNDED_SIDE = -1,
+//ON_BOUNDARY = 0,
+//ON_BOUNDED_SIDE = 1
+
+#ifndef CGAL_SIDE_OF_BOUNDED_SQUARE_2_H
+#define CGAL_SIDE_OF_BOUNDED_SQUARE_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/enum.h>
+#include <CGAL/Orientation_Linf_2.h>
+#include <CGAL/tuple.h>
+
+namespace CGAL {
+
+    template<class K>
+    class Side_of_bounded_square_2
+    {
+    private:
+      typedef typename K::Point_2               Point_2;
+      typedef Orientation_Linf_2<K>             Orientation_Linf_2_Type;
+      typedef typename K::Compare_x_2           Compare_x_2;
+      typedef typename K::Compare_y_2           Compare_y_2;
+      typedef typename K::FT                    FT;
+      typedef typename K::Comparison_result     Comparison_result;
+
+      typedef CGAL::cpp11::tuple<const bool, const bool,
+                 const bool, const bool, const size_t> SmallerEqTuple;
+
+      typedef CGAL::cpp11::tuple<FT const *, FT const *,
+                   const bool, const bool, const bool,
+                   Point_2 const *, Point_2 const *> MinMaxTuple;
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+
+      Orientation_Linf_2_Type orientation_Linf;
+
+      inline MinMaxTuple
+      minmax(const FT &p, const FT &q, const FT &r,
+             const Point_2 &pt_p, const Point_2 &pt_q, const Point_2 &pt_r)
+      const
+      {
+        FT const * min_p (NULL);
+        FT const * max_p (NULL);
+        bool samepq = false;
+        bool samepr = false;
+        bool sameqr = false;
+        const Comparison_result cmppq = compare(p, q);
+        switch(cmppq) {
+          case SMALLER:
+            min_p = &p;
+            max_p = &q;
+            break;
+          case LARGER:
+            min_p = &q;
+            max_p = &p;
+            break;
+          default: // EQUAL
+            min_p = &p;
+            max_p = &q;
+            samepq = true;
+            break;
+        }
+        const Comparison_result cmppr = compare(p, r);
+        Comparison_result cmpqr;
+        if (samepq) {
+          cmpqr = cmppr;
+          switch(cmppr) {
+            case SMALLER:
+              max_p = &r;
+              break;
+            case LARGER:
+              min_p = &r;
+              break;
+            default: // EQUAL is impossible
+              CGAL_assertion(false);
+              break;
+          }
+        } else {
+          if (min_p == &p) {
+            switch(cmppr) {
+              case SMALLER:
+                cmpqr = compare(q, r);
+                switch(cmpqr) {
+                  case SMALLER:
+                    max_p = &r;
+                    break;
+                  case LARGER:
+                    break;
+                  default:
+                    // q and r have the same coord
+                    sameqr = true;
+                    break;
+                }
+                break;
+              case LARGER:
+                cmpqr = cmppr;
+                min_p = &r;
+                break;
+              default:
+                // p and r have the same coord
+                cmpqr = - cmppr;
+                samepr = true;
+                break;
+            }
+          } else { // min_p == &q
+            switch(cmppr) {
+              case SMALLER:
+                cmpqr = cmppr;
+                max_p = &r;
+                break;
+              case LARGER:
+                cmpqr = compare(q, r);
+                switch(cmpqr) {
+                  case SMALLER:
+                    break;
+                  case LARGER:
+                    min_p = &r;
+                    break;
+                  default:
+                    // q and r have the same coord
+                    sameqr = true;
+                    break;
+                }
+                break;
+              default:
+                // p and r have the same coord
+                cmpqr = - cmppq;
+                samepr = true;
+                break;
+            }
+          }
+        }
+        CGAL_assertion(min_p != NULL);
+        CGAL_assertion(max_p != NULL);
+        Point_2 const * pt_min_p =
+          (min_p == &p)? &pt_p : (min_p == &q)? &pt_q : &pt_r;
+        Point_2 const * pt_max_p =
+          (max_p == &p)? &pt_p : (max_p == &q)? &pt_q : &pt_r;
+        CGAL_SDG_DEBUG(std::cout << "debug minmax cmppq=" << cmppq
+            << " cmppr=" << cmppr << " cmpqr=" << cmpqr << std::endl; );
+        return CGAL::cpp11::make_tuple(
+            min_p, max_p, samepq, samepr, sameqr, pt_min_p, pt_max_p);
+      }
+
+      inline SmallerEqTuple analyze_smalleq(
+          const Comparison_result & cxtmax,
+          const Comparison_result & cytmax,
+          const Comparison_result & cxmint,
+          const Comparison_result & cymint) const
+      {
+        CGAL_precondition(cxtmax != LARGER);
+        CGAL_precondition(cytmax != LARGER);
+        CGAL_precondition(cxmint != LARGER);
+        CGAL_precondition(cymint != LARGER);
+        size_t count_eq = 0;
+        const bool at_rgt (cxtmax == EQUAL);
+        bool at_lft (false);
+        if (at_rgt) {
+          ++count_eq;
+          CGAL_assertion( cxmint == SMALLER );
+        } else {
+          at_lft = cxmint == EQUAL;
+          if (at_lft) { ++count_eq; }
+        }
+        const bool at_top (cytmax == EQUAL);
+        bool at_bot (false);
+        if (at_top) {
+          ++count_eq;
+          CGAL_assertion( cymint == SMALLER );
+        } else {
+          at_bot = cymint == EQUAL;
+          if (at_bot) { ++count_eq; }
+        }
+        return CGAL::cpp11::make_tuple(
+            at_rgt, at_top, at_lft, at_bot, count_eq);
+      }
+
+      inline Bounded_side predicate(const Point_2 &p, const Point_2 &q,
+                  const Point_2 &r, const Point_2 &t) const
+      {
+        CGAL_SDG_DEBUG(std::cout
+            << "debug Side_of_bounded_square_2 entering" << std::endl;);
+        CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs (pqrt)= (" << p
+            << ") (" << q << ") (" << r << ") (" << t << ")" << std::endl;);
+
+        CGAL_assertion(orientation_Linf(p,q,r) != DEGENERATE);
+
+        //compute the minimum x and maximum x
+        const FT px (p.x()), qx (q.x()), rx (r.x());
+        MinMaxTuple tupx = minmax(px, qx, rx, p, q, r);
+        FT const * lft_p = CGAL::cpp11::get<0>(tupx);
+        FT const * rgt_p = CGAL::cpp11::get<1>(tupx);
+        const bool samex_pq = CGAL::cpp11::get<2>(tupx);
+        const bool samex_pr = CGAL::cpp11::get<3>(tupx);
+        const bool samex_qr = CGAL::cpp11::get<4>(tupx);
+        CGAL_assertion(lft_p != NULL);
+        CGAL_assertion(rgt_p != NULL);
+
+        //compute the minimum y and maximum y
+        const FT py (p.y()), qy (q.y()), ry (r.y());
+        MinMaxTuple tupy = minmax(py, qy, ry, p, q, r);
+        FT const * bot_p = CGAL::cpp11::get<0>(tupy);
+        FT const * top_p = CGAL::cpp11::get<1>(tupy);
+        const bool samey_pq = CGAL::cpp11::get<2>(tupy);
+        const bool samey_pr = CGAL::cpp11::get<3>(tupy);
+        const bool samey_qr = CGAL::cpp11::get<4>(tupy);
+        CGAL_assertion(bot_p != NULL);
+        CGAL_assertion(top_p != NULL);
+
+        CGAL_SDG_DEBUG(std::cout << "debug bs before mirror"
+            << "  lft=" << *lft_p << "  rgt=" << *rgt_p
+            << "  bot=" << *bot_p << "  top=" << *top_p
+            << std::endl; );
+
+        const bool exist_two_with_same_x = samex_pq || samex_pr || samex_qr;
+        const bool exist_two_with_same_y = samey_pq || samey_pr || samey_qr;
+
+        bool is_lft_input (true);
+        bool is_rgt_input (true);
+        bool is_bot_input (true);
+        bool is_top_input (true);
+
+        FT dxmirror;
+        FT dymirror;
+        if (exist_two_with_same_x != exist_two_with_same_y) {
+          if (exist_two_with_same_x) {
+            FT const *s1 = NULL;
+            FT const *s2 = NULL;
+            FT const *dx = NULL;
+            if (samex_pq) {
+              s1 = &py;
+              s2 = &qy;
+              dx = &ry;
+            }
+            else if (samex_pr) {
+              s1 = &py;
+              s2 = &ry;
+              dx = &qy;
+            }
+            else if (samex_qr) {
+              s1 = &qy;
+              s2 = &ry;
+              dx = &py;
+            }
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs two same x"
+                << std::endl;);
+            if ( (bot_p == dx) || (top_p == dx) ) {
+              CGAL_assertion (
+                 ( ( CGAL::compare(*dx, *s1) == SMALLER ) &&
+                   ( CGAL::compare(*dx, *s2) == SMALLER )   ) ||
+                 ( ( CGAL::compare(*dx, *s1) == LARGER  ) &&
+                   ( CGAL::compare(*dx, *s2) == LARGER  )   )   );
+              dxmirror = *s1 + *s2 - *dx;
+              if (top_p == dx) {
+                CGAL_assertion(CGAL::compare(dxmirror, *bot_p) == SMALLER);
+                bot_p = &dxmirror;
+                is_bot_input = false;
+              } else {
+                CGAL_assertion(CGAL::compare(dxmirror, *top_p) == LARGER);
+                CGAL_assertion( bot_p == dx );
+                top_p = &dxmirror;
+                is_top_input = false;
+              }
+            }
+          } else {
+            CGAL_assertion( exist_two_with_same_y );
+            FT const *s1 = NULL;
+            FT const *s2 = NULL;
+            FT const *dy = NULL;
+            if (samey_pq) {
+              s1 = &px;
+              s2 = &qx;
+              dy = ℞
+            }
+            else if (samey_pr) {
+              s1 = &px;
+              s2 = ℞
+              dy = &qx;
+            }
+            else if (samey_qr) {
+              s1 = &qx;
+              s2 = ℞
+              dy = &px;
+            }
+            CGAL_assertion( dy != NULL );
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs two same y"
+                << std::endl;);
+            if ( (lft_p == dy) || (rgt_p == dy) ) {
+              CGAL_assertion (
+                 ( ( CGAL::compare(*dy, *s1) == SMALLER ) &&
+                   ( CGAL::compare(*dy, *s2) == SMALLER )   ) ||
+                 ( ( CGAL::compare(*dy, *s1) == LARGER  ) &&
+                   ( CGAL::compare(*dy, *s2) == LARGER  )   )   );
+              dymirror = *s1 + *s2 - *dy;
+              if (rgt_p == dy) {
+                CGAL_assertion(CGAL::compare(dymirror, *lft_p) == SMALLER);
+                lft_p = &dymirror;
+                is_lft_input = false;
+              } else {
+                CGAL_assertion(CGAL::compare(dymirror, *rgt_p) == LARGER);
+                CGAL_assertion( lft_p == dy );
+                rgt_p = &dymirror;
+                is_rgt_input = false;
+              }
+            }
+          } // end of case exist_two_with_same_y
+        } // end of if exist_two_with_same_x != exist_two_with_same_y
+
+        const bool is_L_shaped =
+          exist_two_with_same_x && exist_two_with_same_y;
+
+        const FT two(2);
+
+        CGAL_SDG_DEBUG( std::cout << "debug bs after mirror"
+            << "  lft=" << *lft_p << "  rgt=" << *rgt_p
+            << "  bot=" << *bot_p << "  top=" << *top_p
+            << std::endl ; );
+
+        Comparison_result cmpsides =
+          CGAL::compare(*rgt_p - *lft_p, *top_p - *bot_p);
+
+        FT fix1;
+        FT fix2;
+
+        bool are_at_three_corners (false);
+        if (cmpsides == EQUAL)
+        {
+          if (is_L_shaped) {
+            are_at_three_corners = true;
+          }
+        }
+        else if (cmpsides == LARGER)
+        { //diff x > diff y forms a rectangle
+          //need to find the movable side of rectangle
+          if (exist_two_with_same_x) {
+            // expand rectangle both downwards and upwards
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs move both sides"
+                << std::endl;);
+            fix1 = (*bot_p + *top_p - *rgt_p + *lft_p)/two;
+            is_bot_input = false;
+            fix2 = (*top_p + *bot_p + *rgt_p - *lft_p)/two;
+            is_top_input = false;
+            // update bottom and top
+            bot_p = &fix1;
+            top_p = &fix2;
+          }
+          else {
+            CGAL_assertion( is_bot_input && is_top_input );
+            Point_2 const * const pt_lft_p =
+              (is_lft_input)? CGAL::cpp11::get<5>(tupx) : NULL;
+            Point_2 const * const pt_rgt_p =
+              (is_rgt_input)? CGAL::cpp11::get<6>(tupx) : NULL;
+            Point_2 const * const pt_top_p = CGAL::cpp11::get<6>(tupy);
+            if ((pt_top_p != pt_lft_p) && (pt_top_p != pt_rgt_p)) {
+              // lower the bottom side
+              fix1 = *top_p - *rgt_p + *lft_p;
+              bot_p = &fix1;
+              is_bot_input = false;
+            }
+            else {
+              CGAL_assertion_code(
+              Point_2 const * const pt_bot_p = CGAL::cpp11::get<5>(tupy);)
+              CGAL_assertion(
+                  (pt_bot_p != pt_lft_p) && (pt_bot_p != pt_rgt_p) );
+              // augment the top side
+              fix2 = *bot_p + *rgt_p - *lft_p;
+              top_p = &fix2;
+              is_top_input = false;
+            }
+          } // end of not exist_two_with_same_x case
+        } // end of cmpsides == LARGER case
+        else
+        { // px_max.x() - px_min.x() < py_max.y() - py_min.y())
+          // diff x < diff y forms a rectangle
+          CGAL_assertion( cmpsides == SMALLER );
+          if (exist_two_with_same_y) {
+            // change both sides
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs move both sides"
+                << std::endl;);
+
+            fix1 = (*lft_p + *rgt_p + *top_p - *bot_p)/two;
+            is_rgt_input = false;
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs fatten fix1="
+                << fix1 << std::endl;);
+
+            fix2 = (*lft_p + *rgt_p - *top_p + *bot_p)/two;
+            is_lft_input = false;
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs fatten fix2="
+                << fix2 << std::endl;);
+
+            // update right and left
+            rgt_p = &fix1;
+            lft_p = &fix2;
+          }
+          else {
+            CGAL_assertion( is_lft_input && is_rgt_input );
+            Point_2 const * const pt_lft_p = CGAL::cpp11::get<5>(tupx);
+            Point_2 const * const pt_bot_p =
+              (is_bot_input) ? CGAL::cpp11::get<5>(tupy) : NULL;
+            Point_2 const * const pt_top_p =
+              (is_top_input) ? CGAL::cpp11::get<6>(tupy) : NULL;
+            // find the movable side or sides of the rectangle
+            if ((pt_lft_p != pt_bot_p) && (pt_lft_p != pt_top_p)) {
+              // augment the right side
+              fix1 = *lft_p + *top_p - *bot_p;
+              rgt_p = &fix1;
+              is_rgt_input = false;
+            } else {
+              CGAL_assertion_code(
+              Point_2 const * const pt_rgt_p = CGAL::cpp11::get<6>(tupx);)
+              CGAL_assertion(
+                  (pt_rgt_p != pt_bot_p) && (pt_rgt_p != pt_top_p) );
+              // diminish from the left side
+              fix2 = *rgt_p - *top_p + *bot_p;
+              lft_p = &fix2;
+              is_lft_input = false;
+            }
+          } // end of not exist_two_with_same_y case
+        } // end of cmpsides == SMALLER case
+
+        CGAL_SDG_DEBUG( std::cout << "debug bs after side fixing "
+            << "lft=" << *lft_p
+            << "  rgt=" << *rgt_p << "  bot=" << *bot_p << " "
+            << "top=" << *top_p << std::endl ; );
+
+        // comparison of query point t with lrbt
+        const Comparison_result cxmint = CGAL::compare(*lft_p, t.x());
+        if (cxmint == LARGER) {
+          return ON_UNBOUNDED_SIDE;
+        }
+        const Comparison_result cxtmax = CGAL::compare(t.x(), *rgt_p);
+        if (cxtmax == LARGER) {
+          return ON_UNBOUNDED_SIDE;
+        }
+        const Comparison_result cymint = CGAL::compare(*bot_p, t.y());
+        if (cymint == LARGER) {
+          return ON_UNBOUNDED_SIDE;
+        }
+        const Comparison_result cytmax = CGAL::compare(t.y(), *top_p);
+        if (cytmax == LARGER) {
+          return ON_UNBOUNDED_SIDE;
+        }
+        // here, each comparison value is either SMALLER or EQUAL
+        const SmallerEqTuple tup =
+          analyze_smalleq(cxtmax, cytmax, cxmint, cymint);
+        const size_t count_eq = CGAL::cpp11::get<4>(tup);
+        CGAL_assertion( count_eq <= 2 );
+        if (count_eq == 0) {
+          CGAL_assertion( cxmint == SMALLER && cxtmax == SMALLER &&
+                          cymint == SMALLER && cytmax == SMALLER );
+          CGAL_SDG_DEBUG(std::cout
+              << "debug Side_of_bs return ON_BOUNDED_SIDE" << std::endl;);
+          return ON_BOUNDED_SIDE;
+        } else {
+          CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs on boundary, "
+              << "left=" << cxmint << " right=" << cxtmax
+              << " bot=" << cymint << " top  =" << cytmax
+              << std::endl; );
+
+          if (count_eq == 2) {
+            if (are_at_three_corners) {
+              return ON_BOUNDARY;
+            } else {
+              if (is_L_shaped) {
+                return ON_UNBOUNDED_SIDE;
+              }
+            }
+          }
+
+          if (are_at_three_corners) {
+            CGAL_assertion( count_eq == 1 );
+            return ON_BOUNDED_SIDE;
+          }
+
+          const bool at_lft = CGAL::cpp11::get<2>(tup);
+          if (is_lft_input && at_lft) {
+            CGAL_assertion(cxmint == EQUAL);
+            CGAL_SDG_DEBUG(std::cout
+                << "debug Side_of_bs t on lft input" << std::endl;);
+            const FT lfty = (lft_p == &px) ? py : (lft_p == &qx) ? qy : ry;
+            const Comparison_result test =
+              test1d(*bot_p, *top_p, lfty, t.y());
+            if (test != EQUAL) {
+              return (test == SMALLER) ?
+                     ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
+            }
+          }
+
+          const bool at_rgt = CGAL::cpp11::get<0>(tup);
+          if (is_rgt_input && at_rgt) {
+            CGAL_assertion(cxtmax == EQUAL);
+            CGAL_SDG_DEBUG(std::cout
+                << "debug Side_of_bs t on rgt input" << std::endl;);
+            const FT rgty = (rgt_p == &px) ? py : (rgt_p == &qx) ? qy : ry;
+            const Comparison_result test =
+              test1d(*bot_p, *top_p, rgty, t.y());
+            if (test != EQUAL) {
+              return (test == SMALLER) ?
+                     ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
+            }
+          }
+
+          const bool at_bot = CGAL::cpp11::get<3>(tup);
+          if (is_bot_input && at_bot) {
+            CGAL_assertion(cymint == EQUAL);
+            CGAL_SDG_DEBUG(std::cout
+                << "debug Side_of_bs t on bot input" << std::endl;);
+            const FT botx = (bot_p == &py) ? px : (bot_p == &qy) ? qx : rx;
+            const Comparison_result test =
+              test1d(*lft_p, *rgt_p, botx, t.x());
+            if (test != EQUAL) {
+              return (test == SMALLER) ?
+                     ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
+            }
+          }
+
+          const bool at_top = CGAL::cpp11::get<1>(tup);
+          if (is_top_input && at_top) {
+            CGAL_assertion(cytmax == EQUAL);
+            CGAL_SDG_DEBUG(std::cout
+                << "debug Side_of_bs t on top input" << std::endl;);
+            const FT topx = (top_p == &py) ? px : (top_p == &qy) ? qx : rx;
+            const Comparison_result test =
+              test1d(*lft_p, *rgt_p, topx, t.x());
+            if (test != EQUAL) {
+              return (test == SMALLER) ?
+                     ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE;
+            }
+          }
+
+          CGAL_SDG_DEBUG(std::cout
+              << "debug Side_of_bs return ON_BOUNDARY" << std::endl;);
+          return ON_BOUNDARY;
+        }
+      }
+
+      inline Comparison_result test1d(
+          const FT& A, const FT& B, const FT&C, const FT& D) const
+      {
+        const FT two(2);
+        CGAL_SDG_DEBUG( std::cout << "debug bs test1d entering with ABCD "
+            << A << " " << B << " " << C << " " << D << std::endl; );
+        return CGAL::compare(CGAL::abs(A+B-two*D), CGAL::abs(A+B-two*C));
+      }
+
+    public:
+
+      inline Bounded_side operator()(const Point_2 &p, const Point_2 &q,
+                   const Point_2 &r, const Point_2 &t) const
+      {
+        return predicate(p, q, r, t);
+      }
+    };
+
+} //namespace CGAL
+
+#endif // CGAL_SIDE_OF_BOUNDED_SQUARE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Side_of_oriented_square_2.h b/3rdparty/CGAL-4.8/include/CGAL/Side_of_oriented_square_2.h
new file mode 100644
index 0000000..de7049e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Side_of_oriented_square_2.h
@@ -0,0 +1,180 @@
+// Copyright (c) 2015  Università della Svizzera italiana.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou
+//philaris at gmail.com, sandeep.kr.dey at gmail.com, evanthia.papadopoulou at usi.ch
+
+#ifndef CGAL_SIDE_OF_ORIENTED_SQUARE_2_H
+#define CGAL_SIDE_OF_ORIENTED_SQUARE_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Orientation_Linf_2.h>
+#include <CGAL/Side_of_bounded_square_2.h>
+#include <CGAL/enum.h>
+
+namespace CGAL {
+
+    template<class K>
+    class Side_of_oriented_square_2
+    {
+    private:
+      typedef typename K::Point_2               Point_2;
+      typedef Orientation_Linf_2<K>             Orientation_Linf_2_Type;
+      typedef Side_of_bounded_square_2<K>       Side_of_bounded_square_2_Type;
+      typedef typename K::Compare_x_2           Compare_x_2;
+      typedef typename K::Compare_y_2           Compare_y_2;
+      typedef typename K::Comparison_result     Comparison_result;
+
+      Compare_x_2 compare_x_2;
+      Compare_y_2 compare_y_2;
+
+      Side_of_bounded_square_2_Type side_of_bounded_square_2;
+      Orientation_Linf_2_Type orientation_Linf;
+
+      Oriented_side predicate(const Point_2 &p, const Point_2 &q,
+                 const Point_2 &r, const Point_2 &t) const
+      {
+        CGAL_SDG_DEBUG(std::cout << "debug entering side_of_os (pqrt)= ("
+          << p << ") (" << q << ") (" << r << ") (" << t << ")"
+          << std::endl;);
+
+        Oriented_side orlpqr = orientation_Linf(p, q, r);
+
+        if (orlpqr == DEGENERATE) {
+          // here p,q,r are monotone
+          CGAL_SDG_DEBUG(std::cout << "debug side_of_os pqr are monotone" << std::endl;);
+
+          bool is_degenerate_pqt = (orientation_Linf(p,q,t) == DEGENERATE);
+          bool is_degenerate_qrt = (orientation_Linf(q,r,t) == DEGENERATE);
+
+          if (is_degenerate_pqt && is_degenerate_qrt) {
+            //p,q,r,t are all collinear
+            CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs pqrt all collin" << std::endl;);
+            return ON_ORIENTED_BOUNDARY;
+          }
+
+          if (! is_degenerate_pqt) {
+            //CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs qpt not monotone" << std::endl;);
+            return predicate(q,p,t,r);
+          }
+
+          if (! is_degenerate_qrt) {
+            //CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs rqt not monotone" << std::endl;);
+            return predicate(r,q,t,p);
+          }
+
+        }
+        else { // p,q,r are not monotone
+          //CGAL_SDG_DEBUG(std::cout << "side_of_os pqr not monotone" << std::endl;);
+
+          Comparison_result cxtp = compare_x_2(t,p);
+          Comparison_result cytp = compare_y_2(t,p);
+          Comparison_result cxtq = compare_x_2(t,q);
+          Comparison_result cytq = compare_y_2(t,q);
+          Comparison_result cxtr = compare_x_2(t,r);
+          Comparison_result cytr = compare_y_2(t,r);
+
+          // if t equals any one of p,q,r return zero
+	  if (((cxtp == EQUAL) && (cytp == EQUAL)) ||
+              ((cxtq == EQUAL) && (cytq == EQUAL)) ||
+              ((cxtr == EQUAL) && (cytr == EQUAL))   )
+          {
+            return ON_ORIENTED_BOUNDARY;
+          }
+
+          // check if query point is inside any of the following
+          // segments: pq, qr, rp
+          if (((cxtp == EQUAL) && (cxtq == EQUAL) && (cytp != cytq))
+           || ((cxtq == EQUAL) && (cxtr == EQUAL) && (cytq != cytr))
+           || ((cxtr == EQUAL) && (cxtp == EQUAL) && (cytr != cytp))
+           || ((cytp == EQUAL) && (cytq == EQUAL) && (cxtp != cxtq))
+           || ((cytq == EQUAL) && (cytr == EQUAL) && (cxtq != cxtr))
+           || ((cytr == EQUAL) && (cytp == EQUAL) && (cxtr != cxtp)))
+          {
+            CGAL_SDG_DEBUG(std::cout << "debug side_of_os query point in segment"
+              << std::endl;);
+            return (Oriented_side)
+              (( (int) orlpqr ) *
+               ( (int) ON_POSITIVE_SIDE ) ) ;
+          }
+
+          Bounded_side bspqrt = side_of_bounded_square_2(p,q,r,t);
+
+          CGAL_SDG_DEBUG(std::cout << "debug side_of_os bspqrt="
+            << bspqrt << std::endl;);
+
+          if (bspqrt == ON_BOUNDARY) {
+
+            if ((cxtp != EQUAL) && (cytp != EQUAL)
+                && (! (orientation_Linf(r,q,t)==DEGENERATE))) {
+               // r q t p
+               return (Oriented_side)
+                 (((int) orientation_Linf(r,q,t)) *
+                  ((int) side_of_bounded_square_2(r,q,t,p)) ) ;
+	    }
+            if ((cxtq != EQUAL) && (cytq != EQUAL)
+                && (! (orientation_Linf(p,r,t)==DEGENERATE))) {
+               // p r t q
+               return (Oriented_side)
+                 (((int) orientation_Linf(p,r,t)) *
+                  ((int) side_of_bounded_square_2(p,r,t,q)) ) ;
+	    }
+            if ((cxtr != EQUAL) && (cytr != EQUAL)
+                && (! (orientation_Linf(q,p,t)==DEGENERATE))) {
+               // q p t r
+               return (Oriented_side)
+                 (((int) orientation_Linf(q,p,t)) *
+                  ((int) side_of_bounded_square_2(q,p,t,r)) ) ;
+	    }
+            CGAL_SDG_DEBUG(std::cout << "debug side_of_os about to return "
+              << "ON_ORIENTED_BOUNDARY" << std::endl;);
+            return ON_ORIENTED_BOUNDARY;
+          }
+          else if ( bspqrt == ON_BOUNDED_SIDE ) {
+            return (orlpqr == LEFT_TURN) ?
+                    ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE  ;
+          }
+          else {
+            // ( Side_of_bounded_square_2(p,q,r,t) == ON_UNBOUNDED_SIDE )
+            CGAL_assertion(bspqrt == ON_UNBOUNDED_SIDE);
+            return (orlpqr == LEFT_TURN) ?
+                    ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE ;
+          }
+        }
+        CGAL_SDG_DEBUG(std::cout << "should not reach here" << std::endl;);
+
+        CGAL_assertion(false);
+
+        // avoid complaining from certain compilers
+        return ON_ORIENTED_BOUNDARY;
+
+      } // end of def of Oriented_side predicate(p, q, r)
+
+    public:
+
+      Oriented_side operator()(const Point_2 &p, const Point_2 &q,
+             const Point_2 &r, const Point_2 &t) const
+      {
+        return predicate(p, q, r, t);
+      }
+    };
+
+
+} //namespace CGAL
+
+#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_SIDE_OF_ORIENTED_SQUARE_C2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Side_of_triangle_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/Side_of_triangle_mesh.h
new file mode 100644
index 0000000..b6d8a56
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Side_of_triangle_mesh.h
@@ -0,0 +1,174 @@
+// Copyright (c) 2013, 2014, 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sebastien Loriot and Ilker O. Yaz
+
+
+#ifndef CGAL_SIDE_OF_TRIANGLE_MESH_H
+#define CGAL_SIDE_OF_TRIANGLE_MESH_H
+
+#include <CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h>
+#include <CGAL/AABB_face_graph_triangle_primitive.h>
+
+#include <CGAL/AABB_tree.h>
+#include <CGAL/AABB_traits.h>
+#include <CGAL/boost/graph/helpers.h>
+
+namespace CGAL {
+
+/** 
+ * \ingroup PkgPolygonMeshProcessing
+ * This class provides an efficient point location functionality with respect to a domain bounded
+ * by one or several disjoint closed triangle meshes.
+ *
+ * A point is said to be on the bounded side of the domain
+ * if an odd number of surfaces is crossed when walking from the point to infinity.
+ *
+ * The input triangle mesh is expected to contain no self-intersections
+ * and to be free from self-inclusions.
+ *
+ * In case the triangle mesh has several connected components,
+ * the same test is performed and returns correct results.
+ * In case of self-inclusions,
+ * the user should be aware that the predicate called
+ * inside every other sub-volume bounded by a nested surface
+ * will return in turns `CGAL::ON_BOUNDED_SIDE` and `CGAL::ON_UNBOUNDED_SIDE`,
+ * following the aforementioned parity criterion.
+ *
+ * This class depends on the package \ref PkgAABB_treeSummary.
+ *
+ * @tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph`
+ * @tparam GeomTraits a geometric traits class, model of `Kernel`
+ * @tparam VertexPointMap a model of `ReadablePropertyMap` with
+         `boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key type and
+         `GeomTraits::Point_3` as value type.
+ *   The default is `typename boost::property_map<TriangleMesh,vertex_point_t>::%type`.
+ 
+ * \todo Code: Use this class as an implementation detail of Mesh_3's Polyhedral_mesh_domain_3.
+       Remove `TriangleAccessor_3` as well as the concept in Mesh_3 since making `TriangleMesh`
+       a model of `FaceListGraph` will make it useless
+
+ */
+template <class TriangleMesh,
+          class GeomTraits,
+          class VertexPointMap = Default >
+class Side_of_triangle_mesh
+{
+  // typedefs
+  typedef CGAL::AABB_face_graph_triangle_primitive<TriangleMesh, VertexPointMap> Primitive;
+  typedef CGAL::AABB_traits<GeomTraits, Primitive> Traits;
+  typedef CGAL::AABB_tree<Traits> AABB_tree;
+  typedef typename GeomTraits::Point_3 Point;
+
+  //members
+  typename GeomTraits::Construct_ray_3     ray_functor;
+  typename GeomTraits::Construct_vector_3  vector_functor;
+  const AABB_tree* tree_ptr;
+  bool own_tree;
+
+public:
+   /**
+   * Constructor with one triangulated surface mesh.
+   * @param tmesh the triangulated surface mesh bounding the domain to be tested
+   * @param vpmap the property map with the points associated to the vertices of `tmesh`
+   * @param gt an instance of the geometric traits class
+   *
+   * @pre `CGAL::is_closed(tmesh) && CGAL::is_triangle_mesh(tmesh)`
+   */
+  Side_of_triangle_mesh(const TriangleMesh& tmesh,
+                        VertexPointMap vpmap,
+                        const GeomTraits& gt=GeomTraits())
+  : ray_functor(gt.construct_ray_3_object())
+  , vector_functor(gt.construct_vector_3_object())
+  , own_tree(true)
+  {
+    CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
+    CGAL_assertion(CGAL::is_closed(tmesh));
+
+    tree_ptr = new AABB_tree(faces(tmesh).first,
+                             faces(tmesh).second,
+                             tmesh, vpmap);
+  }
+
+  /**
+  * Constructor with one surface triangle mesh, using `get(boost::vertex_point, tmesh)` as
+  * vertex point property map.
+  * @param tmesh the triangulated surface mesh bounding the domain to be tested
+  * @param gt an instance of the geometric traits class
+  *
+  * @pre `CGAL::is_closed(tmesh) && CGAL::is_triangle_mesh(tmesh)`
+  */
+  Side_of_triangle_mesh(const TriangleMesh& tmesh,
+                        const GeomTraits& gt=GeomTraits())
+  : ray_functor(gt.construct_ray_3_object())
+  , vector_functor(gt.construct_vector_3_object())
+  , own_tree(true)
+  {
+    CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
+    CGAL_assertion(CGAL::is_closed(tmesh));
+
+    tree_ptr = new AABB_tree(faces(tmesh).first,
+                             faces(tmesh).second,
+                             tmesh);
+  }
+
+  /**
+  * Constructor that takes a pre-built \cgal `AABB_tree`
+  * of the triangulated surface mesh primitives.
+  *
+  * @param tree a \cgal `AABB_tree` with `AABB_face_graph_triangle_primitive` as `Primitive` type
+  * @param gt an instance of the geometric traits class
+  *
+  * @pre `CGAL::is_closed(tmesh) && CGAL::is_triangle_mesh(tmesh)`
+  */
+  Side_of_triangle_mesh(const AABB_tree& tree,
+                        const GeomTraits& gt = GeomTraits())
+  : ray_functor(gt.construct_ray_3_object())
+  , vector_functor(gt.construct_vector_3_object())
+  , tree_ptr(&tree)
+  , own_tree(false)
+  {
+  }
+
+  ~Side_of_triangle_mesh()
+  {
+    if (own_tree)
+      delete tree_ptr;
+  }
+
+public:
+  /**
+   * returns the location of a query point
+   * @param point the query point to be located with respect to the input
+            polyhedral surface
+   * @return 
+   *   - `CGAL::ON_BOUNDED_SIDE` if the point is inside the volume bounded by the input triangle mesh
+   *   - `CGAL::ON_BOUNDARY` if the point is on triangle mesh
+   *   - `CGAL::ON_UNBOUNDED_SIDE` if the point is outside triangle mesh
+   */
+  Bounded_side operator()(const Point& point) const
+  {
+    return internal::Point_inside_vertical_ray_cast<GeomTraits, AABB_tree>()(
+      point, *tree_ptr, ray_functor, vector_functor);
+  }
+
+};
+
+} // namespace CGAL
+
+#endif //CGAL_SIDE_OF_TRIANGLE_MESH_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Simple_cartesian.h b/3rdparty/CGAL-4.8/include/CGAL/Simple_cartesian.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Simple_cartesian.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Simple_cartesian.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Simple_circular_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/Simple_circular_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Simple_circular_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Simple_circular_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Simple_homogeneous.h b/3rdparty/CGAL-4.8/include/CGAL/Simple_homogeneous.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Simple_homogeneous.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Simple_homogeneous.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Simple_polygon_visibility_2.h b/3rdparty/CGAL-4.8/include/CGAL/Simple_polygon_visibility_2.h
new file mode 100644
index 0000000..61c8de1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Simple_polygon_visibility_2.h
@@ -0,0 +1,685 @@
+// Copyright (c) 2013 Technical University Braunschweig (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$`
+// $Id$
+//
+//
+// Author(s):  Francisc Bungiu <fbungiu at gmail.com>
+//             Michael Hemmer <michael.hemmer at cgal.org>
+//             Ning Xu <longyin0904 at gmail.com>
+
+#ifndef CGAL_SIMPLE_POLYGON_VISIBILITY_2_H
+#define CGAL_SIMPLE_POLYGON_VISIBILITY_2_H
+
+#include <CGAL/tags.h>
+#include <CGAL/enum.h>
+#include <CGAL/Visibility_2/visibility_utils.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_walk_along_line_point_location.h>
+#include <CGAL/assertions.h>
+#include <stack>
+
+// TODO:  
+// * fix handle needles = O(nlogn)  
+
+namespace CGAL {
+
+  template<class Arrangement_2_, class RegularizationCategory = CGAL::Tag_true> 
+    class Simple_polygon_visibility_2 {
+
+  public:
+  typedef Arrangement_2_                                Arrangement_2;
+  typedef typename Arrangement_2::Traits_2              Traits_2;
+  typedef typename Arrangement_2::Geometry_traits_2     Geometry_traits_2;
+  typedef typename Geometry_traits_2::Kernel            K;
+
+  typedef typename K::Intersect_2                       Intersect_2;
+
+  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
+  typedef typename Arrangement_2::Halfedge_const_handle       
+  Halfedge_const_handle;
+  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
+  Ccb_halfedge_const_circulator;
+  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  typedef typename Arrangement_2::Face_handle           Face_handle;
+  typedef typename Arrangement_2::Halfedge_around_vertex_const_circulator
+  Halfedge_around_vertex_const_circulator;
+
+  typedef typename Geometry_traits_2::Point_2           Point_2;
+  typedef typename Geometry_traits_2::Ray_2             Ray_2;
+  typedef typename Geometry_traits_2::Segment_2         Segment_2;
+  typedef typename Geometry_traits_2::Line_2            Line_2;
+  typedef typename Geometry_traits_2::Object_2          Object_2;
+
+  typedef RegularizationCategory              Regularization_category;
+  typedef CGAL::Tag_false                     Supports_general_polygon_category;
+  typedef CGAL::Tag_true                      Supports_simple_polygon_category;
+
+  Simple_polygon_visibility_2() : p_arr(NULL), traits(NULL) {}
+
+  /*! Constructor given an arrangement and the Regularization tag. */
+  Simple_polygon_visibility_2(const Arrangement_2& arr): 
+  p_arr(&arr) {
+    traits = p_arr->geometry_traits();
+    point_location.attach(arr);
+    query_pt_is_vertex = false;
+    query_pt_is_on_halfedge = false;
+    inserted_artificial_starting_vertex = false;
+  }
+
+  
+  std::string name() const { return std::string("S_visibility_2"); }
+
+  /*! Method to check if the visibility object is attached or not to
+    an arrangement*/
+  bool is_attached() const {
+    return (p_arr != NULL);
+  }
+
+  /*! Attaches the visibility object to the 'arr' arrangement */
+  void attach(const Arrangement_2& arr) {
+    if(p_arr != &arr){
+      detach();
+      p_arr = &arr;
+      traits = p_arr->geometry_traits();
+      point_location.attach(arr);
+    }
+  }
+
+  /*! Detaches the visibility object from the arrangement it is
+    attached to*/
+  void detach() {
+    point_location.detach();
+    p_arr = NULL;
+    traits = NULL;
+    vertices.clear();
+    query_pt_is_vertex = false;
+    query_pt_is_on_halfedge = false;
+    inserted_artificial_starting_vertex = false;
+  }
+
+  /*! Getter method for the input arrangement*/
+  const Arrangement_2& arrangement_2() const {
+    return *p_arr;
+  }
+
+  /*! Computes the visibility object from the query point 'q' in the face
+    'face' and constructs the output in 'out_arr'*/
+  template <typename VARR> 
+  typename VARR::Face_handle 
+  compute_visibility(const Point_2& q,
+                     const Face_const_handle face,
+                     VARR& out_arr) const
+  {
+
+    CGAL_precondition(!face->is_unbounded());
+
+    out_arr.clear();
+    
+    query_pt_is_vertex = false;
+    query_pt_is_on_halfedge = false;
+    inserted_artificial_starting_vertex = false;
+
+    // Now retrieve the circulator to first visible vertex from triangulation
+    Ccb_halfedge_const_circulator circ = find_visible_start(face, q);
+    Ccb_halfedge_const_circulator curr = circ;
+
+    do {
+      vertices.push_back(curr->source()->point());
+    } while(++curr != circ);
+
+    vertices.push_back(vertices[0]);
+
+    visibility_region_impl(q);
+
+    return output(q, out_arr);
+  }
+
+  /*! Computes the visibility region of the query point 'q' located on the
+    halfedge 'he' and constructs the output in 'out_arr'*/
+  template <typename VARR> 
+  typename VARR::Face_handle 
+  compute_visibility(
+		     const Point_2& q, 
+		     const Halfedge_const_handle he,
+		     VARR& out_arr ) const
+  {
+
+    out_arr.clear();
+
+    query_pt_is_vertex = false;
+    query_pt_is_on_halfedge = false;
+    bool query_on_target = false;
+
+    if (q != he->source()->point()) {
+      if (q != he->target()->point()) {
+        vertices.push_back(he->target()->point());
+        query_pt_is_on_halfedge = true;
+      }
+      else {
+        query_pt_is_vertex = true;
+        query_on_target = true;
+      }
+    } else {
+      vertices.push_back( he->target()->point() );
+      query_pt_is_vertex = true;
+    }
+
+    Ccb_halfedge_const_circulator circ = he;
+    ++circ;
+    Ccb_halfedge_const_circulator curr = circ;
+
+    do {
+      const Point_2& curr_vertex = curr->target()->point();
+      vertices.push_back(curr_vertex);
+    } while (++curr != circ);
+
+    if ( query_on_target ) {
+      vertices.push_back( vertices[0] );
+    }
+
+    visibility_region_impl(q);
+
+    return output(q, out_arr);
+
+  }
+
+  private:
+  typedef Arr_walk_along_line_point_location<Arrangement_2>  Arr_point_location;
+  typedef typename Arr_point_location::result_type           Location_result;
+
+  typedef std::vector<Point_2>                                 Vertex_container;
+  typedef typename Vertex_container::size_type                 Size_type;
+
+  const Arrangement_2 *p_arr;
+  const Geometry_traits_2 *traits;
+
+  mutable Arr_point_location point_location;
+
+  /*! Stack of visibile points; manipulated when going through the sequence
+    of input vertices; contains the vertices of the visibility region after 
+    the run of the algorithm*/
+  mutable std::stack<Point_2> stack;
+  /*! Sequence of input vertices*/
+  mutable Vertex_container vertices;
+  /*! State of visibility region algorithm*/
+  mutable enum {LEFT, RIGHT, SCANA, SCANB, SCANC, SCAND, FINISH} upcase;
+  mutable bool query_pt_is_vertex;
+  mutable bool query_pt_is_on_halfedge;
+  mutable bool inserted_artificial_starting_vertex;
+
+
+  template <typename VARR>
+  typename VARR::Face_handle
+  output(const Point_2& q, VARR& out_arr) const {
+
+    if(inserted_artificial_starting_vertex)
+      stack.pop();
+
+    std::vector<Point_2> points;
+    while(!stack.empty()) {
+      const Point_2& top = stack.top();
+      if (top != q || query_pt_is_vertex) {
+	points.push_back(top);
+      }
+      stack.pop();
+    }
+
+    if(inserted_artificial_starting_vertex) {
+      points.back() = points[0];
+      inserted_artificial_starting_vertex = false;
+    }
+
+
+    // Quick fix for now. Can be done faster
+    bool is_degenerate = false; 
+
+    for(typename std::vector<Point_2>::size_type i = 0; i < points.size()-2;i++){
+      if(CGAL::orientation(points[i],points[i+1],points[i+2]) == CGAL::COLLINEAR){
+	is_degenerate = true;
+	break; 
+      }
+    }
+    if(is_degenerate){
+      //std::cout << is_degenerate << std::endl;
+      std::vector<Segment_2> segments;
+	
+      for(typename std::vector<Point_2>::size_type i = 0;i < points.size() - 1; ++i)
+	{
+	  segments.push_back(Segment_2(points[i], points[i+1]));
+	}
+      CGAL::insert(out_arr, segments.begin(), segments.end());
+    }else{
+      points.pop_back();
+      //std::cout << " ordanary " << std::endl; 	
+      typename VARR::Vertex_handle v_last, v_first;
+      v_last = v_first = 
+        out_arr.insert_in_face_interior(points[0],out_arr.unbounded_face());
+	
+      for(unsigned int i = 0; i < points.size()-1; i++){
+	if(points[i] < points[(i+1)]){
+	  v_last = out_arr.insert_from_left_vertex (
+						    Segment_2(points[i], points[i+1]), v_last
+						    )->target();
+	} else {
+	  v_last = out_arr.insert_from_right_vertex(
+						    Segment_2(points[i], points[i+1]), v_last
+						    )->target();
+	}        
+      }
+      out_arr.insert_at_vertices(
+				 Segment_2(points.front(), points.back()),
+				 v_last, v_first
+				 );
+
+    }
+
+    CGAL_postcondition(out_arr.number_of_isolated_vertices() == 0);
+    CGAL_postcondition(stack.empty());
+
+    Visibility_2::conditional_regularize(out_arr, Regularization_category());
+    vertices.clear();
+
+    if (out_arr.faces_begin()->is_unbounded()) {
+      return ++out_arr.faces_begin();
+    }
+    else {
+      return out_arr.faces_begin();
+    }
+  }
+
+
+  /*! Finds a visible vertex from the query point 'q' in 'face' 
+    to start the algorithm from*/
+  Ccb_halfedge_const_circulator find_visible_start(Face_const_handle face,
+                                                   const Point_2 &q) const
+  {
+    Location_result result = point_location.ray_shoot_up(q);
+
+    if(const Halfedge_const_handle* e =
+       boost::get<Halfedge_const_handle>(&(result)))
+      {
+	CGAL_assertion((*e)->face() == face);
+	Point_2 p(q.x(),
+		  traits->compute_y_at_x_2_object()(
+						    Line_2((*e)->source()->point(),
+							   (*e)->target()->point()) ,
+						    q.x()));
+
+	vertices.push_back(p);
+	inserted_artificial_starting_vertex = true;
+
+	return (*e)->next()->ccb();
+      }
+    else if (const Vertex_const_handle* v =
+	     boost::get<Vertex_const_handle>(&(result)))
+      {
+	Halfedge_around_vertex_const_circulator cir =
+	(*v)->incident_halfedges();
+
+	while(face != cir->face()) {
+	  ++cir;
+	}
+	return cir->next()->ccb();
+      }
+    else
+      {
+	CGAL_assertion_msg(false, "Should not be reachable.");
+	return Ccb_halfedge_const_circulator();
+      }
+  }
+
+
+  /*! Main method of the algorithm - initializes the stack and variables
+    and calles the corresponding methods acc. to the algorithm's state;
+    'q' - query point;
+    'i' - current vertex' index
+    'w' - endpoint of ray shot from query point */
+  void visibility_region_impl(const Point_2& q) const {
+    Size_type i = 0;
+    Point_2 w;
+    Orientation o = traits->orientation_2_object()(q, vertices[0], vertices[1]);
+
+    if ( o != RIGHT_TURN ) {
+      upcase = LEFT;
+      i = 1;
+      w = vertices[1];
+      stack.push(vertices[0]);
+      stack.push(vertices[1]);
+    }
+    else {
+      upcase = SCANA;
+      i = 1;
+      w = vertices[1];
+      stack.push(vertices[0]);
+    }
+
+    Ray_2 ray_origin( q, vertices[0] );
+    do {
+      switch(upcase) {
+      case LEFT: 
+	left(i, w, q);
+	break;
+      case RIGHT:
+	right(i, w, q);
+	break;
+      case SCANA:
+	scana(i, w, q);
+	break;
+      case SCANB:
+	scanb(i, w);
+	break;
+      case SCANC:
+	scanc(i, w);
+	break;
+      case SCAND:
+	scand(i, w);
+	break;
+      case FINISH:
+	break;
+      }
+      if ( upcase == LEFT ) {
+        Point_2 s_t = stack.top();
+        stack.pop();
+        if (traits->orientation_2_object()(q, vertices[0], stack.top() )
+	    == RIGHT_TURN
+	    &&
+	    traits->orientation_2_object()(q, vertices[0], s_t)
+	    == LEFT_TURN )
+	  {
+	    Segment_2 seg( stack.top(), s_t );
+	    if (Object_2 result = Intersect_2()(seg, ray_origin) )
+	      {
+		const Point_2 * ipoint = object_cast<Point_2>(&result);
+		CGAL_assertion( ipoint != NULL );
+		s_t = *ipoint;
+		upcase = SCANB;
+	      }
+	  }
+        stack.push( s_t );
+      }
+    } while(upcase != FINISH);
+  }
+
+  /*! Method that handles the left turns in the vertex algorithm */
+  void left(Size_type& i, Point_2& w, const Point_2& q) const {
+    if (i >= vertices.size() - 1) {
+      upcase = FINISH;
+    }
+    else {
+      Point_2 s_t = stack.top();
+      stack.pop();
+      Point_2 s_t_prev = stack.top();
+      stack.push( s_t );
+      Orientation orient1 = traits->orientation_2_object()(
+							   q,
+							   vertices[i],
+							   vertices[i+1] );
+
+      if ( orient1 != RIGHT_TURN ) {
+	// Case L2
+	upcase = LEFT;
+	stack.push( vertices[i+1] );
+	w = vertices[i+1];
+	i++;
+      } else {
+	Orientation orient2 = traits->orientation_2_object()(
+							     s_t_prev,
+							     vertices[i],
+							     vertices[i+1] );
+
+	if ( orient2 == RIGHT_TURN ) {
+	  // Case L3
+	  upcase = SCANA;
+	  w = vertices[i+1];
+	  i++;
+	} else {
+	  // Case L4
+	  upcase = RIGHT;
+	  w = vertices[i];
+	  i++;
+	}
+      } 
+    }
+  }
+
+  /*! Scans the stack such that all vertices that were pushed before to the 
+    stack and are now not visible anymore. */
+  void right(Size_type& i, Point_2& w, const Point_2& q) const {
+    Point_2 s_j;
+    Point_2 s_j_prev;
+    Point_2 u;
+    int mode = 0;
+    Orientation orient1, orient2;
+
+    s_j_prev = stack.top();
+    orient2 = traits->orientation_2_object()( q, s_j_prev, vertices[i] );
+
+    while ( stack.size() > 1 ) {
+      s_j = s_j_prev;
+      orient1 = orient2;
+      stack.pop();
+      s_j_prev = stack.top();
+
+      orient2 = traits->orientation_2_object()( q, s_j_prev, vertices[i]);
+      if ( orient1 != LEFT_TURN && orient2 != RIGHT_TURN ) {
+	mode = 1;
+	break;
+      }
+
+      Segment_2 seg2( vertices[i-1], vertices[i] );
+      Segment_2 seg( s_j_prev, s_j );
+      if ( vertices[i-1] != s_j )
+	{
+	  Object_2 result = Intersect_2()( seg, seg2 );
+	  if(result) {
+	    const Point_2 * ipoint = object_cast<Point_2>(&result);
+	    CGAL_assertion( ipoint != NULL );
+	    u = *ipoint;
+	    mode = 2;
+	    break;
+	  }
+	}
+    }
+
+    CGAL_assertion( mode != 0 );
+    if ( mode == 1 ) {
+      orient1 = traits->orientation_2_object()(q, vertices[i], vertices[i+1] );
+
+      orient2 = traits->orientation_2_object()(vertices[i-1],
+					       vertices[i],
+					       vertices[i+1] );
+
+      if ( orient1 == RIGHT_TURN ) {
+	// Case R1
+	// Since the next action is RIGHT, we do not compute the intersection
+	// of (s_j,s_j_prev) and the ray (query_pt, vertices[i]),
+	// thus, (s_j,s_j_prev) is not shortcutted, but it is harmless
+	upcase = RIGHT;
+	stack.push( s_j );
+	w = vertices[i];
+	i++;
+      } else if ( orient2 == RIGHT_TURN ) {
+	// Case R2
+	Ray_2 ray( q, vertices[i] );
+	Segment_2 seg( s_j_prev, s_j );
+
+	Object_2 result = Intersect_2()( seg, ray );
+	const Point_2 * ipoint = object_cast<Point_2>(&result);
+
+	CGAL_assertion( ipoint != NULL );
+
+	u = *ipoint;
+	if ( stack.top() != u ) {
+	  stack.push( u );
+	}
+	upcase = LEFT;
+	stack.push( vertices[i] );
+	stack.push( vertices[i+1] );
+	w = vertices[i+1];
+	i++;
+      } else {
+	// Case R3
+	Ray_2 ray( q, vertices[i] );
+	Segment_2 seg( s_j_prev, s_j );
+
+	Object_2 result = Intersect_2()( seg, ray );
+	const Point_2 * ipoint = object_cast<Point_2>(&result);
+
+	CGAL_assertion( ipoint != NULL );
+
+	u = *ipoint;
+	if ( stack.top() != u ) {
+	  stack.push( u );
+	}
+	upcase = SCANC;
+	w = vertices[i];
+	i++;
+      }
+    } else if ( mode == 2 ) {
+      // Case R4
+      upcase = SCAND;
+      w = u;
+    }
+  }
+
+  /*! Scans the vertices starting from index 'i' for the first visible vertex
+    out of the back hidden window */
+  void scana(Size_type& i, Point_2& w, const Point_2& q) const {
+    // Scan v_i, v_i+1, ..., v_n for the first edge to intersect (z, s_t)
+    Point_2 u;
+    Size_type k = scan_edges( i, q, stack.top(), u, true );
+
+    Orientation orient1 =
+    traits->orientation_2_object()(q, vertices[k], vertices[k+1] );
+
+    if ( orient1 == RIGHT_TURN ) {
+      bool fwd = traits->
+	collinear_are_ordered_along_line_2_object()(q, stack.top(), u );
+
+      if ( !fwd ) {
+        // Case A1
+        upcase = RIGHT;
+        i = k+1;
+        w = u;
+      } else {
+        // Case A2
+        upcase = SCAND;
+        i = k+1;
+        w = u;
+      }
+    } else {
+      // Case A3
+      upcase = LEFT;
+      i = k+1;
+      stack.push( u );
+      if ( u != vertices[k+1] ) {
+        stack.push( vertices[k+1] );
+      }
+      w = vertices[k+1];
+    }
+  }
+
+  /*! Find the first edge interecting the segment (v_0, s_t) */
+  void scanb(Size_type& i, Point_2& w) const {
+    if ( i == vertices.size() - 1 ) {
+      upcase = FINISH;
+      return;
+    }
+    Point_2 u;
+    Size_type k = scan_edges( i, stack.top(), vertices[0], u, false );
+    if ( (k+1 == vertices.size()-1) && (vertices[0] == u) ) {
+      // Case B1
+      upcase = FINISH;
+      stack.push( vertices[0] );
+    } else {
+      // Case B2
+      upcase = RIGHT;
+      i = k+1;
+      w = u;
+    }
+  }
+
+  /*! Finds the exit from a general front hidden window by finding the first
+    vertex to the right of the ray defined by the query_point and w*/
+  void scanc(Size_type& i, Point_2& w) const {
+    Point_2 u;
+    Size_type k = scan_edges( i, stack.top(), w, u, false );
+    upcase = RIGHT;
+    i = k+1;
+    w = u;
+  }
+
+  /*! find the first edge intersecting the given window (s_t, w) */
+  void scand(Size_type& i, Point_2& w) const {
+    Point_2 u;
+    Size_type k = scan_edges( i, stack.top(), w, u, false );
+    upcase = LEFT;
+    i = k+1;
+    stack.push( u );
+    if ( u != vertices[k+1] ) {
+      stack.push( vertices[k+1] );
+    }
+    w = vertices[k+1];
+  }
+  
+  /*! Scan edges v_i,v_{i+1},...,v_n, until find an edge intersecting given ray
+    or given segment. is_ray = true -> ray, false -> segment.
+    The intersection point is returned by u */
+  Size_type scan_edges( Size_type i,
+			const Point_2& ray_begin,
+			const Point_2& ray_end,
+			Point_2& u,
+			bool is_ray ) const
+  {
+    Orientation old_orient = RIGHT_TURN;
+    Ray_2 ray( ray_begin, ray_end );
+    Segment_2 s2( ray_begin, ray_end );
+    Size_type k;
+    Object_2 result;
+    for ( k = i; k+1 < vertices.size(); k++ ) {
+      Orientation curr_orient = traits->orientation_2_object()(
+							       ray_begin,
+							       ray_end,
+							       vertices[k+1] );
+      if ( curr_orient != old_orient ) {
+        // Orientation switch, an intersection may occur
+        Segment_2 seg( vertices[k], vertices[k+1] );
+        if ( is_ray ) {
+	  result = Intersect_2()( seg, ray );
+	  if(result)
+	    break;
+        } else {
+	  result = Intersect_2()( seg, s2 );
+	  if(result)
+	    break;
+        }
+      }
+      old_orient = curr_orient;
+    }
+    CGAL_assertion( k+1<vertices.size() );
+    const Point_2 * ipoint = object_cast<Point_2>( &result );
+    if ( ipoint ) {
+      u = *ipoint;
+    } else {
+      u = vertices[k+1];
+    }
+    return k;
+  }
+  };
+
+} // namespace CGAL
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Simple_spherical_kernel_3.h b/3rdparty/CGAL-4.8/include/CGAL/Simple_spherical_kernel_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Simple_spherical_kernel_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Simple_spherical_kernel_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sixtuple.h b/3rdparty/CGAL-4.8/include/CGAL/Sixtuple.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sixtuple.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sixtuple.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_base_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_filtered_traits_3.h
new file mode 100644
index 0000000..2d5a17d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_filtered_traits_3.h
@@ -0,0 +1,71 @@
+// Copyright (c) 2005 Rijksuniversiteit Groningen (Netherlands)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Nico Kruithof <Nico at cs.rug.nl>
+
+#include <CGAL/Skin_surface_traits_3.h>
+
+#ifndef CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
+#define CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Skin_surface_traits_3.h>
+#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
+#include <CGAL/Filtered_predicate.h>
+
+namespace CGAL { 
+
+template <class K>
+class Skin_surface_filtered_traits_3
+  : public Skin_surface_traits_base_3<K>
+{
+  // Exact traits is based on the exact kernel.
+  typedef Skin_surface_traits_3<typename K::Exact_kernel>
+                                                   Exact_traits;
+  // Filtering traits is based on the filtering kernel.
+  typedef Skin_surface_traits_3<typename K::Approximate_kernel>
+                                                   Filtering_traits;
+
+  typedef typename K::C2E C2E;
+  typedef typename K::C2F C2F;
+
+  typedef Skin_surface_traits_base_3<K>           Base;
+public:
+  typedef Filtered_predicate<
+            typename Exact_traits::Side_of_mixed_cell_3,
+            typename Filtering_traits::Side_of_mixed_cell_3,
+            Weighted_converter_3<C2E>,
+            Weighted_converter_3<C2F> >  Side_of_mixed_cell_3;
+
+  enum { Has_filtered_predicates=true };
+  enum { Has_static_filters=false };
+
+  Skin_surface_filtered_traits_3() {}
+  Skin_surface_filtered_traits_3(typename Base::FT s) : Base(s) {}
+
+  // Only make the predicates filtered, not the constructions:
+  Side_of_mixed_cell_3 
+  side_of_mixed_cell_3_object() const 
+  { 
+    return Side_of_mixed_cell_3(Base::get_shrink()); 
+  }
+
+};
+
+} //namespace CGAL
+#endif // CGAL_SKIN_SURFACE_FILTERED_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_polyhedral_items_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_polyhedral_items_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_polyhedral_items_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_polyhedral_items_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_quadratic_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_quadratic_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_quadratic_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_quadratic_surface_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_refinement_policy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_refinement_policy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_refinement_policy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_refinement_policy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skin_surface_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Skin_surface_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skin_surface_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skin_surface_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Skiplist.h b/3rdparty/CGAL-4.8/include/CGAL/Skiplist.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Skiplist.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Skiplist.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Small_side_angle_bisector_decomposition_2.h b/3rdparty/CGAL-4.8/include/CGAL/Small_side_angle_bisector_decomposition_2.h
new file mode 100644
index 0000000..4fbabb1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Small_side_angle_bisector_decomposition_2.h
@@ -0,0 +1,869 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Ron Wein   <wein_r at yahoo.com>
+//             (based on an old version by Eyal Flato)
+//             Efi Fogel  <efifogel at gmail.com>
+
+#ifndef CGAL_SMALL_SIDE_ANGLE_BISECTOR_DECOMPOSITION_2_H
+#define CGAL_SMALL_SIDE_ANGLE_BISECTOR_DECOMPOSITION_2_H
+
+#include <CGAL/Polygon_2.h>
+#include <vector>
+#include <list>
+
+namespace CGAL {
+
+/*!
+ * \class
+ * Small-side angle-bisector decomposition strategy.
+ */
+template <typename Kernel_,
+          typename Container_ = std::vector<typename Kernel_::Point_2> >
+class Small_side_angle_bisector_decomposition_2 {
+public:
+  typedef Kernel_                                        Kernel;
+  typedef CGAL::Polygon_2<Kernel, Container_>            Polygon_2;
+  typedef typename Kernel::Point_2                       Point_2;
+
+private:
+  typedef typename Kernel::Direction_2                   Direction_2;
+  typedef typename Kernel::Segment_2                     Segment_2;
+
+  typedef typename Polygon_2::Vertex_circulator          Vertex_circulator;
+
+  // Kernel functors:
+  typedef typename Kernel::Equal_2                       Equal_2;
+  typedef typename Kernel::Construct_translated_point_2  Translate_point_2;
+  typedef typename Kernel::Construct_vector_2            Construct_vector_2;
+  typedef typename Kernel::Construct_direction_2         Construct_direction_2;
+  typedef typename Kernel::Orientation_2                 Compute_orientation_2;
+  typedef typename Kernel::Do_intersect_2                Do_intersect_2;
+  typedef typename Kernel::Counterclockwise_in_between_2 Ccw_in_between_2;
+
+  typedef std::list<unsigned int>                        Indices_list;
+  typedef typename Indices_list::const_iterator          Indices_iterator;
+
+  // Point with additional infomaration.
+  struct Point_info_2 {
+    Point_2           point;
+    bool              is_reflex;
+    unsigned int      reflex_count;
+    Indices_list      visible;
+    Indices_list      non_visible;
+
+    // Default constructor.
+    Point_info_2() :
+      is_reflex(false),
+      reflex_count(0),
+      visible(),
+      non_visible()
+    {}
+
+    // Check if the given vertex is visible.
+    bool is_visible(unsigned int index) const
+    {
+      Indices_iterator it;
+      for (it = visible.begin(); it != visible.end(); ++it) {
+        if (*it == index) return (true);
+      }
+      return (false);
+    }
+
+    // Check if the given vertex is non-visible.
+    bool is_non_visible(unsigned int index) const
+    {
+      Indices_iterator it;
+      for (it = non_visible.begin(); it != non_visible.end(); ++it) {
+        if (*it == index) return (true);
+      }
+      return (false);
+    }
+  };
+
+  typedef std::vector<Point_info_2>                Point_vector_2;
+
+  const Kernel* m_kernel;
+  bool m_own_kernel;    // inidicates whether the kernel should be freed up.
+
+  // Data members:
+  Equal_2                 f_equal;
+  Translate_point_2       f_add;
+  Construct_vector_2      f_vector;
+  Construct_direction_2   f_direction;
+  Compute_orientation_2   f_orientation;
+  Do_intersect_2          f_do_intersect;
+  Ccw_in_between_2        f_ccw_in_between;
+
+public:
+  /*! Default constructor. */
+  Small_side_angle_bisector_decomposition_2() :
+    m_kernel(new Kernel),
+    m_own_kernel(true)
+  { init(); }
+
+  /*! Constructor. */
+  Small_side_angle_bisector_decomposition_2(const Kernel& kernel) :
+    m_kernel(&kernel),
+    m_own_kernel(false)
+  { init(); }
+
+  /*! Destructor */
+  ~Small_side_angle_bisector_decomposition_2()
+  {
+    if (m_own_kernel) {
+      if (m_kernel != NULL) {
+        delete m_kernel;
+        m_kernel = NULL;
+      }
+      m_own_kernel = false;
+    }
+  }
+
+  /*! Initialize. */
+  void init()
+  {
+    // Obtain kernel functors.
+    f_equal = m_kernel->equal_2_object();
+    f_add = m_kernel->construct_translated_point_2_object();
+    f_vector = m_kernel->construct_vector_2_object();
+    f_direction = m_kernel->construct_direction_2_object();
+    f_orientation = m_kernel->orientation_2_object();
+    f_do_intersect = m_kernel->do_intersect_2_object();
+    f_ccw_in_between = m_kernel->counterclockwise_in_between_2_object();
+  }
+
+  /*!
+   * Decompose a simple polygon to convex sub-polygons.
+   * \param pgn The input polygon.
+   * \param oi An output iterator of convex polygons.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator>
+  OutputIterator operator()(const Polygon_2& pgn, OutputIterator oi) const
+  {
+    // Construct a point-info vector that represents the input polygon.
+    Point_vector_2   vec;
+
+    if (_construct_point_vector(pgn, vec)) {
+      // The input polygon is convex - just return it as is (we use the
+      // auxiliary function to make sure the returned polygon is oriented
+      // counterclockwise).
+      oi = _output_polygon(vec, oi);
+      return (oi);
+    }
+
+    // Prepare a queue of polygons, represented as point vectors, to decompose.
+    // We first try the small-side decomposition, and if we fail we turn to
+    // the normal angle-bisector decomposition.
+    std::list<Point_vector_2> ss_queue;
+    std::list<Point_vector_2> ab_queue;
+    unsigned int ind1, ind2;
+    Point_vector_2 vec1, vec2;
+
+    ind1 = ind2 = static_cast<unsigned int>(-1);        // Pacify some compiler
+
+    ss_queue.push_back(vec);
+
+    // Use the small-side decomposition as long as possible.
+    while (! ss_queue.empty()) {
+      // Extract the first polygon from the queue.
+      vec = ss_queue.front();
+      ss_queue.pop_front();
+
+      // Try computing a minimal diagonal eliminating two reflex vertices.
+      if (_compute_min_diagonal(vec, ind1, ind2)) {
+        // We have found a minimal diagonal - use it to split the polygon.
+        _split_by_diagonal(vec, ind1, ind2, false, vec1, vec2);
+
+        // For either of the resulting sub-polygons: Report them if they are
+        // convex, otherwise decompose them recursively.
+        if (vec1[vec1.size() - 1].reflex_count == 0)
+          oi = _output_polygon(vec1, oi);
+        else
+          ss_queue.push_back(vec1);
+
+        if (vec2[vec2.size() - 1].reflex_count == 0)
+          oi = _output_polygon(vec2, oi);
+        else
+          ss_queue.push_back(vec2);
+      }
+      else {
+        // We have failed to find a minimal diagonal eliminating two reflex
+        // vertices - use the simple angle bisector method for this polygon.
+        ab_queue.push_back(vec);
+      }
+    }
+
+    // Decompose the remaining polygons.
+    while (! ab_queue.empty()) {
+      // Extract the first polygon from the queue.
+      vec = ab_queue.front();
+      ab_queue.pop_front();
+
+      // Compute the best angle bisector and split the polygon accordingly.
+      _approximate_angle_bisector(vec, ind1, ind2);
+
+      _split_by_diagonal(vec, ind1, ind2, true, vec1, vec2);
+
+      // For either of the resulting sub-polygons: Report them if they are
+      // convex, otherwise decompose them recursively.
+      if (vec1[vec1.size() - 1].reflex_count == 0)
+        oi = _output_polygon(vec1, oi);
+      else
+        ab_queue.push_back(vec1);
+
+      if (vec2[vec2.size() - 1].reflex_count == 0)
+        oi = _output_polygon(vec2, oi);
+      else
+        ab_queue.push_back(vec2);
+    }
+
+    return (oi);
+  }
+
+private:
+
+  /*! Return the succesive index of a 'point info' vector. */
+  inline unsigned int _vec_succ(const Point_vector_2& vec,
+                                unsigned int i) const
+  {
+    return ((i + 1) % vec.size());
+  }
+
+  /*! Return the previous index of a 'point info' vector. */
+  inline unsigned int _vec_pred(const Point_vector_2& vec,
+                                unsigned int i) const
+  {
+    if (i == 0) return static_cast<unsigned int>(vec.size() - 1);
+    return (i - 1);
+  }
+
+  /*!
+   * Reflect the point b around the point a.
+   * \return The result of: a + vec('a'-'b').
+   */
+  Point_2 _opposite_from_vertex(const Point_2& a, const Point_2& b) const
+  {
+    return (f_add(a, f_vector(b, a)));
+  }
+
+  // The "reflex zone" of a vertex v is the slice created by continuing the
+  // edges incident to this vertex, from v to infinity. This enumeration
+  // describes the location of a point with respect to this zone.
+  enum Reflex_zone_position {
+    LEFT_OF_ZONE = -1,
+    INSIDE_ZONE = 0,
+    RIGHT_OF_ZONE = 1,
+    ON_ZONE_BOUNDARY = 3,
+    OPPOSITE_OF_ZONE = 9
+  };
+
+  /*!
+   * Get the position of a query point with respect to the reflex zone of a
+   * given vertex.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param v_ind The index of the vertex v.
+   * \param q_pt A query point.
+   * \return The location of the query point with respect to the zone.
+   */
+  Reflex_zone_position _query_reflex_zone(const Point_vector_2& vec,
+                                          unsigned int v_ind,
+                                          const Point_2& q_pt) const
+  {
+    // Initialize q, the reflex vertex, and it previous and next vertices
+    // and incident edges.
+    const Point_2&  v_pt = vec[v_ind].point;
+    const Point_2&  pred_pt = vec[_vec_pred(vec, v_ind)].point;
+    const Point_2&  succ_pt = vec[_vec_succ(vec, v_ind)].point;
+    Direction_2     pred_dir = f_direction(f_vector(v_pt, pred_pt));
+    Direction_2     succ_dir = f_direction(f_vector(v_pt, succ_pt));
+    Point_2         opp_pred_pt = _opposite_from_vertex(v_pt, pred_pt);
+    Point_2         opp_succ_pt = _opposite_from_vertex(v_pt, succ_pt);
+    Direction_2     opp_pred_dir = f_direction(f_vector(v_pt, opp_pred_pt));
+    Direction_2     opp_succ_dir = f_direction(f_vector(v_pt, opp_succ_pt));
+    Direction_2     q_dir = f_direction(f_vector(v_pt, q_pt));
+
+    if (f_ccw_in_between(q_dir, opp_pred_dir, opp_succ_dir)) {
+      // The point is contained between the continuation of the edges around v,
+      // so it is inside the reflex zone.
+      return (INSIDE_ZONE);
+    }
+
+    if (f_equal(q_dir, opp_pred_dir) || f_equal(q_dir, opp_succ_dir)) {
+      // The point lies on the boundary of the reflex zone.
+      return (ON_ZONE_BOUNDARY);
+    }
+
+    if (f_ccw_in_between(q_dir, opp_succ_dir, pred_dir)) {
+      // The point lies to the left of the reflex zone.
+      return (LEFT_OF_ZONE);
+    }
+
+    if (f_ccw_in_between(q_dir, succ_dir, opp_pred_dir)) {
+      // The point lies to the right of the reflex zone.
+      return (RIGHT_OF_ZONE);
+    }
+
+    // If we reached here, the query point lies on the opposite side of the
+    // reflex zone.
+    CGAL_assertion(f_ccw_in_between(q_dir, pred_dir, succ_dir) ||
+                   f_equal(q_dir, pred_dir) || f_equal(q_dir, succ_dir));
+
+    return (OPPOSITE_OF_ZONE);
+  }
+
+  /*!
+   * Check whether a given vertex u is visible from a reflex vertex v.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param v_ind The index of the reflex vertex v.
+   * \param u_ind The index of the vertex u.
+   * \return Whether the vertices are visible.
+   */
+  bool _is_visible(Point_vector_2& vec,
+                   unsigned int v_ind, unsigned int u_ind) const
+  {
+    CGAL_precondition(vec[v_ind].is_reflex);
+
+    // Check whether the visiblity status is already known.
+    if (vec[v_ind].is_visible(u_ind)) return (true);
+    if (vec[v_ind].is_non_visible(u_ind)) return (false);
+
+    // Check whether the diagonal (v_ind, u_ind) does not intersect any of
+    // the polygn edges.
+    bool    result;
+
+    if ((u_ind == v_ind) ||
+        (u_ind == _vec_pred(vec, v_ind)) || (u_ind == _vec_succ(vec, v_ind)))
+    {
+      // A polygon edge (or a degenerate diagonal) is not considered as a legal
+      // visibility diagonal.
+      result = false;
+    }
+    else if (_query_reflex_zone(vec, v_ind,
+                                vec[u_ind].point) == OPPOSITE_OF_ZONE)
+    {
+      // In this case the diagonal between u and v lies outside the polygon,
+      // so the two vertices are not visible.
+      result = false;
+    }
+    else {
+      // Perform an exhaustive search on the polygon edges and check if any of
+      // them intersects the diagonal segment uv.
+      Segment_2 diag(vec[u_ind].point, vec[v_ind].point);
+      unsigned int curr = _vec_succ(vec, v_ind);
+      unsigned int next = _vec_succ(vec, curr);
+
+      result = true;
+      while (result && next != v_ind) {
+        if (curr != u_ind && next != u_ind) {
+          if (do_intersect(diag, Segment_2(vec[curr].point, vec[next].point)))
+            result = false;
+        }
+
+        curr = next;
+        next = _vec_succ(vec, curr);
+      }
+    }
+
+    // Update the visibility status.
+    if (result) vec[v_ind].visible.push_back(u_ind);
+    else vec[v_ind].non_visible.push_back(u_ind);
+
+    return (result);
+  }
+
+  /*!
+   * Construct a Point_info_2 vector from the given polygon.
+   * \param poly The input polygon.
+   * \param vec Output: The point vector.
+   * \return Whether the polygon is convex.
+   */
+  bool _construct_point_vector(const Polygon_2& pgn, Point_vector_2& vec) const
+  {
+    // Resize the vector to fit the polygon.
+    const unsigned int n = static_cast<unsigned int>(pgn.size());
+    const bool forward = (pgn.orientation() == COUNTERCLOCKWISE);
+    Vertex_circulator prev, curr, next;
+    unsigned int reflex_count = 0;
+    unsigned int k;
+
+    vec.resize(n);
+
+    // Initialize the vertex circulators.
+    next = curr = prev = pgn.vertices_circulator();
+
+    if (forward) --prev;
+    else ++prev;
+
+    // Traverse the polygon's vertices in a counterclockwise order and prepare
+    // the output vector.
+    for (k = 0; k < n; ++k) {
+      // Set the next vertex.
+      if (forward) ++next;
+      else --next;
+
+      // Set the current point.
+      vec[k].point = *curr;
+
+      // Check if the current vertex is reflex by checking the orientation of
+      // the polygon around it.
+      vec[k].is_reflex = (f_orientation(*prev, *curr, *next) == RIGHT_TURN);
+
+      // Set the number of reflex vertices from the beginning of the vector
+      // until the k'th (including itself).
+      if (vec[k].is_reflex) ++reflex_count;
+
+      vec[k].reflex_count = reflex_count;
+
+      // Proceed to the next vertex.
+      prev = curr;
+      curr = next;
+    }
+
+    // The polygon is convex if there are not reflex vertices:
+    return (reflex_count == 0);
+  }
+
+  /*!
+   * Given a polygon and to of its vertices u and v, count the number of reflex
+   * vertices between u and v, and between v and u (not including u and v
+   * themselves), and return the lesser quantity.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param v_ind The index of the vertex v.
+   * \param u_ind The index of the vertex u.
+   * \return The minimal number of reflex vertices between u and v.
+   */
+  unsigned int _count_reflex_vertices(const Point_vector_2& vec,
+                                      unsigned int u_ind,
+                                      unsigned int v_ind) const
+  {
+    if (u_ind == v_ind) return (0);
+
+    unsigned int count1 = 0, count2 = 0;
+    unsigned int k;
+
+    // Make sure that v_ind > u_ind (if necessary, swap indices).
+    if (u_ind > v_ind) {
+      k = u_ind;
+      u_ind = v_ind;
+      v_ind = k;
+    }
+
+    // Compute how many reflex vertices there are between u and v (not
+    // including v itself).
+    count1 = (vec[v_ind].reflex_count - vec[u_ind].reflex_count);
+
+    if (vec[v_ind].is_reflex) --count1;
+
+    // Compute how many reflex vertices there are between v and u (not
+    // including u itself).
+    count2 = (vec[vec.size() - 1].reflex_count - vec[v_ind].reflex_count) +
+      vec[u_ind].reflex_count;
+
+    if (vec[u_ind].is_reflex) --count2;
+
+    // Return the smaller value.
+    if (count1 < count2) return count1;
+    else return count2;
+  }
+
+  /*!
+   * Given a non-convex polygon, try to find a diagonal connecting to mutually
+   * visible reflex vertices u and v such that the number of reflex vertices
+   * between u and v is minimized.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param v_ind Output: The index of the vertex v.
+   * \param u_ind Output: The index of the vertex u.
+   * \return Whether a diagonal was found.
+   */
+  bool _compute_min_diagonal(Point_vector_2& vec,
+                             unsigned int& u_ind, unsigned int& v_ind) const
+  {
+    unsigned int ind1, ind2;
+    Reflex_zone_position zone_pos;
+    unsigned int curr_count;
+    unsigned int min_count = 0;
+    bool found = false;
+    unsigned int dist;
+
+    // Let the distance between pairs of vertices we try vary between 2 and
+    // half the size of the polygon.
+    for (dist = 2; dist < (vec.size() + 1) / 2; ++dist) {
+      // Traverse the polygon vertices.
+      for (ind1 = 0; ind1 < vec.size(); ++ind1) {
+        // Ignore convex vertices.
+        if (! vec[ind1].is_reflex) continue;
+
+        ind2 = (ind1 + dist) % vec.size();
+
+        // Ignore convex vertices.
+        if (! vec[ind2].is_reflex) continue;
+
+        // Count the number of reflex vertices between the current pair of
+        // reflex vertices.
+        curr_count = _count_reflex_vertices(vec, ind1, ind2);
+
+        // If we are not below the minimal, stop checking.
+        if (found && (min_count < curr_count)) continue;
+
+        // Check whether the two vertices lie in the reflex zone of one
+        // another. If so, the diagonal between them splits each of the angles
+        // of u and v into two angles than are not greater than 180 degrees.
+        zone_pos = _query_reflex_zone(vec, ind1, vec[ind2].point);
+
+        if ((zone_pos != INSIDE_ZONE) && (zone_pos != ON_ZONE_BOUNDARY))
+          continue;
+
+        zone_pos = _query_reflex_zone(vec, ind2, vec[ind1].point);
+
+        if ((zone_pos != INSIDE_ZONE) && (zone_pos != ON_ZONE_BOUNDARY))
+          continue;
+
+        // Check whether the two vertices are mutually visible.
+        if (! _is_visible(vec, ind1, ind2)) continue;
+
+        // If we passed all the various tests and reached here, we can update
+        // the minimal count.
+        min_count = curr_count;
+        u_ind = ind1;
+        v_ind = ind2;
+        found = true;
+      }
+    }
+
+    // Return whether a diagonal has been found.
+    return (found);
+  }
+
+  /*!
+   * Split the given polygon by the given diagonal.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param ind1 The index of the first diagonal end-vertex.
+   * \param ind2 The index of the second diagonal end-vertex.
+   * \param check_ends Should we check for convexity near ind1 and ind2.
+   * \param vec1 Output: The first output polygon.
+   * \param vec2 Output: The second output polygon.
+   */
+  void _split_by_diagonal(const Point_vector_2& vec,
+                          unsigned int ind1, unsigned int ind2,
+                          bool check_ends,
+                          Point_vector_2& vec1,
+                          Point_vector_2& vec2) const
+  {
+    unsigned int i1, i2;
+    Indices_iterator iter;
+    unsigned int reflex_count;
+
+    // Make sure that the index ind2 is greater than ind1.
+    if (ind1 > ind2) {
+      i1 = ind1;
+      ind1 = ind2;
+      ind2 = i1;
+    }
+
+    // Resize the output vectors.
+    vec1.resize(ind2 - ind1 + 1);
+    vec2.resize(vec.size() - (ind2 - ind1 - 1));
+
+    // Construct the first output polygon. Notice we traverse the polygon in
+    // a counterclockwise direction from ind1 to ind2 and back.
+    reflex_count = 0;
+
+    for (i1 = ind1; i1 <= ind2; ++i1) {
+      // Copy the point.
+      vec1[i1 - ind1].point = vec[i1].point;
+
+      // Clear the visible vertices list.
+      vec1[i1-ind1].visible.clear();
+      vec1[i1-ind1].non_visible.clear();
+
+      if (i1 == ind1) {
+        if (check_ends) {
+          // Check the turn around ind1.
+          vec1[i1-ind1].is_reflex =
+            (f_orientation(vec[ind2].point,
+                            vec[ind1].point,
+                            vec[_vec_succ(vec, ind1)].point) == RIGHT_TURN);
+        }
+        else {
+          // The two diagonal end-vertices are not reflex any more.
+          vec1[i1-ind1].is_reflex = false;
+        }
+      }
+      else if (i1 == ind2) {
+        if (check_ends) {
+          // Check the turn around ind2.
+          vec1[i1-ind1].is_reflex =
+            (f_orientation(vec[_vec_pred(vec, ind2)].point,
+                            vec[ind2].point,
+                            vec[ind1].point) == RIGHT_TURN);
+        }
+        else {
+          // The two diagonal end-vertices are not reflex any more.
+          vec1[i1-ind1].is_reflex = false;
+        }
+      }
+      else {
+        // Copy the reflexity flag.
+        vec1[i1-ind1].is_reflex = vec[i1].is_reflex;
+
+        // Set the visible vertices list.
+        for (iter = vec[i1].visible.begin();
+             iter != vec[i1].visible.end(); ++iter)
+        {
+          if ((*iter > ind1) && (*iter < ind2))
+            vec1[i1-ind1].visible.push_back(*iter - ind1);
+        }
+
+        // Set the non-visible vertices list.
+        for (iter = vec[i1].non_visible.begin();
+             iter != vec[i1].non_visible.end(); ++iter)
+        {
+          if ((*iter > ind1) && (*iter < ind2))
+            vec1[i1-ind1].non_visible.push_back(*iter - ind1);
+        }
+      }
+
+      // Set the reflex count.
+      if (vec1[i1-ind1].is_reflex)
+        reflex_count++;
+
+      vec1[i1-ind1].reflex_count = reflex_count;
+    }
+
+    // Construct the second output polygon. Notice we traverse the polygon in
+    // a counterclockwise direction from ind2 to ind1 and back.
+    reflex_count = 0;
+    i2 = 0;
+    i1 = ind2;
+
+    // go ccw on all the vertices from 'ind2' to 'ind1'.
+    while (i1 != (ind1+1)) {
+      // Copy the point.
+      vec2[i2].point = vec[i1].point;
+
+      // Clear the visible vertices list.
+      vec2[i2].visible.clear();
+      vec2[i2].non_visible.clear();
+
+      if (i1 == ind1) {
+        if (check_ends) {
+          // Check the turn around ind1.
+          vec2[i2].is_reflex =
+            (f_orientation(vec[_vec_pred(vec, ind1)].point,
+                            vec[ind1].point,
+                            vec[ind2].point) == RIGHT_TURN);
+        }
+        else {
+          // The two diagonal end-vertices are not reflex any more.
+          vec2[i2].is_reflex = false;
+        }
+      }
+      else if (i1 == ind2) {
+        if (check_ends) {
+          // Check the turn around ind2.
+          vec2[i2].is_reflex =
+            (f_orientation(vec[ind1].point,
+                            vec[ind2].point,
+                            vec[_vec_succ(vec, ind2)].point) == RIGHT_TURN);
+        }
+        else {
+          // The two diagonal end-vertices are not reflex any more.
+          vec2[i2].is_reflex = false;
+        }
+      }
+      else {
+        // Copy the reflexity flag.
+        vec2[i2].is_reflex = vec[i1].is_reflex;
+
+        // Set the visible vertices list.
+        for (iter = vec[i1].visible.begin();
+             iter != vec[i1].visible.end(); ++iter)
+        {
+          if (*iter > ind2) {
+            vec2[i2].visible.push_back(*iter - ind2);
+          }
+          else if (*iter < ind1) {
+            vec2[i2].visible.push_back(*iter +
+                                       static_cast<unsigned int>(vec.size()) -
+                                       ind2);
+          }
+        }
+
+        // Set the non-visible vertices list.
+        for (iter = vec[i1].non_visible.begin();
+             iter != vec[i1].non_visible.end(); ++iter)
+        {
+          if (*iter > ind2) {
+            vec2[i2].non_visible.push_back(*iter - ind2);
+          }
+          else if (*iter < ind1) {
+            vec2[i2].non_visible.push_back(*iter +
+                                           static_cast<int>(vec.size()) -
+                                           ind2);
+          }
+        }
+      }
+
+      // Set the reflex count.
+      if (vec2[i2].is_reflex)
+        reflex_count++;
+
+      vec2[i2].reflex_count = reflex_count;
+
+      // advance the indices.
+      i1 = _vec_succ(vec, i1);
+      i2++;
+    }
+
+    return;
+  }
+
+  /*!
+   * Get the angle ratio created by the the bisection of the angle at the
+   * reflex vertex v by the diagonal uv.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param v_ind The index of the vertex v.
+   * \param u_ind The index of the vertex u.
+   * \return The ratio between the bisected angles.
+   */
+  double _angle_bisection_ratio(Point_vector_2& vec,
+                                unsigned int v_ind,
+                                unsigned int u_ind) const
+  {
+    const double    _2_PI = 6.2831853;
+
+    // Get the points at u and v, as well as v's adjacencies and approximate
+    // their coordinates.
+    const Point_2&  u_pt = vec[u_ind].point;
+    const Point_2&  v_pt = vec[v_ind].point;
+    const Point_2&  pred_pt = vec[_vec_pred(vec, v_ind)].point;
+    const Point_2&  succ_pt = vec[_vec_succ(vec, v_ind)].point;
+    const double    ux = CGAL::to_double(u_pt.x());
+    const double    uy = CGAL::to_double(u_pt.y());
+    const double    vx = CGAL::to_double(v_pt.x());
+    const double    vy = CGAL::to_double(v_pt.y());
+    const double    pred_x = CGAL::to_double(pred_pt.x());
+    const double    pred_y = CGAL::to_double(pred_pt.y());
+    const double    succ_x = CGAL::to_double(succ_pt.x());
+    const double    succ_y = CGAL::to_double(succ_pt.y());
+
+    // Compute the edge length and the diagonal length.
+    const double len_uv =
+      ::sqrt((ux - vx) * (ux - vx) + (uy - vy) * (uy - vy));
+    const double len_pred =
+      ::sqrt((pred_x - vx) * (pred_x - vx) + (pred_y - vy) * (pred_y - vy));
+    const double len_succ =
+      ::sqrt((succ_x - vx) * (succ_x - vx) + (succ_y - vy) * (succ_y - vy));
+
+    // Compute the angle a1 = <) (pred_pt, v_pt, u_pt):
+    const double cos_a1 = ((ux - vx) * (pred_x - vx) +
+                           (uy - vy) * (pred_y - vy)) / (len_uv * len_pred);
+    double a1 = ::acos(cos_a1);
+
+    // The angle a1 is larger than 180 degree:
+    if (f_orientation(pred_pt, v_pt, u_pt) == RIGHT_TURN) a1 = _2_PI - a1;
+
+    // Compute the angle a2 = <) (u_pt, v_pt, succ_pt):
+    const double cos_a2 = ((ux - vx) * (succ_x - vx) +
+                           (uy - vy) * (succ_y - vy)) / (len_uv * len_succ);
+    double a2 = ::acos(cos_a2);
+
+    if (f_orientation(u_pt, v_pt, succ_pt) == RIGHT_TURN)
+      // The angle a1 is larger than 180 degree:
+      a2 = _2_PI - a2;
+
+    // Return the ratio of max(a1,a2)/min(a1,a2).
+    if (a1 == 0 || a2 == 0) return (10000);
+
+    if (a1 > a2) return (a1 / a2);
+    else return (a2 / a1);
+  }
+
+  /*!
+   * Perform an approximate angle-bisector decomposition, by locating a reflex
+   * vertex and another vertex such that the diagonal between them is not
+   * blocked, and such that it approximates the angle bisector of the reflex
+   * vertex.
+   * \param vec A vector defining counterclockwise-oriented polygon.
+   * \param reflex_ind Output: The index of the reflex vertex whose angle we
+   *                           wish to bisect.
+   * \param other_ind Output: The index of the other polygon vertex.
+   */
+  void _approximate_angle_bisector(Point_vector_2& vec,
+                                   unsigned int& reflex_ind,
+                                   unsigned int& other_ind) const
+  {
+    unsigned int ind1, ind2;
+    double curr_ratio;
+    double min_ratio = 0;
+    bool found = false;
+    unsigned int dist;
+
+    // Let the distance between pairs of vertices we try vary between 2 and
+    // the size of the polygon - 2.
+    for (dist = 2; dist <= vec.size() - 2; ++dist) {
+      // Traverse the polygon vertices.
+      for (ind1 = 0; ind1 < vec.size(); ++ind1) {
+        // Ignore convex vertices.
+        if (! vec[ind1].is_reflex) continue;
+
+        ind2 = (ind1 + dist) % vec.size();
+
+        // Get the current ratio between the two angles the current
+        // diagonal splits around vec[ind1].
+        curr_ratio = _angle_bisection_ratio(vec, ind1, ind2);
+
+        // If we are not below the minimal, stop checking.
+        if (found && min_ratio < curr_ratio) continue;
+
+        // Check whether the two vertices are mutually visible.
+        if (! _is_visible(vec, ind1, ind2)) continue;
+
+        // If we passed all the various tests and reached here, we can update
+        // the minimal angle difference.
+        min_ratio = curr_ratio;
+        reflex_ind = ind1;
+        other_ind = ind2;
+        found = true;
+      }
+    }
+
+    // Return whether a diagonal has been found.
+    CGAL_assertion(found);
+    return;
+  }
+
+  /*!
+   * Convert the point-info vector into a polygon and send it as an output.
+   * \param vec A vector defining counterclockwise-oriented convex polygon.
+   * \param oi The output iterator.
+   * \return A past-the-end iterator for the sub-polygons.
+   */
+  template <typename OutputIterator>
+  OutputIterator _output_polygon(const Point_vector_2& vec,
+                                 OutputIterator oi) const
+  {
+    const unsigned int n = static_cast<int>(vec.size());
+    Polygon_2 pgn;
+    for (unsigned int k = 0; k < n; ++k) pgn.push_back(vec[k].point);
+    *oi++ = pgn;
+    return (oi);
+  }
+};
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_2.h b/3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_kd_2.h b/3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_kd_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Snap_rounding_kd_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_kd_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_traits_2.h
new file mode 100644
index 0000000..5a9e567
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Snap_rounding_traits_2.h
@@ -0,0 +1,223 @@
+// Copyright (c) 2001,2009,2014  Tel-Aviv University (Israel), Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// author(s)     : Eli Packer <elip at post.tau.ac.il>,
+//                 Waqar Khan <wkhan at mpi-inf.mpg.de>
+
+#ifndef CGAL_SNAP_ROUNDING_2_TRAITS_H
+#define CGAL_SNAP_ROUNDING_2_TRAITS_H
+
+#include <CGAL/basic.h>
+#include <map>
+#include <list>
+
+#include <CGAL/Arr_segment_traits_2.h>
+
+namespace CGAL {
+
+template<class Base_kernel>
+class Snap_rounding_traits_2 :
+  public CGAL::Arr_segment_traits_2<Base_kernel> {
+
+public: // otherwise Segment_data cannot access the types
+  typedef typename Base_kernel::FT                          NT;
+  typedef typename Base_kernel::FT                          FT;
+  typedef typename Base_kernel::Point_2                     Point_2;
+  typedef typename Base_kernel::Segment_2                   Segment_2;
+  typedef typename Base_kernel::Iso_rectangle_2             Iso_rectangle_2;
+  typedef typename Base_kernel::Vector_2                    Vector_2;
+  typedef typename Base_kernel::Line_2                      Line_2;
+  typedef typename Base_kernel::Aff_transformation_2        Aff_transformation_2;
+  typedef typename Base_kernel::Direction_2                 Direction_2;
+  typedef typename Base_kernel::Construct_vertex_2          Construct_vertex_2 ;
+  typedef typename Base_kernel::Construct_segment_2         Construct_segment_2 ;
+  typedef typename Base_kernel::Construct_iso_rectangle_2   Construct_iso_rectangle_2;
+  typedef typename Base_kernel::Compare_y_2                 Compare_y_2;
+
+  typedef typename Base_kernel::Construct_min_vertex_2                    Construct_min_vertex_2;
+  typedef typename Base_kernel::Construct_max_vertex_2                    Construct_max_vertex_2;
+  typedef typename Base_kernel::Cartesian_const_iterator_2                Cartesian_const_iterator_2;
+  typedef typename Base_kernel::Construct_cartesian_const_iterator_2      Construct_cartesian_const_iterator_2;
+
+  typedef CGAL::Arr_segment_traits_2<Base_kernel>                         Base_traits;
+  typedef typename Base_traits::Compare_x_2                               Compare_x_2;
+  typedef CGAL::To_double<NT>                                             To_double;
+
+public:
+  /*! Functor */
+  class Snap_2 {
+  public:
+    void operator()(const Point_2& p, NT pixel_size, NT &x, NT &y)
+    {
+      NT x_tmp = p.x() / pixel_size;
+      NT y_tmp = p.y() / pixel_size;
+
+      NT x_floor = std::floor(CGAL::to_double(x_tmp));
+      NT y_floor = std::floor(CGAL::to_double(y_tmp));
+
+      // fix the usage of to_double and floor:
+      // there is no guarantee that the double approximation of *_tmp
+      // has the same integer part as the NT version. The while loops
+      // is a simple way to ensure that *_tmp are the true floor.
+      while(x_floor>x_tmp) x_floor-=NT(1);
+      while(y_floor>y_tmp) y_floor-=NT(1);
+      while(x_floor+1<=x_tmp) x_floor+=NT(1);
+      while(y_floor+1<=y_tmp) y_floor+=NT(1);
+
+      CGAL_assertion(x_floor<=x_tmp);
+      CGAL_assertion(y_floor<=y_tmp);
+      CGAL_assertion(x_floor+1>x_tmp);
+      CGAL_assertion(y_floor+1>y_tmp);
+
+      x = x_floor * pixel_size + pixel_size / NT(2.0);
+      y = y_floor * pixel_size + pixel_size / NT(2.0);
+    }
+  };
+
+  Snap_2 snap_2_object() const { return Snap_2(); }
+
+  /*! Functor */
+  class Integer_grid_point_2 {
+  public:
+    Point_2 operator()(const Point_2& p, NT pixel_size)
+    {
+      NT x = (p.x() - pixel_size / NT(2.0)) / pixel_size;
+      NT y = (p.y() - pixel_size / NT(2.0)) / pixel_size;
+      Point_2 out_p(x,y);
+
+      return(out_p);
+    }
+  };
+
+  /*! */
+  Integer_grid_point_2 integer_grid_point_2_object() const
+  {
+    return Integer_grid_point_2();
+  }
+
+  /*! Functor */
+  class Minkowski_sum_with_pixel_2 {
+  private:
+    typedef Snap_rounding_traits_2<Base_kernel>         Traits;
+    typedef std::list<Point_2>                          Point_list;
+
+
+    const Traits * m_gt;
+
+    Minkowski_sum_with_pixel_2(const Traits * gt) : m_gt(gt) {}
+
+  public:
+    void operator()(Point_list & points_list, const Segment_2& s, NT unit_square)
+    {
+
+      Construct_vertex_2 construct_ver = m_gt->construct_vertex_2_object();
+      Compare_y_2 compare_y = m_gt->compare_y_2_object();
+      Compare_x_2 compare_x = m_gt->compare_x_2_object();
+
+      Point_2 src = construct_ver(s, 0);
+      Point_2 trg = construct_ver(s, 1);
+      Comparison_result cx = compare_x(src, trg);
+      Comparison_result cy = compare_y(src, trg);
+      NT x1 = src.x();
+      NT y1 = src.y();
+      NT x2 = trg.x();
+      NT y2 = trg.y();
+      Point_2 ms1, ms2, ms3, ms4, ms5, ms6;// minkowski sum points
+
+      if (cx == SMALLER) {
+        if (cy == SMALLER) {
+          // we use unit_square instead of unit_square / 2 in order to
+          // find tangency points which are not supported by kd-tree
+          ms1 = Point_2(x1 - unit_square, y1 - unit_square);
+          ms2 = Point_2(x1 - unit_square, y1 + unit_square);
+          ms3 = Point_2(x1 + unit_square, y1 - unit_square);
+          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
+          ms5 = Point_2(x2 + unit_square, y2 + unit_square);
+          ms6 = Point_2(x2 - unit_square, y2 + unit_square);
+        } else {
+          ms1 = Point_2(x1 - unit_square, y1 - unit_square);
+          ms2 = Point_2(x1 - unit_square, y1 + unit_square);
+          ms3 = Point_2(x1 + unit_square, y1 + unit_square);
+          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
+          ms5 = Point_2(x2 + unit_square, y2 + unit_square);
+          ms6 = Point_2(x2 - unit_square, y2 - unit_square);
+        }
+      } else {
+        if(cy == SMALLER) {
+          ms1 = Point_2(x1 + unit_square, y1 - unit_square);
+          ms2 = Point_2(x1 + unit_square, y1 + unit_square);
+          ms3 = Point_2(x1 - unit_square, y1 - unit_square);
+          ms4 = Point_2(x2 + unit_square, y2 + unit_square);
+          ms5 = Point_2(x2 - unit_square, y2 + unit_square);
+          ms6 = Point_2(x2 - unit_square, y2 - unit_square);
+        } else {
+          ms1 = Point_2(x1 + unit_square, y1 - unit_square);
+          ms2 = Point_2(x1 + unit_square, y1 + unit_square);
+          ms3 = Point_2(x1 - unit_square, y1 + unit_square);
+          ms4 = Point_2(x2 + unit_square, y2 - unit_square);
+          ms5 = Point_2(x2 - unit_square, y2 - unit_square);
+          ms6 = Point_2(x2 - unit_square, y2 + unit_square);
+        }
+      }
+
+      points_list.push_back(ms1);
+      points_list.push_back(ms2);
+      points_list.push_back(ms3);
+      points_list.push_back(ms4);
+      points_list.push_back(ms5);
+      points_list.push_back(ms6);
+    }
+
+    friend class Snap_rounding_traits_2<Base_kernel>;
+  };
+
+  /*! */
+  Minkowski_sum_with_pixel_2 minkowski_sum_with_pixel_2_object() const
+  {
+    return Minkowski_sum_with_pixel_2(this);
+  }
+
+  Construct_segment_2  construct_segment_2_object() const
+  {
+    Base_kernel k;
+    return k.construct_segment_2_object();
+  }
+
+  Construct_vertex_2 construct_vertex_2_object() const
+  {
+    Base_kernel k;
+    return k.construct_vertex_2_object();
+  }
+
+  Compare_y_2 compare_y_2_object() const
+  {
+    Base_kernel k;
+    return k.compare_y_2_object();
+  }
+
+  Construct_iso_rectangle_2 construct_iso_rectangle_2_object() const
+  {
+    Base_kernel k;
+    return k.construct_iso_rectangle_2_object();
+  }
+
+};
+
+} //namespace CGAL
+
+#endif // CGAL_ISR_2_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sorted_matrix_search_traits_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Sorted_matrix_search_traits_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sorted_matrix_search_traits_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sorted_matrix_search_traits_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spatial_lock_grid_3.h b/3rdparty/CGAL-4.8/include/CGAL/Spatial_lock_grid_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spatial_lock_grid_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spatial_lock_grid_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_2.h b/3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_3.h b/3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_d.h b/3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spatial_sort_traits_adapter_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spatial_sort_traits_adapter_d.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/Sphere_3.h
new file mode 100644
index 0000000..0fc5420
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Sphere_3.h
@@ -0,0 +1,349 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra
+
+#ifndef CGAL_SPHERE_3_H
+#define CGAL_SPHERE_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Sphere_3 : public R_::Kernel_base::Sphere_3
+{
+  typedef typename R_::FT                    FT;
+// http://doc.cgal.org/latest/Manual/devman_code_format.html#secprogramming_conventions
+  typedef typename R_::Point_3               Point_3_;
+  typedef typename R_::Circle_3              Circle_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Sphere_3                           Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Sphere_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Sphere_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Sphere_3() {}
+
+  Sphere_3(const Rep& s)
+   : Rep(s) {}
+
+  Sphere_3(const Point_3_& p, const FT& sq_rad,
+           const Orientation& o = COUNTERCLOCKWISE)
+   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, sq_rad, o)) {}
+
+  Sphere_3(const Point_3_& p, const Point_3_& q,
+           const Point_3_& r, const Point_3_& u)
+   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, u)) {}
+
+  Sphere_3(const Point_3_& p, const Point_3_& q, const Point_3_& r,
+           const Orientation& o = COUNTERCLOCKWISE)
+   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, o)) {}
+
+  Sphere_3(const Point_3_& p, const Point_3_&  q,
+           const Orientation& o = COUNTERCLOCKWISE)
+   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, o)) {}
+
+  explicit Sphere_3(const Point_3_& p, const Orientation& o = COUNTERCLOCKWISE)
+   : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, o)) {}
+
+  explicit Sphere_3(const Circle_3& c)
+   : Rep(typename R::Construct_sphere_3()(c)) {}
+
+  Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const;
+
+  typename cpp11::result_of<typename R::Construct_center_3( Sphere_3)>::type
+  center() const
+  {
+    return R().construct_center_3_object()(*this);
+  }
+
+  FT
+  squared_radius() const
+  {
+    return R().compute_squared_radius_3_object()(*this);
+  }
+
+  // Returns a circle with opposite orientation
+  Sphere_3 opposite() const
+  {
+    return R().construct_opposite_sphere_3_object()(*this);
+  }
+
+  typename R::Orientation orientation() const
+  {
+    return R().orientation_3_object()(*this);
+  }
+
+  typename R::Bounded_side
+  bounded_side(const Point_3_ &p) const
+  {
+    return R().bounded_side_3_object()(*this, p);
+  }
+
+  typename R::Oriented_side
+  oriented_side(const Point_3_ &p) const
+  {
+    return R().oriented_side_3_object()(*this, p);
+  }
+
+  typename R::Boolean
+  has_on(const Point_3_ &p) const
+  {
+    return R().has_on_3_object()(*this, p);
+  }  
+
+  typename R::Boolean
+  has_on(const Circle_3 &c) const
+  {
+    return R().has_on_3_object()(*this, c);
+  }
+  
+  typename R::Boolean
+  has_on_boundary(const Point_3_ &p) const
+  {
+    return R().has_on_boundary_3_object()(*this, p);
+    //return bounded_side(p) == ON_BOUNDARY;
+  }
+
+  typename R::Boolean
+  has_on_bounded_side(const Point_3_ &p) const
+  {
+    return bounded_side(p) == ON_BOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_unbounded_side(const Point_3_ &p) const
+  {
+    return bounded_side(p) == ON_UNBOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_negative_side(const Point_3_ &p) const
+  {
+    if (orientation() == COUNTERCLOCKWISE)
+      return has_on_unbounded_side(p);
+    return has_on_bounded_side(p);
+  }
+
+  typename R::Boolean
+  has_on_positive_side(const Point_3_ &p) const
+  {
+    if (orientation() == COUNTERCLOCKWISE)
+      return has_on_bounded_side(p);
+    return has_on_unbounded_side(p);
+  }
+
+  typename R::Boolean
+  is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+    //return CGAL_NTS is_zero(squared_radius());
+  }
+
+  Bbox_3
+  bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+};
+
+template <class R_>
+Sphere_3<R_>
+Sphere_3<R_>::
+orthogonal_transform(const typename R_::Aff_transformation_3& t) const
+{
+    typedef typename  R_::RT  RT;
+    typedef typename  R_::FT  FT;
+    typedef typename  R_::Vector_3  Vector_3;
+
+    // FIXME: precond: t.is_orthogonal() (*UNDEFINED*)
+    Vector_3 vec(RT(1), RT(0), RT(0));        // unit vector
+    vec = vec.transform(t);                   // transformed
+    FT sq_scale = vec.squared_length();       // squared scaling factor
+
+    return Sphere_3(t.transform(this->center()),
+                    sq_scale * this->squared_radius(),
+                    t.is_even() ? this->orientation()
+                                : CGAL::opposite(this->orientation()));
+}
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Sphere_3<R>& c,const Cartesian_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        os << c.center() << ' ' << c.squared_radius() << ' '
+           << static_cast<int>(c.orientation());
+        break;
+    case IO::BINARY :
+        os << c.center();
+        write(os, c.squared_radius());
+        write(os, static_cast<int>(c.orientation()));
+        break;
+    default:
+        os << "SphereC3(" << c.center() <<  ", " << c.squared_radius();
+        switch (c.orientation()) {
+        case CLOCKWISE:
+            os << ", clockwise)";
+            break;
+        case COUNTERCLOCKWISE:
+            os << ", counterclockwise)";
+            break;
+        default:
+            os << ", collinear)";
+            break;
+        }
+        break;
+    }
+    return os;
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Sphere_3<R>& c, const Homogeneous_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        os << c.center() << ' ' << c.squared_radius() << ' '
+           << static_cast<int>(c.orientation());
+        break;
+    case IO::BINARY :
+        os << c.center();
+        write(os, c.squared_radius());
+        write(os, static_cast<int>(c.orientation()));
+        break;
+    default:
+        os << "SphereH3(" << c.center() <<  ", " << c.squared_radius();
+        switch (c.orientation()) {
+        case CLOCKWISE:
+            os << ", clockwise)";
+            break;
+        case COUNTERCLOCKWISE:
+            os << ", counterclockwise)";
+            break;
+        default:
+            os << ", collinear)";
+            break;
+        }
+        break;
+    }
+    return os;
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Sphere_3<R>& c)
+{
+  return insert(os, c, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Sphere_3<R>& c, const Cartesian_tag&)
+{
+    typename R::Point_3 center;
+    typename R::FT squared_radius;
+    int o=0;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> center >> squared_radius >> o;
+        break;
+    case IO::BINARY :
+        is >> center;
+        read(is, squared_radius);
+        is >> o;
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+        c = Sphere_3<R>(center, squared_radius, static_cast<Orientation>(o));
+    return is;
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Sphere_3<R>& c, const Homogeneous_tag&)
+{
+    typename R::Point_3 center;
+    typename R::FT squared_radius;
+    int o;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> center >> squared_radius >> o;
+        break;
+    case IO::BINARY :
+        is >> center;
+        read(is, squared_radius);
+        is >> o;
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+        c = Sphere_3<R>(center, squared_radius, static_cast<Orientation>(o));
+    return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Sphere_3<R>& c)
+{
+  return extract(is, c, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_SPHERE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_3.h b/3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_intersections.h b/3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_intersections.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_intersections.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_intersections.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_type_equality_wrapper.h b/3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_type_equality_wrapper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Spherical_kernel_type_equality_wrapper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Spherical_kernel_type_equality_wrapper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Splitters.h b/3rdparty/CGAL-4.8/include/CGAL/Splitters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Splitters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Splitters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Eigen_NumTraits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Eigen_NumTraits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Eigen_NumTraits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Eigen_NumTraits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Fraction_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Fraction_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Fraction_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Fraction_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Modular_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Modular_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Modular_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Modular_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Real_embeddable_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Real_embeddable_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Real_embeddable_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Real_embeddable_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Scalar_factor_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Scalar_factor_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Scalar_factor_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Scalar_factor_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Sqrt_extension_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Sqrt_extension_type.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Sqrt_extension_type.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Wang_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Wang_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/Wang_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/Wang_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/convert_to_bfi.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/convert_to_bfi.h
new file mode 100644
index 0000000..fb48ed9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/convert_to_bfi.h
@@ -0,0 +1,107 @@
+// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer   <hemmer at mpi-inf.mpg.de>
+
+// This files adds an optional static cache to convert_to_bfi for Sqrt_extension
+
+#ifndef CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
+#define CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
+
+#include <CGAL/basic.h>
+#include <CGAL/convert_to_bfi.h>
+#include <CGAL/Coercion_traits.h>
+#include <CGAL/Sqrt_extension/Sqrt_extension_type.h>
+#include <CGAL/assertions.h>
+
+
+// Disbale SQRT_EXTENSION_TO_BFI_CACHE by default
+#ifndef CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE
+#define CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE 0
+#endif
+
+#if CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE
+
+namespace CGAL {
+
+namespace INTERN_SQRT_EXTENSION {
+template <typename BFI, typename ROOT>
+class Sqrt_extension_bfi_cache {
+  typedef std::pair<long , ROOT> Input;
+  typedef BFI                    Output;
+  typedef typename Coercion_traits<ROOT,BFI>::Cast Cast;
+  typedef typename Algebraic_structure_traits<BFI>::Sqrt Sqrt; 
+
+  struct Creator : public std::unary_function<BFI,Input> {
+    BFI operator()(const Input& pair){
+      return Sqrt()(Cast()(pair.second)); 
+    }
+  };    
+
+public:
+  typedef Cache<Input,Output,Creator> Cache_type;
+  static Cache_type cache; 
+};
+template <typename BFI, typename ROOT>
+typename Sqrt_extension_bfi_cache<BFI,ROOT>::Cache_type 
+Sqrt_extension_bfi_cache<BFI,ROOT>::cache;
+} // namespace INTERN_SQRT_EXTENSION 
+
+
+template <typename NT, typename ROOT, typename ACDE_TAG, typename FP_TAG>
+typename Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval
+convert_to_bfi(const CGAL::Sqrt_extension<NT,ROOT,ACDE_TAG,FP_TAG>& x) {
+  typedef typename Get_arithmetic_kernel<NT>::Arithmetic_kernel AK;
+  typedef typename AK::Bigfloat_interval BFI;
+  typedef Bigfloat_interval_traits<BFI> BFIT;
+  long precision = typename BFIT::Get_precision()();
+
+  BFI result;
+  if(x.is_extended()){
+    typedef INTERN_SQRT_EXTENSION::Sqrt_extension_bfi_cache<BFI,ROOT> Get_cache;
+    BFI a0(convert_to_bfi(x.a0()));
+    BFI a1(convert_to_bfi(x.a1()));
+    BFI root(Get_cache::cache(std::make_pair(precision,x.root())));  
+    result = a0+a1*root;
+  }else{
+    result =  convert_to_bfi(x.a0());
+  }
+#ifndef NDEBUG
+  BFI result_;
+  typedef typename Get_arithmetic_kernel<NT>::Arithmetic_kernel AT;
+  typedef typename AT::Bigfloat_interval BFI;
+  if(x.is_extended()){
+    BFI a0(convert_to_bfi(x.a0()));
+    BFI a1(convert_to_bfi(x.a1()));
+    BFI root(CGAL::sqrt(convert_to_bfi(x.root())));
+    result_ = a0+a1*root;
+  }else{
+    result_ = convert_to_bfi(x.a0());
+  }
+  CGAL_assertion(lower(result) == lower(result_));
+  CGAL_assertion(upper(result) == upper(result_));
+#endif
+  return result; 
+}
+
+} // namespace CGAL 
+
+#endif 
+
+
+#endif  // CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/io.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/io.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension/io.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension/io.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension_fwd.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sqrt_extension_fwd.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sqrt_extension_fwd.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Square_border_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Square_border_parameterizer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Square_border_parameterizer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Square_border_parameterizer_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h
new file mode 100644
index 0000000..653e210
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h
@@ -0,0 +1,1825 @@
+// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
+//
+#ifndef CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H
+#define CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H 1
+
+#include <boost/bind.hpp>
+#include <boost/utility.hpp>
+#include <boost/version.hpp>
+#if BOOST_VERSION == 106000
+//ice_not is deprecated in boost 1.60 but used within adjacency_matrix.hpp
+#include <boost/type_traits/detail/ice_not.hpp>
+#endif
+#include <boost/graph/adjacency_matrix.hpp>
+#include <CGAL/Unique_hash_map.h>
+
+#include <CGAL/Real_timer.h>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4355) // complaint about using 'this' to
+#endif                          // initialize a member
+
+namespace CGAL {
+
+
+template<class Gt, class Ss, class V>
+Straight_skeleton_builder_2<Gt,Ss,V>::Straight_skeleton_builder_2 ( boost::optional<FT> aMaxTime, Traits const& aTraits, Visitor const& aVisitor )
+  :
+  mTraits(aTraits)
+ ,mVisitor(aVisitor)
+ ,mEventCompare(this)
+ ,mVertexID(0)
+ ,mEdgeID(0)
+ ,mFaceID(0)
+ ,mEventID(0)
+ ,mStepID(0)
+ ,mMaxTime(aMaxTime)
+ ,mPQ(mEventCompare)
+ ,mSSkel( new SSkel() )
+{
+}
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Halfedge_handle 
+Straight_skeleton_builder_2<Gt,Ss,V>::validate( Halfedge_handle aH ) const
+{
+  if ( !handle_assigned(aH) )
+    throw std::runtime_error("Incomplete straight skeleton");
+  return aH ;
+}
+  
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle 
+Straight_skeleton_builder_2<Gt,Ss,V>::validate( Vertex_handle aH ) const
+{
+  if ( !handle_assigned(aH) )
+    throw std::runtime_error("Incomplete straight skeleton");
+  return aH ;
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::InsertEventInPQ( EventPtr aEvent )
+{
+  mPQ.push(aEvent);
+  CGAL_STSKEL_BUILDER_TRACE(4, "Enque: " << *aEvent);
+}
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr 
+Straight_skeleton_builder_2<Gt,Ss,V>::PopEventFromPQ()
+{
+  EventPtr rR = mPQ.top(); mPQ.pop();
+  return rR ;
+}
+
+// Tests whether there is an edge event between the 3 contour edges defining nodes 'aLnode' and 'aRNode'.
+// If such event exits and is not in the past, it's returned. Otherwise the result is null
+//
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr
+Straight_skeleton_builder_2<Gt,Ss,V>::FindEdgeEvent( Vertex_handle aLNode, Vertex_handle aRNode, Triedge const& aPrevEventTriedge  )
+{
+  EventPtr rResult ;
+ 
+  Triedge lTriedge = GetVertexTriedge(aLNode) & GetVertexTriedge(aRNode) ;
+  
+  if ( lTriedge.is_valid()  && lTriedge != aPrevEventTriedge )
+  {
+    Trisegment_2_ptr lTrisegment = CreateTrisegment(lTriedge,aLNode,aRNode);
+    
+    if ( ExistEvent(lTrisegment) )
+    {
+      Comparison_result lLNodeD = CompareEvents(lTrisegment,aLNode) ;
+      Comparison_result lRNodeD = CompareEvents(lTrisegment,aRNode) ;
+      
+      if ( lLNodeD != SMALLER && lRNodeD != SMALLER )
+      {
+        rResult = EventPtr( new EdgeEvent( lTriedge, lTrisegment, aLNode, aRNode ) ) ;
+
+        mVisitor.on_edge_event_created(aLNode, aRNode) ;
+        
+        CGAL_STSKEL_DEBUG_CODE( SetEventTimeAndPoint(*rResult) );
+      }
+      else
+      {
+        CGAL_STSKEL_BUILDER_TRACE(4, "Edge event: " << lTriedge << " is in the past. Compared to L=" << lLNodeD << " to R=" << lRNodeD ) ;
+      }
+    }
+  }
+  return rResult ;
+}
+
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::EventPtr 
+Straight_skeleton_builder_2<Gt,Ss,V>::IsPseudoSplitEvent( EventPtr const& aEvent, Vertex_handle_pair aOpp, Site const& aSite )
+{
+  EventPtr rPseudoSplitEvent ;
+  
+  if ( aSite != INSIDE )
+  {
+    SplitEvent& lEvent = dynamic_cast<SplitEvent&>(*aEvent) ;
+    
+    Triedge           const& lEventTriedge    = lEvent.triedge();
+    Trisegment_2_ptr  const& lEventTrisegment = lEvent.trisegment();
+    Vertex_handle            lSeedN           = lEvent.seed0();
+    
+    Vertex_handle lOppL = aOpp.first ;
+    Vertex_handle lOppR = aOpp.second ;
+    
+    if ( aSite == AT_SOURCE )
+    {
+      Halfedge_handle lOppPrevBorder = GetVertexTriedge(lOppL).e0() ; 
+      
+      if ( lEventTriedge.e0() != lOppPrevBorder && lEventTriedge.e1() != lOppPrevBorder )
+      {
+        rPseudoSplitEvent = EventPtr( new PseudoSplitEvent(lEventTriedge,lEventTrisegment,lOppL,lSeedN,true) ) ;
+  
+        CGAL_STSKEL_BUILDER_TRACE(1,"Pseudo-split-event found against N" << lOppL->id() ) ;
+        
+        mVisitor.on_pseudo_split_event_created(lOppL,lSeedN) ;
+      }
+    }
+    else // aSite == AT_TARGET 
+    {
+      Vertex_handle lOppNextN = GetNextInLAV(lOppR) ;
+      
+      Halfedge_handle lOppNextBorder = GetVertexTriedge(lOppNextN).e0() ; 
+      
+      if ( lEventTriedge.e0() != lOppNextBorder && lEventTriedge.e1() != lOppNextBorder )
+      {
+        rPseudoSplitEvent = EventPtr( new PseudoSplitEvent(lEventTriedge, lEventTrisegment, lSeedN, lOppR,false) ) ;  
+  
+        CGAL_STSKEL_BUILDER_TRACE(1,"Pseudo-split-event found against N" << lOppR->id() ) ;
+        
+        mVisitor.on_pseudo_split_event_created(lSeedN,lOppR) ;
+      }
+    }
+  }
+  
+  if ( rPseudoSplitEvent )
+    rPseudoSplitEvent->SetTimeAndPoint(aEvent->time(),aEvent->point());
+  
+  return rPseudoSplitEvent ;
+}
+
+// Tests whether there is a split event between the contour edges (aReflexLBorder,aReflexRBorder,aOppositeBorder).
+// If such event exits and is not in the past, it's returned. Otherwise the result is null
+// 'aReflexLBorder' and 'aReflexRBorder' are consecutive contour edges which 'aNode' as the vertex.
+// 'aOppositeBorder' is some other edge in the polygon which, if the event exists, is split by the reflex wavefront.
+//
+// NOTE: 'aNode' can be a skeleton node (an interior split event produced by a previous vertex event). In that case,
+// the 'reflex borders' are not consecutive in the input polygon but they are in the corresponding offset polygon that
+// contains aNode as a vertex.
+//
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::CollectSplitEvent( Vertex_handle aNode, Triedge const& aTriedge )
+{
+  if ( IsOppositeEdgeFacingTheSplitSeed(aNode,aTriedge.e2()) )
+  {
+    Trisegment_2_ptr lTrisegment = CreateTrisegment(aTriedge,aNode);
+    
+    if ( lTrisegment->collinearity() != TRISEGMENT_COLLINEARITY_02 && ExistEvent(lTrisegment) )
+    {
+      if ( CompareEvents(lTrisegment,aNode) != SMALLER )
+      {
+        EventPtr lEvent = EventPtr( new SplitEvent (aTriedge,lTrisegment,aNode) ) ;
+        
+        mVisitor.on_split_event_created(aNode) ;
+ 
+        CGAL_STSKEL_DEBUG_CODE( SetEventTimeAndPoint(*lEvent) ) ;
+  
+        AddSplitEvent(aNode,lEvent);      
+      }
+    }
+  }
+}
+
+// Tests the reflex wavefront emerging from 'aNode' against the other contour edges in search for split events.
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::CollectSplitEvents( Vertex_handle aNode, Triedge const& aPrevEventTriedge  )
+{
+  // lLBorder and lRBorder are the consecutive contour edges forming the reflex wavefront.
+  Triedge const& lTriedge = GetVertexTriedge(aNode);
+  
+  Halfedge_handle lLBorder = lTriedge.e0();
+  Halfedge_handle lRBorder = lTriedge.e1();
+  
+  CGAL_STSKEL_BUILDER_TRACE(3
+                      ,"Finding SplitEvent for N" << aNode->id()
+                      << " LBorder: E" << lLBorder->id() << " RBorder: E" << lRBorder->id()
+                      );
+
+  for ( Halfedge_handle_vector_iterator i = mContourHalfedges.begin(); i != mContourHalfedges.end(); ++ i )
+  {
+    Halfedge_handle lOpposite = *i ;
+
+    if ( lOpposite != lLBorder && lOpposite != lRBorder )
+    {
+      Triedge lEventTriedge(lLBorder, lRBorder, lOpposite);
+      
+      if ( lEventTriedge != aPrevEventTriedge )
+      {
+        CollectSplitEvent(aNode, lEventTriedge ) ;
+      }
+    }
+  }
+}
+
+
+// Finds and enques all the new potential events produced by the vertex wavefront emerging from 'aNode' (which can be a reflex wavefront).
+// This new events are simply stored in the priority queue, not processed.
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::CollectNewEvents( Vertex_handle aNode, Triedge const& aPrevEventTriedge )
+{
+  // A Straight Skeleton is the trace of the 'grassfire propagation' that corresponds to the inward move of all the vertices 
+  // of a polygon along their angular bisectors.
+  // Since vertices are the common endpoints of contour edges, the propagation corresponds to contour edges moving inward,
+  // shrinking and expanding as neccesasry to keep the vertices along the angular bisectors.
+  // At each instant in time the current location of vertices (and edges) describe the current 'Offset polygon'
+  // (with at time zero corresponds to the input polygon).
+  // 
+  // An 'edge wavefront' is a moving contour edge.
+  // A 'vertex wavefront' is the wavefront of two consecutive edge wavefronts (sharing a moving vertex).
+  //
+  // An 'Event' is the coallision of 2 wavefronts.
+  // Each event changes the topology of the shrinking polygon; that is, at the event, the current polygon differs from the
+  // inmediately previous polygon in the number of vertices.
+  //
+  // If 2 vertex wavefronts sharing a common edge collide, the event is called an edge event. At the time of the event, the current
+  // polygon doex not have the common edge anynmore, and the two vertices become one. This new 'skeleton' vertex generates a new
+  // vertex wavefront which can further collide with other wavefronts, producing for instance, more edge events.
+  //
+  // If a refex vertex wavefront collide with an edge wavefront, the event is called a split event. At the time of the event, the current
+  // polygon is split in two unconnected polygons, each one containing a portion of the edge hit and split by the reflex wavefront.
+  //
+  // If 2 reflex wavefronts collide each other, the event is called a vertex event. At the time of the event, the current polygon
+  // is split in two unconnected polygons. Each one contains a different combination of the colliding reflex edges. That is, if the
+  // wavefront (edgea,edgeb) collides with (edgec,edged), the two resulting polygons will contain (edgea,edgec) and (edgeb,edged).
+  // Furthermore, one of the new vertices can be a reflex vertex generating a reflex wavefront which can further produce more split or
+  // vertex events (or edge events of course)
+  // 
+  // Each vertex wavefront (reflex or not) results in one and only one event from a set of possible events.
+  // It can result in a edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not
+  // in the input polygon); or it can result in a split event (or vertex event) against any other wavefront in the rest of 
+  // current polygon.
+
+  
+  // Adjacent vertices in the current polygon containing aNode (called LAV)
+  Vertex_handle lPrev = GetPrevInLAV(aNode) ;
+  Vertex_handle lNext = GetNextInLAV(aNode) ;
+
+  CGAL_STSKEL_BUILDER_TRACE
+    ( 2
+    , "Collecting new events generated by N" << aNode->id() << " at " << aNode->point() << " (Prev: N" << lPrev->id() << " Next: N"
+       << lNext->id() << ")"
+    ) ;
+
+  if ( IsReflex(aNode) )
+    CollectSplitEvents(aNode, aPrevEventTriedge) ;
+    
+  EventPtr lLEdgeEvent = FindEdgeEvent( lPrev , aNode, aPrevEventTriedge ) ;
+  EventPtr lREdgeEvent = FindEdgeEvent( aNode , lNext, aPrevEventTriedge ) ;
+
+  bool lAcceptL = !!lLEdgeEvent ;
+  bool lAcceptR = !!lREdgeEvent ;
+    
+  if ( lAcceptL )
+    InsertEventInPQ(lLEdgeEvent);
+    
+  if ( lAcceptR )
+    InsertEventInPQ(lREdgeEvent);
+}
+
+// Handles the special case of two simultaneous edge events, that is, two edges
+// collapsing along the line/point were they meet at the same time.
+// This ocurrs when the bisector emerging from vertex 'aA' is defined by the same pair of 
+// contour edges as the bisector emerging from vertex 'aB' (but in opposite order).
+//
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSimultaneousEdgeEvent( Vertex_handle aA, Vertex_handle aB )
+{
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "Handling simultaneous EdgeEvent between N" << aA ->id() << " and N"  << aB ->id() ) ;
+
+  mVisitor.on_anihiliation_event_processed(aA,aB) ;
+
+  Halfedge_handle lOA = aA->primary_bisector() ;
+  Halfedge_handle lOB = aB->primary_bisector() ;
+  Halfedge_handle lIA = lOA->opposite();
+  Halfedge_handle lIB = lOB->opposite();
+
+  Vertex_handle lOAV = lOA->vertex() ;
+  Vertex_handle lIAV = lIA->vertex() ;
+  Vertex_handle lOBV = lOB->vertex() ;
+  // Vertex_handle lIBV = lIB->vertex() ;
+  
+  CGAL_STSKEL_BUILDER_TRACE ( 2
+                            ,    "OA: B" << lOA->id() << '\n'
+                              << "IA: B" << lIA->id() << '\n'
+                              << "OB: B" << lOB->id() << '\n'
+                              << "IB: B" << lIB->id()
+                            ) ;
+
+  SetIsProcessed(aA) ;
+  SetIsProcessed(aB) ;
+  mGLAV.remove(aA);
+  mGLAV.remove(aB);
+
+  CGAL_STSKEL_BUILDER_TRACE ( 3, 'N' << aA->id() << " processed\nN" << aB->id() << " processed" ) ;
+
+  Halfedge_handle lOA_Prev = lOA->prev() ;
+  Halfedge_handle lIA_Next = lIA->next() ;
+
+  Halfedge_handle lOB_Prev = lOB->prev() ;
+  Halfedge_handle lIB_Next = lIB->next() ;
+  (void) lOB_Prev; // may be unused
+  (void) lIB_Next; // may be unused
+
+  CGAL_STSKEL_BUILDER_TRACE ( 2
+                            ,   "OA_Prev: B" << lOA_Prev->id() << '\n'
+                              << "IA_Next: B" << lIA_Next->id() << '\n'
+                              << "OB_Prev: B" << lOB_Prev->id() << '\n'
+                              << "IB_Next: B" << lIB_Next->id()
+                           ) ;
+
+  CrossLinkFwd(lOB, lIA_Next );
+  CrossLinkFwd(lOA_Prev, lIB );
+
+  Link(lOB,aA);
+
+  CGAL_STSKEL_BUILDER_TRACE ( 1, "B" << lOA->id() << " and B" << lIA->id() << " erased." ) ;
+  mDanglingBisectors.push_back(lOA);
+  
+  //
+  // The code above corrects the links for vertices aA/aB to the erased halfedges lOA and lIA.
+  // However, any of these vertices (aA/aB) maybe one of the twin vertices of a split event.
+  // If that's the case, the erased halfedge maybe be linked to a 'couple' of those vertices.
+  // This situation is corrected below:
+
+  
+  if ( !lOAV->has_infinite_time() && lOAV != aA && lOAV != aB )
+  {
+    Link(lOAV,lIB);
+    
+    CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lOAV->id() << " has B" << lOA->id() 
+                              << " as it's halfedge. Replacing it with B" << lIB->id() 
+                              ) ;
+  }
+  if ( !lIAV->has_infinite_time() && lIAV != aA && lIAV != aB )
+  {
+    Link(lIAV,lOB);
+    
+    CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lIAV->id() << " has B" << lIA->id() 
+                              << " as it's halfedge. Replacing it with B" << lOB->id() 
+                              ) ;
+  }
+  
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "N" << aA->id() << " halfedge: B" << aA->halfedge()->id() ) ;
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "N" << aB->id() << " halfedge: B" << aB->halfedge()->id() ) ;
+
+  SetBisectorSlope(aA,aB);
+
+  CGAL_assertion( aA->primary_bisector() == lIB ) ;
+  
+  CGAL_STSKEL_BUILDER_TRACE ( 1, "Wavefront: E" << lIB->defining_contour_edge()->id() << " and E" << lIB->opposite()->defining_contour_edge()->id() << " anhiliated each other." ) ;
+  
+  if ( lOAV->has_infinite_time() )
+  {
+    CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lOAV->id() << " erased." ) ;
+    EraseNode(lOAV);
+  }
+  
+  if ( lOBV->has_infinite_time() )
+  {
+    CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lOBV->id() << " erased." ) ;
+    EraseNode(lOBV);
+  }
+}
+
+// Returns true if the skeleton edges 'aA' and 'aB' are defined by the same pair of contour edges (but possibly in reverse order)
+//
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::AreBisectorsCoincident ( Halfedge_const_handle aA, Halfedge_const_handle aB  ) const
+{
+  CGAL_STSKEL_BUILDER_TRACE ( 3, "Testing for simultaneous EdgeEvents between B" << aA->id() << " and B" << aB->id() ) ;
+
+  Halfedge_const_handle lA_LBorder = aA->defining_contour_edge();
+  Halfedge_const_handle lA_RBorder = aA->opposite()->defining_contour_edge();
+  Halfedge_const_handle lB_LBorder = aB->defining_contour_edge();
+  Halfedge_const_handle lB_RBorder = aB->opposite()->defining_contour_edge();
+
+  return    ( lA_LBorder == lB_LBorder && lA_RBorder == lB_RBorder )
+         || ( lA_LBorder == lB_RBorder && lA_RBorder == lB_LBorder ) ;
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::UpdatePQ( Vertex_handle aNode, Triedge const& aPrevEventTriedge )
+{
+  Vertex_handle lPrev = GetPrevInLAV(aNode) ;
+  Vertex_handle lNext = GetNextInLAV(aNode) ;
+
+  CGAL_STSKEL_BUILDER_TRACE ( 3, "Updating PQ for N" << aNode->id() << " Prev N" << lPrev->id() << " Next N" << lNext->id() ) ;
+
+  Halfedge_handle lOBisector_P = lPrev->primary_bisector() ;
+  Halfedge_handle lOBisector_C = aNode->primary_bisector() ;
+  Halfedge_handle lOBisector_N = lNext->primary_bisector() ;
+
+  if ( AreBisectorsCoincident(lOBisector_C,lOBisector_P) )
+    HandleSimultaneousEdgeEvent( aNode, lPrev ) ;
+  else
+  if ( AreBisectorsCoincident(lOBisector_C,lOBisector_N) )
+    HandleSimultaneousEdgeEvent( aNode, lNext ) ;
+  else
+     CollectNewEvents(aNode,aPrevEventTriedge);
+}
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::CreateInitialEvents()
+{
+  Triedge const cNull_triedge ;
+  
+  CGAL_STSKEL_BUILDER_TRACE(0, "Creating initial events...");
+  for ( Vertex_iterator v = mSSkel->vertices_begin(); v != mSSkel->vertices_end(); ++ v )
+  {
+    if ( ! v->has_infinite_time() )
+    {
+      UpdatePQ(v,cNull_triedge);
+      mVisitor.on_initial_events_collected(v,IsReflex(v),IsDegenerate(v)) ;
+    }
+  }
+}
+
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::CreateContourBisectors()
+{
+  CGAL_STSKEL_BUILDER_TRACE(0, "Creating contour bisectors...");
+  for ( Vertex_iterator v = mSSkel->vertices_begin(); v != mSSkel->vertices_end(); ++ v )
+  {
+    mGLAV.push_back(static_cast<Vertex_handle>(v));
+    Vertex_handle lPrev = GetPrevInLAV(v) ;
+    Vertex_handle lNext = GetNextInLAV(v) ;
+
+    Orientation lOrientation = CGAL::orientation(lPrev->point(),v->point(),lNext->point()); 
+    if ( lOrientation == COLLINEAR )
+    {
+      SetIsDegenerate(v);
+      CGAL_STSKEL_BUILDER_TRACE(1, "COLLINEAR vertex: N" << v->id() );
+    }
+    else if ( lOrientation == RIGHT_TURN )
+    {
+      mReflexVertices.push_back(v);
+      SetIsReflex(v);
+      CGAL_STSKEL_BUILDER_TRACE(1,"Reflex vertex: N" << v->id() );
+    }
+
+    Halfedge lOB(mEdgeID++), lIB(mEdgeID++);
+    Halfedge_handle lOBisector = mSSkel->SSkel::Base::edges_push_back (lOB, lIB);
+    Halfedge_handle lIBisector = lOBisector->opposite();
+    lOBisector->HBase_base::set_face(v->halfedge()->face());
+    lIBisector->HBase_base::set_face(v->halfedge()->next()->face());
+    lIBisector->HBase_base::set_vertex(v);
+
+    Halfedge_handle lIBorder = v->halfedge() ;
+    Halfedge_handle lOBorder = v->halfedge()->next() ;
+    lIBorder  ->HBase_base::set_next(lOBisector);
+    lOBisector->HBase_base::set_prev(lIBorder);
+    lOBorder  ->HBase_base::set_prev(lIBisector);
+    lIBisector->HBase_base::set_next(lOBorder);
+    CGAL_STSKEL_BUILDER_TRACE(3
+                             ,"Adding Contour Bisector at N:" << v->id() << "\n B" << lOBisector->id()
+                             << " (Out)\n B" << lIBisector->id() << " (In)"
+                             ) ;
+  }
+  
+  for( Face_iterator fit = mSSkel->SSkel::Base::faces_begin(); fit != mSSkel->SSkel::Base::faces_end(); ++fit)
+  {
+    Halfedge_handle lBorder    = fit->halfedge();
+    Halfedge_handle lLBisector = lBorder->prev();
+    Halfedge_handle lRBisector = lBorder->next();
+    
+    Vertex_handle lInfNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ;
+    InitVertexData(lInfNode);
+    CGAL_assertion(lInfNode->has_null_point());
+
+    lRBisector->HBase_base::set_next( lLBisector  );
+    lLBisector->HBase_base::set_prev( lRBisector );
+        
+    lRBisector->HBase_base::set_vertex(lInfNode);
+        
+    lInfNode->VBase::set_halfedge(lRBisector);
+        
+    SetBisectorSlope(lRBisector,POSITIVE);
+    SetBisectorSlope(lLBisector,NEGATIVE);
+    
+    CGAL_STSKEL_BUILDER_TRACE(3
+                             ,"Closing face of E" << lBorder->id()
+                             << " with a ficticious vertex. B" << lRBisector->id()
+                             << "->N" << lInfNode->id()
+                             << "->B" << lLBisector->id()
+                             ) ;
+  }
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::InitPhase()
+{
+  mVisitor.on_initialization_started(mSSkel->size_of_vertices());
+  CreateContourBisectors();
+  CreateInitialEvents();
+  mVisitor.on_initialization_finished();
+}
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle
+Straight_skeleton_builder_2<Gt,Ss,V>::ConstructEdgeEventNode( EdgeEvent& aEvent )
+{
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating EdgeEvent Node" ) ;
+
+  Vertex_handle lLSeed = aEvent.seed0() ;
+  Vertex_handle lRSeed = aEvent.seed1() ;
+  
+  Vertex_handle lNewNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), false, false) ) ;
+  InitVertexData(lNewNode);
+
+  mGLAV.push_back(lNewNode);
+ 
+  SetTrisegment(lNewNode,aEvent.trisegment());
+ 
+  CGAL_STSKEL_BUILDER_TRACE
+  ( 3
+  ,    "LSeed: N" << lLSeed->id() << " processed\n"
+    << "RSeed: N" << lRSeed->id() << " processed"
+  ) ;
+
+  SetIsProcessed(lLSeed) ;
+  SetIsProcessed(lRSeed) ;
+  mGLAV.remove(lLSeed);
+  mGLAV.remove(lRSeed);
+
+  Vertex_handle lLPrev = GetPrevInLAV(lLSeed) ;
+  Vertex_handle lRNext = GetNextInLAV(lRSeed) ;
+
+  SetPrevInLAV(lNewNode, lLPrev ) ;
+  SetNextInLAV(lLPrev  , lNewNode  ) ;
+
+  SetNextInLAV(lNewNode, lRNext ) ;
+  SetPrevInLAV(lRNext  , lNewNode  ) ;
+
+  CGAL_STSKEL_BUILDER_TRACE( 2, "New Node: N" << lNewNode->id() << " at " << lNewNode->point() << '\n'
+                              << 'N' << lLSeed->id() << " removed from LAV\n"
+                              << 'N' << lRSeed->id() << " removed from LAV\n"
+                           );
+  
+  return lNewNode ;
+}
+
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
+Straight_skeleton_builder_2<Gt,Ss,V>::LookupOnSLAV ( Halfedge_handle aBorder, EventPtr const& aEvent, Site& rSite )
+{
+  Vertex_handle_pair rResult ;
+
+  CGAL_STSKEL_DEBUG_CODE( bool lFound = false ; )
+  
+  // Vertex_handle lSeed = aEvent->seed0();
+  
+  CGAL_STSKEL_BUILDER_TRACE ( 3, "Looking up for E" << aBorder->id() << ". P=" << aEvent->point() ) ;
+   
+  for ( typename std::list<Vertex_handle>::const_iterator vi = mGLAV.begin(); vi != mGLAV.end(); ++ vi )
+  {
+    Vertex_handle v = *vi;
+    
+    Triedge const& lTriedge = GetVertexTriedge(v);
+      
+    Vertex_handle lPrevN = GetPrevInLAV(v);
+    Vertex_handle lNextN = GetNextInLAV(v);
+    
+    if ( lTriedge.e0() == aBorder )
+    {
+      Halfedge_handle lPrevBorder = GetEdgeEndingAt(lPrevN) ; 
+      Halfedge_handle lNextBorder = GetEdgeEndingAt(lNextN) ; 
+      
+      CGAL_STSKEL_DEBUG_CODE( lFound = true ; )
+
+      CGAL_STSKEL_BUILDER_TRACE ( 3
+                                , "Subedge found in SLAV: N" << lPrevN->id() << "->N" << v->id()
+                                  << " (E" << lPrevBorder->id() << "->E" << aBorder->id() << "->E" << lNextBorder->id() << ")"
+                                ) ;
+      
+      Oriented_side lLSide = EventPointOrientedSide(*aEvent, lPrevBorder, aBorder    , lPrevN, false ) ;
+      Oriented_side lRSide = EventPointOrientedSide(*aEvent, aBorder    , lNextBorder, v     , true  ) ;
+                                                   
+      if ( lLSide != ON_POSITIVE_SIDE && lRSide != ON_NEGATIVE_SIDE )
+      {
+        if ( lLSide != ON_ORIENTED_BOUNDARY || lRSide != ON_ORIENTED_BOUNDARY ) 
+        {
+          rSite = ( lLSide == ON_ORIENTED_BOUNDARY ? AT_SOURCE : ( lRSide == ON_ORIENTED_BOUNDARY ?  AT_TARGET : INSIDE ) ) ;
+            
+          rResult = std::make_pair(lPrevN,v) ;
+          
+          CGAL_STSKEL_BUILDER_TRACE ( 3, "Split point found at the " 
+                                    << ( rSite == AT_SOURCE ? "SOURCE vertex" : ( rSite == AT_TARGET ? "TARGET vertex" : "strict inside" ) )
+                                    << " of the offset edge."
+                                    ) ;
+          break ;
+        }
+        else
+        {
+          CGAL_STSKEL_BUILDER_TRACE ( 3, "Opposite edge collapsed to a point" ) ;
+        }
+      } 
+    }
+  }
+  
+#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE
+  if ( !handle_assigned(rResult.first) )
+  {
+    if ( !lFound )
+    {
+      CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Opposite edge vanished.");
+    }
+    else
+    { 
+      CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Point not inside the opposite edge offset zone.");
+    }
+  } 
+#endif
+
+  return rResult ;
+}
+
+
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
+Straight_skeleton_builder_2<Gt,Ss,V>::ConstructSplitEventNodes( SplitEvent& aEvent, Vertex_handle aOppR )
+{
+  Vertex_handle_pair rResult;
+
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating SplitEvent Nodes" ) ;
+
+  Vertex_handle lOppL = GetPrevInLAV(aOppR) ;
+
+  Vertex_handle lNewNodeA = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
+  Vertex_handle lNewNodeB = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
+  
+  InitVertexData(lNewNodeA);
+  InitVertexData(lNewNodeB);
+  SetTrisegment(lNewNodeA,aEvent.trisegment());
+  SetTrisegment(lNewNodeB,aEvent.trisegment());
+
+  mGLAV.push_back(lNewNodeA);
+  mGLAV.push_back(lNewNodeB);
+  
+  Vertex_handle lSeed = aEvent.seed0() ;
+ 
+  CGAL_STSKEL_BUILDER_TRACE ( 3, "Seed: N" << lSeed->id() << " processed" ) ;
+  
+  SetIsProcessed(lSeed) ;
+  mGLAV.remove(lSeed);
+
+  CGAL_STSKEL_BUILDER_TRACE ( 2, 'N' << lNewNodeA->id() << " and N" << lNewNodeB->id() << " inserted into LAV." ) ;
+
+  Vertex_handle lPrev = GetPrevInLAV(lSeed) ;
+  Vertex_handle lNext = GetNextInLAV(lSeed) ;
+
+  SetNextInLAV(lPrev    , lNewNodeA ) ;
+  SetPrevInLAV(lNewNodeA, lPrev     ) ;
+
+  SetNextInLAV(lNewNodeA, aOppR     ) ;
+  SetPrevInLAV(aOppR    , lNewNodeA ) ;
+
+  SetNextInLAV(lOppL    , lNewNodeB ) ;
+  SetPrevInLAV(lNewNodeB, lOppL     ) ;
+
+  SetNextInLAV(lNewNodeB, lNext     ) ;
+  SetPrevInLAV(lNext    , lNewNodeB ) ;
+
+  CGAL_STSKEL_BUILDER_TRACE( 2, 'N' << lSeed->id() << " removed from LAV" );
+
+  rResult = std::make_pair(lNewNodeA,lNewNodeB);
+
+  mSplitNodes.push_back(rResult);
+
+  return rResult ;
+}
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::Vertex_handle_pair
+Straight_skeleton_builder_2<Gt,Ss,V>::ConstructPseudoSplitEventNodes( PseudoSplitEvent& aEvent )
+{
+  Vertex_handle_pair rResult;
+
+  CGAL_STSKEL_BUILDER_TRACE ( 2, "Creating PseudoSplitEvent Nodes" ) ;
+
+  Vertex_handle lLSeed = aEvent.seed0() ;
+  Vertex_handle lRSeed = aEvent.seed1() ;
+
+  Vertex_handle lNewNodeA = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
+  Vertex_handle lNewNodeB = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++, aEvent.point(), aEvent.time(), true, false ) ) ;
+
+  mGLAV.push_back(lNewNodeA);
+  mGLAV.push_back(lNewNodeB);
+  
+  InitVertexData(lNewNodeA);
+  InitVertexData(lNewNodeB);
+  SetTrisegment(lNewNodeA,aEvent.trisegment());
+  SetTrisegment(lNewNodeB,aEvent.trisegment());
+  
+  CGAL_STSKEL_BUILDER_TRACE
+  (
+   3
+   ,   "LSeed: N" << lLSeed->id() << " processed\n"
+    << "RSeed: N" << lRSeed->id() << " processed"
+  ) ;
+
+  
+  SetIsProcessed(lLSeed) ;
+  SetIsProcessed(lRSeed) ;
+  mGLAV.remove(lLSeed);
+  mGLAV.remove(lRSeed);
+
+  Vertex_handle lLPrev = GetPrevInLAV(lLSeed) ;
+  Vertex_handle lLNext = GetNextInLAV(lLSeed) ;
+  Vertex_handle lRPrev = GetPrevInLAV(lRSeed) ;
+  Vertex_handle lRNext = GetNextInLAV(lRSeed) ;
+
+  SetPrevInLAV(lNewNodeA, lLPrev    ) ;
+  SetNextInLAV(lLPrev   , lNewNodeA ) ;
+
+  SetNextInLAV(lNewNodeA, lRNext    ) ;
+  SetPrevInLAV(lRNext   , lNewNodeA ) ;
+
+  SetPrevInLAV(lNewNodeB, lRPrev    ) ;
+  SetNextInLAV(lRPrev   , lNewNodeB ) ;
+
+  SetNextInLAV(lNewNodeB, lLNext    ) ;
+  SetPrevInLAV(lLNext   , lNewNodeB ) ;
+
+  CGAL_STSKEL_BUILDER_TRACE(2,   "NewNodeA: N" << lNewNodeA->id() << " at " << lNewNodeA->point() << '\n'
+                              << "NewNodeB: N" << lNewNodeB->id() << " at " << lNewNodeB->point() << '\n'
+                              << 'N' << lLSeed->id() << " removed from LAV\n"
+                              << 'N' << lRSeed->id() << " removed from LAV"
+                           );
+
+  
+  rResult = std::make_pair(lNewNodeA,lNewNodeB);
+
+  mSplitNodes.push_back(rResult);
+
+  return rResult ;
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::IsProcessed( EventPtr aEvent )
+{
+  return IsProcessed(aEvent->seed0()) || IsProcessed(aEvent->seed1()) ;
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidEdgeEvent( EdgeEvent const& aEvent )
+{
+  bool rResult = false ;
+  
+  Vertex_handle lLSeed = aEvent.seed0() ;
+  Vertex_handle lRSeed = aEvent.seed1() ;
+  
+  Vertex_handle lPrevLSeed = GetPrevInLAV(lLSeed) ;
+  Vertex_handle lNextRSeed = GetNextInLAV(lRSeed) ;
+  
+  if ( lPrevLSeed != lNextRSeed )
+  {
+    Halfedge_handle lPrevE0 = GetEdgeEndingAt(lPrevLSeed) ;
+    Halfedge_handle lE0     = aEvent.triedge().e0() ;
+    Halfedge_handle lE2     = aEvent.triedge().e2() ;
+    Halfedge_handle lNextE2 = GetEdgeStartingAt(lNextRSeed) ;
+    
+    CGAL_STSKEL_BUILDER_TRACE(3, "PrevLSeed=N" << lPrevLSeed->id() << " PrevE0=E" << lPrevE0->id() ) ;
+    CGAL_STSKEL_BUILDER_TRACE(3, "NextRSeed=N" << lNextRSeed->id() << " NextE2=E" << lNextE2->id() ) ;
+    
+    Oriented_side lLSide = EventPointOrientedSide(aEvent, lPrevE0, lE0    , lPrevLSeed, false ) ;
+    Oriented_side lRSide = EventPointOrientedSide(aEvent, lE2    , lNextE2, lNextRSeed, true  ) ;
+    
+    bool lLSideOK = ( lLSide != ON_POSITIVE_SIDE ) ;
+    bool lRSideOK = ( lRSide != ON_NEGATIVE_SIDE ) ;
+    
+    CGAL_STSKEL_BUILDER_TRACE_IF( !lLSideOK
+                                ,3
+                                ,"Invalid edge event: " << aEvent.triedge() << " NewNode is before E" << lE0->id()
+                                << " source N" << lPrevLSeed->id()
+                                ) ;
+                                
+    CGAL_STSKEL_BUILDER_TRACE_IF( !lRSideOK
+                                ,3
+                                ,"Invalid edge event: " << aEvent.triedge() << " NewNode is past E" << lE2->id()
+                                 << " target N" << lNextRSeed->id() 
+                                ) ;
+                                
+    rResult = lLSideOK && lRSideOK ;                                 
+  }
+  else
+  {
+    // Triangle collapse. No need to test explicitely.
+    rResult = true ;
+  }
+  return rResult ; 
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::HandleEdgeEvent( EventPtr aEvent )
+{
+  EdgeEvent& lEvent = dynamic_cast<EdgeEvent&>(*aEvent) ;
+
+  if ( IsValidEdgeEvent(lEvent) )
+  {
+    Vertex_handle lLSeed = lEvent.seed0() ;
+    Vertex_handle lRSeed = lEvent.seed1() ;
+
+    Vertex_handle lNewNode = ConstructEdgeEventNode(lEvent);
+  
+    Halfedge_handle lLOBisector = lLSeed->primary_bisector() ;
+    Halfedge_handle lROBisector = lRSeed->primary_bisector() ;
+    Halfedge_handle lLIBisector = lLOBisector->opposite();
+    Halfedge_handle lRIBisector = lROBisector->opposite();
+  
+    Vertex_handle lRIFicNode = lROBisector->vertex() ;
+    Vertex_handle lLOFicNode = lLOBisector->vertex() ;
+    
+    CrossLink(lLOBisector,lNewNode);
+    
+    Link(lROBisector,lNewNode);
+
+    CrossLinkFwd(lROBisector,lLIBisector) ;
+
+    Halfedge_handle lDefiningBorderA = lNewNode->halfedge()->defining_contour_edge();
+    Halfedge_handle lDefiningBorderB = lNewNode->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
+    Halfedge_handle lDefiningBorderC = lNewNode->halfedge()->opposite()->prev()->defining_contour_edge();
+  
+    lNewNode->VBase::set_event_triedge( lEvent.triedge() ) ;
+    
+    Triedge lTri(lDefiningBorderA,lDefiningBorderB,lDefiningBorderC);
+    
+    SetVertexTriedge( lNewNode, lTri ) ;
+    
+    SetBisectorSlope(lLSeed,lNewNode);
+    SetBisectorSlope(lRSeed,lNewNode);
+  
+    CGAL_STSKEL_BUILDER_TRACE( 1, "E" << lRSeed->halfedge()->defining_contour_edge()->id() << " collapsed." );
+    CGAL_STSKEL_BUILDER_TRACE( 3, "Ficticious node along collapsed face is N" << lRIFicNode->id() << " between B" << lROBisector->id() << " and B" << lLIBisector->id() ) ;
+    
+    if ( lLOFicNode->has_infinite_time() )
+    {
+      CGAL_STSKEL_BUILDER_TRACE(3,"Creating new Edge Event's Bisector");
+  
+      Halfedge_handle lNOBisector = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID),Halfedge(mEdgeID+1) );
+  
+      Halfedge_handle lNIBisector = lNOBisector->opposite();
+      mEdgeID += 2 ;
+  
+      CrossLinkFwd(lNOBisector        , lLOBisector->next());
+      CrossLinkFwd(lRIBisector->prev(), lNIBisector        );
+
+      CrossLink(lNOBisector,lLOFicNode);
+      
+      SetBisectorSlope(lNOBisector,POSITIVE);
+      SetBisectorSlope(lNIBisector,NEGATIVE);
+            
+      CrossLinkFwd(lNIBisector, lRIBisector);
+      CrossLinkFwd(lLOBisector, lNOBisector);
+  
+      Link(lNOBisector,lLOBisector->face());
+      Link(lNIBisector,lRIBisector->face());
+      
+      Link(lNIBisector,lNewNode);
+  
+      CGAL_STSKEL_BUILDER_TRACE( 2, newn2str("",lNewNode,lTri) ) ;
+      CGAL_STSKEL_BUILDER_TRACE( 2, newb2str("O",lNOBisector) ) ;
+      CGAL_STSKEL_BUILDER_TRACE( 2, newb2str("I",lNIBisector) ) ;
+  
+      CGAL_STSKEL_BUILDER_TRACE ( 2, "Ficticius N" << lRIFicNode->id() << " erased." ) ;
+      EraseNode(lRIFicNode);
+      
+      SetupNewNode(lNewNode) ;
+      
+      UpdatePQ(lNewNode, lEvent.triedge());
+     
+      mVisitor.on_edge_event_processed(lLSeed,lRSeed,lNewNode) ;
+    }
+    else
+    {
+      CGAL_STSKEL_BUILDER_TRACE( 2, newn2str("",lNewNode,lTri) 
+                                    << ".\nThis is a multiple node (A node with these defining edges already exist in the LAV)"
+                               );
+    }
+    
+    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefront: " << wavefront2str(lNewNode) );
+  }
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidSplitEvent( SplitEvent const& /*aEvent*/ )
+{
+  return true ;
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSplitEvent( EventPtr aEvent, Vertex_handle_pair aOpp  )
+{
+  SplitEvent& lEvent = dynamic_cast<SplitEvent&>(*aEvent) ;
+
+  if ( IsValidSplitEvent(lEvent) )
+  {
+    Vertex_handle lSeed = lEvent.seed0();
+   
+    Vertex_handle lOppL = aOpp.first ;
+    Vertex_handle lOppR = aOpp.second ;
+    
+    Halfedge_handle lOppIBisector_L = lOppL->primary_bisector()->opposite();
+    Halfedge_handle lOppOBisector_R = lOppR->primary_bisector();
+    
+    Vertex_handle lOppFicNode = lOppOBisector_R->vertex() ;
+    (void)lOppFicNode; // variable may be unused
+    
+    CGAL_assertion(lOppOBisector_R->next() == lOppIBisector_L ) ;
+    CGAL_assertion(lOppIBisector_L->prev() == lOppOBisector_R ) ;
+    CGAL_assertion(lOppFicNode->has_infinite_time());
+    
+    
+    CGAL_STSKEL_BUILDER_TRACE(2,"Splitted face: N" << lOppR->id()
+                                << "->B" << lOppOBisector_R->id()
+                                << "->N" << lOppFicNode->id()
+                                << "->B" << lOppIBisector_L->id()
+                                << "->N" << lOppL->id()
+                             ) ;   
+                             
+    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for right half of opposite edge: N" << lOppFicNode->id() ) ;
+      
+    Halfedge_handle lOppBorder = lEvent.triedge().e2() ;
+  
+    Vertex_handle lNewNode_L, lNewNode_R ;
+    boost::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR);
+  
+    // Triedge lTriedge = aEvent->triedge();
+        
+    // Halfedge_handle lReflexLBorder = lTriedge.e0();
+    // Halfedge_handle lReflexRBorder = lTriedge.e1();
+  
+    Halfedge_handle lNOBisector_L = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID  ),Halfedge(mEdgeID+1) );
+    Halfedge_handle lNOBisector_R = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) );
+    Halfedge_handle lNIBisector_L = lNOBisector_L->opposite();
+    Halfedge_handle lNIBisector_R = lNOBisector_R->opposite();
+  
+    mEdgeID += 4 ;
+    
+    Halfedge_handle lXOBisector = lSeed->primary_bisector() ;
+    Halfedge_handle lXIBisector = lXOBisector->opposite();
+    
+    Halfedge_handle lXONextBisector = lXOBisector->next();
+    Halfedge_handle lXIPrevBisector = lXIBisector->prev();
+  
+    Vertex_handle lXOFicNode = lXOBisector->vertex() ;
+    CGAL_assertion(lXOFicNode->has_infinite_time());
+    
+    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for left reflex face: N" << lXOFicNode->id() ) ;
+    CGAL_STSKEL_BUILDER_TRACE(2,"Ficticious node for right reflex face: N" << lXIPrevBisector->vertex()->id() ) ;
+    
+    Link(lNewNode_L,lXOBisector);
+    Link(lNewNode_R,lNIBisector_L) ;
+    
+    Link(lXOBisector,lNewNode_L);
+    
+    Link(lNOBisector_L,lXOBisector->face());
+    Link(lNIBisector_L,lOppBorder ->face());
+    Link(lNOBisector_R,lOppBorder ->face());
+    Link(lNIBisector_R,lXIBisector->face());
+  
+    Link(lNIBisector_L,lNewNode_R);
+    Link(lNIBisector_R,lNewNode_R);
+  
+    Link(lNOBisector_L,lXOFicNode);
+    
+    
+    CrossLinkFwd(lXOBisector    ,lNOBisector_L);
+    CrossLinkFwd(lNOBisector_L  ,lXONextBisector);
+    CrossLinkFwd(lXIPrevBisector,lNIBisector_R);
+    CrossLinkFwd(lNIBisector_R  ,lXIBisector);
+    CrossLinkFwd(lOppOBisector_R,lNIBisector_L);
+    CrossLinkFwd(lNIBisector_L  ,lNOBisector_R);
+    CrossLinkFwd(lNOBisector_R  ,lOppIBisector_L);
+    
+    SetBisectorSlope(lSeed,lNewNode_L);
+  
+    Vertex_handle lNewFicNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ;
+    InitVertexData(lNewFicNode);
+    CGAL_assertion(lNewFicNode->has_null_point());
+    CrossLink(lNOBisector_R,lNewFicNode);
+    
+    SetBisectorSlope(lNOBisector_L,POSITIVE);
+    SetBisectorSlope(lNIBisector_L,NEGATIVE);
+    SetBisectorSlope(lNOBisector_R,POSITIVE);
+    SetBisectorSlope(lNIBisector_R,NEGATIVE);
+    
+    CGAL_STSKEL_BUILDER_TRACE(2,"(New) ficticious node for left half of opposite edge: N" << lNewFicNode->id() ) ;
+    
+    Halfedge_handle lNewNode_L_DefiningBorderA = lNewNode_L->halfedge()->defining_contour_edge();
+    Halfedge_handle lNewNode_L_DefiningBorderB = lNewNode_L->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
+    Halfedge_handle lNewNode_L_DefiningBorderC = lNewNode_L->halfedge()->opposite()->prev()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderA = lNewNode_R->halfedge()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->opposite()->prev()->opposite()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge();
+  
+    lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ;
+    lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ;
+    
+    Triedge lTriL( lNewNode_L_DefiningBorderA,lNewNode_L_DefiningBorderB,lNewNode_L_DefiningBorderC ) ;
+    Triedge lTriR( lNewNode_R_DefiningBorderA,lNewNode_R_DefiningBorderB,lNewNode_R_DefiningBorderC ) ;
+    
+    SetVertexTriedge( lNewNode_L, lTriL ) ;
+    SetVertexTriedge( lNewNode_R, lTriR ) ;
+    
+    CGAL_STSKEL_BUILDER_TRACE(2,   newn2str("L",lNewNode_L,lTriL) << std::endl
+                                << newn2str("R",lNewNode_R,lTriR) << std::endl
+                                << newb2str("OL",lNOBisector_L)   << std::endl
+                                << newb2str("IL",lNIBisector_L)   << std::endl
+                                << newb2str("OR",lNOBisector_R)   << std::endl
+                                << newb2str("IR",lNIBisector_R)
+                             ) ;
+      
+    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefronts:\n  " << wavefront2str(lNewNode_L) << "\n  " << wavefront2str(lNewNode_R) );
+    
+    SetupNewNode(lNewNode_L) ;
+    SetupNewNode(lNewNode_R) ;
+    
+    UpdatePQ(lNewNode_L, lEvent.triedge());
+    UpdatePQ(lNewNode_R, lEvent.triedge());
+  
+    mVisitor.on_split_event_processed(lSeed,lNewNode_L,lNewNode_R) ;
+  }
+
+      
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::SetupNewNode( Vertex_handle aNode )
+{
+  // In an edge-edge anihiliation the current polygon becomes a two-node degenerate chain collapsed into a single point
+  if ( GetPrevInLAV(aNode) != GetNextInLAV(aNode) )
+  {
+    Halfedge_handle lLE = GetEdgeEndingAt  (aNode);
+    Halfedge_handle lRE = GetEdgeStartingAt(aNode);
+    
+    Vector_2 lLV = CreateVector(lLE);
+    Vector_2 lRV = CreateVector(lRE);
+  
+    Orientation lOrientation = CGAL::orientation(lLV,lRV) ;
+    if ( lOrientation == COLLINEAR )
+    {
+      SetIsDegenerate(aNode);
+      CGAL_STSKEL_BUILDER_TRACE(1, "COLLINEAR *NEW* vertex: N" << aNode->id() << " (E" << lLE->id() << ",E" << lRE->id() << ")" ) ; 
+    }
+    else if ( lOrientation == RIGHT_TURN )
+    {
+      mReflexVertices.push_back(aNode);
+      SetIsReflex(aNode);
+      CGAL_STSKEL_BUILDER_TRACE(1, "Reflex *NEW* vertex: N" << aNode->id()  << " (E" << lLE->id() << ",E" << lRE->id() << ")" );
+    }
+  }
+}
+
+template<class Direction>
+bool counterclockwise_at_or_in_between_2( Direction const& p, Direction const& q, Direction const& r )
+{
+  typedef typename Kernel_traits<Direction>::Kernel K ;
+  
+  return p == q || p == r || K().counterclockwise_in_between_2_object()(p,q,r) ;
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::IsValidPseudoSplitEvent( PseudoSplitEvent const& aEvent )
+{
+  Vertex_handle lSeed0 = aEvent.seed0();
+  Vertex_handle lSeed1 = aEvent.seed1();
+  
+  Halfedge_handle lEL0 = GetEdgeEndingAt  (lSeed0);
+  Halfedge_handle lER0 = GetEdgeStartingAt(lSeed0);
+  
+  Halfedge_handle lEL1 = GetEdgeEndingAt  (lSeed1);
+  Halfedge_handle lER1 = GetEdgeStartingAt(lSeed1);
+  
+  Direction_2 lDL0 = - CreateDirection(lEL0);
+  Direction_2 lDL1 = - CreateDirection(lEL1);
+  Direction_2 lDR0 =   CreateDirection(lER0);
+  Direction_2 lDR1 =   CreateDirection(lER1);
+  
+  bool lV01Degenerate = (lDL0 == lDR1) ;
+  bool lV10Degenerate = (lDL1 == lDR0) ;
+  
+  
+  CGAL_STSKEL_BUILDER_TRACE(3, "Validating pseudo-split event. Resulting re-connection: "
+                           << "\nE" << lEL0->id() << " [DL0:" << dir2str(lDL0) << "]"
+                           << "->E" << lER1->id() << " [DR1:" << dir2str(lDR1) << "]" << ( lV01Degenerate ? " (degenerate)" : "" )
+                           << "\nE" << lEL1->id() << " [DL1:" << dir2str(lDL1) << "]"
+                           << "->E" << lER0->id() << " [DR0:" << dir2str(lDR0) << "]" << ( lV10Degenerate ? " (degenerate)" : "" )
+                           ) ;
+  
+  bool lTangled ;
+   
+  if ( !lV01Degenerate )
+  {
+    bool lEL1V_Tangled = counterclockwise_at_or_in_between_2(lDL1,lDR1,lDL0);
+    bool lER0V_Tangled = counterclockwise_at_or_in_between_2(lDR0,lDR1,lDL0);
+    
+    lTangled = lEL1V_Tangled || lER0V_Tangled ;
+  }
+  else if ( !lV10Degenerate )
+  {
+    bool lEL0V_Tangled = counterclockwise_at_or_in_between_2(lDL0,lDR0,lDL1);
+    bool lER1V_Tangled = counterclockwise_at_or_in_between_2(lDR1,lDR0,lDL1);
+
+    lTangled = lEL0V_Tangled || lER1V_Tangled ;
+  }
+  else
+  {
+    lTangled = (lDL0 == lDL1) ;
+  }
+  
+  CGAL_STSKEL_BUILDER_TRACE_IF(lTangled, 3, "Tangled profile. Pseudo-split event is invalid");
+
+  return !lTangled ;
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::HandlePseudoSplitEvent( EventPtr aEvent )
+{
+  PseudoSplitEvent& lEvent = dynamic_cast<PseudoSplitEvent&>(*aEvent) ;
+  
+  if ( IsValidPseudoSplitEvent(lEvent) )
+  {
+    Vertex_handle lLSeed = lEvent.seed0() ;
+    Vertex_handle lRSeed = lEvent.seed1() ;
+
+    Vertex_handle lNewNode_L, lNewNode_R ;
+    boost::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent);
+  
+    Halfedge_handle lNBisector_LO = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID  ),Halfedge(mEdgeID+1) );
+    Halfedge_handle lNBisector_RO = mSSkel->SSkel::Base::edges_push_back ( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) );
+    Halfedge_handle lNBisector_LI = lNBisector_LO->opposite();
+    Halfedge_handle lNBisector_RI = lNBisector_RO->opposite();
+  
+    mEdgeID += 4 ;
+    
+    Halfedge_handle lSBisector_LO = lLSeed->primary_bisector() ;
+    Halfedge_handle lSBisector_LI = lSBisector_LO->opposite();
+  
+    Halfedge_handle lSBisector_RO = lRSeed->primary_bisector() ;
+    Halfedge_handle lSBisector_RI = lSBisector_RO->opposite();
+  
+    Halfedge_handle lSBisector_LO_Next = lSBisector_LO->next();
+    Halfedge_handle lSBisector_RO_Next = lSBisector_RO->next();
+    Halfedge_handle lSBisector_LI_Prev = lSBisector_LI->prev();
+    Halfedge_handle lSBisector_RI_Prev = lSBisector_RI->prev();
+    
+    Vertex_handle lFicNod_SLO = lSBisector_LO->vertex();
+    CGAL_assertion_code(Vertex_handle lFicNod_SLI = lSBisector_LI_Prev->vertex();) // unused 
+    Vertex_handle lFicNod_SRO = lSBisector_RO->vertex();
+    CGAL_assertion_code(Vertex_handle lFicNod_SRI = lSBisector_RI_Prev->vertex();) // unused
+    
+    CGAL_assertion( lFicNod_SLO->has_infinite_time() ) ;
+    CGAL_assertion( lFicNod_SLI->has_infinite_time() ) ;
+    CGAL_assertion( lFicNod_SRO->has_infinite_time() ) ;
+    CGAL_assertion( lFicNod_SRI->has_infinite_time() ) ;
+    
+    Link(lNBisector_LO, lSBisector_LO->face());
+    Link(lNBisector_LI, lSBisector_RI->face());
+    Link(lNBisector_RO, lSBisector_RO->face());
+    Link(lNBisector_RI, lSBisector_LI->face());
+    
+    CrossLink(lSBisector_LO, lNewNode_L );
+    CrossLink(lSBisector_RO, lNewNode_R );
+    
+    CrossLink(lNBisector_LO, lFicNod_SLO );
+    CrossLink(lNBisector_RO, lFicNod_SRO );
+    
+    SetBisectorSlope(lNBisector_LO,POSITIVE);
+    SetBisectorSlope(lNBisector_LI,NEGATIVE);
+    SetBisectorSlope(lNBisector_RO,POSITIVE);
+    SetBisectorSlope(lNBisector_RI,NEGATIVE);
+    
+    Link(lNBisector_LI, lNewNode_L);
+    Link(lNBisector_RI, lNewNode_R);
+
+    Link(lNewNode_L, lSBisector_LO);
+    Link(lNewNode_R, lSBisector_RO);
+    
+    CrossLinkFwd(lSBisector_LO,lNBisector_LO);
+    CrossLinkFwd(lNBisector_LO,lSBisector_LO_Next);
+    CrossLinkFwd(lSBisector_LI_Prev,lNBisector_RI);
+    CrossLinkFwd(lNBisector_RI,lSBisector_LI);
+    CrossLinkFwd(lSBisector_RI_Prev,lNBisector_LI);
+    CrossLinkFwd(lNBisector_LI,lSBisector_RI);
+    CrossLinkFwd(lSBisector_RO,lNBisector_RO);
+    CrossLinkFwd(lNBisector_RO,lSBisector_RO_Next);
+  
+    SetBisectorSlope(lLSeed,lNewNode_L);
+    SetBisectorSlope(lRSeed,lNewNode_R);
+    
+    Halfedge_handle lNewNode_L_DefiningBorderA = lNewNode_L->halfedge()->defining_contour_edge();
+    Halfedge_handle lNewNode_L_DefiningBorderB = lNewNode_L->halfedge()->next()->opposite()->defining_contour_edge();
+    Halfedge_handle lNewNode_L_DefiningBorderC = lNewNode_L->halfedge()->opposite()->prev()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderA = lNewNode_R->halfedge()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->next()->opposite()->defining_contour_edge();
+    Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge();
+  
+    lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ;
+    lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ;
+    
+    Triedge lTriL( lNewNode_L_DefiningBorderA, lNewNode_L_DefiningBorderB, lNewNode_L_DefiningBorderC ) ;
+    Triedge lTriR( lNewNode_R_DefiningBorderA, lNewNode_R_DefiningBorderB, lNewNode_R_DefiningBorderC ) ;
+    
+    SetVertexTriedge( lNewNode_L, lTriL ) ;
+    SetVertexTriedge( lNewNode_R, lTriR ) ;
+  
+    CGAL_STSKEL_BUILDER_TRACE(2,   newn2str("L",lNewNode_L,lTriL) << std::endl
+                                << newn2str("R",lNewNode_R,lTriR) << std::endl
+                                << newb2str("OL",lNBisector_LO)   << std::endl
+                                << newb2str("IL",lNBisector_LI)   << std::endl
+                                << newb2str("OR",lNBisector_RO)   << std::endl
+                                << newb2str("IR",lNBisector_RI)
+                             ) ;
+  
+    CGAL_STSKEL_BUILDER_TRACE( 1, "Wavefronts:\n  " << wavefront2str(lNewNode_L) << "\n  " << wavefront2str(lNewNode_R) );
+    
+    SetupNewNode(lNewNode_L) ;
+    SetupNewNode(lNewNode_R) ;
+    
+    UpdatePQ(lNewNode_L, lEvent.triedge());
+    UpdatePQ(lNewNode_R, lEvent.triedge());
+  
+    mVisitor.on_pseudo_split_event_processed(lLSeed,lRSeed,lNewNode_L,lNewNode_R) ;
+  }  
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::HandleSplitOrPseudoSplitEvent( EventPtr aEvent )
+{
+  Halfedge_handle lOppEdge = aEvent->triedge().e2() ;
+  
+  Site lSite;
+  
+  Vertex_handle_pair lOpp = LookupOnSLAV(lOppEdge,aEvent,lSite);
+  
+  if ( handle_assigned(lOpp.first) )
+  {
+    EventPtr lPseudoSplitEvent = IsPseudoSplitEvent(aEvent,lOpp,lSite);
+    if ( lPseudoSplitEvent )
+         HandlePseudoSplitEvent(lPseudoSplitEvent);
+    else HandleSplitEvent(aEvent,lOpp);  
+  }  
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::InsertNextSplitEventInPQ( Vertex_handle v )
+{
+  EventPtr lSplitEvent = PopNextSplitEvent(v);
+  if ( !!lSplitEvent )
+    InsertEventInPQ(lSplitEvent);
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::InsertNextSplitEventsInPQ()
+{
+  for ( typename Vertex_handle_vector::iterator v = mReflexVertices.begin(), ev = mReflexVertices.end(); v != ev ; ++ v )
+    if ( !IsProcessed(*v) )
+      InsertNextSplitEventInPQ(*v);
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::Propagate()
+{
+  CGAL_STSKEL_BUILDER_TRACE(0,"Propagating events...");
+  mVisitor.on_propagation_started();
+
+  for (;;)
+  {
+    InsertNextSplitEventsInPQ();
+       
+    if ( !mPQ.empty() )
+    {
+      EventPtr lEvent = PopEventFromPQ();
+    
+      if ( lEvent->type() != Event::cEdgeEvent )    
+        AllowNextSplitEvent(lEvent->seed0());
+    
+      if ( !IsProcessed(lEvent) )
+      {
+        CGAL_STSKEL_BUILDER_TRACE (1,"\nS" << mStepID << " Event: " << *lEvent ) ;
+    
+        SetEventTimeAndPoint(*lEvent) ;
+        
+        switch ( lEvent->type() )
+        {
+          case Event::cEdgeEvent       : HandleEdgeEvent              (lEvent) ; break ;
+          case Event::cSplitEvent      : HandleSplitOrPseudoSplitEvent(lEvent) ; break ;
+          case Event::cPseudoSplitEvent: HandlePseudoSplitEvent       (lEvent) ; break ; 
+        }
+    
+        ++ mStepID ;
+      }
+    }   
+    else break ;
+  }
+  
+  mVisitor.on_propagation_finished();
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::MergeSplitNodes ( Vertex_handle_pair aSplitNodes )
+{
+  Vertex_handle lLNode, lRNode ;
+  boost::tie(lLNode,lRNode)=aSplitNodes;
+
+  Halfedge_handle lIBisectorL1 = lLNode->primary_bisector()->opposite();
+  Halfedge_handle lIBisectorR1 = lRNode->primary_bisector()->opposite();
+  Halfedge_handle lIBisectorL2 = lIBisectorL1->next()->opposite();
+  Halfedge_handle lIBisectorR2 = lIBisectorR1->next()->opposite();
+  
+  CGAL_STSKEL_BUILDER_TRACE(2
+                      ,"Merging SplitNodes: (L) N" << lLNode->id() << " and (R) N" << lRNode->id() << ".\n"
+                       << "  LOut: B" << lLNode->primary_bisector()->id() << '\n'
+                       << "  ROut: B" << lRNode->primary_bisector()->id() << '\n'
+                       << "  LIn1: B" << lIBisectorL1->id() << '\n'
+                       << "  RIn1: B" << lIBisectorR1->id() << '\n'
+                       << "  LIn2: B" << lIBisectorL2->id() << '\n'
+                       << "  RIn2: B" << lIBisectorR2->id() 
+                       );
+
+  if ( lIBisectorL1->vertex() == lRNode )
+    lIBisectorL1->HBase_base::set_vertex(lLNode);
+
+  if ( lIBisectorR1->vertex() == lRNode )
+    lIBisectorR1->HBase_base::set_vertex(lLNode);
+
+  if ( lIBisectorL2->vertex() == lRNode )
+    lIBisectorL2->HBase_base::set_vertex(lLNode);
+
+  if ( lIBisectorR2->vertex() == lRNode )
+    lIBisectorR2->HBase_base::set_vertex(lLNode);
+
+  CGAL_STSKEL_BUILDER_TRACE(2
+                      ,   "  N" << lRNode->id() << " removed.\n"
+                       << "  LIn1 B" << lIBisectorL1->id() << " now linked to N" << lIBisectorL1->vertex()->id() << '\n'
+                       << "  RIn1 B" << lIBisectorR1->id() << " now linked to N" << lIBisectorR1->vertex()->id() << '\n'
+                       << "  LIn2 B" << lIBisectorL2->id() << " now linked to N" << lIBisectorL2->vertex()->id() << '\n'
+                       << "  RIn2 B" << lIBisectorR2->id() << " now linked to N" << lIBisectorR2->vertex()->id()
+                       );
+
+  EraseNode(lRNode);
+}
+
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::EraseNode ( Vertex_handle aNode )
+{
+  aNode->VBase::reset_id__internal__(-aNode->id());
+  mSSkel->SSkel::Base::vertices_erase(aNode);
+}
+
+#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE
+template<class Halfedge_handle>
+void TraceMultinode( char const* t, Halfedge_handle b, Halfedge_handle e )
+{
+  std::ostringstream ss ;
+  ss << t ;
+  
+  do
+  {
+    ss << "B" << b->id() << " N" << b->vertex()->id() << " " ;
+  }
+  while ( b = b->next(), b != e ) ;
+  
+  std::string s = ss.str();
+  CGAL_STSKEL_BUILDER_TRACE(0, s);
+}
+
+
+template<class Point>
+double angle_wrt_X ( Point const& a, Point const& b )
+{
+  double dx = to_double(b.x() - a.x() ) ;
+  double dy = to_double(b.y() - a.y() ) ;
+  double atan = std::atan2(dy,dx);
+  double rad  = atan >= 0.0 ? atan : 2.0 * 3.141592 + atan ;
+  double deg  = rad * 180.0 / 3.141592 ;
+  return deg ;
+}
+
+template<class Vertex_handle, class Halfedge_around_vertex_circulator>
+void TraceFinalBisectors( Vertex_handle v, Halfedge_around_vertex_circulator cb )
+{
+  Halfedge_around_vertex_circulator c = cb ;
+
+  do
+  {
+    double phi = angle_wrt_X((*c)->vertex()->point(),(*c)->opposite()->vertex()->point());
+    
+    CGAL_STSKEL_BUILDER_TRACE(2, "  N" << v->id() << " in=B" << (*c)->id() 
+                        << " E" << (*c)->defining_contour_edge()->id() 
+                        << " out=B" << (*c)->opposite()->id() 
+                        << " E" << (*c)->opposite()->defining_contour_edge()->id() 
+                        << " phi=" << phi
+                        );
+    
+    ++ c ;
+  }
+  while( c != cb ) ;
+  
+}
+#endif
+
+template<class Vertex_handle, class Halfedge_around_vertex_circulator>
+bool ValidateFinalBisectorsAfterMerge( Vertex_handle /* v */, Halfedge_around_vertex_circulator cb )
+{
+  bool rOK = true ;
+  
+  Halfedge_around_vertex_circulator c = cb ;
+
+  do
+  {
+    if ( (*c)->defining_contour_edge() != (*c)->prev()->defining_contour_edge() )
+      rOK = false ;
+      
+    ++ c ;
+  }
+  while( rOK && c != cb ) ;
+  
+  return rOK ;
+  
+}
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::RelinkBisectorsAroundMultinode( Vertex_handle const& v0, Halfedge_handle_vector& aLinks )
+{
+  CGAL_assertion( aLinks.size() > 0 ) ;
+  
+  CGAL_STSKEL_BUILDER_TRACE(4, "Relinking " << aLinks.size() << " bisectors around N" << v0->id() ) ;
+  
+  // Connect the bisectors with each other following the CCW ordering
+  
+  Halfedge_handle first_he = aLinks.front();        
+  Halfedge_handle prev_he  = first_he ;
+  
+  first_he->HBase_base::set_vertex(v0);
+  
+  for ( typename Halfedge_handle_vector::iterator i = cpp11::next(aLinks.begin()), ei = aLinks.end(); i != ei ; ++ i )
+  {
+    Halfedge_handle he = *i ;
+
+    he->HBase_base::set_vertex(v0);
+            
+    Halfedge_handle prev_he_opp = prev_he->opposite();
+    
+    he         ->HBase_base::set_next(prev_he_opp);
+    prev_he_opp->HBase_base::set_prev(he);
+
+    CGAL_STSKEL_BUILDER_TRACE(4, "Relinking B" << he->id() << "->B" << prev_he_opp->id() ) ;
+    
+    prev_he = he ;
+  }
+
+  Halfedge_handle prev_he_opp = prev_he->opposite();
+    
+  first_he   ->HBase_base::set_next(prev_he_opp);
+  prev_he_opp->HBase_base::set_prev(first_he);
+
+  CGAL_STSKEL_BUILDER_TRACE(4, "Relinking B" << first_he->id() << "->B" << prev_he_opp->id() ) ;
+  
+  // Reset the main halfedge for v0  
+  v0->VBase::set_halfedge(first_he) ;
+  
+  CGAL_STSKEL_DEBUG_CODE( TraceFinalBisectors(v0,v0->halfedge_around_vertex_begin()); )
+
+  CGAL_postcondition( ValidateFinalBisectorsAfterMerge(v0,v0->halfedge_around_vertex_begin()) ) ;
+}
+
+
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::PreprocessMultinode( Multinode& aMN )
+{
+  //
+  // A Multinode is a run of coincident nodes along a face.
+  // Its represented by a pair of halfedges describing a linear profile.
+  // The first halfedge in the pair points to the first node in the multinode.
+  // Each ->next() halfedge in the profile points to a subsequent node.
+  // The second halfedge in the pair is past-the-end (it points to the first node around the face that IS NOT part of the multinode)
+  //
+  
+  // Halfedge_handle oend = validate(aMN.end->opposite());
+  
+  Halfedge_handle h = aMN.begin ;
+ 
+  aMN.bisectors_to_relink.push_back(h);
+  
+  // Traverse the profile collecting:
+  //  The nodes to be removed from the HDS (all but the first)
+  //  The bisectors to be removed from the HDS (each bisector pointing to the next node in the multinode)
+  //  The bisectors around each node that must be relinked to the first node (which will be kept in place of the multinode)
+  do
+  {
+    ++ aMN.size ;
+    Halfedge_handle nx = validate(h->next());
+    if ( nx != aMN.end )
+      aMN.bisectors_to_remove.push_back(nx);
+
+    // Since each halfedge "h" in this lineal profile corresponds to a single face, all the bisectors around
+    // each node which must be relinked are those found ccw between h and h->next()
+    Halfedge_handle ccw = h ;
+    Halfedge_handle ccw_end = validate(h->next()->opposite());
+    for(;;)
+    {
+      ccw = validate(ccw->opposite()->prev()) ;
+      if ( ccw != ccw_end )
+           aMN.bisectors_to_relink.push_back(ccw);
+      else break ;  
+    }    
+    if ( h != aMN.begin )
+    {
+      aMN.nodes_to_remove.push_back(h->vertex());
+    }
+      
+    h = nx;
+  }
+  while ( h != aMN.end ) ;
+  
+  aMN.bisectors_to_relink.push_back(aMN.end->opposite());
+  
+  CGAL_STSKEL_DEBUG_CODE( TraceMultinode("Preprocessing multinode: ", aMN.begin,aMN.end) ) ;
+}
+
+//
+// Replaces a run of coincident nodes with a single one by removing all but the first, remvong node-to-node bisectors and
+// relinking the other bisectors.
+//
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::ProcessMultinode( Multinode&              aMN 
+                                                           , Halfedge_handle_vector& rBisectorsToRemove 
+                                                           , Vertex_handle_vector&   rNodesToRemove
+                                                           )
+{
+  bool lDoNotProcess = false ;
+  
+  Halfedge_handle h = aMN.begin ;
+
+  do
+  {
+    if ( h->vertex()->has_infinite_time() || IsExcluded(h->vertex()))
+      lDoNotProcess = true ;
+  }
+  while ( h = h->next(), !lDoNotProcess && h != aMN.end ) ;
+  
+  if ( !lDoNotProcess )
+  {
+    CGAL_STSKEL_DEBUG_CODE( TraceMultinode("Processing multinode: ", aMN.begin,aMN.end) ) ;
+    
+    Halfedge_handle h = aMN.begin ;
+    do
+    {
+      Exclude(h->vertex());
+    }
+    while ( h = h->next(), h != aMN.end ) ;
+
+    std::copy(aMN.bisectors_to_remove.begin(), aMN.bisectors_to_remove.end(), std::back_inserter(rBisectorsToRemove));
+    
+    for( Vertex_handle_vector_iterator vi = aMN.nodes_to_remove.begin(), evi = aMN.nodes_to_remove.end() ; vi != evi ; ++ vi )
+      rNodesToRemove.push_back(*vi) ;
+     
+    RelinkBisectorsAroundMultinode(aMN.v,aMN.bisectors_to_relink);    
+  }
+}
+
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::MultinodePtr
+Straight_skeleton_builder_2<Gt,Ss,V>::CreateMultinode( Halfedge_handle begin, Halfedge_handle end )
+{
+  return MultinodePtr( new Multinode(begin,end) );
+}
+
+
+//
+// Finds coincident skeleton nodes and merge them
+//
+// If moving edges Ei,Ej collide with moving edge Ek causing Ej to collapse, Ei and Ek becomes consecutive and a new
+// polygon vertex (Ei,Ek) appears in the wavefront.
+// If moving edges Ei,Ej collide with moving edge Ek causing Ek to be split in two halves, L(Ek) amd R(Ek) resp, two new 
+// polygon vertices appears in the wavefront; namely: (Ei,R(Ek)) and (L(Ek),Ej))
+// If moving edge Ei,Ej collide with both Ek,El simultaneously causing the edges to cross-connect, two new vertices
+// (Ei,Ek) and (El,Ej) appear in the wavefront.
+//
+// In all those 3 cases, each new polygon vertex is represented in the straight skeleton as a skeleton node.
+// Every skeleton node is describing the coallision of at least 3 edges (called the "defining edges" of the node)
+// and it has at least 3 incident bisectors, each one pairing 2 out of the total number of defining egdes. 
+// 
+// Any skeleton node has a degree of at least 3, but if more than 3 edges collide simultaneously, the corresponding
+// skeleton node has a higher degree. (the degree of the node is exactly the number of colliding edges)
+//
+// However, the algorithm handles the coallison of 3 edges at a time so each skeleton node initially created
+// has degree exactly 3 so this function which detects higher degree nodes and merge them into a single node
+// of the proper degree is needed.
+//
+// Two skeleton nodes are "coincident" IFF they have 2 defining edges in common and each triedge of edges collide
+// at the same time and point. IOW, 2 nodes are coincident if they represent the simultaneous 
+// coallison of exactly 4 edges (the union of 2 triedges with 2 common elements is a set of 4).
+//
+template<class Gt, class Ss, class V>
+void Straight_skeleton_builder_2<Gt,Ss,V>::MergeCoincidentNodes()
+{
+  //
+  // NOTE: This code might be executed on a topologically incosistent HDS, thus the need to check
+  // the structure along the way.
+  //
+
+  CGAL_STSKEL_BUILDER_TRACE(0, "Merging coincident nodes...");
+
+  // ALGORITHM DESCRIPTION:
+  //
+  // While circulating the bisectors along the face for edge Ei we find all those edges E* which
+  // are or become consecutive to Ei during the wavefront propagation. Each bisector along the face:
+  // (Ei,Ea), (Ei,Eb), (Ei,Ec), etcc pairs Ei with such other edge.
+  // Between one bisector (Ei,Ea) and the next (Ei,Eb) there is skeleton node which represents
+  // the coallision between the 3 edges (Ei,Ea,Eb).
+  // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), neccesarily
+  // shares two edges (Ei and Eb precisely) with any next skeleton node Ni+1 around the face.
+  // That is, the triedge of defining edges that correspond to each skeleton node around the face follow this
+  // sequence: (Ei,Ea,Eb), (Ei,Eb,Ec), (Ei,Ec,Ed), ...
+  //
+  // Any 2_ consecutive_ skeleton nodes around a face share 2 out of the 3 defining edges, which is one of the 
+  // neccesary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face
+  //
+
+  MultinodeVector lMultinodes ;
+
+  for( Face_iterator fit = mSSkel->SSkel::Base::faces_begin(); fit != mSSkel->SSkel::Base::faces_end(); ++fit)
+  {
+    // 'h' is the first (CCW) skeleton halfedge.
+    Halfedge_handle h = validate(validate(fit->halfedge())->next());
+
+    CGAL_assertion ( h->is_bisector() ) ;
+
+    // 'last' is the last (CCW) skeleton halfedge
+    Halfedge_handle last = validate(fit->halfedge()->prev()) ;
+
+    CGAL_assertion ( last->is_bisector() ) ;
+    CGAL_assertion ( last->vertex()->is_contour() ) ;
+
+    Halfedge_handle h0 = h ;
+    Vertex_handle   v0 = validate(h0->vertex()) ;
+
+    if ( ! v0->has_infinite_time() )
+    {
+      CGAL_assertion ( v0->is_skeleton() ) ;
+
+      h = validate(h->next()) ;
+
+      while ( h != last )
+      {
+        Vertex_handle v = validate(h->vertex());
+
+        if ( ! v->has_infinite_time() )
+        {
+          CGAL_assertion ( v->is_skeleton() ) ;
+          
+          if ( !AreSkeletonNodesCoincident(v0,v) )
+          {
+            if ( h0->next() != h )
+              lMultinodes.push_back( CreateMultinode(h0,h) );
+
+            v0 = v ;
+            h0 = h ;
+          }
+        }
+
+        h = validate(h->next());
+      } 
+
+      if ( h0->next() != h )
+        lMultinodes.push_back( CreateMultinode(h0,h) );
+    }
+  }
+
+  //
+  // The merging loop removes all but one of the coincident skeleton nodes and the halfedges between them.
+  // But it can't physically erase those from the HDS while looping, so the nodes/bisector to erase 
+  // are collected in these sequences are erased after the merging loop.
+  // 
+  Halfedge_handle_vector lBisectorsToRemove ;
+  Vertex_handle_vector   lNodesToRemove ;
+
+  for ( typename MultinodeVector::iterator it = lMultinodes.begin(), eit = lMultinodes.end() ; it != eit ; ++ it )
+    PreprocessMultinode(**it);
+    
+  std::sort(lMultinodes.begin(), lMultinodes.end(), MultinodeComparer());
+    
+  for ( typename MultinodeVector::iterator it = lMultinodes.begin(), eit = lMultinodes.end() ; it != eit ; ++ it )
+    ProcessMultinode(**it,lBisectorsToRemove,lNodesToRemove);
+  
+  for( Halfedge_handle_vector_iterator hi = lBisectorsToRemove.begin(), ehi = lBisectorsToRemove.end() ; hi != ehi ; ++ hi )
+  {
+    CGAL_STSKEL_BUILDER_TRACE(1, "B" << (*hi)->id() << " removed.");
+    (*hi)->HBase_base::reset_id(-1);
+    mSSkel->SSkel::Base::edges_erase(*hi);    
+  }
+    
+  for( Vertex_handle_vector_iterator vi = lNodesToRemove.begin(), evi = lNodesToRemove.end() ; vi != evi ; ++ vi )
+    EraseNode(*vi);
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::FinishUp()
+{
+  CGAL_STSKEL_BUILDER_TRACE(0, "\n\nFinishing up...");
+
+  mVisitor.on_cleanup_started();
+  
+  std::for_each( mSplitNodes.begin()
+                ,mSplitNodes.end  ()
+                ,boost::bind(&Straight_skeleton_builder_2<Gt,Ss,V>::MergeSplitNodes,this,_1)
+               ) ;
+  
+  std::for_each( mDanglingBisectors.begin()
+                ,mDanglingBisectors.end  ()
+                ,boost::bind(&Straight_skeleton_builder_2<Gt,Ss,V>::EraseBisector,this,_1)
+               ) ;
+               
+  MergeCoincidentNodes();             
+
+  mVisitor.on_cleanup_finished();
+
+  return mSSkel->is_valid() ;
+}
+
+template<class Gt, class Ss, class V>
+bool Straight_skeleton_builder_2<Gt,Ss,V>::Run()
+{
+  InitPhase();
+  Propagate();
+  return FinishUp();
+}
+
+template<class Gt, class Ss, class V>
+typename Straight_skeleton_builder_2<Gt,Ss,V>::SSkelPtr Straight_skeleton_builder_2<Gt,Ss,V>::construct_skeleton( bool aNull_if_failed )
+{
+  bool ok = false ;
+  
+  try
+  {
+    ok = Run() ;
+  }
+  catch( std::exception const& e ) 
+  {
+    mVisitor.on_error ( e.what() ) ;
+    CGAL_STSKEL_BUILDER_TRACE(0,"EXCEPTION THROWN (" << e.what() << ") during straight skeleton construction.");
+  }
+  catch(...) 
+  {
+    mVisitor.on_error ( "Unhandled exception" ) ;
+    CGAL_STSKEL_BUILDER_TRACE(0,"UNHANDLED EXCEPTION during straight skeleton construction.");
+  }
+
+  if ( !ok ) 
+  {
+    CGAL_STSKEL_BUILDER_TRACE(0,"Invalid result.");
+    if ( aNull_if_failed )
+      mSSkel = SSkelPtr() ; 
+  }
+
+  mVisitor.on_algorithm_finished(ok);
+  
+  return mSSkel ;
+}
+
+} // end namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_IMPL_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/debug.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/test.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/test.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_2/test.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_2/test.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_builder_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_builder_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_builder_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_builder_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_builder_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_builder_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_builder_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_builder_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_converter_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_converter_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_converter_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_converter_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_halfedge_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_halfedge_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_halfedge_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_halfedge_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_items_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_items_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_items_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_items_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Straight_skeleton_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Straight_skeleton_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Stream_lines_2.h b/3rdparty/CGAL-4.8/include/CGAL/Stream_lines_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Stream_lines_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Stream_lines_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Subdivision_mask_3.h b/3rdparty/CGAL-4.8/include/CGAL/Subdivision_mask_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Subdivision_mask_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Subdivision_mask_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Subdivision_method_3.h b/3rdparty/CGAL-4.8/include/CGAL/Subdivision_method_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Subdivision_method_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Subdivision_method_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Subdivision_method_impl_3.h b/3rdparty/CGAL-4.8/include/CGAL/Subdivision_method_impl_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Subdivision_method_impl_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Subdivision_method_impl_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh.h
new file mode 100644
index 0000000..47f8932
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2014 GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Phlipp Moeller
+#ifndef CGAL_TOP_LEVEL_SURFACE_MESH_H
+#define CGAL_TOP_LEVEL_SURFACE_MESH_H
+
+#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
+#include <CGAL/Surface_mesh/Surface_mesh.h>
+
+#ifdef DOXYGEN_RUNNING
+namespace CGAL {
+
+// fwdS for the public interface
+template<typename K>
+class Surface_mesh;
+
+}
+#endif
+
+#endif /* CGAL_TOP_LEVEL_SURFACE_MESH_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/IO.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/IO.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/IO.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/IO.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Properties.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Properties.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh/Properties.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Properties.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh.h
new file mode 100644
index 0000000..00444fe
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh.h
@@ -0,0 +1,3037 @@
+//=============================================================================
+// Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen
+// Copyright (C) 2011 by Graphics & Geometry Group, Bielefeld University
+// Copyright (C) 2014 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+
+#ifndef CGAL_SURFACE_MESH_H
+#define CGAL_SURFACE_MESH_H
+
+#include <iterator>
+#include <algorithm>
+#include <utility>
+#include <iostream>
+#include <cstddef>
+#include <vector>
+#include <string>
+#include <typeinfo>
+#include <functional>
+
+#include <boost/cstdint.hpp>
+#include <boost/array.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/foreach.hpp>
+#include <boost/property_map/property_map.hpp>
+
+#include <CGAL/Iterator_range.h>
+#include <CGAL/circulator.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
+#include <CGAL/Surface_mesh/IO.h>
+//#include <CGAL/Surface_mesh/Properties.h>
+#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/Euler_operations.h>
+
+namespace CGAL {
+
+
+#ifndef DOXYGEN_RUNNING
+    /// Base class for vertex, halfedge, edge, and face index. 
+    ///
+    /// \attention Note that `Index` is not a model of the concept `Handle`,
+    /// because it cannot be dereferenced.
+    /// \sa `Vertex_index`, `Halfedge_index`, `Edge_index`, `Face_index`.
+    template<typename T>
+    class SM_Index
+    {
+    public:
+    typedef boost::uint32_t size_type;
+        /// Constructor. %Default construction creates an invalid index.
+        /// We write -1, which is <a href="http://en.cppreference.com/w/cpp/concept/numeric_limits">
+        /// <tt>std::numeric_limits<size_type>::max()</tt></a>
+        /// as `size_type` is an unsigned type. 
+        explicit SM_Index(size_type _idx=-1) : idx_(_idx) {}
+
+        /// Get the underlying index of this index
+        operator size_type() const { return idx_; }
+
+        /// reset index to be invalid (index=-1)
+        void reset() { idx_=-1; }
+
+        /// return whether the index is valid, i.e., the index is not equal to -1.
+        bool is_valid() const { 
+          size_type inf = -1;
+          return idx_ != inf;
+        }
+
+        /// are two indices equal?
+        bool operator==(const T& _rhs) const {
+            return idx_ == _rhs.idx_;
+        }
+
+        /// are two indices different?
+        bool operator!=(const T& _rhs) const {
+            return idx_ != _rhs.idx_;
+        }
+
+        /// Comparison by index.
+        bool operator<(const T& _rhs) const {
+            return idx_ < _rhs.idx_;
+        }
+
+        /// increments the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// increment.
+        SM_Index& operator++() { ++idx_; return *this; }
+        /// decrements the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// decrement.
+        SM_Index& operator--() { --idx_; return *this; }
+
+        /// increments the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// increment.
+        SM_Index operator++(int) { SM_Index tmp(*this); ++idx_; return tmp; }
+        /// decrements the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// decrement.
+        SM_Index operator--(int) { SM_Index tmp(*this); --idx_; return tmp; }
+
+
+      
+     
+      
+    private:
+        size_type idx_;
+    };
+
+  template <class T>
+  std::size_t hash_value(const SM_Index<T>&  i)
+  {
+    std::size_t ret = i;
+    return ret;
+  }
+
+    // Implementation for Surface_mesh::Vertex_index
+ 
+    class SM_Vertex_index
+ : public SM_Index<SM_Vertex_index>
+    {
+    public:
+
+        SM_Vertex_index() : SM_Index<SM_Vertex_index>(-1) {}
+
+        explicit SM_Vertex_index(size_type _idx) : SM_Index<SM_Vertex_index>(_idx) {}
+
+
+        friend std::ostream& operator<<(std::ostream& os, SM_Vertex_index const& v)
+        {
+          return (os << 'v' << (size_type)v );
+        }
+    };
+
+    // Implementation of Surface_mesh::Halfedge_index
+    class SM_Halfedge_index
+      : public SM_Index<SM_Halfedge_index>
+    {
+    public:
+
+        // Workaround for a bug in g++4.4 in ADL for function next:
+        // we provide the types needed for std::iterator_traits<Surface_mesh::halfedge_index>,
+        // although this descriptor is not an iterator.
+        typedef void iterator_category;
+        typedef void value_type;
+        typedef void difference_type;
+        typedef void pointer;
+        typedef void reference;
+
+        SM_Halfedge_index() : SM_Index<SM_Halfedge_index>(-1) {}
+
+        explicit SM_Halfedge_index(size_type _idx) : SM_Index<SM_Halfedge_index>(_idx) {}
+
+        friend std::ostream& operator<<(std::ostream& os, SM_Halfedge_index const& h)
+        {
+          return (os << 'h' << (size_type)h );
+        }
+    };
+
+    /// Implementation of Surfae_mesh::Face_index
+    class SM_Face_index
+      : public SM_Index<SM_Face_index>
+    {
+    public:
+
+        SM_Face_index() : SM_Index<SM_Face_index>(-1) {}
+
+        explicit SM_Face_index(size_type _idx) : SM_Index<SM_Face_index>(_idx) {}
+
+
+        friend std::ostream& operator<<(std::ostream& os, SM_Face_index const& f)
+        {
+          return (os << 'f' << (size_type)f );
+        }
+    };
+
+    /// Implementation of Surface_mesh::Edge_index
+    class SM_Edge_index
+    {
+    public:
+        typedef boost::uint32_t size_type;
+
+        SM_Edge_index() : halfedge_(-1) { }
+
+        SM_Edge_index(size_type idx) : halfedge_(idx * 2) { }
+
+
+        SM_Edge_index(SM_Halfedge_index he) : halfedge_(he) { }
+
+        // returns the internal halfedge.
+        SM_Halfedge_index halfedge() const { return halfedge_; }
+
+        // returns the underlying index of this index.
+        operator size_type() const { return (size_type)halfedge_ / 2; }
+
+        // resets index to be invalid (index=-1)
+        void reset() { halfedge_.reset(); }
+
+        // returns whether the index is valid, i.e., the index is not equal to -1.
+        bool is_valid() const { return halfedge_.is_valid(); }
+
+        // Are two indices equal?
+        bool operator==(const SM_Edge_index& other) const { return (size_type)(*this) == (size_type)other; }
+
+        // Are two indices different?
+        bool operator!=(const SM_Edge_index& other) const { return (size_type)(*this) != (size_type)other; }
+
+        // compares by index.
+        bool operator<(const SM_Edge_index& other) const { return (size_type)(*this) < (size_type)other;}
+
+        // decrements the internal index. This operation does not
+        // guarantee that the index is valid or undeleted after the
+        // decrement.
+        SM_Edge_index& operator--() { halfedge_ = SM_Halfedge_index((size_type)halfedge_ - 2); return *this; }
+
+        // increments the internal index. This operation does not
+        // guarantee that the index is valid or undeleted after the
+        // increment.
+        SM_Edge_index& operator++() { halfedge_ = SM_Halfedge_index((size_type)halfedge_ + 2); return *this; }
+
+        // decrements internal index. This operation does not
+        // guarantee that the index is valid or undeleted after the
+        // decrement.
+        SM_Edge_index operator--(int) { SM_Edge_index tmp(*this); halfedge_ = SM_Halfedge_index((size_type)halfedge_ - 2); return tmp; }
+
+        // increments internal index. This operation does not
+        // guarantee that the index is valid or undeleted after the
+        // increment.
+        SM_Edge_index operator++(int) { SM_Edge_index tmp(*this); halfedge_ = SM_Halfedge_index((size_type)halfedge_ + 2); return tmp; }
+
+
+      // prints the index and a short identification string to an ostream.
+        friend std::ostream& operator<<(std::ostream& os, SM_Edge_index const& e)
+        {
+          return (os << 'e' << (size_type)e << " on " << e.halfedge());
+        }
+
+        friend  std::size_t hash_value(const SM_Edge_index&  i)
+        {
+          return i;
+        }
+
+    private:
+        SM_Halfedge_index halfedge_;
+    };
+#endif
+
+  /// \ingroup PkgSurface_mesh
+  /// This class is a data structure that can be used as halfedge data structure or polyhedral
+  /// surface. It is an alternative to the classes `HalfedgeDS` and `Polyhedron_3`
+  /// defined in the packages  \ref PkgHDSSummary and \ref PkgPolyhedronSummary. 
+  /// The main difference is that it is indexed based and not pointer based,
+  /// and that the mechanism for adding information to vertices, halfedges, edges,
+  /// and faces is much simpler and done at runtime and not at compile time.
+  /// When elements are removed, they are only marked as removed, and a garbage
+  /// collection function must be called to really remove them. 
+  /// @tparam P The type of the \em point property of a vertex. There is no requirement on `P`,
+  ///         besides being default constructible and assignable. 
+  ///         In typical use cases it will be a 2D or 3D point type.
+  /// \cgalModels `MutableFaceGraph` and `FaceListGraph`
+
+template <typename P>
+class Surface_mesh
+{
+
+    typedef Surface_mesh<P> Self;
+
+    template<typename>
+    class Handle_iterator;
+public:
+
+
+
+/// \addtogroup PkgSurface_mesh
+///
+/// @{
+
+/// @cond CGAL_DOCUMENT_INTERNALS
+class Base_property_array
+{
+public:
+
+    /// Default constructor
+    Base_property_array(const std::string& name) : name_(name) {}
+
+    /// Destructor.
+    virtual ~Base_property_array() {}
+
+    /// Reserve memory for n elements.
+    virtual void reserve(size_t n) = 0;
+
+    /// Resize storage to hold n elements.
+    virtual void resize(size_t n) = 0;
+
+    /// Free unused memory.
+    virtual void shrink_to_fit() = 0;
+
+    /// Extend the number of elements by one.
+    virtual void push_back() = 0;
+
+    virtual bool transfer(const Base_property_array& other) = 0;
+
+    /// Let two elements swap their storage place.
+    virtual void swap(size_t i0, size_t i1) = 0;
+
+    /// Return a deep copy of self.
+    virtual Base_property_array* clone () const = 0;
+
+    /// Return the type_info of the property
+    virtual const std::type_info& type() = 0;
+
+    /// Return the name of the property
+    const std::string& name() const { return name_; }
+
+
+protected:
+
+    std::string name_;
+};
+
+  /// @endcond
+
+
+//== CLASS DEFINITION =========================================================
+
+/// @cond CGAL_DOCUMENT_INTERNALS
+
+template <class T>
+class Property_array : public Base_property_array
+{
+public:
+
+    typedef T                                       value_type;
+    typedef std::vector<value_type>                 vector_type;
+    typedef typename vector_type::reference         reference;
+    typedef typename vector_type::const_reference   const_reference;
+
+    Property_array(const std::string& name, T t=T()) : Base_property_array(name), value_(t) {}
+
+public: // virtual interface of Base_property_array
+
+    virtual void reserve(size_t n)
+    {
+        data_.reserve(n);
+    }
+
+    virtual void resize(size_t n)
+    {
+        data_.resize(n, value_);
+    }
+
+    virtual void push_back()
+    {
+        data_.push_back(value_);
+    }
+
+    bool transfer(const Base_property_array& other)
+    {
+      const Property_array<T>* pa = dynamic_cast<const Property_array*>(&other);
+      if(pa != NULL){
+        std::copy((*pa).data_.begin(), (*pa).data_.end(), data_.end()-(*pa).data_.size());
+        return true;
+      } 
+      return false;
+    }
+
+    virtual void shrink_to_fit()
+    {
+        vector_type(data_).swap(data_);
+    }
+
+    virtual void swap(size_t i0, size_t i1)
+    {
+        T d(data_[i0]);
+        data_[i0]=data_[i1];
+        data_[i1]=d;
+    }
+
+    virtual Base_property_array* clone() const
+    {
+        Property_array<T>* p = new Property_array<T>(this->name_, this->value_);
+        p->data_ = data_;
+        return p;
+    }
+
+    virtual const std::type_info& type() { return typeid(T); }
+
+
+public:
+
+    /// Get pointer to array (does not work for T==bool)
+    const T* data() const
+    {
+        return &data_[0];
+    }
+
+    /// Access the i'th element. No range check is performed!
+    reference operator[](int _idx)
+    {
+        CGAL_assertion( size_t(_idx) < data_.size() );
+        return data_[_idx];
+    }
+
+    /// Const access to the i'th element. No range check is performed!
+    const_reference operator[](int _idx) const
+    {
+        CGAL_assertion( size_t(_idx) < data_.size());
+        return data_[_idx];
+    }
+
+
+
+private:
+    vector_type data_;
+    value_type  value_;
+};
+
+
+#if 0
+// specialization for bool properties
+template <>
+inline const bool*
+Property_array<bool>::data() const
+{
+    CGAL_assertion(false);
+    return NULL;
+}
+#endif 
+
+  /// @endcond
+
+//== CLASS DEFINITION =========================================================
+
+/// @cond CGAL_DOCUMENT_INTERNALS
+
+template<typename>
+class Property_container;
+/// @endcond 
+
+
+
+
+//== CLASS DEFINITION =========================================================
+/// @cond CGAL_DOCUMENT_INTERNALS
+
+template <class, class>
+class Property_map;
+
+template<typename Key>
+class Property_container
+{
+public:
+
+    // default constructor
+    Property_container() : size_(0) {}
+
+    // destructor (deletes all property arrays)
+    virtual ~Property_container() { clear(); }
+
+    // copy constructor: performs deep copy of property arrays
+    Property_container(const Property_container& _rhs) { operator=(_rhs); }
+
+    // assignment: performs deep copy of property arrays
+    Property_container& operator=(const Property_container& _rhs)
+    {
+        if (this != &_rhs)
+        {
+            clear();
+            parrays_.resize(_rhs.n_properties());
+            size_ = _rhs.size();
+            for (unsigned int i=0; i<parrays_.size(); ++i)
+                parrays_[i] = _rhs.parrays_[i]->clone();
+        }
+        return *this;
+    }
+
+    void transfer(const Property_container& _rhs)
+    {
+      for(unsigned int i=0; i<parrays_.size(); ++i){
+        for (unsigned int j=0; j<_rhs.parrays_.size(); ++j){
+          if(parrays_[i]->name() ==  _rhs.parrays_[j]->name()){
+            parrays_[i]->transfer(* _rhs.parrays_[j]);
+            break;
+          }
+        }
+      }
+    }
+
+    // returns the current size of the property arrays
+    size_t size() const { return size_; }
+
+    // returns the number of property arrays
+    size_t n_properties() const { return parrays_.size(); }
+
+    // returns a vector of all property names
+    std::vector<std::string> properties() const
+    {
+        std::vector<std::string> names;
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            names.push_back(parrays_[i]->name());
+        return names;
+    }
+
+    // add a property with name \c name and default value \c t
+    template <class T>
+    std::pair<Property_map<Key, T>, bool>
+    add(const std::string& name, const T t=T())
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+        {
+            if (parrays_[i]->name() == name)
+            {
+              return std::make_pair(Property_map<Key, T>(dynamic_cast<Property_array<T>*>(parrays_[i])), false);
+            }
+        }
+
+        // otherwise add the property
+        Property_array<T>* p = new Property_array<T>(name, t);
+        p->resize(size_);
+        parrays_.push_back(p);
+        return std::make_pair(Property_map<Key, T>(p), true);
+    }
+
+
+    // get a property by its name. returns invalid property if it does not exist.
+    template <class T> 
+    std::pair<Property_map<Key, T>,bool>
+    get(const std::string& name) const
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            if (parrays_[i]->name() == name)
+              return std::make_pair(Property_map<Key, T>(dynamic_cast<Property_array<T>*>(parrays_[i])), true);
+        return std::make_pair(Property_map<Key, T>(), false);
+    }
+
+
+    // returns a property if it exists, otherwise it creates it first.
+    template <class T>
+    Property_map<Key, T> 
+    get_or_add(const std::string& name, const T t=T())
+    {
+      Property_map<Key, T> p;
+      bool b;
+      boost::tie(p,b)= get<T>(name);
+        if (!b) p = add<T>(name, t).first;
+        return p;
+    }
+
+
+    // get the type of property by its name. returns typeid(void) if it does not exist.
+    const std::type_info& 
+    get_type(const std::string& name)
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            if (parrays_[i]->name() == name)
+                return parrays_[i]->type();
+        return typeid(void);
+    }
+
+
+    // delete a property
+    template <class T> 
+    void
+    remove(Property_map<Key, T>& h)
+    {
+        typename std::vector<Base_property_array*>::iterator it=parrays_.begin(), end=parrays_.end();
+        for (; it!=end; ++it)
+        {
+            if (*it == h.parray_)
+            {
+                delete *it;
+                parrays_.erase(it);
+                h.reset();
+                break;
+            }
+        }
+    }
+
+
+    // delete all properties
+    void clear()
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            delete parrays_[i];
+        parrays_.clear();
+        size_ = 0;
+    }
+
+
+    // reserve memory for n entries in all arrays
+    void reserve(size_t n) const
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            parrays_[i]->reserve(n);
+    }
+
+    // resize all arrays to size n
+    void resize(size_t n)
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            parrays_[i]->resize(n);
+        size_ = n;
+    }
+
+    // free unused space in all arrays
+    void shrink_to_fit() const
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            parrays_[i]->shrink_to_fit();
+    }
+
+    // add a new element to each vector
+    void push_back()
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            parrays_[i]->push_back();
+        ++size_;
+    }
+
+    // swap elements i0 and i1 in all arrays
+    void swap(size_t i0, size_t i1) const
+    {
+        for (unsigned int i=0; i<parrays_.size(); ++i)
+            parrays_[i]->swap(i0, i1);
+    }
+
+
+private:
+    std::vector<Base_property_array*>  parrays_;
+    size_t  size_;
+};
+
+  /// @endcond
+
+#ifndef DOXYGEN_RUNNING
+/// 
+///
+/// `Property_map` enables to attach properties to the simplices of a 
+///  surface mesh.
+/// 
+/// @tparam Key The key type of the property map. It must be a model of `Index`.
+/// @tparam Value The value type of the property.
+///
+/// \cgalModels `LvaluePropertyMap`
+///
+template <class I, class T>
+class Property_map
+/// @cond CGAL_DOCUMENT_INTERNALS
+  : public boost::put_get_helper< 
+           typename Property_array<T>::reference,
+           Property_map< I, T > >
+/// @endcond
+{
+    typedef void (Property_map::*bool_type)() const;
+    void this_type_does_not_support_comparisons() const {}
+public:
+    typedef I key_type;
+    typedef T value_type;
+    typedef boost::lvalue_property_map_tag category;
+
+#ifndef DOXYGEN_RUNNING
+
+    typedef typename Property_array<T>::reference reference;
+
+    typedef typename Property_array<T>::const_reference const_reference;
+#else 
+    /// A reference to the value type of the property.
+  typedef unspecified_type reference;
+
+    /// A const reference to the value type of the property.
+  typedef unspecified_type const_reference;
+#endif
+
+#ifndef DOXYGEN_RUNNING
+    friend class Property_container<I>;
+
+    template <typename K>  friend class Surface_mesh;
+#endif
+
+public:
+/// @cond CGAL_DOCUMENT_INTERNALS
+    Property_map(Property_array<T>* p=NULL) : parray_(p) {}
+
+    void reset()
+    {
+        parray_ = NULL;
+    }
+  /// @endcond 
+
+public:
+    /// \name Accessing Properties
+    //@{
+#ifdef DOXYGEN_RUNNING
+    /// Conversion to a Boolean. It is \c true when the property map
+    /// can be used, and \c false otherwise.  
+  operator bool () const;
+#else
+    operator bool_type() const {
+        return parray_ != NULL ?
+            &Property_map::this_type_does_not_support_comparisons : 0;
+    }
+#endif
+    /// Access the property associated with the key \c i.
+    reference operator[](const I& i)
+    {
+      CGAL_assertion(parray_ != NULL);
+      return (*parray_)[i];
+    }
+
+    /// Access the property associated with the key \c i.
+    reference operator[](const I& i) const
+    {
+      CGAL_assertion(parray_ != NULL);
+      return (*parray_)[i];
+    }
+
+    bool transfer (const Property_map& other)
+    {
+      return parray_->transfer(*(other.parray_));
+    }
+
+    /// Allows access to the underlying storage of the property. This
+    /// is useful when the key associated with the properties is
+    /// unimportant and only the properties are of interest
+    /// (e.g. rendering).
+    ///
+    /// \returns a pointer to the underlying storage of the property.
+    const T* data() const
+    {
+      CGAL_assertion(parray_ != NULL);
+      return parray_->data();
+    }
+
+    //@}
+private:
+
+    Property_array<T>& array()
+    {
+        CGAL_assertion(parray_ != NULL);
+        return *parray_;
+    }
+
+    const Property_array<T>& array() const
+    {
+        CGAL_assertion(parray_ != NULL);
+        return *parray_;
+    }
+
+    Property_array<T>* parray_;
+};
+
+#endif // DOXYGEN_RUNNING
+
+///@}
+
+
+
+    /// \name Basic Types
+    ///
+    ///@{
+
+    /// The point type.
+    typedef P Point;
+
+    /// The type used to represent an index.
+    typedef boost::uint32_t size_type;
+
+    ///@}
+
+    /// \name Basic Elements
+    ///
+    ///@{
+
+
+#ifdef DOXYGEN_RUNNING
+
+    /// This class represents a vertex.
+    /// \cgalModels `Index`
+    /// \cgalModels `LessThanComparable`
+    /// \cgalModels `Hashable`
+    /// \sa `Halfedge_index`, `Edge_index`, `Face_index`
+    class Vertex_index
+    {
+    public:
+        /// %Default constructor.
+        Vertex_index() : SM_Index<Vertex_index>(-1) {}
+
+        explicit Vertex_index(size_type _idx) : SM_Index<Vertex_index>(_idx) {}
+
+        /// prints the index and a short identification string to an ostream.
+        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Vertex_index const& v)
+        {
+          return (os << 'v' << (size_type)v );
+        }
+    };
+#else
+  typedef SM_Vertex_index Vertex_index;
+#endif
+
+#ifdef DOXYGEN_RUNNING
+
+    /// This class represents a halfedge.
+    /// \cgalModels `Index`
+    /// \cgalModels `LessThanComparable`
+    /// \cgalModels `Hashable`
+    /// \sa `Vertex_index`, `Edge_index`, `Face_index`
+    class Halfedge_index
+    {
+    public:
+        /// %Default constructor
+        Halfedge_index() : SM_Index<Halfedge_index>(-1) {}
+
+        explicit Halfedge_index(size_type _idx) : SM_Index<Halfedge_index>(_idx) {}
+
+        /// prints the index and a short identification string to an ostream.
+        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Halfedge_index const& h)
+        {
+          return (os << 'h' << (size_type)h );
+        }
+
+    };
+#else
+  typedef SM_Halfedge_index Halfedge_index;
+#endif
+
+#ifdef DOXYGEN_RUNNING
+    /// This class represents a face
+    /// \cgalModels `Index`
+    /// \cgalModels `LessThanComparable`
+    /// \cgalModels `Hashable`
+    /// \sa `Vertex_index`, `Halfedge_index`, `Edge_index`
+    class Face_index
+    {
+    public:
+        /// %Default constructor
+        Face_index() : SM_Index<Face_index>(-1) {}
+
+        explicit Face_index(size_type _idx) : SM_Index<Face_index>(_idx) {}
+
+        /// prints the index and a short identification string to an ostream.
+        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Face_index const& f)
+        {
+          return (os << 'f' << (size_type)f );
+        }
+    };
+#else
+  typedef SM_Face_index Face_index;
+#endif
+
+#ifdef DOXYGEN_RUNNING
+    /// This class represents an edge.
+    /// \cgalModels `Index`
+    /// \cgalModels `LessThanComparable`
+    /// \cgalModels `Hashable`
+    /// \sa `Vertex_index`, `Halfedge_index`, `Face_index`
+    class Edge_index
+    {
+    public:
+        /// %Default constructor
+        Edge_index() : halfedge_(-1) { }
+
+        Edge_index(size_type idx) : halfedge_(idx * 2) { }
+
+        /// constructs an `Edge_index` from a halfedge.
+        Edge_index(Halfedge_index he) : halfedge_(he) { }
+        /// @cond CGAL_DOCUMENT_INTERNALS
+        /// returns the internal halfedge.
+        Halfedge_index halfedge() const { return halfedge_; }
+
+        /// returns the underlying index of this index.
+        operator size_type() const { return (size_type)halfedge_ / 2; }
+
+        /// resets index to be invalid (index=-1)
+        void reset() { halfedge_.reset(); }
+
+        /// returns whether the index is valid, i.e., the index is not equal to -1.
+        bool is_valid() const { return halfedge_.is_valid(); }
+
+        /// Are two indices equal?
+        bool operator==(const Edge_index& other) const { return (size_type)(*this) == (size_type)other; }
+
+        /// Are two indices different?
+        bool operator!=(const Edge_index& other) const { return (size_type)(*this) != (size_type)other; }
+
+        /// compares by index.
+        bool operator<(const Edge_index& other) const { return (size_type)(*this) < (size_type)other;}
+
+        /// decrements the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// decrement.
+        Edge_index& operator--() { halfedge_ = Halfedge_index((size_type)halfedge_ - 2); return *this; }
+
+        /// increments the internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// increment.
+        Edge_index& operator++() { halfedge_ = Halfedge_index((size_type)halfedge_ + 2); return *this; }
+
+        /// decrements internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// decrement.
+        Edge_index operator--(int) { Edge_index tmp(*this); halfedge_ = Halfedge_index((size_type)halfedge_ - 2); return tmp; }
+
+        /// increments internal index. This operation does not
+        /// guarantee that the index is valid or undeleted after the
+        /// increment.
+        Edge_index operator++(int) { Edge_index tmp(*this); halfedge_ = Halfedge_index((size_type)halfedge_ + 2); return tmp; }
+
+        /// @endcond 
+
+        /// prints the index and a short identification string to an ostream.
+        friend std::ostream& operator<<(std::ostream& os, typename Surface_mesh::Edge_index const& e)
+        {
+          return (os << 'e' << (size_type)e << " on " << e.halfedge());
+        }
+    private:
+        Halfedge_index halfedge_;
+    };
+#else
+  typedef SM_Edge_index Edge_index;
+#endif
+
+ 
+    ///@}
+private: //-------------------------------------------------- connectivity types
+
+    /// This type stores the vertex connectivity
+    /// \sa `Halfedge_connectivity`, `Face_connectivity`
+    struct Vertex_connectivity
+    {
+        /// an incoming halfedge per vertex (it will be a border halfedge for border vertices)
+        Halfedge_index  halfedge_;
+    };
+
+
+    /// This type stores the halfedge connectivity
+    /// \sa `Vertex_connectivity`, `Face_connectivity`
+    struct Halfedge_connectivity
+    {
+        /// face incident to halfedge
+        Face_index      face_;
+        /// vertex the halfedge points to
+        Vertex_index    vertex_;
+        /// next halfedge within a face (or along a border)
+        Halfedge_index  next_halfedge_;
+        /// previous halfedge within a face (or along a border)
+        Halfedge_index  prev_halfedge_;
+    };
+
+
+    /// This type stores the face connectivity
+    /// \sa `Vertex_connectivity`, `Halfedge_connectivity`
+    struct Face_connectivity
+    {
+        /// a halfedge that is part of the face
+        Halfedge_index  halfedge_;
+    };
+
+private: //------------------------------------------------------ iterator types
+    template<typename Index_>
+    class Index_iterator
+      : public boost::iterator_facade< Index_iterator<Index_>,
+                                       Index_,
+                                       std::bidirectional_iterator_tag
+                                       >
+    {
+        typedef boost::iterator_facade< Index_iterator<Index_>,
+                                        Index_,
+                                        std::bidirectional_iterator_tag
+                                        > Facade;
+    public:
+        Index_iterator() : hnd_(), mesh_(NULL) {}
+        Index_iterator(const Index_& h, const Surface_mesh* m)
+          : hnd_(h), mesh_(m) {
+          if (mesh_ && mesh_->has_garbage()){
+              while (mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) ++hnd_;
+          }
+        }
+    private:
+        friend class boost::iterator_core_access;
+        void increment()
+        {
+            ++hnd_;
+            CGAL_assertion(mesh_ != NULL);
+
+            if(mesh_->has_garbage())
+              while ( mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) ++hnd_;
+        }
+  
+        void decrement()
+        {
+            --hnd_;
+            CGAL_assertion(mesh_ != NULL);
+            if(mesh_->has_garbage())
+               while ( mesh_->has_valid_index(hnd_) && mesh_->is_removed(hnd_)) --hnd_;
+        }
+
+        bool equal(const Index_iterator& other) const
+        {
+            return this->hnd_ == other.hnd_;
+        }
+
+        Index_& dereference() const { return const_cast<Index_&>(hnd_); }
+
+        Index_ hnd_;
+        const Surface_mesh* mesh_;
+
+    };
+public:
+    /// \name Range Types
+    ///
+    /// Each range `R` in this section has a nested type `R::iterator`, 
+    /// is convertible to `std:pair<R::iterator,R::iterator>`, so that one can use `boost::tie()`,
+    /// and can be used with `BOOST_FOREACH()`, as well as with the C++11 range based for-loop.
+
+    ///@{
+
+#ifndef DOXYGEN_RUNNING
+    typedef Index_iterator<Vertex_index> Vertex_iterator;
+#endif
+
+    /// \brief The range over all vertex indices.
+    ///
+    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Vertex_index`.
+    /// \sa `vertices()`
+    /// \sa `Halfedge_range`, `Edge_range`, `Face_range`
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Vertex_range;
+#else
+    typedef Iterator_range<Vertex_iterator> Vertex_range;
+#endif
+
+#ifndef DOXYGEN_RUNNING
+    typedef Index_iterator<Halfedge_index> Halfedge_iterator;
+#endif
+
+    /// \brief The range over all halfedge indices.
+    ///
+    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Halfedge_index`.
+    /// \sa `halfedges()`
+    /// \sa `Vertex_range`, `Edge_range`, `Face_range`
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Halfedge_range;
+#else
+    typedef Iterator_range<Halfedge_iterator> Halfedge_range;
+#endif
+
+#ifndef DOXYGEN_RUNNING
+    typedef Index_iterator<Edge_index> Edge_iterator;
+#endif
+
+    /// \brief The range over all edge indices.
+    ///
+    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Edge_index`.
+    /// \sa `edges()`
+    /// \sa `Halfedge_range`, `Vertex_range`, `Face_range`
+#ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Edge_range;
+#else
+    typedef Iterator_range<Edge_iterator> Edge_range;
+#endif
+
+
+#ifndef DOXYGEN_RUNNING
+    typedef Index_iterator<Face_index> Face_iterator;
+#endif
+    /// \brief The range over all face indices.
+    ///
+    /// A model of <a href="http://www.boost.org/libs/range/doc/html/range/concepts/bidirectional_range.html">BidirectionalRange</a> with value type `Face_index`.
+    /// \sa `faces()`
+    /// \sa `Vertex_range`, `Halfedge_range`, `Edge_range`
+ #ifdef DOXYGEN_RUNNING
+    typedef unspecified_type Face_range;
+#else
+   typedef Iterator_range<Face_iterator> Face_range;
+#endif
+
+#ifndef DOXYGEN_RUNNING 
+
+  typedef CGAL::Vertex_around_target_iterator<Surface_mesh> Vertex_around_target_iterator;
+  typedef Iterator_range<Vertex_around_target_iterator> Vertex_around_target_range;
+
+  typedef CGAL::Halfedge_around_target_iterator<Surface_mesh>  Halfedge_around_target_iterator;
+  typedef Iterator_range<Halfedge_around_target_iterator> Halfedge_around_target_range;
+
+  typedef CGAL::Face_around_target_iterator<Surface_mesh>  Face_around_target_iterator;
+  typedef Iterator_range<Face_around_target_iterator> Face_around_target_range;
+
+  typedef CGAL::Vertex_around_face_iterator<Surface_mesh>  Vertex_around_face_iterator;
+  typedef Iterator_range<Vertex_around_face_iterator> Vertex_around_face_range;
+
+  typedef CGAL::Halfedge_around_face_iterator<Surface_mesh>  Halfedge_around_face_iterator;
+  typedef Iterator_range<Halfedge_around_face_iterator> Halfedge_around_face_range;
+
+  typedef CGAL::Face_around_face_iterator<Surface_mesh>  Face_around_face_iterator;
+  typedef Iterator_range<Face_around_face_iterator> Face_around_face_range;
+#endif
+
+    /// @cond CGAL_BEGIN_END
+    /// Start iterator for vertices.
+    Vertex_iterator vertices_begin() const
+    {
+        return Vertex_iterator(Vertex_index(0), this);
+    }
+
+    /// End iterator for vertices.
+    Vertex_iterator vertices_end() const
+    {
+        return Vertex_iterator(Vertex_index(num_vertices()), this);
+    }
+    /// @endcond
+
+
+    /// returns the iterator range of the vertices of the mesh.
+    Vertex_range vertices() const {
+      return make_range(vertices_begin(), vertices_end());
+    }
+
+
+    /// @cond CGAL_BEGIN_END
+    /// Start iterator for halfedges.
+    Halfedge_iterator halfedges_begin() const
+    {
+        return Halfedge_iterator(Halfedge_index(0), this);
+    }
+
+    /// End iterator for halfedges.
+    Halfedge_iterator halfedges_end() const
+    {
+        return Halfedge_iterator(Halfedge_index(num_halfedges()), this);
+    }
+    /// @endcond
+
+
+    /// returns the iterator range of the halfedges of the mesh.
+    Halfedge_range halfedges() const {
+      return make_range(halfedges_begin(), halfedges_end());
+    }
+
+
+    /// @cond CGAL_BEGIN_END
+    /// Start iterator for edges.
+    Edge_iterator edges_begin() const
+    {
+        return Edge_iterator(Edge_index(0), this);
+    }
+
+    /// End iterator for edges.
+    Edge_iterator edges_end() const
+    {
+        return Edge_iterator(Edge_index(num_edges()), this);
+    }
+    /// @endcond
+
+
+    /// returns the iterator range of the edges of the mesh.
+    Edge_range edges() const
+    {
+        return make_range(edges_begin(), edges_end());
+    }
+
+
+    /// @cond CGAL_BEGIN_END
+    /// Start iterator for faces.
+    Face_iterator faces_begin() const
+    {
+        return Face_iterator(Face_index(0), this);
+    }
+
+    /// End iterator for faces.
+    Face_iterator faces_end() const
+    {
+        return Face_iterator(Face_index(num_faces()), this);
+    }
+    /// @endcond
+
+    /// returns the iterator range of the faces of the mesh.
+    Face_range faces() const {
+      return make_range(faces_begin(), faces_end());
+    }
+
+#ifndef DOXYGEN_RUNNING
+    /// returns the iterator range for vertices around vertex `target(h)`, starting at `source(h)`.
+    Vertex_around_target_range vertices_around_target(Halfedge_index h) const
+    {
+      return CGAL::vertices_around_target(h,*this);
+    }
+
+    /// returns the iterator range for incoming halfedges around vertex `target(h)`, starting at `h`.
+    Halfedge_around_target_range halfedges_around_target(Halfedge_index h) const
+    {
+      return CGAL::halfedges_around_target(h,*this);
+    }
+
+    /// returns the iterator range for faces around vertex `target(h)`, starting at `face(h)`.
+    Face_around_target_range faces_around_target(Halfedge_index h) const
+    {
+      return CGAL::faces_around_target(h,*this);
+    }
+
+    /// returns the iterator range for vertices around face `face(h)`, starting at `target(h)`.
+    Vertex_around_face_range vertices_around_face(Halfedge_index h) const
+     {
+       return CGAL::vertices_around_face(h,*this);
+     }
+
+    /// returns the iterator range for halfedges around face `face(h)`, starting at `h`.
+    Halfedge_around_face_range halfedges_around_face(Halfedge_index h) const
+    {
+      return CGAL::halfedges_around_face(h,*this);
+    }
+
+    /// returns the iterator range for halfedges around face `face(h)`, starting at `h`.
+    Face_around_face_range faces_around_face(Halfedge_index h) const
+    {
+       return CGAL::faces_around_face(h,*this);
+    }
+
+#endif
+
+    ///@}
+
+
+public: 
+
+#ifndef DOXYGEN_RUNNING
+    /// \name Circulator Types
+    ///
+    /// The following circulators enable to iterate through the elements around a face or vertex.
+    /// As explained in the \ref SurfaceMeshOrientation "User Manual", we can speak of a  
+    /// *clockwise* or *counterclockwise*
+    /// traversal, by looking at the surface from the right side.  
+    ///@{
+
+    /// \brief This class circulates clockwise through all 
+    /// one-ring neighbors of a vertex. 
+    ///  A model of `BidirectionalCirculator` with value type `Vertex_index`.
+    /// \sa `Halfedge_around_target_circulator`, `Face_around_target_circulator`
+
+  typedef CGAL::Vertex_around_target_circulator<Surface_mesh> Vertex_around_target_circulator;
+
+
+
+    /// \brief This class circulates clockwise through all incident faces of a vertex.
+    ///  A model of `BidirectionalCirculator` with value type `Face_index`.
+    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
+
+  typedef CGAL::Face_around_target_circulator<Surface_mesh> Face_around_target_circulator;
+
+
+    /// \brief This class circulates clockwise through all halfedges around a vertex that have this vertex as target.
+    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
+    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
+
+  typedef CGAL::Halfedge_around_target_circulator<Surface_mesh> Halfedge_around_target_circulator;
+
+
+    /// \brief This class circulates clockwise through all halfedges around a vertex that have this vertex as source.
+    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
+    /// \sa `Vertex_around_target_circulator`, `Halfedge_around_target_circulator`
+
+  typedef CGAL::Halfedge_around_source_circulator<Surface_mesh> Halfedge_around_source_circulator;
+
+    /// \brief This class circulates counterclockwise through all vertices around a face.
+    ///  A model of `BidirectionalCirculator` with value type `Vertex_index`.
+
+  typedef  CGAL::Vertex_around_face_circulator<Surface_mesh> Vertex_around_face_circulator;
+
+
+    /// \brief This class circulates counterclockwise through all halfedges around a face.
+    ///  A model of `BidirectionalCirculator` with value type `Halfedge_index`.
+
+  typedef  CGAL::Halfedge_around_face_circulator<Surface_mesh> Halfedge_around_face_circulator;
+
+   /// \brief This class circulates counterclockwise through all faces around a face.
+   ///  A model of `BidirectionalCirculator` with value type `Face_index`.
+   ///  Note that the face index is the same after `operator++`, if the neighboring faces share 
+   ///  several halfedges.
+
+  typedef  CGAL::Face_around_face_circulator<Surface_mesh> Face_around_face_circulator;
+  /// @}
+#endif
+
+  /// @cond CGAL_DOCUMENT_INTERNALS
+  // typedefs which make it easier to write the partial specialisation of boost::graph_traits
+
+  typedef Vertex_index   vertex_index;
+  typedef P                   vertex_property_type;
+  typedef Halfedge_index halfedge_index;
+  typedef Edge_index     edge_index;
+  typedef Face_index     face_index;
+
+  typedef Vertex_iterator     vertex_iterator;
+  typedef Halfedge_iterator   halfedge_iterator;
+  typedef Edge_iterator       edge_iterator;
+  typedef Face_iterator      face_iterator;
+  typedef CGAL::Out_edge_iterator<Self>     out_edge_iterator;
+
+  typedef boost::undirected_tag             directed_category;
+  typedef boost::disallow_parallel_edge_tag edge_parallel_category; 
+
+  struct traversal_category : public virtual boost::bidirectional_graph_tag,
+                              public virtual boost::vertex_list_graph_tag,
+                              public virtual boost::edge_list_graph_tag
+  {};
+
+  typedef size_type vertices_size_type;
+  typedef size_type halfedges_size_type;
+  typedef size_type edges_size_type;
+  typedef size_type faces_size_type;
+  typedef size_type degree_size_type;
+
+ /// @endcond
+public:
+
+    /// \name Construction, Destruction, Assignment
+    ///
+    ///  Copy constructors as well as assignment do also copy simplices marked as removed.
+    ///@{
+
+    /// %Default constructor.
+    Surface_mesh();
+
+    /// Copy constructor: copies `rhs` to `*this`. Performs a deep copy of all properties.
+    Surface_mesh(const Surface_mesh& rhs) { *this = rhs; }
+
+    /// assigns `rhs` to `*this`. Performs a deep copy of all properties.
+    Surface_mesh& operator=(const Surface_mesh& rhs);
+
+    /// assigns `rhs` to `*this`. Does not copy custom properties.
+    Surface_mesh& assign(const Surface_mesh& rhs);
+
+    ///@}
+
+public:
+
+    /// \name Adding Vertices, Edges, and Faces
+    ///@{
+
+   /// adds a new vertex, and resizes vertex properties if necessary.
+    Vertex_index add_vertex()
+    {
+      size_type inf = -1;
+      if(vertices_freelist_ != inf){
+        size_type idx = vertices_freelist_;
+        vertices_freelist_ = (size_type)vconn_[Vertex_index(vertices_freelist_)].halfedge_;
+        --removed_vertices_;
+        vremoved_[Vertex_index(idx)] = false;
+        return Vertex_index(idx);
+      } else {
+        vprops_.push_back();
+        return Vertex_index(num_vertices()-1);
+      }
+    }
+
+    /// adds a new vertex, resizes vertex properties if necessary,
+    /// and sets the \em point property to `p`.
+    /// \note Several vertices may have the same point property.
+    Vertex_index add_vertex(const Point& p) 
+    {
+        Vertex_index v = add_vertex();
+        vpoint_[v] = p;
+        return v;
+    }
+
+
+
+public:
+
+    /// adds a new edge, and resizes edge and halfedge properties if necessary.
+    Halfedge_index add_edge()
+    {
+      Halfedge_index h0, h1;
+      size_type inf = -1;
+      if(edges_freelist_ != inf){
+        size_type idx = edges_freelist_;
+        edges_freelist_ = (size_type)hconn_[Halfedge_index(edges_freelist_)].next_halfedge_;
+        --removed_edges_;
+        eremoved_[Edge_index(Halfedge_index(idx))] = false;
+        return Halfedge_index(idx);
+      } else {
+        eprops_.push_back();
+        hprops_.push_back();
+        hprops_.push_back();
+
+        return Halfedge_index(num_halfedges()-2);
+      }
+    }
+
+    /// adds two opposite halfedges, and resizes edge and halfedge properties if necessary.
+    /// Sets the targets of the halfedge to the given vertices, but does not modify the halfedge
+    /// associated to the vertices.
+    /// \note The function does not check whether there is already an edge between the vertices.
+    /// \returns the halfedge with `v1` as target
+
+    Halfedge_index add_edge(Vertex_index v0, Vertex_index v1)
+    {
+        CGAL_assertion(v0 != v1);
+        Halfedge_index h = add_edge();
+
+        set_target(h, v1);
+        set_target(opposite(h), v0);
+
+        return h;
+    }
+
+    /// adds a new face, and resizes face properties if necessary.
+    Face_index add_face()
+    {
+      size_type inf = -1;
+      if(faces_freelist_ != inf){
+        size_type idx = faces_freelist_;
+        faces_freelist_ = (size_type)fconn_[Face_index(faces_freelist_)].halfedge_;
+        --removed_faces_;
+        fremoved_[Face_index(idx)] = false;
+        return Face_index(idx);
+      } else {
+        fprops_.push_back();
+        return Face_index(num_faces()-1);
+      }
+    }
+
+    /// if possible, adds a new face with vertices from a range with value type `Vertex_index`.
+    /// The function adds halfedges between successive vertices if they are not yet indicent to halfedges,
+    /// or updates the connectivity of halfedges already in place. 
+    /// Resizes halfedge, edge, and face properties if necessary.
+    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
+    template <typename Range>
+    Face_index add_face(const Range& vertices);
+
+
+    /// adds a new triangle connecting vertices `v0`, `v1`, `v2`.
+    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
+    Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2)
+    {
+        boost::array<Vertex_index, 3> 
+            v = {{v0, v1, v2}};
+        return add_face(v);
+    }
+
+    /// adds a new quad connecting vertices `v0`, `v1`, `v2`, `v3`.
+    /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added.
+    Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2, Vertex_index v3)
+    {
+        boost::array<Vertex_index, 4> 
+            v = {{v0, v1, v2, v3}};
+        return add_face(v);
+    }
+
+    ///@}
+
+
+ 
+    /// \name Low-Level Removal Functions 
+    ///
+    /// Although the elements are only marked as removed
+    /// their connectivity and properties should not be used.
+    ///
+    /// \warning Functions in this group do not adjust any of
+    /// connected elements and usually leave the surface mesh in an
+    /// invalid state.
+    /// 
+    ///
+    /// @{
+
+    /// removes vertex `v` from the halfedge data structure without
+    /// adjusting anything.
+    void remove_vertex(Vertex_index v)
+    {
+        vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
+        vremoved_[v] = true; ++removed_vertices_; garbage_ = true;
+        vconn_[v].halfedge_ = Halfedge_index(vertices_freelist_);
+        vertices_freelist_ = (size_type)v;
+    }
+
+    /// removes the two halfedges corresponding to `e` from the halfedge data structure without
+    /// adjusting anything.
+    void remove_edge(Edge_index e)
+    {
+        eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
+        eremoved_[e] = true; ++removed_edges_; garbage_ = true;
+        hconn_[Halfedge_index((size_type)e << 1)].next_halfedge_ = Halfedge_index(edges_freelist_ );
+        edges_freelist_ = ((size_type)e << 1);
+    }
+
+    /// removes  face `f` from the halfedge data structure without
+    /// adjusting anything.
+
+    void remove_face(Face_index f)
+    {
+        fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
+        fremoved_[f] = true; ++removed_faces_; garbage_ = true;
+        fconn_[f].halfedge_ = Halfedge_index(faces_freelist_);
+        faces_freelist_ = (size_type)f;
+    }
+
+
+    ///@}
+
+
+    /// \name Memory Management
+    ///
+    /// Functions to check the number of elements, the amount of space
+    /// allocated for elements, and to clear the structure.
+    ///@{
+
+  /// returns the number of vertices in the mesh.
+  size_type number_of_vertices() const
+  {
+    return num_vertices() - number_of_removed_vertices();
+  }
+ 
+  /// returns the number of halfedges in the mesh.
+  size_type number_of_halfedges() const
+  {
+    return num_halfedges() - number_of_removed_halfedges();
+  }
+
+  /// returns the number of edges in the mesh.
+  size_type number_of_edges() const
+  {
+    return num_edges() - number_of_removed_edges();
+  }
+
+  /// returns the number of faces in the mesh.
+  size_type number_of_faces() const
+  {
+    return num_faces() - number_of_removed_faces();
+  }
+
+    /// returns `true` iff the mesh is empty, i.e., has no vertices, halfedges and faces.
+    bool is_empty() const
+  {
+    return ( num_vertices() == number_of_removed_vertices()
+             && num_halfedges() == number_of_removed_halfedges()
+             && num_faces() == number_of_removed_faces());
+  }
+
+    /// removes all vertices, halfedge, edges and faces. Collects garbage and clears all properties.
+    void clear();
+
+ 
+    /// reserves space for vertices, halfedges, edges, faces, and their currently
+    /// associated properties.
+    void reserve(size_type nvertices,
+                 size_type nedges,
+                 size_type nfaces )
+    {
+        vprops_.reserve(nvertices);
+        hprops_.reserve(2*nedges);
+        eprops_.reserve(nedges);
+        fprops_.reserve(nfaces);
+    }
+
+      void resize(size_type nvertices,
+                 size_type nedges,
+                 size_type nfaces )
+    {
+        vprops_.resize(nvertices);
+        hprops_.resize(2*nedges);
+        eprops_.resize(nedges);
+        fprops_.resize(nfaces);
+    }
+  
+  bool join(const Surface_mesh& other)
+  {
+    size_type nv = num_vertices(), nh = num_halfedges(), nf = num_faces();
+    resize(num_vertices()+  other.num_vertices(),
+            num_edges()+  other.num_edges(),
+            num_faces()+  other.num_faces());
+
+    vprops_.transfer(other.vprops_);
+    hprops_.transfer(other.hprops_);
+    fprops_.transfer(other.fprops_);
+    eprops_.transfer(other.eprops_);
+
+    for(size_type i = nv; i < nv+other.num_vertices(); i++){
+      Vertex_index vi(i);
+      if(vconn_[vi].halfedge_ != null_halfedge()){
+        vconn_[vi].halfedge_ = Halfedge_index(size_type(vconn_[vi].halfedge_)+nh);
+      }
+    }
+    for(size_type i = nf; i < nf+other.num_faces(); i++){
+      Face_index fi(i);
+      if(fconn_[fi].halfedge_ != null_halfedge()){
+        fconn_[fi].halfedge_ = Halfedge_index(size_type(fconn_[fi].halfedge_)+nh);
+      }
+    }
+    for(size_type i = nh; i < nh+other.num_halfedges(); i++){
+      Halfedge_index hi(i);
+      if(hconn_[hi].face_ != null_face()){
+        hconn_[hi].face_ = Face_index(size_type(hconn_[hi].face_)+nf);
+      }
+      if( hconn_[hi].vertex_ != null_vertex()){
+        hconn_[hi].vertex_ = Vertex_index(size_type(hconn_[hi].vertex_)+nv);
+      }
+      if(hconn_[hi].next_halfedge_ != null_halfedge()){
+        hconn_[hi].next_halfedge_ = Halfedge_index(size_type(hconn_[hi].next_halfedge_)+nh);
+      }
+      if(hconn_[hi].prev_halfedge_ != null_halfedge()){
+        hconn_[hi].prev_halfedge_ = Halfedge_index(size_type(hconn_[hi].prev_halfedge_)+nh);
+      }
+    }
+    size_type nil = -1;
+    if(other.vertices_freelist_ != nil){
+      if(vertices_freelist_ != nil){
+        Vertex_index vi(nv+other.vertices_freelist_);
+        Halfedge_index inf(-1);
+        while(vconn_[vi].halfedge_ != inf){
+          vi = Vertex_index(size_type(vconn_[vi].halfedge_));
+        }
+        vconn_[vi].halfedge_ = Halfedge_index(vertices_freelist_);
+      }
+      vertices_freelist_ = nv + other.vertices_freelist_; 
+    }
+    if(other.faces_freelist_ != nil){
+      if(faces_freelist_ != nil){
+        Face_index fi(nf+other.faces_freelist_);
+        Halfedge_index inf(-1);
+        while(fconn_[fi].halfedge_ != inf){
+          fi = Face_index(size_type(fconn_[fi].halfedge_));
+        }
+        fconn_[fi].halfedge_ = Halfedge_index(faces_freelist_);
+      }
+      faces_freelist_ = nf + other.faces_freelist_; 
+    }
+    if(other.edges_freelist_ != nil){
+      if(edges_freelist_ != nil){
+        Halfedge_index hi((nh>>1)+other.edges_freelist_);
+        Halfedge_index inf(-1);
+        while(hconn_[hi].next_halfedge_ != inf){
+          hi = hconn_[hi].next_halfedge_;
+        }
+        hconn_[hi].next_halfedge_ = Halfedge_index(edges_freelist_);
+      }
+      edges_freelist_ = (nh>>1) + other.edges_freelist_; 
+    }
+    garbage_ = garbage_ || other.garbage_;
+    removed_vertices_ += other.removed_vertices_;
+    removed_edges_ += other.removed_edges_;
+    removed_faces_ += other.removed_faces_;
+    return true;
+  }
+
+    ///@}
+
+    
+    /// \name Garbage Collection
+    ///
+    /// While removing elements only marks them as removed
+    /// garbage collection really removes them.
+    /// The API in this section allows to check whether 
+    /// an element is removed, to get the number of
+    /// removed elements, and to collect garbage.
+    /// The number of elements together with the number of  removed elements is
+    /// an upperbound on the index, and is needed
+    /// by algorithms that temporarily store a 
+    /// property in a vector of the appropriate size.
+    /// Note however that by garbage collecting elements get new indices.
+    /// In case you store indices in an auxiliary data structure
+    /// or in a property these indices are potentially no longer 
+    /// refering to the right elements. 
+
+
+    ///@{
+#ifndef DOXYGEN_RUNNING
+   /// returns the number of used and removed vertices in the mesh.
+    size_type num_vertices() const { return (size_type) vprops_.size(); }
+
+    /// returns the number of used and removed halfedges in the mesh.
+    size_type num_halfedges() const { return (size_type) hprops_.size(); }
+
+    /// returns the number of used and removed edges in the mesh.
+    size_type num_edges() const { return (size_type) eprops_.size(); }
+
+    /// returns the number of used and removed faces in the mesh.
+    size_type num_faces() const { return (size_type) fprops_.size(); }
+
+#endif
+
+    /// returns the number of vertices in the mesh which are marked removed.
+    size_type number_of_removed_vertices() const { return removed_vertices_; }
+
+    /// returns the number of halfedges in the mesh which are marked removed.
+    size_type number_of_removed_halfedges() const { return 2*removed_edges_; }
+
+    /// returns the number of edges in the mesh which are marked removed.
+    size_type number_of_removed_edges() const { return removed_edges_; }
+
+    /// returns the number offaces in the mesh which are marked removed.
+    size_type number_of_removed_faces() const { return removed_faces_; }
+
+
+
+    /// returns whether vertex `v` is marked removed.
+    /// \sa `collect_garbage()`
+    bool is_removed(Vertex_index v) const
+    {
+        return vremoved_[v];
+    }
+    /// returns whether halfedge `h` is marked removed.
+    /// \sa `collect_garbage()`
+    bool is_removed(Halfedge_index h) const
+    {
+        return eremoved_[edge(h)];
+    }
+    /// returns whether edge `e` is marked removed.
+    /// \sa `collect_garbage()`
+    bool is_removed(Edge_index e) const
+    {
+        return eremoved_[e];
+    }
+    /// returns whether face `f` is marked removed.
+    /// \sa `collect_garbage()`
+    bool is_removed(Face_index f) const
+    {
+        return fremoved_[f];
+    }
+
+    /// checks if any vertices, halfedges, edges, or faces are marked as removed.
+    /// \sa collect_garbage
+    bool has_garbage() const { return garbage_; }
+
+    /// really removes vertices, halfedges, edges, and faces which are marked removed.
+    /// \sa `has_garbage()`
+    /// \attention By garbage collecting elements get new indices.
+    /// In case you store indices in an auxiliary data structure
+    /// or in a property these indices are potentially no longer 
+    /// refering to the right elements. 
+    void collect_garbage();
+
+
+    /// @cond CGAL_DOCUMENT_INTERNALS
+    /// removes unused memory from vectors. This shrinks the storage
+    /// of all properties to the minimal required size.
+    /// \attention Invalidates all existing references to properties.
+
+    void shrink_to_fit()
+    {
+        vprops_.shrink_to_fit();
+        hprops_.shrink_to_fit();
+        eprops_.shrink_to_fit();
+        fprops_.shrink_to_fit();
+    }
+    /// @endcond
+
+    ///@}
+
+    /// @cond CGAL_DOCUMENT_INTERNALS
+    ///
+    /// \name Simple Validity Checks
+    ///
+    /// Functions in this group check if the index is valid, that is between
+    /// `0` and the currently allocated maximum amount of the
+    /// elements. They do not check if an element is marked as removed.
+    ///@{
+
+    /// returns whether the index of vertex `v` is valid, that is within the current array bounds.
+    bool has_valid_index(Vertex_index v) const
+    {
+      return ((size_type)v < num_vertices());
+    } 
+
+    /// returns whether the index of halfedge `h` is valid, that is within the current array bounds.
+    bool has_valid_index(Halfedge_index h) const
+    {
+      return ((size_type)h < num_halfedges());
+    }
+    /// returns whether the index of edge `e` is valid, that is within the current array bounds.
+    bool has_valid_index(Edge_index e) const
+    {
+      return ((size_type)e < num_edges());
+    }
+    /// returns whether the index of face `f` is valid, that is within the current array bounds.
+    bool has_valid_index(Face_index f) const
+    {
+        return ((size_type)f < num_faces());
+    }
+
+    /// @}
+    /// @endcond
+    
+    /// \name Validity Checks
+    ///
+    /// Functions in this group perform checks for structural
+    /// consistency of a complete surface mesh, or an individual element. 
+    /// They are expensive and should only be used in debug configurations.
+
+    ///@{
+
+    /// perform an expensive validity check on the data structure and
+    /// print found errors to `std::cerr` when `verbose == true`.
+  bool is_valid(bool verbose = true) const
+    {
+        bool valid = true;
+        size_type vcount = 0, hcount = 0, fcount = 0;
+        for(Halfedge_iterator it = halfedges_begin(); it != halfedges_end(); ++it) { 
+            ++hcount;
+            valid = valid && next(*it).is_valid();
+            valid = valid && opposite(*it).is_valid();
+            if(!valid) {
+                if (verbose)
+                  std::cerr << "Integrity of halfedge " << *it << " corrupted."  << std::endl;
+                break;
+            }
+
+            valid = valid && (opposite(*it) != *it);
+            valid = valid && (opposite(opposite(*it)) == *it);
+            if(!valid) {
+              if (verbose)
+                std::cerr << "Integrity of opposite halfedge of " << *it << " corrupted."  << std::endl;
+              break;
+            }
+
+            valid = valid && (next(prev(*it)) == *it);
+            if(!valid) {
+                if (verbose)
+                  std::cerr << "Integrity of previous halfedge of " << *it << " corrupted."  << std::endl;
+                break;
+            }
+
+            valid = valid && (prev(next(*it)) == *it);
+            if(!valid) {
+                if (verbose)
+                  std::cerr << "Integrity of next halfedge of " << *it << " corrupted."  << std::endl;
+                break;
+            }
+
+            valid = valid && target(*it).is_valid();
+            if(!valid) {
+                if (verbose)
+                  std::cerr << "Integrity of vertex of halfedge " << *it << " corrupted."  << std::endl;
+                break;
+            }
+
+            valid = valid && (target(*it) == target(opposite(next(*it))));
+            if(!valid) {
+                if (verbose)
+                  std::cerr << "Halfedge vertex of next opposite is not the same for " << *it << "."  << std::endl;
+                break;
+            }
+        }
+
+        for(Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) {
+          ++vcount;
+            if(halfedge(*it).is_valid()) {
+                // not an isolated vertex
+                valid = valid && (target(halfedge(*it)) == *it);
+                if(!valid) {
+                    if (verbose)
+                      std::cerr << "Halfedge of " << *it << " is not an incoming halfedge." << std::endl;
+                    break;
+                }
+            }
+        }
+        for(Face_iterator it = faces_begin(); it != faces_end(); ++it) {
+          ++fcount;
+        }
+        
+        valid = valid && (vcount == number_of_vertices());
+        if(!valid && verbose){
+          std::cerr << "#vertices: iterated: " << vcount << " vs number_of_vertices(): " << number_of_vertices()<< std::endl;
+        }
+
+        valid = valid && (hcount == number_of_halfedges());
+        if(!valid && verbose){
+          std::cerr << "#halfedges: iterated: " << hcount << " vs number_of_halfedges(): " << number_of_halfedges()<< std::endl;
+        }
+
+        valid = valid && (fcount == number_of_faces());
+        if(!valid && verbose){
+          std::cerr << "#faces: iterated: " << fcount << " vs number_of_faces(): " << number_of_faces()<< std::endl;
+        }
+        return valid;
+    }
+
+    /// performs a validity check on a single vertex.
+    bool is_valid(Vertex_index v) const {
+        Halfedge_index h = vconn_[v].halfedge_;
+        if(h!= null_halfedge() && (!has_valid_index(h) || is_removed(h))) {
+          std::cerr << "Vertex connectivity halfedge error in " << (size_type)v
+                    << " with " << (size_type)h << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+    /// performs a validity check on a single halfedge.
+    bool is_valid(Halfedge_index h) const {
+        Face_index f = hconn_[h].face_;
+        Vertex_index v = hconn_[h].vertex_;
+        Halfedge_index hn = hconn_[h].next_halfedge_;
+        Halfedge_index hp = hconn_[h].prev_halfedge_;
+
+        bool valid = true;
+        // don't validate the face if this is a border halfedge
+        if(!is_border(h)) {
+            if(!has_valid_index(f) || is_removed(f)) {
+                std::cerr << "Halfedge connectivity Face "
+                          << (!has_valid_index(f) ? "invalid" : "removed")
+                          << " in " << (size_type)h << std::endl;
+                valid = false;
+            }
+        }
+
+        if(!has_valid_index(v) || is_removed(v)) {
+            std::cerr << "Halfedge connectivity Vertex "
+                      << (!has_valid_index(v) ? "invalid" : "removed")
+                      << " in " << (size_type)h << std::endl;
+            valid = false;
+        }
+
+        if(!has_valid_index(hn) || is_removed(hn)) {
+            std::cerr << "Halfedge connectivity hnext "
+                      << (!has_valid_index(hn) ? "invalid" : "removed")
+                      << " in " << (size_type)h << std::endl;
+            valid = false;
+        }
+        if(!has_valid_index(hp) || is_removed(hp)) {
+            std::cerr << "Halfedge connectivity hprev "
+                      << (!has_valid_index(hp) ? "invalid" : "removed")
+                      << " in " << (size_type)h << std::endl;
+            valid = false;
+        }
+        return valid;
+    }
+
+
+    /// performs a validity check on a single ede.
+    bool is_valid(Edge_index e) const {
+      Halfedge_index h = halfedge(e);
+      return is_valid(h) && is_valid(opposite(h));
+    }
+
+
+    /// performs a validity check on a single face.
+    bool is_valid(Face_index f) const {
+        Halfedge_index h = fconn_[f].halfedge_;
+        if(!has_valid_index(h) || is_removed(h)) {
+          std::cerr << "Face connectivity halfedge error in " << (size_type)f
+                      << " with " << (size_type)h << std::endl;
+            return false;
+        }
+        return true;
+    }
+
+    ///@}
+
+
+
+    /// \name Low-Level Connectivity
+    ///@{
+
+    /// returns the vertex the halfedge `h` points to.
+    Vertex_index target(Halfedge_index h) const
+    {
+        return hconn_[h].vertex_;
+    }
+
+    /// sets the vertex the halfedge `h` points to to `v`.
+    void set_target(Halfedge_index h, Vertex_index v)
+    {
+        hconn_[h].vertex_ = v;
+    }
+
+    /// returns the face incident to halfedge `h`.
+    Face_index face(Halfedge_index h) const
+    {
+        return hconn_[h].face_;
+    }
+
+    /// sets the incident face to halfedge `h` to `f`.
+    void set_face(Halfedge_index h, Face_index f)
+    {
+        hconn_[h].face_ = f;
+    }
+
+    /// returns the next halfedge within the incident face.
+    Halfedge_index next(Halfedge_index h) const
+    {
+        return hconn_[h].next_halfedge_;
+    }
+
+    /// returns the previous halfedge within the incident face.
+    Halfedge_index prev(Halfedge_index h) const
+    {
+        return hconn_[h].prev_halfedge_;
+    }
+
+    /// @cond CGAL_DOCUMENT_INTERNALS
+    // sets the next halfedge of `h` within the face to `nh`.
+    void set_next_only(Halfedge_index h, Halfedge_index nh)
+    {
+      hconn_[h].next_halfedge_ = nh;
+    }
+
+    // sets previous halfedge of `h` to `nh`.
+    void set_prev_only(Halfedge_index h, Halfedge_index nh)
+    {
+      if(h != null_halfedge()){
+        hconn_[h].prev_halfedge_ = nh;
+      }
+    }
+    /// @endcond  
+
+    /// sets the next halfedge of `h` within the face to `nh` and
+    /// the previous halfedge of `nh` to `h`.
+    void set_next(Halfedge_index h, Halfedge_index nh)
+    {
+      set_next_only(h, nh);
+      set_prev_only(nh, h);
+    }
+
+    /// returns an incoming halfedge of vertex `v`.
+    /// If `v` is a border vertex this will be a border halfedge.
+    /// \invariant `target(halfedge(v)) == v`
+    Halfedge_index halfedge(Vertex_index v) const
+    {
+        return vconn_[v].halfedge_;
+    }
+
+    /// sets the incoming halfedge of vertex `v` to `h`.
+    void set_halfedge(Vertex_index v, Halfedge_index h)
+    {
+        vconn_[v].halfedge_ = h;
+    }
+
+
+    /// returns a halfedge of face `f`.
+    Halfedge_index halfedge(Face_index f) const
+    {
+        return fconn_[f].halfedge_;
+    }
+
+    /// sets the halfedge of face `f` to `h`.
+    void set_halfedge(Face_index f, Halfedge_index h)
+    {
+        fconn_[f].halfedge_ = h;
+    }
+
+    /// returns the opposite halfedge of `h`. Note that there is no function `set_opposite()`.
+    Halfedge_index opposite(Halfedge_index h) const
+    {
+        return Halfedge_index(((size_type)h & 1) ? (size_type)h-1 : (size_type)h+1);
+    }
+
+    ///@}
+
+    /// \name Low-Level Connectivity Convenience Functions
+    ///@{
+
+    /// returns the vertex the halfedge `h` emanates from.
+    Vertex_index source(Halfedge_index h) const
+    {
+        return target(opposite(h));
+    }
+
+    /// returns `opposite(next(h))`, that is the next halfedge \ref SurfaceMeshOrientation 
+    /// "clockwise" around the target vertex of `h`.
+    Halfedge_index next_around_target(Halfedge_index h) const
+    {
+        return opposite(next(h));
+    }
+
+    /// returns `prev(opposite(h))`, that is the previous halfedge \ref SurfaceMeshOrientation
+    /// "clockwise" around the target vertex of `h`.
+    Halfedge_index prev_around_target(Halfedge_index h) const
+    {
+        return prev(opposite(h));
+    }
+
+    /// returns `next(opposite(h))`, that is the next halfedge \ref SurfaceMeshOrientation 
+    /// "clockwise" around the source vertex of `h`.
+    Halfedge_index next_around_source(Halfedge_index h) const
+    {
+        return next(opposite(h));
+    }
+
+    /// returns `opposite(prev(h))`, that is the previous halfedge \ref SurfaceMeshOrientation
+    /// "clockwise" around the source vertex of `h`.
+    Halfedge_index prev_around_source(Halfedge_index h) const
+    {
+        return opposite(prev(h));
+    }
+
+    /// returns the i'th vertex of edge `e`, for `i=0` or `1`.
+    Vertex_index vertex(Edge_index e, unsigned int i) const
+    {
+        CGAL_assertion(i<=1);
+        return target(halfedge(e, i));
+    }
+
+    /// finds a halfedge between two vertices. Returns a default constructed
+    /// `Halfedge_index`, if  `source` and  `target` are not connected.
+    Halfedge_index halfedge(Vertex_index source, Vertex_index target) const;
+
+    ///@}
+
+
+    /// \name Switching between Halfedges and Edges
+    ///@{
+
+    /// returns the edge that contains halfedge `h` as one of its two halfedges.
+    Edge_index edge(Halfedge_index h) const
+    {
+        return Edge_index(h);
+    }
+
+    /// returns the halfedge corresponding to the edge `e`.
+    Halfedge_index halfedge(Edge_index e) const
+    {
+        return Halfedge_index(e.halfedge());
+    }
+
+    /// returns the i'th halfedge of edge `e`, for `i=0` or `1`.
+    Halfedge_index halfedge(Edge_index e, unsigned int i) const
+    {
+        CGAL_assertion(i<=1);
+        return Halfedge_index(((size_type)e << 1) + i);
+    }
+
+    ///@}
+
+
+    /// \name Degree Functions
+    ///@{
+
+    /// returns the number of incident halfedges of vertex `v`.
+    size_type degree(Vertex_index v) const;
+
+    /// returns the number of incident halfedges of face `f`.
+    size_type degree(Face_index f) const;
+
+    ///@}
+
+
+
+    /// \name Borders
+    ///
+    ///  A halfedge, or edge is on the border of a surface mesh
+    /// if it is incident to a `null_face()`.  A vertex is on a border
+    /// if it is incident to a border halfedge. While for a halfedge and
+    /// edge this is a constant time operation, for a vertex it means
+    /// to look at all incident halfedges.  If algorithms operating on a 
+    /// surface mesh maintain that the halfedge associated to a border vertex is
+    /// a border halfedge, this is a constant time operation too.  
+    /// This section provides functions to check if an element is on a 
+    /// border and to change the halfedge associated to a border vertex.
+    ///@{
+
+    /// returns whether `v` is a border vertex. 
+    /// \cgalAdvancedBegin
+    /// With the default value for
+    /// `check_all_incident_halfedges` the function iteratates over the incident halfedges.
+    /// With `check_all_incident_halfedges == false` the function returns `true`, if the incident
+    /// halfedge associated to vertex `v` is a border halfedge.
+    /// \cgalAdvancedEnd
+  bool is_border(Vertex_index v, bool check_all_incident_halfedges = true) const
+    {
+        Halfedge_index h(halfedge(v));
+        if (h == null_halfedge()){
+          return false;
+        }
+        if(check_all_incident_halfedges){
+          Halfedge_around_target_circulator hatc(h,*this), done(hatc);
+          do {
+            if(is_border(*hatc)){
+              return true;
+            }
+          }while(++hatc != done);
+          return false;
+        }
+        return (!(is_valid(h) && is_border(h)));
+    }
+
+    /// returns whether `h` is a border halfege, that is if its incident face is `sm.null_face()`.
+    bool is_border(Halfedge_index h) const
+    {
+        return !face(h).is_valid();
+    }
+
+
+    /// returns whether `e` is a border edge, i.e., if any 
+    /// of its two halfedges is a border halfedge.
+    bool is_border(Edge_index e) const
+    {
+      return is_border(e.halfedge()) || is_border(opposite(e.halfedge()));
+    }
+
+  /// iterates over the incident halfedges and sets the incident halfedge
+  /// associated to vertex `v` to a border halfedge and returns `true` if it exists.
+  bool set_vertex_halfedge_to_border_halfedge(Vertex_index v)
+  {
+    if(halfedge(v) == null_halfedge()){
+      return false;
+    }
+    Halfedge_around_target_circulator hatc(halfedge(v),*this), done(hatc);
+    do {
+      if(is_border(*hatc)){
+        set_halfedge(v,*hatc);
+        return true;
+      }
+    }while(++hatc != done);
+    return false;
+  }
+
+  /// applies `set_vertex_halfedge_to_border_halfedge(Vertex_index)` on all vertices 
+  /// around the face associated to `h`.
+  void set_vertex_halfedge_to_border_halfedge(Halfedge_index h)
+  {
+    if(is_border(h)){
+      Halfedge_around_face_circulator hafc(h,*this),done(hafc);
+      do {
+        set_halfedge(target(*hafc),*hafc);
+      }while(++hafc != done);
+    } else {
+       Vertex_around_face_circulator vafc(h,*this),done(vafc);
+      do {
+        set_vertex_halfedge_to_border_halfedge(*vafc);
+      }while(++vafc != done);
+    }
+  }
+
+  /// applies `set_vertex_halfedge_to_border_halfedge(Vertex_index)` on all vertices 
+  /// of the surface mesh.
+  void set_vertex_halfedge_to_border_halfedge()
+  {
+    BOOST_FOREACH(Halfedge_index h, halfedges()){
+      if(is_border(h)){
+          set_halfedge(target(h),h);
+        }
+    }
+  }
+
+
+    /// returns whether `v` is isolated, i.e., incident to `Surface_mesh::null_halfedge()`.
+    bool is_isolated(Vertex_index v) const
+    {
+        return !halfedge(v).is_valid();
+    }
+
+    ///@}
+
+
+private: //--------------------------------------------------- property handling
+
+  // Property_selector maps an index type to a property_container, the
+  // dummy is necessary to make it a partial specialization (full
+  // specializations are only allowed at namespace scope).
+  template<typename, bool = true>
+  struct Property_selector {};
+
+  template<bool dummy>
+  struct Property_selector<typename CGAL::Surface_mesh<P>::Vertex_index, dummy> {
+    CGAL::Surface_mesh<P>* m_;
+    Property_selector(CGAL::Surface_mesh<P>* m) : m_(m) {}
+    Property_container<typename CGAL::Surface_mesh<P>::Vertex_index>&
+    operator()() { return m_->vprops_; }
+  };
+  template<bool dummy>
+  struct Property_selector<typename CGAL::Surface_mesh<P>::Halfedge_index, dummy> {
+    CGAL::Surface_mesh<P>* m_;
+    Property_selector(CGAL::Surface_mesh<P>* m) : m_(m) {}
+    Property_container<typename CGAL::Surface_mesh<P>::Halfedge_index>&
+    operator()() { return m_->hprops_; }
+  };
+  template<bool dummy>
+  struct Property_selector<typename CGAL::Surface_mesh<P>::Edge_index, dummy> {
+    CGAL::Surface_mesh<P>* m_;
+    Property_selector(CGAL::Surface_mesh<P>* m) : m_(m) {}
+    Property_container<typename CGAL::Surface_mesh<P>::Edge_index>&
+    operator()() { return m_->eprops_; }
+  };
+  template<bool dummy>
+  struct Property_selector<typename CGAL::Surface_mesh<P>::Face_index, dummy> {
+    CGAL::Surface_mesh<P>* m_;
+    Property_selector(CGAL::Surface_mesh<P>* m) : m_(m) {}
+    Property_container<typename CGAL::Surface_mesh<P>::Face_index>&
+    operator()() { return m_->fprops_; }
+  };
+
+    public:
+ 
+
+ /*! \name Property Handling
+
+ A `Property_map<I,T>` allows to associate properties of type `T` to a vertex, halfdge, edge, or face index type I.
+ Properties can be added, and looked up with a string, and they can be removed at runtime.
+ The \em point property of type `P` is associated to the string "v:point". 
+
+    */
+    ///@{
+
+  /// Model of `LvaluePropertyMap` with `I` as key type and `T` as value type, where `I`
+  /// is either a vertex, halfedge, edge, or face index type.
+#ifdef DOXYGEN_RUNNING
+  template <class I, class T>
+  using Property_map = unspecified_type;
+
+#else
+
+
+#endif
+
+    /// adds a property map named `name` with value type `T` and default `t`
+    /// for index type `I`. Returns the property map together with a Boolean 
+    /// that is `true` if a new map was created. In case it already exists
+    /// the existing map together with `false` is returned.
+
+  
+    template<class I, class T>
+    std::pair<Property_map<I, T>, bool>
+    add_property_map(const std::string& name, const T t=T()) {
+      return Property_selector<I>(this)().template add<T>(name, t);
+    }
+
+ 
+    /// returns a property map named `name` with key type `I` and value type `T`, 
+    /// and a Boolean that is `true` if the property exists. 
+    /// In case it does not exist the Boolean is `false` and the behavior of
+    /// the property map is undefined.
+    template <class I, class T>
+    std::pair<Property_map<I, T>,bool> property_map(const std::string& name) const
+    {
+      return Property_selector<I>(const_cast<Surface_mesh*>(this))().template get<T>(name);
+    }
+
+
+    /// removes property map `p`. The memory allocated for that property map is
+    /// freed.
+    template<class I, class T>
+    void remove_property_map(Property_map<I, T>& p)
+    {
+      (Property_selector<I>(this)()).remove(p);
+    }
+
+    /// @cond CGAL_DOCUMENT_INTERNALS
+    /// returns the std::type_info of the value type of the
+    /// property identified by `name`.  `typeid(void)` if `name`
+    /// does not identify any property.
+    ///
+    /// @tparam I The key type of the property. 
+
+    template<class I>
+    const std::type_info& property_type(const std::string& name)
+    {
+      return Property_selector<I>(this)().get_type(name);
+    }
+    /// @endcond
+
+    /// returns a vector with all strings that describe properties with the key type `I`.
+    /// @tparam I The key type of the properties.
+    template<class I>
+    std::vector<std::string> properties() const
+    {
+      return Property_selector<I>(this)().properties();
+    }
+
+    /// returns the property for the string "v:point".
+    Property_map<Vertex_index, Point>
+    points() const { return vpoint_; }
+
+    /// returns the point associated to vertex `v`.
+    const Point&
+    point(Vertex_index v) const { return vpoint_[v]; }
+
+    /// returns the point associated to vertex `v`.
+    Point&
+    point(Vertex_index v) { return vpoint_[v]; }
+
+    /// @cond CGAL_DOCUMENT_INTERNALS
+    /// prints property statistics to the stream `out`. The output is human-readable but
+    /// not machine-friendly.  
+    ///
+    void property_stats(std::ostream& out = std::cout) const;
+    /// @endcond
+    ///@}
+
+
+ /// \name Null Elements
+    ///@{
+
+  /// returns `Vertex_index(-1)`.
+  static Vertex_index null_vertex()
+  {
+    return vertex_index(-1);
+  }
+
+  /// returns `Edge_index(-1)`.
+  static Edge_index null_edge()
+  {
+    return edge_index(-1);
+  }
+  /// returns `Halfedge_index(-1)`.
+  static Halfedge_index null_halfedge()
+  {
+    return halfedge_index(-1);
+  }
+  /// returns `Face_index(-1)`.
+  static Face_index null_face()
+  {
+    return face_index(-1);
+  }
+  /// @}
+
+  
+private: //--------------------------------------------------- helper functions
+
+
+    /// make sure that the incoming halfedge of vertex v is a border halfedge
+    /// if `v` is a border vertex.
+    void adjust_incoming_halfedge(Vertex_index v);
+
+private: //------------------------------------------------------- private data
+    Property_container<Vertex_index> vprops_;
+    Property_container<Halfedge_index> hprops_;
+    Property_container<Edge_index> eprops_;
+    Property_container<Face_index> fprops_;
+
+    Property_map<Vertex_index, Vertex_connectivity>      vconn_;
+    Property_map<Halfedge_index, Halfedge_connectivity>  hconn_;
+    Property_map<Face_index, Face_connectivity>          fconn_;
+
+    Property_map<Vertex_index, bool>  vremoved_;
+    Property_map<Edge_index, bool>    eremoved_;
+    Property_map<Face_index, bool>    fremoved_;
+
+    Property_map<Vertex_index, Point>   vpoint_;
+
+    size_type removed_vertices_;
+    size_type removed_edges_;
+    size_type removed_faces_;
+
+    size_type vertices_freelist_;
+    size_type edges_freelist_;
+    size_type faces_freelist_;
+    bool garbage_;
+};
+
+  /*! \addtogroup PkgSurface_mesh
+   *
+   * @{
+   */
+
+  /// \relates Surface_mesh
+  /// Inserts `other` into `sm`. 
+  /// Shifts the indices of vertices of `other` by `sm.number_of_vertices() + sm.number_of_removed_vertices()`
+  /// and analoguously for halfedges, edges, and faces.
+  /// Copies entries of all property maps which have the same name in `sm` and `other`. 
+  /// that is, property maps which are only in `other` are ignored.
+  /// Also copies elements which are marked as removed, and concatenates the freelists of `sm` and `other`. 
+
+  template <typename P>
+  Surface_mesh<P>& operator+=(Surface_mesh<P>& sm, const Surface_mesh<P>& other)
+  {
+    sm.join(other);
+    return sm;
+  }
+
+  /// \relates Surface_mesh
+  /// Inserts the surface mesh in an output stream in Ascii OFF format. 
+  /// Only the \em point property is inserted in the stream.
+  /// \pre `operator<<(std::ostream&,const P&)` must be defined.
+  template <typename P>
+  std::ostream& operator<<(std::ostream& os, const Surface_mesh<P>& sm)
+  {
+    typedef Surface_mesh<P> Mesh;
+    typedef typename Mesh::Vertex_index Vertex_index;
+    typedef typename Mesh::Face_index Face_index;
+
+    os << "OFF\n" << sm.number_of_vertices() << " " << sm.number_of_faces() << " 0\n";
+    std::vector<int> reindex;
+    reindex.resize(sm.num_vertices());
+    int n = 0;
+    BOOST_FOREACH(Vertex_index v, sm.vertices()){
+      os << sm.point(v) << '\n';
+      reindex[v]=n++;
+    }
+
+    BOOST_FOREACH(Face_index f, sm.faces()){
+      os << sm.degree(f);
+      BOOST_FOREACH(Vertex_index v, CGAL::vertices_around_face(sm.halfedge(f),sm)){
+        os << " " << reindex[v];
+      }
+      os << '\n';
+    }
+    return os;
+  }
+
+/// @cond CGAL_DOCUMENT_INTERNALS
+
+  inline std::istream& sm_skip_comments( std::istream& in) {
+      char c;
+      in >> c;
+      if (c == '#')
+        in.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
+      else
+        in.putback(c);
+      return in;
+  }
+/// @endcond
+
+
+  /// \relates Surface_mesh
+  /// Extracts the surface mesh from an input stream in Ascii OFF format.
+  /// The operator only reads the point property and does not read files 
+  /// with vertex normals or textures.
+  /// \pre `operator>>(std::istream&,const P&)` must be defined.
+  template <typename P>
+  std::istream& operator>>(std::istream& is, Surface_mesh<P>& sm)
+  {
+    typedef Surface_mesh<P> Mesh;
+    typedef typename Mesh::size_type size_type;
+    sm.clear();
+    int n, f, e;
+    std::string off;
+    is >> off;
+    CGAL_assertion(off == "OFF" || off == "COFF");
+    is >> n >> f >> e;
+    sm.reserve(n,2*f,e);
+    P p;
+    for(int i=0; i < n; i++){
+      is >> sm_skip_comments;
+      is >> p;
+      sm.add_vertex(p);
+      is.ignore((std::numeric_limits<std::streamsize>::max)(), '\n');
+    }
+    std::vector<size_type> vr;
+    std::size_t d;
+    for(int i=0; i < f; i++){
+      is >> sm_skip_comments;
+      is >> d;
+      vr.resize(d);
+      for(std::size_t j=0; j<d; j++){
+        is >> vr[j];
+      }
+      sm.add_face(vr);
+    }
+    return is;
+  }
+
+ 
+ /*! @} */
+
+template <typename P>
+Surface_mesh<P>::
+Surface_mesh()
+{
+    // allocate standard properties
+    // same list is used in operator=() and assign()
+    vconn_    = add_property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
+    hconn_    = add_property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
+    fconn_    = add_property_map<Face_index, Face_connectivity>("f:connectivity").first;
+    vpoint_   = add_property_map<Vertex_index, Point>("v:point").first;
+    vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
+    eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
+    fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
+
+    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
+    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
+    garbage_ = false;
+}
+
+
+//-----------------------------------------------------------------------------
+template <typename P>
+Surface_mesh<P>&
+Surface_mesh<P>::
+operator=(const Surface_mesh<P>& rhs)
+{
+    if (this != &rhs)
+    {
+        // deep copy of property containers
+        vprops_ = rhs.vprops_;
+        hprops_ = rhs.hprops_;
+        eprops_ = rhs.eprops_;
+        fprops_ = rhs.fprops_;
+
+        // property handles contain pointers, have to be reassigned
+        vconn_    = property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
+        hconn_    = property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
+        fconn_    = property_map<Face_index, Face_connectivity>("f:connectivity").first;
+        vremoved_ = property_map<Vertex_index, bool>("v:removed").first;
+        eremoved_ = property_map<Edge_index, bool>("e:removed").first;
+        fremoved_ = property_map<Face_index, bool>("f:removed").first;
+        vpoint_   = property_map<Vertex_index, P>("v:point").first;
+
+        // how many elements are removed?
+        removed_vertices_  = rhs.removed_vertices_;
+        removed_edges_     = rhs.removed_edges_;
+        removed_faces_     = rhs.removed_faces_;
+        vertices_freelist_ = rhs.vertices_freelist_;
+        edges_freelist_    = rhs.edges_freelist_;
+        faces_freelist_    = rhs.faces_freelist_;
+        garbage_           = rhs.garbage_;
+    }
+
+    return *this;
+}
+
+
+//-----------------------------------------------------------------------------
+template <typename P>
+Surface_mesh<P>&
+Surface_mesh<P>::
+assign(const Surface_mesh<P>& rhs)
+{
+    if (this != &rhs)
+    {
+        // clear properties
+        vprops_.clear();
+        hprops_.clear();
+        eprops_.clear();
+        fprops_.clear();
+
+        // allocate standard properties
+        vconn_    = add_property_map<Vertex_index, Vertex_connectivity>("v:connectivity").first;
+        hconn_    = add_property_map<Halfedge_index, Halfedge_connectivity>("h:connectivity").first;
+        fconn_    = add_property_map<Face_index, Face_connectivity>("f:connectivity").first;
+        vpoint_   = add_property_map<Vertex_index, P>("v:point").first;
+        vremoved_ = add_property_map<Vertex_index, bool>("v:removed", false).first;
+        eremoved_ = add_property_map<Edge_index, bool>("e:removed", false).first;
+        fremoved_ = add_property_map<Face_index, bool>("f:removed", false).first;
+
+        // copy properties from other mesh
+        vconn_.array()     = rhs.vconn_.array();
+        hconn_.array()     = rhs.hconn_.array();
+        fconn_.array()     = rhs.fconn_.array();
+        vpoint_.array()    = rhs.vpoint_.array();
+        vremoved_.array()  = rhs.vremoved_.array();
+        eremoved_.array()  = rhs.eremoved_.array();
+        fremoved_.array()  = rhs.fremoved_.array();
+
+        // resize (needed by property containers)
+        vprops_.resize(rhs.num_vertices());
+        hprops_.resize(rhs.num_halfedges());
+        eprops_.resize(rhs.num_edges());
+        fprops_.resize(rhs.num_faces());
+
+        // how many elements are removed?
+        removed_vertices_  = rhs.removed_vertices_;
+        removed_edges_     = rhs.removed_edges_;
+        removed_faces_     = rhs.removed_faces_;
+        vertices_freelist_ = rhs.vertices_freelist_;
+        edges_freelist_    = rhs.edges_freelist_;
+        faces_freelist_    = rhs.faces_freelist_;
+        garbage_           = rhs.garbage_;
+    }
+
+    return *this;
+}
+
+//-----------------------------------------------------------------------------
+template <typename P>
+void
+Surface_mesh<P>::
+clear()
+{
+    vprops_.resize(0);
+    hprops_.resize(0);
+    eprops_.resize(0);
+    fprops_.resize(0);
+
+    vprops_.shrink_to_fit();
+    hprops_.shrink_to_fit();
+    eprops_.shrink_to_fit();
+    fprops_.shrink_to_fit();
+
+    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
+    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
+    garbage_ = false;
+}
+
+//-----------------------------------------------------------------------------
+/// @cond CGAL_DOCUMENT_INTERNALS
+template <typename P>
+void
+Surface_mesh<P>::
+property_stats(std::ostream& out) const
+{
+    std::vector<std::string> props;
+
+    out << "vertex properties:\n";
+    props = properties<Vertex_index>();
+    for (unsigned int i=0; i<props.size(); ++i)
+        out << "\t" << props[i] << std::endl;
+
+    out << "halfedge properties:\n";
+    props = properties<Halfedge_index>();
+    for (unsigned int i=0; i<props.size(); ++i)
+        out << "\t" << props[i] << std::endl;
+
+    out << "edge properties:\n";
+    props = properties<Edge_index>();
+    for (unsigned int i=0; i<props.size(); ++i)
+        out << "\t" << props[i] << std::endl;
+
+    out << "face properties:\n";
+    props = properties<Face_index>();
+    for (unsigned int i=0; i<props.size(); ++i)
+        out << "\t" << props[i] << std::endl;
+}
+/// @endcond
+
+//-----------------------------------------------------------------------------
+template <typename P>
+typename Surface_mesh<P>::Halfedge_index
+Surface_mesh<P>::
+halfedge(Vertex_index source, Vertex_index target) const
+{
+    CGAL_assertion(has_valid_index(source) && has_valid_index(target));
+
+    Halfedge_index h  = halfedge(target);
+    const Halfedge_index hh = h;
+
+    if (h.is_valid())
+    {
+        do
+        {
+            if (this->source(h) == source)
+              return h;
+            h = next_around_target(h);
+        }
+        while (h != hh);
+    }
+
+    return Halfedge_index();
+}
+
+
+//-----------------------------------------------------------------------------
+template <typename P>
+void
+Surface_mesh<P>::
+adjust_incoming_halfedge(Vertex_index v)
+{
+    Halfedge_index h  = halfedge(v);
+    Halfedge_index hh = h;
+
+    if (h.is_valid())
+    {
+        if (target(h) != v)
+        {
+            // wrong target, flip
+            h = opposite(h);
+            hh = h;
+            set_halfedge(v, h);
+        }
+
+        do
+        {
+            if (is_border(h))
+            {
+                set_halfedge(v, h);
+                return;
+            }
+            h = next_around_target(h);
+        }
+        while (h != hh);
+    }
+}
+
+//-----------------------------------------------------------------------------
+
+ /// @cond CGAL_DOCUMENT_INTERNALS
+
+template <typename P>
+template <typename Range>
+typename Surface_mesh<P>::Face_index
+Surface_mesh<P>::add_face(const Range& r)
+{
+  return CGAL::Euler::add_face(r, *this);
+}
+
+  /// @endcond
+
+//-----------------------------------------------------------------------------
+template <typename P>
+typename Surface_mesh<P>::size_type
+Surface_mesh<P>::
+degree(Vertex_index v) const
+{
+    size_type count(0);
+    if(halfedge(v) == null_halfedge()){
+      return 0;
+    }
+    Vertex_around_target_circulator vvit(halfedge(v), *this);
+    Vertex_around_target_circulator vvend = vvit;
+    if(vvit) do
+    {
+        ++count;
+    } while (++vvit != vvend);
+
+    return count;
+}
+
+
+//-----------------------------------------------------------------------------
+template <typename P>
+typename Surface_mesh<P>::size_type
+Surface_mesh<P>::
+degree(Face_index f) const
+{
+    size_type count(0);
+    if(halfedge(f) == null_halfedge()){
+      return 0;
+    }
+    Vertex_around_face_circulator fvit(halfedge(f),*this);
+    Vertex_around_face_circulator fvend = fvit;
+    if(fvit) do {
+        ++count;
+    } while (++fvit != fvend);
+
+    return count;
+}
+
+template <typename P>
+void
+Surface_mesh<P>::
+collect_garbage()
+{
+    int  i, i0, i1,
+    nV(num_vertices()),
+    nE(num_edges()),
+    nH(num_halfedges()),
+    nF(num_faces());
+
+    Vertex_index    v;
+    Halfedge_index  h;
+    Face_index      f;
+
+
+    // setup index mapping%
+    Property_map<Vertex_index, Vertex_index>      vmap = add_property_map<Vertex_index, Vertex_index>("v:garbage-collection").first;
+    Property_map<Halfedge_index, Halfedge_index>  hmap = add_property_map<Halfedge_index, Halfedge_index>("h:garbage-collection").first;
+    Property_map<Face_index, Face_index>          fmap = add_property_map<Face_index, Face_index>("f:garbage-collection").first;
+    for (i=0; i<nV; ++i)
+        vmap[Vertex_index(i)] = Vertex_index(i);
+    for (i=0; i<nH; ++i)
+        hmap[Halfedge_index(i)] = Halfedge_index(i);
+    for (i=0; i<nF; ++i)
+        fmap[Face_index(i)] = Face_index(i);
+
+
+
+    // really remove vertices
+    if (nV > 0)
+    {
+        i0=0;  i1=nV-1;
+
+        while (1)
+        {
+            // find first removed and last un-removed
+            while (!vremoved_[Vertex_index(i0)] && i0 < i1)  ++i0;
+            while ( vremoved_[Vertex_index(i1)] && i0 < i1)  --i1;
+            if (i0 >= i1) break;
+
+            // swap
+            vprops_.swap(i0, i1);
+        };
+
+        // remember new size
+        nV = vremoved_[Vertex_index(i0)] ? i0 : i0+1;
+    }
+
+    // really remove edges
+    if (nE > 0)
+    {
+        i0=0;  i1=nE-1;
+
+        while (1)
+        {
+            // find first removed and last un-removed
+            while (!eremoved_[Edge_index(i0)] && i0 < i1) ++i0;
+            while ( eremoved_[Edge_index(i1)] && i0 < i1) --i1;
+            if (i0 >= i1) break;
+
+            // swap
+            eprops_.swap(i0, i1);
+            hprops_.swap(2*i0,   2*i1);
+            hprops_.swap(2*i0+1, 2*i1+1);
+        };
+
+        // remember new size
+        nE = eremoved_[Edge_index(i0)] ? i0 : i0+1;
+        nH = 2*nE;
+    }
+
+
+    // really remove faces
+    if (nF > 0)
+    {
+        i0=0;  i1=nF-1;
+
+        while (1)
+        {
+            // find 1st removed and last un-removed
+            while (!fremoved_[Face_index(i0)] && i0 < i1)  ++i0;
+            while ( fremoved_[Face_index(i1)] && i0 < i1)  --i1;
+            if (i0 >= i1) break;
+
+            // swap
+            fprops_.swap(i0, i1);
+        };
+
+        // remember new size
+        nF = fremoved_[Face_index(i0)] ? i0 : i0+1;
+    }
+
+
+    // update vertex connectivity
+    for (i=0; i<nV; ++i)
+    {
+        v = Vertex_index(i);
+        if (!is_isolated(v))
+            set_halfedge(v, hmap[halfedge(v)]);
+    }
+
+
+    // update halfedge connectivity
+    for (i=0; i<nH; ++i)
+    {
+        h = Halfedge_index(i);
+        set_target(h, vmap[target(h)]);
+        set_next(h, hmap[next(h)]);
+        if (!is_border(h))
+            set_face(h, fmap[face(h)]);
+    }
+
+
+    // update indices of faces
+    for (i=0; i<nF; ++i)
+    {
+        f = Face_index(i);
+        set_halfedge(f, hmap[halfedge(f)]);
+    }
+
+    // remove index maps
+    remove_property_map<Vertex_index>(vmap);
+    remove_property_map<Halfedge_index>(hmap);
+    remove_property_map<Face_index>(fmap);
+
+    // finally resize arrays
+    vprops_.resize(nV); vprops_.shrink_to_fit();
+    hprops_.resize(nH); hprops_.shrink_to_fit();
+    eprops_.resize(nE); eprops_.shrink_to_fit();
+    fprops_.resize(nF); fprops_.shrink_to_fit();
+
+    removed_vertices_ = removed_edges_ = removed_faces_ = 0;
+    vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1;
+    garbage_ = false;
+}
+
+
+
+} // CGAL
+
+
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+
+  template <>
+  struct hash<CGAL::SM_Halfedge_index >
+    : public std::unary_function<CGAL::SM_Halfedge_index, std::size_t> {
+
+    std::size_t operator()(const CGAL::SM_Halfedge_index& i) const
+    {
+      return i;
+    }
+  };
+
+  template <>
+  struct hash<CGAL::SM_Vertex_index >
+    : public std::unary_function<CGAL::SM_Vertex_index, std::size_t>  {
+
+    std::size_t operator()(const CGAL::SM_Vertex_index& i) const
+    {
+      return i;
+    }
+  };
+
+  template <>
+  struct hash<CGAL::SM_Face_index > 
+    : public std::unary_function<CGAL::SM_Face_index, std::size_t> {
+
+    std::size_t operator()(const CGAL::SM_Face_index& i) const
+    {
+      return i;
+    }
+  };
+
+  template <>
+  struct hash<CGAL::SM_Edge_index >
+    : public std::unary_function<CGAL::SM_Edge_index, std::size_t>  {
+
+    std::size_t operator()(const CGAL::SM_Edge_index& i) const
+    {
+      return i;
+    }
+  };
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+namespace boost {
+  template <>
+  struct hash<CGAL::SM_Vertex_index > {
+    std::size_t operator()(const CGAL::SM_Vertex_index& i) const
+    {
+      return i;
+    }
+  };
+
+} // namespace boost
+
+#endif /* CGAL_SURFACE_MESH_H */
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh_fwd.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh_fwd.h
new file mode 100644
index 0000000..6bce7b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh/Surface_mesh_fwd.h
@@ -0,0 +1,37 @@
+//=============================================================================
+// Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen
+// Copyright (C) 2011 by Graphics & Geometry Group, Bielefeld University
+// Copyright (C) 2014 GeometryFactory
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+#ifndef CGAL_SURFACE_MESH_FWD_H
+#define CGAL_SURFACE_MESH_FWD_H
+
+/// \file Surface_mesh_fwd.h
+/// Forward declarations of the Surface_mesh package.
+
+#ifndef DOXYGEN_RUNNING
+namespace CGAL {
+
+// fwdS for the public interface
+template<typename K>
+class Surface_mesh;
+
+  
+} // CGAL
+#endif
+
+#endif /* CGAL_SURFACE_MESH_FWD_H */
+
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_criteria_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_edges_criteria_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_edges_criteria_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_edges_criteria_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_edges_criteria_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_triangulation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_default_triangulation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_default_triangulation_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_deformation.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_deformation.h
new file mode 100644
index 0000000..c31255c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_deformation.h
@@ -0,0 +1,1537 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Yin Xu, Andreas Fabri and Ilker O. Yaz
+
+#ifndef CGAL_SURFACE_MESH_DEFORMATION_H
+#define CGAL_SURFACE_MESH_DEFORMATION_H
+
+#include <CGAL/config.h>
+#include <CGAL/Default.h>
+#include <CGAL/tuple.h>
+
+#include <CGAL/Polygon_mesh_processing/Weights.h>
+#include <CGAL/Simple_cartesian.h>
+
+#include <vector>
+#include <list>
+#include <utility>
+#include <limits>
+#include <boost/foreach.hpp>
+
+/*
+#define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE // define it to activate optimal scale calculation,
+// then you can define below to just scale, if not both rotate and scale will be activated
+#define CGAL_DEFORM_MESH_JUST_EXPERIMENTAL_SCALE // to not to rotate but just scale
+*/
+
+// for default parameters
+#if defined(CGAL_EIGEN3_ENABLED)
+#include <CGAL/Eigen_solver_traits.h>  // for sparse linear system solver
+#include <CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h>  // for 3x3 closest rotation computer
+#endif
+
+namespace CGAL {
+
+/// \ingroup PkgSurfaceMeshDeformation
+///@brief Deformation algorithm type
+enum Deformation_algorithm_tag
+{
+  ORIGINAL_ARAP,  /**< use original as-rigid-as possible algorithm */
+  SPOKES_AND_RIMS /**< use spokes and rims version of as-rigid-as possible algorithm */
+};
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+namespace internal {
+template<class HalfedgeGraph, Deformation_algorithm_tag deformation_algorithm_tag>
+struct Weight_calculator_selector;
+
+template<class HalfedgeGraph>
+struct Weight_calculator_selector<HalfedgeGraph, CGAL::SPOKES_AND_RIMS> {
+  typedef Single_cotangent_weight_impl<HalfedgeGraph> weight_calculator;
+};
+
+template<class HalfedgeGraph>
+struct Weight_calculator_selector<HalfedgeGraph, CGAL::ORIGINAL_ARAP> {
+  typedef Cotangent_weight_impl<HalfedgeGraph> weight_calculator;
+};
+
+// property map that create a Simple_cartesian<double>::Point_3
+// on the fly in order the deformation class to be used
+// with points with minimal requirements
+template <class Vertex_point_map>
+struct SC_on_the_fly_pmap: public Vertex_point_map{
+  typedef boost::readable_property_map_tag category;
+  typedef CGAL::Simple_cartesian<double>::Point_3 value_type;
+  typedef value_type reference;
+  typedef typename boost::property_traits<Vertex_point_map>::key_type key_type;
+
+  SC_on_the_fly_pmap(Vertex_point_map base):
+    Vertex_point_map(base) {}
+
+  friend value_type
+  get(const SC_on_the_fly_pmap map, key_type k)
+  {
+    typename boost::property_traits<Vertex_point_map>::reference base=
+      get(static_cast<const Vertex_point_map&>(map), k);
+    return value_type(base[0], base[1], base[2]);
+  }
+};
+
+
+}//namespace internal
+/// @endcond
+
+ ///
+ /// \ingroup PkgSurfaceMeshDeformation
+ /// @brief Class providing the functionalities for deforming a triangulated surface mesh
+ ///
+ /// @tparam HG a model of HalfedgeGraph
+ /// @tparam VIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::vertex_descriptor` as key and `unsigned int` as value type.
+ ///         The default is `boost::property_map<HG, boost::%vertex_index_t>::%type`.
+ /// @tparam HIM a model of `ReadablePropertyMap` with `Surface_mesh_deformation::halfedge_descriptor` as key and `unsigned int` as value type.
+ ///         The default is `boost::property_map<HG, boost::%halfedge_index_t>::%type`.
+ /// @tparam TAG tag for selecting the deformation algorithm
+ /// @tparam WC a model of `SurfaceMeshDeformationWeights`, with `WC::Halfedge_graph` being `HG`.
+ ///         If `TAG` is `ORIGINAL_ARAP`, the weights must be positive to guarantee a correct energy minimization.
+ ///         The default is the cotangent weighting scheme. In case `TAG` is `ORIGINAL_ARAP`, negative weights are clamped to zero.
+ /// @tparam ST a model of SparseLinearAlgebraWithFactorTraits_d. If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available
+ /// and `CGAL_EIGEN3_ENABLED` is defined, then an overload of `Eigen_solver_traits` is provided as default parameter.\n
+  /// \code
+ ///     CGAL::Eigen_solver_traits<
+ ///         Eigen::SparseLU<
+ ///            CGAL::Eigen_sparse_matrix<double>::EigenType,
+ ///            Eigen::COLAMDOrdering<int> >  >
+ /// \endcode
+ /// @tparam CR a model of DeformationClosestRotationTraits_3. If \ref thirdpartyEigen "Eigen" 3.1 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined,
+ /// `Deformation_Eigen_polar_closest_rotation_traits_3` is provided as default parameter.
+ /// @tparam VPM a model of `ReadWritePropertyMap`</a>  with `Surface_mesh_deformation::vertex_descriptor` as key and a point as value type. The point type must be a model of `::RawPoint_3`.
+ /// The default is `boost::property_map<HG, CGAL::vertex_point_t>::%type`.
+template <
+  class HG,
+  class VIM=Default,
+  class HIM=Default,
+  Deformation_algorithm_tag TAG = SPOKES_AND_RIMS,
+  class WC = Default,
+  class ST = Default,
+  class CR = Default,
+  class VPM = Default
+  >
+class Surface_mesh_deformation
+{
+//Typedefs
+public:
+
+  /// \name Types
+  /// @{
+  // typedefed template parameters, main reason is doxygen creates autolink to typedefs but not template parameters
+  ///
+  typedef HG Halfedge_graph;
+
+// Index maps
+#ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    VIM,
+    typename boost::property_map<Halfedge_graph, boost::vertex_index_t>::type
+  >::type Vertex_index_map;
+  typedef typename Default::Get<
+    HIM,
+    typename boost::property_map<Halfedge_graph, boost::halfedge_index_t>::type
+  >::type Hedge_index_map;
+#else
+  ///
+  typedef VIM Vertex_index_map;
+  ///
+  typedef HIM Hedge_index_map;
+#endif
+
+// weight calculator
+#ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    WC,
+    typename internal::Weight_calculator_selector<HG, TAG>::weight_calculator
+  >::type Weight_calculator;
+#else
+  ///
+  typedef WC Weight_calculator;
+#endif
+
+// sparse linear solver
+#ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    ST,
+  #if defined(CGAL_EIGEN3_ENABLED)
+      CGAL::Eigen_solver_traits<
+          Eigen::SparseLU<
+            CGAL::Eigen_sparse_matrix<double>::EigenType,
+            Eigen::COLAMDOrdering<int> >  >
+  #else
+    ST // no parameter provided, and Eigen is not enabled: so don't compile!
+  #endif
+  >::type Sparse_linear_solver;
+#else
+  ///
+  typedef ST Sparse_linear_solver;
+#endif
+
+// CR helper
+#ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    CR,
+  #if defined(CGAL_EIGEN3_ENABLED)
+    Deformation_Eigen_polar_closest_rotation_traits_3
+  #else
+    CR // no parameter provided, and Eigen is not enabled: so don't compile!
+  #endif
+  >::type Closest_rotation_traits;
+#else
+  ///
+  typedef CR Closest_rotation_traits;
+#endif
+
+// vertex point pmap
+#ifndef DOXYGEN_RUNNING
+  typedef typename Default::Get<
+    VPM,
+    typename boost::property_map<Halfedge_graph, CGAL::vertex_point_t>::type
+  >::type Vertex_point_map;
+#else
+  ///
+  typedef VPM Vertex_point_map;
+#endif
+
+  /// The type for vertex descriptor
+  typedef typename boost::graph_traits<Halfedge_graph>::vertex_descriptor vertex_descriptor;
+  /// The type for halfedge descriptor
+  typedef typename boost::graph_traits<Halfedge_graph>::halfedge_descriptor halfedge_descriptor;
+  /// The 3D point type, model of `::RawPoint_3`
+  typedef typename boost::property_traits<Vertex_point_map>::value_type Point;
+  /// A constant iterator range over the vertices of the region-of-interest.
+  /// It is a model of `ConstRange` with `vertex_descriptor` as iterator value type.
+  typedef std::vector<vertex_descriptor> Roi_vertex_range;
+/// @}
+
+private:
+  typedef Surface_mesh_deformation<HG, VIM, HIM, TAG, WC, ST, CR> Self;
+  // Repeat Halfedge_graph types
+  typedef typename boost::graph_traits<Halfedge_graph>::vertex_iterator     vertex_iterator;
+  typedef typename boost::graph_traits<Halfedge_graph>::halfedge_iterator       halfedge_iterator;
+  typedef typename boost::graph_traits<Halfedge_graph>::in_edge_iterator    in_edge_iterator;
+  typedef typename boost::graph_traits<Halfedge_graph>::out_edge_iterator   out_edge_iterator;
+
+  typedef typename Closest_rotation_traits::Matrix CR_matrix;
+  typedef typename Closest_rotation_traits::Vector CR_vector;
+
+// Data members.
+  Halfedge_graph& m_halfedge_graph;                   /**< Source triangulated surface mesh for modeling */
+
+  std::vector<Point> original;                        ///< original positions of roi (size: ros + boundary_of_ros)
+  std::vector<Point> solution;                        ///< storing position of ros vertices during iterations (size: ros + boundary_of_ros)
+
+  Vertex_index_map vertex_index_map;                  ///< storing indices of all vertices
+  Hedge_index_map   hedge_index_map;                  ///< storing indices of all halfedges
+
+  std::vector<vertex_descriptor> roi;                 ///< region of interest
+  std::vector<vertex_descriptor> ros;                 ///< region of solution, including roi and hard constraints on boundary of roi
+
+  std::vector<std::size_t> ros_id_map;                ///< (size: num vertices)
+  std::vector<bool>        is_roi_map;                ///< (size: num vertices)
+  std::vector<bool>        is_ctrl_map;               ///< (size: num vertices)
+
+  std::vector<double> hedge_weight;                   ///< all halfedge weights
+  std::vector<CR_matrix> rot_mtr;                     ///< rotation matrices of ros vertices (size: ros)
+
+  Sparse_linear_solver m_solver;                      ///< linear sparse solver
+  unsigned int m_iterations;                          ///< number of maximal iterations
+  double m_tolerance;                                 ///< tolerance of convergence
+
+  bool need_preprocess_factorization;                 ///< is there any need to compute L and factorize
+  bool need_preprocess_region_of_solution;            ///< is there any need to compute region of solution
+
+  bool last_preprocess_successful;                    ///< stores the result of last call to preprocess()
+
+  Weight_calculator weight_calculator;
+
+  Vertex_point_map vertex_point_map;
+
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
+public:
+// SR-ARAP [Zohar13]
+  double m_sr_arap_alpha;
+private:
+#endif
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
+  std::vector<double> scales;
+#endif
+
+#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
+public:
+  Surface_mesh_deformation(const Self&) = delete; // no copy
+#else
+private:
+  Surface_mesh_deformation(const Self&); // no copy
+#endif
+
+
+// Public methods
+public:
+
+  /// \cond SKIP_FROM_MANUAL
+  //vertex_point_map set by default
+  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
+                           Vertex_index_map vertex_index_map,
+                           Hedge_index_map hedge_index_map
+                          )
+    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map), hedge_index_map(hedge_index_map),
+      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
+      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      m_iterations(5), m_tolerance(1e-4),
+      need_preprocess_factorization(true),
+      need_preprocess_region_of_solution(true),
+      last_preprocess_successful(false),
+      weight_calculator(Weight_calculator()),
+      vertex_point_map(get(vertex_point, halfedge_graph))
+  {
+    init();
+  }
+
+  //vertex_point_map and hedge_index_map set by default
+  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
+                           Vertex_index_map vertex_index_map
+                          )
+    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map),
+      hedge_index_map(get(boost::halfedge_index, halfedge_graph)),
+      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
+      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      m_iterations(5), m_tolerance(1e-4),
+      need_preprocess_factorization(true),
+      need_preprocess_region_of_solution(true),
+      last_preprocess_successful(false),
+      weight_calculator(Weight_calculator()),
+      vertex_point_map(get(vertex_point, halfedge_graph))
+  {
+    init();
+  }
+  //vertex_point_map, hedge_index_map and vertex_index_map set by default
+  Surface_mesh_deformation(Halfedge_graph& halfedge_graph)
+    : m_halfedge_graph(halfedge_graph),
+      vertex_index_map(get(boost::vertex_index, halfedge_graph)),
+      hedge_index_map(get(boost::halfedge_index, halfedge_graph)),
+      ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
+      is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+      m_iterations(5), m_tolerance(1e-4),
+      need_preprocess_factorization(true),
+      need_preprocess_region_of_solution(true),
+      last_preprocess_successful(false),
+      weight_calculator(Weight_calculator()),
+      vertex_point_map(get(vertex_point, halfedge_graph))
+  {
+    init();
+  }
+
+  // Constructor with all the parameters provided
+  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
+                           Vertex_index_map vertex_index_map,
+                           Hedge_index_map hedge_index_map,
+                           Vertex_point_map vertex_point_map,
+                           Weight_calculator weight_calculator = Weight_calculator()
+                          )
+    : m_halfedge_graph(halfedge_graph), vertex_index_map(vertex_index_map), hedge_index_map(hedge_index_map),
+    ros_id_map(std::vector<std::size_t>(num_vertices(halfedge_graph), (std::numeric_limits<std::size_t>::max)() )),
+    is_roi_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+    is_ctrl_map(std::vector<bool>(num_vertices(halfedge_graph), false)),
+    m_iterations(5), m_tolerance(1e-4),
+    need_preprocess_factorization(true),
+    need_preprocess_region_of_solution(true),
+    last_preprocess_successful(false),
+    weight_calculator(weight_calculator),
+    vertex_point_map(vertex_point_map)
+  {
+    init();
+  }
+  /// \endcond
+  #if DOXYGEN_RUNNING
+/// \name Construction
+/// @{
+    /**
+   * The constructor of a deformation object
+   *
+   * @pre the halfedge_graph consists of only triangular facets
+   * @param halfedge_graph triangulated surface mesh to deform
+   * @param vertex_index_map property map which associates an id to each vertex, from `0` to `num_vertices(halfedge_graph)-1`.
+   * @param hedge_index_map property map which associates an id to each halfedge, from `0` to `2*num_edges(halfedge_graph)-1`.
+   * @param vertex_point_map property map which associates a point to each vertex of the graph.
+   * @param weight_calculator function object or pointer for weight calculation
+   */
+  Surface_mesh_deformation(Halfedge_graph& halfedge_graph,
+    Vertex_index_map vertex_index_map=get(boost::vertex_index, halfedge_graph),
+    Hedge_index_map hedge_index_map=get(boost::halfedge_index, halfedge_graph),
+    Vertex_point_map vertex_point_map=get(boost::vertex_point, halfedge_graph),
+    Weight_calculator weight_calculator = Weight_calculator()
+    );
+/// @}
+  #endif
+
+private:
+  void init() {
+    typedef internal::SC_on_the_fly_pmap<Vertex_point_map> Wrapper;
+    // compute halfedge weights
+    halfedge_iterator eb, ee;
+    hedge_weight.reserve(2*num_edges(m_halfedge_graph));
+    for(cpp11::tie(eb, ee) = halfedges(m_halfedge_graph); eb != ee; ++eb)
+    {
+      hedge_weight.push_back(
+        this->weight_calculator(*eb, m_halfedge_graph, Wrapper(vertex_point_map)));
+    }
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
+    m_sr_arap_alpha=2;
+#endif
+  }
+
+public:
+
+/// \name Preprocessing
+/// @{
+  /**
+   * Erases all the vertices from the region-of-interest (control vertices included).
+   */
+  void clear_roi_vertices(){
+    need_preprocess_both();
+    // clear roi vertices
+    roi.clear();
+    //set to false all bits
+    is_roi_map.assign(num_vertices(m_halfedge_graph), false);
+    is_ctrl_map.assign(num_vertices(m_halfedge_graph), false);
+  }
+
+  /**
+   * Erases all the vertices from the set of control vertices.
+   */
+  void clear_control_vertices(){
+    need_preprocess_factorization=true;
+    //set to false all bits
+    is_ctrl_map.assign(num_vertices(m_halfedge_graph), false);
+  }
+
+  /**
+   * Inserts a vertex in the set of control vertices. The vertex is also inserted in the region-of-interest if it is not already in it.
+   * @param vd the vertex to be inserted
+   * @return `true` if `vd` is not already a control vertex.
+   */
+  bool insert_control_vertex(vertex_descriptor vd)
+  {
+    if(is_control_vertex(vd)) { return false; }
+    need_preprocess_factorization=true;
+
+    insert_roi_vertex(vd); // also insert it as roi
+
+    is_ctrl_map[id(vd)] = true;
+    return true;
+  }
+
+  /**
+   * Inserts a range of vertices in the set of control vertices. The vertices are also inserted in the region-of-interest if they are not already in it.
+   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
+   * @param begin first iterator of the range of vertices
+   * @param end past-the-end iterator of the range of vertices
+   */
+  template<class InputIterator>
+  void insert_control_vertices(InputIterator begin, InputIterator end)
+  {
+    for( ;begin != end; ++begin)
+    {
+      insert_control_vertex(*begin);
+    }
+  }
+
+  /**
+   * Erases a vertex from the set of control vertices.
+   * @param vd the vertex to be erased
+   * @return `true` if `vd` was a control vertex.
+   */
+  bool erase_control_vertex(vertex_descriptor vd)
+  {
+    if(!is_control_vertex(vd)) { return false; }
+
+    need_preprocess_factorization=true;
+    is_ctrl_map[id(vd)] = false;
+    return true;
+  }
+
+  /**
+   * Inserts a range of vertices in the region-of-interest
+   * @tparam InputIterator input iterator with `vertex_descriptor` as value type
+   * @param begin first iterator of the range of vertices
+   * @param end past-the-end iterator of the range of vertices
+   */
+  template<class InputIterator>
+  void insert_roi_vertices(InputIterator begin, InputIterator end)
+  {
+    for( ;begin != end; ++begin)
+    {
+      insert_roi_vertex(*begin);
+    }
+  }
+
+  /**
+   * Inserts a vertex in the region-of-interest
+   * @param vd the vertex to be inserted
+   * @return `true` if `vd` is not already in the region-of-interest.
+   */
+  bool insert_roi_vertex(vertex_descriptor vd)
+  {
+    if(is_roi_vertex(vd)) { return false; }
+    need_preprocess_both();
+
+    is_roi_map[id(vd)] = true;
+    roi.push_back(vd);
+    return true;
+  }
+
+  /**
+   * Erases a vertex from the region-of-interest and the set of control vertices.
+   * \note At the next call to `preprocess()`, any vertex that is no longer in the region-of-interest will be assigned to its original position
+   * (that is the position of the vertex at the time of construction or after the last call to `overwrite_initial_geometry()`).
+   * @param vd the vertex to be erased
+   * @return `true` `vd` was a vertex from the region-of-interest.
+   */
+  bool erase_roi_vertex(vertex_descriptor vd)
+  {
+    if(!is_roi_vertex(vd)) { return false; }
+
+    erase_control_vertex(vd); // also erase from being control
+
+    typename std::vector<vertex_descriptor>::iterator it = std::find(roi.begin(), roi.end(), vd);
+    if(it != roi.end())
+    {
+      is_roi_map[id(vd)] = false;
+      roi.erase(it);
+
+      need_preprocess_both();
+      return true;
+    }
+
+    CGAL_assertion(false); // inconsistency between is_roi_map, and roi vector!
+    return false;
+  }
+
+  /**
+   * Preprocessing function that need to be called each time the region-of-interest or the set
+   * of control vertices are changed before calling `deform()`.
+   * If not already done, `deform()` first calls this function.
+   * \cgalAdvancedBegin
+   * Collects the vertices not in the region-of-interest that are adjacent to a vertex from the
+   * region-of-interest (these vertices are internally considered as fixed control vertices).
+   * Then assembles and factorizes the Laplacian matrix used in the function `deform()`.
+   * \cgalAdvancedEnd
+   * \note A modification of the set of control vertices or the region-of-interest invalidates the
+   * preprocessing data.
+   * @return `true` if successful.
+   * A common reason for failure is that the system is rank deficient,
+   * which happens for example when all the vertices are in the region-of-interest and no control vertices are set, or
+   * if the weighting scheme used features too many zero and breaks the connectivity information.
+   */
+  bool preprocess()
+  {
+    region_of_solution();
+    assemble_laplacian_and_factorize();
+    return last_preprocess_successful; // which is set by assemble_laplacian_and_factorize()
+  }
+/// @} Preprocessing
+
+/// \name Deformation
+/// @{
+
+  /**
+   * Sets the target position of a control vertex.
+   * @param vd the control vertex the target position is set
+   * @param target_position the new target position
+   */
+  void set_target_position(vertex_descriptor vd, const Point& target_position)
+  {
+    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
+
+    if(!is_control_vertex(vd)) { return; }
+    solution[ros_id(vd)] = target_position;
+  }
+
+  /**
+   * Updates the target position of `vd` by applying     a translation of vector `t`.
+   *
+   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
+   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
+   *
+   * @param vd a control vertex
+   * @param t translation vector
+   * \pre `is_control_vertex(vd)`
+   */
+  template<class Vect>
+  void translate(vertex_descriptor vd, const Vect& t)
+  {
+    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
+
+    std::size_t v_id = ros_id(vd);
+    solution[v_id] = add_to_point(solution[v_id], t);
+  }
+
+  /**
+   * Equivalent to calling the overload taking only one control vertex, for each vertex in the range `[begin,end[`.
+   *
+   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
+   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
+   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
+   *
+   * @param begin first iterator of the range of vertices
+   * @param end past-the-end iterator of the range of vertices
+   * @param t translation vector
+   */
+  template<class InputIterator, class Vect>
+  void translate(InputIterator begin, InputIterator end, const Vect& t)
+  {
+    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
+
+    for(; begin != end; ++begin) {
+      std::size_t v_id = ros_id(*begin);
+      solution[v_id] = add_to_point(solution[v_id], t);
+    }
+  }
+
+  /**
+   * Updates the target position of `vd` by applying to its last target position
+   * a rotation defined by the quaternion `quat`, the center of the rotation being
+   * the origin translated by `to_rotation_center` .
+   *
+   * @tparam Quaternion is a quaternion class with `Vect operator*(Quaternion, Vect)` returning the product of a quaternion with a vector
+   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
+   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
+   *
+   * @param vd a control vertex
+   * @param to_rotation_center the vector to translate the origin to the center of the rotation
+   * @param quat quaternion of the rotation
+   * \pre `is_control_vertex(vd)`
+   * \pre `quad` represents a rotation
+   */
+  template <typename Quaternion, typename Vect>
+  void rotate(vertex_descriptor vd, const Vect& to_rotation_center, const Quaternion& quat)
+  {
+    CGAL_precondition( is_control_vertex(vd) );
+    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
+
+    std::size_t v_id = ros_id(vd);
+    Vect v = quat * sub_to_vect(solution[v_id], to_rotation_center);
+    solution[v_id] = Point( to_rotation_center[0]+v[0],
+                            to_rotation_center[1]+v[1],
+                            to_rotation_center[2]+v[2] );
+  }
+
+  /**
+   * Equivalent to calling the overload taking only one control vertex, for each vertex in the range `[begin,end[`.
+   *
+   * @tparam InputIterator input iterator type with `vertex_descriptor` as value type
+   * @tparam Quaternion is a quaternion class with `Vect operator*(Quaternion, Vect)` returning the product of a quaternion with a vector
+   * @tparam Vect is a 3D vector class, with `Vect(double x,double y, double z)` being a constructor from its %Cartesian coordinates
+   *         and `double Vect::operator[](int i)` with i=0,1 or 2 returning its %Cartesian coordinates.
+   *
+   * @param begin first iterator of the range of vertices
+   * @param end past-the-end iterator of the range of vertices
+   * @param to_rotation_center the vector to translate the origin to the center of the rotation
+   * @param quat quaternion of the rotation
+   * \pre `quad` represents a rotation
+   */
+  template <typename InputIterator, typename Vect, typename Quaternion>
+  void rotate(InputIterator begin, InputIterator end, const Vect& to_rotation_center, const Quaternion& quat)
+  {
+    region_of_solution(); // we require ros ids, so if there is any need to preprocess of region of solution -do it.
+
+    for(; begin != end; ++begin) {
+      std::size_t v_id = ros_id(*begin);
+      Vect v = quat * sub_to_vect(solution[v_id], to_rotation_center);
+      solution[v_id] = Point( to_rotation_center[0]+v[0],
+                              to_rotation_center[1]+v[1],
+                              to_rotation_center[2]+v[2] );
+    }
+  }
+
+  /**
+    * Returns the target position of a control vertex.
+    * \param vd a control vertex
+    * \pre `is_control_vertex(vd)`
+    */
+  const Point& target_position(vertex_descriptor vd)
+  {
+    region_of_solution();
+
+    CGAL_precondition( is_control_vertex(vd) );
+    return solution[ ros_id(vd) ];
+  }
+
+  /**
+   * Deforms the region-of-interest according to the deformation algorithm, using the target positions of each control vertex set by using `rotate()`, `translate()`, or `set_target_position()`.
+   * The points associated to each vertex of the input graph that are inside the region-of-interest are updated.
+   * \note Nothing happens if `preprocess()` returns `false`.
+   * @see set_iterations(unsigned int iterations), set_tolerance(double tolerance), deform(unsigned int iterations, double tolerance)
+   */
+  void deform()
+  {
+    deform(m_iterations, m_tolerance);
+  }
+
+  /**
+   * Same as `deform()` but the number of iterations and the tolerance are one-time parameters.
+   * @param iterations number of iterations for optimization procedure
+   * @param tolerance tolerance of convergence (see explanations set_tolerance(double tolerance))
+   */
+  void deform(unsigned int iterations, double tolerance)
+  {
+    preprocess();
+
+    if(!last_preprocess_successful) {
+      CGAL_warning(false);
+      return;
+    }
+    // Note: no energy based termination occurs at first iteration
+    // because comparing energy of original model (before deformation) and deformed model (deformed_1_iteration)
+    // simply does not make sense, comparison is meaningful between deformed_(i)_iteration & deformed_(i+1)_iteration
+
+    double energy_this = 0; // initial value is not important, because we skip first iteration
+    double energy_last;
+
+    // iterations
+    for ( unsigned int ite = 0; ite < iterations; ++ite)
+    {
+      // main steps of optimization
+      update_solution();
+#ifndef CGAL_DEFORM_MESH_JUST_EXPERIMENTAL_SCALE
+      optimal_rotations();
+#endif
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
+      optimal_scales();
+#endif
+      // energy based termination
+      if(tolerance > 0.0 && (ite + 1) < iterations) // if tolerance <= 0 then don't compute energy
+      {                                             // also no need compute energy if this iteration is the last iteration
+        energy_last = energy_this;
+        energy_this = energy();
+        CGAL_warning(energy_this >= 0);
+
+        if(ite != 0) // skip first iteration
+        {
+          double energy_dif = std::abs((energy_last - energy_this) / energy_this);
+          if ( energy_dif < tolerance ) { break; }
+        }
+      }
+    }
+    // copy solution to the target surface mesh
+    assign_solution();
+  }
+
+  /**
+   * Resets the points associated to the vertices of the region-of-interest at their
+   * initial positions at time of the functor construction or after
+   * the last call to `overwrite_initial_geometry()`.
+   * \note if the region-of-interest or the set of control vertices have been
+   * modified since the last call to `preprocess()`, it will be called prior
+   * to the reset.
+   */
+  void reset()
+  {
+    if(roi.empty()) { return; } // no ROI to reset
+
+    region_of_solution(); // since we are using original vector
+
+    //restore the current positions to be the original positions
+    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
+    {
+      put(vertex_point_map, vd, original[ros_id(vd)]);
+      solution[ros_id(vd)]=original[ros_id(vd)];
+    }
+
+    // also set rotation matrix to identity
+    std::fill(rot_mtr.begin(), rot_mtr.end(),
+              Closest_rotation_traits().identity_matrix());
+  }
+
+  /**
+   * Sets the initial positions of the vertices from the region-of-interest to the current positions. Calling this function has the same effect as creating
+   * a new deformation object with the current deformed halfedge-graph, keeping the region-of-interest and the set of control vertices.
+   * \note if the region-of-interest or the set of control vertices have been modified since the last call to `preprocess()`,
+   * it will be called prior to the overwrite.
+   *
+   * \cgalAdvancedBegin
+   * This function might have a non-negligible effect on the result.
+   * The Laplacian matrix of the free vertices and the optimal rotations
+   * are computed using the original positions of the points
+   * associated to the vertices. Thus, if a deformed version of the surface mesh
+   * is used as reference, the surface mesh properties the algorithm
+   * tries to preserve are those of an altered version (which are already
+   * degraded).
+   * \cgalAdvancedEnd
+   */
+  void overwrite_initial_geometry()
+  {
+    typedef internal::SC_on_the_fly_pmap<Vertex_point_map> Wrapper;
+    if(roi.empty()) { return; } // no ROI to overwrite
+
+    region_of_solution(); // the roi should be preprocessed since we are using original_position vec
+
+    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
+    {
+      original[ros_id(vd)] = get(vertex_point_map, vd);
+    }
+
+    // now I need to compute weights for halfedges incident to roi vertices
+    std::vector<bool> is_weight_computed(2*num_edges(m_halfedge_graph), false);
+    BOOST_FOREACH(vertex_descriptor vd, roi_vertices())
+    {
+      in_edge_iterator e, e_end;
+      for (cpp11::tie(e,e_end) = in_edges(vd, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+        std::size_t id_e = id(he);
+        if(is_weight_computed[id_e]) { continue; }
+
+        hedge_weight[id_e] = weight_calculator(he, m_halfedge_graph, Wrapper(vertex_point_map));
+        is_weight_computed[id_e] = true;
+
+        halfedge_descriptor e_opp = opposite(he, m_halfedge_graph);
+        std::size_t id_e_opp = id(e_opp);
+
+        hedge_weight[id_e_opp] = weight_calculator(e_opp, m_halfedge_graph, Wrapper(vertex_point_map));
+        is_weight_computed[id_e_opp] = true;
+      }
+    }
+
+    // also set rotation matrix to identity
+    std::fill(rot_mtr.begin(), rot_mtr.end(), Closest_rotation_traits().identity_matrix());
+
+    need_preprocess_both(); // now we need reprocess
+  }
+
+/// @} Deformation
+
+/// \name Utilities
+/// @{
+
+  /**
+   * Gets the default number of iterations (5) or the value passed to the function `set_iterations()`
+   */
+  unsigned int iterations()
+  { return m_iterations; }
+
+  /**
+   * Gets the default tolerance parameter (1e-4) or the value passed to the function `set_tolerance()`
+   */
+  double tolerance()
+  { return m_tolerance; }
+
+  /**
+   * Sets the maximum number of iterations ran by `deform()`
+   */
+  void set_iterations(unsigned int iterations)
+  { this->m_iterations = iterations; }
+
+   /// @brief Sets the tolerance of the convergence used in `deform()`.
+   /// If `tolerance==0`, no energy based termination criteria is used (preventing to do the energy computation at each iteration step)
+   ///
+   /// `tolerance >` \f$|\mathrm{energy}(m_i) - \mathrm{energy}(m_{i-1})| / \mathrm{energy}(m_i)\f$ will be used as a termination criterium.
+  void set_tolerance(double tolerance)
+  { this->m_tolerance = tolerance; }
+
+  /**
+   * Returns the range of vertices in the region-of-interest.
+   */
+  const Roi_vertex_range& roi_vertices() const
+  {
+    return roi;
+  }
+
+  /**
+   * Tests whether a vertex is inside the region-of-interest.
+   * @param vd the query vertex
+   * @return `true` if `vd` has been inserted to (and not erased from) the region-of-interest.
+   */
+  bool is_roi_vertex(vertex_descriptor vd) const
+  { return is_roi_map[id(vd)]; }
+
+  /**
+   * Tests whether a vertex is a control vertex.
+   * @param vd the query vertex
+   * @return `true` if `vd` has been inserted to (and not erased from) the set of control vertices.
+   */
+  bool is_control_vertex(vertex_descriptor vd) const
+  { return is_ctrl_map[id(vd)]; }
+
+  /**
+   * Provides access to the halfedge graph being deformed
+   */
+  const Halfedge_graph& halfedge_graph() const
+  { return m_halfedge_graph; }
+
+/// @} Utilities
+
+
+private:
+
+  /// Assigns id to one ring neighbor of vd, and also push them into push_vector
+  void assign_ros_id_to_one_ring(vertex_descriptor vd,
+                             std::size_t& next_id,
+                             std::vector<vertex_descriptor>& push_vector)
+  {
+    in_edge_iterator e, e_end;
+    for (cpp11::tie(e,e_end) = in_edges(vd, m_halfedge_graph); e != e_end; e++)
+    {
+      vertex_descriptor vt = source(*e, m_halfedge_graph);
+      if(ros_id(vt) == (std::numeric_limits<std::size_t>::max)())  // neighboring vertex which is outside of roi and not visited previously (i.e. need an id)
+      {
+        ros_id(vt) = next_id++;
+        push_vector.push_back(vt);
+      }
+    }
+  }
+
+  /// Find region of solution, including roi and hard constraints, which is the 1-ring vertices out roi
+  /// Contains four parts:
+  ///  - if there is any vertex which is no longer roi, set its position back to original position
+  ///  - assign a ros id to vertices inside ros + ros-boundary
+  ///  - reinitialize rotation matrices, if a vertex is previously ros, use its previous matrix, otherwise set zero
+  ///  - reinitialize original, and solution,
+  ///      + if a vertex is previously roi, then use its original position in old_origional, else use point().
+  ///        In both case we are using "original position" of the vertex.
+  ///      + same for solution (it is required to prevent jumping effects)
+  void region_of_solution()
+  {
+    if(!need_preprocess_region_of_solution) { return; }
+    need_preprocess_region_of_solution = false;
+
+    std::vector<std::size_t>  old_ros_id_map = ros_id_map;
+    std::vector<CR_matrix>    old_rot_mtr    = rot_mtr;
+    std::vector<Point>        old_solution   = solution;
+    std::vector<Point>        old_original   = original;
+
+    // any vertices which are no longer ROI, should be assigned to their original position, so that:
+    // IF a vertex is ROI (actually if its ros + boundary) previously (when previous region_of_solution() is called)
+    // we have its original position in old_original
+    // ELSE
+    // we have its original position in vertex->point()
+    // (current ros is actually old ros - we did not change it yet)
+    for(typename std::vector<vertex_descriptor>::iterator it = ros.begin(); it != ros.end(); ++it)
+    {
+      if(!is_roi_vertex(*it)) {
+        put(vertex_point_map, *it, old_original[ old_ros_id_map[id(*it)] ]);
+      }
+    }
+
+    ////////////////////////////////////////////////////////////////
+    // assign id to vertices inside: roi, boundary of roi (roi + boundary of roi = ros),
+    //                               and boundary of ros
+    // keep in mind that id order does not have to be compatible with ros order
+    ros.clear(); // clear ros
+    ros.insert(ros.end(), roi.begin(), roi.end());
+
+    ros_id_map.assign(num_vertices(m_halfedge_graph), (std::numeric_limits<std::size_t>::max)()); // use max as not assigned mark
+
+    for(std::size_t i = 0; i < roi.size(); i++)  // assign id to all roi vertices
+    { ros_id(roi[i]) = i; }
+
+    // now assign an id to vertices on boundary of roi
+    std::size_t next_ros_index = roi.size();
+    for(std::size_t i = 0; i < roi.size(); i++)
+    { assign_ros_id_to_one_ring(roi[i], next_ros_index, ros); }
+
+    std::vector<vertex_descriptor> outside_ros;
+    // boundary of ros also must have ids because in CR calculation,
+    // one-ring neighbor of ROS vertices are reached.
+    for(std::size_t i = roi.size(); i < ros.size(); i++)
+    { assign_ros_id_to_one_ring(ros[i], next_ros_index, outside_ros); }
+    ////////////////////////////////////////////////////////////////
+
+    // initialize the rotation matrices (size: ros)
+    rot_mtr.resize(ros.size());
+    for(std::size_t i = 0; i < rot_mtr.size(); i++)
+    {
+      std::size_t v_ros_id = ros_id(ros[i]);
+      std::size_t v_id = id(ros[i]);
+
+      // any vertex which is previously ROS has a rotation matrix
+      // use that matrix to prevent jumping effects
+      if(old_ros_id_map[v_id] != (std::numeric_limits<std::size_t>::max)()
+          && old_ros_id_map[v_id] < old_rot_mtr.size()) {
+          // && boundary of ros vertices also have ids so check whether it is ros
+        rot_mtr[v_ros_id] = old_rot_mtr[ old_ros_id_map[v_id] ];
+      }
+      else {
+        rot_mtr[v_ros_id] = Closest_rotation_traits().identity_matrix();
+      }
+    }
+
+    // initialize solution and original (size: ros + boundary_of_ros)
+
+    // for simplifying coding effort, I also put boundary of ros into solution and original
+    // because boundary of ros vertices are reached in optimal_rotations() and energy()
+    solution.resize(ros.size() + outside_ros.size());
+    original.resize(ros.size() + outside_ros.size());
+
+    for(std::size_t i = 0; i < ros.size(); i++)
+    {
+      std::size_t v_ros_id = ros_id(ros[i]);
+      std::size_t v_id = id(ros[i]);
+
+      if(is_roi_vertex(ros[i]) && old_ros_id_map[v_id] != (std::numeric_limits<std::size_t>::max)()) {
+        // if it is currently roi and previously ros + boundary
+        // (actually I just need to assign old's to new's if a vertex is currently and previously ROI
+        // but no harm on assigning if its also previously ros + boundary because
+        // those(old_original & old_solution) will be equal to original position)
+        original[v_ros_id] = old_original[old_ros_id_map[v_id]];
+        solution[v_ros_id] = old_solution[old_ros_id_map[v_id]];
+      }
+      else {
+        solution[v_ros_id] = get(vertex_point_map, ros[i]);
+        original[v_ros_id] = get(vertex_point_map, ros[i]);
+      }
+    }
+
+    for(std::size_t i = 0; i < outside_ros.size(); ++i)
+    {
+      std::size_t v_ros_id = ros_id(outside_ros[i]);
+      original[v_ros_id] = get(vertex_point_map, outside_ros[i]);
+      solution[v_ros_id] = get(vertex_point_map, outside_ros[i]);
+    }
+
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
+    scales.resize(ros.size());
+    std::fill(scales.begin(), scales.end(), 1.0);
+#endif
+  }
+
+  /// Assemble Laplacian matrix A of linear system A*X=B
+  void assemble_laplacian_and_factorize()
+  {
+    if(TAG == SPOKES_AND_RIMS)
+    {
+      assemble_laplacian_and_factorize_spokes_and_rims();
+    }
+    else
+    {
+      assemble_laplacian_and_factorize_arap();
+    }
+  }
+  /// Construct matrix that corresponds to left-hand side of eq:lap_ber in user manual
+  /// Also constraints are integrated as eq:lap_energy_system in user manual
+  void assemble_laplacian_and_factorize_arap()
+  {
+    if(!need_preprocess_factorization) { return; }
+    need_preprocess_factorization = false;
+
+    typename Sparse_linear_solver::Matrix A(ros.size());
+
+    /// assign cotangent Laplacian to ros vertices
+    for(std::size_t k = 0; k < ros.size(); k++)
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )          // vertices of ( roi - ctrl )
+      {
+        double diagonal = 0;
+        in_edge_iterator e, e_end;
+        for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
+        {
+          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+          vertex_descriptor vj = source(he, m_halfedge_graph);
+          double wij = hedge_weight[id(he)];  // edge(pi - pj)
+          double wji = hedge_weight[id(opposite(he, m_halfedge_graph))]; // edge(pi - pj)
+          double total_weight = wij + wji;
+
+          A.set_coef(vi_id, ros_id(vj), -total_weight, true); // off-diagonal coefficient
+          diagonal += total_weight;
+        }
+        // diagonal coefficient
+        A.set_coef(vi_id, vi_id, diagonal, true);
+      }
+      else
+      {
+        A.set_coef(vi_id, vi_id, 1.0, true);
+      }
+    }
+
+    // now factorize
+    double D;
+    last_preprocess_successful = m_solver.factor(A, D);
+    CGAL_warning(last_preprocess_successful);
+  }
+  /// Construct matrix that corresponds to left-hand side of eq:lap_ber_rims in user manual
+  /// Also constraints are integrated as eq:lap_energy_system in user manual
+  void assemble_laplacian_and_factorize_spokes_and_rims()
+  {
+    if(!need_preprocess_factorization) { return; }
+    need_preprocess_factorization = false;
+
+    typename Sparse_linear_solver::Matrix A(ros.size());
+
+    /// assign cotangent Laplacian to ros vertices
+    for(std::size_t k = 0; k < ros.size(); k++)
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      if ( is_roi_vertex(vi) && !is_control_vertex(vi) ) // vertices of ( roi - ctrl ): free vertices
+      {
+        double diagonal = 0;
+        out_edge_iterator e, e_end;
+        for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
+        {
+          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+          double total_weight = 0;
+          // an edge contribute to energy only if it is part of an incident triangle
+          // (i.e it should not be a border edge)
+          if(!is_border(he, m_halfedge_graph))
+          {
+            double wji = hedge_weight[id(he)]; // edge(pj - pi)
+            total_weight += wji;
+          }
+
+          halfedge_descriptor opp = opposite(he, m_halfedge_graph);
+          if(!is_border(opp, m_halfedge_graph))
+          {
+            double wij = hedge_weight[id(opp)]; // edge(pi - pj)
+            total_weight += wij;
+          }
+
+          // place coefficient to matrix
+          vertex_descriptor vj = target(he, m_halfedge_graph);
+          A.set_coef(vi_id, ros_id(vj), -total_weight, true); // off-diagonal coefficient
+          diagonal += total_weight;
+        }
+        // diagonal coefficient
+        A.set_coef(vi_id, vi_id, diagonal, true);
+      }
+      else // constrained vertex
+      {
+        A.set_coef(vi_id, vi_id, 1.0, true);
+      }
+    }
+
+    // now factorize
+    double D;
+    last_preprocess_successful = m_solver.factor(A, D);
+    CGAL_warning(last_preprocess_successful);
+  }
+
+  /// Local step of iterations, computing optimal rotation matrices
+  void optimal_rotations()
+  {
+    if(TAG == SPOKES_AND_RIMS)
+    {
+      optimal_rotations_spokes_and_rims();
+    }
+    else
+    {
+      optimal_rotations_arap();
+    }
+  }
+  void optimal_rotations_arap()
+  {
+    Closest_rotation_traits cr_traits;
+    CR_matrix cov = cr_traits.zero_matrix();
+
+    // only accumulate ros vertices
+    for ( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      // compute covariance matrix (user manual eq:cov_matrix)
+      cov = cr_traits.zero_matrix();
+
+      in_edge_iterator e, e_end;
+
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
+      cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph);
+      double ne_i=std::distance(e,e_end);
+#endif
+      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he=halfedge(*e, m_halfedge_graph);
+        vertex_descriptor vj = source(he, m_halfedge_graph);
+        std::size_t vj_id = ros_id(vj);
+
+        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
+        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
+        double wij = hedge_weight[id(he)];
+
+        cr_traits.add_scalar_t_vector_t_vector_transpose(cov, wij, pij, qij); // cov += wij * (pij * qij)
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP
+        // add neighbor rotation
+        cov += m_sr_arap_alpha * rot_mtr[vj_id].transpose() / ne_i;
+#endif
+
+      }
+
+      cr_traits.compute_close_rotation(cov, rot_mtr[vi_id]);
+    }
+  }
+  void optimal_rotations_spokes_and_rims()
+  {
+    Closest_rotation_traits cr_traits;
+    CR_matrix cov =cr_traits.zero_matrix();
+
+    // only accumulate ros vertices
+    for ( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      // compute covariance matrix
+      cov = cr_traits.zero_matrix();
+
+      //iterate through all triangles
+      out_edge_iterator e, e_end;
+      for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+        if(is_border(he, m_halfedge_graph)) { continue; } // no facet
+        // iterate edges around facet
+        halfedge_descriptor hedge_around_facet = he;
+        do
+        {
+          vertex_descriptor v1 = target(hedge_around_facet, m_halfedge_graph);
+          vertex_descriptor v2 = source(hedge_around_facet, m_halfedge_graph);
+
+          std::size_t v1_id = ros_id(v1); std::size_t v2_id = ros_id(v2);
+
+          const CR_vector& p12 = sub_to_CR_vector(original[v1_id], original[v2_id]);
+          const CR_vector& q12 = sub_to_CR_vector(solution[v1_id], solution[v2_id]);
+          double w12 = hedge_weight[id(hedge_around_facet)];
+
+          cr_traits.add_scalar_t_vector_t_vector_transpose(cov, w12, p12, q12); // cov += w12 * (p12 * q12);
+
+        } while( (hedge_around_facet = next(hedge_around_facet, m_halfedge_graph)) != he);
+      }
+
+      cr_traits.compute_close_rotation(cov, rot_mtr[vi_id]);
+    }
+  }
+
+#ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
+  void optimal_scales()
+  {
+    for ( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      // compute covariance matrix (user manual eq:cov_matrix)
+      double eT_eR = 0, eRT_eR = 0;
+
+      in_edge_iterator e, e_end;
+      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he = *e;
+        vertex_descriptor vj = source(he, m_halfedge_graph);
+        std::size_t vj_id = ros_id(vj);
+
+        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
+        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
+
+        double wij = hedge_weight[id(he)];
+
+        const CR_vector& pRij = rot_mtr[vi_id] * pij;
+        eRT_eR += pRij[0]*pRij[0] + pRij[1]*pRij[1] + pRij[2]*pRij[2];
+        eT_eR  += qij[0]*pRij[0]  + qij[1]*pRij[1]  + qij[2]*pRij[2];
+      }
+
+      scales[vi_id] = eT_eR / eRT_eR;
+    }
+  }
+#endif
+
+  /// Global step of iterations, updating solution
+  void update_solution()
+  {
+    if(TAG == SPOKES_AND_RIMS)
+    {
+      update_solution_spokes_and_rims();
+    }
+    else
+    {
+      update_solution_arap();
+    }
+  }
+  /// calculate right-hand side of eq:lap_ber in user manual and solve the system
+  void update_solution_arap()
+  {
+    typename Sparse_linear_solver::Vector X(ros.size()), Bx(ros.size());
+    typename Sparse_linear_solver::Vector Y(ros.size()), By(ros.size());
+    typename Sparse_linear_solver::Vector Z(ros.size()), Bz(ros.size());
+
+    Closest_rotation_traits cr_traits;
+
+    // assemble right columns of linear system
+    for ( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+
+      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )
+      {// free vertices
+        // sum of right-hand side of eq:lap_ber in user manual
+        CR_vector xyz = cr_traits.vector(0, 0, 0);
+
+        in_edge_iterator e, e_end;
+        for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
+        {
+          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+          vertex_descriptor vj = source(he, m_halfedge_graph);
+          std::size_t vj_id = ros_id(vj);
+
+          const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
+
+          double wij = hedge_weight[id(he)];
+          double wji = hedge_weight[id(opposite(he, m_halfedge_graph))];
+#ifndef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE
+          cr_traits.add__scalar_t_matrix_p_scalar_t_matrix__t_vector(xyz, wij, rot_mtr[vi_id], wji, rot_mtr[vj_id], pij);
+#else
+        cr_traits.add__scalar_t_matrix_p_scalar_t_matrix__t_vector(xyz, wij * scales[vi_id], rot_mtr[vi_id],
+          wji * scales[vj_id], rot_mtr[vj_id], pij);
+#endif
+          // corresponds xyz += (wij*rot_mtr[vi_id] + wji*rot_mtr[vj_id]) * pij
+        }
+        Bx[vi_id] = cr_traits.vector_coordinate(xyz, 0);
+        By[vi_id] = cr_traits.vector_coordinate(xyz, 1);
+        Bz[vi_id] = cr_traits.vector_coordinate(xyz, 2);
+      }
+      else
+      {// constrained vertex
+        Bx[vi_id] = solution[vi_id][0]; By[vi_id] = solution[vi_id][1]; Bz[vi_id] = solution[vi_id][2];
+      }
+    }
+
+    // solve "A*X = B".
+    bool is_all_solved = m_solver.linear_solver(Bx, X) && m_solver.linear_solver(By, Y) && m_solver.linear_solver(Bz, Z);
+    if(!is_all_solved) {
+      CGAL_warning(false);
+      return;
+    }
+    // copy to solution
+    for (std::size_t i = 0; i < ros.size(); i++)
+    {
+      std::size_t v_id = ros_id(ros[i]);
+      Point p(X[v_id], Y[v_id], Z[v_id]);
+      if (!is_ctrl_map[id(ros[i])])
+        solution[v_id] = p;
+    }
+  }
+  /// calculate right-hand side of eq:lap_ber_rims in user manual and solve the system
+  void update_solution_spokes_and_rims()
+  {
+    typename Sparse_linear_solver::Vector X(ros.size()), Bx(ros.size());
+    typename Sparse_linear_solver::Vector Y(ros.size()), By(ros.size());
+    typename Sparse_linear_solver::Vector Z(ros.size()), Bz(ros.size());
+
+    Closest_rotation_traits cr_traits;
+
+    // assemble right columns of linear system
+    for ( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+
+      if ( is_roi_vertex(vi) && !is_control_vertex(vi) )
+      {// free vertices
+        // sum of right-hand side of eq:lap_ber_rims in user manual
+        CR_vector xyz = cr_traits.vector(0, 0, 0);
+
+        out_edge_iterator e, e_end;
+        for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
+        {
+          halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+          vertex_descriptor vj = target(he, m_halfedge_graph);
+          std::size_t vj_id = ros_id(vj);
+
+          const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
+
+          if(!is_border(he, m_halfedge_graph))
+          {
+            vertex_descriptor vn = target(next(he, m_halfedge_graph), m_halfedge_graph); // opp vertex of e_ij
+            double wji = hedge_weight[id(he)] / 3.0;  // edge(pj - pi)
+            cr_traits.add_scalar_t_matrix_sum_t_vector(xyz, wji, rot_mtr[vi_id], rot_mtr[vj_id], rot_mtr[ros_id(vn)], pij);
+            // corresponds  xyz += wji*(rot_mtr[vi_id] + rot_mtr[vj_id] + rot_mtr[ros_id(vn)])*pij;
+          }
+
+          halfedge_descriptor opp = opposite(he, m_halfedge_graph);
+          if(!is_border(opp, m_halfedge_graph))
+          {
+            vertex_descriptor vm = target(next(opp, m_halfedge_graph), m_halfedge_graph); // other opp vertex of e_ij
+            double wij = hedge_weight[id(opp)] / 3.0;  // edge(pi - pj)
+            cr_traits.add_scalar_t_matrix_sum_t_vector(xyz, wij, rot_mtr[vi_id], rot_mtr[vj_id], rot_mtr[ros_id(vm)], pij);
+            // corresponds xyz += wij * ( rot_mtr[vi_id] + rot_mtr[vj_id] + rot_mtr[ros_id(vm)] ) * pij
+          }
+        }
+        Bx[vi_id] = cr_traits.vector_coordinate(xyz, 0);
+        By[vi_id] = cr_traits.vector_coordinate(xyz, 1);
+        Bz[vi_id] = cr_traits.vector_coordinate(xyz, 2);
+      }
+      else
+      {// constrained vertices
+        Bx[vi_id] = solution[vi_id][0]; By[vi_id] = solution[vi_id][1]; Bz[vi_id] = solution[vi_id][2];
+      }
+    }
+    // solve "A*X = B".
+    bool is_all_solved = m_solver.linear_solver(Bx, X) && m_solver.linear_solver(By, Y) && m_solver.linear_solver(Bz, Z);
+    if(!is_all_solved) {
+      CGAL_warning(false);
+      return;
+    }
+
+    // copy to solution
+    for (std::size_t i = 0; i < ros.size(); i++)
+    {
+      std::size_t v_id = ros_id(ros[i]);
+      Point p(X[v_id], Y[v_id], Z[v_id]);
+      if (!is_ctrl_map[id(ros[i])])
+        solution[v_id] = p;
+    }
+  }
+
+  /// Assign solution to target surface mesh
+  void assign_solution()
+  {
+    for(std::size_t i = 0; i < ros.size(); ++i){
+      std::size_t v_id = ros_id(ros[i]);
+      if(is_roi_vertex(ros[i]))
+      {
+        put(vertex_point_map, ros[i], solution[v_id]);
+      }
+    }
+  }
+
+  /// Compute modeling energy
+  double energy() const
+  {
+    if(TAG == SPOKES_AND_RIMS)
+    {
+      return energy_spokes_and_rims();
+    }
+    else
+    {
+      return energy_arap();
+      return 0;
+    }
+  }
+  double energy_arap() const
+  {
+    Closest_rotation_traits cr_traits;
+
+    double sum_of_energy = 0;
+    // only accumulate ros vertices
+    for( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+
+      in_edge_iterator e, e_end;
+      for (cpp11::tie(e,e_end) = in_edges(vi, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+        vertex_descriptor vj = source(he, m_halfedge_graph);
+        std::size_t vj_id = ros_id(vj);
+
+        const CR_vector& pij = sub_to_CR_vector(original[vi_id], original[vj_id]);
+        const CR_vector& qij = sub_to_CR_vector(solution[vi_id], solution[vj_id]);
+
+        double wij = hedge_weight[id(he)];
+
+        sum_of_energy += wij * cr_traits.squared_norm_vector_scalar_vector_subs(qij, rot_mtr[vi_id], pij);
+        // sum_of_energy += wij * ( qij - rot_mtr[vi_id]*pij )^2
+      }
+    }
+    return sum_of_energy;
+  }
+  double energy_spokes_and_rims() const
+  {
+    Closest_rotation_traits cr_traits;
+
+    double sum_of_energy = 0;
+    // only accumulate ros vertices
+    for( std::size_t k = 0; k < ros.size(); k++ )
+    {
+      vertex_descriptor vi = ros[k];
+      std::size_t vi_id = ros_id(vi);
+      //iterate through all triangles
+      out_edge_iterator e, e_end;
+      for (cpp11::tie(e,e_end) = out_edges(vi, m_halfedge_graph); e != e_end; e++)
+      {
+        halfedge_descriptor he = halfedge(*e, m_halfedge_graph);
+        if(is_border(he, m_halfedge_graph)) { continue; } // no facet
+        // iterate edges around facet
+        halfedge_descriptor hedge_around_facet = he;
+        do
+        {
+          vertex_descriptor v1 = target(hedge_around_facet, m_halfedge_graph);
+          vertex_descriptor v2 = source(hedge_around_facet, m_halfedge_graph);
+          std::size_t v1_id = ros_id(v1); std::size_t v2_id = ros_id(v2);
+
+          const CR_vector& p12 = sub_to_CR_vector(original[v1_id], original[v2_id]);
+          const CR_vector& q12 = sub_to_CR_vector(solution[v1_id], solution[v2_id]);
+          double w12 = hedge_weight[id(hedge_around_facet)];
+
+          sum_of_energy += w12 * cr_traits.squared_norm_vector_scalar_vector_subs(q12, rot_mtr[vi_id], p12);
+          // sum_of_energy += w12 * ( q12 - rot_mtr[vi_id]*p12 )^2
+
+        } while( (hedge_around_facet = next(hedge_around_facet, m_halfedge_graph)) != he);
+      }
+    }
+    return sum_of_energy;
+  }
+
+  void need_preprocess_both()
+  {
+    need_preprocess_factorization = true;
+    need_preprocess_region_of_solution = true;
+  }
+
+  /// p1 - p2, return CR_vector
+  CR_vector sub_to_CR_vector(const Point& p1, const Point& p2) const
+  {
+    return Closest_rotation_traits().vector(p1[0] - p2[0], p1[1] - p2[1], p1[2] - p2[2]);
+  }
+
+  template<class Vect>
+  Point add_to_point(const Point& p, const Vect& v) {
+    return Point(p[0] + v[0], p[1] + v[1], p[2] + v[2]);
+  }
+
+  template<class Vect>
+  Vect sub_to_vect(const Point& p, const Vect& v) {
+    return Vect(p[0] - v[0], p[1] - v[1], p[2] - v[2]);
+  }
+
+  /// shorthand of get(vertex_index_map, v)
+  std::size_t id(vertex_descriptor vd) const
+  { return get(vertex_index_map, vd); }
+
+  std::size_t& ros_id(vertex_descriptor vd)
+  { return ros_id_map[id(vd)]; }
+  std::size_t  ros_id(vertex_descriptor vd) const
+  { return ros_id_map[id(vd)]; }
+
+  /// shorthand of get(hedge_index_map, e)
+  std::size_t id(halfedge_descriptor e) const
+  {
+    return get(hedge_index_map, e);
+  }
+};
+} //namespace CGAL
+#endif  // CGAL_SURFACE_MESH_DEFORMATION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path.h
new file mode 100644
index 0000000..fd771b1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_H
+
+/**
+ * \ingroup PkgSurfaceMeshShortestPath
+ * \file CGAL/Surface_mesh_shortest_path.h
+ * Convenience header file only including `CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h`
+ * and `CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h`.
+ */
+
+#include <CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h>
+#include <CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h>
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h
new file mode 100644
index 0000000..3147938
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h
@@ -0,0 +1,2786 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_SURFACE_MESH_SHORTEST_PATH_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_SURFACE_MESH_SHORTEST_PATH_H
+
+#include <iterator>
+#include <vector>
+#include <utility>
+#include <queue>
+#include <algorithm>
+#include <cstddef>
+#include <list>
+
+#include <boost/array.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <iterator>
+
+#include <CGAL/assertions.h>
+#include <CGAL/AABB_tree.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/Surface_mesh_shortest_path/barycentric.h>
+#include <CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h>
+#include <CGAL/Surface_mesh_shortest_path/internal/misc_functions.h>
+
+#include <CGAL/boost/graph/iterator.h>
+#include <boost/variant/get.hpp>
+
+namespace CGAL {
+
+/*!
+\ingroup PkgSurfaceMeshShortestPath
+
+\brief Computes shortest surface paths from one or more source points on a surface mesh.
+
+\details Uses an optimized variation of Chen and Han's \f$ O(n^2) \f$ algorithm by Xin and Wang.
+Refer to those respective papers for the details of the implementation.
+
+\tparam Traits a model of `SurfaceMeshShortestPathTraits`.
+\tparam VIM a model of `ReadablePropertyMap` with `vertex_descriptor` as key and `unsigned int` as value type.
+            The default is `boost::property_map<HG, boost::%vertex_index_t>::%type`.
+\tparam HIM a model of `ReadablePropertyMap` with `halfedge_descriptor` as key and `unsigned int` as value type.
+            The default is `boost::property_map<HG, boost::%halfedge_index_t>::%type`.
+\tparam FIM a model of `ReadablePropertyMap` with `face_descriptor` as key and `unsigned int` as value type.
+            The default is `boost::property_map<HG, boost::%face_index_t>::%type`.
+\tparam VPM a model of `ReadablePropertyMap` with `vertex_descriptor` as key and `Traits::Point_3` as value type.
+            The default is `boost::property_map<HG, CGAL::vertex_point_t>::%type`.
+*/
+
+template<class Traits,
+  class VIM = Default,
+  class HIM = Default,
+  class FIM = Default,
+  class VPM = Default>
+class Surface_mesh_shortest_path
+{
+public:
+/// \name Types
+/// @{
+
+  /// The triangle mesh type which this algorithm acts on.
+  typedef typename Traits::Triangle_mesh Triangle_mesh;
+
+  /// The BGL graph traits for this triangle mesh
+  typedef boost::graph_traits<Triangle_mesh> Graph_traits;
+
+  /// Descriptors for the vertices of `Triangle_mesh`
+  typedef typename Graph_traits::vertex_descriptor vertex_descriptor;
+
+  /// Descriptors for the halfedges of `Triangle_mesh`
+  typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor;
+
+  /// Descriptors of the faces of `Triangle_mesh`
+  typedef typename Graph_traits::face_descriptor face_descriptor;
+
+#ifndef DOXYGEN_RUNNING
+
+  typedef typename Default::Get<
+    VIM,
+    typename boost::property_map<Triangle_mesh, boost::vertex_index_t>::type
+      >::type Vertex_index_map;
+
+  typedef typename Default::Get<
+    HIM,
+    typename boost::property_map<Triangle_mesh, boost::halfedge_index_t>::type
+      >::type Halfedge_index_map;
+
+  typedef typename Default::Get<
+    FIM,
+    typename boost::property_map<Triangle_mesh, boost::face_index_t>::type
+      >::type Face_index_map;
+
+  typedef typename Default::Get<
+    VPM,
+    typename boost::property_map<Triangle_mesh, CGAL::vertex_point_t>::type
+      >::type Vertex_point_map;
+
+#else
+  /// The vertex index property map class
+  typedef VIM Vertex_index_map;
+
+  /// The halfedge index property map class
+  typedef HIM Halfedge_index_map;
+
+  /// The face index property map class
+  typedef FIM Face_index_map;
+
+  /// The vertex point property map class
+  typedef VPM Vertex_point_map;
+#endif
+
+  /// The numeric type used by this algorithm.
+  typedef typename Traits::FT FT;
+
+  /// The 3-dimensional point type, which must coincide with the value type of `Vertex_point_map`.
+  typedef typename Traits::Point_3 Point_3;
+
+  /// An ordered triple which specifies a location inside a triangle as
+  /// a convex combination of its three vertices.
+  typedef typename Traits::Barycentric_coordinate Barycentric_coordinate;
+
+  /// \brief An ordered pair specifying a location on the surface of the `Triangle_mesh`.
+  /// \details If `g` is the input graph and given the pair (`f`, `bc`) such that `bc` is `(w0, w1, w2)`,
+  ///  the correspondance with the weights in `bc` and the vertices of the face `f` is the following:
+  /// - `w0 = source(halfedge(f,g),g)`
+  /// - `w1 = target(halfedge(f,g),g)`
+  /// - `w2 = target(next(halfedge(f,g),g),g)`
+  typedef std::pair<face_descriptor, Barycentric_coordinate> Face_location;
+
+private:
+
+  typedef std::list<Face_location> Source_point_list;
+  typedef typename Source_point_list::iterator Source_point_underlying_iterator;
+
+public:
+
+  /*!
+  \brief A model of `BidirectionalIterator` to access the source points
+
+  \details An iterator becomes invalid if:
+   - the corresponding point is removed (either with `Surface_mesh_shortest_path::remove_source_point()` or `Surface_mesh_shortest_path::remove_all_source_points()`).
+   - the structure is re-built (triggered by a shortest path query or a call to `Surface_mesh_shortest_path::build_sequence_tree()`).
+   - the structure is cleared (`Surface_mesh_shortest_path::clear()`).
+
+  Dereferencing this iterator yields a `const Surface_mesh_shortest_path::Face_location&`.
+
+  This iterator supports equality comparison operations.
+  */
+  class Source_point_iterator
+  {
+  public:
+    typedef std::bidirectional_iterator_tag iterator_category;
+    typedef Face_location value_type;
+    typedef Face_location* pointer;
+    typedef Face_location& reference;
+
+  private:
+    Source_point_underlying_iterator m_iterator;
+
+    friend class Surface_mesh_shortest_path;
+
+    Source_point_iterator(Source_point_underlying_iterator it)
+      : m_iterator(it)
+    {
+    }
+
+  public:
+    /*!
+    \brief %Default constructor
+    */
+    Source_point_iterator()
+    {
+    }
+
+    /*!
+    \brief Copy constructor
+    */
+    Source_point_iterator(const Source_point_iterator& other)
+      : m_iterator(other.m_iterator)
+    {
+    }
+
+    /*
+    \brief Copy the contents of another `Source_point_iterator`
+
+    \param other The iterator to be copied
+    */
+    Source_point_iterator& operator=(const Source_point_iterator& other)
+    {
+      m_iterator = other.m_iterator;
+      return *this;
+    }
+
+    const Face_location& operator*() const
+    {
+      return *m_iterator;
+    }
+
+    const Face_location* operator->() const
+    {
+      return &(*m_iterator);
+    }
+
+    Source_point_iterator& operator++()
+    {
+      ++m_iterator;
+      return *this;
+    }
+
+    Source_point_iterator operator++(int)
+    {
+      Source_point_iterator temp(*this);
+      ++m_iterator;
+      return temp;
+    }
+
+    Source_point_iterator& operator--()
+    {
+      --m_iterator;
+      return *this;
+    }
+
+    Source_point_iterator operator--(int)
+    {
+      Source_point_iterator temp(*this);
+      --m_iterator;
+      return temp;
+    }
+
+    bool operator==(const Source_point_iterator& other)
+    {
+      return m_iterator == other.m_iterator;
+    }
+
+    bool operator!=(const Source_point_iterator& other)
+    {
+      return m_iterator != other.m_iterator;
+    }
+  };
+
+  /// The return type from shortest path distance queries. Stores the distance
+  /// to the nearest source point, and a `Source_point_iterator` to the
+  /// source point itself.
+  typedef std::pair<FT, Source_point_iterator> Shortest_path_result;
+
+/// @}
+
+private:
+  typedef typename Graph_traits::vertex_iterator vertex_iterator;
+  typedef typename Graph_traits::halfedge_iterator halfedge_iterator;
+  typedef typename Graph_traits::face_iterator face_iterator;
+
+  typedef typename Traits::Triangle_3 Triangle_3;
+  typedef typename Traits::Triangle_2 Triangle_2;
+  typedef typename Traits::Segment_2 Segment_2;
+  typedef typename Traits::Ray_3 Ray_3;
+  typedef typename Traits::Ray_2 Ray_2;
+  typedef typename Traits::Line_2 Line_2;
+  typedef typename Traits::Point_2 Point_2;
+  typedef typename Traits::Vector_2 Vector_2;
+
+  typedef internal::Cone_tree_node<Traits> Cone_tree_node;
+  typedef internal::Cone_expansion_event<Traits> Cone_expansion_event;
+
+  typedef std::priority_queue<Cone_expansion_event, std::vector<Cone_expansion_event*>, internal::Cone_expansion_event_min_priority_queue_comparator<Traits> > Expansion_priqueue;
+  typedef std::pair<Cone_tree_node*, FT> Node_distance_pair;
+
+private:
+
+  template <class OutputIterator>
+  struct Point_path_visitor_wrapper
+  {
+    Surface_mesh_shortest_path& m_owner;
+    OutputIterator m_output;
+
+    Point_path_visitor_wrapper(Surface_mesh_shortest_path& owner, OutputIterator output)
+      : m_owner(owner)
+      , m_output(output)
+    {
+    }
+
+    void operator()(halfedge_descriptor edge, FT t)
+    {
+      *m_output = m_owner.point(edge, t);
+      ++m_output;
+    }
+
+    void operator()(vertex_descriptor vertex)
+    {
+      *m_output = m_owner.point(vertex);
+      ++m_output;
+    }
+
+    void operator()(face_descriptor f, Barycentric_coordinate location)
+    {
+      *m_output = m_owner.point(f, location);
+      ++m_output;
+    }
+  };
+
+private:
+  Traits m_traits;
+  Triangle_mesh& m_graph;
+  Vertex_index_map m_vertexIndexMap;
+  Halfedge_index_map m_halfedgeIndexMap;
+  Face_index_map m_faceIndexMap;
+  Vertex_point_map m_vertexPointMap;
+
+  std::vector<bool> m_vertexIsPseudoSource;
+
+  std::vector<Node_distance_pair> m_vertexOccupiers;
+  std::vector<Node_distance_pair> m_closestToVertices;
+
+  std::vector<std::pair<Cone_tree_node*, Source_point_iterator> > m_rootNodes;
+  Source_point_list m_faceLocations;
+  Source_point_underlying_iterator m_firstNewSourcePoint;
+  Source_point_list m_deletedSourceLocations;
+
+  std::vector<std::vector<Cone_tree_node*> > m_faceOccupiers;
+
+  Expansion_priqueue m_expansionPriqueue;
+
+#if !defined(NDEBUG)
+
+  std::size_t m_currentNodeCount;
+  std::size_t m_peakNodeCount;
+  std::size_t m_queueAtPeakNodes;
+  std::size_t m_peakQueueSize;
+  std::size_t m_nodesAtPeakQueue;
+
+#endif
+
+#if !defined(NDEBUG)
+public:
+
+  /// \cond
+
+  std::size_t peak_node_count()
+  {
+    return m_peakNodeCount;
+  }
+
+  std::size_t current_node_count()
+  {
+    return m_currentNodeCount;
+  }
+
+  std::size_t peak_queue_size()
+  {
+    return m_peakQueueSize;
+  }
+
+  std::size_t current_memory_usage()
+  {
+    std::size_t baseUsage = m_rootNodes.size() * sizeof(Cone_tree_node*) + m_closestToVertices.size() * sizeof(Node_distance_pair);
+
+    std::size_t finalUsage = baseUsage + sizeof(Cone_tree_node) * m_currentNodeCount;
+
+    for (std::size_t i = 0; i < m_faceOccupiers.size(); ++i)
+    {
+      finalUsage += (m_faceOccupiers[i].size() * sizeof(Cone_tree_node*)) + sizeof(std::vector<Cone_tree_node*>);
+    }
+
+    return finalUsage;
+  }
+
+  std::size_t peak_memory_usage()
+  {
+    std::size_t baseUsage = m_rootNodes.size() * sizeof(Cone_tree_node*) + m_vertexOccupiers.size() * sizeof(Node_distance_pair) + m_closestToVertices.size() * sizeof(Node_distance_pair);
+
+    std::size_t peakNodeUsage = baseUsage + (sizeof(Cone_tree_node) * m_peakNodeCount) + ((sizeof(Cone_expansion_event) + sizeof(Cone_expansion_event*)) * m_queueAtPeakNodes);
+
+    std::size_t peakQueueUsage = baseUsage + (sizeof(Cone_expansion_event) + (sizeof(Cone_expansion_event*)) * m_peakQueueSize) + (sizeof(Cone_tree_node) * m_nodesAtPeakQueue);
+
+    return std::max(peakNodeUsage, peakQueueUsage);
+  }
+
+  /// \endcond
+
+#endif
+
+
+public:
+
+  /// \cond
+
+  /// This is just a placeholder for a proper debug output verbosity switch method
+  bool m_debugOutput;
+
+  /// \endcond
+
+private:
+
+  void node_created()
+  {
+#if !defined(NDEBUG)
+    ++m_currentNodeCount;
+    if (m_currentNodeCount > m_peakNodeCount)
+    {
+      m_peakNodeCount = m_currentNodeCount;
+      m_queueAtPeakNodes = m_expansionPriqueue.size();
+    }
+#endif
+  }
+
+  void queue_pushed()
+  {
+#if !defined(NDEBUG)
+    if (m_expansionPriqueue.size() > m_peakQueueSize)
+    {
+      m_peakQueueSize = m_expansionPriqueue.size();
+      m_nodesAtPeakQueue = m_currentNodeCount;
+    }
+#endif
+  }
+
+  void node_deleted()
+  {
+#if !defined(NDEBUG)
+    --m_currentNodeCount;
+#endif
+  }
+
+  Point_2 construct_barycenter_in_triangle_2(const Triangle_2& t, const Barycentric_coordinate& b) const
+  {
+    return construct_barycenter_in_triangle_2(t, b, m_traits);
+  }
+
+  static Point_2 construct_barycenter_in_triangle_2(const Triangle_2& t, const Barycentric_coordinate& b, const Traits& traits)
+  {
+    typename Traits::Construct_vertex_2 cv2(traits.construct_vertex_2_object());
+    typename Traits::Construct_barycentric_coordinate_weight cbcw(traits.construct_barycentric_coordinate_weight_object());
+    typename Traits::Construct_barycenter_2 cb2(traits.construct_barycenter_2_object());
+
+    return cb2(cv2(t, 0), cbcw(b, 0), cv2(t, 1), cbcw(b, 1), cv2(t, 2), cbcw(b, 2));
+  }
+
+  Point_3 construct_barycenter_in_triangle_3(const Triangle_3& t, const Barycentric_coordinate& b) const
+  {
+    return construct_barycenter_in_triangle_3(t, b, m_traits);
+  }
+
+  static Point_3 construct_barycenter_in_triangle_3(const Triangle_3& t, const Barycentric_coordinate& b, const Traits& traits)
+  {
+    typename Traits::Construct_vertex_3 cv3(traits.construct_vertex_3_object());
+    typename Traits::Construct_barycentric_coordinate_weight cbcw(traits.construct_barycentric_coordinate_weight_object());
+    typename Traits::Construct_barycenter_3 cb3(traits.construct_barycenter_3_object());
+
+    return cb3(cv3(t, 0), cbcw(b, 0), cv3(t, 1), cbcw(b, 1), cv3(t, 2), cbcw(b, 2));
+  }
+
+  Triangle_3 triangle_from_halfedge(halfedge_descriptor edge) const
+  {
+    return triangle_from_halfedge(edge, m_graph, m_vertexPointMap);
+  }
+
+  static Triangle_3 triangle_from_halfedge(halfedge_descriptor edge, const Triangle_mesh& g)
+  {
+    return triangle_from_halfedge(edge, g, get(vertex_point, g));
+  }
+
+  static Triangle_3 triangle_from_halfedge(halfedge_descriptor edge, const Triangle_mesh& g, Vertex_point_map vertexPointMap)
+  {
+    return CGAL::internal::triangle_from_halfedge<Triangle_3, Triangle_mesh, Vertex_point_map>(edge, g, vertexPointMap);
+  }
+
+  Triangle_3 triangle_from_face(face_descriptor f) const
+  {
+    return triangle_from_face(f, m_graph, m_vertexPointMap);
+  }
+
+  static Triangle_3 triangle_from_face(face_descriptor f, const Triangle_mesh& g)
+  {
+    return triangle_from_halfedge(halfedge(f, g), g, get(vertex_point, g));
+  }
+
+  static Triangle_3 triangle_from_face(face_descriptor f, const Triangle_mesh& g, Vertex_point_map vertexPointMap)
+  {
+    return triangle_from_halfedge(halfedge(f, g), g, vertexPointMap);
+  }
+
+  /*
+    Filtering algorithm described in Xin and Wang (2009) "Improving chen and han's algorithm on the discrete geodesic problem."
+    http://doi.acm.org/10.1145/1559755.1559761
+  */
+  bool window_distance_filter(Cone_tree_node* cone, Segment_2 windowSegment, bool reversed)
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    typename Traits::Compute_squared_distance_2 csd2(m_traits.compute_squared_distance_2_object());
+
+    Segment_2 parentEntrySegment = cone->entry_segment();
+    Point_2 v2 = cone->target_point();
+    Point_2 I = cone->source_image();
+    FT d = cone->distance_from_source_to_root();
+    FT d1;
+    FT d2;
+    FT d3;
+    Point_2 A;
+    Point_2 B;
+    Point_2 v1;
+    Point_2 v3;
+
+    std::size_t v1Index = get(m_vertexIndexMap, source(cone->entry_edge(), m_graph));
+    std::size_t v2Index = get(m_vertexIndexMap, cone->target_vertex());
+    std::size_t v3Index = get(m_vertexIndexMap, target(cone->entry_edge(), m_graph));
+
+    Node_distance_pair v1Distance = m_closestToVertices[v1Index];
+    Node_distance_pair v2Distance = m_closestToVertices[v2Index];
+    Node_distance_pair v3Distance = m_closestToVertices[v3Index];
+
+    if (reversed)
+    {
+      std::swap(v1Distance, v3Distance);
+      std::swap(v1Index, v3Index);
+      A = cv2(windowSegment, 1);
+      B = cv2(windowSegment, 0);
+      v1 = cv2(parentEntrySegment, 1);
+      v3 = cv2(parentEntrySegment, 0);
+    }
+    else
+    {
+      A = cv2(windowSegment, 0);
+      B = cv2(windowSegment, 1);
+      v1 = cv2(parentEntrySegment, 0);
+      v3 = cv2(parentEntrySegment, 1);
+    }
+
+    d1 = v1Distance.second;
+    d2 = v2Distance.second;
+    d3 = v3Distance.second;
+
+    bool hasD1 = v1Distance.first != NULL && v1Distance.first != cone->parent();
+    bool hasD2 = v2Distance.first != NULL && v2Distance.first != cone->parent();
+    bool hasD3 = v3Distance.first != NULL && v3Distance.first != cone->parent();
+
+    if (hasD1 && (d + CGAL::internal::select_sqrt(csd2(I, B)) > d1 + CGAL::internal::select_sqrt(csd2(v1, B))))
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Filter: d + |I,B| > d1 + |v1,B|: " << std::endl;
+        std::cout << "v1 = " << v1Index << " , " << d1 << " , v2 = " << v2Index << " , " << d2 << " , v3 = " << v3Index << " , " << d3 << std::endl;
+        std::cout << "d = " << d << std::endl;
+        std::cout << "v1,B = " << CGAL::internal::select_sqrt(csd2(v1, B)) << std::endl;
+        std::cout << "I,B = " << CGAL::internal::select_sqrt(csd2(I, B)) << std::endl;
+        std::cout << "I,A = " << CGAL::internal::select_sqrt(csd2(I, A)) << std::endl;
+        std::cout << (d + CGAL::internal::select_sqrt(csd2(I, B))) << " vs. " << (d1 + CGAL::internal::select_sqrt(csd2(v1, B))) << std::endl;
+      }
+
+      return false;
+    }
+
+    if (hasD2 && (d + CGAL::internal::select_sqrt(csd2(I, A)) > d2 + CGAL::internal::select_sqrt(csd2(v2, A))))
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Filter: d + |I,A| > d2 + |v2,A|: " << std::endl;
+        std::cout << "v1 = " << v1Index << " , " << d1 << " , v2 = " << v2Index << " , " << d2 << " , v3 = " << v3Index << " , " << d3 << std::endl;
+        std::cout << "d = " << d << std::endl;
+        std::cout << "v2,A = " << CGAL::internal::select_sqrt(csd2(v2, A)) << std::endl;
+        std::cout << "I,A = " << CGAL::internal::select_sqrt(csd2(I, A)) << std::endl;
+        std::cout << (d + CGAL::internal::select_sqrt(csd2(I, A))) << " vs. " << (d2 + CGAL::internal::select_sqrt(csd2(v2, A))) << std::endl;
+      }
+
+      return false;
+    }
+
+    if (hasD3 && (d + CGAL::internal::select_sqrt(csd2(I, A)) > d3 + CGAL::internal::select_sqrt(csd2(v3, A))))
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Filter: d + |I,A| > d3 + |v3,A|: " << std::endl;
+        std::cout << "v1 = " << v1Index << " , " << d1 << " , v2 = " << v2Index << " , " << d2 << " , v3 = " << v3Index << " , " << d3 << std::endl;
+        std::cout << "d = " << d << std::endl;
+        std::cout << "v3,A = " << CGAL::internal::select_sqrt(csd2(v3, A)) << std::endl;
+        std::cout << "I,A = " << CGAL::internal::select_sqrt(csd2(I, A)) << std::endl;
+        std::cout << (d + CGAL::internal::select_sqrt(csd2(I, A))) << " vs. " << (d3 + CGAL::internal::select_sqrt(csd2(v3, A))) << std::endl;
+      }
+
+      return false;
+    }
+
+    return true;
+  }
+
+  /*
+    Push a new node representing crossing the edge to the left of `cone`'s target vertex
+  */
+  void expand_left_child(Cone_tree_node* cone, Segment_2 windowSegment)
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    typename Traits::Construct_triangle_3_along_segment_2_flattening ft3as2(m_traits.construct_triangle_3_along_segment_2_flattening_object());
+
+    CGAL_assertion(cone->m_pendingLeftSubtree != NULL);
+
+    cone->m_pendingLeftSubtree = NULL;
+
+    if (window_distance_filter(cone, windowSegment, false))
+    {
+      Triangle_3 adjacentFace = triangle_from_halfedge(cone->left_child_edge());
+      Triangle_2 layoutFace = ft3as2(adjacentFace, 0, cone->left_child_base_segment());
+      Cone_tree_node* child = new Cone_tree_node(m_traits, m_graph, cone->left_child_edge(), layoutFace, cone->source_image(), cone->distance_from_source_to_root(), cv2(windowSegment, 0), cv2(windowSegment, 1), Cone_tree_node::INTERVAL);
+      node_created();
+      cone->set_left_child(child);
+      process_node(child);
+    }
+    else if (m_debugOutput)
+    {
+      std::cout << "\tNode was filtered." << std::endl;
+    }
+  }
+
+  /*
+    Push a new node representing crossing the edge to the right of `cone`'s target vertex
+  */
+  void expand_right_child(Cone_tree_node* cone, Segment_2 windowSegment)
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    typename Traits::Construct_triangle_3_along_segment_2_flattening ft3as2(m_traits.construct_triangle_3_along_segment_2_flattening_object());
+
+    CGAL_assertion(cone->m_pendingRightSubtree != NULL);
+
+    cone->m_pendingRightSubtree = NULL;
+
+    if (window_distance_filter(cone, windowSegment, true))
+    {
+      Triangle_3 adjacentFace = triangle_from_halfedge(cone->right_child_edge());
+      Triangle_2 layoutFace = ft3as2(adjacentFace, 0, cone->right_child_base_segment());
+      Cone_tree_node* child = new Cone_tree_node(m_traits, m_graph, cone->right_child_edge(), layoutFace, cone->source_image(), cone->distance_from_source_to_root(), cv2(windowSegment, 0), cv2(windowSegment, 1), Cone_tree_node::INTERVAL);
+      node_created();
+      cone->set_right_child(child);
+      process_node(child);
+    }
+    else if (m_debugOutput)
+    {
+      std::cout << "\tNode was filtered." << std::endl;
+    }
+  }
+
+  /*
+    Determines whether to expand `location` as a face, edge, or vertex root, depending on
+    whether it is near to a given edge or vertex, or is an internal face location
+  */
+  void expand_root(face_descriptor f, Barycentric_coordinate location, Source_point_iterator sourcePointIt)
+  {
+    typename Traits::Construct_barycentric_coordinate_weight cbcw(m_traits.construct_barycentric_coordinate_weight_object());
+    typename Traits::Classify_barycentric_coordinate classify_barycentric_coordinate(m_traits.classify_barycentric_coordinate_object());
+
+    std::size_t associatedEdge;
+    CGAL::Surface_mesh_shortest_paths_3::Barycentric_coordinate_type type;
+    boost::tie(type, associatedEdge) = classify_barycentric_coordinate(location);
+
+    switch (type)
+    {
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_BOUNDED_SIDE:
+        expand_face_root(f, location, sourcePointIt);
+        break;
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_BOUNDARY:
+        {
+          halfedge_descriptor he = halfedge(f, m_graph);
+          for (std::size_t i = 0; i < associatedEdge; ++i)
+          {
+            he = next(he, m_graph);
+          }
+          expand_edge_root(he, cbcw(location, associatedEdge), cbcw(location, (associatedEdge + 1) % 3), sourcePointIt);
+        }
+        break;
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_VERTEX:
+        {
+          halfedge_descriptor he = halfedge(f, m_graph);
+          for (std::size_t i = 0; i < associatedEdge; ++i)
+          {
+            he = next(he, m_graph);
+          }
+          expand_vertex_root(source(he, m_graph), sourcePointIt);
+        }
+        break;
+      default:
+        CGAL_assertion(false && "Invalid face location");
+        // Perhaps hit an assertion that the type must not be external or invalid?
+    }
+  }
+
+  /*
+    Create source nodes facing each edge of `f`, rooted at the given `faceLocation`
+  */
+  void expand_face_root(face_descriptor f, Barycentric_coordinate faceLocation, Source_point_iterator sourcePointIt)
+  {
+    typename Traits::Construct_triangle_3_to_triangle_2_projection pt3t2(m_traits.construct_triangle_3_to_triangle_2_projection_object());
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+
+    halfedge_descriptor start = halfedge(f, m_graph);
+    halfedge_descriptor current = start;
+
+    Cone_tree_node* faceRoot = new Cone_tree_node(m_traits, m_graph, m_rootNodes.size());
+    node_created();
+    m_rootNodes.push_back(std::make_pair(faceRoot, sourcePointIt));
+
+    if (m_debugOutput)
+    {
+      typename Traits::Construct_barycentric_coordinate_weight cbcw(m_traits.construct_barycentric_coordinate_weight_object());
+      std::cout << "\tFace Root Expansion: id = " << get(m_faceIndexMap, f) << " , Location = " << cbcw(faceLocation, 0) << " " << cbcw(faceLocation, 1) << " " << cbcw(faceLocation, 2) << " " << std::endl;
+    }
+
+    for (std::size_t currentVertex = 0; currentVertex < 3; ++currentVertex)
+    {
+      Triangle_3 face3d(triangle_from_halfedge(current));
+      Triangle_2 layoutFace(pt3t2(face3d));
+      Barycentric_coordinate rotatedFaceLocation(shifted_coordiate(faceLocation, currentVertex));
+      Point_2 sourcePoint(construct_barycenter_in_triangle_2(layoutFace, rotatedFaceLocation));
+
+      Cone_tree_node* child = new Cone_tree_node(m_traits, m_graph, current, layoutFace, sourcePoint, FT(0.0), cv2(layoutFace, 0), cv2(layoutFace, 2), Cone_tree_node::FACE_SOURCE);
+      node_created();
+      faceRoot->push_middle_child(child);
+
+      if (m_debugOutput)
+      {
+        std::cout << "\tExpanding face root #" << currentVertex << " : " << std::endl;;
+        std::cout << "\t\tFace = " << layoutFace << std::endl;
+        std::cout << "\t\tLocation = " << sourcePoint << std::endl;
+      }
+
+      process_node(child);
+
+      current = next(current, m_graph);
+    }
+  }
+
+  /*
+    Create 'source' nodes to each size of the given edge, rooted at the specified parametric location
+  */
+  void expand_edge_root(halfedge_descriptor baseEdge, FT t0, FT t1, Source_point_iterator sourcePointIt)
+  {
+    typename Traits::Construct_barycenter_2 cb2(m_traits.construct_barycenter_2_object());
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    typename Traits::Construct_triangle_3_to_triangle_2_projection pt3t2(m_traits.construct_triangle_3_to_triangle_2_projection_object());
+
+    if (m_debugOutput)
+    {
+      std::cout << "\tEdge Root Expansion: faceA = " << get(m_faceIndexMap, face(baseEdge, m_graph)) << " , faceB = " << get(m_faceIndexMap, face(opposite(baseEdge, m_graph), m_graph)) << " , t0 = " << t0 << " , t1 = " << t1 << std::endl;
+    }
+
+    halfedge_descriptor baseEdges[2];
+    baseEdges[0] = baseEdge;
+    baseEdges[1] = opposite(baseEdge, m_graph);
+
+    Triangle_3 faces3d[2];
+    Triangle_2 layoutFaces[2];
+
+    for (std::size_t i = 0; i < 2; ++i)
+    {
+       faces3d[i] = triangle_from_halfedge(baseEdges[i]);
+       layoutFaces[i] = pt3t2(faces3d[i]);
+    }
+
+    Point_2 sourcePoints[2];
+    sourcePoints[0] = cb2(cv2(layoutFaces[0], 0), t0, cv2(layoutFaces[0], 1), t1);
+    sourcePoints[1] = cb2(cv2(layoutFaces[1], 0), t0, cv2(layoutFaces[1], 1), t1);
+
+    Cone_tree_node* edgeRoot = new Cone_tree_node(m_traits, m_graph, m_rootNodes.size());
+    node_created();
+    m_rootNodes.push_back(std::make_pair(edgeRoot, sourcePointIt));
+
+    for (std::size_t side = 0; side < 2; ++side)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "\tExpanding edge root #" << side << " : " << std::endl;;
+        std::cout << "\t\tFace = " << layoutFaces[side] << std::endl;
+        std::cout << "\t\tLocation = " << sourcePoints[side] << std::endl;
+      }
+
+      Cone_tree_node* mainChild = new Cone_tree_node(m_traits, m_graph, baseEdges[side], layoutFaces[side], sourcePoints[side], FT(0.0), cv2(layoutFaces[side], 0), cv2(layoutFaces[side], 1), Cone_tree_node::EDGE_SOURCE);
+      node_created();
+      edgeRoot->push_middle_child(mainChild);
+      process_node(mainChild);
+    }
+  }
+
+  /*
+    Create a 'source' node for each face surrounding the given vertex.
+  */
+  void expand_vertex_root(vertex_descriptor vertex, Source_point_iterator sourcePointIt)
+  {
+    if (m_debugOutput)
+    {
+      std::cout << "\tVertex Root Expansion: Vertex = " << get(m_vertexIndexMap, vertex) << std::endl;
+    }
+
+    Cone_tree_node* vertexRoot = new Cone_tree_node(m_traits, m_graph, m_rootNodes.size(), prev(halfedge(vertex, m_graph), m_graph));
+
+    node_created();
+    m_rootNodes.push_back(std::make_pair(vertexRoot, sourcePointIt));
+
+    m_closestToVertices[get(m_vertexIndexMap, vertex)] = Node_distance_pair(vertexRoot, FT(0.0));
+
+    expand_pseudo_source(vertexRoot);
+  }
+
+  /*
+    Create child nodes for each face surrounding the vertex occupied by `parent`, and push them to the queue
+  */
+  void expand_pseudo_source(Cone_tree_node* parent)
+  {
+    typename Traits::Construct_triangle_3_to_triangle_2_projection pt3t2(m_traits.construct_triangle_3_to_triangle_2_projection_object());
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+
+    parent->m_pendingMiddleSubtree = NULL;
+
+    vertex_descriptor expansionVertex = parent->target_vertex();
+
+    halfedge_descriptor startEdge = halfedge(expansionVertex, m_graph);
+    halfedge_descriptor currentEdge = halfedge(expansionVertex, m_graph);
+
+    FT distanceFromTargetToRoot = parent->distance_from_target_to_root();
+
+    if (m_debugOutput)
+    {
+      std::cout << "Distance from target to root: " << distanceFromTargetToRoot << std::endl;
+    }
+
+    // A potential optimization could be made by only expanding in the 'necessary' range (i.e. the range outside of geodesic visibility), but the
+    // benefits may be small, since the node filter would prevent more than one-level propagation.
+    // It would also be neccessary to distinguish expanding a root vertex node from a pseudo-source node
+
+    do
+    {
+      Triangle_3 face3d(triangle_from_halfedge(currentEdge));
+      Triangle_2 layoutFace(pt3t2(face3d));
+
+      if (m_debugOutput)
+      {
+        std::cout << "Expanding PsuedoSource: id = ";
+        if (face(currentEdge, m_graph) != Graph_traits::null_face())
+        {
+          std::cout << get(m_faceIndexMap, face(currentEdge, m_graph));
+        }
+        else
+        {
+          std::cout << "EXTERNAL";
+        }
+        std::cout << std::endl;
+      }
+
+      Cone_tree_node* child = new Cone_tree_node(m_traits, m_graph, currentEdge, layoutFace, cv2(layoutFace, 1), distanceFromTargetToRoot, cv2(layoutFace, 0), cv2(layoutFace, 2), Cone_tree_node::VERTEX_SOURCE);
+
+      node_created();
+      parent->push_middle_child(child);
+      process_node(child);
+
+      currentEdge = opposite(next(currentEdge, m_graph), m_graph);
+    }
+    while (currentEdge != startEdge);
+
+  }
+
+  /*
+    Returns the intersection of `segment` and the cone defined by the region to the left `leftBoundary` and right of `rightBoundary`
+  */
+  bool clip_to_bounds(const Segment_2& segment, const Ray_2& leftBoundary, const Ray_2& rightBoundary, Segment_2& outSegment)
+  {
+    typename Traits::Construct_source_2 cs2(m_traits.construct_source_2_object());
+    typename Traits::Construct_segment_2 cseg2(m_traits.construct_segment_2_object());
+    typename Traits::Construct_target_2 ct2(m_traits.construct_target_2_object());
+    typename Traits::Construct_line_2 cl2(m_traits.construct_line_2_object());
+    typename Traits::Intersect_2 i2(m_traits.intersect_2_object());
+    typename Traits::Orientation_2 o2(m_traits.orientation_2_object());
+    typename Traits::Construct_point_on_2 cpo2(m_traits.construct_point_on_2_object());
+    typename Traits::Compute_parametric_distance_along_segment_2 pdas2(m_traits.compute_parametric_distance_along_segment_2_object());
+
+    typedef typename cpp11::result_of<typename Traits::Intersect_2(Line_2, Line_2)>::type LineLineIntersectResult;
+
+    Point_2 leftPoint;
+    Point_2 rightPoint;
+
+    if (m_debugOutput)
+    {
+      std::cout << "Clipping Segment " << segment << " with left = " << leftBoundary << " and right = " << rightBoundary << std::endl;
+    }
+
+    FT leftT;
+    FT rightT;
+
+    CGAL::Orientation leftOrientation = o2(cs2(leftBoundary), cpo2(leftBoundary, 1), cs2(segment));
+
+    if (leftOrientation == CGAL::RIGHT_TURN || leftOrientation == CGAL::COLLINEAR)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "\tLeft is completely covered." << std::endl;
+      }
+      leftPoint = cs2(segment);
+      leftT = FT(0.0);
+    }
+    else
+    {
+      LineLineIntersectResult cgalIntersection = i2(cl2(segment), cl2(leftBoundary));
+
+      if (!cgalIntersection || !boost::get<Point_2>(&*cgalIntersection))
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "Dropping left due to co-linearity of boundary. " << bool(cgalIntersection) << std::endl;
+        }
+        return false;
+      }
+      else
+      {
+        Point_2* result = boost::get<Point_2>(&*cgalIntersection);
+        FT t0 = pdas2(cs2(segment), ct2(segment), *result);
+
+        if (t0 >= FT(1.00000))
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "Dropping due to missing left intersect. " << t0 << std::endl;
+          }
+
+          return false;
+        }
+        else if (t0 <= FT(0.00000))
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "\tLeft is completely covered (secondary check). " << t0 << std::endl;
+          }
+
+          leftPoint = cs2(segment);
+          leftT = FT(0.0);
+        }
+        else
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "\tLeft intersects at t = " << t0 << std::endl;
+          }
+
+          leftPoint = *result;
+          leftT = t0;
+        }
+      }
+    }
+
+    CGAL::Orientation rightOrientation = o2(cs2(rightBoundary), cpo2(rightBoundary, 1), ct2(segment));
+
+    if (rightOrientation == CGAL::LEFT_TURN || rightOrientation == CGAL::COLLINEAR)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Right is completely covered." << std::endl;
+      }
+      rightPoint = ct2(segment);
+      rightT = FT(1.0);
+    }
+    else
+    {
+      LineLineIntersectResult cgalIntersection = i2(cl2(segment), cl2(rightBoundary));
+
+      if (!cgalIntersection || !boost::get<Point_2>(&*cgalIntersection))
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "Dropping due to co-linearity of right boundary." << std::endl;
+        }
+        return false;
+      }
+      else
+      {
+        Point_2* result = boost::get<Point_2>(&*cgalIntersection);
+        FT t0 = pdas2(cs2(segment), ct2(segment), *result);
+
+        if (t0 <= FT(0.00000))
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "Dropping due to missing right intersect. " << t0 << std::endl;
+          }
+          return false;
+        }
+        else if (t0 >= FT(1.00000))
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "\tRight is completely covered (secondary check). " << t0 << std::endl;
+          }
+          rightPoint = ct2(segment);
+          rightT = FT(1.0);
+        }
+        else
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "\tRight intersects at t = " << t0 << std::endl;
+          }
+          rightPoint = *result;
+          rightT = t0;
+        }
+      }
+    }
+
+    if (leftT >= rightT)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Dropping due to overlap. " << leftT << " : " << rightT << std::endl;
+      }
+      return false;
+    }
+
+    outSegment = cseg2(leftPoint, rightPoint);
+
+    return true;
+  }
+
+  /*
+    Take a node and compute whether it is an occupier/evicts older nodes, then push any children it may have.
+  */
+  void process_node(Cone_tree_node* node)
+  {
+    typename Traits::Compare_relative_intersection_along_segment_2 crias2(m_traits.compare_relative_intersection_along_segment_2_object());
+
+    bool leftSide = false;
+    bool rightSide = false;
+
+    if (!node->is_source_node())
+    {
+      leftSide = node->has_left_side();
+      rightSide = node->has_right_side();
+    }
+    else if (node->node_type() == Cone_tree_node::EDGE_SOURCE) 
+    {
+      leftSide = true;
+      rightSide = true;
+    }
+    else
+    {
+      leftSide = true;
+      rightSide = false;
+    }
+
+    bool propagateLeft = false;
+    bool propagateRight = false;
+    bool propagateMiddle = false;
+
+    if (m_debugOutput)
+    {
+      std::cout << " Processing node " << node << " , level = " << node->level() << std::endl;
+      std::cout << "\tFace = " << node->layout_face() << std::endl;
+      std::cout << "\tVertices = ";
+      halfedge_descriptor current = node->entry_edge();
+      for (std::size_t i = 0; i < 3; ++i)
+      {
+        std::cout << get(m_vertexIndexMap, source(current, m_graph)) << " ";
+        current = next(current, m_graph);
+      }
+      std::cout << std::endl;
+      std::cout << "\tSource Image = " << node->source_image() << std::endl;
+      std::cout << "\tWindow Left = " << node->window_left() << std::endl;
+      std::cout << "\tWindow Right = " << node->window_right() << std::endl;
+      std::cout << "\t Has Left : " << (leftSide ? "yes" : "no") << " , Has Right : " << (rightSide ? "yes" : "no") << std::endl;
+    }
+
+    if (node->is_source_node() || (leftSide && rightSide))
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "\tContains target vertex" << std::endl;
+      }
+
+      std::size_t entryEdgeIndex = get(m_halfedgeIndexMap, node->entry_edge());
+
+      Node_distance_pair currentOccupier = m_vertexOccupiers[entryEdgeIndex];
+      FT currentNodeDistance = node->distance_from_target_to_root();
+
+      bool isLeftOfCurrent = false;
+
+      if (m_debugOutput)
+      {
+        std::cout << "\t Entry Edge = " << entryEdgeIndex << std::endl;
+        std::cout << "\t Target vertex = " << get(m_vertexIndexMap, node->target_vertex()) << std::endl;
+      }
+
+      if (currentOccupier.first != NULL)
+      {
+        if (node->is_vertex_node())
+        {
+          isLeftOfCurrent = false;
+        }
+        else if (currentOccupier.first->is_vertex_node())
+        {
+          isLeftOfCurrent = true;
+        }
+        else
+        {
+          CGAL::Comparison_result comparison = crias2(
+            node->entry_segment(),
+            node->ray_to_target_vertex().supporting_line(),
+            currentOccupier.first->entry_segment(),
+            currentOccupier.first->ray_to_target_vertex().supporting_line()
+          );
+
+          if (comparison == CGAL::SMALLER)
+          {
+            isLeftOfCurrent = true;
+          }
+        }
+
+        if (m_debugOutput)
+        {
+          std::cout << "\t Current occupier = " << currentOccupier.first << std::endl;
+          std::cout << "\t Current Occupier Distance = " << currentOccupier.second << std::endl;
+          std::cout << "\t " << (isLeftOfCurrent ? "Left" : "Right") << " of current" << std::endl;
+        }
+      }
+
+      if (m_debugOutput)
+      {
+        std::cout << "\t New Distance = " << currentNodeDistance << std::endl;
+      }
+
+      if (currentOccupier.first == NULL || currentOccupier.second > currentNodeDistance)
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "\t Current node is now the occupier" << std::endl;
+        }
+
+        m_vertexOccupiers[entryEdgeIndex] = std::make_pair(node, currentNodeDistance);
+
+        propagateLeft = true;
+        propagateRight = true;
+
+        // This is a consequence of using the same basic node type for source and interval nodes
+        // If this is a source node, it is only pointing to one of the two opposite edges (the left one by convention)
+        if (node->node_type() != Cone_tree_node::INTERVAL && node->node_type() != Cone_tree_node::EDGE_SOURCE)
+        {
+          propagateRight = false;
+
+          // Propagating a pseudo-source on a boundary vertex can result in a cone on a null face
+          // In such a case, we only care about the part of the cone pointing at the vertex (i.e. the middle child),
+          // so we can avoid propagating over the (non-existant) left opposite edge
+          if (node->is_null_face())
+          {
+            propagateLeft = false;
+          }
+        }
+
+        if (currentOccupier.first != NULL)
+        {
+          if (isLeftOfCurrent)
+          {
+            if (currentOccupier.first->get_left_child())
+            {
+              delete_node(currentOccupier.first->remove_left_child());
+            }
+            else if (currentOccupier.first->m_pendingLeftSubtree != NULL)
+            {
+              currentOccupier.first->m_pendingLeftSubtree->m_cancelled = true;
+              currentOccupier.first->m_pendingLeftSubtree = NULL;
+            }
+          }
+          else
+          {
+            if (currentOccupier.first->get_right_child())
+            {
+              delete_node(currentOccupier.first->remove_right_child());
+            }
+            else if (currentOccupier.first->m_pendingRightSubtree != NULL)
+            {
+              currentOccupier.first->m_pendingRightSubtree->m_cancelled = true;
+              currentOccupier.first->m_pendingRightSubtree = NULL;
+            }
+          }
+        }
+
+        std::size_t targetVertexIndex = get(m_vertexIndexMap, node->target_vertex());
+
+        // Check if this is now the absolute closest node, and replace the current closest as appropriate
+        Node_distance_pair currentClosest = m_closestToVertices[targetVertexIndex];
+
+        if (m_debugOutput && currentClosest.first != NULL)
+        {
+          std::cout << "\t Current Closest Distance = " << currentClosest.second << std::endl;
+        }
+
+        if (currentClosest.first == NULL || currentClosest.second > currentNodeDistance)
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "\t Current node is now the closest" << std::endl;
+          }
+
+          // if this is a saddle vertex, then evict previous closest vertex
+          if (m_vertexIsPseudoSource[targetVertexIndex])
+          {
+            if (currentClosest.first != NULL)
+            {
+              if (m_debugOutput)
+              {
+                std::cout << "\tEvicting old pseudo-source: " << currentClosest.first << std::endl;
+              }
+
+              if (currentClosest.first->m_pendingMiddleSubtree != NULL)
+              {
+                currentClosest.first->m_pendingMiddleSubtree->m_cancelled = true;
+                currentClosest.first->m_pendingMiddleSubtree = NULL;
+              }
+
+              while (currentClosest.first->has_middle_children())
+              {
+                delete_node(currentClosest.first->pop_middle_child());
+              }
+
+              if (m_debugOutput)
+              {
+                std::cout << "\tFinished Evicting" << std::endl;
+              }
+            }
+
+            propagateMiddle = true;
+          }
+
+          m_closestToVertices[targetVertexIndex] = Node_distance_pair(node, currentNodeDistance);
+        }
+      }
+      else
+      {
+        if (isLeftOfCurrent)
+        {
+          propagateLeft = true;
+        }
+        else if (!node->is_source_node())
+        {
+          propagateRight = true;
+        }
+      }
+    }
+    else
+    {
+      propagateLeft = leftSide;
+      propagateRight = rightSide;
+    }
+
+    if (node->level() <= num_faces(m_graph))
+    {
+      if (propagateLeft)
+      {
+        push_left_child(node);
+      }
+
+      if (propagateRight && (!node->is_source_node() || node->node_type() == Cone_tree_node::EDGE_SOURCE))
+      {
+        push_right_child(node);
+      }
+
+      if (propagateMiddle)
+      {
+        push_middle_child(node);
+      }
+    }
+    else if (m_debugOutput)
+    {
+      std::cout << "\tNo expansion since level limit reached" << std::endl;
+    }
+
+  }
+
+  void push_left_child(Cone_tree_node* parent)
+  {
+    typename Traits::Compute_squared_distance_2 csd2(m_traits.compute_squared_distance_2_object());
+
+    if (face(parent->left_child_edge(), m_graph) != Graph_traits::null_face())
+    {
+      Segment_2 leftWindow;
+
+      if (parent->is_source_node())
+      {
+        leftWindow = parent->left_child_base_segment();
+      }
+      else
+      {
+        bool result = clip_to_bounds(parent->left_child_base_segment(), parent->left_boundary(), parent->right_boundary(), leftWindow);
+        if (!result)
+        {
+          if (m_debugOutput)
+          {
+            std::cout << "Left child clip failed, killing node." << std::endl;
+          }
+          return;
+        }
+      }
+
+      FT distanceEstimate = parent->distance_from_source_to_root() + CGAL::internal::select_sqrt(csd2(parent->source_image(), leftWindow));
+
+      if (m_debugOutput)
+      {
+        std::cout << "\tPushing Left Child, Segment = " << parent->left_child_base_segment() << " , clipped = " << leftWindow << " , Estimate = " << distanceEstimate << std::endl;
+      }
+
+      Cone_expansion_event* event = new Cone_expansion_event(parent, distanceEstimate, Cone_expansion_event::LEFT_CHILD, leftWindow);
+      parent->m_pendingLeftSubtree = event;
+
+      m_expansionPriqueue.push(event);
+
+      queue_pushed();
+    }
+  }
+
+  void push_right_child(Cone_tree_node* parent)
+  {
+    typename Traits::Compute_squared_distance_2 csd2(m_traits.compute_squared_distance_2_object());
+
+    if (face(parent->right_child_edge(), m_graph) != Graph_traits::null_face())
+    {
+      Segment_2 rightWindow;
+      bool result = clip_to_bounds(parent->right_child_base_segment(), parent->left_boundary(), parent->right_boundary(), rightWindow);
+
+      if (!result)
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "Right child clip failed, killing node." << std::endl;
+        }
+        return;
+      }
+
+      FT distanceEstimate = parent->distance_from_source_to_root() + CGAL::internal::select_sqrt(csd2(parent->source_image(), rightWindow));
+
+      if (m_debugOutput)
+      {
+        std::cout << "\tPushing Right Child, Segment = " << parent->right_child_base_segment() << " , clipped = " << rightWindow << " , Estimate = " << distanceEstimate << std::endl;
+      }
+
+      Cone_expansion_event* event = new Cone_expansion_event(parent, distanceEstimate, Cone_expansion_event::RIGHT_CHILD, rightWindow);
+      queue_pushed();
+      parent->m_pendingRightSubtree = event;
+
+      m_expansionPriqueue.push(event);
+    }
+  }
+
+  void push_middle_child(Cone_tree_node* parent)
+  {
+    if (m_debugOutput)
+    {
+      std::cout << "\tPushing Middle Child, Estimate = " << parent->distance_from_target_to_root() << std::endl;
+    }
+
+    Cone_expansion_event* event = new Cone_expansion_event(parent, parent->distance_from_target_to_root(), Cone_expansion_event::PSEUDO_SOURCE);
+
+    queue_pushed();
+
+    parent->m_pendingMiddleSubtree = event;
+
+    m_expansionPriqueue.push(event);
+  }
+
+  void delete_node(Cone_tree_node* node, bool destruction = false)
+  {
+    if (node != NULL)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Deleting node " << node << std::endl;
+      }
+
+      if (node->m_pendingLeftSubtree != NULL)
+      {
+        node->m_pendingLeftSubtree->m_cancelled = true;
+        node->m_pendingLeftSubtree = NULL;
+      }
+
+      if (node->get_left_child() != NULL)
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "\t"  << node << " Descending left." << std::endl;
+        }
+
+        delete_node(node->remove_left_child(), destruction);
+      }
+
+      if (node->m_pendingRightSubtree != NULL)
+      {
+        node->m_pendingRightSubtree->m_cancelled = true;
+        node->m_pendingRightSubtree = NULL;
+      }
+
+      if (node->get_right_child() != NULL)
+      {
+        if (m_debugOutput)
+        {
+          std::cout << "\t"  << node << " Descending right." << std::endl;
+        }
+
+        delete_node(node->remove_right_child(), destruction);
+      }
+
+      if (node->m_pendingMiddleSubtree != NULL)
+      {
+        node->m_pendingMiddleSubtree->m_cancelled = true;
+        node->m_pendingMiddleSubtree = NULL;
+      }
+
+      if (node->has_middle_children() && m_debugOutput)
+      {
+        std::cout << "\t"  << node << " Descending middle." << std::endl;
+      }
+
+      while (node->has_middle_children())
+      {
+        delete_node(node->pop_middle_child(), destruction);
+      }
+
+      // At the point of destruction, the `Triangle_mesh` referenced may have gone out of scope, we wish to distinguish between deletion with an assumed reference
+      // to the original `Triangle_mesh`, and deletion without
+      if (!node->is_root_node() && !destruction)
+      {
+        std::size_t entryEdgeIndex = get(m_halfedgeIndexMap, node->entry_edge());
+
+        if (m_vertexOccupiers[entryEdgeIndex].first == node)
+        {
+          m_vertexOccupiers[entryEdgeIndex].first = NULL;
+
+          std::size_t targetVertexIndex = get(m_vertexIndexMap, node->target_vertex());
+
+          if (m_closestToVertices[targetVertexIndex].first == node)
+          {
+            m_closestToVertices[targetVertexIndex].first = NULL;
+          }
+        }
+      }
+
+      delete node;
+    }
+
+    node_deleted();
+  }
+
+  void set_vertex_types()
+  {
+    vertex_iterator current, end;
+
+    for (boost::tie(current, end) = vertices(m_graph); current != end; ++current)
+    {
+      std::size_t vertexIndex = get(m_vertexIndexMap, *current);
+
+      if (is_saddle_vertex(*current) || is_boundary_vertex(*current))
+      {
+        m_vertexIsPseudoSource[vertexIndex] = true;
+      }
+      else
+      {
+        m_vertexIsPseudoSource[vertexIndex] = false;
+      }
+    }
+  }
+
+  bool is_saddle_vertex(vertex_descriptor v)
+  {
+    return m_traits.is_saddle_vertex_object()(v, m_graph, m_vertexPointMap);
+  }
+
+  bool is_boundary_vertex(vertex_descriptor v)
+  {
+    halfedge_descriptor h = halfedge(v, m_graph);
+    halfedge_descriptor first = h;
+
+    do
+    {
+      if (face(h, m_graph) == Graph_traits::null_face() || face(opposite(h, m_graph), m_graph) == Graph_traits::null_face())
+      {
+        return true;
+      }
+
+      h = opposite(next(h, m_graph), m_graph);
+    }
+    while(h != first);
+
+    return false;
+  }
+
+  void delete_all_nodes()
+  {
+    for (std::size_t i = 0; i < m_rootNodes.size(); ++i)
+    {
+      delete_node(m_rootNodes[i].first, true);
+    }
+  }
+
+  void reset_algorithm(bool clearFaceLocations = true)
+  {
+    Cone_tree_node* null_value=NULL;
+    m_closestToVertices.resize(num_vertices(m_graph));
+    std::fill(m_closestToVertices.begin(), m_closestToVertices.end(), Node_distance_pair(null_value, FT(0.0)));
+    m_vertexOccupiers.resize(num_halfedges(m_graph));
+    std::fill(m_vertexOccupiers.begin(), m_vertexOccupiers.end(), Node_distance_pair(null_value, FT(0.0)));
+
+    while (!m_expansionPriqueue.empty())
+    {
+      delete m_expansionPriqueue.top();
+      m_expansionPriqueue.pop();
+    }
+
+    if (clearFaceLocations)
+    {
+      m_faceLocations.clear();
+      m_firstNewSourcePoint = m_faceLocations.end();
+      m_deletedSourceLocations.clear();
+    }
+
+    delete_all_nodes();
+    m_rootNodes.clear();
+    m_vertexIsPseudoSource.resize(num_vertices(m_graph));
+
+#if !defined(NDEBUG)
+    m_currentNodeCount = 0;
+    m_peakNodeCount = 0;
+    m_queueAtPeakNodes = 0;
+    m_peakQueueSize = 0;
+    m_nodesAtPeakQueue = 0;
+#endif
+
+  }
+
+  template <class Visitor>
+  void visit_shortest_path(Cone_tree_node* startNode, const Point_2& startLocation, Visitor& visitor)
+  {
+    typename Traits::Compute_parametric_distance_along_segment_2 parametric_distance_along_segment_2(m_traits.compute_parametric_distance_along_segment_2_object());
+    typename Traits::Construct_ray_2 construct_ray_2(m_traits.construct_ray_2_object());
+    typename Traits::Construct_line_2 construct_line_2(m_traits.construct_line_2_object());
+    typename Traits::Construct_source_2 construct_source_2(m_traits.construct_source_2_object());
+    typename Traits::Construct_target_2 construct_target_2(m_traits.construct_target_2_object());
+    typename Traits::Intersect_2 intersect_2(m_traits.intersect_2_object());
+
+    typedef typename cpp11::result_of<typename Traits::Intersect_2 (Line_2, Line_2)>::type LineLineIntersectResult;
+
+    Cone_tree_node* current = startNode;
+    Point_2 currentLocation(startLocation);
+
+    while (!current->is_root_node())
+    {
+      switch (current->node_type())
+      {
+        case Cone_tree_node::INTERVAL:
+        case Cone_tree_node::EDGE_SOURCE:
+        {
+          Segment_2 entrySegment = current->entry_segment();
+          Ray_2 rayToLocation(construct_ray_2(current->source_image(), currentLocation));
+
+          LineLineIntersectResult cgalIntersection = intersect_2(construct_line_2(entrySegment), construct_line_2(rayToLocation));
+
+          CGAL_assertion(bool(cgalIntersection));
+
+          Point_2* result = boost::get<Point_2>(&*cgalIntersection);
+
+          CGAL_assertion(result && "Error, did not get point intersection on path walk to source");
+
+          FT t0 = parametric_distance_along_segment_2(construct_source_2(entrySegment), construct_target_2(entrySegment), *result);
+
+          if (m_debugOutput)
+          {
+            std::cout << "Current Node: " << current << " , Face = " << current->layout_face() << std::endl;
+            halfedge_descriptor he = current->entry_edge();
+            std::cout << "Face vertices: ";
+            for (std::size_t i = 0; i < 3; ++i)
+            {
+              std::cout << get(m_vertexIndexMap, source(he, m_graph)) << ",";
+              he = next(he, m_graph);
+            }
+            std::cout << std::endl;
+            std::cout << "Current Location: " << currentLocation << std::endl;
+            std::cout << "Distance: " << current->distance_to_root(currentLocation) << std::endl;
+            std::cout << "Inside cone: " << (current->inside_window(currentLocation) ? "Yes" : "No") << std::endl;
+            std::cout << "Current Source: " << current->source_image() << std::endl;
+            std::cout << "Current Segment: " << entrySegment << std::endl;
+            std::cout << "Current Left Window: " << current->window_left() << "  ,  " << m_traits.compute_parametric_distance_along_segment_2_object()(entrySegment.start(), entrySegment.end(), current->window_left()) << std::endl;
+            std::cout << "Current Right Window: " << current->window_right() << "  ,  " << m_traits.compute_parametric_distance_along_segment_2_object()(entrySegment.start(), entrySegment.end(), current->window_right()) << std::endl;
+            std::cout << "Current Segment Intersection: " << *result << std::endl;
+            std::cout << "Edge: (" << get(m_vertexIndexMap, source(current->entry_edge(), m_graph)) << "," << get(m_vertexIndexMap, target(current->entry_edge(), m_graph)) << ")  :  " << t0 << std::endl;
+          }
+
+          visitor(current->entry_edge(), t0);
+
+          currentLocation = *result;
+
+          current = current->parent();
+
+        }
+          break;
+        case Cone_tree_node::VERTEX_SOURCE:
+          visitor(target(current->entry_edge(), m_graph));
+          currentLocation = current->parent()->target_point();
+          current = current->parent();
+          break;
+        case Cone_tree_node::FACE_SOURCE:
+          // This is guaranteed to be the final node in any sequence
+          visitor(m_rootNodes[current->tree_id()].second->first, m_rootNodes[current->tree_id()].second->second);
+          current = current->parent();
+          break;
+        default:
+          CGAL_assertion(false && "Unhandled node type found in tree");
+      }
+    }
+  }
+
+  void add_to_face_list(Cone_tree_node* node)
+  {
+    if (!node->is_root_node() && !node->is_null_face())
+    {
+      std::size_t faceIndex = get(m_faceIndexMap, node->current_face());
+      m_faceOccupiers[faceIndex].push_back(node);
+    }
+
+    if (node->get_left_child() != NULL)
+    {
+      add_to_face_list(node->get_left_child());
+    }
+
+    if (node->get_right_child() != NULL)
+    {
+      add_to_face_list(node->get_right_child());
+    }
+
+    for (std::size_t i = 0; i < node->num_middle_children(); ++i)
+    {
+      add_to_face_list(node->get_middle_child(i));
+    }
+  }
+
+  Point_2 face_location_with_normalized_coordinate(Cone_tree_node* node, Barycentric_coordinate location)
+  {
+    return construct_barycenter_in_triangle_2(node->layout_face(), localized_coordiate(node, location));
+  }
+
+  Barycentric_coordinate localized_coordiate(Cone_tree_node* node, Barycentric_coordinate location)
+  {
+    return shifted_coordiate(location, node->edge_face_index());
+  }
+
+  Barycentric_coordinate shifted_coordiate(Barycentric_coordinate location, std::size_t shift)
+  {
+    typename Traits::Construct_barycentric_coordinate_weight cbcw(m_traits.construct_barycentric_coordinate_weight_object());
+    typename Traits::Construct_barycentric_coordinate cbc(m_traits.construct_barycentric_coordinate_object());
+    return cbc(cbcw(location, shift), cbcw(location, (shift + 1) % 3), cbcw(location, (shift + 2) % 3));
+  }
+
+  std::pair<Node_distance_pair, Barycentric_coordinate> nearest_on_face(face_descriptor f, Barycentric_coordinate location)
+  {
+    typename Traits::Construct_barycentric_coordinate cbc(m_traits.construct_barycentric_coordinate_object());
+
+    std::size_t faceIndex = get(m_faceIndexMap, f);
+
+    Cone_tree_node* closest = NULL;
+    FT closestDistance = 0;
+
+    std::vector<Cone_tree_node*>& currentFaceList = m_faceOccupiers[faceIndex];
+
+    for (std::size_t i = 0; i < currentFaceList.size(); ++i)
+    {
+      Cone_tree_node* current = currentFaceList[i];
+
+      if (closest != NULL && current->distance_from_source_to_root() >= closestDistance)
+      {
+        continue;
+      }
+
+      Point_2 locationInContext = face_location_with_normalized_coordinate(current, location);
+
+      if (current->inside_window(locationInContext))
+      {
+        FT currentDistance = current->distance_to_root(locationInContext);
+
+        if (closest == NULL || currentDistance < closestDistance)
+        {
+          closest = current;
+          closestDistance = currentDistance;
+        }
+      }
+    }
+
+    if (closest)
+    {
+      return std::make_pair(Node_distance_pair(closest, closestDistance), localized_coordiate(closest, location));
+    }
+    else
+    {
+      return std::make_pair(Node_distance_pair((Cone_tree_node*)NULL, FT(0.0)), cbc(FT(0.0), FT(0.0), FT(0.0)));
+    }
+  }
+
+  std::pair<Node_distance_pair, Barycentric_coordinate> nearest_to_location(face_descriptor f, Barycentric_coordinate location)
+  {
+    typename Traits::Construct_barycentric_coordinate_weight cbcw(m_traits.construct_barycentric_coordinate_weight_object());
+    typename Traits::Construct_barycentric_coordinate cbc(m_traits.construct_barycentric_coordinate_object());
+    typename Traits::Classify_barycentric_coordinate classify_barycentric_coordinate(m_traits.classify_barycentric_coordinate_object());
+
+    std::size_t associatedEdge;
+    CGAL::Surface_mesh_shortest_paths_3::Barycentric_coordinate_type type;
+    boost::tie(type, associatedEdge) = classify_barycentric_coordinate(location);
+
+    switch (type)
+    {
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_BOUNDED_SIDE:
+        return nearest_on_face(f, location);
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_BOUNDARY:
+        {
+          halfedge_descriptor he = halfedge(f, m_graph);
+          for (std::size_t i = 0; i < associatedEdge; ++i)
+          {
+            he = next(he, m_graph);
+          }
+
+          halfedge_descriptor oppositeHalfedge = opposite(he, m_graph);
+
+          std::size_t oppositeIndex = internal::edge_index(oppositeHalfedge, m_graph);
+
+          FT oppositeLocationCoords[3] = { FT(0.0), FT(0.0), FT(0.0) };
+
+          oppositeLocationCoords[oppositeIndex] = cbcw(location, (associatedEdge + 1) % 3);
+          oppositeLocationCoords[(oppositeIndex + 1) % 3] = cbcw(location, associatedEdge);
+
+          std::pair<Node_distance_pair,Barycentric_coordinate> mainFace = nearest_on_face(f, location);
+          Barycentric_coordinate oppositeLocation(cbc(oppositeLocationCoords[0], oppositeLocationCoords[1], oppositeLocationCoords[2]));
+          std::pair<Node_distance_pair,Barycentric_coordinate> otherFace = nearest_on_face(face(oppositeHalfedge, m_graph), oppositeLocation);
+
+          if (mainFace.first.first == NULL)
+          {
+            return otherFace;
+          }
+          else if (otherFace.first.first == NULL)
+          {
+            return mainFace;
+          }
+          else
+          {
+            return mainFace.first.second < otherFace.first.second ? mainFace : otherFace;
+          }
+        }
+        break;
+      case CGAL::Surface_mesh_shortest_paths_3::BARYCENTRIC_COORDINATE_ON_VERTEX:
+        {
+          halfedge_descriptor he = halfedge(f, m_graph);
+
+          for (std::size_t i = 0; i < associatedEdge; ++i)
+          {
+            he = next(he, m_graph);
+          }
+
+          vertex_descriptor vertex = source(he, m_graph);
+
+          return std::make_pair(m_closestToVertices[get(m_vertexIndexMap, vertex)], cbc(FT(0.0), FT(0.0), FT(1.0)));
+        }
+        break;
+
+      default:
+        CGAL_assertion(false && "Invalid face location");
+        return std::pair<Node_distance_pair, Barycentric_coordinate>();
+    }
+  }
+
+  static bool cone_comparator(const Cone_tree_node* lhs, const Cone_tree_node* rhs)
+  {
+    return lhs->distance_from_source_to_root() < rhs->distance_from_source_to_root();
+  }
+
+  template <class InputIterator>
+  Source_point_iterator add_source_points_internal(InputIterator begin, InputIterator end, vertex_descriptor)
+  {
+    Source_point_iterator firstAdded;
+
+    for (InputIterator it = begin; it != end; ++it)
+    {
+      Source_point_iterator added = add_source_point(face_location(*it));
+
+      if (it == begin)
+      {
+        firstAdded = added;
+      }
+    }
+
+    return firstAdded;
+  }
+
+  template <class InputIterator>
+  Source_point_iterator add_source_points_internal(InputIterator begin, InputIterator end, Face_location)
+  {
+    Source_point_iterator firstAdded;
+
+    for (InputIterator it = begin; it != end; ++it)
+    {
+      Source_point_iterator added = add_source_point(it->first, it->second);
+
+      if (it == begin)
+      {
+        firstAdded = added;
+      }
+    }
+
+    return firstAdded;
+  }
+
+  void construct_sequence_tree_internal()
+  {
+    reset_algorithm(false);
+    set_vertex_types();
+
+    m_vertexOccupiers.resize(num_halfedges(m_graph));
+    m_closestToVertices.resize(num_vertices(m_graph));
+
+    if (m_debugOutput)
+    {
+      vertex_iterator current, end;
+
+      std::size_t numVertices = 0;
+
+      for (boost::tie(current,end) = vertices(m_graph); current != end; ++current)
+      {
+        std::cout << "Vertex#" << numVertices << ": p = " << get(m_vertexPointMap,*current) << " , Saddle Vertex: " << (is_saddle_vertex(*current) ? "yes" : "no") << " , Boundary Vertex: " << (is_boundary_vertex(*current) ? "yes" : "no") << std::endl;
+        ++numVertices;
+      }
+    }
+
+    face_iterator facesCurrent;
+    face_iterator facesEnd;
+
+    if (m_debugOutput)
+    {
+      std::size_t numFaces = 0;
+
+      for (boost::tie(facesCurrent, facesEnd) = faces(m_graph); facesCurrent != facesEnd; ++facesCurrent)
+      {
+        std::cout << "Face#" << numFaces << ": Vertices = (";
+        ++numFaces;
+        halfedge_descriptor faceEdgesStart = halfedge(*facesCurrent, m_graph);
+        halfedge_descriptor faceEdgesCurrent = faceEdgesStart;
+
+        do
+        {
+          std::cout << get(m_vertexIndexMap, source(faceEdgesCurrent, m_graph));
+
+          faceEdgesCurrent = next(faceEdgesCurrent, m_graph);
+
+          if (faceEdgesCurrent != faceEdgesStart)
+          {
+            std::cout << ", ";
+          }
+          else
+          {
+            std::cout << ")";
+          }
+        }
+        while (faceEdgesCurrent != faceEdgesStart);
+
+        std::cout << std::endl;
+      }
+
+    }
+
+    for (typename Source_point_list::iterator it = m_faceLocations.begin(); it != m_faceLocations.end(); ++it)
+    {
+      if (m_debugOutput)
+      {
+        std::cout << "Root: " << get(m_faceIndexMap, it->first) << " , " << it->second[0] << " " << it->second[1] << " " << it->second[2] << " " << std::endl;
+      }
+
+      expand_root(it->first, it->second, Source_point_iterator(it));
+    }
+
+    if (m_debugOutput)
+    {
+      std::cout << "PriQ start size = " << m_expansionPriqueue.size() << std::endl;
+
+      std::cout << "Num face locations: " << m_faceLocations.size() << std::endl;
+      std::cout << "Num root nodes: " << m_rootNodes.size() << " (Hint: these should be the same size)" << std::endl;
+
+    }
+
+    while (m_expansionPriqueue.size() > 0)
+    {
+      Cone_expansion_event* event = m_expansionPriqueue.top();
+      m_expansionPriqueue.pop();
+
+      if (!event->m_cancelled)
+      {
+        typename Cone_expansion_event::Expansion_type type = event->m_type;
+        Cone_tree_node* parent = event->m_parent;
+
+        switch (type)
+        {
+          case Cone_expansion_event::PSEUDO_SOURCE:
+            if (m_debugOutput)
+            {
+              std::cout << "PseudoSource Expansion: Parent = " << parent << " , Vertex = " << get(m_vertexIndexMap, event->m_parent->target_vertex()) << " , Distance = " << event->m_distanceEstimate << " , Level = " << event->m_parent->level() + 1 << std::endl;
+            }
+
+            expand_pseudo_source(parent);
+            break;
+          case Cone_expansion_event::LEFT_CHILD:
+            if (m_debugOutput)
+            {
+              std::cout << "Left Expansion: Parent = " << parent << " Edge = (" << get(m_vertexIndexMap, source(event->m_parent->left_child_edge(), m_graph)) << "," << get(m_vertexIndexMap, target(event->m_parent->left_child_edge(), m_graph)) << ") , Distance = " << event->m_distanceEstimate << " , Level = " << event->m_parent->level() + 1 << std::endl;
+            }
+
+            expand_left_child(parent, event->m_windowSegment);
+            break;
+          case Cone_expansion_event::RIGHT_CHILD:
+            if (m_debugOutput)
+            {
+              std::cout << "Right Expansion: Parent = " << parent << " , Edge = (" << get(m_vertexIndexMap, source(event->m_parent->right_child_edge(), m_graph)) << "," << get(m_vertexIndexMap, target(event->m_parent->right_child_edge(), m_graph)) << ") , Distance = " << event->m_distanceEstimate << " , Level = " << event->m_parent->level() + 1 << std::endl;
+            }
+
+            expand_right_child(parent, event->m_windowSegment);
+            break;
+        }
+      }
+      else if (m_debugOutput)
+      {
+        std::cout << "Found cancelled event for node: " << event->m_parent << std::endl;
+      }
+
+      delete event;
+    }
+
+    m_faceOccupiers.clear();
+    m_faceOccupiers.resize(num_faces(m_graph));
+
+    for (std::size_t i = 0; i < m_rootNodes.size(); ++i)
+    {
+      add_to_face_list(m_rootNodes[i].first);
+    }
+
+    for (std::size_t i = 0; i < m_faceOccupiers.size(); ++i)
+    {
+      std::vector<Cone_tree_node*>& currentFaceList = m_faceOccupiers[i];
+      std::sort(currentFaceList.begin(), currentFaceList.end(), cone_comparator);
+    }
+
+    if (m_debugOutput)
+    {
+      std::cout << "Closest distances: " << std::endl;
+
+      for (std::size_t i = 0; i < m_closestToVertices.size(); ++i)
+      {
+        std::cout << "\tVertex = " << i << std::endl;
+        std::cout << "\tDistance = " << m_closestToVertices[i].second << std::endl;
+      }
+
+      std::cout << std::endl;
+
+      for (std::size_t i = 0; i < m_faceOccupiers.size(); ++i)
+      {
+        std::cout << "\tFace = " << i << std::endl;
+        std::cout << "\t#Occupiers = " << m_faceOccupiers[i].size() << std::endl;
+      }
+
+      std::cout << std::endl << "Done!" << std::endl;
+    }
+
+    m_firstNewSourcePoint = m_faceLocations.end();
+    m_deletedSourceLocations.clear();
+
+  }
+
+public:
+
+  /// \name Constructors
+  /// @{
+
+  /*!
+  \brief Creates a shortest paths object using `g` as input.
+
+  Equivalent to `Surface_mesh_shortest_path(g, get(boost::vertex_index, g), get(boost::halfedge_index, g), get(boost::face_index, g), get(CGAL::vertex_point, g), traits)`.
+  */
+  Surface_mesh_shortest_path(Triangle_mesh& g, const Traits& traits = Traits())
+    : m_traits(traits)
+    , m_graph(g)
+    , m_vertexIndexMap(get(boost::vertex_index, g))
+    , m_halfedgeIndexMap(get(boost::halfedge_index, g))
+    , m_faceIndexMap(get(boost::face_index, g))
+    , m_vertexPointMap(get(CGAL::vertex_point, g))
+    , m_debugOutput(false)
+  {
+    reset_algorithm();
+  }
+
+  /*!
+  \brief Creates a shortest paths object using `g` as input.
+
+  \details No copy of the `Triangle_mesh` is made, only a reference to the `g` is held.
+
+  \param g The surface mesh to compute shortest paths on.  Note that it must be triangulated.
+
+  \param vertexIndexMap Property map associating an id to each vertex, from 0 to `num_vertices(g) - 1`.
+
+  \param halfedgeIndexMap Property map associating an id to each halfedge, from 0 to `num_halfedges(g) - 1`.
+
+  \param faceIndexMap Property map associating an id to each face, from 0 to `num_faces(g) - 1`.
+
+  \param vertexPointMap Property map used to access the points associated to each vertex of the graph.
+
+  \param traits Optional instance of the traits class to use.
+  */
+  Surface_mesh_shortest_path(Triangle_mesh& g, Vertex_index_map vertexIndexMap, Halfedge_index_map halfedgeIndexMap, Face_index_map faceIndexMap, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+    : m_traits(traits)
+    , m_graph(g)
+    , m_vertexIndexMap(vertexIndexMap)
+    , m_halfedgeIndexMap(halfedgeIndexMap)
+    , m_faceIndexMap(faceIndexMap)
+    , m_vertexPointMap(vertexPointMap)
+    , m_debugOutput(false)
+  {
+    reset_algorithm();
+  }
+
+  /// @}
+
+  /// \cond
+
+  ~Surface_mesh_shortest_path()
+  {
+    delete_all_nodes();
+
+#if !defined(NDEBUG)
+    if (m_debugOutput)
+    {
+      std::cout << "Final node count: " << m_currentNodeCount << std::endl;
+    }
+    return;
+    CGAL_assertion(m_currentNodeCount == 0);
+#endif
+  }
+
+  /// \endcond
+
+  /// \name Addition and Removal of Source Points
+  /// @{
+
+  /*!
+  \brief Adds `v` as a source for the shortest path queries.
+
+  \details No change to the internal shortest paths data structure occurs
+  until either `Surface_mesh_shortest_path::build_sequence_tree()` or
+  the first shortest path query is done.
+
+  \return An iterator to the source point added
+  */
+  Source_point_iterator add_source_point(vertex_descriptor v)
+  {
+    Face_location location = face_location(v);
+    return add_source_point(location);
+  }
+
+  /*!
+  \brief Adds a point inside the face `f` as a source for the shortest path queries.
+
+  \details No change to the internal shortest paths data structure occurs
+  until either `Surface_mesh_shortest_path::build_sequence_tree()` or
+  the first shortest path query is done.
+
+  \param f A face of the input face graph
+  \param location Barycentric coordinate in face `f` specifying the source point.
+  \return An iterator to the source point added
+  */
+  Source_point_iterator add_source_point(face_descriptor f, Barycentric_coordinate location)
+  {
+    return add_source_point(std::make_pair(f, location));
+  }
+
+  /*!
+  \brief Adds a point inside a face as a source for the shortest path queries,
+  equivalent to `Surface_mesh_shortest_path::add_source_point(location.first, location.second);`
+  */
+  Source_point_iterator add_source_point(Face_location location)
+  {
+    Source_point_underlying_iterator added = m_faceLocations.insert(m_faceLocations.end(), location);
+
+    if (m_firstNewSourcePoint == m_faceLocations.end())
+    {
+      m_firstNewSourcePoint = added;
+    }
+
+    return Source_point_iterator(added);
+  }
+
+  /*!
+  \brief Adds a range of points as sources for the shortest path queries.
+
+  \details No change to the internal shortest paths data structure occurs
+  until either `Surface_mesh_shortest_path::build_sequence_tree()` or
+  the first shortest path query is done.
+
+  \tparam InputIterator A `ForwardIterator` which dereferences to either `Surface_mesh_shortest_path::Face_location`, or `Surface_mesh_shortest_path::vertex_descriptor`.
+
+  \param begin iterator to the first in the list of source point locations.
+  \param end iterator to one past the end of the list of source point locations.
+  \return An iterator to the first source point added.
+  */
+  template <class InputIterator>
+  Source_point_iterator add_source_points(InputIterator begin, InputIterator end)
+  {
+    return add_source_points_internal(begin, end, typename std::iterator_traits<InputIterator>::value_type());
+  }
+
+  /*!
+  \brief Removes a source point for the shortest path queries.
+
+  \details No change to the internal shortest paths data structure occurs
+  until either `Surface_mesh_shortest_path::build_sequence_tree()` or
+  the first shortest path query is done.
+  Behaviour is undefined if the source point `it` was already removed.
+
+  \param it iterator to the source point to be removed
+  */
+  void remove_source_point(Source_point_iterator it)
+  {
+    if (it == m_firstNewSourcePoint)
+    {
+      ++m_firstNewSourcePoint;
+    }
+
+    m_deletedSourceLocations.splice(m_deletedSourceLocations.begin(), m_faceLocations, it.m_iterator);
+  }
+
+  /*!
+  \brief Removes all source points for the shortest path queries.
+
+  \details No change to the internal shortest paths data structure occurs
+  until either `Surface_mesh_shortest_path::build_sequence_tree()` or
+  the first shortest path query is done.
+  For a version which deletes all data immediately, use `clear()` instead.
+  */
+  void remove_all_source_points()
+  {
+    m_deletedSourceLocations.splice(m_deletedSourceLocations.begin(), m_faceLocations, m_faceLocations.begin(), m_faceLocations.end());
+    m_firstNewSourcePoint = m_faceLocations.end();
+  }
+
+  /// @}
+
+  /// \name Creation and Destruction of the Shortest Paths Sequence Tree
+  /// @{
+
+  /*!
+  \brief Computes all pending changes to the internal sequence tree
+
+  \details A call to this method will only trigger a computation only if some
+  change to the set of source points occurred since the last time
+  the sequence tree was computed.
+  */
+  void build_sequence_tree()
+  {
+    if (changed_since_last_build())
+    {
+      construct_sequence_tree_internal();
+    }
+  }
+
+  /*!
+  \brief Removes all data, the class is as if it was constructed.
+
+  \details All internal containers are cleared  and the internal
+  sequence tree is also cleared.  For a version which defers deletion until
+  it is necessary, use `Surface_mesh_shortest_path::remove_all_source_points()`.
+  */
+  void clear()
+  {
+    reset_algorithm();
+  }
+
+  /// @}
+
+  /// \name Accessors
+  /// @{
+
+  /*!
+  \brief Returns an iterator to the first source point location
+
+  \details The elements will appear in the order they were inserted to the
+  structure by calls to `add_source_point()` or `add_source_points()`.  Deleted
+  points will not appear in the sequence.
+
+  \return An iterator to the first of the stored source points.
+  */
+  Source_point_iterator source_points_begin() const
+  {
+    // It is a feature of C++11 that `const_iterator` may be used in calls to `erase()`, however
+    // in order to support C++98, we must use `iterator`.  Semantically, this is correct, but
+    // I must cast away the const-ness to hide the internal uglyness
+    return Source_point_iterator(const_cast<std::list<Face_location>&>(m_faceLocations).begin());
+  }
+
+  /*!
+  \brief Returns an iterator to one past the last source point location
+
+  \return An iterator to one past-the-end in the list of stored source points.
+  */
+  Source_point_iterator source_points_end() const
+  {
+    return Source_point_iterator(const_cast<std::list<Face_location>&>(m_faceLocations).end());
+  }
+
+  /*!
+  \brief Returns the total number of source points used for the shortest path queries.
+  */
+  std::size_t number_of_source_points() const
+  {
+    return m_faceLocations.size();
+  }
+
+  /*!
+  \brief Determines if the internal sequence tree is valid (already built and no new source point has been added).
+
+  \return true if the structure needs to be rebuilt, false otherwise
+  */
+  bool changed_since_last_build() const
+  {
+    return m_firstNewSourcePoint != m_faceLocations.end() || !m_deletedSourceLocations.empty();
+  }
+
+  /// @}
+
+  /// \name Shortest Distance Queries
+  /// @{
+
+  /*!
+  \brief Computes the shortest surface distance from a vertex to any source point
+
+  \param v A vertex of the input face graph
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  Shortest_path_result shortest_distance_to_source_points(vertex_descriptor v)
+  {
+    build_sequence_tree();
+
+    Node_distance_pair result = m_closestToVertices[get(m_vertexIndexMap, v)];
+
+    Cone_tree_node* current = result.first;
+
+    if (current)
+    {
+      return std::make_pair(result.second, m_rootNodes[current->tree_id()].second);
+    }
+    else
+    {
+      return std::make_pair(FT(-1.0), source_points_end());
+    }
+  }
+
+  /*!
+  \brief Computes the shortest surface distance from any surface location to any source point
+
+  \param f A face of the input face graph
+  \param location Barycentric coordinate of the query point on face `f`
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  Shortest_path_result shortest_distance_to_source_points(face_descriptor f, Barycentric_coordinate location)
+  {
+    build_sequence_tree();
+
+    std::pair<Node_distance_pair, Barycentric_coordinate> result = nearest_to_location(f, location);
+
+    Cone_tree_node* current = result.first.first;
+
+    if (current)
+    {
+      return std::make_pair(result.first.second, m_rootNodes[current->tree_id()].second);
+    }
+    else
+    {
+      return std::make_pair(FT(-1.0), source_points_end());
+    }
+  }
+
+  /// @}
+
+  /// \name Shortest Path Sequence Queries
+  /// @{
+
+  /*!
+  \brief Visits the sequence of edges, vertices and faces traversed by the shortest path
+  from a vertex to any source point.
+
+  \details Visits simplices, starting from the query vertex, back to
+  the nearest source point. If no shortest path could be found (for example,
+  the surface is disconnected), then no calls to the visitor will be made
+  (not even for the query vertex).
+
+  \param v A vertex of the input face graph
+  \param visitor A model of `SurfaceMeshShortestPathVisitor` to receive the shortest path
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  template <class Visitor>
+  Shortest_path_result
+  shortest_path_sequence_to_source_points(vertex_descriptor v, Visitor& visitor)
+  {
+    build_sequence_tree();
+
+    Node_distance_pair result = m_closestToVertices[get(m_vertexIndexMap, v)];
+    Cone_tree_node* current = result.first;
+
+    if (current)
+    {
+      visitor(v);
+      visit_shortest_path(current, current->target_point(), visitor);
+      return std::make_pair(result.second, m_rootNodes[current->tree_id()].second);
+    }
+    else
+    {
+      return std::make_pair(FT(-1.0), source_points_end());
+    }
+  }
+
+  /*!
+  \brief Visits the sequence of edges, vertices and faces traversed by the shortest path
+  from any surface location to any source point.
+
+  \details Visits simplices, starting from the query point, back to
+  the nearest source point. If no shortest path could be found (for example,
+  the surface is disconnected), then no calls to the visitor will be made
+  (not even for the query point).
+
+  \param f A face of the input face graph
+  \param location Barycentric coordinate of the query point on face `f`
+  \param visitor A model of `SurfaceMeshShortestPathVisitor` to receive the shortest path
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  template <class Visitor>
+  Shortest_path_result
+  shortest_path_sequence_to_source_points(face_descriptor f, Barycentric_coordinate location, Visitor& visitor)
+  {
+    build_sequence_tree();
+
+    std::pair<Node_distance_pair, Barycentric_coordinate> result = nearest_to_location(f, location);
+    Cone_tree_node* current = result.first.first;
+
+    if (current)
+    {
+      Point_2 locationInContext = construct_barycenter_in_triangle_2(current->layout_face(), result.second);
+      visitor(f, location);
+      visit_shortest_path(current, locationInContext, visitor);
+      return std::make_pair(result.first.second, m_rootNodes[current->tree_id()].second);
+    }
+    else
+    {
+      return std::make_pair(FT(-1.0), source_points_end());
+    }
+  }
+
+  /// @}
+
+  /// \name Shortest Path Point Queries
+  /// @{
+
+  /*!
+  \brief Computes the sequence of points in the shortest path along the
+    surface of the input face graph from the given vertex to the closest
+    source point.
+
+  \param v A vertex of the input face graph
+  \param output An OutputIterator to receive the shortest path points as `Point_3` objects
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  template <class OutputIterator>
+  Shortest_path_result
+  shortest_path_points_to_source_points(vertex_descriptor v, OutputIterator output)
+  {
+    build_sequence_tree();
+
+    Point_path_visitor_wrapper<OutputIterator> wrapper(*this, output);
+    return shortest_path_sequence_to_source_points(v, wrapper);
+  }
+
+  /*!
+  \brief Computes the sequence of points in the shortest path along the
+    surface of the input face graph from the given query location to the closest
+    source point.
+
+  \param f A face of on the input face graph
+  \param location The barycentric coordinate of the query point on face `f`
+  \param output An OutputIterator to receive the shortest path points as `Point_3` objects
+  \return A pair, containing the distance to the source point, and an
+    iterator to the source point.  If no source point was reachable (can
+    occur when the graph is disconnected), the distance will be a negative
+    value and the source point iterator will be equal to `source_points_end()`.
+  */
+  template <class OutputIterator>
+  Shortest_path_result
+  shortest_path_points_to_source_points(face_descriptor f, Barycentric_coordinate location, OutputIterator output)
+  {
+    build_sequence_tree();
+
+    Point_path_visitor_wrapper<OutputIterator> wrapper(*this, output);
+    return shortest_path_sequence_to_source_points(f, location, wrapper);
+  }
+
+  /// @}
+
+  /// \name Surface Point Constructions
+  /// @{
+
+  /*!
+  \brief Returns the 3-dimensional coordinate at the barycentric coordinate
+    of the given face.
+
+  \details The following static overloads are also available:
+    - `static Point_3 point(face_descriptor f, Barycentric_coordinate location, const Triangle_mesh& g, const Traits& traits = Traits())`
+    - `static Point_3 point(face_descriptor f, Barycentric_coordinate location, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())`
+
+  \param f A face of on the input face graph
+  \param location The barycentric coordinate of the query point on face `f`
+  */
+  Point_3 point(face_descriptor f, Barycentric_coordinate location) const
+  {
+    return point(f, location, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  static Point_3 point(face_descriptor f, Barycentric_coordinate location, const Triangle_mesh& g, const Traits& traits = Traits())
+  {
+    return point(f, location, g, CGAL::get(CGAL::vertex_point, g), traits);
+  }
+
+  static Point_3 point(face_descriptor f, Barycentric_coordinate location, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    return construct_barycenter_in_triangle_3(triangle_from_face(f, g, vertexPointMap), location, traits);
+  }
+
+  /// \endcond
+
+  /*!
+  \brief Returns the 3-dimensional coordinate at the parametric location
+    along the given edge.
+
+  \details The following static overloads are also available:
+    - `static Point_3 point(halfedge_descriptor edge, FT t, const Triangle_mesh& g, const Traits& traits = Traits())`
+    - `static Point_3 point(halfedge_descriptor edge, FT t, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())`
+
+  \param edge An edge of the input face graph
+  \param t The parametric distance along edge of the desired point
+  */
+  Point_3 point(halfedge_descriptor edge, FT t) const
+  {
+    return point(edge, t, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  static Point_3 point(halfedge_descriptor edge, FT t, const Triangle_mesh& g, const Traits& traits = Traits())
+  {
+    return point(edge, t, g, CGAL::get(CGAL::vertex_point, g), traits);
+  }
+
+  static Point_3 point(halfedge_descriptor edge, FT t, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    typename Traits::Construct_barycenter_3 construct_barycenter_3(traits.construct_barycenter_3_object());
+
+    // Note: the parameter t is meant to be the weighted coordinate on the _endpoint_ (i.e. target) of the segment
+    return construct_barycenter_3(get(vertexPointMap, target(edge, g)), t, get(vertexPointMap, source(edge, g)));
+  }
+
+  /// \endcond
+
+  /*!
+  \brief Returns the 3-dimensional coordinate of the given vertex.
+
+  \param vertex A vertex of the input face graph
+  */
+  Point_3 point(vertex_descriptor vertex) const
+  {
+    return get(m_vertexPointMap, vertex);
+  }
+
+  /// @}
+
+  /// \name Surface Face Location Constructions
+  /// @{
+
+  /*!
+  \brief Returns the location of the given vertex as a `Face_location`
+
+  \details The following static overload is also available:
+    - `static Face_location face_location(vertex_descriptor vertex, const Triangle_mesh& g, const Traits& traits = Traits())`
+
+  \param vertex A vertex of the input face graph
+  */
+  Face_location face_location(vertex_descriptor vertex) const
+  {
+    return face_location(vertex, m_graph, m_traits);
+  }
+
+  /// \cond
+
+  static Face_location face_location(vertex_descriptor vertex, const Triangle_mesh& g, const Traits& traits = Traits())
+  {
+    typename Traits::Construct_barycentric_coordinate construct_barycentric_coordinate(traits.construct_barycentric_coordinate_object());
+    halfedge_descriptor he = next(halfedge(vertex, g), g);
+    face_descriptor locationFace = face(he, g);
+    std::size_t edgeIndex = CGAL::internal::edge_index(he, g);
+
+    FT coords[3] = { FT(0.0), FT(0.0), FT(0.0) };
+
+    coords[edgeIndex] = FT(1.0);
+
+    return Face_location(locationFace, construct_barycentric_coordinate(coords[0], coords[1], coords[2]));
+  }
+
+  /// \endcond
+
+  /*!
+  \brief Returns a location along the given edge as a `Face_location`.
+
+  \details The following static overload is also available:
+    - `static Face_location face_location(halfedge_descriptor he, FT t, const Triangle_mesh& g, const Traits& traits = Traits())`
+
+  \param he A halfedge of the input face graph
+  \param t Parametric distance of the desired point along `he`
+  */
+  Face_location face_location(halfedge_descriptor he, FT t) const
+  {
+    return face_location(he, t, m_graph, m_traits);
+  }
+
+  /// \cond
+
+  static Face_location face_location(halfedge_descriptor he, FT t, const Triangle_mesh& g, const Traits& traits = Traits())
+  {
+    typename Traits::Construct_barycentric_coordinate cbc(traits.construct_barycentric_coordinate_object());
+    face_descriptor locationFace = face(he, g);
+    std::size_t edgeIndex = CGAL::internal::edge_index(he, g);
+
+    const FT oneMinusT(FT(1.0) - t);
+
+    FT coords[3] = { FT(0.0), FT(0.0), FT(0.0) };
+
+    coords[edgeIndex] = oneMinusT;
+    coords[(edgeIndex + 1) % 3] = t;
+
+    return Face_location(locationFace, cbc(coords[0], coords[1], coords[2]));
+  }
+
+  /// \endcond
+
+  /// @}
+
+  /// \name Nearest Face Location Queries
+  /// @{
+
+  /*
+  \brief Returns the nearest face location to the given point.
+    Note that this will (re-)build an `AABB_tree` on each call. If you need
+    to  call this function more than once, use `build_aabb_tree()` to cache a
+    copy of the `AABB_tree`, and use the overloads of this function
+    that accept a reference to an `AABB_tree` as input.
+
+  \details The following static overload is also available:
+    - `static Face_location locate(const Point_3& p, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())`
+
+  \tparam AABBTraits A model of `AABBTraits` used to define a \cgal `AABB_tree`.
+
+  \param p Point to locate on the input face graph
+  */
+  template <class AABBTraits>
+  Face_location locate(const Point_3& p) const
+  {
+    return locate<AABBTraits>(p, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  template <class AABBTraits>
+  static Face_location locate(const Point_3& location, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    AABB_tree<AABBTraits> tree;
+    build_aabb_tree(g, tree);
+    return locate(location, tree, g, vertexPointMap, traits);
+  }
+
+  /// \endcond
+
+  /*!
+  \brief Returns the face location nearest to the given point.
+
+  \details The following static overload is also available:
+    - static Face_location locate(const Point_3& p, const AABB_tree<AABBTraits>& tree, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+
+  \tparam AABBTraits A model of `AABBTraits` used to define a \cgal `AABB_tree`.
+
+  \param p Point to locate on the input face graph
+  \param tree A `AABB_tree` containing the triangular faces of the input surface mesh to perform the point location with
+  */
+  template <class AABBTraits>
+  Face_location locate(const Point_3& p, const AABB_tree<AABBTraits>& tree) const
+  {
+    return locate(p, tree, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  template <class AABBTraits>
+  static Face_location locate(const Point_3& location, const AABB_tree<AABBTraits>& tree, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    typename Traits::Construct_barycentric_coordinate_in_triangle_3 cbcit3(traits.construct_barycentric_coordinate_in_triangle_3_object());
+    typename AABB_tree<AABBTraits>::Point_and_primitive_id result = tree.closest_point_and_primitive(location);
+
+    face_descriptor f = result.second;
+    Barycentric_coordinate b = cbcit3(triangle_from_face(f, g, vertexPointMap), result.first);
+    return Face_location(f, b);
+  }
+
+  /// \endcond
+
+  /*
+  \brief Returns the face location along `ray` nearest to its source point.
+    Note that this will (re-)build an `AABB_tree` on each call. If you need
+    to  call this function more than once, use `build_aabb_tree()` to cache a
+    copy of the `AABB_tree`, and use the overloads of this function
+    that accept a reference to an `AABB_tree` as input.
+
+  \details The following static overload is also available:
+    - `static Face_location locate(const Ray_3& ray, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())`
+
+  \tparam AABBTraits A model of `AABBTraits` used to define an `AABB_tree`.
+
+  \param ray Ray to intersect with the input face graph
+  */
+  template <class AABBTraits>
+  Face_location locate(const Ray_3& ray) const
+  {
+    return locate<AABBTraits>(ray, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  template <class AABBTraits>
+  static Face_location locate(const Ray_3& ray, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    AABB_tree<AABBTraits> tree;
+    build_aabb_tree(g, tree);
+    return locate(ray, tree, g, vertexPointMap, traits);
+  }
+
+  /// \endcond
+
+  /*!
+  \brief Returns the face location along `ray` nearest to
+    its source point.
+
+  \details The following static overload is also available:
+    - static Face_location locate(const Ray_3& ray, const AABB_tree<AABBTraits>& tree, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+
+  \tparam AABBTraits A model of `AABBTraits` used to define a \cgal `AABB_tree`.
+
+  \param ray Ray to intersect with the input face graph
+  \param tree A `AABB_tree` containing the triangular faces of the input surface mesh to perform the point location with
+  */
+  template <class AABBTraits>
+  Face_location locate(const Ray_3& ray, const AABB_tree<AABBTraits>& tree) const
+  {
+    return locate(ray, tree, m_graph, m_vertexPointMap, m_traits);
+  }
+
+  /// \cond
+
+  template <class AABBTraits>
+  static Face_location locate(const Ray_3& ray, const AABB_tree<AABBTraits>& tree, const Triangle_mesh& g, Vertex_point_map vertexPointMap, const Traits& traits = Traits())
+  {
+    typedef AABB_tree<AABBTraits> AABB_face_graph_tree;
+    typename Traits::Construct_barycentric_coordinate_in_triangle_3 cbcit3(traits.construct_barycentric_coordinate_in_triangle_3_object());
+    typename Traits::Construct_barycentric_coordinate cbc(traits.construct_barycentric_coordinate_object());
+    typename Traits::Compute_squared_distance_3 csd3(traits.compute_squared_distance_3_object());
+    typedef typename AABB_face_graph_tree::template Intersection_and_primitive_id<Ray_3>::Type Intersection_type;
+    typedef boost::optional<Intersection_type> Ray_intersection;
+
+    std::vector<Ray_intersection> intersections;
+
+    tree.all_intersections(ray, std::back_inserter(intersections));
+
+    bool foundOne = false;
+    FT nearestDistance = 0;
+    Point_3 nearestPoint = CGAL::ORIGIN;
+    face_descriptor nearestFace;
+
+    for (std::size_t i = 0; i < intersections.size(); ++i)
+    {
+      if (intersections[i])
+      {
+        Point_3* intersectionPoint = boost::get<Point_3>(&(intersections[i]->first));
+
+        if (intersectionPoint)
+        {
+          FT distance = csd3(*intersectionPoint, ray.source());
+
+          if (!foundOne || distance < nearestDistance)
+          {
+            foundOne = true;
+            nearestPoint = *intersectionPoint;
+            nearestDistance = distance;
+            nearestFace = intersections[i]->second;
+          }
+        }
+      }
+    }
+
+    if (foundOne)
+    {
+      Barycentric_coordinate b = cbcit3(triangle_from_face(nearestFace, g, vertexPointMap), nearestPoint);
+      return Face_location(nearestFace, b);
+    }
+    else
+    {
+      return Face_location(Graph_traits::null_face(), cbc(FT(0.0), FT(0.0), FT(0.0)));
+    }
+  }
+
+  /// \endcond
+
+  /// @}
+
+  /*
+  \brief Creates an `AABB_tree` suitable for use with `locate`.
+
+  \details The following static overload is also available:
+    - `static void build_aabb_tree(const Triangle_mesh& g, AABB_tree<AABBTraits>& outTree)`
+
+  \tparam AABBTraits A model of `AABBTraits` used to define a \cgal `AABB_tree`.
+
+  \param outTree Output parameter to store the computed `AABB_tree`
+  */
+  template <class AABBTraits>
+  void build_aabb_tree(AABB_tree<AABBTraits>& outTree) const
+  {
+    build_aabb_tree(m_graph, outTree);
+  }
+
+  /// \cond
+
+  template <class AABBTraits>
+  static void build_aabb_tree(const Triangle_mesh& g, AABB_tree<AABBTraits>& outTree)
+  {
+    face_iterator facesStart, facesEnd;
+    boost::tie(facesStart, facesEnd) = faces(g);
+    outTree.rebuild(facesStart, facesEnd, g);
+    outTree.build();
+  }
+  /// \endcond
+
+};
+
+} // namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_SURFACE_MESH_SHORTEST_PATH_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h
new file mode 100644
index 0000000..0c4b37b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h
@@ -0,0 +1,205 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_TRAITS_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_TRAITS_H
+
+#include <CGAL/Surface_mesh_shortest_path/barycentric.h>
+#include <CGAL/Surface_mesh_shortest_path/function_objects.h>
+
+#include <ostream>
+#include <cstddef>
+
+#include <boost/array.hpp>
+
+namespace CGAL {
+
+/*!
+\ingroup PkgSurfaceMeshShortestPathTraitsClasses
+
+\brief A model of the concept `SurfaceMeshShortestPathTraits`
+as required by the `Surface_mesh_shortest_path` class.
+
+\tparam K A \cgal Kernel
+
+\tparam G A model of `FaceListGraph`
+
+\cgalModels `SurfaceMeshShortestPathTraits`
+*/
+template <
+  class K,
+  class G>
+class Surface_mesh_shortest_path_traits : public K
+{
+public:
+
+  /// Kernel type
+  typedef K Kernel;
+
+  /// Triangle mesh type
+  typedef G Triangle_mesh;
+
+  typedef typename Kernel::FT FT;
+
+  /// Barycentric coordinate type
+  typedef typename CGAL::cpp11::array<FT,3> Barycentric_coordinate;
+
+  // Predicates
+public:
+  typedef typename Surface_mesh_shortest_paths_3::Compare_relative_intersection_along_segment_2<Kernel> Compare_relative_intersection_along_segment_2;
+  typedef typename Surface_mesh_shortest_paths_3::Is_saddle_vertex<Kernel, Triangle_mesh> Is_saddle_vertex;
+
+  // Constructions
+public:
+  class Construct_barycentric_coordinate
+  {
+  public:
+    typedef Barycentric_coordinate result_type;
+
+    result_type operator() (const FT& a, const FT& b, const FT& c) const
+    {
+      Barycentric_coordinate output;
+      output[0] = a;
+      output[1] = b;
+      output[2] = c;
+      return output;
+    }
+  };
+
+  class Construct_barycentric_coordinate_weight
+  {
+  public:
+    typedef FT result_type;
+
+    result_type operator() (const Barycentric_coordinate b, std::size_t i) const
+    {
+      return b[i % 3];
+    }
+  };
+
+  typedef typename Surface_mesh_shortest_paths_3::Construct_triangle_3_to_triangle_2_projection<K> Construct_triangle_3_to_triangle_2_projection;
+  typedef typename Surface_mesh_shortest_paths_3::Construct_triangle_3_along_segment_2_flattening<K> Construct_triangle_3_along_segment_2_flattening;
+  typedef typename Surface_mesh_shortest_paths_3::Compute_parametric_distance_along_segment_2<K> Compute_parametric_distance_along_segment_2;
+  typedef typename Surface_mesh_shortest_paths_3::Construct_barycentric_coordinate_in_triangle_2<K, Barycentric_coordinate, Construct_barycentric_coordinate> Construct_barycentric_coordinate_in_triangle_2;
+  typedef typename Surface_mesh_shortest_paths_3::Construct_barycentric_coordinate_in_triangle_3<K, Barycentric_coordinate, Construct_barycentric_coordinate> Construct_barycentric_coordinate_in_triangle_3;
+  typedef typename Surface_mesh_shortest_paths_3::Classify_barycentric_coordinate<Barycentric_coordinate, Construct_barycentric_coordinate_weight> Classify_barycentric_coordinate;
+
+private:
+  Kernel m_kernel;
+  Construct_barycentric_coordinate m_construct_barycentric_coordinate_object;
+  Construct_barycentric_coordinate_weight m_construct_barycentric_coordinate_weight_object;
+  Classify_barycentric_coordinate m_classify_barycentric_coordinate_object;
+  Construct_triangle_3_to_triangle_2_projection m_construct_triangle_3_to_triangle_2_projection_object;
+  Construct_triangle_3_along_segment_2_flattening m_construct_triangle_3_along_segment_2_flattening_object;
+  Construct_barycentric_coordinate_in_triangle_2 m_construct_barycentric_coordinate_in_triangle_2_object;
+  Construct_barycentric_coordinate_in_triangle_3 m_construct_barycentric_coordinate_in_triangle_3_object;
+  Compare_relative_intersection_along_segment_2 m_compare_relative_intersection_along_segment_2_object;
+  Is_saddle_vertex m_is_saddle_vertex_object;
+  Compute_parametric_distance_along_segment_2 m_compute_parametric_distance_along_segment_2_object;
+
+public:
+
+  Surface_mesh_shortest_path_traits()
+  {
+  }
+
+  Surface_mesh_shortest_path_traits(const Kernel& kernel)
+    : m_kernel(kernel)
+    , m_classify_barycentric_coordinate_object(m_construct_barycentric_coordinate_weight_object)
+    , m_construct_triangle_3_to_triangle_2_projection_object(m_kernel)
+    , m_construct_triangle_3_along_segment_2_flattening_object(m_kernel)
+    , m_is_saddle_vertex_object(m_kernel, m_construct_triangle_3_to_triangle_2_projection_object, m_construct_triangle_3_along_segment_2_flattening_object)
+    , m_compare_relative_intersection_along_segment_2_object(m_kernel)
+    , m_construct_barycentric_coordinate_in_triangle_2_object(m_construct_barycentric_coordinate_object, m_kernel.construct_vector_2_object(), m_kernel.compute_scalar_product_2_object())
+    , m_construct_barycentric_coordinate_in_triangle_3_object(m_construct_barycentric_coordinate_object, m_kernel.construct_vector_3_object(), m_kernel.compute_scalar_product_3_object())
+  {
+  }
+
+  Construct_barycentric_coordinate construct_barycentric_coordinate_object() const { return m_construct_barycentric_coordinate_object; }
+  Construct_barycentric_coordinate_weight construct_barycentric_coordinate_weight_object() const { return m_construct_barycentric_coordinate_weight_object; }
+  Classify_barycentric_coordinate classify_barycentric_coordinate_object() const { return m_classify_barycentric_coordinate_object; }
+
+  Is_saddle_vertex is_saddle_vertex_object() const { return m_is_saddle_vertex_object; }
+
+  Compare_relative_intersection_along_segment_2 compare_relative_intersection_along_segment_2_object() const { return m_compare_relative_intersection_along_segment_2_object; }
+  Construct_triangle_3_to_triangle_2_projection construct_triangle_3_to_triangle_2_projection_object() const { return m_construct_triangle_3_to_triangle_2_projection_object; }
+  Construct_triangle_3_along_segment_2_flattening construct_triangle_3_along_segment_2_flattening_object() const { return m_construct_triangle_3_along_segment_2_flattening_object; }
+  Construct_barycentric_coordinate_in_triangle_2 construct_barycentric_coordinate_in_triangle_2_object() const { return m_construct_barycentric_coordinate_in_triangle_2_object; }
+  Construct_barycentric_coordinate_in_triangle_3 construct_barycentric_coordinate_in_triangle_3_object() const { return m_construct_barycentric_coordinate_in_triangle_3_object; }
+  Compute_parametric_distance_along_segment_2 compute_parametric_distance_along_segment_2_object() const { return m_compute_parametric_distance_along_segment_2_object; }
+};
+
+template <class Kernel, class Triangle_mesh>
+std::ostream& operator<<(std::ostream& os, typename Surface_mesh_shortest_path_traits<Kernel, Triangle_mesh>::Barycentric_coordinate b)
+{
+  return os << b[0] << " " << b[1] << " " << b[2];
+}
+
+#ifndef DOXYGEN_RUNNING // needed due to a bug in doxygen
+/*!
+\ingroup PkgSurfaceMeshShortestPathTraitsClasses
+
+\internal
+
+\brief Provides an implementation of the SurfaceMeshShortestPathTraits
+model which uses an exact Kernel during the unfolding operations to achieve better overall precision
+
+\tparam K Kernel Type
+
+\tparam G triangle mesh type
+
+\cgalModels `SurfaceMeshShortestPathTraits`
+*/
+template <
+  class K,
+  class G>
+class Surface_mesh_shortest_path_traits_with_robust_unfolding : public Surface_mesh_shortest_path_traits<K,G>
+{
+public:
+  typedef K Kernel;
+  typedef typename Surface_mesh_shortest_paths_3::Robust_project_triangle_3_to_triangle_2<K> Construct_triangle_3_to_triangle_2_projection;
+  typedef typename Surface_mesh_shortest_paths_3::Robust_flatten_triangle_3_along_segment_2<K> Construct_triangle_3_along_segment_2_flattening;
+
+private:
+
+  Construct_triangle_3_to_triangle_2_projection m_robust_construct_triangle_3_to_triangle_2_projection_object;
+  Construct_triangle_3_along_segment_2_flattening m_robust_flatten_triangle_3_along_segment_2;
+
+public:
+
+  Surface_mesh_shortest_path_traits_with_robust_unfolding()
+  {
+  }
+
+  Surface_mesh_shortest_path_traits_with_robust_unfolding(const Kernel& kernel)
+    : Surface_mesh_shortest_path_traits<K,G>(kernel)
+    , m_robust_construct_triangle_3_to_triangle_2_projection_object(kernel)
+    , m_robust_flatten_triangle_3_along_segment_2(kernel)
+  {
+  }
+
+  Construct_triangle_3_to_triangle_2_projection construct_triangle_3_to_triangle_2_projection_object() const { return m_robust_construct_triangle_3_to_triangle_2_projection_object; }
+  Construct_triangle_3_along_segment_2_flattening construct_triangle_3_along_segment_2_flattening_object() const { return m_robust_flatten_triangle_3_along_segment_2; }
+};
+#endif
+
+} // namespace CGAL
+
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_TRAITS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/barycentric.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/barycentric.h
new file mode 100644
index 0000000..56578c7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/barycentric.h
@@ -0,0 +1,248 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_BARYCENTRIC_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_BARYCENTRIC_H
+
+#include <CGAL/number_utils.h>
+
+#include <utility>
+#include <cstddef>
+
+namespace CGAL {
+
+namespace Surface_mesh_shortest_paths_3 {
+
+template <class K, class B, class Construct_barycentric_coordinate>
+class Construct_barycentric_coordinate_in_triangle_2
+{
+public:
+  typedef typename K::FT FT;
+  typedef typename K::Triangle_2 Triangle_2;
+  typedef typename K::Point_2 Point_2;
+  typedef typename K::Vector_2 Vector_2;
+
+  typedef typename K::Construct_vector_2 Construct_vector_2;
+  typedef typename K::Compute_scalar_product_2 Compute_scalar_product_2;
+
+  typedef B result_type;
+
+private:
+  Construct_barycentric_coordinate m_construct_barycentric_coordinate;
+  Construct_vector_2 m_construct_vector_2;
+  Compute_scalar_product_2 m_compute_scalar_product_2;
+
+public:
+  Construct_barycentric_coordinate_in_triangle_2()
+  {
+  }
+
+  Construct_barycentric_coordinate_in_triangle_2(const Construct_barycentric_coordinate& cbc, const Construct_vector_2& cv2, const Compute_scalar_product_2& csp2)
+    : m_construct_barycentric_coordinate(cbc)
+    , m_construct_vector_2(cv2)
+    , m_compute_scalar_product_2(csp2)
+  {
+  }
+
+  result_type operator()(const Triangle_2& t, const Point_2& p) const
+  {
+    Vector_2 v0 = m_construct_vector_2(t[0], t[1]);
+    Vector_2 v1 = m_construct_vector_2(t[0], t[2]);
+    Vector_2 v2 = m_construct_vector_2(t[0], p);
+
+    FT d00 = m_compute_scalar_product_2(v0, v0);
+    FT d01 = m_compute_scalar_product_2(v0, v1);
+    FT d11 = m_compute_scalar_product_2(v1, v1);
+    FT d20 = m_compute_scalar_product_2(v2, v0);
+    FT d21 = m_compute_scalar_product_2(v2, v1);
+
+    FT denom = d00 * d11 - d01 * d01;
+
+    FT v = (d11 * d20 - d01 * d21) / denom;
+    FT w = (d00 * d21 - d01 * d20) / denom;
+    return m_construct_barycentric_coordinate(FT(1.0) - v - w, v, w);
+  }
+};
+
+template <class K, class B, class Construct_barycentric_coordinate>
+class Construct_barycentric_coordinate_in_triangle_3
+{
+public:
+  typedef typename K::FT FT;
+  typedef typename K::Triangle_3 Triangle_3;
+  typedef typename K::Point_3 Point_3;
+  typedef typename K::Vector_3 Vector_3;
+
+  typedef typename K::Construct_vector_3 Construct_vector_3;
+  typedef typename K::Compute_scalar_product_3 Compute_scalar_product_3;
+
+  typedef B result_type;
+
+private:
+  Construct_barycentric_coordinate m_construct_barycentric_coordinate;
+  Construct_vector_3 m_construct_vector_3;
+  Compute_scalar_product_3 m_compute_scalar_product_3;
+
+public:
+  Construct_barycentric_coordinate_in_triangle_3()
+  {
+  }
+
+  Construct_barycentric_coordinate_in_triangle_3(const Construct_barycentric_coordinate& cbc, const Construct_vector_3& cv3, const Compute_scalar_product_3& csp3)
+    : m_construct_barycentric_coordinate(cbc)
+    , m_construct_vector_3(cv3)
+    , m_compute_scalar_product_3(csp3)
+  {
+  }
+
+  result_type operator()(const Triangle_3& t, const Point_3& p) const
+  {
+    Vector_3 v0 = m_construct_vector_3(t[0], t[1]);
+    Vector_3 v1 = m_construct_vector_3(t[0], t[2]);
+    Vector_3 v2 = m_construct_vector_3(t[0], p);
+
+    FT d00 = m_compute_scalar_product_3(v0, v0);
+    FT d01 = m_compute_scalar_product_3(v0, v1);
+    FT d11 = m_compute_scalar_product_3(v1, v1);
+    FT d20 = m_compute_scalar_product_3(v2, v0);
+    FT d21 = m_compute_scalar_product_3(v2, v1);
+
+    FT denom = d00 * d11 - d01 * d01;
+
+    FT v = (d11 * d20 - d01 * d21) / denom;
+    FT w = (d00 * d21 - d01 * d20) / denom;
+    return m_construct_barycentric_coordinate(FT(1.0) - v - w, v, w);
+  }
+};
+
+/*!
+  \brief Classification of the location of a 3-tuple barycentric coordinate in a triangle
+*/
+enum Barycentric_coordinate_type
+{
+  /// If the coordinate is invalid
+  BARYCENTRIC_COORDINATE_INVALID = 0,
+  /// if the coordinate has exactly one non-zero weight equal to 1, and the rest are zero
+  BARYCENTRIC_COORDINATE_ON_VERTEX,
+  ///if the coordinate has exactly one zero weight, and the rest sum to 1
+  BARYCENTRIC_COORDINATE_ON_BOUNDARY,
+  /// if the coordinate has no non-zero weight, and they all sum to 1
+  BARYCENTRIC_COORDINATE_ON_BOUNDED_SIDE,
+  /// if the weights of the coordinate do not sum to 1
+  BARYCENTRIC_COORDINATE_ON_UNBOUNDED_SIDE
+};
+
+template <class B, class Construct_barycentric_coordinate_weight>
+class Classify_barycentric_coordinate
+{
+public:
+  typedef B Barycentric_coordinate;
+  typedef std::pair<Barycentric_coordinate_type, std::size_t> result_type;
+
+private:
+  Construct_barycentric_coordinate_weight m_construct_barycentric_coordinate_weight;
+
+public:
+
+  Classify_barycentric_coordinate()
+  {
+  }
+
+  Classify_barycentric_coordinate(const Construct_barycentric_coordinate_weight& construct_barycentric_coordinate_weight)
+    : m_construct_barycentric_coordinate_weight(construct_barycentric_coordinate_weight)
+  {
+  }
+
+  result_type operator()(const Barycentric_coordinate& baryCoords)
+  {
+    Construct_barycentric_coordinate_weight cbcw;
+
+    bool nonZero[3];
+    std::size_t numNonZero = 0;
+
+    if (cbcw(baryCoords, 0) + cbcw(baryCoords, 1) + cbcw(baryCoords, 2) > 1.00001 || cbcw(baryCoords, 0) + cbcw(baryCoords, 1) + cbcw(baryCoords, 2) < 0.99999)
+    {
+      return std::make_pair(BARYCENTRIC_COORDINATE_ON_UNBOUNDED_SIDE, 0);
+    }
+
+    for (std::size_t i = 0; i < 3; ++i)
+    {
+      nonZero[i] = !CGAL::is_zero(cbcw(baryCoords, i));
+
+      if (nonZero[i])
+      {
+        ++numNonZero;
+      }
+    }
+
+    if (numNonZero == 3)
+    {
+      return std::make_pair(BARYCENTRIC_COORDINATE_ON_BOUNDED_SIDE, 0);
+    }
+    else if (numNonZero == 2)
+    {
+      std::size_t associatedEdge = 3;
+
+      if (!nonZero[0])
+      {
+        associatedEdge = 1;
+      }
+      else if (!nonZero[1])
+      {
+        associatedEdge = 2;
+      }
+      else
+      {
+        associatedEdge = 0;
+      }
+
+      return std::make_pair(BARYCENTRIC_COORDINATE_ON_BOUNDARY, associatedEdge);
+    }
+    else if (numNonZero == 1)
+    {
+      std::size_t associatedEdge = 3;
+
+      if (nonZero[0])
+      {
+        associatedEdge = 0;
+      }
+      else if (nonZero[1])
+      {
+        associatedEdge = 1;
+      }
+      else
+      {
+        associatedEdge = 2;
+      }
+
+      return std::make_pair(BARYCENTRIC_COORDINATE_ON_VERTEX, associatedEdge);
+    }
+    else
+    {
+      return std::make_pair(BARYCENTRIC_COORDINATE_INVALID, 0);
+    }
+  }
+
+};
+
+} // namespace Surface_mesh_shortest_paths_3
+
+} // namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATHS_3_BARYCENTRIC_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/function_objects.h
new file mode 100644
index 0000000..25da622
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/function_objects.h
@@ -0,0 +1,601 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#include <cstddef>
+
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/result_of.h>
+#include <CGAL/assertions.h>
+
+#include <CGAL/Surface_mesh_shortest_path/internal/misc_functions.h>
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_FUNCTION_OBJECTS_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_FUNCTION_OBJECTS_H
+
+namespace CGAL {
+
+namespace Surface_mesh_shortest_paths_3 {
+
+template <class Kernel>
+class Compute_parametric_distance_along_segment_2
+{
+public:
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_2 Point_2;
+  typedef typename Kernel::Vector_2 Vector_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+
+  typedef typename Kernel::Intersect_2 Intersect_2;
+  typedef typename Kernel::Construct_cartesian_const_iterator_2 Construct_cartesian_const_iterator_2;
+  typedef typename Kernel::Construct_vector_2 Construct_vector_2;
+  typedef typename Kernel::Construct_source_2 Construct_source_2;
+  typedef typename Kernel::Construct_target_2 Construct_target_2;
+
+  typedef typename Kernel::Cartesian_const_iterator_2 Cartesian_const_iterator_2;
+
+  typedef FT result_type;
+
+private:
+  Intersect_2 m_intersect_2;
+  Construct_cartesian_const_iterator_2 m_construct_cartesian_const_iterator_2;
+  Construct_vector_2 m_construct_vector_2;
+  Construct_source_2 m_construct_source_2;
+  Construct_target_2 m_construct_target_2;
+
+
+public:
+  Compute_parametric_distance_along_segment_2()
+  {
+  }
+
+  Compute_parametric_distance_along_segment_2(const Kernel& kernel)
+    : m_intersect_2(kernel.intersect_2_object())
+    , m_construct_cartesian_const_iterator_2(kernel.construct_cartesian_const_iterator_2_object())
+    , m_construct_vector_2(kernel.construct_vector_2_object())
+    , m_construct_source_2(kernel.construct_source_2_object())
+    , m_construct_target_2(kernel.construct_target_2_object())
+  {
+  }
+
+  result_type operator () (const Segment_2& s, const Point_2& p) const
+  {
+    return (*this)(m_construct_source_2(s), m_construct_target_2(s), p);
+  }
+
+  result_type operator () (const Point_2& x0, const Point_2& x1, const Point_2& point) const
+  {
+    Vector_2 lineDiff(m_construct_vector_2(x0, x1));
+    Vector_2 pointDiff(m_construct_vector_2(x0, point));
+
+    Cartesian_const_iterator_2 lineDiffIt(m_construct_cartesian_const_iterator_2(lineDiff));
+    Cartesian_const_iterator_2 pointDiffIt(m_construct_cartesian_const_iterator_2(pointDiff));
+
+    FT lineDiff_x = *lineDiffIt;
+    ++lineDiffIt;
+    FT lineDiff_y = *lineDiffIt;
+
+    FT pointDiff_x = *pointDiffIt;
+    ++pointDiffIt;
+    FT pointDiff_y = *pointDiffIt;
+
+    if (CGAL::abs(lineDiff_x) > CGAL::abs(lineDiff_y))
+    {
+      return pointDiff_x / lineDiff_x;
+    }
+    else
+    {
+      return pointDiff_y / lineDiff_y;
+    }
+  }
+};
+
+template <class Kernel>
+class Parametric_distance_along_segment_3
+{
+public:
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_3 Point_3;
+  typedef typename Kernel::Vector_3 Vector_3;
+  typedef typename Kernel::Segment_3 Segment_3;
+
+  typedef typename Kernel::Construct_cartesian_const_iterator_3 Construct_cartesian_const_iterator_3;
+  typedef typename Kernel::Construct_vector_3 Construct_vector_3;
+  typedef typename Kernel::Construct_source_3 Construct_source_3;
+  typedef typename Kernel::Construct_target_3 Construct_target_3;
+
+  typedef typename Kernel::Cartesian_const_iterator_3 Cartesian_const_iterator_3;
+
+  typedef FT result_type;
+
+private:
+  Construct_cartesian_const_iterator_3 m_construct_cartesian_const_iterator_3;
+  Construct_vector_3 m_construct_vector_3;
+  Construct_source_3 m_construct_source_3;
+  Construct_target_3 m_construct_target_3;
+
+
+public:
+  Parametric_distance_along_segment_3()
+  {
+  }
+
+  Parametric_distance_along_segment_3(const Kernel& kernel)
+    : m_construct_cartesian_const_iterator_3(kernel.construct_cartesian_const_iterator_3_object())
+    , m_construct_vector_3(kernel.construct_vector_3_object())
+    , m_construct_source_3(kernel.construct_source_3_object())
+    , m_construct_target_3(kernel.construct_target_3_object())
+  {
+  }
+
+  result_type operator () (const Segment_3& s, const Point_3& p) const
+  {
+    return (*this)(m_construct_source_3(s), m_construct_target_3(s), p);
+  }
+
+  result_type operator () (const Point_3& x0, const Point_3& x1, const Point_3& point) const
+  {
+    Vector_3 lineDiff(m_construct_vector_3(x0, x1));
+    Vector_3 pointDiff(m_construct_vector_3(x0, point));
+
+    Cartesian_const_iterator_3 lineDiffIt(m_construct_cartesian_const_iterator_3(lineDiff));
+    Cartesian_const_iterator_3 pointDiffIt(m_construct_cartesian_const_iterator_3(pointDiff));
+
+    FT lineDiff_x = *lineDiffIt;
+    ++lineDiffIt;
+    FT lineDiff_y = *lineDiffIt;
+    ++lineDiffIt;
+    FT lineDiff_z = *lineDiffIt;
+
+    FT pointDiff_x = *pointDiffIt;
+    ++pointDiffIt;
+    FT pointDiff_y = *pointDiffIt;
+    ++pointDiffIt;
+    FT pointDiff_z = *pointDiffIt;
+
+    if (CGAL::abs(lineDiff_x) > CGAL::abs(lineDiff_y) && CGAL::abs(lineDiff_x) > CGAL::abs(lineDiff_z))
+    {
+      return pointDiff_x / lineDiff_x;
+    }
+    else if (CGAL::abs(lineDiff_y) > CGAL::abs(lineDiff_z))
+    {
+      return pointDiff_y / lineDiff_y;
+    }
+    else
+    {
+      return pointDiff_z / lineDiff_z;
+    }
+  }
+};
+
+template<class K>
+class Construct_triangle_3_to_triangle_2_projection
+{
+public:
+  typedef typename K::Vector_3 Vector_3;
+  typedef typename K::FT FT;
+  typedef typename K::Triangle_3 Triangle_3;
+  typedef typename K::Triangle_2 Triangle_2;
+  typedef typename K::Point_2 Point_2;
+  typedef typename K::Point_3 Point_3;
+  typedef typename K::Line_3 Line_3;
+
+  typedef typename K::Construct_line_3 Construct_line_3;
+  typedef typename K::Compute_squared_distance_3 Compute_squared_distance_3;
+  typedef typename K::Construct_vertex_3 Construct_vertex_3;
+  typedef typename K::Construct_vector_3 Construct_vector_3;
+  typedef typename K::Construct_point_2 Construct_point_2;
+  typedef typename K::Construct_triangle_2 Construct_triangle_2;
+  typedef typename K::Construct_projected_point_3 Construct_projected_point_3;
+
+private:
+  Parametric_distance_along_segment_3<K> m_parametric_distance_along_segment_3;
+  Compute_squared_distance_3 m_compute_squared_distance_3;
+  Construct_line_3 m_construct_line_3;
+  Construct_projected_point_3 m_construct_projected_point_3;
+  mutable Construct_vertex_3 m_construct_vertex_3;
+  //~ Construct_vector_3 m_construct_vector_3;
+  Construct_point_2 m_construct_point_2;
+  Construct_triangle_2 m_construct_triangle_2;
+
+public:
+  Construct_triangle_3_to_triangle_2_projection()
+  {
+  }
+
+  Construct_triangle_3_to_triangle_2_projection(const K& kernel)
+    : m_compute_squared_distance_3(kernel.compute_squared_distance_3_object())
+    , m_construct_line_3(kernel.construct_line_3_object())
+    , m_construct_vertex_3(kernel.construct_vertex_3_object())
+    , m_construct_projected_point_3(kernel.construct_projected_point_3_object())
+    , m_construct_point_2(kernel.construct_point_2_object())
+    , m_construct_triangle_2(kernel.construct_triangle_2_object())
+  {
+  }
+
+  Triangle_2 operator() (const Triangle_3& t3) const
+  {
+    Line_3 baseSegment(m_construct_line_3(m_construct_vertex_3(t3, 0), m_construct_vertex_3(t3, 1)));
+
+    Point_3 projectedLocation3d(m_construct_projected_point_3(baseSegment, m_construct_vertex_3(t3, 2)));
+    FT scalePoint = m_parametric_distance_along_segment_3(m_construct_vertex_3(t3, 0), m_construct_vertex_3(t3, 1), projectedLocation3d);
+    FT triangleHeight = CGAL::internal::select_sqrt(m_compute_squared_distance_3(projectedLocation3d, t3[2]));
+    FT v01Len = CGAL::internal::select_sqrt(m_compute_squared_distance_3(t3[1], t3[0]));
+
+    Point_2 A(m_construct_point_2(0.0, 0.0));
+    Point_2 B(m_construct_point_2(v01Len, 0.0));
+    Point_2 C(m_construct_point_2(v01Len * scalePoint, triangleHeight));
+
+    return m_construct_triangle_2(A, B, C);
+  }
+};
+
+template<class K>
+class Robust_project_triangle_3_to_triangle_2
+{
+public:
+  typedef typename K::Triangle_3 Triangle_3;
+  typedef typename K::Triangle_2 Triangle_2;
+  typedef Exact_predicates_exact_constructions_kernel_with_sqrt EKSQRT;
+  typedef Construct_triangle_3_to_triangle_2_projection<EKSQRT> Exact_project_triangle_3_to_triangle_2;
+  typedef Cartesian_converter<K, EKSQRT>  To_exact;
+  typedef Cartesian_converter<EKSQRT, K>  Back_from_exact;
+
+public:
+  Robust_project_triangle_3_to_triangle_2()
+  {
+  }
+
+  Robust_project_triangle_3_to_triangle_2(const K& /* kernel */)
+  {
+  }
+
+  Triangle_2 operator() (const Triangle_3& t3) const
+  {
+    Exact_project_triangle_3_to_triangle_2 ept3t2;
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+
+    return back_from_exact(ept3t2(to_exact(t3)));
+  }
+};
+
+template<class K>
+class Construct_triangle_3_along_segment_2_flattening
+{
+public:
+  typedef typename K::Vector_3 Vector_3;
+  typedef typename K::Vector_2 Vector_2;
+  typedef typename K::Line_3 Line_3;
+  typedef typename K::FT FT;
+  typedef typename K::Triangle_3 Triangle_3;
+  typedef typename K::Triangle_2 Triangle_2;
+  typedef typename K::Point_2 Point_2;
+  typedef typename K::Point_3 Point_3;
+  typedef typename K::Segment_2 Segment_2;
+
+  typedef typename K::Compute_squared_distance_3 Compute_squared_distance_3;
+  typedef typename K::Construct_projected_point_3 Construct_projected_point_3;
+  typedef typename K::Construct_perpendicular_vector_2 Construct_perpendicular_vector_2;
+  typedef typename K::Construct_sum_of_vectors_2 Construct_sum_of_vectors_2;
+  typedef typename K::Construct_scaled_vector_2 Construct_scaled_vector_2;
+  typedef typename K::Construct_translated_point_2 Construct_translated_point_2;
+  typedef typename K::Construct_vector_2 Construct_vector_2;
+  typedef typename K::Compute_squared_length_2 Compute_squared_length_2;
+  typedef typename K::Construct_vertex_3 Construct_vertex_3;
+  typedef typename K::Construct_triangle_2 Construct_triangle_2;
+  typedef typename K::Construct_line_3 Construct_line_3;
+  typedef typename K::Construct_segment_3 Construct_segment_3;
+  typedef typename K::Construct_source_2 Construct_source_2;
+  typedef typename K::Construct_target_2 Construct_target_2;
+
+  typedef Triangle_2 result_type;
+
+private:
+
+  Parametric_distance_along_segment_3<K> m_parametric_distance_along_segment_3;
+  Compute_squared_distance_3 m_compute_squared_distance_3;
+  Construct_projected_point_3 m_construct_projected_point_3;
+  Construct_perpendicular_vector_2 m_construct_perpendicular_vector_2;
+  Construct_sum_of_vectors_2 m_construct_sum_of_vectors_2;
+  Construct_scaled_vector_2 m_construct_scaled_vector_2;
+  Construct_translated_point_2 m_construct_translated_point_2;
+  Construct_vector_2 m_construct_vector_2;
+  Compute_squared_length_2 m_compute_squared_length_2;
+  Construct_line_3 m_construct_line_3;
+  Construct_segment_3 m_construct_segment_3;
+  Construct_source_2 m_construct_source_2;
+  Construct_target_2 m_construct_target_2;
+  mutable Construct_vertex_3 m_construct_vertex_3;
+  Construct_triangle_2 m_construct_triangle_2;
+
+public:
+  Construct_triangle_3_along_segment_2_flattening()
+  {
+  }
+
+  Construct_triangle_3_along_segment_2_flattening(const K& kernel)
+    : m_compute_squared_distance_3(kernel.compute_squared_distance_3_object())
+    , m_construct_projected_point_3(kernel.construct_projected_point_3_object())
+    , m_construct_perpendicular_vector_2(kernel.construct_perpendicular_vector_2_object())
+    , m_construct_sum_of_vectors_2(kernel.construct_sum_of_vectors_2_object())
+    , m_construct_scaled_vector_2(kernel.construct_scaled_vector_2_object())
+    , m_construct_translated_point_2(kernel.construct_translated_point_2_object())
+    , m_construct_vector_2(kernel.construct_vector_2_object())
+    , m_compute_squared_length_2(kernel.compute_squared_length_2_object())
+    , m_construct_line_3(kernel.construct_line_3_object())
+    , m_construct_segment_3(kernel.construct_segment_3_object())
+    , m_construct_source_2(kernel.construct_source_2_object())
+    , m_construct_target_2(kernel.construct_target_2_object())
+    , m_construct_vertex_3(kernel.construct_vertex_3_object())
+    , m_construct_triangle_2(kernel.construct_triangle_2_object())
+  {
+  }
+
+  result_type operator() (const Triangle_3& t3, std::size_t edgeIndex, const Segment_2& segment) const
+  {
+    Point_3 projectedLocation3d(m_construct_projected_point_3(m_construct_line_3(m_construct_vertex_3(t3, edgeIndex), m_construct_vertex_3(t3, edgeIndex + 1)), m_construct_vertex_3(t3, edgeIndex + 2)));
+    FT scalePoint = m_parametric_distance_along_segment_3(m_construct_segment_3(m_construct_vertex_3(t3, edgeIndex), m_construct_vertex_3(t3, edgeIndex + 1)), projectedLocation3d);
+    FT triangleHeight = CGAL::internal::select_sqrt(m_compute_squared_distance_3(projectedLocation3d, m_construct_vertex_3(t3, edgeIndex + 2)));
+
+    Vector_2 edgeVector(m_construct_vector_2(segment));
+
+    Vector_2 perpendicularEdgeVector(m_construct_perpendicular_vector_2(edgeVector, CGAL::COUNTERCLOCKWISE));
+    perpendicularEdgeVector = m_construct_scaled_vector_2(perpendicularEdgeVector, FT(1.0) / CGAL::internal::select_sqrt(m_compute_squared_length_2(perpendicularEdgeVector)));
+
+    Point_2 points[3];
+    points[edgeIndex] = m_construct_source_2(segment);
+    points[(edgeIndex + 1) % 3] = m_construct_target_2(segment);
+    points[(edgeIndex + 2) % 3] = m_construct_translated_point_2(m_construct_source_2(segment), m_construct_sum_of_vectors_2(m_construct_scaled_vector_2(edgeVector, scalePoint), m_construct_scaled_vector_2(perpendicularEdgeVector, triangleHeight)));
+
+    return m_construct_triangle_2(points[0], points[1], points[2]);
+  }
+};
+
+template<class K>
+class Robust_flatten_triangle_3_along_segment_2
+{
+public:
+  typedef typename K::Triangle_3 Triangle_3;
+  typedef typename K::Segment_2 Segment_2;
+  typedef typename K::Triangle_2 Triangle_2;
+
+  typedef Exact_predicates_exact_constructions_kernel_with_sqrt EKSQRT;
+  typedef Construct_triangle_3_along_segment_2_flattening<EKSQRT> Exact_flatten_triangle_3_along_segment_2;
+  typedef Cartesian_converter<K, EKSQRT>  To_exact;
+  typedef Cartesian_converter<EKSQRT, K>  Back_from_exact;
+
+public:
+  Robust_flatten_triangle_3_along_segment_2()
+  {
+  }
+
+  Robust_flatten_triangle_3_along_segment_2(const K& /* kernel */)
+  {
+  }
+
+  Triangle_2 operator() (const Triangle_3& t3, std::size_t edgeIndex, const Segment_2& segment) const
+  {
+    Exact_flatten_triangle_3_along_segment_2 eft3as2;
+    To_exact to_exact;
+    Back_from_exact back_from_exact;
+
+    return back_from_exact(eft3as2(to_exact(t3), edgeIndex, to_exact(segment)));
+  }
+};
+
+template <class K>
+class Compare_relative_intersection_along_segment_2
+{
+public:
+  typedef typename K::FT FT;
+  typedef typename K::Ray_2 Ray_2;
+  typedef typename K::Vector_2 Vector_2;
+  typedef typename K::Triangle_2 Triangle_2;
+  typedef typename K::Point_2 Point_2;
+  typedef typename K::Segment_2 Segment_2;
+  typedef typename K::Line_2 Line_2;
+
+  typedef typename K::Intersect_2 Intersect_2;
+  typedef typename K::Compare_distance_2 Compare_distance_2;
+  typedef typename K::Construct_line_2 Construct_line_2;
+  typedef typename K::Construct_source_2 Construct_source_2;
+  typedef typename K::Construct_target_2 Construct_target_2;
+
+  typedef CGAL::Comparison_result result_type;
+
+private:
+  Compute_parametric_distance_along_segment_2<K> m_parametric_distance_along_segment_2;
+  Intersect_2 m_intersect_2;
+  Compare_distance_2 m_compare_distance_2;
+  Construct_line_2 m_construct_line_2;
+  Construct_source_2 m_construct_source_2;
+  Construct_target_2 m_construct_target_2;
+
+public:
+  Compare_relative_intersection_along_segment_2()
+  {
+  }
+
+  Compare_relative_intersection_along_segment_2(const K& kernel)
+    : m_intersect_2(kernel.intersect_2_object())
+    , m_compare_distance_2(kernel.compare_distance_2_object())
+    , m_construct_line_2(kernel.construct_line_2_object())
+    , m_construct_source_2(kernel.construct_source_2_object())
+    , m_construct_target_2(kernel.construct_target_2_object())
+  {
+  }
+
+  result_type operator () (const Segment_2& s1, const Line_2& l1, const Segment_2& s2, const Line_2& l2) const
+  {
+    typedef typename CGAL::cpp11::result_of<Intersect_2(Line_2, Line_2)>::type LineLineIntersectResult;
+
+    Line_2 s1Line(m_construct_line_2(s1));
+
+    Line_2 s2Line(m_construct_line_2(s2));
+
+    LineLineIntersectResult intersectResult1(m_intersect_2(s1Line, l1));
+    CGAL_assertion(bool(intersectResult1));
+    if (!intersectResult1) return CGAL::SMALLER;
+
+    const Point_2* p1_ptr = boost::get<Point_2>(&*intersectResult1);
+
+    CGAL_assertion(p1_ptr && "Intersection should have been a point");
+    if (!p1_ptr) return CGAL::SMALLER;
+
+    CGAL_assertion_code(FT t1 = m_parametric_distance_along_segment_2(s1, *p1_ptr);)
+    CGAL_assertion(t1 >= FT(-0.00001) && t1 <= FT(1.00001));
+
+    LineLineIntersectResult intersectResult2 = m_intersect_2(s2Line, l2);
+    CGAL_assertion(bool(intersectResult2));
+    if (!intersectResult2) return CGAL::SMALLER;
+
+    const Point_2* p2_ptr = boost::get<Point_2>(&*intersectResult2);
+
+    CGAL_assertion(p2_ptr && "Intersection should have been a point");
+    if (!p2_ptr) return CGAL::SMALLER;
+
+    CGAL_assertion_code(FT t2 = m_parametric_distance_along_segment_2(s2, *p2_ptr);)
+    CGAL_assertion(t2 >= FT(-0.00001) && t2 <= FT(1.00001));
+
+    return m_compare_distance_2(s1.source(), *p1_ptr, s2.source(), *p2_ptr);
+  }
+};
+
+template <class Kernel, class FaceListGraph>
+class Is_saddle_vertex
+{
+public:
+  typedef typename Kernel::Point_3 Point_3;
+  typedef typename Kernel::Vector_3 Vector_3;
+  typedef typename Kernel::Triangle_3 Triangle_3;
+  typedef typename Kernel::Triangle_2 Triangle_2;
+  typedef typename Kernel::Segment_2 Segment_2;
+  typedef typename Kernel::Vector_2 Vector_2;
+  typedef typename Kernel::Point_2 Point_2;
+
+  typedef typename boost::graph_traits<FaceListGraph> Graph_traits;
+  typedef typename Graph_traits::vertex_descriptor vertex_descriptor;
+  typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor;
+
+  typedef typename CGAL::Surface_mesh_shortest_paths_3::Construct_triangle_3_to_triangle_2_projection<Kernel> Construct_triangle_3_to_triangle_2_projection;
+  typedef typename CGAL::Surface_mesh_shortest_paths_3::Construct_triangle_3_along_segment_2_flattening<Kernel> Construct_triangle_3_along_segment_2_flattening;
+  typedef typename Kernel::Orientation_2 Orientation_2;
+  typedef typename Kernel::Construct_triangle_3 Construct_triangle_3;
+  typedef typename Kernel::Construct_vertex_2 Construct_vertex_2;
+  typedef typename Kernel::Construct_segment_2 Construct_segment_2;
+  typedef typename Kernel::Construct_source_2 Construct_source_2;
+  typedef typename Kernel::Construct_target_2 Construct_target_2;
+
+  typedef typename Kernel::Boolean result_type;
+
+private:
+  Construct_triangle_3_to_triangle_2_projection m_project_triangle_3_to_triangle_2;
+  Construct_triangle_3_along_segment_2_flattening m_flatten_triangle_3_along_segment_2;
+  Construct_triangle_3 m_construct_triangle_3;
+  mutable Construct_vertex_2 m_construct_vertex_2;
+  Construct_segment_2 m_construct_segment_2;
+  Construct_source_2 m_construct_source_2;
+  Construct_target_2 m_construct_target_2;
+  Orientation_2 m_orientation_2;
+
+public:
+
+  Is_saddle_vertex()
+  {
+  }
+
+  Is_saddle_vertex(const Kernel& kernel, const Construct_triangle_3_to_triangle_2_projection& pt3tt2, const Construct_triangle_3_along_segment_2_flattening& ft3as2)
+    : m_orientation_2(kernel.orientation_2_object())
+    , m_construct_triangle_3(kernel.construct_triangle_3_object())
+    , m_construct_vertex_2(kernel.construct_vertex_2_object())
+    , m_construct_segment_2(kernel.construct_segment_2_object())
+    , m_construct_source_2(kernel.construct_source_2_object())
+    , m_construct_target_2(kernel.construct_target_2_object())
+    , m_project_triangle_3_to_triangle_2(pt3tt2)
+    , m_flatten_triangle_3_along_segment_2(ft3as2)
+  {
+  }
+
+  result_type operator() (vertex_descriptor v, FaceListGraph& g) const
+  {
+    return (*this)(v, g, get(boost::vertex_point, g));
+  }
+
+  template<class VertexPointMap>
+  result_type operator() (vertex_descriptor v, const FaceListGraph& g, VertexPointMap const& pointMap) const
+  {
+    halfedge_descriptor startEdge = halfedge(v, g);
+
+    Point_3 rootPoint(get(pointMap, v));
+    Point_3 prevPoint(get(pointMap, source(startEdge, g)));
+
+    halfedge_descriptor currentEdge = next(startEdge, g);
+
+    Point_3 nextPoint(get(pointMap, target(currentEdge, g)));
+
+    Triangle_3 baseFace3(rootPoint, nextPoint, prevPoint);
+
+    currentEdge = opposite(currentEdge, g);
+
+    Triangle_2 baseFace2(m_project_triangle_3_to_triangle_2(baseFace3));
+
+    Point_2 A(m_construct_vertex_2(baseFace2, 0));
+    Point_2 B(m_construct_vertex_2(baseFace2, 1));
+    Point_2 C(m_construct_vertex_2(baseFace2, 2));
+
+    Segment_2 baseSegment(m_construct_segment_2(A, C));
+
+    Segment_2 nextSegment(m_construct_segment_2(B, A));
+
+    CGAL::Orientation baseOrientation = m_orientation_2(m_construct_vertex_2(baseFace2, 0), m_construct_vertex_2(baseFace2, 2), m_construct_vertex_2(baseFace2, 1));
+
+    CGAL_assertion(baseOrientation != CGAL::COLLINEAR);
+
+    do
+    {
+      prevPoint = nextPoint;
+      currentEdge = next(currentEdge, g);
+      nextPoint = get(pointMap, target(currentEdge, g));
+      currentEdge = opposite(currentEdge, g);
+
+      Triangle_3 currentFace3(m_construct_triangle_3(rootPoint, nextPoint, prevPoint));
+      Triangle_2 currentFace2(m_flatten_triangle_3_along_segment_2(currentFace3, 2, nextSegment));
+
+      if (m_orientation_2(m_construct_source_2(baseSegment), m_construct_target_2(baseSegment), m_construct_vertex_2(currentFace2, 2)) != baseOrientation && m_orientation_2(m_construct_source_2(baseSegment), m_construct_target_2(baseSegment), m_construct_vertex_2(currentFace2, 1)) == baseOrientation)
+      {
+        return true;
+      }
+
+      nextSegment = m_construct_segment_2(currentFace2[1], currentFace2[0]);
+    }
+    while (currentEdge != startEdge);
+
+    return false;
+  }
+};
+
+} // namespace Surface_mesh_shortest_paths_3
+
+} // namespace CGAL
+
+#endif /* CGAL_SURFACE_MESH_SHORTEST_PATHS_3_FUNCTION_OBJECTS_H */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h
new file mode 100644
index 0000000..e72ece2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h
@@ -0,0 +1,86 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_EXPANSION_EVENT_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_EXPANSION_EVENT_H
+
+namespace CGAL {
+
+namespace internal {
+
+template<class Traits>
+class Cone_tree_node;
+
+template <class Traits>
+struct Cone_expansion_event
+{
+public:
+  typedef typename Traits::Segment_2 Segment_2;
+  typedef typename Traits::FT FT;
+
+public:
+  enum Expansion_type
+  {
+    LEFT_CHILD,
+    RIGHT_CHILD,
+    PSEUDO_SOURCE
+  };
+
+public:
+  Cone_tree_node<Traits>* m_parent;
+  FT m_distanceEstimate;
+  Expansion_type m_type;
+  Segment_2 m_windowSegment;
+  bool m_cancelled;
+
+public:
+  Cone_expansion_event(Cone_tree_node<Traits>* parent, const FT& distanceEstimate, Expansion_type type)
+    : m_parent(parent)
+    , m_distanceEstimate(distanceEstimate)
+    , m_type(type)
+    , m_cancelled(false)
+  {
+  }
+
+  Cone_expansion_event(Cone_tree_node<Traits>* parent, const FT& distanceEstimate, Expansion_type type, const Segment_2& windowSegment)
+    : m_parent(parent)
+    , m_distanceEstimate(distanceEstimate)
+    , m_type(type)
+    , m_windowSegment(windowSegment)
+    , m_cancelled(false)
+  {
+  }
+};
+
+// Does the opposite of what you would expect in order to implement a min-priority queue
+template <class Traits>
+struct Cone_expansion_event_min_priority_queue_comparator
+{
+public:
+  bool operator () (const Cone_expansion_event<Traits>* lhs, const Cone_expansion_event<Traits>* rhs) const
+  {
+    return rhs->m_distanceEstimate < lhs->m_distanceEstimate;
+  }
+};
+
+} // namespace internal
+
+} // namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_EXPANSION_EVENT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h
new file mode 100644
index 0000000..9ac7b98
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h
@@ -0,0 +1,439 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_TREE_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_TREE_H
+
+#include <vector>
+
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+#include <CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h>
+#include <CGAL/Surface_mesh_shortest_path/internal/misc_functions.h>
+
+namespace CGAL
+{
+
+namespace internal
+{
+
+template<class Traits>
+class Cone_tree_node
+{
+public:
+  enum Node_type
+  {
+    ROOT = 0,
+    FACE_SOURCE = 1,
+    EDGE_SOURCE = 2,
+    VERTEX_SOURCE = 3,
+    INTERVAL = 4
+  };
+
+private:
+  typedef typename Traits::Triangle_mesh Triangle_mesh;
+  typedef typename Traits::FT FT;
+  typedef typename Traits::Point_2 Point_2;
+  typedef typename Traits::Triangle_2 Triangle_2;
+  typedef typename Traits::Segment_2 Segment_2;
+  typedef typename Traits::Ray_2 Ray_2;
+  typedef typename boost::graph_traits<Triangle_mesh> Graph_traits;
+  typedef typename Graph_traits::face_descriptor face_descriptor;
+  typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor;
+  typedef typename Graph_traits::vertex_descriptor vertex_descriptor;
+  typedef typename CGAL::internal::Cone_expansion_event<Traits> Cone_expansion_event;
+
+private:
+  // These could be pulled back into a 'context' class to save space
+  Traits& m_traits;
+  Triangle_mesh& m_graph;
+
+  halfedge_descriptor m_entryEdge;
+
+  Point_2 m_sourceImage;
+  Triangle_2 m_layoutFace;
+  FT m_pseudoSourceDistance;
+
+  Point_2 m_windowLeft;
+  Point_2 m_windowRight;
+
+  size_t m_level;
+  size_t m_treeId;
+
+  Node_type m_nodeType;
+
+  Cone_tree_node* m_leftChild;
+  Cone_tree_node* m_rightChild;
+
+  std::vector<Cone_tree_node*> m_middleChildren;
+  Cone_tree_node* m_parent;
+
+private:
+  void on_child_link(Cone_tree_node* child)
+  {
+    child->m_parent = this;
+    child->m_level = m_level + 1;
+    child->m_treeId = m_treeId;
+  }
+
+public:
+  Cone_tree_node(Traits& traits, Triangle_mesh& g, size_t treeId)
+    : m_traits(traits)
+    , m_graph(g)
+    , m_sourceImage(Point_2(CGAL::ORIGIN))
+    , m_layoutFace(Point_2(CGAL::ORIGIN),Point_2(CGAL::ORIGIN),Point_2(CGAL::ORIGIN))
+    , m_pseudoSourceDistance(0.0)
+    , m_level(0)
+    , m_treeId(treeId)
+    , m_nodeType(ROOT)
+    , m_leftChild(NULL)
+    , m_rightChild(NULL)
+    , m_pendingLeftSubtree(NULL)
+    , m_pendingRightSubtree(NULL)
+    , m_pendingMiddleSubtree(NULL)
+  {
+  }
+
+  Cone_tree_node(Traits& traits, Triangle_mesh& g, size_t treeId, halfedge_descriptor entryEdge)
+    : m_traits(traits)
+    , m_graph(g)
+    , m_entryEdge(entryEdge)
+    , m_sourceImage(Point_2(CGAL::ORIGIN))
+    , m_layoutFace(Point_2(CGAL::ORIGIN),Point_2(CGAL::ORIGIN),Point_2(CGAL::ORIGIN))
+    , m_pseudoSourceDistance(0.0)
+    , m_level(0)
+    , m_treeId(treeId)
+    , m_nodeType(ROOT)
+    , m_leftChild(NULL)
+    , m_rightChild(NULL)
+    , m_pendingLeftSubtree(NULL)
+    , m_pendingRightSubtree(NULL)
+    , m_pendingMiddleSubtree(NULL)
+  {
+  }
+
+  Cone_tree_node(Traits& traits, Triangle_mesh& g, halfedge_descriptor entryEdge, const Triangle_2& layoutFace, const Point_2& sourceImage, const FT& pseudoSourceDistance, const Point_2& windowLeft, const Point_2& windowRight, Node_type nodeType = INTERVAL)
+    : m_traits(traits)
+    , m_graph(g)
+    , m_entryEdge(entryEdge)
+    , m_sourceImage(sourceImage)
+    , m_layoutFace(layoutFace)
+    , m_pseudoSourceDistance(pseudoSourceDistance)
+    , m_windowLeft(windowLeft)
+    , m_windowRight(windowRight)
+    , m_nodeType(nodeType)
+    , m_leftChild(NULL)
+    , m_rightChild(NULL)
+    , m_pendingLeftSubtree(NULL)
+    , m_pendingRightSubtree(NULL)
+    , m_pendingMiddleSubtree(NULL)
+  {
+  }
+
+  size_t tree_id() const
+  {
+    return m_treeId;
+  }
+
+  size_t level() const
+  {
+    return m_level;
+  }
+
+  bool is_source_node() const
+  {
+    return m_nodeType == FACE_SOURCE || m_nodeType == EDGE_SOURCE || m_nodeType == VERTEX_SOURCE;
+  }
+
+  bool is_vertex_node() const
+  {
+    return m_nodeType == VERTEX_SOURCE;
+  }
+
+  bool is_root_node() const
+  {
+    return m_nodeType == ROOT;
+  }
+
+  Triangle_2 layout_face() const
+  {
+    return m_layoutFace;
+  }
+
+  face_descriptor current_face() const
+  {
+    return face(m_entryEdge, m_graph);
+  }
+
+  bool is_null_face() const
+  {
+    return current_face() == Graph_traits::null_face();
+  }
+
+  size_t edge_face_index() const
+  {
+    return CGAL::internal::edge_index(entry_edge(), m_graph);
+  }
+
+  halfedge_descriptor entry_edge() const
+  {
+    return m_entryEdge;
+  }
+
+  halfedge_descriptor left_child_edge() const
+  {
+    return opposite(prev(m_entryEdge, m_graph), m_graph);
+  }
+
+  halfedge_descriptor right_child_edge() const
+  {
+    return opposite(next(m_entryEdge, m_graph), m_graph);
+  }
+
+  vertex_descriptor target_vertex() const
+  {
+    return target(next(m_entryEdge, m_graph), m_graph);
+  }
+
+  Point_2 source_image() const
+  {
+    return m_sourceImage;
+  }
+
+  Node_type node_type() const
+  {
+    return m_nodeType;
+  }
+
+  FT distance_to_root(const Point_2& point) const
+  {
+    typename Traits::Compute_squared_distance_2 csd2(m_traits.compute_squared_distance_2_object());
+    return CGAL::internal::select_sqrt(csd2(point, m_sourceImage)) + m_pseudoSourceDistance;
+  }
+
+  FT distance_from_source_to_root() const
+  {
+    return m_pseudoSourceDistance;
+  }
+
+  FT distance_from_target_to_root() const
+  {
+    return distance_to_root(target_point());
+  }
+
+  Ray_2 left_boundary() const
+  {
+    return Ray_2(source_image(), m_windowLeft);
+  }
+
+  Ray_2 right_boundary() const
+  {
+    return Ray_2(source_image(), m_windowRight);
+  }
+
+  Point_2 window_left() const
+  {
+    return m_windowLeft;
+  }
+
+  Point_2 window_right() const
+  {
+    return m_windowRight;
+  }
+
+  Ray_2 ray_to_target_vertex() const
+  {
+    return Ray_2(source_image(), target_point());
+  }
+
+  bool inside_window(const Point_2& point) const
+  {
+    typename Traits::Orientation_2 orientation_2(m_traits.orientation_2_object());
+    Point_2 sourceImagePoint(source_image());
+    CGAL::Orientation leftOrientation = orientation_2(sourceImagePoint, m_windowLeft, point);
+    CGAL::Orientation rightOrientation = orientation_2(sourceImagePoint, m_windowRight, point);
+    return (leftOrientation == CGAL::RIGHT_TURN || leftOrientation == CGAL::COLLINEAR) && (rightOrientation == CGAL::LEFT_TURN || rightOrientation == CGAL::COLLINEAR);
+  }
+
+  Point_2 target_point() const
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    return cv2(m_layoutFace, 2);
+  }
+
+  bool is_target_vertex_inside_window() const
+  {
+    return inside_window(target_point());
+  }
+
+  bool has_left_side() const
+  {
+    typename Traits::Orientation_2 orientation_2(m_traits.orientation_2_object());
+
+    if (is_source_node())
+    {
+      return true;
+    }
+
+    CGAL::Orientation orientation = orientation_2(source_image(), m_windowLeft, target_point());
+
+    return (orientation == CGAL::RIGHT_TURN || orientation == CGAL::COLLINEAR);
+  }
+
+  bool has_right_side() const
+  {
+    typename Traits::Orientation_2 orientation_2(m_traits.orientation_2_object());
+
+    CGAL::Orientation orientation = orientation_2(source_image(), m_windowRight, target_point());
+
+    return (orientation == CGAL::LEFT_TURN || orientation == CGAL::COLLINEAR);
+  }
+
+  Segment_2 left_child_base_segment() const
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    // reversed to maintain consistent triangle winding on the child
+    return Segment_2(cv2(m_layoutFace, 0), cv2(m_layoutFace, 2));
+  }
+
+  Segment_2 right_child_base_segment() const
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    // reversed to maintain consistent triangle winding on the child
+    return Segment_2(cv2(m_layoutFace, 2), cv2(m_layoutFace, 1));
+  }
+
+  Segment_2 entry_segment() const
+  {
+    typename Traits::Construct_vertex_2 cv2(m_traits.construct_vertex_2_object());
+    return Segment_2(cv2(m_layoutFace, 0), cv2(m_layoutFace, 1));
+  }
+
+  bool has_middle_children() const
+  {
+    return m_middleChildren.size() > 0;
+  }
+
+  size_t num_middle_children() const
+  {
+    return m_middleChildren.size();
+  }
+
+  Cone_tree_node* get_middle_child(size_t i) const
+  {
+    return m_middleChildren.at(i);
+  }
+
+  void push_middle_child(Cone_tree_node* child)
+  {
+    if (m_pendingMiddleSubtree != NULL)
+    {
+      m_pendingMiddleSubtree->m_cancelled = true;
+      m_pendingMiddleSubtree = NULL;
+    }
+
+    m_middleChildren.push_back(child);
+    on_child_link(child);
+  }
+
+  Cone_tree_node* pop_middle_child()
+  {
+    Cone_tree_node* temp = m_middleChildren.back();
+    m_middleChildren.pop_back();
+    return temp;
+  }
+
+  void set_left_child(Cone_tree_node* child)
+  {
+    if (m_pendingLeftSubtree != NULL)
+    {
+      m_pendingLeftSubtree->m_cancelled = true;
+      m_pendingLeftSubtree = NULL;
+    }
+
+    m_leftChild = child;
+    on_child_link(child);
+  }
+
+  Cone_tree_node* get_left_child() const
+  {
+    return m_leftChild;
+  }
+
+  Cone_tree_node* remove_left_child()
+  {
+    Cone_tree_node* temp = m_leftChild;
+    m_leftChild = NULL;
+    return temp;
+  }
+
+  void set_right_child(Cone_tree_node* child)
+  {
+    if (m_pendingRightSubtree != NULL)
+    {
+      m_pendingRightSubtree->m_cancelled = true;
+      m_pendingRightSubtree = NULL;
+    }
+
+    m_rightChild = child;
+    on_child_link(child);
+  }
+
+  Cone_tree_node* get_right_child() const
+  {
+    return m_rightChild;
+  }
+
+  Cone_tree_node* remove_right_child()
+  {
+    Cone_tree_node* temp = m_rightChild;
+    m_rightChild = NULL;
+    return temp;
+  }
+
+  Cone_tree_node* parent() const
+  {
+    return m_parent;
+  }
+
+  bool is_left_child() const
+  {
+    return m_parent != NULL && m_parent->m_leftChild == this;
+  }
+
+  bool is_right_child() const
+  {
+    return m_parent != NULL && m_parent->m_rightChild == this;
+  }
+
+public:
+  Cone_expansion_event* m_pendingLeftSubtree;
+  Cone_expansion_event* m_pendingRightSubtree;
+  Cone_expansion_event* m_pendingMiddleSubtree;
+
+};
+
+} // namespace internal
+
+} // namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_CONE_TREE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h
new file mode 100644
index 0000000..dce0129
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h
@@ -0,0 +1,97 @@
+// Copyright (c) 2014 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Stephen Kiazyk
+
+#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_MISC_H
+#define CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_MISC_H
+
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+#include <CGAL/boost/graph/iterator.h>
+
+namespace CGAL {
+
+namespace internal {
+
+template <class Triangle_3, class Triangle_mesh, class VertexPointMap>
+Triangle_3 triangle_from_halfedge(typename boost::graph_traits<Triangle_mesh>::halfedge_descriptor edge, const Triangle_mesh& g, VertexPointMap vertexPointMap)
+{
+  typedef typename boost::graph_traits<Triangle_mesh>::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor e0 = edge;
+  halfedge_descriptor e1 = next(edge, g);
+
+  return Triangle_3(get(vertexPointMap, source(e0, g)), get(vertexPointMap, target(e0, g)), get(vertexPointMap, target(e1, g)));
+}
+
+template <class Triangle_3, class Triangle_mesh>
+Triangle_3 triangle_from_halfedge(typename boost::graph_traits<Triangle_mesh>::halfedge_descriptor edge, const Triangle_mesh& g)
+{
+  return triangle_from_halfedge<Triangle_3, Triangle_mesh, typename boost::property_map<Triangle_mesh, boost::vertex_point_t>::type>(edge, g, get(boost::vertex_point, g));
+}
+
+
+template <class Triangle_mesh>
+size_t edge_index(typename boost::graph_traits<Triangle_mesh>::halfedge_descriptor he, Triangle_mesh& p)
+{
+  typedef typename boost::graph_traits<Triangle_mesh> Graph_traits;
+  typedef typename Graph_traits::face_descriptor face_descriptor;
+  typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor;
+
+  face_descriptor f = face(he, p);
+
+  halfedge_descriptor start = halfedge(f, p);
+  halfedge_descriptor current = start;
+
+  size_t count = 0;
+
+  while (current != he)
+  {
+    current = next(current, p);
+    ++count;
+  }
+
+  return count;
+}
+
+template <class FT>
+FT internal_sqrt(const FT& x, CGAL::Tag_true)
+{
+  return CGAL::sqrt(x);
+}
+
+template <class FT>
+FT internal_sqrt(const FT& x, CGAL::Tag_false)
+{
+  return FT(std::sqrt(CGAL::to_double(x)));
+}
+
+template <class FT>
+FT select_sqrt(const FT& x)
+{
+  typedef ::CGAL::Algebraic_structure_traits<FT> AST;
+  static const bool has_sqrt = ! ::boost::is_same< ::CGAL::Null_functor, typename AST::Sqrt >::value;
+  return internal_sqrt(x, ::CGAL::Boolean_tag<has_sqrt>());
+}
+
+} // namespace internal
+
+} // namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_MISC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Common.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Common.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Common.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Common.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_params.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_params.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_params.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_params.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/edge_collapse.h
new file mode 100644
index 0000000..4ee50c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_simplification/edge_collapse.h
@@ -0,0 +1,169 @@
+// Copyright (c) 2006  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando.cacciola at geometryfactory.com>
+//
+#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H
+#define CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H 1
+
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h>
+#include <CGAL/Surface_mesh_simplification/Detail/Common.h>
+#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h>
+
+namespace CGAL {
+
+namespace Surface_mesh_simplification
+{
+
+template<class ECM
+        ,class ShouldStop
+        ,class VertexIndexMap
+        ,class VertexPointMap
+        ,class EdgeIndexMap
+        ,class EdgeIsConstrainedMap
+        ,class GetCost
+        ,class GetPlacement
+        ,class Visitor
+        >
+int edge_collapse ( ECM&                       aSurface
+                  , ShouldStop           const& aShould_stop
+                  // optional mesh information policies 
+                  , VertexIndexMap       const& aVertex_index_map     // defaults to get(vertex_index,aSurface)
+                  , VertexPointMap       const& aVertex_point_map     // defaults to get(vertex_point,aSurface)
+                  , EdgeIndexMap         const& aEdge_index_map       // defaults to get(edge_index,aSurface)
+                  , EdgeIsConstrainedMap const& aEdge_is_constrained_map   // defaults to No_constrained_edge_map<ECM>()
+                  
+                  // optional strategy policies - defaults to LindstomTurk
+                  , GetCost              const& aGet_cost
+                  , GetPlacement         const& aGet_placement
+                  
+                  , Visitor                     aVisitor
+                  ) 
+{
+  typedef EdgeCollapse< ECM
+                      , ShouldStop
+                      , VertexIndexMap
+                      , VertexPointMap
+                      , EdgeIndexMap
+                      , EdgeIsConstrainedMap
+                      , GetCost
+                      , GetPlacement
+                      , Visitor
+                      >
+                      Algorithm;
+                      
+  Algorithm algorithm( aSurface
+                     , aShould_stop
+                     , aVertex_index_map
+                     , aVertex_point_map
+                     , aEdge_index_map
+                     , aEdge_is_constrained_map
+                     , aGet_cost
+                     , aGet_placement
+                     , aVisitor
+                     ) ;
+                     
+  return algorithm.run();
+}                          
+
+
+struct Dummy_visitor
+{
+  template<class ECM>                                 void OnStarted( ECM& ) const {} 
+  template<class ECM>                                 void OnFinished ( ECM& ) const {} 
+  template<class Profile>                             void OnStopConditionReached( Profile const& ) const {} 
+  template<class Profile, class OFT>                  void OnCollected( Profile const&, OFT const& ) const {}                
+  template<class Profile, class OFT, class Size_type> void OnSelected( Profile const&, OFT const&, Size_type, Size_type ) const {}                
+  template<class Profile, class OPoint>               void OnCollapsing(Profile const&, OPoint const& ) const {}                
+  template<class Profile, class VH>                   void OnCollapsed( Profile const&, VH ) const {}
+  template<class Profile>                             void OnNonCollapsable(Profile const& ) const {}                
+} ;
+
+template<class ECM, class ShouldStop, class P, class T, class R>
+int edge_collapse ( ECM& aSurface
+                  , ShouldStop const& aShould_stop
+                  , cgal_bgl_named_params<P,T,R> const& aParams 
+                  ) 
+{
+  using boost::choose_param ;
+  using boost::choose_const_pmap ;
+  using boost::get_param ;
+  
+  LindstromTurk_params lPolicyParams ;
+  
+  boost::graph_visitor_t vis = boost::graph_visitor_t() ;
+
+  return edge_collapse(aSurface
+                      ,aShould_stop
+                      ,choose_const_pmap(get_param(aParams,boost::vertex_index),aSurface,boost::vertex_index)
+                      ,choose_pmap(get_param(aParams,boost::vertex_point),aSurface,boost::vertex_point)
+                      ,choose_const_pmap(get_param(aParams,boost::halfedge_index),aSurface,boost::halfedge_index)
+                       ,choose_param     (get_param(aParams,edge_is_constrained),No_constrained_edge_map<ECM>())
+                       ,choose_param     (get_param(aParams,get_cost_policy), LindstromTurk_cost<ECM>())
+                       ,choose_param     (get_param(aParams,get_placement_policy), LindstromTurk_placement<ECM>())
+                      ,choose_param     (get_param(aParams,vis), Dummy_visitor())
+                      );
+
+}
+  template<class ECM, class ShouldStop, class GT, class P, class T, class R>
+int edge_collapse ( ECM& aSurface
+                  , ShouldStop const& aShould_stop
+                  , cgal_bgl_named_params<P,T,R> const& aParams 
+                  ) 
+{
+  using boost::choose_param ;
+  using boost::choose_const_pmap ;
+  using boost::get_param ;
+  
+  LindstromTurk_params lPolicyParams ;
+  
+  boost::graph_visitor_t vis = boost::graph_visitor_t() ;
+    
+  return edge_collapse(aSurface
+                      ,aShould_stop
+                      ,choose_const_pmap(get_param(aParams,boost::vertex_index),aSurface,boost::vertex_index)
+                      ,choose_const_pmap(get_param(aParams,boost::vertex_point),aSurface,boost::vertex_point)
+                      ,choose_const_pmap(get_param(aParams,boost::halfedge_index),aSurface,boost::halfedge_index)
+                      ,choose_param     (get_param(aParams,edge_is_constrained),No_constrained_edge_map<ECM>())
+                      ,choose_param     (get_param(aParams,get_cost_policy), LindstromTurk_cost<ECM>())
+                      ,choose_param     (get_param(aParams,get_placement_policy), LindstromTurk_placement<ECM>())
+                      ,choose_param     (get_param(aParams,vis), Dummy_visitor())
+                      );
+
+}
+
+template<class ECM, class ShouldStop>
+int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop ) 
+{
+  return edge_collapse(aSurface,aShould_stop, halfedge_index_map(get(boost::halfedge_index,aSurface))); // AF why the halfedge_index_map?
+}
+
+  template<class ECM, class ShouldStop, class GT>
+  int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop) 
+{
+  return edge_collapse(aSurface,aShould_stop, CGAL::parameters::halfedge_index_map(get(boost::halfedge_index,aSurface)));
+}
+
+} // namespace Surface_mesh_simplification
+
+} //namespace CGAL
+
+#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_EDGE_COLLAPSE_H //
+// EOF //
+ 
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_traits_generator_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_traits_generator_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_traits_generator_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_traits_generator_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_triangulation_generator_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_triangulation_generator_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_triangulation_generator_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_triangulation_generator_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesh_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesh_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Combining_oracle.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Combining_oracle.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Combining_oracle.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Combining_oracle.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Has_edges.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Has_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Has_edges.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Has_edges.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Intersection_data_structure_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Intersection_data_structure_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Intersection_data_structure_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Intersection_data_structure_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Null_oracle_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Null_oracle_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Null_oracle_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Null_oracle_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Polyhedral_oracle.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Polyhedral_oracle.h
new file mode 100644
index 0000000..9049002
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Polyhedral_oracle.h
@@ -0,0 +1,406 @@
+// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Steve OUDOT, Laurent Rineau
+
+#ifndef CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
+#define CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
+
+#include <utility>
+
+#include <CGAL/config.h> // CGAL_DEPRECATED
+#include <CGAL/iterator.h>
+#include <CGAL/Surface_mesher/Null_oracle_visitor.h>
+#include <CGAL/Surface_mesher/Has_edges.h>
+
+namespace CGAL {
+  namespace Surface_mesher {
+
+template <
+  class Surface,
+  class Point_creator = Creator_uniform_3<typename Surface::Geom_traits::FT,
+    typename Surface::Geom_traits::Point_3>,
+  class Visitor = Null_oracle_visitor,
+  typename Has_edges_tag_ = typename Surface::Has_edges_tag,
+  bool mesh_the_whole_bounding_box = false
+  >
+class Polyhedral_oracle : Has_edges_tag_
+{
+public:
+  typedef typename Surface::Geom_traits GT;
+  typedef GT Geom_traits;
+  typedef typename GT::FT FT;
+
+  typedef typename Geom_traits::Point_3 Point;
+  typedef typename Surface::Subfacets_tree Subfacets_tree;
+  typedef typename Surface::Subsegments_tree Subsegments_tree;
+  typedef typename Subsegments_tree::Point_with_index Point_with_index;
+  typedef typename Geom_traits::Segment_3 Segment_3;
+  typedef typename Geom_traits::Ray_3 Ray_3;
+  typedef typename Geom_traits::Line_3 Line_3;
+  typedef typename Geom_traits::Triangle_3 Triangle_3;
+
+  typedef Polyhedral_oracle<Surface, 
+                            Point_creator, 
+                            Visitor,
+                            Has_edges_tag_,
+                            mesh_the_whole_bounding_box> Self;
+
+  typedef Surface Surface_3;
+
+  typedef Point Intersection_point;
+
+  // Private members
+
+private:
+  Visitor visitor;
+
+public:
+
+  // Public members
+
+  // Surface constructor
+  Polyhedral_oracle(Visitor visitor_ = Visitor() )
+    : visitor(visitor_)
+  {
+//       is.seekg(0,std::ios::beg);
+//       tr.clear();
+//       // The data structure for testing intersections is set
+//       std::cerr << "Creating data structure for intersections detection... ";
+//       data_struct.input(is, CGAL::Insert_iterator<Tr>(tr));
+//       std::cerr << "done\n\n";
+  }
+
+//   Finite_vertices_iterator finite_vertices_begin()
+//   {
+//     return tr.finite_vertices_begin();
+//   }
+
+
+//   Finite_vertices_iterator finite_vertices_end()
+//   {
+//     return tr.finite_vertices_end();
+//   }
+
+  class Intersect_3;
+
+  friend class Intersect_3;
+
+  class Intersect_3 {
+    const Self& self;
+  public:
+    Intersect_3(const Self& self) : self(self)
+    {
+    }
+
+    Object operator()(const Surface_3& surface, const Segment_3& s) const
+    {
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
+      double pa[3], pb[3];
+      pa[0] = s[0].x();
+      pa[1] = s[0].y();
+      pa[2] = s[0].z();
+      pb[0] = s[1].x();
+      pb[1] = s[1].y();
+      pb[2] = s[1].z();
+      if(surface.pinpolyhedron_ptr->isPinPolyhedron(pa) == 
+	 surface.pinpolyhedron_ptr->isPinPolyhedron(pb))
+	return Object();
+#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
+      return self.intersect_segment_surface(*surface.subfacets_tree_ptr, s);
+#endif
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_INTERSECTION_DATA_STRUCTURE
+      return surface.subfacets_tree_ptr->intersection(s);
+#endif
+    }
+    
+    Object operator()(const Surface_3& surface, const Ray_3& r) const {
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
+      return self.intersect_ray_surface(*surface.subfacets_tree_ptr, r);
+#endif
+      return Object();
+    }
+      
+    Object operator()(const Surface_3& surface, const Line_3& l) const {
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
+      return self.intersect_line_surface(*surface.subfacets_tree_ptr, l);
+#endif
+      return Object();
+    }
+  };
+
+  Intersect_3 intersect_3_object() const
+  {
+    return Intersect_3(*this);
+  }
+
+  class Construct_initial_points;
+
+  friend class Construct_initial_points;
+
+  class Construct_initial_points
+  {
+    const Self& self;
+  public:
+    Construct_initial_points(const Self& self) : self(self)
+    {
+    }
+
+    template <typename OutputIteratorPoints>
+    OutputIteratorPoints operator() (const Surface_3& surface, 
+                                     OutputIteratorPoints out, 
+                                     int n = 20) const // WARNING: why 20?    
+    {
+      for (typename Surface_3::Corner_vertices::const_iterator vit =
+             surface.corner_vertices_ptr->begin();
+           vit != surface.corner_vertices_ptr->end();
+           ++vit)
+      {
+        Point p = (*vit)->point();
+        CGAL_assertion((*vit)->tag() >= 0);
+        p.set_on_vertex((*vit)->tag());
+        self.visitor.new_point(p);
+        *out++= p;
+      }
+      for (typename Surface_3::Edges_vertices::const_iterator vit =
+             surface.edges_vertices_ptr->begin();
+           vit != surface.edges_vertices_ptr->end() && n > 0;
+           ++vit, --n)
+      {
+        Point p = (*vit)->point();
+        CGAL_assertion((*vit)->tag() >= 0);
+        p.set_on_curve((*vit)->tag());
+        self.visitor.new_point(p);
+        *out++= p;
+      }
+      for (typename Surface_3::Input_vertices::const_iterator vit =
+             surface.input_vertices_ptr->begin();
+           vit != surface.input_vertices_ptr->end() && n > 0;
+           ++vit, --n)
+      {
+        Point p = (*vit)->point();
+        CGAL_assertion((*vit)->tag() >= 0);
+        p.set_on_surface((*vit)->tag());
+        self.visitor.new_point(p);
+        *out++= p;
+      }
+      return out;
+    }
+  };
+
+  Construct_initial_points construct_initial_points_object() const
+  {
+    return Construct_initial_points(*this);
+  }
+
+  template <class P>
+  bool is_in_volume(const Surface_3& surface, const P& p)
+  {
+    if(mesh_the_whole_bounding_box)
+      return CGAL::do_overlap(surface.bbox(),p.bbox());
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
+    double point[3];
+    point[0] = p.x();
+    point[1] = p.y();
+    point[2] = p.z();
+    return surface.pinpolyhedron_ptr->isPinPolyhedron(point);
+#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_PINPOLYHEDRON
+    typename CGAL::Random_points_on_sphere_3<Point,
+      Point_creator> random_point(FT(1));
+    typename Geom_traits::Construct_vector_3 vector =
+      Geom_traits().construct_vector_3_object();
+    typename Geom_traits::Construct_segment_3 segment =
+      Geom_traits().construct_segment_3_object();
+    typename Geom_traits::Construct_translated_point_3 translate =
+      Geom_traits().construct_translated_point_3_object();
+    typename Geom_traits::Bounded_side_3 bounded_side =
+      Geom_traits().bounded_side_3_object();
+    typename Geom_traits::Construct_scaled_vector_3 scale = 
+      Geom_traits().construct_scaled_vector_3_object();
+
+    const typename GT::Iso_cuboid_3& cuboid = surface.subfacets_tree_ptr->iso_cuboid();
+
+    if( bounded_side(cuboid,
+		     p) == ON_UNBOUNDED_SIDE )
+      return false;
+
+#ifdef CGAL_SURFACE_MESHER_DEBUG_INTERSECTION_DATA_STRUCTURE
+    std::cerr << "(in volume) ";
+#endif
+    std::pair<bool, int> result = std::make_pair(false, 0);
+
+    // upper bound of the diameter of the bounding box
+    const FT& diameter = 2*FT(surface.subfacets_tree_ptr->max_length());
+    while(! result.first)
+    {
+      result = surface.subfacets_tree_ptr->
+        number_of_intersections(segment(p, 
+					translate(p, 
+						  scale(vector(ORIGIN,
+							       *random_point++),
+							diameter))));
+    }
+    return (result.second % 2) == 1;
+  }
+
+  Object intersect_curves_with_triangle(const Surface_3& surface,
+					const Triangle_3& t) const
+  {
+    if(! surface.has_edges())
+      return Object();
+
+    const Object o = surface.subsegments_tree_ptr->intersection(t);
+    if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
+    {
+      Point p = *pi;
+      CGAL_assertion(pi->surface_index()>=0);
+      p.set_on_curve(pi->surface_index());
+      visitor.new_point(p);
+      return make_object(p);
+    }
+    else
+      return Object();
+  }
+//   // Basic intersection function for segments/rays/lines with the polyhedron
+//   template <class Elt>
+//   CGAL::Object intersect_with_surface (Octree data_struct, Elt e) {
+//     typedef CGAL::Data_structure_using_tree_3<Geom_traits> Octree;
+//     for ( typename Octree::Constraint_map_iterator cit = data_struct.c_m.begin();
+// 	  cit != data_struct.c_m.end(); ++cit ) {
+//       if (cit->second->does_intersect (e))
+// 	return cit->second->intersection (e);
+//     }
+
+//     return CGAL::Object();
+//   }
+
+#ifdef CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
+  CGAL::Object intersect_segment_surface(const Subfacets_tree& data_struct,
+                                         const Segment_3& s) const
+    {
+      typename Geom_traits::Is_degenerate_3  is_degenerate;
+      // debug: test if segment is degenerate
+      // (can happen, because of rounding in circumcenter computations)
+      if (is_degenerate(s)) {
+	std::cerr << "Warning: degenerate segment (" << s << ")\n";
+	return CGAL::Object();
+      }
+
+      // debug: for detecting whether Marie's code works
+      // (we compare with our basic intersection function)
+//       CGAL::Object oun, odeux;
+//       Point p;
+//       oun = data_struct.intersection(s.vertex(0), s.vertex(1));
+//       odeux = intersect_with_surface (s);
+//       odeux = oun;
+
+
+//       if ((assign(p, oun) && !assign(p,odeux)) ||
+// 	  !assign(p, oun) && assign(p,odeux))
+// 	std::cout << "s " << s
+// 		  << " " << (assign(p, odeux))
+// 		  << std::endl;
+
+      const Object o = data_struct.intersection(s.vertex(0), s.vertex(1));
+      if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
+      {
+        Point p = *pi;
+        CGAL_assertion(pi->surface_index()>=0);
+        p.set_on_surface(pi->surface_index());
+        visitor.new_point(p);
+        return make_object(p);
+      }
+      else
+        return Object();
+
+/*       return  intersect_with_surface (s);  // basic intersection function */
+/*       return data_struct.intersection (s.vertex(0), s.vertex(1));  // Marie */
+    }
+
+  CGAL::Object intersect_ray_surface(const Subfacets_tree& data_struct,
+                                     const Ray_3 &r) const
+    {
+      typename Geom_traits::Is_degenerate_3  is_degenerate;
+      // debug: test if segment is degenerate
+      // (can happen, because of rounding in circumcenter computations)
+      if (is_degenerate(r)) {
+	std::cerr << "Warning: degenerate ray (" << r << ")\n";
+	return CGAL::Object();
+      }
+      // debug: for detecting whether Marie's code works
+      // (we compare with our basic intersection function)
+//       CGAL::Object oun, odeux;
+//       Point p;
+//       oun = data_struct.intersection (r);
+//       //      odeux = intersect_with_surface (r);
+//       odeux = oun;
+
+//       if ((assign(p, oun) && !assign(p,odeux)) ||
+// 	  !assign(p, oun) && assign(p,odeux))
+// 	std::cout << "r " << r
+// 		  << " " << (assign(p, odeux))
+// 		  << std::endl;
+
+//       return odeux;
+
+      const Object o = data_struct.intersection (r);
+      if(const Point_with_index* pi = object_cast<Point_with_index>(&o))
+      {
+        Point p = *pi;
+        CGAL_assertion(pi->surface_index()>=0);
+        p.set_on_surface(pi->surface_index());
+        visitor.new_point(p);
+        return make_object(p);
+      }
+      else
+        return Object();
+
+
+//       return intersect_with_surface (r);  // basic intersection function
+//       return data_struct.intersection (r);   // Marie's code
+    }
+
+
+  CGAL::Object intersect_line_surface(const Subfacets_tree&,
+                                      const Line_3 &) const
+    {
+      CGAL_error();
+      return CGAL::Object();
+    }
+#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_SURFACE_USE_OCTREE
+private:
+
+
+}; // end class Polyhedral_oracle
+
+template <class GT,
+          class Visitor = Null_oracle_visitor
+         >
+class CGAL_DEPRECATED Polyhedral : public Polyhedral_oracle<GT, Visitor>
+{
+  Polyhedral(Visitor visitor = Visitor())
+    : Polyhedral_oracle<GT, Visitor>(visitor)
+  {
+  }
+};
+
+  } // end namespace Surface_mesher
+} // end namespace CGAL
+
+#endif // CGAL_SURFACE_MESHER_POLYHEDRAL_ORACLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Profile_counter.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Profile_counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Profile_counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Profile_counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Profile_timer.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Profile_timer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Profile_timer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Profile_timer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Sphere_oracle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Sphere_oracle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Sphere_oracle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Sphere_oracle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Standard_criteria.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Standard_criteria.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Standard_criteria.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Standard_criteria.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_manifold.h
new file mode 100644
index 0000000..1d7b8b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_manifold.h
@@ -0,0 +1,241 @@
+// Copyright (c) 2003-2007  INRIA Sophia-Antipolis (France).
+// Copyright (c) 2008       GeometryFactory, Sophia Antipolis (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Steve Oudot, David Rey, Mariette Yvinec, Laurent Rineau, Andreas Fabri
+
+#ifndef CGAL_SURFACE_MESHER_MANIFOLD_H
+#define CGAL_SURFACE_MESHER_MANIFOLD_H
+
+#include <CGAL/Surface_mesher/Surface_mesher_regular_edges.h>
+
+namespace CGAL {
+
+  namespace Surface_mesher {
+
+  template <
+    class C2T3,
+    class Surface,
+    class SurfaceMeshTraits,
+    class Criteria,
+    typename SMMBB // ("SMM_base_base")
+  >
+  class Surface_mesher_manifold_base
+    : public SMMBB
+  {
+    public:
+      typedef C2T3 C2t3;
+      typedef typename C2T3::Triangulation Tr;
+      typedef typename Tr::Geom_traits GT;
+      typedef typename Tr::Point Point;
+      typedef typename Tr::Facet Facet;
+      typedef typename Tr::Vertex_handle Vertex_handle;
+      typedef typename Triangulation_mesher_level_traits_3<Tr>::Zone Zone;
+
+  private:
+    // because of the caching, these two members have to be mutable,
+    // because they are actually updated in the const method
+    // 'no_longer_element_to_refine_impl()'
+    typedef std::set<Vertex_handle> Bad_vertices;
+    mutable Bad_vertices bad_vertices;
+    mutable bool bad_vertices_initialized;
+
+  private:
+      typedef typename Tr::Cell_handle Cell_handle;
+      typedef std::list<Facet> Facets;
+      typedef std::list<Vertex_handle> Vertices;
+      typedef typename Facets::iterator Facets_iterator;
+      typedef typename Vertices::iterator Vertices_iterator;
+      typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
+
+      Facet canonical_facet(const Facet& f) const {
+	const Cell_handle& c = f.first;
+	const Cell_handle& c2 = c->neighbor(f.second);
+	return (c2 < c) ? std::make_pair(c2,c2->index(c)) : f;
+      }
+
+      // Action to perform on a facet on the boundary of the conflict zone
+      void 
+      before_insertion_handle_facet_on_boundary_of_conflict_zone(const Facet& f)
+      {
+	const Cell_handle& c = f.first;
+	const int i = f.second;
+
+       	// for each v of f
+	for (int j = 0; j < 4; j++)
+	  if (i != j)
+            bad_vertices.erase(c->vertex(j));
+      }
+
+      Facet 
+      biggest_incident_facet_in_complex(const Vertex_handle sommet) const
+      {
+
+	std::list<Facet> facets;
+	SMMBB::c2t3.incident_facets(sommet, std::back_inserter(facets));
+
+	typename std::list<Facet>::iterator it = facets.begin();
+	Facet biggest_facet = *it;
+	CGAL_assertion(it!=facets.end());
+
+	for (++it;
+	     it != facets.end();
+	     ++it) {
+	  Facet current_facet = *it;
+	  // is the current facet bigger than the current biggest one
+	  if ( SMMBB::compute_distance_to_facet_center(current_facet, sommet) >
+	       SMMBB::compute_distance_to_facet_center(biggest_facet, sommet) )
+	  {
+	    biggest_facet = current_facet;
+	  }
+	}
+	return biggest_facet;
+      }
+
+      void initialize_bad_vertices() const
+      {
+#ifdef CGAL_SURFACE_MESHER_VERBOSE
+	std::cerr << "scanning vertices" << std::endl;
+#endif
+	int n = 0;
+	for (Finite_vertices_iterator vit = SMMBB::tr.finite_vertices_begin();
+	     vit != SMMBB::tr.finite_vertices_end();
+	     ++vit) {
+	  if ( (SMMBB::c2t3.face_status(vit)  // @TODO: appeler is_regular
+		== C2t3::SINGULAR) ) {
+	    bad_vertices.insert( vit );
+	    ++n;
+	  }
+	}
+	bad_vertices_initialized = true;
+#ifdef CGAL_SURFACE_MESHER_VERBOSE
+	std::cerr << "   -> found " << n << " bad vertices\n";
+#endif
+      }
+
+    public:
+      Surface_mesher_manifold_base (C2T3& c2t3,
+                                    const Surface& surface,
+                                    const SurfaceMeshTraits& mesh_traits,
+                                    const Criteria& criteria)
+	: SMMBB(c2t3, surface, mesh_traits, criteria),
+          bad_vertices_initialized(false)
+      {
+#ifdef CGAL_SURFACE_MESHER_DEBUG_CONSTRUCTORS
+        std::cerr << "CONS: Surface_mesher_manifold_base\n";
+#endif
+      }
+
+    public:
+
+      // Tells whether there remain elements to refine
+      bool no_longer_element_to_refine_impl() const {
+	if(SMMBB::no_longer_element_to_refine_impl()){
+	  if(! bad_vertices_initialized){
+	    initialize_bad_vertices();
+	  }
+	  return bad_vertices.empty();
+	}
+	return false;
+      }
+
+      // Lazy initialization function
+      void scan_triangulation_impl() {
+	SMMBB::scan_triangulation_impl();
+#ifdef CGAL_SURFACE_MESHER_VERBOSE
+	std::cerr << "scanning vertices (lazy)" << std::endl;
+#endif
+      }
+
+      // Returns the next element to refine
+      Facet get_next_element_impl() {
+	if ( !SMMBB::no_longer_element_to_refine_impl() ) {
+	  return SMMBB::get_next_element_impl();
+	}
+	else {
+	  CGAL_assertion(bad_vertices_initialized);
+	  Vertex_handle first_bad_vertex = *(bad_vertices.begin());
+	  return biggest_incident_facet_in_complex(first_bad_vertex);
+	}
+      }
+
+      void before_insertion_impl(const Facet& f, const Point& s,
+				 Zone& zone) {
+        if(bad_vertices_initialized)
+        {
+          for (typename Zone::Facets_iterator fit =
+                 zone.boundary_facets.begin(); fit !=
+                 zone.boundary_facets.end(); ++fit)
+	    before_insertion_handle_facet_on_boundary_of_conflict_zone (*fit); 
+        }
+	SMMBB::before_insertion_impl(f, s, zone);
+      }
+
+    void after_insertion_impl(const Vertex_handle v) {
+      SMMBB::after_insertion_impl(v);
+
+      if(bad_vertices_initialized){
+	// foreach v' in star of v
+	Vertices vertices;
+	SMMBB::tr.incident_vertices(v, std::back_inserter(vertices));
+
+	// is_regular_or_boundary_for_vertices
+	// is used here also incident edges are not known to be
+	// REGULAR which may cause some singular vertices to be forgotten
+	// This causes no problem because 
+	// those SINGULAR incident SINGULAR edges are going to be handled
+	for (Vertices_iterator vit = vertices.begin();
+	     vit != vertices.end();
+	     ++vit)
+	  if ( SMMBB::c2t3.is_in_complex(*vit)  &&
+	       !SMMBB::c2t3.is_regular_or_boundary_for_vertices(*vit)) {
+	    bad_vertices.insert(*vit);
+	  }
+
+	if ( SMMBB::c2t3.is_in_complex(v) &&
+	     !SMMBB::c2t3.is_regular_or_boundary_for_vertices(v)) {
+	  bad_vertices.insert(v);
+	}
+      }
+    }
+      
+    std::string debug_info() const
+    {
+      std::stringstream s;
+      s << SMMBB::debug_info() << ",";
+      if(bad_vertices_initialized) 
+	s << bad_vertices.size();
+      else
+	s << "non manifold vertices not initialized";
+      return s.str();
+    }
+
+    std::string debug_info_header() const
+    {
+      std::stringstream s;
+      s << SMMBB::debug_info_header() << "," << "#bad vertices";
+      return s.str();
+    }
+  };  // end Surface_mesher_manifold_base
+
+  }  // end namespace Surface_mesher
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_SURFACE_MESHER_MANIFOLD_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Surface_mesher_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Surface_mesher_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Types_generators.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Types_generators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Types_generators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Types_generators.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Verbose_flag.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Verbose_flag.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Verbose_flag.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Verbose_flag.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Surface_mesher_generator.h b/3rdparty/CGAL-4.8/include/CGAL/Surface_mesher_generator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Surface_mesher_generator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Surface_mesher_generator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_event.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_event.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_event.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_event.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_event.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_event.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_event.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_event.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_functors.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_functors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_functors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_functors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2_algorithms.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2_algorithms.h
new file mode 100644
index 0000000..42f07fb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_2_algorithms.h
@@ -0,0 +1,222 @@
+// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s): Baruch Zukerman <baruchzu at post.tau.ac.il>
+//            Efi Fogel       <efif at post.tau.ac.il>
+//            (based on old version by Tali Zvi)
+
+#ifndef CGAL_SWEEP_LINE_2_ALGORITHMS_H
+#define CGAL_SWEEP_LINE_2_ALGORITHMS_H
+
+/*!
+ * \file Definition of the sweep-line related functions.
+ */
+
+#include <CGAL/Sweep_line_2.h>
+#include <CGAL/Sweep_line_2/Sweep_line_2_visitors.h>
+
+#include <CGAL/Segment_2.h>
+#include <CGAL/Arr_segment_traits_2.h>
+#include <CGAL/Arr_polyline_traits_2.h>
+#include <CGAL/Arr_conic_traits_2.h>
+#include <CGAL/Arr_rational_function_traits_2.h>
+#include <CGAL/Arr_circle_segment_traits_2.h>
+#include <CGAL/Arr_linear_traits_2.h>
+#include <CGAL/Arr_rat_arc/Rational_arc_d_1.h>
+
+namespace CGAL {
+
+template <typename Curve>
+struct Default_arr_traits
+{};
+
+template <typename Kernel>
+struct Default_arr_traits<CGAL::Segment_2<Kernel> >
+{
+  typedef CGAL::Arr_segment_traits_2<Kernel>                            Traits;
+};
+
+template <typename Kernel>
+struct Default_arr_traits<CGAL::Arr_segment_2<Kernel> >
+{
+  typedef CGAL::Arr_segment_traits_2<Kernel>                            Traits;
+};
+
+template <typename SubcurveTraits>
+struct Default_arr_traits<CGAL::internal::Polycurve_2
+                          <SubcurveTraits, typename SubcurveTraits::Point_2> >
+{
+  typedef CGAL::Arr_polyline_traits_2<SubcurveTraits>                   Traits;
+};
+
+template <typename Rat_kernel_, class Alg_kernel_, class Nt_traits_>
+struct Default_arr_traits<CGAL::_Conic_arc_2<Rat_kernel_, Alg_kernel_,
+                                             Nt_traits_> >
+{
+  typedef CGAL::Arr_conic_traits_2<Rat_kernel_, Alg_kernel_, Nt_traits_>
+                                                                        Traits;
+};
+
+template <typename Algebraic_kernel_>
+struct Default_arr_traits<CGAL::Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_> >
+{
+  typedef CGAL::Arr_rational_function_traits_2<Algebraic_kernel_>       Traits;
+};
+
+template <typename Kernel_, bool Filter_>
+struct Default_arr_traits<CGAL::_Circle_segment_2<Kernel_, Filter_> >
+{
+  typedef CGAL::Arr_circle_segment_traits_2<Kernel_, Filter_>           Traits;
+};
+
+template <typename Kernel>
+struct Default_arr_traits<CGAL::Arr_linear_object_2<Kernel> >
+{
+  typedef CGAL::Arr_linear_traits_2<Kernel>                             Traits;
+};
+
+/*!
+ * Compute all intersection points induced by a range of input curves.
+ * The intersections are calculated using the sweep-line algorithm.
+ * \param begin An input iterator for the first curve in the range.
+ * \param end A input past-the-end iterator for the range.
+ * \param points Output: An output iterator for the intersection points
+ *                       induced by the input curves.
+ * \param report_endpoints If (true), the end points of the curves are also
+ *                         reported as intersection points.
+ * \pre The value-type of CurveInputIterator is Traits::Curve_2, and the
+ *      value-type of OutputIterator is Traits::Point_2.
+ */
+template <class CurveInputIterator, class OutputIterator, class Traits>
+OutputIterator compute_intersection_points (CurveInputIterator curves_begin,
+                                            CurveInputIterator curves_end,
+                                            OutputIterator points,
+                                            bool report_endpoints,
+                                            Traits &tr)
+{
+  // Define the sweep-line types:
+  typedef Sweep_line_points_visitor<Traits,OutputIterator>  Visitor;
+  typedef Sweep_line_2< Traits,
+                        Sweep_line_points_visitor<Traits, OutputIterator> >
+                                                            Sweep_line;
+
+  // Perform the sweep and obtain the intersection points.
+  Visitor     visitor (points, report_endpoints);
+  Sweep_line  sweep_line (&tr, &visitor);
+  visitor.sweep(curves_begin, curves_end);
+
+  return (visitor.output_iterator());
+}
+
+template <class CurveInputIterator, class OutputIterator>
+OutputIterator compute_intersection_points (CurveInputIterator curves_begin,
+                                            CurveInputIterator curves_end,
+                                            OutputIterator points,
+                                            bool report_endpoints = false)
+{
+  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
+
+  typename Default_arr_traits<Curve>::Traits   traits;
+
+  return (compute_intersection_points(curves_begin, curves_end, points,
+                                      report_endpoints, traits));
+}
+
+/*!
+ * Compute all x-monotone subcurves that are disjoint in their interiors
+ * induced by a range of input curves.
+ * The subcurves are calculated using the sweep-line algorithm.
+ * \param begin An input iterator for the first curve in the range.
+ * \param end A input past-the-end iterator for the range.
+ * \param points Output: An output iterator for the subcurve.
+ * \param mult_overlaps If (true), the overlapping subcurve will be reported
+ *                      multiple times.
+ * \pre The value-type of CurveInputIterator is Traits::Curve_2, and the
+ *      value-type of OutputIterator is Traits::X_monotone_curve_2.
+ */
+template <class CurveInputIterator, class OutputIterator, class Traits>
+OutputIterator compute_subcurves (CurveInputIterator curves_begin,
+                                  CurveInputIterator curves_end,
+                                  OutputIterator subcurves,
+                                  bool mult_overlaps, Traits &tr)
+{
+  // Define the sweep-line types:
+  typedef Sweep_line_subcurves_visitor<Traits, OutputIterator>  Visitor;
+  typedef Sweep_line_2<Traits,
+                       Sweep_line_subcurves_visitor<Traits, OutputIterator> >
+                                                                Sweep_line;
+
+  // Perform the sweep and obtain the subcurves.
+  Visitor     visitor (subcurves, mult_overlaps);
+  Sweep_line  sweep_line (&tr, &visitor);
+  visitor.sweep(curves_begin, curves_end);
+
+  return (visitor.output_iterator());
+}
+
+
+template <class CurveInputIterator, class OutputIterator>
+OutputIterator compute_subcurves (CurveInputIterator curves_begin,
+                                  CurveInputIterator curves_end,
+                                  OutputIterator subcurves,
+                                  bool mult_overlaps = false)
+{
+  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
+  typename Default_arr_traits<Curve>::Traits   m_traits;
+  return compute_subcurves(curves_begin, curves_end, subcurves, mult_overlaps,
+                           m_traits);
+}
+
+/*!
+ * Determine if there occurs an intersection between any pair of curves in
+ * a given range.
+ * \param begin An input iterator for the first curve in the range.
+ * \param end A input past-the-end iterator for the range.
+ * \return (true) if any pair of curves intersect; (false) otherwise.
+ */
+template <class CurveInputIterator, class Traits>
+bool do_curves_intersect (CurveInputIterator curves_begin,
+                          CurveInputIterator curves_end, Traits &tr)
+{
+  // Define the sweep-line types:
+  typedef Sweep_line_do_curves_x_visitor<Traits>      Visitor;
+  typedef Sweep_line_2<Traits, Sweep_line_do_curves_x_visitor<Traits> >
+    Sweep_line;
+
+  // Perform the sweep and obtain the subcurves.
+  Visitor     visitor;
+  Sweep_line  sweep_line (&tr, &visitor);
+  visitor.sweep(curves_begin, curves_end);
+
+  return (visitor.found_intersection());
+}
+
+
+template <class CurveInputIterator>
+bool do_curves_intersect (CurveInputIterator curves_begin,
+                          CurveInputIterator curves_end)
+{
+  typedef typename std::iterator_traits<CurveInputIterator>::value_type  Curve;
+
+  typename Default_arr_traits<Curve>::Traits   m_traits;
+  return do_curves_intersect (curves_begin, curves_end, m_traits);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Sweep_line_empty_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/Sweep_line_empty_visitor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Sweep_line_empty_visitor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Sweep_line_empty_visitor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/TDS_full_cell_default_storage_policy.h b/3rdparty/CGAL-4.8/include/CGAL/TDS_full_cell_default_storage_policy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/TDS_full_cell_default_storage_policy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/TDS_full_cell_default_storage_policy.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/TDS_full_cell_mirror_storage_policy.h b/3rdparty/CGAL-4.8/include/CGAL/TDS_full_cell_mirror_storage_policy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/TDS_full_cell_mirror_storage_policy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/TDS_full_cell_mirror_storage_policy.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Taucs_fix.h b/3rdparty/CGAL-4.8/include/CGAL/Taucs_fix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Taucs_fix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Taucs_fix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Taucs_matrix.h b/3rdparty/CGAL-4.8/include/CGAL/Taucs_matrix.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Taucs_matrix.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Taucs_matrix.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Taucs_solver_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Taucs_solver_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Taucs_solver_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Taucs_solver_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Taucs_vector.h b/3rdparty/CGAL-4.8/include/CGAL/Taucs_vector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Taucs_vector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Taucs_vector.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Tetrahedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Tetrahedron_3.h
new file mode 100644
index 0000000..c58882b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Tetrahedron_3.h
@@ -0,0 +1,185 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_TETRAHEDRON_3_H
+#define CGAL_TETRAHEDRON_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3
+{
+  typedef typename R_::Point_3             Point_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Tetrahedron_3                      Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Tetrahedron_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<3>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Tetrahedron_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Tetrahedron_3() {}
+
+  Tetrahedron_3(const Rep& t)
+      : Rep(t) {}
+
+  Tetrahedron_3(const Point_3& p, const Point_3& q,
+                const Point_3& r, const Point_3& s)
+    : Rep(typename R::Construct_tetrahedron_3()(Return_base_tag(), p, q, r, s)) {}
+
+  Tetrahedron_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Tetrahedron_3(t.transform(this->vertex(0)),
+                         t.transform(this->vertex(1)),
+                         t.transform(this->vertex(2)),
+                         t.transform(this->vertex(3)));
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
+  vertex(int i) const
+  {
+    return R().construct_vertex_3_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
+  operator[](int i) const
+  {
+    return vertex(i);
+  }
+
+  bool
+  is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+  Orientation orientation() const
+  {
+    return R().orientation_3_object()(*this);
+  }
+
+  Bounded_side bounded_side(const Point_3 &p) const
+  {
+    return R().bounded_side_3_object()(*this, p);
+  }
+
+  Oriented_side oriented_side(const Point_3 &p) const
+  {
+    return R().oriented_side_3_object()(*this, p);
+  }
+
+  bool has_on_positive_side(const Point_3 &p) const
+  {
+    return R().has_on_positive_side_3_object()(*this, p);
+  }
+
+  bool has_on_negative_side(const Point_3 &p) const
+  {
+    return R().has_on_negative_side_3_object()(*this, p);
+  }
+
+  bool has_on_boundary(const Point_3 &p) const
+  {
+    return R().has_on_boundary_3_object()(*this, p);
+  }
+
+  bool has_on_bounded_side(const Point_3 &p) const
+  {
+    return R().has_on_bounded_side_3_object()(*this, p);
+  }
+
+  bool has_on_unbounded_side(const Point_3 &p) const
+  {
+    return R().has_on_unbounded_side_3_object()(*this, p);
+  }
+
+  typename cpp11::result_of<typename R::Compute_volume_3( Tetrahedron_3)>::type
+  volume() const
+  {
+    return R().compute_volume_3_object()(*this);
+  }
+
+  Bbox_3
+  bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Tetrahedron_3<R> &t)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3];
+    case IO::BINARY :
+        return os << t[0]  << t[1]  << t[2] << t[3];
+    default:
+        os << "Tetrahedron_3(" << t[0] <<  ", " << t[1] <<   ", " << t[2];
+        os <<  ", " << t[3] << ")";
+        return os;
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Tetrahedron_3<R> &t)
+{
+    typename R::Point_3 p, q, r, s;
+
+    is >> p >> q >> r >> s;
+
+    if (is)
+        t = Tetrahedron_3<R>(p, q, r, s);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif  // CGAL_TETRAHEDRON_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h
new file mode 100644
index 0000000..d44a45e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2009,2010,2012  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
+#define POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
+
+#include <QFileInfo>
+#include <QStringList>
+
+namespace CGAL{
+namespace Three {
+class Scene_item;
+  /*!
+   * \file Polyhedron_demo_io_plugin_interface.h
+   * This class provides a base for creating a new IO plugin.
+   */
+class Polyhedron_demo_io_plugin_interface 
+{
+public:
+  //!Returns the name of the plugin
+  virtual QString name() const = 0;
+  virtual ~Polyhedron_demo_io_plugin_interface() {}
+  /*! The filters for the names of the files that can be used
+   * by the plugin.
+   * Example : to filter OFF files : return "OFF files (*.off)"
+*/
+  virtual QString nameFilters() const = 0;
+  virtual QString saveNameFilters() const {return nameFilters();}
+  virtual QString loadNameFilters() const {return nameFilters();}
+
+  //! Specifies if the io_plugin is able to load an item or not.
+  virtual bool canLoad() const = 0;
+  //!  Loads an item from a file.
+  virtual Scene_item* load(QFileInfo fileinfo) = 0;
+  //!Specifies if the io_plugin can save the item or not.
+  virtual bool canSave(const Scene_item*) = 0;
+  //!Saves the item in the file corresponding to the path
+  //!contained in fileinfo. Returns false if error.
+  virtual bool save(const Scene_item*, QFileInfo fileinfo) = 0;
+};
+}
+}
+Q_DECLARE_INTERFACE(CGAL::Three::Polyhedron_demo_io_plugin_interface,
+                    "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")
+
+#endif // POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_helper.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_helper.h
new file mode 100644
index 0000000..b7ea12f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_helper.h
@@ -0,0 +1,96 @@
+// Copyright (c) 2009,2014,2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+//! \file Polyhedron_demo_plugin_helper.h 
+#ifndef POLYHEDRON_DEMO_OPERATION_HELPER_H
+#define POLYHEDRON_DEMO_OPERATION_HELPER_H
+
+#include "Scene_item_config.h" //defines SCENE_ITEM_EXPORT
+
+#include <QString>
+#include <QStringList>
+#include <QMap>
+
+class QAction;
+struct QMetaObject;
+class QMainWindow;
+class QDockWidget;
+
+#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
+#include <CGAL/Three/Scene_interface.h>
+namespace CGAL {
+namespace Three {
+  /*!
+   * This class provides a base for creating a new plugin.
+   */
+class SCENE_ITEM_EXPORT Polyhedron_demo_plugin_helper
+  : public Polyhedron_demo_plugin_interface
+{
+public:
+  //! get action object from its name
+  static QAction* getActionFromMainWindow(QMainWindow*, QString action_name);
+  
+  //! Init plugin
+  virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface);
+  
+  //! Get list of actions supported by this plugin
+  virtual QStringList actionsNames() const;
+  //!List of the actions of the plugin
+  virtual QList<QAction*> actions() const;
+
+  //! To get a selected item with the type of SceneType
+  template<class SceneType>
+  SceneType* get_selected_item() const {
+    int item_id = scene->mainSelectionIndex();
+    SceneType* scene_item = qobject_cast<SceneType*>(scene->item(item_id));
+    if(!scene_item) {
+      // no selected SceneType - if there is only one in list return it, otherwise NULL
+      int counter = 0;
+      int last_selected = 0;
+      for(CGAL::Three::Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end && counter < 2; ++i) {
+        if(SceneType* tmp = qobject_cast<SceneType*>(scene->item(i))) { 
+          scene_item = tmp;
+          counter++; 
+          last_selected=i;
+        }
+      }
+      if(counter != 1) { return NULL; }
+      scene->setSelectedItem(last_selected);
+    }
+    return scene_item;
+  }
+
+  //!To add a dock widget to the interface
+  void add_dock_widget(QDockWidget* dock);
+
+  //! Auto-connects actions to slots. Called by init().
+  void autoConnectActions();
+  
+protected:
+  //!The list of actions
+  QMap<QString, QAction*> actions_map;
+  //!The reference to the scene
+  CGAL::Three::Scene_interface* scene;
+  //!The reference to the main window
+  QMainWindow* mw;
+};
+}
+}
+#endif // POLYHEDRON_DEMO_OPERATION_HELPER_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_interface.h
new file mode 100644
index 0000000..f3ddda4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Polyhedron_demo_plugin_interface.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2009-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+   //! \file Polyhedron_demo_plugin_interface.h 
+#ifndef POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
+#define POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
+
+#include <QString>
+#include <QList>
+#include <QtPlugin>
+#include <QDebug>
+
+class QAction;
+class QMainWindow;
+class Messages_interface;
+namespace CGAL {
+namespace Three {
+class Scene_interface;
+  /*!
+   * This class gives some virtual functions to help making a plugin
+   */
+class Polyhedron_demo_plugin_interface 
+{
+public:
+  //! Destructor
+  virtual ~Polyhedron_demo_plugin_interface() {}
+  //!Initializes the plugin.
+  virtual void init(QMainWindow*, CGAL::Three::Scene_interface*) {}
+  //!Initializes the plugin.
+  virtual void init(QMainWindow* mw, CGAL::Three::Scene_interface* sc, Messages_interface*) {
+    init(mw, sc);
+  }
+
+  //! Checks the current state of the `Scene` or `MainWindow` and decides
+  //! if the plugin can function, given that state.  Its actions are
+  //! visible in contextmenus, if this returns true, not visible
+  //! otherwise.  
+  //!
+  //! @returns \c true, if the plugin is applicable, \c false
+  //! otherwise
+  virtual bool applicable(QAction*) const = 0;
+  //!The list of the actions of the plugin.
+  virtual QList<QAction*> actions() const = 0;
+  //!If you need to do something when the plugin is closed, do it here
+  virtual void closure() {
+ }
+};
+}
+}
+Q_DECLARE_INTERFACE(CGAL::Three::Polyhedron_demo_plugin_interface,
+                    "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
+
+#endif // POLYHEDRON_DEMO_PLUGIN_INTERFACE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_draw_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_draw_interface.h
new file mode 100644
index 0000000..c9fa3f0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_draw_interface.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2009,2010,2012,2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef SCENE_DRAW_INTERFACE_H
+#define SCENE_DRAW_INTERFACE_H
+
+class QKeyEvent;
+namespace CGAL
+{
+namespace Three {
+  class Viewer_interface;
+
+
+//! Base class to interact with the scene from the viewer.
+class Scene_draw_interface {
+public:
+  virtual ~Scene_draw_interface(){}
+  virtual void initializeGL() = 0;
+  virtual void draw() = 0;
+  virtual void draw(CGAL::Three::Viewer_interface*) { draw(); };
+  virtual void drawWithNames() = 0;
+  virtual void drawWithNames(CGAL::Three::Viewer_interface*) { drawWithNames(); }
+  virtual bool keyPressEvent(QKeyEvent* e) = 0;
+  virtual float get_bbox_length() const = 0;
+};
+}
+}
+#endif // SCENE_DRAW_INTERFACE_H;
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_group_item.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_group_item.h
new file mode 100644
index 0000000..bc4db1c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_group_item.h
@@ -0,0 +1,141 @@
+// Copyright (c) 2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Maxime Gimeno
+
+
+#ifndef SCENE_GROUP_ITEM_H
+#define SCENE_GROUP_ITEM_H
+
+#include <CGAL/Three/Scene_item.h>
+using namespace CGAL::Three;
+
+#include <QtCore/qglobal.h>
+#ifdef demo_framework_EXPORTS
+#  define DEMO_FRAMEWORK_EXPORT Q_DECL_EXPORT
+#else
+#  define DEMO_FRAMEWORK_EXPORT Q_DECL_IMPORT
+#endif
+namespace CGAL {
+namespace Three {
+//!A Scene_group_item is a virtual Scene_item that does not draw anything,
+//! but regroups other items as its children. It allows the
+//! user to apply several actions to multiple items at the same time.
+class DEMO_FRAMEWORK_EXPORT Scene_group_item : public Scene_item
+{
+    Q_OBJECT
+public :
+    Scene_group_item(QString name = QString("New group"));
+    ~Scene_group_item() {}
+    //!Returns false to avoid disturbing the BBox of the scene.
+    bool isFinite() const;
+    //!Returns true to avoid disturbing the BBox of the scene.
+    bool isEmpty() const ;
+    //!Returns if the group_item is currently expanded or collapsed in the view.
+    //! True means expanded, false means collapsed.
+    //! @see setExpanded.
+    bool isExpanded() const;
+    //!Makes the group_item expanded or collapsed in the view.
+    //! True means expanded, false means collapsed.
+    void setExpanded(bool);
+    //! @see isExpanded.
+    //!Returns an empty BBox to avoid disturbing the BBox of the scene.
+    Bbox bbox() const;
+    //!Not supported.
+    Scene_item* clone() const {return 0;}
+    //! Indicate if rendering mode is supported.
+    bool supportsRenderingMode(RenderingMode m) const;
+    //!Prints the number of children.
+    QString toolTip() const;
+    //!Adds a Scene_item* to the list of children.
+    //!@see getChildren. @see removeChild.
+    void addChild(Scene_item* new_item);
+    //!Sets all the children to the specified color.
+    void setColor(QColor c);
+    //!Sets all the children in the specified rendering mode.
+    void setRenderingMode(RenderingMode m);
+    //!Sets all the children to the specified visibility.
+    void setVisible(bool b);
+    //!Sets all the children in points mode.
+    void setPointsMode() {
+      setRenderingMode(Points);
+    }
+    //!Sets all the children in wireframe rendering.
+    void setWireframeMode() {
+      setRenderingMode(Wireframe);
+    }
+    //!Sets all the children in wireframe rendering.
+    void setWireframe() {
+      setRenderingMode(Wireframe);
+    }
+    //!Sets all the children in flat rendering.
+    void setFlat() {
+      setRenderingMode(Flat);
+    }
+    //!Sets all the children in flat rendering.
+    void setFlatMode() {
+      setRenderingMode(Flat);
+    }
+    //!Sets all the children in flat rendering with edges.
+    void setFlatPlusEdgesMode() {
+      setRenderingMode(FlatPlusEdges);
+    }
+    //!Sets all the children in smooth rendering.
+    void setGouraudMode() {
+      setRenderingMode(Gouraud);
+    }
+    //!Sets all the children in point rendering with normals.
+    void setPointsPlusNormalsMode(){
+      setRenderingMode(PointsPlusNormals);
+    }
+    //!Sets all the children in splat rendering.
+    void setSplattingMode(){
+      setRenderingMode(Splatting);
+    }
+    //!Returns a list of all the children.
+    QList<Scene_item*> getChildren() const {return children;}
+    //!Removes a Scene_item from the list of children.
+    //!@see getChildren @see addChild
+    void removeChild( Scene_item* item)
+    {
+      Scene_group_item* group =
+              qobject_cast<Scene_group_item*>(item);
+      if(group)
+        Q_FOREACH(Scene_item* child, group->getChildren())
+            removeChild(child);
+      item->has_group=0;
+      children.removeOne(item);
+    }
+    //!Moves a child up in the list.
+    void moveUp(int);
+    //!Moves a child down in the list.
+    void moveDown(int);
+
+private:
+    //!Contains a reference to all the children of this group.
+    QList<Scene_item*> children;
+    //!Updates the property has_group for each group and sub-groups containing new_item.
+    void add_group_number(Scene_item*new_item);
+    bool expanded;
+
+}; //end of class Scene_group_item
+
+}
+}
+
+#endif // SCENE_GROUP_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_interface.h
new file mode 100644
index 0000000..fb2d922
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_interface.h
@@ -0,0 +1,191 @@
+// Copyright (c) 2012-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef SCENE_INTERFACE_H
+#define SCENE_INTERFACE_H
+
+#include <QString>
+#include <QColor>
+#include <QList>
+#include <algorithm>
+#include <cmath>
+namespace CGAL{namespace Three{
+class Scene_item;
+class Scene_group_item;
+    }}
+// OpenGL rendering mode
+/** \file Scene_interface.h
+ * Contains the class Scene_interface and the enum RenderingMode.
+ */
+/*!
+ * \brief The RenderingMode enum
+ * Can be Points, PointsPlusNormals, Wireframe, Flat, FlatPlusEdges, or Gouraud.
+ * - Points, PointsPlusNormals, and Wireframe have no light model.
+ * - Flat and FlatPlusEdges use a basic light model with one normal per facet.
+ * - Gouraud use the same light model but with one normal per vertex.
+ */
+enum RenderingMode { Points = 0,
+                     PointsPlusNormals,
+                     Splatting,
+                     Wireframe, 
+                     Flat,
+                     FlatPlusEdges,
+                     Gouraud,
+                     LastRenderingMode = Gouraud,
+                     NumberOfRenderingMode = LastRenderingMode+1 };
+
+
+namespace CGAL {
+namespace Three{
+/*!
+ * This is the class given to the plugins to interact with the scene.
+ * */
+class Scene_interface {
+public:
+    //!Contains the coordinates for the two extremities of the diagonal of a bounding box.
+    //! Those points are respectively the left bottom front vertex and the right upper back vertex.
+  struct Bbox {
+    double xmin, ymin, zmin;
+    double xmax, ymax, zmax;
+    Bbox(const double _xmin,const double _ymin,const double _zmin,
+         const double _xmax,const double _ymax,const double _zmax)
+      : xmin(_xmin), ymin(_ymin), zmin(_zmin),
+        xmax(_xmax), ymax(_ymax), zmax(_zmax)
+    {
+    }
+    //!The default constructor of a bounding box.
+    //! The two vertices are (0.0,0.0,0.0) and (1.0,1.0,1.0).
+    Bbox()
+      : xmin(0.0), ymin(0.0), zmin(0.0),
+        xmax(1.0), ymax(1.0), zmax(1.0)
+    {
+    }
+    //!Sums the coordinates of each vertex one by one.
+    Bbox operator+(const Bbox& b) const {
+      return Bbox((std::min)(xmin, b.xmin),
+                  (std::min)(ymin, b.ymin),
+                  (std::min)(zmin, b.zmin),
+                  (std::max)(xmax, b.xmax),
+                  (std::max)(ymax, b.ymax),
+                  (std::max)(zmax, b.zmax));
+    }
+
+    //!@returns true if all the coordinates of the two bounding boxes are the same.
+    bool operator==(const Bbox&b) const{
+      return
+        xmin==b.xmin && xmax==b.xmax &&
+        ymin==b.ymin && ymax==b.ymax &&
+        zmin==b.zmin && zmax==b.zmax;
+    }
+    //!@returns the opposite of ==.
+    //!@see #operator==
+    bool operator!=(const Bbox& b) const{
+      return !(*this == b);
+    }
+    //!@returns the difference between xmax and xmin.
+    double width() const { return xmax-xmin; }
+    //!@returns the difference between ymax and ymin.
+    double height() const { return ymax-ymin; }
+    //!@returns the difference between zmax and zmin.
+    double depth() const { return zmax-zmin; }
+    //!@returns the length of the diagonal of the bounding box.
+    double diagonal_length() const
+    {
+      return std::sqrt(width()*width() + height()*height() + depth()*depth());
+    }
+
+  }; // struct BBox (ad hoc class, does not depend on CGAL kernels
+
+  //!Integer used for the index of an Scene_item.
+  //!@see Scene_item
+  typedef int Item_id;
+  //!Virtual destructor
+  virtual ~Scene_interface() {};
+  //!Adds an item to the list of items. Must be overloaded.
+  //!@returns the index of the new item.
+  virtual Item_id addItem(CGAL::Three::Scene_item* item) = 0;
+  //!Sets an item as the one at the specified index .
+  //!If emit_item_about_to_be_destroyed is set to true, emits
+  //!an itemAboutToBeDestroyed signal. Must be overloaded.
+  //!@returns a pointer to the old item.
+  virtual Scene_item* replaceItem(Item_id, CGAL::Three::Scene_item*, bool emit_item_about_to_be_destroyed = false) = 0;
+  //!Moves item to the targeted group.
+  virtual void changeGroup(CGAL::Three::Scene_item* item, CGAL::Three::Scene_group_item* target_group) = 0;
+
+  /*! Erases an item in the list. Must be overloaded.
+   * @returns the index of the item just before the one that is erased,
+   * or just after.
+   * @returns -1 if the list is empty.*/
+  virtual Item_id erase(Item_id) = 0;
+
+  /*! Duplicate a scene item. Must be overloaded.
+   * @returns the ID of the new item (-1 on error).
+   */
+    virtual Item_id duplicate(Item_id) = 0;
+
+  // Accessors (getters)
+  //!Must be overloaded.
+  //!@returns the number of items.
+  virtual int numberOfEntries() const = 0;
+  //!Must be overloaded.
+  //! @returns the item at the target index.
+  virtual CGAL::Three::Scene_item* item(Item_id) const = 0;
+  //!Must be overloaded.
+  //! @returns the id of the target item.
+  virtual Item_id item_id(CGAL::Three::Scene_item*) const = 0;
+  //!Must be overloaded.
+  //!@returns the currently selected item's index.
+  virtual Item_id mainSelectionIndex() const = 0;
+  //!Must be overloaded.
+  //!@returns the list of currently selected items indices.
+  virtual QList<Item_id> selectionIndices() const = 0;
+  //!Must be overloaded.
+  //!@returns the index of the Item_A
+  virtual Item_id selectionAindex() const = 0;
+  //!Must be overloaded.
+  //!@returns the index of the Item_B
+  virtual Item_id selectionBindex() const = 0;
+
+  //! Must be overloaded.
+  //!@returns the scene bounding box
+  virtual Bbox bbox() const = 0;
+  //!Must be overloaded.
+  //!@returns the length of the bounding box's diagonal.
+  virtual double len_diagonal() const = 0;
+
+public:
+  /*! Notifies the scene that an item was modified. Must be overloaded.*/
+  virtual void itemChanged(Item_id i) = 0; 
+  /*! Notifies the scene that an item was modified. Must be overloaded.*/
+  virtual void itemChanged(CGAL::Three::Scene_item*) = 0;
+
+  /*! Selects an item. Must be overloaded.*/
+  virtual void setSelectedItem(Item_id) = 0;
+  /*!  Adds group to the Scene. If items were selected at the
+   * moment this function is called, they are added to the group.
+   * If all the selected items were in the same group, the new group
+   * is added as a sub-group of this group.*/
+  virtual void add_group(Scene_group_item* group) = 0;
+  
+}; // end interface Scene_interface
+}
+}
+
+#endif // SCENE_INTERFACE_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item.h
new file mode 100644
index 0000000..37eafaa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item.h
@@ -0,0 +1,459 @@
+// Copyright (c) 2012-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU, Maxime Gimeno
+
+#ifndef SCENE_ITEM_H
+#define SCENE_ITEM_H
+#include <CGAL/Three/Scene_item_config.h>
+#include <CGAL/Three/Scene_interface.h>
+#include <QString>
+#include <QPixmap>
+#include <QFont>
+#include <QOpenGLBuffer>
+#include <QOpenGLShader>
+#include <QOpenGLVertexArrayObject>
+#include <vector>
+namespace CGAL {
+namespace Three {
+  class Viewer_interface;
+}
+}
+namespace qglviewer {
+  class ManipulatedFrame;
+}
+
+class QMenu;
+class QKeyEvent;
+namespace CGAL {
+namespace Three {
+
+class Viewer_interface;
+//! This class represents an object in the OpenGL scene
+class SCENE_ITEM_EXPORT Scene_item : public QObject {
+  Q_OBJECT
+  Q_PROPERTY(QColor color READ color WRITE setColor)
+  Q_PROPERTY(QString name READ name WRITE setName)
+  Q_PROPERTY(bool visible READ visible WRITE setVisible)
+  Q_ENUMS(RenderingMode)
+  Q_PROPERTY(RenderingMode renderingMode READ renderingMode WRITE setRenderingMode)
+public:
+ /*!
+   * \brief The OpenGL_program_IDs enum
+   * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attrib_buffers().
+   *@see getShaderProgram
+   * @see attrib_buffers
+   */
+ enum OpenGL_program_IDs
+ {
+  PROGRAM_WITH_LIGHT = 0,      /** Used to render a surface or edge affected by the light. It uses a per fragment lighting model, and renders brighter the selected item.*/
+  PROGRAM_WITHOUT_LIGHT,       /** Used to render a polygon edge or points. It renders in a uniform color and is not affected by light. It renders the selected item in black.*/
+  PROGRAM_NO_SELECTION,        /** Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection.*/
+  PROGRAM_WITH_TEXTURE,        /** Used to render a textured polyhedron. Affected by light.*/
+  PROGRAM_PLANE_TWO_FACES,     /** Used to render a two-faced plane. The two faces have a different color. Not affected by light.*/
+  PROGRAM_WITH_TEXTURED_EDGES, /** Used to render the edges of a textured polyhedorn. Not affected by light.*/
+  PROGRAM_INSTANCED,           /** Used to display instanced rendered spheres.Affected by light.*/
+  PROGRAM_INSTANCED_WIRE,      /** Used to display instanced rendered wired spheres. Not affected by light.*/
+  PROGRAM_C3T3,                /** Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light.*/
+  PROGRAM_C3T3_EDGES,          /** Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light.*/
+  NB_OF_PROGRAMS               /** Holds the number of different programs in this enum.*/
+ };
+  typedef CGAL::Three::Scene_interface::Bbox Bbox;
+  typedef qglviewer::ManipulatedFrame ManipulatedFrame;
+  //! The default color of a scene_item.
+  static const QColor defaultColor; // defined in Scene_item.cpp
+
+  //!The default Constructor.
+  /*!
+   * Initializes the number of VBOs to 20 and VAOs to 10 and creates them.
+   */
+  Scene_item()
+    : name_("unamed"),
+      color_(defaultColor),
+      visible_(true),
+      are_buffers_filled(false),
+      rendering_mode(FlatPlusEdges),
+      defaultContextMenu(0),
+      buffersSize(20),
+      vaosSize(10),
+      vaos(10)
+  {
+      is_bbox_computed = false;
+      is_monochrome = true;
+      for(int i=0; i<vaosSize; i++)
+      {
+          addVaos(i);
+          vaos[i]->create();
+      }
+
+      buffers.reserve(buffersSize);
+      for(int i=0; i<buffersSize; i++)
+      {
+          QOpenGLBuffer n_buf;
+          buffers.push_back(n_buf);
+          buffers[i].create();
+      }
+      nb_isolated_vertices = 0;
+      has_group = 0;
+  }
+  //!The Constructor.
+  /*!
+   * Initializes the number of VBOs and VAOs and creates them.
+   */
+  Scene_item(int buffers_size, int vaos_size)
+    : name_("unamed"),
+      color_(defaultColor),
+      visible_(true),
+      are_buffers_filled(false),
+      rendering_mode(FlatPlusEdges),
+      defaultContextMenu(0),
+      buffersSize(buffers_size),
+      vaosSize(vaos_size),
+      vaos(vaos_size)
+  {
+      is_bbox_computed = false;
+      is_monochrome = true;
+      for(int i=0; i<vaosSize; i++)
+      {
+          addVaos(i);
+          vaos[i]->create();
+      }
+
+      buffers.reserve(buffersSize);
+      for(int i=0; i<buffersSize; i++)
+      {
+          QOpenGLBuffer n_buf;
+          buffers.push_back(n_buf);
+          buffers[i].create();
+      }
+      nb_isolated_vertices = 0;
+      has_group = 0;
+  }
+  //! Setter for the number of isolated vertices.
+  void setNbIsolatedvertices(std::size_t nb) { nb_isolated_vertices = nb;}
+  //! Getter for the number of isolated vertices.
+  std::size_t getNbIsolatedvertices() const {return nb_isolated_vertices;}
+  //!The destructor. It is virtual as the item is virtual.
+  virtual ~Scene_item();
+  //! Creates a new item as a copy of the sender. Must be overloaded.
+  virtual Scene_item* clone() const = 0;
+
+  //! Indicates if rendering mode is supported
+  virtual bool supportsRenderingMode(RenderingMode m) const = 0;
+  //! Deprecated. Does nothing.
+  virtual void draw() const {}
+  /*! \brief The drawing function.
+   * Draws the facets of the item in the viewer using OpenGL functions. The data
+   * for the drawing is gathered in compute_elements(), and is sent
+   * to buffers in initialize_buffers().
+   * @see compute_elements()
+   * @see initialize_buffers()
+   */
+  virtual void draw(CGAL::Three::Viewer_interface*) const  { draw(); }
+  //! Deprecated. Does nothing.
+  virtual void draw_edges() const { draw(); }
+  /*! \brief The drawing function.
+   * Draws the edges and lines of the item in the viewer using OpenGL functions. The data
+   * for the drawing is gathered in compute_elements(), and is sent
+   * to buffers in initialize_buffers().
+   * @see compute_elements()
+   * @see initialize_buffers()
+   */
+  virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const { draw(viewer); }
+  //! Deprecated. Does nothing.
+  virtual void draw_points() const { draw(); }
+  /*! \brief The drawing function.
+   * Draws the points of the item in the viewer using OpenGL functions. The data
+   * for the drawing is gathered in compute_elements(), and is sent
+   * to buffers in initialize_buffers().
+   * @see compute_elements()
+   * @see initialize_buffers()
+   */
+  virtual void draw_points(CGAL::Three::Viewer_interface*) const { draw_points(); }
+
+  //! Draws the splats of the item in the viewer using GLSplat functions.
+  virtual void draw_splats() const {}
+  //! Draws the splats of the item in the viewer using GLSplat functions.
+  virtual void draw_splats(CGAL::Three::Viewer_interface*) const {draw_splats();}
+
+  //! Specifies which data must be updated when selection has changed.
+  //! Must be overloaded.
+  virtual void selection_changed(bool);
+
+  // Functions for displaying meta-data of the item
+  //! @returns a QString containing meta-data about the item.
+  //! Must be overloaded.
+  //! Data is :Number of vertices, Number of edges, Number of facets,
+  //! Volume, Area, Bounding box limits and Number of isolated points.
+  virtual QString toolTip() const = 0;
+  //! @returns a QPixmap containing graphical meta-data about the item.
+  virtual QPixmap graphicalToolTip() const { return QPixmap(); }
+  //! @returns a QFont containing the font used for the data of the item.
+  virtual QFont font() const { return QFont(); }
+
+  // Functions that help the Scene to compute its bbox
+  //! If isFinite() returns false, the BBox is not computed.
+  virtual bool isFinite() const { return true; }
+  //! Specifies if the item is empty or null.
+  virtual bool isEmpty() const { return true; }
+  //!@returns the item's bounding box.
+  virtual Bbox bbox() const {
+      if(!is_bbox_computed)
+          compute_bbox();
+      is_bbox_computed = true;
+      return _bbox;
+  }
+  // Function about manipulation
+  //! Decides if the item can have a ManipulatedFrame.
+  virtual bool manipulatable() const { return false; }
+  //!@returns the manipulatedFrame of the item.
+  virtual ManipulatedFrame* manipulatedFrame() { return 0; }
+
+  // Getters for the four basic properties
+  //! @returns the current color of the item.
+  virtual QColor color() const { return color_; }
+  //! @returns the current name of the item.
+  virtual QString name() const { return name_; }
+  //! @returns the current visibility of the item.
+  virtual bool visible() const { return visible_; }
+  //! @returns the current rendering mode of the item.
+  //!@see RenderingMode
+  virtual RenderingMode renderingMode() const { return rendering_mode; }
+  //! @returns the current rendering mode of the item as a human readable string.
+  virtual QString renderingModeName() const;
+
+  //! Context menu
+  virtual QMenu* contextMenu();
+
+  //!Handles key press events.
+  virtual bool keyPressEvent(QKeyEvent*){return false;}
+
+  //!Contains the header for the table in the statistics dialog
+  /*!
+   * A header data is composed of 2 columns : the Categories and the titles.
+   * A category is the name given to an association of titles.
+   * A title is the name of a line.
+   *
+   * For example,
+   * Category :    | Titles| Values
+   * 2 lines       |       |
+   *  ____________________________
+   * |             |Name   |Cube |
+   * |             |_______|_____|
+   * |General Info |\#Edges|12   |
+   * |_____________|_______|_____|
+   *
+   *  would be stored as follows :
+   * categories = std::pair<QString,int>(QString("General Info"),2)
+   * titles.append("Name");
+   * titles.append("#Edges");
+   */
+  struct Header_data{
+   //!Contains the name of the category of statistics and the number of lines it will contain
+   QList<std::pair<QString, int> > categories;
+   //!Contains the name of the lines of each category. Must be sorted from top to bottom.
+   QList<QString> titles;
+  };
+  //!Returns a Header_data struct containing the header information.
+  virtual Header_data header()const;
+  //!Returns a QString containing the requested value for the the table in the statistics dialog
+  /*!
+   * Example :
+   *  ____________________________
+   * |             |Name   |Cube |
+   * |             |_______|_____|
+   * |General Info |\#Edges|12   |
+   * |_____________|_______|_____|
+   * compute stats(0) should return "Cube" and compute_stats(1) should return QString::number(12);
+   * The numbers must be coherent with the order of declaration of the titles in the header.
+   *
+   *
+   */
+  virtual QString compute_stats(int i);
+
+  //!Contains the number of group and subgroups containing this item.
+  int has_group;
+
+public Q_SLOTS:
+
+  //! Notifies the program that the internal data or the properties of
+  //! an item has changed, and that it must be computed again.It is
+  //! important to call this function whenever the internal data is changed,
+  //! or the displayed item will not be updated.
+  //!Must be overloaded.
+  virtual void invalidateOpenGLBuffers();
+  //!Setter for the color of the item. Calls invalidateOpenGLBuffers() so the new color is applied.
+  virtual void setColor(QColor c) { color_ = c; if(!is_monochrome)invalidateOpenGLBuffers(); }
+  //!Setter for the RGB color of the item. Calls setColor(QColor).
+  //!@see setColor(QColor c)
+  void setRbgColor(int r, int g, int b) { setColor(QColor(r, g, b)); }
+  //!Setter for the name of the item.
+  virtual void setName(QString n) { name_ = n; }
+  //!Setter for the visibility of the item.
+  virtual void setVisible(bool b) { visible_ = b; }
+  //!Setter for the rendering mode of the item.
+  //!@see RenderingMode
+  virtual void setRenderingMode(RenderingMode m) { 
+    if (supportsRenderingMode(m))
+      rendering_mode = m; 
+    Q_EMIT redraw();
+  }
+  //!Set the RenderingMode to Points.
+  void setPointsMode() {
+    setRenderingMode(Points);
+  }
+  //!Set the RenderingMode to Wireframe.
+  void setWireframeMode() {
+    setRenderingMode(Wireframe);
+  }
+
+  //!Set the RenderingMode to Flat.
+  void setFlatMode() {
+    setRenderingMode(Flat);
+  }
+  //!Set the RenderingMode to FlatPlusEdges.
+  void setFlatPlusEdgesMode() {
+    setRenderingMode(FlatPlusEdges);
+  }
+  //!Set the RenderingMode to Gouraud.
+  void setGouraudMode() {
+    setRenderingMode(Gouraud);
+  }
+  //!Set the RenderingMode to PointsPlusNormals.
+  void setPointsPlusNormalsMode(){
+    setRenderingMode(PointsPlusNormals);
+  }
+  //!Set the RenderingMode to Splatting.
+  void setSplattingMode(){
+    setRenderingMode(Splatting);
+  }
+
+  //! If b is true, the item will use buffers to render the color.
+  //! If b is false, it will use a uniform value. For example, when
+  //! using the mesh segmentation plugin, the item must be multicolor.
+  void setItemIsMulticolor(bool b){
+    is_monochrome = !b;
+  }
+  
+  //!Emits an aboutToBeDestroyed() signal.
+  virtual void itemAboutToBeDestroyed(Scene_item*);
+
+  //!Selects a point through raycasting.
+  virtual void select(double orig_x,
+                      double orig_y,
+                      double orig_z,
+                      double dir_x,
+                      double dir_y,
+                      double dir_z);
+
+Q_SIGNALS:
+  void itemChanged();
+  void aboutToBeDestroyed();
+  void redraw();
+
+protected:
+  //!Holds the BBox of the item
+  mutable Bbox _bbox;
+  mutable bool is_bbox_computed;
+  virtual void compute_bbox()const{}
+  // The four basic properties
+  //!The name of the item.
+  QString name_;
+  //!The color of the item.
+  QColor color_;
+  //!The visibility of the item.
+  bool visible_;
+  //!Specifies if the item is currently selected.
+  bool is_selected;
+  //! Specifies if the item is monochrome and uses uniform attribute for its color
+  //! or is multicolor and uses buffers.
+  bool is_monochrome;
+  //! Holds the number of vertices that are not linked to the polyhedron from the OFF
+  //! file.
+  std::size_t nb_isolated_vertices;
+  /*! Decides if the draw function must call initialize_buffers() or not. It is set
+   * to true in the end of initialize_buffers() and to false in invalidateOpenGLBuffers(). The need of
+   * this boolean comes from the need of a context from the OpenGLFunctions used in
+   * initialize_buffers().
+   * @see initialize_buffers()
+   * @see invalidateOpenGLBuffers()
+   */
+  mutable bool are_buffers_filled;
+  //!The rendering mode of the item.
+  //!@see RenderingMode
+  RenderingMode rendering_mode;
+  //!The default context menu.
+  QMenu* defaultContextMenu;
+  /*! Contains the previous RenderingMode.
+   * This is used to determine if invalidateOpenGLBuffers should be called or not
+   * in certain cases.
+   * @see invalidateOpenGLBuffers()*/
+  RenderingMode prev_shading;
+  /*! \todo replace it by RenderingMode().
+   * \brief
+   *  Contains the current RenderingMode.
+   * This is used to determine if invalidateOpenGLBuffers should be called or not
+   * in certain cases.
+   * @see invalidateOpenGLBuffers()*/
+  RenderingMode cur_shading;
+  //!Contains the size of the vector of VBOs
+  int buffersSize;
+  //!Contains the size of the map of VAOs
+  int vaosSize;
+  //!Contains the VBOs
+  mutable std::vector<QOpenGLBuffer> buffers;
+  /*! Contains the VAOs.
+   */
+  std::vector<QOpenGLVertexArrayObject*> vaos;
+  //!Adds a VAO to the Map.
+  void addVaos(int i)
+  {
+      QOpenGLVertexArrayObject* n_vao = new QOpenGLVertexArrayObject();
+      vaos[i] = n_vao;
+  }
+
+  //! Used pass data to the shader.
+  int vertexLoc;
+  //! Used pass data to the shader.
+  int normalLoc;
+  //! Used pass data to the shader.
+  int colorLoc;
+  /*! Fills the VBOs with data. Must be called after each call to #compute_elements().
+   * @see compute_elements()
+   */
+  void initialize_buffers(){}
+
+  /*! Collects all the data for the shaders. Must be called in #invalidateOpenGLBuffers().
+   * @see invalidateOpenGLBuffers().
+   */
+  void compute_elements(){}
+  /*! Passes all the uniform data to the shaders.
+   * According to program_name, this data may change.
+   */
+  void attrib_buffers(CGAL::Three::Viewer_interface*, int program_name) const;
+
+  /*! Compatibility function. Calls `viewer->getShaderProgram()`. */
+  virtual QOpenGLShaderProgram* getShaderProgram(int name , CGAL::Three::Viewer_interface *viewer = 0) const;
+}; // end class Scene_item
+}
+}
+
+#include <QMetaType>
+Q_DECLARE_METATYPE(CGAL::Three::Scene_item*)
+
+#endif // SCENE_ITEM_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item_config.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item_config.h
new file mode 100644
index 0000000..6e7254a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Scene_item_config.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2009-2011  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU
+
+#ifndef SCENE_ITEM_CONFIG_H
+#define SCENE_ITEM_CONFIG_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef demo_framework_EXPORTS
+#  define scene_item_EXPORTS
+#endif
+
+#ifdef scene_item_EXPORTS
+#  define SCENE_ITEM_EXPORT Q_DECL_EXPORT
+#else
+#  define SCENE_ITEM_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SCENE_ITEM_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_config.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_config.h
new file mode 100644
index 0000000..cff0ae1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_config.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2012-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU, Maxime Gimeno
+
+#ifndef VIEWER_CONFIG_H
+#define VIEWER_CONFIG_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef demo_framework_EXPORTS
+#  define viewer_EXPORTS
+#endif
+
+#ifdef viewer_EXPORTS
+#  define VIEWER_EXPORT Q_DECL_EXPORT
+#else
+#  define VIEWER_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // VIEWER_CONFIG_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_interface.h b/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_interface.h
new file mode 100644
index 0000000..e99b5bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Three/Viewer_interface.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2012-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent RINEAU, Maxime Gimeno
+
+#ifndef VIEWER_INTERFACE_H
+#define VIEWER_INTERFACE_H
+
+#include <QGLViewer/qglviewer.h>
+#include <QWidget>
+#include <QPoint>
+#include <QOpenGLFunctions_2_1>
+#include <CGAL/Qt/CreateOpenGLContext.h>
+// forward declarations
+class QWidget;
+class QMouseEvent;
+class QKeyEvent;
+class QOpenGLShaderProgram;
+
+//! \file Viewer_interface.h
+#include <CGAL/Three/Viewer_config.h> // for VIEWER_EXPORT
+namespace CGAL{
+namespace Three{
+class Scene_draw_interface;
+//! Base class to interact with the viewer from the plugins, the items and the scene.
+class VIEWER_EXPORT Viewer_interface : public QGLViewer, public QOpenGLFunctions_2_1 {
+
+  Q_OBJECT
+
+public:
+ /*!
+   * \brief The OpenGL_program_IDs enum
+   * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attrib_buffers().
+   *@see getShaderProgram
+   * @see attrib_buffers
+   */
+  enum OpenGL_program_IDs
+  {
+   PROGRAM_WITH_LIGHT = 0,      /** Used to render a surface or edge affected by the light. It uses a per fragment lighting model, and renders brighter the selected item.*/
+   PROGRAM_WITHOUT_LIGHT,       /** Used to render a polygon edge or points. It renders in a uniform color and is not affected by light. It renders the selected item in black.*/
+   PROGRAM_NO_SELECTION,        /** Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection.*/
+   PROGRAM_WITH_TEXTURE,        /** Used to render a textured polyhedron. Affected by light.*/
+   PROGRAM_PLANE_TWO_FACES,     /** Used to render a two-faced plane. The two faces have a different color. Not affected by light.*/
+   PROGRAM_WITH_TEXTURED_EDGES, /** Used to render the edges of a textured polyhedorn. Not affected by light.*/
+   PROGRAM_INSTANCED,           /** Used to display instanced rendered spheres.Affected by light.*/
+   PROGRAM_INSTANCED_WIRE,      /** Used to display instanced rendered wired spheres. Not affected by light.*/
+   PROGRAM_C3T3,                /** Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light.*/
+   PROGRAM_C3T3_EDGES,          /** Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light.*/
+   NB_OF_PROGRAMS               /** Holds the number of different programs in this enum.*/
+  };
+
+  Viewer_interface(QWidget* parent) : QGLViewer(CGAL::Qt::createOpenGLContext(), parent) {}
+  virtual ~Viewer_interface() {}
+
+  //! Sets the scene for the viewer.
+  virtual void setScene(CGAL::Three::Scene_draw_interface* scene) = 0;
+  //! @returns the antialiasing state.
+  virtual bool antiAliasing() const = 0;
+  
+  // Those two functions are defined in Viewer.cpp
+  //!Sets the position and orientation of a frame using a QString.
+  //!@returns true if it worked.
+  static bool readFrame(QString, qglviewer::Frame&);
+  //!@returns a QString contining the position and orientation of a frame.
+  static QString dumpFrame(const qglviewer::Frame&);
+  //! @returns the fastDrawing state.
+  virtual bool inFastDrawing() const = 0;
+
+  /*! Passes all the uniform data to the shaders.
+   * According to program_name, this data may change.
+   * @see OpenGL_program_IDs
+   */
+  virtual void attrib_buffers(int program_name) const = 0;
+
+  /*! Returns a program according to name.
+   * If the program does not exist yet, it is created and stored in shader_programs.
+   * @see OpenGL_program_IDs
+   * @returns a pointer to the corresponding program.*/
+  virtual QOpenGLShaderProgram* getShaderProgram(int name) const = 0;
+
+  //!Allows OpenGL 2.1 context to get access to glDrawArraysInstanced.
+  typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+  //!Allows OpenGL 2.1 context to get access to glVertexAttribDivisor.
+  typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+  //!Allows OpenGL 2.1 context to get access to glVertexAttribDivisor.
+  typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint target, GLuint attachment, GLuint textarget, GLuint texture, GLint level);
+  //!Allows OpenGL 2.1 context to get access to gkFrameBufferTexture2D.
+  PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced;
+  //!Allows OpenGL 2.1 context to get access to glVertexAttribDivisor.
+  PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor;
+  //!Allows OpenGL 2.1 context to get access to gkFrameBufferTexture2D.
+  PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2D;
+  //!@returns true if glVertexAttribDivisor, and glDrawArraysInstanced are found.
+  //! Used by the items to avoid SEGFAULT.
+  bool extension_is_found;
+  //!The matrix used for the picking.
+  GLfloat pickMatrix_[16];
+  //!Sets the binding for SHIFT+LEFT CLICK to SELECT (initially used in Scene_polyhedron_selection_item.h)
+  void setBindingSelect()
+  {
+#if QGLVIEWER_VERSION >= 0x020501
+    setMouseBinding(::Qt::ShiftModifier, ::Qt::LeftButton, SELECT);
+#else
+    setMouseBinding(::Qt::SHIFT + ::Qt::LeftButton, SELECT);
+#endif
+  }
+  //!Sets the binding for SHIFT+LEFT CLICK to NO_CLICK_ACTION (initially used in Scene_polyhedron_selection_item.h)
+  void setNoBinding()
+  {
+#if QGLVIEWER_VERSION >= 0x020501
+    setMouseBinding(::Qt::ShiftModifier, ::Qt::LeftButton, NO_CLICK_ACTION);
+#else
+    setMouseBinding(::Qt::SHIFT + ::Qt::LeftButton, NO_CLICK_ACTION);
+#endif
+  }
+
+Q_SIGNALS:
+  //!Defined automatically in moc.
+  void selected(int);
+  //!Defined automatically in moc.
+  void requestContextMenu(QPoint global_pos);
+  //!Defined automatically in moc.
+  void selectedPoint(double, double, double);
+  //!Defined automatically in moc.
+  void selectionRay(double, double, double, double, double, double);
+
+public Q_SLOTS:
+  //! Sets the antialiasing to true or false.
+  virtual void setAntiAliasing(bool b) = 0;
+  //! If b is true, facets will be ligted from both internal and external sides.
+  //! If b is false, only the side that is exposed to the light source will be lighted.
+  virtual void setTwoSides(bool b) = 0;
+  //! If b is true, some items are displayed in a simplified version when moving the camera.
+  //! If b is false, items display is never altered, even when moving.
+  virtual void setFastDrawing(bool b) = 0;
+  //! Make the camera turn around.
+  virtual void turnCameraBy180Degres() = 0;
+  //! @returns a QString containing the position and orientation of the camera.
+  virtual QString dumpCameraCoordinates() = 0;
+//!Moves the camera to the new coordinates (position and orientation) through an animation.
+  virtual bool moveCameraToCoordinates(QString, 
+                                       float animation_duration = 0.5f) = 0;
+
+}; // end class Viewer_interface
+}
+}
+#endif // VIEWER_INTERFACE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Threetuple.h b/3rdparty/CGAL-4.8/include/CGAL/Threetuple.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Threetuple.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Threetuple.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Time_stamper.h b/3rdparty/CGAL-4.8/include/CGAL/Time_stamper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Time_stamper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Time_stamper.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Timer.h b/3rdparty/CGAL-4.8/include/CGAL/Timer.h
new file mode 100644
index 0000000..1a346b9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Timer.h
@@ -0,0 +1,131 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifndef CGAL_TIMER_H
+#define CGAL_TIMER_H 1
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+// SECTION: A Timer for User-Process Time
+// ========================================================================
+// 
+// DEFINITION
+// 
+// A timer `t' of type Timer is an object with a state. It is either
+// running or it is stopped. The state is controlled with `t.start()'
+// and `t.stop()'. The timer counts the time elapsed since its creation
+// or last reset. It counts only the time where it is in the running
+// state. The time information is given in seconds.
+
+class CGAL_EXPORT Timer {
+private:
+    double      elapsed;
+    double      started;
+    int         interv;
+    bool        running;
+
+#ifdef CGAL_HEADER_ONLY
+    static bool& get_static_timer_m_failed()
+    {
+      static bool m_failed = false;
+      return m_failed;
+    }
+#else // CGAL_HEADER_ONLY
+    static bool m_failed;
+    static bool& get_static_timer_m_failed()
+    { return CGAL::Timer::m_failed; }
+#endif // CGAL_HEADER_ONLY
+
+    double   user_process_time() const; // in seconds
+    double   compute_precision() const; // in seconds
+public:
+    Timer() : elapsed(0.0), started(0.0), interv(0), running(false) {}
+
+    void     start();
+    void     stop ();
+    void     reset();
+    bool     is_running() const { return running; }
+
+    double   time()       const;
+    int      intervals()  const { return interv; }
+    double   precision()  const;
+    // Returns timer precison. Computes it dynamically at first call.
+    // Returns -1.0 if timer system call fails, which, for a proper coded
+    // test towards precision leads to an immediate stop of an otherwise 
+    // infinite loop (fixed tolerance * total time >= precision).
+    double   max BOOST_PREVENT_MACRO_SUBSTITUTION ()        const;
+};
+
+
+// -----------------------------------------------------------------------
+
+// Member functions for Timer
+// ===========================
+
+inline void Timer::start() {
+    CGAL_precondition( ! running);
+    started = user_process_time();
+    running = true;
+    ++ interv;
+}
+
+inline void Timer::stop() {
+    CGAL_precondition( running);
+    double t = user_process_time();
+    elapsed += (t - started);
+    started = 0.0;
+    running = false;
+}
+
+inline void Timer::reset() {
+    interv  = 0;
+    elapsed = 0.0;
+    if (running) {
+	started = user_process_time();
+	++ interv;
+    } else {
+        started = 0.0;
+    }
+}
+
+inline double Timer::time() const {
+    if (running) {
+        double t = user_process_time();
+	return elapsed + (t - started);
+    }
+    return elapsed;
+}
+
+} //namespace CGAL
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Timer_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_TIMER_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Timer_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Timer_impl.h
new file mode 100644
index 0000000..e655a45
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Timer_impl.h
@@ -0,0 +1,139 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+// Determine if the POSIX function getrusage is available, otherwise
+// use the previous solution based on std::clock().
+// First, detect POSIX. We cannot reliably use "unistd.h",
+// but limits.h is part of the C standard.
+#include <climits>
+#ifdef _POSIX_ARG_MAX // now that should be POSIX
+#include <unistd.h>
+#ifdef _POSIX_VERSION
+#ifdef _XOPEN_UNIX // XSI: X/Open System Interfaces Extension
+#define CGAL__GETRUSAGE 1
+#endif
+#endif
+#endif
+
+
+#ifdef CGAL__GETRUSAGE
+// types, function prototype and constants for the POSIX function
+// int getrusage (int who, struct rusage *usage);
+#include <sys/resource.h>
+// For the numerical limits
+#else //  CGAL__GETRUSAGE //
+// used for clock()
+#include <ctime>
+#endif //  CGAL__GETRUSAGE //
+
+// For the numerical limits
+#include <cfloat>
+
+namespace CGAL {
+
+// Member functions for Timer
+// =====================================
+
+CGAL_INLINE_FUNCTION
+double Timer::user_process_time() const {
+    // Depends on the operating system.
+    // Returns a (weakly ;-) monotone increasing time in seconds (with
+    // possible wrap-around in case of overflow, see max()), or 0.0
+    // if the system call for the time failed. If the system call
+    // failed the static flag 'm_failed' is set and can be used
+    // by the caller.
+#ifdef CGAL__GETRUSAGE
+    struct rusage usage;
+    int ret = getrusage( RUSAGE_SELF, &usage);
+    CGAL_warning_msg( ret == 0, "Call to getrusage() in class CGAL::Timer "
+                      "failed - timings will be 0.");
+    if ( ret == 0) {
+        return double( usage.ru_utime.tv_sec)               // seconds
+             + double( usage.ru_utime.tv_usec) / 1000000.0; // microseconds
+    }
+#else // CGAL__GETRUSAGE //
+    std::clock_t clk = std::clock();
+    CGAL_warning_msg( clk != (std::clock_t)-1,
+        "Call to clock() in class CGAL::Timer failed - timings will be 0.");
+    if ( clk != (std::clock_t)-1) {
+        return double(clk) / CLOCKS_PER_SEC;
+    }
+#endif // CGAL__GETRUSAGE //
+    get_static_timer_m_failed() = true;
+    return 0.0;
+}
+
+CGAL_INLINE_FUNCTION
+double Timer::compute_precision() const {
+    // Computes timer precision in seconds dynamically. Note that
+    // the timer system call is probably non-trivial and will show
+    // up in this time here (probably for one call). But that is just
+    // fine that the call to the timer itself if reported as noise
+    // in the precision.
+    double min_res = DBL_MAX;
+    for ( int i = 0; i < 5; ++i) {
+        double current = user_process_time();
+        if ( get_static_timer_m_failed() )
+            return -1.0;
+        double next    = user_process_time();
+        while ( current >= next) { // wait until timer increases
+            next = user_process_time();
+            if ( get_static_timer_m_failed() )
+                return -1.0;
+        }
+        // Get the minimum timing difference of all runs.
+        if ( min_res > next - current)
+            min_res = next - current;
+    }
+    return min_res;
+}
+
+CGAL_INLINE_FUNCTION
+double Timer::precision() const {
+    // computes precision upon first call
+    // returns -1.0 if timer system call fails.
+    static double prec = compute_precision();
+    return prec;
+}
+
+CGAL_INLINE_FUNCTION
+double Timer::max BOOST_PREVENT_MACRO_SUBSTITUTION () const {
+    // Depends on the operating system.
+#ifdef CGAL__GETRUSAGE
+    return DBL_MAX;
+#else // CGAL__GETRUSAGE //
+    return 2146.0;
+#endif // CGAL__GETRUSAGE //
+}
+
+} //namespace CGAL
+
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tools/Counter.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/Counter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tools/Counter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tools/Counter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tools/Label.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/Label.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tools/Label.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tools/Label.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Tools/Log.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/Log.h
new file mode 100644
index 0000000..78aaef5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Tools/Log.h
@@ -0,0 +1,188 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_LOG_H_
+#define CGAL_LOG_H_
+#include <CGAL/basic.h>
+#include <CGAL/Tools/utility_macros.h>
+#include <iostream>
+#include <fstream>
+#include <ios>
+
+#if defined(BOOST_MSVC)
+// Disable the warning about dll-interface needed for std::ofstream members
+// of Log::State.
+#  pragma warning(push)
+#  pragma warning(disable:4251)
+#endif
+
+namespace CGAL {
+
+class Log
+{
+public: 
+  enum Level {NONE=0, SOME=2, LOTS=3};
+  
+  enum Target {COUT, FILE, DEVNULL};
+private:
+  struct CGAL_EXPORT State {
+    Target target_;
+    Level level_;
+    std::ofstream fstream_;
+    std::ofstream null_;
+    std::ofstream maple_;
+    bool maple_is_open_;
+    bool output_maple_;
+    State(){
+      level_= NONE;
+      target_= COUT;
+      null_.open("/dev/null");
+      //maple_.open("maple.log");
+      maple_is_open_=false;
+      output_maple_=true;
+    }
+  };
+  
+#ifdef CGAL_HEADER_ONLY
+  
+  static State& get_static_state()
+  {
+    static State state_;
+    return state_;
+  }
+
+#else // CGAL_HEADER_ONLY
+
+  CGAL_EXPORT static State state_;
+  static State& get_static_state()
+  { 
+    return state_; 
+  }
+
+#endif // CGAL_HEADER_ONLY
+
+public:
+  // The different types of logs supported
+  /*  MAPLE is a log which should be able to be fed directly in to
+      maple and preferably will produce obviously good or bad outwhen
+      when evaluated.
+  */
+
+  static Level level() {return get_static_state().level_;}
+  static void set_level(Level l) {get_static_state().level_=l;}
+ 
+
+  static std::ostream &stream(Level l) {
+    if (is_output(l)) {
+      if (get_static_state().target_== COUT) {
+	return std::cout;
+      }
+      else {
+	return get_static_state().fstream_;
+      }
+    }
+    else {
+      return get_static_state().null_;
+    }
+  }
+
+  static bool is_output(Level l) {
+    return l <= level();
+  }
+  static Target target() {return get_static_state().target_;}
+  static CGAL_SET(Target, target, get_static_state().target_=k);
+  static CGAL_SET(std::string, filename, get_static_state().fstream_.open(k.c_str()));
+
+  static bool is_output_maple(){return get_static_state().output_maple_;}
+  
+  static void set_output_maple(bool b) {
+    get_static_state().output_maple_=b;
+  }
+  std::ofstream &maple_stream() {
+    if (!get_static_state().maple_is_open_) {
+      get_static_state().maple_is_open_=true;
+      get_static_state().maple_.open("maple.log");
+    }
+    return get_static_state().maple_;
+  }
+private:
+  Log() {
+   
+  }
+};
+
+
+
+#ifndef CGAL_DISABLE_LOGGING
+#define CGAL_LOG(level, expr) if (CGAL::Log::is_output(level))\
+    { CGAL::Log::stream(level) << expr << std::flush;};
+#define CGAL_LOG_WRITE(level, expr) if (CGAL::Log::is_output(level))\
+{std::ostream &LOG_STREAM= CGAL::Log::stream(level); expr;}
+#define CGAL_ERROR(expr) std::cerr << expr << std::endl;
+#define CGAL_ERROR_WRITE(expr) {std::ostream &LOG_STREAM= std::cerr; expr; std::cerr << std::endl;}
+#define CGAL_SET_LOG_LEVEL(level) CGAL::Log::set_level(level);
+#define CGAL_GET_LOG_LEVEL CGAL::Log::level();
+
+template <class T>
+inline int CGAL_assertion_strip_unsigned(const T&t) {
+  return static_cast<int>(t);
+}
+
+
+/*inline int CGAL_assertion_strip_unsigned(size_t t) {
+  return static_cast<int>(t);
+  }*/
+
+#define CGAL_assert_equal(a,b) do {if (a != b) { CGAL_ERROR("" #a " = " << a); CGAL_ERROR("" #b " = " << b); CGAL_assertion(a ==b);} } while (0)
+#define CGAL_check_bounds(a,b,e) do {if (CGAL::CGAL_assertion_strip_unsigned(a) < CGAL::CGAL_assertion_strip_unsigned(b) || CGAL::CGAL_assertion_strip_unsigned(a) >=CGAL::CGAL_assertion_strip_unsigned(e)){ CGAL_ERROR("" #a " = " << a); CGAL_ERROR("[" #b "..." #e ") = [" << b << "..." << e << ")"); CGAL_error();} } while (0)
+
+#else
+#define CGAL_LOG(l,e)
+#define CGAL_LOG_WRITE(l,e)
+#define CGAL_ERROR(e)
+#define CGAL_ERROR_WRITE(e)
+#define CGAL_SET_LOG_LEVEL(l)
+#define CGAL_assert_equal(a,b) 
+#define CGAL_check_bounds(a,b,c)
+#endif
+
+struct Set_log_state{
+  Set_log_state(Log::Level l) {
+    old_level_= CGAL_GET_LOG_LEVEL;
+    CGAL_SET_LOG_LEVEL(l);
+  }
+  ~Set_log_state() {
+    CGAL_SET_LOG_LEVEL(old_level_);
+  }
+
+  Log::Level old_level_;
+};
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/Tools/Log_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Tools/Log_impl.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/Log_impl.h
new file mode 100644
index 0000000..566694f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Tools/Log_impl.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_HEADER_ONLY
+
+#if defined(BOOST_MSVC)
+#  pragma warning(disable:4251)
+#endif
+
+namespace CGAL {
+  
+Log::State Log::state_;
+} //namespace CGAL
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tools/chained_map.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/chained_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tools/chained_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tools/chained_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tools/utility_macros.h b/3rdparty/CGAL-4.8/include/CGAL/Tools/utility_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tools/utility_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tools/utility_macros.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Traits_with_offsets_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Traits_with_offsets_adaptor.h
new file mode 100644
index 0000000..14c80d8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Traits_with_offsets_adaptor.h
@@ -0,0 +1,92 @@
+// Copyright (c) 1999-2004,2006-2009,2014-2015   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
+//                 Nico Kruithof <Nico.Kruithof at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+//                 Aymeric Pellé <Aymeric.Pelle at sophia.inria.fr>
+#ifndef CGAL_TRAITS_WITH_OFFSETS_ADAPTOR_H
+#define CGAL_TRAITS_WITH_OFFSETS_ADAPTOR_H
+
+namespace CGAL {
+
+template < class K, class Functor_ >
+  class Traits_with_offsets_adaptor {
+  typedef K Kernel;
+  typedef Functor_ Functor;
+
+  typedef typename Kernel::Point_3       Point;
+  typedef typename Kernel::Offset        Offset;
+
+public:
+  typedef typename Kernel::Iso_cuboid_3  Iso_cuboid_3;
+  typedef typename Kernel::Construct_point_3 Construct_point_3;
+  typedef typename Functor::result_type result_type;
+
+  Traits_with_offsets_adaptor(const Iso_cuboid_3 * dom) : _domain(dom) { }
+
+  result_type operator()(const Point& p0, const Point& p1,
+      const Offset& o0, const Offset& o1) const {
+    return Functor()(pp(p0,o0),pp(p1,o1));
+  }
+  result_type operator()(const Point& p0, const Point& p1, const Point& p2,
+      const Offset& o0, const Offset& o1, const Offset& o2) const {
+    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2));
+  }
+  result_type operator()(const Point& p0, const Point& p1,
+      const Point& p2, const Point& p3,
+      const Offset& o0, const Offset& o1,
+      const Offset& o2, const Offset& o3) const {
+    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2),pp(p3,o3));
+  }
+  result_type operator()(const Point& p0, const Point& p1,
+      const Point& p2, const Point& p3, const Point& p4,
+      const Offset& o0, const Offset& o1, const Offset& o2,
+      const Offset& o3, const Offset& o4) const {
+    return Functor()(pp(p0,o0),pp(p1,o1),pp(p2,o2),
+	pp(p3,o3),pp(p4,o4));
+  }
+
+  result_type operator()(const Point& p0, const Point& p1) const {
+    return Functor()(p0, p1);
+  }
+  result_type operator()(const Point& p0, const Point& p1,
+      const Point& p2) const {
+    return Functor()(p0, p1, p2);
+  }
+  result_type operator()(const Point& p0, const Point& p1,
+      const Point& p2, const Point& p3) const {
+    return Functor()(p0, p1, p2, p3);
+  }
+  result_type operator()(const Point& p0, const Point& p1,
+      const Point& p2, const Point& p3, const Point& p4) const {
+    return Functor()(p0, p1, p2, p3, p4);
+  }
+
+protected:
+  Point pp(const Point &p, const Offset &o) const {
+    return Construct_point_3(*_domain)(p,o);
+  }
+ public:
+  const Iso_cuboid_3* _domain;
+};
+}  // namespace CGAL
+
+#endif /* CGAL_TRAITS_WITH_OFFSETS_ADAPTOR_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Transform_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Transform_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Transform_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Transform_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tree_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/Tree_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tree_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tree_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tree_base.h b/3rdparty/CGAL-4.8/include/CGAL/Tree_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tree_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tree_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Tree_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Tree_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Tree_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Tree_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangle_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2.h
new file mode 100644
index 0000000..75bceda
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2.h
@@ -0,0 +1,211 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_TRIANGLE_2_H
+#define CGAL_TRIANGLE_2_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_2.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Triangle_2 : public R_::Kernel_base::Triangle_2
+{
+  typedef typename R_::Point_2          Point_2;
+  typedef typename R_::Aff_transformation_2 Aff_transformation_2;
+  typedef typename R_::Kernel_base::Triangle_2  RTriangle_2;
+
+  typedef Triangle_2                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef RTriangle_2 Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_                          R;
+  typedef typename R::FT               FT;
+
+  Triangle_2() {}
+
+  Triangle_2(const RTriangle_2& t)
+      : RTriangle_2(t) {}
+
+  Triangle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
+      : RTriangle_2(typename R::Construct_triangle_2()(Return_base_tag(), p,q,r)) {}
+
+  FT
+  area() const
+  {
+    return R().compute_area_2_object()(vertex(0), vertex(1), vertex(2));
+  }
+
+  typename R::Orientation
+  orientation() const
+  {
+    return R().orientation_2_object()(vertex(0), vertex(1), vertex(2));
+  }
+
+  typename R::Bounded_side
+  bounded_side(const Point_2 &p) const
+  {
+    return R().bounded_side_2_object()(*this,p);
+  }
+
+  typename R::Oriented_side
+  oriented_side(const Point_2 &p) const
+  {
+    return R().oriented_side_2_object()(*this,p);
+  }
+
+  typename R::Boolean
+  operator==(const Triangle_2 &t) const
+  {
+    return R().equal_2_object()(*this,t);
+  }
+
+  typename R::Boolean
+  operator!=(const Triangle_2 &t) const
+  {
+    return !(*this == t);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
+  vertex(int i) const
+  {
+    return R().construct_vertex_2_object()(*this,i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
+  operator[](int i) const
+  {
+    return vertex(i);
+  }
+
+  typename R::Boolean
+  has_on_bounded_side(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_BOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_unbounded_side(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_UNBOUNDED_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_boundary(const Point_2 &p) const
+  {
+    return bounded_side(p) == ON_BOUNDARY;
+  }
+
+  typename R::Boolean
+  has_on_negative_side(const Point_2 &p) const
+  {
+    return oriented_side(p) == ON_NEGATIVE_SIDE;
+  }
+
+  typename R::Boolean
+  has_on_positive_side(const Point_2 &p) const
+  {
+    return oriented_side(p) == ON_POSITIVE_SIDE;
+  }
+
+  typename R::Boolean
+  is_degenerate() const
+  {
+    return R().collinear_2_object()(vertex(0), vertex(1), vertex(2));
+  }
+
+  Bbox_2
+  bbox() const
+  {
+    return R().construct_bbox_2_object()(*this);
+  }
+
+  Triangle_2
+  opposite() const
+  {
+    return R().construct_opposite_triangle_2_object()(*this);
+  }
+
+  Triangle_2
+  transform(const Aff_transformation_2 &t) const
+  {
+    return Triangle_2(t.transform(vertex(0)),
+                      t.transform(vertex(1)),
+                      t.transform(vertex(2)));
+  }
+
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Triangle_2<R> &t)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << t[0] << ' ' << t[1] << ' ' << t[2];
+    case IO::BINARY :
+        return os << t[0] << t[1]  << t[2];
+    default:
+        return os<< "Triangle_2(" << t[0] << ", "
+                 << t[1] << ", " << t[2] <<")";
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Triangle_2<R> &t)
+{
+    typename R::Point_2 p, q, r;
+
+    is >> p >> q >> r;
+
+    if (is)
+        t = Triangle_2<R>(p, q, r);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGLE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h
new file mode 100644
index 0000000..3dd2a9f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h
@@ -0,0 +1,339 @@
+// Copyright (c) 2002-2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Radu Ursu
+
+#ifndef CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
+#define CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
+
+#include <CGAL/Point_2.h>
+#include <CGAL/Segment_2.h>
+#include <CGAL/Triangle_2.h>
+#include <CGAL/Iso_rectangle_2.h>
+#include <CGAL/Segment_2_Segment_2_intersection.h>
+#include <CGAL/Intersection_traits_2.h>
+#include <CGAL/Segment_2_Iso_rectangle_2_intersection.h>
+
+#include <vector>
+#include <list>
+
+
+namespace CGAL{ namespace internal {
+
+  template <class K>
+  typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
+  intersection(const typename K::Triangle_2 &t, const typename K::Iso_rectangle_2 &r, const K& kk)
+  {
+    typedef typename K::FT FT;
+    typedef typename K::Segment_2 Segment;
+    typedef typename K::Triangle_2 Triangle;
+    typedef typename K::Point_2   Point;
+
+    FT xr1, yr1, xr2, yr2;  
+    bool position[3][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+    bool is_inside[3] = {false, false, false}; //true when a vertex is inside rectangle
+
+    xr1 = r.xmin(); xr2 = r.xmax();
+    yr1 = r.ymax(); yr2 = r.ymin();
+
+    Point upper_left, lower_right;
+    Point p[3]; //the vertices of triangle
+
+    upper_left = Point(xr1, yr1); //upper left
+    lower_right = Point(xr2, yr2); //lower right    
+    
+    p[0] = t.vertex(0);
+    p[1] = t.vertex(1);
+    p[2] = t.vertex(2);  
+
+    //check the points of the triangle
+    for(int i=0; i<3; i++){
+      if(!(compare_x(p[i], upper_left) == SMALLER))
+        if(!(compare_x(p[i], lower_right) == LARGER))
+          if(!(compare_y(p[i], upper_left) == LARGER))
+            if(!(compare_y(p[i], lower_right) == SMALLER))        
+              is_inside[i] = true; //the point is inside       
+            else        
+              position[i][2] = true; //South        
+          else      
+            position[i][0] = true; //North      
+        else
+        {
+          position[i][3] = true; //East
+          if(compare_y(p[i], upper_left) == LARGER)
+            position[i][0] = true; //North
+          else if(compare_y(p[i], lower_right) == SMALLER)
+            position[i][2] = true; //South
+        }
+      else
+      {
+        position[i][1] = true;  //West
+        if(compare_y(p[i], upper_left) == LARGER)
+          position[i][0] = true; //North
+        else if(compare_y(p[i], lower_right) == SMALLER)
+          position[i][2] = true; //South
+
+      }
+    }
+
+    //test if the triangle is completely to the left, right, below or above the rectangle
+    bool intersection = true; //true if it could be a intersection with the rectangle
+    for(int j=0; j<4; j++)
+      if(position[0][j] && position[1][j] && position[2][j] ){
+        intersection = false;
+        break;
+      }
+
+    if(intersection){
+      Segment s[4]; //the segments that identify the N, W, S, E  
+      bool outside = false;
+      bool status_in_list[3] = {false, false, false}; //true if the triangle's points are in the result vector
+      std::list<int> last_intersected;
+      int last_intersected_segment = 5; //could be 0=N, 1=W, 2=S, 3=E
+      last_intersected.push_back(5);
+      int status_intersected[4] = {0, 0, 0, 0}; //the number of intersections for each segment
+      std::vector<Point> result; //the vector containing the result vertices
+      int next; //the index of the next vertex
+
+      s[0] = Segment(Point(xr2, yr1), Point(xr1, yr1)); //N
+      s[1] = Segment(Point(xr1, yr1), Point(xr1, yr2)); //W  
+      s[2] = Segment(Point(xr1, yr2), Point(xr2, yr2)); //S
+      s[3] = Segment(Point(xr2, yr2), Point(xr2, yr1)); //E
+        
+      //assign to p[i] the vertices of the triangle in ccw order
+      if(t.orientation() == CGAL::CLOCKWISE)
+      {
+        p[0] = t.vertex(2);
+        p[2] = t.vertex(0);
+        
+        is_inside[0] = is_inside[2] ^ is_inside[0];
+        is_inside[2] = is_inside[2] ^ is_inside[0];
+        is_inside[0] = is_inside[0] ^ is_inside[2];
+
+        for(int i=0; i<4; i++){
+          position[0][i] = position[2][i] ^ position[0][i];
+          position[2][i] = position[2][i] ^ position[0][i];
+          position[0][i] = position[0][i] ^ position[2][i];
+        }
+      }
+
+      for(int index=0; index<3; index++) //for each vertex
+      {
+        next=(index+1)%3;
+        if(is_inside[index]){ // true if first is inside
+          if(!status_in_list[index]){  //if is not yet in the list
+            result.push_back(p[index]);
+            status_in_list[index] = true;
+          }
+          if(is_inside[next]){ //true if second is inside
+            //add the points in the vector    
+            if(!status_in_list[next]){ // if is not yet in the list
+              result.push_back(p[next]);
+              status_in_list[next] = true;
+            }
+          } else { //I'm going out, the second is outside
+            for(int j=0; j<4; j++) // for all directions
+              if(position[next][j]) // if it's a second point direction
+              {
+                //test for intersection
+                typename Intersection_traits<K, Segment, Segment>::result_type
+                  v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
+                if(v) {
+                  if(const Point *p_obj = intersect_get<Point>(v))
+                {
+                  //intersection found
+                  outside = true;
+                  result.push_back(*p_obj); //add the intersection point
+                  if(last_intersected.back()!=j)
+                    last_intersected.push_back(j);
+                  status_intersected[j]++;
+                }
+              }
+          }
+          }
+        } else { //the first point is outside      
+          for(int j=0; j<4; j++) // for all directions
+            if(position[index][j]) //watch only the first point directions
+            {
+              //test for intersection
+              typename Intersection_traits<K, Segment, Segment>::result_type
+                v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
+              if(v) {
+                if(const Point *p_obj = intersect_get<Point>(v))
+              {
+                //intersection found
+                outside = false;
+                last_intersected_segment = last_intersected.back();
+                if(last_intersected_segment != 5 && last_intersected_segment != j && status_intersected[j] == 0){
+                  //add the target of each rectangle segment in the list
+                  if(last_intersected_segment < j)
+                    while(last_intersected_segment < j){
+                      result.push_back(s[last_intersected_segment].target());
+                      last_intersected_segment++;
+                    }
+                  else{
+                    while(last_intersected_segment < 4){
+                      result.push_back(s[last_intersected_segment].target());
+                      last_intersected_segment++;
+                    }
+                    last_intersected_segment = 0;
+                    while(last_intersected_segment < j){
+                      result.push_back(s[last_intersected_segment].target());
+                      last_intersected_segment++;
+                    }
+                  }
+                }
+                result.push_back(*p_obj); //add the intersection point in the list
+                if(last_intersected.back()!=j)
+                  last_intersected.push_back(j);
+                status_intersected[j]++;
+                if(!is_inside[next]){ //if the second point is not inside search a second intersection point
+                  for(j=0; j<4; j++) // for all directions
+                    if(position[next][j])
+                    {
+                      //test for intersection
+                        typename Intersection_traits<K, Segment, Segment>
+                          ::result_type
+                          v = internal::intersection(Segment(p[index], p[next]), s[j], kk);
+                        if(v) {
+                          if(const Point *p_obj = intersect_get<Point>(v))
+                           //found the second intersection
+                      {
+                        outside = true;
+                        result.push_back(*p_obj);
+                        if(last_intersected.back()!=j)
+                          last_intersected.push_back(j);
+                        status_intersected[j]++;
+                      }
+                    }
+                      }
+                }//end if the second point is not inside
+              } 
+              } // end v
+            }
+        }//end else (the first point is outside)
+      }//endfor
+      if(outside){
+        std::list<int>::const_iterator it = last_intersected.begin();
+        while(*it == 5)
+          it++;
+        last_intersected_segment = *it;
+        int j = last_intersected.back();
+        if(last_intersected_segment != 5 && last_intersected_segment != j){
+          //add the target of each rectangle segment in the list
+          if(last_intersected_segment > j)
+            while(last_intersected_segment > j){
+              result.push_back(s[j].target());
+              j++;
+            }
+          else{
+            while(j<4){
+              result.push_back(s[j].target());
+              j++;
+            }
+            j = 0;
+            while(j<last_intersected_segment){
+              result.push_back(s[j].target());
+              j++;
+            }
+          }
+        }
+      }//end if(outside)
+
+      //test if were not intersections 
+      //between the triangle and the rectangle
+      if(status_intersected[0] == 0 && status_intersected[1] == 0 && 
+        status_intersected[2] == 0 && status_intersected[3] == 0)
+      {
+        //should test if the rectangle is inside the triangle
+        if(t.bounded_side(upper_left) == CGAL::ON_BOUNDED_SIDE){
+          for(int k=0; k<4; k++)
+            result.push_back(s[k].source());
+        }
+      }
+      //remove duplicated consecutive points
+      typename std::vector<Point>::iterator last = std::unique(result.begin(),result.end());
+      result.erase(last,result.end());
+      
+      switch(result.size()){
+        case 0:
+          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>();
+        case 1:
+          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(result[0]);
+        case 2:
+          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(Segment(result[0], result[1]));
+        case 3:
+          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(Triangle(result[0], result[1], result[2]));
+        default:
+          return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>(result);
+      }
+
+    }//end if(intersection)
+    return intersection_return<typename K::Intersect_2, Triangle, typename K::Iso_rectangle_2>();
+  }//end intersection
+  
+  template <class K>
+  typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
+  inline intersection(const typename K::Iso_rectangle_2 &r, const typename K::Triangle_2 &t, const K& k)
+  {
+    return intersection(t,r,k);
+  }
+  
+  template <class K>
+  bool do_intersect(
+    const typename K::Triangle_2 &tr,
+    const typename K::Iso_rectangle_2 &ir,
+    const K& k)
+  {
+    //1) check if at least one vertex of tr is not outside ir
+    //2) if not, check if at least on vertex of tr is not outside tr
+    
+    typename K::Has_on_unbounded_side_2 unbounded_side=k.has_on_unbounded_side_2_object();
+    typename K::Construct_vertex_2 vertex=k.construct_vertex_2_object();
+
+    for (int i=0;i<3;++i)
+      if ( !unbounded_side( ir,vertex(tr,i) ) ) return true;
+    for (int i=0;i<4;++i)
+      if ( !unbounded_side( tr,vertex(ir,i) ) ) return true;
+
+    typename K::Construct_segment_2 segment=k.construct_segment_2_object();
+    for (int i=0;i<3;++i)
+      if ( do_intersect(
+            segment(vertex(tr,i),vertex(tr,(i+1)%3)),
+            ir, k) ) return true;
+
+    return false;
+  }
+
+  template <class K>
+  inline bool do_intersect(
+    const typename K::Iso_rectangle_2 &ir,
+    const typename K::Triangle_2 &tr,
+    const K& k)
+  {
+    return do_intersect(tr,ir,k);
+  }
+  
+} //namespace internal
+
+CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
+CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
+  
+}//end namespace
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Line_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Line_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Line_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Line_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Point_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Point_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Point_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Point_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Ray_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Ray_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Ray_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Ray_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Segment_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Segment_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Segment_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Segment_2_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Triangle_2_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Triangle_2_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Triangle_2_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Triangle_2_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Triangle_2_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Triangle_2_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_2_Triangle_2_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_2_Triangle_2_intersection.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangle_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3.h
new file mode 100644
index 0000000..211a8b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3.h
@@ -0,0 +1,154 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_TRIANGLE_3_H
+#define CGAL_TRIANGLE_3_H
+
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Triangle_3 : public R_::Kernel_base::Triangle_3
+{
+  typedef typename R_::RT                    RT;
+  typedef typename R_::FT                    FT;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Plane_3               Plane_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Triangle_3                         Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<2>  Feature_dimension;
+
+  typedef typename R_::Kernel_base::Triangle_3  Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Triangle_3() {}
+
+  Triangle_3(const Rep& t)
+      : Rep(t) {}
+
+  Triangle_3(const Point_3& p, const Point_3& q, const Point_3& r)
+    : Rep(typename R::Construct_triangle_3()(Return_base_tag(), p, q, r)) {}
+
+  Triangle_3 transform(const Aff_transformation_3 &t) const
+  {
+    return Triangle_3(t.transform(this->vertex(0)),
+                      t.transform(this->vertex(1)),
+                      t.transform(this->vertex(2)));
+  }
+
+  Plane_3 supporting_plane() const
+  {
+    return R().construct_supporting_plane_3_object()(*this);
+  }
+
+  bool has_on(const Point_3 &p) const
+  {
+    return R().has_on_3_object()(*this, p);
+  }
+
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Triangle_3, int )>::type
+  vertex(int i) const
+  {
+    return R().construct_vertex_3_object()(*this, i);
+  }
+
+  typename cpp11::result_of<typename R::Construct_vertex_3( Triangle_3, int )>::type
+  operator[](int i) const
+  {
+    return vertex(i);
+  }
+
+  bool is_degenerate() const
+  {
+    return R().is_degenerate_3_object()(*this);
+  }
+
+  Bbox_3
+  bbox() const
+  {
+    return R().construct_bbox_3_object()(*this);
+  }
+
+  FT squared_area() const // TODO : use Qrt
+  {
+    return R().compute_squared_area_3_object()(*this);
+  }
+
+};
+
+
+template < class R >
+std::ostream &
+operator<<(std::ostream &os, const Triangle_3<R> &t)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << t[0] << ' ' << t[1] << ' ' << t[2];
+    case IO::BINARY :
+        return os << t[0]  << t[1]  << t[2];
+    default:
+        os << "Triangle_3(" << t[0] <<  ", " << t[1] <<   ", " << t[2] <<")";
+        return os;
+    }
+}
+
+template < class R >
+std::istream &
+operator>>(std::istream &is, Triangle_3<R> &t)
+{
+    typename R::Point_3 p, q, r;
+
+    is >> p >> q >> r;
+
+    if (is)
+        t = Triangle_3<R>(p, q, r);
+    return is;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGLE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Line_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Line_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Line_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Line_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Plane_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Plane_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Plane_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Plane_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Point_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Point_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Point_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Point_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Ray_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Ray_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Ray_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Ray_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Segment_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Segment_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Segment_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Segment_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Triangle_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Triangle_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Triangle_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Triangle_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Triangle_3_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Triangle_3_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_3_Triangle_3_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_3_Triangle_3_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangle_accessor_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangle_accessor_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangle_accessor_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangle_accessor_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangular_expansion_visibility_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangular_expansion_visibility_2.h
new file mode 100644
index 0000000..1e86cc8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangular_expansion_visibility_2.h
@@ -0,0 +1,713 @@
+// Copyright (c) 2013 Technical University Braunschweig (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s):  Michael Hemmer <michael.hemmer at cgal.org>
+//             
+
+#ifndef CGAL_TRIANGULAR_EXPANSION_VISIBILITY_2_H
+#define CGAL_TRIANGULAR_EXPANSION_VISIBILITY_2_H
+
+#include <CGAL/Arrangement_2.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Arr_observer.h>
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+template<class Arrangement_2_ , class RegularizationCategory = CGAL::Tag_true >
+class Triangular_expansion_visibility_2 {
+  typedef typename Arrangement_2_::Geometry_traits_2    Geometry_traits_2;
+  typedef typename Geometry_traits_2::Kernel            K;
+
+  typedef Triangular_expansion_visibility_2<
+    Arrangement_2_, RegularizationCategory>             Self;
+
+public:
+  typedef Arrangement_2_                                Arrangement_2;
+  typedef typename Arrangement_2::Traits_2              Traits_2;
+  typedef typename Arrangement_2::Halfedge              Halfedge;
+  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
+  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
+  typedef typename Arrangement_2::Edge_const_iterator   Edge_const_iterator;
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator
+    Ccb_halfedge_const_circulator;
+  typedef typename Arrangement_2::Ccb_halfedge_circulator
+    Ccb_halfedge_circulator;
+  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  typedef typename Arrangement_2::Face_handle           Face_handle;
+  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
+  typedef typename Arrangement_2::Vertex_handle         Vertex_handle;
+
+  typedef typename K::Point_2                           Point_2;
+  typedef typename Geometry_traits_2::Ray_2             Ray_2;
+  typedef typename Geometry_traits_2::Segment_2         Segment_2;
+  typedef typename Geometry_traits_2::Line_2            Line_2;
+  typedef typename Geometry_traits_2::Vector_2          Vector_2;
+  typedef typename Geometry_traits_2::Direction_2       Direction_2;
+  typedef typename Geometry_traits_2::FT                Number_type;
+  typedef typename Geometry_traits_2::Object_2          Object_2;
+
+  typedef RegularizationCategory                       Regularization_category;
+  
+  typedef CGAL::Tag_true                      Supports_general_polygon_category;
+  typedef CGAL::Tag_true                      Supports_simple_polygon_category;
+
+private:
+  typedef CGAL::Triangulation_vertex_base_2<K>                     Vb;
+  typedef CGAL::Constrained_triangulation_face_base_2<K>           Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vb,Fb>              TDS;
+  typedef CGAL::No_intersection_tag                                Itag;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
+
+  typedef std::pair<Point_2,Point_2>                               Constraint;
+
+  // Functor to create edge constraints for the CDT out of Halfedges
+  struct Make_constraint
+  {
+      typedef Constraint                                            result_type;
+
+      Constraint operator()(const Halfedge& edge) const {
+          return std::make_pair(edge.source()->point(),
+                                edge.target()->point());
+      }
+  };
+
+  // Observer to track any changes of the attached arrangement.
+  class Observer : public Arr_observer<Arrangement_2>
+  {
+      
+      typedef Arr_observer<Arrangement_2>                           Base;
+      typedef Observer                                              Self;
+
+
+  public:
+      bool has_changed;
+
+      Observer() : Base(), has_changed(false)
+      {}
+
+      Observer(const Arrangement_2& arr)
+          : Base(const_cast<Arrangement_2&>(arr)), has_changed(false)
+      {}
+
+      // Arr_observer interface
+
+      void after_attach() { has_changed = false; }
+
+
+      void after_global_change() { has_changed = true; }
+      void after_create_vertex(Vertex_handle) { has_changed = true; }
+      void after_create_boundary_vertex(Vertex_handle) { has_changed = true; }
+      void after_create_edge(Halfedge_handle) { has_changed = true; }
+      void after_modify_vertex(Vertex_handle) { has_changed = true; }
+      void after_modify_edge(Halfedge_handle) { has_changed = true; }
+      void after_split_edge(Halfedge_handle, Halfedge_handle) {
+          has_changed = true; }
+      void after_split_fictitious_edge(Halfedge_handle, Halfedge_handle) {
+          has_changed = true; }
+      void after_split_face(Face_handle, Face_handle, bool) {
+          has_changed = true; }
+      void after_split_outer_ccb(Face_handle, Ccb_halfedge_circulator,
+                                 Ccb_halfedge_circulator) {
+          has_changed = true; }
+      void after_split_inner_ccb(Face_handle, Ccb_halfedge_circulator,
+                                 Ccb_halfedge_circulator) {
+          has_changed = true; }
+      void after_add_outer_ccb(Ccb_halfedge_circulator) { has_changed = true; }
+      void after_add_inner_ccb(Ccb_halfedge_circulator) { has_changed = true; }
+      void after_add_isolated_vertex(Vertex_handle) { has_changed = true; }
+      void after_merge_edge(Halfedge_handle) { has_changed = true; }
+      void after_merge_fictitious_edge(Halfedge_handle) { has_changed = true; }
+      void after_merge_face(Face_handle) { has_changed = true; }
+      void after_merge_outer_ccb(Face_handle, Ccb_halfedge_circulator) {
+          has_changed = true; }
+      void after_merge_inner_ccb(Face_handle, Ccb_halfedge_circulator) {
+          has_changed = true; }
+      void after_move_outer_ccb(Ccb_halfedge_circulator) { has_changed = true; }
+      void after_move_inner_ccb(Ccb_halfedge_circulator) { has_changed = true; }
+      void after_move_isolated_vertex(Vertex_handle) { has_changed = true; }
+      void after_remove_vertex() { has_changed = true; }
+      void after_remove_edge() { has_changed = true; }
+      void after_remove_outer_ccb(Face_handle) { has_changed = true; }
+      void after_remove_inner_ccb(Face_handle) { has_changed = true; }
+  };
+  
+
+private:
+  const Arrangement_2* p_arr;
+
+  // May change during visibility computation
+  mutable Observer observer;
+  mutable boost::shared_ptr<CDT> p_cdt;
+  mutable std::vector<Segment_2> needles;
+
+  // Copy constructor and assignment not supported
+  Triangular_expansion_visibility_2(const Self&);
+  Self& operator= (const Self& );
+
+
+public: 
+  Triangular_expansion_visibility_2() : p_arr(NULL){}
+
+  /*! Constructor given an arrangement. */
+  Triangular_expansion_visibility_2 (const Arrangement_2& arr)
+    : p_arr(&arr), observer(arr)
+  {
+    init_cdt(); 
+  }
+
+  const std::string name() const { return std::string("T_visibility_2"); }
+
+
+  bool is_attached() const {
+    //std::cout << "is_attached" << std::endl;
+    return (p_arr != NULL);
+  }
+
+  void attach(const Arrangement_2& arr) {
+    if(p_arr != &arr){
+      p_arr = &arr;
+      observer.detach();
+      observer.attach(const_cast<Arrangement_2&>(arr));
+      init_cdt(); 
+    }   
+    //std::cout << "attach done" << std::endl;
+  }
+
+  void detach() {
+    //std::cout << "detach" << std::endl;
+    observer.detach();
+    p_arr = NULL; 
+    p_cdt.reset();
+  }
+
+  const Arrangement_2& arrangement_2() const {
+    return *p_arr;
+  }
+
+
+  template <typename VARR>
+  typename VARR::Face_handle
+  compute_visibility(const Point_2& q,
+                     const Face_const_handle face,
+                     VARR& out_arr )
+  const {
+    //std::cout << "query in face interior" << std::endl;
+
+    if(observer.has_changed) {
+        init_cdt();
+    }
+
+    out_arr.clear();
+    needles.clear();
+    CGAL_USE(face);
+    CGAL_assertion(!face->is_unbounded());
+
+
+    std::vector<Point_2> raw_output;
+    typename CDT::Face_handle fh = p_cdt->locate(q);
+
+    raw_output.push_back(fh->vertex(1)->point());
+    if(!p_cdt->is_constrained(get_edge(fh,0))){
+      //std::cout<< "edge 0 is not constrained" << std::endl;
+      expand_edge(
+          q,
+          fh->vertex(2)->point(),
+          fh->vertex(1)->point(),
+          fh,0,std::back_inserter(raw_output));
+    }
+
+    raw_output.push_back(fh->vertex(2)->point());
+    if(!p_cdt->is_constrained(get_edge(fh,1))){
+      //std::cout << "edge 1 is not constrained" << std::endl;
+      expand_edge(
+          q,
+          fh->vertex(0)->point(),
+          fh->vertex(2)->point(),
+          fh,1,std::back_inserter(raw_output));
+    }
+
+    raw_output.push_back(fh->vertex(0)->point());
+    if(!p_cdt->is_constrained(get_edge(fh,2))){
+      //std::cout << "edge 2 is not constrained" << std::endl;
+      expand_edge(
+          q,
+          fh->vertex(1)->point(),
+          fh->vertex(0)->point(),
+          fh,2,std::back_inserter(raw_output));
+    }
+
+
+    return output(raw_output,out_arr);
+  }
+
+  template <typename VARR>
+  typename VARR::Face_handle
+  compute_visibility(const Point_2& q,
+                     const Halfedge_const_handle he,
+                     VARR& out_arr)
+  const {
+    //std::cout << "visibility_region he" << std::endl;
+
+    if(observer.has_changed) {
+        init_cdt();
+    }
+
+    CGAL_assertion(!he->face()->is_unbounded());
+    out_arr.clear();
+    needles.clear();
+
+    std::vector<Point_2> raw_output;
+    typename CDT::Locate_type location;
+    int index;
+    typename CDT::Face_handle fh = p_cdt->locate(q,location,index);
+    CGAL_assertion(location == CDT::EDGE || location == CDT::VERTEX);
+    //the following code tries to figure out which triangle one should start in.
+
+
+    if(location == CDT::EDGE){
+      //std::cout << "query on edge" << std::endl;
+      // this is the easy part, there are only two possible faces
+      // index indicates the edge = vertex on the other side of the edge
+      // the next vertex in cw order should be the target of given edge
+      if(fh->vertex(p_cdt->cw(index))->point() != he->target()->point()){
+        //std::cout << "need to swap face" << std::endl;
+        // take face on the other side if this is not the case
+        typename CDT::Face_handle nfh = fh->neighbor(index);
+        index = nfh->index(fh);
+        fh = nfh;
+      }
+      CGAL_assertion(fh->vertex(p_cdt->cw(index))->point() == he->target()->point());
+      CGAL_assertion(!p_cdt->is_infinite(fh->vertex(index)));
+
+
+      // output the edge the query lies on
+      raw_output.push_back(he->source()->point());
+      raw_output.push_back(he->target()->point());
+
+      if(!p_cdt->is_constrained(get_edge(fh,p_cdt->ccw(index)))){
+        expand_edge(
+            q,
+            fh->vertex(index)->point(), //left
+            he->target()->point()        , //right
+            fh,
+            p_cdt->ccw(index),
+            std::back_inserter(raw_output));
+      }
+      raw_output.push_back(fh->vertex(index)->point());
+
+      if(!p_cdt->is_constrained(get_edge(fh,p_cdt->cw(index)))){
+        expand_edge(
+            q,
+            he->source()->point()        , //left
+            fh->vertex(index)->point(), //right
+            fh,
+            p_cdt->cw(index),
+            std::back_inserter(raw_output));
+      }
+    }
+
+    if(location == CDT::VERTEX){
+      //std::cout << "query on vertex" << std::endl;
+
+      //bool query_point_on_vertex_is_not_working_yet = false;
+      //CGAL_assertion(query_point_on_vertex_is_not_working_yet);
+
+      CGAL_assertion(q  ==  he->target()->point());
+      CGAL_assertion(fh->vertex(index)->point() ==  he->target()->point());
+
+      // push points that are seen anyway
+      // raw_output.push_back(he->source()->point()); inserted last
+      raw_output.push_back(he->target()->point());
+      raw_output.push_back(he->next()->target()->point());
+
+      // now start in the triangle that contains he->next()
+      while(
+            p_cdt->is_infinite(fh->vertex(p_cdt->ccw(index))) ||
+            he->next()->target()->point() !=
+            fh->vertex(p_cdt->ccw(index))->point()
+            )
+      {
+        typename CDT::Face_handle nfh = fh->neighbor(p_cdt->ccw(index));
+        int nindex = nfh->index(fh);
+        index = p_cdt->ccw(nindex);
+        fh = nfh;
+        CGAL_assertion(he->target()->point() == fh->vertex(index)->point());
+      }
+
+
+      CGAL_assertion(he->next()->source()->point() == fh->vertex(index)->point());
+      CGAL_assertion(he->next()->target()->point() ==
+             fh->vertex(p_cdt->ccw(index))->point());
+      CGAL_assertion(!p_cdt->is_infinite(fh));
+      CGAL_assertion(p_cdt->is_constrained(get_edge(fh,p_cdt->cw(index))));
+
+      while(he->source()->point() != fh->vertex(p_cdt->ccw(index))->point()){
+
+        if(!p_cdt->is_constrained(get_edge(fh,index))){
+          expand_edge(
+              q,
+              fh->vertex(p_cdt-> cw(index))->point(), //left
+              fh->vertex(p_cdt->ccw(index))->point(), //right
+              fh,
+              index,
+              std::back_inserter(raw_output));
+        }
+        // push left end point of edge into output
+        raw_output.push_back(fh->vertex(p_cdt-> cw(index))->point());
+
+        // take the next triangle around q in ccw order
+        typename CDT::Face_handle nfh = fh->neighbor(p_cdt->ccw(index));
+        int nindex = nfh->index(fh);
+        index = p_cdt->ccw(nindex);
+        fh = nfh;
+        CGAL_assertion(fh->vertex(index)->point() ==  he->target()->point());
+      }
+    }
+    return output(raw_output,out_arr);
+  }
+
+
+
+private:
+
+  typename CDT::Edge get_edge(typename CDT::Face_handle fh, int i) const {
+    return std::make_pair(fh,i);
+  }
+
+  Point_2 ray_seg_intersection(
+      const Point_2& q, const Point_2& b, // the ray 
+      const Point_2& s, const Point_2& t  // the segment
+    ) const {
+
+    Ray_2 ray(q,b);
+    Segment_2 seg(s,t);
+    CGAL_assertion(typename K::Do_intersect_2()(ray,seg));
+    CGAL::Object obj = typename K::Intersect_2()(ray,seg); 
+    Point_2 result =  object_cast<Point_2>(obj);
+    return result; 
+  }
+
+  void collect_needle(
+      const Point_2& q, 
+      const typename CDT::Vertex_handle vh, 
+      const typename CDT::Face_handle fh, 
+      int index)
+  const {
+
+    // the expanded edge should not be constrained 
+    CGAL_assertion(!p_cdt->is_constrained(get_edge(fh,index)));
+    CGAL_assertion(!p_cdt->is_infinite(fh));
+    // go into the new face  
+    const typename CDT::Face_handle nfh(fh->neighbor(index)); 
+    CGAL_assertion(!p_cdt->is_infinite(nfh));
+
+    // get indices of neighbors 
+    int nindex = nfh->index(fh); // index of new vertex and old face 
+    int rindex = p_cdt->ccw(nindex); // index of face behind right edge 
+    int lindex = p_cdt-> cw(nindex); // index of face behind left edge 
+    
+    // get vertices seen from entering edge 
+    const typename CDT::Vertex_handle nvh(nfh->vertex(nindex));
+    const typename CDT::Vertex_handle rvh(nfh->vertex(p_cdt->cw (nindex)));
+    const typename CDT::Vertex_handle lvh(nfh->vertex(p_cdt->ccw(nindex)));
+    CGAL_assertion(!p_cdt->is_infinite(nvh));
+    CGAL_assertion(!p_cdt->is_infinite(lvh));
+    CGAL_assertion(!p_cdt->is_infinite(rvh));
+    
+    // get edges seen from entering edge 
+    typename CDT::Edge re = get_edge(nfh,p_cdt->ccw(nindex));
+    typename CDT::Edge le = get_edge(nfh,p_cdt-> cw(nindex));
+     
+    // do orientation computation once for new vertex 
+    typename K::Orientation_2 orientation = 
+      p_cdt->geom_traits().orientation_2_object();
+    CGAL::Orientation orient = orientation(q,vh->point(),nvh->point());
+    
+    
+    //std::cout << "\n collect_needle" <<std::endl;
+    //std::cout << "q             "<< q << std::endl ;
+    //std::cout << "vh->point()  "<<  vh->point() << std::endl;  
+    //std::cout << "lvh->point()  "<< lvh->point() << std::endl ;
+    //std::cout << "nvh->point()  "<< nvh->point() << std::endl ;
+    //std::cout << "rvh->point()  "<< rvh->point() << std::endl<< std::endl;
+
+
+    switch ( orient ) {
+    case CGAL::COUNTERCLOCKWISE:
+      // looking on to the right edge 
+      if(p_cdt->is_constrained(re)) {
+        if(vh != rvh) {
+          Point_2 p = ray_seg_intersection(q, vh->point(),
+                                           nvh->point(), rvh->point());
+          //std::cout << vh->point() <<" -1- "<< p <<std::endl; 
+          needles.push_back(Segment_2(vh->point(),p));
+        }
+      } else {
+        collect_needle(q,vh,nfh,rindex);
+      }
+      break;
+    case CGAL::CLOCKWISE:
+      // looking on to the left edge 
+      if(p_cdt->is_constrained(le)){
+        if(vh != lvh){
+          Point_2 p = ray_seg_intersection(q, vh->point(),
+                                           nvh->point(), lvh->point());
+          //std::cout << vh->point() <<" -2- "<< p <<std::endl; 
+          needles.push_back(Segment_2(vh->point(),p));
+        }
+      } else {
+        collect_needle(q,vh,nfh,lindex);
+      }      
+      break;
+    default:
+      CGAL_assertion(orient == CGAL::COLLINEAR);
+      // looking on nvh, so it must be reported 
+      // if it wasn't already (triangles rotate around vh)    
+      if(vh != nvh){
+        //std::cout << vh->point() <<" -3- "<< nvh->point() <<std::endl; 
+        needles.push_back(Segment_2(vh->point(),nvh->point())); 
+      }
+      // but we may also contiue looking along the vertex 
+      if(!p_cdt->is_constrained(re)) {
+        collect_needle(q,nvh,nfh,rindex);
+      }
+      if(!p_cdt->is_constrained(le)) {
+        collect_needle(q,nvh,nfh,lindex);
+      }
+      break;
+    }
+  }
+
+  template<class OIT> 
+  OIT expand_edge(
+      const Point_2& q, 
+      const Point_2& left, 
+      const Point_2& right, 
+      typename CDT::Face_handle fh, 
+      int index, 
+      OIT oit)
+  const {
+
+    // the expanded edge should not be constrained 
+    CGAL_assertion(!p_cdt->is_constrained(get_edge(fh,index)));
+    CGAL_assertion(!p_cdt->is_infinite(fh));
+    
+    // go into the new face  
+    const typename CDT::Face_handle nfh(fh->neighbor(index)); 
+    CGAL_assertion(!p_cdt->is_infinite(nfh));
+
+    // get indices of neighbors 
+    int nindex = nfh->index(fh); // index of new vertex and old face 
+    int rindex = p_cdt->ccw(nindex); // index of face behind right edge 
+    int lindex = p_cdt-> cw(nindex); // index of face behind left edge 
+    
+    // get vertices seen from entering edge 
+    const typename CDT::Vertex_handle nvh(nfh->vertex(nindex));
+    const typename CDT::Vertex_handle rvh(nfh->vertex(p_cdt->cw (nindex)));
+    const typename CDT::Vertex_handle lvh(nfh->vertex(p_cdt->ccw(nindex)));
+    CGAL_assertion(!p_cdt->is_infinite(nvh));
+    CGAL_assertion(!p_cdt->is_infinite(lvh));
+    CGAL_assertion(!p_cdt->is_infinite(rvh));
+    
+    // get edges seen from entering edge 
+    typename CDT::Edge re = get_edge(nfh,p_cdt->ccw(nindex));
+    typename CDT::Edge le = get_edge(nfh,p_cdt-> cw(nindex));
+     
+    // do orientation computation once for new vertex 
+    typename K::Orientation_2 orientation = 
+      p_cdt->geom_traits().orientation_2_object();
+    CGAL::Orientation ro = orientation(q,right,nvh->point());
+    CGAL::Orientation lo = orientation(q,left ,nvh->point());
+    
+    CGAL_assertion(typename K::Orientation_2()(q,left ,lvh->point())
+           != CGAL::CLOCKWISE);
+    CGAL_assertion(typename K::Orientation_2()(q,right,rvh->point())
+           != CGAL::COUNTERCLOCKWISE);
+
+    //std::cout << (ro == CGAL::COUNTERCLOCKWISE) << " " <<
+    //(lo == CGAL::CLOCKWISE) << std::endl;
+    
+    //right edge is seen if new vertex is counter clockwise of right boarder 
+    if(ro == CGAL::COUNTERCLOCKWISE){
+      if(p_cdt->is_constrained(re)){
+        // the edge is constrained
+        // report intersection with right boarder ray 
+        // if it is not already the right vertex (already reported)
+        if(right != rvh->point()){
+          *oit++ = ray_seg_intersection(q,right,nvh->point(),rvh->point());
+        }
+        
+        // then report intersection with left boarder if it exists
+        if(lo == CGAL::COUNTERCLOCKWISE){
+          *oit++ = ray_seg_intersection(q,left,nvh->point(),rvh->point());
+        }
+      }else{
+        // the edge is not a constrained 
+        if(lo == CGAL::COUNTERCLOCKWISE){
+          // no split needed and return 
+          //std::cout<< "h1"<< std::endl;
+          oit = expand_edge(q,left,right,nfh,rindex,oit);
+          //std::cout<< "h1 done"<< std::endl;
+          return oit;          
+        }else{
+          // spliting at new vertex 
+          //std::cout<< "h2"<< std::endl;
+          *oit++ = expand_edge(q,nvh->point(),right,nfh,rindex,oit);
+          //std::cout<< "h2 done"<< std::endl;
+        }        
+      }
+    }
+    
+
+    //std::cout << "q             "<< q << std::endl ;
+    //std::cout << "lvh->point()  "<< lvh->point() << std::endl;  
+    //std::cout << "left          "<< left << std::endl  ;
+    //std::cout << "nvh->point()  "<< nvh->point() << std::endl ;
+    //std::cout << "right         "<< right << std::endl ;
+    //std::cout << "rvh->point()  "<< rvh->point() << std::endl<< std::endl;
+    
+    
+    // determin whether new vertex needs to be reported 
+    if(ro != CGAL::CLOCKWISE && lo != CGAL::COUNTERCLOCKWISE){
+      *oit++ = nvh->point(); 
+    }
+    if(!Regularization_category::value){
+      CGAL_assertion(!(ro == CGAL::COLLINEAR && lo == CGAL::COLLINEAR));
+      // we have to check whether a needle starts here. 
+      if(p_cdt->is_constrained(le) && !p_cdt->is_constrained(re)
+              && ro == CGAL::COLLINEAR)
+        collect_needle(q,nvh,nfh,rindex);
+
+      if(p_cdt->is_constrained(re) && !p_cdt->is_constrained(le)
+              && lo == CGAL::COLLINEAR)
+        collect_needle(q,nvh,nfh,lindex);    
+    }
+
+    //left edge is seen if new vertex is clockwise of left boarder 
+    if(lo == CGAL::CLOCKWISE){
+      if(p_cdt->is_constrained(le)){
+        // the edge is constrained
+        // report interesection with right boarder if exists 
+        if(ro == CGAL::CLOCKWISE){
+          *oit++ = ray_seg_intersection(q,right,nvh->point(),lvh->point());
+        }
+        // then report intersection with left boarder ray 
+        // if it is not already the left vertex (already reported)
+        if(left != lvh->point()){
+          *oit++ = ray_seg_intersection(q,left,nvh->point(),lvh->point());          
+        }
+        return oit; 
+      }else{
+        // the edge is not a constrained 
+        if(ro == CGAL::CLOCKWISE){
+          // no split needed and return
+          //std::cout<< "h3"<< std::endl;
+          oit = expand_edge(q,left,right,nfh,lindex,oit);
+          //std::cout<< "h3 done"<< std::endl;
+          return oit; 
+        }else{
+          // spliting at new vertex 
+          //std::cout<< "h4"<< std::endl;
+          oit = expand_edge(q,left,nvh->point(),nfh,lindex,oit);
+          //std::cout<< "h4 done"<< std::endl;
+          return oit;          
+        }        
+      }
+    }
+    
+    return oit;
+  }
+
+
+  template <typename VARR> 
+  typename VARR::Face_handle 
+  output(std::vector<Point_2>& raw_output, VARR& out_arr) const {
+
+    if(!needles.empty()){
+      std::vector<Segment_2> segments(needles.begin(),needles.end()); 
+      for(unsigned int i = 0; i < raw_output.size(); i++){
+//      //std::cout <<  raw_output[i] << " -- " 
+//                <<  raw_output[(i+1)%raw_output.size()] << std::endl; 
+        segments.push_back(Segment_2(raw_output[i],
+                                     raw_output[(i+1) % raw_output.size()]));
+      }
+
+      CGAL::insert_non_intersecting_curves(out_arr,
+                                           segments.begin(),
+                                           segments.end());
+
+    } else {
+      typename VARR::Vertex_handle v_last, v_first;
+      v_last = v_first = 
+        out_arr.insert_in_face_interior(raw_output[0],out_arr.unbounded_face());
+      
+      for(unsigned int i = 0; i < raw_output.size()-1; i++){
+//      std::cout <<  raw_output[i] << " -- "
+//                <<  raw_output[(i+1)%raw_output.size()] << std::endl;
+        if(raw_output[i] < raw_output[(i+1)]){
+          v_last = out_arr.insert_from_left_vertex (
+                             Segment_2(raw_output[i], raw_output[i+1]), v_last
+                           )->target();
+        } else {
+          v_last = out_arr.insert_from_right_vertex(
+                             Segment_2(raw_output[i], raw_output[i+1]), v_last
+                           )->target();
+        }        
+      }
+      out_arr.insert_at_vertices(
+                Segment_2(raw_output.front(), raw_output.back()),
+                v_last, v_first
+              );
+    }
+
+    CGAL_assertion(out_arr.number_of_faces() == 2);
+
+    if(out_arr.faces_begin()->is_unbounded())
+      return ++out_arr.faces_begin();
+    else
+      return out_arr.faces_begin();
+  }
+
+  void init_cdt() const {
+    //std::cout<< "==============" <<std::endl;
+    //std::cout<< "Input Polygon:" <<std::endl;
+
+    typedef typename boost::transform_iterator<Make_constraint,
+                                               Edge_const_iterator>        Iter;
+
+    Iter begin = boost::make_transform_iterator(p_arr->edges_begin(),
+                                                Make_constraint());
+
+    Iter end = boost::make_transform_iterator(p_arr->edges_end(),
+                                              Make_constraint());
+
+    //std::cout << "init_cdt new CDT" << std::endl;
+    p_cdt = boost::shared_ptr<CDT>(new CDT(begin, end));
+    observer.has_changed = false;
+    //std::cout << "init_cdt done" << std::endl;
+    //std::cout << std::endl;
+  }
+};
+
+} // namespace CGAL
+
+#endif // CGAL_TRIANGULAR_EXPANSION_VISIBILITY_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangular_field_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangular_field_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangular_field_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangular_field_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulated_mixed_complex_observer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulated_mixed_complex_observer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulated_mixed_complex_observer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulated_mixed_complex_observer_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation.h
new file mode 100644
index 0000000..11a22b5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation.h
@@ -0,0 +1,1331 @@
+// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)    : Samuel Hornus
+
+#ifndef CGAL_TRIANGULATION_H
+#define CGAL_TRIANGULATION_H
+
+#include <CGAL/internal/Triangulation/utilities.h>
+#include <CGAL/Triangulation_data_structure.h>
+#include <CGAL/Triangulation_full_cell.h>
+#include <CGAL/Triangulation_vertex.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/spatial_sort.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Default.h>
+
+#include <boost/iterator/filter_iterator.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace CGAL {
+
+// Iterator which iterates over vertex_handle's, but returns a point when
+// dereferenced. If the current 
+// vertex_handle vh == vh_where_point_should_be_substituted, it returns
+// "subtitute_point", otherwise, it returns vh->point()
+template<class VertexHandleConstIter>
+class Substitute_point_in_vertex_iterator 
+{
+  typedef typename std::iterator_traits<VertexHandleConstIter>::value_type Vertex_handle;
+  typedef typename Vertex_handle::value_type Vertex;
+  typedef typename Vertex::Point Point;
+
+public:
+  typedef Point const& result_type; // For result_of
+
+  Substitute_point_in_vertex_iterator(
+    Vertex_handle vh_where_point_should_be_substituted,
+    Point const *subtitute_point)
+  : vh_where_point_should_be_substituted_(vh_where_point_should_be_substituted)
+  , subtitute_point_(subtitute_point)
+  {}
+
+  result_type operator()(Vertex_handle vh) const
+  {
+    if (vh == vh_where_point_should_be_substituted_) 
+      return *subtitute_point_;
+    else
+      return vh->point();
+  }
+
+private:
+  Vertex_handle vh_where_point_should_be_substituted_;
+  Point const *subtitute_point_;
+
+};
+
+
+template <  class TriangulationTraits, class TDS_ = Default >
+class Triangulation
+{
+    typedef typename TriangulationTraits::Dimension Maximal_dimension_;
+    typedef typename Default::Get<TDS_, Triangulation_data_structure
+                    <   Maximal_dimension_,
+                        Triangulation_vertex<TriangulationTraits>,
+                        Triangulation_full_cell<TriangulationTraits> >
+                        >::type                     TDS;
+    typedef Triangulation<TriangulationTraits, TDS_> Self;
+    
+protected:
+    typedef typename TriangulationTraits::Flat_orientation_d Flat_orientation_d;
+    typedef typename TriangulationTraits::Construct_flat_orientation_d Construct_flat_orientation_d;
+    typedef typename TriangulationTraits::In_flat_orientation_d In_flat_orientation_d;
+    
+    // Wrapper
+    struct Coaffine_orientation_d 
+    {
+      boost::optional<Flat_orientation_d>* fop;
+      Construct_flat_orientation_d cfo;
+      In_flat_orientation_d ifo;
+
+      Coaffine_orientation_d(
+        boost::optional<Flat_orientation_d>& x, 
+        Construct_flat_orientation_d const&y, 
+        In_flat_orientation_d const&z)
+      : fop(&x), cfo(y), ifo(z) {}
+      
+      template<class Iter> 
+      CGAL::Orientation operator()(Iter a, Iter b) const
+      {
+        if (*fop)
+          return ifo(fop->get(),a,b);
+        *fop = cfo(a,b);
+        CGAL_assertion(ifo(fop->get(),a,b) == CGAL::POSITIVE);
+        return CGAL::POSITIVE;
+      }
+    };
+
+    void reset_flat_orientation()
+    {
+      if (current_dimension() == preset_flat_orientation_.first)
+      {
+        CGAL_assertion(preset_flat_orientation_.second != NULL);
+        flat_orientation_ = *preset_flat_orientation_.second;
+      }
+      else
+        flat_orientation_ = boost::none;
+    }
+
+    typedef typename TriangulationTraits::Orientation_d
+                                                    Orientation_d;
+
+public:
+
+    typedef TriangulationTraits                     Geom_traits;
+    typedef TDS                                     Triangulation_ds;
+
+    typedef typename TDS::Vertex                    Vertex;
+    typedef typename TDS::Full_cell                 Full_cell;
+    typedef typename TDS::Facet                     Facet;
+    typedef typename TDS::Face                      Face;
+
+    typedef Maximal_dimension_                      Maximal_dimension;
+    typedef typename Geom_traits::Point_d           Point;
+
+    typedef typename TDS::Vertex_handle            Vertex_handle;
+    typedef typename TDS::Vertex_iterator          Vertex_iterator;
+    typedef typename TDS::Vertex_const_handle      Vertex_const_handle;
+    typedef typename TDS::Vertex_const_iterator    Vertex_const_iterator;
+
+    typedef typename TDS::Full_cell_handle           Full_cell_handle;
+    typedef typename TDS::Full_cell_iterator         Full_cell_iterator;
+    typedef typename TDS::Full_cell_const_handle     Full_cell_const_handle;
+    typedef typename TDS::Full_cell_const_iterator   Full_cell_const_iterator;
+    
+    typedef typename TDS::Facet_iterator           Facet_iterator;
+
+    typedef typename TDS::size_type                size_type;
+    typedef typename TDS::difference_type          difference_type;
+
+    /// The type of location a new point is found lying on
+    enum  Locate_type
+    {
+          ON_VERTEX = 0 // simplex of dimension 0
+        , IN_FACE   = 1 // simplex of dimension in [ 1, |current_dimension()| - 2 ]
+        , IN_FACET  = 2 // simplex of dimension |current_dimension()| - 1
+        , IN_FULL_CELL  = 3 /// simplex of dimension |current_dimension()|
+        , OUTSIDE_CONVEX_HULL = 4
+        , OUTSIDE_AFFINE_HULL = 5
+    };
+
+    // Finite elements iterators
+
+    class Finiteness_predicate;
+
+    typedef boost::filter_iterator<Finiteness_predicate, Vertex_iterator>
+        Finite_vertex_iterator;
+    typedef boost::filter_iterator<Finiteness_predicate, Vertex_const_iterator>
+        Finite_vertex_const_iterator;
+    typedef boost::filter_iterator<Finiteness_predicate, Full_cell_iterator>
+        Finite_full_cell_iterator;
+    typedef boost::filter_iterator<Finiteness_predicate, Full_cell_const_iterator>
+        Finite_full_cell_const_iterator;
+    typedef boost::filter_iterator<Finiteness_predicate, Facet_iterator>
+        Finite_facet_iterator;
+
+protected: // DATA MEMBERS
+
+    Triangulation_ds                    tds_;
+    const Geom_traits                   kernel_;
+    Vertex_handle                       infinity_;
+    mutable std::vector<Oriented_side>  orientations_;
+    mutable boost::optional<Flat_orientation_d> flat_orientation_;
+    // The user can specify a Flat_orientation_d object to be used for 
+    // orienting simplices of a specific dimension 
+    // (= preset_flat_orientation_.first)
+    // preset_flat_orientation_.first = numeric_limits<int>::max() otherwise)
+    std::pair<int, const Flat_orientation_d *> preset_flat_orientation_;
+    // for stochastic walk in the locate() function:
+    mutable Random                      rng_;
+#ifdef CGAL_TRIANGULATION_STATISTICS
+    mutable unsigned long walk_size_;
+#endif
+
+protected: // HELPER FUNCTIONS
+
+    typedef CGAL::Iterator_project<
+        typename Full_cell::Vertex_handle_const_iterator,
+        internal::Triangulation::Point_from_vertex_handle<Vertex_handle, Point>
+    > Point_const_iterator;
+
+    Point_const_iterator points_begin(Full_cell_const_handle c) const
+        { return Point_const_iterator(c->vertices_begin()); }
+    Point_const_iterator points_end(Full_cell_const_handle c) const
+        { return Point_const_iterator(c->vertices_end()); }
+    Point_const_iterator points_begin(Full_cell_handle c) const
+        { return Point_const_iterator(c->vertices_begin()); }
+    Point_const_iterator points_end(Full_cell_handle c) const
+        { return Point_const_iterator(c->vertices_end()); }
+
+public:
+
+    //       FACETS OPERATIONS
+
+    Full_cell_handle full_cell(const Facet & f) const
+    {
+        return tds().full_cell(f);
+    }
+
+    int index_of_covertex(const Facet & f) const
+    {
+        return tds().index_of_covertex(f);
+    }
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - CREATION / CONSTRUCTORS
+
+    Triangulation(int dim, const Geom_traits k = Geom_traits())
+        : tds_(dim)
+        , kernel_(k)
+        , infinity_()
+        , preset_flat_orientation_((std::numeric_limits<int>::max)(),
+                                   (Flat_orientation_d*) NULL)
+        , rng_((long)0)
+#ifdef CGAL_TRIANGULATION_STATISTICS
+        ,walk_size_(0)
+#endif
+    {
+        clear();
+    }
+
+    // With this constructor,
+    // the user can specify a Flat_orientation_d object to be used for 
+    // orienting simplices of a specific dimension 
+    // (= preset_flat_orientation_.first)
+    // It it used for by dark triangulations created by DT::remove
+    Triangulation(
+      int dim,
+      const std::pair<int, const Flat_orientation_d *> &preset_flat_orientation, 
+      const Geom_traits k = Geom_traits())
+        : tds_(dim)
+        , kernel_(k)
+        , infinity_()
+        , preset_flat_orientation_(preset_flat_orientation)
+        , rng_((long)0)
+#ifdef CGAL_TRIANGULATION_STATISTICS
+        ,walk_size_(0)
+#endif
+    {
+        clear();
+    }
+    
+    Triangulation(const Triangulation & t2)
+        : tds_(t2.tds_)
+        , kernel_(t2.kernel_)
+        , infinity_()
+        , preset_flat_orientation_((std::numeric_limits<int>::max)(), 
+                                   (Flat_orientation_d*) NULL)
+        , rng_(t2.rng_)
+#ifdef CGAL_TRIANGULATION_STATISTICS
+        ,walk_size_(t2.walk_size_)
+#endif
+    {
+        // We find the vertex at infinity by scanning the vertices of both
+        // triangulations. This works because Compact_container garantees that
+        // the vertices in the copy (*this) are stored in the same order as in
+        // the original triangulation (t2)
+        infinity_ = vertices_begin();
+        Vertex_const_iterator inf2 = t2.vertices_begin();
+        while( inf2 != t2.infinite_vertex() )
+        {
+            ++infinity_;
+            ++inf2;
+        }
+        // A full_cell has at most 1 + maximal_dimension() facets:
+        orientations_.resize(1 + maximal_dimension());
+        // Our coaffine orientation predicates HAS state member variables
+        reset_flat_orientation();
+    }
+
+    ~Triangulation() {}
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ACCESS FUNCTIONS
+
+    /* These three function are no longer needed since we do not use them anymore
+       in the Delaunay_triangulation::remove. *But*, they may reappear in the future
+       if we manage to passe the information that flags/TDS_data is available or not
+       for marking simplices in Delaunay_triangulation::remove. This would be useful
+       to make it a little faster, instead of binary searching if a simplex is marked
+       or not... 
+    // NOT DOCUMENTED -- 
+    bool get_visited(Full_cell_handle s) const
+    {
+        return tds().get_visited(s);
+    }
+    // NOT DOCUMENTED -- 
+    bool get_visited(Full_cell_const_handle s) const
+    {
+        return tds().get_visited(s);
+    }
+
+    // NOT DOCUMENTED -- 
+    void set_visited(Full_cell_handle s, bool b) const
+    {
+        tds().set_visited(s, b);
+    } */
+
+    Coaffine_orientation_d coaffine_orientation_predicate() const
+    {
+      return Coaffine_orientation_d (
+        flat_orientation_, 
+        geom_traits().construct_flat_orientation_d_object(), 
+        geom_traits().in_flat_orientation_d_object()
+      );
+    }
+
+    const Triangulation_ds & tds() const
+    {
+        return tds_;
+    }
+
+    Triangulation_ds & tds()
+    {
+        return tds_;
+    }
+
+    const Geom_traits & geom_traits() const
+    {
+        return kernel_;
+    }
+
+    int maximal_dimension() const { return tds().maximal_dimension(); }
+    int current_dimension() const { return tds().current_dimension(); }
+
+    bool empty() const
+    {
+        return current_dimension() == -1;
+    }
+
+    size_type number_of_vertices() const
+    {
+        return tds().number_of_vertices() - 1;
+    }
+
+    size_type number_of_full_cells() const
+    {
+        return tds().number_of_full_cells();
+    }
+
+    Vertex_handle infinite_vertex() const
+    {
+        return infinity_;
+    }
+
+    Full_cell_handle infinite_full_cell() const
+    {
+        CGAL_assertion(infinite_vertex()->full_cell()->has_vertex(infinite_vertex()));
+        return infinite_vertex()->full_cell();
+    }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - NON CONSTANT-TIME ACCESS FUNCTIONS
+
+    size_type number_of_finite_full_cells() const
+    {
+        Full_cell_const_iterator s = full_cells_begin();
+        size_type result = number_of_full_cells();
+        for( ; s != full_cells_end(); ++s )
+        {
+            if( is_infinite(s) )
+                --result;
+        }
+        return result;
+    }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TRAVERSAL
+
+    Vertex_iterator vertices_begin() { return tds().vertices_begin(); }
+    Vertex_iterator vertices_end()   { return tds().vertices_end(); }
+
+    Vertex_const_iterator vertices_begin() const { return tds().vertices_begin(); }
+    Vertex_const_iterator vertices_end()   const { return tds().vertices_end(); }
+
+    Finite_vertex_iterator finite_vertices_begin()
+    { return Finite_vertex_iterator(Finiteness_predicate(*this), vertices_begin(), vertices_end()); }
+    Finite_vertex_iterator finite_vertices_end()
+    { return Finite_vertex_iterator(Finiteness_predicate(*this), vertices_end(), vertices_end()); }
+    Finite_vertex_const_iterator finite_vertices_begin() const
+    { return Finite_vertex_const_iterator(Finiteness_predicate(*this), vertices_begin(), vertices_end()); }
+    Finite_vertex_const_iterator finite_vertices_end() const
+    { return Finite_vertex_const_iterator(Finiteness_predicate(*this), vertices_end(), vertices_end()); }
+
+    Full_cell_iterator full_cells_begin() { return tds().full_cells_begin(); }
+    Full_cell_iterator full_cells_end()   { return tds().full_cells_end(); }
+
+    Full_cell_const_iterator full_cells_begin() const { return tds().full_cells_begin(); }
+    Full_cell_const_iterator full_cells_end()   const { return tds().full_cells_end(); }
+
+    Finite_full_cell_iterator finite_full_cells_begin()
+    { return Finite_full_cell_iterator(Finiteness_predicate(*this), full_cells_begin(), full_cells_end()); }
+    Finite_full_cell_iterator finite_full_cells_end()
+    { return Finite_full_cell_iterator(Finiteness_predicate(*this), full_cells_end(), full_cells_end()); }
+    Finite_full_cell_const_iterator finite_full_cells_begin() const
+    { return Finite_full_cell_const_iterator(Finiteness_predicate(*this), full_cells_begin(), full_cells_end()); }
+    Finite_full_cell_const_iterator finite_full_cells_end() const
+    { return Finite_full_cell_const_iterator(Finiteness_predicate(*this), full_cells_end(), full_cells_end()); }
+
+    Facet_iterator facets_begin() { return tds().facets_begin(); }
+    Facet_iterator facets_end() { return tds().facets_end(); }
+    Facet_iterator finite_facets_begin()
+    { return Finite_facet_iterator(Finiteness_predicate(*this), facets_begin(), facets_end()); }
+    Facet_iterator finite_facets_end()
+    { return Finite_facet_iterator(Finiteness_predicate(*this), facets_end(), facets_end()); }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SOME PREDICATE FUNCTORS
+
+    class Finiteness_predicate
+    {
+        const Self & t_;
+    public:
+        Finiteness_predicate(const Self & t) : t_(t) {}
+        template < class T >
+        bool operator()(const T & t) const
+        {
+            return ! t_.is_infinite(t);
+        }
+    };
+
+    class Point_equality_predicate
+    {
+        const Point & o_;
+    public:
+        Point_equality_predicate(const Point & o) : o_(o) {}
+        bool operator()(const Point & o) const { return  (o == o_ );}
+    };
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIMPLE QUERIES
+/*
+    bool is_vertex(const Point & p, Vertex_handle & v, Full_cell_handle hint = Full_cell_handle()) const
+    {
+        Locate_type lt;
+        Face f(maximal_dimension());
+        Facet ft;
+        Full_cell_handle s = locate(p, lt, f, ft, hint);
+        if( ON_VERTEX == lt )
+        {
+            v = s->vertex(f.index(0));
+            return true;
+        }
+        return false;
+    }
+
+    bool is_vertex(Vertex_const_handle v) const
+    {
+        return tds().is_vertex(v);
+    }
+
+    bool is_full_cell(Full_cell_const_handle s) const
+    {
+        return tds().is_full_cell(s);
+    }
+*/
+
+    bool is_infinite(Vertex_const_handle v) const
+    {
+        CGAL_precondition(Vertex_const_handle() != v);
+        return (infinite_vertex() == v);
+    }
+
+    bool is_infinite(const Vertex & v) const /* internal use, not documented */
+    {
+        return (&(*infinite_vertex()) == &v);
+    }
+
+    bool is_infinite(Full_cell_const_handle s) const
+    {
+        CGAL_precondition(Full_cell_const_handle() != s);
+        return is_infinite(*s);
+    }
+    bool is_infinite(const Full_cell & s) const /* internal use, not documented */
+    {
+        for(int i = 0; i <= current_dimension(); ++i)
+            if( is_infinite(s.vertex(i)) )
+                return true;
+        return false;
+    }
+    bool is_infinite(const Facet & ft) const
+    {
+        Full_cell_const_handle s = full_cell(ft);
+        CGAL_precondition(s != Full_cell_handle());
+        if( is_infinite(s) )
+            return (s->vertex(index_of_covertex(ft)) != infinite_vertex());
+        return false;
+    }
+
+    bool is_infinite(const Face & f) const
+    {
+        Full_cell_const_handle s = f.full_cell();
+        CGAL_precondition(s != Full_cell_handle());
+        if( is_infinite(s) )
+        {
+            Vertex_handle v;
+            for( int i(0); i<= f.face_dimension(); ++i)
+                if ( is_infinite( f.vertex(i) )) return true;
+        }
+        return false;
+    }
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ELEMENT GATHERING
+
+    
+    template< typename OutputIterator >
+    OutputIterator incident_full_cells(const Face & f, OutputIterator out) const
+    {
+        return tds().incident_full_cells(f, out);
+    }
+    template< typename OutputIterator >
+    OutputIterator incident_full_cells(Vertex_const_handle v, OutputIterator out) const
+    {
+        return tds().incident_full_cells(v, out);
+    }
+    template< typename OutputIterator >
+    OutputIterator star(const Face & f, OutputIterator out) const
+    {
+        return tds().star(f, out);
+    }
+
+    template< typename OutputIterator >
+    OutputIterator incident_faces(Vertex_const_handle v, int d, OutputIterator out)
+    {
+        return tds().incident_faces(v, d, out);
+    }
+    /*
+    template< typename OutputIterator, class Comparator >
+    OutputIterator incident_upper_faces( Vertex_const_handle v, int d,
+                                                OutputIterator out, Comparator cmp = Comparator())
+    {
+        return tds().incident_upper_faces(v, d, out, cmp);
+    }
+    template< typename OutputIterator >
+    OutputIterator incident_upper_faces( Vertex_const_handle v, int d,
+                                                OutputIterator out)
+    { // FIXME: uncomment this function, since it uses a comparator specific to
+       // *geometric* triangulation (taking infinite vertex into account)
+        internal::Triangulation::Compare_vertices_for_upper_face<Self> cmp(*this);
+        return tds().incident_upper_faces(v, d, out, cmp);
+    }
+    */
+    Orientation orientation(Full_cell_const_handle s, bool in_is_valid = false) const
+    {
+        if( ! in_is_valid )
+            CGAL_assertion( ! is_infinite(s) );
+        if( 0 == current_dimension() )
+            return POSITIVE;
+        if( current_dimension() == maximal_dimension() )
+        {
+            Orientation_d ori = geom_traits().orientation_d_object();
+            return ori(points_begin(s), points_begin(s) + 1 + current_dimension());
+        }
+        else
+        {
+            return coaffine_orientation_predicate()(points_begin(s), points_begin(s) + 1 + current_dimension());
+        }
+    }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UPDATE OPERATIONS
+
+    void clear()
+    {
+        tds_.clear();
+        infinity_ = tds().insert_increase_dimension();
+        // A full_cell has at most 1 + maximal_dimension() facets:
+        orientations_.resize(1 + maximal_dimension());
+        // Our coaffine orientation predicates HAS state member variables
+        reset_flat_orientation();
+#ifdef CGAL_TRIANGULATION_STATISTICS
+        walk_size_ = 0;
+#endif
+    }
+
+    void set_current_dimension(int d)
+    {
+        tds().set_current_dimension(d);
+    }
+
+    Full_cell_handle new_full_cell()
+    { 
+        return tds().new_full_cell();
+    }
+
+    Vertex_handle  new_vertex(const Point & p) 
+    {
+        return tds().new_vertex(p);
+    }
+
+    void set_neighbors(Full_cell_handle s, int i, Full_cell_handle s1, int j)
+    {
+        tds().set_neighbors(s, i, s1, j);
+    }
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
+
+    bool is_valid(bool = false, int = 0) const;
+    bool are_incident_full_cells_valid(Vertex_const_handle, bool = false, int = 0) const;
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT LOCATION
+
+protected:
+    template< typename OrientationPredicate >
+    Full_cell_handle do_locate(   const Point &, Locate_type &, Face &, Facet &,
+                                Full_cell_handle start,
+                                const OrientationPredicate & o) const;
+public:
+    Full_cell_handle locate(  const Point &, Locate_type &, Face &, Facet &,
+                            Full_cell_handle start = Full_cell_handle()) const;
+    Full_cell_handle locate(  const Point &, Locate_type &, Face &, Facet &,
+                            Vertex_handle) const;
+    Full_cell_handle locate(const Point & p, Full_cell_handle s = Full_cell_handle()) const;
+    Full_cell_handle locate(const Point & p, Vertex_handle v) const;
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - REMOVALS
+
+    Vertex_handle contract_face(const Point &, const Face &);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT INSERTION
+
+    template< typename ForwardIterator >
+    size_type insert(ForwardIterator start, ForwardIterator end)
+    {
+        size_type n = number_of_vertices();
+        std::vector<Point> points(start, end);
+        spatial_sort(points.begin(), points.end(), geom_traits());
+        Full_cell_handle hint = Full_cell_handle();
+        typename std::vector<Point>::const_iterator s = points.begin();
+        while( s != points.end() )
+        {
+            hint = insert(*s++, hint)->full_cell();
+        }
+        return number_of_vertices() - n;
+    }
+    Vertex_handle insert(const Point &, const Locate_type, const Face &, const Facet &, const Full_cell_handle);
+    Vertex_handle insert(const Point &, Full_cell_handle start = Full_cell_handle());
+    Vertex_handle insert(const Point &, Vertex_handle);
+    template< typename ForwardIterator >
+    Vertex_handle insert_in_hole(const Point & p, ForwardIterator start, ForwardIterator end, const Facet & ft)
+    {
+        Emptyset_iterator out;
+        return insert_in_hole(p, start, end, ft, out);
+    }
+    template< typename ForwardIterator, typename OutputIterator >
+    Vertex_handle insert_in_hole(const Point & p, ForwardIterator start, ForwardIterator end, const Facet & ft, 
+                                 OutputIterator out)
+    {
+        Vertex_handle v = tds().insert_in_hole(start, end, ft, out);
+        v->set_point(p);
+        return v;
+    }
+    Vertex_handle insert_in_face(const Point &, const Face &);
+    Vertex_handle insert_in_facet(const Point &, const Facet &);
+    Vertex_handle insert_in_full_cell(const Point &, Full_cell_handle);
+    Vertex_handle insert_outside_convex_hull_1(const Point &, Full_cell_handle);
+    Vertex_handle insert_outside_convex_hull(const Point &, Full_cell_handle);
+    Vertex_handle insert_outside_affine_hull(const Point &);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - FACET-TRAVERSAL PREDICATES
+
+    template< typename OrientationPredicate >
+    class Outside_convex_hull_traversal_predicate
+    {
+        Triangulation & t_;
+        const Point & p_;
+        OrientationPredicate const& ori_;
+        int cur_dim_;
+    public:
+        Outside_convex_hull_traversal_predicate(Triangulation & t, const Point & p,
+                                    OrientationPredicate const& ori)
+        : t_(t), p_(p), ori_(ori), cur_dim_(t.current_dimension()) {}
+        // FUTURE change parameter to const reference
+        bool operator()(Facet f) const
+        {
+            Full_cell_handle s = t_.full_cell(f);
+            const int i = t_.index_of_covertex(f);
+            Full_cell_handle n = s->neighbor(i);
+            if( ! t_.is_infinite(n) )
+                return false;
+            int inf_v_index = n->index(t_.infinite_vertex());
+            n->vertex(inf_v_index)->set_point(p_);
+            bool ok = (POSITIVE == ori_(t_.points_begin(n), t_.points_begin(n) + cur_dim_ + 1));
+            return ok;
+        }
+    };
+
+    // make sure all full_cells have positive orientation
+    void reorient_full_cells();
+
+}; // Triangulation<...>
+
+// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
+
+// CLASS MEMBER FUNCTIONS
+
+template < class TT, class TDS >
+void
+Triangulation<TT, TDS>
+::reorient_full_cells()
+{
+    if( current_dimension() < 1 )
+        return;
+    Full_cell_iterator sit = full_cells_begin();
+    Full_cell_iterator send = full_cells_end();
+    while( sit != send )
+    {
+        if( is_infinite(sit) && (1 == current_dimension()) )
+        {
+            ++sit;
+            continue;
+        }
+        sit->swap_vertices(current_dimension() - 1, current_dimension());
+        ++sit;
+    }
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+// - - - - - - - - - - - - - - - - - - - - - - - - THE REMOVAL METHODS
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::contract_face(const Point & p, const Face & f)
+{
+    CGAL_precondition( ! is_infinite(f) );
+    Vertex_handle v = tds().contract_face(f);
+    v->set_point(p);
+    CGAL_expensive_postcondition_msg(are_incident_full_cells_valid(v), "new point is not where it should be");
+    return v;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+// - - - - - - - - - - - - - - - - - - - - - - - - THE INSERTION METHODS
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert(const Point & p, const Locate_type lt, const Face & f, const Facet & ft, const Full_cell_handle s)
+{
+    switch( lt )
+    {
+        case IN_FULL_CELL:
+            return insert_in_full_cell(p, s);
+            break;
+        case OUTSIDE_CONVEX_HULL:
+            return insert_outside_convex_hull(p, s);
+            break;
+        case OUTSIDE_AFFINE_HULL:
+            return insert_outside_affine_hull(p);
+            break;
+        case IN_FACET:
+        {
+            return insert_in_facet(p, ft);
+            break;
+        }
+        case IN_FACE:
+            return insert_in_face(p, f);
+            break;
+        case ON_VERTEX:
+            s->vertex(f.index(0))->set_point(p);
+            return s->vertex(f.index(0));
+            break;
+    }
+    CGAL_assertion(false);
+    return Vertex_handle();
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert(const Point & p, Full_cell_handle start)
+{
+    Locate_type lt;
+    Face f(maximal_dimension());
+    Facet ft;
+    Full_cell_handle s = locate(p, lt, f, ft, start);
+    return insert(p, lt, f, ft, s);
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert(const Point & p, Vertex_handle v)
+{
+    if( Vertex_handle() == v )
+        v = infinite_vertex();
+    return insert(p, v->full_cell());
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_in_face(const Point & p, const Face & f)
+{
+    CGAL_precondition( ! is_infinite(f) );
+    Vertex_handle v = tds().insert_in_face(f);
+    v->set_point(p);
+    return v;
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_in_facet(const Point & p, const Facet & ft)
+{
+    CGAL_precondition( ! is_infinite(ft) );
+    Vertex_handle v = tds().insert_in_facet(ft);
+    v->set_point(p);
+    return v;
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_in_full_cell(const Point & p, Full_cell_handle s)
+{
+    CGAL_precondition( ! is_infinite(s) );
+    Vertex_handle v = tds().insert_in_full_cell(s);
+    v->set_point(p);
+    return v;
+}
+
+// NOT DOCUMENTED...
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_outside_convex_hull_1(const Point & p, Full_cell_handle s)
+{
+    // This is a special case for dimension 1, because in that case, the right
+    // infinite full_cell is not correctly oriented... (sice its first vertex is the
+    // infinite one...
+    CGAL_precondition( is_infinite(s) );
+    CGAL_precondition( 1 == current_dimension() );
+    int inf_v_index = s->index(infinite_vertex());
+    bool swap = (0 == s->neighbor(inf_v_index)->index(s));
+    Vertex_handle v = tds().insert_in_full_cell(s);
+    v->set_point(p);
+    if( swap )
+    {
+        s->swap_vertices(0, 1);
+    }
+    return v;
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_outside_convex_hull(const Point & p, Full_cell_handle s)
+{
+    if( 1 == current_dimension() )
+    {
+        return insert_outside_convex_hull_1(p, s);
+    }
+    CGAL_precondition( is_infinite(s) );
+    CGAL_assertion( current_dimension() >= 2 );
+    std::vector<Full_cell_handle> simps;
+    simps.reserve(64);
+    std::back_insert_iterator<std::vector<Full_cell_handle> > out(simps);
+    if( current_dimension() < maximal_dimension() )
+    {
+        Coaffine_orientation_d ori = coaffine_orientation_predicate();
+        Outside_convex_hull_traversal_predicate<Coaffine_orientation_d>
+            ochtp(*this, p, ori);
+        tds().gather_full_cells(s, ochtp, out);
+    }
+    else
+    {
+        Orientation_d ori = geom_traits().orientation_d_object();
+        Outside_convex_hull_traversal_predicate<Orientation_d>
+            ochtp(*this, p, ori);
+        tds().gather_full_cells(s, ochtp, out);
+    }
+    int inf_v_index = s->index(infinite_vertex());
+    Vertex_handle v = insert_in_hole(
+      p, simps.begin(), simps.end(), Facet(s, inf_v_index));
+    return v;
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Vertex_handle
+Triangulation<TT, TDS>
+::insert_outside_affine_hull(const Point & p)
+{
+    CGAL_precondition( current_dimension() < maximal_dimension() );
+    Vertex_handle v = tds().insert_increase_dimension(infinite_vertex());
+    // reset the orientation predicate:
+    reset_flat_orientation();
+    v->set_point(p);
+    if( current_dimension() >= 1 )
+    {
+        Full_cell_handle inf_v_cell = infinite_vertex()->full_cell();
+        int inf_v_index = inf_v_cell->index(infinite_vertex());
+        Full_cell_handle s = inf_v_cell->neighbor(inf_v_index);
+        Orientation o = orientation(s);
+        CGAL_assertion( COPLANAR != o );
+            if( NEGATIVE == o )
+                reorient_full_cells();
+    }
+    return v;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+// - - - - - - - - - - - - - - - - - - - - THE MAIN LOCATE(...) FUNCTION
+
+template < class TT, class TDS >
+template< typename OrientationPredicate >
+typename Triangulation<TT, TDS>::Full_cell_handle
+Triangulation<TT, TDS>
+::do_locate(   const Point & p, // query point
+            Locate_type & loc_type,// type of result (full_cell, face, vertex)
+            Face & face,// the face containing the query in its interior (when appropriate)
+            Facet & facet,// the facet containing the query in its interior (when appropriate)
+            const Full_cell_handle start// starting full_cell for the walk
+            , OrientationPredicate const& orientation_pred
+        ) const
+{
+    const int cur_dim = current_dimension();
+
+    if( cur_dim == -1 )
+    {
+        loc_type = OUTSIDE_AFFINE_HULL;
+        return Full_cell_handle();
+    }
+    else if( cur_dim == 0 )
+    {
+        Vertex_handle vit = infinite_full_cell()->neighbor(0)->vertex(0);
+        if( EQUAL != geom_traits().compare_lexicographically_d_object()(p, vit->point()) )
+        {
+            loc_type = OUTSIDE_AFFINE_HULL;
+            return Full_cell_handle();
+        }
+        else
+        {
+            loc_type = ON_VERTEX;
+            face.set_full_cell(vit->full_cell());
+            face.set_index(0, 0);
+            return vit->full_cell();
+        }
+    }
+
+    Full_cell_handle s;
+
+    // if we don't know where to start, we start from any bounded full_cell
+    if( Full_cell_handle() == start )
+    {
+        // THE HACK THAT NOBODY SHOULD DO... BUT DIFFICULT TO WORK AROUND
+        // THIS... TODO: WORK AROUND IT
+        Full_cell_handle inf_c = const_cast<Self*>(this)->infinite_full_cell();
+        int inf_v_index = inf_c->index(infinite_vertex());
+        s = inf_c->neighbor(inf_v_index);
+    }
+    else
+    {
+        s = start;
+        if( is_infinite(s) )
+        {
+            int inf_v_index = s->index(infinite_vertex());
+            s = s->neighbor(inf_v_index);
+        }
+    }
+
+    // Check if query |p| is outside the affine hull
+    if( cur_dim < maximal_dimension() )
+    {
+        if( ! geom_traits().contained_in_affine_hull_d_object()(
+            points_begin(s),
+            points_begin(s) + current_dimension() + 1,
+            p) )
+        {
+            loc_type = OUTSIDE_AFFINE_HULL;
+            return Full_cell_handle();
+        }
+    }
+
+    // we remember the |previous|ly visited full_cell to avoid the evaluation
+    // of one |orientation| predicate
+    Full_cell_handle previous = Full_cell_handle();
+    bool full_cell_not_found = true;
+    while(full_cell_not_found) // we walk until we locate the query point |p|
+    {
+    #ifdef CGAL_TRIANGULATION_STATISTICS
+        ++walk_size_;
+    #endif
+        // For the remembering stochastic walk, we need to start trying
+        // with a random index:
+        int j, i = rng_.get_int(0, cur_dim);
+        // we check |p| against all the full_cell's hyperplanes in turn
+       
+        for(j = 0; j <= cur_dim; ++j, i = (i + 1) % (cur_dim + 1) )
+        {
+            Full_cell_handle next = s->neighbor(i);
+            if( previous == next )
+            {   // no need to compute the orientation, we already know it
+                orientations_[i] = POSITIVE;
+                continue; // go to next full_cell's facet
+            }
+
+            Substitute_point_in_vertex_iterator<
+              typename Full_cell::Vertex_handle_const_iterator> 
+              spivi(s->vertex(i), &p);
+
+            orientations_[i] = orientation_pred(
+              boost::make_transform_iterator(s->vertices_begin(), spivi),
+              boost::make_transform_iterator(s->vertices_begin() + cur_dim + 1, 
+                                             spivi));
+
+            if( orientations_[i] != NEGATIVE )
+            {
+                // from this facet's point of view, we are inside the
+                // full_cell or on its boundary, so we continue to next facet
+                continue;
+            }
+
+            // At this point, we know that we have to jump to the |next|
+            // full_cell because orientation_[i] == NEGATIVE
+            previous = s;
+            s = next;
+            if( is_infinite(next) )
+            {   // we have arrived OUTSIDE the convex hull of the triangulation,
+                // so we stop the search
+                full_cell_not_found = false;
+                loc_type = OUTSIDE_CONVEX_HULL;
+                face.set_full_cell(s);
+            }
+            break;
+        } // end of the 'for' loop
+        if( ( cur_dim + 1 ) == j ) // we found the full_cell containing |p|
+            full_cell_not_found = false;
+    }
+    // Here, we know in which full_cell |p| is in.
+    // We now check more precisely where |p| landed:
+    // vertex, facet, face or full_cell.
+    if( ! is_infinite(s) )
+    {
+        face.set_full_cell(s);
+        int num(0);
+        int verts(0);
+        for(int i = 0; i < cur_dim; ++i)
+        {
+            if( orientations_[i] == COPLANAR )
+            {
+                ++num;
+                facet = Facet(s, i);
+            }
+            else
+                face.set_index(verts++, i);
+        }
+        //-- We could put the if{}else{} below in the loop above, but then we would
+        // need to test if (verts < cur_dim) many times... we do it only once
+        // here:
+        if( orientations_[cur_dim] == COPLANAR )
+        {
+            ++num;
+            facet = Facet(s, cur_dim);
+        }
+        else if( verts < cur_dim )
+            face.set_index(verts, cur_dim);
+        //-- end of remark above //
+        if( 0 == num )
+        {
+            loc_type = IN_FULL_CELL;
+            face.clear();
+        }
+        else if( cur_dim == num )
+            loc_type = ON_VERTEX;
+        else if( 1 == num )
+            loc_type = IN_FACET;
+        else
+            loc_type = IN_FACE;
+    }
+    return s;
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Full_cell_handle
+Triangulation<TT, TDS>
+::locate(   const Point & p, // query point
+            Locate_type & loc_type,// type of result (full_cell, face, vertex)
+            Face & face,// the face containing the query in its interior (when appropriate)
+            Facet & facet,// the facet containing the query in its interior (when appropriate)
+            Full_cell_handle start// starting full_cell for the walk
+        ) const
+{
+    if( current_dimension() == maximal_dimension() )
+    {
+        Orientation_d ori = geom_traits().orientation_d_object();
+        return do_locate(p, loc_type, face, facet, start, ori);
+    }
+    else
+        return do_locate(p, loc_type, face, facet, start, coaffine_orientation_predicate());
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+// - - - - - - - - - - - - - - - - - - - - the locate(...) variants
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Full_cell_handle
+Triangulation<TT, TDS>
+::locate(   const Point & p,
+            Locate_type & loc_type,
+            Face & face,
+            Facet & facet,
+            Vertex_handle start) const
+{
+    if( Vertex_handle() == start )
+        start = infinite_vertex();
+    return locate(p, loc_type, face, facet, start->full_cell());
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Full_cell_handle
+Triangulation<TT, TDS>
+::locate(const Point & p, Full_cell_handle s) const
+{
+    Locate_type lt;
+    Face face(maximal_dimension());
+    Facet facet;
+    return locate(p, lt, face, facet, s);
+}
+
+template < class TT, class TDS >
+typename Triangulation<TT, TDS>::Full_cell_handle
+Triangulation<TT, TDS>
+::locate(const Point & p, Vertex_handle v) const
+{
+    if( Vertex_handle() != v )
+        v = infinite_vertex();
+    return this->locate(p, v->full_cell());
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
+
+template < class TT, class TDS >
+bool
+Triangulation<TT, TDS>
+::is_valid(bool verbose, int level) const
+{ 
+    if( ! tds().is_valid(verbose, level) )
+        return false;
+
+    Full_cell_const_iterator c;
+    if( current_dimension() < 0 )
+        return true;
+    Orientation o;
+    for( c = full_cells_begin(); c != full_cells_end(); ++c )
+    {
+        if( is_infinite(c) )
+        {
+            if( current_dimension() > 1 )
+            {
+                int i = c->index( infinite_vertex() );
+                Full_cell_handle n = c->neighbor(i);
+                infinite_vertex()->set_point(n->vertex(c->mirror_index(i))->point());
+                o = - orientation(c, true);
+            }
+            else
+                o = POSITIVE;
+        }
+        else
+            o = orientation(c, true);
+        if( NEGATIVE == o )
+        {
+            if( verbose ) CGAL_warning_msg(false, "full_cell is not correctly oriented");
+            return false;
+        }
+        if( COPLANAR == o )
+        {
+            if( verbose ) CGAL_warning_msg(false, "full_cell is flat");
+            return false;
+        }
+    }
+    return true;
+}
+
+template < class TT, class TDS >
+bool Triangulation<TT, TDS>::are_incident_full_cells_valid(Vertex_const_handle v, bool verbose, int) const
+{
+    if( current_dimension() <= 0 )
+        return true;
+    typedef std::vector<Full_cell_const_handle> Simps;
+    Simps simps;
+    simps.reserve(64);
+    std::back_insert_iterator<Simps> out(simps);
+    incident_full_cells(v, out);
+    typename Simps::const_iterator sit = simps.begin();
+    for( ; sit != simps.end(); ++sit )
+    {
+        if( is_infinite(*sit) )
+            continue;
+        Orientation o = orientation(*sit);
+        if( NEGATIVE == o )
+        {
+            if( verbose ) CGAL_warning_msg(false, "full_cell is not correctly oriented");
+            return false;
+        }
+        if( COPLANAR == o )
+        {
+            if( verbose ) CGAL_warning_msg(false, "full_cell is flat");
+            return false;
+        }
+    }
+    return true;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// FUNCTIONS THAT ARE NOT MEMBER FUNCTIONS:
+
+template < class TT, class TDS >
+std::istream & 
+operator>>(std::istream & is, Triangulation<TT, TDS> & tr)
+  // reads :
+  // - the dimensions (maximal and current)
+  // - the number of finite vertices
+  // - the non combinatorial information on vertices (point, etc)
+  // - the number of full_cells
+  // - the full_cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each full_cell
+  // - the neighbors of each full_cell by their index in the preceding list
+{
+    typedef Triangulation<TT, TDS>            T;
+    typedef typename T::Vertex_handle         Vertex_handle;
+
+    // read current dimension and number of vertices
+    size_t n;
+    int cd;
+    if( is_ascii(is) )
+        is >> cd >> n;
+    else
+    {
+        read(is, cd);
+        read(is, n, io_Read_write());
+    }
+
+    CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation has too high dimension");
+
+    tr.clear();
+    tr.set_current_dimension(cd);
+
+    if( n == 0 )
+        return is;
+
+    std::vector<Vertex_handle> vertices;
+    vertices.resize(n+1);
+    vertices[0] = tr.infinite_vertex();
+    is >> (*vertices[0]);
+
+    // read the vertices:
+    size_t i(1);
+    while( i <= n )
+    {
+        vertices[i] = tr.new_vertex();
+        is >> (*vertices[i]); // read a vertex
+        ++i;
+    }
+
+    // now, read the combinatorial information
+   return tr.tds().read_full_cells(is, vertices);
+}
+
+template < class TT, class TDS >
+std::ostream & 
+operator<<(std::ostream & os, const Triangulation<TT, TDS> & tr)
+  // writes :
+  // - the dimensions (maximal and current)
+  // - the number of finite vertices
+  // - the non combinatorial information on vertices (point, etc)
+  // - the number of full_cells
+  // - the full_cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each full_cell
+  // - the neighbors of each full_cell by their index in the preceding list
+{
+    typedef Triangulation<TT, TDS> T;
+    typedef typename T::Vertex_const_handle         Vertex_handle;
+    typedef typename T::Vertex_const_iterator       Vertex_iterator;
+
+    // outputs dimensions and number of vertices
+    size_t n = tr.number_of_vertices();
+    if( is_ascii(os) )
+        os << tr.current_dimension() << std::endl << n << std::endl;
+    else
+    {
+        write(os, tr.current_dimension());
+        write(os, n, io_Read_write());
+    }
+
+    if( n == 0 )
+        return os;
+
+    size_t i(0);
+    // write the vertices
+    std::map<Vertex_handle, int> index_of_vertex;
+
+    // infinite vertex has index 0 (among all the vertices)
+    index_of_vertex[tr.infinite_vertex()] = i++;
+    os << *tr.infinite_vertex();
+    for( Vertex_iterator it = tr.vertices_begin(); it != tr.vertices_end(); ++it )
+    {
+        if( tr.is_infinite(it) )
+            continue;
+        os << *it; // write the vertex
+        index_of_vertex[it] = i++;
+    }
+    CGAL_assertion( i == n+1 );
+
+    // output the combinatorial information
+    return tr.tds().write_full_cells(os, index_of_vertex);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2.h
new file mode 100644
index 0000000..2ee47f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2.h
@@ -0,0 +1,3647 @@
+// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Olivier Devillers, Mariette Yvinec
+
+#ifndef CGAL_TRIANGULATION_2_H
+#define CGAL_TRIANGULATION_2_H
+
+#include <list>
+#include <vector>
+#include <map>
+#include <algorithm>
+#include <utility>
+#include <iostream>
+
+#include <CGAL/iterator.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/function_objects.h>
+
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Triangulation_utils_2.h>
+
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/Triangulation_vertex_base_2.h>
+#include <CGAL/Triangulation_face_base_2.h>
+#include <CGAL/Triangulation_line_face_circulator_2.h>
+#include <CGAL/spatial_sort.h>
+
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_smallint.hpp>
+#include <boost/random/variate_generator.hpp>
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+#include <CGAL/internal/Static_filters/tools.h>
+#include <CGAL/Triangulation_structural_filtering_traits.h>
+#include <CGAL/determinant.h>
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+namespace CGAL {
+template < class Gt, class Tds > class Triangulation_2;
+template < class Gt, class Tds > std::istream& operator>>
+    (std::istream& is, Triangulation_2<Gt,Tds> &tr);
+template < class Gt, class Tds >  std::ostream& operator<<
+  (std::ostream& os, const Triangulation_2<Gt,Tds> &tr);
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+namespace internal {
+// structural filtering is performed only for EPIC
+struct Structural_filtering_2_tag {};
+struct No_structural_filtering_2_tag {};
+
+template <bool filter>
+struct Structural_filtering_selector_2 {
+  typedef No_structural_filtering_2_tag  Tag;
+};
+
+template <>
+struct Structural_filtering_selector_2<true> {
+  typedef Structural_filtering_2_tag  Tag;
+};
+}
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+template < class Gt, 
+           class Tds = Triangulation_data_structure_2 <
+                             Triangulation_vertex_base_2<Gt>,
+                             Triangulation_face_base_2<Gt> > >
+class Triangulation_2
+  : public Triangulation_cw_ccw_2
+{
+  friend std::istream& operator>> <>
+                (std::istream& is, Triangulation_2 &tr);
+  typedef Triangulation_2<Gt,Tds>             Self;
+
+public:
+  typedef Tds                                 Triangulation_data_structure;
+  typedef Gt                                  Geom_traits;
+  typedef typename Geom_traits::Point_2       Point;
+  typedef typename Geom_traits::Segment_2     Segment;
+  typedef typename Geom_traits::Triangle_2    Triangle;
+  typedef typename Geom_traits::Orientation_2 Orientation_2;
+  typedef typename Geom_traits::Compare_x_2   Compare_x;
+  typedef typename Geom_traits::Compare_y_2   Compare_y;
+
+  typedef typename Tds::size_type              size_type;
+  typedef typename Tds::difference_type        difference_type;
+ 
+  typedef typename Tds::Vertex                 Vertex;
+  typedef typename Tds::Face                   Face;
+  typedef typename Tds::Edge                   Edge;
+  typedef typename Tds::Vertex_handle          Vertex_handle;
+  typedef typename Tds::Face_handle            Face_handle;
+
+  typedef typename Tds::Face_circulator        Face_circulator;
+  typedef typename Tds::Vertex_circulator      Vertex_circulator;
+  typedef typename Tds::Edge_circulator        Edge_circulator;
+
+  typedef typename Tds::Face_iterator          All_faces_iterator;
+  typedef typename Tds::Edge_iterator          All_edges_iterator;
+  typedef typename Tds::Halfedge_iterator      All_halfedges_iterator;
+  typedef typename Tds::Vertex_iterator        All_vertices_iterator;
+ 
+
+  class Perturbation_order {
+      const Self *t;
+
+  public:
+      Perturbation_order(const Self *tr)
+	  : t(tr) {}
+
+      bool operator()(const Point *p, const Point *q) const {
+	  return t->compare_xy(*p, *q) == SMALLER;
+      }
+  };
+
+  friend class Perturbation_order;
+
+ // This class is used to generate the Finite_*_iterators.
+ class Infinite_tester
+  {
+    const Triangulation_2 *t;
+  public:
+    Infinite_tester() {}
+    Infinite_tester(const Triangulation_2 *tr)	  : t(tr) {}
+
+    bool operator()(const All_vertices_iterator & vit) const  {
+	  return t->is_infinite(vit);
+    }
+    bool operator()(const All_faces_iterator & fit ) const {
+      return t->is_infinite(fit);
+    }
+    bool operator()(const All_edges_iterator & eit) const {
+      return t->is_infinite(eit);
+    }
+ };
+
+  //We derive in order to add a conversion to handle.
+  class Finite_vertices_iterator :
+    public Filter_iterator<All_vertices_iterator, Infinite_tester> 
+  {
+    typedef Filter_iterator<All_vertices_iterator, Infinite_tester> Base; 
+    typedef Finite_vertices_iterator                          Self;
+  public:
+    Finite_vertices_iterator() : Base() {}
+    Finite_vertices_iterator(const Base &b) : Base(b) {}
+    Self & operator++() { Base::operator++(); return *this; }
+    Self & operator--() { Base::operator--(); return *this; }
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+    operator Vertex_handle() const { return Base::base(); }
+  };
+
+  class Finite_faces_iterator
+    : public Filter_iterator<All_faces_iterator, Infinite_tester> 
+  {
+    typedef Filter_iterator<All_faces_iterator, Infinite_tester> Base;
+    typedef Finite_faces_iterator                           Self;
+  public:
+    Finite_faces_iterator() : Base() {}
+    Finite_faces_iterator(const Base &b) : Base(b) {}
+    Self & operator++() { Base::operator++(); return *this; }
+    Self & operator--() { Base::operator--(); return *this; }
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+    operator Face_handle() const { return Base::base(); }
+  };
+  
+  typedef Filter_iterator<All_edges_iterator, 
+                           Infinite_tester>
+                                               Finite_edges_iterator;
+  
+  //for backward compatibility
+  typedef Finite_faces_iterator                Face_iterator;
+  typedef Finite_edges_iterator                Edge_iterator;
+  typedef Finite_vertices_iterator             Vertex_iterator;
+
+  typedef Triangulation_line_face_circulator_2<Self>  Line_face_circulator;
+
+  // Auxiliary iterators for convenience
+  // do not use default template argument to please VC++
+  typedef Project_point<Vertex>                           Proj_point;
+  typedef Iterator_project<Finite_vertices_iterator, 
+                           Proj_point,
+	                   const Point&, 
+                           const Point*,
+                           std::ptrdiff_t,
+                           std::bidirectional_iterator_tag>  Point_iterator;
+
+  typedef Point                value_type; // to have a back_inserter
+  typedef const value_type&    const_reference; 
+  typedef value_type&          reference;
+  
+  
+  enum Locate_type {VERTEX=0, 
+		    EDGE, //1
+		    FACE, //2
+		    OUTSIDE_CONVEX_HULL, //3
+		    OUTSIDE_AFFINE_HULL}; //4
+
+  //Tag to distinguish Regular triangulations from others;
+  typedef Tag_false  Weighted_tag;
+  
+
+protected:
+  Gt  _gt;
+  Tds _tds;
+  Vertex_handle _infinite_vertex;
+
+public:
+  // CONSTRUCTORS
+  Triangulation_2(const Geom_traits& geom_traits=Geom_traits()); 
+  Triangulation_2(const Triangulation_2<Gt,Tds> &tr);
+ 
+  //Assignement
+  Triangulation_2 &operator=(const Triangulation_2 &tr);
+
+  //Helping
+  void copy_triangulation(const Triangulation_2 &tr);
+  void swap(Triangulation_2 &tr);
+  void clear();
+
+
+  //ACCESS FUNCTION
+  const Geom_traits& geom_traits() const { return _gt;}
+  const Tds & tds() const  { return _tds;}
+  Tds & tds()   { return _tds;}
+  int dimension() const { return _tds.dimension();}
+  size_type number_of_vertices() const {return _tds.number_of_vertices() - 1;}
+  
+  size_type number_of_faces() const;
+  Vertex_handle infinite_vertex() const;
+  Vertex_handle finite_vertex() const;
+  Face_handle infinite_face() const;
+  Infinite_tester infinite_tester() const;
+  
+  //SETTING
+  void set_infinite_vertex(const Vertex_handle& v) {_infinite_vertex=v;}
+  
+  // CHECKING
+  bool is_valid(bool verbose = false, int level = 0) const;
+ 
+  // TEST INFINITE FEATURES AND OTHER FEATURES
+  bool is_infinite(Face_handle f) const;
+  bool is_infinite(Vertex_handle v) const; 
+  bool is_infinite(Face_handle f, int i) const;
+  bool is_infinite(const Edge& e) const;
+  bool is_infinite(const Edge_circulator& ec) const;
+  bool is_infinite(const All_edges_iterator& ei) const;
+  bool is_edge(Vertex_handle va, Vertex_handle vb) const;
+  bool is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr,
+	       int & i) const;
+  bool includes_edge(Vertex_handle va, Vertex_handle vb,
+		     Vertex_handle& vbb,
+		     Face_handle& fr, int & i) const;
+  bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const;
+  bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
+       Face_handle &fr) const;
+
+ // GEOMETRIC FEATURES AND CONSTRUCTION
+  Triangle triangle(Face_handle f) const;
+  Segment segment(Face_handle f, int i) const;
+  Segment segment(const Edge& e) const;
+  Segment segment(const Edge_circulator& ec) const;
+  Segment segment(const All_edges_iterator& ei) const;
+  Segment segment(const Finite_edges_iterator& ei) const;
+  Point circumcenter(Face_handle  f) const; 
+  Point circumcenter(const Point& p0, 
+		     const Point& p1, 
+		     const Point& p2) const;
+  
+
+  //MOVE - INSERTION - DELETION - Flip
+public:
+  void   flip(Face_handle f, int i);
+  
+  Vertex_handle insert_first(const Point& p);
+  Vertex_handle insert_second(const Point& p);
+  Vertex_handle insert_in_edge(const Point& p, Face_handle f,int i);
+  Vertex_handle insert_in_face(const Point& p, Face_handle f);
+  Vertex_handle insert_outside_convex_hull(const Point& p, Face_handle f);
+  Vertex_handle insert_outside_affine_hull(const Point& p);
+  Vertex_handle insert(const Point &p, Face_handle start = Face_handle() );
+  Vertex_handle insert(const Point& p,
+		       Locate_type lt,
+		       Face_handle loc, int li );
+//   template < class InputIterator >
+//   std::ptrdiff_t insert(InputIterator first, InputIterator last);
+  Vertex_handle push_back(const Point& a);
+ 
+  void remove_degree_3(Vertex_handle  v, Face_handle f = Face_handle());
+  void remove_first(Vertex_handle  v);
+  void remove_second(Vertex_handle v);
+  void remove(Vertex_handle  v);
+
+  // MOVE
+  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p);
+  Vertex_handle move(Vertex_handle v, const Point &p);
+
+protected: // some internal methods
+	
+  // INSERT, REMOVE, MOVE GIVING NEW FACES
+  template <class OutputItFaces>
+  Vertex_handle insert_and_give_new_faces(const Point  &p, 
+                                          OutputItFaces fit,
+                                          Face_handle start = Face_handle() );
+  template <class OutputItFaces>
+  Vertex_handle insert_and_give_new_faces(const Point& p,
+                                          Locate_type lt,
+                                          Face_handle loc, int li, 
+                                          OutputItFaces fit);
+
+  template <class OutputItFaces>
+  void remove_and_give_new_faces(Vertex_handle v, 
+                                 OutputItFaces fit);
+
+  template <class OutputItFaces>
+  Vertex_handle move_if_no_collision_and_give_new_faces(Vertex_handle v, 
+                                                        const Point &p, 
+                                                        OutputItFaces fit);
+
+public:
+
+  // POINT LOCATION
+  Face_handle
+  march_locate_1D(const Point& t, Locate_type& lt, int& li) const ;
+  Face_handle
+  march_locate_2D(Face_handle start,
+		  const Point& t,
+		  Locate_type& lt,
+		  int& li) const;
+
+  Face_handle
+  march_locate_2D_LFC(Face_handle start,
+		  const Point& t,
+		  Locate_type& lt,
+		  int& li) const;
+
+  void
+  compare_walks(const Point& p,
+		Face_handle c1, Face_handle c2,
+		Locate_type& lt1, Locate_type& lt2,
+		int li1, int li2) const;
+
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+  Face_handle
+  locate(const Point& p,
+	 Locate_type& lt,
+	 int& li,
+	 Face_handle start = Face_handle()) const;
+
+  Face_handle
+  locate(const Point &p,
+	 Face_handle start = Face_handle()) const;	
+#else  // no CGAL_NO_STRUCTURAL_FILTERING
+#  ifndef CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+#    define CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
+#  endif // no CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+
+protected:
+  Face_handle
+  exact_locate(const Point& p,
+               Locate_type& lt,
+               int& li,
+               Face_handle start) const;
+	
+  Face_handle
+  generic_locate(const Point& p,
+                 Locate_type& lt,
+                 int& li,
+                 Face_handle start,
+                 internal::Structural_filtering_2_tag) const {
+    return exact_locate(p, lt, li, inexact_locate(p, start));
+  }	
+	
+  Face_handle
+  generic_locate(const Point& p,
+                 Locate_type& lt,
+                 int& li,
+                 Face_handle start,
+                 internal::No_structural_filtering_2_tag) const {
+    return exact_locate(p, lt, li, start);
+  }	
+	
+
+  bool has_inexact_negative_orientation(const Point &p, const Point &q,
+                      const Point &r) const;
+
+public:
+  Face_handle
+  inexact_locate(const Point& p,
+                 Face_handle start = Face_handle(), 
+                 int max_num_cells = 
+                 CGAL_T2_STRUCTURAL_FILTERING_MAX_VISITED_CELLS) const;
+
+  Face_handle
+  locate(const Point & p,
+         Locate_type & lt, int & li, 
+         Face_handle start = Face_handle()) const
+  {
+    typedef Triangulation_structural_filtering_traits<Geom_traits> TSFT;
+    typedef typename internal::Structural_filtering_selector_2< 
+      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
+
+    return generic_locate(p, lt, li, start, Should_filter_tag());
+  }
+	
+  Face_handle
+  locate(const Point & p, Face_handle start = Face_handle()) const
+  {
+    Locate_type lt;
+    int li;
+    return locate(p, lt, li, start);
+  }
+	
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+	
+  //TRAVERSING : ITERATORS AND CIRCULATORS
+  Finite_faces_iterator finite_faces_begin() const;
+  Finite_faces_iterator finite_faces_end() const;
+  Finite_vertices_iterator finite_vertices_begin() const;
+  Finite_vertices_iterator finite_vertices_end() const;
+  Finite_edges_iterator finite_edges_begin() const;
+  Finite_edges_iterator finite_edges_end() const; 
+  Point_iterator points_begin() const;
+  Point_iterator points_end() const;
+
+  All_faces_iterator all_faces_begin() const;
+  All_faces_iterator all_faces_end() const;
+  All_vertices_iterator all_vertices_begin() const;
+  All_vertices_iterator all_vertices_end() const;
+  All_edges_iterator all_edges_begin() const;
+  All_edges_iterator all_edges_end() const; 
+  All_halfedges_iterator all_halfedges_begin() const;
+  All_halfedges_iterator all_halfedges_end() const; 
+
+  //for compatibility with previous versions
+  Face_iterator faces_begin() const {return finite_faces_begin();}
+  Face_iterator faces_end() const {return finite_faces_end();}
+  Edge_iterator edges_begin() const {return finite_edges_begin();}
+  Edge_iterator edges_end() const {return finite_edges_end();}
+  Vertex_iterator vertices_begin() const {return finite_vertices_begin();}
+  Vertex_iterator vertices_end() const {return finite_vertices_end();}
+
+  Face_circulator incident_faces( Vertex_handle v, 
+				  Face_handle f = Face_handle()) const;
+  Vertex_circulator incident_vertices(Vertex_handle v,
+				      Face_handle f = Face_handle()) const;
+  Edge_circulator incident_edges(Vertex_handle v,
+				 Face_handle f = Face_handle()) const;
+ 
+  size_type degree(Vertex_handle v) const;
+
+  Vertex_handle mirror_vertex(Face_handle f, int i) const;
+  int mirror_index(Face_handle v, int i) const;
+  Edge mirror_edge(Edge e) const;
+
+  Line_face_circulator    line_walk(const Point& p,
+				    const Point& q,
+				    Face_handle f = Face_handle()) const;
+
+ // TO DEBUG
+  void show_all() const;
+  void show_vertex(Vertex_handle vh) const;
+  void show_face( Face_handle fh) const;
+
+  // IO
+// template < class Stream >
+// Stream&  draw_triangulation(Stream& os) const;
+
+ //PREDICATES
+ Oriented_side
+ oriented_side(const Point &p0, const Point &p1,
+	       const Point &p2, const Point &p) const;
+    
+ Bounded_side
+ bounded_side(const Point &p0, const Point &p1,
+	      const Point &p2, const Point &p) const;
+    
+ Oriented_side
+ oriented_side(Face_handle f, const Point &p) const;
+
+
+Oriented_side
+side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2,
+	                const Point &p, bool perturb) const;
+
+ Oriented_side
+ side_of_oriented_circle(Face_handle f, const Point & p, bool perturb = false) const; 
+
+ bool 
+ collinear_between(const Point& p, const Point& q, const Point& r)
+   const;
+
+  Comparison_result compare_x(const Point& p, const Point& q) const;
+
+  Comparison_result compare_xy(const Point& p, const Point& q) const;
+  Comparison_result compare_y(const Point& p, const Point& q) const;
+  bool               xy_equal(const Point& p, const Point& q) const;
+  Orientation orientation(const Point& p, 
+			  const Point& q, 
+			  const Point& r) const;
+
+
+protected:
+  void remove_1D(Vertex_handle v);
+  void remove_2D(Vertex_handle v);
+  bool test_dim_down(Vertex_handle v) const;
+  void fill_hole(Vertex_handle v, std::list<Edge> & hole);
+  void fill_hole_delaunay(std::list<Edge> & hole);
+
+  // output faces
+  template <class OutputItFaces>	
+  void fill_hole(Vertex_handle v, std::list<Edge> & hole, OutputItFaces fit);
+
+  template <class OutputItFaces>	
+  void fill_hole_delaunay(std::list<Edge> & hole, OutputItFaces fit);
+
+  void make_hole(Vertex_handle v, std::list<Edge> & hole,
+                 std::set<Face_handle> &faces_set);
+
+public:
+  void make_hole(Vertex_handle v, std::list<Edge> & hole);
+//   template<class EdgeIt>
+//   Vertex_handle star_hole( Point p, 
+// 			      EdgeIt edge_begin,
+// 			      EdgeIt edge_end);
+
+//   template<class EdgeIt, class FaceIt>
+//   Vertex_handle star_hole( Point p, 
+// 			      EdgeIt edge_begin,
+// 			      EdgeIt edge_end,
+// 			      FaceIt face_begin,
+// 			      FaceIt face_end);
+
+  Face_handle create_face(Face_handle f1d, int i1,
+			  Face_handle f2, int i2,
+			  Face_handle f3, int i3);
+  Face_handle create_face(Face_handle f1, int i1,
+			  Face_handle f2, int i2);
+  Face_handle create_face(Face_handle f, int i, Vertex_handle v);
+  Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3);
+  Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3,
+			  Face_handle f1, Face_handle f2, Face_handle f3);
+  Face_handle create_face();
+  Face_handle create_face(Face_handle); //calls copy constructor of Face
+  void delete_face(Face_handle f);
+  void delete_vertex(Vertex_handle v);
+
+  Vertex_handle collapse_edge(Edge e)
+  {
+    return _tds.collapse_edge(e);
+  }
+
+  Vertex_handle file_input(std::istream& is);
+  void file_output(std::ostream& os) const;
+
+private:
+  Vertex_handle insert_outside_convex_hull_1(const Point& p, Face_handle f);
+  Vertex_handle insert_outside_convex_hull_2(const Point& p, Face_handle f);
+  
+  // template members
+public:
+template < class Stream >
+Stream&  draw_triangulation(Stream& os) const 
+{
+  Finite_edges_iterator it = finite_edges_begin();
+  for( ;it != finite_edges_end() ; ++it) {
+    os << segment(it);
+  }
+  return os;
+}
+
+template < class InputIterator >
+std::ptrdiff_t insert(InputIterator first, InputIterator last)
+{
+  size_type n = number_of_vertices();
+
+  std::vector<Point> points (first, last);
+  spatial_sort (points.begin(), points.end(), geom_traits());
+  Face_handle f;
+  for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+          p != end; ++p)
+      f = insert (*p, f)->face();
+
+  return number_of_vertices() - n;
+}
+
+bool well_oriented(Vertex_handle v) const
+{
+  Face_circulator fc = incident_faces(v), done(fc);
+  do {
+    if(!is_infinite(fc)) {
+      Vertex_handle v0 = fc->vertex(0);
+      Vertex_handle v1 = fc->vertex(1);
+      Vertex_handle v2 = fc->vertex(2);
+      if(orientation(v0->point(),v1->point(),v2->point()) 
+        != COUNTERCLOCKWISE) return false;
+    }
+  } while(++fc != done);
+  return true;
+}
+
+bool from_convex_hull(Vertex_handle v) {
+  CGAL_triangulation_precondition(!is_infinite(v));
+  Vertex_circulator vc = incident_vertices(v), done(vc);
+  do { if(is_infinite(vc)) return true; } while(++vc != done);
+  return false;
+}
+
+public:
+  template<class EdgeIt>
+  Vertex_handle star_hole( const Point& p, 
+			   EdgeIt edge_begin,
+			   EdgeIt edge_end) {
+    std::list<Face_handle> empty_list;
+    return star_hole(p, 
+		     edge_begin, 
+		     edge_end, 
+		     empty_list.begin(),
+		     empty_list.end());
+  }
+
+  template<class EdgeIt, class FaceIt>
+  Vertex_handle star_hole( const Point& p, 
+			   EdgeIt edge_begin,
+			   EdgeIt edge_end,
+			   FaceIt face_begin,
+			   FaceIt face_end) {
+    Vertex_handle v = _tds.star_hole( edge_begin, edge_end,
+				      face_begin, face_end);
+    v->set_point(p);
+    return v;
+  }
+
+};
+
+// CONSTRUCTORS
+template <class Gt, class Tds >
+Triangulation_2<Gt, Tds>::
+Triangulation_2(const Geom_traits& geom_traits) 
+     : _gt(geom_traits), _tds()
+{
+  _infinite_vertex = _tds.insert_first();
+}
+  
+// copy constructor duplicates vertices and faces
+template <class Gt, class Tds >
+Triangulation_2<Gt, Tds>::
+Triangulation_2(const Triangulation_2 &tr)
+    : _gt(tr._gt)
+{
+  _infinite_vertex = _tds.copy_tds(tr._tds, tr.infinite_vertex());
+} 
+ 
+
+  //Assignement
+template <class Gt, class Tds >
+Triangulation_2<Gt, Tds> &
+Triangulation_2<Gt, Tds>::
+operator=(const Triangulation_2 &tr)
+{
+  copy_triangulation(tr);
+  return *this;
+}
+
+  // Helping functions
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::   
+copy_triangulation(const Triangulation_2 &tr)
+{
+  _tds.clear();
+  _gt = tr._gt;
+  _infinite_vertex = _tds.copy_tds(tr._tds, tr._infinite_vertex);
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>:: 
+swap(Triangulation_2 &tr)
+{
+  Vertex_handle v= _infinite_vertex;
+  _infinite_vertex = tr._infinite_vertex;
+  tr._infinite_vertex = v;
+  
+  _tds.swap(tr._tds);
+
+  Geom_traits t = geom_traits();
+  _gt = tr.geom_traits();
+  tr._gt = t; 
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>:: 
+clear()
+{
+  _tds.clear(); //detruit tous les sommets et toutes les faces
+  _infinite_vertex = _tds.insert_first();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::size_type
+Triangulation_2<Gt, Tds>::
+number_of_faces() const
+{
+  size_type count = _tds.number_of_faces();
+  Face_circulator fc = incident_faces(infinite_vertex()),
+    done(fc);
+  if ( ! fc.is_empty() ) {
+    do { 
+      --count; ++fc;
+    }  while (fc != done);
+  }
+  return count;
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt,Tds>::Vertex_handle 
+Triangulation_2<Gt,Tds>::
+infinite_vertex() const
+{
+  return  _infinite_vertex;
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt,Tds>::Vertex_handle 
+Triangulation_2<Gt,Tds>::
+finite_vertex() const
+{
+  CGAL_triangulation_precondition (number_of_vertices() >= 1);
+  return (finite_vertices_begin());
+}
+   
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt,Tds>::Face_handle 
+Triangulation_2<Gt,Tds>::
+infinite_face() const
+{
+  return infinite_vertex()->face();
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt,Tds>::Infinite_tester
+Triangulation_2<Gt,Tds>::
+infinite_tester() const
+{
+  return Infinite_tester(this);
+}
+
+
+template <class Gt, class Tds >
+bool
+Triangulation_2<Gt, Tds>::
+is_valid(bool verbose, int level) const
+{
+  bool result = _tds.is_valid(verbose, level);
+  if (dimension() <= 0 ||
+      (dimension()==1 && number_of_vertices() == 2 ) ) return result;
+
+  if (dimension() == 1) {
+    Finite_vertices_iterator it1 = finite_vertices_begin(),
+                             it2(it1), it3(it1);
+    ++it2;
+    ++it3; ++it3;
+    while( it3 != finite_vertices_end()) {
+     Orientation s = orientation(it1->point(),
+				 it2->point(),
+				 it3->point()); 
+     result = result && s == COLLINEAR ;
+     CGAL_triangulation_assertion(result);
+     ++it1 ; ++it2; ++it3;
+    }
+  }    
+
+  else { //dimension() == 2
+    for(Finite_faces_iterator it=finite_faces_begin(); 
+	it!=finite_faces_end(); it++) {
+      CGAL_triangulation_assertion( ! is_infinite(it));
+      Orientation s = orientation(it->vertex(0)->point(),
+				  it->vertex(1)->point(),
+				  it->vertex(2)->point());
+      CGAL_triangulation_assertion( s == LEFT_TURN );
+      result = result && ( s == LEFT_TURN );
+    }
+
+    Vertex_circulator start = incident_vertices(infinite_vertex());
+    Vertex_circulator pc(start);
+    Vertex_circulator qc(start); ++qc;
+    Vertex_circulator rc(start); ++rc; ++rc;
+    do{
+      Orientation s = orientation(pc->point(),
+				  qc->point(),
+				  rc->point());
+      CGAL_triangulation_assertion( s != LEFT_TURN );
+      result = result && ( s != LEFT_TURN );
+      ++pc ; ++qc ; ++rc;
+    }while(pc != start);
+
+    // check number of faces. This cannot be done by the Tds
+    // which does not know the number of components nor the genus
+    result = result && (number_of_faces() == 2*(number_of_vertices()+1)
+			                    - 4 
+                                            - degree(infinite_vertex()));
+    CGAL_triangulation_assertion( result);
+  }
+  return result;
+}
+
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(Face_handle f) const 
+{
+  return f->has_vertex(infinite_vertex());
+}
+
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(Vertex_handle v) const 
+{
+  return v == infinite_vertex();
+}
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(Face_handle f, int i) const 
+{
+  return is_infinite(f->vertex(ccw(i))) ||
+         is_infinite(f->vertex(cw(i)));
+}
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(const Edge& e) const 
+{
+  return is_infinite(e.first,e.second);
+}
+   
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(const Edge_circulator& ec) const 
+{
+  return is_infinite(*ec);
+}
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_infinite(const All_edges_iterator& ei) const 
+{
+  return is_infinite(*ei);
+}
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_edge(Vertex_handle va, Vertex_handle vb) const
+{
+  return _tds.is_edge( va, vb);
+}
+
+template <class Gt, class Tds >
+inline bool
+Triangulation_2<Gt, Tds>::
+is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr, int & i) const
+{
+  return _tds.is_edge(va, vb, fr, i);
+}
+
+template <class Gt, class Tds >
+bool 
+Triangulation_2<Gt, Tds>::
+includes_edge(Vertex_handle va, Vertex_handle vb,
+	      Vertex_handle & vbb,
+	      Face_handle& fr, int & i) const
+  // returns true if the line segment ab contains an edge e of t 
+  // incident to a, false otherwise
+  // if true, vbb becomes the vertex of e distinct from a
+  // fr is the face incident to e and e=(fr,i)
+  // fr is on the right side of a->b
+{
+  Vertex_handle v;
+  Orientation orient;
+  int indv;
+  Edge_circulator ec = incident_edges(va), done(ec);
+  if (ec != 0) {
+    do { 
+      //find the index of the other vertex of *ec
+      indv = 3 - ((*ec).first)->index(va) - (*ec).second ; 
+      v = ((*ec).first)->vertex(indv);
+      if (!is_infinite(v)) {
+	if (v==vb) {
+	  vbb = vb;
+	  fr=(*ec).first;
+	  i= (*ec).second;
+	  return true;
+	}
+	else {
+	  orient = orientation(va->point(),
+			   vb->point(),
+			   v->point()); 
+	  if((orient==COLLINEAR) && 
+	     (collinear_between (va->point(),
+				 v->point(),
+				 vb->point()))) {
+	    vbb = v;
+	    fr=(*ec).first;
+	    i= (*ec).second;
+	    return true;
+	  }
+	}
+      }
+    } while (++ec != done);
+  }
+  return false;
+}
+
+template <class Gt, class Tds >
+inline bool 
+Triangulation_2<Gt, Tds>::
+is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const
+{
+  return _tds.is_face(v1, v2, v3);
+}
+
+template <class Gt, class Tds >
+inline bool 
+Triangulation_2<Gt, Tds>::
+is_face(Vertex_handle v1, 
+	Vertex_handle v2, 
+	Vertex_handle v3,
+	Face_handle &fr) const
+{
+  return _tds.is_face(v1, v2, v3, fr);
+}
+
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Triangle
+Triangulation_2<Gt, Tds>::
+triangle(Face_handle f) const
+{
+  CGAL_triangulation_precondition( ! is_infinite(f) );
+  typename Gt::Construct_triangle_2 
+     construct_triangle = geom_traits().construct_triangle_2_object();
+  return construct_triangle(f->vertex(0)->point(),
+			    f->vertex(1)->point(),
+			    f->vertex(2)->point());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Segment
+Triangulation_2<Gt, Tds>::
+segment(Face_handle f, int i) const
+{
+  CGAL_triangulation_precondition( ! is_infinite(f,i));
+  typename Gt::Construct_segment_2 
+     construct_segment = geom_traits().construct_segment_2_object();
+  return construct_segment(f->vertex(ccw(i))->point(),
+			   f->vertex(cw(i))->point());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Segment
+Triangulation_2<Gt, Tds>::
+segment(const Edge& e) const
+{
+  CGAL_triangulation_precondition(! is_infinite(e)); 
+  typename Gt::Construct_segment_2 
+     construct_segment = geom_traits().construct_segment_2_object();
+  return construct_segment(e.first->vertex(ccw(e.second))->point(),
+			   e.first->vertex( cw(e.second))->point());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Segment
+Triangulation_2<Gt, Tds>::
+segment(const Edge_circulator& ec) const
+{
+  return segment(*ec);
+}
+    
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Segment
+Triangulation_2<Gt, Tds>::
+segment(const Finite_edges_iterator& ei) const
+{
+  return segment(*ei);
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Segment
+Triangulation_2<Gt, Tds>::
+segment(const All_edges_iterator& ei) const
+{
+  return segment(*ei);
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+flip(Face_handle f, int i)
+{
+  CGAL_triangulation_precondition ( f != Face_handle() );
+  CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2);
+  CGAL_triangulation_precondition( dimension()==2); 
+    
+  CGAL_triangulation_precondition( !is_infinite(f) && 
+				   !is_infinite(f->neighbor(i)) );
+  CGAL_triangulation_precondition( 
+                  orientation(f->vertex(i)->point(),
+			      f->vertex(cw(i))->point(),
+			      mirror_vertex(f,i)->point()) == RIGHT_TURN &&
+                  orientation(f->vertex(i)->point(),
+			      f->vertex(ccw(i))->point(),
+			      mirror_vertex(f,i)->point()) ==  LEFT_TURN); 
+  _tds.flip(f, i);
+  return;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_first(const Point& p)
+{
+  CGAL_triangulation_precondition(number_of_vertices() == 0);
+  Vertex_handle v = _tds.insert_second();
+  v->set_point(p);
+  return  v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_second(const Point& p)
+{
+  CGAL_triangulation_precondition(number_of_vertices() == 1);
+   Vertex_handle v = _tds.insert_dim_up(infinite_vertex(), true);
+   v->set_point(p);
+   return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_in_edge(const Point& p, Face_handle f,int i)
+{
+ CGAL_triangulation_exactness_precondition( 
+	      orientation(f->vertex(cw(i))->point(),  p,
+			  f->vertex(ccw(i))->point()) == COLLINEAR &&
+	      collinear_between(f->vertex(cw(i))->point(), p,
+				f->vertex(ccw(i))->point() ) );
+  Vertex_handle v = _tds.insert_in_edge(f,i);
+  v->set_point(p);
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_in_face(const Point& p, Face_handle f)
+{
+  CGAL_triangulation_precondition(oriented_side(f,p) ==   ON_POSITIVE_SIDE);
+  Vertex_handle v= _tds.insert_in_face(f);
+  v->set_point(p);
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_outside_convex_hull(const Point& p, Face_handle f)
+{
+  CGAL_triangulation_precondition(is_infinite(f) && dimension() >= 1);
+  Vertex_handle v;
+  if (dimension() == 1)  v=insert_outside_convex_hull_1(p, f);
+  else   v=insert_outside_convex_hull_2(p, f);
+  v->set_point(p);
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_outside_convex_hull_1(const Point& p, Face_handle f)
+{
+  CGAL_triangulation_precondition( is_infinite(f) && dimension()==1);
+  CGAL_triangulation_precondition(  
+    orientation(
+	     mirror_vertex(f,f->index(infinite_vertex()))->point(),
+	     f->vertex(1- f->index(infinite_vertex()))->point(),
+	     p) == COLLINEAR &&
+    collinear_between( 
+	     mirror_vertex(f,f->index(infinite_vertex()))->point(),
+	     f->vertex(1- f->index(infinite_vertex()))->point(),
+	     p) );
+   Vertex_handle v=_tds.insert_in_edge(f, 2);
+   v->set_point(p);
+   return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_outside_convex_hull_2(const Point& p, Face_handle f)
+{ 
+  CGAL_triangulation_precondition(is_infinite(f));
+  
+  int li = f->index(infinite_vertex());
+  
+  CGAL_triangulation_precondition( 
+		orientation(p,
+			    f->vertex(ccw(li))->point(),
+			    f->vertex(cw(li))->point()) == LEFT_TURN);
+
+  std::list<Face_handle> ccwlist;
+  std::list<Face_handle> cwlist;
+    
+  Face_circulator fc = incident_faces(infinite_vertex(), f);
+  bool done = false;
+  while(! done) {
+    fc--;
+    li = fc->index(infinite_vertex());
+    const Point& q = fc->vertex(ccw(li))->point();
+    const Point& r = fc->vertex(cw(li))->point();
+    if(orientation(p,q,r) == LEFT_TURN ) { ccwlist.push_back(fc); }
+    else {done=true;}
+  }
+
+  fc = incident_faces(infinite_vertex(), f);
+  done = false;
+  while(! done){
+    fc++;
+    li = fc->index(infinite_vertex());
+     const Point& q = fc->vertex(ccw(li))->point();
+     const Point& r = fc->vertex(cw(li))->point();
+    if(orientation(p,q,r) == LEFT_TURN ) { cwlist.push_back(fc);}
+    else {done=true;}
+  }
+
+  Vertex_handle v = _tds.insert_in_face(f);
+  v->set_point(p);
+
+  Face_handle fh;
+  while ( ! ccwlist.empty()) {
+    fh = ccwlist.front();
+    li = ccw(fh->index(infinite_vertex()));
+    _tds.flip( fh, li);
+    ccwlist.pop_front();
+  }
+
+  while ( ! cwlist.empty()) {
+    fh = cwlist.front();
+    li = cw(fh->index(infinite_vertex()));
+    _tds.flip( fh, li);
+    cwlist.pop_front();
+  }
+
+  //reset infinite_vertex()->face();
+  fc = incident_faces(v);
+  while( ! is_infinite(fc)) { fc++;}
+  infinite_vertex()->set_face(fc);
+
+  return v;
+} 
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert_outside_affine_hull(const Point& p)
+{
+  CGAL_triangulation_precondition(dimension() < 2);
+  bool conform = false;
+  if (dimension() == 1) {
+      Face_handle f = (*finite_edges_begin()).first;
+      Orientation orient = orientation( f->vertex(0)->point(),
+              f->vertex(1)->point(),
+              p);
+      CGAL_triangulation_precondition(orient != COLLINEAR);
+      conform = ( orient == COUNTERCLOCKWISE);
+  }
+  Vertex_handle v = _tds.insert_dim_up( infinite_vertex(), conform);
+  v->set_point(p);
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert(const Point &p, Face_handle start)
+{
+  Locate_type lt;
+  int li;
+  Face_handle loc = locate (p, lt, li, start);
+  return insert(p, lt, loc, li);
+}
+
+ 
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+insert(const Point& p, Locate_type lt, Face_handle loc, int li)
+  // insert a point p, whose localisation is known (lt, f, i)
+{
+  if(number_of_vertices() == 0) {
+    return(insert_first(p));
+  }
+
+  if(number_of_vertices() == 1) {
+    if (lt == VERTEX) return finite_vertex();
+    else return(insert_second(p));
+  }
+
+  switch(lt) {
+  case FACE:
+    return insert_in_face(p,loc);
+  case EDGE:
+    return insert_in_edge(p,loc,li);
+  case OUTSIDE_CONVEX_HULL:
+    return  insert_outside_convex_hull(p,loc);
+  case OUTSIDE_AFFINE_HULL:
+   return  insert_outside_affine_hull(p);
+  case VERTEX:
+    return loc->vertex(li);
+  }
+  CGAL_triangulation_assertion(false);  // locate step failed
+  return Vertex_handle();
+}
+
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+push_back(const Point &p)
+{
+  return insert(p);
+}
+
+template <class Gt, class Tds >
+inline void 
+Triangulation_2<Gt,Tds>::
+remove_degree_3(Vertex_handle  v, Face_handle f)
+{
+  if (f == Face_handle()) f=v->face();
+  _tds.remove_degree_3(v, f);
+  return;
+}
+
+template <class Gt, class Tds >
+inline void
+Triangulation_2<Gt,Tds>::
+remove_first(Vertex_handle  v)
+{
+  _tds.remove_second(v);
+  return;
+}
+
+template <class Gt, class Tds >
+inline void 
+Triangulation_2<Gt,Tds>::
+remove_second(Vertex_handle v)
+{
+  _tds.remove_dim_down(v);
+  return;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt,Tds>::      
+remove(Vertex_handle  v)
+{
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !is_infinite(v));
+    
+  if  (number_of_vertices() == 1)     remove_first(v);
+  else if (number_of_vertices() == 2) remove_second(v);
+  else   if ( dimension() == 1) remove_1D(v);
+  else  remove_2D(v);
+  return;
+}
+
+template <class Gt, class Tds >
+inline void
+Triangulation_2<Gt, Tds>::
+remove_1D(Vertex_handle v)
+{
+  _tds.remove_1D(v);
+}
+
+template <class Gt, class Tds >
+bool
+Triangulation_2<Gt,Tds>::
+test_dim_down(Vertex_handle v) const
+{
+  //test the dimensionality of the resulting triangulation
+  //upon removing of vertex v
+  //it goes down to 1 iff
+  // 1) any finite face is incident to v
+  // 2) all vertices are collinear
+  CGAL_triangulation_precondition(dimension() == 2);
+  bool  dim1 = true; 
+  Finite_faces_iterator fit = finite_faces_begin();
+  while (dim1==true && fit != finite_faces_end()) {
+    dim1 = dim1 && fit->has_vertex(v);
+    fit++;
+  }
+  Face_circulator fic = incident_faces(v);
+  while (is_infinite(fic)) {++fic;}
+  Face_circulator done(fic);
+  Face_handle start(fic); int iv = start->index(v);
+  const Point& p = start->vertex(cw(iv))->point(); 
+  const Point& q = start->vertex(ccw(iv))->point();
+  while ( dim1 && ++fic != done) {
+    iv = fic->index(v);
+    if (fic->vertex(ccw(iv)) != infinite_vertex()) {
+      dim1 = dim1 && 
+	orientation(p, q, fic->vertex(ccw(iv))->point()) == COLLINEAR; 
+    }
+  }
+  return dim1;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt,Tds>::
+remove_2D(Vertex_handle v)
+{
+  if (test_dim_down(v)) {  _tds.remove_dim_down(v);  }
+  else {
+    std::list<Edge> hole;
+    make_hole(v, hole);
+    fill_hole(v, hole);
+    delete_vertex(v);
+  }
+  return;       
+}
+
+template < class Gt, class Tds >
+template < class OutputItFaces >
+inline
+typename Triangulation_2<Gt,Tds>::Vertex_handle 
+Triangulation_2<Gt,Tds>::
+insert_and_give_new_faces(const Point  &p, 
+                          OutputItFaces oif,
+                          Face_handle start)
+{
+  Vertex_handle v = insert(p, start);
+  int dimension = this->dimension();
+  if(dimension == 2)
+  {
+    Face_circulator fc = incident_faces(v), done(fc);
+    do {
+      *oif++ = fc;
+    } while(++fc != done);
+  }
+  else if(dimension == 1)
+  {
+    Face_handle c = v->face();
+    *oif++ = c;
+    *oif++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *oif++ = v->face(); // dimension == 0
+  return v;
+}
+		
+template < class Gt, class Tds >
+template < class OutputItFaces >
+inline
+typename Triangulation_2<Gt,Tds>::Vertex_handle 
+Triangulation_2<Gt,Tds>::
+insert_and_give_new_faces(const Point  &p,
+                          Locate_type lt,
+                          Face_handle loc, int li, 
+                          OutputItFaces oif)
+{
+  Vertex_handle v = insert(p, lt, loc, li);
+  int dimension = this->dimension();
+  if(dimension == 2)
+  {
+    Face_circulator fc = incident_faces(v), done(fc);
+    do {
+      *oif++ = fc;
+    } while(++fc != done);
+  }
+  else if(dimension == 1)
+  {
+    Face_handle c = v->face();
+    *oif++ = c;
+    *oif++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *oif++ = v->face(); // dimension == 0	
+  return v;	
+}
+
+template < class Gt, class Tds >
+template <class OutputItFaces>
+void
+Triangulation_2<Gt,Tds>::
+remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
+{
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !is_infinite(v));
+    
+  if(number_of_vertices() == 1) remove_first(v);
+  else if(number_of_vertices() == 2) remove_second(v);
+  else if( dimension() == 1) 
+  {
+    Point p = v->point();
+    remove(v);
+    *fit++ = locate(p);
+  }
+  else if (test_dim_down(v)) {  
+    _tds.remove_dim_down(v);  
+    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
+        afi != tds().face_iterator_base_begin(); 
+        afi++) *fit++ = afi;
+  }
+  else {
+    std::list<Edge> hole;
+    make_hole(v, hole);
+    fill_hole(v, hole, fit);
+    delete_vertex(v);
+  }
+  return;		
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+make_hole ( Vertex_handle v, std::list<Edge> & hole)
+{
+  std::vector<Face_handle> to_delete;
+  to_delete.reserve(16);
+
+  Face_handle  f, fn;
+  int i, in ;
+  Vertex_handle  vv;
+
+  Face_circulator fc = incident_faces(v);
+  Face_circulator done(fc);
+  do {
+    f = fc; fc++;
+    i = f->index(v);
+    fn = f->neighbor(i);
+    in = fn->index(f);
+    vv = f->vertex(cw(i));
+    vv->set_face(fn);
+    vv = f->vertex(ccw(i));
+    vv->set_face(fn);
+    fn->set_neighbor(in, Face_handle());
+    hole.push_back(Edge(fn,in));
+    to_delete.push_back(f);
+  } while(fc != done);
+
+  std::size_t size = to_delete.size();
+  for(std::size_t i=0; i<size; i++) {
+    f = to_delete[i];
+    delete_face(f);
+  }
+}
+
+template <class Gt, class Tds >
+void 
+Triangulation_2<Gt,Tds>::
+make_hole(Vertex_handle v, std::list<Edge> & hole,
+          std::set<Face_handle> &faces_set)
+{
+  std::vector<Face_handle> to_delete;
+  to_delete.reserve(16);
+
+  Face_handle  f, fn;
+  int i, in ;
+  Vertex_handle  vv;
+
+  Face_circulator fc = incident_faces(v);
+  Face_circulator done(fc);
+  do {
+    f = fc; fc++;
+    i = f->index(v);
+    fn = f->neighbor(i);
+    in = fn->index(f);
+    vv = f->vertex(cw(i));
+    vv->set_face(fn);
+    vv = f->vertex(ccw(i));
+    vv->set_face(fn);
+    fn->set_neighbor(in, Face_handle());
+    hole.push_back(Edge(fn,in));
+    to_delete.push_back(f);
+  } while(fc != done);
+
+  std::size_t size = to_delete.size();
+  for(std::size_t i=0; i<size; i++) {
+    f = to_delete[i];
+    faces_set.erase(f);
+    delete_face(f);
+  }
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::						     
+fill_hole ( Vertex_handle v, std::list< Edge > & hole )
+{
+  // uses the fact that the hole is starshaped
+  // with repect to v->point()
+  typedef std::list<Edge> Hole;
+
+  Face_handle  ff, fn;
+  int ii , in; 
+  Vertex_handle v0, v1, v2;
+  Bounded_side side;
+
+  //stack algorithm to create faces
+  // create face v0,v1,v2
+  //if v0,v1,v2 are finite vertices
+  // and form a left_turn
+  // and triangle v0v1v2 does not contain v->point()
+  if( hole.size() != 3) {
+    typename Hole::iterator hit = hole.begin();
+    typename Hole::iterator next= hit; 
+    while( hit != hole.end() && hole.size() != 3) {
+      ff = (*hit).first;  
+      ii = (*hit).second;
+      v0 = ff->vertex(cw(ii));
+      v1 = ff->vertex(ccw(ii));
+      if( !is_infinite(v0) && !is_infinite(v1)) {
+	next=hit; next++;
+	if(next == hole.end()) next=hole.begin();
+	fn = (*next).first; 
+	in = (*next).second;
+	v2 = fn->vertex(ccw(in));	
+	if ( !is_infinite(v2) &&
+	     orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) {
+	  side =  bounded_side(v0->point(), 
+			       v1->point(), 
+			       v2->point(),
+			       v->point());
+
+	  if( side == ON_UNBOUNDED_SIDE || 
+	      (side == ON_BOUNDARY && orientation(v0->point(),
+					     v->point(),
+					     v2->point()) == COLLINEAR &&
+	       collinear_between(v0->point(),v->point(),v2->point()) )) 
+	    {
+	      //create face
+	      Face_handle  newf = create_face(ff,ii,fn,in); 
+	      typename Hole::iterator tempo=hit;
+	      hit = hole.insert(hit,Edge(newf,1)); //push newf
+	      hole.erase(tempo); //erase ff
+	      hole.erase(next); //erase fn
+	      if (hit != hole.begin() ) --hit;
+	      continue;
+	    }
+	}
+      }
+      ++hit; 
+    } 
+  }
+
+  // either the hole has only three edges
+  // or all its finite vertices are reflex or flat
+  // except may be one vertex whose corresponding ear 
+  // includes the vertex being removed
+
+  // deal with the last left_turn if any
+  if(hole.size() != 3) {
+    typename Hole::iterator hit=hole.begin();
+    while(hit != hole.end()) {
+      ff = (*hit).first;  ii = (*hit).second;
+      hit++;
+      if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;}
+      else { fn = ((hole.front()).first); in = (hole.front()).second;}
+      if ( !is_infinite(ff->vertex(cw(ii))) &&
+	   !is_infinite(fn->vertex(cw(in))) &&
+	   !is_infinite(fn->vertex(ccw(in))) &&
+	   orientation(ff->vertex(cw(ii))->point(),
+		       fn->vertex(cw(in))->point(),
+		       fn->vertex(ccw(in))->point()) == LEFT_TURN) {
+	  create_face(ff,ii,fn,in);
+	  break;
+	}
+    }
+  }
+
+  // deal with a reflex chain of convex hull edges
+  if(hole.size() != 3) {
+    // look for infinite vertex
+    ff = (hole.front()).first;
+    ii = (hole.front()).second;
+    while ( ! is_infinite(ff->vertex(cw(ii)))){
+      hole.push_back(hole.front());
+      hole.pop_front();
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+    }
+    //create faces
+    while(hole.size() != 3){
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+      hole.pop_front();
+      fn = (hole.front()).first;
+      in = (hole.front()).second;
+      hole.pop_front();
+      Face_handle  newf = create_face(ff,ii,fn,in);
+      hole.push_front(Edge(newf,1));
+    }
+  }
+    
+  // now hole has three edges
+  typename Hole::iterator hit;
+  hit = hole.begin();
+  //  I don't know why the following yelds a segmentation fault
+  //    create_face( (*hit).first, (*hit).second,
+  // 	     (* ++hit).first, (*hit).second,
+  // 	     (* ++hit).first, (*hit).second);
+  ff = (*hit).first;      ii = (*hit).second;
+  fn = (* ++hit).first;   in = (*hit).second;
+  Face_handle f3 = (* ++hit).first;
+  int i3 = (*hit).second;
+  create_face(ff,ii,fn,in,f3,i3);
+}
+
+template < class Gt, class Tds >
+template <class OutputItFaces>
+void
+Triangulation_2<Gt,Tds>::
+fill_hole(Vertex_handle v, std::list<Edge> & hole, OutputItFaces fit)
+{
+  // uses the fact that the hole is starshaped
+  // with repect to v->point()
+  typedef std::list<Edge> Hole;
+
+  Face_handle  ff, fn;
+  int ii , in; 
+  Vertex_handle v0, v1, v2;
+  Bounded_side side;
+
+  //stack algorithm to create faces
+  // create face v0,v1,v2
+  //if v0,v1,v2 are finite vertices
+  // and form a left_turn
+  // and triangle v0v1v2 does not contain v->point()
+  if( hole.size() != 3) {
+    typename Hole::iterator hit = hole.begin();
+    typename Hole::iterator next= hit; 
+    while( hit != hole.end() && hole.size() != 3) {
+      ff = (*hit).first;  
+      ii = (*hit).second;
+      v0 = ff->vertex(cw(ii));
+      v1 = ff->vertex(ccw(ii));
+      if( !is_infinite(v0) && !is_infinite(v1)) {
+        next=hit; next++;
+        if(next == hole.end()) next=hole.begin();
+        fn = (*next).first; 
+        in = (*next).second;
+        v2 = fn->vertex(ccw(in));	
+        if ( !is_infinite(v2) &&
+             orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) {
+          side =  bounded_side(v0->point(), v1->point(), v2->point(), v->point());
+          if( side == ON_UNBOUNDED_SIDE || 
+              (side == ON_BOUNDARY && orientation(v0->point(),
+                                                  v->point(),
+                                                  v2->point()) == COLLINEAR &&
+               collinear_between(v0->point(),v->point(),v2->point()) )) 
+          {
+            //create face
+            Face_handle  newf = create_face(ff,ii,fn,in);
+            *fit++ = newf; 
+            typename Hole::iterator tempo=hit;
+            hit = hole.insert(hit,Edge(newf,1)); //push newf
+            hole.erase(tempo); //erase ff
+            hole.erase(next); //erase fn
+            if (hit != hole.begin() ) --hit;
+            continue;
+          }
+        }
+      }
+      ++hit; 
+    } 
+  }
+
+  // either the hole has only three edges
+  // or all its finite vertices are reflex or flat
+  // except may be one vertex whose corresponding ear 
+  // includes the vertex being removed
+
+  // deal with the last left_turn if any
+  if(hole.size() != 3) {
+    typename Hole::iterator hit=hole.begin();
+    while(hit != hole.end()) {
+      ff = (*hit).first;  ii = (*hit).second;
+      hit++;
+      if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;}
+      else { fn = ((hole.front()).first); in = (hole.front()).second;}
+      if ( !is_infinite(ff->vertex(cw(ii))) &&
+           !is_infinite(fn->vertex(cw(in))) &&
+           !is_infinite(fn->vertex(ccw(in))) &&
+           orientation(ff->vertex(cw(ii))->point(),
+                       fn->vertex(cw(in))->point(),
+                       fn->vertex(ccw(in))->point()) == LEFT_TURN) {
+        Face_handle  newf = create_face(ff,ii,fn,in);
+        *fit++ = newf;
+        break;
+      }
+    }
+  }
+
+  // deal with a reflex chain of convex hull edges
+  if(hole.size() != 3) {
+    // look for infinite vertex
+    ff = (hole.front()).first;
+    ii = (hole.front()).second;
+    while ( ! is_infinite(ff->vertex(cw(ii)))){
+      hole.push_back(hole.front());
+      hole.pop_front();
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+    }
+    //create faces
+    while(hole.size() != 3){
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+      hole.pop_front();
+      fn = (hole.front()).first;
+      in = (hole.front()).second;
+      hole.pop_front();
+      Face_handle newf = create_face(ff,ii,fn,in);
+      *fit++ = newf;
+      hole.push_front(Edge(newf,1));
+    }
+  }
+
+  // now hole has three edges
+  typename Hole::iterator hit;
+  hit = hole.begin();
+  //  I don't know why the following yelds a segmentation fault
+  //    create_face( (*hit).first, (*hit).second,
+  // 	     (* ++hit).first, (*hit).second,
+  // 	     (* ++hit).first, (*hit).second);
+  ff = (*hit).first;      ii = (*hit).second;
+  fn = (* ++hit).first;   in = (*hit).second;
+  Face_handle f3 = (* ++hit).first;
+  int i3 = (*hit).second;
+  Face_handle newf = create_face(ff,ii,fn,in,f3,i3);
+  *fit++ = newf;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+fill_hole_delaunay(std::list<Edge> & first_hole)
+{
+  typedef std::list<Edge> Hole;
+  typedef std::list<Hole> Hole_list;
+  
+  Face_handle  f, ff, fn;
+  int i, ii, in;
+  Hole_list hole_list;
+        
+  hole_list.push_front(first_hole);
+  
+  while( ! hole_list.empty())
+    {
+      Hole& hole = hole_list.front();
+     
+      typename Hole::iterator hit = hole.begin();
+  
+      // if the hole has only three edges, create the triangle
+      if (hole.size() == 3) {
+	hit = hole.begin();
+	f = (*hit).first;        i = (*hit).second;
+	ff = (* ++hit).first;    ii = (*hit).second;
+	fn = (* ++hit).first;    in = (*hit).second;
+	create_face(f,i,ff,ii,fn,in);
+        hole_list.pop_front();
+	continue;
+      }
+  
+      // else find an edge with two finite vertices
+      // on the hole boundary
+      // and the new triangle adjacent to that edge
+      //  cut the hole and push it back
+  
+      // first, ensure that a neighboring face
+      // whose vertices on the hole boundary are finite
+      // is the first of the hole
+      bool finite= false;
+      while (!finite){
+	ff = (hole.front()).first;
+	ii = (hole.front()).second;
+	if ( is_infinite(ff->vertex(cw(ii))) ||
+	     is_infinite(ff->vertex(ccw(ii)))) {
+          hole.push_back(hole.front());
+          hole.pop_front();
+	}
+	else finite=true;
+      }
+  
+      // take the first neighboring face and pop it;
+      ff = (hole.front()).first;
+      ii =(hole.front()).second;
+      hole.pop_front();
+    
+      Vertex_handle v0 = ff->vertex(cw(ii)); 
+      Vertex_handle v1 = ff->vertex(ccw(ii)); 
+      Vertex_handle v2 = infinite_vertex(); 
+      Vertex_handle v3; 
+      const Point& p0 = v0->point();
+      const Point& p1 = v1->point();
+  
+      typename Hole::iterator hdone = hole.end();
+      hit =  hole.begin();
+      typename Hole::iterator cut_after(hit);
+  
+      // if tested vertex is c with respect to the vertex opposite
+      // to NULL neighbor,
+      // stop at the before last face;
+      hdone--;
+      while( hit != hdone) {
+	fn = (*hit).first;
+	in = (*hit).second;
+        Vertex_handle vv = fn->vertex(ccw(in));
+	if (is_infinite(vv)) {
+	  if(is_infinite(v2)) cut_after = hit;
+	}
+	else {     // vv is a finite vertex
+	  const Point & p = vv->point();
+	  if (orientation(p0,p1,p) == COUNTERCLOCKWISE) {
+	    if (is_infinite(v2)) { v2=vv; v3=vv; cut_after=hit;}
+	    else{
+              //
+	      if (this->side_of_oriented_circle(p0,p1,v3->point(),p,true) ==  ON_POSITIVE_SIDE){
+		v2=vv; v3=vv; cut_after=hit;}
+	    }
+	  }
+	}
+	++hit;
+      }
+ 
+      // create new triangle and update adjacency relations
+      Face_handle newf;
+    
+      //update the hole and push back in the Hole_List stack
+      // if v2 belongs to the neighbor following or preceding *f
+      // the hole remain a single hole
+      // otherwise it is split in two holes
+  
+      fn = (hole.front()).first;
+      in = (hole.front()).second;
+      if (fn->has_vertex(v2, i) && i == fn->ccw(in)) {
+	newf = create_face(ff,ii,fn,in);
+	hole.pop_front();
+	hole.push_front(Edge( newf,1));
+      }
+      else{
+	fn = (hole.back()).first;
+	in = (hole.back()).second;
+	if (fn->has_vertex(v2, i) && i== fn->cw(in)) {
+	  newf = create_face(fn,in,ff,ii);
+	  hole.pop_back();
+	  hole.push_back(Edge(newf,1));
+	}
+	else{
+	  // split the hole in two holes
+	  newf = create_face(ff,ii,v2);
+	  Hole new_hole;
+	  ++cut_after;
+	  while( hole.begin() != cut_after )
+            {
+              new_hole.push_back(hole.front());
+              hole.pop_front();
+            }
+  
+	  hole.push_front(Edge( newf,1));
+	  new_hole.push_front(Edge( newf,0));
+	  hole_list.push_front(new_hole);
+	}
+      }
+    }
+}
+
+template < class Gt, class Tds >
+template <class OutputItFaces>
+void
+Triangulation_2<Gt,Tds>::
+fill_hole_delaunay(std::list<Edge> & first_hole, OutputItFaces fit)
+{
+  typedef typename Gt::Orientation_2             Orientation_2;
+  typedef typename Gt::Side_of_oriented_circle_2 In_circle;
+  typedef std::list<Edge>                        Hole;
+  typedef std::list<Hole>                        Hole_list;
+
+  Orientation_2 orientation_2 = geom_traits().orientation_2_object();
+  In_circle in_circle = 
+    geom_traits().side_of_oriented_circle_2_object();
+
+  Face_handle  f, ff, fn;
+  int i, ii, in;
+  Hole_list hole_list;
+  hole_list.push_front(first_hole);
+
+  while(!hole_list.empty()) {
+    Hole& hole = hole_list.front();
+    typename Hole::iterator hit = hole.begin();
+
+    if (hole.size() == 3) {
+      hit = hole.begin();
+      f = (*hit).first;        i = (*hit).second;
+      ff = (* ++hit).first;    ii = (*hit).second;
+      fn = (* ++hit).first;    in = (*hit).second;
+      Face_handle newf = create_face(f,i,ff,ii,fn,in);
+      *fit++ = newf;
+      hole_list.pop_front();
+      continue;
+    }
+
+    bool finite= false;
+    while (!finite){
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+      if ( is_infinite(ff->vertex(cw(ii))) ||
+     is_infinite(ff->vertex(ccw(ii)))) {
+        hole.push_back(hole.front());
+        hole.pop_front();
+      } else finite=true;
+    }
+
+    ff = (hole.front()).first;
+    ii =(hole.front()).second;
+    hole.pop_front();
+  
+    Vertex_handle v0 = ff->vertex(cw(ii)); 
+    Vertex_handle v1 = ff->vertex(ccw(ii)); 
+    Vertex_handle v2 = infinite_vertex(); 
+    const Point& p0 = v0->point();
+    const Point& p1 = v1->point();
+
+    typename Hole::iterator hdone = hole.end();
+    hit =  hole.begin();
+    typename Hole::iterator cut_after(hit);
+
+    hdone--;
+    while( hit != hdone) {
+      fn = (*hit).first;
+      in = (*hit).second;
+      Vertex_handle vv = fn->vertex(ccw(in));
+      if (is_infinite(vv)) {
+        if(is_infinite(v2)) cut_after = hit;
+      } else {     // vv is a finite vertex
+  const Point & p = vv->point();
+  if (orientation_2(p0,p1,p) == CGAL::COUNTERCLOCKWISE) {
+          if (is_infinite(v2)) { v2 = vv; cut_after = hit;}
+    else{
+      if (in_circle(p0,p1,v2->point(),p) == CGAL::ON_POSITIVE_SIDE){
+        v2 = vv; cut_after = hit;
+            }
+    }
+  }
+      }
+      ++hit;
+    }
+
+    Face_handle newf;
+  
+    fn = (hole.front()).first;
+    in = (hole.front()).second;
+    if (fn->has_vertex(v2, i) && i == fn->ccw(in)) {
+      newf = create_face(ff,ii,fn,in);
+      hole.pop_front();
+      hole.push_front(Edge( newf,1));
+    } else {
+      fn = (hole.back()).first;
+      in = (hole.back()).second;
+      if (fn->has_vertex(v2, i) && i== fn->cw(in)) {
+        newf = create_face(fn,in,ff,ii);
+        hole.pop_back();
+        hole.push_back(Edge(newf,1));
+      } else {
+  newf = create_face(ff,ii,v2);
+  Hole new_hole;
+  ++cut_after;
+  while( hole.begin() != cut_after ) {
+          new_hole.push_back(hole.front());
+          hole.pop_front();
+        }
+        hole.push_front(Edge(newf, 1));
+        new_hole.push_front(Edge(newf, 0));
+        hole_list.push_front(new_hole);
+      }
+    }
+    *fit++ = newf;
+  }
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+move_if_no_collision(Vertex_handle v, const Point &p) {
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;	
+
+  const int dim = dimension();
+
+  Locate_type lt;
+  int li;
+  Face_handle loc = locate(p, lt, li, v->face());
+
+  if(lt == VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->set_point(p);
+    return v;
+  }
+
+	size_type n_vertices = tds().number_of_vertices();
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
+	  v->set_point(p);
+	  return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+    if(loc->has_vertex(v)) {
+      v->set_point(p);
+    } else {
+      Vertex_handle inserted = insert(p, lt, loc, li);
+      Face_handle f = v->face();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Face_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_face(f);
+      delete_face(g);
+      Face_handle f_ins = inserted->face();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Face_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+      v->set_point(p);
+      v->set_face(inserted->face());
+      delete_vertex(inserted);
+    }
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) {
+	  // verify if p and two static vertices are collinear in this case
+		int iinf = 0;
+		Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf);
+	  do { 
+		  if(!finf->has_vertex(v))
+		  {
+				iinf = ~(finf->index(infinite_vertex()));
+				break;
+		  }
+		} while(++finf != fdone);
+	  if(this->orientation(finf->vertex(iinf&1)->point(),
+	                       finf->vertex(iinf&2)->point(),
+	                       p) == COLLINEAR)
+	  {
+      v->set_point(p);
+      _tds.dim_down(loc, loc->index(v));
+		  return v;
+		}
+  }
+
+  Vertex_handle inserted = insert(p, lt, loc, li);
+
+  std::list<Edge> hole;
+  make_hole(v, hole);
+  fill_hole(v, hole);
+
+  // fixing pointer
+  Face_circulator fc = this->incident_faces(inserted), done(fc);
+  std::vector<Face_handle> faces_pt;
+	faces_pt.reserve(16);
+  do { faces_pt.push_back(fc); } while(++fc != done);
+  std::size_t ss = faces_pt.size();
+  for(std::size_t k=0; k<ss; k++)
+    {
+      Face_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+  v->set_point(p);
+  v->set_face(inserted->face());
+  delete_vertex(inserted);
+
+  return v;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt,Tds>::Vertex_handle
+Triangulation_2<Gt,Tds>::
+move(Vertex_handle v, const Point &p) {
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;	
+  Vertex_handle w = move_if_no_collision(v,p);
+  if(w != v) {
+    remove(v);
+    return w;
+  }
+  return v;
+}
+
+template <class Gt, class Tds >
+template <class OutputItFaces>
+typename Triangulation_2<Gt,Tds>::Vertex_handle 
+Triangulation_2<Gt,Tds>::
+move_if_no_collision_and_give_new_faces(Vertex_handle v, 
+                                            const Point &p, 
+                                            OutputItFaces oif)
+{
+  CGAL_triangulation_precondition(!is_infinite(v));		
+  if(v->point() == p) return v;	
+  const int dim = this->dimension();
+
+  Locate_type lt;
+  int li;
+  Vertex_handle inserted;
+  Face_handle loc = locate(p, lt, li, v->face());
+
+  if(lt == VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->set_point(p);
+    return v;
+  }
+
+  int n_vertices = tds().number_of_vertices();
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
+    v->set_point(p);
+	
+    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
+        afi != tds().face_iterator_base_begin(); 
+        afi++) *oif++ = afi;
+	
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+    if(loc->has_vertex(v)) {
+      v->set_point(p);
+    } else {
+      inserted = insert(p, lt, loc, li);
+      Face_handle f = v->face();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Face_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_face(f);
+      delete_face(g);
+      *oif++ = f;
+      Face_handle f_ins = inserted->face();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Face_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+      v->set_point(p);
+      v->set_face(inserted->face());
+      delete_vertex(inserted);
+    }
+    *oif++ = v->face();
+    if(v->face()->neighbor(0)->has_vertex(v)) 
+      *oif++ = v->face()->neighbor(0);
+    if(v->face()->neighbor(1)->has_vertex(v)) 
+      *oif++ = v->face()->neighbor(1);			
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) {
+    // verify if p and two static vertices are collinear in this case
+    int iinf;
+    Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf);
+    do { 
+      if(!finf->has_vertex(v))
+        {
+          iinf = ~(finf->index(infinite_vertex()));
+          break;
+        }
+    } while(++finf != fdone);
+    if(this->orientation(finf->vertex(iinf&1)->point(),
+                         finf->vertex(iinf&2)->point(),
+                         p) == COLLINEAR)
+      {
+        v->set_point(p);
+        _tds.dim_down(loc, loc->index(v));
+        return v;
+      }
+		
+    for(All_faces_iterator afi =  tds().face_iterator_base_begin(); 
+        afi != tds().face_iterator_base_begin(); 
+        afi++) *oif++ = afi;
+		
+  }
+
+  std::set<Face_handle> faces_set;
+  inserted = insert(p, lt, loc, li);
+  Face_circulator fc = incident_faces(inserted), done(fc);
+  do { faces_set.insert(fc); } while(++fc != done);
+
+  std::list<Edge> hole;
+  make_hole(v, hole, faces_set);
+  fill_hole(v, hole, oif);
+
+  fc = this->incident_faces(inserted), done(fc);
+  std::vector<Face_handle> faces_pt;
+  faces_pt.reserve(16);
+  do { faces_pt.push_back(fc); } while(++fc != done);
+  int ss = faces_pt.size();
+  for(int k=0; k<ss; k++)
+    {
+      Face_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+  v->set_point(p);
+  v->set_face(inserted->face());
+  delete_vertex(inserted);
+
+  for(typename std::set<Face_handle>::iterator ib = faces_set.begin(),
+        iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib;
+
+  return v;
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Face_handle f1, int i1,
+	 Face_handle f2, int i2,
+	 Face_handle f3, int i3)
+{
+  return _tds.create_face(f1, i1, f2, i2, f3, i3);
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Face_handle f1, int i1,
+	 Face_handle f2, int i2)
+{
+  return _tds.create_face(f1, i1, f2, i2);
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Face_handle f, int i, Vertex_handle v)
+{
+  return _tds.create_face(f, i, v);
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
+{
+  return _tds.create_face(v1, v2, v3);
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
+	    Face_handle f1, Face_handle f2,  Face_handle f3)
+{
+  return _tds.create_face(v1, v2, v3, f1, f2, f3);
+}
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face(Face_handle fh)
+{
+  return _tds.create_face(fh);
+}
+
+
+
+template <class Gt, class Tds >    
+inline
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+create_face()
+{
+  return _tds.create_face();
+}
+
+template <class Gt, class Tds >    
+inline
+void
+Triangulation_2<Gt, Tds>::
+delete_face(Face_handle f)
+{
+  _tds.delete_face(f);
+}
+
+template <class Gt, class Tds >    
+inline
+void
+Triangulation_2<Gt, Tds>::
+delete_vertex(Vertex_handle v)
+{
+  _tds.delete_vertex(v);
+}
+
+// POINT LOCATION
+template <class Gt, class Tds >    
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+march_locate_1D(const Point& t,
+		Locate_type& lt,
+		int& li) const
+{
+  Face_handle ff = infinite_face();
+  int iv = ff->index(infinite_vertex());
+  Face_handle f = ff->neighbor(iv);
+  Orientation pqt = orientation(f->vertex(0)->point(), 
+				f->vertex(1)->point(),
+				t);
+  if(pqt == RIGHT_TURN || pqt == LEFT_TURN) {
+    lt = OUTSIDE_AFFINE_HULL;
+    li = 4 ;// should not be used
+    return Face_handle();
+  }
+
+  int i= f->index(ff);
+  if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) {
+    lt = OUTSIDE_CONVEX_HULL;
+    li = iv;
+    return ff;
+  }
+
+  if( xy_equal(t,f->vertex(1-i)->point()) ){
+    lt = VERTEX;
+    li=1-i;
+    return f;
+  }
+
+  ff = ff->neighbor(1-iv); //the other infinite face
+  iv = ff->index(infinite_vertex());
+  f = ff->neighbor(iv);
+  i = f->index(ff);
+  if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) {
+    lt = OUTSIDE_CONVEX_HULL;
+    li = iv;
+    return ff;
+  }
+  if( xy_equal(t,f->vertex(1-i)->point()) ){
+      lt = VERTEX;
+      li=1-i;
+    return f;
+  } 
+	
+  Finite_edges_iterator eit= finite_edges_begin();
+  Vertex_handle u,v;
+  for( ; eit != finite_edges_end() ; eit++) {
+    u = (*eit).first->vertex(0);
+    v = (*eit).first->vertex(1);
+    if(xy_equal(t,v->point())){
+      lt = VERTEX;
+      li = 1;
+      return (*eit).first;
+    }
+    if(collinear_between(u->point(), t, v->point())){
+      lt = EDGE;
+      li =  2;
+      return (*eit).first;
+    }
+  }
+  CGAL_triangulation_assertion(false);
+  return Face_handle();
+}
+
+template <class Gt, class Tds >    
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+march_locate_2D_LFC(Face_handle start,
+		const Point& t,
+		Locate_type& lt,
+		int& li) const
+{
+  //    CGAL_triangulation_precondition( ! is_infinite(start) );
+  const Point& p = start->vertex(0)->point();
+  const Point& q = start->vertex(1)->point();
+  const Point& r = start->vertex(2)->point();
+  if(xy_equal(t,p)) {
+    lt = VERTEX;
+    li = 0;
+    return start;
+  }
+
+  Line_face_circulator lfc;
+  
+  Orientation o2 = orientation(p, q, t);
+  Orientation o0 = orientation(q, r, t);
+  Orientation o1 = orientation(r, p, t);
+  if( (o2 == LEFT_TURN)&& (o1 == LEFT_TURN)) {
+    lfc = Line_face_circulator(start, 0,
+			       Line_face_circulator::vertex_edge, 
+			       this, p, t); 
+  } else if ( (o0 == LEFT_TURN)&& (o2 == LEFT_TURN)) {
+    lfc = Line_face_circulator(start, 1,
+			       Line_face_circulator::vertex_edge, 
+			       this, q, t); 
+  } else if ( (o1 == LEFT_TURN)&& (o0 == LEFT_TURN)) {
+    lfc = Line_face_circulator(start, 2,
+			       Line_face_circulator::vertex_edge, 
+			       this, r, t); 
+  } if( (o2 == RIGHT_TURN)&& (o1 == RIGHT_TURN)) {
+    lfc = Line_face_circulator(start, 0,
+			       Line_face_circulator::edge_vertex, 
+			       this, p, t); 
+  } else if ( (o0 == RIGHT_TURN)&& (o2 == RIGHT_TURN)) {
+    lfc = Line_face_circulator(start, 1,
+			       Line_face_circulator::edge_vertex, 
+			       this, q, t); 
+  } else if ( (o1 == RIGHT_TURN)&& (o0 == RIGHT_TURN)) {
+    lfc = Line_face_circulator(start, 2,
+			       Line_face_circulator::edge_vertex, 
+			       this, r, t); 
+  }else {
+    lfc = Line_face_circulator(start->vertex(0), this, t);
+  }
+  if(lfc==0 || lfc.collinear_outside()){
+    // point t lies outside or on the convex hull
+    // we walk on the convex hull to find it out
+    Face_circulator fc = incident_faces(infinite_vertex());
+    Face_circulator done(fc);
+    int ic = fc->index(infinite_vertex());
+    if (xy_equal(t,fc->vertex(cw(ic))->point())){
+      lt = VERTEX;
+      li = cw(ic);
+      return fc;
+     }
+    Orientation ori;
+    do{ // walking ccw around convex hull
+      ic = fc->index(infinite_vertex());
+      if (xy_equal(t,fc->vertex(ccw(ic))->point())){
+	lt = VERTEX;
+	li = ccw(ic);
+	return fc;
+      }
+      ori = orientation( fc->vertex(cw(ic))->point(),
+			 fc->vertex(ccw(ic))->point(), t);
+      if (ori == RIGHT_TURN) {
+	lt = OUTSIDE_CONVEX_HULL;
+	li = ic;
+	return fc;
+      }
+      if (ori == COLLINEAR &&
+	  collinear_between(fc->vertex(cw(ic))->point(),
+			    t, 
+			    fc->vertex(ccw(ic))->point()) ) {
+	lt = EDGE;
+	li = ic;
+	return fc;
+      }
+    } while (--fc != done);
+    //should not arrive there;
+    CGAL_triangulation_assertion(fc != done);
+  }
+	  
+  while(! lfc.locate(t, lt, li) ){
+    ++lfc;
+  }
+  return lfc;
+}    
+
+template <class Gt, class Tds >    
+void
+Triangulation_2<Gt, Tds>::
+compare_walks(const Point& p,
+	      Face_handle c1, Face_handle c2,
+	      Locate_type& lt1, Locate_type& lt2,
+	      int li1, int li2) const
+{
+  bool b = true;
+  b = b && (lt1 == lt2);
+  if((lt1 == lt2) && (lt1 == VERTEX)) {
+    b = b && ( c1->vertex(li1) == c2->vertex(li2) );
+  } else if((lt1 == lt2) && (lt1 == EDGE)) {
+    b = b && ((c1 == c2) || ( (c1->neighbor(li1) == c2) && (c2->neighbor(li2) == c1)));
+  }else if((lt1 == lt2) && (lt1  == OUTSIDE_CONVEX_HULL)) {
+    b = b && (is_infinite(c1) && is_infinite(c2));
+  } else {
+    b = b && (lt1 == lt2);
+    b = b && (lt1 == FACE);
+    b = b && (c1 == c2);
+  }
+  
+  if ( c1 != c2) {
+    std::cerr << "from compare_walks " << std::endl;
+    std::cerr << "point " << p << std::endl;
+    std::cerr << "locate 1 " << &*c1 << "\t" << lt1 << "\t" << li1 
+	      << std::endl;
+    std::cerr << "locate 2 " << &*c2 << "\t" << lt2 << "\t" << li2 
+	      << std::endl;
+    std::cerr << std::endl;
+    show_face(c1);
+    std::cerr << std::endl;
+    show_face(c2);
+    std::cerr << std::endl;
+  }
+    
+    CGAL_triangulation_assertion(b);
+}
+      
+
+#if 1
+
+template <class Gt, class Tds >   typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+march_locate_2D(Face_handle c,
+		const Point& t,
+		Locate_type& lt,
+		int& li) const
+{
+  CGAL_triangulation_assertion(! is_infinite(c));
+  
+  boost::rand48 rng;
+
+  boost::uniform_smallint<> two(0, 1);
+  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > coin(rng, two);
+
+  Face_handle prev = Face_handle();
+  bool first = true;
+  while (1) {
+    if ( is_infinite(c) ) {
+      // c must contain t in its interior
+      lt = OUTSIDE_CONVEX_HULL;
+      li = c->index(infinite_vertex());
+      return c;
+    }
+    
+    // else c is finite
+    // Instead of testing its edges in a random order we do the following
+    // until we find a neighbor to go further:
+    // As we come from prev we do not have to check the edge leading to prev
+    // Now we flip a coin in order to decide if we start checking the
+    // edge before or the edge after the edge leading to prev
+    // We do loop unrolling in order to find out if this is faster.
+    // In the very beginning we do not have a prev, but for the first step 
+    // we do not need randomness
+    int left_first = coin()%2;
+    
+    const Point & p0 = c->vertex( 0 )->point();
+    const Point & p1 = c->vertex( 1 )->point();
+    const Point & p2 = c->vertex( 2 )->point();
+    Orientation o0, o1, o2;
+
+    if(first){
+      prev = c;
+      first = false;
+      o0 = orientation(p0,p1,t);
+      if ( o0 == NEGATIVE ) {
+	c = c->neighbor( 2 );
+	continue;
+      }
+      o1 = orientation(p1,p2,t);
+      if ( o1 == NEGATIVE ) {
+	c = c->neighbor( 0 );
+	continue;
+      }
+      o2 = orientation(p2,p0,t);
+      if ( o2 == NEGATIVE ) {
+	c = c->neighbor( 1 );
+	continue;
+      }
+    } else if(left_first){
+      if(c->neighbor(0) == prev){
+	prev = c;
+	o0 = orientation(p0,p1,t);
+	if ( o0 == NEGATIVE ) {
+	  c = c->neighbor( 2 );
+	  continue;
+	}
+	o2 = orientation(p2,p0,t);
+	if ( o2 == NEGATIVE ) {
+	  c = c->neighbor( 1 );
+	  continue;
+	}
+        o1 = POSITIVE;
+      } else if(c->neighbor(1) == prev){
+	prev = c;
+	o1 = orientation(p1,p2,t);
+	if ( o1 == NEGATIVE ) {
+	  c = c->neighbor( 0 );
+	  continue;
+	}
+	o0 = orientation(p0,p1,t);
+	if ( o0 == NEGATIVE ) {
+	  c = c->neighbor( 2 );
+	  continue;
+	}
+        o2 = POSITIVE;
+      } else {
+	prev = c;
+	o2 = orientation(p2,p0,t);
+	if ( o2 == NEGATIVE ) {
+	  c = c->neighbor( 1 );
+	  continue;
+	}
+	o1 = orientation(p1,p2,t);
+	if ( o1 == NEGATIVE ) {
+	  c = c->neighbor( 0 );
+	  continue;
+	}
+        o0 = POSITIVE;
+      }
+      
+    } else { // right_first
+      if(c->neighbor(0) == prev){
+	prev = c;
+	o2 = orientation(p2,p0,t);
+	if ( o2 == NEGATIVE ) {
+	  c = c->neighbor( 1 );
+	  continue;
+	}
+	o0 = orientation(p0,p1,t);
+	if ( o0 == NEGATIVE ) {
+	  c = c->neighbor( 2 );
+	  continue;
+	}
+        o1 = POSITIVE;
+      } else if(c->neighbor(1) == prev){
+	prev = c;
+	o0 = orientation(p0,p1,t);
+	if ( o0 == NEGATIVE ) {
+	  c = c->neighbor( 2 );
+	  continue;
+	}
+	o1 = orientation(p1,p2,t);
+	if ( o1 == NEGATIVE ) {
+	  c = c->neighbor( 0 );
+	  continue;
+	}
+        o2 = POSITIVE;
+      } else {
+	prev = c;
+	o1 = orientation(p1,p2,t);
+	if ( o1 == NEGATIVE ) {
+	  c = c->neighbor( 0 );
+	  continue;
+	}
+	o2 = orientation(p2,p0,t);
+	if ( o2 == NEGATIVE ) {
+	  c = c->neighbor( 1 );
+	  continue;
+	}
+        o0 = POSITIVE;
+      }
+    }
+  
+    // now p is in c or on its boundary
+    int sum = ( o0 == COLLINEAR )
+      + ( o1 == COLLINEAR )
+      + ( o2 == COLLINEAR );
+    switch (sum) {
+    case 0:
+      {
+	lt = FACE;
+	li = 4;
+	break;
+      }
+    case 1:
+      {
+	lt = EDGE;
+	li = ( o0 == COLLINEAR ) ? 2 :
+	  ( o1 == COLLINEAR ) ? 0 :
+	  1;
+	break;
+      }
+    case 2:
+      {
+	lt = VERTEX;
+	li = ( o0 != COLLINEAR ) ? 2 :
+	  ( o1 != COLLINEAR ) ? 0 :
+	  1;
+	break;
+      }
+    }
+    return c;
+  }
+} 
+
+
+#else // not 1
+
+template <class Gt, class Tds >   typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+march_locate_2D(Face_handle c,
+		const Point& t,
+		Locate_type& lt,
+		int& li) const
+{
+  CGAL_triangulation_assertion(! is_infinite(c));
+
+  boost::uniform_smallint<> three(0, 2);
+  boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die3(rng, three);  
+
+  Face_handle prev = Face_handle();
+  while (1) {
+    if ( is_infinite(c) ) {
+      // c must contain t in its interior
+      lt = OUTSIDE_CONVEX_HULL;
+      li = c->index(infinite_vertex());
+      return c;
+    }
+
+    // else c is finite
+    // we test its edges in a random order until we find a
+    // neighbor to go further
+
+    int i = die3();
+    int ccwi = ccw(i);
+    int cwi = cw(i);
+    const Point & p0 = c->vertex( i )->point();
+    const Point & p1 = c->vertex( ccwi )->point();
+    Orientation o0, o1, o2;
+    CGAL_triangulation_assertion(orientation(p0,p1,c->vertex( cwi )->point())==POSITIVE);
+    if(c->neighbor(cwi) == prev){
+      o0 = POSITIVE;
+    } else {
+      o0 = orientation(p0,p1,t);
+      if ( o0 == NEGATIVE ) {
+	prev = c;
+	c = c->neighbor( cwi );
+	continue;
+      }
+    }
+    const Point & p2 = c->vertex( cwi )->point();
+    if(c->neighbor(i) == prev){
+      o1 = POSITIVE;
+    } else {
+      o1 = orientation(p1,p2,t);
+      if ( o1 == NEGATIVE ) {
+	prev = c;
+	c = c->neighbor( i );
+	continue;
+      }
+    }
+    if(c->neighbor(ccwi) == prev){
+      o2 = POSITIVE;
+    } else {
+      o2 = orientation(p2,p0,t);
+      if ( o2 == NEGATIVE ) {
+	prev = c;
+	c = c->neighbor( ccwi );
+	continue;
+      }
+    }
+
+    // now p is in c or on its boundary
+    int sum = ( o0 == COLLINEAR )
+      + ( o1 == COLLINEAR )
+      + ( o2 == COLLINEAR );
+    switch (sum) {
+    case 0:
+      {
+	lt = FACE;
+	li = 4;
+	break;
+      }
+    case 1:
+      {
+	lt = EDGE;
+	li = ( o0 == COLLINEAR ) ? cwi :
+	  ( o1 == COLLINEAR ) ? i :
+	  ccwi;
+	break;
+      }
+    case 2:
+      {
+	lt = VERTEX;
+	li = ( o0 != COLLINEAR ) ? cwi :
+	  ( o1 != COLLINEAR ) ? i :
+	  ccwi;
+	break;
+      }
+    }
+    return c;
+  }
+}    
+
+
+#endif // not 1
+
+
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt,Tds>::
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+locate(const Point& p,
+       Locate_type& lt,
+       int& li,
+       Face_handle start) const
+#else // no CGAL_NO_STRUCTURAL_FILTERING
+exact_locate(const Point& p,
+       Locate_type& lt,
+       int& li,
+       Face_handle start) const
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+{
+  if (dimension() < 0) {
+      lt = OUTSIDE_AFFINE_HULL;
+      li = 4; // li should not be used in this case
+      return Face_handle();
+  }
+  if( dimension() == 0) {
+      // Do not use finite_vertex directly because there can be hidden vertices
+      // (regular triangulations)
+      if (xy_equal(p,finite_vertex()->face()->vertex(0)->point())){
+	lt = VERTEX ;
+      }
+      else{
+	lt = OUTSIDE_AFFINE_HULL;
+      }
+      li = 4; // li should not be used in this case
+      return Face_handle();
+  }
+  if(dimension() == 1){
+    return march_locate_1D(p, lt, li);
+  }
+
+  if(start == Face_handle()){
+    start = infinite_face()->
+      neighbor(infinite_face()->index(infinite_vertex()));
+  }else if(is_infinite(start)){
+    start = start->neighbor(start->index(infinite_vertex()));
+  }
+
+#if ( ! defined(CGAL_ZIG_ZAG_WALK)) && ( ! defined(CGAL_LFC_WALK))
+#define CGAL_ZIG_ZAG_WALK
+#endif
+
+#ifdef CGAL_ZIG_ZAG_WALK
+  Face_handle res1 = march_locate_2D(start, p, lt, li);
+#endif
+#ifdef CGAL_LFC_WALK
+  Locate_type lt2;
+  int li2;
+  Face_handle res2 = march_locate_2D_LFC(start, p, lt2, li2);
+#endif
+
+#if defined(CGAL_ZIG_ZAG_WALK) && defined(CGAL_LFC_WALK)
+  compare_walks(p,
+		res1, res2,
+		lt, lt2,
+		li, li2);
+#endif
+
+#ifdef CGAL_ZIG_ZAG_WALK
+  return res1;
+#endif
+
+#ifdef CGAL_LFC_WALK
+  lt = lt2;
+  li = li2;
+  return res2;
+#endif
+
+}
+
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>:: Face_handle
+Triangulation_2<Gt, Tds>::
+locate(const Point &p,
+       Face_handle start) const
+{
+  Locate_type lt;
+  int li;
+  return locate(p, lt, li, start);
+}
+#else
+template <class Gt, class Tds >
+inline 
+typename Triangulation_2<Gt, Tds>::Face_handle
+Triangulation_2<Gt, Tds>::
+inexact_locate(const Point & t, Face_handle start, int n_of_turns) const
+{
+  if(dimension() < 2) return start;
+	
+  if(start == Face_handle()){
+    start = infinite_face()->
+      neighbor(infinite_face()->index(infinite_vertex()));
+  } else if(is_infinite(start)){
+    start = start->neighbor(start->index(infinite_vertex()));
+  }
+
+  Face_handle prev = Face_handle(), c = start;
+  bool first = true;
+  while (1) {
+	
+    if(!(n_of_turns--)) return c;
+
+    if ( is_infinite(c) ) return c;
+    
+    const Point & p0 = c->vertex( 0 )->point();
+    const Point & p1 = c->vertex( 1 )->point();
+    const Point & p2 = c->vertex( 2 )->point();
+
+    if(first) {
+      prev = c;
+      first = false;
+      if(has_inexact_negative_orientation(p0,p1,t) ) {
+        c = c->neighbor( 2 );
+        continue;
+      }
+      if(has_inexact_negative_orientation(p1,p2,t) ) {
+        c = c->neighbor( 0 );
+        continue;
+      }
+      if (has_inexact_negative_orientation(p2,p0,t) ) {
+        c = c->neighbor( 1 );
+        continue;
+      }
+    } else {
+      if(c->neighbor(0) == prev){
+        prev = c;
+        if (has_inexact_negative_orientation(p0,p1,t) ) {
+          c = c->neighbor( 2 );
+          continue;
+        }
+        if (has_inexact_negative_orientation(p2,p0,t) ) {
+          c = c->neighbor( 1 );
+          continue;
+        }
+      } else if(c->neighbor(1) == prev){
+        prev = c;
+        if (has_inexact_negative_orientation(p0,p1,t) ) {
+          c = c->neighbor( 2 );
+          continue;
+        }
+        if (has_inexact_negative_orientation(p1,p2,t) ) {
+          c = c->neighbor( 0 );
+          continue;
+        }
+      } else {
+        prev = c;
+        if (has_inexact_negative_orientation(p2,p0,t) ) {
+          c = c->neighbor( 1 );
+          continue;
+        }
+        if (has_inexact_negative_orientation(p1,p2,t) ) {
+          c = c->neighbor( 0 );
+          continue;
+        }
+      }  
+    } 
+    break;
+  }
+  return c;
+}
+
+template <class Gt, class Tds >
+inline
+bool
+Triangulation_2<Gt, Tds>::
+has_inexact_negative_orientation(const Point &p, const Point &q,
+                    const Point &r) const
+{ 
+  // So that this code works well with Lazy_kernel
+  internal::Static_filters_predicates::Get_approx<Point> get_approx;
+
+  const double px = to_double(get_approx(p).x()); 
+  const double py = to_double(get_approx(p).y());
+  const double qx = to_double(get_approx(q).x());
+  const double qy = to_double(get_approx(q).y());
+  const double rx = to_double(get_approx(r).x());
+  const double ry = to_double(get_approx(r).y());
+
+  const double pqx = qx - px;
+  const double pqy = qy - py;
+  const double prx = rx - px;
+  const double pry = ry - py;
+
+  return ( determinant(pqx, pqy, prx, pry) < 0);
+}
+
+#endif
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_faces_iterator
+Triangulation_2<Gt, Tds>::
+finite_faces_begin() const
+{
+  if ( dimension() < 2 )
+    return finite_faces_end();
+  return CGAL::filter_iterator( all_faces_end(),
+                                Infinite_tester(this),
+                                all_faces_begin() );
+} 
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_faces_iterator
+Triangulation_2<Gt, Tds>::
+finite_faces_end() const
+{
+  return CGAL::filter_iterator(  all_faces_end(),
+                                 Infinite_tester(this)   );
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_vertices_iterator
+Triangulation_2<Gt, Tds>::
+finite_vertices_begin() const
+{
+  if ( number_of_vertices() <= 0 ) 
+    return finite_vertices_end();
+  return CGAL::filter_iterator( all_vertices_end(),
+                                Infinite_tester(this),
+                                all_vertices_begin() );
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_vertices_iterator
+Triangulation_2<Gt, Tds>::
+finite_vertices_end() const
+{
+  return CGAL::filter_iterator(all_vertices_end(),
+                               Infinite_tester(this)); 
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_edges_iterator
+Triangulation_2<Gt, Tds>::
+finite_edges_begin() const
+{
+  if ( dimension() < 1 )
+    return finite_edges_end();
+  return CGAL::filter_iterator( all_edges_end(),
+                                infinite_tester(),
+                                all_edges_begin());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Finite_edges_iterator
+Triangulation_2<Gt, Tds>::
+finite_edges_end() const
+{
+  return CGAL::filter_iterator(all_edges_end(),
+                               infinite_tester() );
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Point_iterator
+Triangulation_2<Gt, Tds>::
+points_begin() const
+{
+  return Point_iterator(finite_vertices_begin());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Point_iterator
+Triangulation_2<Gt, Tds>::
+points_end() const
+{
+  return Point_iterator(finite_vertices_end());
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_faces_iterator
+Triangulation_2<Gt, Tds>::
+all_faces_begin() const
+{
+  return _tds.faces_begin();
+} 
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_faces_iterator
+Triangulation_2<Gt, Tds>::
+all_faces_end() const
+{
+  return _tds.faces_end();;
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_vertices_iterator
+Triangulation_2<Gt, Tds>::
+all_vertices_begin() const
+{
+  return _tds.vertices_begin();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_vertices_iterator
+Triangulation_2<Gt, Tds>::
+all_vertices_end() const
+{
+  return _tds.vertices_end();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_edges_iterator
+Triangulation_2<Gt, Tds>::
+all_edges_begin() const
+{
+  return _tds.edges_begin();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_edges_iterator
+Triangulation_2<Gt, Tds>::
+all_edges_end() const
+{
+  return _tds.edges_end();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_halfedges_iterator
+Triangulation_2<Gt, Tds>::
+all_halfedges_begin() const
+{
+  return _tds.halfedges_begin();
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::All_halfedges_iterator
+Triangulation_2<Gt, Tds>::
+all_halfedges_end() const
+{
+  return _tds.halfedges_end();
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::Face_circulator
+Triangulation_2<Gt, Tds>::
+incident_faces(Vertex_handle v, Face_handle f) const
+{
+  return _tds.incident_faces(v,f);
+}  
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::Vertex_circulator
+Triangulation_2<Gt, Tds>::  
+incident_vertices(Vertex_handle v, Face_handle f) const
+{
+  return _tds.incident_vertices(v,f);
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::Edge_circulator
+Triangulation_2<Gt, Tds>::    
+incident_edges(Vertex_handle v, Face_handle f) const
+{
+  return _tds.incident_edges(v,f);
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::size_type
+Triangulation_2<Gt, Tds>::    
+degree(Vertex_handle v) const
+{
+  return _tds.degree(v);
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::Vertex_handle
+Triangulation_2<Gt, Tds>::    
+mirror_vertex(Face_handle f, int i) const
+{
+  return _tds.mirror_vertex(f,i);
+}
+
+template <class Gt, class Tds >
+inline
+int
+Triangulation_2<Gt, Tds>::    
+mirror_index(Face_handle f, int i) const
+{
+  return _tds.mirror_index(f,i);
+}
+
+template <class Gt, class Tds >
+inline
+typename Triangulation_2<Gt, Tds>::Edge
+Triangulation_2<Gt, Tds>::    
+mirror_edge(const Edge e) const
+{
+  return _tds.mirror_edge(e);
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Line_face_circulator  
+Triangulation_2<Gt, Tds>::    
+line_walk(const Point& p, const Point& q,  Face_handle f) const
+{
+  CGAL_triangulation_precondition( (dimension() == 2) && 
+				! xy_equal(p,q));
+  Line_face_circulator lfc = (f == Face_handle())
+    ? Line_face_circulator(p, q, this)
+    : Line_face_circulator(p, q, f, this);
+    
+  // the following lines may be useless :
+  //  Line_face_circulator(p,q...) returns either a null circulator 
+  //  or a pointer to a finite face (to be checked)
+  if( (!lfc.is_empty()) && is_infinite( lfc )){
+    do {      ++lfc ;} 
+    while (is_infinite(lfc));
+  }
+  return lfc;
+}
+   
+template <class Gt, class Tds >
+Oriented_side
+Triangulation_2<Gt, Tds>::
+oriented_side(const Point &p0, const Point &p1,
+	      const Point &p2, const Point &p) const
+{
+  // return position of point p with respect to the oriented triangle p0p1p2
+  // depends on the orientation of the vertices
+  Bounded_side bs=bounded_side(p0,p1,p2,p);
+  if (bs == ON_BOUNDARY) return ON_ORIENTED_BOUNDARY;
+  Orientation      ot = orientation(p0, p1, p2);
+  if (bs == ON_BOUNDED_SIDE)
+    return (ot == LEFT_TURN) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE;
+  // bs == ON_UNBOUNDED_SIDE
+  return (ot == LEFT_TURN) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE;
+}
+
+
+
+template <class Gt, class Tds >
+Bounded_side
+Triangulation_2<Gt, Tds>::
+bounded_side(const Point &p0, const Point &p1,
+	     const Point &p2, const Point &p) const
+{
+  // return position of point p with respect to triangle p0p1p2
+  CGAL_triangulation_precondition( orientation(p0, p1, p2) != COLLINEAR);
+  Orientation o1 = orientation(p0, p1, p),
+              o2 = orientation(p1, p2, p),
+              o3 = orientation(p2, p0, p);
+    
+  if (o1 == COLLINEAR){
+    if (o2 == COLLINEAR ||  o3 == COLLINEAR) return ON_BOUNDARY;
+    if (collinear_between(p0, p, p1))        return ON_BOUNDARY;
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  if (o2 == COLLINEAR){
+    if (o3 == COLLINEAR)                     return ON_BOUNDARY;
+    if (collinear_between(p1, p, p2))        return ON_BOUNDARY;
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  if (o3 == COLLINEAR){
+    if (collinear_between(p2, p, p0))        return ON_BOUNDARY;
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  // from here none ot, o1, o2 and o3 are known to be non null
+    if (o1 == o2 && o2 == o3)  return ON_BOUNDED_SIDE;
+    return ON_UNBOUNDED_SIDE;
+}
+
+
+template <class Gt, class Tds >
+Oriented_side
+Triangulation_2<Gt, Tds>::
+oriented_side(Face_handle f, const Point &p) const
+{
+  CGAL_triangulation_precondition ( dimension()==2); 
+  return oriented_side(f->vertex(0)->point(),
+		       f->vertex(1)->point(),
+		       f->vertex(2)->point(),
+		       p);
+}
+
+
+template <class Gt, class Tds >
+Oriented_side
+Triangulation_2<Gt, Tds>::
+side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2,
+	                const Point &p, bool perturb) const
+{
+  //CGAL_triangulation_precondition( orientation(p0, p1, p2) == POSITIVE );
+  // no reason for such precondition and it invalidates fast removal in Delaunay
+
+    typename Gt::Side_of_oriented_circle_2 pred = geom_traits().side_of_oriented_circle_2_object();
+    Oriented_side os =
+	pred(p0, p1, p2, p);
+    if ((os != ON_ORIENTED_BOUNDARY) || (! perturb))
+	return os;
+
+    // We are now in a degenerate case => we do a symbolic perturbation.
+
+    // We sort the points lexicographically.
+    const Point * points[4] = {&p0, &p1, &p2, &p};
+    std::sort(points, points+4, Perturbation_order(this) );
+
+    // We successively look whether the leading monomial, then 2nd monomial
+    // of the determinant has non null coefficient.
+    // 2 iterations are enough if p0p1p2 is positive (cf paper)
+    for (int i=3; i>0; --i) {
+        if (points[i] == &p)
+            return ON_NEGATIVE_SIDE; // since p0 p1 p2 are non collinear
+	                             // and "conceptually" positively oriented
+        Orientation o;
+        if (points[i] == &p2 && (o = orientation(p0,p1,p)) != COLLINEAR )
+            return Oriented_side(o);
+        if (points[i] == &p1 && (o = orientation(p0,p,p2)) != COLLINEAR )
+            return Oriented_side(o);
+        if (points[i] == &p0 && (o = orientation(p,p1,p2)) != COLLINEAR )
+            return Oriented_side(o);
+    }
+    // CGAL_triangulation_assertion(false);
+    //no reason for such precondition and it invalidates fast removal in Delaunay
+    return ON_NEGATIVE_SIDE;
+}
+
+
+
+
+
+
+template < class Gt, class Tds >
+Oriented_side
+Triangulation_2<Gt,Tds>::
+side_of_oriented_circle(Face_handle f, const Point & p, bool perturb) const
+{
+  if ( ! is_infinite(f) ) {
+    /*
+    typename Gt::Side_of_oriented_circle_2 
+      in_circle = geom_traits().side_of_oriented_circle_2_object();
+    return in_circle(f->vertex(0)->point(),
+		     f->vertex(1)->point(),
+		     f->vertex(2)->point(),p);
+    */
+    return this->side_of_oriented_circle(f->vertex(0)->point(),
+		     f->vertex(1)->point(),
+		     f->vertex(2)->point(),p, perturb);
+  }
+
+  int i = f->index(infinite_vertex());
+  Orientation o = orientation(f->vertex(ccw(i))->point(),
+			      f->vertex(cw(i))->point(),
+			      p);
+  return (o == NEGATIVE) ? ON_NEGATIVE_SIDE :
+                (o == POSITIVE) ? ON_POSITIVE_SIDE :
+                      ON_ORIENTED_BOUNDARY;
+}
+
+
+
+template <class Gt, class Tds >
+bool
+Triangulation_2<Gt, Tds>::
+collinear_between(const Point& p, const Point& q, const Point& r) const
+{
+  // return true if point q is strictly between p and r
+  // p,q and r are supposed to be collinear points
+  Comparison_result c_pr = compare_x(p, r);
+  Comparison_result c_pq;
+  Comparison_result c_qr;
+  if(c_pr == EQUAL) {
+    //c_pr = compare_y(p, r);
+    c_pq = compare_y(p, q);
+    c_qr = compare_y(q, r);
+  } else {
+    c_pq = compare_x(p, q);
+    c_qr = compare_x(q, r);
+  }
+  return ( (c_pq == SMALLER) && (c_qr == SMALLER) ) ||
+         ( (c_pq == LARGER)  && (c_qr == LARGER) );
+    
+}
+
+template <class Gt, class Tds >
+inline
+Comparison_result
+Triangulation_2<Gt, Tds>::
+compare_x(const Point& p, const Point& q) const
+{
+  return geom_traits().compare_x_2_object()(p,q);
+}
+
+template <class Gt, class Tds >
+inline
+Comparison_result
+Triangulation_2<Gt, Tds>::
+compare_xy(const Point& p, const Point& q) const
+{
+  Comparison_result res = geom_traits().compare_x_2_object()(p,q);
+  if(res == EQUAL){
+    return geom_traits().compare_y_2_object()(p,q);
+  }
+  return res;
+}
+
+template <class Gt, class Tds >
+inline
+Comparison_result
+Triangulation_2<Gt, Tds>::
+compare_y(const Point& p, const Point& q) const
+{
+  return geom_traits().compare_y_2_object()(p,q);
+}
+
+template <class Gt, class Tds >
+inline
+bool
+Triangulation_2<Gt, Tds>::
+xy_equal(const Point& p, const Point& q) const
+{
+  return compare_x(p,q)== EQUAL && compare_y(p,q)== EQUAL ;
+}
+
+template <class Gt, class Tds >
+inline
+Orientation
+Triangulation_2<Gt, Tds>::
+orientation(const Point& p, const Point& q,const Point& r ) const
+{
+  return geom_traits().orientation_2_object()(p,q,r);
+}
+
+template<class Gt, class Tds>
+inline
+typename Triangulation_2<Gt,Tds>::Point
+Triangulation_2<Gt,Tds>::
+circumcenter (const Point& p0, const Point& p1, const Point&  p2) const
+{
+  return 
+    geom_traits().construct_circumcenter_2_object()(p0,p1,p2);
+}
+
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Point
+Triangulation_2<Gt, Tds>::
+circumcenter(Face_handle  f) const
+{
+  CGAL_triangulation_precondition (dimension()==2);
+  // typename Gt::Construct_circumcenter_2
+//     circumcenter = geom_traits().construct_circumcenter_2_object();
+  return circumcenter((f->vertex(0))->point(), 
+		      (f->vertex(1))->point(), 
+		      (f->vertex(2))->point());
+}
+
+ 
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+show_all() const
+{
+  std::cerr<< "AFFICHE TOUTE LA TRIANGULATION :"<<std::endl;
+  std::cerr << std::endl<<"====> "<< this; 
+  std::cerr <<  " dimension " <<  dimension() << std::endl;
+  std::cerr << "nb of vertices " << number_of_vertices() << std::endl;
+    
+  if (dimension() < 1) return;
+  if(dimension() == 1) {
+    std::cerr<<" all edges "<<std::endl; 
+    All_edges_iterator aeit;
+    for(aeit = all_edges_begin(); aeit != all_edges_end(); aeit++){
+      show_face(aeit->first);
+    }
+    return;
+  }
+
+  std::cerr<<" faces finies "<<std::endl;
+  Finite_faces_iterator fi;
+  for(fi = finite_faces_begin(); fi != finite_faces_end(); fi++) {
+    show_face(fi);
+  }
+
+  std::cerr <<" faces infinies "<<std::endl;
+  All_faces_iterator afi;
+  for(afi = all_faces_begin(); afi != all_faces_end(); afi++) {
+    if(is_infinite(afi)) show_face(afi);
+  }
+  
+  if (number_of_vertices()>1) {
+    std::cerr << "affichage des sommets de la triangulation reguliere"
+	      <<std::endl;
+    All_vertices_iterator vi;
+    for( vi = all_vertices_begin(); vi != all_vertices_end(); vi++){
+      show_vertex(vi);
+      std::cerr << "  / face associee : "
+	     << (void*)(&(*(vi->face())))<< std::endl;;
+      }
+      std::cerr<<std::endl;
+  }
+  return;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+show_vertex(Vertex_handle vh) const
+{
+  if(is_infinite(vh)) std::cerr << "inf \t";
+  else std::cerr << vh->point() << "\t";
+  return;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+show_face(Face_handle fh) const
+{
+  std::cerr << "face : "<<(void*)&(*fh)<<" => "<<std::endl;
+  int i = fh->dimension(); 
+  switch(i){
+  case 0:
+    std::cerr <<"point :" ; show_vertex(fh->vertex(0));
+    std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
+    std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
+    std::cerr <<"]"  << std::endl;
+    break;
+  case 1:
+     std::cerr <<"point :" ; show_vertex(fh->vertex(0));
+     std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
+     std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
+     std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1));
+     std::cerr <<"]" <<std::endl;
+
+     std::cerr <<"point :" ; show_vertex(fh->vertex(1));
+     std::cerr <<" / voisin " << &(*(fh->neighbor(1)));
+     std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0));
+     std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1));
+     std::cerr <<"]" <<std::endl;
+     break;
+  case 2:
+    std::cerr <<"point :" ; show_vertex(fh->vertex(0));
+    std::cerr <<" / voisin " << &(*(fh->neighbor(0)));
+    std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(2));
+    std::cerr <<"]" <<std::endl;
+
+    std::cerr <<"point :" ; show_vertex(fh->vertex(1));
+    std::cerr <<" / voisin " << &(*(fh->neighbor(1)));
+    std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(2));
+    std::cerr <<"]" <<std::endl;
+
+    std::cerr <<"point :" ; show_vertex(fh->vertex(2));
+    std::cerr <<" / voisin " << &(*(fh->neighbor(2)));
+    std::cerr <<"[" ; show_vertex(fh->neighbor(2)->vertex(0));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(1));
+    std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(2));
+    std::cerr <<"]" <<std::endl;
+    break;
+  }
+  return;
+}
+
+template <class Gt, class Tds >
+void
+Triangulation_2<Gt, Tds>::
+file_output(std::ostream& os) const
+{
+  _tds.file_output(os, infinite_vertex(), true);
+}
+
+template <class Gt, class Tds >
+typename Triangulation_2<Gt, Tds>::Vertex_handle
+Triangulation_2<Gt, Tds>::
+file_input(std::istream& is)
+{
+  clear();
+  Vertex_handle v= _tds.file_input(is, true);
+  set_infinite_vertex(v);
+  return v;
+}
+
+template <class Gt, class Tds >
+std::ostream&
+operator<<(std::ostream& os, const Triangulation_2<Gt, Tds> &tr)
+{
+  tr.file_output(os);
+  return os ;
+}
+
+
+
+template < class Gt, class Tds >
+std::istream&
+operator>>(std::istream& is, Triangulation_2<Gt, Tds> &tr)
+{
+  tr.file_input(is);
+  CGAL_triangulation_assertion(tr.is_valid());
+  return is;
+}
+ 
+} //namespace CGAL
+    
+
+#endif //CGAL_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2/insert_constraints.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2/insert_constraints.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_2/insert_constraints.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_2/insert_constraints.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_filtered_projection_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_filtered_projection_traits_3.h
new file mode 100644
index 0000000..96b6830
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_filtered_projection_traits_3.h
@@ -0,0 +1,85 @@
+ // Copyright (c) 2009  GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+
+#ifndef CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
+#define CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
+
+#include <CGAL/Triangulation_2_projection_traits_3.h>
+#include <CGAL/Filtered_predicate.h>
+
+namespace CGAL {
+
+template < class Filtered_kernel >
+class Triangulation_2_filtered_projection_traits_3
+  : public Triangulation_2_projection_traits_3<Filtered_kernel>
+{
+  typedef Filtered_kernel K;
+  typedef Triangulation_2_filtered_projection_traits_3<K> Self;
+  typedef Triangulation_2_projection_traits_3<K> Base;
+
+  typedef typename K::Exact_kernel Exact_kernel;
+  typedef typename K::Approximate_kernel Approximate_kernel;
+  typedef typename K::C2E C2E;
+  typedef typename K::C2F C2F;
+
+public:
+  typedef Triangulation_2_projection_traits_3<Exact_kernel> Exact_traits;
+  typedef Triangulation_2_projection_traits_3<Approximate_kernel> Filtering_traits;
+
+public:
+  explicit Triangulation_2_filtered_projection_traits_3(const typename K::Vector_3& n)
+    : Base(n)
+  {
+  }
+
+#define CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(P, Pf, ACCESSOR)    \
+  typedef  Filtered_predicate< \
+    typename Exact_traits::P, \
+    typename Filtering_traits::P, \
+    C2E, \
+    C2F > P; \
+  P Pf() const { \
+    return P(this->ACCESSOR()); \
+  }
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Orientation_2,
+                                               orientation_2_object,
+                                               normal)
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Side_of_oriented_circle_2,
+                                               side_of_oriented_circle_2_object,
+                                               normal)
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Less_x_2,
+					       less_x_2_object,
+					       base1)
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Less_y_2,
+					       less_y_2_object,
+					       base2)
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Compare_x_2,
+					       compare_x_2_object,
+					       base1)
+  CGAL_TRIANGULATION_2_PROJ_TRAITS_FILTER_PRED(Compare_y_2,
+					       compare_y_2_object,
+					       base2)
+}; // end class Triangulation_2_projection_traits_3<Filtered_kernel>
+
+} // end namespace CGAL
+
+
+#endif // CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_projection_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_projection_traits_3.h
new file mode 100644
index 0000000..36b584e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_projection_traits_3.h
@@ -0,0 +1,487 @@
+// Copyright (c) 2009  GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+
+#ifndef CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
+#define CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
+
+#include <CGAL/Profile_timer.h>
+#include <CGAL/intersections.h>
+
+namespace CGAL {
+
+namespace TriangulationProjectionTraitsCartesianFunctors {
+
+template <class Traits>
+class Projected_orientation_with_normal_3
+{
+  // private members
+  const typename Traits::Vector_3 normal;
+
+  // private type aliases
+  typedef typename Traits::K K;
+  typedef typename Traits::Point_2 Point;
+  typedef typename Traits::Vector_3 Vector_3;
+public:
+  typedef typename K::Orientation Orientation;
+  typedef Orientation result_type;
+
+  Projected_orientation_with_normal_3(const Vector_3& normal_)
+    : normal(normal_)
+  {
+    CGAL_PROFILER("Construct Projected_orientation_with_normal_3.")
+    CGAL_TIME_PROFILER("Construct Projected_orientation_with_normal_3")
+  }
+
+  Orientation operator()(const Point& p,
+			 const Point& q,
+			 const Point& r) const
+  {    
+    CGAL_PROFILER("Projected_orientation_with_normal_3::operator()");
+    CGAL_TIME_PROFILER("Projected_orientation_with_normal_3::operator()");
+    return orientation(q-p, r-p, normal);
+  }
+}; // end class Projected_orientation_with_normal_3<Traits>
+
+template <class Traits>
+class Projected_side_of_oriented_circle_with_normal_3
+{
+  // private members
+  const typename Traits::Vector_3 normal;
+
+  // private types aliases
+  typedef typename Traits::K K;
+  typedef typename Traits::Point_2 Point;
+  typedef typename Traits::Vector_3 Vector_3;
+  typedef typename Traits::FT FT;
+
+  typedef Projected_side_of_oriented_circle_with_normal_3<Traits> Self;
+
+public:
+  typedef typename K::Oriented_side Oriented_side;
+  typedef Oriented_side result_type;
+
+  Projected_side_of_oriented_circle_with_normal_3(const Vector_3& normal_)
+    : normal(normal_)
+  {
+    CGAL_PROFILER("Construct Projected_side_of_oriented_circle_with_normal_3.")
+    CGAL_TIME_PROFILER("Construct Projected_side_of_oriented_circle_with_normal_3.")
+  }
+
+  Oriented_side operator()(const Point& p,
+			   const Point& q,
+			   const Point& r,
+			   const Point& t) const
+  {
+    CGAL_PROFILER("Projected_side_of_oriented_circle_with_normal_3::operator()")
+    CGAL_TIME_PROFILER("Projected_side_of_oriented_circle_with_normal_3::operator()")
+    const Vector_3& u = normal;
+
+    const Vector_3 tp = p - t;
+    const Vector_3 tq = q - t;
+    const Vector_3 tr = r - t;
+
+    const FT tp2 = tp * tp;
+    const FT tq2 = tq * tq;
+    const FT tr2 = tr * tr;
+    const FT u2  =  u * u;
+
+    const FT k_p = tp * u;
+    const FT k_q = tq * u;
+    const FT k_r = tr * u;
+
+    return 
+       sign_of_determinant(tp.x(), tp.y(), tp.z(), (tp2 + k_p) * u2 - k_p * k_p,
+			   tr.x(), tr.y(), tr.z(), (tr2 + k_r) * u2 - k_r * k_r,
+			   tq.x(), tq.y(), tq.z(), (tq2 + k_q) * u2 - k_q * k_q,
+                           u.x(),  u.y(),  u.z(), u2 * u2);
+    // Note that q and r have been swapped in the determinant above, to
+    // inverse its sign.
+  }
+}; // end class Projected_side_of_oriented_circle_with_normal_3
+
+template <class Traits>
+class Projected_squared_distance_with_normal_3
+{
+  // private members
+  const typename Traits::Vector_3 normal;
+  
+  // private types aliases
+  typedef typename Traits::K K;
+  typedef typename Traits::Point_2 Point;
+  typedef typename Traits::Line_2 Line;
+  typedef typename Traits::Vector_3 Vector_3;
+  typedef typename Traits::FT FT;
+
+public:
+  Projected_squared_distance_with_normal_3(const Vector_3& normal_)
+    : normal(normal_)
+  {
+    CGAL_PROFILER("Construct Projected_squared_distance_with_normal_3.")
+    CGAL_TIME_PROFILER("Construct Projected_squared_distance_with_normal_3")
+  }
+
+  FT operator()(const Point& p, const Point& q)
+  {
+    return squared_distance(p, q);
+  }
+
+  FT operator()(const Line& line, const Point& p)
+  {
+    CGAL_PROFILER("Projected_squared_distance_with_normal_3::operator()")
+    CGAL_TIME_PROFILER("Projected_squared_distance_with_normal_3::operator()")
+    const Vector_3& vl = line.to_vector();
+    const Point& pl = line.point();
+    const Vector_3 v = cross_product(normal,
+                                     vl);
+    if(v == NULL_VECTOR) {
+      // den == 0 if the line is vertical
+      // In that case, the distance is the distance to the line
+      const Vector_3 w = cross_product(pl - p,
+                                       vl);
+      return (w * w) / (vl * vl);
+    }
+    else {
+      const FT det = determinant(normal, 
+                                 vl, 
+                                 pl - p);
+      return (det * det) / ( v * v );
+    }
+  }
+}; // end class Projected_squared_distance_with_normal_3
+
+template <class Traits>
+class Projected_intersect_3
+{
+  // private members
+  const typename Traits::Vector_3 normal;
+  
+  // private types aliases
+  typedef typename Traits::K K;
+  typedef typename Traits::Point_2 Point;
+  typedef typename Traits::Line_2 Line;
+  typedef typename Traits::Segment_2 Segment;
+  typedef typename K::Plane_3 Plane_3;
+  typedef typename Traits::Vector_3 Vector_3;
+  typedef typename Traits::FT FT;
+public:
+  Projected_intersect_3(const Vector_3& normal_)
+    : normal(normal_)
+  {
+    CGAL_PROFILER("Construct Projected_intersect_3")
+    CGAL_TIME_PROFILER("Construct Projected_intersect_3")
+  }
+
+  Object operator()(const Segment& s1, const Segment& s2)
+  {
+    CGAL_PROFILER("Projected_intersect_3::operator()")
+    CGAL_TIME_PROFILER("Projected_intersect_3::operator()")
+    const Vector_3 u1 = cross_product(s1.to_vector(), normal);
+    if(u1 == NULL_VECTOR)
+      return K().intersect_3_object()(s1.supporting_line(), s2);
+
+    const Vector_3 u2 = cross_product(s2.to_vector(), normal);
+    if(u2 == NULL_VECTOR)
+      return K().intersect_3_object()(s1, s2.supporting_line());
+    
+    const Plane_3 plane_1(s1.source(), u1);
+    const Plane_3 plane_2(s2.source(), u2);
+    
+    Object planes_intersection = intersection(plane_1, plane_2);
+    if(planes_intersection.empty()) {
+      std::cerr << "planes_intersection is empty\n";
+      return planes_intersection;
+    }
+    if(const Line* line = object_cast<Line>(&planes_intersection))
+    {
+      const Point& pi = line->point(0);
+      if(cross_product(normal, pi - s1.source())
+         * cross_product(normal, pi - s1.target()) > FT(0)
+         ||
+         cross_product(normal, pi - s2.source())
+         * cross_product(normal, pi - s2.target()) > FT(0) )
+      {
+        // the intersection of the lines is not inside the segments
+        std::cerr << "intersection not inside\n";
+        return Object();
+      }
+      else
+      {
+        // Let the plane passing through s1.source() and with normal
+        // the cross product of s1.to_vector() and s2.to_vector(). That
+        // plane should intersect *l, now.
+        return intersection(*line, Plane_3(s1.source(), 
+                                           cross_product(s1.to_vector(),
+                                                         s2.to_vector())));
+      }
+    }
+    if(object_cast<Plane_3>(&planes_intersection))
+    {
+      std::cerr << "coplanar lines\n";
+      CGAL_error();
+      return Object();
+    }
+    return Object();
+  }
+}; // end class Projected_intersect_3
+
+
+template <class Traits>
+class Less_along_axis
+{
+  // private members
+  typedef typename Traits::Vector_3 Vector_3;
+  typedef typename Traits::Point_2 Point;
+  const Vector_3 base;
+public:
+  Less_along_axis(const Vector_3& base) : base(base)
+  {
+    CGAL_PROFILER("Construct Less_along_axis")
+    CGAL_TIME_PROFILER("Construct Less_along_axis")
+  }
+
+  typedef bool result_type;
+
+  bool operator() (const Point &p, const Point &q) const {
+    return base * (p - q) < 0;
+  }
+}; // end class Less_along_axis
+
+template <class Traits>
+class Compare_along_axis
+{
+  // private members
+  typedef typename Traits::Vector_3 Vector_3;
+  typedef typename Traits::Point_2 Point;
+  const Vector_3 base;
+public:
+  Compare_along_axis(const Vector_3& base) : base(base)
+  {
+    CGAL_PROFILER("Construct Compare_along_axis")
+    CGAL_TIME_PROFILER("Construct Compare_along_axis")
+  }
+
+  typedef Comparison_result result_type;
+
+  Comparison_result operator() (const Point &p, const Point &q) const {
+    return compare(base * (p - q), 0);
+  }
+}; // end class Compare_along_axis
+
+} // end namespace TriangulationProjectionTraitsCartesianFunctors
+
+
+template < class Kernel >
+class Triangulation_2_projection_traits_3
+{
+  typedef Triangulation_2_projection_traits_3<Kernel> Self;
+
+  typename Kernel::Vector_3 n, b1, b2;
+
+public:
+  typedef typename Kernel::Vector_3 Vector_3;
+
+
+  explicit Triangulation_2_projection_traits_3(const Vector_3& n_)
+    : n(n_)
+  {
+    typedef typename Kernel::FT FT;
+    typedef typename Kernel::Vector_3 Vector_3;
+
+    const FT& nx = n.x();
+    const FT& ny = n.y();
+    const FT& nz = n.z();
+    if(CGAL::abs(nz) >= CGAL::abs(ny)) {
+      b1 = Vector_3(nz, 0, -nx);
+    }
+    else {
+      b1 = Vector_3(ny, -nx, 0);
+    }
+    b2 = cross_product(n, b1);
+  }
+
+  const Vector_3& normal() const
+  {
+    return n;
+  }
+
+  const Vector_3& base1() const{
+    return b1;
+  }
+
+  const Vector_3& base2() const{
+    return b2;
+  }
+
+  typedef Kernel K;
+  typedef typename K::FT          FT;
+  typedef typename K::Point_3     Point_2;
+  typedef typename K::Segment_3   Segment_2;
+  typedef typename K::Vector_3    Vector_2;
+  typedef typename K::Triangle_3  Triangle_2;
+  typedef typename K::Line_3      Line_2;
+
+  typedef typename K::Angle_3                                Angle_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Compare_along_axis<Self>                                 Compare_x_2;
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Compare_along_axis<Self>                                 Compare_y_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Less_along_axis<Self>                                    Less_x_2;
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Less_along_axis<Self>                                    Less_y_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Projected_orientation_with_normal_3<Self>                Orientation_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+    Projected_side_of_oriented_circle_with_normal_3<Self>    Side_of_oriented_circle_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+  Projected_squared_distance_with_normal_3<Self>             Compute_squared_distance_2;
+
+  typedef TriangulationProjectionTraitsCartesianFunctors::
+  Projected_intersect_3<Self>                                Intersect_2;
+
+  typedef typename K::Construct_segment_3  Construct_segment_2;
+  typedef typename K::Construct_vector_3   Construct_vector_2;
+  typedef typename K::Construct_line_3     Construct_line_2;
+  typedef typename K::Construct_triangle_3 Construct_triangle_2;
+
+  typedef typename K::Construct_scaled_vector_3     Construct_scaled_vector_2;
+  typedef typename K::Construct_translated_point_3  Construct_translated_point_2;
+  typedef typename K::Construct_midpoint_3          Construct_midpoint_2;
+  typedef typename K::Construct_circumcenter_3      Construct_circumcenter_2;
+
+  typedef typename K::Compute_area_3                Compute_area_2;
+
+  Less_x_2
+  less_x_2_object() const
+  {
+    return Less_x_2(this->base1());
+  }
+
+  Less_y_2
+  less_y_2_object() const
+  {
+    return Less_y_2(this->base2());
+  }
+
+  Compare_x_2
+  compare_x_2_object() const
+  {
+    return Compare_x_2(this->base1());
+  }
+
+  Compare_y_2
+  compare_y_2_object() const
+  { 
+    return Compare_y_2(this->base2());
+  }
+
+  Orientation_2 
+  orientation_2_object() const
+  {
+    return Orientation_2(this->normal()); 
+  }
+
+  Side_of_oriented_circle_2
+  side_of_oriented_circle_2_object() const
+  {
+    return Side_of_oriented_circle_2(this->normal());
+  }
+  
+  Compute_squared_distance_2
+  compute_squared_distance_2_object() const
+  {
+    return Compute_squared_distance_2(this->normal());
+  }
+  
+  Intersect_2
+  intersect_2_object () const
+  {
+    return Intersect_2(this->normal());
+  }
+
+  Angle_2  angle_2_object() const
+    {return Angle_2();}
+
+  Construct_segment_2  construct_segment_2_object() const
+    {return Construct_segment_2();}
+  
+  Construct_vector_2  construct_vector_2_object() const
+    {return Construct_vector_2();}
+
+  Construct_scaled_vector_2  construct_scaled_vector_2_object() const
+    {return Construct_scaled_vector_2();}
+
+  Construct_midpoint_2  construct_midpoint_2_object() const
+    {return Construct_midpoint_2();}
+
+  Construct_circumcenter_2  construct_circumcenter_2_object() const
+    {return Construct_circumcenter_2();}
+
+  Construct_translated_point_2  construct_translated_point_2_object() const
+    {return Construct_translated_point_2();}
+
+  Construct_line_2  construct_line_2_object() const
+    {return Construct_line_2();}
+  
+  Construct_triangle_2  construct_triangle_2_object() const
+    {return Construct_triangle_2();}
+
+  Compute_area_2 compute_area_2_object() const
+  {return Compute_area_2();}
+    
+
+
+  // Special functor, not in the Kernel concept
+  class Projection_to_plan {
+    // Remeber: Point_2 is K::Point_3
+    const Point_2& plane_point;
+    const Vector_3& normal;
+  public:
+    // Return the projection of a point to a plane passing through 
+    // the point 'plane_point' and with orthogonal vector normal().
+    Projection_to_plan(const Point_2& plane_point_, const Self& self)
+      : plane_point(plane_point_),
+        normal(self.normal())
+    {}
+
+    Point_2 operator()(const Point_2& point) const 
+    {
+      return point +
+        ( ( (plane_point - point) * normal ) / (normal * normal) ) * normal;
+    }
+  }; // end Projection_to_plan
+
+  Projection_to_plan projection_to_plan_object(const Point_2& plane_point) const
+  {
+    return Projection_to_plan(plane_point, *this);
+  }
+
+}; // end class Triangulation_2_projection_traits_3<Kernel>
+  
+
+} // end namespace CGAL
+
+#endif // CGAL_TRIANGULATION_2_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_2_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_2_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_3.h
new file mode 100644
index 0000000..743593c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_3.h
@@ -0,0 +1,6687 @@
+// Copyright (c) 1999-2003  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion
+//                 Clement Jamin
+
+#ifndef CGAL_TRIANGULATION_3_H
+#define CGAL_TRIANGULATION_3_H
+
+#include <CGAL/basic.h>
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+# define CGAL_PROFILE
+# include <CGAL/Profile_counter.h>
+#endif
+
+#include <iostream>
+#include <list>
+#include <set>
+#include <map>
+#include <utility>
+#include <stack>
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Triangulation_utils_3.h>
+
+#include <CGAL/Triangulation_data_structure_3.h>
+#include <CGAL/Triangulation_cell_base_3.h>
+#include <CGAL/Triangulation_vertex_base_3.h>
+
+#include <CGAL/spatial_sort.h>
+
+#include <CGAL/iterator.h>
+#include <CGAL/function_objects.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Spatial_lock_grid_3.h>
+
+#include <boost/bind.hpp>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/random/uniform_smallint.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/mpl/if.hpp>
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+#include <CGAL/internal/Static_filters/tools.h>
+#include <CGAL/Triangulation_structural_filtering_traits.h>
+#include <CGAL/determinant.h>
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+#ifdef CGAL_LINKED_WITH_TBB
+# include <tbb/scalable_allocator.h>
+#endif
+
+#define CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
+
+namespace CGAL {
+
+template < class GT, class Tds = Default,
+           class Lock_data_structure = Default >
+class Triangulation_3;
+
+template < class GT, class Tds, class Lds > std::istream& operator>>
+(std::istream& is, Triangulation_3<GT,Tds,Lds> &tr);
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+namespace internal {
+// structural filtering is performed only for EPIC
+struct Structural_filtering_3_tag {};
+struct No_structural_filtering_3_tag {};
+
+template <bool filter>
+struct Structural_filtering_selector_3 {
+#ifdef FORCE_STRUCTURAL_FILTERING
+  typedef Structural_filtering_3_tag  Tag;
+#else
+  typedef No_structural_filtering_3_tag  Tag;
+#endif
+};
+
+template <>
+struct Structural_filtering_selector_3<true> {
+  typedef Structural_filtering_3_tag  Tag;
+};
+}
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+/************************************************
+// Class Triangulation_3_base
+// Two versions: Sequential (no locking) / Parallel (with locking)
+************************************************/
+
+// Sequential (without locking)
+template <typename Concurrency_tag, typename Lock_data_structure_>
+class Triangulation_3_base
+{
+public:
+  // If Lock_data_structure_ = Default => void
+  typedef typename Default::Get<
+    Lock_data_structure_, void>::type Lock_data_structure;
+
+protected:
+  Triangulation_3_base()  {}
+
+  Triangulation_3_base(Lock_data_structure *) {}
+
+  void swap(Triangulation_3_base<Concurrency_tag, Lock_data_structure_> &){}
+
+  template <typename Vertex_triple, typename Facet>
+  struct Vertex_triple_Facet_map_generator
+  {
+    typedef std::map<Vertex_triple, Facet> type;
+  };
+
+  template <typename Vertex_handle>
+  struct Vertex_handle_unique_hash_map_generator
+  {
+    typedef Unique_hash_map<Vertex_handle,
+                            Vertex_handle,
+                            Handle_hash_function> type;
+  };
+
+public:
+  bool is_parallel() const
+  {
+    return false;
+  }
+
+  // LOCKS (no-op functions)
+
+  template <typename Point_3>
+  bool try_lock_point(const Point_3 &, int = 0) const
+  { return true; }
+
+  template <typename Vertex_handle>
+  bool try_lock_vertex(const Vertex_handle &, int = 0) const
+  { return true; }
+
+  template <typename Cell_handle>
+  bool try_lock_cell(const Cell_handle &, int = 0) const
+  { return true; }
+
+  template <typename Facet>
+  bool try_lock_facet(const Facet &, int = 0) const
+  { return true; }
+
+  template <typename P3>
+  bool is_point_locked_by_this_thread(const P3 &) const
+  { return false; }
+
+  template <typename Cell_handle>
+  bool is_cell_locked_by_this_thread(const Cell_handle &) const
+  { return false; }
+
+  void *get_lock_data_structure() const
+  {
+    return 0;
+  }
+
+  void set_lock_data_structure(void *) const
+  {
+  }
+
+  void unlock_all_elements() const {}
+  template <typename P3> void unlock_all_elements_but_one_point(const P3 &) const {}
+
+  const Bbox_3 *get_bbox() const
+  {
+    return NULL;
+  }
+};
+
+#ifdef CGAL_LINKED_WITH_TBB
+// Parallel (with locking)
+template <typename Lock_data_structure_>
+class Triangulation_3_base<Parallel_tag, Lock_data_structure_>
+{
+public:
+  // If Lock_data_structure_ = Default => use Spatial_lock_grid_3
+  typedef typename Default::Get<
+    Lock_data_structure_, Spatial_lock_grid_3<Tag_priority_blocking> >
+    ::type Lock_data_structure;
+
+protected:
+  Triangulation_3_base()
+    : m_lock_ds(0) {}
+
+  Triangulation_3_base(Lock_data_structure *lock_ds)
+    : m_lock_ds(lock_ds) {}
+
+  void swap(Triangulation_3_base<Parallel_tag, Lock_data_structure_> &tr)
+  {
+    std::swap(tr.m_lock_ds, m_lock_ds);
+  }
+
+  template <typename Vertex_triple, typename Facet>
+  struct Vertex_triple_Facet_map_generator
+  {
+    typedef std::map
+    <
+      Vertex_triple,
+      Facet,
+      std::less<Vertex_triple>,
+      tbb::scalable_allocator<std::pair<const Vertex_triple, Facet> >
+    > type;
+  };
+
+  template <typename Vertex_handle>
+  struct Vertex_handle_unique_hash_map_generator
+  {
+    typedef Unique_hash_map<Vertex_handle,
+                            Vertex_handle,
+                            Handle_hash_function,
+                            tbb::scalable_allocator<Vertex_handle> > type;
+  };
+
+public:
+
+  bool is_parallel() const
+  {
+    return m_lock_ds != 0;
+  }
+
+  // LOCKS
+  template <typename Point_3>
+  bool try_lock_point(const Point_3 &p, int lock_radius = 0) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      locked = m_lock_ds->try_lock(p, lock_radius);
+    }
+    return locked;
+  }
+
+  template <typename Vertex_handle>
+  bool try_lock_vertex(const Vertex_handle &vh, int lock_radius = 0) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      locked = m_lock_ds->try_lock(vh->point(), lock_radius);
+    }
+    return locked;
+  }
+
+  template <typename Cell_handle>
+  bool try_lock_cell(const Cell_handle &cell_handle, int lock_radius = 0) const
+  {
+    bool success = true;
+    // Lock the element area on the grid
+    for (int iVertex = 0 ; success && iVertex < 4 ; ++iVertex)
+    {
+      success = try_lock_vertex(cell_handle->vertex(iVertex), lock_radius);
+    }
+    return success;
+  }
+
+  template <typename Facet>
+  bool try_lock_facet(const Facet &facet, int lock_radius = 0) const
+  {
+    bool success = true;
+
+    // Lock the element area on the grid
+    for (int iVertex = (facet.second+1)&3 ;
+          success && iVertex != facet.second ; iVertex = (iVertex+1)&3)
+    {
+      success = try_lock_vertex(facet.first->vertex(iVertex), lock_radius);
+    }
+
+    return success;
+  }
+
+  template <typename P3>
+  bool is_point_locked_by_this_thread(const P3 &p) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      locked = m_lock_ds->is_locked_by_this_thread(p);
+    }
+    return locked;
+  }
+
+  template <typename Cell_handle>
+  bool is_cell_locked_by_this_thread(const Cell_handle &cell_handle) const
+  {
+    bool locked = true;
+    if (m_lock_ds)
+    {
+      for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
+      {
+        locked = m_lock_ds->is_locked_by_this_thread(
+          cell_handle->vertex(iVertex)->point());
+      }
+    }
+    return locked;
+  }
+
+  Lock_data_structure *get_lock_data_structure() const
+  {
+    return m_lock_ds;
+  }
+
+  void set_lock_data_structure(Lock_data_structure *lock_ds) const
+  {
+    m_lock_ds = lock_ds;
+  }
+
+  void unlock_all_elements() const
+  {
+    if (m_lock_ds)
+      m_lock_ds->unlock_all_points_locked_by_this_thread();
+  }
+
+  template <typename P3>
+  void unlock_all_elements_but_one_point(const P3 &point) const
+  {
+    if (m_lock_ds)
+      m_lock_ds->unlock_all_tls_locked_locations_but_one_point(point);
+  }
+
+  const Bbox_3 *get_bbox() const
+  {
+    return &m_lock_ds->get_bbox();
+  }
+
+protected:
+  mutable Lock_data_structure *m_lock_ds;
+};
+#endif // CGAL_LINKED_WITH_TBB
+
+/************************************************
+ *
+ * Triangulation_3 class
+ *
+ ************************************************/
+
+template < class GT, class Tds_, class Lock_data_structure_ >
+class Triangulation_3
+  : public Triangulation_3_base<
+      // Get Concurrency_tag from TDS
+      typename Default::Get< Tds_,
+                             Triangulation_data_structure_3
+                             <
+                               Triangulation_vertex_base_3<GT>,
+                                     Triangulation_cell_base_3<GT>
+                             >
+                           >::type::Concurrency_tag,
+      Lock_data_structure_>
+  , public Triangulation_utils_3
+{
+  friend std::istream& operator>> <>
+  (std::istream& is, Triangulation_3<GT,Tds_,Lock_data_structure_> &tr);
+
+  typedef typename Default::Get<Tds_, Triangulation_data_structure_3 <
+                                          Triangulation_vertex_base_3<GT>,
+                                          Triangulation_cell_base_3<GT> > >::type Tds;
+
+  typedef Triangulation_3<GT, Tds_, Lock_data_structure_> Self;
+  typedef Triangulation_3_base<
+    typename Tds::Concurrency_tag, Lock_data_structure_>  Base;
+
+public:
+
+  typedef typename Base::Lock_data_structure   Lock_data_structure;
+  typedef Tds                                  Triangulation_data_structure;
+  typedef GT                                   Geom_traits;
+
+  typedef typename GT::Point_3                 Point;
+  typedef typename GT::Segment_3               Segment;
+  typedef typename GT::Triangle_3              Triangle;
+  typedef typename GT::Tetrahedron_3           Tetrahedron;
+
+  typedef typename Tds::Concurrency_tag        Concurrency_tag;
+
+  typedef typename Tds::Vertex                 Vertex;
+  typedef typename Tds::Cell                   Cell;
+  typedef typename Tds::Facet                  Facet;
+  typedef typename Tds::Edge                   Edge;
+
+  typedef typename Tds::size_type              size_type;
+  typedef typename Tds::difference_type        difference_type;
+
+  typedef typename Tds::Vertex_handle          Vertex_handle;
+  typedef typename Tds::Cell_handle            Cell_handle;
+
+  typedef typename Tds::Cell_circulator        Cell_circulator;
+  typedef typename Tds::Facet_circulator       Facet_circulator;
+
+  // Not documented, see TDS.
+  typedef typename Tds::Face_circulator        Face_circulator;
+
+  typedef typename Tds::Cell_iterator          Cell_iterator;
+  typedef typename Tds::Facet_iterator         Facet_iterator;
+  typedef typename Tds::Edge_iterator          Edge_iterator;
+  typedef typename Tds::Vertex_iterator        Vertex_iterator;
+
+  typedef Cell_iterator                        All_cells_iterator;
+  typedef Facet_iterator                       All_facets_iterator;
+  typedef Edge_iterator                        All_edges_iterator;
+  typedef Vertex_iterator                      All_vertices_iterator;
+
+  typedef typename Tds::Simplex                Simplex;
+private:
+  // This class is used to generate the Finite_*_iterators.
+  class Infinite_tester
+  {
+      const Self *t;
+
+  public:
+
+      Infinite_tester() {}
+
+      Infinite_tester(const Self *tr)
+          : t(tr) {}
+
+      bool operator()(const Vertex_iterator & v) const
+      {
+          return t->is_infinite(v);
+      }
+
+      bool operator()(typename std::vector<Vertex_handle>::const_iterator v) const
+      {
+              return t->is_infinite(*v);
+      }
+
+      bool operator()(const Cell_iterator & c) const
+      {
+          return t->is_infinite(c);
+      }
+
+      bool operator()(const Edge_iterator & e) const
+      {
+          return t->is_infinite(*e);
+      }
+
+      bool operator()(const Facet_iterator & f) const
+      {
+          return t->is_infinite(*f);
+      }
+  };
+
+public:
+
+  // We derive in order to add a conversion to handle.
+  class Finite_cells_iterator
+    : public Filter_iterator<Cell_iterator, Infinite_tester> {
+    typedef Filter_iterator<Cell_iterator, Infinite_tester> Base;
+    typedef Finite_cells_iterator                           Self;
+  public:
+
+    Finite_cells_iterator() : Base() {}
+    Finite_cells_iterator(const Base &b) : Base(b) {}
+
+    Self & operator++() { Base::operator++(); return *this; }
+    Self & operator--() { Base::operator--(); return *this; }
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+
+    operator Cell_handle() const { return Base::base(); }
+  };
+
+  // We derive in order to add a conversion to handle.
+  class Finite_vertices_iterator
+    : public Filter_iterator<Vertex_iterator, Infinite_tester> {
+    typedef Filter_iterator<Vertex_iterator, Infinite_tester> Base;
+    typedef Finite_vertices_iterator                          Self;
+  public:
+
+    Finite_vertices_iterator() : Base() {}
+    Finite_vertices_iterator(const Base &b) : Base(b) {}
+
+    Self & operator++() { Base::operator++(); return *this; }
+    Self & operator--() { Base::operator--(); return *this; }
+    Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
+    Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
+
+    operator Vertex_handle() const { return Base::base(); }
+  };
+
+  typedef Filter_iterator<Edge_iterator, Infinite_tester>
+                                               Finite_edges_iterator;
+  typedef Filter_iterator<Facet_iterator, Infinite_tester>
+                                               Finite_facets_iterator;
+
+private:
+  // Auxiliary iterators for convenience
+  // do not use default template argument to please VC++
+  typedef Project_point<Vertex>                           Proj_point;
+public:
+  typedef Iterator_project<Finite_vertices_iterator,
+                           Proj_point,
+                           const Point&,
+                           const Point*,
+                           std::ptrdiff_t,
+                           std::bidirectional_iterator_tag>  Point_iterator;
+
+  typedef Point                         value_type; // to have a back_inserter
+  typedef const value_type&             const_reference;
+
+  //Tag to distinguish triangulations with weighted_points
+  typedef Tag_false  Weighted_tag;
+
+
+
+  enum Locate_type {
+    VERTEX=0,
+    EDGE, //1
+    FACET, //2
+    CELL, //3
+    OUTSIDE_CONVEX_HULL, //4
+    OUTSIDE_AFFINE_HULL };//5
+
+protected:
+  Tds _tds;
+  GT  _gt;
+  Vertex_handle infinite; //infinite vertex
+
+  Comparison_result
+  compare_xyz(const Point &p, const Point &q) const
+  {
+      return geom_traits().compare_xyz_3_object()(p, q);
+  }
+
+  bool
+  equal(const Point &p, const Point &q) const
+  {
+      return compare_xyz(p, q) == EQUAL;
+  }
+
+  Orientation
+  orientation(const Point &p, const Point &q,
+              const Point &r, const Point &s) const
+  {
+      return geom_traits().orientation_3_object()(p, q, r, s);
+  }
+
+  bool
+  coplanar(const Point &p, const Point &q,
+           const Point &r, const Point &s) const
+  {
+      return orientation(p, q, r, s) == COPLANAR;
+  }
+
+  Orientation
+  coplanar_orientation(const Point &p, const Point &q, const Point &r) const
+  {
+      return geom_traits().coplanar_orientation_3_object()(p, q, r);
+  }
+
+  bool
+  collinear(const Point &p, const Point &q, const Point &r) const
+  {
+      return coplanar_orientation(p, q, r) == COLLINEAR;
+  }
+
+  Segment
+  construct_segment(const Point &p, const Point &q) const
+  {
+      return geom_traits().construct_segment_3_object()(p, q);
+  }
+
+  Triangle
+  construct_triangle(const Point &p, const Point &q, const Point &r) const
+  {
+      return geom_traits().construct_triangle_3_object()(p, q, r);
+  }
+
+  Tetrahedron
+  construct_tetrahedron(const Point &p, const Point &q,
+                        const Point &r, const Point &s) const
+  {
+      return geom_traits().construct_tetrahedron_3_object()(p, q, r, s);
+  }
+
+  enum COLLINEAR_POSITION {BEFORE, SOURCE, MIDDLE, TARGET, AFTER};
+
+  COLLINEAR_POSITION
+  collinear_position(const Point &s, const Point &p, const Point &t) const
+  // (s,t) defines a line, p is on that line.
+  // Depending on the position of p wrt s and t, returns :
+  // --------------- s ---------------- t --------------
+  // BEFORE       SOURCE    MIDDLE    TARGET       AFTER
+  {
+      CGAL_triangulation_precondition(!equal(s, t));
+      CGAL_triangulation_precondition(collinear(s, p, t));
+
+      Comparison_result ps = compare_xyz(p, s);
+      if (ps == EQUAL)
+          return SOURCE;
+      Comparison_result st = compare_xyz(s, t);
+      if (ps == st)
+          return BEFORE;
+      Comparison_result pt = compare_xyz(p, t);
+      if (pt == EQUAL)
+          return TARGET;
+      if (pt == st)
+          return MIDDLE;
+      return AFTER;
+  }
+
+  void init_tds()
+    {
+      infinite = _tds.insert_increase_dimension();
+    }
+
+  void init_tds(const Point &p0, const Point &p1,
+                const Point &p2, const Point &p3)
+  {
+    Vertex_handle v0, v1, v2, v3;
+    infinite = _tds.insert_first_finite_cell(v0, v1, v2, v3, infinite);
+    v0->set_point(p0);
+    v1->set_point(p1);
+    v2->set_point(p2);
+    v3->set_point(p3);
+  }
+
+  void init_tds(const Point &p0, const Point &p1,
+                const Point &p2, const Point &p3,
+                Vertex_handle &vh0, Vertex_handle &vh1,
+                Vertex_handle &vh2, Vertex_handle &vh3)
+  {
+    infinite = _tds.insert_first_finite_cell(vh0, vh1, vh2, vh3, infinite);
+    vh0->set_point(p0);
+    vh1->set_point(p1);
+    vh2->set_point(p2);
+    vh3->set_point(p3);
+  }
+
+public:
+
+  // CONSTRUCTORS
+  Triangulation_3(const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
+    : Base(lock_ds), _tds(), _gt(gt)
+    {
+      init_tds();
+    }
+
+  Triangulation_3(Lock_data_structure *lock_ds, const GT & gt = GT())
+    : Base(lock_ds), _tds(), _gt(gt)
+    {
+      init_tds();
+    }
+
+  // copy constructor duplicates vertices and cells
+  Triangulation_3(const Triangulation_3 & tr)
+    : Base(tr.get_lock_data_structure()), _gt(tr._gt)
+    {
+      infinite = _tds.copy_tds(tr._tds, tr.infinite);
+      CGAL_triangulation_expensive_postcondition(*this == tr);
+    }
+
+  template < typename InputIterator >
+  Triangulation_3(InputIterator first, InputIterator last,
+                  const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
+    : Base(lock_ds), _gt(gt)
+    {
+      init_tds();
+      insert(first, last);
+    }
+
+  // Create the 3D triangulation of p0, p1, p3 and p4
+  // Precondition: p0, p1, p3 and p4 MUST BE positively oriented
+  Triangulation_3(const Point &p0, const Point &p1,
+                  const Point &p3, const Point &p4,
+                  const GT & gt = GT(), Lock_data_structure *lock_ds = NULL)
+    : Base(lock_ds), _gt(gt)
+    {
+      CGAL_triangulation_precondition(orientation(p0, p1, p3, p4) == POSITIVE);
+      init_tds(p0, p1, p3, p4);
+    }
+
+  void clear()
+    {
+      _tds.clear();
+      init_tds();
+    }
+
+  Triangulation_3 & operator=(Triangulation_3 tr)
+    {
+      // The triangulation passed as argument has been copied,
+      // because the parameter tr is passed by value. Then the following
+      // swap consumes the *copy*. The original triangulation is left
+      // untouched.
+      swap(tr);
+      return *this;
+    }
+
+  // HELPING FUNCTIONS
+
+  void swap(Triangulation_3 &tr)
+    {
+      std::swap(tr._gt, _gt);
+      std::swap(tr.infinite, infinite);
+      _tds.swap(tr._tds);
+      Base::swap(tr);
+    }
+
+  //ACCESS FUNCTIONS
+  const GT & geom_traits() const
+    { return _gt;}
+
+  const Tds & tds() const
+    { return _tds;}
+
+  Tds & tds()
+    { return _tds;}
+
+  int dimension() const
+    { return _tds.dimension();}
+
+  size_type number_of_finite_cells() const;
+
+  size_type number_of_cells() const;
+
+  size_type number_of_finite_facets() const;
+
+  size_type number_of_facets() const;
+
+  size_type number_of_finite_edges() const;
+
+  size_type number_of_edges() const;
+
+  size_type number_of_vertices() const // number of finite vertices
+    {return _tds.number_of_vertices()-1;}
+
+  Vertex_handle infinite_vertex() const
+    { return infinite; }
+
+  void set_infinite_vertex(Vertex_handle v)
+    { infinite=v;}
+
+  Cell_handle infinite_cell() const
+    {
+      CGAL_triangulation_assertion(infinite_vertex()->cell()->
+                                   has_vertex(infinite_vertex()));
+      return infinite_vertex()->cell();
+    }
+
+  // GEOMETRIC ACCESS FUNCTIONS
+
+  Tetrahedron tetrahedron(const Cell_handle c) const
+    {
+      CGAL_triangulation_precondition( dimension() == 3 );
+      CGAL_triangulation_precondition( ! is_infinite(c) );
+      return construct_tetrahedron(c->vertex(0)->point(),
+                                   c->vertex(1)->point(),
+                                   c->vertex(2)->point(),
+                                   c->vertex(3)->point());
+    }
+
+  Triangle triangle(const Cell_handle c, int i) const;
+
+  Triangle triangle(const Facet & f) const
+    { return triangle(f.first, f.second); }
+
+  Segment segment(const Cell_handle c, int i, int j) const;
+
+  Segment segment(const Edge & e) const
+    { return segment(e.first,e.second,e.third); }
+
+  const Point & point(Cell_handle c, int i) const {
+    CGAL_triangulation_precondition( dimension() >= 0 );
+    CGAL_triangulation_precondition( i >= 0 && i <= dimension() );
+    CGAL_triangulation_precondition( ! is_infinite(c->vertex(i)) );
+    return c->vertex(i)->point();
+  }
+
+  const Point & point(Vertex_handle v) const {
+    CGAL_triangulation_precondition( dimension() >= 0 );
+    CGAL_triangulation_precondition( ! is_infinite(v) );
+    return v->point();
+  }
+
+  // TEST IF INFINITE FEATURES
+  bool is_infinite(const Vertex_handle v) const
+  { return v == infinite_vertex(); }
+
+  bool is_infinite(const Cell_handle c) const
+    {
+      CGAL_triangulation_precondition( dimension() == 3 );
+      return c->has_vertex(infinite_vertex());
+    }
+
+  bool is_infinite(const Cell_handle c, int i) const;
+
+  bool is_infinite(const Facet & f) const
+    { return is_infinite(f.first,f.second); }
+
+  bool is_infinite(const Cell_handle c, int i, int j) const;
+
+  bool is_infinite(const Edge & e) const
+    { return is_infinite(e.first,e.second,e.third); }
+
+  //QUERIES
+
+  bool is_vertex(const Point & p, Vertex_handle & v) const;
+
+  bool is_vertex(Vertex_handle v) const;
+  bool is_edge(Vertex_handle u, Vertex_handle v,
+               Cell_handle & c, int & i, int & j) const;
+  bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
+                Cell_handle & c, int & i, int & j, int & k) const;
+  bool is_cell(Cell_handle c) const;
+  bool is_cell(Vertex_handle u, Vertex_handle v,
+               Vertex_handle w, Vertex_handle t,
+               Cell_handle & c, int & i, int & j, int & k, int & l) const;
+  bool is_cell(Vertex_handle u, Vertex_handle v,
+               Vertex_handle w, Vertex_handle t,
+               Cell_handle & c) const;
+
+  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const;
+  bool has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const;
+  bool has_vertex(const Facet & f, Vertex_handle v) const;
+  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const;
+
+  bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const;
+  bool are_equal(const Facet & f, const Facet & g) const;
+  bool are_equal(const Facet & f, Cell_handle n, int j) const;
+
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+  Cell_handle
+  locate(const Point & p,
+         Locate_type & lt, int & li, int & lj,
+         Cell_handle start = Cell_handle(),
+         bool *could_lock_zone = NULL) const;
+#else // no CGAL_NO_STRUCTURAL_FILTERING
+#  ifndef CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+#    define CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
+#  endif // no CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
+
+
+public:
+  Cell_handle
+  inexact_locate(const Point& p,
+                 Cell_handle start = Cell_handle(),
+                 int max_num_cells = CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS,
+                 bool *could_lock_zone = NULL) const;
+protected:
+  Cell_handle
+  exact_locate(const Point& p,
+               Locate_type& lt,
+               int& li, int & lj,
+               Cell_handle start,
+               bool *could_lock_zone = NULL
+               ) const;
+
+  Cell_handle
+  generic_locate(const Point& p,
+                 Locate_type& lt,
+                 int& li, int & lj,
+                 Cell_handle start,
+                 internal::Structural_filtering_3_tag,
+                 bool *could_lock_zone = NULL) const
+  {
+    Cell_handle ch = inexact_locate(
+      p, start, CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS, could_lock_zone);
+    if (could_lock_zone && *could_lock_zone == false)
+      return ch; // = Cell_handle() here
+    else
+      return exact_locate(p, lt, li, lj, ch, could_lock_zone);
+  }
+
+  Cell_handle
+  generic_locate(const Point& p,
+                 Locate_type& lt,
+                 int& li, int & lj,
+                 Cell_handle start,
+                 internal::No_structural_filtering_3_tag
+                 , bool *could_lock_zone = NULL) const
+  {
+    return exact_locate(p, lt, li, lj, start, could_lock_zone);
+  }
+
+public:
+  Orientation
+  inexact_orientation(const Point &p, const Point &q,
+                      const Point &r, const Point &s) const
+  {
+  // So that this code works well with Lazy_kernel
+  internal::Static_filters_predicates::Get_approx<Point> get_approx;
+    const double px = to_double(get_approx(p).x());
+    const double py = to_double(get_approx(p).y());
+    const double pz = to_double(get_approx(p).z());
+    const double qx = to_double(get_approx(q).x());
+    const double qy = to_double(get_approx(q).y());
+    const double qz = to_double(get_approx(q).z());
+    const double rx = to_double(get_approx(r).x());
+    const double ry = to_double(get_approx(r).y());
+    const double rz = to_double(get_approx(r).z());
+    const double sx = to_double(get_approx(s).x());
+    const double sy = to_double(get_approx(s).y());
+    const double sz = to_double(get_approx(s).z());
+
+    const double pqx = qx - px;
+    const double pqy = qy - py;
+    const double pqz = qz - pz;
+    const double prx = rx - px;
+    const double pry = ry - py;
+    const double prz = rz - pz;
+    const double psx = sx - px;
+    const double psy = sy - py;
+    const double psz = sz - pz;
+
+    const double det = determinant(pqx, pqy, pqz,
+                                   prx, pry, prz,
+                                   psx, psy, psz);
+    if (det > 0) return POSITIVE;
+    if (det < 0) return NEGATIVE;
+    return ZERO;
+  }
+
+public:
+
+  Cell_handle
+  locate(const Point & p,
+         Locate_type & lt, int & li, int & lj,
+         Cell_handle start = Cell_handle()
+         , bool *could_lock_zone = NULL
+         ) const
+  {
+    typedef Triangulation_structural_filtering_traits<Geom_traits> TSFT;
+    typedef typename internal::Structural_filtering_selector_3<
+      TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag;
+
+    return generic_locate(p, lt, li, lj, start, Should_filter_tag(), could_lock_zone);
+  }
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+  Cell_handle
+  locate(const Point & p, Cell_handle start = Cell_handle(),
+         bool *could_lock_zone = NULL) const
+  {
+      Locate_type lt;
+      int li, lj;
+      return locate( p, lt, li, lj, start, could_lock_zone);
+  }
+
+  Cell_handle
+  locate(const Point & p,
+         Locate_type & lt, int & li, int & lj, Vertex_handle hint,
+   bool *could_lock_zone = NULL) const
+  {
+      return locate(p, lt, li, lj,
+        hint == Vertex_handle() ? infinite_cell() : hint->cell(),
+        could_lock_zone);
+  }
+
+  Cell_handle
+  locate(const Point & p, Vertex_handle hint,
+         bool *could_lock_zone = NULL) const
+    {
+      return locate(p, hint == Vertex_handle() ? infinite_cell() : hint->cell(),
+        could_lock_zone);
+  }
+
+  // PREDICATES ON POINTS ``TEMPLATED'' by the geom traits
+
+  Bounded_side
+  side_of_tetrahedron(const Point & p,
+                      const Point & p0,
+                      const Point & p1,
+                      const Point & p2,
+                      const Point & p3,
+                      Locate_type & lt, int & i, int & j ) const;
+  Bounded_side
+  side_of_cell(const Point & p,
+               Cell_handle c,
+               Locate_type & lt, int & i, int & j) const;
+  Bounded_side
+  side_of_triangle(const Point & p,
+                   const Point & p0, const Point & p1, const Point & p2,
+                   Locate_type & lt, int & i, int & j ) const;
+  Bounded_side
+  side_of_facet(const Point & p,
+                Cell_handle c,
+                Locate_type & lt, int & li, int & lj) const;
+  Bounded_side
+  side_of_facet(const Point & p,
+                const Facet & f,
+                Locate_type & lt, int & li, int & lj) const
+    {
+      CGAL_triangulation_precondition( f.second == 3 );
+      return side_of_facet(p, f.first, lt, li, lj);
+    }
+  Bounded_side
+  side_of_segment(const Point & p,
+                  const Point & p0, const Point & p1,
+                  Locate_type & lt, int & i ) const;
+  Bounded_side
+  side_of_edge(const Point & p,
+               Cell_handle c,
+               Locate_type & lt, int & li) const;
+  Bounded_side
+  side_of_edge(const Point & p,
+               const Edge & e,
+               Locate_type & lt, int & li) const
+    {
+      CGAL_triangulation_precondition( e.second == 0 );
+      CGAL_triangulation_precondition( e.third == 1 );
+      return side_of_edge(p, e.first, lt, li);
+    }
+
+  // Functions forwarded from TDS.
+  int mirror_index(Cell_handle c, int i) const
+  { return _tds.mirror_index(c, i); }
+
+  Vertex_handle mirror_vertex(Cell_handle c, int i) const
+  { return _tds.mirror_vertex(c, i); }
+
+  Facet mirror_facet(Facet f) const
+  { return _tds.mirror_facet(f);}
+
+  // MODIFIERS
+  bool flip(const Facet &f)
+  // returns false if the facet is not flippable
+  // true other wise and
+  // flips facet i of cell c
+  // c will be replaced by one of the new cells
+  {
+    return flip( f.first, f.second);
+  }
+  bool flip(Cell_handle c, int i);
+  void flip_flippable(const Facet &f)
+  {
+    flip_flippable( f.first, f.second);
+  }
+  void flip_flippable(Cell_handle c, int i);
+  bool flip(const Edge &e)
+  // returns false if the edge is not flippable
+  // true otherwise and
+  // flips edge i,j of cell c
+  // c will be deleted
+  {
+    return flip( e.first, e.second, e.third );
+  }
+  bool flip(Cell_handle c, int i, int j);
+  void flip_flippable(const Edge &e)
+  {
+    flip_flippable( e.first, e.second, e.third );
+  }
+  void flip_flippable(Cell_handle c, int i, int j);
+
+  //INSERTION
+
+  Vertex_handle insert(const Point & p, Vertex_handle hint)
+  {
+    return insert(p, hint == Vertex_handle() ? infinite_cell() : hint->cell());
+  }
+  Vertex_handle insert(const Point & p, Cell_handle start = Cell_handle());
+  Vertex_handle insert(const Point & p, Locate_type lt, Cell_handle c,
+                       int li, int lj);
+
+//protected: // internal methods
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point  &p,
+                                          OutputItCells fit,
+                                          Cell_handle start = Cell_handle() );
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point& p,
+                                          OutputItCells fit,
+                                          Vertex_handle hint);
+
+  template <class OutputItCells>
+  Vertex_handle insert_and_give_new_cells(const Point& p,
+                                          Locate_type lt,
+                                          Cell_handle c, int li, int lj,
+                                          OutputItCells fit);
+
+  template < class Conflict_tester, class Hidden_points_visitor >
+  inline Vertex_handle insert_in_conflict(const Point & p,
+                                          Locate_type lt,
+                                          Cell_handle c, int li, int lj,
+                                          const Conflict_tester &tester,
+                                          Hidden_points_visitor &hider,
+                                          bool *could_lock_zone = NULL);
+
+  template < class InputIterator >
+  std::ptrdiff_t insert(InputIterator first, InputIterator last)
+    {
+      size_type n = number_of_vertices();
+
+      std::vector<Point> points (first, last);
+      spatial_sort (points.begin(), points.end(), geom_traits());
+
+      Vertex_handle hint;
+      for (typename std::vector<Point>::const_iterator p = points.begin(), end = points.end();
+              p != end; ++p)
+          hint = insert(*p, hint);
+
+      return number_of_vertices() - n;
+    }
+
+  Vertex_handle
+  insert_in_cell(const Point & p, Cell_handle c);
+
+  Vertex_handle
+  insert_in_facet(const Point & p, Cell_handle c, int i);
+
+  Vertex_handle
+  insert_in_facet(const Point & p, const Facet & f)
+    {
+      return insert_in_facet(p, f.first, f.second);
+    }
+
+  Vertex_handle
+  insert_in_edge(const Point & p, Cell_handle c, int i, int j);
+
+  Vertex_handle
+  insert_in_edge(const Point & p, const Edge & e)
+    {
+      return insert_in_edge(p, e.first, e.second, e.third);
+    }
+
+  Vertex_handle
+  insert_outside_convex_hull(const Point & p, Cell_handle c);
+
+  Vertex_handle
+  insert_outside_affine_hull(const Point & p);
+
+  template <class CellIt>
+  Vertex_handle
+  insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
+                 Cell_handle begin, int i)
+  {
+      // Some geometric preconditions should be tested...
+      Vertex_handle v = _tds.insert_in_hole(cell_begin, cell_end, begin, i);
+      v->set_point(p);
+      return v;
+  }
+
+  template <class CellIt>
+  Vertex_handle
+  insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
+                 Cell_handle begin, int i, Vertex_handle newv)
+  {
+      // Some geometric preconditions should be tested...
+      newv->set_point(p);
+      return _tds.insert_in_hole(cell_begin, cell_end, begin, i, newv);
+  }
+
+  // Internal function, cells should already be marked.
+  template <class CellIt>
+  Vertex_handle
+  _insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
+                  Cell_handle begin, int i)
+  {
+      // Some geometric preconditions should be tested...
+      Vertex_handle v = _tds._insert_in_hole(cell_begin, cell_end, begin, i);
+      v->set_point(p);
+      return v;
+  }
+
+  // Internal function, cells should already be marked.
+  template <class CellIt>
+  Vertex_handle
+  _insert_in_hole(const Point & p, CellIt cell_begin, CellIt cell_end,
+                  Cell_handle begin, int i, Vertex_handle newv)
+  {
+      // Some geometric preconditions should be tested...
+      newv->set_point(p);
+      return _tds._insert_in_hole(cell_begin, cell_end, begin, i, newv);
+  }
+
+protected:
+
+  template < class InputIterator >
+  bool does_repeat_in_range(InputIterator first, InputIterator beyond) const;
+
+  template < class InputIterator >
+  bool infinite_vertex_in_range(InputIterator first, InputIterator beyond) const;
+
+
+  // - c is the current cell, which must be in conflict.
+  // - tester is the function object that tests if a cell is in conflict.
+  template <class Conflict_test,
+            class OutputIteratorBoundaryFacets,
+            class OutputIteratorCells,
+            class OutputIteratorInternalFacets>
+  Triple<OutputIteratorBoundaryFacets,
+         OutputIteratorCells,
+         OutputIteratorInternalFacets>
+  find_conflicts(
+     Cell_handle d,
+     const Conflict_test &tester,
+     Triple<OutputIteratorBoundaryFacets,
+     OutputIteratorCells,
+     OutputIteratorInternalFacets> it
+     , bool *could_lock_zone = NULL
+     , const Facet *this_facet_must_be_in_the_cz = NULL
+     , bool *the_facet_is_in_its_cz = NULL
+     ) const
+  {
+    CGAL_triangulation_precondition( dimension()>=2 );
+
+    if (the_facet_is_in_its_cz)
+      *the_facet_is_in_its_cz = false;
+
+    if (could_lock_zone)
+      *could_lock_zone = true;
+
+    if (could_lock_zone)
+    {
+      if (!this->try_lock_cell(d))
+      {
+        *could_lock_zone = false;
+        return it;
+      }
+    }
+
+    CGAL_triangulation_precondition( tester(d) );
+
+    // To store the boundary cells, in case we need to rollback
+    std::stack<Cell_handle> cell_stack;
+    cell_stack.push(d);
+    d->tds_data().mark_in_conflict();
+
+    *it.second++ = d;
+
+    do {
+      Cell_handle c = cell_stack.top();
+      cell_stack.pop();
+
+      // For each neighbor cell
+      for (int i=0; i<dimension()+1; ++i) {
+        Cell_handle test = c->neighbor(i);
+
+        // "test" is either in the conflict zone,
+        // either facet-adjacent to the CZ
+
+        if (test->tds_data().is_in_conflict()) {
+
+          Facet f(c, i); // Internal facet.
+          // Is it the facet where're looking for?
+          if (this_facet_must_be_in_the_cz && the_facet_is_in_its_cz
+            && f == *this_facet_must_be_in_the_cz)
+          {
+            *the_facet_is_in_its_cz = true;
+          }
+          if (c < test)
+          {
+            *it.third++ = f;
+          }
+          continue; // test was already in conflict.
+        }
+        if (test->tds_data().is_clear()) {
+            if (tester(test)) {
+
+            // "test" is in the conflict zone
+            if (could_lock_zone)
+            {
+              if (!this->try_lock_cell(test))
+              {
+                *could_lock_zone = false;
+                // Unlock
+                return it;
+              }
+            }
+
+
+            Facet f(c, i); // Internal facet.
+            // Is it the facet where're looking for?
+            if (this_facet_must_be_in_the_cz && the_facet_is_in_its_cz
+              && f == *this_facet_must_be_in_the_cz)
+            {
+              *the_facet_is_in_its_cz = true;
+            }
+
+            if (c < test)
+            {
+              *it.third++ = f;
+            }
+
+            cell_stack.push(test);
+            test->tds_data().mark_in_conflict();
+            *it.second++ = test;
+            continue;
+          }
+
+          test->tds_data().mark_on_boundary();
+        }
+
+        Facet f(c, i); // Boundary facet.
+        // Is it the facet where're looking for?
+        if (this_facet_must_be_in_the_cz
+            && the_facet_is_in_its_cz
+            &&
+            (mirror_facet(f) == *this_facet_must_be_in_the_cz
+             || f == *this_facet_must_be_in_the_cz) )
+        {
+          *the_facet_is_in_its_cz = true;
+        }
+
+        *it.first++ = f;
+      }
+    } while (!cell_stack.empty());
+    return it;
+  }
+
+  // This one takes a function object to recursively determine the cells in
+  // conflict, then calls _tds._insert_in_hole().
+  template < class Conflict_test >
+  Vertex_handle
+  insert_conflict(Cell_handle c, const Conflict_test &tester)
+  {
+    CGAL_triangulation_precondition( dimension() >= 2 );
+    CGAL_triangulation_precondition( c != Cell_handle() );
+    CGAL_triangulation_precondition( tester(c) );
+
+    std::vector<Cell_handle> cells;
+    cells.reserve(32);
+
+    Facet facet;
+
+    // Find the cells in conflict
+    switch (dimension()) {
+    case 3:
+      find_conflicts(c, tester, make_triple(Oneset_iterator<Facet>(facet),
+                                            std::back_inserter(cells),
+                                            Emptyset_iterator()));
+      break;
+    case 2:
+      find_conflicts(c, tester, make_triple(Oneset_iterator<Facet>(facet),
+                                            std::back_inserter(cells),
+                                            Emptyset_iterator()));
+    }
+    // Create the new cells and delete the old.
+    return _tds._insert_in_hole(cells.begin(), cells.end(),
+                                  facet.first, facet.second);
+  }
+
+private:
+  // Here are the conflit tester function objects passed to
+  // insert_conflict_[23]() by insert_outside_convex_hull().
+  class Conflict_tester_outside_convex_hull_3
+  {
+      const Point &p;
+      const Self *t;
+
+  public:
+
+      Conflict_tester_outside_convex_hull_3(const Point &pt, const Self *tr)
+          : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const
+      {
+          Locate_type loc;
+          int i, j;
+          return t->side_of_cell( p, c, loc, i, j ) == ON_BOUNDED_SIDE;
+      }
+  };
+
+  class Conflict_tester_outside_convex_hull_2
+  {
+      const Point &p;
+      const Self *t;
+
+  public:
+
+      Conflict_tester_outside_convex_hull_2(const Point &pt, const Self *tr)
+          : p(pt), t(tr) {}
+
+      bool operator()(const Cell_handle c) const
+      {
+          Locate_type loc;
+          int i, j;
+          return t->side_of_facet( p, c, loc, i, j ) == ON_BOUNDED_SIDE;
+      }
+  };
+
+protected:
+
+  // no point being private, we might need to test
+  // whether a displacement decreases dimension on
+  // others inherited triangulations
+  bool test_dim_down(Vertex_handle v) const;
+
+  bool test_dim_down_using_incident_cells_3(
+    Vertex_handle v, std::vector<Cell_handle> &incident_cells,
+    std::vector<Vertex_handle> &adj_vertices,
+    bool *could_lock_zone = NULL) const;
+
+  // REMOVAL
+  template < class VertexRemover >
+  void remove(Vertex_handle v, VertexRemover &remover);
+  template < class VertexRemover >
+  // Concurrency-safe version
+  // Pre-condition: dimension = 3
+  // The return value is only meaningful if *could_lock_zone = true:
+  // * returns true if the vertex was removed
+  // * returns false if the vertex wasn't removed since it would decrease
+  //   the dimension => needs to be done sequentially
+  bool remove(Vertex_handle v, VertexRemover &remover,
+              bool *could_lock_zone);
+
+  template < class VertexRemover, class OutputItCells >
+  void remove_and_give_new_cells(Vertex_handle v, VertexRemover &remover,
+                                 OutputItCells fit);
+
+  // This function removes a batch of points at once.
+  // If points are grouped in cluster, the performance is increased
+  // compared to removing one by one.
+  // For now, this function is only guaranteed for Delaunay triangulations (or Regular as Delaunay).
+  // By doing these kind of remove followed by inserting the cluster,
+  // we achieve fast relocations for a batch of points (in a Delaunay triangulation).
+  template < class InputIterator, class VertexRemover >
+  size_type remove(InputIterator first, InputIterator beyond,
+                   VertexRemover &remover);
+  enum REMOVE_VERTEX_STATE {CLEAR, TO_REMOVE, PROCESSED, EXTREMITY};
+
+  // MOVE
+  template < class VertexRemover, class VertexInserter >
+  Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p,
+                                     VertexRemover &remover,
+                                     VertexInserter &inserter);
+
+  template < class VertexRemover, class VertexInserter >
+  Vertex_handle move(Vertex_handle v, const Point &p,
+                     VertexRemover &remover, VertexInserter &inserter);
+
+  // move and give new cells
+  template < class VertexRemover, class VertexInserter, class OutputItCells  >
+  Vertex_handle move_if_no_collision_and_give_new_cells(
+                                                        Vertex_handle v, const Point &p, VertexRemover &remover,
+                                                        VertexInserter &inserter, OutputItCells fit);
+
+  // This is a function better suited for tds
+  // but because it is not required in the model of tds
+  // at this time, it should be implemented here.
+  void flip_2D(Cell_handle f, int i)
+  {
+    CGAL_triangulation_precondition( dimension()==2);
+    Cell_handle n  = f->neighbor(i);
+    int ni = this->_tds.mirror_index(f,i); //ni = n->index(f);
+
+    int cwi = (i+2)%3;
+    int ccwi = (i+1)%3;
+    int cwni = (ni+2)%3;
+    int ccwni = (ni+1)%3;
+
+    Vertex_handle  v_cw = f->vertex(cwi);
+    Vertex_handle  v_ccw = f->vertex(ccwi);
+
+    // bl == bottom left, tr == top right
+    Cell_handle tr = f->neighbor(ccwi);
+    int tri =  this->_tds.mirror_index(f,ccwi);
+    Cell_handle bl = n->neighbor(ccwni);
+    int bli =  this->_tds.mirror_index(n,ccwni);
+
+    f->set_vertex(cwi, n->vertex(ni));
+    n->set_vertex(cwni, f->vertex(i));
+
+    // update the neighborhood relations
+    this->_tds.set_adjacency(f, i, bl, bli);
+    this->_tds.set_adjacency(f, ccwi, n, ccwni);
+    this->_tds.set_adjacency(n, ni, tr, tri);
+
+    if(v_cw->cell() == f) {
+      v_cw->set_cell(n);
+    }
+
+    if(v_ccw->cell() == n) {
+      v_ccw->set_cell(f);
+    }
+  }
+
+  template < class VertexRemover, class VertexInserter >
+  void restore_edges_after_decrease_dimension(Vertex_handle v,
+                                              VertexRemover &remover, VertexInserter &inserter)
+  {
+
+    Cell_handle fkstart = v->cell();
+    Cell_handle start = fkstart->neighbor(fkstart->index(v));
+
+    std::list<Edge_2D> hole;
+    make_hole_2D(v, hole, remover);
+    fill_hole_2D(hole, remover);
+    // make hole here will work if the link of v is a valid triangulation
+    // the aim here is Delaunay triangulations
+    // to make it more general one could have an internal function here
+    // to remove v without touching its handle
+
+    // This insert must be from Delaunay (or the particular trian.)
+    // not the basic Triangulation_3.
+    // Here we correct the recent triangulation (with decreased dimension) formed
+    // in particular here a 2D (from 3D to 2D displacement)
+    Vertex_handle inserted = inserter.insert(v->point(), start);
+
+    // fixing pointer
+    Cell_handle fc = inserted->cell(), done(fc);
+    std::vector<Cell_handle> faces_pt;
+    faces_pt.reserve(16);
+    do {
+      faces_pt.push_back(fc);
+      fc = fc->neighbor((fc->index(inserted) + 1)%3);
+    } while(fc != done);
+    std::size_t ss = faces_pt.size();
+    for(std::size_t k=0; k<ss; k++)
+    {
+      Cell_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+    v->set_cell(inserted->cell());
+
+    tds().delete_vertex(inserted);
+  }
+
+private:
+  typedef Facet Edge_2D;
+  typedef Triple<Vertex_handle,Vertex_handle,Vertex_handle> Vertex_triple;
+  typedef typename Base::template Vertex_triple_Facet_map_generator<
+    Vertex_triple, Facet>::type Vertex_triple_Facet_map;
+  typedef typename Base::template Vertex_handle_unique_hash_map_generator<
+    Vertex_handle>::type Vertex_handle_unique_hash_map;
+
+  Vertex_triple make_vertex_triple(const Facet& f) const;
+  void make_canonical(Vertex_triple& t) const;
+
+  template < class VertexRemover >
+  VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D> & hole,
+      VertexRemover &remover);
+  template < class VertexRemover >
+  VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D> & hole,
+                              VertexRemover &remover,
+                              std::set<Cell_handle> &cells_set);
+
+  template < class VertexRemover >
+  void fill_hole_2D(std::list<Edge_2D> & hole, VertexRemover &remover);
+
+  void make_hole_3D( Vertex_handle v, Vertex_triple_Facet_map& outer_map,
+      std::vector<Cell_handle> & hole);
+  // When the incident cells are already known
+  void make_hole_3D(
+    Vertex_handle v,
+    const std::vector<Cell_handle> & incident_cells,
+          Vertex_triple_Facet_map& outer_map);
+
+  template < class VertexRemover >
+  VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover &remover);
+  template < class VertexRemover >
+  VertexRemover& remove_1D(Vertex_handle v, VertexRemover &remover);
+  template < class VertexRemover >
+  VertexRemover& remove_2D(Vertex_handle v, VertexRemover &remover);
+  template < class VertexRemover >
+  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover);
+  // Version of remove_3D if the incident cells and the adjacent vertices
+  // are already known
+  template < class VertexRemover >
+  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover,
+                           const std::vector<Cell_handle> &inc_cells,
+                           std::vector<Vertex_handle> &adj_vertices);
+
+  template < class VertexRemover, class OutputItCells  >
+  VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover &remover,
+                                 OutputItCells fit);
+
+  template < class VertexRemover, class OutputItCells  >
+  VertexRemover& remove_1D(Vertex_handle v, VertexRemover &remover,
+                           OutputItCells fit);
+
+  template < class VertexRemover, class OutputItCells  >
+  VertexRemover& remove_2D(Vertex_handle v, VertexRemover &remover,
+                           OutputItCells fit);
+
+  template < class VertexRemover, class OutputItCells  >
+  VertexRemover& remove_3D(Vertex_handle v, VertexRemover &remover,
+                           OutputItCells fit);
+
+  template < class VertexRemover, class OutputItCells  >
+  void fill_hole_2D(std::list<Edge_2D> & hole, VertexRemover &remover,
+                    OutputItCells fit);
+
+  // They access "Self", so need to be friend.
+  friend class Conflict_tester_outside_convex_hull_3;
+  friend class Conflict_tester_outside_convex_hull_2;
+  friend class Infinite_tester;
+  friend class Finite_vertices_iterator;
+  friend class Finite_cells_iterator;
+
+  // remove cluster
+  template < class InputIterator >
+  void _mark_vertices_to_remove(InputIterator first, InputIterator beyond,
+    std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) const
+  {
+    while (first != beyond) vstates[*first++] = TO_REMOVE;
+  }
+
+  bool _test_dim_down_cluster(
+                              std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) const
+  // tests whether removing the cluster of vertices
+  // marked as "to remove", decreases the dimension of the triangulation
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    int k=0;
+    Vertex_handle v[4];
+    for (Finite_vertices_iterator fit = finite_vertices_begin();
+         fit != finite_vertices_end(); ++fit ) {
+      if(vstates[fit] == TO_REMOVE) continue;
+      v[k++] = fit;
+      if(k == 4)
+      {
+        if (!coplanar(v[0]->point(), v[1]->point(),
+                      v[2]->point(), v[3]->point())) return false;
+        k--;
+      }
+    }
+    return k < 4;
+  }
+
+  template < class InputIterator, class VertexRemover >
+  bool
+  _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover &remover,
+                     std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates);
+
+  void _make_big_hole_3D(Vertex_handle v,
+                         std::map<Vertex_triple,Facet>& outer_map,
+                         std::vector<Cell_handle> & hole,
+                         std::vector<Vertex_handle> & vertices,
+                         std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates);
+
+public:
+
+  //TRAVERSING : ITERATORS AND CIRCULATORS
+  Finite_cells_iterator finite_cells_begin() const
+  {
+      if ( dimension() < 3 )
+          return finite_cells_end();
+      return CGAL::filter_iterator(cells_end(), Infinite_tester(this),
+                                   cells_begin());
+  }
+  Finite_cells_iterator finite_cells_end() const
+  {
+      return CGAL::filter_iterator(cells_end(), Infinite_tester(this));
+  }
+
+  Cell_iterator cells_begin() const
+  {
+      return _tds.cells_begin();
+  }
+  Cell_iterator cells_end() const
+  {
+      return _tds.cells_end();
+  }
+
+  All_cells_iterator all_cells_begin() const
+  {
+      return _tds.cells_begin();
+  }
+  All_cells_iterator all_cells_end() const
+  {
+      return _tds.cells_end();
+  }
+
+  Finite_vertices_iterator finite_vertices_begin() const
+  {
+      if ( number_of_vertices() <= 0 )
+          return finite_vertices_end();
+      return CGAL::filter_iterator(vertices_end(), Infinite_tester(this),
+                                   vertices_begin());
+  }
+  Finite_vertices_iterator finite_vertices_end() const
+  {
+      return CGAL::filter_iterator(vertices_end(), Infinite_tester(this));
+  }
+
+  Vertex_iterator vertices_begin() const
+  {
+      return _tds.vertices_begin();
+  }
+  Vertex_iterator vertices_end() const
+  {
+      return _tds.vertices_end();
+  }
+
+  All_vertices_iterator all_vertices_begin() const
+  {
+      return _tds.vertices_begin();
+  }
+  All_vertices_iterator all_vertices_end() const
+  {
+      return _tds.vertices_end();
+  }
+
+  Finite_edges_iterator finite_edges_begin() const
+  {
+      if ( dimension() < 1 )
+          return finite_edges_end();
+      return CGAL::filter_iterator(edges_end(), Infinite_tester(this),
+                                   edges_begin());
+  }
+  Finite_edges_iterator finite_edges_end() const
+  {
+      return CGAL::filter_iterator(edges_end(), Infinite_tester(this));
+  }
+
+  Edge_iterator edges_begin() const
+  {
+      return _tds.edges_begin();
+  }
+  Edge_iterator edges_end() const
+  {
+      return _tds.edges_end();
+  }
+
+  All_edges_iterator all_edges_begin() const
+  {
+      return _tds.edges_begin();
+  }
+  All_edges_iterator all_edges_end() const
+  {
+      return _tds.edges_end();
+  }
+
+  Finite_facets_iterator finite_facets_begin() const
+  {
+      if ( dimension() < 2 )
+          return finite_facets_end();
+      return CGAL::filter_iterator(facets_end(), Infinite_tester(this),
+                                   facets_begin());
+  }
+  Finite_facets_iterator finite_facets_end() const
+  {
+      return CGAL::filter_iterator(facets_end(), Infinite_tester(this));
+  }
+
+  Facet_iterator facets_begin() const
+  {
+      return _tds.facets_begin();
+  }
+  Facet_iterator facets_end() const
+  {
+      return _tds.facets_end();
+  }
+
+  All_facets_iterator all_facets_begin() const
+  {
+      return _tds.facets_begin();
+  }
+  All_facets_iterator all_facets_end() const
+  {
+      return _tds.facets_end();
+  }
+
+  Point_iterator points_begin() const
+  {
+      return Point_iterator(finite_vertices_begin());
+  }
+  Point_iterator points_end() const
+  {
+      return Point_iterator(finite_vertices_end());
+  }
+
+  // cells around an edge
+  Cell_circulator incident_cells(const Edge & e) const
+  {
+    return _tds.incident_cells(e);
+  }
+  Cell_circulator incident_cells(Cell_handle c, int i, int j) const
+  {
+    return _tds.incident_cells(c, i, j);
+  }
+  Cell_circulator incident_cells(const Edge & e, Cell_handle start) const
+  {
+    return _tds.incident_cells(e, start);
+  }
+  Cell_circulator incident_cells(Cell_handle c, int i, int j,
+                                 Cell_handle start) const
+  {
+    return _tds.incident_cells(c, i, j, start);
+  }
+
+  // facets around an edge
+  Facet_circulator incident_facets(const Edge & e) const
+  {
+    return _tds.incident_facets(e);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j) const
+  {
+    return _tds.incident_facets(c, i, j);
+  }
+  Facet_circulator incident_facets(const Edge & e, const Facet & start) const
+  {
+    return _tds.incident_facets(e, start);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j,
+                                   const Facet & start) const
+  {
+    return _tds.incident_facets(c, i, j, start);
+  }
+  Facet_circulator incident_facets(const Edge & e,
+                                   Cell_handle start, int f) const
+  {
+    return _tds.incident_facets(e, start, f);
+  }
+  Facet_circulator incident_facets(Cell_handle c, int i, int j,
+                                   Cell_handle start, int f) const
+  {
+    return _tds.incident_facets(c, i, j, start, f);
+  }
+
+  // around a vertex
+  class Finite_filter {
+    const Self* t;
+    public:
+    Finite_filter(const Self* _t): t(_t) {}
+    template<class T>
+    bool operator() (const T& e) const {
+      return t->is_infinite(e);
+    }
+  };
+
+  class Finite_filter_2D {
+    const Self* t;
+    public:
+    Finite_filter_2D(const Self* _t): t(_t) {}
+
+    template<class T>
+    bool operator() (const T& e) const {
+      return t->is_infinite(e);
+    }
+
+    bool operator() (const Cell_handle c) {
+      return t->is_infinite(c, 3);
+    }
+  };
+
+  template <typename OutputIterator>
+  OutputIterator
+  incident_cells(Vertex_handle v, OutputIterator cells) const
+  {
+    return _tds.incident_cells(v, cells);
+  }
+  
+  template <typename OutputIterator>
+  void incident_cells_threadsafe(Vertex_handle v,
+                                 OutputIterator cells) const
+  {
+    _tds.incident_cells_threadsafe(v, cells);
+  }
+  
+  template <typename Filter, typename OutputIterator>
+  void incident_cells_threadsafe(Vertex_handle v,
+                                 OutputIterator cells,
+                                 const Filter &filter) const
+  {
+    _tds.incident_cells_threadsafe(v, cells, filter);
+  }
+
+  bool
+  try_lock_and_get_incident_cells(Vertex_handle v,
+                                  std::vector<Cell_handle>& cells) const
+  {
+    // We need to lock v individually first, to be sure v->cell() is valid
+    if (!this->try_lock_vertex(v))
+      return false;
+
+    Cell_handle d = v->cell();
+    if (!this->try_lock_cell(d)) // LOCK
+    {
+      return false;
+    }
+    cells.push_back(d);
+    d->tds_data().mark_in_conflict();
+    int head=0;
+    int tail=1;
+    do {
+      Cell_handle c = cells[head];
+
+      for (int i=0; i<4; ++i) {
+        if (c->vertex(i) == v)
+          continue;
+        Cell_handle next = c->neighbor(i);
+
+        if (!this->try_lock_cell(next)) // LOCK
+        {
+          BOOST_FOREACH(Cell_handle& ch,
+            std::make_pair(cells.begin(), cells.end()))
+          {
+            ch->tds_data().clear();
+          }
+          cells.clear();
+          return false;
+        }
+        if (! next->tds_data().is_clear())
+          continue;
+        cells.push_back(next);
+        ++tail;
+        next->tds_data().mark_in_conflict();
+      }
+      ++head;
+    } while(head != tail);
+    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
+    {
+      ch->tds_data().clear();
+    }
+    return true;
+  }
+
+  template <class OutputIterator>
+  bool
+  try_lock_and_get_adjacent_vertices_and_cells_3(
+    Vertex_handle v, OutputIterator vertices,
+    std::vector<Cell_handle> &cells) const
+  {
+
+    // We need to lock v individually first, to be sure v->cell() is valid
+    if (!this->try_lock_vertex(v))
+      return false;
+
+    Cell_handle d = v->cell();
+    if (!this->try_lock_cell(d)) // LOCK
+    {
+      return false;
+    }
+    cells.push_back(d);
+    d->tds_data().mark_in_conflict();
+    int head=0;
+    int tail=1;
+    do {
+      Cell_handle c = cells[head];
+
+      for (int i=0; i<4; ++i) {
+        if (c->vertex(i) == v)
+          continue;
+        Cell_handle next = c->neighbor(i);
+
+        if (!this->try_lock_cell(next)) // LOCK
+        {
+          BOOST_FOREACH(Cell_handle& ch,
+            std::make_pair(cells.begin(), cells.end()))
+          {
+            ch->tds_data().clear();
+          }
+          cells.clear();
+          return false;
+        }
+        if (! next->tds_data().is_clear())
+          continue;
+        cells.push_back(next);
+        ++tail;
+        next->tds_data().mark_in_conflict();
+      }
+      ++head;
+    } while(head != tail);
+
+    std::set<Vertex_handle> tmp_vertices;
+    BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
+    {
+      ch->tds_data().clear();
+      for (int i = 0;  i < 4; ++i)
+      {
+              Vertex_handle w = ch->vertex(i);
+              if (w != v && tmp_vertices.insert(w).second)
+        {
+                *vertices = w;
+
+        }
+      }
+    }
+    return true;
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  finite_incident_cells(Vertex_handle v, OutputIterator cells) const
+  {
+        if(dimension() == 2)
+          return _tds.incident_cells(v, cells, Finite_filter_2D(this));
+    return _tds.incident_cells(v, cells, Finite_filter(this));
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_facets(Vertex_handle v, OutputIterator facets) const
+  {
+    return _tds.incident_facets(v, facets);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  finite_incident_facets(Vertex_handle v, OutputIterator facets) const
+  {
+    return _tds.incident_facets(v, facets, Finite_filter(this));
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
+  {
+    return _tds.incident_facets_threadsafe(v, facets);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  finite_incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
+  {
+    return _tds.incident_facets_threadsafe(v, facets, Finite_filter(this));
+  }
+
+  // old name (up to CGAL 3.4)
+  // kept for backwards compatibility but not documented
+  template <class OutputIterator>
+  OutputIterator
+  incident_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return _tds.adjacent_vertices(v, vertices);
+  }
+
+  // correct name
+  template <class OutputIterator>
+  OutputIterator
+  adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return _tds.adjacent_vertices(v, vertices);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  adjacent_vertices_and_cells_3(Vertex_handle v, OutputIterator vertices,
+                                std::vector<Cell_handle> &cells) const
+  {
+    return _tds.adjacent_vertices_and_cells_3(v, vertices, cells);
+  }
+
+  // old name (up to CGAL 3.4)
+  // kept for backwards compatibility but not documented
+  template <class OutputIterator>
+  OutputIterator
+  finite_incident_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return _tds.adjacent_vertices(v, vertices, Finite_filter(this));
+  }
+
+  // correct name
+  template <class OutputIterator>
+  OutputIterator
+  finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return _tds.adjacent_vertices(v, vertices, Finite_filter(this));
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_edges(Vertex_handle v, OutputIterator edges) const
+  {
+      return _tds.incident_edges(v, edges);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  finite_incident_edges(Vertex_handle v, OutputIterator edges) const
+  {
+    return _tds.incident_edges(v, edges, Finite_filter(this));
+  }
+
+  size_type degree(Vertex_handle v) const
+  {
+      return _tds.degree(v);
+  }
+
+
+
+  // CHECKING
+  bool is_valid(bool verbose = false, int level = 0) const;
+
+  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
+
+  bool is_valid_finite(Cell_handle c, bool verbose = false, int level=0) const;
+};
+
+template < class GT, class Tds, class Lds >
+std::istream &
+operator>> (std::istream& is, Triangulation_3<GT, Tds, Lds> &tr)
+  // reads
+  // the dimension
+  // the number of finite vertices
+  // the non combinatorial information on vertices (point, etc)
+  // the number of cells
+  // the cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each cell
+  // the neighbors of each cell by their index in the preceding list of cells
+  // when dimension < 3 : the same with faces of maximal dimension
+{
+  typedef Triangulation_3<GT, Tds>               Triangulation;
+  typedef typename Triangulation::Vertex_handle  Vertex_handle;
+  typedef typename Triangulation::Cell_handle    Cell_handle;
+
+  tr._tds.clear(); // infinite vertex deleted
+  tr.infinite = tr._tds.create_vertex();
+
+  std::size_t n;
+  int d;
+  if(is_ascii(is))
+     is >> d >> n;
+  else {
+    read(is, d);
+    read(is, n);
+  }
+  if(!is) return is;
+  tr._tds.set_dimension(d);
+
+  std::map< std::size_t, Vertex_handle > V;
+  V[0] = tr.infinite_vertex();
+  // the infinite vertex is numbered 0
+
+  for (std::size_t i=1; i <= n; i++) {
+    V[i] = tr._tds.create_vertex();
+    if(!(is >> *V[i])) return is;
+  }
+
+  std::map< std::size_t, Cell_handle > C;
+
+  std::size_t m;
+  tr._tds.read_cells(is, V, m, C);
+
+  for (std::size_t j=0 ; j < m; j++)
+    if(!(is >> *(C[j]))) return is;
+
+  CGAL_triangulation_assertion( tr.is_valid(false) );
+  return is;
+}
+
+template < class GT, class Tds, class Lds >
+std::ostream &
+operator<< (std::ostream& os, const Triangulation_3<GT, Tds, Lds> &tr)
+  // writes :
+  // the dimension
+  // the number of finite vertices
+  // the non combinatorial information on vertices (point, etc)
+  // the number of cells
+  // the cells by the indices of their vertices in the preceding list
+  // of vertices, plus the non combinatorial information on each cell
+  // the neighbors of each cell by their index in the preceding list of cells
+  // when dimension < 3 : the same with faces of maximal dimension
+{
+  typedef Triangulation_3<GT, Tds>                 Triangulation;
+  typedef typename Triangulation::size_type        size_type;
+  typedef typename Triangulation::Vertex_handle    Vertex_handle;
+  typedef typename Triangulation::Vertex_iterator  Vertex_iterator;
+  typedef typename Triangulation::Cell_iterator    Cell_iterator;
+  typedef typename Triangulation::Edge_iterator    Edge_iterator;
+  typedef typename Triangulation::Facet_iterator   Facet_iterator;
+
+  // outputs dimension and number of vertices
+  size_type n = tr.number_of_vertices();
+  if (is_ascii(os))
+    os << tr.dimension() << std::endl << n << std::endl;
+  else
+  {
+    write(os, tr.dimension());
+    write(os, n);
+  }
+
+  if (n == 0)
+    return os;
+
+  std::vector<Vertex_handle> TV(n+1);
+  size_type i = 0;
+
+  // write the vertices
+
+  for (Vertex_iterator it = tr.vertices_begin(), end = tr.vertices_end();
+         it != end; ++it)
+    TV[i++] = it;
+
+  CGAL_triangulation_assertion( i == n+1 );
+  CGAL_triangulation_assertion( tr.is_infinite(TV[0]) );
+
+  Unique_hash_map<Vertex_handle, std::size_t > V;
+
+  V[tr.infinite_vertex()] = 0;
+  for (i=1; i <= n; i++) {
+    os << *TV[i];
+    V[TV[i]] = i;
+    if (is_ascii(os))
+        os << std::endl;
+  }
+
+    // asks the tds for the combinatorial information
+  tr.tds().print_cells(os, V);
+
+
+  // write the non combinatorial information on the cells
+  // using the << operator of Cell
+  // works because the iterator of the tds traverses the cells in the
+  // same order as the iterator of the triangulation
+  switch ( tr.dimension() ) {
+  case 3:
+    {
+      for(Cell_iterator it = tr.cells_begin(), end = tr.cells_end(); it != end; ++it) {
+        os << *it; // other information
+        if(is_ascii(os))
+          os << std::endl;
+      }
+      break;
+    }
+  case 2:
+    {
+      for(Facet_iterator it = tr.facets_begin(), end = tr.facets_end(); it != end; ++it) {
+        os << *((*it).first); // other information
+        if(is_ascii(os))
+          os << std::endl;
+      }
+      break;
+    }
+  case 1:
+    {
+      for(Edge_iterator it = tr.edges_begin(), end = tr.edges_end(); it != end; ++it) {
+        os << *((*it).first); // other information
+        if(is_ascii(os))
+          os << std::endl;
+      }
+      break;
+    }
+  }
+
+
+  return os ;
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_finite_cells() const
+{
+  if ( dimension() < 3 ) return 0;
+  return std::distance(finite_cells_begin(), finite_cells_end());
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_cells() const
+{
+  return _tds.number_of_cells();
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_finite_facets() const
+{
+  if ( dimension() < 2 ) return 0;
+  return std::distance(finite_facets_begin(), finite_facets_end());
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_facets() const
+{
+  return _tds.number_of_facets();
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_finite_edges() const
+{
+  if ( dimension() < 1 ) return 0;
+  return std::distance(finite_edges_begin(), finite_edges_end());
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::size_type
+Triangulation_3<GT,Tds,Lds>::
+number_of_edges() const
+{
+  return _tds.number_of_edges();
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Triangle
+Triangulation_3<GT,Tds,Lds>::
+triangle(const Cell_handle c, int i) const
+{
+  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3 );
+  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
+                                || (dimension() == 3 && i >= 0 && i <= 3) );
+  CGAL_triangulation_precondition( ! is_infinite(Facet(c, i)) );
+  if ( (i&1)==0 )
+    return construct_triangle(c->vertex( (i+2)&3 )->point(),
+                              c->vertex( (i+1)&3 )->point(),
+                              c->vertex( (i+3)&3 )->point());
+  return construct_triangle(c->vertex( (i+1)&3 )->point(),
+                            c->vertex( (i+2)&3 )->point(),
+                            c->vertex( (i+3)&3 )->point());
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Segment
+Triangulation_3<GT,Tds,Lds>::
+segment(const Cell_handle c, int i, int j) const
+{
+  CGAL_triangulation_precondition( i != j );
+  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
+  CGAL_triangulation_precondition( i >= 0 && i <= dimension()
+                                   && j >= 0 && j <= dimension() );
+  CGAL_triangulation_precondition( ! is_infinite(Edge(c, i, j)) );
+  return construct_segment( c->vertex(i)->point(), c->vertex(j)->point() );
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_infinite(const Cell_handle c, int i) const
+{
+  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3 );
+  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
+                                   || (dimension() == 3 && i >= 0 && i <= 3) );
+  return is_infinite(c->vertex(i<=0 ? 1 : 0)) ||
+         is_infinite(c->vertex(i<=1 ? 2 : 1)) ||
+         is_infinite(c->vertex(i<=2 ? 3 : 2));
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_infinite(const Cell_handle c, int i, int j) const
+{
+  CGAL_triangulation_precondition( i != j );
+  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
+  CGAL_triangulation_precondition(
+          i >= 0 && i <= dimension() && j >= 0 && j <= dimension() );
+  return is_infinite( c->vertex(i) ) || is_infinite( c->vertex(j) );
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_vertex(const Point & p, Vertex_handle & v) const
+{
+  Locate_type lt;
+  int li, lj;
+  Cell_handle c = locate( p, lt, li, lj );
+  if ( lt != VERTEX )
+    return false;
+  v = c->vertex(li);
+  return true;
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_vertex(Vertex_handle v) const
+{
+  return _tds.is_vertex(v);
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_edge(Vertex_handle u, Vertex_handle v,
+        Cell_handle & c, int & i, int & j) const
+{
+  return _tds.is_edge(u, v, c, i, j);
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w,
+         Cell_handle & c, int & i, int & j, int & k) const
+{
+  return _tds.is_facet(u, v, w, c, i, j, k);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_cell(Cell_handle c) const
+{
+  return _tds.is_cell(c);
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_cell(Vertex_handle u, Vertex_handle v,
+        Vertex_handle w, Vertex_handle t,
+        Cell_handle & c, int & i, int & j, int & k, int & l) const
+{
+  return _tds.is_cell(u, v, w, t, c, i, j, k, l);
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_cell(Vertex_handle u, Vertex_handle v,
+        Vertex_handle w, Vertex_handle t,
+        Cell_handle & c) const
+{
+  int i,j,k,l;
+  return _tds.is_cell(u, v, w, t, c, i, j, k, l);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+has_vertex(const Facet & f, Vertex_handle v, int & j) const
+{
+  return _tds.has_vertex(f.first, f.second, v, j);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const
+{
+  return _tds.has_vertex(c, i, v, j);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+has_vertex(const Facet & f, Vertex_handle v) const
+{
+  return _tds.has_vertex(f.first, f.second, v);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+has_vertex(Cell_handle c, int i, Vertex_handle v) const
+{
+  return _tds.has_vertex(c, i, v);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+are_equal(Cell_handle c, int i, Cell_handle n, int j) const
+{
+  return _tds.are_equal(c, i, n, j);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+are_equal(const Facet & f, const Facet & g) const
+{
+  return _tds.are_equal(f.first, f.second, g.first, g.second);
+}
+
+template < class GT, class Tds, class Lds >
+inline
+bool
+Triangulation_3<GT,Tds,Lds>::
+are_equal(const Facet & f, Cell_handle n, int j) const
+{
+  return _tds.are_equal(f.first, f.second, n, j);
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Cell_handle
+Triangulation_3<GT,Tds,Lds>::
+#ifdef CGAL_NO_STRUCTURAL_FILTERING
+locate(const Point & p, Locate_type & lt, int & li, int & lj,
+       Cell_handle start, bool *could_lock_zone) const
+#else
+exact_locate(const Point & p, Locate_type & lt, int & li, int & lj,
+             Cell_handle start, bool *could_lock_zone) const
+#endif
+  // returns the (finite or infinite) cell p lies in
+  // starts at cell "start"
+  // if lt == OUTSIDE_CONVEX_HULL, li is the
+  // index of a facet separating p from the rest of the triangulation
+  // in dimension 2 :
+  // returns a facet (Cell_handle,li) if lt == FACET
+  // returns an edge (Cell_handle,li,lj) if lt == EDGE
+  // returns a vertex (Cell_handle,li) if lt == VERTEX
+  // if lt == OUTSIDE_CONVEX_HULL, li, lj give the edge of c
+  // separating p from the rest of the triangulation
+  // lt = OUTSIDE_AFFINE_HULL if p is not coplanar with the triangulation
+{
+  CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) );
+
+  if (could_lock_zone)
+    *could_lock_zone = true;
+
+  if ( dimension() >= 1 ) {
+      // Make sure we continue from here with a finite cell.
+      if ( start == Cell_handle() )
+          start = infinite_cell();
+
+      int ind_inf;
+      if ( start->has_vertex(infinite, ind_inf) )
+          start = start->neighbor(ind_inf);
+  }
+
+  boost::rand48 rng;
+
+  switch (dimension()) {
+  case 3:
+  {
+    CGAL_triangulation_precondition( start != Cell_handle() );
+    CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
+
+    // We implement the remembering visibility/stochastic walk.
+
+    // Remembers the previous cell to avoid useless orientation tests.
+    Cell_handle previous = Cell_handle();
+    Cell_handle c = start;
+
+    if (could_lock_zone)
+    {
+      if (!this->try_lock_cell(c))
+      {
+        *could_lock_zone = false;
+        return Cell_handle();
+      }
+    }
+
+    // Stores the results of the 4 orientation tests.  It will be used
+    // at the end to decide if p lies on a face/edge/vertex/interior.
+    Orientation o[4];
+
+    boost::uniform_smallint<> four(0, 3);
+    boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die4(rng, four);
+
+    // Now treat the cell c.
+    bool try_next_cell = true;
+    while(try_next_cell)
+    {
+      try_next_cell = false;
+      // We know that the 4 vertices of c are positively oriented.
+      // So, in order to test if p is seen outside from one of c's facets,
+      // we just replace the corresponding point by p in the orientation
+      // test.  We do this using the array below.
+      const Point* pts[4] = { &(c->vertex(0)->point()),
+                              &(c->vertex(1)->point()),
+                              &(c->vertex(2)->point()),
+                              &(c->vertex(3)->point()) };
+
+      // For the remembering stochastic walk,
+      // we need to start trying with a random index :
+      int i = die4();
+      // For the remembering visibility walk (Delaunay and Regular only), we don't :
+      // int i = 0;
+
+      // for each vertex
+      for (int j=0; !try_next_cell && j != 4; ++j, i = (i+1)&3)
+      {
+              Cell_handle next = c->neighbor(i);
+
+              if (previous == next)
+        {
+                o[i] = POSITIVE;
+        }
+        else
+        {
+          // We temporarily put p at i's place in pts.
+          const Point* backup = pts[i];
+          pts[i] = &p;
+                o[i] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]);
+                if ( o[i] != NEGATIVE )
+          {
+            pts[i] = backup;
+          }
+          else
+          {
+                  if ( next->has_vertex(infinite, li) )
+            {
+                    // We are outside the convex hull.
+                    lt = OUTSIDE_CONVEX_HULL;
+                    return next;
+                  }
+                  previous = c;
+                  c = next;
+            if (could_lock_zone)
+            {
+              //previous->unlock(); // DON'T do that, "c" may be in
+                                    // the same locking cell as "previous"
+              if (!this->try_lock_cell(c))
+              {
+                *could_lock_zone = false;
+                return Cell_handle();
+              }
+            }
+            try_next_cell = true;
+          }
+        }
+      } // next vertex
+    } // next cell
+
+          // now p is in c or on its boundary
+          int sum = ( o[0] == COPLANAR )
+                  + ( o[1] == COPLANAR )
+                  + ( o[2] == COPLANAR )
+                  + ( o[3] == COPLANAR );
+          switch (sum) {
+          case 0:
+            {
+              lt = CELL;
+              break;
+            }
+          case 1:
+            {
+              lt = FACET;
+              li = ( o[0] == COPLANAR ) ? 0 :
+                   ( o[1] == COPLANAR ) ? 1 :
+                   ( o[2] == COPLANAR ) ? 2 : 3;
+              break;
+            }
+          case 2:
+            {
+              lt = EDGE;
+              li = ( o[0] != COPLANAR ) ? 0 :
+                   ( o[1] != COPLANAR ) ? 1 : 2;
+              lj = ( o[li+1] != COPLANAR ) ? li+1 :
+                   ( o[li+2] != COPLANAR ) ? li+2 : li+3;
+              CGAL_triangulation_assertion(collinear( p,
+                                                      c->vertex( li )->point(),
+                                                      c->vertex( lj )->point()));
+              break;
+            }
+          case 3:
+            {
+              lt = VERTEX;
+              li = ( o[0] != COPLANAR ) ? 0 :
+                   ( o[1] != COPLANAR ) ? 1 :
+                   ( o[2] != COPLANAR ) ? 2 : 3;
+              break;
+            }
+          }
+          return c;
+  }
+
+  case 2:
+    {
+      CGAL_triangulation_precondition( start != Cell_handle() );
+      CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
+      Cell_handle c = start;
+
+      boost::uniform_smallint<> three(0, 2);
+      boost::variate_generator<boost::rand48&, boost::uniform_smallint<> > die3(rng, three);
+
+      //first tests whether p is coplanar with the current triangulation
+      if ( orientation( c->vertex(0)->point(),
+                        c->vertex(1)->point(),
+                        c->vertex(2)->point(),
+                        p ) != DEGENERATE ) {
+        lt = OUTSIDE_AFFINE_HULL;
+        li = 3; // only one facet in dimension 2
+        return c;
+      }
+      // if p is coplanar, location in the triangulation
+      // only the facet numbered 3 exists in each cell
+      while (1) {
+        int inf;
+        if ( c->has_vertex(infinite,inf) ) {
+          // c must contain p in its interior
+          lt = OUTSIDE_CONVEX_HULL;
+          li = cw(inf);
+          lj = ccw(inf);
+          return c;
+        }
+
+        // else c is finite
+        // we test its edges in a random order until we find a
+        // neighbor to go further
+        int i = die3();
+        const Point & p0 = c->vertex( i )->point();
+        const Point & p1 = c->vertex( ccw(i) )->point();
+        const Point & p2 = c->vertex( cw(i) )->point();
+        Orientation o[3];
+        CGAL_triangulation_assertion(coplanar_orientation(p0,p1,p2)==POSITIVE);
+        o[0] = coplanar_orientation(p0,p1,p);
+        if ( o[0] == NEGATIVE ) {
+          c = c->neighbor( cw(i) );
+          continue;
+        }
+        o[1] = coplanar_orientation(p1,p2,p);
+        if ( o[1] == NEGATIVE ) {
+          c = c->neighbor( i );
+          continue;
+        }
+        o[2] = coplanar_orientation(p2,p0,p);
+        if ( o[2] == NEGATIVE ) {
+          c = c->neighbor( ccw(i) );
+          continue;
+        }
+
+        // now p is in c or on its boundary
+        int sum = ( o[0] == COLLINEAR )
+                + ( o[1] == COLLINEAR )
+                + ( o[2] == COLLINEAR );
+        switch (sum) {
+        case 0:
+          {
+            lt = FACET;
+            li = 3; // useless ?
+            break;
+          }
+        case 1:
+          {
+            lt = EDGE;
+            li = ( o[0] == COLLINEAR ) ? i :
+                 ( o[1] == COLLINEAR ) ? ccw(i) :
+                 cw(i);
+            lj = ccw(li);
+            break;
+          }
+        case 2:
+          {
+            lt = VERTEX;
+            li = ( o[0] != COLLINEAR ) ? cw(i) :
+                 ( o[1] != COLLINEAR ) ? i :
+                 ccw(i);
+            break;
+          }
+        }
+        return c;
+      }
+    }
+  case 1:
+    {
+      CGAL_triangulation_precondition( start != Cell_handle() );
+      CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
+      Cell_handle c = start;
+
+      //first tests whether p is collinear with the current triangulation
+      if ( ! collinear( p,
+                        c->vertex(0)->point(),
+                        c->vertex(1)->point()) ) {
+        lt = OUTSIDE_AFFINE_HULL;
+        return c;
+      }
+      // if p is collinear, location :
+      while (1) {
+        if ( c->has_vertex(infinite) ) {
+          // c must contain p in its interior
+          lt = OUTSIDE_CONVEX_HULL;
+          return c;
+        }
+
+        // else c is finite
+        // we test on which direction to continue the traversal
+        switch (collinear_position(c->vertex(0)->point(),
+                                   p,
+                                   c->vertex(1)->point()) ) {
+        case AFTER:
+          c = c->neighbor(0);
+          continue;
+        case BEFORE:
+          c = c->neighbor(1);
+          continue;
+        case MIDDLE:
+            lt = EDGE;
+            li = 0;
+            lj = 1;
+            return c;
+        case SOURCE:
+            lt = VERTEX;
+            li = 0;
+            return c;
+        case TARGET:
+            lt = VERTEX;
+            li = 1;
+            return c;
+        }
+      }
+    }
+  case 0:
+    {
+      Finite_vertices_iterator vit = finite_vertices_begin();
+      if ( ! equal( p, vit->point() ) ) {
+        lt = OUTSIDE_AFFINE_HULL;
+      }
+      else {
+        lt = VERTEX;
+        li = 0;
+      }
+      return vit->cell();
+    }
+  case -1:
+    {
+      lt = OUTSIDE_AFFINE_HULL;
+      return Cell_handle();
+    }
+  default:
+    {
+      CGAL_triangulation_assertion(false);
+      return Cell_handle();
+    }
+  }
+}
+
+#ifndef CGAL_NO_STRUCTURAL_FILTERING
+template <class Gt, class Tds, class Lds>
+inline
+typename Triangulation_3<Gt, Tds, Lds>::Cell_handle
+Triangulation_3<Gt, Tds, Lds>::
+inexact_locate(const Point & t, Cell_handle start, int n_of_turns,
+               bool *could_lock_zone) const
+{
+  CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) );
+
+  if (could_lock_zone)
+    *could_lock_zone = true;
+
+  if(dimension() < 3) return start;
+
+  // Make sure we continue from here with a finite cell.
+  if ( start == Cell_handle() )
+    start = infinite_cell();
+
+  // CJTODO: useless?
+  if (could_lock_zone)
+  {
+    if (!this->try_lock_cell(start))
+    {
+      *could_lock_zone = false;
+      return Cell_handle();
+    }
+  }
+
+  int ind_inf;
+  if( start->has_vertex(infinite, ind_inf) )
+    start = start->neighbor(ind_inf);
+
+  CGAL_triangulation_precondition( start != Cell_handle() );
+  CGAL_triangulation_precondition( ! start->has_vertex(infinite) );
+
+  // We implement the remembering visibility walk.
+  // in this phase, no need to be stochastic
+
+  // Remembers the previous cell to avoid useless orientation tests.
+  Cell_handle previous = Cell_handle();
+  Cell_handle c = start;
+
+  if (could_lock_zone)
+  {
+    if (!this->try_lock_cell(c))
+    {
+      *could_lock_zone = false;
+      return Cell_handle();
+    }
+  }
+
+  // Now treat the cell c.
+  try_next_cell:
+
+  n_of_turns--;
+
+  // We know that the 4 vertices of c are positively oriented.
+  // So, in order to test if p is seen outside from one of c's facets,
+  // we just replace the corresponding point by p in the orientation
+  // test.  We do this using the array below.
+  const Point* pts[4] = { &(c->vertex(0)->point()),
+                          &(c->vertex(1)->point()),
+                          &(c->vertex(2)->point()),
+                          &(c->vertex(3)->point()) };
+
+  // (non-stochastic) visibility walk
+  for (int i=0; i != 4; ++i) {
+    Cell_handle next = c->neighbor(i);
+    if (previous == next) continue;
+
+    // We temporarily put p at i's place in pts.
+    const Point* backup = pts[i];
+    pts[i] = &t;
+    if( inexact_orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE) {
+      pts[i] = backup;
+      continue;
+    }
+    if(next->has_vertex(infinite)) {
+      // We are outside the convex hull.
+      return next;
+    }
+    previous = c;
+    c = next;
+    if (could_lock_zone)
+    {
+      //previous->unlock(); // DON'T do that, "c" may be in
+                            // the same locking cell as "previous"
+      if (!this->try_lock_cell(c))
+      {
+        *could_lock_zone = false;
+        return Cell_handle();
+      }
+    }
+    if(n_of_turns) goto try_next_cell;
+  }
+
+  return c;
+}
+#endif // no CGAL_NO_STRUCTURAL_FILTERING
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_tetrahedron(const Point & p,
+                    const Point & p0,
+                    const Point & p1,
+                    const Point & p2,
+                    const Point & p3,
+                    Locate_type & lt, int & i, int & j ) const
+  // p0,p1,p2,p3 supposed to be non coplanar
+  // tetrahedron p0,p1,p2,p3 is supposed to be well oriented
+  // returns :
+  // ON_BOUNDED_SIDE if p lies strictly inside the tetrahedron
+  // ON_BOUNDARY if p lies on one of the facets
+  // ON_UNBOUNDED_SIDE if p lies strictly outside the tetrahedron
+{
+  CGAL_triangulation_precondition
+    ( orientation(p0,p1,p2,p3) == POSITIVE );
+
+  Orientation o0,o1,o2,o3;
+  if ( ((o0 = orientation(p,p1,p2,p3)) == NEGATIVE) ||
+       ((o1 = orientation(p0,p,p2,p3)) == NEGATIVE) ||
+       ((o2 = orientation(p0,p1,p,p3)) == NEGATIVE) ||
+       ((o3 = orientation(p0,p1,p2,p)) == NEGATIVE) ) {
+    lt = OUTSIDE_CONVEX_HULL;
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  // now all the oi's are >=0
+  // sum gives the number of facets p lies on
+  int sum = ( (o0 == ZERO) ? 1 : 0 )
+          + ( (o1 == ZERO) ? 1 : 0 )
+          + ( (o2 == ZERO) ? 1 : 0 )
+          + ( (o3 == ZERO) ? 1 : 0 );
+
+  switch (sum) {
+  case 0:
+    {
+      lt = CELL;
+      return ON_BOUNDED_SIDE;
+    }
+  case 1:
+    {
+      lt = FACET;
+      // i = index such that p lies on facet(i)
+      i = ( o0 == ZERO ) ? 0 :
+          ( o1 == ZERO ) ? 1 :
+          ( o2 == ZERO ) ? 2 :
+          3;
+      return ON_BOUNDARY;
+    }
+  case 2:
+    {
+      lt = EDGE;
+      // i = smallest index such that p does not lie on facet(i)
+      // i must be < 3 since p lies on 2 facets
+      i = ( o0 == POSITIVE ) ? 0 :
+          ( o1 == POSITIVE ) ? 1 :
+          2;
+      // j = larger index such that p not on facet(j)
+      // j must be > 0 since p lies on 2 facets
+      j = ( o3 == POSITIVE ) ? 3 :
+          ( o2 == POSITIVE ) ? 2 :
+          1;
+      return ON_BOUNDARY;
+    }
+  case 3:
+    {
+      lt = VERTEX;
+      // i = index such that p does not lie on facet(i)
+      i = ( o0 == POSITIVE ) ? 0 :
+          ( o1 == POSITIVE ) ? 1 :
+          ( o2 == POSITIVE ) ? 2 :
+          3;
+      return ON_BOUNDARY;
+    }
+  default:
+    {
+      // impossible : cannot be on 4 facets for a real tetrahedron
+      CGAL_triangulation_assertion(false);
+      return ON_BOUNDARY;
+    }
+  }
+}
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_cell(const Point & p,
+             Cell_handle c,
+             Locate_type & lt, int & i, int & j) const
+  // returns
+  // ON_BOUNDED_SIDE if p inside the cell
+  // (for an infinite cell this means that p lies strictly in the half space
+  // limited by its finite facet)
+  // ON_BOUNDARY if p on the boundary of the cell
+  // (for an infinite cell this means that p lies on the *finite* facet)
+  // ON_UNBOUNDED_SIDE if p lies outside the cell
+  // (for an infinite cell this means that p is not in the preceding
+  // two cases)
+  // lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+  if ( ! is_infinite(c) ) {
+    return side_of_tetrahedron(p,
+                               c->vertex(0)->point(),
+                               c->vertex(1)->point(),
+                               c->vertex(2)->point(),
+                               c->vertex(3)->point(),
+                               lt, i, j);
+  }
+  else {
+    int inf = c->index(infinite);
+    Orientation o;
+    Vertex_handle
+      v1=c->vertex((inf+1)&3),
+      v2=c->vertex((inf+2)&3),
+      v3=c->vertex((inf+3)&3);
+    if ( (inf&1) == 0 )
+      o = orientation(p, v1->point(), v2->point(), v3->point());
+    else
+      o =  orientation(v3->point(), p, v1->point(), v2->point());
+
+    switch (o) {
+    case POSITIVE:
+      {
+        lt = CELL;
+        return ON_BOUNDED_SIDE;
+      }
+    case NEGATIVE:
+      return ON_UNBOUNDED_SIDE;
+    case ZERO:
+      {
+        // location in the finite facet
+        int i_f, j_f;
+        Bounded_side side =
+          side_of_triangle(p, v1->point(), v2->point(), v3->point(),
+                           lt, i_f, j_f);
+        // lt need not be modified in most cases :
+        switch (side) {
+        case ON_BOUNDED_SIDE:
+          {
+            // lt == FACET ok
+            i = inf;
+            return ON_BOUNDARY;
+          }
+        case ON_BOUNDARY:
+          {
+            // lt == VERTEX OR EDGE ok
+            i = ( i_f == 0 ) ? ((inf+1)&3) :
+                ( i_f == 1 ) ? ((inf+2)&3) :
+                ((inf+3)&3);
+            if ( lt == EDGE ) {
+              j = (j_f == 0 ) ? ((inf+1)&3) :
+                  ( j_f == 1 ) ? ((inf+2)&3) :
+                  ((inf+3)&3);
+            }
+            return ON_BOUNDARY;
+          }
+        case ON_UNBOUNDED_SIDE:
+          {
+            // p lies on the plane defined by the finite facet
+            // lt must be initialized
+            return ON_UNBOUNDED_SIDE;
+          }
+        default:
+          {
+            CGAL_triangulation_assertion(false);
+            return ON_BOUNDARY;
+          }
+        } // switch side
+      }// case ZERO
+    default:
+      {
+        CGAL_triangulation_assertion(false);
+        return ON_BOUNDARY;
+      }
+    } // switch o
+  } // else infinite cell
+} // side_of_cell
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_triangle(const Point & p,
+                 const Point & p0,
+                 const Point & p1,
+                 const Point & p2,
+                 Locate_type & lt, int & i, int & j ) const
+  // p0,p1,p2 supposed to define a plane
+  // p supposed to lie on plane p0,p1,p2
+  // triangle p0,p1,p2 defines the orientation of the plane
+  // returns
+  // ON_BOUNDED_SIDE if p lies strictly inside the triangle
+  // ON_BOUNDARY if p lies on one of the edges
+  // ON_UNBOUNDED_SIDE if p lies strictly outside the triangle
+{
+  CGAL_triangulation_precondition( coplanar(p,p0,p1,p2) );
+
+  Orientation o012 = coplanar_orientation(p0,p1,p2);
+  CGAL_triangulation_precondition( o012 != COLLINEAR );
+
+  Orientation o0; // edge p0 p1
+  Orientation o1; // edge p1 p2
+  Orientation o2; // edge p2 p0
+
+  if ((o0 = coplanar_orientation(p0,p1,p)) == opposite(o012) ||
+      (o1 = coplanar_orientation(p1,p2,p)) == opposite(o012) ||
+      (o2 = coplanar_orientation(p2,p0,p)) == opposite(o012)) {
+    lt = OUTSIDE_CONVEX_HULL;
+    return ON_UNBOUNDED_SIDE;
+  }
+
+  // now all the oi's are >=0
+  // sum gives the number of edges p lies on
+  int sum = ( (o0 == ZERO) ? 1 : 0 )
+          + ( (o1 == ZERO) ? 1 : 0 )
+          + ( (o2 == ZERO) ? 1 : 0 );
+
+  switch (sum) {
+  case 0:
+    {
+      lt = FACET;
+      return ON_BOUNDED_SIDE;
+    }
+  case 1:
+    {
+      lt = EDGE;
+      i = ( o0 == ZERO ) ? 0 :
+          ( o1 == ZERO ) ? 1 :
+          2;
+      if ( i == 2 )
+        j=0;
+      else
+        j = i+1;
+      return ON_BOUNDARY;
+    }
+  case 2:
+    {
+      lt = VERTEX;
+      i = ( o0 == o012 ) ? 2 :
+          ( o1 == o012 ) ? 0 :
+          1;
+      return ON_BOUNDARY;
+    }
+  default:
+    {
+      // cannot happen
+      CGAL_triangulation_assertion(false);
+      return ON_BOUNDARY;
+    }
+  }
+}
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_facet(const Point & p,
+              Cell_handle c,
+              Locate_type & lt, int & li, int & lj) const
+  // supposes dimension 2 otherwise does not work for infinite facets
+  // returns :
+  // ON_BOUNDED_SIDE if p inside the facet
+  // (for an infinite facet this means that p lies strictly in the half plane
+  // limited by its finite edge)
+  // ON_BOUNDARY if p on the boundary of the facet
+  // (for an infinite facet this means that p lies on the *finite* edge)
+  // ON_UNBOUNDED_SIDE if p lies outside the facet
+  // (for an infinite facet this means that p is not in the
+  // preceding two cases)
+  // lt has a meaning only when ON_BOUNDED_SIDE or ON_BOUNDARY
+  // when they mean anything, li and lj refer to indices in the cell c
+  // giving the facet (c,i)
+{
+  CGAL_triangulation_precondition( dimension() == 2 );
+  if ( ! is_infinite(c,3) ) {
+    // The following precondition is useless because it is written
+    // in side_of_facet
+    // 	CGAL_triangulation_precondition( coplanar (p,
+    // 					  c->vertex(0)->point,
+    // 					  c->vertex(1)->point,
+    // 					  c->vertex(2)->point) );
+    int i_t, j_t;
+    Bounded_side side = side_of_triangle(p,
+                            c->vertex(0)->point(),
+                            c->vertex(1)->point(),
+                            c->vertex(2)->point(),
+                            lt, i_t, j_t);
+    // We protect the following code by this test to avoid valgrind messages.
+    if (side == ON_BOUNDARY) {
+        // indices in the original cell :
+        li = ( i_t == 0 ) ? 0 :
+             ( i_t == 1 ) ? 1 : 2;
+        lj = ( j_t == 0 ) ? 0 :
+             ( j_t == 1 ) ? 1 : 2;
+    }
+    return side;
+  }
+  // else infinite facet
+  int inf = c->index(infinite);
+    // The following precondition is useless because it is written
+    // in side_of_facet
+    // 	CGAL_triangulation_precondition( coplanar (p,
+    // 				  c->neighbor(inf)->vertex(0)->point(),
+    // 				  c->neighbor(inf)->vertex(1)->point(),
+    // 				  c->neighbor(inf)->vertex(2)->point()));
+  int i2 = next_around_edge(inf,3);
+  int i1 = 3-inf-i2;
+  Vertex_handle v1 = c->vertex(i1),
+                v2 = c->vertex(i2);
+
+  CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(),
+                               mirror_vertex(c, inf)->point()) == POSITIVE);
+
+  switch (coplanar_orientation(v1->point(), v2->point(), p)) {
+  case POSITIVE:
+      // p lies on the same side of v1v2 as vn, so not in f
+      return ON_UNBOUNDED_SIDE;
+  case NEGATIVE:
+      // p lies in f
+      lt = FACET;
+      li = 3;
+      return ON_BOUNDED_SIDE;
+  default: // case ZERO:
+      // p collinear with v1v2
+      int i_e;
+      switch (side_of_segment(p, v1->point(), v2->point(), lt, i_e)) {
+        // computation of the indices in the original cell
+      case ON_BOUNDED_SIDE:
+          // lt == EDGE ok
+          li = i1;
+          lj = i2;
+          return ON_BOUNDARY;
+      case ON_BOUNDARY:
+          // lt == VERTEX ok
+          li = ( i_e == 0 ) ? i1 : i2;
+          return ON_BOUNDARY;
+      default: // case ON_UNBOUNDED_SIDE:
+          // p lies on the line defined by the finite edge
+          return ON_UNBOUNDED_SIDE;
+      }
+  }
+}
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_segment(const Point & p,
+                const Point & p0,
+                const Point & p1,
+                Locate_type & lt, int & i ) const
+  // p0, p1 supposed to be different
+  // p supposed to be collinear to p0, p1
+  // returns :
+  // ON_BOUNDED_SIDE if p lies strictly inside the edge
+  // ON_BOUNDARY if p equals p0 or p1
+  // ON_UNBOUNDED_SIDE if p lies strictly outside the edge
+{
+  CGAL_triangulation_precondition( ! equal(p0, p1) );
+  CGAL_triangulation_precondition( collinear(p, p0, p1) );
+
+  switch (collinear_position(p0, p, p1)) {
+  case MIDDLE:
+    lt = EDGE;
+    return ON_BOUNDED_SIDE;
+  case SOURCE:
+    lt = VERTEX;
+    i = 0;
+    return ON_BOUNDARY;
+  case TARGET:
+    lt = VERTEX;
+    i = 1;
+    return ON_BOUNDARY;
+  default: // case BEFORE: case AFTER:
+    lt = OUTSIDE_CONVEX_HULL;
+    return ON_UNBOUNDED_SIDE;
+  }
+}
+
+template < class GT, class Tds, class Lds >
+Bounded_side
+Triangulation_3<GT,Tds,Lds>::
+side_of_edge(const Point & p,
+             Cell_handle c,
+             Locate_type & lt, int & li) const
+  // supposes dimension 1 otherwise does not work for infinite edges
+  // returns :
+  // ON_BOUNDED_SIDE if p inside the edge
+  // (for an infinite edge this means that p lies in the half line
+  // defined by the vertex)
+  // ON_BOUNDARY if p equals one of the vertices
+  // ON_UNBOUNDED_SIDE if p lies outside the edge
+  // (for an infinite edge this means that p lies on the other half line)
+  // lt has a meaning when ON_BOUNDED_SIDE and ON_BOUNDARY
+  // li refer to indices in the cell c
+{
+  CGAL_triangulation_precondition( dimension() == 1 );
+  if ( ! is_infinite(c,0,1) )
+    return side_of_segment(p, c->vertex(0)->point(), c->vertex(1)->point(),
+                           lt, li);
+  // else infinite edge
+  int inf = c->index(infinite);
+  switch (collinear_position(c->vertex(1-inf)->point(), p,
+                             mirror_vertex(c, inf)->point())) {
+      case SOURCE:
+          lt = VERTEX;
+          li = 1-inf;
+          return ON_BOUNDARY;
+      case BEFORE:
+          lt = EDGE;
+          return ON_BOUNDED_SIDE;
+      default: // case MIDDLE: case AFTER: case TARGET:
+          return ON_UNBOUNDED_SIDE;
+  }
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+flip( Cell_handle c, int i )
+{
+  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
+                                   && (number_of_vertices() >= 5) );
+
+  Cell_handle n = c->neighbor(i);
+  int in = n->index(c);
+  if ( is_infinite( c ) || is_infinite( n ) ) return false;
+
+  if ( i%2 == 1 ) {
+    if ( orientation( c->vertex((i+1)&3)->point(),
+                      c->vertex((i+2)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+    if ( orientation( c->vertex((i+2)&3)->point(),
+                      c->vertex((i+3)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+    if ( orientation( c->vertex((i+3)&3)->point(),
+                      c->vertex((i+1)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+  }
+  else {
+    if ( orientation( c->vertex((i+2)&3)->point(),
+                      c->vertex((i+1)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+    if ( orientation( c->vertex((i+3)&3)->point(),
+                      c->vertex((i+2)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+    if ( orientation( c->vertex((i+1)&3)->point(),
+                      c->vertex((i+3)&3)->point(),
+                      n->vertex(in)->point(),
+                      c->vertex(i)->point() )
+         != POSITIVE ) return false;
+  }
+
+  _tds.flip_flippable(c, i);
+  return true;
+}
+
+template < class GT, class Tds, class Lds >
+void
+Triangulation_3<GT,Tds,Lds>::
+flip_flippable( Cell_handle c, int i )
+{
+  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
+                                   && (number_of_vertices() >= 5) );
+  CGAL_triangulation_precondition_code( Cell_handle n = c->neighbor(i); );
+  CGAL_triangulation_precondition_code( int in = n->index(c); );
+  CGAL_triangulation_precondition( ( ! is_infinite( c ) ) &&
+                                   ( ! is_infinite( n ) ) );
+
+  if ( i%2 == 1 ) {
+    CGAL_triangulation_precondition( orientation( c->vertex((i+1)&3)->point(),
+                                                  c->vertex((i+2)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+    CGAL_triangulation_precondition( orientation( c->vertex((i+2)&3)->point(),
+                                                  c->vertex((i+3)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+    CGAL_triangulation_precondition( orientation( c->vertex((i+3)&3)->point(),
+                                                  c->vertex((i+1)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+  }
+  else {
+    CGAL_triangulation_precondition( orientation( c->vertex((i+2)&3)->point(),
+                                                  c->vertex((i+1)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+    CGAL_triangulation_precondition( orientation( c->vertex((i+3)&3)->point(),
+                                                  c->vertex((i+2)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+    CGAL_triangulation_precondition( orientation( c->vertex((i+1)&3)->point(),
+                                                  c->vertex((i+3)&3)->point(),
+                                                  n->vertex(in)->point(),
+                                                  c->vertex(i)->point() )
+                                     == POSITIVE );
+  }
+
+  _tds.flip_flippable(c, i);
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+flip( Cell_handle c, int i, int j )
+  // flips edge i,j of cell c
+{
+  CGAL_triangulation_precondition( (dimension() == 3)
+                                   && (0<=i) && (i<4)
+                                   && (0<=j) && (j<4)
+                                   && ( i != j )
+                                   && (number_of_vertices() >= 5) );
+
+  // checks that degree 3 and not on the convex hull
+  int degree = 0;
+  Cell_circulator ccir = incident_cells(c,i,j);
+  Cell_circulator cdone = ccir;
+  do {
+    if ( is_infinite(ccir) ) return false;
+    ++degree;
+    ++ccir;
+  } while ( ccir != cdone );
+
+  if ( degree != 3 ) return false;
+
+  // checks that future tetrahedra are well oriented
+  Cell_handle n = c->neighbor( next_around_edge(i,j) );
+  int in = n->index( c->vertex(i) );
+  int jn = n->index( c->vertex(j) );
+  if ( orientation( c->vertex(next_around_edge(i,j))->point(),
+                    c->vertex(next_around_edge(j,i))->point(),
+                    n->vertex(next_around_edge(jn,in))->point(),
+                    c->vertex(j)->point() )
+       != POSITIVE ) return false;
+  if ( orientation( c->vertex(i)->point(),
+                    c->vertex(next_around_edge(j,i))->point(),
+                    n->vertex(next_around_edge(jn,in))->point(),
+                    c->vertex(next_around_edge(i,j))->point() )
+       != POSITIVE ) return false;
+
+  _tds.flip_flippable(c, i, j);
+  return true;
+}
+
+template < class GT, class Tds, class Lds >
+void
+Triangulation_3<GT,Tds,Lds>::
+flip_flippable( Cell_handle c, int i, int j )
+  // flips edge i,j of cell c
+{
+#if !defined CGAL_TRIANGULATION_NO_PRECONDITIONS && \
+    !defined CGAL_NO_PRECONDITIONS && !defined NDEBUG
+  CGAL_triangulation_precondition( (dimension() == 3)
+                                   && (0<=i) && (i<4)
+                                   && (0<=j) && (j<4)
+                                   && ( i != j )
+                                   && (number_of_vertices() >= 5) );
+  int degree = 0;
+  Cell_circulator ccir = incident_cells(c,i,j);
+  Cell_circulator cdone = ccir;
+  do {
+    CGAL_triangulation_precondition( ! is_infinite(ccir) );
+    ++degree;
+    ++ccir;
+  } while ( ccir != cdone );
+  CGAL_triangulation_precondition( degree == 3 );
+
+  Cell_handle n = c->neighbor( next_around_edge(i, j) );
+  int in = n->index( c->vertex(i) );
+  int jn = n->index( c->vertex(j) );
+  CGAL_triangulation_precondition
+    ( orientation( c->vertex(next_around_edge(i,j))->point(),
+                   c->vertex(next_around_edge(j,i))->point(),
+                   n->vertex(next_around_edge(jn,in))->point(),
+                   c->vertex(j)->point() ) == POSITIVE );
+  CGAL_triangulation_precondition
+    ( orientation( c->vertex(i)->point(),
+                   c->vertex(next_around_edge(j,i))->point(),
+                   n->vertex(next_around_edge(jn,in))->point(),
+                   c->vertex(next_around_edge(i,j))->point() ) == POSITIVE );
+#endif
+  _tds.flip_flippable(c, i, j);
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert(const Point & p, Cell_handle start)
+{
+  Locate_type lt;
+  int li, lj;
+  Cell_handle c = locate( p, lt, li, lj, start);
+  return insert(p, lt, c, li, lj);
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert(const Point & p, Locate_type lt, Cell_handle c, int li, int lj)
+{
+  switch (lt) {
+  case VERTEX:
+    return c->vertex(li);
+  case EDGE:
+    return insert_in_edge(p, c, li, lj);
+  case FACET:
+    return insert_in_facet(p, c, li);
+  case CELL:
+    return insert_in_cell(p, c);
+  case OUTSIDE_CONVEX_HULL:
+    return insert_outside_convex_hull(p, c);
+  case OUTSIDE_AFFINE_HULL:
+  default:
+    return insert_outside_affine_hull(p);
+  }
+}
+
+
+
+template < class GT, class Tds, class Lds >
+template < class Conflict_tester, class Hidden_points_visitor >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_in_conflict(const Point & p,
+                   Locate_type lt, Cell_handle c, int li, int /*lj*/,
+                   const Conflict_tester &tester,
+                   Hidden_points_visitor &hider,
+                   bool *could_lock_zone)
+{
+  if (could_lock_zone)
+    *could_lock_zone = true;
+
+  switch (dimension()) {
+  case 3:
+    {
+      if ((lt == VERTEX) &&
+          (tester.compare_weight(c->vertex(li)->point(), p)==0) ) {
+        return c->vertex(li);
+      }
+      // If the new point is not in conflict with its cell, it is hidden.
+      if (!tester.test_initial_cell(c)) {
+        hider.hide_point(c,p);
+        return Vertex_handle();
+      }
+
+      // Ok, we really insert the point now.
+      // First, find the conflict region.
+      std::vector<Cell_handle> cells;
+      Facet facet;
+
+      cells.reserve(32);
+
+      // Parallel
+      if (could_lock_zone)
+      {
+        std::vector<Facet> facets;
+        facets.reserve(32);
+
+        find_conflicts(
+          c,
+          tester,
+          make_triple(
+            std::back_inserter(facets),
+                                    std::back_inserter(cells),
+            Emptyset_iterator()),
+          could_lock_zone);
+
+        if (*could_lock_zone == false)
+        {
+          BOOST_FOREACH(Cell_handle& ch,
+            std::make_pair(cells.begin(), cells.end()))
+          {
+            ch->tds_data().clear();
+          }
+
+          BOOST_FOREACH(Facet& f,
+            std::make_pair(facets.begin(), facets.end()))
+          {
+            f.first->neighbor(f.second)->tds_data().clear();
+          }
+          return Vertex_handle();
+        }
+
+        facet = facets.back();
+      }
+      // Sequential
+      else
+      {
+        cells.reserve(32);
+        find_conflicts(
+          c,
+          tester,
+          make_triple(
+            Oneset_iterator<Facet>(facet),
+                                    std::back_inserter(cells),
+                                    Emptyset_iterator()));
+      }
+
+
+      // Remember the points that are hidden by the conflicting cells,
+      // as they will be deleted during the insertion.
+      hider.process_cells_in_conflict(cells.begin(), cells.end());
+
+      Vertex_handle v = _insert_in_hole(p, cells.begin(), cells.end(),
+                                        facet.first, facet.second);
+
+      // Store the hidden points in their new cells.
+      hider.reinsert_vertices(v);
+      return v;
+    }
+  case 2:
+    {
+      // This check is added compared to the 3D case
+      if (lt == OUTSIDE_AFFINE_HULL)
+        return insert_outside_affine_hull (p);
+
+      if ((lt == VERTEX) &&
+          (tester.compare_weight(c->vertex(li)->point(), p)==0) ) {
+        return c->vertex(li);
+      }
+      // If the new point is not in conflict with its cell, it is hidden.
+      if (!tester.test_initial_cell(c)) {
+        hider.hide_point(c,p);
+        return Vertex_handle();
+      }
+
+      // Ok, we really insert the point now.
+      // First, find the conflict region.
+      std::vector<Cell_handle> cells;
+      Facet facet;
+
+      cells.reserve(32);
+      find_conflicts
+        (c, tester, make_triple(Oneset_iterator<Facet>(facet),
+                                std::back_inserter(cells),
+                                Emptyset_iterator()));
+
+      // Remember the points that are hidden by the conflicting cells,
+      // as they will be deleted during the insertion.
+      hider.process_cells_in_conflict(cells.begin(), cells.end());
+
+      Vertex_handle v = _insert_in_hole(p, cells.begin(), cells.end(),
+                                        facet.first, facet.second);
+
+      // Store the hidden points in their new cells.
+      hider.reinsert_vertices(v);
+      return v;
+    }
+  default:
+    {
+      // dimension() <= 1
+      if (lt == OUTSIDE_AFFINE_HULL)
+        return insert_outside_affine_hull (p);
+
+      if (lt == VERTEX &&
+          tester.compare_weight(c->vertex(li)->point(), p) == 0) {
+        return c->vertex(li);
+      }
+
+      // If the new point is not in conflict with its cell, it is hidden.
+      if (! tester.test_initial_cell(c)) {
+        hider.hide_point(c,p);
+        return Vertex_handle();
+      }
+
+      if (dimension() == 0) {
+        return hider.replace_vertex(c, li, p);
+      }
+
+
+      // dimension() == 1;
+
+      // Ok, we really insert the point now.
+      // First, find the conflict region.
+      std::vector<Cell_handle> cells;
+      Facet facet;
+      Cell_handle bound[2];
+      // corresponding index: bound[j]->neighbor(1-j) is in conflict.
+
+      // We get all cells in conflict,
+      // and remember the 2 external boundaries.
+      cells.push_back(c);
+
+      for (int j = 0; j<2; ++j) {
+        Cell_handle n = c->neighbor(j);
+        while ( tester(n) ) {
+          cells.push_back(n);
+          n = n->neighbor(j);
+        }
+        bound[j] = n;
+      }
+
+      // Insertion.
+      hider.process_cells_in_conflict(cells.begin(), cells.end());
+
+      tds().delete_cells(cells.begin(), cells.end());
+
+      // We preserve the order (like the orientation in 2D-3D).
+      Vertex_handle v = tds().create_vertex();
+      Cell_handle c0 = tds().create_face(v, bound[0]->vertex(0), Vertex_handle());
+      Cell_handle c1 = tds().create_face(bound[1]->vertex(1), v, Vertex_handle());
+      tds().set_adjacency(c0, 1, c1, 0);
+      tds().set_adjacency(bound[0], 1, c0, 0);
+      tds().set_adjacency(c1, 1, bound[1], 0);
+      bound[0]->vertex(0)->set_cell(bound[0]);
+      bound[1]->vertex(1)->set_cell(bound[1]);
+      v->set_cell(c0);
+      v->set_point (p);
+
+      hider.reinsert_vertices(v);
+
+      return v;
+    }
+  }
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_in_cell(const Point & p, Cell_handle c)
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+  CGAL_triangulation_precondition_code
+    ( Locate_type lt;
+      int i; int j; );
+  CGAL_triangulation_precondition
+    ( side_of_tetrahedron( p,
+                           c->vertex(0)->point(),
+                           c->vertex(1)->point(),
+                           c->vertex(2)->point(),
+                           c->vertex(3)->point(),
+                           lt,i,j ) == ON_BOUNDED_SIDE );
+
+    Vertex_handle v = _tds.insert_in_cell(c);
+    v->set_point(p);
+    return v;
+}
+
+template < class GT, class Tds, class Lds >
+inline
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_in_facet(const Point & p, Cell_handle c, int i)
+{
+  CGAL_triangulation_precondition( dimension() == 2 || dimension() == 3);
+  CGAL_triangulation_precondition( (dimension() == 2 && i == 3)
+                                || (dimension() == 3 && i >= 0 && i <= 3) );
+  CGAL_triangulation_exactness_precondition_code
+    ( Locate_type lt;
+      int li; int lj; );
+  CGAL_triangulation_exactness_precondition
+    ( coplanar( p, c->vertex((i+1)&3)->point(),
+                   c->vertex((i+2)&3)->point(),
+                   c->vertex((i+3)&3)->point() )
+      &&
+      side_of_triangle( p,
+                        c->vertex((i+1)&3)->point(),
+                        c->vertex((i+2)&3)->point(),
+                        c->vertex((i+3)&3)->point(),
+                        lt, li, lj) == ON_BOUNDED_SIDE );
+
+    Vertex_handle v = _tds.insert_in_facet(c, i);
+    v->set_point(p);
+    return v;
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_in_edge(const Point & p, Cell_handle c, int i, int j)
+{
+  CGAL_triangulation_precondition( i != j );
+  CGAL_triangulation_precondition( dimension() >= 1 && dimension() <= 3 );
+  CGAL_triangulation_precondition( i >= 0 && i <= dimension()
+                                   && j >= 0 && j <= dimension() );
+  CGAL_triangulation_exactness_precondition_code( Locate_type lt; int li; );
+  switch ( dimension() ) {
+  case 3:
+  case 2:
+    {
+      CGAL_triangulation_precondition( ! is_infinite(c, i, j) );
+      CGAL_triangulation_exactness_precondition(
+                         collinear( c->vertex(i)->point(),
+                                    p,
+                                    c->vertex(j)->point() )
+                      && side_of_segment( p,
+                                          c->vertex(i)->point(),
+                                          c->vertex(j)->point(),
+                                          lt, li ) == ON_BOUNDED_SIDE );
+      break;
+    }
+  case 1:
+    {
+      CGAL_triangulation_exactness_precondition( side_of_edge(p, c, lt, li)
+                                                 == ON_BOUNDED_SIDE );
+      break;
+    }
+  }
+
+  Vertex_handle v = _tds.insert_in_edge(c, i, j);
+  v->set_point(p);
+  return v;
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_outside_convex_hull(const Point & p, Cell_handle c)
+  // c is an infinite cell containing p
+  // p is strictly outside the convex hull
+  // dimension 0 not allowed, use outside-affine-hull
+{
+  CGAL_triangulation_precondition( dimension() > 0 );
+  CGAL_triangulation_precondition( c->has_vertex(infinite) );
+  // the precondition that p is in c is tested in each of the
+  // insertion methods called from this method
+  switch ( dimension() ) {
+  case 1:
+    {
+      // 	// p lies in the infinite edge neighboring c
+      // 	// on the other side of li
+      // 	return insert_in_edge(p,c->neighbor(1-li),0,1);
+      return insert_in_edge(p,c,0,1);
+    }
+  case 2:
+    {
+      Conflict_tester_outside_convex_hull_2 tester(p, this);
+      Vertex_handle v = insert_conflict(c, tester);
+      v->set_point(p);
+      return v;
+    }
+  default: // case 3:
+    {
+      Conflict_tester_outside_convex_hull_3 tester(p, this);
+      Vertex_handle v = insert_conflict(c, tester);
+      v->set_point(p);
+      return v;
+    }
+  }
+}
+
+template < class GT, class Tds, class Lds >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::
+insert_outside_affine_hull(const Point & p)
+{
+  CGAL_triangulation_precondition( dimension() < 3 );
+  bool reorient;
+  switch ( dimension() ) {
+  case 1:
+    {
+      Cell_handle c = infinite_cell();
+      Cell_handle n = c->neighbor(c->index(infinite_vertex()));
+      Orientation o = coplanar_orientation(n->vertex(0)->point(),
+                                           n->vertex(1)->point(), p);
+      CGAL_triangulation_precondition ( o != COLLINEAR );
+      reorient = o == NEGATIVE;
+      break;
+    }
+  case 2:
+    {
+      Cell_handle c = infinite_cell();
+      Cell_handle n = c->neighbor(c->index(infinite_vertex()));
+      Orientation o = orientation( n->vertex(0)->point(),
+                                   n->vertex(1)->point(),
+                                   n->vertex(2)->point(), p );
+      CGAL_triangulation_precondition ( o != COPLANAR );
+      reorient = o == NEGATIVE;
+      break;
+    }
+  default:
+    reorient = false;
+  }
+
+  Vertex_handle v = _tds.insert_increase_dimension(infinite_vertex());
+  v->set_point(p);
+
+  if (reorient)
+      _tds.reorient();
+
+  return v;
+}
+
+template < class GT, class Tds, class Lds >
+template < class OutputItCells >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point  &p,
+                                                   OutputItCells fit,
+                                                   Cell_handle start)
+{
+  Vertex_handle v = insert(p, start);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+template < class GT, class Tds, class Lds >
+template < class OutputItCells >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point& p,
+                                                   OutputItCells fit,
+                                                   Vertex_handle hint)
+{
+  Vertex_handle v = insert(p, hint);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+template < class GT, class Tds, class Lds >
+template < class OutputItCells >
+typename Triangulation_3<GT,Tds,Lds>::Vertex_handle
+Triangulation_3<GT,Tds,Lds>::insert_and_give_new_cells(const Point& p,
+                                                   Locate_type lt,
+                                                   Cell_handle c, int li, int lj,
+                                                   OutputItCells fit)
+{
+  Vertex_handle v = insert(p, lt, c, li, lj);
+  int dimension = this->dimension();
+  if(dimension == 3) this->incident_cells(v, fit);
+  else if(dimension == 2)
+  {
+    Cell_handle c = v->cell(), end = c;
+    do {
+      *fit++ = c;
+      int i = c->index(v);
+      c = c->neighbor((i+1)%3);
+    } while(c != end);
+  }
+  else if(dimension == 1)
+  {
+    Cell_handle c = v->cell();
+    *fit++ = c;
+    *fit++ = c->neighbor((~(c->index(v)))&1);
+  }
+  else *fit++ = v->cell(); // dimension = 0
+  return v;
+}
+
+template <class Gt, class Tds, class Lds>
+typename Triangulation_3<Gt,Tds,Lds>::Vertex_triple
+Triangulation_3<Gt,Tds,Lds>::
+make_vertex_triple(const Facet& f) const
+{
+  Cell_handle ch = f.first;
+  int i = f.second;
+
+  return Vertex_triple(ch->vertex(vertex_triple_index(i,0)),
+      ch->vertex(vertex_triple_index(i,1)),
+      ch->vertex(vertex_triple_index(i,2)));
+}
+
+template <class Gt, class Tds, class Lds>
+void
+Triangulation_3<Gt,Tds,Lds>::
+make_canonical(Vertex_triple& t) const
+{
+  int i = (t.first < t.second) ? 0 : 1;
+  if(i==0) {
+    i = (t.first < t.third) ? 0 : 2;
+  } else {
+    i = (t.second < t.third) ? 1 : 2;
+  }
+  Vertex_handle tmp;
+  switch(i){
+  case 0: return;
+  case 1:
+    tmp = t.first;
+    t.first = t.second;
+    t.second = t.third;
+    t.third = tmp;
+    return;
+  default:
+    tmp = t.first;
+    t.first = t.third;
+    t.third = t.second;
+    t.second = tmp;
+  }
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+test_dim_down(Vertex_handle v) const
+  // tests whether removing v decreases the dimension of the triangulation
+  // true iff
+  // v is incident to all finite cells/facets
+  // and all the other vertices are coplanar/collinear in dim3/2.
+{
+  CGAL_triangulation_precondition(dimension() >= 0);
+  CGAL_triangulation_precondition(! is_infinite(v) );
+
+  if (dimension() == 3) {
+      Finite_cells_iterator cit = finite_cells_begin();
+
+      int iv;
+      if ( ! cit->has_vertex(v,iv) )
+          return false;
+      const Point &p1=cit->vertex((iv+1)&3)->point();
+      const Point &p2=cit->vertex((iv+2)&3)->point();
+      const Point &p3=cit->vertex((iv+3)&3)->point();
+      ++cit;
+
+      for (; cit != finite_cells_end(); ++cit ) {
+          if ( ! cit->has_vertex(v,iv) )
+              return false;
+          for (int i=1; i<4; i++ )
+              if ( !coplanar(p1,p2,p3,cit->vertex((iv+i)&3)->point()) )
+                  return false;
+      }
+  }
+  else if (dimension() == 2)
+  {
+      Finite_facets_iterator cit = finite_facets_begin();
+
+      int iv;
+      if ( ! cit->first->has_vertex(v,iv) )
+          return false;
+      const Point &p1 = cit->first->vertex(cw(iv))->point();
+      const Point &p2 = cit->first->vertex(ccw(iv))->point();
+      ++cit;
+
+      for (; cit != finite_facets_end(); ++cit ) {
+          if ( ! cit->first->has_vertex(v,iv) )
+              return false;
+          if ( !collinear(p1, p2, cit->first->vertex(cw(iv))->point()) ||
+               !collinear(p1, p2, cit->first->vertex(ccw(iv))->point()) )
+              return false;
+      }
+  }
+  else // dimension() == 1 or 0
+      return number_of_vertices() == (size_type) dimension() + 1;
+
+  return true;
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+test_dim_down_using_incident_cells_3(
+  Vertex_handle v, std::vector<Cell_handle> &incident_cells,
+  std::vector<Vertex_handle> &adj_vertices,
+  bool *could_lock_zone) const
+{
+  CGAL_triangulation_precondition(dimension() == 3);
+  CGAL_triangulation_precondition(! is_infinite(v) );
+
+  // Collect all vertices on the boundary
+  // and all incident cells
+  if (could_lock_zone)
+  {
+    *could_lock_zone = try_lock_and_get_adjacent_vertices_and_cells_3(
+      v, std::back_inserter(adj_vertices), incident_cells);
+    if (*could_lock_zone == false)
+      return false;
+  }
+  else
+  {
+    adjacent_vertices_and_cells_3(
+      v, std::back_inserter(adj_vertices), incident_cells);
+  }
+
+  typedef Filter_iterator< typename std::vector<Vertex_handle>::const_iterator,
+                           Infinite_tester
+                         > Finite_vertex_iterator;
+  Finite_vertex_iterator vit(
+    adj_vertices.end(), Infinite_tester(this), adj_vertices.begin());
+  Finite_vertex_iterator vit_end(
+    adj_vertices.end(), Infinite_tester(this));
+  const Point &p1 = (*vit++)->point();
+  const Point &p2 = (*vit++)->point();
+  const Point &p3 = (*vit++)->point();
+
+  for ( ; vit != vit_end ; ++vit )
+  {
+          if (!coplanar(p1, p2, p3, (*vit)->point()))
+            return false;
+  }
+
+  for (typename std::vector<Cell_handle>::const_iterator it_inc_cell
+         = incident_cells.begin() ;
+       it_inc_cell != incident_cells.end() ;
+       ++it_inc_cell)
+  {
+    if (!is_infinite(*it_inc_cell))
+      return is_infinite(mirror_vertex(
+        *it_inc_cell, (*it_inc_cell)->index(v)));
+  }
+
+  return true;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+make_hole_2D(Vertex_handle v, std::list<Edge_2D> &hole, VertexRemover &remover)
+{
+  std::vector<Cell_handle> to_delete;
+  to_delete.reserve(32);
+
+  Face_circulator fc = tds().incident_faces(v);
+  Face_circulator done(fc);
+
+  // We prepare for deleting all interior cells.
+  // We ->set_cell() pointers to cells outside the hole.
+  // We push the Edges_2D of the boundary (seen from outside) in "hole".
+  do {
+    Cell_handle f = fc;
+    int i = f->index(v);
+    Cell_handle fn = f->neighbor(i);
+    int in = fn->index(f);
+
+    f->vertex(cw(i))->set_cell(fn);
+    fn->set_neighbor(in, Cell_handle());
+
+    hole.push_back(Edge_2D(fn, in));
+    remover.add_hidden_points(f);
+    to_delete.push_back(f);
+
+    ++fc;
+  } while (fc != done);
+
+  tds().delete_cells(to_delete.begin(), to_delete.end());
+  return remover;
+}
+
+// this one also erases a set of cells
+// which is useful to the move method
+// outputting newly created cells
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+make_hole_2D(Vertex_handle v, std::list<Edge_2D> &hole, VertexRemover &remover,
+             std::set<Cell_handle> &cells_set)
+{
+  std::vector<Cell_handle> to_delete;
+  to_delete.reserve(32);
+
+  Face_circulator fc = tds().incident_faces(v);
+  Face_circulator done(fc);
+
+  // We prepare for deleting all interior cells.
+  // We ->set_cell() pointers to cells outside the hole.
+  // We push the Edges_2D of the boundary (seen from outside) in "hole".
+  do {
+    Cell_handle f = fc;
+    int i = f->index(v);
+    Cell_handle fn = f->neighbor(i);
+    int in = fn->index(f);
+
+    f->vertex(cw(i))->set_cell(fn);
+    fn->set_neighbor(in, Cell_handle());
+
+    hole.push_back(Edge_2D(fn, in));
+    remover.add_hidden_points(f);
+    to_delete.push_back(f);
+
+    ++fc;
+  } while (fc != done);
+
+  for(typename std::vector<Cell_handle>::const_iterator ib = to_delete.begin(),
+        iend = to_delete.end(); ib != iend; ib++) cells_set.erase(*ib);
+
+  tds().delete_cells(to_delete.begin(), to_delete.end());
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+void
+Triangulation_3<Gt, Tds, Lds>::
+fill_hole_2D(std::list<Edge_2D> & first_hole, VertexRemover &remover)
+{
+  typedef std::list<Edge_2D> Hole;
+
+  std::vector<Hole> hole_list;
+
+  Cell_handle  f, ff, fn;
+  int i, ii, in;
+
+  hole_list.push_back(first_hole);
+
+  while( ! hole_list.empty())
+    {
+      Hole hole = hole_list.back();
+      hole_list.pop_back();
+
+      // if the hole has only three edges, create the triangle
+      if (hole.size() == 3) {
+        typename Hole::iterator hit = hole.begin();
+        f = (*hit).first;        i = (*hit).second;
+        ff = (* ++hit).first;    ii = (*hit).second;
+        fn = (* ++hit).first;    in = (*hit).second;
+        tds().create_face(f, i, ff, ii, fn, in);
+        continue;
+      }
+
+      // else find an edge with two finite vertices
+      // on the hole boundary
+      // and the new triangle adjacent to that edge
+      //  cut the hole and push it back
+
+      // first, ensure that a neighboring face
+      // whose vertices on the hole boundary are finite
+      // is the first of the hole
+      while (1) {
+        ff = (hole.front()).first;
+        ii = (hole.front()).second;
+        if ( is_infinite(ff->vertex(cw(ii))) ||
+             is_infinite(ff->vertex(ccw(ii)))) {
+          hole.push_back(hole.front());
+          hole.pop_front();
+        }
+        else
+            break;
+      }
+
+      // take the first neighboring face and pop it;
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+      hole.pop_front();
+
+      Vertex_handle v0 = ff->vertex(cw(ii));
+      Vertex_handle v1 = ff->vertex(ccw(ii));
+      Vertex_handle v2 = infinite_vertex();
+      const Point &p0 = v0->point();
+      const Point &p1 = v1->point();
+      const Point *p2 = NULL; // Initialize to NULL to avoid warning.
+
+      typename Hole::iterator hdone = hole.end();
+      typename Hole::iterator hit = hole.begin();
+      typename Hole::iterator cut_after(hit);
+
+      // if tested vertex is c with respect to the vertex opposite
+      // to NULL neighbor,
+      // stop at the before last face;
+      hdone--;
+      for (; hit != hdone; ++hit) {
+        fn = hit->first;
+        in = hit->second;
+        Vertex_handle vv = fn->vertex(ccw(in));
+        if (is_infinite(vv)) {
+          if (is_infinite(v2))
+              cut_after = hit;
+        }
+        else {     // vv is a finite vertex
+          const Point &p = vv->point();
+          if (coplanar_orientation(p0, p1, p) == COUNTERCLOCKWISE) {
+            if (is_infinite(v2) ||
+                remover.side_of_bounded_circle(p0, p1, *p2, p, true)
+                  == ON_BOUNDED_SIDE) {
+                v2 = vv;
+                p2 = &p;
+                cut_after = hit;
+            }
+          }
+        }
+      }
+
+      // create new triangle and update adjacency relations
+      Cell_handle newf;
+
+      //update the hole and push back in the Hole_List stack
+      // if v2 belongs to the neighbor following or preceding *f
+      // the hole remain a single hole
+      // otherwise it is split in two holes
+
+      fn = (hole.front()).first;
+      in = (hole.front()).second;
+      if (fn->has_vertex(v2, i) && i == ccw(in)) {
+        newf = tds().create_face(ff, ii, fn, in);
+        hole.pop_front();
+        hole.push_front(Edge_2D(newf, 1));
+        hole_list.push_back(hole);
+      }
+      else{
+        fn = (hole.back()).first;
+        in = (hole.back()).second;
+        if (fn->has_vertex(v2, i) && i == cw(in)) {
+          newf = tds().create_face(fn, in, ff, ii);
+          hole.pop_back();
+          hole.push_back(Edge_2D(newf, 1));
+          hole_list.push_back(hole);
+        }
+        else{
+          // split the hole in two holes
+          newf = tds().create_face(ff, ii, v2);
+          Hole new_hole;
+          ++cut_after;
+          while( hole.begin() != cut_after )
+            {
+              new_hole.push_back(hole.front());
+              hole.pop_front();
+            }
+
+          hole.push_front(Edge_2D(newf, 1));
+          new_hole.push_front(Edge_2D(newf, 0));
+          hole_list.push_back(hole);
+          hole_list.push_back(new_hole);
+        }
+      }
+    }
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+void
+Triangulation_3<Gt, Tds, Lds>::
+fill_hole_2D(std::list<Edge_2D> & first_hole, VertexRemover &remover,
+             OutputItCells fit)
+{
+  typedef std::list<Edge_2D> Hole;
+
+  std::vector<Hole> hole_list;
+
+  Cell_handle  f, ff, fn;
+  int i, ii, in;
+
+  hole_list.push_back(first_hole);
+
+  while( ! hole_list.empty())
+  {
+    Hole hole = hole_list.back();
+    hole_list.pop_back();
+
+    // if the hole has only three edges, create the triangle
+    if (hole.size() == 3) {
+      typename Hole::iterator hit = hole.begin();
+      f = (*hit).first;        i = (*hit).second;
+      ff = (* ++hit).first;    ii = (*hit).second;
+      fn = (* ++hit).first;    in = (*hit).second;
+      *fit++ = tds().create_face(f, i, ff, ii, fn, in);
+      continue;
+    }
+
+    // else find an edge with two finite vertices
+    // on the hole boundary
+    // and the new triangle adjacent to that edge
+    //  cut the hole and push it back
+
+    // first, ensure that a neighboring face
+    // whose vertices on the hole boundary are finite
+    // is the first of the hole
+    while (1) {
+      ff = (hole.front()).first;
+      ii = (hole.front()).second;
+      if ( is_infinite(ff->vertex(cw(ii))) ||
+           is_infinite(ff->vertex(ccw(ii)))) {
+        hole.push_back(hole.front());
+        hole.pop_front();
+      }
+      else
+        break;
+    }
+
+    // take the first neighboring face and pop it;
+    ff = (hole.front()).first;
+    ii = (hole.front()).second;
+    hole.pop_front();
+
+    Vertex_handle v0 = ff->vertex(cw(ii));
+    Vertex_handle v1 = ff->vertex(ccw(ii));
+    Vertex_handle v2 = infinite_vertex();
+    const Point &p0 = v0->point();
+    const Point &p1 = v1->point();
+    const Point *p2 = NULL; // Initialize to NULL to avoid warning.
+
+    typename Hole::iterator hdone = hole.end();
+    typename Hole::iterator hit = hole.begin();
+    typename Hole::iterator cut_after(hit);
+
+    // if tested vertex is c with respect to the vertex opposite
+    // to NULL neighbor,
+    // stop at the before last face;
+    hdone--;
+    for (; hit != hdone; ++hit) {
+      fn = hit->first;
+      in = hit->second;
+      Vertex_handle vv = fn->vertex(ccw(in));
+      if (is_infinite(vv)) {
+        if (is_infinite(v2))
+          cut_after = hit;
+      }
+      else {     // vv is a finite vertex
+        const Point &p = vv->point();
+        if (coplanar_orientation(p0, p1, p) == COUNTERCLOCKWISE) {
+          if (is_infinite(v2) ||
+              remover.side_of_bounded_circle(p0, p1, *p2, p, true)
+              == ON_BOUNDED_SIDE) {
+            v2 = vv;
+            p2 = &p;
+            cut_after = hit;
+          }
+        }
+      }
+    }
+
+    // create new triangle and update adjacency relations
+    Cell_handle newf;
+
+    //update the hole and push back in the Hole_List stack
+    // if v2 belongs to the neighbor following or preceding *f
+    // the hole remain a single hole
+    // otherwise it is split in two holes
+
+    fn = (hole.front()).first;
+    in = (hole.front()).second;
+    if (fn->has_vertex(v2, i) && i == ccw(in)) {
+      newf = tds().create_face(ff, ii, fn, in);
+      hole.pop_front();
+      hole.push_front(Edge_2D(newf, 1));
+      hole_list.push_back(hole);
+    } else {
+      fn = (hole.back()).first;
+      in = (hole.back()).second;
+      if (fn->has_vertex(v2, i) && i == cw(in)) {
+        newf = tds().create_face(fn, in, ff, ii);
+        hole.pop_back();
+        hole.push_back(Edge_2D(newf, 1));
+        hole_list.push_back(hole);
+      } else {
+        // split the hole in two holes
+        newf = tds().create_face(ff, ii, v2);
+        Hole new_hole;
+        ++cut_after;
+        while( hole.begin() != cut_after )
+        {
+          new_hole.push_back(hole.front());
+          hole.pop_front();
+        }
+        hole.push_front(Edge_2D(newf, 1));
+        new_hole.push_front(Edge_2D(newf, 0));
+        hole_list.push_back(hole);
+        hole_list.push_back(new_hole);
+      }
+    }
+
+    *fit++ = newf;
+
+  }
+}
+
+template <class Gt, class Tds, class Lds>
+void
+Triangulation_3<Gt,Tds,Lds>::
+make_hole_3D( Vertex_handle v,
+              Vertex_triple_Facet_map& outer_map,
+              std::vector<Cell_handle> & hole)
+{
+  CGAL_triangulation_expensive_precondition( ! test_dim_down(v) );
+
+  incident_cells(v, std::back_inserter(hole));
+
+  for (typename std::vector<Cell_handle>::iterator cit = hole.begin(),
+       end = hole.end(); cit != end; ++cit) {
+    int indv = (*cit)->index(v);
+    Cell_handle opp_cit = (*cit)->neighbor( indv );
+    Facet f(opp_cit, opp_cit->index(*cit));
+    Vertex_triple vt = make_vertex_triple(f);
+    make_canonical(vt);
+    outer_map[vt] = f;
+    for (int i=0; i<4; i++)
+      if ( i != indv )
+        (*cit)->vertex(i)->set_cell(opp_cit);
+  }
+}
+
+// When the incident cells are already known
+template <class Gt, class Tds, class Lds>
+void
+Triangulation_3<Gt,Tds,Lds>::
+make_hole_3D( Vertex_handle v,
+              const std::vector<Cell_handle> & incident_cells,
+              Vertex_triple_Facet_map& outer_map)
+{
+  CGAL_triangulation_expensive_precondition( ! test_dim_down(v) );
+
+  for (typename std::vector<Cell_handle>::const_iterator cit = incident_cells.begin(),
+       end = incident_cells.end(); cit != end; ++cit) {
+    int indv = (*cit)->index(v);
+    Cell_handle opp_cit = (*cit)->neighbor( indv );
+    Facet f(opp_cit, opp_cit->index(*cit));
+    Vertex_triple vt = make_vertex_triple(f);
+    make_canonical(vt);
+    outer_map[vt] = f;
+    for (int i=0; i<4; i++)
+      if ( i != indv )
+        (*cit)->vertex(i)->set_cell(opp_cit);
+  }
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt,Tds,Lds>::
+remove_dim_down(Vertex_handle v, VertexRemover &remover)
+{
+    CGAL_triangulation_precondition (dimension() >= 0);
+
+    // Collect all the hidden points.
+    for (All_cells_iterator ci = tds().raw_cells_begin(),
+            end = tds().raw_cells_end(); ci != end; ++ci)
+        remover.add_hidden_points(ci);
+
+    tds().remove_decrease_dimension(v, infinite_vertex());
+
+    // Now try to see if we need to re-orient.
+    if (dimension() == 2) {
+        Facet f = *finite_facets_begin();
+        if (coplanar_orientation(f.first->vertex(0)->point(),
+                                 f.first->vertex(1)->point(),
+                                 f.first->vertex(2)->point()) == NEGATIVE)
+            tds().reorient();
+    }
+
+    return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt,Tds,Lds>::
+remove_1D(Vertex_handle v, VertexRemover &remover)
+{
+    CGAL_triangulation_precondition (dimension() == 1);
+
+    Cell_handle c1 = v->cell();
+    Cell_handle c2 = c1->neighbor(c1->index(v) == 0 ? 1 : 0);
+    remover.add_hidden_points(c1);
+    remover.add_hidden_points(c2);
+
+    tds().remove_from_maximal_dimension_simplex (v);
+
+    return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt,Tds,Lds>::
+remove_2D(Vertex_handle v, VertexRemover &remover)
+{
+    CGAL_triangulation_precondition(dimension() == 2);
+    std::list<Edge_2D> hole;
+    make_hole_2D(v, hole, remover);
+    fill_hole_2D(hole, remover);
+    tds().delete_vertex(v);
+    return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt,Tds,Lds>::
+remove_3D(Vertex_handle v, VertexRemover &remover)
+{
+  std::vector<Cell_handle> hole;
+  hole.reserve(64);
+
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_Facet_map inner_map;
+
+  make_hole_3D(v, outer_map, hole);
+  CGAL_assertion(remover.hidden_points_begin() ==
+      remover.hidden_points_end() );
+
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::iterator
+      hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
+    remover.add_hidden_points(*hi);
+
+  bool inf = false;
+  // collect all vertices on the boundary
+  std::vector<Vertex_handle> vertices;
+  vertices.reserve(64);
+
+  adjacent_vertices(v, std::back_inserter(vertices));
+
+  // create a Delaunay triangulation of the points on the boundary
+  // and make a map from the vertices in remover.tmp towards the vertices
+  // in *this
+
+  unsigned int i = 0;
+  Vertex_handle_unique_hash_map vmap;
+  Cell_handle ch = Cell_handle();
+#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
+  size_t num_vertices = vertices.size();
+  if (num_vertices >= 5)
+  {
+    //std::random_shuffle(vertices.begin(), vertices.end());
+    for (int j = 0 ; j < 4 ; ++j)
+    {
+      if (is_infinite(vertices[j]))
+      {
+        std::swap(vertices[j], vertices[4]);
+        break;
+      }
+    }
+    Orientation o = orientation(
+      vertices[0]->point(),
+      vertices[1]->point(),
+      vertices[2]->point(),
+      vertices[3]->point());
+
+    if (o == NEGATIVE)
+      std::swap(vertices[0], vertices[1]);
+
+    if (o != ZERO)
+    {
+      Vertex_handle vh1, vh2, vh3, vh4;
+      remover.tmp.init_tds(
+        vertices[0]->point(), vertices[1]->point(),
+        vertices[2]->point(), vertices[3]->point(),
+        vh1, vh2, vh3, vh4);
+      ch = vh1->cell();
+      vmap[vh1] = vertices[0];
+      vmap[vh2] = vertices[1];
+      vmap[vh3] = vertices[2];
+      vmap[vh4] = vertices[3];
+      i = 4;
+    }
+  }
+#endif
+
+  for(; i < vertices.size(); i++){
+    if(! is_infinite(vertices[i])){
+      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
+      ch = vh->cell();
+      vmap[vh] = vertices[i];
+    }else {
+      inf = true;
+    }
+  }
+
+  if(remover.tmp.dimension()==2){
+    Vertex_handle fake_inf = remover.tmp.insert(v->point());
+    vmap[fake_inf] = infinite_vertex();
+  } else {
+    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
+  }
+
+  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
+
+  // Construct the set of vertex triples of remover.tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of remover.tmp
+
+  if(inf){
+    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+        end = remover.tmp.all_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  } else {
+      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+        end = remover.tmp.finite_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    while(is_infinite(oit->first.first) ||
+          is_infinite(oit->first.second) ||
+          is_infinite(oit->first.third)){
+      ++oit;
+      // otherwise the lookup in the inner_map fails
+      // because the infinite vertices are different
+    }
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+
+    typename Vertex_triple_Facet_map::iterator iit =
+             inner_map.find(o_vt_f_pair.first);
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+    Cell_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+
+    // create a new cell and glue it to the outer surface
+    Cell_handle new_ch = tds().create_cell();
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+    o_ch->set_neighbor(o_i,new_ch);
+    new_ch->set_neighbor(i_i, o_ch);
+
+    // for the other faces check, if they can also be glued
+    for(i = 0; i < 4; i++){
+      if(i != i_i){
+        Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+          // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+          o_ch2->set_neighbor(o_i2,new_ch);
+          new_ch->set_neighbor(i, o_ch2);
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+  tds().delete_vertex(v);
+  tds().delete_cells(hole.begin(), hole.end());
+
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+VertexRemover&
+Triangulation_3<Gt,Tds,Lds>::
+remove_3D(Vertex_handle v, VertexRemover &remover,
+          const std::vector<Cell_handle> &inc_cells,
+          std::vector<Vertex_handle> &adj_vertices)
+{
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_Facet_map inner_map;
+
+  make_hole_3D(v, inc_cells, outer_map);
+
+  CGAL_assertion(remover.hidden_points_begin() ==
+      remover.hidden_points_end() );
+
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::const_iterator
+      hi = inc_cells.begin(), hend = inc_cells.end(); hi != hend; ++hi)
+    remover.add_hidden_points(*hi);
+
+  bool inf = false;
+
+  // create a Delaunay triangulation of the points on the boundary
+  // and make a map from the vertices in remover.tmp towards the vertices
+  // in *this
+
+  unsigned int i = 0;
+  Vertex_handle_unique_hash_map vmap;
+  Cell_handle ch = Cell_handle();
+#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR
+  size_t num_vertices = adj_vertices.size();
+  if (num_vertices >= 5)
+  {
+    //std::random_shuffle(adj_vertices.begin(), adj_vertices.end());
+    for (int j = 0 ; j < 4 ; ++j)
+    {
+      if (is_infinite(adj_vertices[j]))
+      {
+        std::swap(adj_vertices[j], adj_vertices[4]);
+        break;
+      }
+    }
+    Orientation o = orientation(
+      adj_vertices[0]->point(),
+      adj_vertices[1]->point(),
+      adj_vertices[2]->point(),
+      adj_vertices[3]->point());
+
+    if (o == NEGATIVE)
+      std::swap(adj_vertices[0], adj_vertices[1]);
+
+    if (o != ZERO)
+    {
+      Vertex_handle vh1, vh2, vh3, vh4;
+      remover.tmp.init_tds(
+        adj_vertices[0]->point(), adj_vertices[1]->point(),
+        adj_vertices[2]->point(), adj_vertices[3]->point(),
+        vh1, vh2, vh3, vh4);
+      ch = vh1->cell();
+      vmap[vh1] = adj_vertices[0];
+      vmap[vh2] = adj_vertices[1];
+      vmap[vh3] = adj_vertices[2];
+      vmap[vh4] = adj_vertices[3];
+      i = 4;
+    }
+  }
+#endif
+
+  for(; i < adj_vertices.size(); i++){
+    if(! is_infinite(adj_vertices[i])){
+      Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch);
+      ch = vh->cell();
+      vmap[vh] = adj_vertices[i];
+    }else {
+      inf = true;
+    }
+  }
+
+  if(remover.tmp.dimension()==2){
+    Vertex_handle fake_inf = remover.tmp.insert(v->point());
+    vmap[fake_inf] = infinite_vertex();
+  } else {
+    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
+  }
+
+  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
+
+  // Construct the set of vertex triples of remover.tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of remover.tmp
+
+  if(inf){
+    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+        end = remover.tmp.all_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  } else {
+      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+        end = remover.tmp.finite_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    while(is_infinite(oit->first.first) ||
+          is_infinite(oit->first.second) ||
+          is_infinite(oit->first.third)){
+      ++oit;
+      // otherwise the lookup in the inner_map fails
+      // because the infinite vertices are different
+    }
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+
+    typename Vertex_triple_Facet_map::iterator iit =
+             inner_map.find(o_vt_f_pair.first);
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+    Cell_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+
+    // create a new cell and glue it to the outer surface
+    Cell_handle new_ch = tds().create_cell();
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+    o_ch->set_neighbor(o_i,new_ch);
+    new_ch->set_neighbor(i_i, o_ch);
+
+    // for the other faces check, if they can also be glued
+    for(i = 0; i < 4; i++){
+      if(i != i_i){
+        Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+          // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+          o_ch2->set_neighbor(o_i2,new_ch);
+          new_ch->set_neighbor(i, o_ch2);
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+  tds().delete_vertex(v);
+  tds().delete_cells(inc_cells.begin(), inc_cells.end());
+
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+void
+Triangulation_3<Gt, Tds, Lds>::
+remove(Vertex_handle v, VertexRemover &remover) {
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !is_infinite(v));
+  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
+
+  if (test_dim_down (v)) {
+    remove_dim_down (v, remover);
+  }
+  else {
+    switch (dimension()) {
+    case 1: remove_1D (v, remover); break;
+    case 2: remove_2D (v, remover); break;
+    case 3: remove_3D (v, remover); break;
+    default:
+      CGAL_triangulation_assertion (false);
+    }
+  }
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover >
+bool
+Triangulation_3<Gt, Tds, Lds>::
+remove(Vertex_handle v, VertexRemover &remover, bool *could_lock_zone)
+{
+  // N.B.: dimension doesn't need to be atomic since the parallel removal
+  //       will never decrease the dimension (the last few removes are done
+  //       sequentially)
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !is_infinite(v));
+  CGAL_triangulation_precondition( dimension() == 3);
+  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+  static Profile_branch_counter_3 bcounter(
+    "early withdrawals / late withdrawals / successes [Delaunay_tri_3::remove]");
+#endif
+
+  bool removed = true;
+
+  // Locking vertex v is a good start
+  if (!this->try_lock_vertex(v))
+  {
+    *could_lock_zone = false;
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+    bcounter.increment_branch_2(); // THIS is an early withdrawal!
+#endif
+  }
+  else
+  {
+    std::vector<Cell_handle> incident_cells;
+    incident_cells.reserve(64);
+    std::vector<Vertex_handle> adj_vertices;
+    adj_vertices.reserve(64);
+    bool dim_down = test_dim_down_using_incident_cells_3(
+      v, incident_cells, adj_vertices, could_lock_zone);
+
+    if (*could_lock_zone)
+    {
+      if (dim_down)
+        removed = false;
+      else
+        remove_3D (v, remover, incident_cells, adj_vertices);
+    }
+  }
+
+#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
+  if (could_lock_zone)
+  {
+    if (*could_lock_zone)
+      ++bcounter;
+    else
+      bcounter.increment_branch_1(); // THIS is a late withdrawal!
+  }
+#endif
+
+  return removed;
+}
+
+// The remove here uses the remover, but
+// no function envolving hidden points
+// will be used in this internal version
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+remove_dim_down(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
+  remove_dim_down(v, remover);
+  for(All_cells_iterator afi = tds().raw_cells_begin();
+      afi != tds().raw_cells_end();
+      afi++) *fit++ = afi;
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+remove_1D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
+  Point p = v->point();
+  remove_1D(v, remover);
+  *fit++ = locate(p);
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+remove_2D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
+  CGAL_triangulation_precondition(dimension() == 2);
+  std::list<Edge_2D> hole;
+  make_hole_2D(v, hole, remover);
+  fill_hole_2D(hole, remover, fit);
+  tds().delete_vertex(v);
+  return remover;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+VertexRemover&
+Triangulation_3<Gt, Tds, Lds>::
+remove_3D(Vertex_handle v, VertexRemover &remover, OutputItCells fit) {
+  CGAL_triangulation_precondition(dimension() == 3);
+
+  std::vector<Cell_handle> hole;
+  hole.reserve(64);
+
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_Facet_map inner_map;
+
+  make_hole_3D(v, outer_map, hole);
+
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::iterator
+         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
+    remover.add_hidden_points(*hi);
+
+  bool inf = false;
+  unsigned int i;
+  // collect all vertices on the boundary
+  std::vector<Vertex_handle> vertices;
+  vertices.reserve(64);
+
+  adjacent_vertices(v, std::back_inserter(vertices));
+
+  // create a Delaunay triangulation of the points on the boundary
+  // and make a map from the vertices in remover.tmp towards the vertices
+  // in *this
+
+  Vertex_handle_unique_hash_map vmap;
+  Cell_handle ch = Cell_handle();
+  for(i=0; i < vertices.size(); i++){
+    if(! is_infinite(vertices[i])){
+      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
+      ch = vh->cell();
+      vmap[vh] = vertices[i];
+    }else {
+      inf = true;
+    }
+  }
+
+  if(remover.tmp.dimension()==2){
+    Vertex_handle fake_inf = remover.tmp.insert(v->point());
+    vmap[fake_inf] = infinite_vertex();
+  } else {
+    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
+  }
+
+  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
+
+  // Construct the set of vertex triples of remover.tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of remover.tmp
+
+  if(inf){
+    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+          end = remover.tmp.all_cells_end(); it != end; ++it)
+    {
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  } else {
+    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+        end = remover.tmp.finite_cells_end(); it != end; ++it)
+    {
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    while(is_infinite(oit->first.first) ||
+          is_infinite(oit->first.second) ||
+          is_infinite(oit->first.third)){
+      ++oit;
+      // otherwise the lookup in the inner_map fails
+      // because the infinite vertices are different
+    }
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+
+    typename Vertex_triple_Facet_map::iterator iit =
+             inner_map.find(o_vt_f_pair.first);
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+    Cell_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+
+    // create a new cell and glue it to the outer surface
+    Cell_handle new_ch = tds().create_cell();
+                *fit++ = new_ch;
+
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+    o_ch->set_neighbor(o_i,new_ch);
+    new_ch->set_neighbor(i_i, o_ch);
+
+    // for the other faces check, if they can also be glued
+    for(i = 0; i < 4; i++){
+      if(i != i_i){
+        Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+          // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+          o_ch2->set_neighbor(o_i2,new_ch);
+          new_ch->set_neighbor(i, o_ch2);
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+  tds().delete_vertex(v);
+  tds().delete_cells(hole.begin(), hole.end());
+
+  return remover;
+}
+
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class OutputItCells >
+void
+Triangulation_3<Gt, Tds, Lds>::
+remove_and_give_new_cells(Vertex_handle v, VertexRemover &remover,
+  OutputItCells fit) {
+  CGAL_triangulation_precondition( v != Vertex_handle());
+  CGAL_triangulation_precondition( !is_infinite(v));
+  CGAL_triangulation_expensive_precondition( tds().is_vertex(v) );
+
+  if (test_dim_down (v)) {
+    remove_dim_down (v, remover, fit);
+  }
+  else {
+    switch (dimension()) {
+    case 1: remove_1D (v, remover, fit); break;
+    case 2: remove_2D (v, remover, fit); break;
+    case 3: remove_3D (v, remover, fit); break;
+    default:
+      CGAL_triangulation_assertion (false);
+    }
+  }
+}
+
+// The VertexInserter is needed so as to
+// allow us the usage of the insertion method
+// from the particular triangulation
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class VertexInserter >
+typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
+Triangulation_3<Gt,Tds,Lds>::
+move_if_no_collision(Vertex_handle v, const Point &p,
+                     VertexRemover &remover, VertexInserter &inserter) {
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;
+  const int dim = dimension();
+
+  // If displacements are known to be small
+  // we might want to optimize by checking
+  // whether there is a topological change
+  // or not before.
+  // In this version this will not be put inside this method
+  // because it is for general purposes,
+  // and remaining Delaunay after motion is a bit too restrictive.
+  // In the filtered version optimized for displacements
+  // it will be used as an a priori.
+  // However, a non-fully optimized but good version of
+  // is_delaunay_after_displacement is provided as an internal method of
+  // Delaunay_triangulation_3 (see the class for more details).
+
+  Locate_type lt;
+  int li, lj;
+  Cell_handle loc = locate(p, lt, li, lj, v->cell());
+
+  if(lt == VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->set_point(p);
+    return v;
+  }
+
+  size_type n_vertices = tds().number_of_vertices();
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
+    v->set_point(p);
+    return v;
+  }
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 2) && (n_vertices == 4)) {
+    v->set_point(p);
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+
+    if(loc->has_vertex(v)) {
+      v->set_point(p);
+    } else {
+      Vertex_handle inserted = insert(p, lt, loc, li, lj);
+      Cell_handle f = v->cell();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Cell_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_cell(f);
+      tds().delete_cell(g);
+      Cell_handle f_ins = inserted->cell();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Cell_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+      v->set_point(p);
+      v->set_cell(inserted->cell());
+      tds().delete_vertex(inserted);
+    }
+    return v;
+  }
+
+  bool dim_down = test_dim_down(v);
+
+  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 2)) {
+    // verify if p and two static vertices are collinear in this case
+    int iinf;
+    Cell_handle finf = infinite_vertex()->cell(), fdone;
+    fdone = finf;
+    do {
+      iinf = finf->index(infinite_vertex());
+      if(!finf->has_vertex(v)) break;
+      finf = finf->neighbor((iinf+1)%3);
+    } while(finf != fdone);
+    iinf = ~iinf;
+    if(this->collinear(finf->vertex(iinf&1)->point(),
+                       finf->vertex(iinf&2)->point(),
+                       p))
+    {
+      v->set_point(p);
+      _tds.decrease_dimension(loc, loc->index(v));
+      return v;
+    }
+  }
+
+  if(((dim == 2) && (lt != OUTSIDE_AFFINE_HULL)) ||
+     ((lt == OUTSIDE_AFFINE_HULL) && (dim == 1)))
+  {
+
+    // This is insert must be from Delaunay (or the particular trian.)
+    // not Triangulation_3 !
+    Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
+
+    std::list<Edge_2D> hole;
+    make_hole_2D(v, hole, remover);
+    fill_hole_2D(hole, remover);
+
+    // fixing pointer
+    Cell_handle fc = inserted->cell(), done(fc);
+    std::vector<Cell_handle> faces_pt;
+    faces_pt.reserve(16);
+    do {
+      faces_pt.push_back(fc);
+      fc = fc->neighbor((fc->index(inserted) + 1)%3);
+    } while(fc != done);
+    std::size_t ss = faces_pt.size();
+    for(std::size_t k=0; k<ss; k++)
+    {
+      Cell_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+    v->set_point(p);
+    v->set_cell(inserted->cell());
+
+    tds().delete_vertex(inserted);
+
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 3)) {
+    // verify if p and two static vertices are collinear in this case
+    std::vector<Cell_handle> ics;
+    incident_cells(infinite_vertex(), std::back_inserter(ics));
+    std::size_t size = ics.size();
+    Cell_handle finf;
+    for (std::size_t i=0; i<size; i++) {
+      finf = ics[i];
+      if(!finf->has_vertex(v)) break;
+    }
+    int iinf = finf->index(infinite_vertex());
+    if(remover.tmp.coplanar(finf->vertex((iinf+1)&3)->point(),
+                            finf->vertex((iinf+2)&3)->point(),
+                            finf->vertex((iinf+3)&3)->point(),
+                            p))
+    {
+      v->set_point(p);
+      _tds.decrease_dimension(loc, loc->index(v));
+      Facet f = *finite_facets_begin();
+      if (coplanar_orientation(f.first->vertex(0)->point(),
+                               f.first->vertex(1)->point(),
+                               f.first->vertex(2)->point()) == NEGATIVE)
+        tds().reorient();
+      restore_edges_after_decrease_dimension(v, remover,inserter);
+      return v;
+    }
+  }
+
+  // This is insert must be from Delaunay (or the particular trian.)
+  // not Triangulation_3 !
+  Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
+
+  std::vector<Cell_handle> hole;
+  hole.reserve(64);
+
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_Facet_map inner_map;
+
+  make_hole_3D(v, outer_map, hole);
+
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::iterator
+         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
+    remover.add_hidden_points(*hi);
+
+  bool inf = false;
+  unsigned int i;
+  // collect all vertices on the boundary
+  std::vector<Vertex_handle> vertices;
+  vertices.reserve(64);
+
+  adjacent_vertices(v, std::back_inserter(vertices));
+
+  // create a Delaunay triangulation of the points on the boundary
+  // and make a map from the vertices in remover.tmp towards the vertices
+  // in *this
+
+  Vertex_handle_unique_hash_map vmap;
+  Cell_handle ch = Cell_handle();
+  for(i=0; i < vertices.size(); i++){
+    if(! is_infinite(vertices[i])){
+      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
+      ch = vh->cell();
+      vmap[vh] = vertices[i];
+    }else {
+      inf = true;
+    }
+  }
+
+  if(remover.tmp.dimension()==2){
+    Vertex_handle fake_inf = remover.tmp.insert(v->point());
+    vmap[fake_inf] = infinite_vertex();
+  } else {
+    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
+  }
+
+  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
+
+  // Construct the set of vertex triples of remover.tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of remover.tmp
+
+  if(inf){
+    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+          end = remover.tmp.all_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  } else {
+    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+          end = remover.tmp.finite_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    while(is_infinite(oit->first.first) ||
+          is_infinite(oit->first.second) ||
+          is_infinite(oit->first.third)){
+      ++oit;
+      // otherwise the lookup in the inner_map fails
+      // because the infinite vertices are different
+    }
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+
+    typename Vertex_triple_Facet_map::iterator iit =
+      inner_map.find(o_vt_f_pair.first);
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+    Cell_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+
+    // create a new cell and glue it to the outer surface
+    Cell_handle new_ch = tds().create_cell();
+
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+    o_ch->set_neighbor(o_i,new_ch);
+    new_ch->set_neighbor(i_i, o_ch);
+
+    // for the other faces check, if they can also be glued
+    for(i = 0; i < 4; i++){
+      if(i != i_i){
+        Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+          // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+          o_ch2->set_neighbor(o_i2,new_ch);
+          new_ch->set_neighbor(i, o_ch2);
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+
+  // fixing pointer
+  std::vector<Cell_handle> cells_pt;
+  cells_pt.reserve(64);
+  incident_cells(inserted, std::back_inserter(cells_pt));
+  std::size_t size = cells_pt.size();
+  for(std::size_t i=0; i<size; i++) {
+    Cell_handle c = cells_pt[i];
+    c->set_vertex(c->index(inserted), v);
+  }
+  v->set_point(p);
+  v->set_cell(inserted->cell());
+  tds().delete_vertex(inserted);
+  tds().delete_cells(hole.begin(), hole.end());
+  return v;
+} // end of Vertex_handle
+  // Triangulation_3<Gt,Tds,Lds>::
+  // move_if_no_collision(Vertex_handle,Point, VertexRemover, VertexInserter)
+
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class VertexInserter >
+typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
+Triangulation_3<Gt,Tds,Lds>::
+move(Vertex_handle v, const Point &p,
+     VertexRemover &remover, VertexInserter &inserter) {
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;
+  Vertex_handle w = move_if_no_collision(v,p,remover,inserter);
+  if(w != v) {
+    remove(v, remover);
+    return w;
+  }
+  return v;
+}
+
+// The VertexInserter is needed so as to
+// allow us the usage of the insertion method
+// from the particular triangulation
+template <class Gt, class Tds, class Lds>
+template < class VertexRemover, class VertexInserter, class OutputItCells >
+typename Triangulation_3<Gt,Tds,Lds>::Vertex_handle
+Triangulation_3<Gt,Tds,Lds>::
+move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point &p,
+                                        VertexRemover &remover, VertexInserter &inserter, OutputItCells fit) {
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+  CGAL_triangulation_precondition(!is_infinite(v));
+  if(v->point() == p) return v;
+  const int dim = dimension();
+
+  // If displacements are known to be small
+  // we might want to optimize by checking
+  // whether there is a topological change
+  // or not before.
+  // In this version this will not be put inside this method
+  // because it is for general purposes,
+  // and remaining Delaunay after motion is a bit too restrictive.
+  // In the filtered version optimized for displacements
+  // it will be used as an a priori.
+  // However, a non-fully optimized but good version of
+  // is_delaunay_after_displacement is provided as an internal method of
+  // Delaunay_triangulation_3 (see the class for more details).
+
+  Locate_type lt;
+  int li, lj;
+  Cell_handle loc = locate(p, lt, li, lj, v->cell());
+
+  if(lt == VERTEX) return loc->vertex(li);
+
+  if(dim == 0) {
+    v->set_point(p);
+    return v;
+  }
+
+  int n_vertices = tds().number_of_vertices();
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
+    v->set_point(p);
+    for(All_cells_iterator afi = tds().raw_cells_begin();
+        afi != tds().raw_cells_end();
+        afi++) *fit++ = afi;
+    return v;
+  }
+
+  if((lt == OUTSIDE_AFFINE_HULL) && (dim == 2) && (n_vertices == 4)) {
+    v->set_point(p);
+    for(All_cells_iterator afi = tds().raw_cells_begin();
+        afi != tds().raw_cells_end();
+        afi++) *fit++ = afi;
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) {
+    if(loc->has_vertex(v)) {
+      v->set_point(p);
+    } else {
+      Vertex_handle inserted = insert(p, lt, loc, li, lj);
+      Cell_handle f = v->cell();
+      int i = f->index(v);
+      if (i==0) {f = f->neighbor(1);}
+      CGAL_triangulation_assertion(f->index(v) == 1);
+      Cell_handle g= f->neighbor(0);
+      f->set_vertex(1, g->vertex(1));
+      f->set_neighbor(0,g->neighbor(0));
+      g->neighbor(0)->set_neighbor(1,f);
+      g->vertex(1)->set_cell(f);
+      tds().delete_cell(g);
+      *fit++ = f;
+      Cell_handle f_ins = inserted->cell();
+      i = f_ins->index(inserted);
+      if (i==0) {f_ins = f_ins->neighbor(1);}
+      CGAL_triangulation_assertion(f_ins->index(inserted) == 1);
+      Cell_handle g_ins = f_ins->neighbor(0);
+      f_ins->set_vertex(1, v);
+      g_ins->set_vertex(0, v);
+      v->set_point(p);
+      v->set_cell(inserted->cell());
+      tds().delete_vertex(inserted);
+    }
+    *fit++ = v->cell();
+    if(v->cell()->neighbor(0)->has_vertex(v))
+      *fit++ = v->cell()->neighbor(0);
+    if(v->cell()->neighbor(1)->has_vertex(v))
+      *fit++ = v->cell()->neighbor(1);
+    return v;
+  }
+
+  bool dim_down = test_dim_down(v);
+
+  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 2)) {
+    // verify if p and two static vertices are collinear in this case
+    int iinf;
+    Cell_handle finf = infinite_vertex()->cell(), fdone;
+    fdone = finf;
+    do {
+      iinf = finf->index(infinite_vertex());
+      if(!finf->has_vertex(v)) break;
+      finf = finf->neighbor((iinf+1)%3);
+    } while(finf != fdone);
+    iinf = ~iinf;
+    if(this->collinear(finf->vertex(iinf&1)->point(),
+                       finf->vertex(iinf&2)->point(),
+                       p))
+    {
+      v->set_point(p);
+      _tds.decrease_dimension(loc, loc->index(v));
+      for(All_cells_iterator afi = tds().raw_cells_begin();
+          afi != tds().raw_cells_end();
+          afi++) *fit++ = afi;
+      return v;
+    }
+  }
+
+  if(((dim == 2) && (lt != OUTSIDE_AFFINE_HULL)) ||
+     ((lt == OUTSIDE_AFFINE_HULL) && (dim == 1)))
+  {
+
+    std::set<Cell_handle> cells_set;
+    // This is insert must be from Delaunay (or the particular trian.)
+    // not Triangulation_3 !
+    Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
+    Cell_handle c = inserted->cell(), end = c;
+    do {
+      cells_set.insert(c);
+      int i = c->index(inserted);
+      c = c->neighbor((i+1)%3);
+    }	while(c != end);
+
+    std::list<Edge_2D> hole;
+    make_hole_2D(v, hole, remover, cells_set);
+    fill_hole_2D(hole, remover, fit);
+
+    // fixing pointer
+    Cell_handle fc = inserted->cell(), done(fc);
+    std::vector<Cell_handle> faces_pt;
+    faces_pt.reserve(16);
+    do {
+      faces_pt.push_back(fc);
+      fc = fc->neighbor((fc->index(inserted) + 1)%3);
+    } while(fc != done);
+    int ss = faces_pt.size();
+    for(int k=0; k<ss; k++)
+    {
+      Cell_handle f = faces_pt[k];
+      int i = f->index(inserted);
+      f->set_vertex(i, v);
+    }
+    v->set_point(p);
+    v->set_cell(inserted->cell());
+
+    tds().delete_vertex(inserted);
+
+    for(typename std::set<Cell_handle>::const_iterator ib = cells_set.begin(),
+          iend = cells_set.end(); ib != iend; ib++) *fit++ = *ib;
+
+    return v;
+  }
+
+  if((lt != OUTSIDE_AFFINE_HULL) && dim_down && (dim == 3)) {
+    // verify if p and two static vertices are collinear in this case
+    std::vector<Cell_handle> ics;
+    incident_cells(infinite_vertex(), std::back_inserter(ics));
+    int size = ics.size();
+    Cell_handle finf;
+    for (int i=0; i<size; i++) {
+      finf = ics[i];
+      if(!finf->has_vertex(v)) break;
+    }
+    int iinf = finf->index(infinite_vertex());
+    if(remover.tmp.coplanar(finf->vertex((iinf+1)&3)->point(),
+                            finf->vertex((iinf+2)&3)->point(),
+                            finf->vertex((iinf+3)&3)->point(),
+                            p))
+    {
+      v->set_point(p);
+      _tds.decrease_dimension(loc, loc->index(v));
+      Facet f = *finite_facets_begin();
+      if (coplanar_orientation(f.first->vertex(0)->point(),
+                               f.first->vertex(1)->point(),
+                               f.first->vertex(2)->point()) == NEGATIVE)
+        tds().reorient();
+      restore_edges_after_decrease_dimension(v, remover,inserter);
+      for(All_cells_iterator afi = tds().raw_cells_begin();
+          afi != tds().raw_cells_end();
+          afi++) *fit++ = afi;
+      return v;
+    }
+  }
+
+  std::set<Cell_handle> cells_set;
+
+  // This is insert must be from Delaunay (or the particular trian.)
+  // not Triangulation_3 !
+  Vertex_handle inserted = inserter.insert(p, lt, loc, li, lj);
+
+  std::vector<Cell_handle> cells_tmp;
+  cells_tmp.reserve(64);
+  incident_cells(inserted, std::back_inserter(cells_tmp));
+  int size = cells_tmp.size();
+  for(int i=0; i<size; i++) {
+    cells_set.insert(cells_tmp[i]);
+  }
+
+  std::vector<Cell_handle> hole;
+  hole.reserve(64);
+
+  // Construct the set of vertex triples on the boundary
+  // with the facet just behind
+  Vertex_triple_Facet_map outer_map;
+  Vertex_triple_Facet_map inner_map;
+
+  make_hole_3D(v, outer_map, hole);
+
+  for(typename std::vector<Cell_handle>::const_iterator ib = hole.begin(),
+        iend = hole.end(); ib != iend; ib++) cells_set.erase(*ib);
+
+  CGAL_assertion(remover.hidden_points_begin() ==
+                 remover.hidden_points_end() );
+
+  // Output the hidden points.
+  for (typename std::vector<Cell_handle>::iterator
+         hi = hole.begin(), hend = hole.end(); hi != hend; ++hi)
+    remover.add_hidden_points(*hi);
+
+  bool inf = false;
+  unsigned int i;
+  // collect all vertices on the boundary
+  std::vector<Vertex_handle> vertices;
+  vertices.reserve(64);
+
+  adjacent_vertices(v, std::back_inserter(vertices));
+
+  // create a Delaunay triangulation of the points on the boundary
+  // and make a map from the vertices in remover.tmp towards the vertices
+  // in *this
+
+  Vertex_handle_unique_hash_map vmap;
+  Cell_handle ch = Cell_handle();
+  for(i=0; i < vertices.size(); i++){
+    if(! is_infinite(vertices[i])){
+      Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
+      ch = vh->cell();
+      vmap[vh] = vertices[i];
+    }else {
+      inf = true;
+    }
+  }
+
+  if(remover.tmp.dimension()==2){
+    Vertex_handle fake_inf = remover.tmp.insert(v->point());
+    vmap[fake_inf] = infinite_vertex();
+  } else {
+    vmap[remover.tmp.infinite_vertex()] = infinite_vertex();
+  }
+
+  CGAL_triangulation_assertion(remover.tmp.dimension() == 3);
+
+  // Construct the set of vertex triples of remover.tmp
+  // We reorient the vertex triple so that it matches those from outer_map
+  // Also note that we use the vertices of *this, not of remover.tmp
+
+  if(inf){
+    for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+          end = remover.tmp.all_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  } else {
+    for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+          end = remover.tmp.finite_cells_end(); it != end; ++it){
+      for(i=0; i < 4; i++){
+        Facet f = std::pair<Cell_handle,int>(it,i);
+        Vertex_triple vt_aux = make_vertex_triple(f);
+        Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+        make_canonical(vt);
+        inner_map[vt]= f;
+      }
+    }
+  }
+  // Grow inside the hole, by extending the surface
+  while(! outer_map.empty()){
+    typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+    while(is_infinite(oit->first.first) ||
+          is_infinite(oit->first.second) ||
+          is_infinite(oit->first.third)){
+      ++oit;
+      // otherwise the lookup in the inner_map fails
+      // because the infinite vertices are different
+    }
+    typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+    Cell_handle o_ch = o_vt_f_pair.second.first;
+    unsigned int o_i = o_vt_f_pair.second.second;
+
+    typename Vertex_triple_Facet_map::iterator iit =
+      inner_map.find(o_vt_f_pair.first);
+    CGAL_triangulation_assertion(iit != inner_map.end());
+    typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+    Cell_handle i_ch = i_vt_f_pair.second.first;
+    unsigned int i_i = i_vt_f_pair.second.second;
+
+    // create a new cell and glue it to the outer surface
+    Cell_handle new_ch = tds().create_cell();
+    *fit++ = new_ch;
+
+    new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                         vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+    o_ch->set_neighbor(o_i,new_ch);
+    new_ch->set_neighbor(i_i, o_ch);
+
+    // for the other faces check, if they can also be glued
+    for(i = 0; i < 4; i++){
+      if(i != i_i){
+        Facet f = std::pair<Cell_handle,int>(new_ch,i);
+        Vertex_triple vt = make_vertex_triple(f);
+        make_canonical(vt);
+        std::swap(vt.second,vt.third);
+        typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+        if(oit2 == outer_map.end()){
+          std::swap(vt.second,vt.third);
+          outer_map[vt]= f;
+        } else {
+          // glue the faces
+          typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+          Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+          int o_i2 = o_vt_f_pair2.second.second;
+          o_ch2->set_neighbor(o_i2,new_ch);
+          new_ch->set_neighbor(i, o_ch2);
+          outer_map.erase(oit2);
+        }
+      }
+    }
+    outer_map.erase(oit);
+  }
+
+  // fixing pointer
+  std::vector<Cell_handle> cells_pt;
+  cells_pt.reserve(64);
+  incident_cells(inserted, std::back_inserter(cells_pt));
+  size = cells_pt.size();
+  for(int i=0; i<size; i++) {
+    Cell_handle c = cells_pt[i];
+    c->set_vertex(c->index(inserted), v);
+  }
+  v->set_point(p);
+  v->set_cell(inserted->cell());
+  tds().delete_vertex(inserted);
+  tds().delete_cells(hole.begin(), hole.end());
+
+  for(typename std::set<Cell_handle>::const_iterator ib = cells_set.begin(),
+        iend = cells_set.end(); ib != iend; ib++) *fit++ = *ib;
+  return v;
+}
+
+template <class Gt, class Tds, class Lds>
+void
+Triangulation_3<Gt,Tds,Lds>::
+_make_big_hole_3D( Vertex_handle v,
+                   std::map<Vertex_triple,Facet>& outer_map,
+                   std::vector<Cell_handle> & hole,
+                   std::vector<Vertex_handle> & vertices,
+                   std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates)
+{
+
+  Cell_handle start = v->cell();
+  start->tds_data().mark_processed();
+  hole.push_back(start);
+  std::size_t i=0, n=1;
+  while(i < n)
+  {
+
+    Cell_handle c = hole[i++];
+
+    for(int k=0; k<4; k++)
+    {
+      Vertex_handle v0 = c->vertex(k);
+
+      const REMOVE_VERTEX_STATE vst = vstates[v0];
+
+      if(vst == CLEAR)
+      {
+        vstates[v0] = EXTREMITY;
+        vertices.push_back(v0);
+      }	else if(vst == TO_REMOVE) {
+        // we mark the vertices, so all the vertices
+        // from the same cluster will be skipped
+        // in the remove_cluster_3D function
+        vstates[v0] = PROCESSED;
+      }
+
+      int i1 = vertex_triple_index(k, 0);
+      int i2 = vertex_triple_index(k, 1);
+      int i3 = vertex_triple_index(k, 2);
+
+      Vertex_handle v1 = c->vertex(i1);
+      Vertex_handle v2 = c->vertex(i2);
+      Vertex_handle v3 = c->vertex(i3);
+
+      Cell_handle opp_cit = c->neighbor(k);
+      int opp_i = tds().mirror_index(c,k);
+      Vertex_handle vm = opp_cit->vertex(opp_i);
+
+      bool pb1 = false, pb2 = false, pb3 = false, pbm = false;
+
+      const REMOVE_VERTEX_STATE vst1 = vstates[v1];
+      pb1 = vst1 == TO_REMOVE || vst1 == PROCESSED;
+
+      if(!pb1) {
+        const REMOVE_VERTEX_STATE vst2 = vstates[v2];
+        pb2 = vst2 == TO_REMOVE || vst2 == PROCESSED;
+
+        if(!pb2) {
+          const REMOVE_VERTEX_STATE vst3 = vstates[v3];
+          pb3 = vst3 == TO_REMOVE || vst3 == PROCESSED;
+
+          if(!pb3) {
+            const REMOVE_VERTEX_STATE vstm = vstates[vm];
+            pbm = vstm == TO_REMOVE || vstm == PROCESSED;
+          }
+
+        }
+
+      }
+
+      bool bad_opposite_cell = pb1 || pb2 || pb3 || pbm;
+
+      // update the hole if needed
+      // when the vertex is not to be removed
+      if(bad_opposite_cell)
+      {
+        if(opp_cit->tds_data().is_clear())
+        {
+          hole.push_back(opp_cit);
+          opp_cit->tds_data().mark_processed();
+          n++;
+        }
+        continue;
+      }
+
+      Facet f(opp_cit, opp_i);
+      Vertex_triple vt = make_vertex_triple(f);
+      make_canonical(vt);
+      outer_map[vt] = f;
+      v1->set_cell(opp_cit);
+      v2->set_cell(opp_cit);
+      v3->set_cell(opp_cit);
+      vm->set_cell(opp_cit);
+
+    }
+  }
+
+  std::size_t vsize = vertices.size();
+  for(std::size_t i=0; i<vsize; i++) vstates[vertices[i]] = CLEAR;
+
+}
+
+
+template <class Gt, class Tds, class Lds>
+template < class InputIterator, class VertexRemover >
+bool
+Triangulation_3<Gt, Tds, Lds>::
+_remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover &remover,
+                   std::map<Vertex_handle, REMOVE_VERTEX_STATE> &vstates) {
+  InputIterator init = first;
+  while(first != beyond)
+  {
+    Vertex_handle v = *first++;
+
+    if(vstates[v] == PROCESSED) continue;
+
+    //  _make_big_hole_3D and we fill the hole for each cluster
+    vstates[v] = PROCESSED;
+
+    // here, we make the hole for the cluster with v inside
+    typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
+    std::vector<Cell_handle> hole;
+    std::vector<Vertex_handle> vertices;
+    hole.reserve(64);
+    vertices.reserve(32);
+    Vertex_triple_Facet_map outer_map;
+    _make_big_hole_3D(v, outer_map, hole, vertices, vstates);
+
+    // the connectivity is totally lost, we need to rebuild
+    if(!outer_map.size())
+    {
+      std::size_t nh = hole.size();
+      for(std::size_t i=0; i<nh; i++) hole[i]->tds_data().clear();
+      return false;
+    }
+
+    std::size_t vsi = vertices.size();
+
+    bool inf = false;
+    std::size_t i;
+    Vertex_handle_unique_hash_map vmap;
+    Cell_handle ch = Cell_handle();
+
+    if(vsi > 100)
+    {
+      // spatial sort if too many points
+      std::vector<Point> vps;
+      std::map<Point, Vertex_handle> mp_vps;
+      for(i=0; i<vsi;i++)
+      {
+        Vertex_handle vv = vertices[i];
+        if(! this->is_infinite(vv)) {
+          vps.push_back(vv->point());
+          mp_vps[vv->point()] = vv;
+        } else inf = true;
+      }
+      spatial_sort(vps.begin(), vps.end());
+
+      std::size_t svps = vps.size();
+
+      for(i=0; i < svps; i++){
+        Vertex_handle vv = mp_vps[vps[i]];
+        Vertex_handle vh = remover.tmp.insert(vv->point(), ch);
+        ch = vh->cell();
+        vmap[vh] = vv;
+      }
+
+      if(remover.tmp.dimension()==2){
+        Vertex_handle fake_inf = remover.tmp.insert(v->point());
+        vmap[fake_inf] = this->infinite_vertex();
+      } else {
+        vmap[remover.tmp.infinite_vertex()] = this->infinite_vertex();
+      }
+    } else {
+
+      for(i=0; i < vsi; i++){
+        if(!this->is_infinite(vertices[i])){
+          Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch);
+          ch = vh->cell();
+          vmap[vh] = vertices[i];
+        } else {
+          inf = true;
+        }
+      }
+
+      if(remover.tmp.dimension()==2){
+        Vertex_handle fake_inf = remover.tmp.insert(v->point());
+        vmap[fake_inf] = this->infinite_vertex();
+      } else {
+        vmap[remover.tmp.infinite_vertex()] = this->infinite_vertex();
+      }
+    }
+
+    Vertex_triple_Facet_map inner_map;
+
+    if(inf){
+      for(All_cells_iterator it = remover.tmp.all_cells_begin(),
+            end = remover.tmp.all_cells_end(); it != end; ++it){
+        for(unsigned int index=0; index < 4; index++) {
+          Facet f = std::pair<Cell_handle,int>(it,index);
+          Vertex_triple vt_aux = this->make_vertex_triple(f);
+          Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+          this->make_canonical(vt);
+          inner_map[vt]= f;
+        }
+      }
+    } else {
+      for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(),
+            end = remover.tmp.finite_cells_end(); it != end; ++it){
+        for(unsigned int index=0; index < 4; index++){
+          Facet f = std::pair<Cell_handle,int>(it,index);
+          Vertex_triple vt_aux = this->make_vertex_triple(f);
+          Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
+          this->make_canonical(vt);
+          inner_map[vt]= f;
+        }
+      }
+    }
+
+    // Grow inside the hole, by extending the surface
+    while(! outer_map.empty()){
+      typename Vertex_triple_Facet_map::iterator oit = outer_map.begin();
+
+      while(this->is_infinite(oit->first.first) ||
+            this->is_infinite(oit->first.second) ||
+            this->is_infinite(oit->first.third)){
+        ++oit;
+        // otherwise the lookup in the inner_map fails
+        // because the infinite vertices are different
+      }
+      typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit;
+      Cell_handle o_ch = o_vt_f_pair.second.first;
+      unsigned int o_i = o_vt_f_pair.second.second;
+
+      typename Vertex_triple_Facet_map::iterator iit =
+        inner_map.find(o_vt_f_pair.first);
+      CGAL_triangulation_assertion(iit != inner_map.end());
+      typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit;
+      Cell_handle i_ch = i_vt_f_pair.second.first;
+      unsigned int i_i = i_vt_f_pair.second.second;
+
+      // create a new cell and glue it to the outer surface
+      Cell_handle new_ch = tds().create_cell();
+      new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
+                           vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
+
+      o_ch->set_neighbor(o_i,new_ch);
+      new_ch->set_neighbor(i_i, o_ch);
+
+      for(int j=0;j<4;j++) new_ch->vertex(j)->set_cell(new_ch);
+
+      // for the other faces check, if they can also be glued
+      for(unsigned int index = 0; index < 4; index++){
+        if(index != i_i){
+          Facet f = std::pair<Cell_handle,int>(new_ch,index);
+          Vertex_triple vt = this->make_vertex_triple(f);
+          this->make_canonical(vt);
+          std::swap(vt.second,vt.third);
+          typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
+          if(oit2 == outer_map.end()){
+            std::swap(vt.second,vt.third);
+            outer_map[vt]= f;
+          } else {
+            // glue the faces
+            typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2;
+            Cell_handle o_ch2 = o_vt_f_pair2.second.first;
+            int o_i2 = o_vt_f_pair2.second.second;
+            o_ch2->set_neighbor(o_i2,new_ch);
+            new_ch->set_neighbor(index, o_ch2);
+            outer_map.erase(oit2);
+          }
+        }
+      }
+
+      outer_map.erase(oit);
+    }
+
+    this->tds().delete_cells(hole.begin(), hole.end());
+    remover.tmp.clear();
+
+  }
+
+  this->tds().delete_vertices(init, beyond);
+
+  return true;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class InputIterator >
+bool
+Triangulation_3<Gt, Tds, Lds>::
+does_repeat_in_range(InputIterator first, InputIterator beyond) const {
+  std::set<Vertex_handle> s;
+  while (first!=beyond) if (! s.insert(*first++).second ) return true;
+  return false;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class InputIterator >
+bool
+Triangulation_3<Gt, Tds, Lds>::
+infinite_vertex_in_range(InputIterator first, InputIterator beyond) const {
+  while(first != beyond) if(is_infinite(*first++)) return true;
+  return false;
+}
+
+template <class Gt, class Tds, class Lds>
+template < class InputIterator, class VertexRemover >
+typename Triangulation_3<Gt, Tds, Lds>::size_type
+Triangulation_3<Gt, Tds, Lds>::
+remove(InputIterator first, InputIterator beyond, VertexRemover &remover) {
+  CGAL_triangulation_precondition(!does_repeat_in_range(first, beyond));
+  CGAL_triangulation_precondition(!infinite_vertex_in_range(first, beyond));
+  size_type n = number_of_vertices();
+  InputIterator init = first, init2 = first;
+  if(dimension() == 3 && n > 4)
+  {
+    // If we could add states on a vertex base as it is done
+    // for cells, it would improve the performance.
+    std::map<Vertex_handle, REMOVE_VERTEX_STATE> vstates;
+    _mark_vertices_to_remove(first, beyond, vstates);
+    if(!_test_dim_down_cluster(vstates))
+    {
+      if(_remove_cluster_3D(init, beyond, remover, vstates))
+        return n - number_of_vertices();
+    }
+  }
+
+  // dimension() < 3 or
+  // no connectivity of the remaining vertices
+  // we remove one by one
+  while (init2 != beyond) {
+    Vertex_handle v = *init2++;
+    remover.tmp.clear();
+    remove(v, remover);
+  }
+  return n - number_of_vertices();
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_valid(bool verbose, int level) const
+{
+  if ( ! _tds.is_valid(verbose,level) ) {
+    if (verbose)
+        std::cerr << "invalid data structure" << std::endl;
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+
+  if ( infinite_vertex() == Vertex_handle() ) {
+    if (verbose)
+        std::cerr << "no infinite vertex" << std::endl;
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+
+  switch ( dimension() ) {
+  case 3:
+    {
+      for(Finite_cells_iterator it = finite_cells_begin(), end = finite_cells_end();
+              it != end; ++it)
+        is_valid_finite(it, verbose, level);
+      break;
+    }
+  case 2:
+    {
+      for(Finite_facets_iterator it = finite_facets_begin(), end = finite_facets_end();
+             it != end; ++it)
+        is_valid_finite(it->first,verbose,level);
+      break;
+    }
+  case 1:
+    {
+      for(Finite_edges_iterator it = finite_edges_begin(), end = finite_edges_end();
+             it != end; ++it)
+        is_valid_finite(it->first,verbose,level);
+      break;
+    }
+  }
+  if (verbose)
+      std::cerr << "valid triangulation" << std::endl;
+  return true;
+}
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_valid(Cell_handle c, bool verbose, int level) const
+{
+  if ( ! _tds.is_valid(c,verbose,level) ) {
+    if (verbose) {
+      std::cerr << "combinatorially invalid cell";
+      for (int i=0; i <= dimension(); i++ )
+        std::cerr << c->vertex(i)->point() << ", ";
+      std::cerr << std::endl;
+    }
+    CGAL_triangulation_assertion(false);
+    return false;
+  }
+  if ( ! is_infinite(c) )
+    is_valid_finite(c, verbose, level);
+  if (verbose)
+      std::cerr << "geometrically valid cell" << std::endl;
+  return true;
+}
+
+
+template < class GT, class Tds, class Lds >
+bool
+Triangulation_3<GT,Tds,Lds>::
+is_valid_finite(Cell_handle c, bool verbose, int) const
+{
+  switch ( dimension() ) {
+  case 3:
+    {
+      if ( orientation(c->vertex(0)->point(),
+                       c->vertex(1)->point(),
+                       c->vertex(2)->point(),
+                       c->vertex(3)->point()) != POSITIVE ) {
+        if (verbose)
+            std::cerr << "badly oriented cell "
+                      << c->vertex(0)->point() << ", "
+                      << c->vertex(1)->point() << ", "
+                      << c->vertex(2)->point() << ", "
+                      << c->vertex(3)->point() << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      break;
+    }
+  case 2:
+    {
+        if (coplanar_orientation(c->vertex(0)->point(),
+                                 c->vertex(1)->point(),
+                                 c->vertex(2)->point()) != POSITIVE) {
+          if (verbose)
+              std::cerr << "badly oriented face "
+                        << c->vertex(0)->point() << ", "
+                        << c->vertex(1)->point() << ", "
+                        << c->vertex(2)->point() << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+      break;
+    }
+  case 1:
+    {
+      const Point & p0 = c->vertex(0)->point();
+      const Point & p1 = c->vertex(1)->point();
+
+      Vertex_handle v = c->neighbor(0)->vertex(c->neighbor(0)->index(c));
+      if ( ! is_infinite(v) )
+      {
+        if ( collinear_position(p0, p1, v->point()) != MIDDLE ) {
+          if (verbose)
+              std::cerr << "badly oriented edge "
+                        << p0 << ", " << p1 << std::endl
+                        << "with neighbor 0"
+                        << c->neighbor(0)->vertex(1-c->neighbor(0)->index(c))
+                                         ->point()
+                        << ", " << v->point() << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+      }
+
+      v = c->neighbor(1)->vertex(c->neighbor(1)->index(c));
+      if ( ! is_infinite(v) )
+      {
+        if ( collinear_position(p1, p0, v->point()) != MIDDLE ) {
+          if (verbose)
+              std::cerr << "badly oriented edge "
+                        << p0 << ", " << p1 << std::endl
+                        << "with neighbor 1"
+                        << c->neighbor(1)->vertex(1-c->neighbor(1)->index(c))
+                                         ->point()
+                        << ", " << v->point() << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+      }
+      break;
+    }
+  }
+  return true;
+}
+
+
+namespace internal {
+
+// Internal function used by operator==.
+template < class GT, class Tds1, class Tds2, class Lds >
+bool
+test_next(const Triangulation_3<GT, Tds1, Lds> &t1,
+          const Triangulation_3<GT, Tds2, Lds> &t2,
+          typename Triangulation_3<GT, Tds1, Lds>::Cell_handle c1,
+          typename Triangulation_3<GT, Tds2, Lds>::Cell_handle c2,
+          std::map<typename Triangulation_3<GT, Tds1, Lds>::Cell_handle,
+                   typename Triangulation_3<GT, Tds2, Lds>::Cell_handle> &Cmap,
+          std::map<typename Triangulation_3<GT, Tds1, Lds>::Vertex_handle,
+                   typename Triangulation_3<GT, Tds2, Lds>::Vertex_handle> &Vmap)
+{
+
+    // This function tests and registers the 4 neighbors of c1/c2,
+    // and recursively calls itself over them.
+    // We don't use the call stack as it may overflow
+    // Returns false if an inequality has been found.
+
+    // Precondition: c1, c2 have been registered as well as their 4 vertices.
+    CGAL_triangulation_precondition(t1.dimension() >= 2);
+    CGAL_triangulation_precondition(Cmap[c1] == c2);
+    CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end());
+    CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end());
+    CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end());
+    CGAL_triangulation_precondition(t1.dimension() == 2 ||
+                                    Vmap.find(c1->vertex(3)) != Vmap.end());
+
+    typedef Triangulation_3<GT, Tds1, Lds> Tr1;
+    typedef Triangulation_3<GT, Tds2, Lds> Tr2;
+    typedef typename Tr1::Vertex_handle  Vertex_handle1;
+    typedef typename Tr1::Cell_handle    Cell_handle1;
+    typedef typename Tr2::Vertex_handle  Vertex_handle2;
+    typedef typename Tr2::Cell_handle    Cell_handle2;
+    typedef typename std::map<Cell_handle1, Cell_handle2>::const_iterator  Cit;
+    typedef typename std::map<Vertex_handle1,
+                              Vertex_handle2>::const_iterator Vit;
+
+    std::vector<std::pair<Cell_handle1, Cell_handle2> > cell_stack;
+    cell_stack.push_back(std::make_pair(c1, c2));
+
+    while(! cell_stack.empty()){
+
+      Cell_handle1 c1 = cell_stack.back().first;
+      Cell_handle2 c2 = cell_stack.back().second;
+      cell_stack.pop_back();
+
+      for (int i=0; i <= t1.dimension(); ++i) {
+        Cell_handle1 n1 = c1->neighbor(i);
+        Cit cit = Cmap.find(n1);
+        Vertex_handle1 v1 = c1->vertex(i);
+        Vertex_handle2 v2 = Vmap[v1];
+        Cell_handle2 n2 = c2->neighbor(c2->index(v2));
+        if (cit != Cmap.end()) {
+          // n1 was already registered.
+          if (cit->second != n2)
+              return false;
+          continue;
+        }
+        // n1 has not yet been registered.
+        // We check that the new vertices match geometrically.
+        // And we register them.
+        Vertex_handle1 vn1 = n1->vertex(n1->index(c1));
+        Vertex_handle2 vn2 = n2->vertex(n2->index(c2));
+        Vit vit = Vmap.find(vn1);
+        if (vit != Vmap.end()) {
+          // vn1 already registered
+          if (vit->second != vn2)
+            return false;
+        }
+        else {
+          if (t2.is_infinite(vn2))
+            return false; // vn1 can't be infinite,
+          // since it would have been registered.
+          if (t1.geom_traits().compare_xyz_3_object()(vn1->point(),
+                                                      vn2->point()) != 0)
+            return false;
+          // We register vn1/vn2.
+          Vmap.insert(std::make_pair(vn1, vn2));
+        }
+
+        // We register n1/n2.
+        Cmap.insert(std::make_pair(n1, n2));
+        cell_stack.push_back(std::make_pair(n1, n2));
+      }
+    }
+
+    return true;
+}
+
+} // namespace internal
+
+
+template < class GT, class Tds1, class Tds2, class Lds >
+bool
+operator==(const Triangulation_3<GT, Tds1, Lds> &t1,
+           const Triangulation_3<GT, Tds2, Lds> &t2)
+{
+    typedef typename Triangulation_3<GT, Tds1>::Vertex_handle Vertex_handle1;
+    typedef typename Triangulation_3<GT, Tds1>::Cell_handle   Cell_handle1;
+    typedef typename Triangulation_3<GT, Tds2>::Vertex_handle Vertex_handle2;
+    typedef typename Triangulation_3<GT, Tds2>::Cell_handle   Cell_handle2;
+
+    typedef typename Triangulation_3<GT, Tds1>::Point                       Point;
+    typedef typename Triangulation_3<GT, Tds1>::Geom_traits::Equal_3        Equal_3;
+    typedef typename Triangulation_3<GT, Tds1>::Geom_traits::Compare_xyz_3  Compare_xyz_3;
+
+    Equal_3 equal = t1.geom_traits().equal_3_object();
+    Compare_xyz_3 cmp1 = t1.geom_traits().compare_xyz_3_object();
+    Compare_xyz_3 cmp2 = t2.geom_traits().compare_xyz_3_object();
+
+    // Some quick checks.
+    if (t1.dimension() != t2.dimension()
+        || t1.number_of_vertices() != t2.number_of_vertices()
+        || t1.number_of_cells() != t2.number_of_cells())
+        return false;
+
+    int dim = t1.dimension();
+    // Special case for dimension < 1.
+    // The triangulation is uniquely defined in these cases.
+    if (dim < 1)
+        return true;
+
+    // Special case for dimension == 1.
+    if (dim == 1) {
+        // It's enough to test that the points are the same,
+        // since the triangulation is uniquely defined in this case.
+        using namespace boost;
+        std::vector<Point> V1 (t1.points_begin(), t1.points_end());
+        std::vector<Point> V2 (t2.points_begin(), t2.points_end());
+        std::sort(V1.begin(), V1.end(), boost::bind(cmp1, _1, _2) == NEGATIVE);
+        std::sort(V2.begin(), V2.end(), boost::bind(cmp2, _1, _2) == NEGATIVE);
+        return V1 == V2;
+    }
+
+    // We will store the mapping between the 2 triangulations vertices and
+    // cells in 2 maps.
+    std::map<Vertex_handle1, Vertex_handle2> Vmap;
+    std::map<Cell_handle1, Cell_handle2> Cmap;
+
+    // Handle the infinite vertex.
+    Vertex_handle1 v1 = t1.infinite_vertex();
+    Vertex_handle2 iv2 = t2.infinite_vertex();
+    Vmap.insert(std::make_pair(v1, iv2));
+
+    // We pick one infinite cell of t1, and try to match it against the
+    // infinite cells of t2.
+    Cell_handle1 c = v1->cell();
+    Vertex_handle1 v2 = c->vertex((c->index(v1)+1)%(dim+1));
+    Vertex_handle1 v3 = c->vertex((c->index(v1)+2)%(dim+1));
+    Vertex_handle1 v4 = c->vertex((c->index(v1)+3)%(dim+1));
+    const Point &p2 = v2->point();
+    const Point &p3 = v3->point();
+    const Point &p4 = v4->point();
+
+    std::vector<Cell_handle2> ics;
+    t2.incident_cells(iv2, std::back_inserter(ics));
+    for (typename std::vector<Cell_handle2>::const_iterator cit = ics.begin();
+            cit != ics.end(); ++cit) {
+        int inf = (*cit)->index(iv2);
+
+        if (equal(p2, (*cit)->vertex((inf+1)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+1)%(dim+1))));
+        else if (equal(p2, (*cit)->vertex((inf+2)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+2)%(dim+1))));
+        else if (dim == 3 &&
+                 equal(p2, (*cit)->vertex((inf+3)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v2, (*cit)->vertex((inf+3)%(dim+1))));
+        else
+            continue; // None matched v2.
+
+        if (equal(p3, (*cit)->vertex((inf+1)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+1)%(dim+1))));
+        else if (equal(p3, (*cit)->vertex((inf+2)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+2)%(dim+1))));
+        else if (dim == 3 &&
+                 equal(p3, (*cit)->vertex((inf+3)%(dim+1))->point()))
+            Vmap.insert(std::make_pair(v3, (*cit)->vertex((inf+3)%(dim+1))));
+        else
+            continue; // None matched v3.
+
+        if (dim == 3) {
+            if (equal(p4, (*cit)->vertex((inf+1)%(dim+1))->point()))
+                Vmap.insert(std::make_pair(v4,
+                                           (*cit)->vertex((inf+1)%(dim+1))));
+            else if (equal(p4, (*cit)->vertex((inf+2)%(dim+1))->point()))
+                Vmap.insert(std::make_pair(v4,
+                                           (*cit)->vertex((inf+2)%(dim+1))));
+            else if (equal(p4, (*cit)->vertex((inf+3)%(dim+1))->point()))
+                Vmap.insert(std::make_pair(v4,
+                                           (*cit)->vertex((inf+3)%(dim+1))));
+            else
+                continue; // None matched v4.
+        }
+
+        // Found it !
+        Cmap.insert(std::make_pair(c, *cit));
+        break;
+    }
+
+    if (Cmap.size() == 0)
+        return false;
+    // We now have one cell, we need to propagate recursively.
+    return internal::test_next(t1, t2,
+                     Cmap.begin()->first, Cmap.begin()->second, Cmap, Vmap);
+}
+
+template < class GT, class Tds1, class Tds2 >
+inline
+bool
+operator!=(const Triangulation_3<GT, Tds1> &t1,
+           const Triangulation_3<GT, Tds2> &t2)
+{
+  return ! (t1 == t2);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_with_info_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_with_info_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_cell_base_with_info_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_cell_base_with_info_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_conformer_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_conformer_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_conformer_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_conformer_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_2.h
new file mode 100644
index 0000000..5dd7bd4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_2.h
@@ -0,0 +1,2328 @@
+// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Mariette Yvinec
+
+#ifndef CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
+#define CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
+
+#include <CGAL/basic.h>
+#include <iostream>
+#include <list>
+#include <map>
+#include <set>
+#include <stack>
+#include <vector>
+#include <algorithm>
+#include <boost/tuple/tuple.hpp>
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Triangulation_utils_2.h>
+ 
+#include <CGAL/Compact_container.h>
+
+#include <CGAL/Triangulation_ds_face_base_2.h>
+#include <CGAL/Triangulation_ds_vertex_base_2.h>
+#include <CGAL/Triangulation_ds_iterators_2.h>
+#include <CGAL/Triangulation_ds_circulators_2.h>
+
+#include <CGAL/IO/File_header_OFF.h>
+#include <CGAL/IO/File_scanner_OFF.h>
+
+namespace CGAL { 
+
+template < class Vb = Triangulation_ds_vertex_base_2<>, 
+           class Fb = Triangulation_ds_face_base_2<> >
+class Triangulation_data_structure_2 
+  :public Triangulation_cw_ccw_2
+{
+  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
+
+  typedef typename Vb::template Rebind_TDS<Tds>::Other  Vertex_base;
+  typedef typename Fb::template Rebind_TDS<Tds>::Other  Face_base;
+
+  friend class Triangulation_ds_edge_iterator_2<Tds,false>;
+  friend class Triangulation_ds_edge_iterator_2<Tds,true>;
+  friend class Triangulation_ds_face_circulator_2<Tds>;
+  friend class Triangulation_ds_edge_circulator_2<Tds>;
+  friend class Triangulation_ds_vertex_circulator_2<Tds>;
+
+public:
+  // Tools to change the Vertex and Face types of the TDS.
+  template < typename Vb2 >
+  struct Rebind_vertex {
+    typedef Triangulation_data_structure_2<Vb2, Fb>  Other;
+  };
+
+  template < typename Fb2 >
+  struct Rebind_face {
+    typedef Triangulation_data_structure_2<Vb, Fb2>  Other;
+  };
+
+  typedef Vertex_base                                Vertex;
+  typedef Face_base                                  Face;
+  
+  typedef Compact_container<Face>                    Face_range;
+  typedef Compact_container<Vertex>                  Vertex_range;
+
+  typedef typename Face_range::size_type             size_type;
+  typedef typename Face_range::difference_type       difference_type;
+
+  typedef typename Face_range::iterator              Face_iterator;
+  typedef typename Vertex_range::iterator            Vertex_iterator;
+
+  typedef Triangulation_ds_edge_iterator_2<Tds>      Edge_iterator;
+  typedef Triangulation_ds_edge_iterator_2<Tds,false> Halfedge_iterator;
+
+  typedef Triangulation_ds_face_circulator_2<Tds>    Face_circulator;
+  typedef Triangulation_ds_vertex_circulator_2<Tds>  Vertex_circulator;
+  typedef Triangulation_ds_edge_circulator_2<Tds>    Edge_circulator;
+
+  typedef Vertex_iterator                            Vertex_handle;
+  typedef Face_iterator                              Face_handle;
+
+  typedef std::pair<Face_handle,int> Edge;
+
+  typedef std::list<Edge> List_edges;
+
+protected:
+  int _dimension;
+  Face_range   _faces;
+  Vertex_range _vertices;
+
+  //CREATORS - DESTRUCTORS
+public:
+  Triangulation_data_structure_2(); 
+  Triangulation_data_structure_2(const Tds &tds);
+  ~Triangulation_data_structure_2();
+  Tds& operator= (const Tds &tds);
+  void swap(Tds &tds);
+
+  //ACCESS FUNCTIONS
+  // We need the const_cast<>s because TDS is not const-correct.
+  Face_range& faces()             { return _faces;}
+  Face_range& faces() const 
+    { return  const_cast<Tds*>(this)->_faces;}
+  Vertex_range& vertices()         {return _vertices;}
+  Vertex_range& vertices() const
+    {return  const_cast<Tds*>(this)->_vertices;}
+
+  int  dimension() const { return _dimension;  }
+  size_type number_of_vertices() const {return vertices().size();}
+  size_type number_of_faces() const ;
+  size_type number_of_edges() const;
+  size_type number_of_full_dim_faces() const; //number of faces stored by tds
+  
+  // TEST FEATURES
+  bool is_vertex(Vertex_handle v) const;
+  bool is_edge(Face_handle fh, int i) const;
+  bool is_edge(Vertex_handle va, Vertex_handle vb) const;
+  bool is_edge(Vertex_handle va, Vertex_handle vb, 
+	       Face_handle& fr,  int& i) const;
+  bool is_face(Face_handle fh) const;
+  bool is_face(Vertex_handle v1, 
+	       Vertex_handle v2, 
+	       Vertex_handle v3) const;
+  bool is_face(Vertex_handle v1, 
+	       Vertex_handle v2, 
+	       Vertex_handle v3,
+	       Face_handle& fr) const;
+
+  // ITERATORS AND CIRCULATORS
+public:
+// The face_iterator_base_begin  gives the possibility to iterate over all
+// faces in the container  independently of the dimension.
+  // public for the need of file_ouput() of Constrained triangulation
+  // should be made private later
+
+  Face_iterator face_iterator_base_begin() const    {
+    return faces().begin();
+  }
+  Face_iterator face_iterator_base_end() const    {
+    return faces().end();
+  }
+
+public:
+  Face_iterator faces_begin() const {
+    if (dimension() < 2) return faces_end();
+    return faces().begin();
+  }
+    
+  Face_iterator faces_end() const {
+    return faces().end();
+  }
+
+  Vertex_iterator vertices_begin() const  {
+    return vertices().begin();
+  }
+
+  Vertex_iterator vertices_end() const {
+    return vertices().end();
+  }
+  
+  Edge_iterator edges_begin() const {
+    return Edge_iterator(this);
+  }
+
+  Edge_iterator edges_end() const {
+    return Edge_iterator(this,1);
+  }
+  
+  Halfedge_iterator halfedges_begin() const {
+    return Halfedge_iterator(this);
+  }
+
+  Halfedge_iterator halfedges_end() const {
+    return Halfedge_iterator(this,1);
+  }
+  
+  Face_circulator incident_faces(Vertex_handle v, 
+				 Face_handle f =  Face_handle()) const{
+    return Face_circulator(v,f);
+  }
+  Vertex_circulator incident_vertices(Vertex_handle v, 
+				      Face_handle f = Face_handle()) const
+  {    
+    return Vertex_circulator(v,f);  
+  }
+
+  Edge_circulator incident_edges(Vertex_handle v, 
+				 Face_handle f = Face_handle()) const{
+    return Edge_circulator(v,f);
+  }
+
+  size_type degree(Vertex_handle v) const {
+    int count = 0;
+    Vertex_circulator vc = incident_vertices(v), done(vc);
+    if ( ! vc.is_empty()) {
+      do { 
+	count += 1;
+      } while (++vc != done);
+    }
+    return count;
+  }
+
+  
+  Vertex_handle
+  mirror_vertex(Face_handle f, int i) const
+  {
+    CGAL_triangulation_precondition ( f->neighbor(i) != Face_handle()
+				    && f->dimension() >= 1);
+  return f->neighbor(i)->vertex(mirror_index(f,i));
+  }
+
+  int
+  mirror_index(Face_handle f, int i) const
+  {
+    // return the index of opposite vertex in neighbor(i);
+    CGAL_triangulation_precondition (f->neighbor(i) != Face_handle() &&
+				     f->dimension() >= 1);
+    if (f->dimension() == 1) {
+      CGAL_assertion(i<=1);
+      const int j = f->neighbor(i)->index(f->vertex((i==0) ? 1 : 0));
+      CGAL_assertion(j<=1);
+      return (j==0) ? 1 : 0;
+    }
+    return ccw( f->neighbor(i)->index(f->vertex(ccw(i))));
+  }
+
+  Edge 
+  mirror_edge(const Edge e) const 
+  {
+    CGAL_triangulation_precondition(e.first->neighbor(e.second) != Face_handle()
+                                    && e.first->dimension() >= 1);
+    return Edge(e.first->neighbor(e.second),
+                mirror_index(e.first,  e.second));
+  }
+
+  // MODIFY
+  void flip(Face_handle f, int i);
+ 
+  Vertex_handle insert_first();
+  Vertex_handle insert_second();
+  Vertex_handle insert_in_face(Face_handle f);
+  Vertex_handle insert_in_edge(Face_handle f, int i);
+  Vertex_handle insert_dim_up(Vertex_handle w = Vertex_handle(), 
+			      bool orient=true);
+
+  void remove_degree_3(Vertex_handle v, Face_handle f = Face_handle());
+  void remove_1D(Vertex_handle v); 
+   
+  void remove_second(Vertex_handle v);
+  void remove_first(Vertex_handle v);
+  void remove_dim_down(Vertex_handle v);
+  void dim_down(Face_handle f, int i);
+
+  Vertex_handle star_hole(List_edges& hole);
+  void    star_hole(Vertex_handle v, List_edges& hole);
+  void    make_hole(Vertex_handle v, List_edges& hole);
+
+//   template< class EdgeIt>
+//   Vertex_handle star_hole(EdgeIt edge_begin,EdgeIt edge_end);
+ 
+//   template< class EdgeIt>
+//   void  star_hole(Vertex_handle v, EdgeIt edge_begin,  EdgeIt edge_end);
+
+//   template< class EdgeIt, class FaceIt>
+//   Vertex_handle star_hole(EdgeIt edge_begin, 
+// 		    EdgeIt edge_end,
+// 		    FaceIt face_begin,
+// 		    FaceIt face_end);
+ 
+//   template< class EdgeIt, class FaceIt>
+//   void  star_hole(Vertex_handle v,
+// 		  EdgeIt edge_begin, 
+// 		  EdgeIt edge_end,
+// 		  FaceIt face_begin,
+// 		  FaceIt face_end);
+  
+  Vertex_handle create_vertex(const Vertex &v = Vertex());
+  Vertex_handle create_vertex(Vertex_handle v); //calls copy constructor 
+  Face_handle create_face(const Face& f = Face());
+  Face_handle create_face(Face_handle f); //calls copy constructor 
+
+ Face_handle create_face(Face_handle f1, int i1, 
+			  Face_handle f2, int i2, 
+			  Face_handle f3, int i3);
+  Face_handle create_face(Face_handle f1, int i1, 
+			  Face_handle f2, int i2);
+  Face_handle create_face(Face_handle f1, int i1, Vertex_handle v);
+  Face_handle create_face(Vertex_handle v1, 
+			  Vertex_handle v2, 
+			  Vertex_handle v3);
+  Face_handle create_face(Vertex_handle v1, 
+			  Vertex_handle v2, 
+			  Vertex_handle v3,
+			  Face_handle f1, 
+			  Face_handle f2, 
+			  Face_handle f3);
+
+  void set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const;
+
+  void delete_face(Face_handle);
+  void delete_vertex(Vertex_handle);
+
+  // split and join operations
+ protected:
+  Vertex_handle join_vertices(Face_handle f, int i, Vertex_handle v);
+
+  typedef
+  boost::tuples::tuple<Vertex_handle,Vertex_handle,Face_handle,Face_handle>
+  Fourtuple;
+
+ public:
+  Fourtuple split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1);
+
+  inline Vertex_handle join_vertices(Face_handle f, int i) {
+    return join_vertices(f, i, f->vertex( ccw(i) ));
+  }
+
+  inline Vertex_handle join_vertices(Edge e) {
+    return join_vertices(e.first, e.second);
+  }
+
+  inline Vertex_handle join_vertices(Edge_iterator eit) {
+    return join_vertices(*eit);
+  }
+
+  inline Vertex_handle join_vertices(Edge_circulator ec) {
+    return join_vertices(*ec);
+  }
+
+  // insert_degree_2 and remove_degree_2 operations
+  Vertex_handle insert_degree_2(Face_handle f, int i);
+  void remove_degree_2(Vertex_handle v);
+
+  // CHECKING
+  bool is_valid(bool verbose = false, int level = 0) const;
+  
+  // HELPING
+private:
+  typedef std::pair<Vertex_handle,Vertex_handle> Vh_pair;
+public:
+  void  set_adjacency(Face_handle fh, 
+		      int ih, 
+		      std::map< Vh_pair, Edge>& edge_map);
+  void reorient_faces();
+private:
+  bool dim_down_precondition(Face_handle f, int i);
+
+public:
+  void clear();
+
+  template <class TDS_src>
+  Vertex_handle copy_tds(const TDS_src &tds, typename TDS_src::Vertex_handle);
+
+  template <class TDS_src>
+  Vertex_handle copy_tds(const TDS_src &tds)
+  {
+    return copy_tds(tds, typename TDS_src::Vertex_handle());
+  }
+
+  template <class TDS_src,class ConvertVertex,class ConvertFace>
+  Vertex_handle copy_tds(const TDS_src&, typename TDS_src::Vertex_handle,const ConvertVertex&,const ConvertFace&);
+
+  Vertex_handle collapse_edge(Edge e)
+  {
+    std::cout << "before collapse"<<std::endl;
+    Face_handle fh = e.first;
+    int i = e.second;
+    Vertex_handle vh = fh->vertex(cw(i));
+    Vertex_handle wh = fh->vertex(ccw(i));
+    Face_handle left = fh->neighbor(cw(i));
+    Face_handle right = fh->neighbor(ccw(i));
+    Face_handle nh = fh->neighbor(i);
+    int li = left->index(fh);
+    int ri = right->index(fh);
+    int ni = nh->index(fh);
+    left->set_neighbor(li, right);
+    right->set_neighbor(ri,left);
+    left->set_vertex(ccw(li), vh);
+    vh->set_face(right);
+    right->vertex(ccw(ri))->set_face(right);
+
+    left = nh->neighbor(ccw(ni));
+    right = nh->neighbor(cw(ni));
+    li = left->index(nh);
+    ri = right->index(nh);
+    left->set_neighbor(li, right);
+    right->set_neighbor(ri,left);
+    left->set_vertex(cw(li), vh);
+    right->vertex(cw(ri))->set_face(right);
+    delete_face(fh);
+    delete_face(nh);
+    delete_vertex(wh);
+    std::cout << "after collapse"<<std::endl;
+    return vh;
+  }
+
+
+  // I/O
+  Vertex_handle file_input(std::istream& is, bool skip_first=false);
+  void file_output(std::ostream& os,
+		   Vertex_handle v = Vertex_handle(),
+		   bool skip_first=false) const;
+  Vertex_handle off_file_input(std::istream& is, bool verbose=false);
+  void  vrml_output(std::ostream& os,
+		    Vertex_handle v = Vertex_handle(),
+		    bool skip_first=false) const;
+
+  // SETTING (had to make them public for use in remove from Triangulations)
+  void set_dimension (int n) {_dimension = n ;}
+
+  // template members definition
+public:
+  template< class EdgeIt>
+  Vertex_handle star_hole(EdgeIt edge_begin, EdgeIt edge_end)
+  // creates a new vertex 
+  // and stars from it
+  // the hole described by the range [edge_begin,edge_end[
+  // the triangulation is assumed to have dim=2
+  // hole is supposed to be ccw oriented
+  {
+     Vertex_handle newv = create_vertex();
+     star_hole(newv, edge_begin, edge_end);
+     return newv;
+  }
+ 
+  template< class EdgeIt>
+  void  star_hole(Vertex_handle v, EdgeIt edge_begin,  EdgeIt edge_end)
+  // uses vertex v
+  // to star the hole described by the range [edge_begin,edge_end[
+  // the triangulation is assumed to have dim=2
+  // the hole is supposed to be ccw oriented
+  { 
+    std::list<Face_handle> empty_list;
+    star_hole(v, 
+	      edge_begin, 
+	      edge_end, 
+	      empty_list.begin(),
+	      empty_list.end());
+    return;    
+  }
+
+
+  template< class EdgeIt, class FaceIt>
+  Vertex_handle star_hole(EdgeIt edge_begin, 
+		    EdgeIt edge_end,
+		    FaceIt face_begin,
+		    FaceIt face_end)
+  // creates a new vertex 
+  // and stars from it
+  // the hole described by the range [edge_begin,edge_end[
+    // reusing the faces in the range [face_begin,face_end[
+  // the triangulation is assumed to have dim=2
+  // the hole is supposed to be ccw oriented
+  {
+    Vertex_handle newv = create_vertex();
+    star_hole(newv, edge_begin, edge_end, face_begin, face_end);
+    return newv;
+  }
+ 
+  template< class EdgeIt, class FaceIt>
+  void  star_hole(Vertex_handle newv,
+		  EdgeIt edge_begin, 
+		  EdgeIt edge_end,
+		  FaceIt face_begin,
+		  FaceIt face_end)
+    // uses vertex v
+    // to star the hole described by the range [edge_begin,edge_end[
+    // reusing the faces in the range [face_begin,face_end[
+    // the triangulation is assumed to have dim=2
+    // hole is supposed to be ccw oriented
+  {
+    CGAL_triangulation_precondition(dimension() == 2);
+    EdgeIt eit = edge_begin;
+    FaceIt fit = face_begin;
+
+    Face_handle fn = (*eit).first;
+    int in = (*eit).second;
+    fn->vertex(cw(in))->set_face(fn);
+    Face_handle first_f =  reset_or_create_face(fn, in , newv, fit, face_end);
+    Face_handle previous_f=first_f, next_f;
+    ++eit; 
+
+    for( ; eit != edge_end ; eit++) {
+      fn = (*eit).first;
+      in = (*eit).second;
+      fn->vertex(cw(in))->set_face(fn);
+      next_f = reset_or_create_face(fn, in , newv, fit, face_end);
+      set_adjacency(next_f, 1, previous_f, 0);
+      previous_f=next_f;
+    }
+
+    set_adjacency(next_f, 0, first_f, 1);
+    newv->set_face(first_f);
+    return;    
+  }
+
+private:
+  template< class FaceIt>
+  Face_handle  reset_or_create_face(Face_handle fn, 
+			      int in, 
+			      Vertex_handle v,
+			      FaceIt& fit,
+			      const FaceIt& face_end)
+  {
+    if (fit == face_end) return create_face(fn, in, v);
+    (*fit)->set_vertices(fn->vertex(cw(in)), fn->vertex(ccw(in)), v);
+    (*fit)->set_neighbors(Face_handle(),Face_handle(),fn);
+    fn->set_neighbor(in, *fit);
+    return *fit++;    
+  }
+
+};
+
+//for backward compatibility
+template < class Gt , class Vb, class Fb>
+class Triangulation_default_data_structure_2 
+  : public Triangulation_data_structure_2<Vb,Fb>
+{
+public:
+  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
+  typedef Triangulation_default_data_structure_2<Gt,Vb,Fb> Tdds;
+  typedef Gt                           Geom_traits; 
+
+  Triangulation_default_data_structure_2(const Geom_traits& = Geom_traits())
+    : Tds() {}
+ 
+  Triangulation_default_data_structure_2(const Tdds &tdds)
+    : Tds(tdds) {}
+};
+
+//for backward compatibility
+template <class Vb, class Fb>
+class Triangulation_data_structure_using_list_2
+  :public Triangulation_data_structure_2<Vb, Fb>
+{
+public:
+  typedef Triangulation_data_structure_2<Vb,Fb>  Tds;
+  typedef Triangulation_data_structure_using_list_2<Vb,Fb>  Tdsul;
+
+  Triangulation_data_structure_using_list_2(): Tds() {} 
+  Triangulation_data_structure_using_list_2(const Tdsul &tdsul)
+    : Tds(tdsul) {}
+};
+
+ 
+template < class Vb, class Fb>
+Triangulation_data_structure_2<Vb,Fb> ::
+Triangulation_data_structure_2() 
+  : _dimension(-2)
+{ }
+
+template < class Vb, class Fb>
+Triangulation_data_structure_2<Vb,Fb> ::
+Triangulation_data_structure_2(const Tds &tds)
+{
+  copy_tds(tds);
+}
+
+template < class Vb, class Fb>
+Triangulation_data_structure_2<Vb,Fb> ::
+~Triangulation_data_structure_2()
+{
+  clear();
+}
+
+//assignement  
+template < class Vb, class Fb>
+Triangulation_data_structure_2<Vb,Fb>&
+Triangulation_data_structure_2<Vb,Fb> ::
+operator= (const Tds &tds)
+{
+  copy_tds(tds);
+  return *this;
+}  
+
+template <  class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+clear()
+{
+  faces().clear();
+  vertices().clear();
+  set_dimension(-2);
+  return;
+}
+
+template <  class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+swap(Tds &tds)
+{
+  CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid());
+  std::swap(_dimension, tds._dimension);
+  faces().swap(tds.faces());
+  vertices().swap(tds.vertices());
+  return;
+}
+
+//ACCESS FUNCTIONS
+template <class Vb, class Fb>
+inline 
+typename Triangulation_data_structure_2<Vb,Fb>::size_type
+Triangulation_data_structure_2<Vb,Fb> ::
+number_of_faces() const 
+{
+  if (dimension() < 2) return 0;
+  return faces().size();
+}
+
+template <class Vb, class Fb>
+inline 
+typename Triangulation_data_structure_2<Vb,Fb>::size_type
+Triangulation_data_structure_2<Vb,Fb>::
+number_of_edges() const
+{
+  switch (dimension()) {
+  case 1:  return number_of_vertices();
+  case 2:  return 3*number_of_faces()/2;
+  default: return 0;
+  }
+}
+      
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::size_type
+Triangulation_data_structure_2<Vb,Fb>::
+number_of_full_dim_faces() const
+{
+  return faces().size();
+}
+
+template <class Vb, class Fb>
+inline bool
+Triangulation_data_structure_2<Vb,Fb>::
+is_vertex(Vertex_handle v) const
+{
+  Vertex_iterator vit = vertices_begin();
+  while (vit != vertices_end() && v != vit)
+        ++vit;
+  return v == vit;
+}
+
+template <class Vb, class Fb>
+inline bool
+Triangulation_data_structure_2<Vb,Fb>::
+is_edge(Face_handle fh, int i) const
+{
+  if ( dimension() == 0 )  return false;
+  if ( dimension() == 1 && i != 2) return false;
+  if (i > 2) return false;
+  Face_iterator fit = face_iterator_base_begin();
+  while (fit != face_iterator_base_end() && fh != fit ) ++fit;
+  return fh == fit;
+}
+
+template <class Vb, class Fb>
+bool
+Triangulation_data_structure_2<Vb,Fb>::
+is_edge(Vertex_handle va, Vertex_handle vb) const
+// returns true (false) if the line segment ab is (is not) an edge of t
+//It is assumed that va is a vertex of t
+{
+  Vertex_circulator vc = incident_vertices(va), done(vc);
+  if ( vc == 0) return false;
+  do {
+    if( vb == vc ) {return true;} 
+  } while (++vc != done);
+  return false;
+}
+ 
+
+template <class Vb, class Fb>
+bool
+Triangulation_data_structure_2<Vb,Fb>::
+is_edge(Vertex_handle va, Vertex_handle vb, 
+	Face_handle &fr,  int & i) const
+// assume va is a vertex of t
+// returns true (false) if the line segment ab is (is not) an edge of t
+// if true is returned (fr,i) is the edge ab
+// with face fr on the right of a->b
+{
+  Face_handle fc = va->face(); 
+  Face_handle start = fc;
+  if (fc == 0) return false;
+  int inda, indb;
+  do {
+    inda=fc->index(va);
+    indb = (dimension() == 2 ? cw(inda) : 1-inda);
+    if(fc->vertex(indb) == vb) {
+      fr=fc;
+      i = 3 - inda - indb; //works in dim 1 or 2
+      return true;
+    }
+    fc=fc->neighbor(indb); //turns ccw around va
+  } while (fc != start);
+  return false;
+}
+
+template <class Vb, class Fb>
+inline bool 
+Triangulation_data_structure_2<Vb,Fb>::
+is_face(Face_handle fh) const
+{
+  if (dimension() < 2)  return false;
+  Face_iterator fit = faces_begin();
+  while (fit != faces_end() && fh != fit ) ++fit;
+  return fh == fit;
+}
+
+template <class Vb, class Fb>
+inline bool 
+Triangulation_data_structure_2<Vb,Fb>::
+is_face(Vertex_handle v1, 
+	Vertex_handle v2, 
+	Vertex_handle v3) const
+{
+  Face_handle f;
+  return is_face(v1,v2,v3,f);
+}
+
+template <class Vb, class Fb>
+bool 
+Triangulation_data_structure_2<Vb,Fb>::
+is_face(Vertex_handle v1, 
+	Vertex_handle v2, 
+	Vertex_handle v3,
+	Face_handle &f) const
+{
+  if (dimension() != 2) return false;
+  int i;
+  bool b = is_edge(v1,v2,f,i);
+  if (!b) return false;
+  else if (v3== f->vertex(i)) return true;
+  f = f-> neighbor(i);
+  int ind1= f->index(v1);
+  int ind2= f->index(v2);
+  if (v3 == f->vertex(3-ind1-ind2)) { return true;}
+  return false;  
+}
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+flip(Face_handle f, int i)
+{
+  CGAL_triangulation_precondition( dimension()==2);
+  Face_handle n  = f->neighbor(i);
+  int ni = mirror_index(f,i); //ni = n->index(f);
+    
+  Vertex_handle  v_cw = f->vertex(cw(i));
+  Vertex_handle  v_ccw = f->vertex(ccw(i));
+
+  // bl == bottom left, tr == top right
+  Face_handle tr = f->neighbor(ccw(i));
+  int tri =  mirror_index(f,ccw(i));  
+  Face_handle bl = n->neighbor(ccw(ni));
+  int bli =  mirror_index(n,ccw(ni)); 
+      
+  f->set_vertex(cw(i), n->vertex(ni));
+  n->set_vertex(cw(ni), f->vertex(i));
+    
+  // update the neighborhood relations
+  set_adjacency(f, i, bl, bli);
+  set_adjacency(f, ccw(i), n, ccw(ni));
+  set_adjacency(n, ni, tr, tri);
+
+  if(v_cw->face() == f) {
+    v_cw->set_face(n);
+  }
+    
+  if(v_ccw->face() == n) {
+    v_ccw->set_face(f);
+  }
+}
+  
+template < class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+insert_first( )
+{
+  CGAL_triangulation_precondition( number_of_vertices() == 0 &&
+				   dimension()==-2 );
+  return insert_dim_up();
+}
+
+template < class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle 
+Triangulation_data_structure_2<Vb,Fb>::
+insert_second()
+{
+  CGAL_triangulation_precondition( number_of_vertices() == 1 &&
+				   dimension()==-1 );
+  return insert_dim_up();
+
+}
+
+
+template <  class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+insert_in_face(Face_handle f)
+  // New vertex will replace f->vertex(0) in face f
+{
+  CGAL_triangulation_precondition( f != Face_handle() && dimension()== 2);
+  Vertex_handle  v = create_vertex();
+
+  Vertex_handle v0 = f->vertex(0);
+  Vertex_handle v2 = f->vertex(2);
+  Vertex_handle v1 = f->vertex(1);
+    
+  Face_handle n1 = f->neighbor(1);
+  Face_handle n2 = f->neighbor(2);
+    
+  Face_handle f1 = create_face(v0, v, v2, f, n1, Face_handle());
+  Face_handle f2 = create_face(v0, v1, v, f, Face_handle(), n2);
+
+  set_adjacency(f1, 2, f2, 1);
+  if (n1 != Face_handle()) {
+    int i1 = mirror_index(f,1); //int i1 = n1->index(f);
+    n1->set_neighbor(i1,f1);
+  }
+  if (n2 != Face_handle()) {
+    int i2 = mirror_index(f,2);//int i2 = n2->index(f);
+    n2->set_neighbor(i2,f2);}
+
+  f->set_vertex(0, v);
+  f->set_neighbor(1, f1);
+  f->set_neighbor(2, f2);
+
+  if( v0->face() == f  ) {  v0->set_face(f2); }
+  v->set_face(f);
+
+  return v;
+}
+
+
+template <  class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+insert_in_edge(Face_handle f, int i)
+  //insert in the edge opposite to vertex i of face f
+{
+  CGAL_triangulation_precondition(f != Face_handle() && dimension() >= 1); 
+  if (dimension() == 1) {CGAL_triangulation_precondition(i == 2);}
+  if (dimension() == 2) {CGAL_triangulation_precondition(i == 0 || 
+							 i == 1 || 
+							 i == 2);}
+  Vertex_handle v;
+  if (dimension() == 1) {
+    v = create_vertex();
+    Face_handle ff = f->neighbor(0);
+    Vertex_handle vv = f->vertex(1);
+    Face_handle g = create_face(v,vv,Vertex_handle(),ff, f, Face_handle());
+    f->set_vertex(1,v);f->set_neighbor(0,g);
+    ff->set_neighbor(1,g);
+    v->set_face(g);
+    vv->set_face(ff);
+  }
+
+    else { //dimension() ==2
+    Face_handle n = f->neighbor(i);
+    int in = mirror_index(f,i); //n->index(f);
+    v = insert_in_face(f);
+    flip(n,in); 
+    }
+
+  return v;
+}
+
+
+template <  class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+insert_dim_up(Vertex_handle w,  bool orient)
+{
+  // the following function insert 
+  // a vertex  v which is outside the affine  hull of Tds
+  // The triangulation will be starred from  v and w 
+  // ( geometrically w=  // the infinite vertex )
+  // w=NULL for first and second insertions
+  // orient governs the orientation of the resulting triangulation
+
+  Vertex_handle v = create_vertex();
+  set_dimension( dimension() + 1);
+  Face_handle f1;
+  Face_handle f2;
+
+  const int dim = dimension(); //it is the resulting dimension
+    
+  switch (dim) { 
+  case -1:
+    f1 = create_face(v,Vertex_handle(),Vertex_handle());
+    v->set_face(f1);
+    break;
+  case 0 :
+    f1 = face_iterator_base_begin();
+    f2 = create_face(v,Vertex_handle(),Vertex_handle());
+    set_adjacency(f1, 0, f2, 0);
+    v->set_face(f2);
+    break;
+  case 1 :
+  case 2 :
+    {
+      std::list<Face_handle> faces_list;
+      Face_iterator ib= face_iterator_base_begin(); 
+      Face_iterator ib_end = face_iterator_base_end();
+      for (; ib != ib_end ; ++ib){
+	faces_list.push_back( ib);
+      }
+      
+      std::list<Face_handle>  to_delete;
+      typename std::list<Face_handle>::iterator lfit = faces_list.begin();
+      Face_handle f, g;
+
+      for ( ; lfit != faces_list.end() ; ++lfit) {
+	f = * lfit;
+	g = create_face(f); //calls copy constructor of face
+	f->set_vertex(dim,v);
+	g->set_vertex(dim,w);
+	set_adjacency(f, dim, g, dim);
+	if (f->has_vertex(w)) to_delete.push_back(g); // flat face to delete
+      }
+
+      lfit = faces_list.begin();
+      for ( ; lfit != faces_list.end() ; ++lfit) {
+	f = * lfit;
+	g = f->neighbor(dim);
+	for(int j = 0; j < dim ; ++j) {
+	  g->set_neighbor(j, f->neighbor(j)->neighbor(dim));
+	}
+      }
+
+      // couldn't unify the code for reorientation mater
+      lfit = faces_list.begin() ; 
+      if (dim == 1){
+	if (orient) {
+	  (*lfit)->reorient(); ++lfit ;  (*lfit)->neighbor(1)->reorient();
+	}
+	else {
+	  (*lfit)->neighbor(1)->reorient(); ++lfit ; (*lfit)->reorient(); 
+	}
+      }
+      else { // dimension == 2
+	for( ;lfit  != faces_list.end(); ++lfit ) {
+	  if (orient) {(*lfit)->neighbor(2)->reorient();}
+	  else { (*lfit)->reorient();}
+	}
+      }
+
+      lfit = to_delete.begin();
+      int i1, i2;
+      for ( ;lfit  != to_delete.end(); ++lfit){
+	f = *lfit ;
+	int j ;
+	if (f->vertex(0) == w) {j=0;}
+	else {j=1;}
+	f1= f->neighbor(dim); i1= mirror_index(f,dim); //f1->index(f);
+	f2= f->neighbor(j); i2= mirror_index(f,j); //f2->index(f);
+	set_adjacency(f1, i1, f2, i2);
+	delete_face(f);
+      }
+    
+      v->set_face( *(faces_list.begin()));
+    }
+    break;
+  default:
+    CGAL_triangulation_assertion(false);
+    break;  }
+  return v;
+}
+
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+remove_degree_3(Vertex_handle v, Face_handle f)
+// remove a vertex of degree 3
+{
+  CGAL_triangulation_precondition(v != Vertex_handle());
+  CGAL_triangulation_precondition(degree(v) == 3);
+
+  if (f == Face_handle()) {f= v->face();}
+  else { CGAL_triangulation_assertion( f->has_vertex(v));}
+      
+  int i = f->index(v);
+  Face_handle left = f->neighbor(cw(i));
+  int li = mirror_index(f,cw(i)); 
+  Face_handle right = f->neighbor(ccw(i));
+  int ri = mirror_index(f,ccw(i)); 
+
+  Face_handle ll, rr;
+  Vertex_handle q = left->vertex(li);
+  CGAL_triangulation_assertion( left->vertex(li) == right->vertex(ri));
+    
+  ll = left->neighbor(cw(li));
+  if(ll != Face_handle()) {
+    int lli = mirror_index(left,cw(li)); 
+    ll->set_neighbor(lli, f);
+  } 
+  f->set_neighbor(cw(i), ll);
+  if (f->vertex(ccw(i))->face() == left) f->vertex(ccw(i))->set_face(f);    
+        
+  rr = right->neighbor(ccw(ri));
+  if(rr != Face_handle()) {
+    int rri =  mirror_index(right,ccw(ri)); //rr->index(right);
+    rr->set_neighbor(rri, f);
+  } 
+  f->set_neighbor(ccw(i), rr);
+  if (f->vertex(cw(i))->face() == right) f->vertex(cw(i))->set_face(f);  
+        
+  f->set_vertex(i, q);
+  if (q->face() == right || q->face() == left) {
+    q->set_face(f);
+  }
+  delete_face(right);
+  delete_face(left);
+        
+  delete_vertex(v);
+} 
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+dim_down(Face_handle f, int i)
+{
+  CGAL_triangulation_expensive_precondition( is_valid() );
+  CGAL_triangulation_precondition( dimension() == 2 );
+  CGAL_triangulation_precondition( number_of_vertices() > 3 );
+  CGAL_triangulation_precondition( degree( f->vertex(i) ) == 
+                                   number_of_vertices()-1 );
+
+  Vertex_handle v = f->vertex(i);
+  std::list<Face_handle > to_delete;
+  std::list<Face_handle> to_downgrade;
+  Face_iterator ib = face_iterator_base_begin();
+  for( ; ib != face_iterator_base_end(); ++ib ){
+    if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);}
+    else { to_downgrade.push_back(ib);}
+  }
+
+  typename std::list<Face_handle>::iterator lfit = to_downgrade.begin();
+  int j;
+  for( ; lfit !=  to_downgrade.end() ; ++lfit) {
+    Face_handle fs = *lfit; j = fs->index(v);
+    if (j == 0) fs->cw_permute();
+    else if(j == 1) fs->ccw_permute();
+    fs->set_vertex(2, Vertex_handle());
+    fs->set_neighbor(2, Face_handle());
+    fs->vertex(0)->set_face(fs);
+  }
+  lfit = to_delete.begin();
+  for( ; lfit !=  to_delete.end() ; ++lfit) {
+    delete_face(*lfit);
+  }
+  set_dimension(dimension() -1);
+  Face_handle n0 = f->neighbor(0);
+  //Face_handle n1 = f->neighbor(1);
+  //Vertex_handle v0 = f->vertex(0);
+  Vertex_handle v1 = f->vertex(1);
+  f->set_vertex(1, v);
+  Face_handle fl = create_face(v, v1, Vertex_handle(),
+	                       n0, f, Face_handle());
+  f->set_neighbor(0, fl);
+  n0->set_neighbor(1, fl);
+  v->set_face(f);
+}
+  
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+remove_dim_down(Vertex_handle v)
+{
+  Face_handle f;
+  switch( dimension()){
+  case -1: 
+    delete_face(v->face());
+    break;
+  case 0:
+    f = v->face();
+    f->neighbor(0)->set_neighbor(0,Face_handle());
+    delete_face(v->face());
+    break;
+  case 1:
+  case 2:
+//  CGAL_triangulation_precondition ( 
+//           (dimension() == 1 &&  number_of_vertices() == 3) ||
+//           (dimension() == 2 && number_of_vertices() > 3) );
+    // the faces incident to v are down graded one dimension
+    // the other faces are deleted
+    std::list<Face_handle > to_delete;
+    std::list<Face_handle > to_downgrade;
+    Face_iterator ib = face_iterator_base_begin();
+    for( ; ib != face_iterator_base_end(); ++ib ){
+      if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);}
+      else { to_downgrade.push_back(ib);}
+    }
+
+    typename std::list<Face_handle>::iterator lfit = to_downgrade.begin();
+    int j;
+    for( ; lfit !=  to_downgrade.end() ; ++lfit) {
+      f = *lfit; j = f->index(v);
+      if (dimension() == 1) {
+	if (j == 0) 	f->reorient();
+	f->set_vertex(1,Vertex_handle());
+	f->set_neighbor(1, Face_handle());
+      }
+      else { //dimension() == 2
+	if (j == 0) f->cw_permute();
+	else if(j == 1) f->ccw_permute();
+	f->set_vertex(2, Vertex_handle());
+	f->set_neighbor(2, Face_handle());
+      }
+      f->vertex(0)->set_face(f);
+    }
+
+    lfit = to_delete.begin();
+    for( ; lfit !=  to_delete.end() ; ++lfit) {
+      delete_face(*lfit);
+    }
+  }  
+  delete_vertex(v);
+  set_dimension(dimension() -1);
+  return;
+}
+
+template <  class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::  
+remove_1D(Vertex_handle v)
+{
+  CGAL_triangulation_precondition( dimension() == 1 &&
+				   number_of_vertices() > 3);
+  Face_handle f = v->face();
+  int i = f->index(v);
+  if (i==0) {f = f->neighbor(1);}
+  CGAL_triangulation_assertion( f->index(v) == 1);
+  Face_handle g= f->neighbor(0);
+  f->set_vertex(1, g->vertex(1));
+  set_adjacency(f, 0, g->neighbor(0), 1);
+  g->vertex(1)->set_face(f);
+  delete_face(g);
+  delete_vertex(v);
+  return;
+}
+
+
+
+template <class Vb, class Fb>
+inline void
+Triangulation_data_structure_2<Vb,Fb>::
+remove_second(Vertex_handle v)
+{
+  CGAL_triangulation_precondition(number_of_vertices()== 2 &&
+ 				  dimension() == 0);
+  remove_dim_down(v);
+  return;
+}
+
+    
+template <class Vb, class Fb>
+inline void
+Triangulation_data_structure_2<Vb,Fb>::
+remove_first(Vertex_handle v)
+{
+  CGAL_triangulation_precondition(number_of_vertices()== 1 && 
+ 				  dimension() == -1);
+  remove_dim_down(v);
+  return; 
+}
+
+template <class Vb, class Fb>
+inline
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+star_hole(List_edges& hole)
+{
+  Vertex_handle newv = create_vertex();
+  star_hole(newv, hole);
+  return newv;
+}
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+star_hole(Vertex_handle newv, List_edges& hole)
+  // star the hole represented by hole around newv
+  // the triangulation is assumed to have dim=2
+  // hole is supposed to be ccw oriented
+{
+   
+  star_hole(newv, hole.begin(), hole.end());
+  return;	    
+}
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+make_hole(Vertex_handle v, List_edges& hole)
+  // delete the faces incident to v and v
+  // and return the dscription of the hole in hole
+{
+ CGAL_triangulation_precondition(dimension() == 2);
+ std::list<Face_handle> to_delete;  
+
+ Face_handle  f, fn;
+ int i =0, in =0;
+ Vertex_handle  vv;
+
+ Face_circulator fc = incident_faces(v);
+ Face_circulator done(fc);
+ do {
+   f = fc ;
+   i = f->index(v);
+   fn = f->neighbor(i);
+   in = mirror_index(f,i); //fn->index(f);
+   vv = f->vertex(cw(i));
+   if( vv->face()==  f) vv->set_face(fn);
+   vv = fc->vertex(ccw(i));
+   if( vv->face()== f) vv->set_face(fn);
+   fn->set_neighbor(in, Face_handle());
+   hole.push_back(Edge(fn,in));
+   to_delete.push_back(f);
+ }
+  while(++fc != done);
+
+  while (! to_delete.empty()){
+    delete_face(to_delete.front());
+    to_delete.pop_front();
+  }
+  delete_vertex(v);
+  return;
+}
+
+
+template <class Vb, class Fb>
+inline
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_vertex(const Vertex &v)
+{
+  return vertices().insert(v);
+}
+
+template <class Vb, class Fb>
+inline
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_vertex(Vertex_handle vh)
+{
+  return vertices().insert(*vh);
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(const Face& f)
+{
+  return faces().insert(f);
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face( Face_handle fh)
+{
+  return create_face(*fh);
+}
+
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(Face_handle f1, int i1, 
+	    Face_handle f2, int i2, 
+	    Face_handle f3, int i3)
+{
+  Face_handle newf = faces().emplace(f1->vertex(cw(i1)),
+					      f2->vertex(cw(i2)),
+					      f3->vertex(cw(i3)),
+					      f2, f3, f1);
+  f1->set_neighbor(i1,newf);
+  f2->set_neighbor(i2,newf);
+  f3->set_neighbor(i3,newf);
+  return newf;
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(Face_handle f1, int i1, Face_handle f2, int i2)
+{
+  Face_handle newf = faces().emplace(f1->vertex(cw(i1)),
+					      f2->vertex(cw(i2)),
+					      f2->vertex(ccw(i2)),
+					      f2, Face_handle(), f1);
+  f1->set_neighbor(i1,newf);
+  f2->set_neighbor(i2,newf);
+  return newf;
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(Face_handle f1, int i1, Vertex_handle v)
+{
+  Face_handle newf = create_face();
+  newf->set_vertices(f1->vertex(cw(i1)), f1->vertex(ccw(i1)), v);
+  newf->set_neighbors(Face_handle(), Face_handle(), f1);
+  f1->set_neighbor(i1,newf);
+  return newf;
+}
+
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
+{
+  Face_handle newf = faces().emplace(v1, v2, v3);
+  return newf;
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Face_handle
+Triangulation_data_structure_2<Vb,Fb>::
+create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3,
+	    Face_handle f1, Face_handle f2, Face_handle f3)
+{
+  Face_handle newf = faces().emplace(v1, v2, v3, f1, f2, f3);
+
+  return(newf);
+}
+
+template <class Vb, class Fb>
+inline void
+Triangulation_data_structure_2<Vb,Fb>::
+set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const
+{
+  CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension());
+  CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension());
+  CGAL_triangulation_assertion(f0 != f1);
+  f0->set_neighbor(i0,f1);
+  f1->set_neighbor(i1,f0);
+}
+
+template <class Vb, class Fb>
+inline void
+Triangulation_data_structure_2<Vb,Fb>::
+delete_face(Face_handle f)
+{
+  CGAL_triangulation_expensive_precondition( dimension() != 2 || is_face(f));
+  CGAL_triangulation_expensive_precondition( dimension() != 1 || is_edge(f,2));
+  CGAL_triangulation_expensive_precondition( dimension() != 0 ||
+					     is_vertex(f->vertex(0)) );
+  faces().erase(f);
+}
+
+template <class Vb, class Fb>
+inline void
+Triangulation_data_structure_2<Vb,Fb>::
+delete_vertex(Vertex_handle v)
+{
+  CGAL_triangulation_expensive_precondition( is_vertex(v) );
+  vertices().erase(v);
+}
+
+// split and join operations
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Fourtuple
+Triangulation_data_structure_2<Vb,Fb>::
+split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1)
+{
+  /*
+  // The following method preforms a split operation of the vertex v
+  // using the faces f1 and g1. The split operation is shown
+  // below.
+  // The names of the variables in the method correspond to the
+  // quantities in the drawings below
+  //
+  // The configuration before the split:
+  //
+  //                  cw(i1)   v3   ccw(i2)
+  //                     *-----*-----*
+  //                    / \    |    / \
+  //                   /   \ f1|f2 /   \
+  //                  /     \  |  /     \
+  //                 /       \ | /       \
+  //                /         \|/v        \
+  //               *-----------*-----------*
+  //                \         /|\         /
+  //                 \       / | \       /
+  //                  \     /  |  \     /
+  //                   \   / g2|g1 \   /
+  //                    \ /    |    \ /
+  //                     *-----*-----*
+  //                 ccw(j2)   v4   cw(j1)
+  //
+  //
+  // The configuration after the split:
+  //
+  //
+  //               cw(i1)      v3     ccw(i2)
+  //                 *---------*---------*
+  //                / \       / \       / \
+  //               /   \  f1 /   \  f2 /   \
+  //              /     \   /  f  \   /     \
+  //             /       \ /     v2\ /       \
+  //            *---------*---------*---------*
+  //             \       / \v1     / \       /
+  //              \     /   \  g  /   \     /
+  //               \   /  g2 \   /  g1 \   /
+  //                \ /       \ /       \ /
+  //                 *---------*---------*
+  //              ccw(j2)      v4      cw(j1)
+  //
+  */
+
+  CGAL_triangulation_expensive_precondition( is_valid() );
+
+  CGAL_triangulation_precondition( dimension() == 2 );
+  CGAL_triangulation_precondition( f1 != Face_handle() && f1->has_vertex(v) );
+  CGAL_triangulation_precondition( g1 != Face_handle() && g1->has_vertex(v) );
+
+  // 1. first we read some information that we will need
+  int i1 = f1->index(v);
+  int j1 = g1->index(v);
+  Face_handle f2 = f1->neighbor( cw(i1) );
+  Face_handle g2 = g1->neighbor( cw(j1) );
+
+  int i2 = f2->index(v);
+  int j2 = g2->index(v);
+
+  Vertex_handle v3 = f1->vertex( ccw(i1) );
+  Vertex_handle v4 = g1->vertex( ccw(j1) );
+
+  // lst is the list of faces adjecent to v stored in
+  // counterclockwise order from g2 to f1) inclusive.
+  // the list idx contains the indices of v in the
+  // faces in lst.
+  std::list<Face_handle> lst;
+  std::list<int>         idx;
+
+  Face_circulator fc(v, g1);
+  Face_handle ff(fc);
+  while ( ff != f2 ) {
+    lst.push_back( ff );
+    idx.push_back( ff->index(v) );
+    fc++;
+    ff = Face_handle(fc);
+  }
+  lst.push_back( ff );
+  idx.push_back( ff->index(v) );
+
+  // 2. we create the new vertices and the two new faces
+  Vertex_handle v1 = v;
+  Vertex_handle v2 = create_vertex();
+  Face_handle f = create_face(v1, v2, v3);
+  Face_handle g = create_face(v2, v1, v4);
+
+  // 3. we update the adjacency information for the new vertices and
+  //    the new faces
+  f->set_neighbor(0, f2);
+  f->set_neighbor(1, f1);
+  f->set_neighbor(2, g);
+  g->set_neighbor(0, g2);
+  g->set_neighbor(1, g1);
+  g->set_neighbor(2, f);
+  v1->set_face(f);
+  v2->set_face(g);
+
+  // 4. update the vertex for the faces f2 through g1 in
+  //    counterclockwise order
+  typename std::list<Face_handle>::iterator fit = lst.begin();
+  typename std::list<int>::iterator         iit = idx.begin();
+  for (; fit != lst.end(); ++fit, ++iit) {
+    (*fit)->set_vertex(*iit, v2);
+  }
+
+  lst.clear();
+  idx.clear();
+
+  // 5. make f and g the new neighbors of f1, f2 and g1, g2
+  //    respectively.
+  f1->set_neighbor(  cw(i1), f );
+  f2->set_neighbor( ccw(i2), f );
+  g1->set_neighbor(  cw(j1), g );
+  g2->set_neighbor( ccw(j2), g );
+
+  CGAL_triangulation_expensive_postcondition( is_valid() );
+
+  // 6. return the new stuff
+  return Fourtuple(v1, v2, f, g);
+}
+
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+join_vertices(Face_handle f, int i, Vertex_handle v)
+{
+  CGAL_triangulation_expensive_precondition( is_valid() );
+  CGAL_triangulation_precondition( f != Face_handle() );
+  CGAL_triangulation_precondition( i >= 0 && i <= 2 );
+
+  // this methods does the "join"-operation and preserves
+  // the vertex v among the two vertices that define the edge (f, i) 
+
+  Vertex_handle v1 = f->vertex( ccw(i) );
+  Vertex_handle v2 = f->vertex( cw(i)  );
+
+  CGAL_triangulation_precondition( v == v1 || v == v2 );
+
+  if ( v == v2 ) {
+    return join_vertices(f->neighbor(i), mirror_index(f,i), v);
+  }
+
+  size_type deg2 = degree(v2);
+
+  CGAL_triangulation_precondition( deg2 >= 3 );
+
+  if ( deg2 == 3 ) {
+    remove_degree_3(v2, f->neighbor(ccw(i)));
+    return v1;
+  }
+  
+  /*
+  // The following drawing corrsponds to the variables
+  // used in this part...
+  // The vertex v1 is returned...
+  //
+  //      itl       i=v3      itr
+  //       *---------*---------*
+  //        \       / \       /
+  //         \  tl /   \  tr /
+  //          \   /  f  \   /
+  //           \ /       \ /
+  //  v1=ccw(i) *---------*  cw(i)=v2
+  //           / \       / \
+  //          /   \  g  /   \
+  //         /  bl \   /  br \
+  //        /       \ /	      \
+  //       *---------*---------*
+  //      ibl       j=v4      ibr
+  //                                                           
+  // The situation after the "join"-operation is as follows:
+  //
+  //                 i
+  //           *-----*-----*
+  //            \    |    /
+  //             \ tl|tr /
+  //              \  |  /
+  //               \ | /
+  //                \|/
+  //                 *  v1
+  //                /|\
+  //               / | \
+  //              /  |	\
+  //             / bl|br \
+  //            /    |	  \
+  //           *-----*-----*
+  //
+  */
+
+  // first we register all the needed info
+  Face_handle g = f->neighbor(i);
+  int j = mirror_index(f,i);
+
+  Face_handle tl = f->neighbor( cw(i)  );
+  Face_handle tr = f->neighbor( ccw(i) );
+
+  int itl = mirror_index(f, cw(i)  );
+  int itr = mirror_index(f, ccw(i) );
+
+  Face_handle bl = g->neighbor( ccw(j) );
+  Face_handle br = g->neighbor( cw(j)  );
+
+  int ibl = mirror_index(g, ccw(j) );
+  int ibr = mirror_index(g, cw(j)  );
+
+  // we need to store the faces adjacent to v2 as well as the
+  // indices of v2 w.r.t. these faces, so that afterwards we can set 
+  // v1 to be the vertex for these faces
+  std::vector<Face_handle> star_faces_of_v2;
+  std::vector<int> star_indices_of_v2;
+  Face_circulator fc_start(v2);
+  Face_circulator fc = fc_start;
+
+  do {
+    Face_handle ff(fc);
+    star_faces_of_v2.push_back(ff);
+    star_indices_of_v2.push_back(ff->index(v2));
+    ++fc;
+  } while ( fc != fc_start );
+
+  CGAL_triangulation_assertion(
+    static_cast<size_type>(star_faces_of_v2.size()) == deg2 );
+
+  // from this point and on we modify the values
+
+  // first set the neighbors
+  set_adjacency(tl, itl, tr, itr);
+  set_adjacency(bl, ibl, br, ibr);
+
+  // make sure that all the faces containing v2 as a vertex, now
+  // contain v1
+  for (unsigned int k = 0; k < star_faces_of_v2.size(); k++) {
+    int id = star_indices_of_v2[k];
+    CGAL_triangulation_assertion( star_faces_of_v2[k]->vertex(id) == v2 );
+    star_faces_of_v2[k]->set_vertex( id, v1 );
+  }
+
+  // then make sure that all the vertices have correct pointers to 
+  // faces
+  Vertex_handle v3 = f->vertex(i);
+  Vertex_handle v4 = g->vertex(j);
+  if ( v3->face() == f )  v3->set_face(tr);
+  if ( v4->face() == g )  v4->set_face(br);
+  if ( v1->face() == f || v1->face() == g ) v1->set_face(tl);
+
+
+#ifndef CGAL_NO_ASSERTIONS
+  for (Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) {
+    int id;
+    CGAL_triangulation_assertion( !fit->has_vertex(v2, id) );
+  }
+#endif
+
+  // memory management
+  star_faces_of_v2.clear();
+  star_indices_of_v2.clear();
+
+  delete_face(f);
+  delete_face(g);
+
+  delete_vertex(v2);
+
+  CGAL_triangulation_expensive_postcondition( is_valid() );
+
+  return v1;
+}
+
+// insert_degree_2 and remove_degree_2 operations
+template <class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+insert_degree_2(Face_handle f, int i)
+{
+  /*
+  // This method basically does the following transformation
+  // The remove_degree_2 method performs the same operation in the
+  // opposite direction
+  //
+  //
+  //                                                *
+  //                 i                             / \
+  //                 *                            /   \
+  //                / \                          /  f  \
+  //               /   \                        / _____	\
+  //              /  f  \                      / /  f1 \ \
+  //             /       \                     |/   v   \|
+  //  v0=ccw(i) *---------* v1=cw(i)  ===>  v0 *----*----* v1
+  //             \       /                     |\   f2  /|
+  //              \  g  /                      \ \_____/ /
+  //               \   /                        \       /
+  //                \ /                          \  g  /
+  //                 *                            \   /
+  //                 j                             \ /
+  //                                                *
+  //
+  */
+
+  Face_handle g = f->neighbor(i);
+  int j = mirror_index(f,i);
+
+  Vertex_handle  v = create_vertex();
+
+  Vertex_handle v0 = f->vertex( ccw(i) );
+  Vertex_handle v1 = f->vertex( cw(i)  );
+
+  Face_handle f_undef;
+
+  Face_handle f1 = create_face(v0, v, v1, f_undef, f, f_undef);
+  Face_handle f2 = create_face(v0, v1, v, f_undef, f_undef, g);
+
+  set_adjacency(f1, 0, f2, 0);
+  set_adjacency(f1, 2, f2, 1);
+
+  f->set_neighbor(i, f1);
+  g->set_neighbor(j, f2);
+
+  v->set_face(f1);
+
+  return v;
+}
+
+template <class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+remove_degree_2(Vertex_handle v)
+{
+  CGAL_precondition( degree(v) == 2 );
+
+  Face_handle f1 = v->face();
+  int i = f1->index(v);
+
+  Face_handle f2 = f1->neighbor( ccw(i) );
+  int j = f2->index(v);
+
+  Face_handle ff1 = f1->neighbor( i );
+  Face_handle ff2 = f2->neighbor( j );
+
+  int id1 = mirror_index(f1,i);
+  int id2 = mirror_index(f2,j);
+
+  set_adjacency(ff1, id1, ff2, id2);
+
+  Vertex_handle v1 = f1->vertex( ccw(i) );
+  //    if ( v1->face() == f1 || v1->face() == f2 ) {
+  v1->set_face(ff1);
+  //    }
+
+  Vertex_handle v2 = f1->vertex( cw(i) );
+  //    if ( v2->face() == f1 || v2->face() == f2 ) {
+  v2->set_face(ff2);
+  //    }
+
+  delete_face(f1);
+  delete_face(f2);
+
+  delete_vertex(v);
+}
+
+// CHECKING
+template <  class Vb, class Fb>
+bool
+Triangulation_data_structure_2<Vb,Fb>::
+is_valid(bool verbose, int level) const
+{
+  if(number_of_vertices() == 0){ 
+    return (dimension() == -2);
+  }
+
+      
+  bool result = (dimension()>= -1);
+  CGAL_triangulation_assertion(result);
+
+  //count and test the validity of the faces (for positive dimensions)
+  Face_iterator ib = face_iterator_base_begin(); 
+  Face_iterator ib_end = face_iterator_base_end();
+  size_type count_stored_faces =0;
+  for ( ; ib != ib_end ; ++ib){
+    count_stored_faces += 1;
+    if (dimension()>= 0) {
+      result = result && ib->is_valid(verbose,level);
+      CGAL_triangulation_assertion(result);
+    }
+  }
+  
+  result = result && (count_stored_faces == number_of_full_dim_faces());
+  CGAL_triangulation_assertion(
+		 count_stored_faces == number_of_full_dim_faces());
+ 
+  // vertex count
+  size_type vertex_count = 0;
+  for(Vertex_iterator vit = vertices_begin(); vit != vertices_end();
+      ++vit) {
+    CGAL_triangulation_assertion( vit->face() != Face_handle());
+    result = result && vit->is_valid(verbose,level);
+    CGAL_triangulation_assertion( result );
+    ++vertex_count;
+  }
+  result = result && (number_of_vertices() == vertex_count);
+  CGAL_triangulation_assertion( number_of_vertices() == vertex_count );
+    
+  //edge count
+  size_type edge_count = 0;
+  for(Edge_iterator eit = edges_begin(); eit != edges_end(); ++eit) { 
+    ++edge_count;
+  }
+
+  // face count
+  size_type face_count = 0;
+  for(Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) {
+    ++face_count;
+  }
+        
+  switch(dimension()) {
+  case -1: 
+    result = result && vertex_count == 1 && face_count == 0
+      && edge_count == 0;
+    CGAL_triangulation_assertion(result);
+    break;
+  case 0:
+    result = result && vertex_count == 2 && face_count == 0
+      && edge_count == 0;
+    CGAL_triangulation_assertion(result);
+    break;
+  case 1:
+    result = result &&  edge_count == vertex_count;
+    CGAL_triangulation_assertion(result);
+    result = result &&  face_count == 0;
+    CGAL_triangulation_assertion(result);
+    break;
+  case 2:
+    result = result &&  edge_count == 3*face_count/2 ;
+    CGAL_triangulation_assertion(edge_count == 3*face_count/2);
+    break;
+  default:
+    result = false;
+    CGAL_triangulation_assertion(result);
+  }
+  return result;
+}
+
+template <class Vb, class Fb>
+template <class TDS_src,class ConvertVertex,class ConvertFace>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+copy_tds(const TDS_src& tds_src,
+        typename TDS_src::Vertex_handle vert,
+        const ConvertVertex& convert_vertex,
+        const ConvertFace& convert_face)
+{
+  if (vert != typename TDS_src::Vertex_handle()) 
+    CGAL_triangulation_precondition( tds_src.is_vertex(vert));
+
+  clear();
+  size_type n = tds_src.number_of_vertices();
+  set_dimension(tds_src.dimension());
+
+  // Number of pointers to cell/vertex to copy per cell.
+  int dim = (std::max)(1, dimension() + 1);
+ 
+  if(n == 0) {return Vertex_handle();}
+  
+  //initializes maps
+  Unique_hash_map<typename TDS_src::Vertex_handle,Vertex_handle> vmap;
+  Unique_hash_map<typename TDS_src::Face_handle,Face_handle> fmap;
+
+  // create vertices
+  typename TDS_src::Vertex_iterator vit1 = tds_src.vertices_begin();
+  for( ; vit1 != tds_src.vertices_end(); ++vit1) {
+    Vertex_handle vh = create_vertex( convert_vertex(*vit1) );
+    vmap[vit1] = vh;
+    convert_vertex(*vit1, *vh);
+  }
+
+  //create faces 
+  typename TDS_src::Face_iterator fit1 = tds_src.faces().begin();
+  for( ; fit1 != tds_src.faces_end(); ++fit1) {
+    Face_handle fh = create_face( convert_face(*fit1) );
+    fmap[fit1] = fh;
+    convert_face(*fit1, *fh);
+  }
+
+  //link vertices to a cell 
+  vit1 = tds_src.vertices_begin();
+  for ( ; vit1 != tds_src.vertices_end(); vit1++) {
+    vmap[vit1]->set_face(fmap[vit1->face()]);
+  }
+
+  //update vertices and neighbor pointers
+  fit1 = tds_src.faces().begin();
+  for ( ; fit1 != tds_src.faces_end(); ++fit1) {
+      for (int j = 0; j < dim ; ++j) {
+	fmap[fit1]->set_vertex(j, vmap[fit1->vertex(j)] );
+	fmap[fit1]->set_neighbor(j, fmap[fit1->neighbor(j)]);
+      }
+    }
+   
+  // remove the post condition because it is false when copying the
+  // TDS of a regular triangulation because of hidden vertices
+  // CGAL_triangulation_postcondition( is_valid() );
+  return (vert == typename TDS_src::Vertex_handle())  ? Vertex_handle() : vmap[vert];
+}
+
+//utilities for copy_tds
+namespace internal { namespace TDS_2{
+  template <class Vertex_src,class Vertex_tgt>
+  struct Default_vertex_converter
+  {
+    Vertex_tgt operator()(const Vertex_src& src) const {
+      return Vertex_src( src.point() );
+    }
+    
+    void operator()(const Vertex_src&,Vertex_tgt&) const {}
+  };
+
+  template <class Face_src,class Face_tgt>
+  struct Default_face_converter
+  {
+    Face_tgt operator()(const Face_src& /*src*/) const {
+      return Face_tgt();
+    } 
+    
+    void operator()(const Face_src&,Face_tgt&) const {}
+  };
+  
+  template <class Vertex>
+  struct Default_vertex_converter<Vertex,Vertex>
+  {
+    const Vertex& operator()(const Vertex& src) const {
+      return src;
+    }
+    
+    void operator()(const Vertex&,Vertex&) const {}
+  };
+  
+  template <class Face>
+  struct Default_face_converter<Face,Face>{
+    const Face& operator()(const Face& src) const {
+      return src;
+    } 
+    
+    void operator()(const Face&,Face&) const {}
+  };
+} } //namespace internal::TDS_2
+
+template <  class Vb, class Fb>
+template < class TDS_src>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+copy_tds(const TDS_src &src, typename TDS_src::Vertex_handle vh)
+  // return the vertex corresponding to vh in the new tds
+{
+  if (this == &src) return Vertex_handle();
+  internal::TDS_2::Default_vertex_converter<typename TDS_src::Vertex,Vertex> setv;
+  internal::TDS_2::Default_face_converter<typename TDS_src::Face,Face>  setf;
+  return copy_tds(src,vh,setv,setf);
+}
+
+template < class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+file_output( std::ostream& os, Vertex_handle v, bool skip_first) const
+{
+  // ouput to a file
+  // if non NULL, v is the vertex to be output first
+  // if skip_first is true, the point in the first vertex is not output
+  // (it may be for instance the infinite vertex of the triangulation)
+  
+  size_type n = number_of_vertices();
+  size_type m = number_of_full_dim_faces();
+  if(is_ascii(os))  os << n << ' ' << m << ' ' << dimension() << std::endl;
+  else     os << n << m << dimension();
+  if (n==0) return;
+
+  Unique_hash_map<Vertex_handle,int> V;
+  Unique_hash_map<Face_handle,int> F;
+
+
+  // first vertex 
+  int inum = 0;
+  if ( v != Vertex_handle()) {
+    V[v] = inum++;
+    if( ! skip_first){
+      // os << v->point();
+      os << *v ;
+    if(is_ascii(os))  os << std::endl;
+    }
+  }
+  
+  // other vertices
+  for( Vertex_iterator vit= vertices_begin(); vit != vertices_end() ; ++vit) {
+    if ( v != vit ) {
+	V[vit] = inum++;
+	// os << vit->point();
+	os << *vit;
+	if(is_ascii(os)) os << "\n";
+    }
+  }
+  if(is_ascii(os)) os << "\n";
+
+  // vertices of the faces
+  inum = 0;
+  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
+  for( Face_iterator ib = face_iterator_base_begin();
+       ib != face_iterator_base_end(); ++ib) {
+    F[ib] = inum++;
+    for(int j = 0; j < dim ; ++j) {
+      os << V[ib->vertex(j)];
+      if(is_ascii(os)) os << " ";
+    }
+    os << *ib ;
+    if(is_ascii(os)) os << "\n";
+  }
+  if(is_ascii(os)) os << "\n";
+    
+  // neighbor pointers of the  faces
+  for( Face_iterator it = face_iterator_base_begin();
+       it != face_iterator_base_end(); ++it) {
+    for(int j = 0; j < dimension()+1; ++j){
+      os << F[it->neighbor(j)];
+      if(is_ascii(os))  os << " ";
+    }
+    if(is_ascii(os)) os << "\n";
+  }
+
+  return ;
+}
+
+
+template < class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+file_input( std::istream& is, bool skip_first)
+{
+  //input from file
+  //return a pointer to the first input vertex
+  // if skip_first is true, a first vertex is added (infinite_vertex)
+  //set this  first vertex as infinite_Vertex
+  if(number_of_vertices() != 0)    clear();
+  
+  size_type n, m;
+  int d;
+  is >> n >> m >> d;
+
+  if (n==0){ return Vertex_handle();}
+
+  set_dimension(d);
+
+  std::vector<Vertex_handle > V(n);
+  std::vector<Face_handle> F(m);
+
+  // read vertices
+  size_type i = 0;
+  if(skip_first){
+    V[0] = create_vertex();
+    ++i;
+  }
+  for( ; i < n; ++i) {
+    V[i] = create_vertex();
+    is >> *(V[i]);
+  }
+  
+  // Creation of the faces
+  int index;
+  int dim = (dimension() == -1 ? 1 :  dimension() + 1);
+  {
+    for(i = 0; i < m; ++i) {
+      F[i] = create_face() ;
+      for(int j = 0; j < dim ; ++j){
+	is >> index;
+	F[i]->set_vertex(j, V[index]);
+	// The face pointer of vertices is set too often,
+	// but otherwise we had to use a further map
+	V[index]->set_face(F[i]);
+      }
+      // read in non combinatorial info of the face
+      is >> *(F[i]) ;
+    }
+  }
+
+  // Setting the neighbor pointers 
+  {
+    for(i = 0; i < m; ++i) {
+      for(int j = 0; j < dimension()+1; ++j){
+	is >> index;
+	F[i]->set_neighbor(j, F[index]);
+      }
+    }
+  }
+  
+  return V[0];
+}
+
+
+template < class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+vrml_output( std::ostream& os, Vertex_handle v, bool skip_infinite) const
+{
+  // ouput to a vrml file style
+  // Point are assumed to be 3d points with a stream oprator <<
+  // if non NULL, v is the vertex to be output first
+  // if skip_inf is true, the point in the first vertex is not output
+  // and the faces incident to v are not output
+  // (it may be for instance the infinite vertex of the terrain)
+  os << "#VRML V2.0 utf8" << std::endl;
+  os << "Shape {" << std::endl;
+  os << "\tgeometry IndexedFaceSet {" << std::endl;
+  os << "\t\tcoord Coordinate {" << std::endl;
+  os << "\t\t\tpoint [" << std::endl;
+
+  Unique_hash_map<Vertex_handle,int> vmap;
+
+  Vertex_iterator vit;
+  Face_iterator fit;
+
+  //first vertex
+  int inum = 0;
+  if ( v != Vertex_handle()) {
+    vmap[v] = inum++;
+    if( ! skip_infinite)  os << "\t\t\t\t" << *v << std::endl;
+  }
+
+  //other vertices
+  for( vit= vertices_begin(); vit != vertices_end() ; ++vit) {
+    if ( v != vit) {
+      vmap[vit] = inum++;
+      os << "\t\t\t\t" << *vit << std::endl;
+    }
+  }
+
+   os << "\t\t\t]" << std::endl;
+   os << "\t\t}" << std::endl;
+   os << "\t\tcoordIndex [" << std::endl;
+
+   // faces
+   for(fit= faces_begin(); fit != faces_end(); ++fit) {
+     if (!skip_infinite || !fit->has_vertex(v)) {
+   	os << "\t\t\t";
+	os << vmap[(*fit).vertex(0)] << ", ";
+	os << vmap[(*fit).vertex(1)] << ", ";
+	os << vmap[(*fit).vertex(2)] << ", ";
+	os << "-1, " << std::endl;  
+     }
+   }
+   os << "\t\t]" << std::endl;
+   os << "\t}" << std::endl;
+   os << "}" << std::endl;
+   return;
+}
+
+template < class Vb, class Fb>
+typename Triangulation_data_structure_2<Vb,Fb>::Vertex_handle
+Triangulation_data_structure_2<Vb,Fb>::
+off_file_input( std::istream& is, bool verbose)
+{
+  // input from an OFF file
+  // assume a dimension 2 triangulation
+  // create an infinite-vertex and  infinite faces with the
+  // boundary edges if any.
+  // return the infinite vertex if created
+  Vertex_handle vinf;
+  File_scanner_OFF scanner(is, verbose);
+  if (! is) {
+    if (scanner.verbose()) {
+         std::cerr << " " << std::endl;
+	 std::cerr << "TDS::off_file_input" << std::endl;
+	 std::cerr << " input error: file format is not OFF." << std::endl;
+    }
+    return vinf;
+  }
+
+  if(number_of_vertices() != 0)    clear();
+  int dim = 2;
+  set_dimension(dim);
+
+  std::vector<Vertex_handle > vvh(scanner.size_of_vertices());
+  std::map<Vh_pair, Edge> edge_map;
+  typedef typename Vb::Point   Point;
+
+  // read vertices
+  std::size_t i;
+  for ( i = 0; i < scanner.size_of_vertices(); i++) {
+    Point p;
+    file_scan_vertex( scanner, p);
+    vvh[i] = create_vertex();
+    vvh[i]->set_point(p);
+    scanner.skip_to_next_vertex( i);
+  }
+  if ( ! is ) {
+    is.clear( std::ios::badbit);
+    return vinf;
+  }
+  //vinf = vvh[0];
+
+  // create the facets
+  for ( i = 0; i < scanner.size_of_facets(); i++) {
+    Face_handle fh = create_face();
+    std::size_t no;
+    scanner.scan_facet( no, i);
+    if( ! is || no != 3) {
+      if ( scanner.verbose()) {
+	std::cerr << " " << std::endl;
+	std::cerr << "TDS::off_file_input" << std::endl;
+	std::cerr << "facet " << i << "does not have  3 vertices." 
+		  << std::endl;
+      }
+      is.clear( std::ios::badbit);
+      return vinf;
+    }
+
+    for ( std::size_t j = 0; j < no; ++j) {
+      std::size_t index;
+      scanner.scan_facet_vertex_index( index, i);
+      fh->set_vertex(j, vvh[index]);
+      vvh[index]->set_face(fh);
+    }
+
+    for (std::size_t ih  = 0; ih < no; ++ih) {
+	set_adjacency(fh, ih, edge_map);
+    }
+  }
+
+  // deal with  boundaries
+  if ( !edge_map.empty()) {
+    vinf = create_vertex();
+    std::map<Vh_pair, Edge> inf_edge_map;
+   while (!edge_map.empty()) {
+     Face_handle fh = edge_map.begin()->second.first;
+     int ih = edge_map.begin()->second.second;
+     Face_handle fn = create_face( vinf, 
+				   fh->vertex(cw(ih)), 
+				   fh->vertex(ccw(ih)));
+     vinf->set_face(fn);
+     set_adjacency(fn, 0, fh, ih);
+     set_adjacency(fn, 1, inf_edge_map);
+     set_adjacency(fn, 2, inf_edge_map);
+     edge_map.erase(edge_map.begin());
+   }
+   CGAL_triangulation_assertion(inf_edge_map.empty());
+  }
+  
+  
+  // coherent orientation
+  reorient_faces();
+  return vinf;
+}
+
+
+template < class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+set_adjacency(Face_handle fh, 
+	      int ih, 
+	      std::map< Vh_pair, Edge>& edge_map)
+{
+  // set adjacency to (fh,ih) using the the map edge_map
+  // or insert (fh,ih) in edge map
+  Vertex_handle vhcw  =  fh->vertex(cw(ih));
+  Vertex_handle vhccw =  fh->vertex(ccw(ih)); 
+  Vh_pair  vhp =  vhcw < vhccw ?  
+                  std::make_pair(vhcw, vhccw) 
+                : std::make_pair(vhccw, vhcw) ;
+  typename std::map<Vh_pair, Edge>::iterator emapit = edge_map.find(vhp);
+  if (emapit == edge_map.end()) {// not found, insert edge
+    edge_map.insert(std::make_pair(vhp, Edge(fh,ih)));
+  }
+  else { //found set adjacency and erase
+    Edge e = emapit->second;
+    set_adjacency( fh,ih, e.first, e.second);
+    edge_map.erase(emapit);
+  } 
+}
+
+
+
+template < class Vb, class Fb>
+void
+Triangulation_data_structure_2<Vb,Fb>::
+reorient_faces()
+{
+  // reorient the faces of a triangulation 
+  // needed for example in off_file_input
+  // because the genus is not known, the number of faces 
+  std::set<Face_handle> oriented_set;
+  std::stack<Face_handle>  st;
+  Face_iterator fit = faces_begin();
+  std::ptrdiff_t nf  = std::distance(faces_begin(),faces_end());
+
+  while (0 != nf) {
+    while ( !oriented_set.insert(fit).second ){
+      ++fit; // find a germ for  non oriented components 
+    }
+    // orient component
+    --nf;
+    st.push(fit);
+    while ( ! st.empty()) {
+      Face_handle fh = st.top();
+      st.pop();
+      for(int ih = 0 ; ih < 3 ; ++ih){
+	Face_handle fn = fh->neighbor(ih);
+	if (oriented_set.insert(fn).second){
+	  int in = fn->index(fh);
+	  if (fn->vertex(cw(in)) != fh->vertex(ccw(ih))) fn->reorient();
+          --nf;
+	  st.push(fn);
+	}
+      }
+    }
+
+  }
+  return;
+}
+	  
+
+template <  class Vb, class Fb>
+std::istream&
+operator>>(std::istream& is,  
+	   Triangulation_data_structure_2<Vb,Fb>& tds) 
+{
+  tds.file_input(is);
+  return is;
+}
+
+
+template <  class Vb, class Fb>
+std::ostream&
+operator<<(std::ostream& os, 
+	   const Triangulation_data_structure_2<Vb,Fb>  &tds) 
+{
+   tds.file_output(os);
+   return os;
+}
+
+
+} //namespace CGAL 
+
+#endif //CGAL_TRIANGULATION_DATA_STRUCTURE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_3.h
new file mode 100644
index 0000000..fbdd537
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_3.h
@@ -0,0 +1,3971 @@
+// Copyright (c) 1999-2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion
+
+// combinatorial triangulation of the boundary of a polytope
+// of dimension d in dimension d+1
+// for -1 <= d <= 3
+
+#ifndef CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
+#define CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
+
+#include <CGAL/basic.h>
+
+#include <utility>
+#include <map>
+#include <set>
+#include <vector>
+#include <stack>
+
+#include <boost/unordered_set.hpp>
+#include <CGAL/utility.h>
+#include <CGAL/iterator.h>
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/Triangulation_utils_3.h>
+
+#include <CGAL/Concurrent_compact_container.h>
+#include <CGAL/Compact_container.h>
+
+#include <CGAL/Triangulation_ds_cell_base_3.h>
+#include <CGAL/Triangulation_ds_vertex_base_3.h>
+#include <CGAL/Triangulation_simplex_3.h>
+
+#include <CGAL/internal/Triangulation_ds_iterators_3.h>
+#include <CGAL/internal/Triangulation_ds_circulators_3.h>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#  include <tbb/scalable_allocator.h>
+#endif
+
+#include <boost/foreach.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace CGAL {
+
+// TODO : noms : Vb != Vertex_base : clarifier.
+
+template < class Vb = Triangulation_ds_vertex_base_3<>,
+           class Cb = Triangulation_ds_cell_base_3<>,
+           class Concurrency_tag_ = Sequential_tag
+>
+class Triangulation_data_structure_3
+  : public Triangulation_utils_3
+{
+  typedef Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_> Tds;
+
+public:
+
+  typedef Concurrency_tag_            Concurrency_tag;
+
+  // Tools to change the Vertex and Cell types of the TDS.
+  template < typename Vb2 >
+  struct Rebind_vertex {
+    typedef Triangulation_data_structure_3<Vb2, Cb, Concurrency_tag> Other;
+  };
+
+  template < typename Cb2 >
+  struct Rebind_cell {
+    typedef Triangulation_data_structure_3<Vb, Cb2, Concurrency_tag> Other;
+  };
+
+  // Put this TDS inside the Vertex and Cell types.
+  typedef typename Vb::template Rebind_TDS<Tds>::Other  Vertex;
+  typedef typename Cb::template Rebind_TDS<Tds>::Other  Cell;
+
+  class Cell_data {
+    unsigned char conflict_state;
+  public:
+    Cell_data() : conflict_state(0) {}
+
+    void clear()            { conflict_state = 0; }
+    void mark_in_conflict() { conflict_state = 1; }
+    void mark_on_boundary() { conflict_state = 2; }
+    void mark_processed()   { conflict_state = 1; }
+
+    bool is_clear()       const { return conflict_state == 0; }
+    bool is_in_conflict() const { return conflict_state == 1; }
+    bool is_on_boundary() const { return conflict_state == 2; }
+    bool processed() const { return conflict_state == 1; }
+  };
+
+private:
+
+  friend class internal::Triangulation_ds_facet_iterator_3<Tds>;
+  friend class internal::Triangulation_ds_edge_iterator_3<Tds>;
+
+  friend class internal::Triangulation_ds_cell_circulator_3<Tds>;
+  friend class internal::Triangulation_ds_facet_circulator_3<Tds>;
+
+public:
+    
+  // Cells
+  // N.B.: Concurrent_compact_container requires TBB
+#ifdef CGAL_LINKED_WITH_TBB
+  typedef typename boost::mpl::if_c
+  <
+    boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
+    Concurrent_compact_container<Cell, tbb::scalable_allocator<Cell> >,
+    Compact_container<Cell>
+  >::type                                                Cell_range;
+
+# else
+  typedef Compact_container<Cell>                        Cell_range;
+#endif
+
+  // Vertices
+  // N.B.: Concurrent_compact_container requires TBB
+#ifdef CGAL_LINKED_WITH_TBB
+  typedef typename boost::mpl::if_c
+  <
+    boost::is_convertible<Concurrency_tag, Parallel_tag>::value,
+    Concurrent_compact_container<Vertex, tbb::scalable_allocator<Vertex> >,
+    Compact_container<Vertex>
+  >::type                                                Vertex_range;
+
+# else
+  typedef Compact_container<Vertex>                      Vertex_range;
+#endif
+
+  
+  typedef typename Cell_range::size_type       size_type;
+  typedef typename Cell_range::difference_type difference_type;
+
+  typedef typename Cell_range::iterator        Cell_iterator;
+  typedef typename Vertex_range::iterator      Vertex_iterator;
+
+  typedef internal::Triangulation_ds_facet_iterator_3<Tds>   Facet_iterator;
+  typedef internal::Triangulation_ds_edge_iterator_3<Tds>    Edge_iterator;
+
+  typedef internal::Triangulation_ds_cell_circulator_3<Tds>  Cell_circulator;
+  typedef internal::Triangulation_ds_facet_circulator_3<Tds> Facet_circulator;
+
+//private: // In 2D only :
+  typedef internal::Triangulation_ds_face_circulator_3<Tds>  Face_circulator;
+
+  typedef Vertex_iterator                          Vertex_handle;
+  typedef Cell_iterator                            Cell_handle;
+
+  typedef std::pair<Cell_handle, int>              Facet;
+  typedef Triple<Cell_handle, int, int>            Edge;
+
+  typedef Triangulation_simplex_3<Tds>             Simplex;
+//#ifndef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
+  //internally used for create_star_3 (faster than a tuple)
+  struct iAdjacency_info{
+    int v1;
+    Cell_handle v2;
+    int v3;
+    Cell_handle v4;
+    int v5;
+    int v6;
+    iAdjacency_info(){}
+    iAdjacency_info(int a1,Cell_handle a2,int a3,Cell_handle a4,int a5 ,int a6):
+      v1(a1),v2(a2),v3(a3),v4(a4),v5(a5),v6(a6) {}
+    void update_variables(int& a1,Cell_handle& a2,int& a3,Cell_handle& a4,int& a5 ,int& a6)
+    {
+      a1=v1;
+      a2=v2;
+      a3=v3;
+      a4=v4;
+      a5=v5;
+      a6=v6;
+    }
+  };
+//#endif  
+ 
+
+public:
+  Triangulation_data_structure_3()
+    : _dimension(-2)
+  {}
+
+  Triangulation_data_structure_3(const Tds & tds)
+  {
+    copy_tds(tds);
+  }
+
+  Tds & operator= (const Tds & tds)
+  {
+    if (&tds != this) {
+      Tds tmp(tds);
+      swap(tmp);
+    }
+    return *this;
+  }
+
+  size_type number_of_vertices() const { return vertices().size(); }
+
+  int dimension() const {return _dimension;}
+
+  size_type number_of_cells() const
+    {
+      if ( dimension() < 3 ) return 0;
+      return cells().size();
+    }
+
+  size_type number_of_facets() const
+    {
+      if ( dimension() < 2 ) return 0;
+      return std::distance(facets_begin(), facets_end());
+    }
+
+  size_type number_of_edges() const
+    {
+      if ( dimension() < 1 ) return 0;
+      return std::distance(edges_begin(), edges_end());
+    }
+
+  // USEFUL CONSTANT TIME FUNCTIONS
+
+  // SETTING
+
+  void set_dimension(int n) { _dimension = n; }
+
+  Vertex_handle create_vertex(const Vertex &v)
+  {
+      return vertices().insert(v);
+  }
+
+  Vertex_handle create_vertex()
+  {
+      return vertices().emplace();
+  }
+
+  Vertex_handle create_vertex(Vertex_handle v)
+  {
+      return create_vertex(*v);
+  }
+
+  Cell_handle create_cell(const Cell &c)
+    {
+      return cells().insert(c);
+    }
+
+  Cell_handle create_cell()
+    {
+      return cells().emplace();
+    }
+
+  Cell_handle create_cell(Cell_handle c)
+    {
+      return create_cell(*c);
+    }
+
+  Cell_handle create_cell(Vertex_handle v0, Vertex_handle v1,
+                          Vertex_handle v2, Vertex_handle v3)
+    {
+      return cells().emplace(v0, v1, v2, v3);
+    }
+
+  Cell_handle create_cell(Vertex_handle v0, Vertex_handle v1,
+                          Vertex_handle v2, Vertex_handle v3,
+                          Cell_handle n0, Cell_handle n1,
+                          Cell_handle n2, Cell_handle n3)
+    {
+      return cells().emplace(v0, v1, v2, v3, n0, n1, n2, n3);
+    }
+
+  Cell_handle create_face()
+    {
+      CGAL_triangulation_precondition(dimension()<3);
+      return create_cell();
+    }
+
+  Cell_handle create_face(Vertex_handle v0, Vertex_handle v1,
+                          Vertex_handle v2)
+    {
+      CGAL_triangulation_precondition(dimension()<3);
+      return cells().emplace(v0, v1, v2, Vertex_handle());
+    }
+
+  // The following functions come from TDS_2.
+  Cell_handle create_face(Cell_handle f0, int i0,
+                          Cell_handle f1, int i1,
+                          Cell_handle f2, int i2)
+    {
+      CGAL_triangulation_precondition(dimension() <= 2);
+      Cell_handle newf = create_face(f0->vertex(cw(i0)),
+                                     f1->vertex(cw(i1)),
+                                     f2->vertex(cw(i2)));
+      set_adjacency(newf, 2, f0, i0);
+      set_adjacency(newf, 0, f1, i1);
+      set_adjacency(newf, 1, f2, i2);
+      return newf;
+    }
+
+  Cell_handle create_face(Cell_handle f0, int i0,
+                          Cell_handle f1, int i1)
+    {
+      CGAL_triangulation_precondition(dimension() <= 2);
+      Cell_handle newf = create_face(f0->vertex(cw(i0)),
+                                     f1->vertex(cw(i1)),
+                                     f1->vertex(ccw(i1)));
+      set_adjacency(newf, 2, f0, i0);
+      set_adjacency(newf, 0, f1, i1);
+      return newf;
+    }
+
+  Cell_handle create_face(Cell_handle f, int i, Vertex_handle v)
+    {
+      CGAL_triangulation_precondition(dimension() <= 2);
+      Cell_handle newf = create_face(f->vertex(cw(i)),
+                                     f->vertex(ccw(i)),
+                                     v);
+      set_adjacency(newf, 2, f, i);
+      return newf;
+    }
+
+  // not documented
+  void read_cells(std::istream& is, std::map< std::size_t, Vertex_handle > &V,
+                  std::size_t & m, std::map< std::size_t, Cell_handle > &C );
+  // not documented
+  void print_cells(std::ostream& os,
+                   const Unique_hash_map<Vertex_handle, std::size_t> &V ) const;
+
+  // ACCESS FUNCTIONS
+
+  void delete_vertex( Vertex_handle v )
+  {
+      CGAL_triangulation_expensive_precondition( is_vertex(v) );
+      vertices().erase(v);
+  }
+
+  void delete_cell( Cell_handle c )
+  {
+      CGAL_triangulation_expensive_precondition( is_simplex(c) );
+      cells().erase(c);
+  }
+
+  template <class InputIterator>
+  void delete_vertices(InputIterator begin, InputIterator end)
+  {
+      for(; begin != end; ++begin)
+          delete_vertex(*begin);
+  }
+
+  template <class InputIterator>
+  void delete_cells(InputIterator begin, InputIterator end)
+  {
+      for(; begin != end; ++begin)
+          delete_cell(*begin);
+  }
+
+  // QUERIES
+
+  bool is_simplex(Cell_handle c) const; // undocumented for now
+  bool is_vertex(Vertex_handle v) const;
+  bool is_edge(Cell_handle c, int i, int j) const;
+  bool is_edge(Vertex_handle u, Vertex_handle v, Cell_handle & c,
+               int & i, int & j) const;
+  bool is_edge(Vertex_handle u, Vertex_handle v) const;
+  bool is_facet(Cell_handle c, int i) const;
+  bool is_facet(Vertex_handle u, Vertex_handle v,
+                Vertex_handle w,
+                Cell_handle & c, int & i, int & j, int & k) const;
+  bool is_cell(Cell_handle c) const;
+  bool is_cell(Vertex_handle u, Vertex_handle v,
+               Vertex_handle w, Vertex_handle t,
+               Cell_handle & c, int & i, int & j, int & k, int & l) const;
+  bool is_cell(Vertex_handle u, Vertex_handle v,
+               Vertex_handle w, Vertex_handle t) const;
+
+  bool has_vertex(const Facet & f, Vertex_handle v, int & j) const;
+  bool has_vertex(Cell_handle c, int i,
+                  Vertex_handle v, int & j) const;
+  bool has_vertex(const Facet & f, Vertex_handle v) const;
+  bool has_vertex(Cell_handle c, int i, Vertex_handle v) const;
+
+  bool are_equal(Cell_handle c, int i,
+                 Cell_handle n, int j) const;
+  bool are_equal(const Facet & f, const Facet & g) const;
+  bool are_equal(const Facet & f, Cell_handle n, int j) const;
+
+  // MODIFY
+
+  bool flip(Cell_handle c, int i);
+  bool flip(const Facet &f)
+  { return flip( f.first, f.second); }
+
+  void flip_flippable(Cell_handle c, int i);
+  void flip_flippable(const Facet &f)
+  { flip_flippable( f.first, f.second ); }
+
+  bool flip(Cell_handle c, int i, int j);
+  bool flip(const Edge &e)
+  { return flip( e.first, e.second, e.third ); }
+
+  void flip_flippable(Cell_handle c, int i, int j);
+  void flip_flippable(const Edge &e)
+  { flip_flippable( e.first, e.second, e.third ); }
+
+private:
+  // common to flip and flip_flippable
+  void flip_really(Cell_handle c, int i, Cell_handle n, int in);
+  void flip_really(Cell_handle c, int i, int j,
+                   Cell_handle c1, Vertex_handle v1,
+                   int i1, int j1, int next1,
+                   Cell_handle c2, Vertex_handle v2,
+                   int i2, int j2, int next2,
+                   Vertex_handle v3);
+
+  #ifdef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
+  Cell_handle create_star_3(Vertex_handle v, Cell_handle c,
+                            int li, int prev_ind2 = -1);
+  #else
+  Cell_handle recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2,int depth);
+  Cell_handle non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2);
+
+  Cell_handle create_star_3(Vertex_handle v, Cell_handle c,
+                            int li, int prev_ind2 = -1)
+  {
+    return recursive_create_star_3(v,c,li,prev_ind2,0);
+  }
+  #endif
+
+  Cell_handle create_star_2(Vertex_handle v,
+                            Cell_handle c, int li);
+
+public:
+
+  // Internal function : assumes the conflict cells are marked.
+  template <class CellIt>
+  Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end,
+                                Cell_handle begin, int i,
+                                Vertex_handle newv)
+  {
+      CGAL_triangulation_precondition(begin != Cell_handle());
+      // if begin == NULL (default arg), we could compute one by walking in
+      // CellIt.  At the moment, the functionality is not available, you have
+      // to specify a starting facet.
+
+      Cell_handle cnew;
+      if (dimension() == 3)
+          cnew = create_star_3(newv, begin, i);
+      else
+          cnew = create_star_2(newv, begin, i);
+
+      newv->set_cell(cnew);
+      delete_cells(cell_begin, cell_end);
+      return newv;
+  }
+
+  // Internal function : assumes the conflict cells are marked.
+  template <class CellIt>
+  Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end,
+                                Cell_handle begin, int i)
+  {
+      return _insert_in_hole(cell_begin, cell_end, begin, i, create_vertex());
+  }
+
+  // Mark the cells in conflict, then calls the internal function.
+  template <class CellIt>
+  Vertex_handle insert_in_hole(CellIt cell_begin, CellIt cell_end,
+                               Cell_handle begin, int i,
+                               Vertex_handle newv)
+  {
+      for (CellIt cit = cell_begin; cit != cell_end; ++cit)
+          (*cit)->tds_data().mark_in_conflict();
+
+      return _insert_in_hole(cell_begin, cell_end, begin, i, newv);
+  }
+
+  // Mark the cells in conflict, then calls the internal function.
+  template <class CellIt>
+  Vertex_handle insert_in_hole(CellIt cell_begin, CellIt cell_end,
+                               Cell_handle begin, int i)
+  {
+      return insert_in_hole(cell_begin, cell_end, begin, i, create_vertex());
+  }
+
+  //INSERTION
+  
+  // Create a finite cell with v1, v2, v3 and v4
+  // Precondition: v1, v2, v3 and v4 MUST BE positively oriented
+  Vertex_handle insert_first_finite_cell(
+    Vertex_handle &v1, Vertex_handle &v2, Vertex_handle &v3, Vertex_handle &v4,
+    Vertex_handle v_infinite = Vertex_handle());
+
+  Vertex_handle insert_in_cell(Cell_handle c);
+
+  Vertex_handle insert_in_facet(const Facet & f)
+    { return insert_in_facet(f.first, f.second); }
+
+  Vertex_handle insert_in_facet(Cell_handle c, int i);
+
+  Vertex_handle insert_in_edge(const Edge & e)
+    { return insert_in_edge(e.first, e.second, e.third); }
+
+  Vertex_handle insert_in_edge(Cell_handle c, int i, int j);
+
+  Vertex_handle insert_increase_dimension(Vertex_handle star =Vertex_handle());
+
+  // REMOVAL
+
+private:
+  Cell_handle remove_degree_4(Vertex_handle v);
+  Cell_handle remove_degree_3(Vertex_handle v);
+  Cell_handle remove_degree_2(Vertex_handle v);
+public:
+  Cell_handle remove_from_maximal_dimension_simplex(Vertex_handle v);
+  void remove_decrease_dimension(Vertex_handle v)
+  {
+      remove_decrease_dimension (v, v);
+  }
+  void remove_decrease_dimension(Vertex_handle v, Vertex_handle w);
+  void decrease_dimension(Cell_handle f, int i);
+
+  // Change orientation of the whole TDS.
+  void reorient()
+  {
+      CGAL_triangulation_precondition(dimension() >= 1);
+      for (Cell_iterator i = cells().begin();
+              i != cells().end(); ++i)
+          change_orientation(i);
+  }
+
+  // ITERATOR METHODS
+
+  Cell_iterator cells_begin() const
+  {
+    if ( dimension() < 3 )
+        return cells_end();
+    return cells().begin();
+  }
+
+  Cell_iterator cells_end() const
+  {
+    return cells().end();
+  }
+
+  Cell_iterator raw_cells_begin() const
+  {
+    return cells().begin();
+  }
+
+  Cell_iterator raw_cells_end() const
+  {
+    return cells().end();
+  }
+
+  Facet_iterator facets_begin() const
+  {
+    if ( dimension() < 2 )
+        return facets_end();
+    return Facet_iterator(this);
+  }
+
+  Facet_iterator facets_end() const
+  {
+    return Facet_iterator(this, 1);
+  }
+
+  Edge_iterator edges_begin() const
+  {
+    if ( dimension() < 1 )
+        return edges_end();
+    return Edge_iterator(this);
+  }
+
+  Edge_iterator edges_end() const
+  {
+    return Edge_iterator(this,1);
+  }
+
+  Vertex_iterator vertices_begin() const
+  {
+    return vertices().begin();
+  }
+
+  Vertex_iterator vertices_end() const
+  {
+    return vertices().end();
+  }
+
+  // CIRCULATOR METHODS
+
+  // cells around an edge
+  Cell_circulator incident_cells(const Edge & e) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Cell_circulator(e);
+  }
+  Cell_circulator incident_cells(Cell_handle ce, int i, int j) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Cell_circulator(ce, i, j);
+  }
+
+  Cell_circulator incident_cells(const Edge &e, Cell_handle start) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Cell_circulator(e, start);
+  }
+  Cell_circulator incident_cells(Cell_handle ce, int i, int j,
+                                 Cell_handle start) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Cell_circulator(ce, i, j, start);
+  }
+
+  //facets around an edge
+  Facet_circulator incident_facets(const Edge & e) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(e);
+  }
+  Facet_circulator incident_facets(Cell_handle ce, int i, int j) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(ce, i, j);
+  }
+  Facet_circulator incident_facets(const Edge & e, const Facet & start) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(e, start);
+  }
+  Facet_circulator incident_facets(Cell_handle ce, int i, int j,
+                                   const Facet & start) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(ce, i, j, start);
+  }
+  Facet_circulator incident_facets(const Edge & e,
+                                   Cell_handle start, int f) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(e, start, f);
+  }
+  Facet_circulator incident_facets(Cell_handle ce, int i, int j,
+                                   Cell_handle start, int f) const
+  {
+    CGAL_triangulation_precondition( dimension() == 3 );
+    return Facet_circulator(ce, i, j, start, f);
+  }
+
+  // 2D : circulates on the faces adjacent to a vertex.
+  Face_circulator incident_faces(Vertex_handle v) const
+  {
+    CGAL_triangulation_precondition( dimension() == 2 );
+    return Face_circulator(v, v->cell());
+  }
+
+  // around a vertex
+private:
+
+  template <class IncidentCellIterator, class IncidentFacetIterator>
+  std::pair<IncidentCellIterator, IncidentFacetIterator>
+  incident_cells_3(Vertex_handle v, Cell_handle d,
+                                 std::pair<IncidentCellIterator,
+                                 IncidentFacetIterator> it) const
+  {
+        CGAL_triangulation_precondition(dimension() == 3);
+        
+        std::stack<Cell_handle> cell_stack;
+        cell_stack.push(d);
+        d->tds_data().mark_in_conflict();
+        *it.first++ = d;
+        
+        do {
+                Cell_handle c = cell_stack.top();
+                cell_stack.pop();
+                
+                for (int i=0; i<4; ++i) {
+                        if (c->vertex(i) == v)
+                                continue;
+                        Cell_handle next = c->neighbor(i);
+                        if (c < next)
+                                *it.second++ = Facet(c, i); // Incident facet.
+                        if (! next->tds_data().is_clear())
+                                continue;
+                        cell_stack.push(next);
+                        next->tds_data().mark_in_conflict();
+                        *it.first++ = next;
+                }
+        } while(!cell_stack.empty());
+
+        return it;
+  }
+
+  template <class IncidentFacetIterator>
+  void
+  incident_cells_3_threadsafe(Vertex_handle v, Cell_handle d,
+                              std::vector<Cell_handle> &cells,
+                              IncidentFacetIterator facet_it) const
+  {
+    boost::unordered_set<Cell_handle, Handle_hash_function> found_cells;
+
+    cells.push_back(d);
+    found_cells.insert(d);
+    int head=0;
+    int tail=1;
+    do {
+      Cell_handle c = cells[head];
+
+      for (int i=0; i<4; ++i) {
+        if (c->vertex(i) == v)
+          continue;
+        Cell_handle next = c->neighbor(i);
+        if (c < next)
+          *facet_it++ = Facet(c, i); // Incident facet
+        if (! found_cells.insert(next).second )
+          continue;
+        cells.push_back(next);
+        ++tail;
+      }
+      ++head;
+    } while(head != tail);
+  }
+  
+  void just_incident_cells_3(Vertex_handle v,
+                             std::vector<Cell_handle>& cells) const
+  {
+    CGAL_triangulation_precondition(dimension() == 3);
+
+    Cell_handle d = v->cell();
+    cells.push_back(d);
+    d->tds_data().mark_in_conflict();
+    int head=0;
+    int tail=1;
+    do {
+      Cell_handle c = cells[head];
+
+      for (int i=0; i<4; ++i) {
+        if (c->vertex(i) == v)
+          continue;
+        Cell_handle next = c->neighbor(i);
+        if (! next->tds_data().is_clear())
+          continue;
+        cells.push_back(next);
+        ++tail;
+        next->tds_data().mark_in_conflict();
+      }
+      ++head;
+    } while(head != tail);
+  }
+
+  template <class OutputIterator>
+  void
+  incident_cells_2(Vertex_handle v, Cell_handle,
+                   OutputIterator cells) const
+  {
+      CGAL_triangulation_precondition(dimension() == 2);
+
+      Face_circulator fc = incident_faces(v);
+      Face_circulator done(fc);
+      do {
+        *cells++ = fc;
+        ++fc;
+      } while (fc != done);
+  }
+
+public:
+
+  class False_filter {
+    public:
+    False_filter() {}
+    template<class T>
+    bool operator() (T) {
+      return false;
+    }
+  };
+
+        // Visitor for visit_incident_cells:
+        // outputs the facets
+  template <class OutputIterator, class Filter>
+  class Facet_extractor {
+    OutputIterator output;
+    Filter filter;
+    public:
+    Facet_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
+    output(_output), filter(_filter){}
+    void operator() (Cell_handle) {}
+
+    OutputIterator result() {
+      return output;
+    }
+
+    class Facet_it {
+      OutputIterator& output;
+      Filter& filter;
+      public:
+      Facet_it(OutputIterator& _output, Filter& _filter): output(_output), filter(_filter) {}
+      Facet_it& operator*() {return *this;};
+      Facet_it& operator++() {return *this;};
+      Facet_it operator++(int) {return *this;};
+      template<class T>
+      Facet_it& operator=(const T& e) {
+        if(filter(e))
+          return *this;
+        *output++ = e;
+        return *this;
+      }
+      Facet_it& operator=(const Facet_it& f) {
+        output = f.output;
+        filter = f.filter;
+        return *this;
+      }
+    };
+    Facet_it facet_it() {
+      return Facet_it(output, filter);
+    }
+  };
+
+        // Visitor for visit_incident_cells:
+        // outputs the cells
+  template <class OutputIterator, class Filter>
+  class Cell_extractor {
+    OutputIterator output;
+    Filter filter;
+    public:
+    Cell_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
+    output(_output), filter(_filter) {}
+
+    void operator()(Cell_handle c) {
+      if(filter(c))
+        return;
+      *output++ = c;
+    }
+    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
+    OutputIterator result() {
+      return output;
+    }
+  };
+
+  // Visitor for visit_incident_cells:
+  // WARNING: 2D ONLY
+  // outputs the faces obtained as degenerated cells
+  template <class OutputIterator, class Filter>
+  class DegCell_as_Facet_extractor {
+    OutputIterator output;
+    Filter filter;
+    public:
+    DegCell_as_Facet_extractor(Vertex_handle, OutputIterator _output, const Tds*, Filter _filter):
+    output(_output), filter(_filter) {}
+
+    void operator()(Cell_handle c) {
+      Facet f = Facet(c,3);
+      if(filter(f))
+        return;
+      *output++ = f;
+    }
+    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
+    OutputIterator result() {
+      return output;
+    }
+  };
+
+  template<class Treatment, class OutputIterator, class Filter, bool hasVisited>
+  class Vertex_extractor;
+
+        // Visitor for visit_incident_cells:
+        // outputs the result of Treatment applied to the vertices
+  template<class Treatment, class OutputIterator, class Filter>
+  class Vertex_extractor<Treatment,OutputIterator,Filter,false> {
+    Vertex_handle v;
+
+    boost::unordered_set<Vertex_handle, Handle_hash_function> tmp_vertices;
+
+    Treatment treat;
+    const Tds* t;
+    Filter filter;
+  public:
+    Vertex_extractor(Vertex_handle _v, OutputIterator _output, const Tds* _t, Filter _filter):
+    v(_v), treat(_output), t(_t), filter(_filter) 
+    {
+#if ( BOOST_VERSION >= 105000 )
+      tmp_vertices.reserve(64);
+#endif
+    }
+
+    void operator()(Cell_handle c) {
+      for (int j=0; j<= t->dimension(); ++j) {
+        Vertex_handle w = c->vertex(j);
+        if(filter(w))
+          continue;
+        if (w != v) {
+          if(tmp_vertices.insert(w).second) {
+            treat(c, v, j);
+          }
+
+        }
+      }
+    }
+
+
+    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
+    OutputIterator result() {
+      return treat.result();
+    }
+  };
+
+  template<class Treatment, class OutputIterator, class Filter>
+  class Vertex_extractor<Treatment,OutputIterator,Filter,true> {
+    Vertex_handle v;
+    std::vector<Vertex_handle> tmp_vertices;
+
+    Treatment treat;
+    const Tds* t;
+    Filter filter;
+  public:
+    Vertex_extractor(Vertex_handle _v, OutputIterator _output, const Tds* _t, Filter _filter):
+    v(_v), treat(_output), t(_t), filter(_filter) {
+      tmp_vertices.reserve(64);
+    }
+
+    void operator()(Cell_handle c) {
+      for (int j=0; j<= t->dimension(); ++j) {
+	Vertex_handle w = c->vertex(j);
+	if(filter(w))
+	  continue;
+	if (w != v){
+
+          if(! w->visited_for_vertex_extractor){
+            w->visited_for_vertex_extractor = true;
+            tmp_vertices.push_back(w);
+	    treat(c, v, j);
+          }
+        }
+      }
+    }
+
+    ~Vertex_extractor()
+    {
+      for(std::size_t i=0; i < tmp_vertices.size(); ++i){
+        tmp_vertices[i]->visited_for_vertex_extractor = false;
+      }
+    }
+
+
+    CGAL::Emptyset_iterator facet_it() {return CGAL::Emptyset_iterator();}
+    OutputIterator result() {
+      return treat.result();
+    }
+  };
+
+
+
+  // Treatment for Vertex_extractor:
+  // outputs the vertices
+  template<class OutputIterator>
+  class Vertex_feeder_treatment {
+    OutputIterator output;
+  public:
+    Vertex_feeder_treatment(OutputIterator _output): output(_output) {};
+    void operator()(Cell_handle c, Vertex_handle, int index) {
+      *output++ = c->vertex(index);
+    }
+    OutputIterator result() {
+      return output;
+    }
+  };
+
+  // Treatment for Vertex_extractor:
+  // outputs the edges corresponding to the vertices
+  template<class OutputIterator>
+  class Edge_feeder_treatment {
+    OutputIterator output;
+  public:
+    Edge_feeder_treatment(OutputIterator _output): output(_output) {};
+    void operator()(Cell_handle c, Vertex_handle v, int index) {
+      *output++ = Edge(c, c->index(v), index);
+    }
+    OutputIterator result() {
+      return output;
+    }
+  };
+
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  incident_cells(Vertex_handle v, OutputIterator cells, Filter f = Filter()) const
+  {
+    return visit_incident_cells<Cell_extractor<OutputIterator, Filter>,
+      OutputIterator>(v, cells, f);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_cells(Vertex_handle v, OutputIterator cells) const
+  {
+    return incident_cells<False_filter>(v, cells);
+  }
+
+  // This version only works for vectors and only in 3D
+  void incident_cells_3(Vertex_handle v,
+                        std::vector<Cell_handle>& cells) const
+  {
+    just_incident_cells_3(v, cells);  
+    typename std::vector<Cell_handle>::iterator cit,end;
+    for(cit = cells.begin(), end = cells.end();
+              cit != end;
+              ++cit)
+    {
+      (*cit)->tds_data().clear();
+    }
+  }
+  
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  incident_cells_threadsafe(Vertex_handle v, OutputIterator cells, Filter f = Filter()) const
+  {
+    return visit_incident_cells_threadsafe<Cell_extractor<OutputIterator, Filter>,
+      OutputIterator>(v, cells, f);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_cells_threadsafe(Vertex_handle v, OutputIterator cells) const
+  {
+    return incident_cells_threadsafe<False_filter>(v, cells);
+  }
+
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  incident_facets(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const
+  {
+    CGAL_triangulation_precondition( dimension() > 1 );
+    if(dimension() == 3)
+        return visit_incident_cells<Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
+    else
+        return visit_incident_cells<DegCell_as_Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_facets(Vertex_handle v, OutputIterator facets) const
+  {
+    return incident_facets<False_filter>(v, facets);
+  }
+  
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const
+  {
+    CGAL_triangulation_precondition( dimension() > 1 );
+    if(dimension() == 3)
+        return visit_incident_cells_threadsafe<Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
+    else
+        return visit_incident_cells_threadsafe<DegCell_as_Facet_extractor<OutputIterator, Filter>, OutputIterator>(v, facets, f);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_facets_threadsafe(Vertex_handle v, OutputIterator facets) const
+  {
+    return incident_facets<False_filter>(v, facets);
+  }
+
+  BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_member_visited,Has_visited_for_vertex_extractor,false)
+
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  incident_edges(Vertex_handle v, OutputIterator edges, Filter f = Filter()) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_precondition( dimension() >= 1 );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+    CGAL_triangulation_expensive_precondition( is_valid() );
+
+    if (dimension() == 1) {
+      CGAL_triangulation_assertion( number_of_vertices() >= 3);
+      Cell_handle n0 = v->cell();
+      const int index_v_in_n0 = n0->index(v);
+      CGAL_assume(index_v_in_n0 <= 1);
+      Cell_handle n1 = n0->neighbor(1-index_v_in_n0);
+      const int index_v_in_n1 = n1->index(v);
+      CGAL_assume(index_v_in_n1 <= 1);
+      if(!f(n0->vertex(1-index_v_in_n0))) *edges++ = Edge(n0, n0->index(v), 1-index_v_in_n0);
+      if(!f(n1->vertex(1-index_v_in_n1))) *edges++ = Edge(n1, n1->index(v), 1-index_v_in_n1);
+      return edges;
+    }
+    return visit_incident_cells<Vertex_extractor<Edge_feeder_treatment<OutputIterator>,
+                                                 OutputIterator, Filter, Has_member_visited<Vertex>::value>,
+    OutputIterator>(v, edges, f);
+  }
+
+  template <class OutputIterator>
+  OutputIterator
+  incident_edges(Vertex_handle v, OutputIterator edges) const
+  {
+    return incident_edges<False_filter>(v, edges);
+  }
+
+  template <class Filter, class OutputIterator>
+  OutputIterator
+  adjacent_vertices(Vertex_handle v, OutputIterator vertices, Filter f = Filter()) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_precondition( dimension() >= -1 );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+    CGAL_triangulation_expensive_precondition( is_valid() );
+
+    if (dimension() == -1)
+    return vertices;
+
+    if (dimension() == 0) {
+      Vertex_handle v1 = v->cell()->neighbor(0)->vertex(0);
+      if(!f(v1)) *vertices++ = v1;
+      return vertices;
+    }
+
+    if (dimension() == 1) {
+      CGAL_triangulation_assertion( number_of_vertices() >= 3);
+      Cell_handle n0 = v->cell();
+      const int index_v_in_n0 = n0->index(v);
+      CGAL_assume(index_v_in_n0 <= 1);
+      Cell_handle n1 = n0->neighbor(1-index_v_in_n0);
+      const int index_v_in_n1 = n1->index(v);
+      CGAL_assume(index_v_in_n1 <= 1);
+      Vertex_handle v1 = n0->vertex(1-index_v_in_n0);
+      Vertex_handle v2 = n1->vertex(1-index_v_in_n1);
+      if(!f(v1)) *vertices++ = v1;
+      if(!f(v2)) *vertices++ = v2;
+      return vertices;
+    }
+    return visit_incident_cells<Vertex_extractor<Vertex_feeder_treatment<OutputIterator>,
+    OutputIterator, Filter, Has_member_visited<Vertex>::value>,
+    OutputIterator>(v, vertices, f);
+  }
+
+  // old name - kept for backwards compatibility but not documented
+  template <class OutputIterator>
+  OutputIterator
+  incident_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return adjacent_vertices<False_filter>(v, vertices);
+  }
+
+  // correct name
+  template <class OutputIterator>
+  OutputIterator
+  adjacent_vertices(Vertex_handle v, OutputIterator vertices) const
+  {
+    return adjacent_vertices<False_filter>(v, vertices);
+  }
+
+  template <class Visitor, class OutputIterator, class Filter>
+  OutputIterator
+  visit_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+
+    if ( dimension() < 2 )
+    return output;
+
+    Visitor visit(v, output, this, f);
+
+    std::vector<Cell_handle> tmp_cells;
+    tmp_cells.reserve(64);
+    if ( dimension() == 3 )
+    incident_cells_3(v, v->cell(), std::make_pair(std::back_inserter(tmp_cells), visit.facet_it()));
+    else
+    incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
+
+    typename std::vector<Cell_handle>::iterator cit;
+    for(cit = tmp_cells.begin();
+        cit != tmp_cells.end();
+        ++cit)
+    {
+      (*cit)->tds_data().clear();
+      visit(*cit);
+    } 
+
+    return visit.result();
+  }
+  
+  template <class Visitor, class OutputIterator, class Filter>
+  OutputIterator
+  visit_incident_cells_threadsafe(
+    Vertex_handle v, OutputIterator output, Filter f) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+
+    if ( dimension() < 2 )
+    return output;
+
+    Visitor visit(v, output, this, f);
+
+    std::vector<Cell_handle> tmp_cells;
+    tmp_cells.reserve(64);
+    if ( dimension() == 3 )
+      incident_cells_3_threadsafe(
+        v, v->cell(), tmp_cells, visit.facet_it());
+    else
+      incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
+
+    typename std::vector<Cell_handle>::iterator cit;
+    for(cit = tmp_cells.begin();
+        cit != tmp_cells.end();
+        ++cit)
+    {
+      visit(*cit);
+    } 
+
+    return visit.result();
+  }
+  
+  template <class Visitor, class OutputIterator, class Filter>
+  OutputIterator
+  visit_incident_cells(Vertex_handle v, OutputIterator output, 
+                       std::vector<Cell_handle> &cells, Filter f) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+
+    if ( dimension() < 2 )
+    return output;
+
+    Visitor visit(v, output, this, f);
+
+    if ( dimension() == 3 )
+    incident_cells_3(v, v->cell(), std::make_pair(std::back_inserter(cells), visit.facet_it()));
+    else
+    incident_cells_2(v, v->cell(), std::back_inserter(cells));
+
+    typename std::vector<Cell_handle>::iterator cit;
+    for(cit = cells.begin();
+        cit != cells.end();
+        ++cit)
+    {
+      (*cit)->tds_data().clear();
+      visit(*cit);
+    }
+    return visit.result();
+  }
+
+  template <class Visitor, class OutputIterator, class Filter>
+  OutputIterator
+  visit_just_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+
+    if ( dimension() < 2 )
+    return output;
+
+    Visitor visit(v, output, this, f);
+
+    std::vector<Cell_handle> tmp_cells;
+    tmp_cells.reserve(64);
+
+    if ( dimension() == 3 )
+      just_incident_cells_3(v, tmp_cells);
+    else
+    incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));
+
+    typename std::vector<Cell_handle>::iterator cit;
+    for(cit = tmp_cells.begin();
+        cit != tmp_cells.end();
+        ++cit)
+    {
+      (*cit)->tds_data().clear();
+      visit(*cit);
+    }
+    return visit.result();
+  }
+  
+  // For dimension 3 only
+  template <class VertexFilter, class OutputVertexIterator>
+  OutputVertexIterator
+  adjacent_vertices_and_cells_3(Vertex_handle v, OutputVertexIterator vertices,
+                                std::vector<Cell_handle> &cells,
+                                VertexFilter f = VertexFilter()) const
+  {
+    CGAL_triangulation_precondition( v != Vertex_handle() );
+    CGAL_triangulation_precondition( dimension() == 3 );
+    CGAL_triangulation_expensive_precondition( is_vertex(v) );
+    CGAL_triangulation_expensive_precondition( is_valid() );
+
+    return 
+      visit_incident_cells
+      <
+        Vertex_extractor<Vertex_feeder_treatment<OutputVertexIterator>,
+                         OutputVertexIterator, 
+                         VertexFilter, 
+                         Has_member_visited<Vertex>::value>,
+        OutputVertexIterator
+      >(v, vertices, cells, f);
+  }
+
+  // For dimension 3 only
+  template <class OutputVertexIterator>
+  OutputVertexIterator
+  adjacent_vertices_and_cells_3(Vertex_handle v, OutputVertexIterator vertices,
+                                std::vector<Cell_handle> &cells) const
+  {
+    return adjacent_vertices_and_cells_3<False_filter>(v, vertices, cells);
+  }
+
+  size_type degree(Vertex_handle v) const;
+
+  // CHECKING
+  bool is_valid(bool verbose = false, int level = 0) const;
+  bool is_valid(Vertex_handle v, bool verbose = false, int level = 0) const;
+  bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const;
+
+  // Helping functions
+  template <class TDS_src>
+  Vertex_handle copy_tds(const TDS_src & tds,
+                         typename TDS_src::Vertex_handle vert);
+
+  template <class TDS_src>
+  Vertex_handle copy_tds(const TDS_src & tds)
+  {
+    return copy_tds(tds, typename TDS_src::Vertex_handle());
+  }
+    // returns the new vertex corresponding to vert in the new tds
+
+  template <class TDS_src,class ConvertVertex,class ConvertCell>
+  Vertex_handle copy_tds(const TDS_src&, typename TDS_src::Vertex_handle,const ConvertVertex&,const ConvertCell&);
+
+  
+  void swap(Tds & tds);
+
+  void clear();
+
+  void set_adjacency(Cell_handle c0, int i0,
+                     Cell_handle c1, int i1) const
+  {
+      CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension());
+      CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension());
+      CGAL_triangulation_assertion(c0 != c1);
+      c0->set_neighbor(i0,c1);
+      c1->set_neighbor(i1,c0);
+  }
+
+  int mirror_index(Cell_handle c, int i) const
+  {
+      CGAL_triangulation_precondition ( i>=0 && i<4 );
+      return c->neighbor(i)->index(c);
+  }
+
+  Vertex_handle mirror_vertex(Cell_handle c, int i) const
+  {
+      return c->neighbor(i)->vertex(mirror_index(c, i));
+  }
+
+  Facet mirror_facet(Facet f) const
+  {
+    Cell_handle neighbor_cell = f.first->neighbor(f.second);
+    const int opposite_index = neighbor_cell->index(f.first);
+    return Facet(neighbor_cell, opposite_index);
+  }
+
+  // We need the const_cast<>s because TDS is not const-correct.
+  Cell_range & cells() { return _cells; }
+  Cell_range & cells() const
+  { return const_cast<Tds*>(this)->_cells; }
+
+  Vertex_range & vertices() {return _vertices;}
+  Vertex_range & vertices() const
+  { return const_cast<Tds*>(this)->_vertices; }
+
+private:
+
+  // Change the orientation of the cell by swapping indices 0 and 1.
+  void change_orientation(Cell_handle c) const
+  {
+      Vertex_handle tmp_v = c->vertex(0);
+      c->set_vertex(0, c->vertex(1));
+      c->set_vertex(1, tmp_v);
+      Cell_handle tmp_c = c->neighbor(0);
+      c->set_neighbor(0, c->neighbor(1));
+      c->set_neighbor(1, tmp_c);
+  }
+
+  // in dimension i, number of vertices >= i+2
+  // ( the boundary of a simplex in dimension i+1 has i+2 vertices )
+  int _dimension;
+
+  Cell_range   _cells;
+  Vertex_range _vertices;
+
+  // used by is-valid :
+  bool count_vertices(size_type &i, bool verbose = false, int level = 0) const;
+  // counts AND checks the validity
+  bool count_facets(size_type &i, bool verbose = false, int level = 0) const;
+  // counts but does not check
+  bool count_edges(size_type &i, bool verbose = false, int level = 0) const;
+  // counts but does not check
+  bool count_cells(size_type &i, bool verbose = false, int level = 0) const;
+  // counts AND checks the validity
+};
+
+#ifdef CGAL_TDS_USE_RECURSIVE_CREATE_STAR_3
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2)
+{
+    CGAL_triangulation_precondition( dimension() == 3);
+    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
+    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
+
+    Cell_handle cnew = create_cell(c->vertex(0),
+                                   c->vertex(1),
+                                   c->vertex(2),
+                                   c->vertex(3));
+    cnew->set_vertex(li, v);
+    Cell_handle c_li = c->neighbor(li);
+    set_adjacency(cnew, li, c_li, c_li->index(c));
+
+    // Look for the other neighbors of cnew.
+    for (int ii=0; ii<4; ++ii) {
+      if (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle())
+          continue;
+      cnew->vertex(ii)->set_cell(cnew);
+
+      // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
+      Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
+      Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
+      Cell_handle cur = c;
+      int zz = ii;
+      Cell_handle n = cur->neighbor(zz);
+      // turn around the oriented edge vj1 vj2
+      while ( n->tds_data().is_in_conflict() ) {
+        CGAL_triangulation_assertion( n != c );
+        cur = n;
+        zz = next_around_edge(n->index(vj1), n->index(vj2));
+        n = cur->neighbor(zz);
+      }
+      // Now n is outside region, cur is inside.
+      n->tds_data().clear(); // Reset the flag for boundary cells.
+
+      int jj1 = n->index(vj1);
+      int jj2 = n->index(vj2);
+      Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
+      Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
+      int zzz = nnn->index(vvv);
+      if (nnn == cur) {
+        // Neighbor relation is reciprocal, ie
+        // the cell we are looking for is not yet created.
+        nnn = create_star_3(v, nnn, zz, zzz);
+      }
+
+      set_adjacency(nnn, zzz, cnew, ii);
+    }
+
+    return cnew;
+}
+#else
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+recursive_create_star_3(Vertex_handle v, Cell_handle c, int li,
+                        int prev_ind2, int depth)
+{
+    if ( depth == 100 ) return non_recursive_create_star_3(v,c,li,prev_ind2);
+    CGAL_triangulation_precondition( dimension() == 3);
+    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
+    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
+
+    Cell_handle cnew = create_cell(c->vertex(0),
+                                   c->vertex(1),
+                                   c->vertex(2),
+                                   c->vertex(3));
+    cnew->set_vertex(li, v);
+    Cell_handle c_li = c->neighbor(li);
+    set_adjacency(cnew, li, c_li, c_li->index(c));
+
+    // Look for the other neighbors of cnew.
+    for (int ii=0; ii<4; ++ii) {
+      if (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle())
+          continue;
+      cnew->vertex(ii)->set_cell(cnew);
+
+      // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
+      Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
+      Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
+      Cell_handle cur = c;
+      int zz = ii;
+      Cell_handle n = cur->neighbor(zz);
+      // turn around the oriented edge vj1 vj2
+      while ( n->tds_data().is_in_conflict() ) {
+        CGAL_triangulation_assertion( n != c );
+        cur = n;
+        zz = next_around_edge(n->index(vj1), n->index(vj2));
+        n = cur->neighbor(zz);
+      }
+      // Now n is outside region, cur is inside.
+      n->tds_data().clear(); // Reset the flag for boundary cells.
+
+      int jj1 = n->index(vj1);
+      int jj2 = n->index(vj2);
+      Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
+      Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
+      int zzz = nnn->index(vvv);
+      if (nnn == cur) {
+        // Neighbor relation is reciprocal, ie
+        // the cell we are looking for is not yet created.
+        nnn = recursive_create_star_3(v, nnn, zz, zzz,depth+1);
+      }
+
+      set_adjacency(nnn, zzz, cnew, ii);
+    }
+
+    return cnew;
+}
+
+//We use the class iAdjacency_info instead of a tuple because
+//at the moment we made the change it was faster like this.
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2)
+{
+    CGAL_triangulation_precondition( dimension() == 3);
+    CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
+    CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
+
+    Cell_handle cnew = create_cell(c->vertex(0),
+                                   c->vertex(1),
+                                   c->vertex(2),
+                                   c->vertex(3));
+    cnew->set_vertex(li, v);
+    Cell_handle c_li = c->neighbor(li);
+    set_adjacency(cnew, li, c_li, c_li->index(c));
+    
+    std::stack<iAdjacency_info> adjacency_info_stack;
+  
+    int ii=0;
+    do
+    {
+      // Look for the other neighbors of cnew.
+      if ( ! (ii == prev_ind2 || cnew->neighbor(ii) != Cell_handle()) ){
+        cnew->vertex(ii)->set_cell(cnew);
+
+        // Indices of the vertices of cnew such that ii,vj1,vj2,li positive.
+        Vertex_handle vj1 = c->vertex(next_around_edge(ii, li));
+        Vertex_handle vj2 = c->vertex(next_around_edge(li, ii));
+        Cell_handle cur = c;
+        int zz = ii;
+        Cell_handle n = cur->neighbor(zz);
+        // turn around the oriented edge vj1 vj2
+        while ( n->tds_data().is_in_conflict() ) {
+          CGAL_triangulation_assertion( n != c );
+          cur = n;
+          zz = next_around_edge(n->index(vj1), n->index(vj2));
+          n = cur->neighbor(zz);
+        }
+        // Now n is outside region, cur is inside.
+        n->tds_data().clear(); // Reset the flag for boundary cells.
+
+        int jj1 = n->index(vj1);
+        int jj2 = n->index(vj2);
+        Vertex_handle vvv = n->vertex(next_around_edge(jj1, jj2));
+        Cell_handle nnn = n->neighbor(next_around_edge(jj2, jj1));
+        int zzz = nnn->index(vvv);
+        if (nnn == cur) {
+          // Neighbor relation is reciprocal, ie
+          // the cell we are looking for is not yet created.
+          //re-run the loop
+          adjacency_info_stack.push( iAdjacency_info(zzz,cnew,ii,c,li,prev_ind2) );
+          c=nnn;  li=zz; prev_ind2=zzz; ii=0;
+          //copy-pasted from beginning to avoid if ii==0
+          CGAL_triangulation_precondition( c->tds_data().is_in_conflict() );
+          CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() );
+          cnew = create_cell(c->vertex(0),c->vertex(1),c->vertex(2),c->vertex(3));
+          cnew->set_vertex(li, v);
+          c_li = c->neighbor(li);
+          set_adjacency(cnew, li, c_li, c_li->index(c));          
+          continue;
+        }
+        set_adjacency(nnn, zzz, cnew, ii);
+      }
+      while (++ii==4){
+        if ( adjacency_info_stack.empty() ) return cnew;
+        Cell_handle nnn=cnew; 
+        int zzz;
+        adjacency_info_stack.top().update_variables(zzz,cnew,ii,c,li,prev_ind2);
+        adjacency_info_stack.pop();
+        set_adjacency(nnn, zzz, cnew, ii);
+      }
+    }
+    while (true);
+}
+#endif
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+create_star_2(Vertex_handle v, Cell_handle c, int li )
+{
+  CGAL_triangulation_assertion( dimension() == 2 );
+  Cell_handle cnew;
+
+  // i1 i2 such that v,i1,i2 positive
+  int i1=ccw(li);
+  // traversal of the boundary of region in ccw order to create all
+  // the new facets
+  Cell_handle bound = c;
+  Vertex_handle v1 = c->vertex(i1);
+  int ind = c->neighbor(li)->index(c); // to be able to find the
+                                       // first cell that will be created
+  Cell_handle cur;
+  Cell_handle pnew = Cell_handle();
+  do {
+    cur = bound;
+    // turn around v2 until we reach the boundary of region
+    while ( cur->neighbor(cw(i1))->tds_data().is_in_conflict() ) {
+      // neighbor in conflict
+      cur = cur->neighbor(cw(i1));
+      i1 = cur->index( v1 );
+    }
+    cur->neighbor(cw(i1))->tds_data().clear();
+    // here cur has an edge on the boundary of region
+    cnew = create_face( v, v1, cur->vertex( ccw(i1) ) );
+    set_adjacency(cnew, 0, cur->neighbor(cw(i1)),
+                           cur->neighbor(cw(i1))->index(cur));
+    cnew->set_neighbor(1, Cell_handle());
+    cnew->set_neighbor(2, pnew);
+    // pnew is null at the first iteration
+    v1->set_cell(cnew);
+    //pnew->set_neighbor( cw(pnew->index(v1)), cnew );
+    if (pnew != Cell_handle()) { pnew->set_neighbor( 1, cnew );}
+
+    bound = cur;
+    i1 = ccw(i1);
+    v1 = bound->vertex(i1);
+    pnew = cnew;
+    //} while ( ( bound != c ) || ( li != cw(i1) ) );
+  } while ( v1 != c->vertex(ccw(li)) );
+  // missing neighbors between the first and the last created cells
+  cur = c->neighbor(li)->neighbor(ind); // first created cell
+  set_adjacency(cnew, 1, cur, 2);
+  return cnew;
+}
+
+template <class Vb, class Cb, class Ct>
+std::istream&
+operator>>(std::istream& is, Triangulation_data_structure_3<Vb,Cb,Ct>& tds)
+  // reads :
+  // the dimension
+  // the number of vertices
+  // the number of cells
+  // the cells by the indices of their vertices
+  // the neighbors of each cell by their index in the preceding list of cells
+  // when dimension < 3 : the same with faces of maximal dimension
+{
+  typedef Triangulation_data_structure_3<Vb,Cb,Ct> Tds;
+  typedef typename Tds::Vertex_handle  Vertex_handle;
+  typedef typename Tds::Cell_handle    Cell_handle;
+
+  tds.clear();
+
+  std::size_t n;
+  int d;
+  if(is_ascii(is))
+     is >> d >> n;
+  else {
+    read(is, n);
+    read(is,d);
+  }
+  tds.set_dimension(d);
+
+  if(n == 0)
+    return is;
+
+  std::map<std::size_t , Vertex_handle > V;
+
+  // creation of the vertices
+  for (std::size_t i=0; i < n; i++) {
+    //    is >> p;
+    //    V[i] = tds.create_vertex();
+    //    V[i]->set_point(p);
+    V[i] = tds.create_vertex();
+  }
+
+  std::map< std::size_t, Cell_handle > C;
+  std::size_t m;
+
+  tds.read_cells(is, V, m, C);
+  CGAL_triangulation_assertion( tds.is_valid() );
+  return is;
+}
+
+template <class Vb, class Cb, class Ct>
+std::ostream&
+operator<<(std::ostream& os, const Triangulation_data_structure_3<Vb,Cb,Ct> &tds)
+  // writes :
+  // the dimension
+  // the number of vertices
+  // the number of cells
+  // the cells by the indices of their vertices
+  // the neighbors of each cell by their index in the preceding list of cells
+  // when dimension < 3 : the same with faces of maximal dimension
+{
+  typedef Triangulation_data_structure_3<Vb,Cb,Ct> Tds;
+  typedef typename Tds::size_type               size_type;
+  typedef typename Tds::Vertex_handle           Vertex_handle;
+  typedef typename Tds::Vertex_iterator         Vertex_iterator;
+
+
+  Unique_hash_map<Vertex_handle, size_type> V;
+
+  // outputs dimension and number of vertices
+  size_type n = tds.number_of_vertices();
+
+  if (is_ascii(os))
+      os << tds.dimension() << std::endl << n << std::endl;
+  else
+  {
+    write(os,tds.dimension());
+    write(os,n);
+  }
+
+  if (n == 0)
+    return os;
+
+  // index the vertices
+  size_type i = 0;
+  for (Vertex_iterator it=tds.vertices_begin(); it != tds.vertices_end(); ++it)
+    V[it] = i++;
+
+  CGAL_triangulation_assertion( i == n );
+
+  tds.print_cells(os, V);
+
+  return os;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_simplex( Cell_handle c ) const
+{
+  switch(dimension()) {
+    case 3 : return is_cell(c);
+    case 2 : return is_facet(c, 3);
+    case 1 : return is_edge(c, 0, 1);
+    case 0 : return is_vertex(c->vertex(0));
+    case -1 : return c == cells().begin();
+  }
+  return false;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_vertex(Vertex_handle v) const
+{
+    return vertices().owns_dereferencable(v);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_edge(Vertex_handle u, Vertex_handle v,
+        Cell_handle &c, int &i, int &j) const
+  // returns false when dimension <1 or when indices wrong
+{
+    CGAL_triangulation_expensive_precondition( is_vertex(u) && is_vertex(v) );
+
+    if (u==v)
+        return false;
+
+    std::vector<Cell_handle> cells;
+    cells.reserve(64);
+    incident_cells(u, std::back_inserter(cells));
+
+    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
+              cit != cells.end(); ++cit)
+        if ((*cit)->has_vertex(v, j)) {
+            c = *cit;
+            i = c->index(u);
+            return true;
+        }
+    return false;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_edge(Vertex_handle u, Vertex_handle v) const
+{
+    Cell_handle c;
+    int i, j;
+    return is_edge(u, v, c, i, j);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_edge(Cell_handle c, int i, int j) const
+{
+  if (dimension() < 1)
+    return false;
+
+  if ( i==j ) return false;
+  if ( (i<0) || (j<0) ) return false;
+  if ( (dimension() == 1) && ((i>1) || (j>1)) ) return false;
+  if ( (dimension() == 2) && ((i>2) || (j>2)) ) return false;
+  if ((i>3) || (j>3)) return false;
+
+  return cells().owns_dereferencable(c);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_facet(Vertex_handle u, Vertex_handle v,
+         Vertex_handle w,
+         Cell_handle & c, int & i, int & j, int & k) const
+  // returns false when dimension <2 or when indices wrong
+{
+    CGAL_triangulation_expensive_precondition( is_vertex(u) &&
+                                               is_vertex(v) &&
+                                               is_vertex(w) );
+
+    if ( u==v || u==w || v==w )
+        return false;
+    if (dimension() < 2)
+        return false;
+
+    std::vector<Cell_handle> cells;
+    cells.reserve(64);
+    incident_cells(u, std::back_inserter(cells));
+
+    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
+              cit != cells.end(); ++cit)
+        if ((*cit)->has_vertex(v, j) && (*cit)->has_vertex(w, k)) {
+            c = *cit;
+            i = c->index(u);
+            return true;
+        }
+    return false;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_facet(Cell_handle c, int i) const
+{
+    CGAL_triangulation_precondition(i>=0 && i<4);
+
+    if ( dimension() < 2 )
+        return false;
+
+    if ( (dimension() == 2) && (i!=3) )
+        return false;
+
+    return cells().owns_dereferencable(c);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_cell( Cell_handle c ) const
+  // returns false when dimension <3
+{
+    if (dimension() < 3)
+        return false;
+
+    return cells().owns_dereferencable(c);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_cell(Vertex_handle u, Vertex_handle v,
+        Vertex_handle w, Vertex_handle t,
+        Cell_handle & c, int & i, int & j, int & k, int & l) const
+  // returns false when dimension <3
+{
+    CGAL_triangulation_expensive_precondition( is_vertex(u) &&
+                                               is_vertex(v) &&
+                                               is_vertex(w) &&
+                                               is_vertex(t) );
+
+    if ( u==v || u==w || u==t || v==w || v==t || w==t )
+        return false;
+
+    std::vector<Cell_handle> cells;
+    cells.reserve(64);
+    incident_cells(u, std::back_inserter(cells));
+
+    for (typename std::vector<Cell_handle>::iterator cit = cells.begin();
+              cit != cells.end(); ++cit)
+        if ((*cit)->has_vertex(v, j) && (*cit)->has_vertex(w, k) &&
+            (*cit)->has_vertex(t, l)) {
+            c = *cit;
+            i = c->index(u);
+            return true;
+        }
+    return false;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_cell(Vertex_handle u, Vertex_handle v,
+        Vertex_handle w, Vertex_handle t)
+    const
+  // returns false when dimension <3
+{
+    Cell_handle c;
+    int i, j, k, l;
+    return is_cell(u, v, w, t, c, i, j, k, l);
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const
+  // computes the index j of the vertex in the cell c giving the query
+  // facet (c,i)
+  // j has no meaning if false is returned
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+  return ( c->has_vertex(v,j) && (j != i) );
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+has_vertex(Cell_handle c, int i, Vertex_handle v) const
+  // checks whether the query facet (c,i) has vertex v
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+  int j;
+  return ( c->has_vertex(v,j) && (j != i) );
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+has_vertex(const Facet & f, Vertex_handle v, int & j) const
+{
+  return has_vertex(f.first, f.second, v, j);
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+has_vertex(const Facet & f, Vertex_handle v) const
+{
+  return has_vertex(f.first, f.second, v);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+are_equal(Cell_handle c, int i, Cell_handle n, int j) const
+  // tests whether facets c,i and n,j, have the same 3 vertices
+  // the triangulation is supposed to be valid, the orientation of the
+  // facets is not checked here
+  // the neighbor relations between c and  n are not tested either,
+  // which allows to use this method before setting these relations
+  // (see remove in Delaunay_3)
+  //   if ( c->neighbor(i) != n ) return false;
+  //   if ( n->neighbor(j) != c ) return false;
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+
+  if ( (c==n) && (i==j) ) return true;
+
+  int j1,j2,j3;
+  return( n->has_vertex( c->vertex((i+1)&3), j1 ) &&
+          n->has_vertex( c->vertex((i+2)&3), j2 ) &&
+          n->has_vertex( c->vertex((i+3)&3), j3 ) &&
+          ( j1+j2+j3+j == 6 ) );
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+are_equal(const Facet & f, const Facet & g) const
+{
+  return are_equal(f.first, f.second, g.first, g.second);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+are_equal(const Facet & f, Cell_handle n, int j) const
+{
+  return are_equal(f.first, f.second, n, j);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip( Cell_handle c, int i )
+  // returns false if the facet is not flippable
+  // true other wise and
+  // flips facet i of cell c
+  // c will be replaced by one of the new cells
+{
+  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
+                                   && (number_of_vertices() >= 6) );
+  CGAL_triangulation_expensive_precondition( is_cell(c) );
+
+  Cell_handle n = c->neighbor(i);
+  int in = n->index(c);
+
+  // checks that the facet is flippable,
+  // ie the future edge does not already exist
+  if (is_edge(c->vertex(i), n->vertex(in)))
+      return false;
+
+  flip_really(c,i,n,in);
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip_flippable(Cell_handle c, int i )
+  // flips facet i of cell c
+  // c will be replaced by one of the new cells
+{
+  CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4)
+                                   && (number_of_vertices() >= 6) );
+  CGAL_triangulation_expensive_precondition( is_cell(c) );
+
+  Cell_handle n = c->neighbor(i);
+  int in = n->index(c);
+
+  // checks that the facet is flippable,
+  // ie the future edge does not already exist
+  CGAL_triangulation_expensive_precondition( !is_edge(c->vertex(i),
+                                                      n->vertex(in)));
+  flip_really(c,i,n,in);
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip_really( Cell_handle c, int i, Cell_handle n, int in )
+  // private - used by flip and flip_flippable
+{
+  int i1 = (i+1)&3;
+  int i2 = (i+2)&3;
+  int i3 = (i+3)&3;
+
+  int in1 = n->index(c->vertex(i1));
+  int in2 = n->index(c->vertex(i2));
+  int in3 = n->index(c->vertex(i3));
+
+  set_adjacency(c, i, n->neighbor(in3), n->neighbor(in3)->index(n));
+  c->set_vertex( i3, n->vertex(in) );
+
+  set_adjacency(n, in, c->neighbor(i1), c->neighbor(i1)->index(c));
+  n->set_vertex( in1, c->vertex(i) );
+
+  Cell_handle cnew = create_cell(c->vertex(i), c->vertex(i1),
+                                 n->vertex(in), n->vertex(in3));
+
+  set_adjacency(cnew, 0, n->neighbor(in2), n->neighbor(in2)->index(n));
+  set_adjacency(cnew, 1, n, in2);
+  set_adjacency(cnew, 2, c->neighbor(i2), c->neighbor(i2)->index(c));
+  set_adjacency(cnew, 3, c, i2);
+  set_adjacency(c, i1, n, in3);
+
+  if ((i&1) != 0)
+      change_orientation(cnew);
+
+  c->vertex(i1)->set_cell(cnew);
+  c->vertex(i2)->set_cell(c);
+  n->vertex(in3)->set_cell(n);
+  // to be implemented : 2d case
+  // CGAL_triangulation_precondition( (0<=i) && (i<3) );
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip( Cell_handle c, int i, int j )
+  // returns false if the edge is not flippable
+  // true otherwise and
+  // flips edge i,j of cell c
+  // c will be deleted
+{
+  CGAL_triangulation_precondition( (dimension() == 3)
+                                   && (0<=i) && (i<4)
+                                   && (0<=j) && (j<4)
+                                   && ( i != j )
+                                   && (number_of_vertices() >= 6) );
+  CGAL_triangulation_expensive_precondition( is_cell(c) );
+
+  // checks that the edge is flippable ie degree 3
+  int degree = 0;
+  Cell_circulator ccir = incident_cells(c,i,j);
+  Cell_circulator cdone = ccir;
+  do {
+    ++degree;
+    ++ccir;
+  } while ( ccir != cdone );
+
+  if ( degree != 3 ) return false;
+
+  int next = next_around_edge(i,j);
+  Cell_handle c1 = c->neighbor( next );
+  Vertex_handle v1 = c->vertex( next ); // will become vertex of c1
+  int i1 = c1->index( c->vertex(i) );
+  int j1 = c1->index( c->vertex(j) );
+
+  int next1 = next_around_edge(i1,j1);
+  Cell_handle c2  = c1->neighbor( next1 );
+  Vertex_handle v2 = c1->vertex( next1 ); // will become vertex of c2
+  int i2 = c2->index( c->vertex(i) );
+  int j2 = c2->index( c->vertex(j) );
+
+  int next2 = next_around_edge(i2,j2);
+  Vertex_handle v3 = c2->vertex( next2 );
+
+  // checks that the edge is flippable,
+  // is the future cells do not already exist
+  if ( is_cell(v1,v2,v3,c->vertex(i)) ) return false;
+  if ( is_cell(v1,v2,v3,c->vertex(j)) ) return false;
+
+  flip_really(c,i,j,c1,v1,i1,j1,next1,c2,v2,i2,j2,next2,v3);
+
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip_flippable( Cell_handle c, int i, int j )
+  // flips edge i,j of cell c
+  // c will be deleted
+{
+  CGAL_triangulation_precondition( (dimension() == 3)
+                                   && (0<=i) && (i<4)
+                                   && (0<=j) && (j<4)
+                                   && ( i != j )
+                                   && (number_of_vertices() >= 6) );
+  CGAL_triangulation_expensive_precondition( is_cell(c) );
+
+  // checks that the edge is flippable ie degree 3
+  CGAL_triangulation_precondition_code( int degree = 0; );
+  CGAL_triangulation_precondition_code
+    ( Cell_circulator ccir = incident_cells(c,i,j); );
+  CGAL_triangulation_precondition_code( Cell_circulator cdone = ccir; );
+  CGAL_triangulation_precondition_code( do {
+                                          ++degree;
+                                          ++ccir;
+                                        } while ( ccir != cdone ); );
+
+  CGAL_triangulation_precondition( degree == 3 );
+
+  int next = next_around_edge(i,j);
+  Cell_handle c1 = c->neighbor( next );
+  Vertex_handle v1 = c->vertex( next ); // will become vertex of c1
+  int i1 = c1->index( c->vertex(i) );
+  int j1 = c1->index( c->vertex(j) );
+
+  int next1 = next_around_edge(i1,j1);
+  Cell_handle c2  = c1->neighbor( next1 );
+  Vertex_handle v2 = c1->vertex( next1 ); // will become vertex of c2
+  int i2 = c2->index( c->vertex(i) );
+  int j2 = c2->index( c->vertex(j) );
+
+  int next2 = next_around_edge(i2,j2);
+  Vertex_handle v3 = c2->vertex( next2 );
+
+  // checks that the edge is flippable,
+  // is the future cells do not already exist
+  CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(i)) );
+  CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(j)) );
+
+  flip_really(c,i,j,c1,v1,i1,j1,next1,c2,v2,i2,j2,next2,v3);
+}
+
+template <class Vb, class Cb, class Ct>
+inline
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+flip_really( Cell_handle c, int i, int j,
+             Cell_handle c1, Vertex_handle v1,
+             int i1, int j1, int next1,
+             Cell_handle c2, Vertex_handle v2,
+             int i2, int j2, int next2,
+             Vertex_handle v3 )
+{
+  c->vertex(i)->set_cell(c1);
+  c->vertex(j)->set_cell(c2);
+
+  c1->set_vertex( j1, v1 );
+  v1->set_cell(c1);
+  c2->set_vertex( i2, v2 );
+  v2->set_cell(c2);
+
+  set_adjacency(c1, next1,c2->neighbor(j2), c2->neighbor(j2)->index(c2));
+  set_adjacency(c2,c2->index(v1),c1->neighbor(i1),c1->neighbor(i1)->index(c1));
+
+  set_adjacency(c1, i1, c2, j2);
+
+  set_adjacency(c1, 6-i1-j1-next1, c->neighbor(j), c->neighbor(j)->index(c));
+  set_adjacency(c2, next2, c->neighbor(i), c->neighbor(i)->index(c));
+
+  v3->set_cell( c2 );
+
+  delete_cell( c );
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+read_cells(std::istream& is, std::map< std::size_t, Vertex_handle > &V,
+           std::size_t & m, std::map< std::size_t, Cell_handle > &C)
+{
+  // creation of the cells and neighbors
+  switch (dimension()) {
+  case 3:
+  case 2:
+  case 1:
+    {
+      if(is_ascii(is))
+        is >> m;
+      else
+        read(is, m);
+
+      for(std::size_t i = 0; i < m; i++) {
+        Cell_handle c = create_cell();
+        for (int k=0; k<=dimension(); ++k) {
+          std::size_t ik;
+            if(is_ascii(is))
+               is >> ik;
+            else
+              read(is, ik);
+            c->set_vertex(k, V[ik]);
+            V[ik]->set_cell(c);
+        }
+        C[i] = c;
+      }
+      for(std::size_t j = 0; j < m; j++) {
+        Cell_handle c = C[j];
+        for (int k=0; k<=dimension(); ++k) {
+          std::size_t ik;
+            if(is_ascii(is))
+              is >> ik;
+            else
+              read(is, ik);
+            c->set_neighbor(k, C[ik]);
+        }
+      }
+      break;
+    }
+  case 0:
+    {
+      m = 2;
+
+      //      CGAL_triangulation_assertion( n == 2 );
+      for (int i=0; i < 2; i++) {
+        Cell_handle c = create_face(V[i], Vertex_handle(), Vertex_handle());
+        C[i] = c;
+        V[i]->set_cell(c);
+      }
+      for (int j=0; j < 2; j++) {
+        Cell_handle c = C[j];
+        c->set_neighbor(0, C[1-j]);
+      }
+      break;
+    }
+  case -1:
+    {
+      m = 1;
+      //      CGAL_triangulation_assertion( n == 1 );
+      Cell_handle c = create_face(V[0], Vertex_handle(), Vertex_handle());
+      C[0] = c;
+      V[0]->set_cell(c);
+      break;
+    }
+  }
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+print_cells(std::ostream& os, const Unique_hash_map<Vertex_handle, std::size_t> &V ) const
+{
+  std::map<Cell_handle, std::size_t > C;
+  std::size_t i = 0;
+
+  switch ( dimension() ) {
+  case 3:
+    {
+      std::size_t m = number_of_cells();
+      if(is_ascii(os))
+        os << m << std::endl;
+      else
+        write(os, m);
+
+      // write the cells
+      Cell_iterator it;
+      for(it = cells_begin(); it != cells_end(); ++it) {
+        C[it] = i++;
+        for(int j = 0; j < 4; j++){
+          if(is_ascii(os)) {
+            os << V[it->vertex(j)];
+            if ( j==3 )
+              os << std::endl;
+            else
+              os << ' ';
+          }
+          else
+            write(os, V[it->vertex(j)]);
+        }
+      }
+      CGAL_triangulation_assertion( i == m );
+
+      // write the neighbors
+      for(it = cells_begin(); it != cells_end(); ++it) {
+        for (int j = 0; j < 4; j++) {
+          if(is_ascii(os)){
+            os << C[it->neighbor(j)];
+            if(j==3)
+              os << std::endl;
+            else
+              os <<  ' ';
+          }
+          else
+            write(os, C[it->neighbor(j)]);
+        }
+      }
+      break;
+    }
+  case 2:
+    {
+      size_type m = number_of_facets();
+      if(is_ascii(os))
+        os << m << std::endl;
+      else
+        write(os, m);
+
+      // write the facets
+      Facet_iterator it;
+      for(it = facets_begin(); it != facets_end(); ++it) {
+        C[(*it).first] = i++;
+        for(int j = 0; j < 3; j++){
+          if(is_ascii(os)) {
+            os << V[(*it).first->vertex(j)];
+            if ( j==2 )
+              os << std::endl;
+            else
+              os <<  ' ';
+          }
+          else {
+            write(os,  V[(*it).first->vertex(j)]);
+          }
+        }
+      }
+      CGAL_triangulation_assertion( i == m );
+
+      // write the neighbors
+      for(it = facets_begin(); it != facets_end(); ++it) {
+        for (int j = 0; j < 3; j++) {
+          if(is_ascii(os)){
+            os << C[(*it).first->neighbor(j)];
+            if(j==2)
+              os << std::endl;
+            else
+              os <<  ' ';
+          }
+          else {
+            write(os, C[(*it).first->neighbor(j)]);
+          }
+        }
+      }
+      break;
+    }
+  case 1:
+    {
+      size_type m = number_of_edges();
+      if(is_ascii(os))
+        os << m << std::endl;
+      else
+        write(os, m);
+      // write the edges
+      Edge_iterator it;
+      for(it = edges_begin(); it != edges_end(); ++it) {
+        C[(*it).first] = i++;
+        for(int j = 0; j < 2; j++){
+          if(is_ascii(os)) {
+            os << V[(*it).first->vertex(j)];
+            if ( j==1 )
+              os << std::endl;
+            else
+              os <<  ' ';
+          }
+          else {
+            write(os, V[(*it).first->vertex(j)]);
+          }
+        }
+      }
+      CGAL_triangulation_assertion( i == m );
+
+      // write the neighbors
+      for(it = edges_begin(); it != edges_end(); ++it) {
+        for (int j = 0; j < 2; j++) {
+          if(is_ascii(os)){
+            os << C[(*it).first->neighbor(j)];
+            if(j==1)
+              os << std::endl;
+            else
+              os <<  ' ';
+          }
+          else {
+            write(os, C[(*it).first->neighbor(j)]);
+          }
+        }
+      }
+      break;
+    }
+  }
+}
+
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::insert_first_finite_cell(
+  Vertex_handle &v0, Vertex_handle &v1, Vertex_handle &v2, Vertex_handle &v3,
+  Vertex_handle v_infinite)
+{
+  CGAL_triangulation_precondition( 
+    (v_infinite == Vertex_handle() && dimension() == -2)
+    || (v_infinite != Vertex_handle() && dimension() == -1));
+
+  if (v_infinite == Vertex_handle())
+    v_infinite = create_vertex();
+
+  set_dimension(3);
+
+  v0 = create_vertex();
+  v1 = create_vertex();
+  v2 = create_vertex();
+  v3 = create_vertex();
+
+  Cell_handle c0123 = create_cell(v0,         v1,   v2,   v3);
+  Cell_handle ci012 = create_cell(v_infinite, v0,   v1,   v2);
+  Cell_handle ci103 = create_cell(v_infinite, v1,   v0,   v3);
+  Cell_handle ci023 = create_cell(v_infinite, v0,   v2,   v3);
+  Cell_handle ci132 = create_cell(v_infinite, v1,   v3,   v2);
+
+  v_infinite->set_cell(ci012);
+  v0->set_cell(c0123);
+  v1->set_cell(c0123);
+  v2->set_cell(c0123);
+  v3->set_cell(c0123);
+
+  set_adjacency(c0123, 0, ci132, 0);
+  set_adjacency(c0123, 1, ci023, 0);
+  set_adjacency(c0123, 2, ci103, 0);
+  set_adjacency(c0123, 3, ci012, 0);
+
+  set_adjacency(ci012, 3, ci103, 3);
+  set_adjacency(ci012, 2, ci023, 3);
+  set_adjacency(ci012, 1, ci132, 2);
+  set_adjacency(ci103, 1, ci023, 2);
+  set_adjacency(ci023, 1, ci132, 1);
+  set_adjacency(ci103, 2, ci132, 3);
+
+  return v_infinite;
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+insert_in_cell(Cell_handle c)
+{
+  CGAL_triangulation_precondition( dimension() == 3 );
+  CGAL_triangulation_precondition( c != Cell_handle() );
+  CGAL_triangulation_expensive_precondition( is_cell(c) );
+
+  Vertex_handle v = create_vertex();
+
+  Vertex_handle v0 = c->vertex(0);
+  Vertex_handle v1 = c->vertex(1);
+  Vertex_handle v2 = c->vertex(2);
+  Vertex_handle v3 = c->vertex(3);
+
+  Cell_handle n1 = c->neighbor(1);
+  Cell_handle n2 = c->neighbor(2);
+  Cell_handle n3 = c->neighbor(3);
+
+  // c will be modified to have v,v1,v2,v3 as vertices
+  Cell_handle c3 = create_cell(v0,v1,v2,v);
+  Cell_handle c2 = create_cell(v0,v1,v,v3);
+  Cell_handle c1 = create_cell(v0,v,v2,v3);
+
+  set_adjacency(c3, 0, c, 3);
+  set_adjacency(c2, 0, c, 2);
+  set_adjacency(c1, 0, c, 1);
+
+  set_adjacency(c2, 3, c3, 2);
+  set_adjacency(c1, 3, c3, 1);
+  set_adjacency(c1, 2, c2, 1);
+
+  set_adjacency(n1, n1->index(c), c1, 1);
+  set_adjacency(n2, n2->index(c), c2, 2);
+  set_adjacency(n3, n3->index(c), c3, 3);
+
+  c->set_vertex(0,v);
+
+  v0->set_cell(c1);
+  v->set_cell(c);
+
+  return v;
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+insert_in_facet(Cell_handle c, int i)
+{ // inserts v in the facet opposite to vertex i of cell c
+
+  CGAL_triangulation_precondition( c != Cell_handle() );
+  CGAL_triangulation_precondition( dimension() >= 2 );
+
+  Vertex_handle v = create_vertex();
+
+  switch ( dimension() ) {
+
+  case 3:
+    {
+      CGAL_triangulation_expensive_precondition( is_cell(c) );
+      CGAL_triangulation_precondition( i == 0 || i == 1 ||
+                                       i == 2 || i == 3 );
+      // c will be modified to have v replacing vertex(i+3)
+      int i1,i2,i3;
+
+      if ( (i&1) == 0 ) {
+        i1=(i+1)&3; i2=(i+2)&3; i3=6-i-i1-i2;
+      }
+      else {
+        i1=(i+1)&3; i2=(i+3)&3; i3=6-i-i1-i2;
+      }
+      // i,i1,i2,i3 is well oriented
+      // so v will "replace" the vertices in this order
+      // when creating the new cells one after another from c
+
+      Vertex_handle vi=c->vertex(i);
+      Vertex_handle v1=c->vertex(i1);
+      Vertex_handle v2=c->vertex(i2);
+      Vertex_handle v3=c->vertex(i3);
+
+      // new cell with v in place of i1
+      Cell_handle nc = c->neighbor(i1);
+      Cell_handle cnew1 = create_cell(vi,v,v2,v3);
+      set_adjacency(cnew1, 1, nc, nc->index(c));
+      set_adjacency(cnew1, 3, c, i1);
+
+      v3->set_cell(cnew1);
+
+      // new cell with v in place of i2
+      nc = c->neighbor(i2);
+      Cell_handle cnew2 = create_cell(vi,v1,v,v3);
+      set_adjacency(cnew2, 2, nc, nc->index(c));
+      set_adjacency(cnew2, 3, c, i2);
+      set_adjacency(cnew1, 2, cnew2, 1);
+
+      // v replaces i3 in c
+      c->set_vertex(i3,v);
+
+      // other side of facet containing v
+      Cell_handle d = c->neighbor(i);
+      int j = d->index(c);
+      int j1=d->index(v1);// triangulation supposed to be valid
+      int j2=d->index(v2);
+      int j3=6-j-j1-j2;
+      // then the orientation of j,j1,j2,j3 depends on the parity
+      // of i-j
+
+      // new cell with v in place of j1
+      Cell_handle nd = d->neighbor(j1);
+      Cell_handle dnew1 = create_cell(d->vertex(j),v,v3,v2);
+      set_adjacency(dnew1, 1, nd, nd->index(d));
+      set_adjacency(dnew1, 2, d, j1);
+      set_adjacency(dnew1, 0, cnew1, 0);
+
+      // new cell with v in place of j2
+      nd = d->neighbor(j2);
+      Cell_handle dnew2 = create_cell(d->vertex(j),v1,v3,v);
+
+      set_adjacency(dnew2, 3, nd, nd->index(d));
+      set_adjacency(dnew2, 2, d, j2);
+      set_adjacency(dnew2, 0, cnew2, 0);
+      set_adjacency(dnew1, 3, dnew2, 1);
+
+      // v replaces i3 in d
+      d->set_vertex(j3,v);
+      v->set_cell(d);
+
+      break;
+    }
+  case 2:
+    {
+      CGAL_triangulation_expensive_precondition( is_facet(c,i) );
+      Cell_handle n = c->neighbor(2);
+      Cell_handle cnew = create_face(c->vertex(0),c->vertex(1),v);
+      set_adjacency(cnew, 2, n, n->index(c));
+      set_adjacency(cnew, 0, c, 2);
+      c->vertex(0)->set_cell(cnew);
+
+      n = c->neighbor(1);
+      Cell_handle dnew = create_face(c->vertex(0),v,c->vertex(2));
+      set_adjacency(dnew, 1, n, n->index(c));
+      set_adjacency(dnew, 0, c, 1);
+      set_adjacency(dnew, 2, cnew, 1);
+
+      c->set_vertex(0,v);
+      v->set_cell(c);
+      break;
+    }
+  }
+
+  return v;
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+insert_in_edge(Cell_handle c, int i, int j)
+  // inserts a vertex in the edge of cell c with vertices i and j
+{
+  CGAL_triangulation_precondition( c != Cell_handle() );
+  CGAL_triangulation_precondition( i != j );
+  CGAL_triangulation_precondition( dimension() >= 1 );
+
+  switch ( dimension() ) {
+  case 3:
+    {
+      CGAL_triangulation_expensive_precondition( is_cell(c) );
+      CGAL_triangulation_precondition( i>=0 && i<=3 && j>=0 && j<=3 );
+
+      std::vector<Cell_handle > cells;
+      cells.reserve(32);
+      Cell_circulator ccir = incident_cells(c, i, j);
+      do {
+          Cell_handle cc = ccir;
+          cells.push_back(cc);
+          cc->tds_data().mark_in_conflict();
+          ++ccir;
+      } while (c != ccir);
+
+      return _insert_in_hole(cells.begin(), cells.end(), c, i);
+    }
+  case 2:
+    {
+      CGAL_triangulation_expensive_precondition( is_edge(c,i,j) );
+
+      Vertex_handle v = create_vertex();
+      int k=3-i-j; // index of the third vertex of the facet
+      Cell_handle d = c->neighbor(k);
+      int kd = d->index(c);
+      int id = d->index(c->vertex(i));
+      int jd = d->index(c->vertex(j));
+
+      Cell_handle cnew = create_cell();
+      cnew->set_vertex(i,c->vertex(i));
+      c->vertex(i)->set_cell(cnew);
+      cnew->set_vertex(j,v);
+      cnew->set_vertex(k,c->vertex(k));
+      c->set_vertex(i,v);
+
+      Cell_handle dnew = create_cell();
+      dnew->set_vertex(id,d->vertex(id));
+      // d->vertex(id)->cell() is cnew OK
+      dnew->set_vertex(jd,v);
+      dnew->set_vertex(kd,d->vertex(kd));
+      d->set_vertex(id,v);
+
+      Cell_handle nj = c->neighbor(j);
+      set_adjacency(cnew, i, c, j);
+      set_adjacency(cnew, j, nj, nj->index(c));
+
+      nj = d->neighbor(jd);
+      set_adjacency(dnew, id, d, jd);
+      set_adjacency(dnew, jd, nj, nj->index(d));
+
+      set_adjacency(cnew, k, dnew, kd);
+
+      v->set_cell(cnew);
+      return v;
+    }
+  default: // case 1:
+    {
+      Vertex_handle v = create_vertex();
+      CGAL_triangulation_expensive_precondition( is_edge(c,i,j) );
+      Cell_handle cnew = create_face(v, c->vertex(1), Vertex_handle());
+      c->vertex(1)->set_cell(cnew);
+      c->set_vertex(1,v);
+      set_adjacency(cnew, 0, c->neighbor(0), 1);
+      set_adjacency(cnew, 1, c, 0);
+
+      v->set_cell(cnew);
+      return v;
+    }
+  }
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+insert_increase_dimension(Vertex_handle star)
+  // star = vertex from which we triangulate the facet of the
+  // incremented dimension
+  // ( geometrically : star = infinite vertex )
+  // = NULL only used to insert the 1st vertex (dimension -2 to dimension -1)
+  // changes the dimension
+{
+  CGAL_triangulation_precondition( dimension() < 3);
+
+  Vertex_handle v = create_vertex();
+
+  int dim = dimension();
+  if (dim != -2) {
+      CGAL_triangulation_precondition( star != Vertex_handle() );
+      // In this case, this precondition is not relatively expensive.
+      CGAL_triangulation_precondition( is_vertex(star) );
+  }
+
+  // this is set now, so that it becomes allowed to reorient
+  // new facets or cells by iterating on them (otherwise the
+  // dimension is too small)
+  set_dimension( dimension()+1 );
+
+  switch ( dim ) {
+  case -2:
+      // insertion of the first vertex
+      // ( geometrically : infinite vertex )
+    {
+      Cell_handle c = create_face(v, Vertex_handle(), Vertex_handle());
+      v->set_cell(c);
+      break;
+    }
+
+  case -1:
+    // insertion of the second vertex
+    // ( geometrically : first finite vertex )
+    {
+      Cell_handle d = create_face(v, Vertex_handle(), Vertex_handle());
+      v->set_cell(d);
+      set_adjacency(d, 0, star->cell(), 0);
+      break;
+    }
+
+  case 0:
+    // insertion of the third vertex
+    // ( geometrically : second finite vertex )
+    {
+      Cell_handle c = star->cell();
+      Cell_handle d = c->neighbor(0);
+
+      c->set_vertex(1,d->vertex(0));
+      d->set_vertex(1,v);
+      d->set_neighbor(1,c);
+      Cell_handle e = create_face( v, star, Vertex_handle() );
+      set_adjacency(e, 0, c, 1);
+      set_adjacency(e, 1, d, 0);
+
+      v->set_cell(d);
+      break;
+    }
+
+  case 1:
+    // general case : 4th vertex ( geometrically : 3rd finite vertex )
+    // degenerate cases geometrically : 1st non collinear vertex
+    {
+      Cell_handle c = star->cell();
+      int i = c->index(star); // i== 0 or 1
+      CGAL_assertion(i==0 || i==1);
+      int j = (i == 0) ? 1 : 0;
+      Cell_handle d = c->neighbor(j);
+        
+      c->set_vertex(2,v);
+
+      Cell_handle e = c->neighbor(i);
+      Cell_handle cnew = c;
+      Cell_handle enew = Cell_handle();
+        
+      while( e != d ){
+        enew = create_cell();
+        enew->set_vertex(i,e->vertex(j));
+        enew->set_vertex(j,e->vertex(i));
+        enew->set_vertex(2,star);
+        
+        set_adjacency(enew, i, cnew, j);
+        // false at the first iteration of the loop where it should
+        // be neighbor 2
+        // it is corrected after the loop
+        set_adjacency(enew, 2, e, 2);
+        // neighbor j will be set during next iteration of the loop
+        
+        e->set_vertex(2,v);
+
+        e = e->neighbor(i);
+        cnew = enew;
+      }
+        
+      d->set_vertex(2,v);
+      set_adjacency(enew, j, d, 2);
+
+      // corrections for star->cell() :
+      c = star->cell();
+      c->set_neighbor(2,c->neighbor(i)->neighbor(2));
+      c->set_neighbor(j,d);
+
+      v->set_cell(d);
+
+      break;
+    }
+
+  case 2:
+    // general case : 5th vertex ( geometrically : 4th finite vertex )
+    // degenerate cases : geometrically 1st non coplanar vertex
+    {
+      // used to store the new cells, in order to be able to traverse only
+      // them to find the missing neighbors.
+      std::vector<Cell_handle > new_cells;
+      new_cells.reserve(16);
+
+      Cell_iterator it = cells_begin();
+      // allowed since the dimension has already been set to 3
+
+      v->set_cell(it); // ok since there is at least one ``cell''
+      for(; it != cells_end(); ++it) {
+        // Here we must be careful since we create_cells in a loop controlled
+        // by an iterator.  So we first take care of the cells newly created
+        // by the following test :
+        if (it->neighbor(0) == Cell_handle())
+          continue;
+        it->set_neighbor(3, Cell_handle());
+        it->set_vertex(3, v);
+        if ( ! it->has_vertex(star) ) {
+          Cell_handle cnew = create_cell( it->vertex(0), it->vertex(2),
+                                          it->vertex(1), star);
+          // The Intel compiler has a problem with passing "it" directly to
+          // function "set_adjacency": the adjacency is not changed.
+          Cell_handle ch_it = it;
+          set_adjacency(cnew, 3, ch_it, 3);
+          cnew->set_neighbor(0, Cell_handle());
+          new_cells.push_back(cnew);
+        }
+      }
+
+      // traversal of the new cells only, to add missing neighbors
+      for(typename std::vector<Cell_handle>::iterator ncit = new_cells.begin();
+           ncit != new_cells.end(); ++ncit) {
+        Cell_handle n = (*ncit)->neighbor(3); // opposite to star
+        for ( int i=0; i<3; i++ ) {
+          int j;
+          if ( i==0 ) j=0;
+          else j=3-i; // vertex 1 and vertex 2 are always switched when
+          // creating a new cell (see above)
+          Cell_handle c = n->neighbor(i)->neighbor(3);
+          if ( c != Cell_handle() ) {
+            // i.e. star is not a vertex of n->neighbor(i)
+            (*ncit)->set_neighbor(j, c);
+            // opposite relation will be set when ncit arrives on c
+            // this avoids to look for the correct index
+            // and to test whether *ncit already has neighbor i
+          }
+          else {
+            // star is a vertex of n->neighbor(i)
+            set_adjacency(*ncit, j, n->neighbor(i), 3);//neighbor opposite to v
+          }
+        }
+      }
+    }
+  }// end switch
+
+  return v;
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+remove_decrease_dimension(Vertex_handle v, Vertex_handle w)
+{
+    CGAL_triangulation_expensive_precondition( is_valid() );
+    CGAL_triangulation_precondition( dimension() >= -1 );
+    CGAL_triangulation_precondition( dimension() != 1 ||
+                                     number_of_vertices() == 3);
+    CGAL_triangulation_precondition( number_of_vertices() >
+                                     (size_type) dimension() + 1 );
+    CGAL_triangulation_precondition( degree(v) == number_of_vertices()-1 );
+
+    if (dimension() <= 0) {
+        delete_cell(v->cell());
+    }
+    else {
+        // the cells incident to w are down graded one dimension
+        // the other cells are deleted
+        std::vector<Cell_handle> to_delete, to_downgrade;
+
+        for (Cell_iterator ib = cells().begin();
+            ib != cells().end(); ++ib) {
+            if ( ib->has_vertex(w) )
+                to_downgrade.push_back(ib);
+            else
+                to_delete.push_back(ib);
+        }
+
+        typename std::vector<Cell_handle>::iterator lfit=to_downgrade.begin();
+        for( ; lfit != to_downgrade.end(); ++lfit) {
+            Cell_handle f = *lfit;
+            int j = f->index(w);
+            int k; if (f->has_vertex(v, k)) f->set_vertex(k, w);
+            if (j != dimension()) {
+                f->set_vertex(j, f->vertex(dimension()));
+                f->set_neighbor(j, f->neighbor(dimension()));
+                if (dimension() >= 1)
+                    change_orientation(f);
+            }
+            f->set_vertex(dimension(), Vertex_handle());
+            f->set_neighbor(dimension(), Cell_handle());
+
+            // Update vertex->cell() pointers.
+            for (int i = 0; i < dimension(); ++i)
+                f->vertex(i)->set_cell(f);
+        }
+
+        delete_cells(to_delete.begin(), to_delete.end());
+    }
+    delete_vertex(v);
+    set_dimension(dimension()-1);
+    CGAL_triangulation_postcondition(is_valid());
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+remove_from_maximal_dimension_simplex(Vertex_handle v)
+{
+    CGAL_triangulation_precondition(dimension() >= 1);
+    CGAL_triangulation_precondition(degree(v) == (size_type) dimension() + 1);
+    CGAL_triangulation_precondition(number_of_vertices() >
+                                    (size_type) dimension() + 1);
+
+    if (number_of_vertices() == (size_type) dimension() + 2) {
+        remove_decrease_dimension(v);
+        return Cell_handle();
+    }
+
+    if (dimension() == 3)
+        return remove_degree_4(v);
+    if (dimension() == 2)
+        return remove_degree_3(v);
+
+    // dimension() == 1
+    return remove_degree_2(v);
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+remove_degree_2(Vertex_handle v)
+{
+    CGAL_triangulation_precondition(dimension() == 1);
+    CGAL_triangulation_precondition(degree(v) == 2);
+    CGAL_triangulation_precondition(number_of_vertices() >= 4);
+
+    // Cells to be killed.
+    Cell_handle c0, c1;
+    // Indices of v in these cells.
+    int i0, i1;
+
+    c0 = v->cell();
+    i0 = c0->index(v);
+    c1 = c0->neighbor((i0 == 0) ? 1 : 0);
+    i1 = c1->index(v);
+
+    // New cell : we copy the content of c0, so we keep the orientation.
+    Cell_handle newc = create_face(c0->vertex(0),
+                                   c0->vertex(1),
+                                   Vertex_handle());
+
+    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
+
+    set_adjacency(newc,    i0, c0->neighbor(i0), mirror_index(c0, i0));
+    set_adjacency(newc,  1-i0, c1->neighbor(i1), mirror_index(c1, i1));
+
+    newc->vertex(0)->set_cell(newc);
+    newc->vertex(1)->set_cell(newc);
+
+    delete_cell(c0);
+    delete_cell(c1);
+    delete_vertex(v);
+
+    return newc;
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+remove_degree_3(Vertex_handle v)
+{
+    CGAL_triangulation_precondition(dimension() == 2);
+    CGAL_triangulation_precondition(degree(v) == 3);
+    CGAL_triangulation_precondition(number_of_vertices() >= 5);
+
+    // Cells to be killed.
+    Cell_handle c0, c1, c2;
+    // Indices of v in these cells.
+    int i0, i1, i2;
+
+    c0 = v->cell();
+    i0 = c0->index(v);
+    c1 = c0->neighbor(cw(i0));
+    i1 = c1->index(v);
+    c2 = c0->neighbor(ccw(i0));
+    i2 = c2->index(v);
+
+    // New cell : we copy the content of c0, so we keep the orientation.
+    Cell_handle newc = create_face(c0->vertex(0),
+                                   c0->vertex(1),
+                                   c0->vertex(2));
+
+    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
+
+    set_adjacency(newc,      i0, c0->neighbor(i0), mirror_index(c0, i0));
+    set_adjacency(newc,  cw(i0), c1->neighbor(i1), mirror_index(c1, i1));
+    set_adjacency(newc, ccw(i0), c2->neighbor(i2), mirror_index(c2, i2));
+
+    newc->vertex(0)->set_cell(newc);
+    newc->vertex(1)->set_cell(newc);
+    newc->vertex(2)->set_cell(newc);
+
+    delete_cell(c0);
+    delete_cell(c1);
+    delete_cell(c2);
+    delete_vertex(v);
+
+    return newc;
+}
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Cell_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+remove_degree_4(Vertex_handle v)
+{
+    CGAL_triangulation_precondition(dimension() == 3);
+    CGAL_triangulation_precondition(degree(v) == 4);
+    CGAL_triangulation_precondition(number_of_vertices() >= 6);
+
+    // Cells to be killed.
+    Cell_handle c0, c1, c2, c3;
+    // Indices of v in these cells.
+    int i0, i1, i2, i3;
+
+    c0 = v->cell();
+    i0 = c0->index(v);
+    c1 = c0->neighbor(i0^1);
+    i1 = c1->index(v);
+    c2 = c0->neighbor(i0^2);
+    i2 = c2->index(v);
+    c3 = c0->neighbor(i0^3);
+    i3 = c3->index(v);
+
+    // New cell : we copy the content of c0, so we keep the orientation.
+    Cell_handle newc = create_cell(c0->vertex(0),
+                                   c0->vertex(1),
+                                   c0->vertex(2),
+                                   c0->vertex(3));
+
+    newc->set_vertex(i0, c1->vertex(c1->index(c0)));
+
+    set_adjacency(newc,   i0, c0->neighbor(i0), mirror_index(c0, i0));
+    set_adjacency(newc, i0^1, c1->neighbor(i1), mirror_index(c1, i1));
+    set_adjacency(newc, i0^2, c2->neighbor(i2), mirror_index(c2, i2));
+    set_adjacency(newc, i0^3, c3->neighbor(i3), mirror_index(c3, i3));
+
+    newc->vertex(0)->set_cell(newc);
+    newc->vertex(1)->set_cell(newc);
+    newc->vertex(2)->set_cell(newc);
+    newc->vertex(3)->set_cell(newc);
+
+    delete_cell(c0);
+    delete_cell(c1);
+    delete_cell(c2);
+    delete_cell(c3);
+    delete_vertex(v);
+
+    return newc;
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+decrease_dimension(Cell_handle c, int i)
+{
+  CGAL_triangulation_expensive_precondition( is_valid() );;
+  CGAL_triangulation_precondition( dimension() >= 2);
+  CGAL_triangulation_precondition( number_of_vertices() >
+                                   (size_type) dimension() + 1 );
+  CGAL_triangulation_precondition( degree(c->vertex(i)) == number_of_vertices()-1 );
+
+  Vertex_handle v = c->vertex(i);
+  Vertex_handle w = c->vertex(i);
+
+  // the cells incident to w are down graded one dimension
+  // the other cells are deleted
+  std::vector<Cell_handle> to_delete, to_downgrade;
+
+  for (Cell_iterator ib = cells().begin();
+       ib != cells().end(); ++ib) {
+    if ( ib->has_vertex(w) )
+      to_downgrade.push_back(ib);
+    else
+      to_delete.push_back(ib);
+  }
+
+  typename std::vector<Cell_handle>::iterator lfit=to_downgrade.begin();
+  for( ; lfit != to_downgrade.end(); ++lfit) {
+    Cell_handle f = *lfit;
+    int j = f->index(w);
+    int k; 
+    if (f->has_vertex(v, k)) f->set_vertex(k, w);
+    if (j != dimension()) {
+      f->set_vertex(j, f->vertex(dimension()));
+      f->set_neighbor(j, f->neighbor(dimension()));
+      if (dimension() >= 1)
+        change_orientation(f);
+    }
+    f->set_vertex(dimension(), Vertex_handle());
+    f->set_neighbor(dimension(), Cell_handle());
+
+    // Update vertex->cell() pointers.
+    for (int i = 0; i < dimension(); ++i)
+      f->vertex(i)->set_cell(f);
+  }
+
+  delete_cells(to_delete.begin(), to_delete.end());
+
+  //delete_vertex(v);
+  set_dimension(dimension()-1);
+
+  if(dimension() == 2)
+  {
+    Cell_handle n0 = c->neighbor(0);
+    Cell_handle n1 = c->neighbor(1);
+    Cell_handle n2 = c->neighbor(2);
+    Vertex_handle v0 = c->vertex(0);
+    Vertex_handle v1 = c->vertex(1);
+    Vertex_handle v2 = c->vertex(2);
+                
+    int i0 = 0, i1 = 0, i2 = 0;
+                
+    for(int i=0; i<3; i++) if(n0->neighbor(i) == c) { i0 = i; break; }
+    for(int i=0; i<3; i++) if(n1->neighbor(i) == c) { i1 = i; break; }
+    for(int i=0; i<3; i++) if(n2->neighbor(i) == c) { i2 = i; break; }
+                
+    Cell_handle c1 = create_cell(v, v0, v1, Vertex_handle());
+    Cell_handle c2 = create_cell(v, v1, v2, Vertex_handle());
+
+    c->set_vertex(0, v);
+    c->set_vertex(1, v2);
+    c->set_vertex(2, v0);
+    c->set_vertex(3, Vertex_handle());
+
+    //Cell_handle c3 = create_cell(v, v2, v0, Vertex_handle());
+    Cell_handle c3 = c;
+                
+    c1->set_neighbor(0, n2); n2->set_neighbor(i2, c1);
+    c1->set_neighbor(1, c2); 
+    c1->set_neighbor(2, c3);
+    c1->set_neighbor(3, Cell_handle());
+                
+    c2->set_neighbor(0, n0); n0->set_neighbor(i0, c2);
+    c2->set_neighbor(1, c3); 
+    c2->set_neighbor(2, c1);
+    c2->set_neighbor(3, Cell_handle());
+                
+    c3->set_neighbor(0, n1); n1->set_neighbor(i1, c3);
+    c3->set_neighbor(1, c1); 
+    c3->set_neighbor(2, c2);
+    c3->set_neighbor(3, Cell_handle());
+                
+    v->set_cell(c1);
+    v0->set_cell(c1);
+    v1->set_cell(c1);
+    v2->set_cell(c2);
+  }
+        
+  if(dimension() == 1)
+  {
+    Cell_handle n0 = c->neighbor(0);
+    Cell_handle n1 = c->neighbor(1);
+    Vertex_handle v0 = c->vertex(0);
+    Vertex_handle v1 = c->vertex(1);
+                
+    int i0 = 0 , i1 = 0;
+                
+    for(int i=0; i<2; i++) if(n0->neighbor(i) == c) { i0 = i; break; }
+    for(int i=0; i<2; i++) if(n1->neighbor(i) == c) { i1 = i; break; }
+                
+    Cell_handle c1 = create_cell(v0, v, Vertex_handle(), Vertex_handle());
+                
+    c->set_vertex(0, v);
+    c->set_vertex(1, v1);
+    c->set_vertex(2, Vertex_handle());
+    c->set_vertex(3, Vertex_handle());
+
+    //Cell_handle c2 = create_cell(v, v1, Vertex_handle(), Vertex_handle());
+    Cell_handle c2 = c;
+                
+    c1->set_neighbor(0, c2); 
+    c1->set_neighbor(1, n1); n1->set_neighbor(i1, c1);
+    c1->set_neighbor(2, Cell_handle());
+    c1->set_neighbor(3, Cell_handle());
+                
+    c2->set_neighbor(0, n0); n0->set_neighbor(i0, c2);
+    c2->set_neighbor(1, c1); 
+    c2->set_neighbor(2, Cell_handle());
+    c2->set_neighbor(3, Cell_handle());
+                
+    v->set_cell(c1);
+    v0->set_cell(c1);
+    v1->set_cell(c2);
+  }
+        
+  CGAL_triangulation_postcondition(is_valid());
+}
+
+
+template <class Vb, class Cb, class Ct>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::size_type
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+degree(Vertex_handle v) const
+{
+    std::size_t res;
+    adjacent_vertices(v, Counting_output_iterator(&res));
+    return res;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_valid(bool verbose, int level ) const
+{
+  switch ( dimension() ) {
+  case 3:
+    {
+        
+      if(number_of_vertices() <= 4) {
+        if (verbose)
+          std::cerr << "wrong number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+        
+      size_type vertex_count;
+      if ( ! count_vertices(vertex_count,verbose,level) )
+        return false;
+      if ( number_of_vertices() != vertex_count ) {
+        if (verbose)
+          std::cerr << "wrong number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      size_type cell_count;
+      if ( ! count_cells(cell_count,verbose,level) )
+        return false;
+      size_type edge_count;
+      if ( ! count_edges(edge_count,verbose,level) )
+          return false;
+      size_type facet_count;
+      if ( ! count_facets(facet_count,verbose,level) )
+          return false;
+
+      // Euler relation
+      if ( cell_count - facet_count + edge_count - vertex_count != 0 ) {
+        if (verbose)
+            std::cerr << "Euler relation unsatisfied" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      break;
+    }
+  case 2:
+    {
+        
+      if(number_of_vertices() <= 3) {
+        if (verbose)
+          std::cerr << "wrong number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+        
+      size_type vertex_count;
+      
+      if ( ! count_vertices(vertex_count,verbose,level) )
+        return false;
+      if ( number_of_vertices() != vertex_count ) {
+        if (verbose)
+            std::cerr << "false number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      size_type edge_count;
+      if ( ! count_edges(edge_count,verbose,level) )
+          return false;
+      // Euler for edges
+      if ( edge_count != 3 * vertex_count - 6 ) {
+        if (verbose)
+            std::cerr << "Euler relation unsatisfied - edges/vertices"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      size_type facet_count;
+      if ( ! count_facets(facet_count,verbose,level) )
+          return false;
+      // Euler for facets
+      if ( facet_count != 2 * vertex_count - 4 ) {
+        if (verbose)
+            std::cerr << "Euler relation unsatisfied - facets/vertices"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      break;
+    }
+  case 1:
+    {
+        
+      if(number_of_vertices() <= 1) {
+        if (verbose)
+          std::cerr << "wrong number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+        
+      size_type vertex_count;
+      if ( ! count_vertices(vertex_count,verbose,level) )
+          return false;
+      if ( number_of_vertices() != vertex_count ) {
+        if (verbose)
+            std::cerr << "false number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      size_type edge_count;
+      if ( ! count_edges(edge_count,verbose,level) )
+          return false;
+      // Euler for edges
+      if ( edge_count != vertex_count ) {
+        if (verbose)
+            std::cerr << "false number of edges" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      break;
+    }
+  case 0:
+    {
+      if ( number_of_vertices() < 2 ) {
+        if (verbose)
+            std::cerr << "less than 2 vertices but dimension 0" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      // no break; continue
+    }
+  case -1:
+    {
+      if ( number_of_vertices() < 1 ) {
+        if (verbose)
+          std::cerr << "no vertex but dimension -1" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      // vertex count
+      size_type vertex_count;
+      if ( ! count_vertices(vertex_count,verbose,level) )
+        return false;
+      if ( number_of_vertices() != vertex_count ) {
+        if (verbose)
+          std::cerr << "false number of vertices" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+    }
+  } // end switch
+  if (verbose)
+      std::cerr << "valid data structure" << std::endl;
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_valid(Vertex_handle v, bool verbose, int level) const
+{
+  bool result = v->is_valid(verbose,level);
+  result = result && v->cell()->has_vertex(v);
+  if ( ! result ) {
+    if ( verbose )
+      std::cerr << "invalid vertex" << std::endl;
+    CGAL_triangulation_assertion(false);
+  }
+  return result;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+is_valid(Cell_handle c, bool verbose, int level) const
+{
+    if ( ! c->is_valid(verbose, level) )
+        return false;
+
+    switch (dimension()) {
+    case -2:
+    case -1:
+    {
+      if ( c->vertex(0) == Vertex_handle() ) {
+        if (verbose)
+            std::cerr << "vertex 0 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      is_valid(c->vertex(0),verbose,level);
+      if ( c->vertex(1) != Vertex_handle() || c->vertex(2) != Vertex_handle()) {
+        if (verbose)
+            std::cerr << "vertex 1 or 2 != NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      if ( c->neighbor(0) != Cell_handle() ||
+           c->neighbor(1) != Cell_handle() ||
+           c->neighbor(2) != Cell_handle()) {
+        if (verbose)
+            std::cerr << "one neighbor != NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      break;
+    }
+
+    case 0:
+      {
+      if ( c->vertex(0) == Vertex_handle() ) {
+        if (verbose)
+            std::cerr << "vertex 0 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      is_valid(c->vertex(0),verbose,level);
+      if ( c->neighbor (0) == Cell_handle() ) {
+        if (verbose)
+            std::cerr << "neighbor 0 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      if ( c->vertex(1) != Vertex_handle() ||
+           c->vertex(2) != Vertex_handle() ) {
+        if (verbose)
+            std::cerr << "vertex 1 or 2 != NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      if ( c->neighbor(1) != Cell_handle() ||
+           c->neighbor(2) != Cell_handle() ) {
+        if (verbose)
+            std::cerr << "neighbor 1 or 2 != NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      if ( ! c->neighbor(0)->has_vertex(c->vertex(0)) ) {
+        if (verbose)
+            std::cerr << "neighbor 0 does not have vertex 0" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      break;
+      }
+
+    case 1:
+      {
+      Vertex_handle v0 = c->vertex(0);
+      Vertex_handle v1 = c->vertex(1);
+      Cell_handle n0 = c->neighbor(0);
+      Cell_handle n1 = c->neighbor(1);
+
+      if ( v0 == Vertex_handle() || v1 == Vertex_handle() ) {
+        if (verbose)
+            std::cerr << "vertex 0 or 1 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      is_valid(c->vertex(0),verbose,level);
+      is_valid(c->vertex(1),verbose,level);
+      if ( n0 == Cell_handle() || n1 == Cell_handle() ) {
+        if (verbose)
+            std::cerr << "neighbor 0 or 1 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      if ( v0 !=  n1->vertex(1) ) {
+        if (verbose)
+            std::cerr << "neighbor 1 does not have vertex 0 as vertex 1"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      if ( v1 != n0->vertex(0) ) {
+        if (verbose)
+            std::cerr << "neighbor 0 does not have vertex 1 as vertex 0"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      if ( n0->neighbor(1) != c ) {
+        if (verbose)
+            std::cerr << "neighbor 0 does not have this as neighbor 1"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      if ( n1->neighbor(0) != c ) {
+        if (verbose)
+            std::cerr << "neighbor 1 does not have this as neighbor 0"
+                      << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+
+      break;
+      }
+
+    case 2:
+      {
+      if ( c->vertex(0) == Vertex_handle() ||
+           c->vertex(1) == Vertex_handle() ||
+           c->vertex(2) == Vertex_handle() ) {
+        if (verbose)
+            std::cerr << "vertex 0, 1, or 2 NULL" << std::endl;
+        CGAL_triangulation_assertion(false);
+        return false;
+      }
+      is_valid(c->vertex(0),verbose,level);
+      is_valid(c->vertex(1),verbose,level);
+      is_valid(c->vertex(2),verbose,level);
+      int in;
+      Cell_handle n;
+      for(int i = 0; i < 3; i++) {
+        n = c->neighbor(i);
+        if ( n == Cell_handle() ) {
+          if (verbose)
+              std::cerr << "neighbor " << i << " NULL" << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+        if ( ! n->has_vertex(c->vertex(cw(i)),in ) ) {
+          if (verbose)
+              std::cerr << "vertex " << cw(i)
+                        << " not vertex of neighbor " << i << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+        in = cw(in);
+        if ( n->neighbor(in) != c ) {
+          if (verbose)
+              std::cerr << "neighbor " << i
+                        << " does not have this as neighbor "
+                        << in << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+        if ( c->vertex(ccw(i)) != n->vertex(cw(in)) ) {
+          if (verbose)
+              std::cerr << "vertex " << ccw(i)
+                        << " is not vertex " << cw(in)
+                        << " of neighbor " << i << std::endl;
+          CGAL_triangulation_assertion(false);
+          return false;
+        }
+      }
+      break;
+      }
+
+    case 3:
+      {
+        int i;
+        for(i = 0; i < 4; i++) {
+          if ( c->vertex(i) == Vertex_handle() ) {
+            if (verbose)
+                std::cerr << "vertex " << i << " NULL" << std::endl;
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+          is_valid(c->vertex(i),verbose,level);
+        }
+
+        for(i = 0; i < 4; i++) {
+          Cell_handle n = c->neighbor(i);
+          if ( n == Cell_handle() ) {
+            if (verbose)
+              std::cerr << "neighbor " << i << " NULL" << std::endl;
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+
+          int in = 5;
+          // if ( ! n->has_neighbor(handle(), in) ) {
+          if ( n->neighbor(0) == c) in = 0;
+          if ( n->neighbor(1) == c) in = 1;
+          if ( n->neighbor(2) == c) in = 2;
+          if ( n->neighbor(3) == c) in = 3;
+          if (in == 5) {
+            if (verbose)
+              std::cerr << "neighbor of c has not c as neighbor" << std::endl;
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+        
+          int j1n,j2n,j3n;
+          if ( ! n->has_vertex(c->vertex((i+1)&3),j1n) ) {
+            if (verbose) { std::cerr << "vertex " << ((i+1)&3)
+                                     << " not vertex of neighbor "
+                                     << i << std::endl; }
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+          if ( ! n->has_vertex(c->vertex((i+2)&3),j2n) ) {
+            if (verbose) { std::cerr << "vertex " << ((i+2)&3)
+                                     << " not vertex of neighbor "
+                                     << i << std::endl; }
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+          if ( ! n->has_vertex(c->vertex((i+3)&3),j3n) ) {
+            if (verbose) { std::cerr << "vertex " << ((i+3)&3)
+                                     << " not vertex of neighbor "
+                                     << i << std::endl; }
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+        
+          if ( in+j1n+j2n+j3n != 6) {
+            if (verbose) { std::cerr << "sum of the indices != 6 "
+                                     << std::endl; }
+            CGAL_triangulation_assertion(false);
+            return false;
+          }
+        
+          // tests whether the orientations of this and n are consistent
+          if ( ((i+in)&1) == 0 ) { // i and in have the same parity
+            if ( j1n == ((in+1)&3) ) {
+              if ( ( j2n != ((in+3)&3) ) || ( j3n != ((in+2)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+            if ( j1n == ((in+2)&3) ) {
+              if ( ( j2n != ((in+1)&3) ) || ( j3n != ((in+3)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+            if ( j1n == ((in+3)&3) ) {
+              if ( ( j2n != ((in+2)&3) ) || ( j3n != ((in+1)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+          }
+          else { // i and in do not have the same parity
+            if ( j1n == ((in+1)&3) ) {
+              if ( ( j2n != ((in+2)&3) ) || ( j3n != ((in+3)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+            if ( j1n == ((in+2)&3) ) {
+              if ( ( j2n != ((in+3)&3) ) || ( j3n != ((in+1)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+            if ( j1n == ((in+3)&3) ) {
+              if ( ( j2n != ((in+1)&3) ) || ( j3n != ((in+2)&3) ) ) {
+                if (verbose)
+                  std::cerr << " pb orientation with neighbor "
+                            << i << std::endl;
+                CGAL_triangulation_assertion(false);
+                return false;
+              }
+            }
+          }
+        } // end looking at neighbors
+      }// end case dim 3
+    } // end switch
+    return true;
+}
+
+template <class Vb, class Cb, class Ct>
+template <class TDS_src,class ConvertVertex,class ConvertCell>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+copy_tds(const TDS_src& tds,
+        typename TDS_src::Vertex_handle vert,
+        const ConvertVertex& convert_vertex,
+        const ConvertCell& convert_cell)
+{
+  CGAL_triangulation_expensive_precondition( vert == Vertex_handle()
+                                          || tds.is_vertex(vert) );
+
+  clear();
+
+  size_type n = tds.number_of_vertices();
+  set_dimension(tds.dimension());
+
+  if (n == 0)  return Vertex_handle(); 
+
+  // Number of pointers to cell/vertex to copy per cell.
+  int dim = (std::max)(1, dimension() + 1);
+
+  // Create the vertices.
+  std::vector<typename TDS_src::Vertex_handle> TV(n);
+  size_type i = 0;
+
+  for (typename TDS_src::Vertex_iterator vit = tds.vertices_begin();
+       vit != tds.vertices_end(); ++vit)
+    TV[i++] = vit;
+
+  CGAL_triangulation_assertion( i == n );
+
+  Unique_hash_map< typename TDS_src::Vertex_handle,Vertex_handle > V;
+  Unique_hash_map< typename TDS_src::Cell_handle,Cell_handle > F;
+  
+  for (i=0; i <= n-1; ++i){
+    Vertex_handle vh=create_vertex( convert_vertex(*TV[i]) );
+    V[ TV[i] ] = vh;
+    convert_vertex(*TV[i],*vh);
+  }
+
+  // Create the cells.
+  for (typename TDS_src::Cell_iterator cit = tds.cells().begin();
+          cit != tds.cells_end(); ++cit) {
+      Cell_handle ch=create_cell(convert_cell(*cit));
+      F[cit]=ch;
+      for (int j = 0; j < dim; j++)
+        ch->set_vertex(j, V[cit->vertex(j)] );
+      convert_cell(*cit,*ch);
+  }
+
+  // Link the vertices to a cell.
+  for (typename TDS_src::Vertex_iterator vit2 = tds.vertices_begin();
+       vit2 != tds.vertices_end(); ++vit2)
+    V[vit2]->set_cell( F[vit2->cell()] );
+
+  // Hook neighbor pointers of the cells.
+  for (typename TDS_src::Cell_iterator cit2 = tds.cells().begin();
+          cit2 != tds.cells_end(); ++cit2) {
+    for (int j = 0; j < dim; j++)
+      F[cit2]->set_neighbor(j, F[cit2->neighbor(j)] );
+  }
+
+  CGAL_triangulation_postcondition( is_valid() );
+
+  return (vert != typename TDS_src::Vertex_handle()) ? V[vert] : Vertex_handle();
+}
+
+//utilities for copy_tds
+namespace internal { namespace TDS_3{
+  template <class Vertex_src,class Vertex_tgt>
+  struct Default_vertex_converter
+  {
+    Vertex_tgt operator()(const Vertex_src& src) const {
+      return Vertex_tgt(src.point());
+    }
+    
+    void operator()(const Vertex_src&,Vertex_tgt&) const {}
+  };
+
+  template <class Cell_src,class Cell_tgt>
+  struct Default_cell_converter
+  {
+    Cell_tgt operator()(const Cell_src&) const {
+      return Cell_tgt();
+    }
+    
+    void operator()(const Cell_src&,Cell_tgt&) const {}
+  };
+  
+  template <class Vertex>
+  struct Default_vertex_converter<Vertex,Vertex>
+  {
+    const Vertex& operator()(const Vertex& src) const {
+      return src;
+    }
+    
+    void operator()(const Vertex&,Vertex&) const {}
+  };
+  
+  template <class Cell>
+  struct Default_cell_converter<Cell,Cell>{
+    const Cell& operator()(const Cell& src) const {
+      return src;
+    } 
+    
+    void operator()(const Cell&,Cell&) const {}
+  };
+} } //namespace internal::TDS_3
+
+template <class Vb, class Cb, class Ct>
+template<class TDS_src>
+typename Triangulation_data_structure_3<Vb,Cb,Ct>::Vertex_handle
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+copy_tds(const TDS_src& src,typename TDS_src::Vertex_handle vert)
+{
+  internal::TDS_3::Default_vertex_converter<typename TDS_src::Vertex,Vertex> setv;
+  internal::TDS_3::Default_cell_converter<typename TDS_src::Cell,Cell>  setc;
+  return copy_tds(src,vert,setv,setc);
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+swap(Tds & tds)
+{
+  CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid());
+
+  std::swap(_dimension, tds._dimension);
+  cells().swap(tds.cells());
+  vertices().swap(tds.vertices());
+}
+
+template <class Vb, class Cb, class Ct>
+void
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+clear()
+{
+  cells().clear();
+  vertices().clear();
+  set_dimension(-2);
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+count_vertices(size_type & i, bool verbose, int level) const
+  // counts AND checks the validity
+{
+  i = 0;
+
+  for (Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) {
+    if ( ! is_valid(it,verbose,level) ) {
+      if (verbose)
+          std::cerr << "invalid vertex" << std::endl;
+      CGAL_triangulation_assertion(false);
+      return false;
+    }
+    ++i;
+  }
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+count_facets(size_type & i, bool verbose, int level) const
+  // counts but does not check
+{
+  i = 0;
+
+  for (Facet_iterator it = facets_begin(); it != facets_end(); ++it) {
+    if ( ! is_valid((*it).first,verbose, level) ) {
+      if (verbose)
+          std::cerr << "invalid facet" << std::endl;
+      CGAL_triangulation_assertion(false);
+      return false;
+    }
+    ++i;
+  }
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+count_edges(size_type & i, bool verbose, int level) const
+  // counts but does not check
+{
+  i = 0;
+
+  for (Edge_iterator it = edges_begin(); it != edges_end(); ++it) {
+    if ( ! is_valid((*it).first,verbose, level) ) {
+      if (verbose)
+          std::cerr << "invalid edge" << std::endl;
+      CGAL_triangulation_assertion(false);
+      return false;
+    }
+    ++i;
+  }
+  return true;
+}
+
+template <class Vb, class Cb, class Ct>
+bool
+Triangulation_data_structure_3<Vb,Cb,Ct>::
+count_cells(size_type & i, bool verbose, int level) const
+  // counts AND checks the validity
+{
+  i = 0;
+
+  for (Cell_iterator it = cells_begin(); it != cells_end(); ++it) {
+    if ( ! is_valid(it,verbose, level) ) {
+      if (verbose)
+          std::cerr << "invalid cell" << std::endl;
+      CGAL_triangulation_assertion(false);
+      return false;
+    }
+    ++i;
+  }
+  return true;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_DATA_STRUCTURE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_using_list_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_using_list_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_data_structure_using_list_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_data_structure_using_list_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_default_data_structure_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_default_data_structure_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_default_data_structure_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_default_data_structure_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_cell_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_cell_base_3.h
new file mode 100644
index 0000000..27a608a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_cell_base_3.h
@@ -0,0 +1,272 @@
+// Copyright (c) 1999-2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Monique Teillaud <Monique.Teillaud at sophia.inria.fr>
+//                 Sylvain Pion
+
+// cell of a triangulation data structure of any dimension <=3
+
+#ifndef CGAL_TRIANGULATION_DS_CELL_BASE_3_H
+#define CGAL_TRIANGULATION_DS_CELL_BASE_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/triangulation_assertions.h>
+#include <CGAL/internal/Dummy_tds_3.h>
+
+namespace CGAL {
+
+template < typename TDS = void >
+class Triangulation_ds_cell_base_3
+{
+public:
+  typedef TDS                           Triangulation_data_structure;
+  typedef typename TDS::Vertex_handle   Vertex_handle;
+  typedef typename TDS::Cell_handle     Cell_handle;
+  typedef typename TDS::Vertex          Vertex;
+  typedef typename TDS::Cell            Cell;
+  typedef typename TDS::Cell_data       TDS_data;
+
+  template <typename TDS2>
+  struct Rebind_TDS { typedef Triangulation_ds_cell_base_3<TDS2> Other; };
+
+  Triangulation_ds_cell_base_3() 
+  {
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+    mark = -1;
+    mark2 = -1;
+#endif
+  }
+
+  Triangulation_ds_cell_base_3(Vertex_handle v0, Vertex_handle v1,
+                               Vertex_handle v2, Vertex_handle v3)
+#ifndef CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
+    : V{v0, v1, v2, v3}
+  {
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+    mark = -1;
+    mark2 = -1;
+#endif
+  }
+#else
+  {
+    set_vertices(v0, v1, v2, v3);
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+    mark = -1;
+    mark2 = -1;
+#endif
+  }
+#endif
+
+  Triangulation_ds_cell_base_3(Vertex_handle v0, Vertex_handle v1,
+                               Vertex_handle v2, Vertex_handle v3,
+                               Cell_handle   n0, Cell_handle   n1,
+                               Cell_handle   n2, Cell_handle   n3)
+#ifndef CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
+    : N{n0, n1, n2, n3}, V{v0, v1, v2, v3} {}
+#else
+  {
+    set_neighbors(n0, n1, n2, n3);
+    set_vertices(v0, v1, v2, v3);
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+    mark = -1;
+    mark2 = -1;
+#endif
+  }
+#endif
+
+  // ACCESS FUNCTIONS
+
+  Vertex_handle vertex(int i) const
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3 );
+    CGAL_assume( i >= 0 && i <= 3 );
+    return V[i];
+  }
+
+  bool has_vertex(Vertex_handle v) const
+  {
+    return (V[0] == v) || (V[1] == v) || (V[2]== v) || (V[3]== v);
+  }
+
+  bool has_vertex(Vertex_handle v, int & i) const
+    {
+      if (v == V[0]) { i = 0; return true; }
+      if (v == V[1]) { i = 1; return true; }
+      if (v == V[2]) { i = 2; return true; }
+      if (v == V[3]) { i = 3; return true; }
+      return false;
+    }
+
+  int index(Vertex_handle v) const
+  {
+    if (v == V[0]) { return 0; }
+    if (v == V[1]) { return 1; }
+    if (v == V[2]) { return 2; }
+    CGAL_triangulation_assertion( v == V[3] );
+    return 3;
+  }
+
+  Cell_handle neighbor(int i) const
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    return N[i];
+  }
+
+  bool has_neighbor(Cell_handle n) const
+  {
+    return (N[0] == n) || (N[1] == n) || (N[2] == n) || (N[3] == n);
+  }
+
+  bool has_neighbor(Cell_handle n, int & i) const
+  {
+    if(n == N[0]){ i = 0; return true; }
+    if(n == N[1]){ i = 1; return true; }
+    if(n == N[2]){ i = 2; return true; }
+    if(n == N[3]){ i = 3; return true; }
+    return false;
+  }
+
+  int index(Cell_handle n) const
+  {
+    if (n == N[0]) return 0;
+    if (n == N[1]) return 1;
+    if (n == N[2]) return 2;
+    CGAL_triangulation_assertion( n == N[3] );
+    return 3;
+  }
+
+  // SETTING
+
+  void set_vertex(int i, Vertex_handle v)
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    V[i] = v;
+  }
+
+  void set_neighbor(int i, Cell_handle n)
+  {
+    CGAL_triangulation_precondition( i >= 0 && i <= 3);
+    CGAL_triangulation_precondition( this != &*n );
+    N[i] = n;
+  }
+
+  void set_vertices()
+  {
+    V[0] = V[1] = V[2] = V[3] = Vertex_handle();
+  }
+
+  void set_vertices(Vertex_handle v0, Vertex_handle v1,
+                    Vertex_handle v2, Vertex_handle v3)
+  {
+    V[0] = v0;
+    V[1] = v1;
+    V[2] = v2;
+    V[3] = v3;
+  }
+
+  void set_neighbors()
+  {
+    N[0] = N[1] = N[2] = N[3] = Cell_handle();
+  }
+
+  void set_neighbors(Cell_handle n0, Cell_handle n1,
+                     Cell_handle n2, Cell_handle n3)
+  {
+    CGAL_triangulation_precondition( this != &*n0 );
+    CGAL_triangulation_precondition( this != &*n1 );
+    CGAL_triangulation_precondition( this != &*n2 );
+    CGAL_triangulation_precondition( this != &*n3 );
+    N[0] = n0;
+    N[1] = n1;
+    N[2] = n2;
+    N[3] = n3;
+  }
+
+  // CHECKING
+
+  // the following trivial is_valid allows
+  // the user of derived cell base classes
+  // to add their own purpose checking
+  bool is_valid(bool = false, int = 0) const
+  { return true; }
+
+  // This is here in the *ds*_cell_base to ease its use as default
+  // template parameter, so that the .dual() functions of Delaunay_3
+  // still work.
+  template < typename Traits >
+  typename Traits::Point_3
+  circumcenter(const Traits& gt) const
+  {
+    return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
+                                                this->vertex(1)->point(),
+                                                this->vertex(2)->point(),
+                                                this->vertex(3)->point());
+  }
+
+  // For use by Compact_container.
+  void * for_compact_container() const { return N[0].for_compact_container(); }
+  void * & for_compact_container()     { return N[0].for_compact_container(); }
+
+  // TDS internal data access functions.
+        TDS_data& tds_data()       { return _tds_data; }
+  const TDS_data& tds_data() const { return _tds_data; }
+  
+#ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED
+  int mark;
+  int mark2;
+#endif
+
+private:
+
+  Cell_handle   N[4];
+  Vertex_handle V[4];
+  TDS_data      _tds_data;
+};
+
+template < class TDS >
+inline
+std::istream&
+operator>>(std::istream &is, Triangulation_ds_cell_base_3<TDS> &)
+  // non combinatorial information. Default = nothing
+{
+  return is;
+}
+
+template < class TDS >
+inline
+std::ostream&
+operator<<(std::ostream &os, const Triangulation_ds_cell_base_3<TDS> &)
+  // non combinatorial information. Default = nothing
+{
+  return os;
+}
+
+// Specialization for void.
+template <>
+class Triangulation_ds_cell_base_3<void>
+{
+public:
+  typedef internal::Dummy_tds_3                         Triangulation_data_structure;
+  typedef Triangulation_data_structure::Vertex_handle   Vertex_handle;
+  typedef Triangulation_data_structure::Cell_handle     Cell_handle;
+  template <typename TDS2>
+  struct Rebind_TDS { typedef Triangulation_ds_cell_base_3<TDS2> Other; };
+};
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_DS_CELL_BASE_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_circulators_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_circulators_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_circulators_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_circulators_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_face_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_face_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_face_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_face_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_full_cell.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_full_cell.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_full_cell.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_full_cell.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_iterators_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_iterators_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_iterators_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_iterators_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_ds_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_ds_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_xy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_xy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_xy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_xy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_xz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_xz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_xz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_xz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_yz_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_yz_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_euclidean_traits_yz_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_euclidean_traits_yz_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_face.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_face.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_face.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_face.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_face_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_face_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_face_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_face_base_with_info_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_face_base_with_info_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_face_base_with_info_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_face_base_with_info_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_full_cell.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_full_cell.h
new file mode 100644
index 0000000..1a09747
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_full_cell.h
@@ -0,0 +1,164 @@
+// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)    : Samuel Hornus
+
+#ifndef CGAL_TRIANGULATION_SIMPLEX_H
+#define CGAL_TRIANGULATION_SIMPLEX_H
+
+#include <CGAL/Triangulation_ds_full_cell.h>
+#include <CGAL/internal/Triangulation/utilities.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/Default.h>
+
+namespace CGAL {
+
+struct No_full_cell_data {};
+
+template< class TriangulationTraits, typename Data_ = No_full_cell_data, class TDSFullCell = Default >
+class Triangulation_full_cell : public Default::Get<TDSFullCell, Triangulation_ds_full_cell<> >::type
+{
+    // The default type for TDSFullCell is Triangulation_ds_full_cell<> :
+    typedef typename Default::Get<TDSFullCell, Triangulation_ds_full_cell<> >::type
+                                                                Base;
+    typedef Triangulation_full_cell<TriangulationTraits, Data_, TDSFullCell>  Self;
+public:
+    typedef Data_                                       Data;
+    typedef typename Base::Vertex_handle                Vertex_handle;
+    typedef typename Base::Vertex_const_handle          Vertex_const_handle;
+    typedef typename Base::Vertex_handle_const_iterator Vertex_handle_const_iterator;
+    typedef typename Base::Full_cell_const_handle       Full_cell_const_handle;
+    typedef typename TriangulationTraits::Point_d       Point;
+    typedef typename TriangulationTraits::Point_d       Point_d;
+
+private: // DATA MEMBERS
+    Data    data_;
+
+public:
+
+    using Base::vertices_begin;
+    using Base::vertices_end;
+
+    template< class TDS2 >
+    struct Rebind_TDS
+    {
+        typedef typename Base::template Rebind_TDS<TDS2>::Other TDSFullCell2;
+        typedef Triangulation_full_cell<TriangulationTraits, Data_, TDSFullCell2> Other;
+    };
+ 
+    Triangulation_full_cell(const int d)
+        : Base(d), data_() {}
+
+    Triangulation_full_cell(const Self & s)
+        : Base(s), data_(s.data_)  {}
+
+    Point circumcenter() const
+    {
+        TriangulationTraits pct;
+        Vertex_handle_const_iterator vhit = vertices_begin();
+        while( vhit != vertices_end() )
+        {
+            if( *vhit == Vertex_const_handle() )
+            {
+                CGAL_warning_msg(false, "too few points; can not compute circumcenter.");
+                return Point();
+            }
+            ++vhit;
+        }
+        return pct.center_of_sphere_d_object()(points_begin(), points_end());
+    }
+
+    const Data & data() const
+    {
+        return data_;
+    }
+
+    Data & data()
+    {
+        return data_;
+    }
+
+    struct Point_from_vertex_handle
+    {
+        typedef Vertex_handle   argument_type;
+        typedef Point           result_type;
+        result_type & operator()(argument_type & x) const
+        {
+            return x->point();
+        }
+        const result_type & operator()(const argument_type & x) const
+        {
+            return x->point();
+        }
+    };
+
+protected:
+
+    typedef CGAL::Iterator_project<
+        Vertex_handle_const_iterator,
+        internal::Triangulation::Point_from_vertex_handle<Vertex_handle, Point>
+    > Point_const_iterator;
+
+    Point_const_iterator points_begin() const
+        { return Point_const_iterator(Base::vertices_begin()); }
+    Point_const_iterator points_end() const
+        { return Point_const_iterator(Base::vertices_end()); }
+};
+
+// FUNCTIONS THAT ARE NOT MEMBER FUNCTIONS:
+
+inline
+std::istream &
+operator>>(std::istream & is, No_full_cell_data &)
+{
+    return is;
+}
+
+inline
+std::ostream &
+operator<<(std::ostream & os, const No_full_cell_data &)
+{
+    return os;
+}
+
+template < typename TDS, typename Data, typename SSP >
+std::ostream &
+operator<<(std::ostream & O, const Triangulation_full_cell<TDS, Data, SSP> & s)
+{
+    /*if( is_ascii(O) )
+    {
+        // os << '\n';
+    }
+    else {}*/
+    O << s.data();
+    return O;
+}
+
+template < typename TDS, typename Data, typename SSP >
+std::istream &
+operator>>(std::istream & I, Triangulation_full_cell<TDS, Data, SSP> & s)
+{
+    /*if( is_ascii(I) )
+    {}
+    else {}*/
+    I >> s.data();
+    return I;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_SIMPLEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_geom_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_geom_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_geom_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_geom_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_hierarchy_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_hierarchy_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_incremental_builder_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_incremental_builder_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_incremental_builder_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_incremental_builder_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_iterator_adaptator.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_iterator_adaptator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_iterator_adaptator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_iterator_adaptator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_line_face_circulator_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_line_face_circulator_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_line_face_circulator_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_line_face_circulator_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_simplex_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_simplex_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_simplex_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_simplex_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_structural_filtering_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_structural_filtering_traits.h
new file mode 100644
index 0000000..b3b05b6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_structural_filtering_traits.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2010  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau__CGAL at normalesup.org>
+// 
+
+#ifndef CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
+#define CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
+
+#include <CGAL/tags.h>
+
+namespace CGAL {
+
+template <typename Geom_traits>
+struct Triangulation_structural_filtering_traits {
+  typedef Tag_false Use_structural_filtering_tag;
+};
+
+} // namespace CGAL
+
+#endif // CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_utils_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_utils_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_utils_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_utils_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_utils_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_utils_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_utils_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_utils_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex.h
new file mode 100644
index 0000000..2a7c75e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex.h
@@ -0,0 +1,129 @@
+// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)    : Samuel Hornus
+
+#ifndef CGAL_TRIANGULATION_VERTEX_H
+#define CGAL_TRIANGULATION_VERTEX_H
+
+#include <CGAL/Triangulation_ds_vertex.h>
+#include <CGAL/Default.h>
+#include <CGAL/Random.h>
+
+namespace CGAL {
+
+struct No_vertex_data {};
+
+template< class TriangulationTraits, typename Data_ = No_vertex_data, class TDSVertex = Default >
+class Triangulation_vertex : public Default::Get<TDSVertex, Triangulation_ds_vertex<> >::type
+{
+    // The default type for TDSVertex is Triangulation_ds_vertex<> :
+    typedef typename Default::Get<TDSVertex, Triangulation_ds_vertex<> >::type
+                                                                Base;
+    typedef Triangulation_vertex<TriangulationTraits, Data_, TDSVertex>    Self;
+public:
+    typedef Data_                                   Data;
+    typedef typename TriangulationTraits::Point_d   Point;
+    typedef typename TriangulationTraits::Point_d   Point_d;
+    typedef typename Base::Full_cell_handle         Full_cell_handle;
+
+    template <typename TDS2>
+    struct Rebind_TDS
+    {
+        typedef typename Base::template Rebind_TDS<TDS2>::Other TDSVertex2;
+        typedef Triangulation_vertex<TriangulationTraits, Data_, TDSVertex2> Other;
+    };
+
+private: // DATA MEMBERS
+    Point       point_;
+    Data        data_;
+
+public:
+    template< typename T >
+    Triangulation_vertex(Full_cell_handle s, const Point & p, const T & t)
+    : Base(s), point_(p), data_(t) {}
+    Triangulation_vertex(Full_cell_handle s, const Point & p)
+    : Base(s), point_(p), data_() {}
+    template< typename T >
+    Triangulation_vertex(const Point & p, const T & t)
+    : Base(), point_(p), data_(t) {}
+    Triangulation_vertex(const Point & p)
+    : Base(), point_(p), data_() {}
+    Triangulation_vertex() : Base(), point_(), data_() {}
+
+    ~Triangulation_vertex() {}
+
+    /// Set the position in space of the vertex to 'p'
+    void set_point(const Point & p)
+    {
+        point_ = p;
+    }
+
+    /// Returns the position in space of the vertex
+    const Point & point() const
+    {
+        return point_;
+    }
+
+    const Data & data() const
+    {
+        return data_;
+    }
+
+    Data & data()
+    {
+        return data_;
+    }
+
+};  // end of Triangulation_vertex
+
+// NON CLASS-MEMBER FUNCTIONS
+
+inline
+std::istream &
+operator>>(std::istream & is, No_vertex_data &)
+{
+    return is;
+}
+
+inline
+std::ostream &
+operator<<(std::ostream & os, const No_vertex_data &)
+{
+    return os;
+}
+
+template < class A, typename Data, class B >
+std::istream &
+operator>>(std::istream & is, Triangulation_vertex<A, Data, B> & v)
+{
+    is >> v.point();
+    return (is >> v.data());
+}
+
+template< class A, typename Data, class B >
+std::ostream &
+operator<<(std::ostream & os, const Triangulation_vertex<A, Data, B> & v)
+{
+    os << v.point();
+    os << v.data();
+    return os;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATION_VERTEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_id_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_id_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_id_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_id_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_info_2.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_info_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_info_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_info_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_info_3.h b/3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_info_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Triangulation_vertex_base_with_info_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Triangulation_vertex_base_with_info_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Trivial_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Trivial_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Trivial_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Trivial_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Two_vertices_parameterizer_3.h b/3rdparty/CGAL-4.8/include/CGAL/Two_vertices_parameterizer_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Two_vertices_parameterizer_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Two_vertices_parameterizer_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Twotuple.h b/3rdparty/CGAL-4.8/include/CGAL/Twotuple.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Twotuple.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Twotuple.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Umbilics.h b/3rdparty/CGAL-4.8/include/CGAL/Umbilics.h
new file mode 100644
index 0000000..a3306c7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Umbilics.h
@@ -0,0 +1,309 @@
+// Copyright (c) 2007  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+#ifndef CGAL_UMBILIC_H_
+#define CGAL_UMBILIC_H_
+
+#include <list>
+#include <vector>
+#include <math.h>
+#include <CGAL/basic.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/PolyhedralSurf_neighbors.h>
+#include <boost/shared_ptr.hpp>
+
+namespace CGAL {
+
+enum Umbilic_type { NON_GENERIC_UMBILIC = 0, ELLIPTIC_UMBILIC, HYPERBOLIC_UMBILIC};
+
+//-------------------------------------------------------------------
+//Umbilic : stores umbilic data, its location given by a vertex, its
+//type and a circle of edges bording a disk containing the vertex
+//------------------------------------------------------------------
+template < class TriangleMesh >
+class Umbilic
+{
+ public:
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor    vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor  halfedge_descriptor;
+  
+  //constructor
+  Umbilic(const TriangleMesh& P,
+          const vertex_descriptor v_init,
+	  const std::list<halfedge_descriptor> contour_init); 
+
+  //access fct
+  vertex_descriptor vertex() const { return v;}
+  Umbilic_type umbilic_type() const { return umb_type;}
+  Umbilic_type& umbilic_type() { return umb_type;}
+  const TriangleMesh& mesh()const { return P;}
+  const std::list<halfedge_descriptor>& contour_list() const { return contour;}
+
+ protected:
+  const TriangleMesh& P;
+  const vertex_descriptor v;
+  Umbilic_type umb_type;
+  const std::list<halfedge_descriptor> contour;
+};
+
+
+//constructor
+template <class TriangleMesh>
+Umbilic<TriangleMesh>::
+Umbilic(const TriangleMesh& P,
+        const vertex_descriptor v_init,
+	const std::list<halfedge_descriptor> contour_init) 
+  : P(P), v(v_init), contour(contour_init)
+{} 
+
+
+template <class TriangleMesh>
+std::ostream& 
+operator<<(std::ostream& out_stream, const Umbilic<TriangleMesh>& umbilic)
+{
+  typedef typename boost::property_map<TriangleMesh,vertex_point_t>::const_type VPM;
+  VPM vpm = get(vertex_point, umbilic.mesh()); 
+  out_stream << "Umbilic at location (" << get(vpm, umbilic.vertex()) <<  ") of type ";
+  switch (umbilic.umbilic_type())
+    {
+    case CGAL::NON_GENERIC_UMBILIC: out_stream << "non generic" << std::endl; break;
+    case CGAL::ELLIPTIC_UMBILIC: out_stream << "elliptic" << std::endl; break;
+    case CGAL::HYPERBOLIC_UMBILIC: out_stream << "hyperbolic" << std::endl; break;
+    default : out_stream << "Something wrong occured for sure..." << std::endl; break;
+    }
+  return out_stream;
+}
+
+
+//---------------------------------------------------------------------------
+//Umbilic_approximation : enable computation of umbilics of a
+//TriangleMesh. It uses the class
+//T_PolyhedralSurf_neighbors to compute topological disk patches
+//around vertices
+//--------------------------------------------------------------------------
+template < class TriangleMesh, class VertexFTMap, class VertexVectorMap >
+class Umbilic_approximation
+{
+  
+  typedef typename boost::property_map<TriangleMesh,vertex_point_t>::const_type VPM;
+  typedef typename boost::property_traits<VPM>::value_type Point_3;
+  typedef typename Kernel_traits<Point_3>::Kernel Kernel;
+ public:
+  typedef typename Kernel::FT       FT;
+  typedef typename Kernel::Vector_3 Vector_3;
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor    vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor  halfedge_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::face_iterator   Facet_const_iterator;
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_iterator  Vertex_const_iterator;
+
+  //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap
+  CGAL_static_assertion((boost::is_same<vertex_descriptor, typename VertexFTMap::key_type>::value));
+  CGAL_static_assertion((boost::is_same<vertex_descriptor, typename VertexVectorMap::key_type>::value));
+  CGAL_static_assertion((boost::is_same<FT, typename VertexFTMap::value_type>::value));
+  CGAL_static_assertion((boost::is_same<Vector_3, typename VertexVectorMap::value_type>::value));
+
+  typedef CGAL::Umbilic<TriangleMesh> Umbilic;
+
+  //constructor : sets propertymaps and the poly_neighbors
+  Umbilic_approximation(const TriangleMesh& P, 
+			const VertexFTMap& vertex2k1_pm, 
+			const VertexFTMap& vertex2k2_pm,
+			const VertexVectorMap& vertex2d1_pm, 
+			const VertexVectorMap& vertex2d2_pm);
+  //identify umbilics as vertices minimizing the function k1-k2 on
+  //their patch and for which the index is not 0. We avoid
+  //potential umbilics whose contours touch the border.
+  template <class OutputIterator>
+  OutputIterator compute(OutputIterator it, FT size);
+
+ protected:
+  const TriangleMesh& P;
+  
+  typedef T_PolyhedralSurf_neighbors<TriangleMesh> Poly_neighbors;
+  boost::shared_ptr<Poly_neighbors> poly_neighbors;
+
+  CGAL::Abs<FT> cgal_abs;
+  CGAL::To_double<FT> To_double;
+
+  //Property maps
+  const VertexFTMap &k1, &k2;
+  const VertexVectorMap &d1, &d2;
+
+  // index: following CW the contour, we choose an orientation for the
+  // max dir of an arbitrary starting point, the max dir field is
+  // oriented on the next point so that the scalar product of the
+  // consecutive vectors is positive.  Adding all the angles between
+  // consecutive vectors around the contour gives ~ -/+180 for a
+  // wedge/trisector, ~ 0 gives a false umbilic, everything else gives
+  // a non_generic umbilic.
+  int compute_type(Umbilic& umb);
+};
+
+
+template < class TriangleMesh,  class VertexFTMap, class VertexVectorMap >
+Umbilic_approximation< TriangleMesh, VertexFTMap, VertexVectorMap >::
+Umbilic_approximation(const TriangleMesh& p, 
+		      const VertexFTMap& vertex2k1_pm, 
+		      const VertexFTMap& vertex2k2_pm,
+		      const VertexVectorMap& vertex2d1_pm, 
+		      const VertexVectorMap& vertex2d2_pm)
+  : P(p), k1(vertex2k1_pm), k2(vertex2k2_pm), 
+    d1(vertex2d1_pm), d2(vertex2d2_pm)
+{
+  CGAL_precondition(is_triangle_mesh(P));
+
+  poly_neighbors = boost::shared_ptr<Poly_neighbors>(new Poly_neighbors(P));
+}
+
+
+template < class TriangleMesh,  class VertexFTMap, class VertexVectorMap >
+template <class OutputIterator>
+OutputIterator Umbilic_approximation< TriangleMesh, VertexFTMap, VertexVectorMap >::
+compute(OutputIterator umbilics_it, FT size)
+{
+  CGAL_precondition( size >= 1 );
+  
+  std::vector<vertex_descriptor> vces;
+  std::list<halfedge_descriptor> contour;
+  FT umbilicEstimatorVertex, umbilicEstimatorNeigh;
+  
+  bool is_umbilic = true;
+
+  //MAIN loop on P vertices
+  Vertex_const_iterator itb, ite;
+  boost::tie(itb,ite) = vertices(P);
+  for (;itb != ite; itb++) {
+    vertex_descriptor vh = *itb;
+    umbilicEstimatorVertex = cgal_abs(k1[vh]-k2[vh]);
+    //reset vector, list and bool
+    vces.clear();
+    contour.clear();
+    is_umbilic = true;
+    //the size of neighbourhood is (size * OneRingSize)
+    poly_neighbors->compute_neighbors(vh, vces, contour, size);
+    
+    
+    // avoid umbilics whose contours touch the border (Note may not be
+    // desirable?)
+    typename std::list<halfedge_descriptor>::const_iterator itb_cont = contour.begin(),
+      ite_cont = contour.end();
+    for (; itb_cont != ite_cont; itb_cont++)
+      if ( is_border(*itb_cont, P) ) {is_umbilic = false; continue;}
+    if (is_umbilic == false) continue;
+    
+    //is v an umbilic?
+    //a priori is_umbilic = true, and it switches to false as soon as a 
+    //  neigh vertex has a lower umbilicEstimator value
+    typename std::vector<vertex_descriptor>::const_iterator itbv = vces.begin(),
+      itev = vces.end();
+    itbv++;
+    for (; itbv != itev; itbv++)
+      {	umbilicEstimatorNeigh = cgal_abs( k1[*itbv] - k2[*itbv] );
+	if ( umbilicEstimatorNeigh < umbilicEstimatorVertex ) 
+	  {is_umbilic = false; break;}
+      }
+    if (is_umbilic == false) continue;
+    
+    //v is an umbilic (wrt the min of k1-k2), compute the index. If
+    //the index is not 0 then we have actually an umbilic which is output
+    Umbilic*  cur_umbilic = new Umbilic(P, vh, contour);
+    if (compute_type(*cur_umbilic) != 0)  *umbilics_it++ = cur_umbilic;
+  }
+  return umbilics_it;
+}
+
+
+template < class TriangleMesh,  class VertexFTMap, class VertexVectorMap >
+int Umbilic_approximation< TriangleMesh, VertexFTMap, VertexVectorMap >::
+compute_type(Umbilic& umb)
+{
+  Vector_3 dir, dirnext, normal;
+  double cosinus, angle=0, angleSum=0;
+  const double  pi=3.141592653589793;
+  vertex_descriptor v;
+  typename std::list<halfedge_descriptor>::const_iterator itb = umb.contour_list().begin(),
+    itlast = --umb.contour_list().end();
+  v = target(*itb, P);
+
+  dir = d1[v];
+  normal = CGAL::cross_product(d1[v], d2[v]);
+
+  //sum angles along the contour
+  do{
+    itb++;
+    v = target(*itb, P);
+    dirnext = d1[v];
+    cosinus = To_double(dir*dirnext);
+    if (cosinus < 0) {dirnext = dirnext*(-1); cosinus *= -1;}
+    if (cosinus>1) cosinus = 1;
+    //orientation of (dir, dirnext, normal)
+    if ( (dir * CGAL::cross_product(dirnext, normal)) > 0) angle = acos(cosinus);
+    else angle = -acos(cosinus);
+    angleSum += angle;
+    dir = dirnext;
+    normal = CGAL::cross_product(d1[v], d2[v]);
+  }
+  while (itb != (itlast));
+  
+  //angle (v_last, v_0)
+  v = target(*umb.contour_list().begin(), P);
+   dirnext = d1[v];
+   cosinus = To_double(dir*dirnext);
+  if (cosinus < 0) {dirnext = dirnext*(-1); cosinus *= -1;}
+  if (cosinus>1) cosinus = 1;
+  if ( (dir * CGAL::cross_product(dirnext, normal)) > 0) angle = acos(cosinus);
+  else angle = -acos(cosinus);
+  angleSum += angle;
+
+  if ((angleSum > (pi/2)) && (angleSum < (3*pi/2))) umb.umbilic_type() = HYPERBOLIC_UMBILIC ;
+  else if ((angleSum < (-pi/2)) && (angleSum > (-3*pi/2))) umb.umbilic_type() = ELLIPTIC_UMBILIC;
+  else if ((angleSum <= (pi/2)) && (angleSum >= (-pi/2))) return 0;//is not considered as an umbilic
+  else umb.umbilic_type() = NON_GENERIC_UMBILIC;
+  return 1;
+}
+
+
+//Global function
+
+template < class TriangleMesh,  
+           class VertexFTMap,
+           class VertexVectorMap,
+           class OutputIterator>
+OutputIterator compute_umbilics(const TriangleMesh &P,
+                                const VertexFTMap& vertex2k1_pm, 
+                                const VertexFTMap& vertex2k2_pm,
+                                const VertexVectorMap& vertex2d1_pm, 
+                                const VertexVectorMap& vertex2d2_pm,
+                                OutputIterator it, 
+                                double size)
+{
+  typedef Umbilic_approximation < TriangleMesh, 
+    VertexFTMap, VertexVectorMap > Umbilic_approximation;
+  
+  Umbilic_approximation umbilic_approximation(P, 
+					      vertex2k1_pm, vertex2k2_pm,
+					      vertex2d1_pm, vertex2d2_pm);
+  return umbilic_approximation.compute(it, size);  
+}
+
+
+
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Uncertain.h b/3rdparty/CGAL-4.8/include/CGAL/Uncertain.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Uncertain.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Uncertain.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Unfiltered_predicate_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Unfiltered_predicate_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Unfiltered_predicate_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Unfiltered_predicate_adaptor.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Union_find.h b/3rdparty/CGAL-4.8/include/CGAL/Union_find.h
new file mode 100644
index 0000000..412c3a0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Union_find.h
@@ -0,0 +1,260 @@
+// Copyright (c) 1997-2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel <seel at mpi-sb.mpg.de>,
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+
+
+#ifndef CGAL_UNION_FIND_H
+#define CGAL_UNION_FIND_H
+
+#include <CGAL/basic.h>
+#include <CGAL/memory.h>
+#include <cstddef>
+
+namespace CGAL {
+
+namespace internal {
+
+template <class PTR_, class V_, class R_, class P_>
+class UF_forward_iterator {
+    PTR_   m_p;
+public:
+    // should be private and Union_find<...> a friend.
+    PTR_   ptr() const { return m_p; }  
+
+    typedef UF_forward_iterator<PTR_, V_, R_, P_> Self;
+    typedef V_                                    value_type;
+    typedef R_                                    reference;
+    typedef P_                                    pointer;
+    typedef std::forward_iterator_tag             iterator_category;
+
+    UF_forward_iterator() : m_p(0) {}
+    UF_forward_iterator(PTR_ p) : m_p(p) {}
+
+    // Allows construction of const_iterator from iterator
+    template <class PPTR, class VV, class RR, class PP>
+    UF_forward_iterator(const UF_forward_iterator<PPTR, VV, RR, PP>& i)
+        : m_p(i.ptr()) {}
+
+    bool      operator==( const Self& x) const { return m_p == x.m_p; }
+    bool      operator!=( const Self& x) const { return !(*this == x); }
+    bool      operator<(const Self& other) const{ return m_p<other.m_p; }
+    bool      operator>(const Self& other) const{ return m_p>other.m_p; }
+    bool      operator<=(const Self& other) const{ return m_p<=other.m_p; }
+    bool      operator>=(const Self& other) const{ return m_p>=other.m_p; }
+
+    reference operator*()  const { return m_p->value; }
+    pointer   operator->() const { return &(m_p->value); }
+    Self&     operator++() {
+                  CGAL_assertion(m_p != 0);
+                  m_p = m_p->next;
+                  return *this;
+    }
+    Self      operator++(int) {
+                  Self tmp = *this;
+                  ++*this;
+                  return tmp;
+    }
+};
+
+} // internal
+
+
+// Union-Find with path compression.
+// --------------------------------------------------------------------
+// An instance of the data type Union_find is a partition of values of
+// type |T| into disjoint sets. The type |A| has to be a model of the
+// allocator concept as defined in the C++ standard.
+
+// Union_find is implemented with union by rank and path compression.
+// The running time for $m$ set operations on $n$ elements is 
+// $O(n \alpha(m,n))$ where $\alpha(m,n)$ is the extremely slow
+// growing inverse of Ackermann's function.
+
+template <typename T, typename A = CGAL_ALLOCATOR(T) > 
+class Union_find {
+    struct Union_find_struct {
+        typedef Union_find_struct* pointer;
+        // friend class Union_find<T,A>;
+        mutable pointer      up;
+        pointer              next;
+        std::size_t          size;
+        T                    value;
+        Union_find_struct( pointer n, const T& x)
+            : up(0), next(n), size(1), value(x) {}
+    };
+
+public:
+    typedef Union_find<T,A>                                  Self;
+    typedef Union_find_struct*                               pointer;
+    typedef const Union_find_struct*                         const_pointer;
+
+    typedef T                                                value_type; 
+    typedef T&                                               reference; 
+    typedef const T&                                         const_reference; 
+
+    typedef internal::UF_forward_iterator< pointer, T, T&, T*>  iterator;
+    typedef iterator                                         handle;
+    typedef internal::UF_forward_iterator< const_pointer, T, const T&, const T*>
+                                                             const_iterator;
+    typedef const_iterator                                   const_handle;
+
+#ifdef _MSC_VER
+    typedef CGAL_ALLOCATOR(Union_find_struct)                allocator;
+#else
+    typedef typename A::template rebind<Union_find_struct>   Rebind;
+    typedef typename Rebind::other                           allocator;
+#endif
+
+private:
+    pointer      m_first;
+    std::size_t  sets;
+    std::size_t  values;
+    allocator    alloc;
+
+    // Private decl. and no definition, thus no copy constructor
+    // and no assignment for this class.
+    Union_find(const Self&);
+    Self& operator=(const Self&);
+
+    pointer find( pointer p) const {
+        CGAL_assertion(p != 0);
+        pointer r = p;
+        while (r->up) 
+            r = r->up; // now r is the root;
+        while (p->up) {
+            pointer u = p->up;
+            p->up = r; // path compression: assign root r as new parent
+            p = u;     // this would need the 'mutable' for the up field
+        }              // if we would have a const_pointer, see the cast
+        return r;      // in the fct. below. We keep the mutable as reminder.
+    }
+    const_pointer find( const_pointer p ) const {
+        return find( const_cast<pointer>(p));
+    }
+    bool is_valid(const_handle v) const { return v != const_handle(0); }
+
+public:
+    Union_find() : m_first(0), sets(0), values(0) {}
+    ~Union_find() { clear(); }
+
+    allocator   get_allocator() const { return alloc; }
+
+    std::size_t number_of_sets() const { return sets; }
+    // returns the number of disjoint sets
+
+    std::size_t size() const { return values; }
+    // returns the number of values
+
+    std::size_t bytes() const {
+    // returns the memory consumed
+        return values * sizeof(Union_find_struct) + sizeof( Self); 
+    }
+
+    std::size_t size( const_handle p) const { return find(p).ptr()->size; }
+    // returns the size of the set containing $p$
+
+    void clear();
+    // reinitializes to an empty partition
+
+    handle make_set(const T& x);
+    // creates a new singleton set containing |x| and returns a handle to it
+
+    handle push_back(const T& x) { return make_set(x); }
+    // same as |make_set(x)|
+
+    template <class Forward_iterator>
+    void insert( Forward_iterator first, Forward_iterator beyond) {
+    // insert the range of values referenced by |[first,beyond)|.
+    // Precond: value type of |Forward_iterator| is |T|.
+        while (first != beyond)
+            push_back(*first++);
+    }
+
+    handle       find( handle p)       const { return find(p.ptr()); }
+
+    const_handle find( const_handle p ) const {
+    // returns a canonical handle of the set that contains |p|,
+    // i.e., |P.same_set(p,q)| iff  |P.find(p)| and |P.find(q)| return
+    // the same handle. Precond: |p| is a handle in the union find structure.
+        return find(p.ptr());
+    }
+
+    void unify_sets(handle p, handle q);
+    // unites the sets of partition containing $p$ and $q$.
+    // Precond: $p$ and $q$ are in the partition.
+
+    bool same_set( const_handle p, const_handle q) const {
+    // returns true iff $p$ and $q$ belong to the same set.
+    // Precond: $p$ and $q$ are in the partition.
+        return find(p) == find(q); 
+    }
+
+    iterator begin() { return iterator(m_first); }
+    iterator end()   { return iterator(0); }
+
+    const_iterator begin() const { return const_iterator(m_first); }
+    const_iterator end()   const { return const_iterator(0); }
+};
+
+template <typename T, typename A>
+typename Union_find<T,A>::handle Union_find<T,A>::make_set(const T& x) {
+    pointer tmp = m_first;
+    m_first = alloc.allocate(1);
+    alloc.construct( m_first, Union_find_struct(tmp,x));
+    ++sets;
+    ++values;
+    return handle( m_first);
+}
+
+template <typename T, typename A>
+void Union_find<T,A>::clear() {
+    while (m_first) { 
+        pointer tmp = m_first->next;
+        alloc.destroy(m_first);
+        alloc.deallocate(m_first,1);
+        m_first = tmp;
+    }
+    sets   = 0;
+    values = 0;
+}
+
+template <typename T, typename A>
+void Union_find<T,A>::unify_sets( handle p, handle q) {
+    CGAL_assertion( is_valid(p) && is_valid(q));
+    pointer pit = find( p.ptr());
+    pointer qit = find( q.ptr());
+    if (pit == qit)
+        return;
+    std::size_t sp = pit->size;
+    std::size_t sq = qit->size;
+    if (sp > sq) 
+        std::swap(pit,qit); // now sp <= sq
+    pit->up = qit;  // linking roots
+    qit->size += pit->size; // updating size
+    --sets;
+}
+
+} //namespace CGAL
+
+#endif // CGAL_UNION_FIND_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Union_of_balls_3.h b/3rdparty/CGAL-4.8/include/CGAL/Union_of_balls_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Union_of_balls_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Union_of_balls_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Unique_hash_map.h b/3rdparty/CGAL-4.8/include/CGAL/Unique_hash_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Unique_hash_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Unique_hash_map.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Vector_2.h b/3rdparty/CGAL-4.8/include/CGAL/Vector_2.h
new file mode 100644
index 0000000..23e3b6e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Vector_2.h
@@ -0,0 +1,352 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_VECTOR_2_H
+#define CGAL_VECTOR_2_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Vector_2 : public R_::Kernel_base::Vector_2
+{
+  typedef typename R_::RT             RT;
+  typedef typename R_::FT             FT;
+  typedef typename R_::Segment_2      Segment_2;
+  typedef typename R_::Ray_2          Ray_2;
+  typedef typename R_::Line_2         Line_2;
+  typedef typename R_::Point_2        Point_2;
+  typedef typename R_::Direction_2    Direction_2;
+  typedef typename R_::Aff_transformation_2  Aff_transformation_2;
+  typedef typename R_::Kernel_base::Vector_2  RVector_2;
+
+  typedef Vector_2                    Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_2>::value));
+
+public:
+
+  typedef Dimension_tag<2>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef RVector_2 Rep;
+  typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef  R_                        R;
+
+  Vector_2() {}
+
+  Vector_2(const RVector_2& v)
+      : RVector_2(v) {}
+
+  Vector_2(const Point_2& a, const Point_2& b)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), a, b)) {}
+
+  explicit Vector_2(const Segment_2 &s)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), s)) {}
+
+  explicit Vector_2(const Ray_2 &r)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), r)) {}
+
+  explicit Vector_2(const Line_2 &l)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), l)) {}
+
+  Vector_2(const Null_vector &v)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), v)) {}
+
+  template < typename T1, typename T2 >
+  Vector_2(const T1 &x, const T2 &y)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y)) {}
+
+  Vector_2(const RT &x, const RT &y, const RT &w)
+      : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y,w)) {}
+
+
+  typename cpp11::result_of<typename R::Compute_x_2(Vector_2)>::type
+  x() const
+  {
+    return R().compute_x_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_y_2(Vector_2)>::type
+  y() const
+  {
+    return R().compute_y_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_y_2(Vector_2)>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) );
+    return (i==0) ?  x() : y();
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_2(Vector_2)>::type
+  operator[](int i) const
+  {
+      return cartesian(i);
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return typename R::Construct_cartesian_const_iterator_2()(*this);
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return typename R::Construct_cartesian_const_iterator_2()(*this,2);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hx_2(Vector_2)>::type
+  hx() const
+  {
+    return R().compute_hx_2_object()(*this);
+  }
+
+
+  typename cpp11::result_of<typename R::Compute_hy_2(Vector_2)>::type
+  hy() const
+  {
+    return R().compute_hy_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hw_2(Vector_2)>::type
+  hw() const
+  {
+    return R().compute_hw_2_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hx_2(Vector_2)>::type
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
+    return (i==0) ?  hx() : (i==1)? hy() : hw();
+  }
+
+  int dimension() const
+  {
+      return 2;
+  }
+
+  Vector_2 operator-() const
+  {
+    return R().construct_opposite_vector_2_object()(*this);
+  }
+
+  Vector_2 operator-(const Vector_2& v) const
+  {
+    return R().construct_difference_of_vectors_2_object()(*this,v);
+  }
+
+  Vector_2 operator+(const Vector_2& v) const
+  {
+    return R().construct_sum_of_vectors_2_object()(*this,v);
+  }
+
+  Vector_2 operator/(const RT& c) const
+  {
+   return R().construct_divided_vector_2_object()(*this,c);
+  }
+
+  Vector_2 operator/(const typename First_if_different<FT,RT>::Type & c) const
+  {
+   return R().construct_divided_vector_2_object()(*this,c);
+  }
+
+  FT squared_length() const
+  {
+    return R().compute_squared_length_2_object()(*this);
+  }
+
+
+  Direction_2 direction() const
+  {
+    return R().construct_direction_2_object()(*this);
+  }
+
+  Vector_2 perpendicular(const Orientation &o) const
+  {
+    return R().construct_perpendicular_vector_2_object()(*this,o);
+  }
+
+  Vector_2 transform(const Aff_transformation_2 &t) const
+  {
+    return t.transform(*this);
+  }
+
+};
+
+
+template < class R >
+inline
+bool
+operator==(const Vector_2<R> &v, const Null_vector &n)
+{
+  return R().equal_2_object()(v, n);
+}
+
+template < class R >
+inline
+bool
+operator==(const Null_vector &n, const Vector_2<R> &v)
+{
+  return v == n;
+}
+
+template < class R >
+inline
+bool
+operator!=(const Vector_2<R> &v, const Null_vector &n)
+{
+  return !(v == n);
+}
+
+template < class R >
+inline
+bool
+operator!=(const Null_vector &n, const Vector_2<R> &v)
+{
+  return !(v == n);
+}
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Vector_2<R>& v, const Cartesian_tag&)
+{
+    switch(get_mode(os)) {
+    case IO::ASCII :
+        return os << v.x() << ' ' << v.y();
+    case IO::BINARY :
+        write(os, v.x());
+        write(os, v.y());
+        return os;
+    default:
+        return os << "VectorC2(" << v.x() << ", " << v.y() << ')';
+    }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Vector_2<R>& v, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << v.hx() << ' ' << v.hy() << ' ' << v.hw();
+    case IO::BINARY :
+        write(os, v.hx());
+        write(os, v.hy());
+        write(os, v.hw());
+        return os;
+    default:
+        return os << "VectorH2(" << v.hx() << ", "
+                                 << v.hy() << ", "
+                                 << v.hw() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Vector_2<R>& v)
+{
+  return insert(os, v, typename R::Kernel_tag() );
+}
+
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Vector_2<R>& v, const Cartesian_tag&)
+{
+    typename R::FT x, y;
+    switch(get_mode(is)) {
+    case IO::ASCII :
+        is >> iformat(x) >> iformat(y);
+        break;
+    case IO::BINARY :
+        read(is, x);
+        read(is, y);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+    }
+    if (is)
+        v = Vector_2<R>(x, y);
+    return is;
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Vector_2<R>& v, const Homogeneous_tag&)
+{
+  typename R::RT hx, hy, hw;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> hx >> hy >> hw;
+        break;
+    case IO::BINARY :
+        read(is, hx);
+        read(is, hy);
+        read(is, hw);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  v = Vector_2<R>(hx, hy, hw);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Vector_2<R>& v)
+{
+  return extract(is, v, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_VECTOR_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Vector_3.h b/3rdparty/CGAL-4.8/include/CGAL/Vector_3.h
new file mode 100644
index 0000000..5f18d04
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Vector_3.h
@@ -0,0 +1,334 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+#ifndef CGAL_VECTOR_3_H
+#define CGAL_VECTOR_3_H
+
+#include <CGAL/Origin.h>
+#include <CGAL/Kernel/mpl.h>
+#include <CGAL/representation_tags.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_same.hpp>
+#include <CGAL/Kernel/Return_base_tag.h>
+#include <CGAL/Dimension.h>
+
+namespace CGAL {
+
+template <class R_>
+class Vector_3 : public R_::Kernel_base::Vector_3
+{
+  typedef typename R_::RT                    RT;
+// http://doc.cgal.org/latest/Manual/devman_code_format.html#secprogramming_conventions
+  typedef typename R_::FT                    FT_;
+  typedef typename R_::Segment_3             Segment_3;
+  typedef typename R_::Ray_3                 Ray_3;
+  typedef typename R_::Line_3                Line_3;
+  typedef typename R_::Point_3               Point_3;
+  typedef typename R_::Direction_3           Direction_3;
+  typedef typename R_::Aff_transformation_3  Aff_transformation_3;
+
+  typedef Vector_3                            Self;
+  CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_3>::value));
+
+public:
+
+  typedef Dimension_tag<3>  Ambient_dimension;
+  typedef Dimension_tag<0>  Feature_dimension;
+
+  typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator;
+  typedef typename R_::Kernel_base::Vector_3      Rep;
+
+  const Rep& rep() const
+  {
+    return *this;
+  }
+
+  Rep& rep()
+  {
+    return *this;
+  }
+
+  typedef          R_                       R;
+
+  Vector_3() {}
+
+  Vector_3(const Rep& v)
+      : Rep(v) {}
+
+  Vector_3(const Point_3& a, const Point_3& b)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), a, b)) {}
+
+  explicit Vector_3(const Segment_3& s)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), s)) {}
+
+  explicit Vector_3(const Ray_3& r)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), r)) {}
+
+  explicit Vector_3(const Line_3& l)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), l)) {}
+
+  Vector_3(const Null_vector& v)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), v)) {}
+
+  template < typename T1, typename T2, typename T3 >
+  Vector_3(const T1 &x, const T2 &y, const T3 &z)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z)) {}
+
+  Vector_3(const RT& x, const RT& y, const RT& z, const RT& w)
+    : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z, w)) {}
+
+  Direction_3 direction() const
+  {
+    return R().construct_direction_3_object()(*this);
+  }
+
+  Vector_3 transform(const Aff_transformation_3 &t) const
+  {
+    return t.transform(*this);
+  }
+
+  Vector_3 operator-() const
+  {
+    return R().construct_opposite_vector_3_object()(*this);
+  }
+
+  Vector_3 operator-(const Vector_3& v) const
+  {
+    return R().construct_difference_of_vectors_3_object()(*this,v);
+  }
+
+  Vector_3 operator+(const Vector_3& v) const
+  {
+    return R().construct_sum_of_vectors_3_object()(*this,v);
+  }
+
+  Vector_3 operator/(const RT& c) const
+  {
+   return R().construct_divided_vector_3_object()(*this,c);
+  }
+
+  Vector_3 operator/(const typename First_if_different<FT_,RT>::Type & c) const
+  {
+   return R().construct_divided_vector_3_object()(*this,c);
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
+  x() const
+  {
+    return R().compute_x_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_y_3(Vector_3)>::type
+  y() const
+  {
+    return R().compute_y_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_z_3(Vector_3)>::type
+  z() const
+  {
+    return R().compute_z_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hx_3(Vector_3)>::type
+  hx() const
+  {
+    return R().compute_hx_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hy_3(Vector_3)>::type
+  hy() const
+  {
+    return R().compute_hy_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hz_3(Vector_3)>::type
+  hz() const
+  {
+    return R().compute_hz_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_hw_3(Vector_3)>::type
+  hw() const
+  {
+    return R().compute_hw_3_object()(*this);
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
+  cartesian(int i) const
+  {
+    CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
+    if (i==0) return x();
+    if (i==1) return y();
+    return z();
+  }
+
+  typename cpp11::result_of<typename R::Compute_hw_3(Vector_3)>::type
+  homogeneous(int i) const
+  {
+    CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
+    if (i==0) return hx();
+    if (i==1) return hy();
+    if (i==2) return hz();
+    return hw();
+  }
+
+  int dimension() const
+  {
+      return 3;
+  }
+
+  typename cpp11::result_of<typename R::Compute_x_3(Vector_3)>::type
+  operator[](int i) const
+  {
+      return cartesian(i);
+  }
+
+  Cartesian_const_iterator cartesian_begin() const
+  {
+    return typename R::Construct_cartesian_const_iterator_3()(*this);
+  }
+
+  Cartesian_const_iterator cartesian_end() const
+  {
+    return typename R::Construct_cartesian_const_iterator_3()(*this,3);
+  }
+
+  typename cpp11::result_of<typename R::Compute_squared_length_3(Vector_3)>::type
+  squared_length() const
+  {
+    return R().compute_squared_length_3_object()(*this);
+  }
+
+};
+
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Vector_3<R>& v, const Cartesian_tag&) 
+{
+  switch(get_mode(os)) {
+    case IO::ASCII :
+      return os << v.x() << ' ' << v.y()  << ' ' << v.z();
+    case IO::BINARY :
+      write(os, v.x());
+      write(os, v.y());
+      write(os, v.z());
+      return os;
+    default:
+      os << "VectorC3(" << v.x() << ", " << v.y() <<  ", " << v.z() << ")";
+      return os;
+  }
+}
+
+template <class R >
+std::ostream&
+insert(std::ostream& os, const Vector_3<R>& v, const Homogeneous_tag&)
+{
+  switch(get_mode(os))
+  {
+    case IO::ASCII :
+        return os << v.hx() << ' ' << v.hy() << ' ' << v.hz() << ' ' << v.hw();
+    case IO::BINARY :
+        write(os, v.hx());
+        write(os, v.hy());
+        write(os, v.hz());
+        write(os, v.hw());
+        return os;
+    default:
+        return os << "VectorH3(" << v.hx() << ", "
+                                 << v.hy() << ", "
+                                 << v.hz() << ", "
+                                 << v.hw() << ')';
+  }
+}
+
+template < class R >
+std::ostream&
+operator<<(std::ostream& os, const Vector_3<R>& v)
+{
+  return insert(os, v, typename R::Kernel_tag() );
+}
+
+
+template <class R >
+std::istream&
+extract(std::istream& is, Vector_3<R>& v, const Cartesian_tag&) 
+{
+  typename R::FT x, y, z;
+  switch(get_mode(is)) {
+    case IO::ASCII :
+      is >> iformat(x) >> iformat(y) >> iformat(z);
+      break;
+    case IO::BINARY :
+      read(is, x);
+      read(is, y);
+      read(is, z);
+      break;
+    default:
+      std::cerr << "" << std::endl;
+      std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+      break;
+  }
+  if (is)
+      v = Vector_3<R>(x, y, z);
+  return is;
+}
+
+template <class R >
+std::istream&
+extract(std::istream& is, Vector_3<R>& v, const Homogeneous_tag&) 
+{
+  typename R::RT hx, hy, hz, hw;
+  switch(get_mode(is))
+  {
+    case IO::ASCII :
+        is >> hx >> hy >> hz >> hw;
+        break;
+    case IO::BINARY :
+        read(is, hx);
+        read(is, hy);
+        read(is, hz);
+        read(is, hw);
+        break;
+    default:
+        std::cerr << "" << std::endl;
+        std::cerr << "Stream must be in ascii or binary mode" << std::endl;
+        break;
+  }
+  if (is)
+    v = Vector_3<R>(hx, hy, hz, hw);
+  return is;
+}
+
+template < class R >
+std::istream&
+operator>>(std::istream& is, Vector_3<R>& v)
+{
+  return extract(is, v, typename R::Kernel_tag() );
+}
+
+} //namespace CGAL
+
+#endif // CGAL_VECTOR_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Vertex2Data_Property_Map_with_std_map.h b/3rdparty/CGAL-4.8/include/CGAL/Vertex2Data_Property_Map_with_std_map.h
new file mode 100644
index 0000000..158d71a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Vertex2Data_Property_Map_with_std_map.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Pouget and Frédéric Cazals
+
+#ifndef CGAL_VERTEX2DATA_PROPERTY_MAP_WITH_STD_MAP_H
+#define CGAL_VERTEX2DATA_PROPERTY_MAP_WITH_STD_MAP_H 
+
+//---------------------------------------------------------------------------
+//Vertex2Data_Property_Map_with_std_map
+// defines models for Vertex2FTPropertyMap and Vertex2VectorPropertyMap
+//--------------------------------------------------------------------------
+template < class TriangulatedSurfaceMesh >
+class Vertex2Data_Property_Map_with_std_map 
+{
+ public:
+  typedef typename TriangulatedSurfaceMesh::Traits::FT        FT;
+  typedef typename TriangulatedSurfaceMesh::Traits::Vector_3  Vector_3;
+  typedef typename boost::graph_traits<TriangulatedSurfaceMesh>::vertex_descriptor vertex_descriptor;
+
+  typedef std::map<vertex_descriptor, FT> Vertex2FT_map;
+  typedef boost::associative_property_map< Vertex2FT_map > Vertex2FT_property_map;
+
+  typedef std::map<vertex_descriptor, Vector_3> Vertex2Vector_map;
+  typedef boost::associative_property_map< Vertex2Vector_map > Vertex2Vector_property_map;
+};
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Visibility_2/visibility_utils.h b/3rdparty/CGAL-4.8/include/CGAL/Visibility_2/visibility_utils.h
new file mode 100644
index 0000000..e787cc5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Visibility_2/visibility_utils.h
@@ -0,0 +1,435 @@
+// Copyright (c) 2013 Technical University Braunschweig (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s):  Francisc Bungiu <fbungiu at gmail.com>
+//             Michael Hemmer <michael.hemmer at cgal.org>
+
+#ifndef CGAL_VISIBILITY_UTILS_H
+#define CGAL_VISIBILITY_UTILS_H
+
+#include <vector>
+#include <CGAL/tags.h>
+#include <CGAL/enum.h>
+
+namespace CGAL {
+namespace Visibility_2 {
+
+  template <class Arrangement_2>
+int count_edges_in_face(typename Arrangement_2::Face_const_handle fch) {
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator 
+                                                  Ccb_halfedge_const_circulator;
+
+  Ccb_halfedge_const_circulator circ = fch->outer_ccb();
+  Ccb_halfedge_const_circulator curr = circ;
+
+  int edge_cnt(0);
+  do {
+    edge_cnt++;
+  } while (++curr != circ);
+  return edge_cnt;
+}
+
+template <class Edge_const_iterator>
+void print_edge(Edge_const_iterator eit) {
+  std::cout << "[" << eit->curve() << "]" << std::endl;
+}
+template <class Face_const_handle, class Ccb_halfedge_const_circulator>
+void print_simple_face(Face_const_handle fh) {
+  Ccb_halfedge_const_circulator  cir = fh->outer_ccb();
+  Ccb_halfedge_const_circulator  curr = cir;
+  do {
+    std::cout << "[" << curr->curve() << "]" << std::endl;
+  } while (++ curr != cir);
+}
+
+template <class Arrangement_2> 
+void print_arrangement(const Arrangement_2& arr) {
+  typedef typename Arrangement_2::Edge_const_iterator Edge_const_iterator;
+  Edge_const_iterator eit;
+  std::cout << arr.number_of_edges() << " edges:" << std::endl;
+  for (eit = arr.edges_begin(); eit != arr.edges_end(); ++eit)
+    print_edge(eit);
+}
+
+template <class Arrangement_2>
+void print_arrangement_by_face(const Arrangement_2& arr) {
+  typedef typename Arrangement_2::Face_const_iterator     Face_const_iterator;
+  typedef typename Arrangement_2::Ccb_halfedge_const_circulator 
+                                                 Ccb_halfedge_const_circulator;
+  Face_const_iterator f;
+  for (f = arr.faces_begin() ; f != arr.faces_end() ; f++) {
+    if (!f->is_unbounded()) {
+      std::cout << "FACE\n";
+      print_simple_face<Face_const_iterator, Ccb_halfedge_const_circulator>(f);
+      std::cout << "END FACE\n";
+    }
+  }
+}
+
+template <class Geometry_traits_2> 
+Orientation orientation_2(const Geometry_traits_2 *geom_traits,
+                          const typename Geometry_traits_2::Point_2& p, 
+                          const typename Geometry_traits_2::Point_2& q, 
+                          const typename Geometry_traits_2::Point_2& r) {
+
+  typename Geometry_traits_2::Orientation_2 orient = 
+                                          geom_traits->orientation_2_object();
+  return orient(p, q, r);
+}
+
+template <class Geometry_traits_2>
+bool less_distance_to_point_2(const Geometry_traits_2 *geom_traits,
+                           const typename Geometry_traits_2::Point_2& p, 
+                           const typename Geometry_traits_2::Point_2& q, 
+                           const typename Geometry_traits_2::Point_2& r) {
+
+  typename Geometry_traits_2::Less_distance_to_point_2 less_dist = 
+                                geom_traits->less_distance_to_point_2_object();
+  return less_dist(p, q, r);
+}
+
+template <class Geometry_traits_2>
+bool collinear(const Geometry_traits_2 *geom_traits,
+               const typename Geometry_traits_2::Point_2& p,
+               const typename Geometry_traits_2::Point_2& q,
+               const typename Geometry_traits_2::Point_2& r) {
+
+    typename Geometry_traits_2::Collinear_2 collinear_fnct = 
+                                geom_traits->collinear_2_object();
+    return collinear_fnct(p, q, r);
+}
+
+template <class Geometry_traits_2, class _Curve_first, class _Curve_second >
+typename Geometry_traits_2::Object_2 intersect_2(
+        const Geometry_traits_2 *geom_traits,
+        const _Curve_first& s1,
+        const _Curve_second& s2)
+{
+
+  typedef typename Geometry_traits_2::Kernel Kernel;
+  const Kernel *kernel = static_cast<const Kernel*> (geom_traits);
+  typename Kernel::Intersect_2 intersect_fnct = kernel->intersect_2_object();
+  return intersect_fnct(s1, s2);
+}
+
+template <class Geometry_traits_2>
+CGAL::Comparison_result compare_xy_2(
+        const Geometry_traits_2 *geom_traits,
+        const typename Geometry_traits_2::Point_2 &p,
+        const typename Geometry_traits_2::Point_2 &q)
+{
+
+  typename Geometry_traits_2::Compare_xy_2 cmp = 
+                            geom_traits->compare_xy_2_object();
+  return cmp(p, q);
+}
+
+template <class Geometry_traits_2, class Type1, class Type2>
+typename Geometry_traits_2::FT compute_squared_distance_2(  
+                            const Geometry_traits_2 *geom_traits,
+                            const Type1& p, 
+                            const Type2& seg) {
+
+  typename Geometry_traits_2::Compute_squared_distance_2 compute_dist = 
+                              geom_traits->compute_squared_distance_2_object();
+  return compute_dist(p, seg);
+}
+
+template <class Geometry_traits_2, class Type1, class Type2>
+bool do_intersect_2(const Geometry_traits_2 *geom_traits,
+                    const Type1& c1, 
+                    const Type2& c2) {
+
+  typename Geometry_traits_2::Do_intersect_2 intersect = 
+                              geom_traits->do_intersect_2_object();
+  return intersect(c1, c2);
+}
+
+template <class Geometry_traits_2> 
+bool collinear_are_ordered_along_line_2(
+        const Geometry_traits_2 *geom_traits,
+        const typename Geometry_traits_2::Point_2 &p,
+        const typename Geometry_traits_2::Point_2 &q,
+        const typename Geometry_traits_2::Point_2 &r)
+{
+
+  typename Geometry_traits_2::Collinear_are_ordered_along_line_2 coll = 
+                      geom_traits->collinear_are_ordered_along_line_2_object();
+  return coll(p, q, r);
+}
+
+template <class Geometry_traits_2, class Type1, class Type2>
+typename Geometry_traits_2::Point_2 construct_projected_point_2(
+                                const Geometry_traits_2 *geom_traits,
+                                const Type1& s, 
+                                const Type2& p) {
+
+  typedef typename Geometry_traits_2::Point_2         Point_2;
+  typedef typename Geometry_traits_2::FT              Number_type;
+  typename Geometry_traits_2::Construct_projected_point_2 construct_proj =
+                              geom_traits->construct_projected_point_2_object();
+  Point_2 proj_pt = construct_proj(s.supporting_line(), p);
+  if (s.has_on(proj_pt)) {
+    return proj_pt;
+  }
+  else {
+    Number_type d_to_src = compute_squared_distance_2
+        <Geometry_traits_2, Point_2, Point_2>(geom_traits, proj_pt, s.source());
+    Number_type d_to_trg = compute_squared_distance_2
+        <Geometry_traits_2, Point_2, Point_2>(geom_traits, proj_pt, s.target());              
+    if (d_to_src < d_to_trg) {
+      return s.source();
+    }
+    else {
+      return s.target();
+    }
+  }
+}
+
+// construct an arrangement of visibility region from a vector of
+// circular ordered vertices with respect to the query point
+template <class Visibility_2, class Visibility_arrangement_2>
+void report_while_handling_needles(
+  const typename Visibility_2::Arrangement_2::Geometry_traits_2 *traits,
+  const typename Visibility_2::Arrangement_2::Point_2& q,
+  std::vector<typename Visibility_2::Arrangement_2::Point_2>& points,
+  Visibility_arrangement_2& arr_out) {
+
+  typedef typename Visibility_2::Arrangement_2              Arrangement_2;
+  typedef typename Arrangement_2::Point_2                   Point_2;
+  typedef typename Arrangement_2::Geometry_traits_2         Geometry_traits_2;
+  typedef typename Geometry_traits_2::Segment_2             Segment_2;
+
+  typedef typename Visibility_arrangement_2::Halfedge_handle    Halfedge_handle;
+  typedef typename Visibility_arrangement_2::Vertex_handle      Vertex_handle;
+
+
+
+  typename std::vector<Segment_2>::size_type i = 0;
+
+  if (points.front() == points.back()) {
+    points.pop_back();
+  }
+
+  while (collinear(traits, q, points[i], points.back())) {
+    points.push_back(points[i]);
+    i++;
+  }
+
+  points.push_back(points[i]);
+
+  Halfedge_handle he_handle;
+
+  //the handle of vertex where the next segment is inserted
+  Vertex_handle v_trg;
+
+  //the handle of vertex inserted first
+  Vertex_handle v_fst;
+
+  //the handle of vertex of the end of a needle
+  Vertex_handle v_needle_end;
+
+
+  v_trg = v_fst = arr_out.insert_in_face_interior(points[i],
+                                                  arr_out.unbounded_face());
+
+  //find a point that is right after a needle
+  while (i+1 < points.size()) {
+    if ( collinear(traits, points[i], points[i+1], q)) {
+      Vertex_handle v_needle_begin = v_trg;
+
+      std::vector<Point_2> forward_needle; //vertices of the needle that are not
+                                           //between q and v_needle_begin;
+                                           //their direction is leaving q;
+
+      std::vector<Point_2> backward_needle;//vertices of the needle that are not
+                                           //between q and v_needle_begin;
+                                           //their direction is towards q;
+
+      std::vector<Point_2> part_in_q_side; //vertices of the needle that are
+                                           //between q and v_needle_begin
+      part_in_q_side.push_back(points[i]);
+      forward_needle.push_back((points[i]));
+
+      bool same_side_of_q = (compare_xy_2(traits, points[i], q) ==
+                             compare_xy_2(traits, points[i], points[i+1]));
+
+      if (same_side_of_q)
+        part_in_q_side.push_back(points[i+1]);
+      else
+        forward_needle.push_back(points[i+1]);
+      i++;
+      while (i+1 < points.size() &&
+             orientation_2(traits, points[i], points[i+1], q ) ==
+             CGAL::COLLINEAR)
+      {
+        if (same_side_of_q) {
+          part_in_q_side.push_back(points[i+1]);
+        }
+        else {
+          if (compare_xy_2(traits, part_in_q_side.front(), q) ==
+              compare_xy_2(traits, part_in_q_side.front(), points[i+1]))
+          {
+            same_side_of_q = true;
+            part_in_q_side.push_back(points[i+1]);
+          }
+          else {
+            if (less_distance_to_point_2(traits, q, points[i], points[i+1]))
+              forward_needle.push_back(points[i+1]);
+            else
+              backward_needle.push_back(points[i+1]);
+          }
+        }
+        i++;
+      }
+      //obtain the end point of a needle
+      Point_2 end_of_needle;
+      if (same_side_of_q)
+        end_of_needle = part_in_q_side.back();
+      else {
+        if (backward_needle.empty()) {
+          end_of_needle = forward_needle.back();
+        }
+        else {
+          end_of_needle = backward_needle.back();
+        }
+      }
+
+      std::reverse(backward_needle.begin(), backward_needle.end());
+      std::vector<Point_2> merged_needle;
+
+      // merge the forward_needle and backward_needle
+      unsigned int itr_fst = 0, itr_snd = 0;
+      while (itr_fst < forward_needle.size() &&
+             itr_snd < backward_needle.size()) {
+
+        if (less_distance_to_point_2(traits,
+                                     q,
+                                     forward_needle[itr_fst],
+                                     backward_needle[itr_snd]))
+        {
+          merged_needle.push_back(forward_needle[itr_fst]);
+          itr_fst++;
+        }
+        else {
+          merged_needle.push_back(backward_needle[itr_snd]);
+          itr_snd++;
+        }
+      }
+      while (itr_fst < forward_needle.size()) {
+        merged_needle.push_back(forward_needle[itr_fst]);
+        itr_fst++;
+      }
+      while (itr_snd < backward_needle.size()) {
+        merged_needle.push_back(backward_needle[itr_snd]);
+        itr_snd++;
+      }
+
+      for (unsigned int p = 0 ; p+1 < merged_needle.size() ; p++) {
+        if (compare_xy_2<Geometry_traits_2>(
+                    traits, merged_needle[p], merged_needle[p+1]) == SMALLER)
+        {
+          he_handle = arr_out.insert_from_left_vertex(
+                      Segment_2(merged_needle[p], merged_needle[p+1]), v_trg);
+        }
+        else {
+          he_handle = arr_out.insert_from_right_vertex(
+                      Segment_2(merged_needle[p], merged_needle[p+1]), v_trg);
+        }
+        v_trg = he_handle->target();
+        if (merged_needle[p+1] == end_of_needle) {
+          v_needle_end = v_trg;
+        }
+      }
+      if (same_side_of_q) {
+        //insert the part of needle between q and v_needle_begin
+        v_trg = v_needle_begin;
+        for (unsigned int p = 0 ; p+1 < part_in_q_side.size() ; p++) {
+          if (compare_xy_2<Geometry_traits_2>(
+                     traits, part_in_q_side[p], part_in_q_side[p+1]) == SMALLER)
+          {
+            he_handle = arr_out.insert_from_left_vertex(
+                      Segment_2(part_in_q_side[p], part_in_q_side[p+1]), v_trg);
+          }
+          else {
+            he_handle = arr_out.insert_from_right_vertex(
+                      Segment_2(part_in_q_side[p], part_in_q_side[p+1]), v_trg);
+          }
+          v_trg = he_handle->target();
+        }
+      }
+      else
+        v_trg = v_needle_end;
+    }
+    else {
+      if (compare_xy_2<Geometry_traits_2>(
+                  traits, v_trg->point(), points[i+1]) == SMALLER)
+      {
+        he_handle = arr_out.insert_from_left_vertex(
+                    Segment_2(points[i], points[i+1]), v_trg);
+      }
+      else {
+        he_handle = arr_out.insert_from_right_vertex(
+                    Segment_2(points[i], points[i+1]), v_trg);
+      }
+      v_trg = he_handle->target();
+      i++;
+    }
+    if (i+2 == points.size()) {
+      //close the boundary
+      v_trg = he_handle->target();
+      arr_out.insert_at_vertices(Segment_2(points[points.size()-2],
+                                           points[points.size()-1]),
+                                 v_trg, v_fst);
+      break;
+    }
+  }
+}
+
+template <typename VARR>
+void regularize_output(VARR& arr_out) {
+  typename VARR::Edge_iterator it = arr_out.edges_begin();
+
+  while(it != arr_out.edges_end()) {
+    if (it->face() == it->twin()->face()) {
+      typename VARR::Halfedge_handle he = it;
+      ++it;
+      arr_out.remove_edge(he);
+    }
+    else {
+      ++it;
+    }
+  }
+}
+
+template <typename VARR>
+void conditional_regularize(VARR& arr_out, CGAL::Tag_true) {
+  regularize_output(arr_out);
+}
+
+template <typename VARR>
+void conditional_regularize(VARR&, CGAL::Tag_false) {
+  //do nothing
+}
+
+
+
+} // end namespace Visibility_2
+} // end namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2.h
new file mode 100644
index 0000000..1af1e09
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2.h
@@ -0,0 +1,831 @@
+// Copyright (c) 2006 Foundation for Research and Technology-Hellas (Greece).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Menelaos Karavelas <mkaravel at iacm.forth.gr>
+
+#ifndef CGAL_VORONOI_DIAGRAM_2_H
+#define CGAL_VORONOI_DIAGRAM_2_H 1
+
+#include <CGAL/Voronoi_diagram_2/basic.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Iterator_project.h>
+#include <CGAL/circulator.h>
+#include <CGAL/tags.h>
+#include <CGAL/use.h>
+
+#include <iostream>
+#include <iterator>
+
+#include <CGAL/Voronoi_diagram_2/Halfedge.h>
+#include <CGAL/Voronoi_diagram_2/Face.h>
+#include <CGAL/Voronoi_diagram_2/Vertex.h>
+#include <CGAL/Voronoi_diagram_2/Circulator_adaptors.h>
+#include <CGAL/Voronoi_diagram_2/Iterator_adaptors.h>
+#include <CGAL/Voronoi_diagram_2/Handle_adaptor.h>
+#include <CGAL/Voronoi_diagram_2/Validity_testers.h>
+#include <CGAL/Voronoi_diagram_2/Unbounded_faces.h>
+#include <CGAL/Voronoi_diagram_2/Unbounded_edges.h>
+#include <CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h>
+#include <CGAL/Voronoi_diagram_2/Connected_components.h>
+#include <CGAL/Voronoi_diagram_2/Accessor.h>
+
+#include <CGAL/Identity_policy_2.h>
+
+#include <boost/variant.hpp>
+
+namespace CGAL {
+
+//=========================================================================
+//=========================================================================
+//=========================================================================
+
+template<class DG, class AT, class AP = Identity_policy_2<DG,AT> >
+class Voronoi_diagram_2
+{
+ private:
+  typedef Voronoi_diagram_2<DG,AT,AP>        Self;
+  typedef Triangulation_cw_ccw_2             CW_CCW_2;
+
+  friend class CGAL_VORONOI_DIAGRAM_2_INS::Accessor<Self>;
+ public:
+  //-------
+  // TYPES
+  //-------
+
+  // TYPES FOR THE DUAL GRAPH
+
+  // the (triangulated) dual graph
+  typedef DG                                          Delaunay_graph;
+  typedef AT                                          Adaptation_traits;
+  typedef AP                                          Adaptation_policy;
+
+  typedef typename Delaunay_graph::Geom_traits        Delaunay_geom_traits;
+
+  typedef typename Delaunay_graph::size_type          size_type;
+
+  typedef typename Delaunay_graph::Vertex_handle      Delaunay_vertex_handle;
+  typedef typename Delaunay_graph::Face_handle        Delaunay_face_handle;
+  typedef typename Delaunay_graph::Edge               Delaunay_edge;
+
+ protected:
+  typedef typename Delaunay_graph::Edge_circulator    Dual_edge_circulator;
+  typedef typename Delaunay_graph::Vertex_circulator  Dual_vertex_circulator;
+  typedef typename Delaunay_graph::Face_circulator    Dual_face_circulator;
+
+  typedef typename Delaunay_graph::Finite_vertices_iterator 
+  Dual_vertices_iterator;
+
+  typedef typename Delaunay_graph::Finite_faces_iterator
+  Dual_faces_iterator;
+
+  typedef typename Delaunay_graph::Finite_edges_iterator
+  Dual_edges_iterator;
+  typedef typename Delaunay_graph::All_edges_iterator
+  All_dual_edges_iterator;
+
+ protected:
+  // TYPES FOR THE DEGENERACY TESTERS
+  typedef typename Adaptation_policy::Has_site_inserter  Has_site_inserter;
+  typedef typename Adaptation_policy::Has_site_remover   Has_site_remover;
+
+  typedef typename Adaptation_policy::Edge_rejector
+  Edge_rejector;
+
+  typedef typename Adaptation_policy::Face_rejector
+  Face_rejector;
+
+ protected:
+  // DEGENERACY TESTER BINDERS
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_rejector_binder<Self>
+  Edge_rejector_binder;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_rejector_binder<Self>
+  Face_rejector_binder;
+
+  // ITERATORS FOR EDGES
+  typedef Filter_iterator<Dual_edges_iterator,Edge_rejector_binder>
+  Non_degenerate_edges_iterator;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_iterator_adaptor
+  <Self,Non_degenerate_edges_iterator>
+  Edge_iterator_base;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_validity_tester
+  <Self,Edge_iterator_base>
+  Edge_validity_tester;
+
+  typedef Filter_iterator<Edge_iterator_base,Edge_validity_tester>
+  Valid_edges_iterator;
+
+ public:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Edge_iterator_adaptor
+  <Self,Valid_edges_iterator,Tag_false>
+  Edge_iterator;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
+  <Self,Edge_iterator>
+  Halfedge_iterator;
+
+  // THE HALFEDGE
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge<Self>     Halfedge;
+
+ protected:
+  // ITERATORS FOR FACES
+  typedef Filter_iterator<Dual_vertices_iterator,Face_rejector_binder>
+  Non_degenerate_faces_iterator;
+
+ public:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
+  <Self,Non_degenerate_faces_iterator>
+  Face_iterator;
+
+  // THE FACE
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face<Self>         Face;
+
+ protected:
+  // ITERATORS FOR VERTICES
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex_validity_tester<Self>
+  Vertex_validity_tester;
+
+  typedef Filter_iterator<Dual_faces_iterator,Vertex_validity_tester>
+  Non_degenerate_vertices_iterator;
+
+ public:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex_iterator_adaptor
+  <Self,Non_degenerate_vertices_iterator>
+  Vertex_iterator;
+
+  // THE VERTEX
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Vertex<Self>       Vertex;
+
+ public:
+  // HANDLES
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Halfedge>  Halfedge_handle;
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Vertex>    Vertex_handle;
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Handle_adaptor<Face>      Face_handle;
+
+  // CIRCULATORS
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_around_vertex_circulator_adaptor
+  <Halfedge>
+  Halfedge_around_vertex_circulator;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Ccb_halfedge_circulator_adaptor
+  <Halfedge>
+  Ccb_halfedge_circulator;
+
+  // THE BOUNDED AND UNBOUNDED FACES ITERATOR
+ protected:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Bounded_face_tester
+  <Self,Non_degenerate_faces_iterator>
+  Bounded_face_tester;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Unbounded_face_tester
+  <Self,Non_degenerate_faces_iterator>
+  Unbounded_face_tester;
+
+ protected:
+  typedef
+  Filter_iterator<Non_degenerate_faces_iterator,Bounded_face_tester>
+  Unbounded_faces_iterator_base;
+
+  typedef
+  Filter_iterator<Non_degenerate_faces_iterator,Unbounded_face_tester>
+  Bounded_faces_iterator_base;
+
+ public:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
+  <Self,Unbounded_faces_iterator_base>
+  Unbounded_faces_iterator;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Face_iterator_adaptor
+  <Self,Bounded_faces_iterator_base>
+  Bounded_faces_iterator;
+
+  // THE BOUNDED AND UNBOUNDED HALFEDGES ITERATOR
+ protected:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Bounded_edge_tester
+  <Self,Edge_iterator>
+  Bounded_edge_tester;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Unbounded_edge_tester
+  <Self,Edge_iterator>
+  Unbounded_edge_tester;
+
+ protected:
+  typedef
+  Filter_iterator<Edge_iterator,Bounded_edge_tester>
+  Unbounded_edges_iterator_base;
+
+  typedef
+  Filter_iterator<Edge_iterator,Unbounded_edge_tester>
+  Bounded_edges_iterator_base;
+
+ public:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
+  <Self,Unbounded_edges_iterator_base>
+  Unbounded_halfedges_iterator;
+
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Halfedge_iterator_adaptor
+  <Self,Bounded_edges_iterator_base>
+  Bounded_halfedges_iterator;
+
+  // GENERATOR ITERATOR
+ protected:
+  struct Project_site_2
+  {
+    typedef typename Adaptation_traits::Site_2  Site_2;
+    typedef Face                                argument_type;
+    typedef Site_2                              result_type;
+
+    Site_2& operator()(const Face& f) const {
+      static Site_2 s;
+      // here we construct an adaptation traits; ideally we should get
+      // the adaptation traits from the outer class
+      s = Adaptation_traits().access_site_2_object()(f.dual());
+      return s;
+    }
+  };
+
+ public:
+  typedef Iterator_project<Face_iterator,Project_site_2>
+  Site_iterator;
+
+  // ACCESSOR
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Accessor<Self>  Accessor;
+
+protected:
+  // POINT LOCATION RELATED TYPES
+  typedef typename Adaptation_traits::Has_nearest_site_2  Has_nearest_site_2;
+public:
+  typedef typename Adaptation_traits::Point_2             Point_2;
+
+  typedef boost::variant<Face_handle,Halfedge_handle,Vertex_handle>
+  Locate_result;
+
+private:
+  typedef CGAL_VORONOI_DIAGRAM_2_INS::Find_valid_vertex<Self>
+  Find_valid_vertex;
+
+public:
+  //--------------
+  // CONSTRUCTORS
+  //--------------
+  Voronoi_diagram_2(const Adaptation_traits& at = Adaptation_traits(),
+		    const Adaptation_policy& ap = Adaptation_policy(),
+		    const Delaunay_geom_traits& gt = Delaunay_geom_traits())
+    : dual_(gt), ap_(ap), at_(at) {}
+
+  Voronoi_diagram_2(const Delaunay_graph& dg, bool swap_dg = false,
+		    const Adaptation_traits& at = Adaptation_traits(),
+		    const Adaptation_policy& ap = Adaptation_policy())
+    : dual_(), ap_(ap), at_(at) {
+    if ( swap_dg ) {
+      dual_.swap(const_cast<Delaunay_graph&>(dg));
+    } else {
+      dual_ = dg;
+    }
+  }
+
+  template<class Iterator>
+  Voronoi_diagram_2(Iterator first, Iterator beyond,
+		    const Adaptation_traits& at = Adaptation_traits(),
+		    const Adaptation_policy& ap = Adaptation_policy(),
+		    const Delaunay_geom_traits& gt = Delaunay_geom_traits())
+    : dual_(first, beyond, gt), ap_(ap), at_(at) {}
+
+  Voronoi_diagram_2(const Voronoi_diagram_2& other)
+    : dual_(other.dual_), ap_(other.ap_), at_(other.at_) {}
+
+  Self& operator=(const Self& other) {
+    dual_ = other.dual_;
+    ap_ = other.ap_;
+    at_ = other.at_;
+    return *this;
+  }
+
+public:
+  //------------------
+  // ACCESS FUNCTIONS
+  //------------------
+
+  // VORONOI FEATURES FROM DELAUNAY FEATURES
+  Halfedge_handle dual(const Delaunay_edge& e) const {
+    return Halfedge_handle( Halfedge(this, e.first, e.second) );
+  }
+
+  Face_handle dual(Delaunay_vertex_handle v) const {
+    return Face_handle( Face(this, v) );
+  }
+
+  Vertex_handle dual(Delaunay_face_handle f) const {
+    return Vertex_handle( Vertex(this, f) );
+  }
+
+  // DUAL
+  const Delaunay_graph& dual() const { return dual_; }
+
+  // VORONOI TRAITS
+  const Adaptation_traits& adaptation_traits() const { return at_; }
+
+  // ADAPTATION POLICY
+  const Adaptation_policy& adaptation_policy() const { return ap_; }
+
+  // SIZE RELATED METHODS
+  size_type number_of_vertices() const {
+    size_type num_v = 0;
+    for (Vertex_iterator it = vertices_begin();	it != vertices_end();
+	 ++it, ++num_v) {}
+    return num_v;
+  }
+
+  size_type number_of_faces() const {
+    size_type num_f = 0;
+    for (Face_iterator it = faces_begin(); it != faces_end();
+	 ++it, ++num_f) {}
+    return num_f;
+  }
+
+  size_type number_of_halfedges() const {
+    size_type num_h = 0;
+    for (Halfedge_iterator it = halfedges_begin(); it != halfedges_end();
+	 ++it, ++num_h) {}
+    return num_h;
+  }
+
+  size_type number_of_connected_components() const {
+    return CGAL_VORONOI_DIAGRAM_2_INS::Connected_components<Self>()(*this);
+  }
+
+  // DEGENERACY TESTERS -- THESE ARE UNDOCUMENTED
+
+  // MAYBE THE FOLLOWING TWO METHODS SHOULD BE PRIVATE AND ACCESSED
+  // ONLY THROUGH THE ACCESSOR
+  const Edge_rejector& edge_rejector() const {
+    return ap_.edge_rejector_object();
+  }
+
+  const Face_rejector& face_rejector() const {
+    return ap_.face_rejector_object();
+  }
+
+  // UNBOUNDED/BOUNDED FACE
+  Face_handle unbounded_face() const {
+    if ( unbounded_faces_begin() != unbounded_faces_end() ) {
+      return unbounded_faces_begin();
+    }
+    return Face_handle();
+  }
+
+  Face_handle bounded_face() const {
+    if ( bounded_faces_begin() != bounded_faces_end() ) {
+      return bounded_faces_begin();
+    }
+    return Face_handle();
+  }
+
+  // UNBOUNDED/BOUNDED EDGE
+  Halfedge_handle unbounded_halfedge() const {
+    if ( unbounded_halfedges_begin() != unbounded_halfedges_end() ) {
+      return unbounded_halfedges_begin();
+    }
+    return Halfedge_handle();
+  }
+
+  Halfedge_handle bounded_halfedge() const {
+    if ( bounded_halfedges_begin() != bounded_halfedges_end() ) {
+      return bounded_halfedges_begin();
+    }
+    return Halfedge_handle();
+  }
+
+  // FACE ITERATORS
+ private:
+  Non_degenerate_faces_iterator non_degenerate_faces_begin() const {
+    return CGAL::filter_iterator( dual_.finite_vertices_end(),
+				  Face_rejector_binder(this),
+				  dual_.finite_vertices_begin() );
+  }
+
+  Non_degenerate_faces_iterator non_degenerate_faces_end() const {
+    return CGAL::filter_iterator( dual_.finite_vertices_end(),
+				  Face_rejector_binder(this) );
+  }
+
+ public:
+  Face_iterator faces_begin() const {
+    return Face_iterator(this, non_degenerate_faces_begin());
+  }
+
+  Face_iterator faces_end() const {
+    return Face_iterator(this, non_degenerate_faces_end());
+  }
+
+ private:
+  Unbounded_faces_iterator_base unbounded_faces_base_begin() const {
+    return CGAL::filter_iterator( non_degenerate_faces_end(),
+				  Bounded_face_tester(this),
+				  non_degenerate_faces_begin() );
+  }
+
+  Unbounded_faces_iterator_base unbounded_faces_base_end() const {
+    return CGAL::filter_iterator( non_degenerate_faces_end(),
+				  Bounded_face_tester(this) );
+  }
+
+  Bounded_faces_iterator_base bounded_faces_base_begin() const {
+    return CGAL::filter_iterator( non_degenerate_faces_end(),
+				  Unbounded_face_tester(this),
+				  non_degenerate_faces_begin() );
+  }
+
+  Bounded_faces_iterator_base bounded_faces_base_end() const {
+    return CGAL::filter_iterator( non_degenerate_faces_end(),
+				  Unbounded_face_tester(this) );
+  }
+
+ public:
+  Unbounded_faces_iterator unbounded_faces_begin() const {
+    return Unbounded_faces_iterator(this, unbounded_faces_base_begin());
+  }
+
+  Unbounded_faces_iterator unbounded_faces_end() const {
+    return Unbounded_faces_iterator(this, unbounded_faces_base_end());
+  }
+
+  Bounded_faces_iterator bounded_faces_begin() const {
+    return Bounded_faces_iterator(this, bounded_faces_base_begin());
+  }
+
+  Bounded_faces_iterator bounded_faces_end() const {
+    return Bounded_faces_iterator(this, bounded_faces_base_end());
+  }
+
+  // EDGE ITERATORS
+ private:
+  Non_degenerate_edges_iterator non_degenerate_edges_begin() const {
+    return CGAL::filter_iterator( dual_.finite_edges_end(),
+				  Edge_rejector_binder(this),
+				  dual_.finite_edges_begin() );
+  }
+
+  Non_degenerate_edges_iterator non_degenerate_edges_end() const {
+    return CGAL::filter_iterator( dual_.finite_edges_end(),
+				  Edge_rejector_binder(this) );
+  }
+
+
+  Edge_iterator_base edges_base_begin() const {
+    return Edge_iterator_base(this, non_degenerate_edges_begin());
+  }
+
+  Edge_iterator_base edges_base_end() const {
+    return Edge_iterator_base(this, non_degenerate_edges_end());
+  }
+
+  Valid_edges_iterator valid_edges_begin() const {
+    return CGAL::filter_iterator( edges_base_end(),
+				  Edge_validity_tester(this),
+				  edges_base_begin() );
+  }
+
+  Valid_edges_iterator valid_edges_end() const {
+    return CGAL::filter_iterator( edges_base_end(),
+				  Edge_validity_tester(this) );
+  }
+
+ public:
+  Edge_iterator edges_begin() const {
+    return Edge_iterator(this, valid_edges_begin());
+  }
+
+  Edge_iterator edges_end() const {
+    return Edge_iterator(this, valid_edges_end());
+  }
+
+  Halfedge_iterator halfedges_begin() const {
+    return Halfedge_iterator(this, edges_begin());
+  }
+
+  Halfedge_iterator halfedges_end() const {
+    return Halfedge_iterator(this, edges_end());
+  }
+
+ protected:
+  Unbounded_edges_iterator_base unbounded_edges_base_begin() const {
+    return CGAL::filter_iterator( edges_end(),
+				  Bounded_edge_tester(this),
+				  edges_begin() );
+  }
+
+  Unbounded_edges_iterator_base unbounded_edges_base_end() const {
+    return CGAL::filter_iterator( edges_end(),
+				  Bounded_edge_tester(this) );
+  }
+
+  Bounded_edges_iterator_base bounded_edges_base_begin() const {
+    return CGAL::filter_iterator( edges_end(),
+				  Unbounded_edge_tester(this),
+				  edges_begin() );
+  }
+
+  Bounded_edges_iterator_base bounded_edges_base_end() const {
+    return CGAL::filter_iterator( edges_end(),
+				  Unbounded_edge_tester(this) );
+  }
+
+ public:
+  Unbounded_halfedges_iterator unbounded_halfedges_begin() const {
+    return Unbounded_halfedges_iterator(this, unbounded_edges_base_begin());
+  }
+
+  Unbounded_halfedges_iterator unbounded_halfedges_end() const {
+    return Unbounded_halfedges_iterator(this, unbounded_edges_base_end());
+  }
+
+  Bounded_halfedges_iterator bounded_halfedges_begin() const {
+    return Bounded_halfedges_iterator(this, bounded_edges_base_begin());
+  }
+
+  Bounded_halfedges_iterator bounded_halfedges_end() const {
+    return Bounded_halfedges_iterator(this, bounded_edges_base_end());
+  }
+
+  // VERTEX ITERATORS
+ private:
+  Non_degenerate_vertices_iterator non_degenerate_vertices_begin() const {
+    return CGAL::filter_iterator( dual_.finite_faces_end(),
+				  Vertex_validity_tester(this),
+				  dual_.finite_faces_begin() );
+  }
+
+  Non_degenerate_vertices_iterator non_degenerate_vertices_end() const {
+    return CGAL::filter_iterator( dual_.finite_faces_end(),
+				  Vertex_validity_tester(this) );
+  }
+
+ public:
+  Vertex_iterator vertices_begin() const {
+    return Vertex_iterator(this, non_degenerate_vertices_begin());
+  }
+
+  Vertex_iterator vertices_end() const {
+    return Vertex_iterator(this, non_degenerate_vertices_end());
+  }
+
+  // SITE ITERATOR
+  Site_iterator sites_begin() const {
+    return Site_iterator(faces_begin());    
+  }
+
+  Site_iterator sites_end() const {
+    return Site_iterator(faces_end());
+  }
+
+  // CIRCULATORS
+  Ccb_halfedge_circulator ccb_halfedges(const Face_handle& f) const {
+    return Ccb_halfedge_circulator(*f->halfedge());
+  }
+
+  Ccb_halfedge_circulator ccb_halfedges(const Face_handle& f,
+					const Halfedge_handle& he) const {
+    CGAL_precondition( he->face() == f );
+    CGAL_USE(f);
+    return Ccb_halfedge_circulator(*he);
+  }
+
+
+  Halfedge_around_vertex_circulator
+  incident_halfedges(const Vertex_handle& v) const {
+    return incident_halfedges(v, v->halfedge());
+  }
+
+  Halfedge_around_vertex_circulator
+  incident_halfedges(const Vertex_handle& v, const Halfedge_handle& he) const {
+    CGAL_USE(v);
+    CGAL_precondition( he->target() == v );
+    return Halfedge_around_vertex_circulator(*he);
+  }
+
+  // POINT LOCATION
+  //---------------
+ private:
+  Locate_result locate(const Point_2& , const Tag_false&) const {
+    static unsigned int i = 0;
+    if ( i == 0 ) {
+      i++;
+      std::cerr << "Point location is not supported..." << std::endl;
+    }
+
+    // to avoid warnings/errors...
+    //    Face_handle f;
+    return Locate_result();
+  }
+
+  Locate_result locate(const Point_2& p, const Tag_true&) const
+  {
+    CGAL_precondition( dual_.number_of_vertices() > 0 );
+
+    typedef typename Adaptation_traits::Nearest_site_2  Nearest_site_2;
+    typedef typename Nearest_site_2::result_type        Query_result;
+
+    Nearest_site_2 nearest_site = at_.nearest_site_2_object();
+    Query_result ns_qr = nearest_site(dual_, p);
+
+    if ( const Delaunay_vertex_handle* dv =
+	 boost::get<Delaunay_vertex_handle>(&ns_qr) ) {
+      return Face_handle( Face(this, *dv) );
+    } else if ( const Delaunay_face_handle *df =
+		boost::get<Delaunay_face_handle>(&ns_qr) ) {
+      Find_valid_vertex vertex_finder;
+      Delaunay_face_handle dfvalid = vertex_finder(this, *df);
+      return Vertex_handle( Vertex(this, dfvalid) );
+    } else if ( const Delaunay_edge* de =
+		boost::get<Delaunay_edge>(&ns_qr) ) {
+      CGAL_assertion(  !edge_rejector()(dual_, *de)  );
+      if ( dual_.dimension() == 1 ) {
+	Delaunay_vertex_handle v1 =
+	  de->first->vertex(CW_CCW_2::ccw(de->second));
+	Delaunay_vertex_handle v2 =
+	  de->first->vertex(CW_CCW_2::cw(de->second) );
+	return Halfedge_handle( Halfedge(this, v1, v2) );
+      }
+      return Halfedge_handle( Halfedge(this, de->first, de->second) );
+    }
+
+    // I should never have reached this line;
+    CGAL_error();
+    return Locate_result();
+  }
+
+ public:
+  Locate_result locate(const Point_2& p) const {
+    return locate(p, Has_nearest_site_2());
+  }
+
+
+  // VALIDITY TESTING
+  //-----------------
+  bool is_valid() const {
+    bool valid = dual_.is_valid();
+    valid = valid && ap_.is_valid();
+    valid = valid && ap_.is_valid(dual_);
+
+    for (Vertex_iterator it = vertices_begin(); it != vertices_end(); ++it) {
+      valid = valid && it->is_valid();
+    }
+
+    for (Face_iterator it = faces_begin(); it != faces_end(); ++it) {
+      valid = valid && it->is_valid();
+    }
+
+    for (Halfedge_iterator it = halfedges_begin(); it != halfedges_end();
+	 ++it) {
+      valid = valid && it->is_valid();
+    }
+
+    return valid;
+  }
+  
+  // I/O
+  //----
+ public:
+  void file_output(std::ostream& os) const { os << dual_; }
+  void file_input(std::istream& is) { is >> dual_; }
+
+  // MISCALLANEOUS
+  //--------------
+ public:
+  void clear() {
+    dual_.clear();
+    ap_.clear();
+  }
+
+  void swap(Self& other) {
+    dual_.swap(other.dual_);
+    ap_.swap(other.ap_);
+  }
+
+  // ACCESSOR
+  //---------
+  Accessor accessor() const { return Accessor(this); }
+  Accessor accessor() { return Accessor(this); }
+
+ private:
+  Delaunay_graph  dual_;
+  Adaptation_policy ap_;
+  Adaptation_traits at_;
+
+ protected:
+  Delaunay_edge opposite(const Delaunay_edge& e) const {
+    int i_mirror = dual_.tds().mirror_index(e.first, e.second);
+    return Dual_edge( e.first->neighbor(e.second), i_mirror );
+  }
+
+ public:
+  typedef typename Adaptation_traits::Site_2     Site_2;
+
+ protected:
+  // insert is supported...
+  inline Face_handle insert(const Site_2& t, const Tag_true&) {
+    Delaunay_vertex_handle v = ap_.site_inserter_object()(dual_, t);
+    if ( v == Delaunay_vertex_handle() ) { return Face_handle(); }
+    return Face_handle( Face(this, v) );
+  }
+
+  // insert is not really supported...
+  inline Face_handle insert(const Site_2& t, const Tag_false&) {
+    INSERT_IS_NOT_SUPPORTED(t);
+    return Face_handle();
+  }
+
+ public:
+  inline Face_handle insert(const Site_2& t) {
+#if 0
+    // THE FOLLOWING LINE MAY BE ADDED FOR DEBUGGING PURPOSES
+    for (Halfedge_iterator it=halfedges_begin();it!=halfedges_end();++it) ;
+#endif
+    return insert(t, Has_site_inserter());
+  }
+
+  template<class Iterator>
+  inline size_type insert(Iterator first, Iterator beyond) {
+    size_type counter = 0;
+    for (Iterator it = first; it != beyond; ++it, ++counter) {
+      insert(*it);
+    }
+    return counter;
+  }
+
+#if 0
+ // REMOVAL IS NOT READY YET
+ protected:
+  void update_cached_testers(const Face_handle& f, const Tag_true&)
+  {
+    // HERE WE ALSO NEED TO ACCOUNT FOR THE DELETED VERTEX. THE
+    // DELETED VERTEX CAN AFFECT THE CACHED FACE DEGENERACY TESTER
+    Dual_vertex_handle v = f->dual();
+    Dual_edge_circulator ec_start = dual_.incident_edges(v);
+    Dual_edge_circulator ec = ec_start;
+    do {
+      cached_e_tester_.erase(*ec);
+    } while ( ++ec != ec_start );
+  }
+
+  void update_cached_testers(const Face_handle& f, const Tag_false&) {}
+
+  void remove(const Face_handle& f, const Tag_true&) {
+    if ( f == Face_handle() ) { return; }
+    update_cached_testers(f, !Has_insert() && Has_get_conflicts());
+    dual_.remove(f->dual());
+  }
+
+  void remove(const Face_handle& f, const Tag_false&) {
+    REMOVE_IS_NOT_SUPPORTED(f);
+  }
+
+ public:
+  inline void remove(const Face_handle& f) {
+    return remove(f, Has_remove());
+  }
+#endif
+};
+
+
+// I/O OPERATORS
+//--------------
+template<class DG, class AT, class AP>
+std::ostream& operator<<(std::ostream& os,
+			 const Voronoi_diagram_2<DG,AT,AP>& vd)
+{
+  vd.file_output(os);
+  return os;
+}
+
+
+template<class DG, class AT, class AP>
+std::istream& operator>>(std::istream& is,
+			 Voronoi_diagram_2<DG,AT,AP>& vd)
+{
+  vd.file_input(is);
+  return is;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_VORONOI_DIAGRAM_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Accessor.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Accessor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Accessor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Accessor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Connected_components.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Connected_components.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Connected_components.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Connected_components.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Default_site_removers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Default_site_removers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Default_site_removers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Default_site_removers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Edge_less.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Edge_less.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Edge_less.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Edge_less.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Face.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Face.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Face.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Face.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Finder_classes.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Finder_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Finder_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Finder_classes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Halfedge.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Halfedge.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Halfedge.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Halfedge.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Policy_base.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Policy_base.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Policy_base.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Policy_base.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Site_accessors.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Site_accessors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Site_accessors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Site_accessors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Validity_testers.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Validity_testers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Validity_testers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Validity_testers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Vertex.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Vertex.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/Vertex.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/Vertex.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/basic.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_diagram_2/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_diagram_2/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Voronoi_intersection_2_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Voronoi_intersection_2_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Voronoi_intersection_2_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Voronoi_intersection_2_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_Minkowski_distance.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_Minkowski_distance.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_Minkowski_distance.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_Minkowski_distance.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_alpha_shape_euclidean_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_alpha_shape_euclidean_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_alpha_shape_euclidean_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_alpha_shape_euclidean_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_alpha_shape_euclidean_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_alpha_shape_euclidean_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_alpha_shape_euclidean_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_alpha_shape_euclidean_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/Weighted_point.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_point.h
new file mode 100644
index 0000000..200b374
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/Weighted_point.h
@@ -0,0 +1,144 @@
+// Copyright (c) 1999-2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Mariette Yvinec
+//                 Sylvain Pion
+
+#ifndef CGAL_WEIGHTED_POINT_H
+#define CGAL_WEIGHTED_POINT_H
+
+#include <iostream>
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/Dimension.h>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/logical.hpp>
+
+namespace CGAL {
+
+template < class Pt, class We >
+class Weighted_point : public Pt
+{
+  typedef typename Kernel_traits<Pt>::Kernel::FT FT;
+public:
+  typedef We Weight;
+  typedef Pt Point;
+
+  Weighted_point ()
+      : Point(), _weight(0) {}
+
+  //explicit
+  Weighted_point (const Point &p)
+      : Point(p), _weight(0)
+  {
+    // CGAL_error_msg( "Warning : truncated weight !!!");
+  }
+
+  Weighted_point (const Point &p, const Weight &w)
+      : Point(p), _weight(w) {}
+
+
+  // Constructors from coordinates are also provided for convenience, except
+  // that they are only from Cartesian coordinates, and with no weight, so as
+  // to avoid any potential ambiguity between the homogeneous weight and the
+  // power weight (it should be easy enough to pass a Point explicitly in those
+  // cases).
+  // The enable_if complexity comes from the fact that we separate dimension 2 and 3.
+
+  template < typename Tx, typename Ty >
+  Weighted_point (const Tx &x, const Ty &y,
+	          typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
+					                      boost::is_convertible<Ty, FT>,
+							      boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 2> > >::type* = 0)
+      : Point(x, y), _weight(0) {}
+
+  template < typename Tx, typename Ty, typename Tz >
+  Weighted_point (const Tx &x, const Ty &y, const Tz &z,
+	          typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
+					                      boost::is_convertible<Ty, FT>,
+					                      boost::is_convertible<Tz, FT>,
+							      boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 3> > >::type* = 0)
+      : Point(x, y, z), _weight(0) {}
+
+  const Point & point() const
+  {
+      return *this;
+  }
+
+  const Weight & weight() const
+  {
+      return _weight;
+  }
+
+// The following power() member functions are not used at the moment.
+// They belong to the traits class anyway.
+//
+//  Weight power(const Point &p)
+//  {	
+//      return squared_distance(*this, p) - weight();
+//  }
+// 
+//  Weight power(const Weighted_point &p)
+//  {	
+//      return squared_distance(*this, p) - weight() - p.weight();
+//  }
+
+private:
+  Weight _weight;
+};
+
+
+template < class Point, class Weight >
+std::ostream &
+operator<<(std::ostream &os, const Weighted_point<Point,Weight> &p)
+{
+  switch(get_mode(os))
+  {
+  case IO::ASCII :
+    return os << p.point() <<  " " << p.weight();
+  case IO::BINARY :
+    os << p.point();
+    write(os, p.weight());
+    return os;
+  default:
+    return os << "Weighted_point(" << p.point() << ", " << p.weight() << ")";
+  }
+}
+
+template < class Point, class Weight >
+std::istream &
+operator>>(std::istream &is, Weighted_point<Point,Weight> &wp)
+{
+  Weight w;
+  Point p;
+  is >> p;
+  if(!is) return is;
+  if(is_ascii(is))
+    is >> w;
+  else
+    read(is, w);
+  if (is)
+    wp = Weighted_point<Point,Weight>(p,w);
+  return is;
+}
+
+} // namespace CGAL
+
+#endif // CGAL_WEIGHTED_POINT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_psc_localisation.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_psc_localisation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_psc_localisation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_psc_localisation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_surface_index.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_surface_index.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_surface_index.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_surface_index.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_surface_index_geom_traits.h b/3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_surface_index_geom_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Weighted_point_with_surface_index_geom_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Weighted_point_with_surface_index_geom_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Width_3.h b/3rdparty/CGAL-4.8/include/CGAL/Width_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Width_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Width_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Width_default_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/Width_default_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Width_default_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Width_default_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Width_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/Width_polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Width_polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Width_polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/Win32_exception.h b/3rdparty/CGAL-4.8/include/CGAL/Win32_exception.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/Win32_exception.h
rename to 3rdparty/CGAL-4.8/include/CGAL/Win32_exception.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags.h b/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags.h
new file mode 100644
index 0000000..96a0041
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags.h
@@ -0,0 +1,54 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+ 
+
+#ifndef CGAL_AFF_TRANSFORMATION_TAGS_H
+#define CGAL_AFF_TRANSFORMATION_TAGS_H
+
+#include <CGAL/basic.h>
+
+namespace CGAL {
+
+class Translation {};
+class Rotation {};
+class Scaling {};
+class Reflection {};
+class Identity_transformation {};
+
+#ifndef CGAL_HEADER_ONLY
+
+CGAL_EXPORT extern const Translation              TRANSLATION;
+CGAL_EXPORT extern const Rotation                 ROTATION;
+CGAL_EXPORT extern const Scaling                  SCALING;
+CGAL_EXPORT extern const Reflection               REFLECTION;
+CGAL_EXPORT extern const Identity_transformation  IDENTITY;
+
+#endif
+
+} //namespace CGAL
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/aff_transformation_tags_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_AFF_TRANSFORMATION_TAGS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags_impl.h b/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags_impl.h
new file mode 100644
index 0000000..d454b44
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/aff_transformation_tags_impl.h
@@ -0,0 +1,33 @@
+// Copyright (c) 1999
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+
+namespace CGAL {
+
+const Translation             TRANSLATION = Translation();
+const Rotation                ROTATION = Rotation();
+const Scaling                 SCALING = Scaling();
+const Reflection              REFLECTION = Reflection();
+const Identity_transformation IDENTITY = Identity_transformation();
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.6/include/CGAL/algorithm.h b/3rdparty/CGAL-4.8/include/CGAL/algorithm.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/algorithm.h
rename to 3rdparty/CGAL-4.8/include/CGAL/algorithm.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/all_furthest_neighbors_2.h b/3rdparty/CGAL-4.8/include/CGAL/all_furthest_neighbors_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/all_furthest_neighbors_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/all_furthest_neighbors_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/apply_to_range.h b/3rdparty/CGAL-4.8/include/CGAL/apply_to_range.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/apply_to_range.h
rename to 3rdparty/CGAL-4.8/include/CGAL/apply_to_range.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/approximated_offset_2.h b/3rdparty/CGAL-4.8/include/CGAL/approximated_offset_2.h
new file mode 100644
index 0000000..b78635d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/approximated_offset_2.h
@@ -0,0 +1,166 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_APPROXIMATED_OFFSET_H
+#define CGAL_APPROXIMATED_OFFSET_H
+
+#include <CGAL/Minkowski_sum_2/Approx_offset_base_2.h>
+#include <CGAL/Minkowski_sum_2/Offset_conv_2.h>
+#include <CGAL/Minkowski_sum_2/Offset_decomp_2.h>
+
+namespace CGAL {
+
+/*!
+ * Approximate the offset of a given simple polygon by a given radius,
+ * using the convolution method.
+ * Note that as the input polygon may not be convex, its offset may not be
+ * simply connected. The result is therefore represented as a polygon with
+ * holes.
+ * \param pgn The polygon.
+ * \param r The offset radius.
+ * \param eps The approximation-error bound.
+ * \return The approximated offset polygon.
+ */
+template <class Kernel, class Container>
+typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+approximated_offset_2 (const Polygon_2<Kernel, Container>& pgn,
+                       const typename Kernel::FT& r,
+                       const double& eps)
+{
+  typedef Approx_offset_base_2<Kernel, Container>            Base;
+  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
+  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
+
+  Base                                               base (eps);
+  Approx_offset_2                                    approx_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  approx_offset (pgn, r,
+                 offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Approximate the offset of a given polygon with holes by a given radius,
+ * using the convolution method.
+ * The result is represented as a polygon with holes whose edges are line
+ * segments and circular arcs.
+ * \param pwh The polygon with holes.
+ * \param r The offset radius.
+ * \param eps The approximation-error bound.
+ * \pre The polygon is bounded (has a valid outer boundary).
+ * \return The approximated offset polygon.
+ */
+template <class Kernel, class Container>
+typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+approximated_offset_2 (const Polygon_with_holes_2<Kernel, Container>& pwh,
+                       const typename Kernel::FT& r,
+                       const double& eps)
+{
+  typedef Approx_offset_base_2<Kernel, Container>            Base;
+  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
+  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
+
+  Base                                               base (eps);
+  Approx_offset_2                                    approx_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  approx_offset (pwh, r,
+                 offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Approximate the offset of a given simple polygon by a given radius,
+ * by decomposing it to convex sub-polygons and computing the union of their
+ * offsets.
+ * Note that as the input polygon may not be convex, its offset may not be
+ * simply connected. The result is therefore represented as a polygon with
+ * holes.
+ * \param pgn The polygon.
+ * \param r The offset radius.
+ * \param eps The approximation-error bound.
+ * \param decomp A functor for decomposing polygons.
+ * \return The approximated offset polygon.
+ */
+template <class Kernel, class Container, class DecompositionStrategy>
+typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+approximated_offset_2 (const Polygon_2<Kernel, Container>& pgn,
+                       const typename Kernel::FT& r,
+                       const double& eps,
+                       const DecompositionStrategy&)
+{
+  typedef Approx_offset_base_2<Kernel, Container>            Base;
+  typedef Offset_by_decomposition_2<Base, DecompositionStrategy>
+                                                             Approx_offset_2;
+  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
+
+  Base                                               base (eps);
+  Approx_offset_2                                    approx_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  approx_offset (pgn, r,
+                 offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Approximate the inset of a given simple polygon by a given radius, using
+ * the convolution method.
+ * Note that as the input polygon may not be convex, its inset may not be
+ * simply connected. The result is therefore represented as a set of polygons.
+ * \param pgn The polygon.
+ * \param r The inset radius.
+ * \param eps The approximation-error bound.
+ * \param oi An output iterator for the inset polygons.
+ *           Its value-type must be
+ *           Gps_circle_segment_traits_2<Kernel>::Polygon_2.
+ * \return A past-the-end iterator for the inset polygons.
+ */
+template <class Kernel, class Container, class OutputIterator>
+OutputIterator
+approximated_inset_2 (const Polygon_2<Kernel, Container>& pgn,
+                      const typename Kernel::FT& r,
+                      const double& eps,
+                      OutputIterator oi)
+{
+  typedef Approx_offset_base_2<Kernel, Container>            Base;
+  typedef Offset_by_convolution_2<Base>                      Approx_offset_2;
+  typedef typename Approx_offset_2::Offset_polygon_2         Offset_polygon_2;
+
+  Base                                               base (eps);
+  Approx_offset_2                                    approx_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  oi = approx_offset.inset (pgn, r,
+                            oi);
+
+  return (oi);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/argument_swaps.h b/3rdparty/CGAL-4.8/include/CGAL/argument_swaps.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/argument_swaps.h
rename to 3rdparty/CGAL-4.8/include/CGAL/argument_swaps.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/arrange_offset_polygons_2.h b/3rdparty/CGAL-4.8/include/CGAL/arrange_offset_polygons_2.h
new file mode 100644
index 0000000..bc69c2b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/arrange_offset_polygons_2.h
@@ -0,0 +1,117 @@
+// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar> 
+//
+#ifndef CGAL_ARRANGE_OFFSET_POLYGONS_2_H
+#define CGAL_ARRANGE_OFFSET_POLYGONS_2_H
+
+#include <boost/shared_ptr.hpp>
+#include <CGAL/Polygon_with_holes_2.h>
+
+namespace CGAL {
+
+//
+// This should only be used to arrange the polygons coming from Polygon_offset_builder
+// as it uses their known properties:
+//
+//  Polygons are simple
+//  Outer polygons are CCW while holes are CW
+//  Outer polygons do not contain other outer polygons, only holes
+//  Every hole is contained in one and only one outer polygon
+//
+template<class K, class InputPolygonPtrIterator, class OutputPolygonWithHolesPtrIterator>
+void arrange_offset_polygons_2 ( InputPolygonPtrIterator           aBegin
+                               , InputPolygonPtrIterator           aEnd
+                               , OutputPolygonWithHolesPtrIterator rOut
+                               , K const&
+                               )
+{
+  typedef typename std::iterator_traits<InputPolygonPtrIterator>::difference_type difference_type ;
+  
+  typedef Polygon_2<K>            Polygon ;
+  typedef Polygon_with_holes_2<K> PolygonWithHoles ;
+  
+  typedef boost::shared_ptr<Polygon>          PolygonPtr ;
+  typedef boost::shared_ptr<PolygonWithHoles> PolygonWithHolesPtr ;
+  
+  typedef typename Polygon::Vertex_const_iterator Vertex_const_iterator ;
+  
+  difference_type lSize = std::distance(aBegin,aEnd);
+  
+  std::vector<PolygonWithHolesPtr> lTable(lSize);
+  
+  for ( InputPolygonPtrIterator it = aBegin ; it != aEnd ; ++ it )
+  {
+    difference_type lIdx = std::distance(aBegin,it);
+    
+    PolygonPtr lPoly = *it ;
+    Orientation lOrient = lPoly->orientation();
+    
+    // It's an outer boundary
+    if ( lOrient == COUNTERCLOCKWISE )
+    {
+      PolygonWithHolesPtr lOuter( new PolygonWithHoles(*lPoly) );
+      *rOut ++ = lOuter ; 
+      lTable[lIdx] = lOuter ;
+    }  
+  }  
+  
+  for ( InputPolygonPtrIterator it = aBegin ; it != aEnd ; ++ it )
+  {
+    PolygonPtr lPoly = *it ;
+    
+    difference_type lIdx = std::distance(aBegin,it);
+    
+    // Is a hole?
+    if ( !lTable[lIdx] )
+    {
+      PolygonWithHolesPtr lParent ;
+      
+      for ( difference_type j = 0 ; j < lSize && !lParent ; ++ j )
+      {
+        PolygonWithHolesPtr lOuter = lTable[j];
+        if ( lOuter )
+          for ( Vertex_const_iterator v = lPoly->vertices_begin(), ve = lPoly->vertices_end(); v != ve && !lParent ; ++ v )
+            if ( lOuter->outer_boundary().bounded_side(*v) == ON_BOUNDED_SIDE )
+              lParent = lOuter ;
+      }
+      
+      CGAL_assertion(lParent != NULL);
+      
+      lParent->add_hole(*lPoly);
+    }
+  }  
+}
+
+template<class K, class C>
+std::vector< boost::shared_ptr< Polygon_with_holes_2<K,C> > >
+inline
+arrange_offset_polygons_2 ( std::vector< boost::shared_ptr< Polygon_2<K,C> > > const& aPolygons )
+{
+  std::vector< boost::shared_ptr< Polygon_with_holes_2<K,C> > > rResult ;
+  
+  arrange_offset_polygons_2(aPolygons.begin(), aPolygons.end(), std::back_inserter(rResult), K() ) ;
+  
+  return rResult ;
+}
+
+} // end namespace CGAL
+
+
+#endif 
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/array.h b/3rdparty/CGAL-4.8/include/CGAL/array.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/array.h
rename to 3rdparty/CGAL-4.8/include/CGAL/array.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/assertions.h b/3rdparty/CGAL-4.8/include/CGAL/assertions.h
new file mode 100644
index 0000000..0370531
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/assertions.h
@@ -0,0 +1,353 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Geert-Jan Giezeman and Sven Schoenherr
+
+#include <CGAL/config.h>
+
+#ifndef CGAL_ASSERTIONS_H
+#define CGAL_ASSERTIONS_H
+
+#include <CGAL/export/CGAL.h>
+
+// #include <CGAL/assertions_behaviour.h> // for backward compatibility
+
+#ifndef CGAL_NO_ASSERTIONS 
+#ifdef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
+#include <boost/static_assert.hpp>
+#endif
+#endif
+
+namespace CGAL {
+
+// function declarations
+// =====================
+// failure functions
+// -----------------
+CGAL_EXPORT void assertion_fail      ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
+CGAL_EXPORT void precondition_fail   ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
+CGAL_EXPORT void postcondition_fail  ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
+
+// warning function
+// ----------------
+CGAL_EXPORT
+void warning_fail( const char*, const char*, int, const char* = "");
+
+
+// The following declarations are needed first, before assertions are used.
+// ---------------------------------------------------------------------
+template < typename T > class Uncertain;
+inline bool possibly(bool b);
+inline bool possibly(Uncertain<bool> c);
+
+
+// macro definitions
+// =================
+// assertions
+// ----------
+
+#ifdef NDEBUG
+#  ifndef CGAL_NDEBUG
+#    define CGAL_NDEBUG
+#  endif
+#endif
+
+#ifdef CGAL_NDEBUG
+#  define CGAL_NO_ASSERTIONS
+#  define CGAL_NO_PRECONDITIONS
+#  define CGAL_NO_POSTCONDITIONS
+#  define CGAL_NO_WARNINGS
+#endif
+
+#if defined(CGAL_NO_ASSERTIONS)
+#  define CGAL_assertion(EX) (static_cast<void>(0))
+#  define CGAL_destructor_assertion(EX) (static_cast<void>(0))
+#  define CGAL_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_assertion_code(CODE)
+#  ifdef CGAL_ASSUME
+#    define CGAL_assume(EX) CGAL_ASSUME(EX)
+#    define CGAL_assume_code(CODE) CODE
+#  else // not def CGAL_ASSUME
+#    define CGAL_assume(EX)  CGAL_assertion(EX)
+#    define CGAL_assume_code(CODE) CGAL_assertion_code(CODE)
+#  endif // not def CGAL_ASSUME
+#else // no CGAL_NO_ASSERTIONS
+#  define CGAL_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_destructor_assertion(EX) \
+   (CGAL::possibly(EX)||std::uncaught_exception()?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_assertion_code(CODE) CODE
+#  define CGAL_assume(EX) CGAL_assertion(EX)
+#  define CGAL_assume_code(CODE) CGAL_assertion_code(CODE)
+#endif // no CGAL_NO_ASSERTIONS
+
+#ifndef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
+
+#  if defined(CGAL_NO_ASSERTIONS)
+
+#    define CGAL_static_assertion(EX) \
+     static_assert(true, "")
+
+#    define CGAL_static_assertion_msg(EX,MSG) \
+     static_assert(true, "")
+
+#  else // no CGAL_NO_ASSERTIONS
+
+#    define CGAL_static_assertion(EX) \
+     static_assert(EX, #EX)
+
+#    define CGAL_static_assertion_msg(EX,MSG) \
+     static_assert(EX, MSG)
+
+#  endif // no CGAL_NO_ASSERTIONS
+
+#else // if CGAL_CFG_NO_CPP0X_STATIC_ASSERT is true
+
+#  if defined(CGAL_NO_ASSERTIONS)
+
+#    define CGAL_static_assertion(EX) \
+     BOOST_STATIC_ASSERT(true) CGAL_UNUSED
+  
+#    define CGAL_static_assertion_msg(EX,MSG) \
+     BOOST_STATIC_ASSERT(true) CGAL_UNUSED
+
+#  else // no CGAL_NO_ASSERTIONS
+
+#    define CGAL_static_assertion(EX) \
+     BOOST_STATIC_ASSERT(EX) CGAL_UNUSED
+  
+#    define CGAL_static_assertion_msg(EX,MSG) \
+     BOOST_STATIC_ASSERT(EX) CGAL_UNUSED
+
+#  endif // no CGAL_NO_ASSERTIONS
+
+#endif // if CGAL_CFG_NO_CPP0X_STATIC_ASSERT is true
+  
+#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS)
+#  define CGAL_exactness_assertion(EX) (static_cast<void>(0))
+#  define CGAL_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_exactness_assertion_code(CODE)
+#else
+#  define CGAL_exactness_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_exactness_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_exactness_assertion_code(CODE) CODE
+#endif // CGAL_NO_ASSERTIONS
+
+#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_assertion(EX) (static_cast<void>(0))
+#  define CGAL_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_assertion_code(CODE)
+#else
+#  define CGAL_expensive_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_assertion_code(CODE) CODE
+#endif // CGAL_NO_ASSERTIONS
+
+#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_exactness_assertion(EX) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_assertion_code(CODE)
+#else
+#  define CGAL_expensive_exactness_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_exactness_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_exactness_assertion_code(CODE) CODE
+#endif // CGAL_NO_ASSERTIONS
+
+
+// preconditions
+// -------------
+
+#if defined(CGAL_NO_PRECONDITIONS)
+#  define CGAL_precondition(EX) (static_cast<void>(0))
+#  define CGAL_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_precondition_code(CODE)
+#else
+#  define CGAL_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_precondition_code(CODE) CODE
+#endif // CGAL_NO_PRECONDITIONS
+
+#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
+#  define CGAL_exactness_precondition(EX) (static_cast<void>(0))
+#  define CGAL_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_exactness_precondition_code(CODE)
+#else
+#  define CGAL_exactness_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_exactness_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_exactness_precondition_code(CODE) CODE
+#endif // CGAL_NO_PRECONDITIONS
+
+#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_precondition(EX) (static_cast<void>(0))
+#  define CGAL_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_precondition_code(CODE)
+#else
+#  define CGAL_expensive_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_precondition_code(CODE) CODE
+#endif // CGAL_NO_PRECONDITIONS
+
+#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE) 
+#  define CGAL_expensive_exactness_precondition(EX) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_precondition_code(CODE)
+#else
+#  define CGAL_expensive_exactness_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_exactness_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_exactness_precondition_code(CODE) CODE
+#endif // CGAL_NO_PRECONDITIONS
+
+
+// postconditions
+// --------------
+
+#if defined(CGAL_NO_POSTCONDITIONS)
+#  define CGAL_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_postcondition_code(CODE)
+#else
+#  define CGAL_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_postcondition_code(CODE) CODE
+#endif // CGAL_NO_POSTCONDITIONS
+
+#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
+#  define CGAL_exactness_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_exactness_postcondition_code(CODE)
+#else
+#  define CGAL_exactness_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_exactness_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_exactness_postcondition_code(CODE) CODE
+#endif // CGAL_NO_POSTCONDITIONS
+
+#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_postcondition_code(CODE)
+#else
+#  define CGAL_expensive_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_postcondition_code(CODE) CODE
+#endif // CGAL_NO_POSTCONDITIONS
+
+#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_exactness_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_postcondition_code(CODE)
+#else
+#  define CGAL_expensive_exactness_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_exactness_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_exactness_postcondition_code(CODE) CODE
+#endif // CGAL_NO_POSTCONDITIONS
+
+
+// warnings
+// --------
+
+#if defined(CGAL_NO_WARNINGS)
+#  define CGAL_warning(EX) (static_cast<void>(0))
+#  define CGAL_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_warning_code(CODE)
+#else
+#  define CGAL_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_warning_code(CODE) CODE
+#endif // CGAL_NO_WARNINGS
+
+#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS)
+#  define CGAL_exactness_warning(EX) (static_cast<void>(0))
+#  define CGAL_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_exactness_warning_code(CODE)
+#else
+#  define CGAL_exactness_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_exactness_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_exactness_warning_code(CODE) CODE
+#endif // CGAL_NO_WARNINGS
+
+#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_warning(EX) (static_cast<void>(0))
+#  define CGAL_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_warning_code(CODE)
+#else
+#  define CGAL_expensive_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_warning_code(CODE) CODE
+#endif // CGAL_NO_WARNINGS
+
+#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
+#  define CGAL_expensive_exactness_warning(EX) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_expensive_exactness_warning_code(CODE)
+#else
+#  define CGAL_expensive_exactness_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_expensive_exactness_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_expensive_exactness_warning_code(CODE) CODE
+#endif // CGAL_NO_WARNINGS
+
+// CGAL error
+#define CGAL_error_msg(MSG) ::CGAL::assertion_fail( "", __FILE__, __LINE__, MSG )
+#define CGAL_error()        ::CGAL::assertion_fail( "", __FILE__, __LINE__ )
+
+} //namespace CGAL
+
+// This comes last as it is dependant on the macros to be defined.
+// But the macros need CGAL::possibly().
+#include <CGAL/Uncertain.h>
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/assertions_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_ASSERTIONS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/assertions_behaviour.h b/3rdparty/CGAL-4.8/include/CGAL/assertions_behaviour.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/assertions_behaviour.h
rename to 3rdparty/CGAL-4.8/include/CGAL/assertions_behaviour.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/assertions_impl.h b/3rdparty/CGAL-4.8/include/CGAL/assertions_impl.h
new file mode 100644
index 0000000..340fab7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/assertions_impl.h
@@ -0,0 +1,281 @@
+// Copyright (c) 1997
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Geert-Jan Giezeman and Sven Schönherr
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <CGAL/config.h>
+#include <CGAL/assertions.h>
+#include <CGAL/assertions_behaviour.h>
+#include <CGAL/exceptions.h>
+
+#include <cstdlib>
+#include <iostream>
+
+namespace CGAL {
+
+namespace {
+
+#ifdef CGAL_HEADER_ONLY
+
+inline Failure_behaviour& get_static_error_behaviour()
+{
+  static Failure_behaviour _error_behaviour = THROW_EXCEPTION;
+  return _error_behaviour;
+}
+inline Failure_behaviour& get_static_warning_behaviour()
+{
+  static Failure_behaviour _warning_behaviour = CONTINUE;
+  return _warning_behaviour;
+}
+
+#else // CGAL_HEADER_ONLY
+
+// behaviour variables
+// -------------------
+
+Failure_behaviour _error_behaviour   = THROW_EXCEPTION;
+Failure_behaviour _warning_behaviour = CONTINUE;
+
+inline Failure_behaviour& get_static_error_behaviour()
+{ return _error_behaviour; }
+inline Failure_behaviour& get_static_warning_behaviour()
+{ return _warning_behaviour; }
+
+#endif // CGAL_HEADER_ONLY
+
+// standard error handlers
+// -----------------------
+CGAL_INLINE_FUNCTION
+void
+_standard_error_handler(
+        const char* what,
+        const char* expr,
+        const char* file,
+        int         line,
+        const char* msg )
+{
+#if defined(__GNUG__) && !defined(__llvm__)
+    // After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
+    if (get_static_error_behaviour() == THROW_EXCEPTION)
+        return;
+#endif
+    std::cerr << "CGAL error: " << what << " violation!" << std::endl
+         << "Expression : " << expr << std::endl
+         << "File       : " << file << std::endl
+         << "Line       : " << line << std::endl
+         << "Explanation: " << msg << std::endl
+         << "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
+	 << std::endl;
+}
+
+
+// standard warning handler
+// ------------------------
+CGAL_INLINE_FUNCTION
+void
+_standard_warning_handler( const char *,
+                          const char* expr,
+                          const char* file,
+                          int         line,
+                          const char* msg )
+{
+#if defined(__GNUG__) && !defined(__llvm__)
+    // After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
+    if (get_static_warning_behaviour() == THROW_EXCEPTION)
+        return;
+#endif
+    std::cerr << "CGAL warning: check violation!" << std::endl
+         << "Expression : " << expr << std::endl
+         << "File       : " << file << std::endl
+         << "Line       : " << line << std::endl
+         << "Explanation: " << msg << std::endl
+         << "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
+	 << std::endl;
+}
+
+#ifdef CGAL_HEADER_ONLY
+
+inline Failure_function& get_static_error_handler()
+{
+  static Failure_function _error_handler = _standard_error_handler;
+  return _error_handler;
+}
+inline Failure_function& get_static_warning_handler()
+{
+  static Failure_function _warning_handler = _standard_warning_handler;
+  return _warning_handler;
+}
+
+#else // CGAL_HEADER_ONLY
+// default handler settings
+// ------------------------
+Failure_function _error_handler   = _standard_error_handler;
+Failure_function _warning_handler = _standard_warning_handler;
+
+inline Failure_function& get_static_error_handler()
+{ return _error_handler; }
+inline Failure_function& get_static_warning_handler()
+{ return _warning_handler; }
+
+#endif // CGAL_HEADER_ONLY
+
+} // anonymous namespace
+
+// failure functions
+// -----------------
+CGAL_INLINE_FUNCTION
+void
+assertion_fail( const char* expr,
+                const char* file,
+                int         line,
+                const char* msg)
+{
+    get_static_error_handler()("assertion", expr, file, line, msg);
+    switch (get_static_error_behaviour()) {
+    case ABORT:
+        std::abort();
+    case EXIT:
+        std::exit(1);  // EXIT_FAILURE
+    case EXIT_WITH_SUCCESS:
+        std::exit(0);  // EXIT_SUCCESS
+    case CONTINUE: // The CONTINUE case should not be used anymore.
+    case THROW_EXCEPTION:
+    default:
+        throw Assertion_exception("CGAL", expr, file, line, msg);
+    }
+}
+
+CGAL_INLINE_FUNCTION
+void
+precondition_fail( const char* expr,
+                   const char* file,
+                   int         line,
+                   const char* msg)
+{
+    get_static_error_handler()("precondition", expr, file, line, msg);
+    switch (get_static_error_behaviour()) {
+    case ABORT:
+        std::abort();
+    case EXIT:
+        std::exit(1);  // EXIT_FAILURE
+    case EXIT_WITH_SUCCESS:
+        std::exit(0);  // EXIT_SUCCESS
+    case CONTINUE:
+    case THROW_EXCEPTION:
+    default:
+        throw Precondition_exception("CGAL", expr, file, line, msg);
+    }
+}
+
+CGAL_INLINE_FUNCTION
+void
+postcondition_fail(const char* expr,
+                   const char* file,
+                   int         line,
+                   const char* msg)
+{
+    get_static_error_handler()("postcondition", expr, file, line, msg);
+    switch (get_static_error_behaviour()) {
+    case ABORT:
+        std::abort();
+    case EXIT:
+        std::exit(1);  // EXIT_FAILURE
+    case EXIT_WITH_SUCCESS:
+        std::exit(0);  // EXIT_SUCCESS
+    case CONTINUE:
+    case THROW_EXCEPTION:
+    default:
+        throw Postcondition_exception("CGAL", expr, file, line, msg);
+    }
+}
+
+
+// warning function
+// ----------------
+CGAL_INLINE_FUNCTION
+void
+warning_fail( const char* expr,
+              const char* file,
+              int         line,
+              const char* msg)
+{
+    get_static_warning_handler()("warning", expr, file, line, msg);
+    switch (get_static_warning_behaviour()) {
+    case ABORT:
+        std::abort();
+    case EXIT:
+        std::exit(1);  // EXIT_FAILURE
+    case EXIT_WITH_SUCCESS:
+        std::exit(0);  // EXIT_SUCCESS
+    case THROW_EXCEPTION:
+        throw Warning_exception("CGAL", expr, file, line, msg);
+    case CONTINUE:
+        ;
+    }
+}
+
+
+// error handler set functions
+// ---------------------------
+CGAL_INLINE_FUNCTION
+Failure_function
+set_error_handler( Failure_function handler)
+{
+    Failure_function result = get_static_error_handler();
+    get_static_error_handler() = handler;
+    return result;
+}
+
+CGAL_INLINE_FUNCTION
+Failure_function
+set_warning_handler( Failure_function handler)
+{
+    Failure_function result = get_static_warning_handler();
+    get_static_warning_handler() = handler;
+    return result;
+}
+
+CGAL_INLINE_FUNCTION
+Failure_behaviour
+set_error_behaviour(Failure_behaviour eb)
+{
+    Failure_behaviour result = get_static_error_behaviour();
+    get_static_error_behaviour() = eb;
+    return result;
+}
+
+CGAL_INLINE_FUNCTION
+Failure_behaviour
+set_warning_behaviour(Failure_behaviour eb)
+{
+    Failure_behaviour result = get_static_warning_behaviour();
+    get_static_warning_behaviour() = eb;
+    return result;
+}
+
+} //namespace CGAL
diff --git a/3rdparty/CGAL-4.8/include/CGAL/atomic.h b/3rdparty/CGAL-4.8/include/CGAL/atomic.h
new file mode 100644
index 0000000..86da4f8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/atomic.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2016 GeometryFactory Sarl (France)
+//  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+
+#ifndef CGAL_ATOMIC_H
+#define CGAL_ATOMIC_H
+
+#include <CGAL/config.h>
+
+#ifdef CGAL_HAS_THREADS
+
+#  ifdef CGAL_CAN_USE_CXX11_ATOMIC
+#    include <atomic>
+#    define CGAL_ATOMIC_NS std
+#  else // not CGAL_CAN_USE_CXX11_ATOMIC
+#    if BOOST_VERSION >= 105300
+#      include <boost/atomic.hpp>
+#      define CGAL_ATOMIC_NS boost
+#    else // BOOST_VERSION < 105300
+#      define CGAL_NO_ATOMIC "Boost.Atomic was introduced in Boost-1.53"
+#    endif // BOOST_VERSION < 105300
+#  endif // not CGAL_CAN_USE_CXX11_ATOMIC
+
+#  ifndef CGAL_NO_ATOMIC
+   namespace CGAL {
+     namespace cpp11 {
+       using CGAL_ATOMIC_NS ::atomic;
+
+       using CGAL_ATOMIC_NS ::memory_order_relaxed;
+       using CGAL_ATOMIC_NS ::memory_order_consume;
+       using CGAL_ATOMIC_NS ::memory_order_acquire;
+       using CGAL_ATOMIC_NS ::memory_order_release;
+       using CGAL_ATOMIC_NS ::memory_order_acq_rel;
+       using CGAL_ATOMIC_NS ::memory_order_seq_cst;
+
+       using CGAL_ATOMIC_NS ::atomic_thread_fence;
+     }
+   }
+#  endif // CGAL_ATOMIC_NS
+
+#endif // CGAL_HAS_THREADS
+
+#endif // CGAL_ATOMIC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/CGAL.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/CGAL.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/auto_link/CGAL.h
rename to 3rdparty/CGAL-4.8/include/CGAL/auto_link/CGAL.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/CORE.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/CORE.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/auto_link/CORE.h
rename to 3rdparty/CGAL-4.8/include/CGAL/auto_link/CORE.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/ImageIO.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/ImageIO.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/auto_link/ImageIO.h
rename to 3rdparty/CGAL-4.8/include/CGAL/auto_link/ImageIO.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/LAPACK.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/LAPACK.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/auto_link/LAPACK.h
rename to 3rdparty/CGAL-4.8/include/CGAL/auto_link/LAPACK.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/auto_link/Qt.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/Qt.h
new file mode 100644
index 0000000..19daa3c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/auto_link/Qt.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2008 GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_AUTO_LINK_QT_H
+#define CGAL_AUTO_LINK_QT_H
+
+#include <CGAL/config.h>
+#include <QtCore/qglobal.h>
+
+#if (! defined (CGAL_NO_AUTOLINK_QT))
+#if ( ! defined( CGAL_EXPORTS )  && (! defined ( CGAL_Qt5_EXPORTS )))
+
+// If CGAL_EXPORTS is defined it means that we are building the CGAL
+// library as a DLL. The CGAL.dll does not really depend on CGAL_Qt,
+// whatever the header inclusion graph says.
+
+#define CGAL_LIB_NAME CGAL_Qt5
+
+#include <CGAL/auto_link/auto_link.h>
+
+#endif // CGAL_EXPORTS
+#endif // CGAL_NO_AUTOLINK_QT
+
+#endif // CGAL_AUTO_LINK_QT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/auto_link/TAUCS.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/TAUCS.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/auto_link/TAUCS.h
rename to 3rdparty/CGAL-4.8/include/CGAL/auto_link/TAUCS.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/auto_link/auto_link.h b/3rdparty/CGAL-4.8/include/CGAL/auto_link/auto_link.h
new file mode 100644
index 0000000..c637c20
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/auto_link/auto_link.h
@@ -0,0 +1,449 @@
+// This header file is a copy of "boost/config/auto_link.hpp" 
+// from boost version 1.44.0
+// but slightly modified to accomodate CGAL libraries.
+
+// Before CGAL-4.7-beta1, it has been synchronized with
+// libs/config/ version boost-1.58.0-39-g15d56c9, file
+// include/boost/config/auto_link.hpp
+
+//  (C) Copyright John Maddock 2003.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ /*
+  *   LOCATION:    see http://www.boost.org for most recent version.
+  *   FILE         auto_link.hpp
+  *   VERSION      see <boost/version.hpp>
+  *   DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
+  */
+
+/*************************************************************************
+
+USAGE:
+~~~~~~
+
+Before including this header you must define one or more of define the following macros:
+
+CGAL_LIB_NAME:           Required: A string containing the basename of the library,
+                          for example boost_regex.
+CGAL_LIB_TOOLSET:        Optional: the base name of the toolset.
+CGAL_BUILD_SHARED_LIBS:  Optional: when set link to dll rather than static library.
+CGAL_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name
+                          of the library selected (useful for debugging).
+CGAL_AUTO_LINK_NOMANGLE: Specifies that we should link to CGAL_LIB_NAME.lib,
+                          rather than a mangled-name version.
+CGAL_AUTO_LINK_TAGGED:   Specifies that we link to libraries built with the --layout=tagged option.
+                          This is essentially the same as the default name-mangled version, but without
+                          the compiler name and version, or the Boost version.  Just the build options.
+
+These macros will be undef'ed at the end of the header, further this header
+has no include guards - so be sure to include it only once from your library!
+
+Algorithm:
+~~~~~~~~~~
+
+Libraries for Borland and Microsoft compilers are automatically
+selected here, the name of the lib is selected according to the following
+formula:
+
+CGAL_LIB_PREFIX
+   + CGAL_LIB_NAME
+   + "_"
+   + CGAL_LIB_TOOLSET
+   + CGAL_LIB_THREAD_OPT
+   + CGAL_LIB_RT_OPT
+   "-"
+   + CGAL_VERSION
+
+These are defined as:
+
+CGAL_LIB_PREFIX:     "lib" for static libraries otherwise "".
+
+CGAL_LIB_NAME:       The base name of the lib ( for example boost_regex).
+
+CGAL_LIB_TOOLSET:    The compiler toolset name (vc71, vc80 etc).
+
+CGAL_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
+
+CGAL_LIB_RT_OPT:     A suffix that indicates the runtime library used,
+                      contains one or more of the following letters after
+                      a hyphen:
+
+                      s      static runtime (dynamic if not present).
+                      g      debug/diagnostic runtime (release if not present).
+                      y      Python debug/diagnostic runtime (release if not present).
+                      d      debug build (release if not present).
+                      p      STLport build.
+                      n      STLport build without its IOStreams.
+
+CGAL_VERSION:        Defined in <CGAL/version.h>
+
+
+***************************************************************************/
+
+#ifndef CGAL_NO_AUTOLINK
+#ifndef CGAL_HEADER_ONLY // header only = no CGAL library
+
+#ifdef __cplusplus
+#  ifndef BOOST_CONFIG_HPP
+#     include <boost/config.hpp>
+#  endif
+#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
+//
+// C language compatability (no, honestly)
+//
+#  define BOOST_MSVC _MSC_VER
+#  define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
+#  define BOOST_DO_STRINGIZE(X) #X
+#endif
+//
+// Only include what follows for known and supported compilers:
+//
+#if defined(BOOST_MSVC) \
+    || defined(__BORLANDC__) \
+    || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
+    || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
+
+#ifndef CGAL_VERSION
+#  include <CGAL/version.h>
+#endif
+
+#ifndef CGAL_LIB_NAME
+#  error "Macro CGAL_LIB_NAME not set (internal error)"
+#endif
+
+//
+// error check:
+//
+#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
+#  pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
+#  pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
+#  error "Incompatible build options"
+#endif
+//
+// select toolset if not defined already:
+//
+#ifndef CGAL_LIB_TOOLSET
+#  if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
+    // Note: no compilers before 1200 are supported
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
+
+#    ifdef UNDER_CE
+       // eVC4:
+#      define CGAL_LIB_TOOLSET "evc4"
+#    else
+       // vc6:
+#      define CGAL_LIB_TOOLSET "vc6"
+#    endif
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
+
+     // vc7:
+#    define CGAL_LIB_TOOLSET "vc7"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
+
+     // vc71:
+#    define CGAL_LIB_TOOLSET "vc71"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
+
+     // vc80:
+#    define CGAL_LIB_TOOLSET "vc80"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
+
+     // vc90:
+#    define CGAL_LIB_TOOLSET "vc90"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
+
+     // vc10:
+#    define CGAL_LIB_TOOLSET "vc100"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
+
+     // vc11:
+#    define CGAL_LIB_TOOLSET "vc110"
+
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900)
+
+     // vc12:
+#    define CGAL_LIB_TOOLSET "vc120"
+
+# elif defined(BOOST_MSVC)
+
+   // vc14:
+#  define CGAL_LIB_TOOLSET "vc140"
+
+#  elif defined(__BORLANDC__)
+
+     // CBuilder 6:
+#    define CGAL_LIB_TOOLSET "bcb"
+
+#  elif defined(__ICL)
+
+     // Intel C++, no version number:
+#    define CGAL_LIB_TOOLSET "iw"
+
+#  elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
+
+     // Metrowerks CodeWarrior 8.x
+#    define CGAL_LIB_TOOLSET "cw8"
+
+#  elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
+
+     // Metrowerks CodeWarrior 9.x
+#    define CGAL_LIB_TOOLSET "cw9"
+
+#  endif
+#endif // CGAL_LIB_TOOLSET
+
+//
+// select thread opt:
+//
+#if defined(_MT) || defined(__MT__)
+#  define CGAL_LIB_THREAD_OPT "-mt"
+#else
+#  define CGAL_LIB_THREAD_OPT
+#endif
+
+#if defined(_MSC_VER) || defined(__MWERKS__)
+
+#  ifdef _DLL
+
+#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
+
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-gydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#            define CGAL_LIB_RT_OPT "-gdp"
+#        elif defined(_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-gydp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        elif defined(_DEBUG)
+#            define CGAL_LIB_RT_OPT "-gdp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        else
+#            define CGAL_LIB_RT_OPT "-p"
+#        endif
+
+#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-gydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#            define CGAL_LIB_RT_OPT "-gdpn"
+#        elif defined(_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-gydpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        elif defined(_DEBUG)
+#            define CGAL_LIB_RT_OPT "-gdpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        else
+#            define CGAL_LIB_RT_OPT "-pn"
+#        endif
+
+#     else
+
+#        if defined(_DEBUG) && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-gyd"
+#        elif defined(_DEBUG)
+#            define CGAL_LIB_RT_OPT "-gd"
+#        else
+#            define CGAL_LIB_RT_OPT
+#        endif
+
+#     endif
+
+#  else
+
+#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
+
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-sgydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#            define CGAL_LIB_RT_OPT "-sgdp"
+#        elif defined(_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#             define CGAL_LIB_RT_OPT "-sgydp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        elif defined(_DEBUG)
+#             define CGAL_LIB_RT_OPT "-sgdp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        else
+#            define CGAL_LIB_RT_OPT "-sp"
+#        endif
+
+#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#            define CGAL_LIB_RT_OPT "-sgydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#            define CGAL_LIB_RT_OPT "-sgdpn"
+#        elif defined(_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#             define CGAL_LIB_RT_OPT "-sgydpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        elif defined(_DEBUG)
+#             define CGAL_LIB_RT_OPT "-sgdpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
+#        else
+#            define CGAL_LIB_RT_OPT "-spn"
+#        endif
+
+#     else
+
+#        if defined(_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#             define CGAL_LIB_RT_OPT "-sgyd"
+#        elif defined(_DEBUG)
+#             define CGAL_LIB_RT_OPT "-sgd"
+#        else
+#            define CGAL_LIB_RT_OPT "-s"
+#        endif
+
+#     endif
+
+#  endif
+
+#elif defined(__BORLANDC__)
+
+//
+// figure out whether we want the debug builds or not:
+//
+#if __BORLANDC__ > 0x561
+#pragma defineonoption CGAL_BORLAND_DEBUG -v
+#endif
+//
+// sanity check:
+//
+#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
+#error "Pre-built versions of the CGAL libraries are not provided in STLport-debug form"
+#endif
+
+#  ifdef _RTLDLL
+
+#     if defined(CGAL_BORLAND_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#         define CGAL_LIB_RT_OPT "-yd"
+#     elif defined(CGAL_BORLAND_DEBUG)
+#         define CGAL_LIB_RT_OPT "-d"
+#     elif defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#         define CGAL_LIB_RT_OPT -y
+#     else
+#         define CGAL_LIB_RT_OPT
+#     endif
+
+#  else
+
+#     if defined(CGAL_BORLAND_DEBUG)\
+               && defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#         define CGAL_LIB_RT_OPT "-syd"
+#     elif defined(CGAL_BORLAND_DEBUG)
+#         define CGAL_LIB_RT_OPT "-sd"
+#     elif defined(CGAL_DEBUG_PYTHON) && defined(CGAL_LINKING_PYTHON)
+#         define CGAL_LIB_RT_OPT "-sy"
+#     else
+#         define CGAL_LIB_RT_OPT "-s"
+#     endif
+
+#  endif
+
+#endif
+
+//
+// select linkage opt:
+//
+#if (defined(_DLL) || defined(_RTLDLL)) && defined(CGAL_BUILD_SHARED_LIBS)
+#  define CGAL_LIB_PREFIX
+#elif defined(CGAL_BUILD_SHARED_LIBS)
+#  error "Mixing a dll CGAL library with a static runtime is a really bad idea..."
+#else
+#  define CGAL_LIB_PREFIX "lib"
+#endif
+
+//
+// now include the lib:
+//
+#if defined(CGAL_LIB_NAME) \
+      && defined(CGAL_LIB_PREFIX) \
+      && defined(CGAL_LIB_TOOLSET) \
+      && defined(CGAL_LIB_THREAD_OPT) \
+      && defined(CGAL_LIB_RT_OPT) \
+      && defined(CGAL_VERSION)
+
+#ifdef CGAL_AUTO_LINK_TAGGED
+#  pragma commentcomment(lib, CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT ".lib")
+#  ifdef CGAL_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
+#  endif
+#elif defined(CGAL_AUTO_LINK_NOMANGLE)
+#  pragma comment(lib, BOOST_STRINGIZE(CGAL_LIB_NAME) ".lib")
+#  ifdef CGAL_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(CGAL_LIB_NAME) ".lib")
+#  endif
+#else
+#  pragma comment(lib, CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
+#  ifdef CGAL_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " CGAL_LIB_PREFIX BOOST_STRINGIZE(CGAL_LIB_NAME) "-" CGAL_LIB_TOOLSET CGAL_LIB_THREAD_OPT CGAL_LIB_RT_OPT "-" BOOST_STRINGIZE(CGAL_VERSION) ".lib")
+#  endif
+#endif
+
+#else
+#  error "some required macros where not defined (internal logic error)."
+#endif
+
+
+#endif // _MSC_VER || __BORLANDC__
+
+#endif // CGAL_HEADER_ONLY
+#endif // CGAL_NO_AUTOLINK
+
+//
+// finally undef any macros we may have set:
+//
+#ifdef CGAL_LIB_PREFIX
+#  undef CGAL_LIB_PREFIX
+#endif
+#if defined(CGAL_LIB_NAME)
+#  undef CGAL_LIB_NAME
+#endif
+// Don't undef this one: it can be set by the user and should be the 
+// same for all libraries:
+//#if defined(CGAL_LIB_TOOLSET)
+//#  undef CGAL_LIB_TOOLSET
+//#endif
+#if defined(CGAL_LIB_THREAD_OPT)
+#  undef CGAL_LIB_THREAD_OPT
+#endif
+#if defined(CGAL_LIB_RT_OPT)
+#  undef CGAL_LIB_RT_OPT
+#endif
+#if defined(CGAL_LIB_LINK_OPT)
+#  undef CGAL_LIB_LINK_OPT
+#endif
+#if defined(CGAL_LIB_DEBUG_OPT)
+#  undef CGAL_LIB_DEBUG_OPT
+#endif
+#if defined(CGAL_DYN_LINK)
+#  undef CGAL_DYN_LINK
+#endif
+#if defined(CGAL_AUTO_LINK_NOMANGLE)
+#  undef CGAL_AUTO_LINK_NOMANGLE
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/barycenter.h b/3rdparty/CGAL-4.8/include/CGAL/barycenter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/barycenter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/barycenter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/basic.h b/3rdparty/CGAL-4.8/include/CGAL/basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/basic_classes.h b/3rdparty/CGAL-4.8/include/CGAL/basic_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/basic_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/basic_classes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/basic_constructions_2.h b/3rdparty/CGAL-4.8/include/CGAL/basic_constructions_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/basic_constructions_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/basic_constructions_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/basic_constructions_3.h b/3rdparty/CGAL-4.8/include/CGAL/basic_constructions_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/basic_constructions_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/basic_constructions_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/bbox_intersection_3.h b/3rdparty/CGAL-4.8/include/CGAL/bbox_intersection_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/bbox_intersection_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/bbox_intersection_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/bilateral_smooth_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/bilateral_smooth_point_set.h
new file mode 100644
index 0000000..53c5b64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/bilateral_smooth_point_set.h
@@ -0,0 +1,652 @@
+// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
+
+#ifndef CGAL_BILATERAL_SMOOTH_POINT_SET_H
+#define CGAL_BILATERAL_SMOOTH_POINT_SET_H
+
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Point_with_normal_3.h>
+
+#include <iterator>
+#include <set>
+#include <algorithm>
+#include <cmath>
+#include <ctime>
+#include <CGAL/Real_timer.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+#include <boost/property_map/property_map.hpp>
+#else
+#include <boost/property_map.hpp>
+#endif
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#include <tbb/scalable_allocator.h>  
+#endif // CGAL_LINKED_WITH_TBB
+
+// Default allocator: use TBB allocators if available
+#ifdef CGAL_LINKED_WITH_TBB
+# define CGAL_PSP3_DEFAULT_ALLOCATOR tbb::scalable_allocator
+#else // CGAL_LINKED_WITH_TBB
+# define CGAL_PSP3_DEFAULT_ALLOCATOR std::allocator
+#endif // CGAL_LINKED_WITH_TBB
+
+
+//#define CGAL_PSP3_VERBOSE 
+
+namespace CGAL {
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+
+namespace bilateral_smooth_point_set_internal{
+
+// Item in the Kd-tree: position (Point_3) + index
+template <typename Kernel>
+class Kd_tree_element : public Point_with_normal_3<Kernel>
+{
+public:
+  unsigned int index;
+
+  // basic geometric types
+  typedef typename CGAL::Origin Origin;
+  typedef CGAL::Point_with_normal_3<Kernel> Base;
+
+  Kd_tree_element(const Origin& o = ORIGIN, unsigned int id=0)
+    : Base(o), index(id)
+  {}
+  Kd_tree_element(const Base& p, unsigned int id=0)
+    : Base(p), index(id)
+  {}
+  Kd_tree_element(const Kd_tree_element& other)
+    : Base(other), index(other.index)
+  {}
+};
+
+
+// Helper class for the Kd-tree
+template <typename Kernel>
+class Kd_tree_gt : public Kernel
+{
+public:
+  typedef Kd_tree_element<Kernel> Point_3;
+};
+
+template <typename Kernel>
+class Kd_tree_traits : public CGAL::Search_traits_3<Kd_tree_gt<Kernel> >
+{
+public:
+  typedef typename Kernel::Point_3 PointType;
+};
+
+
+/// Compute bilateral projection for each point
+/// according to their KNN neighborhood points
+/// 
+/// \pre `k >= 2`, radius > 0 , sharpness_angle > 0 && sharpness_angle < 90
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return 
+
+template <typename Kernel>
+CGAL::Point_with_normal_3<Kernel>
+compute_denoise_projection(
+  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point to project
+  const std::vector<CGAL::Point_with_normal_3<Kernel>,
+  CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > >& neighbor_pwns,  //
+  typename Kernel::FT radius,                   ///< accept neighborhood radius
+  typename Kernel::FT sharpness_angle           ///< control sharpness(0-90)
+)
+{
+  CGAL_point_set_processing_precondition(radius > 0);
+  CGAL_point_set_processing_precondition(sharpness_angle > 0
+                                         && sharpness_angle < 90);
+
+  // basic geometric types
+  typedef typename Kernel::FT FT;
+  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::Point_3 Point;
+
+  FT radius2 = radius * radius;
+
+  FT weight = (FT)0.0;
+  FT iradius16 = -(FT)4.0/radius2;
+  FT project_dist_sum = FT(0.0);
+  FT project_weight_sum = FT(0.0);
+  Vector normal_sum = CGAL::NULL_VECTOR; 
+
+  FT cos_sigma = cos(sharpness_angle / 180.0 * 3.1415926);
+  FT sharpness_bandwidth = std::pow((CGAL::max)(1e-8, 1 - cos_sigma), 2);
+
+  typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::const_iterator 
+    pwn_iter = neighbor_pwns.begin();
+  for (; pwn_iter != neighbor_pwns.end(); ++pwn_iter)
+  {
+    const Point& np = pwn_iter->position();
+    const Vector& nn = pwn_iter->normal();
+
+    FT dist2 = CGAL::squared_distance(query.position(), np);
+    if (dist2 < radius2)
+    {
+      FT theta = std::exp(dist2 * iradius16);
+      FT psi = std::exp(-std::pow(1 - query.normal() * nn, 2)
+        / sharpness_bandwidth);
+
+      weight = theta * psi;
+
+      project_dist_sum += ((query.position() - np) * nn) * weight;
+      project_weight_sum += weight;
+      normal_sum = normal_sum + nn * weight;
+    }
+  }
+
+  Vector update_normal = normal_sum / project_weight_sum;
+  update_normal = update_normal / sqrt(update_normal.squared_length());
+
+  Point update_point = query.position() - update_normal * 
+                      (project_dist_sum / project_weight_sum); 
+
+  return Pwn(update_point, update_normal);
+}
+
+/// Computes neighbors from kdtree.
+///
+/// \pre `k >= 2`.
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return neighbors pwn of query point.
+template < typename Kernel,
+           typename Tree>
+std::vector<CGAL::Point_with_normal_3<Kernel>,
+            CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > >
+compute_kdtree_neighbors(
+  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point
+  const Tree& tree,                               ///< KD-tree
+  unsigned int k                                  ///< number of neighbors         
+)                       
+{
+  // basic geometric types
+  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
+
+  // types for K nearest neighbors search
+  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
+  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // performs k + 1 queries (if unique the query point is
+  // output first). search may be aborted when k is greater
+  // than number of input points
+  Neighbor_search search(tree, query, k+1);
+  Search_iterator search_iterator = search.begin();
+  ++search_iterator;
+  unsigned int i;
+  std::vector<CGAL::Point_with_normal_3<Kernel>
+    , CGAL_PSP3_DEFAULT_ALLOCATOR<CGAL::Point_with_normal_3<Kernel> > 
+    > neighbor_pwns;
+
+  for(i = 0; i < (k+1); ++i)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+
+    Pwn pwn = search_iterator->first;
+    neighbor_pwns.push_back(pwn);
+    ++search_iterator;
+  }
+
+  // output 
+  return neighbor_pwns;
+}
+
+
+/// Computes max-spacing of one query point from K nearest neighbors.
+///
+/// \pre `k >= 2`.
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return max spacing.
+template < typename Kernel,
+           typename Tree >
+typename Kernel::FT
+compute_max_spacing(
+  const CGAL::Point_with_normal_3<Kernel>& query, ///< 3D point
+  Tree& tree,                                     ///< KD-tree
+  unsigned int k)                                 ///< number of neighbors
+{
+  // basic geometric types
+  typedef typename Kernel::FT FT;
+  typedef CGAL::Point_with_normal_3<Kernel> Pwn;
+
+  // types for K nearest neighbors search
+  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
+  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // performs k + 1 queries (if unique the query point is
+  // output first). search may be aborted when k is greater
+  // than number of input points
+  Neighbor_search search(tree,query,k+1);
+  Search_iterator search_iterator = search.begin();
+  ++search_iterator;
+  FT max_distance = (FT)0.0;
+  unsigned int i;
+  for(i = 0; i < (k+1) ; ++i)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+
+    Pwn pwn = search_iterator->first;
+    double dist2 = CGAL::squared_distance(query.position(), pwn.position());
+    max_distance = (CGAL::max)(dist2, max_distance);
+    ++search_iterator;
+  }
+
+  // output max spacing
+  return std::sqrt(max_distance);
+}
+
+} /* namespace internal */
+
+/// \endcond
+
+#ifdef CGAL_LINKED_WITH_TBB
+/// \cond SKIP_IN_MANUAL
+/// This is for parallelization of function: bilateral_smooth_point_set()
+template <typename Kernel, typename Tree>
+class Compute_pwns_neighbors
+{
+  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
+  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
+  typedef typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> > 
+                                                                Pwns_neighbors;
+  typedef typename Kernel::FT FT;
+
+  unsigned int                                              m_k;
+  const Tree                                              & m_tree;
+  const Pwns                                              & m_pwns;
+  Pwns_neighbors                                          & m_pwns_neighbors;
+
+public:
+  Compute_pwns_neighbors(unsigned int k, const Tree &tree,
+                         const Pwns &pwns, Pwns_neighbors &neighbors)
+    : m_k(k), m_tree(tree), m_pwns(pwns), m_pwns_neighbors(neighbors) {} 
+
+  void operator() ( const tbb::blocked_range<size_t>& r ) const 
+  {
+    for (size_t i = r.begin(); i!=r.end(); i++)
+    {
+      m_pwns_neighbors[i] = bilateral_smooth_point_set_internal::
+        compute_kdtree_neighbors<Kernel, Tree>(m_pwns[i], m_tree, m_k);
+    }
+  }
+};
+/// \endcond  
+
+/// \cond SKIP_IN_MANUAL
+/// This is for parallelization of function: compute_denoise_projection()
+template <typename Kernel>
+class Pwn_updater 
+{
+  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
+  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
+  typedef typename Kernel::FT FT;
+
+  FT sharpness_angle;
+  FT radius;
+  Pwns* pwns;
+  Pwns* update_pwns;
+  std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >* pwns_neighbors;
+
+public:
+  Pwn_updater(FT sharpness, 
+    FT r,
+    Pwns *in,
+    Pwns *out, 
+    std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >* neighbors): 
+  sharpness_angle(sharpness), 
+    radius(r),
+    pwns(in),
+    update_pwns(out),
+    pwns_neighbors(neighbors){} 
+
+
+  void operator() ( const tbb::blocked_range<size_t>& r ) const 
+  { 
+    for (size_t i = r.begin(); i != r.end(); ++i) 
+    {
+      (*update_pwns)[i] = bilateral_smooth_point_set_internal::
+        compute_denoise_projection<Kernel>((*pwns)[i], 
+        (*pwns_neighbors)[i], 
+        radius,
+        sharpness_angle);  
+
+    }
+  }
+};
+/// \endcond
+#endif // CGAL_LINKED_WITH_TBB
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+//=============================================================================
+/// \ingroup PkgPointSetProcessing
+/// 
+/// This function smooths an input point set by iteratively projecting each 
+///  point onto the implicit surface patch fitted over its k nearest neighbors.
+///  Bilateral projection preserves sharp features according to the normal
+/// (gradient) information. Both point positions and normals will be modified.  
+/// For more details, please see section 4 in \cgalCite{ear-2013}.  
+///
+/// A parallel version of this function is provided and requires the executable to be 
+/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
+/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
+/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a> 
+/// for more details.
+///
+/// \pre Normals must be unit vectors
+/// \pre k >= 2
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadWritePropertyMap` 
+///         with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
+///         It can be omitted if the value type of `ForwardIterator` is convertible to 
+///         `Kernel::Point_3`.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with the value type of `ForwardIterator` as key
+///         and `Kernel::Vector_3` as value type.
+/// @tparam Kernel Geometric traits class.
+///      It can be omitted and deduced automatically from the value type of  `PointPMap`
+///      using `Kernel_traits`.
+///
+/// @return Average point movement error. It's a convergence criterium for the algorithm.
+///         This value can help the user to decide how many iterations are
+///         sufficient.
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+          typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel>
+double
+bilateral_smooth_point_set(
+  ForwardIterator first,    ///< forward iterator on the first input point.
+  ForwardIterator beyond,   ///< past-the-end iterator.
+  PointPMap point_pmap,     ///< point property map.
+  NormalPMap normal_pmap,   ///< normal property map.
+  unsigned int k,           ///< size of the neighborhood for the implicit surface patch fitting.
+                            ///< The larger the value is, the smoother the result will be.
+  typename Kernel::FT sharpness_angle,  ///< controls the sharpness of the result.
+                            ///< The larger the value is, the smoother the result will be.
+                            ///< The range of possible value is [0, 90].
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
+  typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+
+  CGAL_point_set_processing_precondition(first != beyond);
+  CGAL_point_set_processing_precondition(k > 1);
+
+  // types for K nearest neighbors search structure
+  typedef bilateral_smooth_point_set_internal::
+                                       Kd_tree_element<Kernel> Kd_tree_element;
+  typedef bilateral_smooth_point_set_internal::Kd_tree_traits<Kernel> Tree_traits;
+  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Tree;
+
+  // copy points and normals
+  Pwns pwns;
+  for(ForwardIterator it = first; it != beyond; ++it)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    const Point& p = get(point_pmap, it);
+    const Vector& n = get(normal_pmap, it);
+#else
+    const Point& p = get(point_pmap, *it);
+    const Vector& n = get(normal_pmap, *it);
+#endif
+    CGAL_point_set_processing_precondition(n.squared_length() > 1e-10);
+    
+    pwns.push_back(Pwn(p, n));
+  }
+
+  std::size_t nb_points = pwns.size();
+
+#ifdef CGAL_PSP3_VERBOSE
+   std::cout << "Initialization and compute max spacing: " << std::endl;
+#endif
+   // initiate a KD-tree search for points
+   std::vector<Kd_tree_element,
+     CGAL_PSP3_DEFAULT_ALLOCATOR<Kd_tree_element> > treeElements;
+   treeElements.reserve(pwns.size());
+   typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::iterator 
+     pwn_iter = pwns.begin();
+   for (unsigned int i = 0; pwn_iter != pwns.end(); ++pwn_iter)
+   {
+     treeElements.push_back(Kd_tree_element(*pwn_iter, i));
+   }
+   Tree tree(treeElements.begin(), treeElements.end());
+   // Guess spacing
+#ifdef CGAL_PSP3_VERBOSE
+   CGAL::Real_timer task_timer;
+   task_timer.start();
+#endif
+   FT guess_neighbor_radius = 0.0; 
+
+   for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); ++pwn_iter)
+   {
+     FT max_spacing = bilateral_smooth_point_set_internal::
+       compute_max_spacing<Kernel,Tree>(*pwn_iter, tree, k);
+     guess_neighbor_radius = (CGAL::max)(max_spacing, guess_neighbor_radius); 
+   }
+   
+#ifdef CGAL_PSP3_VERBOSE
+   task_timer.stop();
+#endif
+   guess_neighbor_radius *= 0.95;
+
+#ifdef CGAL_PSP3_VERBOSE
+   CGAL::Memory_sizer::size_type memory = CGAL::Memory_sizer().virtual_size();
+   std::cout << "done: " << task_timer.time() << " seconds, "
+             << (memory>>20) << " Mb allocated" << std::endl;
+
+   std::cout << "Compute all neighbors: " << std::endl;
+   task_timer.reset();
+   task_timer.start();
+#endif
+   // compute all neighbors
+   std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> > pwns_neighbors;
+   pwns_neighbors.resize(nb_points);
+ 
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+   if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
+   {
+     Compute_pwns_neighbors<Kernel, Tree> f(k, tree, pwns, pwns_neighbors);
+     tbb::parallel_for(tbb::blocked_range<size_t>(0, nb_points), f);
+   }
+   else
+#endif
+   {
+     typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >::iterator 
+       pwns_iter = pwns_neighbors.begin();
+
+     for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); ++pwn_iter, ++pwns_iter)
+     {
+       *pwns_iter = bilateral_smooth_point_set_internal::
+         compute_kdtree_neighbors<Kernel, Tree>(*pwn_iter, tree, k);
+     }
+   }
+   
+#ifdef CGAL_PSP3_VERBOSE
+   task_timer.stop();
+   memory = CGAL::Memory_sizer().virtual_size();
+   std::cout << "done: " << task_timer.time() << " seconds, "
+             << (memory>>20) << " Mb allocated" << std::endl;
+
+   std::cout << "Compute update points and normals: " << std::endl;
+   task_timer.reset();
+   task_timer.start();
+#endif
+   // update points and normals
+   Pwns update_pwns(nb_points);
+
+#ifdef CGAL_LINKED_WITH_TBB
+   if(boost::is_convertible<Concurrency_tag, CGAL::Parallel_tag>::value)
+   {
+     //tbb::task_scheduler_init init(4);
+     tbb::blocked_range<size_t> block(0, nb_points);
+     Pwn_updater<Kernel> pwn_updater(sharpness_angle,
+                                     guess_neighbor_radius,
+                                     &pwns,
+                                     &update_pwns,
+                                     &pwns_neighbors);
+     tbb::parallel_for(block, pwn_updater);
+   }
+   else
+#endif // CGAL_LINKED_WITH_TBB
+   {
+     typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> >::iterator 
+       update_iter = update_pwns.begin();
+     typename std::vector<Pwns,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwns> >::iterator 
+       neighbor_iter = pwns_neighbors.begin();
+     for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); 
+         ++pwn_iter, ++update_iter, ++neighbor_iter)
+     {
+       *update_iter = bilateral_smooth_point_set_internal::
+         compute_denoise_projection<Kernel>
+         (*pwn_iter, 
+          *neighbor_iter, 
+          guess_neighbor_radius, 
+          sharpness_angle);
+     }
+   }
+#ifdef CGAL_PSP3_VERBOSE
+   task_timer.stop(); 
+   memory = CGAL::Memory_sizer().virtual_size();
+   std::cout << "done: " << task_timer.time() << " seconds, "
+             << (memory>>20) << " Mb allocated" << std::endl;
+#endif
+   // save results
+   FT sum_move_error = 0;
+   ForwardIterator it = first;
+   for(unsigned int i = 0 ; it != beyond; ++it, ++i)
+   {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+     Point& p = get(point_pmap, it);
+     Vector& n = get(normal_pmap, it);
+#else
+     Point& p = get(point_pmap, *it);
+     Vector& n = get(normal_pmap, *it);
+#endif
+     sum_move_error += CGAL::squared_distance(p, update_pwns[i].position());
+     p = update_pwns[i].position();
+     n = update_pwns[i].normal();
+   }
+     
+   return sum_move_error / nb_points;
+}
+
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename Concurrency_tag,
+          typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap>
+double
+bilateral_smooth_point_set(
+  ForwardIterator first,      ///< forward iterator to the first input point.
+  ForwardIterator beyond,     ///< past-the-end iterator.
+  PointPMap point_pmap,        ///< property map OutputIterator -> Point_3.
+  NormalPMap normal_pmap,    ///< property map ForwardIterator -> Vector_3.
+  const unsigned int k,      ///< number of neighbors.
+  double sharpness_angle     ///< control sharpness(0-90)
+) ///< property map OutputIterator -> Vector_3.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return bilateral_smooth_point_set<Concurrency_tag>(
+    first, beyond,
+    point_pmap,
+    normal_pmap,
+    k,
+    sharpness_angle,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Dereference_property_map.
+template <typename Concurrency_tag,
+          typename ForwardIterator,
+          typename NormalPMap>
+double
+bilateral_smooth_point_set(
+  ForwardIterator first,    ///< forward iterator to the first input point.
+  ForwardIterator beyond,   ///< past-the-end iterator.
+  const unsigned int k,     ///< number of neighbors.
+  double sharpness_angle,   ///< control sharpness(0-90)
+  NormalPMap normal_pmap)   ///< property map OutputIterator -> Vector_3.
+{
+  return bilateral_smooth_point_set<Concurrency_tag>(
+    first, beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+    normal_pmap, 
+    k,
+    sharpness_angle);
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_BILATERAL_SMOOTH_POINT_SET_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Dual.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Dual.h
new file mode 100644
index 0000000..fd904a5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Dual.h
@@ -0,0 +1,329 @@
+// Copyright (c) 2015  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_BGL_DUAL_H
+#define CGAL_BGL_DUAL_H
+
+#include <CGAL/boost/graph/properties.h>
+#include <boost/range/distance.hpp>
+
+namespace CGAL {
+
+template <typename Primal_>
+class Dual
+{
+  
+  const Primal_& primal_;
+
+public:
+  typedef Primal_ Primal;
+
+  Dual(const Primal& primal)
+  : primal_(primal)
+  {}
+
+  const Primal& primal() const
+  {
+    return primal_;
+  }
+};
+
+} // namespace CGAL
+
+namespace boost {
+  
+template <typename Primal>
+class graph_traits<CGAL::Dual<Primal> >
+{
+  typedef boost::graph_traits<Primal> GTP;
+  struct Dual_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                   public virtual boost::vertex_list_graph_tag,
+                                   public virtual boost::edge_list_graph_tag
+  {};
+
+public:
+  typedef typename GTP::face_descriptor     vertex_descriptor;
+  typedef typename GTP::vertex_descriptor   face_descriptor;
+  typedef typename GTP::halfedge_descriptor halfedge_descriptor;
+  typedef typename GTP::edge_descriptor     edge_descriptor;
+  typedef typename GTP::directed_category   directed_category;
+  typedef boost::allow_parallel_edge_tag    edge_parallel_category; 
+  typedef Dual_traversal_category           traversal_category;
+
+  typedef typename GTP::faces_size_type          vertices_size_type;
+  typedef typename GTP::vertices_size_type       faces_size_type;
+  typedef typename GTP::edges_size_type          edges_size_type;
+  typedef typename GTP::halfedges_size_type      halfedges_size_type;
+  typedef typename GTP::degree_size_type         degree_size_type;
+
+  typedef typename GTP::face_iterator     vertex_iterator;
+  typedef typename GTP::vertex_iterator   face_iterator;
+  typedef typename GTP::halfedge_iterator halfedge_iterator;
+  typedef typename GTP::edge_iterator     edge_iterator;
+
+  typedef CGAL::Halfedge_around_face_iterator<Primal> in_edge_iterator;
+  typedef CGAL::Opposite_edge_around_face_iterator<Primal> out_edge_iterator;
+
+  static vertex_descriptor   null_vertex()   { return vertex_descriptor(); }
+  static face_descriptor     null_face()     { return face_descriptor(); }
+  static halfedge_descriptor null_halfedge() { return halfedge_descriptor(); }
+};
+ 
+template<typename P>
+struct graph_traits< const CGAL::Dual<P> >  
+  : public graph_traits< CGAL::Dual<P> >
+{}; 
+
+namespace internal{
+
+template <class G>
+struct Dual_vertex_index_pmap{
+  typedef typename boost::property_map<G, boost::face_index_t>::type  Property_map;
+  Property_map m_pmap;
+
+  typedef typename boost::graph_traits<G>::face_descriptor key_type;
+  typedef typename Property_map::value_type value_type;
+  typedef typename Property_map::reference reference;
+  typedef typename Property_map::category category;
+
+  Dual_vertex_index_pmap(const G& g)
+    : m_pmap( get(boost::face_index, g) )
+  {}
+
+  friend reference get(const Dual_vertex_index_pmap<G>& pmap, key_type fd) {
+    return get(pmap.m_pmap, fd);
+  }
+};
+
+template <class G>
+struct Dual_face_index_pmap{
+  typedef typename boost::property_map<G, boost::vertex_index_t>::type  Property_map;
+  Property_map m_pmap;
+
+  typedef typename boost::graph_traits<G>::vertex_descriptor key_type;
+  typedef typename Property_map::value_type value_type;
+  typedef typename Property_map::reference reference;
+  typedef typename Property_map::category category;
+
+  Dual_face_index_pmap(const G& g)
+    : m_pmap( get(boost::vertex_index, g) )
+  {}
+
+  friend reference get(const Dual_face_index_pmap<G>& pmap, key_type vd) {
+    return get(pmap.m_pmap, vd);
+  }
+};
+
+} //end of namespace internal
+
+template <typename P>
+struct property_map<CGAL::Dual<P>, boost::vertex_index_t>
+{
+  typedef internal::Dual_vertex_index_pmap<P> type;
+  typedef internal::Dual_vertex_index_pmap<P> const_type;
+};
+
+template <typename P>
+struct property_map<CGAL::Dual<P>, boost::face_index_t>
+{
+  typedef internal::Dual_face_index_pmap<P> type;
+  typedef internal::Dual_face_index_pmap<P> const_type;
+};
+
+} // namespace boost
+
+
+namespace CGAL {
+
+template <typename P>
+typename boost::internal::Dual_vertex_index_pmap<P>
+get(boost::vertex_index_t, const Dual<P>& dual)
+{
+  return typename boost::internal::Dual_vertex_index_pmap<P>(dual.primal());
+}
+
+template <typename P>
+typename boost::internal::Dual_face_index_pmap<P>
+get(boost::face_index_t, const Dual<P>& dual)
+{
+  return typename boost::internal::Dual_face_index_pmap<P>(dual.primal());
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Dual<P> >::vertices_size_type
+num_vertices(const CGAL::Dual<P>& dual)
+{
+  return num_faces(dual.primal());
+}
+     
+template <typename P>
+Iterator_range<typename boost::graph_traits<Dual<P> >::vertex_iterator>
+vertices(const CGAL::Dual<P>& dual)
+{
+  return faces(dual.primal()); 
+}
+    
+template <typename P>
+Iterator_range<typename boost::graph_traits<Dual<P> >::halfedge_iterator>
+halfedges(const CGAL::Dual<P>& dual)
+{
+  return halfedges(dual.primal()); 
+}
+  
+template <typename P>
+Iterator_range<typename boost::graph_traits<Dual<P> >::edge_iterator>
+edges(const CGAL::Dual<P>& dual)
+{
+  return edges(dual.primal()); 
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::vertex_descriptor
+source(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+       const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return face(opposite(h,primal),primal);
+}
+ 
+template <typename P>
+typename boost::graph_traits<Dual<P> >::vertex_descriptor
+target(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+       const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return face(h,primal);
+}
+ 
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::vertex_descriptor
+source(typename boost::graph_traits<Dual<P> >::edge_descriptor h,
+       const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return face(opposite(halfedge(h,primal),primal),primal);
+}
+ 
+template <typename P>
+typename boost::graph_traits<Dual<P> >::vertex_descriptor
+target(typename boost::graph_traits<Dual<P> >::edge_descriptor h,
+       const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return face(halfedge(h,primal),primal);
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
+         const Dual<P>& dual)
+{
+  return halfedge(v, dual.primal());
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<Dual<P> >::face_descriptor f,
+         const Dual<P>& dual)
+{
+  return halfedge(f, dual.primal());
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<Dual<P> >::edge_descriptor e,
+         const Dual<P>& dual)
+{
+  return halfedge(e, dual.primal());
+}
+template <typename P>
+typename boost::graph_traits<Dual<P> >::face_descriptor
+face(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+       const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return target(h,primal);
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+opposite(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+         const Dual<P>& dual)
+{
+  return opposite(h, dual.primal());
+}
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+next(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+         const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return opposite(prev(h,primal),primal);
+}  
+
+template <typename P>
+typename boost::graph_traits<Dual<P> >::halfedge_descriptor
+prev(typename boost::graph_traits<Dual<P> >::halfedge_descriptor h,
+         const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return next(opposite(h,primal),primal);
+}  
+
+template <typename P>
+Iterator_range<typename boost::graph_traits<Dual<P> >::out_edge_iterator>
+out_edges(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
+          const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return opposite_edges_around_face(halfedge(v,primal),primal);
+}
+
+template <typename P>
+Iterator_range<typename boost::graph_traits<Dual<P> >::out_edge_iterator>
+in_edges(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
+         const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return halfedges_around_face(halfedge(v,primal),primal);
+}
+       
+template <typename P>
+typename boost::graph_traits<Dual<P> >::degree_size_type
+out_degree(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
+           const Dual<P>& dual)
+{
+  const typename Dual<P>::Primal& primal = dual.primal();
+  return boost::distance(halfedges_around_face(halfedge(v,primal),primal));
+}
+
+ template <typename P>
+typename boost::graph_traits<Dual<P> >::degree_size_type
+in_degree(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
+           const Dual<P>& dual)
+{
+  return out_degree(v,dual);
+}
+         
+        
+} // namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Euler_operations.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Euler_operations.h
new file mode 100644
index 0000000..9ff71f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Euler_operations.h
@@ -0,0 +1,1480 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Moeller
+
+#ifndef CGAL_EULER_OPERATIONS_H
+#define CGAL_EULER_OPERATIONS_H
+
+#include <stdexcept>
+
+#include <boost/graph/graph_traits.hpp>
+#include <CGAL/boost/graph/properties.h>
+
+#include <CGAL/assertions.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/boost/graph/internal/helpers.h>
+#include <CGAL/boost/graph/iterator.h>
+
+namespace CGAL {
+
+/// \cond SKIP_IN_MANUAL
+
+namespace EulerImpl {
+
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+          Graph& g)
+{
+ typedef typename boost::graph_traits<Graph> Traits;
+  typedef typename Traits::halfedge_descriptor           halfedge_descriptor;
+
+  typedef typename Traits::face_descriptor               face_descriptor;
+
+
+  halfedge_descriptor hop = opposite(h,g);
+  halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g);
+  face_descriptor f = face(h, g), f2 = face(hop, g);
+
+  internal::remove_tip(hprev, g);
+
+  internal::remove_tip(gprev, g);
+
+  if(! is_border(hop,g)){
+    remove_face(f2, g);
+  }
+  bool fnull = is_border(h,g);
+
+  
+  halfedge_descriptor hprev2 = hprev;
+  while(hprev2 != gprev) {
+    hprev2 = next(hprev2, g);
+    set_face(hprev2, f, g);
+  }
+  
+  if (! fnull)
+    set_halfedge(f, hprev, g);
+  set_halfedge(target(hprev,g), hprev, g);
+  set_halfedge(target(gprev,g), gprev, g);
+  //  internal::set_constant_vertex_is_border(g, target(h, g));
+  //  internal::set_constant_vertex_is_border(g, target(opposite(h, g), g));
+
+  remove_edge(edge(h, g), g);
+  return hprev;
+
+}
+} // namespace EulerImpl
+
+/// \endcond
+
+  namespace Euler {
+/// \ingroup PkgBGLEulerOperations
+/// @{
+
+
+/**  
+ * joins the two vertices incident to `h`, (that is `source(h, g)` and
+ * `target(h, g)`) and removes `source(h,g)`. Returns the predecessor
+ * of `h` around the vertex, i.e., `prev(opposite(h,g))`.  The
+ * invariant `join_vertex(split_vertex(h,g),g)` returns `h`.  The
+ * time complexity is linear in the degree of the vertex removed.
+ *
+ * \image html join_vertex.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \param g the graph
+ * \param h the halfedge which incident vertices are joint
+ *
+ * \returns `prev(opposite(h,g))`
+ *
+ * \pre The size of the faces incident to `h` and `opposite(h,g)` is at least 4.
+ *
+ * \post `source(h, g)` is invalidated
+ * \post `h` is invalidated 
+ * 
+ * \sa `split_vertex()`
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+join_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+            Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::vertex_descriptor               vertex_descriptor;
+  typedef Halfedge_around_target_iterator<Graph>           halfedge_around_vertex_iterator;
+
+  halfedge_descriptor hop = opposite(h, g)
+    , hprev = prev(hop, g)
+    , gprev = prev(h, g)
+    , hnext = next(hop, g)
+    , gnext = next(h, g);
+  vertex_descriptor v_to_remove = target(hop, g)
+    , v = target(h, g);
+
+  // this assertion fires needlessly
+  // CGAL_precondition(std::distance(
+  //                     halfedges_around_face(e, g).first,
+  //                     halfedges_around_face(e, g).second) >= 4);
+
+  CGAL_assertion( halfedge(v_to_remove, v, g).first == h );
+
+  halfedge_around_vertex_iterator ieb, iee;
+  for(boost::tie(ieb, iee) = halfedges_around_target(hop, g); ieb != iee; ++ieb) {
+    CGAL_assertion( target(*ieb,g) == v_to_remove);
+    set_target(*ieb ,v , g);
+  }
+
+  set_next(hprev, hnext, g);
+  set_next(gprev, gnext, g);
+  set_halfedge(v, gprev, g);
+  // internal::set_constant_vertex_is_border(g, v);
+
+  if(! is_border(gprev,g)){
+    set_halfedge(face(gprev,g),gprev,g);
+  }
+  if(! is_border(hprev,g)){
+    set_halfedge(face(hprev,g),hprev,g);
+  }
+  remove_edge(edge(h, g), g);
+  remove_vertex(v_to_remove, g);
+
+  return hprev;
+}
+
+
+
+/** 
+ * splits the target vertex `v` of `h1` and `h2`, and connects the new vertex
+ * and `v` with a new edge. Let `hnew` be `opposite(next(h1, g), g)` after the
+ * split. The split regroups the halfedges around the two vertices. The
+ * edge sequence `hnew`, `opposite(next(h2, g), g)`, ..., `h1`
+ * remains around the old vertex, while the halfedge sequence
+ * `opposite(hnew, g)`, `opposite(next(h1, g), g)` (before the
+ * split), ..., `h2` is regrouped around the new vertex. The split
+ * returns `hnew`, i.e., the new edge incident to vertex `v`. The
+ * time is proportional to the distance from `h1` to `h2` around the
+ * vertex.
+ *
+ * \image html split_vertex.svg
+ *
+ * \tparam Graph must be a model of  `MutableFaceGraph`
+ *
+ * \param g the graph
+ * \param h1 halfedge descriptor
+ * \param h2 halfedge descriptor
+ *
+ * \returns `hnew`
+ *
+ * \pre `target(h1, g) == target(h2, g)`, that is  `h1` and `h2` are incident to the same vertex
+ * \pre `h1 != h2`, that is no antennas
+ *
+ * \sa `join_vertex()`
+ *
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+split_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+             typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+             Graph& g)
+{
+  CGAL_assertion(h1 != h2);
+  CGAL_assertion(target(h1, g) == target(h2, g));
+
+  typename boost::graph_traits<Graph>::halfedge_descriptor 
+    hnew = halfedge(add_edge(g), g),
+    hnewopp = opposite(hnew, g);
+  typename boost::graph_traits<Graph>::vertex_descriptor
+    vnew = add_vertex(g);
+  internal::insert_halfedge(hnew, h2, g);
+  internal::insert_halfedge(hnewopp, h1, g);
+  set_target(hnew, target(h1, g), g);
+  
+  typename boost::graph_traits<Graph>::halfedge_descriptor 
+    end = hnewopp;
+  do
+  {
+    set_target(hnewopp, vnew, g);
+    hnewopp = opposite(next(hnewopp, g), g);
+  } while (hnewopp != end);
+
+  internal::set_vertex_halfedge(hnew, g);
+  // internal::set_constant_vertex_is_border(g, target(hnew, g));
+  internal::set_vertex_halfedge(hnewopp, g);
+  // internal::set_constant_vertex_is_border(g, target(hnewopp, g));
+  return hnew;
+}
+
+/**
+ * splits the halfedge `h` into two halfedges inserting a new vertex that is a copy of `vertex(opposite(h,g),g)`.
+ * Is equivalent to `opposite(split_vertex( prev(h,g), opposite(h,g),g), g)`.
+ * \returns the new halfedge `hnew` pointing to the inserted vertex. The new halfedge is followed by the old halfedge, i.e., `next(hnew,g) == h`.
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+split_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g)
+{ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); }
+
+
+/**
+ * joins the two faces incident to `h` and `opposite(h,g)`. 
+ * The faces may be holes.
+ *
+ * If `Graph` is a model of `MutableFaceGraph`
+ * the face incident to `opposite(h,g)` is removed.
+ *
+ * `join_face()` and `split_face()` are inverse operations, that is
+ * `join_face(split_face(h,g),g)` returns `h`.
+ *
+ * \image html join_face.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`.
+ * \param g the graph
+ * \param h the halfedge incident to one of the faces to be joined.
+ *
+ * \returns `prev(h,g)`
+ *
+ * \pre `out_degree(source(h,g)), g)) >= 3`
+ * \pre `out_degree(target(h,g)) >= 3`
+ *
+ * \sa `split_face()`
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+          Graph& g)
+{
+  return EulerImpl::join_face(h,g);
+}
+
+
+
+/**
+ * splits the face incident to `h1` and `h2`.  Creates the opposite
+ * halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`.
+ * Performs the inverse operation to `join_face()`. 
+ *
+ * If `Graph` is a model of `MutableFaceGraph` and if the update of faces is not disabled
+ * a new face incident to `h4` is added. 
+ *
+ * \image html split_face.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \param g the graph
+ * \param h1
+ * \param h2
+ *
+ * \returns `h3`
+ *
+ * \pre `h1` and `h2` are incident to the same face
+ * \pre `h1 != h2`
+ * \pre `next(h1,g) != h2` and `next(h2,g) != h1` (no loop)
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+split_face(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+           typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+           Graph& g)
+{ 
+  typedef typename boost::graph_traits<Graph> Traits;
+  typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+  typedef typename Traits::face_descriptor face_descriptor;
+  halfedge_descriptor hnew = halfedge(add_edge(g), g);
+  face_descriptor fnew = add_face(g);
+  internal::insert_tip( hnew, h2, g);
+  internal::insert_tip( opposite(hnew, g), h1, g);
+  set_face( hnew, face(h1,g), g);
+  internal::set_face_in_face_loop(opposite(hnew,g), fnew, g);
+  set_halfedge(face(hnew,g), hnew, g);
+  set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
+  return hnew; 
+}
+
+  
+/**
+ * glues the cycle of halfedges of `h1` and `h2` together.
+ * The vertices in the cycle of `h2` get removed.
+ * If `h1` or `h2` are not border halfedges their faces get removed.
+ * The vertices on the face cycle of `h1` get removed.
+ * The invariant `join_loop(h1, split_loop(h1,h2,h3,g), g)` returns `h1` and keeps 
+ * the graph unchanged.
+ * 
+ * \image html join_loop.svg
+ *
+ * \tparam Graph must be a `MutableFaceGraph`
+ *
+ * \returns `h1`. 
+ *
+ * \pre The faces incident to `h` and `g` are different and have equal number of edges.
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+join_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+          typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+          Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+
+  CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g));
+  if (! is_border(h1,g))
+    remove_face(face(h1, g), g);
+  if (! is_border(h2,g))
+    remove_face(face(h2,g), g);
+  halfedge_descriptor hi = h1;
+  halfedge_descriptor gi = h2;
+  CGAL_assertion_code( std::size_t termination_count = 0;)
+  do {
+    CGAL_assertion( ++termination_count != 0);
+    halfedge_descriptor hii = hi;
+    halfedge_descriptor gii = gi;
+    hi = next(hi, g);
+    // gi = find_prev(gi); // Replaced by search around vertex.
+    set_face( hii, face( opposite(gii, g), g), g);
+    set_halfedge(face(hii, g), hii, g);
+    remove_vertex(target(opposite(gii, g), g), g);
+    if ( next(opposite(next(opposite(gii,g), g), g), g) == gii) {
+      gi = opposite(next(opposite(gii,g),g), g);
+    } else {
+      set_next(hii, next(opposite(gii,g), g), g);
+      gii = opposite(next(opposite(gii, g), g), g);
+      set_target( gii, target(hii, g), g);
+      while ( next(opposite(next(gii, g), g), g) != gi) {
+        CGAL_assertion( ++termination_count != 0);
+        gii = opposite(next(gii,g), g);
+        set_target( gii, target(hii, g), g);
+      }
+      gi = opposite(next(gii,g), g);
+      set_next(gii, hi, g);
+    }
+  } while ( hi != h1);
+  CGAL_assertion( gi == h2);
+  do {
+    halfedge_descriptor gii = gi;
+    gi = next(gi, g);
+    remove_edge(edge(gii,g), g);
+  } while ( gi != h2);
+  return h1;
+}
+
+
+/**
+ * cuts the graph along the cycle `(h1,h2,h3)` changing the genus 
+ * (halfedge `h3` runs on the backside of the three dimensional figure below).
+ * Three new vertices, three new pairs of halfedges,
+ * and two new triangular faces are created.
+ *
+ * `h1`, `h2`, and `h3` will be incident to the first new face. 
+ *
+ * Note that `split_loop()` does not deal with properties of new vertices, halfedges, and faces.
+ *
+ * \image html split_loop.svg
+ * 
+ * \tparam Graph must be a `MutableFaceGraph`
+ *
+ * \returns the halfedge incident to the second new face.
+ *
+ * \pre `h1`, `h2`, and `h3` denote distinct, consecutive halfedges of the graph 
+ * and form a cycle: i.e., `target(h1) == target(opposite(h2,g),g)`, … , 
+ * `target(h3,g) == target(opposite(h1,g),g)`. 
+ * \pre The six faces incident to `h1`, `h2`, and `h3` are all distinct.
+ */
+  template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+split_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+           typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+           typename boost::graph_traits<Graph>::halfedge_descriptor h3,
+           Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::face_descriptor                 face_descriptor;
+
+  halfedge_descriptor h = h1, i = h2, j = h3;
+   CGAL_precondition( h != i);
+        CGAL_precondition( h != j);
+        CGAL_precondition( i != j);
+        CGAL_precondition( target(h,g) == target(opposite(i,g),g));
+        CGAL_precondition( target(i,g) == target(opposite(j,g),g));
+        CGAL_precondition( target(j,g) == target(opposite(h,g),g));
+        // Create a copy of the triangle.
+        halfedge_descriptor hnew = internal::copy(h,g);
+        halfedge_descriptor inew = internal::copy(i,g);
+        halfedge_descriptor jnew = internal::copy(j,g);
+        internal::close_tip( hnew, add_vertex(g), g);
+        internal::close_tip( inew, add_vertex(g), g);
+        internal::close_tip( jnew, add_vertex(g), g);
+        internal::insert_tip( opposite(inew, g), hnew, g);
+        internal::insert_tip( opposite(jnew, g), inew, g);
+        internal::insert_tip( opposite(hnew, g), jnew, g);
+        // Make the new incidences with the old stucture.
+        CGAL_assertion_code( std::size_t termination_count = 0;)
+          if ( next(h,g) != i) {
+            halfedge_descriptor nh = next(h, g);
+            set_next(h, i, g);
+            set_next(hnew, nh, g);
+            nh = opposite(nh, g);
+            while ( next(nh, g) != i) {
+                CGAL_assertion( ++termination_count != 0);
+                set_target( nh, target(hnew,g), g);
+                nh = opposite(next(nh, g), g);
+            }
+            set_target( nh, target(hnew,g), g);
+            set_next(nh, inew, g);
+        }
+        if ( next(i, g) != j) {
+          halfedge_descriptor nh = next(i, g);
+          set_next(i, j, g);
+          set_next(inew, nh, g);
+          nh = opposite(nh,g);
+          while ( next(nh,g) != j) {
+                CGAL_assertion( ++termination_count != 0);
+                set_target( nh, target(inew, g), g);
+                nh = opposite(next(nh, g), g);
+            }
+          set_target( nh, target(inew, g), g);
+          set_next(nh, jnew, g);
+
+        }
+        if ( next(j,g) != h) {
+          halfedge_descriptor nh = next(j, g);
+          set_next(j, h, g);
+          set_next(jnew, nh, g);
+          nh = opposite(nh, g);
+          while ( next(nh,g) != h) {
+                CGAL_assertion( ++termination_count != 0);
+                set_target( nh, target(jnew, g), g);
+                nh = opposite(next(nh, g), g);
+            }
+          set_target(nh, target(jnew, g), g);
+          set_next(nh, hnew, g);
+        }
+        // Fill the holes with two new faces.
+        face_descriptor f = add_face(g);
+        set_face( h, f, g);
+        set_face( i, f, g);
+        set_face( j, f, g);
+        set_halfedge(face(h,g), h, g);
+        f = add_face(g);
+        set_face( opposite(hnew, g), f, g);
+        set_face( opposite(inew, g), f, g);
+        set_face( opposite(jnew, g), f, g);
+        set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
+        // Take care of maybe changed halfedge pointers.
+        set_halfedge(face(hnew, g), hnew, g);
+        set_halfedge(face(inew, g), inew, g);
+        set_halfedge(face(jnew, g), jnew, g);
+        set_halfedge(target(hnew, g), hnew, g);
+        set_halfedge(target(inew, g), inew, g);
+        set_halfedge(target(jnew, g), jnew, g);
+        return opposite(hnew, g);
+}
+
+
+/**
+ * removes the incident face of `h` and changes all halfedges incident to the face into border halfedges 
+ * or removes them from the graph if they were already border halfedges.
+ *
+ * If this creates isolated vertices they get removed as well. 
+ *
+ * \image html remove_face.svg
+ * \image html remove_face_and_vertex.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \pre `h` is not a border halfedge
+ *
+ * \sa `make_hole()` for a more specialized variant.
+ */
+template< typename Graph >
+void remove_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+                 Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>            Traits;
+  typedef typename Traits::halfedge_descriptor           halfedge_descriptor;
+  typedef typename Traits::face_descriptor               face_descriptor;
+
+  CGAL_precondition(! is_border(h,g));
+  face_descriptor f = face(h, g);
+
+  halfedge_descriptor end = h;
+  do {
+    internal::set_border(h,g);
+    halfedge_descriptor nh = next(h, g);
+    bool h_border = is_border(opposite(h, g),g);
+    bool nh_bborder = is_border(opposite(nh, g),g);
+
+    if(h_border && nh_bborder && next(opposite(nh, g), g) == opposite(h, g)) {
+      remove_vertex(target(h, g), g);
+      if(h != end)
+        remove_edge(edge(h, g), g);
+    } else {
+      if(nh_bborder) {
+        internal::set_vertex_halfedge(opposite(next(opposite(nh, g), g), g), g);
+        internal::remove_tip(h, g);
+        //internal::set_constant_vertex_is_border(g, target(h, g));
+      }
+      if(h_border) {
+        internal::set_vertex_halfedge(opposite(next(h, g), g), g);
+        internal::remove_tip(prev(opposite(h, g), g), g);
+        //internal::set_constant_vertex_is_border(g, target(prev(opposite(h, g), g), g));
+        if(h != end)
+          remove_edge(edge(h, g), g);
+      }
+    }
+    h = nh;
+  } while(h != end);
+  remove_face(f, g);
+
+  if(is_border(opposite(h, g),g))
+    remove_edge(edge(h, g), g);
+}
+
+/**
+* adds and returns the edge `e` connecting `s` and `t`
+* halfedge(e, g) has s as source and t as target
+*/
+template<typename Graph>
+typename boost::graph_traits<Graph>::edge_descriptor
+add_edge(typename boost::graph_traits<Graph>::vertex_descriptor s,
+         typename boost::graph_traits<Graph>::vertex_descriptor t,
+         Graph& g)
+{
+  typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
+  set_target(halfedge(e, g), t, g);
+  set_target(opposite(halfedge(e, g), g), s, g);
+  return e;
+}
+
+/**
+* adds a new face defined by a range of vertices (identified by their descriptors,
+* `boost::graph_traits<Graph>::%vertex_descriptor`).
+* For each pair of consecutive vertices, the corresponding halfedge
+* is added in `g` if new, and its connectivity is updated otherwise.
+* The face can be added only at the boundary of `g`, or as a new connected component.
+*
+* @pre `vr` contains at least 3 vertices
+* @returns the added face descriptor, or `boost::graph_traits<Graph>::%null_face()` if the face could not be added.
+*/
+template< typename Graph, typename VertexRange >
+typename boost::graph_traits<Graph>::face_descriptor
+add_face(const VertexRange& vr, Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor   vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Graph>::face_descriptor     face_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor     edge_descriptor;
+
+  std::vector<vertex_descriptor> vertices(vr.begin(), vr.end()); // quick and dirty copy
+  unsigned int n = (unsigned int)vertices.size();
+  // don't allow degenerated faces
+  CGAL_assertion(n > 2);
+
+  std::vector<halfedge_descriptor> halfedges(n);
+  std::vector<bool>                is_new(n);
+
+  for (unsigned int i = 0, ii = 1; i<n; ++i, ++ii, ii %= n)
+  {
+    if ( ! internal::is_isolated(vertices[i], g)
+      && ! is_border(vertices[i], g))
+      return boost::graph_traits<Graph>::null_face();
+
+    std::pair<halfedge_descriptor, bool> he
+      = halfedge(vertices[i], vertices[ii], g);
+    halfedges[i] = he.first;//collect if exists
+    is_new[i] = !(he.second/*true if exists*/);
+
+    if (!is_new[i] && !is_border(halfedges[i], g))
+      return boost::graph_traits<Graph>::null_face();
+  }
+
+  halfedge_descriptor inner_next, inner_prev,
+                      outer_next, outer_prev,
+                      border_next, border_prev,
+                      patch_start, patch_end;
+  // cache for set_next and vertex' set_halfedge
+  typedef std::pair<halfedge_descriptor, halfedge_descriptor> NextCacheEntry;
+  typedef std::vector<NextCacheEntry>    NextCache;
+  NextCache next_cache;
+  next_cache.reserve(3 * n);
+
+  // re-link patches if necessary
+  for (unsigned int i = 0, ii = 1; i<n; ++i, ++ii, ii %= n)
+  {
+    if (!is_new[i] && !is_new[ii])
+    {
+      inner_prev = halfedges[i];
+      inner_next = halfedges[ii];
+
+      if (next(inner_prev, g) != inner_next)
+      {
+        // here comes the ugly part... we have to relink a whole patch
+
+        // search a free gap
+        // free gap will be between border_prev and border_next
+        outer_prev = opposite(inner_next, g);
+        outer_next = opposite(inner_prev, g);
+        border_prev = outer_prev;
+        do{
+          border_prev = opposite(next(border_prev, g), g);
+        }while (!is_border(border_prev, g) || border_prev == inner_prev);
+        border_next = next(border_prev, g);
+        CGAL_assertion(is_border(border_prev, g));
+        CGAL_assertion(is_border(border_next, g));
+
+        if (border_next == inner_next)
+          return boost::graph_traits<Graph>::null_face();
+
+        // other halfedges' indices
+        patch_start = next(inner_prev, g);
+        patch_end   = prev(inner_next, g);
+
+        // relink
+        next_cache.push_back(NextCacheEntry(border_prev, patch_start));
+        next_cache.push_back(NextCacheEntry(patch_end, border_next));
+        next_cache.push_back(NextCacheEntry(inner_prev, inner_next));
+      }
+    }
+  }
+  // create missing edges
+  for (unsigned int i = 0, ii = 1; i<n; ++i, ++ii, ii %= n)
+  {
+    if (is_new[i])
+    {
+      edge_descriptor ne = add_edge(vertices[i], vertices[ii], g);
+      halfedges[i] = halfedge(ne, g);
+      CGAL_assertion(halfedges[i] != boost::graph_traits<Graph>::null_halfedge());
+
+      set_face(opposite(halfedges[i], g), boost::graph_traits<Graph>::null_face(), g); // as it may be recycled we have to reset it  
+      CGAL_assertion(source(halfedges[i], g) == vertices[i]);
+    }
+  }
+  // create the face
+  face_descriptor f = add_face(g);
+  set_halfedge(f, halfedges[n - 1], g);
+
+  // setup halfedges
+  for (unsigned int i = 0, ii = 1; i<n; ++i, ++ii, ii %= n)
+  {
+    vertex_descriptor v = vertices[ii];
+    inner_prev = halfedges[i];
+    inner_next = halfedges[ii];
+
+    unsigned int id = 0;
+    if (is_new[i])  id |= 1;
+    if (is_new[ii]) id |= 2;
+
+    if (id)
+    {
+      outer_prev = opposite(inner_next, g);
+      outer_next = opposite(inner_prev, g);
+
+      // set outer links
+      switch (id)
+      {
+      case 1: // prev is new, next is old
+        border_prev = prev(inner_next, g);
+        next_cache.push_back(NextCacheEntry(border_prev, outer_next));
+        set_halfedge(v, border_prev, g);
+        break;
+
+      case 2: // next is new, prev is old
+        border_next = next(inner_prev, g);
+        next_cache.push_back(NextCacheEntry(outer_prev, border_next));
+        set_halfedge(v, outer_prev, g);
+        break;
+
+      case 3: // both are new
+        if (halfedge(v, g) == boost::graph_traits<Graph>::null_halfedge())
+        {
+          set_halfedge(v, outer_prev, g);
+          next_cache.push_back(NextCacheEntry(outer_prev, outer_next));
+        }
+        else
+        {
+          border_prev = halfedge(v, g);
+          border_next = next(border_prev, g);
+          next_cache.push_back(NextCacheEntry(border_prev, outer_next));
+          next_cache.push_back(NextCacheEntry(outer_prev, border_next));
+        }
+        break;
+      }
+
+      // set inner link
+      next_cache.push_back(NextCacheEntry(inner_prev, inner_next));
+    }
+
+    // set face index
+    set_face(halfedges[i], f, g);
+  }
+
+  // process next halfedge cache
+  typename NextCache::const_iterator ncIt(next_cache.begin()), ncEnd(next_cache.end());
+  for (; ncIt != ncEnd; ++ncIt)
+    set_next(ncIt->first, ncIt->second, g);
+
+  // adjust vertices' halfedge index
+  for (unsigned int i = 0; i<n; ++i)
+    internal::adjust_incoming_halfedge(vertices[i], g);
+
+  return f;
+}
+
+
+  /**
+   * removes the incident face of `h` and changes all halfedges incident to the face into border halfedges. See `remove_face(g,h)` for a more generalized variant.
+   *
+   * \pre None of the incident edges of the face is a border edge.
+   */
+template< typename Graph>
+void make_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+               Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>            Traits;
+  typedef typename Traits::face_descriptor               face_descriptor;
+  typedef Halfedge_around_face_iterator<Graph>           halfedge_around_face_iterator;
+
+  CGAL_precondition(! is_border(h,g));
+  face_descriptor fd = face(h, g);
+  halfedge_around_face_iterator hafib, hafie;
+  for(boost::tie(hafib, hafie) = halfedges_around_face(h, g); 
+      hafib != hafie; 
+      ++hafib){
+    CGAL_assertion(! is_border(opposite(*hafib,g),g));
+    internal::set_border(*hafib, g);
+  }
+  remove_face(fd,g);  
+}
+
+
+    /** fills the hole incident to `h`.
+     * \pre `h` must be a border halfedge
+     */
+template< typename Graph>
+void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+               Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>  Traits;
+  typedef typename Traits::face_descriptor     face_descriptor;
+  typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+
+  face_descriptor f = add_face(g);
+  BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h,g)){
+    set_face(hd, f,g);
+  }
+  set_halfedge(f,h,g);
+}
+
+
+/** 
+ * creates a barycentric triangulation of the face incident to `h`. Creates a new
+ * vertex and connects it to each vertex incident to `h` and splits `face(h, g)` 
+ * into triangular faces.
+ * `h` remains incident to
+ * the original face. The time complexity is linear in the size of the face.
+ *
+ * \image html add_center_vertex.svg
+ *
+ * \returns the halfedge `next(h, g)` after the
+ * operation, i.e., a halfedge pointing to the new vertex. 
+ *
+ * Note that `add_center_vertex()` does not deal with properties of new vertices, 
+ * halfedges, and faces. 
+ *  \pre `h` is not a border halfedge.
+ *
+ * \param g the graph
+ * \param h halfedge descriptor
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ * \sa `remove_center_vertex()`
+ *
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+add_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+                  Graph& g) 
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::vertex_descriptor               vertex_descriptor;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::face_descriptor                 face_descriptor;
+
+  halfedge_descriptor hnew = halfedge(add_edge(g),g);
+  vertex_descriptor vnew = add_vertex(g);
+  internal::close_tip(hnew, vnew, g);
+  internal::insert_tip(opposite(hnew, g), h, g);
+  set_face(hnew, face(h, g), g);
+  set_halfedge(face(h,g), h, g);
+  halfedge_descriptor h2 = next(opposite(hnew, g), g);
+  while ( next(h2, g) != hnew) {
+    halfedge_descriptor gnew = halfedge(add_edge(g),g);
+    internal::insert_tip( gnew, hnew, g);
+    internal::insert_tip( opposite(gnew,g), h2, g);
+    face_descriptor fnew = add_face(g);
+    set_face( h2, fnew, g);
+    set_face( gnew, fnew, g);
+    set_face( next(gnew,g), fnew, g);
+    set_halfedge(face(h2, g), h2, g);
+    h2 = next(opposite(gnew, g), g);
+  }
+  set_face(next(hnew,g), face(hnew,g), g);
+  internal::set_vertex_halfedge(hnew, g);
+  return hnew;
+}
+
+/**
+ * removes the vertex `target(h, g)` and all incident halfedges thereby merging all
+ * incident faces.   The resulting face may not be triangulated. 
+ * This function is the inverse operation of `add_center_vertex()`. 
+ * The invariant `h == remove_center_vertex(add_center_vertex(h,g),g)` 
+ * holds, if `h` is not a border halfedge. 
+ *
+ * \image html remove_center_vertex.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \param g the graph
+ * \param h halfedge descriptor
+ *
+ * \returns `prev(h, g)`
+ *
+ * \pre None of the incident faces of `target(h,g)` is a
+ * hole. There are at least two distinct faces incident to the faces
+ * that are incident to `target(h,g)`. (This prevents the
+ * operation from collapsing a volume into two faces glued together
+ * with opposite orientations, such as would happen with any vertex of
+ * a tetrahedron.)
+ *
+ * \sa `add_center_vertex()`
+ *
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+remove_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+                     Graph& g) 
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+
+  // h points to the vertex that gets removed
+  halfedge_descriptor h2    = opposite(next(h, g), g);
+  halfedge_descriptor hret = prev(h, g);
+  while (h2 != h) {
+    halfedge_descriptor gprev = prev(h2, g);
+    internal::set_vertex_halfedge(gprev, g);
+    internal::remove_tip(gprev, g);
+
+    remove_face(face(h2, g), g);
+
+    halfedge_descriptor gnext = opposite(next(h2, g), g);
+    remove_edge(edge(h2,g), g);
+    h2 = gnext;
+  }
+  internal::set_vertex_halfedge(hret, g);
+  internal::remove_tip(hret, g);
+  remove_vertex(target(h, g), g);
+  remove_edge(edge(h, g), g);
+  internal::set_face_in_face_loop(hret, face(hret, g), g);
+  set_halfedge(face(hret, g), hret, g);
+  return hret;
+}
+
+/**
+ * appends a new face to the border halfedge `h2` by connecting 
+ * the tip of `h2` with the tip of `h1` with two new halfedges and a new vertex 
+ * and creating a new face that is incident to `h2`. 
+ * Note that `add_vertex_and_face_to_border()` does not deal with properties of new 
+ * vertices, halfedges, and faces.
+ * 
+ * \image html add_vertex_and_face_to_border.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \returns the halfedge of the new edge that is incident to the new face
+ * and the new vertex.
+ *
+ * \pre `h1` and `h2` are border halfedges
+ * \pre `h1 != h2`,
+ * \pre `h1` and `h2` are on the same border.
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+                              typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+                              Graph& g)
+{
+  typename boost::graph_traits<Graph>::vertex_descriptor v = add_vertex(g);
+  typename boost::graph_traits<Graph>::face_descriptor f = add_face(g);
+  typename boost::graph_traits<Graph>::edge_descriptor e1 = add_edge(g);
+  typename boost::graph_traits<Graph>::edge_descriptor e2 = add_edge(g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor he1= halfedge(e1, g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor he2= halfedge(e2, g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor ohe1= opposite(he1, g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor ohe2= opposite(he2, g);
+
+  set_next(he1, next(h1,g),g);
+  set_next(h1,ohe1,g);
+  set_target(he1,target(h1,g),g);
+  set_target(ohe1,v,g);
+  set_next(he2,he1,g);
+  set_next(ohe1,ohe2,g);
+  set_target(he2,v,g);
+  set_halfedge(v,ohe1,g);
+  set_next(ohe2,next(h2,g),g);
+  set_target(ohe2,target(h2,g),g);
+  set_next(h2,he2,g);
+  internal::set_border(he1,g);
+  internal::set_border(he2,g);
+
+  CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
+  for(boost::tie(hafib, hafie) = halfedges_around_face(ohe1, g);
+      hafib != hafie;
+      ++hafib){
+    set_face(*hafib, f, g);
+  }
+  set_halfedge(f, ohe1, g);
+  return ohe2;
+}
+
+
+/**
+ * appends a new face incident to the border halfedge `h1` and `h2` by connecting the vertex `target(h2,g)` 
+ * and the vertex `target(h1,g)` with a new halfedge, and filling this separated part of the hole 
+ * with a new face, such that the new face is incident to `h2`. 
+ *
+ * \image html add_face_to_border.svg
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ *
+ * \returns the halfedge of the new edge that is incident to the new face.
+ *
+ * \pre  `h1` and `h2` are border halfedges, 
+ * \pre `h1 != h2`, 
+ * \pre `next(h1,g) != h2`,
+ * \pre `h1` and `h2` are on the same border.
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+add_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
+                   typename boost::graph_traits<Graph>::halfedge_descriptor h2,
+                   Graph& g)
+{
+  CGAL_precondition(is_border(h1,g) == true);
+  CGAL_precondition(is_border(h2,g) == true);
+  CGAL_precondition(h1 != h2);
+  CGAL_precondition(next(h1, g) != h2);
+
+  typename boost::graph_traits<Graph>::face_descriptor f = add_face(g);
+  typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor 
+      newh= halfedge(e, g)
+    , newhop = opposite(newh, g);
+
+  set_next(newhop, next(h2, g), g);
+
+  set_next(h2, newh, g);
+  
+  set_next(newh, next(h1, g), g);
+
+  set_next(h1, newhop, g);
+  
+  set_target(newh, target(h1, g), g);
+  set_target(newhop, target(h2, g), g);
+
+  // make the vertices point to the border halfedge
+  set_halfedge(target(h2,g), newhop, g);
+  internal::set_border(newhop, g);
+
+  CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
+  for(boost::tie(hafib, hafie) = halfedges_around_face(newh, g); 
+      hafib != hafie; 
+      ++hafib){
+    set_face(*hafib, f, g);
+  }
+
+  set_halfedge(f, newh, g);
+
+  return newh;
+}
+
+
+/**
+ * collapses an edge in a graph.
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ * Let `v0` and `v1` be the source and target vertices, and let `e` and `e'` be the halfedges of edge `v0v1`.
+ *
+ * For `e`, let `en` and `ep` be the next and previous
+ * halfedges, that is `en = next(e, g)`, `ep = prev(e, g)`, and let
+ * `eno` and `epo` be their opposite halfedges, that is
+ * `eno = opposite(en, g)` and `epo = opposite(ep, g)`.
+ * Analoguously, for `e'` define  `en'`, `ep'`, `eno'`, and  `epo'`.
+ *
+ * Then, after the collapse of edge `v0v1` the following holds for `e` (and analoguously for `e'`)
+ *
+ * <UL>
+ *   <LI>The edge `v0v1` is no longer in `g`.
+ *   <LI>The faces incident to edge `v0v1` are no longer in `g`.
+ *   <LI>Either `v0`, or `v1` is no longer in `g` while the other remains.
+ *       Let `vgone` be the removed vertex and `vkept` be the remaining vertex.
+ *   <LI>If `e` was a border halfedge, that is `is_border(e, g) == true`, then `next(ep,g) == en`, and `prev(en,g) == ep`.
+ *   <LI>If `e` was not a border halfedge, that is `is_border(e, g) == false`, then `ep` and `epo` are no longer in `g` while `en` and `eno` are kept in `g`.
+ *   <LI>For all halfedges `hv` in `halfedges_around_target(vgone, g)`, `target(*hv, g) == vkept` and `source(opposite(*hv, g), g) == vkept`.
+ *   <LI>No other incidence information has changed in `g`.
+ * </UL>
+ * \returns vertex `vkept` (which can be either `v0` or `v1`).
+ * \pre g must be a triangulated graph
+ * \pre `does_satisfy_link_condition(v0v1,g) == true`.
+ */
+template<typename Graph>
+typename boost::graph_traits<Graph>::vertex_descriptor
+collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
+              Graph& g)
+{
+  typedef boost::graph_traits< Graph > Traits;
+  typedef typename Traits::vertex_descriptor          vertex_descriptor;
+  typedef typename Traits::halfedge_descriptor            halfedge_descriptor;
+
+  halfedge_descriptor pq = halfedge(v0v1,g);
+  halfedge_descriptor qp = opposite(pq, g);
+  halfedge_descriptor pt = opposite(prev(pq, g), g);
+  halfedge_descriptor qb = opposite(prev(qp, g), g);
+  
+  bool lTopFaceExists         = ! is_border(pq,g);
+  bool lBottomFaceExists      = ! is_border(qp,g);
+  bool lTopLeftFaceExists     = lTopFaceExists    && ! is_border(pt,g);
+  bool lBottomRightFaceExists = lBottomFaceExists && ! is_border(qb,g);
+
+  CGAL_precondition( !lTopFaceExists    || (lTopFaceExists    && ( degree(target(pt, g), g) > 2 ) ) ) ;
+  CGAL_precondition( !lBottomFaceExists || (lBottomFaceExists && ( degree(target(qb, g), g) > 2 ) ) ) ;
+
+  vertex_descriptor q = target(pq, g);
+  vertex_descriptor p = source(pq, g);
+#if 0
+  if(lTopLeftFaceExists && lBottomRightFaceExists){
+    std::cerr <<    " // do it low level" << std::endl;
+    halfedge_descriptor qt = next(pq,g);
+    halfedge_descriptor pb = next(qp,g);
+    halfedge_descriptor ppt = prev(pt,g);
+    halfedge_descriptor pqb = prev(qb,g);
+    if(halfedge(q,g) == pq){
+      set_halfedge(q, pqb,g);
+    }
+    vertex_descriptor t = target(qt,g);
+    if(halfedge(t,g) == pt){
+      set_halfedge(t, qt,g);
+    } 
+    vertex_descriptor b = target(pb,g);
+    if(halfedge(b,g) == qb){
+      set_halfedge(t, pb,g);
+    }
+    set_face(qt, face(pt,g),g);
+    set_halfedge(face(qt,g),qt,g);
+    set_face(pb, face(qb,g),g);
+    set_halfedge(face(pb,g),pb,g);
+    set_next(qt, next(pt,g),g);
+    set_next(pb, next(qb,g),g);
+    set_next(ppt, qt,g);
+    set_next(pqb,pb,g);
+    remove_face(face(pq,g),g);
+    remove_face(face(qp,g),g);
+    remove_edge(v0v1,g);
+    remove_edge(edge(pt,g),g);
+    remove_edge(edge(qb,g),g);
+    remove_vertex(p,g);
+    Halfedge_around_target_circulator<Graph> beg(ppt,g), end(pqb,g);
+    while(beg != end){
+      CGAL_assertion(target(*beg,g) == p);
+      set_target(*beg,q,g);
+      --beg;
+    }
+
+    return q;
+    // return the vertex kept
+  }
+#endif
+
+  bool lP_Erased = false, lQ_Erased = false ;
+
+  if ( lTopFaceExists )
+  { 
+    CGAL_precondition( ! is_border(opposite(pt, g),g) ) ; // p-q-t is a face of the mesh
+    if ( lTopLeftFaceExists )
+    {
+      //CGAL_ECMS_TRACE(3, "Removing p-t E" << pt.idx() << " (V" 
+      //                << p.idx() << "->V" << target(pt, g).idx() 
+      //                << ") by joining top-left face" ) ;
+
+      join_face(pt,g);
+    }
+    else
+    {
+      //CGAL_ECMS_TRACE(3, "Removing p-t E" << pt.idx() << " (V" << p.idx() 
+      //                << "->V" << target(pt, g).idx() << ") by erasing top face" ) ;
+
+      remove_face(opposite(pt, g),g);
+
+      if ( !lBottomFaceExists )
+      {
+        //CGAL_ECMS_TRACE(3, "Bottom face doesn't exist so vertex P already removed" ) ;
+
+        lP_Erased = true ;
+      }  
+    } 
+  }
+
+  if ( lBottomFaceExists )
+  {   
+    CGAL_precondition( ! is_border(opposite(qb, g),g) ) ; // p-q-b is a face of the mesh
+    if ( lBottomRightFaceExists )
+    {
+      //CGAL_ECMS_TRACE(3, "Removing q-b E" << qb.idx() << " (V" 
+      //                << q.idx() << "->V" << target(qb, g).idx() 
+      //                << ") by joining bottom-right face" ) ;
+
+      join_face(qb,g);
+    }
+    else
+    {
+      //CGAL_ECMS_TRACE(3, "Removing q-b E" << qb.idx() << " (V" 
+      //                << q.idx() << "->V" << target(qb, g).idx() 
+      //                << ") by erasing bottom face" ) ;
+
+      remove_face(opposite(qb, g),g);
+
+      if ( !lTopFaceExists )
+      {
+        //CGAL_ECMS_TRACE(3, "Top face doesn't exist so vertex Q already removed" ) ;
+        lQ_Erased = true ;
+      }  
+    }
+  }
+
+  CGAL_assertion( !lP_Erased || !lQ_Erased ) ;
+
+  if ( !lP_Erased && !lQ_Erased )
+  {
+    //CGAL_ECMS_TRACE(3, "Removing vertex P by joining pQ" ) ;
+
+    join_vertex(pq,g);
+    lP_Erased = true ;
+  }    
+
+  CGAL_expensive_assertion(is_valid(g));
+
+  return lP_Erased ? q : p ;
+}
+
+/**
+ * Collapses the edge `v0v1` replacing it with v0 or v1, as described in the paragraph above
+ * and guarantees that an edge `e2`, for which `get(edge_is_constrained_map, e2)==true`, 
+ * is not removed after the collapse.
+ * 
+ *
+ * \tparam Graph must be a model of `MutableFaceGraph`
+ * \tparam EdgeIsConstrainedMap mut be a model of `ReadablePropertyMap` with the edge descriptor of `Graph` 
+ *       as key type and a Boolean as value type. It indicates if an edge is constrained or not. 
+ *
+ * \pre This function requires `g` to be an oriented 2-manifold with or without boundaries. 
+ *       Furthermore, the edge `v0v1` must satisfy the link condition, which guarantees that the surface mesh is also 2-manifold after the edge collapse. 
+ * \pre `get(edge_is_constrained_map, v0v1)==false`. 
+ * \pre  `v0` and `v1` are not both incident to a constrained edge. 
+ */
+
+template<typename Graph, typename EdgeIsConstrainedMap>
+typename boost::graph_traits<Graph>::vertex_descriptor
+collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
+              Graph& g
+              , EdgeIsConstrainedMap Edge_is_constrained_map)
+{
+  typedef boost::graph_traits< Graph > Traits;
+  typedef typename Traits::vertex_descriptor          vertex_descriptor;
+  typedef typename Traits::halfedge_descriptor            halfedge_descriptor;
+
+  halfedge_descriptor pq = halfedge(v0v1,g);
+  CGAL_assertion( !get(Edge_is_constrained_map,v0v1) );
+
+  halfedge_descriptor qp = opposite(pq,g);
+  halfedge_descriptor pt = opposite(prev(pq,g),g);
+  halfedge_descriptor qb = opposite(prev(qp,g),g);
+  halfedge_descriptor tq = opposite(next(pq,g),g);
+  halfedge_descriptor bp = opposite(next(qp,g),g);
+
+  bool lTopFaceExists         = ! is_border(pq,g) ;
+  bool lBottomFaceExists      = ! is_border(qp,g) ;
+
+  vertex_descriptor q = target(pq,g);
+  vertex_descriptor p = source(pq,g);
+
+  //used to collect edges to remove from the surface
+  halfedge_descriptor edges_to_erase[2];
+  halfedge_descriptor* edges_to_erase_ptr=edges_to_erase;
+
+  // If the top facet exists, we need to choose one out of the two edges which one disappears:
+  //   p-t if it is not constrained and t-q otherwise
+  if ( lTopFaceExists )
+  {
+    if ( !get(Edge_is_constrained_map,edge(pt,g)) )
+    {
+      *edges_to_erase_ptr++=pt;
+    }
+    else
+    {
+      *edges_to_erase_ptr++=tq;
+    }
+  }
+
+  // If the bottom facet exists, we need to choose one out of the two edges which one disappears:
+  //   q-b if it is not constrained and b-p otherwise
+  if ( lBottomFaceExists )
+  {
+    if ( !get(Edge_is_constrained_map,edge(qb,g)) )
+    {
+      *edges_to_erase_ptr++=qb;
+    }
+    else{
+      *edges_to_erase_ptr++=bp;
+    }
+  }
+
+  if (lTopFaceExists && lBottomFaceExists)
+  {
+    if ( face(edges_to_erase[0],g) == face(edges_to_erase[1],g)
+         && (! is_border(edges_to_erase[0],g)) )
+    {
+      // the vertex is of valence 3 and we simply need to remove the vertex
+      // and its indicent edges
+      bool lP_Erased = false;
+      halfedge_descriptor edge =
+        next(edges_to_erase[0],g) == edges_to_erase[1]?
+          edges_to_erase[0]:edges_to_erase[1];
+      if (target(edge,g) == p)
+        lP_Erased = true;
+      remove_center_vertex(edge,g);
+      return lP_Erased? q : p;
+    }
+    else
+    {
+      if (!(is_border(edges_to_erase[0],g)))
+        join_face(edges_to_erase[0],g);
+      else
+        remove_face(opposite(edges_to_erase[0],g),g);
+      if (!is_border(edges_to_erase[1],g))
+        join_face(edges_to_erase[1],g);
+      else
+        remove_face(opposite(edges_to_erase[1],g),g);
+      join_vertex(pq,g);
+      return q;
+    }
+  }
+  else
+  {
+      if (lTopFaceExists)
+      {
+        if (!(is_border(edges_to_erase[0],g))){
+          join_face(edges_to_erase[0],g);
+          join_vertex(pq,g);
+          return q;
+        }
+        bool lQ_Erased = is_border(opposite(next(pq,g),g),g);
+        remove_face(opposite(edges_to_erase[0],g),g);
+        return lQ_Erased?p:q;
+      }
+
+      if (! (is_border(edges_to_erase[0],g))){
+        join_face(edges_to_erase[0],g);
+        join_vertex(qp,g);
+        return p;
+      }
+      bool lP_Erased= is_border(opposite(next(qp,g),g),g);
+      remove_face(opposite(edges_to_erase[0],g),g);
+      return lP_Erased?q:p;
+  };
+}
+
+/// performs an edge flip, rotating the edge pointed by
+/// `h` by one vertex in the direction of the face orientation.
+/// \pre Both faces incident to `h` are triangles.
+template<typename Graph>
+void
+flip_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+          Graph& g)
+{
+  typedef boost::graph_traits<Graph> Traits;
+  typedef typename Traits::vertex_descriptor   vertex_descriptor;
+  typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+  typedef typename Traits::face_descriptor     face_descriptor;
+
+  vertex_descriptor s = source(h,g); 
+  vertex_descriptor t = target(h,g); 
+  halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g);
+  vertex_descriptor s2 = target(nh,g), t2 = target(noh,g);
+  face_descriptor fh = face(h,g), foh = face(oh,g);
+
+  CGAL_assertion(fh != Traits::null_face() && foh != Traits::null_face());
+
+  if(halfedge(s,g) == oh){
+    set_halfedge(s,nnh,g);
+  }
+  if(halfedge(t,g) == h){
+    set_halfedge(t,nnoh,g);
+  }
+  set_next(h,nnoh,g);
+  set_next(oh,nnh,g);
+  set_target(h,t2,g);
+  set_target(oh,s2,g);
+  set_next(nh,h,g);
+  set_next(noh,oh,g);
+  set_next(nnoh,nh,g);
+  set_next(nnh,noh,g);
+  set_face(nnoh,fh,g);
+  set_face(nnh,foh,g);
+  set_halfedge(fh,h,g);
+  set_halfedge(foh,oh,g);
+}
+
+/**
+ *  \returns `true` if `e` satisfies the *link condition* \cgalCite{degn-tpec-98}, which guarantees that the surface is also 2-manifold after the edge collapse.
+ */
+  template<typename Graph>
+bool
+  does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
+                           Graph& g)
+{
+    typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+    typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+    typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator;
+
+    halfedge_descriptor v0_v1 = halfedge(e,g);
+    halfedge_descriptor v1_v0 = opposite(v0_v1,g);
+    
+    vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g);
+
+    vertex_descriptor vL = target(next(v0_v1,g),g);
+    vertex_descriptor vR = target(next(v1_v0,g),g);
+
+    out_edge_iterator eb1, ee1 ; 
+    out_edge_iterator eb2, ee2 ; 
+
+
+  // The following loop checks the link condition for v0_v1.
+  // Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh.
+  // 
+  for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ;  eb1 != ee1 ; ++ eb1 )
+  {
+    halfedge_descriptor v0_k = *eb1;
+    
+    if ( v0_k != v0_v1 )
+    {
+      vertex_descriptor k = target(v0_k,g);
+      
+      for ( boost::tie(eb2,ee2) =  halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 )
+      {
+        halfedge_descriptor k_v1 = *eb2;
+
+        if ( target(k_v1,g) == v1 )
+        {
+          // At this point we know p-q-k are connected and we need to determine if this triangle is a face of the mesh.
+          //
+          // Since the mesh is known to be triangular there are at most two faces sharing the edge p-q.
+          //
+          // If p->q is NOT a border edge, the top face is p->q->t where t is target(next(p->q))
+          // If q->p is NOT a border edge, the bottom face is q->p->b where b is target(next(q->p))
+          //
+          // If k is either t or b then p-q-k *might* be a face of the mesh. It won't be if k==t but p->q is border
+          // or k==b but q->b is a border (because in that case even though there exists triangles p->q->t (or q->p->b)
+          // they are holes, not faces)
+          // 
+     
+          bool lIsFace =   ( vL == k && (! is_border(v0_v1,g)) )
+            || ( vR == k && (! is_border(v1_v0,g)) ) ;
+                        
+         
+
+          if ( !lIsFace )
+          {
+            // CGAL_ECMS_TRACE(3,"  k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ;
+            return false ;
+          }  
+          else 
+          {
+            //CGAL_ECMS_TRACE(4,"  k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ;
+          }
+        }
+      }  
+    }
+  }   
+     
+  
+    if ( is_border(v0_v1,g) )
+    {
+      if ( next(next(next(v0_v1,g),g),g) == v0_v1 )
+      {
+        //CGAL_ECMS_TRACE(3,"  p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
+        return false ;
+      }
+    }
+    else if ( is_border(v1_v0,g) )
+    {
+      if ( next(next(next(v1_v0,g),g),g) == v1_v0 )
+      {
+        //CGAL_ECMS_TRACE(3,"  p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ;
+        return false ;
+      }
+    }
+    else
+    {
+      if ( is_border(v0,g) && is_border(v1,g) )
+      {
+        //CGAL_ECMS_TRACE(3,"  both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ;
+        return false ;
+      }  
+      else
+      {
+        if ( is_tetrahedron(v0_v1,g) )
+        {
+          //CGAL_ECMS_TRACE(3,"  p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
+          return false ;
+        }
+      }
+    }
+
+  
+  return true ;
+}
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+/// \cond SKIP_IN_MANUAL
+template<typename Graph>
+bool
+  satisfies_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
+                           Graph& g)
+{
+  return does_satisfy_link_condition(e, g);
+}
+/// \endcond
+#endif
+/// @}
+
+} // CGAL
+
+} // CGAL
+
+
+#endif /* CGAL_EULER_OPERATIONS_H */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Graph_geometry.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Graph_geometry.h
new file mode 100644
index 0000000..2305a4d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/Graph_geometry.h
@@ -0,0 +1,235 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Andreas Fabri
+
+#ifndef CGAL_GRAPH_GEOMETRY_H
+#define CGAL_GRAPH_GEOMETRY_H
+
+#include <cmath>
+#include <limits>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/range/distance.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+#include <CGAL/Kernel/global_functions.h>
+#include <CGAL/Origin.h>
+#include <CGAL/property_map.h>
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/graph_concepts.h>
+#include <boost/concept/assert.hpp>
+
+namespace CGAL {
+
+/// \ingroup PkgBGLGraphGeometry
+/// @{
+
+template<typename HalfedgeGraph, 
+         typename PositionMap, 
+         typename NormalMap>
+void calculate_face_normals(const HalfedgeGraph& g, 
+                            PositionMap pm, 
+                            NormalMap nm) 
+{
+  typedef boost::graph_traits<HalfedgeGraph> GraphTraits;
+  typedef typename GraphTraits::face_iterator face_iterator;
+  typedef typename GraphTraits::edge_descriptor edge_descriptor;
+  typedef typename GraphTraits::enclosure_iterator enc_iterator;
+  typedef typename boost::property_traits<PositionMap>::value_type position;
+  typedef typename boost::property_traits<NormalMap>::value_type normal;
+
+  face_iterator fb, fe;
+  for(boost::tie(fb, fe) = faces(g); fb != fe; ++fb)
+  {
+    edge_descriptor edg = edge(*fb, g);
+    edge_descriptor edgb = edg;
+    enc_iterator eb, ee;
+    boost::tie(eb, ee) = enclosure(*fb, g);
+
+    position p0 = pm[target(edg, g)];
+    edg = next(edg, g);
+    position p1 = pm[target(edg, g)];
+    edg = next(edg, g);
+    position p2 = pm[target(edg, g)];
+    edg = next(edg, g);
+      
+    if(edg == edgb) {
+      // triangle 
+      nm[*fb] = CGAL::unit_normal(p1, p2, p0);
+    } else {
+      normal n(CGAL::NULL_VECTOR);
+      do {
+        n = n + CGAL::normal(p1, p2, p0);
+        p0 = p1;
+        p1 = p2;
+
+        edg = next(edg, g);
+        p2 = pm[target(edg, g)];
+      } while(edg != edgb);
+        
+      nm[*fb] = n / CGAL::sqrt(n.squared_length());
+    }
+  }
+}
+
+/// \cond SKIP_IN_MANUAL
+namespace internal {
+template<typename T>
+typename Kernel_traits<T>::Kernel::FT
+dot(const T& t1, const T& t2) 
+{
+  return t1[0]*t2[0]
+    + t1[1]*t2[1]
+    + t1[2]*t2[2];
+}
+  
+} // internal
+/// \endcond
+
+template<typename HalfedgeGraph, 
+         typename Position, 
+         typename Normal,
+         typename Boundary>
+void calculate_vertex_normals(const HalfedgeGraph& g, 
+                              Position position_map, 
+                              Normal normal_map,
+                              Boundary boundary_map)
+{
+  typedef boost::graph_traits<HalfedgeGraph> GraphTraits;
+  typedef typename GraphTraits::vertex_iterator vertex_iterator;
+  typedef typename GraphTraits::out_edge_iterator out_edge_iterator;
+    
+  typedef typename boost::property_traits<Normal>::value_type normal;
+  typedef typename boost::property_traits<Position>::value_type position;
+  typedef typename Kernel_traits<normal>::Kernel::FT FT;
+
+  vertex_iterator vb, ve;
+  for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb)
+  {
+    normal nn(CGAL::NULL_VECTOR);
+      
+    position p0 = position_map[*vb];
+    out_edge_iterator oeb, oee;
+      
+    for(boost::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb)
+    {
+      if(!boundary_map[target(*oeb, g)])
+      {
+        position p1 = position_map[target(*oeb, g)];
+        p1 = p1 - (p0 - CGAL::ORIGIN);
+        FT length = CGAL::sqrt((p1 - CGAL::ORIGIN).squared_length());
+        if(length > (std::numeric_limits<FT>::min)())
+          p1 = CGAL::ORIGIN + ((p1 - CGAL::ORIGIN) * 1.0 / length);
+          
+        position p2 = position_map[source(prev(halfedge(*oeb, g), g), g)];
+        p2 = p2 - (p0 - CGAL::ORIGIN);
+        length = CGAL::sqrt((p2 - CGAL::ORIGIN).squared_length());
+        if(length > (std::numeric_limits<FT>::min)())
+          p2 = CGAL::ORIGIN + ((p2 - CGAL::ORIGIN) * 1.0 / length);
+          
+        FT cosine
+          = internal::dot(p1, p2) / CGAL::sqrt(internal::dot(p1, p1) * internal::dot(p2, p2));
+        if(cosine < -1.0) cosine = -1.0;
+        else if(cosine > 1.0) cosine = 1.0;
+
+        FT angle = std::acos(cosine);
+
+        normal n = CGAL::unit_normal(position(CGAL::ORIGIN), p1, p2);
+        n = n * angle;
+        nn = nn + n;
+      }
+    }
+      
+    FT length = CGAL::sqrt(nn.squared_length());
+    if(length > (std::numeric_limits<FT>::min)())
+      nn = nn * (1.0 / length);
+    normal_map[*vb] = nn;
+  }
+}
+
+
+/// Convenience function that calls `triangle()` with the property map
+/// obtained by `get(CGAL::vertex_point, g)`.
+template <typename HalfedgeGraph>
+typename Kernel_traits<
+  typename boost::property_traits< 
+    typename boost::property_map< HalfedgeGraph, CGAL::vertex_point_t>::const_type 
+    >::value_type
+    >::Kernel::Triangle_3
+triangle(const HalfedgeGraph& g,
+         typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h) {
+  return triangle(g, h, get(CGAL::vertex_point, g));
+}
+
+
+/// `triangle()` returns a `Triangle_3` constructed
+/// from the positions of the `vertex_descriptors` around the face
+/// incident to `h` in counter-clockwise direction.
+///
+/// The Kernel of the returned `Triangle_3` is the same as the
+/// Kernel of the `value_type` of the.
+///
+/// \pre The face incident to h is triangular.
+///
+/// \tparam PositionMap must be a model of \ref ReadablePropertyMap. 
+///        Its value_type must be a model of `Kernel::Point_3`
+/// \tparam HalfedgeGraph  must be a model of \ref HalfedgeGraph.
+/// \param g The graph 
+/// \param h The halfedge
+/// \param pm The map used to find the vertices of the triangle.
+template <typename HalfedgeGraph,
+          typename PositionMap>
+typename Kernel_traits<typename boost::property_traits<PositionMap>::value_type>::Kernel::Triangle_3
+triangle(const HalfedgeGraph& g,
+         typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h,
+         const PositionMap& pm)
+{
+  BOOST_CONCEPT_ASSERT((HalfedgeGraphConcept<HalfedgeGraph>)) CGAL_UNUSED;
+
+  typedef typename boost::graph_traits<HalfedgeGraph>::vertex_descriptor vertex_descriptor;
+  
+  typedef typename Kernel_traits<
+    typename boost::property_traits<PositionMap>::value_type
+    >::Kernel::Triangle_3 Triangle_3;
+  
+  CGAL_assertion_code(
+    typename boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h2 = h;
+  )
+  vertex_descriptor u = target(h,g);
+  h = next(h,g);
+  vertex_descriptor v = target(h,g);
+  h = next(h,g);
+  vertex_descriptor w = target(h,g);
+  h = next(h,g);
+
+  // are we really looking at a triangle?
+  CGAL_assertion(h == h2);
+
+  return Triangle_3(get(pm, u),
+                    get(pm,v),
+                    get(pm,w));
+}
+
+
+
+
+/// @}
+
+} // CGAL
+
+#endif /* CGAL_GRAPH_GEOMETRY_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/backward_compatibility_functions.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/backward_compatibility_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/backward_compatibility_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/backward_compatibility_functions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/convert_surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/convert_surface_mesh.h
new file mode 100644
index 0000000..7a964e7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/convert_surface_mesh.h
@@ -0,0 +1,86 @@
+// Copyright (c) 2015  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_BOOST_GRAPH_CONVERT_SURFACE_MESH_H
+#define CGAL_BOOST_GRAPH_CONVERT_SURFACE_MESH_H
+
+#include <CGAL/boost/graph/Euler_operations.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <boost/unordered_map.hpp>
+#include <CGAL/boost/graph/helpers.h>
+
+namespace CGAL {
+
+  template <typename SourceMesh, typename TargetMesh, typename V2V, typename H2H>
+  void convert_surface_mesh(const SourceMesh& sm, TargetMesh& tm, V2V& v2v, H2H& h2h)
+{
+  typedef typename boost::graph_traits<SourceMesh>::vertex_descriptor sm_vertex_descriptor;
+  typedef typename boost::graph_traits<TargetMesh>::vertex_descriptor tm_vertex_descriptor;
+
+  typedef typename boost::graph_traits<SourceMesh>::face_descriptor sm_face_descriptor;
+  typedef typename boost::graph_traits<TargetMesh>::face_descriptor tm_face_descriptor;
+
+  typedef typename boost::graph_traits<SourceMesh>::halfedge_descriptor sm_halfedge_descriptor;
+  typedef typename boost::graph_traits<TargetMesh>::halfedge_descriptor tm_halfedge_descriptor;
+
+  typedef typename boost::property_map<SourceMesh, vertex_point_t>::const_type sm_PMap;
+  typedef typename boost::property_map<TargetMesh, vertex_point_t>::type tm_PMap;
+
+  sm_PMap sm_pmap = get(vertex_point, sm);
+  tm_PMap tm_pmap = get(vertex_point, tm);
+
+
+  BOOST_FOREACH(sm_vertex_descriptor svd, vertices(sm)){
+    tm_vertex_descriptor tvd = add_vertex(tm);
+    v2v.insert(std::make_pair(svd, tvd));
+    put(tm_pmap, tvd, get(sm_pmap, svd));
+  }
+
+  boost::unordered_map<sm_face_descriptor, tm_face_descriptor> f2f;
+  BOOST_FOREACH(sm_face_descriptor sfd, faces(sm)){
+    std::vector<tm_vertex_descriptor> tv;
+    BOOST_FOREACH(sm_vertex_descriptor svd, vertices_around_face(halfedge(sfd,sm),sm)){
+      tv.push_back(v2v.at(svd));
+    }
+    f2f[sfd] = Euler::add_face(tv,tm);
+  }
+  
+  BOOST_FOREACH(sm_face_descriptor sfd, faces(sm)){
+    sm_halfedge_descriptor shd = halfedge(sfd,sm), done(shd);
+    tm_halfedge_descriptor thd = halfedge(f2f[sfd],tm);
+    tm_vertex_descriptor tvd = v2v.at(target(shd,sm));
+    while(target(thd,tm) != tvd){
+      thd = next(thd,tm);
+    }
+    do {
+      h2h.insert(std::make_pair(shd, thd));
+
+      if (face(opposite(shd, sm), sm) == boost::graph_traits<SourceMesh>::null_face())
+        h2h.insert(std::make_pair(opposite(shd, sm), opposite(thd, tm)));
+
+      shd = next(shd,sm);
+      thd = next(thd,tm);
+    }while(shd != done);
+  }
+  
+}
+
+} // namespace CGAL
+
+#endif //  CGAL_BOOST_GRAPH_CONVERT_SURFACE_MESH_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.h
new file mode 100644
index 0000000..90db9d7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+
+#ifndef CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
+#define CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
+
+// This will push/pop a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/version.hpp>
+#include <climits>
+
+#if BOOST_VERSION == 105400
+  #ifdef BOOST_GRAPH_DIJKSTRA_HPP
+  #    pragma message \
+      "Warning: the header file boost/graph/dijkstra_shortest_paths.hpp "       \
+      "of boost 1.54 contains a bug that may impact some functions in CGAL. "   \
+      "Please consider including CGAL/boost/graph/dijkstra_shortest_paths.hpp "  \
+      "before boost header"
+  #endif
+  #include <CGAL/boost/graph/dijkstra_shortest_paths.hpp>
+#else
+  #include <boost/graph/dijkstra_shortest_paths.hpp>
+#endif
+
+#endif // CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp
new file mode 100644
index 0000000..da6ce05
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp
@@ -0,0 +1,630 @@
+// This file is a copy of the file distributed with boost 1.55
+// It is distributed with CGAL to work around a bug in boost 1.54
+// and must be used only with boost 1.54 by including
+// CGAL/boost/graph/dijkstra_shortest_paths.hpp
+
+
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+//
+// Revision History:
+//   04 April 2001: Added named parameter variant. (Jeremy Siek)
+//   01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
+//
+#ifndef BOOST_GRAPH_DIJKSTRA_HPP
+#define BOOST_GRAPH_DIJKSTRA_HPP
+
+#include <functional>
+#include <boost/limits.hpp>
+#include <boost/graph/named_function_params.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/relax.hpp>
+#include <boost/pending/indirect_cmp.hpp>
+#include <boost/graph/exception.hpp>
+#include <boost/pending/relaxed_heap.hpp>
+#include <boost/graph/overloading.hpp>
+#include <boost/smart_ptr.hpp>
+#include <boost/graph/detail/d_ary_heap.hpp>
+#include <boost/graph/two_bit_color_map.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/property_map/vector_property_map.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/concept/assert.hpp>
+
+#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
+#  include <boost/pending/mutable_queue.hpp>
+#endif // BOOST_GRAPH_DIJKSTRA_TESTING
+
+namespace boost {
+
+  /**
+   * @brief Updates a particular value in a queue used by Dijkstra's
+   * algorithm.
+   *
+   * This routine is called by Dijkstra's algorithm after it has
+   * decreased the distance from the source vertex to the given @p
+   * vertex. By default, this routine will just call @c
+   * Q.update(vertex). However, other queues may provide more
+   * specialized versions of this routine.
+   *
+   * @param Q             the queue that will be updated.
+   * @param vertex        the vertex whose distance has been updated
+   * @param old_distance  the previous distance to @p vertex
+   */
+  template<typename Buffer, typename Vertex, typename DistanceType>
+  inline void 
+  dijkstra_queue_update(Buffer& Q, Vertex vertex, DistanceType old_distance)
+  {
+    (void)old_distance;
+    Q.update(vertex);
+  }
+
+#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
+  // This is a misnomer now: it now just refers to the "default heap", which is
+  // currently d-ary (d=4) but can be changed by a #define.
+  static bool dijkstra_relaxed_heap = true;
+#endif
+
+  template <class Visitor, class Graph>
+  struct DijkstraVisitorConcept {
+    void constraints() {
+//      commented to avoid an unused vaiable warning
+//      BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> ));
+      vis.initialize_vertex(u, g);
+      vis.discover_vertex(u, g);
+      vis.examine_vertex(u, g);
+      vis.examine_edge(e, g);
+      vis.edge_relaxed(e, g);
+      vis.edge_not_relaxed(e, g);
+      vis.finish_vertex(u, g);
+    }
+    Visitor vis;
+    Graph g;
+    typename graph_traits<Graph>::vertex_descriptor u;
+    typename graph_traits<Graph>::edge_descriptor e;
+  };
+
+  template <class Visitors = null_visitor>
+  class dijkstra_visitor : public bfs_visitor<Visitors> {
+  public:
+    dijkstra_visitor() { }
+    dijkstra_visitor(Visitors vis)
+      : bfs_visitor<Visitors>(vis) { }
+
+    template <class Edge, class Graph>
+    void edge_relaxed(Edge e, Graph& g) {
+      invoke_visitors(this->m_vis, e, g, on_edge_relaxed());
+    }
+    template <class Edge, class Graph>
+    void edge_not_relaxed(Edge e, Graph& g) {
+      invoke_visitors(this->m_vis, e, g, on_edge_not_relaxed());
+    }
+  private:
+    template <class Edge, class Graph>
+    void tree_edge(Edge /* u */, Graph& /* g */) { }
+  };
+  template <class Visitors>
+  dijkstra_visitor<Visitors>
+  make_dijkstra_visitor(Visitors vis) {
+    return dijkstra_visitor<Visitors>(vis);
+  }
+  typedef dijkstra_visitor<> default_dijkstra_visitor;
+
+  namespace detail {
+
+    template <class UniformCostVisitor, class UpdatableQueue,
+      class WeightMap, class PredecessorMap, class DistanceMap,
+      class BinaryFunction, class BinaryPredicate>
+    struct dijkstra_bfs_visitor
+    {
+      typedef typename property_traits<DistanceMap>::value_type D;
+      typedef typename property_traits<WeightMap>::value_type W;
+
+      dijkstra_bfs_visitor(UniformCostVisitor vis, UpdatableQueue& Q,
+                           WeightMap w, PredecessorMap p, DistanceMap d,
+                           BinaryFunction combine, BinaryPredicate compare,
+                           D zero)
+        : m_vis(vis), m_Q(Q), m_weight(w), m_predecessor(p), m_distance(d),
+          m_combine(combine), m_compare(compare), m_zero(zero)  { }
+
+      template <class Edge, class Graph>
+      void tree_edge(Edge e, Graph& g) {
+        bool decreased = relax(e, g, m_weight, m_predecessor, m_distance,
+                               m_combine, m_compare);
+        if (decreased)
+          m_vis.edge_relaxed(e, g);
+        else
+          m_vis.edge_not_relaxed(e, g);
+      }
+      template <class Edge, class Graph>
+      void gray_target(Edge e, Graph& g) {
+        D old_distance = get(m_distance, target(e, g));
+
+        bool decreased = relax(e, g, m_weight, m_predecessor, m_distance,
+                               m_combine, m_compare);
+        if (decreased) {
+          dijkstra_queue_update(m_Q, target(e, g), old_distance);
+          m_vis.edge_relaxed(e, g);
+        } else
+          m_vis.edge_not_relaxed(e, g);
+      }
+
+      template <class Vertex, class Graph>
+      void initialize_vertex(Vertex u, Graph& g)
+        { m_vis.initialize_vertex(u, g); }
+      template <class Edge, class Graph>
+      void non_tree_edge(Edge, Graph&) { }
+      template <class Vertex, class Graph>
+      void discover_vertex(Vertex u, Graph& g) { m_vis.discover_vertex(u, g); }
+      template <class Vertex, class Graph>
+      void examine_vertex(Vertex u, Graph& g) { m_vis.examine_vertex(u, g); }
+      template <class Edge, class Graph>
+      void examine_edge(Edge e, Graph& g) {
+        // Test for negative-weight edges:
+        //
+        // Reasons that other comparisons do not work:
+        //
+        // m_compare(e_weight, D(0)):
+        //    m_compare only needs to work on distances, not weights, and those
+        //    types do not need to be the same (bug 8398,
+        //    https://svn.boost.org/trac/boost/ticket/8398).
+        // m_compare(m_combine(source_dist, e_weight), source_dist):
+        //    if m_combine is project2nd (as in prim_minimum_spanning_tree),
+        //    this test will claim that the edge weight is negative whenever
+        //    the edge weight is less than source_dist, even if both of those
+        //    are positive (bug 9012,
+        //    https://svn.boost.org/trac/boost/ticket/9012).
+        // m_compare(m_combine(e_weight, source_dist), source_dist):
+        //    would fix project2nd issue, but documentation only requires that
+        //    m_combine be able to take a distance and a weight (in that order)
+        //    and return a distance.
+
+        // W e_weight = get(m_weight, e);
+        // sd_plus_ew = source_dist + e_weight.
+        // D sd_plus_ew = m_combine(source_dist, e_weight);
+        // sd_plus_2ew = source_dist + 2 * e_weight.
+        // D sd_plus_2ew = m_combine(sd_plus_ew, e_weight);
+        // The test here is equivalent to e_weight < 0 if m_combine has a
+        // cancellation law, but always returns false when m_combine is a
+        // projection operator.
+        if (m_compare(m_combine(m_zero, get(m_weight, e)), m_zero)) 
+            boost::throw_exception(negative_edge());
+        // End of test for negative-weight edges.
+
+        m_vis.examine_edge(e, g);
+
+      }
+      template <class Edge, class Graph>
+      void black_target(Edge, Graph&) { }
+      template <class Vertex, class Graph>
+      void finish_vertex(Vertex u, Graph& g) { m_vis.finish_vertex(u, g); }
+
+      UniformCostVisitor m_vis;
+      UpdatableQueue& m_Q;
+      WeightMap m_weight;
+      PredecessorMap m_predecessor;
+      DistanceMap m_distance;
+      BinaryFunction m_combine;
+      BinaryPredicate m_compare;
+      D m_zero;
+    };
+
+  } // namespace detail
+
+  namespace detail {
+    template <class Graph, class IndexMap, class Value, bool KnownNumVertices>
+    struct vertex_property_map_generator_helper {};
+
+    template <class Graph, class IndexMap, class Value>
+    struct vertex_property_map_generator_helper<Graph, IndexMap, Value, true> {
+      typedef boost::iterator_property_map<Value*, IndexMap> type;
+      static type build(const Graph& g, const IndexMap& index, boost::scoped_array<Value>& array_holder) {
+        array_holder.reset(new Value[num_vertices(g)]);
+        std::fill(array_holder.get(), array_holder.get() + num_vertices(g), Value());
+        return make_iterator_property_map(array_holder.get(), index);
+      }
+    };
+
+    template <class Graph, class IndexMap, class Value>
+    struct vertex_property_map_generator_helper<Graph, IndexMap, Value, false> {
+      typedef boost::vector_property_map<Value, IndexMap> type;
+      static type build(const Graph& /* g */, const IndexMap& index, boost::scoped_array<Value>& /* array_holder */) {
+        return boost::make_vector_property_map<Value>(index);
+      }
+    };
+
+    template <class Graph, class IndexMap, class Value>
+    struct vertex_property_map_generator {
+      typedef boost::is_base_and_derived<
+                boost::vertex_list_graph_tag,
+                typename boost::graph_traits<Graph>::traversal_category>
+              known_num_vertices;
+      typedef vertex_property_map_generator_helper<Graph, IndexMap, Value, known_num_vertices::value> helper;
+      typedef typename helper::type type;
+      static type build(const Graph& g, const IndexMap& index, boost::scoped_array<Value>& array_holder) {
+        return helper::build(g, index, array_holder);
+      }
+    };
+  }
+
+  namespace detail {
+    template <class Graph, class IndexMap, bool KnownNumVertices>
+    struct default_color_map_generator_helper {};
+
+    template <class Graph, class IndexMap>
+    struct default_color_map_generator_helper<Graph, IndexMap, true> {
+      typedef boost::two_bit_color_map<IndexMap> type;
+      static type build(const Graph& g, const IndexMap& index) {
+        size_t nv = num_vertices(g);
+        return boost::two_bit_color_map<IndexMap>(nv, index);
+      }
+    };
+
+    template <class Graph, class IndexMap>
+    struct default_color_map_generator_helper<Graph, IndexMap, false> {
+      typedef boost::vector_property_map<boost::two_bit_color_type, IndexMap> type;
+      static type build(const Graph& /* g */, const IndexMap& index) {
+        return boost::make_vector_property_map<boost::two_bit_color_type>(index);
+      }
+    };
+
+    template <class Graph, class IndexMap>
+    struct default_color_map_generator {
+      typedef boost::is_base_and_derived<
+                boost::vertex_list_graph_tag,
+                typename boost::graph_traits<Graph>::traversal_category>
+              known_num_vertices;
+      typedef default_color_map_generator_helper<Graph, IndexMap, known_num_vertices::value> helper;
+      typedef typename helper::type type;
+      static type build(const Graph& g, const IndexMap& index) {
+        return helper::build(g, index);
+      }
+    };
+  }
+
+  // Call breadth first search with default color map.
+  template <class Graph, class SourceInputIter, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistZero>
+  inline void
+  dijkstra_shortest_paths_no_init
+    (const Graph& g,
+     SourceInputIter s_begin, SourceInputIter s_end,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistZero zero,
+     DijkstraVisitor vis)
+  {
+    typedef
+      detail::default_color_map_generator<Graph, IndexMap>
+      ColorMapHelper;
+    typedef typename ColorMapHelper::type ColorMap;
+    ColorMap color =
+      ColorMapHelper::build(g, index_map);
+    dijkstra_shortest_paths_no_init( g, s_begin, s_end, predecessor, distance, weight,
+      index_map, compare, combine, zero, vis,
+        color);
+  }
+
+  // Call breadth first search with default color map.
+  template <class Graph, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistZero>
+  inline void
+  dijkstra_shortest_paths_no_init
+    (const Graph& g,
+     typename graph_traits<Graph>::vertex_descriptor s,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistZero zero,
+     DijkstraVisitor vis)
+  {
+    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
+                                    weight, index_map, compare, combine, zero,
+                                    vis);
+  }
+
+  // Call breadth first search
+  template <class Graph, class SourceInputIter, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistZero, class ColorMap>
+  inline void
+  dijkstra_shortest_paths_no_init
+    (const Graph& g,
+     SourceInputIter s_begin, SourceInputIter s_end,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistZero zero,
+     DijkstraVisitor vis, ColorMap color)
+  {
+    typedef indirect_cmp<DistanceMap, Compare> IndirectCmp;
+    IndirectCmp icmp(distance, compare);
+
+    typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
+
+#ifdef BOOST_GRAPH_DIJKSTRA_TESTING
+    if (!dijkstra_relaxed_heap) {
+      typedef mutable_queue<Vertex, std::vector<Vertex>, IndirectCmp, IndexMap>
+        MutableQueue;
+
+      MutableQueue Q(num_vertices(g), icmp, index_map);
+      detail::dijkstra_bfs_visitor<DijkstraVisitor, MutableQueue, WeightMap,
+        PredecessorMap, DistanceMap, Combine, Compare>
+      bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero);
+
+      breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
+      return;
+    }
+#endif // BOOST_GRAPH_DIJKSTRA_TESTING
+
+#ifdef BOOST_GRAPH_DIJKSTRA_USE_RELAXED_HEAP
+    typedef relaxed_heap<Vertex, IndirectCmp, IndexMap> MutableQueue;
+    MutableQueue Q(num_vertices(g), icmp, index_map);
+#else // Now the default: use a d-ary heap
+      boost::scoped_array<std::size_t> index_in_heap_map_holder;
+      typedef
+        detail::vertex_property_map_generator<Graph, IndexMap, std::size_t>
+        IndexInHeapMapHelper;
+      typedef typename IndexInHeapMapHelper::type IndexInHeapMap;
+      IndexInHeapMap index_in_heap =
+        IndexInHeapMapHelper::build(g, index_map, index_in_heap_map_holder);
+      typedef d_ary_heap_indirect<Vertex, 4, IndexInHeapMap, DistanceMap, Compare>
+        MutableQueue;
+      MutableQueue Q(distance, index_in_heap, compare);
+#endif // Relaxed heap
+
+    detail::dijkstra_bfs_visitor<DijkstraVisitor, MutableQueue, WeightMap,
+      PredecessorMap, DistanceMap, Combine, Compare>
+        bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero);
+
+    breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
+  }
+
+  // Call breadth first search
+  template <class Graph, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistZero, class ColorMap>
+  inline void
+  dijkstra_shortest_paths_no_init
+    (const Graph& g,
+     typename graph_traits<Graph>::vertex_descriptor s,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistZero zero,
+     DijkstraVisitor vis, ColorMap color)
+  {
+    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
+                                    weight, index_map, compare, combine,
+                                    zero, vis, color);
+  }
+
+  // Initialize distances and call breadth first search with default color map
+  template <class VertexListGraph, class SourceInputIter, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero, typename T, typename Tag, 
+            typename Base>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     SourceInputIter s_begin, SourceInputIter s_end,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis,
+     const bgl_named_params<T, Tag, Base>&
+     BOOST_GRAPH_ENABLE_IF_MODELS_PARM(VertexListGraph,vertex_list_graph_tag))
+  {
+    boost::two_bit_color_map<IndexMap> color(num_vertices(g), index_map);
+    dijkstra_shortest_paths(g, s_begin, s_end, predecessor, distance, weight,
+                            index_map, compare, combine, inf, zero, vis,
+                            color);
+  }
+
+  // Initialize distances and call breadth first search with default color map
+  template <class VertexListGraph, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero, typename T, typename Tag, 
+            typename Base>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     typename graph_traits<VertexListGraph>::vertex_descriptor s,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis,
+     const bgl_named_params<T, Tag, Base>&
+     BOOST_GRAPH_ENABLE_IF_MODELS_PARM(VertexListGraph,vertex_list_graph_tag))
+  {
+    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance, weight,
+                            index_map, compare, combine, inf, zero, vis);
+  }
+
+  // Initialize distances and call breadth first search
+  template <class VertexListGraph, class SourceInputIter, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero, class ColorMap>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     SourceInputIter s_begin, SourceInputIter s_end,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis, ColorMap color)
+  {
+    typedef typename property_traits<ColorMap>::value_type ColorValue;
+    typedef color_traits<ColorValue> Color;
+    typename graph_traits<VertexListGraph>::vertex_iterator ui, ui_end;
+    for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
+      vis.initialize_vertex(*ui, g);
+      put(distance, *ui, inf);
+      put(predecessor, *ui, *ui);
+      put(color, *ui, Color::white());
+    }
+    for (SourceInputIter it = s_begin; it != s_end; ++it) {
+      put(distance, *it, zero);
+    }
+
+    dijkstra_shortest_paths_no_init(g, s_begin, s_end, predecessor, distance,
+                            weight, index_map, compare, combine, zero, vis,
+                            color);
+  }
+
+  // Initialize distances and call breadth first search
+  template <class VertexListGraph, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero, class ColorMap>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     typename graph_traits<VertexListGraph>::vertex_descriptor s,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis, ColorMap color)
+  {
+    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance, weight,
+                            index_map, compare, combine, inf, zero,
+                            vis, color);
+  }
+
+  // Initialize distances and call breadth first search
+  template <class VertexListGraph, class SourceInputIter,
+            class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     SourceInputIter s_begin, SourceInputIter s_end,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis)
+  {
+    dijkstra_shortest_paths(g, s_begin, s_end, predecessor, distance,
+                            weight, index_map,
+                            compare, combine, inf, zero, vis,
+                            no_named_parameters());
+  }
+
+  // Initialize distances and call breadth first search
+  template <class VertexListGraph, class DijkstraVisitor,
+            class PredecessorMap, class DistanceMap,
+            class WeightMap, class IndexMap, class Compare, class Combine,
+            class DistInf, class DistZero>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     typename graph_traits<VertexListGraph>::vertex_descriptor s,
+     PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
+     IndexMap index_map,
+     Compare compare, Combine combine, DistInf inf, DistZero zero,
+     DijkstraVisitor vis)
+  {
+    dijkstra_shortest_paths(g, &s, &s + 1, predecessor, distance,
+                            weight, index_map,
+                            compare, combine, inf, zero, vis);
+  }
+
+  namespace detail {
+
+    // Handle defaults for PredecessorMap and
+    // Distance Compare, Combine, Inf and Zero
+    template <class VertexListGraph, class DistanceMap, class WeightMap,
+              class IndexMap, class Params>
+    inline void
+    dijkstra_dispatch2
+      (const VertexListGraph& g,
+       typename graph_traits<VertexListGraph>::vertex_descriptor s,
+       DistanceMap distance, WeightMap weight, IndexMap index_map,
+       const Params& params)
+    {
+      // Default for predecessor map
+      dummy_property_map p_map;
+
+      typedef typename property_traits<DistanceMap>::value_type D;
+      D inf = choose_param(get_param(params, distance_inf_t()),
+                           (std::numeric_limits<D>::max)());
+
+      dijkstra_shortest_paths
+        (g, s,
+         choose_param(get_param(params, vertex_predecessor), p_map),
+         distance, weight, index_map,
+         choose_param(get_param(params, distance_compare_t()),
+                      std::less<D>()),
+         choose_param(get_param(params, distance_combine_t()),
+                      closed_plus<D>(inf)),
+         inf,
+         choose_param(get_param(params, distance_zero_t()),
+                      D()),
+         choose_param(get_param(params, graph_visitor),
+                      make_dijkstra_visitor(null_visitor())),
+         params);
+    }
+
+    template <class VertexListGraph, class DistanceMap, class WeightMap,
+              class IndexMap, class Params>
+    inline void
+    dijkstra_dispatch1
+      (const VertexListGraph& g,
+       typename graph_traits<VertexListGraph>::vertex_descriptor s,
+       DistanceMap distance, WeightMap weight, IndexMap index_map,
+       const Params& params)
+    {
+      // Default for distance map
+      typedef typename property_traits<WeightMap>::value_type D;
+      typename std::vector<D>::size_type
+        n = is_default_param(distance) ? num_vertices(g) : 1;
+      std::vector<D> distance_map(n);
+
+      detail::dijkstra_dispatch2
+        (g, s, choose_param(distance, make_iterator_property_map
+                            (distance_map.begin(), index_map,
+                             distance_map[0])),
+         weight, index_map, params);
+    }
+  } // namespace detail
+
+  // Named Parameter Variant
+  template <class VertexListGraph, class Param, class Tag, class Rest>
+  inline void
+  dijkstra_shortest_paths
+    (const VertexListGraph& g,
+     typename graph_traits<VertexListGraph>::vertex_descriptor s,
+     const bgl_named_params<Param,Tag,Rest>& params)
+  {
+    // Default for edge weight and vertex index map is to ask for them
+    // from the graph.  Default for the visitor is null_visitor.
+    detail::dijkstra_dispatch1
+      (g, s,
+       get_param(params, vertex_distance),
+       choose_const_pmap(get_param(params, edge_weight), g, edge_weight),
+       choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
+       params);
+  }
+
+} // namespace boost
+
+#ifdef BOOST_GRAPH_USE_MPI
+#  include <boost/graph/distributed/dijkstra_shortest_paths.hpp>
+#endif
+
+#endif // BOOST_GRAPH_DIJKSTRA_HPP
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_concepts.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_concepts.h
new file mode 100644
index 0000000..e8721aa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_concepts.h
@@ -0,0 +1,203 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Moeller
+
+#ifndef CGAL_GRAPH_CONCEPTS_H
+#define CGAL_GRAPH_CONCEPTS_H
+
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/concept/detail/concept_def.hpp>
+
+namespace CGAL {
+namespace concepts {
+
+BOOST_concept(HalfedgeGraph,(G))
+  : boost::concepts::Graph<G>
+{
+  typedef typename boost::graph_traits<G>::halfedge_descriptor             halfedge_descriptor;
+
+  BOOST_CONCEPT_USAGE(HalfedgeGraph)
+  {
+    BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<halfedge_descriptor>)) CGAL_UNUSED;
+    BOOST_CONCEPT_ASSERT((boost::EqualityComparable<halfedge_descriptor>)) CGAL_UNUSED;
+    BOOST_CONCEPT_ASSERT((boost::Assignable<halfedge_descriptor>)) CGAL_UNUSED;
+
+
+    e = edge(h, g);
+    h = halfedge(e, g);
+    h = halfedge(v, g);
+    hp = halfedge(u, v, g);
+    h = opposite(h, g);
+    v = source(h, g);
+    v = target(h, g);
+    h = next(h, g);
+    h = prev(h, g);
+    const_constraints(g);
+  }
+
+  void const_constraints(const G& cg)
+  {
+    e = edge(h, cg);
+    h = halfedge(e, cg);
+    h = halfedge(v, cg);
+    hp = halfedge(u, v, cg);
+    h = opposite(h, cg);
+    v = source(h, cg);
+    v = target(h, cg);
+    h = next(h, cg);
+    h = prev(h, cg);
+  }
+  
+  G g;
+  
+  typename boost::graph_traits<G>::vertex_descriptor v, u;
+  typename boost::graph_traits<G>::edge_descriptor e;
+  typename boost::graph_traits<G>::halfedge_descriptor h;
+  std::pair<halfedge_descriptor, bool> hp;
+};
+
+BOOST_concept(HalfedgeListGraph,(G))
+  : HalfedgeGraph<G>
+{
+  typedef typename boost::graph_traits<G>::halfedge_iterator   halfedge_iterator;
+  typedef typename boost::graph_traits<G>::halfedges_size_type halfedges_size_type;
+  
+  BOOST_CONCEPT_USAGE(HalfedgeListGraph)
+  {
+    // BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<halfedge_iterator>));
+    h_num = num_halfedges(g);
+    p = halfedges(g);
+    this->h = *p.first;
+    const_constraints(g);
+  }
+
+  void const_constraints(const G& cg)
+  {
+    h_num = num_halfedges(cg);
+    p = halfedges(cg);
+    this->h = *p.first;
+  }
+  
+  G g;
+  halfedges_size_type h_num;
+  std::pair<halfedge_iterator, halfedge_iterator> p;
+};
+
+BOOST_concept(FaceGraph,(G))
+  : HalfedgeGraph<G>
+{
+  typedef typename boost::graph_traits<G>::face_descriptor face_descriptor;
+
+  BOOST_CONCEPT_USAGE(FaceGraph)
+  {
+    BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<face_descriptor>)) CGAL_UNUSED;
+    BOOST_CONCEPT_ASSERT((boost::EqualityComparable<face_descriptor>)) CGAL_UNUSED;
+    BOOST_CONCEPT_ASSERT((boost::Assignable<face_descriptor>)) CGAL_UNUSED;
+
+    f = face(h, g);
+    h = halfedge(f, g);
+    boost::graph_traits<G>::null_face();
+    const_constraints(g);
+  }
+
+  void const_constraints(const G& cg)
+  {
+    f = face(h, cg);
+    h = halfedge(f, cg);
+  }
+
+  G g;
+  face_descriptor f;
+  typename boost::graph_traits<G>::halfedge_descriptor h;
+};
+
+BOOST_concept(FaceListGraph,(G))
+  : FaceGraph<G>
+{
+  typedef typename boost::graph_traits<G>::face_iterator face_iterator;
+  typedef typename boost::graph_traits<G>::faces_size_type faces_size_type;
+
+  BOOST_CONCEPT_USAGE(FaceListGraph)
+  {
+    // BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<face_iterator>));
+    p = faces(g);
+    nf = num_faces(g);
+    this->f = *p.first;
+    const_constraints(g);
+  }
+
+  void const_constraints(const G& cg)
+  {
+    p = faces(cg);
+    nf = num_faces(cg);
+    this->f = *p.first;
+  }
+
+  G g;
+  std::pair<face_iterator, face_iterator> p;
+  typename boost::graph_traits<G>::faces_size_type nf;
+};
+
+BOOST_concept(MutableFaceGraph,(G))
+  : FaceGraph<G>
+{
+  BOOST_CONCEPT_USAGE(MutableFaceGraph)
+  {
+    f = add_face(g);
+    remove_face(f, g);
+    set_face(h, f, g);
+    set_halfedge(f, h, g);
+  }
+  G g;
+  typename boost::graph_traits<G>::face_descriptor f;
+  typename boost::graph_traits<G>::halfedge_descriptor h;
+};
+
+BOOST_concept(MutableHalfedgeGraph,(G))
+  : HalfedgeGraph<G>
+{
+  BOOST_CONCEPT_USAGE(MutableHalfedgeGraph)
+  {
+    v = add_vertex(g);
+    remove_vertex(v, g);
+    e = add_edge(g);
+    remove_edge(e, g);
+    set_target(h1, v, g);
+    set_next(h1, h2, g);
+    set_halfedge(v, h1, g);
+  }
+
+  G g;
+  typename boost::graph_traits<G>::edge_descriptor e;
+  typename boost::graph_traits<G>::vertex_descriptor v;
+  typename boost::graph_traits<G>::halfedge_descriptor h1, h2;
+};
+
+} // concepts
+
+using CGAL::concepts::HalfedgeGraphConcept;
+using CGAL::concepts::HalfedgeListGraphConcept;
+using CGAL::concepts::FaceGraphConcept;
+using CGAL::concepts::FaceListGraphConcept;
+using CGAL::concepts::MutableFaceGraphConcept;
+using CGAL::concepts::MutableHalfedgeGraphConcept;
+} // CGAL
+
+#include <boost/concept/detail/concept_undef.hpp>
+
+#endif /* CGAL_GRAPH_CONCEPTS_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Arrangement_2.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Arrangement_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Arrangement_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Arrangement_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h
new file mode 100644
index 0000000..ca386be
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h
@@ -0,0 +1,334 @@
+// Copyright (c) 2013 CNRS and LIRIS' Establishments (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Talbot
+
+#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
+#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
+
+#include <utility>
+#include <iterator>
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/config.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <CGAL/Combinatorial_map.h>
+#include <CGAL/Dart_iterators.h>
+
+#define CGAL_CMAP_BASE_TEMPLATE_ARGS template<unsigned int d, class Refs, class Items, class Alloc>
+#define CGAL_CMAP_BASE_TYPE CGAL::Combinatorial_map_base<d, Refs, Items, Alloc>
+
+#define CGAL_CMAP_TEMPLATE_ARGS template<unsigned int d, class Items, class Alloc>
+#define CGAL_CMAP_TYPE CGAL::Combinatorial_map<d, Items, Alloc>
+
+#define CGAL_LCC_TEMPLATE_ARGS template < unsigned int d_, unsigned int ambient_dim, \
+             class Traits_, \
+             class Items_, \
+             class Alloc_, \
+             template<unsigned int, class,class,class>\
+             class CMap>
+
+#define CGAL_LCC_TYPE CGAL::Linear_cell_complex<d_, ambient_dim, Traits_, Items_, Alloc_, CMap> 
+
+namespace CGAL {
+
+
+template <class CMap, typename Dart_Iterator>
+class CMap_dart_handle_iterator 
+{
+public:
+  typedef Dart_Iterator Iterator;    
+
+  typedef typename CMap::Dart_handle Dart_handle;
+
+  typedef CMap_dart_handle_iterator<CMap, Dart_Iterator> Self; 
+
+  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
+  typedef typename std::iterator_traits<Iterator>::difference_type   difference_type;
+  typedef Dart_handle                                                value_type;
+  typedef value_type                                                 reference;
+  typedef value_type                                                 pointer;
+
+public:
+
+// OPERATIONS Forward Category
+// ---------------------------
+
+  bool operator==( const Self& i) const { return ( nt == i.nt); }
+  bool operator!=( const Self& i) const { return !(nt == i.nt );}
+  value_type operator*() const { return nt; }
+  value_type operator->() { return nt; }
+
+  Self& operator++() {
+    ++nt;
+    return *this;
+  }
+
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  CMap_dart_handle_iterator(Iterator iter):
+    nt(iter)
+  {}
+
+  // Default constructor
+  CMap_dart_handle_iterator():
+    nt(get_default(), Dart_handle())
+  {}
+
+  CMap_dart_handle_iterator(const CMap_dart_handle_iterator& it)
+  : nt(it.nt)
+  {}
+  
+  CMap_dart_handle_iterator& operator=(const CMap_dart_handle_iterator& it)
+  {
+    nt = const_cast<CMap_dart_handle_iterator&>(it).nt;
+  }
+
+private:
+  Iterator nt;
+  static CMap& get_default()
+  {
+    static CMap* m = new CMap();
+    return *m;
+  }
+};
+
+template <typename Dart_handle>
+struct EdgeHandle : Dart_handle
+{
+  EdgeHandle() : Dart_handle(NULL){}
+  EdgeHandle(const Dart_handle& h): Dart_handle(h)
+  {}
+};
+
+template <class CMap>
+struct CMap_Base_graph_traits
+{
+
+public :  
+  struct CMap_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                        public virtual boost::vertex_list_graph_tag,
+                                        public virtual boost::edge_list_graph_tag
+  {};
+
+  // Expose types required by the boost::Graph concept.
+  typedef typename CMap::Dart_handle vertex_descriptor;
+  typedef EdgeHandle<typename CMap::Dart_handle> edge_descriptor;
+  typedef boost::directed_tag directed_category;
+  typedef boost::allow_parallel_edge_tag edge_parallel_category; 
+  typedef CMap_graph_traversal_category traversal_category;
+
+  // Expose types required by the boost::IncidenceGraph concept.
+  typedef CMap_dart_handle_iterator<CMap, CMap_dart_iterator_of_cell<CMap, 0> > out_edge_iterator;
+  typedef typename CMap::size_type degree_size_type;
+
+  // Expose types required by the boost::BidirectionalGraph concept.
+  typedef CMap_dart_handle_iterator<CMap, CMap_dart_iterator_of_second_vertex<CMap> > in_edge_iterator;
+  typedef typename CMap::size_type edges_size_type;
+
+  // Expose types required by the boost::EdgeListGraph concept.
+  typedef CMap_dart_handle_iterator<CMap, typename CMap::Dart_range::iterator> edge_iterator;
+
+  // Expose types required by the boost::VertexListGraph concept.
+  typedef typename CMap::size_type vertices_size_type;
+  typedef CMap_dart_handle_iterator<CMap, typename CMap::template One_dart_per_cell_range<0>::iterator> vertex_iterator;
+};
+
+} //namespace CGAL
+
+namespace boost{
+
+// Specialization of graph_traits for Combinatorial map.
+CGAL_CMAP_TEMPLATE_ARGS
+struct graph_traits<CGAL_CMAP_TYPE >
+: CGAL::CMap_Base_graph_traits<typename CGAL_CMAP_TYPE::Base >
+{};
+
+CGAL_CMAP_TEMPLATE_ARGS
+struct graph_traits<CGAL_CMAP_TYPE const>
+: CGAL::CMap_Base_graph_traits<typename CGAL_CMAP_TYPE::Base >
+{};
+
+// Specialization of graph_traits for Combinatorial map base.
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+struct graph_traits<CGAL_CMAP_BASE_TYPE >
+: CGAL::CMap_Base_graph_traits<CGAL_CMAP_BASE_TYPE >
+{};
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+struct graph_traits<CGAL_CMAP_BASE_TYPE const>
+: CGAL::CMap_Base_graph_traits<CGAL_CMAP_BASE_TYPE >
+{};
+
+// Specialization of graph_traits for Linear Cell Complex.
+CGAL_LCC_TEMPLATE_ARGS
+struct graph_traits<CGAL_LCC_TYPE >
+: CGAL::CMap_Base_graph_traits<typename CGAL_LCC_TYPE::Base >
+{};
+
+CGAL_LCC_TEMPLATE_ARGS
+struct graph_traits<CGAL_LCC_TYPE const>
+: CGAL::CMap_Base_graph_traits<typename CGAL_LCC_TYPE::Base >
+{};
+
+// Expression required by the boost::IncidenceGraph concept.
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor 
+source(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_descriptor e, const CGAL_CMAP_BASE_TYPE&)
+{
+  return e;
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor 
+target(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_descriptor e, const CGAL_CMAP_BASE_TYPE&)
+{
+  return e->opposite();
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator, 
+          typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator>
+out_edges(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor u, const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator iter_type;
+
+  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
+
+  return std::make_pair(
+            cmap.template darts_of_cell<0>(u).begin(), 
+            cmap.template darts_of_cell<0>(u).end());
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
+out_degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor u, const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::out_edge_iterator iter_type;
+  std::pair<iter_type, iter_type> iter = out_edges(u, cm);
+
+  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type degree=0;
+  for(;iter.first != iter.second; ++(iter.first))
+    ++degree;
+  return degree;
+}
+
+// Expression required by the boost::BidirectionalGraph concept.
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator>
+in_edges(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator iter_type;
+
+  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
+
+  return std::make_pair<iter_type, iter_type>
+    (cmap.darts_of_second_vertex(v).begin(), cmap.darts_of_second_vertex(v).end());
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
+in_degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::in_edge_iterator iter_type;
+  std::pair<iter_type, iter_type> iter = in_edges(v, cm);
+
+  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type degree=0;
+  for(;iter.first != iter.second; ++(iter.first))
+    ++degree;
+  return degree;
+}
+
+// We suppose there are no loops.
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::degree_size_type
+degree(typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_descriptor v, const CGAL_CMAP_BASE_TYPE& cm)
+{
+  return in_degree(v, cm) + out_degree(v, cm);
+}
+
+// Expression required by the boost::VertexListGraph concept.
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator>
+vertices(const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertex_iterator iter_type;
+
+  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
+
+  return std::make_pair<iter_type, iter_type>
+    (iter_type(cmap.template one_dart_per_cell<0>().begin()),
+     iter_type(cmap.template one_dart_per_cell<0>().end()));
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::vertices_size_type
+num_vertices(const CGAL_CMAP_BASE_TYPE& cm)
+{
+  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
+  return cmap.template one_dart_per_cell<0>().size();
+}
+
+// Expression required by the boost::EdgeListGraph concept.
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+std::pair<typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator, typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator>
+edges(const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator iter_type;
+
+  CGAL_CMAP_BASE_TYPE& cmap = const_cast<CGAL_CMAP_BASE_TYPE&>(cm);
+
+  return std::make_pair<iter_type, iter_type>
+    (iter_type(cmap.darts().begin()),
+     iter_type(cmap.darts().end()));
+}
+
+CGAL_CMAP_BASE_TEMPLATE_ARGS
+typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edges_size_type
+num_edges(const CGAL_CMAP_BASE_TYPE& cm)
+{
+  typedef typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edge_iterator iter_type;
+  std::pair<iter_type, iter_type> iter = edges(cm);
+
+  typename boost::graph_traits<CGAL_CMAP_BASE_TYPE >::edges_size_type degree=0;
+  for(;iter.first != iter.second; ++(iter.first))
+    ++degree;
+  return degree;
+}
+
+
+}// namespace boost
+
+#undef CGAL_CMAP_BASE_TEMPLATE_ARGS
+#undef CGAL_CMAP_TEMPLATE_ARGS
+#undef CGAL_CMAP_TYPE
+#undef CGAL_CMAP_BASE_TYPE
+#undef CGAL_LCC_TEMPLATE_ARGS
+#undef CGAL_LCC_TYPE
+
+#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_CMAP_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h
new file mode 100644
index 0000000..d25e974
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h
@@ -0,0 +1,395 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+
+#ifndef CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
+#define CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/config.hpp>
+#include <boost/iterator_adaptors.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+#include <CGAL/boost/graph/graph_traits_Triangulation_2.h>
+
+// The functions and classes in this file allows the user to
+// treat a CGAL Delaunay_triangulation_2 object as a boost graph "as is". No
+// wrapper is needed for the Delaunay_triangulation_2 object.
+
+
+
+namespace boost { 
+
+  template <class GT, class TDS>
+  struct graph_traits< CGAL::Delaunay_triangulation_2<GT,TDS> > {
+
+    struct DT2_graph_traversal_category : 
+      public virtual bidirectional_graph_tag,
+      public virtual adjacency_graph_tag,        
+      public virtual edge_list_graph_tag,
+      public virtual vertex_list_graph_tag { };
+
+    typedef CGAL::Delaunay_triangulation_2<GT,TDS> Delaunay_triangulation;
+
+    typedef typename CGAL::Delaunay_triangulation_2<GT,TDS>::Vertex_handle vertex_descriptor;
+    typedef CGAL::detail::Edge<CGAL::Delaunay_triangulation_2<GT,TDS>, typename CGAL::Delaunay_triangulation_2<GT,TDS>::Edge>  edge_descriptor;
+    typedef typename CGAL::Delaunay_triangulation_2<GT,TDS>::All_edges_iterator  edge_iterator;
+
+    typedef CGAL::detail::boost_all_vertices_iterator<Delaunay_triangulation> vertex_iterator;
+    typedef CGAL::Counting_iterator<CGAL::detail::Out_edge_circulator<typename Delaunay_triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > out_edge_iterator;
+    typedef CGAL::Counting_iterator<CGAL::detail::In_edge_circulator<typename Delaunay_triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > in_edge_iterator;
+    typedef CGAL::Counting_iterator<typename Delaunay_triangulation::Vertex_circulator> Incident_vertices_iterator;
+    typedef Incident_vertices_iterator adjacency_iterator;
+
+    typedef undirected_tag directed_category;
+    typedef disallow_parallel_edge_tag edge_parallel_category; 
+    typedef DT2_graph_traversal_category traversal_category;
+    typedef typename Delaunay_triangulation::size_type size_type;
+    typedef size_type vertices_size_type;
+    typedef size_type edges_size_type;
+    typedef size_type degree_size_type;
+  };
+
+
+} // namespace boost
+
+
+namespace CGAL {
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor
+  source(typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_descriptor e,
+         const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.ccw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor
+  target(typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_descriptor e,
+         const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.cw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  inline std::pair<
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator,
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator >  
+  vertices(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_iterator
+      Iter;
+    return std::make_pair( Iter(g.all_vertices_begin()), Iter(g.all_vertices_end()) );
+  }
+
+
+  template <class Gt, class Tds>
+  inline std::pair<
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_iterator,
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edge_iterator >  
+  edges(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {    
+    return std::make_pair(g.all_edges_begin(), g.all_edges_end());
+  }
+
+  template <class Gt, class Tds>
+  inline std::pair<
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::out_edge_iterator,
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::out_edge_iterator >  
+  out_edges(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
+      ::out_edge_iterator Iter;
+    
+    return std::make_pair( Iter(ec), Iter(ec,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  inline std::pair<
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::in_edge_iterator,
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::in_edge_iterator >  
+  in_edges(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
+      ::in_edge_iterator Iter;
+    return std::make_pair( Iter(ec), Iter(ec,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  inline std::pair<
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::adjacency_iterator,
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::adjacency_iterator >  
+  adjacent_vertices(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Vertex_circulator vc = out_edge_iterator(u,u.face());
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >
+      ::adjacency_iterator Iter;
+    return std::make_pair( Iter(vc), Iter(vc,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertices_size_type
+  num_vertices(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    return g.number_of_vertices()+1;
+  }  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::edges_size_type
+  num_edges(const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    return  g.number_of_vertices() + 1 + g.number_of_faces() + degree(g.infinite_vertex(), g) - 2;
+  }  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
+  out_degree(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
+  in_degree(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type
+  degree(
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< CGAL::Delaunay_triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+
+  // property maps
+  template <class Gt, class Tds>
+  class DT2_vertex_id_map
+    : public boost::put_get_helper<int, DT2_vertex_id_map<Gt,Tds> >
+  {
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef int value_type;
+    typedef int reference;
+    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Vertex_handle key_type;
+    
+    DT2_vertex_id_map()
+    {}
+    
+    long operator[](key_type vh) const {
+      return vh->id(); 
+    }
+  };
+
+  template <class Gt, class Tds>
+  class DT2_edge_id_map
+    : public boost::put_get_helper<int, DT2_edge_id_map<Gt,Tds> >
+  {
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef int value_type;
+    typedef int reference;
+    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge key_type;
+    
+    DT2_edge_id_map()
+    {}
+    
+    long operator[](key_type e) const {
+      return (3 * e.first.id()) + e.second; 
+    }
+  };
+
+  template <class Gt, class Tds>
+  class DT2_edge_weight_map
+    : public boost::put_get_helper<typename Gt::FT, DT2_edge_weight_map<Gt, Tds> >
+  {
+  private:
+    const CGAL::Delaunay_triangulation_2<Gt,Tds>& tr;
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef typename Gt::FT value_type;
+    typedef value_type reference;
+    typedef typename CGAL::Delaunay_triangulation_2<Gt,Tds>::Edge key_type;
+
+    DT2_edge_weight_map(const CGAL::Delaunay_triangulation_2<Gt,Tds>& tr_) 
+      : tr(tr_) 
+    { }
+
+    typename Gt::FT operator[](key_type e) const {
+      return tr.segment(e).squared_length();
+    }
+  };
+
+
+  template <class Gt, class Tds>
+  inline DT2_vertex_id_map<Gt,Tds>
+  get(boost::vertex_index_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& ) {
+    DT2_vertex_id_map<Gt,Tds> m;
+    return m;
+  }
+
+  template <class Gt, class Tds>
+  inline DT2_edge_id_map<Gt,Tds>
+  get(boost::edge_index_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& ) {
+    DT2_edge_id_map<Gt,Tds> m;
+    return m;
+  }
+
+  template <class Gt, class Tds>
+  inline DT2_edge_weight_map<Gt,Tds>
+  get(boost::edge_weight_t, const CGAL::Delaunay_triangulation_2<Gt,Tds>& g) {
+    DT2_edge_weight_map<Gt,Tds> m(g);
+    return m;
+  }
+
+  template <class Tag>
+  struct DT2_property_map { };
+
+  template <>
+  struct DT2_property_map<boost::vertex_index_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef DT2_vertex_id_map<Gt,Tds> type;
+      typedef DT2_vertex_id_map<Gt,Tds> const_type;
+    };
+  };
+
+
+  template <>
+  struct DT2_property_map<boost::edge_index_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef DT2_edge_id_map<Gt,Tds> type;
+      typedef DT2_edge_id_map<Gt,Tds> const_type;
+    };
+  };
+
+
+  template <>
+  struct DT2_property_map<boost::edge_weight_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef DT2_edge_weight_map<Gt,Tds> type;
+      typedef DT2_edge_weight_map<Gt,Tds> const_type;
+    };
+  };
+
+} // namespace CGAL
+
+namespace boost {
+
+  // g++ 'enumeral_type' in template unification not implemented workaround
+  template <class Gt, class Tds, class Tag>
+  struct property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>, Tag> {
+    typedef typename 
+    CGAL::DT2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
+    typedef typename map_gen::type type;
+    typedef typename map_gen::const_type const_type;
+  };
+
+  // see struct property_map in Polyehdron for an explanation
+  template <class Gt, class Tds, class Tag>
+  struct property_map<const CGAL::Delaunay_triangulation_2<Gt,Tds>, Tag> {
+    typedef typename 
+    CGAL::DT2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
+    typedef typename map_gen::type type;
+    typedef typename map_gen::const_type const_type;
+  };
+
+} // namespace boost
+
+namespace CGAL {
+  template <class Gt, class Tds, class PropertyTag, class Key>
+  inline
+  typename boost::property_traits<
+    typename boost::property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>,PropertyTag>::const_type>::value_type
+  get(PropertyTag p, const CGAL::Delaunay_triangulation_2<Gt,Tds>& g, const Key& key) {
+    return get(get(p, g), key);
+  }
+  
+  template <class Gt, class Tds, class PropertyTag, class Key,class Value>
+  inline void
+  put(PropertyTag p, CGAL::Delaunay_triangulation_2<Gt,Tds>& g, 
+      const Key& key, const Value& value)
+  {
+    typedef typename boost::property_map<CGAL::Delaunay_triangulation_2<Gt,Tds>, PropertyTag>::type Map;
+    Map pmap = get(p, g);
+    put(pmap, key, value);
+  }
+
+} // namespace CGAL
+
+namespace boost {
+
+  // What are those needed for ???
+  template <typename Gt, typename Tds>
+  struct edge_property_type<CGAL::Delaunay_triangulation_2<Gt,Tds> > {
+    typedef void type;
+  };  
+
+  template <typename Gt, typename Tds>
+  struct vertex_property_type<CGAL::Delaunay_triangulation_2<Gt,Tds> > {
+    typedef void type;
+  };
+} // namespace boost
+
+//#include <CGAL/graph_traits_Delaunay_delaunay_triangulation_2.h>
+
+#endif // CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h
new file mode 100644
index 0000000..f7185e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h
@@ -0,0 +1,252 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+
+#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
+#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
+
+#include <functional>
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/config.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <CGAL/basic.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/Handle_hash_function.h>
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+#include <CGAL/boost/graph/halfedge_graph_traits.h>
+#endif
+
+namespace CGAL {
+
+namespace internal {
+
+template<typename I>
+class Prevent_deref
+  : public boost::iterator_adaptor<
+  Prevent_deref<I>
+  , I // base
+  , I // value
+  >
+{
+public:
+  typedef boost::iterator_adaptor<
+  Prevent_deref<I>
+  , I // base
+  , I // value
+  > Base;
+  //  typedef typename Prevent_deref::iterator_adaptor_::reference reference;
+  typedef typename Base::reference reference;
+  Prevent_deref() : Base() {};
+  Prevent_deref(const I& i) : Base(i) {};
+private:
+  friend class boost::iterator_core_access;
+  reference dereference() const { return const_cast<typename boost::remove_reference<reference>::type&>(this->base_reference()); }
+};
+
+// a HDS_halfedge pretending to be an Edge
+template<typename Halfedge_handle>
+struct HDS_edge {
+  HDS_edge() : halfedge_() { }
+
+  explicit HDS_edge(const Halfedge_handle& h) : halfedge_(h) {}
+
+  bool operator==(const HDS_edge& other) const {
+    // equality is tricky, we are equal when both halfedges are the
+    // same or when the opposite halfedge of this is the same as
+    // halfedge_.other but we need to be careful not to apply this
+    // should this be the invalid halfedge or opposite is going to
+    // blow up
+    if(halfedge_ == other.halfedge_) {
+      return true;
+    } else if(halfedge_ != Halfedge_handle()) { // not default constructed
+      return halfedge_->opposite() == other.halfedge_;
+    } else {
+      // this is the invalid halfedge, it can only be equal to the
+      // invalid halfedge and this is covered by the first case
+      return false;
+    }
+  }
+
+  bool operator!=(const HDS_edge& other) const {
+    return !(*this == other);
+  }
+
+  friend bool operator<(const HDS_edge& a,const HDS_edge& b)
+  {
+    if(a==b) return false;
+    return a.halfedge_ < b.halfedge_;
+  }
+
+  // forward some function to avoid boilerplate and typedefs inside
+  // the free functions
+
+  HDS_edge next() { return HDS_edge(halfedge_->next()); }
+
+  // this is potentially broken as it does not use the decorator to
+  // find prev, but we cannot instantiate the entire decorator
+  // without the full polyhedron type and taking all necessary
+  // template parameters seems overkill
+  HDS_edge prev() { return HDS_edge(halfedge_->prev()); }
+
+  HDS_edge opposite() { return HDS_edge(halfedge_->opposite()); }
+
+  // this is hacky, we don't know the actual type of the id and if we
+  // start adding decltype special cases we have to do it consistently
+  // up to the property map and maybe back down to Polyhedron.
+  std::size_t id() const { return halfedge_->id() / 2; }
+
+  Halfedge_handle halfedge() const { return halfedge_; }
+
+  // save us some work to do function chaining
+  HDS_edge
+  opposite_next() { return HDS_edge(halfedge_->opposite()->next()); }
+
+  HDS_edge
+  next_opposite() { return HDS_edge(halfedge_->next()->opposite()); }
+
+  HDS_edge
+  prev_opposite() { return HDS_edge(halfedge_->prev()->opposite()); }
+
+  HDS_edge
+  opposite_prev() { return HDS_edge(halfedge_->opposite()->prev()); }
+
+
+private:
+  Halfedge_handle halfedge_;
+};
+
+// make edge_descriptor hashable by default in Unique_hash_map
+namespace handle{
+  template<typename Halfedge_handle>
+  struct Hash_functor< HDS_edge<Halfedge_handle> >
+  {
+    std::size_t
+    operator()(const HDS_edge<Halfedge_handle>& edge)
+    {
+      Halfedge_handle he = edge.halfedge();
+      if ( he < he->opposite() )
+        return Hash_functor<Halfedge_handle>()(he);
+      return Hash_functor<Halfedge_handle>()(he->opposite());
+    }
+  };
+} //end of namespace handle
+
+template<typename Halfedge_handle>
+struct Construct_edge {
+  typedef HDS_edge<Halfedge_handle> result_type;
+  HDS_edge<Halfedge_handle> operator()(const Halfedge_handle& he) const
+  { return HDS_edge<Halfedge_handle>(he); }
+};
+
+template<typename Halfedge_handle>
+struct Construct_edge_opposite {
+  typedef HDS_edge<Halfedge_handle> result_type;
+  HDS_edge<Halfedge_handle> operator()(const Halfedge_handle& he) const
+  { return HDS_edge<Halfedge_handle>(he->opposite()); }
+};
+
+} // internal
+
+template <class HDS>
+struct HDS_graph_traits
+{
+private:
+  struct HDS_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                        public virtual boost::vertex_list_graph_tag,
+                                        public virtual boost::edge_list_graph_tag
+  {};
+
+public:
+  typedef typename HDS::Vertex_handle                                vertex_descriptor;
+  typedef typename internal::HDS_edge<typename HDS::Halfedge_handle> edge_descriptor;
+  typedef typename HDS::Face_handle                                  face_descriptor;
+  typedef typename HDS::Halfedge_handle                              halfedge_descriptor;
+
+  typedef internal::Prevent_deref<typename HDS::Vertex_iterator>     vertex_iterator;
+  typedef internal::Prevent_deref<typename HDS::Face_iterator>       face_iterator;
+  typedef internal::Prevent_deref<typename HDS::Edge_iterator>       edge_iterator_i;
+  typedef internal::Prevent_deref<typename HDS::Halfedge_iterator>   halfedge_iterator;
+
+
+
+  typedef boost::transform_iterator<
+    internal::Construct_edge<typename HDS::Halfedge_handle>,
+    edge_iterator_i,
+    edge_descriptor> edge_iterator;
+
+  typedef Out_edge_iterator<HDS> out_edge_iterator;
+
+  typedef In_edge_iterator<HDS> in_edge_iterator;
+
+  typedef boost::undirected_tag             directed_category;
+  typedef boost::disallow_parallel_edge_tag edge_parallel_category;
+  typedef HDS_graph_traversal_category      traversal_category;
+
+  typedef typename HDS::size_type vertices_size_type;
+  typedef vertices_size_type      edges_size_type;
+  typedef vertices_size_type      halfedges_size_type;
+  typedef vertices_size_type      degree_size_type;
+  typedef vertices_size_type      faces_size_type;
+
+  static vertex_descriptor null_vertex() { return vertex_descriptor(); }
+  static halfedge_descriptor null_halfedge() { return halfedge_descriptor(); }
+  static face_descriptor null_face() { return face_descriptor(); }
+};
+
+
+} //namespace CGAL
+
+
+namespace std {
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+
+  template <typename H>
+  struct hash<CGAL::internal::HDS_edge<H> > {
+    std::size_t operator()(const CGAL::internal::HDS_edge<H>& e) const
+    {
+      std::cerr << "HDS_edge HashFct" << std::endl;
+      std::hash<H> fct;
+      return fct(e.halfedge());
+    }
+  };
+
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
new file mode 100644
index 0000000..ff8ddf2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
@@ -0,0 +1,697 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Philipp Moeller
+
+#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
+#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
+#include <CGAL/boost/graph/internal/OM_iterator_from_circulator.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/Iterator_range.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/assertions.h>
+
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+
+// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4267)
+#endif
+namespace CGAL { namespace internal {
+
+
+template<typename Halfedge_handle>
+class OMesh_edge {
+public:
+  OMesh_edge() : halfedge_() {}
+  explicit OMesh_edge(const Halfedge_handle& h) : halfedge_(h) {}
+  Halfedge_handle halfedge() const { return halfedge_; }
+  bool is_valid() const { return halfedge_.is_valid(); }
+
+  bool
+  operator==(const OMesh_edge& other) {
+    if(halfedge_ == other.halfedge_) {
+      return true;
+    } else if(halfedge_ != Halfedge_handle()) {
+      return opposite() == other.halfedge_;
+    } else {
+      return false;
+    }
+  }
+
+  bool operator<(const OMesh_edge& other) const
+  { 
+    return this->idx() < other.idx();
+  }
+
+  bool
+  operator!=(const OMesh_edge& other) { return !(*this == other); }
+
+  Halfedge_handle
+  opposite() const { return Halfedge_handle((halfedge_.idx() & 1) ? halfedge_.idx()-1 : halfedge_.idx()+1); }
+
+  OMesh_edge
+  opposite_edge() const { return OMesh_edge(Halfedge_handle((halfedge_.idx() & 1) ? halfedge_.idx()-1 : halfedge_.idx()+1)); }
+
+  unsigned int idx() const { return halfedge_.idx() / 2; }
+private:
+  Halfedge_handle halfedge_;
+};
+
+template <typename Halfedge_handle, typename OMeshEdge>
+struct Convert_omesh_edge
+{
+  typedef OMesh_edge<Halfedge_handle> result_type;
+  result_type operator()(const OMeshEdge& h) const { 
+    return result_type(Halfedge_handle(h.idx() * 2)); 
+  }
+};
+
+template <typename Halfedge_handle>
+struct Construct_omesh_edge
+{
+  typedef OMesh_edge<Halfedge_handle> result_type;
+  template <typename T>
+  result_type operator()(const T& h) const { return result_type(h); }
+};
+
+template <typename Halfedge_handle>
+struct Construct_omesh_edge_opposite
+{
+  typedef OMesh_edge<Halfedge_handle> result_type;
+  template <typename T>
+  result_type operator()(const T& h) const { return result_type(h).opposite_edge(); }
+};
+
+
+} // internal
+} // CGAL
+
+
+namespace boost {
+
+template <class K>
+struct graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >
+{
+private:
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> SM;
+
+  struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                       public virtual boost::vertex_list_graph_tag,
+                                       public virtual boost::edge_list_graph_tag
+  {};
+
+public:
+  // Graph
+  typedef typename SM::VertexHandle                                        vertex_descriptor;
+  typedef typename SM::Point                                               vertex_property_type;
+  typedef typename CGAL::internal::OMesh_edge<typename SM::HalfedgeHandle> edge_descriptor;
+  typedef boost::undirected_tag                                            directed_category;
+  typedef boost::disallow_parallel_edge_tag                                edge_parallel_category; 
+  typedef SM_graph_traversal_category                                      traversal_category;
+
+  // HalfedgeGraph
+  typedef typename SM::HalfedgeHandle              halfedge_descriptor;
+
+   // FaceGraph
+  typedef typename SM::FaceHandle   face_descriptor;
+  
+  // VertexListGraph
+  typedef typename SM::VertexIter   vertex_iterator;
+  typedef unsigned int              vertices_size_type;
+  // EdgeListGraph
+  typedef boost::transform_iterator<
+    CGAL::internal::Convert_omesh_edge<typename SM::HalfedgeHandle, typename SM::EdgeHandle>,
+    typename SM::EdgeIter,
+    edge_descriptor>                edge_iterator;
+
+  typedef unsigned int              edges_size_type;
+  // HalfEdgeListGraph
+  typedef typename SM::HalfedgeIter halfedge_iterator;
+  typedef unsigned int              halfedges_size_type;
+  // FaceListGraph
+  typedef typename SM::FaceIter     face_iterator;
+  typedef unsigned int              faces_size_type;
+
+  // IncidenceGraph
+  typedef unsigned int              degree_size_type;
+
+  
+  typedef CGAL::In_edge_iterator<SM> in_edge_iterator;
+
+  typedef CGAL::Out_edge_iterator<SM> out_edge_iterator;
+
+  // nulls
+  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
+  static face_descriptor     null_face()   { return face_descriptor(); }
+  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
+};
+
+template<typename K>
+struct graph_traits< const OpenMesh::PolyMesh_ArrayKernelT<K> >  
+  : public graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >
+{ };
+
+} // namespace boost
+
+namespace OpenMesh {
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertices_size_type
+num_vertices(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_vertices();
+}
+  
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edges_size_type
+num_edges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_edges();
+}
+  
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
+degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+
+         
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
+out_degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+           const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+             
+  
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::degree_size_type
+in_degree(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+          const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+            
+  
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+source(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
+       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.from_vertex_handle(e.halfedge());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+source(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.from_vertex_handle(h);
+}
+         
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
+       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.to_vertex_handle(e.halfedge());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+       const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.to_vertex_handle(h);
+}
+    
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_iterator>
+vertices(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.vertices_sbegin(), sm.vertices_end()); 
+}
+
+ 
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator>
+edges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator iterator;
+  iterator beg(sm.edges_sbegin());
+  iterator end(sm.edges_end());
+  return CGAL::make_range(beg,end); 
+}
+
+  
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::in_edge_iterator>
+in_edges(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::in_edge_iterator Iter;
+
+  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::out_edge_iterator>
+out_edges(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+          const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::out_edge_iterator Iter;
+  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template<typename K>
+std::pair<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor,
+          bool>
+edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u, 
+     typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor 
+    he(sm.find_halfedge(u, v));
+  return std::make_pair(he, he.is_valid());
+}
+
+
+//
+// HalfedgeGraph
+//
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+next(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.next_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+prev(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.prev_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+opposite(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.opposite_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor
+edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& /*sm*/)
+{
+  return typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e,
+         const OpenMesh::PolyMesh_ArrayKernelT<K>&)
+{
+  return e.halfedge();
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  if(sm.halfedge_handle(v) == boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_halfedge()){
+    return boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_halfedge();
+  }
+  // prev because OpenMesh stores out-going halfedges
+  // return sm.prev_halfedge_handle(sm.halfedge_handle(v));
+  return sm.opposite_halfedge_handle(sm.halfedge_handle(v));
+}
+
+
+template <typename K>
+std::pair<
+  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor,
+  bool
+>
+halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u,
+         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h = sm.find_halfedge(u, v);
+  return std::make_pair(h, h.is_valid());
+}
+
+
+
+//
+// HalfedgeListGraph
+//
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_iterator>
+halfedges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.halfedges_sbegin(), sm.halfedges_end());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedges_size_type
+num_halfedges(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_halfedges();
+}
+
+
+
+//
+// MutableHalfedgeGraph
+//
+template<typename K>
+void
+set_next(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h1, 
+         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h2,
+         OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_next_halfedge_handle(h1, h2);
+}
+
+
+
+template<typename K>
+void
+set_target(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+           typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+           OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_vertex_handle(h, v);
+}
+
+
+template<typename K>
+void
+set_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+             typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+             OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_halfedge_handle(v, sm.opposite_halfedge_handle(h));
+}
+
+
+template<typename K>
+void
+adjust_border_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v,
+                       OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.adjust_outgoing_halfedge(v);
+}
+
+template<typename K>
+void
+garbage_collection(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.garbage_collection();
+}
+
+template<typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor
+add_edge(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return edge(sm.new_edge(boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_vertex(),
+                          boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::null_vertex() ), sm);
+}
+
+
+//
+// FaceGraph
+//
+template<typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
+{
+  return sm.halfedge_handle(f);
+}
+  
+template<typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
+face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
+{
+  return sm.face_handle(h);
+}
+
+
+
+//
+// MutableFaceGraph
+//
+template<typename K>
+void
+set_face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
+         OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_face_handle(h, f);
+}
+
+  
+template<typename K>
+void
+set_halfedge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f,
+             typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+             OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_halfedge_handle(f, h);
+}
+
+ 
+//
+// FaceListGraph
+//
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::faces_size_type
+num_faces(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_faces();
+}
+  
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_iterator>
+faces(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.faces_sbegin(), sm.faces_end()); 
+}
+ 
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+  return sm.new_vertex();
+}
+
+  /*
+
+// MutableGraph
+// add a vertex with a default constructed property
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+  return sm.add_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_property_type());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(const typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_property_type& p, OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+  return sm.add_vertex(p);
+}
+
+template <typename K>
+void
+clear_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor, 
+             OpenMesh::PolyMesh_ArrayKernelT<K>&) {
+  CGAL_assert(false);
+}
+
+  */
+
+template <typename K>
+void
+remove_vertex(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+              OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  sm.set_halfedge_handle(v, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor());
+  sm.status(v).set_deleted(true);
+}
+
+  
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor u, 
+            typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
+{
+  typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e = edge(u, v, sm);
+  remove_edge(e,sm);
+}
+
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor e, 
+            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
+{
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  sm.request_edge_status();
+
+  typedef typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h1 = halfedge(e,sm);
+  halfedge_descriptor h2 = opposite(halfedge(e,sm),sm);
+  sm.status(sm.edge_handle(h1)).set_deleted(true);
+  sm.status(h1).set_deleted(true);
+  sm.status(h2).set_deleted(true);
+
+}
+
+
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_iterator eiter, 
+            OpenMesh::PolyMesh_ArrayKernelT<K>& sm) 
+{
+  remove_edge(*eiter, sm);
+}
+
+template<typename K>
+void
+remove_face(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor f, 
+            OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  
+  set_halfedge(f, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor(), sm);
+  sm.status(f).set_deleted(true);
+}
+
+#if 0 // conflits with function in Euler_operations.h
+template<typename K>
+std::pair<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor,
+          bool>
+add_edge(typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v1, 
+         typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor v2, 
+         OpenMesh::PolyMesh_ArrayKernelT<K>& sm) {
+  
+  return sm.new_edge(v1, v2);
+}
+#endif
+
+template<typename K>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
+add_face(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  return sm.new_face();
+}
+
+template<typename K, typename InputIterator>
+typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::face_descriptor
+add_face(InputIterator begin, InputIterator end, OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  std::vector<typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor> 
+    v(begin, end);
+  return sm.add_face(v);
+}
+
+template<typename K>
+bool is_valid(OpenMesh::PolyMesh_ArrayKernelT<K>& sm, bool /* verbose */ = false)
+{
+  return CGAL::is_valid_polygon_mesh(sm);
+}
+
+} // namespace OpenMesh
+
+namespace CGAL {
+
+// Overload CGAL::clear function. PolyMesh_ArrayKernel behaves
+// differently from other meshes. Calling clear does not affect the
+// number of vertices, edges, or faces in the mesh. To get actual
+// numbers it is necessary to first collect garbage. We add an
+// overlaod to get consistent behavior.
+template<typename K>
+void clear(OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  sm.clear();
+  sm.garbage_collection(true, true, true);
+  CGAL_postcondition(num_edges(sm) == 0);
+  CGAL_postcondition(num_vertices(sm) == 0);
+  CGAL_postcondition(num_faces(sm) == 0);
+}
+
+}
+
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+#include <CGAL/boost/graph/backward_compatibility_functions.h>
+
+namespace boost {
+  // The following functions were defined in the namespace boost
+  using OpenMesh::vertices;
+  using OpenMesh::edges;
+  using OpenMesh::num_vertices;
+  using OpenMesh::num_edges;
+  using OpenMesh::out_edges;
+  using OpenMesh::in_edges;
+  using OpenMesh::target;
+  using OpenMesh::source;
+} // namespace boost
+#endif //CGAL_NO_DEPRECATED_CODE
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_BOOST_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h
new file mode 100644
index 0000000..a4b4021
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h
@@ -0,0 +1,489 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+
+#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
+#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
+
+#include <CGAL/boost/graph/graph_traits_HalfedgeDS.h>
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Iterator_range.h>
+#include <CGAL/HalfedgeDS_decorator.h>
+
+#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
+
+//
+// NOTE: The BGL algorithms are NOT const-correct: i.e., they take a "G const&"
+// but instantiate "graph_traits<G>" instead of "graph_traits<G const>"
+// This is known Boost bug which will eventually be fixed, but in the meantime we need
+// to coerce both const and non-const specializations.
+// That is, HDS_graph_traits<G const> is really the same as HDS_graph_traits<G>
+// so graph_traits<G> is also the same as graph_traits<G const>.
+// Therefore, while, for instance, "graph_traits<G const>::vertex_descriptor"
+// is conceptually const-correct, it actually corresponds to the non-const handle,
+// hence the const_cast<> used below in the functions implementation.
+//
+
+namespace boost
+{
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+struct graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
+   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
+{
+  typedef typename Gt::Point_3 vertex_property_type;
+};
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+struct graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const >
+   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> > // See NOTE above!
+{};
+
+} // namespace boost
+
+namespace CGAL {
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertices_size_type
+num_vertices(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  return p.size_of_vertices();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edges_size_type
+num_edges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  return p.size_of_halfedges() / 2;
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
+degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
+       , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return v->vertex_degree();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
+out_degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
+           , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return v->vertex_degree();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::degree_size_type
+in_degree(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
+          , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return v->vertex_degree();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor
+source(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor e
+       , const CGAL::Polyhedron_3<Gt,I,HDS,A> & )
+{
+  return e.halfedge()->opposite()->vertex();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor
+target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor e
+       , const CGAL::Polyhedron_3<Gt,I,HDS,A> & )
+{
+  return e.halfedge()->vertex();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+std::pair<
+  typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor
+  , bool>
+edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
+     , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor v
+     , const CGAL::Polyhedron_3<Gt,I,HDS,A> &)
+{
+  typedef CGAL::Polyhedron_3<Gt,I,HDS,A> P;
+  typedef typename P::Halfedge_around_vertex_circulator Circ;
+  typedef boost::graph_traits< P > Traits;
+  typedef typename Traits::edge_descriptor edge;
+
+  // circulate around the inedges of u
+  Circ c(u->halfedge()), d(u->halfedge());
+  if(c != 0) {
+    do {
+      if(c->opposite()->vertex() == v) {
+        return std::make_pair(edge(c->opposite()), true);
+      }
+    } while (++c != d);
+  }
+
+  return std::make_pair(edge(), false);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_iterator>
+vertices( const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_iterator Iter;
+  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
+  return make_range( Iter(ncp.vertices_begin()), Iter(ncp.vertices_end()) );
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator>
+edges( const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator_i Iter_i;
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator Iter;
+  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
+  return make_range( Iter(Iter_i(ncp.halfedges_begin())), Iter(Iter_i(ncp.halfedges_end()) ));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::in_edge_iterator>
+in_edges( typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
+          , const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::in_edge_iterator Iter;
+  return make_range(Iter(halfedge(u,p),p), Iter(halfedge(u,p),p,1));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::out_edge_iterator>
+out_edges( typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
+           , const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::out_edge_iterator Iter;
+  return make_range(Iter(halfedge(u,p),p), Iter(halfedge(u,p),p,1));
+}
+
+//
+// MutableHalfedgeGraph
+// 
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
+add_vertex(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  return g.hds().vertices_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex());
+}
+
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
+add_vertex(const typename boost::graph_traits<CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_property_type& p
+           , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  return g.hds().vertices_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex(p));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+remove_vertex(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
+             , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  g.hds().vertices_erase(v);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
+add_edge(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{ 
+  return typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor(
+    g.hds().edges_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge(), 
+                            typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge()));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+remove_edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor e
+            , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  g.hds().edges_erase(e.halfedge());
+}
+
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+set_target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h1
+         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
+         , CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  // set_face has become private in the halfedge provided by
+  // polyhedron for unknown reasons, although it used to be public
+  // once.
+
+  // We sneak in anyway. Inheritance can't keep us out.
+  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
+  static_cast<Sneak&>(*h1).set_vertex(v);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+set_next(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h1
+         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h2
+         , CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
+  static_cast<Sneak&>(*h1).set_next(h2);
+  static_cast<Sneak&>(*h2).set_prev(h1);
+}
+
+//
+// MutableFaceGraph 
+//
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor
+add_face(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  return g.hds().faces_push_back(typename CGAL::Polyhedron_3<Gt,I,HDS,A>::HalfedgeDS::Face());
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A, class InputIterator>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt, I, HDS, A> >::face_descriptor
+add_face(InputIterator begin, InputIterator end, CGAL::Polyhedron_3<Gt, I, HDS, A>& g)
+{
+  return g.hds().add_facet(begin, end);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+remove_face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
+            , CGAL::Polyhedron_3<Gt,I,HDS,A>& g) 
+{
+  g.hds().faces_erase(f);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+set_face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
+  , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  // set_face has become private in the halfedge provided by
+  // polyhedron for unknown reasons, although it used to be public
+  // once.
+
+  // We sneak in anyway. Inheritance can't keep us out.
+  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Halfedge::Base Sneak;
+  static_cast<Sneak&>(*h).set_face(f);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+set_halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
+  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+  , CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  typedef typename CGAL::Polyhedron_3<Gt, I, HDS, A>::Halfedge_data_structure Hds;
+  CGAL::HalfedgeDS_decorator<Hds> D(g.hds());
+  D.set_face_halfedge(f, h);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+void
+set_halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
+  , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+  , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  typedef typename CGAL::Polyhedron_3<Gt,I,HDS,A>::Vertex::Base Sneak;
+  static_cast<Sneak&>(*v).set_halfedge(h);
+}
+
+
+//
+// HalfedgeGraph
+//
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
+edge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{ 
+  return typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor(h);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor e
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{ 
+  return e.halfedge();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{ 
+  return v->halfedge();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+           , bool>
+halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
+         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{ 
+  std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
+             , bool> e = edge(u, v, g);
+  return std::make_pair(e.first.halfedge(), e.second);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+opposite(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return h->opposite();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
+source(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
+{
+  return target(opposite(h, g), g);
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor
+target(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return h->vertex();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+next(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor outedge
+     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return outedge->next();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+prev(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor outedge
+     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&)
+{
+  return outedge->prev();
+}
+
+
+//
+// HalfedgeListGraph
+//
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_iterator>
+halfedges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_iterator Iter;
+  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
+  return make_range(Iter(ncp.halfedges_begin()), Iter(ncp.halfedges_end()));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedges_size_type
+num_halfedges(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  return p.size_of_halfedges();
+}
+
+// FaceGraph
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor
+face(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor h
+     , const CGAL::Polyhedron_3<Gt,I,HDS,A>&) 
+{
+  return h->face();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
+halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::face_descriptor f
+         , const CGAL::Polyhedron_3<Gt,I,HDS,A>&) 
+{
+  return f->halfedge();
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+inline Iterator_range<typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::face_iterator >
+faces(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  typedef typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::face_iterator face_iterator;
+  CGAL::Polyhedron_3<Gt,I,HDS,A>& ncp = const_cast<CGAL::Polyhedron_3<Gt,I,HDS,A>&>(p);
+  return make_range( face_iterator(ncp.facets_begin()), face_iterator(ncp.facets_end()));
+}
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>::faces_size_type
+num_faces(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p)
+{
+  return p.size_of_facets();
+}
+
+
+
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+bool is_valid(const CGAL::Polyhedron_3<Gt,I,HDS,A>& p, bool verbose = false)
+{
+  return p.is_valid(verbose);
+}
+} // namespace CGAL
+
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+
+namespace CGAL {
+template<class Gt, class I, CGAL_HDS_PARAM_, class A>
+struct halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
+   : CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
+{
+  typedef CGAL::HDS_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> > Base;
+  typedef typename Gt::Point_3 Point;
+  typedef typename Base::edge_iterator undirected_edge_iterator;
+};
+} // namespace CGAL
+#include <CGAL/boost/graph/backward_compatibility_functions.h>
+
+namespace boost {
+  // The following functions were defined in the namespace boost
+  using CGAL::vertices;
+  using CGAL::edges;
+  using CGAL::num_vertices;
+  using CGAL::num_edges;
+  using CGAL::out_edges;
+  using CGAL::in_edges;
+  using CGAL::target;
+  using CGAL::source;
+} // namespace boost
+
+#endif //CGAL_NO_DEPRECATED_CODE
+
+#undef CGAL_HDS_PARAM_
+
+#include <CGAL/boost/graph/properties_Polyhedron_3.h>
+
+#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Surface_mesh.h
new file mode 100644
index 0000000..8e2a598
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Surface_mesh.h
@@ -0,0 +1,529 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Philipp Moeller
+
+#ifndef CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
+#define CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <CGAL/boost/graph/properties_Surface_mesh.h>
+#include <CGAL/boost/graph/iterator.h>
+
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/assertions.h>
+
+
+namespace boost {
+
+template <class P>
+struct graph_traits< CGAL::Surface_mesh<P> >
+{
+private:
+  typedef CGAL::Surface_mesh<P> SM;
+
+  struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                       public virtual boost::vertex_list_graph_tag,
+                                       public virtual boost::edge_list_graph_tag
+  {};
+
+public:
+  // Graph
+  typedef typename SM::Vertex_index                                        vertex_descriptor;
+  typedef typename SM::Point                                               vertex_property_type;
+  typedef typename SM::Edge_index  edge_descriptor;
+  typedef boost::undirected_tag                                            directed_category;
+  typedef boost::disallow_parallel_edge_tag                                edge_parallel_category; 
+  typedef SM_graph_traversal_category                                      traversal_category;
+
+  // HalfedgeGraph
+  typedef typename SM::halfedge_index              halfedge_descriptor;
+
+   // FaceGraph
+  typedef typename SM::face_index   face_descriptor;
+  
+  // VertexListGraph
+  typedef typename SM::Vertex_iterator   vertex_iterator;
+  typedef typename SM::size_type              vertices_size_type;
+  // EdgeListGraph
+  typedef typename SM::edge_iterator  edge_iterator;
+
+  typedef typename SM::size_type              edges_size_type;
+  // HalfEdgeListGraph
+  typedef typename SM::Halfedge_iterator halfedge_iterator;
+  typedef typename SM::size_type              halfedges_size_type;
+  // FaceListGraph
+  typedef typename SM::Face_iterator    face_iterator;
+  typedef typename SM::size_type              faces_size_type;
+
+  // IncidenceGraph
+  typedef typename SM::size_type              degree_size_type;
+
+  
+  typedef CGAL::In_edge_iterator<SM> in_edge_iterator;
+
+  typedef CGAL::Out_edge_iterator<SM> out_edge_iterator;
+
+  // nulls
+  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
+  static face_descriptor     null_face()   { return face_descriptor(); }
+  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
+};
+
+template<typename P>
+struct graph_traits< const CGAL::Surface_mesh<P> >  
+  : public graph_traits< CGAL::Surface_mesh<P> >
+{ };
+
+} // namespace boost
+
+namespace CGAL {
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertices_size_type
+num_vertices(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.num_vertices();
+}
+  
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::edges_size_type
+num_edges(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.num_edges();
+}
+  
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
+degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+       const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.degree(v);
+}
+
+         
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
+out_degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+           const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.degree(v);
+}
+             
+  
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::degree_size_type
+in_degree(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+          const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.degree(v);
+}
+            
+  
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+source(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
+       const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.source(e.halfedge());
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+source(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+       const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.source(h);
+}
+         
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
+       const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.target(e.halfedge());
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+       const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.target(h);
+}
+    
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_iterator>
+vertices(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.vertices(); 
+}
+
+ 
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_iterator>
+edges(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.edges(); 
+}
+
+
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::in_edge_iterator>
+in_edges(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+         const CGAL::Surface_mesh<P>& sm)
+{
+  typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::in_edge_iterator Iter;
+
+  return make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::out_edge_iterator>
+out_edges(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+          const CGAL::Surface_mesh<P>& sm)
+{
+  typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::out_edge_iterator Iter;
+  return make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template<typename P>
+std::pair<typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor,
+          bool>
+edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u, 
+     typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
+     const CGAL::Surface_mesh<P>& sm) {
+  typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor 
+    he(sm.halfedge(u, v));
+  return std::make_pair(he, he.is_valid());
+}
+
+
+//
+// HalfedgeGraph
+//
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+next(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+     const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.next(h);
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+prev(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+     const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.prev(h);
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+opposite(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+         const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.opposite(h);
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor
+edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+     const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.edge(h);
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e,
+         const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.halfedge(e);
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+         const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.halfedge(v);
+}
+
+
+template <typename P>
+std::pair<
+  typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor,
+  bool
+>
+halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u,
+         typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+         const CGAL::Surface_mesh<P>& sm)
+{
+  typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h = sm.halfedge(u, v);
+  return std::make_pair(h, h.is_valid());
+}
+
+
+
+//
+// HalfedgeListGraph
+//
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_iterator>
+halfedges(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.halfedges();
+}
+
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedges_size_type
+num_halfedges(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.num_halfedges();
+}
+
+
+
+//
+// MutableHalfedgeGraph
+//
+template<typename P>
+void
+set_next(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h1, 
+         typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h2,
+         CGAL::Surface_mesh<P>& sm)
+{
+  sm.set_next(h1, h2);
+}
+
+
+
+template<typename P>
+void
+set_target(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+           typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+           CGAL::Surface_mesh<P>& sm)
+{
+  sm.set_target(h, v);
+}
+
+
+template<typename P>
+void
+set_halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v,
+             typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+             CGAL::Surface_mesh<P>& sm)
+{
+  sm.set_halfedge(v, h);
+}
+
+
+template<typename P>
+void
+collect_garbage(CGAL::Surface_mesh<P>& sm)
+{
+  sm.collect_garbage();
+}
+
+template<typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor
+add_edge(CGAL::Surface_mesh<P>& sm)
+{
+  return sm.edge(sm.add_edge());
+}
+
+
+//
+// FaceGraph
+//
+template<typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
+     const CGAL::Surface_mesh<P>& sm) 
+{
+  return sm.halfedge(f);
+}
+  
+template<typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
+face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+     const CGAL::Surface_mesh<P>& sm) 
+{
+  return sm.face(h);
+}
+
+
+
+//
+// MutableFaceGraph
+//
+template<typename P>
+void
+set_face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+         typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
+         CGAL::Surface_mesh<P>& sm)
+{
+  sm.set_face(h, f);
+}
+
+  
+template<typename P>
+void
+set_halfedge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f,
+             typename boost::graph_traits<CGAL::Surface_mesh<P> >::halfedge_descriptor h,
+             CGAL::Surface_mesh<P>& sm)
+{
+  sm.set_halfedge(f, h);
+}
+
+ 
+//
+// FaceListGraph
+//
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::faces_size_type
+num_faces(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.num_faces();
+}
+  
+template <typename P>
+Iterator_range<typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_iterator>
+faces(const CGAL::Surface_mesh<P>& sm)
+{
+  return sm.faces(); 
+}
+ 
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+add_vertex(CGAL::Surface_mesh<P>& sm) {
+  return sm.add_vertex();
+}
+
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+add_vertex(const typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_property_type& p, CGAL::Surface_mesh<P>& sm) {
+  return sm.add_vertex(p);
+}
+
+/*
+// MutableGraph
+// add a vertex with a default constructed property
+template <typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor
+add_vertex(CGAL::Surface_mesh<P>& sm) {
+  return sm.add_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_property_type());
+}
+
+template <typename P>
+void
+clear_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor, 
+             CGAL::Surface_mesh<P>&) {
+  CGAL_assertion(false);
+}
+
+  */
+
+template <typename P>
+void
+remove_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
+              CGAL::Surface_mesh<P>& sm) {
+
+  sm.remove_vertex(v);
+}
+
+  
+template <typename P>
+void
+remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u, 
+            typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor v, 
+            CGAL::Surface_mesh<P>& sm) 
+{
+  typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e = edge(u, v, sm);
+  remove_edge(e,sm);
+}
+
+template <typename P>
+void
+remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descriptor e, 
+            CGAL::Surface_mesh<P>& sm) 
+{
+  sm.remove_edge(e);
+}
+
+
+template <typename P>
+void
+remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_iterator eiter, 
+            CGAL::Surface_mesh<P>& sm) 
+{
+  remove_edge(*eiter, sm);
+}
+
+template<typename P>
+void
+remove_face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor f, 
+            CGAL::Surface_mesh<P>& sm)
+{
+
+  sm.remove_face(f);
+}
+
+template<typename P>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
+add_face(CGAL::Surface_mesh<P>& sm)
+{
+  return sm.add_face();
+}
+
+template<typename P, typename InputIterator>
+typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
+add_face(InputIterator begin, InputIterator end, CGAL::Surface_mesh<P>& sm)
+{
+  std::vector<typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor> 
+    v(begin, end);
+  return sm.add_face(v);
+}
+
+template<typename P>
+bool is_valid(const CGAL::Surface_mesh<P>& sm, bool verbose = false)
+{
+  return sm.is_valid(verbose);
+}
+
+} // namespace CGAL
+
+
+
+
+
+#endif // CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h
new file mode 100644
index 0000000..53e6a57
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h
@@ -0,0 +1,614 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Philipp Moeller
+
+#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
+#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h>
+#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
+#include <CGAL/boost/graph/internal/OM_iterator_from_circulator.h>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/Iterator_range.h>
+#include <CGAL/boost/graph/helpers.h>
+#include <CGAL/assertions.h>
+
+#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
+
+// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4267)
+#endif
+
+namespace boost {
+
+template <class K>
+struct graph_traits< OpenMesh::TriMesh_ArrayKernelT<K> >
+{
+private:
+  typedef OpenMesh::TriMesh_ArrayKernelT<K> SM;
+
+  struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
+                                       public virtual boost::vertex_list_graph_tag,
+                                       public virtual boost::edge_list_graph_tag
+  {};
+
+public:
+  // Graph
+  typedef typename SM::VertexHandle                                        vertex_descriptor;
+  typedef typename SM::Point                                               vertex_property_type;
+  typedef typename CGAL::internal::OMesh_edge<typename SM::HalfedgeHandle> edge_descriptor;
+  typedef boost::undirected_tag                                            directed_category;
+  typedef boost::disallow_parallel_edge_tag                                edge_parallel_category; 
+  typedef SM_graph_traversal_category                                      traversal_category;
+
+  // HalfedgeGraph
+  typedef typename SM::HalfedgeHandle              halfedge_descriptor;
+
+   // FaceGraph
+  typedef typename SM::FaceHandle   face_descriptor;
+  
+  // VertexListGraph
+  typedef typename SM::VertexIter   vertex_iterator;
+  typedef unsigned int              vertices_size_type;
+  // EdgeListGraph
+  typedef boost::transform_iterator<
+    CGAL::internal::Convert_omesh_edge<typename SM::HalfedgeHandle, typename SM::EdgeHandle>,
+    typename SM::EdgeIter,
+    edge_descriptor>                edge_iterator;
+
+  typedef unsigned int              edges_size_type;
+  // HalfEdgeListGraph
+  typedef typename SM::HalfedgeIter halfedge_iterator;
+  typedef unsigned int              halfedges_size_type;
+  // FaceListGraph
+  typedef typename SM::FaceIter     face_iterator;
+  typedef unsigned int              faces_size_type;
+
+  // IncidenceGraph
+  typedef unsigned int              degree_size_type;
+
+  
+  typedef CGAL::In_edge_iterator<SM> in_edge_iterator;
+
+  typedef CGAL::Out_edge_iterator<SM> out_edge_iterator;
+
+  // nulls
+  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
+  static face_descriptor     null_face()   { return face_descriptor(); }
+  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
+};
+
+template<typename K>
+struct graph_traits< const OpenMesh::TriMesh_ArrayKernelT<K> >  
+  : public graph_traits< OpenMesh::TriMesh_ArrayKernelT<K> >
+{ };
+
+} // namespace boost
+
+namespace OpenMesh {
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertices_size_type
+num_vertices(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_vertices();
+}
+  
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edges_size_type
+num_edges(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_edges();
+}
+  
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::degree_size_type
+degree(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+       const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+
+         
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::degree_size_type
+out_degree(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+           const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+             
+  
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::degree_size_type
+in_degree(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+          const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.valence(v);
+}
+            
+  
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+source(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor e,
+       const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.from_vertex_handle(e.halfedge());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+source(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+       const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.from_vertex_handle(h);
+}
+         
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+target(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor e,
+       const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.to_vertex_handle(e.halfedge());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+target(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+       const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.to_vertex_handle(h);
+}
+    
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_iterator>
+vertices(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.vertices_sbegin(), sm.vertices_end()); 
+}
+
+ 
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_iterator>
+edges(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_iterator iterator;
+  iterator beg(sm.edges_sbegin());
+  iterator end(sm.edges_end());
+  return CGAL::make_range(beg,end); 
+}
+
+  
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::in_edge_iterator>
+in_edges(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::in_edge_iterator Iter;
+
+  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::out_edge_iterator>
+out_edges(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+          const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::out_edge_iterator Iter;
+  return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1));
+}
+
+
+template<typename K>
+std::pair<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor,
+          bool>
+edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor u, 
+     typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+     const OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+  typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor 
+    he(sm.find_halfedge(u, v));
+  return std::make_pair(he, he.is_valid());
+}
+
+
+//
+// HalfedgeGraph
+//
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+next(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.next_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+prev(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.prev_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+opposite(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+         const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.opposite_halfedge_handle(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor
+edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::TriMesh_ArrayKernelT<K>& /*sm*/)
+{
+  return typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor(h);
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor e,
+         const OpenMesh::TriMesh_ArrayKernelT<K>&)
+{
+  return e.halfedge();
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  if(sm.halfedge_handle(v) == boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::null_halfedge()){
+    return boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::null_halfedge();
+  }
+  // prev because OpenMesh stores out-going halfedges
+  // return sm.prev_halfedge_handle(sm.halfedge_handle(v));
+  return sm.opposite_halfedge_handle(sm.halfedge_handle(v));
+}
+
+
+template <typename K>
+std::pair<
+  typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor,
+  bool
+>
+halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor u,
+         typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+         const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h = sm.find_halfedge(u, v);
+  return std::make_pair(h, h.is_valid());
+}
+
+
+
+//
+// HalfedgeListGraph
+//
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_iterator>
+halfedges(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.halfedges_sbegin(), sm.halfedges_end());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedges_size_type
+num_halfedges(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_halfedges();
+}
+
+
+
+//
+// MutableHalfedgeGraph
+//
+template<typename K>
+void
+set_next(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h1, 
+         typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h2,
+         OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_next_halfedge_handle(h1, h2);
+}
+
+
+
+template<typename K>
+void
+set_target(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+           typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+           OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_vertex_handle(h, v);
+}
+
+
+template<typename K>
+void
+set_halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+             typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+             OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_halfedge_handle(v, sm.opposite_halfedge_handle(h));
+}
+
+
+template<typename K>
+void
+adjust_border_halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v,
+                       OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.adjust_outgoing_halfedge(v);
+}
+
+template<typename K>
+void
+garbage_collection(OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.garbage_collection();
+}
+
+template<typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor
+add_edge(OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return edge(sm.new_edge(boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::null_vertex(),
+                          boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::null_vertex() ), sm);
+}
+
+
+//
+// FaceGraph
+//
+template<typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor
+halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor f,
+     const OpenMesh::TriMesh_ArrayKernelT<K>& sm) 
+{
+  return sm.halfedge_handle(f);
+}
+  
+template<typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor
+face(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+     const OpenMesh::TriMesh_ArrayKernelT<K>& sm) 
+{
+  return sm.face_handle(h);
+}
+
+
+
+//
+// MutableFaceGraph
+//
+template<typename K>
+void
+set_face(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+         typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor f,
+         OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_face_handle(h, f);
+}
+
+  
+template<typename K>
+void
+set_halfedge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor f,
+             typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor h,
+             OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  sm.set_halfedge_handle(f, h);
+}
+
+ 
+//
+// FaceListGraph
+//
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::faces_size_type
+num_faces(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.n_faces();
+}
+  
+template <typename K>
+CGAL::Iterator_range<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_iterator>
+faces(const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::make_range(sm.faces_sbegin(), sm.faces_end()); 
+}
+ 
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+  return sm.new_vertex();
+}
+
+  /*
+
+// MutableGraph
+// add a vertex with a default constructed property
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+  return sm.add_vertex(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_property_type());
+}
+
+template <typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor
+add_vertex(const typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_property_type& p, OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+  return sm.add_vertex(p);
+}
+
+template <typename K>
+void
+clear_vertex(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor, 
+             OpenMesh::TriMesh_ArrayKernelT<K>&) {
+  CGAL_assert(false);
+}
+
+  */
+
+template <typename K>
+void
+remove_vertex(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+              OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  sm.set_halfedge_handle(v, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor());
+  sm.status(v).set_deleted(true);
+}
+
+  
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor u, 
+            typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v, 
+            OpenMesh::TriMesh_ArrayKernelT<K>& sm) 
+{
+  typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor e = edge(u, v, sm);
+  remove_edge(e,sm);
+}
+
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor e, 
+            OpenMesh::TriMesh_ArrayKernelT<K>& sm) 
+{
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  sm.request_edge_status();
+
+  typedef typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h1 = halfedge(e,sm);
+  halfedge_descriptor h2 = opposite(halfedge(e,sm),sm);
+  sm.status(sm.edge_handle(h1)).set_deleted(true);
+  sm.status(h1).set_deleted(true);
+  sm.status(h2).set_deleted(true);
+
+}
+
+
+template <typename K>
+void
+remove_edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_iterator eiter, 
+            OpenMesh::TriMesh_ArrayKernelT<K>& sm) 
+{
+  remove_edge(*eiter, sm);
+}
+
+template<typename K>
+void
+remove_face(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor f, 
+            OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+
+  sm.request_face_status();
+  sm.request_vertex_status();
+  sm.request_halfedge_status();
+  
+  set_halfedge(f, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor(), sm);
+  sm.status(f).set_deleted(true);
+}
+
+#if 0 // conflits with function in Euler_operations.h
+template<typename K>
+std::pair<typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor,
+          bool>
+add_edge(typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v1, 
+         typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor v2, 
+         OpenMesh::TriMesh_ArrayKernelT<K>& sm) {
+  
+  return sm.new_edge(v1, v2);
+}
+#endif
+
+template<typename K>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor
+add_face(OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return sm.new_face();
+}
+
+template<typename K, typename InputIterator>
+typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor
+add_face(InputIterator begin, InputIterator end, OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  typedef typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor vertex_descriptor;
+  assert(begin!= end);
+  vertex_descriptor u = *begin; 
+  ++begin;  
+  assert(begin!= end);
+    vertex_descriptor v = *begin; 
+  ++begin;  
+  assert(begin!= end);
+    vertex_descriptor w = *begin; 
+
+  return sm.add_face(u,v,w);
+}
+
+template<typename K>
+bool is_valid(OpenMesh::TriMesh_ArrayKernelT<K>& sm, bool /* verbose */ = false)
+{
+  return CGAL::is_valid_polygon_mesh(sm);
+}
+
+} // namespace OpenMesh
+
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+#include <CGAL/boost/graph/backward_compatibility_functions.h>
+
+namespace boost {
+  // The following functions were defined in the namespace boost
+  using OpenMesh::vertices;
+  using OpenMesh::edges;
+  using OpenMesh::num_vertices;
+  using OpenMesh::num_edges;
+  using OpenMesh::out_edges;
+  using OpenMesh::in_edges;
+  using OpenMesh::target;
+  using OpenMesh::source;
+} // namespace boost
+#endif //CGAL_NO_DEPRECATED_CODE
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_BOOST_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Triangulation_2.h
new file mode 100644
index 0000000..8c8e411
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/graph_traits_Triangulation_2.h
@@ -0,0 +1,873 @@
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+
+#ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
+#define CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
+
+#include <functional>
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/config.hpp>
+#include <boost/iterator_adaptors.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/properties.hpp>
+
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/Triangulation_2.h>
+#include <CGAL/Iterator_range.h>
+
+// The functions and classes in this file allows the user to
+// treat a CGAL Triangulation_2 object as a boost graph "as is". No
+// wrapper is needed for the Triangulation_2 object.
+
+
+namespace CGAL {
+
+  namespace detail {
+
+template < class T, class EdgeBase >
+class Edge : public EdgeBase {
+
+public:
+  typedef typename T::Face_handle Face_handle ;
+  
+  Edge()
+  {}
+
+  Edge(Face_handle  fh, int i)
+    : EdgeBase(fh,i)
+  {}
+  
+  Edge(const EdgeBase& e)
+    : EdgeBase(e)
+  {}
+
+  Edge(const Edge& e)
+    : EdgeBase(e)
+  {}
+
+  Edge&
+  operator=(const Edge& e)
+  {
+    this->first = e.first;
+    this->second = e.second;
+    return *this;
+  }
+
+  friend std::size_t hash_value(const Edge& e)
+  {
+    return hash_value(e.first);
+  }
+
+  bool operator==(const Edge& other) const
+  {
+    if((this->first == other.first)&&(this->second == other.second)) return true;
+    Face_handle fh = this->first->neighbor(this->second);
+    if(other.first != fh) return false;
+    int i = fh->index(this->first);
+    return (other.second == i);
+  }
+
+  bool operator!=(Edge& other) const
+  {
+    return ! (*this == other);
+  }
+};
+
+template <class Circ, class E>
+class Out_edge_circulator : public Circ
+{
+private:
+  mutable E e;
+
+public:
+
+  typedef E value_type;
+  typedef E* pointer;
+  typedef E& reference;
+
+  Out_edge_circulator()
+    : Circ()
+  {}
+
+  Out_edge_circulator(Circ c)
+    : Circ(c)
+  {}
+
+  const E& operator*() const
+  {
+    E ed = static_cast<const Circ*>(this)->operator*();
+    e = E(ed.first->neighbor(ed.second), ed.first->neighbor(ed.second)->index(ed.first));
+    return e;
+  }
+};
+ 
+template <class Circ, class E>
+class In_edge_circulator : public Circ
+{
+private:
+  mutable E e;
+
+public:
+
+  typedef E value_type;
+  typedef E* pointer;
+  typedef E& reference;
+
+  In_edge_circulator()
+    : Circ()
+  {}
+
+  In_edge_circulator(Circ c)
+    : Circ(c)
+  {}
+
+  const E& operator*() const
+{
+    typename Circ::value_type ed = static_cast<const Circ*>(this)->operator*();
+    e = E(ed);
+    return e;
+  }
+};
+  
+
+  //  The vertex iterator of the bgl must evaluate to a vertex handle, not to a vertex
+template < class T>
+class boost_all_vertices_iterator {
+protected:
+ typename T::All_vertices_iterator nt;
+public:
+  typedef typename T::All_vertices_iterator  Iterator;
+  typedef boost_all_vertices_iterator<T> Self;
+
+  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
+  typedef typename T::Vertex_handle  value_type;
+  typedef typename std::iterator_traits<Iterator>::difference_type           difference_type;
+  typedef value_type      reference;
+  typedef value_type      pointer;
+
+  // CREATION
+  // --------
+
+  boost_all_vertices_iterator()
+  {}
+
+  boost_all_vertices_iterator( Iterator j) : nt(j) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+
+  bool operator==( const Self& i) const { return ( nt == i.nt); }
+  bool operator!=( const Self& i) const { return !(nt == i.nt );   }
+  value_type  operator*() const  { return nt; }
+  value_type    operator->()  { return nt; }
+
+  Self& operator++() {
+    ++nt;
+    return *this;
+  }
+
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  Self& operator--() {
+    --nt;
+    return *this;
+  }
+
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+};
+
+template < class T>
+class boost_all_faces_iterator {
+protected:
+ typename T::All_faces_iterator nt;
+public:
+  typedef typename T::All_faces_iterator  Iterator;
+  typedef boost_all_faces_iterator<T> Self;
+
+  typedef typename std::iterator_traits<Iterator>::iterator_category iterator_category;
+  typedef typename T::Face_handle  value_type;
+  typedef typename std::iterator_traits<Iterator>::difference_type           difference_type;
+  typedef value_type      reference;
+  typedef value_type      pointer;
+
+  // CREATION
+  // --------
+
+  boost_all_faces_iterator()
+  {}
+
+  boost_all_faces_iterator( Iterator j) : nt(j) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+
+  bool operator==( const Self& i) const { return ( nt == i.nt); }
+  bool operator!=( const Self& i) const { return !(nt == i.nt );   }
+  value_type  operator*() const  { return nt; }
+  value_type    operator->()  { return nt; }
+
+  Self& operator++() {
+    ++nt;
+    return *this;
+  }
+
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  Self& operator--() {
+    --nt;
+    return *this;
+  }
+
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+};
+
+    
+    template <typename Tr>
+    struct T2_halfedge_descriptor
+    {
+      typedef typename Tr::Face_handle face_descriptor;
+      face_descriptor first;
+      int second;
+      operator std::pair<face_descriptor, int>() { return std::make_pair(first,second); }
+      
+      T2_halfedge_descriptor()
+      {}
+      
+      T2_halfedge_descriptor(const typename Tr::Edge& e)
+        : first(e.first), second(e.second)
+      {}
+      
+      T2_halfedge_descriptor(face_descriptor fd, int i)
+        : first(fd), second(i)
+      {}
+      
+      friend std::size_t hash_value(const T2_halfedge_descriptor& h)
+      {
+        return hash_value(h.first);
+      } 
+      
+      bool operator==(const T2_halfedge_descriptor& other) const
+      {
+        return (first == other.first) && (second == other.second);
+      }
+      
+      bool operator!=(const T2_halfedge_descriptor& other) const
+      {
+        return (first != other.first) || (second != other.second);
+      }
+
+      bool operator<(const T2_halfedge_descriptor& other) const
+      {
+        if(first < other.first) return true;
+        if(first > other.first) return false;
+        return second  < other.second;
+      }
+    };
+
+
+  } // namespace detail
+} // namespace CGAL
+
+namespace boost { 
+
+  template <class GT, class TDS>
+  struct graph_traits< CGAL::Triangulation_2<GT,TDS> > {
+
+    struct T2_graph_traversal_category : 
+      public virtual bidirectional_graph_tag,
+      public virtual adjacency_graph_tag,
+      public virtual edge_list_graph_tag,
+      public virtual vertex_list_graph_tag { };
+
+    typedef CGAL::Triangulation_2<GT,TDS> Triangulation;
+
+    typedef typename CGAL::Triangulation_2<GT,TDS>::Vertex_handle vertex_descriptor;
+    typedef typename CGAL::Triangulation_2<GT,TDS>::Face_handle face_descriptor;
+    typedef CGAL::detail::Edge<CGAL::Triangulation_2<GT,TDS>, typename CGAL::Triangulation_2<GT,TDS>::Edge>  edge_descriptor;
+    typedef typename CGAL::Triangulation_2<GT,TDS>::All_edges_iterator  edge_iterator;
+
+
+    typedef CGAL::detail::T2_halfedge_descriptor<Triangulation> halfedge_descriptor;
+
+    typedef typename CGAL::Triangulation_2<GT,TDS>::All_halfedges_iterator  halfedge_iterator;
+
+    typedef CGAL::detail::boost_all_vertices_iterator<Triangulation> vertex_iterator;
+    typedef CGAL::detail::boost_all_faces_iterator<Triangulation> face_iterator;
+    typedef CGAL::Counting_iterator<CGAL::detail::Out_edge_circulator<typename Triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > out_edge_iterator;
+    typedef CGAL::Counting_iterator<CGAL::detail::In_edge_circulator<typename Triangulation::Edge_circulator, edge_descriptor>, edge_descriptor > in_edge_iterator;
+    typedef CGAL::Counting_iterator<typename Triangulation::Vertex_circulator> Incident_vertices_iterator;
+    typedef Incident_vertices_iterator adjacency_iterator;
+
+    typedef undirected_tag directed_category;
+    typedef disallow_parallel_edge_tag edge_parallel_category; 
+    typedef T2_graph_traversal_category traversal_category;
+    typedef typename Triangulation::size_type size_type;
+    typedef size_type vertices_size_type;
+    typedef size_type edges_size_type;
+    typedef size_type halfedges_size_type;
+    typedef size_type faces_size_type;
+    typedef size_type degree_size_type;
+
+  // nulls
+  static vertex_descriptor   null_vertex() { return vertex_descriptor(); }
+  static face_descriptor     null_face()   { return face_descriptor(); }
+  static halfedge_descriptor     null_halfedge()   { return halfedge_descriptor(); }
+  };
+
+
+} // namespace boost
+
+
+namespace CGAL {
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  next(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+       const Triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
+    return halfedge_descriptor(e.first, g.ccw(e.second));
+  }
+
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  prev(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+       const Triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
+    return halfedge_descriptor(e.first, g.cw(e.second));
+  }
+
+  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  opposite(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+       const Triangulation_2<Gt,Tds>& g)
+  {
+    
+    return g.mirror_edge(e);
+  }
+  
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
+  source(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
+         const Triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.ccw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
+  target(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
+         const Triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.cw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
+  source(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+         const Triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.ccw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor
+  target(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+         const Triangulation_2<Gt,Tds>& g)
+  {
+    return e.first->vertex(g.cw(e.second));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor
+  face(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+         const Triangulation_2<Gt,Tds>&)
+  {
+    return e.first;
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor f,
+           const Triangulation_2<Gt,Tds>&)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
+    return halfedge_descriptor(f,0);
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor v,
+           const Triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_descriptor face_descriptor;
+    face_descriptor fd = v->face();
+    int i = fd->index(v);
+    return halfedge_descriptor(fd,g.ccw(i));
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor
+  halfedge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor e,
+           const Triangulation_2<Gt,Tds>&)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor halfedge_descriptor;
+    return halfedge_descriptor(e.first,e.second);
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor
+  edge(typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_descriptor e,
+           const Triangulation_2<Gt,Tds>&)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_descriptor edge_descriptor;
+    return edge_descriptor(e.first,e.second);
+  }
+
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_iterator>  
+  vertices(const Triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_iterator
+      Iter;
+    return make_range( Iter(g.all_vertices_begin()), Iter(g.all_vertices_end()) );
+  }
+
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edge_iterator>  
+  edges(const Triangulation_2<Gt,Tds>& g)
+  {    
+    return make_range(g.all_edges_begin(), g.all_edges_end());
+  }
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedge_iterator >  
+  halfedges(const Triangulation_2<Gt,Tds>& g)
+  {    
+    return make_range(g.all_halfedges_begin(), g.all_halfedges_end());
+  }
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_iterator >  
+  faces(const Triangulation_2<Gt,Tds>& g)
+  {
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >::face_iterator
+      Iter;
+    return make_range( Iter(g.all_faces_begin()), Iter(g.all_faces_end()) );
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
+  out_degree(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::out_edge_iterator >  
+  out_edges(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename Triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
+      ::out_edge_iterator Iter;
+    
+    return make_range( Iter(ec), Iter(ec,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::in_edge_iterator >  
+  in_edges(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename Triangulation_2<Gt,Tds>::Edge_circulator ec(u,u->face());
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
+      ::in_edge_iterator Iter;
+    return make_range( Iter(ec), Iter(ec,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  inline Iterator_range<typename boost::graph_traits< Triangulation_2<Gt,Tds> >::adjacency_iterator>  
+  adjacent_vertices(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename Triangulation_2<Gt,Tds>::Vertex_circulator vc = out_edge_iterator(u,u.face());
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type out_deg = out_degree(u,g);
+    typedef typename boost::graph_traits< Triangulation_2<Gt,Tds> >
+      ::adjacency_iterator Iter;
+    return make_range( Iter(vc), Iter(vc,out_deg) );
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertices_size_type
+  num_vertices(const Triangulation_2<Gt,Tds>& g)
+  {
+    return g.tds().number_of_vertices();
+  }  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::edges_size_type
+  num_edges(const Triangulation_2<Gt,Tds>& g)
+  {
+
+    return  g.tds().number_of_vertices() + g.tds().number_of_faces() - 2;
+  }  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::halfedges_size_type
+  num_halfedges(const Triangulation_2<Gt,Tds>& g)
+  {
+    return  num_edges(g) * 2;
+  }  
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::faces_size_type
+  num_faces(const Triangulation_2<Gt,Tds>& g)
+  {
+    return  g.tds().number_of_faces();
+  } 
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
+  in_degree(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+  template <class Gt, class Tds>
+  typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type
+  degree(
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::vertex_descriptor u, 
+    const Triangulation_2<Gt,Tds>& g)
+  {
+    typename boost::graph_traits< Triangulation_2<Gt,Tds> >::degree_size_type deg = 0;
+    typename Triangulation_2<Gt,Tds>::Edge_circulator c = g.incident_edges(u), done(c);
+    if ( c != 0) {
+        do {
+            ++deg;
+        } while (++c != done);
+    }
+    return deg;
+  }
+
+
+  // property maps
+  template <class Gt, class Tds>
+  class T2_vertex_id_map
+    : public boost::put_get_helper<int, T2_vertex_id_map<Gt,Tds> >
+  {
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef int value_type;
+    typedef int reference;
+    typedef typename CGAL::Triangulation_2<Gt,Tds>::Vertex_handle key_type;
+    
+    T2_vertex_id_map()
+    {}
+    
+    long operator[](key_type vh) const {
+      return vh->id(); 
+    }
+  };
+
+  template <class Gt, class Tds>
+  class T2_vertex_point_map
+  {
+  public:
+    typedef boost::lvalue_property_map_tag category;
+    typedef typename Tds::Vertex::Point value_type;
+    typedef value_type& reference;
+    typedef typename CGAL::Triangulation_2<Gt,Tds>::Vertex_handle key_type;
+
+    friend reference get(T2_vertex_point_map<Gt,Tds>, key_type vh)
+    { 
+      return vh->point(); 
+    }
+    friend void put(T2_vertex_point_map<Gt,Tds>, key_type vh, reference v)
+    {
+      vh->point()=v; 
+    }
+    reference operator[](key_type vh) const {
+      return vh->point();
+    }
+  };
+
+
+  template <class Gt, class Tds>
+  class T2_edge_id_map
+    : public boost::put_get_helper<int, T2_edge_id_map<Gt,Tds> >
+  {
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef int value_type;
+    typedef int reference;
+    typedef typename CGAL::Triangulation_2<Gt,Tds>::Edge key_type;
+    
+    T2_edge_id_map()
+    {}
+    
+    long operator[](key_type e) const {
+      return (3 * e.first.id()) + e.second; 
+    }
+  };
+
+  template <class Gt, class Tds>
+  class T2_edge_weight_map
+    : public boost::put_get_helper<typename Gt::FT, T2_edge_weight_map<Gt, Tds> >
+  {
+  private:
+    const CGAL::Triangulation_2<Gt,Tds>& tr;
+  public:
+    typedef boost::readable_property_map_tag category;
+    typedef typename Gt::FT value_type;
+    typedef value_type reference;
+    typedef typename CGAL::Triangulation_2<Gt,Tds>::Edge key_type;
+
+    T2_edge_weight_map(const CGAL::Triangulation_2<Gt,Tds>& tr_) 
+      : tr(tr_) 
+    { }
+
+    value_type operator[](key_type e) const {
+      return tr.segment(e).squared_length();
+    }
+  };
+
+
+  template <class Gt, class Tds>
+  inline T2_vertex_id_map<Gt,Tds>
+  get(boost::vertex_index_t, const Triangulation_2<Gt,Tds>&) {
+    T2_vertex_id_map<Gt,Tds> m;
+    return m;
+  }
+
+  template <class Gt, class Tds>
+  inline T2_vertex_point_map<Gt,Tds>
+  get(boost::vertex_point_t, const Triangulation_2<Gt,Tds>&) {
+    T2_vertex_point_map<Gt,Tds> m;
+    return m;
+  }
+
+  template <class Gt, class Tds>
+  inline T2_edge_id_map<Gt,Tds>
+  get(boost::edge_index_t, const Triangulation_2<Gt,Tds>&) {
+    T2_edge_id_map<Gt,Tds> m;
+    return m;
+  }
+
+  template <class Gt, class Tds>
+  inline T2_edge_weight_map<Gt,Tds>
+  get(boost::edge_weight_t, const Triangulation_2<Gt,Tds>& g) {
+    T2_edge_weight_map<Gt,Tds> m(g);
+    return m;
+  }
+
+  template <class Tag>
+  struct T2_property_map { };
+
+  template <>
+  struct T2_property_map<boost::vertex_index_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef T2_vertex_id_map<Gt,Tds> type;
+      typedef T2_vertex_id_map<Gt,Tds> const_type;
+    };
+  };
+
+
+
+  template <>
+  struct T2_property_map<boost::vertex_point_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef T2_vertex_point_map<Gt,Tds> type;
+      typedef T2_vertex_point_map<Gt,Tds> const_type;
+    };
+  };
+
+
+  template <>
+  struct T2_property_map<boost::edge_index_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef T2_edge_id_map<Gt,Tds> type;
+      typedef T2_edge_id_map<Gt,Tds> const_type;
+    };
+  };
+
+
+  template <>
+  struct T2_property_map<boost::edge_weight_t> {
+    template <class Gt, class Tds>
+    struct bind_ {
+      typedef T2_edge_weight_map<Gt,Tds> type;
+      typedef T2_edge_weight_map<Gt,Tds> const_type;
+    };
+  };
+
+} // namespace CGAL
+
+namespace boost {
+  // g++ 'enumeral_type' in template unification not implemented workaround
+  template <class Gt, class Tds, class Tag>
+  struct property_map<CGAL::Triangulation_2<Gt,Tds>, Tag> {
+    typedef typename 
+    CGAL::T2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
+    typedef typename map_gen::type type;
+    typedef typename map_gen::const_type const_type;
+  };
+
+  // see struct property_map in Polyehdron for an explanation
+  template <class Gt, class Tds, class Tag>
+  struct property_map<const CGAL::Triangulation_2<Gt,Tds>, Tag> {
+    typedef typename 
+    CGAL::T2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
+    typedef typename map_gen::type type;
+    typedef typename map_gen::const_type const_type;
+  };
+
+} // namespace boost
+
+
+namespace CGAL {
+
+  template <class Gt, class Tds, class PropertyTag, class Key>
+  inline
+  typename boost::property_traits<
+    typename boost::property_map<Triangulation_2<Gt,Tds>,PropertyTag>::const_type>::value_type
+  get(PropertyTag p, const Triangulation_2<Gt,Tds>& g, const Key& key) {
+    return get(get(p, g), key);
+  }
+  
+  template <class Gt, class Tds, class PropertyTag, class Key,class Value>
+  inline void
+  put(PropertyTag p, Triangulation_2<Gt,Tds>& g, 
+      const Key& key, const Value& value)
+  {
+    typedef typename boost::property_map<Triangulation_2<Gt,Tds>, PropertyTag>::type Map;
+    Map pmap = get(p, g);
+    put(pmap, key, value);
+  }
+
+} // namespace CGAL 
+
+namespace boost {
+
+  // What are those needed for ???
+  template <typename Gt, typename Tds>
+  struct edge_property_type<CGAL::Triangulation_2<Gt,Tds> > {
+    typedef void type;
+  };  
+
+  template <typename Gt, typename Tds>
+  struct vertex_property_type<CGAL::Triangulation_2<Gt,Tds> > {
+    typedef void type;
+  };
+} // namespace boost
+
+
+namespace std {
+
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4099) // For VC10 it is class hash 
+#endif
+
+#ifndef CGAL_CFG_NO_STD_HASH
+
+  template < class T, class EdgeBase>
+  struct hash<CGAL::detail::Edge<T,EdgeBase> > {
+    std::size_t operator()(const CGAL::detail::Edge<T,EdgeBase>& e) const
+    {
+      std::cerr << "Triangulation_2::Edge HashFct" << std::endl;
+      return hash_value(e);
+    }
+  }; 
+
+  template < class Tr>
+  struct hash<CGAL::detail::T2_halfedge_descriptor<Tr> > {
+    std::size_t operator()(const CGAL::detail::T2_halfedge_descriptor<Tr>& e) const
+    {
+      std::cerr << "Triangulation_2::halfedge_descriptor HashFct" << std::endl;
+      return hash_value(e);
+    }
+  };
+
+#endif // CGAL_CFG_NO_STD_HASH
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+} // namespace std
+
+//#include <CGAL/graph_traits_Delaunay_triangulation_2.h>
+
+#endif // CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/helpers.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/helpers.h
new file mode 100644
index 0000000..54db25a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/helpers.h
@@ -0,0 +1,722 @@
+// Copyright (c) 2014 GeometryFactory (France). All rights reserved.
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Andreas Fabri
+
+#ifndef CGAL_BOOST_GRAPH_HELPERS_H
+#define CGAL_BOOST_GRAPH_HELPERS_H
+
+
+#include <boost/foreach.hpp>
+#include <CGAL/boost/graph/iterator.h>
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/internal/Has_member_clear.h>
+
+namespace CGAL {
+
+  namespace Euler {
+
+    template< typename Graph>
+    void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
+                   Graph& g);
+  }
+
+/*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if the halfedge `hd` is on a border. 
+  */
+template <typename FaceGraph>
+bool is_border(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return face(hd,g) == boost::graph_traits<FaceGraph>::null_face();
+}
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if the halfedge `hd` or the opposite halfedge is on a border. 
+  */
+template <typename FaceGraph>
+bool is_border_edge(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return is_border(hd, g) || is_border(opposite(hd,g), g);
+}
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if the edge `e` is on a border. 
+  */
+template <typename FaceGraph>
+bool is_border(typename boost::graph_traits<FaceGraph>::edge_descriptor ed, const FaceGraph& g)
+{
+  return is_border_edge(halfedge(ed,g), g);
+}
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns a halfedge which is on a border and whose target vertex is `vd`, if such a halfedge exists. 
+  */
+template <typename FaceGraph>
+boost::optional<typename boost::graph_traits<FaceGraph>::halfedge_descriptor>
+is_border(typename boost::graph_traits<FaceGraph>::vertex_descriptor vd,
+          const FaceGraph& g)
+{
+  CGAL::Halfedge_around_target_iterator<FaceGraph> havib, havie;
+  for(boost::tie(havib, havie) = halfedges_around_target(halfedge(vd, g), g); havib != havie; ++havib) {
+    if(is_border(*havib,g)) {
+      typename boost::graph_traits<FaceGraph>::halfedge_descriptor h = *havib;
+      return h;
+    }
+  }
+  // empty
+  return boost::optional<typename boost::graph_traits<FaceGraph>::halfedge_descriptor>();
+}
+
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if there are no border edges. 
+  */
+template <typename FaceGraph>
+bool is_closed(const FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  BOOST_FOREACH(halfedge_descriptor hd, halfedges(g)){
+    if(is_border(hd,g)){
+      return false;
+    }
+  }
+  return true;
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if the target of `hd` has exactly two incident edges. 
+  */ 
+template <typename FaceGraph>
+bool is_bivalent(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return hd == opposite(next(opposite(next(hd,g),g),g),g);
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if all vertices have exactly two incident edges. 
+  */ 
+template <typename FaceGraph>
+  bool is_bivalent_mesh(const FaceGraph& g)  
+{
+  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  BOOST_FOREACH(vertex_descriptor vd, vertices(g)){
+    halfedge_descriptor hd = halfedge(vd,g);
+    if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
+       (! is_bivalent(hd,g))){
+      return false;
+    }
+  }
+  return true;
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if the target of `hd` has exactly three incident edges. 
+  */ 
+template <typename FaceGraph>
+bool is_trivalent(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return hd == opposite(next(opposite(next(opposite(next(hd,g),g),g),g),g),g);
+}
+	
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if all 
+    vertices have exactly three incident edges. 
+  */ 
+template <typename FaceGraph>
+  bool is_trivalent_mesh(const FaceGraph& g)  
+{
+  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  BOOST_FOREACH(vertex_descriptor vd, vertices(g)){
+    halfedge_descriptor hd = halfedge(vd,g);
+    if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
+       (! is_trivalent(halfedge(hd,g),g))){
+      return false;
+    }
+  }
+  return true;
+}
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the connected component denoted by `hd` is a triangle. 
+    \pre `g` must be valid.
+  */ 
+template <typename FaceGraph>
+  bool is_isolated_triangle(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)  
+{ 
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor beg = hd;
+  if(is_border(hd,g)) return false;
+  for(int i=0; i<3;i++){
+    if(! is_border(opposite(hd,g),g)) return false;
+    hd = next(hd,g);
+  }
+  return hd == beg;
+}
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the face denoted by `hd` is a triangle, that is it has three incident halfedges. 
+ */
+template <typename FaceGraph>
+bool is_triangle(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return hd == next(next(next(hd,g),g),g);
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if all faces are triangles. 
+  */ 
+template <typename FaceGraph>
+  bool is_triangle_mesh(const FaceGraph& g)  
+{
+  typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
+  BOOST_FOREACH(face_descriptor fd, faces(g)){
+    if(! is_triangle(halfedge(fd,g),g)){
+      return false;
+    }
+  }
+  return true;
+}
+
+/*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the connected component denoted by `hd` is a quadrilateral. 
+  */
+template <typename FaceGraph>
+bool is_isolated_quad(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+ typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor beg = hd;
+  if(is_border(hd,g)) return false;
+  for(int i=0; i<4;i++){
+    if(! is_border(opposite(hd,g),g)) return false;
+    hd = next(hd,g);
+  }
+  return hd == beg;
+}
+
+
+ /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the face denoted by `hd` is a quad, that is it has four incident halfedges. 
+ */
+template <typename FaceGraph>
+bool is_quad(typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)
+{
+  return hd == next(next(next(next(hd,g),g),g),g);
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` if all faces are quadrilaterals. 
+  */ 
+template <typename FaceGraph>
+  bool is_quad_mesh(const FaceGraph& g)  
+{
+    typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
+  BOOST_FOREACH(face_descriptor fd, faces(g)){
+    if(! is_quad(halfedge(fd,g),g)){
+      return false;
+    }
+  }
+  return true;
+}
+ 
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the connected component denoted by `hd` is a tetrahedron. 
+  */ 
+template <typename FaceGraph>
+bool is_tetrahedron( typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)   
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h1 = hd;
+  if(is_border(h1,g)) return false;
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor h2 = next(h1,g);
+  halfedge_descriptor h3 = next(h2,g);
+  halfedge_descriptor h4 = next(opposite(h1,g),g );
+  halfedge_descriptor h5 = next(opposite(h2,g),g );
+  halfedge_descriptor h6 = next(opposite(h3,g),g );
+  // check halfedge combinatorics.
+  // at least three edges at vertices 1, 2, 3.
+  if ( h4 == opposite(h3,g) ) return false;
+  if ( h5 == opposite(h1,g) ) return false;
+  if ( h6 == opposite(h2,g) ) return false;
+  // exact three edges at vertices 1, 2, 3.
+  if ( next(opposite(h4,g),g) != opposite(h3,g) ) return false;
+  if ( next(opposite(h5,g),g) != opposite(h1,g) ) return false;
+  if ( next(opposite(h6,g),g) != opposite(h2,g) ) return false;
+  // three edges at v4.
+  if ( opposite(next(h4,g),g) != h5 ) return false;
+  if ( opposite(next(h5,g),g) != h6 ) return false;
+  if ( opposite(next(h6,g),g) != h4 ) return false;
+  // All facets are triangles.
+  if ( next(next(next(h1,g),g),g) != h1 ) return false;
+  if ( next(next(next(h4,g),g),g) != h4 ) return false;
+  if ( next(next(next(h5,g),g),g) != h5 ) return false;
+  if ( next(next(next(h6,g),g),g) != h6 ) return false;
+  // all edges are non-border edges.
+  if ( is_border(h1,g) ) return false;  // implies h2 and h3
+  if ( is_border(h4,g) ) return false;
+  if ( is_border(h5,g) ) return false;
+  if ( is_border(h6,g) ) return false;
+  return true;
+  }
+
+template <typename FaceGraph>
+bool is_valid_halfedge_descriptor( typename boost::graph_traits<FaceGraph>::halfedge_descriptor h, const FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
+  face_descriptor f = face(h,g);
+  halfedge_descriptor done(h);
+  do{
+    if(face(h,g) != f){
+      std::cerr << "halfedge " << h << " is invalid\n";
+      return false;
+    }
+    halfedge_descriptor hn = h;
+    hn = next(h,g);
+    if(prev(hn,g) != h){
+      std::cerr << "halfedge " << h << " is invalid\n";
+      return false;
+    }
+    h = hn;
+  } while(h != done);
+  return true;
+}
+
+template <typename FaceGraph>
+bool is_valid_vertex_descriptor( typename boost::graph_traits<FaceGraph>::vertex_descriptor v, const FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor h = halfedge(v,g), done(h);
+  if(h == boost::graph_traits<FaceGraph>::null_halfedge()){
+    return true;
+  }
+  do{
+    if(target(h,g) != v){
+      std::cerr << "vertex " << v << " is invalid\n";
+      return false;
+    }
+    h = opposite(next(h,g),g);
+  }while(h != done);
+  return true;
+}
+
+template <typename FaceGraph>
+bool is_valid_face_descriptor( typename boost::graph_traits<FaceGraph>::face_descriptor f, const FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h = halfedge(f,g);
+  if(face(h,g) != f){
+    std::cerr << "face " << f << " is invalid\n";
+    return false;
+  }
+  return true;
+}
+
+
+template <typename FaceGraph>
+bool is_valid_polygon_mesh(const FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor   vertex_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::face_descriptor     face_descriptor;
+  BOOST_FOREACH(vertex_descriptor v, vertices(g)){
+    if(! is_valid_vertex_descriptor(v,g)){
+      return false;
+    }
+  }
+  BOOST_FOREACH(halfedge_descriptor h, halfedges(g)){
+    if(! is_valid_halfedge_descriptor(h,g)){
+      return false;
+    }
+  }
+  BOOST_FOREACH(face_descriptor f, faces(g)){
+    if(! is_valid_face_descriptor(f,g)){
+      return false;
+    }
+  }
+  return true;
+}
+
+  /*!
+   \ingroup PkgBGLHelperFct
+    returns `true` iff the connected component denoted by `hd` is a hexahedron. 
+  */ 
+template <typename FaceGraph>
+bool is_hexahedron( typename boost::graph_traits<FaceGraph>::halfedge_descriptor hd, const FaceGraph& g)   
+{
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h1 = hd;
+  if(is_border(h1,g)) return false;
+  typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
+  halfedge_descriptor h2 = next(h1,g);
+  halfedge_descriptor h3 = next(h2,g);
+  halfedge_descriptor h4 = next(h3,g);
+  halfedge_descriptor h1o = opposite(h1,g);
+  halfedge_descriptor h2o = opposite(h2,g);
+  halfedge_descriptor h3o = opposite(h3,g);
+  halfedge_descriptor h4o = opposite(h4,g);
+  if(opposite(next(h2o,g),g) != prev(h1o,g)) return false;
+  if(opposite(next(h3o,g),g) != prev(h2o,g)) return false;
+  if(opposite(next(h4o,g),g) != prev(h3o,g)) return false;
+  if(opposite(next(h1o,g),g) != prev(h4o,g)) return false;
+  if(! is_quad(h1,g)) return false;
+  if(! is_quad(h1o,g)) return false;
+  if(! is_quad(h2o,g)) return false;
+  if(! is_quad(h3o,g)) return false;
+  if(! is_quad(h4o,g)) return false;
+  h1o =next(next(h1o,g),g);
+  h2o =next(next(h2o,g),g);
+  h3o =next(next(h3o,g),g);
+  h4o =next(next(h4o,g),g);
+  if(next(opposite(h2o,g),g) != opposite(h1o,g)) return false;
+  if(next(opposite(h3o,g),g) != opposite(h2o,g)) return false;
+  if(next(opposite(h4o,g),g) != opposite(h3o,g)) return false;
+  if(next(opposite(h1o,g),g) != opposite(h4o,g)) return false;
+
+  if(! is_quad(opposite(h4o,g),g)) return false;
+  return true;
+}
+
+
+
+/** 
+ * \ingroup PkgBGLHelperFct
+ * Creates an isolated triangle with border edges in `g` having `p0`, `p1`, and `p2` as points and adds it to the graph `g`.
+ * \returns the non-border halfedge which has the target vertex associated with `p0`.
+ **/ 
+template<typename Graph, typename P>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+make_triangle(const P& p0, const P& p1, const P& p2, Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::vertex_descriptor               vertex_descriptor;
+  typedef typename Traits::face_descriptor                 face_descriptor;
+  typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
+  Point_property_map ppmap = get(CGAL::vertex_point, g);
+  vertex_descriptor v0, v1, v2;
+  v0 = add_vertex(g);
+  v1 = add_vertex(g);
+  v2 = add_vertex(g);
+
+  ppmap[v0] = p0;
+  ppmap[v1] = p1;
+  ppmap[v2] = p2;
+  halfedge_descriptor h0 = halfedge(add_edge(g),g);
+  halfedge_descriptor h1 = halfedge(add_edge(g),g);
+  halfedge_descriptor h2 = halfedge(add_edge(g),g);
+  set_next(h0, h1, g);
+  set_next(h1, h2, g);
+  set_next(h2, h0, g);
+  set_target(h0, v1, g);
+  set_target(h1, v2, g);
+  set_target(h2, v0, g);
+  set_halfedge(v1, h0, g);
+  set_halfedge(v2, h1, g);
+  set_halfedge(v0, h2, g);
+  face_descriptor f = add_face(g);
+  set_face(h0,f,g);
+  set_face(h1,f,g);
+  set_face(h2,f,g);
+  set_halfedge(f,h0,g);
+  h0 = opposite(h0,g);
+  h1 = opposite(h1,g);
+  h2 = opposite(h2,g);
+  set_next(h0, h2, g);
+  set_next(h2, h1, g);
+  set_next(h1, h0, g);
+  set_target(h0, v0, g);
+  set_target(h1, v1, g);
+  set_target(h2, v2, g);
+  set_face(h0, boost::graph_traits<Graph>::null_face(),g);
+  set_face(h1, boost::graph_traits<Graph>::null_face(),g);
+  set_face(h2, boost::graph_traits<Graph>::null_face(),g);
+  return opposite(h2,g);
+}
+
+/** 
+ * \ingroup PkgBGLHelperFct
+ * Creates an isolated quad with border edges in `g` having `p0`, `p1`, `p2`, and `p3` as points and adds it to the graph `g`.
+ * \returns the non-border halfedge which has the target vertex associated with `p0`.
+ **/ 
+template<typename Graph, typename P>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+make_quad(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::vertex_descriptor               vertex_descriptor;
+  typedef typename Traits::face_descriptor                 face_descriptor;
+  typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
+  Point_property_map ppmap = get(CGAL::vertex_point, g);
+  vertex_descriptor v0, v1, v2, v3;
+  v0 = add_vertex(g);
+  v1 = add_vertex(g);
+  v2 = add_vertex(g);
+  v3 = add_vertex(g);
+
+  ppmap[v0] = p0;
+  ppmap[v1] = p1;
+  ppmap[v2] = p2;
+  ppmap[v3] = p3;
+  halfedge_descriptor h0 = halfedge(add_edge(g),g);
+  halfedge_descriptor h1 = halfedge(add_edge(g),g);
+  halfedge_descriptor h2 = halfedge(add_edge(g),g);
+  halfedge_descriptor h3 = halfedge(add_edge(g),g);
+  set_next(h0, h1, g);
+  set_next(h1, h2, g);
+  set_next(h2, h3, g);
+  set_next(h3, h0, g);
+  set_target(h0, v1, g);
+  set_target(h1, v2, g);
+  set_target(h2, v3, g);
+  set_target(h3, v0, g);
+  set_halfedge(v1, h0, g);
+  set_halfedge(v2, h1, g);
+  set_halfedge(v3, h2, g);
+  set_halfedge(v0, h3, g);
+  face_descriptor f = add_face(g);
+  set_face(h0,f,g);
+  set_face(h1,f,g);
+  set_face(h2,f,g);
+  set_face(h3,f,g);
+  set_halfedge(f,h0,g);
+  h0 = opposite(h0,g);
+  h1 = opposite(h1,g);
+  h2 = opposite(h2,g);
+  h3 = opposite(h3,g);
+  set_next(h0, h3, g);
+  set_next(h3, h2, g);
+  set_next(h2, h1, g);
+  set_next(h1, h0, g);
+  set_target(h0, v0, g);
+  set_target(h1, v1, g);
+  set_target(h2, v2, g);
+  set_target(h3, v3, g);
+  set_face(h0, boost::graph_traits<Graph>::null_face(),g);
+  set_face(h1, boost::graph_traits<Graph>::null_face(),g);
+  set_face(h2, boost::graph_traits<Graph>::null_face(),g);
+  set_face(h3, boost::graph_traits<Graph>::null_face(),g);
+  return opposite(h3,g);
+}
+
+/** 
+ * \ingroup PkgBGLHelperFct
+ * Creates an isolated hexahedron in `g` having `p0`, `p1`, ...\ , and `p7` as points and adds it to the graph `g`.
+ * \returns the halfedge which has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, `p2`, and `p3`.
+ **/ 
+template<typename Graph, typename P>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
+                const P& p4, const P& p5, const P& p6, const P& p7, Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+
+  halfedge_descriptor hb = make_quad(p0, p1, p2, p3, g);
+  halfedge_descriptor ht = prev(make_quad(p4, p7, p6, p5, g),g);
+  for(int i=0; i <4; i++){
+    halfedge_descriptor h = halfedge(add_edge(g),g);
+    set_target(h,target(hb,g),g);
+    set_next(h,opposite(hb,g),g);
+    set_next(opposite(next(ht,g),g),h,g);
+    h = opposite(h,g);
+    set_target(h,target(ht,g),g);
+    set_next(h,opposite(ht,g),g);
+    set_next(opposite(next(hb,g),g),h,g);
+    hb = next(hb,g);
+    ht = prev(ht,g);
+  }
+  for(int i=0; i <4; i++){
+    Euler::fill_hole(opposite(hb,g),g);
+    hb = next(hb,g);
+  }
+  return hb;
+}
+/** 
+ * \ingroup PkgBGLHelperFct
+ * Creates an isolated tetrahedron in `g` having `p0`, `p1`, `p2`, and `p3` as points and adds it to the graph `g`.
+ * \returns the halfedge which has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, and `p2`.
+ **/ 
+template<typename Graph, typename P>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+make_tetrahedron(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>              Traits;
+  typedef typename Traits::halfedge_descriptor             halfedge_descriptor;
+  typedef typename Traits::vertex_descriptor               vertex_descriptor;
+  typedef typename Traits::face_descriptor                 face_descriptor;
+  typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
+
+  Point_property_map ppmap = get(CGAL::vertex_point, g);
+  vertex_descriptor v0, v1, v2, v3;
+  v0 = add_vertex(g);
+  v1 = add_vertex(g);
+  v2 = add_vertex(g);
+  v3 = add_vertex(g);
+
+  ppmap[v0] = p0;
+  ppmap[v1] = p1;
+  ppmap[v2] = p2;
+  ppmap[v3] = p3;
+  halfedge_descriptor h0 = halfedge(add_edge(g),g);
+  halfedge_descriptor h1 = halfedge(add_edge(g),g);
+  halfedge_descriptor h2 = halfedge(add_edge(g),g);
+  set_next(h0, h1, g);
+  set_next(h1, h2, g);
+  set_next(h2, h0, g);
+  set_target(h0, v1, g);
+  set_target(h1, v2, g);
+  set_target(h2, v0, g);
+  set_halfedge(v1, h0, g);
+  set_halfedge(v2, h1, g);
+  set_halfedge(v0, h2, g);
+  face_descriptor f = add_face(g);
+  set_face(h0,f,g);
+  set_face(h1,f,g);
+  set_face(h2,f,g);
+  set_halfedge(f,h0,g);
+  h0 = opposite(h0,g);
+  h1 = opposite(h1,g);
+  h2 = opposite(h2,g);
+  set_next(h0, h2, g);
+  set_next(h2, h1, g);
+  set_next(h1, h0, g);
+  set_target(h0, v0, g);
+  set_target(h1, v1, g);
+  set_target(h2, v2, g);
+  halfedge_descriptor h3 = halfedge(add_edge(g),g);
+  halfedge_descriptor h4 = halfedge(add_edge(g),g);
+  halfedge_descriptor h5 = halfedge(add_edge(g),g);
+  set_target(h3, v3, g);
+  set_target(h4, v3, g);
+  set_target(h5, v3, g);
+  set_halfedge(v3, h3, g);
+  
+  set_next(h0, h3, g);
+  set_next(h1, h4, g);
+  set_next(h2, h5, g);
+
+  set_next(h3, opposite(h4,g), g);
+  set_next(h4, opposite(h5,g), g);
+  set_next(h5, opposite(h3,g), g);
+  set_next(opposite(h4,g), h0, g);
+  set_next(opposite(h5,g), h1, g);
+  set_next(opposite(h3,g), h2, g);
+
+  set_target(opposite(h3,g), v0, g);
+  set_target(opposite(h4,g), v1, g);
+  set_target(opposite(h5,g), v2, g);
+
+  f = add_face(g);
+  set_halfedge(f,h0,g);
+  set_face(h0, f, g);
+  set_face(h3, f, g);
+  set_face(opposite(h4,g), f, g);
+  f = add_face(g);
+  set_halfedge(f,h1,g);
+  set_face(h1, f, g);
+  set_face(h4, f, g);
+  set_face(opposite(h5,g), f, g);
+  f = add_face(g);
+  set_halfedge(f,h2,g);
+  set_face(h2, f, g);
+  set_face(h5, f, g);
+  set_face(opposite(h3,g), f, g);
+  
+  return opposite(h2,g);
+}
+
+
+namespace internal {
+
+template<typename FaceGraph>
+inline
+typename boost::enable_if<Has_member_clear<FaceGraph>, void>::type
+clear_impl(FaceGraph& g)
+{ g.clear(); }
+
+template<typename FaceGraph>
+inline
+typename boost::disable_if<Has_member_clear<FaceGraph>, void>::type
+clear_impl(FaceGraph& g)
+{
+  typedef typename boost::graph_traits<FaceGraph>::edge_descriptor     edge_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor   vertex_descriptor;
+  typedef typename boost::graph_traits<FaceGraph>::face_descriptor     face_descriptor;
+  BOOST_FOREACH(edge_descriptor ed, edges(g)) {
+    remove_edge(ed, g);
+  }
+  BOOST_FOREACH(vertex_descriptor vd, vertices(g)) {
+    remove_vertex(vd, g);
+  }
+  BOOST_FOREACH(face_descriptor fd, faces(g)) {
+    remove_face(fd, g);
+  }
+}
+
+}
+
+/**
+ * \ingroup PkgBGLHelperFct
+ *
+ * removes all vertices, faces and halfedges from a graph. Calls
+ * `remove_edge()`, `remove_vertex()`, and `remove_face()` for each
+ * edge, vertex or face.
+ *
+ * If the graph has a member function `clear`, it will be called
+ * instead.
+ * 
+ * @tparam FaceGraph model of `MutableHalfedgeGraph` and `MutableFaceGraph`
+ *
+ * @param g the graph to clear
+ *
+ **/
+template<typename FaceGraph>
+void clear(FaceGraph& g)
+{ 
+  internal::clear_impl(g); 
+  CGAL_postcondition(num_edges(g) == 0);
+  CGAL_postcondition(num_vertices(g) == 0);
+  CGAL_postcondition(num_faces(g) == 0);
+}
+
+
+} // namespace CGAL
+
+#endif // CGAL_BOOST_GRAPH_HELPERS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/Has_member_clear.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/Has_member_clear.h
new file mode 100644
index 0000000..89ad329
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/Has_member_clear.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2016 GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Philipp Moeller
+
+
+#ifndef CGAL_HAS_MEMBER_CLEAR_H
+#define CGAL_HAS_MEMBER_CLEAR_H
+
+namespace CGAL {
+namespace internal {
+
+template<class T>
+class Has_member_clear
+{
+private:
+  template<class U, U>
+  class check {};
+
+  template<class C>
+  static char f(check<void(C::*)(void), &C::clear>*);
+
+  template<class C>
+  static int f(...);
+public:
+  static const bool value = (sizeof(f<T>(0)) == sizeof(char));
+};
+
+}  // internal
+}  // cgal
+
+#endif /* CGAL_HAS_MEMBER_CLEAR_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/helpers.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/helpers.h
new file mode 100644
index 0000000..aeebc93
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/internal/helpers.h
@@ -0,0 +1,214 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Andread Fabri
+
+#ifndef CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
+#define CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/optional.hpp>
+#include <CGAL/boost/graph/iterator.h>
+
+namespace CGAL {
+
+// breaks a dependency loop between <CGAL/boost/graph/helpers.h>
+// and <CGAL/boost/graph/iterator.h>
+template <typename Graph> class Halfedge_around_target_iterator;
+
+namespace internal {
+
+template <typename Graph>
+void
+set_border(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+          , Graph& g)
+{
+  set_face(h, boost::graph_traits<Graph>::null_face(), g);
+}
+
+template <typename Graph>
+typename boost::graph_traits<Graph>::halfedge_descriptor
+copy(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+                    , Graph& g)
+{
+  typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor res = halfedge(e,g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor ropp = opposite(res, g);
+  typename boost::graph_traits<Graph>::halfedge_descriptor hopp = opposite(h, g);
+  set_target(res, target(h, g), g);
+  set_target(hopp, target(hopp, g), g);
+  set_face(res, face(h, g), g);
+  set_face(ropp, face(hopp, g), g);
+  // note that we cannot call set_next as it then would call set_prev on the  original
+  return res;
+ }
+
+
+template <typename Graph>
+void
+set_vertex_halfedge(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+                    , Graph& g)
+{ set_halfedge(target(h, g), h, g); }
+
+
+template <typename Graph>
+void
+close_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+          , Graph& g)
+{
+  // makes `opposite(h,g)' the successor of h.
+  set_next( h, opposite(h, g), g);
+}
+
+
+template <typename Graph>
+void
+close_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+          , typename boost::graph_traits<Graph>::vertex_descriptor const& v
+          , Graph& g)
+{
+  // makes `h->opposite()' the successor of h and sets the incident
+  // vertex of h to v.
+  set_next(h, opposite(h, g), g);
+  set_target(h, v, g);
+  set_halfedge(v, h, g);
+}
+
+template <typename Graph>
+void
+insert_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+           , typename boost::graph_traits<Graph>::halfedge_descriptor const& h2
+           , Graph& g)
+{
+  set_next(h, next(h2,g), g);
+  set_next(h2, opposite(h, g), g);
+  set_target(h, target(h2, g), g);
+}
+
+
+template <typename Graph>
+void
+remove_tip(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+           , Graph& g)
+{ 
+  set_next(h, next(opposite(next(h, g), g), g), g);
+}
+
+
+template <typename Graph>
+void 
+set_face_in_face_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h, 
+                      typename boost::graph_traits<Graph>::face_descriptor f, 
+                      Graph& g) 
+{
+  typename boost::graph_traits<Graph>::halfedge_descriptor end = h;
+  do {
+    set_face(h, f, g);
+    h = next(h, g);
+  } while ( h != end);
+}
+    
+
+template <typename Graph>
+void insert_halfedge(typename boost::graph_traits<Graph>::halfedge_descriptor const& h
+                     , typename boost::graph_traits<Graph>::halfedge_descriptor const& f
+                     , Graph& g)
+{
+  set_next(h, next(f, g), g);
+  set_next(f, h, g);
+  set_face(h, face(f, g), g);
+}
+
+template <typename Graph>
+std::size_t
+exact_num_vertices(const Graph& g)
+{ 
+  typename boost::graph_traits<Graph>::vertex_iterator beg, end;
+  boost::tie(beg,end) = vertices(g);
+  return std::distance(beg,end);
+ }
+
+template <typename Graph>
+std::size_t
+exact_num_halfedges(const Graph& g)
+{ 
+  typename boost::graph_traits<Graph>::halfedge_iterator beg, end;
+  boost::tie(beg,end) = halfedges(g);
+  return std::distance(beg,end);
+ }
+
+template <typename Graph>
+std::size_t
+exact_num_edges(const Graph& g)
+{ 
+  typename boost::graph_traits<Graph>::edge_iterator beg, end;
+  boost::tie(beg,end) = edges(g);
+  return std::distance(beg,end);
+ }
+
+template <typename Graph>
+std::size_t
+exact_num_faces(const Graph& g)
+{ 
+  typename boost::graph_traits<Graph>::face_iterator beg, end;
+  boost::tie(beg,end) = faces(g);
+  return std::distance(beg,end);
+}
+
+template<typename Graph>
+bool
+is_isolated(typename boost::graph_traits<Graph>::vertex_descriptor v,
+            Graph& g)
+{
+  return halfedge(v, g) == boost::graph_traits<Graph>::null_halfedge();
+}
+
+template<typename Graph>
+void
+adjust_incoming_halfedge(typename boost::graph_traits<Graph>::vertex_descriptor v,
+                         Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+
+  halfedge_descriptor h = halfedge(v, g);
+  halfedge_descriptor hh = h;
+  if (h != boost::graph_traits<Graph>::null_halfedge())
+  {
+    if (target(h, g) != v)
+    {
+      // wrong target, flip
+      h = opposite(h, g);
+      hh = h;
+      set_halfedge(v, h, g);
+    }
+    do
+    {
+      if(face(h, g)==boost::graph_traits<Graph>::null_face())
+      {
+        set_halfedge(v, h, g);
+        return;
+      }
+      h = opposite(next(h, g), g);
+    } while (h != hh);
+  }
+}
+
+
+} // internal
+} // CGAL
+
+
+#endif // CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/iterator.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/iterator.h
new file mode 100644
index 0000000..d27a36c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/iterator.h
@@ -0,0 +1,1369 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_BGL_ITERATORS_H
+#define CGAL_BGL_ITERATORS_H
+
+#include <stdexcept>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+
+#include <CGAL/Iterator_range.h>
+#include <CGAL/assertions.h>
+#include <CGAL/circulator_bases.h>
+#include <CGAL/boost/graph/internal/helpers.h>
+
+namespace CGAL {
+
+/// \cond SKIP_IN_MANUAL
+
+namespace internal {
+
+template <typename G>
+struct Edge {
+  const G* g; 
+
+  Edge()
+    : g(NULL)
+  {}
+
+  Edge(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::edge_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return edge(h, *g);
+  }
+};
+
+template <typename G>
+struct Opposite_edge {
+  const G* g; 
+
+  Opposite_edge()
+    : g(NULL)
+  {}
+
+  Opposite_edge(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::edge_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return edge(opposite(h,*g), *g);
+  }
+};
+
+template <typename G>
+struct Opposite_halfedge {
+  const G* g; 
+
+  Opposite_halfedge()
+    : g(NULL)
+  {}
+
+  Opposite_halfedge(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::halfedge_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return opposite(h,*g);
+  }
+};
+
+template <typename G>
+struct Target {
+  const G* g; 
+
+  Target()
+    : g(NULL)
+  {}
+
+  Target(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::vertex_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return target(h,*g);
+  }
+};
+
+template <typename G>
+struct Source {
+  const G* g; 
+
+  Source()
+    : g(NULL)
+  {}
+
+  Source(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::vertex_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return source(h,*g);
+  }
+};
+
+template <typename G>
+struct Face {
+  const G* g; 
+
+  Face()
+    : g(NULL)
+  {}
+
+  Face(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::face_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return face(h,*g);
+  }
+};
+template <typename G>
+struct Opposite_face {
+  const G* g; 
+
+  Opposite_face()
+    : g(NULL)
+  {}
+
+  Opposite_face(const G& g)
+    : g(&g)
+  {}
+
+  typedef typename boost::graph_traits<G>::face_descriptor result_type;
+  typedef typename boost::graph_traits<G>::halfedge_descriptor argument_type;
+
+  result_type operator()(argument_type h) const
+  {
+    return face(opposite(h,*g),*g);
+  }
+};
+} // namespace internal
+/// \endcond
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional iterator with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as source.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_iterator` `havi` with `h = *havi;` 
+ * the following holds: Either `++havi` is the past the end iterator, or `next(opposite(h,g),g) == *++havi`. 
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalIterator`
+ */
+template <typename Graph>
+class Halfedge_around_source_iterator {
+  typedef Halfedge_around_source_iterator Self;
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor vertex_descriptor;
+  typedef std::bidirectional_iterator_tag     iterator_category;
+  typedef halfedge_descriptor                 value_type;
+  typedef value_type*                         pointer;
+  typedef const value_type&                   reference;
+  typedef std::ptrdiff_t                      difference_type;
+
+private:  
+  halfedge_descriptor anchor, pos;
+  const Graph* g;
+  int      winding;
+#endif 
+  
+public:
+  Halfedge_around_source_iterator()
+    : anchor(), pos(), g(0)
+  {}
+
+  Halfedge_around_source_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
+    : anchor(hd), pos(hd), g(&g), winding((hd==halfedge_descriptor())?1:n)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_source_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base() == NULL)) ?
+      &Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator==( const Self& i) const {
+    CGAL_assertion( anchor == anchor);
+    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
+  }
+  
+  bool operator!=( const Self& i) const {
+    return !(*this == i);
+  }
+
+  bool operator== (void* ) const
+  {
+    return g == NULL;
+  }
+
+  reference operator*() const
+  {
+    return pos;
+  }
+
+  pointer operator->() const
+  {
+    return &pos;
+  }
+
+  Self& operator++() {
+    pos = next(opposite(pos,*g),*g);
+    if ( pos == anchor)
+      ++winding;
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+  Self& operator--() {
+    if ( pos == anchor)
+      --winding;
+    pos = opposite(prev(pos,*g),*g);
+    return *this;
+  }
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+#endif
+};
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional iterator with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as target.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_iterator` `havi` with `h = *havi;` 
+ * the following holds: Either `++havi` is the past the end iterator, or `opposite(next(h,g),g) == *++havi`. 
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalIterator`
+ */
+
+template <typename Graph>
+class Halfedge_around_target_iterator {
+  typedef Halfedge_around_target_iterator Self;
+
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor vertex_descriptor;
+  typedef std::bidirectional_iterator_tag     iterator_category;
+  typedef halfedge_descriptor                 value_type;
+  typedef value_type*                         pointer;
+  typedef const value_type&                   reference;
+  typedef std::ptrdiff_t                      difference_type;
+
+private:  
+  halfedge_descriptor anchor, pos;
+  const Graph* g;
+  int      winding;
+#endif 
+  
+public:
+  Halfedge_around_target_iterator()
+    : anchor(), pos(), g(0)
+  {}
+
+  Halfedge_around_target_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
+    : anchor(hd), pos(hd), g(&g), winding((hd==halfedge_descriptor())?1:n)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_target_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base() == NULL)) ?
+      &Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator==( const Self& i) const {
+    CGAL_assertion( anchor == anchor);
+    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
+  }
+  
+  bool operator!=( const Self& i) const {
+    return !(*this == i);
+  }
+
+  bool operator== (void* ) const
+  {
+    return g == NULL;
+  }
+
+  reference operator*() const
+  {
+    return pos;
+  }
+
+  pointer operator->() const
+  {
+    return &pos;
+  }
+
+  Self& operator++() {
+    pos = opposite(next(pos,*g),*g);
+    if ( pos == anchor)
+      ++winding;
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+  Self& operator--() {
+    if ( pos == anchor)
+      --winding;
+    pos = prev(opposite(pos,*g),*g);
+    return *this;
+  }
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+#endif
+};
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional iterator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges incident to the same face or border.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_iterator` `hafi` with  `h = *hafi` 
+ * the following holds: Either `++hafi` is the past the end iterator, or `next(h,g) == *++hafi`.
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalIterator`
+ */
+
+template <typename Graph>
+class Halfedge_around_face_iterator {
+#ifndef DOXYGEN_RUNNING 
+  typedef Halfedge_around_face_iterator Self;
+
+public:
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef std::bidirectional_iterator_tag      iterator_category;
+  typedef halfedge_descriptor                 value_type;
+  typedef value_type*                         pointer;
+  typedef value_type&                         reference;
+  typedef std::ptrdiff_t                      difference_type;
+  
+#endif
+  
+  Halfedge_around_face_iterator()
+    : pos(), g(0)
+  {}
+
+  Halfedge_around_face_iterator(halfedge_descriptor hd, const Graph& g, int n=0)
+    : anchor(hd), pos(hd), g(&g), winding((hd == halfedge_descriptor())?1:n)
+  {}
+#ifndef DOXYGEN_RUNNING
+  reference         operator *  ( )       { return  pos; }
+  const value_type& operator *  ( ) const { return  pos; }
+  pointer           operator -> ( )       { return &pos; }
+  const value_type* operator -> ( ) const { return &pos; }
+
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_face_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base() == NULL)) ?
+      &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator==( const Self& i) const {
+    CGAL_assertion( anchor == anchor);
+    return  ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
+  }
+
+  bool operator!=( const Self& i) const {
+    return !(*this == i);
+  }
+
+  Self& operator++() 
+  {
+    CGAL_assertion(g != NULL);
+    pos = next(pos,*g); 
+    if ( pos == anchor)
+      ++winding;
+    return *this;
+  }
+
+  Self operator++(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  Self& operator--() 
+  {
+    CGAL_assertion(g != NULL); 
+    if ( pos == anchor)
+      --winding;
+  
+    pos = prev(pos,*g);
+    return *this;
+  }
+
+  Self operator--(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+#endif
+private:
+  halfedge_descriptor anchor, pos;
+  const Graph* g;
+  int      winding;
+};
+
+
+template <typename Graph>
+class Halfedge_around_target_circulator;
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as source.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_circulator` `havc` with `h = *havc;` 
+ * the following holds: `next(opposite(h,g),g) == *++havc`. 
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+template <typename Graph>
+class Halfedge_around_source_circulator
+#ifndef DOXYGEN_RUNNING
+ : public boost::iterator_adaptor<
+             Halfedge_around_source_circulator<Graph>                    // Derived
+             , Halfedge_around_target_circulator<Graph>                  // Base
+             , typename boost::graph_traits<Graph>::halfedge_descriptor  // Value
+             , Bidirectional_circulator_tag                              // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::halfedge_descriptor  // Reference
+             >
+#endif
+{
+private:
+  internal::Opposite_halfedge<Graph> opp;
+
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+#endif
+
+public:
+
+#ifndef DOXYGEN_RUNNING
+  typedef std::size_t size_type;
+#endif
+
+  Halfedge_around_source_circulator()
+  {}
+
+  Halfedge_around_source_circulator(halfedge_descriptor hd, const Graph& g)
+    : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(opposite(hd,g),g)), opp(g)
+  {}
+
+  Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g)
+    : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(halfedge(vd,g),g)), opp(g)
+  {}
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_source_circulator::*bool_type)() const;
+  
+  void this_type_does_not_support_comparisons() const {}
+  
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Halfedge_around_source_circulator::this_type_does_not_support_comparisons : 0;
+  }
+  
+  bool operator== (void*) const
+  {
+    return this->base_reference() == NULL;
+  }
+  
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::halfedge_descriptor dereference() const { return opp(*this->base_reference()); }
+}; 
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%face_descriptor` over all faces incident to the same vertex.
+ * It circulates over the same halfedges as the `Halfedge_around_target_circulator`.
+ *
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+
+template <typename Graph>
+class Face_around_target_circulator
+#ifndef DOXYGEN_RUNNING
+  : public boost::iterator_adaptor<
+             Face_around_target_circulator<Graph>                    // Derived
+             , Halfedge_around_target_circulator<Graph>                  // Base
+             , typename boost::graph_traits<Graph>::face_descriptor  // Value
+             , Bidirectional_circulator_tag                              // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  internal::Face<Graph> fct;
+
+public:
+
+  Face_around_target_circulator()
+  {}
+
+  Face_around_target_circulator(halfedge_descriptor hd, const Graph& g)
+    : Face_around_target_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(hd,g)), fct(g)
+  {}
+#ifndef DOXYGEN_RUNNING
+  typedef std::size_t size_type;
+
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Face_around_target_circulator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Face_around_target_circulator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator== (void*) const
+  {
+    return this->base_reference() == NULL;
+  }
+
+
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
+#endif
+
+}; 
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges having the same vertex as target.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_circulator` `havc` with `h = *havc;` 
+ * the following holds: `opposite(next(h,g),g) == *++havc`. 
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+
+
+
+template <typename Graph>
+class Halfedge_around_target_circulator {
+  typedef Halfedge_around_target_circulator Self;
+
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef Bidirectional_circulator_tag        iterator_category;
+  typedef halfedge_descriptor                 value_type;
+  typedef value_type*                         pointer;
+  typedef value_type&                         reference;
+  typedef std::ptrdiff_t                      difference_type;
+  typedef std::size_t                         size_type;
+#endif 
+
+  Halfedge_around_target_circulator()
+    : g(0)
+  {}
+
+  Halfedge_around_target_circulator(halfedge_descriptor pos, const Graph& g)
+    : pos(pos), g(&g)
+  {}
+
+  Halfedge_around_target_circulator(vertex_descriptor vd, const Graph& g)
+    : pos(halfedge(vd,g)), g(&g)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  reference         operator *  ( )       { return  pos; }
+  const value_type& operator *  ( ) const { return  pos; }
+  pointer           operator -> ( )       { return &pos; }
+  const value_type* operator -> ( ) const { return &pos; }
+
+  bool       operator == ( const Self& other) const { return  g == other.g && pos == other.pos; }
+  bool       operator != ( const Self& other) const { return  g != other.g || pos != other.pos; }
+
+
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_target_circulator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (g == NULL)) ?
+      &Halfedge_around_target_circulator::this_type_does_not_support_comparisons : 0;
+  }
+
+
+  bool operator== (void* ) const
+  {
+    return g == NULL;
+  }
+
+ 
+  Self& operator++() 
+  {
+    CGAL_assertion(g != NULL);
+    pos = opposite(next(pos,*g),*g);
+    return *this;
+  }
+
+  Self operator++(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  Self& operator--() 
+  {
+    CGAL_assertion(g != NULL);
+    pos = prev(opposite(pos,*g),*g);
+    return *this;
+  }
+
+  Self operator--(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+#endif
+
+private:
+  halfedge_descriptor pos;
+  const Graph* g;
+};
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%halfedge_descriptor` over all halfedges incident to the same face or border.
+ * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_circulator` `hafc` with  `h = *hafc` 
+ * the following holds:  `next(h,g) == *++hafc`.
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+
+template <typename Graph>
+class Halfedge_around_face_circulator {
+  typedef Halfedge_around_face_circulator Self;
+
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef Bidirectional_circulator_tag        iterator_category;
+  typedef halfedge_descriptor                 value_type;
+  typedef value_type*                         pointer;
+  typedef value_type&                         reference;
+  typedef std::ptrdiff_t                      difference_type;
+  typedef std::size_t                         size_type;
+#endif 
+  
+  Halfedge_around_face_circulator()
+    : pos(), g(0)
+  {}
+
+  Halfedge_around_face_circulator(halfedge_descriptor pos, const Graph& g)
+    : pos(pos), g(&g)
+  {}
+#ifndef DOXYGEN_RUNNING
+  reference         operator *  ( )       { return  pos; }
+  const value_type& operator *  ( ) const { return  pos; }
+  pointer           operator -> ( )       { return &pos; }
+  const value_type* operator -> ( ) const { return &pos; }
+
+  bool       operator == ( const Self& other) const { return  g == other.g && pos == other.pos; }
+  bool       operator != ( const Self& other) const { return  g != other.g || pos != other.pos; }
+ 
+
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Halfedge_around_face_circulator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (g == NULL)) ?
+      &Halfedge_around_face_circulator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator== (void* ) const
+  {
+    return g == NULL;
+  }
+
+  Self& operator++() 
+  {
+    CGAL_assertion(g != NULL);
+    pos = next(pos,*g);
+    return *this;
+  }
+
+  Self operator++(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  Self& operator--() 
+  {
+    CGAL_assertion(g != NULL);
+    pos = prev(pos,*g);
+    return *this;
+  }
+
+  Self operator--(int) 
+  {
+    CGAL_assertion(g != NULL);
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+#endif
+
+private:
+  halfedge_descriptor pos;
+  const Graph* g;
+};
+
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all halfedges with vertex `source(h,g)` as source.
+ */
+template<typename Graph>
+Iterator_range<Halfedge_around_source_iterator<Graph> >
+halfedges_around_source(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g)
+{
+  typedef Halfedge_around_source_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all halfedges with vertex `v` as source.
+ */
+template<typename Graph>
+Iterator_range<Halfedge_around_source_iterator<Graph> >
+halfedges_around_source(typename boost::graph_traits<Graph>::vertex_descriptor v, Graph& g)
+{
+  return halfedges_around_source(opposite(halfedge(v,g),g),g);
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all halfedges with vertex `target(h,g)` as target. 
+ */
+template<typename Graph>
+Iterator_range<Halfedge_around_target_iterator<Graph> >
+halfedges_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Halfedge_around_target_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all halfedges with vertex `v` as target. 
+ */
+template<typename Graph>
+Iterator_range<Halfedge_around_target_iterator<Graph> >
+halfedges_around_target(typename boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g)
+{
+  return halfedges_around_target(halfedge(v,g),g);
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all halfedges incident to the same face or border as `h`. 
+ */
+template<typename Graph>
+Iterator_range<Halfedge_around_face_iterator<Graph> >
+halfedges_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Halfedge_around_face_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional iterator with value type `boost::graph_traits<Graph>::%face_descriptor`.
+ * It iterates over the same halfedges as the `Halfedge_around_face_iterator`,
+ * and provides the face descriptor associated to the opposite halfedge.  The face descriptor
+ * may be the null face, and it may be several times the same face descriptor.
+ *
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+template <typename Graph>
+class Face_around_face_iterator
+#ifndef DOXYGEN_RUNNING
+  : public boost::iterator_adaptor<
+            Face_around_face_iterator<Graph>                       // Derived
+             , Halfedge_around_face_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::face_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  internal::Opposite_face<Graph> fct;
+public:
+
+  Face_around_face_iterator()
+  {}
+
+  Face_around_face_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Face_around_face_iterator::iterator_adaptor_(Halfedge_around_face_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
+}; 
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator  with value type `boost::graph_traits<Graph>::%face_descriptor`.
+ * It circulates over the same halfedges as the `Halfedge_around_face_circulator`,
+ * and provides the face descriptor associated to the opposite halfedge.  The face descriptor
+ * may be the null face, and it may be several times the same face descriptor.
+ *
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+
+
+
+template <typename Graph>
+class Face_around_face_circulator
+{};
+
+
+template <typename Graph>
+class Face_around_target_iterator
+#ifndef DOXYGEN_RUNNING  
+  : public boost::iterator_adaptor<
+            Face_around_target_iterator<Graph>                       // Derived
+             , Halfedge_around_target_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::face_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::face_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+
+  internal::Face<Graph> fct;
+
+public:
+
+  Face_around_target_iterator()
+  {}
+
+  Face_around_target_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Face_around_target_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
+}; 
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all faces around  vertex `target(h,g)`. 
+ */
+template<typename Graph>
+Iterator_range<Face_around_target_iterator<Graph> >
+faces_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Face_around_target_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all edge-adjacent faces to the same face `face(h,g)`.
+ */
+template<typename Graph>
+Iterator_range<Face_around_face_iterator<Graph> >
+faces_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Face_around_face_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+template <typename Graph>
+class Vertex_around_face_circulator
+#ifndef DOXYGEN_RUNNING 
+  : public boost::iterator_adaptor<
+             Vertex_around_face_circulator<Graph>                    // Derived
+             , Halfedge_around_face_circulator<Graph>                  // Base
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
+             , Bidirectional_circulator_tag                              // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
+             >
+#endif
+{
+  internal::Target<Graph> fct;
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef std::size_t size_type;
+#endif
+
+  Vertex_around_face_circulator()
+  {}
+
+  Vertex_around_face_circulator(halfedge_descriptor h, const Graph& g)
+    : Vertex_around_face_circulator::iterator_adaptor_(Halfedge_around_face_circulator<Graph>(h,g)), fct(g)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Vertex_around_face_circulator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Vertex_around_face_circulator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator== (void*) const
+  {
+    return this->base_reference()== NULL;
+  }
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
+#endif
+}; 
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional iterator  with value type `boost::graph_traits<Graph>::%vertex_descriptor`
+ *  over all vertices incident to the same face or border.
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalIterator`
+ */
+template <typename Graph>
+class Vertex_around_face_iterator
+#ifndef DOXYGEN_RUNNING
+   : public boost::iterator_adaptor<
+            Vertex_around_face_iterator<Graph>                       // Derived
+             , Halfedge_around_face_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+
+  internal::Target<Graph> fct;
+public:
+
+  Vertex_around_face_iterator()
+  {}
+
+  Vertex_around_face_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Vertex_around_face_iterator::iterator_adaptor_(Halfedge_around_face_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Vertex_around_face_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Vertex_around_face_iterator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator== (void*) const
+  {
+    return this->base_reference()== NULL;
+  }
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
+#endif
+}; 
+
+
+template <typename Graph>
+class Opposite_edge_around_face_iterator
+#ifndef DOXYGEN_RUNNING
+  : public boost::iterator_adaptor<
+            Opposite_edge_around_face_iterator<Graph>                       // Derived
+             , Halfedge_around_face_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  internal::Opposite_edge<Graph> fct;
+public:
+
+  Opposite_edge_around_face_iterator()
+  {}
+
+  Opposite_edge_around_face_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Opposite_edge_around_face_iterator::iterator_adaptor_(Halfedge_around_face_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::edge_descriptor dereference() const { return fct(*this->base_reference()); }
+}; 
+
+template<typename Graph>
+Iterator_range<Opposite_edge_around_face_iterator<Graph> >
+opposite_edges_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Opposite_edge_around_face_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+
+
+
+/**
+ * \ingroup PkgBGLIterators
+ * A bidirectional circulator with value type `boost::graph_traits<Graph>::%vertex_descriptor` over all vertices adjacent to the same vertex.
+ * It circulates over the same halfedges as the `Halfedge_around_target_circulator`.
+ *
+ * \tparam Graph must be a model of the concept `HalfedgeGraph`
+ * \cgalModels `BidirectionalCirculator`
+ */
+
+template <typename Graph>
+class Vertex_around_target_circulator
+#ifndef DOXYGEN_RUNNING
+  : public boost::iterator_adaptor<
+            Vertex_around_target_circulator<Graph>                       // Derived
+             , Halfedge_around_target_circulator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
+             , Bidirectional_circulator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
+             >
+#endif
+{
+  internal::Source<Graph> fct;
+public:
+#ifndef DOXYGEN_RUNNING
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  typedef std::size_t size_type;
+#endif
+
+  Vertex_around_target_circulator()
+  {}
+
+  Vertex_around_target_circulator(halfedge_descriptor h, const Graph& g)
+    : Vertex_around_target_circulator::iterator_adaptor_(Halfedge_around_target_circulator<Graph>(h,g)), fct(g)
+  {}
+
+#ifndef DOXYGEN_RUNNING  
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Vertex_around_target_circulator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Vertex_around_target_circulator::this_type_does_not_support_comparisons : 0;
+  }
+
+  bool operator== (void*) const
+  {
+    return this->base_reference()== NULL;
+  }
+
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
+#endif
+}; 
+
+
+
+
+template <typename Graph>
+class Vertex_around_target_iterator
+#ifndef DOXYGEN_RUNNING
+  : public boost::iterator_adaptor<
+            Vertex_around_target_iterator<Graph>                       // Derived
+             , Halfedge_around_target_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::vertex_descriptor  // Reference
+             >
+#endif
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+  internal::Source<Graph> fct;
+
+public:
+
+  Vertex_around_target_iterator()
+  {}
+
+  Vertex_around_target_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Vertex_around_target_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+
+#ifndef DOXYGEN_RUNNING
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Vertex_around_target_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Vertex_around_target_iterator::this_type_does_not_support_comparisons : 0;
+  }
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::vertex_descriptor dereference() const { return fct(*this->base_reference()); }
+#endif
+}; 
+
+
+template <typename Graph>
+Iterator_range<Vertex_around_target_iterator<Graph> >
+adjacent_vertices(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Vertex_around_face_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+
+template <typename Graph>
+Iterator_range<Vertex_around_target_iterator<Graph> >
+adjacent_vertices(typename boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g)
+{
+  typedef Vertex_around_face_iterator<Graph> I;
+  return make_range(I(halfedge(v,g),g), I(halfedge(v,g),g,1));
+}
+
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all vertices adjacent to the vertex `target(h,g)`. 
+ */
+template <typename Graph>
+Iterator_range<Vertex_around_target_iterator<Graph> >
+vertices_around_target(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Vertex_around_target_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+template <typename Graph>
+Iterator_range<Vertex_around_target_iterator<Graph> >
+vertices_around_target(typename boost::graph_traits<Graph>::vertex_descriptor v, const Graph& g)
+{
+  typedef Vertex_around_target_iterator<Graph> I;
+  return make_range(I(halfedge(v,g),g), I(halfedge(v,g),g,1));
+}
+/**  
+ * \ingroup PkgBGLIterators
+ * returns an iterator range over all vertices adjacent to the face `face(h,g)`. 
+ */
+template <typename Graph>
+Iterator_range<Vertex_around_face_iterator<Graph> >
+vertices_around_face(typename boost::graph_traits<Graph>::halfedge_descriptor h, const Graph& g)
+{
+  typedef Vertex_around_face_iterator<Graph> I;
+  return make_range(I(h,g), I(h,g,1));
+}
+
+
+template <class Graph>
+class Out_edge_iterator
+  : public boost::iterator_adaptor<
+             Out_edge_iterator<Graph>                                // Derived
+             , Halfedge_around_target_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Reference
+             >
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+private:
+  internal::Opposite_edge<Graph> opp;
+public:
+  Out_edge_iterator()
+  {}
+  
+  Out_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : Out_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), opp(g) {}
+  
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (Out_edge_iterator::*bool_type)() const;
+  
+  void this_type_does_not_support_comparisons() const {}
+  
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &Out_edge_iterator::this_type_does_not_support_comparisons : 0;
+  }
+  
+  
+private:
+  friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::edge_descriptor dereference() const { return opp(*this->base_reference()); }
+};
+
+
+
+
+template <class Graph>
+class In_edge_iterator
+  : public boost::iterator_adaptor<
+             In_edge_iterator<Graph>                                 // Derived
+             , Halfedge_around_target_iterator<Graph>                // Base
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Value
+             , std::bidirectional_iterator_tag                       // CategoryOrTraversal
+             , typename boost::graph_traits<Graph>::edge_descriptor  // Reference
+             >
+{
+  typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
+private:
+  internal::Edge<Graph> fct;
+public:
+  In_edge_iterator()
+  {}
+  
+  In_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0)
+    : In_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator<Graph>(h,g,(h==halfedge_descriptor())?1:n)), fct(g)
+  {}
+
+  // design patter: "safe bool"
+  // will be replaced by explicit operator bool with C++11
+  typedef void (In_edge_iterator::*bool_type)() const;
+
+  void this_type_does_not_support_comparisons() const {}
+
+  operator bool_type() const
+  {
+    return (! (this->base_reference() == NULL)) ?
+      &In_edge_iterator::this_type_does_not_support_comparisons : 0;
+  }
+
+ private:
+    friend class boost::iterator_core_access;
+  typename  boost::graph_traits<Graph>::edge_descriptor dereference() const { return fct(*this->base_reference()); }
+};
+
+
+
+
+
+
+} // CGAL
+
+
+#endif /* CGAL_BGL_ITERATORS_H */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/named_function_params.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/named_function_params.h
new file mode 100644
index 0000000..37138c6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/named_function_params.h
@@ -0,0 +1,389 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// This file is part of the Boost Graph Library
+//
+// You should have received a copy of the License Agreement for the
+// Boost Graph Library along with the software; see the file LICENSE.
+// If not, contact Office of Research, University of Notre Dame, Notre
+// Dame, IN 46556.
+//
+// Permission to modify the code and to distribute modified code is
+// granted, provided the text of this NOTICE is retained, a notice that
+// the code was modified is included with the above COPYRIGHT NOTICE and
+// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
+// file is distributed with the modified code.
+//
+// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
+// By way of example, but not limitation, Licensor MAKES NO
+// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
+// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
+// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
+// OR OTHER RIGHTS.
+
+//=======================================================================
+// Copyright (c) 2007  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Fernando Cacciola
+
+
+
+#ifndef CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
+#define CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
+
+#include <CGAL/basic.h>
+
+#include <CGAL/boost/graph/properties.h>
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4172) // returning address of local variable or temporary
+#endif
+
+#include <boost/graph/named_function_params.hpp>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/version.hpp>
+
+// An explanation about the version hackery below: There is no real
+// API to introduce custom properties to the Graph API and the
+// internals have changed with Boost Version 1.51 and changes aren't
+// backward compatible. To work around that we carry around two
+// versions of cgal_bgl_named_params. One imitates the pre 1.51
+// bgl_named_params, the newer one hooks into the API through
+// inheritance and addition of the some partial specializations.
+
+#if BOOST_VERSION < 105100
+namespace boost{
+  template <typename Tag, typename Args, typename Def>
+  struct lookup_named_param_def {
+    typedef Def type;
+    static const Def& get(const Args&, const Def& def) {return def;}
+  };
+
+  template <typename T, typename Tag, typename Base, typename Def>
+  struct lookup_named_param_def<Tag, bgl_named_params<T, Tag, Base>, Def> {
+    typedef T type;
+    static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def&) {
+      return p.m_value;
+    }
+  };
+
+  template <typename Tag1, typename T, typename Tag, typename Base, typename Def>
+  struct lookup_named_param_def<Tag1, bgl_named_params<T, Tag, Base>, Def> {
+    typedef typename lookup_named_param_def<Tag1, Base, Def>::type type;
+    static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def& def) {
+      return lookup_named_param_def<Tag1, Base, Def>::get(p.m_base, def);
+    }
+  };
+} //end of namespace boost
+#endif
+
+namespace CGAL {
+
+  enum vertex_is_fixed_t             { vertex_is_fixed             } ;  
+  enum set_cache_policy_t            { set_cache_policy            } ;
+  enum get_cost_policy_t             { get_cost_policy             } ;
+  enum get_cost_policy_params_t      { get_cost_policy_params      } ;
+  enum get_placement_policy_t        { get_placement_policy        } ;
+  enum get_placement_policy_params_t { get_placement_policy_params } ;
+  enum edge_is_constrained_t         { edge_is_constrained        } ;
+  enum edge_is_constrained_params_t  { edge_is_constrained_params } ;
+  
+  template <typename T, typename Tag, typename Base = boost::no_property>
+  struct cgal_bgl_named_params : boost::bgl_named_params<T, Tag, Base>
+  {
+    typedef boost::bgl_named_params<T, Tag, Base> base;
+    typedef cgal_bgl_named_params self;
+
+    cgal_bgl_named_params(T v = T()) : base(v) {}
+    cgal_bgl_named_params(T v, const Base& b) : base(v, b) {}
+
+    template <typename IndexMap>
+    cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self>
+    vertex_index_map(const IndexMap& p) const 
+    {
+      typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename PointMap>
+    cgal_bgl_named_params<PointMap, vertex_point_t, self>
+    vertex_point_map(const PointMap& p) const 
+    {
+      typedef cgal_bgl_named_params<PointMap, vertex_point_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename IsFixedMap>
+    cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self>
+    vertex_is_fixed_map(const IsFixedMap& p) const 
+    {
+      typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename IndexMap>
+    cgal_bgl_named_params<IndexMap, boost::edge_index_t, self>
+    edge_index_map(const IndexMap& p) const 
+    {
+      typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t, self> Params;
+      return Params(p, *this);
+    }
+
+      template <typename IndexMap>
+    cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self>
+    halfedge_index_map(const IndexMap& p) const 
+    {
+      typedef cgal_bgl_named_params<IndexMap, boost::halfedge_index_t, self> Params;
+      return Params(p, *this);
+    }
+
+      template <typename IndexMap>
+    cgal_bgl_named_params<IndexMap, boost::face_index_t, self>
+    face_index_map(const IndexMap& p) const 
+    {
+      typedef cgal_bgl_named_params<IndexMap, boost::face_index_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename Visitor>
+    cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self>
+    visitor(const Visitor& p) const 
+    {
+      typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename SetCache>
+    cgal_bgl_named_params<SetCache, set_cache_policy_t, self>
+    set_cache(const SetCache& p) const 
+    {
+      typedef cgal_bgl_named_params<SetCache, set_cache_policy_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename GetCost>
+    cgal_bgl_named_params<GetCost, get_cost_policy_t, self>
+    get_cost(const GetCost& p) const 
+    {
+      typedef cgal_bgl_named_params<GetCost, get_cost_policy_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename GetCostParams>
+    cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self>
+    get_cost_params(const GetCostParams& p) const 
+    {
+      typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename GetPlacement>
+    cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self>
+    get_placement(const GetPlacement& p) const 
+    {
+      typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self> Params;
+      return Params(p, *this);
+    }
+    
+    template <typename GetPlacementParams>
+    cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self>
+    get_placement_params(const GetPlacementParams& p) const 
+    {
+      typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self> Params;
+      return Params(p, *this);
+    }
+
+    template <typename EdgeIsConstrained>
+    cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self>
+    edge_is_constrained_map(const EdgeIsConstrained& em) const
+    {
+      typedef cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t, self> Params;
+      return Params(em, *this);
+    }
+
+    template <typename EdgeIsConstrainedParams>
+    cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self>
+    edge_is_constrained_map_params(const EdgeIsConstrainedParams& em) const
+    {
+      typedef cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t, self> Params;
+      return Params(em, *this);
+    }
+  };
+
+#if BOOST_VERSION < 105100
+  template <class Tag1, class Tag2, class T1, class Base>
+  inline
+  typename boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type
+  get_param(const cgal_bgl_named_params<T1,Tag1,Base>& p, Tag2 tag2)
+  {
+    enum { match = boost::detail::same_property<Tag1,Tag2>::value };
+    typedef typename
+      boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type T2;
+    T2* t2 = 0;
+    typedef boost::detail::property_value_dispatch<match> Dispatcher;
+    return Dispatcher::const_get_value(p, t2, tag2);
+  }
+#endif
+
+
+  namespace parameters {
+
+  template <typename IndexMap>
+  cgal_bgl_named_params<IndexMap, boost::vertex_index_t>
+  vertex_index_map(IndexMap const& p) 
+  {
+    typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t> Params;
+    return Params(p);
+  }
+  
+  template <typename IndexMap>
+  cgal_bgl_named_params<IndexMap, boost::halfedge_index_t>
+  halfedge_index_map(IndexMap const& p) 
+  {
+    typedef cgal_bgl_named_params<IndexMap, boost::halfedge_index_t> Params;
+    return Params(p);
+  }
+  
+  template <typename IndexMap>
+  cgal_bgl_named_params<IndexMap, boost::face_index_t>
+  face_index_map(IndexMap const& p) 
+  {
+    typedef cgal_bgl_named_params<IndexMap, boost::face_index_t> Params;
+    return Params(p);
+  }
+  
+  template <typename PointMap>
+  cgal_bgl_named_params<PointMap, vertex_point_t>
+  vertex_point_map(PointMap const& p) 
+  {
+    typedef cgal_bgl_named_params<PointMap, vertex_point_t> Params;
+    return Params(p);
+  }
+
+  template <typename IsFixedMap>
+  cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t>
+  vertex_is_fixed_map(IsFixedMap const& p) 
+  {
+    typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t> Params;
+    return Params(p);
+  }
+  
+  template <typename IndexMap>
+  cgal_bgl_named_params<IndexMap, boost::edge_index_t>
+  edge_index_map(IndexMap const& pmap) 
+  {
+    typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t> Params;
+    return Params(pmap);
+  }
+
+  template <typename Visitor>
+  cgal_bgl_named_params<Visitor, boost::graph_visitor_t>
+  visitor(const Visitor& p) 
+  {
+    typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t> Params;
+    return Params(p);
+  }
+
+  template <typename SetCache>
+  cgal_bgl_named_params<SetCache, set_cache_policy_t>
+  set_cache(const SetCache& p) 
+  {
+    typedef cgal_bgl_named_params<SetCache, set_cache_policy_t> Params;
+    return Params(p);
+  }
+  
+  template <typename GetCost>
+  cgal_bgl_named_params<GetCost, get_cost_policy_t>
+  get_cost(const GetCost& p)
+  {
+    typedef cgal_bgl_named_params<GetCost, get_cost_policy_t> Params;
+     return Params(p);
+  }
+
+  template <typename GetCostParams>
+  cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t>
+  get_cost_params(const GetCostParams& p)
+  {
+    typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t> Params;
+    return Params(p);
+  }
+  
+  template <typename GetPlacement>
+  cgal_bgl_named_params<GetPlacement, get_placement_policy_t>
+  get_placement(const GetPlacement& p) 
+  {
+    typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t> Params;
+    return Params(p);
+  }
+  
+  template <typename GetPlacementParams>
+  cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t>
+  get_placement_params(const GetPlacementParams& p)
+  {
+    typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t> Params;
+    return Params(p);
+  }
+
+  template <typename EdgeIsConstrained>
+  cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t>
+  edge_is_constrained_map(const EdgeIsConstrained& em)
+  {
+    typedef cgal_bgl_named_params<EdgeIsConstrained, edge_is_constrained_t> Params;
+    return Params(em);
+  }
+
+  template <typename EdgeIsConstrainedParams>
+  cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t>
+  edge_is_constrained_map_params(const EdgeIsConstrainedParams& em)
+  {
+    typedef cgal_bgl_named_params<EdgeIsConstrainedParams, edge_is_constrained_params_t> Params;
+    return Params(em);
+  }
+
+  } // namespace parameters
+
+} //namespace CGAL
+
+// partial specializations hate inheritance and we need to repeat
+// those here. this is rather fragile.
+namespace boost {
+template <typename T, typename Tag, typename Base, typename Def>
+struct lookup_named_param_def<Tag, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
+  typedef T type;
+  static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def&) {
+    return p.m_value;
+  }
+};
+
+template <typename Tag1, typename T, typename Tag, typename Base, typename Def>
+struct lookup_named_param_def<Tag1, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
+  typedef typename lookup_named_param_def<Tag1, Base, Def>::type type;
+  static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def& def) {
+    return lookup_named_param_def<Tag1, Base, Def>::get(p.m_base, def);
+  }
+};
+} // boost
+
+#endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_CombinatorialMap.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_CombinatorialMap.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_CombinatorialMap.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_CombinatorialMap.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h
new file mode 100644
index 0000000..6cfffa3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h
@@ -0,0 +1,367 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Möller
+
+
+#ifndef CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H
+#define CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H
+
+#include <CGAL/assertions.h>
+#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <boost/mpl/if.hpp>
+
+namespace CGAL {
+
+template <typename Mesh, typename Descriptor, typename Value>
+class OM_pmap {
+public:
+  typedef typename boost::mpl::if_<boost::is_same<Descriptor, typename boost::graph_traits<Mesh>::vertex_descriptor>,
+                                   OpenMesh::VPropHandleT<Value>,
+                                   typename boost::mpl::if_<boost::is_same<Descriptor, typename boost::graph_traits<Mesh>::face_descriptor>,
+                                                            OpenMesh::FPropHandleT<Value>,
+                                                            typename boost::mpl::if_<boost::is_same<Descriptor, typename boost::graph_traits<Mesh>::halfedge_descriptor>,
+                                                                                     OpenMesh::HPropHandleT<Value>,
+                                                                                     OpenMesh::EPropHandleT<Value> >::type>::type>::type H;
+  
+  typedef boost::read_write_property_map_tag category;
+  
+  typedef Descriptor key_type;
+  typedef Value value_type;
+  
+  typedef value_type& reference;
+  
+  OM_pmap(Mesh& m)
+    : mesh(m)
+  {}
+  
+  OM_pmap(Mesh& m, H h)
+    : mesh(m), h(h)
+  {}
+  
+  inline friend reference get(const OM_pmap<Mesh,Descriptor,Value>& pm, key_type k)
+  {
+    return pm.mesh.property(pm.h,k);
+  }
+
+  inline friend void put(const OM_pmap<Mesh,Descriptor,Value>& pm, key_type k, const value_type& v)
+  {
+    pm.mesh.property(pm.h,k) = v;
+  }
+
+  reference operator[](key_type k)
+  {
+    return mesh.property(h,k);
+  }
+
+  H handle() const
+  {
+    return h;
+  }
+
+  H& handle()
+  {
+    return h;
+  }
+
+  Mesh& mesh;
+  H h;
+};
+
+
+template <typename OpenMesh>
+class OM_edge_weight_pmap 
+  : public boost::put_get_helper<typename OpenMesh::Scalar , OM_edge_weight_pmap<OpenMesh> >
+{
+public:
+  typedef boost::readable_property_map_tag                         category;
+  typedef typename OpenMesh::Scalar                                value_type;
+  typedef value_type                                               reference;
+  typedef typename boost::graph_traits<OpenMesh>::edge_descriptor  key_type;
+
+  OM_edge_weight_pmap(const OpenMesh& sm)
+    : sm_(sm)
+    {}
+
+  value_type operator[](const key_type& e) const
+  {
+    return sm_.calc_edge_length(e.halfedge());
+  }
+
+private:
+  const OpenMesh& sm_;
+};
+
+template <typename K, typename VEF>
+class OM_index_pmap : public boost::put_get_helper<unsigned int, OM_index_pmap<K,VEF> >
+{
+public:
+  typedef boost::readable_property_map_tag category;
+  typedef unsigned int                      value_type;
+  typedef unsigned int                      reference;
+  typedef VEF                              key_type;
+
+  value_type operator[](const key_type& vd) const
+  {
+    return vd.idx();
+  }
+};
+
+
+template<typename OpenMesh, typename P>
+class OM_point_pmap //: public boost::put_get_helper<bool, OM_point_pmap<OpenMesh> >
+{
+public:
+  typedef boost::read_write_property_map_tag category;
+#if defined(CGAL_USE_OM_POINTS)
+  typedef typename OpenMesh::Point             value_type;
+  typedef const typename OpenMesh::Point&      reference;
+#else
+  typedef P value_type;
+  typedef P reference;
+#endif
+  typedef typename boost::graph_traits<OpenMesh>::vertex_descriptor key_type;
+    
+  OM_point_pmap()
+    : sm_(NULL)
+  {}
+
+  OM_point_pmap(const OpenMesh& sm)
+    : sm_(&sm)
+    {}
+    
+  OM_point_pmap(const OM_point_pmap& pm)
+    : sm_(pm.sm_)
+    {}
+
+  value_type operator[](key_type v)
+  {
+#if defined(CGAL_USE_OM_POINTS)
+    return sm_->point(v);
+#else
+    CGAL_assertion(sm_!=NULL);
+    typename OpenMesh::Point const& omp = sm_->point(v);
+    return value_type(omp[0], omp[1], omp[2]);
+#endif
+  }
+
+  inline friend reference get(const OM_point_pmap<OpenMesh,P>& pm, key_type v)
+  {
+    CGAL_precondition(pm.sm_!=NULL);
+#if defined(CGAL_USE_OM_POINTS)
+    return pm.sm_->point(v);
+#else
+    CGAL_assertion(pm.sm_!=NULL);
+    typename OpenMesh::Point const& omp = pm.sm_->point(v);
+    return value_type(omp[0], omp[1], omp[2]);
+#endif
+  }
+
+  inline friend void put(const OM_point_pmap<OpenMesh,P>& pm, key_type v, const value_type& p)
+  {
+    CGAL_precondition(pm.sm_!=NULL);
+#if defined(CGAL_USE_OM_POINTS)
+    const_cast<OpenMesh&>(*pm.sm_).set_point(v,p);
+#else
+    const_cast<OpenMesh&>(*pm.sm_).set_point
+      (v, typename OpenMesh::Point((float)p[0], (float)p[1], (float)p[2]));
+#endif
+  }
+
+  private:
+  const OpenMesh* sm_;
+};
+
+
+} // CGAL
+
+// overloads and specializations in the boost namespace
+namespace boost {
+
+//
+// edge_weight
+//
+
+
+template <typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_weight_t >
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_edge_weight_pmap<Mesh> type;
+  typedef CGAL::OM_edge_weight_pmap<Mesh> const_type;
+};
+
+
+
+//
+// vertex_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::vertex_index_t >
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::vertex_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::vertex_descriptor> const_type;
+};
+
+
+//
+// face_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::face_index_t >
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::face_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::face_descriptor> const_type;
+};
+
+//
+// edge_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_index_t >
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::edge_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::edge_descriptor> const_type;
+};
+
+//
+// halfedge_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::halfedge_index_t >
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::halfedge_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::halfedge_descriptor> const_type;
+};
+
+
+template<typename K>
+struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::vertex_point_t >
+{
+  typedef CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_point_pmap<Mesh, P> type;
+  typedef type const_type;
+};
+
+} // namespace boost
+
+namespace OpenMesh {
+
+
+template <typename K>
+typename boost::property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::edge_weight_t>::const_type
+get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  return CGAL::OM_edge_weight_pmap<Mesh>(sm);
+}
+
+template <typename K>
+typename OpenMesh::PolyMesh_ArrayKernelT<K>::Scalar
+get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm, 
+    const typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor& e)
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  return CGAL::OM_edge_weight_pmap<Mesh>(sm)[e];
+}
+
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>
+get(const boost::vertex_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::vertex_descriptor>();
+}
+
+template <typename K>
+typename boost::property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::face_index_t>::const_type
+get(const boost::face_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
+{
+  typedef OpenMesh::PolyMesh_ArrayKernelT<K> Mesh;
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<Mesh>::face_descriptor>();
+}
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor>
+get(const boost::edge_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::edge_descriptor>();
+}
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>
+get(const boost::halfedge_index_t&, const OpenMesh::PolyMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>();
+}
+
+template<typename K>
+CGAL::OM_point_pmap<OpenMesh::PolyMesh_ArrayKernelT<K>,
+                    typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3>
+get(boost::vertex_point_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g) 
+{
+  typedef typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
+  return CGAL::OM_point_pmap<OpenMesh::PolyMesh_ArrayKernelT<K>, P>(g);
+}
+
+// get for intrinsic properties
+#define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE)                     \
+  template<typename K>                                              \
+  RET                                                                   \
+  get(PROP p, const OpenMesh::PolyMesh_ArrayKernelT<K>& sm,                      \
+      typename boost::graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >::TYPE x) \
+  { return get(get(p, sm), x); }                                        \
+
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::vertex_index_t, vertex_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::edge_index_t, edge_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::halfedge_index_t, halfedge_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::face_index_t, face_descriptor)
+  //  CGAL_OM_INTRINSIC_PROPERTY(std::size_t, boost::halfedge_index_t, face_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3, boost::vertex_point_t, vertex_descriptor)
+
+#undef CGAL_OM_INTRINSIC_PROPERTY
+
+// put for intrinsic properties
+// only available for vertex_point
+
+template<typename K>
+void
+put(boost::vertex_point_t p, OpenMesh::PolyMesh_ArrayKernelT<K>& g,
+    typename boost::graph_traits< OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor vd,
+    const typename K::Point& point) 
+{
+  put(get(p,g), vd, point);
+}
+
+
+} // namespace OpenMesh
+
+
+
+#endif /* CGAL_PROPERTIES_POLYMESH_ARRAYKERNELT_H */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_Polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_Polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/graph/properties_Polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_Polyhedron_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_Surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_Surface_mesh.h
new file mode 100644
index 0000000..08306f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_Surface_mesh.h
@@ -0,0 +1,279 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Möller
+
+
+#ifndef CGAL_PROPERTIES_SURFACE_MESH_H
+#define CGAL_PROPERTIES_SURFACE_MESH_H
+
+#include <CGAL/assertions.h>
+#include <CGAL/Surface_mesh.h>
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/squared_distance_3.h>
+
+#include <CGAL/boost/graph/properties.h>
+
+#include <boost/cstdint.hpp>
+
+namespace CGAL {
+
+template <typename Point>
+class SM_edge_weight_pmap 
+  : public boost::put_get_helper<typename CGAL::Kernel_traits<Point>::type::FT, SM_edge_weight_pmap<Point> >
+{
+  typedef CGAL::Surface_mesh<Point> SM;
+public:
+  typedef boost::readable_property_map_tag                category;
+  typedef typename CGAL::Kernel_traits<Point>::type::FT   value_type;
+  typedef value_type                                      reference;
+  typedef typename SM::Edge_index                        key_type;
+
+  SM_edge_weight_pmap(const CGAL::Surface_mesh<Point>& sm)
+    : pm_(sm. template property_map< 
+            typename SM::Vertex_index,
+            typename SM::Point >("v:point").first),
+      sm_(sm)
+    {}
+
+  value_type operator[](const key_type& e) const
+  {
+    return CGAL::sqrt(CGAL::squared_distance(pm_[source(e, sm_)],
+                                             pm_[target(e, sm_)]));
+  }
+
+private:
+   typename SM::template Property_map< typename SM::Vertex_index, 
+                                       typename SM::Point > pm_;
+  const SM& sm_;
+};
+
+
+template <typename K, typename VEF>
+class SM_index_pmap : public boost::put_get_helper<boost::uint32_t, SM_index_pmap<K,VEF> >
+{
+public:
+  typedef boost::readable_property_map_tag category;
+  typedef boost::uint32_t                  value_type;
+  typedef boost::uint32_t                  reference;
+  typedef VEF                              key_type;
+
+  value_type operator[](const key_type& vd) const
+  {
+    return vd;
+  }
+};
+
+} // CGAL
+
+// overloads and specializations in the boost namespace
+namespace boost {
+#if 1
+template <typename Point, typename T>
+struct property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >
+{
+  typedef CGAL::Surface_mesh<Point> SM;
+  typedef typename SM:: template Property_map<typename SM::vertex_index,T> type;
+  typedef type const_type;
+};
+
+
+#endif
+
+
+//
+// edge_weight
+//
+
+template <typename Point>
+struct property_map<CGAL::Surface_mesh<Point>, boost::edge_weight_t >
+{
+  typedef CGAL::SM_edge_weight_pmap<Point> type;
+  typedef CGAL::SM_edge_weight_pmap<Point> const_type;
+};
+
+template <typename Point>
+typename property_map<CGAL::Surface_mesh<Point>, boost::edge_weight_t>::const_type
+get(boost::edge_weight_t, const CGAL::Surface_mesh<Point>& sm)
+{
+  return CGAL::SM_edge_weight_pmap<Point>(sm);
+}
+
+template <typename Point>
+typename CGAL::SM_edge_weight_pmap<Point>::value_type
+get(boost::edge_weight_t, const CGAL::Surface_mesh<Point>& sm, 
+    const typename boost::graph_traits<CGAL::Surface_mesh<Point> >::edge_descriptor& e)
+{
+  return CGAL::SM_edge_weight_pmap<Point>(sm)[e];
+}
+
+//
+// vertex_index
+//
+
+template <typename K>
+struct property_map<CGAL::Surface_mesh<K>, boost::vertex_index_t >
+{
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor> type;
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor> const_type;
+};
+
+template <typename K>
+CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor>
+get(const boost::vertex_index_t&, const CGAL::Surface_mesh<K>&)
+{
+  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::vertex_descriptor>();
+}
+
+//
+// face_index
+//
+
+template <typename K>
+struct property_map<CGAL::Surface_mesh<K>, boost::face_index_t >
+{
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor> type;
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor> const_type;
+};
+
+template <typename K>
+typename property_map<CGAL::Surface_mesh<K>, boost::face_index_t>::const_type
+get(const boost::face_index_t&, const CGAL::Surface_mesh<K>&)
+{
+  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::face_descriptor>();
+}
+
+//
+// edge_index
+//
+
+template <typename K>
+struct property_map<CGAL::Surface_mesh<K>, boost::edge_index_t >
+{
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor> type;
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor> const_type;
+};
+
+template <typename K>
+CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor>
+get(const boost::edge_index_t&, const CGAL::Surface_mesh<K>&)
+{
+  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::edge_descriptor>();
+}
+
+//
+// halfedge_index
+//
+
+template <typename K>
+struct property_map<CGAL::Surface_mesh<K>, boost::halfedge_index_t >
+{
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor> type;
+  typedef CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor> const_type;
+};
+
+template <typename K>
+CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor>
+get(const boost::halfedge_index_t&, const CGAL::Surface_mesh<K>&)
+{
+  return CGAL::SM_index_pmap<K, typename boost::graph_traits<CGAL::Surface_mesh<K> >::halfedge_descriptor>();
+}
+
+//
+// vertex_point
+// 
+
+template<typename P>
+struct property_map<CGAL::Surface_mesh<P>, CGAL::vertex_point_t >
+{
+  typedef CGAL::Surface_mesh<P> SM; 
+
+  typedef typename
+    SM::template Property_map< typename SM::Vertex_index, 
+                               P
+                               > type;
+  
+  typedef type const_type;
+  
+};
+
+template<typename K>
+typename property_map<CGAL::Surface_mesh<K>, CGAL::vertex_point_t >::const_type
+get(CGAL::vertex_point_t, const CGAL::Surface_mesh<K>& g) {
+  return g.points();
+}
+
+
+// get for intrinsic properties
+#define CGAL_SM_INTRINSIC_PROPERTY(RET, PROP, TYPE)                     \
+  template<typename Point>                                              \
+  RET                                                                   \
+  get(PROP p, const CGAL::Surface_mesh<Point>& sm,                      \
+      typename boost::graph_traits< CGAL::Surface_mesh<Point> >::TYPE x) \
+  { return get(get(p, sm), x); }                                        \
+
+CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::vertex_index_t, vertex_descriptor)
+CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::edge_index_t, edge_descriptor)
+CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::halfedge_index_t, halfedge_descriptor)
+CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::face_index_t, face_descriptor)
+CGAL_SM_INTRINSIC_PROPERTY(Point&, CGAL::vertex_point_t, vertex_descriptor)
+
+#undef CGAL_SM_INTRINSIC_PROPERTY
+
+// put for intrinsic properties
+// only available for vertex_point
+template<typename K>
+void
+put(CGAL::vertex_point_t p, const CGAL::Surface_mesh<K>& g,
+    typename boost::graph_traits< CGAL::Surface_mesh<K> >::vertex_descriptor x,
+    const K& point) {
+  typedef CGAL::Surface_mesh<K> SM;
+  CGAL_assertion(g.is_valid(x));
+  typename SM::template Property_map< typename boost::graph_traits<SM>::vertex_descriptor, 
+                    K> prop = get(p, g);
+  prop[x] = point;
+}
+
+} // boost
+
+#if 0
+// 
+namespace CGAL {
+template <typename Point, typename T>
+typename boost::property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >::const_type
+get(boost::vertex_property_t<T> vprop, const CGAL::Surface_mesh<Point>& sm)
+{
+  return sm.template get_property_map<typename CGAL::Surface_mesh<Point>::Vertex_index, T>(vprop.s).first;
+}
+
+template <typename Point, typename T>
+typename boost::property_map<CGAL::Surface_mesh<Point>, boost::vertex_property_t<T> >::const_type
+add(boost::vertex_property_t<T> vprop, CGAL::Surface_mesh<Point>& sm)
+{
+  return sm.template add_property_map<typename CGAL::Surface_mesh<Point>::Vertex_index, T>(vprop.s, vprop.t).first;
+}
+
+template <typename Pmap,typename P>
+void
+remove(Pmap pm, CGAL::Surface_mesh<P>& sm)
+{
+  return sm.remove_property_map(pm);
+}
+} // namespace CGAL
+#endif
+
+#endif /* CGAL_PROPERTIES_SURFACE_MESH_H */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h
new file mode 100644
index 0000000..df52fa0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h
@@ -0,0 +1,195 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Philipp Möller
+
+
+#ifndef CGAL_PROPERTIES_TRIMESH_ARRAYKERNELT_H
+#define CGAL_PROPERTIES_TRIMESH_ARRAYKERNELT_H
+
+#include <CGAL/assertions.h>
+#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
+#include <CGAL/boost/graph/properties.h>
+#include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <boost/mpl/if.hpp>
+
+
+// overloads and specializations in the boost namespace
+namespace boost {
+
+//
+// edge_weight
+//
+template <typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::edge_weight_t >
+{
+  typedef OpenMesh::TriMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_edge_weight_pmap<Mesh> type;
+  typedef CGAL::OM_edge_weight_pmap<Mesh> const_type;
+};
+
+
+
+//
+// vertex_index
+//
+template <typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::vertex_index_t >
+{
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor> const_type;
+};
+
+
+//
+// face_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::face_index_t >
+{
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor> const_type;
+};
+
+//
+// edge_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::edge_index_t >
+{
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor> const_type;
+};
+
+//
+// halfedge_index
+//
+
+template <typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::halfedge_index_t >
+{
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor> type;
+  typedef CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor> const_type;
+};
+
+
+template<typename K>
+struct property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::vertex_point_t >
+{
+  typedef CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
+  typedef OpenMesh::TriMesh_ArrayKernelT<K> Mesh;
+  typedef CGAL::OM_point_pmap<Mesh,P> type;
+  typedef type const_type;
+};
+
+} // namespace boost
+
+namespace OpenMesh {
+
+
+template <typename K>
+typename boost::property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::edge_weight_t>::const_type
+get(boost::edge_weight_t, const OpenMesh::TriMesh_ArrayKernelT<K>& sm)
+{
+  return CGAL::OM_edge_weight_pmap<K>(sm);
+}
+
+template <typename K>
+typename OpenMesh::TriMesh_ArrayKernelT<K>::Scalar
+get(boost::edge_weight_t, const OpenMesh::TriMesh_ArrayKernelT<K>& sm, 
+    const typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor& e)
+{
+  return CGAL::OM_edge_weight_pmap<K>(sm)[e];
+}
+
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor>
+get(const boost::vertex_index_t&, const OpenMesh::TriMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor>();
+}
+
+template <typename K>
+typename boost::property_map<OpenMesh::TriMesh_ArrayKernelT<K>, boost::face_index_t>::const_type
+get(const boost::face_index_t&, const OpenMesh::TriMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::face_descriptor>();
+}
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor>
+get(const boost::edge_index_t&, const OpenMesh::TriMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::edge_descriptor>();
+}
+
+template <typename K>
+CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor>
+get(const boost::halfedge_index_t&, const OpenMesh::TriMesh_ArrayKernelT<K>&)
+{
+  return CGAL::OM_index_pmap<K, typename boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >::halfedge_descriptor>();
+}
+
+template<typename K>
+CGAL::OM_point_pmap<OpenMesh::TriMesh_ArrayKernelT<K>,
+                    typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3>
+get(boost::vertex_point_t, const OpenMesh::TriMesh_ArrayKernelT<K>& g) 
+{
+  typedef typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P;
+  typedef OpenMesh::TriMesh_ArrayKernelT<K> Mesh;
+  return CGAL::OM_point_pmap<Mesh, P>(g);
+}
+
+// get for intrinsic properties
+#define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE)                     \
+  template<typename K>                                              \
+  RET                                                                   \
+  get(PROP p, const OpenMesh::TriMesh_ArrayKernelT<K>& sm,                      \
+      typename boost::graph_traits< OpenMesh::TriMesh_ArrayKernelT<K> >::TYPE x) \
+  { return get(get(p, sm), x); }                                        \
+
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::vertex_index_t, vertex_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::edge_index_t, edge_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::halfedge_index_t, halfedge_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(int, boost::face_index_t, face_descriptor)
+  //  CGAL_OM_INTRINSIC_PROPERTY(std::size_t, boost::halfedge_index_t, face_descriptor)
+  CGAL_OM_INTRINSIC_PROPERTY(typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3, boost::vertex_point_t, vertex_descriptor)
+
+#undef CGAL_OM_INTRINSIC_PROPERTY
+
+// put for intrinsic properties
+// only available for vertex_point
+
+template<typename K>
+void
+put(boost::vertex_point_t p, OpenMesh::TriMesh_ArrayKernelT<K>& g,
+    typename boost::graph_traits< OpenMesh::TriMesh_ArrayKernelT<K> >::vertex_descriptor vd,
+    const typename K::Point& point) 
+{
+  put(get(p,g), vd, point);
+}
+
+
+} // namespace OpenMesh
+
+
+
+#endif /* CGAL_PROPERTIES_TRIMESH_ARRAYKERNELT_H */
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/selection.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/selection.h
new file mode 100644
index 0000000..4b5ef55
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/selection.h
@@ -0,0 +1,528 @@
+// Copyright (c) 2015  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+//
+
+#ifndef CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
+#define CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+#include <CGAL/boost/graph/iterator.h>
+
+namespace CGAL {
+
+
+/// Operation on faces
+namespace internal{
+// extract edges in non-selected faces (boundary excluded but one)
+template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
+OutputIterator
+extract_selection_boundary(
+  FaceRange& face_range,
+  FaceGraph& fg,
+  IsFaceSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<FaceGraph> GT;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+
+  BOOST_FOREACH(face_descriptor fd, face_range)
+  {
+    BOOST_FOREACH(  halfedge_descriptor h,
+                    halfedges_around_face(halfedge(fd, fg), fg) )
+    {
+      halfedge_descriptor opp_hd = opposite(h, fg);
+      face_descriptor opp_fd = face( opp_hd, fg );
+      if (opp_fd!=GT::null_face())
+      {
+        if ( !get(is_selected, opp_fd) )
+          *out++=opp_hd;
+      }
+      else{
+        opp_hd=opposite( next( opp_hd, fg), fg );
+        if ( !get( is_selected, face(opp_hd, fg) ) )
+          *out++=opp_hd;
+      }
+    }
+  }
+  return out;
+}
+} //end of namespace internal
+
+
+/*!
+\ingroup PkgBGLSelectionFct
+Augments a selection with faces of `fg` that are adjacent
+to a face in `selection`. This process is applied `k` times considering
+all faces added in the previous steps.
+Two faces are said to be adjacent if they share a vertex or an edge.
+Each new face added in the selection is added exactly once in `out`.
+\tparam FaceRange a range of face descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsFaceSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%face_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting face descriptors.
+\param selection the initial selection of faces that will be expanded.
+\param fg the graph containing the selected faces.
+\param k the number of times the expansion procedure is iteratively applied.
+\param is_selected indicates if a face is part of the selection. It is updated by the function
+       to accomodate new faces added to the selection.
+\param out new faces added to the selection are added exactly once in `out`.
+*/
+template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
+OutputIterator
+expand_face_selection(
+  const FaceRange& selection,
+  FaceGraph& fg,
+  unsigned int k,
+  IsFaceSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<FaceGraph> GT;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+
+  std::vector<face_descriptor> current_selection(selection.begin(), selection.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    //extract faces on the boundary of the selection
+    std::vector<halfedge_descriptor> selection_boundary_halfedges;
+    internal::extract_selection_boundary(current_selection, fg, is_selected,
+                                         std::back_inserter(selection_boundary_halfedges));
+
+    if (selection_boundary_halfedges.empty()) break;
+
+    //collect faces around the target vertex of the selection boundary halfedges
+    std::set<face_descriptor> new_selection_set;
+    BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges)
+    {
+      face_descriptor fd=face(hd, fg);
+      while( !get(is_selected,fd) )
+      {
+        new_selection_set.insert(fd);
+        hd=opposite( next(hd, fg), fg );
+        fd=face(hd, fg);
+        if ( face(hd, fg)==GT::null_face() ) break;
+      }
+    }
+
+    // extract unique selection
+    std::vector<face_descriptor> new_selection;
+    BOOST_FOREACH(face_descriptor fd, new_selection_set)
+    {
+      *out++=fd;
+      new_selection.push_back(fd);
+      put( is_selected, fd, true );
+    }
+    current_selection.swap(new_selection);
+  }
+  return out;
+}
+
+/*!
+\ingroup PkgBGLSelectionFct
+Diminishes a selection of faces from faces adjacent to a non-selected face.
+This process is applied `k` times considering all faces removed in the previous steps.
+Two faces are said to be adjacent if they share a vertex or an edge.
+Each face removed from the selection is added exactly once in `out`.
+\tparam FaceRange a range of face descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsFaceSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%face_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting face descriptors.
+\param selection the initial selection of faces that will be expanded.
+\param fg the graph containing the selected faces.
+\param k the number of times the reduction procedure is iteratively applied.
+\param is_selected indicates if a face is part of the selection. It is updated by the function
+       to accomodate faces removed from the selection.
+\param out faces removed from the selection are added exactly once in `out`.
+*/
+template <class FaceRange, class FaceGraph, class IsFaceSelectedPMap, class OutputIterator>
+OutputIterator
+reduce_face_selection(
+  const FaceRange& selection,
+  FaceGraph& fg,
+  unsigned int k,
+  IsFaceSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<FaceGraph> GT;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+
+  std::vector<face_descriptor> current_selection(selection.begin(), selection.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    //extract faces on the boundary of the selection
+    std::vector<halfedge_descriptor> selection_boundary_halfedges;
+    internal::extract_selection_boundary(current_selection, fg, is_selected,
+                                         std::back_inserter(selection_boundary_halfedges));
+
+    if (selection_boundary_halfedges.empty()) break;
+
+
+    //collect faces around the target vertex of the selection boundary halfedges
+    std::set<face_descriptor> elements_to_remove;
+    BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges)
+    {
+      hd = opposite(hd, fg);
+      face_descriptor fd=face( hd, fg );
+      while( face(hd, fg)!=GT::null_face() && get(is_selected,fd) )
+      {
+        elements_to_remove.insert(fd);
+        hd=opposite( next(hd, fg), fg );
+        fd=face(hd, fg);
+      }
+    }
+
+    /// update is-selected attribute and output iterator
+    BOOST_FOREACH(face_descriptor fd, elements_to_remove)
+    {
+      *out++=fd;
+      put( is_selected, fd, false );
+    }
+
+    // update the set of currently selected faces
+    std::vector<face_descriptor> new_selection;
+    BOOST_FOREACH(face_descriptor fd, current_selection)
+      if ( !elements_to_remove.count(fd) )
+        new_selection.push_back(fd);
+    current_selection.swap(new_selection);
+  }
+  return out;
+}
+
+
+/*!
+\ingroup PkgBGLSelectionFct
+discovers and puts in `out` all faces incident to the target vertex
+of a halfedge in `hedges`. Faces are put exactly once in `out`.
+\tparam HalfedgeRange a range of halfedge descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam HalfedgeGraph a model of `HalfedgeGraph`.
+\tparam OutputIterator an output iterator accepting face descriptors.
+\param hedges the range a halfedge descriptors consider during the face selection.
+\param fg the graph containing the input halfedges.
+\param out faces added to the selection are added exactly once in `out`.
+*/
+template <class HalfedgeRange, class FaceGraph, class OutputIterator>
+OutputIterator
+select_incident_faces(
+  const HalfedgeRange& hedges,
+  FaceGraph& fg,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<FaceGraph> GT;
+  typedef typename GT::face_descriptor face_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+
+  //collect faces around the target vertex of the selection boundary halfedges
+  std::set<face_descriptor> selection_set;
+  BOOST_FOREACH(halfedge_descriptor hd, hedges)
+  {
+    halfedge_descriptor first = hd;
+    face_descriptor fd=face(hd, fg);
+    do
+    {
+      if ( face(hd, fg)!=GT::null_face() && selection_set.insert(fd).second)
+        *out++=fd;
+      hd=opposite( next(hd, fg), fg );
+      fd=face(hd, fg);
+    }while( hd!=first );
+  }
+
+  return out;
+}
+
+/// Operations on edges
+/*!
+\ingroup PkgBGLSelectionFct
+Augments a selection with edges of `fg` that are adjacent
+to an edge in `selection`. This process is applied `k` times considering
+all edges added in the previous steps.
+Two edges are said to be adjacent if they are incident to the same face or vertex.
+Each new edge added in the selection is added exactly once in `out`.
+\tparam EdgeRange a range of edge descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsEdgeSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%edge_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting edge descriptors.
+\param selection the initial selection of edges that will be expanded.
+\param fg the graph containing the selected edges.
+\param k the number of times the expansion procedure is iteratively applied.
+\param is_selected indicates if an edge is part of the selection. It is updated by the function
+       to accomodate new edges added to the selection.
+\param out new edges added to the selection are added exactly once in `out`.
+*/
+template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
+OutputIterator
+expand_edge_selection(
+  const EdgeRange& selection,
+  HalfedgeGraph& fg,
+  unsigned int k,
+  IsEdgeSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<HalfedgeGraph> GT;
+  typedef typename GT::edge_descriptor edge_descriptor;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+  std::vector<edge_descriptor> current_selection(selection.begin(), selection.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    if (current_selection.empty()) break;
+
+    //collect adjacent edges not already selected
+    std::set<edge_descriptor> new_selection_set;
+    BOOST_FOREACH(edge_descriptor ed, current_selection)
+    {
+      halfedge_descriptor hdi=halfedge(ed,fg);
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hdi, fg))
+      {
+        edge_descriptor ned=edge(hd, fg);
+        if (!get(is_selected, ned)) new_selection_set.insert(ned);
+      }
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( hdi, fg))
+      {
+        edge_descriptor ned=edge(hd, fg);
+        if (!get(is_selected, ned)) new_selection_set.insert(ned);
+      }
+    }
+
+    // extract unique selection
+    std::vector<edge_descriptor> new_selection;
+    BOOST_FOREACH(edge_descriptor ed, new_selection_set)
+    {
+      *out++=ed;
+      new_selection.push_back(ed);
+      put( is_selected, ed, true );
+    }
+    current_selection.swap(new_selection);
+  }
+  return out;
+}
+
+/*!
+\ingroup PkgBGLSelectionFct
+Diminishes a selection of edges from edges adjacent to a non-selected edge.
+This process is applied `k` times considering all edges removed in the previous steps.
+Two edges are said to be adjacent if they are incident to the same face or vertex.
+Each edge removed from the selection is added exactly once in `out`.
+\tparam EdgeRange a range of edge descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsEdgeSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%edge_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting edge descriptors.
+\param selection the initial selection of edges that will be reduced.
+\param fg the graph containing the selected edges.
+\param k the number of times the reduction procedure is iteratively applied.
+\param is_selected indicates if an edge is part of the selection. It is updated by the function
+       to accomodate edges removed from the selection.
+\param out edges removed from the selection are added exactly once in `out`.
+*/
+template <class EdgeRange, class HalfedgeGraph, class IsEdgeSelectedPMap, class OutputIterator>
+OutputIterator
+reduce_edge_selection(
+  const EdgeRange& selection ,
+  HalfedgeGraph& fg,
+  unsigned int k,
+  IsEdgeSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<HalfedgeGraph> GT;
+  typedef typename GT::halfedge_descriptor halfedge_descriptor;
+  typedef typename GT::edge_descriptor edge_descriptor;
+  typedef typename GT::vertex_descriptor vertex_descriptor;
+
+  // extract the set of vertices on the border
+  std::set<vertex_descriptor> unique_vertex_set;
+  BOOST_FOREACH(edge_descriptor ed, selection)
+  {
+    halfedge_descriptor hd=halfedge(ed,fg);
+    BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_source( hd, fg))
+    {
+      edge_descriptor ned=edge(nhd, fg);
+      if (!get(is_selected, ned)){
+        unique_vertex_set.insert(source(hd,fg));
+        break;
+      }
+    }
+    BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, fg))
+    {
+      edge_descriptor ned=edge(nhd, fg);
+      if (!get(is_selected, ned)){
+        unique_vertex_set.insert(target(hd,fg));
+        break;
+      }
+    }
+  }
+
+  std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    if (current_selection_border.empty()) break;
+
+    //collect incident edges selected
+    std::set<edge_descriptor> edges_to_deselect;
+    unique_vertex_set.clear();
+    BOOST_FOREACH(vertex_descriptor vd, current_selection_border)
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( halfedge(vd,fg), fg))
+      {
+        edge_descriptor ed = edge(hd, fg);
+        if (get(is_selected, ed)){
+          edges_to_deselect.insert(ed);
+          unique_vertex_set.insert(source(hd, fg));
+        }
+      }
+
+    // extract unique selection
+    BOOST_FOREACH(edge_descriptor ed, edges_to_deselect)
+    {
+      *out++=ed;
+      put( is_selected, ed, false );
+    }
+
+    current_selection_border.assign(unique_vertex_set.begin(), unique_vertex_set.end());
+  }
+  return out;
+}
+
+/// Operations on vertices
+/*!
+\ingroup PkgBGLSelectionFct
+Augments a selection with vertices of `fg` that are adjacent
+to a vertex in `selection`. This process is applied `k` times considering
+all vertices added in the previous steps.
+Two vertices are said to be adjacent if they are part of the same face.
+Each new vertex added in the selection is added exactly once in `out`.
+\tparam VertexRange a range of vertex descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsVertexSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%vertex_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting vertex descriptors.
+\param selection the initial selection of vertices that will be expanded.
+\param fg the graph containing the selected vertices.
+\param k the number of times the expansion procedure is iteratively applied.
+\param is_selected indicates if a vertex is part of the selection. It is updated by the function
+       to accomodate new vertices added to the selection.
+\param out new vertices added to the selection are added exactly once in `out`.
+*/
+template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
+OutputIterator
+expand_vertex_selection(
+  const VertexRange& selection,
+  HalfedgeGraph& fg,
+  unsigned int k,
+  IsVertexSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<HalfedgeGraph> GT;
+  typedef typename GT::vertex_descriptor vertex_descriptor;
+  std::vector<vertex_descriptor> current_selection(selection.begin(), selection.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    if (current_selection.empty()) break;
+
+    //collect adjacent vertices not already selected
+    std::set<vertex_descriptor> new_selection_set;
+    BOOST_FOREACH(vertex_descriptor vd, current_selection)
+      BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg))
+        if (!get(is_selected, nvd)) new_selection_set.insert(nvd);
+
+    // extract unique selection
+    std::vector<vertex_descriptor> new_selection;
+    BOOST_FOREACH(vertex_descriptor vd, new_selection_set)
+    {
+      *out++=vd;
+      new_selection.push_back(vd);
+      put( is_selected, vd, true );
+    }
+    current_selection.swap(new_selection);
+  }
+  return out;
+}
+
+/*!
+\ingroup PkgBGLSelectionFct
+Diminishes a selection of vertices from vertices adjacent to a non-selected vertex.
+This process is applied `k` times considering all vertices removed in the previous steps.
+Two vertices are said to be adjacent if they are part of the same face.
+Each vertex removed from the selection is added exactly once in `out`.
+\tparam VertexRange a range of vertex descriptors, model of `Range`.
+          Its iterator type is `InputIterator`.
+\tparam FaceGraph a model of `FaceGraph`.
+\tparam IsVertexSelectedPMap a model of `ReadWritePropertyMap` with `boost::graph_traits<FaceGraph>::%vertex_descriptor`
+        as key type and `bool` as value type.
+\tparam OutputIterator an output iterator accepting vertex descriptors.
+\param selection the initial selection of vertices that will be reduced.
+\param fg the graph containing the selected vertices.
+\param k the number of times the reduction procedure is iteratively applied.
+\param is_selected indicates if a vertex is part of the selection. It is updated by the function
+       to accomodate vertices removed from the selection.
+\param out vertices removed from the selection are added exactly once in `out`.
+*/
+template <class VertexRange, class HalfedgeGraph, class IsVertexSelectedPMap, class OutputIterator>
+OutputIterator
+reduce_vertex_selection(
+  const VertexRange& selection,
+  HalfedgeGraph& fg,
+  unsigned int k,
+  IsVertexSelectedPMap is_selected,
+  OutputIterator out)
+{
+  typedef boost::graph_traits<HalfedgeGraph> GT;
+  typedef typename GT::vertex_descriptor vertex_descriptor;
+
+  // collect vertices incident to a selected one
+  std::set<vertex_descriptor> unique_vertex_set;
+  BOOST_FOREACH(vertex_descriptor vd, selection)
+    BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg))
+        if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd);
+
+  std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end());
+  for (unsigned int i=0; i<k; ++i)
+  {
+    if (current_selection_border.empty()) break;
+
+    //collect adjacent vertices selected
+    std::set<vertex_descriptor> vertices_to_deselect;
+    BOOST_FOREACH(vertex_descriptor vd, current_selection_border)
+      BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg))
+        if (get(is_selected, nvd)) vertices_to_deselect.insert(nvd);
+
+    // extract unique selection
+    std::vector<vertex_descriptor> new_selection_border;
+    BOOST_FOREACH(vertex_descriptor vd, vertices_to_deselect)
+    {
+      *out++=vd;
+      new_selection_border.push_back(vd);
+      put( is_selected, vd, false );
+    }
+    current_selection_border.swap(new_selection_border);
+  }
+  return out;
+}
+
+} //end of namespace CGAL
+
+#endif //CGAL_BOOST_GRAPH_KTH_SIMPLICIAL_NEIGHBORHOOD_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/split_graph_into_polylines.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/split_graph_into_polylines.h
new file mode 100644
index 0000000..dc83336
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/split_graph_into_polylines.h
@@ -0,0 +1,271 @@
+// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau, Xiang Gao
+//
+
+#ifndef CGAL_SPLIT_GRAPH_INTO_POLYLINES
+#define CGAL_SPLIT_GRAPH_INTO_POLYLINES
+
+#include <map> 
+#include <set> 
+#include <boost/foreach.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <iostream>
+
+
+namespace CGAL {
+
+namespace internal{
+struct IsTerminalDefault
+{
+  template <typename VertexDescriptor, typename Graph>
+  bool operator ()(VertexDescriptor& , const Graph& )
+  {
+    return false;
+  }
+};
+
+template <class Graph>
+struct Dummy_visitor_for_split_graph_into_polylines
+{
+  void start_new_polyline(){}
+  void add_node(typename boost::graph_traits<Graph>::vertex_descriptor){}
+  void end_polyline(){}
+};
+} //end of namespace internal
+
+
+namespace internal {
+
+/// Splits a graph at vertices with degree higher than two and at vertices where `is_terminal  returns `true`
+/// The vertices are duplicated, and new incident edges created.
+/// OrigGraph must be undirected
+template <typename Graph,
+          typename OrigGraph,
+          typename IsTerminal>
+void split_graph_into_polylines(Graph& graph,
+                                const OrigGraph& orig,
+                                IsTerminal is_terminal)
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
+  typedef typename boost::graph_traits<Graph>::vertex_iterator vertex_iterator;
+  typedef typename boost::graph_traits<Graph>::out_edge_iterator out_edge_iterator;
+
+  vertex_iterator b,e;
+  boost::tie(b,e) = vertices(graph);
+  std::vector<vertex_descriptor> V(b,e);
+  BOOST_FOREACH(vertex_descriptor v, V)
+  {
+    if (degree(v, graph) > 2 || is_terminal(graph[v], orig))
+      {
+        out_edge_iterator b, e;
+        boost::tie(b, e) = out_edges(v, graph);
+        std::vector<edge_descriptor> E(b, e);
+        for (unsigned int i = 1; i < E.size(); ++i)
+          {
+            edge_descriptor e = E[i];
+            vertex_descriptor w = target(e, graph);
+            remove_edge(e, graph);
+            vertex_descriptor vc = add_vertex(graph);
+            graph[vc] = graph[v];
+            add_edge(vc, w, graph);
+          }
+      }
+  }
+
+  // check all vertices are of degree 1 or 2 and that the source
+  // and target of each edge are different vertices with different ids
+  CGAL_assertion_code(
+                      BOOST_FOREACH(vertex_descriptor v, vertices(graph)){
+                        typename boost::graph_traits<Graph>::degree_size_type
+                          n = degree(v, graph);
+                        CGAL_assertion( n == 0 || n == 1 || n == 2);
+                      }
+                      BOOST_FOREACH(edge_descriptor e, edges(graph)){
+                        vertex_descriptor v = target(e, graph);
+                        vertex_descriptor w = source(e, graph);
+                        CGAL_assertion(v != w);
+                      }
+                      ) // end of CGAL_assertion_code
+    }
+    
+} // namespace internal
+
+  
+/*!
+\ingroup PkgBGL
+splits into polylines the graph `g` at vertices of degree greater than 2
+and at vertices for which `is_terminal(v,graph)==true`.
+The polylines are reported using a visitor.
+\tparam Graph a model of the `boost` concepts `VertexListGraph` and `EdgeListGraph`.
+\tparam Visitor a class that provides:
+        - <code>void start_new_polyline()</code>
+          called when starting the description of a polyline.
+        - <code>void add_node(typename boost::graph_traits<Graph>::%vertex_descriptor v)</code>
+          called for each vertex `v` of the polyline currently described.
+        - <code>void end_polyline()</code>
+          called when the description of a polyline is finished.
+\tparam IsTerminal A functor providing `bool operator()(boost::graph_traits<Graph>::%vertex_descriptor v, const Graph& g) const`
+                   returning true if the vertex `v` of degree 2 is a polyline endpoint and false otherwise.
+
+An overload without `is_terminal` is provided if no vertices but those of degree
+different from 2 are polyline endpoints.
+*/
+template <typename Graph,
+          typename Visitor,
+          typename IsTerminal>
+void
+split_graph_into_polylines(const Graph& graph,
+                           Visitor& polyline_visitor,
+                           IsTerminal is_terminal)
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor Graph_vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor Graph_edge_descriptor;
+  
+  typedef boost::adjacency_list <boost::setS, // this avoids parallel edges
+                                 boost::vecS, 
+                                 boost::undirectedS,
+                                 Graph_vertex_descriptor > G;
+
+  typedef typename boost::graph_traits<G>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
+  typedef typename boost::graph_traits<G>::out_edge_iterator out_edge_iterator;
+  
+  // we make a copy of the input graph
+  G g;
+  {
+    typedef std::map<typename boost::graph_traits<Graph>::vertex_descriptor,
+                     typename boost::graph_traits<G>::vertex_descriptor> V2vmap;
+    V2vmap v2vmap;
+    
+    BOOST_FOREACH(Graph_vertex_descriptor v, vertices(graph)){
+      vertex_descriptor vc = add_vertex(g);
+      g[vc] = v;
+      v2vmap[v] = vc; 
+    }
+    
+
+    BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){
+      Graph_vertex_descriptor vs = source(e,graph);
+      Graph_vertex_descriptor vt = target(e,graph);
+      vertex_descriptor vsc, vtc;
+      if(vs == vt){
+        std::cerr << "ignore self loop\n";
+      }else{
+        typename V2vmap::iterator it;
+
+        if((it = v2vmap.find(vs)) == v2vmap.end()){
+          vsc = add_vertex(g);
+          g[vsc] = vs;
+          v2vmap[vs] = vsc;
+        }else{
+          vsc = it->second;
+        }
+        if((it = v2vmap.find(vt)) == v2vmap.end()){
+          vtc = add_vertex(g);
+          g[vtc] = vt;
+          v2vmap[vt] = vtc;
+        }else{
+          vtc = it->second;
+        }
+        add_edge(vsc,vtc,g);
+      }
+    }
+  }  
+  // duplicate terminal vertices and vertices of degree more than 2
+  internal::split_graph_into_polylines(g, graph, is_terminal);
+  // put polylines endpoint in a set
+  std::set<vertex_descriptor> terminal;
+
+  BOOST_FOREACH(vertex_descriptor v, vertices(g)){
+    typename boost::graph_traits<Graph>::degree_size_type n = degree(v, g);
+    if ( n == 1 ) terminal.insert(v);
+    if ( n ==0 ){
+      //isolated vertex
+      polyline_visitor.start_new_polyline();
+      polyline_visitor.add_node(g[v]);
+      polyline_visitor.end_polyline();
+    }
+  }
+
+  // go over all polylines and provide the description to the visitor
+  while (!terminal.empty())
+  {
+    typename std::set<vertex_descriptor>::iterator it = terminal.begin();
+    vertex_descriptor u = *it;
+    terminal.erase(it);
+    polyline_visitor.start_new_polyline();
+    polyline_visitor.add_node(g[u]);
+    while (degree(u,g) != 0)
+    {
+      CGAL_assertion(degree(u,g) == 1);
+      out_edge_iterator b = out_edges(u, g).first;
+      vertex_descriptor v = target(*b, g);
+      CGAL_assertion(u!=v);
+      polyline_visitor.add_node(g[v]);
+      remove_edge(b, g);
+      u = v;
+    }
+    terminal.erase(u);
+    polyline_visitor.end_polyline();
+  }
+
+  // do the same but for cycles
+  while (num_edges(g) != 0)
+  {
+    edge_descriptor first_edge = *edges(g).first;
+    vertex_descriptor u = source(first_edge, g);
+
+    polyline_visitor.start_new_polyline();
+    polyline_visitor.add_node(g[u]);
+
+    u = target(first_edge, g);
+    remove_edge(first_edge, g);
+    polyline_visitor.add_node(g[u]);
+
+    while (degree(u,g) != 0)
+    {
+      CGAL_assertion(degree(u,g) == 1);
+      out_edge_iterator b = out_edges(u, g).first;
+      vertex_descriptor v = target(*b, g);
+      CGAL_assertion(u!=v);
+      polyline_visitor.add_node(g[v]);
+      remove_edge(b, g);
+      u = v;
+    }
+    polyline_visitor.end_polyline();
+  }
+}
+
+/// \cond SKIP_IN_MANUAL
+/// Split graph into polylines delimited by vertices of degree different from 2.
+/// Then the graph is visited and Visitor is called to describe the polylines
+/// Graph must be undirected
+template <typename Graph,
+          typename Visitor>
+void
+split_graph_into_polylines(const Graph& graph,
+                           Visitor& polyline_visitor)
+{
+  split_graph_into_polylines(graph, polyline_visitor, internal::IsTerminalDefault());
+}
+/// \endcond
+
+} //end of namespace CGAL
+
+#endif //CGAL_SPLIT_GRAPH_INTO_POLYLINES
diff --git a/3rdparty/CGAL-4.8/include/CGAL/boost/graph/visitor.h b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/visitor.h
new file mode 100644
index 0000000..7b7b8e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/boost/graph/visitor.h
@@ -0,0 +1,694 @@
+// Copyright (c) 2014  GeometryFactory (France).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Jane Tournois
+
+#ifndef CGAL_BOOST_GRAPH_VISITOR_H
+#define CGAL_BOOST_GRAPH_VISITOR_H
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/ref.hpp>
+
+namespace boost
+{
+  template<typename V, typename Graph>
+  struct graph_traits<
+    boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> > >
+    : boost::graph_traits< Graph >
+  {
+    typedef boost::graph_traits<Graph> Base;
+    typedef typename Base::vertex_property_type vertex_property_type;
+  };
+
+  template<typename V, typename Graph>
+  struct graph_traits<
+    boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> > const >
+    : boost::graph_traits< Graph >
+  {};
+
+  template<typename V, typename Graph, class PropertyTag>
+  struct property_map<
+      boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> >,
+      PropertyTag>
+      : public property_map<Graph, PropertyTag>
+  {};
+
+  template<typename V, typename Graph, class PropertyTag>
+  struct property_map<
+    const boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> >,
+    PropertyTag>
+    : public property_map<Graph, PropertyTag>
+  {};
+
+} // namespace boost
+
+namespace CGAL
+{
+template<typename V, typename Graph>
+boost::tuple<boost::reference_wrapper<V>,
+             boost::reference_wrapper<Graph> >
+make_graph_with_visitor(V& v, Graph& g)
+{
+  return boost::make_tuple(boost::ref(v), boost::ref(g));
+}
+
+template<typename Graph>
+class Visitor_base
+{
+public:
+  typedef typename boost::graph_traits<Graph> gt;
+  typedef typename gt::halfedge_descriptor halfedge_descriptor;
+  typedef typename gt::edge_descriptor edge_descriptor;
+  typedef typename gt::vertex_descriptor vertex_descriptor;
+
+
+};
+
+
+//// OVERLOADS FOR Visitor
+
+template<typename Graph>
+void num_vertices(Visitor_base<Graph>& w)
+{}
+template<typename Graph>
+void num_edges(Visitor_base<Graph>& w)
+{}
+template<typename Graph>
+void degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+  , const Visitor_base<Graph>& w)
+{}
+template <class Graph>
+void out_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+  , const Visitor_base<Graph>& w)
+{}
+template <class Graph>
+void in_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+  , const Visitor_base<Graph>& w)
+{}
+template <class Graph>
+void source(typename boost::graph_traits<Graph>::edge_descriptor e
+  , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void target(typename boost::graph_traits<Graph>::edge_descriptor e
+  , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void edge(typename boost::graph_traits<Graph>::vertex_descriptor u
+        , typename boost::graph_traits<Graph>::vertex_descriptor v
+        , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+inline void vertices(const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+inline void edges(const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+inline void in_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
+                   , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+inline void out_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
+                    , const Visitor_base<Graph> & w)
+{}
+
+//
+// MutableHalfedgeGraph
+// 
+template <class Graph>
+void add_vertex(Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void add_vertex(const typename boost::graph_traits<Graph >::vertex_property_type& p
+               , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v
+                 , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void add_edge(Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e
+               , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1
+              , typename boost::graph_traits< Graph >::vertex_descriptor v
+              , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1
+            , typename boost::graph_traits< Graph >::halfedge_descriptor h2
+            , Visitor_base<Graph> & w)
+{}
+
+//
+// MutableFaceGraph 
+//
+template <class Graph>
+void add_face(Visitor_base<Graph> & w)
+{}
+template <class InputIterator, class Graph>
+void add_face(InputIterator begin, InputIterator end,
+              Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void remove_face(typename boost::graph_traits< Graph >::face_descriptor f
+               , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h
+            , typename boost::graph_traits< Graph >::face_descriptor f
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f
+                , typename boost::graph_traits< Graph >::halfedge_descriptor h
+                , Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
+                , typename boost::graph_traits< Graph >::halfedge_descriptor h
+                , const Visitor_base<Graph> & w)
+{}
+
+//
+// HalfedgeGraph
+//
+template <class Graph>
+void edge(typename boost::graph_traits< Graph >::halfedge_descriptor h
+        , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void halfedge(typename boost::graph_traits< Graph >::edge_descriptor e
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u
+            , typename boost::graph_traits< Graph >::vertex_descriptor v
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void source(typename boost::graph_traits< Graph >::halfedge_descriptor h
+          , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void target(typename boost::graph_traits< Graph >::halfedge_descriptor h
+          , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
+        , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
+        , const Visitor_base<Graph> & w)
+{}
+
+//
+// HalfedgeListGraph
+//
+template <class Graph>
+void halfedges(const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void num_halfedges(const Visitor_base<Graph> & w)
+{}
+
+// Graph
+template <class Graph>
+void face(typename boost::graph_traits< Graph >::halfedge_descriptor h
+        , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void halfedge(typename boost::graph_traits< Graph >::face_descriptor f
+            , const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void faces(const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void num_faces(const Visitor_base<Graph> & w)
+{}
+template <class Graph>
+void is_valid(const Visitor_base<Graph> & w, bool verbose = false)
+{}
+template <class Graph, class PropertyTag>
+void get(PropertyTag ptag, const Visitor_base<Graph>& w)
+{}
+
+
+//// OVERLOADS FOR TUPLE<Visitor, Graph>
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::vertices_size_type
+num_vertices(const boost::tuple<boost::reference_wrapper<Visitor>,
+                                boost::reference_wrapper<Graph> >& w)
+{
+  num_vertices(boost::unwrap_ref(w.get<0>()));
+  return num_vertices(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::edges_size_type
+num_edges(const boost::tuple<boost::reference_wrapper<Visitor>,
+                             boost::reference_wrapper<Graph> >& w)
+{
+  num_edges(boost::unwrap_ref(w.get<0>()));
+  return num_edges(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::degree_size_type
+degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+     , const boost::tuple<boost::reference_wrapper<Visitor>,
+                          boost::reference_wrapper<Graph> >& w)
+{
+  degree(v, boost::unwrap_ref(w.get<0>()));
+  return degree(v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::degree_size_type
+out_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+         , const boost::tuple<boost::reference_wrapper<Visitor>,
+                              boost::reference_wrapper<Graph> >& w)
+{
+  out_degree(v, boost::unwrap_ref(w.get<0>()));
+  return out_degree(v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::degree_size_type
+in_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
+        , const boost::tuple<boost::reference_wrapper<Visitor>,
+                             boost::reference_wrapper<Graph> >& w)
+{
+  in_degree(v, boost::unwrap_ref(w.get<0>()));
+  return in_degree(v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::vertex_descriptor
+source(typename boost::graph_traits<Graph>::edge_descriptor e
+     , const boost::tuple<boost::reference_wrapper<Visitor>,
+                          boost::reference_wrapper<Graph> > & w)
+{
+  source(e, boost::unwrap_ref(w.get<0>()));
+  return source(e, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::vertex_descriptor
+target(typename boost::graph_traits<Graph>::edge_descriptor e
+     , const boost::tuple<boost::reference_wrapper<Visitor>,
+                          boost::reference_wrapper<Graph> > & w)
+{
+  target(e, boost::unwrap_ref(w.get<0>()));
+  return target(e, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+std::pair<typename boost::graph_traits<Graph>::edge_descriptor, bool>
+edge(typename boost::graph_traits<Graph>::vertex_descriptor u
+   , typename boost::graph_traits<Graph>::vertex_descriptor v
+   , const boost::tuple<boost::reference_wrapper<Visitor>,
+                        boost::reference_wrapper<Graph> > & w)
+{
+  edge(u, v, boost::unwrap_ref(w.get<0>()));
+  return edge(u, v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::vertex_iterator>
+vertices(const boost::tuple<boost::reference_wrapper<Visitor>,
+                            boost::reference_wrapper<Graph> >& w)
+{
+  vertices(boost::unwrap_ref(w.get<0>()));
+  return vertices(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::edge_iterator>
+edges(const boost::tuple<boost::reference_wrapper<Visitor>,
+                         boost::reference_wrapper<Graph> >& w)
+{
+  edges(boost::unwrap_ref(w.get<0>()));
+  return edges(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::in_edge_iterator>
+in_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
+       , const boost::tuple<boost::reference_wrapper<Visitor>,
+                            boost::reference_wrapper<Graph> >& w)
+{
+  in_edges(u, boost::unwrap_ref(w.get<0>()));
+  return in_edges(u, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::out_edge_iterator>
+out_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
+        , const boost::tuple<boost::reference_wrapper<Visitor>,
+                             boost::reference_wrapper<Graph> >& w)
+{
+  out_edges(u, boost::unwrap_ref(w.get<0>()));
+  return out_edges(u, boost::unwrap_ref(w.get<1>()));
+}
+
+//
+// MutableHalfedgeGraph
+// 
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::vertex_descriptor
+add_vertex(boost::tuple<boost::reference_wrapper<Visitor>,
+                        boost::reference_wrapper<Graph> >& w)
+{
+  add_vertex(boost::unwrap_ref(w.get<0>()));
+  return add_vertex(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::vertex_descriptor
+add_vertex(const typename boost::graph_traits<Graph >::vertex_property_type& p
+         , boost::tuple<boost::reference_wrapper<Visitor>,
+                        boost::reference_wrapper<Graph> >& w)
+{
+  add_vertex(p, boost::unwrap_ref(w.get<0>()));
+  return add_vertex(p, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v
+            , boost::tuple<boost::reference_wrapper<Visitor>,
+                           boost::reference_wrapper<Graph> >& w)
+{
+  remove_vertex(v, boost::unwrap_ref(w.get<0>()));
+  remove_vertex(v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::edge_descriptor
+add_edge(boost::tuple<boost::reference_wrapper<Visitor>,
+                      boost::reference_wrapper<Graph> >& w)
+{
+  add_edge(boost::unwrap_ref(w.get<0>()));
+  return add_edge(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e
+, boost::tuple<boost::reference_wrapper<Visitor>,
+               boost::reference_wrapper<Graph> >& w)
+{
+  remove_edge(e, boost::unwrap_ref(w.get<0>()));
+  remove_edge(e, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1
+, typename boost::graph_traits< Graph >::vertex_descriptor v
+, boost::tuple<boost::reference_wrapper<Visitor>,
+               boost::reference_wrapper<Graph> >& w)
+{
+  set_target(h1, v, boost::unwrap_ref(w.get<0>()));
+  set_target(h1, v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1
+       , typename boost::graph_traits< Graph >::halfedge_descriptor h2
+       , boost::tuple<boost::reference_wrapper<Visitor >,
+                      boost::reference_wrapper<Graph> >& w)
+{
+  set_next(h1, h2, boost::unwrap_ref(w.get<0>()));
+  set_next(h1, h2, boost::unwrap_ref(w.get<1>()));
+}
+
+//
+// MutableFaceGraph 
+//
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::face_descriptor
+add_face(boost::tuple<boost::reference_wrapper<Visitor>,
+  boost::reference_wrapper<Graph> >& w)
+{
+  add_face(boost::unwrap_ref(w.get<0>()));
+  return add_face(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class InputIterator, class Graph, class Visitor>
+typename boost::graph_traits< Graph >::face_descriptor
+add_face(InputIterator begin,
+         InputIterator end,
+         boost::tuple<boost::reference_wrapper<Visitor>,
+         boost::reference_wrapper<Graph> >& w)
+{
+  add_face(begin, end, boost::unwrap_ref(w.get<0>()));
+  return add_face(begin, end, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+remove_face(typename boost::graph_traits< Graph >::face_descriptor f
+, boost::tuple<boost::reference_wrapper<Visitor>,
+boost::reference_wrapper<Graph> >& w)
+{
+  remove_face(f, boost::unwrap_ref(w.get<0>()));
+  return remove_face(f, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, typename boost::graph_traits< Graph >::face_descriptor f
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+boost::reference_wrapper<Graph> >& w)
+{
+  set_face(h, f, boost::unwrap_ref(w.get<0>()));
+  set_face(h, f, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f
+, typename boost::graph_traits< Graph >::halfedge_descriptor h
+, boost::tuple<boost::reference_wrapper<Visitor>,
+boost::reference_wrapper<Graph> >& w)
+{
+  set_halfedge(f, h, boost::unwrap_ref(w.get<0>()));
+  set_halfedge(f, h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+void
+set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
+, typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+boost::reference_wrapper<Graph> >& w)
+{
+  set_halfedge(v, h, boost::unwrap_ref(w.get<0>()));
+  set_halfedge(v, h, boost::unwrap_ref(w.get<1>()));
+}
+
+//
+// HalfedgeGraph
+//
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::edge_descriptor
+edge(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+                     boost::reference_wrapper<Graph> >& w)
+{
+  edge(h, boost::unwrap_ref(w.get<0>()));
+  return edge(h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+halfedge(typename boost::graph_traits< Graph >::edge_descriptor e
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+                     boost::reference_wrapper<Graph> >& w)
+{
+  halfedge(e, boost::unwrap_ref(w.get<0>()));
+  return halfedge(e, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+                     boost::reference_wrapper<Graph> >& w)
+{
+  halfedge(v, boost::unwrap_ref(w.get<0>()));
+  return halfedge(v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+std::pair< typename boost::graph_traits< Graph >::halfedge_descriptor
+  , bool>
+  halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u
+  , typename boost::graph_traits< Graph >::vertex_descriptor v
+  , const boost::tuple<boost::reference_wrapper<Visitor>,
+                       boost::reference_wrapper<Graph> >& w)
+{
+  halfedge(u, v, boost::unwrap_ref(w.get<0>()));
+  return halfedge(u, v, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+                      boost::reference_wrapper<Graph> >& w)
+{
+  opposite(h, boost::unwrap_ref(w.get<0>()));
+  return opposite(h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::vertex_descriptor
+source(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>,
+                     boost::reference_wrapper<Graph> >& w)
+{
+  source(h, boost::unwrap_ref(w.get<0>()));
+  return source(h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::vertex_descriptor
+target(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  target(h, boost::unwrap_ref(w.get<0>()));
+  return target(h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
+, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  next(outedge, boost::unwrap_ref(w.get<0>()));
+  return next(outedge, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
+, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  prev(outedge, boost::unwrap_ref(w.get<0>()));
+  return prev(outedge, boost::unwrap_ref(w.get<1>()));
+}
+
+//
+// HalfedgeListGraph
+//
+template <class Graph, class Visitor>
+CGAL::Iterator_range<typename boost::graph_traits< Graph >::halfedge_iterator>
+halfedges(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  halfedges(boost::unwrap_ref(w.get<0>()));
+  return halfedges(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedges_size_type
+num_halfedges(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  num_halfedges(boost::unwrap_ref(w.get<0>()));
+  return num_halfedges(boost::unwrap_ref(w.get<1>()));
+}
+
+// Graph
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::face_descriptor
+face(typename boost::graph_traits< Graph >::halfedge_descriptor h
+, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  face(h, boost::unwrap_ref(w.get<0>()));
+  return face(h, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits< Graph >::halfedge_descriptor
+halfedge(typename boost::graph_traits< Graph >::face_descriptor f
+, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  halfedge(f, boost::unwrap_ref(w.get<0>()));
+  return halfedge(f, boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::face_iterator >
+faces(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
+{
+  faces(boost::unwrap_ref(w.get<0>()));
+  return faces(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+typename boost::graph_traits<Graph>::faces_size_type
+num_faces(const boost::tuple<boost::reference_wrapper<Visitor>,
+                             boost::reference_wrapper<Graph> >& w)
+{
+  num_faces(boost::unwrap_ref(w.get<0>()));
+  return num_faces(boost::unwrap_ref(w.get<1>()));
+}
+
+template <class Graph, class Visitor>
+bool is_valid(const boost::tuple<boost::reference_wrapper<Visitor>,
+                                 boost::reference_wrapper<Graph> >& w
+              , bool verbose = false)
+{
+  is_valid(boost::unwrap_ref(w.get<0>()), verbose);
+  return is_valid(boost::unwrap_ref(w.get<1>()), verbose);
+}
+
+template <class Graph, class PropertyTag, class Visitor>
+typename boost::property_map< Graph, PropertyTag >::type
+get(PropertyTag ptag,
+    const boost::tuple<boost::reference_wrapper<Visitor>,
+                       boost::reference_wrapper<Graph> >& w)
+{
+  get(ptag, boost::unwrap_ref(w.get<0>()));
+  return get(ptag, boost::unwrap_ref(w.get<1>()));
+}
+
+}//end namespace CGAL
+
+#endif //CGAL_BOOST_GRAPH_VISITOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/iterator/counting_iterator.hpp b/3rdparty/CGAL-4.8/include/CGAL/boost/iterator/counting_iterator.hpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/iterator/counting_iterator.hpp
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/iterator/counting_iterator.hpp
diff --git a/3rdparty/CGAL-4.6/include/CGAL/boost/iterator/transform_iterator.hpp b/3rdparty/CGAL-4.8/include/CGAL/boost/iterator/transform_iterator.hpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/boost/iterator/transform_iterator.hpp
rename to 3rdparty/CGAL-4.8/include/CGAL/boost/iterator/transform_iterator.hpp
diff --git a/3rdparty/CGAL-4.6/include/CGAL/bounding_box.h b/3rdparty/CGAL-4.8/include/CGAL/bounding_box.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/bounding_box.h
rename to 3rdparty/CGAL-4.8/include/CGAL/bounding_box.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/box_intersection_d.h b/3rdparty/CGAL-4.8/include/CGAL/box_intersection_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/box_intersection_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/box_intersection_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/cartesian_homogeneous_conversion.h b/3rdparty/CGAL-4.8/include/CGAL/cartesian_homogeneous_conversion.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/cartesian_homogeneous_conversion.h
rename to 3rdparty/CGAL-4.8/include/CGAL/cartesian_homogeneous_conversion.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/centroid.h b/3rdparty/CGAL-4.8/include/CGAL/centroid.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/centroid.h
rename to 3rdparty/CGAL-4.8/include/CGAL/centroid.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/certified_numeric_predicates.h b/3rdparty/CGAL-4.8/include/CGAL/certified_numeric_predicates.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/certified_numeric_predicates.h
rename to 3rdparty/CGAL-4.8/include/CGAL/certified_numeric_predicates.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/certified_quotient_predicates.h b/3rdparty/CGAL-4.8/include/CGAL/certified_quotient_predicates.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/certified_quotient_predicates.h
rename to 3rdparty/CGAL-4.8/include/CGAL/certified_quotient_predicates.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_akl_toussaint.h b/3rdparty/CGAL-4.8/include/CGAL/ch_akl_toussaint.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_akl_toussaint.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_akl_toussaint.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_bykat.h b/3rdparty/CGAL-4.8/include/CGAL/ch_bykat.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_bykat.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_bykat.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_eddy.h b/3rdparty/CGAL-4.8/include/CGAL/ch_eddy.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_eddy.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_eddy.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_function_objects_2.h b/3rdparty/CGAL-4.8/include/CGAL/ch_function_objects_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_function_objects_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_function_objects_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_graham_andrew.h b/3rdparty/CGAL-4.8/include/CGAL/ch_graham_andrew.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_graham_andrew.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_graham_andrew.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_jarvis.h b/3rdparty/CGAL-4.8/include/CGAL/ch_jarvis.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_jarvis.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_jarvis.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_melkman.h b/3rdparty/CGAL-4.8/include/CGAL/ch_melkman.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_melkman.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_melkman.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ch_selected_extreme_points_2.h b/3rdparty/CGAL-4.8/include/CGAL/ch_selected_extreme_points_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ch_selected_extreme_points_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ch_selected_extreme_points_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/circulator.h b/3rdparty/CGAL-4.8/include/CGAL/circulator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/circulator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/circulator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/circulator_bases.h b/3rdparty/CGAL-4.8/include/CGAL/circulator_bases.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/circulator_bases.h
rename to 3rdparty/CGAL-4.8/include/CGAL/circulator_bases.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/compare_vertices.h b/3rdparty/CGAL-4.8/include/CGAL/compare_vertices.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/compare_vertices.h
rename to 3rdparty/CGAL-4.8/include/CGAL/compare_vertices.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/compute_average_spacing.h b/3rdparty/CGAL-4.8/include/CGAL/compute_average_spacing.h
new file mode 100644
index 0000000..97d4c64
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/compute_average_spacing.h
@@ -0,0 +1,274 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret
+
+#ifndef CGAL_AVERAGE_SPACING_3_H
+#define CGAL_AVERAGE_SPACING_3_H
+
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/squared_distance_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/assertions.h>
+
+#include <iterator>
+#include <list>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#include <tbb/scalable_allocator.h>  
+#endif // CGAL_LINKED_WITH_TBB
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+namespace internal {
+
+
+/// Computes average spacing of one query point from K nearest neighbors.
+///
+/// \pre `k >= 2`.
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return average spacing (scalar).
+template < typename Kernel,
+           typename Tree >
+typename Kernel::FT
+compute_average_spacing(const typename Kernel::Point_3& query, ///< 3D point whose spacing we want to compute
+                        const Tree& tree,                      ///< KD-tree
+                        unsigned int k)                        ///< number of neighbors
+{
+  // basic geometric types
+  typedef typename Kernel::FT FT;
+  typedef typename Kernel::Point_3 Point;
+
+  // types for K nearest neighbors search
+  typedef Search_traits_3<Kernel> Tree_traits;
+  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // performs k + 1 queries (if unique the query point is
+  // output first). search may be aborted when k is greater
+  // than number of input points
+  Neighbor_search search(tree,query,k+1);
+  Search_iterator search_iterator = search.begin();
+  FT sum_distances = (FT)0.0;
+  unsigned int i;
+  for(i=0;i<(k+1);i++)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+
+    Point p = search_iterator->first;
+    sum_distances += std::sqrt(CGAL::squared_distance(query,p));
+    search_iterator++;
+  }
+
+  // output average spacing
+  return sum_distances / (FT)i;
+}
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+  template <typename Kernel, typename Tree>
+  class Compute_average_spacings {
+    typedef typename Kernel::Point_3 Point;
+    typedef typename Kernel::FT FT;
+    const Tree& tree;
+    const unsigned int k;
+    const std::vector<Point>& input;
+    std::vector<FT>& output;
+
+  public:
+    Compute_average_spacings(Tree& tree, unsigned int k, std::vector<Point>& points,
+			     std::vector<FT>& output)
+      : tree(tree), k (k), input (points), output (output)
+    { }
+    
+    void operator()(const tbb::blocked_range<std::size_t>& r) const
+    {
+      for( std::size_t i = r.begin(); i != r.end(); ++i)
+	output[i] = CGAL::internal::compute_average_spacing<Kernel,Tree>(input[i], tree, k);
+    }
+
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+} /* namespace internal */
+/// \endcond
+
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// Computes average spacing from k nearest neighbors.
+///
+/// \pre `k >= 2.`
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam InputIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `InputIterator`  is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return average spacing (scalar).
+
+// This variant requires the kernel.
+template <typename Concurrency_tag,
+	  typename InputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+typename Kernel::FT
+compute_average_spacing(
+  InputIterator first,  ///< iterator over the first input point.
+  InputIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
+  unsigned int k, ///< number of neighbors.
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  // types for K nearest neighbors search structure
+  typedef typename Kernel::FT FT;
+  typedef Search_traits_3<Kernel> Tree_traits;
+  typedef Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Tree;
+
+  // precondition: at least one element in the container.
+  // to fix: should have at least three distinct points
+  // but this is costly to check
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  // precondition: at least 2 nearest neighbors
+  CGAL_point_set_processing_precondition(k >= 2);
+
+  // Instanciate a KD-tree search.
+  // Note: We have to convert each input iterator to Point_3.
+  std::vector<Point> kd_tree_points; 
+  for(InputIterator it = first; it != beyond; it++)
+  {
+  #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      Point point = get(point_pmap, it);
+  #else
+      Point point = get(point_pmap, *it);
+  #endif
+      kd_tree_points.push_back(point);
+  }
+  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
+
+  // iterate over input points, compute and output normal
+  // vectors (already normalized)
+  FT sum_spacings = (FT)0.0;
+
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+   if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
+   {
+     std::vector<FT> spacings (kd_tree_points.size ());
+     CGAL::internal::Compute_average_spacings<Kernel, Tree>
+       f (tree, k, kd_tree_points, spacings);
+     tbb::parallel_for(tbb::blocked_range<size_t>(0, kd_tree_points.size ()), f);
+     for (unsigned int i = 0; i < spacings.size (); ++ i)
+       sum_spacings += spacings[i];
+   }
+   else
+#endif
+     {
+       for(InputIterator it = first; it != beyond; it++)
+	 {
+	   sum_spacings += internal::compute_average_spacing<Kernel,Tree>(
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+									  get(point_pmap,it),
+#else
+									  get(point_pmap,*it),
+#endif
+									  tree,k);
+	 }
+     }
+   
+  // return average spacing
+   return sum_spacings / (FT)(kd_tree_points.size ());
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the iterator type.
+template <typename Concurrency_tag,
+	  typename InputIterator,
+          typename PointPMap
+>
+typename Kernel_traits<typename boost::property_traits<PointPMap>::value_type>::Kernel::FT
+compute_average_spacing(
+  InputIterator first,    ///< iterator over the first input point.
+  InputIterator beyond,   ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
+  unsigned int k) ///< number of neighbors
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  return compute_average_spacing<Concurrency_tag>(
+    first,beyond,
+    point_pmap,
+    k,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template < typename Concurrency_tag, typename InputIterator >
+typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel::FT
+compute_average_spacing(
+  InputIterator first,    ///< iterator over the first input point.
+  InputIterator beyond,   ///< past-the-end iterator over the input points.
+  unsigned int k) ///< number of neighbors.
+{
+  return compute_average_spacing<Concurrency_tag>(
+    first,beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<InputIterator>::value_type()),
+#endif
+    k);
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_AVERAGE_SPACING_3_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/compute_outer_frame_margin.h b/3rdparty/CGAL-4.8/include/CGAL/compute_outer_frame_margin.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/compute_outer_frame_margin.h
rename to 3rdparty/CGAL-4.8/include/CGAL/compute_outer_frame_margin.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/config.h b/3rdparty/CGAL-4.8/include/CGAL/config.h
new file mode 100644
index 0000000..9586fa1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/config.h
@@ -0,0 +1,519 @@
+// Copyright (c) 1997-2013
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Wieger Wesselink 
+//                 Michael Hoffmann <hoffmann at inf.ethz.ch>
+//                 Sylvain Pion
+//                 Laurent Rineau
+
+#ifndef CGAL_CONFIG_H
+#define CGAL_CONFIG_H
+
+// Workaround for a bug in Boost, that checks WIN64 instead of _WIN64
+//   https://svn.boost.org/trac/boost/ticket/5519
+#if defined(_WIN64) && ! defined(WIN64)
+#  define WIN64
+#endif
+
+#ifdef CGAL_INCLUDE_WINDOWS_DOT_H
+// Mimic users including this file which defines min max macros
+// and other names leading to name clashes
+#include <windows.h>
+#endif
+
+#if defined(CGAL_TEST_SUITE) && defined(NDEBUG)
+#  error The test-suite needs no NDEBUG defined
+#endif // CGAL_TEST_SUITE and NDEBUG
+
+// See [[Small features/Visual_Leak_Detector]] in CGAL developers wiki
+// See also: http://vld.codeplex.com/
+#if defined(CGAL_ENABLE_VLD)
+#  include <vld.h>
+#endif // CGAL_ENABLE_VLD
+
+// Workaround to the following bug:
+// https://bugreports.qt-project.org/browse/QTBUG-22829
+#ifdef Q_MOC_RUN
+// When Qt moc runs on CGAL files, do not process
+// <boost/type_traits/has_operator.hpp>
+#  define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
+#  define BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
+#  define BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
+#  define BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
+#  define BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
+#  define BOOST_TT_HAS_GREATER_HPP_INCLUDED
+#  define BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
+#  define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
+#  define BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_LESS_HPP_INCLUDED
+#  define BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
+#  define BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
+#  define BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
+#  define BOOST_TT_HAS_MINUS_HPP_INCLUDED
+#  define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_MODULUS_HPP_INCLUDED
+#  define BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
+#  define BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
+#  define BOOST_TT_HAS_PLUS_HPP_INCLUDED
+#  define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
+#  define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
+#  define BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
+// do not include <boost/random.hpp> either
+// it includes <boost/type_traits/has_binary_operator.hpp>
+#  define BOOST_RANDOM_HPP
+#endif
+
+// The following header file defines among other things  BOOST_PREVENT_MACRO_SUBSTITUTION 
+#include <boost/config.hpp>
+#include <boost/version.hpp>
+
+// bug-fix for g++-5.x and Boost.Config<1.57
+//    https://svn.boost.org/trac/boost/ticket/10500
+#if BOOST_VERSION < 105700 && BOOST_GCC < 60000 && \
+  ! defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(BOOST_HAS_VARIADIC_TMPL)
+#  undef BOOST_HAS_VARIADIC_TMPL
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+
+#include <CGAL/version.h>
+
+//----------------------------------------------------------------------//
+//  platform specific workaround flags (CGAL_CFG_...)
+//----------------------------------------------------------------------//
+
+#include <CGAL/compiler_config.h>
+
+//----------------------------------------------------------------------//
+//  Support for DLL on Windows (CGAL_EXPORT macro)
+//----------------------------------------------------------------------//
+
+#include <CGAL/export/CGAL.h>
+
+//----------------------------------------------------------------------//
+//  Use an implementation of fabs with sse2 on Windows
+//----------------------------------------------------------------------//
+
+#if (_M_IX86_FP >= 2) || defined(_M_X64)
+#define CGAL_USE_SSE2_FABS
+#endif
+
+//----------------------------------------------------------------------//
+//  Detect features at compile-time. Some macros have only been
+//  introduced as of Boost 1.40. In that case, we simply say that the
+//  feature is not available, even if that is wrong.
+//  ----------------------------------------------------------------------//
+
+#if defined(BOOST_NO_CXX11_RANGE_BASED_FOR) || BOOST_VERSION < 105000
+#define CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR 1
+#endif
+#if defined(BOOST_NO_0X_HDR_ARRAY) || \
+    defined(BOOST_NO_CXX11_HDR_ARRAY) || BOOST_VERSION < 104000
+#define CGAL_CFG_NO_CPP0X_ARRAY 1
+#endif
+#if defined(BOOST_NO_DECLTYPE) || \
+    defined(BOOST_NO_CXX11_DECLTYPE) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_DECLTYPE 1
+#endif
+#if defined(BOOST_NO_DELETED_FUNCTIONS) || \
+    defined(BOOST_NO_DEFAULTED_FUNCTIONS) || \
+    defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || \
+    defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS 1
+#endif
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) || \
+    defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) || \
+    (BOOST_VERSION < 104100)
+#define CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES 1
+#endif
+#if defined(BOOST_NO_INITIALIZER_LISTS) || \
+    defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || (BOOST_VERSION < 103900)
+#define CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS 1
+#endif
+#if defined(BOOST_MSVC)
+#define CGAL_CFG_NO_CPP0X_ISFINITE 1 // used in <CGAL/CORE/Filter.h>
+#endif
+#if defined(BOOST_NO_LONG_LONG) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_LONG_LONG 1
+#endif
+#if defined(BOOST_NO_LAMBDAS) || \
+    defined(BOOST_NO_CXX11_LAMBDAS) || BOOST_VERSION < 104000
+#define CGAL_CFG_NO_CPP0X_LAMBDAS 1
+#endif
+#if defined(BOOST_NO_RVALUE_REFERENCES) || \
+    defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE 1
+#endif
+#if defined(BOOST_NO_STATIC_ASSERT) || \
+    defined(BOOST_NO_CXX11_STATIC_ASSERT) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_STATIC_ASSERT 1
+#endif
+#if defined(BOOST_NO_0X_HDR_TUPLE) || \
+    defined(BOOST_NO_CXX11_HDR_TUPLE) || (BOOST_VERSION < 104000)
+#define CGAL_CFG_NO_CPP0X_TUPLE 1
+#endif
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || \
+    defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES 1
+#endif
+// never use TR1
+#define CGAL_CFG_NO_TR1_ARRAY 1
+// never use TR1
+#define CGAL_CFG_NO_TR1_TUPLE 1
+#if !defined(__GNUC__) || defined(__INTEL_COMPILER)
+#define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1
+#endif
+#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || (BOOST_VERSION < 105100) || _MSC_VER==1800
+#define CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+#if __cplusplus < 201103L && !(_MSC_VER >= 1600)
+#define CGAL_CFG_NO_CPP0X_COPY_N 1
+#define CGAL_CFG_NO_CPP0X_NEXT_PREV 1
+#endif
+#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATIONS) \
+    || defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) \
+    || defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) \
+    || (BOOST_VERSION < 103600)
+#define CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS 1
+#endif
+
+// Some random list to let us write C++11 without thinking about
+// each feature we are using.
+#if __cplusplus >= 201103L && \
+    !defined CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES && \
+    !defined CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE && \
+    !defined CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS && \
+    !defined CGAL_CFG_NO_CPP0X_TUPLE && \
+    !defined CGAL_CFG_NO_CPP0X_UNIFIED_INITIALIZATION_SYNTAX && \
+    !defined CGAL_CFG_NO_CPP0X_STATIC_ASSERT && \
+    !defined CGAL_CFG_NO_CPP0X_DECLTYPE && \
+    !defined CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS && \
+    !defined CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES
+#define CGAL_CXX11
+#endif
+
+#if defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || BOOST_VERSION < 105000
+#define CGAL_CFG_NO_STD_HASH 1
+#endif
+
+//----------------------------------------------------------------------//
+//  auto-link the CGAL library on platforms that support it
+//----------------------------------------------------------------------//
+
+#include <CGAL/auto_link/CGAL.h>
+
+//----------------------------------------------------------------------//
+//  do some post processing for the flags
+//----------------------------------------------------------------------//
+
+#ifdef CGAL_CFG_NO_STL
+#  error "This compiler does not have a working STL"
+#endif
+
+// This macro computes the version number from an x.y.z release number.
+// It only works for public releases.
+#define CGAL_VERSION_NUMBER(x,y,z) (1000001 + 10000*x + 100*y + 10*z) * 1000
+
+#ifndef CGAL_NO_DEPRECATED_CODE
+#define CGAL_BEGIN_NAMESPACE  namespace CGAL { 
+#define CGAL_END_NAMESPACE }
+#endif
+
+
+#ifndef CGAL_CFG_NO_CPP0X_LONG_LONG
+#  define CGAL_USE_LONG_LONG
+#endif
+
+
+#ifndef CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG
+#  define CGAL_TYPENAME_DEFAULT_ARG typename
+#else
+#  define CGAL_TYPENAME_DEFAULT_ARG
+#endif
+
+
+#ifdef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
+#  define CGAL_DELETED
+#  define CGAL_EXPLICITLY_DEFAULTED
+#else
+#  define CGAL_DELETED = delete
+#  define CGAL_EXPLICITLY_DEFAULTED = default
+#endif
+
+
+// Big endian or little endian machine.
+// ====================================
+
+#if (BOOST_VERSION >= 105500)
+#  include <boost/predef.h>
+#  if BOOST_ENDIAN_BIG_BYTE
+#    define CGAL_BIG_ENDIAN
+#  elif BOOST_ENDIAN_LITTLE_BYTE
+#    define CGAL_LITTLE_ENDIAN
+#  else
+#    error Unknown endianness
+#  endif
+#elif defined (__GLIBC__)
+#  include <endian.h>
+#  if (__BYTE_ORDER == __LITTLE_ENDIAN)
+#    define CGAL_LITTLE_ENDIAN
+#  elif (__BYTE_ORDER == __BIG_ENDIAN)
+#    define CGAL_BIG_ENDIAN
+#  else
+#    error Unknown endianness
+#  endif
+#elif defined(__sparc) || defined(__sparc__) \
+   || defined(_POWER) || defined(__powerpc__) \
+   || defined(__ppc__) || defined(__hppa) \
+   || defined(_MIPSEB) || defined(_POWER) \
+   || defined(__s390__)
+#  define CGAL_BIG_ENDIAN
+#elif defined(__i386__) || defined(__alpha__) \
+   || defined(__x86_64) || defined(__x86_64__) \
+   || defined(__ia64) || defined(__ia64__) \
+   || defined(_M_IX86) || defined(_M_IA64) \
+   || defined(_M_ALPHA) || defined(_WIN64)
+#  define CGAL_LITTLE_ENDIAN
+#else
+#  error Unknown endianness
+#endif
+
+
+// Symbolic constants to tailor inlining. Inlining Policy.
+// =======================================================
+#ifndef CGAL_MEDIUM_INLINE
+#  define CGAL_MEDIUM_INLINE inline
+#endif
+
+#ifndef CGAL_LARGE_INLINE
+#  define CGAL_LARGE_INLINE
+#endif
+
+#ifndef CGAL_HUGE_INLINE
+#  define CGAL_HUGE_INLINE
+#endif
+
+
+//----------------------------------------------------------------------//
+// SunPRO specific.
+//----------------------------------------------------------------------//
+#ifdef __SUNPRO_CC
+#  include <iterator>
+#  ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+#    error "CGAL does not support SunPRO with the old Rogue Wave STL: use STLPort."
+#  endif
+#endif
+
+#ifdef __SUNPRO_CC
+// SunPRO 5.9 emits warnings "The variable tag has not yet been assigned a value"
+// even for empty "tag" variables.  No way to write a config/testfile for this.
+#  define CGAL_SUNPRO_INITIALIZE(C) C
+#else
+#  define CGAL_SUNPRO_INITIALIZE(C)
+#endif
+
+//----------------------------------------------------------------------//
+// MacOSX specific.
+//----------------------------------------------------------------------//
+
+#ifdef __APPLE__
+#  if defined(__GNUG__) && (__GNUG__ == 4) && (__GNUC_MINOR__ == 0) \
+   && defined(__OPTIMIZE__) && !defined(CGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG)
+#    warning "Your configuration may exhibit run-time errors in CGAL code"
+#    warning "This appears with g++ 4.0 on MacOSX when optimizing"
+#    warning "You can disable this warning using -DCGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG"
+#    warning "For more information, see http://www.cgal.org/FAQ.html#mac_optimization_bug"
+#  endif
+#endif
+
+//-------------------------------------------------------------------//
+// When the global min and max are no longer defined (as macros) 
+// because of NOMINMAX flag definition, we define our own global 
+// min/max functions to make the Microsoft headers compile. (afxtempl.h)
+// Users that does not want the global min/max 
+// should define CGAL_NOMINMAX
+//-------------------------------------------------------------------//
+#include <algorithm>
+#if defined NOMINMAX && !defined CGAL_NOMINMAX
+using std::min;
+using std::max;
+#endif
+
+//-------------------------------------------------------------------//
+// Is Geomview usable ?
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
+#  define CGAL_USE_GEOMVIEW
+#endif
+
+
+//-------------------------------------------------------------------//
+// Compilers provide different macros to access the current function name
+#ifdef _MSC_VER
+#  define CGAL_PRETTY_FUNCTION __FUNCSIG__
+#elif defined __GNUG__
+#  define CGAL_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#else 
+#  define CGAL_PRETTY_FUNCTION __func__
+// with sunpro, this requires -features=extensions
+#endif
+
+// Macro to detect GCC versions.
+// It evaluates to 0 if the compiler is not GCC. Be careful that the Intel
+// compilers on Linux, and the LLVM/clang compiler both define GCC version
+// macros.
+#define CGAL_GCC_VERSION (__GNUC__ * 10000       \
+                          + __GNUC_MINOR__ * 100 \
+                          + __GNUC_PATCHLEVEL__)
+
+// Macros to detect features of clang. We define them for the other
+// compilers.
+// See http://clang.llvm.org/docs/LanguageExtensions.html
+#ifndef __has_feature
+  #define __has_feature(x) 0  // Compatibility with non-clang compilers.
+#endif
+#ifndef __has_include
+  #define __has_include(x) 0  // Compatibility with non-clang compilers.
+#endif
+#ifndef __has_extension
+  #define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
+#endif
+#ifndef __has_builtin
+  #define __has_builtin(x) 0  // Compatibility with non-clang compilers.
+#endif
+#ifndef __has_attribute
+  #define __has_attribute(x) 0  // Compatibility with non-clang compilers.
+#endif
+#ifndef __has_warning
+  #define __has_warning(x) 0  // Compatibility with non-clang compilers.
+#endif
+
+// Macro to trigger deprecation warnings
+#ifdef CGAL_NO_DEPRECATION_WARNINGS
+#  define CGAL_DEPRECATED
+#elif defined(__GNUC__) || __has_attribute(__deprecated__)
+#  define CGAL_DEPRECATED __attribute__((__deprecated__))
+#elif defined (_MSC_VER) && (_MSC_VER > 1300)
+#  define CGAL_DEPRECATED __declspec(deprecated)
+#else
+#  define CGAL_DEPRECATED
+#endif
+
+
+// Macro to specify a 'noreturn' attribute.
+#if defined(__GNUG__) || __has_attribute(__noreturn__)
+#  define CGAL_NORETURN  __attribute__ ((__noreturn__))
+#else
+#  define CGAL_NORETURN
+#endif
+
+// Macro to specify a 'unused' attribute.
+#if defined(__GNUG__) || __has_attribute(__unused__)
+#  define CGAL_UNUSED  __attribute__ ((__unused__))
+#else
+#  define CGAL_UNUSED
+#endif
+
+// Macro CGAL_ASSUME
+// Call a builtin of the compiler to pass a hint to the compiler
+#if __has_builtin(__builtin_unreachable) || (CGAL_GCC_VERSION >= 40500 && !__STRICT_ANSI__)
+// From g++ 4.5, there exists a __builtin_unreachable()
+// Also in LLVM/clang
+#  define CGAL_ASSUME(EX) if(!(EX)) { __builtin_unreachable(); }
+#elif defined(_MSC_VER)
+// MSVC has __assume
+#  define CGAL_ASSUME(EX) __assume(EX)
+#endif
+// If CGAL_ASSUME is not defined, then CGAL_assume and CGAL_assume_code are
+// defined differently, in <CGAL/assertions.h>
+
+// If CGAL_HAS_THREADS is not defined, then CGAL code assumes
+// it can do any thread-unsafe things (like using static variables).
+#if !defined CGAL_HAS_THREADS && !defined CGAL_HAS_NO_THREADS
+#  if defined BOOST_HAS_THREADS || defined _OPENMP
+#    define CGAL_HAS_THREADS
+#  endif
+#endif
+
+#if __has_feature(cxx_thread_local) || \
+    ( (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L ) || \
+    ( _MSC_VER >= 1900 )
+#define CGAL_CAN_USE_CXX11_THREAD_LOCAL
+#endif
+
+#if ( BOOST_VERSION >= 105000 && ! defined(BOOST_NO_CXX11_HDR_MUTEX) ) || \
+    (__has_include(<mutex>) && __cplusplus >= 201103L ) | \
+    ( (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L ) || \
+    ( _MSC_VER >= 1700 )
+#define CGAL_CAN_USE_CXX11_MUTEX
+#endif
+
+#if ( BOOST_VERSION >= 105600 && ! defined(BOOST_NO_CXX11_HDR_ATOMIC) ) || \
+    (__has_include(<atomic>) && __cplusplus >= 201103L ) || \
+    ( (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L ) || \
+    ( _MSC_VER >= 1700 )
+#define CGAL_CAN_USE_CXX11_ATOMIC
+#endif
+
+// Support for LEDA with threads
+//   Not that, if CGAL_HAS_THREADS is defined, and you want to use LEDA,
+//   you must link with a version of LEDA libraries that support threads.
+#if defined(CGAL_HAS_THREADS) && CGAL_USE_LEDA
+#  define LEDA_MULTI_THREAD 1
+#endif
+// Support for LEDA_numbers on Windows
+#define LEDA_NUMBERS_DLL 1
+
+// Helper macros to disable macros
+#if defined(__clang__) || (BOOST_GCC >= 40600)
+#  define CGAL_PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
+#  define CGAL_PRAGMA_DIAG_POP  _Pragma("GCC diagnostic pop")
+#else
+#  define CGAL_PRAGMA_DIAG_PUSH
+#  define CGAL_PRAGMA_DIAG_POP
+#endif
+
+namespace CGAL {
+
+// Typedef for the type of NULL.
+typedef const void * Nullptr_t;   // Anticipate C++0x's std::nullptr_t
+
+} //namespace CGAL
+
+//Support for c++11 noexcept
+#if BOOST_VERSION > 104600 && !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
+#define CGAL_NOEXCEPT(x) noexcept(x)
+#else
+#define CGAL_NOEXCEPT(x)
+#endif
+
+#ifndef CGAL_NO_ASSERTIONS
+#  define CGAL_NO_ASSERTIONS_BOOL false
+#else
+#  define CGAL_NO_ASSERTIONS_BOOL true
+#endif
+
+#endif // CGAL_CONFIG_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/connect_holes.h b/3rdparty/CGAL-4.8/include/CGAL/connect_holes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/connect_holes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/connect_holes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constant.h b/3rdparty/CGAL-4.8/include/CGAL/constant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/Polygon_offset_cons_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/Polygon_offset_cons_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/Polygon_offset_cons_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/Polygon_offset_cons_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h
new file mode 100644
index 0000000..ec50e18
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h
@@ -0,0 +1,541 @@
+// Copyright (c) 2004   INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Mariette Yvinec <Mariette.Yvinec at sophia.inria.fr>
+
+#ifndef CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
+#define CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
+
+namespace CGAL {
+
+template <class FT>
+void
+determinants_for_weighted_circumcenterC3(
+		const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
+                FT &num_x,  FT &num_y, FT &num_z, FT& den)
+{
+  // translate origin to p
+  // and compute determinants for weighted_circumcenter and
+  // circumradius
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz) - qw + pw;
+  FT rpx = rx-px;
+  FT rpy = ry-py;
+  FT rpz = rz-pz;
+  FT rp2 = CGAL_NTS square(rpx) + CGAL_NTS square(rpy) +
+           CGAL_NTS square(rpz) - rw + pw;
+  FT spx = sx-px;
+  FT spy = sy-py;
+  FT spz = sz-pz;
+  FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) +
+           CGAL_NTS square(spz) - sw + pw;
+
+  num_x = determinant(qpy,qpz,qp2,
+			    rpy,rpz,rp2,
+			    spy,spz,sp2);
+  num_y = determinant(qpx,qpz,qp2,
+			    rpx,rpz,rp2,
+			    spx,spz,sp2);
+  num_z = determinant(qpx,qpy,qp2,
+			    rpx,rpy,rp2,
+			    spx,spy,sp2);
+  den   = determinant(qpx,qpy,qpz,
+			    rpx,rpy,rpz,
+			    spx,spy,spz);
+}
+
+template <class FT>
+void
+determinants_for_circumcenterC3(
+		const FT &px, const FT &py, const FT &pz,
+                const FT &qx, const FT &qy, const FT &qz,
+                const FT &rx, const FT &ry, const FT &rz,
+                const FT &sx, const FT &sy, const FT &sz,
+                FT &num_x,  FT &num_y, FT &num_z, FT& den)
+{
+  // translate origin to p
+  // and compute determinants for weighted_circumcenter and
+  // circumradius
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz);
+  FT rpx = rx-px;
+  FT rpy = ry-py;
+  FT rpz = rz-pz;
+  FT rp2 = CGAL_NTS square(rpx) + CGAL_NTS square(rpy) +
+           CGAL_NTS square(rpz);
+  FT spx = sx-px;
+  FT spy = sy-py;
+  FT spz = sz-pz;
+  FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) +
+           CGAL_NTS square(spz);
+
+  num_x = determinant(qpy,qpz,qp2,
+			    rpy,rpz,rp2,
+			    spy,spz,sp2);
+  num_y = determinant(qpx,qpz,qp2,
+			    rpx,rpz,rp2,
+			    spx,spz,sp2);
+  num_z = determinant(qpx,qpy,qp2,
+			    rpx,rpy,rp2,
+			    spx,spy,sp2);
+  den   = determinant(qpx,qpy,qpz,
+			    rpx,rpy,rpz,
+			    spx,spy,spz);
+}
+
+
+template < class FT>
+void
+weighted_circumcenterC3(
+		const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
+                FT &x, FT &y, FT &z)
+{
+  // this function  compute the weighted circumcenter point only
+
+  // Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   sx, sy, sz, sw,
+					   num_x,  num_y, num_z,den);
+
+  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
+   FT inv = FT(1)/(FT(2) * den);
+
+  x = px + num_x*inv;
+  y = py - num_y*inv;
+  z = pz + num_z*inv;
+}
+
+template < class FT>
+void
+weighted_circumcenterC3(
+		const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
+                FT &x, FT &y, FT &z, FT &w)
+{
+  // this function  compute the weighted circumcenter point
+  // and the squared weighted circumradius
+
+  // Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   sx, sy, sz, sw,
+					   num_x,  num_y, num_z, den);
+
+  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
+   FT inv = FT(1)/(FT(2) * den);
+
+  x = px + num_x*inv;
+  y = py - num_y*inv;
+  z = pz + num_z*inv;
+
+  w = (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
+      *CGAL_NTS square(inv) - pw;
+}
+
+
+template< class FT >
+FT
+squared_radius_orthogonal_sphereC3(
+  const FT &px, const FT &py, const FT &pz, const FT  &pw,
+  const FT &qx, const FT &qy, const FT &qz, const FT  &qw,
+  const FT &rx, const FT &ry, const FT &rz, const FT  &rw,
+  const FT &sx, const FT &sy, const FT &sz, const FT  &sw)
+{
+
+  // this function  compute the squared weighted circumradius only
+
+  // Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   sx, sy, sz, sw,
+					   num_x, num_y, num_z,den);
+
+  CGAL_triangulation_assertion( ! CGAL_NTS is_zero(den) );
+   FT inv = FT(1)/(FT(2) * den);
+
+   return
+    (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
+    *CGAL_NTS square(inv) - pw;
+}
+
+
+template <class FT>
+void
+determinants_for_weighted_circumcenterC3(
+	        const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+		FT &num_x,  FT &num_y, FT &num_z, FT &den)
+{
+  // translate origin to p
+  // and compute determinants for weighted_circumcenter and
+  // circumradius
+
+  // Translate s to origin to simplify the expression.
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz) - qw + pw;
+  FT rpx = rx-px;
+  FT rpy = ry-py;
+  FT rpz = rz-pz;
+  FT rp2 = CGAL_NTS square(rpx) + CGAL_NTS square(rpy) +
+           CGAL_NTS square(rpz) - rw + pw;
+
+  FT sx = qpy*rpz-qpz*rpy;
+  FT sy = qpz*rpx-qpx*rpz;
+  FT sz = qpx*rpy-qpy*rpx;
+
+  // The following determinants can be developped and simplified.
+  //
+  // FT num_x = determinant(qpy,qpz,qp2,
+  //                              rpy,rpz,rp2,
+  //                              sy,sz,FT(0));
+  // FT num_y = determinant(qpx,qpz,qp2,
+  //                              rpx,rpz,rp2,
+  //                              sx,sz,FT(0));
+  // FT num_z = determinant(qpx,qpy,qp2,
+  //                              rpx,rpy,rp2,
+  //                              sx,sy,FT(0));
+
+  num_x = qp2 * determinant(rpy,rpz,sy,sz)
+        - rp2 * determinant(qpy,qpz,sy,sz);
+
+  num_y = qp2 * determinant(rpx,rpz,sx,sz)
+	- rp2 * determinant(qpx,qpz,sx,sz);
+
+  num_z = qp2 * determinant(rpx,rpy,sx,sy)
+	- rp2 * determinant(qpx,qpy,sx,sy);
+
+  den   = determinant(qpx,qpy,qpz,
+			    rpx,rpy,rpz,
+			    sx,sy,sz);
+}
+
+template < class FT >
+void
+weighted_circumcenterC3(
+                  const FT &px, const FT &py, const FT &pz, const FT &pw,
+		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+		  const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+		  FT &x, FT &y, FT &z)
+{
+  // this function  compute the weighted circumcenter point only
+
+// Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   num_x,  num_y, num_z, den);
+
+  CGAL_triangulation_assertion( den != FT(0) );
+  FT inv = FT(1)/(FT(2) * den);
+
+  x = px + num_x*inv;
+  y = py - num_y*inv;
+  z = pz + num_z*inv;
+}
+
+
+template < class FT >
+void
+weighted_circumcenterC3(
+                  const FT &px, const FT &py, const FT &pz, const FT &pw,
+		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+		  const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+		  FT &x, FT &y, FT &z, FT &w)
+{
+  // this function  compute the weighted circumcenter and
+  // the weighted squared circumradius
+
+// Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   num_x,  num_y, num_z, den);
+
+  CGAL_triangulation_assertion( den != FT(0) );
+  FT inv = FT(1)/(FT(2) * den);
+
+  x = px + num_x*inv;
+  y = py - num_y*inv;
+  z = pz + num_z*inv;
+
+  w = (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
+      *CGAL_NTS square(inv)  - pw;
+}
+
+
+template< class FT >
+CGAL_MEDIUM_INLINE
+FT
+squared_radius_smallest_orthogonal_sphereC3(
+  const FT &px, const FT &py, const FT &pz, const FT  &pw,
+  const FT &qx, const FT &qy, const FT &qz, const FT  &qw,
+  const FT &rx, const FT &ry, const FT &rz, const FT  &rw)
+{
+  // this function  compute the weighted squared circumradius only
+
+// Translate p to origin and compute determinants
+  FT num_x, num_y, num_z, den;
+  determinants_for_weighted_circumcenterC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   num_x,  num_y, num_z, den);
+
+  CGAL_triangulation_assertion( den != FT(0) );
+  FT inv = FT(1)/(FT(2) * den);
+
+ return
+    (CGAL_NTS square(num_x)+CGAL_NTS square(num_y)+CGAL_NTS square(num_z))
+     *CGAL_NTS square(inv)  - pw;
+}
+
+
+
+template < class FT >
+void
+weighted_circumcenterC3(
+                  const FT &px, const FT &py, const FT &pz, const FT &pw,
+		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+		  FT &x, FT &y, FT &z)
+{
+// this function  compute the weighted circumcenter point only
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz);
+  FT inv = FT(1)/(FT(2)*qp2);
+  FT alpha = 1/FT(2) + (pw-qw)*inv;
+
+  x = px + alpha * qpx;
+  y = py + alpha * qpy;
+  z = pz + alpha * qpz;
+}
+
+
+template < class FT >
+void
+weighted_circumcenterC3(
+                  const FT &px, const FT &py, const FT &pz, const FT &pw,
+		  const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+		  FT &x, FT &y, FT &z, FT &w)
+{
+ // this function  compute the weighted circumcenter point and
+  // the weighted circumradius
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz);
+  FT inv = FT(1)/(FT(2)*qp2);
+  FT alpha = 1/FT(2) + (pw-qw)*inv;
+
+  x = px + alpha * qpx;
+  y = py + alpha * qpy;
+  z = pz + alpha * qpz;
+
+  w = CGAL_NTS square(alpha)*qp2 - pw;
+}
+
+
+template< class FT >
+CGAL_MEDIUM_INLINE
+FT
+squared_radius_smallest_orthogonal_sphereC3(
+  const FT &px, const FT &py, const FT &pz, const FT  &pw,
+  const FT &qx, const FT &qy, const FT &qz, const FT  &qw)
+{
+  // this function  computes
+  // the weighted circumradius only
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz);
+  FT inv = FT(1)/(FT(2)*qp2);
+  FT alpha = 1/FT(2) + (pw-qw)*inv;
+
+  return  CGAL_NTS square(alpha)*qp2 - pw;
+}
+
+
+template< class FT >
+FT
+power_productC3(
+  const FT &px, const FT &py, const FT &pz, const FT  &pw,
+  const FT &qx, const FT &qy, const FT &qz, const FT  &qw)
+{
+  // computes the power product of two weighted points
+  FT qpx = qx-px;
+  FT qpy = qy-py;
+  FT qpz = qz-pz;
+  FT qp2 = CGAL_NTS square(qpx) + CGAL_NTS square(qpy) +
+           CGAL_NTS square(qpz);
+  return qp2 - pw - qw ;
+}
+
+template < class RT , class We>
+void
+radical_axisC3(const RT &px, const RT &py, const RT &pz, const We & /* pw */,
+	       const RT &qx, const RT &qy, const RT &qz, const We & /* qw */,
+	       const RT &rx, const RT &ry, const RT &rz, const We & /* rw */,
+	       RT &a, RT &b, RT& c )
+{
+  RT dqx=qx-px, dqy=qy-py, dqz=qz-pz, drx=rx-px, dry=ry-py, drz=rz-pz;
+
+  //il manque des tests...
+
+  a= RT(1)*determinant(dqy, dqz, dry, drz);
+  b= - RT(1)*determinant(dqx, dqz, drx, drz);
+  c= RT(1)*determinant(dqx, dqy, drx, dry);
+}
+
+// function used in critical_squared_radiusC3
+// power ( t, tw) with respect to
+// circle orthogonal (p,pw), (q,qw), (r,rw), (s,sw)
+template < class FT>
+FT
+power_to_orthogonal_sphereC3(
+                const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
+                const FT &tx, const FT &ty, const FT &tz, const FT &tw)
+{
+   //to get the value of the determinant
+   // We translate the points so that t  becomes the origin.
+    FT dpx = px - tx;
+    FT dpy = py - ty;
+    FT dpz = pz - tz;
+    FT dpt = CGAL_NTS square(dpx) + CGAL_NTS square(dpy) +
+             CGAL_NTS square(dpz) - pw + tw ;
+    FT dqx = qx - tx;
+    FT dqy = qy - ty;
+    FT dqz = qz - tz;
+    FT dqt = CGAL_NTS square(dqx) + CGAL_NTS square(dqy) +
+             CGAL_NTS square(dqz) - qw + tw;
+    FT drx = rx - tx;
+    FT dry = ry - ty;
+    FT drz = rz - tz;
+    FT drt = CGAL_NTS square(drx) + CGAL_NTS square(dry) +
+             CGAL_NTS square(drz) - rw + tw;
+    FT dsx = sx - tx;
+    FT dsy = sy - ty;
+    FT dsz = sz - tz;
+    FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) +
+             CGAL_NTS square(dsz) - sw + tw;
+
+    return determinant(dpx, dpy, dpz, dpt,
+			     dqx, dqy, dqz, dqt,
+			     drx, dry, drz, drt,
+			     dsx, dsy, dsz, dst);
+
+}
+
+
+
+// compute the critical weight tw
+// where weighted point t is orthogonal to weighted points p, q,r,s
+template < class FT>
+FT
+critical_squared_radiusC3(
+                const FT &px, const FT &py, const FT &pz, const FT &pw,
+                const FT &qx, const FT &qy, const FT &qz, const FT &qw,
+                const FT &rx, const FT &ry, const FT &rz, const FT &rw,
+                const FT &sx, const FT &sy, const FT &sz, const FT &sw,
+                const FT &tx, const FT &ty, const FT &tz, const FT &  )
+{
+  // the 5x5 det  is a linear function of tw ff(tw)= ff(0) + tw ff(1)
+  // the critical value for tw is  - ff(0)/( ff(1) - ff(0))
+
+
+    FT ff0 =  power_to_orthogonal_sphereC3(px, py, pz, pw,
+					   qx, qy, qz, qw,
+					   rx, ry, rz, rw,
+					   sx, sy, sz, sw,
+					   tx, ty, tz, FT(0));
+
+    FT ff1 = power_to_orthogonal_sphereC3(px, py, pz, pw,
+					    qx, qy, qz, qw,
+					    rx, ry, rz, rw,
+					    sx, sy, sz, sw,
+					    tx, ty, tz, FT(1));
+
+    return   -ff0/(ff1 - ff0);
+}
+
+
+
+ // I will use this to test if the radial axis of three spheres
+  // intersect the triangle formed by the centers.
+//   // resolution of the system (where we note c the center)
+//   // |       dc^2 = cw + rw
+//   // |  (dp-dc)^2 = pw + cw
+//   // |  (dq-dc)^2 = qw + cw
+//   // |         dc = Lamdba*dp + Mu*dq
+
+//   FT FT2(2);
+//   FT dpx = px-rx;
+//   FT dpy = py-ry;
+//   FT dpz = pz-rz;
+//   FT dp = CGAL_NTS square(dpx)+CGAL_NTS square(dpy)+CGAL_NTS  square(dpz);
+//   FT dpp = dp-pw+rw;
+//   FT dqx = qx-rx;
+//   FT dqy = qy-ry;
+//   FT dqz = qz-rz;
+//   FT dq = CGAL_NTS square(dqx)+CGAL_NTS square(dqy)+CGAL_NTS square(dqz);
+//   FT dqq = dq-qw+rw;
+//   FT dpdq = dpx*dqx+dpy*dqy+dpz*dqz;
+//   FT denom = FT2*(dp*dq-CGAL_NTS square(dpdq));
+//   FT Lambda = (dpp*dq-dqq*dpdq)/denom;
+//   FT Mu = (dqq*dp-dpp*dpdq)/denom;
+
+//   return (CGAL_NTS square(Lambda)*dp+CGAL_NTS square(Mu)*dq
+// 	  +FT2*Lambda*Mu*dpdq - rw);
+
+
+
+
+} //namespace CGAL
+#endif //CGAL_CONSTRUCTIONS_ON_WEIGHTED_POINTS_CARTESIAN_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/kernel_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/kernel_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/kernel_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/kernel_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/kernel_ftC3.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/kernel_ftC3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/kernel_ftC3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/kernel_ftC3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions/squared_radius_smallest_orthogonalcircle_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions/squared_radius_smallest_orthogonalcircle_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions/squared_radius_smallest_orthogonalcircle_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions/squared_radius_smallest_orthogonalcircle_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions_d.h b/3rdparty/CGAL-4.8/include/CGAL/constructions_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions_on_weighted_points_cartesian_2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions_on_weighted_points_cartesian_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions_on_weighted_points_cartesian_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions_on_weighted_points_cartesian_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/constructions_on_weighted_points_homogeneous_2.h b/3rdparty/CGAL-4.8/include/CGAL/constructions_on_weighted_points_homogeneous_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/constructions_on_weighted_points_homogeneous_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/constructions_on_weighted_points_homogeneous_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convert_to_bfi.h b/3rdparty/CGAL-4.8/include/CGAL/convert_to_bfi.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convert_to_bfi.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convert_to_bfi.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_decomposition_3.h b/3rdparty/CGAL-4.8/include/CGAL/convex_decomposition_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_decomposition_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_decomposition_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_2.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_hull_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_hull_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/convex_hull_3.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_3.h
new file mode 100644
index 0000000..b828c79
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_3.h
@@ -0,0 +1,955 @@
+// Copyright (c) 2001,2011  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Susan Hert <hert at mpi-sb.mpg.de>
+//               : Amol Prakash <prakash at mpi-sb.mpg.de>
+//               : Andreas Fabri
+
+#ifndef CGAL_CONVEX_HULL_3_H
+#define CGAL_CONVEX_HULL_3_H
+#include <CGAL/basic.h>
+#include <CGAL/algorithm.h> 
+#include <CGAL/convex_hull_2.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Projection_traits_xy_3.h>
+#include <CGAL/Projection_traits_xz_3.h>
+#include <CGAL/Projection_traits_yz_3.h>
+#include <CGAL/Convex_hull_traits_3.h>
+#include <CGAL/Convex_hull_2/ch_assertions.h>
+#include <CGAL/Triangulation_data_structure_2.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/Simple_cartesian.h>
+#include <iostream>
+#include <algorithm>
+#include <utility>
+#include <list>
+#include <map>
+#include <vector>
+#include <boost/bind.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <CGAL/internal/Exact_type_selector.h>
+
+
+#ifndef CGAL_CH_NO_POSTCONDITIONS
+#include <CGAL/convexity_check_3.h>
+#endif // CGAL_CH_NO_POSTCONDITIONS
+
+
+namespace CGAL {
+
+namespace internal{  namespace Convex_hull_3{
+
+//struct to select the default traits class for computing convex hull
+template< class Point_3,
+          class Is_floating_point=typename boost::is_floating_point<typename Kernel_traits<Point_3>::Kernel::FT>::type,
+          class Has_filtered_predicates_tag=typename Kernel_traits<Point_3>::Kernel::Has_filtered_predicates_tag >
+struct Default_traits_for_Chull_3{
+  typedef typename Kernel_traits<Point_3>::Kernel type;
+};
+
+//FT is a floating point type and Kernel is a filtered kernel
+template <class Point_3>
+struct Default_traits_for_Chull_3<Point_3,boost::true_type,Tag_true>{
+  typedef Convex_hull_traits_3< typename Kernel_traits<Point_3>::Kernel, Tag_true > type;
+};
+
+template <class Traits>
+struct Default_polyhedron_for_Chull_3{
+  typedef CGAL::Polyhedron_3<Traits> type;
+};
+
+template <class K,class Tag>
+struct Default_polyhedron_for_Chull_3<Convex_hull_traits_3<K, Tag> >{
+  typedef typename  Convex_hull_traits_3<K, Tag>::Polyhedron_3 type;
+};
+ 
+//utility class to select the right version of internal predicate Is_on_positive_side_of_plane_3
+template <class Traits,
+          class Is_floating_point=
+            typename boost::is_floating_point<typename Kernel_traits<typename Traits::Point_3>::Kernel::FT>::type,
+          class Has_filtered_predicates_tag=typename Kernel_traits<typename Traits::Point_3>::Kernel::Has_filtered_predicates_tag,
+          class Has_cartesian_tag=typename Kernel_traits<typename Traits::Point_3>::Kernel::Kernel_tag,
+          class Has_classical_point_type =
+              typename boost::is_same<
+                typename Kernel_traits<typename Traits::Point_3>::Kernel::Point_3,
+                typename Traits::Point_3  >::type
+         >
+struct Use_advanced_filtering{
+  typedef CGAL::Tag_false type;
+};
+
+template <class Traits>
+struct Use_advanced_filtering<Traits,boost::true_type,Tag_true,Cartesian_tag,boost::true_type>{
+  typedef typename Kernel_traits<typename Traits::Point_3>::Kernel K;
+  typedef CGAL::Boolean_tag<K::Has_static_filters> type;
+};
+
+//Predicates internally used
+template <class Traits,class Tag_use_advanced_filtering=typename Use_advanced_filtering<Traits>::type >
+class Is_on_positive_side_of_plane_3{
+  typedef typename Traits::Point_3 Point_3;
+  typename Traits::Plane_3 plane;
+  typename Traits::Has_on_positive_side_3 has_on_positive_side;
+public:
+  typedef Protect_FPU_rounding<false> Protector;
+
+  Is_on_positive_side_of_plane_3(const Traits& traits,const Point_3& p,const Point_3& q,const Point_3& r)
+  :plane(traits.construct_plane_3_object()(p,q,r)),has_on_positive_side(traits.has_on_positive_side_3_object()) {}
+    
+  bool operator() (const Point_3& s) const 
+  {
+    return has_on_positive_side(plane,s);
+  }
+};
+  
+
+//This predicate uses copy of the code from the statically filtered version of
+//Orientation_3. The rational is that the plane is a member of the functor
+//so optimization are done to avoid doing several time operations on the plane.
+//The main operator() first tries the static version of the predicate, then uses
+//interval arithmetic (the protector must be created before using this predicate)
+//and in case of failure, exact arithmetic is used.
+template <class Kernel>
+class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel, Tag_true>,Tag_true>{
+  typedef Simple_cartesian<CGAL::internal::Exact_field_selector<double>::Type>         PK;
+  typedef Simple_cartesian<Interval_nt_advanced >                               CK;  
+  typedef Convex_hull_traits_3<Kernel, Tag_true>                                Traits;
+  typedef typename Traits::Point_3                                              Point_3;
+  
+  Cartesian_converter<Kernel,CK>                        to_CK;
+  Cartesian_converter<Kernel,PK>                        to_PK;
+
+  const Point_3& p,q,r;
+  mutable typename CK::Plane_3* ck_plane;
+  mutable typename PK::Plane_3* pk_plane;
+ 
+  double m10,m20,m21,Maxx,Maxy,Maxz;
+  
+  static const int STATIC_FILTER_FAILURE = 555;
+  
+  //this function is a made from the statically filtered version of Orientation_3
+  int static_filtered(double psx,double psy, double psz) const{
+
+    // Then semi-static filter.
+    double apsx = CGAL::abs(psx);
+    double apsy = CGAL::abs(psy);
+    double apsz = CGAL::abs(psz);
+
+    double maxx = (Maxx < apsx)? apsx : Maxx;
+    double maxy = (Maxy < apsy)? apsy : Maxy;
+    double maxz = (Maxz < apsz)? apsz : Maxz;
+
+    double det =  psx*m10 - m20*psy + m21*psz;
+    
+    // Sort maxx < maxy < maxz.
+    if (maxx > maxz)
+        std::swap(maxx, maxz);
+    if (maxy > maxz)
+        std::swap(maxy, maxz);
+    else if (maxy < maxx)
+        std::swap(maxx, maxy);
+
+    // Protect against underflow in the computation of eps.
+    if (maxx < 1e-97) /* cbrt(min_double/eps) */ {
+      if (maxx == 0)
+        return 0;
+    }
+    // Protect against overflow in the computation of det.
+    else if (maxz < 1e102) /* cbrt(max_double [hadamard]/4) */ {
+      double eps = 5.1107127829973299e-15 * maxx * maxy * maxz;
+      if (det > eps)  return 1;
+      if (det < -eps) return -1;
+    }
+    return STATIC_FILTER_FAILURE;
+  }
+  
+public:
+  typedef typename Interval_nt_advanced::Protector           Protector;
+
+  Is_on_positive_side_of_plane_3(const Traits&,const Point_3& p_,const Point_3& q_,const Point_3& r_)
+  :p(p_),q(q_),r(r_),ck_plane(NULL),pk_plane(NULL)
+  {
+    double pqx = q.x() - p.x();
+    double pqy = q.y() - p.y();
+    double pqz = q.z() - p.z();
+    double prx = r.x() - p.x();
+    double pry = r.y() - p.y();
+    double prz = r.z() - p.z();   
+
+
+    m10 = pqy*prz - pry*pqz;
+    m20 = pqx*prz - prx*pqz;
+    m21 = pqx*pry - prx*pqy;
+    
+    double aprx = CGAL::abs(prx);
+    double apry = CGAL::abs(pry);
+    double aprz = CGAL::abs(prz);
+
+    Maxx = CGAL::abs(pqx);
+    if (Maxx < aprx) Maxx = aprx;
+    Maxy = CGAL::abs(pqy);
+    if (Maxy < apry) Maxy = apry;
+    Maxz = CGAL::abs(pqz);
+    if (Maxz < aprz) Maxz = aprz;
+  }
+
+  ~Is_on_positive_side_of_plane_3(){
+    if (ck_plane!=NULL) delete ck_plane;
+    if (pk_plane!=NULL) delete pk_plane;
+  }
+  
+  bool operator() (const Point_3& s) const 
+  {
+    double psx = s.x() - p.x();
+    double psy = s.y() - p.y();
+    double psz = s.z() - p.z(); 
+    
+    int static_res = static_filtered(psx,psy,psz);
+    if (static_res != STATIC_FILTER_FAILURE)
+      return static_res == 1;
+    
+    try{
+      if (ck_plane==NULL)
+        ck_plane=new typename CK::Plane_3(to_CK(p),to_CK(q),to_CK(r));
+      return ck_plane->has_on_positive_side(to_CK(s));
+    }
+    catch (Uncertain_conversion_exception){
+      if (pk_plane==NULL)
+        pk_plane=new typename PK::Plane_3(to_PK(p),to_PK(q),to_PK(r));
+      return pk_plane->has_on_positive_side(to_PK(s));
+    }
+  }
+};
+
+
+template<class HDS, class ForwardIterator>
+class Build_coplanar_poly : public Modifier_base<HDS> {
+ public:
+  Build_coplanar_poly(ForwardIterator i, ForwardIterator j) 
+    {
+      start = i;
+      end = j;
+    }
+  void operator()( HDS& hds) {
+    Polyhedron_incremental_builder_3<HDS> B(hds,true);
+    ForwardIterator iter = start;
+    int count = 0;
+    while (iter != end)
+      {
+	count++;
+	iter++;
+      }
+    B.begin_surface(count, 1, 2*count);
+    iter = start;
+    while (iter != end)
+      {
+	B.add_vertex(*iter);
+	iter++;
+      }
+    iter = start;
+    B.begin_facet();
+    int p = 0;
+    while (p < count)
+      {
+	B.add_vertex_to_facet(p);
+	p++;
+      }
+    B.end_facet();
+    B.end_surface();
+  }
+ private:
+  ForwardIterator start;
+  ForwardIterator end;    
+};
+
+
+namespace internal { namespace Convex_hull_3{
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_xy_3,Traits_xy_3,false)
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_yz_3,Traits_xy_3,false)
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Traits_has_typedef_Traits_xz_3,Traits_xy_3,false)
+
+template <class T,bool has_projection_traits=
+  Traits_has_typedef_Traits_xy_3<T>::value &&
+  Traits_has_typedef_Traits_yz_3<T>::value &&
+  Traits_has_typedef_Traits_xz_3<T>::value
+>
+struct Projection_traits{
+  typedef typename Kernel_traits<typename T::Point_3>::Kernel K;
+  typedef CGAL::Projection_traits_xy_3<K> Traits_xy_3;
+  typedef CGAL::Projection_traits_yz_3<K> Traits_yz_3;
+  typedef CGAL::Projection_traits_xz_3<K> Traits_xz_3;
+};
+
+template <class T>
+struct Projection_traits<T,true>{
+  typedef typename T::Traits_xy_3 Traits_xy_3;
+  typedef typename T::Traits_yz_3 Traits_yz_3;
+  typedef typename T::Traits_xz_3 Traits_xz_3;
+};
+
+} } //end of namespace internal::Convex_hull_3
+
+template <class InputIterator, class Point_3, class Polyhedron_3, class Traits>
+void coplanar_3_hull(InputIterator first, InputIterator beyond,
+                     const Point_3& p1, const Point_3& p2, const Point_3& p3, 
+                     Polyhedron_3& P, const Traits& /* traits */)
+{
+  typedef typename internal::Convex_hull_3::Projection_traits<Traits> PTraits;
+  typedef typename PTraits::Traits_xy_3 Traits_xy_3;
+  typedef typename PTraits::Traits_yz_3 Traits_yz_3;
+  typedef typename PTraits::Traits_xz_3 Traits_xz_3;
+
+  std::list<Point_3> CH_2;
+  typedef typename std::list<Point_3>::iterator  CH_2_iterator;
+ 
+  Traits_xy_3 traits_xy;
+  typename Traits_xy_3::Left_turn_2 left_turn_in_xy = traits_xy.left_turn_2_object();
+  if ( left_turn_in_xy(p1,p2,p3) || left_turn_in_xy(p2,p1,p3) )
+     convex_hull_points_2( first, beyond,
+                           std::back_inserter(CH_2),
+                           traits_xy );
+  else{
+    Traits_yz_3 traits_yz;
+    typename Traits_yz_3::Left_turn_2 left_turn_in_yz = traits_yz.left_turn_2_object();
+    if ( left_turn_in_yz(p1,p2,p3) || left_turn_in_yz(p2,p1,p3) )
+       convex_hull_points_2( first, beyond,
+                             std::back_inserter(CH_2),
+                             traits_yz );
+    else{
+      Traits_xz_3 traits_xz;
+      CGAL_assertion_code( typename Traits_xz_3::Left_turn_2 left_turn_in_xz = traits_xz.left_turn_2_object(); )
+      CGAL_assertion( left_turn_in_xz(p1,p2,p3) || left_turn_in_xz(p2,p1,p3) );
+         convex_hull_points_2( first, beyond,
+                               std::back_inserter(CH_2),
+                               traits_xz );
+    }
+  }
+
+  typedef typename Polyhedron_3::Halfedge_data_structure HDS;
+
+  Build_coplanar_poly<HDS,CH_2_iterator> poly(CH_2.begin(),CH_2.end());
+  P.delegate(poly);
+}
+
+
+//
+// visible is the set of facets visible from point  and reachable from
+// start_facet.
+//
+template <class TDS_2, class Traits>
+void
+find_visible_set(TDS_2& tds, 
+                 const typename Traits::Point_3& point, 
+                 typename TDS_2::Face_handle start,
+                 std::list<typename TDS_2::Face_handle>& visible,
+                 std::map<typename TDS_2::Vertex_handle, typename TDS_2::Edge>& outside,
+                 const Traits& traits)
+{
+   typedef typename Traits::Plane_3                   Plane_3;
+   typedef typename TDS_2::Face_handle Face_handle;
+   typedef typename TDS_2::Vertex_handle Vertex_handle;
+   typename Traits::Has_on_positive_side_3 has_on_positive_side =
+            traits.has_on_positive_side_3_object();
+
+   std::vector<Vertex_handle> vertices;
+   vertices.reserve(10);
+   int VISITED=1, BORDER=2;
+   visible.clear();
+   typename std::list<Face_handle>::iterator  vis_it;
+   visible.push_back(start);
+   start->info() = VISITED;
+   vertices.push_back(start->vertex(0));
+   vertices.push_back(start->vertex(1));
+   vertices.push_back(start->vertex(2));
+   start->vertex(0)->info() = start->vertex(1)->info() = start->vertex(2)->info() = VISITED;
+ 
+   for (vis_it = visible.begin(); vis_it != visible.end(); vis_it++)
+   {
+      // check all the neighbors of the current face to see if they have 
+      // already been visited or not and if not whether they are visible 
+      // or not.
+
+      for(int i=0; i < 3; i++) {
+        // the facet on the other side of the current halfedge
+        Face_handle f = (*vis_it)->neighbor(i);
+        // if haven't already seen this facet
+        if (f->info() == 0) {
+          f->info() = VISITED;
+          Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
+          int ind = f->index(*vis_it);
+          if ( has_on_positive_side(plane, point) ){  // is visible
+            visible.push_back(f);
+            Vertex_handle vh = f->vertex(ind);
+            if(vh->info() == 0){ vertices.push_back(vh); vh->info() = VISITED;}
+          } else {
+            f->info() = BORDER;
+            f->vertex(TDS_2::cw(ind))->info() = BORDER;            
+            f->vertex(TDS_2::ccw(ind))->info() = BORDER;
+            outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)),
+                                          typename TDS_2::Edge(f,ind)));
+          }
+        } else if(f->info() == BORDER) {
+          int ind = f->index(*vis_it);
+          f->vertex(TDS_2::cw(ind))->info() = BORDER;            
+          f->vertex(TDS_2::ccw(ind))->info() = BORDER;
+          outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)),
+                                        typename TDS_2::Edge(f,ind)));
+        }
+      }
+   }
+ 
+   for(typename std::vector<Vertex_handle>::iterator vit =  vertices.begin();
+       vit != vertices.end();
+       ++vit){
+     if((*vit)->info() != BORDER){
+       tds.delete_vertex(*vit);
+     } else {
+       (*vit)->info() = 0;
+     }
+   }
+
+}
+
+// using a third template parameter for the point instead of getting it from
+// the traits class as it should be is required by M$VC6
+template <class Face_handle, class Traits, class Point>
+typename std::list<Point>::iterator
+farthest_outside_point(Face_handle f, std::list<Point>& outside_set,
+                       const Traits& traits)
+{
+
+   typedef typename std::list<Point>::iterator Outside_set_iterator;
+   CGAL_ch_assertion(!outside_set.empty());
+
+   typename Traits::Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
+
+   typename Traits::Less_signed_distance_to_plane_3 less_dist_to_plane =
+            traits.less_signed_distance_to_plane_3_object();
+   Outside_set_iterator farthest_it =
+          std::max_element(outside_set.begin(),
+                           outside_set.end(), 
+                           boost::bind(less_dist_to_plane, plane, _1, _2));
+   return farthest_it;
+}
+
+template <class Face_handle, class Traits, class Point>
+void     
+partition_outside_sets(const std::list<Face_handle>& new_facets,
+                       std::list<Point>& vis_outside_set, 
+                       std::list<Face_handle>& pending_facets,
+                       const Traits& traits)
+{
+  typename std::list<Face_handle>::const_iterator        f_list_it;
+  typename std::list<Point>::iterator  point_it, to_splice;
+   
+  // walk through all the new facets and check each unassigned outside point
+  // to see if it belongs to the outside set of this new facet.
+  for (f_list_it = new_facets.begin(); (f_list_it != new_facets.end()) && (! vis_outside_set.empty());
+        ++f_list_it)
+  {
+    Face_handle f = *f_list_it;
+    Is_on_positive_side_of_plane_3<Traits> is_on_positive_side(
+      traits,f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point());
+    std::list<Point>& point_list = f->points;
+
+    for (point_it = vis_outside_set.begin();point_it != vis_outside_set.end();){
+      if( is_on_positive_side(*point_it) ) {
+        to_splice = point_it;
+        ++point_it;
+        point_list.splice(point_list.end(), vis_outside_set, to_splice);
+      } else {
+         ++point_it;
+      }
+    }
+    if(! point_list.empty()){
+      pending_facets.push_back(f);
+      f->it = boost::prior(pending_facets.end());
+    } else {
+      f->it = pending_facets.end();
+    }
+  }
+   
+   
+   for (; f_list_it != new_facets.end();++f_list_it)
+    (*f_list_it)->it = pending_facets.end();
+}
+
+
+
+template <class TDS_2, class Traits>
+void
+ch_quickhull_3_scan(TDS_2& tds,
+                    std::list<typename TDS_2::Face_handle>& pending_facets,
+                    const Traits& traits)
+{
+  typedef typename TDS_2::Edge                            Edge;
+  typedef typename TDS_2::Face_handle                     Face_handle;
+  typedef typename TDS_2::Vertex_handle                   Vertex_handle;
+  typedef typename Traits::Point_3			  Point_3;
+  typedef std::list<Point_3>                              Outside_set;
+  typedef typename std::list<Point_3>::iterator           Outside_set_iterator;
+  typedef std::map<typename TDS_2::Vertex_handle, typename TDS_2::Edge> Border_edges;
+
+  std::list<Face_handle>                     visible_set;
+  typename std::list<Face_handle>::iterator  vis_set_it;
+  Outside_set                                vis_outside_set;
+  Border_edges                               border;
+
+  while (!pending_facets.empty())
+  {
+     vis_outside_set.clear();
+
+     Face_handle f_handle = pending_facets.front();
+
+     Outside_set_iterator farthest_pt_it = farthest_outside_point(f_handle, f_handle->points, traits);
+     Point_3 farthest_pt = *farthest_pt_it;
+     f_handle->points.erase(farthest_pt_it);
+     find_visible_set(tds, farthest_pt, f_handle, visible_set, border, traits);
+
+     // for each visible facet
+     for (vis_set_it = visible_set.begin(); vis_set_it != visible_set.end();
+          vis_set_it++)
+     {
+       
+        //   add its outside set to the global outside set list
+       std::list<Point_3>& point_list = (*vis_set_it)->points;
+       if(! point_list.empty()){
+         vis_outside_set.splice(vis_outside_set.end(), point_list, point_list.begin(), point_list.end());
+       }
+
+       if((*vis_set_it)->it != pending_facets.end()){
+         pending_facets.erase((*vis_set_it)->it);
+       }
+       (*vis_set_it)->info() = 0;
+     }
+
+     std::vector<Edge> edges;
+     edges.reserve(border.size());
+     typename Border_edges::iterator it = border.begin();
+     Edge e = it->second;
+     e.first->info() = 0; 
+     edges.push_back(e);
+     border.erase(it);
+     while(! border.empty()){
+       it = border.find(e.first->vertex(TDS_2::ccw(e.second)));
+       CGAL_ch_assertion(it != border.end());
+       e = it->second;
+       e.first->info() = 0; 
+       edges.push_back(e);
+       border.erase(it);
+     }
+
+     // If we want to reuse the faces we must only pass |edges| many, and call delete_face for the others.
+     // Also create facets if necessary
+     std::ptrdiff_t diff = visible_set.size() - edges.size();
+     if(diff < 0){
+       for(int i = 0; i<-diff;i++){
+         visible_set.push_back(tds.create_face());
+       }
+     } else {
+       for(int i = 0; i<diff;i++){
+         tds.delete_face(visible_set.back());
+         visible_set.pop_back();
+       }
+     }
+     Vertex_handle vh = tds.star_hole(edges.begin(), edges.end(), visible_set.begin(), visible_set.end());
+     vh->point() = farthest_pt;
+     vh->info() = 0;     
+  
+     // now partition the set of outside set points among the new facets.
+   
+     partition_outside_sets(visible_set, vis_outside_set, 
+                            pending_facets, traits);
+
+  }
+}
+
+template <class TDS_2, class Traits>
+void non_coplanar_quickhull_3(std::list<typename Traits::Point_3>& points,
+                              TDS_2& tds, const Traits& traits)
+{
+  typedef typename Traits::Point_3                        Point_3;
+
+  typedef typename TDS_2::Face_handle                     Face_handle;
+  typedef typename TDS_2::Face_iterator                     Face_iterator;
+  typedef typename std::list<Point_3>::iterator           P3_iterator;
+
+  std::list<Face_handle> pending_facets;
+
+  typename Is_on_positive_side_of_plane_3<Traits>::Protector p;
+  
+  // for each facet, look at each unassigned point and decide if it belongs
+  // to the outside set of this facet.
+  for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
+    Is_on_positive_side_of_plane_3<Traits> is_on_positive_side(
+      traits,fit->vertex(0)->point(),fit->vertex(1)->point(),fit->vertex(2)->point() );
+    for (P3_iterator point_it = points.begin() ; point_it != points.end(); )
+    {
+      if( is_on_positive_side(*point_it) ) {
+        P3_iterator to_splice = point_it;
+        ++point_it;
+        fit->points.splice(fit->points.end(), points, to_splice);
+      } else {
+       ++point_it;
+      }
+    }
+  }
+  // add all the facets with non-empty outside sets to the set of facets for
+  // further consideration
+  for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
+    if (! fit->points.empty()){
+      pending_facets.push_back(fit);
+      fit->it = boost::prior(pending_facets.end());
+        } else {
+      fit->it =  pending_facets.end();
+    }
+  }
+
+
+  ch_quickhull_3_scan(tds, pending_facets, traits);
+
+  //std::cout << "|V(tds)| = " << tds.number_of_vertices() << std::endl;
+//  CGAL_ch_expensive_postcondition(all_points_inside(points.begin(),
+//                                                    points.end(),P,traits));
+//  CGAL_ch_postcondition(is_strongly_convex_3(P, traits));
+}
+
+
+namespace internal{
+  
+template <class HDS,class TDS>
+class Build_convex_hull_from_TDS_2 : public CGAL::Modifier_base<HDS> {
+  typedef std::map<typename TDS::Vertex_handle,unsigned> Vertex_map;
+  
+  const TDS& t;
+  template <class Builder>
+  static unsigned get_vertex_index( Vertex_map& vertex_map,
+                                    typename TDS::Vertex_handle vh,
+                                    Builder& builder,
+                                    unsigned& vindex)
+  {
+    std::pair<typename Vertex_map::iterator,bool>
+      res=vertex_map.insert(std::make_pair(vh,vindex));
+    if (res.second){
+      builder.add_vertex(vh->point());
+      ++vindex;
+    }
+    return res.first->second;
+  }
+  
+public:
+  Build_convex_hull_from_TDS_2(const TDS& t_):t(t_) 
+  {
+    CGAL_assertion(t.dimension()==2);
+  }
+  void operator()( HDS& hds) {
+    // Postcondition: `hds' is a valid polyhedral surface.
+    
+    CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+    Vertex_map vertex_map;
+    //start the surface
+    B.begin_surface( t.number_of_vertices(), t.number_of_faces());
+    unsigned vindex=0;
+    for (typename TDS::Face_iterator it=t.faces_begin();it!=t.faces_end();++it)
+    {
+      unsigned i0=get_vertex_index(vertex_map,it->vertex(0),B,vindex);
+      unsigned i1=get_vertex_index(vertex_map,it->vertex(1),B,vindex);
+      unsigned i2=get_vertex_index(vertex_map,it->vertex(2),B,vindex);
+      B.begin_facet();
+      B.add_vertex_to_facet( i0 );
+      B.add_vertex_to_facet( i1 );
+      B.add_vertex_to_facet( i2 );
+      B.end_facet();      
+    }
+    B.end_surface();
+  }
+};
+  
+} //namespace internal
+
+template <class InputIterator, class Polyhedron_3, class Traits>
+void
+ch_quickhull_polyhedron_3(std::list<typename Traits::Point_3>& points,
+                          InputIterator point1_it, InputIterator point2_it,
+                          InputIterator point3_it, Polyhedron_3& P,
+                          const Traits& traits)
+{
+  typedef typename Traits::Point_3	  		  Point_3;  
+  typedef typename Traits::Plane_3		      	  Plane_3;
+  typedef typename std::list<Point_3>::iterator           P3_iterator;
+
+  typedef Triangulation_data_structure_2<
+    Triangulation_vertex_base_with_info_2<int, GT3_for_CH3<Traits> >,
+    Convex_hull_face_base_2<int, Traits> >                           Tds;
+  typedef typename Tds::Vertex_handle                     Vertex_handle;
+  typedef typename Tds::Face_handle                     Face_handle;
+
+  // found three points that are not collinear, so construct the plane defined
+  // by these points and then find a point that has maximum distance from this
+  // plane.   
+  typename Traits::Construct_plane_3 construct_plane =
+         traits.construct_plane_3_object();
+  Plane_3 plane = construct_plane(*point3_it, *point2_it, *point1_it);
+  typedef typename Traits::Less_signed_distance_to_plane_3      Dist_compare; 
+  Dist_compare compare_dist = traits.less_signed_distance_to_plane_3_object();
+  
+  typename Traits::Coplanar_3  coplanar = traits.coplanar_3_object(); 
+  // find both min and max here since using signed distance.  If all points
+  // are on the negative side of the plane, the max element will be on the
+  // plane.
+  std::pair<P3_iterator, P3_iterator> min_max;
+  min_max = CGAL::min_max_element(points.begin(), points.end(), 
+                                  boost::bind(compare_dist, plane, _1, _2),
+                                  boost::bind(compare_dist, plane, _1, _2));
+  P3_iterator max_it;
+  if (coplanar(*point1_it, *point2_it, *point3_it, *min_max.second))
+  {
+     max_it = min_max.first;
+     // want the orientation of the points defining the plane to be positive
+     // so have to reorder these points if all points were on negative side
+     // of plane
+     std::swap(*point1_it, *point3_it);
+  }
+  else
+     max_it = min_max.second;
+
+  // if the maximum distance point is on the plane then all are coplanar
+  if (coplanar(*point1_it, *point2_it, *point3_it, *max_it)) {
+     coplanar_3_hull(points.begin(), points.end(), *point1_it, *point2_it, *point3_it, P, traits);
+  } else {  
+    Tds tds;
+    Vertex_handle v0 = tds.create_vertex(); v0->set_point(*point1_it);
+    Vertex_handle v1 = tds.create_vertex(); v1->set_point(*point2_it);
+    Vertex_handle v2 = tds.create_vertex(); v2->set_point(*point3_it);
+    Vertex_handle v3 = tds.create_vertex(); v3->set_point(*max_it);
+
+    v0->info() = v1->info() = v2->info() = v3->info() = 0;
+    Face_handle f0 = tds.create_face(v0,v1,v2);
+    Face_handle f1 = tds.create_face(v3,v1,v0);
+    Face_handle f2 = tds.create_face(v3,v2,v1);
+    Face_handle f3 = tds.create_face(v3,v0,v2);
+    tds.set_dimension(2);
+    f0->set_neighbors(f2, f3, f1);
+    f1->set_neighbors(f0, f3, f2);
+    f2->set_neighbors(f0, f1, f3);
+    f3->set_neighbors(f0, f2, f1);
+
+    points.erase(point1_it);
+    points.erase(point2_it);
+    points.erase(point3_it);
+    points.erase(max_it);
+    if (!points.empty()){
+      non_coplanar_quickhull_3(points, tds, traits);
+      internal::Build_convex_hull_from_TDS_2<typename Polyhedron_3::HalfedgeDS,Tds> builder(tds);
+      P.delegate(builder);
+    }
+    else
+      P.make_tetrahedron(v0->point(),v1->point(),v2->point(),v3->point());
+  }
+  
+}
+
+} } //namespace internal::Convex_hull_3
+
+template <class InputIterator, class Traits>
+void
+convex_hull_3(InputIterator first, InputIterator beyond, 
+              Object& ch_object, const Traits& traits)
+{  
+  typedef typename Traits::Point_3	  		  Point_3;  
+  typedef std::list<Point_3>                              Point_3_list;
+  typedef typename Point_3_list::iterator                 P3_iterator;
+  typedef std::pair<P3_iterator,P3_iterator>              P3_iterator_pair;
+
+  if (first == beyond)    // No point
+    return;
+
+  // If the first and last point are equal the collinearity test some lines below will always be true.
+  Point_3_list points(first, beyond);
+  std::size_t size = points.size();
+  while((size > 1) && (points.front() == points.back())){
+    points.pop_back();
+    --size;
+  }
+
+  if ( size == 1 )                // 1 point 
+  {
+      ch_object = make_object(*points.begin());
+      return;
+  }
+  else if ( size == 2 )           // 2 points 
+  {
+      typedef typename Traits::Segment_3                 Segment_3;  
+      typename Traits::Construct_segment_3 construct_segment =
+             traits.construct_segment_3_object();
+      Segment_3 seg = construct_segment(*points.begin(), *(++points.begin()));
+      ch_object = make_object(seg);
+      return;
+  }
+  else if ( size == 3 )           // 3 points 
+  {
+      typedef typename Traits::Triangle_3                Triangle_3;  
+      typename Traits::Construct_triangle_3 construct_triangle =
+             traits.construct_triangle_3_object();
+      Triangle_3 tri = construct_triangle(*(points.begin()), 
+                                          *(++points.begin()),
+                                          *(--points.end()));
+      ch_object = make_object(tri);
+      return;
+  }
+
+  // at least 4 points 
+  typename Traits::Collinear_3 collinear = traits.collinear_3_object();
+  
+  P3_iterator point1_it = points.begin();
+  P3_iterator point2_it = points.begin();
+  point2_it++;
+  P3_iterator point3_it = points.end();
+  point3_it--;
+
+  // find three that are not collinear
+  while (point2_it != points.end() && 
+         collinear(*point1_it,*point2_it,*point3_it))
+    point2_it++;
+  
+
+  // all are collinear, so the answer is a segment
+  if (point2_it == points.end())
+  {
+     typedef typename Traits::Less_distance_to_point_3      Less_dist; 
+
+     Less_dist less_dist = traits.less_distance_to_point_3_object();
+     P3_iterator_pair endpoints = 
+      min_max_element(points.begin(), points.end(), 
+                      boost::bind(less_dist, *points.begin(), _1, _2), 
+                      boost::bind(less_dist, *points.begin(), _1, _2));
+
+     typename Traits::Construct_segment_3 construct_segment =
+            traits.construct_segment_3_object();
+     typedef typename Traits::Segment_3                 Segment_3;  
+
+     Segment_3 seg = construct_segment(*endpoints.first, *endpoints.second);
+     ch_object = make_object(seg);
+     return;
+  }
+
+  // result will be a polyhedron
+  typename internal::Convex_hull_3::Default_polyhedron_for_Chull_3<Traits>::type P;
+
+  P3_iterator minx, maxx, miny, it;
+  minx = maxx = miny = it = points.begin();
+  ++it;
+  for(; it != points.end(); ++it){
+    if(it->x() < minx->x()) minx = it;
+    if(it->x() > maxx->x()) maxx = it;
+    if(it->y() < miny->y()) miny = it;
+  }
+  if(! collinear(*minx, *maxx, *miny) ){  
+    internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, minx, maxx, miny, P, traits);
+  } else {
+    internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, P, traits);
+  }
+  CGAL_assertion(P.size_of_vertices()>=3);
+  if (boost::next(P.vertices_begin(),3) == P.vertices_end()){
+    typedef typename Traits::Triangle_3                Triangle_3;
+    typename Traits::Construct_triangle_3 construct_triangle =
+           traits.construct_triangle_3_object();
+    Triangle_3 tri = construct_triangle(P.halfedges_begin()->vertex()->point(), 
+                                        P.halfedges_begin()->next()->vertex()->point(),
+                                        P.halfedges_begin()->opposite()->vertex()->point());
+    ch_object = make_object(tri);
+  }
+  else
+    ch_object = make_object(P);
+}
+
+
+template <class InputIterator>
+void convex_hull_3(InputIterator first, InputIterator beyond, 
+		   Object& ch_object)
+{
+   typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
+   typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
+   convex_hull_3(first, beyond, ch_object, Traits());
+}
+
+
+
+template <class InputIterator, class Polyhedron_3, class Traits>
+void convex_hull_3(InputIterator first, InputIterator beyond,
+                   Polyhedron_3& polyhedron,  const Traits& traits)
+{
+  typedef typename Traits::Point_3                Point_3;  
+  typedef std::list<Point_3>                      Point_3_list;
+  typedef typename Point_3_list::iterator         P3_iterator;
+
+  Point_3_list points(first, beyond);
+  CGAL_ch_precondition(points.size() > 3);
+
+  // at least 4 points 
+  typename Traits::Collinear_3 collinear = traits.collinear_3_object();
+  typename Traits::Equal_3 equal = traits.equal_3_object();
+
+  P3_iterator point1_it = points.begin();
+  P3_iterator point2_it = points.begin();
+  point2_it++;
+
+  // find three that are not collinear
+  while (point2_it != points.end() && equal(*point1_it,*point2_it))
+    ++point2_it;
+
+  CGAL_ch_precondition_msg(point2_it != points.end(), 
+        "All points are equal; cannot construct polyhedron.");
+  
+  P3_iterator point3_it = point2_it;
+  ++point3_it;
+  
+  CGAL_ch_precondition_msg(point3_it != points.end(), 
+        "Only two points with different coordinates; cannot construct polyhedron.");
+  
+  while (point3_it != points.end() && collinear(*point1_it,*point2_it,*point3_it))
+    ++point3_it;
+  
+  CGAL_ch_precondition_msg(point3_it != points.end(), 
+        "All points are collinear; cannot construct polyhedron.");
+  
+  polyhedron.clear();
+  // result will be a polyhedron
+  internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it,
+                                                     polyhedron, traits);
+
+}
+
+
+template <class InputIterator, class Polyhedron_3>
+void convex_hull_3(InputIterator first, InputIterator beyond,
+                   Polyhedron_3& polyhedron)
+{
+   typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
+   typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3<Point_3>::type Traits;
+   convex_hull_3(first, beyond, polyhedron, Traits());
+}
+
+} // namespace CGAL
+
+#endif // CGAL_CONVEX_HULL_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_3_to_polyhedron_3.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_3_to_polyhedron_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_hull_3_to_polyhedron_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_hull_3_to_polyhedron_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_constructive_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_constructive_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_hull_constructive_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_hull_constructive_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_incremental_3.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_incremental_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_hull_incremental_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_hull_incremental_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convex_hull_traits_2.h b/3rdparty/CGAL-4.8/include/CGAL/convex_hull_traits_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convex_hull_traits_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convex_hull_traits_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convexity_check_2.h b/3rdparty/CGAL-4.8/include/CGAL/convexity_check_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convexity_check_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convexity_check_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/convexity_check_3.h b/3rdparty/CGAL-4.8/include/CGAL/convexity_check_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/convexity_check_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/convexity_check_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/copy_n.h b/3rdparty/CGAL-4.8/include/CGAL/copy_n.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/copy_n.h
rename to 3rdparty/CGAL-4.8/include/CGAL/copy_n.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/corefinement_operations.h b/3rdparty/CGAL-4.8/include/CGAL/corefinement_operations.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/corefinement_operations.h
rename to 3rdparty/CGAL-4.8/include/CGAL/corefinement_operations.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_2.h b/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_2.h
new file mode 100644
index 0000000..e86767c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_2.h
@@ -0,0 +1,341 @@
+// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
+//
+#ifndef CGAL_CREATE_OFFSET_POLYGONS_2_H
+#define CGAL_CREATE_OFFSET_POLYGONS_2_H
+
+#include <CGAL/create_straight_skeleton_2.h>
+#include <CGAL/Polygon_offset_builder_2.h>
+#include <CGAL/Straight_skeleton_converter_2.h>
+#include <CGAL/compute_outer_frame_margin.h>
+#include <CGAL/Polygon_2.h>
+
+namespace CGAL {
+
+namespace CGAL_SS_i
+{
+
+template<class U, class V> struct Is_same_type { typedef Tag_false type ; } ;
+
+template<class U> struct Is_same_type<U,U> { typedef Tag_true type ; } ;
+
+
+template<class FT, class PointIterator, class HoleIterator, class K>
+boost::shared_ptr< Straight_skeleton_2<K> >
+create_partial_interior_straight_skeleton_2 ( FT const&     aMaxTime
+                                            , PointIterator aOuterContour_VerticesBegin
+                                            , PointIterator aOuterContour_VerticesEnd
+                                            , HoleIterator  aHolesBegin
+                                            , HoleIterator  aHolesEnd
+                                            , K const&      
+                                            )
+{
+  typedef Straight_skeleton_2<K> Ss ;
+
+  typedef Straight_skeleton_builder_traits_2<K> SsBuilderTraits;
+  
+  typedef Straight_skeleton_builder_2<SsBuilderTraits,Ss> SsBuilder;
+  
+  typedef typename K::FT KFT ;
+  
+  typedef typename std::iterator_traits<PointIterator>::value_type InputPoint ;
+  typedef typename Kernel_traits<InputPoint>::Kernel InputKernel ;
+  
+  Cartesian_converter<InputKernel, K> Converter ;
+  
+  boost::optional<KFT> lMaxTime( Converter(aMaxTime) ) ;
+  
+  SsBuilder ssb( lMaxTime ) ;
+  
+  ssb.enter_contour( aOuterContour_VerticesBegin, aOuterContour_VerticesEnd, Converter ) ;
+  
+  for ( HoleIterator hi = aHolesBegin ; hi != aHolesEnd ; ++ hi )
+    ssb.enter_contour( CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi), Converter ) ;
+  
+  return ssb.construct_skeleton();
+}
+
+template<class FT, class PointIterator, class K>
+boost::shared_ptr< Straight_skeleton_2<K> >
+create_partial_exterior_straight_skeleton_2 ( FT const&      aMaxOffset
+                                            , PointIterator  aVerticesBegin
+                                            , PointIterator  aVerticesEnd
+                                            , K const&       k
+                                            )
+{
+  typedef typename std::iterator_traits<PointIterator>::value_type Point_2 ;
+    
+  typedef Straight_skeleton_2<K> Ss ;
+  typedef boost::shared_ptr<Ss>  SsPtr ;
+  
+  SsPtr rSkeleton ;
+  
+  boost::optional<FT> margin = compute_outer_frame_margin( aVerticesBegin
+                                                         , aVerticesEnd
+                                                         , aMaxOffset 
+                                                         );
+
+  if ( margin )
+  {
+    
+    Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd);
+
+    FT fxmin = bbox.xmin() - *margin ;
+    FT fxmax = bbox.xmax() + *margin ;
+    FT fymin = bbox.ymin() - *margin ;
+    FT fymax = bbox.ymax() + *margin ;
+
+    Point_2 frame[4] ;
+    
+    frame[0] = Point_2(fxmin,fymin) ;
+    frame[1] = Point_2(fxmax,fymin) ;
+    frame[2] = Point_2(fxmax,fymax) ;
+    frame[3] = Point_2(fxmin,fymax) ;
+
+    typedef std::vector<Point_2> Hole ;
+    
+    Hole lPoly(aVerticesBegin, aVerticesEnd);
+    std::reverse(lPoly.begin(), lPoly.end());
+    
+    std::vector<Hole> holes ;
+    holes.push_back(lPoly) ;
+        
+    rSkeleton = create_partial_interior_straight_skeleton_2(aMaxOffset,frame, frame+4, holes.begin(), holes.end(), k ) ;  
+  }
+  
+  return rSkeleton ;
+}
+
+//
+// Kernel != Skeleton::kernel. The skeleton is converted to Straight_skeleton_2<Kernel>
+//
+template<class OutPolygon, class FT, class Skeleton, class K>
+std::vector< boost::shared_ptr<OutPolygon> > 
+create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Tag_false )
+{
+  typedef boost::shared_ptr<OutPolygon> OutPolygonPtr ; 
+  typedef std::vector<OutPolygonPtr>    OutPolygonPtrVector ;
+   
+  typedef Straight_skeleton_2<K> OfSkeleton ;
+   
+  typedef Polygon_offset_builder_traits_2<K>                                  OffsetBuilderTraits;
+  typedef Polygon_offset_builder_2<OfSkeleton,OffsetBuilderTraits,OutPolygon> OffsetBuilder;
+  
+  OutPolygonPtrVector rR ;
+  
+  boost::shared_ptr<OfSkeleton> lConvertedSs = convert_straight_skeleton_2<OfSkeleton>(aSs);
+  OffsetBuilder ob( *lConvertedSs );
+  ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ;
+    
+  return rR ;
+}
+
+//
+// Kernel == Skeleton::kernel, no convertion
+//
+template<class OutPolygon, class FT, class Skeleton, class K>
+std::vector< boost::shared_ptr<OutPolygon> > 
+create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k*/, Tag_true )
+{
+  typedef boost::shared_ptr<OutPolygon> OutPolygonPtr ; 
+  typedef std::vector<OutPolygonPtr>    OutPolygonPtrVector ;
+   
+  typedef Polygon_offset_builder_traits_2<K>                                OffsetBuilderTraits;
+  typedef Polygon_offset_builder_2<Skeleton,OffsetBuilderTraits,OutPolygon> OffsetBuilder;
+  
+  OutPolygonPtrVector rR ;
+  
+  OffsetBuilder ob(aSs);
+  ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ;
+    
+  return rR ;
+}
+
+// Allow failure due to invalid straight skeletons to go through the users
+template<class Skeleton>
+Skeleton const& dereference ( boost::shared_ptr<Skeleton> const& ss )
+{
+  CGAL_precondition(ss.get() != 0);
+  return *ss;
+}
+
+}
+
+template<class Polygon, class FT, class Skeleton, class K>
+std::vector< boost::shared_ptr<Polygon> > 
+inline
+create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& k )
+{
+  typedef typename Skeleton::Traits SsKernel ;
+  
+  typename CGAL_SS_i::Is_same_type<K,SsKernel>::type same_kernel ;
+  
+  return CGAL_SS_i::create_offset_polygons_2<Polygon>(aOffset,aSs,k,same_kernel);
+}
+
+
+template<class FT, class Skeleton, class K>
+std::vector< boost::shared_ptr< Polygon_2<K> > > 
+inline
+create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& k )
+{
+  typedef Polygon_2<K> Polygon ;
+  
+  return create_offset_polygons_2<Polygon>(aOffset, aSs, k ) ;
+}
+
+
+
+template<class Polygon, class FT, class Skeleton>
+std::vector< boost::shared_ptr<Polygon> > 
+inline
+create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs )
+{
+  return create_offset_polygons_2<Polygon>(aOffset, aSs, typename Polygon::Traits() ) ;
+}
+
+template<class FT, class Polygon, class HoleIterator, class OfK, class SsK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const&      aOffset
+                                               , Polygon const& aOuterBoundary
+                                               , HoleIterator   aHolesBegin
+                                               , HoleIterator   aHolesEnd
+                                               , OfK const&     ofk
+                                               , SsK const&     ssk
+                                               )
+{
+  return create_offset_polygons_2<Polygon>
+          (aOffset
+          ,CGAL_SS_i::dereference
+            ( CGAL_SS_i::create_partial_interior_straight_skeleton_2(aOffset
+                                                                    ,CGAL_SS_i::vertices_begin(aOuterBoundary)
+                                                                    ,CGAL_SS_i::vertices_end  (aOuterBoundary)
+                                                                    ,aHolesBegin
+                                                                    ,aHolesEnd
+                                                                    ,ssk
+                                                                    ) 
+            )
+          ,ofk
+          );
+    
+}
+
+template<class FT, class Polygon, class HoleIterator, class OfK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const&      aOffset
+                                               , Polygon const& aOuterBoundary
+                                               , HoleIterator   aHolesBegin
+                                               , HoleIterator   aHolesEnd
+                                               , OfK const&     ofk
+                                               )
+{
+  return create_interior_skeleton_and_offset_polygons_2(aOffset
+                                                       ,aOuterBoundary
+                                                       ,aHolesBegin
+                                                       ,aHolesEnd
+                                                       ,ofk
+                                                       ,Exact_predicates_inexact_constructions_kernel()
+                                                       );
+}
+
+template<class FT, class Polygon, class OfK, class SsK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk, SsK const& ssk )
+{
+  std::vector<Polygon> no_holes ;
+  return create_interior_skeleton_and_offset_polygons_2(aOffset
+                                                       ,aPoly
+                                                       ,no_holes.begin()
+                                                       ,no_holes.end()
+                                                       ,ofk
+                                                       ,ssk
+                                                       );
+}
+
+template<class FT, class Polygon, class OfK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk )
+{
+  std::vector<Polygon> no_holes ;
+  return create_interior_skeleton_and_offset_polygons_2(aOffset
+                                                       ,aPoly
+                                                       ,no_holes.begin()
+                                                       ,no_holes.end()
+                                                       ,ofk
+                                                       ,Exact_predicates_inexact_constructions_kernel()
+                                                       );
+}
+
+template<class FT, class Polygon>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly )
+{
+  return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly, typename Polygon::Traits() );
+}
+
+template<class FT, class Polygon, class OfK, class SsK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk , SsK const&  ssk)
+{
+  return create_offset_polygons_2<Polygon>
+          (aOffset
+          ,CGAL_SS_i::dereference
+            (CGAL_SS_i::create_partial_exterior_straight_skeleton_2(aOffset
+                                                                   ,CGAL_SS_i::vertices_begin(aPoly)
+                                                                   ,CGAL_SS_i::vertices_end  (aPoly)
+                                                                   ,ssk
+                                                                  )
+            )
+          ,ofk                                    
+          );
+}
+
+template<class FT, class Polygon, class OfK>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aPoly, OfK const& ofk )
+{
+  return create_exterior_skeleton_and_offset_polygons_2(aOffset
+                                                       ,aPoly
+                                                       ,ofk
+                                                       ,Exact_predicates_inexact_constructions_kernel()
+                                                       );
+                                               
+}
+
+template<class FT, class Polygon>
+std::vector< boost::shared_ptr<Polygon> >
+inline
+create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon const& aOuterBoundary )
+{
+  return create_exterior_skeleton_and_offset_polygons_2(aOffset, aOuterBoundary, typename Polygon::Traits() );
+                                               
+}
+
+} // end namespace CGAL
+
+
+#endif
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h
new file mode 100644
index 0000000..2353f88
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h
@@ -0,0 +1,106 @@
+// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
+//
+#ifndef CGAL_CREATE_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H
+#define CGAL_CREATE_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H
+
+#include <CGAL/create_offset_polygons_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+#include <CGAL/arrange_offset_polygons_2.h>
+
+namespace CGAL {
+
+template<class FT, class OfK, class SsK, class C>
+std::vector< boost::shared_ptr< Polygon_2<OfK,C> > >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon_with_holes_2<OfK,C> const& aPoly, SsK const& ssk )
+{
+  OfK ofk ;
+  return create_interior_skeleton_and_offset_polygons_2(aOffset
+                                                       ,aPoly.outer_boundary()
+                                                       ,aPoly.holes_begin()
+                                                       ,aPoly.holes_end()
+                                                       ,ofk
+                                                       ,ssk
+                                                       );
+    
+}
+
+template<class FT, class OfK, class C>
+std::vector< boost::shared_ptr< Polygon_2<OfK,C> > >
+inline
+create_interior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon_with_holes_2<OfK,C> const& aPoly )
+{
+  return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly, Exact_predicates_inexact_constructions_kernel() );
+}
+
+template<class FT, class OfK, class C>
+std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK,C> > >
+inline
+create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT const&             aOffset
+                                                          , Polygon_2<OfK,C> const& aPoly
+                                                          , bool                  aDontReverseOrientation = false
+                                                          )
+{
+  return arrange_offset_polygons_2(create_exterior_skeleton_and_offset_polygons_with_holes_2(aOffset
+                                                                                            ,aPoly
+                                                                                            ,aDontReverseOrientation
+                                                                                            )
+                                  );
+}
+
+  template<class FT, class OfK, class SsK, class C>
+std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK,C> > >
+inline
+create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT const& aOffset, Polygon_with_holes_2<OfK,C> const& aPoly, SsK const& ssk )
+{
+  return arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(aOffset,aPoly,ssk));
+}
+
+
+  template<class FT, class OfK, class C>
+std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK,C> > >
+inline
+create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT const& aOffset, Polygon_with_holes_2<OfK,C> const& aPoly )
+{
+  return arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(aOffset,aPoly));
+}
+
+template<class FT, class OfK, class SsK>
+std::vector< boost::shared_ptr< Polygon_with_holes_2<OfK> > >
+inline
+create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT const&             aOffset
+                                                          , Polygon_2<OfK> const& aPoly
+                                                          , SsK const&            ssk 
+                                                          )
+{
+  return arrange_offset_polygons_2(create_exterior_skeleton_and_offset_polygons_with_holes_2(aOffset
+                                                                                            ,aPoly
+                                                                                            ,ssk
+                                                                                            )
+                                  );
+}
+
+
+
+} // end namespace CGAL
+
+
+#endif 
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/create_straight_skeleton_2.h b/3rdparty/CGAL-4.8/include/CGAL/create_straight_skeleton_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/create_straight_skeleton_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/create_straight_skeleton_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/3rdparty/CGAL-4.8/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h
new file mode 100644
index 0000000..e4fa61c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+
+// $URL$
+// $Id$
+//
+// Author(s)     : Fernando Cacciola <fernando_cacciola at ciudad.com.ar>
+//
+#ifndef CGAL_CREATE_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H
+#define CGAL_CREATE_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H
+
+#include <CGAL/create_straight_skeleton_2.h>
+#include <CGAL/Polygon_with_holes_2.h>
+
+namespace CGAL {
+
+template<class K, class C>
+boost::shared_ptr< Straight_skeleton_2<K> >
+inline
+create_interior_straight_skeleton_2 ( Polygon_with_holes_2<K,C> const& aPolyWithHoles )
+{
+  return create_interior_straight_skeleton_2(aPolyWithHoles.outer_boundary().vertices_begin()
+                                            ,aPolyWithHoles.outer_boundary().vertices_end  ()
+                                            ,aPolyWithHoles.holes_begin   ()
+                                            ,aPolyWithHoles.holes_end     ()
+                                            ,K()
+                                            );
+}
+
+} // end namespace CGAL
+
+
+#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/determinant.h b/3rdparty/CGAL-4.8/include/CGAL/determinant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/determinant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/determinant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/determinant_of_vectors.h b/3rdparty/CGAL-4.8/include/CGAL/determinant_of_vectors.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/determinant_of_vectors.h
rename to 3rdparty/CGAL-4.8/include/CGAL/determinant_of_vectors.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/distance_predicates_2.h b/3rdparty/CGAL-4.8/include/CGAL/distance_predicates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/distance_predicates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/distance_predicates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/distance_predicates_3.h b/3rdparty/CGAL-4.8/include/CGAL/distance_predicates_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/distance_predicates_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/distance_predicates_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/double.h b/3rdparty/CGAL-4.8/include/CGAL/double.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/double.h
rename to 3rdparty/CGAL-4.8/include/CGAL/double.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/edge_aware_upsample_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/edge_aware_upsample_point_set.h
new file mode 100644
index 0000000..6f1df10
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/edge_aware_upsample_point_set.h
@@ -0,0 +1,659 @@
+// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
+
+#ifndef CGAL_UPSAMPLE_POINT_SET_H
+#define CGAL_UPSAMPLE_POINT_SET_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/internal/Rich_grid.h>
+#include <CGAL/Real_timer.h>
+#include <CGAL/Memory_sizer.h>
+#include <CGAL/compute_average_spacing.h>
+
+#include <iterator>
+#include <set>
+#include <utility>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+  #include <boost/property_map/property_map.hpp>
+#else
+  #include <boost/property_map.hpp>
+#endif
+
+//#define  CGAL_PSP3_VERBOSE
+
+namespace CGAL {
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+
+namespace upsample_internal{
+
+/// For each query point, select a best "base point" in its neighborhoods.
+/// Then, a new point will be interpolated between query point and "base point".
+/// This is the key part of the upsample algorithm 
+/// 
+/// \pre `radius > 0`
+///
+/// @tparam Kernel Geometric traits class.
+///
+/// @return local density length
+template <typename Kernel>
+typename Kernel::FT
+base_point_selection(
+  const rich_grid_internal::Rich_point<Kernel>& query, ///< 3D point to project
+  const std::vector<rich_grid_internal::Rich_point<Kernel> >& 
+                    neighbor_points,///< neighbor sample points
+  const typename Kernel::FT edge_sensitivity,///< edge sensitivity parameter
+  unsigned int& output_base_index ///< base point index
+  )
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
+
+  if (neighbor_points.empty())
+  {
+#ifdef CGAL_PSP3_VERBOSE
+    std::cout << "empty neighborhood" << std::endl;
+#endif
+    output_base_index = query.index;
+    return 0.0;
+  }
+
+  FT best_dist2 = -10.0;
+  const Rich_point& v = query;
+  typename std::vector<Rich_point>::const_iterator iter = neighbor_points.begin();
+  for (; iter != neighbor_points.end(); ++iter)
+  {
+    const Point& t = iter->pt;
+
+    const Vector& vm = v.normal;
+    const Vector& tm = iter->normal;
+
+    Vector diff_v_t = t - v.pt;
+    Point mid_point = v.pt + (diff_v_t * FT(0.5));
+    
+    FT dot_produce = std::pow((FT(2.0) - vm * tm), edge_sensitivity);
+
+    Vector diff_t_mid = mid_point - t;
+    FT project_t = diff_t_mid * tm;
+    FT min_dist2 = diff_t_mid.squared_length() - project_t * project_t;
+
+    typename std::vector<Rich_point>::const_iterator iter_in = neighbor_points.begin();
+    for (; iter_in != neighbor_points.end(); ++iter_in)
+    {
+      Vector diff_s_mid = mid_point - iter_in->pt;
+      FT project_s = diff_s_mid * iter_in->normal;
+
+      FT proj_min2 = diff_s_mid.squared_length() - project_s * project_s;
+
+      if (proj_min2 < min_dist2)
+      {
+        min_dist2 = proj_min2;
+      }
+    }
+    min_dist2 *= dot_produce;
+
+    if (min_dist2 > best_dist2)
+    {
+      best_dist2 = min_dist2;
+      output_base_index = iter->index;
+    }
+  }
+
+  return best_dist2; 
+}
+
+/// For each new inserted point, we need to do the following job
+/// 1, get neighbor information from the two "parent points"
+/// 2, update position and determine normal by bilateral projection 
+/// 3, update neighbor information again
+///
+/// \pre `radius > 0`
+///
+/// @tparam Kernel Geometric traits class.
+///
+template <typename Kernel>
+void
+update_new_point(
+  unsigned int new_point_index, ///< new inserted point
+  unsigned int father_index, ///< father point index
+  unsigned int mother_index, ///< mother point index
+  std::vector<rich_grid_internal::Rich_point<Kernel> >& rich_point_set,
+                                                           ///< all rich points
+  const typename Kernel::FT radius,          ///< accept neighborhood radius
+  const typename Kernel::FT sharpness_bandwidth  ///< control sharpness
+)
+{
+  // basic geometric types
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
+
+  CGAL_assertion_code( unsigned int size = static_cast<unsigned int>(rich_point_set.size()) );
+  CGAL_point_set_processing_precondition(father_index >= 0 &&
+                                         father_index < size);
+  CGAL_point_set_processing_precondition(mother_index >= 0 &&
+                                           mother_index < size);
+
+  // 1, get neighbor information from the two "parent points"
+  Rich_point& new_v = rich_point_set[new_point_index];
+  Rich_point& father_v = rich_point_set[father_index];
+  Rich_point& mother_v = rich_point_set[mother_index];
+
+  std::set<int> neighbor_indexes;
+  std::vector<unsigned int>::iterator iter;
+  for (iter = father_v.neighbors.begin();
+       iter != father_v.neighbors.end();
+       ++iter)
+  {
+    neighbor_indexes.insert(*iter);
+  }
+
+  for (iter = mother_v.neighbors.begin();
+       iter != mother_v.neighbors.end();
+       ++iter)
+  {
+    neighbor_indexes.insert(*iter);
+  }
+
+  neighbor_indexes.insert(father_v.index);
+  neighbor_indexes.insert(mother_v.index);
+
+  FT radius2 = radius * radius;
+
+  new_v.neighbors.clear();
+  std::set<int>::iterator set_iter;
+  for (set_iter = neighbor_indexes.begin(); 
+       set_iter != neighbor_indexes.end(); ++set_iter)
+  {
+    Rich_point& t = rich_point_set[*set_iter];
+    FT dist2 =  CGAL::squared_distance(new_v.pt, t.pt);
+
+    if (dist2 < radius2)
+    {
+      new_v.neighbors.push_back(t.index);
+    }
+  }
+
+  // 2, update position and normal by bilateral projection 
+  const unsigned int candidate_num = 2; // we have two normal candidates:
+                                        // we say father's is 0
+                                        //        mother's is 1
+  std::vector<Vector> normal_cadidate(candidate_num);
+  normal_cadidate[0] = father_v.normal;
+  normal_cadidate[1] = mother_v.normal;
+
+  std::vector<FT> project_dist_sum(candidate_num, FT(0.0));
+  std::vector<FT> weight_sum(candidate_num, FT(0.0));
+  std::vector<Vector> normal_sum(candidate_num, NULL_VECTOR);
+   
+  FT radius16 = FT(-4.0) / radius2;
+
+  for (unsigned int i = 0; i < new_v.neighbors.size(); ++i)
+  {
+    const Rich_point& t = rich_point_set[new_v.neighbors[i]];
+    FT dist2 = CGAL::squared_distance(new_v.pt, t.pt);
+    FT theta = std::exp(dist2 * radius16);
+
+    for (unsigned int j = 0; j < candidate_num; j++)
+    {
+      FT psi = std::exp(-std::pow(1 - normal_cadidate[j] * t.normal, 2)
+                       / sharpness_bandwidth);
+      FT project_diff_t_v = (t.pt - new_v.pt) * t.normal;
+      FT weight = psi * theta;
+
+      project_dist_sum[j] += project_diff_t_v * weight;
+      normal_sum[j] = normal_sum[j] + t.normal * weight;
+      weight_sum[j] += weight;
+    }
+  }
+
+  // select best candidate
+  FT min_project_dist = (std::numeric_limits<FT>::max)();
+  unsigned int best = 0;
+
+  for (unsigned int i = 0; i < candidate_num; ++i)
+  {
+    FT absolute_dist = CGAL::abs(project_dist_sum[i] / weight_sum[i]);
+    if (absolute_dist < min_project_dist)
+    {
+      min_project_dist = absolute_dist;
+      best = i;
+    }
+  }
+
+  // update position and normal
+  Vector update_normal = normal_sum[best] / weight_sum[best];
+  new_v.normal = update_normal / sqrt(update_normal.squared_length());
+
+  FT project_dist = project_dist_sum[best] / weight_sum[best];
+  new_v.pt = new_v.pt + new_v.normal * project_dist;
+
+
+  // 3, update neighbor information again
+  new_v.neighbors.clear();
+  for (set_iter = neighbor_indexes.begin(); 
+       set_iter != neighbor_indexes.end(); ++set_iter)
+  {
+    Rich_point& t = rich_point_set[*set_iter];
+    FT dist2 =  CGAL::squared_distance(new_v.pt, t.pt);
+
+    if (dist2 < radius2)
+    {
+      new_v.neighbors.push_back(t.index);
+      t.neighbors.push_back(new_v.index);
+    }
+  }
+}
+
+} /* namespace upsample_internal */
+
+/// \endcond
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// This method progressively upsamples the point set while 
+/// approaching the edge singularities (detected by normal variation), which 
+/// generates a denser point set from an input point set. This has applications 
+/// in point-based rendering, hole filling, and sparse surface reconstruction. 
+/// Normals of points are required as input. For more details, please refer to \cgalCite{ear-2013}.
+/// 
+/// @tparam Concurrency_tag enables sequential versus parallel
+///                         versions of `compute_average_spacing()` (called internally).
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam OutputIterator Type of the output iterator. 
+///         The type of the objects put in it is 
+///         `std::pair<Kernel::Point_3, Kernel::Vector_3>`.
+///         Note that the user may use a 
+///         <A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
+///         to match specific needs.
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` 
+///         with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
+///         It can be omitted if the value type of `ForwardIterator` is convertible to 
+///         `Kernel::Point_3`.
+/// @tparam NormalPMap is a model of `ReadablePropertyMap` with the value type of `ForwardIterator` as key
+///         and `Kernel::Vector_3` as value type.
+/// @tparam Kernel Geometric traits class.
+///      It can be omitted and deduced automatically from the value type of  `PointPMap`
+///      using `Kernel_traits`.
+///
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+	  typename OutputIterator,
+          typename ForwardIterator, 
+          typename PointPMap, 
+          typename NormalPMap,
+          typename Kernel>
+OutputIterator
+edge_aware_upsample_point_set(
+  ForwardIterator first,  ///< forward iterator on the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator.
+  OutputIterator output,  ///< output iterator where output points and normals 
+                          ///< are put.
+  PointPMap point_pmap,   ///< point property map.
+  NormalPMap normal_pmap, ///< vector property map.
+  const typename Kernel::FT sharpness_angle,  ///< 
+                    ///< controls the preservation of sharp features. 
+                    ///< The larger the value is,
+                    ///< the smoother the result will be.
+                    ///< The range of possible values is `[0, 90]`.
+                    ///< See section \ref Point_set_processing_3Upsample_Parameter2
+                    ///< for an example.
+  typename Kernel::FT edge_sensitivity,  ///<  
+                    ///< larger values of edge-sensitivity give higher priority 
+                    ///< to inserting points along sharp features.
+                    ///< The range of possible values is `[0, 1]`.
+                    ///< See section \ref Point_set_processing_3Upsample_Parameter1
+                    ///< for an example.
+  typename Kernel::FT neighbor_radius, ///< 
+                    ///< indicates the radius of the largest hole that should be filled.
+                    ///< The default value is set to 3 times the average spacing of the point set.
+                    ///< If the value given by user is smaller than the average spacing, 
+                    ///< the function will use the default value instead.
+  const std::size_t number_of_output_points,///< number of output
+                                             ///< points to generate.
+  const Kernel& /*kernel*/ ///< geometric traits.
+)
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+  typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
+
+  // preconditions
+  CGAL_point_set_processing_precondition(first != beyond);
+  CGAL_point_set_processing_precondition(sharpness_angle >= 0 
+                                       &&sharpness_angle <= 90);
+  CGAL_point_set_processing_precondition(edge_sensitivity >= 0 
+                                       &&edge_sensitivity <= 1);
+  CGAL_point_set_processing_precondition(neighbor_radius > 0);
+
+  edge_sensitivity *= 10;  // just project [0, 1] to [0, 10].
+
+  std::size_t number_of_input = std::distance(first, beyond);
+  CGAL_point_set_processing_precondition(number_of_output_points > number_of_input);
+
+
+  const unsigned int nb_neighbors = 6; // 1 ring
+  FT average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                   first, beyond,
+                   point_pmap,
+                   nb_neighbors);
+
+  if (neighbor_radius < average_spacing)
+  {
+    neighbor_radius = average_spacing * 3.0f;
+#ifdef CGAL_PSP3_VERBOSE
+    std::cout << "neighbor radius: " << neighbor_radius << std::endl;
+#endif
+  }
+  
+  Real_timer task_timer;
+
+  // copy rich point set
+  std::vector<Rich_point> rich_point_set(number_of_input);
+  CGAL::Bbox_3 bbox(0., 0., 0., 0., 0., 0.);
+  
+  ForwardIterator it = first; // point iterator
+  for(unsigned int i = 0; it != beyond; ++it, ++i)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    rich_point_set[i].pt = get(point_pmap, it);
+    rich_point_set[i].normal = get(normal_pmap, it);
+#else
+    rich_point_set[i].pt = get(point_pmap, *it);
+    rich_point_set[i].normal = get(normal_pmap, *it);
+#endif
+
+    rich_point_set[i].index = i;
+    bbox += rich_point_set[i].pt.bbox();
+    CGAL_point_set_processing_precondition(rich_point_set[i].normal.squared_length() > 1e-10);
+  }
+
+  // compute neighborhood
+  rich_grid_internal::compute_ball_neighbors_one_self(rich_point_set,
+                                                      bbox,
+                                                      neighbor_radius);
+
+  //
+  FT cos_sigma = static_cast<FT>(std::cos(CGAL::to_double(sharpness_angle) / 180.0 * CGAL_PI));
+  FT sharpness_bandwidth = std::pow((CGAL::max)((FT)1e-8, (FT)1.0 - cos_sigma), 2);
+
+  FT sum_density = 0.0;
+  unsigned int count_density = 1;
+  double max_iter_time = 20;
+  FT current_radius = neighbor_radius;
+  FT density_pass_threshold = 0.0;
+
+  for (unsigned int iter_time = 0; iter_time < max_iter_time; ++iter_time)
+  {
+  #ifdef CGAL_PSP3_VERBOSE
+     std::cout << std::endl << "iter_time: " << iter_time + 1  << std::endl;
+  #endif
+    if (iter_time > 0)
+    {
+      current_radius *= 0.75;
+      if (current_radius < density_pass_threshold * 3) //3 ring
+      {
+        current_radius = density_pass_threshold * 3;
+      }
+      rich_grid_internal::compute_ball_neighbors_one_self(rich_point_set,
+                                                          bbox,
+                                                          current_radius);
+    }
+ #ifdef CGAL_PSP3_VERBOSE
+    std::cout << "current radius: " << current_radius << std::endl; 
+ #endif
+
+    std::size_t current_size = rich_point_set.size();
+    std::vector<bool> is_pass_threshold(current_size, false);
+
+    if (iter_time == 0)
+    {
+      //estimate density threshold for the first time
+      for (unsigned int i = 0; i < rich_point_set.size() * 0.05; ++i)
+      {
+        const Rich_point& v = rich_point_set[i];
+
+        if (v.neighbors.empty())
+          continue;
+
+        // extract neighbor rich points by index
+        std::vector<Rich_point> neighbor_rich_points(v.neighbors.size());
+        for (unsigned int n = 0; n < v.neighbors.size(); n++)
+        {
+          neighbor_rich_points[n] = rich_point_set[v.neighbors[n]];
+        }
+
+        unsigned int base_index = 0;
+        FT density2 = upsample_internal::
+                              base_point_selection(v,
+                                                   neighbor_rich_points,
+                                                   edge_sensitivity,
+                                                   base_index);
+
+        if (density2 < 0)
+        {
+          continue;
+        }
+
+        sum_density += density2;
+        count_density++;
+      }
+    }
+
+    density_pass_threshold = static_cast<FT>(sqrt(sum_density / count_density) * FT(0.65));
+    sum_density = 0.;
+    count_density = 1;
+
+    FT density_pass_threshold2 = density_pass_threshold * 
+                                 density_pass_threshold;
+ #ifdef CGAL_PSP3_VERBOSE
+    std::cout << "pass_threshold:  " << density_pass_threshold << std::endl;
+ #endif
+    // insert new points until all the points' density pass the threshold
+    unsigned int max_loop_time = 3;
+    unsigned int loop = 0;
+    while (true)
+    {
+   #ifdef CGAL_PSP3_VERBOSE
+      std::cout << "loop_time: " << loop + 1 << std::endl;
+   #endif
+      unsigned int count_not_pass = 0;
+      loop++;
+      for (unsigned int i = 0; i < rich_point_set.size(); ++i)
+      {
+        if (is_pass_threshold[i])
+        {
+          continue;
+        }
+
+        const Rich_point& v = rich_point_set[i];
+
+        if (v.neighbors.empty())
+          continue;
+
+        // extract neighbor rich points by index
+        std::vector<Rich_point> neighbor_rich_points(v.neighbors.size());
+        for (unsigned int n = 0; n < v.neighbors.size(); ++n)
+        {
+          neighbor_rich_points[n] = rich_point_set[v.neighbors[n]];
+        }
+
+        // select base point 
+        unsigned int base_index = 0;
+        FT density2 = upsample_internal::
+                              base_point_selection(v,
+                                                   neighbor_rich_points,
+                                                   edge_sensitivity,
+                                                   base_index);
+
+        // test if it pass the density threshold
+        if (density2 < density_pass_threshold2)
+        {
+          is_pass_threshold[i] = true;
+          continue;
+        }
+        count_not_pass++;
+
+        sum_density += density2;
+        count_density++;
+
+        // insert a new rich point
+        unsigned int father_index = v.index;
+        unsigned int mother_index = base_index;
+
+        Rich_point new_v;
+        Rich_point& base = rich_point_set[mother_index];
+        Vector diff_v_base = base.pt - v.pt;
+        new_v.pt = v.pt + (diff_v_base * FT(0.5));
+        new_v.index = static_cast<unsigned int>(rich_point_set.size());
+
+        unsigned int new_point_index = new_v.index;
+        rich_point_set.push_back(new_v);
+        is_pass_threshold.push_back(false);
+
+        //update new rich point
+        upsample_internal::update_new_point(new_point_index, 
+                                            father_index, 
+                                            mother_index, 
+                                            rich_point_set, 
+                                            current_radius,
+                                            sharpness_bandwidth);
+
+        if (rich_point_set.size() >= number_of_output_points)
+        {
+          break;
+        }
+      }
+   #ifdef CGAL_PSP3_VERBOSE
+      std::cout << "current size: " << rich_point_set.size() << std::endl;
+   #endif
+      if (count_not_pass == 0 || 
+          loop >= max_loop_time || 
+          rich_point_set.size() >= number_of_output_points)
+      {
+        break;
+      }
+
+    }
+
+    if (rich_point_set.size() >= number_of_output_points)
+    {
+      break;
+    }
+  }
+
+  for (std::size_t i = number_of_input; i < rich_point_set.size(); ++i)
+  {
+    const Rich_point& v = rich_point_set[i];
+    Point point = v.pt;
+    Vector normal = v.normal;
+    *output++ = std::make_pair(point, normal);
+  }
+ 
+  return output;
+}
+
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename Concurrency_tag,
+	  typename OutputIterator,
+          typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap>
+OutputIterator
+edge_aware_upsample_point_set(
+  ForwardIterator first,    ///< forward iterator to the first input point.
+  ForwardIterator beyond,   ///< past-the-end iterator.
+  OutputIterator output, ///< output iterator over points.
+  PointPMap point_pmap, ///< property map: `ForwardIterator` -> Point_3.
+  NormalPMap normal_pmap, ///< property map: `ForwardIterator` -> Vector_3.
+  double sharpness_angle,  ///< control sharpness(0-90)
+  double edge_sensitivity,  ///< edge sensitivity(0-5)
+  double neighbor_radius, ///< initial size of neighbors.
+  const std::size_t number_of_output_points///< number of iterations.   
+  )
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  typedef typename Kernel::FT FT;
+  return edge_aware_upsample_point_set<Concurrency_tag>(
+    first, beyond,
+    output,
+    point_pmap,
+    normal_pmap,
+    static_cast<FT>(sharpness_angle), 
+    static_cast<FT>(edge_sensitivity),
+    static_cast<FT>(neighbor_radius), 
+    number_of_output_points,
+    Kernel());
+}
+/// @endcond
+
+
+/// @cond SKIP_IN_MANUAL
+template <typename Concurrency_tag,
+	  typename OutputIterator,
+          typename ForwardIterator,
+          typename NormalPMap>
+OutputIterator
+edge_aware_upsample_point_set(
+  ForwardIterator first, ///< iterator over the first input point
+  ForwardIterator beyond, ///< past-the-end iterator
+  OutputIterator output, ///< output iterator over points.
+  NormalPMap normal_pmap, ///< property map:  OutputIterator -> Vector_3.
+  double sharpness_angle = 30,  ///< control sharpness(0-90)
+  double edge_sensitivity = 1,  ///< edge sensitivity(0-5)
+  double neighbor_radius = -1, ///< initial size of neighbors.
+  const std::size_t number_of_output_points = 1000///< number of output points.     
+  )
+{
+  // just deduce value_type of OutputIterator
+  return edge_aware_upsample_point_set
+    <Concurrency_tag, typename value_type_traits<OutputIterator>::type>(
+    first, beyond,
+    output,
+    normal_pmap,
+    sharpness_angle, 
+    edge_sensitivity,
+    neighbor_radius, 
+    number_of_output_points);
+}
+/// @endcond
+
+} //namespace CGAL
+
+#endif // CGAL_UPSAMPLE_POINT_SET_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/enum.h b/3rdparty/CGAL-4.8/include/CGAL/enum.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/enum.h
rename to 3rdparty/CGAL-4.8/include/CGAL/enum.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/envelope_2.h b/3rdparty/CGAL-4.8/include/CGAL/envelope_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/envelope_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/envelope_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/envelope_3.h b/3rdparty/CGAL-4.8/include/CGAL/envelope_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/envelope_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/envelope_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/exceptions.h b/3rdparty/CGAL-4.8/include/CGAL/exceptions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/exceptions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/exceptions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/export/CGAL.h b/3rdparty/CGAL-4.8/include/CGAL/export/CGAL.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/export/CGAL.h
rename to 3rdparty/CGAL-4.8/include/CGAL/export/CGAL.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/export/CORE.h b/3rdparty/CGAL-4.8/include/CGAL/export/CORE.h
new file mode 100644
index 0000000..b0c48d0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/export/CORE.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Expr.h
+ * Synopsis: a class of Expression in Level 3
+ * 
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *       Vikram Sharma<sharma at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_CORE_EXPORT_H
+#define CGAL_CORE_EXPORT_H
+
+#include <CGAL/config.h>
+#include <CGAL/export/helpers.h>
+
+// If CGAL_EXPORTS is defined, one are building the CGAL library, and we do
+// not want artificial dll-imports of Core symbols (because of
+// auto-linking).
+#if ( ! defined(CGAL_EXPORTS) ) && defined(CGAL_BUILD_SHARED_LIBS)
+
+#  if defined(CGAL_Core_EXPORTS) // defined by CMake or in cpp files of the dll
+
+#    define CGAL_CORE_EXPORT CGAL_DLL_EXPORT
+#    define CGAL_CORE_EXPIMP_TEMPLATE
+
+#  else // not CGAL_Core_EXPORTS
+
+#    define CGAL_CORE_EXPORT CGAL_DLL_IMPORT
+#    define CGAL_CORE_EXPIMP_TEMPLATE extern
+
+#  endif // not CGAL_CORE_EXPORTS
+
+#else // not CGAL_BUILD_SHARED_LIBS
+
+#  define CGAL_CORE_EXPORT
+#  define CGAL_CORE_EXPIMP_TEMPLATE
+
+#endif // not CGAL_BUILD_SHARED_LIBS
+
+#endif //  CGAL_CORE_EXPORT_H
+
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/export/ImageIO.h b/3rdparty/CGAL-4.8/include/CGAL/export/ImageIO.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/export/ImageIO.h
rename to 3rdparty/CGAL-4.8/include/CGAL/export/ImageIO.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/export/Qt.h b/3rdparty/CGAL-4.8/include/CGAL/export/Qt.h
new file mode 100644
index 0000000..c8d987f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/export/Qt.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_QT_EXPORT_H
+#define CGAL_QT_EXPORT_H
+
+#include <CGAL/config.h>
+#include <CGAL/export/helpers.h>
+
+#if defined(CGAL_BUILD_SHARED_LIBS)
+
+#  if defined(CGAL_Qt5_EXPORTS) // defined by CMake or in cpp files of the dll
+
+#    define CGAL_QT_EXPORT CGAL_DLL_EXPORT
+#    define CGAL_QT_EXPIMP_TEMPLATE
+
+#  else // not CGAL_Qt_EXPORTS
+
+#    define CGAL_QT_EXPORT CGAL_DLL_IMPORT
+#    define CGAL_QT_EXPIMP_TEMPLATE extern
+
+#  endif // not CGAL_QT_EXPORTS
+
+#else // not CGAL_BUILD_SHARED_LIBS
+
+#  define CGAL_QT_EXPORT
+#  define CGAL_QT_EXPIMP_TEMPLATE
+
+#endif // not CGAL_BUILD_SHARED_LIBS
+
+#endif //  CGAL_QT_EXPORT_H
+
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/export/helpers.h b/3rdparty/CGAL-4.8/include/CGAL/export/helpers.h
new file mode 100644
index 0000000..cb6cecd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/export/helpers.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_EXPORT_HELPERS_H
+#define CGAL_EXPORT_HELPERS_H
+
+#ifdef CGAL_HEADER_ONLY
+#  define CGAL_DLL_IMPORT
+#  define CGAL_DLL_EXPORT
+#  define CGAL_DLL_LOCAL
+
+#else // !CGAL_HEADER_ONLY
+#  if defined(_WIN32) || defined(__CYGWIN__)
+#    define CGAL_DLL_IMPORT __declspec(dllimport)
+#    define CGAL_DLL_EXPORT __declspec(dllexport)
+#    define CGAL_DLL_LOCAL
+#  else
+    #if __GNUC__ >= 4
+      #define CGAL_DLL_IMPORT __attribute__ ((visibility ("default")))
+      #define CGAL_DLL_EXPORT __attribute__ ((visibility ("default")))
+      #define CGAL_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+    #else
+      #define CGAL_DLL_IMPORT
+      #define CGAL_DLL_EXPORT
+      #define CGAL_DLL_LOCAL
+    #endif
+#  endif
+
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_EXPORT_HELPERS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/extended_euclidean_algorithm.h b/3rdparty/CGAL-4.8/include/CGAL/extended_euclidean_algorithm.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/extended_euclidean_algorithm.h
rename to 3rdparty/CGAL-4.8/include/CGAL/extended_euclidean_algorithm.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/extract_mean_curvature_flow_skeleton.h b/3rdparty/CGAL-4.8/include/CGAL/extract_mean_curvature_flow_skeleton.h
new file mode 100644
index 0000000..b0d6e34
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/extract_mean_curvature_flow_skeleton.h
@@ -0,0 +1,67 @@
+// Copyright (c) 2014  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+//
+
+#ifndef CGAL_EXTRACT_MEAN_CURVATURE_FLOW_SKELETON_H
+#define CGAL_EXTRACT_MEAN_CURVATURE_FLOW_SKELETON_H
+
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/Polyhedron_items_with_id_3.h>
+#include <CGAL/FaceGraph_to_Polyhedron_3.h>
+#ifdef CGAL_EIGEN3_ENABLED
+#include <CGAL/Eigen_solver_traits.h>  // for sparse linear system solver
+#endif
+
+#include <CGAL/Mean_curvature_flow_skeletonization.h>
+
+namespace CGAL{
+
+#if defined(DOXYGEN_RUNNING) || defined(CGAL_EIGEN3_ENABLED)
+/// \ingroup PkgMeanCurvatureSkeleton3
+/// @brief extracts a medially centered curve skeleton for the triangle mesh `tmesh`.
+/// This function uses the class CGAL::Mean_curvature_flow_skeletonization with the default parameters.
+/// This function is provided only if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined.
+/// @pre `tmesh` is a triangle mesh without borders and having exactly one connected component.
+/// @pre The specialization `boost::property_map<TriangleMesh, CGAL::vertex_point_t>::%type` and `get(vertex_point, tmesh)` are defined.
+/// @pre The value type of `boost::property_map<TriangleMesh, CGAL::vertex_point_t>::%type` is a point type from a \cgal Kernel.
+///
+/// @tparam TriangleMesh
+///         a model of `FaceListGraph`
+///
+/// @param tmesh
+///        input mesh
+/// @param skeleton
+///        graph that will contain the skeleton of `tmesh`.
+///        For each vertex descriptor `vd` of `skeleton`, the corresponding point
+///        and the set of input vertices that contracted to `vd` can be retrieved
+///        using `skeleton[vd].point` and `skeleton[vd].vertices` respectively.
+///
+template <class TriangleMesh>
+void extract_mean_curvature_flow_skeleton(const TriangleMesh& tmesh,
+                                          typename Mean_curvature_flow_skeletonization<TriangleMesh>::Skeleton& skeleton)
+{
+  // extract the skeleton
+  typedef CGAL::Mean_curvature_flow_skeletonization<TriangleMesh> Mcfskel;
+  Mcfskel mcfs(tmesh);
+  mcfs(skeleton);
+}
+#endif
+
+}// end of namespace CGAL
+
+#endif //CGAL_EXTRACT_MEAN_CURVATURE_FLOW_SKELETON_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/extremal_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/extremal_polygon_2.h
new file mode 100644
index 0000000..fe9e089
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/extremal_polygon_2.h
@@ -0,0 +1,750 @@
+// Copyright (c) 1998-2003  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+
+#ifndef CGAL_EXTREMAL_POLYGON_2_H
+#define CGAL_EXTREMAL_POLYGON_2_H 1
+
+#include <CGAL/Optimisation/assertions.h>
+#include <CGAL/monotone_matrix_search.h>
+#include <CGAL/Dynamic_matrix.h>
+#include <CGAL/Transform_iterator.h>
+#include <CGAL/Polygon_2_algorithms.h>
+#include <vector>
+#include <functional>
+#include <algorithm>
+#include <CGAL/Extremal_polygon_traits_2.h>
+#include <boost/bind.hpp>
+#include <boost/bind/make_adaptable.hpp>
+namespace CGAL {
+
+//!!! This will eventually be integrated into function_objects.h
+template < class Array, class Index, class Element >
+struct Index_operator
+: public std::binary_function< Array, Index, Element >
+{
+  Element&
+  operator()( Array& a, const Index& i) const
+  { return a[i]; }
+
+  const Element&
+  operator()( const Array& a, const Index& i) const
+  { return a[i]; }
+};
+
+template < class RandomAccessIC_object_,
+           class RandomAccessIC_value_,
+           class Operation_ >
+// This class describes the kind of matrices used for the
+// computation of extremal polygons.
+//
+// RandomAccessIC_object is a random access iterator or circulator
+//   with value type Object
+// RandomAccessIC_value is a random access iterator or circulator
+//   with value type Value
+// Operation is an adatable binary function:
+//   Object x Object -> Value
+//
+// objects can be constructed using the helper function
+// extremal_polygon_matrix.
+//
+class Extremal_polygon_matrix {
+public:
+  typedef RandomAccessIC_object_ RandomAccessIC_object;
+  typedef RandomAccessIC_value_  RandomAccessIC_value;
+  typedef Operation_             Operation;
+
+  typedef typename
+    std::iterator_traits< RandomAccessIC_object >::value_type
+  Object;
+  typedef typename
+    std::iterator_traits< RandomAccessIC_value >::value_type
+  Value;
+
+  Extremal_polygon_matrix(
+    RandomAccessIC_object begin_row,
+    RandomAccessIC_object end_row,
+    RandomAccessIC_object begin_col,
+    RandomAccessIC_object end_col,
+    RandomAccessIC_value  begin_value,
+    RandomAccessIC_value  CGAL_optimisation_precondition_code(end_value),
+    const Operation&      o)
+  // initialization with two ranges [begin_row, end_row) and
+  // [begin_col, end_col) of Objects, a range [begin_value, end_value)
+  // of Values and an Operation o.
+  //
+  // an entry (r, c) of this matrix is then defined as:
+  //   begin_value[c] + op( begin_row[r], begin_col[c]).
+  //
+  : op( o),
+    begin_row_( begin_row),
+    begin_col_( begin_col),
+    begin_value_( begin_value),
+    n_rows( static_cast<int>(iterator_distance( begin_row, end_row))),
+    n_cols( static_cast<int>(iterator_distance( begin_col, end_col)))
+  {
+    CGAL_optimisation_precondition(
+      iterator_distance( begin_value, end_value) == n_cols);
+    CGAL_optimisation_assertion( n_rows > 0 && n_cols > 0);
+  }
+
+  int
+  number_of_rows() const
+  { return n_rows; }
+
+  int
+  number_of_columns() const
+  { return n_cols; }
+
+  Value
+  operator()( int r, int c) const
+  {
+    CGAL_optimisation_precondition( r >= 0 && r < n_rows);
+    CGAL_optimisation_precondition( c >= 0 && c < n_cols);
+    return begin_value_[c] + op( begin_row_[r], begin_col_[c]);
+  }
+
+private:
+  Operation              op;
+  RandomAccessIC_object  begin_row_;
+  RandomAccessIC_object  begin_col_;
+  RandomAccessIC_value   begin_value_;
+  int                    n_rows;
+  int                    n_cols;
+};
+
+template < class RandomAccessIC_object,
+           class RandomAccessIC_value,
+           class Operation >
+inline
+Extremal_polygon_matrix< RandomAccessIC_object,
+                         RandomAccessIC_value,
+                         Operation >
+extremal_polygon_matrix(
+  RandomAccessIC_object begin_row,
+  RandomAccessIC_object end_row,
+  RandomAccessIC_object begin_col,
+  RandomAccessIC_object end_col,
+  RandomAccessIC_value  begin_value,
+  RandomAccessIC_value  end_value,
+  const Operation&      o)
+{
+  return Extremal_polygon_matrix< RandomAccessIC_object,
+                                  RandomAccessIC_value,
+                                  Operation >
+  ( begin_row, end_row,
+    begin_col, end_col,
+    begin_value, end_value,
+    o);
+}
+
+
+template < class RandomAccessIC, class Outputiterator, class Traits >
+Outputiterator
+CGAL_maximum_inscribed_rooted_k_gon_2(
+  RandomAccessIC points_begin,
+  RandomAccessIC points_end,
+  int k,
+  typename Traits::FT& max_area,
+  Outputiterator o,
+  const Traits& t)
+//
+// preconditions:
+// --------------
+//  * Traits fulfills the requirements for an extremal polygon
+//    traits class
+//  * the range [points_begin, points_end) of size n > 0
+//    describes the vertices of a convex polygon $P$
+//    enumerated clock- or counterclockwise
+// n > k,
+//  * k >= t.min_k()
+//  * value_type of RandomAccessIC is Traits::Point_2
+//  * OutputIterator accepts Traits::Point_2 as value_type 
+//
+// functionality:
+// --------------
+// computes maximum (as specified by t) inscribed k-gon $P_k$
+// of the polygon $P$,
+// that is rooted at points_begin[0],
+// sets max_area to its associated value (as specified by t)
+// writes the indices (relative to points_begin)
+// of $P_k$'s vertices to o and
+// returns the past-the-end iterator of that sequence.
+{
+  // check preconditions:
+  CGAL_optimisation_precondition( k >= t.min_k());
+  int number_of_points(
+                       static_cast<int>(iterator_distance( points_begin, 
+                                                           points_end)));
+  CGAL_optimisation_precondition( number_of_points > k);
+
+  typedef std::vector< int > Index_cont;
+
+  if ( k == t.min_k())
+    // compute min_k gon:
+    return t.compute_min_k_gon(
+      points_begin, points_end, max_area, o);
+
+  // current i-gon (i = 2/3...k)
+  Index_cont gon( k + 1);
+
+  // compute initial min_k-gon:
+  int i( t.min_k());
+  t.compute_min_k_gon(
+    points_begin, points_end, max_area, gon.rbegin() + k + 1 - i);
+  
+  for (;;) {
+    CGAL_optimisation_assertion( gon[0] == 0);
+    gon[i] = number_of_points - 1;
+    if ( ++i >= k)
+      break;
+    CGAL_maximum_inscribed_rooted_k_gon_2(
+      points_begin,
+      points_end,
+      0,
+      gon.begin(),
+      gon.begin() + i - 1,
+      gon.begin() + 1,
+      gon.begin() + i,
+      max_area,
+      gon.rbegin() + k + 1 - i,
+      t);
+  } // for (;;)
+  
+  return CGAL_maximum_inscribed_rooted_k_gon_2(
+    points_begin,
+    points_end,
+    0,
+    gon.begin(),
+    gon.begin() + k - 1,
+    gon.begin() + 1,
+    gon.begin() + k,
+    max_area,
+    o,
+    t);
+
+} // CGAL_maximum_inscribed_rooted_k_gon_2( ... )
+template < class RandomAccessIC_point,
+           class RandomAccessIC_int,
+           class OutputIterator,
+           class Traits >
+OutputIterator
+CGAL_maximum_inscribed_rooted_k_gon_2(
+  RandomAccessIC_point points_begin,
+  RandomAccessIC_point points_end,
+  int root,
+  RandomAccessIC_int left_c_begin,
+  RandomAccessIC_int CGAL_optimisation_precondition_code(left_c_end),
+  RandomAccessIC_int right_c_begin,
+  RandomAccessIC_int right_c_end,
+  typename Traits::FT& max_area,
+  OutputIterator o,
+  const Traits& t)
+//
+// preconditions:
+// --------------
+//  * Traits fulfills the requirements for an extremal polygon
+//    traits class
+//  * the range [points_begin, points_end) of size n > 0
+//    describes the vertices of a convex polygon $P$
+//    enumerated clock- or counterclockwise
+//  * value_type of RandomAccessIC_point is Traits::Point
+//  * value_type of RandomAccessIC_int is int
+//  * OutputIterator accepts int as value type
+//  * length := right_c_end - right_c_begin == left_c_end - left_c_begin
+//    >= t.min_k() - 1 (the root is already fixed)
+//  * [left_c_begin, left_c_end) resp. [right_c_begin, right_c_end)
+//    describe two subpolygons of $P$ by giving the indices of its
+//    vertices relative to points_begin and for any 0 <= i < length:
+//    left_c_begin[i] <= right_c_begin[i]
+//  * for any 0 <= i < length: o + i must not be contained in
+//    the range [right_c_begin, right_c_begin + length - i - 2].
+//    (NOT checked!)
+//
+// functionality:
+// --------------
+// computes maximum (as specified by t) inscribed k-gon $P_k$
+// of the polygon $P$,
+// that is rooted at points_begin[left_c_begin[0]]
+// such that for any 0 <= i < length:
+//    left_c_begin[i] <= vertex i of $P_k$ <= right_c_begin[i],
+// sets max_area to its associated value (as specified by t),
+// writes the indices (relative to points_begin)
+// of $P_k$'s vertices to o and
+// returns the past-the-end iterator of that sequence.
+{
+  using std::max_element;
+
+  // counter :)
+  int i;
+
+  // compute size of ranges:
+  int number_of_points = static_cast<int>(iterator_distance( points_begin, 
+                                                             points_end));
+  int size_of_gon = static_cast<int>(iterator_distance( right_c_begin,
+                                                        right_c_end));
+
+  // check preconditions:
+  CGAL_optimisation_precondition( number_of_points > t.min_k());
+  CGAL_optimisation_precondition( size_of_gon >= t.min_k() - 1);
+  CGAL_optimisation_precondition(
+    iterator_distance( left_c_begin, left_c_end) ==
+    iterator_distance( right_c_begin, right_c_end));
+  CGAL_optimisation_precondition( left_c_begin[0] >= 0);
+  CGAL_optimisation_precondition( right_c_begin[0] >= 0);
+  CGAL_optimisation_precondition(
+    left_c_begin[size_of_gon-1] < number_of_points);
+  CGAL_optimisation_precondition(
+    right_c_begin[size_of_gon-1] < number_of_points);
+  CGAL_optimisation_expensive_precondition_code(
+    for ( i = 0; i < size_of_gon; ++i) {
+      CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0);
+      CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0);
+      CGAL_optimisation_expensive_precondition(
+        left_c_begin[i] < number_of_points);
+      CGAL_optimisation_expensive_precondition(
+        right_c_begin[i] < number_of_points);
+      CGAL_optimisation_expensive_precondition(
+        left_c_begin[i] <= right_c_begin[i]);
+    })
+
+  typedef typename Traits::FT               FT;
+  typedef std::vector< FT >                 FT_cont;
+  typedef std::vector< int >                Index_cont;
+  typedef typename Traits::Operation        Operation;
+  //!!! static ???
+  // area container:
+  FT_cont area( number_of_points);
+  
+  // last vertex container:
+  Index_cont last_vertex( number_of_points);
+  
+  // matrix operation:
+  Operation op( t.operation( points_begin[root]));
+  // initialize area and last vertex containers:
+  for ( i = left_c_begin[0]; i <= right_c_begin[0]; ++i) {
+    area[i] = t.init( points_begin[i], points_begin[root]);
+    last_vertex[i] = root;
+  }
+  
+  
+  for ( i = 1; i < size_of_gon; ++i) {
+  
+    monotone_matrix_search(
+      dynamic_matrix(
+        extremal_polygon_matrix(
+          points_begin + left_c_begin[i],
+          points_begin + right_c_begin[i] + 1,
+          points_begin + left_c_begin[i-1],
+          points_begin + right_c_begin[i-1] + 1,
+          area.begin() + left_c_begin[i-1],
+          area.begin() + right_c_begin[i-1] + 1,
+          op)),
+          last_vertex.begin() + left_c_begin[i]);
+  
+    // compute new area values and adjust last_vertex values
+    // (they are relative to left_c_begin[i-1] now)
+    int j;
+    for ( j = right_c_begin[i]; j >= left_c_begin[i]; --j) {
+      last_vertex[j] += left_c_begin[i-1];
+      area[j] = area[last_vertex[j]] +
+        op( points_begin[j], points_begin[last_vertex[j]]);
+    }
+  
+  } // for ( i = 1; i < size_of_gon; ++i)
+  
+  // find maximum in last range:
+  int maxi =
+    static_cast<int>(iterator_distance(
+      area.begin(),
+      max_element( area.begin() + left_c_begin[size_of_gon - 1],
+                   area.begin() + right_c_begin[size_of_gon - 1] + 1)));
+  // set max_area:
+  max_area = area[maxi];
+  
+  // construct gon:
+  *o++ = maxi;
+  maxi = last_vertex[maxi];
+  for ( i = size_of_gon - 1; i > 0; --i) {
+    // We must not place the "*o++ = maxi" here,
+    // since o might be the same as left_c_begin + i ...
+    if ( maxi != right_c_begin[i-1]) {
+      *o++ = maxi;
+      maxi = last_vertex[maxi];
+    }
+    else {
+      *o++ = maxi;
+      maxi = right_c_begin[i-2];
+    }
+  } // for ( i = size_of_gon - 1; i > 0; --i)
+  
+  *o++ = root;
+  return o;
+  
+
+} // CGAL_maximum_inscribed_rooted_k_gon_2( p, k, result)
+
+
+template < class RandomAccessIC,
+           class OutputIterator,
+           class Traits >
+inline
+OutputIterator
+extremal_polygon_2(
+  RandomAccessIC points_begin,
+  RandomAccessIC points_end,
+  int k,
+  OutputIterator o,
+  const Traits& t)
+//
+// preconditions:
+// --------------
+//  * Traits fulfills the requirements for an extremal polygon
+//    traits class
+//  * the range [points_begin, points_end) of size n > 0
+//    describes the vertices of a convex polygon $P$
+//    enumerated clock- or counterclockwise
+//  * k >= t.min_k()
+//  * value_type of RandomAccessIC is Traits::Point_2
+//  * OutputIterator accepts Traits::Point_2 as value_type 
+//
+// functionality:
+// --------------
+// computes maximum (as specified by t) inscribed k-gon $P_k$
+// of the polygon $P$,
+// writes the indices (relative to points_begin)
+// of $P_k$'s vertices to o and
+// returns the past-the-end iterator of that sequence.
+{
+  // check preconditions:
+  CGAL_optimisation_precondition_code(
+    int number_of_points(
+                         static_cast<int>(iterator_distance( points_begin, 
+                                                             points_end)));)
+  CGAL_optimisation_precondition( number_of_points >= t.min_k());
+  CGAL_optimisation_expensive_precondition(
+    is_convex_2( points_begin, points_end, t));
+
+  typedef typename Traits::Point_2 Point_2;
+  return CGAL_maximum_inscribed_k_gon_2(
+    points_begin,
+    points_end,
+    k,
+    CGAL::transform_iterator(
+      o,
+      boost::make_adaptable<Point_2, int>(boost::bind(Index_operator< RandomAccessIC, int, Point_2 >(),
+                                                      points_begin, _1))),
+    t);
+}
+
+// backwards compatibility
+template < class RandomAccessIC,
+           class OutputIterator,
+           class Traits >
+inline
+OutputIterator
+extremal_polygon(
+  RandomAccessIC points_begin,
+  RandomAccessIC points_end,
+  int k,
+  OutputIterator o,
+  const Traits& t)
+{ return extremal_polygon_2(points_begin, points_end, k, o, t); }
+
+template < class RandomAccessIC,
+           class OutputIterator,
+           class Traits >
+OutputIterator
+CGAL_maximum_inscribed_k_gon_2(
+  RandomAccessIC points_begin,
+  RandomAccessIC points_end,
+  int k,
+  OutputIterator o,
+  const Traits& t)
+//
+// preconditions:
+// --------------
+//  * Traits fulfills the requirements for an extremal polygon
+//    traits class
+//  * the range [points_begin, points_end) of size n > 0
+//    describes the vertices of a convex polygon $P$
+//    enumerated clock- or counterclockwise
+//  * k >= t.min_k()
+//  * value_type of RandomAccessIC is Traits::Point_2
+//  * OutputIterator accepts Traits::Point_2 as value_type 
+//
+// functionality:
+// --------------
+// computes maximum (as specified by t) inscribed k-gon $P_k$
+// of the polygon $P$,
+// writes the indices (relative to points_begin)
+// of $P_k$'s vertices to o and
+// returns the past-the-end iterator of that sequence.
+{
+  // check preconditions:
+  CGAL_optimisation_precondition( k >= t.min_k());
+  int number_of_points(
+                       static_cast<int>(iterator_distance( points_begin, 
+                                                           points_end)));
+  CGAL_optimisation_precondition( number_of_points > 0);
+
+  using std::copy;
+
+  typedef typename Traits::FT   FT;
+  typedef std::vector< int >    Index_cont;
+
+  if ( number_of_points <= k) {
+    for ( int j( k - 1); j >= 0; --j)
+      *o++ = (std::min)( j, number_of_points - 1);
+    return o;
+  }
+  // compute k-gon rooted at points_begin[0]
+  Index_cont P_0( k + 1);
+  FT area_0;
+  CGAL_maximum_inscribed_rooted_k_gon_2(
+    points_begin,
+    points_end,
+    k,
+    area_0,
+    P_0.rbegin() + 1,
+    t);
+  P_0[k] = number_of_points - 1;
+  CGAL_optimisation_assertion( P_0[0] == 0);
+  // compute k-gon rooted at points_begin[P_0[1]]
+  Index_cont P_1( k);
+  FT area_1;
+  
+  CGAL_maximum_inscribed_rooted_k_gon_2(
+    points_begin,
+    points_end,
+    P_0[1],
+    P_0.begin() + 1,
+    P_0.begin() + k,
+    P_0.begin() + 2,
+    P_0.begin() + k + 1,
+    area_1,
+    P_1.rbegin(),
+    t);
+  
+  CGAL_optimisation_assertion( P_1[0] == P_0[1]);
+  
+  
+  // start recursive computation:
+  FT area_r( 0);
+  Index_cont P_r( k);
+  if ( P_0[1] - P_0[0] > 1) {
+    CGAL_maximum_inscribed_k_gon_2(
+      points_begin,
+      points_end,
+      P_0[0] + 1,
+      P_0[1] - 1,
+      P_0.begin() + 1,
+      P_0.begin() + k,
+      P_0.begin() + 2,
+      P_0.begin() + k + 1,
+      k,
+      area_r,
+      P_r.rbegin(),
+      t);
+  }
+  
+  if ( area_r > area_0)
+    if ( area_r > area_1)
+      // recursive is maximum
+      copy( P_r.begin(), P_r.end(), o);
+    else
+      // P_1 is maximum
+      copy( P_1.begin(), P_1.end(), o);
+  else if ( area_0 > area_1)
+    // P_0 is maximum
+    copy( P_0.begin(), P_0.begin() + k, o);
+  else
+    // P_1 is maximum
+    copy( P_1.begin(), P_1.end(), o);
+
+  return o;
+} // CGAL_maximum_inscribed_k_gon_2( ... )
+template < class RandomAccessIC_point,
+           class RandomAccessIC_int,
+           class OutputIterator,
+           class Traits >
+OutputIterator
+CGAL_maximum_inscribed_k_gon_2(
+  RandomAccessIC_point points_begin,
+  RandomAccessIC_point points_end,
+  int left_index,
+  int right_index,
+  RandomAccessIC_int left_c_begin,
+  RandomAccessIC_int left_c_end,
+  RandomAccessIC_int right_c_begin,
+  RandomAccessIC_int right_c_end,
+  int k,
+  typename Traits::FT& max_area,
+  OutputIterator o,
+  const Traits& t)
+//
+// preconditions:
+// --------------
+//  * Traits fulfills the requirements for an extremal polygon
+//    traits class
+//  * the range [points_begin, points_end) of size n > 0
+//    describes the vertices of a convex polygon $P$
+//    enumerated clock- or counterclockwise
+//  * value_type of RandomAccessIC_point is Traits::Point
+//  * value_type of RandomAccessIC_int is int
+//  * OutputIterator accepts int as value type
+//  * 0 <= left_index <= right_index < |points_end - points_begin|
+//  * |left_c_end - left_c_begin| == |right_c_end - right_c_begin| == k - 1
+//  * [left_c_begin, left_c_end) resp. [right_c_begin, right_c_end)
+//    describe two subpolygons $P_l$ resp $P_r$ of $P$ by giving
+//    the indices of its vertices relative to points_begin and
+//    for any 0 <= i < k - 1:
+//      left_c_begin[i] <= right_c_begin[i]
+//  * k >= t.min_k()
+//
+// functionality:
+// --------------
+// computes maximum (as specified by t) inscribed k-gon $P_k$
+// of the polygon $P$,
+//  * that is rooted at one of the vertices [points_begin[left_index],
+//    points_begin[right_index]] and
+//  * interleaves with both $P_l$ and $P_r$,
+// sets max_area to its associated value (as specified by t),
+// writes the indices (relative to points_begin)
+// of $P_k$'s vertices to o and
+// returns the past-the-end iterator of that sequence.
+{
+  // typedefs
+  typedef typename Traits::FT               FT;
+  typedef std::vector< int >        Index_cont;
+
+  using std::copy;
+
+  // check preconditions:
+  CGAL_optimisation_precondition( k >= t.min_k());
+  CGAL_optimisation_precondition( left_index <= right_index);
+  CGAL_optimisation_precondition( left_index >= 0);
+  CGAL_optimisation_precondition( right_index >= 0);
+  CGAL_optimisation_precondition_code(
+    int number_of_points(
+                         static_cast<int>(iterator_distance( points_begin, 
+                                                             points_end)));)
+  CGAL_optimisation_precondition( left_index < number_of_points);
+  CGAL_optimisation_precondition( right_index < number_of_points);
+  CGAL_optimisation_precondition(
+    iterator_distance( left_c_begin, left_c_end) == k - 1);
+  CGAL_optimisation_precondition(
+    iterator_distance( right_c_begin, right_c_end) == k - 1);
+  CGAL_optimisation_expensive_precondition_code(
+    for ( int i( 0); i < k - 1; ++i) {
+      CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0);
+      CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0);
+      CGAL_optimisation_expensive_precondition(
+        left_c_begin[i] < number_of_points);
+      CGAL_optimisation_expensive_precondition(
+        right_c_begin[i] < number_of_points);
+      CGAL_optimisation_expensive_precondition(
+        left_c_begin[i] <= right_c_begin[i]);
+    })
+
+
+  int middle_index( (left_index + right_index) >> 1);
+  Index_cont P_m( k);
+  FT area_middle;
+  CGAL_maximum_inscribed_rooted_k_gon_2(
+    points_begin,
+    points_end,
+    middle_index,
+    left_c_begin,
+    left_c_end,
+    right_c_begin,
+    right_c_end,
+    area_middle,
+    P_m.rbegin(),
+    t);
+  CGAL_optimisation_assertion( P_m[0] == middle_index);
+  // left recursive branch:
+  FT area_left( 0);
+  Index_cont P_l( k);
+  if ( left_index < middle_index) {
+    CGAL_maximum_inscribed_k_gon_2(
+      points_begin,
+      points_end,
+      left_index,
+      middle_index - 1,
+      left_c_begin,
+      left_c_end,
+      P_m.begin() + 1,
+      P_m.end(),
+      k,
+      area_left,
+      P_l.rbegin(),
+      t);
+  } // if ( left_index < middle_index)
+  
+  
+  // right recursive branch:
+  FT area_right( 0);
+  Index_cont P_r( k);
+  if ( right_index > middle_index) {
+    CGAL_maximum_inscribed_k_gon_2(
+      points_begin,
+      points_end,
+      middle_index + 1,
+      right_index,
+      P_m.begin() + 1,
+      P_m.end(),
+      right_c_begin,
+      right_c_end,
+      k,
+      area_right,
+      P_r.rbegin(),
+      t);
+  } // if ( right_index > middle_index)
+  
+  
+
+  if ( area_left > area_right)
+    if ( area_left > area_middle) {
+      // left is maximum
+      max_area = area_left;
+      copy( P_l.begin(), P_l.end(), o);
+    }
+    else {
+      // middle is maximum
+      max_area = area_middle;
+      copy( P_m.begin(), P_m.end(), o);
+    }
+  else if ( area_right > area_middle) {
+    // right is maximum
+    max_area = area_right;
+    copy( P_r.begin(), P_r.end(), o);
+  }
+  else {
+    // middle is maximum
+    max_area = area_middle;
+    copy( P_m.begin(), P_m.end(), o);
+  }
+
+  return o;
+} // CGAL_maximum_inscribed_k_gon_2( ... )
+
+} //namespace CGAL
+
+#endif // ! (CGAL_EXTREMAL_POLYGON_2_H)
diff --git a/3rdparty/CGAL-4.8/include/CGAL/exude_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/exude_mesh_3.h
new file mode 100644
index 0000000..40bb3ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/exude_mesh_3.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : exude_mesh_3 function definition.
+//******************************************************************************
+
+#ifndef CGAL_EXUDE_MESH_3_H
+#define CGAL_EXUDE_MESH_3_H
+
+#include <CGAL/Mesh_3/sliver_criteria.h>
+#include <CGAL/Mesh_3/Slivers_exuder.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h>
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <boost/parameter.hpp>
+
+namespace CGAL {
+
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (Mesh_optimization_return_code),
+  exude_mesh_3,
+  parameters::tag,
+  (required (in_out(c3t3),*) )
+  (optional
+    (time_limit_, *, 0 )
+    (sliver_bound_, *, parameters::default_values::exude_sliver_bound )
+  )
+)
+{
+  return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_);
+}
+CGAL_PRAGMA_DIAG_POP
+
+
+
+template <typename C3T3>
+Mesh_optimization_return_code
+exude_mesh_3_impl(C3T3& c3t3,
+                  const double time_limit,
+                  const double sliver_bound)
+{
+  typedef typename C3T3::Triangulation Tr;
+  typedef Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
+  //typedef Mesh_3::Radius_radio_criterion<Tr> Sc;
+  typedef typename Mesh_3::Slivers_exuder<C3T3, Sc> Exuder;
+  
+  // Create exuder
+  Sc criterion(sliver_bound, c3t3.triangulation());
+  Exuder exuder(c3t3, criterion);
+
+  // Set time_limit
+  exuder.set_time_limit(time_limit);
+  
+  // Launch exudation
+  return exuder();
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_EXUDE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/float.h b/3rdparty/CGAL-4.8/include/CGAL/float.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/float.h
rename to 3rdparty/CGAL-4.8/include/CGAL/float.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/function_objects.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/functions_on_enums.h b/3rdparty/CGAL-4.8/include/CGAL/functions_on_enums.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/functions_on_enums.h
rename to 3rdparty/CGAL-4.8/include/CGAL/functions_on_enums.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/functions_on_signs.h b/3rdparty/CGAL-4.8/include/CGAL/functions_on_signs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/functions_on_signs.h
rename to 3rdparty/CGAL-4.8/include/CGAL/functions_on_signs.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/generators.h b/3rdparty/CGAL-4.8/include/CGAL/generators.h
new file mode 100644
index 0000000..0bdc224
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/generators.h
@@ -0,0 +1,110 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+
+#ifndef CGAL_GENERATORS_H
+#define CGAL_GENERATORS_H 1
+
+#include <CGAL/basic.h>
+#include <cstddef>
+#include <cmath>
+#include <iterator>
+#include <algorithm>
+#include <CGAL/function_objects.h>
+#include <CGAL/Random.h>
+
+namespace CGAL {
+template < class T >
+class Generator_base {
+protected:
+    T       d_item;
+    double  d_range;
+public:
+    typedef std::input_iterator_tag iterator_category;
+    typedef T                       value_type;
+    typedef std::ptrdiff_t          difference_type;
+    typedef const T*                pointer;
+    typedef const T&                reference;
+    typedef Generator_base<T>      This;
+
+    Generator_base() {}
+    Generator_base( double range) : d_range( range) {}
+    Generator_base( const T& item, double range)
+        : d_item(item), d_range(range) {}
+
+    bool operator==( const This& base) const {
+        return ( d_item == base.d_item);
+    }
+    bool operator!=( const This& base) const { return ! operator==(base);}
+    double    range()      const { return d_range; }
+    reference operator*()  const { return d_item; }
+    pointer   operator->() const { return & operator*(); }
+};
+
+template < class T >
+class Random_generator_base : public Generator_base<T> {
+protected:
+    Random& _rnd;
+public:
+    typedef  Random_generator_base<T> This;
+
+    Random_generator_base() : _rnd( CGAL::get_default_random() ) {}
+    Random_generator_base( double range, Random& rnd)
+        : Generator_base<T>( range), _rnd( rnd) {}
+    Random_generator_base( const T& item, double range, Random& rnd)
+        : Generator_base<T>( item, range), _rnd( rnd) {}
+    bool operator==( const This& rb) const {
+        return ( _rnd == rb._rnd && Generator_base<T>::operator==(rb));
+    }
+    bool operator!=( const This& rb) const { return ! operator==(rb); }
+};
+
+class Random_double_in_interval : public Random_generator_base<double> {
+
+ public:
+  typedef Random_double_in_interval This;
+  Random_double_in_interval(double a = 1, Random& rnd = CGAL::get_default_random())
+    // g is an input iterator creating points of type `P' uniformly
+    // distributed in the half-open square with side length a,
+    // centered around the origin, i.e. \forall p = `*g': -\frac{a}{2}
+    // <= p.x() < \frac{a}{2} and -\frac{a}{2} <= p.y() < \frac{a}{2}
+    // . Two random numbers are needed from `rnd' for each point.
+    : Random_generator_base<double>( a, rnd)
+    { 
+      this->d_item = this->d_range * (2 * this->_rnd.get_double() - 1.0);
+    }
+  
+  This& operator++() {
+    this->d_item = this->d_range * (2 * this->_rnd.get_double() - 1.0);
+    return *this;
+  }
+  This  operator++(int) {
+    This tmp = *this;
+    ++(*this);
+    return tmp;
+  }
+};
+
+} //namespace CGAL
+#endif // CGAL_GENERATORS_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/generic_sweep.h b/3rdparty/CGAL-4.8/include/CGAL/generic_sweep.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/generic_sweep.h
rename to 3rdparty/CGAL-4.8/include/CGAL/generic_sweep.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/gl.h b/3rdparty/CGAL-4.8/include/CGAL/gl.h
new file mode 100644
index 0000000..f08c6d6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/gl.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
+//  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+
+#ifndef CGAL_GL_H
+#define CGAL_GL_H
+
+#ifdef _MSC_VER
+#  include <wtypes.h>
+#  include <wingdi.h>
+#endif
+
+#ifdef __APPLE__
+#  if TARGET_OS_IPHONE
+#    include <OpenGLES/ES2/gl.h>
+#  else
+#    include <OpenGL/gl.h>
+#  endif
+#else
+#  include <GL/gl.h>
+#endif
+
+#endif // CGAL_GL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/global_functions_circular_kernel_2.h b/3rdparty/CGAL-4.8/include/CGAL/global_functions_circular_kernel_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/global_functions_circular_kernel_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/global_functions_circular_kernel_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/global_functions_on_root_for_sphere_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/global_functions_on_root_for_sphere_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/global_functions_on_root_for_sphere_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/global_functions_on_root_for_sphere_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h b/3rdparty/CGAL-4.8/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/global_functions_spherical_kernel_3.h b/3rdparty/CGAL-4.8/include/CGAL/global_functions_spherical_kernel_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/global_functions_spherical_kernel_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/global_functions_spherical_kernel_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/glu.h b/3rdparty/CGAL-4.8/include/CGAL/glu.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/glu.h
rename to 3rdparty/CGAL-4.8/include/CGAL/glu.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/gmp.h b/3rdparty/CGAL-4.8/include/CGAL/gmp.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/gmp.h
rename to 3rdparty/CGAL-4.8/include/CGAL/gmp.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/gmpxx.h b/3rdparty/CGAL-4.8/include/CGAL/gmpxx.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/gmpxx.h
rename to 3rdparty/CGAL-4.8/include/CGAL/gmpxx.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/gmpxx_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/gmpxx_coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/gmpxx_coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/gmpxx_coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/grabbers.h b/3rdparty/CGAL-4.8/include/CGAL/grabbers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/grabbers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/grabbers.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Arrangement_2.h b/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Arrangement_2.h
new file mode 100644
index 0000000..2948c86
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Arrangement_2.h
@@ -0,0 +1,609 @@
+// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ron Wein <wein at post.tau.ac.il>
+//                 Efi Fogel <efif at post.tau.ac.il>
+
+#ifndef CGAL_BOOST_GRAPH_TRAITS_ARRANGEMENT_2_H
+#define CGAL_BOOST_GRAPH_TRAITS_ARRANGEMENT_2_H
+
+/*! \file
+ * Definition of the specialized boost::graph_traits<Arrangement_2> class.
+ */
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+#include <CGAL/Arrangement_on_surface_2.h>
+#include <CGAL/Arrangement_2.h>
+#include <CGAL/Arr_accessor.h>
+
+namespace boost {
+
+/*! \class
+ * Specialization of the BGL graph-traits template, which serves as a (primal)
+ * adapter for Arrangment_on_surface_2, where the valid arrangement vertices
+ * correspond to graph verices and arrangement halfedges correspond to
+ * arrangement edges.
+ * Note that non-fictitious vertices at infinity are also considered as graph
+ * vertices, as they have incident non-fictitious edges.
+ * As halfedges are directed, we consider the graph as directed. We also allow
+ * parallel edges, as two or more different arrangement edges (halfedge pairs)
+ * may connect two adjacent vertices.
+ */
+template <class GeomTraits, class TopTraits>
+class graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+{
+public:
+  
+  typedef GeomTraits                                 Geometry_traits_2;
+  typedef TopTraits                                  Topology_traits;
+  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
+                                                     Arrangement_on_surface_2;
+
+private:
+
+  typedef CGAL::Arr_accessor<Arrangement_on_surface_2>       Arr_accessor;
+  typedef typename Arrangement_on_surface_2::Vertex_handle   Vertex_handle;
+  typedef typename Arr_accessor::Valid_vertex_iterator       Vertex_iterator;
+  typedef typename Arrangement_on_surface_2::Halfedge_handle Halfedge_handle;
+  typedef typename Arrangement_on_surface_2::Halfedge_iterator
+                                                             Halfedge_iterator;
+  typedef typename Arrangement_on_surface_2::Halfedge_around_vertex_circulator
+                                             Halfedge_around_vertex_circulator;
+
+  /*! \struct
+   * Define the arrangement traversal category, which indicates the arrangement
+   * models the BidirectionalGraph concept as well as the VertexListGraph and
+   * EdgeListGraph concepts.
+   */
+  struct Arr_traversal_category : 
+    public virtual boost::bidirectional_graph_tag,   // This tag refines the
+                                                     // incidence_graph_tag.
+    public virtual boost::vertex_list_graph_tag,  // Can iterate over vertices.
+    public virtual boost::edge_list_graph_tag     // Can iterate over edges.
+  {};
+
+  /*! \class
+   * Iteratator over all outgoing halfedges around a given vertex., skipping
+   * fictitious halfedges.
+   * This is by adapting the Halfegde_around_vertex_circulator type to an
+   * iterator. Moreover, as the circulator goes over all ingoing halfedges
+   * of the vertex, the iterator adapter may return their twin halfedges, if
+   * we need the outgoing halfedges.  
+   */
+  class Halfedge_around_vertex_iterator
+  {
+  public:
+
+    // Type definitions:
+    typedef Halfedge_around_vertex_iterator       Self;
+
+    typedef std::forward_iterator_tag             iterator_category;
+    typedef Halfedge_handle                       value_type;
+    typedef value_type                            reference;
+    typedef value_type*                           pointer;
+    typedef int                                   difference_type;
+
+  protected:
+
+    Halfedge_around_vertex_circulator  _circ;     // The circulator.
+    bool                               _out;      // Do we need the out edges.
+    int                                _counter;  // Counter for the edges.
+    int                                _cend;     // The end counter.
+    Halfedge_handle                    _hh;       // The current halfedge.
+
+public:
+
+    /*! Default constructor. */
+    Halfedge_around_vertex_iterator () :
+      _counter(-1),
+      _cend(-1)
+    {}
+
+    /*!
+     * Constructor. 
+     * \param circ A ciruclator for the halfedges around a vertex.
+     * \param out_edges Do we need the outgoing or the ingoing halfedges.
+     * \param counter A counter associated with the iterator.
+     * \param cend The past-the-end counter value.
+     */
+    Halfedge_around_vertex_iterator (Halfedge_around_vertex_circulator circ,
+                                     bool out_edges,
+                                     int counter,
+                                     int cend) :
+      _circ (circ),
+      _out (out_edges),
+      _counter (counter),
+      _cend (cend)
+    {
+      if (_circ->is_fictitious() && _counter < _cend)
+        ++(*this);
+
+      if (out_edges)
+        _hh = _circ->twin();
+      else
+        _hh = _circ;
+    }
+
+    /*! Equality operators. */
+    bool operator== (const Self& it) const
+    {
+      return (_circ == it._circ && _out == it._out && _counter == it._counter);
+    }
+    
+    bool operator!= (const Self& it) const
+    {
+      return (_circ != it._circ || _out != it._out || _counter != it._counter);
+    }
+    
+    /*! Dereference operators. */
+    reference operator* () const
+    {
+      return _hh;
+    }
+
+    pointer operator-> () const
+    {
+      return &_hh;
+    }
+    
+    /* Increment operators. */
+    Self& operator++()
+    {
+      do
+      {
+        ++_circ;
+        ++_counter;
+        
+        if (_out)
+          _hh = _circ->twin();
+        else
+          _hh = _circ;
+
+      } while (_circ->is_fictitious() && _counter < _cend);
+
+      return (*this);
+    }
+
+    Self operator++ (int )
+    {
+      Self tmp = *this;
+      
+      do
+      {
+        ++_circ;
+        ++_counter;
+        
+        if (_out)
+          _hh = _circ->twin();
+        else
+          _hh = _circ;
+
+      } while (_circ->is_fictitious() && _counter < _cend);
+
+      return tmp;
+    }
+  };
+
+  // Data members:
+  Arrangement_on_surface_2    *p_arr;
+  Arr_accessor                 arr_access;
+
+public:
+
+  // Types required of the Graph concept:
+  typedef typename Arrangement_on_surface_2::Vertex_handle
+                                                        vertex_descriptor;
+  typedef boost::directed_tag                           directed_category;
+  typedef boost::allow_parallel_edge_tag                edge_parallel_category;
+
+  typedef Arr_traversal_category                        traversal_category;
+
+  // Types required by the IncidenceGraph concept:
+  typedef typename Arrangement_on_surface_2::Halfedge_handle
+                                                        edge_descriptor;
+  typedef Halfedge_around_vertex_iterator               out_edge_iterator;
+  typedef typename Arrangement_on_surface_2::Size       degree_size_type;
+
+  // Types required by the BidirectionalGraph concept:
+  typedef Halfedge_around_vertex_iterator               in_edge_iterator;
+
+  // Types required by the VertexListGraph concept:
+  typedef boost::counting_iterator<Vertex_iterator>     vertex_iterator;
+  typedef typename Arrangement_on_surface_2::Size       vertices_size_type;
+
+  // Types required by the EdgeListGraph concept:
+  typedef boost::counting_iterator<Halfedge_iterator>   edge_iterator;
+  typedef typename Arrangement_on_surface_2::Size       edges_size_type;
+
+  // Types not required by any of these concepts:
+  typedef void                                          adjacency_iterator;
+
+  /*! Constructor. */
+  graph_traits (const Arrangement_on_surface_2& arr) :
+    p_arr (const_cast<Arrangement_on_surface_2 *> (&arr)),
+    arr_access (const_cast<Arrangement_on_surface_2&> (arr))
+  {}
+
+  /*! Traverse the vertices. */
+  vertices_size_type number_of_vertices()
+  {
+    return arr_access.number_of_valid_vertices();
+  }
+
+  vertex_iterator vertices_begin()
+  {
+    return arr_access.valid_vertices_begin();
+  }
+
+  vertex_iterator vertices_end()
+  {
+    return arr_access.valid_vertices_end();
+  }
+
+  /*! Traverse the edges. */
+  edge_iterator edges_begin()
+  {
+    return p_arr->halfedges_begin();
+  }
+
+  edge_iterator edges_end()
+  {
+    return p_arr->halfedges_end();
+  }
+
+  /*! Get the vertex degree (in degree or out degree). */
+  degree_size_type degree (vertex_descriptor v)
+  {
+    if (v->is_isolated())
+      return 0;
+
+    Halfedge_around_vertex_circulator   first = v->incident_halfedges();
+    Halfedge_around_vertex_circulator   circ = first;
+    degree_size_type                    deg = 0;
+    
+    do
+    {
+      if (! circ->is_fictitious())
+        deg++;
+
+      ++circ;
+    } while (circ != first);
+
+    return deg;
+  }
+
+  /*! Traverse the outgoing halfedges of a given vertex. */
+  out_edge_iterator out_edges_begin (vertex_descriptor v)
+  {
+    if (v->is_isolated())
+      return out_edge_iterator();
+
+    return out_edge_iterator (v->incident_halfedges(), true, 0, static_cast<int>(v->degree()));
+  }
+
+  out_edge_iterator out_edges_end (vertex_descriptor v)
+  {
+    if (v->is_isolated())
+      return out_edge_iterator ();
+
+    const int  deg = static_cast<int>(v->degree());
+    return out_edge_iterator (v->incident_halfedges(), true, deg, deg);
+  }
+
+  /*! Traverse the ingoing halfedges of a given vertex. */
+  in_edge_iterator in_edges_begin (vertex_descriptor v)
+  {
+    if (v->is_isolated())
+      return in_edge_iterator();
+
+    return in_edge_iterator (v->incident_halfedges(), false, 0, v->degree());
+  }
+
+  in_edge_iterator in_edges_end (vertex_descriptor v)
+  {
+    if (v->is_isolated())
+      return in_edge_iterator ();
+
+    const int  deg = v->degree();
+    return in_edge_iterator (v->incident_halfedges(), false, deg, deg);
+  }
+};
+
+/*! \class
+ * Specialization of the BGL graph-traits template, which serves as a (primal)
+ * adapter for Arrangment_2, where the arrangement vertices correspond to graph
+ * verices and arrangement halfedges correspond to arrangement edges.
+ */
+template <class Traits_, class Dcel_>
+class graph_traits<CGAL::Arrangement_2<Traits_, Dcel_> > :
+    public graph_traits<CGAL::Arrangement_on_surface_2<
+      typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
+      typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> >
+{
+  typedef Traits_                                                     Traits_2;
+  typedef Dcel_                                                       Dcel;
+  typedef graph_traits<CGAL::Arrangement_on_surface_2<
+    typename CGAL::Arrangement_2<Traits_2, Dcel>::Geometry_traits_2,
+    typename CGAL::Arrangement_2<Traits_2, Dcel>::Topology_traits> >  Base;
+
+public:
+
+  /*! Constructor. */
+  graph_traits (const CGAL::Arrangement_2<Traits_2, Dcel>& arr) :
+    Base (arr)
+  {}
+};
+
+} // namespace boost
+
+namespace CGAL {
+
+// Functions required by the IncidenceGraph concept:
+// -------------------------------------------------
+
+/*!
+ * Get the out-degree of a vertex in a given arrangement.
+ * \param v The vertex.
+ * \param arr The arrangement.
+ * \param Number of outgoing halfedges from v.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                              degree_size_type
+out_degree (typename
+            boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                               TopTraits> >::
+                                                           vertex_descriptor v,
+            const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return gt_arr.degree (v);
+}
+
+/*!
+ * Return a range of the out-edges of a vertex given by its descriptor and the
+ * arrangement it belongs to.
+ * \param v The vertex.
+ * \param arr The arrangement.
+ * \return A pair of out-edges iterators.
+ */
+template <class GeomTraits, class TopTraits>
+std::pair<typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                         out_edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                         out_edge_iterator>
+out_edges (typename
+           boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                              TopTraits> >::
+                                                          vertex_descriptor v,
+           const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return std::make_pair (gt_arr.out_edges_begin (v), gt_arr.out_edges_end (v));
+}
+
+/*!
+ * Get the source vertex of an arrangement edge.
+ * \param e The edge.
+ * \param arr The arrangement.
+ * \return The source vertex of e.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                           vertex_descriptor
+source (typename
+        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                           TopTraits> >::
+                                                           edge_descriptor e,
+        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& /* arr */)
+{
+  return e->source();
+}
+
+/*!
+ * Get the target vertex of an arrangement edge.
+ * \param e The edge.
+ * \param arr The arrangement.
+ * \return The source vertex of e.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                           vertex_descriptor
+target (typename
+        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                           TopTraits> >::
+                                                           edge_descriptor e,
+        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& /* arr */)
+{
+  return e->target();
+}
+
+// Functions required by the BidirectionalGraph concept:
+// -----------------------------------------------------
+
+/*!
+ * Get the in-degree of a vertex in a given arrangement.
+ * \param v The vertex.
+ * \param arr The arrangement.
+ * \param Number of ingoing halfedges to v.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                           degree_size_type
+in_degree (typename
+           boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                              TopTraits> >::
+                                                           vertex_descriptor v,
+           const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return gt_arr.degree (v);
+}
+
+/*!
+ * Return a range of the in-edges of a vertex given by its descriptor and the
+ * arrangement it belongs to.
+ * \param v The vertex.
+ * \param arr The arrangement.
+ * \return A pair of in-edges iterators.
+ */
+template <class GeomTraits, class TopTraits>
+std::pair<typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             in_edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             in_edge_iterator>
+in_edges (typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                           vertex_descriptor v,
+          const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return std::make_pair (gt_arr.in_edges_begin (v), gt_arr.in_edges_end (v));
+}
+
+/*!
+ * Get the degree of a vertex in a given arrangement.
+ * \param v The vertex.
+ * \param arr The arrangement.
+ * \param Number of ingoing and outgoing halfedges incident to v.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                             degree_size_type
+degree (typename
+        boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                           TopTraits> >::
+                                                           vertex_descriptor v,
+        const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return (2 * gt_arr.degree (v));
+}
+
+// Functions required by the VertexListGraph concept:
+// --------------------------------------------------
+
+/*!
+ * Get the number of vertices in the given arrangement. 
+ * \param arr The arrangement.
+ * \return Number of vertices.
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                            vertices_size_type
+num_vertices (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return gt_arr.number_of_vertices(); 
+}
+
+/*!
+ * Get the range of vertices of the given arrangement.
+ * \param arr The arrangement.
+ * \return A pair of vertex iterators.
+ */
+template <class GeomTraits, class TopTraits>
+std::pair<typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             vertex_iterator,
+          typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             vertex_iterator>
+vertices (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return std::make_pair (gt_arr.vertices_begin(), gt_arr.vertices_end());
+}
+
+// Functions required by the EdgeListGraph concept:
+// ------------------------------------------------
+
+/*!
+ * Get the number of halfedges in the given arrangement. 
+ * \param arr The arrangement.
+ * \return Number of halfedges (graph edges).
+ */
+template <class GeomTraits, class TopTraits>
+typename
+boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >::
+                                                               edges_size_type
+num_edges (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  return arr.number_of_halfedges(); 
+}
+
+/*!
+ * Get the range of halfedges of the given arrangement.
+ * \param arr The arrangement.
+ * \return A pair of halfedge iterators.
+ */
+template <class GeomTraits, class TopTraits>
+std::pair<typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
+                                                             TopTraits> >::
+                                                             edge_iterator>
+edges (const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
+{
+  boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits> >
+    gt_arr (arr);
+
+  return std::make_pair (gt_arr.edges_begin(), gt_arr.edges_end());
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Dual_Arrangement_2.h b/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Dual_Arrangement_2.h
new file mode 100644
index 0000000..ba2ccba
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/graph_traits_Dual_Arrangement_2.h
@@ -0,0 +1,748 @@
+// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Ron Wein     <wein at post.tau.ac.il>
+//                 Ophir Setter <ophirset at post.tau.ac.il>
+
+#ifndef CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
+#define CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
+
+/*! \file
+ * Definition of the specialized Dual<Arrangement_2> class,
+ * and the specialized boost::graph_traits<Dual<Arrangement_2> >class.
+ */
+
+// include this to avoid a VC15 warning
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <CGAL/Arrangement_on_surface_2.h>
+#include <CGAL/Arrangement_2.h>
+
+namespace CGAL {
+
+// Forward declaration.
+template <class Type> class Dual;
+
+/*! \class
+ * Specilaization of the Dual<> template for Arrangement_on_surface_2.
+ */
+template <class GeomTraits_, class TopTraits_>
+class Dual<Arrangement_on_surface_2<GeomTraits_,TopTraits_> >
+{
+public:
+  
+  typedef GeomTraits_                          Geometry_traits_2;
+  typedef TopTraits_                           Topology_traits;
+  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
+                                               Arrangement_on_surface_2;
+
+  typedef typename Arrangement_on_surface_2::Size              Size;
+  typedef typename Arrangement_on_surface_2::Face_handle       Vertex_handle;
+  typedef typename Arrangement_on_surface_2::Halfedge_handle   Edge_handle;
+
+  typedef typename Arrangement_on_surface_2::Face_iterator     Vertex_iterator;
+  typedef typename Arrangement_on_surface_2::Halfedge_iterator Edge_iterator;
+
+protected:
+
+  typedef typename Arrangement_on_surface_2::Face_handle       Face_handle;
+  typedef typename Arrangement_on_surface_2::Ccb_halfedge_circulator
+                                                      Ccb_halfedge_circulator;
+  typedef typename Arrangement_on_surface_2::Outer_ccb_iterator
+                                                      Outer_ccb_iterator;
+  typedef typename Arrangement_on_surface_2::Inner_ccb_iterator
+                                                      Inner_ccb_iterator;
+
+  /*! \class
+   * Iterator over the neighbors of a dual vertex (a face in the primal
+   * arrangement).
+   * These neighbors are the adjacent faces along the outer boundaries of the
+   * face and its inner boundaries.
+   */
+  class Face_neighbor_iterator
+  {
+    typedef Face_neighbor_iterator               Self;
+
+  public:
+
+    typedef std::forward_iterator_tag            iterator_category;
+    typedef Edge_handle                          value_type;
+    typedef value_type                           reference;
+    typedef value_type*                          pointer;
+    typedef int                                  difference_type;
+
+  private:
+
+    Outer_ccb_iterator       _outer_ccb_iter;
+    Inner_ccb_iterator       _inner_ccb_iter;
+    Ccb_halfedge_circulator  _ccb_curr;
+    Ccb_halfedge_circulator  _ccb_first;
+    Face_handle              _face;
+    bool                     _out;
+    Edge_handle              _hh;
+    bool                     _end;
+
+  public:
+
+    /*! Default constructor. */
+    Face_neighbor_iterator () :
+      _end (true)
+    {}
+
+    /*!
+     * Constructor.
+     * \param face The face (dual vertex).
+     * \param out_edges Do we need the outgoing or the ingoing halfedges.
+     * \param start Should we start traversing the edges.
+     *              If false, we construct a past-the-end iterator.
+     */
+    Face_neighbor_iterator (Face_handle face, 
+                            bool out_edges,
+                            bool start) :
+      _face (face),
+      _out (out_edges),
+      _end (! start)
+    {
+      CGAL_precondition (! face->is_fictitious());
+
+      if (start)
+      {
+        _outer_ccb_iter = _face->outer_ccbs_begin();
+        _inner_ccb_iter = _face->inner_ccbs_begin();
+
+        if (_outer_ccb_iter != _face->outer_ccbs_end())
+        {
+          // Start from the first outer CCB, if one exists.
+          _ccb_curr = _ccb_first = *_outer_ccb_iter;
+        }
+        else if (_inner_ccb_iter != face->inner_ccbs_end())
+        {
+          // Otherwise, start from the first inner CCB.
+          _ccb_curr = _ccb_first = *_inner_ccb_iter;
+        }
+        else
+        {
+          // In this case there are no CCBs to traverse:
+          _end = true;
+          return;
+        }
+
+        _hh = this->_dereference();
+
+        // In case the incident face of the twin halfedge is fictitious,
+        // skip it and proceed to the next edge.
+        if (_hh->is_fictitious())
+          ++(*this);
+      }
+      else // end iterator.
+      {
+        _outer_ccb_iter = _face->outer_ccbs_end();
+        _inner_ccb_iter = _face->inner_ccbs_end();
+      }
+    }  
+
+    /*! Equality operators. */
+    bool operator== (const Self& it) const
+    {
+      return (this->_equal(it));
+    }
+    
+    bool operator!= (const Self& it) const
+    {
+      return (! this->_equal(it));
+    }
+    
+    /*! Dereference operators. */
+    reference operator* () const
+    {
+      return (_hh);
+    }
+
+    pointer operator-> () const
+    {
+      return (&_hh);
+    }
+    
+    /* Increment operators. */
+    Self& operator++ ()
+    {
+      do
+      {
+        this->_increment();
+        if (_end)
+          return (*this);
+
+        _hh = this->_dereference();
+
+      } while (_hh->is_fictitious());
+
+      return (*this);
+    }
+
+    Self operator++ (int )
+    {
+      Self tmp = *this;
+
+      do
+      {
+        this->_increment();
+        if (_end)
+          return (tmp);
+
+        _hh = this->_dereference();
+
+      } while (_hh->is_fictitious());
+
+      return (tmp);
+    }
+
+  private:
+
+    /*! Check two iterators for equality. */
+    bool _equal (const Self& it) const
+    {
+      return (_out == it._out && _face == it._face &&
+              ((_end && it._end) ||
+               (_outer_ccb_iter == it._outer_ccb_iter &&
+                _inner_ccb_iter == it._inner_ccb_iter &&
+                _ccb_curr == it._ccb_curr)));
+    }
+
+    /*! Derefernce the current circulator. */
+    Edge_handle _dereference () const
+    {
+      if (_out)
+        return (_ccb_curr);
+      else
+        return (_ccb_curr->twin());
+    }
+
+    // Increments of the iterator.
+    void _increment ()
+    {
+      CGAL_assertion (! _end);
+
+      // If we have not traversed the entire CCB in full, move to the next
+      // halfedge along the current CCB.
+      ++_ccb_curr;
+
+      if (_ccb_curr != _ccb_first)
+        return;
+
+      // In this case we have completed the current CCB and we have to move
+      // to the next one.
+      if (_outer_ccb_iter != _face->outer_ccbs_end())
+      {
+        // Try to move to the next outer CCB.
+        ++_outer_ccb_iter;
+        if (_outer_ccb_iter != _face->outer_ccbs_end())
+        {
+          _ccb_curr = _ccb_first = *_outer_ccb_iter;
+          return;
+        }
+
+        // In this case we start traversing the inner CCBs.
+        if (_inner_ccb_iter != _face->inner_ccbs_end())
+        {
+          CGAL_assertion (_inner_ccb_iter == _face->inner_ccbs_begin());
+
+          // Otherwise, start from the first inner CCB.
+          _ccb_curr = _ccb_first = *_inner_ccb_iter;
+          return;
+        }
+      }
+      else if (_inner_ccb_iter != _face->inner_ccbs_end())
+      {
+
+        // In this case we have already traversed all outer CCBs (and at least
+        // one inner CCB), so we try to move to the next inner CCB.
+        ++_inner_ccb_iter;
+        if (_inner_ccb_iter != _face->inner_ccbs_end())
+        {
+          // Otherwise, start from the first inner CCB.
+          _ccb_curr = _ccb_first = *_inner_ccb_iter;
+          return;
+        }
+      }
+
+      // In this case we finished traversing all outer and inner CCBs:
+      _end = true;
+      return;
+    }
+
+  };
+
+  // Data members:
+  mutable Arrangement_on_surface_2    *p_arr;    // The primal arrangement.
+  
+public:
+
+  typedef Face_neighbor_iterator            Incident_edge_iterator;
+
+  /*! Default constructor. */
+  Dual () :
+    p_arr (NULL)
+  {}
+
+  /*! Constructor from an arrangement. */
+  Dual (const Arrangement_on_surface_2& arr) :
+    p_arr (const_cast<Arrangement_on_surface_2 *> (&arr))
+  {}
+
+  /*! Get the primal arrangement (const version). */
+  const Arrangement_on_surface_2* arrangement () const
+  {
+    return (p_arr);
+  }
+
+  /*! Get the primal arrangement (non-const version). */
+  Arrangement_on_surface_2* arrangement ()
+  {
+    return (p_arr);
+  }
+
+  /*! Get the number of vertices (face of the primal arrangement). */
+  Size number_of_vertices () const
+  {
+    return (p_arr->number_of_faces());
+  }
+
+  /*! Traverse the vertices (faces of the primal arrangement). */
+  Vertex_iterator vertices_begin () const
+  {
+    return (p_arr->faces_begin());
+  }
+
+  Vertex_iterator vertices_end () const
+  {
+    return (p_arr->faces_end());
+  }
+
+  /*! Get the number of edges. */
+  Size number_of_edges () const
+  {
+    return (p_arr->number_of_halfedges());
+  }
+
+  /*! Traverse the edges. */
+  Edge_iterator edges_begin () const
+  {
+    return (p_arr->halfedges_begin());
+  }
+
+  Edge_iterator edges_end () const
+  {
+    return (p_arr->halfedges_end());
+  }
+
+  /*!
+   * Get the dual vertex-degree (number of edges forming the face boundary).
+   */
+  Size degree (Vertex_handle v) const
+  {
+    Incident_edge_iterator   begin = Incident_edge_iterator (v, true, true);
+    Incident_edge_iterator   end = Incident_edge_iterator (v, false, true);
+    Size                     deg = 0;
+
+    while (begin != end)
+    {
+      deg++;
+      ++begin;
+    }
+
+    return (deg);
+  }
+
+  /*! Traverse the outgoing edges of a given vertex. */
+  Incident_edge_iterator out_edges_begin (Vertex_handle v) const
+  {
+    return (Incident_edge_iterator (v, true, true));
+  }
+
+  Incident_edge_iterator out_edges_end (Vertex_handle v) const
+  {
+    return (Incident_edge_iterator (v, true, false));
+  }
+
+  /*! Traverse the ingoing edges of a given vertex. */
+  Incident_edge_iterator in_edges_begin (Vertex_handle v) const
+  {
+    return (Incident_edge_iterator (v, false, true));
+  }
+
+  Incident_edge_iterator in_edges_end (Vertex_handle v) const
+  {
+    return (Incident_edge_iterator (v, false, false));
+  }
+};
+
+/*! \class
+ * Specilaization of the Dual<> template for Arrangement_2.
+ */
+template <class Traits_, class Dcel_>
+class Dual<Arrangement_2<Traits_, Dcel_> > :
+  public Dual<Arrangement_on_surface_2<
+    typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
+    typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> >
+{
+  typedef Traits_                                                     Traits_2;
+  typedef Dcel_                                                       Dcel;
+  typedef Dual<CGAL::Arrangement_on_surface_2<
+    typename CGAL::Arrangement_2<Traits_2, Dcel>::Geometry_traits_2,
+    typename CGAL::Arrangement_2<Traits_2, Dcel>::Topology_traits> >  Base;
+
+public:
+
+  /*! Default constructor. */
+  Dual () :
+    Base()
+  {}
+
+  /*! Constructor from an arrangement. */
+  Dual (const CGAL::Arrangement_2<Traits_2, Dcel>& arr) :
+    Base (arr)
+  {}
+};
+
+} //namespace CGAL
+
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+
+namespace boost {
+
+/*! \class
+ * Specialization of the BGL graph-traits template, which serve as a dual
+ * adapter for Arrangment_on_surface_2, where the valid arrangement faces
+ * correspond to graph verices, and two graph vertices are connected if the
+ * two corrsponding faces are adjacent.
+ * We consider the graph as directed. We also allow parallel edges, as two
+ * faces may have more than one common edges.
+ */
+template <class GeomTraits_, class TopTraits_>
+class graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2<GeomTraits_,
+                                                             TopTraits_> > >
+{
+public:
+  
+  typedef GeomTraits_                           Geometry_traits_2;
+  typedef TopTraits_                            Topology_traits;
+  typedef CGAL::Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>
+                                                Arrangement_on_surface_2;
+  typedef CGAL::Dual<Arrangement_on_surface_2>  Dual_arr_2;
+
+private:
+
+  typedef typename Dual_arr_2::Vertex_iterator         Vertex_iterator;
+  typedef typename Dual_arr_2::Edge_iterator           Edge_iterator;
+  typedef typename Dual_arr_2::Incident_edge_iterator  Incident_edge_iterator;
+ 
+  /*! \struct
+   * Define the arrangement traversal category, which indicates the arrangement
+   * models the BidirectionalGraph concept and the VertexListGraph and
+   * EdgeListGraph concepts.
+   */
+  struct Dual_arr_traversal_category : 
+    public virtual boost::bidirectional_graph_tag,   // This tag refines the
+                                                     // incidence_graph_tag.
+    public virtual boost::vertex_list_graph_tag,  // Can iterate over vertices.
+    public virtual boost::edge_list_graph_tag     // Can iterate over edges.
+  {};
+  
+public:
+
+  // Types required of the Graph concept:
+  typedef typename Dual_arr_2::Vertex_handle            vertex_descriptor;
+  typedef boost::directed_tag                           directed_category;
+  typedef boost::allow_parallel_edge_tag                edge_parallel_category;
+
+  typedef Dual_arr_traversal_category                   traversal_category;
+
+  // Types required by the IncidenceGraph concept:
+  typedef typename Dual_arr_2::Edge_handle              edge_descriptor;
+  typedef Incident_edge_iterator                        out_edge_iterator;
+  typedef typename Dual_arr_2::Size                     degree_size_type;
+
+  // Types required by the BidirectionalGraph concept:
+  typedef Incident_edge_iterator                        in_edge_iterator;
+
+  // Types required by the VertexListGraph concept:
+  typedef boost::counting_iterator<Vertex_iterator>     vertex_iterator;
+  typedef typename Dual_arr_2::Size                     vertices_size_type;
+
+  // Types required by the EdgeListGraph concept:
+  typedef boost::counting_iterator<Edge_iterator>       edge_iterator;
+  typedef typename Dual_arr_2::Size                     edges_size_type;
+
+  // Types not required by any of these concepts:
+  typedef void                                          adjacency_iterator;
+
+};
+
+/*! \class
+ * Specialization of the BGL graph-traits template, which serve as a dual
+ * adapter for Arrangment_2.
+ */
+template <class Traits_, class Dcel_>
+class graph_traits<CGAL::Dual<CGAL::Arrangement_2<Traits_, Dcel_> > > :
+    public graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2<
+      typename CGAL::Arrangement_2<Traits_, Dcel_>::Geometry_traits_2,
+      typename CGAL::Arrangement_2<Traits_, Dcel_>::Topology_traits> > >
+{};
+
+} // namespace boost
+
+namespace CGAL {
+
+// Functions required by the IncidenceGraph concept:
+// -------------------------------------------------
+
+/*!
+ * Get the out-degree of a vertex in a given dual arrangement.
+ * \param v The vertex.
+ * \param darr The dual arrangement.
+ * \param Number of halfedges around the boundary of the primal face.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename 
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
+out_degree(typename 
+           boost::graph_traits<CGAL::Dual<CGAL::
+           Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           vertex_descriptor v,
+           const CGAL::Dual<CGAL::
+             Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return darr.degree (v);
+}
+
+/*!
+ * Return a range of the out-edges of a vertex given by its descriptor and the
+ * dual arrangement it belongs to.
+ * \param v The vertex.
+ * \param darr The dual arrangement.
+ * \return A pair of out-edges iterators.
+ */
+template <class GeomTraits_, class TopTraits_>
+std::pair<typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                             out_edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                             out_edge_iterator>
+out_edges(typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+          Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           vertex_descriptor v,
+          const CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return std::make_pair (darr.out_edges_begin (v), darr.out_edges_end (v));
+}
+
+/*!
+ * Get the source vertex of a dual arrangement edge.
+ * \param e The edge.
+ * \param darr The dual arrangement.
+ * \return The incident face of e in the primal arrangement.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertex_descriptor
+source(typename
+       boost::graph_traits<CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           edge_descriptor e,
+       const CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& /* darr */)
+{
+  return e->face();
+}
+
+/*!
+ * Get the target vertex of a dual arrangement edge.
+ * \param e The edge.
+ * \param darr The dual arrangement.
+ * \return The incident face of e's twin in the primal arrangement.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertex_descriptor
+target(typename
+       boost::graph_traits<CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           edge_descriptor e,
+       const CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& /* darr */)
+{
+  return e->twin()->face();
+}
+
+// Functions required by the BidirectionalGraph concept:
+// -----------------------------------------------------
+
+/*!
+ * Get the in-degree of a vertex in a given dual arrangement.
+ * \param v The vertex.
+ * \param darr The dual arrangement.
+ * \param Number of halfedges around the boundary of the primal face.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
+in_degree(typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           vertex_descriptor v,
+          const CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return darr.degree (v);
+}
+
+/*!
+ * Return a range of the in-edges of a vertex given by its descriptor and the
+ * dual arrangement it belongs to.
+ * \param v The vertex.
+ * \param darr The dual arrangement.
+ * \return A pair of in-edges iterators.
+ */
+template <class GeomTraits_, class TopTraits_>
+std::pair<typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                             in_edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                             in_edge_iterator>
+in_edges(typename
+         boost::graph_traits<CGAL::Dual<CGAL::
+           Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           vertex_descriptor v,
+         const CGAL::Dual<CGAL::
+           Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return std::make_pair (darr.in_edges_begin (v), darr.in_edges_end (v));
+}
+
+/*!
+ * Get the degree of a vertex in a given dual arrangement.
+ * \param v The vertex.
+ * \param darr The dual arrangement.
+ * \param Number of ingoing and outgoing halfedges incident to v.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::degree_size_type
+degree(typename
+       boost::graph_traits<CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                           vertex_descriptor v,
+       const CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return (2 * darr.degree (v));
+}
+
+// Functions required by the VertexListGraph concept:
+// --------------------------------------------------
+
+/*!
+ * Get the number of vertices in the given dual arrangement. 
+ * \param darr The dual arrangement.
+ * \return Number of faces in the primal arrangement.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::vertices_size_type
+num_vertices(const CGAL::Dual<CGAL::
+               Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return darr.number_of_vertices();
+}
+
+/*!
+ * Get the range of vertices of the given dual arrangement.
+ * \param darr The dual arrangement.
+ * \return A pair of vertex iterators.
+ */
+template <class GeomTraits_, class TopTraits_>
+std::pair<typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                               vertex_iterator,
+          typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                               vertex_iterator>
+vertices (const CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return std::make_pair (darr.vertices_begin(), darr.vertices_end());
+}
+
+// Functions required by the EdgeListGraph concept:
+// ------------------------------------------------
+
+/*!
+ * Get the number of edges in the given dual arrangement. 
+ * \param darr The dual arrangement.
+ * \return Number of halfedges in the primal arrangement.
+ */
+template <class GeomTraits_, class TopTraits_>
+typename
+boost::graph_traits<CGAL::Dual<CGAL::
+  Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::edges_size_type
+num_edges(const CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return darr.number_of_edges(); 
+}
+
+/*!
+ * Get the range of edges of the given dual arrangement.
+ * \param darr The dual arrangement.
+ * \return A pair of edge iterators.
+ */
+template <class GeomTraits_, class TopTraits_>
+std::pair<typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                               edge_iterator,
+          typename
+          boost::graph_traits<CGAL::Dual<CGAL::
+            Arrangement_on_surface_2<GeomTraits_, TopTraits_> > >::
+                                                               edge_iterator>
+edges (const CGAL::Dual<CGAL::
+         Arrangement_on_surface_2<GeomTraits_, TopTraits_> >& darr)
+{
+  return std::make_pair (darr.edges_begin(), darr.edges_end());
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/grid_simplify_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/grid_simplify_point_set.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/grid_simplify_point_set.h
rename to 3rdparty/CGAL-4.8/include/CGAL/grid_simplify_point_set.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/halfedgeDS_cut_component.h b/3rdparty/CGAL-4.8/include/CGAL/halfedgeDS_cut_component.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/halfedgeDS_cut_component.h
rename to 3rdparty/CGAL-4.8/include/CGAL/halfedgeDS_cut_component.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/halfedgeds_connected_components.h b/3rdparty/CGAL-4.8/include/CGAL/halfedgeds_connected_components.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/halfedgeds_connected_components.h
rename to 3rdparty/CGAL-4.8/include/CGAL/halfedgeds_connected_components.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/hierarchy_simplify_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/hierarchy_simplify_point_set.h
new file mode 100644
index 0000000..a2090f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/hierarchy_simplify_point_set.h
@@ -0,0 +1,385 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL:
+// $Id: 
+//
+// Author(s) : Simon Giraudot, Pierre Alliez
+
+
+#ifndef HIERARCHY_SIMPLIFY_POINT_SET_H
+#define HIERARCHY_SIMPLIFY_POINT_SET_H
+
+#include <cmath>
+#include <stack>
+
+#include <CGAL/property_map.h>
+#include <CGAL/basic.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Object.h>
+#include <CGAL/centroid.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Default_diagonalize_traits.h>
+#include <CGAL/PCA_util.h>
+
+namespace CGAL {
+
+
+  namespace internal {
+
+    template < typename InputIterator,
+	       typename PointPMap,
+	       typename K >
+    typename K::Point_3
+    hsps_centroid(InputIterator begin, 
+		 InputIterator end,
+		 PointPMap& point_pmap,	     
+		 const K&)
+    {
+      typedef typename K::Point_3 Point;
+      typedef typename K::FT FT;
+
+      CGAL_precondition(begin != end);
+
+      FT x = (FT)0., y = (FT)0., z = (FT)0.;
+      unsigned int nb_pts = 0;
+      while(begin != end) 
+	{
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	  const Point& point = get(point_pmap, begin);
+#else
+	  const Point& point = get(point_pmap, *begin);
+#endif
+	  x += point.x ();  y += point.y ();  z += point.z ();
+	  ++ nb_pts;
+	  ++ begin;
+	}
+      return Point (x/nb_pts, y/nb_pts, z/nb_pts);
+    }
+
+    template < typename Input_type,
+	       typename PointPMap,
+	       typename K >
+    void
+    hsc_terminate_cluster (std::list<Input_type>& cluster,
+			   std::list<Input_type>& points_to_keep,
+			   std::list<Input_type>& points_to_remove,
+			   PointPMap& point_pmap,
+			   const typename K::Point_3& centroid,
+			   const K&)
+    {
+      typedef typename std::list<Input_type>::iterator Iterator;
+      typedef typename K::FT FT;
+      typedef typename K::Point_3 Point;
+
+      FT dist_min = (std::numeric_limits<FT>::max)();
+
+      typename std::list<Input_type>::iterator point_min;
+      for (Iterator it = cluster.begin (); it != cluster.end (); ++ it)
+	{
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	  const Point& point = get(point_pmap, it);
+#else
+	  const Point& point = get(point_pmap, *it);
+#endif
+	  FT dist = CGAL::squared_distance (point, centroid);
+	  if (dist < dist_min)
+	    {
+	      dist_min = dist;
+	      point_min = it;
+	    }
+	}
+
+      points_to_keep.splice (points_to_keep.end (), cluster, point_min);
+      points_to_remove.splice (points_to_remove.end (), cluster, cluster.begin (), cluster.end ());
+    }			       
+			    
+
+
+
+  } // namespace internal
+    
+
+  /// \ingroup PkgPointSetProcessing
+  
+  /// Recursively split the point set in smaller clusters until the
+  /// clusters have less than `size` elements or until their variation
+  /// factor is below `var_max`. 
+  ///
+  /// This method modifies the order of input points so as to pack all remaining points first,
+  /// and returns an iterator over the first point to remove (see erase-remove idiom).
+  /// For this reason it should not be called on sorted containers.
+  ///
+  /// \pre `0 < var_max < 1/3`
+  /// \pre `size > 0`
+  ///
+  /// @tparam ForwardIterator iterator over input points.
+  /// @tparam PointPMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
+  ///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+  /// @tparam DiagonalizeTraits is a model of `DiagonalizeTraits`. It
+  ///        can be omitted: if Eigen 3 (or greater) is available and
+  ///        `CGAL_EIGEN3_ENABLED` is defined then an overload using
+  ///        `Eigen_diagonalize_traits` is provided. Otherwise, the internal
+  ///        implementation `Internal_diagonalize_traits` is used.
+  /// @tparam Kernel Geometric traits class.
+  ///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+  ///
+  /// @return iterator over the first point to remove.
+
+
+  // This variant requires all parameters.
+
+  template <typename ForwardIterator,
+	    typename PointPMap,
+	    typename DiagonalizeTraits,
+	    typename Kernel>
+  ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
+						ForwardIterator end,
+						PointPMap point_pmap,
+						const unsigned int size,
+						const double var_max,
+						const DiagonalizeTraits&,
+						const Kernel&)
+  {
+    typedef typename std::iterator_traits<ForwardIterator>::value_type Input_type;
+    typedef typename Kernel::FT FT;
+    typedef typename Kernel::Point_3  Point;
+    typedef typename Kernel::Vector_3 Vector;
+
+    // We define a cluster as a point set + its centroid (useful for
+    // faster computations of centroids - to be implemented)
+    typedef std::pair< std::list<Input_type>, Point > cluster;
+
+    std::list<cluster> clusters_stack;
+    typedef typename std::list<cluster>::iterator cluster_iterator;
+
+    CGAL_precondition (begin != end);
+    CGAL_point_set_processing_precondition (size > 0);
+    CGAL_point_set_processing_precondition (var_max > 0.0);
+
+    // The first cluster is the whole input point set
+    clusters_stack.push_front (cluster (std::list<Input_type>(), Point (0., 0., 0.)));
+    std::copy (begin, end, std::back_inserter (clusters_stack.front ().first));
+    
+    clusters_stack.front ().second = internal::hsps_centroid (clusters_stack.front ().first.begin (),
+							     clusters_stack.front ().first.end (),
+							     point_pmap, Kernel());
+
+    std::list<Input_type> points_to_keep;
+    std::list<Input_type> points_to_remove;
+    
+    while (!(clusters_stack.empty ()))
+      {
+	cluster_iterator current_cluster = clusters_stack.begin ();
+
+	// If the cluster only has 1 element, we add it to the list of
+	// output points
+	if (current_cluster->first.size () == 1)
+	  {
+	    points_to_keep.splice (points_to_keep.end (), current_cluster->first,
+				   current_cluster->first.begin ());
+	    clusters_stack.pop_front ();
+	    continue;
+	  }
+
+	// Compute the covariance matrix of the set
+	cpp11::array<FT, 6> covariance = {{ 0., 0., 0., 0., 0., 0. }};
+
+	for (typename std::list<Input_type>::iterator it = current_cluster->first.begin ();
+	     it != current_cluster->first.end (); ++ it)
+	  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	    const Point& point = get(point_pmap, it);
+#else
+	    const Point& point = get(point_pmap, *it);
+#endif
+	    Vector d = point - current_cluster->second;
+	    covariance[0] += d.x () * d.x ();
+	    covariance[1] += d.x () * d.y ();
+	    covariance[2] += d.x () * d.z ();
+	    covariance[3] += d.y () * d.y ();
+	    covariance[4] += d.y () * d.z ();
+	    covariance[5] += d.z () * d.z ();
+	  }
+
+	cpp11::array<FT, 3> eigenvalues = {{ 0., 0., 0. }};
+	cpp11::array<FT, 9> eigenvectors = {{ 0., 0., 0.,
+					      0., 0., 0.,
+					      0., 0., 0. }};
+	// Linear algebra = get eigenvalues and eigenvectors for
+	// PCA-like analysis
+	DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+	  (covariance, eigenvalues, eigenvectors);
+	
+	// Variation of the set defined as lambda_min / (lambda_0 + lambda_1 + lambda_2)
+	double var = eigenvalues[0] / (eigenvalues[0] + eigenvalues[1] + eigenvalues[2]);
+
+	// Split the set if size OR variance of the cluster is too large
+	if (current_cluster->first.size () > size || var > var_max)
+	  {
+	    clusters_stack.push_front (cluster (std::list<Input_type>(), Point (0., 0., 0.)));
+	    cluster_iterator negative_side = clusters_stack.begin ();
+	    // positive_side is built directly from current_cluster
+	    
+	    // The plane which splits the point set into 2 point sets:
+	    //  * Normal to the eigenvector with highest eigenvalue
+	    //  * Passes through the centroid of the set
+	    Vector v (eigenvectors[6], eigenvectors[7], eigenvectors[8]);
+
+	    std::size_t current_cluster_size = 0;
+	    typename std::list<Input_type>::iterator it = current_cluster->first.begin ();
+	    while (it != current_cluster->first.end ())
+	      {
+		typename std::list<Input_type>::iterator current = it ++;
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+                const Point& point = get(point_pmap, current);
+#else
+                const Point& point = get(point_pmap, *current);
+#endif
+
+		// Test if point is on negative side of plane and
+		// transfer it to the negative_side cluster if it is
+		if (Vector (current_cluster->second, point) * v < 0)
+		  negative_side->first.splice (negative_side->first.end (),
+					       current_cluster->first, current);
+		++ current_cluster_size;
+	      }
+
+	    // If one of the clusters is empty, stop to avoid infinite
+	    // loop and keep the non-empty one
+	    if (current_cluster->first.empty () || negative_side->first.empty ())
+	      {
+		cluster_iterator nonempty = (current_cluster->first.empty ()
+					     ? negative_side : current_cluster);
+
+		// Compute the centroid
+		nonempty->second = internal::hsps_centroid (nonempty->first.begin (),
+							    nonempty->first.end (),
+							    point_pmap, Kernel());
+		
+		internal::hsc_terminate_cluster (nonempty->first,
+						 points_to_keep,
+						 points_to_remove,
+						 point_pmap,
+						 nonempty->second,
+						 Kernel ());
+		clusters_stack.pop_front ();
+		clusters_stack.pop_front ();
+	      }
+	    else
+	      {
+		// Save old centroid for faster computation
+		Point old_centroid = current_cluster->second;
+		
+		// Compute the first centroid
+		current_cluster->second = internal::hsps_centroid (current_cluster->first.begin (),
+								   current_cluster->first.end (),
+								   point_pmap, Kernel());
+
+		// The second centroid can be computed with the first and
+		// the old ones :
+		// centroid_neg = (n_total * old_centroid - n_pos * first_centroid)
+		//                 / n_neg;
+		negative_side->second = Point ((current_cluster_size * old_centroid.x ()
+						- current_cluster->first.size () * current_cluster->second.x ())
+					       / negative_side->first.size (),
+					       (current_cluster_size * old_centroid.y ()
+						- current_cluster->first.size () * current_cluster->second.y ())
+					       / negative_side->first.size (),
+					       (current_cluster_size * old_centroid.z ()
+						- current_cluster->first.size () * current_cluster->second.z ())
+					       / negative_side->first.size ());
+	      }
+	  }
+	// If the size/variance are small enough, add the centroid as
+	// and output point
+	else
+	  {
+	    internal::hsc_terminate_cluster (current_cluster->first,
+					     points_to_keep,
+					     points_to_remove,
+					     point_pmap,
+					     current_cluster->second,
+					     Kernel ());
+	    clusters_stack.pop_front ();
+	  }
+      }
+    ForwardIterator first_point_to_remove =
+      std::copy (points_to_keep.begin(), points_to_keep.end(), begin);
+    std::copy (points_to_remove.begin(), points_to_remove.end(), first_point_to_remove);
+
+    return first_point_to_remove;
+
+  }
+  /// @endcond
+
+
+  /// @cond SKIP_IN_MANUAL
+  // This variant deduces the kernel from the iterator type.
+  template <typename ForwardIterator,
+	    typename PointPMap,
+	    typename DiagonalizeTraits>
+  ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
+						ForwardIterator end,
+						PointPMap point_pmap,
+						const unsigned int size,
+						const double var_max,
+						const DiagonalizeTraits& diagonalize_traits)
+  {
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename Kernel_traits<Point>::Kernel Kernel;
+    return hierarchy_simplify_point_set (begin, end, point_pmap, size, var_max,
+					 diagonalize_traits, Kernel());
+  }
+  /// @endcond
+
+  /// @cond SKIP_IN_MANUAL  
+  // This variant uses default diagonalize traits
+  template <typename ForwardIterator,
+	    typename PointPMap >
+  ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
+						ForwardIterator end,
+						PointPMap point_pmap,
+						const unsigned int size,
+						const double var_max)
+  {
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename Kernel_traits<Point>::Kernel Kernel;
+    return hierarchy_simplify_point_set (begin, end, point_pmap, size, var_max,
+					 Default_diagonalize_traits<double, 3> (), Kernel());
+  }
+  /// @endcond  
+
+  /// @cond SKIP_IN_MANUAL
+  // This variant creates a default point property map = Identity_property_map.
+  template <typename ForwardIterator >
+  ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
+						ForwardIterator end,
+						const unsigned int size = 10,
+						const double var_max = 0.333)
+  {
+    return hierarchy_simplify_point_set
+      (begin, end,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+       make_dereference_property_map(first),
+#else
+       make_identity_property_map (typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+       size, var_max);
+  }
+  /// @endcond  
+
+} // namespace CGAL
+
+#endif // HIERARCHY_SIMPLIFY_POINT_SET_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort.h b/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort.h
new file mode 100644
index 0000000..bc9bffa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2007-2011  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Christophe Delage
+//
+
+#ifndef CGAL_HILBERT_SORT_H
+#define CGAL_HILBERT_SORT_H
+
+#include <CGAL/basic.h>
+
+#include <CGAL/Hilbert_policy_tags.h>
+#include <CGAL/Hilbert_sort_2.h>
+#include <CGAL/Hilbert_sort_3.h>
+#include <CGAL/Hilbert_sort_d.h>
+#include <CGAL/algorithm.h>
+
+#include <boost/random/random_number_generator.hpp>
+#include <boost/random/linear_congruential.hpp>
+
+#include <algorithm>
+
+namespace CGAL {
+
+
+namespace internal {
+
+  template <class RandomAccessIterator, class Kernel, class Policy>
+    void hilbert_sort (RandomAccessIterator begin, 
+		       RandomAccessIterator end,
+                       const Kernel &k, 
+		       Policy /*policy*/,
+		       typename Kernel::Point_2 *)
+    {
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end, rng);
+#else
+        std::random_shuffle(begin,end, rng);
+#endif
+	(Hilbert_sort_2<Kernel, Policy> (k))(begin, end);
+    }
+    
+    template <class RandomAccessIterator, class Kernel, class Policy>
+      void hilbert_sort (RandomAccessIterator begin, 
+			 RandomAccessIterator end,
+                         const Kernel &k, 
+			 Policy /*policy*/,
+			 typename Kernel::Point_3 *)
+    {
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end, rng);
+#else
+        std::random_shuffle(begin,end, rng);
+#endif
+        (Hilbert_sort_3<Kernel, Policy> (k))(begin, end);
+    }
+
+    template <class RandomAccessIterator, class Kernel, class Policy>
+      void hilbert_sort (RandomAccessIterator begin,
+			 RandomAccessIterator end,
+                         const Kernel &k, 
+			 Policy /*policy*/,
+			 typename Kernel::Point_d *)
+    {
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end, rng);
+#else
+        std::random_shuffle(begin,end, rng);
+#endif
+        (Hilbert_sort_d<Kernel, Policy> (k))(begin, end);
+    }
+}
+
+template <class RandomAccessIterator>
+void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end)
+{
+
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort(begin, end, Kernel(), Hilbert_sort_median_policy(),
+				  static_cast<value_type *> (0));
+
+}
+
+template <class RandomAccessIterator, class Kernel>
+void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   const Kernel &k)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+  
+    internal::hilbert_sort(begin, end, k, Hilbert_sort_median_policy(),
+				  static_cast<value_type *> (0));
+}
+
+  template <class RandomAccessIterator>
+void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_median_policy policy)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort(begin, end, Kernel(), policy,
+				  static_cast<value_type *> (0));
+
+}
+
+
+  template <class RandomAccessIterator>
+void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_middle_policy policy)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort(begin, end, Kernel(), policy,
+				  static_cast<value_type *> (0));
+
+}
+
+
+  template <class RandomAccessIterator, class Kernel, class Policy>
+void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   const Kernel &k, Policy policy)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+
+    internal::hilbert_sort(begin, end, 
+			   k, policy, static_cast<value_type *> (0));
+}
+
+} // namespace CGAL
+
+#endif//CGAL_HILBERT_SORT_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort_on_sphere.h b/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort_on_sphere.h
new file mode 100644
index 0000000..6739411
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/hilbert_sort_on_sphere.h
@@ -0,0 +1,110 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Olivier Devillers
+//               : Pedro Machado Manhaes de Castro
+
+#ifndef CGAL_HILBERT_SORT_ON_SPHERE_H
+#define CGAL_HILBERT_SORT_ON_SPHERE_H
+
+#include <CGAL/hilbert_sort.h>
+#include <CGAL/Hilbert_sort_on_sphere_3.h>
+
+namespace CGAL {
+
+namespace internal {
+
+template <class RandomAccessIterator, class Kernel, class Policy>
+void hilbert_sort_on_sphere (RandomAccessIterator begin,
+                   RandomAccessIterator end,
+       const Kernel &k,
+                   Policy,
+                   typename Kernel::Point_3 *,
+                   double sq_r,
+                   const typename Kernel::Point_3 &p)
+{
+  boost::rand48 random;
+  boost::random_number_generator<boost::rand48> rng(random);
+  std::random_shuffle(begin,end, rng);
+  (Hilbert_sort_on_sphere_3<Kernel, Policy> (k,sq_r,p))(begin, end);
+}
+
+} //end of namespace internal
+
+template <class RandomAccessIterator>
+void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+  double sq_r = 1.0,
+  const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+	    typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0))
+{
+
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort_on_sphere(begin, end, Kernel(), Hilbert_sort_median_policy(),
+				  static_cast<value_type *> (0), sq_r, p);
+
+}
+
+template <class RandomAccessIterator>
+void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_median_policy policy,
+  double sq_r = 1.0,
+  const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+    typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0))
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort_on_sphere(begin, end, Kernel(), policy,
+				  static_cast<value_type *> (0), sq_r, p);
+}
+
+
+template <class RandomAccessIterator>
+void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_middle_policy policy,
+  double sq_r = 1.0,
+  const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+    typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0))
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    internal::hilbert_sort_on_sphere(begin, end, Kernel(), policy,
+				  static_cast<value_type *> (0), sq_r, p);
+}
+
+
+template <class RandomAccessIterator, class Kernel, class Policy>
+void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy policy,
+	double sq_r = 1.0, const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0))
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+
+    internal::hilbert_sort_on_sphere(begin, end,
+			   k, policy, static_cast<value_type *> (0), sq_r, p);
+}
+
+} // end of namespace CGAL
+
+#endif // CGAL_HILBERT_SORT_ON_SPHERE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/in_place_edge_list.h b/3rdparty/CGAL-4.8/include/CGAL/in_place_edge_list.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/in_place_edge_list.h
rename to 3rdparty/CGAL-4.8/include/CGAL/in_place_edge_list.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/int.h b/3rdparty/CGAL-4.8/include/CGAL/int.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/int.h
rename to 3rdparty/CGAL-4.8/include/CGAL/int.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h
new file mode 100644
index 0000000..1488b4c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h
@@ -0,0 +1,98 @@
+// Copyright (c) 2008  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  Camille Wormser, Pierre Alliez
+
+#ifndef CGAL_AABB_DRAWING_TRAITS_H
+#define CGAL_AABB_DRAWING_TRAITS_H
+
+#include <CGAL/Bbox_3.h>
+#include <CGAL/gl.h>
+#include <vector>
+
+namespace CGAL {
+
+template<typename Primitive, typename Node>
+struct AABB_drawing_traits
+{
+  std::vector<float> *v_edges;
+
+  typedef CGAL::Bbox_3 Bbox;
+  bool go_further() { return true; }
+
+  bool intersection(const int&, const Primitive&)
+  {
+    return true;
+  }
+
+  bool do_intersect(const int&, // unused
+                    const Node& node)
+  {
+    gl_draw(node.bbox());
+    return true;
+  }
+
+  // draw bbox
+  void gl_draw(const Bbox& bb)
+  {
+    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
+                 bb.xmax(), bb.ymin(), bb.zmin());
+    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
+                 bb.xmin(), bb.ymax(), bb.zmin());
+    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmin(),
+                 bb.xmin(), bb.ymin(), bb.zmax());
+
+    gl_draw_edge(bb.xmax(), bb.ymin(), bb.zmin(),
+                 bb.xmax(), bb.ymax(), bb.zmin());
+    gl_draw_edge(bb.xmax(), bb.ymin(), bb.zmin(),
+                 bb.xmax(), bb.ymin(), bb.zmax());
+
+    gl_draw_edge(bb.xmin(), bb.ymax(), bb.zmin(),
+                 bb.xmax(), bb.ymax(), bb.zmin());
+    gl_draw_edge(bb.xmin(), bb.ymax(), bb.zmin(),
+                 bb.xmin(), bb.ymax(), bb.zmax());
+
+    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmax(),
+                 bb.xmax(), bb.ymin(), bb.zmax());
+    gl_draw_edge(bb.xmin(), bb.ymin(), bb.zmax(),
+                 bb.xmin(), bb.ymax(), bb.zmax());
+
+    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
+                 bb.xmin(), bb.ymax(), bb.zmax());
+    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
+                 bb.xmax(), bb.ymin(), bb.zmax());
+    gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(),
+                 bb.xmax(), bb.ymax(), bb.zmin());
+  }
+
+  void gl_draw_edge(double px, double py, double pz,
+                           double qx, double qy, double qz)
+  {
+      v_edges->push_back((float)px);
+      v_edges->push_back((float)py);
+      v_edges->push_back((float)pz);
+
+      v_edges->push_back((float)qx);
+      v_edges->push_back((float)qy);
+      v_edges->push_back((float)qz);
+  }
+}; // AABB_drawing_traits
+
+} // end namespace CGAL
+
+#endif // CGAL_AABB_DRAWING_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_node.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_node.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_node.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_node.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_search_tree.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_search_tree.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_search_tree.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_search_tree.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Halfedge_and_face_graph_property_maps.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Halfedge_and_face_graph_property_maps.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Halfedge_and_face_graph_property_maps.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Halfedge_and_face_graph_property_maps.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Primitive_helper.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Primitive_helper.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/Primitive_helper.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/Primitive_helper.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/nearest_point_segment_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/nearest_point_segment_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/nearest_point_segment_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/nearest_point_segment_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/nearest_point_triangle_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/nearest_point_triangle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/AABB_tree/nearest_point_triangle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/AABB_tree/nearest_point_triangle_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_face_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_face_base_2.h
new file mode 100644
index 0000000..2a578ab
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_face_base_2.h
@@ -0,0 +1,107 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_SURFACE_FACE_BASE_2_H
+#define CGAL_AFSR_SURFACE_FACE_BASE_2_H
+
+// This face class stores a facet in the tetrahedrization
+// When it gets reoriented by the TDS, it also changes the facet
+
+namespace CGAL {
+  namespace AFSR {
+
+    template < typename GT,
+               typename F3,
+               typename Fb = CGAL::Triangulation_ds_face_base_2<> >
+    class Surface_face_base_2
+      : public Fb
+    {
+      typedef typename Fb::Triangulation_data_structure    Tds;
+
+    public:
+      typedef typename Tds::Face_handle             Face_handle;
+      typedef typename Tds::Vertex_handle           Vertex_handle;
+
+      template < typename TDS2 >
+      struct Rebind_TDS {
+        typedef typename Fb::template Rebind_TDS<TDS2>::Other  Fb2;
+        typedef Surface_face_base_2<GT, F3, Fb2>           Other;
+      };
+
+    private:
+      F3 _facet;
+      bool _is_on_surface;
+
+    public:
+      Surface_face_base_2()
+        : Fb(), _is_on_surface(true)
+      {}
+
+      Surface_face_base_2(Vertex_handle v0,
+                          Vertex_handle v1,
+                          Vertex_handle v2)
+        : Fb(v0, v1, v2), _is_on_surface(true)
+      {}
+
+      Surface_face_base_2(Vertex_handle v0,
+                          Vertex_handle v1,
+                          Vertex_handle v2,
+                          Face_handle n0,
+                          Face_handle n1,
+                          Face_handle n2)
+        : Fb(v0, v1, v2, n0, n1, n2), _is_on_surface(true)
+      {}
+
+      void set_facet(const F3& facet)
+      {
+        _facet = facet;
+      }
+
+      const F3& facet() const
+      {
+        return _facet;
+      }
+
+      void set_is_on_surface(bool is_on_surface)
+      {
+        _is_on_surface = is_on_surface;
+      }
+
+      bool is_on_surface() const
+      {
+        return _is_on_surface;
+      }
+
+
+      void reorient()
+      {
+        Fb::reorient();
+        if( is_on_surface()){
+          _facet = std::make_pair(_facet.first->neighbor(_facet.second),
+                                  _facet.first->neighbor(_facet.second)->index(_facet.first));
+        }
+      }
+
+    };
+
+
+  } // namespace AFSR
+} // namespace CGAL
+
+#endif // CGAL_AFSR_SURFACE_FACE_BASE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_vertex_base_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_vertex_base_2.h
new file mode 100644
index 0000000..e5872a7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/Surface_vertex_base_2.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_SURFACE_VERTEX_BASE_2_H
+#define CGAL_AFSR_SURFACE_VERTEX_BASE_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Triangulation_ds_vertex_base_2.h>
+
+namespace CGAL {
+  namespace AFSR {
+
+    template < typename GT,
+               typename V3,
+               typename Vb = CGAL::Triangulation_ds_vertex_base_2<> >
+    class Surface_vertex_base_2
+      : public Vb
+
+    {
+      typedef typename Vb::Triangulation_data_structure    Tds;
+    public:
+      typedef GT                                    Geom_traits;
+      typedef typename GT::Point_3                  Point;
+      typedef Tds                                   Triangulation_data_structure;
+      typedef typename Tds::Face_handle             Face_handle;
+      typedef typename Tds::Vertex_handle           Vertex_handle;
+
+      template < typename TDS2 >
+      struct Rebind_TDS {
+        typedef typename Vb::template Rebind_TDS<TDS2>::Other  Vb2;
+        typedef Surface_vertex_base_2<GT,V3, Vb2>           Other;
+      };
+
+    private:
+      V3 _vertex;
+    public:
+      Surface_vertex_base_2() : Vb() {}
+      Surface_vertex_base_2(Face_handle f) : Vb(f) {}
+
+      void set_vertex(const V3& v)
+      {
+        _vertex = v;
+      }
+
+      V3 vertex_3() const
+      {
+        return _vertex;
+      }
+
+      const Point&  point() const { return _vertex->point(); }
+
+
+    };
+
+
+
+
+
+  } // namespace AFSR
+} // namespace CGAL
+
+#endif //CGAL::AFSR_SURFACE_VERTEX_BASE_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_polyhedron.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_polyhedron.h
new file mode 100644
index 0000000..88da74a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_polyhedron.h
@@ -0,0 +1,90 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_CONSTRUCT_POLYHEDRON_2
+#define CGAL_AFSR_CONSTRUCT_POLYHEDRON_2
+
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/Polyhedron_3.h>
+
+namespace CGAL {
+
+  template <class Triangulation, class Filter>
+  class Advancing_front_polyhedron_reconstruction;
+
+  namespace AFSR {
+
+    template <class HDS, class Surface>
+    class Construct_polyhedron: public CGAL::Modifier_base<HDS> {
+
+      const Surface& s;
+
+    public:
+      Construct_polyhedron(Surface& s)
+        : s(s)
+      {}
+
+      void operator()( HDS& hds)
+      {
+        CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+        B.begin_surface( s.number_of_vertices(), s.number_of_facets(), 6* s.number_of_facets());
+
+        typedef typename Surface::TDS_2 TDS_2;
+        typedef typename TDS_2::Face_iterator Face_iterator;
+        typedef typename TDS_2::Vertex_iterator Vertex_iterator;
+
+        const TDS_2& tds = s.triangulation_data_structure_2();
+
+        std::size_t index = 0;
+        Vertex_iterator end = tds.vertices_end();
+
+        for(Vertex_iterator vit = tds.vertices_begin(); vit != end; ++vit){
+          if(vit->vertex_3() != s.triangulation_3().infinite_vertex()){
+            B.add_vertex(vit->point());
+            vit->vertex_3()->id() = index++;
+          }
+        }
+
+        for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
+
+          if(fit->is_on_surface()){
+            B.begin_facet();
+            for(int i=0; i < 3; i++){
+              B.add_vertex_to_facet(fit->vertex(i)->vertex_3()->id());
+            }
+            B.end_facet();
+          }
+        }
+        B.end_surface();
+      }
+
+    };
+
+    template <class Polyhedron, class Surface>
+    void
+    construct_polyhedron(Polyhedron& P, Surface& surface)
+    {
+      typedef typename Polyhedron::HalfedgeDS             HalfedgeDS;
+      Construct_polyhedron<HalfedgeDS, Surface> builder(surface);
+      P.delegate(builder);
+    }
+
+  } // namespace AFSR
+} // namespace CGAL
+#endif // CGAL_AFSR_CONSTRUCT_POLYHEDRON_2
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_surface_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_surface_2.h
new file mode 100644
index 0000000..4eef347
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/construct_surface_2.h
@@ -0,0 +1,147 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_CONSTRUCT_SURFACE_2
+#define CGAL_AFSR_CONSTRUCT_SURFACE_2
+
+namespace CGAL {
+
+  template <class Triangulation, class Filter>
+  class Advancing_front_surface_reconstruction;
+
+  namespace AFSR {
+
+
+    template <class Tr, class TDS, class Filter>
+    typename TDS::Vertex_handle
+    construct_surface(TDS& tds, const Advancing_front_surface_reconstruction<Tr,Filter>& surface)
+    {
+
+      typedef typename TDS::Vertex_handle Vertex_handle;
+      typedef std::pair<Vertex_handle,Vertex_handle> Vh_pair;
+      typedef typename TDS::Face_handle Face_handle;
+      typedef typename TDS::Edge Edge;
+      typedef typename Advancing_front_surface_reconstruction<Tr,Filter>::Triangulation_3 Triangulation;
+
+      Triangulation& T = surface.triangulation_3();
+      // create an infinite-vertex and  infinite faces with the
+      // boundary edges if any.
+      // return the infinite vertex if created
+      Vertex_handle vinf;
+
+      std::vector<Vertex_handle > vvh;
+      if(tds.number_of_vertices() != 0){
+        tds.clear();
+      }
+      int dim = 2;
+      tds.set_dimension(dim);
+
+      CGAL::Unique_hash_map<typename Triangulation::Vertex_handle, int> vertex_index_map(-1, T.number_of_vertices());
+
+      int i=0;
+      for (typename Triangulation::Finite_vertices_iterator v_it = T.finite_vertices_begin();
+           v_it != T.finite_vertices_end();
+           v_it++){
+        typename CGAL::Unique_hash_map<typename Triangulation::Vertex_handle, int>::Data& d = vertex_index_map[v_it];
+        if ((!v_it->is_exterior()) && d == -1){
+          d = i;
+          Vertex_handle vh = tds.create_vertex();
+          vvh.push_back(vh);
+          vh->set_vertex(typename Triangulation::Vertex_handle(v_it));
+          i++;
+        }
+      }
+      std::map<Vh_pair, Edge> edge_map;
+
+      for(typename Triangulation::Finite_facets_iterator f_it = T.finite_facets_begin();
+          f_it != T.finite_facets_end();
+          f_it++)
+        {
+          typename Triangulation::Cell_handle n, c = (*f_it).first;
+          int ni, ci = (*f_it).second;
+          n = c->neighbor(ci);
+          ni = n->index(c);
+          int i1, i2 ,i3;
+
+          if (c->is_selected_facet(ci))
+            {
+              i1 = (ci+1) & 3;
+              i2 = (ci+2) & 3;
+              i3 = (ci+3) & 3;
+
+              Face_handle fh = tds.create_face(vvh[vertex_index_map[c->vertex(i1)]],
+                                               vvh[vertex_index_map[c->vertex(i2)]],
+                                               vvh[vertex_index_map[c->vertex(i3)]]);
+              fh->set_facet(*f_it);
+              vvh[vertex_index_map[c->vertex(i1)]]->set_face(fh);
+              vvh[vertex_index_map[c->vertex(i2)]]->set_face(fh);
+              vvh[vertex_index_map[c->vertex(i3)]]->set_face(fh);
+              for (int ih  = 0; ih < 3; ++ih) {
+                tds.set_adjacency(fh, ih, edge_map);
+              }
+            }
+
+          if (n->is_selected_facet(ni))
+            {
+              i1 = (ni+1) & 3;
+              i2 = (ni+2) & 3;
+              i3 = (ni+3) & 3;
+              Face_handle fh = tds.create_face(vvh[vertex_index_map[n->vertex(i1)]],
+                                               vvh[vertex_index_map[n->vertex(i2)]],
+                                               vvh[vertex_index_map[n->vertex(i3)]]);
+              fh->set_facet(std::make_pair(n, ni));
+              vvh[vertex_index_map[n->vertex(i1)]]->set_face(fh);
+              vvh[vertex_index_map[n->vertex(i2)]]->set_face(fh);
+              vvh[vertex_index_map[n->vertex(i3)]]->set_face(fh);
+              for (int ih  = 0; ih < 3; ++ih) {
+                tds.set_adjacency(fh, ih, edge_map);
+              }
+            }
+
+        }
+
+      if ( !edge_map.empty()) {
+        vinf = tds.create_vertex();
+        vinf->set_vertex(T.infinite_vertex());
+        std::map<Vh_pair, Edge> inf_edge_map;
+        while (!edge_map.empty()) {
+          Face_handle fh = edge_map.begin()->second.first;
+          int ih = edge_map.begin()->second.second;
+          Face_handle fn = tds.create_face( vinf,
+                                            fh->vertex(TDS::cw(ih)),
+                                            fh->vertex(TDS::ccw(ih)));
+          fn->set_facet(std::make_pair( typename Triangulation::Cell_handle(),0));
+          fn->set_is_on_surface(false);
+          vinf->set_face(fn);
+          tds.set_adjacency(fn, 0, fh, ih);
+          tds.set_adjacency(fn, 1, inf_edge_map);
+          tds.set_adjacency(fn, 2, inf_edge_map);
+          edge_map.erase(edge_map.begin());
+        }
+        CGAL_assertion(inf_edge_map.empty());
+      }
+      tds.reorient_faces();
+      return vinf;
+
+    }
+
+
+  } // namespace AFSR
+} // namespace CGAL
+#endif // CGAL_AFSR_CONSTRUCT_SURFACE_2
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/orient.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/orient.h
new file mode 100644
index 0000000..09a0a0a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/orient.h
@@ -0,0 +1,139 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_ORIENT
+
+namespace CGAL {
+  namespace AFSR {
+
+
+    template <class Triangulation, class TDS, class Filter>
+    typename TDS::Vertex_handle
+    orient(TDS& tds, const Advancing_front_surface_reconstruction<Triangulation,Filter>& surface)
+    {
+
+      typedef typename TDS::Vertex_handle Vertex_handle;
+      typedef std::pair<Vertex_handle,Vertex_handle> Vh_pair;
+      typedef typename TDS::Face_handle Face_handle;
+      typedef typename TDS::Edge Edge;
+
+      Triangulation& T = surface.triangulation_3();
+      // create an infinite-vertex and  infinite faces with the
+      // boundary edges if any.
+      // return the infinite vertex if created
+      Vertex_handle vinf;
+
+      std::vector<Vertex_handle > vvh;
+      if(tds.number_of_vertices() != 0)    tds.clear();
+      int dim = 2;
+      tds.set_dimension(dim);
+
+      CGAL::Unique_hash_map<typename Triangulation::Vertex_handle, int> vertex_index_map(-1, T.number_of_vertices());
+
+      int i=0;
+      for (typename Triangulation::Finite_vertices_iterator v_it = T.finite_vertices_begin();
+           v_it != T.finite_vertices_end();
+           v_it++){
+        typename CGAL::Unique_hash_map<typename Triangulation::Vertex_handle, int>::Data& d = vertex_index_map[v_it];
+        if ((!v_it->is_exterior()) && d == -1){
+          d = i;
+          Vertex_handle vh = tds.create_vertex();
+          vvh.push_back(vh);
+          vh->set_point(v_it->point());
+          i++;
+        }
+      }
+      std::map<Vh_pair, Edge> edge_map;
+
+
+      for(typename Triangulation::Finite_facets_iterator f_it = T.finite_facets_begin();
+          f_it != T.finite_facets_end();
+          f_it++)
+        {
+          typename Triangulation::Cell_handle n, c = (*f_it).first;
+          int ni, ci = (*f_it).second;
+          n = c->neighbor(ci);
+          ni = n->index(c);
+          int i1, i2 ,i3;
+
+          if (c->is_selected_facet(ci))
+            {
+              i1 = (ci+1) & 3;
+              i2 = (ci+2) & 3;
+              i3 = (ci+3) & 3;
+
+              Face_handle fh = tds.create_face(vvh[vertex_index_map[c->vertex(i1)]],
+                                               vvh[vertex_index_map[c->vertex(i2)]],
+                                               vvh[vertex_index_map[c->vertex(i3)]]);
+              vvh[vertex_index_map[c->vertex(i1)]]->set_face(fh);
+              vvh[vertex_index_map[c->vertex(i2)]]->set_face(fh);
+              vvh[vertex_index_map[c->vertex(i3)]]->set_face(fh);
+              for (int ih  = 0; ih < 3; ++ih) {
+                tds.set_adjacency(fh, ih, edge_map);
+              }
+            }
+
+          if (n->is_selected_facet(ni))
+            {
+              i1 = (ni+1) & 3;
+              i2 = (ni+2) & 3;
+              i3 = (ni+3) & 3;
+              Face_handle fh = tds.create_face(vvh[vertex_index_map[n->vertex(i1)]],
+                                               vvh[vertex_index_map[n->vertex(i2)]],
+                                               vvh[vertex_index_map[n->vertex(i3)]]);
+              vvh[vertex_index_map[n->vertex(i1)]]->set_face(fh);
+              vvh[vertex_index_map[n->vertex(i2)]]->set_face(fh);
+              vvh[vertex_index_map[n->vertex(i3)]]->set_face(fh);
+              for (int ih  = 0; ih < 3; ++ih) {
+                tds.set_adjacency(fh, ih, edge_map);
+              }
+            }
+
+        }
+
+      if ( !edge_map.empty()) {
+        vinf = tds.create_vertex();
+        std::map<Vh_pair, Edge> inf_edge_map;
+        while (!edge_map.empty()) {
+          Face_handle fh = edge_map.begin()->second.first;
+          int ih = edge_map.begin()->second.second;
+          Face_handle fn = tds.create_face( vinf,
+                                            fh->vertex(TDS::cw(ih)),
+                                            fh->vertex(TDS::ccw(ih)));
+          vinf->set_face(fn);
+          tds.set_adjacency(fn, 0, fh, ih);
+          tds.set_adjacency(fn, 1, inf_edge_map);
+          tds.set_adjacency(fn, 2, inf_edge_map);
+          edge_map.erase(edge_map.begin());
+        }
+        CGAL_assertion(inf_edge_map.empty());
+      }
+
+
+      tds.reorient_faces();
+      return vinf;
+
+    }
+
+
+
+  } // namespace AFSR
+} // namespace CGAL
+
+#endif //CGAL_AFSR_ORIENT
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/write_triple_indices.h b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/write_triple_indices.h
new file mode 100644
index 0000000..64b4157
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/AFSR/write_triple_indices.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Frank Da, David Cohen-Steiner, Andreas Fabri
+
+#ifndef CGAL_AFSR_WRITE_TRIPLE_INDICES_H
+#define CGAL_AFSR_WRITE_TRIPLE_INDICES_H
+
+#include <CGAL/array.h>
+
+namespace CGAL {
+
+  template <class Triangulation, class Filter>
+  class Advancing_front_surface_reconstruction;
+
+
+
+  template <class OutputIterator, class Triangulation, class Filter>
+  OutputIterator
+  write_triple_indices(OutputIterator out, const Advancing_front_surface_reconstruction<Triangulation,Filter>& S)
+  {
+    typedef Advancing_front_surface_reconstruction<Triangulation,Filter> Surface;
+    typedef typename Surface::TDS_2 TDS_2;
+    typedef typename TDS_2::Face_iterator Face_iterator;
+
+    if(S.triangulation_3().dimension() < 3){
+      std::cerr << "not 3D\n";
+      return out;
+    }
+    const TDS_2& tds = S.triangulation_data_structure_2();
+
+    for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
+
+      if(fit->is_on_surface()){
+        *out++ = CGAL::make_array(fit->vertex(0)->vertex_3()->id(),
+                                  fit->vertex(1)->vertex_3()->id(),
+                                  fit->vertex(2)->vertex_3()->id());
+      }
+    }
+    return out;
+  }
+
+}
+
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Classification_type.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Classification_type.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Classification_type.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Classification_type.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combination_enumerator.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combination_enumerator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Combination_enumerator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Combination_enumerator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_copy_functors.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_copy_functors.h
new file mode 100644
index 0000000..272d915
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_copy_functors.h
@@ -0,0 +1,415 @@
+// Copyright (c) 2010-2013 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
+#define CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
+
+#include <CGAL/internal/Combinatorial_map_utility.h>
+#include <CGAL/Combinatorial_map_functors.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Kernel_traits.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/use.h>
+/* Definition of functors used internally to copy combinatorial maps attributes
+ * (we need functors as attributes are stored in tuple, thus all the access
+ *  must be done at compiling time).
+ */
+namespace CGAL
+{
+template< typename Map1, typename Map2, unsigned int i>
+struct Default_converter_cmap_attributes;
+template< typename Map1, typename Map2>
+struct Default_converter_cmap_0attributes_with_point;
+// ****************************************************************************
+namespace internal
+{
+// ****************************************************************************
+// Map1 is the existing map, to convert into map2.
+// Functor called only when both i-attributes have non void info.
+// General cases when both info are differents.
+template< typename Map1, typename Map2, unsigned int i,
+          typename Info1=typename Map1::template
+          Attribute_type<i>::type::Info,
+          typename Info2=typename Map2::template
+          Attribute_type<i>::type::Info >
+struct Create_attribute_if_same_info_cmap
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run(Map2&, const Info1& )
+  { return Map2::null_handle; }
+};
+
+// Special case when both attributes have the same info.
+template< typename Map1, typename Map2, unsigned int i, typename Info >
+struct Create_attribute_if_same_info_cmap<Map1, Map2, i, Info, Info>
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run(Map2& map2, const Info& info)
+  { typename Map2::template Attribute_handle<i>::type
+        res = map2.template create_attribute<i>();
+    map2.template get_attribute<i>(res).info()=info;
+    return res;
+  }
+};
+// ****************************************************************************
+// Functor allowing to set the value of a point if point exist, have
+// same dimension. For dim>3, if type of points are the same
+// (because no converter).
+template<typename Point1, typename Point2,
+         typename T1=typename Ambient_dimension<Point1>::type,
+         typename T2=typename Ambient_dimension<Point2>::type>
+struct Set_point_if_possible_cmap
+{
+  static void run(const Point1&, Point2&)
+  {}
+};
+
+template<typename Point1, typename Point2>
+struct Set_point_if_possible_cmap<Point1, Point2,
+    Dimension_tag<2>, Dimension_tag<2> >
+{
+  static void run(const Point1& p1, Point2& p2)
+  {
+    p2 = Cartesian_converter<typename Kernel_traits<Point1>::Kernel,
+        typename Kernel_traits<Point2>::Kernel>(p1);
+  }
+};
+
+template<typename Point1>
+struct Set_point_if_possible_cmap<Point1, Point1,
+    Dimension_tag<2>, Dimension_tag<2> >
+{
+  static void run(const Point1& p1, Point1& p2)
+  {
+    p2 = p1;
+  }
+};
+
+template<typename Point1, typename Point2>
+struct Set_point_if_possible_cmap<Point1, Point2,
+    Dimension_tag<3>, Dimension_tag<3> >
+{
+  static void run(const Point1& p1, Point2& p2)
+  {
+    p2 = Cartesian_converter<typename Kernel_traits<Point1>::Kernel,
+        typename Kernel_traits<Point2>::Kernel>()(p1);
+  }
+};
+
+template<typename Point1>
+struct Set_point_if_possible_cmap<Point1, Point1,
+    Dimension_tag<3>, Dimension_tag<3> >
+{
+  static void run(const Point1& p1, Point1& p2)
+  {
+    p2 = p1;
+  }
+};
+
+template<typename Point1>
+struct Set_point_if_possible_cmap<Point1, Point1,
+    Dynamic_dimension_tag, Dynamic_dimension_tag >
+{
+  static void run(const Point1& p1, Point1& p2)
+  {
+    p2 = p1;
+  }
+};
+// ****************************************************************************
+// Get the ith functor of the converters tuple if i<length of the tuple,
+// otherwise get the default converter.
+template<typename Map1, typename Map2, unsigned int i, typename Converters,
+         bool t=((int)i>=My_length<Converters>::value)>
+struct Get_convert_attribute_functor
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run( const Map1* cmap1, Map2* cmap2, typename Map1::Dart_const_handle dh1,
+       typename Map2::Dart_handle dh2, const Converters& /*converters*/)
+  {
+    return
+        CGAL::Default_converter_cmap_attributes<Map1, Map2, i>()
+        (*cmap1, *cmap2, dh1, dh2);
+  }
+};
+
+template<typename Map1, typename Map2, unsigned int i, typename Converters>
+struct Get_convert_attribute_functor<Map1,Map2,i,Converters,false>
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run( const Map1* cmap1, Map2* cmap2, typename Map1::Dart_const_handle dh1,
+       typename Map2::Dart_handle dh2, const Converters& converters)
+  {
+    return CGAL::cpp11::get<i>(converters) (*cmap1, *cmap2, dh1, dh2);
+  }
+};
+// ****************************************************************************
+// Call a given functor if both i-attribute have an non void info
+template< typename Map1, typename Map2, unsigned int i,
+          typename Converters,
+          bool Withinfo1=CGAL::template
+          Is_attribute_has_non_void_info
+          <typename Map1::template Attribute_type<i>::type>::value,
+          bool Withinfo2=CGAL::template
+          Is_attribute_has_non_void_info
+          <typename Map2::template Attribute_type<i>::type>::value >
+struct Call_functor_if_both_attributes_have_info
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run( const Map1*,
+       Map2*,
+       typename Map1::Dart_const_handle,
+       typename Map2::Dart_handle,
+       const Converters&)
+  { return Map2::null_handle; }
+};
+
+template< typename Map1, typename Map2, unsigned int i, typename Converters >
+struct Call_functor_if_both_attributes_have_info<Map1, Map2, i,
+    Converters, true, true>
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run( const Map1* cmap1,
+       Map2* cmap2,
+       typename Map1::Dart_const_handle dh1,
+       typename Map2::Dart_handle dh2,
+       const Converters& converters )
+  {
+    return Get_convert_attribute_functor<Map1,Map2,i,Converters>::
+        run(cmap1, cmap2, dh1, dh2, converters);
+  }
+};
+// ****************************************************************************
+// Call a given functor only if both 0-attribute have a point.
+// general case i!=0 or one attribute without point.
+template< typename Map1, typename Map2, unsigned int i,
+          typename Pointconverter,
+          bool Withpoint1=CGAL::template Is_attribute_has_point
+          <typename Map1::template Attribute_type<i>::type>::value,
+          bool Withpoint2=CGAL::template Is_attribute_has_point
+          <typename Map2::template Attribute_type<i>::type>::value >
+struct Call_functor_if_both_attributes_have_point
+{
+  static typename Map2::template Attribute_handle<i>::type
+  run( const Map1*,
+       Map2*,
+       typename Map1::Dart_const_handle,
+       typename Map2::Dart_handle,
+       const Pointconverter&)
+  { return Map2::null_handle; }
+};
+// Specialisation with i==0 and both attributes have points.
+template< typename Map1, typename Map2, typename Pointconverter >
+struct Call_functor_if_both_attributes_have_point<Map1, Map2, 0,
+    Pointconverter, true, true>
+{
+  static typename Map2::template Attribute_handle<0>::type
+  run( const Map1* cmap1,
+       Map2* cmap2,
+       typename Map1::Dart_const_handle dh1,
+       typename Map2::Dart_handle dh2,
+       const Pointconverter& pointconverter )
+  { return pointconverter(*cmap1, *cmap2, dh1, dh2); }
+};
+// ****************************************************************************
+// Copy attribute when if both i-attributes are non void.
+// (note Attr2 could not be Void as copy functor is called only for
+// non void attributes)
+// General case with both attributes non void.
+template<typename Map1, typename Map2, typename Converters,
+         typename Pointconverter, unsigned int i,
+         typename Attr1=typename Map1::template Attribute_type<i>::type,
+         typename Attr2=typename Map2::template Attribute_type<i>::type >
+struct Copy_attribute_functor_if_nonvoid
+{
+  static void run( const Map1* cmap1,
+                   Map2* cmap2,
+                   typename Map1::Dart_const_handle dh1,
+                   typename Map2::Dart_handle dh2,
+                   const Converters& converters,
+                   const Pointconverter& pointconverter)
+  {
+    // If dh1 has no i-attribute, nothing to copy.
+    if ( cmap1->template attribute<i>(dh1)==Map1::null_handle ) return;
+
+    // If dh2 has already an i-attribute, it was already copied.
+    if ( cmap2->template attribute<i>(dh2)!=Map2::null_handle ) return;
+
+    // Otherwise we copy the info if both attribute have non void info.
+    typename Map2::template Attribute_handle<i>::type
+        res=Call_functor_if_both_attributes_have_info
+        <Map1, Map2, i, Converters>::
+        run(cmap1, cmap2, dh1, dh2, converters);
+
+    if ( res!=Map2::null_handle )
+      cmap2->template set_attribute<i>(dh2, res);
+
+    // And the point if both attributes have points (and only for 0-attributes)
+    res=Call_functor_if_both_attributes_have_point
+        <Map1, Map2, i, Pointconverter>::
+        run(cmap1, cmap2, dh1, dh2, pointconverter);
+
+    if ( res!=Map2::null_handle &&
+         cmap2->template attribute<i>(dh2)==Map2::null_handle )
+      cmap2->template set_attribute<i>(dh2, res);
+  }
+};
+// Specialisation when attr1 is void, and attr2 is non void i==0. Nothing to
+// copy, but if 0-attributes has point and i==0, we need to create
+// vertex attributes.
+template<typename Map1, typename Map2, typename Converters,
+         typename Pointconverter, typename Attr2>
+struct Copy_attribute_functor_if_nonvoid<Map1, Map2, Converters,
+    Pointconverter, 0, CGAL::Void, Attr2>
+{
+  static void run( const Map1*,
+                   Map2* cmap2,
+                   typename Map1::Dart_const_handle,
+                   typename Map2::Dart_handle dh2,
+                   const Converters&,
+                   const Pointconverter&)
+  {
+    // If dh2 has already an 0-attribute, it was already created.
+    if ( cmap2->template attribute<0>(dh2)!=Map2::null_handle ) return;
+
+    // Create the point if 0-attributes has Point.
+    if ( CGAL::template Is_attribute_has_point
+         <typename Map2::template Attribute_type<0>::type>::value )
+      cmap2->template
+          set_attribute<0>(dh2, cmap2->template create_attribute<0>());
+  }
+};
+// Specialisation when attr1 is void, and attr2 is non void i!=0.
+// Nothing to do.
+template<typename Map1, typename Map2, typename Converters, unsigned int i,
+         typename Pointconverter, typename Attr2>
+struct Copy_attribute_functor_if_nonvoid<Map1, Map2, Converters,
+    Pointconverter, i, CGAL::Void, Attr2>
+{
+  static void run( const Map1*,
+                   Map2*,
+                   typename Map1::Dart_const_handle,
+                   typename Map2::Dart_handle,
+                   const Converters&,
+                   const Pointconverter&)
+  {}
+};
+// ****************************************************************************
+/// Copy enabled attributes from one cmap to other. General case called
+/// by copy function in Combinatorial_map on all the non void attributes
+/// of Map2. Map1 is the existing map, to convert into map2.
+template<typename Map1, typename Map2, typename Converters,
+         typename Pointconverter>
+struct Copy_attributes_functor
+{
+  template<unsigned int i>
+  static void run( const Map1* cmap1,
+                   Map2* cmap2,
+                   typename Map1::Dart_const_handle dh1,
+                   typename Map2::Dart_handle dh2,
+                   const Converters& converters,
+                   const Pointconverter& pointconverter)
+  { Copy_attribute_functor_if_nonvoid
+        <Map1, Map2, Converters, Pointconverter, i>::
+        run(cmap1, cmap2, dh1, dh2, converters, pointconverter);
+   }
+};
+// ****************************************************************************
+} // namespace internal
+// ****************************************************************************
+// "Converters" called during the copy of attributes, to copy Info.
+// Users can replace them by their own converters.
+// Info converter are called only if both i-attributes have non void info,
+// if dh1 has an i-attribute and if dh2 does not already has an i-attribute.
+// Map1 is the existing map, to convert into map2.
+// ****************************************************************************
+// Default converter copy only attributes if they have same info types.
+template< typename Map1, typename Map2, unsigned int i>
+struct Default_converter_cmap_attributes
+{
+  typename Map2::template Attribute_handle<i>::type operator()
+  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
+   typename Map2::Dart_handle dh2) const
+  {
+    CGAL_USE(dh2);
+    CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
+    CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
+    return internal::Create_attribute_if_same_info_cmap
+      <Map1,Map2,i>::run(map2, map1.template info<i>(dh1));
+  }
+};
+// ****************************************************************************
+// Cast converter always copy attributes, doing a cast. This can work only
+// if both types are convertible and this is user responsability
+// to use it only in this case.
+template< typename Map1, typename Map2, unsigned int i>
+struct Cast_converter_cmap_attributes
+{
+  typename Map2::template Attribute_handle<i>::type operator()
+  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
+   typename Map2::Dart_handle dh2) const
+  {
+    CGAL_USE(dh2);
+    CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
+    CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
+    typename Map2::template Attribute_handle<i>::type
+      res = map2.template create_attribute<i>();
+    map2.template get_attribute<i>(res).info() =
+      (typename Map2::template Attribute_type<i>::type::Info)
+        map1.template info<i>(dh1);
+    return res;
+  }
+};
+// ****************************************************************************
+// "Converters" called during the copy of attributes, to copy Point (for
+// attributes having such type defined).
+// Users can replace them by their own converters.
+// Point converter is called after Info converters; thus it is possible that
+// attribute<0> was already created for dh2.
+// Point converter is only called if both types of 0-attributes have
+// Point type defined, and if dh1 has a 0-attribute.
+// Map1 is the existing map, to convert into map2.
+// ****************************************************************************
+// Default converter for points. Point are copied only if they have same
+// types, or in 2D/3D we use Cartesian_converter.
+template< typename Map1, typename Map2>
+struct Default_converter_cmap_0attributes_with_point
+{
+  typename Map2::template Attribute_handle<0>::type operator()
+  (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
+   typename Map2::Dart_handle dh2) const
+  {
+    CGAL_assertion( map1.template attribute<0>(dh1)!=Map1::null_handle );
+
+    typename Map2::template Attribute_handle<0>::type
+      res = map2.template attribute<0>(dh2);
+    if ( res==Map2::null_handle )
+    {
+      res = map2.template create_attribute<0>();
+    }
+    internal::Set_point_if_possible_cmap
+        <typename Map1::template Attribute_type<0>::type::Point,
+        typename Map2::template Attribute_type<0>::type::Point>::
+      run(map1.point(dh1), map2.template get_attribute<0>(res).point());
+    return res;
+  }
+};
+// ****************************************************************************
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_COPY_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_group_functors.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_group_functors.h
new file mode 100644
index 0000000..6c6b830
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_group_functors.h
@@ -0,0 +1,972 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
+#define CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
+
+#include <CGAL/Unique_hash_map.h>
+#include <CGAL/Combinatorial_map_functors.h>
+
+/* Definition of functors used to group/ungroup attributes (we need functors
+ * as attributes are stored in tuple, thus all the access must be done at
+ * compiling time). Some of these functors are used with
+ * Foreach_enabled_attributes to iterate through all the non void attribs.
+ * These functors used other functors defined in Combinatorial_map_functors.h
+ *
+ * Group_attribute_functor_of_dart<CMap> to group the <i>-attributes of two
+ *    given darts (except for j-dim). Only the attributes of the two given
+ *    darts are possibly modified.
+ *
+ * Group_attribute_functor_of_dart_run<CMap,i> same than
+ *   Group_attribute_functor_of_dart<CMap>::run<i>, with i template argument
+ *   given in the struct to enable specialization.
+ *
+ * Group_attribute_functor<CMap> to group the <i>-attributes of two
+ *    given i-cells (except for j-adim). If one i-attribute is NULL, we set the
+ *    darts of its i-cell to the second attribute. If both i-attributes are
+ *    non NULL, we overide all the i-attribute of the second i-cell to the
+ *    first i-attribute.
+ *
+ * Degroup_attribute_functor_run<CMap> to degroup one i-attributes in two
+ *   (except for j-adim).
+ *
+ * Test_split_attribute_functor<CMap,i> to test if there is some i-attributes
+ *   that are split after an operation. Modified darts are given in a
+ *   std::deque.
+ */
+namespace CGAL
+{
+namespace internal
+{
+// ************************************************************************
+/// Functor used for link_beta to update the i-attributes of
+/// dh2 on the attributes of dh1 dart, except if i=j.
+///    (j is the dimension of the beta modified between dh1 and dh2,
+///     so that after the modification we will have beta_j(dh1)==dh2)
+/// Only attributes of dh1 or dh2 can be modified. If one dart as its
+/// attribute equal to null, it takes the attributes of the second dart.
+/// If both attributes are non null, dh2 takes the attribute of dh1.
+template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
+         typename T=typename CMap::template Attribute_type<i>::type>
+struct Group_attribute_functor_of_dart_run
+{
+  /// Group the i-attribute of dh1 and dh2.
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle dh1,
+                  typename CMap::Dart_handle dh2)
+  {
+    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
+    CGAL_static_assertion( i!=j && (i!=1 || j!=0) );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<i>::value>=0,
+                              "Group_attribute_functor_of_dart_run<i> but "
+                              "i-attributes are disabled");
+    typename CMap::template Attribute_handle<i>::type
+        a1=amap->template attribute<i>(dh1);
+    typename CMap::template Attribute_handle<i>::type
+        a2=amap->template attribute<i>(dh2);
+
+    // If the two attributes are equal, nothing to do.
+    if ( a1==a2 ) return;
+
+    if ( a1==CMap::null_handle ) amap->template set_dart_attribute<i>(dh1, a2);
+    else amap->template set_dart_attribute<i>(dh2, a1);
+  }
+};
+// Specialization for i=0 and 2<=j. We modify 0-attribute for beta_j j>=2.
+template<typename CMap, unsigned int j, typename T>
+struct Group_attribute_functor_of_dart_run<CMap, 0, j, T>
+{
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle dh1,
+                  typename CMap::Dart_handle dh2)
+  {
+    CGAL_static_assertion(j!=0 && j!=1);
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Group_attribute_functor_of_dart_run<0> but "
+                              "0-attributes are disabled");
+    typename CMap::template Attribute_handle<0>::type
+        a1=CMap::null_handle, a2=CMap::null_handle;
+
+    // First extremity
+    typename CMap::Dart_handle od = amap->other_extremity(dh2);
+    if ( od!=amap->null_handle )
+    {
+      a1=amap->template attribute<0>(dh1);
+      a2=amap->template attribute<0>(od);
+
+      if ( a1==CMap::null_handle && a2!=CMap::null_handle )
+        amap->template set_dart_attribute<0>(dh1, a2);
+    }
+
+    // Second extremity
+    od = amap->other_extremity(dh1);
+    if ( od!=amap->null_handle )
+    {
+      a1=amap->template attribute<0>(od);
+      if ( a1!=CMap::null_handle )
+        amap->template set_dart_attribute<0>(dh2, a1);
+    }
+  }
+};
+// Specialization for i=0 and j=0. We modify 0-attribute for beta_0.
+template<typename CMap, typename T>
+struct Group_attribute_functor_of_dart_run<CMap, 0, 0, T>
+{
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle dh1,
+                  typename CMap::Dart_handle dh2)
+  {
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Group_attribute_functor_of_dart_run<0> but "
+                              "0-attributes are disabled");
+    typename CMap::Dart_handle od = amap->other_extremity(dh2);
+    if ( od!=amap->null_handle )
+    {
+      typename CMap::template Attribute_handle<0>::type
+          a1=amap->template attribute<0>(dh1);
+      typename CMap::template Attribute_handle<0>::type
+          a2=amap->template attribute<0>(od);
+
+      if ( a1==CMap::null_handle && a2!=CMap::null_handle )
+        amap->template set_dart_attribute<0>(dh1, a2);
+    }
+  }
+};
+// Specialization for i=0 and j=1. We modify 0-attribute for beta_1.
+template<typename CMap, typename T>
+struct Group_attribute_functor_of_dart_run<CMap, 0, 1, T>
+{
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle dh1,
+                  typename CMap::Dart_handle dh2)
+  {
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Group_attribute_functor_of_dart_run<0> but "
+                              "0-attributes are disabled");
+    typename CMap::Dart_handle od = amap->other_extremity(dh1);
+    if ( od!=amap->null_handle )
+    {
+      typename CMap::template Attribute_handle<0>::type
+          a1=amap->template attribute<0>(od);
+
+      if ( a1!=CMap::null_handle )
+        amap->template set_dart_attribute<0>(dh2, a1);
+    }
+  }
+};
+// Specialization for void attributes.
+template<typename CMap, unsigned int i, unsigned int j>
+struct Group_attribute_functor_of_dart_run<CMap, i, j, CGAL::Void>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// Specialization for i=j. Do nothing as j is the dimension to not consider.
+template<typename CMap, unsigned int i, typename T>
+struct Group_attribute_functor_of_dart_run<CMap,i,i,T>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// Specialization for i=1 and j=0. Do nothing as edges attributes are not
+// modify when we modify beta_0.
+template<typename CMap, typename T>
+struct Group_attribute_functor_of_dart_run<CMap,1,0,T>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// ************************************************************************
+/// Functor used for link_beta to update the attributes of
+/// adart2 on the attributes of this dart, except for j-attributes.
+///    (j is the dimension of the beta modified between adart1 and adart2,
+///     so that after the modification we will have beta_j(adart1)==adart2)
+/// We define run<i> to allows to use this functor with
+/// Foreach_enabled_attributes.
+///   If you know i at compiling time, use directly
+///   Group_attribute_functor_of_dart_run.
+template<typename CMap, unsigned int j=CMap::dimension+1>
+struct Group_attribute_functor_of_dart
+{
+  template <unsigned int i>
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle adart1,
+                  typename CMap::Dart_handle adart2)
+  {
+    CGAL::internal::Group_attribute_functor_of_dart_run<CMap,i,j>::
+        run(amap,adart1,adart2);
+  }
+};
+// ************************************************************************
+// Functor used to group the two i-attributes of the two i-cells, except
+// the attribute of j
+//    (j is the dimension of the beta modified between adart1 and adart2).
+template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
+         typename T=typename CMap::template Attribute_type<i>::type>
+struct Group_attribute_functor_run
+{
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle adart1,
+                  typename CMap::Dart_handle adart2)
+  {
+    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
+    CGAL_static_assertion( i!=j );
+    CGAL_static_assertion_msg
+        ( CMap::Helper::template Dimension_index<i>::value>=0,
+          "Group_attribute_functor_run<i> but i-attributes are disabled" );
+    typename CMap::template Attribute_handle<i>::type
+        a1=amap->template attribute<i>(adart1);
+    typename CMap::template Attribute_handle<i>::type
+        a2=amap->template attribute<i>(adart2);
+
+    // If the two attributes are equal, nothing to do.
+    if ( a1 == a2 ) return;
+
+    typename CMap::Dart_handle toSet = amap->null_handle;
+
+    // If the attribute associated to adart1 is NULL, set it with
+    // the attribute associated to adart2 (necessarily != NULL)
+    if (a1 == CMap::null_handle)
+    { toSet  = adart1; a1 = a2; }
+    else
+    {
+      toSet = adart2;
+      if (a2 != CMap::null_handle)
+      {
+        CGAL::internal::Call_merge_functor<CMap, i>::run(amap, a1, a2);
+      }
+    }
+    amap->template set_attribute<i>(toSet, a1);
+  }
+};
+// Specialization for i=0 and 2<=j. We update 0-attributes for beta_j j>=2.
+// We need to update both extremities of the edge dh1.
+template<typename CMap, unsigned int j, typename T>
+struct Group_attribute_functor_run<CMap, 0, j, T>
+{
+  static void run( CMap* amap,
+                   typename CMap::Dart_handle dh1,
+                   typename CMap::Dart_handle dh2 )
+  {
+    CGAL_static_assertion_msg
+        ( CMap::Helper::template Dimension_index<0>::value>=0,
+          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
+    CGAL_static_assertion(j!=0 && j!=1);
+
+    typename CMap::template Attribute_handle<0>::type
+        a1=CMap::null_handle, a2=CMap::null_handle;
+    typename CMap::Dart_handle toSet=amap->null_handle;
+    // First extremity
+    typename CMap::Dart_handle od=amap->other_extremity(dh2);
+    if ( od!=amap->null_handle )
+    {
+      a1=amap->template attribute<0>(dh1);
+      a2=amap->template attribute<0>(od);
+      if ( a1!=a2 )
+      {
+        if ( a1==CMap::null_handle )
+        { toSet=dh1; a1=a2; }
+        else
+        {
+          toSet=od;
+          if ( a2!=CMap::null_handle )
+          {
+            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
+          }
+        }
+        amap->template set_attribute<0>(toSet, a1);
+      }
+    }
+    // Second extremity
+    od = amap->other_extremity(dh1);
+    if ( od!=amap->null_handle )
+    {
+      a1=amap->template attribute<0>(od);
+      a2=amap->template attribute<0>(dh2);
+      if ( a1!=a2 )
+      {
+        if ( a1==CMap::null_handle )
+        { toSet=od; a1=a2; }
+        else
+        {
+          toSet=dh2;
+          if ( a2!=CMap::null_handle )
+          {
+            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
+          }
+        }
+        amap->template set_attribute<0>(toSet, a1);
+      }
+    }
+  }
+};
+// Specialization for i=0 and j=0. We update 0-attributes for beta_0.
+// We need to update the first extremity of the edge dh1.
+template<typename CMap, typename T>
+struct Group_attribute_functor_run<CMap, 0, 0, T>
+{
+  static void run( CMap* amap,
+                   typename CMap::Dart_handle dh1,
+                   typename CMap::Dart_handle dh2 )
+  {
+    CGAL_static_assertion_msg
+        ( CMap::Helper::template Dimension_index<0>::value>=0,
+          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
+    typename CMap::Dart_handle od=amap->other_extremity(dh2);
+    if ( od!=amap->null_handle )
+    {
+      typename CMap::Dart_handle toSet=amap->null_handle;
+      typename CMap::template Attribute_handle<0>::type
+          a1=amap->template attribute<0>(dh1);
+      typename CMap::template Attribute_handle<0>::type
+          a2=amap->template attribute<0>(od);
+      if ( a1!=a2 )
+      {
+        if ( a1==CMap::null_handle )
+        { toSet=dh1; a1=a2; }
+        else
+        {
+          toSet=od;
+          if ( a2!=CMap::null_handle )
+          {
+            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
+          }
+        }
+        amap->template set_attribute<0>(toSet, a1);
+      }
+    }
+  }
+};
+// Specialization for i=0 and j=1. We update 0-attributes for beta_1.
+// We need to update the second extremity of the edge dh1.
+template<typename CMap, typename T>
+struct Group_attribute_functor_run<CMap, 0, 1, T>
+{
+  static void run( CMap* amap,
+                   typename CMap::Dart_handle dh1,
+                   typename CMap::Dart_handle dh2 )
+  {
+    CGAL_static_assertion_msg
+        ( CMap::Helper::template Dimension_index<0>::value>=0,
+          "Group_attribute_functor_run<0> but 0-attributes are disabled" );
+    typename CMap::Dart_handle od =amap->other_extremity(dh1);
+    if ( od!=amap->null_handle )
+    {
+      typename CMap::Dart_handle toSet=amap->null_handle;
+      typename CMap::template Attribute_handle<0>::type
+          a1=amap->template attribute<0>(od);
+      typename CMap::template Attribute_handle<0>::type
+          a2=amap->template attribute<0>(dh2);
+      if ( a1!=a2 )
+      {
+        if ( a1==CMap::null_handle )
+        { toSet=od; a1=a2; }
+        else
+        {
+          toSet=dh2;
+          if ( a2!=CMap::null_handle )
+          {
+            CGAL::internal::Call_merge_functor<CMap, 0>::run(amap, a1, a2);
+          }
+        }
+        amap->template set_attribute<0>(toSet, a1);
+      }
+    }
+  }
+};
+// Specialization for void attributes.
+template<typename CMap, unsigned int i, unsigned int j>
+struct Group_attribute_functor_run<CMap, i, j, CGAL::Void>
+{
+  static void run( CMap*,
+                   typename CMap::Dart_handle,
+                   typename CMap::Dart_handle )
+  {}
+};
+// Specialization for i=j. Do nothing as j is the dimension to not consider.
+template<typename CMap, unsigned int i, typename T>
+struct Group_attribute_functor_run<CMap,i,i,T>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// Specialization for i=1 and j=0. Do nothing as edges attributes are not
+// modify when we modify beta_0.
+template<typename CMap, typename T>
+struct Group_attribute_functor_run<CMap,1,0,T>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// ************************************************************************
+/// Functor used for sew to update the attributes of
+/// adart2 on the attributes of this dart, except for j-attributes.
+///    (j is the dimension of the beta modified between adart1 and adart2,
+///     so that after the modification we will have beta_j(adart1)==adart2)
+/// We define run<i> to allows to use this functor with
+/// Foreach_enabled_attributes.
+///   If you know i at compiling time, use directly
+///   Group_attribute_functor_run.
+template<typename CMap, unsigned int j=CMap::dimension+1>
+struct Group_attribute_functor
+{
+  template <unsigned int i>
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle adart1,
+                  typename CMap::Dart_handle adart2)
+  { CGAL::internal::Group_attribute_functor_run<CMap,i,j>::
+        run(amap,adart1,adart2); }
+};
+// ************************************************************************
+// Functor used to degroup one i-attribute of one i-cell in two, except the
+// attribute of j.
+template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
+         typename T=typename CMap::template Attribute_type<i>::type>
+struct Degroup_attribute_functor_run
+{
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle adart1,
+                  typename CMap::Dart_handle adart2)
+  {
+    CGAL_static_assertion( i<=CMap::dimension );
+    CGAL_static_assertion( i!=j );
+    CGAL_static_assertion_msg
+        ( CMap::Helper::template Dimension_index<i>::value>=0,
+          "Degroup_attribute_functor_run<i> but i-attributes are disabled" );
+
+    typename CMap::template Attribute_handle<i>::type
+        a1=amap->template attribute<i>(adart1);
+
+    // If there is no first attribute, nothing to degroup.
+    if ( a1==CMap::null_handle ) return;
+
+    // If the second attribute is non null and already different from a1,
+    // nothing to do.
+    if ( a1!=amap->template attribute<i>(adart2) &&
+         amap->template attribute<i>(adart2)!=CMap::null_handle ) return;
+
+    CGAL_assertion( (!CGAL::belong_to_same_cell<CMap,i>
+                     (*amap, adart1, adart2)) );
+
+    // As we split, we set the dart of the first attribute to adart1 for which
+    // we are sure it belongs to the first i-cell.
+    amap->template get_attribute<i>(a1).set_dart(adart1);
+
+    typename CMap::template Attribute_handle<i>::type
+      a2 = amap->template
+      create_attribute<i>(amap->template get_attribute<i>(a1));
+
+    amap->template set_attribute<i>(adart2, a2);
+    CGAL::internal::Call_split_functor<CMap, i>::run(amap, a1, a2);
+  }
+};
+// Specialization for void attributes.
+template<typename CMap, unsigned int i, unsigned int j>
+struct Degroup_attribute_functor_run<CMap, i, j, CGAL::Void>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// Specialization for i==j.
+template<typename CMap, unsigned int i, typename T>
+struct Degroup_attribute_functor_run<CMap, i, i, T>
+{
+  static void run(CMap*,
+                  typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// ************************************************************************
+// Function used by Test_split_attribute_functor_run to process one dart.
+// Test the split of the i-cell containing the given dart adart.
+// When we process a dart, we search in the Unique_hash_map if its
+// i-attribute was already found. If yes, it means that we already
+// found an i-cell with this attribute, thus this attribute is split.
+// We mark (with mark) all the darts of the i-cell containing adart to
+// process them exactly once.
+template<typename CMap, unsigned int i>
+void test_split_attribute_functor_one_dart
+( CMap* amap, typename CMap::Dart_handle adart,
+  CGAL::Unique_hash_map<typename CMap::template Attribute_handle<i>::type,
+                        unsigned int, typename CMap::Hash_function> &
+  found_attributes, typename CMap::size_type mark )
+{
+  CGAL_assertion( amap!=NULL );
+  CGAL_static_assertion_msg(CMap::Helper::template
+                            Dimension_index<i>::value>=0,
+                            "Test_split_attribute_functor_one_dart<i> but "
+                            "i-attributes are disabled");
+
+  typedef typename CMap::template Attribute_handle<i>::type
+      Attribute_handle_i;
+
+  // If the current dart has no attribute, or if it is aldready marked,
+  // nothing to do.
+  if ( amap->template attribute<i>(adart)==CMap::null_handle ||
+       amap->is_marked(adart, mark) )
+    return;
+
+  Attribute_handle_i a1 = amap->template attribute<i>(adart);
+  if ( found_attributes.is_defined(a1) )
+  {  // Here the attribute was already present in the hash_map
+    Attribute_handle_i a2 = amap->template
+      create_attribute<i>(amap->template get_attribute<i>(a1));
+
+    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap, i>
+          itj(*amap, adart, mark); itj.cont(); ++itj )
+    {
+      amap->template set_dart_attribute<i>(itj, a2);
+      amap->mark(itj, mark);
+    }
+    CGAL::internal::Call_split_functor<CMap, i>::run(amap, a1, a2);
+  }
+  else
+  {
+    // Here the attribute was not in the hash_map.
+    found_attributes[a1]=1;
+    amap->template set_dart_of_attribute<i>(a1, adart);
+
+    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap, i>
+          itj(*amap, adart, mark); itj.cont(); ++itj )
+    {
+      CGAL_assertion( amap->template attribute<i>(itj)==a1 );
+      amap->mark(itj, mark);
+    }
+  }
+}
+// ************************************************************************
+/// Functor used for unsew to test if i-attributes are split after an
+/// operation, except for j-attributes.
+///   (j is the dimension of the beta modified for darts in modified_darts,
+///    if j==0 modified_darts2 are the darts modified for beta_1).
+template<typename CMap, unsigned int i, unsigned int j=CMap::dimension+1,
+         typename T=typename CMap::template Attribute_type<i>::type>
+struct Test_split_attribute_functor_run
+{
+  // modified_darts is the set of modified darts for beta_j
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
+    CGAL_assertion( i!=j );
+    CGAL_assertion( amap!=NULL );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<i>::value>=0,
+                              "Test_split_attribute_functor_run<i> but "
+                              "i-attributes are disabled");
+
+    typedef typename CMap::template Attribute_handle<i>::type
+        Attribute_handle_i;
+
+    CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
+                          typename CMap::Hash_function> found_attributes;
+
+    typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it=modified_darts.begin();
+    for ( ; it!=modified_darts.end(); ++it )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
+          (amap, *it, found_attributes, mark);
+    }
+
+    // Now we unmark all the marked darts.
+    amap->negate_mark(mark);
+    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it, mark_modified_darts);
+
+      if ( !amap->is_marked(*it, mark) )
+        CGAL::mark_cell<CMap, i>(*amap, *it, mark);
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+  }
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts2,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL_static_assertion( 1<=i && i<=CMap::dimension );
+    CGAL_assertion( i!=j );
+    CGAL_assertion( amap!=NULL );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<i>::value>=0,
+                              "Test_split_attribute_functor_run<i> but "
+                              "i-attributes are disabled");
+
+    typedef typename CMap::template Attribute_handle<i>::type
+        Attribute_handle_i;
+
+    CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
+                          typename CMap::Hash_function> found_attributes;
+
+    typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it=modified_darts.begin();
+    for ( ; it!=modified_darts.end(); ++it )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
+          (amap, *it, found_attributes, mark);
+    }
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it2=modified_darts2.begin();
+    for ( ; it2!=modified_darts2.end(); ++it2 )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,i>
+          (amap, *it2, found_attributes, mark);
+    }
+
+    // Now we unmark all the marked darts.
+    amap->negate_mark(mark);
+    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it, mark_modified_darts);
+
+      if ( !amap->is_marked(*it, mark) )
+        CGAL::mark_cell<CMap, i>(*amap, *it, mark);
+    }
+    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it2, mark_modified_darts);
+
+      if ( !amap->is_marked(*it2, mark) )
+        CGAL::mark_cell<CMap, i>(*amap, *it2, mark);
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+  }
+};
+// Specialization for i=0 and 2<=j.
+template<typename CMap, unsigned int j, typename T>
+struct Test_split_attribute_functor_run<CMap, 0, j, T>
+{
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL_assertion( j!=0 && j!=1 );
+    CGAL_assertion( amap!=NULL );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Test_split_attribute_functor_run<0> but "
+                              "0-attributes are disabled");
+
+    typedef typename CMap::template Attribute_handle<0>::type
+        Attribute_handle_0;
+
+    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
+                          typename CMap::Hash_function> found_attributes;
+    typename CMap::Dart_handle od=amap->null_handle;
+
+    typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it=modified_darts.begin();
+    for ( ; it!=modified_darts.end(); ++it )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+          (amap, *it, found_attributes, mark);
+
+      od=amap->other_extremity(*it);
+      if ( od!=amap->null_handle )
+        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+            (amap, od, found_attributes, mark);
+    }
+
+    // Now we unmark all the marked darts.
+    amap->negate_mark(mark);
+    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it, mark_modified_darts);
+
+      if ( !amap->is_marked(*it, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
+
+      od=amap->other_extremity(*it);
+      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+  }
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts2,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL_assertion( j!=0 && j!=1 );
+    CGAL_assertion( amap!=NULL );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Test_split_attribute_functor_run<0> but "
+                              "0-attributes are disabled");
+
+    typedef typename CMap::template Attribute_handle<0>::type
+        Attribute_handle_0;
+
+    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
+                          typename CMap::Hash_function> found_attributes;
+    typename CMap::Dart_handle od=amap->null_handle;
+
+    typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it=modified_darts.begin();
+    for ( ; it!=modified_darts.end(); ++it )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+          (amap, *it, found_attributes, mark);
+
+      od=amap->other_extremity(*it);
+      if ( od!=amap->null_handle )
+        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+            (amap, od, found_attributes, mark);
+    }
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it2=modified_darts2.begin();
+    for ( ; it2!=modified_darts2.end(); ++it2 )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+          (amap, *it2, found_attributes, mark);
+
+      od=amap->other_extremity(*it2);
+      if ( od!=amap->null_handle )
+        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+            (amap, od, found_attributes, mark);
+    }
+
+    // Now we unmark all the marked darts.
+    amap->negate_mark(mark);
+    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it, mark_modified_darts);
+
+      if ( !amap->is_marked(*it, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
+
+      od=amap->other_extremity(*it);
+      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
+    }
+    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it2, mark_modified_darts);
+
+      if ( !amap->is_marked(*it2, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, *it2, mark);
+
+      od=amap->other_extremity(*it2);
+      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+  }
+};
+// Specialization for i=0 and j=0.
+// For j==0 or j==1, we use only the version with two list of darts,
+// modified_darts are darts modified for beta0, and
+// modified_darts2 are darts modified for beta1.
+template<typename CMap, typename T>
+struct Test_split_attribute_functor_run<CMap, 0, 0, T>
+{
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   typename CMap::size_type =CMap::INVALID_MARK)
+  { CGAL_assertion(false); }
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts2,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL_assertion( amap!=NULL );
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<0>::value>=0,
+                              "Test_split_attribute_functor_run<0> but "
+                              "0-attributes are disabled");
+
+    typedef typename CMap::template Attribute_handle<0>::type
+        Attribute_handle_0;
+
+    CGAL::Unique_hash_map<Attribute_handle_0, unsigned int,
+                          typename CMap::Hash_function> found_attributes;
+    typename CMap::Dart_handle od=amap->null_handle;
+
+    typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it=modified_darts.begin();
+    for ( ; it!=modified_darts.end(); ++it )
+    {
+      CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+          (amap, *it, found_attributes, mark);
+    }
+    typename std::deque<typename CMap::Dart_handle>::const_iterator
+        it2=modified_darts2.begin();
+    for ( ; it2!=modified_darts2.end(); ++it2 )
+    {
+      od=amap->other_extremity(*it2);
+      if ( od!=amap->null_handle )
+        CGAL::internal::test_split_attribute_functor_one_dart<CMap,0>
+            (amap, od, found_attributes, mark);
+    }
+
+    // Now we unmark all the marked darts.
+    amap->negate_mark(mark);
+    for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it, mark_modified_darts);
+
+      if ( !amap->is_marked(*it, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, *it, mark);
+    }
+    for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
+    {
+      if ( mark_modified_darts!=CMap::INVALID_MARK )
+        amap->unmark(*it2, mark_modified_darts);
+
+      od=amap->other_extremity(*it2);
+      if ( od!=amap->null_handle && !amap->is_marked(od, mark) )
+        CGAL::mark_cell<CMap, 0>(*amap, od, mark);
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(mark) );
+    amap->free_mark(mark);
+  }
+};
+// Specialization for i=0 and j=1.
+// Equivalent to i=0 and j=0.
+template<typename CMap, typename T>
+struct Test_split_attribute_functor_run<CMap, 0, 1, T>
+{
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   typename CMap::size_type =CMap::INVALID_MARK)
+  { CGAL_assertion(false); }
+  static void run( CMap* amap, const std::deque<typename CMap::Dart_handle>&
+                   modified_darts,
+                   const std::deque<typename CMap::Dart_handle>&
+                   modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  { CGAL::internal::Test_split_attribute_functor_run<CMap, 0, 0, T>::
+        run(amap, modified_darts, modified_darts2, mark_modified_darts); }
+};
+// Specialization for void attributes.
+template<typename CMap, unsigned int i, unsigned int j>
+struct Test_split_attribute_functor_run<CMap, i, j, CGAL::Void>
+{
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+};
+// Specialization for i=j.
+template<typename CMap, unsigned int i, typename T>
+struct Test_split_attribute_functor_run<CMap, i, i, T>
+{
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+};
+// Specialization for i=1 and j=0 (edge attributes are not modified
+// when we modify beta_0).
+template<typename CMap, typename T>
+struct Test_split_attribute_functor_run<CMap, 1, 0, T>
+{
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+  static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
+                   const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::INVALID_MARK)
+  {}
+};
+// ************************************************************************
+/// Functor used for unsew to test if i-attributes are split after an
+/// operation, except for j-attributes.
+/// We define run<i> to allows to use this functor with
+/// Foreach_enabled_attributes.
+template<typename CMap, unsigned int j=CMap::dimension+1>
+struct Test_split_attribute_functor
+{
+  // Test the split of i-attributes, for all modified darts given in
+  // modified_darts, and marked with mark_modified_darts.
+  // For each split attribute, create a new i-attribute, associate
+  // it with the new i-cell and call onsplit functors.
+  template <unsigned int i>
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
+        run(amap, modified_darts, mark_modified_darts);
+  }
+  template <unsigned int i>
+  static void run( CMap* amap,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts,
+                   const std::deque<typename CMap::Dart_handle>
+                   &modified_darts2,
+                   typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
+  {
+    CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
+        run(amap, modified_darts, modified_darts2, mark_modified_darts);
+  }
+};
+// ************************************************************************
+} // namespace internal
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_GROUP_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_internal_functors.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_internal_functors.h
new file mode 100644
index 0000000..a399f0e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_internal_functors.h
@@ -0,0 +1,927 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
+#define CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
+
+#include <CGAL/Dart_const_iterators.h>
+#include <CGAL/Combinatorial_map_basic_operations.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Kernel_traits.h>
+#include <vector>
+
+/* Definition of functors used internally to manage attributes (we need
+ * functors as attributes are stored in tuple, thus all the access must be
+ * done at compiling time). Some of these functors are used with
+ * Foreach_enabled_attributes to iterate through all the non void attribs.
+ * Functors allowing to group/ungroup attributes are defined in
+ * internal/Combinatorial_map_group_functors.h. Public functions are defined
+ * in Combinatorial_map_functors.h.
+ *
+ * internal::Call_split_functor<CMap,i> to call the OnSplit functors on two
+ *    given i-attributes.
+ *
+ * internal::Call_merge_functor<CMap,i> to call the OnMerge functors on two
+ *    given i-attributes.
+ *
+ * internal::Test_is_valid_attribute_functor<CMap> to test if a given i-cell is
+ *    valid (all its darts are linked to the same attribute, no other dart is
+ *    linked with this attribute).
+ *
+ * internal::Count_cell_functor<CMap> to count the nuber of i-cells.
+ *
+ * internal::Count_bytes_one_attribute_functor<CMap> to count the memory
+ *    occupied by i-attributes.
+ *
+ * internal::Decrease_attribute_functor<CMap> to decrease by one the ref
+ *    counting of a given i-attribute.
+ *
+ * internal::Beta_functor<Dart, i...> to call several beta on the given dart.
+ *   Indices are given as parameter of the run function.
+ *
+ * internal::Beta_functor_static<Dart, i...> to call several beta on the given
+ *   dart. Indices are given as template arguments.
+ *
+ * internal::Set_i_attribute_of_dart_functor<CMap, i> to set the i-attribute
+ *   of a given dart.
+ *
+ * internal::Test_is_same_attribute_functor<Map1, Map2> to test if two
+ *   i-attributes of two darts are isomorphic.
+ *
+ * internal::Reverse_orientation_of_map_functor<CMap> to reverse the
+ *   orientation of a whole combinatorial map
+ *
+ * internal::Reverse_orientation_of_connected_component_functor to reverse
+ *   the orientation of a connected component in a cmap
+ *
+ * internal::Init_attribute_functor to initialize all attributes to NULL.
+ *
+ */
+
+namespace CGAL
+{
+//-----------------------------------------------------------------------------
+template<typename Attr>
+struct Is_attribute_has_non_void_info;
+template<typename Attr>
+struct Is_attribute_has_point;
+// ****************************************************************************
+namespace internal
+{
+// ****************************************************************************
+// Functor which call Functor::operator() on the two given cell_attributes
+ template<typename CMap, typename Cell_attribute, typename Functor>
+struct Apply_cell_functor
+{
+  static void run(Cell_attribute& acell1, Cell_attribute& acell2)
+  {
+    Functor() (acell1, acell2);
+  }
+};
+//...except for Null_functor.
+template<typename CMap, typename Cell_attribute>
+struct Apply_cell_functor<CMap, Cell_attribute, CGAL::Null_functor>
+{
+  static void run(Cell_attribute&, Cell_attribute&)
+  {}
+};
+// ****************************************************************************
+// Functor used to call the On_split functor between the two given darts.
+template<typename CMap, unsigned int i,
+         typename Enabled=typename CMap::
+       #ifndef CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG
+         template
+       #endif
+         Attribute_type<i>::type>
+struct Call_split_functor
+{
+  typedef typename CMap::template Attribute_type<i>::type Attribute;
+  typedef typename Attribute::On_split On_split;
+
+  static void
+  run(CMap* amap, typename CMap::template Attribute_handle<i>::type a1,
+      typename CMap::template Attribute_handle<i>::type a2)
+  {
+    // Static version
+    CGAL::internal::Apply_cell_functor<CMap, Attribute, On_split>::
+      run(amap->template get_attribute<i>(a1),
+          amap->template get_attribute<i>(a2));
+    // Dynamic version
+    if ( CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
+         (amap->m_onsplit_functors) )
+      CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
+        (amap->m_onsplit_functors) (amap->template get_attribute<i>(a1),
+                                    amap->template get_attribute<i>(a2));
+  }
+};
+// Specialization for disabled attributes.
+template<typename CMap,unsigned int i>
+struct Call_split_functor<CMap, i, CGAL::Void>
+{
+  static void run(typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// ****************************************************************************
+// Functor used to call the On_merge functor between the two given darts.
+template<typename CMap,unsigned int i,
+         typename Enabled=typename CMap::
+       #ifndef CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG
+         template
+       #endif
+         Attribute_type<i>::type>
+struct Call_merge_functor
+{
+  typedef typename CMap::template Attribute_type<i>::type Attribute;
+  typedef typename Attribute::On_merge On_merge;
+
+  static void
+  run(CMap* amap, typename CMap::template Attribute_handle<i>::type a1,
+      typename CMap::template Attribute_handle<i>::type a2)
+  {
+    // Static version
+    CGAL::internal::Apply_cell_functor<CMap, Attribute, On_merge>::
+      run(amap->template get_attribute<i>(a1),
+          amap->template get_attribute<i>(a2));
+    // Dynamic version
+    if ( CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
+         (amap->m_onmerge_functors) )
+      CGAL::cpp11::get<CMap::Helper::template Dimension_index<i>::value>
+        (amap->m_onmerge_functors) (amap->template get_attribute<i>(a1),
+                                    amap->template get_attribute<i>(a2));
+  }
+};
+// Specialization for disabled attributes.
+template<typename CMap,unsigned int i>
+struct Call_merge_functor<CMap, i, CGAL::Void>
+{
+  static void run(CMap*, typename CMap::Dart_handle,
+                  typename CMap::Dart_handle)
+  {}
+};
+// ****************************************************************************
+/// Functor used to test if a cell is valid
+template<typename CMap>
+struct Test_is_valid_attribute_functor
+{
+  /** Test the validity of a i-cell-attribute.
+   * ie all the darts belonging to a i-cell are linked to the same attribute.
+   * @param adart a dart.
+   * @param amark a mark used to mark darts of the i-cell.
+   * @return true iff all the darts of the i-cell link to the same attribute.
+   */
+  typedef typename CMap::size_type size_type;
+
+  template <unsigned int i>
+  static void run(const CMap* amap,
+                  typename CMap::Dart_const_handle adart,
+                  std::vector<size_type>* marks, bool *ares)
+  {
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<i>::value>=0,
+                              "Test_is_valid_attribute_functor<i> but "
+                              " i-attributes are disabled");
+
+    size_type amark = (*marks)[i];
+    if ( amap->is_marked(adart, amark) ) return; // dart already test.
+
+    bool valid = true;
+    bool found_dart = false;
+
+    typename CMap::template Attribute_const_handle<i>::type
+        a=amap->template attribute<i>(adart);
+
+    unsigned int nb = 0;
+    for ( typename
+            CMap::template Dart_of_cell_basic_const_range<i>::const_iterator
+            it=amap->template darts_of_cell_basic<i>(adart, amark).begin();
+          it.cont(); ++it )
+    {
+      if ( amap->template attribute<i>(it) != a )
+      {
+        std::cout<<"ERROR: an attribute of the "<<i<<"-cell is different. cur:";
+        amap->template display_attribute<i>(a);
+        std::cout<<" != first:";
+        amap->template display_attribute<i>(amap->template attribute<i>(it));
+        std::cout<<" for dart ";
+        amap->display_dart(it);
+        std::cout<<std::endl;
+        valid=false;
+      }
+
+      if ( a!=amap->null_handle && it==amap->template dart_of_attribute<i>(a) )
+        found_dart=true;
+
+      amap->mark(it, amark);
+      ++nb;
+    }
+
+    if ( a!=amap->null_handle )
+    {
+      if ( amap->template get_attribute<i>(a).get_nb_refs()!=nb )
+      {
+        std::cout<<"ERROR: the number of reference of an "<<i
+                <<"-attribute is not correct. Count: "<<nb
+               <<" != Store in the attribute: "
+              <<amap->template get_attribute<i>(a).get_nb_refs()
+             <<" for dart ";
+        amap->display_dart(adart); std::cout<<std::endl;
+        valid=false;
+      }
+      if ( !amap->template get_attribute<i>(a).is_valid() )
+      {
+        std::cout<<"ERROR: the dart associated with an "<<i
+                <<"-attribute is NULL for dart ";
+        amap->display_dart(adart); std::cout<<std::endl;
+        valid=false;
+      }
+      if ( amap->template dart_of_attribute<i>(a)!=amap->null_handle &&
+           !found_dart )
+      {
+        std::cout<<"ERROR: the non NULL dart of an "<<i
+                <<"-attribute does not belong to the cell."<<std::endl;
+        valid=false;
+      }
+    }
+
+    if ( !valid ) (*ares)=false;
+  }
+};
+// ****************************************************************************
+/// Functor used to correct invalid attributes in an i-cell
+template<typename CMap>
+struct Correct_invalid_attributes_functor
+{
+  typedef typename CMap::size_type size_type;
+
+  template <unsigned int i>
+  static void run(CMap* amap,
+                  typename CMap::Dart_handle adart,
+                  std::vector<size_type>* marks)
+  {
+    // std::cout << "Correct_invalid_attributes_functor for " << i << "-cell" << std::endl;
+    CGAL_static_assertion_msg(CMap::Helper::template
+                              Dimension_index<i>::value>=0,
+                              "Correct_invalid_attributes_functor<i> but "
+                              " i-attributes are disabled");
+
+    size_type amark = (*marks)[i];
+    typename CMap::template Attribute_handle<i>::type
+        a=amap->template attribute<i>(adart);
+
+    // dart already test, or without i-attribute
+    if ( amap->is_marked(adart, amark) ) return;
+    if ( a==amap->null_handle) { amap->mark(adart, amark); return; }
+
+    // We search if all the darts of the i-cell has the same i-attrib, and we count
+    // the number of darts of the i-cell.
+    unsigned int nb=0;
+    bool found_dart = false;
+
+    for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,i>
+            it(*amap, adart, amark); it.cont(); ++it, ++nb )
+    {
+      if ( a!=amap->template attribute<i>(it) )
+      {
+        // If two different i-attributes, we could call on_split ?
+        amap->template set_dart_attribute<i>(it, a);
+      }
+      if (it==amap->template dart_of_attribute<i>(a))
+      {
+        found_dart = true;
+      }
+      amap->mark(it, amark);
+    }
+
+    if (!found_dart)
+    {
+      // the current i-attrib does not belong to the i-cell
+      // so we affect it to the first dart of the i-cell
+      amap->template set_dart_of_attribute<i>(a,adart);
+    }
+
+    // If the i-cell has less darts than the ref counter of the i-attribute,
+    // the i-attribute is shared by different cells => we duplicate it.
+    if ( nb!=amap->template get_attribute<i>(a).get_nb_refs() )
+    {
+      typename CMap::template Attribute_handle<i>::type
+        a2=amap->template create_attribute<i>(amap->template get_attribute<i>(a));
+      amap->template set_attribute<i>(adart, a2);
+    }
+  }
+};
+// ****************************************************************************
+/// Functor for counting i-cell
+template<typename CMap>
+struct Count_cell_functor
+{
+  typedef typename CMap::size_type size_type;
+
+  template <unsigned int i>
+  static void run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart,
+                   std::vector<size_type>* amarks,
+                   std::vector<unsigned int>* ares )
+  {
+    if ( (*amarks)[i]!=CMap::INVALID_MARK && !amap->is_marked(adart, (*amarks)[i]) )
+    {
+      ++ (*ares)[i];
+      CGAL::mark_cell<CMap,i>(*amap, adart, (*amarks)[i]);
+    }
+  }
+};
+// ****************************************************************************
+/// Functor for counting the memory occupation of attributes
+/// Be careful not reentrant !!! TODO a  Foreach_enabled_attributes
+/// taking an instance of a functor as argument allowing to compute
+/// and return values.
+template<typename CMap>
+struct Count_bytes_one_attribute_functor
+{
+  template <unsigned int i>
+  static void run( const CMap* amap )
+  {
+    res += amap->template attributes<i>().capacity()*
+      sizeof(typename CMap::template Attribute_type<i>::type);
+  }
+
+  static typename CMap::size_type res;
+};
+template<typename CMap>
+typename CMap::size_type Count_bytes_one_attribute_functor<CMap>::res = 0;
+
+template<typename CMap>
+struct Count_bytes_all_attributes_functor
+{
+  static typename CMap::size_type run( const CMap& amap )
+  {
+    CGAL::internal::Count_bytes_one_attribute_functor<CMap>::res = 0;
+    CMap::Helper::template Foreach_enabled_attributes
+      <CGAL::internal::Count_bytes_one_attribute_functor<CMap> >::run(&amap);
+    return CGAL::internal::Count_bytes_one_attribute_functor<CMap>::res;
+  }
+};
+// ****************************************************************************
+/// Decrease the cell attribute reference counting of the given dart.
+/// The attribute is removed if there is no more darts linked with it.
+template<typename CMap, unsigned int i, typename T=
+         typename CMap::template Attribute_type<i>::type>
+struct Decrease_attribute_functor_run
+{
+  static void run(CMap* amap, typename CMap::Dart_handle adart)
+  {
+    if ( amap->template attribute<i>(adart)!=CMap::null_handle )
+    {
+      amap->template get_attribute<i>(amap->template attribute<i>(adart)).
+        dec_nb_refs();
+      if ( amap->template get_attribute<i>(amap->template attribute<i>(adart)).
+           get_nb_refs()==0 )
+        amap->template erase_attribute<i>(amap->template attribute<i>(adart));
+    }
+  }
+};
+/// Specialization for void attributes.
+template<typename CMap, unsigned int i>
+struct Decrease_attribute_functor_run<CMap, i, CGAL::Void>
+{
+  static void run(CMap*, typename CMap::Dart_handle)
+  {}
+};
+// ****************************************************************************
+/// Functor used to call decrease_attribute_ref_counting<i>
+/// on each i-cell attribute enabled
+template<typename CMap>
+struct Decrease_attribute_functor
+{
+  template <unsigned int i>
+  static void run(CMap* amap, typename CMap::Dart_handle adart)
+  { CGAL::internal::Decrease_attribute_functor_run<CMap,i>::run(amap, adart); }
+};
+// ****************************************************************************
+/// Functor used to initialize all attributes to NULL.
+template<typename CMap>
+struct Init_attribute_functor
+{
+  template <int i>
+  static void run(CMap* amap, typename CMap::Dart_handle adart)
+  { amap->template set_dart_attribute<i>(adart, CMap::null_handle); }
+};
+// ****************************************************************************
+/// Functor used to set the i-attribute of a given dart.
+template<typename CMap, unsigned int i, typename T=
+         typename CMap::template Attribute_type<i>::type>
+struct Set_i_attribute_of_dart_functor
+{
+  static void run( CMap* amap, typename CMap::Dart_handle dh,
+                   typename CMap::template Attribute_handle<i>::type ah )
+  {
+    amap->template set_dart_attribute<i>(dh, ah);
+  }
+};
+/// Specialization for void attributes.
+template<typename CMap, unsigned int i>
+struct Set_i_attribute_of_dart_functor<CMap, i, CGAL::Void>
+{
+  static void run( CMap*, typename CMap::Dart_handle,
+                   typename CMap::template Attribute_handle<i>::type)
+  {}
+};
+// ****************************************************************************
+// Functor allowing to test if two info are the same or not
+template<typename Map1, typename Map2, unsigned int i,
+         typename Attr1Info1=typename Map1::template Attribute_type<i>::type::Info,
+         typename Info2=typename Map2::template Attribute_type<i>::type::Info>
+struct Is_same_info
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::template Attribute_const_handle<i>::type,
+                  typename Map2::template Attribute_const_handle<i>::type)
+  { return false; }
+};
+
+template<typename Map1, typename Map2, unsigned int i, typename Info1>
+struct Is_same_info<Map1, Map2, i, Info1, void>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::template Attribute_const_handle<i>::type,
+                  typename Map2::template Attribute_const_handle<i>::type)
+  { return false; }
+};
+
+template<typename Map1, typename Map2, unsigned int i, typename Info2>
+struct Is_same_info<Map1, Map2, i, void, Info2>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::template Attribute_const_handle<i>::type,
+                  typename Map2::template Attribute_const_handle<i>::type)
+  { return false; }
+};
+
+template<typename Map1, typename Map2, unsigned int i>
+struct Is_same_info<Map1, Map2, i, void, void>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::template Attribute_const_handle<i>::type,
+                  typename Map2::template Attribute_const_handle<i>::type)
+  { return true; }
+};
+
+template<typename Map1, typename Map2, unsigned int i, typename Info>
+struct Is_same_info<Map1, Map2, i, Info, Info>
+{
+  static bool run(const Map1* m1, const Map2* m2,
+                  typename Map1::template Attribute_const_handle<i>::type a1,
+                  typename Map2::template Attribute_const_handle<i>::type a2)
+  { return m1->template info_of_attribute<i>(a1)==
+      m2->template info_of_attribute<i>(a2); }
+};
+
+// Case of two non void type
+template<typename Map1, typename Map2, unsigned int i,
+         typename T1=typename Map1::template Attribute_type<i>::type,
+         typename T2=typename Map2::template Attribute_type<i>::type>
+struct Is_same_attribute_info_functor
+{
+  static bool run(const Map1* m1, const Map2* m2,
+                  typename Map1::Dart_const_handle dh1,
+                  typename Map2::Dart_const_handle dh2)
+  {
+    if (m1->template attribute<i>(dh1)==Map1::null_handle &&
+        m2->template attribute<i>(dh2)==Map2::null_handle)
+      return true;
+
+    if (m1->template attribute<i>(dh1)==Map1::null_handle ||
+        m2->template attribute<i>(dh2)==Map2::null_handle)
+      return false;
+
+    return
+      Is_same_info<Map1, Map2, i>::run(m1, m2,
+                                       m1->template attribute<i>(dh1),
+                                       m2->template attribute<i>(dh2));
+  }
+};
+
+// Case T1==void
+template <typename Map1, typename Map2, unsigned int i, typename T2>
+struct Is_same_attribute_info_functor<Map1, Map2, i, Void, T2>
+{
+  static bool run(const Map1*, const Map2* m2,
+                  typename Map1::Dart_const_handle,
+                  typename Map2::Dart_const_handle dh2)
+  { return m2->template attribute<i>(dh2)==Map2::null_handle; }
+};
+
+// Case T2==void
+template <typename Map1, typename Map2, unsigned int i, typename T1>
+struct Is_same_attribute_info_functor<Map1, Map2, i, T1, Void>
+{
+  static bool run(const Map1* m1, const Map2*,
+                  typename Map1::Dart_const_handle dh1,
+                  typename Map2::Dart_const_handle)
+  { return m1->template attribute<i>(dh1)==Map1::null_handle; }
+};
+
+// Case T1==T2==void
+template <typename Map1, typename Map2, unsigned int i>
+struct Is_same_attribute_info_functor<Map1, Map2, i, Void, Void>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::Dart_const_handle,
+                  typename Map2::Dart_const_handle)
+  { return true; }
+};
+
+// ****************************************************************************
+// Functor allowing to test if two points are the same or not.
+// Here we know both attributes have points.
+template< typename Attr1, typename Attr2,
+          typename Point1=typename Attr1::Point,
+          typename Point2=typename Attr2::Point,
+          typename T1=typename Ambient_dimension<Point1>::type >
+struct Is_same_point
+{
+  static bool run(const Attr1&, const Attr2&)
+  { return false; }
+};
+
+template< typename Attr1, typename Attr2, typename Point>
+struct Is_same_point<Attr1, Attr2, Point, Point, Dimension_tag<2> >
+{
+  static bool run(const Attr1& a1, const Attr2& a2)
+  { return typename Kernel_traits<Point>::Kernel::Equal_2()
+        (a1.point(),a2.point()); }
+};
+
+template< typename Attr1, typename Attr2, typename Point>
+struct Is_same_point<Attr1, Attr2, Point, Point, Dimension_tag<3> >
+{
+  static bool run(const Attr1& a1, const Attr2& a2)
+  { return typename Kernel_traits<Point>::Kernel::Equal_3()
+        (a1.point(),a2.point()); }
+};
+
+template< typename Attr1, typename Attr2, typename Point>
+struct Is_same_point<Attr1, Attr2, Point, Point, Dynamic_dimension_tag >
+{
+  static bool run(const Attr1& a1, const Attr2& a2)
+  { return typename Kernel_traits<Point>::Kernel::Equal_d()
+        (a1.point(),a2.point()); }
+};
+
+// Case of two non void type, with two points
+template<typename Map1, typename Map2,
+         typename T1, typename T2, bool Withpoint1, bool Withpoint2, int i>
+struct Is_same_attribute_point_functor
+{
+  static bool run(const Map1* m1, const Map2* m2,
+                  typename Map1::Dart_const_handle dh1,
+                  typename Map2::Dart_const_handle dh2)
+  {
+    CGAL_static_assertion( Withpoint1==true && Withpoint2==true );
+    if (m1->template attribute<i>(dh1)==Map1::null_handle &&
+        m2->template attribute<i>(dh2)==Map2::null_handle)
+      return true;
+
+    if (m1->template attribute<i>(dh1)==Map1::null_handle ||
+        m2->template attribute<i>(dh2)==Map2::null_handle)
+      return false;
+
+    return
+      Is_same_point<T1,T2>::run
+      (m1->template get_attribute<i>(m1->template attribute<i>(dh1)),
+       m2->template get_attribute<i>(m2->template attribute<i>(dh2)));
+  }
+};
+
+// Case of two non void type, first without point
+template<typename Map1, typename Map2,
+         typename T1, typename T2, int i>
+struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, false, true, i>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::Dart_const_handle,
+                  typename Map2::Dart_const_handle)
+  { return false; }
+};
+
+// Case of two non void type, second without point
+template<typename Map1, typename Map2,
+         typename T1, typename T2, int i>
+struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, true, false, i>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::Dart_const_handle,
+                  typename Map2::Dart_const_handle)
+  { return false; }
+};
+
+// Case of two non void type, both without point
+template<typename Map1, typename Map2,
+         typename T1, typename T2, int i>
+struct Is_same_attribute_point_functor<Map1, Map2, T1, T2, false, false, i>
+{
+  static bool run(const Map1*, const Map2*,
+                  typename Map1::Dart_const_handle,
+                  typename Map2::Dart_const_handle)
+  { return true; }
+};
+// ****************************************************************************
+/// Test if the two darts are associated with the same attribute.
+template<typename Map1, typename Map2>
+struct Test_is_same_attribute_functor
+{
+  template<unsigned int i>
+  static void run(const Map1* m1, const Map2* m2,
+                  typename Map1::Dart_const_handle dh1,
+                  typename Map2::Dart_const_handle dh2 )
+  {
+    if (value)
+    {
+      value = Is_same_attribute_info_functor
+        <Map1, Map2, i>::run(m1, m2, dh1, dh2);
+    }
+    if (value)
+    {
+      value = Is_same_attribute_point_functor
+          <Map1, Map2,
+          typename Map1::template Attribute_type<i>::type,
+          typename Map2::template Attribute_type<i>::type,
+          Is_attribute_has_point<typename Map1::template
+          Attribute_type<i>::type>::value,
+          Is_attribute_has_point<typename Map2::template
+          Attribute_type<i>::type>::value, i>::run(m1, m2, dh1, dh2);
+    }
+  }
+  static bool value;
+};
+template<typename Map1, typename Map2>
+bool Test_is_same_attribute_functor<Map1, Map2>::value = true;
+// ****************************************************************************
+/// Functor to reverse the orientation of a combinatorial map,
+/// when 0-attributes are non void.
+template <typename CMap, typename Attrib =
+          typename CMap::Helper::template Attribute_type<0>::type>
+struct Reverse_orientation_of_map_functor
+{
+  static void run(CMap *amap)
+  {
+    typename CMap::size_type mark = amap->get_new_mark();
+    CGAL_precondition(amap->is_whole_map_unmarked(mark));
+    CGAL_precondition(amap->is_valid());
+    for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
+           last_dart = amap->darts().end(); current_dart!=last_dart;
+         ++current_dart)
+    {
+      if (amap->is_marked(current_dart, mark)) continue;
+      typename CMap::Dart_handle first_dart_in_cell= current_dart;
+      typename CMap::Dart_handle current_dart_in_cell=
+        amap->beta(first_dart_in_cell,1);
+      typename CMap::Helper::template Attribute_handle<0>::type
+        attribute_for_first_dart=amap->template attribute<0>(current_dart_in_cell);
+      amap->template get_attribute<0>(attribute_for_first_dart).inc_nb_refs();
+      do {
+        amap->mark(current_dart_in_cell, mark);
+        typename CMap::Dart_handle previous_dart_in_cell=
+          amap->beta(current_dart_in_cell,0);
+        typename CMap::Dart_handle next_dart_in_cell=
+          amap->beta(current_dart_in_cell,1);
+        typename CMap::Helper::template Attribute_handle<0>::type
+          next_attribute=amap->template attribute<0>(next_dart_in_cell);
+        // One line error???
+        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+          run(amap, current_dart_in_cell, next_attribute);
+        amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
+        amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
+        current_dart_in_cell = amap->beta(current_dart_in_cell,0);
+      }
+      while (current_dart_in_cell != first_dart_in_cell);
+      amap->mark(current_dart_in_cell, mark);
+      typename CMap::Dart_handle previous_dart_in_cell=
+        amap->beta(current_dart_in_cell,0);
+      typename CMap::Dart_handle next_dart_in_cell=
+        amap->beta(current_dart_in_cell,1);
+      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+        run(amap, current_dart_in_cell, attribute_for_first_dart);
+      amap->template get_attribute<0>(attribute_for_first_dart).dec_nb_refs();
+      amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
+      amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
+    }
+    amap->negate_mark(mark);
+    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
+    CGAL_postcondition(amap->is_valid());
+    amap->free_mark(mark);
+  }
+};
+// ****************************************************************************
+// Specialization for void 0-attributes
+template <typename CMap>
+struct Reverse_orientation_of_map_functor<CMap, CGAL::Void>
+{
+  static void run(CMap *amap)
+  {
+    typename CMap::size_type mark = amap->get_new_mark();
+    CGAL_precondition(amap->is_whole_map_unmarked(mark));
+    CGAL_precondition(amap->is_valid());
+    for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
+         last_dart = amap->darts().end(); current_dart!=last_dart;
+         ++current_dart)
+    {
+      if (amap->is_marked(current_dart, mark)) continue;
+      for (typename CMap::template Dart_of_cell_range<2>::iterator
+             current_dart_in_cell=amap->template darts_of_cell<2>(current_dart).
+             begin(), last_dart_in_cell=amap->template darts_of_cell<2>
+             (current_dart).end(); current_dart_in_cell!=last_dart_in_cell;
+           ++current_dart_in_cell)
+      {
+        amap->mark(current_dart_in_cell, mark);
+        typename CMap::Dart_handle previous_dart_in_cell=
+          current_dart_in_cell->beta(0);
+        typename CMap::Dart_handle next_dart_in_cell=
+          current_dart_in_cell->beta(1);
+        current_dart_in_cell->basic_link_beta(previous_dart_in_cell, 1);
+        current_dart_in_cell->basic_link_beta(next_dart_in_cell, 0);
+      }
+    }
+    amap->negate_mark(mark);
+    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
+    CGAL_postcondition(amap->is_valid());
+    amap->free_mark(mark);
+  }
+};
+// ****************************************************************************
+/// Functor to reverse the orientation of a connected component in a given map
+template <typename CMap, typename Attrib=
+          typename CMap::Helper::template Attribute_type<0>::type>
+struct Reverse_orientation_of_connected_component_functor
+{
+  static void run(CMap *amap, typename CMap::Dart_handle adart)
+  {
+    typename CMap::size_type mark = amap->get_new_mark();
+    CGAL_precondition(amap->is_whole_map_unmarked(mark));
+    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
+           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
+           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
+           (adart).end(); current_dart!=last_dart; ++current_dart)
+    {
+      if (amap->is_marked(current_dart, mark)) continue;
+      typename CMap::Dart_handle first_dart_in_cell=current_dart;
+      typename CMap::Dart_handle current_dart_in_cell=
+        amap->beta(first_dart_in_cell,1);
+      typename CMap::Helper::template Attribute_handle<0>::type
+        attribute_for_first_dart=amap->template attribute<0>(current_dart_in_cell);
+      amap->template get_attribute<0>(attribute_for_first_dart).inc_nb_refs();
+      do {
+        amap->mark(current_dart_in_cell, mark);
+        typename CMap::Dart_handle previous_dart_in_cell=
+          amap->beta(current_dart_in_cell,0);
+        typename CMap::Dart_handle next_dart_in_cell=
+          amap->beta(current_dart_in_cell,1);
+        typename CMap::Helper::template Attribute_handle<0>::type
+          next_attribute=amap->template attribute<0>(next_dart_in_cell);
+
+        CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+          run(amap, current_dart_in_cell, next_attribute);
+        amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
+        amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
+        current_dart_in_cell = amap->beta(current_dart_in_cell,0);
+      }
+      while (current_dart_in_cell != first_dart_in_cell);
+      amap->mark(current_dart_in_cell, mark);
+      typename CMap::Dart_handle previous_dart_in_cell=
+        amap->beta(current_dart_in_cell,0);
+      typename CMap::Dart_handle next_dart_in_cell=
+        amap->beta(current_dart_in_cell,1);
+      CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
+          run(amap, current_dart_in_cell, attribute_for_first_dart);
+      amap->template get_attribute<0>(attribute_for_first_dart).dec_nb_refs();
+      amap->template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell);
+      amap->template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell);
+    }
+    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
+           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
+           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
+           (adart).end(); current_dart!=last_dart; ++current_dart)
+    {
+      amap->unmark(current_dart, mark);
+    }
+    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
+    amap->free_mark(mark);
+  }
+};
+// ****************************************************************************
+// Specialization for void 0-attributes
+template <typename CMap>
+struct Reverse_orientation_of_connected_component_functor<CMap, CGAL::Void>
+{
+  static void run(CMap *amap, typename CMap::Dart_handle adart)
+  {
+    typename CMap::size_type mark = amap->get_new_mark();
+    CGAL_precondition(amap->is_whole_map_unmarked(mark));
+    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
+           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
+           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
+           (adart).end(); current_dart!=last_dart; ++current_dart)
+    {
+      if (amap->is_marked(current_dart, mark)) continue;
+      for (typename CMap::template Dart_of_cell_range<2>::iterator
+             current_dart_in_cell=amap->template darts_of_cell<2>(current_dart).
+             begin(), last_dart_in_cell=amap->template darts_of_cell<2>
+             (current_dart).end(); current_dart_in_cell!=last_dart_in_cell;
+           ++current_dart_in_cell)
+      {
+        amap->mark(current_dart_in_cell, mark);
+        typename CMap::Dart_handle previous_dart_in_cell=
+          current_dart_in_cell->beta(0);
+        typename CMap::Dart_handle next_dart_in_cell=
+          current_dart_in_cell->beta(1);
+        current_dart_in_cell->basic_link_beta(previous_dart_in_cell, 1);
+        current_dart_in_cell->basic_link_beta(next_dart_in_cell, 0);
+      }
+    }
+    for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
+           current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
+           begin(), last_dart=amap->template darts_of_cell<CMap::dimension+1>
+           (adart).end(); current_dart!=last_dart; ++current_dart)
+    {
+      amap->unmark(current_dart, mark);
+    }
+    CGAL_postcondition(amap->is_whole_map_unmarked(mark));
+    amap->free_mark(mark);
+  }
+};
+// ****************************************************************************
+// Beta functor, used to combine several beta.
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+template<typename CMap, typename Dart_handle, typename ... Betas>
+struct Beta_functor;
+
+template<typename CMap, typename Dart_handle>
+struct Beta_functor<CMap, Dart_handle, int>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart, int B)
+  { return AMap->get_beta(ADart, B); }
+};
+
+template<typename CMap, typename Dart_handle>
+struct Beta_functor<CMap, Dart_handle, unsigned int>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart, unsigned int B)
+  { return  AMap->get_beta(ADart, B); }
+};
+
+template<typename CMap, typename Dart_handle, typename ... Betas>
+struct Beta_functor<CMap, Dart_handle, int, Betas...>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart, int B, Betas... betas)
+  { return Beta_functor<CMap, Dart_handle, Betas...>::
+      run(AMap, AMap->get_beta(ADart, B), betas...); }
+};
+
+template<typename CMap, typename Dart_handle, typename ... Betas>
+struct Beta_functor<CMap, Dart_handle, unsigned int, Betas...>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart, unsigned int B,
+                         Betas... betas)
+  { return Beta_functor<CMap, Dart_handle, Betas...>::
+      run(AMap, AMap->get_beta(ADart, B), betas...); }
+};
+// ****************************************************************************
+template<typename CMap, typename Dart_handle, int ... Betas>
+struct Beta_functor_static;
+
+template<typename CMap, typename Dart_handle, int B>
+struct Beta_functor_static<CMap, Dart_handle, B>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart)
+  { return AMap->template get_beta<B>(ADart); }
+};
+
+template<typename CMap, typename Dart_handle, int B, int ... Betas>
+struct Beta_functor_static<CMap, Dart_handle, B, Betas...>
+{
+  static Dart_handle run(CMap* AMap, Dart_handle ADart)
+  { return Beta_functor_static<CMap, Dart_handle, Betas...>::
+        run(AMap, AMap->template get_beta<B>(ADart)); }
+};
+#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+// ****************************************************************************
+} // namespace internal
+} // namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_INTERNAL_FUNCTORS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_sewable.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_sewable.h
new file mode 100644
index 0000000..1201401
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_sewable.h
@@ -0,0 +1,331 @@
+// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Guillaume Damiand <guillaume.damiand at liris.cnrs.fr>
+//
+#ifndef CGAL_COMBINATORIAL_MAP_SEWABLE_H
+#define CGAL_COMBINATORIAL_MAP_SEWABLE_H
+
+#include <CGAL/Dart_const_iterators.h>
+#include <CGAL/Unique_hash_map.h>
+
+/* Definition of functor used to test if two darts are i-sewable
+ * (we use functors as there are different specializations).
+ */
+namespace CGAL
+{
+#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
+namespace internal
+{
+// Generic case for 1<=i<=dimension, and 3<dim.
+template<typename CMap, unsigned int i, unsigned int dim=CMap::dimension>
+struct Is_sewable_functor
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    CGAL_assertion( 1<=i && i<=CMap::dimension );
+    CGAL_assertion( 3<dim );
+    if ( !amap->template is_free<i>(adart1) ||
+         !amap->template is_free<CGAL_BETAINV(i)>(adart2) )
+      return false;
+
+    if ( adart1==adart2 )
+    {
+      if ( i==1 ) return true;
+      return false;
+    }
+
+    // hash map to build the isomorphism between the two i-cells.
+    CGAL::Unique_hash_map<typename CMap::Dart_const_handle,
+        typename CMap::Dart_const_handle,
+        typename CMap::Hash_function> bijection;
+
+    typename CMap::size_type m1 = amap->get_new_mark();
+    typename CMap::size_type m2 = amap->get_new_mark();
+    CGAL::CMap_dart_const_iterator_basic_of_involution<CMap,i>
+        I1(*amap, adart1, m1);
+    CGAL::CMap_dart_const_iterator_basic_of_involution_inv<CMap,i>
+        I2(*amap, adart2, m2);
+    bool res = true;
+    typename CMap::size_type mbijection = amap->get_new_mark();
+
+    while ( res && I1.cont() && I2.cont() )
+    {
+      amap->mark(I1, mbijection);
+      bijection[I1]=I2;
+
+      CGAL_assertion( amap->template is_free<i>(I1) );
+      CGAL_assertion( amap->template is_free<CGAL_BETAINV(i)>(I2) );
+
+      // We can remove this constraint which is not required for
+      // combinatorial map definition, but which is quite "normal"
+      // Indeed in this case we try to i-sew an i-cell with itself (case
+      // of folded cells).
+      if ( i>1 && (I1==adart2 || I2==adart1) ) res=false;
+
+      if ( i>2)
+      {
+        if ( amap->template is_free<1>(I1) )
+        {
+          if ( !amap->template is_free<0>(I2) ) res=false;
+        }
+        else
+        {
+          if ( amap->template is_free<0>(I2) ) res=false;
+          else if ( amap->is_marked(amap->template beta<1>(I1), mbijection) )
+          {
+            if ( bijection[amap->template beta<1>(I1)]!=
+                 amap->template beta<0>(I2) )
+              res=false;
+          }
+        }
+      }
+
+      for ( unsigned int j=2; res && j<=CMap::dimension; ++j )
+      {
+        if ( j+1!=i && j!=i && j!=i+1 )
+        {
+          if ( amap->is_free(I1,j) )
+          {
+            if ( !amap->is_free(I2,j) ) res=false;
+          }
+          else
+          {
+            if ( amap->is_free(I2,j) ) res=false;
+            else if ( amap->is_marked(amap->beta(I1,j), mbijection) )
+            {
+              if ( bijection[amap->beta(I1,j)]!=amap->beta(I2,j) ) res=false;
+            }
+          }
+        }
+      }
+      ++I1; ++I2;
+    }
+    if ( I1.cont()!=I2.cont() )
+      res = false;
+
+    amap->negate_mark(m1);
+    amap->negate_mark(m2);
+    I1.rewind(); I2.rewind();
+    while ( amap->number_of_marked_darts(mbijection)>0 )
+    {
+      amap->unmark(I1, mbijection);
+      ++I1; ++I2;
+    }
+
+    CGAL_assertion( amap->is_whole_map_marked(m1) );
+    CGAL_assertion( amap->is_whole_map_marked(m2) );
+    CGAL_assertion( amap->is_whole_map_unmarked(mbijection) );
+    amap->free_mark(m1);
+    amap->free_mark(m2);
+    amap->free_mark(mbijection);
+
+    return res;
+  }
+};
+
+// Specialization for i=0 and 3<dim.
+template<typename CMap, unsigned int dim>
+struct Is_sewable_functor<CMap, 0, dim>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  { return Is_sewable_functor<CMap,1, dim>::run(amap, adart2, adart1); }
+};
+
+// Specialization for i=0 and dim=1.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 0, 1>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<0>(adart1) ||
+         !amap->template is_free<1>(adart2) )
+      return false;
+    return true;
+  }
+};
+// Specialization for i=1 and dim=1.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 1, 1>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<1>(adart1) ||
+         !amap->template is_free<0>(adart2) )
+      return false;
+    return true;
+  }
+};
+
+// Specialization for i=0 and dim=2.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 0, 2>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<0>(adart1) ||
+         !amap->template is_free<1>(adart2) )
+      return false;
+    return true;
+  }
+};
+// Specialization for i=1 and dim=2.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 1, 2>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<1>(adart1) ||
+         !amap->template is_free<0>(adart2) )
+      return false;
+    return true;
+  }
+};
+// Specialization for i=2 and dim=2.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 2, 2>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<2>(adart1) ||
+         !amap->template is_free<2>(adart2) || adart1==adart2 )
+      return false;
+    return true;
+  }
+};
+
+// Specialization for i=0 and dim=3.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 0, 3>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<0>(adart1) ||
+         !amap->template is_free<1>(adart2) )
+      return false;
+
+    if ( amap->template is_free<3>(adart1) )
+    {
+      if ( !amap->template is_free<3>(adart2) ) return false;
+      return true;
+    }
+
+    // Here adart1 is not 3-free
+    if ( amap->template is_free<3>(adart2) ) return false;
+
+    CGAL_assertion( amap->template is_free<1>(amap->template beta<3>(adart1)) &&
+                    amap->template is_free<0>(amap->template beta<3>(adart2)) );
+    return true;
+  }
+};
+// Specialization for i=1 and dim=3.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 1, 3>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<1>(adart1) ||
+         !amap->template is_free<0>(adart2) )
+      return false;
+
+    if ( amap->template is_free<3>(adart1) )
+    {
+      if ( !amap->template is_free<3>(adart2) ) return false;
+      return true;
+    }
+
+    // Here adart1 is not 3-free
+    if ( amap->template is_free<3>(adart2) ) return false;
+
+    CGAL_assertion( amap->template is_free<0>(amap->template beta<3>(adart1)) &&
+                    amap->template is_free<1>(amap->template beta<3>(adart2)) );
+    return true;
+  }
+};
+// Specialization for i=2 and dim=3.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 2, 3>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<2>(adart1) ||
+         !amap->template is_free<2>(adart2) || adart1==adart2 )
+      return false;
+    return true;
+  }
+};
+// Specialization for i=3 and dim=3.
+template<typename CMap>
+struct Is_sewable_functor<CMap, 3, 3>
+{
+  static bool run( const CMap* amap,
+                   typename CMap::Dart_const_handle adart1,
+                   typename CMap::Dart_const_handle adart2 )
+  {
+    if ( !amap->template is_free<3>(adart1) ||
+         !amap->template is_free<3>(adart2) )
+      return false;
+
+    CGAL::CMap_dart_const_iterator_basic_of_orbit<CMap,1> I1(*amap, adart1);
+    CGAL::CMap_dart_const_iterator_basic_of_orbit<CMap,0> I2(*amap, adart2);
+    bool res=true;
+    while (res && I1.cont() && I2.cont())
+    {
+      CGAL_assertion( amap->template is_free<3>(I1) ||
+                      amap->template is_free<3>(I2) );
+
+      // We can remove this constraint which is not required for
+      // combinatorial map definition, but which is quite "normal" as it avoid
+      // fold cells.
+      if ( I1==adart2 || I2==adart1 ) res=false;
+      else if ( I1.prev_operation()!=I2.prev_operation() ) res=false;
+
+      ++I1; ++I2;
+    }
+    if ( I1.cont()!=I2.cont() )
+      res=false;
+
+    return res;
+  }
+};
+
+} //namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_COMBINATORIAL_MAP_SEWABLE_H
+//******************************************************************************
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_utility.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_utility.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_utility.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_utility.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_utility_novariadic.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_utility_novariadic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Combinatorial_map_utility_novariadic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Combinatorial_map_utility_novariadic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Delaunay_triangulation_hierarchy_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Delaunay_triangulation_hierarchy_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Delaunay_triangulation_hierarchy_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Delaunay_triangulation_hierarchy_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Dummy_tds_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Dummy_tds_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Dummy_tds_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Dummy_tds_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Exact_type_selector.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Exact_type_selector.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Exact_type_selector.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Exact_type_selector.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Get_dimension_tag.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Get_dimension_tag.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Get_dimension_tag.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Get_dimension_tag.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/K_neighbor_search.h b/3rdparty/CGAL-4.8/include/CGAL/internal/K_neighbor_search.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/K_neighbor_search.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/K_neighbor_search.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_2.h
new file mode 100644
index 0000000..b5a71ff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_2.h
@@ -0,0 +1,296 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sébastien Loriot <sebastien.loriot at geometryfactory.com>
+
+#ifndef CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
+#define CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
+#include <CGAL/assertions.h>
+#include <CGAL/Weighted_alpha_shape_euclidean_traits_2.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/type_traits.hpp>
+#include <iostream>
+
+namespace CGAL {
+
+namespace internal{
+
+//non-weighted case  
+template <class Weighted_tag,class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
+struct Types_for_alpha_nt_2
+{
+//Converter types
+  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_approx>    To_approx;
+  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_exact>     To_exact;
+//Traits types
+  
+//Point types
+  typedef typename Kernel_approx::Point_2                          Approx_point;
+  typedef typename Kernel_exact::Point_2                           Exact_point;
+  typedef typename Kernel_input::Point_2                           Input_point;
+//Constructions 
+  typedef typename Kernel_approx::Compute_squared_radius_2         Approx_squared_radius;
+  typedef typename Kernel_exact::Compute_squared_radius_2          Exact_squared_radius;
+};
+  
+  
+//weighted case
+template <class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
+struct Types_for_alpha_nt_2< ::CGAL::Tag_true,Input_traits,Kernel_input,Kernel_approx,Kernel_exact>
+{
+//Converter types
+  typedef CGAL::Weighted_converter_2< CGAL::Cartesian_converter<Kernel_input,Kernel_approx> >  To_approx;
+  typedef CGAL::Weighted_converter_2< CGAL::Cartesian_converter<Kernel_input,Kernel_exact> >   To_exact;
+//Traits types
+  typedef ::CGAL::Weighted_alpha_shape_euclidean_traits_2<Kernel_approx>                       Approx_traits;
+  typedef ::CGAL::Weighted_alpha_shape_euclidean_traits_2<Kernel_exact>                        Exact_traits;
+//Point types
+  typedef typename Approx_traits::Weighted_point                                               Approx_point;
+  typedef typename Exact_traits::Weighted_point                                                Exact_point;
+  typedef typename Input_traits::Weighted_point                                                Input_point;
+//Constructions 
+  typedef typename Approx_traits::Compute_squared_radius_2                                     Approx_squared_radius;
+  typedef typename Exact_traits::Compute_squared_radius_2                                      Exact_squared_radius; 
+};
+
+
+template<class Input_traits, bool mode, class Weighted_tag>
+class Lazy_alpha_nt_2{
+//NT & kernels
+  typedef CGAL::Interval_nt<mode>                                                               NT_approx;
+  //Gmpq or Quotient<MP_float>
+  typedef Exact_field_selector<double>::Type                                                    NT_exact;
+  typedef CGAL::Simple_cartesian<NT_approx>                                                     Kernel_approx;
+  typedef CGAL::Simple_cartesian<NT_exact>                                                      Kernel_exact;
+  typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel                        Kernel_input;
+//Helper class for weighted and non-weighted case  
+  typedef Types_for_alpha_nt_2<Weighted_tag,Input_traits,Kernel_input,Kernel_approx,Kernel_exact> Types;  
+  
+//Converters
+  typedef typename Types::To_approx                                                             To_approx;
+  typedef typename Types::To_exact                                                              To_exact;
+ 
+//Constructions class
+  typedef typename Types::Approx_squared_radius                                                 Approx_squared_radius;
+  typedef typename Types::Exact_squared_radius                                                  Exact_squared_radius;
+  
+//Point
+  typedef typename Types::Approx_point                                                          Approx_point;
+  typedef typename Types::Exact_point                                                           Exact_point;
+  typedef typename Types::Input_point                                                           Input_point;
+//Convertion functions
+  Approx_point to_approx(const Input_point& wp) const {
+    To_approx converter;
+    return converter(wp);
+  }
+  
+  Exact_point to_exact(const Input_point& wp) const {
+    To_exact converter;
+    return converter(wp);
+  }
+
+
+//members  
+  unsigned nb_pt;
+  //the members can be updated when calling method exact()
+  mutable bool updated;
+  mutable NT_exact exact_;
+  mutable NT_approx approx_;
+  typedef std::vector<const Input_point*> Data_vector;
+  boost::shared_ptr<Data_vector> inputs_ptr;
+
+//private functions  
+  const Data_vector& data() const{ return *inputs_ptr;}
+
+  Data_vector& 
+  data(){ return *inputs_ptr;}  
+  
+  
+public:
+
+  typedef NT_exact               Exact_nt;
+  typedef NT_approx              Approximate_nt;
+
+  void update_exact() const{
+    switch (nb_pt){
+      case 1:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]) );
+      break;
+      case 2:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]) );
+      break;
+      case 3:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]) );
+      break;
+      default:
+        CGAL_assertion(false);
+    }
+    updated=true;
+  }
+  
+  void set_approx(){
+    switch (nb_pt){
+      case 1:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]) );
+      break;
+      case 2:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]) );
+      break;
+      case 3:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]) );
+      break;
+      default:
+        CGAL_assertion(false);
+    }    
+  }
+
+  const NT_exact& exact() const {
+    if (!updated){
+      update_exact();
+      approx_=to_interval(exact_);
+    }
+    return exact_;
+  }
+
+  const NT_approx& approx() const{
+    return approx_;
+  }
+//Constructors  
+  Lazy_alpha_nt_2():nb_pt(0),updated(true),exact_(0),approx_(0){}
+  
+  Lazy_alpha_nt_2(double d):nb_pt(0),updated(true),exact_(d),approx_(d){}
+  
+  Lazy_alpha_nt_2(const Input_point& wp1):nb_pt(1),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    set_approx();
+  }
+
+  Lazy_alpha_nt_2(const Input_point& wp1,
+           const Input_point& wp2):nb_pt(2),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    data().push_back(&wp2);
+    set_approx();
+  }
+
+  Lazy_alpha_nt_2(const Input_point& wp1,
+           const Input_point& wp2,
+           const Input_point& wp3):nb_pt(3),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    data().push_back(&wp2);
+    data().push_back(&wp3);
+    set_approx();
+  }
+  
+  #define CGAL_LANT_COMPARE_FUNCTIONS(CMP) \
+  bool \
+  operator CMP (const Lazy_alpha_nt_2<Input_traits,mode,Weighted_tag> &other) const \
+  { \
+    try{ \
+      return this->approx() CMP other.approx(); \
+    } \
+    catch(CGAL::Uncertain_conversion_exception&){ \
+      return this->exact() CMP other.exact(); \
+    } \
+  } \
+  \
+
+  CGAL_LANT_COMPARE_FUNCTIONS(<)
+  CGAL_LANT_COMPARE_FUNCTIONS(>)
+  CGAL_LANT_COMPARE_FUNCTIONS(>=)
+  CGAL_LANT_COMPARE_FUNCTIONS(<=)
+  CGAL_LANT_COMPARE_FUNCTIONS(==)
+  CGAL_LANT_COMPARE_FUNCTIONS(!=)
+
+  #undef CGAL_LANT_COMPARE_FUNCTIONS  
+};
+
+template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
+std::ostream&
+operator<< (std::ostream& os,const Lazy_alpha_nt_2<Input_traits,mode,Weighted_tag>& a){
+  return os << ::CGAL::to_double(a.approx());
+}
+
+template <class Type_of_alpha>
+struct Lazy_compute_squared_radius_2 {
+  typedef typename Type_of_alpha::Input_point Point;
+  Type_of_alpha operator() (const Point& p, 
+                 const Point& q , 
+                 const Point& r, 
+                 const Point& s)
+  {return Type_of_alpha(p,q,r,s);}
+
+  Type_of_alpha operator() ( const Point& p, 
+                  const Point& q , 
+                  const Point& r)
+  {return Type_of_alpha(p,q,r); }
+
+  Type_of_alpha operator() (const Point& p, 
+                 const Point& q )
+  {return Type_of_alpha(p,q); }
+
+  Type_of_alpha operator() (const Point& p) 
+  {return Type_of_alpha(p);}
+};
+
+
+template <class GeomTraits,class ExactAlphaComparisonTag>
+struct Alpha_nt_selector_impl_2;
+
+template <class GeomTraits>
+struct Alpha_nt_selector_impl_2<GeomTraits,Tag_false>
+{
+  typedef typename GeomTraits::FT Type_of_alpha;
+  typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_2;
+};
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_typedef_Weighted_point,Weighted_point,false)
+
+template <class GeomTraits>
+struct Alpha_nt_selector_impl_2<GeomTraits,Tag_true>
+{
+  //This is not very satisfactory but we can improve it if some user complains.
+  typedef Boolean_tag<
+    Has_typedef_Weighted_point<GeomTraits>::value &&
+    !boost::is_same<
+      typename Kernel_traits<typename GeomTraits::Point_2>::Kernel::Compute_squared_radius_2,
+      typename GeomTraits::Compute_squared_radius_2 >::value 
+  >   Weighted_tag;
+  typedef Lazy_alpha_nt_2<GeomTraits,true,Weighted_tag> Type_of_alpha;
+  typedef Lazy_compute_squared_radius_2<Type_of_alpha> Compute_squared_radius_2;
+};
+
+template <class GeomTraits,class ExactAlphaComparisonTag>
+struct Alpha_nt_selector_2:
+  public Alpha_nt_selector_impl_2<GeomTraits,
+              Boolean_tag< boost::is_floating_point<typename GeomTraits::FT>::value && ExactAlphaComparisonTag::value > >
+{};
+
+
+} //namespace internal
+
+} //namespace CGAL
+
+#endif //CGAL_INTERNAL_LAZY_ALPHA_NT_2_H
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_3.h
new file mode 100644
index 0000000..6d4c7f2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Lazy_alpha_nt_3.h
@@ -0,0 +1,343 @@
+// Copyright (c) 2012  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sébastien Loriot <sebastien.loriot at geometryfactory.com>
+
+#ifndef CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
+#define CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
+
+#include <CGAL/assertions.h>
+#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/type_traits.hpp>
+#include <iostream>
+
+namespace CGAL {
+
+namespace internal{
+
+//non-weighted case  
+template <class Weighted_tag,class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
+struct Types_for_alpha_nt_3
+{
+//Converter types
+  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_approx>    To_approx;
+  typedef CGAL::Cartesian_converter<Kernel_input,Kernel_exact>     To_exact;
+//Traits types
+  
+//Point types
+  typedef typename Kernel_approx::Point_3                          Approx_point;
+  typedef typename Kernel_exact::Point_3                           Exact_point;
+  typedef typename Kernel_input::Point_3                           Input_point;
+//Constructions 
+  typedef typename Kernel_approx::Compute_squared_radius_3         Approx_squared_radius;
+  typedef typename Kernel_exact::Compute_squared_radius_3          Exact_squared_radius;
+};
+  
+  
+//weighted case
+template <class Input_traits,class Kernel_input,class Kernel_approx,class Kernel_exact>
+struct Types_for_alpha_nt_3< ::CGAL::Tag_true,Input_traits,Kernel_input,Kernel_approx,Kernel_exact>
+{
+//Converter types
+  typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter<Kernel_input,Kernel_approx> >   To_approx;
+  typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter<Kernel_input,Kernel_exact> >    To_exact;
+//Traits types
+  typedef ::CGAL::Regular_triangulation_euclidean_traits_3<Kernel_approx>                       Approx_traits;
+  typedef ::CGAL::Regular_triangulation_euclidean_traits_3<Kernel_exact>                        Exact_traits;
+//Point types
+  typedef typename Approx_traits::Weighted_point Approx_point;
+  typedef typename Exact_traits::Weighted_point  Exact_point;
+  typedef typename Input_traits::Weighted_point  Input_point;
+//Constructions 
+  typedef typename Approx_traits::Compute_squared_radius_smallest_orthogonal_sphere_3           Approx_squared_radius;
+  typedef typename Exact_traits::Compute_squared_radius_smallest_orthogonal_sphere_3            Exact_squared_radius; 
+};
+
+
+template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
+class Lazy_alpha_nt_3{
+//NT & kernels
+  typedef CGAL::Interval_nt<mode>                                                               NT_approx;
+  //Gmpq or Quotient<MP_float>
+  typedef Exact_field_selector<double>::Type                                                    NT_exact;
+  typedef CGAL::Simple_cartesian<NT_approx>                                                     Kernel_approx;
+  typedef CGAL::Simple_cartesian<NT_exact>                                                      Kernel_exact;
+//Helper class for weighted and non-weighted case  
+  typedef Types_for_alpha_nt_3<Weighted_tag,Input_traits,Kernel_input,Kernel_approx,Kernel_exact> Types;  
+  
+//Converters
+  typedef typename Types::To_approx                                                             To_approx;
+  typedef typename Types::To_exact                                                              To_exact;
+ 
+//Constructions class
+  typedef typename Types::Approx_squared_radius                                                 Approx_squared_radius;
+  typedef typename Types::Exact_squared_radius                                                  Exact_squared_radius;
+  
+//Point
+  typedef typename Types::Approx_point                                                          Approx_point;
+  typedef typename Types::Exact_point                                                           Exact_point;
+  typedef typename Types::Input_point                                                           Input_point;
+//Convertion functions
+  Approx_point to_approx(const Input_point& wp) const {
+    To_approx converter;
+    return converter(wp);
+  }
+  
+  Exact_point to_exact(const Input_point& wp) const {
+    To_exact converter;
+    return converter(wp);
+  }
+
+
+//members  
+  unsigned nb_pt;
+  //the members can be updated when calling method exact()
+  mutable bool updated;
+  mutable NT_exact exact_;
+  mutable NT_approx approx_;
+  typedef std::vector<const Input_point*> Data_vector;
+  boost::shared_ptr<Data_vector> inputs_ptr;
+
+//private functions  
+  const Data_vector& data() const{ return *inputs_ptr;}
+
+  Data_vector& 
+  data(){ return *inputs_ptr;}  
+  
+  
+public:
+
+  typedef NT_exact               Exact_nt;
+  typedef NT_approx              Approximate_nt;
+
+  void update_exact() const{
+    switch (nb_pt){
+      case 1:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]) );
+      break;
+      case 2:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]) );
+      break;
+      case 3:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]) );
+      break;
+      case 4:
+        exact_ = Exact_squared_radius()( to_exact(*data()[0]),to_exact(*data()[1]),to_exact(*data()[2]),to_exact(*data()[3]) );
+      break;
+      default:
+        CGAL_assertion(false);
+    }
+    updated=true;
+  }
+  
+  void set_approx(){
+    switch (nb_pt){
+      case 1:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]) );
+      break;
+      case 2:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]) );
+      break;
+      case 3:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]) );
+      break;
+      case 4:
+        approx_ = Approx_squared_radius()( to_approx(*data()[0]),to_approx(*data()[1]),to_approx(*data()[2]),to_approx(*data()[3]) );
+      break;
+      default:
+        CGAL_assertion(false);
+    }    
+  }
+
+  const NT_exact& exact() const {
+    if (!updated){
+      update_exact();
+      approx_=to_interval(exact_);
+    }
+    return exact_;
+  }
+
+  const NT_approx& approx() const{
+    return approx_;
+  }
+//Constructors  
+  Lazy_alpha_nt_3():nb_pt(0),updated(true),exact_(0),approx_(0){}
+  
+  Lazy_alpha_nt_3(double d):nb_pt(0),updated(true),exact_(d),approx_(d){}
+  
+  Lazy_alpha_nt_3(const Input_point& wp1):nb_pt(1),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    set_approx();
+  }
+
+  Lazy_alpha_nt_3(const Input_point& wp1,
+           const Input_point& wp2):nb_pt(2),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    data().push_back(&wp2);
+    set_approx();
+  }
+
+  Lazy_alpha_nt_3(const Input_point& wp1,
+           const Input_point& wp2,
+           const Input_point& wp3):nb_pt(3),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    data().push_back(&wp2);
+    data().push_back(&wp3);
+    set_approx();
+  }
+
+  Lazy_alpha_nt_3(const Input_point& wp1,
+           const Input_point& wp2,
+           const Input_point& wp3,
+           const Input_point& wp4):nb_pt(4),updated(false),inputs_ptr(new Data_vector())
+  {
+    data().reserve(nb_pt);
+    data().push_back(&wp1);
+    data().push_back(&wp2);
+    data().push_back(&wp3);
+    data().push_back(&wp4);
+    set_approx();
+  }
+    
+  #define CGAL_LANT_COMPARE_FUNCTIONS(CMP) \
+  bool \
+  operator CMP (const Lazy_alpha_nt_3<Input_traits,Kernel_input,mode,Weighted_tag> &other) const \
+  { \
+    try{ \
+      return this->approx() CMP other.approx(); \
+    } \
+    catch(CGAL::Uncertain_conversion_exception&){ \
+      return this->exact() CMP other.exact(); \
+    } \
+  } \
+
+  CGAL_LANT_COMPARE_FUNCTIONS(<)
+  CGAL_LANT_COMPARE_FUNCTIONS(>)
+  CGAL_LANT_COMPARE_FUNCTIONS(>=)
+  CGAL_LANT_COMPARE_FUNCTIONS(<=)
+  CGAL_LANT_COMPARE_FUNCTIONS(==)
+  CGAL_LANT_COMPARE_FUNCTIONS(!=)
+
+  #undef CGAL_LANT_COMPARE_FUNCTIONS  
+};
+
+template<class Input_traits, class Kernel_input, bool mode, class Weighted_tag>
+std::ostream&
+operator<< (std::ostream& os,const Lazy_alpha_nt_3<Input_traits,Kernel_input,mode,Weighted_tag>& a){
+  return os << ::CGAL::to_double(a.approx());
+}
+  
+//small class to select predicate in weighted and unweighted case
+template <class GeomTraits,class Weighted_tag>
+struct iCompute_squared_radius_3;
+
+template <class GeomTraits>
+struct iCompute_squared_radius_3<GeomTraits,Tag_false>
+{
+  template <class As>
+  typename GeomTraits::Compute_squared_radius_3
+  operator()(const As& as) const{
+    return static_cast<const typename As::Triangulation&>(as).geom_traits().compute_squared_radius_3_object();
+  }
+};
+
+template <class GeomTraits>
+struct iCompute_squared_radius_3<GeomTraits,Tag_true>
+{
+  template <class As>
+  typename GeomTraits::Compute_squared_radius_smallest_orthogonal_sphere_3
+  operator()(const As& as) const{
+    return static_cast<const typename As::Triangulation&>(as).geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object();
+  }
+};
+
+template <class Type_of_alpha,class Point>
+struct Lazy_compute_squared_radius_3 {
+  Type_of_alpha operator() (const Point& p, 
+                 const Point& q , 
+                 const Point& r, 
+                 const Point& s)
+  {return Type_of_alpha(p,q,r,s);}
+
+  Type_of_alpha operator() ( const Point& p, 
+                  const Point& q , 
+                  const Point& r)
+  {return Type_of_alpha(p,q,r); }
+
+  Type_of_alpha operator() (const Point& p, 
+                 const Point& q )
+  {return Type_of_alpha(p,q); }
+
+  Type_of_alpha operator() (const Point& p) 
+  {return Type_of_alpha(p);}
+};
+
+
+template <class GeomTraits,class ExactAlphaComparisonTag,class Weighted_tag>
+struct Alpha_nt_selector_impl_3;
+
+template <class GeomTraits,class Weighted_tag>
+struct Alpha_nt_selector_impl_3<GeomTraits,Tag_false,Weighted_tag>
+{
+  typedef typename GeomTraits::FT Type_of_alpha;
+  typedef iCompute_squared_radius_3<GeomTraits,Weighted_tag> Compute_squared_radius_3;
+};
+
+template <class GeomTraits,class Weighted_tag>
+struct Alpha_nt_selector_impl_3<GeomTraits,Tag_true,Weighted_tag>
+{
+  typedef Lazy_alpha_nt_3<GeomTraits,GeomTraits,true,Tag_false> Type_of_alpha;
+  typedef Lazy_compute_squared_radius_3<Type_of_alpha,typename GeomTraits::Point_3> Functor;
+  struct Compute_squared_radius_3{
+    template<class As>
+    Functor operator()(const As&){return Functor();}    
+  };
+};
+
+template <class GeomTraits>
+struct Alpha_nt_selector_impl_3<GeomTraits,Tag_true,Tag_true>
+{
+  typedef Lazy_alpha_nt_3<GeomTraits,typename GeomTraits::Kernel,true,Tag_true> Type_of_alpha;
+  typedef Lazy_compute_squared_radius_3<Type_of_alpha,typename GeomTraits::Weighted_point> Functor;
+  struct Compute_squared_radius_3{
+    template<class As>
+    Functor operator()(const As&){return Functor();}    
+  };
+};
+
+template <class GeomTraits,class ExactAlphaComparisonTag,class Weighted_tag>
+struct Alpha_nt_selector_3:
+  public Alpha_nt_selector_impl_3<GeomTraits,
+              Boolean_tag< boost::is_floating_point<typename GeomTraits::FT>::value && ExactAlphaComparisonTag::value >,
+              Weighted_tag>
+{};
+
+
+} //namespace internal
+
+} //namespace CGAL
+
+#endif //CGAL_INTERNAL_LAZY_ALPHA_NT_3_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Mesh_3/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Mesh_3/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/Graph_manipulations.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/Graph_manipulations.h
new file mode 100644
index 0000000..dc07c34
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/Graph_manipulations.h
@@ -0,0 +1,98 @@
+// Copyright (c) 2015 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_INTERNAL_MESH_3_INTERNAL_GRAPH_MANIPULATIONS
+#define CGAL_INTERNAL_MESH_3_INTERNAL_GRAPH_MANIPULATIONS
+
+#include <CGAL/Kernel/global_functions_3.h>
+// Assumes the point is a CGAL point.
+
+#include <boost/graph/graph_traits.hpp>
+
+#include <map>
+
+namespace CGAL {
+namespace internal {
+namespace Mesh_3 {
+
+template <typename Graph, typename Point_3>
+struct Graph_manipulations
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
+
+  std::map<Point_3, vertex_descriptor> p2v;
+  Graph& g;
+
+  Graph_manipulations(Graph& g) : g(g) {}
+
+  vertex_descriptor get_vertex(const Point_3& p) {
+    typename std::map<Point_3, vertex_descriptor>::iterator
+      it = p2v.find(p);
+    if(it == p2v.end()){
+      vertex_descriptor v0 = add_vertex(g);
+      p2v[p] = v0;
+      g[v0] = p;
+      return v0;
+    } else {
+      return it->second;
+    }
+  }
+
+  vertex_descriptor split(const Point_3& a, const Point_3& b) {
+    const Point_3 mid = a < b ? midpoint(a, b) : midpoint(b, a);
+    vertex_descriptor vmid = get_vertex(mid);
+    typename std::map<Point_3, vertex_descriptor>::iterator
+      it_a = p2v.find(a),
+      it_b = p2v.find(b);
+    if(it_a != p2v.end() && it_b != p2v.end()) {
+      vertex_descriptor va = it_a->second;
+      vertex_descriptor vb = it_b->second;
+      edge_descriptor edge;
+      bool b;
+      // test if the edge is already here, using add_edge
+      boost::tie(edge, b) = add_edge(va, vb, g);
+      remove_edge(edge, g);
+      if(!b) {
+        // The edge was already here.
+        try_add_edge(va, vmid);
+        try_add_edge(vb, vmid);
+        return vmid;
+      }
+    }
+    return vmid;
+  }
+
+  bool try_add_edge(vertex_descriptor v1, vertex_descriptor v2) {
+    if(v1 != v2) {
+      edge_descriptor edge;
+      bool b;
+      boost::tie(edge, b) = add_edge(v1, v2, g);
+      return b;
+    } else
+      return false;
+  }
+}; // struct template Graph_manipulations
+
+} // namespace Mesh_3
+} // namespace internal
+} // namespace CGAL
+
+#endif //CGAL_INTERNAL_MESH_3_INTERNAL_GRAPH_MANIPULATIONS
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/check_weights.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/check_weights.h
new file mode 100644
index 0000000..713f181
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/check_weights.h
@@ -0,0 +1,66 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL: https://scm.gforge.inria.fr/svn/cgal/branches/features/Mesh_3-experimental-GF/Mesh_3/include/CGAL/internal/Mesh_3/get_index.h $
+// $Id: get_index.h 67573 2012-02-02 14:54:51Z lrineau $
+//
+//
+// Author(s)     : Jane Tournois
+//
+//******************************************************************************
+// File Description :
+//
+//
+//******************************************************************************
+
+#ifndef CGAL_INTERNAL_MESH_3_CHECK_WEIGHTS_H
+#define CGAL_INTERNAL_MESH_3_CHECK_WEIGHTS_H
+
+#include <CGAL/tags.h>
+#include <CGAL/Mesh_3/Has_features.h>
+#include <boost/type_traits/is_same.hpp>
+
+namespace CGAL {
+namespace internal {
+namespace Mesh_3 {
+
+
+template<typename Triangulation, typename MeshDomain>
+bool has_non_protecting_weights(const Triangulation& tr,
+                                const MeshDomain&)
+{
+  bool with_features =
+    boost::is_same<Has_features<MeshDomain>, CGAL::Tag_true>::value;
+
+  for (typename Triangulation::Finite_vertices_iterator
+        vv = tr.finite_vertices_begin();
+        vv != tr.finite_vertices_end();
+        ++vv)
+  {
+    if (vv->point().weight() != 0.)
+    {
+      if (with_features && vv->in_dimension() > 1)
+        return true;
+    }
+  }
+  return false;
+}
+
+
+}//end namespace Mesh_3
+}//end namespace internal
+}//end namespace CGAL
+
+#endif //CGAL_INTERNAL_MESH_3_CHECK_WEIGHTS_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Mesh_3/get_index.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/get_index.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Mesh_3/get_index.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/get_index.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/split_in_polylines.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/split_in_polylines.h
new file mode 100644
index 0000000..36c17c7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Mesh_3/split_in_polylines.h
@@ -0,0 +1,219 @@
+// Copyright (c) 2012-2015  GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL:$
+// $Id:$
+//
+// Author(s)     : Andreas Fabri, Laurent Rineau
+
+#ifndef CGAL_SPLIT_IN_POLYLINES_H
+#define CGAL_SPLIT_IN_POLYLINES_H
+
+#include <vector>
+#include <set>
+#include <iostream>
+#include <fstream>
+#include <boost/foreach.hpp>
+#include <CGAL/number_utils.h>
+#include <boost/graph/graph_traits.hpp>
+
+namespace CGAL {
+namespace internal {
+namespace Mesh_3 {
+
+template <typename Graph>
+void dump_graph_edges(std::ostream& out, const Graph& g)
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
+
+  BOOST_FOREACH(edge_descriptor e, edges(g))
+  {
+    vertex_descriptor s = source(e, g);
+    vertex_descriptor t = target(e, g);
+    out.precision(17);
+    out << "2 " << g[s] << " " << g[t] << "\n";
+  }
+}
+
+template <typename Graph>
+void dump_graph_edges(const char* filename, const Graph& g)
+{
+  std::ofstream out(filename);
+  dump_graph_edges(out, g);
+}
+
+/// Splits a graph at vertices with degree higher than two.
+/// The vertices are duplicated, and new incident edges created.
+template <typename Graph, typename Kernel>
+void split_in_polylines(Graph& G, Kernel)
+{
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
+  typedef typename boost::graph_traits<Graph>::vertex_iterator vertex_iterator;
+  typedef typename boost::graph_traits<Graph>::out_edge_iterator out_edge_iterator;
+
+  vertex_iterator b,e;
+  boost::tie(b,e) = vertices(G);
+  std::vector<vertex_descriptor> V(b,e);
+  for(typename std::vector<vertex_descriptor>::iterator it = V.begin();
+      it != V.end();
+      ++it){
+    vertex_descriptor v = *it;
+    bool split = false;
+
+    if(out_degree(v,G) > 2) {
+      split = true;
+    } else if(out_degree(v, G) == 2) {
+      out_edge_iterator out_edge_it, out_edges_end;
+      boost::tie(out_edge_it, out_edges_end) = out_edges(v, G);
+
+      vertex_descriptor v1 = target(*out_edge_it++, G);
+      vertex_descriptor v2 = target(*out_edge_it++, G);
+      CGAL_assertion(out_edge_it == out_edges_end);
+
+      const typename Kernel::Point_3& p = G[v];
+      const typename Kernel::Point_3& p1 = G[v1];
+      const typename Kernel::Point_3& p2 = G[v2];
+
+      const typename Kernel::Vector_3 e1 = p1 - p;
+      const typename Kernel::Vector_3 e2 = p2 - p;
+      const typename Kernel::FT sc_prod = e1 * e2;
+      if( sc_prod >= 0 ||   // angle < 135 degrees (3*pi/4)
+          (sc_prod < 0 &&
+           CGAL::square(sc_prod) < (e1 * e1) * (e2 * e2) / 2 ) )
+      {
+        split = true;
+      }
+    }
+
+    if(split) {
+      out_edge_iterator b,e;
+      boost::tie(b,e) = out_edges(v,G);
+      std::vector<edge_descriptor> E(b,e);
+      for(unsigned int i = 1; i < E.size(); ++i){
+        edge_descriptor e = E[i];
+        vertex_descriptor w = target(e,G);
+        remove_edge(e,G);
+        vertex_descriptor vc = add_vertex(G);
+        G[vc] = G[v];
+        add_edge(vc,w,G);
+      }
+    }
+  }
+  CGAL_assertion_code(
+  BOOST_FOREACH(vertex_descriptor v, vertices(G))
+  {
+    typename boost::graph_traits<Graph>::degree_size_type 
+      n = out_degree(v, G);
+
+    CGAL_assertion(n == 1 || n == 2);
+  }
+  BOOST_FOREACH(edge_descriptor e, edges(G))
+  {
+    vertex_descriptor v = target(e,G);
+    vertex_descriptor w = source(e, G);
+    CGAL_assertion(v != w);
+    CGAL_assertion(G[v] != G[w]);
+  }
+                      )
+}
+
+
+template <typename Graph, typename Polylines_container, typename Kernel>
+void split_in_polylines(Graph& G, Polylines_container& polylines, Kernel k)
+{
+  typedef typename Polylines_container::value_type Polyline;
+  typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+  typedef typename boost::graph_traits<Graph>::vertex_iterator vertex_iterator;
+  typedef typename boost::graph_traits<Graph>::out_edge_iterator out_edge_iterator;
+
+  // dump_graph_edges("edges.polylines.txt", G);
+  split_in_polylines(G, k);
+  std::set<vertex_descriptor> terminal;
+  vertex_iterator b,e;
+  for(boost::tie(b,e) = vertices(G); b!=e; ++b){
+    if(degree(*b,G) == 1){
+      terminal.insert(*b);
+    }
+  }
+
+  while(! terminal.empty()){
+    typename std::set<vertex_descriptor>::iterator it = terminal.begin();
+    vertex_descriptor u = *it;
+    terminal.erase(u);
+    Polyline V;
+    polylines.push_back(V);
+    Polyline& polyline = polylines.back();
+    polyline.push_back(G[u]);
+
+    while(out_degree(u,G)!=0){
+      CGAL_assertion(out_degree(u,G) == 1);
+      out_edge_iterator b,e;
+      boost::tie(b,e) = out_edges(u,G);
+      vertex_descriptor v = target(*b,G);
+      CGAL_assertion(G[v] != polyline.back());
+      polyline.push_back(G[v]);
+      remove_edge(b,G);
+      u = v;
+    }
+    terminal.erase(u);
+
+    if(polyline.back() == polyline.front())
+    {
+      CGAL_assertion(polyline.size() > 3);
+      // Fake cycle. We intended that cycle to be split at polyline.front()
+      // Split the line in two, arbitrary.
+      std::size_t n = polyline.size() / 2;
+      Polyline new_line(polyline.begin() + n,
+                        polyline.end());
+      polyline.resize(n+1);
+      polylines.push_back(new_line);
+    }
+  }
+  // dump_graph_edges("only-cycle-edges.polylines.txt", G);
+
+  std::size_t nb_cycles = 0;
+  // process cycles
+  while(num_edges(G) != 0)
+  {
+    vertex_descriptor u = source(*edges(G).first, G);
+
+    Polyline V;
+    polylines.push_back(V);
+    Polyline& polyline = polylines.back();
+    polyline.push_back(G[u]);
+
+    ++nb_cycles;
+
+    CGAL_assertion_code(bool first = true);
+    while(out_degree(u,G)!=0){
+      CGAL_assertion(out_degree(u,G) == 1 ||
+                     (first && out_degree(u, G) == 2));
+      out_edge_iterator b,e;
+      boost::tie(b,e) = out_edges(u,G);
+      vertex_descriptor v = target(*b,G);
+      polyline.push_back(G[v]);
+      remove_edge(b,G);
+      u = v;
+      CGAL_assertion_code(first = false);
+    }
+  }
+}
+
+} // namespace Mesh_3
+} // namespace internal
+} // namespace CGAL
+
+#endif // CGAL_SPLIT_IN_POLYLINES_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Polyhedron_plane_clipping_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Polyhedron_plane_clipping_3.h
new file mode 100644
index 0000000..a562dde
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Polyhedron_plane_clipping_3.h
@@ -0,0 +1,391 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_INTERNAL_POLYHEDRON_PLANE_CLIPPING_3_H
+#define CGAL_INTERNAL_POLYHEDRON_PLANE_CLIPPING_3_H
+
+#include <CGAL/corefinement_operations.h>
+#include <CGAL/iterator.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/array.h>
+#include <CGAL/Delaunay_triangulation_2.h>
+#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/convex_hull_3.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <CGAL/convex_hull_3.h>
+
+namespace CGAL{
+namespace corefinement{
+
+namespace internal{
+ template <class HDS,class T>
+ class Builder_from_T_2 : public CGAL::Modifier_base<HDS> {
+   typedef std::map<typename T::Vertex_handle,unsigned> Vertex_map;
+
+   const T& t;
+   template <class Builder>
+   static unsigned get_vertex_index( Vertex_map& vertex_map,
+                                     typename T::Vertex_handle vh,
+                                     Builder& builder,
+                                     unsigned& vindex)
+   {
+     std::pair<typename Vertex_map::iterator,bool>
+       res=vertex_map.insert(std::make_pair(vh,vindex));
+     if (res.second){
+       builder.add_vertex(vh->point());
+         ++vindex;
+     }
+     return res.first->second;
+   }
+
+   public:
+   Builder_from_T_2(const T& t_):t(t_)
+   {
+     CGAL_assertion(t.dimension()==2);
+   }
+   void operator()( HDS& hds) {
+     // Postcondition: `hds' is a valid polyhedral surface.
+     CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
+     Vertex_map vertex_map;
+     //start the surface
+     B.begin_surface( t.number_of_vertices(), t.number_of_faces());
+     unsigned vindex=0;
+     for (typename T::Finite_faces_iterator it=t.finite_faces_begin();
+                                            it!=t.finite_faces_end();++it)
+     {
+       unsigned i0=get_vertex_index(vertex_map,it->vertex(0),B,vindex);
+       unsigned i1=get_vertex_index(vertex_map,it->vertex(1),B,vindex);
+       unsigned i2=get_vertex_index(vertex_map,it->vertex(2),B,vindex);
+       B.begin_facet();
+       B.add_vertex_to_facet( i0 );
+       B.add_vertex_to_facet( i1 );
+       B.add_vertex_to_facet( i2 );
+       B.end_facet();
+     }
+     B.end_surface();
+   }
+ };
+} // end of namespace internal
+
+template <class Polyhedron, class Plane_3>
+Polyhedron clip_to_bbox(const Bbox_3& bbox, const Plane_3& plane)
+{
+  typedef typename Polyhedron::Traits::Kernel Kernel;
+  typedef typename Kernel::Point_3 Point_3;
+  typedef typename Kernel::Segment_3 Segment_3;
+  cpp11::array<typename Kernel::Point_3,8> corners= {{
+    Point_3(bbox.xmin(),bbox.ymin(),bbox.zmin()),
+    Point_3(bbox.xmin(),bbox.ymax(),bbox.zmin()),
+    Point_3(bbox.xmax(),bbox.ymax(),bbox.zmin()),
+    Point_3(bbox.xmax(),bbox.ymin(),bbox.zmin()),
+    Point_3(bbox.xmin(),bbox.ymin(),bbox.zmax()),
+    Point_3(bbox.xmin(),bbox.ymax(),bbox.zmax()),
+    Point_3(bbox.xmax(),bbox.ymax(),bbox.zmax()),
+    Point_3(bbox.xmax(),bbox.ymin(),bbox.zmax())
+  }};
+
+  cpp11::array<CGAL::Oriented_side,8> orientations = {{
+    plane.oriented_side(corners[0]),
+    plane.oriented_side(corners[1]),
+    plane.oriented_side(corners[2]),
+    plane.oriented_side(corners[3]),
+    plane.oriented_side(corners[4]),
+    plane.oriented_side(corners[5]),
+    plane.oriented_side(corners[6]),
+    plane.oriented_side(corners[7])
+  }};
+
+  std::vector<Point_3> intersection_points;
+  // first look for intersections at corners
+  for (int i=0; i<8; ++i)
+    if (orientations[i]==ON_ORIENTED_BOUNDARY)
+      intersection_points.push_back(corners[i]);
+  // second look for intersections on edges
+  cpp11::array<int,24> edge_indices = {{ // 2 *12 edges
+    0,1, 1,2, 2,3, 3,0, // bottom face edges
+    4,5, 5,6, 6,7, 7,4, // top face edges
+    0,4, 1,5, 2,6, 3,7
+  }};
+
+  for (int i=0; i<12; ++i)
+  {
+    int i1=edge_indices[2*i], i2=edge_indices[2*i+1];
+    if (orientations[i1]==ON_ORIENTED_BOUNDARY) continue;
+    if (orientations[i2]==ON_ORIENTED_BOUNDARY) continue;
+    if (orientations[i1]!=orientations[i2])
+      intersection_points.push_back(
+        get<Point_3>(
+          *CGAL::intersection(plane, Segment_3(corners[i1], corners[i2]) )
+        )
+      );
+  }
+
+  Polyhedron P;
+
+  //if less that 3 points there will be nothing to clipping.
+  if (intersection_points.size()<3) return P;
+
+  //triangulate the set of intersection points (I know it's overkill)
+  typedef CGAL::Triangulation_2_filtered_projection_traits_3<Kernel>   P_traits;
+  typedef CGAL::Delaunay_triangulation_2<P_traits> DT;
+  DT dt(P_traits(plane.orthogonal_vector()));
+  dt.insert(intersection_points.begin(),
+            intersection_points.end());
+
+  // tangency with the bbox -> no intersection
+  if (dt.dimension()!=2) return P;
+
+  //now create the polyhedron from the triangulation
+  internal::Builder_from_T_2< typename Polyhedron::HalfedgeDS,DT > builder(dt);
+  P.delegate(builder);
+
+  return P;
+}
+
+template <class Polyhedron, class Plane_3>
+Polyhedron clip_bbox(const Bbox_3& bbox, const Plane_3& plane)
+{
+  typedef typename Polyhedron::Traits::Kernel Kernel;
+  typedef typename Kernel::Point_3 Point_3;
+  typedef typename Kernel::Segment_3 Segment_3;
+  cpp11::array<typename Kernel::Point_3,8> corners= {{
+    Point_3(bbox.xmin(),bbox.ymin(),bbox.zmin()),
+    Point_3(bbox.xmin(),bbox.ymax(),bbox.zmin()),
+    Point_3(bbox.xmax(),bbox.ymax(),bbox.zmin()),
+    Point_3(bbox.xmax(),bbox.ymin(),bbox.zmin()),
+    Point_3(bbox.xmin(),bbox.ymin(),bbox.zmax()),
+    Point_3(bbox.xmin(),bbox.ymax(),bbox.zmax()),
+    Point_3(bbox.xmax(),bbox.ymax(),bbox.zmax()),
+    Point_3(bbox.xmax(),bbox.ymin(),bbox.zmax())
+  }};
+
+  cpp11::array<CGAL::Oriented_side,8> orientations = {{
+    plane.oriented_side(corners[0]),
+    plane.oriented_side(corners[1]),
+    plane.oriented_side(corners[2]),
+    plane.oriented_side(corners[3]),
+    plane.oriented_side(corners[4]),
+    plane.oriented_side(corners[5]),
+    plane.oriented_side(corners[6]),
+    plane.oriented_side(corners[7])
+  }};
+
+  std::vector<Point_3> points;
+  // first look for intersections at corners
+  for (int i=0; i<8; ++i)
+    if (orientations[i]==ON_ORIENTED_BOUNDARY)
+      points.push_back(corners[i]);
+  // second look for intersections on edges
+  cpp11::array<int,24> edge_indices = {{ // 2 *12 edges
+    0,1, 1,2, 2,3, 3,0, // bottom face edges
+    4,5, 5,6, 6,7, 7,4, // top face edges
+    0,4, 1,5, 2,6, 3,7
+  }};
+
+  for (int i=0; i<12; ++i)
+  {
+    int i1=edge_indices[2*i], i2=edge_indices[2*i+1];
+    if (orientations[i1]==ON_ORIENTED_BOUNDARY) continue;
+    if (orientations[i2]==ON_ORIENTED_BOUNDARY) continue;
+    if (orientations[i1]!=orientations[i2])
+      points.push_back(
+        get<Point_3>(
+          *CGAL::intersection(plane, Segment_3(corners[i1], corners[i2]) )
+        )
+      );
+  }
+
+  Polyhedron P;
+
+  //if less that 3 points there will be nothing to clipping.
+  if (points.size()<3) return P;
+
+  for (int i=0; i<8; ++i)
+    if (orientations[i]==ON_NEGATIVE_SIDE)
+      points.push_back(corners[i]);
+
+  // take the convex hull of the points on the negative side+intersection points
+  // overkill...
+  CGAL::convex_hull_3(points.begin(), points.end(), P);
+
+  return P;
+}
+
+template <class Polyhedron>
+Polyhedron* clip_polyhedron(Polyhedron& P, Polyhedron& clipping_polyhedron)
+{
+  std::pair <Polyhedron*,int> result;
+  typedef CGAL::Polyhedron_corefinement<Polyhedron> Corefinement;
+  Corefinement coref;
+  CGAL::Emptyset_iterator emptyset_iterator;
+  coref(P, clipping_polyhedron, emptyset_iterator,
+        &result, Corefinement::Intersection_tag);
+
+  return result.first;
+}
+
+template <class Polyhedron, class Plane_3>
+Polyhedron* clip_polyhedron(const Polyhedron& P, const Plane_3& p)
+{
+  if(P.empty()) return new Polyhedron();
+  CGAL::Bbox_3 bbox( CGAL::bbox_3(P.points_begin(), P.points_end()) );
+  //extend the bbox a bit to avoid border cases
+  double xd=(bbox.xmax()-bbox.xmin())/100;
+  double yd=(bbox.ymax()-bbox.ymin())/100;
+  double zd=(bbox.zmax()-bbox.zmin())/100;
+  bbox=CGAL::Bbox_3(bbox.xmin()-xd, bbox.ymin()-yd, bbox.zmin()-zd,
+                    bbox.xmax()+xd, bbox.ymax()+yd, bbox.zmax()+zd);
+  Polyhedron clipping_polyhedron=clip_bbox<Polyhedron>(bbox, p);
+
+  if (clipping_polyhedron.empty()) //no intersection, result is all or nothing
+  {
+    if (p.oriented_side(*P.points_begin())==ON_POSITIVE_SIDE)
+      return new Polyhedron();
+    else
+      return new Polyhedron(P);
+  }
+  Polyhedron copy(P);
+  return clip_polyhedron(copy, clipping_polyhedron);
+}
+
+namespace internal{
+
+template<class Polyhedron>
+struct Edge_is_marked4coref{
+  std::set<typename Polyhedron::Halfedge_handle>& marked_halfedges;
+  typedef bool value_type;
+  typedef value_type reference;
+  typedef std::pair<typename Polyhedron::Halfedge_handle,Polyhedron*> key_type;
+  typedef boost::read_write_property_map_tag category;
+
+  Edge_is_marked4coref(std::set<typename Polyhedron::Halfedge_handle>& mh)
+  : marked_halfedges(mh)
+  {}
+
+  friend reference get(Edge_is_marked4coref& map,const key_type& key) {
+    return map.marked_halfedges.count(key.first)!=0;
+  }
+  friend void put(Edge_is_marked4coref& map,key_type key,value_type v) {
+    if (v) map.marked_halfedges.insert(key.first);
+    else  map.marked_halfedges.erase(key.first);
+  }
+};
+
+template<class Polyhedron>
+struct Edge_is_marked{
+  const std::set<typename Polyhedron::Halfedge_handle>* marked_halfedges;
+  typedef bool value_type;
+  typedef value_type reference;
+  typedef typename boost::graph_traits<Polyhedron>::edge_descriptor key_type;
+  typedef boost::readable_property_map_tag category;
+
+  Edge_is_marked(){}
+  Edge_is_marked(const std::set<typename Polyhedron::Halfedge_handle>& mh)
+  : marked_halfedges(&mh)
+  {}
+
+  friend reference get(const Edge_is_marked& map,const key_type& key) {
+    return map.marked_halfedges->count(key.halfedge())!=0;
+  }
+};
+
+} //end of internal namespace
+
+template <class Polyhedron, class Plane_3>
+void inplace_clip_open_polyhedron(Polyhedron& P, const Plane_3& p)
+{
+  CGAL::Bbox_3 bbox( CGAL::bbox_3(P.points_begin(), P.points_end()) );
+  //extend the bbox a bit to avoid border cases
+  double xd=(bbox.xmax()-bbox.xmin())/100;
+  double yd=(bbox.ymax()-bbox.ymin())/100;
+  double zd=(bbox.zmax()-bbox.zmin())/100;
+  bbox=CGAL::Bbox_3(bbox.xmin()-xd, bbox.ymin()-yd, bbox.zmin()-zd,
+                    bbox.xmax()+xd, bbox.ymax()+yd, bbox.zmax()+zd);
+  Polyhedron clipping_polyhedron=clip_to_bbox<Polyhedron>(bbox, p);
+
+  if (clipping_polyhedron.empty()) //no intersection, result is all or nothing
+  {
+    if (p.oriented_side(*P.points_begin())==ON_POSITIVE_SIDE)
+      P.clear();
+    return;
+  }
+
+  // set for marking edges of P intersected by the clipping plane
+  std::set<typename Polyhedron::Halfedge_handle> marked_halfedges;
+  internal::Edge_is_marked4coref<Polyhedron> cr_edge_is_marked(marked_halfedges);
+  typedef typename Polyhedron::Traits::Kernel K;
+  typedef CGAL::Node_visitor_refine_polyhedra<
+            Polyhedron,K,internal::Edge_is_marked4coref<Polyhedron> >
+                  Split_visitor;
+    Split_visitor visitor(NULL, true, cr_edge_is_marked);
+    CGAL::Intersection_of_Polyhedra_3<Polyhedron,K,Split_visitor>
+      polyline_intersections(visitor);
+    CGAL::Emptyset_iterator emptyset_iterator;
+    // corefinement P and clipping_polyhedron
+    polyline_intersections(P,clipping_polyhedron,emptyset_iterator);
+
+    // extract connected components bounded by marked edges
+    internal::Edge_is_marked<Polyhedron> edge_is_marked(marked_halfedges);
+    namespace PMP=Polygon_mesh_processing;
+    std::map<typename Polyhedron::Face_handle, std::size_t> face_ccs;
+    std::size_t nb_cc=PMP::connected_components(P,
+      boost::make_assoc_property_map(face_ccs),
+      PMP::parameters::edge_is_constrained_map(edge_is_marked)
+        .face_index_map(get(boost::face_external_index,P))
+    );
+
+    // remove cc on the positive side of the plane
+    std::vector<bool> cc_handled(nb_cc, false);
+    std::vector<std::size_t> ccs_to_remove;
+    BOOST_FOREACH(typename Polyhedron::Face_handle f, faces(P))
+    {
+      std::size_t cc_id=face_ccs[f];
+      if (cc_handled[cc_id]) continue;
+
+      //look for a vertex not on the intersection
+      typename Polyhedron::Halfedge_handle h=f->halfedge();
+      for(int i=0;i<3;++i){
+        bool no_marked_edge=true;
+        BOOST_FOREACH(typename Polyhedron::Halfedge_handle h, halfedges_around_target(h, P))
+          if ( marked_halfedges.count(h) )
+            no_marked_edge=false;
+        if (no_marked_edge){
+          if ( p.oriented_side(h->vertex()->point())==ON_POSITIVE_SIDE )
+            ccs_to_remove.push_back(cc_id);
+          cc_handled[cc_id]=true;
+          if (--nb_cc==0) break;
+          break;
+        }
+        h=h->next();
+      }
+    }
+
+  //now remove the faces on the positive side
+  PMP::remove_connected_components(P,
+    ccs_to_remove,
+    boost::make_assoc_property_map(face_ccs),
+    PMP::parameters::vertex_index_map(get(boost::vertex_external_index,P))
+  );
+}
+
+} } // CGAL::corefinement
+
+
+#endif // CGAL_INTERNAL_POLYHEDRON_PLANE_CLIPPING_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Projection_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Projection_traits_3.h
new file mode 100644
index 0000000..038ed4f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Projection_traits_3.h
@@ -0,0 +1,724 @@
+// Copyright (c) 1997-2010  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Mariette Yvinec, Sebastien Loriot
+
+#ifndef CGAL_INTERNAL_PROJECTION_TRAITS_3_H
+#define CGAL_INTERNAL_PROJECTION_TRAITS_3_H
+
+#include <CGAL/assertions.h>
+
+#include <CGAL/Point_3.h>
+#include <CGAL/Segment_3.h>
+#include <CGAL/Triangle_3.h>
+
+#include <CGAL/Kernel/global_functions_2.h>
+
+namespace CGAL { 
+
+namespace internal {
+
+//project Point_3 along coordinate dim
+template <class R,int dim>
+struct Projector;
+
+//project onto yz
+template <class R>
+struct Projector<R,0>
+{
+  typedef typename R::Less_y_3                Less_x_2;
+  typedef typename R::Less_z_3                Less_y_2;
+  typedef typename R::Compare_y_3             Compare_x_2;
+  typedef typename R::Compare_z_3             Compare_y_2;
+  typedef typename R::Equal_y_3               Equal_x_2;
+  typedef typename R::Equal_z_3               Equal_y_2;  
+  
+  static typename R::FT x(const typename R::Point_3& p) {return p.y();}
+  static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+  static typename R::FT x(const typename R::Vector_3& p) {return p.y();}
+  static typename R::FT y(const typename R::Vector_3& p) {return p.z();}
+  static const int x_index=1;
+  static const int y_index=2;
+};
+//project onto xz
+template <class R>
+struct Projector<R,1>
+{
+  typedef typename R::Less_x_3                Less_x_2;
+  typedef typename R::Less_z_3                Less_y_2;
+  typedef typename R::Compare_x_3             Compare_x_2;
+  typedef typename R::Compare_z_3             Compare_y_2;  
+  typedef typename R::Equal_x_3               Equal_x_2;
+  typedef typename R::Equal_z_3               Equal_y_2;    
+  static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+  static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+  static typename R::FT x(const typename R::Vector_3& p) {return p.x();}
+  static typename R::FT y(const typename R::Vector_3& p) {return p.z();}
+  static const int x_index=0;
+  static const int y_index=2;  
+};
+
+//project onto xy
+template <class R>
+struct Projector<R,2>
+{
+  typedef typename R::Less_x_3                Less_x_2;
+  typedef typename R::Less_y_3                Less_y_2;
+  typedef typename R::Compare_x_3             Compare_x_2;
+  typedef typename R::Compare_y_3             Compare_y_2;  
+  typedef typename R::Equal_x_3               Equal_x_2;
+  typedef typename R::Equal_y_3               Equal_y_2;    
+  static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+  static typename R::FT y(const typename R::Point_3& p) {return p.y();}
+  static typename R::FT x(const typename R::Vector_3& p) {return p.x();}
+  static typename R::FT y(const typename R::Vector_3& p) {return p.y();}
+  static const int x_index=0;
+  static const int y_index=1;  
+};
+  
+
+
+template <class R,int dim>
+class Orientation_projected_3 
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
+
+  typename R::Point_2 project(const Point& p) const
+  {
+    return typename R::Point_2(x(p),y(p));
+  }
+
+  CGAL::Orientation operator()(const Point& p,
+			       const Point& q,
+			       const Point& r) const
+    {
+      return CGAL::orientation(project(p), project(q), project(r));
+    }
+};
+
+template <class R,int dim>
+class Side_of_oriented_circle_projected_3 
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
+
+
+  typename R::Point_2 project(const Point& p) const
+  {
+    return typename R::Point_2(x(p),y(p));
+  }
+  CGAL::Oriented_side operator() (const Point &p, 
+				  const Point &q,
+				  const Point &r, 
+				  const Point &s) const
+    {
+      return CGAL::side_of_oriented_circle(project(p),project(q),project(r),project(s) );
+    }
+};
+
+template <class R,int dim>
+class Side_of_bounded_circle_projected_3 
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT x(const Point &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point &p) const { return Projector<R,dim>::y(p); }
+
+
+  typename R::Point_2 project(const Point& p) const
+  {
+    return typename R::Point_2(x(p),y(p));
+  }
+  CGAL::Bounded_side operator() (const Point &p, 
+				  const Point &q,
+				  const Point &r, 
+				  const Point &s) const
+    {
+      return CGAL::side_of_bounded_circle(project(p),project(q),project(r),project(s) );
+    }
+
+    CGAL::Bounded_side operator() (const Point &p, 
+				  const Point &q,
+				  const Point &r) const
+    {
+      return CGAL::side_of_bounded_circle(project(p),project(q),project(r));
+    }
+};
+
+template <class R,int dim>
+class Compare_distance_projected_3
+{
+public:
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Point_2   Point_2;   
+  typedef typename R::FT        RT;
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  Comparison_result operator()(const Point_3& p,const Point_3& q,const Point_3& r) const
+  {
+    Point_2 p2 = project(p);
+    Point_2 q2 = project(q);
+    Point_2 r2 = project(r);
+    return compare_distance_to_point(p2,q2,r2);
+  }
+};
+
+template <class R,int dim>
+class Collinear_are_ordered_along_line_projected_3
+{
+public:
+  typedef typename R::Point_3   Point_3;
+  typedef typename R::Point_2   Point_2;
+  typedef typename R::FT        FT;
+  FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  bool operator()(const Point_3& p,const Point_3& q,const Point_3& r) const
+  {
+    Point_2 p2 = project(p);
+    Point_2 q2 = project(q);
+    Point_2 r2 = project(r);
+    return collinear_are_ordered_along_line(p2,q2,r2);
+  }
+};
+
+template <class R, int dim>
+class Less_signed_distance_to_line_projected_3
+{
+public:
+  typedef typename R::Point_3   Point_3;
+  typedef typename R::Point_2   Point_2;
+  typedef typename R::FT        RT;
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+  typedef bool result_type;
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  result_type operator()(const Point_3& p,
+                               const Point_3& q,
+                               const Point_3& r,
+                               const Point_3& s) const
+  {
+    return typename R::Less_signed_distance_to_line_2()
+      (  project(p), project(q), project(r), project(s) );
+  }
+};
+
+
+template <class R,int dim>
+class Squared_distance_projected_3
+{
+public:
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Point_2   Point_2; 
+  typedef typename R::Line_3    Line_3; 
+  typedef typename R::Line_2    Line_2;
+  typedef typename R::FT        RT;
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  RT operator()(const Point_3& p, const Point_3& q) const
+  {
+	  Point_2 p2(project(p));
+	  Point_2 q2(project(q));
+	  return squared_distance(p2, q2);
+  }
+
+  RT operator()(const Line_3& l, const Point_3& p) const
+  {
+    Point_2 p2(project(p));
+    Line_2 l2(project(l.point(0)), project(l.point(1)));
+    return squared_distance(p2, l2);
+  }
+};
+
+template <class R,int dim>
+class  Intersect_projected_3
+{
+public:
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Segment_3 Segment_3;
+  typedef typename R::Point_2   Point_2; 
+  typedef typename R::Vector_2  Vector_2; 
+  typedef typename R::Segment_2 Segment_2;
+  typedef typename R::FT        FT;
+  
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  FT alpha(const Point_2& p, const Point_2& source, const Point_2& target) const
+  {
+    FT dx = target.x() - source.x();
+    FT dy = target.y() - source.y();
+    return (CGAL::abs(dx)>CGAL::abs(dy)) ? ( p.x()-source.x() ) / dx : (p.y()-source.y() ) / dy;
+  }
+
+  Object operator()(const Segment_3& s1, const Segment_3& s2) const
+  {
+    Point_2 s1_source = project(s1.source());
+    Point_2 s1_target = project(s1.target());
+    Point_2 s2_source = project(s2.source());
+    Point_2 s2_target = project(s2.target());    
+    Segment_2 s1_2(s1_source, s1_target);
+    Segment_2 s2_2(s2_source, s2_target);
+    CGAL_precondition(!s1_2.is_degenerate());
+    CGAL_precondition(!s2_2.is_degenerate());
+    
+    //compute intersection points in projected plane
+    //We know that none of the segment is degenerate
+    Object o = intersection(s1_2,s2_2);
+    const Point_2* pi=CGAL::object_cast<Point_2>(&o);
+    if (pi==NULL) { //case of segment or empty
+      const Segment_2* si=CGAL::object_cast<Segment_2>(&o);
+      if (si==NULL) return Object();
+      FT src[3],tgt[3];
+      //the third coordinate is the midpoint between the points on s1 and s2
+      FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
+      FT z2 = s2.source()[dim] + ( alpha(si->source(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
+      src[dim] = (z1+z2) / FT(2);
+
+
+      z1 = s1.source()[dim] + ( alpha(si->target(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
+      z2 = s2.source()[dim] + ( alpha(si->target(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
+
+      tgt[dim] = (z1+z2) / FT(2);
+
+
+      src[Projector<R,dim>::x_index] = si->source().x();
+      src[Projector<R,dim>::y_index] = si->source().y();
+      tgt[Projector<R,dim>::x_index] = si->target().x();
+      tgt[Projector<R,dim>::y_index] = si->target().y();      
+      return make_object( Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) );
+    }
+    FT coords[3];
+    //compute the third coordinate of the projected intersection point onto 3D segments
+    FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] ));
+    FT z2 = s2.source()[dim] + ( alpha(*pi, s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] ));
+
+    coords[dim] = (z1+z2) / FT(2);
+    coords[Projector<R,dim>::x_index] = pi->x();
+    coords[Projector<R,dim>::y_index] = pi->y();
+    
+    Point_3 res(coords[0],coords[1],coords[2]);
+    CGAL_assertion(x(res)==pi->x() && y(res)==pi->y());
+    return make_object(res);
+  }
+};
+
+template <class R, int dim>
+class Circumcenter_center_projected
+{
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Point_2   Point_2;
+
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+  
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+  
+  Point_3 embed (const Point_2& p) const 
+  {
+    typename R::FT coords[3];
+    coords[Projector<R,dim>::x_index]=p.x();
+    coords[Projector<R,dim>::y_index]=p.y();
+    coords[dim]=typename R::FT(0);
+    return Point_3(coords[0],coords[1],coords[2]);
+  }
+  
+public:
+  Point_3 operator() (const Point_3& p1,const Point_3& p2) const
+  {
+    return embed( CGAL::circumcenter(project(p1),project(p2)) );
+  }
+
+  Point_3 operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
+  {
+    return embed( CGAL::circumcenter(project(p1),project(p2),project(p3)) );
+  }
+};
+
+template <class R, int dim>
+class Compute_area_projected
+{
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Point_2   Point_2;
+
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+  
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  
+public:
+  typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
+  {
+    return R().compute_area_2_object() ( project(p1),project(p2),project(p3) );
+  }
+};
+
+template <class R, int dim>
+class Compute_squared_radius_projected
+{
+  typedef typename R::Point_3   Point_3; 
+  typedef typename R::Point_2   Point_2;
+
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+  
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  
+public:
+  typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
+  {
+    return R().compute_squared_radius_2_object() ( project(p1),project(p2),project(p3) );
+  }
+  typename R::FT operator() (const Point_3& p1,const Point_3& p2) const
+  {
+    return R().compute_squared_radius_2_object() ( project(p1),project(p2) );
+  }
+
+  typename R::FT operator() (const Point_3& p1) const
+  {
+    return R().compute_squared_radius_2_object() ( project(p1) );
+  }
+};
+
+template <class R,int dim>
+class Compute_scalar_product_projected_3
+{
+public:
+  typedef typename R::Vector_3    Vector_3;
+  typedef typename R::FT          FT;
+  FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); }
+  FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); }
+
+  FT operator()(const Vector_3& v1, const Vector_3& v2) const
+  {
+    return x(v1)*x(v2) + y(v1)*y(v2);
+  }
+};
+
+template <class R,int dim>
+class Compute_squared_length_projected_3
+{
+  typedef typename R::Vector_3    Vector_3;
+  typedef typename R::FT          FT;
+
+  typedef FT result_type;
+
+  FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); }
+  FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); }
+
+public:
+  FT operator()(const Vector_3& v) const
+  {
+    return CGAL::square(x(v)) + CGAL::square(y(v));
+  }
+};
+
+template <class R, int dim>
+struct Angle_projected_3{
+  typedef typename R::Point_3   Point_3;
+  typedef typename R::Point_2   Point_2;
+
+  typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
+  typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
+
+  Point_2 project(const Point_3& p) const
+  {
+    return Point_2(x(p),y(p));
+  }
+
+  CGAL::Angle operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
+  {
+    return CGAL::angle(project(p), project(q), project(r));
+  }
+};
+
+template < class R, int dim >
+class Projection_traits_3 {
+public:
+  typedef Projection_traits_3<R,dim>   Traits;
+  typedef R                                                   Rp;
+  typedef typename R::FT                                      FT;
+  typedef typename Rp::Point_3                                Point_2;
+  typedef typename Rp::Segment_3                              Segment_2;
+  typedef typename Rp::Vector_3                               Vector_2;
+  typedef typename Rp::Triangle_3                             Triangle_2;
+  typedef typename Rp::Line_3                                 Line_2;
+  typedef typename Rp::Ray_3                                  Ray_2;
+
+  typedef typename Projector<R,dim>::Less_x_2                 Less_x_2;
+  typedef typename Projector<R,dim>::Less_y_2                 Less_y_2;
+  typedef typename Projector<R,dim>::Compare_x_2              Compare_x_2;
+  typedef typename Projector<R,dim>::Compare_y_2              Compare_y_2;
+  typedef Orientation_projected_3<Rp,dim>                     Orientation_2;
+  typedef Angle_projected_3<Rp,dim>                           Angle_2;
+  typedef Side_of_oriented_circle_projected_3<Rp,dim>         Side_of_oriented_circle_2;
+  typedef Less_signed_distance_to_line_projected_3<Rp,dim>    Less_signed_distance_to_line_2;
+  typedef Side_of_bounded_circle_projected_3<Rp,dim>          Side_of_bounded_circle_2;
+  typedef Compare_distance_projected_3<Rp,dim>                Compare_distance_2;
+  typedef Collinear_are_ordered_along_line_projected_3<Rp,dim> Collinear_are_ordered_along_line_2;
+  typedef Squared_distance_projected_3<Rp,dim>                Compute_squared_distance_2;
+  typedef Intersect_projected_3<Rp,dim>                       Intersect_2;
+  typedef Compute_squared_radius_projected<Rp,dim>            Compute_squared_radius_2;
+  typedef Compute_scalar_product_projected_3<Rp,dim>          Compute_scalar_product_2;
+  typedef Compute_squared_length_projected_3<Rp,dim>          Compute_squared_length_2;
+  typedef typename Rp::Construct_segment_3                    Construct_segment_2;
+  typedef typename Rp::Construct_translated_point_3           Construct_translated_point_2;
+  typedef typename Rp::Construct_midpoint_3                   Construct_midpoint_2;
+  typedef typename Rp::Construct_vector_3                     Construct_vector_2;
+  typedef typename Rp::Construct_scaled_vector_3              Construct_scaled_vector_2;
+  typedef typename Rp::Construct_triangle_3                   Construct_triangle_2;
+  typedef typename Rp::Construct_line_3                       Construct_line_2;
+
+  struct Less_xy_2 {
+    typedef bool result_type;
+    bool operator()(const Point_2& p, const Point_2& q) const
+    {
+      Compare_x_2 cx;
+      Comparison_result crx = cx(p,q);
+      if(crx == SMALLER){ return true;}
+      if(crx == LARGER){return false;}
+      Less_y_2 ly;
+      return ly(p,q);
+    }
+  };
+
+
+  struct Less_yx_2 {
+    typedef bool result_type;
+    bool operator()(const Point_2& p, const Point_2& q) const
+    {
+      Compare_y_2 cy;
+      Comparison_result cry = cy(p,q);
+      if(cry == SMALLER){ return true;}
+      if(cry == LARGER){return false;}
+      Less_x_2 lx;
+      return lx(p,q);
+    }
+  };
+
+  struct Equal_2 {
+    typedef bool result_type;
+    bool operator()(const Point_2& p, const Point_2& q) const
+    {
+      
+      Equal_x_2 eqx;
+      Equal_y_2 eqy;
+      return eqx(p,q) & eqy(p,q);
+    }
+  };
+
+  struct Left_turn_2 {
+    typedef bool result_type;
+    bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
+    {
+      
+      Orientation_2 ori;
+      return ori(p,q,r) == LEFT_TURN;
+    }
+  };
+
+  struct Collinear_2 {
+    typedef bool result_type;
+    bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
+    {
+      Orientation_2 ori;
+      return ori(p,q,r) == COLLINEAR;
+    }
+  };
+
+  //for natural_neighbor_coordinates_2
+  typedef typename Projector<R,dim>::Equal_x_2                Equal_x_2;
+  typedef typename Projector<R,dim>::Equal_y_2                Equal_y_2;
+  typedef Circumcenter_center_projected<Rp,dim>               Construct_circumcenter_2;
+  typedef Compute_area_projected<Rp,dim>                      Compute_area_2;
+  Construct_circumcenter_2 construct_circumcenter_2_object () const {return Construct_circumcenter_2();}
+  Compute_area_2 compute_area_2_object () const {return Compute_area_2();}  
+  
+
+  // for compatibility with previous versions
+  typedef Point_2      Point;
+  typedef Segment_2    Segment;
+  typedef Triangle_2   Triangle;
+
+  Projection_traits_3(){}
+  Projection_traits_3(
+		   const Projection_traits_3&){}
+  Projection_traits_3 &operator=(
+	    const Projection_traits_3&){return *this;}
+
+  typename Rp::FT x(const Point_2 &p) const { return Projector<R,dim>::x(p); }
+  typename Rp::FT y(const Point_2 &p) const { return Projector<R,dim>::y(p); }
+    
+ 
+ Equal_2
+  equal_2_object() const
+    { return Equal_2();}
+
+  Left_turn_2
+  left_turn_2_object() const
+    { return Left_turn_2();}
+
+  Less_x_2
+  less_x_2_object() const
+    { return Less_x_2();}
+
+  Less_xy_2
+  less_xy_2_object() const
+    { return Less_xy_2();}
+
+  Less_yx_2
+  less_yx_2_object() const
+    { return Less_yx_2();}
+
+  Less_signed_distance_to_line_2
+    less_signed_distance_to_line_2_object() const
+    {return Less_signed_distance_to_line_2();}
+
+  Less_y_2
+  less_y_2_object() const
+    { return Less_y_2();}
+  Compare_x_2
+  compare_x_2_object() const
+    { return Compare_x_2();}
+  Angle_2
+  angle_2_object() const {
+	  return Angle_2();
+  }
+
+  Compare_y_2
+  compare_y_2_object() const
+    { return Compare_y_2();}
+
+  Orientation_2
+  orientation_2_object() const
+    { return Orientation_2();}
+
+  Side_of_oriented_circle_2
+  side_of_oriented_circle_2_object() const
+    {return Side_of_oriented_circle_2();}
+
+  Side_of_bounded_circle_2
+  side_of_bounded_circle_2_object() const
+    {return Side_of_bounded_circle_2();}
+
+  Compare_distance_2
+  compare_distance_2_object() const
+  {
+    return Compare_distance_2();
+  }
+
+  Compute_squared_distance_2
+  compute_squared_distance_2_object () const
+  {
+    return Compute_squared_distance_2();
+  }
+
+  Compute_squared_radius_2
+  compute_squared_radius_2_object () const
+  {
+    return Compute_squared_radius_2();
+  }
+
+  Intersect_2
+  intersect_2_object () const
+  {
+    return Intersect_2();
+  }
+
+  Construct_segment_2  construct_segment_2_object() const
+    {return Construct_segment_2();}
+
+  Construct_translated_point_2  construct_translated_point_2_object() const
+    {return Construct_translated_point_2();}
+
+  Construct_midpoint_2  construct_midpoint_2_object() const
+    {return Construct_midpoint_2();}
+
+  Construct_vector_2  construct_vector_2_object() const
+    {return Construct_vector_2();}
+
+  Construct_scaled_vector_2  construct_scaled_vector_2_object() const
+    {return Construct_scaled_vector_2();}
+
+  Construct_triangle_2  construct_triangle_2_object() const
+    {return Construct_triangle_2();}
+    
+  Construct_line_2  construct_line_2_object() const
+    {return Construct_line_2();}
+
+  Compute_scalar_product_2 compute_scalar_product_2_object() const
+    {return Compute_scalar_product_2();}
+
+  Collinear_2 collinear_2_object() const
+    {return Collinear_2();}
+
+  Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const
+    {return Collinear_are_ordered_along_line_2();}
+
+  Compute_squared_length_2 compute_squared_length_2_object() const
+    {return Compute_squared_length_2();}
+
+};
+  
+
+} } //namespace CGAL::internal
+
+#endif // CGAL_INTERNAL_PROJECTION_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Regular_triangulation_filtered_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Regular_triangulation_filtered_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Regular_triangulation_filtered_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Regular_triangulation_filtered_traits_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Rich_grid.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Rich_grid.h
new file mode 100644
index 0000000..8a4188d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Rich_grid.h
@@ -0,0 +1,514 @@
+// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez  
+
+#ifndef CGAL_RICH_GRID_H
+#define CGAL_RICH_GRID_H
+
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Point_3.h>
+#include <CGAL/Vector_3.h>
+#include <CGAL/Origin.h>
+#include <CGAL/value_type_traits.h>
+
+#include <iterator>
+#include <algorithm>
+#include <cmath>
+#include <ctime>
+
+namespace CGAL {
+
+/// \cond SKIP_IN_MANUAL
+
+// ----------------------------------------------------------------------------
+// Rich Grid section
+// ----------------------------------------------------------------------------
+//namespace rich_grid_internal{
+
+namespace rich_grid_internal{
+ 
+/// The Rich_point class represents a 3D point with inedxes of neighbor points;
+/// - a position,
+/// - an index.
+/// - self point set neighbors.
+/// - other point set neighbors.
+///
+/// @heading Parameters:
+/// @param Kernel       Geometric traits class.
+template <typename Kernel>
+class Rich_point
+{
+public:
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+
+public:
+  Rich_point(const Point& p = CGAL::ORIGIN,
+             int i = 0,
+             const Vector& n = CGAL::NULL_VECTOR
+             ):pt(p), index(i), normal(n){} 
+  
+  ~Rich_point()
+  {
+    neighbors.clear();
+    original_neighbors.clear();
+  }
+
+public:
+  Point pt;
+  unsigned int index;
+  Vector normal;
+  std::vector<unsigned int> neighbors;
+  std::vector<unsigned int> original_neighbors;//it's not necessary
+};
+
+template <typename Kernel>
+class Rich_grid 
+{
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::FT FT;
+  typedef std::vector<Rich_point<Kernel>*> Point_ptr_vector;
+  typedef typename Point_ptr_vector::iterator iterator;
+
+public:
+
+  Rich_grid() {}
+
+  void init(std::vector<Rich_point<Kernel> > &vert,
+            CGAL::Bbox_3 bbox,
+            const FT _radius); 
+
+  // Travel for the point set itself 
+  void travel_itself(void (*self)(iterator starta, iterator enda, FT radius),
+                    void (*other)(iterator starta, iterator enda, 
+                    iterator startb, iterator endb, FT radius));
+
+  // Travel other self between two point set(original and samples) 
+  void travel_others(Rich_grid &points, 
+                     void (*travel_others)(iterator starta, 
+                                           iterator enda, 
+                                           iterator startb, 
+                                           iterator endb, 
+                                           FT radius));
+
+
+  // functions for neighborhood searching
+  static void find_original_neighbors(iterator starta, 
+                                              iterator enda, 
+                                              iterator startb,
+                                              iterator endb, 
+                                              FT radius);
+
+  static void find_self_neighbors(iterator start, 
+                                           iterator end, 
+                                           FT radius);
+ 
+  static void find_other_neighbors(iterator starta, 
+                                            iterator enda, 
+                                            iterator startb, 
+                                            iterator endb, 
+                                            FT radius);
+
+private:
+  
+  std::vector<Rich_point<Kernel>*> rich_points;  
+  std::vector<int> indices;   
+  int x_side, y_side, z_side;
+  FT radius;
+
+  int cell(int x, int y, int z) { return x + x_side * (y + y_side * z); }
+  bool is_empty(int cell) { return indices[cell+1] == indices[cell]; }
+
+  iterator get_start_iter(int origin) 
+  { 
+    return rich_points.begin() + indices[origin]; 
+  }  
+
+  iterator get_end_iter(int origin) 
+  { 
+    return rich_points.begin() + indices[origin+1]; 
+  }
+};
+
+
+template <typename Kernel>
+class X_Sort {
+public:
+  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
+    return a->pt.x() < b->pt.x();
+  }
+};
+
+template <typename Kernel>
+class Y_Sort {
+public:
+  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
+    return a->pt.y() < b->pt.y();
+  }
+};
+
+template <typename Kernel>
+class Z_Sort {
+public:
+  bool operator()(const Rich_point<Kernel> *a, const Rich_point<Kernel> *b) {
+    return a->pt.z() < b->pt.z();
+  }
+};
+
+
+// divide spoints into some grids
+// and each grid has their points index in the index vector of sample.
+template <typename Kernel>
+void Rich_grid<Kernel>::init(std::vector<Rich_point<Kernel> > &vert, 
+                             CGAL::Bbox_3 bbox,
+                             const typename Kernel::FT _radius) 
+{
+  typedef typename Kernel::FT FT;
+
+  rich_points.resize(vert.size());
+  for(size_t i = 0; i < rich_points.size(); ++i)
+  {
+    rich_points[i] = &vert[i];
+  }
+
+  radius = _radius;
+
+  x_side = (unsigned int)ceil((bbox.xmax() - bbox.xmin()) / radius);
+  y_side = (unsigned int)ceil((bbox.ymax() - bbox.ymin()) / radius);
+  z_side = (unsigned int)ceil((bbox.zmax() - bbox.zmin()) / radius);
+
+  x_side = (x_side > 0) ? x_side : 1;
+  y_side = (y_side > 0) ? y_side : 1;
+  z_side = (z_side > 0) ? z_side : 1;
+
+  indices.resize(x_side * y_side * z_side + 1, -1);  
+
+  std::sort(rich_points.begin(), rich_points.end(), Z_Sort<Kernel>()); 
+
+  unsigned int start_z = 0;
+  for(int z = 0; z < z_side; z++) 
+  {
+    unsigned int end_z = start_z;
+    FT max_z = static_cast<FT>(bbox.zmin() + FT(z+1)*radius);
+    while(end_z < rich_points.size() && rich_points[end_z]->pt.z() < max_z)
+      ++end_z; 
+
+    sort(rich_points.begin() + start_z, 
+         rich_points.begin() + end_z, Y_Sort<Kernel>());
+
+    unsigned int start_y = start_z;
+    for(int y = 0; y < y_side; y++) 
+    {
+      unsigned int end_y = start_y;        
+      FT max_y = static_cast<FT>(bbox.ymin() + FT(y+1) * radius);
+      while(end_y < end_z && rich_points[end_y]->pt.y() < max_y)
+        ++end_y;
+
+      sort(rich_points.begin() + start_y, 
+           rich_points.begin() + end_y, X_Sort<Kernel>());
+
+      unsigned int start_x = start_y;
+      for(int x = 0; x < x_side; x++) 
+      {
+        unsigned int end_x = start_x;
+        indices[x + x_side * y + x_side * y_side * z] = end_x;          
+        FT max_x = static_cast<FT>(bbox.xmin() + FT(x+1) * radius);
+        while(end_x < end_y && rich_points[end_x]->pt.x() < max_x)
+          ++end_x;
+
+        start_x = end_x;
+      }
+      start_y = end_y;
+    }
+    start_z = end_z;
+  }
+
+  //compute the last grid's range
+  indices[x_side * y_side * z_side] = start_z;
+}
+
+/// define how to travel in the same grid 
+template <typename Kernel>
+void Rich_grid<Kernel>::travel_itself(
+  void (*self)(iterator starta, iterator enda, 
+               const typename Kernel::FT radius),
+  void (*other)(iterator starta, iterator enda, 
+  iterator startb, iterator endb, FT radius)
+) 
+{
+  static int corner[8*3] = { 0, 0, 0,  1, 0, 0,  0, 1, 0,  0, 0, 1,
+    0, 1, 1,  1, 0, 1,  1, 1, 0,  1, 1, 1 };
+
+  static int diagonals[14*2] = { 0, 0, //remove this to avoid self intesextion
+    0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
+    2, 3, 1, 3, 1, 2,                       
+    1, 4, 2, 5, 3, 6 };
+
+  for(int z = 0; z < z_side; z++) {
+    for(int y = 0; y < y_side; y++) {
+      for(int x = 0; x < x_side; x++) {
+        int origin = cell(x, y, z);
+        self(get_start_iter(origin), get_end_iter(origin), radius);   
+        // compute between other girds
+        for(int d = 2; d < 28; d += 2) { // skipping self
+          int *cs = corner + 3*diagonals[d];
+          int *ce = corner + 3*diagonals[d+1];
+          if((x + cs[0] < x_side) && (y + cs[1] < y_side) && (z + cs[2] < z_side) 
+          && (x + ce[0] < x_side) && (y + ce[1] < y_side) && (z + ce[2] < z_side)) 
+          {
+            origin = cell(x+cs[0], y+cs[1], z+cs[2]);
+            int dest = cell(x+ce[0], y+ce[1], z+ce[2]);
+            other(get_start_iter(origin), get_end_iter(origin), 
+                  get_start_iter(dest),   get_end_iter(dest), radius);        
+          }
+        }   
+      }
+    }
+  }
+}
+
+/// define how to travel in other gird 
+template <typename Kernel>
+void Rich_grid<Kernel>::travel_others(
+  Rich_grid &points, 
+  void (*travel_others)(iterator starta, iterator enda, 
+                        iterator startb, iterator endb, 
+                        const typename Kernel::FT radius)
+) 
+{
+  static int corner[8*3] = { 0, 0, 0,  1, 0, 0,  0, 1, 0,  0, 0, 1,
+    0, 1, 1,  1, 0, 1,  1, 1, 0,  1, 1, 1 };
+
+  static int diagonals[14*2] = { 0, 0, //remove this to avoid self intesextion
+    0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
+    2, 3, 1, 3, 1, 2,                       
+    1, 4, 2, 5, 3, 6 };
+
+  for(int z = 0; z < z_side; z++) {
+    for(int y = 0; y < y_side; y++) {
+      for(int x = 0; x < x_side; x++) {     
+        int origin = cell(x, y, z);  
+
+
+        if(!is_empty(origin) && !points.is_empty(origin)) 
+          travel_others(get_start_iter(origin), get_end_iter(origin), 
+          points.get_start_iter(origin), points.get_end_iter(origin), radius);  
+
+
+        for(int d = 2; d < 28; d += 2) { //skipping self
+          int *cs = corner + 3*diagonals[d];
+          int *ce = corner + 3*diagonals[d+1];
+          if((x+cs[0] < x_side) && (y+cs[1] < y_side) && (z+cs[2] < z_side) &&
+            (x+ce[0] < x_side) && (y+ce[1] < y_side) && (z+ce[2] < z_side)) {
+
+              origin   = cell(x+cs[0], y+cs[1], z+cs[2]);
+
+              int dest = cell(x+ce[0], y+ce[1], z+ce[2]);
+
+              if(!is_empty(origin) && !points.is_empty(dest))        
+                  travel_others(get_start_iter(origin), 
+                                get_end_iter(origin), 
+                                points.get_start_iter(dest),   
+                                points.get_end_iter(dest), 
+                                radius); 
+
+              if(!is_empty(dest) && !points.is_empty(origin))  
+                  travel_others(get_start_iter(dest), 
+                                get_end_iter(dest), 
+                                points.get_start_iter(origin),   
+                                points.get_end_iter(origin), 
+                                radius);        
+          }
+        }      
+      }
+    }
+  }
+}
+
+/// grid travel function to find the neighbors in the original point set
+template <typename Kernel>
+void Rich_grid<Kernel>::find_original_neighbors(
+    iterator starta, 
+    iterator enda, 
+    iterator startb, 
+    iterator endb,
+    FT radius
+)
+{
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::FT FT;
+  FT radius2 = radius*radius;
+
+  iterator dest;
+  for(dest = starta; dest != enda; dest++) 
+  {
+    Rich_point<Kernel> &v = *(*dest);
+
+    Point &p = v.pt;
+
+    iterator origin;
+    for(origin = startb; origin != endb; origin++)
+    {
+      Rich_point<Kernel> &t = *(*origin);
+      Point &q = t.pt;
+
+      FT dist2 = CGAL::squared_distance(p, q);
+
+      if(dist2 < radius2) 
+      {                          
+        v.original_neighbors.push_back((*origin)->index);
+      }
+    }
+  }
+}
+
+/// grid travel function to find the neighbors in the same point set
+template <typename Kernel>
+void Rich_grid<Kernel>::find_self_neighbors(
+    iterator start, iterator end, FT radius)
+{
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::FT FT;
+  FT radius2 = radius*radius;
+  for(iterator dest = start; dest != end; dest++)
+  {
+    Rich_point<Kernel> &v = *(*dest);
+    Point &p = v.pt;
+
+    for(iterator origin = dest+1; origin != end; origin++)
+    {
+      Rich_point<Kernel> &t = *(*origin);
+      Point &q = t.pt;
+
+      FT dist2 = CGAL::squared_distance(p, q);
+
+      if(dist2 < radius2) 
+      {   
+        v.neighbors.push_back((*origin)->index);
+        t.neighbors.push_back((*dest)->index);
+      }
+    }
+  }
+}
+
+/// grid travel function to find the neighbors in the same point set
+template <typename Kernel>
+void Rich_grid<Kernel>::find_other_neighbors(
+  iterator starta, iterator enda, 
+  iterator startb, iterator endb, FT radius)
+{
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::FT FT;
+  FT radius2 = radius*radius;
+  for(iterator dest = starta; dest != enda; dest++)
+  {
+    Rich_point<Kernel> &v = *(*dest);
+    Point &p = v.pt;
+
+    for(iterator origin = startb; origin != endb; origin++)
+    {
+      Rich_point<Kernel> &t = *(*origin);
+      Point &q = t.pt;
+
+      FT dist2 = CGAL::squared_distance(p, q);
+
+      if(dist2 < radius2) 
+      {   
+        v.neighbors.push_back((*origin)->index);
+        t.neighbors.push_back((*dest)->index);
+      }
+    }
+  }
+}
+
+
+
+
+/// Compute ball neighbors for each point in the same point set.
+/// 
+/// \pre `radius > 0`
+///
+/// @tparam Kernel Geometric traits class.
+///
+/// @return 
+template <typename Kernel>
+void compute_ball_neighbors_one_self(
+  std::vector<Rich_point<Kernel> >& points, ///< sample point set
+  CGAL::Bbox_3 bbox, ///< bounding box
+  const typename Kernel::FT radius)
+{
+  CGAL_point_set_processing_precondition(radius > 0);
+
+  for (unsigned int i = 0; i < points.size(); ++i)
+  {
+    points[i].neighbors.clear();
+  }
+
+  Rich_grid<Kernel> points_grid;
+  points_grid.init(points, bbox, radius);
+  points_grid.travel_itself(Rich_grid<Kernel>::find_self_neighbors, 
+                            Rich_grid<Kernel>::find_other_neighbors);
+}
+
+/// Compute ball neighbors for each (sample)points in the other point set
+/// 
+/// \pre `radius > 0`
+///
+/// @tparam Kernel Geometric traits class.
+///
+/// @return 
+template <typename Kernel>
+void compute_ball_neighbors_one_to_another(
+  std::vector<Rich_point<Kernel> >& samples, ///< sample point set
+  std::vector<Rich_point<Kernel> >& original,///< original point set
+  CGAL::Bbox_3 bbox, ///< bounding box
+  const typename Kernel::FT radius ///< neighbor radius
+)
+{
+  typedef typename Kernel::FT FT;
+  if (radius < FT(0.0))
+  {
+    return;
+  }
+
+  for (unsigned int i = 0; i < samples.size(); ++i)
+  {
+    samples[i].original_neighbors.clear();
+  }
+
+  Rich_grid<Kernel> samples_grid;
+  samples_grid.init(samples, bbox, radius);
+
+  // here can be initial the original grid just one time ?
+  Rich_grid<Kernel> original_grid;
+  original_grid.init(original, bbox, radius);
+
+  samples_grid.travel_others(original_grid, 
+                             Rich_grid<Kernel>::find_original_neighbors);
+}
+
+
+} //namespace rich_grid_internal
+
+/// \endcond
+
+} //namespace CGAL
+
+#endif // CGAL_RICH_GRID_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Angle_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Angle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Angle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Angle_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h
new file mode 100644
index 0000000..d833cdc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h
@@ -0,0 +1,424 @@
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+// This predicates was generated using the fpg tool written by Andreas Meyer.
+//
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
+#define CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+#include <cmath>
+
+namespace CGAL { namespace internal { namespace Static_filters_predicates {
+  
+  template <typename K_base>
+  class Compare_squared_radius_3
+    : public K_base::Compare_squared_radius_3
+  {
+    typedef typename K_base::Point_3 Point_3;
+    typedef typename K_base::FT FT;
+    typedef typename K_base::Compare_squared_radius_3 Base;
+  public:
+    typedef typename Base::result_type result_type;
+  
+    #ifndef CGAL_CFG_MATCHING_BUG_6
+    using Base::operator();
+    #else 
+    result_type
+    operator()(const Point_3& p, const FT& w) const
+    { 
+      return Base::operator()(p,w);
+    }
+    #endif
+    
+    
+    result_type operator() (
+        const Point_3& p, 
+        const Point_3& q, 
+        const Point_3& r, 
+        const Point_3& s,
+        const FT& w
+    ) const {
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 4 points", tmp);
+
+      Get_approx<Point_3> get_approx; // Identity functor for all points
+                                      // but lazy ones.
+      Get_approx<FT> get_approx_ft; // Identity functor for all FT
+                                    // but Lazy ones.
+
+      double px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, alpha;
+      init_double(px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, alpha, (FT*)(0));
+
+      if( fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py)      &&
+          fit_in_double(get_approx(p).z(), pz) && 
+          fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy)      &&
+          fit_in_double(get_approx(q).z(), qz) && 
+          fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry)      &&
+          fit_in_double(get_approx(r).z(), rz) && 
+          fit_in_double(get_approx(s).x(), sx) && fit_in_double(get_approx(s).y(), sy)      &&
+          fit_in_double(get_approx(s).z(), sz) && 
+          fit_in_double(get_approx_ft(w), alpha)
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        double qpx;
+        qpx = (qx - px);
+        double qpy;
+        qpy = (qy - py);
+        double qpz;
+        qpz = (qz - pz);
+        double qp2;
+        qp2 = ((square( qpx ) + square( qpy )) + square( qpz ));
+        double rpx;
+        rpx = (rx - px);
+        double rpy;
+        rpy = (ry - py);
+        double rpz;
+        rpz = (rz - pz);
+        double rp2;
+        rp2 = ((square( rpx ) + square( rpy )) + square( rpz ));
+        double spx;
+        spx = (sx - px);
+        double spy;
+        spy = (sy - py);
+        double spz;
+        spz = (sz - pz);
+        double sp2;
+        sp2 = ((square( spx ) + square( spy )) + square( spz ));
+        double num_x;
+        num_x = CGAL::determinant( qpy, qpz, qp2, rpy, rpz, rp2, spy, spz, sp2 );
+        double num_y;
+        num_y = CGAL::determinant( qpx, qpz, qp2, rpx, rpz, rp2, spx, spz, sp2 );
+        double num_z;
+        num_z = CGAL::determinant( qpx, qpy, qp2, rpx, rpy, rp2, spx, spy, sp2 );
+        double den;
+        den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, spx, spy, spz );
+        int int_tmp_result;
+        double double_tmp_result;
+        double eps;
+        double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den )));
+        double max1;
+        double aqpx = CGAL::abs(qpx);
+        double aqpz = CGAL::abs(qpz);
+
+        double arpx = CGAL::abs(rpx);
+        double arpy = CGAL::abs(rpy);
+        double arpz = CGAL::abs(rpz);
+
+        double aspx = CGAL::abs(spx);
+        double aspy = CGAL::abs(spy);
+        double aspz = CGAL::abs(spz);
+
+        double max2 = CGAL::abs(qpy);
+        if( (max2 < aqpz) )
+        {
+            max2 = aqpz;
+        } 
+        if( (max2 < arpy) )
+        {
+            max2 = arpy;
+        } 
+        if( (max2 < arpz) )
+        {
+            max2 = arpz;
+        } 
+        if( (max2 < aspy) )
+        {
+            max2 = aspy;
+        } 
+        if( (max2 < aspz) )
+        {
+            max2 = aspz;
+        } 
+        max1 = max2;
+        if( (max1 < aqpx) )
+        {
+            max1 = aqpx;
+        } 
+        if( (max1 < arpx) )
+        {
+            max1 = arpx;
+        } 
+        if( (max1 < aspx) )
+        {
+            max1 = aspx;
+        } 
+        double max3 = CGAL::abs(alpha);
+        double lower_bound_1;
+        double upper_bound_1;
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max2 < lower_bound_1) )
+        {
+            lower_bound_1 = max2;
+        } 
+        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
+        //if( ((lower_bound_1 < 1.00913582207214915294e-37) || (max3 < 1.01835510738923227819e-74)) )
+        if( ((lower_bound_1 < 1.00913582207214915294e-37) || (max3 < 1.01835510738923227819e-74 && max3!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,s,w);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 2.59614842926741294957e+33) || (max3 > 6.73998666678765545893e+66)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,s,w);
+            } 
+            eps = (2.92119946853791784711e-12 * ((((((max1 * max1) * max1) * max1) * max1) * max2) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = 1;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,s,w);
+                } 
+            } 
+        } 
+        return static_cast<Sign>(int_tmp_result);
+      }
+      else
+        return Base::operator()(p,q,r,s,w);
+    }
+    
+    result_type operator() (
+        const Point_3& p, 
+        const Point_3& q, 
+        const Point_3& s,
+        const FT& w
+    ) const {
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 3 points", tmp);
+      
+      double px, py, pz, qx, qy, qz, sx, sy, sz, alpha;
+      init_double(px, py, pz, qx, qy, qz, sx, sy, sz, alpha, (FT*)(0));
+
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
+          fit_in_double(p.z(), pz) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
+          fit_in_double(q.z(), qz) && 
+          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)      &&
+          fit_in_double(s.z(), sz) && 
+          fit_in_double(w, alpha)
+        )
+      {   
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        double psx;
+        psx = (px - sx);
+        double psy;
+        psy = (py - sy);
+        double psz;
+        psz = (pz - sz);
+        double ps2;
+        ps2 = ((square( psx ) + square( psy )) + square( psz ));
+        double qsx;
+        qsx = (qx - sx);
+        double qsy;
+        qsy = (qy - sy);
+        double qsz;
+        qsz = (qz - sz);
+        double qs2;
+        qs2 = ((square( qsx ) + square( qsy )) + square( qsz ));
+        double rsx;
+        rsx = ((psy * qsz) - (psz * qsy));
+        double rsy;
+        rsy = ((psz * qsx) - (psx * qsz));
+        double rsz;
+        rsz = ((psx * qsy) - (psy * qsx));
+        double num_x;
+        num_x = ((ps2 * CGAL::determinant( qsy, qsz, rsy, rsz )) - (qs2 * CGAL::determinant( psy, psz, rsy, rsz )));
+        double num_y;
+        num_y = ((ps2 * CGAL::determinant( qsx, qsz, rsx, rsz )) - (qs2 * CGAL::determinant( psx, psz, rsx, rsz )));
+        double num_z;
+        num_z = ((ps2 * CGAL::determinant( qsx, qsy, rsx, rsy )) - (qs2 * CGAL::determinant( psx, psy, rsx, rsy )));
+        double den;
+        den = CGAL::determinant( psx, psy, psz, qsx, qsy, qsz, rsx, rsy, rsz );
+        int int_tmp_result;
+        double double_tmp_result;
+        double eps;
+        double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den )));
+        double max1;
+        double max2 = CGAL::abs(psx);
+        double apsy = CGAL::abs(psy);
+        double apsz = CGAL::abs(psz);
+
+        double aqsx = CGAL::abs(qsx);
+        double aqsy = CGAL::abs(qsy);
+        double aqsz = CGAL::abs(qsz);
+
+        if( (max2 < apsy) )
+        {
+            max2 = apsy;
+        } 
+        if( (max2 < aqsx) )
+        {
+            max2 = aqsx;
+        } 
+        if( (max2 < aqsy) )
+        {
+            max2 = aqsy;
+        } 
+        max1 = max2;
+        if( (max1 < apsz) )
+        {
+            max1 = apsz;
+        } 
+        if( (max1 < aqsz) )
+        {
+            max1 = aqsz;
+        } 
+        double max3 = CGAL::abs(alpha);
+        double lower_bound_1;
+        double upper_bound_1;
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max2 < lower_bound_1) )
+        {
+            lower_bound_1 = max2;
+        }
+
+        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
+        //if( ((lower_bound_1 < 2.26156385701827020260e-30) || (max3 < 5.11467107937135531427e-60)) )
+        if( ((lower_bound_1 < 2.26156385701827020260e-30) || (max3 < 5.11467107937135531427e-60 && max3!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,s,w);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 1.23794003928538000002e+27) || (max3 > 1.53249554086588817779e+54)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,s,w);
+            } 
+            eps = (6.35705373458387935514e-12 * ((((((((max1 * max1) * max2) * max1) * max1) * max1) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = 1;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,s,w);
+                } 
+            } 
+        } 
+        return static_cast<result_type>(int_tmp_result);
+      }
+      else
+        return Base::operator()(p,q,s,w);
+    }
+
+
+    result_type operator() (
+        const Point_3& p, 
+        const Point_3& q, 
+        const FT& w
+    ) const {
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_squared_radius_3 with 2 points", tmp);
+      
+      double px, py, pz, qx, qy, qz, alpha;
+      init_double(px, py, pz, qx, qy, qz, alpha, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
+          fit_in_double(p.z(), pz) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
+          fit_in_double(q.z(), qz) && 
+          fit_in_double(w, alpha)
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        double px_qx = (px - qx);
+        double py_qy = (py - qy);
+        double pz_qz = (pz - qz);
+        int int_tmp_result;
+        double double_tmp_result;
+        double eps;
+        double_tmp_result = (((square( px_qx ) + square( py_qy )) + square( pz_qz )) - (alpha * 4.00000000000000000000e+00));
+        double max1 = CGAL::abs(px_qx);
+        double apy_qy = CGAL::abs(py_qy);
+        double apz_qz = CGAL::abs(pz_qz);
+        if( (max1 < apy_qy) )
+        {
+            max1 = apy_qy;
+        } 
+        if( (max1 < apz_qz) )
+        {
+            max1 = apz_qz;
+        } 
+        double max2 = CGAL::abs(alpha);
+        
+        //handwritten workaround to handle case of alpha=0 (variable alone in its group)
+        //if( ((max1 < 8.85464260923320109378e-147) || (max2 < 7.84046957372481590760e-293)) )
+        if( ((max1 < 8.85464260923320109378e-147) || (max2 < 7.84046957372481590760e-293 && max2!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,w);
+        } 
+        else 
+        {
+            if( ((max1 > 2.23974474217780371323e+102) || (max2 > 5.01645651011311642768e+204)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,w);
+            } 
+            eps = (2.11094186805729591487e-15 * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max2, (max1 * max1) ));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = 1;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,w);
+                } 
+            } 
+        } 
+        return static_cast<Sign>(int_tmp_result);
+      }
+      else
+        return Base::operator()(p,q,w);
+    }
+    
+  };
+
+} } } // namespace CGAL::internal::Static_filters_predicates
+ 
+#endif // CGAL_INTERNAL_STATIC_FILTERS_COMPARE_SQUARED_RADIUS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h
new file mode 100644
index 0000000..8223733
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h
@@ -0,0 +1,399 @@
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+// This predicates was generated using the fpg tool written by Andreas Meyer.
+//
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
+#define CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+#include <cmath>
+
+
+namespace CGAL { namespace internal { namespace Static_filters_predicates {
+  
+  
+  template <typename K_base>
+  class Compare_weighted_squared_radius_3:
+    public K_base::Compare_weighted_squared_radius_3
+  {
+    typedef typename K_base::Weighted_point_3 Weighted_point_3;
+    typedef typename K_base::FT FT;
+    typedef typename K_base::Compare_weighted_squared_radius_3 Base;
+  public:
+    typedef typename Base::result_type result_type;
+  
+    #ifndef CGAL_CFG_MATCHING_BUG_6
+    using Base::operator();
+    #else 
+    result_type
+    operator()(const Weighted_point_3& p, const FT& w) const
+    { 
+      return Base::operator()(p,w);
+    }
+    #endif
+    
+    
+    result_type operator() (
+        const Weighted_point_3& p, 
+        const Weighted_point_3& q, 
+        const Weighted_point_3& r, 
+        const Weighted_point_3& s,
+        const FT& w
+    ) const {
+
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 4 wpoints", tmp);
+      
+      double px, py, pz, pw, qx, qy, qz, qw, rx, ry, rz, rw, sx, sy, sz, sw, alpha;
+      init_double(px, py, pz, pw, qx, qy, qz, qw, (FT*)(0));
+      init_double(rx, ry, rz, rw, sx, sy, sz, sw, alpha, (FT*)(0));
+
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
+          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)      &&
+          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rw) &&
+          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)      &&
+          fit_in_double(s.z(), sz) && fit_in_double(s.weight(), sw) && 
+          fit_in_double(w, alpha)
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        
+        double qpx = (qx - px);
+        double qpy = (qy - py);
+        double qpz = (qz - pz);
+        double pw_qw = (pw - qw);
+        double qp2 = (((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz )) + pw_qw);
+        double rpx = (rx - px);
+        double rpy = (ry - py);
+        double rpz = (rz - pz);
+        double pw_rw = (pw - rw);
+        double rp2 = (((CGAL::square( rpx ) + CGAL::square( rpy )) + CGAL::square( rpz )) + pw_rw);
+        double spx = (sx - px);
+        double spy = (sy - py);
+        double spz = (sz - pz);
+        double pw_sw = (pw - sw);
+        double sp2 = (((CGAL::square( spx ) + CGAL::square( spy )) + CGAL::square( spz )) + pw_sw);
+        double num_x = CGAL::determinant( qpy, qpz, qp2, rpy, rpz, rp2, spy, spz, sp2 );
+        double num_y = CGAL::determinant( qpx, qpz, qp2, rpx, rpz, rp2, spx, spz, sp2 );
+        double num_z = CGAL::determinant( qpx, qpy, qp2, rpx, rpy, rp2, spx, spy, sp2 );
+        double den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, spx, spy, spz );
+        double alpha_pw = (alpha + pw);
+        CGAL::Sign int_tmp_result;
+        double eps;
+        double double_tmp_result = (((alpha_pw * 4.00000000000000000000e+00) * CGAL::square( den )) - ((CGAL::square( num_x ) + CGAL::square( num_y )) + CGAL::square( num_z )));
+        double max4 = CGAL::abs(qpy);
+
+        double aqpx = CGAL::abs(qpx);
+
+        double arpx = CGAL::abs(rpx);
+        double arpy = CGAL::abs(rpy);
+        double arpz = CGAL::abs(rpz);
+
+        double aspx = CGAL::abs(spx);
+        double aspy = CGAL::abs(spy);
+        double aspz = CGAL::abs(spz);
+
+        double apw_rw = CGAL::abs(pw_rw);
+        double apw_sw = CGAL::abs(pw_sw);
+
+        double aalpha_pw = CGAL::abs(alpha_pw);
+
+        if( max4 < arpy ) max4 = arpy;
+        if( max4 < aspy ) max4 = aspy; 
+        double max2 = max4;
+        if( max2 < aqpx ) max2 = aqpx; 
+        if( max2 < arpx ) max2 = arpx; 
+        if( max2 < aspx ) max2 = aspx; 
+        double max1 = max2;
+        double max3 = max4;
+        double max5 = CGAL::abs(qpz);
+        if( max5 < arpz ) max5 = arpz;  
+        if( max5 < aspz ) max5 = aspz;  
+        if( max3 < max5 )      max3 = max5;       
+        if( max1 < max3 )      max1 = max3;       
+        if( max1 < max4 )      max1 = max4;       
+        if( max1 < max5 )      max1 = max5;      
+        double max6 = CGAL::abs(pw_qw);
+        if( max6 < apw_rw ) max6 = apw_rw;
+        if( max6 < apw_sw ) max6 = apw_sw;
+        double max7 = max6;
+        if( max7 < aalpha_pw ) max7 = aalpha_pw; 
+        double lower_bound_1;
+        double upper_bound_1;
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( max2 < lower_bound_1 ) lower_bound_1 = max2;
+        if( max3 < lower_bound_1 ) lower_bound_1 = max3;
+        if( max4 < lower_bound_1 ) lower_bound_1 = max4;
+        if( max5 < lower_bound_1 ) lower_bound_1 = max5;
+        double lower_bound_2;
+        double upper_bound_2;
+        lower_bound_2 = max6;
+        upper_bound_2 = max6;
+        if( max7 < lower_bound_2 ) lower_bound_2 = max7;
+        else 
+        {
+            if( max7 > upper_bound_2 ) upper_bound_2 = max7;
+        } 
+        if( ((lower_bound_1 < 8.99995159231796093217e-38) || (lower_bound_2 < 8.09991286640666077573e-75)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,s,w);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 2.59614842926741294957e+33) || (upper_bound_2 > 6.73998666678765545893e+66)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,s,w);
+            } 
+            eps = (5.16919651938288206243e-12 * (((((max2 * max3) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max7, (max1 * max1) )) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max6, (max4 * max5) ), (max1 * max1) )));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = CGAL::NEGATIVE;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = CGAL::POSITIVE;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,s,w);
+                } 
+            } 
+        } 
+        return int_tmp_result;
+      }
+      else
+        return Base::operator()(p,q,r,s,w);
+    }
+
+    result_type
+    operator() (
+      const Weighted_point_3& p, 
+      const Weighted_point_3& q , 
+      const Weighted_point_3& r,
+      const FT& w
+    ) const {
+      
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 3 wpoints", tmp);
+      
+      double px, py, pz, pw, qx, qy, qz, qw, rx, ry, rz, rw, alpha;
+      init_double(px, py, pz, pw, qx, qy, qz, qw, rx, ry, rz, rw, alpha, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
+          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)      &&
+          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rw) &&
+          fit_in_double(w, alpha)
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        
+        double qpx = (qx - px);
+        double qpy = (qy - py);
+        double qpz = (qz - pz);
+        double pw_qw = (pw - qw);
+        double qp2 = (((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz )) + pw_qw);
+        double rpx = (rx - px);
+        double rpy = (ry - py);
+        double rpz = (rz - pz);
+        double pw_rw = (pw - rw);
+        double rp2 = (((CGAL::square( rpx ) + CGAL::square( rpy )) + CGAL::square( rpz )) + pw_rw);
+        double sx = ((qpy * rpz) - (qpz * rpy));
+        double sy = ((qpz * rpx) - (qpx * rpz));
+        double sz = ((qpx * rpy) - (qpy * rpx));
+        double num_x = ((qp2 * CGAL::determinant( rpy, rpz, sy, sz )) - (rp2 * CGAL::determinant( qpy, qpz, sy, sz )));
+        double num_y = ((qp2 * CGAL::determinant( rpx, rpz, sx, sz )) - (rp2 * CGAL::determinant( qpx, qpz, sx, sz )));
+        double num_z = ((qp2 * CGAL::determinant( rpx, rpy, sx, sy )) - (rp2 * CGAL::determinant( qpx, qpy, sx, sy )));
+        double den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, sx, sy, sz );
+        double alpha_pw = (alpha + pw);
+        CGAL::Sign int_tmp_result;
+        double eps;
+        double double_tmp_result = ((alpha_pw * CGAL::square( den )) - (2.50000000000000000000e-01 * ((CGAL::square( num_x ) + CGAL::square( num_y )) + CGAL::square( num_z ))));
+        double max2 = CGAL::abs(qpx);
+
+        double aqpy = CGAL::abs(qpy);
+        double aqpz = CGAL::abs(qpz);
+
+        double arpx = CGAL::abs(rpx);
+        double arpy = CGAL::abs(rpy);
+        double arpz = CGAL::abs(rpz);
+
+        double apw_rw = CGAL::abs(pw_rw);
+
+        double aalpha_pw = CGAL::abs(alpha_pw);
+
+        if( max2 < aqpy )  max2 = aqpy;
+        if( max2 < arpx )  max2 = arpx;
+        if( max2 < arpy )  max2 = arpy;
+        double max1 = max2;
+        if( max1 < aqpz )  max1 = aqpz;
+        if( max1 < arpz )  max1 = arpz;
+        double max3 = CGAL::abs(pw_qw);
+        if( max3 < apw_rw ) max3 = apw_rw;
+        double max4 = max3;
+        if( max4 < aalpha_pw ) max4 = aalpha_pw;
+        double lower_bound_1;
+        double upper_bound_1;
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( max2 < lower_bound_1 ) lower_bound_1 = max2;
+        double lower_bound_2;
+        double upper_bound_2;
+        lower_bound_2 = max3;
+        upper_bound_2 = max3;
+        if( max4 < lower_bound_2 )  lower_bound_2 = max4;
+        else 
+        {
+          if( max4 > upper_bound_2 ) upper_bound_2 = max4;
+        } 
+        if( ((lower_bound_1 < 2.13354839219409151500e-30) || (lower_bound_2 < 4.55202874183399304187e-60)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,w);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 1.23794003928538000002e+27) || (upper_bound_2 > 1.53249554086588817779e+54)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,w);
+            } 
+            eps = (1.13846439714120896721e-11 * (((((((max1 * max2) * max1) * max1) * max1) * max1) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max4, (max1 * max1) )) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = CGAL::NEGATIVE;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = CGAL::POSITIVE;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,w);
+                } 
+            } 
+        } 
+        return int_tmp_result;
+      }
+      else
+        return Base::operator()(p,q,r,w);
+    }
+
+    result_type
+    operator() (
+      const Weighted_point_3& p, 
+      const Weighted_point_3& q,
+      const FT& w
+    ) const {
+      
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Compare_weighted_squared_radius_3 with 2 wpoints", tmp);
+      
+      double px, py, pz, pw, qx, qy, qz, qw, alpha;
+      init_double(px, py, pz, pw, qx, qy, qz, qw, alpha, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)      &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pw) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)      &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qw) &&
+          fit_in_double(w, alpha)
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        
+        double qpx = (qx - px);
+        double qpy = (qy - py);
+        double qpz = (qz - pz);
+        double qp2 = ((CGAL::square( qpx ) + CGAL::square( qpy )) + CGAL::square( qpz ));
+        double alpha_pw = (alpha + pw);
+        double pw_qw = (pw - qw);
+        CGAL::Sign int_tmp_result;
+        double eps;
+        double double_tmp_result = (((4.00000000000000000000e+00 * qp2) * alpha_pw) - CGAL::square( (qp2 + pw_qw) ));
+        double max1 = CGAL::abs(qpx);
+
+        double aqpy = CGAL::abs(qpy);
+        double aqpz = CGAL::abs(qpz);
+        double aalpha_pw = CGAL::abs(alpha_pw);
+
+        if( max1 < aqpy ) max1 = aqpy;
+        if( max1 < aqpz ) max1 = aqpz;
+        double max2;
+        double max3 = CGAL::abs(pw_qw);
+        max2 = max3;
+        if( max2 < aalpha_pw ) max2 = aalpha_pw;
+        double lower_bound_2;
+        double upper_bound_2;
+        lower_bound_2 = max2;
+        upper_bound_2 = max2;
+        if( (max3 < lower_bound_2) ) lower_bound_2 = max3;
+        if( ((max1 < 3.12497063152273477754e-74) || (lower_bound_2 < 9.76544144787960039738e-148)) ){
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,w);
+        }
+        else 
+        {
+            if( ((max1 > 6.42775217703595896130e+60) || (upper_bound_2 > 4.13159980493905099125e+121)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,w);
+            } 
+            eps = (2.33324675561911025753e-14 * (CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max2, (max1 * max1) ) * CGAL::max BOOST_PREVENT_MACRO_SUBSTITUTION ( max3, (max1 * max1) )));
+            if( (double_tmp_result > eps) )
+            {
+                int_tmp_result = CGAL::NEGATIVE;
+            } 
+            else 
+            {
+                if( (double_tmp_result < -eps) )
+                {
+                    int_tmp_result = CGAL::POSITIVE;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,w);
+                } 
+            } 
+        } 
+        return int_tmp_result;        
+      }
+      else
+        return Base::operator()(p,q,w);
+    }
+    
+  };
+  
+  
+    } } }//namespace CGAL::internal::Static_filters_predicates
+
+
+#endif //CGAL_INTERNAL_STATIC_FILTERS_COMPARE_WEIGHTED_SQUARED_RADIUS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Coplanar_orientation_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Coplanar_orientation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Coplanar_orientation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Coplanar_orientation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Do_intersect_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Do_intersect_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Do_intersect_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Do_intersect_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Equal_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Equal_3.h
new file mode 100644
index 0000000..ac253cb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Equal_3.h
@@ -0,0 +1,112 @@
+// Copyright (c) 2011 GeometryFactory Sarl (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri
+
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
+#define CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
+
+#include <CGAL/Bbox_3.h>
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/tools.h>
+#include <cmath>
+#include <iostream>
+
+namespace CGAL {
+
+namespace internal {
+
+namespace Static_filters_predicates {
+
+
+template < typename K_base >
+class Equal_3
+  : public K_base::Equal_3
+{
+  typedef typename K_base::Point_3   Point_3;
+  typedef typename K_base::Vector_3  Vector_3;
+  typedef typename K_base::Equal_3   Base;
+
+public:
+
+  typedef typename Base::result_type  result_type;
+
+
+#ifndef CGAL_CFG_MATCHING_BUG_6
+  using Base::operator();
+#else // CGAL_CFG_MATCHING_BUG_6
+  template <typename T>
+  result_type
+  operator()(const T& t1, const T& t2) const
+  {
+    return Base()(t1,t2);
+  }
+#endif // CGAL_CFG_MATCHING_BUG_6
+
+
+  result_type operator()(const Point_3 &p, const Point_3& q) const
+  {
+    CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to   : ") +
+                         std::string(CGAL_PRETTY_FUNCTION), tmp);
+
+    Get_approx<Point_3> get_approx; // Identity functor for all points
+                                    // but lazy points
+    double px, py, pz, qx, qy, qz;
+
+    if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
+        fit_in_double(get_approx(p).z(), pz) &&
+        fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) &&
+        fit_in_double(get_approx(q).z(), qz) )
+    {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      return px == qx && py == qy && pz == qz;
+    }
+    return Base::operator()(p, q);
+  }
+
+
+  result_type operator()(const Vector_3 &p, const Vector_3& q) const
+  {
+    CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to   : ") +
+                         std::string(CGAL_PRETTY_FUNCTION), tmp);
+
+    Get_approx<Vector_3> get_approx; // Identity functor for all points
+                                     // but lazy points
+    double px, py, pz, qx, qy, qz;
+
+    if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
+        fit_in_double(get_approx(p).z(), pz) &&
+        fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) &&
+        fit_in_double(get_approx(q).z(), qz) )
+    {
+      CGAL_BRANCH_PROFILER_BRANCH(tmp);
+      return px == qx && py == qy && pz == qz;
+    }
+    return Base::operator()(p, q);
+  }
+
+}; // end class Equal_3
+
+} // end namespace Static_filters_predicates
+
+} // end namespace internal
+
+} // end namespace CGAL
+
+#endif  // CGAL_INTERNAL_STATIC_FILTERS_EQUAL_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Is_degenerate_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Is_degenerate_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Is_degenerate_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Is_degenerate_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Orientation_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Orientation_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Orientation_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Orientation_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Orientation_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Orientation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Orientation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Orientation_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h
new file mode 100644
index 0000000..0f049ca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h
@@ -0,0 +1,270 @@
+// Copyright (c) 1997-2013 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Nico Kruithof <Nico at nghk.nl>
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
+#define CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/Orientation_2.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+
+#include <CGAL/Periodic_2_offset_2.h>
+
+#include <cmath>
+
+/*
+  Current implementation: Just take the 3D predicates and set z to
+  zero. The epsilon bounds should still hold, although they might be
+  too high.
+
+  First attempt tried to generate the predicates using the following
+  code:
+  Predicates are generated using mcc from the Filtered Predicate
+  Generator (fpg) using:
+
+  double
+  det2x2( double a00, double a01,
+  double a10, double a11 )
+  {
+  return a00*a11 - a10*a01;
+  }
+
+  int
+  orientationC2( double px, double py,
+                 double qx, double qy,
+                 double rx, double ry )
+  group px qx rx;
+  group py qy ry;
+  {
+  return sign( det2x2( qx-px, qy-py ,
+  rx-px, ry-py ) );
+  }
+
+  int
+  orientationC2_offset( double px, double py, int opx, int opy,
+                        double qx, double qy, int oqx, int oqy,
+                        double rx, double ry, int orx, int ory,
+                        double domxmax, double domxmin,
+                        double domymax, double domymin
+  )
+  group px qx rx domxmax domxmin opx oqx orx;
+  group py qy ry domymax domymin opy oqy ory;
+  {
+  double domx = domxmax-domxmin;
+  double domy = domymax-domymin;
+
+  double pqx = 1*(qx - px) + (oqx-opx)*domx;
+  double pqy = 1*(qy - py) + (oqy-opy)*domy;
+  double prx = 1*(rx - px) + (orx-opx)*domx;
+  double pry = 1*(ry - py) + (ory-opy)*domy;
+
+  return sign( det2x2(pqx, pqy, prx, pry) );
+  }
+*/
+
+namespace CGAL
+{
+namespace internal
+{
+namespace Static_filters_predicates
+{
+
+template < typename K_base >
+class Periodic_2_orientation_2 : public K_base::Orientation_2
+{
+  typedef typename K_base::FT FT;
+  typedef typename K_base::Point_2          Point_2;
+  typedef typename K_base::Vector_2         Vector_2;
+  typedef typename K_base::Circle_2         Circle_2;
+  typedef typename K_base::Offset_2         Offset_2;
+  typedef typename K_base::Iso_rectangle_2  Iso_rectangle_2;
+
+  typedef typename K_base::Orientation_2    Base;
+
+public:
+  const Iso_rectangle_2 * const _dom;
+
+public:
+  typedef typename Base::result_type  result_type;
+
+  template <class EX, class AP>
+  Periodic_2_orientation_2(const Iso_rectangle_2 * const dom,
+                           const EX * dom_e, const AP * dom_f) : Base(dom_e, dom_f), _dom(dom)
+  {
+  }
+
+#ifndef CGAL_CFG_MATCHING_BUG_6
+  using Base::operator();
+#else
+  result_type
+  operator()(const Vector_2& u, const Vector_2& v) const
+  {
+    return Base::operator()(u, v);
+  }
+
+  result_type
+  operator()(const Circle_2& c) const
+  {
+    return Base::operator()(c);
+  }
+#endif
+
+  /// Normal static orientation test, copied from Orientation_2
+  result_type operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r) const
+  {
+    CGAL_PROFILER("Periodic_2_orientation_2 calls");
+
+    double px, py, qx, qy, rx, ry;
+    init_double(px, py, qx, qy, rx, ry, (FT*)(0));
+    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
+        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
+        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry))
+      {
+        CGAL_PROFILER("Periodic_2_orientation_2 semi-static attempts");
+
+        double pqx = qx - px;
+        double pqy = qy - py;
+        double prx = rx - px;
+        double pry = ry - py;
+
+        // Then semi-static filter.
+        double maxx = CGAL::abs(pqx);
+        double maxy = CGAL::abs(pqy);
+
+        double aprx = CGAL::abs(prx);
+        double apry = CGAL::abs(pry);
+
+        if (maxx < aprx) maxx = aprx;
+        if (maxy < apry) maxy = apry;
+        double eps = 5.1107127829973299e-15 * maxx * maxy;
+        double det = CGAL::determinant(pqx, pqy,
+                                       prx, pry);
+
+        // Sort maxx < maxy
+        if (maxx > maxy)
+          std::swap(maxx, maxy);
+
+        // Protect against underflow in the computation of eps.
+        if (maxx < 1e-97) /* cbrt(min_double/eps) */
+          {
+            if (maxx == 0)
+              return ZERO;
+          }
+        // Protect against overflow in the computation of det.
+        else if (maxy < 1e102) /* cbrt(max_double [hadamard]/4) */
+          {
+            if (det > eps)  return POSITIVE;
+            if (det < -eps) return NEGATIVE;
+          }
+
+        CGAL_PROFILER("Periodic_2_orientation_2 semi-static failures");
+      }
+
+    return Base::operator()(p, q, r);
+  }
+
+
+  /// Static orientation test with offsets
+  result_type operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r,
+                         const Offset_2 &o_p, const Offset_2 &o_q, const Offset_2 &o_r) const
+  {
+
+    CGAL_PROFILER("Periodic_2_orientation_2 with offset calls");
+
+    double px, py, qx, qy, rx, ry;
+    double domxmax, domxmin, domymax, domymin;
+    int opx = o_p.x();
+    int opy = o_p.y();
+    init_double(px, py, qx, qy, rx, ry, domxmax, domxmin, domymax, domymin, (FT*)(0));
+    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
+        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
+        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry) &&
+        fit_in_double(_dom->xmax(), domxmax) &&
+        fit_in_double(_dom->xmin(), domxmin) &&
+        fit_in_double(_dom->ymax(), domymax) &&
+        fit_in_double(_dom->ymin(), domymin))
+      {
+        CGAL_PROFILER("Periodic_2_orientation_2 with offset semi-static attempts");
+
+        double domx = domxmax - domxmin;
+        double domy = domymax - domymin;
+
+        double pqx = qx - px + domx * ( o_q.x() - opx );
+        double pqy = qy - py + domy * ( o_q.y() - opy );
+        double prx = rx - px + domx * ( o_r.x() - opx );
+        double pry = ry - py + domy * ( o_r.y() - opy );
+
+        // Then semi-static filter.
+        double maxx = CGAL::abs(pqx);
+        double maxy = CGAL::abs(pqy);
+
+        double aprx = CGAL::abs(prx);
+        double apry = CGAL::abs(pry);
+
+        if (maxx < aprx) maxx = aprx;
+        if (maxy < apry) maxy = apry;
+        double eps = 4.111024169857068197e-15 * maxx * maxy;
+        double det = CGAL::determinant(pqx, pqy,
+                                       prx, pry);
+
+        // Sort maxx < maxy.
+        if (maxx > maxy)
+          std::swap(maxx, maxy);
+
+        // Protect against underflow in the computation of eps.
+        if (maxx < 1e-97) /* cbrt(min_double/eps) */
+          {
+            if (maxx == 0)
+              return ZERO;
+          }
+        // Protect against overflow in the computation of det.
+        else if (maxy < 1e102) /* cbrt(max_double [hadamard]/4) */
+          {
+            if (det > eps)  return POSITIVE;
+            if (det < -eps) return NEGATIVE;
+          }
+
+        CGAL_PROFILER("Periodic_2_orientation_2 with offset semi-static failures");
+      }
+
+    return Base::operator()(p, q, r, o_p, o_q, o_r);
+  }
+
+  // Computes the epsilon for Periodic_2_orientation_2.
+  static double compute_epsilon()
+  {
+    typedef Static_filter_error F;
+    F t1 = F(1, F::ulp() / 4);       // First translation
+    F det = CGAL::determinant(t1, t1, t1,
+                              t1, t1, t1,
+                              t1, t1, t1); // Full det
+    double err = det.error();
+    err += err * 2 * F::ulp(); // Correction due to "eps * maxx * maxy...".
+    std::cerr << "*** epsilon for Periodic_2_orientation_2 = " << err
+              << std::endl;
+    return err;
+  }
+};
+
+}
+}
+} // namespace CGAL::internal::Static_filters_predicates
+
+#endif // CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_ORIENTATION_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h
new file mode 100644
index 0000000..2bfec71
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h
@@ -0,0 +1,246 @@
+// Copyright (c) 1997-2013 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sylvain Pion <Sylvain.Pion at sophia.inria.fr>
+//                 Manuel Caroli <Manuel.Caroli at sophia.inria.fr>
+//                 Nico Kruithof <Nico at nghk.nl>
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
+#define CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+
+#include <CGAL/Periodic_2_offset_2.h>
+
+namespace CGAL
+{
+namespace internal
+{
+namespace Static_filters_predicates
+{
+
+template < typename K_base >
+class Periodic_2_side_of_oriented_circle_2
+  : public K_base::Side_of_oriented_circle_2
+{
+  typedef typename K_base::Side_of_oriented_circle_2    Base;
+  typedef typename K_base::FT                           FT;
+  typedef typename K_base::Point_2                      Point_2;
+  typedef typename K_base::Iso_rectangle_2              Iso_rectangle_2;
+  typedef CGAL::Periodic_2_offset_2                     Offset;
+
+public:
+  const Iso_rectangle_2 * _dom;
+
+public:
+  typedef typename Base::result_type  result_type;
+
+  template <class EX, class AP>
+  Periodic_2_side_of_oriented_circle_2(const Iso_rectangle_2 * dom,
+                                       const EX * dom_e,
+                                       const AP * dom_f)
+    : Base(dom_e, dom_f), _dom(dom) { }
+
+  Oriented_side
+  operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r,
+             const Point_2 &t) const
+  {
+    CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Periodic_2_side_of_oriented_circle_2", tmp);
+
+    Get_approx<Point_2> get_approx; // Identity functor for all points
+    // but lazy points.
+
+    double px, py, qx, qy, rx, ry, tx, ty;
+    init_double(px, py, qx, qy, rx, ry, tx, ty, (FT*)(0));
+    if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
+        fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) &&
+        fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) &&
+        fit_in_double(get_approx(t).x(), tx) && fit_in_double(get_approx(t).y(), ty))
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+
+        double qpx = qx - px;
+        double qpy = qy - py;
+        double rpx = rx - px;
+        double rpy = ry - py;
+        double tpx = tx - px;
+        double tpy = ty - py;
+
+        double tqx = tx - qx;
+        double tqy = ty - qy;
+        double rqx = rx - qx;
+        double rqy = ry - qy;
+
+        double det = CGAL::determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy,
+                                       qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);
+
+        // We compute the semi-static bound.
+        double maxx = CGAL::abs(qpx);
+        double maxy = CGAL::abs(qpy);
+
+        double arpx = CGAL::abs(rpx);
+        double arpy = CGAL::abs(rpy);
+
+        double atqx = CGAL::abs(tqx);
+        double atqy = CGAL::abs(tqy);
+
+        double atpx = CGAL::abs(tpx);
+        double atpy = CGAL::abs(tpy);
+
+        double arqx = CGAL::abs(rqx);
+        double arqy = CGAL::abs(rqy);
+
+        if (maxx < arpx) maxx = arpx;
+        if (maxx < atpx) maxx = atpx;
+        if (maxx < atqx) maxx = atqx;
+        if (maxx < arqx) maxx = arqx;
+
+        if (maxy < arpy) maxy = arpy;
+        if (maxy < atpy) maxy = atpy;
+        if (maxy < atqy) maxy = atqy;
+        if (maxy < arqy) maxy = arqy;
+
+        if (maxx > maxy)  std::swap(maxx, maxy);
+
+        // Protect against underflow in the computation of eps.
+        if (maxx < 1e-73)
+          {
+            if (maxx == 0)
+              return ON_ORIENTED_BOUNDARY;
+          }
+        else if (maxy < 1e76) /* sqrt(sqrt(max_double/16 [hadamard])) */
+          {
+            double eps = 8.8878565762001373e-15 * maxx * maxy * (maxy * maxy);
+            if (det > eps)  return ON_POSITIVE_SIDE;
+            if (det < -eps) return ON_NEGATIVE_SIDE;
+          }
+
+        CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+      }
+
+    return Base::operator()(p, q, r, t);
+  }
+
+  Oriented_side
+  operator()(const Point_2 &p, const Point_2 &q,
+             const Point_2 &r, const Point_2 &s,
+             const Offset &o_p, const Offset &o_q,
+             const Offset &o_r, const Offset &o_s) const
+  {
+
+    CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 calls");
+
+    double px, py, qx, qy, rx, ry, sx, sy;
+    double domxmax, domxmin, domymax, domymin;
+    int osx = o_s.x();
+    int osy = o_s.y();
+    init_double(px, py, qx, qy, rx, ry, sx, sy, domxmax, domxmin, domymax, domymin, (FT*)(0));
+    if (fit_in_double(p.x(), px) && fit_in_double(p.y(), py) &&
+        fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) &&
+        fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry) &&
+        fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy) &&
+        fit_in_double(_dom->xmax(), domxmax) &&
+        fit_in_double(_dom->xmin(), domxmin) &&
+        fit_in_double(_dom->ymax(), domymax) &&
+        fit_in_double(_dom->ymin(), domymin))
+      {
+
+        CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 with offset semi-static attempts");
+
+        double domx = domxmax - domxmin;
+        double domy = domymax - domymin;
+
+        double psx = px - sx + domx * (o_p.x() - osx);
+        double psy = py - sy + domy * (o_p.y() - osy);
+        double pt2 = CGAL_NTS square(psx) + CGAL_NTS square(psy);
+        double qsx = qx - sx + domx * (o_q.x() - osx);
+        double qsy = qy - sy + domy * (o_q.y() - osy);
+        double qt2 = CGAL_NTS square(qsx) + CGAL_NTS square(qsy);
+        double rsx = rx - sx + domx * (o_r.x() - osx);
+        double rsy = ry - sy + domy * (o_r.y() - osy);
+        double rt2 = CGAL_NTS square(rsx) + CGAL_NTS square(rsy);
+
+        // Compute the semi-static bound.
+        double maxx = CGAL::abs(psx);
+        double maxy = CGAL::abs(psy);
+
+        double aqsx = CGAL::abs(qsx);
+        double aqsy = CGAL::abs(qsy);
+
+        double arsx = CGAL::abs(rsx);
+        double arsy = CGAL::abs(rsy);
+
+        if (maxx < aqsx) maxx = aqsx;
+        if (maxx < arsx) maxx = arsx;
+
+        if (maxy < aqsy) maxy = aqsy;
+        if (maxy < arsy) maxy = arsy;
+
+        // Sort maxx < maxy.
+        if (maxx > maxy)
+          std::swap(maxx, maxy);
+
+        double eps = 1.0466759304746772485e-13 * maxx * maxy * (maxy * maxy);
+
+        double det = CGAL::determinant(psx, psy, pt2,
+                                       qsx, qsy, qt2,
+                                       rsx, rsy, rt2);
+
+        // Protect against underflow in the computation of eps.
+        if (maxx < 1e-58) /* sqrt^5(min_double/eps) */
+          {
+            if (maxx == 0)
+              return ON_ORIENTED_BOUNDARY;
+          }
+        // Protect against overflow in the computation of det.
+        else if (maxy < 1e61) /* sqrt^5(max_double/4 [hadamard]) */
+          {
+            if (det > eps)  return ON_POSITIVE_SIDE;
+            if (det < -eps) return ON_NEGATIVE_SIDE;
+          }
+
+        CGAL_PROFILER("Periodic_2_side_of_oriented_circle_2 with offset semi-static failures");
+      }
+    return Base::operator()(p, q, r, s, o_p, o_q, o_r, o_s);
+  }
+
+  // Computes the epsilon for Periodic_2_side_of_oriented_circle_2.
+  static double compute_epsilon()
+  {
+    typedef Static_filter_error F;
+    F t1 = F(1, F::ulp() / 4); // First translations
+    F sq = t1 * t1 + t1 * t1 + t1 * t1; // squares
+    F det = CGAL::determinant(t1, t1, t1, sq,
+                              t1, t1, t1, sq,
+                              t1, t1, t1, sq,
+                              t1, t1, t1, sq); // Full det
+    double err = det.error();
+    err += err * 3 * F::ulp(); // Correction due to "eps * maxx * ...".
+
+    std::cerr << "*** epsilon for Periodic_2_side_of_oriented_circle_2 = "
+              << err << std::endl;
+    return err;
+  }
+};
+
+}
+}
+} // namespace CGAL::internal::Static_filters_predicates
+
+#endif // CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_2_SIDE_OF_ORIENTED_CIRCLE_2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_3_orientation_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_3_orientation_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_3_orientation_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_3_orientation_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Power_test_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Power_test_3.h
new file mode 100644
index 0000000..6efc5b7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Power_test_3.h
@@ -0,0 +1,795 @@
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot
+// This predicates was generated using the fpg tool written by Andreas Meyer.
+//
+
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
+#define CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
+
+#include <CGAL/Profile_counter.h>
+#include <CGAL/internal/Static_filters/Static_filter_error.h>
+#include <CGAL/internal/Static_filters/tools.h>
+#include <cmath>
+
+
+namespace CGAL { namespace internal { namespace Static_filters_predicates {
+  
+  template <typename K_base>
+  class Power_test_3:
+    public K_base::Power_test_3
+  {
+    typedef typename K_base::Weighted_point_3 Weighted_point_3;
+    typedef typename K_base::FT FT;
+    typedef typename K_base::Power_test_3 Base;
+  public:
+    typedef typename Base::result_type result_type;
+  
+    #ifndef CGAL_CFG_MATCHING_BUG_6
+    using Base::operator();
+    #else 
+    result_type
+    operator()(const Weighted_point_3& p, const Weighted_point_3& q) const
+    { 
+      return Base::operator()(p,q);
+    }
+    #endif
+
+
+    void
+    msvc_workaround(double& max1, double& max2, double& max3, double& max4, double& max5, double&  RT_tmp_result, 
+                    double px, double  py, double  pz, double  pwt, 
+                    double qx, double  qy, double  qz, double  qwt, 
+                    double  rx, double  ry, double  rz, double  rwt, 
+                    double  sx, double  sy, double  sz, double  swt, 
+                    double  tx, double  ty, double  tz, double  twt) const
+    {
+      double dpx = (px - tx);
+      double dpy = (py - ty);
+      double dpz = (pz - tz);
+      double twt_pwt = (twt - pwt);
+      double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
+      double dqx = (qx - tx);
+      double dqy = (qy - ty);
+      double dqz = (qz - tz);
+      double twt_qwt = (twt - qwt);
+      double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
+      double drx = (rx - tx);
+      double dry = (ry - ty);
+      double drz = (rz - tz);
+      double twt_rwt = (twt - rwt);
+      double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
+      double dsx = (sx - tx);
+      double dsy = (sy - ty);
+      double dsz = (sz - tz);
+      double twt_swt = (twt - swt);
+      double dst = (((square( dsx ) + square( dsy )) + square( dsz )) + twt_swt);
+
+      //        double 
+      RT_tmp_result = CGAL::determinant( dpx, dpy, dpz, dpt, dqx, dqy, dqz, dqt, drx, dry, drz, drt, dsx, dsy, dsz, dst );
+
+      //        double
+      max2 = CGAL::abs(dpx);
+     
+
+      double adqx = CGAL::abs(dqx);
+      double adqy = CGAL::abs(dqy);
+      double adqz = CGAL::abs(dqz);
+
+      double adrx = CGAL::abs(drx);
+      double adry = CGAL::abs(dry);
+      double adrz = CGAL::abs(drz);
+
+      double adsx = CGAL::abs(dsx);
+      double adsy = CGAL::abs(dsy);
+      double adsz = CGAL::abs(dsz);
+
+      double atwt_qwt = CGAL::abs(twt_qwt);
+      double atwt_rwt = CGAL::abs(twt_rwt);
+      double atwt_swt = CGAL::abs(twt_swt);
+
+      if( (max2 < adqx) ) max2 = adqx;
+      if( (max2 < adrx) ) max2 = adrx;
+      if( (max2 < adsx) ) max2 = adsx;
+      max1 = max2; 
+      max3 = CGAL::abs(dpy);
+      if( (max3 < adqy) ) max3 = adqy;
+      if( (max3 < adry) ) max3 = adry;
+      if( (max3 < adsy) ) max3 = adsy;
+      if( (max1 < max3) )      max1 = max3;
+      max4 = CGAL::abs(dpz);
+      if( (max4 < adqz) ) max4 = adqz;
+      if( (max4 < adrz) ) max4 = adrz;
+      if( (max4 < adsz) ) max4 = adsz;
+      if( (max1 < max4) )      max1 = max4;
+      max5 = CGAL::abs(twt_pwt);
+      if( (max5 < atwt_qwt) ) max5 = atwt_qwt;
+      if( (max5 < atwt_rwt) ) max5 = atwt_rwt;
+      if( (max5 < atwt_swt) ) max5 = atwt_swt;
+    }    
+
+    
+    result_type operator() ( const Weighted_point_3 & p,
+                             const Weighted_point_3 & q,
+                             const Weighted_point_3 & r,
+                             const Weighted_point_3 & s,
+                             const Weighted_point_3 & t) const
+    {
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 4+1 wpoints", tmp);
+      
+      double px, py, pz, pwt, qx, qy, qz, qwt, rx, ry, rz, rwt, sx, sy, sz, swt, tx, ty, tz, twt;
+      init_double(px, py, pz, pwt, qx, qy, qz, qwt, rx, ry, rz, rwt, (FT*)(0));
+      init_double(sx, sy, sz, swt, tx, ty, tz, twt, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
+          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)       &&
+          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rwt) &&
+          fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy)       &&
+          fit_in_double(s.z(), sz) && fit_in_double(s.weight(), swt) && 
+          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
+          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);        
+
+        // We split the operator as we get an ICE with VC9 and VC10 
+        // when we compile 64 bit code 
+#if defined (BOOST_MSVC) && defined ( _WIN64)
+        double max1,max2,max3,max4,max5;
+        double RT_tmp_result;
+        msvc_workaround(max1,max2,max3,max4,max5, RT_tmp_result,
+                        px, py, pz, pwt, 
+                        qx, qy, qz, qwt, 
+                        rx, ry, rz, rwt, 
+                        sx, sy, sz, swt, 
+                        tx, ty, tz, twt);
+
+#else
+        double dpx = (px - tx);
+        double dpy = (py - ty);
+        double dpz = (pz - tz);
+        double twt_pwt = (twt - pwt);
+        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
+        double dqx = (qx - tx);
+        double dqy = (qy - ty);
+        double dqz = (qz - tz);
+        double twt_qwt = (twt - qwt);
+        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
+        double drx = (rx - tx);
+        double dry = (ry - ty);
+        double drz = (rz - tz);
+        double twt_rwt = (twt - rwt);
+        double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
+        double dsx = (sx - tx);
+        double dsy = (sy - ty);
+        double dsz = (sz - tz);
+        double twt_swt = (twt - swt);
+        double dst = (((square( dsx ) + square( dsy )) + square( dsz )) + twt_swt);
+
+        double RT_tmp_result = CGAL::determinant( dpx, dpy, dpz, dpt, dqx, dqy, dqz, dqt, drx, dry, drz, drt, dsx, dsy, dsz, dst );
+
+        
+        double max2 = CGAL::abs(dpx);
+        double adqx = CGAL::abs(dqx);
+        double adqy = CGAL::abs(dqy);
+        double adqz = CGAL::abs(dqz);
+
+        double adrx = CGAL::abs(drx);
+        double adry = CGAL::abs(dry);
+        double adrz = CGAL::abs(drz);
+
+        double adsx = CGAL::abs(dsx);
+        double adsy = CGAL::abs(dsy);
+        double adsz = CGAL::abs(dsz);
+
+        double atwt_qwt = CGAL::abs(twt_qwt);
+        double atwt_rwt = CGAL::abs(twt_rwt);
+        double atwt_swt = CGAL::abs(twt_swt);
+
+        if( (max2 < adqx) ) max2 = adqx;
+        if( (max2 < adrx) ) max2 = adrx;
+        if( (max2 < adsx) ) max2 = adsx;
+        double max1 = max2; 
+        double max3 = CGAL::abs(dpy);
+        if( (max3 < adqy) ) max3 = adqy;
+        if( (max3 < adry) ) max3 = adry;
+        if( (max3 < adsy) ) max3 = adsy;
+        if( (max1 < max3) )      max1 = max3;
+        double max4 = CGAL::abs(dpz);
+        if( (max4 < adqz) ) max4 = adqz;
+        if( (max4 < adrz) ) max4 = adrz;
+        if( (max4 < adsz) ) max4 = adsz;
+        if( (max1 < max4) )      max1 = max4;
+        double max5 = CGAL::abs(twt_pwt);
+        if( (max5 < atwt_qwt) ) max5 = atwt_qwt;
+        if( (max5 < atwt_rwt) ) max5 = atwt_rwt;
+        if( (max5 < atwt_swt) ) max5 = atwt_swt;
+#endif
+        double lower_bound_1 = max1;
+        double upper_bound_1 = max1;
+        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
+        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
+        if( (max4 < lower_bound_1) ) lower_bound_1 = max4;
+        //handwritten workaround to handle case where all weights are equal
+        //if( ((lower_bound_1 < 1.05893684636332247212e-59) || (max5 < 1.12134724458589890404e-118)) )
+        if( ((lower_bound_1 < 1.05893684636332247212e-59) || (max5 < 1.12134724458589890404e-118 && max5!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,s,t);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 3.21387608851797948065e+60) || (max5 > 1.03289995123476274781e+121)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,s,t);
+            } 
+
+            result_type int_tmp_result;
+
+            double eps = (1.67106803095990471147e-13 * (((max2 * max3) * max4) * (CGAL::max) ( max5, (max1 * max1) )));
+
+
+            if( (RT_tmp_result > eps) )
+            {
+                int_tmp_result = NEGATIVE;
+            } 
+            else 
+            {
+                if( (RT_tmp_result < -eps) )
+                {
+                    int_tmp_result = POSITIVE;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,s,t);
+                } 
+            } 
+            return int_tmp_result;
+        } 
+      }
+      else
+        return Base::operator()(p,q,r,s,t);
+    }
+
+    result_type operator() ( const Weighted_point_3 & p,
+                             const Weighted_point_3 & q,
+                             const Weighted_point_3 & r,
+                             const Weighted_point_3 & t) const
+    {
+
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 3+1 wpoints", tmp);
+
+      double px, py, pz, pwt, qx, qy, qz, qwt, rx, ry, rz, rwt, tx, ty, tz, twt;
+      init_double(px, py, pz, pwt, qx, qy, qz, qwt, (FT*)(0));
+      init_double( rx, ry, rz, rwt, tx, ty, tz, twt, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
+          fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry)       &&
+          fit_in_double(r.z(), rz) && fit_in_double(r.weight(), rwt) &&
+          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
+          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+        
+        double dpx = (px - tx);
+        double dpy = (py - ty);
+        double dpz = (pz - tz);
+        double twt_pwt = (twt - pwt);
+        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
+        double dqx = (qx - tx);
+        double dqy = (qy - ty);
+        double dqz = (qz - tz);
+        double twt_qwt = (twt - qwt);
+        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
+        double drx = (rx - tx);
+        double dry = (ry - ty);
+        double drz = (rz - tz);
+        double twt_rwt = (twt - rwt);
+        double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt);
+        int cmp;
+        int int_tmp_result;
+        double eps;
+        double RT_tmp_result = CGAL::determinant( dpx, dpy, dpt, dqx, dqy, dqt, drx, dry, drt );
+
+        double max7 = CGAL::abs(dpz);
+        double adqx = CGAL::abs(dqx);
+        double adqy = CGAL::abs(dqy);
+        double adqz = CGAL::abs(dqz);
+
+        double adrx = CGAL::abs(drx);
+        double adry = CGAL::abs(dry);
+        double adrz = CGAL::abs(drz);
+
+        double atwt_qwt = CGAL::abs(twt_qwt);
+        double atwt_rwt = CGAL::abs(twt_rwt);
+
+        if( (max7 < adqz) ) max7 = adqz;
+        if( (max7 < adrz) ) max7 = adrz;
+        double max1 = max7;
+        double max2 = CGAL::abs(dpx);
+        if( (max2 < adqx) ) max2 = adqx;
+        if( (max2 < adrx) ) max2 = adrx;
+        if( (max1 < max2) )      max1 = max2;
+        double max3 = CGAL::abs(dpy);
+        if( (max3 < adqy) ) max3 = adqy;
+        if( (max3 < adry) ) max3 = adry;
+        if( (max1 < max3) )      max1 = max3;
+        double max4 = CGAL::abs(twt_pwt);
+        if( (max4 < atwt_qwt) ) max4 = atwt_qwt;
+        if( (max4 < atwt_rwt) ) max4 = atwt_rwt;
+        double lower_bound_1;
+        double upper_bound_1;
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
+        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
+        //handwritten workaround to handle case where all weights are equal        
+        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
+        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,t);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            double eps = (3.04426660386257731823e-14 * ((max2 * max3) * (CGAL::max)( max4, (max1 * max1) )));
+            if( (RT_tmp_result > eps) )
+            {
+                int_tmp_result = 1;
+            } 
+            else 
+            {
+                if( (RT_tmp_result < -eps) )
+                {
+                    int_tmp_result = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+            } 
+        } 
+        cmp = int_tmp_result;
+        double px_rx = (px - rx);
+        double qy_ry = (qy - ry);
+        double qx_rx = (qx - rx);
+        double py_ry = (py - ry);
+        double max5 = CGAL::abs(px_rx);
+        double aqx_rx =CGAL::abs(qx_rx);
+        double apy_ry =CGAL::abs(py_ry);
+        if( max5 < aqx_rx ) max5 = aqx_rx;
+        double max6 = CGAL::abs(qy_ry);
+        if( max6 < apy_ry ) max6 = apy_ry;
+        if( (cmp != 0) )
+        {
+            int int_tmp_result_FFWKCAA;
+            double double_tmp_result;
+            double_tmp_result = ((px_rx * qy_ry) - (qx_rx * py_ry));
+            lower_bound_1 = max5;
+            upper_bound_1 = max5;
+            if( (max6 < lower_bound_1) ) lower_bound_1 = max6;
+            else 
+            {
+                if( (max6 > upper_bound_1) ) upper_bound_1 = max6;
+            } 
+            if( (lower_bound_1 < 5.00368081960964690982e-147) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            else 
+            {
+                if( (upper_bound_1 > 7.23700557733225980357e+75) )
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+                double eps = (8.88720573725927976811e-16 * (max5 * max6));
+                if( (double_tmp_result > eps) ) int_tmp_result_FFWKCAA = 1;
+                else 
+                {
+                    if( (double_tmp_result < -eps) )
+                    {
+                        int_tmp_result_FFWKCAA = -1;
+                    } 
+                    else 
+                    {
+                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                      return Base::operator()(p,q,r,t);
+                    } 
+                } 
+            } 
+            return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA);
+        } 
+        int int_tmp_result_k60Ocge;
+        double RT_tmp_result_3SPBwDj = CGAL::determinant( dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt );
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max7 < lower_bound_1) ) lower_bound_1 = max7;
+        if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
+        //handwritten workaround to handle case where all weights are equal
+        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
+        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,t);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            eps = (3.04426660386257731823e-14 * ((max2 * max7) * (CGAL::max)( max4, (max1 * max1) )));
+            if( (RT_tmp_result_3SPBwDj > eps) )
+            {
+                int_tmp_result_k60Ocge = 1;
+            } 
+            else 
+            {
+                if( (RT_tmp_result_3SPBwDj < -eps) )
+                {
+                    int_tmp_result_k60Ocge = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+            } 
+        } 
+        cmp = int_tmp_result_k60Ocge;
+        double qz_rz = (qz - rz);
+        double pz_rz = (pz - rz);
+        double max8 = CGAL::abs(qz_rz);
+        double apz_rz =  CGAL::abs(pz_rz);
+        if( max8 < apz_rz ) max8 = apz_rz;
+        if( (cmp != 0) )
+        {
+            int int_tmp_result_k3Lzf6g;
+            double double_tmp_result_Gx4H;
+            double_tmp_result_Gx4H = ((px_rx * qz_rz) - (qx_rx * pz_rz));
+            lower_bound_1 = max5;
+            upper_bound_1 = max5;
+            if( (max8 < lower_bound_1) ) lower_bound_1 = max8;
+            else 
+            {
+                if( (max8 > upper_bound_1) ) upper_bound_1 = max8;
+            } 
+            if( (lower_bound_1 < 5.00368081960964690982e-147) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            else 
+            {
+                if( (upper_bound_1 > 7.23700557733225980357e+75) )
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+                eps = (8.88720573725927976811e-16 * (max5 * max8));
+                if( (double_tmp_result_Gx4H > eps) )
+                {
+                    int_tmp_result_k3Lzf6g = 1;
+                } 
+                else 
+                {
+                    if( (double_tmp_result_Gx4H < -eps) )
+                    {
+                        int_tmp_result_k3Lzf6g = -1;
+                    } 
+                    else 
+                    {
+                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                      return Base::operator()(p,q,r,t);
+                    } 
+                } 
+            } 
+            return static_cast<result_type>(cmp * int_tmp_result_k3Lzf6g);
+        } 
+        int int_tmp_result_AvrrXBP;
+        double RT_tmp_result_feLwnHn = CGAL::determinant( dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt );
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max7 < lower_bound_1) ) lower_bound_1 = max7;
+        if( (max3 < lower_bound_1) ) lower_bound_1 = max3;
+        //handwritten workaround to handle case where all weights are equal
+        //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) )
+        if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,t);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            eps = (3.04426660386257731823e-14 * ((max3 * max7) * (CGAL::max)( max4, (max1 * max1) )));
+            if( (RT_tmp_result_feLwnHn > eps) )
+            {
+                int_tmp_result_AvrrXBP = 1;
+            } 
+            else 
+            {
+                if( (RT_tmp_result_feLwnHn < -eps) )
+                {
+                    int_tmp_result_AvrrXBP = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+            } 
+        } 
+        cmp = int_tmp_result_AvrrXBP;
+        int int_tmp_result_agX3WsT;
+        double double_tmp_result_Dw20Kqh = ((py_ry * qz_rz) - (qy_ry * pz_rz));
+        lower_bound_1 = max8;
+        upper_bound_1 = max8;
+        if( (max6 < lower_bound_1) )
+        {
+            lower_bound_1 = max6;
+        } 
+        else 
+        {
+            if( (max6 > upper_bound_1) ) upper_bound_1 = max6;
+        } 
+        if( (lower_bound_1 < 5.00368081960964690982e-147) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,r,t);
+        } 
+        else 
+        {
+            if( (upper_bound_1 > 7.23700557733225980357e+75) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,r,t);
+            } 
+            eps = (8.88720573725927976811e-16 * (max6 * max8));
+            if( (double_tmp_result_Dw20Kqh > eps) )
+            {
+                int_tmp_result_agX3WsT = 1;
+            } 
+            else 
+            {
+                if( (double_tmp_result_Dw20Kqh < -eps) )
+                {
+                    int_tmp_result_agX3WsT = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,r,t);
+                } 
+            } 
+        } 
+        return static_cast<result_type>(cmp * int_tmp_result_agX3WsT);        
+      }
+      else
+        return Base::operator()(p,q,r,t);
+    }
+
+    result_type operator() ( const Weighted_point_3 & p,
+                             const Weighted_point_3 & q,
+                             const Weighted_point_3 & t) const
+    {
+
+      CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to   : Power_test_3 with 2+1 wpoints", tmp);
+      
+      double px, py, pz, pwt, qx, qy, qz, qwt, tx, ty, tz, twt;
+      init_double(px, py, pz, pwt, qx, qy, qz, qwt, tx, ty, tz, twt, (FT*)(0));
+      if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py)       &&
+          fit_in_double(p.z(), pz) && fit_in_double(p.weight(), pwt) && 
+          fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy)       &&
+          fit_in_double(q.z(), qz) && fit_in_double(q.weight(), qwt) &&
+          fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty)       &&
+          fit_in_double(t.z(), tz) && fit_in_double(t.weight(), twt) 
+        )
+      {
+        CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
+          
+        double dpx = (px - tx);
+        double dpy = (py - ty);
+        double dpz = (pz - tz);
+        double twt_pwt = (twt - pwt);
+        double dpt = (((square( dpx ) + square( dpy )) + square( dpz )) + twt_pwt);
+        double dqx = (qx - tx);
+        double dqy = (qy - ty);
+        double dqz = (qz - tz);
+        double twt_qwt = (twt - qwt);
+        double dqt = (((square( dqx ) + square( dqy )) + square( dqz )) + twt_qwt);
+        int cmp = ((px > qx) ? 1 : ((px < qx) ? -1 : 0));
+        double eps;
+        double max1;
+        double max4 = CGAL::abs(dpy);
+
+        double adqx = CGAL::abs(dqx);
+        double adqy = CGAL::abs(dqy);
+        double adqz = CGAL::abs(dqz);
+
+        double atwt_qwt = CGAL::abs(twt_qwt);
+
+        if( max4 < adqy ) max4 = adqy;
+        max1 = max4;
+        double max5 = CGAL::abs(dpz); 
+        if( max5 < adqz ) max5 = adqz;
+        if( max1 < max5 ) max1 = max5;
+        double max2 = CGAL::abs(dpx);
+        if( max2 < adqx ) max2 = adqx;
+        if( max1 < max2 ) max1 = max2;
+        double max3 = CGAL::abs(twt_pwt);
+        if( max3 < atwt_qwt ) max3 = atwt_qwt;
+        double lower_bound_1;
+        double upper_bound_1;
+        if( (cmp != 0) )
+        {
+            int int_tmp_result;
+            double double_tmp_result;
+            double_tmp_result = ((dpx * dqt) - (dqx * dpt));
+            lower_bound_1 = max1;
+            upper_bound_1 = max1;
+            if( (max2 < lower_bound_1) ) lower_bound_1 = max2;
+            //handwritten workaround to handle case where all weights are equal
+            //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
+            if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,t);
+            } 
+            else 
+            {
+                if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,t);
+                } 
+                eps = (6.88858782307641768480e-15 * (max2 * (CGAL::max)( max3, (max1 * max1) )));
+                if( (double_tmp_result > eps) )
+                {
+                    int_tmp_result = 1;
+                } 
+                else 
+                {
+                    if( (double_tmp_result < -eps) )
+                    {
+                        int_tmp_result = -1;
+                    } 
+                    else 
+                    {
+                      CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                      return Base::operator()(p,q,t);
+                    } 
+                } 
+            } 
+            return static_cast<result_type>(cmp * int_tmp_result);
+        } 
+        cmp = ((py > qy) ? 1 : ((py < qy) ? -1 : 0));
+        if( (cmp != 0) )
+        {
+          int int_tmp_result_FFWKCAA;
+          double double_tmp_result_k60Ocge;
+          double_tmp_result_k60Ocge = ((dpy * dqt) - (dqy * dpt));
+          lower_bound_1 = max1;
+          upper_bound_1 = max1;
+          if( (max4 < lower_bound_1) ) lower_bound_1 = max4;
+          //handwritten workaround to handle case where all weights are equal
+          //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
+          if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
+          {
+            CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+            return Base::operator()(p,q,t);
+          } 
+          else 
+          {
+              if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
+              {
+                CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                return Base::operator()(p,q,t);
+              } 
+              eps = (6.88858782307641768480e-15 * (max4 * (CGAL::max)( max3, (max1 * max1) )));
+              if( (double_tmp_result_k60Ocge > eps) )
+              {
+                  int_tmp_result_FFWKCAA = 1;
+              } 
+              else 
+              {
+                  if( (double_tmp_result_k60Ocge < -eps) )
+                  {
+                      int_tmp_result_FFWKCAA = -1;
+                  } 
+                  else 
+                  {
+                    CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                    return Base::operator()(p,q,t);
+                  } 
+              } 
+          } 
+          return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA);
+        } 
+        cmp = ((pz > qz) ? 1 : ((pz < qz) ? -1 : 0));
+        int int_tmp_result_3SPBwDj;
+        double double_tmp_result_k3Lzf6g = ((dpz * dqt) - (dqz * dpt));
+        lower_bound_1 = max1;
+        upper_bound_1 = max1;
+        if( (max5 < lower_bound_1) )
+        {
+            lower_bound_1 = max5;
+        } 
+        //handwritten workaround to handle case where all weights are equal
+        //if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195)) )
+        if( ((lower_bound_1 < 4.89808663633813414271e-98) || (max3 < 2.39912526970742181620e-195 && max3!=0)) )
+        {
+          CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+          return Base::operator()(p,q,t);
+        } 
+        else 
+        {
+            if( ((upper_bound_1 > 5.59936185544450928309e+101) || (max3 > 3.13528531882069776730e+203)) )
+            {
+              CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+              return Base::operator()(p,q,t);
+            } 
+            eps = (6.88858782307641768480e-15 * (max5 * (CGAL::max)( max3, (max1 * max1) )));
+            if( (double_tmp_result_k3Lzf6g > eps) )
+            {
+                int_tmp_result_3SPBwDj = 1;
+            } 
+            else 
+            {
+                if( (double_tmp_result_k3Lzf6g < -eps) )
+                {
+                    int_tmp_result_3SPBwDj = -1;
+                } 
+                else 
+                {
+                  CGAL_BRANCH_PROFILER_BRANCH_2(tmp);
+                  return Base::operator()(p,q,t);
+                } 
+            } 
+        } 
+        return static_cast<result_type>(cmp * int_tmp_result_3SPBwDj);           
+      }
+      else
+        return Base::operator()(p,q,t);
+    }
+  
+      };
+  
+} } }//namespace CGAL::internal::Static_filters_predicates
+
+#endif //CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Regular_triangulation_static_filters_traits_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filter_error.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filter_error.h
new file mode 100644
index 0000000..c59d6c0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filter_error.h
@@ -0,0 +1,164 @@
+// Copyright (c) 1999,2000  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+
+#ifndef CGAL_INTERNAL_STATIC_FILTER_ERROR_H
+#define CGAL_INTERNAL_STATIC_FILTER_ERROR_H
+
+// This file contains the description of the class Static_filter_error.
+// The goal of this class is to be run by some overloaded predicates,
+// to compute error bound done in these functions.
+// 
+// The original idea is from Olivier Devillers.
+
+// It is still EXPERIMENTAL.
+
+// TODO:
+// - I need to add some missing operators and functions, min/max...
+// - Remove the degree stuff, it's only meant for debug (?).
+// - Add __attribute__((const)) for optimizing ?
+
+#include <CGAL/basic.h>
+#include <CGAL/FPU.h>
+
+#include <boost/math/special_functions/next.hpp>
+
+namespace CGAL { namespace internal {
+
+struct Static_filter_error
+{
+  typedef Static_filter_error Sfe;
+
+  Static_filter_error () {}
+
+  Static_filter_error (const int &i, const double &e = 0, const int &d = 1)
+      : _b(i), _e(e), _d(d) {}
+
+  Static_filter_error (const double &b, const double &e = 0, const int &d = 1)
+      : _b(b), _e(e), _d(d) {}
+
+  static double ulp ()
+  {
+      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
+      double e = ulp(1);
+      FPU_set_cw(backup);
+      return e;
+  }
+
+  static double ulp (double d)
+  {
+      // You are supposed to call this function with rounding towards
+      // +infinity, and on a positive number.
+      d = CGAL_IA_FORCE_TO_DOUBLE(d); // stop constant propagation.
+      CGAL_assertion(d>=0);
+      double u;
+      double nd = boost::math::float_next(d);
+      u = nd - d;
+      // Then add extra bonus, because of Intel's extended precision feature.
+      // (ulp can be 2^-53 + 2^-64)
+      u += u / (1<<11);
+      CGAL_assertion(u!=0);
+      return u;
+  }
+
+  Sfe operator+ (const Sfe &f) const
+  {
+      CGAL_warning_msg( _d == f._d ,
+	      "you are adding variables of different homogeneous degree");
+      // We have to add an ulp, since the homogeneization could induce such
+      // an error.
+      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
+      double b = _b + f._b;
+      double u = ulp(b) / 2;
+      b += u;
+      double e = u + _e + f._e;
+      FPU_set_cw(backup);
+      return Sfe(b, e, _d);
+  }
+
+  Sfe operator* (const Sfe &f) const
+  {
+      // We have to add an ulp, since the homogeneization could induce such
+      // an error.
+      FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
+      double b = _b * f._b;
+      double u = ulp(b) / 2;
+      b += u;
+      double e = u + _e * f._e + _e * f._b + _b * f._e;
+      FPU_set_cw(backup);
+      return Sfe(b, e, _d+f._d);
+  }
+
+  Sfe operator- (const Sfe &f) const { return *this + f; }
+  Sfe operator- ()             const { return *this; }
+  // Sfe operator/ (const Sfe &) const { CGAL_error(); }
+  // Division not supported.
+
+  Sfe& operator+=(const Sfe &f) { return *this = *this + f; }
+  Sfe& operator-=(const Sfe &f) { return *this = *this - f; }
+  Sfe& operator*=(const Sfe &f) { return *this = *this * f; }
+  // Sfe& operator/=(const Sfe &f) { return *this = *this / f; }
+
+  double error()  const { return _e; }
+  double bound()  const { return _b; }
+  int    degree() const { return _d; }
+
+  bool operator< (const Sfe &f) const
+  {
+      Sfe e = *this + f;
+      std::cerr << "Static error is : " << e.error() << std::endl;
+      CGAL_error();
+      return false;
+  }
+  bool operator> (const Sfe &f) const { return *this < f; }
+  bool operator<=(const Sfe &f) const { return *this < f; }
+  bool operator>=(const Sfe &f) const { return *this < f; }
+  bool operator==(const Sfe &f) const { return *this < f; }
+  bool operator!=(const Sfe &f) const { return *this < f; }
+
+private:
+  // _b is a bound on the absolute value of the _double_ value of the
+  //    variable.
+  // _e is a bound on the absolute error (difference between _b and the
+  //    _real_ value of the variable.
+  // _d is the degree of the variable, it allows some additionnal checks.
+  double _b, _e;
+  int _d;
+};
+
+inline
+Static_filter_error
+sqrt(const Static_filter_error &f)
+{
+  CGAL_warning_msg( (f.degree() & 1) == 0,
+	            "Do you really want a non integral degree ???");
+  // We have to add an ulp, since the homogeneization could induce such
+  // an error.
+  FPU_CW_t backup = FPU_get_and_set_cw(CGAL_FE_UPWARD);
+  double b = std::sqrt(f.bound());
+  double u = Static_filter_error::ulp(b) / 2;
+  b += u;
+  double e = std::sqrt(f.error()) + u;
+  FPU_set_cw(backup);
+  return Static_filter_error(b, e, f.degree()/2);
+}
+
+} } // namespace CGAL::internal
+
+#endif // CGAL_INTERNAL_STATIC_FILTER_ERROR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filters.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filters.h
new file mode 100644
index 0000000..c373d36
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/Static_filters.h
@@ -0,0 +1,302 @@
+// Copyright (c) 2001,2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+ 
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_H
+#define CGAL_INTERNAL_STATIC_FILTERS_H
+
+// This kernel wrapper gathers optimized predicates written by hand, using
+// a few steps of filtering.  It should work if the initial traits has
+// cartesian coordinates which fit exactly in doubles.
+//
+// Purely static filters code has been removed, since it requires additional
+// logic and is not plug'n play (requires users providing bounds).
+// If it should be provided again, it should probably be separate.
+
+#include <CGAL/basic.h>
+
+#include <CGAL/Kernel/function_objects.h>
+#include <CGAL/Cartesian/function_objects.h>
+
+#include <CGAL/internal/Static_filters/tools.h>
+#include <CGAL/internal/Static_filters/Orientation_2.h>
+#include <CGAL/internal/Static_filters/Orientation_3.h>
+
+// for static filters added nov./dec. 2011
+#ifdef CGAL_DISABLE_STATIC_FILTERS_ADDED_2011
+#  define CGAL_NO_EQUAL_3_STATIC_FILTERS 1
+#  define CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS 1
+#  define CGAL_NO_ANGLE_3_STATIC_FILTERS 1
+#  define CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS 1
+#endif // CGAL_DISABLE_STATIC_FILTERS_ADDED_2011
+
+
+#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
+#  include <CGAL/internal/Static_filters/Equal_3.h>
+#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+#  include <CGAL/internal/Static_filters/Is_degenerate_3.h>
+#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
+#  include <CGAL/internal/Static_filters/Angle_3.h>
+#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+#  include <CGAL/internal/Static_filters/Do_intersect_3.h>
+#endif // NOT NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+
+#include <CGAL/internal/Static_filters/Compare_y_at_x_2.h>
+#include <CGAL/internal/Static_filters/Side_of_oriented_circle_2.h>
+#include <CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h>
+#include <CGAL/internal/Static_filters/Compare_squared_radius_3.h>
+
+// #include <CGAL/internal/Static_filters/Coplanar_orientation_3.h>
+// #include <CGAL/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h>
+
+// TODO :
+// - add more predicates :
+//   - all lexicographical comparisons
+//   - left_turn (via generic adapter to orientation)
+//   - power_tests
+//   - others ?
+// - benchmark on more algorithms.
+// - improve fit_in_double() for other NTs (MP_Float, Lazy). cf tools.h.
+// - try to automatize : have a struct a la Static_filter_error, with one part
+//   which is runtime, and the other which can be constant-propagated by the
+//   compiler.  g++ 4.0 should be able to cprop the second part...
+
+
+// Note about the second parameter of Static_filters<K,bool>:
+// - if the access to Cartesian exact coordinates is cheap
+//   (Simple_cartesian, Cartesian), then one can implement predicates that
+//   just compare coordinates without filtering, using unfiltered
+//   predicates defined in the namespace CartesianKernelFunctors.
+// 
+// - in the case of Lazy_kernel, where the access to p.x(), for a point p,
+//   triggers the construction of a Lazy_exact_nt object, one does not want
+//   to use the functors from the namespace CartesianKernelFunctors.
+
+namespace CGAL { namespace internal {
+
+// Here is the case when has_cheap_access_to_cartesian_coordinates is
+// false, used by Lazy_kernel
+// The K_base argument is supposed to provide exact primitives.
+template < typename K_base, 
+           bool has_cheap_access_to_cartesian_coordinates = true>
+class Static_filters : public K_base {
+
+
+  typedef Static_filters<K_base, 
+                         has_cheap_access_to_cartesian_coordinates>         Self;
+
+public:
+#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Equal_3<K_base>                        Equal_3;
+#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Is_degenerate_3<K_base, Self>          Is_degenerate_3;
+#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Orientation_2<K_base>                  Orientation_2;
+  typedef Static_filters_predicates::Orientation_3<K_base>                  Orientation_3;
+#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Angle_3<K_base>                        Angle_3;
+#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
+#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Do_intersect_3<K_base,Self>            Do_intersect_3;
+#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+  typedef Static_filters_predicates::Side_of_oriented_circle_2<K_base>      Side_of_oriented_circle_2;
+  typedef Static_filters_predicates::Side_of_oriented_sphere_3<K_base>      Side_of_oriented_sphere_3;
+  typedef Static_filters_predicates::Compare_squared_radius_3<K_base>       Compare_squared_radius_3;
+
+  Orientation_2
+  orientation_2_object() const
+  { return Orientation_2(); }
+
+  Orientation_3
+  orientation_3_object() const
+  { return Orientation_3(); }
+
+#ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS
+ Equal_3
+  equal_3_object() const
+  { return Equal_3(); }
+#endif // NOT CGAL_NO_EQUAL_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+ Is_degenerate_3
+  is_degenerate_3_object() const
+  { return Is_degenerate_3(); }
+#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
+  Angle_3
+  angle_3_object() const
+  { return Angle_3(); }
+#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
+
+#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+  Do_intersect_3
+  do_intersect_3_object() const
+  { return Do_intersect_3(); }
+#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
+
+  Side_of_oriented_circle_2
+  side_of_oriented_circle_2_object() const
+  { return Side_of_oriented_circle_2(); }
+
+  Side_of_oriented_sphere_3
+  side_of_oriented_sphere_3_object() const
+  { return Side_of_oriented_sphere_3(); }
+
+  Compare_squared_radius_3
+  compare_squared_radius_3_object() const
+  { return Compare_squared_radius_3(); }
+
+  enum { Has_static_filters = true };
+}; // end of class template Static_filters<K_base, false>
+
+
+// Here is the case when has_cheap_access_to_cartesian_coordinates is true,
+// the default, used by Filtered_kernel<CK>.
+// The K_base argument is supposed to provide exact primitives.
+template < typename K_base>
+class Static_filters<K_base, true> // has_cheap_access_to_cartesian_coordinates==true
+  : public Static_filters<K_base, false>
+{
+  typedef Static_filters<K_base, true>              Self;
+
+public:
+
+  typedef Static_filters_predicates::Compare_y_at_x_2<K_base,Self>          Compare_y_at_x_2;
+
+  // The following do not require filtering as they only do
+  // comparisons.  We must be careful that *all* their function
+  // operators must not do any comparisons.
+  // In case we would like to avoid filtering only some of
+  // the function operators, we need to make a new functors.
+  typedef CommonKernelFunctors::Left_turn_2<Self>   Left_turn_2;
+
+  typedef CartesianKernelFunctors::Less_x_2<Self>   Less_x_2;
+  typedef CartesianKernelFunctors::Less_y_2<Self>   Less_y_2;
+  typedef CartesianKernelFunctors::Less_xy_2<Self>  Less_xy_2;
+  typedef CartesianKernelFunctors::Less_yx_2<Self>  Less_yx_2;
+
+  typedef CartesianKernelFunctors::Less_x_3<Self>   Less_x_3;
+  typedef CartesianKernelFunctors::Less_y_3<Self>   Less_y_3;
+  typedef CartesianKernelFunctors::Less_z_3<Self>   Less_z_3;
+  typedef CartesianKernelFunctors::Less_xy_3<Self>  Less_xy_3;
+  typedef CartesianKernelFunctors::Less_xyz_3<Self> Less_xyz_3;
+
+  typedef CartesianKernelFunctors::Compare_xy_2<Self>  Compare_xy_2;
+  typedef CartesianKernelFunctors::Compare_x_3<Self>   Compare_x_3;
+  typedef CartesianKernelFunctors::Compare_y_3<Self>   Compare_y_3;
+  typedef CartesianKernelFunctors::Compare_z_3<Self>   Compare_z_3;
+  typedef CartesianKernelFunctors::Compare_xy_3<Self>  Compare_xy_3;
+  typedef CartesianKernelFunctors::Compare_xyz_3<Self> Compare_xyz_3;
+
+  Compare_xy_2
+  compare_xy_2_object() const
+  { return Compare_xy_2(); }
+
+  Compare_x_3
+  compare_x_3_object() const
+  { return Compare_x_3(); }
+
+  Compare_y_3
+  compare_y_3_object() const
+  { return Compare_y_3(); }
+
+  Compare_z_3
+  compare_z_3_object() const
+  { return Compare_z_3(); }
+
+  Compare_xy_3
+  compare_xy_3_object() const
+  { return Compare_xy_3(); }
+
+  Compare_xyz_3
+  compare_xyz_3_object() const
+  { return Compare_xyz_3(); }
+
+  Left_turn_2
+  left_turn_2_object() const
+  { return Left_turn_2(); }
+
+  Less_x_2
+  less_x_2_object() const
+  { return Less_x_2(); }
+
+  Less_y_2
+  less_y_2_object() const
+  { return Less_y_2(); }
+
+  Less_xy_2
+  less_xy_2_object() const
+  { return Less_xy_2(); }
+
+  Less_yx_2
+  less_yx_2_object() const
+  { return Less_yx_2(); }
+
+  Less_x_3
+  less_x_3_object() const
+  { return Less_x_3(); }
+
+  Less_y_3
+  less_y_3_object() const
+  { return Less_y_3(); }
+
+  Less_z_3
+  less_z_3_object() const
+  { return Less_z_3(); }
+
+  Less_xy_3
+  less_xy_3_object() const
+  { return Less_xy_3(); }
+
+  Less_xyz_3
+  less_xyz_3_object() const
+  { return Less_xyz_3(); }
+
+  Compare_y_at_x_2
+  compare_y_at_x_2_object() const
+  { return Compare_y_at_x_2(); }
+
+  // The two following are for degenerate cases, so I'll update them later.
+  //
+  // typedef Static_filters_predicates::Coplanar_orientation_3<Point_3, Orientation_2>
+  //                                                   Coplanar_orientation_3;
+  // typedef Static_filters_predicates::Side_of_bounded_circle_3<Point_3>
+  //                                         Coplanar_side_of_bounded_circle_3;
+
+  // Coplanar_orientation_3
+  // coplanar_orientation_3_object() const
+  // { return Coplanar_orientation_3(); }
+
+  // Coplanar_side_of_bounded_circle_3
+  // coplanar_side_of_bounded_circle_3_object() const
+  // { return Coplanar_side_of_bounded_circle_3(); }
+};
+
+} } // namespace CGAL::internal
+
+#endif // CGAL_INTERNAL_STATIC_FILTERS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/tools.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/tools.h
new file mode 100644
index 0000000..2556177
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_filters/tools.h
@@ -0,0 +1,193 @@
+// Copyright (c) 2001,2004  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+ 
+#ifndef CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
+#define CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
+
+#include <CGAL/basic.h>
+#include <CGAL/function_objects.h>
+#include <boost/mpl/has_xxx.hpp>
+
+namespace CGAL {
+
+template < typename ET >
+class Lazy_exact_nt;
+
+namespace internal {
+
+// Utility function to check a posteriori that a subtraction was performed
+// without rounding error.
+inline bool diff_was_exact(double a, double b, double ab)
+{
+    return ab+b == a && a-ab == b;
+}
+
+template < typename T >
+inline void init_double(double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&,double&, double&, double&, double&, double&, double&, T* ) {}
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+
+template < typename T >
+inline void init_double(double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, double&, T* ) {}
+
+
+
+template < typename ET >
+inline void init_double(double& d0, Lazy_exact_nt<ET>* )
+{d0 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, Lazy_exact_nt<ET>* )
+{d0 = d1 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double& d8, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = 0;}
+
+template < typename ET >
+inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, Lazy_exact_nt<ET>* )
+{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = 0;}
+
+
+// Auxiliary function to check if static filters can be applied, that is,
+// if to_double() does not add roundoff errors.
+// TODO :
+// - generalize it to other number types.
+// - promote it as a number type requirement ?
+// - naming : is_representable_in_double() ?
+//            is_representable<T>() for representable in T ?
+
+// Current semantics :  bool fit_in_double(const NT& n, double &)
+//
+// - returns true means that "n" is exactly representable by a double,
+//   _and_ then "returns" it in the reference.
+// - it is fine to return false conservatively.
+
+template < typename T >
+inline bool fit_in_double(const T&, double&) { return false; }
+
+inline bool fit_in_double(const double& d, double& r) { r = d; return true; }
+
+inline bool fit_in_double(const float& f, double& r) { r = f; return true; }
+
+inline bool fit_in_double(const int& i, double& r) { r = i; return true; }
+
+template < typename ET >
+inline bool fit_in_double(const Lazy_exact_nt<ET>&, double&);
+
+
+// Auxiliary functor, to get the approximation of a kernel object:
+//   - for a Point_3 of the Lazy_kernel<...>, one needs to call approx(),
+//   - for a Point_3 of Simple_cartesian<double>, for example, the
+//     approximation is the object itself.
+
+namespace Static_filters_predicates {
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Kernel_object_has_approx, \
+                                  Approximate_type, \
+                                  false)
+
+template <typename T, bool has_approx = Kernel_object_has_approx<T>::value>
+struct Get_approx : public CGAL::Identity<T> {
+  // If has_approx==false, this functor is the identity.
+};
+
+template <typename T>
+struct Get_approx<T, true> {
+  // If has_approx==false, this functor get .approx() on its argument.
+  const typename T::Approximate_type& operator()(const T& x) const { return x.approx(); }
+  typename T::Approximate_type& operator()(T& x) const { return x.approx(); }
+};
+
+} // end namespace Static_filters_predicates
+
+} } // namespace CGAL::internal
+
+#endif // CGAL_INTERNAL_STATIC_FILTERS_TOOLS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Static_or_dynamic_array.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Static_or_dynamic_array.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Static_or_dynamic_array.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Static_or_dynamic_array.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h
new file mode 100644
index 0000000..48b46cc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h
@@ -0,0 +1,92 @@
+#ifndef CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
+// Copyright (c) 2014  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#define CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
+
+#include <CGAL/AABB_traits.h>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+
+namespace CGAL
+{
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+template<typename GeomTraits, typename AABB_primitive, bool fast_bbox_intersection>
+class AABB_traits_SDF :
+  public AABB_traits<GeomTraits, AABB_primitive>
+{
+public:
+  typedef AABB_traits<GeomTraits, AABB_primitive> Base_traits;
+  typedef typename Base_traits::Bounding_box Bounding_box;
+  typedef typename Base_traits::Point_3 Point_3;
+
+  class Do_intersect
+    : public Base_traits::Do_intersect
+  {
+  public:
+    Do_intersect(const AABB_traits<GeomTraits,AABB_primitive>& traits)
+      :Base_traits::Do_intersect(traits) {}
+
+    // not sure is it safe on templated funcs ? may be do not inherit and repeat functions...
+    using Base_traits::Do_intersect::operator ();
+
+    // activate functions below if K::FT is floating point and fast_bbox_intersection = true
+    template <class K>
+    typename boost::enable_if_c<
+      boost::is_floating_point<typename K::FT>::value && fast_bbox_intersection,
+          bool >::type
+    operator()(const CGAL::Segment_3<K>& segment, const Bounding_box& bbox) const {
+      const Point_3& p = segment.source();
+      const Point_3& q = segment.target();
+
+      return internal::do_intersect_bbox_segment_aux
+             <double,
+             true, // bounded at t=0
+             true, // bounded at t=1
+             false> // do not use static filters
+             (p.x(), p.y(), p.z(),
+              q.x(), q.y(), q.z(),
+              bbox);
+    }
+
+    template <class K>
+    typename boost::enable_if_c<
+      boost::is_floating_point<typename K::FT>::value && fast_bbox_intersection,
+          bool >::type
+    operator()(const CGAL::Ray_3<K>& ray, const Bounding_box& bbox) const {
+      const Point_3& p = ray.source();
+      const Point_3& q = ray.second_point();
+
+      return internal::do_intersect_bbox_segment_aux
+             <double,
+             true, // bounded at t=0
+             false,// not bounded at t=1
+             false> // do not use static filters
+             (p.x(), p.y(), p.z(),
+              q.x(), q.y(), q.z(),
+              bbox);
+    }
+
+  };
+
+  Do_intersect do_intersect_object() const {
+    return Do_intersect(*this);
+  }
+};
+/// @endcond
+
+} //namespace CGAL
+#endif //CGAL_INTERNAL_SURFACE_MESH_SEGMENTATION_AABB_TRAITS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/AABB_traversal_traits.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traversal_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/AABB_traversal_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traversal_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h
new file mode 100644
index 0000000..a2d0fa4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h
@@ -0,0 +1,688 @@
+#ifndef CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
+// Copyright (c) 2014  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#define CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+
+/**
+ * @file Alpha_expansion_graph_cut.h
+ * @brief This file contains 3 graph-cut algorithms, which can be used as a template parameter for CGAL::internal::Surface_mesh_segmentation.
+ *
+ * Main differences between implementations are underlying max-flow algorithm and graph type (i.e. results are the same, performance differs).
+ *
+ * By default, we use MAXFLOW and the class Alpha_expansion_graph_cut_boykov_kolmogorov.
+ * For deactivating MAXFLOW software and using boost implementation instead, define CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE.
+ * It deactivates Alpha_expansion_graph_cut_boykov_kolmogorov, activate boost versions
+ * and makes CGAL::internal::Surface_mesh_segmentation using Alpha_expansion_graph_cut_boost
+ * as default implementation for the graph-cut.
+ *
+ * Also algorithms can be used by their-own for applying alpha-expansion graph-cut on any graph.
+ *
+ */
+#include <CGAL/assertions.h>
+#ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+#include <CGAL/Timer.h>
+#endif
+#include <CGAL/trace.h>
+
+#include <CGAL/boost/graph/named_function_params.h>
+
+#include <boost/version.hpp>
+#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/compressed_sparse_row_graph.hpp>
+#if BOOST_VERSION >= 104400 // at this version kolmogorov_max_flow become depricated.
+#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
+#else
+#include <boost/graph/kolmogorov_max_flow.hpp>
+#endif
+#else
+namespace MaxFlow
+{
+#include <CGAL/internal/auxiliary/graph.h>
+}
+#endif
+
+#include <vector>
+
+
+
+
+namespace CGAL
+{
+namespace internal
+{
+
+////////////////////////////////////////////////////////////////////////////////////////
+//   Comments about performance:
+//
+// 1) With BGL:
+//     * Using adjacency_list:
+//     ** Without pre-allocating vertex-list
+//       | OutEdgeList | VertexList | Performance |
+//       |    listS    |   listS    |     25.2    |
+//       |    vecS     |   listS    |     22.7    |
+//       |    listS    |   vecS     |     30.7    |
+//       |    vecS     |   vecS     |     26.1    |
+//
+//     ** With pre-allocating vertex-list with max-node size
+//        (Note: exact number of vertices are not certain at the beginning)
+//       | OutEdgeList | VertexList | Performance |
+//       |    listS    |   vecS     |     25.2    |
+//       |    vecS     |   vecS     |     23.4    |
+//
+//     * Didn't try adjacency_matrix since our graph is sparse
+//     ( Also one can check BGL book, performance section )
+//
+//    Decision:
+//     * Alpha_expansion_graph_cut_boost: use adjacency_list<vecS, listS> without
+//       pre-allocating vertex-list.
+//
+// 2) With Boykov-Kolmogorov MAXFLOW software:
+//   (http://pub.ist.ac.at/~vnk/software/maxflow-v2.21.src.tar.gz)
+//                                  | Performance |
+//                                  |     3.1     |
+//     * Alpha_expansion_graph_cut_boykov_kolmogorov provides an implementation.
+//       MAXFLOW does not provide any option for pre-allocation (It is possible with v_3.02 though).
+//
+// Typical Benchmark result provided by Ilker
+//                                 | construction of vertices  |  construction of edges    | graph cut  | Total
+//   -----------------------------------------------------------------------------------------------------------
+//   boost with an adjacency list  |         1.53              | 1.51                      |  3.00      | 6.04
+//   boost with CSR                | 0.11 (gather in a vector) | 0.15 (gather in a vector) |  2.67      | 2.93
+//   MaxFlow                       |       0.042               | 0.076                     |  1.043     | 1.161
+//
+// The main issue for now with CSR is the construction of the opposite edge map that is too costly,
+// since it is done by exploring all edges to find opposite
+////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
+/**
+ * @brief Implements alpha-expansion graph cut algorithm.
+ *
+ * For representing graph, it uses adjacency_list with OutEdgeList = vecS, VertexList = listS.
+ * Also no pre-allocation is made for vertex-list.
+ */
+class Alpha_expansion_graph_cut_boost
+{
+private:
+  typedef boost::adjacency_list_traits<boost::vecS, boost::listS, boost::directedS>
+  Adjacency_list_traits;
+
+  typedef boost::adjacency_list<boost::vecS, boost::listS, boost::directedS,
+          // 4 vertex properties
+          boost::property<boost::vertex_index_t, std::size_t,
+          boost::property<boost::vertex_color_t, boost::default_color_type,
+          boost::property<boost::vertex_distance_t, double,
+          boost::property<boost::vertex_predecessor_t, Adjacency_list_traits::edge_descriptor >
+          > > >,
+          // 3 edge properties
+          boost::property<boost::edge_capacity_t, double,
+          boost::property<boost::edge_residual_capacity_t, double,
+          boost::property<boost::edge_reverse_t, Adjacency_list_traits::edge_descriptor> >
+          > > Graph;
+
+  typedef boost::graph_traits<Graph> Traits;
+  typedef boost::color_traits<boost::default_color_type> ColorTraits;
+
+  typedef Traits::vertex_descriptor Vertex_descriptor;
+  typedef Traits::vertex_iterator   Vertex_iterator;
+  typedef Traits::edge_descriptor   Edge_descriptor;
+  typedef Traits::edge_iterator     Edge_iterator;
+
+  /**
+   * Adds two directional edges between @a v1 and @a v2
+   * @param v1 first vertex
+   * @param v2 second vertex
+   * @param w1 weight for edge from v1 to v2 (v1->v2)
+   * @param w2 weight for edge from v2 to v1 (v2->v1)
+   * @param graph to be added
+   * @return pair of added edges, first: v1->v2 and second: v2->v1
+   */
+  boost::tuple<Edge_descriptor, Edge_descriptor>
+  add_edge_and_reverse(Vertex_descriptor& v1, Vertex_descriptor& v2, double w1,
+                       double w2, Graph& graph) const {
+    Edge_descriptor v1_v2, v2_v1;
+    bool v1_v2_added, v2_v1_added;
+
+    boost::tie(v1_v2, v1_v2_added) = boost::add_edge(v1, v2, graph);
+    boost::tie(v2_v1, v2_v1_added) = boost::add_edge(v2, v1, graph);
+
+    CGAL_assertion(v1_v2_added && v2_v1_added);
+    //put edge capacities
+    boost::put(boost::edge_reverse, graph, v1_v2, v2_v1);
+    boost::put(boost::edge_reverse, graph, v2_v1, v1_v2);
+
+    //map reverse edges
+    boost::put(boost::edge_capacity, graph, v1_v2, w1);
+    boost::put(boost::edge_capacity, graph, v2_v1, w2);
+
+    return boost::make_tuple(v1_v2, v2_v1);
+  }
+
+public:
+  /**
+   * Applies alpha-expansion graph-cut for energy minimization.
+   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
+   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
+   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
+   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
+   * and as output it returns final labeling of vertices (i.e. assigned cluster-id to each facet)
+   * @return result of energy function
+   */
+  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
+                    edges,
+                    const std::vector<double>& edge_weights,
+                    const std::vector<std::vector<double> >& probability_matrix,
+                    std::vector<std::size_t>& labels) const {
+    const double tolerance = 1e-10;
+
+    double min_cut = (std::numeric_limits<double>::max)();
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    double vertex_creation_time, edge_creation_time, cut_time;
+    vertex_creation_time = edge_creation_time = cut_time = 0.0;
+    #endif
+
+    std::vector<Vertex_descriptor> inserted_vertices;
+    inserted_vertices.resize(labels.size());
+
+    Graph graph;
+
+    bool success;
+    do {
+      success = false;
+      std::size_t alpha = 0;
+
+      for(std::vector<std::vector<double> >::const_iterator it =
+            probability_matrix.begin();
+          it != probability_matrix.end(); ++it, ++alpha) {
+        graph.clear();
+
+        Vertex_descriptor cluster_source = boost::add_vertex(graph);
+        Vertex_descriptor cluster_sink = boost::add_vertex(graph);
+
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        Timer timer;
+        timer.start();
+        #endif
+
+        // For E-Data
+        // add every facet as a vertex to the graph, put edges to source & sink vertices
+        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
+          Vertex_descriptor new_vertex = boost::add_vertex(graph);
+          inserted_vertices[vertex_i] = new_vertex;
+          double source_weight = probability_matrix[alpha][vertex_i];
+          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
+          // making sink_weight 'infinity' guarantee this.
+          double sink_weight = (labels[vertex_i] == alpha) ?
+                               (std::numeric_limits<double>::max)()
+                               : probability_matrix[labels[vertex_i]][vertex_i];
+
+          add_edge_and_reverse(cluster_source, new_vertex, source_weight, 0.0, graph);
+          add_edge_and_reverse(new_vertex, cluster_sink, sink_weight, 0.0, graph);
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        vertex_creation_time += timer.time();
+        timer.reset();
+        #endif
+
+        // For E-Smooth
+        // add edge between every vertex,
+        std::vector<double>::const_iterator weight_it = edge_weights.begin();
+        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
+              edges.begin(); edge_it != edges.end();
+            ++edge_it, ++weight_it) {
+          Vertex_descriptor v1 = inserted_vertices[edge_it->first],
+                            v2 = inserted_vertices[edge_it->second];
+          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
+          if(label_1 == label_2) {
+            if(label_1 != alpha) {
+              add_edge_and_reverse(v1, v2, *weight_it, *weight_it, graph);
+            }
+          } else {
+            Vertex_descriptor inbetween = boost::add_vertex(graph);
+
+            double w1 = (label_1 == alpha) ? 0 : *weight_it;
+            double w2 = (label_2 == alpha) ? 0 : *weight_it;
+            add_edge_and_reverse(inbetween, v1, w1, w1, graph);
+            add_edge_and_reverse(inbetween, v2, w2, w2, graph);
+            add_edge_and_reverse(inbetween, cluster_sink, *weight_it, 0.0, graph);
+          }
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        edge_creation_time += timer.time();
+        #endif
+
+        // initialize vertex indices, it is neccessary since we are using VertexList = listS
+        Vertex_iterator v_begin, v_end;
+        Traits::vertices_size_type index = 0;
+        for(boost::tie(v_begin, v_end) = vertices(graph); v_begin != v_end; ++v_begin) {
+          boost::put(boost::vertex_index, graph, *v_begin, index++);
+        }
+
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        timer.reset();
+        #endif
+#if BOOST_VERSION >= 104400
+        double flow = boost::boykov_kolmogorov_max_flow(graph, cluster_source,
+                      cluster_sink);
+#else
+        double flow = boost::kolmogorov_max_flow(graph, cluster_source, cluster_sink);
+#endif
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        cut_time += timer.time();
+        #endif
+
+        if(min_cut - flow < flow * tolerance) {
+          continue;
+        }
+        min_cut = flow;
+        success = true;
+        //update labeling
+        for(std::size_t vertex_i = 0; vertex_i < inserted_vertices.size(); ++vertex_i) {
+          boost::default_color_type color = boost::get(boost::vertex_color, graph,
+                                            inserted_vertices[vertex_i]);
+          if(labels[vertex_i] != alpha
+              && color == ColorTraits::white()) { //new comers (expansion occurs)
+            labels[vertex_i] = alpha;
+          }
+        }
+      }
+    } while(success);
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
+                      std::endl;
+    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
+    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
+    #endif
+
+    return min_cut;
+  }
+};
+
+// another implementation using compressed_sparse_row_graph
+// for now there is a performance problem while setting reverse edges
+// if that can be solved, it is faster than Alpha_expansion_graph_cut_boost
+class Alpha_expansion_graph_cut_boost_CSR
+{
+private:
+  // CSR only accepts bundled props
+  struct VertexP {
+    boost::default_color_type vertex_color;
+    double vertex_distance_t;
+    // ? do not now there is another way to take it, I think since edge_descriptor does not rely on properties
+    // this should be fine...
+    boost::compressed_sparse_row_graph<boost::directedS>::edge_descriptor
+    vertex_predecessor;
+  };
+
+  struct EdgeP {
+    double edge_capacity;
+    double edge_residual_capacity;
+    boost::compressed_sparse_row_graph<boost::directedS>::edge_descriptor
+    edge_reverse;
+  };
+
+  typedef boost::compressed_sparse_row_graph<boost::directedS,
+          VertexP, EdgeP> Graph;
+
+  typedef boost::graph_traits<Graph> Traits;
+  typedef boost::color_traits<boost::default_color_type> ColorTraits;
+
+  typedef Traits::vertex_descriptor Vertex_descriptor;
+  typedef Traits::vertex_iterator   Vertex_iterator;
+  typedef Traits::edge_descriptor   Edge_descriptor;
+  typedef Traits::edge_iterator     Edge_iterator;
+
+  void
+  add_edge_and_reverse(std::size_t v1 , std::size_t v2, double w1, double w2,
+                       std::vector<std::pair<std::size_t, std::size_t> >& edge_map,
+                       std::vector<EdgeP>& edge_weights) const {
+    edge_map.push_back(std::make_pair(v1, v2));
+    EdgeP p1;
+    p1.edge_capacity = w1;
+    edge_weights.push_back(p1);
+
+    edge_map.push_back(std::make_pair(v2, v1));
+    EdgeP p2;
+    p2.edge_capacity = w2;
+    edge_weights.push_back(p2);
+  }
+
+public:
+  /**
+   * Applies alpha-expansion graph-cut for energy minimization.
+   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
+   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
+   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
+   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
+   * and as output it returns final labeling of vertices (i.e. assigned cluster-id to each facet)
+   * @return result of energy function
+   */
+  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
+                    edges,
+                    const std::vector<double>& edge_weights,
+                    const std::vector<std::vector<double> >& probability_matrix,
+                    std::vector<std::size_t>& labels) const {
+    const double tolerance = 1e-10;
+
+    double min_cut = (std::numeric_limits<double>::max)();
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    double vertex_creation_time, edge_creation_time, graph_creation_time,
+           reverse_mapping_time, cut_time;
+    vertex_creation_time = edge_creation_time = graph_creation_time =
+                             reverse_mapping_time = cut_time = 0.0;
+    #endif
+
+    Graph graph;
+
+    bool success;
+    do {
+      success = false;
+      std::size_t alpha = 0;
+
+      for(std::vector<std::vector<double> >::const_iterator it =
+            probability_matrix.begin();
+          it != probability_matrix.end(); ++it, ++alpha) {
+        std::vector<std::pair<std::size_t, std::size_t> > edge_map;
+        std::vector<EdgeP>                edge_map_weights;
+        edge_map.reserve(labels.size() *
+                         8); // there is no way to know exact edge count, it is a heuristic value
+        edge_map_weights.reserve(labels.size() * 8);
+
+        std::size_t cluster_source = 0;
+        std::size_t cluster_sink = 1;
+
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        Timer timer;
+        timer.start();
+        #endif
+        // For E-Data
+        // add every facet as a vertex to the graph, put edges to source & sink vertices
+        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
+          double source_weight = probability_matrix[alpha][vertex_i];
+          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
+          // making sink_weight 'infinity' guarantee this.
+          double sink_weight = (labels[vertex_i] == alpha) ?
+                               (std::numeric_limits<double>::max)()
+                               : probability_matrix[labels[vertex_i]][vertex_i];
+
+          add_edge_and_reverse(cluster_source, vertex_i + 2, source_weight, 0.0, edge_map,
+                               edge_map_weights);
+          add_edge_and_reverse(vertex_i + 2, cluster_sink, sink_weight, 0.0, edge_map,
+                               edge_map_weights);
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        vertex_creation_time += timer.time();
+        timer.reset();
+        #endif
+        // For E-Smooth
+        // add edge between every vertex,
+        std::size_t num_vert = labels.size() + 2;
+        std::vector<double>::const_iterator weight_it = edge_weights.begin();
+        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
+              edges.begin(); edge_it != edges.end();
+            ++edge_it, ++weight_it) {
+          std::size_t v1 = edge_it->first + 2, v2 = edge_it->second + 2;
+          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
+          if(label_1 == label_2) {
+            if(label_1 != alpha) {
+              add_edge_and_reverse(v1, v2, *weight_it, *weight_it, edge_map,
+                                   edge_map_weights);
+            }
+          } else {
+            std::size_t inbetween = num_vert++;
+
+            double w1 = (label_1 == alpha) ? 0 : *weight_it;
+            double w2 = (label_2 == alpha) ? 0 : *weight_it;
+            add_edge_and_reverse(inbetween, v1, w1, w1, edge_map, edge_map_weights);
+            add_edge_and_reverse(inbetween, v2, w2, w2, edge_map, edge_map_weights);
+            add_edge_and_reverse(inbetween, cluster_sink, *weight_it, 0.0, edge_map,
+                                 edge_map_weights);
+          }
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        edge_creation_time += timer.time();
+        timer.reset();
+        #endif
+#if BOOST_VERSION >= 104000
+        Graph graph(boost::edges_are_unsorted, edge_map.begin(), edge_map.end(),
+                    edge_map_weights.begin(), num_vert);
+#else
+        Graph graph(edge_map.begin(), edge_map.end(),
+                    edge_map_weights.begin(), num_vert);
+#endif
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        graph_creation_time += timer.time();
+        timer.reset();
+        #endif
+
+        // PERFORMANCE PROBLEM
+        // need to set reverse edge map, I guess there is no way to do that before creating the graph
+        // since we do not have edge_descs
+        // however from our edge_map, we know that each (2i, 2i + 1) is reverse pairs, how to facilitate that ?
+        // will look it back
+        Graph::edge_iterator ei, ee;
+        for(boost::tie(ei, ee) = boost::edges(graph); ei != ee; ++ei) {
+          Graph::vertex_descriptor v1 = boost::source(*ei, graph);
+          Graph::vertex_descriptor v2 = boost::target(*ei, graph);
+          std::pair<Graph::edge_descriptor, bool> opp_edge = boost::edge(v2, v1, graph);
+
+          CGAL_assertion(opp_edge.second);
+          graph[opp_edge.first].edge_reverse =
+            *ei; // and edge_reverse of *ei will be (or already have been) set by the opp_edge
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        reverse_mapping_time += timer.time();
+        timer.reset();
+        #endif
+
+#if BOOST_VERSION >= 104400
+        // since properties are bundled, defaults does not work need to specify them
+        double flow = boost::boykov_kolmogorov_max_flow(graph,
+                      boost::get(&EdgeP::edge_capacity, graph),
+                      boost::get(&EdgeP::edge_residual_capacity, graph),
+                      boost::get(&EdgeP::edge_reverse, graph),
+                      boost::get(&VertexP::vertex_predecessor, graph),
+                      boost::get(&VertexP::vertex_color, graph),
+                      boost::get(&VertexP::vertex_distance_t, graph),
+                      boost::get(boost::vertex_index,
+                                 graph), // this is not bundled, get it from graph (CRS provides one)
+                      cluster_source,
+                      cluster_sink
+                                                       );
+#else
+        double flow = boost::kolmogorov_max_flow(graph,
+                      boost::get(&EdgeP::edge_capacity, graph),
+                      boost::get(&EdgeP::edge_residual_capacity, graph),
+                      boost::get(&EdgeP::edge_reverse, graph),
+                      boost::get(&VertexP::vertex_predecessor, graph),
+                      boost::get(&VertexP::vertex_color, graph),
+                      boost::get(&VertexP::vertex_distance_t, graph),
+                      boost::get(boost::vertex_index,
+                                 graph), // this is not bundled, get it from graph
+                      cluster_source,
+                      cluster_sink
+                                                );
+#endif
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        cut_time += timer.time();
+        #endif
+
+        if(min_cut - flow < flow * tolerance) {
+          continue;
+        }
+        min_cut = flow;
+        success = true;
+        //update labeling
+        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
+          boost::default_color_type color =  graph[vertex_i + 2].vertex_color;
+          if(labels[vertex_i] != alpha
+              && color == ColorTraits::white()) { //new comers (expansion occurs)
+            labels[vertex_i] = alpha;
+          }
+        }
+      }
+    } while(success);
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
+                      std::endl;
+    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
+    CGAL_TRACE_STREAM << "graph creation time: " << graph_creation_time <<
+                      std::endl;
+    CGAL_TRACE_STREAM << "reverse mapping time: " << reverse_mapping_time <<
+                      std::endl;
+    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
+    #endif
+    return min_cut;
+  }
+};
+#endif
+
+#ifndef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
+/**
+ * @brief Implements alpha-expansion graph cut algorithm.
+ *
+ * For underlying max-flow algorithm, it uses the MAXFLOW software implemented by Boykov & Kolmogorov.
+ *  Also no pre-allocation is made.
+ */
+class Alpha_expansion_graph_cut_boykov_kolmogorov
+{
+public:
+  /**
+   * Applies alpha-expansion graph-cut for energy minimization.
+   * @param edges contains incident vertex-id pairs for each edge (vertex-ids should be between [0, number of vertices -1])
+   * @param edge_weights contains weights for each edge in @a edges (correspondence according to order)
+   * @param probability_matrix contains responsibility of the center on the vertex probability[center][vertex]
+   * @param[in, out] labels as input it contains initial labeling of vertices (i.e. a center-id between [0, number of centers -1]),
+   * and as output it returns final labeling of vertices
+   * @return result of energy function
+   */
+  double operator()(const std::vector<std::pair<std::size_t, std::size_t> >&
+                    edges,
+                    const std::vector<double>& edge_weights,
+                    const std::vector<std::vector<double> >& probability_matrix,
+                    std::vector<std::size_t>& labels) const {
+    const double tolerance = 1e-10;
+
+    double min_cut = (std::numeric_limits<double>::max)();
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    double vertex_creation_time, edge_creation_time, cut_time;
+    vertex_creation_time = edge_creation_time = cut_time = 0.0;
+    #endif
+
+    std::vector<MaxFlow::Graph::node_id> inserted_vertices;
+    inserted_vertices.resize(labels.size());
+    bool success;
+    do {
+      success = false;
+      std::size_t alpha = 0;
+      for(std::vector<std::vector<double> >::const_iterator it =
+            probability_matrix.begin();
+          it != probability_matrix.end(); ++it, ++alpha) {
+        MaxFlow::Graph graph;
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        Timer timer;
+        timer.start();
+        #endif
+        // For E-Data
+        // add every facet as a vertex to graph, put edges to source-sink vertices
+        for(std::size_t vertex_i = 0; vertex_i <  labels.size(); ++vertex_i) {
+          MaxFlow::Graph::node_id new_vertex = graph.add_node();
+          inserted_vertices[vertex_i] = new_vertex;
+
+          double source_weight = probability_matrix[alpha][vertex_i];
+          // since it is expansion move, current alpha labeled vertices will be assigned to alpha again,
+          // making sink_weight 'infinity' guarantee this.
+          double sink_weight = (labels[vertex_i] == alpha) ?
+                               (std::numeric_limits<double>::max)()
+                               : probability_matrix[labels[vertex_i]][vertex_i];
+          graph.add_tweights(new_vertex, source_weight, sink_weight);
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        vertex_creation_time += timer.time();
+        timer.reset();
+        #endif
+        // For E-Smooth
+        // add edge between every vertex,
+        std::vector<double>::const_iterator weight_it = edge_weights.begin();
+        for(std::vector<std::pair<std::size_t, std::size_t> >::const_iterator edge_it =
+              edges.begin(); edge_it != edges.end();
+            ++edge_it, ++weight_it) {
+          MaxFlow::Graph::node_id v1 = inserted_vertices[edge_it->first];
+          MaxFlow::Graph::node_id v2 = inserted_vertices[edge_it->second];
+          std::size_t label_1 = labels[edge_it->first], label_2 = labels[edge_it->second];
+          if(label_1 == label_2) {
+            if(label_1 != alpha) {
+              graph.add_edge(v1, v2, *weight_it, *weight_it);
+            }
+          } else {
+            MaxFlow::Graph::node_id inbetween = graph.add_node();
+
+            double w1 = (label_1 == alpha) ? 0 : *weight_it;
+            double w2 = (label_2 == alpha) ? 0 : *weight_it;
+            graph.add_edge(inbetween, v1, w1, w1);
+            graph.add_edge(inbetween, v2, w2, w2);
+
+            graph.add_tweights(inbetween, 0.0, *weight_it);
+          }
+        }
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        edge_creation_time += timer.time();
+        timer.reset();
+        #endif
+
+        double flow = graph.maxflow();
+        #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+        cut_time += timer.time();
+        #endif
+
+        if(min_cut - flow < flow * tolerance) {
+          continue;
+        }
+
+        min_cut = flow;
+        success = true;
+        //update labeling
+        for(std::size_t vertex_i = 0; vertex_i < labels.size(); ++vertex_i) {
+          if(labels[vertex_i] != alpha
+              && graph.what_segment(inserted_vertices[vertex_i]) == MaxFlow::Graph::SINK) {
+            labels[vertex_i] = alpha;
+          }
+        }
+      }
+    } while(success);
+
+    #ifdef CGAL_SEGMENTATION_BENCH_GRAPHCUT
+    CGAL_TRACE_STREAM << "vertex creation time: " << vertex_creation_time <<
+                      std::endl;
+    CGAL_TRACE_STREAM << "edge creation time: " << edge_creation_time << std::endl;
+    CGAL_TRACE_STREAM << "max flow algorithm time: " << cut_time << std::endl;
+    #endif
+    return min_cut;
+  }
+};
+#endif //CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE
+}//namespace internal
+/// @endcond
+}//namespace CGAL
+#endif //CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Filters.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Filters.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Filters.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Filters.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/SDF_calculation.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/SDF_calculation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/SDF_calculation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/SDF_calculation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Curve_skeleton.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Curve_skeleton.h
new file mode 100644
index 0000000..235d743
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Curve_skeleton.h
@@ -0,0 +1,617 @@
+// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Xiang Gao <gaox at ethz.ch>
+//
+
+#ifndef CGAL_MCFSKEL_CURVE_SKELETON_H
+#define CGAL_MCFSKEL_CURVE_SKELETON_H
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+
+/**
+ * @file Curve_skeleton.h
+ * @brief This file contains the class used to turn a contracted mesh to a
+ * curve skeleton.
+ *
+ */
+#include <cmath>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+#include <boost/graph/copy.hpp>
+
+// For debugging macro
+#include <CGAL/internal/Surface_mesh_skeletonization/Debug.h>
+
+namespace CGAL {
+namespace internal {
+
+template <class TriangleMesh, class VertexIndexMap,
+          class HalfedgeIndexMap, class TriangleMeshPointPMap>
+class Curve_skeleton
+{
+// Public types
+public:
+
+  // Geometric types
+  typedef typename TriangleMesh::Traits      Kernel;
+  typedef typename Kernel::Vector_3           Vector;
+  typedef typename Kernel::Point_3            Point;
+
+  // Repeat TriangleMesh types
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor         vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::face_descriptor           face_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor           edge_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor       halfedge_descriptor;
+
+// Data members
+private:
+  std::vector<std::vector<int> > edge_to_face;
+  std::vector<std::vector<int> > edge_to_vertex;
+  std::vector<std::vector<int> > vertex_to_edge;
+  std::vector<std::vector<int> > face_to_edge;
+  std::vector<bool> is_vertex_deleted;
+  std::vector<bool> is_edge_deleted;
+  std::vector<bool> is_face_deleted;
+
+  std::vector<int> surface_vertex_id;
+  // records the vertices collapsed to a given vertex
+  std::vector<std::vector<int> > record;
+  // vertex id mapped to vertex descriptor
+  std::vector<vertex_descriptor> id_to_descriptor;
+
+  TriangleMesh& hg;
+
+  VertexIndexMap vertex_id_pmap;
+  HalfedgeIndexMap hedge_id_pmap;
+  TriangleMeshPointPMap hg_point_pmap;
+
+  std::vector<double> edge_squared_lengths;
+
+  class EdgeCompareFunctor
+  {
+  public:
+      std::vector<double> edge_squared_lengths;
+
+      EdgeCompareFunctor(std::vector<double>& squared_lengths)
+      {
+          edge_squared_lengths = squared_lengths;
+      }
+
+      bool operator() (const int& e0, const int& e1) const
+      {
+          double p0 = edge_squared_lengths[e0];
+          double p1 = edge_squared_lengths[e1];
+          return (p0 == p1) ? (e0 < e1) : (p0 < p1);
+      }
+  };
+
+  // type of priority queue for edges
+  typedef std::set<int, EdgeCompareFunctor>                                       Edge_queue;
+
+// Public methods
+public:
+  Curve_skeleton(TriangleMesh& hg,
+                 VertexIndexMap vertex_id_pmap,
+                 HalfedgeIndexMap hedge_id_pmap,
+                 TriangleMeshPointPMap hg_point_pmap)
+    : hg(hg)
+    , vertex_id_pmap(vertex_id_pmap)
+    , hedge_id_pmap(hedge_id_pmap)
+    , hg_point_pmap(hg_point_pmap)
+  {}
+
+  // Extracting the skeleton to a boost::graph data structure.
+  template <class Graph>
+  void extract_skeleton(Graph& curve)
+  {
+    typedef typename boost::graph_traits<Graph>::vertex_descriptor                  vertex_desc;
+    typedef typename boost::graph_traits<Graph>::edge_descriptor                    edge_desc;
+
+    init();
+    collapse();
+
+    // orig_vertex_id maps the new id for a vertex to its original id.
+    // new_vertex_id only contains id for vertices that have not been deleted.
+    std::vector<int> new_vertex_id;
+    std::vector<int> orig_vertex_id;
+    new_vertex_id.clear();
+    new_vertex_id.resize(vertex_to_edge.size(), -1);
+    orig_vertex_id.clear();
+    orig_vertex_id.resize(vertex_to_edge.size(), -1);
+
+    int id = 0;
+    for (size_t i = 0; i < is_vertex_deleted.size(); ++i)
+    {
+      if (!is_vertex_deleted[i])
+      {
+        orig_vertex_id[id] = static_cast<int>(i);
+        new_vertex_id[i] = id++;
+      }
+    }
+
+    // Mapping a skeleton vertex id to its descriptor.
+    std::vector<vertex_desc> id_to_vd;
+    id_to_vd.clear();
+    id_to_vd.resize(id);
+
+    for (int i = 0; i < id; ++i)
+      id_to_vd[i] = boost::add_vertex(curve);
+
+    for (int i = 0; i < id; ++i)
+    {
+      int orig_id = orig_vertex_id[i];
+      vertex_desc vd = id_to_vd[i];
+
+      /// code that is not working
+      BOOST_FOREACH(int vid, record[orig_id])
+      {
+        vertex_descriptor ovd = id_to_descriptor[vid];
+        curve[vd].vertices.insert(
+          curve[vd].vertices.end(),
+          ovd->vertices.begin(),
+          ovd->vertices.end()
+        );
+      }
+    }
+
+    for (size_t i = 0; i < is_edge_deleted.size(); ++i)
+    {
+      if (!is_edge_deleted[i])
+      {
+        int p1 = edge_to_vertex[i][0];
+        int p2 = edge_to_vertex[i][1];
+        int p1_id = new_vertex_id[p1];
+        int p2_id = new_vertex_id[p2];
+        vertex_desc p1_vd = id_to_vd[p1_id];
+        vertex_desc p2_vd = id_to_vd[p2_id];
+
+        bool exist;
+        edge_desc edge;
+        boost::tie(edge, exist) = boost::edge(p1_vd, p2_vd, curve);
+        if (!exist)
+        {
+          boost::add_edge(p1_vd, p2_vd, curve);
+        }
+      }
+    }
+
+    BOOST_FOREACH(vertex_descriptor vd, vertices(hg))
+    {
+      int id = static_cast<int>(get(vertex_id_pmap, vd));
+      int new_id = new_vertex_id[id];
+      if (new_id == -1)
+      {
+        continue;
+      }
+
+      // move to the centroid
+      Point pos = Point(0, 0, 0);
+      for (size_t i = 0; i < record[id].size(); ++i)
+      {
+        vertex_descriptor vd = id_to_descriptor[record[id][i]];
+        Point pv = get(hg_point_pmap, vd);
+        pos = Point(pos.x() + pv.x(), pos.y() + pv.y(), pos.z() + pv.z());
+      }
+      double num = static_cast<double>(record[id].size());
+      curve[id_to_vd[new_id]].point = Point(pos.x() / num, pos.y() / num, pos.z() / num);
+    }
+  }
+
+// Private methods
+private:
+  void init()
+  {
+    MCFSKEL_DEBUG( std::cerr <<"init" << std::endl; )
+
+    int nb_edges = static_cast<int>(num_edges(hg));
+    int num_faces = static_cast<int>(hg.size_of_facets());
+    int nb_vertices = static_cast<int>(num_vertices(hg));
+    edge_to_face.resize(nb_edges);
+    edge_to_vertex.resize(nb_edges);
+    vertex_to_edge.resize(nb_vertices);
+    face_to_edge.resize(num_faces);
+
+    is_vertex_deleted.resize(nb_vertices, false);
+    is_edge_deleted.resize(nb_edges, false);
+    is_face_deleted.resize(num_faces, false);
+
+    record.resize(nb_vertices);
+    for (size_t i = 0; i < record.size(); ++i)
+    {
+      record[i].push_back(static_cast<int>(i));
+    }
+
+    id_to_descriptor.resize(nb_vertices);
+    edge_squared_lengths.resize(nb_edges);
+
+    // assign vertex id
+    surface_vertex_id.resize(nb_vertices);
+    int idx = 0;
+    BOOST_FOREACH(vertex_descriptor vd, vertices(hg))
+    {
+      surface_vertex_id[idx] = static_cast<int>(get(vertex_id_pmap, vd));
+      put(vertex_id_pmap, vd, idx++);
+    }
+
+    // assign edge id
+    // the two halfedges representing the same edge get the same id
+    idx = 0;
+    BOOST_FOREACH(edge_descriptor ed, edges(hg))
+    {
+      halfedge_descriptor hd = halfedge(ed, hg);
+      put(hedge_id_pmap, hd, idx);
+      halfedge_descriptor hd_opposite = opposite(hd,hg);
+      put(hedge_id_pmap, hd_opposite, idx);
+
+      // also cache the length of the edge
+      vertex_descriptor v1 = target(hd,hg);
+      vertex_descriptor v2 = source(hd,hg);
+      Point source = get(hg_point_pmap, v1);
+      Point target = get(hg_point_pmap, v2);
+      edge_squared_lengths[idx] = squared_distance(source, target);
+
+      ++idx;
+    }
+
+    // assign face id and compute edge-face connectivity
+    int face_id = 0;
+    BOOST_FOREACH(face_descriptor fd, faces(hg))
+    {
+      BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd,hg), hg))
+      {
+        int id = static_cast<int>(get(hedge_id_pmap, hd));
+        face_to_edge[face_id].push_back(id);
+        edge_to_face[id].push_back(face_id);
+      }
+      ++face_id;
+    }
+
+    // compute vertex-edge connectivity
+    BOOST_FOREACH(vertex_descriptor vd, vertices(hg))
+    {
+      int vid = static_cast<int>(get(vertex_id_pmap, vd));
+      BOOST_FOREACH(edge_descriptor ed, in_edges(vd, hg))
+      {
+        halfedge_descriptor hd = halfedge(ed, hg);
+        int eid = static_cast<int>(get(hedge_id_pmap, hd));
+        vertex_to_edge[vid].push_back(eid);
+        edge_to_vertex[eid].push_back(vid);
+      }
+
+      // save the vertex descriptor
+      id_to_descriptor[vid] = vd;
+    }
+  }
+
+  void init_queue(Edge_queue& queue)
+  {
+    // put all the edges into a priority queue
+    // shorter edge has higher priority
+    BOOST_FOREACH(edge_descriptor ed, edges(hg))
+    {
+      int id = static_cast<int>(get(hedge_id_pmap, halfedge(ed, hg)));
+      queue.insert(id);
+    }
+  }
+
+  // iteratively collapse short edges until no edges have incident faces
+  void collapse()
+  {
+    EdgeCompareFunctor edge_comparator(edge_squared_lengths);
+    Edge_queue queue(edge_comparator);
+
+    init_queue(queue);
+
+    // start collapsing edges until all the edges have no incident faces
+    while (!queue.empty())
+    {
+      int eid = *(queue.begin());
+      queue.erase(queue.begin());
+
+      // skip already deleted edges and edges with no face
+      if (is_edge_deleted[eid]) continue;
+      if (edge_to_face[eid].size() == 0) continue;
+
+      // mark the incident faces as deleted
+      remove_incident_faces(eid);
+
+      // p1 to be deleted
+      int p1 = edge_to_vertex[eid][0];
+      int p2 = edge_to_vertex[eid][1];
+      is_vertex_deleted[p1] = true;
+
+      // merge vertices collapsed on p1 to p2
+      update_record(p1, p2);
+
+      // delete the edge from p1 and p2's incident edges
+      delete_edge(p1, p2, eid);
+
+      // add the incident edges of p1 to p2
+      add_edge(queue, p1, p2);
+
+      // remove duplicate edges
+      std::vector<int> vertex_to_edge_p2(vertex_to_edge[p2]);
+      for (size_t i = 0; i < vertex_to_edge_p2.size(); ++i)
+      {
+        // ei to be removed
+        int ei = vertex_to_edge_p2[i];
+        for (size_t j = i + 1; j < vertex_to_edge_p2.size(); ++j)
+        {
+          int ej = vertex_to_edge_p2[j];
+          if (is_same_edge(ei, ej) || is_edge_deleted[ei])
+          {
+            // look for ei from p2's incident edges
+            bool found;
+            int ind;
+            boost::tie(found, ind) = find_edge(vertex_to_edge[p2], ei);
+            if (!found)
+            {
+              continue;
+            }
+
+            // migrate faces from ei to ej
+            move_face(ei, ej);
+
+            // finally remove ei from p2
+            remove_edge(p2, ei, ind);
+            break;
+          }
+        }
+      }
+    }
+
+    // for debugging purpose
+    MCFSKEL_INFO(print_stat();)
+    MCFSKEL_INFO(check_edge();)
+  }
+
+  void add_edge(Edge_queue& queue, int p1, int p2)
+  {
+    for (size_t i = 0; i < vertex_to_edge[p1].size(); ++i)
+    {
+      int edge = vertex_to_edge[p1][i];
+      if (is_edge_deleted[edge])
+      {
+        continue;
+      }
+      vertex_to_edge[p2].push_back(edge);
+
+      // after change the incident vertex of an edge,
+      // we need to update the length of the edge
+      update_edge_length(queue, edge, p1, p2);
+
+      // change the incident vertex to p2
+      for (size_t j = 0; j < edge_to_vertex[edge].size(); ++j)
+      {
+        if (edge_to_vertex[edge][j] == p1)
+        {
+          edge_to_vertex[edge][j] = p2;
+        }
+      }
+    }
+  }
+
+  void remove_incident_faces(int eid)
+  {
+    BOOST_FOREACH(int fid, edge_to_face[eid])
+    {
+      is_face_deleted[fid] = true;
+      // remove the face from the container of the other incident edges
+      for (size_t j = 0; j < face_to_edge[fid].size(); ++j)
+      {
+        int e = face_to_edge[fid][j];
+        if (e==eid) continue;
+        for (size_t k = 0; k < edge_to_face[e].size(); ++k)
+        {
+          if (edge_to_face[e][k] == fid)
+          {
+            edge_to_face[e].erase(edge_to_face[e].begin() + k);
+            break;
+          }
+        }
+      }
+    }
+    edge_to_face[eid].clear();
+  }
+
+  void delete_edge(int p1, int p2, int eid)
+  {
+    for (size_t i = 0; i < vertex_to_edge[p1].size(); ++i)
+    {
+      if (vertex_to_edge[p1][i] == eid)
+      {
+        vertex_to_edge[p1].erase(vertex_to_edge[p1].begin() + i);
+        break;
+      }
+    }
+    for (size_t i = 0; i < vertex_to_edge[p2].size(); ++i)
+    {
+      if (vertex_to_edge[p2][i] == eid)
+      {
+        vertex_to_edge[p2].erase(vertex_to_edge[p2].begin() + i);
+        break;
+      }
+    }
+    is_edge_deleted[eid] = true;
+  }
+
+  bool is_same_edge(int ei, int ej)
+  {
+    if (edge_to_vertex[ei][0] == edge_to_vertex[ej][0]
+     && edge_to_vertex[ei][1] == edge_to_vertex[ej][1])
+    {
+      return true;
+    }
+    if (edge_to_vertex[ei][1] == edge_to_vertex[ej][0]
+     && edge_to_vertex[ei][0] == edge_to_vertex[ej][1])
+    {
+      return true;
+    }
+    return false;
+  }
+
+  std::pair<bool, int> find_edge(std::vector<int>& edges, int eid)
+  {
+    for (size_t i = 0; i < edges.size(); ++i)
+    {
+      if (eid == edges[i])
+      {
+        return std::make_pair(true, static_cast<int>(i));
+      }
+    }
+    return std::make_pair(false, -1);
+  }
+
+  void move_face(int ei, int ej)
+  {
+    for (size_t i = 0; i < edge_to_face[ei].size(); ++i)
+    {
+      int fid = edge_to_face[ei][i];
+      if (!is_face_deleted[fid])
+      {
+        if (std::find(edge_to_face[ej].begin(),
+                      edge_to_face[ej].end(),
+                      fid)
+            == edge_to_face[ej].end())
+        {
+          edge_to_face[ej].push_back(fid);
+          for (size_t j = 0; j < face_to_edge[fid].size(); ++j)
+          {
+            if (face_to_edge[fid][j] == ei)
+            {
+              face_to_edge[fid][j] = ej;
+              break;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  void remove_edge(int v, int e, int ind)
+  {
+    vertex_to_edge[v].erase(vertex_to_edge[v].begin() + ind);
+    // and also remove ei from the other end point
+    for (size_t i = 0; i < edge_to_vertex[e].size(); ++i)
+    {
+      int vid = edge_to_vertex[e][i];
+      if (vid != v)
+      {
+        for (size_t j = 0; j < vertex_to_edge[vid].size(); ++j)
+        {
+          if (vertex_to_edge[vid][j] == e)
+          {
+            vertex_to_edge[vid].erase(vertex_to_edge[vid].begin() + j);
+            break;
+          }
+        }
+      }
+    }
+    is_edge_deleted[e] = true;
+  }
+
+  void update_record(int p1, int p2)
+  {
+    for (size_t i = 0; i < record[p1].size(); ++i)
+    {
+      record[p2].push_back(record[p1][i]);
+    }
+    record[p1].clear();
+  }
+
+  void update_edge_length(Edge_queue& queue, int eid, int p1, int p2)
+  {
+    int vid1 = edge_to_vertex[eid][0];
+    int vid2 = edge_to_vertex[eid][1];
+    if (vid1 == p1)
+    {
+      vid1 = p2;
+    }
+    else
+    {
+      vid2 = p2;
+    }
+    if (queue.find(eid) != queue.end())
+    {
+      vertex_descriptor v1 = id_to_descriptor[vid1];
+      vertex_descriptor v2 = id_to_descriptor[vid2];
+
+      Point source = get(hg_point_pmap, v1);
+      Point target = get(hg_point_pmap, v2);
+      double new_len = squared_distance(source, target);
+
+      edge_squared_lengths[eid] = new_len;
+      queue.insert(eid);
+    }
+  }
+
+  void check_edge()
+  {
+    BOOST_FOREACH(halfedge_descriptor hd, halfedges(hg))
+    {
+      int id = get(hedge_id_pmap, hd);
+      if (!is_edge_deleted[id])
+      {
+        if (edge_to_face[id].size() > 0)
+        {
+          std::cerr << "edge should not have faces " << edge_to_face[id].size() << "\n";
+        }
+      }
+    }
+  }
+
+  void print_stat()
+  {
+    int cnt = 0;
+    for (size_t i = 0; i < is_vertex_deleted.size(); ++i)
+    {
+      if (!is_vertex_deleted[i])
+      {
+        ++cnt;
+      }
+    }
+    std::cerr << "num of vertices " << cnt << "\n";
+
+    cnt = 0;
+    for (size_t i = 0; i < is_edge_deleted.size(); ++i)
+    {
+      if (!is_edge_deleted[i])
+      {
+        ++cnt;
+      }
+    }
+    std::cerr << "num of edges " << cnt << "\n";
+
+    cnt = 0;
+    for (size_t i = 0; i < is_face_deleted.size(); ++i)
+    {
+      if (!is_face_deleted[i])
+      {
+        ++cnt;
+      }
+    }
+    std::cerr << "num of faces " << cnt << "\n";
+  }
+};
+
+} // namespace internal
+} // namespace CGAL
+
+/// @endcond
+
+#endif // CGAL_MCFSKEL_CURVE_SKELETON_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Debug.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Debug.h
new file mode 100644
index 0000000..bf75488
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Debug.h
@@ -0,0 +1,54 @@
+// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Xiang Gao <gaox at ethz.ch>
+//
+
+#ifndef CGAL_MCFSKEL_DEBUG_H
+#define CGAL_MCFSKEL_DEBUG_H
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+
+/**
+ * @file Debug.h
+ * @brief This file contains some macro used to hide/show the log for debugging
+ * purpose.
+ *
+ */
+
+// enable debugging output statement
+// this is for locating bugs
+//#define CGAL_MCFSKEL_DEBUG
+
+// enable info output statement
+// this is for tuning parameters
+//#define CGAL_MCFSKEL_INFO
+
+#ifdef CGAL_MCFSKEL_DEBUG
+#define MCFSKEL_DEBUG(x) x
+#else
+#define MCFSKEL_DEBUG(x)
+#endif
+
+#ifdef CGAL_MCFSKEL_INFO
+#define MCFSKEL_INFO(x) x
+#else
+#define MCFSKEL_INFO(x)
+#endif
+
+/// @endcond
+
+#endif // CGAL_MCFSKEL_DEBUG_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h
new file mode 100644
index 0000000..1ce5424
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h
@@ -0,0 +1,164 @@
+// Copyright (c) 2013  GeometryFactory (France). All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Xiang Gao <gaox at ethz.ch>
+//
+
+#ifndef CGAL_MCFSKEL_DETECT_DEGENERACY_H
+#define CGAL_MCFSKEL_DETECT_DEGENERACY_H
+
+/// @cond CGAL_DOCUMENT_INTERNAL
+
+/**
+ * @file Detect_degeneracy.h
+ * @brief This file contains functions to detect degeneracy at a given vertex.
+ *
+ */
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/foreach.hpp>
+#include <CGAL/boost/graph/iterator.h>
+#include <cmath>
+#include <queue>
+
+namespace CGAL {
+namespace internal {
+
+/**
+* Test if a given vertex is degenerate.
+*
+* The approach is to count the Euler characteristics within a small geodesic
+* distance at the given vertex. If it is not equal to one, which is the case
+* for disk topology, the vertex is considered to be degenerate.
+
+* @param hg the mesh containing the given vertex
+* @param root the given vertex
+* @param min_edge_length the diameter of the geodesic disk
+*/
+template<class TriangleMesh, class TriangleMeshPointPMap, class Traits>
+bool is_vertex_degenerate(TriangleMesh& hg,
+                          TriangleMeshPointPMap& hg_point_pmap,
+                          typename boost::graph_traits<TriangleMesh>::vertex_descriptor root,
+                          double min_edge_length,
+                          const Traits& traits)
+{
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor          vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor        halfedge_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor            edge_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::face_descriptor            face_descriptor;
+
+  std::set<vertex_descriptor> vertices_in_disk;
+  std::set<halfedge_descriptor> edges_in_disk;
+  std::set<face_descriptor> faces_in_disk;
+
+  vertices_in_disk.clear();
+  search_vertices_in_disk(hg, hg_point_pmap, root, vertices_in_disk, min_edge_length, traits);
+
+  BOOST_FOREACH(vertex_descriptor vd, vertices_in_disk)
+  {
+    BOOST_FOREACH(edge_descriptor ed, out_edges(vd, hg))
+    {
+      halfedge_descriptor hd = halfedge(ed, hg);
+      halfedge_descriptor hd_op = opposite(hd, hg);
+      vertex_descriptor tgt = target(hd, hg);
+      if (vertices_in_disk.find(tgt) != vertices_in_disk.end())
+      {
+        edges_in_disk.insert(hd);
+        edges_in_disk.insert(hd_op);
+      }
+
+      bool in = true;
+      BOOST_FOREACH(halfedge_descriptor h, halfedges_around_face(hd, hg))
+      {
+        vertex_descriptor v = target(h,hg);
+        if (vertices_in_disk.find(v) == vertices_in_disk.end())
+        {
+          in = false;
+          break;
+        }
+      }
+
+      if (in)
+      {
+        faces_in_disk.insert(face(hd,hg));
+      }
+    }
+  }
+
+  std::size_t V = vertices_in_disk.size();
+  std::size_t E = edges_in_disk.size() / 2;
+  std::size_t F = faces_in_disk.size();
+  std::size_t euler = V + F - E;
+  if (euler != 1)
+  {
+    return true;
+  }
+  return false;
+}
+
+/**
+* Find all the vertices within a geodesic disk.
+*
+* @param hg the mesh containing the vertices
+* @param root the center of the geodesic disk
+* @param vertices_in_disk containing the found vertices within the disk
+* @param min_edge_length the diameter of the geodesic disk
+*/
+template<class TriangleMesh, class TriangleMeshPointPMap, class Traits>
+void search_vertices_in_disk(TriangleMesh& hg,
+                             TriangleMeshPointPMap& hg_point_pmap,
+                             typename boost::graph_traits<TriangleMesh>::vertex_descriptor root,
+                             std::set<typename boost::graph_traits<TriangleMesh>::vertex_descriptor>& vertices_in_disk,
+                             double min_edge_length,
+                             const Traits& traits)
+{
+  typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor          vertex_descriptor;
+  typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor            edge_descriptor;
+
+  std::queue<vertex_descriptor> Q;
+  Q.push(root);
+  vertices_in_disk.insert(root);
+
+  double dist_TH = min_edge_length;
+  while (!Q.empty())
+  {
+    vertex_descriptor v = Q.front();
+    Q.pop();
+
+    BOOST_FOREACH(edge_descriptor ed, out_edges(v, hg))
+    {
+      vertex_descriptor new_v = target(ed, hg);
+      if (!vertices_in_disk.count(new_v))
+      {
+        double distance = std::sqrt(traits.compute_squared_distance_3_object()(
+                                      get(hg_point_pmap, new_v),
+                                      get(hg_point_pmap, root)) );
+        if (distance < dist_TH)
+        {
+          Q.push(new_v);
+          vertices_in_disk.insert(new_v);
+        }
+      }
+    }
+  }
+}
+
+} //namespace internal
+} //namespace CGAL
+
+/// @endcond
+
+#endif //CGAL_MCFSKEL_DETECT_DEGENERACY_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/get_normal.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/get_normal.h
new file mode 100644
index 0000000..559663e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Surface_mesh_skeletonization/get_normal.h
@@ -0,0 +1,82 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_MCS_GET_NORMAL_H
+#define CGAL_MCS_GET_NORMAL_H
+
+namespace CGAL {
+
+namespace internal {
+
+template <class Traits>
+void normalize(typename Traits::Vector_3& v, const Traits& traits)
+{
+  double norm = std::sqrt(traits.compute_squared_length_3_object()(v));
+  v = traits.construct_divided_vector_3_object()(v, norm);
+}
+
+
+template <class Vertex, class Traits>
+typename Traits::Vector_3 get_vertex_normal(
+  Vertex& v,
+  const Traits& traits)
+{
+  typedef typename Traits::Point_3 Point;
+  typedef typename Traits::Vector_3 Vector;
+  typedef typename Vertex::Halfedge_around_vertex_const_circulator HV_circulator;
+  Vector normal = traits.construct_vector_3_object()(CGAL::NULL_VECTOR);
+  HV_circulator he = v.vertex_begin();
+  HV_circulator end = he;
+  CGAL_For_all(he,end)
+  {
+    if(!he->is_border())
+    {
+      const Point& prev = he->prev()->vertex()->point();
+      const Point& curr = he->vertex()->point();
+      const Point& next = he->next()->vertex()->point();
+
+      Vector p1 = traits.construct_vector_3_object()(curr, next);
+      normalize(p1, traits);
+      Vector p2 = traits.construct_vector_3_object()(curr, prev);
+      normalize(p2, traits);
+
+      double cosine = traits.compute_scalar_product_3_object()(p1, p2);
+      if      (cosine < -1.0) cosine = -1.0;
+      else if (cosine >  1.0) cosine =  1.0;
+      double angle = acos(cosine);
+
+      Vector n = traits.construct_cross_product_vector_3_object()(
+        traits.construct_vector_3_object()(curr, next),
+        traits.construct_vector_3_object()(curr, prev) );
+      normalize(n, traits);
+      n = traits.construct_scaled_vector_3_object()(n, angle);
+
+      normal = traits.construct_sum_of_vectors_3_object()(normal, n);
+    }
+  }
+  normalize(normal, traits);
+  return normal;
+}
+
+} //namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_MCS_GET_NORMAL_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Transform_coordinates_traits_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Transform_coordinates_traits_3.h
new file mode 100644
index 0000000..42d8153
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Transform_coordinates_traits_3.h
@@ -0,0 +1,267 @@
+// Copyright (c) 2013  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Olivier Devillers
+//                 Pedro Machado Manhaes de Castro
+
+#ifndef CGAL_INTERNAL_SCALE_COORDINATES_ADAPTOR_TRAITS_3_H
+#define CGAL_INTERNAL_SCALE_COORDINATES_ADAPTOR_TRAITS_3_H
+
+namespace CGAL { 
+
+namespace internal {
+	
+template <int x, int y, int z, int ord>
+struct Transform_constant_struct;
+
+template <> struct Transform_constant_struct<1,1,0,0> { enum {value = 0}; };
+template <> struct Transform_constant_struct<-1,1,0,0> { enum {value = 1}; };
+template <> struct Transform_constant_struct<1,-1,0,0> { enum {value = 2}; };
+template <> struct Transform_constant_struct<-1,-1,0,0> { enum {value = 3}; };
+template <> struct Transform_constant_struct<1,1,0,1> { enum {value = 4}; };
+template <> struct Transform_constant_struct<-1,1,0,1> { enum {value = 5}; };
+template <> struct Transform_constant_struct<1,-1,0,1> { enum {value = 6}; };
+template <> struct Transform_constant_struct<-1,-1,0,1> { enum {value = 7}; };
+
+template <> struct Transform_constant_struct<1,0,1,0> { enum {value = 8}; };
+template <> struct Transform_constant_struct<-1,0,1,0> { enum {value = 9}; };
+template <> struct Transform_constant_struct<1,0,-1,0> { enum {value = 10}; };
+template <> struct Transform_constant_struct<-1,0,-1,0> { enum {value = 11}; };
+template <> struct Transform_constant_struct<1,0,1,1> { enum {value = 12}; };
+template <> struct Transform_constant_struct<-1,0,1,1> { enum {value = 13}; };
+template <> struct Transform_constant_struct<1,0,-1,1> { enum {value = 14}; };
+template <> struct Transform_constant_struct<-1,0,-1,1> { enum {value = 15}; };
+
+template <> struct Transform_constant_struct<0,1,1,0> { enum {value = 16}; };
+template <> struct Transform_constant_struct<0,-1,1,0> { enum {value = 17}; };
+template <> struct Transform_constant_struct<0,1,-1,0> { enum {value = 18}; };
+template <> struct Transform_constant_struct<0,-1,-1,0> { enum {value = 19}; };
+template <> struct Transform_constant_struct<0,1,1,1> { enum {value = 20}; };
+template <> struct Transform_constant_struct<0,-1,1,1> { enum {value = 21}; };
+template <> struct Transform_constant_struct<0,1,-1,1> { enum {value = 22}; };
+template <> struct Transform_constant_struct<0,-1,-1,1> { enum {value = 23}; };
+
+template <class R, int opt>
+struct Coordinate_value_adaptor;
+
+template <class R>
+struct Coordinate_value_adaptor<R,0> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,1> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,2> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,3> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,4> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,5> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,6> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,7> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,8> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,9> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,10> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,11> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.x();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,12> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,13> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,14> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,15> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.x();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,16> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,17> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,18> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,19> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.y();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.z();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,20> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,21> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,22> {
+	static typename R::FT x(const typename R::Point_3& p) {return p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.y();}
+};
+
+template <class R>
+struct Coordinate_value_adaptor<R,23> {
+	static typename R::FT x(const typename R::Point_3& p) {return -p.z();}
+	static typename R::FT y(const typename R::Point_3& p) {return -p.y();}
+};
+
+template <class R, int opt>
+class Compute_x_2
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT x(const Point &p) const { return Coordinate_value_adaptor<R,opt>::x(p); }
+  typename R::FT operator()(const Point& p) const { return x(p); }
+};
+
+template <class R, int opt>
+class Compute_y_2 
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT y(const Point &p) const { return Coordinate_value_adaptor<R,opt>::y(p); }
+  typename R::FT operator()(const Point& p) const { return y(p); }
+};
+
+template <class R, int opt>
+class Less_x_2
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT x(const Point &p) const { return Coordinate_value_adaptor<R,opt>::x(p); }
+  bool operator()(const Point& p, const Point& q) const { return x(p) < x(q); }
+};
+
+template <class R, int opt>
+class Less_y_2
+{
+public:
+  typedef typename R::Point_3     Point; 
+  typename R::FT y(const Point &p) const { return Coordinate_value_adaptor<R,opt>::y(p); }
+  bool operator()(const Point& p, const Point& q) const { return y(p) < y(q); }
+};
+
+template <class R, int x, int y, int z, int ord>
+struct Transform_coordinates_traits_3 {
+	private:
+		enum {opt = Transform_constant_struct<x,y,z,ord>::value};
+	
+	public:
+		typedef Transform_coordinates_traits_3<R,x,y,z,ord>  	  		Traits;
+		typedef R                                               		Rp;
+		typedef typename Rp::Point_3                            		Point_2;
+		typedef Less_x_2<R,opt>        									Less_x;
+		typedef Less_y_2<R,opt>       									Less_y;
+		typedef Compute_x_2<R,opt>     									Compute_x;
+		typedef Compute_y_2<R,opt>     									Compute_y;
+		
+		Transform_coordinates_traits_3(){}
+		Transform_coordinates_traits_3(const Transform_coordinates_traits_3&){}
+				
+		Less_x less_x_2_object() const { return Less_x(); }
+		Less_y less_y_2_object() const { return Less_y(); }
+		Compute_x compute_x_2_object() const { return Compute_x(); }
+		Compute_y compute_y_2_object() const { return Compute_y(); }
+};
+  
+
+} } //namespace CGAL::internal
+
+#endif // CGAL_INTERNAL_SCALE_COORDINATES_ADAPTOR_TRAITS_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/Dummy_TDS.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/Dummy_TDS.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/Dummy_TDS.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/Dummy_TDS.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/Triangulation_ds_iterators.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/Triangulation_ds_iterators.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/Triangulation_ds_iterators.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/Triangulation_ds_iterators.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/utilities.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/utilities.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation/utilities.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation/utilities.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation_ds_circulators_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation_ds_circulators_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation_ds_circulators_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation_ds_circulators_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation_ds_iterators_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation_ds_iterators_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/Triangulation_ds_iterators_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/Triangulation_ds_iterators_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h
new file mode 100644
index 0000000..e411c56
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h
@@ -0,0 +1,229 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Jocelyn Meyron and Quentin Mérigot
+//
+
+#ifndef CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_3_HPP
+#define CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_3_HPP
+
+#include <list>
+#include <CGAL/array.h>
+#include <CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h>
+#ifdef CGAL_VORONOI_COVARIANCE_USE_CONSTRUCTIONS
+#include <CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h>
+#else
+#include <CGAL/Convex_hull_3/dual/halfspace_intersection_3.h>
+#endif
+
+/// \cond SKIP_IN_MANUAL
+
+namespace CGAL {
+    namespace Voronoi_covariance_3 {
+        namespace internal {
+            template <class FT>
+                inline void
+                covariance_matrix_tetrahedron (FT ax, FT ay, FT az,
+                                               FT bx, FT by, FT bz,
+                                               FT cx, FT cy, FT cz,
+                                               cpp11::array<FT,6> &R)
+                {
+                    const FT det = (ax*cz*by - ax*bz*cy - ay*bx*cz +
+                                    ay*cx*bz + az*bx*cy - az*cx*by) / 60.0;
+
+                    R[0] += (ax*ax + ax*bx + ax*cx +
+                             bx*bx + bx*cx + cx*cx) * det;
+                    R[1] += (ax*ay + ax*by/2.0 + ax*cy/2.0 +
+                             bx*ay/2.0 + bx*by + bx*cy/2.0 +
+                             cx*ay/2.0 + cx*by/2.0 + cx*cy) * det;
+                    R[2] += (ax*az + ax*bz/2.0 + ax*cz/2.0 +
+                             bx*az/2.0 + bx*bz + bx*cz/2.0 +
+                             cx*az/2.0 + cx*bz/2.0 + cx*cz) * det;
+
+                    R[3] += (ay*ay + ay*by + ay*cy +
+                             by*by + by*cy + cy*cy) * det;
+                    R[4] += (az*ay + az*by/2.0 + az*cy/2.0 +
+                             bz*ay/2.0 + bz*by + bz*cy/2.0 +
+                             cz*ay/2.0 + cz*by/2.0 + cz*cy) * det;
+
+                    R[5] += (az*az + az*bz + az*cz +
+                             bz*bz + bz*cz + cz*cz) * det;
+                }
+
+            template <class FT>
+                class Covariance_accumulator_3
+                {
+                    public:
+                        typedef cpp11::array<FT, 6> Result_type;
+
+                    private:
+                        Result_type _result;
+
+                    public:
+                        Covariance_accumulator_3()
+                        {
+                            std::fill (_result.begin(), _result.end(), FT(0));
+                        }
+
+                        template <class Point>
+                            inline void operator () (const Point &a,
+                                                     const Point &b,
+                                                     const Point &c)
+                            {
+                                internal::covariance_matrix_tetrahedron (a[0], a[1], a[2],
+                                                                         b[0], b[1], b[2],
+                                                                         c[0], c[1], c[2],
+                                                                         _result);
+                            }
+
+                        const Result_type &result() const
+                        {
+                            return _result;
+                        }
+                };
+
+            template <class FT>
+                class Volume_accumulator_3
+                {
+                    public:
+                        typedef FT Result_type;
+
+                    private:
+                        Result_type _result;
+
+                    public:
+                        Volume_accumulator_3() : _result(0.0)
+                    {}
+
+                        template <class Point>
+                            inline void operator () (const Point &a,
+                                                     const Point &b,
+                                                     const Point &c)
+                            {
+                                const double  vol = CGAL::volume(a, b, c, Point(CGAL::ORIGIN));
+                                //std::cerr << "vol = " << vol << "\n";
+                                _result += vol;
+                            }
+
+                        const Result_type &result() const
+                        {
+                            return _result;
+                        }
+                };
+
+
+            template <class DT, class Sphere, class F>
+                F& tessellate_and_intersect(const DT &dt,
+                                            typename DT::Vertex_handle v,
+                                            const Sphere &sphere,
+                                            F &f)
+                {
+                    typedef typename DT::Vertex_handle Vertex_handle;
+                    typedef typename DT::Geom_traits::Kernel K;
+                    typedef typename K::Plane_3 Plane;
+                    typedef typename K::Point_3 Point;
+                    typedef typename K::Vector_3 Vector;
+                    typedef typename CGAL::Convex_hull_traits_3<K> Traits;
+                    typedef typename Traits::Polyhedron_3 Polyhedron;
+
+                    std::list<Vertex_handle> vertices;
+                    dt.incident_vertices(v,std::back_inserter(vertices));
+
+                    // construct intersection of half-planes using the convex hull function
+                    std::list<Plane> planes;
+                    for(typename std::list<Vertex_handle>::iterator it = vertices.begin();
+                        it != vertices.end(); ++it)
+                    {
+                        Vector p = ((*it)->point() - v->point())/2;
+                        planes.push_back (Plane(CGAL::ORIGIN+p, p));
+                    }
+
+                    // add half-planes defining the sphere discretization
+                    sphere(std::back_inserter(planes));
+
+                    Polyhedron P;
+                    #ifdef CGAL_VORONOI_COVARIANCE_USE_CONSTRUCTIONS
+                    halfspace_intersection_with_constructions_3
+                    #else
+                    halfspace_intersection_3
+                    #endif
+                      (planes.begin(),
+                       planes.end(),
+                       P,
+                       boost::make_optional(Point(CGAL::ORIGIN)));
+
+                    // apply f to the triangles on the boundary of P
+                    for (typename Polyhedron::Facet_iterator it = P.facets_begin();
+                         it != P.facets_end(); ++it)
+                    {
+                        typename Polyhedron::Halfedge_around_facet_circulator
+                            h0 = it->facet_begin(), hf = h0--, hs = cpp11::next(hf);
+
+                        while(hs != h0)
+                        {
+                            f (h0->vertex()->point(), hf->vertex()->point(),
+                               hs->vertex()->point());
+                            ++hs; ++hf;
+                        }
+                    }
+                    return f;
+                }
+        } // namespace internal
+
+        template <class DT, class Sphere, class FT>
+            void
+            voronoi_covariance_3 (const DT &dt,
+                                  typename DT::Vertex_handle v,
+                                  const Sphere &sphere,
+                                  FT covariance[6])
+            {
+                typename internal::Covariance_accumulator_3<FT> ca;
+                internal::tessellate_and_intersect(dt, v, sphere, ca);
+                std::copy (ca.result().begin(), ca.result().end(), covariance);
+            }
+
+        template <class DT, class Sphere>
+            array<typename DT::Geom_traits::FT, 6>
+            voronoi_covariance_3 (const DT &dt,
+                                  typename DT::Vertex_handle v,
+                                  const Sphere &sphere)
+            {
+                typedef typename DT::Geom_traits::FT FT;
+                typename internal::Covariance_accumulator_3<FT> ca;
+
+                return internal::tessellate_and_intersect(dt, v, sphere, ca).result();
+            }
+
+        template <class DT, class Sphere>
+            typename DT::Geom_traits::FT
+            voronoi_volume_3 (const DT &dt,
+                              typename DT::Vertex_handle v,
+                              const Sphere &sphere)
+            {
+                typedef typename DT::Geom_traits::FT FT;
+                typename internal::Volume_accumulator_3<FT> va;
+
+                return internal::tessellate_and_intersect(dt, v, sphere, va).result();
+            }
+
+    } // namespace Voronoi_covariance_3
+} // namespace CGAL
+
+/// \endcond
+
+#endif // CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_3_HPP
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h
new file mode 100644
index 0000000..89b722e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h
@@ -0,0 +1,111 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Jocelyn Meyron and Quentin Mérigot
+//
+
+#ifndef CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_SPHERE_3_HPP
+#define CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_SPHERE_3_HPP
+
+#include <CGAL/point_generators_3.h>
+#include <cmath>
+
+/// \cond SKIP_IN_MANUAL
+
+namespace CGAL {
+    namespace Voronoi_covariance_3 {
+        template <class K>
+            class Sphere_discretization
+            {
+                typedef typename K::FT FT;
+                FT _R;
+                size_t _N;
+
+                public:
+                Sphere_discretization (FT R, size_t N = 20) :
+                    _R(R), _N(N)
+                {
+                    if (_N != 8 && _N != 20)
+                        _N = 20;
+                }
+
+                template <class OutputIterator>
+                    void
+                    operator ()(OutputIterator out) const
+                    {
+                        typedef typename K::Plane_3 Plane;
+
+                        if (_N == 8)
+                        {
+                            static const FT phi = (FT(1) + std::sqrt(5.0))/FT(2);
+                            static const FT s = FT(1) / std::sqrt(phi + FT(2));
+
+                            *out ++ = Plane(0, +s, +s*phi, -_R);
+                            *out ++ = Plane(0, -s, +s*phi, -_R);
+                            *out ++ = Plane(0, +s, -s*phi, -_R);
+                            *out ++ = Plane(0, -s, -s*phi, -_R);
+
+                            *out ++ = Plane(+s, +s*phi, 0, -_R);
+                            *out ++ = Plane(+s, -s*phi, 0, -_R);
+                            *out ++ = Plane(-s, +s*phi, 0, -_R);
+                            *out ++ = Plane(-s, -s*phi, 0, -_R);
+
+                            *out ++ = Plane(+s*phi, 0, +s, -_R);
+                            *out ++ = Plane(-s*phi, 0, +s, -_R);
+                            *out ++ = Plane(+s*phi, 0, -s, -_R);
+                            *out ++ = Plane(-s*phi, 0, -s, -_R);
+                        }
+                        else if (_N == 20)
+                        {
+                            const FT phi = (FT(1) + std::sqrt(5.0))/FT(2);
+                            const FT one_phi = FT(1)/phi;
+                            const FT s = FT(1) / std::sqrt(3.0);
+
+                            *out ++ = Plane(+s, +s, +s, -_R);
+                            *out ++ = Plane(-s, +s, +s, -_R);
+                            *out ++ = Plane(+s, -s, +s, -_R);
+                            *out ++ = Plane(-s, -s, +s, -_R);
+                            *out ++ = Plane(+s, +s, -s, -_R);
+                            *out ++ = Plane(-s, +s, -s, -_R);
+                            *out ++ = Plane(+s, -s, -s, -_R);
+                            *out ++ = Plane(-s, -s, -s, -_R);
+
+                            *out ++ = Plane(0, +s*one_phi, +s*phi, -_R);
+                            *out ++ = Plane(0, -s*one_phi, +s*phi, -_R);
+                            *out ++ = Plane(0, +s*one_phi, -s*phi, -_R);
+                            *out ++ = Plane(0, -s*one_phi, -s*phi, -_R);
+
+                            *out ++ = Plane(+s*one_phi, +s*phi, 0, -_R);
+                            *out ++ = Plane(-s*one_phi, +s*phi, 0, -_R);
+                            *out ++ = Plane(+s*one_phi, -s*phi, 0, -_R);
+                            *out ++ = Plane(-s*one_phi, -s*phi, 0, -_R);
+
+                            *out ++ = Plane(+s*phi, 0, +s*one_phi, -_R);
+                            *out ++ = Plane(-s*phi, 0, +s*one_phi, -_R);
+                            *out ++ = Plane(+s*phi, 0, -s*one_phi, -_R);
+                            *out ++ = Plane(-s*phi, 0, -s*one_phi, -_R);
+                        }
+                    }
+            };
+
+    } // namespace Voronoi_covariance_3
+} // namespace CGAL
+
+/// \endcond
+
+#endif // CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_SPHERE_3_HPP
+
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/auxiliary/graph.h b/3rdparty/CGAL-4.8/include/CGAL/internal/auxiliary/graph.h
new file mode 100644
index 0000000..862fffa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/auxiliary/graph.h
@@ -0,0 +1,1751 @@
+// Copyright (c) 2001  Yuri Boykov
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+/*
+###################################################################
+#                                                                 #
+#    MAXFLOW - software for computing mincut/maxflow in a graph   #
+#                        Version 2.21                             #
+#    http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/software.html     #
+#                                                                 #
+#    Yuri Boykov (yuri at csd.uwo.ca)                                #
+#    Vladimir Kolmogorov (v.kolmogorov at cs.ucl.ac.uk)              #
+#    2001                                                         #
+#                                                                 #
+###################################################################
+
+1. Introduction.
+
+This software library implements the maxflow algorithm
+described in
+
+	An Experimental Comparison of Min-Cut/Max-Flow Algorithms
+	for Energy Minimization in Vision.
+	Yuri Boykov and Vladimir Kolmogorov.
+	In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI),
+	September 2004
+
+This algorithm was developed by Yuri Boykov and Vladimir Kolmogorov
+at Siemens Corporate Research. To make it available for public use,
+it was later reimplemented by Vladimir Kolmogorov based on open publications.
+
+If you use this software for research purposes, you should cite
+the aforementioned paper in any resulting publication.
+
+Tested under windows, Visual C++ 6.0 compiler and unix (SunOS 5.8
+and RedHat Linux 7.0, GNU c++ compiler).
+
+##################################################################
+
+2. Licence.
+
+Copyright UCL Business PLC
+
+This program is available under dual licence:
+
+1) Under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+Note that any program that incorporates the code under this licence must, under the terms of the GNU GPL, be released under a licence compatible with the GPL. GNU GPL does not permit incorporating this program into proprietary programs. If you wish to do this, please see the alternative licence available below.
+GNU General Public License can be found at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+
+2) Proprietary Licence from UCL Business PLC.
+To enable programers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html
+
+##################################################################
+
+3. Graph representation.
+
+There are two versions of the algorithm using different
+graph representations (adjacency list and forward star).
+The former one uses more than twice as much memory as the
+latter one but is 10-20% faster.
+
+Memory allocation (assuming that all capacities are 'short' - 2 bytes):
+
+                 |   Nodes    |   Arcs
+------------------------------------------
+Adjacency list   | *24 bytes  | *14 bytes
+Forward star     | *28 bytes  |  6 bytes
+
+(* means that often it should be rounded up to be a multiple of 4
+- some compilers (e.g. Visual C++) seem to round up elements
+of arrays unless the are structures containing only char[].)
+
+Note that arcs are always added in pairs - in forward and reverse directions.
+Arcs between nodes and terminals (the source and the sink) are
+not stored as arcs, but rather as a part of nodes.
+
+The assumption for the forward star representation is that
+the maximum number of arcs per node (except the source
+and the sink) is much less than ARC_BLOCK_SIZE (1024 by default).
+
+Both versions have the same interface.
+
+##################################################################
+
+4. Example usage.
+
+This section shows how to use the library to compute
+a minimum cut on the following graph:
+
+		        SOURCE
+		       /       \
+		     1/         \2
+		     /      3    \
+		   node0 -----> node1
+		     |   <-----   |
+		     |      4     |
+		     \            /
+		     5\          /6
+		       \        /
+		          SINK
+
+///////////////////////////////////////////////////
+
+#include <stdio.h>
+#include "graph.h"
+
+void main()
+{
+	Graph::node_id nodes[2];
+	Graph *g = new Graph();
+
+	nodes[0] = g -> add_node();
+	nodes[1] = g -> add_node();
+	g -> set_tweights(nodes[0], 1, 5);
+	g -> set_tweights(nodes[1], 2, 6);
+	g -> add_edge(nodes[0], nodes[1], 3, 4);
+
+	Graph::flowtype flow = g -> maxflow();
+
+	printf("Flow = %d\n", flow);
+	printf("Minimum cut:\n");
+	if (g->what_segment(nodes[0]) == Graph::SOURCE)
+		printf("node0 is in the SOURCE set\n");
+	else
+		printf("node0 is in the SINK set\n");
+	if (g->what_segment(nodes[1]) == Graph::SOURCE)
+		printf("node1 is in the SOURCE set\n");
+	else
+		printf("node1 is in the SINK set\n");
+
+	delete g;
+}
+
+///////////////////////////////////////////////////
+*/
+
+/* block.h */
+/*
+	Template classes Block and DBlock
+	Implement adding and deleting items of the same type in blocks.
+
+	If there there are many items then using Block or DBlock
+	is more efficient than using 'new' and 'delete' both in terms
+	of memory and time since
+	(1) On some systems there is some minimum amount of memory
+	    that 'new' can allocate (e.g., 64), so if items are
+	    small that a lot of memory is wasted.
+	(2) 'new' and 'delete' are designed for items of varying size.
+	    If all items has the same size, then an algorithm for
+	    adding and deleting can be made more efficient.
+	(3) All Block and DBlock functions are inline, so there are
+	    no extra function calls.
+
+	Differences between Block and DBlock:
+	(1) DBlock allows both adding and deleting items,
+	    whereas Block allows only adding items.
+	(2) Block has an additional operation of scanning
+	    items added so far (in the order in which they were added).
+	(3) Block allows to allocate several consecutive
+	    items at a time, whereas DBlock can add only a single item.
+
+	Note that no constructors or destructors are called for items.
+
+	Example usage for items of type 'MyType':
+
+	///////////////////////////////////////////////////
+	#include "block.h"
+	#define BLOCK_SIZE 1024
+	typedef struct { int a, b; } MyType;
+	MyType *ptr, *array[10000];
+
+	...
+
+	Block<MyType> *block = new Block<MyType>(BLOCK_SIZE);
+
+	// adding items
+	for (int i=0; i<sizeof(array); i++)
+	{
+		ptr = block -> New();
+		ptr -> a = ptr -> b = rand();
+	}
+
+	// reading items
+	for (ptr=block->ScanFirst(); ptr; ptr=block->ScanNext())
+	{
+		printf("%d %d\n", ptr->a, ptr->b);
+	}
+
+	delete block;
+
+	...
+
+	DBlock<MyType> *dblock = new DBlock<MyType>(BLOCK_SIZE);
+
+	// adding items
+	for (int i=0; i<sizeof(array); i++)
+	{
+		array[i] = dblock -> New();
+	}
+
+	// deleting items
+	for (int i=0; i<sizeof(array); i+=2)
+	{
+		dblock -> Delete(array[i]);
+	}
+
+	// adding items
+	for (int i=0; i<sizeof(array); i++)
+	{
+		array[i] = dblock -> New();
+	}
+
+	delete dblock;
+
+	///////////////////////////////////////////////////
+
+	Note that DBlock deletes items by marking them as
+	empty (i.e., by adding them to the list of free items),
+	so that this memory could be used for subsequently
+	added items. Thus, at each moment the memory allocated
+	is determined by the maximum number of items allocated
+	simultaneously at earlier moments. All memory is
+	deallocated only when the destructor is called.
+*/
+
+#ifndef __BLOCK_H__
+#define __BLOCK_H__
+
+#include <stdlib.h>
+
+/***********************************************************************/
+/***********************************************************************/
+/***********************************************************************/
+
+template <class Type> class Block
+{
+public:
+  /* Constructor. Arguments are the block size and
+     (optionally) the pointer to the function which
+     will be called if allocation failed; the message
+     passed to this function is "Not enough memory!" */
+  Block(int size, void (*err_function)(const char *) = NULL) {
+    first = last = NULL;
+    block_size = size;
+    error_function = err_function;
+  }
+
+  /* Destructor. Deallocates all items added so far */
+  ~Block() {
+    while (first) {
+      block *next = first -> next;
+      delete[] ((char*)first);
+      first = next;
+    }
+  }
+
+  /* Allocates 'num' consecutive items; returns pointer
+     to the first item. 'num' cannot be greater than the
+     block size since items must fit in one block */
+  Type *New(int num = 1) {
+    Type *t;
+
+    if (!last || last->current + num > last->last) {
+      if (last && last->next) last = last -> next;
+      else {
+        block *next = (block *) new char [sizeof(block) + (block_size-1)*sizeof(Type)];
+        if (!next) {
+          if (error_function) (*error_function)("Not enough memory!");
+          exit(1);
+        }
+        if (last) last -> next = next;
+        else first = next;
+        last = next;
+        last -> current = & ( last -> data[0] );
+        last -> last = last -> current + block_size;
+        last -> next = NULL;
+      }
+    }
+
+    t = last -> current;
+    last -> current += num;
+    return t;
+  }
+
+  /* Returns the first item (or NULL, if no items were added) */
+  Type *ScanFirst() {
+    for (scan_current_block=first; scan_current_block;
+         scan_current_block = scan_current_block->next) {
+      scan_current_data = & ( scan_current_block -> data[0] );
+      if (scan_current_data < scan_current_block -> current) return scan_current_data
+            ++;
+    }
+    return NULL;
+  }
+
+  /* Returns the next item (or NULL, if all items have been read)
+     Can be called only if previous ScanFirst() or ScanNext()
+     call returned not NULL. */
+  Type *ScanNext() {
+    while (scan_current_data >= scan_current_block -> current) {
+      scan_current_block = scan_current_block -> next;
+      if (!scan_current_block) return NULL;
+      scan_current_data = & ( scan_current_block -> data[0] );
+    }
+    return scan_current_data ++;
+  }
+
+  /* Marks all elements as empty */
+  void Reset() {
+    block *b;
+    if (!first) return;
+    for (b=first; ; b=b->next) {
+      b -> current = & ( b -> data[0] );
+      if (b == last) break;
+    }
+    last = first;
+  }
+
+  /***********************************************************************/
+
+private:
+
+  typedef struct block_st {
+    Type					*current, *last;
+    struct block_st			*next;
+    Type					data[1];
+  } block;
+
+  int		block_size;
+  block	*first;
+  block	*last;
+
+  block	*scan_current_block;
+  Type	*scan_current_data;
+
+  void	(*error_function)(const char *);
+};
+
+/***********************************************************************/
+/***********************************************************************/
+/***********************************************************************/
+
+template <class Type> class DBlock
+{
+public:
+  /* Constructor. Arguments are the block size and
+     (optionally) the pointer to the function which
+     will be called if allocation failed; the message
+     passed to this function is "Not enough memory!" */
+  DBlock(int size, void (*err_function)(const char *) = NULL) {
+    first = NULL;
+    first_free = NULL;
+    block_size = size;
+    error_function = err_function;
+  }
+
+  /* Destructor. Deallocates all items added so far */
+  ~DBlock() {
+    while (first) {
+      block *next = first -> next;
+      delete[] ((char*)first);
+      first = next;
+    }
+  }
+
+  /* Allocates one item */
+  Type *New() {
+    block_item *item;
+
+    if (!first_free) {
+      block *next = first;
+      first = (block *) new char [sizeof(block) + (block_size-1)*sizeof(block_item)];
+      if (!first) {
+        if (error_function) (*error_function)("Not enough memory!");
+        exit(1);
+      }
+      first_free = & (first -> data[0] );
+      for (item=first_free; item<first_free+block_size-1; item++)
+        item -> next_free = item + 1;
+      item -> next_free = NULL;
+      first -> next = next;
+    }
+
+    item = first_free;
+    first_free = item -> next_free;
+    return (Type *) item;
+  }
+
+  /* Deletes an item allocated previously */
+  void Delete(Type *t) {
+    ((block_item *) t) -> next_free = first_free;
+    first_free = (block_item *) t;
+  }
+
+  /***********************************************************************/
+
+private:
+
+  typedef union block_item_st {
+    Type			t;
+    block_item_st	*next_free;
+  } block_item;
+
+  typedef struct block_st {
+    struct block_st			*next;
+    block_item				data[1];
+  } block;
+
+  int			block_size;
+  block		*first;
+  block_item	*first_free;
+
+  void	(*error_function)(const char *);
+};
+
+
+#endif
+
+
+
+/* graph.h */
+/*
+	This software library implements the maxflow algorithm
+	described in
+
+		An Experimental Comparison of Min-Cut/Max-Flow Algorithms
+		for Energy Minimization in Vision.
+		Yuri Boykov and Vladimir Kolmogorov.
+		In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI),
+		September 2004
+
+	This algorithm was developed by Yuri Boykov and Vladimir Kolmogorov
+	at Siemens Corporate Research. To make it available for public use,
+	it was later reimplemented by Vladimir Kolmogorov based on open publications.
+
+	If you use this software for research purposes, you should cite
+	the aforementioned paper in any resulting publication.
+
+	----------------------------------------------------------------
+
+	For description, license, example usage, discussion of graph representation	and memory usage see README.TXT.
+*/
+
+#ifndef __GRAPH_H__
+#define __GRAPH_H__
+
+//#include "block.h"
+#include <stdio.h>
+/*
+	Nodes, arcs and pointers to nodes are
+	added in blocks for memory and time efficiency.
+	Below are numbers of items in blocks
+*/
+#define NODE_BLOCK_SIZE 512
+#define ARC_BLOCK_SIZE 1024
+#define NODEPTR_BLOCK_SIZE 128
+
+template <std::size_t size>
+struct Int_to_ptr;
+
+template<> struct Int_to_ptr<sizeof(int)> {
+  typedef int type;
+};
+#if INT_MAX != LONG_MAX
+template<> struct Int_to_ptr<sizeof(long)> {
+  typedef long type;
+};
+#else
+template<> struct Int_to_ptr<sizeof(long long)> {
+  typedef long long type;
+};
+#endif
+
+
+class Graph
+{
+public:
+  typedef enum {
+    SOURCE	= 0,
+    SINK	= 1
+  } termtype; /* terminals */
+
+  /* Type of edge weights.
+     Can be changed to char, int, float, double, ... */
+  typedef double captype;
+  /* Type of total flow */
+  typedef double flowtype;
+
+  typedef void * node_id;
+
+  /* interface functions */
+
+  /* Constructor. Optional argument is the pointer to the
+     function which will be called if an error occurs;
+     an error message is passed to this function. If this
+     argument is omitted, exit(1) will be called. */
+  Graph(void (*err_function)(const char *) = NULL);
+
+  /* Destructor */
+  ~Graph();
+
+  /* Adds a node to the graph */
+  node_id add_node();
+
+  /* Adds a bidirectional edge between 'from' and 'to'
+     with the weights 'cap' and 'rev_cap' */
+  void add_edge(node_id from, node_id to, captype cap, captype rev_cap);
+
+  /* Sets the weights of the edges 'SOURCE->i' and 'i->SINK'
+     Can be called at most once for each node before any call to 'add_tweights'.
+     Weights can be negative */
+  void set_tweights(node_id i, captype cap_source, captype cap_sink);
+
+  /* Adds new edges 'SOURCE->i' and 'i->SINK' with corresponding weights
+     Can be called multiple times for each node.
+     Weights can be negative */
+  void add_tweights(node_id i, captype cap_source, captype cap_sink);
+
+  /* After the maxflow is computed, this function returns to which
+     segment the node 'i' belongs (Graph::SOURCE or Graph::SINK) */
+  termtype what_segment(node_id i);
+
+  /* Computes the maxflow. Can be called only once. */
+  flowtype maxflow();
+
+  /***********************************************************************/
+  /***********************************************************************/
+  /***********************************************************************/
+
+private:
+  /* internal variables and functions */
+
+  struct arc_forward_st;
+  struct arc_reverse_st;
+
+  typedef Int_to_ptr< sizeof(void*) >::type INTEGER;
+#define IS_ODD(a) ((INTEGER)(a) & 1)
+#define MAKE_ODD(a)  ((arc_forward *) ((INTEGER)(a) | 1))
+#define MAKE_EVEN(a) ((arc_forward *) ((INTEGER)(a) & (~1)))
+#define MAKE_ODD_REV(a)  ((arc_reverse *) ((INTEGER)(a) | 1))
+#define MAKE_EVEN_REV(a) ((arc_reverse *) ((INTEGER)(a) & (~1)))
+#define POINTER_TO_INTEGER(ptr) ((INTEGER) ptr)
+
+
+
+  /* node structure */
+  typedef struct node_st {
+    /*
+    	Usually i->first_out is the first outgoing
+    	arc, and (i+1)->first_out-1 is the last outgoing arc.
+    	However, it is not always possible, since
+    	arcs are allocated in blocks, so arcs corresponding
+    	to two consecutive nodes may be in different blocks.
+
+    	If outgoing arcs for i are last in the arc block,
+    	then a different mechanism is used. i->first_out
+    	is odd in this case; the first outgoing arc
+    	is (a+1), and the last outgoing arc is
+    	((arc_forward *)(a->shift))-1, where
+    	a = (arc_forward *) (((char *)(i->first_out)) + 1);
+
+    	Similar mechanism is used for incoming arcs.
+    */
+    arc_forward_st	*first_out;	/* first outcoming arc */
+    arc_reverse_st	*first_in;	/* first incoming arc */
+
+    arc_forward_st	*parent;	/* describes node's parent
+									   if IS_ODD(parent) then MAKE_EVEN(parent) points to 'arc_reverse',
+									   otherwise parent points to 'arc_forward' */
+
+    node_st			*next;		/* pointer to the next active node
+									   (or to itself if it is the last node in the list) */
+
+    int				TS;			/* timestamp showing when DIST was computed */
+    int				DIST;		/* distance to the terminal */
+    short			is_sink;	/* flag showing whether the node is in the source or in the sink tree */
+
+    captype			tr_cap;		/* if tr_cap > 0 then tr_cap is residual capacity of the arc SOURCE->node
+									   otherwise         -tr_cap is residual capacity of the arc node->SINK */
+  } node;
+
+  /* arc structures */
+#define NEIGHBOR_NODE(i, shift) ((node *) ((char *)(i) + (shift)))
+#define NEIGHBOR_NODE_REV(i, shift) ((node *) ((char *)(i) - (shift)))
+  typedef struct arc_forward_st {
+    INTEGER			shift;		/* node_to = NEIGHBOR_NODE(node_from, shift) */
+    captype			r_cap;		/* residual capacity */
+    captype			r_rev_cap;	/* residual capacity of the reverse arc*/
+  } arc_forward;
+
+  typedef struct arc_reverse_st {
+    arc_forward		*sister;	/* reverse arc */
+  } arc_reverse;
+
+  /* 'pointer to node' structure */
+  typedef struct nodeptr_st {
+    node_st			*ptr;
+    nodeptr_st		*next;
+  } nodeptr;
+
+  typedef struct node_block_st {
+    node					*current;
+    struct node_block_st	*next;
+    node					nodes[NODE_BLOCK_SIZE];
+  } node_block;
+
+#define last_node LAST_NODE.LAST_NODE
+
+  typedef struct arc_for_block_st {
+    char					*start;		/* the actual start address of this block.
+											   May be different from 'this' since 'this'
+											   must be at an even address. */
+    arc_forward				*current;
+    struct arc_for_block_st	*next;
+    arc_forward
+    arcs_for[ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */
+    union {
+      arc_forward			dummy;
+      node				*LAST_NODE;	/* used in graph consruction */
+    }						LAST_NODE;
+  } arc_for_block;
+
+  typedef struct arc_rev_block_st {
+    char					*start;		/* the actual start address of this block.
+											   May be different from 'this' since 'this'
+											   must be at an even address. */
+    arc_reverse				*current;
+    struct arc_rev_block_st	*next;
+    arc_reverse
+    arcs_rev[ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */
+    union {
+      arc_reverse			dummy;
+      node				*LAST_NODE;	/* used in graph consruction */
+    }						LAST_NODE;
+  } arc_rev_block;
+
+  node_block			*node_block_first;
+  arc_for_block		*arc_for_block_first;
+  arc_rev_block		*arc_rev_block_first;
+  DBlock<nodeptr>		*nodeptr_block;
+
+  void	(*error_function)(const char
+                          *);	/* this function is called if a error occurs,
+										   with a corresponding error message
+										   (or exit(1) is called if it's NULL) */
+
+  flowtype			flow;		/* total flow */
+
+  /***********************************************************************/
+
+  node				*queue_first[2], *queue_last[2];	/* list of active nodes */
+  nodeptr				*orphan_first, *orphan_last;		/* list of pointers to orphans */
+  int					TIME;								/* monotonically increasing global counter */
+
+  /***********************************************************************/
+
+  /* functions for processing active list */
+  void set_active(node *i);
+  node *next_active();
+
+  void prepare_graph();
+  void maxflow_init();
+  void augment(node *s_start, node *t_start, captype *cap_middle,
+               captype *rev_cap_middle);
+  void process_source_orphan(node *i);
+  void process_sink_orphan(node *i);
+};
+/* graph.cpp */
+
+
+//#include <stdio.h>
+//#include "graph.h"
+
+inline Graph::Graph(void (*err_function)(const char *))
+{
+  error_function = err_function;
+  node_block_first = NULL;
+  arc_for_block_first = NULL;
+  arc_rev_block_first = NULL;
+  orphan_first = NULL;
+  orphan_last = NULL;
+  flow = 0;
+}
+
+inline Graph::~Graph()
+{
+  while (node_block_first) {
+    node_block *next = node_block_first -> next;
+    delete node_block_first;
+    node_block_first = next;
+  }
+
+  while (arc_for_block_first) {
+    arc_for_block *next = arc_for_block_first -> next;
+    delete[] arc_for_block_first -> start;
+    arc_for_block_first = next;
+  }
+
+  while (arc_rev_block_first) {
+    arc_rev_block *next = arc_rev_block_first -> next;
+    delete[] arc_rev_block_first -> start;
+    arc_rev_block_first = next;
+  }
+}
+
+inline Graph::node_id Graph::add_node()
+{
+  node *i;
+
+  if (!node_block_first
+      || node_block_first->current+1 > &node_block_first->nodes[NODE_BLOCK_SIZE-1]) {
+    node_block *next = node_block_first;
+    node_block_first = (node_block *) new node_block;
+    if (!node_block_first) {
+      if (error_function) (*error_function)("Not enough memory!");
+      exit(1);
+    }
+    node_block_first -> current = & ( node_block_first -> nodes[0] );
+    node_block_first -> next = next;
+  }
+
+  i = node_block_first -> current ++;
+  i -> first_out = (arc_forward *) 0;
+  i -> first_in = (arc_reverse *) 0;
+
+  i -> tr_cap = 0;
+
+  return (node_id) i;
+}
+
+inline void Graph::add_edge(node_id from, node_id to, captype cap,
+                            captype rev_cap)
+{
+  arc_forward *a_for;
+  arc_reverse *a_rev;
+
+  if (!arc_for_block_first
+      || arc_for_block_first->current+1 >
+      &arc_for_block_first->arcs_for[ARC_BLOCK_SIZE]) {
+    arc_for_block *next = arc_for_block_first;
+    char *ptr = new char[sizeof(arc_for_block)+1];
+    if (!ptr) {
+      if (error_function) (*error_function)("Not enough memory!");
+      exit(1);
+    }
+    if (IS_ODD(ptr)) arc_for_block_first = (arc_for_block *) (ptr + 1);
+    else              arc_for_block_first = (arc_for_block *) ptr;
+    arc_for_block_first -> start = ptr;
+    arc_for_block_first -> current = & ( arc_for_block_first -> arcs_for[0] );
+    arc_for_block_first -> next = next;
+  }
+
+  if (!arc_rev_block_first
+      || arc_rev_block_first->current+1 >
+      &arc_rev_block_first->arcs_rev[ARC_BLOCK_SIZE]) {
+    arc_rev_block *next = arc_rev_block_first;
+    char *ptr = new char[sizeof(arc_rev_block)+1];
+    if (!ptr) {
+      if (error_function) (*error_function)("Not enough memory!");
+      exit(1);
+    }
+    if (IS_ODD(ptr)) arc_rev_block_first = (arc_rev_block *) (ptr + 1);
+    else              arc_rev_block_first = (arc_rev_block *) ptr;
+    arc_rev_block_first -> start = ptr;
+    arc_rev_block_first -> current = & ( arc_rev_block_first -> arcs_rev[0] );
+    arc_rev_block_first -> next = next;
+  }
+
+  a_for = arc_for_block_first -> current ++;
+  a_rev = arc_rev_block_first -> current ++;
+
+  a_rev -> sister = (arc_forward *) from;
+  a_for -> shift  = POINTER_TO_INTEGER(to);
+  a_for -> r_cap = cap;
+  a_for -> r_rev_cap = rev_cap;
+
+  ((node *)from) -> first_out =
+    (arc_forward *) (POINTER_TO_INTEGER(((node *)from) -> first_out) + 1);
+  ((node *)to) -> first_in =
+    (arc_reverse *) (POINTER_TO_INTEGER(((node *)to) -> first_in) + 1);
+}
+
+inline void Graph::set_tweights(node_id i, captype cap_source, captype cap_sink)
+{
+  flow += (cap_source < cap_sink) ? cap_source : cap_sink;
+  ((node*)i) -> tr_cap = cap_source - cap_sink;
+}
+
+inline void Graph::add_tweights(node_id i, captype cap_source, captype cap_sink)
+{
+  captype delta = ((node*)i) -> tr_cap;
+  if (delta > 0) cap_source += delta;
+  else           cap_sink   -= delta;
+  flow += (cap_source < cap_sink) ? cap_source : cap_sink;
+  ((node*)i) -> tr_cap = cap_source - cap_sink;
+}
+
+/*
+	Converts arcs added by 'add_edge()' calls
+	to a forward star graph representation.
+
+	Linear time algorithm.
+	No or little additional memory is allocated
+	during this process
+	(it may be necessary to allocate additional
+	arc blocks, since arcs corresponding to the
+	same node must be contiguous, i.e. be in one
+	arc block.)
+*/
+inline void Graph::prepare_graph()
+{
+  node *i;
+  arc_for_block *ab_for, *ab_for_first;
+  arc_rev_block *ab_rev, *ab_rev_first, *ab_rev_scan;
+  arc_forward *a_for;
+  arc_reverse *a_rev, *a_rev_scan, *a_rev_tmp=new arc_reverse;
+  node_block *nb;
+  bool for_flag = false, rev_flag = false;
+  INTEGER k;
+
+  if (!arc_rev_block_first) {
+    node_id from = add_node(), to = add_node();
+    add_edge(from, to, 1, 0);
+  }
+
+  /* FIRST STAGE */
+  a_rev_tmp->sister = NULL;
+  for (a_rev=arc_rev_block_first->current;
+       a_rev<&arc_rev_block_first->arcs_rev[ARC_BLOCK_SIZE]; a_rev++) {
+    a_rev -> sister = NULL;
+  }
+
+  ab_for = ab_for_first = arc_for_block_first;
+  ab_rev = ab_rev_first = ab_rev_scan = arc_rev_block_first;
+  a_for = &ab_for->arcs_for[0];
+  a_rev = a_rev_scan = &ab_rev->arcs_rev[0];
+
+  for (nb=node_block_first; nb; nb=nb->next) {
+    for (i=&nb->nodes[0]; i<nb->current; i++) {
+      /* outgoing arcs */
+      k = POINTER_TO_INTEGER(i -> first_out);
+      if (a_for + k > &ab_for->arcs_for[ARC_BLOCK_SIZE]) {
+        if (k > ARC_BLOCK_SIZE) {
+          if (error_function) (*error_function)("# of arcs per node exceeds block size!");
+          exit(1);
+        }
+        if (for_flag) ab_for = NULL;
+        else          {
+          ab_for = ab_for -> next;
+          ab_rev_scan = ab_rev_scan -> next;
+        }
+        if (ab_for == NULL) {
+          arc_for_block *next = arc_for_block_first;
+          char *ptr = new char[sizeof(arc_for_block)+1];
+          if (!ptr) {
+            if (error_function) (*error_function)("Not enough memory!");
+            exit(1);
+          }
+          if (IS_ODD(ptr)) arc_for_block_first = (arc_for_block *) (ptr + 1);
+          else              arc_for_block_first = (arc_for_block *) ptr;
+          arc_for_block_first -> start = ptr;
+          arc_for_block_first -> current = & ( arc_for_block_first -> arcs_for[0] );
+          arc_for_block_first -> next = next;
+          ab_for = arc_for_block_first;
+          for_flag = true;
+        } else a_rev_scan = &ab_rev_scan->arcs_rev[0];
+        a_for = &ab_for->arcs_for[0];
+      }
+      if (ab_rev_scan) {
+        a_rev_scan += k;
+        i -> parent = (arc_forward *) a_rev_scan;
+      } else i -> parent = (arc_forward *) a_rev_tmp;
+      a_for += k;
+      i -> first_out = a_for;
+      ab_for -> last_node = i;
+
+      /* incoming arcs */
+      k = POINTER_TO_INTEGER(i -> first_in);
+      if (a_rev + k > &ab_rev->arcs_rev[ARC_BLOCK_SIZE]) {
+        if (k > ARC_BLOCK_SIZE) {
+          if (error_function) (*error_function)("# of arcs per node exceeds block size!");
+          exit(1);
+        }
+        if (rev_flag) ab_rev = NULL;
+        else          ab_rev = ab_rev -> next;
+        if (ab_rev == NULL) {
+          arc_rev_block *next = arc_rev_block_first;
+          char *ptr = new char[sizeof(arc_rev_block)+1];
+          if (!ptr) {
+            if (error_function) (*error_function)("Not enough memory!");
+            exit(1);
+          }
+          if (IS_ODD(ptr)) arc_rev_block_first = (arc_rev_block *) (ptr + 1);
+          else              arc_rev_block_first = (arc_rev_block *) ptr;
+          arc_rev_block_first -> start = ptr;
+          arc_rev_block_first -> current = & ( arc_rev_block_first -> arcs_rev[0] );
+          arc_rev_block_first -> next = next;
+          ab_rev = arc_rev_block_first;
+          rev_flag = true;
+        }
+        a_rev = &ab_rev->arcs_rev[0];
+      }
+      a_rev += k;
+      i -> first_in = a_rev;
+      ab_rev -> last_node = i;
+    }
+    /* i is the last node in block */
+    i -> first_out = a_for;
+    i -> first_in  = a_rev;
+  }
+
+  /* SECOND STAGE */
+  for (ab_for=arc_for_block_first; ab_for; ab_for=ab_for->next) {
+    ab_for -> current = ab_for -> last_node -> first_out;
+  }
+
+  for ( ab_for=ab_for_first, ab_rev=ab_rev_first;
+        ab_for;
+        ab_for=ab_for->next, ab_rev=ab_rev->next )
+    for ( a_for=&ab_for->arcs_for[0], a_rev=&ab_rev->arcs_rev[0];
+          a_for<&ab_for->arcs_for[ARC_BLOCK_SIZE];
+          a_for++, a_rev++ ) {
+      arc_forward *af;
+      arc_reverse *ar;
+      node *from;
+      INTEGER shift = 0, shift_new;
+      captype r_cap=0, r_rev_cap=0, r_cap_new, r_rev_cap_new;
+
+      if (!(from=(node *)(a_rev->sister))) continue;
+      af = a_for;
+      ar = a_rev;
+
+      do {
+        ar -> sister = NULL;
+
+        shift_new = ((char *)(af->shift)) - (char *)from;
+        r_cap_new = af -> r_cap;
+        r_rev_cap_new = af -> r_rev_cap;
+        if (shift) {
+          af -> shift = shift;
+          af -> r_cap = r_cap;
+          af -> r_rev_cap = r_rev_cap;
+        }
+        shift = shift_new;
+        r_cap = r_cap_new;
+        r_rev_cap = r_rev_cap_new;
+
+        af = -- from -> first_out;
+        if ((arc_reverse *)(from->parent) != a_rev_tmp) {
+          from -> parent = (arc_forward *)(((arc_reverse *)(from -> parent)) - 1);
+          ar = (arc_reverse *)(from -> parent);
+        }
+      } while ( (from=(node *)(ar->sister)) );
+
+      af -> shift = shift;
+      af -> r_cap = r_cap;
+      af -> r_rev_cap = r_rev_cap;
+    }
+
+  for (ab_for=arc_for_block_first; ab_for; ab_for=ab_for->next) {
+    i = ab_for -> last_node;
+    a_for = i -> first_out;
+    ab_for -> current -> shift     = a_for -> shift;
+    ab_for -> current -> r_cap     = a_for -> r_cap;
+    ab_for -> current -> r_rev_cap = a_for -> r_rev_cap;
+    a_for -> shift = POINTER_TO_INTEGER(ab_for -> current + 1);
+    i -> first_out = (arc_forward *) (((char *)a_for) - 1);
+  }
+
+  /* THIRD STAGE */
+  for (ab_rev=arc_rev_block_first; ab_rev; ab_rev=ab_rev->next) {
+    ab_rev -> current = ab_rev -> last_node -> first_in;
+  }
+
+  for (nb=node_block_first; nb; nb=nb->next)
+    for (i=&nb->nodes[0]; i<nb->current; i++) {
+      arc_forward *a_for_first, *a_for_last;
+
+      a_for_first = i -> first_out;
+      if (IS_ODD(a_for_first)) {
+        a_for_first = (arc_forward *) (((char *)a_for_first) + 1);
+        a_for_last = (arc_forward *) ((a_for_first ++) -> shift);
+      } else a_for_last = (i + 1) -> first_out;
+
+      for (a_for=a_for_first; a_for<a_for_last; a_for++) {
+        node *to = NEIGHBOR_NODE(i, a_for -> shift);
+        a_rev = -- to -> first_in;
+        a_rev -> sister = a_for;
+      }
+    }
+
+  for (ab_rev=arc_rev_block_first; ab_rev; ab_rev=ab_rev->next) {
+    i = ab_rev -> last_node;
+    a_rev = i -> first_in;
+    ab_rev -> current -> sister = a_rev -> sister;
+    a_rev -> sister = (arc_forward *) (ab_rev -> current + 1);
+    i -> first_in = (arc_reverse *) (((char *)a_rev) - 1);
+  }
+  delete a_rev_tmp;
+}
+
+/* maxflow.cpp */
+
+//#include <stdio.h>
+//#include "graph.h"
+
+/*
+	special constants for node->parent
+*/
+#define TERMINAL ( (arc_forward *) 1 )		/* to terminal */
+#define ORPHAN   ( (arc_forward *) 2 )		/* orphan */
+
+#define INFINITE_D 1000000000		/* infinite distance to the terminal */
+
+/***********************************************************************/
+
+/*
+	Functions for processing active list.
+	i->next points to the next node in the list
+	(or to i, if i is the last node in the list).
+	If i->next is NULL iff i is not in the list.
+
+	There are two queues. Active nodes are added
+	to the end of the second queue and read from
+	the front of the first queue. If the first queue
+	is empty, it is replaced by the second queue
+	(and the second queue becomes empty).
+*/
+
+inline void Graph::set_active(node *i)
+{
+  if (!i->next) {
+    /* it's not in the list yet */
+    if (queue_last[1]) queue_last[1] -> next = i;
+    else               queue_first[1]        = i;
+    queue_last[1] = i;
+    i -> next = i;
+  }
+}
+
+/*
+	Returns the next active node.
+	If it is connected to the sink, it stays in the list,
+	otherwise it is removed from the list
+*/
+inline Graph::node * Graph::next_active()
+{
+  node *i;
+
+  while ( 1 ) {
+    if (!(i=queue_first[0])) {
+      queue_first[0] = i = queue_first[1];
+      queue_last[0]  = queue_last[1];
+      queue_first[1] = NULL;
+      queue_last[1]  = NULL;
+      if (!i) return NULL;
+    }
+
+    /* remove it from the active list */
+    if (i->next == i) queue_first[0] = queue_last[0] = NULL;
+    else              queue_first[0] = i -> next;
+    i -> next = NULL;
+
+    /* a node in the list is active iff it has a parent */
+    if (i->parent) return i;
+  }
+}
+
+/***********************************************************************/
+
+inline void Graph::maxflow_init()
+{
+  node *i;
+  node_block *nb;
+
+  queue_first[0] = queue_last[0] = NULL;
+  queue_first[1] = queue_last[1] = NULL;
+  orphan_first = NULL;
+
+  for (nb=node_block_first; nb; nb=nb->next)
+    for (i=&nb->nodes[0]; i<nb->current; i++) {
+      i -> next = NULL;
+      i -> TS = 0;
+      if (i->tr_cap > 0) {
+        /* i is connected to the source */
+        i -> is_sink = 0;
+        i -> parent = TERMINAL;
+        set_active(i);
+        i -> TS = 0;
+        i -> DIST = 1;
+      } else if (i->tr_cap < 0) {
+        /* i is connected to the sink */
+        i -> is_sink = 1;
+        i -> parent = TERMINAL;
+        set_active(i);
+        i -> TS = 0;
+        i -> DIST = 1;
+      } else {
+        i -> parent = NULL;
+      }
+    }
+  TIME = 0;
+}
+
+/***********************************************************************/
+
+inline void Graph::augment(node *s_start, node *t_start, captype *cap_middle,
+                           captype *rev_cap_middle)
+{
+  node *i;
+  arc_forward *a;
+  captype bottleneck;
+  nodeptr *np;
+
+
+  /* 1. Finding bottleneck capacity */
+  /* 1a - the source tree */
+  bottleneck = *cap_middle;
+  for (i=s_start; ; ) {
+    a = i -> parent;
+    if (a == TERMINAL) break;
+    if (IS_ODD(a)) {
+      a = MAKE_EVEN(a);
+      if (bottleneck > a->r_cap) bottleneck = a -> r_cap;
+      i = NEIGHBOR_NODE_REV(i, a -> shift);
+    } else {
+      if (bottleneck > a->r_rev_cap) bottleneck = a -> r_rev_cap;
+      i = NEIGHBOR_NODE(i, a -> shift);
+    }
+  }
+  if (bottleneck > i->tr_cap) bottleneck = i -> tr_cap;
+  /* 1b - the sink tree */
+  for (i=t_start; ; ) {
+    a = i -> parent;
+    if (a == TERMINAL) break;
+    if (IS_ODD(a)) {
+      a = MAKE_EVEN(a);
+      if (bottleneck > a->r_rev_cap) bottleneck = a -> r_rev_cap;
+      i = NEIGHBOR_NODE_REV(i, a -> shift);
+    } else {
+      if (bottleneck > a->r_cap) bottleneck = a -> r_cap;
+      i = NEIGHBOR_NODE(i, a -> shift);
+    }
+  }
+  if (bottleneck > - i->tr_cap) bottleneck = - i -> tr_cap;
+
+
+  /* 2. Augmenting */
+  /* 2a - the source tree */
+  *rev_cap_middle += bottleneck;
+  *cap_middle -= bottleneck;
+  for (i=s_start; ; ) {
+    a = i -> parent;
+    if (a == TERMINAL) break;
+    if (IS_ODD(a)) {
+      a = MAKE_EVEN(a);
+      a -> r_rev_cap += bottleneck;
+      a -> r_cap -= bottleneck;
+      if (!a->r_cap) {
+        /* add i to the adoption list */
+        i -> parent = ORPHAN;
+        np = nodeptr_block -> New();
+        np -> ptr = i;
+        np -> next = orphan_first;
+        orphan_first = np;
+      }
+      i = NEIGHBOR_NODE_REV(i, a -> shift);
+    } else {
+      a -> r_cap += bottleneck;
+      a -> r_rev_cap -= bottleneck;
+      if (!a->r_rev_cap) {
+        /* add i to the adoption list */
+        i -> parent = ORPHAN;
+        np = nodeptr_block -> New();
+        np -> ptr = i;
+        np -> next = orphan_first;
+        orphan_first = np;
+      }
+      i = NEIGHBOR_NODE(i, a -> shift);
+    }
+  }
+  i -> tr_cap -= bottleneck;
+  if (!i->tr_cap) {
+    /* add i to the adoption list */
+    i -> parent = ORPHAN;
+    np = nodeptr_block -> New();
+    np -> ptr = i;
+    np -> next = orphan_first;
+    orphan_first = np;
+  }
+  /* 2b - the sink tree */
+  for (i=t_start; ; ) {
+    a = i -> parent;
+    if (a == TERMINAL) break;
+    if (IS_ODD(a)) {
+      a = MAKE_EVEN(a);
+      a -> r_cap += bottleneck;
+      a -> r_rev_cap -= bottleneck;
+      if (!a->r_rev_cap) {
+        /* add i to the adoption list */
+        i -> parent = ORPHAN;
+        np = nodeptr_block -> New();
+        np -> ptr = i;
+        np -> next = orphan_first;
+        orphan_first = np;
+      }
+      i = NEIGHBOR_NODE_REV(i, a -> shift);
+    } else {
+      a -> r_rev_cap += bottleneck;
+      a -> r_cap -= bottleneck;
+      if (!a->r_cap) {
+        /* add i to the adoption list */
+        i -> parent = ORPHAN;
+        np = nodeptr_block -> New();
+        np -> ptr = i;
+        np -> next = orphan_first;
+        orphan_first = np;
+      }
+      i = NEIGHBOR_NODE(i, a -> shift);
+    }
+  }
+  i -> tr_cap += bottleneck;
+  if (!i->tr_cap) {
+    /* add i to the adoption list */
+    i -> parent = ORPHAN;
+    np = nodeptr_block -> New();
+    np -> ptr = i;
+    np -> next = orphan_first;
+    orphan_first = np;
+  }
+
+
+  flow += bottleneck;
+}
+
+/***********************************************************************/
+
+inline void Graph::process_source_orphan(node *i)
+{
+  node *j;
+  arc_forward *a0_for, *a0_for_first, *a0_for_last;
+  arc_reverse *a0_rev, *a0_rev_first, *a0_rev_last;
+  arc_forward *a0_min = NULL, *a;
+  nodeptr *np;
+  int d, d_min = INFINITE_D;
+
+  /* trying to find a new parent */
+  a0_for_first = i -> first_out;
+  if (IS_ODD(a0_for_first)) {
+    a0_for_first = (arc_forward *) (((char *)a0_for_first) + 1);
+    a0_for_last = (arc_forward *) ((a0_for_first ++) -> shift);
+  } else a0_for_last = (i + 1) -> first_out;
+  a0_rev_first = i -> first_in;
+  if (IS_ODD(a0_rev_first)) {
+    a0_rev_first = (arc_reverse *) (((char *)a0_rev_first) + 1);
+    a0_rev_last  = (arc_reverse *) ((a0_rev_first ++) -> sister);
+  } else a0_rev_last = (i + 1) -> first_in;
+
+
+  for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++)
+    if (a0_for->r_rev_cap) {
+      j = NEIGHBOR_NODE(i, a0_for -> shift);
+      if (!j->is_sink && (a=j->parent)) {
+        /* checking the origin of j */
+        d = 0;
+        while ( 1 ) {
+          if (j->TS == TIME) {
+            d += j -> DIST;
+            break;
+          }
+          a = j -> parent;
+          d ++;
+          if (a==TERMINAL) {
+            j -> TS = TIME;
+            j -> DIST = 1;
+            break;
+          }
+          if (a==ORPHAN) {
+            d = INFINITE_D;
+            break;
+          }
+          if (IS_ODD(a))
+            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+          else
+            j = NEIGHBOR_NODE(j, a -> shift);
+        }
+        if (d<INFINITE_D) { /* j originates from the source - done */
+          if (d<d_min) {
+            a0_min = a0_for;
+            d_min = d;
+          }
+          /* set marks along the path */
+          for (j=NEIGHBOR_NODE(i, a0_for->shift); j->TS!=TIME; ) {
+            j -> TS = TIME;
+            j -> DIST = d --;
+            a = j->parent;
+            if (IS_ODD(a))
+              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+            else
+              j = NEIGHBOR_NODE(j, a -> shift);
+          }
+        }
+      }
+    }
+  for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
+    a0_for = a0_rev -> sister;
+    if (a0_for->r_cap) {
+      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
+      if (!j->is_sink && (a=j->parent)) {
+        /* checking the origin of j */
+        d = 0;
+        while ( 1 ) {
+          if (j->TS == TIME) {
+            d += j -> DIST;
+            break;
+          }
+          a = j -> parent;
+          d ++;
+          if (a==TERMINAL) {
+            j -> TS = TIME;
+            j -> DIST = 1;
+            break;
+          }
+          if (a==ORPHAN) {
+            d = INFINITE_D;
+            break;
+          }
+          if (IS_ODD(a))
+            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+          else
+            j = NEIGHBOR_NODE(j, a -> shift);
+        }
+        if (d<INFINITE_D) { /* j originates from the source - done */
+          if (d<d_min) {
+            a0_min = MAKE_ODD(a0_for);
+            d_min = d;
+          }
+          /* set marks along the path */
+          for (j=NEIGHBOR_NODE_REV(i,a0_for->shift); j->TS!=TIME; ) {
+            j -> TS = TIME;
+            j -> DIST = d --;
+            a = j->parent;
+            if (IS_ODD(a))
+              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+            else
+              j = NEIGHBOR_NODE(j, a -> shift);
+          }
+        }
+      }
+    }
+  }
+
+  if ( (i->parent = a0_min) ) {
+    i -> TS = TIME;
+    i -> DIST = d_min + 1;
+  } else {
+    /* no parent is found */
+    i -> TS = 0;
+
+    /* process neighbors */
+    for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++) {
+      j = NEIGHBOR_NODE(i, a0_for -> shift);
+      if (!j->is_sink && (a=j->parent)) {
+        if (a0_for->r_rev_cap) set_active(j);
+        if (a!=TERMINAL && a!=ORPHAN && IS_ODD(a)
+            && NEIGHBOR_NODE_REV(j, MAKE_EVEN(a)->shift)==i) {
+          /* add j to the adoption list */
+          j -> parent = ORPHAN;
+          np = nodeptr_block -> New();
+          np -> ptr = j;
+          if (orphan_last) orphan_last -> next = np;
+          else             orphan_first        = np;
+          orphan_last = np;
+          np -> next = NULL;
+        }
+      }
+    }
+    for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
+      a0_for = a0_rev -> sister;
+      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
+      if (!j->is_sink && (a=j->parent)) {
+        if (a0_for->r_cap) set_active(j);
+        if (a!=TERMINAL && a!=ORPHAN && !IS_ODD(a) && NEIGHBOR_NODE(j, a->shift)==i) {
+          /* add j to the adoption list */
+          j -> parent = ORPHAN;
+          np = nodeptr_block -> New();
+          np -> ptr = j;
+          if (orphan_last) orphan_last -> next = np;
+          else             orphan_first        = np;
+          orphan_last = np;
+          np -> next = NULL;
+        }
+      }
+    }
+  }
+}
+
+inline void Graph::process_sink_orphan(node *i)
+{
+  node *j;
+  arc_forward *a0_for, *a0_for_first, *a0_for_last;
+  arc_reverse *a0_rev, *a0_rev_first, *a0_rev_last;
+  arc_forward *a0_min = NULL, *a;
+  nodeptr *np;
+  int d, d_min = INFINITE_D;
+
+  /* trying to find a new parent */
+  a0_for_first = i -> first_out;
+  if (IS_ODD(a0_for_first)) {
+    a0_for_first = (arc_forward *) (((char *)a0_for_first) + 1);
+    a0_for_last = (arc_forward *) ((a0_for_first ++) -> shift);
+  } else a0_for_last = (i + 1) -> first_out;
+  a0_rev_first = i -> first_in;
+  if (IS_ODD(a0_rev_first)) {
+    a0_rev_first = (arc_reverse *) (((char *)a0_rev_first) + 1);
+    a0_rev_last  = (arc_reverse *) ((a0_rev_first ++) -> sister);
+  } else a0_rev_last = (i + 1) -> first_in;
+
+
+  for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++)
+    if (a0_for->r_cap) {
+      j = NEIGHBOR_NODE(i, a0_for -> shift);
+      if (j->is_sink && (a=j->parent)) {
+        /* checking the origin of j */
+        d = 0;
+        while ( 1 ) {
+          if (j->TS == TIME) {
+            d += j -> DIST;
+            break;
+          }
+          a = j -> parent;
+          d ++;
+          if (a==TERMINAL) {
+            j -> TS = TIME;
+            j -> DIST = 1;
+            break;
+          }
+          if (a==ORPHAN) {
+            d = INFINITE_D;
+            break;
+          }
+          if (IS_ODD(a))
+            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+          else
+            j = NEIGHBOR_NODE(j, a -> shift);
+        }
+        if (d<INFINITE_D) { /* j originates from the sink - done */
+          if (d<d_min) {
+            a0_min = a0_for;
+            d_min = d;
+          }
+          /* set marks along the path */
+          for (j=NEIGHBOR_NODE(i, a0_for->shift); j->TS!=TIME; ) {
+            j -> TS = TIME;
+            j -> DIST = d --;
+            a = j->parent;
+            if (IS_ODD(a))
+              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+            else
+              j = NEIGHBOR_NODE(j, a -> shift);
+          }
+        }
+      }
+    }
+  for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
+    a0_for = a0_rev -> sister;
+    if (a0_for->r_rev_cap) {
+      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
+      if (j->is_sink && (a=j->parent)) {
+        /* checking the origin of j */
+        d = 0;
+        while ( 1 ) {
+          if (j->TS == TIME) {
+            d += j -> DIST;
+            break;
+          }
+          a = j -> parent;
+          d ++;
+          if (a==TERMINAL) {
+            j -> TS = TIME;
+            j -> DIST = 1;
+            break;
+          }
+          if (a==ORPHAN) {
+            d = INFINITE_D;
+            break;
+          }
+          if (IS_ODD(a))
+            j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+          else
+            j = NEIGHBOR_NODE(j, a -> shift);
+        }
+        if (d<INFINITE_D) { /* j originates from the sink - done */
+          if (d<d_min) {
+            a0_min = MAKE_ODD(a0_for);
+            d_min = d;
+          }
+          /* set marks along the path */
+          for (j=NEIGHBOR_NODE_REV(i,a0_for->shift); j->TS!=TIME; ) {
+            j -> TS = TIME;
+            j -> DIST = d --;
+            a = j->parent;
+            if (IS_ODD(a))
+              j = NEIGHBOR_NODE_REV(j, MAKE_EVEN(a) -> shift);
+            else
+              j = NEIGHBOR_NODE(j, a -> shift);
+          }
+        }
+      }
+    }
+  }
+
+  if ( (i->parent = a0_min) ) {
+    i -> TS = TIME;
+    i -> DIST = d_min + 1;
+  } else {
+    /* no parent is found */
+    i -> TS = 0;
+
+    /* process neighbors */
+    for (a0_for=a0_for_first; a0_for<a0_for_last; a0_for++) {
+      j = NEIGHBOR_NODE(i, a0_for -> shift);
+      if (j->is_sink && (a=j->parent)) {
+        if (a0_for->r_cap) set_active(j);
+        if (a!=TERMINAL && a!=ORPHAN && IS_ODD(a)
+            && NEIGHBOR_NODE_REV(j, MAKE_EVEN(a)->shift)==i) {
+          /* add j to the adoption list */
+          j -> parent = ORPHAN;
+          np = nodeptr_block -> New();
+          np -> ptr = j;
+          if (orphan_last) orphan_last -> next = np;
+          else             orphan_first        = np;
+          orphan_last = np;
+          np -> next = NULL;
+        }
+      }
+    }
+    for (a0_rev=a0_rev_first; a0_rev<a0_rev_last; a0_rev++) {
+      a0_for = a0_rev -> sister;
+      j = NEIGHBOR_NODE_REV(i, a0_for -> shift);
+      if (j->is_sink && (a=j->parent)) {
+        if (a0_for->r_rev_cap) set_active(j);
+        if (a!=TERMINAL && a!=ORPHAN && !IS_ODD(a) && NEIGHBOR_NODE(j, a->shift)==i) {
+          /* add j to the adoption list */
+          j -> parent = ORPHAN;
+          np = nodeptr_block -> New();
+          np -> ptr = j;
+          if (orphan_last) orphan_last -> next = np;
+          else             orphan_first        = np;
+          orphan_last = np;
+          np -> next = NULL;
+        }
+      }
+    }
+  }
+}
+
+/***********************************************************************/
+
+inline Graph::flowtype Graph::maxflow()
+{
+  node *i, *j, *current_node = NULL, *s_start, *t_start=NULL;
+  captype *cap_middle=NULL, *rev_cap_middle=NULL;
+  arc_forward *a_for, *a_for_first, *a_for_last;
+  arc_reverse *a_rev, *a_rev_first, *a_rev_last;
+  nodeptr *np, *np_next;
+
+  prepare_graph();
+  maxflow_init();
+  nodeptr_block = new DBlock<nodeptr>(NODEPTR_BLOCK_SIZE, error_function);
+
+  while ( 1 ) {
+    if ( (i=current_node) ) {
+      i -> next = NULL; /* remove active flag */
+      if (!i->parent) i = NULL;
+    }
+    if (!i) {
+      if (!(i = next_active())) break;
+    }
+
+    /* growth */
+    s_start = NULL;
+
+    a_for_first = i -> first_out;
+    if (IS_ODD(a_for_first)) {
+      a_for_first = (arc_forward *) (((char *)a_for_first) + 1);
+      a_for_last = (arc_forward *) ((a_for_first ++) -> shift);
+    } else a_for_last = (i + 1) -> first_out;
+    a_rev_first = i -> first_in;
+    if (IS_ODD(a_rev_first)) {
+      a_rev_first = (arc_reverse *) (((char *)a_rev_first) + 1);
+      a_rev_last = (arc_reverse *) ((a_rev_first ++) -> sister);
+    } else a_rev_last = (i + 1) -> first_in;
+
+    if (!i->is_sink) {
+      /* grow source tree */
+      for (a_for=a_for_first; a_for<a_for_last; a_for++)
+        if (a_for->r_cap) {
+          j = NEIGHBOR_NODE(i, a_for -> shift);
+          if (!j->parent) {
+            j -> is_sink = 0;
+            j -> parent = MAKE_ODD(a_for);
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+            set_active(j);
+          } else if (j->is_sink) {
+            s_start = i;
+            t_start = j;
+            cap_middle     = & ( a_for -> r_cap );
+            rev_cap_middle = & ( a_for -> r_rev_cap );
+            break;
+          } else if (j->TS <= i->TS &&
+                     j->DIST > i->DIST) {
+            /* heuristic - trying to make the distance from j to the source shorter */
+            j -> parent = MAKE_ODD(a_for);
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+          }
+        }
+      if (!s_start)
+        for (a_rev=a_rev_first; a_rev<a_rev_last; a_rev++) {
+          a_for = a_rev -> sister;
+          if (a_for->r_rev_cap) {
+            j = NEIGHBOR_NODE_REV(i, a_for -> shift);
+            if (!j->parent) {
+              j -> is_sink = 0;
+              j -> parent = a_for;
+              j -> TS = i -> TS;
+              j -> DIST = i -> DIST + 1;
+              set_active(j);
+            } else if (j->is_sink) {
+              s_start = i;
+              t_start = j;
+              cap_middle     = & ( a_for -> r_rev_cap );
+              rev_cap_middle = & ( a_for -> r_cap );
+              break;
+            } else if (j->TS <= i->TS &&
+                       j->DIST > i->DIST) {
+              /* heuristic - trying to make the distance from j to the source shorter */
+              j -> parent = a_for;
+              j -> TS = i -> TS;
+              j -> DIST = i -> DIST + 1;
+            }
+          }
+        }
+    } else {
+      /* grow sink tree */
+      for (a_for=a_for_first; a_for<a_for_last; a_for++)
+        if (a_for->r_rev_cap) {
+          j = NEIGHBOR_NODE(i, a_for -> shift);
+          if (!j->parent) {
+            j -> is_sink = 1;
+            j -> parent = MAKE_ODD(a_for);
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+            set_active(j);
+          } else if (!j->is_sink) {
+            s_start = j;
+            t_start = i;
+            cap_middle     = & ( a_for -> r_rev_cap );
+            rev_cap_middle = & ( a_for -> r_cap );
+            break;
+          } else if (j->TS <= i->TS &&
+                     j->DIST > i->DIST) {
+            /* heuristic - trying to make the distance from j to the sink shorter */
+            j -> parent = MAKE_ODD(a_for);
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+          }
+        }
+      for (a_rev=a_rev_first; a_rev<a_rev_last; a_rev++) {
+        a_for = a_rev -> sister;
+        if (a_for->r_cap) {
+          j = NEIGHBOR_NODE_REV(i, a_for -> shift);
+          if (!j->parent) {
+            j -> is_sink = 1;
+            j -> parent = a_for;
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+            set_active(j);
+          } else if (!j->is_sink) {
+            s_start = j;
+            t_start = i;
+            cap_middle     = & ( a_for -> r_cap );
+            rev_cap_middle = & ( a_for -> r_rev_cap );
+            break;
+          } else if (j->TS <= i->TS &&
+                     j->DIST > i->DIST) {
+            /* heuristic - trying to make the distance from j to the sink shorter */
+            j -> parent = a_for;
+            j -> TS = i -> TS;
+            j -> DIST = i -> DIST + 1;
+          }
+        }
+      }
+    }
+
+    TIME ++;
+
+    if (s_start) {
+      i -> next = i; /* set active flag */
+      current_node = i;
+
+      /* augmentation */
+      augment(s_start, t_start, cap_middle, rev_cap_middle);
+      /* augmentation end */
+
+      /* adoption */
+      while ( (np=orphan_first) ) {
+        np_next = np -> next;
+        np -> next = NULL;
+
+        while ( (np=orphan_first) ) {
+          orphan_first = np -> next;
+          i = np -> ptr;
+          nodeptr_block -> Delete(np);
+          if (!orphan_first) orphan_last = NULL;
+          if (i->is_sink) process_sink_orphan(i);
+          else            process_source_orphan(i);
+        }
+
+        orphan_first = np_next;
+      }
+      /* adoption end */
+    } else current_node = NULL;
+  }
+
+  delete nodeptr_block;
+
+  return flow;
+}
+
+/***********************************************************************/
+
+inline Graph::termtype Graph::what_segment(node_id i)
+{
+  if (((node*)i)->parent && !((node*)i)->is_sink) return SOURCE;
+  return SINK;
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/internal/boost/array_binary_tree.hpp b/3rdparty/CGAL-4.8/include/CGAL/internal/boost/array_binary_tree.hpp
new file mode 100644
index 0000000..6d12f5f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/internal/boost/array_binary_tree.hpp
@@ -0,0 +1,193 @@
+//
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+// $URL$
+// $Id$
+//
+// NOTE: this file have been taken from boost 1.46.1 for using
+//       with Modificable_priority_queue (to enhance the 
+//       non-documented mutable_queue).
+//       original file is <boost/graph/detail/array_binary_tree.hpp>
+//
+#ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
+#define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
+
+#include <iterator>
+#include <functional>
+#include <boost/config.hpp>
+
+namespace CGAL { namespace internal {
+namespace boost_ {
+
+/*
+ * Note: array_binary_tree is a completey balanced binary tree.
+ */
+#if !defined BOOST_NO_STD_ITERATOR_TRAITS
+  template <class RandomAccessIterator, class ID>
+#else
+  template <class RandomAccessIterator, class ValueType, class ID>
+#endif
+class array_binary_tree_node {
+public:
+  typedef array_binary_tree_node ArrayBinaryTreeNode;
+  typedef RandomAccessIterator rep_iterator;
+#if !defined BOOST_NO_STD_ITERATOR_TRAITS
+  typedef typename std::iterator_traits<RandomAccessIterator>::difference_type
+          difference_type;
+  typedef typename std::iterator_traits<RandomAccessIterator>::value_type
+          value_type;
+#else
+  typedef int difference_type;
+  typedef ValueType value_type;
+#endif
+  typedef difference_type size_type;
+
+  struct children_type {
+    struct iterator
+        : ::boost::iterator<std::forward_iterator_tag,
+            //JT: the iterator type is "forward" and not "bidirectional",
+            //because it does not implement unary operator--
+            ArrayBinaryTreeNode,
+            difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
+    { // replace with iterator_adaptor implementation -JGS
+
+      inline iterator() : i(0), n(0) { }
+      inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { }
+      inline iterator& operator=(const iterator& x) {
+        r = x.r; i = x.i; n = x.n;
+        /*egcs generate a warning*/
+        id = x.id;
+        return *this;
+      }
+      inline iterator(rep_iterator rr,
+                      size_type ii,
+                      size_type nn,
+                      const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
+      inline array_binary_tree_node operator*() {
+        return ArrayBinaryTreeNode(r, i, n, id); }
+      inline iterator& operator++() { ++i; return *this; }
+      inline iterator operator++(int)
+        { iterator t = *this; ++(*this); return t; }
+      inline bool operator==(const iterator& x) const { return i == x.i; }
+      inline bool operator!=(const iterator& x) const
+        { return !(*this == x); }
+      rep_iterator r;
+      size_type i;
+      size_type n;
+      ID id;
+    };
+    inline children_type() : i(0), n(0) { }
+    inline children_type(const children_type& x)
+      : r(x.r), i(x.i), n(x.n), id(x.id) { }
+    inline children_type& operator=(const children_type& x) {
+      r = x.r; i = x.i; n = x.n;
+      /*egcs generate a warning*/
+      id = x.id;
+      return *this;
+    }
+    inline children_type(rep_iterator rr,
+                         size_type ii,
+                         size_type nn,
+                         const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
+    inline iterator begin() { return iterator(r, 2 * i + 1, n, id); }
+    inline iterator end() { return iterator(r, 2 * i + 1 + size(), n, id); }
+    inline size_type size() const {
+      size_type c = 2 * i + 1;
+      size_type s;
+      if      (c + 1 < n) s = 2;
+      else if (c < n)     s = 1;
+      else                s = 0;
+      return s;
+    }
+    rep_iterator r;
+    size_type i;
+    size_type n;
+    ID id;
+  };
+  inline array_binary_tree_node() : i(0), n(0) { }
+  inline array_binary_tree_node(const array_binary_tree_node& x)
+    : r(x.r), i(x.i), n(x.n), id(x.id) { }
+  inline ArrayBinaryTreeNode& operator=(const ArrayBinaryTreeNode& x) {
+    r = x.r;
+    i = x.i;
+    n = x.n;
+    /*egcs generate a warning*/
+    id = x.id;
+    return *this;
+  }
+  inline array_binary_tree_node(rep_iterator start,
+                                rep_iterator end,
+                                rep_iterator pos, const ID& _id)
+    : r(start), i(pos - start), n(end - start), id(_id) { }
+  inline array_binary_tree_node(rep_iterator rr,
+                                size_type ii,
+                                size_type nn, const ID& _id)
+    : r(rr), i(ii), n(nn), id(_id) { }
+  inline value_type& value() { return *(r + i); }
+  inline const value_type& value() const { return *(r + i); }
+  inline ArrayBinaryTreeNode parent() const {
+    return ArrayBinaryTreeNode(r, (i - 1) / 2, n, id);
+  }
+  inline bool has_parent() const { return i != 0; }
+  inline children_type children() { return children_type(r, i, n, id); }
+  /*
+  inline void swap(array_binary_tree_node x) {
+    value_type tmp = x.value();
+    x.value() = value();
+    value() = tmp;
+    i = x.i;
+  }
+  */
+  template <class ExternalData>
+  inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) {
+    using ::boost::get;
+
+    value_type tmp = x.value();
+
+    /*swap external data*/
+    edata[ get(id, tmp) ]     = i;
+    edata[ get(id, value()) ] = x.i;
+
+    x.value() = value();
+    value() = tmp;
+    i = x.i;
+  }
+   inline const children_type children() const {
+    return children_type(r, i, n);
+  }
+  inline size_type index() const { return i; }
+  rep_iterator r;
+  size_type i;
+  size_type n;
+  ID id;
+};
+
+template <class RandomAccessContainer,
+       class Compare = std::less<typename RandomAccessContainer::value_type> >
+struct compare_array_node {
+  typedef typename RandomAccessContainer::value_type value_type;
+  compare_array_node(const Compare& x) : comp(x) {}
+  compare_array_node(const compare_array_node& x) : comp(x.comp) {}
+
+  template< class node_type >
+  inline bool operator()(const node_type& x, const node_type& y) {
+    return comp(x.value(), y.value());
+  }
+
+  template< class node_type >
+  inline bool operator()(const node_type& x, const node_type& y) const {
+    return comp(x.value(), y.value());
+  }
+  Compare comp;
+};
+
+} } } //namespace CGAL::internal::boost_
+
+#endif /* CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP */
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/boost/mutable_heap.hpp b/3rdparty/CGAL-4.8/include/CGAL/internal/boost/mutable_heap.hpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/boost/mutable_heap.hpp
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/boost/mutable_heap.hpp
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/boost/mutable_queue.hpp b/3rdparty/CGAL-4.8/include/CGAL/internal/boost/mutable_queue.hpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/boost/mutable_queue.hpp
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/boost/mutable_queue.hpp
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/boost/property_map.h b/3rdparty/CGAL-4.8/include/CGAL/internal/boost/property_map.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/boost/property_map.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/boost/property_map.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/bounded_priority_queue.h b/3rdparty/CGAL-4.8/include/CGAL/internal/bounded_priority_queue.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/bounded_priority_queue.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/bounded_priority_queue.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/container_fwd_fixed.hpp b/3rdparty/CGAL-4.8/include/CGAL/internal/container_fwd_fixed.hpp
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/container_fwd_fixed.hpp
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/container_fwd_fixed.hpp
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h b/3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Polyhedron_constness_types.h b/3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/Polyhedron_constness_types.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/Polyhedron_constness_types.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/Polyhedron_constness_types.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_coplanar_triangles_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_coplanar_triangles_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_coplanar_triangles_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_coplanar_triangles_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_triangle_segment_3.h b/3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_triangle_segment_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_triangle_segment_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_triangle_segment_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_triangle_segment_3_coplanar.h b/3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_triangle_segment_3_coplanar.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/corefinement/intersection_triangle_segment_3_coplanar.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/corefinement/intersection_triangle_segment_3_coplanar.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/deprecation_warning.h b/3rdparty/CGAL-4.8/include/CGAL/internal/deprecation_warning.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/deprecation_warning.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/deprecation_warning.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/internal/info_check.h b/3rdparty/CGAL-4.8/include/CGAL/internal/info_check.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/internal/info_check.h
rename to 3rdparty/CGAL-4.8/include/CGAL/internal/info_check.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/interpolation_functions.h b/3rdparty/CGAL-4.8/include/CGAL/interpolation_functions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/interpolation_functions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/interpolation_functions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_2.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_2_1.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_2_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_2_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_2_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_3.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersection_3_1.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_3_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersection_3_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersection_3_1.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3.h
new file mode 100644
index 0000000..c43f117
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3.h
@@ -0,0 +1,2108 @@
+// Copyright (c) 2010-2012 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_INTERSECTION_OF_POLYHEDRA_3_H
+#define CGAL_INTERSECTION_OF_POLYHEDRA_3_H
+
+#define CGAL_CMAP_DEPRECATED 1
+
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Cartesian_converter.h>
+#include <CGAL/box_intersection_d.h>
+#include <CGAL/Bbox_3.h>
+#include <CGAL/intersections.h>
+
+#include <boost/next_prior.hpp>
+#include <set>
+#include <vector>
+#include <list>
+#include <algorithm>
+#include <CGAL/tuple.h>
+#include <CGAL/iterator.h>
+
+#include <CGAL/Modifier_base.h>
+#include <CGAL/internal/corefinement/Polyhedron_constness_types.h>
+#include <CGAL/internal/corefinement/intersection_triangle_segment_3.h>
+#include <CGAL/internal/corefinement/intersection_coplanar_triangles_3.h>
+#include <CGAL/use.h>
+
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+#include <boost/foreach.hpp>
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+
+#ifdef CGAL_COREFINEMENT_DEBUG
+#warning look at CGAL/Mesh_3/Robust_intersection_traits.h and the statically filtered decision tree
+#endif
+
+namespace CGAL{
+
+//This functor computes the pairwise intersection of polyhedral surfaces.
+//Intersection are given as a set of polylines
+//The algorithm works as follow:
+//From each polyhedral surface we can get it as a set of segments or as a set of triangles.
+//We first use Box_intersection_d to filter intersection between all polyhedral
+//surface segments and polyhedral triangles.
+//From this filtered set, for each pair (segment,triangle), we look at the
+//intersection type. If not empty, we can have three different cases
+//  1)the segment intersect the interior of the triangle:
+//        We compute the intersection point and for each triangle incident
+//        to the segment, we write the fact that the point belong to the intersection
+//        of these two triangles.
+//  2)the segment intersect the triangle on an edge
+//        We do the same thing as described above but
+//        for all triangle incident to the edge intersected
+//  3)the segment intersect the triangle at a vertex
+//        for each edge incident to the vertex, we do
+//        the same operations as in 2)
+//
+//In case the segment intersect the triangle at one of the segment endpoint,  
+//we repeat the same procedure for each segment incident to this
+//endpoint.
+//
+//Note that given a pair (segment,triangle)=(S,T), if S belongs 
+//to the plane of T, we have nothing to do in the following cases:
+//  -- no triangle T' contains S such that T and T' are coplanar
+//  -- at least one triangle contains S
+// Indeed, the intersection points of S and T will be found using segments
+// of T or segments adjacent to S.
+//
+// -- Sebastien Loriot, 2010/04/07
+
+namespace internal_IOP {
+  //an enum do decide which kind of intersection points are needed
+  struct No_predicates_on_constructions{};
+  struct Predicates_on_constructions{};
+} // namespace internal_IOP
+
+template<class Polyhedron>
+struct Empty_node_visitor{
+  typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle;
+  void new_node_added(int,internal_IOP::Intersection_type,Halfedge_handle,Halfedge_handle,bool,bool){}
+  template<class Iterator>
+  void annotate_graph(Iterator,Iterator){}
+  void update_terminal_nodes(std::vector<bool>&){}
+  void set_number_of_intersection_points_from_coplanar_facets(int){};
+  void add_filtered_intersection(Halfedge_handle,Halfedge_handle,const Polyhedron&,const Polyhedron&){}
+  void start_new_polyline(int,int){}
+  void add_node_to_polyline(int){}
+  void new_input_polyhedron(const Polyhedron&){}
+  template<class T>
+  void finalize(T&){}
+  typedef internal_IOP::No_predicates_on_constructions Node_storage_type;
+  typedef Tag_true Is_polyhedron_const;
+  static const bool do_need_vertex_graph = false;
+};
+
+namespace internal_IOP{
+  
+template <class Polyhedron,class Is_const>
+struct Compare_handles{
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge_handle   Halfedge_handle;
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge          Halfedge;
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Vertex            Vertex;
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet             Facet;
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet_handle      Facet_handle;
+  typedef std::pair<const Vertex*,const Vertex*>                            Vertex_handle_pair;
+  
+  static inline Vertex_handle_pair 
+  make_sorted_pair_of_vertices(Halfedge_handle h) {
+    const Vertex* v1=&(* h->vertex() );
+    const Vertex* v2=&(* h->opposite()->vertex() );
+    if ( v1 < v2 )
+      return Vertex_handle_pair(v1,v2);
+    return Vertex_handle_pair(v2,v1);
+  }
+  
+  bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
+    Vertex_handle_pair p1=make_sorted_pair_of_vertices(h1);
+    Vertex_handle_pair p2=make_sorted_pair_of_vertices(h2);
+    return  p1 < p2; 
+  }
+  
+  bool operator()(Facet_handle f1,Facet_handle f2) const {
+    return &(*f1) < &(*f2);
+  }
+  
+  bool operator()(const std::pair<Halfedge_handle,Polyhedron*>& p1, const std::pair<Halfedge_handle,Polyhedron*>& p2) const{
+    Halfedge* h1= (std::min) ( &(*(p1.first)), &(*(p1.first->opposite())) );
+    Halfedge* h2= (std::min) ( &(*(p2.first)), &(*(p2.first->opposite())) );
+    return h1<h2;
+  }
+};
+
+//could not put it in the above struct (gcc complains about an ambiguous call)
+template <class Polyhedron,class Is_const>
+struct Compare_handle_pairs{
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet             Facet;
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Facet_handle      Facet_handle;  
+  typedef std::pair<Facet_handle,Facet_handle>                              Facet_pair;
+  typedef std::pair<Facet_pair,int>                                         Facet_pair_and_int;
+  
+  bool operator()(const Facet_pair& p1, const Facet_pair& p2) const{
+    Facet* f1=&(*p1.first);
+    Facet* f2=&(*p2.first);
+    if (f1==f2){
+      f1=&(*p1.second);
+      f2=&(*p2.second);
+    }
+    return f1<f2;
+  }
+
+  bool operator()(const Facet_pair_and_int& p1, const Facet_pair_and_int& p2) const{
+    Facet* f1=&(*p1.first.first);
+    Facet* f2=&(*p2.first.first);
+    if (f1==f2){
+      f1=&(*p1.first.second);
+      f2=&(*p2.first.second);
+    }
+    if (f1<f2) return true;
+    if (f1>f2) return false;
+    return p1.second<p2.second;
+  }
+};
+
+template<class Polyhedron,class Nodes_vector,class Is_const>
+struct Order_along_a_halfedge{
+  typedef typename Polyhedron_types<Polyhedron,Is_const>::Halfedge_handle Halfedge_handle;
+  const Nodes_vector& nodes;
+  Halfedge_handle hedge;
+  
+  Order_along_a_halfedge(Halfedge_handle hedge_,const Nodes_vector& nodes_):nodes(nodes_),hedge(hedge_){}
+  bool operator()(int i,int j) const {
+    //returns true, iff q lies strictly between p and r.
+    typename Nodes_vector::Protector p;
+    try{
+      CGAL::internal::use(p);
+
+      return CGAL::collinear_are_strictly_ordered_along_line(nodes.to_interval(hedge->vertex()->point()),
+                                                             nodes.interval_node(j),
+                                                             nodes.interval_node(i));
+    }
+    catch(CGAL::Uncertain_conversion_exception&){
+      return CGAL::collinear_are_strictly_ordered_along_line(nodes.to_exact(hedge->vertex()->point()),
+                                                             nodes.exact_node(j),
+                                                             nodes.exact_node(i));      
+    }
+  }
+};
+
+
+template <class HDS>
+class Split_halfedge_at_point : public CGAL::Modifier_base<HDS> {
+  typedef typename HDS::Halfedge_handle Halfedge_handle;
+  typedef typename HDS::Vertex_handle   Vertex_handle;
+  typedef typename HDS::Vertex          Vertex;
+  Halfedge_handle hedge;
+  Vertex          vertex;
+  
+  typename HDS::Halfedge::Base*
+  unlock_halfedge(Halfedge_handle h){
+    return static_cast<typename HDS::Halfedge::Base*>(&(*h));
+  }
+  
+public:
+  
+  template <class Point_3>
+  Split_halfedge_at_point( Halfedge_handle h,const Point_3& point):hedge(h),vertex(point){}
+
+  //   new_hedge    hedge
+  //  ----------->   ----------->
+  //               v
+  //  <-----------   <-----------
+  //   new_opposite     opposite 
+  //  
+  void operator()( HDS& hds) {
+    
+    Vertex_handle v=hds.vertices_push_back(vertex);
+    Halfedge_handle opposite=hedge->opposite();
+    
+    Halfedge_handle new_hedge=hds.edges_push_back(*hedge);
+    Halfedge_handle new_opposite=new_hedge->opposite();
+    
+    //update next relations
+    unlock_halfedge(new_hedge)->set_next(hedge);
+    unlock_halfedge(new_hedge->prev())->set_next(new_hedge);
+    unlock_halfedge(hedge)->set_prev(new_hedge);
+
+    unlock_halfedge(opposite)->set_next(new_opposite);
+    unlock_halfedge(new_opposite)->set_prev(opposite);    
+    unlock_halfedge(new_opposite->next())->set_prev(new_opposite);
+
+    unlock_halfedge(opposite)->set_vertex(v);
+    unlock_halfedge(new_hedge)->set_vertex(v);
+
+    v->set_halfedge(new_hedge);
+    new_opposite->vertex()->set_halfedge(new_opposite);
+  }
+};
+
+
+
+} //namespace internal_IOP
+
+
+
+//WARNING THIS IS DONE ONLY FOR POLYHEDRON
+template<class Polyhedron,class Halfedge_predicate,
+         class Set_vertex_corner, class Kernel=typename Polyhedron::Traits::Kernel>
+class Node_visitor_for_polyline_split{
+//typedefs  
+  typedef typename Polyhedron::Halfedge_handle                         Halfedge_handle;
+  typedef typename Polyhedron::Halfedge                                Halfedge;
+  typedef typename Polyhedron::Vertex_handle                           Vertex_handle;
+  //Info stores information about a particular intersection on an
+  //edge or a vertex of a polyhedron. The two first elements in 
+  //the template describe the intersected simplex of the considered 
+  //polyhedron; the two last elements describe the element of the 
+  //second polyhedron (can be either a vertex, an edge of a facet)
+  //involved in the intersection
+  typedef CGAL::cpp11::tuple<internal_IOP::Intersection_type,
+                             Halfedge_handle,
+                             internal_IOP::Intersection_type,
+                             Halfedge_handle>                          Info;
+  typedef std::map<Halfedge*,Polyhedron*>                              Hedge_to_polyhedron_map;
+  typedef std::vector<Info>                                            Infos;
+  typedef std::map<int,Infos >                                         Node_to_infos_map;
+//data members
+  Node_to_infos_map   node_infos;
+  Hedge_to_polyhedron_map hedge_to_polyhedron;
+  Halfedge_predicate is_on_polyline;
+  Set_vertex_corner set_as_corner;
+//functions  
+  void handle_principal_edge(int node_id,
+                             internal_IOP::Intersection_type type,
+                             Halfedge_handle principal_edge,
+                             Halfedge_handle additional_edge,
+                             bool is_vertex_coplanar,
+                             bool is_vertex_opposite_coplanar)
+  {
+    bool coplanar_v=false;
+    if (is_vertex_coplanar) coplanar_v=true;
+    else if (is_vertex_opposite_coplanar){
+      principal_edge=principal_edge->opposite();
+      coplanar_v=true;
+    }
+    
+    if (coplanar_v)
+      handle_on_vertex(node_id,principal_edge,type,additional_edge);
+    else{
+      if ( is_on_polyline(principal_edge) ){
+        typename Node_to_infos_map::iterator it_res=
+          node_infos.insert(std::make_pair(node_id,Infos())).first; 
+          it_res->second.push_back( Info(internal_IOP::EDGE,principal_edge,type,additional_edge) );
+      }
+    }
+  }
+  
+  void handle_on_vertex(int node_id,Halfedge_handle edge,internal_IOP::Intersection_type type,Halfedge_handle additional_edge){
+    Halfedge_handle current=edge;
+    do{
+      if (is_on_polyline(current)){
+        typename Node_to_infos_map::iterator it_res=
+          node_infos.insert(std::make_pair(node_id,Infos())).first; 
+          it_res->second.push_back( Info(internal_IOP::VERTEX,current,type,additional_edge) );        
+        break;
+      }
+      current=current->next()->opposite();
+    }
+    while(current!=edge);    
+  }
+  
+  Halfedge* make_unique_key(Halfedge_handle h){
+    if (&(*h) < &(*h->opposite()))
+      return &(*h);
+    else
+      return &(*h->opposite());
+  }
+  
+  //   new_hedge    hedge
+  //  ----------->   ----------->
+  //               v
+  //  <-----------   <-----------
+  //   new_opposite     opposite 
+  //  
+  void split_edge_and_retriangulate(Halfedge_handle hedge,const typename Kernel::Point_3& point,Polyhedron& P){
+    internal_IOP::Split_halfedge_at_point<typename Polyhedron::HalfedgeDS> delegated(hedge,point);
+    P.delegate( delegated );
+    CGAL_assertion(P.is_valid());
+    //triangulate the two adjacent facets
+    if (!hedge->is_border())
+      P.split_facet(hedge->prev(),hedge->next());
+    if (!hedge->opposite()->is_border())
+      P.split_facet(hedge->opposite(),hedge->opposite()->next()->next());
+    CGAL_assertion(P.is_valid());
+  }
+
+  //sort node ids so that we can split the hedge
+  //consecutively
+  template <class Nodes_vector>
+  void sort_vertices_along_hedge(std::vector<int>& node_ids,Halfedge_handle hedge,const Nodes_vector& nodes)
+  {
+    std::sort(node_ids.begin(),
+              node_ids.end(),
+              internal_IOP::Order_along_a_halfedge<Polyhedron,Nodes_vector,Is_polyhedron_const>(hedge,nodes)
+    );
+  }
+  
+public:
+  static const bool do_need_vertex_graph = false;  
+  typedef internal_IOP::Predicates_on_constructions  Node_storage_type;  
+  typedef Tag_false Is_polyhedron_const;
+
+  Node_visitor_for_polyline_split(){}
+  Node_visitor_for_polyline_split(const Halfedge_predicate& getting,
+                                  const Set_vertex_corner& setting)
+    :is_on_polyline(getting),set_as_corner(setting){}
+
+  void new_node_added(int node_id,
+                      internal_IOP::Intersection_type type,
+                      Halfedge_handle principal_edge,
+                      Halfedge_handle additional_edge,
+                      bool is_vertex_coplanar,
+                      bool is_vertex_opposite_coplanar)
+  {
+    switch(type)
+    {
+      case internal_IOP::FACET: //Facet intersected by an edge
+        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
+        break;
+      case internal_IOP::EDGE: //Edge intersected by an edge
+        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
+        if ( is_on_polyline(additional_edge) ){
+          typename Node_to_infos_map::iterator it_res=
+            node_infos.insert(std::make_pair(node_id,Infos())).first; 
+            it_res->second.push_back( Info(type,additional_edge,
+                                           ( is_vertex_coplanar||is_vertex_opposite_coplanar ) ? internal_IOP::VERTEX:internal_IOP::EDGE,
+                                           is_vertex_opposite_coplanar?principal_edge->opposite():principal_edge) );
+        }
+        break;
+      case internal_IOP::VERTEX://Vertex intersected by an edge
+        handle_principal_edge(node_id,type,principal_edge,additional_edge,is_vertex_coplanar,is_vertex_opposite_coplanar);
+        handle_on_vertex( node_id,additional_edge,
+                          ( is_vertex_coplanar||is_vertex_opposite_coplanar ) ? internal_IOP::VERTEX:internal_IOP::EDGE,
+                          is_vertex_opposite_coplanar?principal_edge->opposite():principal_edge);
+        break;
+      default:
+        break;
+    }
+  }
+  
+  template<class Iterator>
+  void annotate_graph(Iterator begin,Iterator end){
+    for(Iterator it=begin;it!=end;++it){
+      typename Node_to_infos_map::iterator it_res=node_infos.find(it->first);
+      if (it_res!=node_infos.end())
+        it->second.make_terminal();
+    }
+  }
+  
+  void update_terminal_nodes(std::vector<bool>& terminal_bools){
+    for (typename Node_to_infos_map::iterator it=node_infos.begin();it!=node_infos.end();++it){
+      terminal_bools[it->first]=true;
+    }
+  }
+  
+  void new_input_polyhedron(const Polyhedron&){}
+  void start_new_polyline(int,int){}
+  void add_node_to_polyline(int){}
+  void set_number_of_intersection_points_from_coplanar_facets(int){}
+  
+  void add_filtered_intersection(Halfedge_handle eh,Halfedge_handle fh,Polyhedron& Pe,Polyhedron& Pf){
+    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(eh),&Pe));
+    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh),&Pf));
+    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh->next()),&Pf));
+    hedge_to_polyhedron.insert(std::make_pair(make_unique_key(fh->next()->next()),&Pf));
+  }
+    
+  //split_halfedges
+  template <class Nodes_vector>
+  void finalize(const Nodes_vector& nodes){
+    typedef std::map<std::pair<Halfedge_handle,Polyhedron*>,
+                     std::vector<int>,internal_IOP::Compare_handles<Polyhedron,Is_polyhedron_const> >  Halfedges_to_split;
+    
+    Halfedges_to_split halfedges_to_split;
+    
+    for (typename Node_to_infos_map::iterator it=node_infos.begin();it!=node_infos.end();++it){
+      int node_id=it->first;
+      const Infos& infos=it->second;
+      std::map<Polyhedron*,std::vector<Halfedge_handle> > hedges_to_split;
+      
+      //collect information about halfedge to split
+      typename Infos::const_iterator it_info=infos.begin();
+      for (;it_info!=infos.end();++it_info)
+      {
+        typename Hedge_to_polyhedron_map::iterator  it_poly=
+          hedge_to_polyhedron.find(make_unique_key(CGAL::cpp11::get<1>(*it_info)));
+        CGAL_assertion(it_poly!=hedge_to_polyhedron.end());
+        //associate information to an intersection point:
+        //we give which simplex of the other polyhedron intersect the simplex considered
+        set_as_corner.add_info_to_node(node_id,it_poly->second,*it_info);
+        switch(CGAL::cpp11::get<0>(*it_info))
+        {
+          case internal_IOP::EDGE:
+          {
+            halfedges_to_split.insert(
+              std::make_pair( std::make_pair(CGAL::cpp11::get<1>(*it_info),&(*(it_poly->second))),std::vector<int>() )
+            ).first->second.push_back(node_id);
+          break;
+          }
+          case internal_IOP::VERTEX:
+            set_as_corner(CGAL::cpp11::get<1>(*it_info)->vertex(),node_id,it_poly->second);
+          break;
+          default:
+            CGAL_assertion(false);
+            //should never be here
+        }
+      }
+    }
+    
+    
+    //do the split
+    for(typename Halfedges_to_split::iterator it=halfedges_to_split.begin();it!=halfedges_to_split.end();++it){
+      Halfedge_handle hedge=it->first.first;
+      Polyhedron* P=it->first.second;
+      std::vector<int>& node_ids=it->second;
+      
+      sort_vertices_along_hedge(node_ids,hedge,nodes);
+      for (std::vector<int>::iterator it_id=node_ids.begin();it_id!=node_ids.end();++it_id){
+        split_edge_and_retriangulate(hedge,nodes[*it_id],*P);
+        set_as_corner(hedge->opposite()->vertex(),*it_id,(Polyhedron*)(0));
+      }
+    }
+  }
+};
+
+
+namespace internal_IOP{
+  
+  template <class Polyhedron,class In_kernel,class Exact_kernel>
+  typename Exact_kernel::Point_3
+  compute_triangle_segment_intersection_point(
+    typename Polyhedron::Vertex_const_handle vh1,typename Polyhedron::Vertex_const_handle vh2,
+    typename Polyhedron::Vertex_const_handle vf1,typename Polyhedron::Vertex_const_handle vf2,typename Polyhedron::Vertex_const_handle vf3,
+    const Exact_kernel& ek)       
+  {
+    CGAL::Cartesian_converter<In_kernel,Exact_kernel> to_exact;
+    typename Exact_kernel::Triangle_3 t(to_exact( vf1->point() ),
+                                        to_exact( vf2->point() ),
+                                        to_exact( vf3->point() )
+    );
+    
+    typename Exact_kernel::Segment_3 s (to_exact( vh1->point() ),
+                                        to_exact( vh2->point() )
+    );
+    
+    typename Exact_kernel::Intersect_3 exact_intersect=ek.intersect_3_object();
+    CGAL::Object inter=exact_intersect(t,s);
+    CGAL_assertion(CGAL::do_intersect(t,s));
+    const typename Exact_kernel::Point_3* e_pt=CGAL::object_cast<typename Exact_kernel::Point_3>(&inter);
+    CGAL_assertion(e_pt!=NULL);
+    return *e_pt;
+  }
+  
+  template <class Polyhedron,class In_kernel,class Exact_kernel>
+  typename Exact_kernel::Point_3
+  compute_triangle_segment_intersection_point(
+    typename Polyhedron::Halfedge_const_handle edge,
+    typename Polyhedron::Facet_const_handle facet,
+    const Exact_kernel& ek) 
+  {
+    return compute_triangle_segment_intersection_point<Polyhedron,In_kernel,Exact_kernel>(
+            edge->vertex(),edge->opposite()->vertex(),
+            facet->halfedge()->vertex(),facet->halfedge()->next()->vertex(),facet->halfedge()->opposite()->vertex(),
+            ek);
+            
+  }    
+    
+  
+  //A class containing a vector of the intersection points.
+  //The third template parameter indicates whether an
+  //exact representation is required
+  template <class Polyhedron,class Kernel,class Node_storage,bool Has_exact_constructions=!boost::is_floating_point<typename Kernel::FT>::value>
+  class Triangle_segment_intersection_points;
+  
+  
+  //Store only the double version of the intersection points.
+  template <class Polyhedron,class Kernel>
+  class Triangle_segment_intersection_points<Polyhedron,Kernel,No_predicates_on_constructions,false>
+  {
+  //typedefs
+    typedef std::vector <typename Kernel::Point_3>             Nodes_vector;
+    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
+    typedef typename Polyhedron::Facet_const_handle            Facet_handle;
+    typedef CGAL::Exact_predicates_exact_constructions_kernel  Exact_kernel;
+    typedef CGAL::Cartesian_converter<Exact_kernel,Kernel>     Exact_to_double;    
+  //members
+    Nodes_vector nodes;
+    Exact_kernel ek;
+    Exact_to_double exact_to_double;
+  public:
+    typedef CGAL::Interval_nt<true>::Protector                 Protector;
+  
+    const typename Kernel::Point_3&
+    operator[](int i) const {
+      return nodes[i];
+    }
+    
+    const typename Kernel::Point_3& exact_node(int i) const {return nodes[i];}
+    const typename Kernel::Point_3& interval_node(int i) const {return nodes[i];}
+    const typename Kernel::Point_3& to_exact(const typename Kernel::Point_3& p) const {return p;}
+    const typename Kernel::Point_3& to_interval(const typename Kernel::Point_3& p) const {return p;}
+    
+    size_t size() const {return nodes.size();}
+    
+    void add_new_node(const typename Exact_kernel::Point_3& p)
+    {
+      nodes.push_back(  exact_to_double(p) );
+    }
+
+    //add a new node in the final graph.
+    //it is the intersection of the triangle with the segment
+    void add_new_node(Halfedge_handle edge,Facet_handle facet)
+    {
+      add_new_node(
+        compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,ek)
+      );
+    }
+
+
+    void add_new_node(const typename Kernel::Point_3& p)
+    {
+      nodes.push_back(p);
+    }    
+  }; // end specialization
+     // Triangle_segment_intersection_points<Polyhedron,Kernel,No_predicates_on_constructions,false>
+
+
+  //second specializations: store an exact copy of the points so that we can answer exactly predicates
+  //FYI, it used to have two specializations (one in the case the polyhedron
+  //can be edited and on if it cannot) building exact representation on demand.
+  //In the former case, we were using facet and halfedge while in the latter
+  //triple of vertex_handle and pair of vertex_handle
+  template <class Polyhedron,class Kernel>
+  class Triangle_segment_intersection_points<Polyhedron,Kernel,Predicates_on_constructions,false>
+  {
+  //typedefs
+  public: 
+    typedef CGAL::Simple_cartesian<CGAL::Interval_nt<false> >  Ikernel;
+    typedef CGAL::Exact_predicates_exact_constructions_kernel  Exact_kernel;
+  private:
+    typedef CGAL::Cartesian_converter<Ikernel,Kernel>          Interval_to_double;
+    typedef CGAL::Cartesian_converter<Kernel,Ikernel>          Double_to_interval;
+    typedef CGAL::Cartesian_converter<Exact_kernel,Ikernel>    Exact_to_interval;
+    typedef CGAL::Cartesian_converter<Kernel,Exact_kernel>     Double_to_exact;
+  
+    typedef typename Polyhedron::Vertex_const_handle           Vertex_handle;
+    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
+    typedef typename Polyhedron::Facet_const_handle            Facet_handle; 
+    
+    typedef std::vector <Ikernel::Point_3>      Interval_nodes;
+    typedef std::vector <Exact_kernel::Point_3> Exact_nodes;
+ 
+        
+  //members
+    Interval_nodes  inodes;
+    Exact_nodes enodes;
+  
+    Interval_to_double  interval_to_double;
+    Exact_to_interval   exact_to_interval;
+    Double_to_interval  double_to_interval;
+    Double_to_exact double_to_exact;
+    Exact_kernel        ek;
+    
+  public:
+    typedef CGAL::Interval_nt<false>::Protector                 Protector;  
+  
+    typename Kernel::Point_3
+    operator[](int i) const {
+      return interval_to_double(inodes[i]);
+    }
+    
+    const typename Ikernel::Point_3&
+    interval_node(int i) const {
+      return inodes[i];
+    }
+    
+    typename Ikernel::Point_3
+    to_interval(const typename Kernel::Point_3& p) const {
+      return double_to_interval(p);
+    }
+    
+    const Exact_kernel::Point_3
+    exact_node(int i) const {
+      return enodes[i];
+    }
+
+    typename Exact_kernel::Point_3
+    to_exact(const typename Kernel::Point_3& p) const {
+      return double_to_exact(p);
+    }    
+    
+    
+    size_t size() const {return enodes.size();}
+
+    void add_new_node(const Exact_kernel::Point_3& p){
+      const Ikernel::Point_3& p_approx=p.approx();
+      if ( !has_smaller_relative_precision(p_approx.x(),Lazy_exact_nt<typename Exact_kernel::FT>::get_relative_precision_of_to_double()) ||
+           !has_smaller_relative_precision(p_approx.y(),Lazy_exact_nt<typename Exact_kernel::FT>::get_relative_precision_of_to_double()) ||
+           !has_smaller_relative_precision(p_approx.z(),Lazy_exact_nt<typename Exact_kernel::FT>::get_relative_precision_of_to_double()) ) p.exact();
+      enodes.push_back(p);
+      inodes.push_back( exact_to_interval(p) );
+    }
+
+    void add_new_node(Halfedge_handle edge,Facet_handle facet)
+    {
+      add_new_node(compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,ek) );
+    }
+
+    //the point is an input
+    void add_new_node(const typename Kernel::Point_3& p){
+      enodes.push_back(to_exact(p));
+      inodes.push_back( double_to_interval(p) );
+    }
+  }; // end specialization
+     // Triangle_segment_intersection_points<Polyhedron,Kernel,Predicates_on_constructions,false>
+  
+  //Third specialization: The kernel already has exact constructions.
+  template <class Polyhedron,class Kernel,class Node_storage>
+  class Triangle_segment_intersection_points<Polyhedron,Kernel,Node_storage,true>
+  {
+  //typedefs
+    typedef std::vector <typename Kernel::Point_3>             Nodes_vector;
+    typedef typename Polyhedron::Halfedge_const_handle         Halfedge_handle;
+    typedef typename Polyhedron::Facet_const_handle            Facet_handle;
+  //members
+    Nodes_vector nodes;
+    Kernel k;
+  public:
+    typedef Kernel Ikernel;
+    typedef Kernel Exact_kernel;
+    typedef void* Protector;
+    const typename Kernel::Point_3&
+    operator[](int i) const {
+      return nodes[i];
+    }
+   
+    size_t size() const {return nodes.size();}
+    const typename Kernel::Point_3& exact_node(int i) const {return nodes[i];}
+    const typename Kernel::Point_3& interval_node(int i) const {return nodes[i];}
+    
+    //add a new node in the final graph.
+    //it is the intersection of the triangle with the segment
+    void add_new_node(Halfedge_handle edge,Facet_handle facet)
+    {
+      nodes.push_back (  
+        compute_triangle_segment_intersection_point<Polyhedron,Kernel>(edge,facet,k)
+      );
+    }
+
+    void add_new_node(const typename Kernel::Point_3& p)
+    {
+      nodes.push_back(p);
+    }
+    
+    const typename Kernel::Point_3& to_interval(const typename Kernel::Point_3& p) const { return p; }
+    const typename Kernel::Point_3& to_exact(const typename Kernel::Point_3& p) const { return p; }
+
+  }; // end specialization
+     // Triangle_segment_intersection_points<Polyhedron,Kernel,Node_storage,true>
+  
+}
+
+#ifdef CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS
+struct Intersection_of_Polyhedra_3_self_intersection_exception
+  : public std::logic_error
+  {
+    Intersection_of_Polyhedra_3_self_intersection_exception()
+      : std::logic_error("Self-intersection found in the facets involved in the intersection")
+    {}
+  };
+#endif
+
+//TODO an important requirement is that the Polyhedron should be based on a list-based
+//HDS. We use a lot of maps that use the address of Facet,Halfedge and a reallocation would
+//be dramatic.
+
+template< class Polyhedron,
+          class Kernel=typename Polyhedron::Traits::Kernel,
+          class Node_visitor=Empty_node_visitor<Polyhedron>,
+          class Node_storage_type=typename Node_visitor::Node_storage_type,
+          class Use_const_polyhedron=typename Node_visitor::Is_polyhedron_const
+         >
+class Intersection_of_Polyhedra_3{
+
+//typedefs  
+  typedef typename Kernel::Triangle_3                        Triangle;
+  typedef typename Kernel::Segment_3                         Segment;
+  typedef internal_IOP::
+    Polyhedron_types<Polyhedron,Use_const_polyhedron>        Polyhedron_types;
+  
+  typedef typename Polyhedron_types::Polyhedron_ref          Polyhedron_ref;
+  typedef typename Polyhedron_types::Halfedge_handle         Halfedge_handle;
+  typedef typename Polyhedron_types::Halfedge_iterator       Halfedge_iterator;
+  typedef typename Polyhedron_types::Facet_iterator          Facet_iterator;
+  typedef typename Polyhedron_types::Facet_handle            Facet_handle;
+  typedef typename Polyhedron_types::Vertex_handle           Vertex_handle;
+  typedef typename Polyhedron_types::Vertex                  Vertex;
+  typedef typename Polyhedron_types::Facet                   Facet;
+  typedef CGAL::Box_intersection_d::Box_with_handle_d<
+            double, 3, Halfedge_handle>                      Box;
+  typedef std::pair<Facet_handle,Facet_handle>               Facet_pair;
+  typedef std::pair<Facet_pair,int>                          Facet_pair_and_int;
+  
+  typedef internal_IOP::
+            Compare_handles<Polyhedron,Use_const_polyhedron> Compare_handles;
+
+  typedef internal_IOP::
+       Compare_handle_pairs<Polyhedron,Use_const_polyhedron> Compare_handle_pairs;
+  
+
+  typedef std::map<Facet_pair_and_int,                                           //we use Facet_pair_and_int and not Facet_pair to handle coplanar case.
+                   std::set<int>,Compare_handle_pairs>       Facets_to_nodes_map;//Indeed the boundary of the intersection of two coplanar triangles may contain several segments.
+  typedef std::set<Facet_pair,Compare_handle_pairs>          Coplanar_facets_set;//any insertion should be done with make_sorted_pair_of_facets
+  typedef typename Kernel::Point_3                           Node;
+  typedef internal_IOP::Triangle_segment_intersection_points
+            <Polyhedron,Kernel,Node_storage_type>            Nodes_vector;
+
+  typedef typename internal_IOP::
+    Intersection_types<Polyhedron,Use_const_polyhedron>
+      ::Intersection_result                                  Intersection_result;
+
+  typedef std::set<Facet_handle,Compare_handles>             Facet_set;
+
+  typedef std::map
+            <Halfedge_handle,Facet_set,Compare_handles>      Edge_to_intersected_facets;
+  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  typedef std::set<Facet_pair,Compare_handle_pairs>          Coplanar_duplicated_intersection_set;
+  #endif
+//helper functions
+  static inline Facet_pair 
+  make_sorted_pair_of_facets(Facet_handle fh1,Facet_handle fh2) {
+    const Facet* f1=&(*fh1);
+    const Facet* f2=&(*fh2);
+    if (f1 < f2)
+      return Facet_pair(fh1,fh2);
+    return Facet_pair(fh2,fh1);
+  }
+
+  static inline Facet_pair_and_int
+  make_sorted_pair_of_facets_with_int(Facet_handle fh1,Facet_handle fh2,int i) {
+    return std::make_pair(make_sorted_pair_of_facets(fh1,fh2),i);
+  }
+
+  static inline std::pair<void*,void*> make_sorted_void_pair(void* v1,void* v2){
+    if (v1<v2) return std::make_pair(v1,v2);
+    return std::make_pair(v2,v1);
+  }
+
+  static inline Halfedge_handle smaller_handle(Halfedge_handle h){
+    if ( &(*h)<&(*h->opposite()) ) return h;
+    return h->opposite();
+  }
+  
+//member variables
+  Edge_to_intersected_facets  edge_to_sfacet; //Associate a segment to a filtered set of facets that may be intersected
+  Facets_to_nodes_map         f_to_node;      //Associate a pair of triangle to their intersection points
+  Coplanar_facets_set         coplanar_facets;//Contains all pairs of triangular facets intersecting that are coplanar
+  Nodes_vector                nodes;          //Contains intersection points of polyhedra
+  Node_visitor*               visitor;
+  bool                        is_default_visitor; //indicates whether the visitor need to be deleted
+  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  //this does not occur only when one extremity of an edge is inside a face.
+  // The problem occur every time an edge or a part of an edge with two incident triangles
+  // is on the intersection polyline, I choose to direcly filter the output by removing duplicated edges
+  Coplanar_duplicated_intersection_set coplanar_duplicated_intersection;//Set containing edges that are duplicated because of edges (partially) included in a triangle
+  #endif
+  
+//functions that should come from a traits class
+  bool has_at_least_two_incident_faces(Halfedge_handle edge)
+  {
+    return !edge->is_border_edge();
+  }
+  
+  template <class Output_iterator>
+  void get_incident_facets(Halfedge_handle edge,Output_iterator out){
+    if (!edge->is_border()) *out++=edge->facet();
+    if (!edge->opposite()->is_border()) *out++=edge->opposite()->facet();
+  }
+
+  template <class Output_iterator>
+  void get_incident_edges_to_vertex(Halfedge_handle edge,Output_iterator out){
+    Halfedge_handle current=edge;
+    do{
+      *out++=current;
+      current=current->next()->opposite();
+    }
+    while(current!=edge);
+  }
+
+//internal functions
+  
+  class Map_edge_facet_bbox_intersection {
+    Edge_to_intersected_facets& edge_to_sfacet;
+    Polyhedron_ref polyhedron_triangle;
+    Polyhedron_ref polyhedron_edge;
+    Node_visitor& visitor;
+  public:
+    Map_edge_facet_bbox_intersection(Edge_to_intersected_facets& map_,
+                                     Polyhedron_ref  P,
+                                     Polyhedron_ref Q,
+                                     Node_visitor& visitor_)
+      :edge_to_sfacet(map_),polyhedron_triangle(P),polyhedron_edge(Q),visitor(visitor_){}
+
+    void operator()( const Box* fb, const Box* eb) const {
+      Halfedge_handle fh = fb->handle();
+      Halfedge_handle eh = eb->handle();
+
+      // The following call to map::insert() attempts an insertion of a pair
+      // into 'edge_to_sfacet'. If 'eh' is already inserted in the map,
+      // then the result 'res' is the current entry in the map for 'eh'.
+      typename Edge_to_intersected_facets::iterator res=
+        edge_to_sfacet.insert(std::make_pair(eh,Facet_set())).first;
+
+      res->second.insert(fh->facet());
+      // That could have been shortened to:
+      //
+      //       edge_to_sfacet[eh].insert(fh->facet())
+      //
+      // -- Laurent Rineau, 2012/11/01
+
+      visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
+    }
+  };
+
+  class Map_edge_facet_bbox_intersection_extract_coplanar {
+    Edge_to_intersected_facets& edge_to_sfacet;
+    Coplanar_facets_set& coplanar_facets;
+    Polyhedron_ref polyhedron_triangle;
+    Polyhedron_ref polyhedron_edge;
+    Node_visitor& visitor;
+  public:
+    Map_edge_facet_bbox_intersection_extract_coplanar(
+      Edge_to_intersected_facets& map_,
+      Coplanar_facets_set& coplanar_facets_,
+      Polyhedron_ref  P,
+      Polyhedron_ref Q,
+      Node_visitor& visitor_)
+      :edge_to_sfacet(map_),coplanar_facets(coplanar_facets_),polyhedron_triangle(P),polyhedron_edge(Q),visitor(visitor_)
+    {}
+
+    void operator()( const Box* fb, const Box* eb) const {
+      Halfedge_handle fh = fb->handle(); //handle for the face
+      Halfedge_handle eh = eb->handle(); //handle for the edge
+      if(eh->is_border()) eh = eh->opposite();
+      CGAL_assertion(!eh->is_border());
+      
+      //check if the segment intersects the plane of the facet or if it is included in the plane
+      const typename Kernel::Point_3 & a = fh->vertex()->point();
+      const typename Kernel::Point_3 & b = fh->next()->vertex()->point();
+      const typename Kernel::Point_3 & c = fh->next()->next()->vertex()->point();
+      const Orientation abcp = orientation(a,b,c,eh->vertex()->point());
+      const Orientation abcq = orientation(a,b,c,eh->opposite()->vertex()->point());
+      if (abcp==abcq){
+        if (abcp!=COPLANAR){
+//          std::cout << "rejected " << &(*fh->facet()) << "{" << &(*eh->facet()) << " " <<&(*eh->opposite()->facet()) << " "<< eh->vertex()->point() << " " << eh->opposite()->vertex()->point() << "}" <<std::endl;
+          return; //no intersection
+        }
+        //WARNING THIS IS DONE ONLY FOR POLYHEDRON (MAX TWO INCIDENT FACETS TO EDGE)
+        if (/* !eh->is_border() && */ orientation(a,b,c,eh->next()->vertex()->point())==COPLANAR){
+          coplanar_facets.insert(make_sorted_pair_of_facets(eh->facet(),fh->facet()));
+        }
+        if (!eh->opposite()->is_border() && orientation(a,b,c,eh->opposite()->next()->vertex()->point())==COPLANAR){
+          coplanar_facets.insert(make_sorted_pair_of_facets(eh->opposite()->facet(),fh->facet()));
+        }
+        visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
+        //in case only the edge is coplanar, the intersection points will be detected using an incident facet 
+        //(see remark at the beginning of the file)
+        return; 
+      }
+      
+      typename Edge_to_intersected_facets::iterator res=
+        edge_to_sfacet.insert(std::make_pair(eh,Facet_set())).first;
+      res->second.insert(fh->facet());
+      visitor.add_filtered_intersection(eh,fh,polyhedron_edge,polyhedron_triangle);
+    }
+  };
+
+  class Map_edge_facet_bbox_intersection_extract_coplanar_filter_self_intersections {
+    Polyhedron_ref polyhedron_triangle;
+    Polyhedron_ref polyhedron_edge;
+
+    std::set<Facet_handle>& m_reported_facets;
+    std::vector<std::pair<const Box*,const Box*> >& m_intersecting_bboxes;
+  public:
+    Map_edge_facet_bbox_intersection_extract_coplanar_filter_self_intersections(
+      Polyhedron_ref  P,
+      Polyhedron_ref Q,
+      std::set<Facet_handle>& reported_facets,
+      std::vector<std::pair<const Box*,const Box*> >& intersecting_bboxes
+    )
+      : polyhedron_triangle(P)
+      , polyhedron_edge(Q)
+      , m_reported_facets(reported_facets)
+      , m_intersecting_bboxes(intersecting_bboxes)
+    {}
+
+    void operator()( const Box* fb, const Box* eb) {
+      m_reported_facets.insert( fb->handle()->facet() );
+      m_intersecting_bboxes.push_back( std::make_pair(fb, eb) );
+    }
+
+    bool self_intersections_found()
+    {
+      try{
+        typedef typename CGAL::Box_intersection_d::Box_with_info_d<double, 3, Facet_handle> Box;
+
+        // make one box per facet
+        std::vector<Box> boxes;
+        boxes.reserve(m_reported_facets.size());
+
+        BOOST_FOREACH(Facet_handle fh, m_reported_facets)
+        {
+          boxes.push_back( Box( fh->halfedge()->vertex()->point().bbox() +
+                                fh->halfedge()->next()->vertex()->point().bbox() +
+                                fh->halfedge()->opposite()->vertex()->point().bbox(), fh )
+          );
+        }
+
+        // generate box pointers
+        std::vector<const Box*> box_ptr;
+        box_ptr.reserve(boxes.size());
+        typename std::vector<Box>::iterator b;
+        for(b = boxes.begin();
+          b != boxes.end();
+          b++)
+          box_ptr.push_back(&*b);
+
+        // compute self-intersections filtered out by boxes
+        typedef boost::function_output_iterator<internal::Throw_at_output> OutputIterator;
+        OutputIterator out;
+        internal::Intersect_facets<Polyhedron,Kernel,
+                                   Box,OutputIterator,
+                                   typename boost::property_map<Polyhedron,boost::vertex_point_t>::type>
+          intersect_facets(polyhedron_triangle, out, get(boost::vertex_point, polyhedron_triangle), Kernel());
+        std::ptrdiff_t cutoff = 2000;
+        CGAL::box_self_intersection_d(box_ptr.begin(), box_ptr.end(),intersect_facets,cutoff);
+        return false;
+      }
+      catch( internal::Throw_at_output::Throw_at_output_exception& )
+      {
+        return true;
+      }
+    }
+  };
+  
+  // This function tests the intersection of the faces of P with the edges of Q
+  void filter_intersections( Polyhedron_ref P, Polyhedron_ref Q) {
+    std::vector<Box> facet_boxes, edge_boxes;
+    facet_boxes.reserve( P.size_of_facets());
+    for ( Facet_iterator i = P.facets_begin(); i != P.facets_end(); ++i){
+        facet_boxes.push_back(
+            Box( i->halfedge()->vertex()->point().bbox()
+               + i->halfedge()->next()->vertex()->point().bbox()
+               + i->halfedge()->next()->next()->vertex()->point().bbox(),
+                 i->halfedge()));
+    }
+    std::vector<const Box*> facet_box_ptr;
+    facet_box_ptr.reserve( P.size_of_facets());
+    for ( typename std::vector<Box>::iterator j = facet_boxes.begin(); j != facet_boxes.end(); ++j){
+        facet_box_ptr.push_back( &*j);
+    }
+      
+    for ( Halfedge_iterator i = Q.halfedges_begin(); i != Q.halfedges_end(); ++i){
+      if(&*i < &*(i->opposite())){
+        edge_boxes.push_back(
+            Box( i->vertex()->point().bbox()
+                 + i->opposite()->vertex()->point().bbox(),
+                 i));
+      }
+   }
+   
+    std::vector<const Box*> edge_box_ptr;
+    edge_box_ptr.reserve( Q.size_of_halfedges()/2);
+    for ( typename std::vector<Box>::iterator j = edge_boxes.begin(); j != edge_boxes.end(); ++j){
+        edge_box_ptr.push_back( &*j);
+    }
+
+  #ifdef CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS
+    // this version first collect faces involved in the intersection and first
+    // check if they are involved in a self-intersection.
+    std::set<Facet_handle> reported_facets;
+    std::vector<std::pair<const Box*,const Box*> > intersecting_bboxes;
+    Map_edge_facet_bbox_intersection_extract_coplanar_filter_self_intersections
+      inter_functor4selfi(P, Q, reported_facets, intersecting_bboxes);
+    CGAL::box_intersection_d( facet_box_ptr.begin(), facet_box_ptr.end(),
+                              edge_box_ptr.begin(), edge_box_ptr.end(),
+                              inter_functor4selfi, std::ptrdiff_t(2000) );
+
+    if (inter_functor4selfi.self_intersections_found()) throw Intersection_of_Polyhedra_3_self_intersection_exception();
+
+    #ifdef DO_NOT_HANDLE_COPLANAR_FACETS
+    Map_edge_facet_bbox_intersection inter_functor(edge_to_sfacet,P,Q,*visitor);
+    #else // not DO_NOT_HANDLE_COPLANAR_FACETS
+    Map_edge_facet_bbox_intersection_extract_coplanar inter_functor(edge_to_sfacet,coplanar_facets,P,Q,*visitor);
+    #endif // not DO_NOT_HANDLE_COPLANAR_FACETS
+
+    typedef std::pair<const Box*,const Box*> Type_pair;
+    BOOST_FOREACH(const Type_pair& p, intersecting_bboxes)
+      inter_functor(p.first, p.second);
+  #else
+    CGAL::box_intersection_d( facet_box_ptr.begin(), facet_box_ptr.end(),
+                              edge_box_ptr.begin(), edge_box_ptr.end(),
+    #ifdef DO_NOT_HANDLE_COPLANAR_FACETS
+                              // Note that 'edge_to_sfacet' is passed by
+                              // non-const reference, here, to be filled.
+                              Map_edge_facet_bbox_intersection(edge_to_sfacet,P,Q,*visitor),
+    #else // not DO_NOT_HANDLE_COPLANAR_FACETS
+                              Map_edge_facet_bbox_intersection_extract_coplanar(edge_to_sfacet,coplanar_facets,P,Q,*visitor),
+    #endif // not DO_NOT_HANDLE_COPLANAR_FACETS
+                              std::ptrdiff_t(2000)
+    );
+  #endif
+  }
+
+
+  void add_intersection_point_to_facet_and_all_edge_incident_facets(Facet_handle facet,
+                                                                    Halfedge_handle edge,
+                                                                    int node_id)
+  {
+    std::vector<Facet_handle> incident_facets;
+    get_incident_facets(edge,std::back_inserter(incident_facets));
+    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
+         it!=incident_facets.end();++it)
+    {
+      CGAL_assertion(cgal_do_intersect_debug(facet,*it));
+      
+      Facet_pair facet_pair = make_sorted_pair_of_facets(facet,*it);
+      if ( !coplanar_facets.empty() && coplanar_facets.find(facet_pair)!=coplanar_facets.end() ) continue;
+      typename Facets_to_nodes_map::iterator it_list=
+        f_to_node.insert( std::make_pair( Facet_pair_and_int(facet_pair,0),std::set<int>()) ).first;
+      it_list->second.insert(node_id);
+    }
+  }
+
+  void cip_handle_case_edge(int node_id,
+                            Facet_set* fset,
+                            Halfedge_handle edge,
+                            Halfedge_handle edge_intersected)
+  {
+    //associate the intersection point to all facets incident to the intersected edge using edge
+    std::vector<Facet_handle> incident_facets;
+    get_incident_facets(edge_intersected,std::back_inserter(incident_facets));
+    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
+         it!=incident_facets.end();++it)
+    {
+      add_intersection_point_to_facet_and_all_edge_incident_facets(*it,edge,node_id);
+      if (fset!=NULL) fset->erase(*it);
+    }
+    incident_facets.clear();
+
+    //associate the intersection point to all facets incident to edge using the intersected edge
+    //at least one pair of facets is already handle above
+    
+    typename Edge_to_intersected_facets::iterator it_fset=edge_to_sfacet.find(edge_intersected);
+    if (it_fset==edge_to_sfacet.end()) return;
+    Facet_set& fset_bis=it_fset->second;
+    get_incident_facets(edge,std::back_inserter(incident_facets));
+    for (typename std::vector<Facet_handle>::iterator it=incident_facets.begin();
+         it!=incident_facets.end();++it)
+    {
+//      add_intersection_point_to_facet_and_all_edge_incident_facets(*it,edge_intersected,node_id); //this call is not needed, already done in the first loop
+      fset_bis.erase(*it);
+    }
+  }
+
+  void cip_handle_case_vertex(int node_id,
+                              Facet_set* fset,
+                              Halfedge_handle edge,
+                              Halfedge_handle vertex_intersected)
+  {
+    std::vector<Halfedge_handle> incident_halfedges;
+    get_incident_edges_to_vertex(vertex_intersected,std::back_inserter(incident_halfedges));
+    for (typename std::vector<Halfedge_handle>::iterator 
+      it=incident_halfedges.begin();it!=incident_halfedges.end();++it)
+    {
+      cip_handle_case_edge(node_id,fset,edge,*it);
+    }
+  }
+
+  //add a new node in the final graph.
+  //it is the intersection of the triangle with the segment
+  void add_new_node(Halfedge_handle edge,
+                    Facet_handle facet,
+                    const Intersection_result& inter_res,
+                    Nodes_vector& nodes)
+  {
+    bool is_vertex_coplanar = CGAL::cpp11::get<2>(inter_res);
+    if (is_vertex_coplanar)
+      nodes.add_new_node(edge->vertex()->point());
+    else{
+      bool is_opposite_vertex_coplanar = CGAL::cpp11::get<3>(inter_res);
+      if (is_opposite_vertex_coplanar)
+        nodes.add_new_node(edge->opposite()->vertex()->point());
+      else
+        nodes.add_new_node(edge,facet);
+    }
+  }
+
+  //either the exact or input point can be used to create a node
+  //with this function
+  template<class Point>
+  void add_new_node(const Point& pt)
+  {
+    nodes.add_new_node(pt);
+  }
+
+  
+  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  void check_coplanar_edge(Halfedge_handle hedge,Facet_handle facet)
+  {
+    const typename Kernel::Point_3& p0=facet->halfedge()->vertex()->point();
+    const typename Kernel::Point_3& p1=facet->halfedge()->next()->vertex()->point();
+    const typename Kernel::Point_3& p2=facet->halfedge()->opposite()->vertex()->point();
+    CGAL_precondition( orientation( p0,p1,p2,hedge->vertex()->point() ) == COPLANAR );
+
+    if ( has_at_least_two_incident_faces(hedge) &&  orientation( p0,p1,p2,hedge->opposite()->vertex()->point() ) == COPLANAR )
+    {
+      //In case two facets are incident along such this edge, the intersection
+      //will be reported twice. We keep track of this so that at the end, we can remove one intersecting edge out of the two
+      //choose the smaller of the two faces (only one need to de deleted)
+      Facet_handle smaller=make_sorted_pair_of_facets(hedge->face(),hedge->opposite()->face()).first;
+      coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(smaller,facet));
+    }    
+  }
+  
+  bool are_incident_facets_coplanar(Halfedge_handle hedge){
+    const typename Kernel::Point_3& p0=hedge->vertex()->point();
+    const typename Kernel::Point_3& p1=hedge->next()->vertex()->point();
+    const typename Kernel::Point_3& p2=hedge->opposite()->vertex()->point();
+    const typename Kernel::Point_3& p3=hedge->opposite()->next()->vertex()->point();
+    return orientation( p0,p1,p2,p3 ) == COPLANAR;
+  }
+
+  void check_coplanar_edge(Halfedge_handle hedge,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
+  {
+    switch(type){
+      case internal_IOP::FACET:
+        check_coplanar_edge(hedge,additional_edge->face());
+      break;
+      
+      case internal_IOP::EDGE:
+        if ( !additional_edge->is_border() ){
+          check_coplanar_edge(hedge,additional_edge->face());
+        }
+        if (!additional_edge->opposite()->is_border())
+          check_coplanar_edge(hedge,additional_edge->opposite()->face());
+      break;        
+      case internal_IOP::VERTEX:
+      {
+        //consider  all incident faces
+        Halfedge_handle current=additional_edge;
+        do{
+          if( !current->is_border() )
+          check_coplanar_edge(hedge,current->face());
+          current=current->next()->opposite();
+        }
+        while(current!=additional_edge);
+      }
+      break;
+      
+      default:
+        CGAL_assertion(type==internal_IOP::COPLNR);
+      break;
+    }    
+  }
+  
+  void check_coplanar_edge_old(Halfedge_handle hedge,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
+  {
+    switch(type){
+      case internal_IOP::FACET:
+        check_coplanar_edge(hedge,additional_edge->face());
+      break;
+      
+      case internal_IOP::EDGE:
+      {
+        if ( !additional_edge->is_border() ){
+          if (!additional_edge->opposite()->is_border()){
+            if ( are_incident_facets_coplanar(additional_edge) )
+            {
+              Facet_handle facet=additional_edge->face();
+              const typename Kernel::Point_3& p0=facet->halfedge()->vertex()->point();
+              const typename Kernel::Point_3& p1=facet->halfedge()->next()->vertex()->point();
+              const typename Kernel::Point_3& p2=facet->halfedge()->opposite()->vertex()->point();
+              CGAL_precondition( orientation( p0,p1,p2,hedge->vertex()->point() ) == COPLANAR );
+
+              if ( has_at_least_two_incident_faces(hedge) &&  orientation( p0,p1,p2,hedge->opposite()->vertex()->point() ) == COPLANAR )
+              {
+                //In case two facets are incident along a common edge of two coplanar triangles.
+                //We need to remove three out of the four reported pair
+                Facet_handle smaller=make_sorted_pair_of_facets(hedge->face(),hedge->opposite()->face()).first;
+                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->face(),facet));
+                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->opposite()->face(),facet));
+                coplanar_duplicated_intersection.insert(make_sorted_pair_of_facets(hedge->opposite()->face(),additional_edge->opposite()->face()));
+              }              
+            }
+            else
+            {
+              check_coplanar_edge(hedge,additional_edge->face());
+              check_coplanar_edge(hedge,additional_edge->opposite()->face());
+            }
+          }
+          else
+            check_coplanar_edge(hedge,additional_edge->face());
+        }
+        else{
+          CGAL_assertion(!additional_edge->opposite()->is_border());
+          check_coplanar_edge(hedge,additional_edge->opposite()->face());
+        }
+      }
+      break;        
+      case internal_IOP::VERTEX:
+        
+      break;
+      
+      default:
+        CGAL_assertion(type==internal_IOP::COPLNR);
+      break;
+    }    
+  }
+  
+  template <class Hedge_iterator>
+  void check_coplanar_edges(Hedge_iterator begin,Hedge_iterator end,Halfedge_handle additional_edge,internal_IOP::Intersection_type type)
+  {
+    for (Hedge_iterator it=begin;it!=end;++it)
+      check_coplanar_edge(*it,additional_edge,type);
+  }
+  #endif // USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  
+  void print_type_debug(internal_IOP::Intersection_type type,bool cpl,bool opp_cpl)
+  {
+    switch(type){
+      case internal_IOP::COPLNR:
+        std::cout << "COPLNR " << cpl << " " <<  opp_cpl << std::endl;
+      break;
+      case internal_IOP::EMPTY:
+        std::cout << "EMPTY " << cpl << " " <<  opp_cpl << std::endl;
+      break;
+      
+      case internal_IOP::FACET:
+        std::cout << "FACET " << cpl << " " <<  opp_cpl << std::endl;
+      break;
+      
+      case internal_IOP::EDGE:
+        std::cout << "EDGE " << cpl << " " <<  opp_cpl << std::endl;
+      break;        
+      case internal_IOP::VERTEX:
+        std::cout << "VERTEX " << cpl << " " <<  opp_cpl << std::endl;
+      break;
+    }
+  }
+  
+
+  void handle_coplanar_case_VERTEX_FACET(Halfedge_handle vertex,Halfedge_handle facet,int node_id){
+    visitor->new_node_added(node_id,internal_IOP::FACET,vertex,facet,true,false);
+    std::vector<Halfedge_handle> all_edges;
+    get_incident_edges_to_vertex(vertex,std::back_inserter(all_edges));
+    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
+    for (;it_edge!=all_edges.end();++it_edge){
+      add_intersection_point_to_facet_and_all_edge_incident_facets(facet->facet(),*it_edge,node_id);
+      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+      if (it_ets!=edge_to_sfacet.end()) it_ets->second.erase(facet->facet());
+    }
+  }
+  
+  void handle_coplanar_case_VERTEX_EDGE(Halfedge_handle vertex,Halfedge_handle edge,int node_id){
+    visitor->new_node_added(node_id,internal_IOP::VERTEX,edge,vertex,false,false);
+    std::vector<Halfedge_handle> all_edges;
+    get_incident_edges_to_vertex(vertex,std::back_inserter(all_edges));
+    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
+    for (;it_edge!=all_edges.end();++it_edge){
+      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+      Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
+      cip_handle_case_edge(node_id,fset,*it_edge,edge);
+    }
+  }
+
+  void handle_coplanar_case_VERTEX_VERTEX(Halfedge_handle vertex1,Halfedge_handle vertex2,int node_id){
+    visitor->new_node_added(node_id,internal_IOP::VERTEX,vertex2,vertex1,true,false);
+    std::vector<Halfedge_handle> all_edges;
+    get_incident_edges_to_vertex(vertex1,std::back_inserter(all_edges));
+    typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();          
+    for (;it_edge!=all_edges.end();++it_edge){
+      typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+      Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
+      cip_handle_case_vertex(node_id,fset,*it_edge,vertex2);
+    }
+  }
+  
+  
+  template<class Cpl_inter_pt,class Coplanar_node_map>
+  int get_or_create_node(Cpl_inter_pt& ipt,int& current_node,Coplanar_node_map& coplanar_node_map){
+    void *v1, *v2;
+    switch(ipt.type_1){
+      case internal_IOP::VERTEX: v1=(void*)( &(*(ipt.info_1->vertex()))     );  break;
+      case internal_IOP::EDGE  : v1=(void*)( &(*smaller_handle(ipt.info_1)) );  break;
+      case internal_IOP::FACET : v1=(void*)( &(*(ipt.info_1->facet()))      );  break;
+      default: CGAL_error_msg("Should not get there!");
+    }
+
+    switch(ipt.type_2){
+      case internal_IOP::VERTEX: v2=(void*)( &(*(ipt.info_2->vertex()))     );  break;
+      case internal_IOP::EDGE  : v2=(void*)( &(*smaller_handle(ipt.info_2)) );  break;
+      case internal_IOP::FACET : v2=(void*)( &(*(ipt.info_2->facet()))      );  break;
+      default: CGAL_error_msg("Should not get there!");
+    }
+
+    std::pair<void*,void*> key=make_sorted_void_pair(v1,v2);
+
+    std::pair<typename Coplanar_node_map::iterator,bool> res=coplanar_node_map.insert(std::make_pair(key,current_node+1));
+    if (res.second){ //insert a new node
+      
+      if (ipt.type_1==internal_IOP::VERTEX)
+        add_new_node(ipt.info_1->vertex()->point());
+      else{
+        if(ipt.type_2==internal_IOP::VERTEX)
+          add_new_node(ipt.info_2->vertex()->point());
+        else
+          add_new_node(ipt.point);
+      }
+      return ++current_node;
+    }
+    return res.first->second;
+  }
+  
+  void compute_intersection_of_coplanar_facets(int& current_node){
+    typedef std::map<std::pair<void*,void*>,int> Coplanar_node_map;
+    Coplanar_node_map coplanar_node_map;
+    
+    for (typename Coplanar_facets_set::iterator it=coplanar_facets.begin();it!=coplanar_facets.end();++it){
+      Facet_handle f1=it->first;
+      Facet_handle f2=it->second;
+      typedef internal_IOP::Intersection_point_with_info<Kernel,Halfedge_handle> Cpl_inter_pt;
+      std::list<Cpl_inter_pt> inter_pts;
+      internal_IOP::intersection_coplanar_facets<Kernel>(f1->halfedge(),f2->halfedge(),inter_pts);
+//      std::cout << "found " << inter_pts.size() << " inter pts: "; 
+      std::size_t nb_pts=inter_pts.size();
+      std::vector<int> cpln_nodes; cpln_nodes.reserve(nb_pts);
+      for (typename std::list<Cpl_inter_pt>::iterator iti=inter_pts.begin();iti!=inter_pts.end();++iti){
+        #ifdef CGAL_COREFINEMENT_DEBUG
+        //iti->print_debug();
+        #endif
+        CGAL_assertion(iti->is_valid());
+        int node_id=get_or_create_node(*iti,current_node,coplanar_node_map);
+        cpln_nodes.push_back(node_id);
+
+        switch(iti->type_1){
+          case internal_IOP::VERTEX:
+          {
+            switch(iti->type_2){
+              case internal_IOP::VERTEX: handle_coplanar_case_VERTEX_VERTEX(iti->info_1,iti->info_2,node_id); break;
+              case internal_IOP::EDGE  : handle_coplanar_case_VERTEX_EDGE(iti->info_1,iti->info_2,node_id);   break;
+              case internal_IOP::FACET : handle_coplanar_case_VERTEX_FACET(iti->info_1,iti->info_2,node_id);  break;
+              default: CGAL_error_msg("Should not get there!");
+            }
+          }
+          break;
+          case internal_IOP::EDGE:{
+            switch(iti->type_2){
+              case internal_IOP::VERTEX:handle_coplanar_case_VERTEX_EDGE(iti->info_2,iti->info_1,node_id);break;
+              case internal_IOP::EDGE:
+              {
+                visitor->new_node_added(node_id,internal_IOP::EDGE,iti->info_1,iti->info_2,false,false);
+                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(iti->info_1);
+                Facet_set* fset = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
+                cip_handle_case_edge(node_id,fset,iti->info_1,iti->info_2);                
+              }
+              break;
+              default: CGAL_error_msg("Should not get there!");
+            }
+          }            
+          break;
+          
+          case internal_IOP::FACET:
+          {
+            CGAL_assertion(iti->type_2==internal_IOP::VERTEX);
+            handle_coplanar_case_VERTEX_FACET(iti->info_2,iti->info_1,node_id);
+          }
+          break;
+          
+          default: CGAL_error_msg("Should not get there!");
+        }
+      }
+      switch (nb_pts){
+        case 0: break;
+        case 1:
+        {
+          typename Facets_to_nodes_map::iterator it_list=  
+            f_to_node.insert( std::make_pair( Facet_pair_and_int(*it,1),std::set<int>()) ).first;
+          it_list->second.insert(cpln_nodes[0]);
+        }
+        break;
+        default:
+        {
+          int i=0;
+          std::size_t stop=nb_pts + (nb_pts<3?-1:0);
+          for (std::size_t k=0;k<stop;++k){
+            typename Facets_to_nodes_map::iterator it_list=
+              f_to_node.insert( std::make_pair( Facet_pair_and_int(*it,++i),std::set<int>()) ).first;
+            it_list->second.insert( cpln_nodes[k] );
+            it_list->second.insert( cpln_nodes[(k+1)%nb_pts] );
+          }
+        }
+      }
+//      std::cout << std::endl;
+    }
+  }
+  
+  void compute_intersection_points(int& current_node){
+    for(typename Edge_to_intersected_facets::iterator it=edge_to_sfacet.begin();it!=edge_to_sfacet.end();++it){
+      Halfedge_handle edge=it->first;
+      Facet_set& fset=it->second;
+      while (!fset.empty()){
+        Facet_handle facet=*fset.begin();
+        
+        Intersection_result res=internal_IOP::do_intersect<Polyhedron,Kernel,Use_const_polyhedron>(edge,facet);
+        internal_IOP::Intersection_type type=CGAL::cpp11::get<0>(res);
+        
+        //handle degenerate case: one extremity of edge below to facet
+        std::vector<Halfedge_handle> all_edges;
+        if ( CGAL::cpp11::get<2>(res) )
+          get_incident_edges_to_vertex(edge,std::back_inserter(all_edges));
+        else{
+          if ( CGAL::cpp11::get<3>(res) )
+            get_incident_edges_to_vertex(edge->opposite(),std::back_inserter(all_edges));
+          else
+            all_edges.push_back(edge);
+        }
+        
+        CGAL_precondition(*all_edges.begin()==edge || *all_edges.begin()==edge->opposite());
+//        print_type_debug(type,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
+       
+        #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
+        check_coplanar_edges(boost::next(all_edges.begin()),all_edges.end(),CGAL::cpp11::get<1>(res),type);
+        #endif
+        
+        typename std::vector<Halfedge_handle>::iterator it_edge=all_edges.begin();
+        switch(type){
+          case internal_IOP::COPLNR:
+            #ifndef DO_NOT_HANDLE_COPLANAR_FACETS
+            CGAL_assertion(!"COPLANR : this point should never be reached!");
+            #else
+            //nothing need to be done, cf. comments at the beginning of the file
+            #endif
+          break;
+          case internal_IOP::EMPTY:
+            fset.erase(fset.begin());
+            CGAL_assertion(!cgal_do_intersect_debug(edge,facet));
+          break;
+
+          // Case when the edge pierces the facet in its interior.
+          case internal_IOP::FACET:
+          {
+            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
+            CGAL_assertion(facet==CGAL::cpp11::get<1>(res)->face());
+
+            int node_id=++current_node;
+            add_new_node(edge,facet,res,nodes);
+            visitor->new_node_added(node_id,internal_IOP::FACET,edge,facet->halfedge(),CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
+            for (;it_edge!=all_edges.end();++it_edge){
+              add_intersection_point_to_facet_and_all_edge_incident_facets(facet,*it_edge,node_id);
+              //erase facet from the list to test intersection with it_edge
+              if ( it_edge==all_edges.begin() )
+                fset.erase(fset.begin());
+              else
+              {
+                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+                if(it_ets!=edge_to_sfacet.end()) it_ets->second.erase(facet);
+              }
+            }
+          } // end case FACET
+          break;
+
+          // Case when the edge intersect one edge of the facet.
+          case internal_IOP::EDGE:
+          {
+            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
+            int node_id=++current_node;
+            add_new_node(edge,facet,res,nodes);
+            Halfedge_handle edge_intersected=CGAL::cpp11::get<1>(res);
+            visitor->new_node_added(node_id,internal_IOP::EDGE,edge,edge_intersected,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
+            for (;it_edge!=all_edges.end();++it_edge){
+              if ( it_edge!=all_edges.begin() ){
+                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+                Facet_set* fset_bis = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;
+                cip_handle_case_edge(node_id,fset_bis,*it_edge,edge_intersected);
+              }
+              else
+                cip_handle_case_edge(node_id,&fset,*it_edge,edge_intersected);
+            }
+          } // end case EDGE
+          break;
+
+          case internal_IOP::VERTEX:
+          {
+            CGAL_assertion(cgal_do_intersect_debug(edge,facet));
+            int node_id=++current_node;
+            Halfedge_handle vertex_intersected=CGAL::cpp11::get<1>(res);
+            add_new_node(vertex_intersected->vertex()->point()); //we use the original vertex to create the node
+            //before it was internal_IOP::FACET but do not remember why, probably a bug...
+            visitor->new_node_added(node_id,internal_IOP::VERTEX,edge,vertex_intersected,CGAL::cpp11::get<2>(res),CGAL::cpp11::get<3>(res));
+            for (;it_edge!=all_edges.end();++it_edge){
+              if ( it_edge!=all_edges.begin() ){
+                typename Edge_to_intersected_facets::iterator it_ets=edge_to_sfacet.find(*it_edge);
+                Facet_set* fset_bis = (it_ets!=edge_to_sfacet.end())?&(it_ets->second):NULL;                
+                cip_handle_case_vertex(node_id,fset_bis,*it_edge,vertex_intersected);
+              }
+              else
+                cip_handle_case_vertex(node_id,&fset,*it_edge,vertex_intersected);
+            }
+          } // end case VERTEX
+          break;
+
+        } // end switch on the type of the intersection
+      } // end loop on all facets that intersect the edge
+    } // end loop on all entries (edges) in 'edge_to_sfacet'
+    CGAL_assertion(nodes.size()==unsigned(current_node+1));
+  }
+  
+  #ifdef USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  void remove_duplicated_intersecting_edges()
+  {
+    for (typename Coplanar_duplicated_intersection_set::iterator 
+        it=coplanar_duplicated_intersection.begin();
+        it!=coplanar_duplicated_intersection.end();
+        ++it)
+    {
+      typename Facets_to_nodes_map::iterator res=f_to_node.find(*it);
+      //CGAL_assertion(res!=f_to_node.end());
+      //we cannot use a precondition here: in some cases the coplanarity test is not sufficient.
+      //if on surface1 we have to coplanar triangle incident along edge e. Then in surface2, take a triangle
+      //with one edge inside one triangle of surface1 such that one vertex in on e. Then the collinearity test
+      //return true for both faces but only one implies a duplicated edge
+      if(res!=f_to_node.end())
+        f_to_node.erase(res);
+    }
+  }
+  #else // not USE_DETECTION_MULTIPLE_DEFINED_EDGES
+  void remove_duplicated_intersecting_edges()
+  {
+    std::set< std::pair<int,int> > already_seen;
+    std::list<typename Facets_to_nodes_map::iterator> to_erase;
+    for (typename Facets_to_nodes_map::iterator 
+          it=f_to_node.begin();
+          it!=f_to_node.end();
+          ++it
+    )
+    {
+      if (it->second.size()==1) continue;
+      CGAL_precondition(it->second.size()==2);
+      //it->second is a set so int are already sorted
+      bool is_new=already_seen.insert(  std::make_pair(
+                                       *(it->second.begin()),
+                                       *boost::next(it->second.begin()) )
+      ).second;
+      
+      if (!is_new)
+        to_erase.push_back(it);
+    }
+    
+    for ( typename std::list<typename Facets_to_nodes_map::iterator>::iterator
+          it=to_erase.begin();it!=to_erase.end();++it
+    )
+      f_to_node.erase(*it);
+  }
+  #endif // not USE_DETECTION_MULTIPLE_DEFINED_EDGES
+
+
+  struct Graph_node{
+    std::set<int> neighbors;
+    unsigned size;
+    
+    Graph_node():size(0){}
+    
+    void insert(int i){
+      ++size;
+      CGAL_assertion(neighbors.find(i)==neighbors.end());
+      neighbors.insert(i);
+    }
+    
+    void erase(int i){
+      CGAL_assertion(neighbors.find(i)!=neighbors.end());
+      neighbors.erase(i);
+    }
+    void make_terminal() {size=45;}
+    bool is_terminal()const {return size!=2;}
+    bool empty() const {return neighbors.empty();}
+    int top() const {return *neighbors.begin();}
+    void pop() {
+      CGAL_assertion(!neighbors.empty());
+      neighbors.erase(neighbors.begin());
+    }
+  };
+
+
+  template <class Output_iterator>
+  void construct_polylines(Nodes_vector& nodes,Output_iterator out){
+    typedef std::map<int,Graph_node> Graph;
+    Graph graph;
+    
+    //counts the number of time each node has been seen
+    std::size_t nb_nodes=nodes.size();
+    std::vector<int> node_mult(nb_nodes,0);
+    bool isolated_point_seen=false;
+    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
+      const std::set<int>& segment=it->second;
+      CGAL_assertion(segment.size()==2 || segment.size()==1);
+      if (segment.size()==2){
+        int i=*segment.begin();
+        int j=*boost::next(segment.begin());
+        typename Graph::iterator ins_res=graph.insert(std::make_pair(i,Graph_node())).first;
+        ins_res->second.insert(j);
+        ins_res=graph.insert(std::make_pair(j,Graph_node())).first;
+        ins_res->second.insert(i);
+        ++(node_mult[i]);
+        ++(node_mult[j]);
+      }
+      else{
+        CGAL_assertion(segment.size()==1);
+        isolated_point_seen=true;
+      }
+    }
+    
+    //add isolated points
+    if (isolated_point_seen){
+      for (unsigned index=0;index<nb_nodes;++index)
+        if (node_mult[index]==0){
+          *out++=std::vector<typename Kernel::Point_3>(1,nodes[index]);
+          visitor->start_new_polyline(index,index);
+        }
+    }
+    
+    //visitor call
+    visitor->annotate_graph(graph.begin(),graph.end());
+    
+    bool only_cycle=false;
+    while (!graph.empty()){
+      typename Graph::iterator it=graph.begin();
+      for (;!only_cycle && it!=graph.end();++it){
+        if (it->second.is_terminal()) break;
+      }
+      
+      std::vector<typename Kernel::Point_3> polyline;
+      
+      if(!only_cycle && it!=graph.end()){
+        //this is a polyline
+        int i=it->first;
+        int j=it->second.top();
+        visitor->start_new_polyline(i,j);
+        CGAL_assertion(i!=j);
+        it->second.pop();
+        if (it->second.empty())
+          graph.erase(it);
+        polyline.push_back(nodes[i]);
+        visitor->add_node_to_polyline(i);
+        while(true){
+          it=graph.find(j);
+          CGAL_assertion(it!=graph.end());
+          it->second.erase(i);
+          i=j;
+          polyline.push_back(nodes[i]);
+          visitor->add_node_to_polyline(i);
+          if (it->second.empty()){
+            graph.erase(it);
+            break;
+          }
+          if (it->second.is_terminal()) break;
+          j=it->second.top();
+          it->second.pop();
+          if (it->second.empty())
+            graph.erase(it);
+        }
+        *out++=polyline;
+      }
+      else{
+        //it remains only cycles
+        only_cycle=true;
+        it=graph.begin();
+        int i=it->first;
+        int j=it->second.top();
+        visitor->start_new_polyline(i,j);
+        graph.erase(it);
+        polyline.push_back(nodes[i]);
+        visitor->add_node_to_polyline(i);
+        int first=i;
+        do{
+          it=graph.find(j);
+          it->second.erase(i);
+          i=j;
+          polyline.push_back(nodes[i]);
+          visitor->add_node_to_polyline(i);
+          j=it->second.top();
+          graph.erase(it);
+        }while(j!=first);
+        polyline.push_back(nodes[j]);// we duplicate first point for cycles
+        visitor->add_node_to_polyline(j);
+        *out++=polyline;      
+      }
+    }
+  }
+  
+  int get_other_int(const std::set<int>& s,int i) const {
+    if (*s.begin()!=i) return *s.begin();
+    return *boost::next(s.begin());
+  }
+  
+  template <class T,class Dispatch_out_it>
+  bool is_grabbed(const Dispatch_out_it&) const{
+    return CGAL::Is_in_tuple<T,typename Dispatch_out_it::Value_type_tuple>::value;
+  }
+  
+  
+  template <class OutputIterator>
+  struct Is_dispatch_based_ouput_iterator{
+    typedef  boost::false_type type;
+  };
+
+  template <template<class V_,class O_> class Dispatch_based_output_it,class V,class O>
+  struct Is_dispatch_based_ouput_iterator<Dispatch_based_output_it<V,O> >{
+    typedef typename boost::is_base_of< Dispatch_output_iterator<V,O>,
+                                        Dispatch_based_output_it<V,O>  >::type type;
+  };
+  
+  template <class Output_iterator>
+  inline void construct_polylines_with_info(Nodes_vector& nodes,Output_iterator out){
+    return construct_polylines_with_info(nodes,out,typename Is_dispatch_based_ouput_iterator<Output_iterator>::type());
+  }
+    
+  template <class Output_iterator>
+  void construct_polylines_with_info(Nodes_vector& nodes,Output_iterator out,boost::false_type){
+    construct_polylines_with_info(nodes,
+                                  dispatch_or_drop_output<std::vector<typename Kernel::Point_3> >(out),boost::true_type());
+  }
+  
+  template <template<class V_,class O_> class Dispatch_based_output_it,class V,class O>
+  void construct_polylines_with_info(Nodes_vector& nodes,
+                                     Dispatch_based_output_it<V,O> out,boost::true_type)
+  {
+    typedef typename Facets_to_nodes_map::value_type Edge;
+    typedef std::list<Facet_pair> Polyline_info;
+    
+    
+    std::size_t nb_nodes=nodes.size();
+    std::vector<int> node_mult(nb_nodes,0);
+    std::vector<bool> terminal_bools(nb_nodes,false);
+    std::vector< std::set<Edge*> > connections(nb_nodes);
+    // --counts the number of time each node has been seen
+    // --associate to each node its incident edges. An edge = a pair of Facet_handle+2 indices of intersection points
+    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
+      const std::set<int>& segment=it->second;
+      CGAL_assertion(segment.size()==2 || segment.size()==1);
+      if (segment.size()==2){
+        int i=*segment.begin();
+        int j=*boost::next(segment.begin());
+        connections[i].insert(&(*it));
+        connections[j].insert(&(*it));
+        ++(node_mult[i]);
+        ++(node_mult[j]);
+      }
+    }
+
+    //detect terminal nodes and isolated nodes
+    for (unsigned k=0;k<nb_nodes;++k){
+      if (node_mult[k]!=2) terminal_bools[k]=true;
+      if (node_mult[k]==0){
+        *out++=std::vector<typename Kernel::Point_3>(1,nodes[k]);
+        if ( is_grabbed<std::vector<Facet_pair> >(out))
+          *out++=std::vector<Facet_pair>();
+      }
+    }
+   
+    //visitor call
+    visitor->update_terminal_nodes(terminal_bools);
+    
+    //We start from a node N and recursively walk one edge to find other
+    // node. If this is a cycle we stop when we are back at the node N;
+    //otherwise we stop at a terminal node and restart a walk from N
+    //following another edge (if N is not terminal) until finding a terminal
+    //node. With this we can associate to each edge the pair of facet_handle
+    //intersecting that define this edge.
+    unsigned current_node=0;
+    while (current_node!=nb_nodes){
+      if (connections[current_node].empty()){
+        ++current_node;
+        continue;
+      }
+      
+      Edge* edge=*connections[current_node].begin();
+      connections[current_node].erase(connections[current_node].begin());
+      
+      Polyline_info polyline_info;
+      std::list<typename Kernel::Point_3> polyline_embedding;
+      
+      if ( is_grabbed<std::vector<Facet_pair> >(out))
+        polyline_info.push_back(edge->first.first);
+      polyline_embedding.push_back(nodes[current_node]);
+      
+      unsigned i=current_node;
+      unsigned start_node=current_node;
+      bool reverse=false;
+      while (true){
+        i=get_other_int(edge->second,i);
+        connections[i].erase(edge);
+        
+        if (reverse) polyline_embedding.push_front(nodes[i]);
+        else         polyline_embedding.push_back(nodes[i]);
+        
+        if (i==start_node) break;
+        if (terminal_bools[i]){
+          if (reverse || terminal_bools[current_node]) break;
+          reverse=true;
+          i=current_node;
+          if ( connections[i].empty() ) break;
+        }
+        
+        edge=*connections[i].begin();
+        connections[i].erase(connections[i].begin());
+        
+        if ( is_grabbed<std::vector<Facet_pair> >(out)){
+          if (reverse) polyline_info.push_front(edge->first.first);
+          else         polyline_info.push_back(edge->first.first);
+        }
+          
+      }
+      
+      *out++=std::vector<typename Kernel::Point_3>(polyline_embedding.begin(),polyline_embedding.end());
+      if ( is_grabbed<std::vector<Facet_pair> >(out)){
+        CGAL_assertion(polyline_embedding.size()==polyline_info.size()+1);
+        *out++=std::vector<Facet_pair>(polyline_info.begin(),polyline_info.end());
+      }
+    }
+  }
+  
+//debug functions
+  
+  bool cgal_do_intersect_debug(Halfedge_handle eh,Facet_handle fh){
+    Triangle t( fh->halfedge()->vertex()->point(),
+                fh->halfedge()->next()->vertex()->point(),
+                fh->halfedge()->next()->next()->vertex()->point());
+
+    Segment s( eh->vertex()->point(),
+               eh->opposite()->vertex()->point());
+
+    return CGAL::do_intersect( s, t);
+  }
+
+  bool cgal_do_intersect_debug(Facet_handle fh1,Facet_handle fh2){
+    Triangle t1( fh1->halfedge()->vertex()->point(),
+                 fh1->halfedge()->next()->vertex()->point(),
+                 fh1->halfedge()->next()->next()->vertex()->point());
+    Triangle t2( fh2->halfedge()->vertex()->point(),
+                 fh2->halfedge()->next()->vertex()->point(),
+                 fh2->halfedge()->next()->next()->vertex()->point());
+
+
+    return CGAL::do_intersect( t1, t2);
+  }
+  
+  void print_f_to_node_debug(){
+    std::cout << "print_f_to_node_debug " << &f_to_node << std::endl;
+    for (typename Facets_to_nodes_map::iterator it=f_to_node.begin();it!=f_to_node.end();++it){
+      std::cout << &(*(it->first.first.first)) << " " << &(*(it->first.first.second)) << " " << it->first.second << " -> {";
+      std::copy(it->second.begin(),it->second.end(),std::ostream_iterator<int>(std::cout,","));
+      std::cout << "}" <<std::endl;
+    }
+  }
+  
+  void print_graph_debug(const std::map<int,Graph_node>& graph){
+    for (typename std::map<int,Graph_node>::const_iterator it=graph.begin();it!=graph.end();++it){
+      std::cout << it->first << " -> {";
+      std::copy(it->second.neighbors.begin(),it->second.neighbors.end(),std::ostream_iterator<int>(std::cout,","));
+      std::cout << "}" <<std::endl;      
+    }
+  }
+  
+  void print_edge_to_sfacet_debug(){
+    std::cout << "Potential intersection "<< edge_to_sfacet.size() << std::endl;
+    for(typename Edge_to_intersected_facets::iterator it=edge_to_sfacet.begin();it!=edge_to_sfacet.end();++it){
+      Facet_set& fset=it->second;
+      std::cout << &fset << " fset size " << fset.size() << std::endl;
+    }
+  }
+  
+  
+  template <class OutputIterator>
+  OutputIterator main_run(OutputIterator out,bool build_polylines=true){
+    // std::cout << edge_to_sfacet.size() << std::endl;
+    int current_node=-1;
+    
+    //print_edge_to_sfacet_debug();
+    #ifndef DO_NOT_HANDLE_COPLANAR_FACETS
+    //first handle coplanar triangles
+    compute_intersection_of_coplanar_facets(current_node);
+    visitor->set_number_of_intersection_points_from_coplanar_facets(current_node+1);
+    #endif // not DO_NOT_HANDLE_COPLANAR_FACETS
+    //print_edge_to_sfacet_debug();
+    //compute intersection points of segments and triangles.
+    //build node of the graph
+    //build connectivity info
+    compute_intersection_points(current_node); // 'current_node' is passed by
+                                               // non-const reference
+    
+    if (!build_polylines){
+      visitor->finalize(nodes);
+      return out;
+    }
+    //remove duplicated intersecting edges:      
+    //  In case two facets are incident along such an edge coplanar in a facet of another polyhedron (and one extremity inside the facet), the intersection
+    //  will be reported twice. We kept track (check_coplanar_edge(s)) of this so that, we can remove one intersecting edge out of the two
+    //print_f_to_node_debug();
+    remove_duplicated_intersecting_edges();
+    
+    //std::cout << "f_to_node "<< f_to_node.size() << std::endl;
+    //print_f_to_node_debug();
+    //collect connectivity infos and create polylines
+    if ( Node_visitor::do_need_vertex_graph )
+      construct_polylines(nodes,out); //using the graph approach (at some point we know all connections between intersection points)
+    else
+      construct_polylines_with_info(nodes,out); //direct construction by propagation
+    
+    visitor->finalize(nodes);    
+    
+    return out;
+  }
+  
+public:
+  Intersection_of_Polyhedra_3():visitor(new Node_visitor()),is_default_visitor(true){}
+  Intersection_of_Polyhedra_3(Node_visitor& v):visitor(&v),is_default_visitor(false){}
+  ~Intersection_of_Polyhedra_3(){if (is_default_visitor) delete visitor;}
+  //pairwise intersection between all elements in the range
+  template <class InputIterator, class OutputIterator>
+  OutputIterator
+  operator()(InputIterator begin, InputIterator end, OutputIterator out) {
+    for(InputIterator it1=begin;it1!=end;++it1){
+      CGAL_precondition( it1->is_pure_triangle() );
+      Polyhedron_ref P=*it1;
+      visitor->new_input_polyhedron(P);
+      for(InputIterator it2=boost::next(it1);it2!=end;++it2){  
+        CGAL_precondition( it2->is_pure_triangle() );
+        Polyhedron_ref Q=*it2;
+        filter_intersections(P, Q);
+        filter_intersections(Q, P);
+      }
+    }
+    
+    return main_run(out);
+  }
+  
+  //pairwise intersection between all elements in the range
+  //(pointers version)
+  template <class InputIterator, class OutputIterator>
+  OutputIterator
+  operator()(InputIterator begin, InputIterator end, OutputIterator out, int) {
+    for(InputIterator it1=begin;it1!=end;++it1){
+      CGAL_precondition( (*it1)->is_pure_triangle() );
+      Polyhedron_ref P=**it1;
+      visitor->new_input_polyhedron(P);
+      for(InputIterator it2=boost::next(it1);it2!=end;++it2){  
+        CGAL_precondition( (*it2)->is_pure_triangle() );
+        Polyhedron_ref Q=**it2;
+        filter_intersections(P, Q);
+        filter_intersections(Q, P);
+      }
+    }
+    
+    return main_run(out);
+  }
+  
+  //intersection between P and each element in the range
+  template <class InputIterator, class OutputIterator>
+  OutputIterator
+  operator()( Polyhedron_ref P, InputIterator begin, InputIterator end, OutputIterator out) {
+    CGAL_precondition( P.is_pure_triangle() );
+    visitor->new_input_polyhedron(P);
+    for(InputIterator it=begin;it!=end;++it){
+      CGAL_precondition( it->is_pure_triangle() );
+      Polyhedron_ref Q=*it;
+      visitor->new_input_polyhedron(Q);
+      filter_intersections(P, Q);
+      filter_intersections(Q, P);
+    }
+    return main_run(out);
+  }
+  
+  //intersection between P and each element in the range
+  //(pointers version)
+  template <class InputIterator, class OutputIterator>
+  OutputIterator
+  operator()(Polyhedron_ref P, InputIterator begin, InputIterator end, OutputIterator out, int) {
+    CGAL_precondition( P.is_pure_triangle() );
+    visitor->new_input_polyhedron(P);
+    for(InputIterator it=begin;it!=end;++it){
+      CGAL_precondition( (*it)->is_pure_triangle() );
+      Polyhedron_ref Q=**it;
+      visitor->new_input_polyhedron(Q);
+      filter_intersections(P, Q);
+      filter_intersections(Q, P);
+    }
+    return main_run(out);
+  }
+  
+  //intersection between P and Q
+  template <class OutputIterator>
+  OutputIterator
+  operator()(Polyhedron_ref P, Polyhedron_ref Q, OutputIterator out) {
+    visitor->new_input_polyhedron(P);
+    visitor->new_input_polyhedron(Q);
+    filter_intersections(P, Q);
+    filter_intersections(Q, P);
+    return main_run(out);
+  }
+
+  //intersection between P and Q, only visitor called not polyline is constructed
+  void operator()(Polyhedron_ref P, Polyhedron_ref Q) {
+    visitor->new_input_polyhedron(P);
+    visitor->new_input_polyhedron(Q);
+    filter_intersections(P, Q);
+    filter_intersections(Q, P);
+    main_run(Emptyset_iterator(),false);
+  }
+};
+
+template <typename Polyhedron, typename OutputIterator>
+OutputIterator
+intersection_Polyhedron_3_Polyhedron_3(const Polyhedron& P, const Polyhedron& Q, OutputIterator out)
+{
+  return Intersection_of_Polyhedra_3<Polyhedron>()(P,Q,out);
+}
+
+}// namespace CGAL
+
+#endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_H
+
+/*
+  // Local variables for Emacs:
+  //   - set special indentation of case labels, compared to usual C/C++
+  //     indentation styles.
+  Local Variables:
+  c-file-offsets:((case-label . +))
+  End:
+*/
diff --git a/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h b/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h
new file mode 100644
index 0000000..c623c59
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h
@@ -0,0 +1,2260 @@
+// Copyright (c) 2011 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $UR$
+// $Id$
+//
+//
+// Author(s)     : Sebastien Loriot
+
+#ifndef CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
+#define CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
+
+#include <CGAL/intersection_of_Polyhedra_3.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Default.h>
+
+#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h> 
+
+#include <CGAL/Side_of_triangle_mesh.h>
+#include <CGAL/property_map.h>
+#include <boost/optional.hpp>
+#include <boost/next_prior.hpp>
+
+#include <fstream>
+#include <sstream>
+
+//  TODOCUMENT
+//  --We suppose that the two input polyhedra are triangulated orientable surfaces.
+//  --Any polyhedron defines two bounding volumes: one inside and one outside.
+//    The convention used is the following: the normal of a triangle always indicates
+//    the outside of the object.
+//  --The  input polyhedra should not touch at only one point locally. If so, the current
+//    implementation just ignore it (TAG SL001)
+//  --Polyhedron type should be list-based or should guarantee no reallocation. We use maps
+//    on pointer of halfedges,facets and vertices
+//  --Polyhedral_mesh_domain requires the domain tp be closed: do not provided as input
+//    an open polyhedral surface and a polyhedron with a connected component free from intersection
+//OPTIMIZATIONS
+//  --cdt: try using intervals? in that case, only points inside the face should be considered
+//         and points on edge should be handled by hand (simply start using the point opposite to the edge)
+//  --filtered_order_around_edge: can be done using the original supporting planes
+//  --in intersection_of_Polyhedra_3: upon call to Triangle_segment_intersection_point::add_new_node, interval and exact nodes are
+//    inserted into a vector. Since we do not know the final size of vector this lead to reallocation of data.   
+//  --in Triangle_segment_intersection_point, try using EPEC instead of Interval_nt+SC<Gmpq>
+//  --use a sorted pair of indices in edge_to_hedge+simplify the code TAG_SLXX1
+//  --in sew_2_marked_darts arrange how darts are passed to avoid comparing to a Point_3
+//TODO:
+//  --validity of the embedding: points inserted in polyhedron are approximation of the real
+//    intersection points. It may happen that because of the approximation, the embedding gets
+//    wrong. To avoid this, for each new triangle created, we should make an orientation test
+//    with the approximated point to check if this is correct. If not, points must be moved
+//    within their double interval so that all triangles incident to each of these points are correctly
+//    oriented. This is probably an expensive test that can be activated only with a template parameter
+//    of something similar.
+namespace CGAL
+{
+  
+  namespace internal_IOP
+  {
+    template <class Polyhedron>
+    struct Compare_unik_address{
+      typedef typename Polyhedron::Halfedge_handle        Halfedge_handle;
+      typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
+      typedef typename Polyhedron::Halfedge               Halfedge;
+      
+      bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
+        Halfedge* ph1=&(*h1) < &(*h1->opposite()) ? &(*h1) : &(*h1->opposite());
+        Halfedge* ph2=&(*h2) < &(*h2->opposite()) ? &(*h2) : &(*h2->opposite());
+        return  ph1 < ph2; 
+      }
+
+      bool operator()(Halfedge_const_handle h1,Halfedge_const_handle h2) const {
+        const Halfedge* ph1=&(*h1) < &(*h1->opposite()) ? &(*h1) : &(*h1->opposite());
+        const Halfedge* ph2=&(*h2) < &(*h2->opposite()) ? &(*h2) : &(*h2->opposite());
+        return  ph1 < ph2; 
+      }
+    };
+
+  template <class Polyhedron>
+  struct Compare_address{
+    typedef typename Polyhedron::Halfedge_handle        Halfedge_handle;
+    typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
+    typedef typename Polyhedron::Halfedge               Halfedge;
+    
+    bool operator()(Halfedge_handle h1,Halfedge_handle h2) const {
+      return  &(*h1) < &(*h2); 
+    }
+
+    bool operator()(Halfedge_const_handle h1,Halfedge_const_handle h2) const {
+      return  &(*h1) < &(*h2); 
+    }
+  };
+
+  template <class Polyhedron>
+  class Non_intersection_halfedge{
+    typedef std::map< typename Polyhedron::Halfedge_const_handle,
+                      std::pair<int,int>,
+                      Compare_unik_address<Polyhedron> 
+                    >  Intersection_hedges_set;
+    Intersection_hedges_set intersection_hedges_;
+  public:  
+    Non_intersection_halfedge(const Intersection_hedges_set& the_set) : intersection_hedges_(the_set){}
+  
+  
+    bool operator()(typename Polyhedron::Halfedge_const_handle h) const
+    {
+      return intersection_hedges_.find(h)==intersection_hedges_.end();
+    }
+  };
+
+    
+  template <class HDS, class NestedFacetConstruct, class NewNodeVertexVisitor>
+  class Triangulate_a_face : public CGAL::Modifier_base<HDS> {
+    typedef typename HDS::Halfedge_handle Halfedge_handle;
+    typedef typename HDS::Vertex_handle   Vertex_handle;
+    typedef typename HDS::Face_handle     Face_handle;
+    typedef typename HDS::Vertex          Vertex;
+    typedef typename HDS::Halfedge        Halfedge;
+    typedef typename HDS::Face            Face;
+    
+    //data members
+    Face_handle current_face;
+    std::map<int,typename Vertex::Point >                  nodes_;
+    std::map<int,Vertex_handle>&                           node_to_polyhedron_vertex_;
+    std::map<std::pair<int,int>,Halfedge_handle>&          edge_to_hedge_;
+    std::vector<std::pair<int,int> >                       edges_to_create_;
+    std::vector<CGAL::cpp11::tuple<int,int,int> >          faces_to_create_;
+    NestedFacetConstruct facet_construct;
+    NewNodeVertexVisitor& node_vertex_visitor;
+
+    typename HDS::Halfedge::Base*
+    unlock_halfedge(Halfedge_handle h){
+      return static_cast<typename HDS::Halfedge::Base*>(&(*h));
+    }
+    
+    typename HDS::Face::Base*
+    unlock_face(Face_handle f){
+      return static_cast<typename HDS::Face::Base*>(&(*f));
+    }    
+    
+  public:
+    
+    template <class Nodes_vector,class Triangulation>
+    Triangulate_a_face( Face_handle face,
+                        const Nodes_vector& nodes,
+                        const std::vector<int>& node_ids,
+                        std::map<int,Vertex_handle>& node_to_polyhedron_vertex,
+                        std::map<std::pair<int,int>,Halfedge_handle>& edge_to_hedge,
+                        const Triangulation& triangulation,
+                        const NestedFacetConstruct& fc,
+                        NewNodeVertexVisitor& nv)
+    :current_face(face), node_to_polyhedron_vertex_(node_to_polyhedron_vertex), edge_to_hedge_(edge_to_hedge), facet_construct(fc), node_vertex_visitor(nv)
+    {
+      //grab vertices to be inserted to copy them from the vector
+      for (std::vector<int>::const_iterator it=node_ids.begin();it!=node_ids.end();++it)
+      {
+        nodes_.insert(std::make_pair(*it,nodes[*it]));
+      }
+      //grab edges that are not on the convex hull (these have already been created)
+      for (typename Triangulation::Finite_edges_iterator 
+        it=triangulation.finite_edges_begin();
+        it!=triangulation.finite_edges_end();
+        ++it)
+      {
+        typename Triangulation::Vertex_handle v0=it->first->vertex((it->second+1)%3);
+        typename Triangulation::Vertex_handle v1=it->first->vertex((it->second+2)%3);
+        //warning in degenerate cases you can insert outsite expected convex hull edges: need exact here.
+        //an alternative is to test if one the incident faces are infinite (cf assertion below)
+        if ( edge_to_hedge_.find(std::make_pair(v0->info(),v1->info()))==edge_to_hedge_.end() &&
+             edge_to_hedge_.find(std::make_pair(v1->info(),v0->info()))==edge_to_hedge_.end()    )
+        {
+          edges_to_create_.push_back( std::make_pair(v0->info(),v1->info()) );
+        }
+        else
+            CGAL_assertion( triangulation.is_infinite(it->first->vertex(it->second)) || triangulation.is_infinite( triangulation.mirror_vertex(it->first,it->second)) );
+      }
+      //grab triangles.
+      for (typename Triangulation::Finite_faces_iterator 
+        it=triangulation.finite_faces_begin();
+        it!=triangulation.finite_faces_end();
+        ++it)
+      {
+        typename Triangulation::Vertex_handle v0=it->vertex(0);
+        typename Triangulation::Vertex_handle v1=it->vertex(1);
+        typename Triangulation::Vertex_handle v2=it->vertex(2);
+        //warning in degenerate case we can have non wanted triangles: need exact here
+        faces_to_create_.push_back( CGAL::cpp11::make_tuple( v0->info(),v1->info(),v2->info() ) );
+      }
+    }
+
+
+  
+    void operator()( HDS& hds) {
+//      std::cerr << "node_to_polyhedron_vertex_"<< std::endl;
+//      for (typename std::map<int,Vertex_handle>::iterator it=node_to_polyhedron_vertex_.begin();it!=node_to_polyhedron_vertex_.end();++it)
+//        std::cerr << it->first << " " << &(*(it->second)) << std::endl;
+      
+      //insert the intersection point interior to the face inside the polyhedron and
+      //save their Polyhedron::vertex_handle 
+      for (typename std::map<int,typename Vertex::Point>::iterator it=nodes_.begin();it!=nodes_.end();++it)
+      {
+        Vertex_handle v=hds.vertices_push_back(Vertex(it->second));
+        node_vertex_visitor.new_vertex_added(it->first, v);
+        CGAL_assertion( node_to_polyhedron_vertex_.find( it->first ) == node_to_polyhedron_vertex_.end());
+        node_to_polyhedron_vertex_.insert( std::make_pair(it->first,v) );
+//        std::cerr << "vertices " << it->first  << " " << &(*v) << std::endl;
+      }
+      
+      //insert the new halfedge and set their incident vertex
+      for (typename std::vector<std::pair<int,int> >::iterator 
+        it=edges_to_create_.begin();it!=edges_to_create_.end();++it)
+      {
+        Halfedge_handle he=hds.edges_push_back(Halfedge(),Halfedge());
+        
+        //associate edge <i,j> to halfedge going from i to j with j as incident vertex
+        CGAL_assertion(node_to_polyhedron_vertex_.find(it->second)!= node_to_polyhedron_vertex_.end());
+        Vertex_handle v=node_to_polyhedron_vertex_.find(it->second)->second;
+        unlock_halfedge(he)->set_vertex( v );
+        v->set_halfedge(he);
+//        std::cerr << "  --in edge " << &(*v) << std::endl;
+        edge_to_hedge_.insert( std::make_pair(*it,he) ); 
+        v=node_to_polyhedron_vertex_.find(it->first)->second;
+//        std::cerr << "  --in edge " << &(*v) << std::endl;
+        unlock_halfedge( he->opposite() )->set_vertex( v );
+        v->set_halfedge(he->opposite());
+        edge_to_hedge_.insert( std::make_pair(std::make_pair(it->second,it->first),he->opposite()) );
+//        std::cerr << "edges " << it->first <<  " " << it->second << std::endl;
+      }
+      
+      std::vector<CGAL::cpp11::tuple<int,int,int> >::iterator it=faces_to_create_.begin();
+      Face_handle face_triangulated = current_face;
+      //create the new faces and update adjacencies
+      while (true)
+      {
+        int i=cpp11::get<0>(*it),j=cpp11::get<1>(*it),k=cpp11::get<2>(*it);
+//        std::cerr << "faces " << i <<  " " << j  << " " << k<< std::endl;        
+        Halfedge_handle current  = edge_to_hedge_.find(std::make_pair(i,j))->second;
+        Halfedge_handle next     = edge_to_hedge_.find(std::make_pair(j,k))->second;
+        Halfedge_handle previous = edge_to_hedge_.find(std::make_pair(k,i))->second;
+ 
+
+        CGAL_assertion (edge_to_hedge_.find(std::make_pair(i,j))!=edge_to_hedge_.end());
+        CGAL_assertion (edge_to_hedge_.find(std::make_pair(j,k))!=edge_to_hedge_.end());
+        CGAL_assertion (edge_to_hedge_.find(std::make_pair(k,i))!=edge_to_hedge_.end());
+        
+        CGAL_assertion(current->vertex()==node_to_polyhedron_vertex_.find(j)->second);
+        CGAL_assertion(next->vertex()==node_to_polyhedron_vertex_.find(k)->second);
+        CGAL_assertion(previous->vertex()==node_to_polyhedron_vertex_.find(i)->second);
+        
+        unlock_halfedge(current)->set_next(next);
+        unlock_halfedge(next)->set_next(previous);
+        unlock_halfedge(previous)->set_next(current);
+        
+        unlock_halfedge(current)->set_prev(previous);
+        unlock_halfedge(next)->set_prev(current);
+        unlock_halfedge(previous)->set_prev(next);
+        
+        //update face halfedge
+        unlock_face(current_face)->set_halfedge(current);
+        
+        //update face of halfedges
+        unlock_halfedge(current)  ->set_face(current_face);
+        unlock_halfedge(next)     ->set_face(current_face);
+        unlock_halfedge(previous) ->set_face(current_face);        
+        
+        if ( ++it!=faces_to_create_.end() )
+          current_face=hds.faces_push_back( facet_construct(*face_triangulated) );
+        else
+          break;
+      }
+    }
+  };    
+ 
+  } //namespace internal_IOP
+
+  
+//Considering the plane with normal vector [O_prime,O] and containing O. 
+//We define the counterclockwise order around O when looking from the side of the plane 
+//into which the vector [O_prime,O] is pointing.
+//We consider the portion of the plane defined by rotating a ray starting at O
+//from the planar projection of P1 to the planar projection of P2 in counterclockwise order.
+//The predicates indicates whether the planar projection of point Q lies in this portion of the plane.
+//Preconditions:
+//  O_prime,O,P1 are not collinear
+//  O_prime,O,P2 are not collinear
+//  O_prime,O,Q are not collinear
+//  O_prime,O,P1,Q are not coplanar or coplanar_orientation(O,O_prime,P1,Q)==NEGATIVE
+//  O_prime,O,P2,Q are not coplanar or coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE
+template <class Kernel>
+bool  is_in_interior_of_object(
+    const typename Kernel::Point_3& O_prime,const typename Kernel::Point_3& O,
+    const typename Kernel::Point_3& P1,const typename Kernel::Point_3& P2,
+    const typename Kernel::Point_3& Q)
+{
+  //guarantee to have non-flat triangles
+  CGAL_precondition( !collinear(O_prime,O,P1) );
+  CGAL_precondition( !collinear(O_prime,O,P2) );
+  CGAL_precondition( !collinear(O_prime,O,Q)  );
+
+  //no two triangles are coplanar and on the same side of their common edge
+  CGAL_precondition( !coplanar(O_prime,O,P1,Q) || coplanar_orientation(O,O_prime,P1,Q)==NEGATIVE );
+  CGAL_precondition( !coplanar(O_prime,O,P2,Q) || coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE );
+  
+  Sign s0 = sign( determinant(O-O_prime,P1-O,P2-O) );
+  
+  if ( s0==ZERO ){
+    //O, O_prime, P1 and P2 are coplanar
+    Orientation o=orientation(O_prime,O,P1,Q);
+    CGAL_precondition(o!=COPLANAR);
+    return o==POSITIVE;
+  }
+  
+  //O, O_prime, P1 and P2 are not coplanar
+  Sign s1 = sign( determinant(O-O_prime,P1-O,Q -O) );
+  Sign s2 = sign( determinant(O-O_prime,Q -O,P2-O) );
+
+  if (s0 == POSITIVE) // the angle P1,O,P2 is smaller that Pi.
+    return ( s1 == POSITIVE ) && ( s2 ==POSITIVE ); //true if the angles P1,O,Q and Q,O,P2 are smaller than Pi
+  else
+    return ( s1 != NEGATIVE ) || ( s2 != NEGATIVE ); //true if the angle P1,O,Q or the angle Q,O,P2 is smaller than or equal to Pi
+}
+
+//import into the combinatorial map facets in the given range.
+//they are supposed to be in the same connected component.
+//two volume are created (each facets gives two opposite orientation 2-cell in the map)
+template<class Polyhedron, class Map, class Face_iterator, class Non_special_edge_predicate,class Halfedge_to_dart_map_ >
+typename Map::Dart_handle import_from_polyhedron_subset(  Map& amap,
+                                                          Face_iterator faces_begin,
+                                                          Face_iterator faces_end,
+                                                          const Non_special_edge_predicate& is_non_special_edge,
+                                                          Halfedge_to_dart_map_& selected_hedge_to_dart,
+                                                          int mark_index
+  )
+{
+  typedef typename Polyhedron::Halfedge_const_handle  Halfedge_const_handle;
+  typedef std::map < Halfedge_const_handle, typename Map::Dart_handle,internal_IOP::Compare_address<Polyhedron> > Halfedge_to_dart_map;
+   
+  Halfedge_to_dart_map hedge_to_dart;
+  typename Map::Dart_handle first_dart = NULL;
+  // First traversal to build the darts and link them.
+  for (Face_iterator it_face = faces_begin; it_face != faces_end; ++it_face)
+  {
+    Halfedge_const_handle start=(*it_face)->halfedge();
+    
+    CGAL_precondition(start->next()!=start);
+    
+    Halfedge_const_handle current=start;
+    typename Map::Dart_handle prev = NULL;
+    typename Map::Dart_handle first_dart_of_face = NULL;
+    do
+    {
+      typename Map::Dart_handle d = amap.create_dart();
+      amap.template link_beta<3>(d,amap.create_dart()); //for opposite volume
+      hedge_to_dart[current] = d;
+             
+      if (prev != NULL){
+        amap.template link_beta<1>(prev, d);
+        amap.template link_beta<1>(d->beta(3),prev->beta(3));//for opposite volume
+      }
+      else 
+      {
+        first_dart_of_face = d;
+        if (first_dart==NULL) first_dart=d;
+      }
+      
+      if ( is_non_special_edge (current) ){
+        if ( !current->is_border_edge() ){
+          CGAL_assertion(current != current->opposite());
+          typename Halfedge_to_dart_map::iterator it = hedge_to_dart.find(current->opposite());
+          if (it != hedge_to_dart.end()){ //link the opposites halfedges only when both corresponding darts have been created
+            amap.template link_beta<2>(d, it->second);
+            amap.template link_beta<2>(d->beta(3), it->second->beta(3));//for opposite volume
+          }
+        }
+      }
+      else{
+        typename Halfedge_to_dart_map_::iterator it_hedge_map=selected_hedge_to_dart.find(current);
+         //all marked hedges are not the selected one for its polyline
+        if ( it_hedge_map!=selected_hedge_to_dart.end() ) it_hedge_map->second=d;
+        //darts d and d->beta(3) are special edges
+        amap.mark(d,mark_index);
+        amap.mark(d->beta(3),mark_index);
+      }
+      prev = d;
+      current=current->next();
+    }
+    while (current != start);
+    amap.template link_beta<1>(prev, first_dart_of_face);
+    amap.template link_beta<1>(first_dart_of_face->beta(3),prev->beta(3));//for opposite volume
+  }
+
+  // Second traversal to update the geometry.
+  // We run one again through the facets of the HDS.
+  for (Face_iterator it_face = faces_begin; it_face != faces_end; ++it_face)
+  {
+    Halfedge_const_handle start=(*it_face)->halfedge();
+    Halfedge_const_handle current=start;
+    do
+    {
+      typename Map::Dart_handle d = hedge_to_dart[current]; // Get the dart associated to the Halfedge
+      if (d->template attribute<0>() == NULL)
+      {	    
+        amap.template set_attribute<0>(d,
+           amap.template create_attribute<0>(current->opposite()->vertex()->point()));
+      }
+      current=current->next();
+    }
+    while (current != start);
+  }
+  
+  return first_dart;
+}
+
+ //turn around the target vertex of dart to find a marked dart
+template <class Combinatorial_map_3>
+boost::optional<typename Combinatorial_map_3::Dart_handle> 
+next_marked_dart_around_target_vertex(
+  const Combinatorial_map_3& final_map,
+  typename Combinatorial_map_3::Dart_handle dart,
+  int mark_index)
+{
+  CGAL_precondition(final_map.is_marked(dart,mark_index));
+  typename Combinatorial_map_3::Dart_handle next=dart->beta(1);
+  while ( ! final_map.is_marked(next,mark_index) ){
+    if (next->is_free(2) )//we reach a boundary
+      return  boost::optional<typename Combinatorial_map_3::Dart_handle>();
+    next=next->beta(2)->beta(1);
+  }
+  if (next == dart) //no new dart have been found  
+    return  boost::optional<typename Combinatorial_map_3::Dart_handle>();
+  CGAL_precondition(&dart->beta(1)->template attribute<0>()->point() == &next->template attribute<0>()->point());
+  return boost::optional<typename Combinatorial_map_3::Dart_handle> (next);
+}
+
+//turn around the target vertex of dart to find a marked dart
+//with expected_target as target vertex
+template <class Combinatorial_map_3>
+typename Combinatorial_map_3::Dart_handle
+get_next_marked_dart_around_target_vertex(
+  const Combinatorial_map_3& final_map,
+  typename Combinatorial_map_3::Dart_handle dart,
+  int mark_index)
+{
+  CGAL_precondition(final_map.is_marked(dart,mark_index));
+  typename Combinatorial_map_3::Dart_handle next=dart->beta(1);
+  while ( !final_map.is_marked(next,mark_index) ){
+    CGAL_assertion( !next->is_free(2) );
+    next=next->beta(2)->beta(1);
+    CGAL_assertion(next != dart);
+  }
+  CGAL_precondition(&dart->beta(1)->template attribute<0>()->point() == &next->template attribute<0>()->point());
+  return next;
+}
+
+//turn around the source vertex of dart to find a marked dart
+//with expected_source as source vertex
+template <class Combinatorial_map_3>
+typename Combinatorial_map_3::Dart_handle 
+get_next_marked_dart_around_source_vertex(  
+  const Combinatorial_map_3& final_map,
+  typename Combinatorial_map_3::Dart_handle dart,
+  int mark_index)
+{
+  CGAL_precondition(final_map.is_marked(dart,mark_index));
+  typename Combinatorial_map_3::Dart_handle next=dart->beta(0);
+  while ( ! final_map.is_marked(next,mark_index) ){ 
+    CGAL_assertion( !next->is_free(2) );
+    next=next->beta(2)->beta(0);
+    CGAL_assertion(next != dart);
+  }
+  CGAL_precondition(&dart->template attribute<0>()->point() == &next->beta(1)->template attribute<0>()->point());
+  return next;
+}
+
+//given two marked darts, this function links these two darts with beta<2>
+//but in addition it follows the marked darts connected to the same vertex
+//(there should be only one) to connect them all together
+//( this function is a kind of zipper ;) )
+template <class Combinatorial_map_3,class Nodes_vector>
+void sew_2_marked_darts( Combinatorial_map_3& final_map,
+                         typename Combinatorial_map_3::Dart_handle dart_1 , 
+                         typename Combinatorial_map_3::Dart_handle dart_2 ,
+                         int mark_index,
+                         const Nodes_vector& nodes,
+                         const std::pair<int,int>& indices,
+                         const std::pair<bool,int>& polyline_info)
+{
+  CGAL_precondition( dart_1->is_free(2) );
+  CGAL_precondition( dart_2->is_free(2) );
+  CGAL_precondition( final_map.is_marked(dart_1,mark_index) );
+  CGAL_precondition( final_map.is_marked(dart_2,mark_index) );
+  CGAL_precondition( dart_1->template attribute<0>()->point() == dart_2->beta(1)->template attribute<0>()->point() );
+  CGAL_precondition( dart_1->beta(1)->template attribute<0>()->point() == dart_2->template attribute<0>()->point() );
+  
+  int src_index = ( ( indices.first < indices.second) ==  polyline_info.first )
+                  ? indices.second:indices.first;
+  
+  if ( dart_1->template attribute<0>()->point() != nodes[ src_index ] ) std::swap(dart_1,dart_2);
+  
+  int nb_segs=polyline_info.second-1,k=1;
+  
+  do{
+    CGAL_precondition( final_map.template is_sewable<2>(dart_1,dart_2) );
+    final_map.template sew<2>(dart_1,dart_2);
+    
+    if (k==nb_segs) break;
+      
+    dart_1=get_next_marked_dart_around_target_vertex(final_map,dart_1,mark_index);
+    dart_2=get_next_marked_dart_around_source_vertex(final_map,dart_2,mark_index);
+  }
+  while(++k);
+}
+
+//not_top and not_down are two darts from volumes that get merged with an existing
+//other one because of a set of identical coplanar triangles.
+//top and down is the dart of the volumes "replacing" that of not_top and not down respectively, 
+//The function is considering all triangles that are bounded by a cycle of marked edges.
+//The volume not_top and not_down are part of are those that will disappear at the
+//end of the main algorithm.
+//( this function is a kind of facet gluer ;) )
+template <class Combinatorial_map_3>
+void sew_3_marked_darts( Combinatorial_map_3& final_map,
+                         typename Combinatorial_map_3::Dart_handle not_top , 
+                         typename Combinatorial_map_3::Dart_handle not_down ,
+                         typename Combinatorial_map_3::Dart_handle top , 
+                         typename Combinatorial_map_3::Dart_handle down ,
+                         int mark_index,
+                         std::set<typename Combinatorial_map_3::Dart_handle>& darts_to_remove)
+{
+  typedef boost::optional<typename Combinatorial_map_3::Dart_handle> O_Dart_handle;
+
+  if ( not_top->template attribute<3>()->info().is_empty ){
+    CGAL_assertion(not_down->template attribute<3>()->info().is_empty);
+    return;
+  }
+   
+  CGAL_assertion(!not_down->template attribute<3>()->info().is_empty);
+
+  //merge attribute of the two volumes:
+  internal_IOP::Volume_on_merge merge_attributes;
+  merge_attributes(*top->template attribute<3>(),*not_top->template attribute<3>());
+  merge_attributes(*down->template attribute<3>(),*not_down->template attribute<3>());
+  
+  //set volume attributes as empty to avoid double sew_3 of the same topological disk of triangles
+  not_top->template attribute<3>()->info().is_empty=true;
+  not_down->template attribute<3>()->info().is_empty=true;
+  
+  CGAL_precondition( final_map.is_marked(not_top,mark_index) && final_map.is_marked(top,mark_index) );
+  CGAL_precondition( final_map.is_marked(not_down,mark_index) && final_map.is_marked(down,mark_index) );
+  CGAL_precondition( not_top->template attribute<0>()->point() == not_down->beta(1)->template attribute<0>()->point() );
+  CGAL_precondition( not_top->beta(1)->template attribute<0>()->point() == not_down->template attribute<0>()->point() );
+  CGAL_precondition( not_top->template attribute<0>()->point() == top->template attribute<0>()->point() );
+  CGAL_precondition( not_down->template attribute<0>()->point() == down->template attribute<0>()->point() );
+  
+  CGAL_assertion( top->beta(3)==down );
+
+  //set to be removed the darts of the two no longer used volumes
+  typename Combinatorial_map_3::Dart_handle start=not_top;
+  do
+  {
+    CGAL_assertion(!not_top->is_free(3));
+    darts_to_remove.insert(not_top);   darts_to_remove.insert(not_top->beta(1)); darts_to_remove.insert(not_top->beta(1)->beta(1));
+    darts_to_remove.insert(not_top->beta(3));   darts_to_remove.insert(not_top->beta(3)->beta(1)); darts_to_remove.insert(not_top->beta(3)->beta(1)->beta(1));
+    O_Dart_handle current_1=next_marked_dart_around_target_vertex(final_map,not_top,mark_index);
+    CGAL_precondition(bool(current_1));
+    not_top=*current_1;
+  }
+  while(not_top!=start);
+}
+
+template<class Polyhedron>
+struct Dummy_edge_mark_property_map{
+  typedef bool value_type;
+  typedef value_type reference;
+  typedef std::pair<typename Polyhedron::Halfedge_handle,Polyhedron*> key_type;
+  typedef boost::read_write_property_map_tag category;  
+
+  Dummy_edge_mark_property_map(){}
+
+  friend reference get(Dummy_edge_mark_property_map,key_type) {return false;}
+  friend void put(Dummy_edge_mark_property_map,key_type,value_type) {}
+};
+
+template <class Polyhedron>
+struct Default_facet_construct{
+  typename Polyhedron::Facet operator()( const typename Polyhedron::Facet& )
+  { return typename Polyhedron::Facet(); }
+};
+
+template <class Polyhedron>
+struct Default_node_vertex_visitor{
+  void new_node_added(  int /* node_id */,
+                        internal_IOP::Intersection_type /* type */,
+                        typename Polyhedron::Halfedge_handle /* principal_edge */,
+                        typename Polyhedron::Halfedge_handle /* additional_edge */,
+                        bool /* is_vertex_coplanar */,
+                        bool /* is_vertex_opposite_coplanar */ )
+  {}
+
+  void new_vertex_added(int /* node_id */, typename Polyhedron::Vertex_handle /* vh */){}
+};
+
+template< class Polyhedron,
+          class Kernel_=Default,
+          class EdgeMarkPropertyMap_=Default,
+          class NestedFacetConstruct_=Default,
+          class NewNodeVertexVisitor_=Default
+        >
+class Node_visitor_refine_polyhedra{
+//Default typedefs
+  typedef typename Default::Get<Kernel_, typename Polyhedron::Traits::Kernel>::type Kernel;
+  typedef typename Default::Get<EdgeMarkPropertyMap_, Dummy_edge_mark_property_map<Polyhedron> >::type EdgeMarkPropertyMap;
+  typedef typename Default::Get<NestedFacetConstruct_, Default_facet_construct<Polyhedron > >::type NestedFacetConstruct;
+  typedef typename Default::Get<NewNodeVertexVisitor_, Default_node_vertex_visitor<Polyhedron> >::type NewNodeVertexVisitor;
+//typedefs  
+  typedef typename Polyhedron::Halfedge_handle                         Halfedge_handle;
+  typedef typename Polyhedron::Halfedge_const_handle                   Halfedge_const_handle;
+  typedef typename Polyhedron::Face_handle                             Face_handle;
+  typedef typename Polyhedron::Halfedge                                Halfedge;
+  typedef typename Polyhedron::Vertex_handle                           Vertex_handle;
+  typedef internal_IOP::Compare_handles<Polyhedron,CGAL::Tag_false>    Cmp_handle; //This ensures uniqueness of edges when comparing halfedges
+  typedef internal_IOP::Compare_unik_address<Polyhedron>               Cmp_unik_ad; //This ensures uniqueness of edges when comparing halfedges
+  
+  //constrained triangulation used for triangulation interior of faces
+  #ifdef DO_NO_USE_EXACT_CDT 
+  typedef CGAL::Triangulation_vertex_base_with_info_2<int,Kernel>       Vbi;
+  typedef CGAL::Constrained_triangulation_face_base_2<Kernel>           Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vbi,Fb>                  TDS_2;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<Kernel,TDS_2,CGAL::No_intersection_tag> CDT;  //DO WE NEED DELAUNAY????
+  #else
+  /// \todo change this, use it only if not already exact
+  typedef CGAL::Exact_predicates_exact_constructions_kernel             Exact_kernel;
+  typedef CGAL::Triangulation_vertex_base_with_info_2<int,Exact_kernel> Vbi;
+  typedef CGAL::Constrained_triangulation_face_base_2<Exact_kernel>           Fb;
+  typedef CGAL::Triangulation_data_structure_2<Vbi,Fb>                  TDS_2;
+  typedef CGAL::Constrained_Delaunay_triangulation_2<Exact_kernel,TDS_2,CGAL::No_intersection_tag> CDT;  //DO WE NEED DELAUNAY????  
+  #endif
+  
+  typedef std::map<Halfedge_handle,Polyhedron*,Cmp_unik_ad>            Hedge_to_polyhedron_map;
+
+  typedef std::vector<int>                                             Node_ids;
+  typedef std::set<int>                                                Node_id_set; //avoid having duplicated node on edge of coplanar triangles
+  typedef std::map< Face_handle,Node_ids,Cmp_handle >                  In_face_map; 
+  typedef std::map< Halfedge_handle,Node_id_set,Cmp_unik_ad >          In_halfedge_map;
+  //to keep the correspondance between node_id and vertex_handle in each polyhedron
+  typedef std::map<int,Vertex_handle> Node_to_polyhedron_vertex_map;
+  typedef std::map<Polyhedron*, Node_to_polyhedron_vertex_map > Poly_to_map_node;
+  //to maintain an polyhedron halfedge on each polyline + pair<bool,int>
+  //with first = "is the key (pair<int,int>) was reversed?" and second is the number of edges +1 in the polyline
+  typedef std::map< std::pair<int,int>, std::pair< std::map<Polyhedron*,Halfedge_handle>,std::pair<bool,int> > > An_edge_per_polyline_map;  
+  //to handle coplanar halfedge of polyhedra that are full in the intersection
+  typedef std::map< int,Halfedge_handle >                              Node_to_target_of_hedge_map;
+  typedef std::map< Polyhedron*,Node_to_target_of_hedge_map>           Poly_to_vertices_on_intersection_map;
+
+  //Combinatorial map typedefs
+  typedef internal_IOP::Item_with_points_and_volume_info<Kernel,Polyhedron> Items;
+  typedef CGAL::Combinatorial_map<3,Items> Combinatorial_map_3_;
+  typedef typename Combinatorial_map_3_::Dart_handle Dart_handle;
+  
+//data members
+  Hedge_to_polyhedron_map               hedge_to_polyhedron;
+  In_face_map                           in_face;
+  In_halfedge_map                       in_hedge;
+  std::map< int,std::set<int> >         graph_of_constraints;
+  std::map< int,std::set<int> >         coplanar_constraints;
+  An_edge_per_polyline_map              an_edge_per_polyline;
+  typename An_edge_per_polyline_map::iterator last_polyline;
+  Poly_to_vertices_on_intersection_map  poly_to_vertices_on_inter;
+  Poly_to_map_node                      polyhedron_to_map_node_to_polyhedron_vertex;
+  std::set<int>                         non_manifold_nodes; //contain nodes that are original vertices of input polyhedron and that neighborhood is not a topological disk
+  std::map<Vertex_handle,int>           nodes_that_are_original_vertices;//to keep the correspondance between original polyhedron vertices that are also nodes
+  
+  Combinatorial_map_3_*                 final_map_ptr;
+  Combinatorial_map_3_&                 final_map() {return *final_map_ptr;}
+  bool final_map_comes_from_outside;
+  //   new_hedge    hedge
+  //  ----------->   ----------->
+  //               v
+  //  <-----------   <-----------
+  //   new_opposite     opposite 
+  //  
+  Vertex_handle split_edge( Halfedge_handle hedge,
+                            const typename Kernel::Point_3& point,
+                            Polyhedron& P)
+  {
+    internal_IOP::Split_halfedge_at_point<typename Polyhedron::HalfedgeDS> delegated(hedge,point);
+    P.delegate( delegated );
+    CGAL_assertion(P.is_valid());
+    
+    //update marker tags. If the edge was marked, then the resulting edges in the split must be marked
+    if ( get(m_edge_mark_pmap,std::make_pair(hedge,&P)) )
+    {
+      CGAL_assertion( get(m_edge_mark_pmap,std::make_pair(hedge->opposite(),&P)) );
+      put(m_edge_mark_pmap,std::make_pair(hedge->prev(),&P),true);
+      put(m_edge_mark_pmap,std::make_pair(hedge->prev()->opposite(),&P),true);
+      put(m_edge_mark_pmap,std::make_pair(hedge->opposite()->next(),&P),true);
+      put(m_edge_mark_pmap,std::make_pair(hedge->opposite()->next()->opposite(),&P),true);
+    }
+    
+    Vertex_handle v=boost::prior(P.vertices_end());
+    CGAL_assertion(v->point()==point);
+    return v;
+  }
+
+  //sort node ids so that we can split the hedge
+  //consecutively
+  template <class Nodes_vector>
+  void sort_vertices_along_hedge(std::vector<int>& node_ids,Halfedge_handle hedge,const Nodes_vector& nodes)
+  {
+    std::sort(node_ids.begin(),
+              node_ids.end(),
+              internal_IOP::Order_along_a_halfedge<Polyhedron,Nodes_vector,Is_polyhedron_const>(hedge,nodes)
+    );
+  }
+  
+  //insert intersection as constrained edges  in a CDT triangulation
+  template <class CDT>
+  void insert_constrained_edges_coplanar_case(int node_id,
+                                              CDT& triangulation,
+                                              std::map<int,typename CDT::Vertex_handle>& id_to_CDT_vh)
+  {
+    if (node_id < number_coplanar_vertices){
+      //XSL_TAG_CPL_VERT
+      //Insert constrained edges from coplanar facets that have been retriangulated. This ensure that triangulations are compatible
+      std::map< int,std::set<int> >::iterator it_neighbors=coplanar_constraints.find(node_id);
+      if (it_neighbors!=coplanar_constraints.end())
+      {
+        typename CDT::Vertex_handle vh=id_to_CDT_vh.find(node_id)->second;
+        for (std::set<int>::iterator it_n=it_neighbors->second.begin();it_n!=it_neighbors->second.end();++it_n){
+          typename std::map<int,typename CDT::Vertex_handle>::iterator it_vh=id_to_CDT_vh.find(*it_n);
+          // this condition ensures to consider only graph edges that are in the same triangle (not in a neighbor one when involving node on a triangle edge)
+          // here we can't make the difference between a point on the interior or the boundary, so points_on_triangle is not used.
+          if ( it_vh!=id_to_CDT_vh.end() ){
+            triangulation.insert_constraint(vh,id_to_CDT_vh.find(*it_n)->second);
+          }
+        }
+      }
+    }
+  }
+  //insert intersection as constrained edges  in a CDT triangulation
+  template <class CDT,class Constrained_edges_map>
+  void insert_constrained_edges(Node_ids& node_ids, //index of vertices we are interested in
+                                CDT& triangulation,
+                                std::map<int,typename CDT::Vertex_handle>& id_to_CDT_vh,
+                                Constrained_edges_map& constrained_edges, //list of pair of int to indicate edges that are constrained
+                                bool points_on_triangle=false)
+  {
+    for (Node_ids::iterator it_node_id=node_ids.begin();it_node_id!=node_ids.end();++it_node_id){
+      std::map< int,std::set<int> >::iterator it_neighbors=graph_of_constraints.find(*it_node_id);
+      if (it_neighbors!=graph_of_constraints.end())
+      {
+        typename CDT::Vertex_handle vh=id_to_CDT_vh.find(*it_node_id)->second;
+        for (std::set<int>::iterator it_n=it_neighbors->second.begin();it_n!=it_neighbors->second.end();++it_n){
+          typename std::map<int,typename CDT::Vertex_handle>::iterator it_vh=id_to_CDT_vh.find(*it_n);
+          // this condition ensures to consider only graph edges that are in the same triangle (not in a neighbor one when involving node on a triangle edge)
+          if ( !points_on_triangle || it_vh!=id_to_CDT_vh.end() ){ 
+            CGAL_assertion(it_vh!=id_to_CDT_vh.end());
+            triangulation.insert_constraint(vh,id_to_CDT_vh.find(*it_n)->second);
+            constrained_edges.push_back(std::make_pair(*it_node_id,*it_n));
+          }
+        }
+      }
+      #ifdef CGAL_COREFINEMENT_DEBUG
+      else
+      {
+        std::cout << "X0: Found an isolated point" << std::endl;
+      }
+      #endif
+      
+      insert_constrained_edges_coplanar_case(*it_node_id,triangulation,id_to_CDT_vh);
+    }
+  }
+  
+  std::pair<int,int> make_sorted_pair(int i,int j) const {return i<j ? std::make_pair(i,j):std::make_pair(j,i);} 
+  
+  void update_edge_per_polyline(Polyhedron* P,std::pair<int,int> indices,typename Polyhedron::Halfedge_handle hedge)
+  {
+    std::pair<int,int> sorted_pair=make_sorted_pair(indices.first,indices.second);
+    typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.find(sorted_pair);
+    if (it!=an_edge_per_polyline.end()){
+      it->second.first.insert(std::make_pair( P,sorted_pair.first==indices.first?hedge:hedge->opposite() ));
+    }
+  }
+
+  int node_index_of_incident_vertex(Halfedge_const_handle h,
+                                    const std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad >& border_halfedges)
+  {
+    //WARNING this may be expensive
+    typedef std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad > Border_halfedges_map;
+
+    Halfedge_const_handle start=h;
+    Halfedge_const_handle curr=start;
+    do{
+      typename Border_halfedges_map::const_iterator it_border=border_halfedges.find( curr );
+      if (it_border!=border_halfedges.end())
+        return it_border->first==curr?it_border->second.second:it_border->second.first;      
+      curr=curr->next()->opposite();
+    }while(curr!=start);
+    
+    return -1;
+  }
+  
+  template <class Nodes_vector>
+  bool filtered_order_around_edge(int O_prime_index,
+                                  int O_index,
+                                  int P1_index,
+                                  int P2_index,
+                                  int Q_index,
+                                  Vertex_handle P1,
+                                  Vertex_handle P2,
+                                  Vertex_handle Q,
+                                  const Nodes_vector& nodes)
+  {
+    try{
+      return is_in_interior_of_object<typename Nodes_vector::Ikernel>(
+        nodes.interval_node(O_prime_index),
+        nodes.interval_node(O_index),
+        P1_index == -1 ? nodes.to_interval(P1->point()): nodes.interval_node(P1_index),
+        P2_index == -1 ? nodes.to_interval(P2->point()): nodes.interval_node(P2_index),
+        Q_index  == -1 ? nodes.to_interval(Q->point()) : nodes.interval_node(Q_index )
+      );
+    }
+    catch(Uncertain_conversion_exception&){
+      return is_in_interior_of_object<typename Nodes_vector::Exact_kernel>(
+        nodes.exact_node(O_prime_index),
+        nodes.exact_node(O_index),
+        P1_index == -1 ? nodes.to_exact(P1->point()): nodes.exact_node(P1_index),
+        P2_index == -1 ? nodes.to_exact(P2->point()): nodes.exact_node(P2_index),
+        Q_index  == -1 ? nodes.to_exact(Q->point()) : nodes.exact_node(Q_index )
+      );
+    }
+  }
+
+//keep track of the fact that a polyhedron original vertex is a node
+void all_incident_faces_got_a_node_as_vertex(Halfedge_handle incident_to_vertex_edge,int node_id)
+{
+  nodes_that_are_original_vertices.insert(std::make_pair(incident_to_vertex_edge->vertex(),node_id));
+}
+
+//if an original polyhedron vertex is also a node, do no use a fake id
+void set_triangle_boundary_indices(
+  Vertex_handle* triangle_boundary,
+  int* triangle_boundary_indices)
+{
+  triangle_boundary_indices[0]=-1;
+  triangle_boundary_indices[1]=-2;
+  triangle_boundary_indices[2]=-3;
+  
+  for (int k=0;k<3;++k){
+    typename std::map<Vertex_handle,int>::iterator it=nodes_that_are_original_vertices.find(triangle_boundary[k]);
+    if (it!=nodes_that_are_original_vertices.end())
+      triangle_boundary_indices[k]=it->second;
+  }
+}
+
+//======================================================================//
+//functions internally used to glue piece of the final combinatorial map//
+//======================================================================//
+
+
+  //-----first polyhedron
+template <class Halfedge_to_dart_map>
+inline Dart_handle get_associated_dart(Halfedge_handle hedge,Halfedge_to_dart_map& selected_hedge_to_dart){
+  typename Halfedge_to_dart_map::iterator it_saved_dart=selected_hedge_to_dart.find(hedge);
+  CGAL_assertion(it_saved_dart!=selected_hedge_to_dart.end());
+  return it_saved_dart->second;
+}
+
+//first_hedge defines four volumes, second_hedge only two
+//first_poly is not needed as inside/outside volume is update during the merge
+//of the sew. Only second_poly is needed
+template <class Nodes_vector,class Border_halfedges_map,class Halfedge_to_dart_map>
+void sew_2_three_volumes_case(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
+                                const std::pair<int,int>& indices,
+                                const Nodes_vector& nodes,
+                                Border_halfedges_map& border_halfedges,
+                                Halfedge_to_dart_map& selected_hedge_to_dart, 
+                                Polyhedron* /*first_poly*/, Polyhedron* second_poly,
+                                int mark_index,
+                                std::set<Dart_handle>& darts_to_remove,
+                                const std::pair<bool,int>& polyline_info)
+{
+  bool took_opposite=second_hedge->is_border();
+  if (took_opposite) second_hedge=second_hedge->opposite();
+  
+  Vertex_handle P1=first_hedge->opposite()->next()->vertex();
+  Vertex_handle P2=first_hedge->next()->vertex();
+  //    when looking from the side of indices.second, the interior of the first polyhedron is described 
+  //    by turning counterclockwise from P1 to P2
+  
+  Vertex_handle Q = second_hedge->next()->vertex();
+  
+  //check if the third point of each triangular face is an original point (stay -1)
+  //or a intersection point (in that case we need the index of the corresponding node to
+  //have the exact value of the point)      
+  int index_p1=node_index_of_incident_vertex(first_hedge->opposite()->next(),border_halfedges);
+  int index_p2=node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
+  int index_q =node_index_of_incident_vertex(second_hedge->next(),border_halfedges);      
+
+  //Recover the dart that will be the start point of the different sewing
+  //  dof_X_outside = dart of face of , meaning the triangle containing the
+  //  point X and part of the volume outside of the corresponding polyhedron      
+  //-----first polyhedron
+  Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
+  Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+  //-----second polyhedron
+  Dart_handle dof_Q_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);
+  
+  if (index_p1!=-1 && index_p1==index_q){
+    Dart_handle top=dof_P1_outside->beta(3), not_top=took_opposite?dof_Q_outside->beta(3):dof_Q_outside;
+    Dart_handle down=dof_P1_outside, not_down=took_opposite?dof_Q_outside:dof_Q_outside->beta(3);
+
+    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
+    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
+    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
+    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
+
+    sew_2_marked_darts( final_map(),top             , dof_P2_outside->beta(3)     ,mark_index, nodes, indices, polyline_info); //P1P2 or QP2      
+    sew_2_marked_darts( final_map(),dof_P2_outside  , down                        ,mark_index, nodes, indices, polyline_info); //P2Q or P2P1
+    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
+    
+    return;
+  }
+
+  if (index_p2!=-1 && index_p2==index_q){
+    Dart_handle top=dof_P2_outside->beta(3), not_top=took_opposite?dof_Q_outside:dof_Q_outside->beta(3);
+    Dart_handle down=dof_P2_outside, not_down=took_opposite?dof_Q_outside->beta(3):dof_Q_outside;
+
+    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
+    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
+    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
+    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
+
+    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , top              ,mark_index, nodes, indices, polyline_info); //P1Q or P1P2      
+    sew_2_marked_darts( final_map(),down                    , dof_P1_outside   ,mark_index, nodes, indices, polyline_info); //QP1 or P2P1
+    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
+    
+    return;
+  }
+  
+  bool Q_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q,P1,P2,Q,nodes);
+
+
+  if (Q_is_between_P1P2)
+  {
+    // poly_first  - poly_second            = took_opposite?P1Q:QP2
+    // poly_second - poly_first             = {0}
+    // poly_first \cap poly_second          = took_opposite?QP2:P1Q
+    // opposite( poly_first U poly_second ) = P2P1
+    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3)                            , took_opposite?dof_Q_outside:dof_Q_outside->beta(3)  ,mark_index, nodes, indices, polyline_info); //P1Q
+    sew_2_marked_darts( final_map(),took_opposite?dof_Q_outside->beta(3):dof_Q_outside , dof_P2_outside->beta(3)                             ,mark_index, nodes, indices, polyline_info); //QP2
+    sew_2_marked_darts( final_map(),dof_P2_outside                                     , dof_P1_outside                                      ,mark_index, nodes, indices, polyline_info); //P2P1
+    dof_P1_outside->template attribute<3>()->info().outside.insert(second_poly); //update P2P1 outside poly
+  }
+  else
+  {
+    // poly_first  - poly_second            = P1P2
+    // poly_second - poly_first             = took_opposite?QP1:P2Q
+    // poly_first \cap poly_second          = {0}
+    // opposite( poly_first U poly_second ) = took_opposite?P2Q:QP1
+    sew_2_marked_darts( final_map(),dof_P2_outside                                     , took_opposite?dof_Q_outside:dof_Q_outside->beta(3)  ,mark_index, nodes, indices, polyline_info); //P2Q
+    sew_2_marked_darts( final_map(),took_opposite?dof_Q_outside->beta(3):dof_Q_outside , dof_P1_outside                                      ,mark_index, nodes, indices, polyline_info); //QP1
+    sew_2_marked_darts( final_map(),dof_P1_outside->beta(3)                            , dof_P2_outside->beta(3)                             ,mark_index, nodes, indices, polyline_info); //P1P2
+    dof_P1_outside->beta(3)->template attribute<3>()->info().outside.insert(second_poly); //update P1P2 outside poly
+  }
+}
+
+//first_hedge defines two volumes, second_hedge only two
+template <class Halfedge_to_dart_map,class Border_halfedges_map,class Nodes_vector>
+void sew_2_two_volumes_case(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
+                              Border_halfedges_map& border_halfedges,
+                              Halfedge_to_dart_map& selected_hedge_to_dart,
+                              int mark_index,
+                              std::set<Dart_handle>& darts_to_remove,
+                              const Nodes_vector& nodes,
+                              const std::pair<int,int>& indices,
+                              const std::pair<bool,int>& polyline_info)
+{
+  bool first_took_opposite=first_hedge->is_border();
+  if (first_took_opposite) first_hedge=first_hedge->opposite();
+  bool second_took_opposite=second_hedge->is_border();
+  if (second_took_opposite) second_hedge=second_hedge->opposite();
+  
+    //-----first polyhedron
+  Dart_handle dof_P_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+  //-----second polyhedron
+  Dart_handle dof_Q_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);
+  
+  
+  
+  
+  int index_p =node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
+  int index_q =node_index_of_incident_vertex(second_hedge->next(),border_halfedges);
+
+  if (index_p!=-1 && index_q!=-1 && index_p==index_q){
+    Dart_handle top=dof_P_outside, not_top=dof_Q_outside->beta(3);
+    Dart_handle down=dof_P_outside->beta(3), not_down=dof_Q_outside;
+    
+    if (first_took_opposite==second_took_opposite)
+    {
+      top=dof_P_outside->beta(3); not_top=dof_Q_outside->beta(3);
+      down=dof_P_outside; not_down=dof_Q_outside;
+    }
+    
+    if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
+    if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
+    CGAL_assertion( !top->template attribute<3>()->info().is_empty );
+    CGAL_assertion( !down->template attribute<3>()->info().is_empty );
+
+    sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
+    
+    return;
+  }
+  
+  
+  
+  //since the edge is shared, the inside of each polyhedron must be on opposite orientation halfedges
+  if (first_took_opposite==second_took_opposite)
+  {
+    //sew out with in
+    sew_2_marked_darts( final_map(),dof_P_outside->beta(3)  , dof_Q_outside  ,mark_index, nodes, indices, polyline_info); //PQ
+    sew_2_marked_darts( final_map(),dof_Q_outside->beta(3)  , dof_P_outside  ,mark_index, nodes, indices, polyline_info); //QP
+  }
+  else
+  {
+    //sew in with in
+  sew_2_marked_darts( final_map(),dof_P_outside         , dof_Q_outside          ,mark_index, nodes, indices, polyline_info); //PQ
+  sew_2_marked_darts( final_map(),dof_Q_outside->beta(3), dof_P_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //QP
+  }
+}
+
+//4 volume case with 2 identical volume
+//Q2 is supposed to be identical to P2
+template <class Nodes_vector,class Halfedge_to_dart_map>
+void sew_2_four_volumes_case_1(  Halfedge_handle first_hedge, Halfedge_handle second_hedge,
+                                 const std::pair<int,int>& indices,
+                                 const Nodes_vector& nodes,
+                                 int index_p1, int index_p2, int index_q1,
+                                 Halfedge_to_dart_map& selected_hedge_to_dart,
+                                 int mark_index,
+                                 std::set<Dart_handle>& darts_to_remove,
+                                 const std::pair<bool,int>& polyline_info,
+                                 bool swap_in_out_Q=false)
+{
+  Vertex_handle P1=first_hedge->opposite()->next()->vertex();
+  Vertex_handle P2=first_hedge->next()->vertex();
+  //    when looking from the side of indices.second, the interior of the first polyhedron is described 
+  //    by turning counterclockwise from P1 to P2
+  Vertex_handle Q1=second_hedge->opposite()->next()->vertex();
+  // Vertex_handle Q2=second_hedge->next()->vertex();  
+  bool Q1_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q1,P1,P2,Q1,nodes);
+  
+  
+  //Recover the dart that will be the start point of the different sewing
+  //  dof_X_outside = dart of face of , meaning the triangle containing the
+  //  point X and part of the volume outside of the corresponding polyhedron      
+  //-----first polyhedron
+  Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
+  Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+  //-----second polyhedron
+  Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
+  Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);  
+  
+  if( swap_in_out_Q ){
+    dof_Q1_outside=dof_Q1_outside->beta(3);
+    dof_Q2_outside=dof_Q2_outside->beta(3);
+  }
+  
+  if (Q1_is_between_P1P2){
+      Dart_handle top=dof_Q2_outside->beta(3), not_top=dof_P2_outside->beta(3);
+      Dart_handle down=dof_Q2_outside, not_down=dof_P2_outside;
+      if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
+      if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
+      CGAL_assertion( !top->template attribute<3>()->info().is_empty );
+      CGAL_assertion( !down->template attribute<3>()->info().is_empty );
+    
+      // poly_first  - poly_second            = P1Q1
+      // poly_second - poly_first             = {0}
+      // poly_first \cap poly_second          = Q1P2 or Q1Q2
+      // opposite( poly_first U poly_second ) = Q2P1 or P2P1
+      sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1      
+      sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , top                     ,mark_index, nodes, indices, polyline_info); //Q1P2 or Q1Q2
+      sew_2_marked_darts( final_map(),down                    , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1 or P2P1
+      sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
+
+  }
+  else{
+      Dart_handle top=dof_Q2_outside->beta(3), not_top=dof_P2_outside->beta(3);
+      Dart_handle down=dof_Q2_outside, not_down=dof_P2_outside;
+      if ( top->template attribute<3>()->info().is_empty ) std::swap(not_top,top);
+      if ( down->template attribute<3>()->info().is_empty ) std::swap(not_down,down);
+      CGAL_assertion( !top->template attribute<3>()->info().is_empty );
+      CGAL_assertion( !down->template attribute<3>()->info().is_empty );
+
+      // poly_first  - poly_second            = {0}
+      // poly_second - poly_first             = Q1P1
+      // poly_first \cap poly_second          = P1P2 or P1Q2
+      // opposite( poly_first U poly_second ) = Q2Q1 or P2Q1
+      sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
+      sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , top                     ,mark_index, nodes, indices, polyline_info); //P1P2 or P1Q2
+      sew_2_marked_darts( final_map(),down                    , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1 or P2Q1
+      sew_3_marked_darts( final_map(),not_top,not_down,top,down,mark_index,darts_to_remove);
+  }  
+}
+
+template <class Nodes_vector,class Halfedge_to_dart_map>
+bool coplanar_triangles_case_handled(Halfedge_handle first_hedge,Halfedge_handle second_hedge,
+                                     const std::pair<int,int>& indices,
+                                     const Nodes_vector& nodes,
+                                     int index_p1, int index_p2, int index_q1,int index_q2,
+                                     Halfedge_to_dart_map& selected_hedge_to_dart,
+                                     int mark_index,
+                                     std::set<Dart_handle>& darts_to_remove,
+                                     const std::pair<bool,int>& polyline_info)
+{
+  if( index_p1!=-1 ){
+    if (index_p1==index_q1){
+      if(index_p2!=-1){
+        CGAL_assertion(index_p2!=index_q1);
+        if(index_p2==index_q2){
+          //-----first polyhedron
+          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+          //-----second polyhedron
+          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);      
+    
+          Dart_handle top_1=dof_P1_outside->beta(3), not_top_1=dof_Q1_outside->beta(3);
+          Dart_handle top_2=dof_P2_outside->beta(3), not_top_2=dof_Q2_outside->beta(3);
+          Dart_handle down_1=dof_P1_outside, not_down_1=dof_Q1_outside;
+          Dart_handle down_2=dof_P2_outside, not_down_2=dof_Q2_outside;
+          if ( top_1->template attribute<3>()->info().is_empty ) std::swap(top_1,not_top_1);
+          if ( top_2->template attribute<3>()->info().is_empty ) std::swap(top_2,not_top_2);
+          if ( down_1->template attribute<3>()->info().is_empty ) std::swap(down_1,not_down_1);
+          if ( down_2->template attribute<3>()->info().is_empty ) std::swap(down_2,not_down_2);
+          CGAL_assertion( !top_1->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !top_2->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !down_1->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !down_2->template attribute<3>()->info().is_empty );
+          
+          // poly_first  - poly_second            = {0}
+          // poly_second - poly_first             = {0}
+          // poly_first \cap poly_second          = P1P2 or Q1Q2 or P1Q1 or Q1P2
+          // opposite( poly_first U poly_second ) = P2P1 or Q2Q1 or P2Q1 or Q2P1
+          sew_2_marked_darts( final_map(),top_1    , top_2     ,mark_index, nodes, indices, polyline_info); //P1P2 or Q1Q2 or P1Q1 or Q1P2
+          sew_2_marked_darts( final_map(),down_2   , down_1    ,mark_index, nodes, indices, polyline_info); //P2P1 or Q2Q1 or P2Q1 or Q2P1
+          sew_3_marked_darts( final_map(),not_top_1, not_down_1 ,top_1,down_1,mark_index,darts_to_remove);
+          sew_3_marked_darts( final_map(),not_top_2, not_down_2 ,top_2,down_2,mark_index,darts_to_remove);
+          return true;
+        }
+      }
+      sew_2_four_volumes_case_1(first_hedge->opposite(),second_hedge->opposite(),std::make_pair(indices.second,indices.first),nodes,index_p2,index_p1,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info);
+      return true;
+    }
+    if (index_p1==index_q2){
+      if(index_p2!=-1){
+        CGAL_assertion(index_p2!=index_q2);
+        if(index_p2==index_q1){
+          //-----first polyhedron
+          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+          //-----second polyhedron
+          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);  
+          
+          Dart_handle top_1=dof_P1_outside->beta(3), not_top_1=dof_Q2_outside;
+          Dart_handle top_2=dof_P2_outside->beta(3), not_top_2=dof_Q1_outside;
+          Dart_handle down_1=dof_P1_outside, not_down_1=dof_Q2_outside->beta(3);
+          Dart_handle down_2=dof_P2_outside, not_down_2=dof_Q1_outside->beta(3);
+          if ( top_1->template attribute<3>()->info().is_empty ) std::swap(top_1,not_top_1);
+          if ( top_2->template attribute<3>()->info().is_empty ) std::swap(top_2,not_top_2);
+          if ( down_1->template attribute<3>()->info().is_empty ) std::swap(down_1,not_down_1);
+          if ( down_2->template attribute<3>()->info().is_empty ) std::swap(down_2,not_down_2);
+          CGAL_assertion( !top_1->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !top_2->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !down_1->template attribute<3>()->info().is_empty );
+          CGAL_assertion( !down_2->template attribute<3>()->info().is_empty );          
+          
+          // poly_first  - poly_second            = P1P2 or P1Q1 or Q2P2 or Q2Q1
+          // poly_second - poly_first             = Q1Q2 or Q1P1 or P2P1 or P2Q2
+          // poly_first \cap poly_second          = {0}
+          // opposite( poly_first U poly_second ) = all space
+          sew_2_marked_darts( final_map(),top_1    , top_2     ,mark_index, nodes, indices, polyline_info); //P1P2 or Q1Q2 or P1Q1 or Q1P2
+          sew_2_marked_darts( final_map(),down_2   , down_1    ,mark_index, nodes, indices, polyline_info); //P2P1 or Q2Q1 or P2Q1 or Q2P1
+          sew_3_marked_darts( final_map(),not_top_1, not_down_1 ,top_1,down_1,mark_index,darts_to_remove);
+          sew_3_marked_darts( final_map(),not_top_2, not_down_2 ,top_2,down_2,mark_index,darts_to_remove);
+          return true;           
+        }
+      }
+      sew_2_four_volumes_case_1(first_hedge->opposite(),second_hedge,std::make_pair(indices.second,indices.first),nodes,index_p2,index_p1,index_q1,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info,true);              
+      return true;
+    }
+  }
+  
+  if(index_p2!=-1){
+    if (index_p2==index_q1){
+      sew_2_four_volumes_case_1(first_hedge,second_hedge->opposite(),indices,nodes,index_p1,index_p2,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info,true);
+      return true;
+    }
+    if(index_p2==index_q2){
+      sew_2_four_volumes_case_1(first_hedge,second_hedge,indices,nodes,index_p1,index_p2,index_q1,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info);
+      return true;
+    }
+  }
+  
+  
+  return false;
+}
+
+//===//
+//end//
+//===//
+  bool do_not_build_cmap; //set to true in the case only the corefinement must be done
+  int number_coplanar_vertices; //number of intersection points between coplanar facets, see fixes XSL_TAG_CPL_VERT
+  EdgeMarkPropertyMap m_edge_mark_pmap;     //property map to mark halfedge of the original polyhedra that are on the intersection
+  NestedFacetConstruct facet_construct;  // functor called to create new triangular faces inside a given face
+  NewNodeVertexVisitor node_vertex_visitor; // functor called when a new node is created and when a new vertex is added
+public:
+  Node_visitor_refine_polyhedra (
+    Combinatorial_map_3_* ptr=NULL,
+    bool do_not_build_cmap_=false,
+    EdgeMarkPropertyMap pmap=EdgeMarkPropertyMap(),
+    const NestedFacetConstruct& fc = NestedFacetConstruct(),
+    const NewNodeVertexVisitor& nv = NewNodeVertexVisitor()
+  ):do_not_build_cmap(do_not_build_cmap_), m_edge_mark_pmap(pmap), facet_construct(fc), node_vertex_visitor(nv)
+  {
+    if (ptr!=NULL){
+      final_map_comes_from_outside=true;
+      final_map_ptr=ptr;
+    }
+    else if (!do_not_build_cmap_) {
+      final_map_comes_from_outside=false;
+      final_map_ptr=new Combinatorial_map_3_();
+    }
+  }
+  
+  ~Node_visitor_refine_polyhedra(){
+    if(!do_not_build_cmap && !final_map_comes_from_outside) {
+      delete final_map_ptr;
+    }
+  }
+
+  
+  typedef internal_IOP::Predicates_on_constructions Node_storage_type;
+  typedef Tag_false Is_polyhedron_const;
+  static const bool do_need_vertex_graph = true;  //because we need to know which edges are constrained
+
+  typedef Combinatorial_map_3_ Combinatorial_map_3;
+  typedef internal_IOP::Volume_info<Polyhedron> Volume_info;
+
+  const Combinatorial_map_3& combinatorial_map() const {return *final_map_ptr;}
+  
+  void set_number_of_intersection_points_from_coplanar_facets(int n){
+    number_coplanar_vertices=n;
+  }
+  
+  void check_node_on_non_manifold_vertex(int node_id,Halfedge_handle hedge){
+    //we turn around the hedge and check no halfedge is a border halfedge
+    Halfedge_handle curr=hedge;
+    do{
+      if ( curr->is_border_edge() ){
+        non_manifold_nodes.insert(node_id);
+        return;
+      }
+      curr=curr->next()->opposite();
+    }
+    while(curr!=hedge);
+  }  
+  
+  void check_node_on_non_manifold_edge(int node_id,Halfedge_handle hedge){
+    if ( hedge->is_border_edge() ) non_manifold_nodes.insert(node_id);
+  }
+  
+  void new_node_added(int node_id,
+                      internal_IOP::Intersection_type type,
+                      Halfedge_handle principal_edge,
+                      Halfedge_handle additional_edge,
+                      bool is_vertex_coplanar,
+                      bool is_vertex_opposite_coplanar)
+  {
+    //forward to the visitor
+    node_vertex_visitor.new_node_added(node_id, type, principal_edge, additional_edge, is_vertex_coplanar, is_vertex_opposite_coplanar);
+    switch(type)
+    {
+      case internal_IOP::FACET: //Facet intersected by an edge
+      {
+        typename In_face_map::iterator it_fmap=in_face.insert(std::make_pair(additional_edge->face(), Node_ids())).first;
+        it_fmap->second.push_back(node_id);
+      }
+      break;
+      case internal_IOP::EDGE: //Edge intersected by an edge
+      {
+        typename In_halfedge_map::iterator it_hedge_map=in_hedge.insert(std::make_pair(additional_edge,Node_id_set())).first;
+        it_hedge_map->second.insert(node_id);
+        check_node_on_non_manifold_edge(node_id,additional_edge);
+      }
+      break;
+      case internal_IOP::VERTEX:
+      {
+        //grab original vertex that is on commom intersection
+        typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(additional_edge->facet()->halfedge());
+        CGAL_assertion(it!=hedge_to_polyhedron.end());
+        poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,additional_edge));
+        polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,additional_edge->vertex()));
+        all_incident_faces_got_a_node_as_vertex(additional_edge,node_id);
+        check_node_on_non_manifold_vertex(node_id,additional_edge);
+      }
+      break;
+      default:
+      return;
+    }
+    
+    CGAL_assertion(!is_vertex_coplanar || !is_vertex_opposite_coplanar); //coplanar edge are not forwarded
+    
+    
+    if ( is_vertex_coplanar )
+    {
+      //grab original vertex that is on commom intersection
+      typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(principal_edge->facet()->halfedge());
+      poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,principal_edge));
+      polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,principal_edge->vertex()));
+      all_incident_faces_got_a_node_as_vertex(principal_edge,node_id);
+      check_node_on_non_manifold_vertex(node_id,principal_edge);
+    }
+    else{
+      if ( is_vertex_opposite_coplanar ){
+        //grab original vertex that is on commom intersection
+        typename Hedge_to_polyhedron_map::iterator it=hedge_to_polyhedron.find(principal_edge->facet()->halfedge());
+        poly_to_vertices_on_inter[it->second].insert(std::make_pair(node_id,principal_edge->opposite()));
+        polyhedron_to_map_node_to_polyhedron_vertex[it->second].insert(std::make_pair(node_id,principal_edge->opposite()->vertex()));
+        all_incident_faces_got_a_node_as_vertex(principal_edge->opposite(),node_id);
+        check_node_on_non_manifold_vertex(node_id,principal_edge->opposite());
+      }
+      else{
+        //handle intersection on principal edge
+        typename In_halfedge_map::iterator it_hedge_map=in_hedge.insert(std::make_pair(principal_edge,Node_id_set())).first;
+        it_hedge_map->second.insert(node_id);
+        check_node_on_non_manifold_edge(node_id,principal_edge);
+      }
+    }
+  }
+  
+  template<class Iterator>
+  void annotate_graph(Iterator begin,Iterator end)
+  {
+//    std::cout << "Annotation graph..." << std::endl;
+    for (Iterator it=begin;it!=end;++it)
+    {
+      int node_id=it->first;
+      if (non_manifold_nodes.find(node_id)!=non_manifold_nodes.end()) it->second.make_terminal();
+      const std::set<int>& neighbors = it->second.neighbors;
+      graph_of_constraints.insert(std::make_pair(node_id,neighbors));
+    }
+  }
+  
+  void update_terminal_nodes(std::vector<bool>&)
+  {
+    CGAL_assertion(!"Must not call this function");
+  }
+  
+  void add_filtered_intersection(Halfedge_handle eh,Halfedge_handle fh,Polyhedron& Pe,Polyhedron& Pf){
+    //use the representant halfedge of the facet as key
+    //--set polyhedron for the two facets incident to the edge
+    CGAL_assertion(!eh->is_border());
+    hedge_to_polyhedron.insert(std::make_pair(eh->facet()->halfedge(),&Pe));
+    if ( !eh->opposite()->is_border() )
+      hedge_to_polyhedron.insert(std::make_pair(eh->opposite()->facet()->halfedge(),&Pe));
+    //--set polyhedron for the facet intersected by the edge
+    hedge_to_polyhedron.insert(std::make_pair(fh->facet()->halfedge(),&Pf));
+  }
+  
+
+  struct Polyhedron_face_boundary{
+    std::vector<int> node_ids_array[3]; // the node_ids on each halfedges
+    std::map<Halfedge_handle,int,Cmp_unik_ad> hedges_ids;
+    Halfedge_handle halfedges[3]; //the three halfedges of the original face
+    Vertex_handle   vertices[3];  //the three vertices  of the original face
+    //node_ids_array[0] corresponds to the original edge vertices[0],vertices[1] = halfedges[0]
+    //node_ids_array[1] corresponds to the original edge vertices[1],vertices[2] = halfedges[1]
+    //node_ids_array[2] corresponds to the original edge vertices[2],vertices[0] = halfedges[2]
+    Polyhedron_face_boundary(Halfedge_handle first)
+    {
+      CGAL_assertion(first->next()->next()->next()==first); //the face is a triangle
+      hedges_ids.insert(std::make_pair(first,0));
+      hedges_ids.insert(std::make_pair(first->next(),1));
+      hedges_ids.insert(std::make_pair(first->next()->next(),2));
+      halfedges[0]=first;
+      halfedges[1]=first->next();
+      halfedges[2]=first->next()->next();
+      
+      vertices[0]=halfedges[0]->opposite()->vertex();
+      vertices[1]=halfedges[1]->opposite()->vertex();
+      vertices[2]=halfedges[2]->opposite()->vertex();
+    }
+    
+    //used when object was create with hedge but opposite was used to split the original face
+    void update_original_halfedge(Halfedge_handle original,Halfedge_handle new_hedge)
+    {
+      typename std::map<Halfedge_handle,int,Cmp_unik_ad>::iterator it_id=hedges_ids.find(original);
+      CGAL_assertion(it_id!=hedges_ids.end());
+      int index=it_id->second;
+      CGAL_assertion(halfedges[index]==original);
+      hedges_ids.erase(it_id);
+      hedges_ids.insert(std::make_pair(new_hedge,index));
+      halfedges[index]=new_hedge;
+    }
+    
+    template <class Iterator>
+    void copy_node_ids(Halfedge_handle hedge,Iterator begin,Iterator end)
+    {
+      typename std::map<Halfedge_handle,int,Cmp_unik_ad>::iterator it_id=hedges_ids.find(hedge);
+      CGAL_assertion(it_id!=hedges_ids.end());
+      std::copy(begin,end,std::back_inserter(node_ids_array[it_id->second]));
+    }
+  };
+  
+  
+  void start_new_polyline(int i, int j)
+  {
+    if ( i==j ) //case of a single point
+    {
+      //TAG SL001
+      //nothing is done
+      return;
+    }
+    std::pair<typename An_edge_per_polyline_map::iterator,bool> res=
+      an_edge_per_polyline.insert( 
+        std::make_pair( make_sorted_pair(i,j),
+          std::make_pair( std::map<Polyhedron*,Halfedge_handle>(),std::make_pair(false,0))  )
+      );
+    CGAL_assertion(res.second);
+    last_polyline=res.first;
+    if ( i !=last_polyline->first.first ) 
+      last_polyline->second.second.first=true;
+  }
+  
+  void add_node_to_polyline(int){
+    ++(last_polyline->second.second.second);
+  }
+  
+  void new_input_polyhedron(Polyhedron& P)
+  {
+    typedef std::pair<typename Poly_to_map_node::iterator,bool> Res;
+    CGAL_USE_TYPE(Res);
+    CGAL_assertion_code(Res res = )
+      polyhedron_to_map_node_to_polyhedron_vertex.insert(std::make_pair( &P,Node_to_polyhedron_vertex_map() ));
+    CGAL_assertion(res.second == true);
+  }
+  
+  //1) split_halfedges and retriangulate faces with no intersection point interior to the facet
+  //2) retriangulate using a constrained Delaunay triangulation each triangle in each Polyhedron that contains at least
+  //   one intersection point inside the facet
+  //3) mark polyhedron edges that are on the intersection
+  //4) create one output polyhedron per connected component of polyhedron, connected by an edge which is not an intersection edge   
+  //5) import each piece into a common combinatorial map
+  //6) glue all the pieces together
+  template <class Nodes_vector>
+  void finalize(const Nodes_vector& nodes){
+    //mark halfedge that are on the intersection
+    //SL: I needed to use a map because to get the orientation around the edge,
+    //    I need to know in the case the third vertex is a node its index (for exact construction)
+    typedef std::map<Halfedge_const_handle,std::pair<int,int>,Cmp_unik_ad > Border_halfedges_map;
+    Border_halfedges_map border_halfedges;
+    
+    //store for each triangle facet which boundary is intersected by the other surface,
+    //original vertices (and halfedges in the refined mesh pointing on these vertices)
+    typedef std::map<Face_handle,Polyhedron_face_boundary,Cmp_handle> Faces_boundary;
+    Faces_boundary faces_boundary; 
+    
+    //0) For each polyhedron, collect original vertices that belongs to the intersection.
+    //   From the graph of constaints, extract intersection edges that are incident to such vertices. In case
+    //   there exists another original vertex adjacent to the first one found, this halfedge must be
+    //   marked on the boundary (and possibly update an_edge_per_polyline).
+    //   This is done first to avoid halfedges stored to be modified in the steps following.
+    for (typename Poly_to_vertices_on_intersection_map::iterator 
+      it=poly_to_vertices_on_inter.begin();
+      it!=poly_to_vertices_on_inter.end();
+      ++it)
+    {
+      Polyhedron* poly=it->first;
+      std::set<std::pair<int,int> > already_done;
+      Node_to_target_of_hedge_map& nodes_to_hedge=it->second;
+      for(typename Node_to_target_of_hedge_map::iterator 
+        it_node_2_hedge=nodes_to_hedge.begin();
+        it_node_2_hedge!=nodes_to_hedge.end();
+        ++it_node_2_hedge)
+      {
+        int node_id_of_first=it_node_2_hedge->first;
+        std::map< int,std::set<int> >::iterator it_neighbors=graph_of_constraints.find(node_id_of_first);
+        if ( it_neighbors!=graph_of_constraints.end() )
+        {
+          std::set<int>& neighbors=it_neighbors->second;
+          for (std::set<int>::iterator it_id=neighbors.begin();it_id!=neighbors.end();++it_id){
+            if ( already_done.find(std::make_pair(*it_id,node_id_of_first))!=already_done.end() ) continue;//already done for the opposite
+            typename Node_to_target_of_hedge_map::iterator it_node_2_hedge_two=nodes_to_hedge.find(*it_id);
+            if ( it_node_2_hedge_two!=nodes_to_hedge.end() ) //a full edge is on intersection
+            {
+              //get the corresponding halfedge with vertex corresponding to node_id_of_first
+              Halfedge_handle hedge=it_node_2_hedge->second;
+              CGAL_assertion_code(Halfedge_handle start=hedge;)
+              while ( hedge->opposite()->vertex()!=it_node_2_hedge_two->second->vertex() ){
+                hedge=hedge->next()->opposite();
+                CGAL_assertion(hedge!=start);
+              }
+              std::pair<int,int> edge_pair(*it_id,node_id_of_first);
+              border_halfedges.insert( std::make_pair(hedge,edge_pair) );
+              put(m_edge_mark_pmap,std::make_pair(hedge,poly),true);
+              put(m_edge_mark_pmap,std::make_pair(hedge->opposite(),poly),true);
+              update_edge_per_polyline(poly,edge_pair,hedge); 
+              //save the fact that we already handle this edge
+              already_done.insert(std::make_pair(node_id_of_first,*it_id));
+            }
+          }
+        }
+        #ifdef CGAL_COREFINEMENT_DEBUG
+        else
+        {
+          std::cout << "X1: Found an isolated point" << std::endl;
+        }
+        #endif
+      }
+    }
+    
+    //1) First split halfedges cut by the intersection polyline(s)
+    for (typename In_halfedge_map::iterator it=in_hedge.begin();it!=in_hedge.end();++it)
+    {
+      Halfedge_handle hedge=it->first; //the halfedge to be split (and its opposite too)
+      Node_ids node_ids;   //indices of the intersection points to be inserted
+      //we used a set to avoid having duplicated nodes reported on an edge of two coplanar triangles
+      std::copy(it->second.begin(),it->second.end(),std::back_inserter(node_ids));
+      typename Hedge_to_polyhedron_map::iterator  it_poly=hedge_to_polyhedron.find( hedge->facet()->halfedge() );
+      CGAL_assertion(it_poly!=hedge_to_polyhedron.end());
+      Polyhedron* P=it_poly->second;  //the polyhedron in which vertices should be added
+      
+      sort_vertices_along_hedge(node_ids,hedge,nodes);
+
+      //save original face and nodes for face of hedge (1)
+      if ( !hedge->is_border() ){
+        typename Faces_boundary::iterator it_face=faces_boundary.find(hedge->face());
+        if (it_face==faces_boundary.end())
+          it_face=faces_boundary.insert(std::make_pair(hedge->face(),Polyhedron_face_boundary(hedge))).first;
+        it_face->second.copy_node_ids(hedge,node_ids.begin(),node_ids.end());
+      }
+      
+      //save original face and nodes for face of hedge->opposite (2)
+      typename Faces_boundary::iterator opposite_original_info=faces_boundary.end();
+      if ( !hedge->opposite()->is_border() ){
+        opposite_original_info=faces_boundary.find(hedge->opposite()->face());
+        if (opposite_original_info==faces_boundary.end()) 
+          opposite_original_info=faces_boundary.insert(std::make_pair(hedge->opposite()->face(),Polyhedron_face_boundary(hedge->opposite()))).first;
+        opposite_original_info->second.copy_node_ids(hedge->opposite(),node_ids.rbegin(),node_ids.rend());      
+      }      
+      
+      typename Poly_to_map_node::iterator it_map=polyhedron_to_map_node_to_polyhedron_vertex.find(P);
+      CGAL_assertion(it_map!=polyhedron_to_map_node_to_polyhedron_vertex.end());
+      //a map to identify the vertex in the polyhedron corresponding to an intersection point
+      Node_to_polyhedron_vertex_map& node_to_polyhedron_vertex=it_map->second; 
+            
+      CGAL_assertion_code(Vertex_handle original_vertex=hedge->opposite()->vertex();)
+      
+      //We need an edge incident to the source vertex of hedge. This is the first opposite edge created.      
+      bool first=true; Halfedge_handle hedge_incident_to_src;
+      //do split the edges
+      for (std::vector<int>::const_iterator it_id=node_ids.begin();it_id!=node_ids.end();++it_id){
+        Vertex_handle v=split_edge(hedge,nodes[*it_id],*P);
+        node_vertex_visitor.new_vertex_added(*it_id, v);
+        node_to_polyhedron_vertex.insert(std::make_pair(*it_id,v));
+        if (first){
+          first=false;
+          hedge_incident_to_src=hedge->opposite()->next();
+        }
+      }
+      
+      CGAL_assertion(hedge_incident_to_src->vertex()==original_vertex);
+      CGAL_assertion(hedge_incident_to_src->face()==hedge->opposite()->face());
+
+      //save original face and nodes for face of hedge->opposite (2)
+      if ( !hedge->opposite()->is_border() ){
+        CGAL_assertion(opposite_original_info!=faces_boundary.end());
+        opposite_original_info->second.update_original_halfedge(hedge->opposite(),hedge_incident_to_src);
+      }
+      
+      //insert the two incident faces in in_face map so that they will be triangulated.
+      if (!hedge->is_border()) in_face.insert(std::make_pair(hedge->face(),Node_ids()));
+      if (!hedge->opposite()->is_border()) in_face.insert(std::make_pair(hedge->opposite()->face(),Node_ids()));
+    }
+    
+    //2)triangulation of the triangle faces containing intersection point in their interior
+    //  and also those with intersection points only on the boundary.
+    for (typename In_face_map::iterator it=in_face.begin();it!=in_face.end();++it)
+    {
+      Face_handle f = it->first; //the face to be retriangulated
+      Node_ids& node_ids  = it->second; //the index of the intersection point that are interior to the face
+      typename Faces_boundary::iterator it_fb=faces_boundary.find(f);
+
+      
+      typename Hedge_to_polyhedron_map::iterator it_polyhedron = hedge_to_polyhedron.find (f->halfedge()); //we can do this because the halfedge is still the same (at least its address)+no Face::set_halfedge called
+      CGAL_assertion(it_polyhedron != hedge_to_polyhedron.end());
+      Polyhedron* P=it_polyhedron->second;
+      typename Poly_to_map_node::iterator it_map=polyhedron_to_map_node_to_polyhedron_vertex.find(P);
+      CGAL_assertion(it_map!=polyhedron_to_map_node_to_polyhedron_vertex.end());
+      //a map to identify the vertex in the polyhedron corresponding to an intersection point
+      Node_to_polyhedron_vertex_map& node_to_polyhedron_vertex=it_map->second;
+      
+      std::map<int,typename CDT::Vertex_handle> id_to_CDT_vh;
+      
+      //associate an edge of the triangulation to a halfedge in a given polyhedron
+      std::map<std::pair<int,int>,Halfedge_handle> edge_to_hedge;
+      
+      Vertex_handle triangle_boundary[3];
+      int triangle_boundary_indices[3]; //the node_id of the triangle original vertex or a fake id
+      if (it_fb!=faces_boundary.end()){ //the boundary of the triangle face was refined
+        triangle_boundary[0]=it_fb->second.vertices[0];
+        triangle_boundary[1]=it_fb->second.vertices[1];
+        triangle_boundary[2]=it_fb->second.vertices[2];
+        set_triangle_boundary_indices(triangle_boundary,triangle_boundary_indices);
+      }
+      else{
+        triangle_boundary[0]=f->halfedge()->vertex(); //-1
+        triangle_boundary[1]=f->halfedge()->next()->vertex(); //-2
+        triangle_boundary[2]=f->halfedge()->next()->next()->vertex(); //-3
+        CGAL_assertion(f->halfedge()->next()->next()->next()==f->halfedge());//check this is a triangle
+        set_triangle_boundary_indices(triangle_boundary,triangle_boundary_indices);        
+        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[2],triangle_boundary_indices[0] ) , f->halfedge() ) );
+        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[0],triangle_boundary_indices[1] ) , f->halfedge()->next() ) );
+        edge_to_hedge.insert (std::make_pair( std::make_pair( triangle_boundary_indices[1],triangle_boundary_indices[2] ) , f->halfedge()->next()->next() ) );
+      }
+
+      
+      #ifdef DO_NO_USE_EXACT_CDT
+      typename Kernel::Plane_3 plane(triangle_boundary[0]->point(),triangle_boundary[1]->point(),triangle_boundary[2]->point());
+      #else
+      CGAL::Cartesian_converter<Kernel,Exact_kernel> convert;
+      typename Exact_kernel::Plane_3 plane(convert(triangle_boundary[0]->point()),convert(triangle_boundary[1]->point()),convert(triangle_boundary[2]->point()));
+      #endif
+      CDT triangulation;
+      //insert point inside face
+      for (std::vector<int>::iterator it_node_id=node_ids.begin();it_node_id!=node_ids.end();++it_node_id){
+        #ifdef DO_NO_USE_EXACT_CDT
+        typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes[*it_node_id]));
+        #else
+        typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes.exact_node(*it_node_id)));
+        #endif
+        vh->info()=*it_node_id;
+        id_to_CDT_vh.insert(std::make_pair(*it_node_id,vh));
+      }
+      
+      
+      typename CDT::Vertex_handle triangle_vertices[3];
+      #ifdef DO_NO_USE_EXACT_CDT
+      triangle_vertices[0]=triangulation.insert(plane.to_2d(triangle_boundary[0]->point()));
+      triangle_vertices[1]=triangulation.insert(plane.to_2d(triangle_boundary[1]->point()));
+      triangle_vertices[2]=triangulation.insert(plane.to_2d(triangle_boundary[2]->point()));
+      #else
+      //we can do this because these are input points.
+      triangle_vertices[0]=triangulation.insert(plane.to_2d(convert(triangle_boundary[0]->point())));
+      triangle_vertices[1]=triangulation.insert(plane.to_2d(convert(triangle_boundary[1]->point())));
+      triangle_vertices[2]=triangulation.insert(plane.to_2d(convert(triangle_boundary[2]->point())));      
+      #endif
+      
+      triangle_vertices[0]->info()=triangle_boundary_indices[0];
+      triangle_vertices[1]->info()=triangle_boundary_indices[1];
+      triangle_vertices[2]->info()=triangle_boundary_indices[2];
+      //insert face_extremities: we use operator[] because indice -1,-2,-3 are used in each loop and are specific to the current face
+      node_to_polyhedron_vertex[-1]=triangle_boundary[0];
+      node_to_polyhedron_vertex[-2]=triangle_boundary[1];
+      node_to_polyhedron_vertex[-3]=triangle_boundary[2];
+      
+      //if one of the triangle original vertex is also a node
+      for (int ik=0;ik<3;++ik){
+        if ( triangle_boundary_indices[ik]>=0 )
+          id_to_CDT_vh.insert(std::make_pair(triangle_boundary_indices[ik],triangle_vertices[ik]));
+      }
+      //insert points on edges 
+      #ifdef DO_NO_USE_EXACT_CDT
+      //and constrains these edges
+      #endif
+      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
+      {
+        //in the following loop, for each original edge of the triangle, we insert the constrained edges
+        // and we recover the halfedge_handle corresponding to these constrained (they are already in the polyhedron)
+        for (int i=0;i<3;++i){
+//          std::cerr << "Boundary edges" << std::endl;
+//          std::cerr <<  "  " << -1-i <<std::endl;
+          //handle case of halfedge starting at triangle_vertices[i] and ending at triangle_vertices[(i+1)%3]
+          Node_ids& bounding_ids=it_fb->second.node_ids_array[i];
+          typename CDT::Vertex_handle previous=triangle_vertices[i];
+          int previous_index=triangle_boundary_indices[i]; //index of original Polyhedron vertex
+          Halfedge_handle hedge = it_fb->second.halfedges[ (i+2) % 3]->next();
+          CGAL_assertion( hedge->opposite()->vertex()==it_fb->second.vertices[i] );
+          if (!bounding_ids.empty()){ //is there al least one intersection point on this edge?
+            for (Node_ids::iterator it_id=bounding_ids.begin();it_id!=bounding_ids.end();++it_id){
+//              std::cerr << "  "<<  *it_id << std::endl;
+              #ifdef DO_NO_USE_EXACT_CDT
+              typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes[*it_id]));
+              #else
+              typename CDT::Vertex_handle vh=triangulation.insert(plane.to_2d(nodes.exact_node(*it_id))); 
+              #endif
+              vh->info()=*it_id;
+              id_to_CDT_vh.insert(std::make_pair(*it_id,vh));
+              #ifdef DO_NO_USE_EXACT_CDT
+              triangulation.insert_constraint(previous,vh);
+              #endif
+              edge_to_hedge.insert (std::make_pair( std::make_pair(previous_index,*it_id),hedge) );
+              previous=vh;
+              hedge=hedge->next();
+              previous_index=*it_id;
+            }
+          }
+          else{
+            CGAL_assertion( it_fb->second.halfedges[i]->vertex() == it_fb->second.vertices[ (i+1) % 3 ] );
+            CGAL_assertion( it_fb->second.halfedges[i]->opposite()->vertex() == it_fb->second.vertices[ i ] );
+          }
+          CGAL_assertion(hedge==it_fb->second.halfedges[i]);
+          edge_to_hedge.insert (std::make_pair( std::make_pair(previous_index,triangle_boundary_indices[(i+1) % 3]) , it_fb->second.halfedges[i] ) );
+//          std::cerr <<  "  " << -1 - ( (i+1) % 3 ) <<std::endl;
+          #ifdef DO_NO_USE_EXACT_CDT
+          triangulation.insert_constraint(previous,triangle_vertices[(i+1)%3]);
+          #endif
+        }
+      }
+      
+      std::list<std::pair<int,int> > constrained_edges;
+      
+      //insert constraints that are interior to the triangle (in the case no edges are collinear in the meshes)
+      insert_constrained_edges(node_ids,triangulation,id_to_CDT_vh,constrained_edges);
+      
+      //insert constraints between points that are on the boundary (not a contrained on the triangle boundary)
+      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
+      {
+        for (int i=0;i<3;++i){
+          Node_ids& bounding_ids=it_fb->second.node_ids_array[i];  
+          insert_constrained_edges(bounding_ids,triangulation,id_to_CDT_vh,constrained_edges,true);
+        }
+      }
+      
+      //insert coplanar edges for endpoints of triangles
+      for (int i=0;i<3;++i){
+        int nindex=triangle_vertices[i]->info();
+        if ( nindex >=0 )
+          insert_constrained_edges_coplanar_case(nindex,triangulation,id_to_CDT_vh);
+      }
+      
+      //XSL_TAG_CPL_VERT
+      //collect edges incident to a point that is the intersection of two coplanar faces.
+      //This ensure that triangulations are compatible.
+      if (it_fb!=faces_boundary.end()) //is there at least one intersection point on the boundary of the face?
+      {
+        for (typename CDT::Finite_vertices_iterator vit=triangulation.finite_vertices_begin(),
+                                                vit_end=triangulation.finite_vertices_end();vit_end!=vit;++vit)
+        {
+          //skip original vertices (that are not nodes) and non-coplanar facet issued vertices 
+          //(this is working because intersection points between coplanar facets are the first inserted)
+          if ( vit->info() < 0 || vit->info() >= number_coplanar_vertices) continue;
+          std::map< int,std::set<int> >::iterator res=coplanar_constraints.insert(std::make_pair(vit->info(),std::set<int>())).first;
+          //turn around the vertex and get incident edge
+          typename CDT::Edge_circulator  start=triangulation.incident_edges(vit);
+          typename CDT::Edge_circulator  curr=start;
+          do{
+            if (triangulation.is_infinite(*curr) ) continue;
+            typename CDT::Edge mirror_edge=triangulation.mirror_edge(*curr);
+            if ( triangulation.is_infinite( curr->first->vertex(curr->second) ) ||
+                 triangulation.is_infinite( mirror_edge.first->vertex(mirror_edge.second) ) )            
+              continue; //skip edges that are on the boundary of the triangle (these are already constrained)
+            //insert edges in the set of constraints
+            int nindex = 
+              curr->first->vertex( (curr->second+1)%3 )==static_cast<typename CDT::Vertex_handle>(vit)?
+              (curr->second+2)%3:(curr->second+1)%3;
+            typename CDT::Vertex_handle vn=curr->first->vertex(nindex);
+            if ( vit->info() > vn->info() ) continue; //take only one out of the two edges + skip negative vn->info()
+            CGAL_assertion(vn->info()>=0);            
+            res->second.insert( vn->info() );
+          }while(start!=++curr);
+        }
+        
+// this is a working alternative that should be slower        
+//        for (typename CDT::Finite_edges_iterator eit=triangulation.finite_edges_begin(),
+//                                             eit_end=triangulation.finite_edges_end();eit_end!=eit;++eit)
+//        {
+//          typename CDT::Edge mirror_edge=triangulation.mirror_edge(*eit);
+//          if ( triangulation.is_infinite( eit->first->vertex(eit->second) ) ||
+//              triangulation.is_infinite( mirror_edge.first->vertex(mirror_edge.second) ) )
+//            continue; //skip edges that are on the boundary of the triangle (these are already constrained)
+//          typename CDT::Vertex_handle v1=eit->first->vertex( (eit->second+1)%3 ),
+//                                      v2=eit->first->vertex( (eit->second+2)%3 );
+//          if (v1->info()<0 || v2->info()<0) continue;
+//          if ( v1->info() > v2->info() ) std::swap(v1,v2);
+//          coplanar_constraints.insert(std::make_pair(v1->info(),std::set<int>())).first->second.insert(v2->info());
+//        }
+      }
+      
+      
+      //create a modifier to insert nodes and copy the triangulation of the face
+      //inside the polyhedron
+      internal_IOP::Triangulate_a_face<typename Polyhedron::HalfedgeDS, NestedFacetConstruct, NewNodeVertexVisitor> modifier(
+        f, nodes, node_ids, node_to_polyhedron_vertex, edge_to_hedge, triangulation, facet_construct, node_vertex_visitor);
+      
+      CGAL_assertion(P->is_valid());
+      P->delegate(modifier);
+      CGAL_assertion(P->is_valid());
+      
+      //3) mark halfedges that are common to two polyhedral surfaces
+      //recover halfedges inserted that are on the intersection
+      for (std::list<std::pair<int,int> >::iterator it_cst=constrained_edges.begin();it_cst!=constrained_edges.end();++it_cst)
+      {
+        typename std::map<std::pair<int,int>,Halfedge_handle>::iterator it_poly_hedge=edge_to_hedge.find(*it_cst);
+        //we cannot have an assertion here in the case an edge or part of an edge is a constraints.
+        //Indeed, the graph_of_constraints report an edge 0,1 and 1,0 for example while only one of the two
+        //is defined as one of them defines an adjacent face
+        //CGAL_assertion(it_poly_hedge!=edge_to_hedge.end());
+        if( it_poly_hedge!=edge_to_hedge.end() ){
+          border_halfedges.insert( std::make_pair(Halfedge_const_handle(it_poly_hedge->second),*it_cst) );
+          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second,P),true);
+          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second->opposite(),P),true); //setting the opposite is only needed for border edges (done in adjacent triangle otherwise)
+          update_edge_per_polyline(P,it_poly_hedge->first,it_poly_hedge->second);
+        }
+        else{
+          //WARNING: in few case this is needed if the marked edge is on the border
+          //to optimize it might be better to only use sorted pair. TAG_SLXX1
+          std::pair<int,int> opposite_pair(it_cst->second,it_cst->first);
+          it_poly_hedge=edge_to_hedge.find(opposite_pair);
+          CGAL_assertion( it_poly_hedge!=edge_to_hedge.end() );
+
+          border_halfedges.insert( std::make_pair(Halfedge_const_handle(it_poly_hedge->second),opposite_pair) );
+          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second,P),true);
+          put(m_edge_mark_pmap,std::make_pair(it_poly_hedge->second->opposite(),P),true); //setting the opposite is only needed for border edges (done in adjacent triangle otherwise)
+          update_edge_per_polyline(P,it_poly_hedge->first,it_poly_hedge->second);          
+        }
+      }
+    }
+   
+    if (do_not_build_cmap) return;
+    
+    //4) create one output polyhedron per connected component of polyhedron,
+    //   connected by an edge which is not an intersection edge  
+    //5) import into a Combinatorial map
+    #ifdef CGAL_COREFINEMENT_DEBUG
+    std::cout << "Nb marked edges " << border_halfedges.size() << std::endl;
+//    for (typename Border_halfedges_map::iterator it=border_halfedges.begin();it!=border_halfedges.end();++it)
+//      std::cout << it->first->opposite()->vertex()->point() << " " << it->first->vertex()->point() << " is constrained " << std::endl;
+    std::cout << "Nb polylines " << an_edge_per_polyline.size() << std::endl;
+    #endif
+    
+    internal_IOP::Non_intersection_halfedge<Polyhedron> criterium(border_halfedges);
+
+    int mark_index = static_cast<int>(final_map().get_new_mark());
+                     //mark used to tag dart that are on an intersection
+
+    //define a map that will contain the correspondance between selected halfedges of the boundary and
+    //their corresponding Dart_handle in the cmap.
+    typedef std::map<Halfedge_const_handle,typename Combinatorial_map_3::Dart_handle,internal_IOP::Compare_address<Polyhedron> > Halfedge_to_dart_map;
+    Halfedge_to_dart_map selected_hedge_to_dart;
+    for (typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.begin();it!=an_edge_per_polyline.end();++it)
+    {
+      CGAL_assertion(it->second.first.size()==2);
+      //orientation of faces around the edge (to be sure we can do it)
+      Halfedge_handle first_hedge=it->second.first.begin()->second;
+      Halfedge_handle second_hedge=boost::next(it->second.first.begin())->second;
+      
+      if (!first_hedge->is_border())               selected_hedge_to_dart.insert(std::make_pair(first_hedge,Dart_handle(NULL)));
+      if (!first_hedge->opposite()->is_border())   selected_hedge_to_dart.insert(std::make_pair(first_hedge->opposite(),Dart_handle(NULL)));
+      if (!second_hedge->is_border())              selected_hedge_to_dart.insert(std::make_pair(second_hedge,Dart_handle(NULL)));
+      if (!second_hedge->opposite()->is_border())  selected_hedge_to_dart.insert(std::make_pair(second_hedge->opposite(),Dart_handle(NULL)));
+    }
+    
+    #ifdef CGAL_COREFINEMENT_DEBUG
+    int polynb=0;
+    #endif
+    for (typename Poly_to_map_node::iterator 
+          it=polyhedron_to_map_node_to_polyhedron_vertex.begin();
+          it!=polyhedron_to_map_node_to_polyhedron_vertex.end();
+          ++it
+        )
+    {
+      typedef typename Polyhedron::Facet_const_handle Facet_const_handle;
+      typedef ::CGAL::Union_find<Facet_const_handle> UF;
+      typedef typename UF::handle UF_handle;
+      typedef std::map<Facet_const_handle,std::list<Facet_const_handle>,internal::corefinement::Compare_handle_ptr<Polyhedron> > Result;
+      typedef std::map<Facet_const_handle,UF_handle,internal::corefinement::Compare_handle_ptr<Polyhedron> > Facet_to_handle_map;
+      
+      UF uf;
+      Facet_to_handle_map map_f2h;
+      Result result;
+      Polyhedron* current_poly=it->first;
+      
+      #ifdef CGAL_COREFINEMENT_DEBUG
+      std::cout << "writing poly debug"<< std::endl;
+      std::stringstream ss; 
+      ss << "output_debug-" << ++polynb << ".off";
+      std::ofstream output_debug(ss.str().c_str());
+      output_debug << *current_poly;
+      #endif
+      
+      internal::corefinement::extract_connected_components(*(static_cast<Polyhedron const *> (current_poly) ),criterium,uf,map_f2h,result);
+
+      
+      //add each connected component in the map with 2 volumes per component.
+      for (typename Result::iterator it_res=result.begin();it_res!=result.end();++it_res)
+      {
+        //create in the final Cmap a 2D component containing faces of a connected component 
+        //(twice: one with same orientation and one with the opposite orientation to model the other volume)
+        Dart_handle d = import_from_polyhedron_subset<Polyhedron>(final_map(),it_res->second.begin(),it_res->second.end(),criterium,selected_hedge_to_dart,mark_index);
+        //set an attribute to one volume represented by this component to indicates 
+        //a part outside of the polyhedron current_poly
+        typename Combinatorial_map_3_::template Attribute_range<3>::type::iterator attrib=final_map().template create_attribute<3>();
+        attrib->info().outside.insert(current_poly);
+        final_map().template set_attribute<3>(d,attrib);
+        //set the attribute for the opposite volume: represent a part inside current_poly
+        attrib=final_map().template create_attribute<3>();
+        attrib->info().inside.insert(current_poly);
+        final_map().template set_attribute<3>(d->beta(3),attrib);        
+        
+        #ifdef CGAL_COREFINEMENT_DEBUG
+        final_map().display_characteristics(std::cout);
+        std::cout << std::endl;
+        #endif
+      }
+    }
+    #ifndef NDEBUG
+    for(typename Halfedge_to_dart_map::iterator it=selected_hedge_to_dart.begin();it!=selected_hedge_to_dart.end();++it)
+      CGAL_assertion(it->second!=Dart_handle(NULL));
+    #endif
+    
+    CGAL_assertion(final_map().is_valid());
+
+    std::set<Dart_handle> darts_to_remove;
+    
+    //6) Glue pieces together
+    //   using one edge per intersection polyline, we merge the different volumes
+    for (typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.begin();it!=an_edge_per_polyline.end();++it)
+    {
+      CGAL_assertion(it->second.first.size()==2);
+      //orientation of faces around the edge (to be sure we can do it)
+      std::pair<int,int> indices = it->first;
+      const std::pair<bool,int>& polyline_info=it->second.second;
+
+      //get the two halfedges incident to the edge [indices.first,indices.second]
+      Halfedge_handle first_hedge=it->second.first.begin()->second;
+      Halfedge_handle second_hedge=boost::next(it->second.first.begin())->second;
+
+      CGAL_assertion(nodes[indices.second]==first_hedge->vertex()->point());
+      CGAL_assertion(nodes[indices.first]==first_hedge->opposite()->vertex()->point());
+      CGAL_assertion(nodes[indices.second]==second_hedge->vertex()->point());
+      CGAL_assertion(nodes[indices.first]==second_hedge->opposite()->vertex()->point());
+      
+      Polyhedron* first_poly  = it->second.first.begin()->first;
+      Polyhedron* second_poly = boost::next(it->second.first.begin())->first;
+      
+      //different handling depending on the number of incident triangles to the edge.
+      //After sewing there are two,three or four volumes if there are two,three or four incident triangles respectively
+      if ( first_hedge->is_border() || first_hedge->opposite()->is_border() ){
+        if (second_hedge->is_border()  || second_hedge->opposite()->is_border())
+          sew_2_two_volumes_case(first_hedge,second_hedge,border_halfedges,selected_hedge_to_dart,mark_index,darts_to_remove,nodes,indices,polyline_info);
+        else
+          sew_2_three_volumes_case(second_hedge, first_hedge,indices,nodes,border_halfedges,selected_hedge_to_dart,second_poly,first_poly,mark_index,darts_to_remove,polyline_info);
+      }
+      else
+        if (second_hedge->is_border()  || second_hedge->opposite()->is_border())
+          sew_2_three_volumes_case(first_hedge, second_hedge,indices,nodes,border_halfedges,selected_hedge_to_dart,first_poly,second_poly,mark_index,darts_to_remove,polyline_info);
+        else
+        {
+          //Sort the four triangle facets around their common edge
+          //  we suppose that the exterior of the polyhedron is indicated by
+          //  counterclockwise oriented facets.
+          Vertex_handle P1=first_hedge->opposite()->next()->vertex();
+          Vertex_handle P2=first_hedge->next()->vertex();
+          //    when looking from the side of indices.second, the interior of the first polyhedron is described 
+          //    by turning counterclockwise from P1 to P2
+          Vertex_handle Q1=second_hedge->opposite()->next()->vertex();
+          Vertex_handle Q2=second_hedge->next()->vertex();
+          //    when looking from the side of indices.second, the interior of the second polyhedron is described 
+          //    by turning from Q1 to Q2
+          
+          //check if the third point of each triangular face is an original point (stay -1)
+          //or a intersection point (in that case we need the index of the corresponding node to
+          //have the exact value of the point)      
+          int index_p1=node_index_of_incident_vertex(first_hedge->opposite()->next(),border_halfedges);
+          int index_p2=node_index_of_incident_vertex(first_hedge->next(),border_halfedges);
+          int index_q1=node_index_of_incident_vertex(second_hedge->opposite()->next(),border_halfedges);
+          int index_q2=node_index_of_incident_vertex(second_hedge->next(),border_halfedges);      
+          
+          #ifdef CGAL_COREFINEMENT_DEBUG
+          std::cout << index_p1 << " " << index_p2 << " " << index_q1 << " " <<index_q2 << std::endl;
+          std::cout << nodes[indices.first] << " | " << nodes[indices.second] << std::endl;
+          std::cout << P1->point() << " | " << P2->point() << " | " << Q1->point() << " | " <<Q2->point() << std::endl;
+          #endif
+          
+          if ( coplanar_triangles_case_handled(first_hedge,second_hedge,indices,nodes,index_p1,index_p2,index_q1,index_q2,selected_hedge_to_dart,mark_index,darts_to_remove,polyline_info) )
+            continue;
+          
+          CGAL_assertion(P1->point() !=Q1->point() && P1->point()!=Q2->point() && P2->point() !=Q1->point() && P2->point()!=Q2->point());
+          
+          bool Q1_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q1,P1,P2,Q1,nodes);
+          bool Q2_is_between_P1P2 = filtered_order_around_edge(indices.first,indices.second,index_p1,index_p2,index_q2,P1,P2,Q2,nodes);
+          
+          
+          //Recover the dart that will be the start point of the different sewing
+          //  dof_X_outside = dart of face of , meaning the triangle containing the
+          //  point X and part of the volume outside of the corresponding polyhedron      
+          //-----first polyhedron
+          Dart_handle dof_P1_outside = get_associated_dart(first_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_P2_outside = get_associated_dart(first_hedge,selected_hedge_to_dart);
+          //-----second polyhedron
+          Dart_handle dof_Q1_outside = get_associated_dart(second_hedge->opposite(),selected_hedge_to_dart);
+          Dart_handle dof_Q2_outside = get_associated_dart(second_hedge,selected_hedge_to_dart);   
+          
+          if ( Q1_is_between_P1P2 ){
+            if( Q2_is_between_P1P2 )
+            {
+              bool P1_is_between_Q1Q2 = filtered_order_around_edge(indices.first,indices.second,index_q1,index_q2,index_p1,Q1,Q2,P1,nodes);
+              if (!P1_is_between_Q1Q2){
+                // poly_first  - poly_second            = P1Q1 U Q2P2
+                // poly_second - poly_first             = {0}
+                // poly_first \cap poly_second          = Q1Q2
+                // opposite( poly_first U poly_second ) = P2P1
+                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1
+                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q2P2
+                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1Q2
+                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //P2P1
+                //update inside outside info (because darts from the same volume have been merged)
+                dof_Q1_outside->beta(3)->template attribute<3>()->info().inside.insert(first_poly); //update Q1Q2 inside poly
+                dof_P2_outside->template attribute<3>()->info().outside.insert(second_poly);//update P2P1 outside poly
+              }
+              else{
+                // poly_first  - poly_second            = Q2Q1
+                // poly_second - poly_first             = P2P1
+                // poly_first \cap poly_second          = P1Q2 U Q1P2
+                // opposite( poly_first U poly_second ) = {O}
+                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1
+                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //P2P1
+                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1P2
+                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1Q2
+                //update inside outside info (because darts from the same volume have been merged)
+                dof_Q2_outside->template attribute<3>()->info().inside.insert(first_poly); //update Q2Q1 inside poly
+                dof_P2_outside->template attribute<3>()->info().inside.insert(second_poly);//update P2P1 inside poly            
+              }
+            }
+            else
+            {
+              // poly_first  - poly_second            = P1Q1
+              // poly_second - poly_first             = P2Q2
+              // poly_first \cap poly_second          = Q1P2
+              // opposite( poly_first U poly_second ) = Q2P1
+              sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P1Q1
+              sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P2Q2
+              sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1P2
+              sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1
+            }        
+          }
+          else
+          {
+            if( Q2_is_between_P1P2 )
+            {
+              // poly_first  - poly_second            = Q2P2
+              // poly_second - poly_first             = Q1P1
+              // poly_first \cap poly_second          = P1Q2
+              // opposite( poly_first U poly_second ) = P2Q1
+              sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q2P2
+              sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
+              sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1Q2
+              sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P2Q1
+            }
+            else
+            {
+              bool P1_is_between_Q1Q2 = filtered_order_around_edge(indices.first,indices.second,index_q1,index_q2,index_p1,Q1,Q2,P1,nodes);
+              if (!P1_is_between_Q1Q2){
+                // poly_first  - poly_second            = P1P2
+                // poly_second - poly_first             = Q1Q2
+                // poly_first \cap poly_second          = {0}
+                // opposite( poly_first U poly_second ) = P2Q1 U Q2P1
+                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1P2
+                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //Q1Q2
+                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //P2Q1
+                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q2P1
+                //update inside outside info (because darts from the same volume have been merged)
+                dof_Q1_outside->beta(3)->template attribute<3>()->info().outside.insert(first_poly); //update Q1Q2 outside poly
+                dof_P1_outside->beta(3)->template attribute<3>()->info().outside.insert(second_poly);//update P2P1 outside poly            
+              }
+              else{
+                // poly_first  - poly_second            = {0}
+                // poly_second - poly_first             = Q1P1 U P2Q2
+                // poly_first \cap poly_second          = P1P2
+                // opposite( poly_first U poly_second ) = Q2Q1
+                sew_2_marked_darts( final_map(),dof_Q1_outside->beta(3) , dof_P1_outside          ,mark_index, nodes, indices, polyline_info); //Q1P1
+                sew_2_marked_darts( final_map(),dof_P2_outside          , dof_Q2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P2Q2
+                sew_2_marked_darts( final_map(),dof_P1_outside->beta(3) , dof_P2_outside->beta(3) ,mark_index, nodes, indices, polyline_info); //P1P2
+                sew_2_marked_darts( final_map(),dof_Q2_outside          , dof_Q1_outside          ,mark_index, nodes, indices, polyline_info); //Q2Q1
+                //update inside outside info (because darts from the same volume have been merged)
+                dof_P1_outside->beta(3)->template attribute<3>()->info().inside.insert(second_poly); //update P1P2 inside poly
+                dof_Q2_outside->template attribute<3>()->info().outside.insert(first_poly);//update Q2Q1 outside poly            
+              }
+            }
+          }
+        }      
+    }
+    
+    #ifdef CGAL_COREFINEMENT_DEBUG
+    std::cout << "number of darts to remove: " << darts_to_remove.size() <<std::endl;
+    #endif
+    //remove darts from empty volumes
+    for (typename std::set<Dart_handle>::iterator itdart=darts_to_remove.begin(),end=darts_to_remove.end();itdart!=end;++itdart){
+      final_map().erase_dart(*itdart);
+    }
+    
+    //remove empty volumes
+    typedef typename Combinatorial_map_3_::template Attribute_range<3>::type Volume_attribute_range;
+    Volume_attribute_range& ratrib=final_map().template attributes<3>();     
+    typename Volume_attribute_range::iterator curr=ratrib.begin(),end=ratrib.end();
+    do{
+      if (curr->info().is_empty)
+        final_map().template erase_attribute<3>(curr++);
+      else
+        ++curr;
+    }
+    while(curr!=end);
+    
+    CGAL_assertion(final_map().is_valid());
+    
+    //update the info of each volume knowing about only one polyhedron:
+    //this happens when one polyhedron has a connected component
+    //that do not intersect the other polyhedron
+
+    typedef Side_of_triangle_mesh<Polyhedron, Kernel> Inside_poly_test;
+
+    CGAL_precondition(polyhedron_to_map_node_to_polyhedron_vertex.size()==2);
+    Polyhedron* Poly_A = polyhedron_to_map_node_to_polyhedron_vertex.begin()->first;
+    Polyhedron* Poly_B = boost::next(polyhedron_to_map_node_to_polyhedron_vertex.begin())->first;
+    Inside_poly_test* inside_A_test_ptr=NULL;
+    Inside_poly_test* inside_B_test_ptr=NULL;
+    bool Poly_A_is_closed = Poly_A->is_closed();
+    bool Poly_B_is_closed = Poly_B->is_closed();
+
+    #ifdef CGAL_COREFINEMENT_DEBUG
+    final_map().display_characteristics(std::cout); std::cout << "\n";
+    #endif
+
+    typename Combinatorial_map_3::template  One_dart_per_cell_range<3> cell_range=final_map().template one_dart_per_cell<3>();
+    for (typename Combinatorial_map_3::template  One_dart_per_cell_range<3>::iterator
+      it = cell_range.begin(), it_end=cell_range.end();
+      it_end!= it;
+      ++it )
+    {
+      internal_IOP::Volume_info<Polyhedron>& info=it->template attribute<3>()->info();
+      std::size_t inside_size=info.inside.size();
+      std::size_t outside_size=info.outside.size();
+
+      // if a volume is not classified wrt the two polyhedra, it means the component we look at does not
+      // is a disjoint (but maybe at a vertex TAG SL001)
+      if ( inside_size + outside_size == 1)
+      {
+        bool is_inside = (inside_size==1);
+        Polyhedron* current_poly= is_inside? (*info.inside.begin()):(*info.outside.begin());
+        Polyhedron* test_poly;
+        Inside_poly_test* inside_test_ptr;
+        if ( current_poly==Poly_A)
+        {
+          // is the polyhedron is not closed, we set Poly_A to be outside by default
+          if (!Poly_B_is_closed){
+            info.outside.insert(Poly_B);
+            continue;
+          }
+          test_poly=Poly_B;
+          if (inside_B_test_ptr == NULL) inside_B_test_ptr=new Inside_poly_test(*Poly_B);
+          inside_test_ptr=inside_B_test_ptr;
+        }
+        else
+        {
+          // is the polyhedron is not closed, we set Poly_B to be outside by default
+          if (!Poly_A_is_closed){
+            info.outside.insert(Poly_A);
+            continue;
+          }
+          test_poly=Poly_A;
+          if (inside_A_test_ptr == NULL) inside_A_test_ptr=new Inside_poly_test(*Poly_A);
+          inside_test_ptr=inside_A_test_ptr;
+        }
+
+        // We need to find a point of the volume that is not on the boundary of the other volume.
+        // Then the position of this point give the position of the volume. If all the points are on
+        // the bounday, we take the mid-point of an edge (which must not be on the boundary otherwise
+        // it contradicts the fact that volumes are disjoint
+        // We first use the dart we have since one_dart_per_incident_cell has a non-negligeable cost.
+        typename Kernel::Point_3 query=it->template attribute<0>()->point();
+        CGAL::Bounded_side res = (*inside_test_ptr)(query);
+        if (res==ON_BOUNDARY)
+        {
+          typedef typename Combinatorial_map_3::
+            template One_dart_per_incident_cell_range<0,3> Vertex_range;
+
+          Vertex_range vertex_range =
+            final_map().template one_dart_per_incident_cell<0,3>(it);
+          typename Vertex_range::iterator vit = vertex_range.begin();
+
+          CGAL_assertion( typename Combinatorial_map_3::Dart_handle(vit) ==
+                          typename Combinatorial_map_3::Dart_handle(it) );
+          ++vit;
+          for ( ; vit!=vertex_range.end(); ++vit)
+          {
+            query=vit->template attribute<0>()->point();
+            res = (*inside_test_ptr)(query);
+            if ( res != ON_BOUNDARY ) break;
+          }
+
+          //take edge midpoint
+          if (res == ON_BOUNDARY)
+          {
+            /// \todo see do a better test here. At least the construction cannot fail
+            ///  but the mid-point can fall outside of the volume...
+            #ifdef CGAL_COREFINEMENT_DEBUG
+            #warning this is not exact!!!
+            #endif
+            typename Kernel::Point_3 p1=it->template attribute<0>()->point();
+            typename Kernel::Point_3 p2=it->beta(1)->template attribute<0>()->point();
+            query=midpoint(p1,p2);
+            res = (*inside_test_ptr)(query);
+          }
+
+          CGAL_assertion( res!= ON_BOUNDARY );
+        }
+
+        if (res  == ON_BOUNDED_SIDE )
+          info.inside.insert(test_poly);
+        else
+          info.outside.insert(test_poly);
+      }
+
+      #ifdef CGAL_COREFINEMENT_DEBUG
+      std::cout << "This volume has inside: ";
+      for (typename std::set<Polyhedron*>::iterator itpoly=info.inside.begin();itpoly!=info.inside.end();++itpoly)
+        std::cout << " " << *itpoly;
+      std::cout << " and outside: ";
+      for (typename std::set<Polyhedron*>::iterator itpoly=info.outside.begin();itpoly!=info.outside.end();++itpoly)
+        std::cout << " " << *itpoly;
+      std::cout << std::endl;
+      #endif
+    }
+    if (inside_A_test_ptr!=NULL) delete inside_A_test_ptr;
+    if (inside_B_test_ptr!=NULL) delete inside_B_test_ptr;
+  }
+};
+
+}//namespace CGAL
+  
+
+
+#endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersections.h b/3rdparty/CGAL-4.8/include/CGAL/intersections.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersections.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersections.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/intersections_d.h b/3rdparty/CGAL-4.8/include/CGAL/intersections_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/intersections_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/intersections_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/ipower.h b/3rdparty/CGAL-4.8/include/CGAL/ipower.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/ipower.h
rename to 3rdparty/CGAL-4.8/include/CGAL/ipower.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/is_convertible.h b/3rdparty/CGAL-4.8/include/CGAL/is_convertible.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/is_convertible.h
rename to 3rdparty/CGAL-4.8/include/CGAL/is_convertible.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/is_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/is_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/is_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/is_iterator.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/is_streamable.h b/3rdparty/CGAL-4.8/include/CGAL/is_streamable.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/is_streamable.h
rename to 3rdparty/CGAL-4.8/include/CGAL/is_streamable.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/is_y_monotone_2.h b/3rdparty/CGAL-4.8/include/CGAL/is_y_monotone_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/is_y_monotone_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/is_y_monotone_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/iterator.h b/3rdparty/CGAL-4.8/include/CGAL/iterator.h
new file mode 100644
index 0000000..c801a71
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/iterator.h
@@ -0,0 +1,2500 @@
+// Copyright (c) 2003  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+//                 Sylvain Pion
+
+#ifndef CGAL_ITERATOR_H
+#define CGAL_ITERATOR_H 1
+
+#include <CGAL/circulator.h>
+#include <CGAL/assertions.h>
+#include <CGAL/use.h>
+#include <vector>
+#include <map>
+#include <CGAL/tuple.h>
+#include <boost/variant.hpp>
+#include <boost/optional.hpp>
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4396)
+
+#  pragma warning(disable:4522)  // multiple assignment operators specified
+// The warning, with VC12, was:
+// include\CGAL/iterator.h(1251) : warning C4522: 'CGAL::internal::Derivator<D,std::tuple<double,char>,std::tuple<std::back_insert_iterator<std::vector<double,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<char,std::allocator<char>>>>>' : multiple assignment operators specified
+
+#endif
+namespace CGAL {
+
+// +----------------------------------------------------------------+
+// | Emptyset_iterator
+// +----------------------------------------------------------------+
+// |  sends everything to /dev/null
+// +----------------------------------------------------------------+
+
+struct Emptyset_iterator
+  : public std::iterator< std::output_iterator_tag, void, void, void, void >
+{
+  template< class T >
+  Emptyset_iterator& operator=(const T&) { return *this; }
+
+  Emptyset_iterator& operator++()        { return *this; }
+  Emptyset_iterator& operator++(int)     { return *this; }
+
+  Emptyset_iterator& operator*()         { return *this; }
+};
+
+// +---------------------------------------------------------------------+
+// | Insert_iterator
+// +---------------------------------------------------------------------+
+// | Insert output iterator, which calls insert(value) on the container.
+// | Similar to std::insert_iterator<> except it doesn't pass an iterator.
+// +---------------------------------------------------------------------+
+
+template < class Container >
+class Insert_iterator
+  : public std::iterator< std::output_iterator_tag, void, void, void, void >
+{
+protected:
+  Container *container;
+public:
+  typedef Container container_type;
+
+  explicit Insert_iterator(Container &c)
+  : container(&c) {}
+
+  Insert_iterator&
+  operator=(typename Container::const_reference value)
+  {
+    container->insert(value);
+    return *this;
+  }
+
+  Insert_iterator&
+  operator*() { return *this; }
+
+  Insert_iterator&
+  operator++() { return *this; }
+
+  Insert_iterator
+  operator++(int) { return *this; }
+};
+
+template < class Container >
+inline Insert_iterator<Container>
+inserter(Container &x)
+{ return Insert_iterator<Container>(x); }
+
+// +----------------------------------------------------------------+
+// | Oneset_iterator
+// +----------------------------------------------------------------+
+// |  stores a pointer to an object of type T
+// |  which will be affected by operator*().
+// +----------------------------------------------------------------+
+
+template < class T >
+class Oneset_iterator
+  : public std::iterator< std::bidirectional_iterator_tag,
+			  void, void, void, void >
+{
+  T* t;
+  
+public:
+  // types
+  typedef Oneset_iterator<T> Self;
+  
+public:
+  Oneset_iterator(T& t) : t(&t) {}
+
+  T&       operator*()        { return *t; }
+  const T& operator*()  const { return *t; }
+  T*       operator->()       { return t; }
+  const T* operator->() const { return t; }
+
+  Self&    operator++()       { return *this; }
+  Self&    operator++(int)    { return *this; }
+
+  Self&    operator--()       { return *this; }
+  Self&    operator--(int)    { return *this; }
+};
+
+// +----------------------------------------------------------------+
+// | Const_oneset_iterator
+// +----------------------------------------------------------------+
+// |  stores an object of type T
+// |  which will be affected by operator*().
+// +----------------------------------------------------------------+
+
+template < typename T >
+class Const_oneset_iterator {
+public:
+  
+  // types
+  typedef  std::random_access_iterator_tag    iterator_category;
+  typedef  std::ptrdiff_t                     difference_type;
+  typedef  T                                  value_type;
+  typedef  value_type*                        pointer;
+  typedef  value_type&                        reference;
+  
+  typedef  Const_oneset_iterator<T>           Self;
+  typedef  difference_type                    Diff;
+  typedef  value_type                         Val;
+  typedef  pointer                            Ptr;
+  typedef  reference                          Ref;
+  
+  // construction
+  Const_oneset_iterator( const T& t = T(), Diff n = 0)
+    : value( t), index( n)
+  { }
+  
+  // access
+  Ref               operator *  ( )       { return  value; }
+  const value_type& operator *  ( ) const { return  value; }
+  Ptr               operator -> ( )       { return &value; }
+  const value_type* operator -> ( ) const { return &value; }
+  
+  // equality operator
+  bool       operator == ( const Self& x) const { return ( index==x.index); }
+  bool       operator != ( const Self& x) const { return ( index!=x.index); }
+  
+  // forward operations
+  // ------------------
+  Self&      operator ++ (    ) {                   ++index; return *this; }
+  Self       operator ++ ( int) { Self tmp = *this; ++index; return tmp;   }
+  
+  // bidirectional operations
+  // ------------------------
+  Self&      operator -- (    ) {                   --index; return *this; }
+  Self       operator -- ( int) { Self tmp = *this; --index; return tmp;   }
+  
+  // random access operations
+  // ------------------------
+  // access
+  Ref               operator [] ( Diff )       { return value;}
+  const value_type& operator [] ( Diff ) const { return value;}
+  
+  // less operator
+  bool       operator <  ( const Self& x) const { return ( index < x.index);}
+  
+  // arithmetic operations
+  Self&      operator += ( Diff n) { index += n; return *this; }
+  Self&      operator -= ( Diff n) { index -= n; return *this; }
+  
+  Self       operator +  ( Diff n) const { Self tmp = *this; return tmp+=n; }
+  Self       operator -  ( Diff n) const { Self tmp = *this; return tmp-=n; }
+  
+  Diff       operator -  ( const Self& x) const { return index - x.index; }
+  
+private:
+  
+  // data members
+  Val   value;
+  Diff  index;
+};
+
+// +----------------------------------------------------------------+
+// | Counting_output_iterator
+// +----------------------------------------------------------------+
+// |  stores a pointer to an int,
+// |  which will be incremented by operator=().
+// +----------------------------------------------------------------+
+
+// Undocumented, because there is some hope to merge it into Counting_iterator
+class Counting_output_iterator
+  : public std::iterator< std::output_iterator_tag, void, void, void, void >
+{
+  std::size_t *c;
+public:
+  Counting_output_iterator(std::size_t *cc) : c(cc) { *c = 0; }
+
+  Counting_output_iterator& operator++()    { return *this; }
+  Counting_output_iterator& operator++(int) { return *this; }
+
+  Counting_output_iterator& operator*() { return *this; }
+
+  template <typename T>
+  void operator=(const T&) { ++*c; }
+
+  std::size_t current_counter() const { return *c; }
+};
+
+template < class I,
+           class Val = typename std::iterator_traits<I>::value_type >
+class Counting_iterator {
+protected:
+  I            nt;    // The internal iterator.
+  std::size_t  d_i;   // The internal counter.
+public:
+  typedef I  Iterator;
+  typedef Counting_iterator<I,Val> Self;
+
+  typedef std::input_iterator_tag  iterator_category;
+  typedef Val                      value_type;
+  typedef std::ptrdiff_t           difference_type;
+  typedef const value_type&        reference;
+  typedef const value_type*        pointer;
+
+  // CREATION
+  // --------
+
+  Counting_iterator( std::size_t i = 0)             : d_i(i) {}
+  Counting_iterator( Iterator j, std::size_t i = 0) : nt(j), d_i(i) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+  Iterator    current_iterator() const { return nt;}
+  std::size_t current_counter()  const { return d_i;}
+
+  bool operator==( const Self& i) const { return ( d_i == i.d_i); }
+  bool operator!=( const Self& i) const { return !(*this == i);   }
+  reference  operator*()  const { return *nt; }
+  pointer    operator->() const { return nt.operator->(); }
+  Self& operator++() {
+    ++nt;
+    ++d_i;
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+};
+
+template < class I, int N,
+           class Ref  = typename std::iterator_traits<I>::reference,
+           class Ptr  = typename std::iterator_traits<I>::pointer,
+           class Val  = typename std::iterator_traits<I>::value_type,
+           class Dist = typename std::iterator_traits<I>::difference_type,
+           class Ctg  = typename std::iterator_traits<I>::iterator_category >
+class N_step_adaptor {
+protected:
+  I        nt;    // The internal iterator.
+  bool     empty;
+public:
+  typedef I                                        Iterator;
+  typedef N_step_adaptor<I,N>                      Self;
+  typedef std::iterator_traits<I>          ITI;
+  typedef typename ITI::reference          reference;
+  typedef typename ITI::pointer            pointer;
+  typedef typename ITI::value_type         value_type;
+  typedef typename ITI::difference_type    difference_type;
+  typedef typename ITI::iterator_category  iterator_category;
+  // Special for circulators.
+  typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
+  typedef typename  C_S_Traits::size_type               size_type;
+
+  // CREATION
+  // --------
+
+  N_step_adaptor(): empty(true) {}
+  N_step_adaptor( Iterator j) : nt(j), empty(false) {}
+
+  template <class II>
+  N_step_adaptor( const N_step_adaptor<II,N>& j)
+    : nt( j.current_iterator()), empty(j.empty) {}
+
+  // OPERATIONS Forward Category
+  // ---------------------------
+
+  // Circulator stuff.
+  typedef  I  Circulator;
+  Circulator  current_circulator() const { return nt;}
+
+  Iterator  current_iterator() const { return nt;}
+  bool operator==( Nullptr_t p) const {
+    CGAL_USE(p);
+    CGAL_assertion( p == 0);
+    return empty;
+  }
+  bool  operator!=( Nullptr_t p) const { return !(*this == p); }
+  bool  operator==( const Self& i) const { return (empty && i.empty) ||( nt == i.nt); }
+  bool  operator!=( const Self& i) const { return !(*this == i); }
+  reference operator*()  const { return *nt; }
+  pointer   operator->() const { return nt.operator->(); }
+  Self& operator++() {
+    std::advance( nt, N);
+    return *this;
+  }
+  Self  operator++(int) {
+    Self tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  // OPERATIONS Bidirectional Category
+  // ---------------------------------
+
+  Self& operator--() {
+    std::advance( nt, -N);
+    return *this;
+  }
+  Self  operator--(int) {
+    Self tmp = *this;
+    --*this;
+    return tmp;
+  }
+
+  // OPERATIONS Random Access Category
+  // ---------------------------------
+
+  Self  min_circulator() const { return Self( nt.min_circulator()); }
+  Self& operator+=( difference_type n) {
+    nt += difference_type(N * n);
+    return *this;
+  }
+  Self  operator+( difference_type n) const {
+    Self tmp = *this;
+    tmp.nt += difference_type(N * n);
+    return tmp;
+  }
+  Self& operator-=( difference_type n) {
+    return operator+=( -n);
+  }
+  Self  operator-( difference_type n) const {
+    Self tmp = *this;
+    return tmp += -n;
+  }
+  difference_type  operator-( const Self& i) const { return (nt-i.nt)/N;}
+  reference operator[]( difference_type n) const {
+    Self tmp = *this;
+    tmp += n;
+    return tmp.operator*();
+  }
+  bool operator<( const Self& i) const { return ( nt < i.nt); }
+  bool operator>( const Self& i) const { return i < *this; }
+  bool operator<=( const Self& i) const { return !(i < *this); }
+  bool operator>=( const Self& i) const { return !(*this < i); }
+};
+
+// Microsoft 1300 cannot handle the default template parameters. Hence, ...
+template < class I, int N, class Ref, class Ptr, 
+	   class Val, class Dist, class Ctg >
+inline
+N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg>
+operator+(typename N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg>::difference_type n,
+	  N_step_adaptor<I,N,Ref,Ptr,Val,Dist,Ctg> i)
+{ return i += n; }
+
+template < class I, int N>
+class N_step_adaptor_derived : public I {
+public:
+    typedef I                               Iterator;
+    typedef I                               Circulator;
+    typedef N_step_adaptor_derived<I,N>     Self;
+    typedef typename I::iterator_category   iterator_category;
+    typedef typename I::value_type          value_type;
+    typedef typename I::difference_type     difference_type;
+    typedef typename I::reference           reference;
+    typedef typename I::pointer             pointer;
+    // Special for circulators.
+    typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
+    typedef typename  C_S_Traits::size_type               size_type;
+
+// CREATION
+// --------
+
+    N_step_adaptor_derived() {}
+    N_step_adaptor_derived( Iterator j) : I(j) {}
+
+    template <class II>
+    N_step_adaptor_derived( const N_step_adaptor_derived<II,N>& j)
+        : I( j.current_iterator()) {}
+
+// OPERATIONS Forward Category
+// ---------------------------
+
+    Circulator current_circulator() const { return *this;}
+    Iterator   current_iterator()   const { return *this;}
+
+    Self& operator++() {
+        std::advance( (I&)*this, N);
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+
+// OPERATIONS Bidirectional Category
+// ---------------------------------
+
+    Self& operator--() {
+        std::advance( (I&)*this, -N);
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+
+// OPERATIONS Random Access Category
+// ---------------------------------
+
+    Self  min_circulator() const { return Self( I::min_circulator()); }
+    Self& operator+=( difference_type n) {
+        I::operator+=( difference_type(N * n));
+        return *this;
+    }
+    Self  operator+( difference_type n) const {
+        Self tmp = *this;
+        tmp += n;
+        return tmp;
+    }
+    Self& operator-=( difference_type n) {
+        return operator+=( -n);
+    }
+    Self  operator-( difference_type n) const {
+        Self tmp = *this;
+        return tmp += -n;
+    }
+    difference_type  operator-( const Self& i) const {
+        return (I::operator-(i)) / N;
+    }
+    reference  operator[]( difference_type n) const {
+        Self tmp = *this;
+        tmp += n;
+        return tmp.operator*();
+    }
+};
+
+template < class I, int N >
+inline
+N_step_adaptor_derived<I,N>
+operator+( typename N_step_adaptor_derived<I,N>::difference_type n,
+           N_step_adaptor_derived<I,N> i)
+{ return i += n; }
+
+template < class I, class P > struct Filter_iterator;
+
+template < class I, class P >
+bool operator==(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
+template < class I, class P >
+bool operator<(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
+
+template < class I, class P >
+struct Filter_iterator {
+  typedef I                                Iterator;
+  typedef P                                Predicate;
+  typedef Filter_iterator<I,P>             Self;
+  typedef std::iterator_traits<I>          ITI;
+  typedef typename ITI::reference          reference;
+  typedef typename ITI::pointer            pointer;
+  typedef typename ITI::value_type         value_type;
+  typedef typename ITI::difference_type    difference_type;
+  typedef typename ITI::iterator_category  iterator_category;
+  // Special for circulators.
+  typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
+  typedef typename  C_S_Traits::size_type               size_type;
+
+protected:
+  Iterator e_;       // past-the-end position.
+  Iterator c_;       // current position.
+  Predicate p_;      // Leave out x <==> p_(x).
+public:
+
+  Filter_iterator() {}
+
+  Filter_iterator(Iterator e, const Predicate& p)
+  : e_(e), c_(e), p_(p) {}
+
+  Filter_iterator(Iterator e, const Predicate& p, Iterator c)
+  : e_(e), c_(c), p_(p)
+  {
+    while (c_ != e_ && p_(c_))
+      ++c_;
+  }
+
+  Self& operator++() {
+    do { ++c_; } while (c_ != e_ && p_(c_));
+    return *this;
+  }
+
+  Self& operator--() {
+    do {
+      --c_;
+    } while (p_(c_));
+    return *this;
+  }
+
+  Self operator++(int) {
+    Self tmp(*this);
+    ++(*this);
+    return tmp;
+  }
+
+  Self operator--(int) {
+    Self tmp(*this);
+    --(*this);
+    return tmp;
+  }
+  
+  reference operator*() const { return *c_;  }
+  pointer operator->() const  { return &*c_; }
+  const Predicate& predicate() const { return p_; }
+  Iterator base() const { return c_; }
+
+  Iterator end() const { return e_; }
+  bool is_end() const { return (c_ == e_); }
+
+  friend bool operator== <>(const Self&, const Self&);
+  friend bool operator< <>(const Self&, const Self&);
+};
+
+template < class I, class P >
+inline Filter_iterator< I, P >
+filter_iterator(I e, const P& p)
+{ return Filter_iterator< I, P >(e, p); }
+
+template < class I, class P >
+inline Filter_iterator< I, P >
+filter_iterator(I e, const P& p, I c)
+{ return Filter_iterator< I, P >(e, p, c); }
+
+template < class I, class P >
+inline
+bool operator==(const Filter_iterator<I,P>& it1,
+                const Filter_iterator<I,P>& it2)
+{
+  CGAL_precondition(it1.e_ == it2.e_);
+  return it1.base() == it2.base();
+}
+
+template < class I, class P >
+inline
+bool operator<(const Filter_iterator<I,P>& it1,
+                const Filter_iterator<I,P>& it2)
+{
+  return it1.base() < it2.base();
+}
+
+template < class I, class P >
+inline
+bool operator!=(const Filter_iterator<I,P>& it1,
+                const Filter_iterator<I,P>& it2)
+{ return !(it1 == it2); }
+
+template <class I1,class Op>
+class Join_input_iterator_1 : public 
+std::iterator<typename std::iterator_traits<I1>::iterator_category, 
+	      typename Op::result_type, 
+	      typename std::iterator_traits<I1>::difference_type, 
+	      typename Op::result_type*,
+	      typename Op::result_type&>
+{ 
+public: 
+  typedef Join_input_iterator_1<I1,Op> Self;
+  typedef typename Op::result_type value_type;
+  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
+  typedef value_type* pointer;
+  typedef value_type& reference; 
+  
+protected:
+  I1 i1;
+  Op op;
+  mutable value_type val;  // Note: mutable is needed because we want to
+                           // return a reference in operator*() and
+                           // operator[](int) below.
+
+public:
+  Join_input_iterator_1() {}
+  Join_input_iterator_1(const Join_input_iterator_1& it)
+    : i1(it.i1), op(it.op) {}
+  Join_input_iterator_1(I1 i,const Op& o=Op())
+    : i1(i), op(o) {}
+  
+  I1 current_iterator1() const { return i1; }
+  
+  bool operator==(const Self& i) const {
+    return i1 == i.i1;
+  }
+  bool operator!=(const Self& i) const { return !(*this == i); }
+  bool operator< (const Self& i) const {
+    return i1 < i.i1;
+  }
+
+  Join_input_iterator_1& operator=(const Join_input_iterator_1& it)
+  {
+    i1 = it.i1;
+    op = it.op;
+    return *this;
+  }
+  
+  const value_type& operator*() const { 
+    val = op(*i1);
+    return val;
+  }
+  
+  Self& operator++(   ) {
+    ++i1;
+    return *this;
+  }
+  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
+  Self& operator--(   ) {
+    --i1;
+    return *this;
+  }
+  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
+  
+  const value_type& operator[](difference_type i) const {
+    val = op(i1[i]);
+    return val;
+  }
+  
+  Self& operator+=(difference_type n) {
+    i1 += n;
+    return *this;
+  }
+  Self& operator-=(difference_type n) {
+    i1 -= n;
+    return *this;
+  }
+  Self  operator+ (difference_type n) const {
+    Self tmp = *this;
+    return tmp += n;
+  }
+  Self  operator- (difference_type n) const {
+    Self tmp = *this;
+    return tmp -= n;
+  }
+  difference_type operator-(const Self& i) const { return i1 - i.i1; }
+};
+
+template <class I1,class I2,class Op>
+class Join_input_iterator_2 : public 
+std::iterator<typename std::iterator_traits<I1>::iterator_category, 
+	      typename Op::result_type, 
+	      typename std::iterator_traits<I1>::difference_type, 
+	      typename Op::result_type*,
+	      typename Op::result_type&>
+{ 
+public: 
+  typedef Join_input_iterator_2<I1,I2,Op> Self;
+  typedef typename Op::result_type value_type;
+  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
+  typedef value_type* pointer;
+  typedef value_type& reference; 
+  
+protected:
+  I1 i1;
+  I2 i2;
+  Op op;
+  mutable value_type val;  // Note: mutable is needed because we want to
+                           // return a reference in operator*() and
+                           // operator[](int) below.
+  
+public:
+  Join_input_iterator_2() {}
+  Join_input_iterator_2(const Join_input_iterator_2& it)
+    : i1(it.i1), i2(it.i2), op(it.op) {}
+  Join_input_iterator_2(I1 i1,I2 i2,const Op& op=Op())
+    : i1(i1), i2(i2), op(op) {}
+  
+  I1 current_iterator1() const { return i1; }
+  I2 current_iterator2() const { return i2; }
+  
+  bool operator==(const Self& i) const {
+    return i1 == i.i1 && i2 == i.i2;
+  }
+  bool operator!=(const Self& i) const { return !(*this == i); }
+  bool operator< (const Self& i) const {
+    return i1 < i.i1 && i2 < i.i2;
+  }
+  
+  Join_input_iterator_2& operator=(const Join_input_iterator_2& it)
+  {
+    i1 = it.i1;
+    i2 = it.i2;
+    op = it.op;
+    return *this;
+  }
+
+  const value_type& operator*() const { 
+    val = op(*i1,*i2);
+    return val;
+  }
+  
+  Self& operator++(   ) {
+    ++i1;
+    ++i2;
+    return *this;
+  }
+  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
+  Self& operator--(   ) {
+    --i1;
+    --i2;
+    return *this;
+  }
+  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
+  
+  const value_type& operator[](difference_type i) const {
+    val = op(i1[i],i2[i]);
+    return val;
+  }
+  
+  Self& operator+=(difference_type n) {
+    i1 += n;
+    i2 += n;
+    return *this;
+  }
+  Self& operator-=(difference_type n) {
+    i1 -= n;
+    i2 -= n;
+    return *this;
+  }
+  Self  operator+ (difference_type n) const {
+    Self tmp = *this;
+    return tmp += n;
+  }
+  Self  operator- (difference_type n) const {
+    Self tmp = *this;
+    return tmp -= n;
+  }
+  difference_type operator-(const Self& i) const { return i1 - i.i1; }
+};
+
+template <class I1,class I2,class I3,class Op>
+class Join_input_iterator_3 : public 
+std::iterator<typename std::iterator_traits<I1>::iterator_category, 
+	      typename Op::result_type, 
+	      typename std::iterator_traits<I1>::difference_type, 
+	      typename Op::result_type*,
+	      typename Op::result_type&>
+{ 
+public: 
+  typedef Join_input_iterator_3<I1,I2,I3,Op> Self;
+  typedef typename Op::result_type value_type;
+  typedef typename std::iterator_traits<I1>::difference_type difference_type; 
+  typedef value_type* pointer;
+  typedef value_type& reference; 
+  
+protected:
+  I1 i1;
+  I2 i2;
+  I3 i3;
+  Op op;
+  mutable value_type val;  // Note: mutable is needed because we want to
+                           // return a reference in operator*() and
+                           // operator[](int) below.
+  
+public:
+  Join_input_iterator_3() {}
+  Join_input_iterator_3(const Join_input_iterator_3& it)
+    : i1(it.i1), i2(it.i2), i3(it.i3), op(it.op) {}
+  Join_input_iterator_3(I1 i1,I2 i2,I3 i3,const Op& op=Op())
+    : i1(i1), i2(i2), i3(i3), op(op) {}
+  
+  I1 current_iterator1() const { return i1; }
+  I2 current_iterator2() const { return i2; }
+  I2 current_iterator3() const { return i3; }
+  
+  bool operator==(const Self& i) const {
+    return i1 == i.i1 && i2 == i.i2 && i3 == i.i3;
+  }
+  bool operator!=(const Self& i) const { return !(*this == i); }
+  bool operator< (const Self& i) const {
+    return i1 < i.i1 && i2 < i.i2 && i3 < i.i3;
+  }
+  
+  Join_input_iterator_3& operator=(const Join_input_iterator_3& it)
+  {
+    i1 = it.i1;
+    i2 = it.i1;
+    i3 = it.i3;
+    op = it.op;
+    return *this;
+  }
+
+  const value_type& operator*() const { 
+    val = op(*i1,*i2,*i3);
+    return val;
+  }
+  
+  Self& operator++(   ) {
+    ++i1;
+    ++i2;
+    ++i3;
+    return *this;
+  }
+  Self  operator++(int) { Self tmp = *this; ++(*this); return tmp; }
+  Self& operator--(   ) {
+    --i1;
+    --i2;
+    --i3;
+    return *this;
+  }
+  Self  operator--(int) { Self tmp = *this; --(*this); return tmp; }
+  
+  const value_type& operator[](difference_type i) const {
+    val = op(i1[i],i2[i],i3[i]);
+    return val;
+  }
+  
+  Self& operator+=(difference_type n) {
+    i1 += n;
+    i2 += n;
+    i3 += n;
+    return *this;
+  }
+  Self& operator-=(difference_type n) {
+    i1 -= n;
+    i2 -= n;
+    i3 -= n;
+    return *this;
+  }
+  Self  operator+ (difference_type n) const {
+    Self tmp = *this;
+    return tmp += n;
+  }
+  Self  operator- (difference_type n) const {
+    Self tmp = *this;
+    return tmp -= n;
+  }
+  difference_type operator-(const Self& i) const { return i1 - i.i1; }
+};
+
+template < class IC>
+class Inverse_index {
+
+  // DEFINITION
+  //
+  // The class Inverse_index<IC,T> constructs an inverse index for a
+  // given range [i,j) of two iterators or circulators of type `IC' with the
+  // value type `T'. The first element I in the
+  // range [i,j) has the index 0. Consecutive elements are numbered
+  // incrementally. The inverse index provides a query for a given iterator
+  // or circulator k to retrieve its index number. For random access
+  // iterators or circulators, it is done in constant time by subtracting i.
+  // For other iterator categories, an STL `map' is used, which results in a
+  // log j-i query time. A comparison operator `operator<' is needed for
+  // `T*'.
+  //
+  // CREATION
+
+protected:
+  typedef std::map< const void*, std::size_t >  Index;
+  Index   idx;
+  IC      start;
+  typedef typename Index::iterator        Index_iterator;
+  typedef typename Index::const_iterator  Index_const_iterator;
+  typedef typename Index::value_type      Item;
+
+protected:
+  void ini_idx( IC i, const IC& j, std::input_iterator_tag);
+  void ini_idx( const IC& i, const IC& j, std::forward_iterator_tag){
+    ini_idx( i, j, std::input_iterator_tag());
+  }
+  void ini_idx(const IC& i,const IC& j, std::bidirectional_iterator_tag){
+    ini_idx( i, j, std::input_iterator_tag());
+  }
+  void ini_idx( const IC& i, const IC& j, Forward_circulator_tag) {
+    ini_idx( i, j, std::input_iterator_tag());
+  }
+  void ini_idx( const IC& i, const IC& j, Bidirectional_circulator_tag){
+    ini_idx( i, j, std::input_iterator_tag());
+  }
+  void ini_idx( const IC&, const IC&, std::random_access_iterator_tag){}
+  void ini_idx( const IC&, const IC&, Random_access_circulator_tag){}
+
+public:
+  void init_index( const IC& i, const IC& j) {
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    ini_idx( i, j, ICC());
+  }
+
+protected:
+  void push_back( const IC& k, std::input_iterator_tag) {
+    std::size_t d = idx.size();
+    idx[ &*k] = d;
+  }
+  void push_back( const IC& k, std::forward_iterator_tag){
+    push_back( k, std::input_iterator_tag());
+  }
+  void push_back( const IC& k, std::bidirectional_iterator_tag){
+    push_back( k, std::input_iterator_tag());
+  }
+  void push_back( const IC& k, Forward_circulator_tag){
+    push_back( k, std::input_iterator_tag());
+  }
+  void push_back( const IC& k, Bidirectional_circulator_tag){
+    push_back( k, std::input_iterator_tag());
+  }
+  void push_back( const IC&, std::random_access_iterator_tag){}
+  void push_back( const IC&, Random_access_circulator_tag){}
+
+public:
+  void push_back( const IC& k) {
+    // adds k at the end of the indices.
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    push_back( k, ICC());
+  }
+
+  std::size_t find( const IC& k, std::random_access_iterator_tag) const {
+    return std::size_t(k - start);
+  }
+  std::size_t find( const IC& k, Random_access_circulator_tag) const {
+    return std::size_t(k - start);
+  }
+  std::size_t find( const IC& k, std::input_iterator_tag) const {
+    // returns inverse index of k.
+    Index_const_iterator i = idx.find( &*k);
+    CGAL_assertion( i != idx.end());
+    return (*i).second;
+  }
+  std::size_t find( const IC& k, std::forward_iterator_tag) const {
+    return find( k, std::input_iterator_tag());
+  }
+  std::size_t find( const IC& k, std::bidirectional_iterator_tag) const {
+    return find( k, std::input_iterator_tag());
+  }
+  std::size_t find( const IC& k, Forward_circulator_tag) const {
+    return find( k, std::input_iterator_tag());
+  }
+  std::size_t find( const IC& k, Bidirectional_circulator_tag) const {
+    return find( k, std::input_iterator_tag());
+  }
+
+  typedef IC           iterator;
+  typedef IC           Circulator;
+  typedef std::size_t  size_type;
+
+  Inverse_index() : start(IC()) {}
+  // invalid index.
+
+  Inverse_index( const IC& i) : start(i) {};
+  // empty inverse index initialized to start at i.
+
+  Inverse_index( const IC& i, const IC& j) : start(i) {
+    // inverse index initialized with range [i,j).
+    init_index( i, j);
+  }
+
+  // OPERATIONS
+
+  std::size_t operator[]( const IC& k) const {
+    // returns inverse index of k.
+    typedef typename std::iterator_traits<IC>::iterator_category
+      category;
+    return find( k, category());
+  }
+};
+
+template < class IC>
+void
+Inverse_index< IC>::ini_idx( IC i, const IC& j, std::input_iterator_tag) {
+  std::size_t n = 0;
+  Index_iterator hint = idx.begin();
+  if ( ! is_empty_range( i, j)) {
+    do {
+      hint = idx.insert( hint, Item( &*i, n));
+      n++;
+    } while ((++i) != (j));
+  }
+}
+
+template < class IC>
+class Random_access_adaptor {
+
+  // DEFINITION
+  //
+  // The class Random_access_adaptor<IC> provides a random access
+  // for data structures. Either the data structure supports random access
+  // iterators or circulators where this class maps function calls to the
+  // iterator or circulator, or a STL `vector' is used to provide the random
+  // access. The iterator or circulator of the data structure are of type
+  // `IC'.
+  //
+  // CREATION
+
+protected:
+  typedef std::vector< IC> Index;
+  Index   index;
+  IC      start;
+
+public:
+  typedef typename Index::size_type  size_type;
+
+  void init_index( IC i, const IC& j, std::forward_iterator_tag);
+  void init_index( const IC& i, const IC& j,
+                   std::bidirectional_iterator_tag){
+    init_index( i, j, std::forward_iterator_tag());
+  }
+  void init_index( const IC& i, const IC&,
+                   std::random_access_iterator_tag){
+    start = i;
+  }
+  void init_index( const IC& i, const IC& j) {
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    init_index( i, j, ICC());
+  }
+
+
+  void reserve( size_type r, std::forward_iterator_tag) {
+    index.reserve( r);
+  }
+  void reserve( size_type r, std::bidirectional_iterator_tag){
+    reserve( r, std::forward_iterator_tag());
+  }
+  void reserve( size_type, std::random_access_iterator_tag){}
+
+
+  void push_back( const IC& k, std::forward_iterator_tag) {
+    index.push_back(k);
+  }
+  void push_back( const IC& k, std::bidirectional_iterator_tag){
+    push_back( k, std::forward_iterator_tag());
+  }
+  void push_back( const IC&, std::random_access_iterator_tag){}
+
+
+  const IC& find( size_type n, std::forward_iterator_tag) const {
+    // returns inverse index of k.
+    CGAL_assertion( n < index.size());
+    return index[n];
+  }
+  const IC& find( size_type n, std::bidirectional_iterator_tag) const {
+    return find( n, std::forward_iterator_tag());
+  }
+  IC  find( size_type n, std::random_access_iterator_tag) const {
+    return start + n;
+  }
+
+  typedef IC   iterator;
+  typedef IC   Circulator;
+
+  Random_access_adaptor() : start(IC()) {}
+  // invalid index.
+
+  Random_access_adaptor( const IC& i) : start(i) {}
+  // empty random access index initialized to start at i.
+
+  Random_access_adaptor( const IC& i, const IC& j) : start(i) {
+    // random access index initialized with range [i,j).
+    init_index( i, j);
+  }
+
+  void reserve( size_type r) {
+    // reserve r entries, if a `vector' is used internally.
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    reserve( r, ICC());
+  }
+
+  // OPERATIONS
+
+  IC  find( size_type n) const {
+    // returns inverse index of k.
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    return find( n, ICC());
+  }
+
+  IC  operator[]( size_type n) const { return find(n); }
+
+  void push_back( const IC& k) {
+    // adds k at the end of the indices.
+    typedef typename std::iterator_traits<IC>::iterator_category ICC;
+    push_back( k, ICC());
+  }
+};
+
+template < class IC>
+void
+Random_access_adaptor< IC>::init_index( IC i, const IC& j,
+                                        std::forward_iterator_tag) {
+  if ( ! is_empty_range( i, j)) {
+    do {
+      index.push_back( i);
+    } while ((++i) != (j));
+  }
+}
+
+template < class IC, class T >
+class Random_access_value_adaptor : public Random_access_adaptor<IC> {
+public:
+  typedef typename Random_access_adaptor<IC>::size_type size_type;
+
+  Random_access_value_adaptor() {}
+  // invalid index.
+
+  Random_access_value_adaptor( const IC& i)
+  : Random_access_adaptor<IC>(i) {}
+  // empty random access index initialized to start at i.
+
+  Random_access_value_adaptor( const IC& i, const IC& j)
+  : Random_access_adaptor<IC>(i,j) {}
+  // random access index initialized with range [i,j).
+
+  // OPERATIONS
+
+  T& operator[]( size_type n) const {
+    // returns inverse index of k.
+    return *(Random_access_adaptor<IC>::operator[](n));
+  }
+};
+
+template<typename _Iterator, typename Predicate>
+    class Filter_output_iterator
+    : public std::iterator<std::output_iterator_tag, void, void, void, void>
+    {
+    protected:
+      _Iterator iterator;
+      Predicate predicate;
+
+    public:
+      typedef _Iterator          iterator_type;
+
+      explicit Filter_output_iterator(_Iterator& __x, const Predicate& pred) 
+	: iterator(__x), predicate(pred) 
+      {}
+
+      template <typename T>
+      Filter_output_iterator&
+      operator=(const T& t)
+      {
+	if(! predicate(t))
+	  *iterator = t;
+	return *this;
+      }
+
+      Filter_output_iterator&
+      operator*()
+      { return *this; }
+
+      Filter_output_iterator&
+      operator++()
+      { 
+        ++iterator;
+        return *this; 
+      }
+
+      Filter_output_iterator
+      operator++(int)
+      {
+        Filter_output_iterator res(*this);
+        ++iterator;
+        return res; 
+      }
+    };
+
+template < class I, class P >
+inline Filter_output_iterator< I, P >
+filter_output_iterator(I e, const P& p)
+{ return Filter_output_iterator< I, P >(e, p); }
+
+namespace internal {
+
+template<typename OutputIterator>
+struct Output_visitor : boost::static_visitor<OutputIterator&> {
+  Output_visitor(OutputIterator* it) : out(it) {}
+  OutputIterator* out;
+  
+  template<typename T>
+  OutputIterator& operator()(const T& t) {
+    *(*out)++ = t;
+    return *out;
+  }
+};
+
+} // internal
+
+
+#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE)
+
+namespace internal {
+
+template < typename D, typename V = cpp11::tuple<>, typename O = cpp11::tuple<> >
+struct Derivator
+{
+#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
+  typedef Derivator<D, V, O> Self;
+  Self& operator=(const Self&) = delete;
+#endif
+  template <class Tuple>
+  void tuple_dispatch(const Tuple&)
+  {}
+};
+
+template < typename D, typename V1, typename O1, typename... V, typename... O>
+struct Derivator<D, cpp11::tuple<V1, V...>, cpp11::tuple<O1, O...> >
+  : public Derivator<D, cpp11::tuple<V...>, cpp11::tuple<O...> >
+{
+  typedef Derivator<D, cpp11::tuple<V1, V...>, cpp11::tuple<O1, O...> > Self;
+  typedef Derivator<D, cpp11::tuple<V...>, cpp11::tuple<O...> > Base;
+
+#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
+  Self& operator=(const Self&) = delete;
+#endif
+
+  using Base::operator=;
+  
+  D& operator=(const V1& v)
+  {
+    * cpp11::get< D::size - sizeof...(V) - 1 >(static_cast<typename D::Iterator_tuple&>(static_cast<D&>(*this))) ++ = v;
+    return static_cast<D&>(*this);
+  }
+
+  template <class Tuple>
+  void tuple_dispatch(const Tuple& t)
+  {
+    * cpp11::get< D::size - sizeof...(V) - 1 >(static_cast<typename D::Iterator_tuple&>(static_cast<D&>(*this))) ++ = 
+        cpp11::get< D::size - sizeof...(V) - 1 >(t);
+    static_cast<Base&>(*this).tuple_dispatch(t);
+  }
+};
+
+} // internal
+
+
+// OutputIterator which accepts several types in *o++= and dispatches,
+// wraps several other output iterators, and dispatches accordingly.
+template < typename V, typename O >
+class Dispatch_output_iterator;
+
+template < typename... V, typename... O >
+class Dispatch_output_iterator < cpp11::tuple<V...>, cpp11::tuple<O...> >
+ : private internal::Derivator<Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> >, cpp11::tuple<V...>, cpp11::tuple<O...> >
+ , public cpp11::tuple<O...>
+{
+  CGAL_static_assertion_msg(sizeof...(V) == sizeof...(O),
+                "The number of explicit template parameters has to match the number of arguments");
+
+  static const int size = sizeof...(V);
+
+  template <typename D, typename V_, typename O_>
+  friend struct internal::Derivator;
+
+public:
+
+  typedef cpp11::tuple<O...>               Iterator_tuple;
+  typedef cpp11::tuple<V...>               Value_type_tuple;
+
+  typedef std::output_iterator_tag  iterator_category;
+  typedef void                      value_type;
+  typedef void                      difference_type;
+  typedef void                      pointer;
+  typedef void                      reference;
+
+private:
+
+  typedef Dispatch_output_iterator Self;
+  typedef internal::Derivator<Self, Value_type_tuple, Iterator_tuple > Base;
+
+public:
+
+  using Base::operator=;
+  using Base::tuple_dispatch;
+
+  Dispatch_output_iterator(O... o) : cpp11::tuple<O...>(o...) {}
+
+  Self& operator=(const Self& s)
+  {
+    static_cast<Iterator_tuple&>(*this) = static_cast<const Iterator_tuple&>(s);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  Self& operator++() { return *this; }
+  Self& operator++(int) { return *this; }
+  Self& operator*() { return *this; }
+
+  const Iterator_tuple& get_iterator_tuple() const { return *this; }
+  
+  Self& operator=(const cpp11::tuple<V...>& t)
+  {
+    tuple_dispatch(t);
+    return *this;
+  }
+};
+
+template < typename... V, typename... O>
+Dispatch_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >
+dispatch_output(O... o)
+{
+  return Dispatch_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> > (o...);
+}
+
+
+// Same as Dispatch_output_iterator, but has a dummy *o++= for all other types
+// that drops the data (same as Emptyset_iterator).
+
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+template < typename... V, typename... O >
+class Dispatch_or_drop_output_iterator < cpp11::tuple<V...>, cpp11::tuple<O...> >
+ : public Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator< cpp11::tuple<V...>, cpp11::tuple<O...> > Base;
+
+  template <typename D, typename V_, typename O_>
+  friend struct internal::Derivator;
+
+public:
+
+  Dispatch_or_drop_output_iterator(O... o) : Base(o...) {}
+
+  using Base::operator=;
+
+  Self& operator*() { return *this; }
+  Self& operator++() { return *this; }
+  Self& operator++(int) { return *this; }
+
+  template <class T>
+  Self& operator=(const T&) { return *this; }
+};
+
+
+template < typename... V, typename... O>
+inline
+Dispatch_or_drop_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >
+dispatch_or_drop_output(O... o)
+{
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V...>, cpp11::tuple<O...> >(o...);
+}
+
+#else
+
+// Non-variadic version
+
+template < typename V, typename O >
+class Dispatch_output_iterator;
+
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+// Version with 1 parameters
+template<class V1,class O1>
+class Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >:public cpp11::tuple<O1>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1> Value_type_tuple;
+  typedef cpp11::tuple<O1> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1):Iterator_tuple(out1){}
+    
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}
+  
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    return *this;
+  }
+
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+  
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class O1>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
+dispatch_output(O1 out1){
+  return Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >(out1);
+}
+
+//Version with DROP
+
+template<class V1,class O1>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1):Base(out1){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class O1>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >
+dispatch_or_drop_output(O1 out1){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1>,cpp11::tuple<O1> >(out1);
+}
+
+// Version with 2 parameters
+template<class V1,class O1,class V2,class O2>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >:public cpp11::tuple<O1,O2>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2):Iterator_tuple(out1,out2){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}
+
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1, V2>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    return *this;
+  }
+
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class O1,class O2>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
+dispatch_output(O1 out1,O2 out2){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >(out1,out2);
+}
+
+//Version with DROP
+
+template<class V1,class O1,class V2,class O2>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2):Base(out1,out2){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class O1,class O2>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >
+dispatch_or_drop_output(O1 out1,O2 out2){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2>,cpp11::tuple<O1,O2> >(out1,out2);
+}
+
+//Version with 3 parameters
+template<class V1,class O1,class V2,class O2,class V3, class O3>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >:public cpp11::tuple<O1,O2,O3>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2,V3> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2,O3> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3):Iterator_tuple(out1,out2,out3){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}  
+
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const cpp11::tuple<V1, V2, V3>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
+    return *this;
+  }
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class V3,class O1,class O2,class O3>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
+dispatch_output(O1 out1,O2 out2,O3 out3){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >(out1,out2,out3);
+}
+
+//Version with DROP
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+template<class V1,class O1,class V2,class O2,class V3,class O3>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3):Base(out1,out2,out3){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2,O3> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2,V3>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class V3,class O1,class O2,class O3>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >
+dispatch_or_drop_output(O1 out1,O2 out2,O3 out3){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3>,cpp11::tuple<O1,O2,O3> >(out1,out2,out3);
+}
+
+//Version with 4 parameters
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >:public cpp11::tuple<O1,O2,O3,O4>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2,V3,V4> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2,O3,O4> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Iterator_tuple(out1,out2,out3,out4){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}  
+  
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const cpp11::tuple<V1, V2, V3, V4>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
+    return *this;
+  }
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class V3,class V4,class O1,class O2,class O3,class O4>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
+dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >(out1,out2,out3,out4);
+}
+
+//Version with DROP
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Base(out1,out2,out3,out4){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2,O3,O4> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2,V3,V4>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class V3,class V4,class O1,class O2,class O3,class O4>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >
+dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4>,cpp11::tuple<O1,O2,O3,O4> >(out1,out2,out3,out4);
+}
+
+//Version with 5 parameters
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >:public cpp11::tuple<O1,O2,O3,O4,O5>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2,V3,V4,V5> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2,O3,O4,O5> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Iterator_tuple(out1,out2,out3,out4,out5){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}  
+  
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
+    return *this;
+  }
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class V3,class V4,class V5,class O1,class O2,class O3,class O4,class O5>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
+dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >(out1,out2,out3,out4,out5);
+}
+
+//Version with DROP
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Base(out1,out2,out3,out4,out5){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2,O3,O4,O5> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class V3,class V4,class V5,class O1,class O2,class O3,class O4,class O5>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >
+dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5>,cpp11::tuple<O1,O2,O3,O4,O5> >(out1,out2,out3,out4,out5);
+}
+
+//Version with 6 parameters
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >:public cpp11::tuple<O1,O2,O3,O4,O5,O6>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2,V3,V4,V5,V6> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Iterator_tuple(out1,out2,out3,out4,out5,out6){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}  
+  
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V6& obj){
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5, V6>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<5>(obj);
+    return *this;
+  }
+
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class V3,class V4,class V5,class V6,class O1,class O2,class O3,class O4,class O5,class O6>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
+dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >(out1,out2,out3,out4,out5,out6);
+}
+
+//Version with DROP
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Base(out1,out2,out3,out4,out5,out6){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V6& obj){
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5,V6>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class V3,class V4,class V5,class V6,class O1,class O2,class O3,class O4,class O5,class O6>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >
+dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6>,cpp11::tuple<O1,O2,O3,O4,O5,O6> >(out1,out2,out3,out4,out5,out6);
+}
+
+//Version with 7 parameters
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6,class V7,class O7>
+class Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >:public cpp11::tuple<O1,O2,O3,O4,O5,O6,O7>{
+  typedef Dispatch_output_iterator Self;
+  
+public:
+  typedef cpp11::tuple<V1,V2,V3,V4,V5,V6,V7> Value_type_tuple;
+  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> Iterator_tuple;
+  typedef std::output_iterator_tag iterator_category;
+  typedef void                     value_type;
+  typedef void                     difference_type;
+  typedef void                     pointer;
+  typedef void                     reference;
+
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Iterator_tuple(out1,out2,out3,out4,out5,out6,out7){}
+
+  //Added because required by MSVC10
+  Dispatch_output_iterator(const Self& other):
+    Iterator_tuple(static_cast<const Iterator_tuple&>(other))
+  {}  
+  
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V6& obj){
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+   Self& operator=(const V7& obj){
+    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const cpp11::tuple<V1, V2, V3, V4, V5, V6, V7>& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<0>(obj);
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<1>(obj);
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<2>(obj);
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<3>(obj);
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<4>(obj);
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<5>(obj);
+    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=cpp11::get<6>(obj);
+    return *this;
+  }
+
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+  
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    boost::apply_visitor(visitor, t);
+    return *this;
+  }
+
+  template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+  Self& operator=(const boost::optional< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T) > >& t) {
+    internal::Output_visitor<Self> visitor(this);
+    if(t) boost::apply_visitor(visitor, *t);
+    return *this;
+  }
+
+  const Iterator_tuple& get_iterator_tuple() const
+  { return *this; }
+  
+};
+
+
+template<class V1,class V2,class V3,class V4,class V5,class V6,class V7,class O1,class O2,class O3,class O4,class O5,class O6,class O7>
+inline 
+Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
+dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){
+  return Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >(out1,out2,out3,out4,out5,out6,out7);
+}
+
+//Version with DROP
+template < typename V, typename O >
+class Dispatch_or_drop_output_iterator;
+
+
+template<class V1,class O1,class V2,class O2,class V3,class O3,class V4,class O4,class V5,class O5,class V6,class O6,class V7,class O7>
+class Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >:
+        public Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
+{
+  typedef Dispatch_or_drop_output_iterator Self;
+  typedef Dispatch_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> > Base;
+  
+public:
+
+  Self& operator*(){ return *this; }
+  Self& operator++(){ return *this; } 
+  Self& operator++(int){ return *this; }  
+  
+  Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Base(out1,out2,out3,out4,out5,out6,out7){}
+  
+  #if defined(__EDG__)  
+  typedef cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> Iterator_tuple;
+    
+  Self& operator=(const V1& obj){
+    *cpp11::get<0>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }
+  
+  Self& operator=(const V2& obj){
+    *cpp11::get<1>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V3& obj){
+    *cpp11::get<2>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V4& obj){
+    *cpp11::get<3>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V5& obj){
+    *cpp11::get<4>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const V6& obj){
+    *cpp11::get<5>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+
+  Self& operator=(const V7& obj){
+    *cpp11::get<6>(static_cast<Iterator_tuple& >(*this))++=obj;
+    return *this;
+  }  
+  
+  Self& operator=(const Self& s){
+    static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s);
+    return *this;
+  }
+
+  Self& operator=(const cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>& t){
+    static_cast< Base& >(*this) = t;
+    return *this;
+  }
+  #else
+  using Base::operator=;
+  #endif //defined(__EDG__)
+  
+  
+  template <class T>
+  Self& operator=(const T&){
+    return *this;
+  }
+};
+
+template<class V1,class V2,class V3,class V4,class V5,class V6,class V7,class O1,class O2,class O3,class O4,class O5,class O6,class O7>
+inline 
+Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >
+dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){
+  return Dispatch_or_drop_output_iterator<cpp11::tuple<V1,V2,V3,V4,V5,V6,V7>,cpp11::tuple<O1,O2,O3,O4,O5,O6,O7> >(out1,out2,out3,out4,out5,out6,out7);
+}
+
+#endif
+
+} //namespace CGAL
+
+#if defined(BOOST_MSVC)
+#  pragma warning(pop)
+#endif
+
+#endif // CGAL_ITERATOR_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/iterator_from_indices.h b/3rdparty/CGAL-4.8/include/CGAL/iterator_from_indices.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/iterator_from_indices.h
rename to 3rdparty/CGAL-4.8/include/CGAL/iterator_from_indices.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/jet_estimate_normals.h b/3rdparty/CGAL-4.8/include/CGAL/jet_estimate_normals.h
new file mode 100644
index 0000000..ca714a3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/jet_estimate_normals.h
@@ -0,0 +1,362 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret and Marc Pouget and Frederic Cazals
+
+#ifndef CGAL_JET_ESTIMATE_NORMALS_H
+#define CGAL_JET_ESTIMATE_NORMALS_H
+
+#include <CGAL/trace.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Monge_via_jet_fitting.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <iterator>
+#include <list>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#include <tbb/scalable_allocator.h>  
+#endif // CGAL_LINKED_WITH_TBB
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+namespace internal {
+
+
+/// Estimates normal direction using jet fitting
+/// on the k nearest neighbors.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return Computed normal. Orientation is random.
+template < typename Kernel,
+           typename SvdTraits,
+           typename Tree
+>
+typename Kernel::Vector_3
+jet_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute the normal at
+                    Tree& tree, ///< KD-tree
+                    unsigned int k, ///< number of neighbors
+                    unsigned int degree_fitting)
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3  Point;
+
+  // types for K nearest neighbors search
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // types for jet fitting
+  typedef Monge_via_jet_fitting< Kernel,
+                                 Simple_cartesian<double>,
+                                 SvdTraits> Monge_jet_fitting;
+  typedef typename Monge_jet_fitting::Monge_form Monge_form;
+
+  // Gather set of (k+1) neighboring points.
+  // Perform k+1 queries (as in point set, the query point is
+  // output first). Search may be aborted if k is greater
+  // than number of input points.
+  std::vector<Point> points; points.reserve(k+1);
+  Neighbor_search search(tree,query,k+1);
+  Search_iterator search_iterator = search.begin();
+  unsigned int i;
+  for(i=0;i<(k+1);i++)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+    points.push_back(search_iterator->first);
+    search_iterator++;
+  }
+  CGAL_point_set_processing_precondition(points.size() >= 1);
+
+  // performs jet fitting
+  Monge_jet_fitting monge_fit;
+  const unsigned int degree_monge = 1; // we seek for normal and not more.
+  Monge_form monge_form = monge_fit(points.begin(), points.end(),
+                                    degree_fitting, degree_monge);
+
+  // output normal vector (already normalized in monge form)
+  return monge_form.normal_direction();
+}
+
+#ifdef CGAL_LINKED_WITH_TBB
+  template <typename Kernel, typename SvdTraits, typename Tree>
+  class Jet_estimate_normals {
+    typedef typename Kernel::Point_3 Point;
+    typedef typename Kernel::Vector_3 Vector;
+    const Tree& tree;
+    const unsigned int k;
+    const unsigned int degree_fitting;
+    const std::vector<Point>& input;
+    std::vector<Vector>& output;
+
+  public:
+    Jet_estimate_normals(Tree& tree, unsigned int k, std::vector<Point>& points,
+		     unsigned int degree_fitting, std::vector<Vector>& output)
+      : tree(tree), k (k), degree_fitting (degree_fitting), input (points), output (output)
+    { }
+    
+    void operator()(const tbb::blocked_range<std::size_t>& r) const
+    {
+      for( std::size_t i = r.begin(); i != r.end(); ++i)
+	output[i] = CGAL::internal::jet_estimate_normal<Kernel,SvdTraits>(input[i], tree, k, degree_fitting);
+    }
+
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+
+  
+} /* namespace internal */
+/// \endcond
+
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// Estimates normal directions of the `[first, beyond)` range of points
+/// using jet fitting on the k nearest neighbors.
+/// The output normals are randomly oriented.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam ForwardIterator iterator model of the concept of the same name over input points and able to store output normals.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with  value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
+///         can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel,
+          typename SvdTraits
+>
+void
+jet_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k, ///< number of neighbors.
+  const Kernel& /*kernel*/, ///< geometric traits.
+  unsigned int degree_fitting = 2) ///< fitting degree
+{
+  CGAL_TRACE("Calls jet_estimate_normals()\n");
+
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  // Input points types
+  typedef typename boost::property_traits<NormalPMap>::value_type Vector;
+
+  // types for K nearest neighbors search structure
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Tree;
+
+  // precondition: at least one element in the container.
+  // to fix: should have at least three distinct points
+  // but this is costly to check
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  // precondition: at least 2 nearest neighbors
+  CGAL_point_set_processing_precondition(k >= 2);
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("  Creates KD-tree\n");
+
+  ForwardIterator it;
+
+  // Instanciate a KD-tree search.
+  // Note: We have to convert each input iterator to Point_3.
+  std::vector<Point> kd_tree_points; 
+  for(it = first; it != beyond; it++)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point point = get(point_pmap, it);
+#else
+    Point point = get(point_pmap, *it);
+#endif
+    kd_tree_points.push_back(point);
+  }
+  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
+
+  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("  Computes normals\n");
+
+  // iterate over input points, compute and output normal
+  // vectors (already normalized)
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+   if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
+   {
+     std::vector<Vector> normals (kd_tree_points.size ());
+     CGAL::internal::Jet_estimate_normals<Kernel, SvdTraits, Tree>
+       f (tree, k, kd_tree_points, degree_fitting, normals);
+     tbb::parallel_for(tbb::blocked_range<size_t>(0, kd_tree_points.size ()), f);
+     unsigned int i = 0;
+     for(it = first; it != beyond; ++ it, ++ i)
+       {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	 put (normal_pmap, it, normals[i]);
+#else
+	 put (normal_pmap, *it, normals[i]);
+#endif  
+       }
+   }
+   else
+#endif
+     {
+       for(it = first; it != beyond; it++)
+	 {
+	   Vector normal = internal::jet_estimate_normal<Kernel,SvdTraits,Tree>(
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+										get(point_pmap,it), 
+#else
+										get(point_pmap,*it), 
+#endif      
+										tree, k, degree_fitting);
+
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	   put(normal_pmap, it, normal); // normal_pmap[it] = normal
+#else
+	   put(normal_pmap, *it, normal); // normal_pmap[it] = normal
+#endif 
+    
+	 }
+     }
+
+
+  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("End of jet_estimate_normals()\n");
+}
+
+#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
+/// @cond SKIP_IN_MANUAL
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+void
+jet_estimate_normals(
+  ForwardIterator first,
+  ForwardIterator beyond,
+  PointPMap point_pmap,
+  NormalPMap normal_pmap,
+  unsigned int k,
+  const Kernel& kernel,
+  unsigned int degree_fitting = 2)
+{
+  #ifdef CGAL_EIGEN3_ENABLED
+  typedef Eigen_svd SvdTraits;
+  #else
+  typedef Lapack_svd SvdTraits;
+  #endif
+  jet_estimate_normals<Concurrency_tag,ForwardIterator,PointPMap,NormalPMap,Kernel,SvdTraits>(
+    first, beyond, point_pmap, normal_pmap, k,  kernel, degree_fitting);
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+void
+jet_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k, ///< number of neighbors.
+  unsigned int degree_fitting = 2)
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  jet_estimate_normals<Concurrency_tag>(
+    first,beyond,
+    point_pmap, 
+    normal_pmap,
+    k,
+    Kernel(),
+    degree_fitting);
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename NormalPMap
+>
+void
+jet_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k, ///< number of neighbors.
+  unsigned int degree_fitting = 2)
+{
+  jet_estimate_normals<Concurrency_tag>(
+    first,beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+    normal_pmap,
+    k,
+    degree_fitting);
+}
+/// @endcond
+#endif
+
+} //namespace CGAL
+
+#endif // CGAL_JET_ESTIMATE_NORMALS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/jet_smooth_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/jet_smooth_point_set.h
new file mode 100644
index 0000000..e00461b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/jet_smooth_point_set.h
@@ -0,0 +1,345 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez, Marc Pouget and Laurent Saboret
+
+#ifndef CGAL_JET_SMOOTH_POINT_SET_H
+#define CGAL_JET_SMOOTH_POINT_SET_H
+
+#include <CGAL/trace.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Monge_via_jet_fitting.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+
+#include <iterator>
+#include <list>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#include <tbb/scalable_allocator.h>  
+#endif // CGAL_LINKED_WITH_TBB
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+
+namespace internal {
+
+/// Smoothes one point position using jet fitting on the k
+/// nearest neighbors and reprojection onto the jet.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return computed point
+template <typename Kernel,
+          typename SvdTraits,
+          typename Tree
+          >
+typename Kernel::Point_3
+jet_smooth_point(
+  const typename Kernel::Point_3& query, ///< 3D point to project
+  Tree& tree, ///< KD-tree
+  const unsigned int k, ///< number of neighbors.
+  const unsigned int degree_fitting,
+  const unsigned int degree_monge)
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  // types for K nearest neighbors search
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // types for jet fitting
+  typedef Monge_via_jet_fitting< Kernel,
+                                 Simple_cartesian<double>,
+                                 SvdTraits> Monge_jet_fitting;
+  typedef typename Monge_jet_fitting::Monge_form Monge_form;
+
+  // Gather set of (k+1) neighboring points.
+  // Performs k + 1 queries (if unique the query point is
+  // output first). Search may be aborted if k is greater
+  // than number of input points.
+  std::vector<Point> points; points.reserve(k+1);
+  Neighbor_search search(tree,query,k+1);
+  Search_iterator search_iterator = search.begin();
+  unsigned int i;
+  for(i=0;i<(k+1);i++)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+    points.push_back(search_iterator->first);
+    search_iterator++;
+  }
+  CGAL_point_set_processing_precondition(points.size() >= 1);
+
+  // performs jet fitting
+  Monge_jet_fitting monge_fit;
+  Monge_form monge_form = monge_fit(points.begin(), points.end(),
+                                    degree_fitting, degree_monge);
+
+  // output projection of query point onto the jet
+  return monge_form.origin();
+}
+
+#ifdef CGAL_LINKED_WITH_TBB
+  template <typename Kernel, typename SvdTraits, typename Tree>
+  class Jet_smooth_pwns {
+    typedef typename Kernel::Point_3 Point;
+    const Tree& tree;
+    const unsigned int k;
+    unsigned int degree_fitting;
+    unsigned int degree_monge;
+    const std::vector<Point>& input;
+    std::vector<Point>& output;
+
+  public:
+    Jet_smooth_pwns (Tree& tree, unsigned int k, std::vector<Point>& points,
+		     unsigned int degree_fitting, unsigned int degree_monge, std::vector<Point>& output)
+      : tree(tree), k (k), degree_fitting (degree_fitting),
+	degree_monge (degree_monge), input (points), output (output)
+    { }
+    
+    void operator()(const tbb::blocked_range<std::size_t>& r) const
+    {
+      for( std::size_t i = r.begin(); i != r.end(); ++i)
+	output[i] = CGAL::internal::jet_smooth_point<Kernel, SvdTraits>(input[i], tree, k,
+									degree_fitting,
+									degree_monge);
+    }
+
+  };
+#endif // CGAL_LINKED_WITH_TBB
+
+
+} /* namespace internal */
+
+/// \endcond
+
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// Smoothes the `[first, beyond)` range of points using jet fitting on the k
+/// nearest neighbors and reprojection onto the jet.
+/// As this method relocates the points, it
+/// should not be called on containers sorted w.r.t. point locations.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam InputIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadWritePropertyMap` with value type `Point_3<Kernel>`.
+///        It can be omitted if  the value type of `InputIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
+///         can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+	  typename InputIterator,
+          typename PointPMap,
+          typename Kernel,
+          typename SvdTraits
+>
+void
+jet_smooth_point_set(
+  InputIterator first,  ///< iterator over the first input point.
+  InputIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3.
+  unsigned int k, ///< number of neighbors.
+  const Kernel& /*kernel*/, ///< geometric traits.
+  unsigned int degree_fitting = 2, ///< fitting degree
+  unsigned int degree_monge = 2)  ///< Monge degree
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  // types for K nearest neighbors search structure
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Tree;
+
+  // precondition: at least one element in the container.
+  // to fix: should have at least three distinct points
+  // but this is costly to check
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  // precondition: at least 2 nearest neighbors
+  CGAL_point_set_processing_precondition(k >= 2);
+  
+  InputIterator it;
+
+  // Instanciate a KD-tree search.
+  // Note: We have to convert each input iterator to Point_3.
+  std::vector<Point> kd_tree_points; 
+  for(it = first; it != beyond; it++)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point point = get(point_pmap, it);
+#else
+    Point point = get(point_pmap, *it);
+#endif  
+    kd_tree_points.push_back(point);
+  }
+  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
+
+  // Iterates over input points and mutates them.
+  // Implementation note: the cast to Point& allows to modify only the point's position.
+
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+   if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
+   {
+     std::vector<Point> mutated_points (kd_tree_points.size ());
+     CGAL::internal::Jet_smooth_pwns<Kernel, SvdTraits, Tree>
+       f (tree, k, kd_tree_points, degree_fitting, degree_monge,
+	  mutated_points);
+     tbb::parallel_for(tbb::blocked_range<size_t>(0, kd_tree_points.size ()), f);
+     unsigned int i = 0;
+     for(it = first; it != beyond; ++ it, ++ i)
+       {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	 put(point_pmap, it , mutated_points[i]);
+#else
+	 put(point_pmap, *it, mutated_points[i]);
+#endif  
+       }
+   }
+   else
+#endif
+     {
+       for(it = first; it != beyond; it++)
+	 {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	   const Point& p = get(point_pmap, it);
+	   put(point_pmap, it ,
+	       internal::jet_smooth_point<Kernel, SvdTraits>(
+							     p,tree,k,degree_fitting,degree_monge) );
+#else
+	   const Point& p = get(point_pmap, *it);
+	   put(point_pmap, *it ,
+	       internal::jet_smooth_point<Kernel, SvdTraits>(
+							     p,tree,k,degree_fitting,degree_monge) );
+#endif  
+	 }
+     }
+}
+
+
+#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
+/// @cond SKIP_IN_MANUAL
+template <typename Concurrency_tag,
+	  typename InputIterator,
+          typename PointPMap,
+          typename Kernel
+>
+void
+jet_smooth_point_set(
+  InputIterator first,  ///< iterator over the first input point.
+  InputIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3.
+  unsigned int k, ///< number of neighbors.
+  const Kernel& kernel, ///< geometric traits.
+  unsigned int degree_fitting = 2, ///< fitting degree
+  unsigned int degree_monge = 2)  ///< Monge degree
+{
+  #ifdef CGAL_EIGEN3_ENABLED
+  typedef Eigen_svd SvdTraits;
+  #else
+  typedef Lapack_svd SvdTraits;
+  #endif
+  jet_smooth_point_set<Concurrency_tag, InputIterator, PointPMap, Kernel, SvdTraits>(
+    first, beyond, point_pmap, k, kernel, degree_fitting, degree_monge);
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename Concurrency_tag,
+	  typename InputIterator,
+          typename PointPMap
+>
+void
+jet_smooth_point_set(
+  InputIterator first, ///< iterator over the first input point
+  InputIterator beyond, ///< past-the-end iterator
+  PointPMap point_pmap, ///< property map: value_type of InputIterator -> Point_3
+  unsigned int k, ///< number of neighbors.
+  const unsigned int degree_fitting = 2,
+  const unsigned int degree_monge = 2)
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  jet_smooth_point_set<Concurrency_tag>(
+    first,beyond,
+    point_pmap,
+    k,
+    Kernel(),
+    degree_fitting,degree_monge);
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename Concurrency_tag,
+	  typename InputIterator
+>
+void
+jet_smooth_point_set(
+  InputIterator first, ///< iterator over the first input point
+  InputIterator beyond, ///< past-the-end iterator
+  unsigned int k, ///< number of neighbors.
+  const unsigned int degree_fitting = 2,
+  const unsigned int degree_monge = 2)
+{
+  jet_smooth_point_set<Concurrency_tag>(
+    first,beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<InputIterator>::value_type()),
+#endif
+    k,
+    degree_fitting,degree_monge);
+}
+/// @endcond
+#endif
+
+} //namespace CGAL
+
+#endif // CGAL_JET_SMOOTH_POINT_SET_H
+
diff --git a/3rdparty/CGAL-4.6/include/CGAL/kernel_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/kernel_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/kernel_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/kernel_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/kernel_basic.h b/3rdparty/CGAL-4.8/include/CGAL/kernel_basic.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/kernel_basic.h
rename to 3rdparty/CGAL-4.8/include/CGAL/kernel_basic.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/kernel_config.h b/3rdparty/CGAL-4.8/include/CGAL/kernel_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/kernel_config.h
rename to 3rdparty/CGAL-4.8/include/CGAL/kernel_config.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/kernel_to_kernel.h b/3rdparty/CGAL-4.8/include/CGAL/kernel_to_kernel.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/kernel_to_kernel.h
rename to 3rdparty/CGAL-4.8/include/CGAL/kernel_to_kernel.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/known_bit_size_integers.h b/3rdparty/CGAL-4.8/include/CGAL/known_bit_size_integers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/known_bit_size_integers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/known_bit_size_integers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_bigfloat.h b/3rdparty/CGAL-4.8/include/CGAL/leda_bigfloat.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/leda_bigfloat.h
rename to 3rdparty/CGAL-4.8/include/CGAL/leda_bigfloat.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_bigfloat_interval.h b/3rdparty/CGAL-4.8/include/CGAL/leda_bigfloat_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/leda_bigfloat_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/leda_bigfloat_interval.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/leda_coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/leda_coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/leda_coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_integer.h b/3rdparty/CGAL-4.8/include/CGAL/leda_integer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/leda_integer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/leda_integer.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/leda_rational.h b/3rdparty/CGAL-4.8/include/CGAL/leda_rational.h
new file mode 100644
index 0000000..f242f76
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/leda_rational.h
@@ -0,0 +1,308 @@
+// Copyright (c) 1999,2007  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Michael Hemmer
+
+#ifndef CGAL_LEDA_RATIONAL_H
+#define CGAL_LEDA_RATIONAL_H
+
+#include <CGAL/IO/io.h>
+#include <CGAL/number_type_basic.h>
+
+#include <CGAL/leda_coercion_traits.h>
+#include <CGAL/Interval_nt.h>
+
+#include <CGAL/Needs_parens_as_product.h>
+
+#include <utility>
+#include <limits>
+
+#include <CGAL/LEDA_basic.h>
+#if CGAL_LEDA_VERSION < 500
+#  include <LEDA/rational.h>
+#  include <LEDA/interval.h>
+#else
+#  include <LEDA/numbers/rational.h>
+#  if defined(  _MSC_VER )
+#    pragma push_macro("ERROR")  
+#    undef ERROR
+#  endif // _MSC_VER
+#  include <LEDA/numbers/interval.h>
+#  if defined(  _MSC_VER )
+#    pragma pop_macro("ERROR")  
+#  endif
+#endif
+
+#include <CGAL/leda_integer.h> // for GCD in Fraction_traits
+
+namespace CGAL {
+
+template <> class Algebraic_structure_traits< leda_rational >
+  : public Algebraic_structure_traits_base< leda_rational,
+                                            Field_tag >  {
+  public:
+    typedef Tag_true            Is_exact;
+    typedef Tag_false           Is_numerical_sensitive;
+
+//    TODO: How to implement this without having sqrt?
+//    typedef INTERN_AST::Is_square_per_sqrt< Type >
+//                                                                 Is_square;
+
+    class Simplify
+      : public std::unary_function< Type&, void > {
+      public:
+        void operator()( Type& x) const {
+            x.normalize();
+        }
+    };
+
+};
+
+template <> class Real_embeddable_traits< leda_rational >
+  : public INTERN_RET::Real_embeddable_traits_base< leda_rational , CGAL::Tag_true > {
+  public:
+  
+    class Abs
+      : public std::unary_function< Type, Type > {
+      public:
+        Type operator()( const Type& x ) const {
+            return CGAL_LEDA_SCOPE::abs( x );
+        }
+    };
+
+    class Sgn
+      : public std::unary_function< Type, ::CGAL::Sign > {
+      public:
+        ::CGAL::Sign operator()( const Type& x ) const {
+            return (::CGAL::Sign) CGAL_LEDA_SCOPE::sign( x );
+        }
+    };
+
+    class Compare
+      : public std::binary_function< Type, Type,
+                                Comparison_result > {
+      public:
+        Comparison_result operator()( const Type& x,
+                                      const Type& y ) const {
+          return (Comparison_result) CGAL_LEDA_SCOPE::compare( x, y );
+        }
+        CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT(Type,Comparison_result)
+    };
+
+    class To_double
+      : public std::unary_function< Type, double > {
+      public:
+        double operator()( const Type& x ) const {
+          return x.to_double();
+        }
+    };
+
+    class To_interval
+      : public std::unary_function< Type, std::pair< double, double > > {
+      public:
+        std::pair<double, double> operator()( const Type& x ) const {
+
+#if CGAL_LEDA_VERSION >= 501
+          CGAL_LEDA_SCOPE::interval temp(x);
+          std::pair<double, double> result(temp.lower_bound(),temp.upper_bound());
+          CGAL_assertion_code( double infinity=std::numeric_limits<double>::infinity(); )
+          CGAL_postcondition(result.first  == -infinity || Type(result.first)<=x);
+          CGAL_postcondition(result.second ==  infinity || Type(result.second)>=x);
+          return result;
+#else
+          CGAL_LEDA_SCOPE::bigfloat xnum = x.numerator();
+          CGAL_LEDA_SCOPE::bigfloat xden = x.denominator();
+          CGAL_LEDA_SCOPE::bigfloat xupp =
+                                    div(xnum,xden,53,CGAL_LEDA_SCOPE::TO_P_INF);
+          CGAL_LEDA_SCOPE::bigfloat xlow =
+                                    div(xnum,xden,53,CGAL_LEDA_SCOPE::TO_N_INF);
+
+          // really smallest positive double
+          double MinDbl = CGAL_LEDA_SCOPE::fp::compose_parts(0,0,0,1);
+
+          double low = xlow.to_double();
+          while(Type(low) > x) low = low - MinDbl;
+
+          double upp = xupp.to_double();
+          while(Type(upp) < x) upp = upp + MinDbl;
+
+          std::pair<double, double> result(low,upp);
+          CGAL_postcondition(Type(result.first)<=x);
+          CGAL_postcondition(Type(result.second)>=x);
+          return result;
+#endif
+          // Original CGAL to_interval (seemed to be inferior)
+          //  // There's no guarantee about the error of to_double(), so I add
+          //  //  3 ulps...
+          //  Protect_FPU_rounding<true> P (CGAL_FE_TONEAREST);
+          //  Interval_nt_advanced approx (z.to_double());
+          //  FPU_set_cw(CGAL_FE_UPWARD);
+          //
+          //  approx += Interval_nt<false>::smallest();
+          //  approx += Interval_nt<false>::smallest();
+          //  approx += Interval_nt<false>::smallest();
+          //  return approx.pair();
+
+        }
+    };
+};
+
+/*! \ingroup NiX_Fraction_traits_spec
+ *  \brief Specialization of Fraction_traits for ::leda::rational
+ */
+template <>
+class Fraction_traits< leda_rational > {
+public:
+    typedef leda_rational Type;
+    typedef ::CGAL::Tag_true Is_fraction;
+    typedef leda_integer Numerator_type;
+    typedef Numerator_type Denominator_type;
+
+    typedef Algebraic_structure_traits< Numerator_type >::Gcd Common_factor;
+
+    class Decompose {
+    public:
+        typedef Type first_argument_type;
+        typedef Numerator_type& second_argument_type;
+        typedef Numerator_type& third_argument_type;
+        void operator () (
+                const Type& rat,
+                Numerator_type& num,
+                Numerator_type& den) {
+            num = rat.numerator();
+            den = rat.denominator();
+        }
+    };
+
+    class Compose {
+    public:
+        typedef Numerator_type first_argument_type;
+        typedef Numerator_type second_argument_type;
+        typedef Type result_type;
+        Type operator ()(
+                const Numerator_type& num ,
+                const Numerator_type& den ) {
+            Type result(num, den);
+            result.normalize();
+            return result;
+        }
+    };
+};
+
+template <class F>
+class Output_rep< leda_rational, F> {
+    const leda_rational& t;
+public:
+    //! initialize with a const reference to \a t.
+    Output_rep( const leda_rational& tt) : t(tt) {}
+    //! perform the output, calls \c operator\<\< by default.
+    std::ostream& operator()( std::ostream& out) const {
+        switch (get_mode(out)) {
+        case IO::PRETTY:{
+            if(t.denominator() == leda_integer(1))
+                return out <<t.numerator();
+            else
+                return out << t.numerator()
+                           << "/"
+                           << t.denominator();
+            break;
+        }
+
+        default:
+            return out << t.numerator()
+                       << "/"
+                       << t.denominator();
+        }
+    }
+};
+
+template <>
+struct Needs_parens_as_product< leda_rational >{
+    bool operator()( leda_rational t){
+        if (t.denominator() != 1 )
+            return true;
+        else
+            return needs_parens_as_product(t.numerator()) ;
+    }
+};
+
+template <>
+class Output_rep< leda_rational, Parens_as_product_tag > {
+    const leda_rational& t;
+public:
+    // Constructor
+    Output_rep( const leda_rational& tt) : t(tt) {}
+    // operator
+    std::ostream& operator()( std::ostream& out) const {
+        Needs_parens_as_product< leda_rational > needs_parens_as_product;
+        if (needs_parens_as_product(t))
+            return out <<"("<< oformat(t) <<")";
+        else
+            return out << oformat(t);
+    }
+};
+
+template < >
+class Benchmark_rep< leda_rational > {
+    const leda_rational& t;
+public:
+    //! initialize with a const reference to \a t.
+    Benchmark_rep( const leda_rational& tt) : t(tt) {}
+    //! perform the output, calls \c operator\<\< by default.
+    std::ostream& operator()( std::ostream& out) const { 
+            return 
+                out << "Rational(" << t.numerator() << "," 
+                    << t.denominator() << ")";
+    }
+
+    static std::string get_benchmark_name() {
+        return "Rational";
+    }
+
+};
+
+namespace internal {
+  // See: Stream_support/include/CGAL/IO/io.h
+  template <typename ET>
+  void read_float_or_quotient(std::istream & is, ET& et);
+
+  template <>
+  inline void read_float_or_quotient(std::istream & is, leda_rational& et)
+  {
+    internal::read_float_or_quotient<leda_integer,leda_rational>(is, et);
+  }
+} // namespace internal
+
+} //namespace CGAL
+
+// Unary + is missing for leda::rational
+namespace leda{
+inline rational operator+( const rational& i) { return i; }
+}
+
+//since types are included by LEDA_coercion_traits.h:
+#include <CGAL/leda_integer.h>
+#include <CGAL/leda_bigfloat.h>
+#include <CGAL/leda_real.h>
+#include <CGAL/LEDA_arithmetic_kernel.h>
+
+#endif  // CGAL_LEDA_RATIONAL_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/leda_real.h b/3rdparty/CGAL-4.8/include/CGAL/leda_real.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/leda_real.h
rename to 3rdparty/CGAL-4.8/include/CGAL/leda_real.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_2.h
new file mode 100644
index 0000000..872b008
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_2.h
@@ -0,0 +1,98 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
+
+#include <CGAL/basic.h>
+//#include <CGAL/Algebraic_structure_traits.h>
+//#include <CGAL/IO/io.h>
+#include <CGAL/linear_least_squares_fitting_points_2.h>
+#include <CGAL/linear_least_squares_fitting_segments_2.h>
+#include <CGAL/linear_least_squares_fitting_triangles_2.h>
+#include <CGAL/linear_least_squares_fitting_circles_2.h>
+#include <CGAL/linear_least_squares_fitting_rectangles_2.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Default_diagonalize_traits.h>
+#include <iterator>
+
+namespace CGAL {
+
+template < typename InputIterator, 
+           typename Kernel,
+	   typename Tag,
+	   typename DiagonalizeTraits>
+inline
+typename Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename Kernel::Line_2& line,
+                               typename Kernel::Point_2& centroid,
+                               const Tag& tag,
+			       const Kernel& kernel,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  return internal::linear_least_squares_fitting_2(first, beyond, line,
+						  centroid,(Value_type*)NULL,kernel,tag,
+						  diagonalize_traits);
+}
+
+// deduces the kernel from the points in container.
+// Use default DiagonalizeTraits
+template < typename InputIterator, 
+           typename Line,
+           typename Point,
+	   typename Tag>
+inline
+typename Kernel_traits<Line>::Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               Line& line,
+                               Point& centroid,
+			       const Tag& tag)
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
+  return CGAL::linear_least_squares_fitting_2
+    (first,beyond,line,centroid,tag,Kernel(),
+     Default_diagonalize_traits<typename Kernel::FT, 2>());
+}
+
+template < typename InputIterator, 
+           typename Line,
+	   typename Tag>
+inline
+typename Kernel_traits<Line>::Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               Line& line,
+                               const Tag& tag)
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
+  typename Kernel::Point_2 centroid; // unused
+  return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel(),
+					      Default_diagonalize_traits<typename Kernel::FT, 2>());
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_3.h
new file mode 100644
index 0000000..55b17e7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_3.h
@@ -0,0 +1,106 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
+
+#include <CGAL/basic.h>
+
+#include <CGAL/linear_least_squares_fitting_points_3.h>
+#include <CGAL/linear_least_squares_fitting_segments_3.h>
+#include <CGAL/linear_least_squares_fitting_triangles_3.h>
+#include <CGAL/linear_least_squares_fitting_cuboids_3.h>
+#include <CGAL/linear_least_squares_fitting_tetrahedra_3.h>
+#include <CGAL/linear_least_squares_fitting_spheres_3.h>
+
+#include <CGAL/Default_diagonalize_traits.h>
+
+#include <CGAL/Dimension.h>
+
+#include <iterator>
+#include <string>
+
+namespace CGAL {
+
+// complete set of parameters
+template < typename InputIterator, 
+           typename Object,
+           typename Kernel,
+           typename Tag,
+	   typename DiagonalizeTraits >
+inline
+typename Kernel::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               Object& object, // plane or line
+                               typename Kernel::Point_3& centroid, 
+                               const Tag& tag, // dimension tag, ranges from 0 to 3
+			       const Kernel& kernel,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  return internal::linear_least_squares_fitting_3(first, beyond, object,
+						  centroid, (Value_type*) NULL, kernel, tag,
+						  diagonalize_traits);
+}
+
+// deduces kernel from value type of input iterator
+// use default DiagonalizeTraits
+template < typename InputIterator, 
+           typename Object,
+	   typename Point,
+           typename Tag >
+inline
+typename Kernel_traits<Object>::Kernel::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               Object& object,  // plane or line
+                               Point& centroid,
+			       const Tag& tag) // dimension tag, ranges from 0 to 3
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
+  return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(),
+					      Default_diagonalize_traits<typename Kernel::FT, 3>());
+
+}
+
+// deduces kernel and does not write centroid
+// use default DiagonalizeTraits
+template < typename InputIterator, 
+           typename Object,
+           typename Tag>
+inline
+typename Kernel_traits<Object>::Kernel::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               Object& object, // plane or line
+			       const Tag& tag) // dimension tag, ranges from 0 to 3
+{
+  typedef typename std::iterator_traits<InputIterator>::value_type Value_type;
+  typedef typename Kernel_traits<Value_type>::Kernel Kernel;
+  typename Kernel::Point_3 centroid; // not used by caller
+  return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(),
+					      Default_diagonalize_traits<typename Kernel::FT, 3>());
+
+}
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_circles_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_circles_2.h
new file mode 100644
index 0000000..adb377b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_circles_2.h
@@ -0,0 +1,254 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+#include <vector>
+#include <cmath>
+
+namespace CGAL {
+
+namespace internal {
+// Fits a line to a 2D circle set.
+// Returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best  (zero variance orthogonally to the fitting line);
+//  0 is worst (isotropic case, returns a line with horizontal
+//              direction by default)
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Circle_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits&)
+{
+  // types
+  typedef typename K::FT       FT;
+  typedef typename K::Line_2   Line;
+  typedef typename K::Vector_2 Vector;
+  typedef typename K::Circle_2 Circle;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // ::::::::::DISK:::::::::::::::
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1
+  //   2
+  //Final combined covariance matrix for all circles and their combined mass
+  FT mass = 0.0;
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[4] = {0.25, 0.0,
+		0.0, 0.25};
+  Matrix moment = init_matrix<K>(2,temp);
+  //  Matrix moment = Matrix(2,true,PI);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each circle, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Circle& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT radius = std::sqrt(t.squared_radius());
+    FT delta[4] = {radius, 0.0, 
+		   0.0, radius};
+    Matrix transformation = init_matrix<K>(2,delta);
+    FT area = t.squared_radius();
+    CGAL_assertion(area != 0.0);
+
+    // Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = area * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the circle.
+    FT x0 = t.center().x();
+    FT y0 = t.center().y();
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + area * x0*x0;
+    covariance[1] += transformation[0][1] + area * x0*y0;
+    covariance[2] += transformation[1][1] + area * y0*y0;
+
+    mass += area;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.y() * c.y());
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // check unicity and build fitting line accordingly
+  if(eigen_values[0] != eigen_values[1])
+  {
+    // regular case
+    line = Line(c, Vector (eigen_vectors[2],eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(1.0, 0.0));
+    return (FT)0.0;
+  } 
+  
+} // end linear_least_squares_fitting_2 for circle set with 2D tag
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Circle_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& )
+{
+  // types
+  typedef typename K::FT       FT;
+  typedef typename K::Line_2   Line;
+  typedef typename K::Vector_2 Vector;
+  typedef typename K::Circle_2 Circle;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1
+  //   2
+  //Final combined covariance matrix for all circles and their combined mass
+  FT mass = 0.0;
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[4] = {1.0, 0.0,
+		0.0, 1.0};
+  Matrix moment = init_matrix<K>(2,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each circle, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Circle& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT radius = std::sqrt(t.squared_radius());
+    FT delta[4] = {radius, 0.0, 
+		   0.0, radius};
+    Matrix transformation = init_matrix<K>(2,delta);
+    FT length = 2 * radius;
+    CGAL_assertion(length != 0.0);
+
+    // Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = 0.5 * length * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the circle.
+    FT x0 = t.center().x();
+    FT y0 = t.center().y();
+
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + length * x0*x0;
+    covariance[1] += transformation[0][1] + length * x0*y0;
+    covariance[2] += transformation[1][1] + length * y0*y0;
+
+    mass += length;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.y() * c.y());
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+  
+  // check unicity and build fitting line accordingly
+  if(eigen_values[1] != eigen_values[0])
+  {
+    // regular case
+    line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(1.0, 0.0));
+    return (FT)0.0;
+  } 
+} // end linear_least_squares_fitting_2 for circle set with 1D tag
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_CIRCLES_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_cuboids_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_cuboids_3.h
new file mode 100644
index 0000000..2981749
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_cuboids_3.h
@@ -0,0 +1,343 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+#include <CGAL/linear_least_squares_fitting_points_3.h>
+#include <CGAL/linear_least_squares_fitting_segments_3.h>
+
+#include <list>
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+
+// fits a plane to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag, diagonalize_traits);
+
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a plane to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag,diagonalize_traits);
+
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a plane to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3 Segment;
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Segment> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_cuboid& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[2],t[3]));    
+    segments.push_back(Segment(t[3],t[0]));
+    segments.push_back(Segment(t[4],t[5]));
+    segments.push_back(Segment(t[5],t[6]));
+    segments.push_back(Segment(t[6],t[7]));
+    segments.push_back(Segment(t[7],t[4]));
+    segments.push_back(Segment(t[5],t[0]));
+    segments.push_back(Segment(t[1],t[6]));
+    segments.push_back(Segment(t[2],t[7]));
+    segments.push_back(Segment(t[3],t[4]));
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a plane to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Point_3 Point;
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_cuboid& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]);    
+    points.push_back(t[3]);
+    points.push_back(t[4]);
+    points.push_back(t[5]);
+    points.push_back(t[6]);    
+    points.push_back(t[7]);
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a line to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,     // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag,diagonalize_traits);
+  
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+  
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a line to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag, diagonalize_traits);
+  
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a line to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3 Segment;
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Segment> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_cuboid& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[2],t[3]));    
+    segments.push_back(Segment(t[3],t[0]));
+    segments.push_back(Segment(t[4],t[5]));
+    segments.push_back(Segment(t[5],t[6]));
+    segments.push_back(Segment(t[6],t[7]));
+    segments.push_back(Segment(t[7],t[4]));
+    segments.push_back(Segment(t[5],t[0]));
+    segments.push_back(Segment(t[1],t[6]));
+    segments.push_back(Segment(t[2],t[7]));
+    segments.push_back(Segment(t[3],t[4]));
+  }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_cuboids_3
+
+// fits a line to a 3D cuboid set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Iso_cuboid_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Point_3 Point;
+  typedef typename K::Iso_cuboid_3 Iso_cuboid;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_cuboid& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]);    
+    points.push_back(t[3]);
+    points.push_back(t[4]);
+    points.push_back(t[5]);
+    points.push_back(t[6]);    
+    points.push_back(t[7]);
+  }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_cuboids_3
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_CUBOIDS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_2.h
new file mode 100644
index 0000000..1cc222f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_2.h
@@ -0,0 +1,111 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <iterator>
+#include <cmath>
+
+namespace CGAL {
+
+namespace internal {
+
+// Fits a line to a 2D point set.
+// Returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best  (zero variance orthogonally to the fitting line);
+//  0 is worst (isotropic case, returns a line with horizontal
+//              direction by default).
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits>
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Point_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits&)
+{
+  // types
+  typedef typename K::FT       FT;
+  typedef typename K::Line_2   Line;
+  typedef typename K::Point_2  Point;
+  typedef typename K::Vector_2 Vector;
+
+	// if internally double, declare a kernel
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0 1
+  //   2
+
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Point& p = *it;
+    Vector d = p - c; // centered data point
+    covariance[0] += d.x() * d.x();
+    covariance[1] += d.x() * d.y();
+    covariance[2] += d.y() * d.y();
+  }
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // check unicity and build fitting line accordingly
+  if(eigen_values[0] != eigen_values[1])
+  {
+    // regular case
+    line = Line(c, Vector (eigen_vectors[2], eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(FT(1), FT(0)));
+    return (FT)0.0;
+  } 
+} // end linear_least_squares_fitting_2 for point set
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_3.h
new file mode 100644
index 0000000..dc714e8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_points_3.h
@@ -0,0 +1,102 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+// fits a plane to a 3D point set
+// returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best (zero variance orthogonally to the fitting line)
+//  0 is worst (isotropic case, returns a plane with default direction)
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane, // best fit plane
+                               typename K::Point_3& c,     // centroid
+                               const typename K::Point_3*, // used for indirection
+                               const K& k,                 // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag, diagonalize_traits);
+
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+} // end fit plane to point set
+
+// fits a line to a 3D point set
+// returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best (zero variance orthogonally to the fitting line)
+//  0 is worst (isotropic case, returns a line along x axis)
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,  // best fit line
+                               typename K::Point_3& c,    // centroid
+                               const typename K::Point_3*, // used for indirection
+                               const K& k,                // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag, diagonalize_traits);
+
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+} // end fit line to point set
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_POINTS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_rectangles_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_rectangles_2.h
new file mode 100644
index 0000000..d45d176
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_rectangles_2.h
@@ -0,0 +1,226 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+#include <list>
+#include <cmath>
+
+namespace CGAL {
+
+namespace internal {
+// Fits a line to a 2D rectangle set.
+// Returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best  (zero variance orthogonally to the fitting line);
+//  0 is worst (isotropic case, returns a line with horizontal
+//              direction by default)
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Iso_rectangle_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits&)
+{
+  // types
+  typedef typename K::FT       FT;
+  typedef typename K::Line_2   Line;
+  typedef typename K::Vector_2 Vector;
+  typedef typename K::Iso_rectangle_2 Iso_rectangle;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0
+  // 1 2
+  //Final combined covariance matrix for all rectangles and their combined mass
+  FT mass = 0.0;
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[4] = {1/3.0, 0.25,
+		0.25,  1/3.0};
+  Matrix moment = init_matrix<K>(2,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each rectangle, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Iso_rectangle& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT x0 = t.xmin();
+    FT y0 = t.ymin();
+    FT x1 = t.xmax();
+    FT y2 = t.ymax();
+
+    FT delta[4] = {x1-x0, 0.0, 
+		   0.0, y2-y0};
+
+    Matrix transformation = init_matrix<K>(2,delta);
+    FT area = (x1-x0)*(y2-y0);
+
+    CGAL_assertion(area != 0.0);
+
+    // Find the 2nd order moment for the rectangle wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = area * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to the center of the rectangle.
+    FT xav0 = (x1-x0)/2.0;
+    FT yav0 = (y2-y0)/2.0;
+    // and add to covariance matrix
+    covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
+    covariance[1] += transformation[0][1] + area * (x0*yav0 + xav0*y0 + x0*y0);
+    covariance[2] += transformation[1][1] + area * (y0*yav0*2 + y0*y0);
+
+    mass += area;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.y() * c.y());
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // check unicity and build fitting line accordingly
+  if(eigen_values[0] != eigen_values[1])
+  {
+    // regular case
+    line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(1.0, 0.0));
+    return (FT)0.0;
+  } 
+} // end linear_least_squares_fitting_2 for rectangle set with 2D tag
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Iso_rectangle_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  // types
+  typedef typename K::Iso_rectangle_2 Iso_rectangle;
+  typedef typename K::Segment_2         Segment_2;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Segment_2> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_rectangle& t = *it;
+    segments.push_back(Segment_2(t[0],t[1]));
+    segments.push_back(Segment_2(t[1],t[2]));
+    segments.push_back(Segment_2(t[2],t[3]));      
+    segments.push_back(Segment_2(t[3],t[0]));      
+  }    
+
+  return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,K(),tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_2 for rectangle set with 1D tag
+
+
+template < typename InputIterator,
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Iso_rectangle_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  // types
+  typedef typename K::Iso_rectangle_2 Iso_rectangle;
+  typedef typename K::Point_2         Point_2;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Point_2> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Iso_rectangle& t = *it;
+    points.push_back(Point_2(t[0]));
+    points.push_back(Point_2(t[1]));
+    points.push_back(Point_2(t[2]));      
+    points.push_back(Point_2(t[3]));      
+  }    
+
+  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,K(),tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_2 for rectangle set with 0D tag
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_RECTANGLES_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_2.h
new file mode 100644
index 0000000..aff6f95
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_2.h
@@ -0,0 +1,173 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+#include <list>
+#include <cmath>
+
+namespace CGAL {
+
+namespace internal {
+// Fits a line to a 2D segment set.
+// Returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best  (zero variance orthogonally to the fitting line);
+//  0 is worst (isotropic case, returns a line with horizontal
+//              direction by default)
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Segment_2*,// used for indirection
+                               const K&,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits&)
+{
+  // types
+  typedef typename K::FT       FT;
+  typedef typename K::Line_2   Line;
+  typedef typename K::Vector_2 Vector;
+  typedef typename K::Segment_2 Segment;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0
+  // 1 2
+  //Final combined covariance matrix for all segments and their combined mass
+  FT mass = 0.0;
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  // assemble 2nd order moment about the origin.  
+  FT temp[4] = {1.0, 0.5, 0.5, 1.0};
+  Matrix moment = (1.0/3.0) * init_matrix<K>(2,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each segment, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Segment& t = *it;
+
+    // defined for convenience.
+    // FT example = CGAL::to_double(t[0].x());
+    FT delta[4] = {t[0].x(), t[1].x(), 
+		   t[0].y(), t[1].y()};
+    Matrix transformation = init_matrix<K>(2,delta);
+    FT length = std::sqrt(t.squared_length());
+    CGAL_assertion(length != 0.0);
+
+    // Find the 2nd order moment for the segment wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = length * transformation * moment * LA::transpose(transformation);
+    
+    // add to covariance matrix
+    covariance[0] += transformation[0][0];
+    covariance[1] += transformation[0][1];
+    covariance[2] += transformation[1][1];
+
+    mass += length;
+  }
+
+  // Translate the 2nd order moment calculated about the origin to
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.y() * c.y());
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // check unicity and build fitting line accordingly
+  if(eigen_values[0] != eigen_values[1])
+  {
+    // regular case
+    line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(1.0, 0.0));
+    return (FT)0.0;
+  } 
+} // end linear_least_squares_fitting_2 for segment set with 1D tag
+
+template < typename InputIterator, typename K, typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_2& line,   // best fit line
+                               typename K::Point_2& c,     // centroid
+                               const typename K::Segment_2*,// used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  // types
+  typedef typename K::Point_2  Point;
+  typedef typename K::Segment_2 Segment;
+ 
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Point> points;  
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Segment& s = *it;
+    points.push_back(s[0]);
+    points.push_back(s[1]);
+  } 
+  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,k,(Point*)NULL,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_2 for segment set with 1D tag
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_3.h
new file mode 100644
index 0000000..c4f3aff
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_segments_3.h
@@ -0,0 +1,173 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+#include <CGAL/linear_least_squares_fitting_points_3.h>
+
+#include <list>
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+
+// fits a plane to a 3D segment set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Segment_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3  Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag, diagonalize_traits);
+
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+} // end linear_least_squares_fitting_segments_3
+
+// fits a plane to a 3D segment set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Segment_3*, // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3  Segment;
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Segment& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_segments_3
+
+// fits a line to a 3D segment set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,      // best fit line
+                               typename K::Point_3& c,        // centroid
+                               const typename K::Segment_3*,  // used for indirection
+                               const K& k,                    // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3  Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,k,tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag, diagonalize_traits);
+
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+  
+} // end linear_least_squares_fitting_segments_3
+
+// fits a plane to a 3D segment set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,      // best fit line
+                               typename K::Point_3& c,        // centroid
+                               const typename K::Segment_3*,  // used for indirection
+                               const K& k,                    // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Segment_3  Segment;
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Segment& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_segments_3
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SEGMENTS_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_spheres_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_spheres_3.h
new file mode 100644
index 0000000..0d97805
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_spheres_3.h
@@ -0,0 +1,163 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+
+// fits a plane to a set of 3D balls (3D)
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Sphere_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Sphere_3    Sphere;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag, diagonalize_traits);
+  
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+} // end linear_least_squares_fitting_spheres_3
+
+// fits a plane to a 3D sphere set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Sphere_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Sphere_3    Sphere;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag, diagonalize_traits);
+  
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+} // end linear_least_squares_fitting_spheres_3
+
+
+// fits a line to a 3D ball set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,     // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Sphere_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Sphere_3  Sphere;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+  
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag, diagonalize_traits);
+
+
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+  
+} // end linear_least_squares_fitting_spheres_3
+
+// fits a line to a 3D sphere set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,     // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Sphere_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Sphere_3  Sphere;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+  
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag, diagonalize_traits);
+
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+
+} // end linear_least_squares_fitting_spheres_3
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_SPHERES_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h
new file mode 100644
index 0000000..96d6d1f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h
@@ -0,0 +1,335 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+
+#include <CGAL/PCA_util.h>
+#include <CGAL/linear_least_squares_fitting_points_3.h>
+#include <CGAL/linear_least_squares_fitting_segments_3.h>
+#include <CGAL/linear_least_squares_fitting_triangles_3.h>
+
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+
+// fits a plane to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag, diagonalize_traits);
+  
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a plane to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Triangle_3 Triangle;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Triangle> triangles;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    triangles.push_back(Triangle(t[0],t[1],t[2]));
+    triangles.push_back(Triangle(t[0],t[2],t[3]));
+    triangles.push_back(Triangle(t[0],t[3],t[1])); 
+    triangles.push_back(Triangle(t[3],t[1],t[2]));
+ }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,c,(Triangle*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a plane to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Segment_3 Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Segment> segments;
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[1],t[3]));
+    segments.push_back(Segment(t[2],t[3])); 
+    segments.push_back(Segment(t[0],t[2]));
+    segments.push_back(Segment(t[0],t[3]));
+ }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a plane to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Point_3 Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]); 
+    points.push_back(t[3]);
+ }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a line to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,     // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<3>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag, diagonalize_traits);
+    
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+  
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a line to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Triangle_3 Triangle;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Triangle> triangles;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    triangles.push_back(Triangle(t[0],t[1],t[2]));
+    triangles.push_back(Triangle(t[0],t[2],t[3]));
+    triangles.push_back(Triangle(t[0],t[3],t[1])); 
+    triangles.push_back(Triangle(t[3],t[1],t[2]));
+ }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,c,(Triangle*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a line to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Segment_3 Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Segment> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[1],t[3]));
+    segments.push_back(Segment(t[2],t[3])); 
+    segments.push_back(Segment(t[0],t[2]));
+    segments.push_back(Segment(t[0],t[3]));
+ }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedrons_3
+
+// fits a line to a 3D tetrahedron set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Tetrahedron_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Tetrahedron_3    Tetrahedron;
+  typedef typename K::Point_3 Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Tetrahedron& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]); 
+    points.push_back(t[3]);
+ }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_tetrahedra_3
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TETRAHEDRA_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_2.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_2.h
new file mode 100644
index 0000000..11c34ea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_2.h
@@ -0,0 +1,226 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/Linear_algebraCd.h>
+#include <CGAL/PCA_util.h>
+
+#include <iterator>
+#include <vector>
+#include <cmath>
+
+namespace CGAL {
+
+namespace internal {
+// Fits a line to a 2D triangle set.
+// Returns a fitting quality (1 - lambda_min/lambda_max):
+//  1 is best  (zero variance orthogonally to the fitting line);
+//  0 is worst (isotropic case, returns a line with horizontal
+//              direction by default)
+
+template < typename InputIterator,
+           typename Kernel, typename DiagonalizeTraits >
+typename Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename Kernel::Line_2& line,   // best fit line
+                               typename Kernel::Point_2& c,     // centroid
+                               const typename Kernel::Triangle_2*,// used for indirection
+                               const Kernel&,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits&)
+{
+  // types
+  typedef typename Kernel::FT       FT;
+  typedef typename Kernel::Line_2   Line;
+  typedef typename Kernel::Vector_2 Vector;
+  typedef typename Kernel::Triangle_2 Triangle;
+  typedef typename CGAL::Linear_algebraCd<FT> LA;
+  typedef typename LA::Matrix Matrix;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+
+  // compute centroid
+  c = centroid(first,beyond,Kernel(),tag);
+
+  // assemble covariance matrix as a semi-definite matrix. 
+  // Matrix numbering:
+  // 0
+  // 1 2
+  //Final combined covariance matrix for all triangles and their combined mass
+  FT mass = 0.0;
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }};
+
+  // assemble the 2nd order moment about the origin.  
+  FT temp[4] = {1/12.0, 1/24.0,
+		1/24.0, 1/12.0};
+
+  Matrix moment = init_matrix<Kernel>(2,temp);
+
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    // Now for each triangle, construct the 2nd order moment about the origin.
+    // assemble the transformation matrix.
+    const Triangle& t = *it;
+
+    // defined for convenience.
+    FT x0 = t[0].x();
+    FT y0 = t[0].y();
+    FT delta[4] = {t[1].x() - x0, t[2].x() - x0,
+		   t[1].y() - y0, t[2].y() - y0};
+
+    Matrix transformation = init_matrix<Kernel>(2,delta);
+    FT area = 0.5 * std::abs(LA::determinant(transformation));
+    CGAL_assertion(area!=0);
+
+    // Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
+    
+    // Transform the standard 2nd order moment using the transformation matrix
+    transformation = 2 * area * transformation * moment * LA::transpose(transformation);
+    
+    // Translate the 2nd order moment to (x0,y0).
+    FT xav0 = (delta[0]+delta[1])/3.0;
+    FT yav0 = (delta[2]+delta[3])/3.0;
+    
+    // and add to the covariance matrix
+    covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
+    covariance[1] += transformation[0][1] + area * (x0*yav0 + xav0*y0 + x0*y0);
+    covariance[2] += transformation[1][1] + area * (y0*yav0*2 + y0*y0);
+
+    mass += area;
+  }
+  
+  // Translate the 2nd order moment calculated about the origin to 
+  // the center of mass to get the covariance.
+  covariance[0] += mass * (-1.0 * c.x() * c.x());
+  covariance[1] += mass * (-1.0 * c.x() * c.y());
+  covariance[2] += mass * (-1.0 * c.y() * c.y());
+
+  //  std::cout<<"cov: "<<covariance[0]*covariance[2]<<" =? "<<covariance[1]*covariance[1]<<std::endl;
+
+  // solve for eigenvalues and eigenvectors.
+  // eigen values are sorted in ascending order, 
+  // eigen vectors are sorted in accordance.
+  typename DiagonalizeTraits::Vector eigen_values = {{ 0. , 0. }};
+  typename DiagonalizeTraits::Matrix eigen_vectors = {{ 0., 0., 0. }};
+  DiagonalizeTraits::diagonalize_selfadjoint_covariance_matrix
+    (covariance, eigen_values, eigen_vectors);
+
+  // check unicity and build fitting line accordingly
+  if(eigen_values[0] != eigen_values[1])
+  {
+    // regular case
+    line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3]));
+    return (FT)1.0 - eigen_values[0] / eigen_values[1];
+  } 
+  else
+  {
+    // isotropic case (infinite number of directions)
+    // by default: assemble a line that goes through 
+    // the centroid and with a default horizontal vector.
+    line = Line(c, Vector(1.0, 0.0));
+    return (FT)0.0;
+  } 
+} // end linear_least_squares_fitting_2 for triangle set with 2D tag
+
+template < typename InputIterator,
+           typename Kernel,
+	   typename DiagonalizeTraits >
+typename Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename Kernel::Line_2& line,   // best fit line
+                               typename Kernel::Point_2& c,     // centroid
+                               const typename Kernel::Triangle_2*,// used for indirection
+                               const Kernel&,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  // types
+  typedef typename Kernel::Triangle_2 Triangle;
+  typedef typename Kernel::Segment_2  Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Segment> segments;  
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[2],t[0]));      
+  }    
+  
+  return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,tag,Kernel(),
+					diagonalize_traits);
+  
+} // end linear_least_squares_fitting_2 for triangle set with 1D tag
+
+template < typename InputIterator,
+           typename Kernel,
+	   typename DiagonalizeTraits >
+typename Kernel::FT
+linear_least_squares_fitting_2(InputIterator first,
+                               InputIterator beyond, 
+                               typename Kernel::Line_2& line,   // best fit line
+                               typename Kernel::Point_2& c,     // centroid
+                               const typename Kernel::Triangle_2*,// used for indirection
+                               const Kernel&,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  // types
+
+  typedef typename Kernel::Triangle_2 Triangle;
+  typedef typename Kernel::Point_2 Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Point> points;  
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    points.push_back(Point(t[0]));
+    points.push_back(Point(t[1]));
+    points.push_back(Point(t[2]));      
+  }    
+  
+  return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,tag,Kernel(),
+					diagonalize_traits);
+  
+} // end linear_least_squares_fitting_2 for triangle set with 0D tag
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_2_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_3.h b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_3.h
new file mode 100644
index 0000000..74f807a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/linear_least_squares_fitting_triangles_3.h
@@ -0,0 +1,246 @@
+// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta
+
+#ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
+#define CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
+
+#include <CGAL/basic.h>
+#include <CGAL/centroid.h>
+#include <CGAL/PCA_util.h>
+
+#include <list>
+#include <iterator>
+
+namespace CGAL {
+
+namespace internal {
+
+// fits a plane to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag, diagonalize_traits);
+  
+  // compute fitting plane
+  return fitting_plane_3(covariance,c,plane,k,diagonalize_traits);
+
+} // end linear_least_squares_fitting_triangles_3
+
+// fits a plane to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+  typedef typename K::Segment_3  Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Segment> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[2],t[0]));    
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_triangles_3
+
+// fits a plane to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Plane_3& plane,   // best fit plane
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]);    
+  }
+
+  // compute fitting plane
+  return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_triangles_3
+
+// fits a line to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,     // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<2>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  // compute centroid
+  c = centroid(first,beyond,K(),tag);
+
+  // assemble covariance matrix
+  typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }};
+  assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag, diagonalize_traits);
+
+  // compute fitting line
+  return fitting_line_3(covariance,c,line,k,diagonalize_traits);
+  
+} // end linear_least_squares_fitting_triangles_3
+
+// fits a line to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+			       const CGAL::Dimension_tag<1>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+  typedef typename K::Segment_3  Segment;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  
+  std::list<Segment> segments;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    segments.push_back(Segment(t[0],t[1]));
+    segments.push_back(Segment(t[1],t[2]));
+    segments.push_back(Segment(t[2],t[0]));    
+  }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_triangles_3
+
+// fits a line to a 3D triangle set
+template < typename InputIterator, 
+           typename K,
+	   typename DiagonalizeTraits >
+typename K::FT
+linear_least_squares_fitting_3(InputIterator first,
+                               InputIterator beyond, 
+                               typename K::Line_3& line,   // best fit line
+                               typename K::Point_3& c,       // centroid
+                               const typename K::Triangle_3*,  // used for indirection
+                               const K& k,                   // kernel
+                               const CGAL::Dimension_tag<0>& tag,
+			       const DiagonalizeTraits& diagonalize_traits)
+{
+  typedef typename K::Triangle_3  Triangle;
+  typedef typename K::Point_3  Point;
+
+  // precondition: at least one element in the container.
+  CGAL_precondition(first != beyond);
+  std::list<Point> points;
+  for(InputIterator it = first;
+      it != beyond;
+      it++)
+  {
+    const Triangle& t = *it;
+    points.push_back(t[0]);
+    points.push_back(t[1]);
+    points.push_back(t[2]);    
+  }
+
+  // compute fitting line
+  return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag,
+					diagonalize_traits);
+
+} // end linear_least_squares_fitting_triangles_3
+
+} // end namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_LINEAR_LEAST_SQUARES_FITTING_TRIANGLES_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_2.h b/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_2.h
new file mode 100644
index 0000000..03006af
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_2.h
@@ -0,0 +1,178 @@
+// Copyright (c) 2014-2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+// Author(s) : Jane Tournois
+//
+
+#ifndef CGAL_LLOYD_OPTIMIZE_MESH_2_H
+#define CGAL_LLOYD_OPTIMIZE_MESH_2_H
+
+
+
+#include <CGAL/Mesh_2/Mesh_global_optimizer_2.h>
+#include <CGAL/Mesh_2/Lloyd_move_2.h>
+#include <CGAL/Mesh_2/Mesh_sizing_field.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/iterator.h>
+
+#include <fstream>
+
+#if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+#ifdef BOOST_PARAMETER_MAX_ARITY
+#  if (BOOST_PARAMETER_MAX_ARITY < 8)
+#    error "BOOST_PARAMETER_MAX_ARITY must be at least 8 for CGAL::lloyd_optimize_mesh_2()"
+#  endif
+#else
+#  define  BOOST_PARAMETER_MAX_ARITY 8
+#endif
+
+#include <boost/parameter.hpp>
+#include <boost/parameter/name.hpp>
+
+namespace CGAL
+{
+namespace parameters
+{
+  
+
+BOOST_PARAMETER_NAME( cdt )
+BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ )
+BOOST_PARAMETER_NAME( (convergence, tag) convergence_)
+BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ )
+BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_)
+BOOST_PARAMETER_NAME( (seeds_begin, tag) seeds_begin_)
+BOOST_PARAMETER_NAME( (seeds_end, tag) seeds_end_)
+BOOST_PARAMETER_NAME( (mark, tag) mark_)
+
+}//end namespace parameters
+}//end namespace CGAL
+
+
+namespace CGAL
+{
+  using namespace parameters;
+
+  BOOST_PARAMETER_FUNCTION(
+  (Mesh_optimization_return_code),
+  lloyd_optimize_mesh_2,
+  tag,
+  (required (in_out(cdt),*))
+  (optional
+    (max_iteration_number_, *, 0 )
+    (convergence_, *, 0.001 )
+    (time_limit_, *, 0. )
+    (freeze_bound_, *, 0.001 )
+    (seeds_begin_, *, CGAL::Emptyset_iterator())//see comments below
+    (seeds_end_, *, CGAL::Emptyset_iterator())//see comments below
+    (mark_, *, false) //if "false", seeds indicate "outside" regions
+  )
+  )
+  {
+    return lloyd_optimize_mesh_2_impl(cdt,
+                                      max_iteration_number_,
+                                      convergence_,
+                                      freeze_bound_,
+                                      time_limit_,
+                                      seeds_begin_,
+                                      seeds_end_,
+                                      mark_);
+  }
+
+  /**
+  * this partial specialization is a workaround
+  * to avoid compilation errors when seeds_begin and seeds_end are
+  * not initialized. Indeed, there is no way to have a
+  * "default empty iterator" for these named parameters.
+  * Emptyset_iterator implements OutputIterator, 
+  * but stands here for "any empty input iterator"
+  * (and any other type could).
+  */
+  template<typename CDT>
+  Mesh_optimization_return_code
+  lloyd_optimize_mesh_2_impl(CDT& cdt,
+                             const int max_iterations,
+                             const double convergence_ratio,
+                             const double freeze_bound,
+                             const double time_limit,
+                             CGAL::Emptyset_iterator,
+                             CGAL::Emptyset_iterator,
+                             const bool mark)
+  {
+    std::list<typename CDT::Point> seeds;
+    return lloyd_optimize_mesh_2_impl(cdt, max_iterations, convergence_ratio,
+      freeze_bound, time_limit, seeds.begin(), seeds.end(), mark);
+  }
+
+  template<typename CDT, typename InputIterator>
+  Mesh_optimization_return_code
+  lloyd_optimize_mesh_2_impl(CDT& cdt,
+                             const int max_iterations,
+                             const double convergence_ratio,
+                             const double freeze_bound,
+                             const double time_limit,
+                             InputIterator seeds_begin,
+                             InputIterator seeds_end,
+                             const bool mark)
+  {
+    typedef Mesh_2::Mesh_sizing_field<CDT>           Sizing;
+    typedef Mesh_2::Lloyd_move_2<CDT, Sizing>        Mv;
+    typedef Mesh_2::Mesh_global_optimizer_2<CDT, Mv> Optimizer;
+
+    Optimizer lloyd(cdt,
+                    convergence_ratio,
+                    freeze_bound);
+    lloyd.set_time_limit(time_limit);
+    lloyd.set_seeds(seeds_begin, seeds_end, mark);
+
+#ifdef CGAL_MESH_2_OPTIMIZERS_DEBUG
+    std::ofstream os("before_lloyd.angles.txt");
+    lloyd.output_angles_histogram(os);
+    os.close();
+#endif
+
+    // 1000 iteration max to avoid infinite loop
+    int nb_iterations = (0 == max_iterations)
+      ? 1000
+      : max_iterations;
+
+    //run optimization
+    Mesh_optimization_return_code rc = lloyd(nb_iterations);
+
+#ifdef CGAL_MESH_2_OPTIMIZERS_DEBUG
+    std::ofstream os2("after_lloyd.angles.txt");
+    lloyd.output_angles_histogram(os2);
+    os2.close();
+#endif
+
+    return rc;
+  }
+
+} //end namespace CGAL
+
+//CGAL_PRAGMA_DIAG_POP
+#if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000)
+#pragma GCC diagnostic pop
+#endif
+
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_3.h
new file mode 100644
index 0000000..ba0d569
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/lloyd_optimize_mesh_3.h
@@ -0,0 +1,108 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : lloyd_optimize_mesh_3 function definition.
+//******************************************************************************
+
+#ifndef CGAL_LLOYD_OPTIMIZE_MESH_3_H
+#define CGAL_LLOYD_OPTIMIZE_MESH_3_H
+
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/Mesh_3/Mesh_global_optimizer.h>
+#include <CGAL/Mesh_3/Lloyd_move.h>
+#include <CGAL/Mesh_3/Mesh_sizing_field.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h>
+#include <CGAL/internal/Mesh_3/check_weights.h>
+
+namespace CGAL {
+  
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (Mesh_optimization_return_code),
+  lloyd_optimize_mesh_3,
+  parameters::tag,
+  (required (in_out(c3t3),*) (domain,*) )
+  (optional
+    (time_limit_, *, 0 )
+    (max_iteration_number_, *, 0 )
+    (convergence_, *, parameters::default_values::lloyd_convergence_ratio )
+    (freeze_bound_, *, parameters::default_values::lloyd_freeze_ratio )
+    (do_freeze_, *, parameters::default_values::do_freeze ))
+)
+{
+  return lloyd_optimize_mesh_3_impl(c3t3, domain,
+                                    time_limit_, max_iteration_number_,
+                                    convergence_, freeze_bound_
+                                    , do_freeze_);
+} 
+CGAL_PRAGMA_DIAG_POP
+
+  
+  
+template <typename C3T3, typename MeshDomain> 
+Mesh_optimization_return_code
+lloyd_optimize_mesh_3_impl(C3T3& c3t3,
+                           const MeshDomain& domain,
+                           const double time_limit,
+                           std::size_t max_iteration_number,
+                           const double convergence,
+                           const double freeze_bound
+                           , const bool do_freeze)
+{
+  CGAL_precondition(
+    !internal::Mesh_3::has_non_protecting_weights(c3t3.triangulation(), domain));
+
+  typedef typename C3T3::Triangulation  Tr;
+  
+  typedef Mesh_3::Mesh_sizing_field<Tr>               Sizing;
+  typedef typename Mesh_3::Lloyd_move<C3T3,Sizing>    Move;
+  
+  typedef typename
+    Mesh_3::Mesh_global_optimizer<C3T3,MeshDomain,Move> Lloyd_optimizer;
+  
+  // Create optimizer
+  Lloyd_optimizer opt (c3t3,
+                       domain,
+                       freeze_bound,
+                       do_freeze,
+                       convergence);
+  
+  // Set max time
+  opt.set_time_limit(time_limit);
+  
+  // 1000 iteration max to avoid infinite loops
+  if ( 0 == max_iteration_number )
+    max_iteration_number = 1000;
+  
+  // Launch optimization
+  return opt(static_cast<int>(max_iteration_number));
+}
+  
+  
+}  // end namespace CGAL
+
+
+#endif // CGAL_LLOYD_OPTIMIZE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/long_double.h b/3rdparty/CGAL-4.8/include/CGAL/long_double.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/long_double.h
rename to 3rdparty/CGAL-4.8/include/CGAL/long_double.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/long_long.h b/3rdparty/CGAL-4.8/include/CGAL/long_long.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/long_long.h
rename to 3rdparty/CGAL-4.8/include/CGAL/long_long.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/make_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/make_mesh_3.h
new file mode 100644
index 0000000..4e08d34
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/make_mesh_3.h
@@ -0,0 +1,452 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stéphane Tayeb
+//
+//******************************************************************************
+// File Description : make_mesh_3 function definition.
+//******************************************************************************
+
+#ifndef CGAL_MAKE_MESH_3_H
+#define CGAL_MAKE_MESH_3_H
+
+#include <CGAL/Mesh_3/config.h>
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/refine_mesh_3.h>
+#include <CGAL/tags.h>
+#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
+#include <CGAL/Mesh_3/Has_features.h>
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace CGAL {
+  
+namespace parameters {
+  namespace internal {
+    // Features
+    struct Features_options
+    {
+      Features_options(bool b) : b_(b) {}
+      bool features() const { return b_; }
+    private:
+      bool b_;
+    };
+    
+    // -----------------------------------
+    // Features generator
+    // -----------------------------------
+    // struct Features_option_generator
+    template <typename HasFeatures>
+    struct Features_options_generator {};
+    
+    template<>
+    struct Features_options_generator<CGAL::Tag_true>
+    {
+      Features_options operator()() { return Features_options(true); }
+    };
+    
+    template<>
+    struct Features_options_generator<CGAL::Tag_false>
+    {
+      Features_options operator()() { return Features_options(false); }
+    };
+    
+    // struct Domain_features_generator is designed to handle cases where
+    // MeshDomain::Has_features is not a valid type
+    template< typename MeshDomain, bool MeshDomainHasHasFeatures >
+    struct Domain_features_generator {};
+    
+    template< typename MeshDomain >
+    struct Domain_features_generator< MeshDomain, false >
+    {
+      Features_options operator()()
+      { 
+        return Features_options_generator<CGAL::Tag_false>()();
+      }
+    };
+    
+    template< typename MeshDomain >
+    struct Domain_features_generator< MeshDomain, true >
+    {
+      Features_options operator()()
+      { 
+        return Features_options_generator<typename MeshDomain::Has_features>()();
+      }
+    };
+
+  } // end namespace internal
+
+  // -----------------------------------
+  // Features_options
+  // -----------------------------------
+  inline internal::Features_options
+  features() { return internal::Features_options(true); }
+
+  inline internal::Features_options
+  no_features() { return internal::Features_options(false); }
+  
+  template < typename MeshDomain >
+  inline internal::Features_options
+  features(const MeshDomain& /*domain*/)
+  {
+    typedef typename internal::Domain_features_generator<
+      MeshDomain,
+      CGAL::internal::Mesh_3::has_Has_features<MeshDomain>::value > Generator;
+    
+    return Generator()();
+  }
+  
+  // -----------------------------------
+  // Parameters
+  // -----------------------------------
+
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+  BOOST_PARAMETER_NAME( features_param )
+
+CGAL_PRAGMA_DIAG_POP
+  
+} // end namespace parameters::internal
+
+
+// -----------------------------------
+// Initialize c3t3 stuff
+// -----------------------------------
+namespace internal {
+namespace Mesh_3 {
+
+template < typename C3T3, typename MeshDomain, typename MeshCriteria >
+void
+init_c3t3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria&,
+          const int nb_initial_points)
+{
+  typedef typename MeshDomain::Point_3 Point_3;
+  typedef typename MeshDomain::Index Index;
+  typedef std::vector<std::pair<Point_3, Index> > Initial_points_vector;
+  typedef typename Initial_points_vector::iterator Ipv_iterator;
+  typedef typename C3T3::Vertex_handle Vertex_handle;
+  
+  // Mesh initialization : get some points and add them to the mesh
+  Initial_points_vector initial_points;
+  if (nb_initial_points > 0)
+    domain.construct_initial_points_object()(std::back_inserter(initial_points),
+                                             nb_initial_points);
+  else //use default number of points
+    domain.construct_initial_points_object()(std::back_inserter(initial_points));
+
+  // Insert points and set their index and dimension
+  for ( Ipv_iterator it = initial_points.begin() ;
+       it != initial_points.end() ;
+       ++it )
+  {
+    Vertex_handle v = c3t3.triangulation().insert(it->first);
+    
+    // v could be null if point is hidden
+    if ( v != Vertex_handle() )
+    {
+      c3t3.set_dimension(v,2); // by construction, points are on surface
+      c3t3.set_index(v,it->second);      
+    }
+  }
+}
+
+template < typename EdgeCriteria >
+struct Edge_criteria_sizing_field_wrapper
+{
+  typedef typename EdgeCriteria::Index    Index;
+  typedef typename EdgeCriteria::FT       FT;
+  typedef typename EdgeCriteria::Point_3  Point_3;
+  
+  Edge_criteria_sizing_field_wrapper(const EdgeCriteria& ec) : ec_(ec) {}
+  FT operator()(const Point_3& p, const int dim, const Index& index) const
+  { return ec_.sizing_field(p,dim,index); }
+
+private:
+  // No need to copy EdgeCriteria here
+  const EdgeCriteria& ec_;
+};
+
+template < typename C3T3, typename MeshDomain, typename MeshCriteria >
+void
+init_c3t3_with_features(C3T3& c3t3,
+                        const MeshDomain& domain,
+                        const MeshCriteria& criteria)
+{
+  typedef typename MeshCriteria::Edge_criteria Edge_criteria;
+  typedef Edge_criteria_sizing_field_wrapper<Edge_criteria> Sizing_field;
+
+  CGAL::Mesh_3::Protect_edges_sizing_field<C3T3,MeshDomain,Sizing_field>     
+    protect_edges(c3t3, domain, Sizing_field(criteria.edge_criteria_object()));
+  
+  protect_edges(true);
+}
+  
+
+// C3t3_initializer: initialize c3t3
+template < typename C3T3,
+           typename MeshDomain,
+           typename MeshCriteria,
+           bool MeshDomainHasHasFeatures,
+           typename HasFeatures = int>
+struct C3t3_initializer {};
+  
+// Partial specialization of C3t3_initializer
+// Handle cases where MeshDomain::Has_features is not a valid type
+template < typename C3T3, typename MD, typename MC, typename HasFeatures >
+struct C3t3_initializer < C3T3, MD, MC, false, HasFeatures >
+{
+  void operator()(C3T3& c3t3,
+                  const MD& domain,
+                  const MC& criteria,
+                  bool with_features,
+                  const int nb_initial_points = -1)
+  {
+    if ( with_features )
+    {
+      std::cerr << "Warning: you requested a mesh with features from a domain"
+                << " without features !" << std::endl;
+    }
+    
+    init_c3t3(c3t3,domain,criteria,nb_initial_points);
+  }
+};
+
+// Partial specialization of C3t3_initializer
+// Handles cases where MeshDomain::Has_features is a valid type
+template < typename C3T3, typename MD, typename MC, typename HasFeatures >
+struct C3t3_initializer < C3T3, MD, MC, true, HasFeatures >
+{
+  void operator()(C3T3& c3t3,
+                  const MD& domain,
+                  const MC& criteria,
+                  bool with_features,
+                  const int nb_initial_points = -1)
+  {
+    C3t3_initializer < C3T3, MD, MC, true, typename MD::Has_features >()
+      (c3t3,domain,criteria,with_features,nb_initial_points);
+  }  
+};
+
+// Partial specialization of C3t3_initializer
+// Handles cases where MeshDomain::Has_features is a valid type and is defined
+// to CGAL::Tag_true
+template < typename C3T3, typename MD, typename MC >
+struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true >
+{
+  void operator()(C3T3& c3t3,
+                  const MD& domain,
+                  const MC& criteria,
+                  bool with_features,
+                  const int nb_initial_points = -1)
+  {
+    if ( with_features ) { init_c3t3_with_features(c3t3,domain,criteria); }
+    else { init_c3t3(c3t3,domain,criteria,nb_initial_points); }
+  }
+};
+  
+// Partial specialization of C3t3_initializer
+// Handles cases where MeshDomain::Has_features is a valid type and is defined
+// to CGAL::Tag_false
+template < typename C3T3, typename MD, typename MC >
+struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false >
+{
+  void operator()(C3T3& c3t3,
+                  const MD& domain,
+                  const MC& criteria,
+                  bool with_features,
+                  const int nb_initial_points = -1)
+  {
+    if ( with_features )
+    {
+      std::cerr << "Warning: you requested a mesh with features from a domain"
+                << " without features !" << std::endl;
+    }
+    
+    init_c3t3(c3t3,domain,criteria,nb_initial_points);
+  }
+};
+
+}} // end namespace internal::Mesh_3
+  
+
+// -----------------------------------
+// make_mesh_3 stuff
+// -----------------------------------
+
+// Manual redirections
+// boost::parameter can't handle make_mesh_3 return_type alone...
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+template <typename C3T3, typename MD, typename MC, typename ... T>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const T& ...t)
+{
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc,t...);
+  return c3t3;  
+}
+
+#else
+
+template <typename C3T3, typename MD, typename MC>
+C3T3 make_mesh_3(const MD& md, const MC& mc)
+{ 
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc);
+  return c3t3;
+}
+  
+template <typename C3T3, typename MD, typename MC,
+  typename Arg1>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1)
+{ 
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc,a1);
+  return c3t3;
+}
+
+template <typename C3T3, typename MD, typename MC,
+  typename Arg1, typename Arg2>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2)
+{
+  C3T3 c3t3; 
+  make_mesh_3_bp(c3t3,md,mc,a1,a2);
+  return c3t3;
+}
+
+template <typename C3T3, typename MD, typename MC,
+  typename Arg1, typename Arg2, typename Arg3>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
+                 const Arg3& a3)
+{ 
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3);
+  return c3t3;
+}
+
+template <typename C3T3, typename MD, typename MC,
+  typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
+                 const Arg3& a3, const Arg4& a4)
+{ 
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3,a4);
+  return c3t3;
+}
+
+template <typename C3T3, typename MD, typename MC,
+  typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2,
+                 const Arg3& a3, const Arg4& a4, const Arg5& a5)
+{ 
+  C3T3 c3t3;
+  make_mesh_3_bp(c3t3,md,mc,a1,a2,a3,a4,a5);
+  return c3t3;
+}
+
+#endif  
+  
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (void),
+  make_mesh_3_bp,
+  parameters::tag,
+  (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced
+  (deduced 
+    (optional
+      (features_param, (parameters::internal::Features_options), parameters::features(domain))
+      (exude_param, (parameters::internal::Exude_options), parameters::exude())
+      (perturb_param, (parameters::internal::Perturb_options), parameters::perturb())
+      (odt_param, (parameters::internal::Odt_options), parameters::no_odt())
+      (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
+      (mesh_options_param, (parameters::internal::Mesh_3_options), 
+                           parameters::internal::Mesh_3_options())
+    )
+  )
+)
+{
+  make_mesh_3_impl(c3t3, domain, criteria,
+                   exude_param, perturb_param, odt_param, lloyd_param,
+                   features_param.features(), mesh_options_param);
+}
+CGAL_PRAGMA_DIAG_POP
+
+/**
+ * @brief This function meshes the domain defined by mesh_traits
+ * (respecting criteria), and outputs the mesh to c3t3
+ *
+ * @param domain the domain to be discretized
+ * @param criteria the criteria
+ * @param exude if it is set to \c true, an exudation step will be done at
+ *   the end of the Delaunay refinement process
+ *
+ * @return The mesh as a C3T3 object
+ */
+template<class C3T3, class MeshDomain, class MeshCriteria>
+void make_mesh_3_impl(C3T3& c3t3,
+                      const MeshDomain&   domain,
+                      const MeshCriteria& criteria,
+                      const parameters::internal::Exude_options& exude,
+                      const parameters::internal::Perturb_options& perturb,
+                      const parameters::internal::Odt_options& odt,
+                      const parameters::internal::Lloyd_options& lloyd,
+                      const bool with_features,
+                      const parameters::internal::Mesh_3_options& 
+                        mesh_options = parameters::internal::Mesh_3_options())
+{
+#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
+  CGAL::default_random = CGAL::Random(0);
+#endif
+
+  // Initialize c3t3
+  internal::Mesh_3::C3t3_initializer< 
+    C3T3,
+    MeshDomain,
+    MeshCriteria,
+    internal::Mesh_3::has_Has_features<MeshDomain>::value > () (c3t3,
+            domain,
+            criteria,
+            with_features,
+            mesh_options.number_of_initial_points);
+
+  // If c3t3 initialization is not sufficient (may happen if there is only
+  // a planar curve as feature for example), add some surface points
+  if ( c3t3.triangulation().dimension() != 3 )
+  {
+    internal::Mesh_3::init_c3t3(c3t3, domain, criteria,
+              mesh_options.number_of_initial_points);
+  }
+  CGAL_assertion( c3t3.triangulation().dimension() == 3 );
+  
+  // Build mesher and launch refinement process
+  // Don't reset c3t3 as we just created it
+  refine_mesh_3(c3t3, domain, criteria,
+                exude, perturb, odt, lloyd, parameters::no_reset_c3t3(), mesh_options);
+}
+
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_MAKE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/make_piecewise_smooth_surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/make_piecewise_smooth_surface_mesh.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/make_piecewise_smooth_surface_mesh.h
rename to 3rdparty/CGAL-4.8/include/CGAL/make_piecewise_smooth_surface_mesh.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/make_skin_surface_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/make_skin_surface_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/make_skin_surface_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/make_skin_surface_mesh_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/make_surface_mesh.h b/3rdparty/CGAL-4.8/include/CGAL/make_surface_mesh.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/make_surface_mesh.h
rename to 3rdparty/CGAL-4.8/include/CGAL/make_surface_mesh.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/make_union_of_balls_3.h b/3rdparty/CGAL-4.8/include/CGAL/make_union_of_balls_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/make_union_of_balls_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/make_union_of_balls_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/marching_tetrahedra_3.h b/3rdparty/CGAL-4.8/include/CGAL/marching_tetrahedra_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/marching_tetrahedra_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/marching_tetrahedra_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/memory.h b/3rdparty/CGAL-4.8/include/CGAL/memory.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/memory.h
rename to 3rdparty/CGAL-4.8/include/CGAL/memory.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mesh_segmentation.h b/3rdparty/CGAL-4.8/include/CGAL/mesh_segmentation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mesh_segmentation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mesh_segmentation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mesh_skin_surface_3.h b/3rdparty/CGAL-4.8/include/CGAL/mesh_skin_surface_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mesh_skin_surface_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mesh_skin_surface_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mesh_union_of_balls_3.h b/3rdparty/CGAL-4.8/include/CGAL/mesh_union_of_balls_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mesh_union_of_balls_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mesh_union_of_balls_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/min_max_n.h b/3rdparty/CGAL-4.8/include/CGAL/min_max_n.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/min_max_n.h
rename to 3rdparty/CGAL-4.8/include/CGAL/min_max_n.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/min_quadrilateral_2.h b/3rdparty/CGAL-4.8/include/CGAL/min_quadrilateral_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/min_quadrilateral_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/min_quadrilateral_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/minimum_enclosing_quadrilateral_2.h b/3rdparty/CGAL-4.8/include/CGAL/minimum_enclosing_quadrilateral_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/minimum_enclosing_quadrilateral_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/minimum_enclosing_quadrilateral_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_2.h b/3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_2.h
new file mode 100644
index 0000000..5e46415
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_2.h
@@ -0,0 +1,478 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s) : Ron Wein   <wein_r at yahoo.com>
+//             Efi Fogel  <efifogel at gmail.com>
+
+#ifndef CGAL_MINKOWSKI_SUM_2_H
+#define CGAL_MINKOWSKI_SUM_2_H
+
+#include <CGAL/basic.h>
+#include <CGAL/Polygon_with_holes_2.h>
+
+#include <CGAL/Minkowski_sum_2/Hole_filter_2.h>
+#include <CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h>
+#include <CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h>
+#include <CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h>
+#include <list>
+
+namespace CGAL {
+
+/*!
+ * Computes the Minkowski sum \f$ P \oplus Q\f$ of two given polygons.
+ * The function computes the reduced convolution of the two polygons and
+ * extracts those loops of the convolution which are part of the Minkowsi
+ * sum. This method works very efficiently, regardless of whether `P` and
+ * `Q` are convex or non-convex.
+ * Note that as the input polygons may not be convex, their Minkowski
+ * sum may not be a simple polygon. The result is therefore represented
+ * as a polygon with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \pre Both `P` and `Q` are simple, counterclockwise-oriented polygons.
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_by_reduced_convolution_2(const Polygon_2<Kernel_,
+                                       Container_>& pgn1,
+                                       const Polygon_2<Kernel_,
+                                       Container_>& pgn2)
+{
+  typedef Kernel_                                    Kernel;
+  typedef Container_                                 Container;
+
+  Minkowski_sum_by_reduced_convolution_2<Kernel, Container> mink_sum;
+  Polygon_2<Kernel, Container>                              sum_bound;
+  std::list<Polygon_2<Kernel, Container> >                  sum_holes;
+
+  if (pgn1.size() > pgn2.size())
+    mink_sum(pgn1, pgn2, sum_bound, std::back_inserter(sum_holes));
+  else mink_sum(pgn2, pgn1, sum_bound, std::back_inserter(sum_holes));
+
+  return (Polygon_with_holes_2<Kernel,Container>(sum_bound,
+                                                 sum_holes.begin(),
+                                                 sum_holes.end()));
+}
+
+/*!
+ * Computes the Minkowski sum \f$ P \oplus Q\f$ of two given polygons with
+ * holes.
+ * The function computes the reduced convolution of the two polygons and
+ * extracts those loops of the convolution which are part of the Minkowsi
+ * sum. This method works very efficiently, regardless of whether `P` and
+ * `Q` are convex or non-convex.
+ * The result is also represented as a polygon with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_by_reduced_convolution_2
+(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+ const Polygon_with_holes_2<Kernel_, Container_>& pgn2)
+{
+  typedef Kernel_                                    Kernel;
+  typedef Container_                                 Container;
+
+  Hole_filter_2<Kernel, Container> hole_filter;
+
+  Polygon_with_holes_2<Kernel, Container> filtered_pgn1;
+  Polygon_with_holes_2<Kernel, Container> filtered_pgn2;
+
+  hole_filter(pgn1, pgn2, filtered_pgn1);
+  hole_filter(pgn2, pgn1, filtered_pgn2);
+
+  Minkowski_sum_by_reduced_convolution_2<Kernel, Container> mink_sum;
+  Polygon_2<Kernel, Container>                              sum_bound;
+  std::list<Polygon_2<Kernel, Container> >                  sum_holes;
+
+  mink_sum(filtered_pgn1, filtered_pgn2, sum_bound,
+           std::back_inserter(sum_holes));
+
+  return (Polygon_with_holes_2<Kernel,Container>(sum_bound,
+                                                 sum_holes.begin(),
+                                                 sum_holes.end()));
+}
+
+/*!
+ * Computes the Minkowski sum \f$ P \oplus Q\f$ of a simple polygon and a
+ * polygon with holes.
+ * The function computes the reduced convolution of the two polygons and
+ * extracts those loops of the convolution which are part of the Minkowsi
+ * sum. This method works very efficiently, regardless of whether `P` and
+ * `Q` are convex or non-convex.
+ * The result is also represented as a polygon with holes.
+ * \param[in] pgn1 The simple polygon.
+ * \param[in] pgn2 The polygon with holes.
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_by_reduced_convolution_2
+(const Polygon_2<Kernel_, Container_>& pgn1,
+ const Polygon_with_holes_2<Kernel_, Container_>& pgn2)
+{
+  typedef Kernel_                                    Kernel;
+  typedef Container_                                 Container;
+
+  Hole_filter_2<Kernel, Container> hole_filter;
+  Polygon_with_holes_2<Kernel, Container> filtered_pgn2;
+  hole_filter(pgn2, pgn1, filtered_pgn2);
+  Minkowski_sum_by_reduced_convolution_2<Kernel, Container> mink_sum;
+  Polygon_2<Kernel, Container>                              sum_bound;
+  std::list<Polygon_2<Kernel, Container> >                  sum_holes;
+  mink_sum(pgn1, filtered_pgn2, sum_bound, std::back_inserter(sum_holes));
+  return (Polygon_with_holes_2<Kernel,Container>(sum_bound,
+                                                 sum_holes.begin(),
+                                                 sum_holes.end()));
+}
+
+/*!
+ * Computes the Minkowski sum \f$ P \oplus Q\f$ of a simple polygon and a
+ * polygon with holes.
+ * The function computes the reduced convolution of the two polygons and
+ * extracts those loops of the convolution which are part of the Minkowsi
+ * sum. This method works very efficiently, regardless of whether `P` and
+ * `Q` are convex or non-convex.
+ * The result is also represented as a polygon with holes.
+ * \param[in] pgn1 The polygon with holes.
+ * \param[in] pgn2 The simple polygon.
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_by_reduced_convolution_2
+(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+ const Polygon_2<Kernel_, Container_>& pgn2)
+{ return minkowski_sum_by_reduced_convolution_2(pgn2, pgn1); }
+
+/*!
+ * Compute the Minkowski sum of two simple polygons using the (full)
+ * convolution method.
+ * Note that as the input polygons may not be convex, their Minkowski sum may
+ * not be a simple polygon. The result is therefore represented as a polygon
+ * with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_by_full_convolution_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                                    const Polygon_2<Kernel_, Container_>& pgn2)
+{
+  typedef Kernel_                                    Kernel;
+  typedef Container_                                 Container;
+
+  Minkowski_sum_by_convolution_2<Kernel, Container> mink_sum;
+  Polygon_2<Kernel, Container>                      sum_bound;
+  std::list<Polygon_2<Kernel, Container> >          sum_holes;
+
+  if (pgn1.size() > pgn2.size())
+    mink_sum(pgn1, pgn2, sum_bound, std::back_inserter(sum_holes));
+  else mink_sum(pgn2, pgn1, sum_bound, std::back_inserter(sum_holes));
+  return (Polygon_with_holes_2<Kernel, Container>(sum_bound,
+                                                  sum_holes.begin(),
+                                                  sum_holes.end()));
+}
+
+/*!
+ * Compute the Minkowski sum of two simple polygons using the convolution
+ * method. This function defaults to calling the reduced convolution method,
+ * as it is more efficient in most cases.
+ * Note that as the input polygons may not be convex, their Minkowski sum may
+ * not be a simple polygon. The result is therefore represented as a polygon
+ * with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \return The resulting polygon with holes, representing the sum.
+ *
+ * \sa `CGAL::minkowski_sum_by_reduced_convolution_2()`
+ * \sa `CGAL::minkowski_sum_by_full_convolution_2()`
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2)
+{ return minkowski_sum_by_reduced_convolution_2(pgn1, pgn2); }
+
+/*!
+ * Compute the Minkowski sum of two polygons with holes using the convolution
+ * method. This function defaults to calling the reduced convolution method,
+ * as it is more efficient in most cases.
+ * Note that the result may not be a simple polygon. The result is therefore
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The first polygon with holes.
+ * \param[in] pgn2 The second polygon with holes.
+ * \return The resulting polygon with holes, representing the sum.
+ *
+ * \sa `CGAL::minkowski_sum_by_reduced_convolution_2()`
+ * \sa `CGAL::minkowski_sum_by_full_convolution_2()`
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2)
+{ return minkowski_sum_by_reduced_convolution_2(pgn1, pgn2); }
+
+/*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * using the convolution method. This function defaults to calling the reduced
+ * convolution method, as it is more efficient in most cases.
+ * Note that the result may not be a simple polygon. The result is therefore
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The simple polygon.
+ * \param[in] pgn2 The polygon with holes.
+ * \return The resulting polygon with holes, representing the sum.
+ *
+ * \sa `CGAL::minkowski_sum_by_reduced_convolution_2()`
+ * \sa `CGAL::minkowski_sum_by_full_convolution_2()`
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2)
+{ return minkowski_sum_by_reduced_convolution_2(pgn1, pgn2); }
+
+  /*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * using the convolution method. This function defaults to calling the reduced
+ * convolution method, as it is more efficient in most cases.
+ * Note that the result may not be a simple polygon. The result is therefore
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The polygon with holes.
+ * \param[in] pgn2 The simple polygon.
+ * \return The resulting polygon with holes, representing the sum.
+ *
+ * \sa `CGAL::minkowski_sum_by_reduced_convolution_2()`
+ * \sa `CGAL::minkowski_sum_by_full_convolution_2()`
+ */
+template <typename Kernel_, typename Container_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2)
+{ return minkowski_sum_by_reduced_convolution_2(pgn1, pgn2); }
+
+/*!
+ * Compute the Minkowski sum of two simple polygons by decomposing each
+ * polygon to convex sub-polygons and computing the union of the pairwise
+ * Minkowski sums of the sub-polygons.
+ * Note that as the input polygons may not be convex, their Minkowski sum may
+ * not be a simple polygon. The result is therefore represented as a polygon
+ * with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy)
+{
+  typename Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                            Container_>::Traits_2 traits;
+  return minkowski_sum_2(pgn1, pgn2, decomposition_strategy, traits);
+}
+
+/*!
+ * Compute the Minkowski sum of two simple polygons by decomposing each
+ * polygon to convex sub-polygons and computing the union of the pairwise
+ * Minkowski sums of the sub-polygons.
+ * Note that as the input polygons may not be convex, their Minkowski sum may
+ * not be a simple polygon. The result is therefore represented as a polygon
+ * with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \param[in] traits The traits.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy,
+                const typename
+                Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                                 Container_>::Traits_2& traits)
+{
+  typedef Container_                            Container;
+  typedef DecompositionStrategy_                Decomposition_strategy;
+
+  Minkowski_sum_by_decomposition_2<Decomposition_strategy, Container>
+    mink_sum(decomposition_strategy, traits);
+  return mink_sum(pgn1, pgn2);
+}
+
+/*!
+ * Compute the Minkowski sum of two polygon with holes by decomposing each
+ * polygon to convex sub-polygons and computing the union of the pairwise
+ * Minkowski sums of the sub-polygons.
+ * The result is also represented as a polygon with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy)
+{
+  typename Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                            Container_>::Traits_2 traits;
+  return minkowski_sum_2(pgn1, pgn2, decomposition_strategy, traits);
+}
+
+/*!
+ * Compute the Minkowski sum of two polygon with holes by decomposing each
+ * polygon to convex sub-polygons and computing the union of the pairwise
+ * Minkowski sums of the sub-polygons.
+ * The result is also represented as a polygon with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \param[in] traits The traits.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy,
+                const typename
+                Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                                 Container_>::Traits_2& traits)
+{
+  typedef Kernel_                               Kernel;
+  typedef Container_                            Container;
+  typedef DecompositionStrategy_                Decomposition_strategy;
+
+  Minkowski_sum_by_decomposition_2<Decomposition_strategy, Container>
+    mink_sum(decomposition_strategy, traits);
+  Hole_filter_2<Kernel, Container> hole_filter;
+  Polygon_with_holes_2<Kernel,Container> filtered_pgn1;
+  Polygon_with_holes_2<Kernel,Container> filtered_pgn2;
+  hole_filter(pgn1, pgn2, filtered_pgn1);
+  hole_filter(pgn2, pgn1, filtered_pgn2);
+  return mink_sum(filtered_pgn1, filtered_pgn2);
+}
+
+/*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * by decomposing each polygon to convex sub-polygons and computing the union
+ * of the pairwise Minkowski sums of the sub-polygons.  The result is also
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The first polygon.
+ * \param[in] pgn2 The second polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy)
+{
+  typename Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                            Container_>::Traits_2 traits;
+  return minkowski_sum_2(pgn1, pgn2, decomposition_strategy, traits);
+}
+
+/*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * by decomposing each polygon to convex sub-polygons and computing the union
+ * of the pairwise Minkowski sums of the sub-polygons.  The result is also
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The simple polygon.
+ * \param[in] pgn2 The polygon with holes.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \param[in] traits The traits.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_2<Kernel_, Container_>& pgn1,
+                const Polygon_with_holes_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy,
+                const typename
+                Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                                 Container_>::Traits_2& traits)
+{
+  typedef Kernel_                               Kernel;
+  typedef Container_                            Container;
+  typedef DecompositionStrategy_                Decomposition_strategy;
+
+  Minkowski_sum_by_decomposition_2<Decomposition_strategy, Container>
+    mink_sum(decomposition_strategy, traits);
+  Hole_filter_2<Kernel, Container> hole_filter;
+  Polygon_with_holes_2<Kernel,Container> filtered_pgn2;
+  hole_filter(pgn2, pgn1, filtered_pgn2);
+  return mink_sum(pgn1, filtered_pgn2);
+}
+
+/*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * by decomposing each polygon to convex sub-polygons and computing the union
+ * of the pairwise Minkowski sums of the sub-polygons.  The result is also
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The second polygon.
+ * \param[in] pgn2 The first polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy)
+{
+  typename Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                            Container_>::Traits_2 traits;
+  return minkowski_sum_2(pgn1, pgn2, decomposition_strategy, traits);
+}
+
+/*!
+ * Compute the Minkowski sum of a simple polygon and a polygon with holes
+ * by decomposing each polygon to convex sub-polygons and computing the union
+ * of the pairwise Minkowski sums of the sub-polygons.  The result is also
+ * represented as a polygon with holes.
+ * \param[in] pgn1 The polygon with holes.
+ * \param[in] pgn2 The simple polygon.
+ * \param[in] decomposition_strategy A functor for decomposing polygons.
+ * \param[in] traits The traits.
+ * \return The resulting polygon with holes, representing the sum.
+ */
+template <typename Kernel_, typename Container_,
+          typename DecompositionStrategy_>
+Polygon_with_holes_2<Kernel_, Container_>
+minkowski_sum_2(const Polygon_with_holes_2<Kernel_, Container_>& pgn1,
+                const Polygon_2<Kernel_, Container_>& pgn2,
+                const DecompositionStrategy_& decomposition_strategy,
+                const typename
+                Minkowski_sum_by_decomposition_2<DecompositionStrategy_,
+                                                 Container_>::Traits_2& traits)
+{ return minkowski_sum_2(pgn2, pgn1, decomposition_strategy, traits); }
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_3.h b/3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/minkowski_sum_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/minkowski_sum_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/monotone_matrix_search.h b/3rdparty/CGAL-4.8/include/CGAL/monotone_matrix_search.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/monotone_matrix_search.h
rename to 3rdparty/CGAL-4.8/include/CGAL/monotone_matrix_search.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/more_functions_on_signs.h b/3rdparty/CGAL-4.8/include/CGAL/more_functions_on_signs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/more_functions_on_signs.h
rename to 3rdparty/CGAL-4.8/include/CGAL/more_functions_on_signs.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mpfi_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/mpfi_coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mpfi_coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mpfi_coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mpfr_coercion_traits.h b/3rdparty/CGAL-4.8/include/CGAL/mpfr_coercion_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mpfr_coercion_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mpfr_coercion_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mpq_class.h b/3rdparty/CGAL-4.8/include/CGAL/mpq_class.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mpq_class.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mpq_class.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/mpz_class.h b/3rdparty/CGAL-4.8/include/CGAL/mpz_class.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/mpz_class.h
rename to 3rdparty/CGAL-4.8/include/CGAL/mpz_class.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/mst_orient_normals.h b/3rdparty/CGAL-4.8/include/CGAL/mst_orient_normals.h
new file mode 100644
index 0000000..cf2734f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/mst_orient_normals.h
@@ -0,0 +1,716 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Laurent Saboret and Andreas Fabri
+
+#ifndef CGAL_MST_ORIENT_NORMALS_H
+#define CGAL_MST_ORIENT_NORMALS_H
+
+#include <CGAL/trace.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Search_traits_vertex_handle_3.h>
+#include <CGAL/property_map.h>
+#include <CGAL/Index_property_map.h>
+#include <CGAL/Memory_sizer.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/use.h>
+
+#include <iterator>
+#include <list>
+#include <climits>
+#include <math.h>
+
+#include <CGAL/property_map.h>
+#include <boost/graph/adjacency_list.hpp>
+#include <CGAL/boost/graph/dijkstra_shortest_paths.h> // work around a bug in boost 1.54
+#include <boost/graph/prim_minimum_spanning_tree.hpp>
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+namespace internal {
+
+/// Generalization of std::distance() to compute the distance between 2 integers
+inline std::size_t
+distance(std::size_t _First, std::size_t _Last)
+{
+  // return int difference
+  return _Last - _First;
+}
+
+// Bring std::distance() to scope
+using std::distance;
+
+
+/// Helper class: Riemannian graph.
+///
+/// This class is used internally by mst_orient_normals()
+/// to encode:
+/// - the adjacency relations of vertices in a K-neighboring.
+/// - vertices contain the corresponding input point iterator.
+/// - the edge weight = edge weight = 1 - | normal1 * normal2 |
+///   where normal1 and normal2 are the normal at the edge extremities.
+
+template <typename ForwardIterator> ///< Input point iterator
+struct Riemannian_graph_vertex_properties {
+    ForwardIterator input_point; ///< Input point
+};
+template <typename ForwardIterator> ///< Input point iterator
+class Riemannian_graph
+  : public boost::adjacency_list< boost::vecS, boost::vecS,
+                                  boost::undirectedS,
+                                  Riemannian_graph_vertex_properties<ForwardIterator>,
+                                  boost::property<boost::edge_weight_t, float> >
+{
+};
+
+
+/// Helper class: MST graph
+///
+/// This class is used internally by mst_orient_normals()
+/// to encode:
+/// - the adjacency relations of vertices in a Minimum Spanning Tree.
+/// - vertices contain the corresponding input point iterator
+//    and a boolean indicating if the normal is oriented.
+
+template <typename ForwardIterator> ///< Input point iterator
+struct MST_graph_vertex_properties {
+    ForwardIterator input_point; ///< Input point
+    bool is_oriented; ///< Is input point's normal oriented?
+};
+template <typename ForwardIterator, ///< Input point iterator
+          typename NormalPMap, ///< property map: value_type of ForwardIterator -> Normal
+          typename Kernel ///< Geometric traits class
+>
+class MST_graph
+  : public boost::adjacency_list< boost::vecS, boost::vecS,
+                                  boost::directedS,
+                                  MST_graph_vertex_properties<ForwardIterator> >
+{
+public:
+    MST_graph(NormalPMap normal_pmap) : m_normal_pmap(normal_pmap) {}
+
+// Public data
+    const NormalPMap m_normal_pmap;
+};
+
+
+/// Helper class: Propagate_normal_orientation
+///
+/// This class is used internally by mst_orient_normals()
+/// to propage the normal orientation, starting from a source point
+/// and following the adjacency relations of vertices in a Minimum Spanning Tree.
+/// It does not orient normals that are already oriented.
+/// It does not propagate the orientation if the angle between 2 normals > angle_max.
+///
+/// \pre Normals must be unit vectors
+/// \pre `0 < angle_max <= PI/2`
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap`.
+/// @tparam Kernel Geometric traits class.
+
+template <typename ForwardIterator, ///< Input point iterator
+          typename NormalPMap, ///< property map: value_type of ForwardIterator -> Normal
+          typename Kernel
+>
+struct Propagate_normal_orientation
+  : public boost::base_visitor< Propagate_normal_orientation<ForwardIterator, NormalPMap, Kernel> >
+{
+    typedef internal::MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
+    typedef boost::on_examine_edge event_filter;
+
+    Propagate_normal_orientation(double angle_max = CGAL_PI/2.) ///< max angle to propagate the normal orientation (radians)
+    : m_angle_max(angle_max)
+    {
+        // Precondition: 0 < angle_max <= PI/2
+        CGAL_point_set_processing_precondition(0 < angle_max && angle_max <= CGAL_PI/2.);
+    }
+
+    template <class Edge>
+    void operator()(Edge& edge, const MST_graph& mst_graph)
+    {
+        typedef typename boost::property_traits<NormalPMap>::value_type Vector;
+        typedef typename MST_graph::vertex_descriptor vertex_descriptor;
+
+        // Gets source normal
+        vertex_descriptor source_vertex = source(edge, mst_graph);
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        const Vector source_normal = get(mst_graph.m_normal_pmap, mst_graph[source_vertex].input_point);
+#else
+        const Vector source_normal = get(mst_graph.m_normal_pmap, *(mst_graph[source_vertex].input_point) );
+#endif
+        const bool source_normal_is_oriented = mst_graph[source_vertex].is_oriented;
+        // Gets target normal
+        vertex_descriptor target_vertex = target(edge, mst_graph);
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        const Vector& target_normal = get( mst_graph.m_normal_pmap, mst_graph[target_vertex].input_point);
+#else
+        const Vector& target_normal = get( mst_graph.m_normal_pmap, *(mst_graph[target_vertex].input_point) );
+#endif
+        bool& target_normal_is_oriented = ((MST_graph&)mst_graph)[target_vertex].is_oriented;
+        if ( ! target_normal_is_oriented )
+        {
+          //             ->                        ->
+          // Orients target_normal parallel to source_normal
+          double normals_dot = source_normal * target_normal;
+          if (normals_dot < 0)
+          {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+            put( mst_graph.m_normal_pmap, mst_graph[target_vertex].input_point, -target_normal);
+#else
+            put( mst_graph.m_normal_pmap, *(mst_graph[target_vertex].input_point), -target_normal );
+#endif
+          }
+
+          // Is orientation robust?
+          target_normal_is_oriented
+            = source_normal_is_oriented &&
+              (std::abs(normals_dot) >= std::cos(m_angle_max)); // oriented iff angle <= m_angle_max
+        }
+    }
+
+// Data
+// Implementation note: boost::breadth_first_search() makes copies of this object => data must be constant or shared.
+private:
+    const double m_angle_max; ///< max angle to propagate the normal orientation (radians).
+};
+
+/// Orients the normal of the point with maximum Z towards +Z axis.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
+/// @tparam Kernel Geometric traits class.
+///
+/// @return iterator over the top point.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+ForwardIterator
+mst_find_source(
+    ForwardIterator first,   ///< iterator over the first input point.
+    ForwardIterator beyond,  ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
+    const Kernel& /*kernel*/)    ///< geometric traits.
+{
+    CGAL_TRACE("  mst_find_source()\n");
+
+    // Input points types
+    typedef typename boost::property_traits<NormalPMap>::value_type Vector;
+
+    // Precondition: at least one element in the container
+    CGAL_point_set_processing_precondition(first != beyond);
+
+    // Find top point
+    ForwardIterator top_point = first;
+    for (ForwardIterator v = ++first; v != beyond; v++)
+    {
+      
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      double top_z = get(point_pmap,top_point).z(); // top_point's Z coordinate
+      double z = get(point_pmap,v).z();
+#else
+      double top_z = get(point_pmap,*top_point).z(); // top_point's Z coordinate
+      double z = get(point_pmap,*v).z();
+#endif  
+      
+      if (top_z < z)
+        top_point = v;
+    }
+
+    // Orients its normal towards +Z axis
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    const Vector& normal = get(normal_pmap,top_point);
+#else
+    const Vector& normal = get(normal_pmap,*top_point);
+#endif
+    const Vector Z(0, 0, 1);
+    if (Z * normal < 0) {
+      CGAL_TRACE("  Flip top point normal\n");
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    put(normal_pmap,top_point, -normal);
+#else
+    put(normal_pmap,*top_point, -normal);
+#endif
+    }
+
+    return top_point;
+}
+
+/// Iterates over input points and creates Riemannian Graph:
+/// - vertices are numbered like the input points index.
+/// - vertices contain the corresponding input point iterator.
+/// - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
+///   or vertex j is in the k-neighborhood of vertex i.
+///
+/// \pre Normals must be unit vectors.
+/// \pre `k >= 2`
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam IndexPMap is a model of `ReadablePropertyMap` with an integral value_type.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
+/// @tparam Kernel Geometric traits class.
+///
+/// @return the Riemannian graph
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename IndexPMap,
+          typename Kernel
+>
+Riemannian_graph<ForwardIterator>
+create_riemannian_graph(
+    ForwardIterator first,  ///< iterator over the first input point.
+    ForwardIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
+    IndexPMap index_pmap, ///< property map ForwardIterator -> index
+    unsigned int k, ///< number of neighbors
+    const Kernel& /*kernel*/) ///< geometric traits.
+{
+    // Input points types
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename boost::property_traits<NormalPMap>::value_type Vector;
+
+    // Types for K nearest neighbors search structure
+    typedef Point_vertex_handle_3<ForwardIterator> Point_vertex_handle_3;
+    typedef Search_traits_vertex_handle_3<ForwardIterator> Traits;
+    typedef Euclidean_distance_vertex_handle_3<ForwardIterator> KDistance;
+    typedef Orthogonal_k_neighbor_search<Traits,KDistance> Neighbor_search;
+    typedef typename Neighbor_search::Tree Tree;
+    typedef typename Neighbor_search::iterator Search_iterator;
+
+    // Riemannian_graph types
+    typedef internal::Riemannian_graph<ForwardIterator> Riemannian_graph;
+    typedef typename boost::property_map<Riemannian_graph, boost::edge_weight_t>::type Riemannian_graph_weight_map;
+
+    // Precondition: at least one element in the container.
+    CGAL_point_set_processing_precondition(first != beyond);
+
+    // Precondition: at least 2 nearest neighbors
+    CGAL_point_set_processing_precondition(k >= 2);
+
+    // Number of input points
+    const std::size_t num_input_points = distance(first, beyond);
+
+    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Creates KD-tree\n");
+
+    // Instanciate a KD-tree search.
+    // Notes: We have to wrap each input point by a Point_vertex_handle_3.
+    //        The KD-tree is allocated dynamically to recover RAM as soon as possible.
+    std::vector<Point_vertex_handle_3> kd_tree_points; kd_tree_points.reserve(num_input_points);
+    for (ForwardIterator it = first; it != beyond; it++)
+    {
+        
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        Point point = get(point_pmap, it);
+#else
+        Point point = get(point_pmap, *it);
+#endif  
+        Point_vertex_handle_3 point_wrapper(point.x(), point.y(), point.z(), it);
+        kd_tree_points.push_back(point_wrapper);
+    }
+    boost::shared_ptr<Tree> tree( new Tree(kd_tree_points.begin(), kd_tree_points.end()) );
+
+    // Recover RAM
+    kd_tree_points.clear();
+
+    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Creates Riemannian Graph\n");
+
+    // Iterates over input points and creates Riemannian Graph:
+    // - vertices are numbered like the input points index.
+    // - vertices contain the corresponding input point iterator.
+    // - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
+    //   or vertex j is in the k-neighborhood of vertex i.
+    Riemannian_graph riemannian_graph;
+    //
+    // add vertices
+    for (ForwardIterator it = first; it != beyond; it++)
+    {
+        typename Riemannian_graph::vertex_descriptor v = add_vertex(riemannian_graph);
+        CGAL_point_set_processing_assertion(v == get(index_pmap,it));
+        riemannian_graph[v].input_point = it;
+    }
+    //
+    // add edges
+    Riemannian_graph_weight_map riemannian_graph_weight_map = get(boost::edge_weight, riemannian_graph);
+    for (ForwardIterator it = first; it != beyond; it++)
+    {
+        std::size_t it_index = get(index_pmap,it);
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        Vector it_normal_vector = get(normal_pmap,it);
+#else
+        Vector it_normal_vector = get(normal_pmap,*it);
+#endif  
+        
+        // Gather set of (k+1) neighboring points.
+        // Perform k+1 queries (as in point set, the query point is
+        // output first). Search may be aborted if k is greater
+        // than number of input points.
+        
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+        Point point = get(point_pmap, it);
+#else
+        Point point = get(point_pmap, *it);
+#endif  
+        Point_vertex_handle_3 point_wrapper(point.x(), point.y(), point.z(), it);
+        Neighbor_search search(*tree, point_wrapper, k+1);
+        Search_iterator search_iterator = search.begin();
+        for(std::size_t i=0;i<(k+1);i++)
+        {
+            if(search_iterator == search.end())
+                break; // premature ending
+
+            ForwardIterator neighbor = search_iterator->first;
+            std::size_t neighbor_index = get(index_pmap,neighbor);
+            if (neighbor_index > it_index) // undirected graph
+            {
+                // Add edge
+                typename boost::graph_traits<Riemannian_graph>::edge_descriptor e;
+                bool inserted;
+                boost::tie(e, inserted) = add_edge(vertex(it_index, riemannian_graph),
+                                                   vertex(neighbor_index, riemannian_graph),
+                                                   riemannian_graph);
+                CGAL_point_set_processing_assertion(inserted);
+
+                //                               ->        ->
+                // Computes edge weight = 1 - | normal1 * normal2 |
+                // where normal1 and normal2 are the normal at the edge extremities.
+                
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+                Vector neighbor_normal_vector = get(normal_pmap,neighbor);
+#else
+                Vector neighbor_normal_vector = get(normal_pmap,*neighbor);
+#endif  
+                double weight = 1.0 - std::abs(it_normal_vector * neighbor_normal_vector);
+                if (weight < 0)
+                    weight = 0; // safety check
+                riemannian_graph_weight_map[e] = (float)weight;
+            }
+
+            search_iterator++;
+        }
+    }
+
+    return riemannian_graph;
+}
+
+/// Computes Minimum Spanning Tree and store it in a Boost graph:
+/// - vertices are numbered like the input points index.
+/// - vertices contain the corresponding input point iterator.
+/// - we add the edge (predecessor[i], i) for each element of the MST.
+///
+/// \pre Normals must be unit vectors.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam IndexPMap is a model of `ReadablePropertyMap` with an integral value_type.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = Point_3<Kernel>.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with a value_type = Vector_3<Kernel>.
+/// @tparam Kernel Geometric traits class.
+///
+/// @return the MST graph.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename IndexPMap,
+          typename Kernel
+>
+MST_graph<ForwardIterator, NormalPMap, Kernel>
+create_mst_graph(
+    ForwardIterator first,  ///< iterator over the first input point.
+    ForwardIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3
+    IndexPMap index_pmap, ///< property map ForwardIterator -> index
+    unsigned int k, ///< number of neighbors
+    const Kernel& kernel, ///< geometric traits.
+    const Riemannian_graph<ForwardIterator>& riemannian_graph, ///< graph connecting each vertex to its knn
+    ForwardIterator source_point) ///< source point (with an oriented normal)
+{
+    // prevents warnings
+    CGAL_USE(point_pmap);
+    CGAL_USE(k);
+    CGAL_USE(kernel);
+
+    // Bring private stuff to scope
+    using namespace internal;
+
+    // Riemannian_graph types
+    typedef internal::Riemannian_graph<ForwardIterator> Riemannian_graph;
+    typedef typename boost::property_map<Riemannian_graph, boost::edge_weight_t>::const_type Riemannian_graph_weight_map;
+
+    // MST_graph types
+    typedef internal::MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
+
+    // Precondition: at least one element in the container.
+    CGAL_point_set_processing_precondition(first != beyond);
+
+    // Number of input points
+    const std::size_t num_input_points = num_vertices(riemannian_graph);
+
+    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Calls boost::prim_minimum_spanning_tree()\n");
+
+    // Computes Minimum Spanning Tree.
+    std::size_t source_point_index = get(index_pmap, source_point);
+    Riemannian_graph_weight_map riemannian_graph_weight_map = get(boost::edge_weight, riemannian_graph);
+    typedef std::vector<typename Riemannian_graph::vertex_descriptor> PredecessorMap;
+    PredecessorMap predecessor(num_input_points);
+    boost::prim_minimum_spanning_tree(riemannian_graph, &predecessor[0],
+                                      weight_map( riemannian_graph_weight_map )
+                                     .root_vertex( vertex(source_point_index, riemannian_graph) ));
+
+    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Creates MST Graph\n");
+
+    // Converts predecessor map to a MST graph:
+    // - vertices are numbered like the input points index.
+    // - vertices contain the corresponding input point iterator.
+    // - we add the edge (predecessor[i], i) for each element of the predecessor map.
+    MST_graph mst_graph(normal_pmap);
+    //
+    // Add vertices. source_point is the unique point marked "oriented".
+    for (ForwardIterator it = first; it != beyond; it++)
+    {
+        // With C++11, the following line triggers a bug in Boost versions
+        // 1.56 and 1.57:
+        //   https://svn.boost.org/trac/boost/ticket/10382
+        typename MST_graph::vertex_descriptor v = add_vertex(mst_graph);
+        CGAL_point_set_processing_assertion(v == get(index_pmap,it));
+        mst_graph[v].input_point = it;
+        mst_graph[v].is_oriented = (it == source_point);
+    }
+    // add edges
+    for (std::size_t i=0; i < predecessor.size(); i++) // add edges
+    {
+        if (i != predecessor[i])
+        {
+            // check that bi-directed graph is useless
+            CGAL_point_set_processing_assertion(predecessor[predecessor[i]] != i);
+
+            add_edge(vertex(predecessor[i], mst_graph),
+                     vertex(i,     mst_graph),
+                     mst_graph);
+        }
+    }
+
+    return mst_graph;
+}
+
+} /* namespace internal */
+/// \endcond
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// Orients the normals of the `[first, beyond)` range of points using the propagation
+/// of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
+///
+/// This method modifies the order of input points so as to pack all sucessfully oriented points first,
+/// and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
+/// For this reason it should not be called on sorted containers.
+/// \warning This function may fail when Boost version 1.54 is used,
+/// because of the following bug: https://svn.boost.org/trac/boost/ticket/9012
+///
+/// \pre Normals must be unit vectors
+/// \pre `k >= 2`
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type  `Point_3<Kernel>`.
+///        It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `ReadWritePropertyMap` with value type `Vector_3<Kernel>` .
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+///
+/// @return iterator over the first point with an unoriented normal.
+
+// This variant requires all parameters.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+ForwardIterator
+mst_orient_normals(
+    ForwardIterator first,  ///< iterator over the first input point.
+    ForwardIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+    unsigned int k, ///< number of neighbors
+    const Kernel& kernel) ///< geometric traits.
+{
+    CGAL_TRACE("Calls mst_orient_normals()\n");
+
+    // Bring private stuff to scope
+    using namespace internal;
+
+    // Input points types
+    typedef typename std::iterator_traits<ForwardIterator>::value_type Enriched_point; // actual type of input points
+    // Property map ForwardIterator -> index
+    typedef Index_property_map<ForwardIterator> IndexPMap;
+
+    // Riemannian_graph types
+    typedef Riemannian_graph<ForwardIterator> Riemannian_graph;
+
+    // MST_graph types
+    typedef MST_graph<ForwardIterator, NormalPMap, Kernel> MST_graph;
+
+    // Precondition: at least one element in the container.
+    CGAL_point_set_processing_precondition(first != beyond);
+
+    // Precondition: at least 2 nearest neighbors
+    CGAL_point_set_processing_precondition(k >= 2);
+
+    std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Create Index_property_map\n");
+
+    // Create a property map Iterator -> index.
+    // - if ForwardIterator is a random access iterator (typically vector and deque),
+    // get() just calls std::distance() and is very efficient;
+    // - else, the property map allocates a std::map to store indices
+    // and get() requires a lookup in the map.
+    IndexPMap index_pmap(first, beyond);
+
+    // Orients the normal of the point with maximum Z towards +Z axis.
+    ForwardIterator source_point
+      = mst_find_source(first, beyond,
+                        point_pmap, normal_pmap,
+                        kernel);
+
+    // Iterates over input points and creates Riemannian Graph:
+    // - vertices are numbered like the input points index.
+    // - vertices are empty.
+    // - we add the edge (i, j) if either vertex i is in the k-neighborhood of vertex j,
+    //   or vertex j is in the k-neighborhood of vertex i.
+    Riemannian_graph riemannian_graph
+      = create_riemannian_graph(first, beyond,
+                                point_pmap, normal_pmap, index_pmap,
+                                k,
+                                kernel);
+
+    // Creates a Minimum Spanning Tree starting at source_point
+    MST_graph mst_graph = create_mst_graph(first, beyond,
+                                           point_pmap, normal_pmap, index_pmap,
+                                           k,
+                                           kernel,
+                                           riemannian_graph,
+                                           source_point);
+
+    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("  Calls boost::breadth_first_search()\n");
+
+    // Traverse the point set along the MST to propagate source_point's orientation
+    Propagate_normal_orientation<ForwardIterator, NormalPMap, Kernel> orienter;
+    std::size_t source_point_index = get(index_pmap, source_point);
+    boost::breadth_first_search(mst_graph,
+                                vertex(source_point_index, mst_graph), // source
+                                visitor(boost::make_bfs_visitor(orienter)));
+
+    // Copy points with robust normal orientation to oriented_points[], the others to unoriented_points[].
+    std::deque<Enriched_point> oriented_points, unoriented_points;
+    for (ForwardIterator it = first; it != beyond; it++)
+    {
+        std::size_t it_index = get(index_pmap,it);
+        typename MST_graph::vertex_descriptor v = vertex(it_index, mst_graph);
+        if (mst_graph[v].is_oriented)
+          oriented_points.push_back(*it);
+        else
+          unoriented_points.push_back(*it);
+    }
+
+    // Replaces [first, beyond) range by the content of oriented_points[], then unoriented_points[].
+    ForwardIterator first_unoriented_point =
+      std::copy(oriented_points.begin(), oriented_points.end(), first);
+    std::copy(unoriented_points.begin(), unoriented_points.end(), first_unoriented_point);
+
+    // At this stage, we have typically 0 unoriented normals if k is large enough
+    CGAL_TRACE("  => %u normals are unoriented\n", unoriented_points.size());
+
+    memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+    CGAL_TRACE("End of mst_orient_normals()\n");
+
+    return first_unoriented_point;
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+ForwardIterator
+mst_orient_normals(
+    ForwardIterator first,  ///< iterator over the first input point.
+    ForwardIterator beyond, ///< past-the-end iterator over the input points.
+    PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+    unsigned int k) ///< number of neighbors
+{
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename Kernel_traits<Point>::Kernel Kernel;
+    return mst_orient_normals(
+      first,beyond,
+      point_pmap,
+      normal_pmap,
+      k,
+      Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename ForwardIterator,
+          typename NormalPMap
+>
+ForwardIterator
+mst_orient_normals(
+    ForwardIterator first,  ///< iterator over the first input point.
+    ForwardIterator beyond, ///< past-the-end iterator over the input points.
+    NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+    unsigned int k) ///< number of neighbors
+{
+    return mst_orient_normals(
+      first,beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      make_dereference_property_map(first),
+#else
+      make_identity_property_map(
+      typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+      normal_pmap,
+      k);
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_MST_ORIENT_NORMALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/multiset_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/multiset_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/multiset_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/multiset_assertions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/mutex.h b/3rdparty/CGAL-4.8/include/CGAL/mutex.h
new file mode 100644
index 0000000..a7d0454
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/mutex.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2016 GeometryFactory (France)
+//  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+
+#ifndef CGAL_MUTEX_H
+#define CGAL_MUTEX_H
+
+#include <CGAL/config.h>
+
+#ifdef CGAL_HAS_THREADS
+#ifdef CGAL_CAN_USE_CXX11_MUTEX
+#include <mutex>
+#define CGAL_MUTEX std::mutex
+#define CGAL_SCOPED_LOCK(M) std::unique_lock<std::mutex> scoped_lock(M)
+#else
+#include <boost/thread/mutex.hpp>
+#define CGAL_MUTEX boost::mutex
+#define CGAL_SCOPED_LOCK(M) boost::mutex::scoped_lock scoped_lock(M)
+#endif
+#endif
+#endif // CGAL_MUTEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/natural_neighbor_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/natural_neighbor_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/natural_neighbor_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/natural_neighbor_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/natural_neighbor_coordinates_3.h b/3rdparty/CGAL-4.8/include/CGAL/natural_neighbor_coordinates_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/natural_neighbor_coordinates_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/natural_neighbor_coordinates_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/nearest_neighbor_delaunay_2.h b/3rdparty/CGAL-4.8/include/CGAL/nearest_neighbor_delaunay_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/nearest_neighbor_delaunay_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/nearest_neighbor_delaunay_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/normal_vector_newell_3.h b/3rdparty/CGAL-4.8/include/CGAL/normal_vector_newell_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/normal_vector_newell_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/normal_vector_newell_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/number_type_basic.h b/3rdparty/CGAL-4.8/include/CGAL/number_type_basic.h
new file mode 100644
index 0000000..886ba27
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/number_type_basic.h
@@ -0,0 +1,80 @@
+// Copyright (c) 1999,2007  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stefan Schirra, Michael Hemmer
+
+
+#ifndef CGAL_NUMBER_TYPE_BASIC_H
+#define CGAL_NUMBER_TYPE_BASIC_H
+
+#include <CGAL/number_type_config.h>
+
+#include <CGAL/basic.h>
+
+// basic tools needed in several files
+#include <boost/type_traits/is_same.hpp>
+#include <functional>
+
+#include <CGAL/Quotient_fwd.h>
+
+#include <CGAL/Kernel/mpl.h>      // First_if_different
+#include <CGAL/enum.h>            // CGAL::Sign etc.
+#include <CGAL/tags.h>            // Tag_true / Tag_false
+
+#include <CGAL/Coercion_traits.h>
+#include <CGAL/Algebraic_structure_traits.h>
+#include <CGAL/Real_embeddable_traits.h>
+
+#include <CGAL/Fraction_traits.h>
+#include <CGAL/Rational_traits.h>
+
+#include <CGAL/Scalar_factor_traits.h>       // not part of CGAL 3.3
+#include <CGAL/Algebraic_extension_traits.h> // not part of CGAL 3.3 
+
+#include <CGAL/Needs_parens_as_product.h>
+
+#include <CGAL/utils_classes.h>
+#include <CGAL/utils.h>
+#include <CGAL/FPU.h>
+#include <CGAL/float.h>
+#include <CGAL/double.h>
+#include <CGAL/long_double.h>
+
+#include <CGAL/Interval_nt.h> // needed by To_interval(long double), To_interval(long), To_interval(long long)
+
+#include <CGAL/int.h>
+#ifdef CGAL_USE_LONG_LONG
+#include <CGAL/long_long.h>
+#endif
+
+
+
+#ifdef CGAL_USE_GMP
+#ifdef CGAL_USE_GMPXX
+#include <CGAL/gmpxx.h>
+#endif // CGAL_USE_GMPXX
+#endif // CGAL_USE_GMP
+
+#include <CGAL/number_utils.h>
+#include <CGAL/number_utils_classes.h>
+
+#endif // CGAL_NUMBER_TYPE_BASIC_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/number_type_config.h b/3rdparty/CGAL-4.8/include/CGAL/number_type_config.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/number_type_config.h
rename to 3rdparty/CGAL-4.8/include/CGAL/number_type_config.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/number_utils.h b/3rdparty/CGAL-4.8/include/CGAL/number_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/number_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/number_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/number_utils_classes.h b/3rdparty/CGAL-4.8/include/CGAL/number_utils_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/number_utils_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/number_utils_classes.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/odt_optimize_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/odt_optimize_mesh_3.h
new file mode 100644
index 0000000..f558dee
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/odt_optimize_mesh_3.h
@@ -0,0 +1,107 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : odt_optimize_mesh_3 function definition.
+//******************************************************************************
+
+#ifndef CGAL_ODT_OPTIMIZE_MESH_3_H
+#define CGAL_ODT_OPTIMIZE_MESH_3_H
+
+
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/Mesh_3/Mesh_global_optimizer.h>
+#include <CGAL/Mesh_3/Odt_move.h>
+#include <CGAL/Mesh_3/Mesh_sizing_field.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h>
+#include <CGAL/internal/Mesh_3/check_weights.h>
+
+namespace CGAL {
+  
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (Mesh_optimization_return_code),
+  odt_optimize_mesh_3,
+  parameters::tag,
+  (required (in_out(c3t3),*) (domain,*) )
+  (optional
+    (time_limit_, *, 0 )
+    (max_iteration_number_, *, 0 )
+    (convergence_, *, parameters::default_values::odt_convergence_ratio )
+    (freeze_bound_, *, parameters::default_values::odt_freeze_ratio )
+    (do_freeze_, *, parameters::default_values::do_freeze ))
+)
+{
+  return odt_optimize_mesh_3_impl(c3t3, domain,
+                                  time_limit_, max_iteration_number_,
+                                  convergence_, freeze_bound_
+                                  , do_freeze_ );
+} 
+CGAL_PRAGMA_DIAG_POP
+
+
+template <typename C3T3, typename MeshDomain> 
+Mesh_optimization_return_code
+odt_optimize_mesh_3_impl(C3T3& c3t3,
+                         const MeshDomain& domain,
+                         const double time_limit,
+                         std::size_t max_iteration_number,
+                         const double convergence,
+                         const double freeze_ratio,
+                         const bool do_freeze )
+{
+  CGAL_precondition(
+    !internal::Mesh_3::has_non_protecting_weights(c3t3.triangulation(), domain));
+
+  typedef typename C3T3::Triangulation  Tr;
+  
+  typedef Mesh_3::Mesh_sizing_field<Tr>             Sizing;
+  typedef typename Mesh_3::Odt_move<C3T3,Sizing>    Move;
+  
+  typedef typename
+    Mesh_3::Mesh_global_optimizer<C3T3,MeshDomain,Move> Odt_optimizer;
+
+  // Create optimizer
+  Odt_optimizer opt(c3t3,
+                    domain,
+                    freeze_ratio,
+                    do_freeze,
+                    convergence);
+  
+  // Set max time
+  opt.set_time_limit(time_limit);
+  
+  // 1000 iteration max to avoid infinite loops
+  if ( 0 == max_iteration_number )
+    max_iteration_number = 1000;
+  
+  // Launch optimization
+  return opt(static_cast<int>(max_iteration_number));
+}
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_ODT_OPTIMIZE_MESH_3_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/offset_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/offset_polygon_2.h
new file mode 100644
index 0000000..0af6372
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/offset_polygon_2.h
@@ -0,0 +1,162 @@
+// Copyright (c) 2006  Tel-Aviv University (Israel).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : Ron Wein   <wein_r at yahoo.com>
+
+#ifndef CGAL_OFFSET_POLYGON_H
+#define CGAL_OFFSET_POLYGON_H
+
+#include <CGAL/Minkowski_sum_2/Exact_offset_base_2.h>
+#include <CGAL/Minkowski_sum_2/Offset_conv_2.h>
+#include <CGAL/Minkowski_sum_2/Offset_decomp_2.h>
+
+namespace CGAL {
+
+/*!
+ * Compute the offset of a given simple polygon by a given radius,
+ * using the convolution method.
+ * Note that as the input polygon may not be convex, its offset may not be
+ * simply connected. The result is therefore represented as a polygon with
+ * holes.
+ * \param pgn The polygon.
+ * \param r The offset radius.
+ * \return The offset polygon.
+ */
+template <class ConicTraits, class Container>
+typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+offset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
+                                  Container>& pgn,
+                  const typename ConicTraits::Rat_kernel::FT& r,
+                  const ConicTraits& )
+{
+  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
+  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
+  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
+
+  Base                                               base;
+  Exact_offset_2                                     exact_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  exact_offset (pgn, r,
+                offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Compute the offset of a given polygon with holes by a given radius,
+ * using the convolution method.
+ * The result is represented as a polygon with holes whose edges are line
+ * segments and circular arcs.
+ * \param pwh The polygon with holes.
+ * \param r The offset radius.
+ * \pre The polygon is bounded (has a valid outer boundary).
+ * \return The offset polygon.
+ */
+template <class ConicTraits, class Container>
+typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+offset_polygon_2 (const Polygon_with_holes_2<typename ConicTraits::Rat_kernel,
+                                             Container>& pwh,
+                  const typename ConicTraits::Rat_kernel::FT& r,
+                  const ConicTraits& )
+{
+  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
+  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
+  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
+
+  Base                                               base;
+  Exact_offset_2                                     exact_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  exact_offset (pwh, r,
+                offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Compute the offset of a given simple polygon by a given radius,
+ * by decomposing it to convex sub-polygons and computing the union of their
+ * offsets.
+ * Note that as the input polygon may not be convex, its offset may not be
+ * simply connected. The result is therefore represented as a polygon with
+ * holes.
+ * \param pgn The polygon.
+ * \param r The offset radius.
+ * \param decomp A functor for decomposing polygons.
+ * \return The offset polygon.
+ */
+template <class ConicTraits, class Container, class DecompositionStrategy>
+typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+offset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
+                                  Container>& pgn,
+                  const typename ConicTraits::Rat_kernel::FT& r,
+                  const DecompositionStrategy&,
+                  const ConicTraits& )
+{
+  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
+  typedef Offset_by_decomposition_2<Base, DecompositionStrategy>
+                                                             Exact_offset_2;
+  typedef typename Exact_offset_2::Offset_polygon_2          Offset_polygon_2;
+
+  Base                                               base;
+  Exact_offset_2                                     exact_offset (base);
+  Offset_polygon_2                                   offset_bound;
+  std::list<Offset_polygon_2>                        offset_holes;
+
+  exact_offset (pgn, r,
+                offset_bound, std::back_inserter(offset_holes));
+
+  return (typename Gps_traits_2<ConicTraits>::Polygon_with_holes_2
+          (offset_bound, offset_holes.begin(), offset_holes.end()));
+}
+
+/*!
+ * Compute the inset of a given simple polygon by a given radius, using the
+ * convolution method.
+ * Note that as the input polygon may not be convex, its inset may not be
+ * simply connected. The result is therefore represented as a set of polygons.
+ * \param pgn The polygon.
+ * \param r The inset radius.
+ * \param oi An output iterator for the inset polygons.
+ *           Its value-type must be Gps_traits_2<ConicTraits>::Polygon_2.
+ * \return A past-the-end iterator for the inset polygons.
+ */
+template <class ConicTraits, class Container, class OutputIterator>
+OutputIterator
+inset_polygon_2 (const Polygon_2<typename ConicTraits::Rat_kernel,
+                                 Container>& pgn,
+                 const typename ConicTraits::Rat_kernel::FT& r,
+                 const ConicTraits& ,
+                 OutputIterator oi)
+{
+  typedef Exact_offset_base_2<ConicTraits, Container>        Base;
+  typedef Offset_by_convolution_2<Base>                      Exact_offset_2;
+
+  Base                                               base;
+  Exact_offset_2                                     exact_offset (base);
+
+  oi = exact_offset.inset (pgn, r,
+                           oi);
+
+  return (oi);
+}
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/optimize_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/optimize_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/optimize_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/optimize_mesh_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/parameterize.h b/3rdparty/CGAL-4.8/include/CGAL/parameterize.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/parameterize.h
rename to 3rdparty/CGAL-4.8/include/CGAL/parameterize.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/partition_2.h b/3rdparty/CGAL-4.8/include/CGAL/partition_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/partition_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/partition_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/partition_is_valid_2.h b/3rdparty/CGAL-4.8/include/CGAL/partition_is_valid_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/partition_is_valid_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/partition_is_valid_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/pca_estimate_normals.h b/3rdparty/CGAL-4.8/include/CGAL/pca_estimate_normals.h
new file mode 100644
index 0000000..d633cd7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/pca_estimate_normals.h
@@ -0,0 +1,317 @@
+// Copyright (c) 2007-09  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Pierre Alliez and Laurent Saboret
+
+#ifndef CGAL_PCA_ESTIMATE_NORMALS_H
+#define CGAL_PCA_ESTIMATE_NORMALS_H
+
+#include <CGAL/trace.h>
+#include <CGAL/Dimension.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/linear_least_squares_fitting_3.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Memory_sizer.h>
+
+#include <iterator>
+#include <list>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#include <tbb/scalable_allocator.h>  
+#endif // CGAL_LINKED_WITH_TBB
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+namespace internal {
+
+
+/// Estimates normal direction using linear least
+/// squares fitting of a plane on the K nearest neighbors.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree KD-tree.
+///
+/// @return Computed normal. Orientation is random.
+template < typename Kernel,
+           typename Tree
+>
+typename Kernel::Vector_3
+pca_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute the normal at
+                    const Tree& tree, ///< KD-tree
+                    unsigned int k) ///< number of neighbors
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3  Point;
+  typedef typename Kernel::Plane_3  Plane;
+
+  // types for K nearest neighbors search
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::iterator Search_iterator;
+
+  // Gather set of (k+1) neighboring points.
+  // Perform k+1 queries (as in point set, the query point is
+  // output first). Search may be aborted if k is greater
+  // than number of input points.
+  std::vector<Point> points; points.reserve(k+1);
+  Neighbor_search search(tree,query,k+1);
+  Search_iterator search_iterator = search.begin();
+  unsigned int i;
+  for(i=0;i<(k+1);i++)
+  {
+    if(search_iterator == search.end())
+      break; // premature ending
+    points.push_back(search_iterator->first);
+    search_iterator++;
+  }
+  CGAL_point_set_processing_precondition(points.size() >= 1);
+
+  // performs plane fitting by point-based PCA
+  Plane plane;
+  linear_least_squares_fitting_3(points.begin(),points.end(),plane,Dimension_tag<0>());
+
+  // output normal vector (already normalized by PCA)
+  return plane.orthogonal_vector();
+}
+
+
+#ifdef CGAL_LINKED_WITH_TBB
+  template <typename Kernel, typename Tree>
+  class PCA_estimate_normals {
+    typedef typename Kernel::Point_3 Point;
+    typedef typename Kernel::Vector_3 Vector;
+    const Tree& tree;
+    const unsigned int k;
+    const std::vector<Point>& input;
+    std::vector<Vector>& output;
+
+  public:
+    PCA_estimate_normals(Tree& tree, unsigned int k, std::vector<Point>& points,
+			 std::vector<Vector>& output)
+      : tree(tree), k (k), input (points), output (output)
+    { }
+    
+    void operator()(const tbb::blocked_range<std::size_t>& r) const
+    {
+      for( std::size_t i = r.begin(); i != r.end(); ++i)
+	output[i] = CGAL::internal::pca_estimate_normal<Kernel,Tree>(input[i], tree, k);
+    }
+
+  };
+#endif // CGAL_LINKED_WITH_TBB
+  
+
+} /* namespace internal */
+/// \endcond
+
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// Estimates normal directions of the `[first, beyond)` range of points
+/// by linear least squares fitting of a plane over the k nearest neighbors.
+/// The output normals are randomly oriented.
+///
+/// \pre `k >= 2`
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
+///        It can be omitted if the value type of  `ForwardIterator` is convertible to `Point_3<Kernel>`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type  `Vector_3<Kernel>`.
+/// @tparam Kernel Geometric traits class.
+///        It can be omitted and deduced automatically from the value type of `PointPMap`.
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap,
+          typename Kernel
+>
+void
+pca_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k, ///< number of neighbors.
+  const Kernel& /*kernel*/) ///< geometric traits.
+{
+  CGAL_TRACE("Calls pca_estimate_normals()\n");
+
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+
+  // Input points types
+  typedef typename boost::property_traits<NormalPMap>::value_type Vector;
+
+  // types for K nearest neighbors search structure
+  typedef typename CGAL::Search_traits_3<Kernel> Tree_traits;
+  typedef typename CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Tree;
+
+  // precondition: at least one element in the container.
+  // to fix: should have at least three distinct points
+  // but this is costly to check
+  CGAL_point_set_processing_precondition(first != beyond);
+
+  // precondition: at least 2 nearest neighbors
+  CGAL_point_set_processing_precondition(k >= 2);
+
+  std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("  Creates KD-tree\n");
+
+  ForwardIterator it;
+
+  // Instanciate a KD-tree search.
+  // Note: We have to convert each input iterator to Point_3.
+  std::vector<Point> kd_tree_points; 
+  for(it = first; it != beyond; it++)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    Point point = get(point_pmap, it);
+#else
+    Point point = get(point_pmap, *it);
+#endif  
+    kd_tree_points.push_back(point);
+  }
+  Tree tree(kd_tree_points.begin(), kd_tree_points.end());
+
+  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("  Computes normals\n");
+
+  // iterate over input points, compute and output normal
+  // vectors (already normalized)
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+  if (boost::is_convertible<Concurrency_tag,Parallel_tag>::value)
+    {
+      std::vector<Vector> normals (kd_tree_points.size ());
+      CGAL::internal::PCA_estimate_normals<Kernel, Tree>
+	f (tree, k, kd_tree_points, normals);
+      tbb::parallel_for(tbb::blocked_range<size_t>(0, kd_tree_points.size ()), f);
+      unsigned int i = 0;
+      for(it = first; it != beyond; ++ it, ++ i)
+	{
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	  put (normal_pmap, it, normals[i]);
+#else
+	  put (normal_pmap, *it, normals[i]);
+#endif  
+	}
+    }
+  else
+#endif
+    {
+      for(it = first; it != beyond; it++)
+	{
+	  Vector normal = internal::pca_estimate_normal<Kernel,Tree>(      
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+								     get(point_pmap,it),
+#else
+								     get(point_pmap,*it),
+#endif  
+								     tree,
+								     k);
+
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+	  put(normal_pmap, it, normal); // normal_pmap[it] = normal
+#else
+	  put(normal_pmap, *it, normal); // normal_pmap[it] = normal
+#endif 
+	}
+    }
+   
+  memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE("  %ld Mb allocated\n", memory>>20);
+  CGAL_TRACE("End of pca_estimate_normals()\n");
+}
+  
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the point property map.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename PointPMap,
+          typename NormalPMap
+>
+void
+pca_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k) ///< number of neighbors.
+{
+  typedef typename boost::property_traits<PointPMap>::value_type Point;
+  typedef typename Kernel_traits<Point>::Kernel Kernel;
+  pca_estimate_normals<Concurrency_tag>(
+    first,beyond,
+    point_pmap,
+    normal_pmap,
+    k,
+    Kernel());
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map.
+template <typename Concurrency_tag,
+	  typename ForwardIterator,
+          typename NormalPMap
+>
+void
+pca_estimate_normals(
+  ForwardIterator first,  ///< iterator over the first input point.
+  ForwardIterator beyond, ///< past-the-end iterator over the input points.
+  NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+  unsigned int k) ///< number of neighbors.
+{
+  pca_estimate_normals<Concurrency_tag>(
+    first,beyond,
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    make_dereference_property_map(first),
+#else
+    make_identity_property_map(
+    typename std::iterator_traits<ForwardIterator>::value_type()),
+#endif
+    normal_pmap,
+    k);
+}
+/// @endcond
+
+
+} //namespace CGAL
+
+#endif // CGAL_PCA_ESTIMATE_NORMALS_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/periodic_3_triangulation_3_io.h b/3rdparty/CGAL-4.8/include/CGAL/periodic_3_triangulation_3_io.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/periodic_3_triangulation_3_io.h
rename to 3rdparty/CGAL-4.8/include/CGAL/periodic_3_triangulation_3_io.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/perturb_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/perturb_mesh_3.h
new file mode 100644
index 0000000..171c3c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/perturb_mesh_3.h
@@ -0,0 +1,133 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : perturb_mesh_3 function definition.
+//******************************************************************************
+
+#ifndef CGAL_PERTURB_MESH_3_H
+#define CGAL_PERTURB_MESH_3_H
+
+
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/Mesh_3/sliver_criteria.h>
+#include <CGAL/Mesh_3/Sliver_perturber.h>
+#include <CGAL/Mesh_optimization_return_code.h>
+#include <CGAL/Mesh_3/parameters_defaults.h>
+#include <CGAL/internal/Mesh_3/check_weights.h>
+#include <vector>
+#include <CGAL/use.h>
+
+namespace CGAL {
+
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (Mesh_optimization_return_code),
+  perturb_mesh_3,
+  parameters::tag,
+  (required (in_out(c3t3),*) (domain,*) )
+  (optional
+    (time_limit_, *, 0 )
+    (sliver_bound_, *, parameters::default_values::perturb_sliver_bound )
+    (sliver_criterion_, *, 
+       parameters::default_values::default_sliver_criterion(c3t3,sliver_bound_))
+    (perturbation_vector_, *, 
+       default_perturbation_vector(c3t3,domain,sliver_criterion_))
+  )
+)
+{
+  CGAL_USE(sliver_bound_);
+  return perturb_mesh_3_impl(c3t3, domain, time_limit_, sliver_criterion_,
+                             perturbation_vector_);
+}
+CGAL_PRAGMA_DIAG_POP
+
+
+template <typename C3T3, 
+          typename MeshDomain, 
+          typename SliverCriterion>
+std::vector<typename Mesh_3::Sliver_perturber<C3T3,MeshDomain,SliverCriterion>::Perturbation*>
+default_perturbation_vector(const C3T3&,
+                            const MeshDomain&,
+                            const SliverCriterion&)
+{
+  typedef MeshDomain Md;
+  typedef SliverCriterion Sc;
+  typedef Mesh_3::Sliver_perturber<C3T3,Md,Sc>            Perturber;
+  typedef typename Perturber::Perturbation                Perturbation;
+
+  typedef Mesh_3::Sq_radius_perturbation<C3T3,Md,Sc>      Sq_radius;
+  typedef Mesh_3::Volume_perturbation<C3T3,Md,Sc>         Volume;
+  typedef Mesh_3::Dihedral_angle_perturbation<C3T3,Md,Sc> Dihedral_angle;
+  typedef Mesh_3::Li_random_perturbation<C3T3,Md,Sc>      Li_random;
+  
+  std::vector<Perturbation*> perturbation_vect;
+  perturbation_vect.push_back(new Sq_radius(40,0.05));
+  perturbation_vect.push_back(new Volume(40,0.05));
+  perturbation_vect.push_back(new Dihedral_angle(40,0.05));
+  perturbation_vect.push_back(new Li_random(100,0.15));
+
+  return perturbation_vect;
+}
+
+
+template <typename C3T3, 
+          typename MeshDomain, 
+          typename SliverCriterion,
+          typename PPerturbationVector> 
+Mesh_optimization_return_code
+perturb_mesh_3_impl(C3T3& c3t3,
+                    const MeshDomain& domain,
+                    const double time_limit,
+                    const SliverCriterion& sliver_criterion,
+                    const PPerturbationVector& perturbation_vector)
+{
+  CGAL_precondition(
+    !internal::Mesh_3::has_non_protecting_weights(c3t3.triangulation(), domain));
+
+  typedef MeshDomain Md;
+  typedef SliverCriterion Sc;
+  
+  typedef Mesh_3::Sliver_perturber<C3T3,Md,Sc> Perturber;
+  
+  // Build perturber
+  Perturber perturber(c3t3, domain, sliver_criterion);
+
+  // Add perturbations
+  for(std::size_t i = 0; i < perturbation_vector.size(); ++i)
+    perturber.add_perturbation( perturbation_vector[i] );
+  
+  // Set max time
+  perturber.set_time_limit(time_limit);
+ 
+  // Launch perturber
+  return perturber();
+}
+  
+  
+  
+} //namespace CGAL
+
+
+#endif // CGAL_PERTURB_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/pierce_rectangles_2.h b/3rdparty/CGAL-4.8/include/CGAL/pierce_rectangles_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/pierce_rectangles_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/pierce_rectangles_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/point_generators_2.h b/3rdparty/CGAL-4.8/include/CGAL/point_generators_2.h
new file mode 100644
index 0000000..48101f0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/point_generators_2.h
@@ -0,0 +1,547 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+//                 Pedro Machado Manhaes de Castro  <pmmc at cin.ufpe.br>
+//                 Alexandru Tifrea
+
+#ifndef CGAL_POINT_GENERATORS_2_H
+#define CGAL_POINT_GENERATORS_2_H 1
+#include <CGAL/generators.h>
+#include <iterator>
+#include <CGAL/number_type_basic.h>
+
+namespace CGAL {
+
+template < class P, class Creator = 
+                  Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_disc_2 : public Random_generator_base<P>{
+    void generate_point();
+public:
+    typedef Random_points_in_disc_2<P,Creator> This;
+    Random_points_in_disc_2( double r = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed in the open disc with radius r, i.e. |`*g'| < r .
+        // Two random numbers are needed from `rnd' for each point.
+    : Random_generator_base<P>(r, rnd) { generate_point(); }
+    This& operator++() {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_in_disc_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type T;
+    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
+    double r = this->d_range * std::sqrt( this->_rnd.get_double());
+    Creator creator;
+    this->d_item = creator( T(r * std::cos(alpha)), 
+                            T(r * std::sin(alpha)));
+}
+
+
+template < class P, class Creator = 
+                  Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT, P> >
+class Random_points_on_circle_2 : public Random_generator_base<P> {
+    void generate_point();
+public:
+    typedef Random_points_on_circle_2<P,Creator> This;
+    Random_points_on_circle_2( double r = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed on the circle with radius r, i.e. |`*g'| == r . A
+        // single random number is needed from `rnd' for each point.
+    : Random_generator_base<P>(r, rnd) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_on_circle_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type T;
+    double a = this->_rnd.get_double() * 2.0 * CGAL_PI;
+    Creator creator;
+    this->d_item = creator( T(this->d_range * std::cos(a)), 
+                            T(this->d_range * std::sin(a)));
+}
+
+
+template < class P, class Creator = 
+                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_square_2 : public Random_generator_base<P> {
+    void generate_point();
+public:
+    typedef Random_points_in_square_2<P,Creator> This;
+    Random_points_in_square_2( double a = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed in the half-open square with side length a,
+        // centered around the origin, i.e. \forall p = `*g': -\frac{a}{2}
+        // <= p.x() < \frac{a}{2} and -\frac{a}{2} <= p.y() < \frac{a}{2}
+        // . Two random numbers are needed from `rnd' for each point.
+    : Random_generator_base<P>( a, rnd) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_in_square_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type  T;
+    Creator creator;
+    this->d_item =
+	    creator( T(this->d_range * (2 * this->_rnd.get_double() - 1.0)),
+                     T(this->d_range * (2 * this->_rnd.get_double() - 1.0)));
+}
+
+
+template < class P, class Creator = 
+                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_on_square_2 : public Random_generator_base<P> {
+    void generate_point();
+public:
+    typedef Random_points_on_square_2<P,Creator> This;
+    Random_points_on_square_2( double a = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed on the boundary of the square with side length a,
+        // centered around the origin, i.e. \forall p = `*g': one
+        // coordinate is either \frac{a}{2} or -\frac{a}{2} and for the
+        // other coordinate c holds -\frac{a}{2} <= c < \frac{a}{2} . A
+        // single random number is needed from `rnd' for each point.
+    : Random_generator_base<P>( a, rnd)  { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_on_square_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type  T;
+    double d = this->_rnd.get_double() * 4.0;
+    int    k = int(d);
+    d = this->d_range * (2 * (d - k) - 1.0);
+    CGAL_assertion( - this->d_range <= d && d < this->d_range);
+    Creator creator;
+    switch (k) {
+    case 0:
+        this->d_item = creator(              T(d), T(-this->d_range));
+        break;
+    case 1:
+        this->d_item = creator(              T(d),  T(this->d_range));
+        break;
+    case 2:
+        this->d_item = creator( T(-this->d_range),        T(d));
+        break;
+    case 3:
+        this->d_item = creator( T( this->d_range),        T(d));
+        break;
+    }
+}
+
+
+template < class P, class Creator = 
+                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_iso_rectangle_2 : public Random_generator_base<P> {
+  double left, right, top, bottom;
+    void generate_point();
+public:
+    typedef Random_points_in_iso_rectangle_2<P,Creator> This;
+    Random_points_in_iso_rectangle_2( const P&p, const P& q, Random& rnd = CGAL::get_default_random())
+      : Random_generator_base<P>( 1.0 , rnd)
+  {
+    left = (std::min)(to_double(p.x()), to_double(q.x()));
+    right = (std::max)(to_double(p.x()), to_double(q.x()));
+    top = (std::min)(to_double(p.y()), to_double(q.y()));
+    bottom = (std::max)(to_double(p.y()), to_double(q.y()));
+    generate_point(); 
+  }
+
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_in_iso_rectangle_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type  T;
+    Creator creator;
+    this->d_item =
+	    creator( T(this->_rnd.get_double(left,right)),
+                     T(this->_rnd.get_double(top,bottom)));
+}
+
+
+
+template < class P, class Creator = 
+                   Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_on_segment_2 : public Random_generator_base<P> {
+    P _p;
+    P _q;
+    void generate_point();
+public:
+    typedef Random_points_on_segment_2<P,Creator> This;
+    Random_points_on_segment_2( const P& p = P( -1, 0),
+                                const P& q = P(  1, 0),
+                                Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed on the segment from p to q except q, i.e. `*g' ==
+        // \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single
+        // random number is needed from `rnd' for each point.
+      : Random_generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
+                                              (std::max)( to_double(p.y()),
+                                                          to_double(q.y()))),
+                                  rnd) , _p(p), _q(q)
+    {
+        generate_point();
+    }
+    const P&  source() const { return _p; }
+    const P&  target() const { return _q; }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_on_segment_2<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type  T;
+    double la = this->_rnd.get_double();
+    double mu = 1.0 - la;
+    Creator creator;
+    this->d_item = creator(T(mu * to_double(_p.x()) + la * to_double(_q.x())),
+                           T(mu * to_double(_p.y()) + la * to_double(_q.y())));
+}
+
+template < class P >
+class Points_on_segment_2 : public Generator_base<P> {
+    P _p;
+    P _q;
+    std::size_t  d_i;
+    std::size_t  d_mx;
+    void generate_point();
+public:
+    typedef Points_on_segment_2<P> This;
+    Points_on_segment_2() {}
+    Points_on_segment_2( const P& p, const P& q,
+                         std::size_t mx, std::size_t i = 0)
+      : Generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
+                                       (std::max)( to_double(p.y()), to_double(q.y())))),
+        _p(p), _q(q), d_i(i), d_mx(mx) 
+    {
+        generate_point();
+    }
+    const P&  source() const { return _p; }
+    const P&  target() const { return _q; }
+    // Sufficient equality test.
+    bool operator==( const This& base) const { return ( d_i == base.d_i); }
+    bool operator!=( const This& base) const { return ! operator==(base); }
+    This& operator++()    {
+        d_i++;
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P >
+void
+Points_on_segment_2<P>::
+generate_point() { this->d_item = _p + (_q-_p) * static_cast<double>(d_i) / (static_cast<double>(d_mx)-1); }
+
+template <class OutputIterator, class Creator>
+OutputIterator
+points_on_square_grid_2( double a, std::size_t n, OutputIterator o,
+                         Creator creator)
+{
+    typedef typename Creator::argument_type T;
+    if  (n == 0)
+        return o;
+    int m = int(std::ceil(std::sqrt(static_cast<double>(n))));
+    double base = -a;  // Left and bottom boundary.
+    double step = (2*a)/(m - 1);
+    int j = 0;
+    double px = base;
+    double py = base;
+    *o++ = creator( T(px), T(py));
+    for (std::size_t i = 1; i < n; i++) {
+        j++;
+        if ( j == m) {
+            px = base;
+            py = py + step;
+            j = 0;
+        } else {
+            px = px + step;
+        }
+        *o++ = creator( T(px), T(py));
+    }
+    return o;
+}
+
+template <class OutputIterator>
+OutputIterator
+points_on_square_grid_2( double a, std::size_t n, OutputIterator o)
+{
+    typedef std::iterator_traits<OutputIterator> ITraits;
+    typedef typename ITraits::value_type         P;
+    return points_on_square_grid_2(a, n, o, 
+                Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
+}
+
+template <class P, class OutputIterator>
+OutputIterator
+points_on_segment_2( const P& p, const P& q, std::size_t n,
+                     OutputIterator o)
+    // creates n points regular spaced on the segment from p to q, i.e.
+    // \forall i: 0 <= i < n: o[i] := \frac{n-i-1}{n-1} p + \frac{i}{n-1
+    // } q.
+{
+    for (std::size_t i = 0; i < n; i++) {
+      *o++ = p + (q-p) * static_cast<typename Kernel_traits<P>::Kernel::FT>(static_cast<double>(i) / (static_cast<double>(n)-1));
+    }
+    return o;
+}
+
+template <class ForwardIterator, class Creator>
+void perturb_points_2( ForwardIterator first,
+                       ForwardIterator last,
+                       double xeps,
+                       double yeps,
+                       Random& rnd,
+                       Creator creator)
+    // perturbs the points in the range [`first',`last') by replacing
+    // each point with a random point from the rectangle `xeps' \times
+    // `yeps' centered around the original point. Two random numbers are
+    // needed from `rnd' for each point. Precondition:
+    // The expression `to_double((*first).x())' and `to_double((
+    // *begin).y())' must be legal.
+{
+    typedef typename Creator::argument_type T;
+    xeps *= 2.0;
+    yeps *= 2.0;
+    for ( ; first != last; ++first) {
+        double x = to_double( (*first).x());
+        double y = to_double( (*first).y());
+        x += xeps * (rnd.get_double() - 0.5);
+        y += yeps * (rnd.get_double() - 0.5);
+        *first = creator( T(x), T(y));
+    }
+}
+
+template <class ForwardIterator>
+void perturb_points_2( ForwardIterator first,
+                       ForwardIterator last,
+                       double xeps,
+                       double yeps,
+                       Random& rnd)
+{
+    typedef std::iterator_traits<ForwardIterator> ITraits;
+    typedef typename ITraits::value_type          P;
+    perturb_points_2( first, last, xeps, yeps, rnd,
+                 Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
+}
+
+template <class ForwardIterator>
+inline
+void perturb_points_2( ForwardIterator first,
+                       ForwardIterator last,
+                       double xeps,
+                       Random& rnd)
+{
+    perturb_points_2( first, last, xeps, xeps, rnd);
+}
+
+template <class ForwardIterator>
+void perturb_points_2( ForwardIterator first,
+                       ForwardIterator last,
+                       double xeps,
+                       double yeps)
+{
+    perturb_points_2( first, last, xeps, yeps, CGAL::get_default_random());
+}
+
+template <class ForwardIterator>
+void perturb_points_2( ForwardIterator first,
+                       ForwardIterator last,
+                       double xeps)
+{
+    perturb_points_2( first, last, xeps, xeps, CGAL::get_default_random());
+}
+template <class RandomAccessIterator, class OutputIterator, class Creator>
+OutputIterator random_collinear_points_2(
+                       RandomAccessIterator first,
+                       RandomAccessIterator last,
+                       std::size_t n,
+                       OutputIterator first2,
+                       Random& rnd,
+                       Creator creator)
+{
+    typedef typename Creator::result_type   Point;
+    typedef typename Creator::argument_type T;
+
+    std::ptrdiff_t m = last - first;
+    for ( std::size_t i = 0; i < n; i++) {
+      const Point& p = first[ rnd.uniform_int<std::ptrdiff_t>( 0, m-1)];
+        const Point& q = first[ rnd.uniform_int<std::ptrdiff_t>( 0, m-1)];
+        double la = rnd.get_double();
+        double mu = 1.0 - la;
+        *first2++ = creator(T(mu * to_double(p.x()) +
+                              la * to_double(q.x())),
+                            T(mu * to_double(p.y()) +
+                              la * to_double(q.y())));
+    }
+    return first2;
+}
+
+template <class RandomAccessIterator, class OutputIterator>
+OutputIterator random_collinear_points_2(
+                       RandomAccessIterator first,
+                       RandomAccessIterator last,
+                       std::size_t n,
+                       OutputIterator first2,
+                       Random& rnd)
+    // choose two random points from the range [`first',`last'), create a
+    // random third point on the segment connecting this two points, and
+    // write it to `first2'. Repeat this n times, thus writing n points to
+    // `first2' that are collinear with points in the range [`first',
+    // `last'). Three random numbers are needed from `rnd' for each point.
+    // Returns the value of `first2' after inserting the n points.
+    // Precondition: The expression `to_double((*first).x()
+    // )' and `to_double((*first).y())' must be legal.
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               P;
+    return random_collinear_points_2( first, last, n, first2, rnd,
+                 Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P>());
+}
+
+template <class RandomAccessIterator, class OutputIterator>
+OutputIterator random_collinear_points_2(
+                       RandomAccessIterator first,
+                       RandomAccessIterator last,
+                       std::size_t n,
+                       OutputIterator first2)
+{
+    return  random_collinear_points_2( first, last, n, first2,
+                                       CGAL::get_default_random());
+}
+
+template < class P, class Creator = 
+Creator_uniform_2<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_triangle_2 : public Random_generator_base<P> {
+	P _p,_q,_r;
+	void generate_point();
+public:
+	typedef P result_type;
+	typedef Random_points_in_triangle_2<P> This;
+	typedef typename Kernel_traits<P>::Kernel::Triangle_2 Triangle_2;
+	Random_points_in_triangle_2() {}
+	Random_points_in_triangle_2( const This& x,Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r) {
+		generate_point();
+	}
+	Random_points_in_triangle_2( const P& p, const P& q, const P& r, Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r) {
+		generate_point();
+	}
+	Random_points_in_triangle_2( const Triangle_2& triangle,Random& rnd = default_random)
+	: Random_generator_base<P>( 1,
+			rnd),_p(triangle[0]),_q(triangle[1]),_r(triangle[2]) {
+		generate_point();
+	}
+	This& operator++() {
+		generate_point();
+		return *this;
+	}
+	This operator++(int) {
+		This tmp = *this;
+		++(*this);
+		return tmp;
+	}
+};
+	
+template<class P, class Creator >
+void Random_points_in_triangle_2<P, Creator>::generate_point() {
+	typedef typename Creator::argument_type T;
+	Creator creator;
+	double a1 = this->_rnd.get_double(0,1);
+	double a2 = this->_rnd.get_double(0,1);
+	if(a1>a2) std::swap(a1,a2);
+	double b1 = a1;
+	double b2 = a2-a1;
+	double b3 = 1.0-a2;
+	this->d_item = creator(T(to_double(_p.x())*b1+to_double(_q.x())*b2+to_double(_r.x())*b3),
+							T(to_double(_p.y())*b1+to_double(_q.y())*b2+to_double(_r.y())*b3));
+}
+
+} //namespace CGAL
+#endif // CGAL_POINT_GENERATORS_2_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/point_generators_3.h b/3rdparty/CGAL-4.8/include/CGAL/point_generators_3.h
new file mode 100644
index 0000000..5b9670c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/point_generators_3.h
@@ -0,0 +1,309 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+//                 Pedro Machado Manhaes de Castro  <pmmc at cin.ufpe.br>
+//                 Alexandru Tifrea
+
+#ifndef CGAL_POINT_GENERATORS_3_H
+#define CGAL_POINT_GENERATORS_3_H 1
+#include <CGAL/generators.h>
+#include <CGAL/point_generators_2.h>
+#include <CGAL/number_type_basic.h>
+
+namespace CGAL {
+
+template < class P, class Creator = 
+                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_sphere_3 : public Random_generator_base<P> {
+    void generate_point();
+public:
+    typedef Random_points_in_sphere_3<P,Creator> This;
+    Random_points_in_sphere_3( double r = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed in the open sphere with radius r, i.e. |`*g'| < r .
+        // Three random numbers are needed from `rnd' for each point
+    : Random_generator_base<P>( r, rnd) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_in_sphere_3<P,Creator>::
+generate_point() {
+  // A strip between z and z+dz has an area independant of z
+    typedef typename Creator::argument_type T;
+    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
+    double z     = 2 * this->_rnd.get_double() - 1.0;
+    double r     = std::sqrt( 1 - z * z);
+    r *= std::pow( this->_rnd.get_double() , 1.0/3.0 );  
+    Creator creator;
+    this->d_item = creator( T(this->d_range * r * std::cos(alpha)),
+                            T(this->d_range * r * std::sin(alpha)),
+                            T(this->d_range * z));
+}
+
+
+template < class P, class Creator = 
+                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_on_sphere_3 : public Random_generator_base<P> {
+    void generate_point();
+public:
+    typedef Random_points_on_sphere_3<P,Creator> This;
+    Random_points_on_sphere_3( double r = 1, Random& rnd = CGAL::get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed on the sphere with radius r, i.e. |`*g'| == r . A
+        // two random numbers are needed from `rnd' for each point.
+    : Random_generator_base<P>( r, rnd) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_on_sphere_3<P,Creator>::
+generate_point() {
+  // A strip between z and z+dz has an area independant of z
+    typedef typename Creator::argument_type T;
+    double alpha = this->_rnd.get_double() * 2.0 * CGAL_PI;
+    double z     = 2 * this->_rnd.get_double() - 1.0;
+    double r     = std::sqrt( 1 - z * z);
+    Creator creator;
+    this->d_item = creator( T(this->d_range * r * std::cos(alpha)),
+                            T(this->d_range * r * std::sin(alpha)),
+                            T(this->d_range * z));
+}
+
+
+template < class P, class Creator = 
+                   Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_cube_3 : public Random_generator_base<P>{
+    void generate_point();
+public:
+    typedef Random_points_in_cube_3<P,Creator> This;
+    Random_points_in_cube_3( double a = 1, Random& rnd = CGAL::get_default_random())
+    : Random_generator_base<P>( a, rnd) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P, class Creator >
+void
+Random_points_in_cube_3<P,Creator>::
+generate_point() {
+    typedef typename Creator::argument_type T;
+    Creator creator;
+    this->d_item =
+	     creator( T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)),
+                      T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)),
+                      T(this->d_range * ( 2 * this->_rnd.get_double() - 1.0)));
+}
+
+
+template <class OutputIterator, class Creator>
+OutputIterator
+points_on_cube_grid_3( double a, std::size_t n, 
+                         OutputIterator o, Creator creator)
+{
+    if  (n == 0)
+        return o;
+
+    int m = int(std::ceil(
+                  std::sqrt(std::sqrt(static_cast<double>(n)))));
+
+    while (m*m*m < int(n)) m++;
+
+    double base = -a;  // Left and bottom boundary.
+    double step = 2*a/(m-1);
+    int j = 0;
+    int k = 0;
+    double px = base;
+    double py = base;
+    double pz = base;
+    *o++ = creator( px, py, pz);
+    for (std::size_t i = 1; i < n; i++) {
+        j++;
+        if ( j == m) {
+           k++;
+           if ( k == m) {
+              py = base;
+              px = base;
+              pz = pz + step;
+              k = 0;
+           }
+           else {
+              px = base;
+              py = py + step;
+           }
+           j = 0;
+        } else {
+           px = px + step;
+        }
+        *o++ = creator( px, py, pz);
+    }
+    return o;
+}
+
+template <class OutputIterator>
+OutputIterator
+points_on_cube_grid_3( double a, std::size_t n, OutputIterator o)
+{
+    typedef std::iterator_traits<OutputIterator> ITraits;
+    typedef typename ITraits::value_type         P;
+    return points_on_square_grid_3(a, n, o, 
+                 Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P>());
+}
+
+template < class P, class Creator = 
+Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_triangle_3 : public Random_generator_base<P> {
+	P _p,_q,_r;
+	void generate_point();
+public:
+	typedef P result_type;
+	typedef Random_points_in_triangle_3<P> This;
+	typedef typename Kernel_traits<P>::Kernel::Triangle_3 Triangle_3;
+	Random_points_in_triangle_3() {}
+	Random_points_in_triangle_3( const This& x,Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r) {
+		generate_point();
+	}
+	Random_points_in_triangle_3( const P& p, const P& q, const P& r, Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r) {
+		generate_point();
+	}
+	Random_points_in_triangle_3( const Triangle_3& triangle,Random& rnd = default_random)
+	: Random_generator_base<P>( 1,
+			rnd),_p(triangle[0]),_q(triangle[1]),_r(triangle[2]) {
+		generate_point();
+	}
+	This& operator++() {
+		generate_point();
+		return *this;
+	}
+	This operator++(int) {
+		This tmp = *this;
+		++(*this);
+		return tmp;
+	}
+};
+
+
+template<class P, class Creator >
+void Random_points_in_triangle_3<P, Creator>::generate_point() {
+	typedef typename Creator::argument_type T;
+	Creator creator;
+	double a1 = this->_rnd.get_double(0,1);
+	double a2 = this->_rnd.get_double(0,1);
+	if(a1>a2) std::swap(a1,a2);
+	double b1 = a1;
+	double b2 = a2-a1;
+	double b3 = 1.0-a2;
+	T ret[3];
+	for(int i = 0; i < 3; ++i) {
+	    ret[i] = T(to_double(_p[i])*b1+to_double(_q[i])*b2+to_double(_r[i])*b3);
+	}
+	this->d_item = creator(ret[0],ret[1],ret[2]);
+}
+
+template < class P, class Creator = 
+Creator_uniform_3<typename Kernel_traits<P>::Kernel::RT,P> >
+class Random_points_in_tetrahedron_3 : public Random_generator_base<P> {
+	P _p,_q,_r,_s;
+	void generate_point();
+public:
+	typedef P result_type;
+	typedef Random_points_in_tetrahedron_3<P> This;
+	typedef typename Kernel_traits<P>::Kernel::Tetrahedron_3 Tetrahedron_3;
+	Random_points_in_tetrahedron_3() {}
+	Random_points_in_tetrahedron_3( const This& x,Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(x._p),_q(x._q),_r(x._r),_s(x._s) {
+		generate_point();
+	}
+	Random_points_in_tetrahedron_3( const P& p, const P& q, const P& r, const P& s,Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd ),_p(p),_q(q),_r(r),_s(s) {
+		generate_point();
+	}
+	Random_points_in_tetrahedron_3( const Tetrahedron_3& tetrahedron,Random& rnd = default_random)
+	: Random_generator_base<P>( 1, rnd),_p(tetrahedron[0]),_q(tetrahedron[1]),_r(tetrahedron[2]),_s(tetrahedron[3]) {
+		generate_point();
+	}
+	This& operator++() {
+		generate_point();
+		return *this;
+	}
+	This operator++(int) {
+		This tmp = *this;
+		++(*this);
+		return tmp;
+	}
+};
+
+template<class P, class Creator >
+void Random_points_in_tetrahedron_3<P, Creator>::generate_point() {
+	typedef typename Creator::argument_type T;
+	Creator creator;
+	double a[3];
+	for(int i = 0; i < 3; ++i) {
+		a[i]=this->_rnd.get_double(0,1);
+	}
+	std::sort(a,a+3);
+	double b[4];
+	b[0]=a[0];
+	b[1]=a[1]-a[0];
+	b[2]=a[2]-a[1];
+	b[3]=1.0-a[2];
+	T ret[3];
+	for(int i = 0; i < 3; ++i) {
+	    ret[i] = T(to_double(_p[i])*b[0]+to_double(_q[i])*b[1]+to_double(_r[i])*b[2]+to_double(_s[i])*b[3]);
+	}
+	this->d_item = creator(ret[0],ret[1],ret[2]);
+}
+
+
+
+} //namespace CGAL
+
+#endif // CGAL_POINT_GENERATORS_3_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/point_generators_d.h b/3rdparty/CGAL-4.8/include/CGAL/point_generators_d.h
new file mode 100644
index 0000000..59d11fd
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/point_generators_d.h
@@ -0,0 +1,211 @@
+// Copyright (c) 2010  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Olivier Devillers
+
+
+
+#ifndef CGAL_POINT_GENERATORS_D_H
+#define CGAL_POINT_GENERATORS_D_H 1
+#include <CGAL/generators.h>
+#include <CGAL/number_type_basic.h>
+#include <cmath>
+
+namespace CGAL {
+
+
+template < class P >
+class Random_points_in_ball_d : public Random_generator_base<P>{
+    void generate_point();
+    int dimension;
+public:
+    typedef Random_points_in_ball_d<P> This;
+ Random_points_in_ball_d( int dim, double a = 1, 
+			       Random& rnd = get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed in the open sphere with radius r, i.e. |`*g'| < r .
+   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P >
+void
+Random_points_in_ball_d<P>::
+generate_point() {
+  double norm = 0;
+  std::vector< double > coord(dimension);
+  
+  for(int i=0; i<dimension; ++i) {
+    // normal distribution 
+    //( a product of normal distib is a normal distrib in higher dim)
+    const double pi = 3.141592653589793238462643;
+    double a=this->_rnd.get_double();
+    a = std::sqrt( -2* std::log(1-a) );
+    double b=this->_rnd.get_double();
+    b = std::cos(2*pi*b);
+    coord[i]= a*b;
+    norm += coord[i]*coord[i];
+  }
+  norm = this->d_range  * std::pow(this->_rnd.get_double(),1.0/dimension)
+           /std::sqrt(norm);
+  for(int i=0; i<dimension; ++i) coord[i] *= norm;
+  this->d_item = P(dimension, coord.begin(), coord.end() );
+}
+
+
+
+
+template < class P >
+class Random_points_on_sphere_d : public Random_generator_base<P>{
+    void generate_point();
+    int dimension;
+public:
+    typedef Random_points_on_sphere_d<P> This;
+ Random_points_on_sphere_d( int dim, double a = 1, 
+			       Random& rnd = get_default_random())
+        // g is an input iterator creating points of type `P' uniformly
+        // distributed on the sphere with radius r, i.e. |`*g'| == r .
+   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P >
+void
+Random_points_on_sphere_d<P>::
+generate_point() {
+  double norm = 0;
+  std::vector< double > coord(dimension);
+  
+  for(int i=0; i<dimension; ++i) {
+    // normal distribution
+    const double pi = 3.141592653589793238462643;
+    double a=this->_rnd.get_double();
+    a = std::sqrt( -2* std::log(1-a) );
+    double b=this->_rnd.get_double();
+    b = std::cos(2*pi*b);
+    coord[i]= a*b;
+    norm += coord[i]*coord[i];
+  }
+  norm = this->d_range /std::sqrt(norm);
+  for(int i=0; i<dimension; ++i) coord[i] *= norm;
+  this->d_item = P(dimension, coord.begin(), coord.end() );
+}
+
+
+template < class P >
+class Random_points_in_cube_d : public Random_generator_base<P>{
+    void generate_point();
+    int dimension;
+public:
+    typedef Random_points_in_cube_d<P> This;
+ Random_points_in_cube_d( int dim, double a = 1, 
+			       Random& rnd = get_default_random())
+   : Random_generator_base<P>( a, rnd), dimension(dim) { generate_point(); }
+    This& operator++()    {
+        generate_point();
+        return *this;
+    }
+    This  operator++(int) {
+        This tmp = *this;
+        ++(*this);
+        return tmp;
+    }
+};
+
+template < class P >
+void
+Random_points_in_cube_d<P>::
+generate_point() {
+    typedef typename Kernel_traits<P>::Kernel::RT RT;
+    std::vector<RT> coord(dimension);
+    for(int i=0; i<dimension; ++i)
+      coord[i]=RT(this->d_range * ( 2 * this->_rnd.get_double() - 1.0));
+
+    P p(dimension, coord.begin(), coord.end() );
+    this->d_item = p;
+}
+
+
+template <class OutputIterator, class Creator>
+OutputIterator
+points_on_cube_grid_d( int dimension, double a, 
+			    std::size_t n, OutputIterator o, Creator creator)
+{
+  //  typedef typename OutputIterator::container_type::value_type Point;
+
+    if  (n == 0)
+        return o;
+    
+    // take m smallest such that m^dimension > n
+    int m=int(std::floor(std::pow(static_cast<double>(n),1/(double)dimension)));
+    while(true) { 
+      int nn=1;
+      for (int i=0; i<dimension; ++i) nn*=m;
+      if (std::size_t(nn)>=n) break;
+      ++m;
+    }
+
+    double base = -a;  // Left and bottom boundary.
+    double step = 2*a/(m-1);
+    std::vector<int> indices(dimension);
+    std::vector<double> coord(dimension);
+
+    //initialize indices
+    int j;
+    for(j=0; j< dimension; ++j) { indices[j]=0; }
+
+    std::size_t i=0;
+    while (true) {
+      //compute point
+      for(j=0; j< dimension; ++j) { 
+	coord[j]=base+step*indices[j]; 
+      }
+      *o = creator(coord.begin(), coord.end() );
+      ++i;
+      if (i==n) break;
+      ++o;
+      // find index to increment
+      for ( j=0; j < dimension; ++j) if ( indices[j]<m-1 ) break;
+      // increment and reset smaller indices
+      CGAL_assertion(j<dimension);
+      indices[j]++;
+      while(j>0) { --j; indices[j]=0; } 
+    }
+    return o;
+}
+
+
+} //namespace CGAL
+
+#endif // CGAL_POINT_GENERATORS_D_H //
+// EOF //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/point_set_processing_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/point_set_processing_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/point_set_processing_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/point_set_processing_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/poisson_refine_triangulation.h b/3rdparty/CGAL-4.8/include/CGAL/poisson_refine_triangulation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/poisson_refine_triangulation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/poisson_refine_triangulation.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/polygon_function_objects.h b/3rdparty/CGAL-4.8/include/CGAL/polygon_function_objects.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/polygon_function_objects.h
rename to 3rdparty/CGAL-4.8/include/CGAL/polygon_function_objects.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/polygon_mesh_processing.h b/3rdparty/CGAL-4.8/include/CGAL/polygon_mesh_processing.h
new file mode 100644
index 0000000..62e7999
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/polygon_mesh_processing.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2015 GeometryFactory (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Jane Tournois
+
+/**
+* \ingroup PkgPolygonMeshProcessing
+* \file CGAL/polygon_mesh_processing.h
+* Convenience header file including the headers for all
+* the free functions of this package.
+*/
+
+#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
+#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
+#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
+#include <CGAL/Polygon_mesh_processing/compute_normal.h>
+#include <CGAL/Polygon_mesh_processing/connected_components.h>
+#include <CGAL/Polygon_mesh_processing/fair.h>
+#include <CGAL/Polygon_mesh_processing/orientation.h>
+#include <CGAL/Polygon_mesh_processing/refine.h>
+#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
+#include <CGAL/Polygon_mesh_processing/measure.h>
+#include <CGAL/Polygon_mesh_processing/bbox.h>
+#include <CGAL/Polygon_mesh_processing/border.h>
+#include <CGAL/Polygon_mesh_processing/repair.h>
+#include <CGAL/Polygon_mesh_processing/remesh.h>
diff --git a/3rdparty/CGAL-4.6/include/CGAL/polyhedron_cut_plane_3.h b/3rdparty/CGAL-4.8/include/CGAL/polyhedron_cut_plane_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/polyhedron_cut_plane_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/polyhedron_cut_plane_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/polynomial_utils.h b/3rdparty/CGAL-4.8/include/CGAL/polynomial_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/polynomial_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/polynomial_utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Polygon_offset_pred_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Polygon_offset_pred_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Polygon_offset_pred_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Polygon_offset_pred_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_ftC3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_ftC3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_ftC3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_ftC3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_rtH2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_rtH2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_rtH2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_rtH2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_rtH3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_rtH3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Regular_triangulation_rtH3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Regular_triangulation_rtH3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/in_smallest_orthogonalcircle_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/in_smallest_orthogonalcircle_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/in_smallest_orthogonalcircle_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/in_smallest_orthogonalcircle_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/kernel_ftC2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/kernel_ftC2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/kernel_ftC2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/kernel_ftC2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/kernel_ftC3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/kernel_ftC3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/kernel_ftC3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/kernel_ftC3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_for_mixed_complex_3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_for_mixed_complex_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_for_mixed_complex_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_for_mixed_complex_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates/sign_of_determinant.h b/3rdparty/CGAL-4.8/include/CGAL/predicates/sign_of_determinant.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates/sign_of_determinant.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates/sign_of_determinant.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates_d.h b/3rdparty/CGAL-4.8/include/CGAL/predicates_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates_on_lines_2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates_on_lines_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates_on_lines_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates_on_lines_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates_on_points_2.h b/3rdparty/CGAL-4.8/include/CGAL/predicates_on_points_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates_on_points_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates_on_points_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/predicates_on_points_3.h b/3rdparty/CGAL-4.8/include/CGAL/predicates_on_points_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/predicates_on_points_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/predicates_on_points_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/primes.h b/3rdparty/CGAL-4.8/include/CGAL/primes.h
new file mode 100644
index 0000000..e1cf782
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/primes.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Michael Hemmer    <hemmer at mpi-inf.mpg.de>
+//
+// =============================================================================
+
+#ifndef CGAL_PRIMES_H
+#define CGAL_PRIMES_H
+
+#include <CGAL/basic.h>
+
+namespace CGAL { 
+namespace internal {
+CGAL_EXPORT extern const int primes[2000];
+
+static inline 
+int get_next_lower_prime(int current_prime){
+    bool is_prime = false;
+    
+    int i;
+    CGAL_precondition_msg(current_prime != 2 ," primes definitely exhausted ");
+
+    if((current_prime <= 7) && (current_prime > 2)){
+        if(current_prime <= 5){
+            if(current_prime == 3)
+                return 2;
+            return 3;
+        }
+        return 5;
+    }                
+    for(i=current_prime-2;(i>1 && !is_prime);i=i-2){
+        int r = 1;
+        for(int j=3; (j <= i/2 && (r != 0)); j++){
+            r = i % j;
+//                std::cout<<"i " <<i<<std::endl;
+//                std::cout<<"j " <<j<<std::endl;
+//                std::cout<<"i%j " <<i%j<<std::endl;
+            if(j==i/2 && r != 0)
+                is_prime = true;
+        }
+    }
+//    CGAL_precondition_msg(is_prime," primes definitely exhausted ");
+    return i+2;
+}
+
+
+}
+}
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/primes_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif // CGAL_PRIMES_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/primes_impl.h b/3rdparty/CGAL-4.8/include/CGAL/primes_impl.h
new file mode 100644
index 0000000..340b50b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/primes_impl.h
@@ -0,0 +1,293 @@
+// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michael Hemmer, Alexander Kobel
+
+#include <CGAL/basic.h>
+
+namespace CGAL {
+namespace internal {
+
+const int primes [2000] = {
+  /*
+   * Generated in SAGE with:
+   *
+   * N = 2000
+   * p = 2^26
+   * L = []
+   * while len(L) < N:
+   *   p = previous_prime(p)
+   *   if GF(p)(2).is_primitive_root():
+   *     L.append(p)
+   * k = 8
+   * for i in range(N/k):
+   *   print '  ' + ', '.join (str(p) for p in L[k*i:k*(i+1)]) + ','
+  */
+  67108859, 67108819, 67108763, 67108757, 67108747, 67108739, 67108709, 67108693,
+  67108669, 67108667, 67108661, 67108597, 67108579, 67108507, 67108493, 67108453,
+  67108387, 67108373, 67108331, 67108219, 67108187, 67108109, 67108037, 67108003,
+  67107941, 67107797, 67107787, 67107773, 67107757, 67107749, 67107707, 67107643,
+  67107541, 67107539, 67107533, 67107461, 67107427, 67107389, 67107323, 67107317,
+  67107301, 67107253, 67107203, 67107149, 67107043, 67106987, 67106821, 67106813,
+  67106797, 67106749, 67106717, 67106693, 67106483, 67106477, 67106357, 67106339,
+  67106323, 67106243, 67106213, 67106189, 67106107, 67106099, 67106093, 67106059,
+  67105963, 67105933, 67105877, 67105867, 67105811, 67105771, 67105763, 67105699,
+  67105691, 67105517, 67105459, 67105453, 67105373, 67105349, 67105267, 67105187,
+  67105141, 67105133, 67105061, 67104997, 67104931, 67104923, 67104893, 67104883,
+  67104859, 67104803, 67104757, 67104707, 67104691, 67104589, 67104581, 67104571,
+  67104563, 67104539, 67104517, 67104437, 67104419, 67104379, 67104341, 67104293,
+  67104277, 67104251, 67104227, 67104139, 67104061, 67104053, 67103963, 67103909,
+  67103867, 67103851, 67103837, 67103821, 67103731, 67103669, 67103653, 67103587,
+  67103579, 67103549, 67103507, 67103483, 67103219, 67103173, 67103149, 67103147,
+  67103107, 67103083, 67103051, 67103027, 67103021, 67102963, 67102949, 67102901,
+  67102843, 67102733, 67102627, 67102613, 67102531, 67102499, 67102459, 67102397,
+  67102333, 67102331, 67102283, 67102237, 67102181, 67102163, 67102099, 67102093,
+  67102069, 67102067, 67102019, 67101997, 67101989, 67101899, 67101883, 67101877,
+  67101779, 67101739, 67101691, 67101637, 67101613, 67101509, 67101493, 67101491,
+  67101469, 67101443, 67101413, 67101341, 67101323, 67101299, 67101187, 67101173,
+  67101053, 67100987, 67100981, 67100963, 67100947, 67100939, 67100909, 67100899,
+  67100861, 67100851, 67100827, 67100773, 67100731, 67100699, 67100669, 67100659,
+  67100653, 67100587, 67100459, 67100357, 67100347, 67100179, 67100141, 67100123,
+  67100101, 67099987, 67099957, 67099931, 67099861, 67099853, 67099829, 67099819,
+  67099699, 67099589, 67099547, 67099541, 67099517, 67099499, 67099397, 67099387,
+  67099363, 67099339, 67099267, 67099213, 67099141, 67099133, 67099037, 67098931,
+  67098923, 67098917, 67098907, 67098827, 67098821, 67098739, 67098653, 67098589,
+  67098419, 67098389, 67098347, 67098341, 67098323, 67098299, 67098277, 67098259,
+  67098203, 67098197, 67098179, 67098149, 67098067, 67098029, 67097917, 67097819,
+  67097813, 67097803, 67097747, 67097699, 67097669, 67097659, 67097579, 67097413,
+  67097363, 67097339, 67097333, 67097291, 67097269, 67097123, 67097053, 67096987,
+  67096979, 67096973, 67096907, 67096867, 67096837, 67096693, 67096669, 67096507,
+  67096499, 67096483, 67096411, 67096387, 67096373, 67096301, 67096109, 67096067,
+  67096021, 67096013, 67095989, 67095971, 67095893, 67095869, 67095797, 67095731,
+  67095701, 67095683, 67095667, 67095659, 67095629, 67095499, 67095421, 67095419,
+  67095349, 67095317, 67095173, 67095139, 67095131, 67095101, 67095037, 67095011,
+  67094987, 67094981, 67094917, 67094899, 67094891, 67094837, 67094827, 67094723,
+  67094717, 67094707, 67094701, 67094581, 67094557, 67094507, 67094501, 67094459,
+  67094437, 67094411, 67094389, 67094309, 67094299, 67094267, 67094141, 67094123,
+  67094099, 67093979, 67093933, 67093931, 67093861, 67093853, 67093757, 67093723,
+  67093699, 67093627, 67093619, 67093613, 67093603, 67093597, 67093547, 67093349,
+  67093307, 67093181, 67093171, 67093163, 67093157, 67093109, 67093069, 67093043,
+  67093003, 67092997, 67092947, 67092869, 67092821, 67092787, 67092757, 67092749,
+  67092709, 67092691, 67092643, 67092611, 67092563, 67092539, 67092491, 67092461,
+  67092419, 67092331, 67092323, 67092301, 67092227, 67092203, 67092197, 67092107,
+  67091987, 67091939, 67091933, 67091923, 67091797, 67091779, 67091771, 67091669,
+  67091611, 67091491, 67091477, 67091443, 67091357, 67091341, 67091243, 67091203,
+  67091149, 67091107, 67091029, 67090979, 67090973, 67090939, 67090861, 67090763,
+  67090627, 67090613, 67090589, 67090579, 67090549, 67090547, 67090523, 67090459,
+  67090451, 67090411, 67090403, 67090307, 67090259, 67090229, 67090189, 67090117,
+  67090099, 67090091, 67090043, 67090027, 67090013, 67089949, 67089829, 67089739,
+  67089733, 67089707, 67089683, 67089587, 67089541, 67089461, 67089299, 67089283,
+  67089277, 67089221, 67089059, 67088963, 67088821, 67088797, 67088779, 67088717,
+  67088683, 67088653, 67088627, 67088621, 67088603, 67088597, 67088573, 67088509,
+  67088501, 67088453, 67088429, 67088381, 67088347, 67088267, 67088117, 67088093,
+  67088059, 67087973, 67087957, 67087901, 67087883, 67087859, 67087723, 67087717,
+  67087637, 67087571, 67087547, 67087459, 67087451, 67087421, 67087277, 67087259,
+  67087243, 67087187, 67087123, 67087019, 67086949, 67086931, 67086917, 67086893,
+  67086869, 67086827, 67086757, 67086667, 67086637, 67086629, 67086611, 67086589,
+  67086421, 67086347, 67086323, 67086317, 67086307, 67086293, 67086259, 67086109,
+  67086067, 67086053, 67086043, 67086013, 67085939, 67085933, 67085899, 67085869,
+  67085867, 67085861, 67085819, 67085813, 67085803, 67085771, 67085741, 67085677,
+  67085531, 67085443, 67085437, 67085429, 67085357, 67085341, 67085267, 67085189,
+  67085173, 67085171, 67085099, 67085093, 67085003, 67084981, 67084973, 67084931,
+  67084861, 67084789, 67084757, 67084709, 67084643, 67084637, 67084603, 67084547,
+  67084517, 67084483, 67084427, 67084349, 67084333, 67084331, 67084309, 67084189,
+  67084187, 67084139, 67084013, 67083883, 67083859, 67083811, 67083803, 67083787,
+  67083739, 67083707, 67083629, 67083619, 67083613, 67083539, 67083517, 67083461,
+  67083437, 67083371, 67083323, 67083221, 67083197, 67083067, 67082989, 67082987,
+  67082963, 67082933, 67082909, 67082891, 67082861, 67082843, 67082779, 67082707,
+  67082699, 67082579, 67082549, 67082531, 67082453, 67082363, 67082339, 67082227,
+  67082189, 67082131, 67082123, 67082101, 67082003, 67081957, 67081829, 67081811,
+  67081787, 67081741, 67081733, 67081709, 67081691, 67081661, 67081579, 67081499,
+  67081477, 67081429, 67081283, 67081237, 67081213, 67081211, 67081139, 67081123,
+  67081051, 67080971, 67080947, 67080917, 67080859, 67080821, 67080803, 67080763,
+  67080701, 67080653, 67080557, 67080491, 67080437, 67080413, 67080323, 67080179,
+  67080173, 67080131, 67080107, 67080061, 67079981, 67079963, 67079941, 67079933,
+  67079917, 67079693, 67079587, 67079491, 67079459, 67079429, 67079347, 67079333,
+  67079323, 67079317, 67079267, 67079237, 67079219, 67079213, 67079203, 67079149,
+  67079141, 67079123, 67079083, 67079027, 67078981, 67078931, 67078877, 67078819,
+  67078813, 67078789, 67078763, 67078643, 67078573, 67078469, 67078387, 67078331,
+  67078309, 67078301, 67078283, 67078213, 67078181, 67078139, 67078133, 67078069,
+  67078061, 67078013, 67077947, 67077917, 67077851, 67077827, 67077797, 67077757,
+  67077643, 67077611, 67077541, 67077539, 67077419, 67077403, 67077379, 67077349,
+  67077341, 67077299, 67077293, 67077259, 67077181, 67077173, 67077133, 67076899,
+  67076869, 67076851, 67076843, 67076803, 67076773, 67076741, 67076693, 67076683,
+  67076677, 67076651, 67076629, 67076627, 67076573, 67076539, 67076413, 67076411,
+  67076357, 67076341, 67076291, 67076189, 67076147, 67076117, 67076077, 67076069,
+  67076029, 67075973, 67075949, 67075933, 67075907, 67075867, 67075787, 67075691,
+  67075669, 67075573, 67075493, 67075373, 67075363, 67075277, 67075243, 67075147,
+  67075109, 67075091, 67075069, 67075067, 67075037, 67074947, 67074901, 67074859,
+  67074853, 67074851, 67074829, 67074691, 67074619, 67074613, 67074611, 67074587,
+  67074523, 67074467, 67074317, 67074307, 67074277, 67074269, 67074179, 67073947,
+  67073917, 67073899, 67073803, 67073731, 67073707, 67073701, 67073683, 67073651,
+  67073603, 67073597, 67073579, 67073533, 67073459, 67073387, 67073339, 67073333,
+  67073323, 67073309, 67073261, 67073197, 67073189, 67073107, 67073051, 67073003,
+  67072997, 67072979, 67072909, 67072877, 67072781, 67072757, 67072739, 67072693,
+  67072541, 67072373, 67072363, 67072339, 67072309, 67072283, 67072277, 67072253,
+  67072139, 67072037, 67071997, 67071989, 67071947, 67071923, 67071899, 67071883,
+  67071877, 67071821, 67071707, 67071637, 67071547, 67071419, 67071413, 67071317,
+  67071299, 67071293, 67071157, 67071149, 67071139, 67071061, 67070989, 67070981,
+  67070909, 67070869, 67070837, 67070827, 67070813, 67070803, 67070749, 67070699,
+  67070621, 67070573, 67070539, 67070459, 67070357, 67070317, 67070291, 67070261,
+  67070251, 67070203, 67070053, 67070027, 67069979, 67069819, 67069813, 67069787,
+  67069781, 67069763, 67069669, 67069661, 67069549, 67069531, 67069469, 67069427,
+  67069397, 67069339, 67069157, 67069133, 67069109, 67069099, 67069043, 67069021,
+  67068971, 67068931, 67068787, 67068653, 67068643, 67068629, 67068571, 67068557,
+  67068539, 67068509, 67068493, 67068371, 67068301, 67068269, 67068259, 67068227,
+  67068203, 67068187, 67068181, 67068173, 67068163, 67068101, 67067971, 67067933,
+  67067909, 67067789, 67067779, 67067773, 67067723, 67067629, 67067597, 67067501,
+  67067453, 67067437, 67067389, 67067387, 67067339, 67067293, 67067269, 67067213,
+  67067173, 67067171, 67067069, 67067059, 67067029, 67066907, 67066861, 67066859,
+  67066771, 67066757, 67066723, 67066709, 67066667, 67066619, 67066613, 67066379,
+  67066277, 67066243, 67066211, 67066157, 67066093, 67066061, 67066019, 67065979,
+  67065931, 67065917, 67065883, 67065827, 67065787, 67065667, 67065659, 67065653,
+  67065643, 67065619, 67065563, 67065461, 67065437, 67065389, 67065373, 67065293,
+  67065283, 67065227, 67065211, 67065157, 67065091, 67064843, 67064827, 67064819,
+  67064773, 67064771, 67064741, 67064717, 67064693, 67064611, 67064597, 67064587,
+  67064579, 67064549, 67064467, 67064299, 67064267, 67064237, 67064213, 67064197,
+  67064171, 67064147, 67064131, 67064093, 67064059, 67063853, 67063813, 67063723,
+  67063643, 67063637, 67063523, 67063517, 67063397, 67063349, 67063307, 67063189,
+  67063163, 67063133, 67063123, 67063099, 67063093, 67063069, 67063043, 67063037,
+  67063019, 67062923, 67062893, 67062883, 67062859, 67062659, 67062629, 67062613,
+  67062539, 67062509, 67062469, 67062461, 67062379, 67062349, 67062299, 67062221,
+  67062179, 67062157, 67062067, 67062029, 67062011, 67061987, 67061947, 67061933,
+  67061909, 67061867, 67061861, 67061789, 67061747, 67061693, 67061627, 67061597,
+  67061563, 67061531, 67061333, 67061299, 67061227, 67061219, 67061179, 67061173,
+  67061147, 67061003, 67060997, 67060957, 67060949, 67060933, 67060837, 67060813,
+  67060627, 67060549, 67060523, 67060517, 67060507, 67060451, 67060421, 67060373,
+  67060333, 67060307, 67060277, 67060261, 67060229, 67060187, 67060171, 67060141,
+  67060109, 67060067, 67060043, 67060027, 67060013, 67059989, 67059907, 67059899,
+  67059869, 67059779, 67059757, 67059749, 67059731, 67059709, 67059701, 67059637,
+  67059613, 67059581, 67059547, 67059533, 67059523, 67059437, 67059427, 67059259,
+  67059173, 67059061, 67058963, 67058941, 67058909, 67058899, 67058891, 67058867,
+  67058843, 67058723, 67058699, 67058669, 67058627, 67058531, 67058389, 67058347,
+  67058339, 67058323, 67058309, 67058269, 67058227, 67058213, 67058141, 67058003,
+  67057883, 67057853, 67057819, 67057813, 67057763, 67057733, 67057723, 67057717,
+  67057709, 67057643, 67057499, 67057493, 67057387, 67057381, 67057379, 67057363,
+  67057307, 67057147, 67057141, 67056989, 67056971, 67056917, 67056877, 67056763,
+  67056677, 67056667, 67056659, 67056637, 67056611, 67056581, 67056461, 67056419,
+  67056371, 67056259, 67056251, 67056179, 67056107, 67056083, 67056053, 67056043,
+  67056013, 67055957, 67055909, 67055843, 67055789, 67055771, 67055629, 67055539,
+  67055491, 67055477, 67055467, 67055347, 67055309, 67055299, 67055291, 67055267,
+  67055243, 67055203, 67055179, 67055147, 67054997, 67054979, 67054907, 67054877,
+  67054859, 67054763, 67054733, 67054717, 67054541, 67054523, 67054483, 67054411,
+  67054387, 67054301, 67054213, 67054051, 67054037, 67053997, 67053971, 67053941,
+  67053893, 67053787, 67053733, 67053659, 67053653, 67053643, 67053629, 67053619,
+  67053563, 67053557, 67053523, 67053517, 67053419, 67053397, 67053373, 67053317,
+  67053251, 67053229, 67053197, 67053179, 67053149, 67053037, 67053029, 67052963,
+  67052939, 67052933, 67052819, 67052813, 67052779, 67052723, 67052677, 67052509,
+  67052477, 67052467, 67052243, 67052021, 67051979, 67051949, 67051909, 67051883,
+  67051861, 67051813, 67051811, 67051781, 67051709, 67051651, 67051643, 67051573,
+  67051571, 67051547, 67051493, 67051379, 67051373, 67051331, 67051253, 67051189,
+  67051181, 67051099, 67051069, 67051021, 67050979, 67050931, 67050917, 67050869,
+  67050827, 67050749, 67050707, 67050701, 67050619, 67050611, 67050541, 67050509,
+  67050443, 67050421, 67050419, 67050371, 67050301, 67050299, 67050251, 67050187,
+  67050101, 67050077, 67049987, 67049981, 67049963, 67049909, 67049891, 67049867,
+  67049837, 67049813, 67049747, 67049707, 67049693, 67049629, 67049627, 67049603,
+  67049573, 67049539, 67049453, 67049413, 67049267, 67049261, 67049251, 67049179,
+  67049149, 67049141, 67049093, 67049027, 67048963, 67048859, 67048819, 67048757,
+  67048733, 67048693, 67048627, 67048621, 67048523, 67048469, 67048411, 67048349,
+  67048277, 67048259, 67048141, 67048123, 67048109, 67047989, 67047859, 67047787,
+  67047763, 67047749, 67047733, 67047731, 67047683, 67047619, 67047613, 67047611,
+  67047581, 67047517, 67047509, 67047413, 67047397, 67047283, 67047131, 67047077,
+  67047061, 67047059, 67047053, 67047037, 67047011, 67046989, 67046939, 67046899,
+  67046797, 67046779, 67046731, 67046549, 67046531, 67046477, 67046467, 67046437,
+  67046429, 67046411, 67046387, 67046363, 67046341, 67046333, 67046261, 67046197,
+  67046107, 67046069, 67046059, 67046051, 67045973, 67045949, 67045907, 67045877,
+  67045723, 67045613, 67045579, 67045571, 67045549, 67045541, 67045507, 67045403,
+  67045339, 67045301, 67045267, 67045261, 67045211, 67045189, 67045133, 67045117,
+  67045109, 67045061, 67045037, 67045019, 67044973, 67044907, 67044829, 67044797,
+  67044779, 67044773, 67044763, 67044739, 67044541, 67044427, 67044371, 67044347,
+  67044301, 67044283, 67044203, 67044157, 67044083, 67044077, 67044067, 67044053,
+  67043981, 67043939, 67043909, 67043813, 67043797, 67043707, 67043507, 67043477,
+  67043443, 67043243, 67043147, 67043107, 67043083, 67043069, 67043059, 67043051,
+  67043027, 67042979, 67042973, 67042949, 67042931, 67042709, 67042643, 67042637,
+  67042589, 67042571, 67042541, 67042523, 67042501, 67042453, 67042427, 67042363,
+  67042307, 67042301, 67042259, 67042211, 67042091, 67042043, 67041907, 67041893,
+  67041869, 67041797, 67041749, 67041731, 67041701, 67041613, 67041581, 67041563,
+  67041547, 67041539, 67041509, 67041467, 67041461, 67041419, 67041371, 67041307,
+  67041283, 67041269, 67041203, 67041187, 67041179, 67041043, 67040917, 67040893,
+  67040789, 67040773, 67040723, 67040629, 67040627, 67040621, 67040587, 67040549,
+  67040509, 67040443, 67040387, 67040381, 67040317, 67040291, 67040261, 67040243,
+  67040219, 67040203, 67040069, 67040021, 67039997, 67039957, 67039883, 67039877,
+  67039867, 67039853, 67039811, 67039757, 67039723, 67039699, 67039669, 67039627,
+  67039613, 67039571, 67039547, 67039501, 67039499, 67039309, 67039307, 67039253,
+  67039187, 67039139, 67039051, 67039003, 67038947, 67038941, 67038877, 67038869,
+  67038827, 67038787, 67038739, 67038637, 67038589, 67038557, 67038539, 67038533,
+  67038427, 67038371, 67038341, 67038299, 67038277, 67038221, 67038197, 67038173,
+  67038149, 67038133, 67038131, 67038067, 67038029, 67038011, 67037843, 67037837,
+  67037819, 67037797, 67037771, 67037723, 67037683, 67037627, 67037603, 67037563,
+  67037483, 67037459, 67037429, 67037389, 67037261, 67037227, 67037213, 67037107,
+  67037101, 67037053, 67036979, 67036909, 67036901, 67036877, 67036867, 67036843,
+  67036819, 67036811, 67036747, 67036643, 67036589, 67036547, 67036507, 67036469,
+  67036397, 67036379, 67036357, 67036259, 67036243, 67036187, 67036181, 67036157,
+  67036093, 67036027, 67036019, 67035989, 67035949, 67035931, 67035901, 67035803,
+  67035707, 67035659, 67035653, 67035643, 67035589, 67035499, 67035491, 67035469,
+  67035413, 67035349, 67035347, 67035307, 67035277, 67035149, 67035107, 67035077,
+  67034987, 67034819, 67034699, 67034683, 67034677, 67034477, 67034419, 67034381,
+  67034339, 67034309, 67034293, 67034171, 67034117, 67034069, 67034021, 67033859,
+  67033763, 67033741, 67033709, 67033699, 67033667, 67033619, 67033613, 67033597,
+  67033541, 67033507, 67033469, 67033429, 67033403, 67033357, 67033331, 67033283,
+  67033277, 67033229, 67033157, 67033117, 67033061, 67032997, 67032941, 67032811,
+  67032803, 67032701, 67032661, 67032653, 67032613, 67032587, 67032541, 67032523,
+  67032517, 67032491, 67032461, 67032451, 67032443, 67032421, 67032389, 67032349,
+  67032347, 67032299, 67032221, 67032179, 67032101, 67031941, 67031933, 67031893,
+  67031851, 67031819, 67031813, 67031749, 67031693, 67031509, 67031483, 67031443,
+  67031429, 67031387, 67031243, 67031219, 67031203, 67031189, 67031149, 67031147,
+  67031123, 67031101, 67031059, 67030963, 67030933, 67030907, 67030867, 67030853,
+  67030757, 67030741, 67030739, 67030693, 67030669, 67030597, 67030517, 67030451,
+  67030427, 67030333, 67030331, 67030181, 67030069, 67030013, 67029947, 67029931,
+  67029923, 67029917, 67029901, 67029811, 67029779, 67029763, 67029749, 67029709,
+  67029707, 67029581, 67029541, 67029509, 67029491, 67029451, 67029437, 67029427,
+  67029421, 67029373, 67029341, 67029323, 67029293, 67029269, 67029253, 67029229,
+  67029077, 67029059, 67029043, 67029013, 67028981, 67028917, 67028771, 67028669,
+  67028653, 67028651, 67028597, 67028557, 67028539, 67028477, 67028413, 67028387,
+  67028243, 67028197, 67028083, 67028069, 67028021, 67027997, 67027963, 67027949,
+  67027931, 67027867, 67027861, 67027811, 67027693, 67027627, 67027619, 67027547,
+  67027507, 67027453, 67027427, 67027339, 67027283, 67027237, 67027189, 67027187,
+  67027069, 67027027, 67027019, 67027013, 67026979, 67026907, 67026829, 67026811,
+  67026803, 67026787, 67026643, 67026613, 67026539, 67026469, 67026467, 67026451,
+  67026437, 67026403, 67026307, 67026299, 67026227, 67026187, 67026139, 67026131,
+  67026109, 67026107, 67026083, 67026067, 67025971, 67025963, 67025957, 67025843,
+  67025779, 67025773, 67025723, 67025701, 67025683, 67025669, 67025579, 67025573,
+  67025531, 67025501, 67025459, 67025411, 67025363, 67025219, 67025213, 67025173,
+  67025107, 67025051, 67025029, 67024987, 67024957, 67024901, 67024891, 67024733,
+  67024637, 67024621, 67024613, 67024499, 67024483, 67024429, 67024411, 67024339,
+  67024157, 67024141, 67024003, 67023989, 67023899, 67023893, 67023779, 67023763,
+  67023667, 67023653, 67023493, 67023443, 67023421, 67023419, 67023371, 67023349,
+  67023347, 67023331, 67023293, 67023259, 67023227, 67023211, 67023179, 67023157,
+  67023139, 67023133, 67023091, 67023059, 67023053, 67023043, 67023037, 67023029,
+  67022869, 67022819, 67022797, 67022723, 67022707, 67022701, 67022699, 67022693,
+  67022539, 67022507, 67022477, 67022467, 67022387, 67022261, 67022243, 67022237,
+  67022213, 67022147, 67022077, 67022027, 67021979, 67021963, 67021901, 67021861,
+  67021741, 67021739, 67021723, 67021637, 67021621, 67021613, 67021499, 67021469,
+  67021459, 67021363, 67021301, 67021237, 67021147, 67021139, 67021099, 67021067,
+  67021043, 67020979, 67020973, 67020917, 67020893, 67020869, 67020797, 67020763,
+  67020683, 67020589, 67020587, 67020557, 67020491, 67020397, 67020323, 67020299,
+  67020251, 67020179, 67020077, 67020053, 67020013, 67019963, 67019867, 67019837,
+  67019819, 67019747, 67019741, 67019653, 67019587, 67019549, 67019483, 67019437,
+  67019371, 67019299, 67019123, 67019077, 67019027, 67019003, 67018997, 67018843,
+  67018837, 67018771, 67018733, 67018717, 67018667, 67018613, 67018499, 67018493,
+  67018429, 67018397, 67018387, 67018309, 67018181, 67018163, 67018141, 67018139,
+  67018069, 67018051, 67017971, 67017931, 67017803, 67017763, 67017733, 67017707,
+  67017677, 67017661, 67017659, 67017571, 67017563, 67017547, 67017413, 67017371,
+  67017299, 67017277, 67017227, 67017211, 67017163, 67017157, 67017107, 67017059,
+  67016869, 67016821, 67016813, 67016723, 67016717, 67016707, 67016693, 67016627,
+  67016611, 67016483, 67016437, 67016387, 67016269, 67016197, 67016189, 67016179,
+};
+
+} // namespace internal
+} // namespace CGAL
diff --git a/3rdparty/CGAL-4.8/include/CGAL/property_map.h b/3rdparty/CGAL-4.8/include/CGAL/property_map.h
new file mode 100644
index 0000000..a4a8f87
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/property_map.h
@@ -0,0 +1,396 @@
+// Copyright (c) 2008-2009 GeometryFactory and INRIA
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Andreas Fabri and Laurent Saboret
+
+#ifndef CGAL_POINT_SET_PROPERTY_MAP_H
+#define CGAL_POINT_SET_PROPERTY_MAP_H
+
+#include <CGAL/value_type_traits.h>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+  #include <boost/property_map/property_map.hpp>
+#else
+  #include <boost/property_map.hpp>
+  #include <boost/vector_property_map.hpp>
+
+#endif
+#include <boost/tuple/tuple.hpp>
+
+#include <utility> // defines std::pair
+
+namespace CGAL {
+
+
+/// \cond SKIP_DOXYGEN
+
+
+template <typename PM1, typename PM2>
+class OR_property_map {
+  typedef typename PM1::key_type key_type;
+  typedef typename PM1::value_type value_type;
+  typedef typename PM1::reference reference;
+  typedef boost::read_write_property_map_tag category;
+
+  PM1 pm1;
+  PM2 pm2;
+
+ public:
+  OR_property_map(PM1 pm1, PM2 pm2)
+    : pm1(pm1),pm2(pm2)
+  {}
+
+  inline friend
+    value_type
+    get(const OR_property_map& pm, const key_type& k)
+  {
+    return get(pm.pm1,k) || get(pm.pm2,k);
+  }
+
+  inline friend
+    void
+  put(OR_property_map& pm, const key_type& k, const value_type& v)
+  {
+    put(pm.pm1,k, v);
+    put(pm.pm2,k, v);
+  }
+
+};
+
+/// Property map that accesses a value from an iterator
+///
+/// \cgalModels `ReadablePropertyMap`
+///
+/// \tparam InputIterator an input iterator
+/// \endcond
+template<class InputIterator>
+struct Input_iterator_property_map{
+  typedef InputIterator key_type;
+  typedef typename std::iterator_traits<InputIterator>::value_type value_type;
+  typedef typename std::iterator_traits<InputIterator>::reference reference;
+  typedef boost::readable_property_map_tag category;
+
+  /// Free function to use a get the value from an iterator using Input_iterator_property_map.
+  inline friend
+  typename std::iterator_traits<InputIterator>::reference
+  get(Input_iterator_property_map<InputIterator>,InputIterator it){ return *it; }
+};
+
+/// \ingroup PkgProperty_map
+/// Property map that converts a `T*` pointer (or in general an iterator
+/// over `T` elements) to the `T` object.
+///
+/// \cgalModels `LvaluePropertyMap`
+template <typename T>
+struct Dereference_property_map
+  : public boost::put_get_helper<T&, Dereference_property_map<T> >
+{
+  typedef T* key_type; ///< typedef to 'T*'
+  typedef T value_type; ///< typedef to 'T'
+  typedef value_type& reference; ///< typedef to 'T&'
+  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
+
+  /// Access a property map element.
+  ///
+  /// @tparam Iter Type convertible to `key_type`.
+  template <class Iter>
+  reference operator[](Iter it) const { return reference(*it); }
+};
+
+/// Free function to create a `Dereference_property_map` property map.
+///
+/// \relates Dereference_property_map 
+template <class Iter> // Type convertible to `key_type`
+Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>
+make_dereference_property_map(Iter)
+{
+  // value_type_traits is a workaround as back_insert_iterator's `value_type` is void
+  return Dereference_property_map<typename CGAL::value_type_traits<Iter>::type>();
+}
+
+/// \ingroup PkgProperty_map
+/// A `LvaluePropertyMap` property map mapping a key to itself (by reference).
+///
+/// \cgalModels `LvaluePropertyMap`
+template <typename T>
+struct Identity_property_map
+{
+  typedef T key_type; ///< typedef to `T`
+  typedef T value_type; ///< typedef to `T`
+  typedef T& reference; ///< typedef to `T&`
+  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
+  /// Access a property map element.
+  /// @param k a key which is returned as mapped value.
+  reference operator[](key_type& k) const { return k; }
+
+  typedef Identity_property_map<T> Self;
+  /// \name Put/get free functions
+  /// @{
+  friend const value_type& get(const Self&,const key_type& k) {return k;}
+  friend         reference get(const Self&,      key_type& k) {return k;}
+  friend void put(const Self&,key_type& k, const value_type& v) {k=v;}
+  /// @}
+};
+
+/// Free function to create a `Identity_property_map` property map.
+///
+/// \relates Identity_property_map 
+template <class T> // Key and value type
+Identity_property_map<T>
+  make_identity_property_map(T)
+{
+  return Identity_property_map<T>();
+}
+
+
+//=========================================================================
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+/// \ingroup PkgProperty_map
+/// Property map that accesses the first item of a `std::pair`. 
+/// \tparam Pair Instance of `std::pair`. 
+/// \cgalModels `LvaluePropertyMap`
+///
+/// \sa `CGAL::Second_of_pair_property_map<Pair>`
+template <typename Pair>
+struct First_of_pair_property_map
+  : public boost::put_get_helper<typename Pair::first_type&,
+                                 First_of_pair_property_map<Pair> >
+{
+  typedef Pair* key_type; ///< typedef to `Pair*`
+  typedef typename Pair::first_type value_type; ///< typedef to `Pair::first_type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
+
+  /// Access a property map element.
+  ///
+  /// @tparam Iter Type convertible to `key_type`.
+  template <class Iter>
+  reference operator[](Iter pair) const { return reference(pair->first); }
+};
+
+/// Free function to create a `First_of_pair_property_map` property map. 
+///
+/// \relates First_of_pair_property_map 
+template <class Iter> // Type convertible to key_type
+First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
+  make_first_of_pair_property_map(Iter)
+{
+  // value_type_traits is a workaround as back_insert_iterator's value_type is void
+  return First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
+}
+#else
+/// \ingroup PkgProperty_map
+/// Property map that accesses the first item of a `std::pair`. 
+/// \tparam Pair Instance of `std::pair`. 
+/// \cgalModels `LvaluePropertyMap`
+///
+/// \sa `CGAL::Second_of_pair_property_map<Pair>`
+template <typename Pair>
+struct First_of_pair_property_map
+{
+  typedef Pair key_type; ///< typedef to `Pair`
+  typedef typename Pair::first_type value_type; ///< typedef to `Pair::first_type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
+
+  /// Access a property map element.
+  /// @param pair a key whose first item is accessed
+  reference operator[](key_type& pair) const { return pair.first; }
+
+  typedef First_of_pair_property_map<Pair> Self;
+  /// \name Put/get free functions
+  /// @{
+  friend const value_type& get(const Self&,const key_type& k) {return k.first;}
+  friend         reference get(const Self&,      key_type& k) {return k.first;}
+  friend void put(const Self&,key_type& k, const value_type& v) {k.first=v;}
+  /// @}
+};
+
+/// Free function to create a `First_of_pair_property_map` property map. 
+///
+/// \relates First_of_pair_property_map 
+template <class Pair> // Pair type
+First_of_pair_property_map<Pair>
+  make_first_of_pair_property_map(Pair)
+{
+  return First_of_pair_property_map<Pair>();
+}
+#endif
+
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+/// \ingroup PkgProperty_map
+/// 
+/// Property map that accesses the second item of a `std::pair`. 
+/// 
+/// \tparam Pair Instance of `std::pair`. 
+/// 
+/// \cgalModels `LvaluePropertyMap`
+/// 
+/// \sa `CGAL::First_of_pair_property_map<Pair>`
+template <typename Pair>
+struct Second_of_pair_property_map
+  : public boost::put_get_helper<typename Pair::second_type&,
+                                 Second_of_pair_property_map<Pair> >
+{
+  typedef Pair* key_type; ///< typedef to `Pair*`
+  typedef typename Pair::second_type value_type; ///< typedef to `Pair::second_type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
+
+  /// Access a property map element.
+  ///
+  /// @tparam Iter Type convertible to `key_type`.
+  template <class Iter>
+  reference operator[](Iter pair) const { return reference(pair->second); }
+};
+
+/// Free function to create a Second_of_pair_property_map property map.
+///
+/// \relates Second_of_pair_property_map 
+template <class Iter> // Type convertible to key_type
+Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>
+  make_second_of_pair_property_map(Iter)
+{
+  // value_type_traits is a workaround as back_insert_iterator's value_type is void
+  return Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::type>();
+}
+#else
+/// \ingroup PkgProperty_map
+/// 
+/// Property map that accesses the second item of a `std::pair`. 
+/// 
+/// \tparam Pair Instance of `std::pair`. 
+/// 
+/// \cgalModels `LvaluePropertyMap`
+/// 
+/// \sa `CGAL::First_of_pair_property_map<Pair>`
+template <typename Pair>
+struct Second_of_pair_property_map
+{
+  typedef Pair key_type; ///< typedef to `Pair`
+  typedef typename Pair::second_type value_type; ///< typedef to `Pair::first_type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag
+
+  /// Access a property map element.
+  /// @param pair a key whose second item is accessed
+  reference operator[](key_type& pair) const { return pair.second; }
+
+  typedef Second_of_pair_property_map<Pair> Self;
+  /// \name Put/get free functions
+  /// @{
+  friend const value_type& get(const Self&,const key_type& k) {return k.second;}
+  friend         reference get(const Self&,      key_type& k) {return k.second;}
+  friend void put(const Self&,key_type& k, const value_type& v) {k.second=v;}
+  /// @}
+};
+
+/// Free function to create a Second_of_pair_property_map property map.
+///
+/// \relates Second_of_pair_property_map 
+template <class Pair> // Pair type
+Second_of_pair_property_map<Pair>
+  make_second_of_pair_property_map(Pair)
+{
+  return Second_of_pair_property_map<Pair>();
+}
+#endif
+
+
+
+//=========================================================================
+
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+/// \ingroup PkgProperty_map
+/// 
+/// Property map that accesses the Nth item of a `boost::tuple`. 
+/// 
+/// \tparam N %Index of the item to access.
+/// \tparam Tuple Instance of `boost::tuple`.
+/// 
+/// \cgalModels `LvaluePropertyMap`
+template <int N, typename Tuple>
+struct Nth_of_tuple_property_map
+  : public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
+                                 Nth_of_tuple_property_map<N,Tuple> >
+{
+  typedef Tuple* key_type; ///< typedef to `Tuple*`
+  typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to `boost::tuples::element<N,Tuple>::%type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
+
+  /// Access a property map element.
+  ///
+  /// @tparam Iter Type convertible to `key_type`.
+  template <class Iter>
+  reference operator[](Iter tuple) const { return (reference) tuple->template get<N>(); }
+};
+
+/// Free function to create a Nth_of_tuple_property_map property map.
+///
+/// \relates Nth_of_tuple_property_map
+template <int N, class Iter> // Type convertible to key_type
+Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>
+  make_nth_of_tuple_property_map(Iter)
+{
+  // value_type_traits is a workaround as back_insert_iterator's `value_type` is void
+  return Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::type>();
+}
+#else
+/// \ingroup PkgProperty_map
+/// 
+/// Property map that accesses the Nth item of a `boost::tuple`. 
+/// 
+/// \tparam N %Index of the item to access.
+/// \tparam Tuple Instance of `boost::tuple`.
+/// 
+/// \cgalModels `LvaluePropertyMap`
+template <int N, typename Tuple>
+struct Nth_of_tuple_property_map
+{
+  typedef Tuple key_type; ///< typedef to `Tuple`
+  typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to `boost::tuples::element<N,Tuple>::%type`
+  typedef value_type& reference; ///< typedef to `value_type&`
+  typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
+  /// Access a property map element.
+  /// @param tuple a key whose Nth item is accessed
+  reference operator[](key_type& tuple) const { return tuple.template get<N>(); }
+
+  typedef Nth_of_tuple_property_map<N,Tuple> Self;
+  /// \name Put/get free functions
+  /// @{
+  friend const value_type& get(const Self&,const key_type& k) {return k.template get<N>();}
+  friend         reference get(const Self&,      key_type& k) {return k.template get<N>();}
+  friend void put(const Self&,key_type& k, const value_type& v) {k.template get<N>()=v;}
+  /// @}
+};
+
+/// Free function to create a Nth_of_tuple_property_map property map.
+///
+/// \relates Nth_of_tuple_property_map
+template <int N, class Tuple> // Tuple type
+Nth_of_tuple_property_map<N, Tuple>
+  make_nth_of_tuple_property_map(Tuple)
+{
+  return Nth_of_tuple_property_map<N, Tuple>();
+}
+#endif
+
+} // namespace CGAL
+
+#endif // CGAL_POINT_SET_PROPERTY_MAP_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/radial_orient_normals.h b/3rdparty/CGAL-4.8/include/CGAL/radial_orient_normals.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/radial_orient_normals.h
rename to 3rdparty/CGAL-4.8/include/CGAL/radial_orient_normals.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/random_convex_hull_in_disc_2.h b/3rdparty/CGAL-4.8/include/CGAL/random_convex_hull_in_disc_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/random_convex_hull_in_disc_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/random_convex_hull_in_disc_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/random_convex_set_2.h b/3rdparty/CGAL-4.8/include/CGAL/random_convex_set_2.h
new file mode 100644
index 0000000..5bb3742
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/random_convex_set_2.h
@@ -0,0 +1,125 @@
+// Copyright (c) 1998  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+
+#ifndef CGAL_RANDOM_CONVEX_SET_2_H
+#define CGAL_RANDOM_CONVEX_SET_2_H 1
+
+#include <CGAL/basic.h>
+#include <CGAL/algorithm.h>
+#include <vector>
+#include <algorithm>
+#include <numeric>
+#include <CGAL/Random_convex_set_traits_2.h>
+#include <CGAL/centroid.h>
+#include <boost/functional.hpp>
+
+namespace CGAL {
+
+template < class OutputIterator, class Point_generator, class Traits >
+OutputIterator
+random_convex_set_2( std::size_t n,
+                     OutputIterator o,
+                     const Point_generator& pg,
+                     Traits t)
+{
+  CGAL_precondition( n >= 3);
+
+  using std::vector;
+  using std::back_inserter;
+  using std::accumulate;
+  using std::transform;
+  using std::sort;
+  using std::partial_sum;
+  using std::less;
+  using std::max_element;
+  using CGAL::cpp11::copy_n;
+
+  typedef typename Traits::Point_2         Point_2;
+  typedef typename Traits::FT              FT;
+  typedef vector< Point_2 >                Container;
+  typedef typename Traits::Sum             Sum;
+  typedef typename Traits::Scale           Scale;
+  typedef typename Traits::Angle_less      Angle_less;
+  typedef typename Traits::Max_coordinate  Max_coordinate;
+
+  // GCC 2.8 and egcs-1.0.1 require these:
+  // (does not accept s.l. Scale()( p, 1))
+  Scale scale;
+  Max_coordinate max_coordinate;
+  Sum sum;
+
+  // build random point set:
+  Container points;
+  points.reserve( n);
+  CGAL::cpp11::copy_n( pg, n, back_inserter( points));
+
+  // compute centroid of points:
+  Point_2 centroid = CGAL::centroid( points.begin(), points.end(), t );
+
+  // translate s.t. centroid == origin:
+  transform(
+    points.begin(),
+    points.end(),
+    points.begin(),
+    boost::bind2nd( Sum(), scale( centroid, FT( -1))));
+
+  // sort them according to their direction's angle
+  // w.r.t. the positive x-axis:
+  sort( points.begin(), points.end(), Angle_less());
+
+  // construct polygon:
+  partial_sum(
+    points.begin(), points.end(), points.begin(), Sum());
+
+  // and compute its centroid:
+  Point_2 new_centroid = CGAL::centroid( points.begin(), points.end(), t );
+
+  // translate s.t. centroids match:
+  transform(
+    points.begin(),
+    points.end(),
+    points.begin(),
+    boost::bind2nd( Sum(), sum( centroid,
+                         scale( new_centroid, FT( -1)))));
+
+  // compute maximal coordinate:
+  FT maxcoord( max_coordinate(
+    *max_element( points.begin(),
+                  points.end(),
+                  compose2_2( less< FT >(),
+                                   Max_coordinate(),
+                                   Max_coordinate()))));
+
+  // and finally scale to fit into original grid:
+  return transform(
+    points.begin(),
+    points.end(),
+    o,
+    boost::bind2nd( Scale(), FT( pg.range()) / maxcoord));
+
+} // random_convex_set_2( n, o, pg, t)
+
+} //namespace CGAL
+
+#endif // ! (CGAL_RANDOM_CONVEX_SET_2_H)
diff --git a/3rdparty/CGAL-4.6/include/CGAL/random_polygon_2.h b/3rdparty/CGAL-4.8/include/CGAL/random_polygon_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/random_polygon_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/random_polygon_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/random_selection.h b/3rdparty/CGAL-4.8/include/CGAL/random_selection.h
new file mode 100644
index 0000000..b671b19
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/random_selection.h
@@ -0,0 +1,65 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>
+
+#ifndef CGAL_RANDOM_SELECTION_H
+#define CGAL_RANDOM_SELECTION_H 1
+
+#include <cstddef>
+#include <iterator>
+#include <CGAL/Random.h>
+
+namespace CGAL {
+
+template <class RandomAccessIterator, class Size, class OutputIterator,
+          class Random>
+OutputIterator random_selection( RandomAccessIterator first,
+                                 RandomAccessIterator last,
+                                 Size n,
+                                 OutputIterator result,
+                                 Random& rnd)
+    // choose a random item from the range [`first',`last') and write it
+    // to `result', each item from the range with equal probability.
+    // Repeat this n times, thus writing n items to `result'. A single
+    // random number is needed from `rnd' for each item. Returns the
+    // value of `result' after inserting the n items.
+{
+    std::ptrdiff_t m = last - first;
+    for ( Size i = 0; i < n; i++) {
+        *result++ = first[ rnd(m)];
+    }
+    return result;
+}
+
+template <class RandomAccessIterator, class Size, class OutputIterator>
+OutputIterator random_selection( RandomAccessIterator first,
+                                 RandomAccessIterator last,
+                                 Size n,
+                                 OutputIterator result)
+{
+    return random_selection( first, last, n, result, get_default_random());
+}
+
+} //namespace CGAL    
+
+#endif // CGAL_RANDOM_SELECTION_H //
diff --git a/3rdparty/CGAL-4.6/include/CGAL/random_simplify_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/random_simplify_point_set.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/random_simplify_point_set.h
rename to 3rdparty/CGAL-4.8/include/CGAL/random_simplify_point_set.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/range_search_delaunay_2.h b/3rdparty/CGAL-4.8/include/CGAL/range_search_delaunay_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/range_search_delaunay_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/range_search_delaunay_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/rational_rotation.h b/3rdparty/CGAL-4.8/include/CGAL/rational_rotation.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/rational_rotation.h
rename to 3rdparty/CGAL-4.8/include/CGAL/rational_rotation.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/read_vtk_image_data.h b/3rdparty/CGAL-4.8/include/CGAL/read_vtk_image_data.h
new file mode 100644
index 0000000..eaa8995
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/read_vtk_image_data.h
@@ -0,0 +1,95 @@
+// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
+//               2008 GeometryFactory
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau, Pierre Alliez
+
+#ifndef CGAL_READ_VTK_IMAGE_DATA_H
+#define CGAL_READ_VTK_IMAGE_DATA_H
+
+#include <CGAL/Image_3.h>
+#include <CGAL/Image_3_vtk_interface.h>
+
+namespace CGAL {
+
+namespace {
+
+struct VTK_to_ImageIO_type_mapper {
+  WORD_KIND wordKind;
+  SIGN sign;
+  unsigned int wdim;
+};
+
+static const VTK_to_ImageIO_type_mapper VTK_to_ImageIO_type[VTK_ID_TYPE] = 
+  { { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  0=VTK_VOID
+    { WK_UNKNOWN, SGN_UNKNOWN,  0}, //  1=VTK_BIT
+    { WK_FIXED,   SGN_SIGNED,   1}, //  2=VTK_CHAR
+    { WK_FIXED,   SGN_UNSIGNED, 1}, //  3=VTK_UNSIGNED_CHAR
+    { WK_FIXED,   SGN_SIGNED,   2}, //  4=VTK_SHORT 
+    { WK_FIXED,   SGN_UNSIGNED, 2}, //  5=VTK_UNSIGNED_SHORT
+    { WK_FIXED,   SGN_SIGNED,   4}, //  6=VTK_INT
+    { WK_FIXED,   SGN_UNSIGNED, 4}, //  7=VTK_UNSIGNED_INT
+    { WK_FIXED,   SGN_SIGNED,   8}, //  8=VTK_LONG
+    { WK_FIXED,   SGN_UNSIGNED, 8}, //  9=VTK_UNSIGNED_LONG
+    { WK_FLOAT,   SGN_SIGNED,   4}, // 10=VTK_FLOAT
+    { WK_FIXED,   SGN_SIGNED,   8}  // 11=VTK_DOUBLE
+ }; 
+
+} //end anonymous namespace
+
+inline 
+Image_3
+read_vtk_image_data(vtkImageData* vtk_image)
+{
+  if(!vtk_image)
+    return Image_3();
+
+  _image* image = ::_initImage();
+  const int* dims = vtk_image->GetDimensions();
+  const double* spacing = vtk_image->GetSpacing();
+  image->vectMode = VM_SCALAR;
+  image->xdim = dims[0];
+  image->ydim = dims[1];
+  image->zdim = dims[2];
+  image->vdim = 1;
+  image->vx = spacing[0];
+  image->vy = spacing[1];
+  image->vz = spacing[2];
+  image->endianness = ::_getEndianness();
+  int vtk_type = vtk_image->GetScalarType();
+  if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR;
+  if(vtk_type < 0 || vtk_type > VTK_DOUBLE)
+    vtk_type = VTK_DOUBLE;
+  const VTK_to_ImageIO_type_mapper& imageio_type = 
+    VTK_to_ImageIO_type[vtk_type];
+  image->wdim = imageio_type.wdim;
+  image->wordKind = imageio_type.wordKind;
+  image->sign = imageio_type.sign;
+  image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim);
+  std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
+            << "\nimage->size()=" << dims[0]*dims[1]*dims[2]
+            << "\nwdim=" << image->wdim << '\n';
+  CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
+  vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
+
+  return Image_3(image);
+}
+
+} // namespace CGAL
+
+#endif // CGAL_READ_VTK_IMAGE_DATA_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/rectangular_3_center_2.h b/3rdparty/CGAL-4.8/include/CGAL/rectangular_3_center_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/rectangular_3_center_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/rectangular_3_center_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/rectangular_p_center_2.h b/3rdparty/CGAL-4.8/include/CGAL/rectangular_p_center_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/rectangular_p_center_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/rectangular_p_center_2.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/refine_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/refine_mesh_3.h
new file mode 100644
index 0000000..7cd170b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/refine_mesh_3.h
@@ -0,0 +1,502 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Stephane Tayeb
+//
+//******************************************************************************
+// File Description : refine_mesh_3 function declaration and implementation.
+//******************************************************************************
+
+#ifndef CGAL_REFINE_MESH_3_H
+#define CGAL_REFINE_MESH_3_H
+
+#include <CGAL/config.h>
+#include <CGAL/Mesh_3/config.h>
+#include <CGAL/Mesh_3/Dump_c3t3.h>
+#include <CGAL/Mesh_3/global_parameters.h>
+#include <CGAL/Mesh_3/Mesher_3.h>
+#include <CGAL/optimize_mesh_3.h>
+
+namespace CGAL {
+
+  namespace details {
+    
+    /**
+     * @class Insert_vertex_in_c3t3
+     *
+     * A functor designed to insert unweighted points into the triangulation
+     * of a C3T3 from C3T3::Tr::Vertex , keeping the dimension and indices.
+     */
+    template <typename C3T3>
+    class Insert_vertex_in_c3t3
+    {
+    private:
+      typedef typename C3T3::Vertex_handle          Vertex_handle;
+      typedef typename C3T3::Index                  Index;
+      
+      typedef typename C3T3::Triangulation          Tr;
+      typedef typename Tr::Vertex                   Vertex;
+      typedef typename Tr::Point                    Weighted_point;
+      typedef typename Tr::Point::Weight            Weight;
+      
+    public:
+      Insert_vertex_in_c3t3(C3T3& c3t3)
+        : r_c3t3_(c3t3) {}
+      
+      void operator()(const Vertex& vertex) const
+      {
+        // Get vh properties
+        int dimension = vertex.in_dimension();
+        Weight w = (dimension < 2) ? vertex.point().weight() : 0;
+        Weighted_point point(vertex.point().point(),w);
+        Index index = vertex.index();
+
+        // Insert point and restore handle properties
+        Vertex_handle new_vertex = r_c3t3_.triangulation().insert(point);
+        r_c3t3_.set_index(new_vertex, index);
+        r_c3t3_.set_dimension(new_vertex, dimension);
+
+#if defined(CGAL_LINKED_WITH_TBB)\
+ && !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE)
+        if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Parallel_tag>::value)
+        {
+          if (dimension == -1)
+            r_c3t3_.add_far_point(new_vertex);
+        }
+#endif
+#ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
+        if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Sequential_tag>::value)
+        {
+          if (dimension == -1)
+            r_c3t3_.add_far_point(new_vertex);
+        }
+#endif
+      }
+
+    private:
+      C3T3& r_c3t3_;
+    };
+  }
+  
+  
+namespace parameters {
+  
+  namespace internal {
+    
+    const int undef_parameter = -1;
+    
+    // Helpers
+    struct Optimization_options_base
+    {
+      Optimization_options_base(bool b)
+      : b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {}
+      
+      operator bool() const { return b_; }
+      
+      bool is_time_limit_set() const { return time_limit_ != undef_parameter; }
+      void set_time_limit(double d) { time_limit_ = d; }
+      double time_limit() const { return time_limit_; }
+      
+      bool is_bound_set() const { return bound_ != undef_parameter; }
+      void set_bound(double d) { bound_ = d; }
+      double bound() const { return bound_; }
+      
+    private:
+      bool b_;
+      double time_limit_;
+      double bound_;
+    };
+    
+    struct Global_optimization_options_base
+    {
+      Global_optimization_options_base()
+      : convergence_(undef_parameter), max_it_nb_(undef_parameter) {}
+      
+      bool is_convergence_set() const { return convergence_ != undef_parameter; }
+      void set_convergence(double d) { convergence_ = d; }
+      double convergence() const { return convergence_; }
+      
+      bool is_max_iteration_number_set() const { return max_it_nb_ != undef_parameter; }
+      void set_max_iteration_number(int i) { max_it_nb_ = i; }
+      int max_iteration_number() const { return max_it_nb_; }
+      
+    private:
+      double convergence_;
+      int max_it_nb_; 
+    };
+    
+    // Perturb
+    struct Perturb_options : public Optimization_options_base
+    {
+      Perturb_options(bool b) : Optimization_options_base(b) {}
+    };
+    
+    // Exude
+    struct Exude_options : public Optimization_options_base
+    {
+      Exude_options(bool b) : Optimization_options_base(b) {}
+    };
+    
+    // Odt
+    struct Odt_options : public Optimization_options_base
+    , public Global_optimization_options_base
+    {
+      Odt_options(bool b) : Optimization_options_base(b)
+      , Global_optimization_options_base() {}
+    };
+    
+    // Lloyd
+    struct Lloyd_options : public Optimization_options_base
+    , public Global_optimization_options_base
+    {
+      Lloyd_options(bool b) : Optimization_options_base(b)
+      , Global_optimization_options_base() {}
+    };
+
+    // Various Mesh_3 option
+    struct Mesh_3_options {
+      Mesh_3_options() 
+        : dump_after_init_prefix()
+        , dump_after_refine_surface_prefix()
+        , dump_after_refine_prefix()
+        , dump_after_glob_opt_prefix()
+        , dump_after_perturb_prefix()
+        , dump_after_exude_prefix()
+        , number_of_initial_points()
+      {}
+
+      std::string dump_after_init_prefix;
+      std::string dump_after_refine_surface_prefix;
+      std::string dump_after_refine_prefix;
+      std::string dump_after_glob_opt_prefix;
+      std::string dump_after_perturb_prefix;
+      std::string dump_after_exude_prefix;
+      int number_of_initial_points;
+
+    }; // end struct Mesh_3_options
+
+  } // end namespace internal
+
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+
+  // -----------------------------------
+  // Perturb
+  // -----------------------------------
+  BOOST_PARAMETER_FUNCTION((internal::Perturb_options), perturb, tag,
+                           (optional (time_limit_, *, internal::undef_parameter )
+                                     (sliver_bound_, *, default_values::perturb_sliver_bound )))
+  { 
+    internal::Perturb_options options(true);
+    
+    if ( internal::undef_parameter != time_limit_ )
+      options.set_time_limit(time_limit_);
+    
+    options.set_bound(sliver_bound_);
+    
+    return options;
+  }
+  
+  inline internal::Perturb_options no_perturb() { return internal::Perturb_options(false); }
+  
+  // -----------------------------------
+  // Exude
+  // -----------------------------------
+  BOOST_PARAMETER_FUNCTION((internal::Exude_options), exude, tag,
+                           (optional (time_limit_, *, internal::undef_parameter )
+                                     (sliver_bound_, *, default_values::exude_sliver_bound )))
+  { 
+    internal::Exude_options options(true);
+    
+    if ( internal::undef_parameter != time_limit_ )
+      options.set_time_limit(time_limit_);
+
+    options.set_bound(sliver_bound_);
+    
+    return options;
+  }
+  
+  inline internal::Exude_options no_exude() { return internal::Exude_options(false); }
+  
+  // -----------------------------------
+  // Odt
+  // -----------------------------------
+  BOOST_PARAMETER_FUNCTION((internal::Odt_options), odt, tag,
+                           (optional (time_limit_, *, 0 )
+                                     (max_iteration_number_, *, 0 )
+                                     (convergence_, *, default_values::odt_convergence_ratio )
+                                     (freeze_bound_, *, default_values::odt_freeze_ratio )))
+  { 
+    internal::Odt_options options(true);
+
+    options.set_time_limit(time_limit_);
+    options.set_bound(freeze_bound_);
+    options.set_convergence(convergence_);
+    options.set_max_iteration_number(max_iteration_number_);
+    
+    return options;
+  }
+  
+  inline internal::Odt_options no_odt() { return internal::Odt_options(false); }
+  
+  // -----------------------------------
+  // Lloyd
+  // -----------------------------------
+  BOOST_PARAMETER_FUNCTION((internal::Lloyd_options), lloyd, tag,
+                           (optional (time_limit_, *, 0 )
+                                     (max_iteration_number_, *, 0 )
+                                     (convergence_, *, default_values::lloyd_convergence_ratio )
+                                     (freeze_bound_, *, default_values::lloyd_freeze_ratio )))
+  { 
+    internal::Lloyd_options options(true);
+    
+    options.set_time_limit(time_limit_);
+    options.set_bound(freeze_bound_);
+    options.set_convergence(convergence_);
+    options.set_max_iteration_number(max_iteration_number_);
+    
+    return options;
+  }
+  
+  inline internal::Lloyd_options no_lloyd() { return internal::Lloyd_options(false); }
+  
+  // Mesh options
+  // -----------------------------------
+
+  // Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
+  // Allows to dump the mesh at given stage of the mesh generation
+  // algorithm.
+  BOOST_PARAMETER_FUNCTION((internal::Mesh_3_options), mesh_3_options, tag,
+                           (optional 
+                            (dump_after_init_prefix_, (std::string), "" )
+                            (dump_after_refine_surface_prefix_, (std::string), "" )
+                            (dump_after_refine_prefix_, (std::string), "" )
+                            (dump_after_glob_opt_prefix_, (std::string), "" )
+                            (dump_after_perturb_prefix_, (std::string), "" )
+                            (dump_after_exude_prefix_, (std::string), "" )
+                            (number_of_initial_points_, (int), -1)
+                            )
+                           )
+  { 
+    internal::Mesh_3_options options;
+
+    options.dump_after_init_prefix=dump_after_init_prefix_;
+    options.dump_after_refine_surface_prefix=dump_after_refine_surface_prefix_;
+    options.dump_after_refine_prefix=dump_after_refine_prefix_;
+    options.dump_after_glob_opt_prefix=dump_after_glob_opt_prefix_;
+    options.dump_after_perturb_prefix=dump_after_perturb_prefix_;
+    options.dump_after_exude_prefix=dump_after_exude_prefix_;
+    options.number_of_initial_points=number_of_initial_points_;
+
+    return options;
+  }
+  
+  // Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
+  // Default Mesh_3_options: dump at every stage of the mesh generation.
+  inline internal::Mesh_3_options mesh_3_dump()
+  {
+    internal::Mesh_3_options options;
+
+    options.dump_after_init_prefix="mesh_dump_after_init";
+    options.dump_after_refine_surface_prefix="mesh_dump_after_refine_surface";
+    options.dump_after_refine_prefix="mesh_dump_after_refine";
+    options.dump_after_glob_opt_prefix="mesh_dump_after_glob_opt";
+    options.dump_after_perturb_prefix="mesh_dump_after_perturb";
+    options.dump_after_exude_prefix="mesh_dump_after_exude";
+    
+    return options;
+  }
+
+CGAL_PRAGMA_DIAG_POP
+
+  // -----------------------------------
+  // Reset_c3t3 (undocumented)
+  // -----------------------------------
+  CGAL_MESH_BOOLEAN_PARAMETER(Reset,reset_c3t3,no_reset_c3t3)
+  // CGAL_MESH_BOOLEAN_PARAMETER defined in <CGAL/Mesh_3/global_parameters.h>
+  
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+  // -----------------------------------
+  // Parameters
+  // -----------------------------------
+  BOOST_PARAMETER_NAME( exude_param )
+  BOOST_PARAMETER_NAME( perturb_param )
+  BOOST_PARAMETER_NAME( odt_param )
+  BOOST_PARAMETER_NAME( lloyd_param )
+  BOOST_PARAMETER_NAME( reset_param )
+  BOOST_PARAMETER_NAME( mesh_options_param )
+
+CGAL_PRAGMA_DIAG_POP
+} // end namespace parameters
+  
+// see <CGAL/config.h>
+CGAL_PRAGMA_DIAG_PUSH
+// see <CGAL/Mesh_3/config.h>
+CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
+
+BOOST_PARAMETER_FUNCTION(
+  (void),
+  refine_mesh_3,
+  parameters::tag,
+  (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced
+  (deduced 
+    (optional
+      (exude_param, (parameters::internal::Exude_options), parameters::exude())
+      (perturb_param, (parameters::internal::Perturb_options), parameters::perturb())
+      (odt_param, (parameters::internal::Odt_options), parameters::no_odt())
+      (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
+      (reset_param, (parameters::Reset), parameters::reset_c3t3())
+      (mesh_options_param, (parameters::internal::Mesh_3_options), 
+                           parameters::internal::Mesh_3_options())
+    )
+  )
+)
+{
+  return refine_mesh_3_impl(c3t3,
+                            domain,
+                            criteria,
+                            exude_param,
+                            perturb_param,
+                            odt_param,
+                            lloyd_param,
+                            reset_param(),
+                            mesh_options_param);
+}
+
+CGAL_PRAGMA_DIAG_POP
+
+  
+/**
+ * @brief This function refines the mesh c3t3 wrt domain & criteria
+ *
+ * @param c3t3 the mesh to be refined.
+ * @param domain the domain to be discretized
+ * @param criteria the criteria
+ * @param exude if \c true, an exudation step will be done at
+ *   the end of the Delaunay refinement process
+ * @param perturb if \c true, an explicit vertex perturbation step will be
+ *   done at the end of refinement process
+ * @param reset_c3t3 if \c true, a new C3T3 will be construct from param c3t3.
+ *   The new c3t3 keeps only the vertices (as NON-weighted points with their
+ *   dimension and Index) of the triangulation. That allows to refine a mesh
+ *   which has been exuded.
+ * @param mesh_3_various_options is a struct object used to pass
+ * non-documented options, for debugging purpose.
+ */
+template<class C3T3, class MeshDomain, class MeshCriteria>
+void refine_mesh_3_impl(C3T3& c3t3,
+                        const MeshDomain&   domain,
+                        const MeshCriteria& criteria,
+                        const parameters::internal::Exude_options& exude,
+                        const parameters::internal::Perturb_options& perturb,
+                        const parameters::internal::Odt_options& odt,
+                        const parameters::internal::Lloyd_options& lloyd,
+                        bool reset_c3t3,
+                        const parameters::internal::Mesh_3_options& 
+                          mesh_options = parameters::internal::Mesh_3_options())
+{
+  typedef Mesh_3::Mesher_3<C3T3, MeshCriteria, MeshDomain> Mesher;
+
+  // Reset c3t3 (i.e. remove weights) if needed
+  if ( reset_c3t3 )
+  {
+    C3T3 tmp_c3t3;
+    std::for_each(c3t3.triangulation().finite_vertices_begin(),
+                  c3t3.triangulation().finite_vertices_end(),
+                  details::Insert_vertex_in_c3t3<C3T3>(tmp_c3t3));
+    // TODO: corners and edges are not restored
+    c3t3.swap(tmp_c3t3);
+  }
+  
+  dump_c3t3(c3t3, mesh_options.dump_after_init_prefix);
+
+  // Build mesher and launch refinement process
+  Mesher mesher (c3t3, domain, criteria);
+  double refine_time = mesher.refine_mesh(mesh_options.dump_after_refine_surface_prefix);
+  c3t3.clear_manifold_info();
+
+  dump_c3t3(c3t3, mesh_options.dump_after_refine_prefix);
+
+  // Odt
+  if ( odt )
+  {
+    odt_optimize_mesh_3(c3t3,
+                        domain,
+                        parameters::time_limit = odt.time_limit(),
+                        parameters::max_iteration_number = odt.max_iteration_number(),
+                        parameters::convergence = odt.convergence(),
+                        parameters::freeze_bound = odt.bound());
+  }
+  
+  // Lloyd
+  if ( lloyd )
+  {
+    lloyd_optimize_mesh_3(c3t3,
+                          domain,
+                          parameters::time_limit = lloyd.time_limit(),
+                          parameters::max_iteration_number = lloyd.max_iteration_number(),
+                          parameters::convergence = lloyd.convergence(),
+                          parameters::freeze_bound = lloyd.bound());
+  }
+    
+  dump_c3t3(c3t3, mesh_options.dump_after_glob_opt_prefix);
+
+  // Perturbation
+  if ( perturb )
+  {
+    double perturb_time_limit = refine_time;
+    
+    if ( perturb.is_time_limit_set() )
+      perturb_time_limit = perturb.time_limit();
+
+    perturb_mesh_3(c3t3,
+                   domain,
+                   parameters::time_limit = perturb_time_limit,
+                   parameters::sliver_bound = perturb.bound());
+  }
+  
+  dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
+
+  // Exudation
+  if ( exude )
+  {
+    double exude_time_limit = refine_time;
+    
+    if ( exude.is_time_limit_set() )
+      exude_time_limit = exude.time_limit();
+    
+    exude_mesh_3(c3t3,
+                 parameters::time_limit = exude_time_limit,
+                 parameters::sliver_bound = exude.bound());
+  }
+  
+  dump_c3t3(c3t3, mesh_options.dump_after_exude_prefix);
+
+}
+
+}  // end namespace CGAL
+
+
+#endif // CGAL_REFINE_MESH_3_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/regular_neighbor_coordinates_2.h b/3rdparty/CGAL-4.8/include/CGAL/regular_neighbor_coordinates_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/regular_neighbor_coordinates_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/regular_neighbor_coordinates_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/remove_far_points_in_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/remove_far_points_in_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/remove_far_points_in_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/remove_far_points_in_mesh_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/remove_outliers.h b/3rdparty/CGAL-4.8/include/CGAL/remove_outliers.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/remove_outliers.h
rename to 3rdparty/CGAL-4.8/include/CGAL/remove_outliers.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/representation_tags.h b/3rdparty/CGAL-4.8/include/CGAL/representation_tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/representation_tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/representation_tags.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/result_of.h b/3rdparty/CGAL-4.8/include/CGAL/result_of.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/result_of.h
rename to 3rdparty/CGAL-4.8/include/CGAL/result_of.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/segment_intersection_points_2.h b/3rdparty/CGAL-4.8/include/CGAL/segment_intersection_points_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/segment_intersection_points_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/segment_intersection_points_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/sibson_gradient_fitting.h b/3rdparty/CGAL-4.8/include/CGAL/sibson_gradient_fitting.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/sibson_gradient_fitting.h
rename to 3rdparty/CGAL-4.8/include/CGAL/sibson_gradient_fitting.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/simple_transformations_d.h b/3rdparty/CGAL-4.8/include/CGAL/simple_transformations_d.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/simple_transformations_d.h
rename to 3rdparty/CGAL-4.8/include/CGAL/simple_transformations_d.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/simplest_rational_in_interval.h b/3rdparty/CGAL-4.8/include/CGAL/simplest_rational_in_interval.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/simplest_rational_in_interval.h
rename to 3rdparty/CGAL-4.8/include/CGAL/simplest_rational_in_interval.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/sorted_matrix_search.h b/3rdparty/CGAL-4.8/include/CGAL/sorted_matrix_search.h
new file mode 100644
index 0000000..1ac8585
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/sorted_matrix_search.h
@@ -0,0 +1,415 @@
+// Copyright (c) 1998-2003  ETH Zurich (Switzerland).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Hoffmann <hoffmann at inf.ethz.ch>
+
+#ifndef CGAL_SORTED_MATRIX_SEARCH_H
+#define CGAL_SORTED_MATRIX_SEARCH_H 1
+
+#include <CGAL/basic.h>
+#include <CGAL/Optimisation/assertions.h>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <vector>
+#include <CGAL/Sorted_matrix_search_traits_adaptor.h>
+
+namespace CGAL {
+template < class Matrix >
+class Padded_matrix {
+public:
+  typedef typename Matrix::Value Value;
+
+  Padded_matrix( const Matrix& m) : matrix( &m) {}
+
+  Value
+  operator()( int x, int y) const
+  // padded access operator
+  {
+    return matrix->operator()(
+      x < matrix->number_of_columns() ?
+        x : matrix->number_of_columns() - 1,
+      y < matrix->number_of_rows() ?
+        y : matrix->number_of_rows() - 1);
+  }
+
+  bool
+  is_sorted()
+  // tests iff this matrix is sorted, i.e. in each column/row
+  // the elements appear in increasing order
+  // time complexity is proportional to the number of elements
+  {
+    for ( int i = 0; i < matrix->number_of_columns(); ++i)
+      for ( int j = 0; j < matrix->number_of_rows(); ++j) {
+        if ( i > 0 && (*matrix)( i - 1, j) > (*matrix)( i, j))
+          return false;
+        if ( j > 0 && (*matrix)( i, j - 1) > (*matrix)( i, j))
+          return false;
+      }
+    return true;
+  }
+
+private:
+  const Matrix* matrix;
+};
+template < class PaddedMatrix >
+class Matrix_cell {
+public:
+  typedef typename PaddedMatrix::Value Value;
+
+  Matrix_cell(PaddedMatrix m, int xpos = 0, int ypos = 0)
+  : base_matrix(m), x(xpos), y(ypos)
+  {}
+
+  Value
+  min
+  BOOST_PREVENT_MACRO_SUBSTITUTION
+  () const
+  { return base_matrix(x, y); }
+
+  Value
+  max
+  BOOST_PREVENT_MACRO_SUBSTITUTION
+  (int offset) const
+  // offset denotes the cell's dimension
+  { return base_matrix(x + offset - 1, y + offset - 1); }
+
+  int          x_min() const  { return x; }
+  int          y_min() const  { return y; }
+  PaddedMatrix matrix() const { return base_matrix; }
+
+  void
+  output(std::ostream& o, int dim) const
+  {
+    for (int i = 0; i < dim; ++i) {
+      for (int j = 0; j < dim; ++j)
+        o << base_matrix(x + i, y + j) << " ";
+      o << std::endl;
+    }
+  }
+
+  bool
+  check_for(Value v, int dim) const {
+    for (int i = 0; i < dim; ++i)
+      for (int j = 0; j < dim; ++j) {
+        if (CGAL_NTS abs(base_matrix(x + i, y + j) - v) < Value(1E-10))
+          std::cerr << "***" << base_matrix(x + i, y + j) << std::endl;
+        if (base_matrix(x + i, y + j) == v)
+          return true;
+      }
+    return false;
+  }
+
+private:
+  PaddedMatrix base_matrix;
+  int x;
+  int y;
+};
+template < class Cell >
+struct Cell_min
+: public std::unary_function< Cell, typename Cell::Value >
+{
+  typename Cell::Value
+  operator()( const Cell& c) const
+  { return (c.min)(); }
+};
+
+template < class Cell >
+struct Cell_max
+: public std::unary_function< Cell, typename Cell::Value > {
+
+  Cell_max( int offset) : ofs( offset) {}
+
+  typename Cell::Value
+  operator()( const Cell& c) const
+  { return (c.max)( ofs); }
+
+private:
+  int ofs;
+};
+
+
+template < class InputIterator, class Traits >
+typename Traits::Value
+sorted_matrix_search(InputIterator f, InputIterator l, Traits t)
+{
+  BOOST_USING_STD_MAX();
+  using std::iter_swap;
+  using std::find_if;
+  using std::remove_if;
+  using std::logical_or;
+  using std::equal_to;
+  
+  typedef typename Traits::Matrix                   Matrix;
+  typedef typename Traits::Value                    Value;
+  typedef Padded_matrix< Matrix >                   PaddedMatrix;
+  typedef Matrix_cell< PaddedMatrix >               Cell;
+  typedef std::vector< Cell >                       Cell_container;
+  typedef typename Cell_container::iterator         Cell_iterator;
+  // typedef typename Cell_container::reverse_iterator Cell_reverse_iterator;
+  
+  Cell_container active_cells;
+  
+  // set of input matrices must not be empty:
+  CGAL_optimisation_precondition( f != l);
+  
+  // for each input matrix insert a cell into active_cells:
+  InputIterator i( f);
+  int maxdim( -1);
+  while ( i != l) {
+    CGAL_optimisation_expensive_precondition(
+      PaddedMatrix( *i).is_sorted());
+    active_cells.push_back( Cell( PaddedMatrix( *i)));
+    maxdim = max BOOST_PREVENT_MACRO_SUBSTITUTION ( max BOOST_PREVENT_MACRO_SUBSTITUTION ( (*i).number_of_columns(),
+                       (*i).number_of_rows()),
+                  maxdim);
+    ++i;
+  }
+  CGAL_optimisation_precondition( maxdim > 0);
+  
+  
+  // current cell dimension:
+  int ccd( 1);
+  // set ccd to a power of two >= maxdim:
+  while ( ccd < maxdim)
+    ccd <<= 1;
+  
+  
+  
+
+  // now start the search:
+
+  for (;;) {
+  
+    if ( ccd > 1) {
+      // ------------------------------------------------------
+      // divide cells:
+      ccd >>= 1;
+    
+    
+      // reserve is required here!
+      // otherwise one of the insert operations might cause
+      // a reallocation invalidating j
+      // (should typically result in a segfault)
+      // active_cells.reserve( 4 * active_cells.size());
+  
+      for ( int j = static_cast<int>(active_cells.size()) - 1 ; j >= 0 ; -- j )
+      {
+      //for ( Cell_reverse_iterator j( active_cells.rbegin());
+      //      j != active_cells.rend();
+      //      ++j) {
+
+        Cell lRefCell = active_cells.at(j) ;
+        
+        // upper-left quarter:
+        // Cell( (*j).matrix(),
+        //       (*j).x_min(),
+        //       (*j).y_min()) remains in active_cells,
+        // since it is implicitly shortened by decreasing ccd
+    
+        // lower-left quarter:
+        active_cells.push_back(
+          Cell( lRefCell.matrix(),
+                lRefCell.x_min(),
+                lRefCell.y_min() + ccd));
+    
+        // upper-right quarter:
+        active_cells.push_back(
+          Cell( lRefCell.matrix(),
+                lRefCell.x_min() + ccd,
+                lRefCell.y_min()));
+    
+        // lower-right quarter:
+        active_cells.push_back(
+          Cell( lRefCell.matrix(),
+                lRefCell.x_min() + ccd,
+                lRefCell.y_min() + ccd));
+    
+      } // for all active cells
+    } // if ( ccd > 1)
+    else if ( active_cells.size() <= 1) //!!! maybe handle <= 3
+      break;
+      
+    // there has to be at least one cell left:
+    CGAL_optimisation_assertion( active_cells.size() > 0);
+    
+    // ------------------------------------------------------
+    // compute medians of smallest and largest elements:
+    
+    
+    int lower_median_rank = static_cast<int>((active_cells.size() - 1) >> 1);
+    int upper_median_rank = static_cast<int>(active_cells.size() >> 1);
+    
+
+    // compute upper median of cell's minima:
+    std::nth_element(active_cells.begin(),
+                active_cells.begin() + upper_median_rank,
+                active_cells.end(),
+                boost::bind(
+                  t.compare_strictly(),
+                  boost::bind(Cell_min<Cell>(), _1),
+		  boost::bind(Cell_min<Cell>(), _2)));
+    
+    Cell_iterator lower_median_cell =
+      active_cells.begin() + upper_median_rank;
+    Value lower_median = (lower_median_cell->min)();
+    
+    // compute lower median of cell's maxima:
+    std::nth_element(active_cells.begin(),
+                active_cells.begin() + lower_median_rank,
+                active_cells.end(),
+                boost::bind(
+                  t.compare_strictly(),
+                  boost::bind(Cell_max< Cell >(ccd), _1),
+                  boost::bind(Cell_max< Cell >(ccd), _2)));
+    
+    Cell_iterator upper_median_cell =
+      active_cells.begin() + lower_median_rank;
+    Value upper_median = (upper_median_cell->max)(ccd);
+    
+    // restore lower_median_cell, if it has been displaced
+    // by the second search
+    if ((lower_median_cell->min)() != lower_median)
+      lower_median_cell =
+        find_if(active_cells.begin(),
+                active_cells.end(),
+                boost::bind(
+		  equal_to< Value >(), 
+		  lower_median,
+		  boost::bind(Cell_min< Cell >(), _1)));
+    CGAL_optimisation_assertion(lower_median_cell != active_cells.end());
+    // ------------------------------------------------------
+    // test feasibility of medians and remove cells accordingly:
+    Cell_iterator new_end;
+    
+    
+    if ( t.is_feasible( lower_median))
+      if ( t.is_feasible( upper_median)) {
+        // lower_median and upper_median are feasible
+    
+        // discard cells with all entries greater than
+        // min( lower_median, upper_median) except for
+        // one cell defining this minimum
+    
+        Cell_iterator min_median_cell;
+        Value min_median;
+        if ( lower_median < upper_median) {
+          min_median_cell = lower_median_cell;
+          min_median = lower_median;
+        }
+        else {
+          min_median_cell = upper_median_cell;
+          min_median = upper_median;
+        }
+    
+        // save min_median_cell:
+        iter_swap( min_median_cell, active_cells.begin());
+    
+        new_end =
+          remove_if(
+            active_cells.begin() + 1,
+            active_cells.end(),
+            boost::bind(
+              t.compare_non_strictly(), 
+	      min_median,
+              boost::bind(Cell_min< Cell >(), _1)));
+    
+      } // lower_median and upper_median are feasible
+      else { // lower_median is feasible, but upper_median is not
+    
+        // discard cells with all entries greater than
+        // lower_median or all entries smaller than
+        // upper_median except for the lower median cell
+    
+        // save lower_median_cell:
+        iter_swap( lower_median_cell, active_cells.begin());
+    
+        new_end =
+          remove_if(
+            active_cells.begin() + 1,
+            active_cells.end(),
+            boost::bind(
+              logical_or< bool >(),
+	      boost::bind(
+	        t.compare_non_strictly(),
+		lower_median,
+                boost::bind(Cell_min< Cell >(), _1)),
+	      boost::bind(
+                  t.compare_non_strictly(),
+                  boost::bind(Cell_max< Cell >( ccd), _1),
+		  upper_median)));
+    
+      } // lower_median is feasible, but upper_median is not
+    else
+      if ( t.is_feasible( upper_median)) {
+        // upper_median is feasible, but lower_median is not
+    
+        // discard cells with all entries greater than
+        // upper_median or all entries smaller than
+        // lower_median except for the upper median cell
+    
+        // save upper_median_cell:
+        iter_swap( upper_median_cell, active_cells.begin());
+    
+        new_end =
+          remove_if(
+            active_cells.begin() + 1,
+            active_cells.end(),
+	    boost::bind(
+              logical_or< bool >(),
+	      boost::bind(
+		t.compare_non_strictly(),
+		upper_median,
+                boost::bind(Cell_min< Cell >(), _1)),
+	      boost::bind(
+                t.compare_non_strictly(),
+		boost::bind(Cell_max< Cell >( ccd), _1),
+		lower_median)));
+    
+      } // upper_median is feasible, but lower_median is not
+      else { // both upper_median and lower_median are infeasible
+    
+        // discard cells with all entries smaller than
+        // max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median)
+    
+        new_end =
+          remove_if(
+            active_cells.begin(),
+            active_cells.end(),
+            boost::bind(
+              t.compare_non_strictly(),
+	      boost::bind(Cell_max< Cell >( ccd), _1),
+	      max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median)));
+    
+      } // both upper_median and lower_median are infeasible
+    
+    active_cells.erase( new_end, active_cells.end());
+  } // for (;;)
+
+  // there must be only one cell left:
+  CGAL_optimisation_assertion( active_cells.size() == 1);
+  CGAL_optimisation_assertion( ccd == 1);
+
+  return ((*active_cells.begin()).min)();
+}
+
+} //namespace CGAL
+
+#endif // ! (CGAL_SORTED_MATRIX_SEARCH_H)
+// ----------------------------------------------------------------------------
+// ** EOF
+// ----------------------------------------------------------------------------
diff --git a/3rdparty/CGAL-4.8/include/CGAL/spatial_sort.h b/3rdparty/CGAL-4.8/include/CGAL/spatial_sort.h
new file mode 100644
index 0000000..5dca219
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/spatial_sort.h
@@ -0,0 +1,196 @@
+// Copyright (c) 2007-2011  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Christophe Delage
+
+#ifndef CGAL_SPATIAL_SORT_H
+#define CGAL_SPATIAL_SORT_H
+
+#include <CGAL/basic.h>
+
+#include <CGAL/hilbert_sort.h>
+#include <CGAL/Multiscale_sort.h>
+
+#include <boost/random/random_number_generator.hpp>
+#include <CGAL/algorithm.h>
+#include <boost/random.hpp>
+#include <boost/random/linear_congruential.hpp>
+
+#include <algorithm>
+
+namespace CGAL {
+
+
+namespace internal {
+
+    template <class RandomAccessIterator, class Policy, class Kernel>
+    void spatial_sort (
+                       RandomAccessIterator begin, RandomAccessIterator end,
+                       const Kernel &k, 
+		       Policy /*policy*/,
+		       typename Kernel::Point_2 *,
+		       std::ptrdiff_t threshold_hilbert,
+		       std::ptrdiff_t threshold_multiscale,
+		       double ratio)
+    {
+      typedef Hilbert_sort_2<Kernel, Policy> Sort;
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end,rng);
+#else
+        std::random_shuffle(begin,end,rng);
+#endif
+
+	if (threshold_hilbert==0) threshold_hilbert=4;
+	if (threshold_multiscale==0) threshold_multiscale=16;
+	if (ratio==0.0) ratio=0.25;
+
+        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
+				threshold_multiscale, ratio)) (begin, end);
+    }
+
+    template <class RandomAccessIterator, class Policy, class Kernel>
+    void spatial_sort (
+                       RandomAccessIterator begin, RandomAccessIterator end,
+                       const Kernel &k, 
+		       Policy /*policy*/,
+		       typename Kernel::Point_3 *,
+		       std::ptrdiff_t threshold_hilbert,
+		       std::ptrdiff_t threshold_multiscale,
+		       double ratio)
+    {
+      typedef Hilbert_sort_3<Kernel, Policy> Sort;
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end, rng);
+#else
+        std::random_shuffle(begin,end, rng);
+#endif
+
+	if (threshold_hilbert==0) threshold_hilbert=8;
+	if (threshold_multiscale==0) threshold_multiscale=64;
+	if (ratio==0.0) ratio=0.125;
+
+        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
+				threshold_multiscale, ratio)) (begin, end);
+    }
+
+    template <class RandomAccessIterator, class Policy, class Kernel>
+    void spatial_sort (
+		       RandomAccessIterator begin, RandomAccessIterator end,
+                       const Kernel &k, 
+		       Policy /*policy*/,
+		       typename Kernel::Point_d *,
+		       std::ptrdiff_t threshold_hilbert,
+		       std::ptrdiff_t threshold_multiscale,
+		       double ratio)
+    {
+      typedef Hilbert_sort_d<Kernel, Policy> Sort;
+        boost::rand48 random;
+        boost::random_number_generator<boost::rand48> rng(random);
+#if defined(CGAL_HILBERT_SORT_WITH_MEDIAN_POLICY_CROSS_PLATFORM_BEHAVIOR)
+        CGAL::random_shuffle(begin,end, rng);
+#else
+        std::random_shuffle(begin,end, rng);
+#endif	
+
+	if (threshold_hilbert==0) threshold_hilbert=10;
+	if (threshold_multiscale==0) threshold_multiscale=500;
+	if (ratio==0.0) ratio=0.05;
+
+        (Multiscale_sort<Sort> (Sort (k, threshold_hilbert), 
+				threshold_multiscale, ratio)) (begin, end);
+    }
+
+}
+
+
+template <class RandomAccessIterator, class Policy, class Kernel>
+void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
+                   const Kernel &k,
+		   Policy policy,
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+
+    internal::spatial_sort(begin, end, k, policy, static_cast<value_type *> (0),
+			   threshold_hilbert,threshold_multiscale,ratio);
+}
+
+template <class RandomAccessIterator>
+void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_median_policy policy,
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    spatial_sort (begin, end, Kernel(), policy,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+template <class RandomAccessIterator>
+void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_middle_policy policy,
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    spatial_sort (begin, end, Kernel(), policy,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+
+template <class RandomAccessIterator, class Kernel>
+void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
+                   const Kernel &k,
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    spatial_sort (begin, end, k,
+		  Hilbert_sort_median_policy(),
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+template <class RandomAccessIterator>
+void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end,
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    spatial_sort (begin, end,
+		  Hilbert_sort_median_policy(),
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+} // namespace CGAL
+
+#endif//CGAL_SPATIAL_SORT_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/spatial_sort_on_sphere.h b/3rdparty/CGAL-4.8/include/CGAL/spatial_sort_on_sphere.h
new file mode 100644
index 0000000..1e1f0d5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/spatial_sort_on_sphere.h
@@ -0,0 +1,144 @@
+// Copyright (c) 2015  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Olivier Devillers
+//               : Pedro Machado Manhaes de Castro
+
+
+#ifndef CGAL_SPATIAL_SORT_ON_SPHERE_H
+#define CGAL_SPATIAL_SORT_ON_SPHERE_H
+
+#include <CGAL/spatial_sort.h>
+#include <CGAL/hilbert_sort_on_sphere.h>
+
+namespace CGAL {
+
+namespace internal {
+
+template <class RandomAccessIterator, class Policy, class Kernel>
+void spatial_sort_on_sphere (
+                   RandomAccessIterator begin, RandomAccessIterator end,
+                   const Kernel &k,
+                   Policy /*policy*/,
+                   typename Kernel::Point_3 *,
+                   double sq_r,
+                   const typename Kernel::Point_3 &p,
+                   std::ptrdiff_t threshold_hilbert,
+                   std::ptrdiff_t threshold_multiscale,
+                   double ratio)
+{
+  typedef Hilbert_sort_on_sphere_3<Kernel, Policy> Sort;
+    boost::rand48 random;
+    boost::random_number_generator<boost::rand48> rng(random);
+    std::random_shuffle(begin,end, rng);
+
+            if (threshold_hilbert==0) threshold_hilbert=4;
+            if (threshold_multiscale==0) threshold_multiscale=16;
+            if (ratio==0.0) ratio=0.25;
+
+    (Multiscale_sort<Sort> (Sort (k, sq_r, p, threshold_hilbert),
+                            threshold_multiscale, ratio)) (begin, end);
+}
+
+} // end of namespace internal
+
+template <class RandomAccessIterator, class Policy, class Kernel>
+void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+                   const Kernel &k,
+		   Policy policy,
+		   double sq_r=1.0,
+		   const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0),
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+
+    internal::spatial_sort_on_sphere(begin, end, k, policy, static_cast<value_type *> (0),
+			   sq_r,p, threshold_hilbert,threshold_multiscale,ratio);
+}
+
+template <class RandomAccessIterator>
+void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_median_policy policy,
+		   double sq_r=1.0,
+		   const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+		     typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0),
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    spatial_sort_on_sphere (begin, end, Kernel(), policy, sq_r, p,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+template <class RandomAccessIterator>
+void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+		   Hilbert_sort_middle_policy policy,
+		   double sq_r=1.0,
+		   const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+		     typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0),
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    typedef std::iterator_traits<RandomAccessIterator> ITraits;
+    typedef typename ITraits::value_type               value_type;
+    typedef CGAL::Kernel_traits<value_type>            KTraits;
+    typedef typename KTraits::Kernel                   Kernel;
+
+    spatial_sort_on_sphere (begin, end, Kernel(), policy, sq_r,p,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+
+template <class RandomAccessIterator, class Kernel>
+void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+		   const Kernel &k,
+		   double sq_r = 1.0,
+           const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0),
+           std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    spatial_sort_on_sphere (begin, end, k,
+		  Hilbert_sort_median_policy(), sq_r, p,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+template <class RandomAccessIterator>
+void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
+           double sq_r = 1.0,
+		   const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
+	       typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0),
+		   std::ptrdiff_t threshold_hilbert=0,
+		   std::ptrdiff_t threshold_multiscale=0,
+		   double ratio=0.0)
+{
+    spatial_sort_on_sphere (begin, end,
+		  Hilbert_sort_median_policy(), sq_r,p,
+		  threshold_hilbert,threshold_multiscale,ratio);
+}
+
+} // end of namespace CGAL
+
+#endif // CGAL_SPATIAL_SORT_ON_SPHERE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_2.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_2_1.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_2_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_2_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_2_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_2_2.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_2_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_2_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_2_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_3.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_0.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_0.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_0.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_0.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_1.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_1.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_1.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_1.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_2.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_2.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_3_2.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_3_2.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/squared_distance_utils.h b/3rdparty/CGAL-4.8/include/CGAL/squared_distance_utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/squared_distance_utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/squared_distance_utils.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/sse2.h b/3rdparty/CGAL-4.8/include/CGAL/sse2.h
new file mode 100644
index 0000000..6ac5173
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/sse2.h
@@ -0,0 +1,36 @@
+// Copyright (c) 1999,2007  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  Andreas Fabri
+
+#ifndef CGAL_SSE2_H
+#define CGAL_SSE2_H
+
+#include <emmintrin.h>
+
+#if defined ( _WIN32 )
+#define CGAL_ALIGN_16  __declspec(align(16))
+#elif defined( __GNUC__ ) || defined(__MINGW64__)
+#define  CGAL_ALIGN_16 __attribute__((aligned(16))) 
+#endif
+
+#endif // CGAL_SSE2_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/streamlines_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/streamlines_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/streamlines_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/streamlines_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/subdivide_skin_surface_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/subdivide_skin_surface_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/subdivide_skin_surface_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/subdivide_skin_surface_mesh_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/subdivide_union_of_balls_mesh_3.h b/3rdparty/CGAL-4.8/include/CGAL/subdivide_union_of_balls_mesh_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/subdivide_union_of_balls_mesh_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/subdivide_union_of_balls_mesh_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/surface_mesh_parameterization_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/surface_mesh_parameterization_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/surface_mesh_parameterization_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/surface_mesh_parameterization_assertions.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/surface_neighbor_coordinates_3.h b/3rdparty/CGAL-4.8/include/CGAL/surface_neighbor_coordinates_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/surface_neighbor_coordinates_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/surface_neighbor_coordinates_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/surface_neighbors_3.h b/3rdparty/CGAL-4.8/include/CGAL/surface_neighbors_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/surface_neighbors_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/surface_neighbors_3.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/surface_reconstruction_points_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/surface_reconstruction_points_assertions.h
new file mode 100644
index 0000000..0ea532a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/surface_reconstruction_points_assertions.h
@@ -0,0 +1,368 @@
+// Copyright (c) 2007  INRIA (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman, Sven Schoenherr, Laurent Saboret
+//
+// Generated from script create_assertions.sh
+
+/// \cond SKIP_IN_MANUAL
+
+/// @file surface_reconstruction_points_assertions.h
+/// Define checking macros for the Poisson_surface_reconstruction_3 package
+
+// Note that this header file is intentionnaly not protected with a
+// macro (as <cassert>). Calling it a second time with another value
+// for NDEBUG for example must make a difference.
+
+#include <CGAL/assertions.h>
+
+// macro definitions
+// =================
+// assertions
+// ----------
+
+#undef CGAL_surface_reconstruction_points_assertion
+#undef CGAL_surface_reconstruction_points_assertion_msg
+#undef CGAL_surface_reconstruction_points_assertion_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_assertion(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_assertion_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_assertion_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_assertions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
+
+
+#undef CGAL_surface_reconstruction_points_exactness_assertion
+#undef CGAL_surface_reconstruction_points_exactness_assertion_msg
+#undef CGAL_surface_reconstruction_points_exactness_assertion_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_exactness_assertion(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_assertion_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_exactness_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_exactness_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_exactness_assertion_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_exactness_assertions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_assertion
+#undef CGAL_surface_reconstruction_points_expensive_assertion_msg
+#undef CGAL_surface_reconstruction_points_expensive_assertion_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) \
+  || defined(CGAL_NO_ASSERTIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_assertion(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_assertion_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_assertion_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_assertions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion
+#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg
+#undef CGAL_surface_reconstruction_points_expensive_exactness_assertion_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertion_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_exactness_assertions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_ASSERTIONS
+
+
+// preconditions
+// -------------
+
+#undef CGAL_surface_reconstruction_points_precondition
+#undef CGAL_surface_reconstruction_points_precondition_msg
+#undef CGAL_surface_reconstruction_points_precondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_precondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_precondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_precondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_preconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_exactness_precondition
+#undef CGAL_surface_reconstruction_points_exactness_precondition_msg
+#undef CGAL_surface_reconstruction_points_exactness_precondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_exactness_precondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_precondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_exactness_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_exactness_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_exactness_precondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_exactness_preconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_precondition
+#undef CGAL_surface_reconstruction_points_expensive_precondition_msg
+#undef CGAL_surface_reconstruction_points_expensive_precondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_precondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_precondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_precondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_preconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition
+#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg
+#undef CGAL_surface_reconstruction_points_expensive_exactness_precondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_precondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_exactness_preconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_PRECONDITIONS
+
+
+// postconditions
+// --------------
+
+#undef CGAL_surface_reconstruction_points_postcondition
+#undef CGAL_surface_reconstruction_points_postcondition_msg
+#undef CGAL_surface_reconstruction_points_postcondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_postcondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_postcondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_postconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_exactness_postcondition
+#undef CGAL_surface_reconstruction_points_exactness_postcondition_msg
+#undef CGAL_surface_reconstruction_points_exactness_postcondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_exactness_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_postcondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_exactness_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_exactness_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_exactness_postcondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_exactness_postconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_postcondition
+#undef CGAL_surface_reconstruction_points_expensive_postcondition_msg
+#undef CGAL_surface_reconstruction_points_expensive_postcondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_postcondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_postcondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_postconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition
+#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg
+#undef CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postcondition_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_exactness_postconditions 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_POSTCONDITIONS
+
+
+// warnings
+// --------
+
+#undef CGAL_surface_reconstruction_points_warning
+#undef CGAL_surface_reconstruction_points_warning_msg
+#undef CGAL_surface_reconstruction_points_warning_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_warning(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_warning_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_warning_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_warnings 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
+
+
+#undef CGAL_surface_reconstruction_points_exactness_warning
+#undef CGAL_surface_reconstruction_points_exactness_warning_msg
+#undef CGAL_surface_reconstruction_points_exactness_warning_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_exactness_warning(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_exactness_warning_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_exactness_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_exactness_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_exactness_warning_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_exactness_warnings 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_warning
+#undef CGAL_surface_reconstruction_points_expensive_warning_msg
+#undef CGAL_surface_reconstruction_points_expensive_warning_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_warning(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_warning_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_warning_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_warnings 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
+
+
+#undef CGAL_surface_reconstruction_points_expensive_exactness_warning
+#undef CGAL_surface_reconstruction_points_expensive_exactness_warning_msg
+#undef CGAL_surface_reconstruction_points_expensive_exactness_warning_code
+
+#if defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
+  || (!defined(CGAL_SURFACE_RECONSTRUCTION_POINTS_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
+  || defined(NDEBUG)
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning(EX) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_code(CODE)
+#else
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning(EX) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_msg(EX,MSG) \
+   (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warning_code(CODE) CODE
+#  define CGAL_surface_reconstruction_points_expensive_exactness_warnings 1
+#endif // CGAL_SURFACE_RECONSTRUCTION_POINTS_NO_WARNINGS
+
+/// \endcond
diff --git a/3rdparty/CGAL-4.6/include/CGAL/sweep_observer.h b/3rdparty/CGAL-4.8/include/CGAL/sweep_observer.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/sweep_observer.h
rename to 3rdparty/CGAL-4.8/include/CGAL/sweep_observer.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/tags.h b/3rdparty/CGAL-4.8/include/CGAL/tags.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/tags.h
rename to 3rdparty/CGAL-4.8/include/CGAL/tags.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/test_FPU_rounding_mode_impl.h b/3rdparty/CGAL-4.8/include/CGAL/test_FPU_rounding_mode_impl.h
new file mode 100644
index 0000000..306330b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/test_FPU_rounding_mode_impl.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2008  GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#ifndef CGAL_NDEBUG
+
+#include <CGAL/basic.h>
+#include <CGAL/assertions.h>
+
+namespace CGAL {
+
+struct Check_FPU_rounding_mode_is_restored {
+  FPU_CW_t mode;
+
+  Check_FPU_rounding_mode_is_restored()
+    : mode( FPU_get_cw()) {}
+
+  ~Check_FPU_rounding_mode_is_restored()
+  {
+    CGAL_assertion_msg( FPU_get_cw() == mode,
+                        "The default FPU rounding mode has not been restored "
+                        " before the exit of the program. "
+                        "That may be a bug in some CGAL kernel code.");
+  }
+};
+
+#ifdef CGAL_HEADER_ONLY
+
+inline const Check_FPU_rounding_mode_is_restored& get_static_check_fpu_rounding_mode_is_restored()
+{
+  static const Check_FPU_rounding_mode_is_restored check_fpu_rounding_mode_is_restored;
+  return check_fpu_rounding_mode_is_restored;
+}
+
+#else
+
+// A global object that emits a warning if the rounding mode at the
+// beginning and the end of the program are not the same.
+static const Check_FPU_rounding_mode_is_restored check_fpu_rounding_mode_is_restored;
+
+inline const Check_FPU_rounding_mode_is_restored& get_static_check_fpu_rounding_mode_is_restored()
+{ return check_fpu_rounding_mode_is_restored; }
+
+#endif // CGAL_HEADER_ONLY
+
+} // end namespace CGAL
+
+#endif // #ifnedef CGAL_NDEBUG
diff --git a/3rdparty/CGAL-4.6/include/CGAL/to_rational.h b/3rdparty/CGAL-4.8/include/CGAL/to_rational.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/to_rational.h
rename to 3rdparty/CGAL-4.8/include/CGAL/to_rational.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/trace.h b/3rdparty/CGAL-4.8/include/CGAL/trace.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/trace.h
rename to 3rdparty/CGAL-4.8/include/CGAL/trace.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/transforming_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/transforming_iterator.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/transforming_iterator.h
rename to 3rdparty/CGAL-4.8/include/CGAL/transforming_iterator.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/transforming_pair_iterator.h b/3rdparty/CGAL-4.8/include/CGAL/transforming_pair_iterator.h
new file mode 100644
index 0000000..48dac13
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/transforming_pair_iterator.h
@@ -0,0 +1,127 @@
+// Copyright (c) 2014
+// INRIA Saclay-Ile de France (France)
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Marc Glisse
+
+#ifndef CGAL_TRANSFORMING_PAIR_ITERATOR_H
+#define CGAL_TRANSFORMING_PAIR_ITERATOR_H
+// Should be a combination of transform_iterator and zip_iterator,
+// but boost's iterator_category games are a pain.
+
+#include <CGAL/transforming_iterator.h>
+#include <CGAL/assertions.h>
+#include <boost/type_traits/is_convertible.hpp>
+
+
+
+
+namespace CGAL {
+namespace internal {
+template <class Cat1, class Cat2, bool=boost::is_convertible<Cat1,Cat2>::value>
+struct Min_category {
+	CGAL_static_assertion((boost::is_convertible<Cat2,Cat1>::value));
+	typedef Cat1 type;
+};
+
+template <class Cat1, class Cat2>
+struct Min_category<Cat1,Cat2,true> {
+	typedef Cat2 type;
+};
+
+
+template <typename Derived, typename F, typename It1, typename It2, typename Ref, typename Val>
+class transforming_pair_iterator_helper
+{
+	typedef typename Min_category<
+		typename std::iterator_traits<It1>::iterator_category,
+		typename std::iterator_traits<It1>::iterator_category>
+			::type iterator_category;
+
+	typedef typename Default::Get<Ref,
+#ifdef CGAL_CXX11
+		decltype(std::declval<F>()(std::declval<typename std::iterator_traits<It1>::reference>(),std::declval<typename std::iterator_traits<It2>::reference>()))
+#else
+		typename boost::result_of<F(typename std::iterator_traits<It1>::value_type,typename std::iterator_traits<It2>::value_type)>::type
+	// should be reference instead of value_type
+#endif
+			>::type reference;
+
+	typedef typename Default::Get<Val,typename boost::remove_cv<typename boost::remove_reference<reference>::type>::type>::type value_type;
+
+	public:
+	typedef boost::iterator_facade<
+		Derived,
+		value_type,
+		iterator_category,
+		reference
+	// expect ptrdiff_t is good enough for difference
+			> type;
+};
+}
+
+template <typename F, typename It1, typename It2, typename Ref=Default, typename Val=Default>
+class transforming_pair_iterator
+: public internal::transforming_pair_iterator_helper<transforming_pair_iterator<F,It1,It2,Ref,Val>,F,It1,It2,Ref,Val>::type,
+private internal::Functor_as_base<F>
+{
+	It1 iter1; It2 iter2;
+	friend class boost::iterator_core_access;
+	typedef typename internal::transforming_pair_iterator_helper<transforming_pair_iterator,F,It1,It2,Ref,Val>::type Base;
+	typedef internal::Functor_as_base<F> Functor_base;
+	typename Base::reference dereference()const{
+		return functor()(*iter1,*iter2);
+	}
+	bool equal(transforming_pair_iterator const&i)const{
+		bool b=(iter1==i.iter1);
+		CGAL_assertion(b==(iter2==i.iter2));
+		//FIXME: or do we want only one driving iterator
+		return b;
+	}
+	void increment(){ ++iter1; ++iter2; }
+	void decrement(){ --iter1; --iter2; }
+	void advance(std::ptrdiff_t n){
+		std::advance(iter1,n);
+		std::advance(iter2,n);
+	}
+	std::ptrdiff_t distance_to(transforming_pair_iterator const&i)const{
+		std::ptrdiff_t dist=std::distance(iter1,i.iter1);
+		CGAL_assertion(dist==std::distance(iter2,i.iter2));
+		return dist;
+	}
+	public:
+	using Functor_base::functor;
+	transforming_pair_iterator(){}
+	explicit transforming_pair_iterator(It1 i1,It2 i2,F const& f=F())
+		:Functor_base(f),iter1(i1),iter2(i2){}
+	template<class F2,class J1,class J2,class R2,class V2>
+	transforming_pair_iterator(
+		transforming_pair_iterator<F2,J1,J2,R2,V2> const&i,
+		typename boost::enable_if_convertible<J1, It1>::type* = 0,
+		typename boost::enable_if_convertible<J2, It2>::type* = 0,
+		typename boost::enable_if_convertible<F2, F>::type* = 0)
+		: Functor_base(i.functor()),iter1(i.iter1),iter2(i.iter2) {}
+
+};
+
+template <typename F, typename It1, typename It2> inline
+transforming_pair_iterator<F,It1,It2> make_transforming_pair_iterator(It1 i1, It2 i2, F const&f=F()) {
+	return transforming_pair_iterator<F,It1,It2>(i1,i2,f);
+}
+
+}
+
+#endif // CGAL_TRANSFORMING_PAIR_ITERATOR_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/triangulate_mixed_complex_3.h b/3rdparty/CGAL-4.8/include/CGAL/triangulate_mixed_complex_3.h
new file mode 100644
index 0000000..1056c99
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/triangulate_mixed_complex_3.h
@@ -0,0 +1,1324 @@
+// Copyright (c) 2005 Rijksuniversiteit Groningen (Netherlands)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Nico Kruithof <Nico at cs.rug.nl>
+
+#ifndef CGAL_TRIANGULATE_MIXED_COMPLEX_3
+#define CGAL_TRIANGULATE_MIXED_COMPLEX_3
+
+// #include <CGAL/Unique_hash_map.h>
+#include <CGAL/Compute_anchor_3.h>
+
+#include <CGAL/Triangulation_data_structure_3.h>
+#include <CGAL/Triangulated_mixed_complex_observer_3.h>
+#include <CGAL/Triangulation_incremental_builder_3.h>
+
+#include <CGAL/Skin_surface_base_3.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+
+// NGHK: move this one to SkinSurfaceTraits
+#include <CGAL/Compute_anchor_3.h>
+
+#include <CGAL/Union_find.h>
+
+namespace CGAL {
+
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3 =
+  Triangulated_mixed_complex_observer_3<TriangulatedMixedComplex_3,
+					RegularTriangulation_3> >
+class Mixed_complex_triangulator_3 {
+public:
+  typedef typename RegularTriangulation_3::Geom_traits
+  Regular_traits;
+  typedef typename TriangulatedMixedComplex_3::Geom_traits
+  Triangulated_mixed_complex_traits;
+
+  typedef RegularTriangulation_3                   Regular;
+  typedef TriangulatedMixedComplex_3               Triangulated_mixed_complex;
+  typedef TriangulatedMixedComplexObserver_3
+  Triangulated_mixed_complex_observer;
+private:
+  typedef typename Regular::Vertex_handle            Rt_Vertex_handle;
+  typedef typename Regular::Edge                     Rt_Edge;
+  typedef typename Regular::Facet                    Rt_Facet;
+  typedef typename Regular::Cell_handle              Rt_Cell_handle;
+	
+  typedef typename Regular::Finite_vertices_iterator Rt_Finite_vertices_iterator;
+  typedef typename Regular::Finite_edges_iterator    Rt_Finite_edges_iterator;
+  typedef typename Regular::Finite_facets_iterator   Rt_Finite_facets_iterator;
+  typedef typename Regular::All_cells_iterator       Rt_All_cells_iterator;
+  typedef typename Regular::Finite_cells_iterator    Rt_Finite_cells_iterator;
+	
+  typedef typename Regular::Cell_circulator          Rt_Cell_circulator;
+
+  typedef Triangulation_simplex_3<Regular>           Rt_Simplex;
+  typedef typename Regular::Bare_point               Rt_Point;
+  typedef typename Regular_traits::FT                Rt_FT;
+  typedef typename Regular::Weighted_point           Rt_Weighted_point;
+
+  typedef typename Triangulated_mixed_complex::Vertex_handle    Tmc_Vertex_handle;
+  typedef typename Triangulated_mixed_complex::Edge             Tmc_Edge;
+  typedef typename Triangulated_mixed_complex::Facet            Tmc_Facet;
+  typedef typename Triangulated_mixed_complex::Cell_handle      Tmc_Cell_handle;
+
+  typedef typename Triangulated_mixed_complex::Finite_vertices_iterator
+  Tmc_Finite_vertices_iterator;
+  typedef typename Triangulated_mixed_complex::Finite_edges_iterator
+  Tmc_Finite_edges_iterator;
+  typedef typename Triangulated_mixed_complex::Finite_facets_iterator
+  Tmc_Finite_facets_iterator;
+  typedef typename Triangulated_mixed_complex::All_cells_iterator
+  Tmc_All_cells_iterator;
+  typedef typename Triangulated_mixed_complex::Finite_cells_iterator
+  Tmc_Finite_cells_iterator;
+  typedef typename Triangulated_mixed_complex::Cell_circulator
+  Tmc_Cell_circulator;
+	
+  typedef typename TriangulatedMixedComplex_3::Geom_traits  Tmc_traits;
+  typedef typename Tmc_traits::Point_3                      Tmc_Point;
+  typedef typename Tmc_traits::RT                           Tmc_RT;
+
+  typedef Triangulation_incremental_builder_3<Triangulated_mixed_complex>
+  Triangulation_incremental_builder;
+
+  typedef Compute_anchor_3<Regular>                       Compute_anchor;
+  typedef std::pair<Rt_Simplex,Rt_Simplex>                Symb_anchor;
+
+  // You might get type differences here:
+  // The map that maps a Rt_Simplex to an iterator of the map 
+  // (used as union_find_structure)
+//  struct Anchor_map_iterator_tmp;
+//  typedef std::map<Rt_Simplex, Anchor_map_iterator_tmp>     Anchor_map;
+//  struct Anchor_map_iterator_tmp : Anchor_map::iterator {
+//    Anchor_map_iterator_tmp() 
+//      : Anchor_map::iterator() {}
+//    Anchor_map_iterator_tmp(typename Anchor_map::iterator const &it) 
+//      : Anchor_map::iterator(it) {}
+//  };
+//  typedef typename Anchor_map::iterator                     Anchor_map_iterator;
+
+  typedef Union_find<Rt_Simplex>                            Union_find_anchor;
+  typedef std::map<Rt_Simplex,
+                   typename Union_find_anchor::handle> Simplex_UF_map;
+
+
+public:
+  Mixed_complex_triangulator_3(Regular &regular,
+			       Rt_FT const &shrink,
+			       Triangulated_mixed_complex
+			       &triangulated_mixed_complex,
+			       Triangulated_mixed_complex_observer &observer,
+			       bool verbose)
+    : regular(regular),
+      shrink(shrink),
+      _tmc(triangulated_mixed_complex),
+      observer(observer),
+      triangulation_incr_builder(triangulated_mixed_complex), 
+      r2t_converter_object(),
+      construct_anchor_point_3_obj(r2t_converter_object(shrink)),
+      compute_anchor_obj(regular),
+      verbose(verbose)  {
+    
+    build();
+  }
+
+private:
+  void build() {
+
+    triangulation_incr_builder.begin_triangulation(3);
+
+    if (verbose) std::cout << "Construct vertices" << std::endl;
+    construct_vertices();
+
+    // mixed cells corresponding to regular vertices
+    if (verbose) std::cout << "Construct 0 cells" << std::endl;
+    for (Rt_Finite_vertices_iterator vit = regular.finite_vertices_begin();
+	 vit != regular.finite_vertices_end(); vit ++) {
+      construct_0_cell(vit);
+    }
+
+    // mixed cells corresponding to regular edges
+    if (verbose) std::cout << "Construct 1 cells" << std::endl;
+    for (Rt_Finite_edges_iterator eit = regular.finite_edges_begin();
+	 eit != regular.finite_edges_end(); eit ++) {
+      construct_1_cell(eit);
+    }
+
+    // mixed cells corresponding to regular facets
+    if (verbose) std::cout << "Construct 2 cells" << std::endl;
+    for (Rt_Finite_facets_iterator fit = regular.finite_facets_begin();
+	 fit != regular.finite_facets_end(); fit ++) {
+      construct_2_cell(fit);
+    }
+    
+    // mixed cells corresponding to regular cells
+    if (verbose) std::cout << "Construct 3 cells" << std::endl;
+    for (Rt_Finite_cells_iterator cit = regular.finite_cells_begin();
+	 cit != regular.finite_cells_end();
+	 cit++) {
+      construct_3_cell(cit);
+    }
+
+    triangulation_incr_builder.end_triangulation();
+    
+    anchors.clear();
+
+  }
+
+  Tmc_Vertex_handle add_vertex(Symb_anchor const &anchor); 
+  Tmc_Cell_handle add_cell(Tmc_Vertex_handle vh[], int orient, Rt_Simplex s);
+	
+  Tmc_Vertex_handle get_vertex(Rt_Simplex &sDel, Rt_Simplex &sVor);
+
+
+  void construct_anchor_del(Rt_Simplex const &sDel);
+  void construct_anchor_vor(Rt_Simplex const &sVor);
+  void construct_anchors();
+  Rt_Simplex &get_anchor_del(Rt_Simplex const &sDel) {
+    typename Simplex_UF_map::iterator it = anchor_del_map.find(sDel);
+    CGAL_assertion(it != anchor_del_map.end());
+    return *anchor_del_uf.find(it->second);
+  }
+  Rt_Simplex &get_anchor_vor(Rt_Simplex const &sVor) {
+    typename Simplex_UF_map::iterator it = anchor_vor_map.find(sVor);
+    CGAL_assertion(it != anchor_vor_map.end());
+    return *anchor_vor_uf.find(it->second);
+  }  
+//  Anchor_map_iterator find_anchor(Anchor_map &a_map, Rt_Simplex const&s) {
+//    return find_anchor(a_map, a_map.find(s));
+//  }
+//  Anchor_map_iterator find_anchor(Anchor_map &a_map,
+//				  Anchor_map_iterator const&it) {
+//    CGAL_assertion(it != a_map.end());
+//    Anchor_map_iterator it2 = it->second;
+//    while (it2 != it2->second) {
+//      it->second = it2->second;
+//      // NGHK: changed the type for the map-iterator-hack
+//      it2->second = it;
+//      it2 = it->second;
+//    }
+//    return it2;
+//  }
+  void construct_vertices();
+  
+  Tmc_Point get_weighted_circumcenter(Rt_Simplex const &s);
+  Tmc_Point get_anchor(Rt_Simplex const &sDel, Rt_Simplex const &sVor);
+  template <class Point>
+  Point construct_anchor_point(const Point &center_del, 
+                               const Point &center_vor) {
+    return construct_anchor_point_3_obj(center_del,center_vor);
+  }
+ 
+  void construct_0_cell(Rt_Vertex_handle rt_vh);
+  void construct_1_cell(const Rt_Finite_edges_iterator &eit);
+  void construct_2_cell(const Rt_Finite_facets_iterator &fit);
+  void construct_3_cell(Rt_Cell_handle rt_ch);
+	
+  void remove_small_edges();
+  bool is_collapsible(Tmc_Vertex_handle vh, 
+		      Tmc_Vertex_handle &vh_collapse_to,
+		      Tmc_RT sq_length);
+  void do_collapse(Tmc_Vertex_handle vh, Tmc_Vertex_handle vh_collapse_to);
+  
+
+  Sign orientation(Tmc_Cell_handle ch);
+
+
+
+private:
+
+  Regular const ®ular;
+  Rt_FT const &shrink;
+  Triangulated_mixed_complex &_tmc;
+  Triangulated_mixed_complex_observer &observer;
+
+  Triangulation_incremental_builder triangulation_incr_builder;
+
+  Construct_weighted_circumcenter_3<
+    Regular_triangulation_euclidean_traits_3<
+    Triangulated_mixed_complex_traits> >                weighted_circumcenter_obj;
+
+  Weighted_converter_3<
+    Cartesian_converter<typename Regular_traits::Bare_point::R,
+			Triangulated_mixed_complex_traits > >
+  r2t_converter_object;
+
+  Construct_anchor_point_3<
+    Regular_triangulation_euclidean_traits_3<
+    Triangulated_mixed_complex_traits> >                construct_anchor_point_3_obj;
+
+  Compute_squared_radius_smallest_orthogonal_sphere_3<
+    Regular_triangulation_euclidean_traits_3<
+    Triangulated_mixed_complex_traits> >       orthoweight_obj;
+  Compute_anchor_3<Regular> compute_anchor_obj;
+  bool verbose;
+
+  static const int edge_index[4][4];
+  struct Index_c4 { Tmc_Vertex_handle V[4]; };
+  struct Index_c6 { Tmc_Vertex_handle V[6]; };
+  struct Index_c44 { Tmc_Vertex_handle V[4][4]; };
+  struct Index_v {
+    Unique_hash_map < Rt_Vertex_handle, Tmc_Vertex_handle > V;
+  };
+
+  // index to vertex
+  Unique_hash_map < Rt_Cell_handle, Index_c4 > index_03;
+  
+  Union_find_anchor                            anchor_del_uf, anchor_vor_uf;
+  Simplex_UF_map                               anchor_del_map, anchor_vor_map;
+                   
+//  Anchor_map                                     anchor_del2, anchor_vor2;
+  std::map<Symb_anchor, Tmc_Vertex_handle>        anchors;
+};
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+const int Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+edge_index[4][4] = {{-1,0,1,2},{0,-1,3,4},{1,3,-1,5},{2,4,5,-1}};
+
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_anchor_del(Rt_Simplex const &sDel) {
+  Rt_Simplex s = compute_anchor_obj.anchor_del(sDel);
+  
+  typename Union_find_anchor::handle sDel_handle, s_handle;
+  sDel_handle = anchor_del_uf.make_set(sDel);
+  anchor_del_map[sDel] = sDel_handle;
+  
+  typename Simplex_UF_map::iterator s_it = anchor_del_map.find(s); 
+  CGAL_assertion(s_it != anchor_del_map.end());
+
+  anchor_del_uf.unify_sets(sDel_handle, s_it->second);
+
+  // degenerate simplices:
+  if (compute_anchor_obj.is_degenerate()) {
+    typename Compute_anchor::Simplex_iterator degenerate_it;
+    typename Simplex_UF_map::iterator deg_map_it;
+    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
+         degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
+         degenerate_it++) {
+      deg_map_it = anchor_del_map.find(*degenerate_it); 
+      CGAL_assertion(deg_map_it != anchor_del_map.end());
+      
+      anchor_del_uf.unify_sets(sDel_handle, deg_map_it->second);
+    }
+  }
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_anchor_vor(Rt_Simplex const &sVor) {
+  Rt_Simplex s = compute_anchor_obj.anchor_vor(sVor);
+  
+  typename Union_find_anchor::handle sVor_handle, s_handle;
+  sVor_handle = anchor_vor_uf.make_set(sVor);
+  anchor_vor_map[sVor] = sVor_handle;
+  
+  typename Simplex_UF_map::iterator s_it = anchor_vor_map.find(s); 
+  CGAL_assertion(s_it != anchor_vor_map.end());
+
+  anchor_vor_uf.unify_sets(sVor_handle, s_it->second);
+
+  // degenerate simplices:
+  if (compute_anchor_obj.is_degenerate()) {
+    typename Compute_anchor::Simplex_iterator degenerate_it;
+    typename Simplex_UF_map::iterator deg_map_it;
+    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
+         degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
+         degenerate_it++) {
+      deg_map_it = anchor_vor_map.find(*degenerate_it); 
+      
+      // Possibly not found for 2 Voronoi vertices with the same center,
+      // If the first vertex is inserted and the second is already found.
+      // see compute_anchor_obj.anchor_vor(Cell_handle)
+      if (deg_map_it != anchor_vor_map.end()) {
+        anchor_vor_uf.unify_sets(sVor_handle, deg_map_it->second);
+      }
+    }
+  }
+//  Rt_Simplex s = compute_anchor_obj.anchor_vor(sVor);
+//  anchor_vor2[sVor] = Anchor_map_iterator();
+//
+//  Anchor_map_iterator it = anchor_vor2.find(sVor);
+//  Anchor_map_iterator it2 = anchor_vor2.find(s);
+//  CGAL_assertion(it != anchor_vor2.end());
+//  CGAL_assertion(it2 != anchor_vor2.end());
+//  it->second = it2;
+//
+//  // degenerate simplices:
+//  if (compute_anchor_obj.is_degenerate()) {
+//    it = find_anchor(anchor_vor2, it);
+//    typename Compute_anchor::Simplex_iterator degenerate_it;
+//    for (degenerate_it = compute_anchor_obj.equivalent_anchors_begin();
+//	 degenerate_it != compute_anchor_obj.equivalent_anchors_end(); 
+//	 degenerate_it++) {
+//      Anchor_map_iterator tmp;
+//      it2 = anchor_vor2.find(*degenerate_it);
+//      // Possibly not found for 2 Voronoi vertices with the same center,
+//      // If the first vertex is inserted and the second is already found.
+//      // see compute_anchor_obj.anchor_vor(Cell_handle)
+//      if (it2 != anchor_vor2.end()) {
+//	CGAL_assertion(it2 != anchor_vor2.end());
+//	// Merge sets:
+//	while (it2 != it2->second) {
+//	  tmp = it2->second;
+//	  it2->second = it->second;
+//	  it2 = tmp;
+//	  CGAL_assertion(it2 != anchor_vor2.end());
+//	}
+//	it2->second = it->second;
+//      }
+//    }
+//  }
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_anchors() {
+  Rt_Finite_vertices_iterator vit;
+  Rt_Finite_edges_iterator eit;
+  Rt_Finite_facets_iterator fit;
+  Rt_Finite_cells_iterator cit;
+  Rt_Simplex s;
+  
+  // Compute anchor points:
+  for (vit=regular.finite_vertices_begin();
+       vit!=regular.finite_vertices_end(); vit++) {
+    construct_anchor_del(Rt_Simplex(vit));
+  }  
+  for (eit=regular.finite_edges_begin();
+       eit!=regular.finite_edges_end(); eit++) {
+    s = Rt_Simplex(*eit);
+    construct_anchor_del(s);
+    CGAL_assertion(s.dimension() == 1);
+  }
+  for (fit=regular.finite_facets_begin();
+       fit!=regular.finite_facets_end(); fit++) {
+    s = Rt_Simplex(*fit);
+    construct_anchor_del(s);
+    CGAL_assertion(s.dimension() == 2);
+  }
+  for (cit=regular.finite_cells_begin();
+       cit!=regular.finite_cells_end(); cit++) {
+    s = Rt_Simplex(cit);
+    construct_anchor_del(s);
+    construct_anchor_vor(s);
+    CGAL_assertion(s.dimension() == 3);
+  }
+  for (fit=regular.finite_facets_begin();
+       fit!=regular.finite_facets_end(); fit++) {
+    s = Rt_Simplex(*fit);
+    construct_anchor_vor(s);
+    CGAL_assertion(s.dimension() == 2);
+  }
+  for (eit=regular.finite_edges_begin();
+       eit!=regular.finite_edges_end(); eit++) {
+    s = Rt_Simplex(*eit);
+    construct_anchor_vor(s);
+    CGAL_assertion(s.dimension() == 1);
+  }
+  for (vit=regular.finite_vertices_begin();
+       vit!=regular.finite_vertices_end(); vit++) {
+    CGAL_assertion(vit->cell() != Rt_Cell_handle());
+    s = Rt_Simplex(vit);
+    construct_anchor_vor(s);
+    CGAL_assertion(s.dimension() == 0);
+  }
+}
+
+
+// Constructs the vertices of the simplicial complex
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_vertices() {
+  Rt_All_cells_iterator acit;
+  Rt_Finite_cells_iterator cit;
+  Rt_Finite_facets_iterator fit;
+  Rt_Finite_edges_iterator eit;
+  Rt_Finite_vertices_iterator vit;
+  Rt_Cell_circulator ccir, cstart;
+  Rt_Vertex_handle v1, v2, v3;
+  Rt_Edge e;
+  Rt_Cell_handle c1, c2;
+  Rt_Simplex sDel, sVor;
+  Tmc_Vertex_handle vh;
+
+  if (verbose) std::cout << "construct_anchors" << std::endl;
+  construct_anchors();
+
+  if (verbose) std::cout << "9 ";
+  // anchor dimDel=0, dimVor=3
+  for (cit=regular.finite_cells_begin();
+       cit!=regular.finite_cells_end(); cit++) {
+    sVor = get_anchor_vor(Rt_Simplex(cit));
+    for (int i=0; i<4; i++) {
+      sDel = get_anchor_del(Rt_Simplex(cit->vertex(i)));
+      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	vh = add_vertex(Symb_anchor(sDel,sVor));
+	anchors[Symb_anchor(sDel,sVor)] = vh;
+	CGAL_assertion(vh == get_vertex(sDel, sVor));
+      }
+    }
+  }
+
+  if (verbose) std::cout << "8 ";
+  // anchor dimDel=1, dimVor=3
+  for (cit=regular.finite_cells_begin(); cit!=regular.finite_cells_end(); cit++) {
+    sVor = get_anchor_vor(Rt_Simplex(cit));
+    for (int i=0; i<3; i++) {
+      for (int j=i+1; j<4; j++) {
+	sDel = get_anchor_del(Rt_Simplex(Rt_Edge(cit,i,j)));
+	if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	  vh = add_vertex(Symb_anchor(sDel,sVor));
+	  anchors[Symb_anchor(sDel,sVor)] = vh;
+	  CGAL_assertion(vh == get_vertex(sDel, sVor));
+	}
+      }
+    }
+  }
+
+  if (verbose) std::cout << "7 ";
+  // anchor dimDel=2, dimVor=3 and dimDel=0, dimVor=2
+  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
+    // anchor dimDel=2, dimVor=3
+    c1 = fit->first;
+    c2 = c1->neighbor(fit->second);
+
+    sDel = get_anchor_del(*fit);
+    if (!regular.is_infinite(c1)) {
+      sVor = get_anchor_vor(c1);
+      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	vh = add_vertex(Symb_anchor(sDel,sVor));
+	anchors[Symb_anchor(sDel,sVor)] = vh;
+	CGAL_assertion(vh == get_vertex(sDel, sVor));
+      }
+    }
+    if (!regular.is_infinite(c2)) {
+      sVor = get_anchor_vor(c2);
+      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	vh = add_vertex(Symb_anchor(sDel,sVor));
+	anchors[Symb_anchor(sDel,sVor)] = vh;
+	CGAL_assertion(vh == get_vertex(sDel, sVor));
+      }
+    }
+    // anchor dimDel=0, dimVor=2
+    sVor = get_anchor_vor(*fit);
+    for (int i=1; i<4; i++) {
+      sDel = get_anchor_del(Rt_Simplex(c1->vertex((fit->second+i)&3)));
+      if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	vh = add_vertex(Symb_anchor(sDel,sVor));
+	anchors[Symb_anchor(sDel,sVor)] = vh;
+	CGAL_assertion(vh == get_vertex(sDel, sVor));
+      } else {
+        vh = get_vertex(sDel, sVor);
+      }
+    }
+  }
+	
+  if (verbose) std::cout << "6 ";
+  // anchor dimDel=0, dimVor=1
+  for (eit=regular.finite_edges_begin(); eit!=regular.finite_edges_end(); eit++) {
+    sVor = get_anchor_vor(*eit);
+
+    v1 = eit->first->vertex(eit->second);
+    v2 = eit->first->vertex(eit->third);
+    sDel = get_anchor_del(v1);
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+			
+    sDel = get_anchor_del(v2);
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+  }
+	
+  if (verbose) std::cout << "5 ";
+  // anchor dimDel=3, dimVor=3
+  for (cit=regular.finite_cells_begin(); cit!=regular.finite_cells_end(); cit++) {
+    sDel = get_anchor_del(Rt_Simplex(cit));
+    sVor = get_anchor_vor(Rt_Simplex(cit));
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+  }
+
+
+  if (verbose) std::cout << "4 ";
+  // anchor dimDel=0, dimVor=0
+  for (vit=regular.finite_vertices_begin(); vit!=regular.finite_vertices_end(); vit++) {
+    sDel = get_anchor_del(Rt_Simplex(vit));
+    sVor = get_anchor_vor(Rt_Simplex(vit));
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+  }
+	
+  if (verbose) std::cout << "3 ";
+  // anchor dimDel=1, dimVor=2
+  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
+    c1 = fit->first;
+    c2 = c1->neighbor(fit->second);
+
+    sVor = get_anchor_vor(Rt_Simplex(*fit));
+    for (int i=1; i<3; i++) {
+      for (int j=i+1; j<4; j++) {
+        e.first = c1;
+        e.second = (fit->second+i)&3;
+        e.third = (fit->second+j)&3;
+        sDel = get_anchor_del(Rt_Simplex(e));
+	if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+	  vh = add_vertex(Symb_anchor(sDel,sVor));
+	  anchors[Symb_anchor(sDel,sVor)] = vh;
+	  CGAL_assertion(vh == get_vertex(sDel, sVor));
+	}
+      }
+    }
+  }
+	
+  if (verbose) std::cout << "2 ";
+  // anchor dimDel=2, dimVor=2
+  for (fit=regular.finite_facets_begin(); fit!=regular.finite_facets_end(); fit++) {
+    c1 = fit->first;
+    c2 = c1->neighbor(fit->second);
+
+    sVor = get_anchor_vor(Rt_Simplex(*fit));
+    sDel = get_anchor_del(Rt_Simplex(*fit));
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+  }
+	
+  if (verbose) std::cout << "1" << std::endl;
+  // anchor dimDel=1, dimVor=1
+  for (eit=regular.finite_edges_begin(); eit!=regular.finite_edges_end(); eit++) {
+    v1 = eit->first->vertex(eit->second);
+    v2 = eit->first->vertex(eit->third);
+
+    sVor = get_anchor_vor(Rt_Simplex(*eit));
+    sDel = get_anchor_del(Rt_Simplex(*eit));
+
+    if (anchors.find(Symb_anchor(sDel,sVor)) == anchors.end()) {
+      vh = add_vertex(Symb_anchor(sDel,sVor));
+      anchors[Symb_anchor(sDel,sVor)] = vh;
+      CGAL_assertion(vh == get_vertex(sDel, sVor));
+    }
+  }
+}
+
+// Constructs the cells of the mixed complex corresponding
+// to Regular vertices
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_0_cell(Rt_Vertex_handle rt_vh) {
+  Rt_Simplex sDel_v, sVor_v, sVor_e, sVor_f, sVor_c;
+  Tmc_Vertex_handle vh[4];
+  
+  Rt_Simplex simplex(rt_vh);
+  sDel_v = get_anchor_del(Rt_Simplex(rt_vh));
+  sVor_v = get_anchor_vor(Rt_Simplex(rt_vh));
+  vh[0] = get_vertex(sDel_v,sVor_v);
+    
+  std::list<Rt_Cell_handle> adj_cells;
+  typename std::list<Rt_Cell_handle>::iterator adj_cell;
+  regular.incident_cells(rt_vh, std::back_inserter(adj_cells));
+    
+  // Construct cells:
+  for (adj_cell = adj_cells.begin();
+       adj_cell != adj_cells.end();
+       adj_cell ++) {
+    if (!regular.is_infinite(*adj_cell)) {
+      sVor_c = get_anchor_vor(Rt_Simplex(*adj_cell));
+      vh[3] = get_vertex(sDel_v,sVor_c);
+      int index = (*adj_cell)->index(rt_vh);
+      for (int i=1; i<4; i++) {
+	sVor_f = get_anchor_vor(Rt_Simplex(Rt_Facet(*adj_cell,(index+i)&3)));
+	vh[2] = get_vertex(sDel_v,sVor_f);
+	  
+	for (int j=1; j<4; j++) {
+	  if (j!=i) {
+	    sVor_e = get_anchor_vor(
+				    Rt_Simplex(Rt_Edge(*adj_cell,index,(index+j)&3)));
+	    vh[1] = get_vertex(sDel_v,sVor_e);
+	    if ((vh[0] != vh[1]) && (vh[1] != vh[2]) && (vh[2] != vh[3])) {
+	      CGAL_assertion(sVor_v != sVor_e);
+	      CGAL_assertion(sVor_e != sVor_f);
+	      CGAL_assertion(sVor_f != sVor_c);
+	      // Tmc_Cell_handle ch =
+		add_cell(vh,(index + (j==(i%3+1)? 1:0))&1,simplex);
+	    }
+	  }
+	}
+      }
+    }
+  }
+}
+
+// Constructs 1-cells of the mixed complex corresponding to edges
+// of the regular triangulation
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_1_cell(const Rt_Finite_edges_iterator &e) {
+  Rt_Simplex sDel_v, sDel_e, sVor_e, sVor_f, sVor_c;
+  Tmc_Vertex_handle vh[4];
+  Rt_Vertex_handle v[2];
+  Tmc_Cell_handle ch;
+  
+  Rt_Simplex mixed_cell_simplex(*e);
+  sDel_e = get_anchor_del(Rt_Simplex(*e));
+  sVor_e = get_anchor_vor(Rt_Simplex(*e));
+    
+  v[0] = e->first->vertex(e->second);
+  v[1] = e->first->vertex(e->third);
+    
+  // Construct cells on the side of v[vi]:
+  for (int vi=0; vi<2; vi++) {
+    sDel_v = get_anchor_del(Rt_Simplex(v[vi]));
+    if (!(sDel_v == sDel_e)) {
+      Rt_Cell_circulator ccir, cstart;
+      ccir = cstart = regular.incident_cells(*e);
+      do {
+	if (!regular.is_infinite(ccir)) {
+	  int index0 = ccir->index(v[vi]);
+	  int index1 = ccir->index(v[1-vi]);
+
+	  sVor_c = get_anchor_vor(Rt_Simplex(ccir));
+
+	  for (int fi=1; fi<4; fi++) {
+	    if (((index0+fi)&3) != index1) {
+	      sVor_f =
+		get_anchor_vor(Rt_Simplex(Rt_Facet(ccir,(index0+fi)&3)));
+	      if ((sVor_c != sVor_f) && (sVor_f != sVor_e)) {
+		vh[0] = get_vertex(sDel_v, sVor_e);
+		vh[1] = get_vertex(sDel_e, sVor_e);
+		vh[2] = get_vertex(sDel_e, sVor_f);
+		vh[3] = get_vertex(sDel_e, sVor_c);
+		int orient;
+		if (((4+index1-index0)&3) == 1) {
+		  orient = (index1 + (fi==2))&1;
+		} else {
+		  orient = (index1 + (fi==1))&1;
+		}
+		// vh: dimension are (01,11,12,13)
+		ch = add_cell(vh,orient,mixed_cell_simplex);
+									
+		vh[1] = get_vertex(sDel_v, sVor_f);
+		// vh: dimension are (01,02,12,13)
+		ch = add_cell(vh,1-orient,mixed_cell_simplex);
+									
+		vh[2] = get_vertex(sDel_v, sVor_c);
+		// vh: dimension are (01,02,03,13)
+		ch = add_cell(vh,orient,mixed_cell_simplex);
+	      }
+	    }
+	  }
+	}
+	ccir ++;
+      } while (ccir != cstart);
+    }
+  }
+}
+
+
+// Constructs 2-cells of the mixed complex corresponding to facets
+// of the regular triangulation
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_2_cell(const Rt_Finite_facets_iterator &fit) {
+  Rt_Simplex sDel_v, sDel_e, sDel_f, sVor_f, sVor_c;
+  Tmc_Vertex_handle vh[4]; // Implicit function over vLabels is increasing ...
+  Rt_Cell_handle rt_ch;
+  int index;
+	
+  rt_ch = fit->first;
+  index = fit->second;
+  Rt_Simplex simplex(*fit);
+  sDel_f = get_anchor_del(Rt_Simplex(*fit));
+  sVor_f = get_anchor_vor(Rt_Simplex(*fit));
+		
+  for (int i=0; i<2; i++) { // Do this twice
+    if (!regular.is_infinite(rt_ch)) {
+      sVor_c = get_anchor_vor(Rt_Simplex(rt_ch));
+	
+      vh[3] = get_vertex(sDel_f, sVor_c);
+      Tmc_Vertex_handle vh2 = get_vertex(sDel_f, sVor_f);
+      if (vh2 != vh[3]) {
+	// Facet and cell do not coincide ..
+	for (int vi=1; vi<4; vi++) {
+	  sDel_v = get_anchor_del(Rt_Simplex(rt_ch->vertex((index+vi)&3)));
+	  //index_02[rt_ch].V[index][(index+vi)&3];
+	  vh[0] = get_vertex(sDel_v, sVor_f);
+	  for (int ei=1; ei<4; ei++) {
+	    if (vi != ei) {
+	      vh[2] = vh2;
+	      int index0 = (index+vi)&3;
+	      int index1 = (index+ei)&3;
+	      int fi = (6+index-vi-ei)&3;//6-index-index0-index1;
+	      sDel_e =
+		get_anchor_del(Rt_Simplex(Rt_Edge(rt_ch, index0, index1)));
+	      vh[1] = get_vertex(sDel_e, sVor_f);
+	      //index_12[rt_ch].V[index][(6+index-vi-ei)&3];
+	      if ((vh[0] != vh[1]) && (vh[1] != vh[2])) {
+		// index0: v0
+		// index1: v1
+		// index0+fi&3 == facet
+		int orient;
+									
+		if (((4+index1-index0)&3) == 3) {
+		  orient = (index1 + (((4+index0-fi)&3)==2))&1;
+		} else {
+		  orient = (index1 + (((4+index0-fi)&3)==1))&1;
+		}
+
+		add_cell(vh,orient,simplex);
+									
+		vh[2] = get_vertex(sDel_e, sVor_c);
+		add_cell(vh,1-orient,simplex);
+									
+		vh[1] = get_vertex(sDel_v, sVor_c);
+		add_cell(vh,orient,simplex);
+	      } 
+	    }
+	  }
+	}
+      }
+    }
+    // swap to the other cell
+    Rt_Cell_handle ch_old = rt_ch;
+    rt_ch = rt_ch->neighbor(index);
+    index = rt_ch->index(ch_old);
+  }
+
+  CGAL_assertion(rt_ch == fit->first);
+  CGAL_assertion(index == fit->second);
+}
+
+
+// Constructs 3-cells of the mixed complex corresponding to cells
+// of the regular triangulation
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+construct_3_cell(Rt_Cell_handle rt_ch) {
+  Rt_Simplex sDel_v, sDel_e, sDel_f, sDel_c, sVor_c;
+  Tmc_Vertex_handle vh[4];
+  Tmc_Cell_handle ch;
+
+  // construct the tetrahedron:
+  //   C[ch], C[Facet(ch,fi)], C[Edge(ch,ei,vi)], C[ch->vertex(vi)]
+  sDel_c = get_anchor_del(Rt_Simplex(rt_ch));
+  sVor_c = get_anchor_vor(Rt_Simplex(rt_ch));
+  Rt_Simplex simplex = Rt_Simplex(rt_ch);
+  vh[0] = get_vertex(sDel_c, sVor_c); 
+  for (int fi=0; fi<4; fi++) {
+    sDel_f = get_anchor_del(Rt_Simplex(Rt_Facet(rt_ch, fi)));
+    vh[1] = get_vertex(sDel_f, sVor_c);
+    if (vh[0] != vh[1]) {
+      for (int vi=1; vi<4; vi++) {
+	int index0 = (fi+vi)&3;
+	sDel_v = get_anchor_del(Rt_Simplex(rt_ch->vertex(index0)));
+	for (int ei=1; ei<4; ei++) {
+	  int index1 = (fi+ei)&3;
+	  if (vi != ei) {
+	    sDel_e = get_anchor_del(Rt_Simplex(Rt_Edge(rt_ch, index0, index1)));
+	    vh[2] = get_vertex(sDel_e, sVor_c);
+	    // index_13[rt_ch].V[edge_index[index0][index1]];
+	    vh[3] = get_vertex(sDel_v, sVor_c);
+	    // index_03[rt_cit].V[index0];
+	    if ((vh[1] != vh[2]) && (vh[2] != vh[3])) {
+	      int orient;
+								
+	      if (((4+index1-index0)&3) == 1) {
+		orient = (index1 + (vi==2))&1;
+	      } else {
+		orient = (index1 + (vi==3))&1;
+	      }
+	      ch = add_cell(vh, orient, simplex);
+	    }
+	  }
+	}
+      }
+    }
+  }
+}
+
+// Adds a vertex to the simplicial complex
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+typename Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::Tmc_Vertex_handle
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+add_vertex (Symb_anchor const &anchor)
+{
+  Tmc_Vertex_handle vh;
+  vh = triangulation_incr_builder.add_vertex();
+  observer.after_vertex_insertion(anchor.first, anchor.second, vh); 
+  
+  Protect_FPU_rounding<true> P;
+  vh->point() = get_anchor(anchor.first, anchor.second);
+
+//   std::cout << "@ [" 
+//             << vh->info().first << " - " 
+//             << vh->info().second << "] -- [" 
+//             << vh->point() << "] -- ["
+//             << get_weighted_circumcenter(vh->info().first) << " - "
+//             << get_weighted_circumcenter(vh->info().second) 
+//             << "]" << std::endl;
+
+  return vh;
+}
+
+// Gets a vertex from the simplicial complex based on the anchors
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+typename Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::Tmc_Vertex_handle
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::get_vertex (
+						   Rt_Simplex &sDel, Rt_Simplex &sVor)
+{
+  Rt_Simplex sDel2 = get_anchor_del(sDel);
+  Rt_Simplex sVor2 = get_anchor_vor(sVor);
+  CGAL_assertion(sDel == sDel2);
+  CGAL_assertion(sVor == sVor2);
+  Tmc_Vertex_handle vh = anchors[Symb_anchor(sDel2,sVor2)];
+  CGAL_assertion(vh != Tmc_Vertex_handle());
+  return vh;
+}
+
+// Adds a cell to the simplicial complex
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+typename Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::Tmc_Cell_handle
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+add_cell(Tmc_Vertex_handle vh[], int orient, Rt_Simplex s) {
+  CGAL_assertion((orient==0) || (orient==1));
+  CGAL_assertion(vh[0] != Tmc_Vertex_handle()); 
+  CGAL_assertion(vh[1] != Tmc_Vertex_handle());
+  CGAL_assertion(vh[2] != Tmc_Vertex_handle()); 
+  CGAL_assertion(vh[3] != Tmc_Vertex_handle());
+  CGAL_assertion(vh[0] != vh[1]); 
+  CGAL_assertion(vh[0] != vh[2]); 
+  CGAL_assertion(vh[0] != vh[3]); 
+  CGAL_assertion(vh[1] != vh[2]); 
+  CGAL_assertion(vh[1] != vh[3]); 
+  CGAL_assertion(vh[2] != vh[3]);
+
+  Tmc_Cell_handle ch;
+
+  if (orient) {
+    ch = triangulation_incr_builder.add_cell(vh[0], vh[1], vh[2], vh[3]);
+  } else {
+    ch = triangulation_incr_builder.add_cell(vh[0], vh[1], vh[3], vh[2]);
+  }
+  CGAL_assertion(orientation(ch) == POSITIVE);
+  observer.after_cell_insertion(s, ch);
+  return ch;
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+typename Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::Tmc_Point
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+get_weighted_circumcenter(Rt_Simplex const &s) {
+  Rt_Vertex_handle vh;
+  Rt_Edge           e;
+  Rt_Facet          f;
+  Rt_Cell_handle   ch;
+  
+  Tmc_Point result;
+  switch (s.dimension()) {
+  case 0:
+    vh=s;
+    result = r2t_converter_object(vh->point());
+    break;
+  case 1:
+    e=s;
+    result = weighted_circumcenter_obj(
+			     r2t_converter_object(e.first->vertex(e.second)->point()),
+			     r2t_converter_object(e.first->vertex(e.third)->point()));
+    break;
+  case 2:
+    f=s;
+    result = weighted_circumcenter_obj(
+			     r2t_converter_object(f.first->vertex((f.second+1)&3)->point()),
+			     r2t_converter_object(f.first->vertex((f.second+2)&3)->point()),
+			     r2t_converter_object(f.first->vertex((f.second+3)&3)->point()));
+    break;
+  case 3:
+    ch=s;
+    result = weighted_circumcenter_obj(
+           r2t_converter_object(ch->vertex(0)->point()),
+           r2t_converter_object(ch->vertex(1)->point()),
+           r2t_converter_object(ch->vertex(2)->point()),
+           r2t_converter_object(ch->vertex(3)->point()));
+    break;
+  default:
+    CGAL_error();
+  }
+  return result;
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+typename Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::Tmc_Point
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+get_anchor(Rt_Simplex const &sDel, Rt_Simplex const &sVor)
+{
+  Protect_FPU_rounding<true> P;
+
+  Tmc_Point dfoc = get_weighted_circumcenter(sDel);
+  Tmc_Point vfoc = get_weighted_circumcenter(sVor);
+	
+  return construct_anchor_point(dfoc, vfoc);
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+remove_small_edges()
+{
+  Bbox_3 bbox;
+  for (Tmc_Finite_vertices_iterator vit = _tmc.finite_vertices_begin();
+       vit != _tmc.finite_vertices_end(); vit++) {
+    bbox = bbox+vit->point().bbox();
+  }
+  // Tmc_RT sq_length = ((bbox.xmax()-bbox.xmin())*(bbox.xmax()-bbox.xmin()) + 
+  //    (bbox.ymax()-bbox.ymin())*(bbox.ymax()-bbox.ymin()) + 
+  //    (bbox.zmax()-bbox.zmin())*(bbox.zmax()-bbox.zmin()))/100000000;
+
+  Tmc_RT sq_length = 1e-6;
+  // NGHK: This may intrudoce rounding errors, since the quadratic surface
+  // may change:
+  Tmc_Vertex_handle vh, vh_collapse_to;
+  for (Tmc_Finite_vertices_iterator vit = _tmc.finite_vertices_begin();
+       vit != _tmc.finite_vertices_end(); ) {
+    vh = vit;
+    vit++;
+    if (is_collapsible(vh, vh_collapse_to,sq_length)) {
+      do_collapse(vh,vh_collapse_to);
+    }
+  }
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+bool
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+is_collapsible(Tmc_Vertex_handle vh,
+	       Tmc_Vertex_handle &vh_collapse_to,
+	       Tmc_RT sq_length)
+{
+  std::vector<Tmc_Cell_handle> incident_cells;
+  CGAL_assertion(_tmc.is_vertex(vh));
+  incident_cells.reserve(64);
+  _tmc.incident_cells(vh, std::back_inserter(incident_cells));
+
+  std::set<Tmc_Vertex_handle> incident_vertices;
+  for(typename std::vector<Tmc_Cell_handle>::iterator 
+	cit = incident_cells.begin();
+      cit != incident_cells.end(); ++cit) {
+    // Put all incident vertices in incident_vertices.
+    for (int j=0; j<4; ++j)
+      if ((*cit)->vertex(j) != vh)
+	incident_vertices.insert((*cit)->vertex(j));
+  }
+  
+  for (typename std::set<Tmc_Vertex_handle>::iterator 
+	 it = incident_vertices.begin(); 
+       it != incident_vertices.end(); it++) {
+    if ((_tmc.geom_traits().compute_squared_distance_3_object()(vh->point(),
+								(*it)->point())
+	 < sq_length) &&
+	(vh->cell()->surf == (*it)->cell()->surf) &&
+	(vh->sign() == (*it)->sign())) {
+      bool ok = true;
+      for (typename std::vector<Tmc_Cell_handle>::iterator 
+	     cit = incident_cells.begin();
+	   ok && (cit != incident_cells.end()); cit++) {
+	if (!(*cit)->has_vertex(*it)) {
+	  const Tmc_Point* pts[4] = { &((*cit)->vertex(0)->point()),
+				      &((*cit)->vertex(1)->point()),
+				      &((*cit)->vertex(2)->point()),
+				      &((*cit)->vertex(3)->point()) };
+	  pts[(*cit)->index(vh)] = &(*it)->point();
+	  
+	  ok = (_tmc.geom_traits().orientation_3_object()
+		(*pts[0],*pts[1],*pts[2],*pts[3]) == CGAL::POSITIVE);
+	}
+      }
+      if (ok) {
+	vh_collapse_to = *it;
+	return true;
+      } 
+    }
+  }
+  return false;
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+do_collapse(Tmc_Vertex_handle vh, 
+	    Tmc_Vertex_handle vh_collapse_to)
+{
+  std::vector<Tmc_Cell_handle> incident_cells;
+  incident_cells.reserve(32);
+  _tmc.incident_cells(vh, std::back_inserter(incident_cells));
+  int i,i2;
+  for (typename std::vector<Tmc_Cell_handle>::iterator
+	 it = incident_cells.begin(); it != incident_cells.end(); it++) {
+    i = (*it)->index(vh);
+    if ((*it)->has_vertex(vh_collapse_to,i2)) {
+      // This cell is collapsed, set neighbor information of the new facet
+      // and set the cell-pointer of the incident vertices.
+      Tmc_Cell_handle ch1 = (*it)->neighbor(i);
+      Tmc_Cell_handle ch2 = (*it)->neighbor(i2);
+      ch1->set_neighbor(ch1->index((*it)), ch2);
+      ch2->set_neighbor(ch2->index((*it)), ch1);
+      for (int i=0; i<4; i++) {
+	// Try to point to a cell with the same surface:
+	if ((*it)->vertex(i)->cell() == (*it)) {
+	  if ((*it)->surf == ch1->surf) {
+	    (*it)->vertex(i)->set_cell(ch1);
+	  } else {
+	    (*it)->vertex(i)->set_cell(ch2);
+	  }
+	}
+      }
+      _tmc.tds().delete_cell((*it));
+    } else {
+      // This cell is changed, set pointer to the new vertex
+      (*it)->set_vertex(i,vh_collapse_to);
+    }
+  }
+  _tmc.tds().delete_vertex(vh);
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+Sign 
+Mixed_complex_triangulator_3<
+  RegularTriangulation_3,
+  TriangulatedMixedComplex_3,
+  TriangulatedMixedComplexObserver_3>::
+orientation(Tmc_Cell_handle ch) {
+    Orientation o;
+    // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG
+    Protect_FPU_rounding<true> P;
+    try {
+    Tmc_Point pts[4];
+    for (int i=0; i<4; i++) pts[i] = ch->vertex(i)->point();
+
+    
+    // filtered kernel
+    o = _tmc.geom_traits().orientation_3_object()(pts[0], pts[1], 
+                                                  pts[2], pts[3]);
+  } catch (Uncertain_conversion_exception) {
+    Protect_FPU_rounding<false> P(CGAL_FE_TONEAREST);
+    typedef Exact_predicates_exact_constructions_kernel EK;
+    typedef Cartesian_converter<EK, Tmc_traits>         Exact_converter;
+    typedef Skin_surface_traits_3<EK>                   Exact_traits;
+
+    Exact_converter converter;
+    Exact_traits    exact_traits(shrink);
+    typename EK::Point_3 e_pts[4];
+
+    for (int k=0; k<4; k++) {
+      e_pts[k] = 
+        Skin_surface_base_3<Regular_traits>::
+        get_anchor_point(ch->vertex(k)->info(), exact_traits);
+      // Store the more precise point
+      ch->vertex(k)->point() = converter(e_pts[k]);
+    }
+    o = exact_traits.orientation_3_object()(e_pts[0], e_pts[1], 
+                                            e_pts[2], e_pts[3]);
+  }
+  return o;
+}
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3,
+  class TriangulatedMixedComplexObserver_3>
+void 
+triangulate_mixed_complex_3(RegularTriangulation_3 &rt,
+			    typename RegularTriangulation_3::Geom_traits::FT
+			    const & shrink_factor,
+			    TriangulatedMixedComplex_3 &tmc,
+			    TriangulatedMixedComplexObserver_3 &observer,
+			    bool verbose) 
+{
+  typedef Mixed_complex_triangulator_3<
+    RegularTriangulation_3,
+    TriangulatedMixedComplex_3,
+    TriangulatedMixedComplexObserver_3>  Mixed_complex_triangulator;
+  Mixed_complex_triangulator(rt, shrink_factor, tmc, observer, verbose);
+}
+
+
+template < 
+  class RegularTriangulation_3,
+  class TriangulatedMixedComplex_3>
+void 
+triangulate_mixed_complex_3(RegularTriangulation_3 const &regular, 
+			    typename RegularTriangulation_3::Geom_traits::FT
+			    const &shrink_factor,
+			    TriangulatedMixedComplex_3 &tmc,
+			    bool verbose)
+{
+  Triangulated_mixed_complex_observer_3<
+    TriangulatedMixedComplex_3, const RegularTriangulation_3> 
+    observer(shrink_factor);
+  triangulate_mixed_complex_3(regular, shrink_factor, tmc, observer, verbose);
+}
+
+} //namespace CGAL
+
+#endif // CGAL_TRIANGULATE_MIXED_COMPLEX_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/triangulate_power_diagram_3.h b/3rdparty/CGAL-4.8/include/CGAL/triangulate_power_diagram_3.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/triangulate_power_diagram_3.h
rename to 3rdparty/CGAL-4.8/include/CGAL/triangulate_power_diagram_3.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/triangulation_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/triangulation_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/triangulation_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/triangulation_assertions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/tss.h b/3rdparty/CGAL-4.8/include/CGAL/tss.h
new file mode 100644
index 0000000..9175c65
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/tss.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2016 GeometryFactory (France)
+//  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+
+#ifndef CGAL_TSS_H
+#define CGAL_TSS_H
+
+#include <CGAL/config.h>
+
+#if defined( CGAL_HAS_THREADS )
+#  ifdef  CGAL_CAN_USE_CXX11_THREAD_LOCAL
+//#    pragma message ( "Use keyword thread_local" )
+#  else
+//#    pragma message ("Use thread_local from boost")
+#    define CGAL_USE_BOOST_THREAD
+#    include <boost/thread/tss.hpp>
+#  endif
+
+
+#  ifdef CGAL_USE_BOOST_THREAD
+
+#    define CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE, VAR, ARG1)               \
+       static boost::thread_specific_ptr<TYPE> VAR##_ptr;                   \
+       if(VAR##_ptr.get() == NULL) {VAR##_ptr.reset(new TYPE(ARG1));} \
+       TYPE& VAR =  * VAR##_ptr.get()
+
+#  else
+
+#    define CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE, VAR, ARG1)       \
+       static thread_local TYPE VAR(ARG1)
+
+#  endif
+
+#else 
+
+#  define CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE, VAR,ARG1) static TYPE VAR(ARG1)
+
+#endif
+
+#endif // CGAL_TSS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/tuple.h b/3rdparty/CGAL-4.8/include/CGAL/tuple.h
new file mode 100644
index 0000000..872524a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/tuple.h
@@ -0,0 +1,244 @@
+// Copyright (c) 2009  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Sebastien Loriot, Sylvain Pion
+
+#ifndef CGAL_TUPLE_H
+#define CGAL_TUPLE_H
+
+// A wrapper around C++0x, TR1 or Boost tuple<>.
+// Together with the Is_in_tuple<> tool.
+
+#include <CGAL/config.h>
+
+// workaround issue in the tuple implementation of libc++
+// by falling back onto boost's
+#ifndef CGAL_CFG_NO_CPP0X_TUPLE
+  #include <cstddef>
+  #if defined( _LIBCPP_VERSION ) // check if libc++ is used
+    #define CGAL_CFG_NO_CPP0X_TUPLE
+  #endif
+  #if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 4)
+    #define CGAL_CFG_NO_CPP0X_TUPLE
+    #define CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+  #endif
+#endif
+
+#ifndef CGAL_CFG_NO_CPP0X_TUPLE
+#  include <tuple>
+#else
+#  include <boost/tuple/tuple.hpp>
+#  include <boost/tuple/tuple_comparison.hpp>
+#  include <utility>
+#endif
+
+namespace CGAL {
+
+namespace cpp11 {
+
+#ifndef CGAL_CFG_NO_CPP0X_TUPLE
+using std::tuple;
+using std::make_tuple;
+using std::tie;
+using std::get;
+using std::tuple_size;
+using std::tuple_element;
+#else
+using boost::tuple;
+using boost::make_tuple;
+using boost::tie;
+using boost::get;
+  
+//tuple_size
+template <class T>
+struct tuple_size:public boost::tuples::length<T> {};
+  
+//tuple_element
+template <int N,class T>
+struct tuple_element: public boost::tuples::element<N,T>{};
+  
+#endif
+
+
+#if defined(CGAL_CFG_NO_CPP0X_TUPLE)
+// If not C++11 tuple, we need to add get<N>(std::pair).
+
+////////////////////////////////////////////////////////////
+//                                                        //
+// Allow CGAL::cpp11::get<N>(std::pair), if N==0 or N==1. //
+//                                                        //
+// That is already in TR1 and C++11, but not in Boost.    //
+//                                                        //
+////////////////////////////////////////////////////////////
+template <std::size_t N, typename T1, typename T2>
+struct pair_get;
+
+template <typename T1, typename T2>
+struct pair_get<0, T1, T2> {
+  static T1& get(std::pair<T1, T2>& pair) { return pair.first; }
+  static const T1& get(const std::pair<T1, T2>& pair) { return pair.first; }
+}; // end specialization struct pair_get<0, T2, T2>
+
+template <typename T1, typename T2>
+struct pair_get<1, T1, T2> {
+  static T2& get(std::pair<T1, T2>& pair) { return pair.second; }
+  static const T2& get(const std::pair<T1, T2>& pair) { return pair.second; }
+}; // end specialization struct pair_get<0, T2, T2>
+
+template <std::size_t N, typename T1, typename T2>
+inline typename boost::tuples::element<N, boost::tuple<T1, T2> >::type&
+get(std::pair<T1, T2>& pair) {
+  return pair_get<N, T1, T2>::get(pair);
+}
+
+template <std::size_t N, typename T1, typename T2>
+inline const typename boost::tuples::element<N, boost::tuple<T1, T2> >::type&
+get(const std::pair<T1, T2>& pair) { 
+  return pair_get<N, T1, T2>::get(pair);
+}
+
+#endif // end if not C++11 tuple
+
+
+} // cpp11
+
+namespace cpp0x = cpp11;
+
+#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+
+// Tool to test whether a type V is among the types of a tuple<...> = T.
+template <typename V, typename T>
+struct Is_in_tuple;
+
+template <typename V, typename T0, typename... T>
+struct Is_in_tuple <V, cpp11::tuple<T0, T...> >
+{
+  static const bool value = Is_in_tuple<V, cpp11::tuple<T...> >::value;
+};
+
+template <typename V, typename... T>
+struct Is_in_tuple <V, cpp11::tuple<V, T...> >
+{
+  static const bool value = true;
+};
+
+template <typename V>
+struct Is_in_tuple <V, cpp11::tuple<> >
+{
+  static const bool value = false;
+};
+
+#else
+
+// Non-variadic version
+
+template <typename V,typename T>
+struct Is_in_tuple;
+
+template <typename V,typename T0,typename T1>
+struct Is_in_tuple <V,cpp11::tuple<T0,T1> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1> >::value;
+};
+
+template <typename V, typename T0,typename T1,typename T2>
+struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2> >::value;
+};
+
+template <typename V, typename T0,typename T1,typename T2,typename T3>
+struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3> >::value;
+};
+
+template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4>
+struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4> >::value;
+};
+
+template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4,typename T5>
+struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4,T5> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4,T5> >::value;
+};
+
+template <typename V, typename T0,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
+struct Is_in_tuple <V, cpp11::tuple<T0,T1,T2,T3,T4,T5,T6> >
+{
+  static const bool value = Is_in_tuple<V,cpp11::tuple<T1,T2,T3,T4,T5,T6> >::value;
+};
+
+
+//Conclusions
+
+template <typename V,typename T1>
+struct Is_in_tuple <V,cpp11::tuple<T1> >
+{
+  static const bool value = false;
+};
+
+template <typename V>
+struct Is_in_tuple <V,cpp11::tuple<V> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1>
+struct Is_in_tuple <V,cpp11::tuple<V,T1> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1,typename T2>
+struct Is_in_tuple <V,cpp11::tuple<V,T1,T2> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1,typename T2,typename T3>
+struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1,typename T2,typename T3,typename T4>
+struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1,typename T2,typename T3,typename T4,typename T5>
+struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4,T5> >
+{
+  static const bool value = true;
+};
+
+template <typename V,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
+struct Is_in_tuple <V,cpp11::tuple<V,T1,T2,T3,T4,T5,T6> >
+{
+  static const bool value = true;
+};
+
+
+#endif 
+
+} //namespace CGAL
+
+#endif // CGAL_TUPLE_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/type_traits.h b/3rdparty/CGAL-4.8/include/CGAL/type_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/type_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/type_traits.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/typeset.h b/3rdparty/CGAL-4.8/include/CGAL/typeset.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/typeset.h
rename to 3rdparty/CGAL-4.8/include/CGAL/typeset.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/use.h b/3rdparty/CGAL-4.8/include/CGAL/use.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/use.h
rename to 3rdparty/CGAL-4.8/include/CGAL/use.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/user_classes.h b/3rdparty/CGAL-4.8/include/CGAL/user_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/user_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/user_classes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/utility.h b/3rdparty/CGAL-4.8/include/CGAL/utility.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/utility.h
rename to 3rdparty/CGAL-4.8/include/CGAL/utility.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/utils.h b/3rdparty/CGAL-4.8/include/CGAL/utils.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/utils.h
rename to 3rdparty/CGAL-4.8/include/CGAL/utils.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/utils_classes.h b/3rdparty/CGAL-4.8/include/CGAL/utils_classes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/utils_classes.h
rename to 3rdparty/CGAL-4.8/include/CGAL/utils_classes.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/value_type_traits.h b/3rdparty/CGAL-4.8/include/CGAL/value_type_traits.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/value_type_traits.h
rename to 3rdparty/CGAL-4.8/include/CGAL/value_type_traits.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_edges.h b/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_edges.h
new file mode 100644
index 0000000..8c9ea41
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_edges.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Jocelyn Meyron and Quentin Mérigot
+//
+
+#ifndef CGAL_VCM_ESTIMATE_EDGES_H
+#define CGAL_VCM_ESTIMATE_EDGES_H
+
+#include <CGAL/vcm_estimate_normals.h>
+
+namespace CGAL {
+
+/// \ingroup PkgPointSetProcessing
+/// determines if a point is on a sharp feature edge from a point set
+/// for which the Voronoi covariance Measures have been computed.
+///
+/// The sharpness of the edge, specified by parameter `threshold`, 
+/// is used to filtered points according to the external angle around a sharp feature.
+///
+/// A point is considered to be on a sharp feature if the external angle `alpha` at the edge is such that
+/// `alpha >= 2 / sqrt(3) * sqrt(threshold)`.
+/// In particular this means that if the input contains sharp features
+/// with different external angles, the one with the smallest external angle should be considered,
+/// which however would result in selecting more points on sharper regions.
+/// More details are provided in \cgalCite{cgal:mog-vbcfe-11}.
+///
+/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
+/// omitted: if Eigen 3 (or greater) is available and
+/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
+/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
+/// implementation `Diagonalize_traits` is used.
+/// \sa CGAL::compute_vcm()`
+///
+template <class FT, class VCMTraits>
+bool
+vcm_is_on_feature_edge (cpp11::array<FT,6> &cov,
+                        double threshold,
+                        VCMTraits)
+{
+    cpp11::array<double,3> eigenvalues;
+    if (!VCMTraits::
+          diagonalize_selfadjoint_covariance_matrix(cov, eigenvalues) )
+    {
+        return false;
+    }
+
+    // Compute the ratio
+    double r = eigenvalues[1] / (eigenvalues[0] + eigenvalues[1] + eigenvalues[2]);
+    if (r >= threshold)
+        return true;
+
+    return false;
+}
+
+
+
+template <class FT>
+bool
+vcm_is_on_feature_edge (cpp11::array<FT,6> &cov,
+                        double threshold)
+{
+  return vcm_is_on_feature_edge(cov, threshold,
+				CGAL::Default_diagonalize_traits<double, 3>());
+
+}
+
+} // namespace CGAL
+
+#endif // CGAL_VCM_ESTIMATE_EDGES_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_normals.h b/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_normals.h
new file mode 100644
index 0000000..523effc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/vcm_estimate_normals.h
@@ -0,0 +1,520 @@
+// Copyright (c) 2014  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Jocelyn Meyron and Quentin Mérigot
+//
+
+#ifndef CGAL_VCM_ESTIMATE_NORMALS_H
+#define CGAL_VCM_ESTIMATE_NORMALS_H
+
+#include <CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h>
+
+#include <CGAL/property_map.h>
+#include <CGAL/Delaunay_triangulation_3.h>
+#include <CGAL/Kd_tree.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Search_traits_adapter.h>
+#include <CGAL/property_map.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/Fuzzy_sphere.h>
+
+#include <CGAL/Default_diagonalize_traits.h>
+
+#include <iterator>
+#include <vector>
+
+namespace CGAL {
+
+
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+namespace internal {
+
+/// @cond SKIP_IN_MANUAL
+/// Computes the VCM for each point in the property map.
+/// The matrix is computed by intersecting the Voronoi cell
+/// of a point and a sphere whose radius is `offset_radius` and discretized
+/// by `N` planes.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
+/// @tparam K Geometric traits class.
+/// @tparam Covariance Covariance matrix type. It is similar to an array with a length of 6.
+template < typename ForwardIterator,
+           typename PointPMap,
+           class K,
+           class Covariance
+>
+void
+vcm_offset (ForwardIterator first, ///< iterator over the first input point.
+            ForwardIterator beyond, ///< past-the-end iterator over the input points.
+            PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+            std::vector<Covariance> &cov, ///< vector of covariance matrices.
+            double offset_radius, ///< radius of the sphere.
+            std::size_t N, ///< number of planes used to discretize the sphere.
+            const K & /*kernel*/) ///< geometric traits.
+{
+    // Sphere discretization
+    typename CGAL::Voronoi_covariance_3::Sphere_discretization<K> sphere(offset_radius, N);
+
+    // Compute the Delaunay Triangulation
+    std::vector<typename K::Point_3> points;
+    points.reserve(std::distance(first, beyond));
+    for (ForwardIterator it = first; it != beyond; ++it)
+      points.push_back(get(point_pmap, *it));
+
+    typedef Delaunay_triangulation_3<K> DT;
+    DT dt(points.begin(), points.end());
+
+    cov.clear();
+    cov.reserve(points.size());
+    // Compute the VCM
+    for (typename std::vector<typename K::Point_3>::iterator
+          it = points.begin(); it != points.end(); ++it)
+    {
+        typename DT::Vertex_handle vh = dt.nearest_vertex(*it);
+        cov.push_back(
+          Voronoi_covariance_3::voronoi_covariance_3(dt, vh, sphere)
+        );
+    }
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// Convolve using a radius.
+template < class ForwardIterator,
+           class PointPMap,
+           class K,
+           class Covariance
+>
+void
+vcm_convolve (ForwardIterator first,
+              ForwardIterator beyond,
+              PointPMap point_pmap,
+              const std::vector<Covariance> &cov,
+              std::vector<Covariance> &ncov,
+              double convolution_radius,
+              const K &)
+{
+    typedef std::pair<typename K::Point_3, std::size_t>              Tree_point;
+    typedef First_of_pair_property_map< Tree_point >                  Tree_pmap;
+    typedef Search_traits_3<K>                                      Traits_base;
+    typedef Search_traits_adapter<Tree_point, Tree_pmap, Traits_base>    Traits;
+    typedef Kd_tree<Traits>                                                Tree;
+    typedef Fuzzy_sphere<Traits>                                   Fuzzy_sphere;
+
+    // Kd tree
+    Tree tree;
+    tree.reserve(cov.size());
+    std::size_t i=0;
+    for (ForwardIterator it = first; it != beyond; ++it, ++i)
+        tree.insert( Tree_point(get(point_pmap, *it), i) );
+
+    // Convolving
+    ncov.clear();
+    ncov.reserve(cov.size());
+    for (ForwardIterator it = first; it != beyond; ++it) {
+        std::vector<Tree_point> nn;
+        tree.search(std::back_inserter(nn),
+                    Fuzzy_sphere (get(point_pmap, *it), convolution_radius));
+
+        Covariance m;
+        std::fill(m.begin(), m.end(), typename K::FT(0));
+        for (std::size_t k = 0; k < nn.size(); ++k)
+        {
+          std::size_t index = nn[k].second;
+          for (int i=0; i<6; ++i)
+            m[i] += cov[index][i];
+        }
+        ncov.push_back(m);
+    }
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// Convolve using neighbors.
+template < class ForwardIterator,
+           class PointPMap,
+           class K,
+           class Covariance
+>
+void
+vcm_convolve (ForwardIterator first,
+              ForwardIterator beyond,
+              PointPMap point_pmap,
+              const std::vector<Covariance> &cov,
+              std::vector<Covariance> &ncov,
+              unsigned int nb_neighbors_convolve,
+              const K &)
+{
+    typedef std::pair<typename K::Point_3, std::size_t>              Tree_point;
+    typedef First_of_pair_property_map< Tree_point >                  Tree_pmap;
+    typedef Search_traits_3<K>                                      Traits_base;
+    typedef Search_traits_adapter<Tree_point, Tree_pmap, Traits_base>    Traits;
+    typedef Orthogonal_k_neighbor_search<Traits>                Neighbor_search;
+    typedef typename Neighbor_search::Tree                                 Tree;
+
+    // Search tree
+    Tree tree;
+    tree.reserve(cov.size());
+    std::size_t i=0;
+    for (ForwardIterator it = first; it != beyond; ++it, ++i)
+        tree.insert( Tree_point(get(point_pmap, *it), i) );
+
+    // Convolving
+    ncov.clear();
+    ncov.reserve(cov.size());
+    for (ForwardIterator it = first; it != beyond; ++it) {
+        Neighbor_search search(tree, get(point_pmap, *it), nb_neighbors_convolve);
+
+        Covariance m;
+        for (typename Neighbor_search::iterator nit = search.begin();
+             nit != search.end();
+             ++nit)
+        {
+          std::size_t index = nit->first.second;
+          for (int i=0; i<6; ++i)
+            m[i] += cov[index][i];
+        }
+
+        ncov.push_back(m);
+    }
+}
+/// @endcond
+
+} // namespace internal
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+/// \ingroup PkgPointSetProcessing
+/// computes the Voronoi Covariance Measure (VCM) of a point cloud,
+/// a construction that can be used for normal estimation and sharp feature detection.
+///
+/// The VCM associates to each point the covariance matrix of its Voronoi
+/// cell intersected with the ball of radius `offset_radius`.
+/// In addition, if the second radius `convolution_radius` is positive, the covariance matrices are smoothed
+/// via a convolution process. More specifically, each covariance matrix is replaced by
+/// the average of the matrices of the points located at a distance at most `convolution_radius`.
+/// The choice for parameter `offset_radius` should refer to the geometry of the underlying surface while
+/// the choice for parameter `convolution_radius` should refer to the noise level in the point cloud.
+/// For example, if the point cloud is a uniform and noise-free sampling of a smooth surface,
+/// `offset_radius` should be set to the minimum local feature size of the surface, while `convolution_radius` can be set to zero.
+///
+/// The Voronoi covariance matrix of each vertex is stored in an array `a` of length 6 and is as follow:
+/*!
+<center>
+\f$ \begin{bmatrix}
+  a[0] & a[1] & a[2] \\
+  a[1] & a[3] & a[4] \\
+  a[2] & a[4] & a[5] \\
+ \end{bmatrix}\f$
+</center>
+*/
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
+/// @tparam CovariancePMap is a model of `ReadWritePropertyMap` with a value_type = `cpp11::array<Kernel::FT,6>`.
+/// @tparam Kernel Geometric traits class.
+///
+/// \sa `CGAL::vcm_is_on_feature_edge()`
+/// \sa `CGAL::vcm_estimate_normals()`
+///
+/// \todo replace ccov by a property map.
+template < class ForwardIterator,
+           class PointPMap,
+           class Kernel
+>
+void
+compute_vcm (ForwardIterator first,
+             ForwardIterator beyond,
+             PointPMap point_pmap,
+             std::vector< cpp11::array<typename Kernel::FT, 6> > &ccov,
+             double offset_radius,
+             double convolution_radius,
+             const Kernel & kernel)
+{
+    // First, compute the VCM for each point
+    std::vector< cpp11::array<typename Kernel::FT, 6> > cov;
+    std::size_t N = 20;
+    internal::vcm_offset (first, beyond,
+                          point_pmap,
+                          cov,
+                          offset_radius,
+                          N,
+                          kernel);
+    // Then, convolve it (only when convolution_radius != 0)
+    if (convolution_radius == 0) {
+        ccov.reserve(cov.size());
+        std::copy(cov.begin(), cov.end(), std::back_inserter(ccov));
+    } else {
+        internal::vcm_convolve(first, beyond,
+                               point_pmap,
+                               cov,
+                               ccov,
+                               convolution_radius,
+                               kernel);
+    }
+}
+
+/// @cond SKIP_IN_MANUAL
+/// Estimates normal directions of the `[first, beyond)` range of points
+/// using the Voronoi Covariance Measure (see `compute_vcm` for more details on the VCM).
+/// The output normals are randomly oriented.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
+/// @tparam Kernel Geometric traits class.
+/// @tparam Covariance Covariance matrix type. It is similar to an array with a length of 6.
+/// @pre If `nb_neighbors_convolve` is equal to -1, then the convolution is made using a radius.
+/// On the contrary, if `nb_neighbors_convolve` is different from -1, the convolution is made using
+/// this number of neighbors.
+
+// This variant requires all of the parameters.
+template < typename VCMTraits,
+           typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename Kernel
+>
+void
+vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input point.
+                      ForwardIterator beyond, ///< past-the-end iterator over the input points.
+                      PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+                      NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+                      double offset_radius, ///< offset radius.
+                      double convolution_radius, ///< convolution radius.
+                      const Kernel & kernel, ///< geometric traits.
+                      int nb_neighbors_convolve = -1 ///< number of neighbors used during the convolution.
+)
+{
+    typedef cpp11::array<double, 6> Covariance;
+    // Compute the VCM and convolve it
+    std::vector<Covariance> cov;
+    if (nb_neighbors_convolve == -1) {
+        compute_vcm(first, beyond,
+                    point_pmap,
+                    cov,
+                    offset_radius,
+                    convolution_radius,
+                    kernel);
+    } else {
+        internal::vcm_offset(first, beyond,
+                             point_pmap,
+                             cov,
+                             offset_radius,
+                             20,
+                             kernel);
+
+        if (nb_neighbors_convolve > 0)
+        {
+          std::vector<Covariance> ccov;
+          ccov.reserve(cov.size());
+          internal::vcm_convolve(first, beyond,
+                                 point_pmap,
+                                 cov,
+                                 ccov,
+                                 (unsigned int) nb_neighbors_convolve,
+                                 kernel);
+
+          cov.clear();
+          std::copy(ccov.begin(), ccov.end(), std::back_inserter(cov));
+        }
+    }
+
+    // And finally, compute the normals
+    int i = 0;
+    for (ForwardIterator it = first; it != beyond; ++it) {
+        cpp11::array<double, 3> enormal = {{ 0,0,0 }};
+        VCMTraits::extract_largest_eigenvector_of_covariance_matrix
+          (cov[i], enormal);
+
+        typename Kernel::Vector_3 normal(enormal[0],
+                                         enormal[1],
+                                         enormal[2]);
+        put(normal_pmap, *it, normal);
+        i++;
+    }
+}
+/// @endcond
+
+/// \ingroup PkgPointSetProcessing
+/// Estimates normal directions of the points in the range `[first, beyond)`
+/// using the Voronoi Covariance Measure with a radius for the convolution.
+/// The output normals are randomly oriented.
+///
+/// See `compute_vcm()` for a detailed description of the parameters `offset_radius` and `convolution_radius`
+/// and of the Voronoi Covariance Measure.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
+/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
+/// omitted: if Eigen 3 (or greater) is available and
+/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
+/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
+/// implementation `Diagonalize_traits` is used.
+// This variant deduces the kernel from the point property map
+// and uses a radius for the convolution.
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename VCMTraits
+>
+void
+vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input point.
+                      ForwardIterator beyond, ///< past-the-end iterator over the input points.
+                      PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+                      NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+                      double offset_radius, ///< offset radius.
+                      double convolution_radius, ///< convolution radius.
+                      VCMTraits
+)
+{
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename Kernel_traits<Point>::Kernel Kernel;
+
+    vcm_estimate_normals<VCMTraits>(first, beyond,
+				    point_pmap, normal_pmap,
+				    offset_radius, convolution_radius,
+				    Kernel());
+}
+
+
+/// \ingroup PkgPointSetProcessing
+/// Estimates normal directions of the points in the range `[first, beyond)`
+/// using the Voronoi Covariance Measure with a number of neighbors for the convolution.
+/// The output normals are randomly oriented.
+///
+/// See `compute_vcm()` for a detailed description of the parameter `offset_radius`
+/// and of the Voronoi Covariance Measure.
+///
+/// @tparam ForwardIterator iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
+/// @tparam NormalPMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
+/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
+/// omitted: if Eigen 3 (or greater) is available and
+/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
+/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
+/// implementation `Diagonalize_traits` is used.
+
+// This variant deduces the kernel from the point property map
+// and uses a number of neighbors for the convolution.
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap,
+           typename VCMTraits
+>
+void
+vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input point.
+                      ForwardIterator beyond, ///< past-the-end iterator over the input points.
+                      PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3.
+                      NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3.
+                      double offset_radius, ///< offset radius.
+                      unsigned int k, ///< number of neighbor points used for the convolution.
+                      VCMTraits
+)
+{
+    typedef typename boost::property_traits<PointPMap>::value_type Point;
+    typedef typename Kernel_traits<Point>::Kernel Kernel;
+
+    vcm_estimate_normals<VCMTraits>(first, beyond,
+				    point_pmap, normal_pmap,
+				    offset_radius, 0,
+				    Kernel(),
+				    k);
+}
+
+
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap
+>
+void
+vcm_estimate_normals (ForwardIterator first,
+                      ForwardIterator beyond,
+                      PointPMap point_pmap,
+                      NormalPMap normal_pmap,
+                      double offset_radius,
+                      double convolution_radius)
+{
+  vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, convolution_radius,
+		       CGAL::Default_diagonalize_traits<double, 3>());
+}
+
+template < typename ForwardIterator,
+           typename PointPMap,
+           typename NormalPMap
+>
+void
+vcm_estimate_normals (ForwardIterator first,
+                      ForwardIterator beyond,
+                      PointPMap point_pmap,
+                      NormalPMap normal_pmap,
+                      double offset_radius,
+                      unsigned int nb_neighbors_convolve)
+{
+  vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, nb_neighbors_convolve,
+		       CGAL::Default_diagonalize_traits<double, 3>());
+
+}
+
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map
+// and use a radius for the convolution.
+template < typename ForwardIterator,
+           typename NormalPMap
+>
+void
+vcm_estimate_normals (ForwardIterator first,
+                      ForwardIterator beyond,
+                      NormalPMap normal_pmap,
+                      double offset_radius,
+                      double convolution_radius) {
+    vcm_estimate_normals(first, beyond,
+                         make_identity_property_map(typename std::iterator_traits<ForwardIterator>::value_type()),
+                         normal_pmap,
+                         offset_radius, convolution_radius);
+}
+/// @endcond
+
+/// @cond SKIP_IN_MANUAL
+// This variant creates a default point property map = Identity_property_map
+// and use a number of neighbors for the convolution.
+template < typename ForwardIterator,
+           typename NormalPMap
+>
+void
+vcm_estimate_normals (ForwardIterator first,
+                      ForwardIterator beyond,
+                      NormalPMap normal_pmap,
+                      double offset_radius,
+                      unsigned int nb_neighbors_convolve) {
+    vcm_estimate_normals(first, beyond,
+                         make_identity_property_map(typename std::iterator_traits<ForwardIterator>::value_type()),
+                         normal_pmap,
+                         offset_radius, nb_neighbors_convolve);
+}
+/// @endcond
+
+} // namespace CGAL
+
+#endif // CGAL_VCM_ESTIMATE_NORMALS_H
diff --git a/3rdparty/CGAL-4.8/include/CGAL/vector.h b/3rdparty/CGAL-4.8/include/CGAL/vector.h
new file mode 100644
index 0000000..9e67172
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/vector.h
@@ -0,0 +1,620 @@
+// Copyright (c) 1997, 1998, 1999, 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at sophia.inria.fr>
+//                 Lutz Kettner <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_VECTOR_H
+#define CGAL_VECTOR_H 1
+
+#include <CGAL/basic.h>
+#include <CGAL/memory.h>
+#include <iterator>
+#include <algorithm>
+#include <memory>
+#include <cstddef>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+
+namespace CGAL {
+
+namespace internal {
+
+// We give the vector container class a class based iterator implementation.
+// It ensures that iterator_traits work on compilers not supporting
+// partial specializations and it guarantees that default initialization
+// initializes the internal pointer to 0. Allows explicit construction 
+// from a pointer.
+
+template < class T, class Ref, class Ptr>
+class vector_iterator {
+private:
+    Ptr ptr;
+public:
+    typedef vector_iterator< T, Ref, Ptr>      Self;
+    typedef T                                  value_type;
+    typedef Ref                                reference;
+    typedef Ptr                                pointer;
+    typedef std::ptrdiff_t                     difference_type;
+    typedef std::random_access_iterator_tag    iterator_category;
+
+    // CREATION
+    // --------
+    vector_iterator() : ptr(0) {}                // explicitly set to 0
+    explicit vector_iterator( Ptr p) : ptr(p) {} // construction from pointer
+
+    // Allows construction of const_iterator from iterator
+    template < class A, class B, class C>
+    vector_iterator( const vector_iterator<A,B,C>& i) : ptr( &*i) {}
+
+    // OPERATIONS Forward Category
+    // ---------------------------
+
+    bool      operator==( const Self& i) const { return ( ptr == i.ptr); }
+    bool      operator!=( const Self& i) const { return !(*this == i); }
+    reference operator*()                const { return *ptr; }
+    pointer   operator->()               const { return ptr; }
+    Self& operator++() {
+        ++ptr;
+        return *this;
+    }
+    Self  operator++(int) {
+        Self tmp = *this;
+        ++*this;
+        return tmp;
+    }
+
+    // OPERATIONS Bidirectional Category
+    // ---------------------------------
+    Self& operator--() {
+        --ptr;
+        return *this;
+    }
+    Self  operator--(int) {
+        Self tmp = *this;
+        --*this;
+        return tmp;
+    }
+
+    // OPERATIONS Random Access Category
+    // ---------------------------------
+    Self& operator+=( difference_type n) {
+        ptr += n;
+        return *this;
+    }
+    Self  operator+( difference_type n) const {
+        Self tmp = *this;
+        return tmp += n;
+    }
+    Self& operator-=( difference_type n) { return operator+=( -n); }
+    Self  operator-( difference_type n) const {
+        Self tmp = *this;
+        return tmp += -n;
+    }
+    difference_type  operator-( const Self& i) const { return ptr - i.ptr; }
+    reference  operator[]( difference_type n) const {
+        Self tmp = *this;
+        tmp += n;
+        return tmp.operator*();
+    }
+    bool operator< ( const Self& i) const { return ( ptr < i.ptr); }
+    bool operator> ( const Self& i) const { return i < *this;    }
+    bool operator<=( const Self& i) const { return !(i < *this); }
+    bool operator>=( const Self& i) const { return !(*this < i); }
+
+    vector_iterator<  T,
+                      typename boost::remove_const<
+                        typename boost::remove_reference<Ref>::type
+                      >::type&,
+                      typename boost::remove_const<
+                          typename boost::remove_pointer<Ptr>::type
+                      >::type* >
+    remove_const() const
+    {
+      typedef typename boost::remove_const<
+                typename boost::remove_pointer<Ptr>::type
+              >::type* Ptr_no_c;
+      return  vector_iterator< T,
+                     typename boost::remove_const<typename boost::remove_reference<Ref>::type>::type&,
+                     Ptr_no_c>
+              ( const_cast<Ptr_no_c>(ptr) );
+    }
+};
+
+template < class T, class Ref, class Ptr> inline
+vector_iterator<T,Ref,Ptr> 
+operator+( std::ptrdiff_t n, vector_iterator<T,Ref,Ptr> i) {
+    return i += n;
+}
+
+
+template < class T, class Alloc = CGAL_ALLOCATOR(T)>
+class vector {
+public:
+    typedef Alloc           Allocator;
+    typedef Alloc           allocator_type; // STL compliant
+
+    // Note: the standard requires the following types to be equivalent
+    // to T, T*, const T*, T&, const T&, size_t, and ptrdiff_t, respectively.
+    // So we don't pass these types to the iterators explicitly.
+    typedef typename Allocator::value_type           value_type;
+    typedef typename Allocator::pointer              pointer;
+    typedef typename Allocator::const_pointer        const_pointer;
+    typedef typename Allocator::reference            reference;
+    typedef typename Allocator::const_reference      const_reference;
+    typedef typename Allocator::size_type            size_type;
+    typedef typename Allocator::difference_type      difference_type;
+    typedef std::random_access_iterator_tag          iterator_category;
+    typedef vector_iterator< T, reference, pointer>  iterator;
+    typedef vector_iterator< T, const_reference, const_pointer>
+                                                     const_iterator;
+    typedef vector< T, Alloc>                        Self;
+
+    typedef std::reverse_iterator<iterator>          reverse_iterator;
+    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
+
+protected:
+#ifndef _MSC_VER
+    // Somehow the static initialization does not work correctly for MSVC
+    // ---> strange linker errors
+    static
+#endif // _MSC_VER
+    Allocator alloc;
+
+    iterator start_;
+    iterator finish;
+    iterator end_of_storage;
+
+    // ALLOCATION AND CONSTRUCTION HELPERS
+    void construct( iterator i, const T& x) { alloc.construct( &*i, x);}
+    void destroy( iterator i) { alloc.destroy( &*i); }
+    void destroy( iterator first, iterator last) {
+        // destroy in reverse order than construction
+        while ( last != first) {
+            --last;
+            destroy( last);
+        }
+    }
+    void deallocate() {
+        if ( start_ != iterator() )
+            alloc.deallocate( &*start_, end_of_storage - start_ );
+    }
+
+protected:
+    // pointer versions of begin()/end() to call the various
+    // standard algorithms with the (possibly) more efficient pointers.
+    pointer         pbegin()         { return &*start_; }
+    const_pointer   pbegin()   const { return &*start_; }
+    pointer         pend()           { return &*finish; }
+    const_pointer   pend()     const { return &*finish; }
+
+public:
+    // ACCESS
+    // ------
+    iterator        begin()          { return start_; }
+    const_iterator  begin()    const { return start_; }
+    iterator        end()            { return finish; }
+    const_iterator  end()      const { return finish; }
+    size_type       size()     const { return size_type(end() - begin()); }
+    size_type       max_size() const { return size_type(-1) / sizeof(T); }
+    size_type       capacity() const {
+                        return size_type(end_of_storage - start_);
+    }
+    bool            empty()    const { return begin() == end(); }
+
+    reference       front()          { return *begin(); }
+    const_reference front()    const { return *begin(); }
+    reference       back()           { return *(end() - 1); }
+    const_reference back()     const { return *(end() - 1); }
+    reference       operator[] ( size_type n)       { return *(begin() + n); }
+    const_reference operator[] ( size_type n) const { return *(begin() + n); }
+    reference       at( size_type n)                { return *(begin() + n); }
+    const_reference at( size_type n)          const { return *(begin() + n); }
+
+    Allocator       get_allocator() const { return alloc; }
+
+    reverse_iterator       rbegin() { return reverse_iterator(end()); }
+    const_reverse_iterator rbegin() const {
+        return const_reverse_iterator(end());
+    }
+    reverse_iterator       rend() { return reverse_iterator(begin()); }
+    const_reverse_iterator rend() const {
+        return const_reverse_iterator(begin());
+    }
+
+
+    // COMPARISON
+    // ----------
+    bool      operator==( const Self& y) const {
+        return size() == y.size() && std::equal( pbegin(), pend(), y.pbegin());
+    }
+    bool      operator!=( const Self& y) const { return !(*this == y); }
+    bool operator< ( const Self& y) const {
+        return std::lexicographical_compare( pbegin(),   pend(),
+                                             y.pbegin(), y.pend());
+    }
+    bool operator> ( const Self& y) const { return y < *this;    }
+    bool operator<=( const Self& y) const { return !(y < *this); }
+    bool operator>=( const Self& y) const { return !(*this < y); }
+
+    // CREATION
+    // --------
+    explicit vector()
+        : start_(0), finish(0), end_of_storage(0) {}
+    explicit vector( const Alloc& a)
+        : start_(0), finish(0), end_of_storage(0) { alloc = a; }
+    explicit vector( size_type n, const T& val) { fill_initialize(n, val); }
+    explicit vector( size_type n) { fill_initialize(n, T()); }
+
+    vector( const Self& x) {
+        start_ = allocate_and_copy( x.end() - x.begin(), x.begin(), x.end());
+        finish = start_ + (x.end() - x.begin());
+        end_of_storage = finish;
+    }
+
+    template <class InputIterator>
+    vector( InputIterator first, InputIterator last, const Alloc& a = Alloc())
+        : start_(0), finish(0), end_of_storage(0)
+    {
+        alloc = a;
+        typedef std::iterator_traits<InputIterator> Traits;
+        typedef typename Traits::iterator_category  iterator_category;
+        range_initialize( first, last, iterator_category());
+    }
+
+    ~vector() { 
+        destroy( start_, finish);
+        deallocate();
+    }
+
+    vector<T, Alloc>& operator=(const Self& x) {
+        if (&x != this) {
+            if ( x.size() > capacity()) {
+                iterator tmp = allocate_and_copy( x.end() - x.begin(),
+                                                  x.begin(),
+                                                  x.end());
+                destroy( start_, finish);
+                deallocate();
+                start_ = tmp;
+                end_of_storage = start_ + (x.end() - x.begin());
+            } else if (size() >= x.size()) {
+                iterator i = std::copy( x.begin(), x.end(), begin());
+                destroy( i, finish);
+            } else {
+                std::copy( x.begin(), x.begin() + size(), begin());
+                std::uninitialized_copy(x.pbegin() + size(), x.pend(), pend());
+            }
+            finish = start_ + x.size();
+        }
+        return *this;
+    }
+
+    void swap( Self& x) {
+        std::swap( start_, x.start_);
+        std::swap( finish, x.finish);
+        std::swap( end_of_storage, x.end_of_storage);
+    }
+
+    void reserve( size_type n) {
+        if ( capacity() < n) {
+            const size_type old_size = size();
+            iterator tmp = allocate_and_copy( n, start_, finish);
+            destroy(start_, finish);
+            deallocate();
+            start_ = tmp;
+            finish = tmp + old_size;
+            end_of_storage = start_ + n;
+        }
+    }
+
+    // INSERTION
+    // ---------
+    void push_back( const T& x) {
+        if ( finish != end_of_storage) {
+            construct( finish, x);
+            ++finish;
+        } else {
+            insert_aux( end(), x);
+        }
+    }
+
+    iterator insert( iterator position, const T& x) {
+        size_type n = position - begin();
+        if (finish != end_of_storage && position == end()) {
+            construct( finish, x);
+            ++finish;
+        } else {
+            insert_aux( position, x);
+        }
+        return begin() + n;
+    }
+    iterator insert(iterator position) { return insert( position, T()); }
+
+    template <class InputIterator>
+    void insert( iterator position, InputIterator first, InputIterator last) {
+        typedef std::iterator_traits<InputIterator> Traits;
+        typedef typename Traits::iterator_category  iterator_category;
+        range_insert( position, first, last, iterator_category());
+    }
+    void insert( iterator pos, size_type n, const T& x);
+
+    // REMOVAL
+    // -------
+    void pop_back() {
+        --finish;
+        destroy( finish);
+    }
+    iterator erase( iterator position) {
+        if (position + 1 != end())
+            std::copy( position + 1, finish, position);
+        --finish;
+        destroy(finish);
+        return position;
+    }
+    iterator erase( iterator first, iterator last) {
+        iterator i = std::copy( last, finish, first);
+        destroy( i, finish);
+        finish = finish - (last - first);
+        return first;
+    }
+    void clear() { erase( begin(), end()); }
+
+    // ASSIGNMENT
+    // ----------
+    template <class InputIterator>
+    void assign( InputIterator first, InputIterator last) {
+        clear();
+        insert( begin(), first, last);
+    }
+    void assign( size_type n, const T& u) {
+        clear();
+        insert( begin(), n, u);
+    }
+
+    void resize( size_type new_size, const T& x) {
+        if (new_size < size()) 
+            erase( begin() + new_size, end());
+        else
+            insert( end(), new_size - size(), x);
+    }
+    void resize( size_type new_size) { resize( new_size, T()); }
+
+protected:
+    // INTERNAL
+    // --------
+    void insert_aux( iterator position, const T& x);
+
+    void fill_initialize( size_type n, const T& value) {
+        start_ = allocate_and_fill(n, value);
+        finish = start_ + n;
+        end_of_storage = finish;
+    }
+
+    iterator allocate_and_fill( size_type n, const T& x) {
+        iterator result = iterator( alloc.allocate(n));
+        try {
+            std::uninitialized_fill_n( &*result, n, x);
+            return result;
+        }
+        catch(...) { 
+            alloc.deallocate( &*result, n);
+            throw;
+        }
+    }
+
+    template <class ForwardIterator>
+    iterator allocate_and_copy( size_type n,
+                                ForwardIterator first,
+                                ForwardIterator last) {
+        iterator result = iterator( alloc.allocate(n));
+        try {
+            std::uninitialized_copy( first, last, &*result);
+            return result;
+        }
+        catch(...) { 
+            alloc.deallocate( &*result, n);
+            throw;
+        }
+    }
+
+    template <class InputIterator>
+    void range_initialize(InputIterator first,
+                          InputIterator last,
+                          std::input_iterator_tag) {
+        for ( ; first != last; ++first)
+            push_back(*first);
+    }
+
+    // This function is only called by the constructor.  We have to worry
+    //  about resource leaks, but not about maintaining invariants.
+    template <class ForwardIterator>
+    void range_initialize( ForwardIterator first,
+                           ForwardIterator last,
+                           std::forward_iterator_tag) {
+        size_type n = std::distance( first, last);
+        start_ = allocate_and_copy( n, first, last);
+        finish = start_ + n;
+        end_of_storage = finish;
+    }
+
+    template <class InputIterator>
+    void range_insert( iterator pos,
+                       InputIterator first,
+                       InputIterator last,
+                       std::input_iterator_tag) {
+        for ( ; first != last; ++first) {
+            pos = insert( pos, *first);
+            ++pos;
+        }
+    }
+
+    template <class ForwardIterator>
+    void range_insert( iterator position,
+                       ForwardIterator first,
+                       ForwardIterator last,
+                       std::forward_iterator_tag) {
+        if (first != last) {
+            size_type n = std::distance(first, last);
+            if ( size_type(end_of_storage - finish) >= n) {
+                const size_type elems_after = finish - position;
+                iterator old_finish = finish;
+                if (elems_after > n) {
+                    std::uninitialized_copy( pend() - n, pend(), pend());
+                    finish += n;
+                    std::copy_backward( position, old_finish - n, old_finish);
+                    std::copy( first, last, position);
+                } else {
+                    ForwardIterator mid = first;
+                    std::advance( mid, elems_after);
+                    std::uninitialized_copy( mid, last, pend());
+                    finish += n - elems_after;
+                    std::uninitialized_copy( position, old_finish, pend());
+                    finish += elems_after;
+                    std::copy( first, mid, position);
+                }
+            } else {
+                const size_type old_size = size();
+                const size_type len = old_size + (std::max)( old_size, n);
+                iterator new_start = iterator( alloc.allocate(len));
+                iterator new_finish = new_start;
+                try {
+                    new_finish = iterator( 
+                        std::uninitialized_copy(start_, position,&*new_start));
+                    new_finish = iterator(
+                        std::uninitialized_copy( first, last, &*new_finish));
+                    new_finish = iterator( 
+                        std::uninitialized_copy(position,finish,&*new_finish));
+                }
+                catch(...) {
+                    destroy( new_start, new_finish);
+                    alloc.deallocate( &*new_start, len);
+                    throw;
+                }
+                destroy( start_, finish);
+                deallocate();
+                start_ = new_start;
+                finish = new_finish;
+                end_of_storage = new_start + len;
+            }
+        }
+    }
+}; // class vector
+
+#ifndef _MSC_VER
+// init static member allocator object
+template <class T, class Alloc>
+Alloc vector< T, Alloc>::alloc = Alloc();
+#endif // _MSC_VER
+
+
+template <class T, class Alloc>
+inline void swap( vector<T, Alloc>& x, vector<T, Alloc>& y) {
+    x.swap(y);
+}
+
+template <class T, class Alloc>
+void vector<T, Alloc>::insert_aux( iterator position, const T& x) {
+    if ( finish != end_of_storage) {
+        construct( finish, *(finish - 1));
+        ++finish;
+        T x_copy = x;
+        std::copy_backward( position, finish - 2, finish - 1);
+        *position = x_copy;
+    } else {
+        const size_type old_size = size();
+        const size_type len = old_size != 0 ? 2 * old_size : 1;
+        iterator new_start = iterator( alloc.allocate(len));
+        iterator new_finish = new_start;
+        try {
+            new_finish = iterator(
+                std::uninitialized_copy(start_, position, &*new_start));
+            construct( new_finish, x);
+            ++new_finish;
+            new_finish = iterator(
+                std::uninitialized_copy(position,finish,&*new_finish));
+        }
+        catch(...) {
+            destroy( new_start, new_finish); 
+            alloc.deallocate( &*new_start, len);
+            throw;
+        }
+        destroy( begin(), end());
+        deallocate();
+        start_ = new_start;
+        finish = new_finish;
+        end_of_storage = new_start + len;
+    }
+}
+
+
+template <class T, class Alloc>
+void vector<T, Alloc>::insert( iterator position, size_type n, const T& x) {
+    if (n != 0) {
+        if ( size_type(end_of_storage - finish) >= n) {
+            T x_copy = x;
+            const size_type elems_after = finish - position;
+            iterator old_finish = finish;
+            if (elems_after > n) {
+                std::uninitialized_copy( pend() - n, pend(), pend());
+                finish += n;
+                std::copy_backward( position, old_finish - n, old_finish);
+                std::fill( position, position + n, x_copy);
+            } else {
+                std::uninitialized_fill_n( pend(), n - elems_after, x_copy);
+                finish += n - elems_after;
+                std::uninitialized_copy( position, old_finish, pend());
+                finish += elems_after;
+                std::fill(position, old_finish, x_copy);
+            }
+        } else {
+            const size_type old_size = size();        
+            const size_type len = old_size + (std::max)(old_size, n);
+            iterator new_start = iterator( alloc.allocate(len));
+            iterator new_finish = new_start;
+            try {
+                new_finish = iterator(
+                    std::uninitialized_copy( start_, position, &*new_start));
+                std::uninitialized_fill_n( &*new_finish, n, x);
+                new_finish += n;
+                new_finish = iterator( 
+                    std::uninitialized_copy( position, finish, &*new_finish));
+            }
+            catch(...) {
+                destroy( new_start, new_finish);
+                alloc.deallocate( &*new_start, len);
+                throw;
+            }
+            destroy( start_, finish);
+            deallocate();
+            start_ = new_start;
+            finish = new_finish;
+            end_of_storage = new_start + len;
+        }
+    }
+}
+
+} // namespace internal
+
+} //namespace CGAL
+
+#endif // CGAL_VECTOR_H //
diff --git a/3rdparty/CGAL-4.8/include/CGAL/version.h b/3rdparty/CGAL-4.8/include/CGAL/version.h
new file mode 100644
index 0000000..a9fc6a9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/version.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2006  Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Author(s)     : -
+
+// This file is automatically created by create_internal_release.
+// Do not edit manually.
+
+#ifndef CGAL_VERSION_H
+#define CGAL_VERSION_H
+
+#define CGAL_xstr(s) #s
+#define CGAL_str(s) CGAL_xstr(s)
+
+#define CGAL_VERSION 4.8
+#define CGAL_VERSION_NR 1040801000
+#define CGAL_SVN_REVISION 99999
+#define CGAL_GIT_HASH dbb2be14621e43d107cfa7c3adf73d5374f5b618
+#define CGAL_VERSION_STR CGAL_str(CGAL_VERSION)
+
+#endif
diff --git a/3rdparty/CGAL-4.6/include/CGAL/version_macros.h b/3rdparty/CGAL-4.8/include/CGAL/version_macros.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/version_macros.h
rename to 3rdparty/CGAL-4.8/include/CGAL/version_macros.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/vtkSurfaceMesherContourFilter.h b/3rdparty/CGAL-4.8/include/CGAL/vtkSurfaceMesherContourFilter.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/vtkSurfaceMesherContourFilter.h
rename to 3rdparty/CGAL-4.8/include/CGAL/vtkSurfaceMesherContourFilter.h
diff --git a/3rdparty/CGAL-4.6/include/CGAL/width_assertions.h b/3rdparty/CGAL-4.8/include/CGAL/width_assertions.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/width_assertions.h
rename to 3rdparty/CGAL-4.8/include/CGAL/width_assertions.h
diff --git a/3rdparty/CGAL-4.8/include/CGAL/wlop_simplify_and_regularize_point_set.h b/3rdparty/CGAL-4.8/include/CGAL/wlop_simplify_and_regularize_point_set.h
new file mode 100644
index 0000000..03752c4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/include/CGAL/wlop_simplify_and_regularize_point_set.h
@@ -0,0 +1,715 @@
+// Copyright (c) 2013-06  INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez 
+
+#ifndef CGAL_wlop_simplify_and_regularize_point_set_H
+#define CGAL_wlop_simplify_and_regularize_point_set_H
+
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Orthogonal_k_neighbor_search.h>
+#include <CGAL/property_map.h>
+#include <CGAL/point_set_processing_assertions.h>
+#include <CGAL/Memory_sizer.h>
+#include <CGAL/compute_average_spacing.h>
+
+#include <iterator>
+#include <set>
+#include <algorithm>
+#include <cmath>
+#include <ctime>
+
+#ifdef CGAL_LINKED_WITH_TBB
+#include <tbb/parallel_for.h>
+#include <tbb/blocked_range.h>
+#endif // CGAL_LINKED_WITH_TBB
+
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Fuzzy_sphere.h>
+#include <CGAL/Search_traits_3.h>
+#include <CGAL/Bbox_3.h>
+
+namespace CGAL {
+// ----------------------------------------------------------------------------
+// Private section
+// ----------------------------------------------------------------------------
+/// \cond SKIP_IN_MANUAL
+
+namespace simplify_and_regularize_internal{
+
+// Item in the Kd-tree: position (Point_3) + index
+template <typename Kernel>
+class Kd_tree_element : public Kernel::Point_3
+{
+public:
+  unsigned int index;
+
+  // basic geometric types
+  typedef typename CGAL::Origin Origin;
+  typedef typename Kernel::Point_3 Base;
+
+  Kd_tree_element(const Origin& o = ORIGIN, unsigned int id=0)
+    : Base(o), index(id)
+  {}
+  Kd_tree_element(const Base& p, unsigned int id=0)
+    : Base(p), index(id)
+  {}
+  Kd_tree_element(const Kd_tree_element& other)
+    : Base(other), index(other.index)
+  {}
+};
+
+// Helper class for the Kd-tree
+template <typename Kernel>
+class Kd_tree_gt : public Kernel
+{
+public:
+  typedef Kd_tree_element<Kernel> Point_3;
+};
+
+template <typename Kernel>
+class Kd_tree_traits : public CGAL::Search_traits_3<Kd_tree_gt<Kernel> >
+{
+public:
+  typedef typename Kernel::Point_3 PointType;
+};
+
+/// Compute average and repulsion term, then 
+/// compute and update sample point locations
+/// 
+/// \pre `radius > 0`
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree Kd-tree.
+///
+/// @return average term vector
+template <typename Kernel,
+          typename Tree,
+          typename RandomAccessIterator>
+typename Kernel::Point_3
+compute_update_sample_point(
+  const typename Kernel::Point_3& query, ///< 3D point to project
+  const Tree& original_kd_tree,          ///< original Kd-tree
+  const Tree& sample_kd_tree,            ///< sample Kd-tree
+  const typename Kernel::FT radius,      ///< neighborhood radius square
+  const std::vector<typename Kernel::FT>& original_densities, ///<  
+  const std::vector<typename Kernel::FT>& sample_densities ///< 
+)
+{
+  CGAL_point_set_processing_precondition(radius > 0);
+  bool is_original_densities_empty = original_densities.empty();
+  bool is_sample_densities_empty = sample_densities.empty();
+
+  // basic geometric types
+  typedef typename Kernel::Point_3 Point;
+  typedef typename Kernel::Vector_3 Vector;
+  typedef typename Kernel::FT FT;
+
+  //types for range search
+  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
+  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
+  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
+
+  //range search for original neighborhood
+  Fuzzy_sphere fs(query, radius, 0.0);
+  std::vector<Kd_tree_point> neighbor_original_points;
+  original_kd_tree.search(std::back_inserter(neighbor_original_points), fs);
+
+  //Compute average term
+  FT radius2 = radius * radius;
+  Vector average = CGAL::NULL_VECTOR; 
+  FT weight = (FT)0.0, average_weight_sum = (FT)0.0;
+  FT iradius16 = -(FT)4.0 / radius2;
+
+  typename std::vector<Kd_tree_point>::iterator iter;
+  iter = neighbor_original_points.begin();
+  for (; iter != neighbor_original_points.end(); ++iter)
+  {
+    const Point& np = *iter;
+
+    Kd_tree_point& kp = *iter;
+    int original_index = kp.index;
+
+    FT dist2 = CGAL::squared_distance(query, np);
+    if (dist2 < 1e-10) continue;
+
+    weight = exp(dist2 * iradius16);
+
+    if (!is_original_densities_empty)
+    {
+      weight *= original_densities[original_index];
+    }
+    average_weight_sum += weight;
+    average = average + (np - CGAL::ORIGIN) * weight;
+  }
+
+  if (neighbor_original_points.empty() || average_weight_sum < FT(1e-10))
+  {
+    average = query - CGAL::ORIGIN;
+  }
+  else
+  {
+    average = average / average_weight_sum; 
+  }
+  neighbor_original_points.clear();
+  
+
+  //Compute repulsion term
+
+  Fuzzy_sphere fs2(query, radius, 0.0);
+  std::vector<Kd_tree_point> neighbor_sample_points;
+  sample_kd_tree.search(std::back_inserter(neighbor_sample_points), fs2);
+
+  weight = (FT)0.0;
+  FT repulsion_weight_sum = (FT)0.0;
+  Vector repulsion = CGAL::NULL_VECTOR; 
+
+  iter = neighbor_sample_points.begin();
+  for(; iter != neighbor_sample_points.end(); ++iter)
+  {
+    const Point& np = *iter;
+
+    Kd_tree_point& kp = *iter;
+    int sample_index = kp.index;
+
+    FT dist2 = CGAL::squared_distance(query, np);
+    if (dist2 < 1e-10) continue;
+    FT dist = std::sqrt(dist2);
+    
+    weight = std::exp(dist2 * iradius16) * std::pow(FT(1.0) / dist, 2); // L1
+   
+    if (!is_sample_densities_empty)
+    {
+      weight *= sample_densities[sample_index];
+    }
+
+    Vector diff = query - np;
+
+    repulsion_weight_sum += weight;
+    repulsion = repulsion + diff * weight;
+  }
+
+  if (neighbor_sample_points.size() < 3 || repulsion_weight_sum < FT(1e-10))
+  {
+    repulsion = CGAL::NULL_VECTOR;
+  }
+  else
+  {
+    repulsion = repulsion / repulsion_weight_sum; 
+  }
+  neighbor_sample_points.clear();
+
+  // Compute update sample point
+  Point update_sample = CGAL::ORIGIN + average + FT(0.45) * repulsion;
+  return update_sample;
+}
+
+
+/// Compute density weight for each original points,
+/// according to their neighbor original points
+/// 
+/// \pre `k >= 2`, radius > 0
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree Kd-tree.
+///
+/// @return computed point
+template <typename Kernel, typename Tree>
+typename Kernel::FT
+compute_density_weight_for_original_point(
+  const typename Kernel::Point_3& query, ///< 3D point to project
+  Tree& original_kd_tree,                       ///< Kd-tree
+  const typename Kernel::FT radius       ///< neighbor radius square
+)
+{
+  CGAL_point_set_processing_precondition(radius > 0);
+
+  // basic geometric types
+  typedef typename Kernel::Point_3                         Point;
+  typedef typename Kernel::FT                              FT;
+                                                          
+  //types for range search
+  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
+  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
+  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
+
+  //range search for original neighborhood
+  Fuzzy_sphere fs(query, radius, 0.0);
+  std::vector<Kd_tree_point> neighbor_original_points;
+
+  original_kd_tree.search(std::back_inserter(neighbor_original_points), fs);
+
+  //Compute density weight
+  FT radius2 = radius * radius;
+  FT density_weight = (FT)1.0;
+  FT iradius16 = -(FT)4.0 / radius2;
+
+  typename std::vector<Kd_tree_point>::iterator iter;
+  iter = neighbor_original_points.begin();
+
+  for (; iter != neighbor_original_points.end(); iter++)
+  {
+    const Point& np = *iter;
+
+    FT dist2 = CGAL::squared_distance(query, np);
+    if (dist2 < 1e-8) continue;
+    
+    density_weight += std::exp(dist2 * iradius16);
+  }
+
+  // output
+  return FT(1.0) / density_weight;
+}
+
+
+/// Compute density weight for sample point,
+/// according to their neighbor sample points
+/// 
+/// \pre `k >= 2`, radius > 0
+///
+/// @tparam Kernel Geometric traits class.
+/// @tparam Tree Kd-tree.
+///
+/// @return computed point
+template <typename Kernel, typename Tree>
+typename Kernel::FT
+compute_density_weight_for_sample_point(
+  const typename Kernel::Point_3& query, ///< 3D point to project
+  Tree& sample_kd_tree,                ///< Kd-tree
+  const typename Kernel::FT radius       ///< neighbor radius square
+)
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3                          Point;
+  typedef typename Kernel::FT                               FT;
+
+  //types for range search
+  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_point;
+  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Traits;
+  typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
+
+  //range search for original neighborhood
+  Fuzzy_sphere fs(query, radius, 0.0);
+  std::vector<Kd_tree_point> neighbor_sample_points;
+  sample_kd_tree.search(std::back_inserter(neighbor_sample_points), fs);
+
+  //Compute density weight
+  FT radius2 = radius * radius;
+  FT density_weight = (FT)1.0;
+  FT iradius16 = -(FT)4.0 / radius2;
+
+  typename std::vector<Kd_tree_point>::iterator iter;
+  iter = neighbor_sample_points.begin();
+
+  for (; iter != neighbor_sample_points.end(); iter++)
+  {
+    const Point& np = *iter;
+
+    FT dist2 = CGAL::squared_distance(query, np);
+    density_weight += std::exp(dist2 * iradius16);
+  }
+  
+  return density_weight;
+}
+
+} // namespace simplify_and_regularize_internal
+
+/// \endcond
+
+#ifdef CGAL_LINKED_WITH_TBB
+/// \cond SKIP_IN_MANUAL
+/// This is for parallelization of function: compute_denoise_projection()
+template <typename Kernel, typename Tree, typename RandomAccessIterator>
+class Sample_point_updater 
+{
+  typedef typename Kernel::Point_3   Point;
+  typedef typename Kernel::FT        FT;
+
+  std::vector<Point> &update_sample_points;
+  std::vector<Point> &sample_points;
+  const Tree &original_kd_tree;            
+  const Tree &sample_kd_tree;              
+  const typename Kernel::FT radius;  
+  const std::vector<typename Kernel::FT> &original_densities;
+  const std::vector<typename Kernel::FT> &sample_densities; 
+
+public:
+  Sample_point_updater(
+    std::vector<Point> &out,
+    std::vector<Point> &in,
+    const Tree &_original_kd_tree,            
+    const Tree &_sample_kd_tree,              
+    const typename Kernel::FT _radius,
+    const std::vector<typename Kernel::FT> &_original_densities,
+    const std::vector<typename Kernel::FT> &_sample_densities): 
+  update_sample_points(out), 
+    sample_points(in),
+    original_kd_tree(_original_kd_tree),
+    sample_kd_tree(_sample_kd_tree),
+    radius(_radius),
+    original_densities(_original_densities),
+    sample_densities(_sample_densities){} 
+
+
+  void operator() ( const tbb::blocked_range<size_t>& r ) const 
+  { 
+    for (size_t i = r.begin(); i != r.end(); ++i) 
+    {
+      update_sample_points[i] = simplify_and_regularize_internal::
+        compute_update_sample_point<Kernel, Tree, RandomAccessIterator>(
+        sample_points[i], 
+        original_kd_tree,
+        sample_kd_tree,
+        radius, 
+        original_densities,
+        sample_densities);
+    }
+  }
+};
+/// \endcond  
+#endif // CGAL_LINKED_WITH_TBB
+
+
+// ----------------------------------------------------------------------------
+// Public section
+// ----------------------------------------------------------------------------
+
+//=============================================================================
+/// \ingroup PkgPointSetProcessing
+/// This is an implementation of the Weighted Locally Optimal Projection (WLOP) simplification algorithm.
+/// The WLOP simplification algorithm can produce a set of 
+/// denoised, outlier-free and evenly distributed particles over the original 
+/// dense point cloud. 
+/// The core of the algorithm is a Weighted Locally Optimal Projection operator
+/// with a density uniformization term. 
+/// For more details, please refer to \cgalCite{wlop-2009}.
+///
+/// A parallel version of WLOP is provided and requires the executable to be 
+/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
+/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
+/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a> 
+/// for more details.
+///
+/// @tparam Concurrency_tag enables sequential versus parallel algorithm.
+///                         Possible values are `Sequential_tag`
+///                         and `Parallel_tag`.
+/// @tparam OutputIterator Type of the output iterator. 
+///         It must accept objects of type `Kernel::Point_3`.
+/// @tparam RandomAccessIterator Iterator over input points.
+/// @tparam PointPMap is a model of `ReadablePropertyMap` 
+///         with the value type of `ForwardIterator` as key type and `Kernel::Point_3` as value type.
+///         It can be omitted if the value type of ` RandomAccessIterator` is convertible  
+///         to `Kernel::Point_3`.
+/// @tparam Kernel Geometric traits class.
+///      It can be omitted and deduced automatically from the value type of `PointPMap`
+///      using `Kernel_traits`.
+
+// This variant requires all parameters.
+template <typename Concurrency_tag,
+          typename OutputIterator,
+          typename RandomAccessIterator,
+          typename PointPMap,
+          typename Kernel>
+OutputIterator
+wlop_simplify_and_regularize_point_set(
+  RandomAccessIterator first,  ///< random-access iterator to the first input point.
+  RandomAccessIterator beyond, ///< past-the-end iterator.
+  OutputIterator output,       ///< output iterator where output points are put.
+  PointPMap point_pmap,        ///< point property map.
+  double select_percentage,    ///< percentage of points to retain. 
+                               ///< The default value is set to 5 (\%).
+  double radius,               ///< spherical neighborhood radius.
+                               ///< This is a key parameter that needs to be finely tuned.  
+                               ///< The result will be irregular if too small, but a larger
+                               ///< value will impact the runtime.
+                               ///< In practice, choosing a radius such that the neighborhood of each sample point
+                               ///< includes at least two rings of neighboring sample points
+                               ///< gives satisfactory result.
+                               ///< The default value is set to 8 times the average spacing of the point set.
+  unsigned int iter_number,    ///< number of iterations to solve the optimsation problem. The default value is 35.
+                               ///< More iterations give a more regular result but increase the runtime.
+  bool require_uniform_sampling,///< an optional preprocessing, which will give better result
+                               ///< if the distribution of the input points is highly non-uniform. 
+                               ///< The default value is `false`. 
+  const Kernel&                ///< geometric traits.
+)
+{
+  // basic geometric types
+  typedef typename Kernel::Point_3   Point;
+  typedef typename Kernel::FT        FT;
+
+  // types for K nearest neighbors search structure
+  typedef simplify_and_regularize_internal::Kd_tree_element<Kernel> Kd_tree_element;
+  typedef simplify_and_regularize_internal::Kd_tree_traits<Kernel> Tree_traits;
+  typedef CGAL::Orthogonal_k_neighbor_search<Tree_traits> Neighbor_search;
+  typedef typename Neighbor_search::Tree Kd_Tree;
+
+  // precondition: at least one element in the container.
+  // to fix: should have at least three distinct points
+  // but this is costly to check
+  CGAL_point_set_processing_precondition(first != beyond);
+  CGAL_point_set_processing_precondition(select_percentage >= 0 
+                                         && select_percentage <= 100);
+
+  // Random shuffle
+  std::random_shuffle (first, beyond);
+
+  // Computes original(input) and sample points size 
+  std::size_t number_of_original = std::distance(first, beyond);
+  std::size_t number_of_sample = (std::size_t)(FT(number_of_original) * 
+                                 (select_percentage / FT(100.0)));
+  std::size_t first_index_to_sample = number_of_original - number_of_sample;
+
+  // The first point iter of original and sample points
+  RandomAccessIterator it;                             // point iterator
+  RandomAccessIterator first_original_iter = first;
+  RandomAccessIterator first_sample_iter = first;
+  std::advance(first_sample_iter, first_index_to_sample);
+
+  //Copy sample points
+  std::vector<Point> sample_points;
+  sample_points.reserve(number_of_sample);
+  unsigned int i;                                     
+
+  for(it = first_sample_iter; it != beyond; ++it)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+    sample_points.push_back(get(point_pmap, it));
+#else
+    sample_points.push_back(get(point_pmap, *it));
+#endif
+  }
+  
+  //compute default neighbor_radius, if no radius in
+  if (radius < 0)
+  {
+    const unsigned int nb_neighbors = 6; // 1 ring
+    FT average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
+                               first, beyond,
+                               point_pmap,
+                               nb_neighbors);
+    radius = average_spacing * 8.0;
+
+#ifdef CGAL_PSP3_VERBOSE
+    std::cout << "The estimated radius size is: " << radius << std::endl;
+    std::cout << "Be careful! Using this radius estimation may not be able to have good performance/result for different input" << std::endl;
+#endif
+  }
+
+  FT radius2 = radius * radius;
+  CGAL_point_set_processing_precondition(radius > 0);
+
+  // Initiate a KD-tree search for original points
+  std::vector<Kd_tree_element> original_treeElements;
+  for (it = first_original_iter, i=0 ; it != beyond ; ++it, ++i)
+  {
+#ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+      Point& p0 = get(point_pmap, it);
+#else
+      Point& p0 = get(point_pmap, *it);
+#endif 
+    
+    original_treeElements.push_back(Kd_tree_element(p0, i));
+  }
+  Kd_Tree original_kd_tree(original_treeElements.begin(), 
+                           original_treeElements.end());
+
+
+  std::vector<Point> update_sample_points(number_of_sample);
+  typename std::vector<Point>::iterator sample_iter;
+  
+  // Compute original density weight for original points if user needed
+  std::vector<FT> original_density_weights;
+
+  if (require_uniform_sampling)//default value is false
+  {
+    //todo: this part could also be parallelized if needed
+    for (it = first_original_iter, i = 0; it != beyond ; ++it, ++i)
+    {
+      FT density = simplify_and_regularize_internal::
+                   compute_density_weight_for_original_point<Kernel, Kd_Tree>
+                                         (
+                                         #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+                                           get(point_pmap, it),
+                                         #else
+                                           get(point_pmap, *it),
+                                         #endif  
+                                           original_kd_tree, 
+                                           radius);
+
+      original_density_weights.push_back(density);
+    }
+  }
+
+  for (unsigned int iter_n = 0; iter_n < iter_number; ++iter_n)
+  {
+    // Initiate a KD-tree search for sample points
+    std::vector<Kd_tree_element> sample_treeElements;
+    for (i=0 ; i < sample_points.size(); i++)
+    {
+      Point& p0 = sample_points[i];
+      sample_treeElements.push_back(Kd_tree_element(p0,i));
+    }
+    Kd_Tree sample_kd_tree(sample_treeElements.begin(), sample_treeElements.end());
+
+    // Compute sample density weight for sample points
+    std::vector<FT> sample_density_weights;
+
+    for (sample_iter = sample_points.begin();
+         sample_iter != sample_points.end(); ++sample_iter)
+    {
+      FT density = simplify_and_regularize_internal::
+                   compute_density_weight_for_sample_point<Kernel, Kd_Tree>
+                   (*sample_iter, 
+                    sample_kd_tree, 
+                    radius);
+
+      sample_density_weights.push_back(density);
+    }
+    
+
+    typename std::vector<Point>::iterator update_iter = update_sample_points.begin();
+#ifndef CGAL_LINKED_WITH_TBB
+  CGAL_static_assertion_msg (!(boost::is_convertible<Concurrency_tag, Parallel_tag>::value),
+			     "Parallel_tag is enabled but TBB is unavailable.");
+#else
+    //parallel
+    if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
+    {
+      tbb::blocked_range<size_t> block(0, number_of_sample);
+      Sample_point_updater<Kernel, Kd_Tree, RandomAccessIterator> sample_updater(
+                           update_sample_points,
+                           sample_points,          
+                           original_kd_tree,
+                           sample_kd_tree,
+                           radius, 
+                           original_density_weights,
+                           sample_density_weights);
+
+       tbb::parallel_for(block, sample_updater);
+    }else
+#endif
+    {
+      //sequential
+      for (sample_iter = sample_points.begin();
+        sample_iter != sample_points.end(); ++sample_iter, ++update_iter)
+      {
+        *update_iter = simplify_and_regularize_internal::
+          compute_update_sample_point<Kernel,
+                                      Kd_Tree,
+                                      RandomAccessIterator>
+                                      (*sample_iter,
+                                       original_kd_tree,
+                                       sample_kd_tree,
+                                       radius2,
+                                       original_density_weights,
+                                       sample_density_weights);
+      }
+    }
+    
+    sample_iter = sample_points.begin();
+    for (update_iter = update_sample_points.begin();
+         update_iter != update_sample_points.end();
+         ++update_iter, ++sample_iter)
+    {
+      *sample_iter = *update_iter;
+    }
+  }
+
+  // final output
+  for(sample_iter = sample_points.begin(); 
+      sample_iter != sample_points.end(); ++sample_iter)
+  {
+    *output++ = *sample_iter;
+  }
+
+  return output;
+}
+
+/// @cond SKIP_IN_MANUAL
+// This variant deduces the kernel from the iterator type.
+template <typename Concurrency_tag,
+          typename OutputIterator,     
+          typename RandomAccessIterator, 
+          typename PointPMap>
+OutputIterator 
+wlop_simplify_and_regularize_point_set(
+  RandomAccessIterator  first,  ///< iterator over the first input point
+  RandomAccessIterator  beyond, ///< past-the-end iterator
+  OutputIterator output,        ///< add back-inserter
+  PointPMap point_pmap, ///< property map RandomAccessIterator  -> Point_3
+  const double select_percentage,     ///< percentage of points to retain
+  double neighbor_radius,       ///< size of neighbors.
+  const unsigned int max_iter_number, ///< number of iterations.
+  const bool require_uniform_sampling     ///< if needed to compute density 
+                                      ///  to generate more rugularized result.                                 
+) 
+{
+  typedef typename boost::property_traits<PointPMap>::value_type  Point;
+  typedef typename Kernel_traits<Point>::Kernel                   Kernel;
+  
+  return wlop_simplify_and_regularize_point_set<Concurrency_tag>(
+      first, beyond,
+      output,
+      point_pmap,
+      select_percentage,
+      neighbor_radius,
+      max_iter_number,
+      require_uniform_sampling,
+      Kernel());
+}
+/// @endcond
+
+
+
+/// @cond SKIP_IN_MANUAL
+/// This variant creates a default point property map=Dereference_property_map.
+template <typename Concurrency_tag, 
+          typename OutputIterator,     
+          typename RandomAccessIterator >
+OutputIterator
+wlop_simplify_and_regularize_point_set(
+  RandomAccessIterator  first,  ///< iterator to the first input point.
+  RandomAccessIterator  beyond, ///< past-the-end iterator.
+  OutputIterator output,        ///< add back-inserter.
+  const double select_percentage = 5, ///< percentage of points to retain
+  double neighbor_radius = -1,  ///< size of neighbors.
+  const unsigned int max_iter_number = 35, ///< number of iterations.
+  const bool require_uniform_sampling = false ///< if needed to compute density   
+                                           ///to generate a more uniform result. 
+)
+{
+  return wlop_simplify_and_regularize_point_set<Concurrency_tag>(
+          first, beyond,
+          output,
+        #ifdef CGAL_USE_PROPERTY_MAPS_API_V1
+          make_dereference_property_map(first),
+        #else
+          make_identity_property_map(typename std::iterator_traits
+                                     <RandomAccessIterator >::
+                                     value_type()),
+        #endif
+          select_percentage, 
+          neighbor_radius, 
+          max_iter_number, 
+          require_uniform_sampling);
+}
+/// @endcond
+
+} //namespace CGAL
+
+#endif // CGAL_wlop_simplify_and_regularize_point_set_H
diff --git a/3rdparty/CGAL-4.6/include/CGAL/wmult.h b/3rdparty/CGAL-4.8/include/CGAL/wmult.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/include/CGAL/wmult.h
rename to 3rdparty/CGAL-4.8/include/CGAL/wmult.h
diff --git a/3rdparty/CGAL-4.8/scripts/cgal_create_CMakeLists b/3rdparty/CGAL-4.8/scripts/cgal_create_CMakeLists
new file mode 100755
index 0000000..a0bc802
--- /dev/null
+++ b/3rdparty/CGAL-4.8/scripts/cgal_create_CMakeLists
@@ -0,0 +1,639 @@
+#!/bin/bash
+
+# Copyright (c) 1999,2000,2002-2007,2009,2011,2012
+# Utrecht University (The Netherlands),
+# ETH Zurich (Switzerland),
+# INRIA Sophia-Antipolis (France),
+# Max-Planck-Institute for Informatics Saarbruecken (Germany), 
+# and Tel-Aviv University (Israel).  All rights reserved.
+#
+# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# Licensees holding a valid commercial license may use this file in
+# accordance with the commercial license agreement provided with the software.
+#
+# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Scripts/scripts/cgal_create_makefile $
+# $Id: cgal_create_makefile 36976 2007-03-09 22:53:24Z reichel $
+#
+# Author(s)     : various
+
+# This script creates a CGAL cmake script with entries for files with a common
+# C++ file extension (as mentioned in the g++ man page) in the current directory.
+# Some options can be given or specified in a file.
+
+
+#LEDA
+#GMP
+#GMPXX
+#MPFR
+#MPFI
+#RS
+#BLAS
+#LAPACK
+#OPENNL
+#QGLViewer (or implied by Qt4?)
+#ESBTL
+#NTL
+
+#Core (implies GMP+GMPXX)
+#Qt4 (implies QT4)
+#ImageIO
+
+#not (yet) supported
+#F2C (comes with BLAS/LAPACK - something like that)
+#IPE (ask Laurent)
+#MKL (ask Andreas)
+
+create_cmake_script_with_options()
+{
+  qt4='n'
+
+  # parse options file
+  if [ -e "$OPTIONS_FILE" ]; then
+
+    OLDIFS="$IFS"
+    IFS=$'\n'
+    for LINE in `cat $OPTIONS_FILE`; do 
+
+      # CGAL components
+      if [ -z "$CGAL_COMPONENTS_GIVEN" ]; then # read file only if not given!
+        next_cgal_component=`echo $LINE | grep -v "#" | grep CGAL_COMPONENT`
+        if [ ! -z "$next_cgal_component" ]; then
+          next_cgal_component=${next_cgal_component/CGAL_COMPONENT /}
+          if [ -z "$CGAL_COMPONENTS" ]; then 
+            CGAL_COMPONENTS=$next_cgal_component
+          else
+            CGAL_COMPONENTS=$CGAL_COMPONENTS":"$next_cgal_component
+          fi
+        fi
+      fi
+
+      # Boost components
+      if [ -z "$BOOST_COMPONENTS_GIVEN" ]; then # read file only if not given!
+        next_boost_component=`echo $LINE | grep -v "#" | grep BOOST_COMPONENT`
+        if [ ! -z "$next_boost_component" ]; then
+          next_boost_component=${next_boost_component/BOOST_COMPONENT /}
+          if [ -z "$BOOST_COMPONENTS" ]; then 
+            BOOST_COMPONENTS=$next_boost_component
+          else
+            BOOST_COMPONENTS=$BOOST_COMPONENTS":"$next_boost_component
+          fi
+        fi
+      fi
+
+    done
+    IFS="$OLDIFS"
+  fi
+
+
+  # print makefile header
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+# Created by the script cgal_create_CMakeLists
+# This is the CMake script for compiling a set of CGAL applications.
+
+EOF
+  #---------------------------------------------------------------------------
+  if [ "$SINGLE_SOURCE" = "n" ]; then
+    echo "project( ${PROJECT} )"
+  else 
+    echo "project( ${SOURCE} )"
+  fi
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+
+cmake_minimum_required(VERSION 2.8.11)
+
+# CGAL and its components
+EOF
+if [ -n "$ENABLE_CTEST" ]; then
+  echo "enable_testing()"
+fi
+  #---------------------------------------------------------------------------
+  # echo "CGAL_COMPONENTS: $CGAL_COMPONENTS"
+  # echo "CGAL_PRECONFIGURED_LIBS: $CGAL_PRECONFIGURED_LIBS"
+  if [ ! -z "$CGAL_COMPONENTS" ]; then
+    # ensure capitalization
+
+    # CGAL: Core, Qt4, PDB, ImageIO
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO}
+  
+    # external libs
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P]/GMP}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P][x|X][x|X]/GMPXX}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[m|M][p|P][f|F][r|R]/MPFR}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[l|L][e|E][d|D][a|A]/LEDA}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[m|M][p|P][f|F][i|I]/MPFI}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[r|R][s|S]/RS}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[o|O][p|P][e|E][n|N][n|N][l|L]/OpenNL}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[b|B][l|L][a|A][s|S]/BLAS}
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[l|L][a|A][p|P][a|A][c|C][k|K]/LAPACK}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][g|G][l|L][v|V][i|I][e|E][w|W][e|E][r|R]/QGLViewer}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[z|Z][l|L][i|I][b|B]/zlib}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[e|E][s|S][b|B][t|T][l|L]/ESBTL}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[n|N][t|T][l|L]/NTL}
+
+    CGAL_COMPONENTS=${CGAL_COMPONENTS//[o|O][p|P][e|E][n|N][g|G][l|L]/OpenGL}
+
+
+#F2C?
+#IPE?
+#MKL?
+
+    OLDIFS="$IFS"
+    IFS=':'
+    for cgal_component in $CGAL_COMPONENTS; do
+      COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
+
+      # for qtmoc
+      if [ "$COMPONENT" = "qt4" ]; then
+        qt4='y'
+      fi
+
+    done
+    IFS=$OLDIFS
+
+  fi
+
+  if [ "$CGAL_PRECONFIGURED_LIBS" = "y" ]; then
+    CGAL_COMPONENTS=${CGAL_COMPONENTS}" ALL_PRECONFIGURED_LIBS"
+  fi
+
+  echo "find_package( CGAL QUIET COMPONENTS ${CGAL_COMPONENTS//:/ } )"
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+if ( NOT CGAL_FOUND )
+
+  message(STATUS "This project requires the CGAL library, and will not be compiled.")
+  return()  
+
+endif()
+
+# include helper file
+include( ${CGAL_USE_FILE} )
+
+EOF
+  #---------------------------------------------------------------------------
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+# Boost and its components
+EOF
+  #---------------------------------------------------------------------------
+
+  if [ ! -z "$BOOST_COMPONENTS" ]; then
+
+    echo "find_package( Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS//:/ } )"
+
+  else
+
+    echo "find_package( Boost REQUIRED )"
+
+  fi # additional Boost components
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+if ( NOT Boost_FOUND )
+
+  message(STATUS "This project requires the Boost library, and will not be compiled.")
+
+  return()  
+
+endif()
+EOF
+  #---------------------------------------------------------------------------
+
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+# include for local directory
+EOF
+  #---------------------------------------------------------------------------
+
+  if [ -d include ] ; then
+    echo 'include_directories( BEFORE include )'
+  fi		
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+
+# include for local package
+EOF
+  #---------------------------------------------------------------------------
+
+  # includes for local package
+  if [ -d ../../include ] ; then
+    echo 'include_directories( BEFORE ../../include )'
+  fi
+  if [ -d ../include ] ; then
+    echo 'include_directories( BEFORE ../include )'
+  fi
+
+  if [ ! -z "$PACKAGES" ]; then
+    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    cat << 'EOF'
+
+# include of additional packages
+EOF
+    #-------------------------------------------------------------------------
+  fi
+
+  # Qt4
+  if [ "$qt4" = "y" ]; then
+
+    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    cat << 'EOF'
+
+# Qt4
+set( QT_USE_QTXML     true )
+set( QT_USE_QTMAIN    true )
+set( QT_USE_QTSCRIPT  true )
+set( QT_USE_QTOPENGL  true )
+
+find_package(Qt4)  
+
+if ( NOT QT_FOUND )
+
+  message(STATUS "This project requires the Qt4 library, and will not be compiled.")
+  return()  
+
+endif()
+EOF
+    #-------------------------------------------------------------------------
+
+  fi #qt4
+
+  if [ ! -z "$BOOST_COMPONENTS" ]; then
+    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    cat << 'EOF'
+
+# Boost linking
+EOF
+    #-------------------------------------------------------------------------
+
+    OLDIFS="$IFS"
+    IFS=':'
+    for boost_component in $BOOST_COMPONENTS; do
+      BOOST_COMPONENT=`echo $boost_component | tr '[:lower:]' '[:upper:]'`
+      echo "add_definitions( \"-DCGAL_USE_BOOST_${BOOST_COMPONENT}\" )"
+      echo "list(APPEND CGAL_3RD_PARTY_LIBRARIES \${Boost_${BOOST_COMPONENT}_LIBRARY} )"
+    done
+    IFS=$OLDIFS
+
+  fi # additional Boost components
+
+
+  # All Files or Single Source
+
+  if [ "$SINGLE_SOURCE" = "n" ]; then #=======================================
+
+    ###############
+    # ALL SOURCES #
+    ###############
+
+    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    cat << 'EOF'
+
+
+# Creating entries for all C++ files with "main" routine
+# ##########################################################
+
+EOF
+    #-------------------------------------------------------------------------
+
+
+    if [ "$qt4" = "y" ]; then
+
+      echo "include( CGAL_CreateSingleSourceCGALProgramQt4 )"
+
+    else
+ 
+      echo "include( CGAL_CreateSingleSourceCGALProgram )"
+
+    fi
+    # add a new line
+    echo
+
+    # Qt4
+    if [ "$qt4" = "y" ]; then
+      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+      cat << 'EOF'
+
+if ( CGAL_Qt4_FOUND AND QT_FOUND )
+
+  include( ${QT_USE_FILE} )
+  include_directories( ${QT_INCLUDE_DIR} )  
+
+endif()
+
+EOF
+      #-----------------------------------------------------------------------
+    fi # qt4
+
+    for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
+      # Create an executable for each cpp that  contains a function "main()"
+      BASE=`basename $file .cc`
+      BASE=`basename $BASE .cp`
+      BASE=`basename $BASE .cxx`
+      BASE=`basename $BASE .cpp`
+      BASE=`basename $BASE .CPP`
+      BASE=`basename $BASE .c++`
+      BASE=`basename $BASE .C`
+      egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
+      if [ $? -eq 0 ]; then
+        if [ "$qt4" = "y" ]; then
+          echo "create_single_source_cgal_program_qt4( \"$file\" )"
+        else
+          echo "create_single_source_cgal_program( \"$file\" )"
+        fi
+        if [ -n "$ENABLE_CTEST" ]; then 
+          if [ -f "$BASE.cin" ] ; then
+            CIN=" < $BASE.cin"
+          else
+            CIN=
+          fi
+          cat <<EOF
+add_test( "$BASE" \${CMAKE_CTEST_COMMAND}
+  --build-and-test "\${CMAKE_CURRENT_SOURCE_DIR}"
+                   "\${CMAKE_CURRENT_BINARY_DIR}"
+  --build-generator "\${CMAKE_GENERATOR}"
+  --build-makeprogram "\${CMAKE_MAKE_PROGRAM}"
+  --build-target $BASE
+  --build-no-clean
+  --build-run-dir "\${CMAKE_CURRENT_SOURCE_DIR}"
+  --test-command sh -c "\${CMAKE_CURRENT_BINARY_DIR}/$BASE$CIN" )
+EOF
+        fi
+      fi
+      #add a new line
+      echo 
+    done
+    
+  else #======================================================================
+
+    #################
+    # SINGLE_SOURCE #
+    #################
+
+    target_name=$SOURCE
+
+    echo
+    echo
+    echo "# Creating entries for target: $target_name"
+    #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    cat << 'EOF'
+# ############################
+EOF
+    #-------------------------------------------------------------------------
+
+    for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
+      all="$all $file"
+    done
+
+    # Qt4
+    if [ "$qt4" = "y" ]; then
+      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+      cat << 'EOF'
+
+if ( CGAL_Qt4_FOUND AND QT_FOUND )
+
+  include( ${QT_USE_FILE} )
+  include_directories( ${QT_INCLUDE_DIR} )  
+
+EOF
+      #-----------------------------------------------------------------------
+
+      echo "  # UI files (Qt Designer files)"
+      for file in `ls *.ui 2> /dev/null | sort`; do
+        echo "  qt4_wrap_ui( DT_UI_FILES $file )"
+      done
+      echo
+      echo "  # qrc files (resources files, that contain icons, at least)"
+      for file in `ls *.qrc 2> /dev/null | sort`; do
+        echo "  qt4_add_resources ( DT_RESOURCE_FILES ./$file )"
+      done
+      echo
+      MOC_FILES=""
+      echo "  # use the Qt MOC preprocessor on classes that derives from QObject"
+      for file in `ls include/*.h 2> /dev/null | sort`; do
+        BASE=`basename $file .h`
+        egrep 'Q_OBJECT' $file >/dev/null 2>&1
+        if [ $? -eq 0 ]; then
+          echo "  qt4_generate_moc( include/${BASE}.h ${BASE}.moc )"
+          MOC_FILES="${BASE}.moc $MOC_FILES"
+        fi
+      done
+      for file in `ls *.h 2> /dev/null | sort`; do
+        BASE=`basename $file .h`
+        egrep 'Q_OBJECT' $file >/dev/null 2>&1
+        if [ $? -eq 0 ]; then
+          echo "  qt4_generate_moc( ${BASE}.h ${BASE}.moc )"
+          MOC_FILES="${BASE}.moc $MOC_FILES"
+        fi
+      done
+      for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
+        BASE=`basename $file .cc`
+        BASE=`basename $BASE .cp`
+        BASE=`basename $BASE .cxx`
+        BASE=`basename $BASE .cpp`
+        BASE=`basename $BASE .CPP`
+        BASE=`basename $BASE .c++`
+        BASE=`basename $BASE .C`
+        egrep 'Q_OBJECT' $file >/dev/null 2>&1
+        if [ $? -eq 0 ]; then
+          echo "  qt4_generate_moc( ${BASE}.cpp ${BASE}.moc )"
+          MOC_FILES="${BASE}.moc $MOC_FILES"
+        fi
+      done
+
+      #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+      cat << 'EOF'
+
+endif()
+EOF
+      #-----------------------------------------------------------------------
+
+      all="${all} ${MOC_FILES} \${DT_UI_FILES} \${DT_RESOURCE_FILES}"
+
+    fi # qt4
+
+    # no 'cat' here, as variable substitution required
+    echo
+    echo "add_executable( ${target_name} ${all} )"
+    echo
+    echo "add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )"
+    echo
+    echo "# Link the executable to CGAL and third-party libraries"
+    LIBS=""
+    if [ "$qt4" = "y" ]; then
+      LIBS="\${QT_LIBRARIES}" 
+    fi
+    LIBS=$LIBS" \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES}"
+    echo "target_link_libraries(${target_name}  $LIBS )"
+
+  fi # single source or all files #===========================================
+
+  #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+  cat << 'EOF'
+EOF
+  #---------------------------------------------------------------------------
+
+echo
+
+}
+
+usage()
+{
+  echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2
+  echo >&2
+  echo "  -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2
+  echo "  cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt4' ('benchmark', 'symbolic')." >&2
+  echo "  boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2
+  echo "  -p use all of CGAL's preconfigured libraries" >&2
+  echo "  -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
+  echo "  -v the version" >&2
+  echo "  -h this info screen" >&2
+  echo  >&2
+}
+
+
+SINGLE_SOURCE='n'
+SOURCE=""
+
+CGAL_COMPONENTS_GIVEN=""
+CGAL_COMPONENTS=""
+
+CGAL_PRECONFIGURED_LIBS='n'
+
+BOOST_COMPONENTS_GIVEN=""
+BOOST_COMPONENTS=""
+
+OPTIONS_FILE=`pwd`"/cgal_cmake_options"
+
+if [ ! -e "$OPTIONS_FILE" ]; then
+  OPTIONS_FILE="${HOME}/.cgal_cmake_options_rc"
+fi
+
+# parse command line arguments
+while getopts s:c:b:o:phvt OPT; do
+  case "$OPT" in
+    s)  SINGLE_SOURCE='y'
+        SOURCE=$OPTARG
+        if [ "${SOURCE:(-3)}" = ".cc" ]; then
+           echo "Error: Source must not end with '.cc'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-3)}" = ".cp" ]; then
+           echo "Error: Source must not end with '.cp'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-4)}" = ".cxx" ]; then
+           echo "Error: Source must not end with '.cxx'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-4)}" = ".cpp" ]; then
+           echo "Error: Source must not end with '.cpp'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-4)}" = ".CPP" ]; then
+           echo "Error: Source must not end with '.CPP'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-4)}" = ".c++" ]; then
+           echo "Error: Source must not end with '.c++'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+        if [ "${SOURCE:(-2)}" = ".C" ]; then
+           echo "Error: Source must not end with '.C'!" >&2
+           echo
+           usage
+           exit 2
+        fi
+
+        ;;
+
+    c)  CGAL_COMPONENTS_GIVEN='y'
+        CGAL_COMPONENTS=$OPTARG
+        ;;
+    b)  BOOST_COMPONENTS_GIVEN='y'
+        BOOST_COMPONENTS=$OPTARG
+        ;;
+
+    o)  OPTIONS_FILE=$OPTARG
+        if [ ! -e "$OPTIONS_FILE" ]; then
+          echo "Options-file '$OPTIONS_FILE' does not exist." >&2
+          exit 1
+        fi
+        ;;
+    p)  CGAL_PRECONFIGURED_LIBS='y'
+        ;;
+    t)  ENABLE_CTEST='y'
+        ;;
+    h)  usage
+        exit 0
+        ;;
+    v)  echo "`basename $0` version 0.1"
+        exit 0
+        ;;
+    \?) # getopts issues an error message
+        usage
+        exit 1
+        ;;
+  esac
+done
+
+shift `expr $OPTIND - 1`
+
+#echo "FILE: $OPTIONS_FILE"
+#echo "BOOST_COMPONENTS: $BOOST_COMPONENTS"
+echo "CGAL_COMPONENTS: $CGAL_COMPONENTS"
+#echo "SINGLE_SOURCE: $SINGLE_SOURCE"
+#echo "SOURCE: $SOURCE"
+
+OUTPUTFILE=CMakeLists.txt
+PROJECT=`basename $PWD`
+
+if [ -f ${OUTPUTFILE} ] ; then
+  echo "moving $OUTPUTFILE to ${OUTPUTFILE}.bak ..."
+  echo
+  mv -f $OUTPUTFILE ${OUTPUTFILE}.bak
+fi
+
+create_cmake_script_with_options | tee $OUTPUTFILE
+
+echo
+echo "created $OUTPUTFILE in $PWD ..."
diff --git a/3rdparty/CGAL-4.6/scripts/cgal_create_assertions.sh b/3rdparty/CGAL-4.8/scripts/cgal_create_assertions.sh
similarity index 100%
rename from 3rdparty/CGAL-4.6/scripts/cgal_create_assertions.sh
rename to 3rdparty/CGAL-4.8/scripts/cgal_create_assertions.sh
diff --git a/3rdparty/CGAL-4.8/scripts/cgal_create_cmake_script b/3rdparty/CGAL-4.8/scripts/cgal_create_cmake_script
new file mode 100755
index 0000000..b39812f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/scripts/cgal_create_cmake_script
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# Copyright (c) 1999,2000,2002-2007
+# Utrecht University (The Netherlands),
+# ETH Zurich (Switzerland),
+# INRIA Sophia-Antipolis (France),
+# Max-Planck-Institute Saarbruecken (Germany),
+# and Tel-Aviv University (Israel).  All rights reserved.
+#
+# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; version 3 of the License,
+# or (at your option) any later version.
+#
+# Licensees holding a valid commercial license may use this file in
+# accordance with the commercial license agreement provided with the software.
+#
+# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Scripts/scripts/cgal_create_makefile $
+# $Id: cgal_create_makefile 36976 2007-03-09 22:53:24Z reichel $
+#
+# Author(s)     : various
+
+# This script creates a CGAL cmake script with entries for files with a common
+# C++ file extension (as mentioned in the g++ man page) in the current directory.
+#
+# Usage: cgal_create_cmake_script TYPE
+#
+#  echo "  TYPE can be any of "demo", "example" or "test".. any other value is ignored"
+
+#VERSION=2.0
+
+create_cmake_script()
+{
+  # print makefile header
+  cat <<EOF
+# Created by the script cgal_create_cmake_script
+# This is the CMake script for compiling a CGAL application.
+
+
+project( ${PROJECT}_${TYPE} )
+EOF
+  cat <<'EOF'
+
+cmake_minimum_required(VERSION 2.8.10)
+
+EOF
+  
+    cat <<'EOF'
+find_package(CGAL QUIET COMPONENTS Core )
+
+if ( CGAL_FOUND )
+
+  include( ${CGAL_USE_FILE} )
+
+  include( CGAL_CreateSingleSourceCGALProgram )
+
+EOF
+    if [ -d "${SOURCE_DIR}../../include" ] ; then
+      echo "  include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
+      echo
+    fi
+    if [ -d "${SOURCE_DIR}../include" ] ; then
+      echo "  include_directories (BEFORE \"${SOURCE_DIR}../include\")"
+      echo
+    fi
+    if [ -d "${SOURCE_DIR}include" ] ; then
+      echo "    include_directories (BEFORE \"${SOURCE_DIR}include\")"
+      echo
+    fi
+    
+    for file in `ls "$SOURCE_DIR"*.cc "$SOURCE_DIR"*.cp "$SOURCE_DIR"*.cxx "$SOURCE_DIR"*.cpp "$SOURCE_DIR"*.CPP "$SOURCE_DIR"*.c++ "$SOURCE_DIR"*.C 2>/dev/null | sort` ; do
+      # Create an executable for each cpp that  contains a function "main()"
+      BASE=`basename $file .cc`
+      BASE=`basename $BASE .cp`
+      BASE=`basename $BASE .cxx`
+      BASE=`basename $BASE .cpp`
+      BASE=`basename $BASE .CPP`
+      BASE=`basename $BASE .c++`
+      BASE=`basename $BASE .C`
+      egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
+      if [ $? -eq 0 ]; then
+        echo "  create_single_source_cgal_program( \"$file\" )"
+        echo "Adding a target ${BASE}..." >&3
+      fi
+    done
+    
+    cat <<'EOF'
+
+else()
+  
+    message(STATUS "This program requires the CGAL library, and will not be compiled.")
+  
+endif()
+EOF
+  
+  echo
+
+}
+
+
+usage()
+{
+  echo "Usage: cgal_create_cmake_script [--source_dir <source directory>]"
+  echo
+  echo "  Create a CMakeLists.txt file in the current working directory."
+  echo
+  echo "  TYPE must be any of example or test. The default is example."
+  echo
+  echo "  If the option --source_dir is specified with a directory, the "
+  echo "  CMakeLists.txt uses source files from that directory, otherwise "
+  echo "  the source directory is supposed to be the current directory."
+}
+
+SOURCE_DIR=
+
+while [ $1 ]; do
+    case "$1" in
+        -h|-help|--h|--help)
+            usage; exit
+        ;;
+        example) 
+            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
+        ;;
+        demo) 
+            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
+        ;;
+        test) 
+            if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
+        ;;
+        --source_dir)
+            if [ -d "$2" ]; then 
+                SOURCE_DIR=$2; 
+                shift;
+                shift;
+            else
+                if [ -z "$2" ]; then
+                    echo "Error: you must specify a directory after the --source_dir option!"
+                    echo
+                else
+                    echo "Error: \"$2\" is not a directory!"
+                    echo
+                fi
+                usage; exit 1; 
+            fi
+        ;;
+        *) 
+            echo "Unknown option: $1"
+            usage; exit 1
+        ;;
+    esac
+done
+
+OUTPUTFILE=CMakeLists.txt
+if [ -n "$SOURCE_DIR" ]; then
+    PROJECT=`basename $SOURCE_DIR`
+    SOURCE_DIR=$SOURCE_DIR/
+else
+    PROJECT=`basename $PWD`
+fi
+
+if [ -f ${OUTPUTFILE} ] ; then
+  echo "moving $OUTPUTFILE to ${OUTPUTFILE}.bak ..."
+  mv -f $OUTPUTFILE ${OUTPUTFILE}.bak
+fi
+create_cmake_script 3>&1 > $OUTPUTFILE
+echo "created $OUTPUTFILE in $PWD ..."
diff --git a/3rdparty/CGAL-4.6/scripts/cgal_make_macosx_app b/3rdparty/CGAL-4.8/scripts/cgal_make_macosx_app
similarity index 100%
rename from 3rdparty/CGAL-4.6/scripts/cgal_make_macosx_app
rename to 3rdparty/CGAL-4.8/scripts/cgal_make_macosx_app
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Bbox_2_intersections.cpp b/3rdparty/CGAL-4.8/src/CGAL/Bbox_2_intersections.cpp
new file mode 100644
index 0000000..c8cc5e0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Bbox_2_intersections.cpp
@@ -0,0 +1,33 @@
+// Copyright (c) 2000  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Bbox_2_Line_2_intersection.h>
+#include <CGAL/Bbox_2_Line_2_intersection_impl.h>
+
+#include <CGAL/Ray_2_Bbox_2_intersection.h>
+#include <CGAL/Ray_2_Bbox_2_intersection_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.6/src/CGAL/CMakeLists.txt b/3rdparty/CGAL-4.8/src/CGAL/CMakeLists.txt
similarity index 100%
rename from 3rdparty/CGAL-4.6/src/CGAL/CMakeLists.txt
rename to 3rdparty/CGAL-4.8/src/CGAL/CMakeLists.txt
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Color.cpp b/3rdparty/CGAL-4.8/src/CGAL/Color.cpp
new file mode 100644
index 0000000..3d4e3bf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Color.cpp
@@ -0,0 +1,30 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Hervé Brönnimann
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/Color.h>
+#include <CGAL/IO/Color_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_header_OFF.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_header_OFF.cpp
new file mode 100644
index 0000000..c70a2c3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_header_OFF.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_header_OFF.h>
+#include <CGAL/IO/File_header_OFF_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_header_extended_OFF.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_header_extended_OFF.cpp
new file mode 100644
index 0000000..735fe40
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_header_extended_OFF.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_header_extended_OFF.h>
+#include <CGAL/IO/File_header_extended_OFF_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_scanner_OFF.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_scanner_OFF.cpp
new file mode 100644
index 0000000..b7e1ed0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_scanner_OFF.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_scanner_OFF.h>
+#include <CGAL/IO/File_scanner_OFF_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_writer_OFF.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_writer_OFF.cpp
new file mode 100644
index 0000000..6162f9a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_writer_OFF.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_writer_OFF.h>
+#include <CGAL/IO/File_writer_OFF_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_writer_VRML_2.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_writer_VRML_2.cpp
new file mode 100644
index 0000000..a595f0f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_writer_VRML_2.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_writer_VRML_2.h>
+#include <CGAL/IO/File_writer_VRML_2_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_writer_inventor.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_writer_inventor.cpp
new file mode 100644
index 0000000..7c66969
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_writer_inventor.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_writer_inventor.h>
+#include <CGAL/IO/File_writer_inventor_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/File_writer_wavefront.cpp b/3rdparty/CGAL-4.8/src/CGAL/File_writer_wavefront.cpp
new file mode 100644
index 0000000..d7c4ec4
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/File_writer_wavefront.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at mpi-sb.mpg.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/File_writer_wavefront.h>
+#include <CGAL/IO/File_writer_wavefront_impl.h>
+
+#endif // CGAL_HEADER_ONLY
+
+// EOF //
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Geomview_stream.cpp b/3rdparty/CGAL-4.8/src/CGAL/Geomview_stream.cpp
new file mode 100644
index 0000000..927d518
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Geomview_stream.cpp
@@ -0,0 +1,30 @@
+// Copyright (c) 1999-2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     : Andreas Fabri, Herve Bronnimann, Sylvain Pion
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/Geomview_stream.h>
+#include <CGAL/IO/Geomview_stream_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Interval_arithmetic.cpp b/3rdparty/CGAL-4.8/src/CGAL/Interval_arithmetic.cpp
new file mode 100644
index 0000000..943b2f9
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Interval_arithmetic.cpp
@@ -0,0 +1,31 @@
+// Copyright (c) 1999-2004  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sylvain Pion
+ 
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/basic.h>
+#include <CGAL/FPU.h>
+#include <CGAL/Interval_arithmetic_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/JAMA_numeric_solver.cpp b/3rdparty/CGAL-4.8/src/CGAL/JAMA_numeric_solver.cpp
new file mode 100644
index 0000000..5f8864b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/JAMA_numeric_solver.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+#include <CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/KDS_Log.cpp b/3rdparty/CGAL-4.8/src/CGAL/KDS_Log.cpp
new file mode 100644
index 0000000..96ebc43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/KDS_Log.cpp
@@ -0,0 +1,34 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Kinetic/internal/debug_counters.h>
+#include <CGAL/Kinetic/internal/debug_counters_impl.h>
+#include <CGAL/Tools/Log.h>
+#include <CGAL/Tools/Log_impl.h>
+
+namespace CGAL { namespace Kinetic { namespace internal {
+  unsigned int function_degeneracies__=0;
+  unsigned int zero_certificates__=0;
+  unsigned int io_errors__=0;
+  unsigned int audit_failures__=0;
+} } } //namespace CGAL::Kinetic::internal
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/NefPolynomial.cpp b/3rdparty/CGAL-4.8/src/CGAL/NefPolynomial.cpp
new file mode 100644
index 0000000..aa717ca
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/NefPolynomial.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Michael Seel
+//                 Andreas Fabri
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Nef_2/Polynomial.h>
+#include <CGAL/Nef_2/Polynomial_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Random.cpp b/3rdparty/CGAL-4.8/src/CGAL/Random.cpp
new file mode 100644
index 0000000..471accc
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Random.cpp
@@ -0,0 +1,36 @@
+// Copyright (c) 1997-2001  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Sven Schönherr <sven at inf.ethz.ch>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Random.h>
+#include <CGAL/Random_impl.h>
+
+namespace CGAL {
+
+Random  default_random;
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Real_timer.cpp b/3rdparty/CGAL-4.8/src/CGAL/Real_timer.cpp
new file mode 100644
index 0000000..2a13b9b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Real_timer.cpp
@@ -0,0 +1,37 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Real_timer.h>
+#include <CGAL/Real_timer_impl.h>
+
+namespace CGAL {
+
+bool Real_timer::m_failed = false;
+
+} //namespace CGAL
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Residue_type.cpp b/3rdparty/CGAL-4.8/src/CGAL/Residue_type.cpp
new file mode 100644
index 0000000..bb9fc34
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Residue_type.cpp
@@ -0,0 +1,32 @@
+// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michael Hemmer
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Residue.h>
+#include <CGAL/Modular_arithmetic/Residue_type.h>
+
+namespace CGAL{
+
+
+const double Residue::CST_CUT = std::ldexp( 3., 51 );
+
+}
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Timer.cpp b/3rdparty/CGAL-4.8/src/CGAL/Timer.cpp
new file mode 100644
index 0000000..3e45e00
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Timer.cpp
@@ -0,0 +1,37 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Lutz Kettner  <kettner at inf.ethz.ch>  
+//                 Matthias Baesken <baesken at informatik.uni-halle.de>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Timer.h>
+#include <CGAL/Timer_impl.h>
+
+namespace CGAL {
+
+bool Timer::m_failed = false;
+
+} //namespace CGAL
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/Turkowski_numeric_solver.cpp b/3rdparty/CGAL-4.8/src/CGAL/Turkowski_numeric_solver.cpp
new file mode 100644
index 0000000..7842087
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/Turkowski_numeric_solver.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Polynomial/internal/numeric_solvers.h>
+#include <CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/assertions.cpp b/3rdparty/CGAL-4.8/src/CGAL/assertions.cpp
new file mode 100644
index 0000000..9df3b1a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/assertions.cpp
@@ -0,0 +1,30 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Geert-Jan Giezeman and Sven Schönherr
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/assertions.h>
+#include <CGAL/assertions_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/io.cpp b/3rdparty/CGAL-4.8/src/CGAL/io.cpp
new file mode 100644
index 0000000..6514769
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/io.cpp
@@ -0,0 +1,36 @@
+// Copyright (c) 1997  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/IO/io.h>
+#include <CGAL/IO/io_impl.h>
+
+namespace CGAL {
+
+int IO::mode = std::ios::xalloc();
+
+} //namespace CGAL
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/kernel.cpp b/3rdparty/CGAL-4.8/src/CGAL/kernel.cpp
new file mode 100644
index 0000000..d566047
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/kernel.cpp
@@ -0,0 +1,31 @@
+// Copyright (c) 1999  
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved. 
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri, Stefan Schirra
+ 
+#ifndef CGAL_HEADER_ONLY
+#include <CGAL/Origin.h>
+#include <CGAL/Origin_impl.h>
+#include <CGAL/aff_transformation_tags.h>
+#include <CGAL/aff_transformation_tags_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL/numeric_solvers_support.cpp b/3rdparty/CGAL-4.8/src/CGAL/numeric_solvers_support.cpp
new file mode 100644
index 0000000..2e433b0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/numeric_solvers_support.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005  Stanford University (USA).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Daniel Russel <drussel at alumni.princeton.edu>
+
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
+#include <CGAL/Polynomial/internal/numeric_solvers_support_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/primes.cpp b/3rdparty/CGAL-4.8/src/CGAL/primes.cpp
new file mode 100644
index 0000000..63b8b4d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/primes.cpp
@@ -0,0 +1,25 @@
+// Copyright (c) Max-Planck-Institute Saarbruecken (Germany).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Michael Hemmer
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/primes.h>
+#include <CGAL/primes_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL/test_FPU_rounding_mode.cpp b/3rdparty/CGAL-4.8/src/CGAL/test_FPU_rounding_mode.cpp
new file mode 100644
index 0000000..9821a5c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL/test_FPU_rounding_mode.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2008  GeometryFactory (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/FPU.h>
+#include <CGAL/test_FPU_rounding_mode_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/BigFloat.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/BigFloat.cpp
new file mode 100644
index 0000000..9d92e7c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/BigFloat.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: BigFloat.cpp
+ * Synopsis:
+ *       BigFloat numbers with error bounds 
+ *
+ *       EXACTNESS PROPERTY:
+ *       ==================
+ *       For BigFloats that are exact (i.e., error=0),
+ *       addition/subtraction and multiplication return the
+ *       exact result (i.e., error=0).  We also introduce the operation
+ *       div2(), which simply divides a BigFloat by 2,
+ *       but this again preserves exactness.  Such exactness
+ *       properties are used in our Newton iteration/Sturm Sequences.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/BigFloat.h>
+#include <CGAL/CORE/BigFloat_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/CMakeLists.txt b/3rdparty/CGAL-4.8/src/CGAL_Core/CMakeLists.txt
new file mode 100644
index 0000000..08b450f
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/CMakeLists.txt
@@ -0,0 +1,20 @@
+message("Configuring libCGAL_Core")
+ 
+use_essential_libs()
+
+include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS})
+
+add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
+
+link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
+
+collect_cgal_library(CGAL_Core "")
+ 
+# CGAL_Core does not depend on CGAL in either DEBUG or RELEASE, but we
+# still link it.
+target_link_libraries( CGAL_Core CGAL ${CGAL_3RD_PARTY_LIBRARIES} )
+
+add_dependencies( CGAL_Core CGAL )
+
+message("libCGAL_Core is configured")
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/CoreAux.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreAux.cpp
new file mode 100644
index 0000000..a8f7d24
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreAux.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreAux.cpp
+ * Synopsis:
+ *       Auxiliary routines such as ceiling of log_2, etc. 
+ *       they are not specific to any Core classes.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/CoreAux.h>
+#include <CGAL/CORE/CoreAux_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/CoreDefs.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreDefs.cpp
new file mode 100644
index 0000000..82d2226
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreDefs.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreDefs.cpp
+ * Synopsis:
+ *	 Useful parameters for Core Library which users may change
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/CoreDefs.h>
+#include <CGAL/CORE/CoreDefs_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/CoreIO.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreIO.cpp
new file mode 100644
index 0000000..b63e8ae
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/CoreIO.cpp
@@ -0,0 +1,34 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: CoreIO.cpp
+ *
+ * Written by 
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+#include <CGAL/CORE/CoreIO_impl.h>
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/Expr.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/Expr.cpp
new file mode 100644
index 0000000..0bb4315
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/Expr.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Expr.cpp
+ *
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Igor Pechtchanski <pechtcha at cs.nyu.edu>
+ *       Vijay Karamcheti <vijayk at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/Expr.h>
+#include <CGAL/CORE/Expr_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/GmpIO.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/GmpIO.cpp
new file mode 100644
index 0000000..a3ef716
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/GmpIO.cpp
@@ -0,0 +1,29 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * file: GmpIO.cpp
+ * 		Adapted from multi-files under /cxx in GMP's source distribution
+ *
+ * Zilin Du, 2003
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/Gmp.h>
+#include <CGAL/CORE/Gmp_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/Real.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/Real.cpp
new file mode 100644
index 0000000..21b6f19
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/Real.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: Real.cpp
+ * Synopsis: The Real class is a superclass for all the number 
+ *           systems in the Core Library (int, long, float, double,
+ *           BigInt, BigRat, BigFloat, etc)
+ *           
+ * Written by 
+ *       Koji Ouchi <ouchi at simulation.nyu.edu>
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/Real.h>
+#include <CGAL/CORE/Real_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Core/extLong.cpp b/3rdparty/CGAL-4.8/src/CGAL_Core/extLong.cpp
new file mode 100644
index 0000000..e3746d8
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Core/extLong.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+ * Core Library Version 1.7, August 2004
+ * Copyright (c) 1995-2004 Exact Computation Project
+ * All rights reserved.
+ *
+ * This file is part of CGAL (www.cgal.org).
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ * File: extLong.cpp
+ * Synopsis:
+ *      The class extLong is basically a wrapper around the machine
+ *      type long.  It is an important class to provide several
+ *      additional facilities to detect overflows and undefined values.
+ *      Future development includes extensions to level arithmetic
+ *      (i.e., if a number overflows level i, we will go to level i+1).
+ *      Level i representation of a number n is just i iterations
+ *      of log_2 applied to n.
+ *
+ * Written by 
+ *       Chee Yap <yap at cs.nyu.edu>
+ *       Chen Li <chenli at cs.nyu.edu>
+ *       Zilin Du <zilin at cs.nyu.edu>
+ *       Sylvain Pion <pion at cs.nyu.edu> 
+ *
+ * WWW URL: http://cs.nyu.edu/exact/
+ * Email: exact at cs.nyu.edu
+ *
+ * $URL$
+ * $Id$
+ ***************************************************************************/
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/CORE/extLong.h>
+#include <CGAL/CORE/extLong_impl.h>
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/CMakeLists.txt b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/CMakeLists.txt
new file mode 100644
index 0000000..7b0a1fa
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/CMakeLists.txt
@@ -0,0 +1,54 @@
+message("Configuring libCGAL_ImageIO")
+
+find_package( OpenGL )
+find_package( ZLIB )
+
+
+if(OPENGL_FOUND)
+  message( STATUS "OpenGL include:     ${OPENGL_INCLUDE_DIR}" )
+  message( STATUS "OpenGL libraries:   ${OPENGL_LIBRARIES}" )
+  
+  cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} )
+  cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES    ${OPENGL_LIBRARIES}   )
+
+  if(ZLIB_FOUND)
+    get_dependency_version(ZLIB)
+    cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
+    cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES    ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ${ZLIB_LIBRARY} )
+    cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS  "-DCGAL_USE_ZLIB")
+    cache_set(CGAL_ImageIO_USE_ZLIB "ON")
+  endif(ZLIB_FOUND)
+
+  set( CGAL_ImageIO_BASENAME CGAL_ImageIO)
+  
+  if(COMMAND add_config_flag)
+    set( CGAL_HAS_IMAGEIO TRUE ) 
+    add_config_flag( CGAL_HAS_IMAGEIO )
+  endif()
+
+  use_essential_libs()
+
+  include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} .)
+  
+  link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
+
+  collect_cgal_library( CGAL_ImageIO "")
+  
+  add_dependencies( CGAL_ImageIO CGAL )
+  
+  add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
+  
+  # CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it
+  # in both build types.
+  target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
+  
+message("libCGAL_ImageIO is configured")
+    
+else(OPENGL_FOUND)
+  message( STATUS "libCGAL_ImageIO needs OpenGL, cannot be configured.")
+endif(OPENGL_FOUND)
+  
+if(NOT ZLIB_FOUND)
+  message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
+endif(NOT ZLIB_FOUND) 
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/ImageIO.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/ImageIO.cpp
new file mode 100644
index 0000000..8142f0b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/ImageIO.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) 
+// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) 
+// All rights reserved.
+//
+// The files in this directory are part of the ImageIO Library.
+// You can redistribute them and/or  modify them under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// $URL$
+// $Id$
+//
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/ImageIO.h>
+#include <CGAL/ImageIO_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/Image_3.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/Image_3.cpp
new file mode 100644
index 0000000..e16e860
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/Image_3.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2005-2008  INRIA Sophia-Antipolis (France).
+//               2008 GeometryFactory, Sophia Antipolis (France)
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 3 of the License,
+// or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+// Author(s)     : Laurent Rineau, Pierre Alliez
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Image_3.h>
+#include <CGAL/Image_3_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/LICENSE b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/LICENSE
similarity index 100%
rename from 3rdparty/CGAL-4.6/src/CGAL_ImageIO/LICENSE
rename to 3rdparty/CGAL-4.8/src/CGAL_ImageIO/LICENSE
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.cpp
new file mode 100644
index 0000000..a40db32
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "analyze.h"
+#include "analyze_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.h
new file mode 100644
index 0000000..7014b92
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze.h
@@ -0,0 +1,74 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef ANALYZE_H
+#define ANALYZE_H
+
+#ifdef _MSC_VER
+#pragma warning ( disable : 4068 4786 4081 4267 )
+#endif
+
+
+
+#include <CGAL/ImageIO.h>
+
+/* read analyse format header
+
+   return:
+   -1: error
+   0: success
+ */
+int readAnalyzeHeader(const char* name,_image *im);
+
+int testAnalyzeHeader(char *magic,const char *name);
+
+/** creates an return the file format structure associated with the Analyze file format */
+PTRIMAGE_FORMAT createAnalyzeFormat();
+
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeAnalyze( char *basename, _image* im ) ;
+
+
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeAnalyzeHeader( const _image* im ) ;
+
+
+
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeAnalyzeData( const _image* im ) ;
+
+#ifdef CGAL_HEADER_ONLY
+#include "analyze_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze_impl.h
new file mode 100644
index 0000000..4f92374
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/analyze_impl.h
@@ -0,0 +1,852 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#include <cstring>
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+/* compile time endianness */
+/* replaced by _getEndianness()
+   see below
+#if (defined (_ALPHA_) || defined (_LINUX_))
+#define ARCHITECTURE_ENDIANNESS END_LITTLE
+#else
+#define ARCHITECTURE_ENDIANNESS END_BIG
+#endif
+*/
+
+/** Magic header for ANALYZE files written in little endian format */
+#define ANALYZE_LE_MAGIC "\000\000\001\134"
+/** Magic header for ANALYZE files written in big endian format */
+#define ANALYZE_BE_MAGIC "\134\001\000\000"
+
+#define DT_NONE			0 
+#define DT_UNKNOWN              0 /*Unknown data type*/ 
+#define DT_BINARY               1 /*Binary (1 bit per voxel)*/ 
+#define DT_UNSIGNED_CHAR        2 /*Unsigned character (8 bits per voxel)*/ 
+#define DT_SIGNED_SHORT         4 /*Signed short (16 bits per voxel)*/ 
+#define DT_SIGNED_INT           8 /*Signed integer (32 bits per voxel)*/ 
+#define DT_FLOAT                16 /*Floating point (32 bits per voxel)*/ 
+#define DT_COMPLEX              32 /*Complex (64 bits per voxel; 2 floating point numbers) */
+#define DT_DOUBLE               64 /*Double precision (64 bits per voxel)*/ 
+#define DT_RGB                  128 /* */
+#define DT_ALL                  255 /* */
+
+#include <cstring>
+
+struct header_key                       /*      header_key       */
+    {                                           /* off + size*/
+        int sizeof_hdr;                         /* 0 + 4     */
+        char data_type[10];                     /* 4 + 10    */
+        char db_name[18];                       /* 14 + 18   */
+        int extents;                            /* 32 + 4    */
+        short int session_error;                /* 36 + 2    */
+        char regular;                           /* 38 + 1    */
+        char hkey_un0;                          /* 39 + 1    */
+    };                                          /* total=40  */
+
+struct image_dimension                  /*      image_dimension  */
+    {                                           /* off + size*/
+        short int dim[8];                       /* 0 + 16    */
+        char vox_units[4];                      /* 16 + 4    */
+        char cal_units[8];                      /* 20 + 4    */
+        short int unused1;                      /* 24 + 2    */
+        short int datatype;                     /* 30 + 2    */
+        short int bitpix;                       /* 32 + 2    */
+        short int dim_un0;                      /* 34 + 2    */
+        float pixdim[8];                        /* 36 + 32   */
+                        /* 
+                                pixdim[] specifies the voxel dimensions:
+                                pixdim[1] - voxel width
+                                pixdim[2] - voxel height
+                                pixdim[3] - interslice distance
+                                        ..etc
+                        */
+        float vox_offset;                       /* 68 + 4    */
+        float funused1;                         /* 72 + 4    */
+        float funused2;                         /* 76 + 4    */
+        float funused3;                         /* 80 + 4    */
+        float cal_max;                          /* 84 + 4    */
+        float cal_min;                          /* 88 + 4    */
+        int compressed;                         /* 92 + 4    */
+        int verified;                           /* 96 + 4    */
+        int glmax, glmin;                       /* 100 + 8   */
+    };                                          /* total=108 */
+         
+struct data_history                     /*      data_history     */
+    {                                           /* off + size*/
+        char descrip[80];                       /* 0 + 80    */
+        char aux_file[24];                      /* 80 + 24   */
+        char orient;                            /* 104 + 1   */
+        char originator[10];                    /* 105 + 10  */
+        char generated[10];                     /* 115 + 10  */
+        char scannum[10];                       /* 125 + 10  */
+        char patient_id[10];                    /* 135 + 10  */
+        char exp_date[10];                      /* 145 + 10  */
+        char exp_time[10];                      /* 155 + 10  */
+        char hist_un0[3];                       /* 165 + 3   */
+        int views;                              /* 168 + 4   */
+        int vols_added;                         /* 172 + 4   */
+        int start_field;                        /* 176 + 4   */
+        int field_skip;                         /* 180 + 4   */
+        int omax,omin;                          /* 184 + 8   */
+        int smax,smin;                          /* 192 + 8   */
+    };                                        
+
+
+struct dsr                                   /*      dsr              */
+   {                                         /* off + size*/
+     struct header_key hk;                   /* 0 + 40    */
+     struct image_dimension dime;            /* 40 + 108  */
+     struct data_history hist;               /* 148 + 200 */
+   };                                        /* total=348 */
+
+ 
+
+
+/*---------------- _swapLong ------------------------------------------------*/
+CGAL_INLINE_FUNCTION
+static void _swapLong( unsigned char *pntr)
+{
+  unsigned char b0, b1, b2, b3;
+  
+  b0 = *pntr;
+  b1 = *(pntr+1);
+  b2 = *(pntr+2);
+  b3 = *(pntr+3);
+  
+  *pntr = b3;
+  *(pntr+1) = b2;
+  *(pntr+2) = b1;
+  *(pntr+3) = b0;
+}
+        
+/*---------------- _swapShort -----------------------------------------------*/
+CGAL_INLINE_FUNCTION
+static void _swapShort( unsigned char *pntr)
+{
+  unsigned char b0, b1;
+  
+  b0 = *pntr;
+  b1 = *(pntr+1);
+
+  *pntr = b1;
+  *(pntr+1) = b0;
+}
+
+/*---------------- _swapAnalyzeHdr ------------------------------------------*/
+CGAL_INLINE_FUNCTION
+static void _swapAnalyzeHdr( struct dsr *pntr)
+{
+  
+  _swapLong((unsigned char*) &pntr->hk.sizeof_hdr) ;
+  _swapLong((unsigned char*) &pntr->hk.extents) ;
+  _swapShort((unsigned char*) &pntr->hk.session_error) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[0]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[1]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[2]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[3]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[4]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[5]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[6]) ;
+  _swapShort((unsigned char*) &pntr->dime.dim[7]) ;
+  _swapShort((unsigned char*) &pntr->dime.unused1) ;
+  _swapShort((unsigned char*) &pntr->dime.datatype) ;
+  _swapShort((unsigned char*) &pntr->dime.bitpix) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[0]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[1]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[2]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[3]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[4]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[5]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[6]) ;
+  _swapLong((unsigned char*) &pntr->dime.pixdim[7]) ;
+  _swapLong((unsigned char*) &pntr->dime.vox_offset) ;
+  _swapLong((unsigned char*) &pntr->dime.funused1) ;
+  _swapLong((unsigned char*) &pntr->dime.funused2) ;
+  _swapLong((unsigned char*) &pntr->dime.cal_max) ;
+  _swapLong((unsigned char*) &pntr->dime.cal_min) ;
+  _swapLong((unsigned char*) &pntr->dime.compressed) ;
+  _swapLong((unsigned char*) &pntr->dime.verified) ;
+  _swapShort((unsigned char*) &pntr->dime.dim_un0) ;
+  _swapLong((unsigned char*) &pntr->dime.glmax) ;
+  _swapLong((unsigned char*) &pntr->dime.glmin) ;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createAnalyzeFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testAnalyzeHeader;
+  f->readImageHeader=&readAnalyzeHeader;
+  f->writeImage=&writeAnalyze;
+  strcpy(f->fileExtension,".hdr,.hdr.gz,.img,.img.gz");
+  strcpy(f->realName,"Analyze");
+  return f;
+}
+
+CGAL_INLINE_FUNCTION
+int testAnalyzeHeader(char *magic,const char *) {
+   /* opened image is an ANALYZE */
+  if( !memcmp(magic,ANALYZE_LE_MAGIC,4) ||
+      !memcmp(magic,ANALYZE_BE_MAGIC,4)) 
+    return 0;
+  else 
+    return -1;
+}
+
+CGAL_INLINE_FUNCTION
+int writeAnalyze( char *name, _image* im) {
+  char *outputName;
+  int length, extLength=0, res;
+
+
+  length=strlen(name);
+  outputName= (char *)ImageIO_alloc(length+8);
+  
+  if ( strncmp( name+length-4, ".hdr", 4 ) == 0 ) {
+    extLength = 4;
+  }
+  else if ( strncmp( name+length-4, ".img", 4 ) == 0 ) {
+    extLength = 4;
+  }
+  else if ( strncmp( name+length-7, ".img.gz", 7 ) == 0 ) {
+    extLength = 7;
+  }
+  else if ( strncmp( name+length-7, ".hdr.gz", 7 ) == 0 ) {
+    extLength = 7;
+  }
+
+  strncpy( outputName, name, length-extLength );
+  if ( strncmp( name+length-7, ".hdr.gz", 7 ) == 0 )
+    strcpy( outputName+length-extLength, ".hdr.gz" );
+  else
+    strcpy( outputName+length-extLength, ".hdr" );
+  
+  _openWriteImage(im, outputName);
+  if( !im->fd ) {
+    fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    return ImageIO_OPENING;
+  }
+
+  res = writeAnalyzeHeader(im);
+  if ( res < 0 ) {
+    fprintf(stderr, "writeAnalyze: error: unable to write header of \'%s\'\n",
+	    outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    ImageIO_close( im );
+    im->fd = NULL;
+    im->openMode = OM_CLOSE;
+    return( res );
+  }
+  
+  ImageIO_close(im);
+  
+  strncpy( outputName, name, length-extLength );
+  if ( strncmp( name+length-3, ".gz", 3 ) == 0 ) {
+    strcpy( outputName+length-extLength, ".img.gz" );
+  }
+  else {
+    strcpy( outputName+length-extLength, ".img" );
+  }
+
+  _openWriteImage(im, outputName);
+
+  if( !im->fd ) {
+    fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    return ImageIO_OPENING;
+  }
+
+  res = writeAnalyzeData(im);
+  if (res < 0) {
+    fprintf(stderr, "writeAnalyze: error: unable to write data in \'%s\'\n",
+	    outputName );
+    ImageIO_close( im );
+    im->fd = NULL;
+    im->openMode = OM_CLOSE;
+    return( res );
+  }
+
+  if ( outputName != NULL ) ImageIO_free( outputName );
+  ImageIO_close( im );
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+
+  return ( res );
+}
+
+/* 
+   return:
+   -1: error
+   0: success
+ */
+
+CGAL_INLINE_FUNCTION
+int _readAnalyzeHeader( _image* im, const char* name, 
+			struct dsr *analyzeHeader )
+{
+
+   unsigned int i ;
+   /* compile time endianness */
+   ENDIANNESS ARCHITECTURE_ENDIANNESS = _getEndianness();
+
+   if(im->openMode != OM_CLOSE) {
+      
+     ImageIO_read( im, analyzeHeader, sizeof(struct dsr) );
+      
+      if( analyzeHeader->hk.sizeof_hdr == sizeof(struct dsr) )
+      {
+	 im->endianness = ARCHITECTURE_ENDIANNESS ;
+      }
+      else
+      {
+	_swapAnalyzeHdr( analyzeHeader );
+	 if( analyzeHeader->hk.sizeof_hdr != sizeof(struct dsr) )
+	 {
+	    fprintf (stderr,
+		     "_readAnalyzeHeader: error: unknown magic (%d)...\n",
+		     analyzeHeader->hk.sizeof_hdr );
+	    return -1;
+	 }
+	 if( ARCHITECTURE_ENDIANNESS == END_LITTLE )
+	 {
+	    im->endianness = END_BIG;
+	 }
+	 else
+	 {
+	    im->endianness = END_LITTLE;
+	 }
+      }
+      
+      if ( analyzeHeader->dime.dim[0] > 4 ) {
+	 fprintf (stderr,
+		  "_readAnalyzeHeader: error: dimensionality not supported (%d)...\n",
+		  analyzeHeader->dime.dim[0] );
+	 return -1;
+      }
+      
+      im->xdim = analyzeHeader->dime.dim[1];
+      im->ydim = analyzeHeader->dime.dim[2];
+      im->zdim = analyzeHeader->dime.dim[3];
+
+      /* 0 time-points is a convention for one volume only at MNI */
+      /* Corrected by X. Pennec following a bug report by Irina Kezele at MNI */
+      if( analyzeHeader->dime.dim[4] == 0 ){
+	fprintf (stderr,
+		 "_readAnalyzeHeader: warning: time dimension / number if volume (dim[4]) is 0. Assuming this means 1 (otherwise there would be no image...). \n");
+	analyzeHeader->dime.dim[4] = 1; 
+      }
+
+      /* Analyze doesn't support vector images.
+	 The forth dimension relates to time. */
+      if( analyzeHeader->dime.dim[4] != 1 )
+      {
+	 fprintf (stderr,
+		  "_readAnalyzeHeader: error: time dimension not supported (%d)...\n",
+		  analyzeHeader->dime.dim[4] );
+	 return -1;
+      }
+      im->vectMode = VM_SCALAR;
+      
+      im->vx = analyzeHeader->dime.pixdim[1];
+      im->vy = analyzeHeader->dime.pixdim[2];
+      im->vz = analyzeHeader->dime.pixdim[3];
+
+      if( im->vx == 0.0 ) im->vx = 1.0 ;
+      if( im->vy == 0.0 ) im->vy = im->vx ;
+      if( im->vz == 0.0 ) im->vz = im->vy ;
+      
+      switch(analyzeHeader->dime.datatype)
+      {
+	 case DT_BINARY:
+	 case DT_UNSIGNED_CHAR:
+	 case DT_SIGNED_SHORT:
+	 case DT_SIGNED_INT:
+	 case DT_FLOAT:
+	 case DT_COMPLEX:
+	 case DT_DOUBLE:
+	    im->vdim = 1;
+	    break ;
+	    
+	 case DT_RGB:
+	    im->vdim = 3;
+	    break ;
+	    
+	 default:
+	    fprintf (stderr,
+		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
+		     analyzeHeader->dime.datatype );
+	    return -1;
+      }
+      
+      switch(analyzeHeader->dime.datatype)
+      {
+	 case DT_BINARY:
+	 case DT_UNSIGNED_CHAR:
+	 case DT_SIGNED_SHORT:
+	 case DT_SIGNED_INT:
+	 case DT_RGB:
+	    im->wordKind = WK_FIXED;
+	    break ;
+	    
+	 case DT_FLOAT:
+	 case DT_COMPLEX:
+	 case DT_DOUBLE:
+	    im->wordKind = WK_FLOAT;
+	    break ;
+	    
+	 default:
+	    fprintf (stderr,
+		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
+		     analyzeHeader->dime.datatype );
+	    return -1;
+      }
+      
+      switch(analyzeHeader->dime.datatype)
+      {
+	 case DT_BINARY:
+	 case DT_UNSIGNED_CHAR:
+	 case DT_RGB:
+	    im->sign = SGN_UNSIGNED;
+	    break ;
+	    
+	 case DT_SIGNED_SHORT:
+	 case DT_SIGNED_INT:
+	 case DT_FLOAT:
+	 case DT_COMPLEX:
+	 case DT_DOUBLE:
+	    im->sign = SGN_SIGNED;
+	    break ;
+	    
+	 default:
+	    fprintf (stderr,
+		     "_readAnalyzeHeader: error: data type not supported (%d)...\n",
+		     analyzeHeader->dime.datatype );
+	    return -1;
+      }
+      
+      im->wdim = analyzeHeader->dime.bitpix;
+      if( analyzeHeader->dime.datatype == DT_RGB )
+      {
+	 im->wdim /= 3 ;
+      }
+      if(im->wdim != 8 && im->wdim != 16 && im->wdim != 32 && im->wdim != 64)
+      {
+	 fprintf (stderr,
+		  "_readAnalyzeHeader: error: pixel size not supported (%d)...\n",
+		  analyzeHeader->dime.bitpix );
+	 return -1;
+      }
+      im->wdim >>= 3 ;
+      
+      /* There are 17 optional data fields 
+	 be careful in the allocation
+       */
+      im->nuser = 1 + 17 ;
+      im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
+      for ( i=0; i<im->nuser; i++ ) im->user[i] = NULL;
+      i = 0 ;
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("Data lost in the Analyze -> ImageIO conversion:") + 1));
+      sprintf( im->user[i++], "Data lost in the Analyze -> ImageIO conversion:" );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  descrip: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
+      sprintf( im->user[i++], "  descrip: %s", analyzeHeader->hist.descrip );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  aux_file: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
+      sprintf( im->user[i++], "  aux_file: %s", analyzeHeader->hist.descrip );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  orient: ") + 1+ 2));
+      sprintf( im->user[i++], "  orient: %d", analyzeHeader->hist.orient );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  originator: ") + 1 + strlen(analyzeHeader->hist.originator) ));
+      sprintf( im->user[i++], "  originator: %s", analyzeHeader->hist.originator );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  generated: ") + 1 + strlen(analyzeHeader->hist.generated) ));
+      sprintf( im->user[i++], "  generated: %s", analyzeHeader->hist.generated );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  scannum: ") + 1 + strlen(analyzeHeader->hist.scannum) ));
+      sprintf( im->user[i++], "  scannum: %s", analyzeHeader->hist.scannum );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  patient_id: ") + 1 + strlen(analyzeHeader->hist.patient_id) ));
+      sprintf( im->user[i++], "  patient_id: %s", analyzeHeader->hist.patient_id );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  exp_date: ") + 1 + strlen(analyzeHeader->hist.exp_date) ));
+      sprintf( im->user[i++], "  exp_date: %s", analyzeHeader->hist.exp_date );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  exp_time: ") + 1 + strlen(analyzeHeader->hist.exp_time) ));
+      sprintf( im->user[i++], "  exp_time: %s", analyzeHeader->hist.exp_time );
+
+      /* A 32 bit int doesn't print on more than 11 chars */
+      im->user[i] = (char *) ImageIO_alloc((strlen("  views: ") + 11 + 1));
+      sprintf( im->user[i++], "  views: %d", analyzeHeader->hist.views );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  vols_added: ") + 11 + 1));
+      sprintf( im->user[i++], "  vols_added: %d", analyzeHeader->hist.vols_added );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  start_field: ") + 11 + 1));
+      sprintf( im->user[i++], "  start_field: %d", analyzeHeader->hist.start_field );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  field_skip: ") + 11 + 1));
+      sprintf( im->user[i++], "  field_skip: %d", analyzeHeader->hist.field_skip );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  omax: ") + 11 + 1));
+      sprintf( im->user[i++], "  omax: %d", analyzeHeader->hist.omax );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  omin: ") + 11 + 1));
+      sprintf( im->user[i++], "  omin: %d", analyzeHeader->hist.omin );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  smax: ") + 11 + 1));
+      sprintf( im->user[i++], "  smax: %d", analyzeHeader->hist.smax );
+      
+      im->user[i] = (char *) ImageIO_alloc((strlen("  smin: ") + 11 + 1));
+      sprintf( im->user[i++], "  smin: %d", analyzeHeader->hist.smin );
+
+
+      /* header is read. close header file and open data file. */
+      if( name != NULL ) {
+
+	int length = strlen(name) ;
+	char* data_filename = (char *) ImageIO_alloc(length+4) ;
+	
+	if( strcmp( name+length-4, ".hdr" ) )
+	  {
+	    fprintf (stderr,
+		     "_readAnalyzeHeader: error: file header extension must be .hdr\n");
+	    ImageIO_free( data_filename );
+	    return -1;
+	  }
+	 
+	ImageIO_close(im);
+	
+	strcpy(data_filename,name);
+	strcpy(data_filename+length-3, "img.gz");
+	_openReadImage(im,data_filename);
+	
+	if(!im->fd) {
+
+	  strcpy(data_filename,name);
+	  strcpy(data_filename+length-3, "img");
+	  _openReadImage(im,data_filename);
+	  if(!im->fd) {
+	    fprintf(stderr, "_readAnalyzeHeader: error: unable to open data file \'%s\'\n", data_filename);
+	    ImageIO_free( data_filename );
+	    return -1;
+	    
+	  }
+	}
+	ImageIO_free( data_filename );
+      }
+      
+      /* check header validity */
+      if(im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
+	 im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
+	 (im->wordKind == WK_FLOAT || (im->wordKind == WK_FIXED &&
+				       im->sign != SGN_UNKNOWN)) &&
+	 im->endianness != END_UNKNOWN) {
+	 return 0;
+      }
+      else return -1;
+   }
+   else return -1;
+}
+
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+int readAnalyzeHeader( const char* name, _image* im)
+{
+  struct dsr analyzeHeader ;
+  return( _readAnalyzeHeader( im, name, &analyzeHeader ) );
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int
+writeAnalyzeHeader( const _image* im )
+{
+  const char *proc = "writeAnalyzeHeader";
+  struct dsr hdr;
+  int i ;
+  int imin = 0;
+  int imax = 0;
+ 
+   memset(&hdr,0, sizeof(struct dsr));
+   
+   for(i=0;i<8;i++) {
+      hdr.dime.pixdim[i] = 0.0;
+   }
+   hdr.dime.vox_offset  = 0.0;
+   hdr.dime.funused1    = 0.0;
+   hdr.dime.funused2    = 0.0;
+   hdr.dime.funused3    = 0.0;
+   hdr.dime.cal_max     = 0.0;
+   hdr.dime.cal_min     = 0.0;
+
+   hdr.dime.dim[0] = 4;
+   hdr.dime.dim[1] = im->xdim;
+   hdr.dime.dim[2] = im->ydim;
+   hdr.dime.dim[3] = im->zdim;
+   hdr.dime.dim[4] = 1 ;
+
+   if ( im->wordKind == WK_FIXED && im->sign == SGN_UNSIGNED ) {
+     if( im->wdim == 1 ) {
+       
+	if ( im->vdim == 1 ) {
+	  hdr.dime.datatype = DT_UNSIGNED_CHAR ;
+	}
+	else if ( im->vdim == 3 ) {
+	  hdr.dime.datatype = DT_RGB ;
+	}
+	else {
+	  fprintf( stderr, "%s: unsupported image type\n", proc );
+	  return -1;
+	}
+	
+	{
+	  unsigned char *buf = (unsigned char *)im->data;
+	  int size = im->xdim * im->ydim * im->zdim * im->vdim;
+	  imin = imax = *buf;
+	  for (i=0; i<size; i++, buf++) {
+	    if ( imax < *buf ) imax = *buf;
+	    if ( imin > *buf ) imin = *buf;
+	  }
+	}
+	
+      }
+      else if ( im->wdim == 2 ) {
+	if ( im->vdim == 1 ) {
+	  unsigned short int *buf = (unsigned short int*)im->data;
+	  int size = im->xdim * im->ydim *im->zdim;
+	  int i;
+	  imin = imax = *buf;
+	  for (i=0; i<size; i++, buf++) {
+	    if ( imax < *buf ) imax = *buf;
+	    if ( imin > *buf ) imin = *buf;
+	  }
+	  if ( imax < 32768 ) {
+	    hdr.dime.datatype = DT_SIGNED_SHORT ;
+	  } 
+	  else {
+	    fprintf( stderr, "%s: conversion from unsigned short to short impossible, max=%d\n", proc, imax );
+	    return -1;
+	  }
+	}
+	else {
+	  fprintf( stderr, "%s: unsupported image type\n", proc );
+	  return -1;
+	}
+      }
+      
+      else {
+	  fprintf( stderr, "%s: unsupported image type\n", proc );
+	  return -1;
+      }
+      
+   } /* if ( im->wordKind == WK_FIXED && im->sign == SGN_UNSIGNED ) */
+
+   else if( im->wordKind == WK_FIXED && im->sign == SGN_SIGNED ) {
+     if ( im->vdim != 1 ) {
+       fprintf( stderr, "%s: unsupported image type\n", proc );
+       return -1;
+     }
+     if( im->wdim == 2 ) {
+       short int *buf = (short int*)im->data;
+       int size = im->xdim * im->ydim *im->zdim;
+       int i;
+       imin = imax = *buf;
+       for (i=0; i<size; i++, buf++) {
+	 if ( imax < *buf ) imax = *buf;
+	 if ( imin > *buf ) imin = *buf;
+       }
+       hdr.dime.datatype = DT_SIGNED_SHORT ;
+     }
+     else if( im->wdim == 4 ) {
+       int *buf = (int*)im->data;
+       int size = im->xdim * im->ydim *im->zdim;
+       int i;
+       imin = imax = *buf;
+       for (i=0; i<size; i++, buf++) {
+	 if ( imax < *buf ) imax = *buf;
+	 if ( imin > *buf ) imin = *buf;
+       }
+       hdr.dime.datatype = DT_SIGNED_INT ;
+     }
+     else {
+       fprintf( stderr, "%s: unsupported image type\n", proc );
+       return -1;
+     }
+   }
+   else if( im->wordKind == WK_FLOAT ) {
+     if ( im->vdim != 1 ) {
+       fprintf( stderr, "%s: unsupported image type\n", proc );
+       return -1;
+     }
+     if( im->wdim == 4 ) {
+       hdr.dime.datatype = DT_FLOAT ;
+     }
+     else if( im->wdim == 8 ) {
+       hdr.dime.datatype = DT_DOUBLE ;
+     }
+     else {
+       fprintf( stderr, "%s: unsupported image type\n", proc );
+       return -1;
+     }
+   }
+   else
+   {
+      fprintf( stderr, "%s: unsupported image type\n", proc );
+      return -1;
+   }
+	 
+   hdr.dime.bitpix = 8*im->wdim*im->vdim ;
+
+   hdr.hk.regular = 'r';
+   hdr.hk.sizeof_hdr = sizeof(struct dsr);
+
+   /* this is probably bad and should be changed to the
+      real values, but I'm too lazy to do it now. AG */
+   hdr.dime.glmax  = 0 ;  /* maximum voxel value  */
+   hdr.dime.glmin  = 0 ;  /* minimum voxel value */
+   
+   /* corrected GM
+    */
+   hdr.dime.glmax  = imax ;  /* maximum voxel value  */
+   hdr.dime.glmin  = imin ;  /* minimum voxel value */
+    
+/*     Set the voxel dimension fields: 
+       A value of 0.0 for these fields implies that the value is unknown.
+         Change these values to what is appropriate for your data
+         or pass additional command line arguments     */      
+         
+    hdr.dime.pixdim[1] = (float)im->vx;
+    hdr.dime.pixdim[2] = (float)im->vy;
+    hdr.dime.pixdim[3] = (float)im->vz;
+    
+/*   Assume zero offset in .img file, byte at which pixel
+       data starts in the image file */
+
+    hdr.dime.vox_offset = 0.0; 
+    
+/*   Planar Orientation;    */
+/*   Movie flag OFF: 0 = transverse, 1 = coronal, 2 = sagittal
+     Movie flag ON:  3 = transverse, 4 = coronal, 5 = sagittal  */  
+
+    hdr.hist.orient     = 0;  
+    
+/*   up to 3 characters for the voxels units label; i.e. mm., um., cm. */
+
+    strcpy(hdr.dime.vox_units,"mm.");
+   
+/*   up to 7 characters for the calibration units label; i.e. HU */
+
+    strcpy(hdr.dime.cal_units," ");  
+    
+/*     Calibration maximum and minimum values;  
+       values of 0.0 for both fields imply that no 
+       calibration max and min values are used    */
+
+    hdr.dime.cal_max = 0.0; 
+    hdr.dime.cal_min = 0.0;
+
+    if(ImageIO_write(im, &hdr, sizeof(struct dsr)) !=sizeof(struct dsr) )
+       return -1;
+
+    return 1 ;
+}
+
+
+
+
+
+/* Writes the given image body in an already opened file.*/
+CGAL_INLINE_FUNCTION
+int writeAnalyzeData(const _image *im) {
+  unsigned int lineSize = im->wdim * im->xdim * im->vdim ;
+  unsigned long size = lineSize * im->ydim * im->zdim;
+  unsigned int nwrt ;
+
+  if(im->openMode != OM_CLOSE) {
+
+#ifdef _REVERSE_LINES_IN_ANALYZE_
+    char* data = (char *)im->data ;
+    char* buf = data + size - lineSize ;
+    
+    while( buf >= data )
+      {
+	nwrt = ImageIO_write(im, buf, lineSize);
+	if(nwrt != lineSize) return -1;
+	buf -= lineSize ;
+      }
+#else
+    nwrt = ImageIO_write(im, im->data, size);
+    if(nwrt != size) return -1;
+#endif    
+
+    return 1 ;
+  }
+  else return -1;
+}
+
+
+/* Writes the given image body in an already opened file.*/
+CGAL_INLINE_FUNCTION
+int printAnalyzeHeader( const char* name )
+{
+  _image *im;
+  struct dsr analyzeHeader ;
+
+  im = _initImage();
+  _openReadImage(im, name);
+  if(!im->fd) {
+    fprintf(stderr, "printAnalyzeHeader: error: unable to open file \'%s\'\n", name);
+    _freeImage(im);
+    return -1;
+  }
+
+  if ( _readAnalyzeHeader( im, name, &analyzeHeader ) != 1 ) {
+    fprintf(stderr, "printAnalyzeHeader: error: unable to read header in file \'%s\'\n", name);
+    _freeImage(im);
+    return -1;
+  }
+
+
+  
+
+
+  ImageIO_close(im);
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+  _freeImage(im);
+  return( 1 );
+
+
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.cpp
new file mode 100644
index 0000000..e9b862e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "bmp.h"
+#include "bmp_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.h
new file mode 100644
index 0000000..2d0e865
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * iobmp.h - I procedures for BMP raw images
+ *
+ * $Id$
+ *
+ * Copyright INRIA
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ * Wed Oct  6 17:03:48 MET DST 1999
+ *
+ * ADDITIONS, CHANGES
+ *
+ *
+ */
+
+#ifndef _bmp_h_
+#define _bmp_h_
+
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h> /* open, close */
+#include <sys/stat.h> /* open, close */
+#include <sys/types.h> /* open, close */
+#include <string.h>
+#include <CGAL/ImageIO.h>
+extern int readBmpImage(const char *name, _image *im);
+extern void *_readBmpImage( const char *name, int *dimx, int *dimy, int *dimz );
+int testBmpHeader(char *magic,const char *name);
+/** creates an return the file format structure associated with the BMP file format */
+PTRIMAGE_FORMAT createBMPFormat();
+
+extern void IoBmp_verbose ( );
+extern void IoBmp_noverbose ( );
+
+#ifdef CGAL_HEADER_ONLY
+#include "bmp_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif /* _bmp_h_ */
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp_impl.h
new file mode 100644
index 0000000..155f38d
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmp_impl.h
@@ -0,0 +1,518 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bmptypes.h"
+#include "bmpendian.h"
+#include "bmpread.h"
+
+
+
+
+
+
+/** Magic header for bmp */
+#define BMP_MAGIC "BM"
+
+
+#ifdef CGAL_HEADER_ONLY
+
+inline int& get_static_verbose_bmp()
+{
+  static int _VERBOSE_BMP_ = 1;
+  return _VERBOSE_BMP_;
+}
+
+#else // CGAL_HEADER_ONLY
+
+static int _VERBOSE_BMP_ = 1;
+inline int& get_static_verbose_bmp()
+{ return _VERBOSE_BMP_; }
+
+#endif // CGAL_HEADER_ONLY
+
+
+CGAL_INLINE_FUNCTION
+int testBmpHeader(char *magic,const char *) {
+  if( !strncmp(magic, BMP_MAGIC, strlen(BMP_MAGIC)))
+    return 0;
+  else 
+    return -1;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createBMPFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testBmpHeader;
+  f->readImageHeader=&readBmpImage;
+  f->writeImage=0;
+  strcpy(f->fileExtension,".bmp");
+  strcpy(f->realName,"BMP");
+  return f;
+}
+
+CGAL_INLINE_FUNCTION
+int readBmpImage( const char *name,_image *im)
+{
+  int dimx, dimy, dimv;
+
+  im->data = _readBmpImage( name, &dimx,  &dimy,  &dimv );
+  if ( im->data == NULL ) {
+    fprintf( stderr, "readBmpImage: unable to read \'%s\'\n", name );
+    return( -1 );
+  }
+
+  im->xdim = dimx;
+  im->ydim = dimy;
+  im->vdim = dimv;
+
+  im->zdim = 1;
+
+  im->wdim = 1;
+  im->wordKind = WK_FIXED;
+  im->sign = SGN_UNSIGNED;
+
+  return 1;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+void *_readBmpImage( const char *name, 
+		     int *dimx, int *dimy, int *dimz )
+{
+  const char *proc="_readBmpImage";
+  void *buf = (void*)NULL;
+  unsigned char *myBuf;
+
+  FILE *fp;
+  RGB **argbs;
+  char **xorMasks, **andMasks;
+  CGAL_UINT32 *heights, *widths, row, col;
+  CGAL_UINT16 fileType;
+  long filePos;
+  int numImages, i;
+  int rc;
+    
+    fp = fopen(name, "rb");
+    if (fp == NULL) {
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: error in opening %s\n", proc, name );
+      return( (void*)NULL );
+    }
+
+
+    /*
+     * Read the first two bytes as little-endian to determine the file type.
+     * Preserve the file position.
+     */
+    filePos = ftell(fp);
+    rc = readUINT16little(fp, &fileType);
+    if (rc != 0) {
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: error in getting file type %s\n", proc, name );
+      return( (void*)NULL );
+    }
+    fseek(fp, filePos, SEEK_SET);
+
+    /*
+     * Read the images.
+     */
+    switch (fileType) {
+    case TYPE_ARRAY:
+	/*
+	 * If this is an array of images, read them.  All the arrays we need
+	 * will be allocated by the reader function.
+	 */
+	rc = readMultipleImage(fp, &argbs, &xorMasks, &andMasks, &heights,
+			       &widths, &numImages);
+	break;
+    case TYPE_BMP:
+    case TYPE_ICO:
+    case TYPE_ICO_COLOR:
+    case TYPE_PTR:
+    case TYPE_PTR_COLOR:
+	/*
+	 * If this is a single-image file, we've a little more work.  In order
+	 * to make the output part of this test program easy to write, we're
+	 * going to allocate dummy arrays that represent what
+	 * readMultipleImage would have allocated.  We'll read the data into
+	 * those arrays.
+	 */
+	argbs = (RGB **)calloc(1, sizeof(RGB *));
+	if (argbs == NULL)
+	{
+	    rc = 1005;
+	    break;
+	}
+	xorMasks = (char **)calloc(1, sizeof(char *));
+	if (xorMasks == NULL)
+	{
+	    free(argbs);
+	    rc = 1005;
+	    break;
+	}
+	andMasks = (char **)calloc(1, sizeof(char *));
+	if (andMasks == NULL)
+	{
+	    free(argbs);
+	    free(xorMasks);
+	    rc = 1005;
+	    break;
+	}
+	heights = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
+	if (heights == NULL)
+	{
+	    free(argbs);
+	    free(xorMasks);
+	    free(andMasks);
+	    rc = 1005;
+	    break;
+	}
+	widths = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
+	if (widths == NULL)
+	{
+	    free(argbs);
+	    free(xorMasks);
+	    free(andMasks);
+	    free(heights);
+	    rc = 1005;
+	    break;
+	}
+	numImages = 1;
+
+	/*
+	 * Now that we have our arrays allocted, read the image into them.
+	 */
+	switch (fileType) {
+	case TYPE_BMP:
+	    rc = readSingleImageBMP(fp, argbs, widths, heights);
+	    break;
+	case TYPE_ICO:
+	case TYPE_PTR:
+	    rc = readSingleImageICOPTR(fp, xorMasks, andMasks, widths,
+				       heights);
+	    break;
+	case TYPE_ICO_COLOR:
+	case TYPE_PTR_COLOR:
+	    rc = readSingleImageColorICOPTR(fp, argbs, xorMasks, andMasks,
+					    widths, heights);
+	    break;
+	}
+	break;
+    default:
+	rc = 1000;
+    }
+    fclose(fp);
+
+
+  
+    /*
+     * At this point, everything's been read.  Display status messages based
+     * on the return values.
+     */
+    switch (rc) {
+    case 1000:
+    case 1006:
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: File is not a valid bitmap file\n", proc );
+      break;
+    case 1001:
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: Illegal information in an image\n", proc );
+      break;
+    case 1002:
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: Legal information that I can't handle yet in an image\n", proc );
+      break;
+    case 1003:
+    case 1004:
+    case 1005:
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: Ran out of memory\n", proc );
+      break;
+    case 0:
+      if ( get_static_verbose_bmp() > 1 ) 
+	fprintf( stderr, "%s: Got good data from file, writing results\n", proc );
+      break;
+    default:
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: Error reading file rc=%d\n", proc,rc );
+      break;
+    }
+
+    /*
+     * If the return value wasn't 0, something went wrong.
+     */
+    if (rc != 0)
+    {
+	if (rc != 1000 && rc != 1005)
+	{
+	    for (i=0; i<numImages; i++)
+	    {
+		if (argbs[i] != NULL)
+		    free(argbs[i]);
+		if (andMasks[i] != NULL)
+		    free(andMasks[i]);
+		if (xorMasks[i] != NULL)
+		    free(xorMasks[i]);
+	    }
+	    free(argbs);
+	    free(andMasks);
+	    free(xorMasks);
+	    free(widths);
+	    free(heights);
+	}
+	return( (void*)NULL );
+    }
+    
+    
+    /*
+     * Dump the images.
+     */
+    if ( get_static_verbose_bmp() > 1 ) 
+      fprintf (stderr, "%s: There are %d images in the file\n", proc, numImages);
+
+    if ( numImages >= 2 ) 
+      fprintf (stderr, "%s: read only first image among %d\n", proc, numImages );
+    
+    /*
+     * my stuff:
+     * just reading one bmp image
+     */
+    if ( (numImages > 0) &&
+	 (argbs[0] != NULL) ) {
+
+      buf = (void*)malloc( widths[0]*heights[0]*3 * sizeof( unsigned char ) );
+      if ( buf == (void*)NULL ) {
+	if ( get_static_verbose_bmp() ) 
+	  fprintf( stderr, "%s: error in allocating data buffer for %s\n", proc, name );
+
+	for (i=0; i<numImages; i++) {
+	  if (argbs[i] != NULL)
+	    free(argbs[i]);
+	  if (andMasks[i] != NULL)
+	    free(andMasks[i]);
+	  if (xorMasks[i] != NULL)
+	    free(xorMasks[i]);
+	}
+	free(argbs);
+	free(andMasks);
+	free(xorMasks);
+	free(widths);
+	free(heights);
+
+	return( (void*)NULL );
+      }
+
+      myBuf = (unsigned char*)buf;
+      i = 0;
+      for (row = 0; row < heights[0]; row++)
+      for (col = 0; col < widths[0]; col++,i+=3) {
+	myBuf[i  ] = argbs[0][row * widths[0] + col].red;
+	myBuf[i+1] = argbs[0][row * widths[0] + col].green;
+	myBuf[i+2] = argbs[0][row * widths[0] + col].blue;
+      }
+      
+      *dimx = widths[0];
+      *dimy = heights[0];
+      *dimz = 3;
+
+    } else {
+      if ( get_static_verbose_bmp() ) 
+	fprintf( stderr, "%s: no image or null image\n", proc );
+      
+      for (i=0; i<numImages; i++) {
+	if (argbs[i] != NULL)
+	  free(argbs[i]);
+	if (andMasks[i] != NULL)
+	  free(andMasks[i]);
+	if (xorMasks[i] != NULL)
+	  free(xorMasks[i]);
+      }
+      free(argbs);
+      free(andMasks);
+      free(xorMasks);
+      free(widths);
+      free(heights);
+      
+      return( (void*)NULL );
+    }
+
+
+
+    for (i=0; i<numImages; i++) {
+      if (argbs[i] != NULL)
+	free(argbs[i]);
+      if (andMasks[i] != NULL)
+	free(andMasks[i]);
+      if (xorMasks[i] != NULL)
+	free(xorMasks[i]);
+    }
+    free(argbs);
+    free(andMasks);
+    free(xorMasks);
+    free(widths);
+    free(heights);
+    
+    return( buf );
+
+
+
+
+
+#if 0
+    /*
+     * old stuff from test.c
+     */
+
+    for (i=0; i<numImages; i++)
+    {
+	/*
+	 * Loop through all the images that were returned.
+	 */
+      if ( get_static_verbose_bmp() ) {
+	fprintf (stderr, "%s: Doing image number %d\n\n", proc, i+1);
+	fprintf (stderr, "%s: Image dimensions: (%ld,%ld)\n", proc, widths[i], heights[i]);
+      }
+
+      if (argbs[i] != NULL) {
+	/*
+	 * If the image has colors, dump them (BMP, color ICO and color
+	 * PTR files
+	 */
+	fprintf(stderr, "Colors");
+	for (row = 0; row < heights[i]; row++)
+	  {
+	    fprintf (stderr, "\n\nRow %ld pixels (R,G,B), hex values:\n",
+		     row);
+	    for (col = 0; col < widths[i]; col++)
+	      {
+		fprintf (stderr, "(%2.2x,%2.2x,%2.2x)",
+			 argbs[i][row * widths[i] + col].red,
+			 argbs[i][row * widths[i] + col].green,
+			 argbs[i][row * widths[i] + col].blue);
+	      }
+	  }
+      } else {
+	/*
+	 * If there image has no colors, say so.  (monochrome ICO and PTR
+	 * files) 
+	 */
+	fprintf (stderr, "No color image\n");
+      }
+
+
+      
+      if (xorMasks[i] != NULL) {
+	/*
+	 * If the image has an xor mask, dump it.  (ICO and PTR files)
+	 */
+	fprintf (stderr, "\nXOR mask\n");
+	for (row = 0; row < heights[i]; row++)
+	  {
+	    for (col = 0; col < widths[i]; col++)
+	      {
+		fprintf (stderr, "%c",
+			 xorMasks[i][row * widths[i] + col] ? '@' : '.');
+	      }
+	    fprintf (stderr, "\n");
+	  }
+      } else {
+	/*
+	 * If the image has no xor mask, say so.  (BMP files).
+	 */
+	fprintf (stderr, "No xor mask\n");
+      }
+      
+
+
+      if (andMasks[i] != NULL) {
+	/*
+	 * If the image has an and mask, dump it.  (ICO and PTR files)
+	 */
+	fprintf (stderr, "\nAND mask\n");
+	for (row = 0; row < heights[i]; row++)
+	  {
+	    for (col = 0; col < widths[i]; col++)
+	      {
+		fprintf (stderr, "%c",
+			 andMasks[i][row * widths[i] + col] ? '@' : '.');
+	      }
+	    fprintf (stderr, "\n");
+	  }
+      } else {
+	/*
+	 * If the image has noand mask, say so.  (BMP files)
+	 */
+	fprintf (stderr, "No and mask\n");
+      }
+      
+
+      if (i != numImages-1)
+	fprintf (stderr, "\n------------------------------------------\n\n");
+      
+    }
+    
+    /*
+     * Dumping is complete.  Free all the arrays and quit
+     */
+    for (i=0; i<numImages; i++)
+    {
+	if (argbs[i] != NULL)
+	    free(argbs[i]);
+	if (andMasks[i] != NULL)
+	    free(andMasks[i]);
+	if (xorMasks[i] != NULL)
+	    free(xorMasks[i]);
+    }
+    free(argbs);
+    free(andMasks);
+    free(xorMasks);
+    free(widths);
+    free(heights);
+    
+    return( buf );
+#endif
+}
+
+CGAL_INLINE_FUNCTION
+void IoBmp_verbose ( )
+{
+  if ( get_static_verbose_bmp() <= 0 )
+    get_static_verbose_bmp() = 1;
+  else 
+    get_static_verbose_bmp() += 1;
+}
+
+CGAL_INLINE_FUNCTION
+void IoBmp_noverbose ( )
+{
+  get_static_verbose_bmp() = 0;
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.cpp
new file mode 100644
index 0000000..f252541
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "bmpendian.h"
+#include "bmpendian_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.h
new file mode 100644
index 0000000..fa09c65
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian.h
@@ -0,0 +1,80 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*
+ * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
+ * author Dr. Dobb's
+ */
+
+/*
+ * This is the header for endian.c - functions to read/write our
+ * CGAL_INT8, CGAL_INT16 and CGAL_INT32 types from/to a little-endian file.
+ */
+
+#ifndef __ENDIAN_H_INCLUDED__
+#define __ENDIAN_H_INCLUDED__
+
+#include <cstdio>
+#include "bmptypes.h"
+#include <cstdio>
+
+/*
+ * Read the basic types as little-endian values.  The return value will be
+ * zero if successful, EOF, otherwise.
+ */
+extern int readINT8little(FILE *f, CGAL_INT8 *i);
+extern int readINT16little(FILE *f, CGAL_INT16 *i);
+extern int readINT32little(FILE *f, CGAL_INT32 *i);
+extern int readUINT8little(FILE *f, CGAL_UINT8 *i);
+extern int readUINT16little(FILE *f, CGAL_UINT16 *i);
+extern int readUINT32little(FILE *f, CGAL_UINT32 *i);
+
+/*
+ * Write the basic types as little-endian values.  The return value will be
+ * zero if successful, EOF otherwise.
+ */
+int writeINT8little(FILE *f, CGAL_INT8 i);
+int writeINT16little(FILE *f, CGAL_INT16 i);
+int writeINT32little(FILE *f, CGAL_INT32 i);
+int writeUINT8little(FILE *f, CGAL_UINT8 i);
+int writeUINT16little(FILE *f, CGAL_UINT16 i);
+int writeUINT32little(FILE *f, CGAL_UINT32 i);
+
+#ifdef CGAL_HEADER_ONLY
+#include "bmpendian_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif  /* __ENDIAN_H_INCLUDED__ */
+
+
+/*
+ * Formatting information for emacs in c-mode
+ *
+ * Local Variables:
+ * c-indent-level:4
+ * c-continued-statement-offset:4
+ * c-brace-offset:-4
+ * c-brace-imaginary-offset:0
+ * c-argdecl-indent:4
+ * c-label-offset:-4
+ * End:
+ */
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian_impl.h
new file mode 100644
index 0000000..8686a18
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpendian_impl.h
@@ -0,0 +1,257 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+/*
+ * These functions read and write our basic integer types from a little-endian
+ * file.  The endian and word-size of the host machine will not affect this
+ * code.  The only assumption made is that the C data type (char) is one byte
+ * long.  This should be a safe assumption.
+ */
+
+#include <stdio.h>
+#include "bmptypes.h"
+
+/*****************************************************************************
+*
+* Read functions.  All read functions take an open file pointer as the first
+* parameter and a pointer to data as the second parameter.  The return value
+* will be 0 on success, and EOF on failure.  If successful, the second
+* parameter will point to the data read.
+*/
+
+/*
+ * The CGAL_INT8 and CGAL_UINT8 types are stored as a single byte on disk.  The INT8
+ * type is a signed integer with range (-128..127).  The CGAL_UINT8 type is an
+ * unsigned integer with range (0..255).
+ */
+CGAL_INLINE_FUNCTION
+int readINT8little(FILE *f, CGAL_INT8 *i)
+{
+    int rc;
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    *i = (rc & 0xff);
+    return 0;
+}
+
+CGAL_INLINE_FUNCTION
+int readUINT8little(FILE *f, CGAL_UINT8 *i)
+{
+    int  rc;
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    *i = (rc & 0xff);
+    return 0;
+}
+
+
+/*
+ * The CGAL_INT16 and CGAL_UINT16 types are stored as two bytes on disk.  The INT16 type
+ * is a signed integer with range (-32768..32767).  The CGAL_UINT16 type is an
+ * unisgned integer with range (0..65535).
+ */
+CGAL_INLINE_FUNCTION
+int readINT16little(FILE *f, CGAL_INT16 *i)
+{
+    int rc;
+    CGAL_INT16 temp = 0;
+    
+    temp = (fgetc(f) & 0xff);
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    temp |= ((rc & 0xff) << 8);
+    *i = temp;
+    return 0;
+}
+
+CGAL_INLINE_FUNCTION
+int readUINT16little(FILE *f, CGAL_UINT16 *i)
+{
+    int rc;
+    CGAL_UINT16 temp = 0;
+    
+    temp = (fgetc(f) & 0xff);
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    temp |= ((rc & 0xff) << 8);
+    *i = temp;
+    return 0;
+}
+
+/*
+ * The CGAL_INT32 and CGAL_UINT32 types are stored as four bytes on disk.  The INT32
+ * type is a signed integer with range (-2147483648..2147483647).  The CGAL_UINT32
+ * type is an unisgned integer with range (0..4294967295).
+ */
+CGAL_INLINE_FUNCTION
+int readINT32little(FILE *f, CGAL_INT32 *i)
+{
+    int rc;
+    CGAL_INT32 temp = 0;
+    
+    temp = ((long)fgetc(f) & 0xff);
+    temp |= (((long)fgetc(f) & 0xff) << 8);
+    temp |= (((long)fgetc(f) & 0xff) << 16);
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    temp |= (((long)rc & 0xff) << 24);
+    *i = temp;
+    return 0;
+}
+
+CGAL_INLINE_FUNCTION
+int readUINT32little(FILE *f, CGAL_UINT32 *i)
+{
+    int rc;
+    CGAL_UINT32 temp = 0;
+    
+    temp = ((long)fgetc(f) & 0xff);
+    temp |= (((long)fgetc(f) & 0xff) << 8);
+    temp |= (((long)fgetc(f) & 0xff) << 16);
+    
+    rc = fgetc(f);
+    if (rc == EOF)
+	return rc;
+    
+    temp |= (((long)rc & 0xff) << 24);
+    *i = temp;
+    return 0;
+}
+
+/*****************************************************************************
+*
+* Write functions.  All write functions take an open file pointer as the first
+* parameter and a data as the second parameter.  The return value will be 0 on
+* success, and EOF on failure.  If successful, the second parameter will have
+* been written to the open file.
+*/
+
+CGAL_INLINE_FUNCTION
+int writeINT8little(FILE *f, CGAL_INT8 i)
+{
+    return fputc(i, f);
+}
+
+CGAL_INLINE_FUNCTION
+int writeUINT8little(FILE *f, CGAL_UINT8 i)
+{
+    return fputc(i, f);
+}
+
+CGAL_INLINE_FUNCTION
+int writeINT16little(FILE *f, CGAL_INT16 i)
+{
+    int rc;
+    
+    rc = fputc((i & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    return fputc(((i >> 8) & 0xff), f);
+}
+
+CGAL_INLINE_FUNCTION
+int writeUINT16little(FILE *f, CGAL_UINT16 i)
+{
+    int rc;
+    
+    rc = fputc((i & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    return fputc(((i >> 8) & 0xff), f);
+}
+
+CGAL_INLINE_FUNCTION
+int writeINT32little(FILE *f, CGAL_INT32 i)
+{
+    int rc;
+    
+    rc = fputc((i & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    rc = fputc(((i >> 8) & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    rc = fputc(((i >> 16) & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    return fputc(((i >> 24) & 0xff), f);
+}
+
+
+CGAL_INLINE_FUNCTION
+int writeUINT32little(FILE *f, CGAL_UINT32 i)
+{
+    int rc;
+    
+    rc = fputc((i & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    rc = fputc(((i >> 8) & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    rc = fputc(((i >> 16) & 0xff), f);
+    if (rc == EOF)
+	return rc;
+    
+    return fputc(((i >> 24) & 0xff), f);
+}
+
+/*
+ * Formatting information for emacs in c-mode
+ *
+ * Local Variables:
+ * c-indent-level:4
+ * c-continued-statement-offset:4
+ * c-brace-offset:-4
+ * c-brace-imaginary-offset:0
+ * c-argdecl-indent:4
+ * c-label-offset:-4
+ * End:
+ */
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.cpp
new file mode 100644
index 0000000..6e77cb0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "bmpread.h"
+#include "bmpread_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.h
new file mode 100644
index 0000000..90208bb
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread.h
@@ -0,0 +1,87 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*
+ * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
+ * author Dr. Dobb's
+ */
+
+/*
+ * This is the header for readbmp.c - functions to read the bitmap file
+ * structures.  See readbmp.c for details.
+ */
+
+#ifndef __READBMP_H_INCLUDED__
+#define __READBMP_H_INCLUDED__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "bmptypes.h"
+#include "bmpendian.h"
+
+/*
+ * Mid-level functions
+ */
+int readBitmapFileHeader(FILE *fp, Bitmapfileheader *bfh);
+int readBitmapArrayHeader(FILE *fp, BITMAPARRAYHEADER *bah);
+int readBitmapHeader(FILE *fp, BITMAPHEADER *bh);
+int readRgb(FILE *fp, RGB *rgb, int numBytes);
+int readColorTable(FILE *fp, RGB *rgb, int numEntries, int numBytesPerEntry);
+
+int readBitsUncompressed(FILE *fp, RGB *image, int width, int height,
+			 int depth, RGB* colorTable);
+int readMaskBitsUncompressed(FILE *fp, char *image, int width, int height);
+
+void reflectYRGB(RGB *image, int width, int height);
+void reflectYchar(char *image, int width, int height);
+
+/*
+ * High level functions.
+ */
+int readSingleImageBMP(FILE *fp, RGB **argb, CGAL_UINT32 *width, CGAL_UINT32 *height);
+int readSingleImageICOPTR(FILE *fp, char **xorMask, char **andMask,
+		          CGAL_UINT32 *width, CGAL_UINT32 *height);
+int readSingleImageColorICOPTR(FILE *fp, RGB **argb, char **xorMask,
+			       char **andMask, CGAL_UINT32 *width, CGAL_UINT32 *height);
+int readMultipleImage(FILE *fp, RGB ***argbs, char ***xorMasks,
+		      char ***andMasks, CGAL_UINT32 **widths, CGAL_UINT32 **heights,
+		      int *imageCount);
+
+#ifdef CGAL_HEADER_ONLY
+#include "bmpread_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
+
+/*
+ * Formatting information for emacs in c-mode
+ *
+ * Local Variables:
+ * c-indent-level:4
+ * c-continued-statement-offset:4
+ * c-brace-offset:-4
+ * c-brace-imaginary-offset:0
+ * c-argdecl-indent:4
+ * c-label-offset:-4
+ * End:
+ */
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread_impl.h
new file mode 100644
index 0000000..3bea18c
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmpread_impl.h
@@ -0,0 +1,1237 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*
+ * from bmp.zip, see the url http://www.ddj.com/ftp/1995/1995.03/
+ * author Dr. Dobb's
+ */
+
+/*
+ * This file contains mid-level functions for reading bitmap structures and
+ * high-level functions that read bitmap files.
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+/*****************************************************************************
+ *
+ * Mid-level functions.
+ *
+ * These functions read in the various structures defined in bmptypes.h.  Each
+ * function assumes that the file pointer is positioned at the start of the
+ * given structure.  Upon completion, each function will leave the file
+ * pointer positioned on the byte immediately following the structure.  Return
+ * values will be 0 for success and non-zero for failure.  In all cases, a
+ * return value of non-zero means that the file position has been left in an
+ * indeterminate state and further reading should not be attempted.
+ */
+
+/*
+ * Read a Bitmapfileheader structure.
+ */
+CGAL_INLINE_FUNCTION
+int readBitmapFileHeader(FILE *fp, Bitmapfileheader *bfh)
+{
+    int rc;
+  
+    rc = readUINT16little(fp, &(bfh->type));
+    if (rc != 0)
+	return rc;
+    
+    rc = readUINT32little(fp, &(bfh->size));
+    if (rc != 0)
+	return rc;
+    
+    rc = readINT16little(fp, &(bfh->xHotspot));
+    if (rc != 0)
+	return rc;
+    
+    rc = readINT16little(fp, &(bfh->yHotspot));
+    if (rc != 0)
+	return rc;
+    
+    rc = readUINT32little(fp, &(bfh->offsetToBits));
+    return rc;
+}
+
+/*
+ * Read a BITMAPARRAYHEADER
+ */
+CGAL_INLINE_FUNCTION
+int readBitmapArrayHeader(FILE *fp, BITMAPARRAYHEADER *bah)
+{
+    int rc;
+    
+    rc = readUINT16little(fp, &(bah->type));
+    if (rc != 0)
+	return rc;
+    rc = readUINT32little(fp, &(bah->size));
+    if (rc != 0)
+	return rc;
+    rc = readUINT32little(fp, &(bah->next));
+    if (rc != 0)
+	return rc;
+    rc = readUINT16little(fp, &(bah->screenWidth));
+    if (rc != 0)
+	return rc;
+    rc = readUINT16little(fp, &(bah->screenHeight));
+    return rc;
+}
+
+/*
+ * Read the BITMAPHEADER structure.  This one requires a bit of sanity
+ * checking.  The length of the structure on the disk is specified in the
+ * first field.  We must stop reading after that many bytes, and if that value
+ * is longer than sizeof(BITMAPHEADER), we must skip over any leftover bytes.
+ * Finally, if size is 12, then width an height are really 16-bit values, and
+ * we have to read them differently so they'll be properly stored in the
+ * 32-bit fields BITMAPHEADER uses.
+ */
+CGAL_INLINE_FUNCTION
+int readBitmapHeader(FILE *fp, BITMAPHEADER *bh)
+{
+    int    rc, oldFormat;
+	unsigned int bytesRead;
+    CGAL_UINT16 tempVal;
+    
+    /*
+     * Clear the structure.  Default values for all fields are zeros.  This
+     * will prevent garbage from being returned if the structure is truncated
+     * on disk.
+     */
+    memset(bh, 0, sizeof(BITMAPHEADER));
+    
+    /*
+     * Read the size of the structure.  From here on in, we'll have to be sure
+     * we don't read more bytes than this value.
+     */
+    rc = readUINT32little(fp, &(bh->size));
+    if (rc != 0)
+	return rc;
+    bytesRead = 4;
+    
+    /*
+     * If the size is 12 bytes or less, than this is an "old format"
+     * structure.  So the width and height fields will have to be read
+     * differently.
+     */
+    if (bh->size <= 12)
+	oldFormat = 1;
+    else
+	oldFormat = 0;
+    
+    /*
+     * Width and height are read differently for old and new format files.  In
+     * the old format, they're 16-bit values.  In the new format, they're
+     * 32-bits long.
+     */
+    if (oldFormat)
+    {
+	rc = readUINT16little(fp, &tempVal);
+	if (rc != 0)
+	    return rc;
+	bh->width = tempVal;
+	bytesRead += 2;
+    }
+    else
+    {
+	rc = readINT32little(fp, &(bh->width));
+	if (rc != 0)
+	    return rc;
+	bytesRead += 4;
+    }
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    if (oldFormat)
+    {
+	rc = readUINT16little(fp, &tempVal);
+	if (rc != 0)
+	    return rc;
+	bh->height = tempVal;
+	bytesRead += 2;
+    }
+    else
+    {
+	rc = readINT32little(fp, &(bh->height));
+	if (rc != 0)
+	    return rc;
+	bytesRead += 4;
+    }
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    /*
+     * From this point on, old and new formats are identical to each other,
+     * and we can proceed as if there was no difference.  For each field, we
+     * read it in and increment the count of bytes read.  If at any time we
+     * have read the amount we got earlier (in the size field), then stop and
+     * leave the rest of the fields as zeros.
+     */
+    rc = readUINT16little(fp, &(bh->numBitPlanes));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT16little(fp, &(bh->numBitsPerPlane));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+  
+    /*
+     * Old format stop here.  But we don't have to check, because in that
+     * format, 12 bytes have been read and the function will have exited 
+     * without any extra checking.
+     */
+    rc = readUINT32little(fp, &(bh->compressionScheme));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->sizeOfImageData));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->xResolution));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->yResolution));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->numColorsUsed));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->numImportantColors));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT16little(fp, &(bh->resolutionUnits));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT16little(fp, &(bh->padding));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT16little(fp, &(bh->origin));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT16little(fp, &(bh->halftoning));
+    if (rc != 0)
+	return rc;
+    bytesRead += 2;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->halftoningParam1));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->halftoningParam2));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+  
+    rc = readUINT32little(fp, &(bh->colorEncoding));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    rc = readUINT32little(fp, &(bh->identifier));
+    if (rc != 0)
+	return rc;
+    bytesRead += 4;
+    if (bytesRead >= bh->size)
+	return 0;
+    
+    /*
+     * If there are more bytes in the file than this, then the file is using a
+     * future format that doesn't exist yet.  Skip over the bytes.  Assuming
+     * this future format somewhat resembles what we know now, ignoring the
+     * fields will be safe.  We _MUST_ skip them, though, since the color
+     * table begins on the byte after this structure, and we have to position
+     * the file pointer there.
+     */
+    return fseek(fp, (bh->size - bytesRead), SEEK_CUR);
+}
+
+
+/*
+ * readRgb reads in a single RGB structure from the disk.  The numBytes field
+ * indicates how many bytes the field occupies on the disk.  It assumes that
+ * each component is one byte on disk and the rest is padding.  This will
+ * compensate for the old/new differences in color tables.  (Old format
+ * bitmaps use 3 bytes per entry, while new format bitmaps use 4.)  Note how
+ * it will never read more than the number of bytes requested.
+ */
+CGAL_INLINE_FUNCTION
+int readRgb(FILE *fp, RGB *rgb, int numBytes)
+{
+    int rc;
+    
+    if (numBytes == 0)
+	return 0;
+    rc = readUINT8little(fp, &(rgb->blue));
+    if (rc != 0)
+	return rc;
+    
+    if (numBytes == 1)
+	return 0;
+    rc = readUINT8little(fp, &(rgb->green));
+    if (rc != 0)
+	return rc;
+    
+    if (numBytes == 2)
+	return 0;
+    rc = readUINT8little(fp, &(rgb->red));
+    if (rc != 0)
+	return rc;
+    
+    if (numBytes == 3)
+	return 0;
+    
+    /* Skip over extra bytes if more than three were requested */
+    return fseek(fp, (numBytes - 3), SEEK_CUR);
+}
+
+/*
+ * A color table is a block of RGB structures, all the same size.  Read it by
+ * calling readRgb repeatedly.
+ */
+CGAL_INLINE_FUNCTION
+int readColorTable(FILE *fp, RGB *rgb, int numEntries, int numBytesPerEntry)
+{
+    int i, rc;
+    
+    for (i=0; i<numEntries; i++)
+    {
+	rc = readRgb(fp, &(rgb[i]), numBytesPerEntry);
+	if (rc != 0)
+	    return rc;
+    }
+    return 0;
+}
+
+
+/*
+ * ReadBitsUncompressed.  Reads pixel values into an array of RGB
+ * values.  It assmes that there is no compression.  Note that there we're
+ * only handling bit depths of 1, 4, 8, 16, and 24. Note that OS/2 bitmaps
+ * can (in theory) have any number of bits per pixel, so you might find a
+ * strange bitmap file that this can't handle, but the chances of finding such
+ * a file this are nearly zero.
+ *
+ * Each row of pixels is always padded to a 4-byte boundary.
+ */
+CGAL_INLINE_FUNCTION
+int readBitsUncompressed(FILE *fp, RGB *image, int width, int height,
+			 int depth, RGB *colorTable)
+{
+    CGAL_UINT8 temp;
+    int   rc, padBytes, i;
+    long  row, column, pixel, value;
+    
+    switch (depth) {
+    case 1:
+	/*
+	 * For 1 bit per pixel, each byte is 8 pixels.  Each one is an index
+	 * into the color table (1 or 0).  Most significant byte first.  All
+	 * is padded to 32-bit boundaries as well.
+	 */
+	pixel = 0;
+	if (((width % 32) == 0) || ((width % 32) > 24))
+	    padBytes = 0;
+	else if ((width % 32) <= 8)
+	    padBytes = 3;
+	else if ((width % 32) <= 16)
+	    padBytes = 2;
+	else
+	    padBytes = 1;
+
+	for (row = height; row > 0; row--)
+	{
+	    for (column = width; column > 0; column -= 8)
+	    {
+		rc = readUINT8little(fp, &temp);
+		if (rc != 0)
+		    return rc;
+		for (i=0; i < ((column < 8) ? column : 8); i++)
+		{
+		    /*
+		     * For each byte read, bit-decompose it.  Note that the
+		     * last byte on a row could have less than 8 bits used.
+		     * Most significant bits come first.
+		     */
+		    value = ((temp & (1 << (7-i))) == 0) ? 0 : 1;
+		    image[pixel].red   = colorTable[value].red;
+		    image[pixel].green = colorTable[value].green;
+		    image[pixel].blue  = colorTable[value].blue;
+		    pixel++;
+		}
+	    }
+	    if (padBytes != 0)
+	    {
+		rc = fseek(fp, padBytes, SEEK_CUR);
+		if (rc != 0)
+		    return rc;
+	    }
+	}
+	break;
+
+    case 4:
+	/*
+	 * For 4 bits per pixel, each byte is two pixels.  The upper half go to
+	 * the first pixel, and the lower half to the second.
+	 */
+	pixel = 0;
+	if (((width % 8) == 0) || ((width % 8) > 6))
+	    padBytes = 0;
+	else if ((width % 8) <= 2)
+	    padBytes = 3;
+	else if ((width % 8) <= 4)
+	    padBytes = 2;
+	else
+	    padBytes = 1;
+	
+	for (row = height; row > 0; row--)
+	{
+	    for (column = width; column > 0; column -= 2)
+	    {
+		/*
+		 * Each byte here is two pixels.  Note that the last byte on a
+		 * row may only contain one pixel.
+		 */
+		rc = readUINT8little(fp, &temp);
+		if (rc != 0)
+		    return rc;
+		/*
+		 * First pixel is the upper 4 bits
+		 */
+		value = temp >> 4;
+		image[pixel].red   = colorTable[value].red;
+		image[pixel].green = colorTable[value].green;
+		image[pixel].blue  = colorTable[value].blue;
+		pixel++;
+
+		/*
+		 * Second pixel is lower 4 bits.  If this is the last byte in
+		 * the row, and there are an odd number of pixels per row, then
+		 * this is not valid data.
+		 */
+		if (column == 1)
+		{
+		    value = temp & 0x0f;
+		    image[pixel].red   = colorTable[value].red;
+		    image[pixel].green = colorTable[value].green;
+		    image[pixel].blue  = colorTable[value].blue;
+		    pixel++;
+		}
+	    }
+	    if (padBytes != 0)
+	    {
+		rc = fseek(fp, padBytes, SEEK_CUR);
+		if (rc != 0)
+		    return rc;
+	    }
+	}
+	break;
+
+    case 8:
+	/*
+	 * For 8 bits per pixel, each byte is one pixel.
+	 */
+	pixel = 0;
+	padBytes = ((width % 4) == 0) ? 0 : (4 - (width % 4));
+
+	for (row=height; row > 0; row--)
+	{
+	    for (column=width; column > 0; column--)
+	    {
+		rc = readUINT8little(fp, &temp);
+		if (rc != 0)
+		    return rc;
+		image[pixel].red   = colorTable[temp].red;
+		image[pixel].green = colorTable[temp].green;
+		image[pixel].blue  = colorTable[temp].blue;
+		pixel++;
+	    }
+	    if (padBytes != 0)
+	    {
+		rc = fseek(fp, padBytes, SEEK_CUR);
+		if (rc != 0)
+		    return rc;
+	    }
+	}
+	break;
+
+    case 16:
+	/*
+	 * For 16 bits per pixel, you must read two bytes per pixel.  But
+	 * there's a catch. The data is big endian!  This is because all pixel
+	 * data (for all formats, actually) is stored as a packed array,
+	 * stored in pixel order.
+	 */
+	pixel = 0;
+	padBytes = ((width % 2) == 0) ? 0 : 2;
+	for (row=height; row > 0; row--)
+	{
+	    for (column=width; column > 0; column--)
+	    {
+		/*
+		 * Read a 16-bit integer as big endian.  Do this by reading
+		 * two bytes and mathematically combine them.  After that,
+		 * proceed as usual.
+		 */
+		rc = readUINT8little(fp, &temp);
+		if (rc != 0)
+		    return rc;
+		value = ((long)temp) << 8;
+		rc = readUINT8little(fp, &temp);
+		if (rc != 0)
+		    return rc;
+		value |= temp;
+
+		image[pixel].red   = colorTable[value].red;
+		image[pixel].green = colorTable[value].green;
+		image[pixel].blue  = colorTable[value].blue;
+		pixel++;
+	    }
+	    if (padBytes != 0)
+	    {
+		rc = fseek(fp, padBytes, SEEK_CUR);
+		if (rc != 0)
+		    return rc;
+	    }
+	}
+	break;
+
+    case 24:
+	/*
+	 * For 24 bits per pixel, it's an RGB structure.  Note that the color
+	 * table is ignore for bit depths greater than 24 bits.
+	 */
+	pixel = 0;
+	padBytes = width % 4;
+
+	for (row=height; row > 0; row--)
+	{
+	    for (column=width; column > 0; column--)
+	    {
+		rc = readRgb(fp, image+pixel, 3);
+		pixel++;
+	    }
+	    if (padBytes != 0)
+	    {
+		rc = fseek(fp, padBytes, SEEK_CUR);
+		if (rc != 0)
+		    return rc;
+	    }
+	}          
+	break;
+    }
+    
+    return 0;
+}
+
+
+/*
+ * ReadMaskBitsUncompressed.  Reads a monochrome mask into an array of
+ * characters.  It assmes that there is no compression.  This is very similar
+ * (internally) to the readBitsUncompressed function.  Note that if the data
+ * read isn't really one-bit-deep data, you'll probably get garbage back.
+ */
+CGAL_INLINE_FUNCTION
+int readMaskBitsUncompressed(FILE *fp, char *image, int width, int height)
+{
+    CGAL_UINT8 temp;
+    int   rc, padBytes, i;
+    long  row, column, pixel;
+    char value;
+    
+    /*
+     * see the one-bit-depth part of readBitsUncompressed for comments
+     */
+    pixel = 0;
+    if (((width % 32) == 0) || ((width % 32) > 24))
+	padBytes = 0;
+    else if ((width % 32) <= 8)
+	padBytes = 3;
+    else if ((width % 32) <= 16)
+	padBytes = 2;
+    else
+	padBytes = 1;
+
+    for (row = height; row > 0; row--)
+    {
+	for (column = width; column > 0; column -= 8)
+	{
+	    rc = readUINT8little(fp, &temp);
+	    if (rc != 0)
+		return rc;
+	    for (i=0; i < ((column < 8) ? column : 8); i++)
+	    {
+		value = ((temp & (1 << (7-i))) == 0) ? 0 : 1;
+		image[pixel] = value;
+		pixel++;
+	    }
+	}
+	if (padBytes != 0)
+	{
+	    rc = fseek(fp, padBytes, SEEK_CUR);
+	    if (rc != 0)
+		return rc;
+	}
+    }
+
+    return 0;
+}
+
+
+/*
+ * reflectYRGB takes an array of RGB vales and the dimensions they represent
+ * and flips it vertically.  This will convert a bottom-left origin array to a
+ * top-left origin array.
+ */
+CGAL_INLINE_FUNCTION
+void reflectYRGB(RGB *image, int width, int height)
+{
+    int row, col;
+    RGB temp;
+    
+    for (row = 0; row < (height / 2); row++)
+    {
+	for (col = 0; col < width; col++)
+	{
+	    /* Swap pixels at (x,y) with (x,height-y) */
+	    memcpy(&temp, image+(row * width + col), sizeof(RGB));
+	    memcpy(image+(row * width + col),
+		   image+((height - row - 1) * width + col), sizeof(RGB));
+	    memcpy(image+((height - row - 1) * width + col), &temp,
+		   sizeof(RGB));
+	}
+    }
+}
+/*
+ * reflectYchar takes an array of char values and the dimensions they
+ * represent and flips it vertically.  This will convert a bottom-left origin
+ * array to a top-left origin array.
+ */
+CGAL_INLINE_FUNCTION
+void reflectYchar(char *image, int width, int height)
+{
+    int row, col;
+    char temp;
+    
+    for (row = 0; row < (height / 2); row++)
+    {
+	for (col = 0; col < width; col++)
+	{
+	    /* Swap values at (x,y) with (x,height-y) */
+	    temp = image[row * width + col];
+	    image[row * width + col]=image[(height - row - 1) * width + col];
+	    image[(height - row - 1) * width + col] = temp;
+	}
+    }
+}
+
+/*****************************************************************************
+ *
+ * High-level functions
+ *
+ * These functions read in specific types of bitmap files.  Each assumes that
+ * the file pointer is positioned at the appropriate place in a bitmap file.
+ * (At the start of a Bitmapfileheader for all functions except
+ * readMultipleImages, which assumes the file pointer to be positioned on the
+ * start of a BITMAPARRAYHEADER.  These functions will leave the file pointer
+ * on the byte after the image's color table.
+ *
+ * The coordinate speaces in the returned arrays will have an upper-left
+ * origin.   As before, a non-zero return value indicates that something went
+ * wrong.
+ *
+ * Note that the BMP and mono-ICO functions will not return 1000 if the image
+ * is of type color-icon.  This is because a color icon consists of a bitmap
+ * and a monochrome icon.
+ *
+ * return values:
+ *	   0 - success
+ *	1000 - incorrect file type for the routine called
+ *	1001 - image data out of range or damaged file
+ *	1002 - good data, but the routine called can't handle it (yet)
+ *	1003 - out of memory allocating color table
+ *	1004 - out of memory allocating image
+ *	1005 - out of memory allocating image arrays
+ *	1006 - Illegal image type in a multi-image array
+ *
+ *     other - I/O error of some kind
+ */
+
+
+/*
+ * readSingleImageBMP will read a single BMP image and generate an array of RGB
+ * triples that contain the RGB values for every pixel.  It will also return
+ * the dimensions of the image.
+ */
+CGAL_INLINE_FUNCTION
+int readSingleImageBMP(FILE *fp, RGB **argb, CGAL_UINT32 *width, CGAL_UINT32 *height)
+{
+    Bitmapfileheader  bfh;
+    BITMAPHEADER      bh;
+    RGB              *colorTable = (RGB*)NULL;
+    RGB              *image = (RGB*)NULL;
+    int               rc, depth, inverted;
+    long              numColors, numPixels, endPos;
+    
+    /*
+     * First, get the file header and sanity check it.  The type field must be
+     * TYPE_BMP or we're aborting.
+     */
+    rc = readBitmapFileHeader(fp, &bfh);
+    if (rc != 0)
+	return rc;
+    if ((bfh.type != TYPE_BMP) &&
+	(bfh.type != TYPE_ICO_COLOR) &&
+	(bfh.type != TYPE_PTR_COLOR))
+	return 1000;
+    
+    /*
+     * Immediately following a file header is always the bitmap header.  Read
+     * it.  Sanity check any values we might need.  Specifically, less than
+     * 32-bit depth, known compression scheme, known origin, and known color
+     * encoding, and valid height/width.  Note that negative height is OK,
+     * that indicates an upper-left origin for a Windows bitmap.
+     */
+    rc = readBitmapHeader(fp, &bh);
+    if (rc != 0)
+	return rc;
+    depth = bh.numBitPlanes * bh.numBitsPerPlane;
+    if ((depth > 32) ||
+	(bh.compressionScheme > COMPRESSION_LAST) ||
+	(bh.origin > ORIGIN_LAST) ||
+	(bh.colorEncoding > COLOR_ENCODING_LAST) ||
+	(bh.width < 1) ||
+	(bh.height == 0))
+	return 1001;
+    
+    /*
+     * If the height is negative, then this is a Windows bitmap whose origin
+     * is the upper-left corner and not the lower-left.  The inverted flag
+     * indicates a lower-left origin.  Our code will be outputting an
+     * upper-left origin pixel array.
+     */
+    if (bh.height < 0)
+    {
+	inverted = 0;
+	bh.height = -bh.height;
+    }
+    else
+	inverted = 1;
+    
+    /*
+     * Now, sanity check a few fields that are valid, but I don't have code to
+     * deal with them yet.  This includes: more than one bit plane, any
+     * compression scheme, and bit depths that are not 1, 4, 8, 16, or 24.
+     */
+    if ((bh.numBitPlanes > 1) ||
+	((bh.numBitsPerPlane != 1) &&
+	 (bh.numBitsPerPlane != 4) &&
+	 (bh.numBitsPerPlane != 8) &&
+	 (bh.numBitsPerPlane != 16) &&
+	 (bh.numBitsPerPlane != 24)) ||
+	(bh.compressionScheme != COMPRESSION_NONE))
+	return 1002;
+    
+    /*
+     * Allocate and read the color table.  The file pointer has been
+     * positioned in the right place by the readBitmapHeader function.  Note
+     * that images with 24-bits or more color depth have no color table.  They
+     * are  already RGB.  When reading the color table, be sure to check for
+     * old/new format bitmaps. 
+     */
+    if (depth < 24)
+    {
+	numColors = 1 << depth;
+	colorTable = (RGB *)calloc(numColors, sizeof(RGB));
+	if (colorTable == NULL)
+	    return 1003;
+	if (bh.size <= 12)
+	    rc = readColorTable(fp, colorTable, numColors, 3);
+	else
+	    rc = readColorTable(fp, colorTable, numColors, 4);
+	if (rc != 0)
+	{
+	    free(colorTable);
+	    return rc;
+	}
+    }
+    
+    /*
+     * We're at the end of the color table.  Preserve this position.  We'll
+     * need to leave the file pointer there before returning from this
+     * function. 
+     */
+    endPos = ftell(fp);
+
+    /*
+     * Allocate the array of pixels and fill it in.
+     */
+    numPixels = bh.width * bh.height;
+    image = (RGB *)calloc(numPixels, sizeof(RGB));
+    if (image == NULL)
+    {
+	free (colorTable);
+	return 1004;
+    }
+    
+    /*
+     * Seek to the bits
+     */
+    rc = fseek(fp, bfh.offsetToBits, SEEK_SET);
+    if (rc != 0)
+    {
+	free (colorTable);
+	free (image);
+	return rc;
+    }
+    
+    /*
+     * Read the bits.  If code for decompressing bits should be written,
+     * insert the call here.
+     */
+    switch ((int)bh.compressionScheme) {
+    case COMPRESSION_NONE:
+	rc = readBitsUncompressed(fp, image, bh.width, bh.height, depth,
+				  colorTable);
+	break;
+    }
+    
+    if (rc != 0)
+    {
+	free(image);
+	return rc;
+    }
+    
+    /*
+     * If the origin is lower-left, flip the image upside down
+     */
+    if (inverted)
+	reflectYRGB(image, bh.width, bh.height);
+
+    /*
+     * Return the output values.  Set the file pointer to the byte after the
+     * color table.
+     */
+    *argb = image;
+    *width = bh.width;
+    *height = bh.height;
+    fseek(fp, endPos, SEEK_SET);
+
+    /*
+     * Clean up and return.  Note that we don't return the color table.  This
+     * is because we're returning an array of RGB values for the image - such
+     * a table would be redundant.
+     */
+    if (colorTable != NULL)
+	free(colorTable);
+
+    return 0;
+}
+
+
+/*
+ * Read in a monochrome OS/2 icon/pointer.  return two arrays of bytes
+ * (interpreted as booleans) for the XOR and AND masks.
+ */
+CGAL_INLINE_FUNCTION
+int readSingleImageICOPTR(FILE *fp, char **xorMask, char **andMask,
+		          CGAL_UINT32 *width, CGAL_UINT32 *height) 
+{
+    Bitmapfileheader  bfh;
+    BITMAPHEADER      bh;
+    char             *mask1, *mask2;
+    int               rc;
+    long              numPixels, endPos;
+
+    /*
+     * Read and sanity check the header.  Monochrom OS/2 icons are TYPE_ICO.
+     * Monochrome pointers are TYPE_PTR.  Color ICO and PTR is also allowed,
+     * because monochrome masks are part of those images.
+     */
+    rc = readBitmapFileHeader(fp, &bfh);
+    if (rc != 0)
+	return rc;
+    if ((bfh.type != TYPE_ICO) &&
+	(bfh.type != TYPE_PTR) &&
+	(bfh.type != TYPE_ICO_COLOR) &&
+	(bfh.type != TYPE_PTR_COLOR))
+	return 1000;
+
+    /*
+     * Now read the bitmap data and sanity check it.  Since this is a
+     * monochrome icon, bit depth must be 1.  Additionally, a known
+     * compression scheme, known origin, known color encoding, and valid
+     * height/width.  Height can't be less than 0, as it can with color
+     * images, since this code is only used on for OS/2-type images.
+     */
+    rc = readBitmapHeader(fp, &bh);
+    if (rc != 0)
+	return rc;
+    if ((bh.numBitPlanes != 1) ||
+	(bh.numBitsPerPlane != 1) ||
+	(bh.compressionScheme > COMPRESSION_LAST) ||
+	(bh.origin > ORIGIN_LAST) ||
+	(bh.colorEncoding > COLOR_ENCODING_LAST) ||
+	(bh.width < 1) ||
+	(bh.height < 1))
+	return 1001;
+
+    /*
+     * Sanity check some valid fields that I can't deal with yet.
+     */
+    if (bh.compressionScheme != COMPRESSION_NONE)
+	return 1002;
+
+    /*
+     * Skip over the color table, since this is a monochrome mask.  Note that
+     * the size is already known - 2 entries - which is 6 or 8 bytes.
+     * this isn't, and we don't.
+     */
+    if (bh.size <= 12)
+	rc = fseek(fp, 6, SEEK_CUR);
+    else
+	rc = fseek(fp, 8, SEEK_CUR);
+    if (rc != 0)
+    {
+	return rc;
+    }
+
+    /*
+     * Save this file position.  we'll have to seek back to it after reading
+     * in the image data.
+     */
+    endPos = ftell(fp);
+
+    /*
+     * The image is actually two images.  The top half is an AND mask and the
+     * bottom half is an XOR mask.  Allocate the images.
+     */
+    numPixels = bh.width * bh.height / 2;
+    mask1 = (char *)malloc(numPixels);
+    if (mask1 == NULL)
+	return 1004;
+    mask2 = (char *)malloc(numPixels);
+    if (mask2 == NULL)
+    {
+	free(mask1);
+	return 1004;
+    }
+
+    /*
+     * Seek to the bit data
+     */
+    rc = fseek(fp, bfh.offsetToBits, SEEK_SET);
+    if (rc != 0)
+    {
+	free (mask1);
+	free (mask2);
+	return rc;
+    }
+
+    /*
+     * Read in the bits.  Note: since these are really two images, two calls
+     * to readMaskBitsUncompressed are made, and the height used is 1/2 the
+     * height mentioned in the header.
+     */
+    switch ((int) bh.compressionScheme) {
+    case COMPRESSION_NONE:
+	rc = readMaskBitsUncompressed(fp, mask1, bh.width, bh.height/2);
+	if (rc == 0)
+	    rc = readMaskBitsUncompressed(fp, mask2, bh.width, bh.height/2);
+	break;
+    }
+
+    if (rc != 0)
+    {
+	free (mask1);
+	free (mask2);
+	return rc;
+    }
+
+    /*
+     * A mask will never have an upper-left origin, since Windows will never
+     * produce one in a bitmap file.
+     */
+    reflectYchar(mask1, bh.width, bh.height / 2);
+    reflectYchar(mask2, bh.width, bh.height / 2);
+
+    /*
+     * Return everything we've read.
+     */
+    *xorMask = mask1;
+    *andMask = mask2;
+    *width = bh.width;
+    *height = bh.height / 2;
+    fseek(fp, endPos, SEEK_SET);
+    
+    return 0;
+}
+
+
+/*
+ * Read in a color OS/2 icon.  return an array of RGBs for the colors.
+ * and two arrays of bytes (interpreted as booleans) for the XOR and AND
+ * masks.
+ */
+CGAL_INLINE_FUNCTION
+int readSingleImageColorICOPTR(FILE *fp, RGB **argb, char **xorMask,
+			       char **andMask, CGAL_UINT32 *width, CGAL_UINT32 *height)
+{
+    CGAL_UINT32 width1, height1, width2, height2;
+    int rc;
+
+    /*
+     * Color icons consist of a monochrome icon followed by a bitmap.  This
+     * makes reading them easy - first do a monochrome mask read, and then do
+     * a color bitmap read.  We should probably add some more descriptive
+     * error codes here.
+     *
+     * First read the mask.
+     */
+    rc = readSingleImageICOPTR(fp, xorMask, andMask, &width2, &height2);
+    if (rc != 0)
+    {
+	return rc;
+    }
+
+    /*
+     * Next, read the color bitmap part
+     */
+    rc = readSingleImageBMP(fp, argb, &width1, &height1);
+    if (rc != 0)
+    {
+	return rc;
+    }
+
+    /*
+     * Now, just sanity check the image - the dimensions for the image should
+     * match the dimensions of the masks.
+     */
+    if ((width1 != width2) || (height1 != height2))
+	return 1001;
+
+    *width = width1;
+    *height = height1;
+    return 0;
+}
+
+
+/*
+ * readMultipleImage runs down the list of images in a file and returns them
+ * all.  ImageCount is the number of images in the file.  The other returned
+ * values are parallel arrays.  If an element in aargb, axorMask, or aandMask
+ * is NULL, then that image has no such array.  (Bitmaps have no xor or and
+ * masks, monochrome icons have no color arrays.
+ *
+ * Note that on errors other than 1000 and 1005, the arrays will contain good
+ * data - the images that have been read properly will be in the arrays.
+ * Images that have not yet been read will consist of NULL pointers in the
+ * arrays. 
+ */
+CGAL_INLINE_FUNCTION
+int readMultipleImage(FILE *fp, RGB ***argbs, char ***xorMasks,
+		      char ***andMasks, CGAL_UINT32 **widths, CGAL_UINT32 **heights,
+		      int *imageCount)
+{
+    int rc;
+    long filePos;
+    BITMAPARRAYHEADER bah;
+    CGAL_UINT16 imageType;
+    int count;
+    
+    /*
+     * First count the images.  Preserve the file position for later.  If some
+     * structure in the list isn't an array header, return 1000.
+     */
+    filePos = ftell(fp);
+    count = 0;
+    do
+    {
+	rc = readBitmapArrayHeader(fp, &bah);
+	if (rc != 0)
+	    return rc;
+	if (bah.type != TYPE_ARRAY)
+	    return 1000;
+	fseek(fp, bah.next, SEEK_SET);
+	count++;
+    } while (bah.next != 0);
+    fseek(fp, filePos, SEEK_SET);
+    
+    /*
+     * Allocate the arrays.  Return 1005 on any failures
+     */
+    *argbs = (RGB **)calloc(count, sizeof(RGB *));
+    if (*argbs == NULL)
+	return 1005;
+    *xorMasks = (char **)calloc(count, sizeof(char *));
+    if (*xorMasks == NULL)
+    {
+	free(*argbs);
+	return 1005;
+    }
+    *andMasks = (char **)calloc(count, sizeof(char *));
+    if (*andMasks == NULL)
+    {
+	free(*argbs);
+	free(*xorMasks);
+	return 1005;
+    }
+    *widths = (CGAL_UINT32 *)calloc(count, sizeof(CGAL_UINT32));
+    if (*widths == NULL)
+    {
+	free(*argbs);
+	free(*xorMasks);
+	free(*andMasks);
+	return 1005;
+    }
+    *heights = (CGAL_UINT32 *)calloc(count, sizeof(CGAL_UINT32));
+    if (*heights == NULL)
+    {
+	free(*argbs);
+	free(*xorMasks);
+	free(*andMasks);
+	free(*widths);
+	return 1005;
+    }
+    *imageCount = count;
+
+    /*
+     * Loop through the images again.  This time, read each image
+     */
+    count = 0;
+    do
+    {
+	rc = readBitmapArrayHeader(fp, &bah);
+	if (rc != 0)
+	    return rc;
+	/*
+	 * Get the image type.  Preserve the position, since we're reading
+	 * into the next structure.
+	 */
+	filePos = ftell(fp);
+	rc = readUINT16little(fp, &imageType);
+	if (rc != 0)
+	    return rc;
+	rc = fseek(fp, filePos, SEEK_SET);
+
+	/*
+	 * Now that we know what kind of image we're about to read, read it. 
+	 */
+	switch(imageType) {
+	case TYPE_BMP:
+	    rc = readSingleImageBMP(fp, (*argbs)+count, (*widths)+count,
+				    (*heights)+count);
+	    break;
+	case TYPE_ICO:
+	case TYPE_PTR:
+	    rc = readSingleImageICOPTR(fp, (*xorMasks)+count,
+				       (*andMasks)+count, (*widths)+count,
+				       (*heights)+count);
+	    break;
+	case TYPE_ICO_COLOR:
+	case TYPE_PTR_COLOR:
+	    rc = readSingleImageColorICOPTR(fp, (*argbs)+count,
+					    (*xorMasks)+count,
+					    (*andMasks)+count,
+					    (*widths)+count,
+					    (*heights)+count);
+	    break;
+	default:
+	    return 1006;
+	}
+	if (rc != 0)
+	    return rc;
+	
+	fseek(fp, bah.next, SEEK_SET);
+	count++;
+    } while (bah.next != 0);
+
+    return 0;
+}
+
+
+/*
+ * Formatting information for emacs in c-mode
+ *
+ * Local Variables:
+ * c-indent-level:4
+ * c-continued-statement-offset:4
+ * c-brace-offset:-4
+ * c-brace-imaginary-offset:0
+ * c-argdecl-indent:4
+ * c-label-offset:-4
+ * End:
+ */
+
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmptypes.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmptypes.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/src/CGAL_ImageIO/bmptypes.h
rename to 3rdparty/CGAL-4.8/src/CGAL_ImageIO/bmptypes.h
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.cpp
new file mode 100644
index 0000000..52e8792
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "convert.h"
+#include "convert_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.h
new file mode 100644
index 0000000..3f163f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert.h
@@ -0,0 +1,108 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * convert.h - conversion between types
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1998
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * http://www.inria.fr/epidaure/personnel/malandain/
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * ADDITIONS, CHANGES
+ *
+ */
+
+#ifndef _convert_h_
+#define _convert_h_
+
+
+
+
+
+
+
+#include <stdio.h> /* memcpy */
+#include <string.h> /* memcpy */
+#include "typedefs.h"
+
+
+
+
+
+
+/* Converts buffers from one type into another.
+ *
+ * DESCRIPTION:
+ *
+ * Conversions from types DOUBLE or FLOAT to 
+ * others types are all implemented. I hope
+ * I do not make mistakes.
+ *
+ * - When a real value is converted into an integer
+ *   one, we take the nearest integer, i.e.
+ *   (int)(real value - 0.5) for negative
+ *   numbers, and (int)(real value + 0.5) for 
+ *   positive ones.
+ *
+ * - Some conversions are not yet implemented.
+ *
+ * - When types and pointers are equal, nothing is
+ *   done.
+ */
+extern void ConvertBuffer( void *bufferIn, /* buffer to be converted */
+			   bufferType typeIn, /* type of this buffer */
+			   void *bufferOut, /* result buffer */
+			   bufferType typeOut, /* type of this buffer */
+			   int bufferLength /* buffers' length */
+			   );
+
+extern void Convert_r32_to_s8( r32 *theBuf,
+			       s8 *resBuf,
+			       int size );
+
+extern void Convert_r32_to_u8( r32 *theBuf,
+			       u8 *resBuf,
+			       int size );
+
+extern void Convert_r32_to_s16( r32 *theBuf,
+				s16 *resBuf,
+				int size );
+
+extern void Convert_r32_to_u16( r32 *theBuf,
+				u16 *resBuf,
+				int size );
+
+
+
+
+
+#ifdef CGAL_HEADER_ONLY
+#include "convert_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert_impl.h
new file mode 100644
index 0000000..b078823
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/convert_impl.h
@@ -0,0 +1,490 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * convert.c - conversion between types
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * ADDITIONS, CHANGES
+ *
+ * - Tue Feb 22 11:25:39 MET 2000 (G. Malandain)
+ *   add in ConvertBuffer():
+ *       USHORT to UCHAR
+ *       USHORT to SHORT
+ *
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+CGAL_INLINE_FUNCTION
+void ConvertBuffer( void *bufferIn,
+		    bufferType typeIn,
+		    void *bufferOut,
+		    bufferType typeOut,
+		    int bufferLength )
+{
+  const char *proc = "ConvertBuffer";
+  int i, min, max;
+  u8 *u8buf;
+  s8 *s8buf;
+  u16 *u16buf;
+  s16 *s16buf;
+  s32 *s32buf;
+  r32 *r32buf;
+  r64 *r64buf;
+
+  if ( (typeOut == typeIn) && (bufferOut == bufferIn) )
+    return;
+
+  if ( bufferLength <= 0 ) {
+    fprintf( stderr, " Fatal error in %s: buffer length is negative or zero.\n", 
+	     proc );
+    return;
+  }
+  if ( (bufferIn == (void*)NULL) || (bufferOut == (void*)NULL) ) {
+    fprintf( stderr, " Fatal error in %s: NULL buffer(s).\n", 
+	     proc );
+    return;
+  }
+  
+  switch ( typeOut ) {
+  case CGAL_SCHAR :
+    s8buf = (s8*)bufferOut;
+    min = -128; max = 127;
+    switch( typeIn ) {
+    case CGAL_SCHAR :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s8) );
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, s8buf++, r32buf++ ) {
+	if ( *r32buf < min ) *s8buf = min;
+	else if ( *r32buf < 0.0 ) *s8buf = (int)(*r32buf - 0.5);
+	else if ( *r32buf < max ) *s8buf = (int)(*r32buf + 0.5);
+	else *s8buf = max;
+      }
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, s8buf++, r64buf++ ) {
+	if ( *r64buf < min ) *s8buf = min;
+	else if ( *r64buf < 0.0 ) *s8buf = (int)(*r64buf - 0.5);
+	else if ( *r64buf < max ) *s8buf = (int)(*r64buf + 0.5);
+	else *s8buf = max;
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_SCHAR */
+
+
+
+
+    
+  case CGAL_UCHAR :
+    u8buf = (u8*)bufferOut;
+    min = 0; max = 255;
+    switch( typeIn ) {
+    case CGAL_UCHAR :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(u8) );
+      break;
+    case CGAL_USHORT :
+      u16buf = (u16*)bufferIn;
+      for (i=bufferLength; i>0; i--, u8buf++, u16buf++ ) {
+	if ( *u16buf < max ) *u8buf = (u8)*u16buf;
+	else *u8buf = max;
+      }
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, u8buf++, r32buf++ ) {
+	if ( *r32buf < min ) *u8buf = min;
+	else if ( *r32buf < max ) *u8buf = (int)(*r32buf + 0.5);
+	else *u8buf = max;
+      }
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, u8buf++, r64buf++ ) {
+	if ( *r64buf < min ) *u8buf = min;
+	else if ( *r64buf < max ) *u8buf = (int)(*r64buf + 0.5);
+	else *u8buf = max;
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_UCHAR */
+
+
+
+
+
+    
+  case CGAL_SSHORT :
+    s16buf = (s16*)bufferOut;
+    min = -32768; max = 32767;
+    switch( typeIn ) {
+    case CGAL_SSHORT :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s16) );
+      break;
+    case CGAL_USHORT :
+      u16buf = (u16*)bufferIn;
+      for (i=bufferLength; i>0; i--, s16buf++, u16buf++ ) {
+	if ( *u16buf < max ) *s16buf = (s16)*u16buf;
+	else *s16buf = max;
+      }
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, s16buf++, r32buf++ ) {
+	if ( *r32buf < min ) *s16buf = min;
+	else if ( *r32buf < 0.0 ) *s16buf = (int)(*r32buf - 0.5);
+	else if ( *r32buf < max ) *s16buf = (int)(*r32buf + 0.5);
+	else *s16buf = max;
+      }
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, s16buf++, r64buf++ ) {
+	if ( *r64buf < min ) *s16buf = min;
+	else if ( *r64buf < 0.0 ) *s16buf = (int)(*r64buf - 0.5);
+	else if ( *r64buf < max ) *s16buf = (int)(*r64buf + 0.5);
+	else *s16buf = max;
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_SSHORT */
+
+
+
+
+    
+  case CGAL_USHORT :
+    u16buf = (u16*)bufferOut;
+    min = 0; max = 65535;
+    switch( typeIn ) {
+    case CGAL_USHORT :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(u16) );
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, u16buf++, r32buf++ ) {
+	if ( *r32buf < min ) *u16buf = min;
+	else if ( *r32buf < 0.0 ) *u16buf = (int)(*r32buf - 0.5);
+	else if ( *r32buf < max ) *u16buf = (int)(*r32buf + 0.5);
+	else *u16buf = max;
+      }
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, u16buf++, r64buf++ ) {
+	if ( *r64buf < min ) *u16buf = min;
+	else if ( *r64buf < 0.0 ) *u16buf = (int)(*r64buf - 0.5);
+	else if ( *r64buf < max ) *u16buf = (int)(*r64buf + 0.5);
+	else *u16buf = max;
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_USHORT */
+
+
+
+
+
+    
+  case CGAL_INT :
+    s32buf = (s32*)bufferOut;
+    switch( typeIn ) {
+    case CGAL_INT :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(s32) );
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, s32buf++, r32buf++ ) {
+	*s32buf = (int)(*r32buf);
+      }
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, s32buf++, r64buf++ ) {
+	*s32buf = (int)(*r64buf);
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_INT */
+
+
+
+
+
+    
+  case CGAL_FLOAT :
+    r32buf = (r32*)bufferOut;
+    switch( typeIn ) {
+    case CGAL_UCHAR :
+      u8buf = (u8*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, u8buf++ ) {
+	*r32buf = (float)(*u8buf);
+      }
+      break;
+    case CGAL_SCHAR :
+      s8buf = (s8*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, s8buf++ ) {
+	*r32buf = (float)(*s8buf);
+      }
+      break;
+    case CGAL_USHORT :
+      u16buf = (u16*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, u16buf++ ) {
+	*r32buf = (float)(*u16buf);
+      }
+      break;
+    case CGAL_SSHORT :
+      s16buf = (s16*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, s16buf++ ) {
+	*r32buf = (float)(*s16buf);
+      }
+      break;
+    case CGAL_INT :
+      s32buf = (s32*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, s32buf++ ) {
+	*r32buf = (float)(*s32buf);
+      }
+      break;
+    case CGAL_FLOAT :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(r32) );
+      break;
+    case CGAL_DOUBLE :
+      r64buf = (r64*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, r64buf++ ) {
+	*r32buf = (float)(*r64buf);
+      }
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n",
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_FLOAT */
+
+
+
+
+    
+  case CGAL_DOUBLE :
+    r64buf = (r64*)bufferOut;
+    switch( typeIn ) {
+    case CGAL_UCHAR :
+      u8buf = (u8*)bufferIn;
+      for (i=bufferLength; i>0; i--, r64buf++, u8buf++ ) {
+	*r64buf = (double)(*u8buf);
+      }
+      break;
+    case CGAL_SCHAR :
+      s8buf = (s8*)bufferIn;
+      for (i=bufferLength; i>0; i--, r64buf++, s8buf++ ) {
+	*r64buf = (double)(*s8buf);
+      }
+      break;
+    case CGAL_USHORT :
+      u16buf = (u16*)bufferIn;
+      for (i=bufferLength; i>0; i--, r64buf++, u16buf++ ) {
+	*r64buf = (double)(*u16buf);
+      }
+      break;
+    case CGAL_SSHORT :
+      s16buf = (s16*)bufferIn;
+      for (i=bufferLength; i>0; i--, r64buf++, s16buf++ ) {
+	*r64buf = (double)(*s16buf);
+      }
+      break;
+    case CGAL_INT :
+      s32buf = (s32*)bufferIn;
+      for (i=bufferLength; i>0; i--, r64buf++, s32buf++ ) {
+	*r64buf = (double)(*s32buf);
+      }
+      break;
+    case CGAL_FLOAT :
+      r32buf = (r32*)bufferIn;
+      for (i=bufferLength; i>0; i--, r32buf++, r64buf++ ) {
+	*r64buf = (double)(*r32buf);
+      }
+      break;
+    case CGAL_DOUBLE :
+      if ( bufferOut == bufferIn ) return;
+      (void)memcpy( bufferOut, bufferIn, bufferLength * sizeof(r64) );
+      break;
+    default :
+      fprintf( stderr, " Error in %s: such conversion not yet implemented.\n", 
+	       proc );
+      return;
+    }
+    break; /* end case typeOut = CGAL_DOUBLE */
+
+
+
+   
+  default :
+    fprintf( stderr, " Error in %s: such output type not yet handled.\n",
+	     proc );
+    return;
+  }
+}
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Convert_r32_to_s8( r32 *theBuf,
+			s8 *resBuf,
+			int size )
+{
+  int i;
+  r32* tb = theBuf;
+  s8* rb = resBuf;
+  
+  for ( i=0; i<size; i++, tb++, rb++ ) {
+    if ( *tb < -128.0 ) {
+      *rb = -128;
+    } else if ( *tb < 0.0 ) {
+      *rb = (int)(*tb - 0.5);
+    } else if ( *tb < 127.0 ) {
+      *rb = (int)(*tb + 0.5);
+    } else {
+      *rb = 127;
+    }
+  }
+}
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Convert_r32_to_u8( r32 *theBuf,
+			u8 *resBuf,
+			int size )
+{
+  int i;
+  r32* tb = theBuf;
+  u8* rb = resBuf;
+  
+  for ( i=0; i<size; i++, tb++, rb++ ) {
+    if ( *tb < 0.0 ) {
+      *rb = 0;
+    } else if ( *tb < 255.0 ) {
+      *rb = (int)(*tb + 0.5);
+    } else {
+      *rb = 255;
+    }
+  }
+}
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Convert_r32_to_s16( r32 *theBuf,
+			 s16 *resBuf,
+			 int size )
+{
+  int i;
+  r32* tb = theBuf;
+  s16* rb = resBuf;
+  
+  for ( i=0; i<size; i++, tb++, rb++ ) {
+    if ( *tb < -32768.0 ) {
+      *rb = -32768;
+    } else if ( *tb < 0.0 ) {
+      *rb = (int)(*tb - 0.5);
+    } else if ( *tb < 32767.0 ) {
+      *rb = (int)(*tb + 0.5);
+    } else {
+      *rb = 32767;
+    }
+  }
+}
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Convert_r32_to_u16( r32 *theBuf,
+			 u16 *resBuf,
+			 int size )
+{
+  int i;
+  r32* tb = theBuf;
+  u16* rb = resBuf;
+  
+  for ( i=0; i<size; i++, tb++, rb++ ) {
+    if ( *tb < 0.0 ) {
+      *rb = 0;
+    } else if ( *tb < 65535.0 ) {
+      *rb = (int)(*tb + 0.5);
+    } else {
+      *rb = 65535;
+    }
+  }
+}
+
+
+      
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.cpp
new file mode 100644
index 0000000..f5c95d1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "fgetns.h"
+#include "fgetns_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.h
new file mode 100644
index 0000000..73f2f58
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef FGETNS_H
+#define FGETNS_H
+
+#include <CGAL/ImageIO.h>
+
+/* get a string from a file and discard the ending newline character
+   if any */
+char *fgetns(char *str, int n,  _image *im );
+
+#ifdef CGAL_HEADER_ONLY
+#include "fgetns_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif // FGETNS_H
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns_impl.h
new file mode 100644
index 0000000..c1ded43
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/fgetns_impl.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <string.h>
+
+/* get a string from a file and discard the ending newline character
+   if any */
+CGAL_INLINE_FUNCTION
+char *fgetns(char *str, int n,  _image *im ) {
+  char *ret;
+  int l;
+
+  memset( str, 0, n );
+  ret = ImageIO_gets( im, str, n );
+
+  if(!ret) return NULL;
+
+  l = strlen(str);
+  if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
+  return ret;
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.cpp
new file mode 100644
index 0000000..c1735c6
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "gif.h"
+#include "gif_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.h
new file mode 100644
index 0000000..467f918
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef GIF_H
+#define GIF_H
+
+
+#include <stdio.h>
+#include <CGAL/ImageIO.h>
+int readGifImage(const char *name,_image *im);
+
+int testGifHeader(char *magic,const char *name);
+/** creates an return the file format structure associated with the Gif file format */
+PTRIMAGE_FORMAT createGifFormat();
+
+#ifdef CGAL_HEADER_ONLY
+#include "gif_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif_impl.h
new file mode 100644
index 0000000..ed9ac0b
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gif_impl.h
@@ -0,0 +1,700 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <string.h>
+
+#ifdef WIN32
+#include <io.h>
+#endif
+
+#ifdef CGAL_HEADER_ONLY
+  
+  #define CGAL_GLOBAL_STATE_VAR(TYPE, NAME, VALUE)  \
+    inline TYPE & get_static_##NAME()               \
+    {                                               \
+      static TYPE NAME = VALUE;                     \
+      return NAME;                                  \
+    }
+  
+#else // CGAL_HEADER_ONLY
+
+  #define CGAL_GLOBAL_STATE_VAR(TYPE, NAME, VALUE)  \
+    TYPE NAME;                                      \
+    inline TYPE& get_static_##NAME()                \
+    {                                               \
+      return NAME;                                  \
+    }
+
+#endif // CGAL_HEADER_ONLY
+
+
+/** Magic header for GIF files */
+#define GIF_MAGIC "GIF8"
+
+
+
+typedef unsigned char byte;
+#define TRUE 1
+#define FALSE 0
+
+#define NEXTBYTE      (*ptr++)
+#define EXTENSION     0x21
+#define IMAGESEP      0x2c
+#define TRAILER       0x3b
+#define INTERLACEMASK 0x40
+#define COLORMAPMASK  0x80
+
+
+#define DEBUG 0
+
+//FILE *fp;
+//int   gif89 = 0;
+static const char *id87 = "GIF87a";
+static const char *id89 = "GIF89a";
+
+static int EGApalette[16][3] = {
+  {0,0,0},       {0,0,128},     {0,128,0},     {0,128,128}, 
+  {128,0,0},     {128,0,128},   {128,128,0},   {200,200,200},
+  {100,100,100}, {100,100,255}, {100,255,100}, {100,255,255},
+  {255,100,100}, {255,100,255}, {255,255,100}, {255,255,255} };
+  
+
+static int  ReadCode();
+static void DoInterlace(byte);
+static int GifError(const char *);
+
+CGAL_GLOBAL_STATE_VAR(byte *, Raster, NULL) /* The raster data stream, unblocked */
+CGAL_GLOBAL_STATE_VAR(byte *, RawGIF, NULL)
+CGAL_GLOBAL_STATE_VAR(byte *, r, NULL)
+CGAL_GLOBAL_STATE_VAR(byte *, g, NULL)
+CGAL_GLOBAL_STATE_VAR(byte *, b, NULL)     /* The colormap */
+CGAL_GLOBAL_STATE_VAR(int, BitOffset, 0)    /* Bit Offset of next code */
+CGAL_GLOBAL_STATE_VAR(int, XC, 0)
+CGAL_GLOBAL_STATE_VAR(int, YC, 0)	    /* Output X and Y coords of current pixel */
+CGAL_GLOBAL_STATE_VAR(int, CodeSize, 0)	    /* Code size, read from GIF header */
+CGAL_GLOBAL_STATE_VAR(int, ReadMask, 0)     /* Code AND mask for current code size */
+CGAL_GLOBAL_STATE_VAR(int, Pass, 0)	    /* Used by output routine if interlaced pic */
+CGAL_GLOBAL_STATE_VAR(int, Width, 0)
+CGAL_GLOBAL_STATE_VAR(int, Height, 0)       /* image dimensions */
+CGAL_GLOBAL_STATE_VAR(unsigned char *, org, NULL)
+CGAL_GLOBAL_STATE_VAR(unsigned char *, buf, NULL)
+
+CGAL_INLINE_FUNCTION
+int testGifHeader(char *magic,const char *) {
+  if (!strcmp(magic, GIF_MAGIC))
+    return 0;
+  else 
+    return -1;
+}
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createGifFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testGifHeader;
+  f->readImageHeader=&readGifImage;
+  f->writeImage=0;
+  strcpy(f->fileExtension,".gif");
+  strcpy(f->realName,"Gif");
+  return f;
+}
+
+CGAL_INLINE_FUNCTION
+void use(int) {} // warning killer
+
+/*****************************/
+CGAL_INLINE_FUNCTION
+int readGifImage(const char *name,_image *im) {
+FILE *fp;
+int   gif89 = 0;
+
+  byte ch, ch1;
+  byte *ptr, *ptr1;
+  int i, block;
+  int npixels, maxpixels, aspect, filesize;
+  float normaspect;
+  int OutCount = 0,		/* Decompressor output 'stack count' */
+    RWidth, RHeight,		/* screen dimensions */
+    /*LeftOfs, TopOfs,		 image offset */
+    BitsPerPixel,		/* Bits per pixel, read from GIF header */
+    ColorMapSize,		/* number of colors */
+    Background,		         /* background color */
+    InitCodeSize,		/* Starting code size, used during Clear */
+    Code,			/* Value returned by ReadCode */
+    MaxCode,			/* limiting value for current code size */
+    ClearCode,			/* GIF clear code */
+    EOFCode,			/* GIF end-of-information code */
+    CurCode, OldCode=0, InCode,	/* Decompressor variables */
+    FirstFree,			/* First free code, generated per GIF spec */
+    FreeCode,			/* Decompressor,next free slot in hash table */
+    FinChar=0,			/* Decompressor variable */
+    BitMask,			/* AND mask for data size */
+    Misc;                       /* miscellaneous bits (interlace, local cmap)*/
+  int Interlace, HasColormap;
+  /* not used
+   */
+  /* char header[10]; */
+
+  /* The hash table used by the decompressor */
+  int Prefix[4096];
+  int Suffix[4096];
+  /* An output array used by the decompressor */
+  int OutCode[4097];
+
+  /* initialize variables */
+  get_static_BitOffset() =
+    get_static_XC() =
+    get_static_YC() =
+    get_static_Pass() =
+    OutCount =
+    npixels =
+    maxpixels = 0;
+  get_static_RawGIF() = get_static_Raster() = NULL;
+  gif89 = 0;
+
+#ifdef WIN32
+ fp = fopen(name,"rb");
+#else
+  fp = fopen(name,"r");
+#endif
+  fp = fopen(name,"rb");
+  if (!fp) {
+    return(GifError("could not open a GIF file"));
+  }
+  /* find the size of the file */
+  fseek(fp, 0L, 2);
+  filesize = ftell(fp);
+  fseek(fp, 0L, 0);
+
+ /* the +256's are so we can read truncated GIF files without fear of 
+     segmentation violation */
+  if (!(ptr = get_static_RawGIF() = (byte *) ImageIO_alloc(filesize+256)))
+    return( GifError("not enough memory to read gif file") );
+  
+  if (!(get_static_Raster() = (byte *) ImageIO_alloc(filesize+256)))    
+    return( GifError("not enough memory to read gif file") );
+  
+  if (fread(ptr, filesize, 1, fp) != 1)
+    return( GifError("GIF data read failed") );
+   if      (strncmp((char *) ptr, id87, 6)==0) gif89 = 0;
+  else if (strncmp((char *) ptr, id89, 6)==0) gif89 = 1;
+  else    return( GifError("not a GIF file"));
+  
+  ptr += 6;
+ /* Get variables from the GIF screen descriptor */
+  
+  ch = NEXTBYTE;
+  RWidth = ch + 0x100 * NEXTBYTE;	/* screen dimensions... not used. */
+  ch = NEXTBYTE;
+  RHeight = ch + 0x100 * NEXTBYTE;
+  use(RWidth);
+  use(RHeight);
+  
+  ch = NEXTBYTE;
+  HasColormap = ((ch & COLORMAPMASK) ? TRUE : FALSE);
+  
+  BitsPerPixel = (ch & 7) + 1;
+  ColorMapSize = 1 << BitsPerPixel;
+  BitMask = ColorMapSize - 1;
+  
+  Background = NEXTBYTE;		/* background color... not used. */
+  use(Background);
+
+
+  aspect = NEXTBYTE;
+  if (aspect) {
+    if (!gif89) return(GifError("corrupt GIF file (screen descriptor)"));
+    else normaspect = (float) (aspect + 15) / 64.0f;   /* gif89 aspect ratio */
+    if (DEBUG) fprintf(stderr,"GIF89 aspect = %f\n", normaspect);
+  }
+
+
+  /* Read in global colormap. */
+  if (HasColormap)
+    {
+      get_static_r() = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
+      get_static_g() = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
+      get_static_b() = (byte *) ImageIO_alloc(ColorMapSize * sizeof(byte));
+
+      for (i = 0; i < ColorMapSize; i++) {
+	get_static_r()[i] = NEXTBYTE;
+	get_static_g()[i] = NEXTBYTE;
+        get_static_b()[i] = NEXTBYTE;
+      }
+    }
+  else {
+    /* no colormap in GIF file */
+    /* put std EGA palette (repeated 16 times) into colormap, for lack of
+       anything better to do */
+    ColorMapSize = 256;
+    get_static_r() = (byte *) ImageIO_alloc(256 * sizeof(byte));
+    get_static_g() = (byte *) ImageIO_alloc(256 * sizeof(byte));
+    get_static_b() = (byte *) ImageIO_alloc(256 * sizeof(byte));
+   
+    for (i = 0; i < 256; i++) {
+      get_static_r()[i] = EGApalette[i&15][0];
+      get_static_g()[i] = EGApalette[i&15][1];
+      get_static_b()[i] = EGApalette[i&15][2];
+    }
+  }
+
+  /* possible things at this point are:
+   *   an application extension block
+   *   a comment extension block
+   *   an (optional) graphic control extension block
+   *       followed by either an image
+   *	   or a plaintext extension
+   */
+  while (1) {
+    block = NEXTBYTE;
+   
+    if (block == EXTENSION) {  /* parse extension blocks */
+      int i, fn, blocksize, aspnum, aspden;
+	  
+      /* read extension block */
+      fn = NEXTBYTE;
+	  
+      if (DEBUG) fprintf(stderr,"GIF extension type 0x%02x\n", fn);
+	  
+      if (fn == 'R') {                  /* GIF87 aspect extension */
+	blocksize = NEXTBYTE;
+	if (blocksize == 2) {
+	  aspnum = NEXTBYTE;
+	  aspden = NEXTBYTE;
+	  if (aspden>0 && aspnum>0) 
+	    normaspect = (float) aspnum / (float) aspden;
+	  else { normaspect = 1.0;  aspnum = aspden = 1; }
+			
+	  if (DEBUG) fprintf(stderr,"GIF87 aspect extension: %d:%d = %f\n\n", 
+			     aspnum, aspden,normaspect);
+	}
+	else {
+	  for (i=0; i<blocksize; i++) (void)NEXTBYTE;
+	}
+      }
+	  
+      else if (fn == 0xFE) {  /* Comment Extension.  just eat it */
+	int ch, j, sbsize;
+		 
+	if (DEBUG) fprintf(stderr,"Comment extension:  ");
+	/* read (and ignore) data sub-blocks */
+	do {
+	  j = 0;  sbsize = NEXTBYTE;
+	  while (j<sbsize) {
+	    ch = NEXTBYTE;  j++;
+	    if (DEBUG) fprintf(stderr,"%c", ch);
+	  }
+	} while (sbsize);
+	if (DEBUG) fprintf(stderr,"\n\n");
+      }
+	  
+      else if (fn == 0x01) {  /* PlainText Extension */
+	int j,sbsize,ch;
+	int tgLeft, tgTop, tgWidth, tgHeight, cWidth, cHeight, fg, bg;
+		 
+	/*	SetISTR(ISTR_WARNING, 
+		"PlainText extension found in GIF file.  Ignored.");*/
+		 
+	sbsize   = NEXTBYTE;
+	tgLeft   = NEXTBYTE;  tgLeft   += (NEXTBYTE)<<8;
+	tgTop    = NEXTBYTE;  tgTop    += (NEXTBYTE)<<8;
+	tgWidth  = NEXTBYTE;  tgWidth  += (NEXTBYTE)<<8;
+	tgHeight = NEXTBYTE;  tgHeight += (NEXTBYTE)<<8;
+	cWidth   = NEXTBYTE;
+	cHeight  = NEXTBYTE;
+	fg       = NEXTBYTE;
+	bg       = NEXTBYTE;
+	i=12;
+	for ( ; i<sbsize; i++) (void)NEXTBYTE;   /* read rest of first subblock */
+		 
+	if (DEBUG) fprintf(stderr,
+			   "PlainText: tgrid=%d,%d %dx%d  cell=%dx%d  col=%d,%d\n",
+			   tgLeft, tgTop, tgWidth, tgHeight, cWidth, cHeight,
+			   fg, bg);
+		 
+	/* read (and ignore) data sub-blocks */
+	do {
+	  j = 0;
+	  sbsize = NEXTBYTE;
+	  while (j<sbsize) {
+	    ch = NEXTBYTE;  j++;
+	    if (DEBUG) fprintf(stderr,"%c", ch);
+	  }
+	} while (sbsize);
+	if (DEBUG) fprintf(stderr,"\n\n");
+      }
+	  
+	  
+      else if (fn == 0xF9) {  /* Graphic Control Extension */
+	int j, sbsize;
+		 
+	if (DEBUG) fprintf(stderr,"Graphic Control extension\n\n");
+		 
+	/*	SetISTR(ISTR_WARNING, 
+		"Graphic Control Extension in GIF file.  Ignored.");*/
+		 
+	/* read (and ignore) data sub-blocks */
+	do {
+	  j = 0; sbsize = NEXTBYTE;
+	  while (j<sbsize) { (void)NEXTBYTE;  j++; }
+	} while (sbsize);
+      }
+      
+	  
+      else { /* unknown extension */
+	int j, sbsize;
+		 
+	if (DEBUG) fprintf(stderr,"unknown GIF extension 0x%02x\n\n", fn);
+		 
+	/*	SetISTR(ISTR_WARNING, 
+		"Unknown extension 0x%02x in GIF file.  Ignored.",fn);*/
+		 
+	/* read (and ignore) data sub-blocks */
+	do {
+	  j = 0; sbsize = NEXTBYTE;
+	  while (j<sbsize) { (void)NEXTBYTE;  j++; }
+	} while (sbsize);
+      }
+    }
+   
+    else if (block == IMAGESEP) break;   /* read an image */
+
+    else if (block == TRAILER) {
+      return( GifError("no image data found in GIF file") );
+    }
+   
+    else return (GifError("Unknown block type found in file."));
+  }
+
+
+  /* read in values from the image descriptor */
+  ch = NEXTBYTE;
+  /* LeftOfs = ch + 0x100 * NEXTBYTE;*/
+  ch = NEXTBYTE;
+  /* TopOfs = ch + 0x100 * NEXTBYTE; */
+  ch = NEXTBYTE;
+  ch = NEXTBYTE;
+  ch = NEXTBYTE;
+  get_static_Width() = ch + 0x100 * NEXTBYTE;
+  ch = NEXTBYTE;
+  get_static_Height() = ch + 0x100 * NEXTBYTE;
+
+  Misc = NEXTBYTE;
+  Interlace = ((Misc & INTERLACEMASK) ? TRUE : FALSE);
+
+  if (Misc & 0x80) {
+    for (i=0; i< 1 << ((Misc&7)+1); i++) {
+      get_static_r()[i] = NEXTBYTE;
+      get_static_g()[i] = NEXTBYTE;
+      get_static_b()[i] = NEXTBYTE;
+    }
+  }
+
+
+  if (!HasColormap && !(Misc&0x80)) {
+    /* no global or local colormap */
+    /*    SetISTR(ISTR_WARNING,
+	  "No colormap in this GIF file.  Assuming EGA colors.");*/
+  }
+
+
+
+  /* Start reading the raster data. First we get the intial code size
+   * and compute decompressor constant values, based on this code size.
+   */
+  
+  /*  SetISTR(ISTR_FORMAT, "GIF%s, %d bits per pixel, %sinterlaced.  (%d bytes)",
+      (gif89) ? "89" : "87", BitsPerPixel, 
+      Interlace ? "" : "non-", filesize);*/
+
+  get_static_CodeSize() = NEXTBYTE;
+
+  ClearCode = (1 << get_static_CodeSize());
+  EOFCode = ClearCode + 1;
+  FreeCode = FirstFree = ClearCode + 2;
+
+  /* The GIF spec has it that the code size is the code size used to
+   * compute the above values is the code size given in the file, but the
+   * code size used in compression/decompression is the code size given in
+   * the file plus one. (thus the ++).
+   */
+  get_static_CodeSize()++;
+  InitCodeSize = get_static_CodeSize();
+  MaxCode = (1 << get_static_CodeSize());
+  get_static_ReadMask() = MaxCode - 1;
+
+  /* UNBLOCK:
+   * Read the raster data.  Here we just transpose it from the GIF array
+   * to the Raster array, turning it from a series of blocks into one long
+   * data stream, which makes life much easier for ReadCode().
+   */
+  
+  ptr1 = get_static_Raster();
+  do {
+    ch = ch1 = NEXTBYTE;
+    while (ch--) { 
+		*ptr1 = NEXTBYTE; 
+		ptr1++; }
+    if ((ptr - get_static_RawGIF()) > filesize) {
+      /*      SetISTR(ISTR_WARNING,
+	      "This GIF file seems to be truncated.  Winging it.");*/
+      break;
+    }
+  } while(ch1);
+  ImageIO_free(get_static_RawGIF());  get_static_RawGIF() = NULL;
+
+
+  if (DEBUG) {
+    fprintf(stderr,"xv: LoadGIF() - picture is %dx%d, %d bits, %sinterlaced\n",
+	    get_static_Width(), get_static_Height(), BitsPerPixel, Interlace ? "" : "non-");
+  }
+  
+
+  /* Allocate the 'pic' */
+  maxpixels = get_static_Width()*get_static_Height();
+  im->xdim = get_static_Width();
+  im->ydim = get_static_Height();
+  im->zdim = 1;
+  im->vdim = 3;
+  im->wdim = 1;
+  im->wordKind = WK_FIXED;
+  im->sign = SGN_UNSIGNED;
+  im->data = ImageIO_alloc(get_static_Width() * get_static_Height() * 3);
+  get_static_org() = get_static_buf() = (unsigned char *) im->data;
+
+  if (!get_static_org())
+    return( GifError("not enough memory for image buffer") );
+
+
+  /* Decompress the file, continuing until you see the GIF EOF code.
+   * One obvious enhancement is to add checking for corrupt files here.
+   */
+  Code = ReadCode();
+  while (Code != EOFCode) {
+   /* Clear code sets everything back to its initial value, then reads the
+     * immediately subsequent code as uncompressed data.
+     */
+   
+	  if (Code == ClearCode) { 
+      get_static_CodeSize() = InitCodeSize;
+      MaxCode = (1 << get_static_CodeSize());
+      get_static_ReadMask() = MaxCode - 1;
+      FreeCode = FirstFree;
+      Code = ReadCode();
+      CurCode = OldCode = Code;
+      FinChar = CurCode & BitMask;
+      if (!Interlace) {
+	*get_static_buf()++ = get_static_r()[FinChar];
+	*get_static_buf()++ = get_static_g()[FinChar];
+	*get_static_buf()++ = get_static_b()[FinChar];
+      }
+      else DoInterlace((byte)FinChar);
+      npixels++;
+    }
+
+    else {
+      /* If not a clear code, must be data: save same as CurCode and InCode */
+	   
+      /* if we're at maxcode and didn't get a clear, stop loading */
+      if (FreeCode>=4096) { 
+		  printf("freecode blew up\n"); 
+	      break;
+	  }
+	   
+      CurCode = InCode = Code;
+	   
+      /* If greater or equal to FreeCode, not in the hash table yet;
+       * repeat the last character decoded
+       */
+	   
+      if (CurCode >= FreeCode) {
+	CurCode = OldCode;
+	if (OutCount > 4096) {   
+		printf("outcount1 blew up\n");  break; }
+	OutCode[OutCount++] = FinChar;
+      }
+	   
+      /* Unless this code is raw data, pursue the chain pointed to by CurCode
+       * through the hash table to its end; each code in the chain puts its
+       * associated output code on the output queue.
+       */
+	   
+      while (CurCode > BitMask) {
+		  if (OutCount > 4096) {
+			  fprintf(stderr,"outcount2 blew up\n"); break;}   /* corrupt file */
+	OutCode[OutCount++] = Suffix[CurCode];
+	CurCode = Prefix[CurCode];
+      }
+	   
+      if (OutCount > 4096) {  
+		  printf("outcount blew up\n");  break; }
+	   
+      /* The last code in the chain is treated as raw data. */
+	   
+      FinChar = CurCode & BitMask;
+      OutCode[OutCount++] = FinChar;
+	   
+      /* Now we put the data out to the Output routine.
+       * It's been stacked LIFO, so deal with it that way...
+       */
+
+      /* safety thing:  prevent exceeding range of 'pic' */
+      if (npixels + OutCount > maxpixels) OutCount = maxpixels-npixels;
+	   
+      npixels += OutCount;
+      if (!Interlace) for (i=OutCount-1; i>=0; i--) {
+          *get_static_buf()++ = get_static_r()[OutCode[i]];
+          *get_static_buf()++ = get_static_g()[OutCode[i]];
+          *get_static_buf()++ = get_static_b()[OutCode[i]];
+      }
+      else  for (i=OutCount-1; i>=0; i--) DoInterlace((byte)OutCode[i]);
+      OutCount = 0;
+	   
+      /* Build the hash table on-the-fly. No table is stored in the file. */
+      
+      Prefix[FreeCode] = OldCode;
+      Suffix[FreeCode] = FinChar;
+      OldCode = InCode;
+	   
+      /* Point to the next slot in the table.  If we exceed the current
+       * MaxCode value, increment the code size unless it's already 12.  If it
+       * is, do nothing: the next code decompressed better be CLEAR
+       */
+	   
+      FreeCode++;
+      if (FreeCode >= MaxCode) {
+	if (get_static_CodeSize() < 12) {
+	  get_static_CodeSize()++;
+	  MaxCode *= 2;
+	  get_static_ReadMask() = (1 << get_static_CodeSize()) - 1;
+	}
+      }
+    }
+    Code = ReadCode();
+    if (npixels >= maxpixels) break;
+  }
+  ImageIO_free(get_static_Raster());  get_static_Raster() = NULL;
+
+  if (npixels != maxpixels) {
+    /*    SetISTR(ISTR_WARNING,"This GIF file seems to be truncated.  Winging it.");*/
+    if (!Interlace)
+      memset(get_static_buf(), 0, 3*(maxpixels-npixels)); /* clear to EOBuffer */
+  }
+  /*  SetDirRButt(F_FORMAT, F_GIF);
+      SetDirRButt(F_COLORS, F_FULLCOLOR);*/
+  return 1;
+}
+
+
+/* Fetch the next code from the raster data stream.  The codes can be
+ * any length from 3 to 12 bits, packed into 8-bit bytes, so we have to
+ * maintain our location in the Raster array as a BIT Offset.  We compute
+ * the byte Offset into the raster array by dividing this by 8, pick up
+ * three bytes, compute the bit Offset into our 24-bit chunk, shift to
+ * bring the desired code to the bottom, then mask it off and return it. 
+ */
+
+CGAL_INLINE_FUNCTION
+static int ReadCode()
+{
+  int RawCode, ByteOffset;
+  
+  ByteOffset = get_static_BitOffset() / 8;
+  RawCode = get_static_Raster()[ByteOffset] + (get_static_Raster()[ByteOffset + 1] << 8);
+  if (get_static_CodeSize() >= 8)
+    RawCode += ( ((int) get_static_Raster()[ByteOffset + 2]) << 16);
+  RawCode >>= (get_static_BitOffset() % 8);
+  get_static_BitOffset() += get_static_CodeSize();
+
+  return(RawCode & get_static_ReadMask());
+}
+
+
+/***************************/
+CGAL_INLINE_FUNCTION
+static void DoInterlace(byte Index) {
+  static byte *ptr = NULL;
+  static int   oldYC = -1;
+  
+  if (oldYC != get_static_YC()) {
+    ptr = get_static_org() + 3 * get_static_YC() * get_static_Width();
+    oldYC = get_static_YC();
+  }
+  
+  if (get_static_YC() < get_static_Height()) {
+    *ptr++ = get_static_r()[Index];
+    *ptr++ = get_static_g()[Index];
+    *ptr++ = get_static_b()[Index];
+  }
+  
+  /* Update the X-coordinate, and if it overflows, update the Y-coordinate */
+  if (++get_static_XC() == get_static_Width()) {
+    
+    /* deal with the interlace as described in the GIF
+     * spec.  Put the decoded scan line out to the screen if we haven't gone
+     * past the bottom of it
+     */
+    
+    get_static_XC() = 0;
+    
+    switch (get_static_Pass()) {
+    case 0:
+      get_static_YC() += 8;
+      if (get_static_YC() >= get_static_Height()) { get_static_Pass()++; get_static_YC() = 4; }
+      break;
+      
+    case 1:
+      get_static_YC() += 8;
+      if (get_static_YC() >= get_static_Height()) { get_static_Pass()++; get_static_YC() = 2; }
+      break;
+      
+    case 2:
+      get_static_YC() += 4;
+      if (get_static_YC() >= get_static_Height()) { get_static_Pass()++; get_static_YC() = 1; }
+      break;
+      
+    case 3:
+      get_static_YC() += 2;  break;
+      
+    default:
+      break;
+    }
+  }
+}
+
+
+      
+/*****************************/
+CGAL_INLINE_FUNCTION
+static int GifError(const char *st) {
+  fprintf(stderr,"readGifImage: error: %s\n",st);
+
+  if (get_static_RawGIF() != NULL) ImageIO_free(get_static_RawGIF());
+  if (get_static_Raster() != NULL) ImageIO_free(get_static_Raster());
+  
+  return -1;
+}
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.cpp
new file mode 100644
index 0000000..bc3bd71
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "gis.h"
+#include "gis_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.h
new file mode 100644
index 0000000..c12cc76
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis.h
@@ -0,0 +1,141 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef GIS_H
+#define GIS_H
+
+
+#include <CGAL/ImageIO.h>
+
+
+
+
+/* read gis format header
+
+   Format du fichier texte associe aux fichiers binaires (images)
+
+exemple :
+         512 512 100 2
+	 -type U16
+	 -dx 1. 
+	 -dy 2.
+	 -dz .5
+	 -z2 5
+         -ar SUN
+	 -mod MR
+         -txt image acquise sur SIGNA 1.5T au CHRU de Caen
+         donnees brutes sans traitement  -endtxt
+	
+- la première ligne comporte les dimensions de l'image, respectivement, le nombre de colonnes, de lignes, de coupes et de temps; ces deux, trois ou quatre entiers doivent être strictement positifs et rester inférieurs à 4096.
+
+- les lignes suivantes comportent des champs indiques par des mots clefs:
+			
+   -type typespecifier
+
+   U8 entier non signé codé sur 8 bit (unsigned char) 
+   S8  entier signé codé sur 8 bit (signed char)
+   U16  entier non signé codé sur 16 bit (unsigned short)
+   S16  entier signé codé sur 16 bit (signed short)	
+   U32  entier non signé codé sur 32 bit (unsigned int)
+   S32  entier signé codé sur 32 bit (signed int)
+   FLOAT  flottant simple précision (float)
+   DOUBLE  flottant double précision (double)
+			
+   -dx double  (taille du voxel en x)
+   -dy double  (taille du voxel en y)
+   -dz double  (taille du voxel en z)
+               (les tailles sont donnees en millimetres)
+   -dt double  (taille du voxel en t)
+               (taille donnee en secondes)
+
+   (spécification d'un sous-volume)
+   -x1 entier  	
+   -x2 entier  	
+   -y1 entier  
+   -y2 entier  
+   -z1 entier  
+   -z2 entier  
+   -ref nom x y z t   
+        (origine d'un sous-volume : fichier correspondant a une
+         sous-image de "nom")
+
+   -ar architecture (string)
+   -mod modalite (string) : MR, PET, fMR, etc.
+   -dir plan de coupe (string) : sagittal, frontal, axial
+   -min double (valeur physique correspondant au minimum des voxels)
+   -max double (valeur physique correspondant au maximum des voxels)
+   -ca x y z (3 entiers pour la position de CA)
+   -cp x y z (3 entiers pour la position de CP)
+   -ip a b c d (4 double pour les coefficients du plan inter-hemispherique
+                equation de la forme ax+by+cz+d = 0)
+   -td d1 d2 d3 d4 d5 d6 (6 entiers pour les distances au repere de
+		Talairach, en voxels :
+		d1 : Talairach anterior plane-CA distance
+		d2 : Talairach posterior plane-CP distance
+		d3 : Talairach left plane-IP distance
+		d4 : Talairach right plane-IP distance
+   		d5 : Talairach bottom plane-CACP distance
+   		d6 : Talairach top plane-CACP distance
+   -a age (entier)
+   -s sexe (1/2)
+   -l lateralite
+   -txt texte libre (ascii)
+   -endtxt (fin du texte)
+
+
+   return:
+   -1: error
+   0: success
+ */
+int readGisHeader(const char* name,_image *im);
+
+
+int testGisHeader(char *magic,const char *name);
+
+/** creates an return the file format structure associated with the Gis file format */
+PTRIMAGE_FORMAT createGisFormat();
+
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeGis( char *basename, _image* im ) ;
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeGisHeader( const _image* im ) ;
+
+
+/* 
+   return:
+   -1: error
+    1: success
+ */
+int writeGisData( const _image* im ) ;
+
+#ifdef CGAL_HEADER_ONLY
+#include "gis_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis_impl.h
new file mode 100644
index 0000000..fbd3b53
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/gis_impl.h
@@ -0,0 +1,730 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <string>
+#include <sstream>
+#include <cstring>
+
+#include "inr.h"
+#include "fgetns.h"
+
+#define _LGTH_STRING_ 1024
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createGisFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testGisHeader;
+  f->readImageHeader=&readGisHeader;
+  f->writeImage=&writeGis;
+  strcpy(f->fileExtension,".dim,.dim.gz,.ima,.ima.gz");
+  strcpy(f->realName,"Gis");
+  return f;
+}
+CGAL_INLINE_FUNCTION
+int writeGis( char *name, _image* im) {
+  char *outputName;
+  int length, extLength=0, res;
+
+
+  length=strlen(name);
+  outputName= (char *)ImageIO_alloc(length+8);
+  
+  if ( strncmp( name+length-4, ".dim", 4 ) == 0 ) {
+    extLength = 4;
+  }
+  else if ( strncmp( name+length-4, ".ima", 4 ) == 0 ) {
+    extLength = 4;
+  }
+  else if ( strncmp( name+length-7, ".ima.gz", 7 ) == 0 ) {
+    extLength = 7;
+  }
+  else if ( strncmp( name+length-7, ".dim.gz", 7 ) == 0 ) {
+    extLength = 7;
+  }
+
+  strncpy( outputName, name, length-extLength );
+  if ( strncmp( name+length-7, ".dim.gz", 7 ) == 0 )
+    strcpy( outputName+length-extLength, ".dim.gz" );
+  else
+    strcpy( outputName+length-extLength, ".dim" );
+
+  _openWriteImage(im, outputName);
+  if( !im->fd ) {
+    fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    return ImageIO_OPENING;
+  }
+
+  res = writeGisHeader(im);
+  if (res < 0 ) {
+    fprintf(stderr, "writeGis: error: unable to write header of \'%s\'\n",
+	    outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    ImageIO_close( im );
+    im->fd = NULL;
+    im->openMode = OM_CLOSE;
+    return( res );
+  }
+
+  ImageIO_close(im);
+  
+  strncpy( outputName, name, length-extLength );
+  if ( strncmp( name+length-3, ".gz", 3 ) == 0 ) {
+    strcpy( outputName+length-extLength, ".ima.gz" );
+  }
+  else {
+    strcpy( outputName+length-extLength, ".ima" );
+  }
+
+  _openWriteImage(im, outputName);
+
+  if( !im->fd ) {
+    fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
+    if ( outputName != NULL ) ImageIO_free( outputName );
+    return ImageIO_OPENING;
+  }
+
+  if ( im->dataMode == DM_ASCII ) {
+    int i, j, n, size;
+    char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
+    size = im->xdim * im->ydim * im->zdim * im->vdim;
+    n = ( im->xdim < 16 ) ? im->xdim : 16;
+    i = 0;
+
+    switch( im->wordKind ) {
+    default :
+      fprintf(stderr, "writeGis: such word kind not handled in ascii mode for file \'%s\'\n", outputName);
+      if ( outputName != NULL ) ImageIO_free( outputName );
+      return( -3 );
+    case WK_FIXED :
+      switch ( im->wdim ) {
+      default :
+	fprintf(stderr, "writeGis: such word dim not handled in ascii mode for file \'%s\'\n", outputName);
+	if ( outputName != NULL ) ImageIO_free( outputName );
+	return( -3 );
+      case 1 :
+	switch ( im->sign ) {
+	default :
+	  fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
+	  if ( outputName != NULL ) ImageIO_free( outputName );
+	  return( -3 );
+	case SGN_UNSIGNED :
+	  {
+	    unsigned char *theBuf = ( unsigned char * )im->data;
+	    do {
+	      memset( str, 0, _LGTH_STRING_ );
+	      for ( j=0; j<n && i<size; j++, i++ ) {
+		sprintf( str+strlen(str), "%d", theBuf[i] );
+		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	      }
+	      sprintf( str+strlen(str), "\n" );
+	      res = ImageIO_write( im, str, strlen( str )  );
+	      if ( res  <= 0 ) {
+		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
+		if ( outputName != NULL ) ImageIO_free( outputName );
+		return( -3 );
+	      }
+	    } while ( i < size );
+	  }
+	  break;
+	case SGN_SIGNED :
+	  {
+	    char *theBuf = ( char * )im->data;
+	    do {
+	      memset( str, 0, _LGTH_STRING_ );
+	      for ( j=0; j<n && i<size; j++, i++ ) {
+		sprintf( str+strlen(str), "%d", theBuf[i] );
+		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	      }
+	      sprintf( str+strlen(str), "\n" );
+	      res = ImageIO_write( im, str, strlen( str )  );
+	      if ( res  <= 0 ) {
+		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
+		if ( outputName != NULL ) ImageIO_free( outputName );
+		return( -3 );
+	      }
+	    } while ( i < size );
+	  }
+	  break;
+	} /* end of switch ( im->sign ) */
+	break;
+      case 2 :
+	switch ( im->sign ) {
+	default :
+	  fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
+	  if ( outputName != NULL ) ImageIO_free( outputName );
+	  return( -3 );
+	case SGN_UNSIGNED :
+	  {
+	    unsigned short int *theBuf = ( unsigned short int * )im->data;
+	    do {
+	      memset( str, 0, _LGTH_STRING_ );
+	      for ( j=0; j<n && i<size; j++, i++ ) {
+		sprintf( str+strlen(str), "%d", theBuf[i] );
+		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	      }
+	      sprintf( str+strlen(str), "\n" );
+	      res = ImageIO_write( im, str, strlen( str )  );
+	      if ( res  <= 0 ) {
+		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
+		if ( outputName != NULL ) ImageIO_free( outputName );
+		return( -3 );
+	      }
+	    } while ( i < size );
+	  }
+	  break;
+	case SGN_SIGNED :
+	  {
+	    short int *theBuf = ( short int * )im->data;
+	    do {
+	      memset( str, 0, _LGTH_STRING_ );
+	      for ( j=0; j<n && i<size; j++, i++ ) {
+		sprintf( str+strlen(str), "%d", theBuf[i] );
+		if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	      }
+	      sprintf( str+strlen(str), "\n" );
+	      res = ImageIO_write( im, str, strlen( str )  );
+	      if ( res  <= 0 ) {
+		fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
+		if ( outputName != NULL ) ImageIO_free( outputName );
+		return( -3 );
+	      }
+	    } while ( i < size );
+	  }
+	  break;
+	} /* end of switch ( im->sign ) */
+	break;	
+      } /* end of switch ( im->wdim ) */
+    } /* end of switch( im->wordKind ) */
+
+    ImageIO_free( str ); 
+  }
+  else {
+    res = _writeInrimageData(im);
+  }
+  if ( outputName != NULL ) ImageIO_free( outputName );
+  return res;
+  
+}
+
+CGAL_INLINE_FUNCTION
+int testGisHeader(char *,const char *name) {
+   if (( !strncmp(name+strlen(name)-4, ".dim", 4)) || 
+       ( !strncmp(name+strlen(name)-4, ".ima", 4)) || 
+       ( !strncmp(name+strlen(name)-7, ".ima.gz", 7)) || 
+       ( !strncmp(name+strlen(name)-7, ".dim.gz", 7)) )
+     return 0;
+  else 
+    return -1;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int readGisHeader( const char* name,_image* im)
+{
+  char *s, *str = NULL;
+  int status;
+  int n=0, nusermax = 20;
+
+  str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
+  
+  if ( !fgetns(str, _LGTH_STRING_, im) ) 
+    { ImageIO_free( str ); return -1; }
+
+  std::istringstream iss;
+  iss.str(str);
+  iss >> im->xdim >> im->ydim >> im->zdim >> im->vdim;
+
+  status = iss.str().length();
+  switch ( status ) {
+  case 2 :    im->zdim = 1;
+  case 3 :    im->vdim = 1;
+  case 4 :    break;
+  default :
+    fprintf( stderr, "readGisHeader: unable to read dimensions in '%s'\n", name );
+    ImageIO_free( str ); 
+    return -1;
+  }
+  if ( im->vdim > 1 ) {
+    im->vectMode = VM_INTERLACED;
+  } 
+  else {
+    im->vectMode = VM_SCALAR;
+  }
+#define ADD_USER_STRING { \
+    if ( n == 0 ) { \
+      im->user = (char**)ImageIO_alloc( nusermax * sizeof( char*) ); \
+      for ( n=0; n<nusermax; n++ ) im->user[n] = NULL; \
+      n = 0; \
+    } \
+    im->user[n] = (char*)ImageIO_alloc( 1+strlen( s ) ); \
+    strcpy( im->user[n++], s ); \
+  }
+
+
+
+  while( fgetns( str, _LGTH_STRING_, im ) != 0 ) {
+    s = str;
+    do {
+
+      while ( *s == ' ' || *s == '\t' ) s++;
+
+      if ( !strncmp( s, "-dx ", 4 ) ) {
+	s += 4;
+	status = sscanf( s, "%lf", &(im->vx) );
+	if ( status != 1 ) {
+	  fprintf( stderr, "readGisHeader: error while reading -dx in '%s'\n", s-4 );
+	  *s = '\0';
+	} 
+	else {
+	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
+	}
+      }
+      else if ( !strncmp( s, "-dy ", 4 ) ) {
+	s += 4;
+	status = sscanf( s, "%lf", &(im->vy) );
+	if ( status != 1 ) {
+	  fprintf( stderr, "readGisHeader: error while reading -dy in '%s'\n", s-4 );
+	  *s = '\0';
+	} 
+	else {
+	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
+	}
+      }
+      else if ( !strncmp( s, "-dz ", 4 ) ) {
+	s += 4;
+	status = sscanf( s, "%lf", &(im->vz) );
+	if ( status != 1 ) {
+	  fprintf( stderr, "readGisHeader: error while reading -dz in '%s'\n", s-4 );
+	  *s = '\0';
+	} 
+	else {
+	  while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++;
+	}
+      }
+      else if ( !strncmp( s, "-dt ", 4 ) ) {
+	ADD_USER_STRING
+	s += 4; 
+	while ( *s == '.' || (*s >= '0' && *s <= '9') ) s++; 
+      }
+
+      else if ( !strncmp( s, "-type ", 6 ) ) {
+	s += 6; 
+	if ( !strncmp( s, "U8", 2 ) ) {
+	  im->wdim     = 1;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_UNSIGNED;
+	  s += 2;
+	}
+	else if ( !strncmp( s, "S8", 2 ) ) {
+	  im->wdim     = 1;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_SIGNED;
+	  s += 2;
+	} 
+	else if ( !strncmp( s, "U16", 3 ) ) {
+	  im->wdim     = 2;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_UNSIGNED;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "S16", 3 ) ) {
+	  im->wdim     = 2;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_SIGNED;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "U32", 3 ) ) {
+	  im->wdim     = 4;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_UNSIGNED;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "S32", 3 ) ) {
+	  im->wdim     = 4;
+	  im->wordKind = WK_FIXED;
+	  im->sign     = SGN_SIGNED;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "FLOAT", 5 ) ) {
+	  im->wdim     = sizeof( float );
+	  im->wordKind = WK_FLOAT;
+	  im->sign     = SGN_UNKNOWN;
+	  s += 5;
+	}
+	else if ( !strncmp( s, "DOUBLE", 6 ) ) {
+	  im->wdim     = sizeof( double );
+	  im->wordKind = WK_FLOAT;
+	  im->sign     = SGN_UNKNOWN;
+	  s += 6;
+	}
+	else {
+	  fprintf( stderr, "readGisHeader: unknown type '%s'\n", s-6 );
+	  *s = '\0'; 
+	}
+      }
+
+      else if ( !strncmp( s, "-bo ", 4 ) ) {
+	s += 4;
+	if ( !strncmp( s, "ABCD", 4 ) ) {
+	  im->endianness = END_BIG;
+	  s += 4;
+	}
+	else if ( !strncmp( s, "SUN", 3 ) ) {
+	  im->endianness = END_BIG;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "DCBA", 4 ) ) {
+	  im->endianness = END_LITTLE;
+	  s += 4;
+	}
+	else if ( !strncmp( s, "ALPHA", 5 ) ) {
+	  im->endianness = END_LITTLE;
+	  s += 5;
+	}
+	else {
+	  fprintf( stderr, "readGisHeader: unknown byte order '%s'\n", s-4 );
+	  *s = '\0'; 
+	}
+      }
+
+      else if ( !strncmp( s, "-ar ", 4 ) ) {
+	s += 4;
+	if ( !strncmp( s, "SUN", 3 ) ) {
+	  im->endianness = END_BIG;
+	  s += 3;
+	}
+	else if ( !strncmp( s, "ALPHA", 5 ) ) {
+	  im->endianness = END_LITTLE;
+	  s += 5;
+	}
+	else {
+	  fprintf( stderr, "readGisHeader: unknown architecture '%s'\n", s-4 );
+	  *s = '\0'; 
+	}
+      }
+
+      else if ( !strncmp( s, "-om ", 4 ) ) {
+	s += 4;
+	if ( !strncmp( s, "binar", 5 ) ) {
+	  im->dataMode = DM_BINARY;
+	  s += 5;
+	} 
+	else if ( !strncmp( s, "ascii", 5 ) ) {
+	  im->dataMode = DM_ASCII;
+	  s += 5;
+	} 
+	else {
+	  fprintf( stderr, "readGisHeader: unknown data type '%s'\n", s-4 );
+	  ImageIO_free( str );
+	  return -1;
+	}
+      }
+      
+      
+      else {
+	fprintf( stderr, "readGisHeader: unknown indentifier '%s'\n", s );
+	ADD_USER_STRING
+	*s = '\0'; 
+      }
+
+    } while( *s != '\0' && *s != '\n' );
+
+  }
+  ImageIO_free( str );
+  
+
+  if ( im->endianness == END_UNKNOWN ) {
+    im->endianness = _getEndianness();
+  }
+
+
+  /* header is read. close header file and open data file. */
+  if( name != NULL ) {
+    
+    int length = strlen(name) ;
+    char* data_filename = (char *) ImageIO_alloc(length+4) ;
+    
+    if( strcmp( name+length-4, ".dim" ) ) {
+      fprintf (stderr,
+	       "readGisHeader: error: file header extension must be .dim\n");
+      ImageIO_free( data_filename );
+      return -1;
+    }
+    
+    ImageIO_close(im);
+
+
+    /* open data file
+     */
+    
+    strcpy(data_filename,name);
+    strcpy(data_filename+length-3, "ima.gz");
+    _openReadImage(im,data_filename);
+    
+    if(!im->fd) {
+      
+      strcpy(data_filename,name);
+      strcpy(data_filename+length-3, "ima");
+      _openReadImage(im,data_filename);
+      if(!im->fd) {
+	fprintf(stderr, "readGisHeader: error: unable to open data file \'%s\'\n", data_filename);
+	ImageIO_free( data_filename );
+	return -1;
+	
+      }
+    }
+    ImageIO_free( data_filename );
+
+
+
+
+
+    /* read data if ascii
+       only U8 and S8
+     */
+    if ( im->dataMode == DM_ASCII ) {
+      int size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+      unsigned int n;
+      char *tmp;
+      int ret, iv=0;
+      
+      if ( im->wdim != 1 || im->wordKind != WK_FIXED ) {
+	fprintf(stderr, "readGisHeader: error: unable to read such ascii type\n" );
+	return -1;
+      }
+
+      n = 0 ;
+      if ( size <= 0 ) return -1;
+      if(!im->data) {
+	im->data = ( void*) ImageIO_alloc(size);
+	if(!im->data) return -1;
+      }
+      
+      n = 0;
+      str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
+      while( fgetns( str, _LGTH_STRING_, im ) != 0 &&
+	     n < im->xdim * im->ydim * im->zdim * im->vdim ) {
+	tmp = str;
+	while ( *tmp != '\n' && *tmp != '\0' && *tmp != EOF &&
+		n < im->xdim * im->ydim * im->zdim * im->vdim ) {
+	  /* skip trailing whitespace
+	   */
+	  while ( *tmp == ' ' || *tmp == '\t' )
+	    tmp++;
+	  if ( *tmp == '\0' || *tmp == '\n' || *tmp == EOF )
+	    continue;
+	  
+	  /* read a number
+	   */
+	  switch ( im->wordKind ) {
+	  case WK_FIXED :
+	    ret = sscanf( tmp, "%d", &iv );
+	  break;
+	  default :
+	    ImageIO_free( im->data ); im->data = NULL;
+	    ImageIO_free( str );
+	    return -1;
+	  }
+	  
+	  if ( ret != 1 ) {
+	    fprintf( stderr, "readGisHeader: error in reading ascii data\n" );
+	    ImageIO_free( im->data ); im->data = NULL;
+	    ImageIO_free( str );
+	    return -1;	
+	  }
+	  
+	  if ( im->wordKind == WK_FIXED 
+	       && im->sign == SGN_UNSIGNED 
+	       && im->wdim == 1 ) {
+	    unsigned char *buf = (unsigned char *)im->data;
+	    buf += n;
+	    if ( iv < 0 )        *buf = (unsigned char)0;
+	    else if ( iv > 255 ) *buf = (unsigned char)255;
+	    else                 *buf = (unsigned char)iv;
+	    n ++;
+	  }
+	  else if ( im->wordKind == WK_FIXED 
+		    && im->sign == SGN_SIGNED 
+		    && im->wdim == 1 ) {
+	    char *buf = (char *)im->data;
+	    buf += n;
+	    if ( iv < -128 )     *buf = (char)-128;
+	    else if ( iv > 127 ) *buf = (char)127;
+	    else                 *buf = (char)iv;
+	    n ++;
+	  }
+	  else if ( im->wordKind == WK_FIXED 
+		    && im->sign == SGN_UNSIGNED 
+		    && im->wdim == 2 ) {
+	    unsigned short int *buf = (unsigned short int *)im->data;
+	    buf += n;
+	    if ( iv < 0 )          *buf = (unsigned short int)0;
+	    else if ( iv > 65535 ) *buf = (unsigned short int)65535;
+	    else                   *buf = (unsigned short int)iv;
+	    n ++;
+	  }
+	  else if ( im->wordKind == WK_FIXED 
+		    && im->sign == SGN_SIGNED 
+		    && im->wdim == 2 ) {
+	    short int *buf = (short int *)im->data;
+	    buf += n;
+	    if ( iv < -32768 )     *buf = (short int)-32768;
+	    else if ( iv > 32767 ) *buf = (short int)32767;
+	    else                   *buf = (short int)iv;
+	    n ++;
+	  }
+	  else {
+	    ImageIO_free( im->data ); im->data = NULL;
+	    ImageIO_free( str );
+	    return -1;
+	  }
+	  
+
+
+	  /* skip a number 
+	   */
+	  while ( (*tmp >= '0' && *tmp <= '9') || *tmp == '.' || *tmp == '-' )
+	    tmp++;
+	}
+      }
+      ImageIO_free( str );
+      ImageIO_close(im);
+    }
+
+  }
+
+  
+  /* check header validity */
+  if ( im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
+       im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
+       ( im->wordKind == WK_FLOAT ||
+	 (im->wordKind == WK_FIXED && im->sign != SGN_UNKNOWN) ) &&
+       im->endianness != END_UNKNOWN ) {
+    return 0;
+  }
+
+  return -1;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int writeGisHeader( const _image* inr )
+{
+  const char *proc = "writeGisHeader";
+  std::ostringstream oss;
+
+  if ( inr->vectMode == VM_NON_INTERLACED ) {
+    fprintf( stderr, "%s: can not write non interlaced data\n", proc );
+    return -1;
+  }
+
+  /* dimensions
+   */
+  oss << " " << inr->xdim << " " << inr->ydim;
+  if ( inr->vdim > 1 ) {
+    oss << " " << inr->zdim << " " << inr->vdim;
+  }
+  else if ( inr->zdim > 1 ) {
+    oss << " " << inr->zdim;
+  }
+  oss << "\n";
+
+  /* type
+   */
+  oss << "-type ";
+  switch ( inr->wordKind ) {
+  case WK_FIXED :
+    switch( inr->sign ) {
+    case SGN_UNSIGNED :
+      oss << "U" << 8*inr->wdim;
+      break;
+    case SGN_SIGNED :
+      oss << "S" << 8*inr->wdim;
+      break;
+    default :
+      fprintf( stderr, "%s: unknown wordSign\n", proc );
+      return -1;    
+    }
+    break;
+  case WK_FLOAT :
+    if ( inr->wdim == sizeof( float ) ) {
+      oss << "FLOAT";
+    }
+    else if ( inr->wdim  == sizeof( double ) ) {
+      oss << "DOUBLE";
+    }
+    else {
+      fprintf( stderr, "%s: unknown WK_FLOAT word dim\n", proc );
+      return -1;    
+    }
+    break;
+  default :
+    fprintf( stderr, "%s: unknown wordKind for image\n", proc );
+    return -1;  
+  }
+  oss << "\n";
+  
+  oss << "-dx "<< inr->vx <<"\n";
+  oss << "-dy "<< inr->vy <<"\n";
+  if ( inr->zdim > 1 )
+    oss << "-dz " << inr->vz << "\n";
+
+  if ( inr->wdim > 1 ) {
+    oss << "-bo ";
+    switch ( _getEndianness() ) {
+    default :
+    case END_LITTLE :
+      oss << "DCBA"; break;
+    case END_BIG :
+      oss << "ABCD"; break;
+    }
+    oss << "\n";
+  }
+  switch ( inr->dataMode ) {
+  default :
+  case DM_BINARY :
+    oss << "-om binar\n";
+    break;
+  case DM_ASCII :
+    oss << "-om ascii\n";
+  }
+  if( ImageIO_write( inr, oss.str().data(), oss.str().length()) == 0) {
+    return -1;
+  }
+  return 1;
+}
+
+
+CGAL_INLINE_FUNCTION
+int writeGisData( const _image*) 
+{
+  return -1;
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.cpp
new file mode 100644
index 0000000..6560f74
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "inr.h"
+#include "inr_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.h
new file mode 100644
index 0000000..5ec6460
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+
+#ifndef INR_H
+#define INR_H
+
+
+#include <CGAL/ImageIO.h>
+
+
+
+/** Writes the given inrimage header in an already opened file.
+    @param im image descriptor
+    @param end image data endianness (END_UNKNOWN to use architecture endianness) */
+int _writeInrimageHeader(const _image *im,
+			 ENDIANNESS end);
+
+/** Writes the given image body in an already opened file.
+    @param im image descriptor */
+int _writeInrimageData(const _image *im);
+
+/** read header from an opened inrimage file
+    @param im opened inrmage descriptor */
+int readInrimageHeader(const char *,_image *im);
+
+/** test if an image file has the Inrimage format, given the magic string
+    and filename
+    @param magic this string is of size 5 and corresponds to the first 4 characters of the file (terminated with a null character)
+    @param filename the file name
+    @return -1 if it is not an Inrimage file and 0 otherwise */
+int testInrimageHeader(char *magic,const char *filename); 
+
+/** calls _writeInrimageHeader and _writeInrimageData
+    @param basename the file name without any extension 
+    @param im structure
+    @return same as  _writeInrimageHeader*/
+int writeInrimage(char *basename,_image *im);
+/** creates an return the file format structure associated with the Inrimage file format */
+PTRIMAGE_FORMAT createInrimageFormat();
+
+#ifdef CGAL_HEADER_ONLY
+#include "inr_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr_impl.h
new file mode 100644
index 0000000..dc67262
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/inr_impl.h
@@ -0,0 +1,517 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include "fgetns.h"
+
+#include <string>
+#include <sstream>
+#include <string.h>
+
+/* Magic header for inrimages v4 */
+#define INR4_MAGIC "#INRIMAGE-4#{"
+
+
+/** Magic header for inrimages */
+#define INR_MAGIC "#INR"
+
+typedef struct stringListElementStruct {
+  char *string;
+  struct stringListElementStruct *next;
+} stringListElement;
+/* list element with a pointer on a string */
+
+typedef struct {
+  stringListElement *begin, *end;
+} stringListHead;
+/* string list descriptor */
+
+#include <clocale>
+class Set_numeric_locale {
+  const char * old_locale;
+public:
+  Set_numeric_locale(const char* locale) 
+    : old_locale(std::setlocale(LC_NUMERIC, locale))
+  {
+  }
+
+  ~Set_numeric_locale() {
+    std::setlocale(LC_NUMERIC, old_locale);
+  }
+};
+
+static void addStringElement(stringListHead *strhead,
+			     const char *str);
+/* add a string element at the tail of given list */
+
+static void concatStringElement(const stringListHead *strhead,
+				const char *str);
+/* concat given string at the last element of given list */
+
+
+/* Writes the given inrimage header in an already opened file.*/
+CGAL_INLINE_FUNCTION
+int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
+  unsigned int pos, i;
+  char type[30], endianness[5], buf[257], scale[20];
+  std::ostringstream oss;
+
+  Set_numeric_locale num_locale("C");
+
+  if(im->openMode != OM_CLOSE) {
+    /* fix word kind */
+    switch(im->wordKind) {
+
+    case WK_FLOAT:
+      sprintf(type, "float");
+      scale[0] = '\0';
+      break;
+
+    case WK_FIXED:
+      switch(im->sign) {
+      case SGN_SIGNED:
+	sprintf(type, "signed fixed");
+	break;
+      case SGN_UNSIGNED:
+	sprintf(type, "unsigned fixed");
+	break;
+      default:
+	return -1;
+      }
+      sprintf(scale, "SCALE=2**0\n");
+      break;
+      
+    default:
+      return -1;
+    }
+    
+    switch(end) {
+    case END_LITTLE:
+      sprintf(endianness, "decm");
+      break;
+    case END_BIG:
+      sprintf(endianness, "sun");
+      break;
+    default:
+      /* fix architecture endianness */
+      if( _getEndianness() == END_LITTLE)
+	sprintf(endianness, "decm");
+      else
+	sprintf(endianness, "sun");
+      break;
+    }
+
+    /* write header information */
+    oss << INR4_MAGIC << "\n";
+    oss << "XDIM=" << im->xdim << "\n";
+    oss << "YDIM=" << im->ydim << "\n";
+    oss << "ZDIM=" << im->zdim << "\n";
+    oss << "VDIM=" << im->vdim << "\n";
+    oss << "TYPE=" << type << "\n";
+    oss << "PIXSIZE=" << im->wdim*8 <<" bits\n";
+    oss << scale << "CPU=" << endianness << "\n";
+    oss << "VX=" << im->vx << "\n";
+    oss << "VY=" << im->vy << "\n";
+    oss << "VZ=" << im->vz << "\n";
+
+    if ( im->cx != 0 ) 
+      oss << "XO="<< im->cx << "\n";
+    if ( im->cy != 0 ) 
+      oss << "YO="<< im->cy << "\n";
+    if ( im->cz != 0 ) 
+      oss << "ZO="<< im->cz << "\n";
+    if ( im->tx != 0.0 ) 
+      oss << "TX="<< im->tx << "\n";
+    if ( im->ty != 0.0 ) 
+      oss << "TY="<< im->ty << "\n";
+    if ( im->tz != 0.0 ) 
+      oss << "TZ="<< im->tz << "\n";
+    if ( im->rx != 0.0 ) 
+      oss << "RX="<< im->rx <<"\n";
+    if ( im->ry != 0.0 ) 
+      oss << "RY="<< im->ry << "\n";
+    if ( im->rz != 0.0 ) 
+      oss << "RZ=" << im->rz <<"\n";
+
+    pos = oss.str().length();
+    
+    if(ImageIO_write(im, oss.str().data(), oss.str().length()) == 0)
+      return -1;
+    
+    
+    /* write user strings */
+    if ( im->user != NULL ) {
+      for(i = 0; i < im->nuser; i++) {
+	if ( im->user[i] == NULL ) continue;
+	pos += strlen(im->user[i]) + 2;
+	if(ImageIO_write(im, "#", 1) == 0) return -1;
+	if(ImageIO_write(im, im->user[i], strlen(im->user[i])) == 0) return -1;
+	if(ImageIO_write(im, "\n", 1) == 0) return -1;
+      }
+    }
+    /* write end of header */
+    pos = pos % 256;
+    if(pos > 252) {
+      for(i = pos; i < 256; i++)
+	if(ImageIO_write(im, "\n", 1) != 1) return -1;
+      pos = 0;
+    }
+    buf[0] = '\0';
+    for(i = pos; i < 252; i++) strcat(buf, "\n");
+    strcat(buf, "##}\n");
+    
+    if(ImageIO_write(im, buf, strlen(buf)) == 0) return -1;
+    else return 1;
+  }
+
+  else return -1;
+}
+
+
+
+/* Writes the given image body in an already opened file.*/
+CGAL_INLINE_FUNCTION
+int _writeInrimageData(const _image *im) {
+  unsigned long size, nbv, nwrt, i;
+  unsigned int v;
+  unsigned char **vp;
+  
+  if(im->openMode != OM_CLOSE) {
+
+    /* scalar or interlaced vectors */
+    if(im->vectMode != VM_NON_INTERLACED) {
+      size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim;
+      nwrt = ImageIO_write(im, im->data, size);
+      if(nwrt != size) return -1;
+      else return 1;
+    }
+
+    /* non interlaced vectors: interlace for saving */
+    else {
+      nbv = im->xdim * im->ydim * im->zdim;
+      size = im->xdim * im->ydim * im->zdim * im->wdim;
+      vp = (unsigned char **) ImageIO_alloc(im->vdim * sizeof(unsigned char *));
+      for(v = 0; v < im->vdim; v++)
+	vp[v] = (unsigned char *) im->data + v * size;
+      for(i = 0; i < nbv; i++)
+	for(v = 0; v < im->vdim; v++) {
+	  if(ImageIO_write(im, (const void *) vp[v], im->wdim) != im->wdim)
+	    return -1;
+	  vp[v] += im->wdim;
+	}
+      ImageIO_free(vp);
+      return 1;
+    }
+  }
+  else return -1;
+}
+
+
+
+
+/* read header of an opened inrimage */
+CGAL_INLINE_FUNCTION
+int readInrimageHeader(const char *,_image *im) {
+  char str[257];
+  int n, nusr;
+  stringListHead strl = { NULL, NULL };
+  stringListElement *oel, *el;
+
+  Set_numeric_locale num_locale("C");
+
+  if(im->openMode != OM_CLOSE) {
+    /* read image magic number */
+    if(!fgetns(str, 257, im )) return -1;
+    if(strcmp(str, INR4_MAGIC)) return -1;
+
+
+    /* while read line does not begin with '#' or '\n', read line
+       and decode field */
+    if(!fgetns(str, 257, im)) return -1;
+
+    while(str[0] != '#' && str[0] != '\0') {
+
+      if(!strncmp(str, "XDIM=", 5)) {
+        std::istringstream iss(str+5);
+        if(!(iss >> im->xdim)) return -1;
+      }
+      else if(!strncmp(str, "YDIM=", 5)) {
+        std::istringstream iss(str+5);
+        if(!(iss >> im->ydim)) return -1;
+      }
+      else if(!strncmp(str, "ZDIM=", 5)) {
+        std::istringstream iss(str+5);
+        if(!(iss >> im->zdim)) return -1;
+      }
+      else if(!strncmp(str, "VDIM=", 5)) {
+        std::istringstream iss(str+5);
+        if(!(iss >> im->vdim)) return -1;
+	if(im->vdim == 1) im->vectMode = VM_SCALAR;
+	else im->vectMode = VM_INTERLACED;
+      }
+      else if(!strncmp(str, "VX=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->vx)) return -1;
+      }
+      else if(!strncmp(str, "VY=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->vy)) return -1;
+      }
+      else if(!strncmp(str, "VZ=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->vz)) return -1;
+      }
+      else if(!strncmp(str, "TYPE=", 5)) {
+	if(!strncmp(str+5, "float", 5)) im->wordKind = WK_FLOAT;
+	else {
+	  if(!strncmp(str+5, "signed fixed", 12)) {
+	    im->wordKind = WK_FIXED;
+	    im->sign = SGN_SIGNED;
+	  }
+	  else if(!strncmp(str+5, "unsigned fixed", 14)) {
+	    im->wordKind = WK_FIXED;
+	    im->sign = SGN_UNSIGNED;
+	  }
+	  else return -1;
+	}
+      }
+      /* before "sscanf(str+8, "%i %n", &im->wdim, &n) != 1"
+	 was used. 
+	 However the man said 
+         ...
+	 n      Nothing is expected; instead, the number of charac­
+              ters consumed thus far from  the  input  is  stored
+              through  the  next pointer, which must be a pointer
+              to int.  This is not a conversion, although it  can
+              be  suppressed  with  the  *  flag.  The C standard
+              says: `Execution of a %n directive does not  incre­
+              ment  the  assignment count returned at the comple­
+              tion of execution' but  the  Corrigendum  seems  to
+              contradict  this.  Probably  it is wise not to make
+              any assumptions on the effect of %n conversions  on
+              the return value.
+	 ...
+	 Thus I change it. It was yielding a RETURN_FAILURE with 
+	 insight (GM).
+      */
+      else if(!strncmp(str, "PIXSIZE=", 8)) {
+        std::istringstream iss(str+8);
+        if(!(iss >> im->wdim)) return -1;
+	if(im->wdim != 8 && im->wdim != 16 && im->wdim != 32 &&
+	   im->wdim != 64) return -1;
+	
+	if ( im->wdim <= 9 ) {
+	  if(strncmp(str+8+1, " bits", 5)) return -1;
+	}
+	else if ( im->wdim <= 99 ) {
+	  if(strncmp(str+8+2, " bits", 5)) return -1;
+	}
+	else {
+	  return -1;
+	}
+
+	im->wdim >>= 3;
+      }
+      else if(!strncmp(str, "SCALE=", 6)) ;
+      else if(!strncmp(str, "CPU=", 4)) {
+	if(!strncmp(str+4, "decm", 4)) im->endianness = END_LITTLE;
+	else if(!strncmp(str+4, "alpha", 5)) im->endianness = END_LITTLE;
+	else if(!strncmp(str+4, "pc", 2)) im->endianness = END_LITTLE;
+	else if(!strncmp(str+4, "sun", 3)) im->endianness = END_BIG;
+	else if(!strncmp(str+4, "sgi", 3)) im->endianness = END_BIG;
+	else return -1;
+      }
+
+      else if(!strncmp(str, "XO=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->cx)) return -1;
+      }
+      else if(!strncmp(str, "YO=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->cy)) return -1;
+      }
+      else if(!strncmp(str, "ZO=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->cz)) return -1;
+      }
+
+      else if(!strncmp(str, "TX=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->tx)) return -1;
+      }
+      else if(!strncmp(str, "TY=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->ty)) return -1;
+      }
+      else if(!strncmp(str, "TZ=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->tz)) return -1;
+      }
+      else if(!strncmp(str, "RX=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->rx)) return -1;
+      }
+      else if(!strncmp(str, "RY=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->ry)) return -1;
+      }
+      else if(!strncmp(str, "RZ=", 3)) {
+        std::istringstream iss(str+3);
+        if(!(iss >> im->rz)) return -1;
+      }
+
+      if(!fgetns(str, 257, im)) return -1;
+    }
+
+    /* parse user strings */
+    im->nuser = nusr = 0;
+    while(str[0] == '#' && strncmp(str, "##}", 3)) {
+      addStringElement(&strl, str + 1);
+      while(strlen(str) == 256) {
+	if(!fgetns(str, 257, im)) return -1;
+	concatStringElement(&strl, str);
+      }
+      nusr++;
+      if(!fgetns(str, 257, im)) return -1;      
+    }
+    
+    /* go to end of header */
+    while(strncmp(str, "##}", 3)) {
+      if(!fgetns(str, 257, im)) return -1;
+    }
+    
+
+    /* check header validity */
+    if(im->xdim > 0 && im->ydim > 0 && im->zdim > 0 && im->vdim > 0 &&
+       im->vx > 0.0 && im->vy > 0.0 && im->vz > 0.0 &&
+       (im->wordKind == WK_FLOAT || (im->wordKind == WK_FIXED &&
+				     im->sign != SGN_UNKNOWN)) &&
+       im->endianness != END_UNKNOWN) {
+      if(nusr > 0) {
+	im->nuser = nusr;
+	im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
+	oel = NULL;
+	for(el = strl.begin, n = 0; el != NULL; el = oel, n++) {
+	  im->user[n] = el->string;
+	  oel = el->next;
+	  ImageIO_free(el);
+	}
+      }
+      return 0;
+    }
+    else return -1;
+
+  }
+  else return -1;
+}
+
+
+
+/* add a string element at the tail of given list */
+static void addStringElement(stringListHead *strhead, const char *str) {
+  stringListElement *el;
+
+  el = (stringListElement *) ImageIO_alloc(sizeof(stringListElement));
+  /* was strdup(str); */
+  el->string = (char*)ImageIO_alloc( strlen(str)+1);
+  memcpy(el->string, str,  strlen(str)+1);
+  el->next = NULL;
+  if(strhead->begin == NULL)
+    strhead->begin = strhead->end = el;
+  else {
+    strhead->end->next = el;
+    strhead->end = el;
+  }
+}
+
+
+/* concat given string at the last element of given list */
+static void concatStringElement(const stringListHead *strhead,
+				const char *str) {
+  stringListElement *el;
+
+  el = strhead->end;
+  el->string = (char *) realloc(el->string,
+				strlen(el->string) + strlen(str) + 1);
+  strcat(el->string, str);
+}
+
+CGAL_INLINE_FUNCTION
+int testInrimageHeader(char *magic,const char *) {
+  if (!strcmp(magic, INR_MAGIC))
+    return 0;
+  else 
+    return -1;
+}
+CGAL_INLINE_FUNCTION
+int writeInrimage(char *name,_image *im) {
+  int res;
+
+  _openWriteImage( im, name );
+
+  if(!im->fd) {
+    fprintf(stderr, "writeInrimage: error: unable to open file \'%s\'\n", name );
+    return ImageIO_OPENING;
+  }
+
+  res = _writeInrimageHeader(im, END_UNKNOWN);
+  if (res < 0) {
+    fprintf(stderr, "writeInrimage: error: unable to write header of \'%s\'\n",
+	    name);
+    ImageIO_close( im );
+    im->fd = NULL;
+    im->openMode = OM_CLOSE;
+    return( res );
+  }
+  
+  res = _writeInrimageData( im );
+  if (res < 0) {
+    fprintf(stderr, "writeInrimage: error: unable to write data of \'%s\'\n",
+	    name);
+    ImageIO_close( im );
+    im->fd = NULL;
+    im->openMode = OM_CLOSE;
+    return( res );
+  }
+
+  ImageIO_close( im );
+  im->fd = NULL;
+  im->openMode = OM_CLOSE;
+
+  return ( res );  
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createInrimageFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testInrimageHeader;
+  f->readImageHeader=&readInrimageHeader;
+  f->writeImage=&writeInrimage;
+  strcpy(f->fileExtension,".inr,.inr.gz,.gradient,.gradient.gz,.gradient_direction,.gradient_direction.gz");
+  strcpy(f->realName,"Inrimage");
+  return f;
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.cpp
new file mode 100644
index 0000000..7113137
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "iris.h"
+#include "iris_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.h
new file mode 100644
index 0000000..81eb52e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef IRIS_H
+#define IRIS_H
+
+#include <CGAL/ImageIO.h>
+
+
+
+PTRIMAGE_FORMAT createIrisFormat();
+int readIrisImage( const char *name, _image *im );
+int testIrisHeader(char *magic,const char *name);
+
+#ifdef CGAL_HEADER_ONLY
+#include <CGAL/iris_impl.h>
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris_impl.h
new file mode 100644
index 0000000..c42f296
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/iris_impl.h
@@ -0,0 +1,499 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*
+ * xviris.c - load routine for IRIS 'rgb' format pictures
+ *
+ * LoadIRIS()
+ * WriteIRIS()
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+
+
+/** Magic header for RGB files */
+#define IRIS_MAGIC 0732
+
+
+
+typedef unsigned char byte;
+
+#define BPPMASK			0x00ff
+#define ITYPE_VERBATIM		0x0000
+#define ITYPE_RLE		0x0100
+#define ISRLE(type)		(((type) & 0xff00) == ITYPE_RLE)
+#define ISVERBATIM(type)	(((type) & 0xff00) == ITYPE_VERBATIM)
+#define BPP(type)		((type) & BPPMASK)
+#define RLE(bpp)		(ITYPE_RLE | (bpp))
+#define VERBATIM(bpp)		(ITYPE_VERBATIM | (bpp))
+
+
+
+
+
+
+#define TAGLEN	(5)
+
+#define RINTLUM (79)
+#define GINTLUM (156)
+#define BINTLUM (21)
+
+#define OFFSET_R	3	/* this is byte order dependent */
+#define OFFSET_G	2
+#define OFFSET_B	1
+#define OFFSET_A	0
+
+#define ILUM(r,g,b)     ((int)(RINTLUM*(r)+GINTLUM*(g)+BINTLUM*(b))>>8)
+#define CHANOFFSET(z)	(3-(z))	/* this is byte order dependent */
+
+static byte    *getimagedata  (const _image *im, unsigned short, int, int, int);
+static void     interleaverow (byte *, byte *, int, int);
+static void     expandrow     (byte *, byte *, int);
+static void     readtab       (const _image *im, unsigned long *, int);
+static void     addimgtag     (byte *, int, int);
+
+
+static unsigned short  getshort      (const _image *im);
+static unsigned long   getlong       (const _image *im);
+
+
+CGAL_INLINE_FUNCTION
+int testIrisHeader(char *magic,const char *) {
+  if((((unsigned char *)magic)[0]<<8) + ((unsigned char *)magic)[1]
+     == IRIS_MAGIC)
+    return 0;
+  else 
+    return -1;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createIrisFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testIrisHeader;
+  f->readImageHeader=&readIrisImage;
+  f->writeImage=0;
+  strcpy(f->fileExtension,".rgb");
+  strcpy(f->realName,"IRIS");
+  return f;
+}
+
+
+
+/******************************************/
+static void interleaverow(byte *lptr, byte *cptr, int z, int n)
+{
+  lptr += z;
+  while(n--) {
+    *lptr = *cptr++;
+    lptr += 4;
+  }
+}
+
+
+/******************************************/
+static void expandrow(byte *optr, byte *iptr, int z)
+{
+  byte pixel, count;
+
+  optr += z;
+  while (1) {
+    pixel = *iptr++;
+    if ( !(count = (pixel & 0x7f)) ) return;
+    if (pixel & 0x80) {
+      while (count>=8) {
+	optr[0*4] = iptr[0];
+	optr[1*4] = iptr[1];
+	optr[2*4] = iptr[2];
+	optr[3*4] = iptr[3];
+	optr[4*4] = iptr[4];
+	optr[5*4] = iptr[5];
+	optr[6*4] = iptr[6];
+	optr[7*4] = iptr[7];
+	optr += 8*4;
+	iptr += 8;
+	count -= 8;
+      }
+      while(count--) {
+	*optr = *iptr++;
+	optr+=4;
+      }
+    }
+    else {
+      pixel = *iptr++;
+      while(count>=8) {
+	optr[0*4] = pixel;
+	optr[1*4] = pixel;
+	optr[2*4] = pixel;
+	optr[3*4] = pixel;
+	optr[4*4] = pixel;
+	optr[5*4] = pixel;
+	optr[6*4] = pixel;
+	optr[7*4] = pixel;
+	optr += 8*4;
+	count -= 8;
+      }
+      while(count--) {
+	*optr = pixel;
+	optr+=4;
+      }
+    }
+  }
+}
+
+/****************************************************/
+static void readtab(const _image *im, unsigned long *tab, int n)
+{
+  while (n) {
+    *tab++ = getlong(im);
+    n--;
+  }
+}
+
+
+/*****************************************************/
+static void addimgtag(byte *dptr, int xsize, int ysize)
+{
+  /* this is used to extract image data from core dumps. 
+     I doubt this is necessary...  --jhb */
+
+  dptr    = dptr + (xsize * ysize * 4);
+  dptr[0] = 0x12;  dptr[1] = 0x34;  dptr[2] = 0x56;  dptr[3] = 0x78;
+  dptr += 4;
+
+  dptr[0] = 0x59;  dptr[1] = 0x49;  dptr[2] = 0x33;  dptr[3] = 0x33;
+  dptr += 4;
+
+  dptr[0] = 0x69;  dptr[1] = 0x43;  dptr[2] = 0x42;  dptr[3] = 0x22;
+  dptr += 4;
+
+  dptr[0] = (xsize>>24)&0xff;
+  dptr[1] = (xsize>>16)&0xff;
+  dptr[2] = (xsize>> 8)&0xff;
+  dptr[3] = (xsize    )&0xff;
+  dptr += 4;
+
+  dptr[0] = (ysize>>24)&0xff;
+  dptr[1] = (ysize>>16)&0xff;
+  dptr[2] = (ysize>> 8)&0xff;
+  dptr[3] = (ysize    )&0xff;
+}
+
+/* byte order independent read/write of shorts and longs. */
+/*****************************************************/
+static unsigned short getshort( const _image *im)
+{
+  byte buf[2];
+  ImageIO_read( im, buf, (size_t) 2);
+  return (buf[0]<<8)+(buf[1]<<0);
+}
+
+/*****************************************************/
+static unsigned long getlong( const _image *im )
+{
+  byte buf[4];
+  ImageIO_read( im, buf, (size_t) 4);
+  return (((unsigned long) buf[0])<<24) + (((unsigned long) buf[1])<<16)
+       + (((unsigned long) buf[2])<<8) + buf[3];
+}
+
+/*****************************************************/
+CGAL_INLINE_FUNCTION
+int readIrisImage( const char *, _image *im ) {
+  byte   *rawdata, *rptr;
+  byte   *pic824,  *bptr, *iptr;
+  int     i, j, size;
+  unsigned short imagic, type;
+  int xsize, ysize, zsize;
+
+
+  /* read header information from file */
+  imagic = getshort( im );
+  type   = getshort( im );
+  getshort( im );
+  xsize  = getshort( im );
+  ysize  = getshort( im );
+  zsize  = getshort( im );
+
+  if ( ImageIO_error(im) ) return( 0 );
+
+  if (imagic != IRIS_MAGIC) return( 0 );
+
+  rawdata = getimagedata(im, type, xsize, ysize, zsize);
+  if (!rawdata) return( 0 );
+
+  if ( ImageIO_error(im) ) return( 0 );   /* probably truncated file */
+
+
+  /*  t1=texture_alloc();
+  (void) strcpy(t1->name,fname);
+  t1->type=IRIS;
+  
+  t1->nrows = ysize;
+  t1->ncols = xsize;
+    
+  t1->image = create_int_array(t1->nrows,t1->ncols);*/
+
+  /* got the raw image data.  Convert to an XV image (1,3 bytes / pix) */
+  if (zsize < 3) 
+    {  /* grayscale */
+      im->xdim = xsize;
+      im->ydim = ysize;
+      im->zdim = 1;
+      im->vdim = 1;
+      im->wdim = 1;
+      im->wordKind = WK_FIXED;
+      im->sign = SGN_UNSIGNED;
+      im->data = ImageIO_alloc(xsize * ysize);
+
+      pic824 = (byte *) ImageIO_alloc((size_t) xsize * ysize);
+      if (!pic824) exit(-1);
+      
+      /* copy plane 3 from rawdata into pic824, inverting pic vertically */
+      for (i = 0, bptr = pic824; i < (int) ysize; i++) 
+	{
+	  rptr = rawdata + 3 + ((ysize - 1) - i) * (xsize * 4);
+	  for (j = 0; j < (int) xsize; j++, bptr++, rptr += 4)
+	    *bptr = *rptr;
+	}
+      
+      
+      size = im->xdim * im->ydim;
+      for (bptr = pic824, iptr = (unsigned char *) im->data,
+	     i = 0; i < size; ++i, ++iptr, ++bptr)
+	{
+	  *iptr = *bptr;
+	}
+      
+      ImageIO_free(pic824);
+    
+  }
+
+  else {  /* truecolor */
+    im->xdim = xsize;
+    im->ydim = ysize;
+    im->zdim = zsize / 3;
+    im->vdim = 4;
+    im->wdim = 1;
+    im->wordKind = WK_FIXED;
+    im->sign = SGN_UNSIGNED;
+    im->data = ImageIO_alloc(xsize * ysize * im->zdim * 4);
+
+    pic824 = (byte *) ImageIO_alloc((size_t) xsize * ysize * 3);
+    if (!pic824) 
+      exit(1);
+    
+    /* copy plane 3 from rawdata into pic824, inverting pic vertically */
+    for (i = 0, bptr = pic824; i<(int) ysize; i++) 
+      {
+	rptr = rawdata + ((ysize - 1) - i) * (xsize * 4);
+
+	for (j=0; j<(int) xsize; j++, rptr += 4) {
+	  *bptr++ = rptr[3];
+	  *bptr++ = rptr[2];
+	  *bptr++ = rptr[1];
+	}
+      }
+    
+    
+    size = im->xdim * im->ydim;
+    for (bptr = pic824, iptr = (unsigned char *) im->data, i = 0;
+	 i < size; ++i, iptr += 4, bptr += 3)
+      {
+	if ( _getEndianness() == END_LITTLE ) {
+	  iptr[0] = 0xFF;
+	  iptr[1] = bptr[2];
+	  iptr[2] = bptr[1];
+	  iptr[3] = bptr[0];
+	}
+	else {
+	  iptr[0] = bptr[0];
+	  iptr[1] = bptr[1];
+	  iptr[2] = bptr[2];
+	  iptr[3] = 0xFF;
+	}
+      }
+      ImageIO_free(pic824);
+  }
+
+  ImageIO_free(rawdata);
+
+  return 1;
+}     
+
+
+
+
+/****************************************************/
+static byte *getimagedata(const _image *im, unsigned short type, int xsize, int ysize,
+			  int zsize)
+{
+  /* read in a B/W RGB or RGBA iris image file and return a 
+     pointer to an array of 4-byte pixels, arranged ABGR, NULL on error */
+
+  byte   *base, *lptr;
+  byte   *verdat;
+  int     y, z, tablen;
+  int     bpp, rle, badorder;
+  int     rlebuflen;
+  byte *rledat;
+  unsigned long *starttab, *lengthtab, cur;
+
+
+  rle     = ISRLE(type);
+  bpp     = BPP(type);
+
+  if (bpp != 1) {
+    return (byte *) NULL;
+  }
+
+  if (rle) {
+
+    rlebuflen = 2 * xsize + 10;
+    tablen    = ysize * zsize;
+    starttab  = (unsigned long *) ImageIO_alloc((size_t) tablen * sizeof(long));
+    lengthtab = (unsigned long *) ImageIO_alloc((size_t) tablen * sizeof(long));
+    rledat    = (byte *)   ImageIO_alloc((size_t) rlebuflen);
+
+    if (!starttab || !lengthtab || !rledat) 
+      exit(1);
+
+    ImageIO_seek( im, 512L, SEEK_SET );
+    readtab(im, starttab,  tablen);
+    readtab(im, lengthtab, tablen);
+
+    if ( ImageIO_error(im) ) {
+      ImageIO_free(starttab);  ImageIO_free(lengthtab);  ImageIO_free(rledat);
+      return (byte *) NULL;
+    }
+
+
+    /* check data order */
+    cur = 0;
+    badorder = 0;
+    for (y=0; y<ysize && !badorder; y++) {
+      for (z=0; z<zsize && !badorder; z++) {
+	if (starttab[y+z*ysize] < cur) badorder = 1;
+	else cur = starttab[y+z*ysize];
+      }
+    }
+
+    ImageIO_seek( im, (long) (512 + 2*tablen*4), 0);
+
+    cur = 512 + 2*tablen*4;
+
+    base = (byte *) ImageIO_alloc((size_t) (xsize*ysize+TAGLEN) * 4);
+    if (!base) 
+      exit(1);
+
+    addimgtag(base,xsize,ysize);
+
+    if (badorder) {
+      for (z=0; z<zsize; z++) {
+	lptr = base;
+	for (y=0; y<ysize; y++) {
+	  if (cur != starttab[y+z*ysize]) {
+	    ImageIO_seek( im, (long) starttab[y+z*ysize], 0);
+	    cur = starttab[y+z*ysize];
+	  }
+
+	  if (lengthtab[y+z*ysize]>(unsigned long)rlebuflen) {
+	    ImageIO_free(starttab); ImageIO_free(lengthtab); ImageIO_free(rledat); ImageIO_free(base);
+	    return (byte *) NULL;
+	  }
+	  ImageIO_read(im, rledat, (size_t) lengthtab[y+z*ysize]);
+	  cur += lengthtab[y+z*ysize];
+	  expandrow(lptr,rledat,3-z);
+	  lptr += (xsize * 4);
+	}
+      }
+    }
+    else {
+      lptr = base;
+      for (y=0; y<ysize; y++) {
+	for (z=0; z<zsize; z++) {
+	  if (cur != starttab[y+z*ysize]) {
+	    ImageIO_seek( im, (long) starttab[y+z*ysize], 0);
+	    cur = starttab[y+z*ysize];
+	  }
+	  
+	  ImageIO_read(im, rledat, (size_t) lengthtab[y+z*ysize]);
+	  cur += lengthtab[y+z*ysize];
+	  expandrow(lptr,rledat,3-z);
+	}
+	lptr += (xsize * 4);
+      }
+    }
+
+    ImageIO_free(starttab);
+    ImageIO_free(lengthtab);
+    ImageIO_free(rledat);
+    return base;
+  }      /* end of RLE case */
+
+  else {  /* not RLE */
+    verdat = (byte *) ImageIO_alloc((size_t) xsize);
+    base   = (byte *) ImageIO_alloc((size_t) (xsize*ysize+TAGLEN) * 4);
+    if (!base || !verdat) 
+      exit(1);
+
+    addimgtag(base,xsize,ysize);
+
+    ImageIO_seek( im, 512L,0);
+
+    for (z=0; z<zsize; z++) {
+      lptr = base;
+      for (y=0; y<ysize; y++) {
+	ImageIO_read(im, verdat, (size_t) xsize);
+	interleaverow(lptr,verdat,3-z,xsize);
+	lptr += (xsize * 4);
+      }
+    }
+
+    ImageIO_free(verdat);
+    return base;
+  }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.cpp
new file mode 100644
index 0000000..8bf8b33
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "mincio.h"
+#include "mincio_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.h
new file mode 100644
index 0000000..46cd034
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio.h
@@ -0,0 +1,77 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef MINCIO_H
+#define MINCIO_H
+
+#ifdef MINC_FILES
+
+#include <CGAL/ImageIO.h>
+#include <minc.h>
+
+
+/** read an image from a minc file
+    @param im image structure
+    @param name image file name
+    @param startx returned X coordinate of origin vertor
+    @param starty returned Y coordinate of origin vertor
+    @param startz returned Z coordinate of origin vertor
+    @param stepx returned X coordinate of step vertor
+    @param stepy returned Y coordinate of step vertor
+    @param stepz returned Z coordinate of step vertor
+    @param Xcosine 3 dimensional array containing X axis cosine directions
+    @param Ycosine 3 dimensional array containing Y axis cosine directions
+    @param Zcosine 3 dimensional array containing Z axis cosine directions
+    @return a negative value in case of failure */
+int readMincHeader(_image *im, const char* name,
+		   double *startx, double *starty, double *startz,
+		   double *stepx, double *stepy, double *stepz,
+		   double *Xcosine, double *Ycosine, double *Zcosine);
+
+/** write an image in a minc file
+    @param im image structure
+    @param name image file name
+    @param sourceName original minc file name
+    @param startx origin X coordinate
+    @param starty origin Y coordinate
+    @param startz origin Z coordinate
+    @param stepx returned X coordinate of step vertor
+    @param stepy returned Y coordinate of step vertor
+    @param stepz returned Z coordinate of step vertor
+    @param Xcosine 3 dimensional array containing X axis cosine directions
+    @param Ycosine 3 dimensional array containing Y axis cosine directions
+    @param Zcosine 3 dimensional array containing Z axis cosine directions
+    @param range 2 dimensional array containing min an max image intensity
+    @return a negative value in case of failure */
+int writeMincFile( const _image* im, const char *name, const char *sourceName,
+		   double startx, double starty, double startz,
+		   double stepx, double stepy, double stepz,
+		   const double *Xcosine, const double *Ycosine,
+		   const double *Zcosine, const double *range );
+
+
+#endif
+
+#ifdef CGAL_HEADER_ONLY
+#include "mincio_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio_impl.h
new file mode 100644
index 0000000..a8ff990
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/mincio_impl.h
@@ -0,0 +1,502 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#ifdef _MSC_VER
+#pragma warning ( disable : 4068 4786 4081 )
+#endif
+
+#ifdef MINC_FILES
+
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+
+
+/** Magic header for MINC (MNI NetCDF) file format */
+#ifdef MINC_FILES
+#  define MINC_MAGIC "CDF"
+#endif
+
+
+CGAL_INLINE_FUNCTION
+int readMincHeader(_image *im, const char* filename,
+		   double *startx, double *starty, double *startz,
+		   double *stepx, double *stepy, double *stepz,
+		   double *Xcosines, double *Ycosines, double *Zcosines) {
+  int fin, varid, minc_icv, id, ndims, i, dim[256], length,
+    minfound = 0, maxfound = 0;
+  long start[3] = {0, 0, 0}, count[3];
+  unsigned int plane1, plane2, line, shift[3], ct[3];
+  nc_type type;
+  char sign_type[MI_MAX_ATTSTR_LEN], name[MAX_NC_NAME];
+  void *data;
+  double range[2], swap;
+
+  /* open minc file */
+  fin = miopen((char *) filename, NC_NOWRITE);
+  if(fin == MI_ERROR) return 0;
+
+  /* get number of dimensions and type */
+  id = ncvarid(fin, MIimage);
+  (void) ncvarinq(fin, id, NULL, &type, &ndims, dim, NULL);
+  if(ndims != 3) {
+    fprintf(stderr, "unsupported %i dimensional minc file\n", ndims);
+    return 0;
+  }
+
+  /* get sign */
+  if ((miattgetstr(fin, id, MIsigntype, MI_MAX_ATTSTR_LEN, sign_type)
+       == NULL) || ((strcmp(sign_type, MI_UNSIGNED)!=0) && 
+		    (strcmp(sign_type, MI_SIGNED)!=0))) {
+    if (type == NC_BYTE)
+      (void) strcpy(sign_type, MI_UNSIGNED);
+    else
+      (void) strcpy(sign_type, MI_SIGNED);
+  }
+  im->sign = (!strcmp(sign_type, MI_UNSIGNED)) ? SGN_UNSIGNED : SGN_SIGNED;
+  
+  switch(type) {
+  case NC_CHAR:
+  case NC_BYTE:
+    im->wdim = 1;
+    im->wordKind = WK_FIXED;
+    im->sign = SGN_UNSIGNED;
+    break;
+  case NC_SHORT:
+    im->wdim = 2;
+    im->wordKind = WK_FIXED;
+    break;
+  case NC_LONG:
+    im->wdim = 4;
+    im->wordKind = WK_FIXED;
+    break;
+  case NC_FLOAT:
+    im->wdim = 4;
+    im->wordKind = WK_FLOAT;
+    im->sign = SGN_UNKNOWN;
+    break;
+  case NC_DOUBLE:
+    im->wdim = 8;
+    im->wordKind = WK_FLOAT;
+    im->sign = SGN_UNKNOWN;
+    break;
+  default:
+    fprintf(stderr, "unsupported minc type\n");
+    return 0;
+    break;
+  }
+
+
+  /* get dimensions length and voxel size */
+  ncopts = 0;
+  for(i = 0; i < ndims; i++) {
+    (void) ncdiminq(fin, dim[i], name, &count[i]);
+    varid = ncvarid(fin, name);
+    if(!strcmp(name, MIxspace)) {
+      im->xdim = count[i];
+      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepx) == MI_ERROR)
+	*stepx = 1.0;
+      im->vx = fabs(*stepx);
+      if(miattget1(fin, varid, MIstart, NC_DOUBLE, startx) == MI_ERROR)
+	*startx = 0.0;
+      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
+		  (void *) Xcosines, (int *) 0) == MI_ERROR ) {
+	Xcosines[0] = 0.0;
+	Xcosines[1] = 0.0;
+	Xcosines[2] = 0.0;
+      }
+    }
+    else if(!strcmp(name, MIyspace)) {
+      im->ydim = count[i];
+      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepy) == MI_ERROR)
+	*stepy = 1.0;
+      im->vy = fabs(*stepy);
+      if(miattget1(fin, varid, MIstart, NC_DOUBLE, starty) == MI_ERROR)
+	*starty = 0.0;
+      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
+		  (void *) Ycosines, (int *) 0) == MI_ERROR ) {
+	Ycosines[0] = 0.0;
+	Ycosines[1] = 0.0;
+	Ycosines[2] = 0.0;
+      }
+    }
+    else if(!strcmp(name, MIzspace)) {
+      im->zdim = count[i];
+      if(miattget1(fin, varid, MIstep, NC_DOUBLE, stepz) == MI_ERROR)
+	*stepz = 1.0;
+      im->vz = fabs(*stepz);
+      if(miattget1(fin, varid, MIstart, NC_DOUBLE, startz) == MI_ERROR)
+	*startz = 0.0;
+      if(miattget(fin, varid, MIdirection_cosines, NC_DOUBLE, 3,
+		  (void *) Zcosines, (int *) 0) == MI_ERROR ) {
+	Zcosines[0] = 0.0;
+	Zcosines[1] = 0.0;
+	Zcosines[2] = 0.0;
+      }
+    } else {
+      fprintf(stderr, "unsupported dimension %s\n", name);
+      return 0;
+    }
+  }
+
+
+  if( miattget( fin, id, MIvalid_range, NC_DOUBLE, 2,
+		(void *) range, &length) == MI_ERROR || length != 2 ) {
+    if( miattget1( fin, id, MIvalid_min, NC_DOUBLE,
+		   (void *) &range[0] ) != MI_ERROR )
+      minfound = 1;
+    if( miattget1( fin, id, MIvalid_max, NC_DOUBLE,
+		   (void *) &range[1] ) != MI_ERROR )
+      maxfound = 1;
+  }
+  else {
+    if( range[0] > range[1] ) {
+      swap = range[0];
+      range[0] = range[1];
+      range[1] = swap;
+    }
+    minfound = 1;
+    maxfound = 1;
+  }
+  
+  if(!minfound) {
+    switch(type) {
+    case NC_CHAR:
+    case NC_BYTE:
+      range[0] = 0;
+      break;
+    case NC_SHORT:
+      if(im->sign == SGN_SIGNED) range[0] = -32768.0;
+      else range[0] = 0;
+      break;
+    case NC_LONG:
+      if(im->sign == SGN_SIGNED) range[0] = -2147483648.0;
+      else range[0] = 0;
+      break;
+    default:
+      range[0] = 0.0;
+      break;
+    }
+  }
+  if(!maxfound) {
+    switch(type) {
+    case NC_CHAR:
+    case NC_BYTE:
+      range[1] = 255.0;
+      break;
+    case NC_SHORT:
+      if(im->sign == SGN_SIGNED) range[1] = 32767.0;
+      else range[1] = 65535.0;
+      break;
+    case NC_LONG:
+      if(im->sign == SGN_SIGNED) range[1] = 2147483647.0;
+      else range[1] = 4294967295.0;
+      break;
+    default:
+      range[1] = 1.0;
+      break;
+    }
+  }
+
+  ncopts = NC_VERBOSE | NC_FATAL;
+  im->vdim = 1;
+
+  /* read data bytes */
+  im->data = ImageIO_alloc(im->xdim * im->ydim * im->zdim * im->vdim *
+			   im->wdim);
+
+  minc_icv = miicv_create();
+  (void) miicv_setint( minc_icv, MI_ICV_TYPE, type );
+  (void) miicv_setstr( minc_icv, MI_ICV_SIGN, sign_type );
+  (void) miicv_setint( minc_icv, MI_ICV_DO_NORM, 1 );
+  (void) miicv_setint( minc_icv, MI_ICV_DO_FILLVALUE, 1 );
+  (void) miicv_setdbl( minc_icv, MI_ICV_VALID_MIN, range[0] );
+  (void) miicv_setdbl( minc_icv, MI_ICV_VALID_MAX, range[1] );
+
+  (void) miicv_attach( minc_icv, fin, id );
+
+  if(miicv_get(minc_icv, start, count, im->data) ==  MI_ERROR) {
+    fprintf(stderr, "error while reading file\n");
+    return 0;
+  }
+  (void) miicv_detach( minc_icv );
+  (void) miicv_free( minc_icv );
+
+  ImageIO_closeImage(im);
+
+  /* order data in ZYX */
+  (void) ncdiminq(fin, dim[0], name, NULL);
+  if(!strcmp(name, MIzspace)) {
+    (void) ncdiminq(fin, dim[1], name, NULL);
+    /* file is ZYX */
+    if(!strcmp(name, MIyspace)) {
+      miclose(fin);
+      return 1;
+    }
+  }
+
+  (void) ncdiminq(fin, dim[0], name, NULL);
+  /* file is ZXY */
+  if(!strcmp(name, MIzspace)) {
+    shift[0] = 0;
+    shift[1] = 2;
+    shift[2] = 1;
+    plane2 = im->xdim * im->ydim;
+    line = im->ydim;
+  }
+  /* file is Y first */
+  else if(!strcmp(name, MIyspace)) {
+    shift[0] = 1;
+    plane2 = im->xdim * im->zdim;
+    (void) ncdiminq(fin, dim[1], name, NULL);
+    /* file is YXZ */
+    if(!strcmp(name, MIxspace)) {
+      shift[1] = 2;
+      shift[2] = 0;
+      line = im->zdim;
+    }
+    /* file is YZX */
+    else {
+      shift[1] = 0;
+      shift[2] = 2;
+      line = im->xdim;
+    }
+  }
+  /* file is X first */
+  else {
+    shift[0] = 2;
+    plane2 = im->ydim * im->zdim;
+    (void) ncdiminq(fin, dim[1], name, NULL);
+    /* file is XYZ */
+    if(!strcmp(name, MIyspace)) {
+      shift[1] = 1;
+      shift[2] = 0;
+      line = im->zdim;
+    }
+    /* file is XZY */
+    else {
+      shift[1] = 0;
+      shift[2] = 1;
+      line = im->ydim;
+    }
+  }
+  
+  data = ImageIO_alloc(im->xdim * im->ydim * im->zdim * im->vdim * im->wdim);
+  plane1 = im->xdim * im->ydim;
+  
+  for(ct[0] = 0; ct[0] < im->zdim; ct[0]++) {
+    for(ct[1] = 0; ct[1] < im->ydim; ct[1]++) {
+      for(ct[2] = 0; ct[2] < im->xdim; ct[2]++) {
+	memcpy((unsigned char *) data +
+	       (ct[0] * plane1 + ct[1] * im->xdim + ct[2]) * im->wdim,
+	       (unsigned char *) im->data +
+	       (ct[shift[0]] * plane2 + ct[shift[1]] * line + ct[shift[2]])
+	       * im->wdim, im->wdim);
+      }
+    }
+  }
+
+  ImageIO_free(im->data);
+  im->data = data;
+
+  /* close file */
+  miclose(fin);
+  return 1;
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int writeMincFile( const _image* im, const char *filename,
+		   const char *sourcename,
+		   double startx, double starty, double startz,
+		   double stepx, double stepy, double stepz,
+		   const double *Xcosine, const double *Ycosine,
+		   const double *Zcosine, const double *range ) {
+  int i, cdfid, minc_icv, dim_vars[3], dim_ids[3], img_var_id, min_id, max_id,
+    src_cdfid, src_img_var, varid, n_excluded, excluded_vars[10],
+    src_min_id, src_max_id, src_root_id, old_att_length, same_file = 0;
+  long org[3] = {0, 0, 0}, count[3] = { im->zdim, im->ydim, im->xdim };
+  char *dim_names[3] = { MIzspace, MIyspace, MIxspace }, *history,
+       *excluded_list[3] = { MIxspace, MIyspace, MIzspace }, *newname;
+  nc_type type, datatype;
+  double start[3] = { startz, starty, startx },
+	    vx[3] = { stepz, stepy, stepx };
+
+  /* if filename is the same file that sourcename, it is needed to create
+     a temporary file for output */
+  newname = (char *) filename;
+  if(sourcename) {
+    struct stat out, org;
+    same_file = (stat(sourcename, &org) == 0) && (stat(filename, &out) == 0)
+      && (org.st_ino == out.st_ino);
+    if(same_file) {
+      newname = (char *) malloc((strlen(filename) + 10) * sizeof(char));
+      for(i = strlen(filename) - 1; i > 0 && filename[i] != '/'; i--) ;
+      if(filename[i] == '/') {
+	strncpy(newname, filename, i + 1);
+	newname[i+1] = '\0';
+	strcat(newname, "#TMP#");
+	strcat(newname, filename + i + 1);
+      }
+      else
+	sprintf(newname, "#TMP#%s", filename);
+    } 
+  }
+
+  /* open file */
+  cdfid = micreate( (char *) newname, NC_CLOBBER );
+  if( cdfid == MI_ERROR ) {
+    fprintf(stderr, "Error: opening MINC file \"%s\".\n", filename );
+    return -1;
+  }
+
+  /* set word type */
+  switch(im->wordKind) {
+  case WK_FIXED:
+    if(im->wdim == 1) type = NC_BYTE;
+    else if(im->wdim == 2) type = NC_SHORT;
+    else type = NC_LONG;
+    break;
+  case WK_FLOAT:
+  default:
+    if(im->wdim == 4) type = NC_FLOAT;
+    else type = NC_DOUBLE;    
+    break;
+  }
+
+  /* create dimensions variables */
+  for(i = 0; i < 3; i++)
+    dim_vars[i] = ncdimdef( cdfid, dim_names[i], count[i] );
+
+  for(i = 0; i < 3; i++ ) {
+    dim_ids[i] = micreate_std_variable( cdfid, dim_names[i], NC_DOUBLE,
+					0, NULL);
+    if( dim_ids[i] < 0 ) return -1;
+    (void) miattputdbl( cdfid, dim_ids[i], MIstep, vx[i]);
+    (void) miattputdbl( cdfid, dim_ids[i], MIstart, start[i]);
+  }
+  if(Zcosine[0] != 0.0 || Zcosine[1] != 0.0 || Zcosine[2] != 0.0)
+    (void) ncattput(cdfid, dim_ids[0], MIdirection_cosines, NC_DOUBLE, 3,
+		    Zcosine);
+  if(Ycosine[0] != 0.0 || Ycosine[1] != 0.0 || Ycosine[2] != 0.0)
+    (void) ncattput(cdfid, dim_ids[1], MIdirection_cosines, NC_DOUBLE, 3,
+		    Ycosine);
+  if(Xcosine[0] != 0.0 || Xcosine[1] != 0.0 || Xcosine[2] != 0.0)
+    (void) ncattput(cdfid, dim_ids[2], MIdirection_cosines, NC_DOUBLE, 3,
+		    Xcosine);
+
+  /* create image variable */
+  img_var_id = micreate_std_variable( cdfid, MIimage, type, 3, dim_vars );
+  (void) miattputstr( cdfid, img_var_id, MIcomplete, MI_FALSE );
+  if(im->sign == SGN_SIGNED)
+    (void) miattputstr( cdfid, img_var_id, MIsigntype, MI_SIGNED );
+  else
+    (void) miattputstr( cdfid, img_var_id, MIsigntype, MI_UNSIGNED );
+  (void) ncattput(cdfid, img_var_id, MIvalid_range ,NC_DOUBLE, 2, range);
+    
+  min_id = micreate_std_variable(cdfid, MIimagemin, NC_DOUBLE, 0, 0 );
+  max_id = micreate_std_variable(cdfid, MIimagemax, NC_DOUBLE, 0, 0 );
+
+  /* if the image comes from a minc file, duplicate all minc attributes */
+  if(sourcename) {
+    if( (src_cdfid = miopen((char *) sourcename, NC_NOWRITE)) == MI_ERROR ) {
+      fprintf(stderr, "Error opening %s\n", sourcename );
+      return -1;
+    }
+
+    n_excluded = 0;
+    for( i = 0; i < 3; i++ ) {
+      if( (varid = ncvarid(src_cdfid, excluded_list[i] )) != MI_ERROR )
+	excluded_vars[n_excluded++] = varid;
+    }
+    
+    if( (src_img_var = ncvarid(src_cdfid, MIimage )) != MI_ERROR )
+      excluded_vars[n_excluded++] = src_img_var;
+    if( (src_max_id = ncvarid(src_cdfid, MIimagemax )) != MI_ERROR )
+      excluded_vars[n_excluded++] = src_max_id;
+    if( (src_min_id = ncvarid(src_cdfid, MIimagemin )) != MI_ERROR )
+      excluded_vars[n_excluded++] = src_min_id;
+    if( (src_root_id = ncvarid(src_cdfid, MIrootvariable )) != MI_ERROR )
+      excluded_vars[n_excluded++] = src_root_id;
+    
+    (void) micopy_all_var_defs( src_cdfid, cdfid, n_excluded, excluded_vars );
+    
+    if( src_img_var != MI_ERROR )
+      (void) micopy_all_atts( src_cdfid, src_img_var, cdfid, img_var_id );
+    if( src_root_id != MI_ERROR )
+      (void) micopy_all_atts( src_cdfid, src_root_id, cdfid,
+			      ncvarid( cdfid, MIrootvariable) );
+
+    ncopts = 0;
+    if(ncattinq(cdfid, NC_GLOBAL, MIhistory, &datatype, &old_att_length)
+       == MI_ERROR || datatype != NC_CHAR )
+      old_att_length = 0;
+   
+    history = (char *) malloc(sizeof(char) * old_att_length);
+    history[0] = (char) 0;
+    (void) miattgetstr( cdfid, NC_GLOBAL, MIhistory, old_att_length+1,
+			history );
+    ncopts = NC_VERBOSE | NC_FATAL;
+    (void) miattputstr( cdfid, NC_GLOBAL, MIhistory, history );
+    free(history);
+    
+    (void) miclose( src_cdfid );
+  }
+
+
+  /* write data */
+  if(ncendef(cdfid) == MI_ERROR) return -1;
+  minc_icv = miicv_create();
+  (void) miicv_setint( minc_icv, MI_ICV_TYPE, type);
+  (void) miicv_setstr( minc_icv, MI_ICV_SIGN,
+		       (im->sign == SGN_SIGNED) ? MI_SIGNED : MI_UNSIGNED );
+  (void) miicv_setint( minc_icv, MI_ICV_DO_NORM, 1 );
+  (void) miicv_setint( minc_icv, MI_ICV_USER_NORM, 1 );
+  (void) miicv_attach( minc_icv, cdfid, img_var_id );
+
+  if( miicv_put(minc_icv, org, count, im->data) == MI_ERROR )
+    return -1;
+
+  (void) miattputstr( cdfid, img_var_id, MIcomplete, MI_TRUE);
+  (void) miclose( cdfid );
+  (void) miicv_free( minc_icv );
+
+  if(same_file) {
+    unlink(filename);
+    link(newname, filename);
+    unlink(newname);
+    free(newname);
+  }
+
+  return 0;
+}
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.cpp
new file mode 100644
index 0000000..47e0eb2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "pnm.h"
+#include "pnm_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.h
new file mode 100644
index 0000000..6a5d379
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef PNM_H
+#define PNM_H
+
+#include <stdio.h>
+
+#include <CGAL/ImageIO.h>
+
+
+int readPpmImage(const char *name,_image *im);
+int writePpmImage(char *name, _image *im);
+int readPgmAsciiImage(const char *name,_image *im);
+int readPgmImage(const char *name,_image *im);
+int writePgmImage(char *name,  _image *im);
+int testPgmAsciiHeader(char *magic,const char *name);
+int testPgmHeader(char *magic,const char *name);
+int testPpmHeader(char *magic,const char *name);
+PTRIMAGE_FORMAT createPgmFormat();
+PTRIMAGE_FORMAT createPgmAscIIFormat();
+PTRIMAGE_FORMAT createPpmFormat();
+
+#ifdef CGAL_HEADER_ONLY
+#include "pnm_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm_impl.h
new file mode 100644
index 0000000..58c5a98
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/pnm_impl.h
@@ -0,0 +1,643 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#ifdef _MSC_VER
+#pragma warning ( disable : 4068 4786 4081 )
+#endif
+
+#include <string.h>
+#include <sstream>
+
+#include "fgetns.h"
+
+
+
+
+/** pnm - portable anymap file format */
+/** Magic header for pgm - portable graymap file format */
+#define PGM_ASCII_MAGIC "P2"
+#define PGM_MAGIC "P5"
+
+/** Magic header for ppm - portable pixmap file format */
+#define PPM_MAGIC "P6"
+
+
+
+#define _LGTH_STRING_ 1024
+
+
+CGAL_INLINE_FUNCTION
+int testPpmHeader(char *magic,const char *) {
+  if( !strncmp(magic, PPM_MAGIC, strlen(PPM_MAGIC))) 
+    return 0;
+  else 
+    return -1;
+}
+CGAL_INLINE_FUNCTION
+int testPgmHeader(char *magic,const char *) {
+  if (( !strncmp(magic, PGM_MAGIC, strlen(PGM_MAGIC))))
+    return 0;
+  else 
+    return -1;
+}
+CGAL_INLINE_FUNCTION
+int testPgmAsciiHeader(char *magic,const char *) {
+  if  ( !strncmp(magic, PGM_ASCII_MAGIC, strlen(PGM_ASCII_MAGIC)))
+    return 0;
+  else 
+    return -1;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createPgmFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testPgmHeader;
+  f->readImageHeader=&readPgmImage;
+  f->writeImage=&writePgmImage;
+  strcpy(f->fileExtension,".pgm,.pgm.gz");
+  strcpy(f->realName,"Pgm");
+  return f;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createPgmAscIIFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testPgmAsciiHeader;
+  f->readImageHeader=&readPgmAsciiImage;
+  f->writeImage=&writePgmImage;
+  strcpy(f->fileExtension,".pgm,.pgm.gz");
+  strcpy(f->realName,"Pgm-ASCII");
+  return f;
+}
+
+CGAL_INLINE_FUNCTION
+PTRIMAGE_FORMAT createPpmFormat() {
+  PTRIMAGE_FORMAT f=(PTRIMAGE_FORMAT) ImageIO_alloc(sizeof(IMAGE_FORMAT));
+
+  f->testImageFormat=&testPpmHeader;
+  f->readImageHeader=&readPpmImage;
+  f->writeImage=&writePpmImage;
+  strcpy(f->fileExtension,".ppm,.ppm.gz");
+  strcpy(f->realName,"Ppm");
+  return f;
+}
+
+
+/*
+       The  portable pixmap format is a lowest common denominator
+       color image file format.
+
+       The definition is as follows:
+
+       - A  "magic  number" for identifying the file type.  A pgm
+         file's magic number is the two characters "P6".
+
+       - Whitespace (blanks, TABs, CRs, LFs).
+
+       - A width, formatted as ASCII characters in decimal.
+
+       - Whitespace.
+
+       - A height, again in ASCII decimal.
+       - Whitespace.
+
+       - The maximum color value (Maxval), again in  ASCII  deci-
+         mal.  Must be less than 65536.
+
+       - Newline or other single whitespace character.
+
+       - A  raster  of  Width * Height pixels, proceeding through
+         the image in normal English reading order.   Each  pixel
+         is  a  triplet  of red, green, and blue samples, in that
+         order.  Each sample is represented  in  pure  binary  by
+         either 1 or 2 bytes.  If the Maxval is less than 256, it
+         is 1 byte.  Otherwise, it is 2 bytes.  The most signifi-
+         cant byte is first.
+
+       - In the raster, the sample values are proportional to the
+         intensity of the CIE Rec. 709 red, green,  and  blue  in
+         the pixel.  A value of Maxval for all three samples rep-
+         resents CIE D65 white and the most intense color in  the
+         color  universe  of  which  the image is part (the color
+         universe is all the colors in all images to  which  this
+         image might be compared).
+
+       - Characters  from  a  "#" to the next end-of-line, before
+         the maxval line, are comments and are ignored.
+
+*/
+CGAL_INLINE_FUNCTION
+int readPpmImage(const char *name,_image *im)
+{
+  char string[256];
+  int x=0, y=0;
+  int max=0;
+  
+  fgetns( string, 255, im );
+  if ( strncmp(string, PPM_MAGIC, strlen(PPM_MAGIC) ) ) {
+    fprintf( stderr, "readPpmImage: bad magic string in \'%s\'\n", name );
+    return( -1 );
+  }
+  
+  do {
+    fgetns( string, 255, im );
+
+    if ( string[0] != '#' ) {
+      if ( x == 0 && y == 0 ) {
+	sscanf( string, "%d %d", &x, &y );
+      }
+      else if ( max == 0 ) {
+	sscanf( string, "%d", &max );
+      }
+    }
+  } while ( max == 0 );
+
+
+  im->xdim = static_cast<std::size_t>(x);
+  im->ydim = static_cast<std::size_t>(y);
+  im->zdim = 1;
+  im->vdim = 3;
+
+  im->wordKind = WK_FIXED;
+  im->sign = SGN_UNSIGNED;
+
+  if ( max < 256 ) im->wdim = 1;
+  else if ( max < 65536 ) {
+    im->wdim = 2;
+    fprintf( stderr, "readPpmImage: Warning, data of \'%s\' may have to be swapped\n", name );
+  }
+  else {
+    fprintf( stderr, "readPpmImage: max value too large (%d) in \'%s\'\n", max, name );
+    return( -1 );
+  }
+  im->data = ImageIO_alloc( x*y*3 );		     
+  
+  ImageIO_read( im, im->data,  x*y*3 );
+  
+  return 1;
+}
+
+CGAL_INLINE_FUNCTION
+int writePpmImage( char *name,_image *im )
+{
+  std::ostringstream string;
+  int max;
+  unsigned int i;
+
+  if ( im->xdim <= 0 || im->ydim <= 0 || im->zdim != 1 || im->vdim != 3 ) {
+    fprintf( stderr, "writePpmImage: bad dimensions, unable to write '%s'\n", name );
+    return -1;
+  }
+  if ( im->wordKind != WK_FIXED || im->sign != SGN_UNSIGNED 
+       || ( im->wdim != 1 && im->wdim != 2 ) ) {
+    fprintf( stderr, "writePpmImage: bad type, unable to write '%s'\n", name );
+    return -1;  
+  }
+  
+  _openWriteImage( im, name );
+  
+  if(!im->fd) {
+    fprintf(stderr, "writeInrimage: error: unable to open file \'%s\'\n", name );
+    return ImageIO_OPENING;
+  }
+
+  string << PPM_MAGIC << "\n";
+  string << "# CREATOR: pnm.c $Revision$ $Date$\n";
+  string << im->xdim << " " << im->ydim << "\n";
+
+  max = 0;
+  switch ( im->wdim ) {
+  case 1 :
+    {
+      unsigned char *buf = (unsigned char *)im->data;
+      for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
+	if ( max < *buf ) max = *buf;
+    }
+    break;
+  case 2 :
+    {
+      unsigned short *buf = (unsigned short *)im->data;
+      for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
+	if ( max < *buf ) max = *buf;
+    }
+    break;
+  }
+
+  if ( max == 0 ) max = 1;
+  string << max << "\n";
+  ImageIO_write(im, string.str().data(), string.str().length());
+
+  if ( im->wdim == 1 || ( im->wdim == 2 && max > 255 ) ) {
+    ImageIO_write( im, im->data, im->xdim*im->ydim*3*im->wdim );
+  }
+  else {
+    /* 2 octets, but max <= 255
+       has to be converted on one octet
+    */
+    unsigned short *buf = (unsigned short *)im->data;
+    unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim*3 );
+    if ( tmp == NULL ) {
+      fprintf( stderr, "writePpmImage: unable to allocate auxiliary buffer\n" );
+      return -1; 
+    }
+    for ( i=0; i<im->xdim*im->ydim*3; i++, buf++ )
+      tmp[i] = (unsigned char)*buf;
+    ImageIO_write( im, tmp, im->xdim*im->ydim*3 );
+    ImageIO_free( tmp );
+  }
+  ImageIO_close( im );
+  im->openMode = OM_CLOSE;
+  return 1;
+}
+
+
+
+/*
+       The portable graymap format is a lowest common denominator
+       grayscale file format.  The definition is as follows:
+
+       - A "magic number" for identifying the file type.   A  pgm
+         file's magic number is the two characters "P2".
+
+       - Whitespace (blanks, TABs, CRs, LFs).
+
+       - A width, formatted as ASCII characters in decimal.
+
+       - Whitespace.
+       - A height, again in ASCII decimal.
+
+       - Whitespace.
+
+       - The maximum gray value (Maxval), again in ASCII decimal.
+         Must be less than 65536.
+
+       - Newline or other single whitespace character.
+
+       - A raster of  Width  *  Height  gray  values,  proceeding
+         through the image in normal English reading order.  Each
+         gray value is a number from 0  through  Maxval,  with  0
+         being  black and Maxval being white.  Each gray value is
+         represented in pure binary by either 1 or 2  bytes.   If
+         the  Maxval  is less than 256, it is 1 byte.  Otherwise,
+         it is 2 bytes.  The most significant byte is first.
+
+       - Characters from a "#" to the  next  end-of-line,  before
+         the maxval line, are comments and are ignored.
+*/
+CGAL_INLINE_FUNCTION
+int readPgmAsciiImage(const char *name,_image *im)
+{
+  char string[256];
+  int x=0, y=0;
+  int max=0;
+
+  int n;
+  char *tmp;
+  int iv;
+
+  fgetns( string, 255, im );
+  if ( strncmp(string, PGM_ASCII_MAGIC, strlen(PGM_ASCII_MAGIC) ) ) {
+    fprintf( stderr, "readAsciiPgmImage: bad magic string in \'%s\'\n", name );
+    return( -1 );
+  }
+  
+  do {
+    fgetns( string, 255, im );
+
+    if ( string[0] != '#' ) {
+      if ( x == 0 && y == 0 ) {
+	sscanf( string, "%d %d", &x, &y );
+      }
+      else if ( max == 0 ) {
+	sscanf( string, "%d", &max );
+      }
+    }
+  } while ( max == 0 );
+
+  im->xdim = x;
+  im->ydim = y;
+  im->zdim = 1;
+  im->vdim = 1;
+
+  im->wordKind = WK_FIXED;
+  im->sign = SGN_UNSIGNED;
+
+  if ( max < 256 ) im->wdim = 1;
+  else if ( max < 65536 ) {
+    im->wdim = 2;
+  }
+  else {
+    fprintf( stderr, "readAsciiPgmImage: max value too large (%d) in \'%s\'\n", max, name );
+    return( -1 );
+  }
+  im->data = ImageIO_alloc( x*y );		     
+  
+  n=0;
+
+  while( fgetns( string, 255, im ) != 0 && n < x*y ) {
+    tmp = string;
+    while ( *tmp != '\n' && *tmp != '\0' && *tmp != EOF && n < x*y ) {
+      /* skip trailing whitespace
+       */
+      while ( *tmp == ' ' || *tmp == '\t' )
+	tmp++;
+      if ( *tmp == '\0' || *tmp == '\n' || *tmp == EOF )
+	continue;
+      
+      /* read a number
+       */
+      switch ( im->wordKind ) {
+      case WK_FIXED :
+	if ( sscanf( tmp, "%d", &iv ) != 1 ) {
+	  fprintf( stderr, "readAsciiPgmImage: error in reading ascii data\n" );
+	  ImageIO_free( im->data ); im->data = NULL;
+	  return 0;
+	}
+	break;
+      default :
+	ImageIO_free( im->data ); im->data = NULL;
+	return 0;
+      }
+	  
+      if ( im->wdim == 1 ) {
+	unsigned char *buf = (unsigned char *)im->data;
+	buf += n;
+	if ( iv < 0 )        *buf = (unsigned char)0;
+	else if ( iv > 255 ) *buf = (unsigned char)255;
+	else                 *buf = (unsigned char)iv;
+	n ++;
+      }
+      else if ( im->wdim == 2 ) {
+	unsigned short int *buf = (unsigned short int *)im->data;
+	buf += n;
+	if ( iv < 0 )          *buf = (unsigned short int)0;
+	else if ( iv > 65535 ) *buf = (unsigned short int)65535;
+	else                   *buf = (unsigned short int)iv;
+	n ++;
+      }
+      else {
+	fprintf( stderr, "readAsciiPgmImage: word im not handled\n" );
+	ImageIO_free( im->data ); im->data = NULL;
+	return 0;
+      }
+      
+      /* skip a number 
+       */
+      while ( (*tmp >= '0' && *tmp <= '9') || *tmp == '.' || *tmp == '-' )
+	tmp++;
+    }
+  }
+
+  
+  return 1;
+}
+
+
+
+
+/*
+       The portable graymap format is a lowest common denominator
+       grayscale file format.  The definition is as follows:
+
+       - A "magic number" for identifying the file type.   A  pgm
+         file's magic number is the two characters "P5".
+
+       - Whitespace (blanks, TABs, CRs, LFs).
+
+       - A width, formatted as ASCII characters in decimal.
+
+       - Whitespace.
+       - A height, again in ASCII decimal.
+
+       - Whitespace.
+
+       - The maximum gray value (Maxval), again in ASCII decimal.
+         Must be less than 65536.
+
+       - Newline or other single whitespace character.
+
+       - A raster of  Width  *  Height  gray  values,  proceeding
+         through the image in normal English reading order.  Each
+         gray value is a number from 0  through  Maxval,  with  0
+         being  black and Maxval being white.  Each gray value is
+         represented in pure binary by either 1 or 2  bytes.   If
+         the  Maxval  is less than 256, it is 1 byte.  Otherwise,
+         it is 2 bytes.  The most significant byte is first.
+
+       - Characters from a "#" to the  next  end-of-line,  before
+         the maxval line, are comments and are ignored.
+*/
+CGAL_INLINE_FUNCTION
+int readPgmImage(const char *name,_image *im)
+{
+  
+  char string[256];
+  int x=0, y=0;
+  int max=0;
+  
+  fgetns( string, 255, im );
+  if ( strncmp(string, PGM_MAGIC, strlen(PGM_MAGIC) ) ) {
+    fprintf( stderr, "readPgmImage: bad magic string in \'%s\'\n", name );
+    return( -1 );
+  }
+  
+  do {
+    fgetns( string, 255, im );
+
+    if ( string[0] != '#' ) {
+      if ( x == 0 && y == 0 ) {
+	sscanf( string, "%d %d", &x, &y );
+      }
+      else if ( max == 0 ) {
+	sscanf( string, "%d", &max );
+      }
+    }
+  } while ( max == 0 );
+
+
+  im->xdim = x;
+  im->ydim = y;
+  im->zdim = 1;
+  im->vdim = 1;
+
+  im->wordKind = WK_FIXED;
+  im->sign = SGN_UNSIGNED;
+
+  if ( max < 256 ) im->wdim = 1;
+  else if ( max < 65536 ) {
+    im->wdim = 2;
+    fprintf( stderr, "readPgmImage: Warning, data of \'%s\' may have to be swapped\n", name );
+  }
+  else {
+    fprintf( stderr, "readPgmImage: max value too large (%d) in \'%s\'\n", max, name );
+    return( -1 );
+  }
+  im->data = ImageIO_alloc( x*y );		     
+  
+  ImageIO_read( im, im->data,  x*y );
+  
+  return 1;
+}
+
+CGAL_INLINE_FUNCTION
+int writePgmImage(char *name,_image *im  )
+{
+  char string[256];
+  int max;
+  unsigned int i;
+
+  if ( im->xdim <= 0 || im->ydim <= 0 || im->zdim != 1 || im->vdim != 1 ) {
+    fprintf( stderr, "writePgmImage: bad dimensions, unable to write '%s'\n", name );
+    return -1;
+  }
+  if ( im->wordKind != WK_FIXED || im->sign != SGN_UNSIGNED 
+       || ( im->wdim != 1 && im->wdim != 2 ) ) {
+    fprintf( stderr, "writePgmImage: bad type, unable to write '%s'\n", name );
+    return -1;  
+  }
+
+  if ( 0 )
+    im->dataMode = DM_ASCII;
+  
+  _openWriteImage( im, name );
+  
+  if(!im->fd) {
+    fprintf(stderr, "writePgmImage: error: unable to open file \'%s\'\n", name );
+    return ImageIO_OPENING;
+  }
+  
+  if ( im->dataMode == DM_ASCII ) 
+    sprintf( string, "%s\n", PGM_ASCII_MAGIC );
+  else 
+    sprintf( string, "%s\n", PGM_MAGIC );
+  
+  ImageIO_write( im, string, strlen( string ) );
+  sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" );
+  ImageIO_write( im, string, strlen( string ) );
+  sprintf( string, "%zu %zu\n", im->xdim, im->ydim );
+  ImageIO_write( im, string, strlen( string ) );
+  max = 0;
+  switch ( im->wdim ) {
+  case 1 :
+    {
+      unsigned char *buf = (unsigned char *)im->data;
+      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
+	if ( max < *buf ) max = *buf;
+    }
+    break;
+  case 2 :
+    {
+      unsigned short *buf = (unsigned short *)im->data;
+      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
+	if ( max < *buf ) max = *buf;
+    }
+    break;
+  }
+  /* max == 0 causes problems for xv */
+  if ( max == 0 ) max = 1;
+  sprintf( string, "%d\n", max );
+  ImageIO_write( im, string, strlen( string ) );
+
+  if ( im->dataMode == DM_ASCII ) {
+    int i, j, n, size;
+    char *str = (char*)ImageIO_alloc( _LGTH_STRING_+1 );
+    size = im->xdim * im->ydim * im->zdim * im->vdim;
+    n = ( im->xdim < 16 ) ? im->xdim : 16;
+    i = 0;
+    switch( im->wdim ) {
+    default :
+      /* can not occur */
+      fprintf( stderr, "writePgmImage: bad type, unable to write '%s'\n", name );
+      ImageIO_close( im );
+      im->openMode = OM_CLOSE;
+      return -1;
+    case 1 :
+      {
+	unsigned char *theBuf = ( unsigned char * )im->data;
+	do {
+	  memset( str, 0, _LGTH_STRING_ );
+	  for ( j=0; j<n && i<size; j++, i++ ) {
+	    sprintf( str+strlen(str), "%d", theBuf[i] );
+	    if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	  }
+	  sprintf( str+strlen(str), "\n" );
+	  if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
+	    fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
+	    return( -3 );
+	  }
+	} while ( i < size );
+      }
+      break;
+    case 2 :
+      {
+	unsigned short int *theBuf = ( unsigned short int * )im->data;
+	do {
+	  memset( str, 0, _LGTH_STRING_ );
+	  for ( j=0; j<n && i<size; j++, i++ ) {
+	    sprintf( str+strlen(str), "%d", theBuf[i] );
+	    if ( j<n && i<size ) sprintf( str+strlen(str), " " );
+	  }
+	  sprintf( str+strlen(str), "\n" );
+	  if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
+	    fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
+	    return( -3 );
+	  }
+	} while ( i < size );
+      }
+      break;
+    }
+  }
+  else {
+    if ( im->wdim == 1 || ( im->wdim == 2 && max > 255 ) ) {
+      ImageIO_write( im, im->data, im->xdim*im->ydim*im->wdim );
+    }
+    else {
+      /* 2 octets, but max <= 255
+	 has to be converted on one octet
+      */
+      unsigned short *buf = (unsigned short *)im->data;
+      unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim );
+      if ( tmp == NULL ) {
+	fprintf( stderr, "writePgmImage: unable to allocate auxiliary buffer\n" );
+	return -1; 
+      }
+      for ( i=0; i<im->xdim*im->ydim; i++, buf++ )
+	tmp[i] = (unsigned char)*buf;
+      ImageIO_write( im, tmp, im->xdim*im->ydim );
+      ImageIO_free( tmp );
+    }
+  }
+
+  ImageIO_close( im );
+  im->openMode = OM_CLOSE;
+  return 1;
+}
+
+
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.cpp
new file mode 100644
index 0000000..e5d6f00
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "recbuffer.h"
+#include "recbuffer_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.h
new file mode 100644
index 0000000..79951bf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer.h
@@ -0,0 +1,203 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * recbuffer.h - tools for recursive filtering of 3D and 2D image buffers
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * DESCRIPTION: 
+ *
+ *
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * http://www.inria.fr/epidaure/personnel/malandain/
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * Copyright Gregoire Malandain, INRIA
+ *
+ * ADDITIONS, CHANGES
+ *
+ *
+ */
+
+
+#ifndef _recbuffer_h_
+#define _recbuffer_h_
+
+
+#include "typedefs.h"
+#include "recline.h"
+
+
+
+
+
+extern int GradientModulus( void *bufferIn, bufferType typeIn,
+			    void *bufferOut, bufferType typeOut,
+			    int *bufferDims, int *borderLengths,
+			    float *filterCoefs, recursiveFilterType filterType );
+extern int Laplacian_2D( void *bufferIn, bufferType typeIn,
+			 void *bufferOut, bufferType typeOut,
+			 int *bufferDims, int *borderLengths,
+			 float *filterCoefs, recursiveFilterType filterType );
+extern int Laplacian( void *bufferIn, bufferType typeIn,
+		      void *bufferOut, bufferType typeOut,
+		      int *bufferDims, int *borderLengths,
+		      float *filterCoefs, recursiveFilterType filterType );
+
+extern int GradientHessianGradient_2D( void *bufferIn, bufferType typeIn,
+			 void *bufferOut, bufferType typeOut,
+			 int *bufferDims, int *borderLengths,
+			 float *filterCoefs, recursiveFilterType filterType );
+extern int GradientHessianGradient( void *bufferIn, bufferType typeIn,
+		      void *bufferOut, bufferType typeOut,
+		      int *bufferDims, int *borderLengths,
+		      float *filterCoefs, recursiveFilterType filterType );
+
+
+
+
+
+/* Recursive filtering on 3D buffers.
+ *
+ * DESCRIPTION:
+ * Performs recursive filtering on 3D buffers.
+ * Each direction (X, Y or Z) is performed 
+ * independently (separability).
+ *
+ * A direction is filtered if there are enough
+ * points along this direction (at least 5),
+ * if the coefficient along this direction is 
+ * positive, and if the derivative's order along
+ * this direction is not NODERIVATIVE (see
+ * derivativeOrder).
+ *
+ * Once a line along a direction is extracted for
+ * filtering, one may want to add points at both 
+ * ends of the line to avoid cut-off effects. The
+ * value of each endpoint is repeated n times.
+ * Thus the length of the line is increased by 
+ * 2*n.
+ *
+ * PARAMETERS:
+ *
+ * - bufferDims[0] is the dimension along X,
+ *
+ *   bufferDims[1] is the dimension along Y,
+ *
+ *   bufferDims[2] is the dimension along Y.
+ *
+ * - borderLengths[0] is the number of points to be
+ *   added at both ends of each X line (if
+ *   positive). The value of each endpoint is 
+ *   repeated borderLengths[0] times to produce
+ *   a line of length 
+ *   bufferDims[0] + 2 * borderLengths[0].
+ *
+ *   borderLengths[1] is the number of points to be
+ *   added at both ends of each Y line.
+ *
+ *   borderLengths[2] is the number of points to be
+ *   added at both ends of each Z line.
+ *
+ * - derivatives[0] is the order of the derivative 
+ *   to be computed along direction X. 
+ *
+ *   derivatives[1] is the order of the derivative 
+ *   to be computed along direction Y. 
+ *
+ *   derivatives[2] is the order of the derivative 
+ *   to be computed along direction Z. 
+ *
+ * - filterCoefs[0] is the coefficient of the filter
+ *   to be applied along direction X. 
+ *
+ *   filterCoefs[1] is the coefficient of the filter
+ *   to be applied along direction Y. 
+ *
+ *   filterCoefs[2] is the coefficient of the filter
+ *   to be applied along direction Z. 
+ *
+ * - filterType is the type of recursive filter to
+ *   be applied to the 3D buffer.
+ *
+ * RETURN:
+ *
+ * - 0 in case of error
+ *
+ * - 1 if successful
+ *
+ * SEE ALSO:
+ *
+ * - bufferType.
+ *
+ * - derivativeOrder.
+ *
+ * - recursiveFilterType.
+ *
+ * - InitRecursiveCoefficients
+ */
+extern int RecursiveFilterOnBuffer( void *bufferIn, /* input buffer */
+				    bufferType typeIn, /* type of the input buffer */
+				    void *bufferOut, /* output buffer */
+				    bufferType typeOut, /* type of the output buffer */
+				    int *bufferDims, /* buffers' dimensions */
+				    int *borderLengths, /* number of points to be added at both ends */
+				    derivativeOrder *derivatives, /* order of derivatives to be computed */
+				    float *filterCoefs, /* coefficients of the filters to be applied */
+				    recursiveFilterType filterType /* type of the recursive filter to be applied */
+				    );
+
+
+
+/* Turn on verbose mode.
+ *
+ * DESCRIPTION:
+ * Some information will be written on stderr when processing.
+ * It will turn on the verbose mode of recline too, by 
+ * calling Recline_verbose();
+ */
+extern void Recbuffer_verbose ( );
+
+
+
+/* Turn off verbose mode.
+ *
+ * DESCRIPTION:
+ * Nothing will be written on stderr when processing.
+ * Exactly the contrary of Recbuffer_verbose ().
+ * It will turn off the verbose mode of recline too.
+ */
+extern void Recbuffer_noverbose ( );
+
+
+#ifdef CGAL_HEADER_ONLY
+#include "recbuffer_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+
+#endif /* _recbuffer_h_ */
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer_impl.h
new file mode 100644
index 0000000..43c8a53
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recbuffer_impl.h
@@ -0,0 +1,1743 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * recbuffer.c - tools for recursive filtering of 3D and 2D image buffers
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * DESCRIPTION: 
+ *
+ * recursive filtering of a buffer (a [1,2,3]D array)
+ * according that the filtering is separable
+ *
+ *
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * Copyright Gregoire Malandain, INRIA
+ *
+ * ADDITIONS, CHANGES
+ *
+ * * Jul 6 1999 (Gregoire Malandain)
+ *   a bug in RecursiveFilterOnBuffer (*&%^@$^ cut and paste)
+ *
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "convert.h"
+
+#ifdef CGAL_HEADER_ONLY
+
+inline int& get_static_verbose_recbuffer()
+{
+  static int _VERBOSE_ = 0;
+  return _VERBOSE_;
+}
+
+#else // CGAL_HEADER_ONLY
+
+static int _VERBOSE_ = 0;
+
+inline int& get_static_verbose_recbuffer()
+{ return _VERBOSE_; }
+
+#endif // CGAL_HEADER_ONLY
+
+
+#define EXIT_ON_FAILURE 0
+#define EXIT_ON_SUCCESS 1
+
+/*
+ *
+ * Gradient modulus
+ *
+ *
+ */
+CGAL_INLINE_FUNCTION
+int GradientModulus( void *bufferIn,
+		     bufferType typeIn,
+		     void *bufferOut,
+		     bufferType typeOut,
+		     int *bufferDims,
+		     int *borderLengths,
+		     float *filterCoefs,
+		     recursiveFilterType filterType )
+{
+  const char *proc = "GradientModulus";
+  float *auxBuf = NULL;
+  float *tmpBuf = NULL, *grdBuf = NULL;
+  int sizeAuxBuf = 0;
+  derivativeOrder derivatives[3];
+  int i;
+
+
+  sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
+  if ( typeOut != CGAL_FLOAT || bufferIn == bufferOut )
+    sizeAuxBuf *= 2;
+
+
+  /* allocation des buffers de calcul
+   */
+  auxBuf = (float*)malloc( sizeAuxBuf * sizeof(float) );
+  if ( auxBuf == NULL ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, "%s: unable to allocate auxiliary buffer\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  tmpBuf = auxBuf;
+  if ( typeOut != CGAL_FLOAT || bufferIn == bufferOut ) {
+    grdBuf  = tmpBuf;
+    grdBuf += bufferDims[0] * bufferDims[1] * bufferDims[2];
+  } else {
+    grdBuf  = (float*)bufferOut;
+  }
+  
+  /* cas 2D
+   */
+  if ( bufferDims[2] == 1 ) {
+
+    derivatives[0] = DERIVATIVE_1; 
+    derivatives[1] = DERIVATIVE_0;
+    derivatives[2] = NODERIVATIVE;
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)grdBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute X derivative (2D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+
+    derivatives[0] = DERIVATIVE_0; 
+    derivatives[1] = DERIVATIVE_1;
+    derivatives[2] = NODERIVATIVE;
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute Y derivative (2D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+    
+    sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
+    for ( i = 0; i < sizeAuxBuf; i++ )
+      grdBuf[i] = (float)sqrt( grdBuf[i]*grdBuf[i] + tmpBuf[i]*tmpBuf[i] );
+    
+  } else {
+    
+    derivatives[0] = NODERIVATIVE;
+    derivatives[1] = NODERIVATIVE;
+    derivatives[2] = DERIVATIVE_0;
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute Z smoothing (3D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+
+    derivatives[0] = DERIVATIVE_1; 
+    derivatives[1] = DERIVATIVE_0;
+    derivatives[2] = NODERIVATIVE;
+    if ( RecursiveFilterOnBuffer( (void*)tmpBuf, CGAL_FLOAT, (void*)grdBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute X derivative (3D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+
+    derivatives[0] = DERIVATIVE_0; 
+    derivatives[1] = DERIVATIVE_1;
+    derivatives[2] = NODERIVATIVE;
+    if ( RecursiveFilterOnBuffer( (void*)tmpBuf, CGAL_FLOAT, (void*)tmpBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute Y derivative (3D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+
+    sizeAuxBuf = bufferDims[0] * bufferDims[1] * bufferDims[2];
+    for ( i = 0; i < sizeAuxBuf; i++ )
+      grdBuf[i] = grdBuf[i]*grdBuf[i] + tmpBuf[i]*tmpBuf[i];
+    
+    derivatives[0] = DERIVATIVE_0;
+    derivatives[1] = DERIVATIVE_0;
+    derivatives[2] = DERIVATIVE_1;
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, (void*)tmpBuf, CGAL_FLOAT,
+				  bufferDims, borderLengths, derivatives,
+				  filterCoefs, filterType ) != EXIT_ON_SUCCESS ) {
+      if ( _VERBOSE_ ) 
+	fprintf( stderr, "%s: unable to compute Z derivative (3D)\n", proc );
+      free( auxBuf );
+      return( EXIT_ON_FAILURE );
+    }
+    
+    for ( i = 0; i < sizeAuxBuf; i++ )
+      grdBuf[i] = (float)sqrt( grdBuf[i] + tmpBuf[i]*tmpBuf[i] );
+    
+  }
+
+  if ( grdBuf != bufferOut ) 
+    ConvertBuffer( grdBuf, CGAL_FLOAT, bufferOut, typeOut,
+		   bufferDims[0]*bufferDims[1]*bufferDims[2] );
+  free( auxBuf );
+  return( EXIT_ON_SUCCESS );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ *
+ * Laplacian
+ *
+ *
+ */
+CGAL_INLINE_FUNCTION
+int Laplacian_2D ( void *bufferIn,
+		   bufferType typeIn,
+		   void *bufferOut,
+		   bufferType typeOut,
+		   int *bufferDims,
+		   int *borderLengths,
+		   float *filterCoefs,
+		   recursiveFilterType filterType )
+{
+  const char *proc = "Laplacian_2D";
+  float *theXX = NULL;
+  float *theYY = NULL;
+
+  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
+  derivativeOrder YYderiv[3] = { SMOOTHING, DERIVATIVE_2, NODERIVATIVE };
+  int sliceDims[3];
+  int z, i, dimxXdimy;
+
+  void *sliceOut = NULL;
+
+
+
+  /* 
+   * We check the buffers' dimensions.
+   */
+  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  /*
+   * test of the coefficients
+   */
+  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
+       (filterCoefs[2] < 0.0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+  /*
+   *
+   */
+  dimxXdimy = bufferDims[0] * bufferDims[1];
+  sliceDims[0] = bufferDims[0];
+  sliceDims[1] = bufferDims[1];
+  sliceDims[2] = 1;
+  
+
+  if ( typeOut == CGAL_FLOAT ) {
+    theXX = (float*)malloc( dimxXdimy * sizeof( float ) );
+  } else {
+    theXX = (float*)malloc( 2 * dimxXdimy * sizeof( float ) );
+  }
+  
+  if ( theXX == NULL ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
+    }
+    return( EXIT_ON_FAILURE );
+  }
+
+  if ( typeOut != CGAL_FLOAT ) {
+    theYY  = theXX;
+    theYY += dimxXdimy;
+  }
+  
+  
+  
+  for ( z=0; z<bufferDims[2]; z++ ) {
+
+    if ( typeOut == CGAL_FLOAT ) {
+      theYY = ((float*)bufferOut) + z * dimxXdimy;
+    }
+    
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theXX, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  XXderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^2 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theYY, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  YYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+    
+    
+    for ( i=0; i<dimxXdimy; i++ ) theYY[i] += theXX[i];
+    if ( typeOut != CGAL_FLOAT ) {
+      switch ( typeOut ) {
+      case CGAL_UCHAR :
+	sliceOut = (((u8*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_SCHAR :
+	sliceOut = (((s8*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_SSHORT :
+	sliceOut = (((s16*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_DOUBLE :
+	sliceOut = (((r64*)bufferOut) + z * dimxXdimy);
+	break;
+      default :
+	if ( _VERBOSE_ > 0 )
+	  fprintf( stderr, " Error in %s: such output type not handled.\n", proc );
+	free( theXX );
+	return( EXIT_ON_FAILURE );
+      }
+      ConvertBuffer( theYY, CGAL_FLOAT, sliceOut, typeOut, dimxXdimy );
+    }
+  }
+
+  return( EXIT_ON_SUCCESS );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+int Laplacian ( void *bufferIn,
+		   bufferType typeIn,
+		   void *bufferOut,
+		   bufferType typeOut,
+		   int *bufferDims,
+		   int *borderLengths,
+		   float *filterCoefs,
+		   recursiveFilterType filterType )
+{
+  const char *proc = "Laplacian";
+  float *theSL = NULL;
+  float *theZZ = NULL;
+  float *theZ0 = NULL;
+
+
+  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
+  derivativeOrder YYderiv[3] = { SMOOTHING, DERIVATIVE_2, NODERIVATIVE };
+  derivativeOrder Zsmooth[3] = { NODERIVATIVE, NODERIVATIVE, SMOOTHING };
+  derivativeOrder ZZderiv[3] = { SMOOTHING, SMOOTHING, DERIVATIVE_2 };
+  
+  int sliceDims[3];
+  int z, i, j, dimxXdimy;
+
+
+
+
+  /* 
+   * We check the buffers' dimensions.
+   */
+  if ( bufferDims[2] == 1 ) {
+    return( Laplacian_2D ( bufferIn, typeIn, bufferOut, typeOut,
+			   bufferDims, borderLengths, filterCoefs, filterType ) );
+  }
+
+  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  /*
+   * test of the coefficients
+   */
+  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
+       (filterCoefs[2] < 0.0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+  /*
+   *
+   */
+  dimxXdimy = bufferDims[0] * bufferDims[1];
+  sliceDims[0] = bufferDims[0];
+  sliceDims[1] = bufferDims[1];
+  sliceDims[2] = 1;
+
+  
+
+  if ( typeOut == CGAL_FLOAT ) {
+    theSL = (float*)malloc( (1+bufferDims[2]) * dimxXdimy * sizeof( float ) );
+  } else {
+    theSL = (float*)malloc( (1+2*bufferDims[2]) * dimxXdimy * sizeof( float ) );
+  }
+
+
+  
+  if ( theSL == NULL ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
+    }
+    return( EXIT_ON_FAILURE );
+  }
+
+
+
+  theZ0 = theSL;
+  theZ0 += dimxXdimy;
+
+
+  
+  if ( typeOut == CGAL_FLOAT ) {
+    theZZ = (float*) bufferOut;
+  } else {
+    theZZ  = theZ0;
+    theZZ += dimxXdimy * bufferDims[2];
+  }
+  
+  
+  
+  /*
+   *
+   * 3D filtering / filtering along Z
+   *
+   */
+
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ0, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				Zsmooth, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^0 derivative.\n" );
+    }
+    free( theSL );
+    return( EXIT_ON_FAILURE );
+  }
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZZ, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				ZZderiv, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^2 derivative.\n" );
+    }
+    free( theSL );
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+
+
+
+
+  for ( z=0; z<bufferDims[2]; z++ ) {
+
+    /*
+     *
+     * 2D filtering / filtering along X and Y
+     *
+     */
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theSL, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  XXderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^2 derivative.\n" );
+      }
+      free( theSL );
+      return( EXIT_ON_FAILURE );
+    }
+
+    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
+      theZZ[j] += theSL[i];
+    }
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theSL, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  YYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
+      }
+      free( theSL );
+      return( EXIT_ON_FAILURE );
+    }
+    
+    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
+      theZZ[j] += theSL[i];
+    }
+
+  }
+
+  if ( typeOut != CGAL_FLOAT ) {
+    ConvertBuffer( theZZ, CGAL_FLOAT, bufferOut, typeOut, bufferDims[2]*dimxXdimy );
+  }
+
+  return( EXIT_ON_SUCCESS );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ *
+ * Gradient . Hessian * Gradient
+ *
+ *
+ */
+CGAL_INLINE_FUNCTION
+int GradientHessianGradient_2D ( void *bufferIn,
+		   bufferType typeIn,
+		   void *bufferOut,
+		   bufferType typeOut,
+		   int *bufferDims,
+		   int *borderLengths,
+		   float *filterCoefs,
+		   recursiveFilterType filterType )
+{
+  const char *proc = "GradientHessianGradient_2D";
+  float *theXX = NULL;
+  float *theYY = NULL;
+  float *theXY = NULL;
+  float *theX  = NULL;
+  float *theY  = NULL;
+
+  derivativeOrder Xsmooth[3] = { SMOOTHING,          NODERIVATIVE,       NODERIVATIVE };
+  derivativeOrder Yderiv[3]  = { NODERIVATIVE,       DERIVATIVE_1_EDGES, NODERIVATIVE };
+  derivativeOrder YYderiv[3] = { NODERIVATIVE,       DERIVATIVE_2,       NODERIVATIVE };
+
+  derivativeOrder Ysmooth[3] = { NODERIVATIVE,       SMOOTHING,          NODERIVATIVE };
+  derivativeOrder Xderiv[3]  = { DERIVATIVE_1_EDGES, NODERIVATIVE,       NODERIVATIVE };
+  derivativeOrder XXderiv[3] = { DERIVATIVE_2,       NODERIVATIVE,       NODERIVATIVE };
+
+  derivativeOrder XYderiv[3] = { DERIVATIVE_1,       DERIVATIVE_1,       NODERIVATIVE };
+
+  int sliceDims[3];
+  int z, i, dimxXdimy;
+
+  void *sliceIn = NULL;
+  void *sliceOut = NULL;
+
+  double gx, gy, g;
+
+  /* 
+   * We check the buffers' dimensions.
+   */
+  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  /*
+   * test of the coefficients
+   */
+  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
+       (filterCoefs[2] < 0.0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+  /*
+   *
+   */
+  dimxXdimy = bufferDims[0] * bufferDims[1];
+  sliceDims[0] = bufferDims[0];
+  sliceDims[1] = bufferDims[1];
+  sliceDims[2] = 1;
+  
+
+  if ( typeOut == CGAL_FLOAT ) {
+    theXX = (float*)malloc( 4 * dimxXdimy * sizeof( float ) );
+  } else {
+    theXX = (float*)malloc( 5 * dimxXdimy * sizeof( float ) );
+  }
+  
+  if ( theXX == NULL ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
+    }
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+
+  theX = theY = theYY = theXX;
+  theYY +=   dimxXdimy;
+  theX  += 2*dimxXdimy;
+  theY  += 3*dimxXdimy;
+
+
+
+  if ( typeOut != CGAL_FLOAT ) {
+    theXY  =   theXX;
+    theXY += 4*dimxXdimy;
+  }
+  
+  
+  
+  for ( z=0; z<bufferDims[2]; z++ ) {
+
+    switch( typeIn ) {
+    default :
+      break;
+    case CGAL_UCHAR :
+    case CGAL_SCHAR :
+      sliceIn = (void*)( ((u8*)bufferIn) + z*dimxXdimy ); break;
+    case CGAL_USHORT :
+    case CGAL_SSHORT :
+      sliceIn = (void*)( ((u16*)bufferIn) + z*dimxXdimy ); break;
+    case CGAL_FLOAT :
+      sliceIn = (void*)( ((float*)bufferIn) + z*dimxXdimy ); break;
+    case CGAL_DOUBLE :
+      sliceIn = (void*)( ((double*)bufferIn) + z*dimxXdimy ); break;
+    }
+    if ( typeOut == CGAL_FLOAT ) {
+      theXY = ((float*)bufferOut) + z * dimxXdimy;
+    }
+    
+    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theX, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  Ysmooth, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^0 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theY, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  Xsmooth, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^0 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+
+
+    if ( RecursiveFilterOnBuffer( sliceIn, typeIn, theXY, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  XYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^1Y^1 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+
+
+    if ( RecursiveFilterOnBuffer( theX, CGAL_FLOAT, theXX, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  XXderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^2 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theY, CGAL_FLOAT, theYY, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  YYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+
+
+    if ( RecursiveFilterOnBuffer( theX, CGAL_FLOAT, theX, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  Xderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^1 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theY, CGAL_FLOAT, theY, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  Yderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^1 derivative.\n" );
+      }
+      free( theXX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+    
+    
+    for ( i=0; i<dimxXdimy; i++ ) {
+      gx = theX[i];
+      gy = theY[i];
+      g = (gx*gx + gy*gy);
+      theXY[i] = (float)(gx * ( theXX[i] * gx + theXY[i] * gy ) +
+			 gy * ( theXY[i] * gx + theYY[i] * gy ));
+      if ( g > 1e-10 ) theXY[i] = (float)(theXY[i] / g);
+    }
+
+    if ( typeOut != CGAL_FLOAT ) {
+      switch ( typeOut ) {
+      case CGAL_UCHAR :
+	sliceOut = (((u8*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_SCHAR :
+	sliceOut = (((s8*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_SSHORT :
+	sliceOut = (((s16*)bufferOut) + z * dimxXdimy);
+	break;
+      case CGAL_DOUBLE :
+	sliceOut = (((r64*)bufferOut) + z * dimxXdimy);
+	break;
+      default :
+	if ( _VERBOSE_ > 0 )
+	  fprintf( stderr, " Error in %s: such output type not handled.\n", proc );
+	free( theXX );
+	return( EXIT_ON_FAILURE );
+      }
+      ConvertBuffer( theXY, CGAL_FLOAT, sliceOut, typeOut, dimxXdimy );
+    }
+  }
+
+  return( EXIT_ON_SUCCESS );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+int GradientHessianGradient ( void *bufferIn,
+		   bufferType typeIn,
+		   void *bufferOut,
+		   bufferType typeOut,
+		   int *bufferDims,
+		   int *borderLengths,
+		   float *filterCoefs,
+		   recursiveFilterType filterType )
+{
+  const char *proc = "GradientHessianGradient";
+
+
+
+  float *theZZ = NULL;
+  float *theZ  = NULL;
+  float *theZ1 = NULL;
+  float *theZ0 = NULL;
+
+  float *theXZ = NULL;
+  float *theYZ = NULL;
+
+  float *theXX = NULL;
+  float *theYY = NULL;
+  float *theXY = NULL;
+
+  float *theX  = NULL;
+  float *theY  = NULL;
+
+
+  derivativeOrder ZZderiv[3] = { SMOOTHING,    SMOOTHING,    DERIVATIVE_2 };
+  derivativeOrder Zderiv[3]  = { SMOOTHING,    SMOOTHING,    DERIVATIVE_1 };
+  derivativeOrder Z1deriv[3] = { NODERIVATIVE, NODERIVATIVE, DERIVATIVE_1 };
+  derivativeOrder Z0deriv[3] = { NODERIVATIVE, NODERIVATIVE, SMOOTHING };
+
+  derivativeOrder XZderiv[3] = { DERIVATIVE_1, SMOOTHING,    NODERIVATIVE };
+  derivativeOrder YZderiv[3] = { SMOOTHING,    DERIVATIVE_1, NODERIVATIVE };
+
+  derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING,    NODERIVATIVE };
+  derivativeOrder YYderiv[3] = { SMOOTHING,    DERIVATIVE_2, NODERIVATIVE };
+  derivativeOrder XYderiv[3] = { DERIVATIVE_1, DERIVATIVE_1, NODERIVATIVE };
+
+  derivativeOrder Xderiv[3]  = { DERIVATIVE_1, SMOOTHING,    NODERIVATIVE };
+  derivativeOrder Yderiv[3]  = { SMOOTHING,    DERIVATIVE_1, NODERIVATIVE };
+
+  int sliceDims[3];
+  int z, i, j, dimxXdimy;
+
+  double gx, gy, gz, g;
+
+  /* 
+   * We check the buffers' dimensions.
+   */
+  if ( bufferDims[2] == 1 ) {
+    return( GradientHessianGradient_2D ( bufferIn, typeIn, bufferOut, typeOut,
+			   bufferDims, borderLengths, filterCoefs, filterType ) );
+  }
+
+  if ( (bufferDims[0] <= 0) || (bufferDims[1] <= 0) || (bufferDims[2] <= 0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  /*
+   * test of the coefficients
+   */
+  if ( (filterCoefs[0] < 0.0) || (filterCoefs[1] < 0.0) ||
+       (filterCoefs[2] < 0.0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Error in %s: negative coefficient's value.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  
+
+  /*
+   *
+   */
+  dimxXdimy = bufferDims[0] * bufferDims[1];
+  sliceDims[0] = bufferDims[0];
+  sliceDims[1] = bufferDims[1];
+  sliceDims[2] = 1;
+  
+
+  if ( typeOut == CGAL_FLOAT ) {
+    theX  = (float*)malloc( (7+3*bufferDims[2]) * dimxXdimy * sizeof( float ) );
+  } else {
+    theX = (float*)malloc( (7+4*bufferDims[2]) * dimxXdimy * sizeof( float ) );
+  }
+
+  
+  if ( theX == NULL ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
+    }
+    return( EXIT_ON_FAILURE );
+  }
+  
+  /*
+   * BUFFERS
+   *
+   * slices  : theX  theY  theXY theYY theXX theYZ theXZ
+   *
+   * volumes : theZ0 theZ1 theZ  theZZ
+   *
+   */
+
+  theY  = theXX = theXY = theYY = theYZ = theXZ = theX;
+  theZ0 = theZ1 = theZ  = theX;
+
+  theY  +=   dimxXdimy;
+  theXY += 2*dimxXdimy;
+  theYY += 3*dimxXdimy;
+  theXX += 4*dimxXdimy;
+  theYZ += 5*dimxXdimy;
+  theXZ += 6*dimxXdimy;
+ 
+  theZ0 += 7*dimxXdimy;
+  theZ1 += 7*dimxXdimy +   bufferDims[2]*dimxXdimy;
+  theZ  += 7*dimxXdimy + 2*bufferDims[2]*dimxXdimy;
+
+  if ( typeOut == CGAL_FLOAT ) {
+    theZZ  = (float*)bufferOut;
+  } else {
+    theZZ  = theX;
+    theZZ += 7*dimxXdimy + 3*bufferDims[2]*dimxXdimy;
+  }
+  
+  
+  
+  /*
+   *
+   * 3D filtering / filtering along Z
+   *
+   */
+
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ0, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				Z0deriv, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^0 derivative.\n" );
+    }
+    free( theX );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ1, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				Z1deriv, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^1 derivative.\n" );
+    }
+    free( theX );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZ, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				Zderiv, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^1 derivative (edge).\n" );
+    }
+    free( theX );
+    return( EXIT_ON_FAILURE );
+  }
+  
+  if ( RecursiveFilterOnBuffer( bufferIn, typeIn, theZZ, CGAL_FLOAT, 
+				bufferDims, borderLengths,
+				ZZderiv, filterCoefs, filterType ) == 0 ) {
+    if ( _VERBOSE_ > 0 ) {
+      fprintf( stderr, " Fatal error in %s:", proc );
+      fprintf( stderr, " unable to compute Z^2 derivative.\n" );
+    }
+    free( theX );
+    return( EXIT_ON_FAILURE );
+  }
+
+
+  /*
+   * theZ0 : smoothed         along Z
+   * theZ1 : first derivative along Z
+   * theZ  : first derivative along Z, smoothed along X and Y
+   * theZZ : second derivative along Z, smoothed along X and Y
+   */
+
+
+
+  for ( z=0; z<bufferDims[2]; z++ ) {
+    fprintf( stderr, "%s: processing slice %3d/%d\r",
+	     proc, z, bufferDims[2] );
+    /*
+     *
+     * 2D filtering / filtering along X and Y
+     *
+     */
+    
+    if ( RecursiveFilterOnBuffer( theZ1+z*dimxXdimy, CGAL_FLOAT, theXZ, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  XZderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^1Z^1 derivative.\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theZ1+z*dimxXdimy, CGAL_FLOAT, theYZ, CGAL_FLOAT, 
+				  sliceDims, borderLengths,
+				  YZderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^1Z^1 derivative.\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theXX, CGAL_FLOAT,
+				  sliceDims, borderLengths,
+				  XXderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^2 derivative.\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theYY, CGAL_FLOAT,
+				  sliceDims, borderLengths,
+				  YYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^2 derivative.\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theXY, CGAL_FLOAT,
+				  sliceDims, borderLengths,
+				  XYderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^1Y^1 derivative.\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theX, CGAL_FLOAT,
+				  sliceDims, borderLengths,
+				  Xderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute X^1 derivative (edge).\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    if ( RecursiveFilterOnBuffer( theZ0+z*dimxXdimy, CGAL_FLOAT, theY, CGAL_FLOAT,
+				  sliceDims, borderLengths,
+				  Yderiv, filterCoefs, filterType ) == 0 ) {
+      if ( _VERBOSE_ > 0 ) {
+	fprintf( stderr, " Fatal error in %s:", proc );
+	fprintf( stderr, " unable to compute Y^1 derivative (edge).\n" );
+      }
+      free( theX );
+      return( EXIT_ON_FAILURE );
+    }
+
+    
+    
+    for ( j=z*dimxXdimy, i=0; i<dimxXdimy; j++, i++ ) {
+      gx = theX[i];
+      gy = theY[i];
+      gz = theZ[j];
+      g = gx*gx + gy*gy + gz*gz;
+      theZZ[j] = (float)(gx * ( theXX[i] * gx + theXY[i] * gy  + theXZ[i] * gz ) +
+			 gy * ( theXY[i] * gx + theYY[i] * gy  + theYZ[i] * gz ) +
+			 gz * ( theXZ[i] * gx + theYZ[i] * gy  + theZZ[j] * gz ));
+      if ( g > 1e-10 ) theZZ[j] = (float)(theZZ[j] / g);
+
+    }
+
+  }
+
+  if ( typeOut != CGAL_FLOAT ) {
+    ConvertBuffer( theZZ, CGAL_FLOAT, bufferOut, typeOut, bufferDims[2]*dimxXdimy );
+  }
+  
+  free( theX );
+
+  return( EXIT_ON_SUCCESS );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ *
+ * 
+ *
+ *
+ */
+CGAL_INLINE_FUNCTION
+int RecursiveFilterOnBuffer( void *bufferIn,
+			     bufferType typeIn,
+			     void *bufferOut,
+			     bufferType typeOut,
+			     int *bufferDims,
+			     int *borderLengths,
+			     derivativeOrder *derivatives,
+			     float *filterCoefs,
+			     recursiveFilterType filterType )
+{
+  const char *proc = "RecursiveFilterOnBuffer";
+  int dimx, dimxXdimy;
+  int dimy, dimz;
+  int x, y, z;
+  /* 
+   *obviously, we need to perform the computation 
+   * with float or double values. For this reason,
+   * we allocate an auxiliary buffer if the output buffer
+   * is not of type float or double.
+   */
+  void *bufferToBeProcessed = (void*)NULL;
+  bufferType typeToBeProcessed = TYPE_UNKNOWN;
+  void *bufferResult = (void*)NULL;
+  bufferType typeResult = TYPE_UNKNOWN;
+  /*
+   * lines' lengths
+   */
+  int lengthX = 0;
+  int lengthY = 0;
+  int lengthZ = 0;
+  int maxLengthline = 0;
+  int borderXlength = 0;
+  int borderYlength = 0;
+  int borderZlength = 0;
+  /*
+   * 1D arrays for computations.
+   */
+  double *theLine = (double*)NULL;
+  double *resLine = (double*)NULL;
+  double *tmpLine = (double*)NULL;
+  /*
+   * pointers for computations;
+   */
+  r32 *r32firstPoint = (r32*)NULL;
+  r64 *r64firstPoint = (r64*)NULL;
+  r32 *r32_pt = (r32*)NULL;
+  r64 *r64_pt = (r64*)NULL;
+  double *dbl_pt1 = (double*)NULL;
+  double *dbl_pt2 = (double*)NULL;
+  double dbl_first = 0.0;
+  double dbl_last = 0.0;
+  int offsetLastPoint = 0;
+  int offsetNextFirstPoint = 0;
+  r32 *r32firstPointResult = (r32*)NULL;
+  r64 *r64firstPointResult = (r64*)NULL;
+  double *theLinePlusBorder = (double*)NULL;
+  double *resLinePlusBorder = (double*)NULL;
+
+  RFcoefficientType *RFC = NULL;
+
+  /* 
+   * We check the buffers' dimensions.
+   */
+  dimx = bufferDims[0];   dimy = bufferDims[1];   dimz = bufferDims[2];
+  dimxXdimy = dimx * dimy;
+  if ( (dimx <= 0) || (dimy <= 0) || (dimz <= 0) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: improper buffer's dimension.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  /*
+   * We check the pointers.
+   */
+  if ( (bufferIn == (void*)NULL) || (bufferOut == (void*)NULL) ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: NULL pointer on buffer.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+
+  /* 
+   * May we use the buffer bufferOut as the bufferResult?
+   * If its type is CGAL_FLOAT or CGAL_DOUBLE, then yes.
+   * If not, we have to allocate an auxiliary buffer.
+   */
+  if ( (typeOut == CGAL_FLOAT) || (typeOut == CGAL_DOUBLE) ) {
+    bufferResult = bufferOut;
+    typeResult = typeOut;
+  } else {
+    bufferResult = (void*)malloc( (dimx*dimy*dimz) * sizeof(r32) );
+    if ( bufferResult == (void*)NULL ) {
+      if ( _VERBOSE_ > 0 )
+	fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary buffer.\n", proc );
+      return( EXIT_ON_FAILURE );
+    }
+    typeResult = CGAL_FLOAT;
+  }
+  
+  /* 
+   * May we consider the buffer bufferIn as the bufferToBeProcessed?
+   * If its type is CGAL_FLOAT or CGAL_DOUBLE, then yes.
+   * If not, we convert it into the buffer bufferResult, and this
+   * last buffer is the bufferToBeProcessed.
+   */
+  if ( (typeIn == CGAL_FLOAT) || (typeIn == CGAL_DOUBLE) ) {
+    bufferToBeProcessed = bufferIn;
+    typeToBeProcessed = typeIn;
+  } else {
+    ConvertBuffer( bufferIn, typeIn, bufferResult, typeResult, (dimx*dimy*dimz) );
+    bufferToBeProcessed = bufferResult;
+    typeToBeProcessed = typeResult;
+  }
+
+  /*
+   * Estimation of the lines' length along each direction.
+   */
+  if ( borderLengths != NULL ) {
+    borderXlength = borderLengths[0];
+    borderYlength = borderLengths[1];
+    borderZlength = borderLengths[2];
+    if ( borderXlength < 0 ) borderXlength = 0;
+    if ( borderYlength < 0 ) borderYlength = 0;
+    if ( borderZlength < 0 ) borderZlength = 0;
+  }
+
+  /*
+   * Tue Jul  6 19:15:15 MET DST 1999 (gregoire Malandain)
+   * changes 3 x dimx -> dimx, dimy, dimz
+   */
+  lengthX = dimx + 2 * borderXlength;
+  lengthY = dimy + 2 * borderYlength;
+  lengthZ = dimz + 2 * borderZlength;
+  maxLengthline = lengthX;
+  if ( maxLengthline < lengthY ) maxLengthline = lengthY;
+  if ( maxLengthline < lengthZ ) maxLengthline = lengthZ;
+  if ( maxLengthline <= 0 ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Error in %s: unable to deal with dimensions = 0.\n", proc );
+    if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+      free( bufferResult );
+    return( EXIT_ON_FAILURE );
+  }
+  /*
+   * Allocations of work arrays. 
+   * We will use them to process each line.
+   */
+  theLine = (double*)malloc( 3 * maxLengthline * sizeof(double) );
+  if ( theLine == (double*)NULL ) {
+    if ( _VERBOSE_ > 0 )
+      fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary work arrays.\n", proc );
+    if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+      free( bufferResult );
+    return( EXIT_ON_FAILURE );
+  }
+  resLine = theLine + maxLengthline;
+  tmpLine = resLine + maxLengthline;
+
+  /*
+   * From now,
+   * typeToBeProcessed is either CGAL_FLOAT or CGAL_DOUBLE
+   * so is typeResult.
+   */
+
+
+  /*
+   * Processing along X.
+   */
+  if ( dimx > 4 )
+  if (derivatives[0] != NODERIVATIVE)
+  if (filterCoefs[0] > 0.0) {
+
+    if ( _VERBOSE_ != 0 )
+      fprintf( stderr, " %s: processing along X.\n", proc );
+
+    RFC = InitRecursiveCoefficients( (double)filterCoefs[0], filterType, derivatives[0] );
+
+    if ( RFC == NULL ) {
+      if ( _VERBOSE_ != 0 )
+	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
+      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	free( bufferResult );
+      return( EXIT_ON_FAILURE );
+    }
+    
+    r64firstPoint = (r64*)bufferToBeProcessed;
+    r32firstPoint = (r32*)bufferToBeProcessed;
+
+    r64firstPointResult = (r64*)bufferResult;
+    r32firstPointResult = (r32*)bufferResult;
+
+    offsetLastPoint = borderXlength + dimx - 1;
+
+    theLinePlusBorder = theLine + borderXlength;
+    resLinePlusBorder = resLine + borderXlength;
+
+    /*
+     * There are dimz*dimy X lines to be processed.
+     */
+    for ( z=0; z<dimz; z++ )
+    for ( y=0; y<dimy; y++ ) {
+      /*
+       * Acquiring a X line.
+       */ 
+      dbl_pt1 = theLinePlusBorder;
+      switch ( typeToBeProcessed ) {
+      case CGAL_DOUBLE :
+	(void)memcpy( (void*)dbl_pt1, (void*)r64firstPoint, dimx * sizeof(r64) );
+	r64firstPoint += dimx;
+	break;
+      case CGAL_FLOAT :
+      default :
+	for ( x=0; x<dimx; x++, dbl_pt1++, r32firstPoint++ ) *dbl_pt1 = *r32firstPoint;
+      }
+      /*
+       * Adding points at both ends of the line.
+       */
+      if ( borderXlength > 0 ) {
+	dbl_pt1 = theLine + borderXlength;   dbl_first = *dbl_pt1;
+	dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
+	for ( x=0; x<borderXlength; x++ ) {
+	  *--dbl_pt1 = dbl_first;
+	  *++dbl_pt2 = dbl_last;
+	}
+      }
+      /*
+       * Processing the line.
+       */
+      if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthX ) == 0 ) {
+	if ( _VERBOSE_ != 0 ) 
+	  fprintf(stderr," Error in %s: unable to process X line (y=%d,z=%d).\n", proc, y, z);
+	if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	  free( bufferResult );
+	free( (void*)theLine );
+	return( EXIT_ON_FAILURE );
+      }
+      /*
+       * Copy the result into the buffer bufferResult.
+       */
+      dbl_pt1 = resLinePlusBorder;
+      switch ( typeResult ) {
+      case CGAL_DOUBLE :
+	(void)memcpy( (void*)r64firstPointResult, (void*)dbl_pt1, dimx * sizeof(r64) );
+	r64firstPointResult += dimx;
+	break;
+      case CGAL_FLOAT :
+      default :
+	for ( x=0; x<dimx; x++, dbl_pt1++, r32firstPointResult++ )
+	  *r32firstPointResult = (r32)(*dbl_pt1);
+      }
+    }
+    
+    /*
+     * The next buffer to be processed is the buffer
+     * bufferResult.
+     */
+    bufferToBeProcessed = bufferResult;
+    typeToBeProcessed = typeResult;
+    
+    free( RFC );
+    RFC = NULL;
+
+  } /* end of Processing along X. */
+  
+  /*
+   * Processing along Y.
+   */
+  if ( dimy > 4 )
+  if (derivatives[1] != NODERIVATIVE)
+  if (filterCoefs[1] > 0.0) {
+
+    if ( _VERBOSE_ != 0 )
+      fprintf( stderr, " %s: processing along Y.\n", proc );
+
+    RFC = InitRecursiveCoefficients( (double)filterCoefs[1], filterType, derivatives[1] );
+
+    if ( RFC == NULL ) {
+      if ( _VERBOSE_ != 0 )
+	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
+      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	free( bufferResult );
+      return( EXIT_ON_FAILURE );
+    }
+
+    r64firstPoint = (r64*)bufferToBeProcessed;
+    r32firstPoint = (r32*)bufferToBeProcessed;
+
+    r64firstPointResult = (r64*)bufferResult;
+    r32firstPointResult = (r32*)bufferResult;
+
+    offsetLastPoint = borderYlength + dimy - 1;
+    offsetNextFirstPoint = dimx * dimy - dimx;
+
+    theLinePlusBorder = theLine + borderYlength;
+    resLinePlusBorder = resLine + borderYlength;
+
+    /*
+     * There are dimz*dimx Y lines to be processed.
+     */
+    for ( z=0; z<dimz; z++ ) {
+      for ( x=0; x<dimx; x++ ) {
+      /*
+       * Acquiring a Y line.
+       */ 
+	dbl_pt1 = theLinePlusBorder;
+	switch ( typeToBeProcessed ) {
+	case CGAL_DOUBLE :
+	  r64_pt = r64firstPoint;
+	  for ( y=0; y<dimy; y++, dbl_pt1++, r64_pt += dimx ) *dbl_pt1 = *r64_pt;
+	  /*
+	   * Going to the first point of the next Y line
+	   */
+	  r64firstPoint ++;
+	  break;
+	case CGAL_FLOAT :
+	default :
+	  r32_pt = r32firstPoint;
+	  for ( y=0; y<dimy; y++, dbl_pt1++, r32_pt += dimx ) *dbl_pt1 = *r32_pt;
+	  r32firstPoint ++;
+	}
+	/*
+	 * Adding points at both ends of the line.
+	 */
+	if ( borderYlength > 0 ) {
+	  dbl_pt1 = theLine + borderYlength;   dbl_first = *dbl_pt1;
+	  dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
+	  for ( y=0; y<borderYlength; y++ ) {
+	    *--dbl_pt1 = dbl_first;
+	    *++dbl_pt2 = dbl_last;
+	  }
+	}
+	/*
+	 * Processing the line.
+	 */
+	if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthY ) == 0 ) {
+	  if ( _VERBOSE_ != 0 ) 
+	    fprintf(stderr," Error in %s: unable to process Y line (x=%d,z=%d).\n", proc, x, z);
+	  if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	    free( bufferResult );
+	  free( (void*)theLine );
+	  return( EXIT_ON_FAILURE );
+	}
+	/*
+	 * Copy the result into the buffer bufferResult.
+	 */
+	dbl_pt1 = resLinePlusBorder;
+	switch ( typeResult ) {
+	case CGAL_DOUBLE :
+	  r64_pt = r64firstPointResult;
+	  for ( y=0; y<dimy; y++, dbl_pt1++, r64_pt += dimx ) *r64_pt = *dbl_pt1;
+	  r64firstPointResult ++;
+	  break;
+	case CGAL_FLOAT :
+	default :
+	  r32_pt = r32firstPointResult;
+	  for ( y=0; y<dimy; y++, dbl_pt1++, r32_pt += dimx ) 
+	    *r32_pt = (float)*dbl_pt1;
+	  r32firstPointResult ++;
+	}
+      }
+      /*
+       * Going to the first point of the next Y line
+       * which is the first Y line of the next slice.
+       *
+       * The pointer r[32,64]firstPoint[Result] has
+       * already been increased by dimx. To reach
+       * the first point of the next slice, we
+       * have to increase it by (dimx*dimy)-dimx.
+       */
+      switch ( typeToBeProcessed ) {
+      case CGAL_DOUBLE :
+	r64firstPoint += offsetNextFirstPoint;
+	break;
+      case CGAL_FLOAT :
+      default :
+	r32firstPoint += offsetNextFirstPoint;
+      }
+      switch ( typeResult ) {
+      case CGAL_DOUBLE :
+	r64firstPointResult += offsetNextFirstPoint;
+	break;
+      case CGAL_FLOAT :
+      default :
+	r32firstPointResult += offsetNextFirstPoint;
+      }
+    }
+    
+    /*
+     * The next buffer to be processed is the buffer
+     * bufferResult.
+     */
+    bufferToBeProcessed = bufferResult;
+    typeToBeProcessed = typeResult;
+  
+    free( RFC );
+    RFC = NULL;
+
+  } /* end of Processing along Y. */
+  
+
+  /*
+   * Processing along Z.
+   */
+  if ( dimz > 4 )
+  if (derivatives[2] != NODERIVATIVE)
+  if (filterCoefs[2] > 0.0) {
+
+    if ( _VERBOSE_ != 0 )
+      fprintf( stderr, " %s: processing along Z.\n", proc );
+    
+    RFC = InitRecursiveCoefficients( (double)filterCoefs[2], filterType, derivatives[2] );
+    
+    if ( RFC == NULL ) {
+      if ( _VERBOSE_ != 0 )
+	fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
+      if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	free( bufferResult );
+      return( EXIT_ON_FAILURE );
+    }
+
+    r64firstPoint = (r64*)bufferToBeProcessed;
+    r32firstPoint = (r32*)bufferToBeProcessed;
+
+    offsetLastPoint = borderZlength + dimz - 1;
+
+    r64firstPointResult = (r64*)bufferResult;
+    r32firstPointResult = (r32*)bufferResult;
+
+    offsetLastPoint = borderZlength + dimz - 1;
+
+    theLinePlusBorder = theLine + borderYlength;
+    resLinePlusBorder = resLine + borderYlength;
+
+    /*
+     * There are dimy*dimx Z lines to be processed.
+     */
+    for ( y=0; y<dimy; y++ )
+    for ( x=0; x<dimx; x++ ) {
+      /*
+       * Acquiring a Z line.
+       */ 
+      dbl_pt1 = theLinePlusBorder;
+      switch ( typeToBeProcessed ) {
+      case CGAL_DOUBLE :
+	r64_pt = r64firstPoint;
+	for ( z=0; z<dimz; z++, dbl_pt1++, r64_pt += dimxXdimy ) *dbl_pt1 = *r64_pt;
+	/*
+	 * Going to the first point of the next Z line
+	 */
+	r64firstPoint ++;
+	break;
+      case CGAL_FLOAT :
+      default :
+	r32_pt = r32firstPoint;
+	for ( z=0; z<dimz; z++, dbl_pt1++, r32_pt += dimxXdimy ) *dbl_pt1 = *r32_pt;
+	r32firstPoint ++;
+      }
+      /*
+       * Adding points at both ends of the line.
+       */
+      if ( borderZlength > 0 ) {
+	dbl_pt1 = theLine + borderZlength;   dbl_first = *dbl_pt1;
+	dbl_pt2 = theLine + offsetLastPoint; dbl_last  = *dbl_pt2;
+	for ( z=0; z<borderZlength; z++ ) {
+	  *--dbl_pt1 = dbl_first;
+	  *++dbl_pt2 = dbl_last;
+	}
+      }
+      /*
+       * Processing the line.
+       */
+      if ( RecursiveFilter1D( RFC, theLine, resLine, tmpLine, resLine, lengthZ ) == 0 ) {
+	if ( _VERBOSE_ != 0 ) 
+	  fprintf(stderr," Error in %s: unable to process Z line (x=%d,y=%d).\n", proc, x, y);
+	if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+	  free( bufferResult );
+	free( (void*)theLine );
+	return( EXIT_ON_FAILURE );
+      }
+      
+      /*
+       * Copy the result into the buffer bufferResult.
+       */
+      dbl_pt1 = resLinePlusBorder;
+      switch ( typeResult ) {
+      case CGAL_DOUBLE :
+	r64_pt = r64firstPointResult;
+	for ( z=0; z<dimz; z++, dbl_pt1++, r64_pt += dimxXdimy ) 
+	  *r64_pt = *dbl_pt1;
+	r64firstPointResult ++;
+	break;
+      case CGAL_FLOAT :
+      default :
+	r32_pt = r32firstPointResult;
+	for ( z=0; z<dimz; z++, dbl_pt1++, r32_pt += dimxXdimy ) 
+	  *r32_pt = (float)*dbl_pt1;
+	r32firstPointResult ++;
+      }
+    }
+
+    free( RFC );
+    RFC = NULL;
+
+  } /* end of Processing along Z. */
+  
+
+
+
+  /*
+   * From bufferResult to bufferOut
+   */
+  ConvertBuffer( bufferResult, typeResult, bufferOut, typeOut, (dimx*dimy*dimz) );
+
+  /*
+   * Releasing the buffers.
+   */
+  if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
+    free( bufferResult );
+  free( (void*)theLine );
+  
+  return( EXIT_ON_SUCCESS );
+}
+
+CGAL_INLINE_FUNCTION
+void Recbuffer_verbose ( )
+{
+  get_static_verbose_recbuffer() = 1;
+  Recline_verbose ( );
+}
+
+CGAL_INLINE_FUNCTION
+void Recbuffer_noverbose ( )
+{
+  get_static_verbose_recbuffer() = 0;
+  Recline_noverbose ( );
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.cpp
new file mode 100644
index 0000000..4217062
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "recline.h"
+#include "recline_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.h
new file mode 100644
index 0000000..d2f2bc3
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline.h
@@ -0,0 +1,235 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * recline.h - tools for recursive filtering of 1D lines
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1998
+ *
+ * DESCRIPTION: 
+ *
+ * Recursive filtering of a line (a 1D array)
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * http://www.inria.fr/epidaure/personnel/malandain/
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * Copyright Gregoire Malandain, INRIA
+ *
+ * ADDITIONS, CHANGES
+ *
+ */
+
+/*
+ * recursive filtering of a line (a 1D array)
+ */
+
+#ifndef _recline_h_
+#define _recline_h_
+
+
+
+/* The different recursive filter's types.
+ *
+ * DESCRIPTION:
+ *
+ * - ALPHA_DERICHE is the first recurvise filter designed
+ *   by R. Deriche. See REFERENCES.
+ *
+ * - with ALPHA_DERICHE's filters, one can either compute
+ *   derivatives from order 0 (smoothing) to 3, or extract edges.
+ *
+ * - GAUSSIAN_DERICHE is a 4th order recursive filter which
+ *   approximates the gaussien. See
+ *   "Recursively Implementing The Gaussian and Its Derivatives",
+ *   R. Deriche, International Conference On Image Processing,
+ *   pp 263-267, Singapore, September 1992. Also INRIA research
+ *   report.
+ *
+ * - with GAUSSIAN_DERICHE's filters, one can either compute
+ *   derivatives from order 0 (smoothing) to 2, or extract edges.
+ *
+ * - Extracting edges with ALPHA_DERICHE's filters is faster but
+ *   the modulus of the gradient (the estimated height of the step 
+ *   edge) depens on the gradient orientation because the filter
+ *   is not isotropic. Heights are better estimated with 
+ *   GAUSSIAN_DERICHE's filters but they seem not be perfectly
+ *   symmetrical.
+ *
+ * REFERENCES:
+ *
+ * - "Optimal edge detection using recursive filtering", R. Deriche,
+ *   International Journal of Computer Vision, pp 167-187, 1987.
+ *
+ * - "Recursive filtering and edge tracking: two primary tools
+ *    for 3-D edge detection", O. Monga, R. Deriche,
+ *   G. Malandain and J.-P. Cocquerez, Image and Vision
+ *   Computing 4:9, pp 203-214, August 1991.
+ */
+typedef enum {
+  UNKNOWN_FILTER = 0 /* unknown filter type */,
+  ALPHA_DERICHE = 1 /* Deriche's filter (exponential (- alpha |X|)) */,
+  GAUSSIAN_DERICHE = 2 /* gaussian approximation (Deriche's coefficients) */,
+  GAUSSIAN_FIDRICH = 3 /* gaussian approximation (Fidrich's coefficients) */
+} recursiveFilterType;
+
+
+
+/* Order of the derivative to be computed.
+ *
+ * DESCRIPTION:
+ *
+ * - NODERIVATIVE nothing will be done.
+ *
+ * - DERIVATIVE_0 means smoothing.
+ *
+ * - DERIVATIVE_1 first derivative. The normalization
+ *   of the filter is made so that the response to the
+ *   signal i=x will be 1.
+ *
+ * - DERIVATIVE_1_CONTOURS first derivative but adapted
+ *   to edge detections. The normalization of the filter 
+ *   is made so that the response to a step edge is 
+ *   the step edge height.
+ *
+ * - DERIVATIVE_2 second derivative. The normalization
+ *   of the filter is made so that the response to the
+ *   signal i=x*2/2 will be 1.
+ *
+ * - DERIVATIVE_3 third derivative. The normalization
+ *   of the filter is made so that the response to the
+ *   signal i=x*3/6 will be 1.
+ */
+typedef enum {
+  NODERIVATIVE  = -1 /* no derivative (no filtering) */,
+  DERIVATIVE_0  = 0 /* smoothing */,
+  SMOOTHING     = 0 /* smoothing */,
+  DERIVATIVE_1  = 1 /* derivative of order 1 */,
+  DERIVATIVE_2  = 2 /* derivative of order 2 */,
+  DERIVATIVE_3  = 3 /* derivative of order 3 */,
+  DERIVATIVE_1_CONTOURS = 11 /* derivative of order 1, normalization adapted to
+				contours. The response to a step-edge is the 
+				height of the step. */,
+  DERIVATIVE_1_EDGES = 11 /* derivative of order 1, normalization adapted to
+				contours. The response to a step-edge is the 
+				height of the step. */
+} derivativeOrder;
+
+
+
+typedef struct {
+  /*--- denominateur       ---*/
+  double sd1;
+  double sd2;
+  double sd3;
+  double sd4;
+  /*--- numerateur positif ---*/
+  double sp0;
+  double sp1;
+  double sp2;
+  double sp3;
+  /*--- numerateur negatif ---*/
+  double sn0;
+  double sn1;
+  double sn2;
+  double sn3;
+  double sn4;
+  /*--- type de filtre en cours ---*/
+  recursiveFilterType type_filter;
+  derivativeOrder derivative;
+} RFcoefficientType;
+
+
+
+/* Initialization of coefficients for recursive filtering.
+ *
+ * PARAMETERS:
+ *
+ * - the coefficient is the sigma's value in case of
+ *   gaussian filtering, or the alpha's value in case
+ *   of Deriche's filters.
+ *
+ * - the coefficient's value must be larger than 0.1
+ *   in case of gaussian filtering, and in the
+ *   [0.1,1.9] range in case of Deriche's filters.
+ *
+ * SEE:
+ *
+ * - recursiveFilterType
+ *
+ * - derivativeOrder
+ */
+extern RFcoefficientType * InitRecursiveCoefficients( double x, /* coefficient's value */
+				       recursiveFilterType filterType, /* filter's type */
+				       derivativeOrder derivative /* derivative's order */ );
+
+
+
+/* 1D recursive filtering along a line.
+ *
+ * WARNING:
+ * Coefficients should already be initialized.
+ *
+ * SEE:
+ *
+ * - recursiveFilterType
+ *
+ * - derivativeOrder
+ *
+ * RETURN:
+ *
+ * - 0 in case of error
+ *
+ * - 1 if successful
+ */
+extern int RecursiveFilter1D( RFcoefficientType *RFC,
+			      double *in, /* input line */ 
+			      double *out, /* output line */
+			      double *work1, /* first work array */
+			      double *work2, /* second work array, 
+						could be out if out is different from in */
+			      int dim /* lines' length */ );
+
+
+/* Turn on verbose mode.
+ *
+ * DESCRIPTION:
+ * Some information will be written on stderr when processing.
+ */
+extern void Recline_verbose ( );
+
+/* Turn off verbose mode.
+ *
+ * DESCRIPTION:
+ * Nothing will be written on stderr when processing.
+ */
+extern void Recline_noverbose ( );
+
+#ifdef CGAL_HEADER_ONLY
+#include "recline_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+#endif /* _recline_h_ */
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline_impl.h
new file mode 100644
index 0000000..9b5b190
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/recline_impl.h
@@ -0,0 +1,699 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * recline.c - tools for recursive filtering of 1D lines
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * DESCRIPTION: 
+ *
+ * Recursive filtering of a line (a 1D array)
+ * Filter coefficient are static variables.
+ *
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ * June, 9 1998
+ *
+ * Copyright Gregoire Malandain, INRIA
+ *
+ * ADDITIONS, CHANGES
+ *
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+
+
+#ifdef CGAL_HEADER_ONLY
+
+inline int& get_static_verbose_recline()
+{
+  static int _VERBOSE_RECLINE_ = 0;
+  return _VERBOSE_RECLINE_;
+}
+
+#else // CGAL_HEADER_ONLY
+
+static int _VERBOSE_RECLINE_ = 0;
+
+inline int& get_static_verbose_recline()
+{ return _VERBOSE_RECLINE_; }
+
+#endif // CGAL_HEADER_ONLY
+
+
+#define EXIT_ON_FAILURE 0
+#define EXIT_ON_SUCCESS 1
+
+
+
+CGAL_INLINE_FUNCTION
+void printRecursiveCoefficients( RFcoefficientType *RFC )
+{
+  printf( "denominator:\n" );
+  printf( "%f %f %f %f\n", RFC->sd1, RFC->sd2, RFC->sd3, RFC->sd4 );
+  printf( "positive numerator:\n" );
+  printf( "%f %f %f %f\n", RFC->sp0, RFC->sp1, RFC->sp2, RFC->sp3 );
+  printf( "negative numerator:\n" );
+  printf( "%f %f %f %f %f\n", RFC->sn0, RFC->sn1, RFC->sn2, RFC->sn3, RFC->sn4 );
+  printf( "\n" );
+}
+
+
+CGAL_INLINE_FUNCTION
+RFcoefficientType * InitRecursiveCoefficients( double x, 
+					       recursiveFilterType type_filter, 
+					       derivativeOrder derivative )
+{
+  const char *proc="InitRecursiveCoefficients";
+  double ex, k1, k2;
+  double a0, a1, c0, c1, omega0, omega1, b0, b1;
+  double cos0, sin0, cos1, sin1;
+  double sumA=0.0, sumC=0.0, aux;
+
+  RFcoefficientType *RFC = NULL;
+  RFC = (RFcoefficientType *)malloc( sizeof(RFcoefficientType) );
+  if ( RFC == NULL ) {
+    if ( get_static_verbose_recline() != 0 ) 
+      fprintf( stderr, "%s: allocation failed\n", proc );
+    return( NULL );
+  }
+  
+  RFC->sd1 = RFC->sd2 = RFC->sd3 = RFC->sd4 = 0.0;
+  RFC->sp0 = RFC->sp1 = RFC->sp2 = RFC->sp3 = 0.0;
+  RFC->sn0 = RFC->sn1 = RFC->sn2 = RFC->sn3 = RFC->sn4 = 0.0;
+  
+  RFC->type_filter = UNKNOWN_FILTER;
+  RFC->derivative  = NODERIVATIVE;
+  
+  ex = k1 = k2 = 0.0;
+  a0 = a1 = c0 = c1 = 0.0;
+  b0 = b1 = omega0 = omega1 = 0.0;
+  
+  /*--- Selon le type de filtrage (filtres de Deriche,
+    ou approximation de la gaussienne), x designe
+    soit alpha, soit sigma                         ---*/
+  
+  switch ( type_filter ) {
+
+  case GAUSSIAN_FIDRICH :
+    
+    if ( x < 0.1 ) {
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
+      }
+      free( RFC );
+      return( NULL );
+    }
+
+    switch ( derivative ) {
+    default :
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: improper value of derivative order.\n", proc );
+      }
+      free( RFC );
+      return( NULL );
+    case DERIVATIVE_0 :
+      a0 =  0.6570033214 / x;
+      a1 =  1.978946687  / x;
+      c0 = -0.2580640608 / x;
+      c1 = -0.2391206463 / x;
+      omega0 = 0.6512453378;
+      omega1 = 2.05339943;
+      b0 = 1.906154352;
+      b1 = 1.881305409;
+      break;
+    case DERIVATIVE_1 :
+    case DERIVATIVE_1_CONTOURS :
+      a0 = -0.1726729496 / x;
+      a1 = -2.003565572  / x;
+      c0 =  0.1726730777 / x;
+      c1 =  0.4440126835 / x;
+      b0 = 1.560644213;
+      b1 = 1.594202256;
+      omega0 = 0.6995461735;
+      omega1 = 2.144671764;
+      break;
+    case DERIVATIVE_2 :
+      a0 = -0.7241334169 / x;
+      a1 =  1.688628765  / x;
+      c0 =  0.3251949838 / x;
+      c1 = -0.7211796018 / x;
+      b0 = 1.294951143;
+      b1 = 1.427007123;
+      omega0 = 0.7789803775;
+      omega1 = 2.233566862;
+      break;
+    case DERIVATIVE_3 :
+      a0 =  1.285774106  / x;
+      a1 = -0.2896378408 / x;
+      c0 = -1.28577129   / x;
+      c1 =  0.26249833   / x;
+      b0 = 1.01162886;
+      b1 = 1.273344739;
+      omega0 = 0.9474270928;
+      omega1 = 2.337607006;
+      break;
+    }
+    
+    omega0 /= x;   sin0 = sin( omega0 );   cos0 = cos( omega0 ); 
+    omega1 /= x;   sin1 = sin( omega1 );   cos1 = cos( omega1 ); 
+    b0 /= x;
+    b1 /= x;
+
+    RFC->sp0  = a0 + c0;
+    RFC->sp1  = exp( -b1 ) * (c1 * sin1 - (c0 + 2 * a0) * cos1);
+    RFC->sp1 += exp( -b0 ) * (a1 * sin0 - (2 * c0 + a0) * cos0);
+    RFC->sp2  = 2.0 * exp( -b0 - b1 ) 
+      * ((a0 + c0) * cos1 * cos0 - cos1 * a1 * sin0 - cos0 * c1 * sin1);
+    RFC->sp2 += c0 * exp( -2.0 * b0 ) + a0 * exp( -2.0 * b1 );
+    RFC->sp3  = exp( -b1 - 2.0 * b0 ) * (c1 * sin1 - c0 * cos1);
+    RFC->sp3 += exp( -b0 - 2.0 * b1 ) * (a1 * sin0 - a0 * cos0);
+    
+    RFC->sd1  = -2.0 * exp( -b1 ) * cos1 - 2.0 * exp( -b0 ) * cos0;
+    RFC->sd2  = 4.0 * cos1 * cos0 * exp( -b0 - b1 ) 
+      + exp( -2.0 * b1 ) + exp( -2.0 * b0 );
+    RFC->sd3 = -2.0 * cos0 * exp( -b0 - 2.0 * b1 ) 
+      - 2.0 * cos1 * exp( -b1 - 2.0 * b0 );
+    RFC->sd4 = exp( -2.0 * b0 - 2.0 * b1 );
+    
+    switch ( derivative ) {
+    default :
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: improper value of derivative order.\n", proc );
+      }
+      free( RFC );
+      return( NULL );
+    case DERIVATIVE_0 :
+    case DERIVATIVE_2 :
+      RFC->sn1 =   RFC->sp1 - RFC->sd1 * RFC->sp0;
+      RFC->sn2 =   RFC->sp2 - RFC->sd2 * RFC->sp0;
+      RFC->sn3 =   RFC->sp3 - RFC->sd3 * RFC->sp0;
+      RFC->sn4 = - RFC->sd4 * RFC->sp0;
+      break;
+    case DERIVATIVE_1 :
+    case DERIVATIVE_1_CONTOURS :
+    case DERIVATIVE_3 :
+      RFC->sn1 = - RFC->sp1 + RFC->sd1 * RFC->sp0;
+      RFC->sn2 = - RFC->sp2 + RFC->sd2 * RFC->sp0;
+      RFC->sn3 = - RFC->sp3 + RFC->sd3 * RFC->sp0;
+      RFC->sn4 =   RFC->sd4 * RFC->sp0;
+    }
+    
+    RFC->type_filter = type_filter;
+    RFC->derivative  = derivative;
+    break;
+    
+  case GAUSSIAN_DERICHE :
+    
+    if ( x < 0.1 ) {
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
+      }
+      free( RFC );
+      return( NULL );
+    }
+
+    switch ( derivative ) {
+    default :
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
+      }
+      derivative = DERIVATIVE_0;
+    case DERIVATIVE_0 :
+      a0     =  1.68;
+      omega0 =  0.6318;
+      a1     =  3.735;
+      b0     =  1.783;
+      c0     = -0.6803;
+      omega1 =  1.997;
+      c1     = -0.2598;
+      b1     =  1.723;
+      break;
+    case DERIVATIVE_1 :
+    case DERIVATIVE_1_CONTOURS :
+      a0     =  -0.6472;
+      omega0 =  0.6719;
+      a1     =  -4.531;
+      b0     =  1.527;
+      c0     =  0.6494;
+      omega1 =  2.072;
+      c1     =  0.9557;
+      b1     =  1.516;
+      break;
+    case DERIVATIVE_2 :
+      a0     = -1.331;
+      omega0 =  0.748;
+      a1     =  3.661;
+      b0     =  1.24;
+      c0     =  0.3225;
+      omega1 =  2.166;
+      c1     = -1.738;
+      b1     =  1.314;
+    }
+	 
+    omega0 /= x;   sin0 = sin( omega0 );   cos0 = cos( omega0 ); 
+    omega1 /= x;   sin1 = sin( omega1 );   cos1 = cos( omega1 ); 
+    b0 /= x;
+    b1 /= x;
+
+    /*--- normalisation ---*/
+    switch ( derivative ) {
+    default :
+    case DERIVATIVE_0 :
+      sumA  = 2.0 * a1 * exp( b0 ) * cos0 * cos0 - a0 * sin0 * exp( 2.0 * b0 );
+      sumA += a0 * sin0 - 2.0 * a1 * exp( b0 );
+      sumA /= ( 2.0 * cos0 * exp( b0 ) - exp( 2.0 * b0 ) - 1 ) * sin0;
+      sumC  = 2.0 * c1 * exp( b1 ) * cos1 * cos1 - c0 * sin1 * exp( 2.0 * b1 );
+      sumC += c0 * sin1 - 2.0 * c1 * exp( b1 );
+      sumC /= ( 2.0 * cos1 * exp( b1 ) - exp( 2.0 * b1 ) - 1 ) * sin1;
+      break;
+    case DERIVATIVE_1 :
+      aux   = exp( 4.0 * b0 ) - 4.0 * cos0 * exp( 3.0 * b0 );
+      aux  += 2.0 * exp( 2.0 * b0 ) + 4.0 * cos0 * cos0 * exp( 2.0 * b0 );
+      aux  += 1.0 - 4.0 * cos0 * exp( b0 );
+      sumA  = a0 * cos0 - a1 * sin0 + a1 * sin0 * exp( 2.0 * b0 );
+      sumA += a0 * cos0 * exp( 2.0 * b0 ) - 2.0 * a0 * exp( b0 );
+      sumA *= exp( b0 ) / aux;
+      aux   = exp( 4.0 * b1 ) - 4.0 * cos1 * exp( 3.0 * b1 );
+      aux  += 2.0 * exp( 2.0 * b1 ) + 4.0 * cos1 * cos1 * exp( 2.0 * b1 );
+      aux  += 1.0 - 4.0 * cos1 * exp( b1 );
+      sumC  = c0 * cos1 - c1 * sin1 + c1 * sin1 * exp( 2.0 * b1 );
+      sumC += c0 * cos1 * exp( 2.0 * b1 ) - 2.0 * c0 * exp( b1 );
+      sumC *= exp( b1 ) / aux;
+      /*--- on multiplie les sommes par 2 car on n'a calcule que des demi-sommes 
+	et on change le signe car la somme doit etre egale a -1              ---*/
+      sumA *= (-2.0);
+      sumC *= (-2.0);
+      break;
+    case DERIVATIVE_1_CONTOURS :
+      /*--- la somme de 1 a l'infini est egale a 1 : cela introduit
+	un petit biais (reponse un rien superieur a la hauteur du step).
+	Avec une somme de 0 a l'infini, c'est pire                       ---*/
+      sumA  = a1 * exp( b0 ) - a1 * cos0 * cos0 * exp( b0 );
+      sumA += a0 * cos0 * sin0 * exp( b0 ) - a0 * sin0;
+      sumA /= sin0 * ( 2.0 * cos0 * exp( b0 ) - exp( 2.0 * b0 ) - 1 );
+      sumC  = c1 * exp( b1 ) - c1 * cos1 * cos1 * exp( b1 );
+      sumC += c0 * cos1 * sin1 * exp( b1 ) - c0 * sin1;
+      sumC /= sin1 * ( 2.0 * cos1 * exp( b1 ) - exp( 2.0 * b1 ) - 1 );
+      break;
+    case DERIVATIVE_2 :
+      aux   = 12.0 * cos0 * exp( 3.0 * b0 ) - 3.0 * exp( 2.0 * b0 );
+      aux  += 8.0 * cos0 * cos0 * cos0 * exp( 3.0 * b0 ) 
+	- 12.0 * cos0 * cos0 * exp( 4.0 * b0 );
+      aux  -= 3.0 * exp( 4.0 * b0 );
+      aux  += 6.0 * cos0 * exp( 5.0 * b0 ) -  exp( 6.0 * b0 ) 
+	+ 6.0 * cos0 * exp( b0 );
+      aux  -= ( 1.0 + 12.0 * cos0 * cos0 * exp( 2.0 * b0 ) );
+      sumA  = 4.0 * a0 * sin0 * exp( 3.0 * b0 ) 
+	+ a1 * cos0 * cos0 * exp( 4.0 * b0 );
+      sumA -= ( 4.0 * a0 * sin0 * exp( b0 ) 
+		+ 6.0 * a1 * cos0 * cos0 * exp( 2.0 * b0 ) );
+      sumA += 2.0 * a1 * cos0 * cos0 * cos0 * exp( b0 ) 
+	- 2.0 * a1 * cos0 * exp( b0 );
+      sumA += 2.0 * a1 * cos0 * cos0 * cos0 * exp( 3.0 * b0 ) 
+	- 2.0 * a1 * cos0 * exp( 3.0 * b0 );
+      sumA += a1 * cos0 * cos0 - a1 * exp( 4.0 * b0 );
+      sumA += 2.0 * a0 * sin0 * cos0 * cos0 * exp( b0 ) 
+	- 2.0 * a0 * sin0 * cos0 * cos0 * exp( 3.0 * b0 );
+      sumA -= ( a0 * sin0 * cos0 * exp( 4.0 * b0 ) + a1 );
+      sumA += 6.0 * a1 * exp( 2.0 * b0 ) + a0 * cos0 * sin0;
+      sumA *= 2.0 * exp( b0 ) / ( aux * sin0 );
+      aux   = 12.0 * cos1 * exp( 3.0 * b1 ) - 3.0 * exp( 2.0 * b1 );
+      aux  += 8.0 * cos1 * cos1 * cos1 * exp( 3.0 * b1 ) 
+	- 12.0 * cos1 * cos1 * exp( 4.0 * b1 );
+      aux  -= 3.0 * exp( 4.0 * b1 );
+      aux  += 6.0 * cos1 * exp( 5.0 * b1 ) -  exp( 6.0 * b1 ) 
+	+ 6.0 * cos1 * exp( b1 );
+      aux  -= ( 1.0 + 12.0 * cos1 * cos1 * exp( 2.0 * b1 ) );
+      sumC  = 4.0 * c0 * sin1 * exp( 3.0 * b1 ) 
+	+ c1 * cos1 * cos1 * exp( 4.0 * b1 );
+      sumC -= ( 4.0 * c0 * sin1 * exp( b1 ) 
+		+ 6.0 * c1 * cos1 * cos1 * exp( 2.0 * b1 ) );
+      sumC += 2.0 * c1 * cos1 * cos1 * cos1 * exp( b1 ) 
+	- 2.0 * c1 * cos1 * exp( b1 );
+      sumC += 2.0 * c1 * cos1 * cos1 * cos1 * exp( 3.0 * b1 ) 
+	- 2.0 * c1 * cos1 * exp( 3.0 * b1 );
+      sumC += c1 * cos1 * cos1 - c1 * exp( 4.0 * b1 );
+      sumC += 2.0 * c0 * sin1 * cos1 * cos1 * exp( b1 ) 
+	- 2.0 * c0 * sin1 * cos1 * cos1 * exp( 3.0 * b1 );
+      sumC -= ( c0 * sin1 * cos1 * exp( 4.0 * b1 ) + c1 );
+      sumC += 6.0 * c1 * exp( 2.0 * b1 ) + c0 * cos1 * sin1;
+      sumC *= 2.0 * exp( b1 ) / ( aux * sin1 );
+      /*--- on divise les sommes par 2 (la somme doit etre egale a 2) ---*/
+      sumA /= 2;
+      sumC /= 2;
+    }
+    a0 /= ( sumA + sumC );
+    a1 /= ( sumA + sumC );
+    c0 /= ( sumA + sumC );
+    c1 /= ( sumA + sumC );
+    
+    /*--- coefficients du calcul recursif ---*/
+    RFC->sp0  = a0 + c0;
+    RFC->sp1  = exp( -b1 ) * (c1 * sin1 - (c0 + 2 * a0) * cos1);
+    RFC->sp1 += exp( -b0 ) * (a1 * sin0 - (2 * c0 + a0) * cos0);
+    RFC->sp2  = 2.0 * exp( -b0 - b1 ) 
+      * ((a0 + c0) * cos1 * cos0 - cos1 * a1 * sin0 - cos0 * c1 * sin1);
+    RFC->sp2 += c0 * exp( -2.0 * b0 ) + a0 * exp( -2.0 * b1 );
+    RFC->sp3  = exp( -b1 - 2.0 * b0 ) * (c1 * sin1 - c0 * cos1);
+    RFC->sp3 += exp( -b0 - 2.0 * b1 ) * (a1 * sin0 - a0 * cos0);
+    
+    RFC->sd1  = -2.0 * exp( -b1 ) * cos1 - 2.0 * exp( -b0 ) * cos0;
+    RFC->sd2  = 4.0 * cos1 * cos0 * exp( -b0 - b1 ) 
+      + exp( -2.0 * b1 ) + exp( -2.0 * b0 );
+    RFC->sd3 = -2.0 * cos0 * exp( -b0 - 2.0 * b1 ) 
+      - 2.0 * cos1 * exp( -b1 - 2.0 * b0 );
+    RFC->sd4 = exp( -2.0 * b0 - 2.0 * b1 );
+    
+    switch ( derivative ) {
+    default :
+    case DERIVATIVE_0 :
+    case DERIVATIVE_2 :
+      RFC->sn1 =   RFC->sp1 - RFC->sd1 * RFC->sp0;
+      RFC->sn2 =   RFC->sp2 - RFC->sd2 * RFC->sp0;
+      RFC->sn3 =   RFC->sp3 - RFC->sd3 * RFC->sp0;
+      RFC->sn4 = - RFC->sd4 * RFC->sp0;
+      break;
+    case DERIVATIVE_1 :
+    case DERIVATIVE_1_CONTOURS :
+    case DERIVATIVE_3 :
+      RFC->sn1 = - RFC->sp1 + RFC->sd1 * RFC->sp0;
+      RFC->sn2 = - RFC->sp2 + RFC->sd2 * RFC->sp0;
+      RFC->sn3 = - RFC->sp3 + RFC->sd3 * RFC->sp0;
+      RFC->sn4 =   RFC->sd4 * RFC->sp0;
+    }
+    
+    RFC->type_filter = type_filter;
+    RFC->derivative  = derivative;
+    break;
+
+
+
+  default :
+    if ( get_static_verbose_recline() != 0 ) {
+      fprintf( stderr, "%s: switch to default recursive filter (Deriche's filters).\n", proc );
+    }
+    type_filter = ALPHA_DERICHE;
+  case ALPHA_DERICHE :
+
+    if ( (x < 0.1) || (x > 1.9) ) {
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1 and <= 1.9).\n", proc );
+      }
+      free( RFC );
+      return( NULL );
+    }
+    ex = exp( (-x) );
+    
+    switch ( derivative ) {
+    default :
+      if ( get_static_verbose_recline() != 0 ) {
+	fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
+      }
+      derivative = DERIVATIVE_0;
+    case DERIVATIVE_0 :
+      RFC->sp0 = (1.0 - ex) * (1.0 - ex) / (1.0 + 2.0 * x * ex - ex * ex);
+      RFC->sp1 = RFC->sp0 * (x - 1.0) * ex;
+      RFC->sn1 = RFC->sp0 * (x + 1.0) * ex;
+      RFC->sn2 = (- RFC->sp0) * ex * ex;
+      RFC->sd1 = (- 2.0) * ex;
+      RFC->sd2 = ex * ex;
+      break;
+    case DERIVATIVE_1 :
+      RFC->sp1 = - (1.0 - ex) * (1.0 - ex) * (1.0 - ex) / (2.0 * (1.0 + ex));
+      RFC->sn1 = (- RFC->sp1);
+      RFC->sd1 = (- 2.0) * ex;
+      RFC->sd2 = ex * ex;	    
+      break;
+    case DERIVATIVE_1_CONTOURS :
+      RFC->sp1 = - (1.0 - ex) * (1.0 - ex);
+      RFC->sn1 = (- RFC->sp1);
+      RFC->sd1 = (- 2.0) * ex;
+      RFC->sd2 = ex * ex;	    
+      break;
+    case DERIVATIVE_2 :
+      k1 = (- 2.0) * (1.0 - ex) * (1.0 - ex) * (1.0 - ex);
+      k1 /= (1.0 + ex) * (1.0 + ex) * (1.0 + ex);
+      k2 = (1.0 - ex * ex) / (2.0 * ex);
+      RFC->sp0 = k1;
+      RFC->sp1 = (- k1) * (1.0 + k2) * ex;
+      RFC->sn1 = k1 * (1.0 - k2) * ex;
+      RFC->sn2 = (- k1) * ex * ex;
+      RFC->sd1 = (- 2.0) * ex;
+      RFC->sd2 = ex * ex;
+      break;
+    case DERIVATIVE_3 :
+      k1 = (1.0 + x) * ex + (x - 1.0);
+      k2 = (1.0 - ex) / k1;
+      k1 *= (1.0 - ex) * (1.0 - ex) * (1.0 - ex) * (1.0 - ex);
+      k1 /= 2.0 * x * x * ex * ex;
+      k1 /= ex + 1.0;
+      RFC->sp0 = k1 * x * (k2 + 1.0);
+      RFC->sp1 = (- k1) * x * (1.0 + k2 + k2*x) * ex;
+      RFC->sn0 = (- RFC->sp0);
+      RFC->sn1 = (- RFC->sp1);
+      RFC->sd1 = (- 2.0) * ex;
+      RFC->sd2 = ex * ex;
+    }
+    RFC->type_filter = type_filter;
+    RFC->derivative  = derivative;
+  }
+
+  return( RFC );
+}
+
+
+
+CGAL_INLINE_FUNCTION
+int RecursiveFilter1D( RFcoefficientType *RFC,
+		       double *in, 
+		       double *out, 
+		       double *work1, 
+		       double *work2, 
+		       int dim )
+{
+  const char *proc="RecursiveFilter1D";
+  double rp0, rp1, rp2, rp3;
+  double rd1, rd2, rd3, rd4;
+  double rn0, rn1, rn2, rn3, rn4;
+  int i;
+  double *w0, *w1, *w2, *w3, *w4;
+  double *d0, *d1, *d2, *d3, *d4;
+
+  if ( RFC->type_filter == UNKNOWN_FILTER ) {
+    if ( get_static_verbose_recline() != 0 )
+      fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+  if ( RFC->derivative == NODERIVATIVE ) {
+    if ( get_static_verbose_recline() != 0 )
+      fprintf( stderr, "%s: unknown type of derivative.\n", proc );
+    return( EXIT_ON_FAILURE );
+  }
+
+  rd1 = rd2 = rd3 = rd4 = 0.0;
+  rp0 = rp1 = rp2 = rp3 = 0.0;
+  rn0 = rn1 = rn2 = rn3 = rn4 = 0.0;
+  
+  switch( RFC->type_filter ) {
+  default :
+    if ( get_static_verbose_recline() != 0 )
+      fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
+    return( EXIT_ON_FAILURE );
+  case GAUSSIAN_FIDRICH :
+  case GAUSSIAN_DERICHE :
+    /*--- filtrage generique d'ordre 4 ---*/
+    rp0 = RFC->sp0;   rp1 = RFC->sp1;   rp2 = RFC->sp2;   rp3 = RFC->sp3;
+    rd1 = RFC->sd1;   rd2 = RFC->sd2;   rd3 = RFC->sd3;   rd4 = RFC->sd4;
+    rn1 = RFC->sn1;   rn2 = RFC->sn2;   rn3 = RFC->sn3;   rn4 = RFC->sn4;
+    
+    /* on positionne les pointeurs 
+     */
+    w4 = work1;   w3 = w4+1;   w2 = w3+1;   w1 = w2+1;   w0 = w1+1;
+    d3 = in+1;    d2 = d3+1;   d1 = d2+1;   d0 = d1+1;
+    /*--- calcul de y+ ---*/
+    *(w4) = rp0 * *(in);
+    *(w3) = rp0 * *(d3) + rp1 * *(in)
+          - rd1 * *(w4);   
+    *(w2) = rp0 * *(d2) + rp1 * *(d3) + rp2 * *(in)
+          - rd1 * *(w3) - rd2 * *(w4);
+    *(w1) = rp0 * *(d1) + rp1 * *(d2) + rp2 * *(d3) + rp3 * *(in)
+          - rd1 * *(w2) - rd2 * *(w3) - rd3 * *(w4);
+    for (i=4; i<dim; i++,w0++,w1++,w2++,w3++,w4++,d0++,d1++,d2++,d3++) 
+      *(w0) = rp0 * *(d0) + rp1 * *(d1) + rp2 * *(d2) + rp3 * *(d3)
+            - rd1 * *(w1) - rd2 * *(w2) - rd3 * *(w3) - rd4 * *(w4);
+    
+    /* on positionne les pointeurs 
+     */
+    w4 = work2+dim-1;   w3 = w4-1;   w2 = w3-1;   w1 = w2-1;   w0 = w1-1;
+    d4 = in+dim-1;      d3 = d4-1;   d2 = d3-1;   d1 = d2-1;
+    /*--- calcul de y- ---*/
+    *(w4) = 0;
+    *(w3) = rn1 * *(d4);
+    *(w2) = rn1 * *(d3) + rn2 * *(d4) 
+          - rd1 * *(w3);
+    *(w1) = rn1 * *(d2) + rn2 * *(d3) + rn3 * *(d4) 
+          - rd1 * *(w2) - rd2 * *(w3);
+    for (i=dim-5; i>=0; i--,w0--,w1--,w2--,w3--,w4--,d1--,d2--,d3--,d4--)
+      *(w0) = rn1 * *(d1) + rn2 * *(d2) + rn3 * *(d3) + rn4 * *(d4)
+	    - rd1 * *(w1) - rd2 * *(w2) - rd3 * *(w3) - rd4 * *(w4);
+
+    /*--- calcul final ---*/
+    w1 = work1;   w2 = work2;   d0 = out;
+    for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
+      *d0 = *w1 + *w2;
+    
+    break;
+
+  case ALPHA_DERICHE :
+    
+    switch( RFC->derivative ) {
+    default :
+    case DERIVATIVE_0 :
+    case DERIVATIVE_2 :
+
+      rp0 = RFC->sp0;   rp1 = RFC->sp1;
+      rd1 = RFC->sd1;   rd2 = RFC->sd2;
+      rn1 = RFC->sn1;   rn2 = RFC->sn2;
+      
+      /* on positionne les pointeurs 
+       */
+      w2 = work1;   w1 = w2+1;   w0 = w1+1;
+      d1 = in+1;    d0 = d1+1;
+      /*--- calcul de y+ ---*/
+      *(w2) = rp0 * *(in);
+      *(w1) = rp0 * *(d1) + rp1 * *(in) 
+	    - rd1 * *(w2);     
+      for (i=2;  i<dim; i++,w0++,w1++,w2++,d0++,d1++)
+	*(w0) = rp0 * *(d0) + rp1 * *(d1)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
+      d2 = in+dim-1;      d1 = d2-1;
+      /*--- calcul de y- ---*/
+      *(w2) = 0.0;
+      *(w1) = rn1 * *(d2);
+      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d1--,d2--)
+	*(w0) = rn1 * *(d1) + rn2 * *(d2)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      /*--- calcul final ---*/
+      w1 = work1;   w2 = work2;   d0 = out;
+      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
+	*d0 = *w1 + *w2;
+      
+      break;
+      
+    case DERIVATIVE_1 :
+    case DERIVATIVE_1_CONTOURS :
+      rp1 = RFC->sp1;
+      rn1 = RFC->sn1;
+      rd1 = RFC->sd1;   rd2 = RFC->sd2;
+      
+      /* on positionne les pointeurs 
+       */
+      w2 = work1;   w1 = w2+1;   w0 = w1+1;
+      d1 = in+1;
+      /*--- calcul de y+ ---*/
+      *(w2) = 0.0;
+      *(w1) = rp1 * *(in);     
+      for (i=2;  i<dim; i++,w0++,w1++,w2++,d1++)
+	*(w0) = rp1 * *(d1)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      
+      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
+      d2 = in+dim-1;      d1 = d2-1;
+      /*--- calcul de y- ---*/
+      *(w2) = 0.0;
+      *(w1) = rn1 * *(d2);
+      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d1--)
+	*(w0) = rn1 * *(d1)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      /*--- calcul final ---*/
+      w1 = work1;   w2 = work2;   d0 = out;
+      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
+	*d0 = *w1 + *w2;
+      
+      break;
+
+    case DERIVATIVE_3 :
+      rp0 = RFC->sp0;   rp1 = RFC->sp1;
+      rd1 = RFC->sd1;   rd2 = RFC->sd2;
+      rn0 = RFC->sn0;   rn1 = RFC->sn1;
+      
+      w2 = work1;   w1 = w2+1;   w0 = w1+1;
+      d1 = in+1;   d0 = d1+1;
+      /*--- calcul de y+ ---*/
+      *(w2) = rp0 * *(in);
+      *(w1) = rp0 * *(d1) + rp1 * *(in) 
+	    - rd1 * *(w2);     
+      for (i=2;  i<dim; i++,w0++,w1++,w2++,d0++,d1++)
+	*(w0) = rp0 * *(d0) + rp1 * *(d1)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      w2 = work2+dim-1;   w1 = w2-1;   w0 = w1-1;
+      d2 = in+dim-1;      d1 = d2-1;   d0 = d1-1;
+      /*--- calcul de y- ---*/
+      *(w2) = rn0 * *(d2);
+      *(w1) = rn0 * *(d1) + rn1 * *(d2) 
+	    - rd1 * *(w2);
+      for (i=dim-3; i>=0; i--,w0--,w1--,w2--,d0--,d1--)
+	*(w0) = rn0 * *(d0) + rn1 * *(d1)
+	      - rd1 * *(w1) - rd2 * *(w2);
+      
+      /*--- calcul final ---*/
+      w1 = work1;   w2 = work2;   d0 = out;
+      for (i=0 ; i<dim ; i++,w1++,w2++,d0++)
+	*d0 = *w1 + *w2;
+      
+    }
+  }
+  return( EXIT_ON_SUCCESS );
+}
+
+CGAL_INLINE_FUNCTION
+void Recline_verbose ( )
+{
+  get_static_verbose_recline() = 1;
+}
+CGAL_INLINE_FUNCTION
+void Recline_noverbose ( )
+{
+  get_static_verbose_recline() = 0;
+}
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.cpp b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.cpp
new file mode 100644
index 0000000..2c01578
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+#ifndef CGAL_HEADER_ONLY
+
+#include "reech4x4.h"
+#include "reech4x4_impl.h"
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.h
new file mode 100644
index 0000000..11f84f7
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4.h
@@ -0,0 +1,288 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * reech4x4.h -
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ *
+ *
+ * ADDITIONS, CHANGES
+ *	
+ *	
+ *	
+ *
+ */
+
+
+/* CAUTION
+   DO NOT EDIT THIS FILE,
+   UNLESS YOU HAVE A VERY GOOD REASON 
+ */
+
+#ifndef _reech4x4_h_
+#define _reech4x4_h_
+
+
+
+
+
+
+
+
+
+extern void Reech3DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech3DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech3DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+extern void Reech2DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech2DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech2DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+
+
+
+
+
+
+extern void Reech3DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech3DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech3DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+extern void Reech2DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech2DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech2DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+
+
+
+
+
+
+extern void Reech3DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech3DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech3DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+extern void Reech2DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech2DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech2DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+
+
+
+
+
+
+extern void Reech3DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech3DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech3DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+extern void Reech2DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech2DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech2DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+
+
+
+
+
+
+extern void Reech3DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech3DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech3DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+extern void Reech2DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     );
+extern void Reech2DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias );
+extern void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      );
+
+
+
+
+
+
+
+extern void Reech4x4_verbose ( );
+extern void Reech4x4_noverbose ( );
+
+#ifdef CGAL_HEADER_ONLY
+#include "reech4x4_impl.h"
+#endif // CGAL_HEADER_ONLY
+
+
+#endif
diff --git a/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4_impl.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4_impl.h
new file mode 100644
index 0000000..26ef27a
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/reech4x4_impl.h
@@ -0,0 +1,3176 @@
+// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France)
+// All rights reserved.
+//
+// This file is part of the ImageIO Library, and as been adapted for
+// CGAL (www.cgal.org).
+// You can redistribute it and/or  modify it under the terms of the
+// GNU Lesser General Public License as published by the Free Software Foundation;
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s)     :  ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau
+
+/*************************************************************************
+ * reech4x4.c -
+ *
+ * $Id$
+ *
+ * Copyright©INRIA 1999
+ *
+ * AUTHOR:
+ * Gregoire Malandain (greg at sophia.inria.fr)
+ * 
+ * CREATION DATE: 
+ *
+ *
+ * ADDITIONS, CHANGES
+ *	
+ *	
+ *	
+ *
+ */
+
+#ifdef CGAL_HEADER_ONLY
+#define CGAL_INLINE_FUNCTION inline
+#else
+#define CGAL_INLINE_FUNCTION
+#endif
+
+/* CAUTION
+   DO NOT EDIT THIS FILE,
+   UNLESS YOU HAVE A VERY GOOD REASON 
+ */
+
+#include <stdio.h>
+#include "typedefs.h"
+
+#define _CONVERTR_(R) ( R )
+#define _CONVERTI_(R) ( (R) >= 0.0 ? ((int)((R)+0.5)) : ((int)((R)-0.5)) )
+
+
+#ifdef CGAL_HEADER_ONLY
+
+inline int& get_static_verbose_reech4x4()
+{
+  static int _VERBOSE_REECH_ = 0;
+  return _VERBOSE_REECH_;
+}
+
+#else // CGAL_HEADER_ONLY
+
+static int _VERBOSE_REECH_ = 0;
+
+inline int& get_static_verbose_reech4x4()
+{ return _VERBOSE_REECH_; }
+
+#endif // CGAL_HEADER_ONLY
+
+
+
+
+
+
+/* Resampling procedure.
+
+   Work for 3D images, not for vectorial ones.
+   
+   (double* mat) is the matrix which permits to get
+   from resBuf into theBuf. 
+   If one only have the matrix from theBuf into resBuf,
+   it must be inverted first.
+
+   Soit x le point transforme et ix=(int)x;
+   nous allons distinguer les cas suivants :
+    x < -0.5               => resultat = 0
+    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
+    0.0 < x && ix < dimx-1 => on interpole selon X
+    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
+    x >= dimx-0.5          => resultat = 0
+
+*/
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *tpt;
+  u8 *rbuf = (u8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (u8 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    *rbuf = *tpt;
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      *rbuf = (u8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *tpt;
+  u8 *rbuf = (u8*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (u8 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	res = res * g + b;
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    res = (double)(*tpt) * g + b;
+	    *rbuf = (u8)_CONVERTI_( res );
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  res = res * g + b;
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  res = res * g + b;
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	res = res * g + b;
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  res = res * g + b;
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	res = res * g + b;
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      res = res * g + b;
+      *rbuf = (u8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *rbuf = (u8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      iz = (int)(z+0.5);
+      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *tpt;
+  u8 *rbuf = (u8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (u8 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  *rbuf = *tpt;
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      *rbuf = (u8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *tpt;
+  u8 *rbuf = (u8*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (u8 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	res = res * g + b;
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  res = (double)(*tpt) * g + b;
+	  *rbuf = (u8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	res = (double)(*tpt) * g + b;
+	*rbuf = (u8)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      res = res * g + b;
+            *rbuf = (u8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy;
+  double x, y;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  u8 *tbuf = (u8*)theBuf;
+  u8 *rbuf = (u8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx ];
+    }
+  }
+}
+
+
+
+
+
+
+/* Resampling procedure.
+
+   Work for 3D images, not for vectorial ones.
+   
+   (double* mat) is the matrix which permits to get
+   from resBuf into theBuf. 
+   If one only have the matrix from theBuf into resBuf,
+   it must be inverted first.
+
+   Soit x le point transforme et ix=(int)x;
+   nous allons distinguer les cas suivants :
+    x < -0.5               => resultat = 0
+    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
+    0.0 < x && ix < dimx-1 => on interpole selon X
+    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
+    x >= dimx-0.5          => resultat = 0
+
+*/
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *tpt;
+  s8 *rbuf = (s8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (s8 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    *rbuf = *tpt;
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      *rbuf = (s8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *tpt;
+  s8 *rbuf = (s8*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (s8 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	res = res * g + b;
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    res = (double)(*tpt) * g + b;
+	    *rbuf = (s8)_CONVERTI_( res );
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  res = res * g + b;
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  res = res * g + b;
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	res = res * g + b;
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  res = res * g + b;
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	res = res * g + b;
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      res = res * g + b;
+      *rbuf = (s8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *rbuf = (s8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      iz = (int)(z+0.5);
+      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *tpt;
+  s8 *rbuf = (s8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (s8 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  *rbuf = *tpt;
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      *rbuf = (s8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *tpt;
+  s8 *rbuf = (s8*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (s8 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	res = res * g + b;
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  res = (double)(*tpt) * g + b;
+	  *rbuf = (s8)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	res = (double)(*tpt) * g + b;
+	*rbuf = (s8)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      res = res * g + b;
+            *rbuf = (s8)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy;
+  double x, y;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  s8 *tbuf = (s8*)theBuf;
+  s8 *rbuf = (s8*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s8*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx ];
+    }
+  }
+}
+
+
+
+
+
+
+/* Resampling procedure.
+
+   Work for 3D images, not for vectorial ones.
+   
+   (double* mat) is the matrix which permits to get
+   from resBuf into theBuf. 
+   If one only have the matrix from theBuf into resBuf,
+   it must be inverted first.
+
+   Soit x le point transforme et ix=(int)x;
+   nous allons distinguer les cas suivants :
+    x < -0.5               => resultat = 0
+    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
+    0.0 < x && ix < dimx-1 => on interpole selon X
+    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
+    x >= dimx-0.5          => resultat = 0
+
+*/
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *tpt;
+  u16 *rbuf = (u16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (u16 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    *rbuf = *tpt;
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      *rbuf = (u16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *tpt;
+  u16 *rbuf = (u16*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (u16 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	res = res * g + b;
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    res = (double)(*tpt) * g + b;
+	    *rbuf = (u16)_CONVERTI_( res );
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  res = res * g + b;
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  res = res * g + b;
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	res = res * g + b;
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  res = res * g + b;
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	res = res * g + b;
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      res = res * g + b;
+      *rbuf = (u16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *rbuf = (u16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      iz = (int)(z+0.5);
+      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *tpt;
+  u16 *rbuf = (u16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (u16 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  *rbuf = *tpt;
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      *rbuf = (u16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *tpt;
+  u16 *rbuf = (u16*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (u16 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	res = res * g + b;
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  res = (double)(*tpt) * g + b;
+	  *rbuf = (u16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	res = (double)(*tpt) * g + b;
+	*rbuf = (u16)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      res = res * g + b;
+            *rbuf = (u16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy;
+  double x, y;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  u16 *tbuf = (u16*)theBuf;
+  u16 *rbuf = (u16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (u16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx ];
+    }
+  }
+}
+
+
+
+
+
+
+/* Resampling procedure.
+
+   Work for 3D images, not for vectorial ones.
+   
+   (double* mat) is the matrix which permits to get
+   from resBuf into theBuf. 
+   If one only have the matrix from theBuf into resBuf,
+   it must be inverted first.
+
+   Soit x le point transforme et ix=(int)x;
+   nous allons distinguer les cas suivants :
+    x < -0.5               => resultat = 0
+    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
+    0.0 < x && ix < dimx-1 => on interpole selon X
+    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
+    x >= dimx-0.5          => resultat = 0
+
+*/
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *tpt;
+  s16 *rbuf = (s16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (s16 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    *rbuf = *tpt;
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      *rbuf = (s16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *tpt;
+  s16 *rbuf = (s16*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (s16 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	res = res * g + b;
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    res = (double)(*tpt) * g + b;
+	    *rbuf = (s16)_CONVERTI_( res );
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  res = res * g + b;
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  res = res * g + b;
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	res = res * g + b;
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  res = res * g + b;
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	res = res * g + b;
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      res = res * g + b;
+      *rbuf = (s16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *rbuf = (s16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      iz = (int)(z+0.5);
+      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *tpt;
+  s16 *rbuf = (s16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (s16 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  *rbuf = *tpt;
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      *rbuf = (s16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *tpt;
+  s16 *rbuf = (s16*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (s16 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	res = res * g + b;
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  res = (double)(*tpt) * g + b;
+	  *rbuf = (s16)_CONVERTI_( res );
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	res = (double)(*tpt) * g + b;
+	*rbuf = (s16)_CONVERTI_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      res = res * g + b;
+            *rbuf = (s16)_CONVERTI_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy;
+  double x, y;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  s16 *tbuf = (s16*)theBuf;
+  s16 *rbuf = (s16*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (s16*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx ];
+    }
+  }
+}
+
+
+
+
+
+
+/* Resampling procedure.
+
+   Work for 3D images, not for vectorial ones.
+   
+   (double* mat) is the matrix which permits to get
+   from resBuf into theBuf. 
+   If one only have the matrix from theBuf into resBuf,
+   it must be inverted first.
+
+   Soit x le point transforme et ix=(int)x;
+   nous allons distinguer les cas suivants :
+    x < -0.5               => resultat = 0
+    -0.5 <= x < 0.0        => ix=0, on n'interpole pas selon X
+    0.0 < x && ix < dimx-1 => on interpole selon X
+    x < dimx-0.5           => ix=dimx-1, on n'interpole pas selon X
+    x >= dimx-0.5          => resultat = 0
+
+*/
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *tpt;
+  r32 *rbuf = (r32*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (r32 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    *rbuf = *tpt;
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      *rbuf = (r32)_CONVERTR_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim, /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z, dx, dy, dz, dxdy,dxdz,dydz,dxdydz;
+  double res;
+  double v6, v5, v4;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int toffset1=tdimxy+tdimx+1, toffset2=tdimxy-tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  double ddimz = (double)tdimz-0.5;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *tpt;
+  r32 *rbuf = (r32*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      if ((z < -0.5) || ( z > ddimz)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;
+      iy = (int)y;
+      iz = (int)z;
+      tpt = (r32 *)tbuf;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) &&
+	   (z > 0.0) && (iz < t1dimz) ) {
+	/* the corresponding point is in the box defined 
+	   by (ix[+1],iy[+1],iz[+1]) */
+	dx = x - ix;
+	dy = y - iy;
+	dz = z - iz;
+	dxdy = dx*dy;
+	dxdz = dx*dz;
+	dydz = dy*dz;
+	dxdydz = dxdy*dz;
+
+	/* we have
+	   v[7]=dxdydz;            coefficient of tbuf(ix+1,iy+1,iz+1)
+	   v[6]=dxdz-dxdydz;       coefficient of tbuf(ix+1,iy,  iz+1)
+	   v[5]=dxdy-dxdydz;       coefficient of tbuf(ix+1,iy+1,iz  )
+	   v[4]=dx-dxdy-v[6];      coefficient of tbuf(ix+1,iy  ,iz  )
+	   v[3]=dydz-dxdydz;       coefficient of tbuf(ix  ,iy+1,iz+1)
+	   v[2]=dz-dydz-v[6];      coefficient of tbuf(ix  ,iy  ,iz+1)
+	   v[1]=dy-dydz-v[5];      coefficient of tbuf(ix  ,iy+1,iz  )
+	   v[0]=1-dy-dz+dydz-v[4]; coefficient of tbuf(ix  ,iy  ,iz  )
+	*/
+	tpt += ix + iy * tdimx + iz * tdimxy + toffset1;
+	v6 = dxdz-dxdydz;
+	v5 = dxdy-dxdydz;
+	v4 = dx-dxdy-v6;
+
+	res = 0;
+	res += dxdydz * (*tpt);            /* tbuf(ix+1,iy+1,iz+1) */
+	tpt --;
+	res += (dydz-dxdydz) * (*tpt);     /* tbuf(ix  ,iy+1,iz+1) */
+	tpt -= t1dimx;
+	res += v6 * (*tpt);                /* tbuf(ix+1  ,iy,  iz+1) */
+	tpt --;
+	res += (dz-dydz-v6) * (*tpt);      /* tbuf(ix  ,iy  ,iz+1) */
+	tpt -= toffset2;
+	res += v5 * (*tpt);                /* tbuf(ix+1,iy+1,iz  ) */
+	tpt --;
+	res += (dy-dydz-v5) * (*tpt);      /* tbuf(ix  ,iy+1,iz  ) */
+	tpt -= t1dimx;
+	res += v4 * (*tpt);                /* tbuf(ix+1,iy  ,iz  ) */
+	tpt --;
+	res += (1-dy-dz+dydz-v4) * (*tpt); /* tbuf(ix  ,iy  ,iz  ) */
+	res = res * g + b;
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here, we are sure we are on some border */
+      tpt += ix + iy * tdimx + iz * tdimxy;
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  if ( (z < 0.0) || (iz == t1dimz) ) {
+	    res = (double)(*tpt) * g + b;
+	    *rbuf = (r32)_CONVERTR_( res );
+	    continue;
+	  }
+	  dz = z - iz;
+	  res  = (1-dz) * (*tpt); /* (1-dz)* tbuf(ix,iy,iz) */
+	  tpt += tdimxy;
+	  res += dz * (*tpt);     /* dz * tbuf(ix,iy,iz+1) */
+	  res = res * g + b;
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+	}
+	dy = y - iy;
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy,iz) */
+	  tpt += tdimx;
+	  res += dy * (*tpt);     /* dy * tbuf(ix,iy+1,iz) */
+	  res = res * g + b;
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+ 	}
+	dz = z - iz;
+	res = (1-dy)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt += tdimx;
+	res += dy*(1-dz) * (*tpt);    /* tbuf(ix,iy+1,iz) */
+	tpt += toffset2+1;
+	res += (1-dy)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt += tdimx;
+	res += dy*dz * (*tpt);        /* tbuf(ix,iy+1,iz+1) */
+	res = res * g + b;
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here we are sure that the border is either
+	 along the Y or the Z axis */
+      dx = x - ix;
+      if ( (y < 0.0) || (iy == t1dimy) ) {
+	if ( (z < 0.0) || (iz == t1dimz) ) {
+	  res = (1-dx) * (*tpt); /* tbuf(ix,iy,iz) */
+	  tpt ++;
+	  res += dx * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	  res = res * g + b;
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+	}
+	dz = z - iz;
+	res = (1-dx)*(1-dz) * (*tpt); /* tbuf(ix,iy,iz) */
+	tpt ++;
+	res += dx*(1-dz) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+	tpt += tdimxy-1;
+	res += (1-dx)*dz * (*tpt);    /* tbuf(ix,iy,iz+1) */
+	tpt ++;
+	res += dx*dz * (*tpt);        /* tbuf(ix+1,iy,iz+1) */
+	res = res * g + b;
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      /* here we are sure that the border is along the Z axis */
+      dy = y - iy;
+      res = (1-dx)*(1-dy) * (*tpt); /* tbuf(ix,iy,iz) */
+      tpt ++;
+      res += dx*(1-dy) * (*tpt);    /* tbuf(ix+1,iy,iz) */
+      tpt += t1dimx;
+      res += (1-dx)*dy * (*tpt);    /* tbuf(ix,iy+1,iz) */
+      tpt ++;
+      res += dx*dy * (*tpt);        /* tbuf(ix+1,iy+1,iz) */
+      res = res * g + b;
+      *rbuf = (r32)_CONVERTR_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech3DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy, iz;
+  double x, y, z;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1], tdimz=theDim[2];
+  int tdimxy=tdimx*tdimy;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1, t1dimz=tdimz-1;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *rbuf = (r32*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[2] * k + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[6] * k + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      z = mat[8] * i +  mat[9] * j + mat[10] * k + mat[11];
+      iz = (int)(z+0.5);
+      if (( z < -0.5 ) || ( iz > t1dimz)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx + iz * tdimxy ];
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat   /* transformation matrix */
+			     )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *tpt;
+  r32 *rbuf = (r32*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (r32*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (r32 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  *rbuf = *tpt;
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      *rbuf = (r32)_CONVERTR_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
+			     int *theDim,  /* dimensions of this buffer */
+			     void* resBuf, /* result buffer */
+			     int *resDim,  /* dimensions of this buffer */
+			     double* mat,   /* transformation matrix */
+			     float gain,
+			     float bias )
+{
+  int i, j, k, ix, iy;
+  double x, y, dx, dy, dxdy;
+  double res, v;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int toffset=tdimx-1;
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  double ddimx = (double)tdimx-0.5, ddimy = (double)tdimy-0.5;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *tpt;
+  r32 *rbuf = (r32*)resBuf;
+  double b=bias;
+  double g=gain;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (r32*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j +              mat[3];
+      if ((x < -0.5) || ( x > ddimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j +              mat[7];
+      if ((y < -0.5) || ( y > ddimy)) { *rbuf = 0; continue; }
+
+      /* here, the point lies on the borders or completely inside
+	 the image */
+      ix = (int)x;      
+      iy = (int)y;
+      tpt = (r32 *)tbuf;
+      tpt += ix + iy * tdimx;
+      
+      /* are we on the border or not ? */
+      if ( (x > 0.0) && (ix < t1dimx) &&
+	   (y > 0.0) && (iy < t1dimy) ) {
+	dx = x - ix;
+	dy = y - iy;
+	dxdy = dx*dy;
+	/* we have
+	   v[5]=dxdy;         coefficient of tbuf(ix+1,iy+1)
+	   v[4]=dx-dxdy;      coefficient of tbuf(ix+1,iy  )
+	   v[1]=dy-dxdy;      coefficient of tbuf(ix  ,iy+1)
+	   v[0]=1-dx-dy+dxdy; coefficient of tbuf(ix  ,iy  )
+	*/
+	v = dy-dxdy;
+	res = 0;
+	res += (1-dx-v) * (*tpt);  /* tbuf(ix  ,iy  ) */
+	tpt ++;
+	res += (dx-dxdy) * (*tpt); /* tbuf(ix+1,iy  ) */
+	tpt += toffset;
+	res += v * (*tpt);       /* tbuf(ix,iy+1  ) */
+	tpt ++;
+	res += dxdy * (*tpt);      /* tbuf(ix+1,iy+1) */
+	res = res * g + b;
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+
+      /* here, we are sure we are on some border */
+      if ( (x < 0.0) || (ix == t1dimx) ) {
+	/* we just look at y */
+	if ( (y < 0.0) || (iy == t1dimy) ) {
+	  res = (double)(*tpt) * g + b;
+	  *rbuf = (r32)_CONVERTR_( res );
+	  continue;
+	}
+	dy = y - iy;
+	res  = (1-dy) * (*tpt); /* (1-dy)* tbuf(ix,iy) */
+	tpt += tdimx;
+	res += dy * (*tpt);     /* dy * tbuf(ix,iy+1) */
+	res = (double)(*tpt) * g + b;
+	*rbuf = (r32)_CONVERTR_( res );
+	continue;
+      }
+      dx = x - ix;
+      res  = (1-dx) * (*tpt); /* (1-dx)* tbuf(ix,iy) */
+      tpt ++;
+      res += dx * (*tpt);     /* dx * tbuf(ix+1,iy) */
+      res = res * g + b;
+            *rbuf = (r32)_CONVERTR_( res );
+    }
+  }
+}
+
+CGAL_INLINE_FUNCTION
+void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
+			      int *theDim,  /* dimensions of this buffer */
+			      void* resBuf, /* result buffer */
+			      int *resDim,  /* dimensions of this buffer */
+			      double* mat   /* transformation matrix */
+			      )
+{
+  int i, j, k, ix, iy;
+  double x, y;
+  int rdimx=resDim[0], rdimy=resDim[1], rdimz=resDim[2];
+  int tdimx=theDim[0], tdimy=theDim[1];
+  int t1dimx=tdimx-1, t1dimy=tdimy-1;
+  r32 *tbuf = (r32*)theBuf;
+  r32 *rbuf = (r32*)resBuf;
+
+  for ( k = 0; k < rdimz; k ++ ) {
+    if ( get_static_verbose_reech4x4() != 0 )
+      fprintf( stderr, "Processing slice %d\r", k );
+    /* tbuf represente le premier point du plan */
+    tbuf  = (r32*)theBuf;
+    tbuf += k*(tdimx * tdimy);
+    for ( j = 0; j < rdimy; j ++ )
+    for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
+      /* computation of the corresponding point coordinates in theBuf */
+      x = mat[0] * i +  mat[1] * j + mat[3];
+      ix = (int)(x+0.5);
+      if (( x < -0.5 ) || ( ix > t1dimx)) { *rbuf = 0; continue; }
+      y = mat[4] * i +  mat[5] * j + mat[7];
+      iy = (int)(y+0.5);
+      if (( y < -0.5 ) || ( iy > t1dimy)) { *rbuf = 0; continue; }
+      
+      *rbuf = tbuf[ ix + iy * tdimx ];
+    }
+  }
+}
+
+
+
+
+
+
+CGAL_INLINE_FUNCTION
+void Reech4x4_verbose ( )
+{
+  get_static_verbose_reech4x4() = 1;
+}
+
+CGAL_INLINE_FUNCTION
+void Reech4x4_noverbose ( )
+{
+  get_static_verbose_reech4x4() = 0;
+}
diff --git a/3rdparty/CGAL-4.6/src/CGAL_ImageIO/typedefs.h b/3rdparty/CGAL-4.8/src/CGAL_ImageIO/typedefs.h
similarity index 100%
rename from 3rdparty/CGAL-4.6/src/CGAL_ImageIO/typedefs.h
rename to 3rdparty/CGAL-4.8/src/CGAL_ImageIO/typedefs.h
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/CMakeLists.txt b/3rdparty/CGAL-4.8/src/CGAL_Qt5/CMakeLists.txt
new file mode 100644
index 0000000..546e1cf
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/CMakeLists.txt
@@ -0,0 +1,94 @@
+message("Configuring libCGAL_Qt5")
+
+if(POLICY CMP0043)
+  cmake_policy(SET CMP0043 OLD)
+endif()
+
+find_package(Qt5 QUIET COMPONENTS OpenGL Svg QUIET)
+find_package(OpenGL QUIET)
+
+set(CGAL_Qt5_MISSING_DEPS "")
+if(NOT Qt5OpenGL_FOUND)
+  set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
+endif()
+if(NOT Qt5Svg_FOUND)
+  set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
+endif()
+if(NOT Qt5_FOUND)
+  set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
+endif()
+if(NOT OPENGL_FOUND)
+  set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
+endif()
+
+if(CGAL_Qt5_MISSING_DEPS)
+  message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
+  return()
+endif()
+
+include_directories (BEFORE ../../include)
+
+message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" )
+if(COMMAND add_config_flag)
+  set( CGAL_HAS_QT5 TRUE )
+  add_config_flag( CGAL_HAS_QT5 )
+endif()
+
+get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION)
+message( STATUS "OpenGL include:      ${OPENGL_INCLUDE_DIR}" )
+message( STATUS "OpenGL libraries:    ${OPENGL_LIBRARIES}" )
+message( STATUS "OpenGL definitions:  ${OPENGL_DEFINITIONS}" )
+message( STATUS "Qt5Core include:     ${Qt5Core_INCLUDE_DIRS}" )
+message( STATUS "Qt5 libraries:       ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" )
+message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" )
+message( STATUS "moc executable:      ${QT_MOC_EXECUTABLE}" )
+message( STATUS "uic executable:      ${QT_UIC_EXECUTABLE}" )
+
+cache_set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
+cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES    ${QT_LIBRARIES}   ${OPENGL_LIBRARIES}   )
+cache_set(CGAL_Qt5_3RD_PARTY_DEFINITIONS  ${QT_DEFINITIONS} ${OPENGL_DEFINITIONS} )
+
+set(mocfiles "")
+set(RESOURCE_FILES "")
+
+foreach (package ${CGAL_CONFIGURED_PACKAGES} )
+  file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt5/*.qtmoc.cmake")
+  foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES})
+    # includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib)
+    include(${package_qtmoc_file}) 
+    #        message(STATUS QTMOC------------FILE: ${package_qtmoc_file})      
+  endforeach()
+endforeach()
+
+foreach(mocfile ${mocfiles})
+  list(APPEND additional_files ${mocfile})
+endforeach()
+foreach(resfile ${RESOURCE_FILES})
+  list(APPEND additional_files ${resfile})
+endforeach()
+
+#    message(STATUS "Additional input files: ${additional_files}")
+
+use_essential_libs()
+
+include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS} )
+
+link_directories    ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
+
+collect_cgal_library( CGAL_Qt5 "${additional_files}")
+
+qt5_use_modules(CGAL_Qt5 OpenGL Svg)
+
+add_dependencies( CGAL_Qt5 CGAL )
+
+# CGAL_Qt5 only depends on CGAL in DEBUG, but we still link it in
+# both build types.
+target_link_libraries( CGAL_Qt5 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt5_3RD_PARTY_LIBRARIES} )
+
+add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} )
+
+if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
+  add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE )
+endif()
+
+message("libCGAL_Qt5 is configured")
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/DemosMainWindow.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/DemosMainWindow.cpp
new file mode 100644
index 0000000..0e3c0f5
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/DemosMainWindow.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/DemosMainWindow.h>
+#include <CGAL/Qt/DemosMainWindow_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsView.qtmoc.cmake b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsView.qtmoc.cmake
new file mode 100644
index 0000000..86b463e
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsView.qtmoc.cmake
@@ -0,0 +1,9 @@
+# moc files that are compiled directly as cpp files
+qt5_wrap_cpp(mocfiles ../../include/CGAL/Qt/GraphicsViewNavigation.h
+                      ../../include/CGAL/Qt/DemosMainWindow.h
+                      ../../include/CGAL/Qt/GraphicsItem.h
+                      ../../include/CGAL/Qt/GraphicsViewInput.h)
+
+# qrc files (resources files, that contain icons, at least)
+qt5_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc)
+
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewNavigation.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewNavigation.cpp
new file mode 100644
index 0000000..66fd8c0
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewNavigation.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/GraphicsViewNavigation.h>
+#include <CGAL/Qt/GraphicsViewNavigation_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp
new file mode 100644
index 0000000..c08bdea
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/GraphicsViewPolylineInput.h>
+#include <CGAL/Qt/GraphicsViewPolylineInput_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/debug.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/debug.cpp
new file mode 100644
index 0000000..a75a5c2
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/debug.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/debug.h>
+#include <CGAL/Qt/debug_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/resources.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/resources.cpp
new file mode 100644
index 0000000..f38ef67
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/resources.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2011  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/resources.h>
+#include <CGAL/Qt/resources_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.8/src/CGAL_Qt5/utility.cpp b/3rdparty/CGAL-4.8/src/CGAL_Qt5/utility.cpp
new file mode 100644
index 0000000..756ef45
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CGAL_Qt5/utility.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2008  GeometryFactory Sarl (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org).
+// You can redistribute it and/or modify it under the terms of the GNU
+// General Public License as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the software.
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+// 
+//
+// Author(s)     : Andreas Fabri <Andreas.Fabri at geometryfactory.com>
+//                 Laurent Rineau <Laurent.Rineau at geometryfactory.com>
+
+#ifndef CGAL_HEADER_ONLY
+
+#include <CGAL/Qt/utility.h>
+#include <CGAL/Qt/utility_impl.h>
+
+#endif // CGAL_HEADER_ONLY
diff --git a/3rdparty/CGAL-4.6/src/CGAL_libs_verinfo.rc.in b/3rdparty/CGAL-4.8/src/CGAL_libs_verinfo.rc.in
similarity index 100%
rename from 3rdparty/CGAL-4.6/src/CGAL_libs_verinfo.rc.in
rename to 3rdparty/CGAL-4.8/src/CGAL_libs_verinfo.rc.in
diff --git a/3rdparty/CGAL-4.8/src/CMakeLists.txt b/3rdparty/CGAL-4.8/src/CMakeLists.txt
new file mode 100644
index 0000000..c819ce1
--- /dev/null
+++ b/3rdparty/CGAL-4.8/src/CMakeLists.txt
@@ -0,0 +1,195 @@
+function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
+  # IMPORTANT: First delete all_files.cpp
+  if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
+    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp)
+  endif()
+
+  # THEN collect *.cpp
+  foreach (package ${CGAL_CONFIGURED_PACKAGES} )
+    file(GLOB CGAL_LIBRARY_SOURCE_FILES_TMP ${package}/src/${LIBRARY_NAME}/*.cpp)
+    foreach(file ${CGAL_LIBRARY_SOURCE_FILES_TMP})
+      if(NOT ${file} MATCHES "/qrc_.*")
+        list(APPEND CGAL_LIBRARY_SOURCE_FILES ${file})
+      endif()
+    endforeach()
+  endforeach()
+
+  foreach(source ${CGAL_LIBRARY_SOURCE_FILES})
+    # It may happen that a file all_files.cpp had been created in-source by
+    # a previous in-source build. We certainly do not want to include that
+    # file in the new all_files.cpp because .cpp files would be included
+    # twice, and that breaks the one-definition rule (ODR).
+    if(NOT source MATCHES ".*/all_files.cpp")
+      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp "\#include \"${source}\"\n")
+    endif()
+  endforeach()
+
+  if(CGAL_BUILD_SHARED_LIBS)
+    set(CGAL_LIB_PREFIX "")
+  else()
+    set(CGAL_LIB_PREFIX "lib")
+  endif()
+
+  set(RELEASE_MANGLED_NAME        "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}" ) 
+  set(DEBUG_MANGLED_NAME          "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}" ) 
+
+  if(CGAL_BUILD_SHARED_LIBS AND WIN32)
+    configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/src/CGAL_libs_verinfo.rc.in ${LIBRARY_NAME}_verinfo.rc @ONLY)
+    set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_verinfo.rc)
+  else()
+    set(rc_file )
+  endif()
+
+  add_library (${LIBRARY_NAME}
+    ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp 
+    ${rc_file}
+    ${ADDITIONAL_FILES})
+  if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
+    set_target_properties(${LIBRARY_NAME} PROPERTIES 
+      VERSION "${CGAL_SOVERSION}" 
+      SOVERSION "${CGAL_SONAME_VERSION}")
+  endif()
+
+  if(CGAL_AUTO_LINK_ENABLED)
+    set_target_properties( ${LIBRARY_NAME} PROPERTIES 
+      OUTPUT_NAME_DEBUG          "${DEBUG_MANGLED_NAME}" 
+      OUTPUT_NAME_RELEASE        "${RELEASE_MANGLED_NAME}" 
+      OUTPUT_NAME_MINSIZEREL     "${RELEASE_MANGLED_NAME}" 
+      OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}" 
+      )
+    
+    if ( HAS_CFG_INTDIR )
+      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y \"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\" )
+      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y \"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\" )
+      add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD COMMAND if exist \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy /Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" \"$(SolutionDir)lib\" )
+    endif()
+  endif()
+
+  install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}Exports
+    RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}"
+    LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}"
+    ARCHIVE DESTINATION "${CGAL_INSTALL_LIB_DIR}")
+  install(EXPORT ${LIBRARY_NAME}Exports
+    DESTINATION "${CGAL_INSTALL_CMAKE_DIR}"
+    NAMESPACE CGAL::)
+
+  # We have to call configure_file twice to force double expansion of variables.
+  configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in"
+    "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY)
+  configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake"
+    "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY)
+  install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
+endfunction()
+
+function( configure_component DIR COMPONENT )
+  set(enabled_by_default ON)
+  option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ${enabled_by_default})
+  if ( WITH_${COMPONENT})
+    add_subdirectory( ${DIR} ${COMPONENT} )
+  endif()
+endfunction()
+
+# Output directory of libraries (.so, .dylib, non-static .lib)
+set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
+# Output directory of static libraries (.a, static .lib)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR})
+
+# For output directory of DLLs (.dll files)
+set(CGAL_RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CGAL_RUNTIME_DIR})
+
+## Prevent use of intermediate directory with MSVC, because we use name
+## mangling
+#foreach(Conf_type ${CMAKE_CONFIGURATION_TYPES})
+#  # Conf_type is Debug, Release, DebWithDebInfo...
+#  string(TOUPPER ${Conf_type} CONF_TYPE)
+#  # CONF_TYPE is DEBUG, RELEASE, DEBWITHDEBINFO
+#  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+#  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
+#  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+#endforeach()
+
+# TODO: Seems useless, because it is called again in ../CMakeLists.txt
+#       Should probably be removed. -- Laurent Rineau, 2014/07/22
+create_CGALconfig_files()
+
+set(CGAL_DIR ${CMAKE_BINARY_DIR})
+
+add_subdirectory(CGAL)
+
+# search libs
+set(CGAL_CONFIGURED_LIBRARIES "")
+ 
+foreach(package ${CGAL_CONFIGURED_PACKAGES}) 
+  file(GLOB CONFIGURED_LIBS_IN_PACKAGE ${package}/src/CGAL_*/CMakeLists.txt)
+  foreach (libconfigfile ${CONFIGURED_LIBS_IN_PACKAGE})
+    get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile} PATH)
+    get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME ${CGAL_CONFIGURED_LIBRARY_NAME} NAME)
+
+    if (NOT ${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL")
+
+     message(STATUS "Sources for CGAL component library '${CGAL_CONFIGURED_LIBRARY_NAME}' detected")
+      list(APPEND CGAL_CONFIGURED_LIBRARIES ${CGAL_CONFIGURED_LIBRARY_NAME})
+      #message(STATUS "Library config detected: ${CGAL_CONFIGURED_LIBRARIES}")
+
+      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY                  "" )
+      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS    "" )
+      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS   "" )
+      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES      "" )
+      cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" ) 
+      if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core") 
+        if (NOT CGAL_NO_CORE)
+          configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
+        else(NOT CGAL_NO_CORE)
+          message( STATUS "CGAL_Core is not being configured (missing GMP, or 64bit architecture).")
+        endif(NOT CGAL_NO_CORE)
+      else()
+        configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
+      endif()
+
+     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY)
+
+     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS   )
+     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS  )
+     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES     )
+     cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS) 
+
+    else() 
+ 
+      list(APPEND CGAL_CONFIGURED_LIBRARIES CGAL)
+
+    endif()
+  endforeach()
+endforeach()
+
+if (NOT CGAL_CONFIGURED_LIBRARIES) 
+   message(FATAL_ERROR "No component library in configured packages found. Please fix package-file.")
+endif()
+
+list(REMOVE_DUPLICATES CGAL_CONFIGURED_LIBRARIES)
+list(SORT CGAL_CONFIGURED_LIBRARIES)
+cache_set(CGAL_CONFIGURED_LIBRARIES "${CGAL_CONFIGURED_LIBRARIES}")
+
+# CGAL_CONFIGURED_LIBRARIES is a virtually useless variable, because
+# we do not know if those components actually created a target.  It
+# might seem bad that we hardcode the target names here, but they have
+# always been hardcoded in the CGALConfig files, so we do not make it
+# any worse. We can also not use export(EXPORT) since that is only
+# available in newer CMake versions.
+set(CGAL_ACTUAL_CONFIGURED_LIBRARIES "")
+macro(CGAL_add_if_target TARGET)
+  if(TARGET ${TARGET})
+    list(APPEND CGAL_ACTUAL_CONFIGURED_LIBRARIES ${TARGET})
+  endif()
+endmacro()
+
+CGAL_add_if_target(CGAL)
+CGAL_add_if_target(CGAL_Core)
+CGAL_add_if_target(CGAL_ImageIO)
+CGAL_add_if_target(CGAL_Qt5)
+
+export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
+
+message(STATUS "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected")
+
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index cc1d4f6..50c20ce 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -5,7 +5,7 @@ message(STATUS "Building CGAL")
 message(STATUS "Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
 message(STATUS "Binary dir: ${CMAKE_BINARY_DIR}")
 
-set(CGAL_INSTALL_DIR ${CMAKE_BINARY_DIR}/CGAL-4.6-installdir)
+set(CGAL_INSTALL_DIR ${CMAKE_BINARY_DIR}/CGAL-4.8-installdir)
 
 if ( CMAKE_BUILD_TYPE )
   set(CGAL_BUILD_TYPE ${CMAKE_BUILD_TYPE})
@@ -13,21 +13,24 @@ else()
   set(CGAL_BUILD_TYPE Debug)
 endif()
 
-# CGAL doesn't allow Developer as build type.
+# CGAL doesn't allow Developer, RelWithDebInfo and MinSizeRel as build type.
 if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Developer" )
   set(CGAL_BUILD_TYPE "Debug")
 endif()
+if ( "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel"
+     OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
+ set(CGAL_BUILD_TYPE "Release")
+endif()
 
 message(STATUS "CGAL build type: ${CGAL_BUILD_TYPE}")
 
 # Note: Need to add fPIC in order to be able to link staticly with CGAL
-ExternalProject_Add(CGAL-4.6
-  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CGAL-4.6
+ExternalProject_Add(CGAL-4.8
+  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CGAL-4.8
   INSTALL_DIR ${CGAL_INSTALL_DIR}
-  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CGAL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CGAL_BUILD_TYPE} -DCGAL_CXX_FLAGS=-fPIC -DWITH_CGAL_Core:BOOL=OFF -DWITH_CGAL_ImageIO:BOOL=OFF -DWITH_CGAL_Qt3:BOOL=OFF -DWITH_CGAL_Qt4:BOOL=OFF -DWITH_demos:BOOL=OFF -DWITH_examples:BOOL=OFF -DWITH_LEDA:BOOL=OFF -DWITH_GMP:BOOL=ON -DWITH_MPFR:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBOOST_ROOT=${BOOST_ROOT} -DGMP_INCLUDE_DIR=${GMP_INCLUDE_DIR} -DGMP_LIBRARIES=${GMP_LIBRARIES} -DMPFR_INCLUDE_DIR=${MPFR_INCLUD [...]
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CGAL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CGAL_BUILD_TYPE} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCGAL_CXX_FLAGS=-fPIC -DWITH_CGAL_Core:BOOL=OFF -DWITH_CGAL_ImageIO:BOOL=OFF -DWITH_CGAL_Qt5:BOOL=OFF -DWITH_demos:BOOL=OFF -DWITH_examples:BOOL=OFF -DWITH_LEDA:BOOL=OFF -DWITH_GMP:BOOL=ON -DWITH_MPFR:BOOL=ON -DWITH_Eigen3:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBOOST_ROOT=${BOOST_ROOT} -DGMP_INCLUDE_DIR=${GMP [...]
 
     # -DWITH_ESBTL:BOOL=OFF        \
-    # -DWITH_Eigen3:BOOL=OFF       \
     # -DWITH_GMPXX:BOOL=OFF        \
     # -DWITH_IPE:BOOL=OFF          \
     # -DWITH_LAPACK:BOOL=OFF       \
@@ -43,7 +46,7 @@ ExternalProject_Add(CGAL-4.6
     # -DWITH_ZLIB:BOOL=OFF         \
 
   UPDATE_COMMAND ""
-) 
+)
 
 set(CGAL_INCLUDE_DIR ${CGAL_INSTALL_DIR}/include PARENT_SCOPE)
 set(CGAL_LIB_DIR ${CGAL_INSTALL_DIR}/lib PARENT_SCOPE)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3755ad5..56c2a0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,11 @@
 project( MSHR )
 set(MSHR_VERSION_RELEASE 1)
-set(MSHR_VERSION_MAJOR "1")
-set(MSHR_VERSION_MINOR "6")
+set(MSHR_VERSION_MAJOR "2016")
+set(MSHR_VERSION_MINOR "1")
 set(MSHR_VERSION_MICRO "0")
 set(MSHR_VERSION "${MSHR_VERSION_MAJOR}.${MSHR_VERSION_MINOR}.${MSHR_VERSION_MICRO}")
 if (NOT MSHR_VERSION_RELEASE)
-  set(MSHR_VERSION "${MSHR_VERSION}dev")
+  set(MSHR_VERSION "${MSHR_VERSION}.dev0")
 endif()
 
 ########################## Initialize cmake ############################
@@ -25,7 +25,7 @@ if ( COMMAND cmake_policy )
 endif()
 
 # Borrow some cmake modules from cgal
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rdparty/CGAL-4.6/cmake/modules")
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rdparty/CGAL-4.8/cmake/modules")
 
 # Helper macro for testing if particular value is contained in list
 # Taken from http://www.cmake.org/Wiki/CMakeMacroListOperations#LIST_CONTAINS
@@ -51,7 +51,7 @@ endif()
 
 # Prevent FindBoost.cmake from looking for system Boost{foo}.cmake files
 set(Boost_NO_BOOST_CMAKE true)
-find_package( Boost REQUIRED system filesystem program_options )
+find_package( Boost REQUIRED system filesystem program_options thread )
 
 include_directories("${Boost_INCLUDE_DIRS}")
 
@@ -122,7 +122,7 @@ include_directories( BEFORE include )
 file( GLOB_RECURSE SOURCES src/*.cpp )
 
 add_library(mshr SHARED ${SOURCES})
-add_dependencies( mshr CGAL-4.6 )
+add_dependencies( mshr CGAL-4.8 )
 
 # Append the library version information to the library target properties
 option(MSHR_WITH_LIBRARY_VERSION "Build with library version information." ON)
@@ -166,18 +166,36 @@ endif()
 
 export(PACKAGE mshr)
 
-add_executable( mshrable app/mshrable.cpp )
-target_link_libraries( mshrable mshr
-                                ${DOLFIN_LIBRARIES}
-                                ${Boost_LIBRARIES}
-                     )
+target_link_libraries( mshr
+  ${DOLFIN_LIBRARIES}
+  ${Boost_LIBRARIES}
+  )
 
-# install library and app
-install(TARGETS mshr mshrable
+# install library
+install(TARGETS mshr
   RUNTIME DESTINATION ${INSTALL_BIN_DIR}
   LIBRARY DESTINATION ${INSTALL_LIB_DIR}
   ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
-)
+  )
+
+option(ENABLE_MSHRABLE "Enable building the command line client, mshrable" ON)
+if (ENABLE_MSHRABLE)
+  add_executable( mshrable app/mshrable.cpp )
+  target_link_libraries( mshrable
+    mshr
+    ${DOLFIN_LIBRARIES}
+    ${Boost_LIBRARIES}
+    )
+
+  # install app
+  install(TARGETS mshrable
+    RUNTIME DESTINATION ${INSTALL_BIN_DIR}
+    LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+    ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
+    )
+else()
+    message(STATUS "Disabling building command line client mshrable")
+endif()
 
 # install header files
 install(DIRECTORY include/ DESTINATION ${INSTALL_INCLUDE_DIR})
diff --git a/ChangeLog b/ChangeLog
index 30c42d2..28abecd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+2016.1.0 [2016-06-23]
+ - Major improvements, in particular boundary conditions
 1.6.0 [2015-07-28]
  - Upgrade to CGAL 4.6
  - Add more demos
diff --git a/app/mshrable.cpp b/app/mshrable.cpp
index beb757e..85d3144 100644
--- a/app/mshrable.cpp
+++ b/app/mshrable.cpp
@@ -57,7 +57,7 @@ void handle_commandline(int argc, char** argv, po::variables_map &vm)
     ("outfile,o",    po::value<std::string>(), "Filename of generated Dolfin mesh")
     ("resolution,r", po::value<double>()->default_value(15.0), "Resolution of result mesh")
     ("stats,s", "Write some statistics of the mesh to stdout")
-    ("polyout", po::value<std::string>(), "Write the polyhedron to .poly which Tetgen can read (and do not create a mesh)")
+    ("polyout", po::value<std::string>(), "Write the polyhedron to a .off file (and do not create a mesh)")
     ("polystats", "Write statistics of polyhedron (and do not create a mesh")
     ("backend,b", po::value<std::string>()->default_value("cgal"), "Use 3D mesh generation backend [tetgen|cgal]")
     ("degenerate_tolerance", po::value<double>()->default_value(1e-12), "Tolerance for considering a facet as degenerate. Set to 0 to not remove degenerate facets")
@@ -117,8 +117,8 @@ int main(int argc, char** argv)
   }
 
 
-  mshr::Surface3D surf(vm["input-file"].as<std::string>(),
-                       vm["degenerate_tolerance"].as<double>());
+  mshr::Surface3D surf(vm["input-file"].as<std::string>());
+  surf.degenerate_tolerance = vm["degenerate_tolerance"].as<double>();
 
   // Operations that disable mesh generation
   if (vm.count("polyout") || vm.count("polystats"))
@@ -129,21 +129,13 @@ int main(int argc, char** argv)
     {
       std::string extension = boost::filesystem::extension(vm["polyout"].as<std::string>());
 
-      if (extension == ".poly")
-      {
-        // Write the polyhedron to tetgen's file format
-        mshr::TetgenFileWriter::write(domain,
-                                      vm["polyout"].as<std::string>());
-      }
-      else if (extension == ".off")
-      {
-        domain.save_off(vm["polyout"].as<std::string>());
-      }
-      else
+      if (extension != ".off")
       {
         std::cerr << "Unknown file type: " << extension << std::endl;
         exit(1);
       }
+
+      domain.save_off(vm["polyout"].as<std::string>());
     }
 
     if (vm.count("polystats"))
@@ -153,26 +145,23 @@ int main(int argc, char** argv)
   }
 
   // Generate the mesh
-  dolfin::Mesh m;
-
-  mshr::generate(m,
-                 surf,
-                 vm["resolution"].as<double>(),
-                 vm["backend"].as<std::string>());
+  std::shared_ptr<dolfin::Mesh> m = mshr::generate_mesh(surf,
+                                                        vm["resolution"].as<double>(),
+                                                        vm["backend"].as<std::string>());
 
   // Output mesh if requested
   if (vm.count("outfile"))
   {
     dolfin::File f(vm["outfile"].as<std::string>());
-    f << m;
+    f << *m;
   }
     
   if (vm.count("stats"))
-    print_mesh_statistics(m);
+    print_mesh_statistics(*m);
 
   if (vm.count("check-mesh"))
   {
-    if (!mshr::DolfinMeshUtils::check_mesh(m))
+    if (!mshr::DolfinMeshUtils::check_mesh(*m))
     {
       std::cout << "  Error: Mesh check failed" << std::endl;
       return EXIT_FAILURE;
diff --git a/demo/python/csg-subdomains-2D.py b/demo/python/csg-subdomains-2D.py
index 52a23aa..cd65864 100644
--- a/demo/python/csg-subdomains-2D.py
+++ b/demo/python/csg-subdomains-2D.py
@@ -15,6 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import print_function
 import dolfin
 from mshr import *
 
@@ -33,7 +34,7 @@ dolfin.info(domain, True)
 
 # Generate and plot mesh
 mesh2d = generate_mesh(domain, 45)
-print mesh2d
+print(mesh2d)
 dolfin.plot(mesh2d, "2D mesh")
 
 # Convert subdomains to mesh function for plotting
diff --git a/demo/python/extrude.py b/demo/python/extrude.py
new file mode 100644
index 0000000..69134eb
--- /dev/null
+++ b/demo/python/extrude.py
@@ -0,0 +1,30 @@
+# Copyright (C) 2015 Benjamin Kehlet
+#
+# This file is part of mshr.
+#
+# mshr is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# mshr is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+
+# This demo illustrates how a 2D geometry can be extruded to 3D.
+
+from dolfin import *
+import mshr
+
+g2d = mshr.Circle(Point(0,0), 1.2) + mshr.Circle(Point(0, 1.2), 1.2)
+
+# Any simple 2D geometry can be extruded to 3D
+g3d = mshr.Extrude2D(g2d, 
+                     .2) # The z "thickness"
+
+m = mshr.generate_mesh(g3d, 15)
+plot(m, interactive=True)
diff --git a/demo/python/propeller.py b/demo/python/propeller.py
index adee7df..78ba652 100644
--- a/demo/python/propeller.py
+++ b/demo/python/propeller.py
@@ -15,6 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import print_function
 from mshr import *
 from dolfin import *
 
@@ -39,7 +40,7 @@ mesh_outside = generate_mesh(geometry_outside, resolution)
 
 # Rotate blades
 if extra_rotation:
-    print "Rotating blades..."
+    print("Rotating blades...")
     c = mesh_inside.coordinates()
     for i, (x, y, z) in enumerate(c):
 
@@ -70,8 +71,8 @@ if extra_rotation:
         c[i][2] = zz
 
 # Report size of meshes
-print "Mesh of propeller inside:  %d cells" % mesh_inside.num_cells()
-print "Mesh of propeller outside: %d cells" % mesh_outside.num_cells()
+print("Mesh of propeller inside:  %d cells" % mesh_inside.num_cells())
+print("Mesh of propeller outside: %d cells" % mesh_outside.num_cells())
 
 # Save meshes to file
 File("propeller_inside.xml.gz") << mesh_inside
diff --git a/demo/python/remove_degenerate.py b/demo/python/remove_degenerate.py
index 2aa5a5e..76b4d81 100644
--- a/demo/python/remove_degenerate.py
+++ b/demo/python/remove_degenerate.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
 import mshr
 import dolfin
 
@@ -10,7 +11,7 @@ geometry = cone + cyl;
 
 polyhedral_domain = mshr.CSGCGALDomain3D(geometry)
 
-print "Degenerate facets after boolean operation: {0}".format(polyhedral_domain.num_degenerate_facets(TOLERANCE))
+print("Degenerate facets after boolean operation: {0}".format(polyhedral_domain.num_degenerate_facets(TOLERANCE)))
 polyhedral_domain.remove_degenerate_facets(TOLERANCE)
 
 dolfin.info(polyhedral_domain, True)
diff --git a/demo/python/simple-csg-3D.py b/demo/python/simple-csg-3D.py
index 25326ac..1c1c75e 100644
--- a/demo/python/simple-csg-3D.py
+++ b/demo/python/simple-csg-3D.py
@@ -38,9 +38,9 @@ generator.parameters["edge_size"] = 0.025
 generator.parameters["facet_angle"] = 25.0
 generator.parameters["facet_size"] = 0.05
 
-m = dolfin.Mesh()
-generator.generate(domain, m)
+# Invoke the mesh generator
+mesh = generator.generate(CSGCGALDomain3D(domain))
 
-dolfin.plot(m, "3D mesh")
+dolfin.plot(mesh, "3D mesh")
 
 dolfin.interactive()
diff --git a/include/mshr.h b/include/mshr.h
index 5dc7087..e7b4441 100644
--- a/include/mshr.h
+++ b/include/mshr.h
@@ -8,5 +8,4 @@
 #include <mshr/CSGGeometries3D.h>
 #include <mshr/CSGGeometry.h>
 #include <mshr/CSGPrimitive.h>
-#include <mshr/TetgenFileWriter.h>
 #include <mshr/DolfinMeshUtils.h>
diff --git a/include/mshr/CSGCGALDomain2D.h b/include/mshr/CSGCGALDomain2D.h
index 6d63da6..54312cf 100644
--- a/include/mshr/CSGCGALDomain2D.h
+++ b/include/mshr/CSGCGALDomain2D.h
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -32,7 +32,7 @@ struct CSGCGALDomain2DImpl;
 /// @brief Polygonal meshing domain
 ///
 /// Represents the polygonal meshing domain to be sent to the mesh
-/// generator. It uses CGAL's Polygon_2 as backend and utilizied CGAL's 
+/// generator. It uses CGAL's Polygon_2 as backend and utilizied CGAL's
 /// 2D Regularized Boolean Set-Operations package.
 class CSGCGALDomain2D : public dolfin::Variable
 {
@@ -56,7 +56,8 @@ class CSGCGALDomain2D : public dolfin::Variable
   void join_inplace(const CSGCGALDomain2D& other);
 
   /// @brief Boolean intersection
-  void intersect_inplace(const CSGCGALDomain2D& other);
+  void intersect_inplace(const CSGCGALDomain2D& other,
+                         double truncate_tolerance=-1.);
 
   /// @brief Boolean difference
   void difference_inplace(const CSGCGALDomain2D& other);
@@ -65,32 +66,30 @@ class CSGCGALDomain2D : public dolfin::Variable
   bool point_in_domain(dolfin::Point p) const;
 
   /// @brief Compute the radius of the minimum bounding circle.
-  double compute_boundingcircle_radius() const ;
+  double compute_boundingcircle_radius() const;
+
+  std::size_t num_polygons() const;
+  double shortest_edge() const;
+
+  std::vector<dolfin::Point> get_outer_polygon(std::size_t i) const;
+
+  /// @brief get one point per hole, strictly inside the hole.
+  /// @param holes the returned points
+  void get_points_in_holes(std::vector<dolfin::Point>& holes) const;
 
   /// @brief Informal string representation
   /// @param verbose Verbosity level
   std::string str(bool verbose) const;
 
+  static
+    std::pair<std::vector<dolfin::Point>,
+              std::vector<std::pair<std::size_t, std::size_t>>>
+    compute_pslg(const std::vector<std::pair<std::size_t, CSGCGALDomain2D>>& domains);
+
  private:
   std::unique_ptr<CSGCGALDomain2DImpl> impl;
-  friend class PSLG;
 };
 
-// Forward declaration
-struct PSLGImpl;
-
-// TODO: Merge this class with CSGCGALDomain2D
-class PSLG
-{
- public:
-  PSLG(const std::vector<std::pair<std::size_t, CSGCGALDomain2D> > &domains, 
-       double pixel_size, 
-       double truncate_tolerance);
-  ~PSLG();
-
-  std::vector<dolfin::Point> vertices;
-  std::vector<std::pair<std::size_t, std::size_t> > edges;
-};
 }
 
 #endif
diff --git a/include/mshr/CSGCGALDomain3D.h b/include/mshr/CSGCGALDomain3D.h
index 64be05c..badbef3 100644
--- a/include/mshr/CSGCGALDomain3D.h
+++ b/include/mshr/CSGCGALDomain3D.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Benjamin Kehlet
+// Copyright (C) 2013-2015 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -6,19 +6,19 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
 #ifndef __MSHR_CSGCGAL_DOMAIN3D_H
 #define __MSHR_CSGCGAL_DOMAIN3D_H
 
-#include <mshr/CSGGeometry.h>
+#include <mshr/CSGPrimitives3D.h>
 #include <dolfin/geometry/Point.h>
 
 #include <memory>
@@ -45,7 +45,7 @@ class CSGCGALDomain3DQueryStructure
 /// This class represents a polyhedral meshing domain which implements boolean
 /// operations. It uses CGAL Polyhedron_3 as backend and utilizes CGAL
 //  Nef_polyhedron for boolean operations.
-class CSGCGALDomain3D : public dolfin::Variable
+class CSGCGALDomain3D : public CSGPrimitive3D
 {
  public:
   /// @brief Create empty polyhedron
@@ -54,9 +54,19 @@ class CSGCGALDomain3D : public dolfin::Variable
   /// @brief Construct polyhedron from CSG geometry
   CSGCGALDomain3D(const mshr::CSGGeometry &csg);
 
+  CSGCGALDomain3D(const std::vector<std::array<double, 3>>& vertices,
+                  const std::vector<std::array<std::size_t, 3>>& facets);
+
   /// @brief Destructor
   ~CSGCGALDomain3D();
 
+  Type getType() const
+  { return CSGGeometry::TriPolyhedron; }
+
+  /// @brief Insert polyhedron into this object
+  /// Inserted polyhedron should not intersect
+  void insert(const CSGCGALDomain3D& p);
+
   /// @brief Number of vertices in polyhedron
   std::size_t num_vertices() const;
 
@@ -78,8 +88,13 @@ class CSGCGALDomain3D : public dolfin::Variable
   /// @brief get length of shortest edge
   double shortest_edge() const;
 
+  /// @brief count edges with squared length shorter than tolerance
+  std::size_t num_short_edges(double tolerance) const;
+
   /// @brief Test if any facets intersects
-  bool is_selfintersecting() const;
+  bool is_selfintersecting(bool verbose=false) const;
+
+  std::size_t remove_selfintersections();
 
   /// @brief Save polyhedron to off file
   /// @param filename Filename to write to
@@ -88,10 +103,11 @@ class CSGCGALDomain3D : public dolfin::Variable
   // TODO: Define iterators to be more memory friendly
 
   /// @brief Output vertices in double precision
-  void get_vertices(std::vector<dolfin::Point> &v) const;
+  /// This outputs as a flattened array
+  std::unique_ptr<std::vector<double>> get_vertices() const;
 
   /// @brief Output facets as indices to the vertices array
-  void get_facets(std::vector<std::array<std::size_t, 3> > &f) const;
+  std::unique_ptr<std::vector<std::size_t>> get_facets() const;
 
   /// @brief get one point per hole, strictly inside the hole.
   /// @param holes the returned points
@@ -117,7 +133,7 @@ class CSGCGALDomain3D : public dolfin::Variable
   {
     dolfin::Parameters p("csg_cgal_domain_3d");
     p.add("remove_degenerate", true);
-    p.add("degenerate_tolerance", 1e-12);
+    p.add("degenerate_tolerance", 1e-10);
 
     return p;
   }
@@ -126,7 +142,59 @@ class CSGCGALDomain3D : public dolfin::Variable
   /// @param verbose The verbosity level
   std::string str(bool verbose) const;
 
- private :
+  /// @brief Remove facets, starting from the facets closest to to the given
+  /// point
+  void filter_facets(dolfin::Point start,
+                     double threshold,
+                     std::shared_ptr<CSGCGALDomain3DQueryStructure> q);
+
+  void inside_out();
+
+  /// A hole is a connected sequence of boundary edges
+  std::size_t num_holes() const;
+
+  ///  Disconnected components are parts of the polyhedron that can not be
+  ///  reached through adjacent entities.
+  std::size_t num_disconnected_components() const;
+
+  /// Keep only the n largest disconnected components. Returns the number of
+  /// components removed.
+  std::size_t keep_largest_components(std::size_t n);
+
+  /// get the axis aligned bounding box of the polyhedron, represented as min and
+  /// max points
+  std::pair<dolfin::Point, dolfin::Point> get_aabb() const;
+
+  /// @brief Close and triangulate all holes. Experimental.
+  void close_holes();
+
+  /// @brief Close and triangulate hole. Experimental.
+  void close_hole(std::size_t hole);
+
+  double sharpest_edge() const;
+  std::size_t num_sharp_edges(double tolerance) const;
+
+  void smooth_taubin(std::size_t iterations=3);
+  void smooth_laplacian(double c=1.0);
+
+  /// Do a simple center vertex refinement
+  /// Note: This decreases the triangle quality
+  void refine_center_vertex();
+
+  /// Refine by splitting all edges
+  void refine_edge_split();
+
+  // @brief Reconstruct surface from point set. Experimental
+  std::shared_ptr<CSGCGALDomain3D> reconstruct_surface() const;
+
+  /// @brief Return convex hull of vertices as CSGCGALDomain3D object. Experimental
+  std::shared_ptr<CSGCGALDomain3D> convex_hull() const;
+
+  static std::shared_ptr<CSGCGALDomain3D>
+    convex_hull(const std::vector<std::array<double, 3>>& point_set);
+
+  // FIXME: Make this private again
+  // private :
   std::unique_ptr<CSGCGALDomain3DImpl> impl;
 };
 
diff --git a/include/mshr/CSGCGALMeshGenerator2D.h b/include/mshr/CSGCGALMeshGenerator2D.h
index d42e0a8..4cd0c0f 100644
--- a/include/mshr/CSGCGALMeshGenerator2D.h
+++ b/include/mshr/CSGCGALMeshGenerator2D.h
@@ -47,7 +47,12 @@ namespace mshr
     /// @brief Generate mesh
     /// @param geometry The geometry to be meshed
     /// @param mesh The Dolfin mesh object to be returned. Will ble cleared.
-    void generate(const CSGGeometry& geometry, dolfin::Mesh& mesh);
+    /// @param partition (experimental) If true then generate mesh on process 0 and partition and distribute
+    ///   it. If false, then a full mesh is generated on all processes.(only
+    ///   relevant when running in parallel)
+    void generate(const CSGGeometry& geometry,
+                  dolfin::Mesh& mesh,
+                  bool partition=true);
 
     /// Default parameter values
     static dolfin::Parameters default_parameters()
@@ -60,9 +65,7 @@ namespace mshr
       p.add("pixel_size", 1e-16);
 
       // shorter edges in the domain will be collapsed before meshing
-      // if set to negative, the tolerance will be computed based on
-      // the requested cell size.
-      p.add("edge_truncate_tolerance", -1.0);
+      p.add("edge_truncate_tolerance", 1e-16);
 
       return p;
     }
diff --git a/include/mshr/CSGCGALMeshGenerator3D.h b/include/mshr/CSGCGALMeshGenerator3D.h
index 714b5e2..4eacd1d 100644
--- a/include/mshr/CSGCGALMeshGenerator3D.h
+++ b/include/mshr/CSGCGALMeshGenerator3D.h
@@ -48,18 +48,7 @@ namespace mshr
 
     /// @brief Generate Dolfin mesh
     /// @param domain The polyhedral domain to be meshed
-    /// @param mesh The mesh object to be filled. Will be cleared.
-    void generate(std::shared_ptr<const CSGCGALDomain3D> domain, dolfin::Mesh& mesh) const;
-
-    /// @brief Generate Dolfin mesh
-    /// @param geometry The csg geometry to be meshed
-    /// @param mesh The mesh object to be filled. Will be cleared.
-    void generate(std::shared_ptr<const CSGGeometry> geometry, dolfin::Mesh& mesh) const;
-
-    /// @brief Generate Dolfin mesh
-    /// @param geometry The csg geometry to be meshed
-    /// @param mesh The mesh object to be filled. Will be cleared.
-    void generate(const CSGGeometry& geometry, dolfin::Mesh& mesh) const;
+    std::shared_ptr<dolfin::Mesh> generate(std::shared_ptr<const CSGCGALDomain3D> domain) const;
 
     /// @brief Default parameter values
     static dolfin::Parameters default_parameters()
@@ -77,9 +66,12 @@ namespace mshr
       p.add("cell_radius_edge_ratio", 3.0);
       p.add("cell_size", 0.05);
       p.add("detect_sharp_features", true);
+      p.add("feature_threshold", 70.);
 
       return p;
     }
+  private:
+    void generate(std::shared_ptr<const CSGCGALDomain3D> domain, dolfin::Mesh& mesh) const;
   };
 
 }
diff --git a/include/mshr/CSGGeometry.h b/include/mshr/CSGGeometry.h
index 7ed2e16..ca497ff 100644
--- a/include/mshr/CSGGeometry.h
+++ b/include/mshr/CSGGeometry.h
@@ -66,7 +66,24 @@ namespace mshr
     /// @brief Return const list of subdomain geometries
     const std::list<std::pair<std::size_t, std::shared_ptr<const CSGGeometry> > >& get_subdomains() const { return subdomains; }
 
-    enum Type { Box, Sphere, Cylinder, Tetrahedron, Ellipsoid, Surface3D, Circle, Ellipse, Rectangle, Polygon, Union, Intersection, Difference, Translation, Scaling, Rotation };
+    enum Type { Box,
+                Sphere,
+                Cylinder,
+                Tetrahedron,
+                Ellipsoid,
+                Surface3D,
+                Extrude2D,
+                Circle,
+                Ellipse,
+                Rectangle,
+                Polygon,
+                Union,
+                Intersection,
+                Difference,
+                Translation,
+                Scaling,
+                Rotation,
+                TriPolyhedron };
 
     virtual Type getType() const = 0;
     virtual bool is_operator() const = 0;
diff --git a/include/mshr/CSGPrimitives3D.h b/include/mshr/CSGPrimitives3D.h
index eb676bb..66da580 100644
--- a/include/mshr/CSGPrimitives3D.h
+++ b/include/mshr/CSGPrimitives3D.h
@@ -20,9 +20,11 @@
 #ifndef __MSHR_PRIMITIVES_3D_H
 #define __MSHR_PRIMITIVES_3D_H
 
-#include <cstddef>
-#include <dolfin/geometry/Point.h>
 #include "CSGPrimitive.h"
+#include "CSGPrimitives2D.h"
+#include <dolfin/mesh/Mesh.h>
+#include <dolfin/geometry/Point.h>
+#include <cstddef>
 
 namespace mshr
 {
@@ -170,7 +172,13 @@ namespace mshr
   class Surface3D : public CSGPrimitive3D
   {
   public:
-    Surface3D(std::string filename, double degenerate_tolerance=1e-12);
+    Surface3D(std::string filename);
+
+    // Create triangulated polyhedron from surface of mesh
+    Surface3D(std::shared_ptr<const dolfin::Mesh> mesh);
+
+    // Create triangulate polyhedron on surface of subdomain of mesh
+    Surface3D(std::shared_ptr<const dolfin::Mesh> mesh, std::size_t cell_domain);
 
     /// @brief Informal string representation
     /// @return The description string
@@ -180,7 +188,33 @@ namespace mshr
     { return CSGGeometry::Surface3D; }
 
     const std::string _filename;
-    const double degenerate_tolerance;
+    std::shared_ptr<const dolfin::Mesh> mesh;
+
+    /// @brief Tolerance when merging close vertices
+    double vertex_tolerance;
+
+    /// @brief Tolerance when removing degenerate facets
+    double degenerate_tolerance;
+
+    /// @brief Attempt to repair if surface is not topologically valid
+    bool repair;
+    
+    // @brief Read only one connected_component. Only relevant if repair==true
+    bool single_connected_component;
+
+    int sharp_features_filter;
+    
+    /// @brief First facet, when reading only one connect component.
+    std::size_t first_facet;
+
+    /// @brief Flip all facets
+    bool flip_facets;
+
+    /// Dump read triangles and edges to off file (usefull for debugging)
+    std::string debug_dump;
+
+    std::size_t cell_domain;
+    bool use_cell_domain;
   };
 
   /// @brief An axis-aligned ellipsoid
@@ -207,6 +241,23 @@ namespace mshr
     const double a, b, c;
     const std::size_t _segments;
   };
+
+  /// @brief A 2D polygon extruded along the z axis to 3D
+  class Extrude2D : public CSGPrimitive3D
+  {
+   public :
+    Extrude2D(std::shared_ptr<CSGGeometry>, double z);
+
+    /// @brief Informal string representation
+    /// @return The description string
+    std::string str(bool verbose) const;
+
+    Type getType() const
+    { return CSGGeometry::Extrude2D; }
+
+    std::shared_ptr<CSGGeometry> geometry_2d;
+    const double z;
+  };
 }
 
 #endif
diff --git a/include/mshr/DolfinMeshUtils.h b/include/mshr/DolfinMeshUtils.h
index 4bbd076..2992cd1 100644
--- a/include/mshr/DolfinMeshUtils.h
+++ b/include/mshr/DolfinMeshUtils.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Benjamin Kehlet
+// Copyright (C) 2014-2016 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -19,7 +19,10 @@
 #ifndef __MSHR_DOLFIN_MESH_UTILS_H
 #define __MSHR_DOLFIN_MESH_UTILS_H
 
-#include <dolfin/mesh/Mesh.h>
+#include <utility>
+#include <memory>
+
+namespace dolfin { class Mesh; }
 
 namespace mshr
 {
@@ -38,6 +41,14 @@ class DolfinMeshUtils
   /// Run all implemented checks mesh consistency
   /// @param m The mesh
   static bool check_mesh(const dolfin::Mesh& m);
+
+  static std::shared_ptr<dolfin::Mesh>
+    extract_subdomain(std::shared_ptr<const dolfin::Mesh>,
+                      std::size_t cell_domain);
+
+  static std::shared_ptr<dolfin::Mesh>
+    merge_meshes(std::shared_ptr<dolfin::Mesh> m1,
+                 std::shared_ptr<dolfin::Mesh> m2);
 };
 
 }
diff --git a/include/mshr/MeshGenerator.h b/include/mshr/MeshGenerator.h
index d88d53c..c453ce6 100644
--- a/include/mshr/MeshGenerator.h
+++ b/include/mshr/MeshGenerator.h
@@ -26,17 +26,16 @@ namespace dolfin
 {
   // Forward declarations
   class Mesh;
-  class BoundaryMesh;
 }
 
 namespace mshr
 {
 
   /// Generate mesh from CSG geometry
-  void generate(dolfin::Mesh& mesh,
-                const CSGGeometry& geometry,
-                double resolution,
-                std::string backend="cgal");
+  std::shared_ptr<dolfin::Mesh>
+    generate_mesh(const CSGGeometry& geometry,
+                  double resolution,
+                  std::string backend="cgal");
 }
 
 #endif
diff --git a/include/mshr/OFFFileReader.h b/include/mshr/OFFFileReader.h
new file mode 100644
index 0000000..6b985b7
--- /dev/null
+++ b/include/mshr/OFFFileReader.h
@@ -0,0 +1,47 @@
+// Copyright (C) 2015 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef __OFF_FILE_READER_H
+#define __OFF_FILE_READER_H
+
+#include <string>
+#include <vector>
+#include <array>
+
+namespace mshr
+{
+
+class OFFFileReader
+{
+ public:
+  /// @brief Read and parse a triangular 3d surface off file
+  /// @param filename The file to read
+  /// @param vertices A vector of points to be read into
+  /// @param facets A vector of facets given as indices to the vertex array.
+  static void read(const std::string filename, 
+                   std::vector<std::array<double, 3> >& vertices,
+                   std::vector<std::array<std::size_t, 3> >& facets);
+
+  static void write(const std::string filename,
+                    const std::vector<std::array<double, 3> >& vertices,
+                    const std::vector<std::array<std::size_t, 3> >& facets);
+
+};
+
+}
+#endif
diff --git a/include/mshr/STLFileReader.h b/include/mshr/STLFileReader.h
index 870dd48..f605c42 100644
--- a/include/mshr/STLFileReader.h
+++ b/include/mshr/STLFileReader.h
@@ -38,7 +38,7 @@ public:
   /// @param facets array to return facets in as indices to the vertex array
   static void read(const std::string filename, 
                    std::vector<std::array<double, 3> >& vertices,
-                   std::vector<std::vector<std::size_t> >& facets);
+                   std::vector<std::array<std::size_t, 3> >& facets);
 };
 
 }
diff --git a/include/mshr/SurfaceConsistency.h b/include/mshr/SurfaceConsistency.h
index ed22a1c..f57c590 100644
--- a/include/mshr/SurfaceConsistency.h
+++ b/include/mshr/SurfaceConsistency.h
@@ -1,35 +1,58 @@
-// Copyright (C) 2014 Benjamin Kehlet
-//
-// This file is part of mshr.
-//
-// mshr is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// mshr is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
-
-// OBS! Experimental
-
-#ifndef _SURFACE_CONSISTENCY_H
-#define _SURFACE_CONSISTENCY_H
-
-#include <vector>
-#include <array>
-
-namespace mshr
-{
-
-class SurfaceConsistency
-{
- public:
-  static void checkConnectivity(const std::vector<std::vector<std::size_t> >& facets);
+ // Copyright (C) 2014 Benjamin Kehlet
+ //
+ // This file is part of mshr.
+ //
+ // mshr is free software: you can redistribute it and/or modify
+ // it under the terms of the GNU General Public License as published by
+ // the Free Software Foundation, either version 3 of the License, or
+ // (at your option) any later version.
+ //
+ // mshr is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ // GNU General Public License for more details.
+ //
+ // You should have received a copy of the GNU General Public License
+ // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+
+ // OBS! Experimental
+
+ #ifndef _SURFACE_CONSISTENCY_H
+ #define _SURFACE_CONSISTENCY_H
+
+ #include <vector>
+ #include <set>
+ #include <array>
+ #include <memory>
+
+ namespace mshr
+ {
+
+ class SurfaceConsistency
+ {
+  public:
+
+   /// Check that the connectivity of the facet is consistent, ie. all edges are
+   /// shared by exactly two facets.
+   /// If error is set to True, then an error will be thrown when a duplicated
+   /// halfedges is encountered. Otherwise, the index of one of the facets will
+   /// be stored in the set.
+   static void checkConnectivity(std::vector<std::array<std::size_t, 3> >& facets,
+                                 std::set<std::size_t>& duplicating,
+                                 bool error);
+
+   static void filterFacets(const std::vector<std::array<std::size_t, 3> >& facets,
+                            const std::vector<std::array<double, 3> >& vertices,
+                            std::size_t start, std::set<std::size_t>& skip);
+
+   static std::pair<std::unique_ptr<std::vector<std::array<double, 3> > >,
+                    std::unique_ptr<std::vector<std::array<std::size_t, 3> > > >
+     merge_close_vertices(const std::vector<std::array<std::size_t, 3> >& facets,
+                          const std::vector<std::array<double, 3> >& vertices,
+                          double tolerance);
+
+  static void orient_component(std::vector<std::array<std::size_t, 3> >& facets,
+                               std::size_t start);
 };
 
 }
diff --git a/include/mshr/SurfaceReconstruction.h b/include/mshr/SurfaceReconstruction.h
new file mode 100644
index 0000000..87d6ca4
--- /dev/null
+++ b/include/mshr/SurfaceReconstruction.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2015 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef __MSHR_SURFACERECONSTRUCTION_H
+#define __MSHR_SURFACERECONSTRUCTION_H
+
+#include <vector>
+#include <array>
+
+namespace mshr
+{
+  class SurfaceReconstruction
+  {
+   public:
+    static void reconstruct(const std::vector<double>& vertices,
+                            const std::vector<std::size_t>& facets,
+                            std::vector<std::array<double, 3>>& reconstructed_vertices,
+                            std::vector<std::array<std::size_t, 3>>& reconstruct_facets);
+  };
+
+}
+
+#endif
diff --git a/include/mshr/TetgenFileWriter.h b/include/mshr/TetgenFileWriter.h
deleted file mode 100644
index 48bb5ff..0000000
--- a/include/mshr/TetgenFileWriter.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2014 Benjamin Kehlet
-//
-// This file is part of mshr.
-//
-// mshr is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// mshr is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef __MSHR_TETGENOUTPUT_H_
-#define __MSHR_TETGENOUTPUT_H_
-
-#include <dolfin/geometry/Point.h>
-
-#include <string>
-#include <vector>
-#include <array>
-
-
-namespace mshr
-{
-
-// Forward declaration
-class CSGCGALDomain3D;
-
-
-/// This class can output a geometry in .poly format that Tetgen understands.
-class TetgenFileWriter
-{
- public:
-  static void write(const CSGCGALDomain3D &domain, std::string filename);
-  static void write(const std::vector<dolfin::Point> &vertices,
-                    const std::vector<std::array<std::size_t, 3> > &facets,
-                    std::string filename);
-};
-
-}
-
-#endif
-
diff --git a/include/mshr/TetgenMeshGenerator3D.h b/include/mshr/TetgenMeshGenerator3D.h
index 1423915..84bcda6 100644
--- a/include/mshr/TetgenMeshGenerator3D.h
+++ b/include/mshr/TetgenMeshGenerator3D.h
@@ -37,8 +37,7 @@ namespace mshr
     TetgenMeshGenerator3D();
     ~TetgenMeshGenerator3D();
 
-    void generate(std::shared_ptr<const CSGCGALDomain3D> domain, dolfin::Mesh& mesh) const;
-    void generate(const CSGGeometry& geometry, dolfin::Mesh& mesh) const;
+    std::shared_ptr<dolfin::Mesh> generate(std::shared_ptr<const CSGCGALDomain3D> domain) const;
 
     /// Default parameter values
     static dolfin::Parameters default_parameters()
diff --git a/include/mshr/VTPFileReader.h b/include/mshr/VTPFileReader.h
index 960e029..945e819 100644
--- a/include/mshr/VTPFileReader.h
+++ b/include/mshr/VTPFileReader.h
@@ -35,7 +35,7 @@ public:
   /// @param facets A vector of facets given as indices to the vertex array.
   static void read(const std::string filename, 
                    std::vector<std::array<double, 3> >& vertices,
-                   std::vector<std::vector<std::size_t> >& facets);
+                   std::vector<std::array<std::size_t, 3> >& facets);
 };
 
 }
diff --git a/src/CSGCGALDomain2D.cpp b/src/CSGCGALDomain2D.cpp
index fc55031..0032975 100644
--- a/src/CSGCGALDomain2D.cpp
+++ b/src/CSGCGALDomain2D.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Benjamin Kehlet
+// Copyright (C) 2013-2016 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -39,32 +39,172 @@
 #include <CGAL/Min_circle_2.h>
 #include <CGAL/Min_circle_2_traits_2.h>
 
-#include <CGAL/Snap_rounding_traits_2.h>
-#include <CGAL/Snap_rounding_2.h>
-
 // Polygon typedefs
 //typedef CGAL::Exact_predicates_exact_constructions_kernel Exact_Kernel;
-typedef CGAL::Quotient<CGAL::MP_Float>                    Quotient;
-typedef CGAL::Cartesian<Quotient>                         Exact_Kernel;
+typedef CGAL::Quotient<CGAL::MP_Float>                    FT;
+typedef CGAL::Cartesian<FT>                               Exact_Kernel;
 
 typedef Exact_Kernel::Point_2                             Point_2;
 typedef Exact_Kernel::Vector_2                            Vector_2;
 typedef Exact_Kernel::Segment_2                           Segment_2;
+typedef Exact_Kernel::Ray_2                               Ray_2;
+typedef Exact_Kernel::Direction_2                         Direction_2;
+typedef Exact_Kernel::Aff_transformation_2                Aff_transformation_2;
 typedef CGAL::Polygon_2<Exact_Kernel>                     Polygon_2;
 typedef Polygon_2::Vertex_const_iterator                  Vertex_const_iterator;
 typedef CGAL::Polygon_with_holes_2<Exact_Kernel>          Polygon_with_holes_2;
 typedef Polygon_with_holes_2::Hole_const_iterator         Hole_const_iterator;
 typedef CGAL::Polygon_set_2<Exact_Kernel>                 Polygon_set_2;
 
-typedef CGAL::Snap_rounding_traits_2<Exact_Kernel>        snap_rounding_traits;
-typedef std::list<Point_2>                                Polyline_2;
-typedef std::list<Polyline_2>                             Polyline_list_2;
-
 // Min enclosing circle typedefs
 typedef CGAL::Min_circle_2_traits_2<Exact_Kernel>  Min_Circle_Traits;
 typedef CGAL::Min_circle_2<Min_Circle_Traits>      Min_circle;
 typedef CGAL::Circle_2<Exact_Kernel> CGAL_Circle;
 
+
+namespace
+{
+FT get_shortest_edge(const Polygon_set_2& polygon_set)
+{
+  FT shortest_edge = std::numeric_limits<double>::max();
+
+  std::list<Polygon_with_holes_2> polygon_list;
+  polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
+
+  // FIXME: For now it looks only at the outer boundary.
+  // Should take holes into account as well
+  for (const Polygon_with_holes_2& p : polygon_list)
+  {
+    const Polygon_2& bdr = p.outer_boundary();
+    Point_2 prev = bdr.container().back();
+    for (Polygon_2::Vertex_const_iterator vit = bdr.vertices_begin();
+         vit != bdr.vertices_end(); vit++)
+    {
+      shortest_edge = std::min(shortest_edge, (*vit-prev).squared_length());
+      prev = *vit;
+    }
+  }
+  return shortest_edge;
+}
+//-----------------------------------------------------------------------------
+Point_2 point_in_polygon(const Polygon_2& p)
+{
+  // Take the midpoint, s,  of a segment, then do a ray shooting in the inwards
+  // normal direction and return the midpoint between s and the closest ray hit.
+
+  Polygon_2::Edge_const_iterator eit = p.edges_begin();
+  const Point_2 source = CGAL::midpoint(eit->source(), eit->target());
+  const Aff_transformation_2 tr = Aff_transformation_2(CGAL::ROTATION,
+                                                       p.orientation() == CGAL::COUNTERCLOCKWISE ? 1 : -1, 0);
+
+  const Ray_2 r(source, tr(Direction_2(*eit)));
+  Point_2 closest;
+  FT min_squared_distance = std::numeric_limits<double>::max();
+
+  eit++;
+  for (; eit != p.edges_end(); eit++)
+  {
+    auto ii = CGAL::intersection(r, *eit);
+    if (ii)
+    {
+      if (const Point_2* p = boost::get<Point_2>(&*ii))
+      {
+        const FT squared_distance = CGAL::squared_distance(source, *p);
+        if (squared_distance < min_squared_distance)
+        {
+          closest = *p;
+          min_squared_distance = squared_distance;
+        }
+      }
+      else if (const Segment_2* s = boost::get<Segment_2>(&*ii))
+      {
+        // If the intersection is a segment, an edge in the polygon is paralell
+        // to the ray. Simply check both the source and the target point of the
+        // segment.
+
+        {
+          const FT squared_distance = CGAL::squared_distance(source, s->source());
+          if (squared_distance < min_squared_distance)
+          {
+            closest = *p;
+            min_squared_distance = squared_distance;
+          }
+        }
+
+        {
+          const FT squared_distance = CGAL::squared_distance(source, s->target());
+          if (squared_distance < min_squared_distance)
+          {
+            closest = *p;
+            min_squared_distance = squared_distance;
+          }
+        }
+      } // end intersection is Segment_2
+    }
+  }
+  return CGAL::midpoint(source, closest);
+}
+//-----------------------------------------------------------------------------
+void truncate_short_edges(Polygon_set_2& polygon_set,
+                          FT tolerance,
+                          const std::set<Point_2> collapsable_vertices = std::set<Point_2>())
+{
+  const FT tolerance_squared = tolerance*tolerance;
+
+  Polygon_set_2 truncated_set;
+  std::list<Polygon_with_holes_2> polygon_list;
+  polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
+
+  // FIXME: For now it looks only at the outer boundary.
+  // Should take holes into account as well
+  for (const Polygon_with_holes_2& p : polygon_list)
+  {
+    Polygon_2 bdr = p.outer_boundary();
+
+    bool changed = true;
+    while(changed)
+    {
+      changed = false;
+
+      Polygon_2::Vertex_iterator prev = bdr.vertices_end()-1;
+
+      for (Polygon_2::Vertex_iterator vit = bdr.vertices_begin();
+           vit != bdr.vertices_end(); vit++)
+      {
+        if ( (*vit-*prev).squared_length() < tolerance_squared)
+        {
+          if (collapsable_vertices.size() == 0 || collapsable_vertices.find(*vit) != collapsable_vertices.end())
+          {
+            bdr.erase(vit);
+            changed = true;
+            break;
+          }
+          else if (collapsable_vertices.size() == 0 || collapsable_vertices.find(*prev) != collapsable_vertices.end())
+          {
+            bdr.erase(prev);
+            changed = true;
+            break;
+          }
+          else
+          {
+            // std::cout << "Couldn't erase vertex" << std::endl;
+          }
+        } // end if short edge
+        prev = vit;
+      } // end vertex iteration
+    } // end while(changed)
+
+    Polygon_with_holes_2 pwh(bdr);
+    for (Hole_const_iterator hit = p.holes_begin(); hit != p.holes_end(); ++hit)
+    {
+      pwh.add_hole(*hit);
+    }
+    truncated_set.insert(pwh);
+  }
+  polygon_set = truncated_set;
+}
+} // end anonymous namespace
+//-----------------------------------------------------------------------------
 namespace mshr
 {
 
@@ -123,7 +263,7 @@ Polygon_2 make_rectangle(const Rectangle* r)
   pts.push_back(Point_2(x0, y1));
 
   Polygon_2 p(pts.begin(), pts.end());
-  
+
   return p;
 }
 //-----------------------------------------------------------------------------
@@ -167,7 +307,7 @@ std::unique_ptr<CSGCGALDomain2DImpl> do_transformation(const Polygon_set_2& p, E
 CSGCGALDomain2D::CSGCGALDomain2D()
   : impl(new CSGCGALDomain2DImpl)
 {
-  
+
 }
 //-----------------------------------------------------------------------------
 CSGCGALDomain2D::~CSGCGALDomain2D()
@@ -184,7 +324,7 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGGeometry *geometry)
                          "Geometry has dimension %d, expected 2", geometry->dim());
 
 
-  switch (geometry->getType()) 
+  switch (geometry->getType())
   {
     case CSGGeometry::Union:
     {
@@ -195,7 +335,7 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGGeometry *geometry)
       CSGCGALDomain2D b(u->_g1.get());
 
       impl.swap(a.impl);
-      impl->polygon_set.join(b.impl->polygon_set);    
+      impl->polygon_set.join(b.impl->polygon_set);
       break;
     }
     case CSGGeometry::Intersection:
@@ -205,7 +345,7 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGGeometry *geometry)
 
       CSGCGALDomain2D a(u->_g0.get());
       CSGCGALDomain2D b(u->_g1.get());
-      
+
       impl.swap(a.impl);
       impl->polygon_set.intersection(b.impl->polygon_set);
       break;
@@ -216,7 +356,7 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGGeometry *geometry)
       dolfin_assert(u);
       CSGCGALDomain2D a(u->_g0.get());
       CSGCGALDomain2D b(u->_g1.get());
-      
+
       impl.swap(a.impl);
       impl->polygon_set.difference(b.impl->polygon_set);
       break;
@@ -312,6 +452,12 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGGeometry *geometry)
                            "converting geometry to cgal polyhedron",
                            "Unhandled primitive type");
   }
+
+  // Truncate short edges
+  // std::cout << "Creating domain, shortest edge: " << CGAL::to_double(get_shortest_edge(impl->polygon_set)) << std::endl;
+
+  truncate_short_edges(impl->polygon_set, 1e-15);
+  // std::cout << "Truncated, shortest edge: " << CGAL::to_double(get_shortest_edge(impl->polygon_set)) << std::endl;
 }
 //-----------------------------------------------------------------------------
 CSGCGALDomain2D::CSGCGALDomain2D(const CSGCGALDomain2D &other)
@@ -322,7 +468,7 @@ CSGCGALDomain2D::CSGCGALDomain2D(const CSGCGALDomain2D &other)
 CSGCGALDomain2D &CSGCGALDomain2D::operator=(const CSGCGALDomain2D &other)
 {
   std::unique_ptr<CSGCGALDomain2DImpl> tmp(new CSGCGALDomain2DImpl(other.impl->polygon_set));
-  
+
   impl.swap(tmp);
 
   return *this;
@@ -337,7 +483,7 @@ double CSGCGALDomain2D::compute_boundingcircle_radius() const
 
   for (std::list<Polygon_with_holes_2>::const_iterator pit = polygon_list.begin();
        pit != polygon_list.end(); ++pit)
-    for (Polygon_2::Vertex_const_iterator vit = pit->outer_boundary().vertices_begin(); 
+    for (Polygon_2::Vertex_const_iterator vit = pit->outer_boundary().vertices_begin();
          vit != pit->outer_boundary().vertices_end(); ++vit)
       points.push_back(*vit);
 
@@ -348,6 +494,29 @@ double CSGCGALDomain2D::compute_boundingcircle_radius() const
   return sqrt(CGAL::to_double(min_circle.circle().squared_radius()));
 }
 //-----------------------------------------------------------------------------
+std::size_t CSGCGALDomain2D::num_polygons() const
+{
+  return impl->polygon_set.number_of_polygons_with_holes();
+}
+//-----------------------------------------------------------------------------
+std::vector<dolfin::Point> CSGCGALDomain2D::get_outer_polygon(std::size_t i) const
+{
+  std::vector<Polygon_with_holes_2> polygon_list;
+  impl->polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
+
+  const Polygon_2& polygon = polygon_list[i].outer_boundary();
+
+  std::vector<dolfin::Point> res;
+  res.reserve(polygon.size());
+  for (std::size_t j = 0; j < polygon.size(); j++)
+  {
+    const Point_2& p = polygon.vertex(j);
+    res.push_back(dolfin::Point(CGAL::to_double(p.x()), CGAL::to_double(p.y())));
+  }
+
+  return res;
+}
+//-----------------------------------------------------------------------------
 void CSGCGALDomain2D::join_inplace(const CSGCGALDomain2D& other)
 {
   impl->polygon_set.join(other.impl->polygon_set);
@@ -358,9 +527,46 @@ void CSGCGALDomain2D::difference_inplace(const CSGCGALDomain2D& other)
   impl->polygon_set.difference(other.impl->polygon_set);
 }
 //-----------------------------------------------------------------------------
-void CSGCGALDomain2D::intersect_inplace(const CSGCGALDomain2D &other)
+void CSGCGALDomain2D::intersect_inplace(const CSGCGALDomain2D &other,
+                                        double truncate_tolerance)
 {
-  impl->polygon_set.intersection(other.impl->polygon_set);
+  if (truncate_tolerance > 0)
+  {
+    // store
+    std::set<Point_2> original_vertices;
+    {
+      std::list<Polygon_with_holes_2> polygon_list;
+      impl->polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
+
+      // FIXME: For now it looks only at the outer boundary.
+      // Should take holes into account as well
+      for (const Polygon_with_holes_2& p : polygon_list)
+      {
+        const Polygon_2& bdr = p.outer_boundary();
+        for (Polygon_2::Vertex_const_iterator vit = bdr.vertices_begin();
+             vit != bdr.vertices_end(); vit++)
+        {
+          original_vertices.insert(*vit);
+        }
+
+      }
+    }
+    // Do the actual intersection
+    impl->polygon_set.intersection(other.impl->polygon_set);
+
+    const FT shortest_edge = get_shortest_edge(impl->polygon_set);
+    const FT tolerance_squared = truncate_tolerance*truncate_tolerance;
+    if (shortest_edge < tolerance_squared)
+    {
+      truncate_short_edges(impl->polygon_set,
+                           truncate_tolerance,
+                           original_vertices);
+    } // end
+  }
+  else
+  {
+    impl->polygon_set.intersection(other.impl->polygon_set);
+  }
 }
 //-----------------------------------------------------------------------------
 bool CSGCGALDomain2D::point_in_domain(dolfin::Point p) const
@@ -372,254 +578,260 @@ bool CSGCGALDomain2D::point_in_domain(dolfin::Point p) const
 std::string CSGCGALDomain2D::str(bool verbose) const
 {
   std::stringstream ss;
-  ss << "<Polygonal domain with" << std::endl;
+  const std::size_t num_polygons = impl->polygon_set.number_of_polygons_with_holes();
+  ss << "<Polygonal domain with " << num_polygons
+     << " outer polygon" << (num_polygons != 1 ? "s" : "") << std::endl;
 
+  if (verbose)
   {
     std::list<Polygon_with_holes_2> polygon_list;
     impl->polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
-    ss << "  " << polygon_list.size() << " polygons" << std::endl;
+    for (const Polygon_with_holes_2& p : polygon_list)
+    {
+      ss << "  Polygon ";
+      const Polygon_2& bdr = p.outer_boundary();
+      // ss << "[" << bdr.size() << "] Vertices: ";
+
+      for (Polygon_2::Vertex_const_iterator vit = bdr.vertices_begin();
+           vit != bdr.vertices_end(); vit++)
+      {
+        ss << CGAL::to_double(vit->x()) << " " << CGAL::to_double(vit->y()) << ", ";
+      }
+      ss << std::endl;
+
+      Point_2 prev = bdr.container().back();
+      ss << "Edge lengths:";
+      for (Polygon_2::Vertex_const_iterator vit = bdr.vertices_begin();
+           vit != bdr.vertices_end(); vit++)
+      {
+        ss << " "  << sqrt(CGAL::to_double((*vit-prev).squared_length()));
+        prev = *vit;
+      }
+      ss << std::endl;
+
+
+
+      ss << "[" << p.number_of_holes() << " holes]" << std::endl;
+    }
   }
 
-  // std::list<std::vector<dolfin::Point> > vertices;
-  // get_vertices(vertices, 0);
-
-  // if (verbose)
-  // {
-  //   for (std::list<std::vector<dolfin::Point> >::const_iterator lit = vertices.begin();
-  //        lit != vertices.end(); lit++)
-  //   {
-  //     ss << "  Polygon" << std::endl;
-  //     for (std::vector<dolfin::Point>::const_iterator vit = lit->begin();
-  //          vit != lit->end(); vit++)
-  //     {
-  //       ss << "    " << vit->str(false) << std::endl;
-  //     }
-  //   }
-  // }
+  ss << ">";
   return ss.str();
 }
 //-----------------------------------------------------------------------------
-struct PSLGImpl
-{
- public:
-  std::vector<Point_2> vertices;
-  std::vector<std::pair<std::size_t, std::size_t> > edges;
-};
+typedef std::map<Point_2, std::size_t>::iterator VertexMapIterator;
+typedef std::set<std::pair<std::size_t, std::size_t>>::iterator SegmentIterator;
 //-----------------------------------------------------------------------------
-static inline void add_simple_polygon(std::vector<Segment_2>& segments, 
-                                      const Polygon_2& p, 
-                                      const Quotient & truncate_tolerance_squared)
+VertexMapIterator pslg_split_edge(SegmentIterator si,
+                                  Point_2 p,
+                                  std::map<Point_2, std::size_t>& vertex_map,
+                                  std::vector<Point_2>& vertices,
+                                  std::set<std::pair<std::size_t, std::size_t>>& segments)
 {
-  Polygon_2::Vertex_const_iterator first = p.vertices_begin(); 
-  Polygon_2::Vertex_const_iterator prev = first;
-  Polygon_2::Vertex_const_iterator current = prev;
-  current++;
-
-  while (current != p.vertices_end())
-  {
-    Segment_2 s(*prev, *current);
-
-    // Don't add segment if shorter than tolerance
-    if (s.squared_length() < truncate_tolerance_squared)
-    {
-      current++;
-      continue;
-    }
-
-    segments.push_back(s);
-    prev = current;
-    current++;
-
-  }
-  segments.push_back(Segment_2(*prev, *first));
+  dolfin_assert(CGAL::do_intersect(Segment_2(vertices[si->first], vertices[si->second]), p));
+  dolfin_assert(p != vertices[si->first]);
+  dolfin_assert(p != vertices[si->second]);
+
+  vertices.push_back(p);
+  const std::size_t new_vertex_index = vertex_map.size();
+  std::pair<VertexMapIterator, bool> result =
+    vertex_map.insert(std::make_pair(p, new_vertex_index));
+  dolfin_assert(result.second);
+
+  const std::size_t source_vertex_index = si->first;
+  const std::size_t target_vertex_index = si->second;
+
+  segments.erase(si);
+  segments.insert(std::make_pair(new_vertex_index, target_vertex_index));
+  segments.insert(std::make_pair(source_vertex_index, new_vertex_index));
+  return result.first;
 }
 //-----------------------------------------------------------------------------
-static inline std::size_t get_vertex_index(std::map<Point_2, std::size_t>& m,
-                                           std::vector<dolfin::Point>& v,
-                                           Point_2 p)
+
+// Check if point intersects any edge in the interior
+static inline SegmentIterator
+pslg_segment_intersection(Point_2 p,
+                          const std::vector<Point_2>& vertices,
+                          const std::set<std::pair<std::size_t, std::size_t>>& segments)
 {
-  std::size_t i;
-  std::map<Point_2, std::size_t>::const_iterator it = m.find(p);
-  if (it == m.end())
-  {
-    v.push_back(dolfin::Point(CGAL::to_double(p.x()), CGAL::to_double(p.y())));
-    m[p] = v.size()-1;
-    i = v.size()-1;
-  }
-  else
+  for (SegmentIterator it = segments.begin(); it != segments.end(); it++)
   {
-    i = it->second;
+    const Segment_2 current(vertices[it->first], vertices[it->second]);
+    if (CGAL::do_intersect(p, current))
+      return it;
   }
-
-  return i;
+  return segments.end();
 }
+
 //-----------------------------------------------------------------------------
-PSLG::PSLG(const std::vector<std::pair<std::size_t, CSGCGALDomain2D> >& domains, 
-           double pixel_size, 
-           double edge_truncate_tolerance)
+static inline void pslg_add_simple_polygon(std::map<Point_2, std::size_t>& vertex_map,
+                                           std::vector<Point_2>& vertices,
+                                           std::set<std::pair<std::size_t, std::size_t>>& segments,
+                                           const Polygon_2& p)
 {
-  const Quotient truncate_tolerance(edge_truncate_tolerance);
-  const Quotient truncate_tolerance_squared(truncate_tolerance*truncate_tolerance);
+  // Note that this function assumes that all edges are sufficiently long. Short
+  // edges should be filtered out when preparing the domain (and subdomain)
+  // polygon_set_2s.
 
+  Point_2 prev = p.vertex(p.size()-1);
 
-  if (domains.size() > 1 && pixel_size > 0)
+  for (std::size_t i = 0; i < p.size(); i++)
   {
-    // Collect all segments from all domains to send to snap rounding
-    std::vector<Segment_2> segments;
+    const Point_2 current = p.vertex(i);
+    const Segment_2 s(prev, current);
 
-    for (auto it = domains.begin(); it != domains.end(); it++)
+    VertexMapIterator sit = vertex_map.find(s.source());
+    if (sit == vertex_map.end())
     {
-      const Polygon_set_2& p = it->second.impl->polygon_set;
-
-      std::list<Polygon_with_holes_2> polygon_list;
-      p.polygons_with_holes(std::back_inserter(polygon_list));
-
-      for (std::list<Polygon_with_holes_2>::const_iterator pit = polygon_list.begin();
-           pit != polygon_list.end(); ++pit)
+      // Did not find vertex
+      SegmentIterator si = pslg_segment_intersection(s.source(), vertices, segments);
+      if (si != segments.end())
       {
-        add_simple_polygon(segments, pit->outer_boundary(), truncate_tolerance_squared);
-
-        // Add holes
-        Hole_const_iterator hit;
-        for (hit = pit->holes_begin(); hit != pit->holes_end(); ++hit)
-        {
-          add_simple_polygon(segments, *hit, truncate_tolerance_squared);
-        }
+        sit = pslg_split_edge(si,
+                              s.source(),
+                              vertex_map,
+                              vertices,
+                              segments);
+      }
+      else
+      {
+        std::pair<VertexMapIterator, bool> i = vertex_map.insert(std::make_pair(s.source(), vertex_map.size()));
+        vertices.push_back(s.source());
+        dolfin_assert(i.second);
+        sit = i.first;
       }
     }
 
-    log(dolfin::TRACE, "Snap rounding PSLG");
-    Polyline_list_2 snapped_polylines;
-
-    CGAL::snap_rounding_2<snap_rounding_traits,
-                          std::vector<Segment_2>::const_iterator,
-                          Polyline_list_2>
-      (segments.begin(), segments.end(),  // input
-       snapped_polylines,                 // output
-       pixel_size,                        // pixel size
-       false,                             // do iterated snap rounding
-       false,                             // output as integers
-       1);                                // number of kd-trees
-
-    std::map<Point_2, std::size_t> point_to_index;
-
-    for (Polyline_list_2::const_iterator iter1 = snapped_polylines.begin();
-         iter1 != snapped_polylines.end(); ++iter1)
+    VertexMapIterator tit = vertex_map.find(s.target());
+    if (tit == vertex_map.end())
     {
-      Polyline_2::const_iterator iter2 = iter1->begin();
-      const std::size_t first = get_vertex_index(point_to_index,
-                                                 vertices,
-                                                 *iter2);
-      std::size_t prev = first;
-      iter2++;
-
-      while(iter2 != iter1->end())
+      SegmentIterator si = pslg_segment_intersection(s.target(), vertices, segments);
+      if (si != segments.end())
       {
-        std::size_t current = get_vertex_index(point_to_index,
-                                               vertices,
-                                               *iter2);
-
-        edges.push_back(std::make_pair(prev, current));
-        prev = current;
-        ++iter2;
+        tit = pslg_split_edge(si,
+                              s.target(),
+                              vertex_map,
+                              vertices,
+                              segments);
+      }
+      else
+      {
+        std::pair<VertexMapIterator, bool> i = vertex_map.insert(std::make_pair(s.target(), vertex_map.size()));
+        vertices.push_back(s.target());
+        dolfin_assert(i.second);
+        tit = i.first;
       }
     }
-  }
-  else
-  {
-    log(dolfin::TRACE, "Skipping snap rounding");
 
-    // There is only one domain, so the segment list is just a set of disjoint
-    // simple polygons possibly with holes
+    if (segments.count(std::make_pair(tit->second, sit->second)) == 0)
+      segments.insert(std::make_pair(sit->second, tit->second));
+
+    prev = current;
+  }
+}
+//-----------------------------------------------------------------------------
+std::pair<std::vector<dolfin::Point>, std::vector<std::pair<std::size_t, std::size_t>>>
+  CSGCGALDomain2D::compute_pslg(const std::vector<std::pair<std::size_t, CSGCGALDomain2D>>& domains)
+{
+  std::vector<Point_2> vertices;
+  std::map<Point_2, std::size_t> vertex_map;
+  std::set<std::pair<std::size_t, std::size_t>> segments;
+  // std::vector<Segment_2> inserted_segments;
 
-    const Polygon_set_2& p = domains.front().second.impl->polygon_set;
+  for (const std::pair<std::size_t, CSGCGALDomain2D>& domain : domains)
+  {
+    const Polygon_set_2& p = domain.second.impl->polygon_set;
 
     std::list<Polygon_with_holes_2> polygon_list;
     p.polygons_with_holes(std::back_inserter(polygon_list));
 
-    for (std::list<Polygon_with_holes_2>::const_iterator pit = polygon_list.begin();
-         pit != polygon_list.end(); ++pit)
+    for (const Polygon_with_holes_2& pwh : polygon_list)
     {
-      {
-        // Add the outer boundary
-        const Polygon_2& p = pit->outer_boundary();
-        Polygon_2::Vertex_const_iterator current = p.vertices_begin();
-        Polygon_2::Vertex_const_iterator prev = current;
-
-        const std::size_t vertex_index_start = vertices.size();
-        vertices.push_back(dolfin::Point(CGAL::to_double(current->x()),
-                                         CGAL::to_double(current->y())));
-
-        std::size_t vertex_index = vertex_index_start;
-
-        current++;
-
-        while (current != p.vertices_end())
-        {
-          Segment_2 s(*prev, *current);
-
-          // Don't add segment if shorter than tolerance
-          if (s.squared_length() < truncate_tolerance_squared)
-          {
-            current++;
-            continue;
-          }
-
-          vertices.push_back(dolfin::Point(CGAL::to_double(current->x()),
-                                           CGAL::to_double(current->y())));
-
-          edges.push_back(std::make_pair(vertex_index, vertex_index+1));
-
-          prev = current;
-          current++;
-          vertex_index++;
-        }
-
-        edges.push_back(std::make_pair(vertex_index, vertex_index_start));
-      }
+      pslg_add_simple_polygon(vertex_map,
+                              vertices,
+                              segments,
+                              pwh.outer_boundary());
 
       // Add holes
       Hole_const_iterator hit;
-      for (hit = pit->holes_begin(); hit != pit->holes_end(); ++hit)
+      for (hit = pwh.holes_begin(); hit != pwh.holes_end(); ++hit)
       {
-        const Polygon_2& p = *hit;
-        Polygon_2::Vertex_const_iterator current = p.vertices_begin();
-        Polygon_2::Vertex_const_iterator prev = current;
+        pslg_add_simple_polygon(vertex_map,
+                                vertices,
+                                segments,
+                                *hit);
+      }
+    }
+  }
 
-        const std::size_t vertex_index_start = vertices.size();
-        vertices.push_back(dolfin::Point(CGAL::to_double(current->x()),
-                                         CGAL::to_double(current->y())));
-        std::size_t vertex_index = vertex_index_start;
+  std::vector<dolfin::Point> v(vertices.size());
+  for (const std::pair<Point_2, std::size_t>& vertex : vertex_map)
+  {
+    v[vertex.second] = dolfin::Point(CGAL::to_double(vertex.first.x()), CGAL::to_double(vertex.first.y()));
+  }
 
-        current++;
+  std::vector<std::pair<std::size_t, std::size_t>> s(segments.begin(), segments.end());
 
-        while (current != p.vertices_end())
-        {
-          Segment_2 s(*prev, *current);
+  {
+    double shortest_segment = std::numeric_limits<double>::max();
+    for (std::pair<std::size_t, std::size_t> segment : s)
+    {
+      shortest_segment = std::min(shortest_segment, (v[segment.first]-v[segment.second]).norm());
+    }
 
-          // Don't add segment if shorter than tolerance
-          if (s.squared_length() < truncate_tolerance_squared)
-          {
-            current++;
-            continue;
-          }
+    double closest_points = std::numeric_limits<double>::max();
+    for (auto i = v.begin(); i != v.end(); i++)
+    {
+      for (auto j = i+1; j != v.end(); j++)
+      {
+        closest_points = std::min(closest_points, (*i-*j).norm());
+      }
+    }
 
-          vertices.push_back(dolfin::Point(CGAL::to_double(current->x()),
-                                           CGAL::to_double(current->y())));
+    // std::cout << "Num vertices: " << v.size() << ", num edges: " << s.size() << std::endl;
+    // std::cout << "Shortest edge: " << shortest_segment << ", closest: " << closest_points << std::endl;
+  }
 
-          edges.push_back(std::make_pair(vertex_index, vertex_index+1));
+  return std::make_pair(std::move(v), std::move(s));
+}
+//-----------------------------------------------------------------------------
+double CSGCGALDomain2D::shortest_edge() const
+{
+  FT shortest_edge = std::numeric_limits<double>::max();
 
-          prev = current;
-          current++;
-          vertex_index++;
-        }
+  std::list<Polygon_with_holes_2> polygon_list;
+  impl->polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
 
-        edges.push_back(std::make_pair(vertex_index, vertex_index_start));
-      }
+  // FIXME: For now it looks only at the outer boundary.
+  // Should take holes into account as well
+  for (const Polygon_with_holes_2& p : polygon_list)
+  {
+    const Polygon_2& bdr = p.outer_boundary();
+    Point_2 prev = bdr.container().back();
+    for (Polygon_2::Vertex_const_iterator vit = bdr.vertices_begin();
+         vit != bdr.vertices_end(); vit++)
+    {
+      shortest_edge = std::min(shortest_edge, (*vit-prev).squared_length());
+      prev = *vit;
     }
   }
+
+  return sqrt(CGAL::to_double(shortest_edge));
 }
 //-----------------------------------------------------------------------------
-PSLG::~PSLG(){}
-//-----------------------------------------------------------------------------
+void CSGCGALDomain2D::get_points_in_holes(std::vector<dolfin::Point>& holes) const
+{
+  std::list<Polygon_with_holes_2> polygon_list;
+  impl->polygon_set.polygons_with_holes(std::back_inserter(polygon_list));
+
+  for (const Polygon_with_holes_2& pwh : polygon_list)
+  {
+    Hole_const_iterator hit;
+    for (hit = pwh.holes_begin(); hit != pwh.holes_end(); ++hit)
+    {
+      const Point_2 p = point_in_polygon(*hit);
+      holes.push_back(dolfin::Point(CGAL::to_double(p.x()), CGAL::to_double(p.y())));
+    }
+  }
+}
 }
diff --git a/src/CSGCGALDomain3D.cpp b/src/CSGCGALDomain3D.cpp
index a068439..3f5ef45 100644
--- a/src/CSGCGALDomain3D.cpp
+++ b/src/CSGCGALDomain3D.cpp
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -21,19 +21,27 @@
 #include <mshr/CSGPrimitives3D.h>
 #include <mshr/STLFileReader.h>
 #include <mshr/VTPFileReader.h>
+#include <mshr/OFFFileReader.h>
 #include <mshr/SurfaceConsistency.h>
+#include <mshr/CSGCGALDomain2D.h>
+#include <mshr/CSGCGALMeshGenerator2D.h>
+#include <mshr/DolfinMeshUtils.h>
+#include <mshr/SurfaceReconstruction.h>
 
 #include "meshclean.h"
-#include "triangulate_polyhedron.h"
 #include "triangulation_refinement.h"
 #include "Polyhedron_utils.h"
+#include "smoothing.h"
 
 #include <dolfin/geometry/Point.h>
 #include <dolfin/math/basic.h>
 #include <dolfin/log/log.h>
 #include <dolfin/log/LogStream.h>
+#include <dolfin/mesh/BoundaryMesh.h>
+#include <dolfin/mesh/Vertex.h>
+#include <dolfin/mesh/Cell.h>
+
 
-#include <CGAL/basic.h>
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 #include <CGAL/Polyhedron_incremental_builder_3.h>
 #ifndef MSHR_ENABLE_EXPERIMENTAL
@@ -43,13 +51,15 @@
 #endif
 #include <CGAL/IO/Polyhedron_iostream.h>
 #include <CGAL/Origin.h>
-#include <CGAL/Self_intersection_polyhedron_3.h>
+//#include <CGAL/Self_intersection_polyhedron_3.h>
+#include <CGAL/Polygon_mesh_processing/self_intersections.h>
 
 #include <CGAL/AABB_tree.h>
 #include <CGAL/AABB_traits.h>
 #include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
 #include <CGAL/AABB_face_graph_triangle_primitive.h>
 
+#include <CGAL/convex_hull_3.h>
 
 #define BOOST_FILESYSTEM_NO_DEPRECATED
 #include <boost/filesystem.hpp>
@@ -62,618 +72,961 @@
 #include <cmath>
 #include <memory>
 
-using namespace mshr;
-
 namespace
 {
-
-// Exact polyhedron
-typedef CGAL::Exact_predicates_exact_constructions_kernel Exact_Kernel;
-typedef Exact_Kernel::Triangle_3                          Exact_Triangle_3;
-typedef Exact_Kernel::Vector_3                            Exact_Vector_3;
-typedef CGAL::Polyhedron_3<Exact_Kernel>                  Exact_Polyhedron_3;
-typedef Exact_Polyhedron_3::HalfedgeDS                    Exact_HalfedgeDS;
-typedef Exact_Kernel::Point_3                             Exact_Point_3;
-typedef Exact_Kernel::Vector_3                            Vector_3;
-typedef Exact_Kernel::Ray_3                               Ray_3;
-typedef Exact_Kernel::Aff_transformation_3                Aff_transformation_3;
+  typedef CGAL::Exact_predicates_exact_constructions_kernel  Exact_Kernel;
+  typedef Exact_Kernel::Triangle_3               Exact_Triangle_3;
+  typedef Exact_Kernel::Triangle_2               Exact_Triangle_2;
+  typedef Exact_Kernel::Vector_3                 Exact_Vector_3;
+  typedef CGAL::Polyhedron_3<Exact_Kernel>       Exact_Polyhedron_3;
+  typedef Exact_Polyhedron_3::HalfedgeDS         Exact_HalfedgeDS;
+  typedef Exact_Kernel::Point_3                  Exact_Point_3;
+  typedef Exact_Kernel::Point_2                  Exact_Point_2;
+  typedef Exact_Kernel::Vector_3                 Vector_3;
+  typedef Exact_Kernel::Ray_3                    Ray_3;
+  typedef Exact_Kernel::Aff_transformation_3     Aff_transformation_3;
 
 #ifndef MSHR_ENABLE_EXPERIMENTAL
-typedef CGAL::Nef_polyhedron_3<Exact_Kernel>              Nef_polyhedron_3;
+  typedef CGAL::Nef_polyhedron_3<Exact_Kernel>   Nef_polyhedron_3;
 #endif
 
 // AABB tree primitives
-typedef CGAL::AABB_face_graph_triangle_primitive<Exact_Polyhedron_3> Primitive;
-typedef CGAL::AABB_traits<Exact_Kernel, Primitive> Traits;
-typedef CGAL::AABB_tree<Traits> AABB_Tree;
+  typedef CGAL::AABB_face_graph_triangle_primitive<Exact_Polyhedron_3> Primitive;
+  typedef CGAL::AABB_traits<Exact_Kernel, Primitive> Traits;
+  typedef CGAL::AABB_tree<Traits> AABB_Tree;
+}
 
-double get_polyline_squared_length(const std::vector<Exact_Point_3>& polyline)
+namespace mshr
 {
-  double length = 0;
-  std::vector<Exact_Point_3>::const_iterator it = polyline.begin();
-  Exact_Point_3 prev = *it;
-  it++;
-  for (;it != polyline.end(); it++)
+  struct CSGCGALDomain3DImpl
   {
-    length += CGAL::to_double((*it-prev).squared_length());
-  }
-  length += CGAL::to_double((polyline.back()-polyline.front()).squared_length());
-
-  return length;
-}
-//-----------------------------------------------------------------------------
-// Convenience routine to make debugging easier. Remove before releasing.
-template<typename Builder>
-inline void add_triangular_facet(Builder& builder,
-                                 int v0, int v1, int v2)
-{
-  builder.begin_facet();
-  builder.add_vertex_to_facet(v0);
-  builder.add_vertex_to_facet(v1);
-  builder.add_vertex_to_facet(v2);
-  builder.end_facet();
-}
-//-----------------------------------------------------------------------------
-template<typename Builder>
-inline void add_vertex(Builder& builder,
-                const Exact_Point_3& point)
-{
-  builder.add_vertex(point);
+    Exact_Polyhedron_3 p;
+  };
 }
 
-//-----------------------------------------------------------------------------
-// Sphere
-//-----------------------------------------------------------------------------
-class Build_sphere : public CGAL::Modifier_base<Exact_HalfedgeDS>
+namespace
 {
- public:
-  Build_sphere(const Sphere& sphere) : _sphere(sphere) {}
-
-  void operator()( Exact_HalfedgeDS& hds )
+  //-----------------------------------------------------------------------------
+  // Convenience routine to make debugging easier. Remove before releasing.
+  template<typename Builder>
+  inline void add_triangular_facet(Builder& builder,
+                                   int v0, int v1, int v2)
   {
-    std::vector<dolfin::Point> initial_vertices { dolfin::Point( 0.0, 0.0, 1.0 ),
-                                                  dolfin::Point( 1.0, 0.0, 0.0 ),
-                                                  dolfin::Point( 0.0,-1.0, 0.0 ),
-                                                  dolfin::Point(-1.0, 0.0, 0.0 ),
-                                                  dolfin::Point( 0.0, 1.0, 0.0 ),
-                                                  dolfin::Point( 0.0, 0.0,-1.0 )};
-
-    // Note: Some older compilers (eg. gcc on Ubuntu Precise) require std::array<std::size_t, 3> to be
-    // given explicitly in the initializer list.
-    std::vector<std::array<std::size_t, 3> > initial_triangles { std::array<std::size_t, 3>{{0, 2, 1}},
-                                                                 std::array<std::size_t, 3>{{0, 3, 2 }},
-                                                                 std::array<std::size_t, 3>{{0, 4, 3 }},
-                                                                 std::array<std::size_t, 3>{{0, 1, 4,}},
-                                                                 std::array<std::size_t, 3>{{5, 4, 1}},
-                                                                 std::array<std::size_t, 3>{{5, 1, 2 }},
-                                                                 std::array<std::size_t, 3>{{5, 2, 3 }},
-                                                                 std::array<std::size_t, 3>{{5, 3, 4 }} };
-
-    std::vector<dolfin::Point> vertices;
-    std::vector<std::array<std::size_t, 3> > triangles;
-    if (_sphere._segments > 1 )
-    {
-      refine_triangulation(initial_vertices,
-                           initial_triangles,
-                           _sphere._segments,
-                           vertices,
-                           triangles);
-    }
-    else
+    builder.begin_facet();
+    builder.add_vertex_to_facet(v0);
+    builder.add_vertex_to_facet(v1);
+    builder.add_vertex_to_facet(v2);
+    builder.end_facet();
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Builder>
+  inline void add_vertex(Builder& builder,
+                         const Exact_Point_3& point)
+  {
+    builder.add_vertex(point);
+  }
+  //-----------------------------------------------------------------------------
+  // Sphere
+  //-----------------------------------------------------------------------------
+  class Build_sphere : public CGAL::Modifier_base<Exact_HalfedgeDS>
+  {
+  public:
+    Build_sphere(const mshr::Sphere& sphere) : _sphere(sphere) {}
+
+    void operator()( Exact_HalfedgeDS& hds )
     {
-      vertices.reserve(initial_vertices.size());
-      std::copy(initial_vertices.begin(), initial_vertices.end(), std::back_inserter(vertices));
+      std::vector<dolfin::Point> initial_vertices { dolfin::Point( 0.0, 0.0, 1.0 ),
+          dolfin::Point( 1.0, 0.0, 0.0 ),
+          dolfin::Point( 0.0,-1.0, 0.0 ),
+          dolfin::Point(-1.0, 0.0, 0.0 ),
+          dolfin::Point( 0.0, 1.0, 0.0 ),
+          dolfin::Point( 0.0, 0.0,-1.0 )};
+
+      // Note: Some older compilers (eg. gcc on Ubuntu Precise) require std::array<std::size_t, 3> to be
+      // given explicitly in the initializer list.
+      std::vector<std::array<std::size_t, 3> > initial_triangles { std::array<std::size_t, 3>{{0, 2, 1 }},
+                                                                   std::array<std::size_t, 3>{{0, 3, 2 }},
+                                                                   std::array<std::size_t, 3>{{0, 4, 3 }},
+                                                                   std::array<std::size_t, 3>{{0, 1, 4 }},
+                                                                   std::array<std::size_t, 3>{{5, 4, 1 }},
+                                                                   std::array<std::size_t, 3>{{5, 1, 2 }},
+                                                                   std::array<std::size_t, 3>{{5, 2, 3 }},
+                                                                   std::array<std::size_t, 3>{{5, 3, 4 }} };
+
+      std::vector<dolfin::Point> vertices;
+      std::vector<std::array<std::size_t, 3> > triangles;
+      if (_sphere._segments > 1 )
+      {
+        refine_triangulation(initial_vertices,
+                             initial_triangles,
+                             _sphere._segments,
+                             vertices,
+                             triangles);
+      }
+      else
+      {
+        vertices.reserve(initial_vertices.size());
+        std::copy(initial_vertices.begin(), initial_vertices.end(), std::back_inserter(vertices));
 
-      triangles.reserve(initial_triangles.size());
-      std::copy(initial_triangles.begin(), initial_triangles.end(), std::back_inserter(triangles));
-    }
+        triangles.reserve(initial_triangles.size());
+        std::copy(initial_triangles.begin(), initial_triangles.end(), std::back_inserter(triangles));
+      }
 
-    CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder( hds, true );
-    builder.begin_surface(vertices.size(), triangles.size());
+      CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder( hds, true );
+      builder.begin_surface(vertices.size(), triangles.size());
 
-    dolfin::Point center = _sphere.c;
-    for (const dolfin::Point& p : vertices)
-    {
-      const double scaling = _sphere.r/std::sqrt(p.x()*p.x() + p.y()*p.y() + p.z()*p.z());
-      add_vertex(builder, Exact_Point_3(center.x() + p.x()*scaling,
-                                        center.y() + p.y()*scaling,
-                                        center.z() + p.z()*scaling));
-    }
+      dolfin::Point center = _sphere.c;
+      for (const dolfin::Point& p : vertices)
+      {
+        const double scaling = _sphere.r/std::sqrt(p.x()*p.x() + p.y()*p.y() + p.z()*p.z());
+        add_vertex(builder, Exact_Point_3(center.x() + p.x()*scaling,
+                                          center.y() + p.y()*scaling,
+                                          center.z() + p.z()*scaling));
+      }
 
-    for (const std::array<std::size_t, 3>& t : triangles)
-    {
-      add_triangular_facet(builder, t[0], t[1], t[2]);
+      for (const std::array<std::size_t, 3>& t : triangles)
+      {
+        add_triangular_facet(builder, t[0], t[1], t[2]);
+      }
+
+      builder.end_surface();
     }
 
-    builder.end_surface();
+  private:
+    const mshr::Sphere& _sphere;
+  };
+  //-----------------------------------------------------------------------------
+  void make_sphere(const mshr::Sphere* s, Exact_Polyhedron_3& P)
+  {
+    Build_sphere builder(*s);
+    P.delegate(builder);
+    dolfin_assert(P.is_valid());
+    dolfin_assert(P.is_closed());
   }
+  //-----------------------------------------------------------------------------
+  class Build_box : public CGAL::Modifier_base<Exact_HalfedgeDS>
+  {
+  public:
+    Build_box(const mshr::Box* box) : _box(box) {}
 
-  private:
-  const Sphere& _sphere;
-};
-//-----------------------------------------------------------------------------
-void make_sphere(const Sphere* s, Exact_Polyhedron_3& P)
-{
-  Build_sphere builder(*s);
-  P.delegate(builder);
-  dolfin_assert(P.is_valid());
-  dolfin_assert(P.is_closed());
-}
-//-----------------------------------------------------------------------------
-class Build_box : public CGAL::Modifier_base<Exact_HalfedgeDS>
-{
- public:
-  Build_box(const Box* box) : _box(box) {}
+    void operator()( Exact_HalfedgeDS& hds )
+    {
+      CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder(hds, true);
+
+      builder.begin_surface(8, 12);
+
+      const double x0 = std::min(_box->a.x(), _box->b.x());
+      const double y0 = std::max(_box->a.x(), _box->b.x());
+
+      const double x1 = std::min(_box->a.y(), _box->b.y());
+      const double y1 = std::max(_box->a.y(), _box->b.y());
+
+      const double x2 = std::min(_box->a.z(), _box->b.z());
+      const double y2 = std::max(_box->a.z(), _box->b.z());
+
+      add_vertex(builder, Exact_Point_3(y0, x1, x2));
+      add_vertex(builder, Exact_Point_3(x0, x1, y2));
+      add_vertex(builder, Exact_Point_3(x0, x1, x2));
+      add_vertex(builder, Exact_Point_3(x0, y1, x2));
+      add_vertex(builder, Exact_Point_3(y0, x1, y2));
+      add_vertex(builder, Exact_Point_3(x0, y1, y2));
+      add_vertex(builder, Exact_Point_3(y0, y1, x2));
+      add_vertex(builder, Exact_Point_3(y0, y1, y2));
+
+      add_triangular_facet(builder, 1, 3, 2);
+      add_triangular_facet(builder, 1, 5, 3);
+      add_triangular_facet(builder, 1, 4, 5);
+      add_triangular_facet(builder, 4, 7, 5);
+      add_triangular_facet(builder, 4, 0, 7);
+      add_triangular_facet(builder, 0, 6, 7);
+      add_triangular_facet(builder, 0, 2, 6);
+      add_triangular_facet(builder, 2, 3, 6);
+      add_triangular_facet(builder, 7, 6, 5);
+      add_triangular_facet(builder, 6, 3, 5);
+      add_triangular_facet(builder, 1, 2, 4);
+      add_triangular_facet(builder, 2, 0, 4);
+
+      builder.end_surface();
+    }
 
-  void operator()( Exact_HalfedgeDS& hds )
+    const mshr::Box* _box;
+  };
+  //-----------------------------------------------------------------------------
+  void make_box(const mshr::Box* b, Exact_Polyhedron_3& P)
+  {
+    Build_box builder(b);
+    P.delegate(builder);
+    dolfin_assert(P.is_closed());
+    dolfin_assert(P.is_valid());
+  }
+  //-----------------------------------------------------------------------------
+  void make_tetrahedron(const mshr::Tetrahedron* b, Exact_Polyhedron_3& P)
   {
-    CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder(hds, true);
-
-    builder.begin_surface(8, 12);
-
-    const double x0 = std::min(_box->a.x(), _box->b.x());
-    const double y0 = std::max(_box->a.x(), _box->b.x());
-
-    const double x1 = std::min(_box->a.y(), _box->b.y());
-    const double y1 = std::max(_box->a.y(), _box->b.y());
-
-    const double x2 = std::min(_box->a.z(), _box->b.z());
-    const double y2 = std::max(_box->a.z(), _box->b.z());
-
-    add_vertex(builder, Exact_Point_3(y0, x1, x2));
-    add_vertex(builder, Exact_Point_3(x0, x1, y2));
-    add_vertex(builder, Exact_Point_3(x0, x1, x2));
-    add_vertex(builder, Exact_Point_3(x0, y1, x2));
-    add_vertex(builder, Exact_Point_3(y0, x1, y2));
-    add_vertex(builder, Exact_Point_3(x0, y1, y2));
-    add_vertex(builder, Exact_Point_3(y0, y1, x2));
-    add_vertex(builder, Exact_Point_3(y0, y1, y2));
-
-
-    add_triangular_facet(builder, 1, 3, 2);
-    add_triangular_facet(builder, 1, 5, 3);
-    add_triangular_facet(builder, 1, 4, 5);
-    add_triangular_facet(builder, 4, 7, 5);
-    add_triangular_facet(builder, 4, 0, 7);
-    add_triangular_facet(builder, 0, 6, 7);
-    add_triangular_facet(builder, 0, 2, 6);
-    add_triangular_facet(builder, 2, 3, 6);
-    add_triangular_facet(builder, 7, 6, 5);
-    add_triangular_facet(builder, 6, 3, 5);
-    add_triangular_facet(builder, 1, 2, 4);
-    add_triangular_facet(builder, 2, 0, 4);
-
-    builder.end_surface();
+    P.make_tetrahedron(Exact_Point_3(b->a.x(), b->a.y(), b->a.z()),
+                       Exact_Point_3(b->b.x(), b->b.y(), b->b.z()),
+                       Exact_Point_3(b->c.x(), b->c.y(), b->c.z()),
+                       Exact_Point_3(b->d.x(), b->d.y(), b->d.z()));
   }
+  //-----------------------------------------------------------------------------
+  // Return some unit vector orthogonal to a
+  dolfin::Point generate_orthogonal(const dolfin::Point& a)
+  {
+    const dolfin::Point b(0, 1, 0);
+    const dolfin::Point c(0, 0, 1);
 
-  const Box* _box;
-};
-//-----------------------------------------------------------------------------
-void make_box(const Box* b, Exact_Polyhedron_3& P)
-{
-  Build_box builder(b);
-  P.delegate(builder);
-  dolfin_assert(P.is_closed());
-  dolfin_assert(P.is_valid());
-}
-//-----------------------------------------------------------------------------
-void make_tetrahedron(const Tetrahedron* b, Exact_Polyhedron_3& P)
-{
-  P.make_tetrahedron(Exact_Point_3(b->a.x(), b->a.y(), b->a.z()),
-                     Exact_Point_3(b->b.x(), b->b.y(), b->b.z()),
-                     Exact_Point_3(b->c.x(), b->c.y(), b->c.z()),
-                     Exact_Point_3(b->d.x(), b->d.y(), b->d.z()));
-}
-//-----------------------------------------------------------------------------
-// Return some unit vector orthogonal to a
-dolfin::Point generate_orthogonal(const dolfin::Point& a)
-{
-  const dolfin::Point b(0, 1, 0);
-  const dolfin::Point c(0, 0, 1);
+    // Find a vector not parallel to a.
+    const dolfin::Point d = (fabs(a.dot(b)) < fabs(a.dot(c))) ? b : c;
+    const dolfin::Point orthogonal = a.cross(d);
+    return orthogonal/orthogonal.norm();
+  }
+  //-----------------------------------------------------------------------------
+  class Build_cylinder : public CGAL::Modifier_base<Exact_HalfedgeDS>
+  {
+  public:
+    Build_cylinder(const mshr::Cylinder* cylinder) : _cylinder(cylinder) {}
 
-  // Find a vector not parallel to a.
-  const dolfin::Point d = (fabs(a.dot(b)) < fabs(a.dot(c))) ? b : c;
-  const dolfin::Point orthogonal = a.cross(d);
-  return orthogonal/orthogonal.norm();
-}
-//-----------------------------------------------------------------------------
-class Build_cylinder : public CGAL::Modifier_base<Exact_HalfedgeDS>
-{
- public:
-  Build_cylinder(const Cylinder* cylinder) : _cylinder(cylinder) {}
+    void operator()(Exact_HalfedgeDS& hds)
+    {
+      const dolfin::Point axis = (_cylinder->_top - _cylinder->_bottom)/(_cylinder->_top - _cylinder->_bottom).norm();
+      dolfin::Point initial = generate_orthogonal(axis);
+      dolfin_assert(dolfin::near(initial.norm(), 1.0));
 
-  void operator()(Exact_HalfedgeDS& hds)
-  {
-    const dolfin::Point axis = (_cylinder->_top - _cylinder->_bottom)/(_cylinder->_top - _cylinder->_bottom).norm();
-    dolfin::Point initial = generate_orthogonal(axis);
-    dolfin_assert(dolfin::near(initial.norm(), 1.0));
+      CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder(hds, true);
+
+      const int num_sides = _cylinder->_segments;
+      const bool top_degenerate = dolfin::near(_cylinder->_top_radius, 0.0);
+      const bool bottom_degenerate = dolfin::near(_cylinder->_bottom_radius, 0.0);
+
+      const int num_vertices = (top_degenerate || bottom_degenerate) ? num_sides+2 : num_sides*2+2;
+
+      builder.begin_surface(num_vertices, num_sides*4);
+
+      const double delta_theta = 2.0 * DOLFIN_PI / num_sides;
+      for (int i = 0; i < num_sides; ++i)
+      {
+        const double theta = i*delta_theta;
+        const dolfin::Point rotated = initial.rotate(axis, theta);
+        if (!bottom_degenerate)
+        {
+          const dolfin::Point p = _cylinder->_bottom + rotated*_cylinder->_bottom_radius;
+          const Exact_Point_3 p_(p.x(), p.y(), p.z());
+          add_vertex(builder, p_);
+        }
+        if (!top_degenerate)
+        {
+          const dolfin::Point p = _cylinder->_top + rotated*_cylinder->_top_radius;
+          const Exact_Point_3 p_(p.x(), p.y(), p.z());
+          add_vertex(builder, p_);
+        }
+      }
 
-    CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder(hds, true);
+      // The top and bottom vertices
+      add_vertex(builder, Exact_Point_3(_cylinder->_bottom.x(), _cylinder->_bottom.y(),
+                                        _cylinder->_bottom.z()));
+      add_vertex(builder, Exact_Point_3(_cylinder->_top.x(), _cylinder->_top.y(),
+                                        _cylinder->_top.z()));
 
-    const int num_sides = _cylinder->_segments;
-    const bool top_degenerate = dolfin::near(_cylinder->_top_radius, 0.0);
-    const bool bottom_degenerate = dolfin::near(_cylinder->_bottom_radius, 0.0);
+      // bottom vertex has index num_vertices-2, top vertex has index num_vertices-1
+
+      // Construct the facets on the side.
+      // Vertices must be sorted counter clockwise seen from inside.
+      for (int i = 0; i < num_sides; ++i)
+      {
+        if (top_degenerate)
+        {
+          add_triangular_facet(builder, (i + 1)%num_sides, num_vertices - 1, i);
+        }
+        else if (bottom_degenerate)
+        {
+          add_triangular_facet(builder, i, num_vertices - 1, (i + 1) % num_sides);
+        }
+        else
+        {
+          //Draw the sides as triangles.
+          const int vertex_offset = i*2;
 
-    const int num_vertices = (top_degenerate || bottom_degenerate) ? num_sides+2 : num_sides*2+2;
+          // First triangle
+          add_triangular_facet(builder, vertex_offset, (vertex_offset + 2) % (num_sides*2), vertex_offset + 1);
 
-    builder.begin_surface(num_vertices, num_sides*4);
+          // Second triangle
+          add_triangular_facet(builder, (vertex_offset + 3) % (num_sides*2), vertex_offset + 1,
+                               (vertex_offset + 2) % (num_sides*2));
+        }
+      }
 
-    const double delta_theta = 2.0 * DOLFIN_PI / num_sides;
-    for (int i = 0; i < num_sides; ++i)
-    {
-      const double theta = i*delta_theta;
-      const dolfin::Point rotated = initial.rotate(axis, theta);
+      // Construct the bottom facet.
       if (!bottom_degenerate)
       {
-        const dolfin::Point p = _cylinder->_bottom + rotated*_cylinder->_bottom_radius;
-        const Exact_Point_3 p_(p.x(), p.y(), p.z());
-        add_vertex(builder, p_);
+        for (int i = num_sides-1; i >= 0; i -= 1)
+        {
+          if (!top_degenerate)
+          {
+            add_triangular_facet(builder, num_vertices-2,( (i+1)*2) % (num_sides*2), i*2);
+          }
+          else
+          {
+            add_triangular_facet(builder, num_vertices-2, (i+1)%num_sides, i);
+          }
+        }
       }
+
+      // Construct the the top facet
       if (!top_degenerate)
       {
-        const dolfin::Point p = _cylinder->_top + rotated*_cylinder->_top_radius;
-        const Exact_Point_3 p_(p.x(), p.y(), p.z());
-        add_vertex(builder, p_);
+        for (int i = 0; i < num_sides; i++)
+        {
+          if (!bottom_degenerate)
+          {
+            add_triangular_facet(builder, num_vertices-1, i*2 + 1, ( (i+1)*2)%(num_sides*2) +1);
+          }
+          else
+          {
+            add_triangular_facet(builder, num_vertices-2, i, (i+1)%num_sides);
+          }
+        }
       }
-    }
-
-    // The top and bottom vertices
-    add_vertex(builder, Exact_Point_3(_cylinder->_bottom.x(), _cylinder->_bottom.y(),
-                                           _cylinder->_bottom.z()));
-    add_vertex(builder, Exact_Point_3(_cylinder->_top.x(), _cylinder->_top.y(),
-                                           _cylinder->_top.z()));
 
-    // bottom vertex has index num_vertices-2, top vertex has index num_vertices-1
+      builder.end_surface();
+    }
+  private:
+    const mshr::Cylinder* _cylinder;
+  };
+  //-----------------------------------------------------------------------------
+  void make_cylinder(const mshr::Cylinder* c, Exact_Polyhedron_3& P)
+  {
+    Build_cylinder builder(c);
+    P.delegate(builder);
+    dolfin_assert(P.is_closed());
+    dolfin_assert(P.is_valid());
+  }
+  //-----------------------------------------------------------------------------
+  class Build_ellipsoid : public CGAL::Modifier_base<Exact_HalfedgeDS>
+  {
+  public:
+    Build_ellipsoid(const mshr::Ellipsoid& ellipsoid) : _ellipsoid(ellipsoid) {}
 
-    // Construct the facets on the side.
-    // Vertices must be sorted counter clockwise seen from inside.
-    for (int i = 0; i < num_sides; ++i)
+    void operator()(Exact_HalfedgeDS& hds)
     {
-      if (top_degenerate)
+      std::vector<dolfin::Point> initial_vertices { dolfin::Point( 0.0, 0.0, 1.0 ),
+          dolfin::Point( 1.0, 0.0, 0.0 ),
+          dolfin::Point( 0.0,-1.0, 0.0 ),
+          dolfin::Point(-1.0, 0.0, 0.0 ),
+          dolfin::Point( 0.0, 1.0, 0.0 ),
+          dolfin::Point( 0.0, 0.0,-1.0 )};
+
+      // Note: Some older compilers (eg. gcc on Ubuntu Precise) require std::array<std::size_t, 3> to be
+      // given explicitly in the initializer list.
+      std::vector<std::array<std::size_t, 3> > initial_triangles { std::array<std::size_t, 3>{{0, 2, 1 }},
+          std::array<std::size_t, 3>{{0, 3, 2 }},
+            std::array<std::size_t, 3>{{0, 4, 3 }},
+              std::array<std::size_t, 3>{{0, 1, 4 }},
+                std::array<std::size_t, 3>{{5, 4, 1 }},
+                  std::array<std::size_t, 3>{{5, 1, 2 }},
+                    std::array<std::size_t, 3>{{5, 2, 3 }},
+                      std::array<std::size_t, 3>{{5, 3, 4 }} };
+
+      std::vector<dolfin::Point> vertices;
+      std::vector<std::array<std::size_t, 3> > triangles;
+      if (_ellipsoid._segments > 1 )
       {
-        add_triangular_facet(builder, (i + 1)%num_sides, num_vertices - 1, i);
-      }
-      else if (bottom_degenerate)
-      {
-        add_triangular_facet(builder, i, num_vertices - 1, (i + 1) % num_sides);
+        refine_triangulation(initial_vertices,
+                             initial_triangles,
+                             _ellipsoid._segments,
+                             vertices,
+                             triangles);
       }
       else
       {
-        //Draw the sides as triangles.
-        const int vertex_offset = i*2;
+        vertices.reserve(initial_vertices.size());
+        std::copy(initial_vertices.begin(), initial_vertices.end(), std::back_inserter(vertices));
+
+        triangles.reserve(initial_triangles.size());
+        std::copy(initial_triangles.begin(), initial_triangles.end(), std::back_inserter(triangles));
+      }
 
-        // First triangle
-        add_triangular_facet(builder, vertex_offset, (vertex_offset + 2) % (num_sides*2), vertex_offset + 1);
+      CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder( hds, true );
+      builder.begin_surface(vertices.size(), triangles.size());
 
-        // Second triangle
-        add_triangular_facet(builder, (vertex_offset + 3) % (num_sides*2), vertex_offset + 1, (vertex_offset + 2) % (num_sides*2));
+      dolfin::Point center = _ellipsoid.center;
+      const double a = _ellipsoid.a, b = _ellipsoid.b, c = _ellipsoid.c;
+      for (const dolfin::Point& p : vertices)
+      {
+        const double scaling = 1.0/std::sqrt( (p.x()*p.x())/(a*a) +
+                                              (p.y()*p.y())/(b*b) +
+                                              (p.z()*p.z())/(c*c) );
+        add_vertex(builder, Exact_Point_3(center.x() + p.x()*scaling,
+                                          center.y() + p.y()*scaling,
+                                          center.z() + p.z()*scaling));
+      }
+
+      for (const std::array<std::size_t, 3>& t : triangles)
+      {
+        add_triangular_facet(builder, t[0], t[1], t[2]);
       }
+
+      builder.end_surface();
     }
 
-    // Construct the bottom facet.
-    if (!bottom_degenerate)
+    const mshr::Ellipsoid& _ellipsoid;
+  };
+  //-----------------------------------------------------------------------------
+  void make_ellipsoid(const mshr::Ellipsoid* e, Exact_Polyhedron_3& P)
+  {
+    Build_ellipsoid builder(*e);
+    P.delegate(builder);
+    dolfin_assert(P.is_closed());
+    dolfin_assert(P.is_valid());
+  }
+  //-----------------------------------------------------------------------------
+  template <class HDS>
+  class BuildFromFacetList : public CGAL::Modifier_base<HDS>
+  {
+  public:
+    BuildFromFacetList(const std::vector<std::array<double, 3> >& vertices,
+                       const std::vector<std::array<std::size_t, 3> >& facets,
+                       const std::set<std::size_t>& facets_to_be_skipped)
+      : vertices(vertices), facets(facets), facets_to_be_skipped(facets_to_be_skipped){}
+    void operator()(HDS& hds)
     {
-      for (int i = num_sides-1; i >= 0; i -= 1)
+      std::set<std::size_t> isolated_vertices;
+      if (facets_to_be_skipped.size() > 0)
       {
-        if (!top_degenerate)
-        {
-          add_triangular_facet(builder, num_vertices-2,( (i+1)*2) % (num_sides*2), i*2);
-        }
-        else
+        for (std::size_t i = 0; i < vertices.size(); i++)
+          isolated_vertices.insert(i);
+
+        for (std::size_t j = 0; j < facets.size(); j++)
         {
-          add_triangular_facet(builder, num_vertices-2, (i+1)%num_sides, i);
+          if (facets_to_be_skipped.count(j) == 0)
+          {
+            for (auto it2 = facets[j].begin(); it2 != facets[j].end(); it2++)
+              isolated_vertices.erase(*it2);
+          }
         }
       }
-    }
 
-    // Construct the the top facet
-    if (!top_degenerate)
-    {
-      for (int i = 0; i < num_sides; i++)
+      // std::cout << "Isolated vertices: " << isolated_vertices.size() << std::endl;
+
+      CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds, true);
+
+      builder.begin_surface(vertices.size(), facets.size());
+
+      for (std::size_t i = 0; i < vertices.size(); i++)
       {
-        if (!bottom_degenerate)
+        if (isolated_vertices.count(i) == 0)
+          builder.add_vertex(Exact_Point_3( vertices[i][0], vertices[i][1], vertices[i][2]) );
+      }
+
+      const bool has_isolated_vertices = isolated_vertices.size() > 0;
+      std::vector<std::size_t> iv(isolated_vertices.begin(), isolated_vertices.end());
+      std::sort(iv.begin(), iv.end());
+      for (std::size_t i = 0; i < facets.size(); i++)
+      {
+        if (facets_to_be_skipped.count(i) == 0)
         {
-          add_triangular_facet(builder, num_vertices-1, i*2 + 1, ( (i+1)*2)%(num_sides*2) +1);
+          if (has_isolated_vertices)
+          {
+            std::vector<std::size_t> f;
+            f.reserve(facets[i].size());
+            for (auto it = facets[i].begin(); it != facets[i].end(); it++)
+            {
+              f.push_back(*it - std::distance(iv.begin(), std::lower_bound(iv.begin(), iv.end(), *it)));
+            }
+            builder.add_facet(f.begin(), f.end());
+          }
+          else
+            builder.add_facet(facets[i].begin(), facets[i].end());
+
+          if (builder.error())
+          {
+            dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                                 "read surface from file",
+                                 "error in polyhedron builder");
+          }
         }
         else
         {
-          add_triangular_facet(builder, num_vertices-2, i, (i+1)%num_sides);
+          // std::cout << "Skipping" << std::endl;
         }
       }
-    }
 
-    builder.end_surface();
-  }
-private:
-  const Cylinder* _cylinder;
-};
-//-----------------------------------------------------------------------------
- void make_cylinder(const Cylinder* c, Exact_Polyhedron_3& P)
-{
-  Build_cylinder builder(c);
-  P.delegate(builder);
-  dolfin_assert(P.is_closed());
-  dolfin_assert(P.is_valid());
-}
-//-----------------------------------------------------------------------------
-class Build_ellipsoid : public CGAL::Modifier_base<Exact_HalfedgeDS>
-{
- public:
-  Build_ellipsoid(const Ellipsoid& ellipsoid) : _ellipsoid(ellipsoid) {}
-
-  void operator()(Exact_HalfedgeDS& hds)
-  {
-    std::vector<dolfin::Point> initial_vertices { dolfin::Point( 0.0, 0.0, 1.0 ),
-                                                  dolfin::Point( 1.0, 0.0, 0.0 ),
-                                                  dolfin::Point( 0.0,-1.0, 0.0 ),
-                                                  dolfin::Point(-1.0, 0.0, 0.0 ),
-                                                  dolfin::Point( 0.0, 1.0, 0.0 ),
-                                                  dolfin::Point( 0.0, 0.0,-1.0 )};
-
-    // Note: Some older compilers (eg. gcc on Ubuntu Precise) require std::array<std::size_t, 3> to be
-    // given explicitly in the initializer list.
-    std::vector<std::array<std::size_t, 3> > initial_triangles { std::array<std::size_t, 3>{{0, 2, 1 }},
-                                                                 std::array<std::size_t, 3>{{0, 3, 2 }},
-                                                                 std::array<std::size_t, 3>{{0, 4, 3 }},
-                                                                 std::array<std::size_t, 3>{{0, 1, 4 }},
-                                                                 std::array<std::size_t, 3>{{5, 4, 1 }},
-                                                                 std::array<std::size_t, 3>{{5, 1, 2 }},
-                                                                 std::array<std::size_t, 3>{{5, 2, 3 }},
-                                                                 std::array<std::size_t, 3>{{5, 3, 4 }} };
-
-    std::vector<dolfin::Point> vertices;
-    std::vector<std::array<std::size_t, 3> > triangles;
-    if (_ellipsoid._segments > 1 )
-    {
-      refine_triangulation(initial_vertices,
-                           initial_triangles,
-                           _ellipsoid._segments,
-                           vertices,
-                           triangles);
-    }
-    else
-    {
-      vertices.reserve(initial_vertices.size());
-      std::copy(initial_vertices.begin(), initial_vertices.end(), std::back_inserter(vertices));
+      builder.end_surface();
 
-      triangles.reserve(initial_triangles.size());
-      std::copy(initial_triangles.begin(), initial_triangles.end(), std::back_inserter(triangles));
     }
+    const std::vector<std::array<double, 3> >& vertices;
+    const std::vector<std::array<std::size_t, 3> >& facets;
+    const std::set<std::size_t>& facets_to_be_skipped;
+  };
+  //-----------------------------------------------------------------------------
+  void make_surface3D(const mshr::Surface3D* s, Exact_Polyhedron_3& P)
+  {
+    dolfin_assert(s);
 
-    CGAL::Polyhedron_incremental_builder_3<Exact_HalfedgeDS> builder( hds, true );
-    builder.begin_surface(vertices.size(), triangles.size());
+    std::vector<std::array<double, 3> > vertices;
+    std::vector<std::array<std::size_t, 3> > facets;
+    std::set<std::size_t> skip;
 
-    dolfin::Point center = _ellipsoid.center;
-    const double a = _ellipsoid.a, b = _ellipsoid.b, c = _ellipsoid.c;
-    for (const dolfin::Point& p : vertices)
+    if (s->_filename == "")
     {
-      const double scaling = 1.0/std::sqrt( (p.x()*p.x())/(a*a) +
-                                            (p.y()*p.y())/(b*b) +
-                                            (p.z()*p.z())/(c*c) );
-      add_vertex(builder, Exact_Point_3(center.x() + p.x()*scaling,
-                                        center.y() + p.y()*scaling,
-                                        center.z() + p.z()*scaling));
-    }
+      dolfin_assert(s->mesh);
 
-    for (const std::array<std::size_t, 3>& t : triangles)
-    {
-      add_triangular_facet(builder, t[0], t[1], t[2]);
-    }
+      std::unique_ptr<dolfin::BoundaryMesh> b;
 
-    builder.end_surface();
-  }
+      if (s->use_cell_domain)
+      {
+        std::shared_ptr<dolfin::Mesh> m = mshr::DolfinMeshUtils::extract_subdomain(s->mesh, s->cell_domain);
+        b.reset(new dolfin::BoundaryMesh(*m, "exterior", false));
+      }
+      else
+      {
+        // Extract global boundary of mesh, order with outward pointing normals
+        b.reset(new dolfin::BoundaryMesh(*(s->mesh), "exterior", false));
+      }
 
-  const Ellipsoid& _ellipsoid;
-};
-//-----------------------------------------------------------------------------
-void make_ellipsoid(const Ellipsoid* e, Exact_Polyhedron_3& P)
-{
-  Build_ellipsoid builder(*e);
-  P.delegate(builder);
-  dolfin_assert(P.is_closed());
-  dolfin_assert(P.is_valid());
-}
+      for (dolfin::VertexIterator v(*b); !v.end(); ++v)
+      {
+        const dolfin::Point& p = v->point();
+        vertices.push_back(std::array<double, 3>{{p[0], p[1], p[2]}});
+      }
 
-//-----------------------------------------------------------------------------
-template <class HDS>
-class BuildFromFacetList : public CGAL::Modifier_base<HDS>
-{
-public:
-  BuildFromFacetList(const std::vector<std::array<double, 3> >& vertices,
-                     const std::vector<std::vector<std::size_t> >& facets)
-    : vertices(vertices), facets(facets){}
-  void operator()(HDS& hds)
-  {
-    CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds, true);
+      for (dolfin::CellIterator c(*b); !c.end(); ++c)
+      {
+        const unsigned int* vertices = c->entities(0);
+        facets.push_back(std::array<std::size_t, 3>{{vertices[0], vertices[1], vertices[2]}});
+      }
+    }
+    else
+    {
+      boost::filesystem::path fpath(s->_filename);
+      if (fpath.extension() == ".off")
+      {
+        mshr::OFFFileReader::read(s->_filename, vertices, facets);
+      }
+      else
+      {
+        if (fpath.extension() == ".stl")
+        {
+          mshr::STLFileReader::read(s->_filename, vertices, facets);
+        }
+        else if (fpath.extension() == ".vtp")
+        {
+          // TODO: Only if vtk is installed
+          mshr::VTPFileReader::read(s->_filename, vertices, facets);
+        }
+        else
+        {
+          dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                               "open file to read 3D surface",
+                               "Unknown file type");
+        }
 
-    builder.begin_surface(vertices.size(), facets.size());
-    
-    for (std::vector<std::array<double, 3> >::const_iterator it = vertices.begin();
-         it != vertices.end(); ++it)
-      builder.add_vertex(Exact_Point_3( (*it)[0], (*it)[1], (*it)[2]));
+        log(dolfin::TRACE, "Done reading file");
+      }
 
-    for (std::vector<std::vector<std::size_t> >::const_iterator it = facets.begin();
-         it != facets.end(); ++it)
-      builder.add_facet(it->begin(), it->end());
+      if (s->debug_dump != "")
+      {
+        log(dolfin::TRACE, "Dumping to file '%s'", s->debug_dump.c_str());
+        mshr::OFFFileReader::write(s->debug_dump,
+                                   vertices,
+                                   facets);
+      }
 
-    builder.end_surface();
+      if (s->flip_facets)
+      {
+        log(dolfin::TRACE, "Flipping facets");
+        for (std::vector<std::array<std::size_t, 3> >::iterator it = facets.begin();
+             it != facets.end(); it++)
+        {
+          std::array<std::size_t, 3>& t = *it;
+          std::swap(t[1], t[2]);
+        }
+      }
 
-  }
-  const std::vector<std::array<double, 3> > vertices;
-  const std::vector<std::vector<std::size_t> > facets;
-};
-//-----------------------------------------------------------------------------
-void make_surface3D(const Surface3D* s, Exact_Polyhedron_3& P)
-{
-  dolfin_assert(s);
+      // std::pair<std::unique_ptr<std::vector<std::array<double, 3> > >,
+      //           std::unique_ptr<std::vector<std::array<std::size_t, 3> > > > filtered =
+      //   SurfaceConsistency::merge_close_vertices(facets, vertices);
 
-  std::vector<std::array<double, 3> > vertices;
-  std::vector<std::vector<std::size_t> > facets;
+      // log(dolfin::TRACE, "Checking connectivity");
 
-  boost::filesystem::path fpath(s->_filename);
-  if (fpath.extension() == ".off")
-  {
-    std::ifstream infile(s->_filename);
-    infile >> P;
-    infile.close();
+      //mshr::closest_vertices(vertices);
 
-    if (P.size_of_vertices() == 0 || P.size_of_facets() == 0)
-    {
-      std::stringstream ss;
-      ss << "File '" << s->_filename << "' was empty or contained syntactical errors";
-      dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                           "read surface from off file",
-                           ss.str());
-    }
-  }
-  else
-  {
+      if (s->repair)
+      {
+        // TODO: Orient all components
+        mshr::SurfaceConsistency::orient_component(facets, 0);
+        // std::size_t start_facet = s->first_facet;
+
+        std::set<std::size_t> duplicating;
+        mshr::SurfaceConsistency::checkConnectivity(facets, duplicating, false);
+        log(dolfin::TRACE, "%u facets filtered out", duplicating.size());
+        skip.insert(duplicating.begin(), duplicating.end());
+
+
+        // SurfaceConsistency::filterFacets(facets,
+        // vertices,
+        // start_facet,
+        // skip);
+
+        // std::vector<std::array<std::size_t, 3> > filtered_facets;
+        // filtered_facets.reserve(facets.size()-skip.size());
+        // for (std::size_t i = 0; i < facets.size(); i++)
+        // {
+        //   if (skip.count(i) == 0)
+        //     filtered_facets.push_back(facets[i]);
+        // }
+      }
 
-    if (fpath.extension() == ".stl")
-    {
-      STLFileReader::read(s->_filename, vertices, facets);
-    }
-    else if (fpath.extension() == ".vtp")
-    {
-      // TODO: Only if vtk is installed
-      VTPFileReader::read(s->_filename, vertices, facets);
-    }
-    else
-    {
-      dolfin::dolfin_error("PolyhedronUtils.cpp",
-                           "open file to read 3D surface",
-                           "Unknown file type");
-    }
+      // std::cout << "Duplicating: " << duplicating.size() << std::endl;
+      // for (auto it = duplicating.begin(); it != duplicating.end(); it++)
+      //   std::cout << *it << " ";
+      // std::cout << std::endl;
 
-    SurfaceConsistency::checkConnectivity(facets);
+    } // end read from file
 
     // Create the polyhedron
-    BuildFromFacetList<Exact_HalfedgeDS> builder(vertices, facets);
+    BuildFromFacetList<Exact_HalfedgeDS> builder(vertices, facets, skip);
     P.delegate(builder);
-  }
+    log(dolfin::TRACE, "Done creating polyhedron");
 
-  if (!P.is_valid())
-  {
-    dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                         "read surface from file",
-                         "Polyhedron is not valid. If you are sure your file is valid, please file a bug report");
-  }
+    if (!P.is_valid())
+    {
+      dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                           "read surface from file",
+                           "Polyhedron is not valid. If you are sure your file is valid, please file a bug report");
+    }
 
-  // Triangulate polyhedron
-  triangulate_polyhedron(P);
-  dolfin_assert (P.is_pure_triangle());
+    P.normalize_border();
+
+    // {
+    //   std::size_t num_vertices = P.size_of_vertices();
+    //   std::list<typename Exact_Polyhedron_3::Vertex_const_handle> components;
+    //   mshr::PolyhedronUtils::get_disconnected_components(P, std::back_inserter(components));
+    //   std::cout << "Number of components: " << components.size() << std::endl;
+    //   const unsigned int deleted = P.keep_largest_connected_components(1);
+    //   std::cout << "Deleted " << deleted << " disconnected components with " << num_vertices-P.size_of_vertices() << " vertices" << std::endl;
+    //   std::cout << "Min vertex degree before closing: " << mshr::PolyhedronUtils::min_vertex_degree(P) << std::endl;
+    //   std::cout << "Is pure triangular: " << (P.is_pure_triangle() ? "True" : "False") << std::endl;
+    //   int tmp;
+    //   std::cin >> tmp;
+    // }
+
+    // Triangulate polyhedron
+    //mshr::PolyhedronUtils::triangulate_polyhedron(P);
+    dolfin_assert (P.is_pure_triangle());
+
+    // remove self-intersecting facets
+    if (s->repair)
+    {
+      if (s->sharp_features_filter >= 0)
+      {
+        mshr::PolyhedronUtils::filter_sharp_features(P,
+                                                     s->sharp_features_filter,
+                                                     DOLFIN_PI/6.0);
+      }
 
-  if (!P.is_closed())
-  {
-    dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                         "read surface from file",
-                         "Surface is not closed.");
-  }
+      // FIXME: Should this be enabled?
+      // mshr::PolyhedronUtils::remove_self_intersections(P);
+      // mshr::PolyhedronUtils::close_holes(P);
+    }
 
-  if (s->degenerate_tolerance > 0)
-  {
-    if (remove_degenerate(P, s->degenerate_tolerance))
-      log(dolfin::TRACE, "Removed degenerate facets from '%s'",
-          s->_filename.c_str());
+    // mshr::PolyhedronUtils::list_self_intersections(P);
+
+    // if (s->degenerate_tolerance > 0)
+    // {
+    //   if (remove_degenerate(P, s->degenerate_tolerance))
+    //     log(dolfin::TRACE, "Removed degenerate facets from '%s'",
+    //         s->_filename.c_str());
+    // }
+
+    // if (!P.is_closed())
+    // {
+    //   if (s->repair)
+    //   {
+    //     mshr::PolyhedronUtils::cut_holes(P);
+
+    //     dolfin_assert(P.is_closed());
+    //     dolfin_assert(P.is_pure_triangle());
+    //     remove_degenerate(P, s->degenerate_tolerance);
+    //   }
+    //   else
+    //   {
+    //     dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+    //                          "read surface from file",
+    //                          "Surface is not closed.");
+    //   }
+    // }
   }
-}
 //-----------------------------------------------------------------------------
-Aff_transformation_3 get_scaling(const CSGScaling& s)
-{
-  Aff_transformation_3 transformation(CGAL::IDENTITY);
-  if (s.translate)
+  template <class Polyhedron>
+  struct Insert_polyhedron_to
+    : public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS>
   {
-    Aff_transformation_3 translation(CGAL::TRANSLATION,
-                                                   Vector_3(-s.c.x(),
-                                                            -s.c.y(),
-                                                            -s.c.z()));
-    transformation = translation * transformation;
-  }
+    Insert_polyhedron_to(const Polyhedron& in_poly)
+      : _in_poly(in_poly) {}
 
-  Aff_transformation_3 scaling(CGAL::SCALING, s.s);
-  transformation = scaling * transformation;
+    void operator()(typename Polyhedron::HalfedgeDS& hds)
+    {
+      typedef typename Polyhedron::HalfedgeDS HDS;
 
-  if (s.translate)
-  {
-    Aff_transformation_3 translation(CGAL::TRANSLATION,
-                                                   Vector_3(s.c.x(),
-                                                            s.c.y(),
-                                                            s.c.z()));
-    transformation = translation * transformation;
-  }
+      CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds);
 
-  return transformation;
-}
-//-----------------------------------------------------------------------------
-Aff_transformation_3 get_rotation(const CSGRotation& r)
-{
-  // Normalize rotation axis vector
-  dolfin::Point axis = r.rot_axis/(r.rot_axis.norm());
-  dolfin_assert(dolfin::near(axis.norm(), 1.0));
+      typedef typename Polyhedron::Vertex_const_iterator Vertex_const_iterator;
+      typedef typename Polyhedron::Facet_const_iterator  Facet_const_iterator;
+      typedef typename Polyhedron::Halfedge_around_facet_const_circulator HFCC;
 
-  Aff_transformation_3 transformation(CGAL::IDENTITY);
-  if (r.translate)
-  {
-    Aff_transformation_3 translation(CGAL::TRANSLATION,
-                                                   Vector_3(-r.c.x(),
-                                                            -r.c.y(),
-                                                            -r.c.z()));
-    transformation = translation * transformation;
-  }
+      builder.begin_surface(_in_poly.size_of_vertices(),
+                            _in_poly.size_of_facets(),
+                            _in_poly.size_of_halfedges());
 
-  // The Euler-Rodrigues formula
-  const double a = cos(r.theta/2);
-  const double b = -axis.x()*sin(r.theta/2);
-  const double c = -axis.y()*sin(r.theta/2);
-  const double d = -axis.z()*sin(r.theta/2);
-
-  Aff_transformation_3 rotation(a*a+b*b-c*c-d*d,
-                                              2*(b*c-a*d),
-                                              2*(b*d+a*c),
-                                              2*(b*c+a*d),
-                                              a*a+c*c-b*b-d*d,
-                                              2*(c*d-a*b),
-                                              2*(b*d-a*c),
-                                              2*(c*d+a*b),
-                                              a*a+d*d-b*b-c*c);
-  transformation = rotation * transformation;
-
-  if (r.translate)
-  {
-    Aff_transformation_3 translation(CGAL::TRANSLATION,
-                                                   Vector_3(r.c.x(),
-                                                            r.c.y(),
-                                                            r.c.z()));
-    transformation = translation * transformation;
-  }
+      for(Vertex_const_iterator
+            vi = _in_poly.vertices_begin(), end = _in_poly.vertices_end();
+          vi != end ; ++vi)
+      {
+        builder.add_vertex(vi->point());
+      }
 
-  return transformation;
-}
+      typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
+      Index index(_in_poly.vertices_begin(), _in_poly.vertices_end());
+
+      for(Facet_const_iterator
+            fi = _in_poly.facets_begin(), end = _in_poly.facets_end();
+          fi != end; ++fi)
+      {
+        HFCC hc = fi->facet_begin();
+        HFCC hc_end = hc;
+        //     std::size_t n = circulator_size( hc);
+        //     CGAL_assertion( n >= 3);
+        builder.begin_facet ();
+        do
+        {
+          builder.add_vertex_to_facet(index[hc->vertex()]);
+          ++hc;
+        } while( hc != hc_end);
+        builder.end_facet();
+      }
+      builder.end_surface();
+    } // end operator()(..)
+  private:
+    const Polyhedron& _in_poly;
+  }; // end Copy_polyhedron_to<>
 //-----------------------------------------------------------------------------
-#ifdef MSHR_ENABLE_EXPERIMENTAL
-typedef CGAL::Polyhedron_corefinement<Exact_Polyhedron_3> CGALCSGOperator;
-  
-void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
-{
-  switch (geometry->getType())
+  template <class HDS>
+  class BuildExtrude2D : public CGAL::Modifier_base<HDS>
   {
-    case CSGGeometry::Union :
+  public:
+    BuildExtrude2D(const mshr::CSGGeometry& polygon, double z)
+      : polygon(polygon), z(z){}
+    void operator()(HDS& hds)
     {
-      const CSGUnion* u = dynamic_cast<const CSGUnion*>(geometry);
-      dolfin_assert(u);
-      convertSubTree(u->_g0.get(), P);
-      Exact_Polyhedron_3 P2;
-      convertSubTree(u->_g1.get(), P2);
+      // Let the 2d mesh generator triangulate the polygon
+      dolfin::Mesh mesh2d;
+      {
+        mshr::CSGCGALMeshGenerator2D generator;
+        generator.parameters["mesh_resolution"] = 2.0;
 
-      std::list<std::vector<Exact_Point_3> > intersection_polylines;
-      CGALCSGOperator op;
-      op(P, P2, std::back_inserter(intersection_polylines), CGALCSGOperator::Join_tag);
+        // Generate 2D mesh (on all nodes if in parallel)
+        generator.generate(polygon, mesh2d, false);
+      }
 
-      // Check that intersection is not degenerate
-      for (std::list<std::vector<Exact_Point_3> >::iterator it=intersection_polylines.begin();
-           it != intersection_polylines.end(); it++)
+      CGAL::Polyhedron_incremental_builder_3<HDS> builder(hds, true);
+
+      builder.begin_surface(0, 0);
+
+      const double min_z = std::min(0., z);
+      const double max_z = std::max(0., z);
+
+      // Copy vertices to the new 3d polyhedron
+      const std::vector<double>& vertices = mesh2d.coordinates();
+      for (std::size_t i = 0; i < vertices.size()/2; i++)
       {
-	if (get_polyline_squared_length(*it) < DOLFIN_EPS)
+        builder.add_vertex(Exact_Point_3(vertices[2*i], vertices[2*i+1], min_z));
+        builder.add_vertex(Exact_Point_3(vertices[2*i], vertices[2*i+1], max_z));
+      }
+
+      // Add the triangles from the 2d mesh at z=0 and z=z
+      for (dolfin::CellIterator c(mesh2d); !c.end(); ++c)
+      {
+        const unsigned int* v_indices = c->entities(0);
+        const bool flip = Exact_Triangle_2(Exact_Point_2(vertices[2*v_indices[0]], vertices[2*v_indices[0]+1]),
+                                           Exact_Point_2(vertices[2*v_indices[1]], vertices[2*v_indices[1]+1]),
+                                           Exact_Point_2(vertices[2*v_indices[2]], vertices[2*v_indices[2]+1])).orientation() == CGAL::POSITIVE;
+        builder.begin_facet();
+        builder.add_vertex_to_facet(2*v_indices[0]);
+        if (flip)
+        {
+          builder.add_vertex_to_facet(2*v_indices[2]);
+          builder.add_vertex_to_facet(2*v_indices[1]);
+        }
+        else
+        {
+          builder.add_vertex_to_facet(2*v_indices[1]);
+          builder.add_vertex_to_facet(2*v_indices[2]);
+        }
+
+        builder.end_facet();
+
+        builder.begin_facet();
+        builder.add_vertex_to_facet(2*v_indices[0]+1);
+        if (!flip)
+        {
+          builder.add_vertex_to_facet(2*v_indices[2]+1);
+          builder.add_vertex_to_facet(2*v_indices[1]+1);
+        }
+        else
+        {
+          builder.add_vertex_to_facet(2*v_indices[1]+1);
+          builder.add_vertex_to_facet(2*v_indices[2]+1);
+        }
+        builder.end_facet();
+      }
+
+      // Connect the two polygons
+      dolfin::BoundaryMesh bdr(mesh2d, "exterior", false);
+      const dolfin::MeshFunction<std::size_t>& vertex_map = bdr.entity_map(0);
+      for (dolfin::CellIterator cell(bdr); !cell.end(); ++cell)
+      {
+        const unsigned int* v_indices = cell->entities(0);
+        builder.begin_facet();
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[0]]);
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[1]]);
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[0]]+1);
+        builder.end_facet();
+
+        builder.begin_facet();
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[1]]);
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[1]]+1);
+        builder.add_vertex_to_facet(2*vertex_map[v_indices[0]]+1);
+        builder.end_facet();
+
+      }
+
+      builder.end_surface();
+    }
+
+    const mshr::CSGGeometry& polygon;
+    const double z;
+  };
+// ----
+  void make_extrude2D(const mshr::Extrude2D* e, Exact_Polyhedron_3& P)
+  {
+    dolfin_assert(e);
+
+    //CSGCGALDomain2D polygon(e->geometry_2d.get());
+    BuildExtrude2D<Exact_HalfedgeDS> builder(*e->geometry_2d, e->z);
+    P.delegate(builder);
+  }
+//-----------------------------------------------------------------------------
+  Aff_transformation_3 get_scaling(const mshr::CSGScaling& s)
+  {
+    Aff_transformation_3 transformation(CGAL::IDENTITY);
+    if (s.translate)
+    {
+      Aff_transformation_3 translation(CGAL::TRANSLATION,
+                                       Vector_3(-s.c.x(),
+                                                -s.c.y(),
+                                                -s.c.z()));
+      transformation = translation * transformation;
+    }
+
+    Aff_transformation_3 scaling(CGAL::SCALING, s.s);
+    transformation = scaling * transformation;
+
+    if (s.translate)
+    {
+      Aff_transformation_3 translation(CGAL::TRANSLATION,
+                                       Vector_3(s.c.x(),
+                                                s.c.y(),
+                                                s.c.z()));
+      transformation = translation * transformation;
+    }
+
+    return transformation;
+  }
+//-----------------------------------------------------------------------------
+  Aff_transformation_3 get_rotation(const mshr::CSGRotation& r)
+  {
+    // Normalize rotation axis vector
+    dolfin::Point axis = r.rot_axis/(r.rot_axis.norm());
+    dolfin_assert(dolfin::near(axis.norm(), 1.0));
+
+    Aff_transformation_3 transformation(CGAL::IDENTITY);
+    if (r.translate)
+    {
+      Aff_transformation_3 translation(CGAL::TRANSLATION,
+                                       Vector_3(-r.c.x(),
+                                                -r.c.y(),
+                                                -r.c.z()));
+      transformation = translation * transformation;
+    }
+
+    // The Euler-Rodrigues formula
+    const double a = cos(r.theta/2);
+    const double b = -axis.x()*sin(r.theta/2);
+    const double c = -axis.y()*sin(r.theta/2);
+    const double d = -axis.z()*sin(r.theta/2);
+
+    Aff_transformation_3 rotation(a*a+b*b-c*c-d*d,
+                                  2*(b*c-a*d),
+                                  2*(b*d+a*c),
+                                  2*(b*c+a*d),
+                                  a*a+c*c-b*b-d*d,
+                                  2*(c*d-a*b),
+                                  2*(b*d-a*c),
+                                  2*(c*d+a*b),
+                                  a*a+d*d-b*b-c*c);
+    transformation = rotation * transformation;
+
+    if (r.translate)
+    {
+      Aff_transformation_3 translation(CGAL::TRANSLATION,
+                                       Vector_3(r.c.x(),
+                                                r.c.y(),
+                                                r.c.z()));
+      transformation = translation * transformation;
+    }
+
+    return transformation;
+  }
+//-----------------------------------------------------------------------------
+#ifdef MSHR_ENABLE_EXPERIMENTAL
+  bool polyline_is_degenerate(const std::vector<Exact_Point_3>& polyline, double tol)
+  {
+    double length = 0;
+    std::vector<Exact_Point_3>::const_iterator it = polyline.begin();
+    Exact_Point_3 prev = *it;
+    it++;
+    for (;it != polyline.end(); it++)
+    {
+      length += CGAL::to_double((*it-prev).squared_length());
+    }
+    length += CGAL::to_double((polyline.back()-polyline.front()).squared_length());
+
+    return length < tol;
+  }
+
+
+  typedef CGAL::Polyhedron_corefinement<Exact_Polyhedron_3> CGALCSGOperator;
+
+  void convertSubTree(const mshr::CSGGeometry* geometry, Exact_Polyhedron_3& P)
+  {
+    switch (geometry->getType())
+    {
+    case mshr::CSGGeometry::Union :
+    {
+      const mshr::CSGUnion* u = dynamic_cast<const mshr::CSGUnion*>(geometry);
+      dolfin_assert(u);
+      convertSubTree(u->_g0.get(), P);
+      Exact_Polyhedron_3 P2;
+      convertSubTree(u->_g1.get(), P2);
+
+      std::list<std::vector<Exact_Point_3> > intersection_polylines;
+      CGALCSGOperator op;
+      op(P, P2, std::back_inserter(intersection_polylines), CGALCSGOperator::Join_tag);
+
+      // Check that intersection is not degenerate
+      for (std::list<std::vector<Exact_Point_3> >::iterator it=intersection_polylines.begin();
+           it != intersection_polylines.end(); it++)
+      {
+	if (polyline_is_degenerate(*it, DOLFIN_EPS))
 	{
 	  dolfin::dolfin_error("CSGCGALDomain3D.cpp",
 			       "union of csg geometries",
@@ -682,9 +1035,9 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
       }
       break;
     }
-    case CSGGeometry::Intersection :
+    case mshr::CSGGeometry::Intersection :
     {
-      const CSGIntersection* u = dynamic_cast<const CSGIntersection*>(geometry);
+      const mshr::CSGIntersection* u = dynamic_cast<const mshr::CSGIntersection*>(geometry);
       dolfin_assert(u);
       convertSubTree(u->_g0.get(), P);
       Exact_Polyhedron_3 P2;
@@ -698,7 +1051,7 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
       for (std::list<std::vector<Exact_Point_3> >::iterator it=intersection_polylines.begin();
            it != intersection_polylines.end(); it++)
       {
-	if (get_polyline_squared_length(*it) < DOLFIN_EPS)
+	if (polyline_is_degenerate(*it, DOLFIN_EPS))
 	{
 	  dolfin::dolfin_error("CSGCGALDomain3D.cpp",
 			       "intersection of csg geometries",
@@ -708,9 +1061,10 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
 
       break;
     }
-    case CSGGeometry::Difference :
+    case mshr::CSGGeometry::Difference :
     {
-      const CSGDifference* u = dynamic_cast<const CSGDifference*>(geometry);
+      std::cout << "Difference operator" << std::endl;
+      const mshr::CSGDifference* u = dynamic_cast<const mshr::CSGDifference*>(geometry);
       dolfin_assert(u);
       convertSubTree(u->_g0.get(), P);
       Exact_Polyhedron_3 P2;
@@ -720,11 +1074,12 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
       CGALCSGOperator op;
       op(P, P2, std::back_inserter(intersection_polylines), CGALCSGOperator::P_minus_Q_tag);
 
+      std::cout << "Checking polyline" << std::endl;
       // Check that intersection is not degenerate
       for (std::list<std::vector<Exact_Point_3> >::iterator it=intersection_polylines.begin();
            it != intersection_polylines.end(); it++)
       {
-	if (get_polyline_squared_length(*it) < DOLFIN_EPS)
+	if (polyline_is_degenerate(*it, DOLFIN_EPS))
 	{
 	  dolfin::dolfin_error("CSGCGALDomain3D.cpp",
 			       "difference of csg geometries",
@@ -732,21 +1087,20 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
 	}
       }
 
-
       break;
     }
-    case CSGGeometry::Translation :
+    case mshr::CSGGeometry::Translation :
     {
-      const CSGTranslation* t = dynamic_cast<const CSGTranslation*>(geometry);
+      const mshr::CSGTranslation* t = dynamic_cast<const mshr::CSGTranslation*>(geometry);
       dolfin_assert(t);
       convertSubTree(t->g.get(), P);
       Aff_transformation_3 translation(CGAL::TRANSLATION, Vector_3(t->t.x(), t->t.y(), t->t.z()));
       std::transform(P.points_begin(), P.points_end(), P.points_begin(), translation);
       break;
     }
-    case CSGGeometry::Scaling :
+    case mshr::CSGGeometry::Scaling :
     {
-      const CSGScaling* t = dynamic_cast<const CSGScaling*>(geometry);
+      const mshr::CSGScaling* t = dynamic_cast<const mshr::CSGScaling*>(geometry);
       dolfin_assert(t);
       convertSubTree(t->g.get(), P);
 
@@ -754,9 +1108,9 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
       std::transform(P.points_begin(), P.points_end(), P.points_begin(), scaling);
       break;
     }
-    case CSGGeometry::Rotation :
+    case mshr::CSGGeometry::Rotation :
     {
-      const CSGRotation* t = dynamic_cast<const CSGRotation*>(geometry);
+      const mshr::CSGRotation* t = dynamic_cast<const mshr::CSGRotation*>(geometry);
       dolfin_assert(t);
 
       convertSubTree(t->g.get(), P);
@@ -764,611 +1118,936 @@ void convertSubTree(const CSGGeometry* geometry, Exact_Polyhedron_3& P)
       std::transform(P.points_begin(), P.points_end(), P.points_begin(), rotation);
       break;
     }
-    case CSGGeometry::Cylinder :
+    case mshr::CSGGeometry::Cylinder :
     {
-      const Cylinder* c = dynamic_cast<const Cylinder*>(geometry);
+      const mshr::Cylinder* c = dynamic_cast<const mshr::Cylinder*>(geometry);
       dolfin_assert(c);
       make_cylinder(c, P);
       break;
     }
-    case CSGGeometry::Sphere :
+    case mshr::CSGGeometry::Sphere :
     {
-      const Sphere* s = dynamic_cast<const Sphere*>(geometry);
+      const mshr::Sphere* s = dynamic_cast<const mshr::Sphere*>(geometry);
       dolfin_assert(s);
       make_sphere(s, P);
       break;
     }
-    case CSGGeometry::Box :
+    case mshr::CSGGeometry::Box :
     {
-      const Box* b = dynamic_cast<const Box*>(geometry);
+      const mshr::Box* b = dynamic_cast<const mshr::Box*>(geometry);
       dolfin_assert(b);
       make_box(b, P);
       break;
     }
-    case CSGGeometry::Tetrahedron :
+    case mshr::CSGGeometry::Tetrahedron :
     {
-      const Tetrahedron* b = dynamic_cast<const Tetrahedron*>(geometry);
+      const mshr::Tetrahedron* b = dynamic_cast<const mshr::Tetrahedron*>(geometry);
       dolfin_assert(b);
       make_tetrahedron(b, P);
       break;
     }
-    case CSGGeometry::Ellipsoid :
+    case mshr::CSGGeometry::Ellipsoid :
     {
-      const Ellipsoid* b = dynamic_cast<const Ellipsoid*>(geometry);
+      const mshr::Ellipsoid* b = dynamic_cast<const mshr::Ellipsoid*>(geometry);
       dolfin_assert(b);
       make_ellipsoid(b, P);
       break;
     }
-    case CSGGeometry::Surface3D :
+    case mshr::CSGGeometry::Surface3D :
     {
-      const Surface3D* b = dynamic_cast<const Surface3D*>(geometry);
+      const mshr::Surface3D* b = dynamic_cast<const mshr::Surface3D*>(geometry);
       dolfin_assert(b);
       make_surface3D(b, P);
       break;
     }
-    default:
-      dolfin::dolfin_error("CSGCGALDomain.cpp",
-                           "converting geometry to cgal polyhedron",
-                           "Unhandled primitive type");
-  }
-}
-#else
-std::shared_ptr<Nef_polyhedron_3>
-convertSubTree(const CSGGeometry *geometry)
-{
-  switch (geometry->getType())
-  {
-    case CSGGeometry::Union :
+    case mshr::CSGGeometry::TriPolyhedron :
     {
-      const CSGUnion* u = dynamic_cast<const CSGUnion*>(geometry);
-      dolfin_assert(u);
-      std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
-      std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
-      (*g0) += (*g1);
-      return g0;
-
+      const mshr::CSGCGALDomain3D* b = dynamic_cast<const mshr::CSGCGALDomain3D*>(geometry);
+      dolfin_assert(b);
+      Insert_polyhedron_to<Exact_Polyhedron_3> inserter(b->impl->p);
+      P.delegate(inserter);
+      dolfin_assert(P.is_valid());
       break;
     }
-    case CSGGeometry::Intersection :
+    case mshr::CSGGeometry::Extrude2D :
     {
-      const CSGIntersection* u = dynamic_cast<const CSGIntersection*>(geometry);
-      dolfin_assert(u);
-      std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
-      std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
-      (*g0) *= (*g1);
-      return g0;
+      const mshr::Extrude2D* e = dynamic_cast<const mshr::Extrude2D*>(geometry);
+      dolfin_assert(e);
+      make_extrude2D(e, P);
       break;
     }
-    case CSGGeometry::Difference :
-    {
-      const CSGDifference* u = dynamic_cast<const CSGDifference*>(geometry);
-      dolfin_assert(u);
-      std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
-      std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
-      (*g0) -= (*g1);
-      return g0;
-      break;
+    default:
+      dolfin::dolfin_error("CSGCGALDomain.cpp",
+                           "converting geometry to cgal polyhedron",
+                           "Unhandled primitive type");
     }
-    case CSGGeometry::Translation :
-    {
-      const CSGTranslation* t = dynamic_cast<const CSGTranslation*>(geometry);
-      dolfin_assert(t);
-      std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
-      Aff_transformation_3 translation(CGAL::TRANSLATION, Vector_3(t->t.x(), t->t.y(), t->t.z()));
-      g->transform(translation);
-      return g;
-      break;
     }
-    case CSGGeometry::Scaling :
+#else
+    std::shared_ptr<Nef_polyhedron_3>
+      convertSubTree(const mshr::CSGGeometry *geometry)
     {
-      const CSGScaling* t = dynamic_cast<const CSGScaling*>(geometry);
-      dolfin_assert(t);
-      std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
-      Aff_transformation_3 scaling = get_scaling(*t);
-      g->transform(scaling);
-      return g;
-      break;
+      switch (geometry->getType())
+      {
+      case mshr::CSGGeometry::Union :
+      {
+        const mshr::CSGUnion* u = dynamic_cast<const mshr::CSGUnion*>(geometry);
+        dolfin_assert(u);
+        std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
+        std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
+        (*g0) += (*g1);
+        return g0;
+
+        break;
+      }
+      case mshr::CSGGeometry::Intersection :
+      {
+        const mshr::CSGIntersection* u = dynamic_cast<const mshr::CSGIntersection*>(geometry);
+        dolfin_assert(u);
+        std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
+        std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
+        (*g0) *= (*g1);
+        return g0;
+        break;
+      }
+      case mshr::CSGGeometry::Difference :
+      {
+        const mshr::CSGDifference* u = dynamic_cast<const mshr::CSGDifference*>(geometry);
+        dolfin_assert(u);
+        std::shared_ptr<Nef_polyhedron_3> g0 = convertSubTree(u->_g0.get());
+        std::shared_ptr<Nef_polyhedron_3> g1 = convertSubTree(u->_g1.get());
+        (*g0) -= (*g1);
+        return g0;
+        break;
+      }
+      case mshr::CSGGeometry::Translation :
+      {
+        const mshr::CSGTranslation* t = dynamic_cast<const mshr::CSGTranslation*>(geometry);
+        dolfin_assert(t);
+        std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
+        Aff_transformation_3 translation(CGAL::TRANSLATION, Vector_3(t->t.x(), t->t.y(), t->t.z()));
+        g->transform(translation);
+        return g;
+        break;
+      }
+      case mshr::CSGGeometry::Scaling :
+      {
+        const mshr::CSGScaling* t = dynamic_cast<const mshr::CSGScaling*>(geometry);
+        dolfin_assert(t);
+        std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
+        Aff_transformation_3 scaling = get_scaling(*t);
+        g->transform(scaling);
+        return g;
+        break;
+      }
+      case mshr::CSGGeometry::Rotation :
+      {
+        const mshr::CSGRotation* t = dynamic_cast<const mshr::CSGRotation*>(geometry);
+        dolfin_assert(t);
+
+        std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
+        Aff_transformation_3 rotation = get_rotation(*t);
+        g->transform(rotation);
+        return g;
+        break;
+      }
+      case mshr::CSGGeometry::Cylinder :
+      {
+        const mshr::Cylinder* c = dynamic_cast<const mshr::Cylinder*>(geometry);
+        dolfin_assert(c);
+        Exact_Polyhedron_3 P;
+        make_cylinder(c, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::Sphere :
+      {
+        const mshr::Sphere* s = dynamic_cast<const mshr::Sphere*>(geometry);
+        dolfin_assert(s);
+        Exact_Polyhedron_3 P;
+        make_sphere(s, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::Box :
+      {
+        const mshr::Box* b = dynamic_cast<const mshr::Box*>(geometry);
+        dolfin_assert(b);
+        Exact_Polyhedron_3 P;
+        make_box(b, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::Tetrahedron :
+      {
+        const mshr::Tetrahedron* b = dynamic_cast<const mshr::Tetrahedron*>(geometry);
+        dolfin_assert(b);
+        Exact_Polyhedron_3 P;
+        make_tetrahedron(b, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::Ellipsoid :
+      {
+        const mshr::Ellipsoid* b = dynamic_cast<const mshr::Ellipsoid*>(geometry);
+        dolfin_assert(b);
+        Exact_Polyhedron_3 P;
+        make_ellipsoid(b, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::Surface3D :
+      {
+        const mshr::Surface3D* b = dynamic_cast<const mshr::Surface3D*>(geometry);
+        dolfin_assert(b);
+        Exact_Polyhedron_3 P;
+        make_surface3D(b, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      case mshr::CSGGeometry::TriPolyhedron :
+      {
+        const mshr::CSGCGALDomain3D* b = dynamic_cast<const mshr::CSGCGALDomain3D*>(geometry);
+        dolfin_assert(b);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(b->impl->p));
+        break;
+      }
+      case mshr::CSGGeometry::Extrude2D :
+      {
+        const mshr::Extrude2D* e = dynamic_cast<const mshr::Extrude2D*>(geometry);
+        dolfin_assert(e);
+        Exact_Polyhedron_3 P;
+        make_extrude2D(e, P);
+        return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
+        break;
+      }
+      default:
+        dolfin::dolfin_error("CSGCGALDomain.cpp",
+                             "converting geometry to cgal polyhedron",
+                             "Unhandled primitive type");
+      }
+      // Make compiler happy.
+      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3);
     }
-    case CSGGeometry::Rotation :
+#endif
+//-----------------------------------------------------------------------------
+    void convert(const mshr::CSGGeometry& geometry,
+                 Exact_Polyhedron_3 &P)
     {
-      const CSGRotation* t = dynamic_cast<const CSGRotation*>(geometry);
-      dolfin_assert(t);
+      // If the tree has only one node, we don't have to convert to Nef
+      // polyhedrons for csg manipulations
+      if (!geometry.is_operator())
+      {
+        switch (geometry.getType())
+        {
 
-      std::shared_ptr<Nef_polyhedron_3> g = convertSubTree(t->g.get());
-      Aff_transformation_3 rotation = get_rotation(*t);
-      g->transform(rotation);
-      return g;
-      break;
+        case mshr::CSGGeometry::Cylinder :
+        {
+          const mshr::Cylinder* c = dynamic_cast<const mshr::Cylinder*>(&geometry);
+          dolfin_assert(c);
+          make_cylinder(c, P);
+          break;
+        }
+        case mshr::CSGGeometry::Sphere :
+        {
+          const mshr::Sphere* s = dynamic_cast<const mshr::Sphere*>(&geometry);
+          dolfin_assert(s);
+          make_sphere(s, P);
+          break;
+        }
+        case mshr::CSGGeometry::Box :
+        {
+          const mshr::Box* b = dynamic_cast<const mshr::Box*>(&geometry);
+          dolfin_assert(b);
+          make_box(b, P);
+          break;
+        }
+
+        case mshr::CSGGeometry::Tetrahedron :
+        {
+          const mshr::Tetrahedron* b = dynamic_cast<const mshr::Tetrahedron*>(&geometry);
+          dolfin_assert(b);
+          make_tetrahedron(b, P);
+          break;
+        }
+        case mshr::CSGGeometry::Ellipsoid :
+        {
+          const mshr::Ellipsoid* b = dynamic_cast<const mshr::Ellipsoid*>(&geometry);
+          dolfin_assert(b);
+          make_ellipsoid(b, P);
+          break;
+        }
+        case mshr::CSGGeometry::TriPolyhedron :
+        {
+          const mshr::CSGCGALDomain3D* p = dynamic_cast<const mshr::CSGCGALDomain3D*>(&geometry);
+          dolfin_assert(p);
+          Insert_polyhedron_to<Exact_Polyhedron_3> inserter(p->impl->p);
+          P.delegate(inserter);
+          dolfin_assert(P.is_valid());
+          break;
+        }
+        case mshr::CSGGeometry::Surface3D :
+        {
+          const mshr::Surface3D* b = dynamic_cast<const mshr::Surface3D*>(&geometry);
+          dolfin_assert(b);
+          make_surface3D(b, P);
+          break;
+        }
+        case mshr::CSGGeometry::Extrude2D :
+        {
+          const mshr::Extrude2D* e = dynamic_cast<const mshr::Extrude2D*>(&geometry);
+          dolfin_assert(e);
+          make_extrude2D(e, P);
+          break;
+        }
+
+        default:
+          dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                               "converting geometry to cgal polyhedron",
+                               "Unhandled primitive type");
+        }
+      }
+      else
+      {
+#ifdef MSHR_ENABLE_EXPERIMENTAL
+        convertSubTree(&geometry, P);
+#else
+        log(dolfin::TRACE, "Convert to nef polyhedron");
+        std::shared_ptr<Nef_polyhedron_3> cgal_geometry
+          = convertSubTree(&geometry);
+        dolfin_assert(cgal_geometry->is_valid());
+        dolfin_assert(cgal_geometry->is_simple());
+        cgal_geometry->convert_to_polyhedron(P);
+#endif
+      }
+
+      if (P.size_of_facets() == 0)
+      {
+        dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                             "Convert geometry to polyhedron",
+                             "Geometry contains no facet");
+      }
+
+      log(dolfin::TRACE, "Number of vertices: %d",  P.size_of_vertices());
+      log(dolfin::TRACE, "Number of facets: %d", P.size_of_facets());
     }
-    case CSGGeometry::Cylinder :
+  } //end unnamed namespace
+
+
+  namespace mshr
+  {
+    //-----------------------------------------------------------------------------
+    struct CSGCGALDomain3DQueryStructureImpl
     {
-      const Cylinder* c = dynamic_cast<const Cylinder*>(geometry);
-      dolfin_assert(c);
-      Exact_Polyhedron_3 P;
-      make_cylinder(c, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      template <typename A>
+      CSGCGALDomain3DQueryStructureImpl(A start, A end, const Exact_Polyhedron_3& p)
+        : aabb_tree(start, end, p){}
+
+      AABB_Tree aabb_tree;
+    };
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3DQueryStructure::CSGCGALDomain3DQueryStructure(std::unique_ptr<CSGCGALDomain3DQueryStructureImpl> impl)
+      : impl(std::move(impl))
+    {
+      // Do nothing
     }
-    case CSGGeometry::Sphere :
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3DQueryStructure::~CSGCGALDomain3DQueryStructure()
     {
-      const Sphere* s = dynamic_cast<const Sphere*>(geometry);
-      dolfin_assert(s);
-      Exact_Polyhedron_3 P;
-      make_sphere(s, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      // Do nothing
     }
-    case CSGGeometry::Box :
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3D::CSGCGALDomain3D() : impl(new CSGCGALDomain3DImpl)
     {
-      const Box* b = dynamic_cast<const Box*>(geometry);
-      dolfin_assert(b);
-      Exact_Polyhedron_3 P;
-      make_box(b, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      parameters = default_parameters();
     }
-    case CSGGeometry::Tetrahedron :
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3D::CSGCGALDomain3D(const mshr::CSGGeometry &csg)
+      : impl(new CSGCGALDomain3DImpl)
     {
-      const Tetrahedron* b = dynamic_cast<const Tetrahedron*>(geometry);
-      dolfin_assert(b);
-      Exact_Polyhedron_3 P;
-      make_tetrahedron(b, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      parameters = default_parameters();
+
+      if (csg.dim() != 3)
+      {
+        dolfin::dolfin_error("CSGCGALDomain3D.cpp",
+                             "Creating polyhedral domain",
+                             "Geometry has dimension %d, expected 3", csg.dim());
+      }
+
+      convert(csg, impl->p);
+
     }
-    case CSGGeometry::Ellipsoid :
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3D::CSGCGALDomain3D(const std::vector<std::array<double, 3>>& vertices,
+                                     const std::vector<std::array<std::size_t, 3>>& facets)
+     : impl(new CSGCGALDomain3DImpl)
     {
-      const Ellipsoid* b = dynamic_cast<const Ellipsoid*>(geometry);
-      dolfin_assert(b);
-      Exact_Polyhedron_3 P;
-      make_ellipsoid(b, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      parameters = default_parameters();
+
+      // Create the polyhedron
+      BuildFromFacetList<Exact_HalfedgeDS> builder(vertices, facets, {});
+      impl->p.delegate(builder);
     }
-    case CSGGeometry::Surface3D :
+    //-----------------------------------------------------------------------------
+    CSGCGALDomain3D::~CSGCGALDomain3D(){}
+    //-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::insert(const CSGCGALDomain3D& p)
     {
-      const Surface3D* b = dynamic_cast<const Surface3D*>(geometry);
-      dolfin_assert(b);
-      Exact_Polyhedron_3 P;
-      make_surface3D(b, P);
-      return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3(P));
-      break;
+      Insert_polyhedron_to<Exact_Polyhedron_3> inserter(p.impl->p);
+      impl->p.delegate(inserter);
+      CGAL_assertion(impl->p.is_valid());
     }
-    default:
-      dolfin::dolfin_error("CSGCGALDomain.cpp",
-                           "converting geometry to cgal polyhedron",
-                           "Unhandled primitive type");
-  }
-
-  // Make compiler happy.
-  return std::shared_ptr<Nef_polyhedron_3>(new Nef_polyhedron_3);
-}
-#endif
 //-----------------------------------------------------------------------------
-void convert(const CSGGeometry& geometry,
-             Exact_Polyhedron_3 &P)
-{
-  // If the tree has only one node, we don't have to convert to Nef
-  // polyhedrons for csg manipulations
-  if (!geometry.is_operator())
-  {
-    switch (geometry.getType())
+    std::size_t CSGCGALDomain3D::num_vertices() const
+    { return impl->p.size_of_vertices(); }
+//-----------------------------------------------------------------------------
+    std::size_t CSGCGALDomain3D::num_facets() const
+    { return impl->p.size_of_facets(); }
+//-----------------------------------------------------------------------------
+    std::size_t CSGCGALDomain3D::num_halfedges() const
+    { return impl->p.size_of_halfedges(); }
+//-----------------------------------------------------------------------------
+    double CSGCGALDomain3D::volume() const
     {
+      double volume = .0;
+      for (Exact_Polyhedron_3::Facet_const_iterator it = impl->p.facets_begin();
+           it != impl->p.facets_end(); it++)
+      {
+        const Exact_Polyhedron_3::Halfedge_const_handle h = it->halfedge();
+        const Vector_3 V0 = h->vertex()->point()-CGAL::ORIGIN;
+        const Vector_3 V1 = h->next()->vertex()->point()-CGAL::ORIGIN;
+        const Vector_3 V2 = h->next()->next()->vertex()->point()-CGAL::ORIGIN;
 
-    case CSGGeometry::Cylinder :
-    {
-      const Cylinder* c = dynamic_cast<const Cylinder*>(&geometry);
-      dolfin_assert(c);
-      make_cylinder(c, P);
-      break;
+        volume += CGAL::to_double(V0*CGAL::cross_product(V1, V2));
+      }
+
+      return volume/6.0;
     }
-    case CSGGeometry::Sphere :
+//-----------------------------------------------------------------------------
+  std::unique_ptr<std::vector<double>> CSGCGALDomain3D::get_vertices() const
     {
-      const Sphere* s = dynamic_cast<const Sphere*>(&geometry);
-      dolfin_assert(s);
-      make_sphere(s, P);
-      break;
+      typedef typename Exact_Polyhedron_3::Vertex_const_iterator Vertex_const_iterator;
+
+      std::unique_ptr<std::vector<double>> vertices(new std::vector<double>());
+      vertices->reserve(impl->p.size_of_vertices());
+
+      for(Vertex_const_iterator
+            vi = impl->p.vertices_begin(), end = impl->p.vertices_end();
+          vi != end ; ++vi)
+      {
+        vertices->push_back(::CGAL::to_double( vi->point().x()));
+        vertices->push_back(::CGAL::to_double( vi->point().y()));
+        vertices->push_back(::CGAL::to_double( vi->point().z()));
+      }
+
+      return vertices;
     }
-    case CSGGeometry::Box :
+//-----------------------------------------------------------------------------
+  std::unique_ptr<std::vector<std::size_t>> CSGCGALDomain3D::get_facets() const
     {
-      const Box* b = dynamic_cast<const Box*>(&geometry);
-      dolfin_assert(b);
-      make_box(b, P);
-      break;
-    }
+      typedef typename Exact_Polyhedron_3::Vertex_const_iterator Vertex_const_iterator;
+      typedef typename Exact_Polyhedron_3::Facet_const_iterator  Facet_const_iterator;
+      typedef typename Exact_Polyhedron_3::Halfedge_around_facet_const_circulator HFCC;
+
+      typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
+      Index index(impl->p.vertices_begin(), impl->p.vertices_end());
+
+      std::unique_ptr<std::vector<std::size_t>> facets(new std::vector<std::size_t>());
+      facets->reserve(impl->p.size_of_facets());
 
-    case CSGGeometry::Tetrahedron :
+      for(Facet_const_iterator
+            fi = impl->p.facets_begin(), end = impl->p.facets_end();
+          fi != end; ++fi)
+      {
+        HFCC hc = fi->facet_begin();
+        facets->push_back(index[hc->vertex()]);
+        hc++;
+        facets->push_back(index[hc->vertex()]);
+        hc++;
+        facets->push_back(index[hc->vertex()]);
+      }
+
+      return facets;
+    }
+//-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::get_points_in_holes(std::vector<dolfin::Point>& holes,
+                                              std::shared_ptr<CSGCGALDomain3DQueryStructure> q) const
     {
-      const Tetrahedron* b = dynamic_cast<const Tetrahedron*>(&geometry);
-      dolfin_assert(b);
-      make_tetrahedron(b, P);
-      break;
+      std::vector<typename Exact_Polyhedron_3::Vertex_const_handle> parts;
+      mshr::PolyhedronUtils::get_disconnected_components(impl->p,std::back_inserter(parts));
+
+      if (parts.size() > 1)
+      {
+        for (std::vector<typename Exact_Polyhedron_3::Vertex_const_handle>::const_iterator it = parts.begin();
+             it != parts.end(); it++)
+        {
+          typename Exact_Polyhedron_3::Halfedge_const_handle h = (*it)->halfedge();
+          const Exact_Point_3 x1 = h->vertex()->point();
+          const Exact_Point_3 x2 = h->next()->vertex()->point();
+          const Exact_Point_3 x3 = h->next()->next()->vertex()->point();
+          const Exact_Point_3 origin( (x1.x()+x2.x()+x3.x())/3,
+                                      (x1.y()+x2.y()+x3.y())/3,
+                                      (x1.z()+x2.z()+x3.z())/3);
+
+          Vector_3 n = CGAL::cross_product(x3-x1, x2-x1);
+
+          // shoot a ray from the facet and count the number of hits
+          Ray_3 ray(origin, n);
+
+          std::list<AABB_Tree::Object_and_primitive_id> intersections;
+          q->impl->aabb_tree.all_intersections(ray, std::back_inserter(intersections));
+          // std::cout << "Number of intersections: " << intersections.size() << std::endl;
+
+          // Collect unique intersection points not including the origin point
+          std::set<Exact_Point_3> intersection_points;
+          for (std::list<AABB_Tree::Object_and_primitive_id>::const_iterator
+                 iit = intersections.begin();
+               iit != intersections.end(); iit++)
+          {
+            if (const Exact_Point_3* p = CGAL::object_cast<Exact_Point_3>(&(iit->first)))
+            {
+              if (*p != origin)
+                intersection_points.insert(*p);
+            }
+          }
+
+          // std::cout << "Number of unique point intersections: " << intersection_points.size() << std::endl;
+          if (intersection_points.size() % 2 == 0)
+          {
+            // This is a hole
+            // Find a point strictly inside it
+
+            std::set<Exact_Point_3>::const_iterator pit = intersection_points.begin();
+            Exact_Point_3 closest_point = *pit;
+            Exact_Kernel::FT distance_to_closest = (closest_point-origin).squared_length();
+            pit++;
+
+            for (;pit != intersection_points.end(); pit++)
+            {
+              Exact_Kernel::FT d = (*pit-origin).squared_length();
+              if (d < distance_to_closest)
+              {
+                distance_to_closest = d;
+                closest_point = *pit;
+              }
+            }
+
+            const dolfin::Point h_point( (CGAL::to_double(origin.x())+CGAL::to_double(closest_point.x()))/2,
+                                         (CGAL::to_double(origin.y())+CGAL::to_double(closest_point.y()))/2,
+                                         (CGAL::to_double(origin.z())+CGAL::to_double(closest_point.z()))/2 );
+            // std::cout << "Point in hole: " << h_point << std::endl;
+            holes.push_back(h_point);
+          }
+        }
+      }
     }
-    case CSGGeometry::Ellipsoid :
+//-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::remove_degenerate_facets(double tolerance)
     {
-      const Ellipsoid* b = dynamic_cast<const Ellipsoid*>(&geometry);
-      dolfin_assert(b);
-      make_ellipsoid(b, P);
-      break;
+      remove_degenerate(impl->p, tolerance);
     }
-    case CSGGeometry::Surface3D :
+//-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::ensure_meshing_preconditions()
     {
-      const Surface3D* b = dynamic_cast<const Surface3D*>(&geometry);
-      dolfin_assert(b);
-      make_surface3D(b, P);
-      break;
+      if (!impl->p.is_valid())
+        dolfin::dolfin_error("CSGCGDomain3D.cpp",
+                             "Checking meshing preconditions",
+                             "Polyhedron is not valid");
+
+      if (parameters["remove_degenerate"])
+        remove_degenerate_facets(parameters["degenerate_tolerance"]);
     }
-    default:
-      dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                   "converting geometry to cgal polyhedron",
-                   "Unhandled primitive type");
+//-----------------------------------------------------------------------------
+    std::shared_ptr<CSGCGALDomain3DQueryStructure> CSGCGALDomain3D::get_query_structure() const
+    {
+      std::unique_ptr<CSGCGALDomain3DQueryStructureImpl> i(new CSGCGALDomain3DQueryStructureImpl(faces(impl->p).first,
+                                                                                                 faces(impl->p).second,
+                                                                                                 impl->p));
+      return std::shared_ptr<CSGCGALDomain3DQueryStructure>(new CSGCGALDomain3DQueryStructure(std::move(i)));
     }
-  }
-  else
-  {
-    #ifdef MSHR_ENABLE_EXPERIMENTAL
-    convertSubTree(&geometry, P);
-    #else
-    log(dolfin::TRACE, "Convert to nef polyhedron");
-    std::shared_ptr<Nef_polyhedron_3> cgal_geometry
-      = convertSubTree(&geometry);
-    dolfin_assert(cgal_geometry->is_valid());
-    dolfin_assert(cgal_geometry->is_simple());
-    cgal_geometry->convert_to_polyhedron(P);
-    #endif
-  }
+//-----------------------------------------------------------------------------
+    bool CSGCGALDomain3D::is_insideout() const
+    {
+      typedef Exact_Kernel::Ray_3 Exact_Ray_3;
 
-  if (P.size_of_facets() == 0)
-    dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                         "Convert geometry to polyhedron",
-                         "Geometry contains no facet");
+      // Pick a point on a facet a. Shoot in the direction of the normal and count
+      // the number of distinct hits (if the ray hit an edge, the same intersection
+      // point will hit sevel facets). Excluding the hit on facet a the number
+      // should be even for the polyhedron to be bounded.
+      // TODO: Take QueryStructure argument.
+      Exact_Polyhedron_3::Facet_iterator f = impl->p.facets_begin();
 
-  log(dolfin::TRACE, "Number of vertices: %d",  P.size_of_vertices());
-  log(dolfin::TRACE, "Number of facets: %d", P.size_of_facets());
-}
-} //end unnamed namespace
+      Exact_Ray_3 ray;
 
+      {
+        Exact_Polyhedron_3::Halfedge_handle h = f->halfedge();
+        Exact_Triangle_3 t(h->vertex()->point(),
+                           h->next()->vertex()->point(),
+                           h->next()->next()->vertex()->point());
+        f++;
 
-namespace mshr
-{
+        //Compute the ray
+        Exact_Vector_3 normal = CGAL::normal(t.vertex(0), t.vertex(1), t.vertex(2));
+        Exact_Point_3  mid    = CGAL::centroid(t);
 
-struct CSGCGALDomain3DImpl
-{
-  Exact_Polyhedron_3 p;
-};
-//-----------------------------------------------------------------------------
-struct CSGCGALDomain3DQueryStructureImpl
-{
-  template <typename A>
-  CSGCGALDomain3DQueryStructureImpl(A start, A end, const Exact_Polyhedron_3& p)
-    : aabb_tree(start, end, p){}
+        ray = Exact_Ray_3(mid, normal);
+      }
 
-  AABB_Tree aabb_tree;
-};
-//-----------------------------------------------------------------------------
-CSGCGALDomain3DQueryStructure::CSGCGALDomain3DQueryStructure(std::unique_ptr<CSGCGALDomain3DQueryStructureImpl> impl)
-  : impl(std::move(impl))
-{}
-//-----------------------------------------------------------------------------
-CSGCGALDomain3DQueryStructure::~CSGCGALDomain3DQueryStructure(){}
-//-----------------------------------------------------------------------------
-CSGCGALDomain3D::CSGCGALDomain3D()
-: impl(new CSGCGALDomain3DImpl)
-{
-  parameters = default_parameters();
-}
-//-----------------------------------------------------------------------------
-CSGCGALDomain3D::CSGCGALDomain3D(const mshr::CSGGeometry &csg)
-: impl(new CSGCGALDomain3DImpl)
-{
-  parameters = default_parameters();
+      // Collect the points to avoid double hits on facets.
+      std::set<Exact_Point_3> points;
+      for (; f != impl->p.facets_end(); ++f)
+      {
+        Exact_Polyhedron_3::Halfedge_handle h = f->halfedge();
+        Exact_Triangle_3 t(h->vertex()->point(),
+                           h->next()->vertex()->point(),
+                           h->next()->next()->vertex()->point());
 
-  if (csg.dim() != 3)
-    dolfin::dolfin_error("CSGCGALDomain3D.cpp",
-                         "Creating polyhedral domain",
-                         "Geometry has dimension %d, expected 3", csg.dim());
 
-  convert(csg,
-          impl->p);
+        auto result = intersection(t, ray);
+        if(result)
+        {
+          if (const Exact_Point_3* p = boost::get<Exact_Point_3>(&*result))
+          {
+            points.insert(*p);
+          }
+        }
+      }
 
-}
-//-----------------------------------------------------------------------------
-CSGCGALDomain3D::~CSGCGALDomain3D(){}
-//-----------------------------------------------------------------------------
-std::size_t CSGCGALDomain3D::num_vertices() const 
-{ return impl->p.size_of_vertices(); }
+      // std::cout << "Number of intersections: " << points.size() << std::endl;
+      return points.size() % 2 != 0;
+    }
 //-----------------------------------------------------------------------------
-std::size_t CSGCGALDomain3D::num_facets() const 
-{ return impl->p.size_of_facets(); }
+    bool CSGCGALDomain3D::is_selfintersecting(bool verbose) const
+    {
+      if (verbose)
+      {
+        const std::string s = PolyhedronUtils::list_self_intersections(impl->p);
+        if (s != "")
+        {
+          dolfin::cout << s;
+          return true;
+        }
+        else
+        {
+          return false;
+        }
+      }
+      else
+      {
+        return CGAL::Polygon_mesh_processing::does_self_intersect(impl->p);
+      }
+    }
 //-----------------------------------------------------------------------------
-std::size_t CSGCGALDomain3D::num_halfedges() const 
-{ return impl->p.size_of_halfedges(); }
+    std::size_t CSGCGALDomain3D::num_degenerate_facets(double threshold) const
+    {
+      return number_of_degenerate_facets(impl->p, threshold);
+    }
 //-----------------------------------------------------------------------------
-double CSGCGALDomain3D::volume() const
-{
-  double volume = .0;
-  for (Exact_Polyhedron_3::Facet_iterator it = impl->p.facets_begin();
-       it != impl->p.facets_end(); it++)
-  {
-    const Exact_Polyhedron_3::Halfedge_handle h = it->halfedge();
-    const Vector_3 V0 = h->vertex()->point()-CGAL::ORIGIN;
-    const Vector_3 V1 = h->next()->vertex()->point()-CGAL::ORIGIN;
-    const Vector_3 V2 = h->next()->next()->vertex()->point()-CGAL::ORIGIN;
-
-    volume += CGAL::to_double(V0*CGAL::cross_product(V1, V2));
-  }
+    void CSGCGALDomain3D::save_off(std::string filename) const
+    {
+      {
+        std::string message = "Writing to file: "+filename;
+        log(dolfin::TRACE, message);
+      }
 
-  return volume/6.0;
-}
+      std::ofstream outfile(filename.c_str());
+      outfile << std::setprecision(16);
+
+      outfile << impl->p;
+
+      // std::map<Exact_Polyhedron_3::Vertex_const_handle, std::size_t> vertex_map;
+      // std::size_t vertex_counter = 0;
+
+      // // Write header
+      // outfile << "OFF " << std::endl << impl->p.size_of_vertices() << " " << impl->p.size_of_facets() << " 0" << std::endl << std::endl;
+
+      // // Write vertices
+      // for (Exact_Polyhedron_3::Vertex_const_iterator vit = impl->p.vertices_begin(); vit != impl->p.vertices_end(); vit++)
+      // {
+      //   vertex_map[vit] = vertex_counter;
+      //   outfile << std::fixed << std::setprecision(16) << CGAL::to_double(vit->point().x()) << " "
+      //           << CGAL::to_double(vit->point().y()) << " "
+      //           << CGAL::to_double(vit->point().z()) << std::endl;
+      //   vertex_counter++;
+      // }
+
+      // for (Exact_Polyhedron_3::Facet_const_iterator fit = impl->p.facets_begin(); fit != impl->p.facets_end(); fit++)
+      // {
+      //   Exact_Polyhedron_3::Halfedge_const_iterator h = fit->halfedge();
+      //   outfile << "3";
+      //   outfile << vertex_map[h->vertex()] << " "
+      //           << vertex_map[h->next()->vertex()] << " "
+      //           << vertex_map[h->next()->next()->vertex()] << std::endl;
+      // }
+
+      outfile.close();
+    }
 //-----------------------------------------------------------------------------
-void CSGCGALDomain3D::get_vertices(std::vector<dolfin::Point> &v) const
-{
-  typedef typename Exact_Polyhedron_3::Vertex_const_iterator Vertex_const_iterator;
+    double CSGCGALDomain3D::shortest_edge() const
+    {
+      Exact_Polyhedron_3::Edge_const_iterator it = impl->p.edges_begin();
+      Exact_Kernel::FT shortest = (it->vertex()->point() - it->opposite()->vertex()->point()).squared_length();
 
-  v.reserve(impl->p.size_of_vertices());
-  
-  for(Vertex_const_iterator
-        vi = impl->p.vertices_begin(), end = impl->p.vertices_end();
-      vi != end ; ++vi)
-  {
-    v.push_back(dolfin::Point(::CGAL::to_double( vi->point().x()),
-                              ::CGAL::to_double( vi->point().y()),
-                              ::CGAL::to_double( vi->point().z())));
-  }
-}
-//-----------------------------------------------------------------------------
-void CSGCGALDomain3D::get_facets(std::vector< std::array<std::size_t, 3> > &f) const
-{
-  typedef typename Exact_Polyhedron_3::Vertex_const_iterator Vertex_const_iterator;
-  typedef typename Exact_Polyhedron_3::Facet_const_iterator  Facet_const_iterator;
-  typedef typename Exact_Polyhedron_3::Halfedge_around_facet_const_circulator HFCC;
 
-  typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
-  Index index(impl->p.vertices_begin(), impl->p.vertices_end());
+      for (; it != impl->p.edges_end(); it++)
+      {
+        const Exact_Kernel::FT l = (it->vertex()->point() - it->opposite()->vertex()->point()).squared_length();
+        if (l < shortest)
+          shortest = l;
+      }
 
-  for(Facet_const_iterator
-        fi = impl->p.facets_begin(), end = impl->p.facets_end();
-      fi != end; ++fi)
-  {
-    f.push_back(std::array<std::size_t, 3>());
-    std::array<std::size_t, 3> &v = f.back();
-
-    HFCC hc = fi->facet_begin();
-    v[0] = index[hc->vertex()];
-    hc++;
-    v[1] = index[hc->vertex()];
-    hc++;
-    v[2] = index[hc->vertex()];
-  }
-}
+      return CGAL::to_double(shortest);
+    }
 //-----------------------------------------------------------------------------
-void CSGCGALDomain3D::get_points_in_holes(std::vector<dolfin::Point>& holes,
-                                          std::shared_ptr<CSGCGALDomain3DQueryStructure> q) const
-{
-  std::vector<typename Exact_Polyhedron_3::Vertex_const_handle> parts;
-  get_disconnected_components(impl->p,std::back_inserter(parts));
+    std::size_t CSGCGALDomain3D::num_short_edges(double tolerance) const
+    {
+      std::size_t count = 0;
+      for (Exact_Polyhedron_3::Edge_const_iterator it = impl->p.edges_begin(); it != impl->p.edges_end(); it++)
+      {
+        const Exact_Kernel::FT l = (it->vertex()->point() - it->opposite()->vertex()->point()).squared_length();
+        if (l < tolerance)
+          count++;
+      }
 
-  for (std::vector<typename Exact_Polyhedron_3::Vertex_const_handle>::const_iterator it = parts.begin();
-       it != parts.end(); it++)
-  {
-    typename Exact_Polyhedron_3::Halfedge_const_handle h = (*it)->halfedge();
-    const Exact_Point_3 x1 = h->vertex()->point();
-    const Exact_Point_3 x2 = h->next()->vertex()->point();
-    const Exact_Point_3 x3 = h->next()->next()->vertex()->point();
-    const Exact_Point_3 origin( (x1.x()+x2.x()+x3.x())/3,
-                                (x1.y()+x2.y()+x3.y())/3,
-                                (x1.z()+x2.z()+x3.z())/3);
-
-    Vector_3 n = CGAL::cross_product(x3-x1, x2-x1);
-
-    // shoot a ray from the facet and count the number of hits
-    Ray_3 ray(origin, n);
-
-    std::list<AABB_Tree::Object_and_primitive_id> intersections;
-    q->impl->aabb_tree.all_intersections(ray, std::back_inserter(intersections));
-    // std::cout << "Number of intersections: " << intersections.size() << std::endl;
-
-    // Collect unique intersection points not including the origin point
-    std::set<Exact_Point_3> intersection_points;
-    for (std::list<AABB_Tree::Object_and_primitive_id>::const_iterator
-           iit = intersections.begin();
-         iit != intersections.end(); iit++)
+      return count;
+    }
+//-----------------------------------------------------------------------------
+    std::string CSGCGALDomain3D::str(bool verbose) const
     {
-      if (const Exact_Point_3* p = CGAL::object_cast<Exact_Point_3>(&(iit->first)))
+      std::stringstream ss;
+      ss << "Triangular polyhedron with" << std::endl;
+      ss << "  " << num_vertices() << " vertices," << std::endl;
+      ss << "  " << num_facets() << " facets," << std::endl;
+      ss << "  " << num_halfedges() << " halfedges." << std::endl;
+
+      if (verbose)
       {
-        if (*p != origin)
-          intersection_points.insert(*p);
+        ss << "Volume: " << volume() << std::endl;
+        ss << "Shortest edge: " << shortest_edge() << std::endl;
+        ss << "Degenerate facets: " << num_degenerate_facets(1e-12) << std::endl;
+        ss << "Is inside out:        " << (is_insideout() ? "Yes" : "No") << std::endl;
+        ss << "Is self-intersecting: " << (is_selfintersecting() ? "Yes" : "No");
       }
+
+      return ss.str();
+    }
+//-----------------------------------------------------------------------------
+    std::shared_ptr<CSGCGALDomain3D> CSGCGALDomain3D::convex_hull() const
+    {
+      std::shared_ptr<CSGCGALDomain3D> res(new CSGCGALDomain3D);
+      CGAL::convex_hull_3(impl->p.points_begin(), impl->p.points_end(), res->impl->p);
+
+      return res;
     }
+  //-----------------------------------------------------------------------------
+    std::shared_ptr<CSGCGALDomain3D> CSGCGALDomain3D::convex_hull(const std::vector<std::array<double, 3>>& point_set)
+    {
+      std::vector<Exact_Point_3> points;
+      points.reserve(point_set.size());
+      for (const std::array<double,3>& p : point_set)
+        points.push_back(Exact_Point_3(p[0], p[1], p[2]));
+
+      std::shared_ptr<CSGCGALDomain3D> res(new CSGCGALDomain3D);
+      CGAL::convex_hull_3(points.begin(),
+                          points.end(),
+                          res->impl->p);
 
-    // std::cout << "Number of unique point intersections: " << intersection_points.size() << std::endl;
-    if (intersection_points.size() % 2 == 0)
+      return res;
+    }
+//-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::filter_facets(dolfin::Point start,
+                                        double threshold,
+                                        std::shared_ptr<CSGCGALDomain3DQueryStructure> q)
     {
-      // This is a hole
-      // Find a point strictly inside it
+      std::cout << "Filtering facets" << std::endl;
 
-      std::set<Exact_Point_3>::const_iterator pit = intersection_points.begin();
-      Exact_Point_3 closest_point = *pit;
-      Exact_Kernel::FT distance_to_closest = (closest_point-origin).squared_length();
-      pit++;
+      typedef AABB_Tree::Point_and_primitive_id Point_and_primitive_id;
+      typedef Exact_Polyhedron_3::Face_handle Face_handle;
+      typedef Exact_Polyhedron_3::Halfedge_handle Halfedge_handle;
+      Exact_Point_3 query_point(start[0], start[1], start[2]);
+      Point_and_primitive_id pp = q->impl->aabb_tree.closest_point_and_primitive(query_point);
+      std::cout << "Closest point: " << pp.first << std::endl;
 
-      for (;pit != intersection_points.end(); pit++)
+      const double cos_threshold = cos(threshold);
+
+      std::set<Face_handle> to_be_removed;
       {
-        Exact_Kernel::FT d = (*pit-origin).squared_length();
-        if (d < distance_to_closest)
+        std::deque<Face_handle> queue;
+        queue.push_back(pp.second);
+
+        while (!queue.empty())
         {
-          distance_to_closest = d;
-          closest_point = *pit;
+          Face_handle f = queue.front();
+          queue.pop_front();
+
+          if (to_be_removed.count(f) > 0)
+            continue;
+
+          to_be_removed.insert(f);
+
+          const Halfedge_handle start = f->halfedge();
+          Halfedge_handle c = start;
+          const Exact_Triangle_3 f_triangle = PolyhedronUtils::get_facet_triangle<Exact_Polyhedron_3>(f->halfedge());
+          do
+          {
+            Halfedge_handle current = c;
+            c = c->next();
+
+            if (current->is_border_edge())
+              continue;
+
+            Face_handle f2 = current->opposite()->facet();
+            if (PolyhedronUtils::get_triangle_cos_angle<Exact_Triangle_3>(f_triangle,
+                                                                          PolyhedronUtils::get_facet_triangle<Exact_Polyhedron_3>(f2->halfedge())) > cos_threshold &&
+                to_be_removed.count(f2) == 0)
+            {
+              queue.push_back(f2);
+            }
+
+          } while (c != start);
         }
       }
 
-      const dolfin::Point h_point( (CGAL::to_double(origin.x())+CGAL::to_double(closest_point.x()))/2,
-                                   (CGAL::to_double(origin.y())+CGAL::to_double(closest_point.y()))/2,
-                                   (CGAL::to_double(origin.z())+CGAL::to_double(closest_point.z()))/2 );
-      // std::cout << "Point in hole: " << h_point << std::endl;
-      holes.push_back(h_point);
+      std::cout << "Removing " << to_be_removed.size() << " facets" << std::endl;
+
+      for (auto fit = to_be_removed.begin(); fit != to_be_removed.end(); fit++)
+      {
+        impl->p.erase_facet((*fit)->halfedge());
+      }
+
+      dolfin_assert(impl->p.is_valid());
     }
-  }
-}
 //-----------------------------------------------------------------------------
-void CSGCGALDomain3D::remove_degenerate_facets(double tolerance) 
-{
-  remove_degenerate(impl->p, tolerance);
-}
+    void CSGCGALDomain3D::inside_out()
+    {
+      dolfin_assert(impl->p.is_valid());
+      impl->p.inside_out();
+    }
 //-----------------------------------------------------------------------------
-void CSGCGALDomain3D::ensure_meshing_preconditions()
-{
-  if (!impl->p.is_valid())
-    dolfin::dolfin_error("CSGCGDomain3D.cpp",
-                         "Checking meshing preconditions",
-                         "Polyhedron is not valid");
+    std::size_t CSGCGALDomain3D::num_holes() const
+    {
+      impl->p.normalize_border();
 
-  if (parameters["remove_degenerate"])
-    remove_degenerate_facets(parameters["degenerate_tolerance"]);
-}
-//-----------------------------------------------------------------------------
-std::shared_ptr<CSGCGALDomain3DQueryStructure> CSGCGALDomain3D::get_query_structure() const
-{
-  std::unique_ptr<CSGCGALDomain3DQueryStructureImpl> i(new CSGCGALDomain3DQueryStructureImpl(faces(impl->p).first,
-                                                                                             faces(impl->p).second,
-                                                                                             impl->p));
-  return std::shared_ptr<CSGCGALDomain3DQueryStructure>(new CSGCGALDomain3DQueryStructure(std::move(i)));
-}
-//-----------------------------------------------------------------------------
-bool CSGCGALDomain3D::is_insideout() const
-{
-  typedef Exact_Kernel::Ray_3 Exact_Ray_3;
+      dolfin_assert(impl->p.is_valid(false, 0));
+
+      const std::vector<Exact_Polyhedron_3::Halfedge_handle> holes = PolyhedronUtils::get_holes(impl->p);
+      return holes.size();
+    }
+    //-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::close_hole(std::size_t hole)
+    {
+      dolfin::warning("Hole closing is an experimental feature");
+      dolfin_assert(impl->p.is_valid(false, 0));
+      impl->p.normalize_border();
 
-  // Pick a point on a facet a. Shoot in the direction of the normal and count
-  // the number of distinct hits (if the ray hit an edge, the same intersection
-  // point will hit sevel facets). Excluding the hit on facet a the number
-  // should be even for the polyhedron to be bounded.
-  // TODO: Take QueryStructure argument.
-  Exact_Polyhedron_3::Facet_iterator f = impl->p.facets_begin();
+      const std::vector<Exact_Polyhedron_3::Halfedge_handle> holes = PolyhedronUtils::get_holes(impl->p);
 
-  Exact_Ray_3 ray;
+      PolyhedronUtils::close_hole(impl->p,
+                                  holes[hole]);
+      impl->p.normalize_border();
 
-  {
-    Exact_Polyhedron_3::Halfedge_handle h = f->halfedge();
-    Exact_Triangle_3 t(h->vertex()->point(),
-                       h->next()->vertex()->point(),
-                       h->next()->next()->vertex()->point());
-    f++;
+      dolfin_assert(impl->p.is_valid(false, 0));
+      dolfin_assert(impl->p.is_pure_triangle());
+    }
+    //-----------------------------------------------------------------------------
+    void CSGCGALDomain3D::close_holes()
+    {
+      dolfin::warning("Hole closing is an experimental feature");
 
-    //Compute the ray
-    Exact_Vector_3 normal = CGAL::normal(t.vertex(0), t.vertex(1), t.vertex(2));
-    Exact_Point_3  mid    = CGAL::centroid(t);
+      const std::vector<Exact_Polyhedron_3::Halfedge_handle> holes = PolyhedronUtils::get_holes(impl->p);
 
-    ray = Exact_Ray_3(mid, normal);
-  }
+      std::size_t counter = 0;
+      for (const Exact_Polyhedron_3::Halfedge_handle h : holes)
+      {
+        // save_off("not_intersecting.off");
+        PolyhedronUtils::close_hole(impl->p, h);
+
+        counter++;
 
-  // Collect the points to avoid double hits on facets.
-  std::set<Exact_Point_3> points;
-  for (; f != impl->p.facets_end(); ++f)
+        dolfin_assert(impl->p.is_valid(false, 0));
+        dolfin_assert(impl->p.is_pure_triangle());
+      }
+
+      dolfin_assert(impl->p.is_closed());
+    }
+  //-----------------------------------------------------------------------------
+  std::shared_ptr<CSGCGALDomain3D> CSGCGALDomain3D::reconstruct_surface() const
   {
-    Exact_Polyhedron_3::Halfedge_handle h = f->halfedge();
-    Exact_Triangle_3 t(h->vertex()->point(),
-                       h->next()->vertex()->point(),
-                       h->next()->next()->vertex()->point());
+    std::vector<std::array<double, 3>> new_vertices;
+    std::vector<std::array<std::size_t, 3>> new_facets;
 
+    {
+      std::unique_ptr<const std::vector<double>> vertices = get_vertices();
+      std::unique_ptr<const std::vector<std::size_t>> facets = get_facets();
+
+      SurfaceReconstruction::reconstruct(*vertices, *facets,
+                                         new_vertices, new_facets);
+    }
 
-    auto result = intersection(t, ray);
-    if(result)
+    return std::shared_ptr<CSGCGALDomain3D>(new CSGCGALDomain3D(new_vertices,
+                                                                new_facets));
+  }
+  //-----------------------------------------------------------------------------
+  std::size_t CSGCGALDomain3D::remove_selfintersections()
+  {
+    return PolyhedronUtils::remove_self_intersections(impl->p);
+  }
+  //-----------------------------------------------------------------------------
+  void CSGCGALDomain3D::smooth_taubin(std::size_t iterations)
+  {
+    for (std::size_t i = 0; i < iterations; i++)
     {
-      if (const Exact_Point_3* p = boost::get<Exact_Point_3>(&*result))
-      {
-        points.insert(*p);
-      }
+      LaplacianSmoothing::smooth(impl->p, .8);
+      LaplacianSmoothing::smooth(impl->p, -.805);
     }
   }
-
-  // std::cout << "Number of intersections: " << points.size() << std::endl;
-  return points.size() % 2 != 0;
-}
-//-----------------------------------------------------------------------------
-bool CSGCGALDomain3D::is_selfintersecting() const
-{
-  return CGAL::self_intersect<Exact_Kernel, Exact_Polyhedron_3>(impl->p);
-}
-//-----------------------------------------------------------------------------
-std::size_t CSGCGALDomain3D::num_degenerate_facets(double threshold) const
-{
-  return number_of_degenerate_facets(impl->p, threshold);
-}
-//-----------------------------------------------------------------------------
-void CSGCGALDomain3D::save_off(std::string filename) const
-{
+  //-----------------------------------------------------------------------------
+  void CSGCGALDomain3D::smooth_laplacian(double c)
   {
-    std::string message = "Writing to file: "+filename;
-    log(dolfin::TRACE, message);
+    LaplacianSmoothing::smooth(impl->p, c);
   }
-
-  std::ofstream outfile(filename.c_str());
-  // outfile.precision(16);
-
-  outfile << impl->p;
-
-  // std::map<Exact_Polyhedron_3::Vertex_const_handle, std::size_t> vertex_map;
-  // std::size_t vertex_counter = 0;
-
-  // // Write header
-  // outfile << "OFF " << std::endl << impl->p.size_of_vertices() << " " << impl->p.size_of_facets() << " 0" << std::endl << std::endl;
-
-  // // Write vertices
-  // for (Exact_Polyhedron_3::Vertex_const_iterator vit = impl->p.vertices_begin(); vit != impl->p.vertices_end(); vit++)
-  // {
-  //   vertex_map[vit] = vertex_counter;
-  //   outfile << std::fixed << std::setprecision(16) << CGAL::to_double(vit->point().x()) << " "
-  //           << CGAL::to_double(vit->point().y()) << " "
-  //           << CGAL::to_double(vit->point().z()) << std::endl;
-  //   vertex_counter++;
-  // }
-
-  // for (Exact_Polyhedron_3::Facet_const_iterator fit = impl->p.facets_begin(); fit != impl->p.facets_end(); fit++)
-  // {
-  //   Exact_Polyhedron_3::Halfedge_const_iterator h = fit->halfedge();
-  //   outfile << "3";
-  //   outfile << vertex_map[h->vertex()] << " "
-  //           << vertex_map[h->next()->vertex()] << " "
-  //           << vertex_map[h->next()->next()->vertex()] << std::endl;
-  // }
-
-  outfile.close();
-}
-//-----------------------------------------------------------------------------
-double CSGCGALDomain3D::shortest_edge() const
-{
-  Exact_Polyhedron_3::Edge_const_iterator it = impl->p.edges_begin();
-  Exact_Kernel::FT shortest = (it->vertex()->point() - it->opposite()->vertex()->point()).squared_length();
-
-
-  for (; it != impl->p.edges_end(); it++)
+  //-----------------------------------------------------------------------------
+  double CSGCGALDomain3D::sharpest_edge() const
   {
-    const Exact_Kernel::FT l = (it->vertex()->point() - it->opposite()->vertex()->point()).squared_length();
-    if (l < shortest)
-      shortest = l;
+    return PolyhedronUtils::sharpest_edge(impl->p);
   }
-
-  return CGAL::to_double(shortest);
-}
-//-----------------------------------------------------------------------------
-std::string CSGCGALDomain3D::str(bool verbose) const
-{
-  std::stringstream ss;
-  ss << "Triangular polyhedron with" << std::endl;
-  ss << "  " << num_vertices() << " vertices," << std::endl;
-  ss << "  " << num_facets() << " facets," << std::endl;
-  ss << "  " << num_halfedges() << " halfedges." << std::endl;
-
-  if (verbose)
+  //-----------------------------------------------------------------------------
+  std::size_t CSGCGALDomain3D::num_sharp_edges(double tolerance) const
   {
-    ss << "Volume: " << volume() << std::endl;
-    ss << "Shortest edge: " << shortest_edge() << std::endl;
-    ss << "Degenerate facets: " << num_degenerate_facets(1e-12) << std::endl;
-    ss << "Is inside out:        " << (is_insideout() ? "Yes" : "No") << std::endl;
-    ss << "Is self-intersecting: " << (is_selfintersecting() ? "Yes" : "No");
+    return 0;
   }
-
-  return ss.str();
-}
+  //-----------------------------------------------------------------------------
+  std::size_t CSGCGALDomain3D::num_disconnected_components() const
+  {
+    std::vector<typename Exact_Polyhedron_3::Vertex_const_handle> parts;
+    mshr::PolyhedronUtils::get_disconnected_components(impl->p, std::back_inserter(parts));
+    return parts.size();
+  }
+  //-----------------------------------------------------------------------------
+  std::size_t CSGCGALDomain3D::keep_largest_components(std::size_t n)
+  {
+    return impl->p.keep_largest_connected_components(static_cast<unsigned int>(n));
+  }
+  //-----------------------------------------------------------------------------
+  std::pair<dolfin::Point, dolfin::Point> CSGCGALDomain3D::get_aabb() const
+  {
+    std::pair<Exact_Point_3, Exact_Point_3> aabb = PolyhedronUtils::get_aabb(impl->p);
+    auto res = std::make_pair(dolfin::Point(CGAL::to_double(aabb.first[0]),
+                                            CGAL::to_double(aabb.first[1]),
+                                            CGAL::to_double(aabb.first[2])),
+                              dolfin::Point(CGAL::to_double(aabb.second[0]),
+                                            CGAL::to_double(aabb.second[1]),
+                                            CGAL::to_double(aabb.second[2])));
+    return res;
+  }
+  //-----------------------------------------------------------------------------
+  void CSGCGALDomain3D::refine_center_vertex()
+  {
+    PolyhedronUtils::center_vertex_refinement(impl->p);
+  }
+  //-----------------------------------------------------------------------------
+  void CSGCGALDomain3D::refine_edge_split()
+  {
+    PolyhedronUtils::split_edge_refinement(impl->p);
+  }
+  //-----------------------------------------------------------------------------
 } // end namespace mshr
diff --git a/src/CSGCGALMeshGenerator2D.cpp b/src/CSGCGALMeshGenerator2D.cpp
index 8e6244f..c7757b5 100644
--- a/src/CSGCGALMeshGenerator2D.cpp
+++ b/src/CSGCGALMeshGenerator2D.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Johannes Ring, 2012-2014 Benjamin Kehlet
+// Copyright (C) 2012 Johannes Ring, 2012-2016 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -19,6 +19,7 @@
 #include <vector>
 #include <cmath>
 #include <limits>
+#include <fstream>
 
 #include <CGAL/compiler_config.h>
 #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
@@ -47,65 +48,16 @@
 #include <mshr/CSGCGALDomain2D.h>
 
 
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Inexact_Kernel;
-//typedef CGAL::Exact_predicates_exact_constructions_kernel Inexact_Kernel;
-
-typedef CGAL::Triangulation_vertex_base_2<Inexact_Kernel>  Vertex_base;
-typedef CGAL::Delaunay_mesh_face_base_2<Inexact_Kernel> Face_base;
-
-template <class Gt, class Fb >
-class Enriched_face_base_2 : public Fb
-{
- public:
-  typedef Gt Geom_traits;
-  typedef typename Fb::Vertex_handle Vertex_handle;
-  typedef typename Fb::Face_handle Face_handle;
-
-  template <typename TDS2>
-  struct Rebind_TDS
-  {
-    typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
-    typedef Enriched_face_base_2<Gt,Fb2> Other;
-  };
-
-protected:
-  int c;
-
-public:
-  Enriched_face_base_2(): Fb(), c(-1) {}
-
-  Enriched_face_base_2(Vertex_handle v0,
-                       Vertex_handle v1,
-                       Vertex_handle v2)
-    : Fb(v0,v1,v2), c(-1) {}
-
-  Enriched_face_base_2(Vertex_handle v0,
-                       Vertex_handle v1,
-                       Vertex_handle v2,
-                       Face_handle n0,
-                       Face_handle n1,
-                       Face_handle n2)
-    : Fb(v0,v1,v2,n0,n1,n2), c(-1) {}
-
-  inline void set_counter(int i) { c = i; }
-  inline int counter() const { return c; }
-};
-
-typedef CGAL::Triangulation_vertex_base_2<Inexact_Kernel> Vb;
-typedef CGAL::Triangulation_vertex_base_with_info_2<std::size_t, Inexact_Kernel, Vb> Vbb;
-typedef Enriched_face_base_2<Inexact_Kernel, Face_base> Fb;
-typedef CGAL::Triangulation_data_structure_2<Vbb, Fb> TDS;
-// typedef CGAL::Triangulation_data_structure_2<Vbb, Face_base> TDS;
-typedef CGAL::Exact_predicates_tag Itag;
-typedef CGAL::Constrained_Delaunay_triangulation_2<Inexact_Kernel, TDS, Itag> CDT;
-///typedef CGAL::Constrained_Delaunay_triangulation_2<Inexact_Kernel, TDS> CDT;
-typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Mesh_criteria_2;
-typedef CGAL::Delaunay_mesher_2<CDT, Mesh_criteria_2> CGAL_Mesher_2;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel             Inexact_Kernel;
+typedef CGAL::Triangulation_vertex_base_2<Inexact_Kernel>               Vertex_base;
+typedef CGAL::Delaunay_mesh_face_base_2<Inexact_Kernel>                 Face_base;
+typedef CGAL::Triangulation_data_structure_2<Vertex_base, Face_base>    TDS;
+typedef CGAL::Constrained_Delaunay_triangulation_2<Inexact_Kernel, TDS> CDT;
+typedef CGAL::Delaunay_mesh_size_criteria_2<CDT>                        Mesh_criteria_2;
+typedef CGAL::Delaunay_mesher_2<CDT, Mesh_criteria_2>                   CGAL_Mesher_2;
 
 typedef CDT::Vertex_handle Vertex_handle;
 typedef CDT::Face_handle Face_handle;
-typedef CDT::All_faces_iterator All_faces_iterator;
-
 typedef Inexact_Kernel::Point_2 Point_2;
 
 namespace mshr
@@ -119,147 +71,89 @@ CSGCGALMeshGenerator2D::CSGCGALMeshGenerator2D()
 //-----------------------------------------------------------------------------
 CSGCGALMeshGenerator2D::~CSGCGALMeshGenerator2D() {}
 //-----------------------------------------------------------------------------
-void explore_subdomain(CDT &ct,
-                       CDT::Face_handle start,
-                       std::list<CDT::Face_handle>& other_domains)
+void explore_subdomain(const CDT& cdt,
+                       Face_handle f,
+                       std::size_t marker,
+                       std::map<Face_handle, unsigned int>& subdomain_map,
+                       std::set<Face_handle>& not_visited)
 {
-  std::list<Face_handle> queue;
-  queue.push_back(start);
+  std::deque<Face_handle> queue;
+  queue.push_back(f);
 
   while (!queue.empty())
   {
     CDT::Face_handle face = queue.front();
     queue.pop_front();
 
-    for(int i = 0; i < 3; i++)
+    std::set<Face_handle>::iterator face_not_visited = not_visited.find(face);
+    if (face_not_visited != not_visited.end())
     {
-      Face_handle n = face->neighbor(i);
-      if (ct.is_infinite(n))
-        continue;
-
-      const CDT::Edge e(face,i);
+      dolfin_assert(subdomain_map.find(face) == subdomain_map.end());
+      not_visited.erase(face_not_visited);
+      subdomain_map[face] = marker;
 
-      if (n->counter() == -1)
+      for(int i = 0; i < 3; i++)
       {
-        if (ct.is_constrained(e))
-        {
-          // Reached a border
-          other_domains.push_back(n);
-        } 
-        else
-        {
-          // Set neighbor interface to the same and push to queue
-          n->set_counter(face->counter());
-          queue.push_back(n);
-        }
+        const CDT::Edge e(face,i);
+        if (!cdt.is_constrained(e))
+          queue.push_back(face->neighbor(i));
       }
     }
   }
 }
 //-----------------------------------------------------------------------------
 // Set the member in_domain and counter for all faces in the cdt
-void explore_subdomains(CDT& cdt,
-                        const CSGCGALDomain2D& total_domain,
-                        const std::vector<std::pair<std::size_t,
-                        CSGCGALDomain2D> > &subdomain_geometries)
+std::map<Face_handle, unsigned int>
+  explore_subdomains(const CDT& cdt,
+                     const CSGCGALDomain2D& total_domain,
+                     const std::vector<std::pair<std::size_t, CSGCGALDomain2D>>&
+                       subdomain_geometries)
 {
-  // Set counter to -1 for all faces
-  for (CDT::Finite_faces_iterator it = cdt.finite_faces_begin();
-       it != cdt.finite_faces_end(); ++it)
+  std::set<Face_handle> not_visited;
+
+  for(CDT::Finite_faces_iterator fit = cdt.finite_faces_begin();
+        fit != cdt.finite_faces_end(); ++fit)
   {
-    it->set_counter(-1);
+    if (fit->is_in_domain())
+      not_visited.insert(fit);
   }
 
-  std::list<CDT::Face_handle> subdomains;
-  subdomains.push_back(cdt.finite_faces_begin());
+  std::map<Face_handle, unsigned int> subdomain_map;
 
-  //print_face(subdomains.front());
-  //dolfin_assert(face_in_domain(subdomains.front(), total_domain));
+  std::list<CDT::Face_handle> queue;
+  queue.push_back(*not_visited.begin());
 
-  while (!subdomains.empty())
+  while (!not_visited.empty())
   {
-    const CDT::Face_handle f = subdomains.front();
-    subdomains.pop_front();
+    const Face_handle f = *not_visited.begin();
 
-    if (f->counter() < 0)
-    {
-      // Set default marker (0)
-      f->set_counter(0);
+    // set to default domain (0)
+    unsigned int marker = 0;
 
-      const Point_2 p0 = f->vertex(0)->point();
-      const Point_2 p1 = f->vertex(1)->point();
-      const Point_2 p2 = f->vertex(2)->point();
+    const Point_2 p0 = f->vertex(0)->point();
+    const Point_2 p1 = f->vertex(1)->point();
+    const Point_2 p2 = f->vertex(2)->point();
 
-      dolfin::Point p( (p0[0] + p1[0] + p2[0]) / 3.0,
-                       (p0[1] + p1[1] + p2[1]) / 3.0 );
+    const dolfin::Point p( (p0[0] + p1[0] + p2[0]) / 3.0,
+                           (p0[1] + p1[1] + p2[1]) / 3.0 );
 
-      for (int i = subdomain_geometries.size(); i > 0; --i)
+    for (const std::pair<std::size_t, CSGCGALDomain2D> subdomain : subdomain_geometries)
+    {
+      if (subdomain.second.point_in_domain(p))
       {
-        if (subdomain_geometries[i-1].second.point_in_domain(p))
-        {
-          f->set_counter(subdomain_geometries[i-1].first);
-          break;
-        }
+        marker = subdomain.first;
+        break;
       }
-
-      explore_subdomain(cdt, f, subdomains);
     }
+
+    explore_subdomain(cdt,
+                      f,
+                      marker,
+                      subdomain_map,
+                      not_visited);
   }
-}
-//-----------------------------------------------------------------------------
-void add_subdomain(PSLG& pslg, 
-                   const CSGCGALDomain2D& cgal_geometry,
-                   double threshold)
-{
 
-  // // Insert the outer boundaries of the domain
-  // {
-  //   std::list<std::vector<dolfin::Point> > v;
-  //   cgal_geometry.get_vertices(v, threshold);
-
-  //   for (std::list<std::vector<dolfin::Point> >::const_iterator pit = v.begin();
-  //        pit != v.end(); ++pit)
-  //   {
-  //     std::vector<dolfin::Point>::const_iterator it = pit->begin();
-  //     Vertex_handle first = cdt.insert(Point_2(it->x(), it->y()));
-  //     Vertex_handle prev = first;
-  //     ++it;
-
-  //     for(; it != pit->end(); ++it)
-  //     {
-  //       Vertex_handle current = cdt.insert(Point_2(it->x(), it->y()));
-  //       cdt.insert_constraint(prev, current);
-  //       prev = current;
-  //     }
-
-  //     cdt.insert_constraint(first, prev);
-  //   }
-  // }
-
-  // // Insert holes
-  // {
-  //   std::list<std::vector<dolfin::Point> > holes;
-  //   cgal_geometry.get_holes(holes, threshold);
-
-  //   for (std::list<std::vector<dolfin::Point> >::const_iterator hit = holes.begin();
-  //        hit != holes.end(); ++hit)
-  //   {
-
-  //     std::vector<dolfin::Point>::const_iterator pit = hit->begin();
-  //     Vertex_handle first = cdt.insert(Point_2(pit->x(), pit->y()));
-  //     Vertex_handle prev = first;
-  //     ++pit;
-
-  //     for(; pit != hit->end(); ++pit)
-  //     {
-  //       Vertex_handle current = cdt.insert(Point_2(pit->x(), pit->y()));
-  //       cdt.insert_constraint(prev, current);
-  //       prev = current;
-  //     }
-
-  //     cdt.insert_constraint(first, prev);
-  //   }
-  // }
+  return subdomain_map;
 }
 //-----------------------------------------------------------------------------
 double shortest_constrained_edge(const CDT &cdt)
@@ -287,14 +181,14 @@ double shortest_constrained_edge(const CDT &cdt)
   return min_length;
 }
 //-----------------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
-void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh& mesh)
+void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry,
+                                      dolfin::Mesh& mesh,
+                                      bool partition)
 {
   // Note that if not in parallel (ie. size() == 0)
   // then both receiver and broadcaster will return false
-  if (!dolfin::MPI::is_receiver(mesh.mpi_comm()))
+  // If not partition, then generate the mesh on all processes
+  if (!partition || !dolfin::MPI::is_receiver(mesh.mpi_comm()))
   {
 
     std::vector<std::pair<std::size_t, CSGCGALDomain2D> >
@@ -306,6 +200,7 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
     // Empty polygon, will be populated when traversing the subdomains
     CSGCGALDomain2D overlaying;
 
+
     // Add the subdomains to the PSLG. Traverse in reverse order to get the latest
     // added subdomain on top
     std::list<std::pair<std::size_t, std::shared_ptr<const CSGGeometry> > >::const_reverse_iterator it;
@@ -322,7 +217,7 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
       CSGCGALDomain2D cgal_geometry(current_subdomain.get());
 
       // Only the part inside the total domain
-      cgal_geometry.intersect_inplace(total_domain);
+      cgal_geometry.intersect_inplace(total_domain, 1e-15);
 
       // Only the part outside overlaying subdomains
       cgal_geometry.difference_inplace(overlaying);
@@ -335,9 +230,8 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
 
     CSGCGALDomain2D remaining(total_domain);
     remaining.difference_inplace(overlaying);
-    subdomain_geometries.push_back(std::make_pair(0, remaining));
 
-    const double pixel_size = parameters["pixel_size"];
+    subdomain_geometries.push_back(std::make_pair(0, remaining));
 
     // Compute cell size
     double cell_size;
@@ -353,9 +247,25 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
     }
 
     log(dolfin::TRACE, "Request cell size: %f", cell_size);
-    const double truncate_tolerance = parameters["edge_truncate_tolerance"];
 
-    PSLG pslg(subdomain_geometries, pixel_size, truncate_tolerance < 0 ? cell_size/200 : truncate_tolerance);
+    std::pair<std::vector<dolfin::Point>,
+              std::vector<std::pair<std::size_t, std::size_t>>> pslg =
+      CSGCGALDomain2D::compute_pslg(subdomain_geometries);
+
+
+    // for (dolfin::Point p : pslg.first)
+    // {
+    //   std::cout << "\"Point " << p.x() << " " << p.y() << "\" ";
+    // }
+    // std::cout << std::endl;
+
+    // for (std::pair<std::size_t, std::size_t> s : pslg.second)
+    // {
+    //   dolfin::Point p0 = pslg.first[s.first];
+    //   dolfin::Point p1 = pslg.first[s.second];
+    //   std::cout << "\"Segment " << p0.x() << " " << p0.y() << ", " << p1.x() << " " << p1.y() << "\" ";
+    // }
+    // std::cout << std::endl;
 
     // Create empty CGAL triangulation and copy data from the PSLG
     CDT cdt;
@@ -364,23 +274,20 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
       std::vector<CDT::Vertex_handle> vertices;
       {
         // Insert the vertices into the triangulation
-        std::vector<dolfin::Point>& v = pslg.vertices;
-        vertices.reserve(v.size());
-        for (auto vit = v.begin(); vit != v.end(); vit++)
-          vertices.push_back(cdt.insert(Point_2(vit->x(), vit->y())));
+        vertices.reserve(pslg.first.size());
+        for (const dolfin::Point& vertex : pslg.first)
+        {
+          const Point_2 p(vertex.x(), vertex.y());
+          vertices.push_back(cdt.insert(p));
+        }
       }
 
       // Insert the edges as constraints
-      std::vector<std::pair<std::size_t, std::size_t> > edges = pslg.edges;
-      for (auto eit = edges.begin(); eit != edges.end(); eit++)
+      for (const std::pair<std::size_t, size_t>& edge : pslg.second)
       {
-        cdt.insert_constraint(vertices[eit->first], vertices[eit->second]);
+        cdt.insert_constraint(vertices[edge.first], vertices[edge.second]);
       }
     }
-  
-
-    // log(dolfin::TRACE, "Exploring subdomains in triangulation");
-    // explore_subdomains(cdt, total_domain, subdomain_geometries);
 
     log(dolfin::TRACE, "Initializing mesh refinement");
 
@@ -388,25 +295,14 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
     CGAL_Mesher_2 mesher(cdt);
 
     // Add seeds for all faces in the total domain
-    std::list<Point_2> list_of_seeds;
-    for(CDT::Finite_faces_iterator fit = cdt.finite_faces_begin();
-        fit != cdt.finite_faces_end(); ++fit)
-    {
-      // Calculate center of triangle and add to list of seeds
-      Point_2 p0 = fit->vertex(0)->point();
-      Point_2 p1 = fit->vertex(1)->point();
-      Point_2 p2 = fit->vertex(2)->point();
-      const double x = (p0[0] + p1[0] + p2[0]) / 3;
-      const double y = (p0[1] + p1[1] + p2[1]) / 3;
-
-      if (total_domain.point_in_domain(dolfin::Point(x, y)))
-      {
-        list_of_seeds.push_back(Point_2(x, y));
-      }
-    }
+    std::vector<dolfin::Point> hole_points;
+    total_domain.get_points_in_holes(hole_points);
+    std::vector<Point_2> seed_points;
+    for (dolfin::Point p : hole_points)
+      seed_points.push_back(Point_2(p.x(), p.y()));
 
-    // log(dolfin::TRACE, "Added %d seed points", list_of_seeds.size());
-    mesher.set_seeds(list_of_seeds.begin(), list_of_seeds.end(), true);
+    log(dolfin::TRACE, "Added %d seed points", seed_points.size());
+    mesher.set_seeds(seed_points.begin(), seed_points.end(), false);
 
     // Set shape and size criteria
     const double shape_bound = parameters["triangle_shape_bound"];
@@ -414,16 +310,19 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
 
     // Refine CGAL mesh/triangulation
     mesher.refine_mesh();
-  
+
     // Make sure triangulation is valid
     dolfin_assert(cdt.is_valid());
 
     // Mark the subdomains
     log(dolfin::TRACE, "Exploring subdomains in mesh");
-    explore_subdomains(cdt, total_domain, subdomain_geometries);
+
+    std::map<Face_handle, unsigned int> subdomain_map =
+      explore_subdomains(cdt, total_domain, subdomain_geometries);
 
     // Clear mesh
-    mesh.clear();
+    // This function has been removed from dolfin.
+    // mesh.clear();
 
     const std::size_t gdim = cdt.finite_vertices_begin()->point().dimension();
     const std::size_t tdim = cdt.dimension();
@@ -450,7 +349,8 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
     mesh_editor.init_cells(num_cells);
 
     // Add vertices to mesh
-    std::size_t vertex_index = 0;
+    unsigned int vertex_index = 0;
+    std::map<Vertex_handle, unsigned int> vertex_map;
     for (CDT::Finite_vertices_iterator cgal_vertex = cdt.finite_vertices_begin();
          cgal_vertex != cdt.finite_vertices_end(); ++cgal_vertex)
     {
@@ -463,7 +363,8 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
       mesh_editor.add_vertex(vertex_index, p);
 
       // Attach index to vertex and increment
-      cgal_vertex->info() = vertex_index++;
+      vertex_map[cgal_vertex] = vertex_index;
+      vertex_index++;
     }
 
     dolfin_assert(vertex_index == num_vertices);
@@ -479,14 +380,14 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
       if (cgal_cell->is_in_domain())
       {
         mesh_editor.add_cell(cell_index,
-                             cgal_cell->vertex(0)->info(),
-                             cgal_cell->vertex(1)->info(),
-                             cgal_cell->vertex(2)->info());
+                             vertex_map[cgal_cell->vertex(0)],
+                             vertex_map[cgal_cell->vertex(1)],
+                             vertex_map[cgal_cell->vertex(2)]);
 
         if (mark_cells)
         {
           domain_markers.set_marker(std::make_pair(cell_index,
-                                                   cgal_cell->counter()), 2);
+                                                   subdomain_map[cgal_cell]), 2);
         }
         ++cell_index;
       }
@@ -498,7 +399,8 @@ void CSGCGALMeshGenerator2D::generate(const CSGGeometry& geometry, dolfin::Mesh&
   }
 
   // Distribute the mesh (if in parallel)
-  dolfin::MeshPartitioning::build_distributed_mesh(mesh);
+  if (partition)
+    dolfin::MeshPartitioning::build_distributed_mesh(mesh);
 }
 }
 //-----------------------------------------------------------------------------
diff --git a/src/CSGCGALMeshGenerator3D.cpp b/src/CSGCGALMeshGenerator3D.cpp
index c66bcf8..a728465 100644
--- a/src/CSGCGALMeshGenerator3D.cpp
+++ b/src/CSGCGALMeshGenerator3D.cpp
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -98,7 +98,10 @@ void build_dolfin_mesh(const C3t3& c3t3, dolfin::Mesh& mesh)
   }
 
   // Create and initialize mesh editor
-  mesh.clear();
+
+  // dolfin::Mesh::clear has been removed
+  // mesh.clear();
+
   dolfin::MeshEditor mesh_editor;
   mesh_editor.open(mesh, 3, 3);
   mesh_editor.init_vertices(vertex_id_map.size());
@@ -148,35 +151,31 @@ struct Copy_polyhedron_to
                           _in_poly.num_halfedges());
 
     {
-      std::vector<dolfin::Point> v;
-      _in_poly.get_vertices(v);
+      std::unique_ptr<std::vector<double>> v = _in_poly.get_vertices();
 
-      for(std::vector<dolfin::Point>::iterator it = v.begin();
-          it != v.end(); it++)
+      for (std::size_t i = 0; i < v->size(); i += 3)
       {
-        typename MeshPolyhedron_3::Point_3 p( (*it)[0], (*it)[1], (*it)[2] );
+        typename MeshPolyhedron_3::Point_3 p( (*v)[i], (*v)[i+1], (*v)[i+2] );
         builder.add_vertex(p);
       }
     }
 
     {
-      std::vector<std::array<std::size_t, 3> > f;
-      _in_poly.get_facets(f);
+      std::unique_ptr<const std::vector<std::size_t>> f = _in_poly.get_facets();
 
-      for (std::vector<std::array<std::size_t, 3> >::iterator it = f.begin();
-           it != f.end(); it++)
+      for (std::size_t i = 0; i < f->size(); i += 3)
       {
-        builder.begin_facet ();
-        builder.add_vertex_to_facet( (*it)[0] );
+        builder.begin_facet();
+        builder.add_vertex_to_facet( (*f)[i] );
         if (flip)
         {
-          builder.add_vertex_to_facet( (*it)[2] );
-          builder.add_vertex_to_facet( (*it)[1] );
+          builder.add_vertex_to_facet( (*f)[i+2] );
+          builder.add_vertex_to_facet( (*f)[i+1] );
         }
         else
         {
-          builder.add_vertex_to_facet( (*it)[1] );
-          builder.add_vertex_to_facet( (*it)[2] );
+          builder.add_vertex_to_facet( (*f)[i+1] );
+          builder.add_vertex_to_facet( (*f)[i+2] );
         }
 
         builder.end_facet();
@@ -187,7 +186,7 @@ struct Copy_polyhedron_to
 private:
   const mshr::CSGCGALDomain3D& _in_poly;
   const bool flip;
-}; 
+};
 
 static void convert_to_inexact(const mshr::CSGCGALDomain3D &exact_domain,
                                MeshPolyhedron_3 &inexact_domain,
@@ -299,8 +298,8 @@ void CSGCGALMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> csg
     {
       log(dolfin::TRACE, "Detecting sharp features");
 
-      //const int feature_threshold = parameters["feature_threshold"];
-      domain.detect_features();
+      const double feature_threshold = parameters["feature_threshold"];
+      domain.detect_features(feature_threshold);
     }
 
     // Mesh generation
@@ -349,26 +348,11 @@ void CSGCGALMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> csg
   dolfin::MeshPartitioning::build_distributed_mesh(mesh);
 }
 //-----------------------------------------------------------------------------
-void CSGCGALMeshGenerator3D::generate(const CSGGeometry& geometry,
-                                      dolfin::Mesh& mesh) const
+std::shared_ptr<dolfin::Mesh>
+CSGCGALMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> csgdomain) const
 {
-  std::shared_ptr<CSGCGALDomain3D> exact_domain( new CSGCGALDomain3D(geometry) );
-  exact_domain->ensure_meshing_preconditions();
-
-  // Use move semantics, so the callee can delete the object as early as possible
-  generate(std::move(exact_domain), mesh);
+  std::shared_ptr<dolfin::Mesh> mesh(new dolfin::Mesh());
+  generate(csgdomain, *mesh);
+  return mesh;
 }
-//-----------------------------------------------------------------------------
-void CSGCGALMeshGenerator3D::generate(std::shared_ptr<const CSGGeometry> geometry,
-                                      dolfin::Mesh& mesh) const
-{
-  std::shared_ptr<CSGCGALDomain3D> exact_domain( new CSGCGALDomain3D(*geometry) );
-  geometry.reset();
-  exact_domain->ensure_meshing_preconditions();
-
-  // Use move semantics, so the callee can delete the object as early as possible
-  generate(std::move(exact_domain), mesh);
-}
-//-----------------------------------------------------------------------------
-
 }
diff --git a/src/CSGPrimitives3D.cpp b/src/CSGPrimitives3D.cpp
index 57c55ce..02fd67c 100644
--- a/src/CSGPrimitives3D.cpp
+++ b/src/CSGPrimitives3D.cpp
@@ -168,12 +168,48 @@ std::string Tetrahedron::str(bool verbose) const
   return s.str();
 }
 //-----------------------------------------------------------------------------
-Surface3D::Surface3D(std::string filename, double degenerate_tolerance) 
- : _filename(filename), degenerate_tolerance(degenerate_tolerance)
+Surface3D::Surface3D(std::string filename)
+ : _filename(filename),
+   mesh(NULL),
+   vertex_tolerance(.0),
+   degenerate_tolerance(1e-12),
+   repair(false),
+   single_connected_component(false),
+   sharp_features_filter(-1),
+   first_facet(0),
+   flip_facets(false),
+   debug_dump("")
 {
   // Do nothing
 }
 //-----------------------------------------------------------------------------
+Surface3D::Surface3D(std::shared_ptr<const dolfin::Mesh> m)
+ : _filename(""),
+   mesh(m),
+   vertex_tolerance(.0),
+   degenerate_tolerance(1e-12),
+   repair(false),
+   single_connected_component(false),
+   sharp_features_filter(-1),
+   first_facet(0),
+   cell_domain(0),
+   use_cell_domain(false)
+{}
+//-----------------------------------------------------------------------------
+Surface3D::Surface3D(std::shared_ptr<const dolfin::Mesh> m,
+                     std::size_t cell_domain)
+ : _filename(""),
+   mesh(m),
+   vertex_tolerance(.0),
+   degenerate_tolerance(1e-12),
+   repair(false),
+   single_connected_component(false),
+   sharp_features_filter(-1),
+   first_facet(0),
+   cell_domain(cell_domain),
+   use_cell_domain(true)
+{}
+//-----------------------------------------------------------------------------
 std::string Surface3D::str(bool verbose) const
 {
   return std::string("Surface3D from file ") + _filename;
@@ -212,4 +248,29 @@ std::string Ellipsoid::str(bool verbose) const
   return ss.str();
 }
 //-----------------------------------------------------------------------------
+Extrude2D::Extrude2D(std::shared_ptr<CSGGeometry> geometry_2d, double z)
+  : geometry_2d(geometry_2d), z(z)
+{
+  if (geometry_2d->dim() != 2)
+  {
+    std::stringstream ss;
+    ss << "Expected geometry of dimension 2, got ";
+    ss << geometry_2d->dim();
+    dolfin::dolfin_error("CSGPrimitives3D.cpp",
+                         "Extrude 2D geometry",
+                         ss.str());
+}
+}
+//-----------------------------------------------------------------------------
+std::string Extrude2D::str(bool verbose) const
+{
+  std::stringstream ss;
+  ss << "Extruded 2D polygon, z = " << z;
+  if (verbose)
+  {
+    ss << geometry_2d->str(true);
+  }
+
+  return ss.str();
+}
 }
diff --git a/src/DolfinMeshUtils.cpp b/src/DolfinMeshUtils.cpp
index 1107219..0a168a9 100644
--- a/src/DolfinMeshUtils.cpp
+++ b/src/DolfinMeshUtils.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Benjamin Kehlet
+// Copyright (C) 2014-2016 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -6,19 +6,24 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 //
 
 #include <mshr/DolfinMeshUtils.h>
+#include "FuzzyPointLocator.h"
 
 #include <dolfin/mesh/Cell.h>
+#include <dolfin/mesh/Vertex.h>
+#include <dolfin/mesh/Facet.h>
+#include <dolfin/mesh/MeshEditor.h>
+#include <dolfin/math/basic.h>
 
 #include <limits>
 
@@ -68,4 +73,193 @@ bool DolfinMeshUtils::check_mesh(const dolfin::Mesh& m)
 {
   return !has_isolated_vertices(m);
 }
+//-----------------------------------------------------------------------------
+std::shared_ptr<dolfin::Mesh>
+   DolfinMeshUtils::extract_subdomain(std::shared_ptr<const dolfin::Mesh> mesh,
+                                      std::size_t cell_domain)
+{
+  dolfin_assert(mesh->geometry().dim() == 3);
+  dolfin_assert(mesh->topology().dim() == 3);
+
+  // Collect all vertices incident to all marked cells
+  std::map<std::size_t, std::size_t> collected_vertices;
+  std::size_t num_cells = 0;
+  for (const std::pair<std::size_t, std::size_t>& marker : mesh->domains().markers(3))
+  {
+    if (marker.second == cell_domain)
+    {
+      num_cells++;
+      dolfin::Cell c(*mesh, marker.second);
+      for (std::size_t i = 0; i < 4; i++)
+      {
+        const std::size_t s = collected_vertices.size();
+        collected_vertices.insert(std::make_pair(c.entities(0)[i], s));
+      }
+    }
+  }
+
+  std::shared_ptr<dolfin::Mesh> outmesh(new dolfin::Mesh);
+  dolfin::MeshEditor editor;
+  editor.open(*outmesh, 3,3);
+
+  editor.init_vertices(collected_vertices.size());
+  for (std::pair<std::size_t, std::size_t> v : collected_vertices)
+  {
+    dolfin::Vertex existing_vertex(*mesh, v.first);
+    editor.add_vertex(v.second, existing_vertex.point());
+  }
+
+  editor.init_cells(num_cells);
+  std::size_t cell_counter = 0;
+  for (const std::pair<std::size_t, std::size_t>& marker : mesh->domains().markers(3))
+  {
+    if (marker.second == cell_domain)
+    {
+      const dolfin::Cell c(*mesh, marker.second);
+      const unsigned int* vertices = c.entities(0);
+      editor.add_cell(cell_counter,
+                      collected_vertices[vertices[0]],
+                      collected_vertices[vertices[1]],
+                      collected_vertices[vertices[2]],
+                      collected_vertices[vertices[3]]);
+
+    }
+  }
+
+  editor.close();
+  return outmesh;
+}
+
+
+//-----------------------------------------------------------------------------
+std::shared_ptr<dolfin::Mesh>
+DolfinMeshUtils::merge_meshes(std::shared_ptr<dolfin::Mesh> m1,
+                              std::shared_ptr<dolfin::Mesh> m2)
+{
+  log(dolfin::TRACE, "Merge meshes");
+  // Map vertex (geometric) points to index for m1
+  FuzzyPointMap vertex_map_inner(1e-14);
+  std::vector<std::size_t> map_to_mesh_index(m1->num_vertices());;
+
+  for (dolfin::VertexIterator v(*m1); !v.end(); ++v)
+  {
+    dolfin_assert(!vertex_map_inner.contains(v->point()));
+    const std::size_t map_index = vertex_map_inner.insert_point(v->point());
+    map_to_mesh_index[map_index] = v->global_index();
+  }
+
+  dolfin_assert(m1->num_vertices() == vertex_map_inner.size());
+
+  // Count number of shared vertices
+  // (We need this to initialize the mesh editor)
+  // TOOO: Store these to avoid another lookup?
+  std::size_t shared_vertices = 0;
+  for (dolfin::VertexIterator v(*m2); !v.end(); ++v)
+  {
+    if (vertex_map_inner.contains(v->point()))
+      shared_vertices++;
+  }
+
+  log(dolfin::TRACE, "Located %u shared vertices.", shared_vertices);
+
+  std::shared_ptr<dolfin::Mesh> outmesh(new dolfin::Mesh);
+  dolfin::MeshEditor editor;
+  editor.open(*outmesh, 3, 3);
+  editor.init_vertices(m1->num_vertices() + m2->num_vertices() - shared_vertices);
+
+  // Add vertices from m1
+  for (dolfin::VertexIterator v(*m1); !v.end(); ++v)
+  {
+    editor.add_vertex(v->global_index(), v->point());
+  }
+
+  // Add vertices from m2
+  std::vector<std::size_t> m2_vertex_map(m2->num_vertices());
+
+  std::size_t m2_vertex_counter = m1->num_vertices();
+  for (dolfin::VertexIterator v(*m2); !v.end(); ++v)
+  {
+    std::size_t index;
+    if (vertex_map_inner.contains(v->point()))
+    {
+      const std::size_t map_index = vertex_map_inner.get_index(v->point());
+      index = map_to_mesh_index[map_index];
+    }
+    else
+    {
+      index = m2_vertex_counter;
+      editor.add_vertex(index, v->point());
+
+      m2_vertex_counter++;
+    }
+
+    m2_vertex_map[v->global_index()] = index;
+  }
+
+  editor.init_cells(m1->num_cells() + m2->num_cells());
+
+  std::size_t cell_counter = 0;
+
+  // Add cells from m1
+  for (dolfin::CellIterator c(*m1); !c.end(); ++c)
+  {
+    editor.add_cell(cell_counter,
+                    c->entities(0)[0],
+                    c->entities(0)[1],
+                    c->entities(0)[2],
+                    c->entities(0)[3]);
+    cell_counter++;
+  }
+
+  for (dolfin::CellIterator c(*m2); !c.end(); ++c)
+  {
+    editor.add_cell(cell_counter,
+                    m2_vertex_map[c->entities(0)[0]],
+                    m2_vertex_map[c->entities(0)[1]],
+                    m2_vertex_map[c->entities(0)[2]],
+                    m2_vertex_map[c->entities(0)[3]]);
+    cell_counter++;
+  }
+  editor.close();
+
+  // Mark cells from
+  dolfin::MeshDomains &domain_markers = outmesh->domains();
+  domain_markers.init(2);
+  domain_markers.init(3);
+
+  for (std::size_t i = 0; i < outmesh->num_cells(); ++i)
+  {
+    domain_markers.set_marker(std::make_pair(i,
+                                             i < m1->num_cells() ? 1 : 2), 3);
+  }
+
+  // Mark facets
+  // Boundary facets are marked with 1 or 2 depending on the source meshes the
+  // origined from. Facets shared by the two source meshes will be marked with
+  // 3.
+
+  // Compute facet - cell connectivity
+  // std::cout << "Compute facet - cell connectivity" << std::endl;
+  outmesh->init(2, 3);
+  // std::cout << "Done" << std::endl;
+  for (dolfin::FacetIterator f(*outmesh); !f.end(); ++f)
+  {
+    if (f->exterior())
+    {
+      const std::size_t marker = f->entities(3)[0] < m1->num_cells() ? 1 : 2;
+      domain_markers.set_marker(std::make_pair(f->index(), marker), 2);
+    }
+    else
+    {
+      const std::size_t cell1 = f->entities(3)[0];
+      const std::size_t cell2 = f->entities(3)[1];
+      if ( (cell1 < m1->num_cells() && cell2 >= m1->num_cells()) ||
+           (cell1 >= m1->num_cells() && cell2 < m1->num_cells()))
+        domain_markers.set_marker(std::make_pair(f->index(), 3), 2);
+    }
+  }
+
+  return outmesh;
+}
+
 }
diff --git a/src/FuzzyPointLocator.h b/src/FuzzyPointLocator.h
new file mode 100644
index 0000000..12e2991
--- /dev/null
+++ b/src/FuzzyPointLocator.h
@@ -0,0 +1,145 @@
+// Copyright (C) 2016 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+//
+// Modified by Anders Logg 2016
+
+#ifndef FUZZY_POINT_SET_H
+#define FUZZY_POINT_SET_H
+
+#include <utility> // defines less operator for std::pair
+#include <map>
+#include <set>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+#include <array>
+
+// TODO: Template over dimension.
+//template <std::size_t dim>
+class FuzzyPointMap
+{
+ public:
+  FuzzyPointMap(double tolerance)
+    : tolerance(tolerance)
+  {}
+  //-----------------------------------------------------------------------------
+  template <typename Point>
+  std::size_t insert_point(const Point& p)
+  //-----------------------------------------------------------------------------
+  {
+    const std::size_t index = get_index(p);
+    if (index == points.size())
+    {
+      // insert the points
+      points.push_back(std::array<double, 3>{{p[0], p[1], p[2]}});
+      maps[0].insert(std::make_pair(p[0], index));
+      maps[1].insert(std::make_pair(p[1], index));
+      maps[2].insert(std::make_pair(p[2], index));
+    }
+
+    return index;
+  }
+  //-----------------------------------------------------------------------------
+  template <typename Point>
+  std::size_t forced_insert_point(const Point& p)
+  //-----------------------------------------------------------------------------
+  {
+    const std::size_t index = points.size();
+
+    points.push_back(std::array<double, 3>{{p[0], p[1], p[2]}});
+    maps[0].insert(std::make_pair(p[0], index));
+    maps[1].insert(std::make_pair(p[1], index));
+    maps[2].insert(std::make_pair(p[2], index));
+
+    return index;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Point>
+  bool contains(const Point& p)
+  //-----------------------------------------------------------------------------
+  {
+    const std::size_t index = get_index(p);
+    return index < points.size();
+  }
+  //-----------------------------------------------------------------------------
+  const std::array<double, 3>& operator[](std::size_t i) const
+  //-----------------------------------------------------------------------------
+  {
+    return points[i];
+  }
+  //-----------------------------------------------------------------------------
+  const std::vector<std::array<double, 3>>& get_points() const
+  //-----------------------------------------------------------------------------
+  {
+    return points;
+  }
+  //-----------------------------------------------------------------------------
+  std::size_t size() const
+  //-----------------------------------------------------------------------------
+  {
+    return points.size();
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Point>
+  std::size_t get_index(const Point& p)
+  //-----------------------------------------------------------------------------
+  {
+    typedef std::multimap<double, std::size_t>::iterator iterator;
+
+    // Check if a nearby point exists
+    std::array<std::set<std::size_t>, 3> matches;
+    for (int i = 0; i < 3; i++)
+    {
+      iterator lb = maps[i].lower_bound(p[i]-tolerance);
+      iterator ub = maps[i].upper_bound(p[i]+tolerance);
+
+      if (lb != maps[i].end())
+      {
+        iterator it = lb;
+        while (it != ub)
+        {
+          matches[i].insert(it->second);
+          it++;
+        }
+      }
+    }
+
+    std::set<std::size_t> x_y_intersections;
+    std::set_intersection(matches[0].begin(), matches[0].end(),
+                          matches[1].begin(), matches[1].end(),
+                          std::inserter(x_y_intersections, x_y_intersections.begin()));
+
+    std::set<std::size_t> x_y_z_intersections;
+    std::set_intersection(matches[2].begin(), matches[2].end(),
+                          x_y_intersections.begin(), x_y_intersections.end(),
+                          std::inserter(x_y_z_intersections, x_y_z_intersections.begin()));
+
+    if (x_y_z_intersections.size() > 0)
+      return *x_y_z_intersections.begin();
+    else
+      return points.size();
+  }
+
+ private:
+  const double tolerance;
+
+  // Map from component of point to index
+  std::array<std::multimap<double, std::size_t>, 3> maps;
+  std::vector<std::array<double, 3> > points;
+};
+
+#endif
diff --git a/src/MeshGenerator.cpp b/src/MeshGenerator.cpp
index 24a247c..39fd8f1 100644
--- a/src/MeshGenerator.cpp
+++ b/src/MeshGenerator.cpp
@@ -29,31 +29,42 @@ namespace mshr
 {
 
 //-----------------------------------------------------------------------------
-void generate(dolfin::Mesh& mesh,
-              const CSGGeometry& geometry,
-              double resolution,
-              std::string backend)
+std::shared_ptr<dolfin::Mesh> generate_mesh(const CSGGeometry& geometry,
+                                            double resolution,
+                                            std::string backend)
 {
   if (geometry.dim() == 2)
   {
+    if (backend != "cgal")
+    {
+      const std::string e = "Unknown mesh generator backend: " + backend + ". The only supported 2D backend is cgal.";
+      dolfin::dolfin_error("MeshGenerator.cpp",
+                           "generate mesh of 2D geometry",
+                           e);
+}
+
+    std::shared_ptr<dolfin::Mesh> mesh(new dolfin::Mesh());
     CSGCGALMeshGenerator2D generator;
     generator.parameters["mesh_resolution"] = resolution;
-    generator.generate(geometry, mesh);
+    generator.generate(geometry, *mesh);
+    return mesh;
   }
   else if (geometry.dim() == 3)
   {
+    std::shared_ptr<CSGCGALDomain3D> domain(new CSGCGALDomain3D(geometry));
+    domain->ensure_meshing_preconditions();
+
     if (backend == "cgal")
     {
       CSGCGALMeshGenerator3D generator;
       generator.parameters["mesh_resolution"] = resolution;
-      generator.generate(geometry, mesh);
+      return generator.generate(std::move(domain));
     }
     else if (backend == "tetgen")
     {
       TetgenMeshGenerator3D generator;
       generator.parameters["mesh_resolution"] = resolution;
-      generator.generate(geometry, mesh);
-
+      return generator.generate(std::move(domain));
     }
     else
     {
@@ -61,6 +72,7 @@ void generate(dolfin::Mesh& mesh,
       dolfin::dolfin_error("MeshGenerator.cpp",
                            "Generator mesh of 3D geometry",
                            e);
+      return std::shared_ptr<dolfin::Mesh>();
     }
   }
   else
@@ -68,6 +80,7 @@ void generate(dolfin::Mesh& mesh,
     dolfin::dolfin_error("MeshGenerator.cpp",
                          "create mesh from CSG geometry",
                          "Unhandled geometry dimension %d", geometry.dim());
+    return std::shared_ptr<dolfin::Mesh>();
   }
 }
 
diff --git a/src/Meshes.cpp b/src/Meshes.cpp
index afa8ba9..b4d61de 100644
--- a/src/Meshes.cpp
+++ b/src/Meshes.cpp
@@ -44,7 +44,10 @@ namespace mshr
     generator.parameters["max_tet_volume"] = max_cell_volume;
     generator.parameters["preserve_surface"] = true;
 
-    generator.generate(polyhedral_domain, *this);
+    std::shared_ptr<dolfin::Mesh> mesh = generator.generate(polyhedral_domain);
+    // dolfin::Mesh* m = static_cast<dolfin::Mesh>(this);
+    // *m = *mesh
+    dolfin::Mesh::operator=(*mesh);
 
     // Broadcast mesh according to parallel policy
     if (dolfin::MPI::is_broadcaster(this->mpi_comm()))
diff --git a/src/OFFFileReader.cpp b/src/OFFFileReader.cpp
new file mode 100644
index 0000000..87760fc
--- /dev/null
+++ b/src/OFFFileReader.cpp
@@ -0,0 +1,188 @@
+// Copyright (C) 2015 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#include <mshr/OFFFileReader.h>
+
+#include <dolfin/geometry/Point.h>
+#include <dolfin/common/constants.h>
+#include <dolfin/log/LogStream.h>
+#include <dolfin/log/log.h>
+
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+#include <boost/filesystem.hpp>
+#include <boost/tokenizer.hpp>
+#include <boost/algorithm/string.hpp>
+
+#include <fstream>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <algorithm>
+#include <string>
+#include <map>
+
+namespace
+{
+template<typename T>
+inline double convert_string(const std::string& s)
+{
+  std::istringstream is(s);
+  T val;
+  is >> val;
+
+  return val;
+}
+
+// get next line of file and trim away whitespace
+inline void get_next_line(std::ifstream& file, std::string& line, std::size_t &lineno)
+{
+  do
+  {
+    std::getline(file, line);
+    boost::algorithm::trim(line);
+    lineno++;
+  } while ( !file.eof() && line == "");
+}
+} // end anonymous namespace
+//-----------------------------------------------------------------------------
+namespace mshr
+{
+
+void OFFFileReader::read(const std::string filename,
+                         std::vector<std::array<double, 3> >& vertices,
+                         std::vector<std::array<std::size_t, 3> >& facets)
+{
+
+  dolfin::log(dolfin:: TRACE, "Reading surface from %s ", filename.c_str());
+
+  vertices.clear();
+  facets.clear();
+
+  typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+
+  std::ifstream file(filename.c_str());
+  if (!file.is_open())
+  {
+    dolfin::dolfin_error("OFFFileReader.cpp",
+                         "open .off file to read 3D surface",
+                         "Failed to open file");
+  }
+
+  std::string line;
+  std::size_t lineno = 0;
+  const boost::char_separator<char> sep(" ");
+
+  // Read the first line and trim away whitespaces
+  get_next_line(file, line, lineno);
+
+  if (line != "OFF")
+  {
+    dolfin::dolfin_error("OFFFileReader.cpp",
+                         "open .off file to read 3D surface",
+                         "File does not start with \"OFF\" (line %u", lineno);
+  }
+
+  get_next_line(file, line, lineno);
+
+  // Read number of vertices and facets  
+  tokenizer tokens(line, sep);
+  tokenizer::iterator tok_iter = tokens.begin();
+
+  const std::size_t num_vertices = convert_string<std::size_t>(*tok_iter);
+  tok_iter++;
+  const std::size_t num_facets   = convert_string<std::size_t>(*tok_iter);
+
+  vertices.reserve(num_vertices);
+  facets.reserve(num_facets);
+  
+  get_next_line(file, line, lineno);
+
+  // Reader vertices
+  for (std::size_t i = 0; i < num_vertices; i++)
+  {
+    tokenizer tokens(line, sep);
+    tokenizer::iterator tok_iter = tokens.begin();
+
+    std::array<double, 3> vertex;
+    vertex[0] = convert_string<double>(*tok_iter);
+    tok_iter++;
+    vertex[1] = convert_string<double>(*tok_iter);
+    tok_iter++;
+    vertex[2] = convert_string<double>(*tok_iter);
+    tok_iter++;
+    
+    dolfin_assert(tok_iter == tokens.end());
+
+    vertices.push_back(vertex);
+    get_next_line(file, line, lineno);
+  }
+
+  // Read facets
+  for (std::size_t i = 0; i < num_facets; i++)
+  {
+    tokenizer tokens(line, sep);
+    tokenizer::iterator tok_iter = tokens.begin();
+
+    const std::size_t v = convert_string<std::size_t>(*tok_iter);
+    if (v != 3)
+      dolfin::dolfin_error("OFFFileReader.cpp",
+                           "reading off file",
+                           "facet is not triangular");
+    tok_iter++;
+    
+    std::array<std::size_t, 3> facet;
+    facet[0] = convert_string<std::size_t>(*tok_iter);
+    tok_iter++;
+    facet[1] = convert_string<std::size_t>(*tok_iter);
+    tok_iter++;
+    facet[2] = convert_string<std::size_t>(*tok_iter);
+    tok_iter++;
+    
+    dolfin_assert(tok_iter == tokens.end());
+
+    facets.push_back(facet);
+    get_next_line(file, line, lineno);
+  }
+}
+//-----------------------------------------------------------------------------
+void OFFFileReader::write(const std::string filename,
+                          const std::vector<std::array<double, 3> >& vertices,
+                          const std::vector<std::array<std::size_t, 3> >& facets)
+{
+  std::ofstream file(filename);
+  file.precision(6);
+
+  if (!file.is_open())
+  {
+    dolfin::dolfin_error("OFFFileReader.cpp",
+                         "open file to write off data",
+                         "Failed to open file");
+  }
+
+  file << "OFF " << vertices.size() << " " << facets.size() << " 0" << std::endl << std::endl;
+  for (const std::array<double, 3>& v : vertices)
+  {
+    file << v[0] << " " << v[1] << " " << v[2] << std::endl;
+  }
+
+  for (const std::array<std::size_t, 3>& f : facets)
+  {
+    file << "3 " << f[0] << " " << f[1] << " " << f[2] << std::endl;
+  }
+}
+}
diff --git a/src/Point3FuzzyStrictlyLess.h b/src/Point3FuzzyStrictlyLess.h
deleted file mode 100644
index 146e82a..0000000
--- a/src/Point3FuzzyStrictlyLess.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2014 Benjamin Kehlet
-//
-// This file is part of mshr.
-//
-// mshr is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// mshr is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#ifndef __MSHR_POINT3_FUZZY_STRICTLY_LESS_H_
-#define __MSHR_POINT3_FUZZY_STRICTLY_LESS_H_
-
-template<typename Point>
-class Point3FuzzyStrictlyLess
-{
- public:
-  typedef Point Point_;
-
-  Point3FuzzyStrictlyLess(double squared_distance=1e-10)
-  : tol(squared_distance){}
-
-  // strictly less
-  inline bool operator()(const  Point_ a, const Point_ b) const
-  {
-    // check distance
-    if ( (a[0]-b[0])*(a[0]-b[0]) + (a[1]-b[1])*(a[1]-b[1]) + (a[2]-b[2])*(a[2]-b[2]) < tol )
-      return false;
-
-    if (a[0] != b[0])
-      return a[0] < b[0];
-
-    if (a[1] != b[1])
-      return a[1] < b[1];
-
-    //assert a[2] != b[2];
-    
-    return a[2] < b[2];
-  }
-
-  private:
-    const double tol;
-};
-
-#endif
diff --git a/src/Polyhedral_multicomponent_mesh_domain_with_features_3.h b/src/Polyhedral_multicomponent_mesh_domain_with_features_3.h
index 78188db..28b06e9 100644
--- a/src/Polyhedral_multicomponent_mesh_domain_with_features_3.h
+++ b/src/Polyhedral_multicomponent_mesh_domain_with_features_3.h
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -19,7 +19,7 @@
 #ifndef POLYHEDRAL_MULTICOMPONENT_MESH_DOMAIN_WITH_FEATURES_3_H
 #define POLYHEDRAL_MULTICOMPONENT_MESH_DOMAIN_WITH_FEATURES_3_H
 
-#include "Point3FuzzyStrictlyLess.h"
+#include "FuzzyPointLocator.h"
 #include "Polyhedron_utils.h"
 #include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
 
@@ -82,7 +82,7 @@ template<typename Set, typename Polyhedron>
   }
 
   // Add point to set.
-  set.insert(v->point());
+  set.insert_point(v->point());
 
   typename Polyhedron::Halfedge_around_vertex_const_circulator start = v->vertex_begin(), current = start;
   do
@@ -109,18 +109,15 @@ Construct_initial_points::operator()(OutputIterator pts, const int n) const
 
   const Polyhedron& P  = r_domain_.polyhedron();
   std::list<Vertex_const_handle> components;
-  get_disconnected_components(P, std::back_inserter(components));
+  mshr::PolyhedronUtils::get_disconnected_components(P, std::back_inserter(components));
 
   // Collect inserted points in a set with a fuzzy comparison operator
   // to ensure no points closer than the tolerance are inserted.
-  typedef Point3FuzzyStrictlyLess<Point_3> CompareFunctor;
-  typedef std::set<Point_3, CompareFunctor>  FuzzyPointSet;
   std::set<Vertex_const_handle> visited;
 
-  //const CompareFunctor cf(edge_size);
   // TODO: Tune this parameter
   const double tolerance = edge_size*3;
-  FuzzyPointSet inserted_points(CompareFunctor(tolerance*tolerance));
+  FuzzyPointMap inserted_points(tolerance);
 
   std::size_t current_index;
   {
@@ -129,24 +126,26 @@ Construct_initial_points::operator()(OutputIterator pts, const int n) const
     r_domain_.get_corners(std::back_inserter(corners));
     current_index = corners.size();
     current_index++;
-    for (typename std::vector<std::pair<int, Point_3> >::iterator it = corners.begin();
-         it != corners.end(); it++)
+    for (const std::pair<int, Point_3>& c : corners)
     {
-      inserted_points.insert(it->second);
+      inserted_points.forced_insert_point(c.second);
     }
   }
 
-  // Insert n suraface points from each disconnected component
-  for (typename std::list<Vertex_const_handle>::iterator it = components.begin();
-       it != components.end(); it++)
+  // Insert n surface points from each disconnected component
+  for (Vertex_const_handle v : components)
   {
-    Vertex_const_handle current = *it;
-    recursive_insert<FuzzyPointSet, Polyhedron>(inserted_points, visited, current, n+inserted_points.size());
+    recursive_insert<FuzzyPointMap, Polyhedron>(inserted_points,
+                                                visited,
+                                                v,
+                                                n+inserted_points.size());
   }
 
-  for (auto it = inserted_points.begin(); it != inserted_points.end(); it++)
+  // for (auto it = inserted_points.begin(); it != inserted_points.end(); it++)
+  for (const std::array<double, 3>& p : inserted_points.get_points())
   {
-    *pts = std::make_pair(*it, current_index);
+
+    *pts = std::make_pair(Point_3(p[0], p[1], p[2]), current_index);
     pts++;
     current_index++;
   }
diff --git a/src/Polyhedron_utils.h b/src/Polyhedron_utils.h
index b5b9809..7d0015f 100644
--- a/src/Polyhedron_utils.h
+++ b/src/Polyhedron_utils.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Benjamin Kehlet
+// Copyright (C) 2014-2015 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -19,57 +19,2795 @@
 #ifndef POLYHEDRON_UTILS_H__
 #define POLYHEDRON_UTILS_H__
 
-template<typename Polyhedron>
-void recursive_remove(std::set<typename Polyhedron::Vertex_const_handle>& s,
-                      typename Polyhedron::Vertex_const_handle h)
+#include <dolfin/math/basic.h>
+
+#include <CGAL/basic.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
+//#include <CGAL/Self_intersection_polyhedron_3.h>
+#include <CGAL/linear_least_squares_fitting_3.h>
+#include <CGAL/Constrained_Delaunay_triangulation_2.h>
+#include <CGAL/Triangulation_vertex_base_with_info_2.h>
+#include <CGAL/Polyhedron_incremental_builder_3.h>
+#include <CGAL/convex_hull_3.h>
+#include <CGAL/corefinement_operations.h>
+#include <CGAL/Aff_transformation_3.h>
+#include <CGAL/Delaunay_mesher_no_edge_refinement_2.h>
+#include <CGAL/Delaunay_mesh_face_base_2.h>
+#include <CGAL/Delaunay_mesh_size_criteria_2.h>
+
+#include <cmath>
+#include <deque>
+#include <fstream>
+
+namespace mshr
+{
+
+class PolyhedronUtils
 {
-  typedef typename Polyhedron::Halfedge_around_vertex_const_circulator HV_const_circulator;
-  typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
-  typedef Polyhedron Polyhedron_type;
+ public:
 
-  const HV_const_circulator start = h->vertex_begin();
-  HV_const_circulator current = start;
-  do
+  //-----------------------------------------------------------------------------
+  // Scans the vertices of the polyhedron the polyhedron and returns a
+  // Polyhedron::Vertex_const_handle for each disconnected component.
+  template <typename Polyhedron, typename OutputIterator>
+  static void get_disconnected_components(const Polyhedron& p, OutputIterator it)
   {
-    Vertex_const_handle current_vertex = current->opposite()->vertex();
-    assert(current_vertex != h);
-    if (s.count(current_vertex))
+    //typedef Polyhedron Polyhedron_t;
+    typedef typename Polyhedron::Halfedge_around_vertex_const_circulator HV_const_circulator;
+    typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle;
+
+    // store all vertices in a set
+    std::set<Vertex_const_handle> v;
+    for (typename Polyhedron::Vertex_const_iterator vit = p.vertices_begin();
+         vit != p.vertices_end(); vit++)
+      v.insert(vit);
+
+    while (!v.empty())
     {
-      s.erase(current_vertex);
-      recursive_remove<Polyhedron_type>(s, current_vertex);
+      // Add the component to the output
+      typename std::set<Vertex_const_handle>::iterator start_it = v.begin();
+      Vertex_const_handle start = *start_it;
+
+      *it = start;
+      it++;
+
+      // Remove rest of component
+      std::deque<Vertex_const_handle> queue;
+      queue.push_back(start);
+      while (!queue.empty())
+      {
+        Vertex_const_handle current = queue.front();
+        queue.pop_front();
+
+        if (v.count(current) > 0)
+        {
+          v.erase(current);
+
+          const HV_const_circulator h_start = current->vertex_begin();
+          HV_const_circulator h_current = h_start;
+          do
+          {
+            queue.push_back(h_current->opposite()->vertex());
+            h_current++;
+          } while (h_current != h_start);
+        }
+      }
     }
-    current++;
-  } while (current != start);
-}
-//-----------------------------------------------------------------------------
-// Scans the vertices of the polyhedron the polyhedron and returns a
-// Polyhedron::Vertex_const_handle for each disconnected component.
-template <typename Polyhedron, typename OutputIterator>
-void get_disconnected_components(const Polyhedron& p, OutputIterator it)
-{
-  typedef Polyhedron Polyhedron_t;
-  typedef typename Polyhedron_t::Vertex_const_handle Vertex_const_handle;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static std::vector<typename Polyhedron::Halfedge_handle>
+  get_holes(Polyhedron& P)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+
+    P.normalize_border();
+
+    std::set<Halfedge_handle> border_edges;
+    for (typename Polyhedron::Halfedge_iterator hit = P.border_halfedges_begin(); hit != P.halfedges_end(); hit++)
+    {
+      Halfedge_handle b = hit;
+      dolfin_assert(b->is_border_edge());
+      if (b->is_border())
+        border_edges.insert(b);
+      else if (b->opposite()->is_border())
+        border_edges.insert(b->opposite());
+      else
+        dolfin_assert(false);
+    }
+
+    std::vector<Halfedge_handle> border_begins;
+    while (!border_edges.empty())
+    {
+      Halfedge_handle current = *(border_edges.begin());
+      border_begins.push_back(current);
 
-  // store all vertices in a set
-  std::set<Vertex_const_handle> v;
-  for (typename Polyhedron_t::Vertex_const_iterator vit = p.vertices_begin();
-       vit != p.vertices_end(); vit++)
-    v.insert(vit);
+      std::size_t counter = 0;
+      const Halfedge_handle start = current;
+      do
+      {
+        dolfin_assert(border_edges.count(current) == 1);
+        border_edges.erase(current);
+        counter++;
+        current = current->next();
+      } while (current != start);
+    }
 
-  while (!v.empty())
+    return std::move(border_begins);
+  }
+  //-----------------------------------------------------------------------------
+  // Count the number of edges in a facet or along a hole
+  template<typename Halfedge_handle>
+  static std::size_t edge_count(Halfedge_handle h)
   {
-    // Add the component to the output
-    typename std::set<Vertex_const_handle>::iterator start_it = v.begin();
-    Vertex_const_handle start = *start_it;
-    v.erase(start_it);
+    Halfedge_handle current;
+    std::size_t counter = 0;
+    do
+    {
+      counter++;
+      current = current->next();
+    } while (current != h);
 
-    *it = start;
-    it++;
+    return counter;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static typename Polyhedron::Traits::Triangle_3 get_facet_triangle(typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
 
-    // Remove rest of component
-    recursive_remove<Polyhedron_t>(v, start);
+    dolfin_assert(h->facet()->is_triangle());
+
+    return Triangle_3(h->vertex()->point(),
+                      h->next()->vertex()->point(),
+                      h->next()->next()->vertex()->point());
   }
-}
-//-----------------------------------------------------------------------------
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+    static double cos_min_angle(typename Polyhedron::Traits::Vector_3 v,
+                                typename Polyhedron::Halfedge_handle h1,
+                                typename Polyhedron::Halfedge_handle h2)
+  {
+    v /= v.squared_length();
+
+    double max = 0;
+    typename Polyhedron::Halfedge_handle current = h1;
+    do
+    {
+      typename Polyhedron::Traits::Vector_3 w(current->vertex()->point(),
+                                              current->next()->vertex()->point());
+      w /= std::sqrt(CGAL::to_double(w.squared_length()));
+      max = std::max(std::abs(CGAL::to_double(w*v)));
+    } while (current != h2);
+
+    return max;
+  }
+  //-----------------------------------------------------------------------------
+  // Given a facet and a vertex (assumed to be incident to the facet), find the
+  // corresponding halfedge
+  template<typename Polyhedron>
+  static typename Polyhedron::Halfedge_handle
+  find_edge(typename Polyhedron::Vertex_handle v,
+            typename Polyhedron::Face_handle f)
+  {
+    dolfin_assert(v != typename Polyhedron::Vertex_handle());
+    dolfin_assert(f != typename Polyhedron::Face_handle());
+
+    typename Polyhedron::Halfedge_around_vertex_circulator start = v->vertex_begin();
+    typename Polyhedron::Halfedge_around_vertex_circulator current = start;
+
+    do
+    {
+      if (current->facet() == f)
+      {
+        dolfin_assert(current->vertex() == v && current->facet()  == f);
+        return current;
+      }
+
+      current++;
+    } while(current != start);
+
+    dolfin_assert(false);
+    return typename Polyhedron::Halfedge_handle();
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static typename Polyhedron::Facet_handle
+  find_common_facet(typename Polyhedron::Vertex_handle v0,
+                    typename Polyhedron::Vertex_handle v1,
+                    typename Polyhedron::Vertex_handle v2)
+  {
+    typedef typename Polyhedron::Halfedge_around_vertex_circulator He_circulator;
+    std::set<typename Polyhedron::Facet_handle> facets0;
+    {
+      He_circulator start = v0->vertex_begin();
+      He_circulator current = start;
+      do
+      {
+        if (!current->is_border())
+          facets0.insert(current->facet());
+
+        current++;
+      } while (current != start);
+    }
+
+    std::set<typename Polyhedron::Facet_handle> facets1;
+    {
+      He_circulator start = v1->vertex_begin();
+      He_circulator current = start;
+      do
+      {
+        if (!current->is_border() && facets0.count(current->facet()) > 0)
+          facets1.insert(current->facet());
+
+        current++;
+      } while (current != start);
+    }
+
+    std::set<typename Polyhedron::Facet_handle> facets2;
+    {
+      He_circulator start = v2->vertex_begin();
+      He_circulator current = start;
+      do
+      {
+        if (!current->is_border() && facets1.count(current->facet()) > 0)
+          facets2.insert(current->facet());
+
+        current++;
+      } while (current != start);
+    }
+
+    dolfin_assert(facets2.size() < 2);
+    dolfin_assert(facets2.size() > 0);
+
+    return *(facets2.begin());
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void insert_edge(Polyhedron& P,
+                          typename Polyhedron::Vertex_handle h,
+                          typename Polyhedron::Vertex_handle g,
+                          typename Polyhedron::Facet_handle f)
+  {
+    //std::pair<typename Polyhedron::Halfedge_handle, typename Polyhedron::Halfedge_handle>
+    //edges = find_edges(h_edge, g_edge);
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+
+    Halfedge_handle h_edge, g_edge;
+    const Halfedge_handle start = g->halfedge();
+    Halfedge_handle current = start;
+    do
+    {
+      if (current->vertex() == h)
+        h_edge = current;
+      else if(current->vertex() == g)
+        g_edge == current;
+    } while (current != start);
+
+    dolfin_assert(h_edge != Halfedge_handle() && g_edge != Halfedge_handle());
+    P.split_facet(h_edge, g_edge);
+    dolfin_assert(P.is_valid());
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Triangle_3>
+  static double get_triangle_cos_angle(Triangle_3 t1,
+                                       Triangle_3 t2)
+  {
+    typedef typename CGAL::Kernel_traits<Triangle_3>::Kernel::Vector_3 Vector_3;
+
+    const Vector_3 v1 = t1.supporting_plane().orthogonal_vector();
+    const Vector_3 v2 = t2.supporting_plane().orthogonal_vector();
+
+    return CGAL::to_double((v1*v2)/std::sqrt(CGAL::to_double(v1.squared_length()*v2.squared_length())));
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+    static double get_edge_cos_angle(typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Traits::Vector_3 Vector_3;
+
+    // std::cout << "get edge cos theta" << std::endl;
+
+    Vector_3 h1_vec(h->vertex()->point(), h->prev()->vertex()->point());
+    h1_vec = h1_vec/std::sqrt(CGAL::to_double(h1_vec.squared_length()));
+
+    // std::cout << "h1_vec_normalized: " << h1_vec << std::endl;
+    Vector_3 h2_vec(h->vertex()->point(), h->next()->vertex()->point());
+    h2_vec = h2_vec/std::sqrt(CGAL::to_double(h2_vec.squared_length()));
+    // std::cout << "h2_vec_normalized: " << h2_vec << std::endl;
+    const double cos_theta = CGAL::to_double(h1_vec*h2_vec);
+    // std::cout << "Cos theta: " << cos_theta << std::endl;
+    return cos_theta;
+  }
+  //-----------------------------------------------------------------------------
+  // Compute the plane fit quality of the vertices from h1 to h2 both included
+  // Return fitting quality, max projection distance, max cos angle
+  template<typename Polyhedron>
+  static std::array<double, 3>
+  get_plane_fit(const typename Polyhedron::Halfedge_handle h1,
+                const typename Polyhedron::Halfedge_handle h2)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Plane_3 Plane_3;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Vector_3 Vector_3;
+    typedef typename Polyhedron::Traits::FT FT;
+    typedef CGAL::Exact_predicates_inexact_constructions_kernel InexactKernel;
+    typedef typename InexactKernel::Plane_3 InexactPlane_3;
+    typedef typename InexactKernel::Point_3 InexactPoint_3;
+    //typedef typename InexactKernel::Segment_3 InexactSegment_3;
+    //typedef typename InexactKernel::Vector_3 InexactVector_3;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+
+    // std::cout << "Get plane fit" << std::endl;
+
+    // std::cout << "Polygon ";
+    std::vector<InexactPoint_3> points;
+    //std::vector<InexactSegment_3> segments;
+    Halfedge_handle current = h1;
+    do
+    {
+      const Point_3& p = current->vertex()->point();
+      // std::cout << ", " << p;
+      points.push_back(InexactPoint_3(CGAL::to_double(p[0]),
+                                      CGAL::to_double(p[1]),
+                                      CGAL::to_double(p[2])));
+      current = current->next();
+    } while (current != h2);
+
+    {
+      const Point_3& p = h2->vertex()->point();
+      // std::cout << ", " << p;
+      points.push_back(InexactPoint_3(CGAL::to_double(p[0]),
+                                      CGAL::to_double(p[1]),
+                                      CGAL::to_double(p[2])));
+    }
+
+    dolfin_assert(points.size() > 2);
+    // std::cout << "Size: " << points.size() << std::endl;
+    //std::cout << std::endl;
+    InexactPlane_3 fitting_plane_inexact;
+    const double fit_quality = CGAL::linear_least_squares_fitting_3(points.begin(),
+                                                                    points.end(),
+                                                                    fitting_plane_inexact,
+                                                                    CGAL::Dimension_tag<0>());
+    Plane_3 fitting_plane(fitting_plane_inexact.a(),
+                          fitting_plane_inexact.b(),
+                          fitting_plane_inexact.c(),
+                          fitting_plane_inexact.d());
+    // std::cout << "Plane: " << fitting_plane << std::endl;
+    // std::cout << "Length of normal: " << fitting_plane.orthogonal_vector().squared_length() << std::endl;
+    const Vector_3 normal = fitting_plane.orthogonal_vector()/std::sqrt(CGAL::to_double(fitting_plane.orthogonal_vector().squared_length()));
+
+    FT max_distance = (h1->vertex()->point()-fitting_plane.projection(h1->vertex()->point())).squared_length();
+    FT max_angle = 0;
+
+    Halfedge_handle prev = h1;
+    current = h1->next();
+    do
+    {
+      const Vector_3 v = current->vertex()->point()-prev->vertex()->point();
+      const FT cos_angle = v/std::sqrt(CGAL::to_double(v.squared_length())) * normal;
+      const Point_3 projection = fitting_plane.projection(current->vertex()->point());
+      max_angle = std::max(max_angle, cos_angle);
+      max_distance = std::max(max_distance, (current->vertex()->point()-projection).squared_length());
+
+      prev = current;
+      current = current->next();
+    } while (prev != h2);
+
+    // std::cout << "Fit quality: " << fit_quality << ", max distance: " << max_distance << ", cos_angle: " << max_angle << std::endl;
+    return std::array<double, 3>{fit_quality, CGAL::to_double(max_distance), CGAL::to_double(max_angle)};
+    // return -max_distance;
+    //return CGAL::to_double(fit_quality - max_angle);
+  }
+  //-----------------------------------------------------------------------------
+  // Compute the fit quality heuristic of the vertices from h1 to h2 both
+  // included Some experiences:
+
+  // The plane fit quality as returned from
+  // * CGAL::linear_least_squares_fitting_3() is not suitable here. It measures
+  // how distinct the best fitting plane is, rather than the actual quality of
+  // the fit.
+  // * The max angle between the segments and the normal work good is the hole
+  // has no more than one "kink".
+  // * The max distance from the points to their projection is also a pretty
+  // good measure, but needs to be normalized in some clever way if not used
+  // solely.
+  template<typename Polyhedron>
+  static double evaluate_hole_subdivision(const typename Polyhedron::Halfedge_handle h1,
+                                          const typename Polyhedron::Halfedge_handle h2)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef CGAL::Simple_cartesian<double> InexactKernel;
+    //typedef CGAL::Exact_predicates_inexact_constructions_kernel InexactKernel;
+    typedef typename InexactKernel::Plane_3 InexactPlane_3;
+    typedef typename InexactKernel::Point_3 InexactPoint_3;
+    typedef typename InexactKernel::Segment_3 InexactSegment_3;
+    typedef typename InexactKernel::Vector_3 InexactVector_3;
+
+    // double plane1fit;
+    double max_angle1 = 0;
+    InexactPlane_3 fitting_plane1;
+    double avg_distance_squared1 = 0;
+    {
+      std::vector<InexactSegment_3> segments;
+      Halfedge_handle current = h1;
+      do
+      {
+        const Point_3& p = current->vertex()->point();
+        const Point_3& next = current->next()->vertex()->point();
+        segments.push_back(InexactSegment_3(InexactPoint_3(CGAL::to_double(p[0]), CGAL::to_double(p[1]), CGAL::to_double(p[2])),
+                                            InexactPoint_3(CGAL::to_double(next[0]), CGAL::to_double(next[1]), CGAL::to_double(next[2]))));
+        current = current->next();
+      } while (current != h2);
+
+      {
+        const Point_3& p = h2->vertex()->point();
+        const Point_3& next = h1->vertex()->point();
+        segments.push_back(InexactSegment_3(InexactPoint_3(CGAL::to_double(p[0]), CGAL::to_double(p[1]), CGAL::to_double(p[2])),
+                                            InexactPoint_3(CGAL::to_double(next[0]), CGAL::to_double(next[1]), CGAL::to_double(next[2]))));
+      }
+
+      dolfin_assert(segments.size() > 2);
+
+      /* plane1fit = */ CGAL::linear_least_squares_fitting_3(segments.begin(),
+                                                             segments.end(),
+                                                             fitting_plane1,
+                                                             CGAL::Dimension_tag<1>());
+
+      // std::cout << "  Plane 1: " << fitting_plane1 << ", " << plane1fit << std::endl;
+
+      // Compute max angle between segment and fitting plane
+      const InexactVector_3 normal = fitting_plane1.orthogonal_vector();
+      // std::cout << "Length: " << normal.squared_length() << std::endl;
+      dolfin_assert(dolfin::near(normal.squared_length(), 1, DOLFIN_EPS_LARGE));
+      for (auto sit = segments.begin(); sit != segments.end(); sit++)
+      {
+        const InexactVector_3 v = InexactVector_3(*sit) / std::sqrt(sit->squared_length());
+        // std::cout << "Length: " << (v.squared_length()-1) << std::endl;
+        dolfin_assert(dolfin::near(v.squared_length(), 1, DOLFIN_EPS_LARGE));
+        max_angle1 = std::max(max_angle1, std::abs(v*normal));
+        // max_distance_squared1 = std::max(max_distance_squared1,
+        avg_distance_squared1 += InexactVector_3(sit->source(), fitting_plane1.projection(sit->source())).squared_length();
+      }
+      avg_distance_squared1 /= segments.size();
+    }
+
+    /* double plane2fit; */
+    InexactPlane_3 fitting_plane2;
+    double max_angle2 = 0;
+    //double max_distance_squared2 = 0;
+    double avg_distance_squared2 = 0;
+    {
+      std::vector<InexactSegment_3> segments;
+      Halfedge_handle current = h2;
+      do
+      {
+        const Point_3& p = current->vertex()->point();
+        const Point_3& next = current->next()->vertex()->point();
+        segments.push_back(InexactSegment_3(InexactPoint_3(CGAL::to_double(p[0]), CGAL::to_double(p[1]), CGAL::to_double(p[2])),
+                                            InexactPoint_3(CGAL::to_double(next[0]), CGAL::to_double(next[1]), CGAL::to_double(next[2]))));
+        current = current->next();
+      } while (current != h1);
+
+      const Point_3& p = h1->vertex()->point();
+      const Point_3& next = h2->vertex()->point();
+
+      segments.push_back(InexactSegment_3(InexactPoint_3(CGAL::to_double(p[0]), CGAL::to_double(p[1]), CGAL::to_double(p[2])),
+                                          InexactPoint_3(CGAL::to_double(next[0]), CGAL::to_double(next[1]), CGAL::to_double(next[2]))));
+
+      dolfin_assert(segments.size() > 2);
+      // std::cout << "  Size: " << segments.size() << std::endl;
+
+      /* plane2fit = */ CGAL::linear_least_squares_fitting_3(segments.begin(),
+                                                             segments.end(),
+                                                             fitting_plane2,
+                                                             CGAL::Dimension_tag<1>());
+
+      // std::cout << "  Plane 1: " << fitting_plane1 << ", " << plane1fit << std::endl;
+
+      // Compute max angle between plane and segments
+      const InexactVector_3 normal = fitting_plane2.orthogonal_vector();
+      dolfin_assert(dolfin::near(normal.squared_length(), 1, DOLFIN_EPS_LARGE));
+      for (auto sit = segments.begin(); sit != segments.end(); sit++)
+      {
+        const InexactVector_3 v = InexactVector_3(*sit) / std::sqrt(sit->squared_length());
+        dolfin_assert(dolfin::near(v.squared_length(), 1, DOLFIN_EPS_LARGE));
+        max_angle2 = std::max(max_angle2, std::abs(v*normal));
+        /* max_distance_squared2 = std::max(max_distance_squared2, */
+        /*                                  InexactVector_3(sit->source(), fitting_plane2.projection(sit->source())).squared_length()); */
+        avg_distance_squared2 += InexactVector_3(sit->source(), fitting_plane2.projection(sit->source())).squared_length();
+      }
+      avg_distance_squared2 /= segments.size();
+    }
+
+    // const double cos_angle = fitting_plane1.orthogonal_vector()*fitting_plane2.orthogonal_vector();
+    // std::cout << "  Angle: " << cos_angle << "(" << acos(cos_angle)/(2*DOLFIN_PI)*360 << ")" << std::endl;
+    // std::cout << "Max angles: " << max_angle1 << "(" << acos(max_angle1)/(2*DOLFIN_PI)*360 << "), " << max_angle2 << " (" << acos(max_angle2)/(2*DOLFIN_PI)*360 << ")" << std::endl;
+    // return std::min(plane1fit, plane2fit); // - .04*cos_angle - .05*max_angle1 - .05*max_angle2;// + triangulation_extra;
+
+    //return (-avg_distance_squared1 - avg_distance_squared2)/std::max(max_angle1, max_angle2); ///std::min(plane1fit, plane2fit);
+    return -std::max(max_angle1, max_angle2);
+  }
+  //-----------------------------------------------------------------------------
+  // This class is capable of filling a hole in a polyhedron by inserting
+  // a 2D triangulation.
+  // TODO: This needs to be fixed!
+  template <class Polyhedron, class CDT>
+  class Triangulation_inserter
+    : public CGAL::Modifier_base<typename Polyhedron::HalfedgeDS>
+  {
+   public:
+    typedef typename Polyhedron::HalfedgeDS HalfedgeDS;
+    typedef typename Polyhedron::Vertex Vertex;
+    typedef typename Polyhedron::Halfedge_around_vertex_circulator He_circ;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename CDT::Geom_traits::Point_3 InexactPoint_3;
+    typedef typename Polyhedron::Vertex_handle Vertex_handle;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits Traits;
+    typedef typename CGAL::Aff_transformation_3<typename CDT::Geom_traits> Aff_transformation_3;
+
+    // Constructor
+ Triangulation_inserter(CDT& cdt, Aff_transformation_3 tr, double z, Halfedge_handle h)
+   : cdt(cdt), tr(tr), z(z), h(h)
+    {}
+
+    void operator()(HalfedgeDS& hds)
+    {
+      CGAL::HalfedgeDS_decorator<HalfedgeDS> decorator(hds);
+      typedef typename HalfedgeDS::Halfedge Halfedge;
+
+      std::map<std::pair<Vertex_handle, Vertex_handle>, Halfedge_handle> inserted_edges;
+
+      // Collect the already existing edges on the boundary
+      Halfedge_handle current = h;
+      do
+      {
+        inserted_edges[std::make_pair(current->vertex(), current->next()->vertex())] = current->next();
+        current = current->next();
+      } while (current != h);
+
+      std::size_t vcounter = 0;
+      std::vector<Vertex_handle> inserted_vertices;
+
+      for (typename CDT::Finite_vertices_iterator vit = cdt.finite_vertices_begin();
+           vit != cdt.finite_vertices_end(); vit++)
+      {
+        if (vit->info() == Vertex_handle())
+        {
+          // std::cout << "Inserting new vertex" << std::endl;
+          Vertex_handle v = decorator.vertices_push_back(Vertex());
+          inserted_vertices.push_back(v);
+          vit->info() = v;
+          const InexactPoint_3 p(vit->point()[0], vit->point()[1], z);
+          const InexactPoint_3 rotated = tr.transform(p);
+          v->point() = Point_3(rotated[0], rotated[1], rotated[2]);
+          vcounter++;
+        }
+      }
+
+      // std::cout << vcounter << " vertices inserted" << std::endl;
+
+      std::size_t fcounter = 0;
+      for (typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin();
+           fit != cdt.finite_faces_end(); fit++)
+      {
+        if (fit->is_in_domain())
+        {
+          // std::cout << "Inserting face" << std::endl;
+
+          // Check if any of the edges are missing
+          std::array<Vertex_handle, 3> vertices{fit->vertex(0)->info(),
+                                                fit->vertex(1)->info(),
+                                                fit->vertex(2)->info()} ;
+          dolfin_assert(vertices[0] != Vertex_handle());
+          dolfin_assert(vertices[1] != Vertex_handle());
+          dolfin_assert(vertices[2] != Vertex_handle());
+
+          // std::cout << "Creating edges" << std::endl;
+          std::array<Halfedge_handle, 3> edges;
+          for (std::size_t i = 0; i < 3; i++)
+          {
+            if (inserted_edges.count(std::make_pair(vertices[i], vertices[(i+1)%3])) == 0)
+            {
+              Halfedge_handle hnew = hds.edges_push_back(Halfedge(),
+                                                         Halfedge());
+              decorator.set_vertex(hnew, vertices[(i+1)%3]);
+              decorator.set_vertex(hnew->opposite(), vertices[i]);
+              inserted_edges[std::make_pair(vertices[i], vertices[(i+1)%3])] = hnew;
+              inserted_edges[std::make_pair(vertices[(i+1)%3], vertices[i])] = hnew->opposite();
+              edges[i] = hnew;
+            }
+            else
+              edges[i] = inserted_edges[std::make_pair(vertices[i], vertices[(i+1)%3])];
+          }
+
+          // std::cout << "Now creating face" << std::endl;
+
+          // This typedef for some reason gives a "unused local typedef" warning
+          //from clang (...?) --> write out the typename in the statements
+          //below.
+          // typedef typename Halfedge::Base HBase;
+          edges[0]->Halfedge::Base::set_next(edges[1]);
+          decorator.set_prev(edges[1], edges[0]);
+          edges[1]->Halfedge::Base::set_next(edges[2]);
+          decorator.set_prev(edges[2], edges[1]);
+          edges[2]->Halfedge::Base::set_next(edges[0]);
+          decorator.set_prev(edges[0], edges[2]);
+
+          decorator.fill_hole(edges[0]);
+
+          fcounter++;
+        }
+      }
+
+      // std::cout << "Added " << fcounter << " faces" << std::endl;
+    }
+
+    CDT& cdt;
+    const CGAL::Aff_transformation_3<typename CDT::Geom_traits> tr;
+    const double z;
+    const Halfedge_handle h;
+  };
+
+  //-----------------------------------------------------------------------------
+  // Compute the transformation that rotates a given vector (assumed to be of
+  // unit length) into (0,0,1)
+  template<typename Vector_3>
+  static CGAL::Aff_transformation_3<typename CGAL::Kernel_traits<Vector_3>::Kernel>
+    rotate_to_xy(Vector_3 a)
+  {
+    const typename CGAL::Kernel_traits<Vector_3>::Kernel::FT den = a[0]*a[0] + a[1]*a[1];
+    return CGAL::Aff_transformation_3<typename CGAL::Kernel_traits<Vector_3>::Kernel>
+      (1 - a[0]*a[0]*(1-a[2])/den, -a[0]*a[1]*(1-a[2])/den,   -a[0],
+       - a[0]*a[1]*(1-a[2])/den,   1 -a[1]*a[1]*(1-a[2])/den, -a[1],
+       a[0],                       a[1],                      1 + (-a[0]*a[0]-a[1]*a[1])*(1-a[2])/den);
+  }
+  //-----------------------------------------------------------------------------
+  /// Attempts to triangulate a polygon in 3d by projecting vertices into the
+  /// best fitting plane and triangulating in 2d.
+  /// Return the new added edges.
+  /// If the triangulation is not possible (the boundary self intersects in this 2d plane) then
+  /// the return vector is empty
+  template <typename Polyhedron>
+  static bool triangulate_polygon_3d(Polyhedron& P,
+                                     typename Polyhedron::Halfedge_handle h,
+                                     bool check_for_intersections = true)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Vertex_handle Vertex_handle;
+    typedef typename Polyhedron::Facet_handle Facet_handle;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Segment_3 Segment_3;
+
+    typedef CGAL::Exact_predicates_inexact_constructions_kernel InexactKernel;
+    typedef typename InexactKernel::Plane_3 InexactPlane_3;
+    typedef typename InexactKernel::Point_3 InexactPoint_3;
+    typedef typename InexactKernel::Vector_3 InexactVector_3;
+    typedef typename InexactKernel::Point_2 InexactPoint_2;
+    typedef typename InexactKernel::Segment_2 InexactSegment_2;
+    typedef typename InexactKernel::Segment_3 InexactSegment_3;
+
+    typedef CGAL::Triangulation_vertex_base_with_info_2<Vertex_handle, InexactKernel> Vb;
+    typedef CGAL::Delaunay_mesh_face_base_2<InexactKernel> Fb;
+    typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
+    typedef CGAL::No_intersection_tag Itag;
+    typedef CGAL::Constrained_Delaunay_triangulation_2<InexactKernel, TDS, Itag> CDT;
+    typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Mesh_criteria_2;
+    typedef CGAL::Delaunay_mesher_no_edge_refinement_2<CDT, Mesh_criteria_2>  CGAL_Mesher_2;
+
+    dolfin_assert(P.is_valid());
+    // std::cout << "Triangulating hole as 2d polygon" << std::endl;
+
+    // Compute the best fitting plane of the points of the hole
+    InexactPlane_3 fitting_plane;
+    // double fit_quality;
+    {
+      std::vector<InexactSegment_3> boundary;
+      Halfedge_handle current = h;
+      do
+      {
+        const Point_3& p = current->vertex()->point();
+        const Point_3& next = current->next()->vertex()->point();
+        boundary.push_back(InexactSegment_3(InexactPoint_3(CGAL::to_double(p[0]), CGAL::to_double(p[1]), CGAL::to_double(p[2])),
+                                            InexactPoint_3(CGAL::to_double(next[0]), CGAL::to_double(next[1]), CGAL::to_double(next[2]))));
+
+        current = current->next();
+      } while (current != h);
+
+      const double fit_quality = CGAL::linear_least_squares_fitting_3(boundary.begin(),
+                                                                      boundary.end(),
+                                                                      fitting_plane,
+                                                                      CGAL::Dimension_tag<1>());
+      double min_cos_normal_angle = 0;
+      const InexactVector_3 normal = fitting_plane.orthogonal_vector();
+      double max_squared_distance = 0;
+      dolfin_assert(dolfin::near(normal.squared_length(), 1, DOLFIN_EPS_LARGE));
+
+      InexactVector_3 prev = InexactVector_3(boundary[boundary.size()-1]) / std::sqrt(boundary[boundary.size()-1].squared_length());
+      for (auto sit = boundary.begin(); sit != boundary.end(); sit++)
+      {
+        InexactVector_3 current = InexactVector_3(*sit) / std::sqrt(sit->squared_length());
+        max_squared_distance = std::max(max_squared_distance, (sit->source()-fitting_plane.projection(sit->source())).squared_length());
+
+        // std::cout << "Length: " << sit->squared_length() << ", " << current.squared_length() << ", " << (current*normal) << std::endl;
+        dolfin_assert(dolfin::near(current.squared_length(), 1, DOLFIN_EPS_LARGE));
+        min_cos_normal_angle = std::max(min_cos_normal_angle, std::abs(current*normal));
+        prev = current;
+      }
+
+      // std::cout << "Max abs cos normal angle: " << min_cos_normal_angle << std::endl;
+      // std::cout << "Plane quality: " << fit_quality << std::endl;
+      // std::cout << "Max distance: " << std::sqrt(max_squared_distance) << std::endl;
+
+      // FIXME: Improve this test
+      if (fit_quality < .95 || min_cos_normal_angle > .3)
+      {
+        // std::cout << "Rejecting 2d triangulating" << std::endl;
+        return false;
+      }
+    }
+
+    // Compute rotation that will rotate the fitting plane to the xy plane
+    const CGAL::Aff_transformation_3<InexactKernel> rotation = rotate_to_xy(fitting_plane.orthogonal_vector());
+    double z = 0;//  = rotation.transform(InexactPoint_3(CGAL::to_double(h->vertex()->point()[0]),
+    //                              CGAL::to_double(h->vertex()->point()[1]),
+    //                                                 CGAL::to_double(h->vertex()->point()[2])))[2];
+
+    // std::cout << "Rotate normal: " << rotation.transform(fitting_plane.orthogonal_vector()) << std::endl;
+    dolfin_assert(dolfin::near(fitting_plane.orthogonal_vector().squared_length(), 1, DOLFIN_EPS_LARGE));
+
+    CDT cdt;
+
+    // std::cout << "Projected polygon" << std::endl;
+    // std::cout << "Polygon";
+
+    // Insert vertices into 2D triangulation
+    std::vector<typename CDT::Vertex_handle> vertices;
+    double max_squared_edge_length = 0;
+
+    {
+      Halfedge_handle current = h;
+      Point_3 prev = current->prev()->vertex()->point();
+      do
+      {
+
+        const Point_3& p = current->vertex()->point();
+        max_squared_edge_length = std::max(max_squared_edge_length, CGAL::to_double(Segment_3(prev, p).squared_length()));
+        const InexactPoint_3 rotated = rotation.transform(InexactPoint_3(CGAL::to_double(p[0]),
+                                                                         CGAL::to_double(p[1]),
+                                                                         CGAL::to_double(p[2])));
+        z += rotated[2];
+        // std::cout << " " << rotated << ", ";
+
+        const InexactPoint_2 p_2d(rotated[0], rotated[1]);
+
+        // std::cout << " " << p_2d << ", ";
+
+        vertices.push_back(cdt.insert(p_2d));
+        vertices.back()->info() = current->vertex();
+
+        prev = p;
+        current = current->next();
+      } while (current != h);
+
+      // std::cout << std::endl;
+    }
+
+    // std::cout << "Size of points: " << vertices.size() << std::endl;
+    z /= vertices.size();
+
+    // Check if any of the edges intersect (before actually adding the
+    // constrained edges to the triangulation
+    if (check_for_intersections)
+    {
+      for (std::size_t i = 0; i < vertices.size()-1; i++)
+      {
+        const Point_3& a = vertices[i]->info()->point(), b = vertices[+1]->info()->point();
+        const InexactSegment_2 s(vertices[i]->point(), vertices[i+1]->point());
+        const Segment_3 original(a, b);
+
+        const InexactSegment_3 s2(fitting_plane.projection(InexactPoint_3(CGAL::to_double(a[0]),
+                                                                          CGAL::to_double(a[1]),
+                                                                          CGAL::to_double(a[2]))),
+                                  fitting_plane.projection(InexactPoint_3(CGAL::to_double(b[0]),
+                                                                          CGAL::to_double(b[1]),
+                                                                          CGAL::to_double(b[2]))));
+
+        for (std::size_t j = i+1; j < vertices.size(); j++)
+        {
+          InexactSegment_2 s2(vertices[j]->point(), vertices[(j+1)%vertices.size()]->point());
+
+          const auto intersection = CGAL::intersection(s, s2);
+
+          if (intersection)
+          {
+            if (boost::get<InexactPoint_2>(&*intersection))
+            {
+              if (j != i+1 && i != (j+1)%vertices.size())
+              {
+                //std::cout << "Non-neighbors (" << i << ", " << j << ")/" << vertices.size()
+                //          << " intersect in single point" << std::endl;
+
+                return false;
+              }
+            }
+            else if (boost::get<InexactSegment_2>(&*intersection))
+            {
+              // std::cout << "Intersects in segment" << std::endl;
+              return false;
+            }
+            else
+            {
+              dolfin_assert(false);
+              return false;
+            }
+          } // end if intersection
+        } // end inner loop
+      } // end outer loop
+
+      // No edges intersect, so we can safely insert then as constraints to the
+      // triangulation
+    }
+
+    // Insert the edges around the facet as constraints to the triangulation
+    for (std::size_t i = 0; i < vertices.size(); i++)
+    {
+      cdt.insert_constraint(vertices[i], vertices[(i+1)%vertices.size()]);
+    }
+
+    // std::cout << "Done triangulating" << std::endl;
+    // std::cout << "Num vertices: " << cdt.number_of_vertices() << std::endl;
+
+    // Create mesher
+    CGAL_Mesher_2 mesher(cdt);
+
+    // Set shape and size criteria
+    mesher.set_criteria(Mesh_criteria_2(.125, std::sqrt(max_squared_edge_length)));
+
+    // Refine CGAL mesh/triangulation
+    mesher.refine_mesh();
+
+    // std::cout << "Done meshing. Num vertices: " << cdt.number_of_vertices() << std::endl;
+
+    // Collecting faces inside the polygon
+    std::set<typename CDT::Face_handle> faces_inside;
+    std::size_t num_cells = 0;
+    for (typename CDT::Finite_faces_iterator cgal_cell = cdt.finite_faces_begin();
+         cgal_cell != cdt.finite_faces_end(); ++cgal_cell)
+    {
+      // Add cell if it is in the domain
+      if (cgal_cell->is_in_domain())
+      {
+        faces_inside.insert(cgal_cell);
+        num_cells++;
+      }
+    }
+
+    // std::cout << "Collected " << num_cells << " faces inside" << std::endl;
+
+    // Check if any of the triangles will intersect when transformed back to
+    // the polyhedron.
+    /* std::cout << "Checking if triangulation can be inserted without introducing self intersections" << std::endl; */
+
+    /* std::vector<Triangle_3> triangle_set; */
+
+    /* // Collect neighbor triangles */
+    /* Halfedge_handle current = h; */
+    /* do */
+    /* { */
+    /*   if (!current->opposite()->is_border() && current->opposite()->facet()->facet_degree() == 3) */
+    /*   { */
+    /*     triangle_set.push_back(get_facet_triangle<Polyhedron>(current->opposite())); */
+    /*   } */
+    /*   current = current->next(); */
+    /* } while (current != h); */
+
+    /* const auto rotate_back = rotation.inverse(); */
+
+    /* for (auto fit = faces_inside.begin(); fit != faces_inside.end(); ++fit) */
+    /* { */
+    /*   Point_3 t0; */
+    /*   if ((*fit)->vertex(0)->info() != Vertex_handle()) */
+    /*     t0 = (*fit)->vertex(0)->info()->point(); */
+    /*   else */
+    /*   { */
+    /*     InexactPoint_3 t_ = rotate_back.transform(InexactPoint_3( (*fit)->vertex(0)->point()[0], */
+    /*                                                               (*fit)->vertex(0)->point()[1], */
+    /*                                                               z)); */
+    /*     t0 = Point_3(t_[0], t_[1], t_[2]); */
+    /*   } */
+
+    /*   Point_3 t1; */
+    /*   if ((*fit)->vertex(1)->info() != Vertex_handle()) */
+    /*     (*fit)->vertex(1)->info()->point(); */
+    /*   else */
+    /*   { */
+    /*     InexactPoint_3 t_ = rotate_back.transform(InexactPoint_3( (*fit)->vertex(1)->point()[0], */
+    /*                                                               (*fit)->vertex(1)->point()[1], */
+    /*                                                               z)); */
+    /*     t1 = Point_3(t_[0], t_[1], t_[2]); */
+    /*   } */
+
+    /*   Point_3 t2; */
+    /*   if ((*fit)->vertex(2)->info() != Vertex_handle()) */
+    /*     t2 = (*fit)->vertex(2)->info()->point(); */
+    /*   else */
+    /*   { */
+    /*     InexactPoint_3 t_ = rotate_back.transform(InexactPoint_3( (*fit)->vertex(2)->point()[0], */
+    /*                                                               (*fit)->vertex(2)->point()[1], */
+    /*                                                               z)); */
+    /*     t2 = Point_3(t_[0], t_[1], t_[2]); */
+    /*   } */
+
+    /*   Triangle_3 t(t0, t1, t2); */
+    /*   if (triangle_set_intersect_triangle(t, triangle_set)) */
+    /*   { */
+    /*     std::cout << "2D triangulation cancelled! Will introduce self intersections" << std::endl; */
+    /*     { int tmp; std::cin >> tmp; } */
+    /*     return false; */
+    /*   } */
+
+    /*   triangle_set.push_back(t); */
+    /* } */
+
+    /* std::cout << "  Done" << std::endl; */
+
+    // Triangles did not intersect any of the surrounding triangles
+
+    dolfin_assert(cdt.is_valid());
+
+    // Triangulation_inserter<Polyhedron, CDT> modifier(cdt, rotation.inverse(), z, h);
+    // P.delegate(modifier);
+
+    std::set<typename CDT::Face_handle> faces;
+    for (typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin();
+         fit != cdt.finite_faces_end(); fit++)
+    {
+      if (fit->is_in_domain())
+        faces.insert(fit);
+    }
+    // std::cout << "Faces to be insered: " << faces.size() << std::endl;
+    // std::size_t countdown = faces.size()+40;
+
+    // TODO: This works, but is incredibly slow for large holes. Should be
+    // possible to insert the new vertices and edges directly to the HDS of the
+    // polyhedron using a modifier.
+
+    while (faces.size() > 0)
+    {
+      // std::cout << "---- Face iteration (outer): " << h->facet()->facet_degree() << std::endl;
+      auto fit = faces.begin();
+      while (fit != faces.end())
+      {
+        dolfin_assert(P.is_valid());
+
+        typename std::set<typename CDT::Face_handle>::iterator f = fit;
+        fit++;
+
+        dolfin_assert(!h->is_border());
+
+        std::array<typename CDT::Vertex_handle, 3> vertices{{(*f)->vertex(0),
+                                                             (*f)->vertex(1),
+                                                             (*f)->vertex(2)}};
+
+        if (vertices[0]->info() != Vertex_handle() &&
+            vertices[1]->info() != Vertex_handle() &&
+            vertices[2]->info() != Vertex_handle())
+        {
+          // ear cut, all vertices already exists
+          // std::cout << "All vertices present" << std::endl;
+          const Facet_handle common_facet = find_common_facet<Polyhedron>(vertices[0]->info(),
+                                                                          vertices[1]->info(),
+                                                                          vertices[2]->info());
+          if (common_facet->facet_degree() > 3)
+          {
+            dolfin_assert(common_facet == h->facet());
+            std::array<Halfedge_handle, 3> halfedges {{find_edge<Polyhedron>(vertices[0]->info(), h->facet()),
+                                                       find_edge<Polyhedron>(vertices[1]->info(), h->facet()),
+                                                       find_edge<Polyhedron>(vertices[2]->info(), h->facet())}};
+
+            /* std::cout << "Vertices: " << std::distance(P.halfedges_begin(), halfedges[0]) << ", " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[1]) << ", " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[2]) << std::endl; */
+
+            /* std::cout << "0: " << std::distance(P.halfedges_begin(), halfedges[0]->prev()) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[0]) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[0]->next()) << std::endl; */
+            /* std::cout << "1: " << std::distance(P.halfedges_begin(), halfedges[1]->prev()) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[1]) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[1]->next()) << std::endl; */
+            /* std::cout << "2: " << std::distance(P.halfedges_begin(), halfedges[2]->prev()) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[2]) << " - " */
+            /*           << std::distance(P.halfedges_begin(), halfedges[2]->next()) << std::endl; */
+
+            // Check how many edges are already present
+            // insert edge (2 <--> 0), ie cut 1
+            if ((halfedges[2]->next() == halfedges[1] &&
+                 halfedges[2]->next()->next() == halfedges[0]) ||
+                (halfedges[0]->next() == halfedges[1] &&
+                 halfedges[0]->next()->next() == halfedges[2]))
+            {
+              // std::cout << "inserting (2-0)" << std::endl;
+              h = halfedges[1]->next()->next();
+              P.split_facet(halfedges[2], halfedges[0]);
+            }
+            // insert edge (2 <--> 1), ie cut 0
+            else if ((halfedges[1]->next() == halfedges[0] &&
+                        halfedges[1]->next()->next() == halfedges[2]) ||
+                       (halfedges[2]->next() == halfedges[0] &&
+                        halfedges[2]->next()->next() == halfedges[1]))
+            {
+              // std::cout << "inserting (2-1)" << std::endl;
+              h = halfedges[0]->next()->next();
+              P.split_facet(halfedges[2], halfedges[1]);
+            }
+            // insert edge (0 <--> 1), ie cut 2
+            else if ((halfedges[0]->next() == halfedges[2] &&
+                      halfedges[0]->next()->next() == halfedges[1]) ||
+                     (halfedges[1]->next() == halfedges[2] &&
+                      halfedges[1]->next()->next() == halfedges[0]))
+            {
+              // std::cout << "inserting (0-1)" << std::endl;
+              h = halfedges[2]->next()->next();
+              P.split_facet(halfedges[0], halfedges[1]);
+            }
+            else
+            {
+              // Note that even if all the vertices have been inserted, we may
+              // miss edges
+              continue;
+            }
+          }
+
+          // print sometimes
+          /* if (countdown-faces.size() > 100) */
+          /* { */
+          /*   std::cout << "Face iteration (inner): " << faces.size() << std::endl; */
+          /*   countdown = faces.size(); */
+          /* } */
+
+          faces.erase(f);
+          continue;
+        }
+        else
+        {
+          for (std::size_t i = 0; i < 3; i++)
+          {
+            if (vertices[i]->info() != Vertex_handle() &&
+                vertices[(i+1)%3]->info() == Vertex_handle() &&
+                vertices[(i+2)%3]->info() != Vertex_handle())
+            {
+              // std::cout << "vertex insertion (" << i << ")" << std::endl;
+              Halfedge_handle h1 = find_edge<Polyhedron>(vertices[i]->info(), h->facet());
+              Halfedge_handle h2 = find_edge<Polyhedron>(vertices[(i+2)%3]->info(), h->facet());
+
+              if (h1->next() != h2)
+              {
+                Halfedge_handle tmp = h1;
+                h1 = h2;
+                h2 = tmp;
+              }
+              if (h1->next() != h2)
+                break;
+
+              dolfin_assert(h1->next() == h2);
+
+              h = h2->next();
+
+              // We are not allowed to introduce multiedges, so we can't do
+              // split_facet(h1, h2)
+              // Split facet w
+              // std::cout << "adding diagonal" << std::endl;
+              Halfedge_handle new_diagonal = P.split_facet(h2, h2->next()->next());
+              dolfin_assert(new_diagonal->prev() == h2);
+              // std::cout << "Adding new vertex" << std::endl;
+              Halfedge_handle new_vertex = P.split_edge(new_diagonal);
+              dolfin_assert(new_vertex->prev() == h2);
+              // std::cout << "Rotating back" << std::endl;
+              const auto rotate_back = rotation.inverse();
+              InexactPoint_3 new_point = rotate_back.transform(InexactPoint_3(vertices[(i+1)%3]->point()[0],
+                                                                              vertices[(i+1)%3]->point()[1],
+                                                                              z));
+              new_vertex->vertex()->point() = Point_3(new_point[0],
+                                                      new_point[1],
+                                                      new_point[2]);
+
+              //Vertex_handle v = new_vertex->vertex();
+              typename CDT::Vertex_handle v_vdt = vertices[(i+1)%3];
+              // std::cout << "Setting new vertex as info" << std::endl;
+
+              vertices[(i+1)%3]->info() = new_vertex->vertex();
+              // std::cout << "Splitting facet" << std::endl;
+              P.split_facet(h1, new_vertex);
+
+              dolfin_assert(h2->facet()->facet_degree() == 3);
+              dolfin_assert(h2->prev()->vertex() == h1->vertex());
+              // std::cout << "Joining facet" << std::endl;
+              P.join_facet(new_diagonal);
+
+              //dolfin_assert(edge_count(h2) == 3);
+              // std::cout << "New facet size: " << h->facet()->facet_degree() << std::endl;
+              // std::cout << "Erasing facet" << std::endl;
+              faces.erase(f);
+              // std::cout << "Breaking" << std::endl;
+              break;
+            }
+          }
+        }
+      }
+    }
+
+    //P.normalize_border();
+    // dolfin_assert(P.is_valid(false, 1));
+
+    return true;
+  }
+  //-----------------------------------------------------------------------------
+  /* template <typename Polyhedron> */
+  /* void min_vertex_degree(const Polyhedron& p) */
+  /* { */
+  /*   std::size_t min_degree = std::numeric_limits<std::size_t>::max(); */
+  /*   std::size_t min_degree_non_border = min_degree; */
+
+  /*   for (typename Polyhedron::Vertex_const_iterator vit = p.vertices_begin(); */
+  /*        vit != p.vertices_end(); vit++) */
+  /*   { */
+  /*     min_degree = std::min(min_degree, vit->vertex_degree); */
+
+  /*   } */
+
+  /*   std::cout << "Min vertex_degree: " << min_degree << std::endl; */
+  /* } */
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void list_hole(typename Polyhedron::Halfedge_handle h)
+  {
+    std::size_t counter = 0;
+    // std::cout << "Polygon";
+
+    {
+      typename Polyhedron::Halfedge_handle current = h;
+      do
+      {
+        counter++;
+        current = current->next();
+      } while(current != h);
+    }
+
+    // if (counter < 250)
+    // {
+      typename Polyhedron::Halfedge_handle current = h;
+      do
+      {
+        // std::cout << " " << current->vertex()->point() << ",";
+
+        current = current->next();
+      } while(current != h);
+      // }
+      // std::cout << std::endl;
+
+      // std::cout << " size: " << counter << std::endl;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static std::string print_triangle(typename Polyhedron::Halfedge_handle h)
+  {
+    std::stringstream ss;
+    ss << "Triangle "
+              << h->prev()->vertex()->point() << ", "
+              << h->vertex()->point() << ", "
+              << h->next()->vertex()->point() << std::endl;
+    ss << "Area: " << triangle_area<Polyhedron>(h) << std::endl;
+    return ss.str();
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static double triangle_area(typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+
+    Triangle_3 t(h->prev()->vertex()->point(),
+                 h->vertex()->point(),
+                 h->next()->vertex()->point());
+
+    return CGAL::to_double(t.squared_area());
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static typename Polyhedron::Vertex_handle get_common_vertex(typename Polyhedron::Facet_handle f1,
+                                                              typename Polyhedron::Facet_handle f2)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Vertex_handle Vertex_handle;
+
+    // Find common vertex
+    Halfedge_handle h1 = f1->halfedge();
+    Halfedge_handle current1 = h1;
+    do
+    {
+      Halfedge_handle h2 = f2->halfedge();
+      Halfedge_handle current2 = h2;
+      do
+      {
+        if (current2->vertex() == current1->vertex())
+          return current2->vertex();
+
+        current2 = current2->next();
+      } while (h2 != current2);
+
+      current1 = current1->next();
+    } while (h1 != current1);
+
+    return Vertex_handle();
+  }
+  //-----------------------------------------------------------------------------
+  template <typename Polyhedron>
+  static double facet_angle(typename Polyhedron::Halfedge_handle h)
+  {
+    dolfin_assert(h->is_border());
+    dolfin_assert(h->next()->is_border());
+
+    typedef typename Polyhedron::Traits::Line_3 Line_3;
+    typedef typename Polyhedron::Traits::Vector_3 Vector_3;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+
+    const Line_3 l(h->prev()->vertex()->point(),
+                   h->vertex()->point());
+
+    const Point_3& p11 = h->next()->vertex()->point();
+    const Point_3  p12 = l.projection(p11);
+    const Vector_3 v1(p12, p11);
+
+    dolfin_assert(h->opposite()->facet()->is_triangle());
+
+    const Point_3& p21 = h->opposite()->next()->vertex()->point();
+    const Point_3  p22 = l.projection(p21);
+    const Vector_3 v2(p22, p21);
+
+    return CGAL::to_double((v1*v2)/std::sqrt(CGAL::to_double(v1.squared_length()*v2.squared_length())));
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Segment_3>
+  static bool segment_intersects_triangle(const Segment_3& s,
+                                          const typename CGAL::Kernel_traits<Segment_3>::Kernel::Triangle_3& t)
+  {
+    typedef typename CGAL::Kernel_traits<Segment_3>::Kernel::Point_3 Point_3;
+
+    auto result = CGAL::intersection(s, t);
+    if (!result)
+      return false;
+
+    if (const Point_3* p = boost::get<Point_3>(&*result))
+    {
+      if (*p == t[0] || *p == t[1] || *p == t[2])
+        return false;
+      else
+        return true;
+    }
+    else if (const Segment_3* s_ = boost::get<Segment_3>(&*result))
+    {
+      if ( (s.source() == t[0] || s.source() == t[1] || s.source() == t[2]) &&
+           (s.target() == t[0] || s.target() == t[1] || s.target() == t[2]) )
+        return false;
+      else
+        return true;
+    }
+
+    dolfin_assert(false);
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  // Check if two triangles intersect.
+  // Neighbor triangles (share a vertice or an edge) do not intersect
+  // if t1 == t2 (geometrically), the triangles do not intersect
+  template<typename Triangle_3>
+  static bool triangles_intersect(const Triangle_3& t1, const Triangle_3& t2)
+  {
+    typedef typename CGAL::Kernel_traits<Triangle_3>::Kernel::Point_3 Point_3;
+    typedef typename CGAL::Kernel_traits<Triangle_3>::Kernel::Segment_3 Segment_3;
+
+    if ( (t1[0] == t2[0] || t1[0] == t2[1] || t1[0] == t2[2]) &&
+         (t1[1] == t2[0] || t1[1] == t2[1] || t1[1] == t2[2]) &&
+         (t1[2] == t2[0] || t1[2] == t2[1] || t1[2] == t2[2]))
+      return false;
+
+    auto result = CGAL::intersection(t1, t2);
+
+    if (!result)
+      return false;
+
+    if (const Point_3* p = boost::get<Point_3>(&*result))
+    {
+      if (t1[0] == t2[0] || t1[0] == t2[1] || t1[0] == t2[2] ||
+          t1[1] == t2[0] || t1[1] == t2[1] || t1[1] == t2[2] ||
+          t1[2] == t2[0] || t1[2] == t2[1] || t1[2] == t2[2])
+        return false;
+      else
+        return true;
+    }
+    else if (const Segment_3* s = boost::get<Segment_3>(&*result))
+    {
+      std::size_t common_vertices = 0;
+      if (t1[0] == t2[0] || t1[0] == t2[1] || t1[0] == t2[2])
+        common_vertices++;
+
+      if (t1[1] == t2[0] || t1[1] == t2[1] || t1[1] == t2[2])
+        common_vertices++;
+
+      if (t1[2] == t2[0] || t1[2] == t2[1] || t1[2] == t2[2])
+        common_vertices++;
+
+      if (common_vertices > 1)
+        return false;
+      else
+        return true;
+    }
+    else if (const Triangle_3* t = boost::get<Triangle_3>(&*result))
+      return true;
+    else if (const std::vector<Point_3>* v = boost::get<std::vector<Point_3> >(&*result))
+      return true;
+
+    dolfin_assert(false);
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Triangle_3>
+  static bool triangle_set_intersects(const std::vector<Triangle_3>& t)
+  {
+    for (std::size_t i = 0; i < t.size(); i++)
+    {
+      for (std::size_t j = i+1; j < t.size(); j++)
+      {
+        if (triangles_intersect<Triangle_3>(t[i], t[j]))
+          return true;
+      }
+    }
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Halfedge_handle>
+  static std::size_t vertex_count_halfedges(Halfedge_handle h)
+  {
+    std::size_t count = 0;
+    Halfedge_handle current = h;
+    do
+    {
+      ++count;
+      current = current->next()->opposite();
+    } while (current != h);
+
+    dolfin_assert(count > 0);
+    return count;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+    static std::size_t total_vertex_count_halfedges(const Polyhedron& P, std::map<typename Polyhedron::Vertex_const_handle, std::size_t>& m)
+  {
+    std::size_t total_count = 0;
+    for (typename Polyhedron::Vertex_const_iterator it = P.vertices_begin(); it != P.vertices_end(); it++)
+    {
+      const std::size_t c = vertex_count_halfedges(it->halfedge());
+      m[it] = c;
+      // std::cout << " Halfedge count: " << c << std::endl;
+      if (c == 0)
+      {int tmp; std::cin >> tmp; }
+      total_count += c;
+    }
+    return total_count;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool halfedge_is_in_polyhedron(const Polyhedron& P,
+                                        typename Polyhedron::Halfedge_const_handle h)
+  {
+    for (auto hit = P.halfedges_begin(); hit != P.halfedges_end(); hit++)
+    {
+      if (hit == h)
+        return true;
+    }
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool vertex_is_in_polyhedron(const Polyhedron& P,
+                                      typename Polyhedron::Vertex_const_handle v)
+  {
+    for (auto vit = P.vertices_begin(); vit != P.vertices_end(); ++vit)
+    {
+      if (vit == v)
+        return true;
+    }
+
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+    static bool check_vertex_consistency(const Polyhedron& P)
+  {
+    // std::cout << "Checking vertex consistency" << std::endl;
+    std::size_t counter = 0;
+
+    // Build a set of the list of vertices for faster lookup
+    std::set<typename Polyhedron::Vertex_const_handle> vertex_set;
+    for (auto vit = P.vertices_begin(); vit != P.vertices_end(); ++vit)
+    {
+      dolfin_assert(vertex_set.count(vit) == 0);
+      vertex_set.insert(vit);
+    }
+
+    std::deque<typename Polyhedron::Halfedge_const_handle> queue;
+    std::set<typename Polyhedron::Halfedge_const_handle> visited;
+
+    queue.push_back(P.halfedges_begin());
+    while (!queue.empty())
+    {
+      typename Polyhedron::Halfedge_const_handle current = queue.back();
+      queue.pop_back();
+      if (visited.count(current) == 0)
+      {
+        counter++;
+        typename Polyhedron::Halfedge_const_handle start = current;
+        visited.insert(current);
+
+        // Walk around the facet (or hole). Check halfedges and queue opposites
+        do
+        {
+          if (vertex_set.count(current->vertex()) == 0)
+          {
+            // std::cout << "Vertex not in vertex list: " << current->vertex()->point() << std::endl;
+            return false;
+          }
+
+          // TODO: Add the opposite check: All vertices should be reachable via halfedges
+          queue.push_back(current->opposite());
+          current = current->next();
+        } while(current != start);
+      }
+    }
+
+    // std::cout << "  Checked " << counter << " halfedges" << std::endl;
+    return true;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Triangle_3>
+  static bool triangle_set_intersect_triangle(Triangle_3 t,
+                                              const std::vector<Triangle_3>& triangle_set)
+  {
+    for (auto tit = triangle_set.begin(); tit != triangle_set.end(); tit++)
+    {
+      if (triangles_intersect(*tit, t))
+        return true;
+    }
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Segment_3>
+    static bool segment_intersects_triangle_set(const Segment_3& s,
+                                                const std::vector<typename CGAL::Kernel_traits<Segment_3>::Kernel::Triangle_3>& triangle_set)
+  {
+    for (auto tit = triangle_set.begin(); tit != triangle_set.end(); tit++)
+    {
+      if (segment_intersects_triangle(s, *tit))
+        return true;
+    }
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool center_vertex_triangulation(Polyhedron& P,
+                                          const typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+
+    // check if the triangulation with a center vertex intersects any of the
+    // neighbor triangles
+    // std::cout << "Attempting center vertex triangulation" << std::endl;
+    dolfin_assert(P.is_valid(false, 0));
+    dolfin_assert(halfedge_is_in_polyhedron(P, h));
+    dolfin_assert(vertex_is_in_polyhedron(P, h->vertex()));
+
+    const std::array<double, 3> plane_fit = get_plane_fit<Polyhedron>(h, h->prev());
+    if (plane_fit[0] < .85)
+    {
+      // std::cout << "  Rejected. Not sufficiently planar: " << plane_fit[0] << std::endl;
+      return false;
+    }
+
+    // Collect set of neighbor triangles and compute centroid
+    std::vector<Triangle_3> triangles;
+    Point_3 centroid = CGAL::ORIGIN;
+    std::size_t counter = 0;
+    {
+      Halfedge_handle current = h;
+      do
+      {
+        if (!current->opposite()->is_border() && current->opposite()->facet()->facet_degree() == 3)
+        {
+          triangles.push_back(get_facet_triangle<Polyhedron>(current->opposite()));
+        }
+        centroid = centroid + (current->vertex()->point()-CGAL::ORIGIN);
+        counter++;
+
+        current = current->next();
+      } while (current != h);
+    }
+    // std::cout << "Number of triangles: " << triangles.size() << std::endl;
+    centroid = CGAL::ORIGIN + (centroid-CGAL::ORIGIN)/counter;
+    // std::cout << "Centroid: " << centroid << std::endl;
+
+    Halfedge_handle current = h;
+    do
+    {
+      Triangle_3 current_triangle(current->vertex()->point(), current->next()->vertex()->point(), centroid);
+      for (auto tit = triangles.begin(); tit != triangles.end(); tit++)
+      {
+        if (triangles_intersect(current_triangle, *tit))
+        {
+          // std::cout << "No: Triangle " << current_triangle[0] << " " << current_triangle[1] << " " << current_triangle[2] << std::endl;
+          // std::cout << "Triangle " << (*tit)[0] << " " << (*tit)[1] << " " << (*tit)[2] << std::endl;
+          return false;
+        }
+      }
+
+      triangles.push_back(current_triangle);
+
+      current = current->next();
+    } while (current != h);
+
+    // std::cout << "Facet degree before center vertex: " << h->facet()->facet_degree() << std::endl;
+
+    P.normalize_border();
+    dolfin_assert(P.is_valid(false, 1));
+    dolfin_assert(!h->is_border_edge());
+    dolfin_assert(h->facet()->facet_degree() > 3);
+
+    Halfedge_handle center = P.create_center_vertex(h);
+    /* Halfedge_handle g = h->next()->next(); */
+    /* dolfin_assert(check_vertex_consistency(P)); */
+    /* dolfin_assert(halfedge_is_in_polyhedron(P, h)); */
+    /* dolfin_assert(vertex_is_in_polyhedron(P, h->vertex())); */
+    /* dolfin_assert(vertex_is_in_polyhedron(P, g->vertex())); */
+    /* std::cout << "Splitting: Segment " << h->vertex()->point() << ", " << g->vertex()->point() << std::endl; */
+    /* std::cout << "Vertex degrees: " << h->vertex()->vertex_degree() << ", " << g->vertex()->vertex_degree() << std::endl; */
+    /* std::cout << "My count: " << vertex_count_halfedges(h) << ", " << vertex_count_halfedges(g) << std::endl; */
+
+    /* std::cout << "Facet degree: " << h->facet()->facet_degree() << std::endl; */
+    /* std::cout << "Opposite facet degree: " << h->opposite()->facet()->facet_degree() << std::endl; */
+    /* std::cout << "Num halfedges: " << P.size_of_halfedges() << std::endl; */
+    /* std::map<typename Polyhedron::Vertex_const_handle, std::size_t> vertex_degrees; */
+    /* std::cout << "My total count: " << total_vertex_count_halfedges(P, vertex_degrees); */
+    /* std::cout << "Mapped: " << vertex_degrees.at(h->vertex()) << ", " << vertex_degrees.at(g->vertex()) << std::endl; */
+    /* std::cout << "Size of map: " << vertex_degrees.size() << std::endl; */
+    /* std::cout << "-- Splitting facet --" << std::endl; */
+
+    /* Halfedge_handle diagonal = P.split_facet(h, g); */
+
+    /* std::cout << "Vertex degrees: " << h->vertex()->vertex_degree() << ", " << g->vertex()->vertex_degree() << std::endl; */
+    /* std::cout << "My count: " << vertex_count_halfedges(h) << ", " << vertex_count_halfedges(g) << std::endl; */
+    /* std::map<typename Polyhedron::Vertex_const_handle, std::size_t> vertex_degrees_after; */
+    /* std::cout << "My total count: " << total_vertex_count_halfedges(P, vertex_degrees_after) << std::endl; */
+    /* std::cout << "Size of map: " << vertex_degrees_after.size() << std::endl; */
+    /* std::cout << "Num halfedges: " << P.size_of_halfedges() << std::endl; */
+    /* std::cout << "Mapped: " << vertex_degrees_after.at(h->vertex()) << ", " << vertex_degrees_after.at(g->vertex()) << std::endl; */
+    /* for (auto it = vertex_degrees_after.begin(); it != vertex_degrees_after.end(); ++it) */
+    /* { */
+    /*   if (vertex_degrees.at(it->first) != it->second) */
+    /*   { */
+    /*     std::cout << "DIFF!!!" << vertex_degrees[it->first] << " " << it->second << std::endl; */
+    /*   } */
+
+    /*   if (vertex_degrees.at(it->first) == 0 || it->second == 0) */
+    /*   { */
+    /*     std::cout << "zero degree " << it->first->point() << std::endl; */
+    /*   } */
+    /* } */
+    /* dolfin_assert(P.is_valid(false)); */
+    /* Halfedge_handle c = diagonal->vertex()->halfedge(); */
+    /* Halfedge_handle start = c; */
+    /* do */
+    /* { */
+    /*   if (c->opposite()->vertex() == diagonal->opposite()->vertex()) */
+    /*     std::cout << "Yes!!!" << std::endl; */
+    /*   c = c->opposite()->next(); */
+    /* } while (c != start); */
+    /* dolfin_assert(P.is_valid(false, 0)); */
+    /* std::cout << "Splitting edge: Segment " << diagonal->opposite()->vertex()->point() << ", " << diagonal->vertex()->point() << std::endl; */
+    /* Halfedge_handle center = P.split_edge(diagonal); */
+    center->vertex()->point() = centroid;
+    dolfin_assert(P.is_valid(false, 0));
+
+    /* std::cout << "Splitting facet: " << diagonal->opposite()->vertex()->point() << ", " << diagonal->opposite()->prev()->prev()->vertex()->point() << std::endl; */
+    /* P.split_facet(diagonal->opposite(), diagonal->opposite()->prev()->prev()); */
+
+    /* do */
+    /* { */
+    /*   dolfin_assert(P.is_valid(false, 0)); */
+    /*   std::cout << "adding diagonal: " << diagonal->next()->vertex()->point() << ", " << center->vertex()->point() << std::endl; */
+    /*   diagonal = P.split_facet(diagonal->next(), center); */
+    /*   diagonal = diagonal->opposite(); */
+
+    /* } while (diagonal->next()->next() != center); */
+    /* std::cout << "Center vertex degree: " << center->vertex()->vertex_degree() << std::endl; */
+    /* //P.normalize_border(); */
+    /* { */
+    /*   std::ofstream ofile("center-vertex.off"); */
+    /*   ofile << P; */
+    /* } */
+
+    /* dolfin_assert(P.is_valid()); */
+
+    return true;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void triangulate_quad_facet(Polyhedron& P,
+                             typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+
+    // std::cout << "Tringulating quad" << std::endl;
+    dolfin_assert(h->next()->next()->next()->next() == h);
+
+    //P.fill_hole(h);
+
+    if (get_triangle_cos_angle(Triangle_3(h->vertex()->point(),
+                                          h->next()->vertex()->point(),
+                                          h->next()->next()->vertex()->point()),
+                               Triangle_3(h->vertex()->point(),
+                                          h->next()->next()->vertex()->point(),
+                                          h->prev()->vertex()->point())) <
+        get_triangle_cos_angle(Triangle_3(h->next()->vertex()->point(),
+                                          h->next()->next()->vertex()->point(),
+                                          h->prev()->vertex()->point()),
+                               Triangle_3(h->vertex()->point(),
+                                          h->next()->vertex()->point(),
+                                          h->prev()->vertex()->point())))
+    {
+      // The edge should go from h <--> h->next()->next()
+      P.split_facet(h, h->next()->next());
+    }
+    else
+    {
+      // the edge should ho from h->next() <--> h->prev()
+      P.split_facet(h->next(), h->prev());
+    }
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void triangulate_5_facet(Polyhedron& P,
+                                  typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+
+    double best_quality = 1;
+    Halfedge_handle best_triangle;
+    Halfedge_handle current = h;
+    do
+    {
+      const double candidate_quality = get_triangle_cos_angle(Triangle_3(current->next()->vertex()->point(),
+                                                                   current->next()->next()->vertex()->point(),
+                                                                   current->next()->next()->next()->vertex()->point()),
+                                                        Triangle_3(current->prev()->prev()->vertex()->point(),
+                                                                   current->prev()->vertex()->point(),
+                                                                   current->vertex()->point()));
+      if (candidate_quality < best_quality)
+      {
+        best_triangle = current;
+        best_quality = candidate_quality;
+      }
+
+      current = current->next();
+    } while (current != h);
+
+    //P.fill_hole(h);
+    P.split_facet(best_triangle->next(),
+                  best_triangle->next()->next()->next());
+    P.split_facet(best_triangle->next()->next(), best_triangle);
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void close_hole(Polyhedron& P,
+                         typename Polyhedron::Halfedge_handle h)
+  {
+    //typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+
+    // std::cout << "----------- Closing hole --------------------" << std::endl;
+    dolfin_assert(P.is_valid(false, 0));
+    dolfin_assert(P.is_pure_triangle());
+    dolfin_assert(h->is_border());
+
+    P.fill_hole(h);
+    P.normalize_border();
+
+    // std::cout << "Size of hole: " << h->facet()->facet_degree() << std::endl;
+    // list_hole<Polyhedron>(h);
+
+    dolfin_assert(h->facet()->facet_degree() > 2);
+
+    // Since the facet may be split, we push the facets to a fifo queue.
+    std::deque<Halfedge_handle> queue;
+    queue.push_back(h);
+
+    while (!queue.empty())
+    {
+      // std::cout << "--- Popping facet from queue (" << queue.size() << ")" << std::endl;
+      const Halfedge_handle current = queue.front();
+      queue.pop_front();
+
+      list_hole<Polyhedron>(current);
+
+      dolfin_assert(P.is_valid(false, 0));
+      dolfin_assert(halfedge_is_in_polyhedron(P, current));
+
+      if (current->facet()->facet_degree() == 3)
+      {
+        //P.fill_hole(h);
+        dolfin_assert(current->opposite()->facet()->facet_degree() != 3  ||
+                      !triangles_intersect(get_facet_triangle<Polyhedron>(current),
+                                           get_facet_triangle<Polyhedron>(current->opposite())));
+        dolfin_assert(current->next()->opposite()->facet()->facet_degree() != 3  ||
+                      !triangles_intersect(get_facet_triangle<Polyhedron>(current),
+                                           get_facet_triangle<Polyhedron>(current->next()->opposite())));
+        dolfin_assert(current->prev()->opposite()->facet()->facet_degree() != 3  ||
+                      !triangles_intersect(get_facet_triangle<Polyhedron>(current),
+                                           get_facet_triangle<Polyhedron>(current->prev()->opposite())));
+      }
+      else if (current->facet()->facet_degree() == 4)
+      {
+        triangulate_quad_facet(P, current);
+      }
+      /* else if (current->facet()->facet_degree() == 5) */
+      /* { */
+      /*   triangulate_5_facet(P, current); */
+      /* } */
+      else
+      {
+        // std::cout << "Attempting to triangulate in 2D" << std::endl;
+        dolfin_assert(halfedge_is_in_polyhedron(P, current));
+        if (!triangulate_polygon_3d(P, current, false))
+        {
+          dolfin_assert(halfedge_is_in_polyhedron(P, current));
+
+          // if (!center_vertex_triangulation(P, current))
+          // {
+            //std::pair<Halfedge_handle, Halfedge_handle> facets = subdivide_facet(P, current);
+            Halfedge_handle facet = subdivide_facet(P, current);
+            // dolfin_assert(facets.first != Halfedge_handle());
+            // dolfin_assert(facets.second != Halfedge_handle());
+
+            queue.push_back(facet->opposite());
+            queue.push_back(facet);
+            //queue.push_back(facets.first);
+            //queue.push_back(facets.second);
+            // }
+        }
+
+        /* std::cout << "Points are not coplanar" << std::endl; */
+        /* Polyhedron hole; */
+        /* std::cout << "Compute convex hull" << std::endl; */
+        /* CGAL::convex_hull_3(points.begin(), points.end(), hole); */
+        /* {std::ofstream f("convex_hull.off"); f << hole; } */
+
+        /* // Find intersection polyline */
+        /* std::list<std::vector<Point_3> > intersection_polylines; */
+
+        /* // Search for a common vertex */
+        /* /\* bool found; *\/ */
+        /* /\* Halfedge_handle current = h; *\/ */
+        /* /\* do *\/ */
+        /* /\* { *\/ */
+
+        /* /\*   current = current->next(); *\/ */
+        /* /\* } while (current != h); *\/ */
+
+        /* CGALCSGOperator op; */
+
+        /* std::cout << "Computing union" << std::endl; */
+        /* op(P, hole, std::back_inserter(intersection_polylines), CGALCSGOperator::Join_tag); */
+        /* std::cout << "Done computing union" << std::endl; */
+      }
+    }
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static typename Polyhedron::Halfedge_handle
+  subdivide_facet(Polyhedron& P, typename Polyhedron::Halfedge_handle h)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Segment_3 Segment_3;
+    typedef typename Polyhedron::Traits::Vector_3 Vector_3;
+
+    // Search for triangles that divide the hole, such that the dividing triangle
+    // does not intersect triangles next to the hole
+
+    // Store all triangles around the hole and compute max edge length
+    std::vector<Triangle_3> border_triangles;
+    double max_squared_edge_length = 0;
+    {
+      Halfedge_handle current = h;
+      do
+      {
+        max_squared_edge_length = std::max(max_squared_edge_length,
+                                           CGAL::to_double(Segment_3(current->prev()->vertex()->point(),
+                                                                     current->vertex()->point()).squared_length()));
+        if (current->opposite()->facet()->facet_degree() == 3)
+        {
+          border_triangles.push_back(get_facet_triangle<Polyhedron>(current->opposite()));
+        }
+        current = current->next();
+      } while (current != h);
+    }
+
+    // std::cout << "Number of border triangles: " << border_triangles.size() << std::endl;
+    // std::cout << "Plane fit: " << get_plane_fit<Polyhedron>(h, h)[0] << std::endl;
+    dolfin_assert(border_triangles.size() > 4);
+
+    // Search for the best dividing segment
+    double best_quality = -1000;
+    Halfedge_handle best_outer;
+    Halfedge_handle best_inner;
+
+    Halfedge_handle current_outer = h;
+
+    // FIXME: This loop should run to h->prev()->prev(), but need
+    // handle the specially
+    const Halfedge_handle outer_end = h->prev()->prev();
+    do
+    {
+      Halfedge_handle current_inner = current_outer->next()->next();
+      const Halfedge_handle inner_end = h;
+      do
+      {
+        if (current_inner->next() != current_outer &&
+            current_inner->prev() != current_outer)
+        {
+
+          Segment_3 current_segment(current_outer->vertex()->point(),
+                                    current_inner->vertex()->point());
+
+          /* std::cout << "Checking segment: Segment " << current_segment.source() << ", " << current_segment.target() */
+          /*           << " length: " << current_segment.squared_length() << std::endl; */
+
+          // Check that this does not introduce an intersection
+          if (!segment_intersects_triangle_set(current_segment, border_triangles))
+          {
+            //const double side1_quality = get_plane_fit<Polyhedron>(current_outer, current_inner);
+            //const double side2_quality = get_plane_fit<Polyhedron>(current_inner, current_outer);
+            //const double candidate_quality = std::min(side1_quality, side2_quality);
+            const double candidate_quality = evaluate_hole_subdivision<Polyhedron>(current_inner, current_outer);
+            //std::cout << "Plane qualities: " << side1_quality << ", " << side2_quality << std::endl;
+            // std::cout << "Segment " << current_inner->vertex()->point() << ", " << current_outer->vertex()->point() << " : " << candidate_quality << std::endl;
+            // std::cout << "Quality: " << candidate_quality << std::endl;
+
+            if (candidate_quality > best_quality)
+            {
+              best_outer = current_outer;
+              best_inner = current_inner;
+              best_quality = candidate_quality;
+            }
+          }
+        }
+
+        current_inner = current_inner->next();
+      } while (current_inner != inner_end);
+
+      current_outer = current_outer->next();
+    } while (current_outer != outer_end);
+
+    dolfin_assert(best_outer != Halfedge_handle());
+    dolfin_assert(best_inner != Halfedge_handle());
+
+    // std::cout << "Found best subdivision: " << std::endl;
+
+    // list_hole<Polyhedron>(best_outer);
+    // std::cout << "Segment " << best_outer->vertex()->point()
+    //           << ", " << best_inner->vertex()->point() << std::endl;
+    // std::cout << "Quality: " << best_quality << std::endl;
+
+    /* if (best_quality > .9) */
+    /* { */
+      dolfin_assert(P.is_valid(false, 0));
+      const Halfedge_handle new_diagonal = P.split_facet(best_inner, best_outer);
+      const Point_3& p = new_diagonal->opposite()->vertex()->point();
+
+      const Vector_3 new_edge(new_diagonal->opposite()->vertex()->point(),
+                              new_diagonal->vertex()->point());
+
+      const int num_segments = static_cast<int>(sqrt(CGAL::to_double(new_edge.squared_length())/max_squared_edge_length)+.5);
+
+      // std::cout << "Num segments: " << num_segments << std::endl;
+
+      // Note: Don't use std::size_t as 0-1 becomes very large...
+      for (int i = 1; i < num_segments; i++)
+      {
+        //std::cout << "Splitting segment" << std::endl;
+        Halfedge_handle new_segment = P.split_edge(new_diagonal);
+        new_segment->vertex()->point() = p + static_cast<double>(i)/num_segments * new_edge;
+      }
+
+      P.normalize_border();
+      dolfin_assert(P.is_valid(false, 0));
+      //return std::make_pair(new_diagonal, new_diagonal->opposite());
+      return new_diagonal;
+    /* } */
+    /* else */
+    /*   //return std::make_pair(Halfedge_handle(), Halfedge_handle()); */
+    /*   return Halfedge_handle(); */
+
+    /* Halfedge_handle v1, v2; */
+    /* best_quality = -1000; */
+
+    /* { */
+    /*   // Candidate 1: best_inner, best_inner->next(), best_outer */
+    /*   std::cout << "Candidate 1" << std::endl; */
+    /*   // Check the four candidates where the chosen segment is an edge */
+    /*   if (best_inner->next()->next() != best_outer) */
+    /*   { */
+    /*     const double candidate_quality= std::min(get_plane_fit<Polyhedron>(best_outer, best_inner), */
+    /*                                              get_plane_fit<Polyhedron>(best_inner->next(), best_outer)); */
+
+    /*     if (candidate_quality > best_quality) */
+    /*     { */
+    /*       v1 = best_outer; */
+    /*       v2 = best_inner; */
+    /*       best_quality = candidate_quality; */
+    /*     } */
+    /*   } */
+    /* } */
+
+    /* if (best_outer->next()->next() != best_inner) */
+    /* { */
+    /*   // Candidate 2: best_inner, best_outer, best_outer->next() */
+    /*   double candidate_quality = std::min(get_plane_fit<Polyhedron>(best_outer->next(), best_inner), */
+    /*                                       get_plane_fit<Polyhedron>(best_inner, best_outer)); */
+
+    /*   if (candidate_quality > best_quality) */
+    /*   { */
+    /*     std::cout << "Candidate 2" << std::endl; */
+    /*     v1 = best_inner; */
+    /*     v2 = best_outer; */
+    /*     best_quality = candidate_quality; */
+    /*   } */
+    /* } */
+
+    /* if (best_outer->next()->next() != best_inner) */
+    /* { */
+    /*   // Candidate 3: best_inner->prev(), best_inner, best_outer */
+    /*   const double candidate_quality = std::min(get_plane_fit<Polyhedron>(best_outer, best_inner->prev()), */
+    /*                                             get_plane_fit<Polyhedron>(best_inner, best_outer)); */
+
+    /*   if (candidate_quality > best_quality) */
+    /*   { */
+    /*     std::cout << "Candidate 3" << std::endl; */
+    /*     v1 = best_outer; */
+    /*     v2 = best_inner->prev(); */
+    /*     best_quality = candidate_quality; */
+    /*   } */
+    /* } */
+
+    /* if (best_inner->next()->next() != best_outer) */
+    /* { */
+    /*   // Candidate 4: best_inner, best_outer->prev(), best_outer */
+    /*   const double candidate_quality = std::min(get_plane_fit<Polyhedron>(best_outer, best_inner), */
+    /*                                             get_plane_fit<Polyhedron>(best_inner, best_outer->prev())); */
+
+    /*   if (candidate_quality > best_quality) */
+    /*   { */
+    /*     std::cout << "Candidate 4" << std::endl; */
+    /*     v1 = best_inner; */
+    /*     v2 = best_outer->prev(); */
+    /*   } */
+    /* } */
+
+    /* dolfin_assert(v1 != Halfedge_handle()); */
+    /* dolfin_assert(v2 != Halfedge_handle()); */
+
+    /* // Divide hole by chosen triangle (v1, v2, v2->next()) */
+    /* Halfedge_handle f = P.fill_hole(h); */
+    /* dolfin_assert(v1->facet() == v2->facet()); */
+
+    /* Halfedge_handle hole1 = P.split_facet(v1, v2->next()); */
+    /* Halfedge_handle hole2 = P.split_facet(v2, hole1->opposite()); */
+    /* P.make_hole(hole1); */
+    /* P.make_hole(hole2); */
+
+    /* return true; */
+  }
+  //-----------------------------------------------------------------------------
+  /* template<typename Polyhedron> */
+  /* static double evaluate_heuristic(const Polyhedron& P, */
+  /*                                  typename Polyhedron::Halfedge_handle h, */
+  /*                                  double plane_fit) */
+  /* { */
+  /*   typedef typename Polyhedron::Traits::Triangle_3 Triangle_3; */
+  /*   typedef typename Polyhedron::Traits::Vector_3 Vector_3; */
+  /*   typedef CGAL::Exact_predicates_inexact_constructions_kernel InexactKernel; */
+  /*   typedef typename InexactKernel::Plane_3 InexactPlane_3; */
+
+
+  /*   // const double distance_to_plane_weight = 1.0; */
+  /*   const double planarity_weight = 1.0; */
+  /*   const double dihedral_weight  = 1.0; */
+  /*   const double ear_angle_weight = 1.0; */
+
+  /*   // Compute the planarity of the points excluding the current point */
+  /*   InexactPlane_3 p; */
+  /*   const double plane_fit_quality = get_plane_fit<Polyhedron>(h->next(), */
+  /*                                                              h->prev(), */
+  /*                                                              &p); */
+  /*   // Compute the maximum of the dihedral angle to the neighbors */
+  /*   const Triangle_3 candidate_triangle(h->prev()->vertex()->point(), */
+  /*                                       h->vertex()->point(), */
+  /*                                       h->next()->vertex()->point()); */
+  /*   const double cos_dihedral = (std::min(get_triangle_cos_angle(candidate_triangle, */
+  /*                                                                get_facet_triangle<Polyhedron>(h->opposite())), */
+  /*                                         get_triangle_cos_angle(candidate_triangle, */
+  /*                                                                get_facet_triangle<Polyhedron>(h->next()->opposite())))+1)/2; */
+
+  /*   // Compute the angle of the cutted ear */
+  /*   const Vector_3 v1(h->vertex()->point(), */
+  /*                     h->prev()->vertex()->point()); */
+  /*   const Vector_3 v2(h->vertex()->point(), */
+  /*                     h->next()->vertex()->point()); */
+
+  /*   const double cos_ear_angle = (CGAL::to_double((v1*v2)/std::sqrt(CGAL::to_double(v1.squared_length()*v2.squared_length())))+1)/2.0; */
+  /*   const double ear_angle_quality = cos_ear_angle; */
+
+  /*   std::cout << "Triangle " << candidate_triangle[0] */
+  /*             << ", " << candidate_triangle[1]  */
+  /*             << "," << candidate_triangle[2] << std::endl; */
+
+  /*   std::cout << "Evaluate: planarity: " << (plane_fit_quality/plane_fit) */
+  /*             << ", dihedral: " << cos_dihedral */
+  /*             << ", ear angle: " << ear_angle_quality << std::endl; */
+
+  /*   return planarity_weight*plane_fit_quality + dihedral_weight*cos_dihedral + ear_angle_quality*ear_angle_weight; */
+
+  /*   /\* return planarity_weight*plane_fit_quality/plane_fit + *\/ */
+  /*   /\*   dihedral_weight*cos_dihedral + *\/ */
+  /*   /\*   (1-std::exp(-ear_angle_weight*cos_ear_angle))*cos_dihedral; *\/ */
+  /* } */
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool vertex_is_border(typename Polyhedron::Vertex_const_handle v)
+  {
+    //typename Polyhedron::Vertex::Halfedge_around_vertex_circulator h_start = v->vertex_begin();
+    auto h_start = v->vertex_begin();
+    auto h_current = h_start;
+    do
+    {
+      if (h_current->is_border_edge())
+        return true;
+      h_current++;
+    } while(h_current != h_start);
+
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool facets_are_neighbors(typename Polyhedron::Facet_handle f1,
+                                   typename Polyhedron::Facet_handle f2)
+  {
+    typename Polyhedron::Halfedge_handle h1 = f1->halfedge();
+    typename Polyhedron::Halfedge_handle start1 = h1;
+    do
+    {
+      typename Polyhedron::Halfedge_handle h2 = f2->halfedge();
+      typename Polyhedron::Halfedge_handle start2 = h2;
+      do
+      {
+        if (h2->vertex() == h1->vertex())
+          return true;
+
+        h2 = h2->next();
+      } while (h2 != start2);
+
+      h1 = h1->next();
+    } while (h1 != start1);
+
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static bool segment_intersects_facets(typename Polyhedron::Vertex_handle v1,
+                                        typename Polyhedron::Vertex_handle v2)
+  {
+    typedef typename Polyhedron::Halfedge_around_vertex_circulator Vertex_circulator;
+    typedef typename Polyhedron::Traits::Segment_3 Segment_3;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+        typedef typename Polyhedron::Traits::Point_3 Point_3;
+
+    Segment_3 s(v1->point(), v2->point());
+
+    Vertex_circulator start = v1->vertex_begin();
+    Vertex_circulator current = start;
+    do
+    {
+      if (!current->is_border() && current->facet()->is_triangle())
+      {
+        Triangle_3 t = get_facet_triangle<Polyhedron>(current);
+        auto result = CGAL::intersection(t, s);
+        dolfin_assert(result);
+
+        if (const Point_3* p = boost::get<Point_3>(&*result))
+        {
+          dolfin_assert(*p == s.source() || *p == s.target());
+        }
+        else if (const Segment_3* s = boost::get<Segment_3>(&*result))
+        {
+          return true;
+        }
+        else
+        {
+          dolfin_assert(false);
+        }
+      }
+
+      current++;
+    } while (start != current);
+
+    return false;
+  }
+
+  //-----------------------------------------------------------------------------
+  /// Check if the triangle defined by (v, v2, v3) intersects any of the
+  /// triangular facets adjacent to v
+  template<typename Polyhedron>
+  static bool facets_intersect(typename Polyhedron::Vertex_handle v,
+                               typename Polyhedron::Vertex_handle v2,
+                               typename Polyhedron::Vertex_handle v3)
+  {
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+    typedef typename Polyhedron::Traits::Segment_3 Segment_3;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Vertex_handle Vertex_handle;
+    typedef typename Polyhedron::Halfedge_around_vertex_circulator Vertex_circulator;
+
+    Triangle_3 t(v->point(), v2->point(), v3->point());
+
+    std::cout << "Facets_intersect()" << std::endl;
+    std::cout << "--Vertex: " << v->point() << std::endl;
+    std::cout << "--Trial triangle: " << t[0] << ", " << t[1] << ", " << t[2] << std::endl;
+
+    dolfin_assert(v->point() == t[0] || v->point() == t[1] || v->point() == t[2]);
+
+    Vertex_circulator start = v->vertex_begin();
+    Vertex_circulator c = start;
+
+    do
+    {
+      Halfedge_handle current = c;
+      c++;
+      // std::cout << "  Checking" << std::endl;
+      if (!current->is_border())
+      {
+        dolfin_assert(current->facet()->is_triangle());
+
+        Triangle_3 t_current(current->vertex()->point(),
+                             current->next()->vertex()->point(),
+                             current->next()->next()->vertex()->point());
+        std::cout << "  Test triangle: " << t_current[0] << ", " << t_current[1] << ", " << t_current[2] << std::endl;
+
+        auto result = CGAL::intersection(t, t_current);
+
+        if (result)
+        {
+          if (const Point_3* p = boost::get<Point_3>(&*result))
+          {
+            dolfin_assert(*p == v->point());
+            std::cout << "  Vertex point" << std::endl;
+            std::cout << *p << std::endl;
+            continue;
+          }
+          else if (const Segment_3* s = boost::get<Segment_3>(&*result))
+          {
+            std::cout << "  Segment intersection" << std::endl;
+
+            // Check that they share a halfedge
+            dolfin_assert(s->source() == v->point() || s->target() == v->point());
+            std::array<Vertex_handle, 3> v_facet{v, v2, v3};
+            std::array<Vertex_handle, 3> u_facet{current->vertex(), current->next()->vertex(), current->next()->next()->vertex()};
+
+            bool neighbors_detected = false;
+            for (std::size_t i = 0; i < 3; i++)
+            {
+              for (std::size_t j = 0; j < 3; j++)
+              {
+                if (v_facet[i] == u_facet[(j+1)%3] && v_facet[(i+1)%3] == u_facet[j])
+                {
+                  std::cout << "  Neighbors" << std::endl;
+                  neighbors_detected = true;
+                  break;
+                }
+              }
+            }
+
+            if (neighbors_detected)
+              continue;
+            /* if ( (s->source() == t_current[0] || s->source() == t_current[1] || s->source() == t_current[2]) && */
+            /*      (s->target() == t_current[0] || s->target() == t_current[1] || s->target() == t_current[2]) ) */
+            /* { */
+            /*   std::cout << "  Edge segment" << std::endl; */
+            /*   std::cout << s->source() << " " << s->target() << std::endl; */
+            /*   continue; */
+            /* } */
+          }
+
+
+          std::cout << "Facets intersect" << std::endl;
+
+          if (const Point_3* p = boost::get<Point_3>(&*result))
+          {
+            std::cout << "    Intersection point: " << *p << std::endl;
+            return true;
+          }
+          else if (const Segment_3* s = boost::get<Segment_3>(&*result))
+          {
+            std::cout << "    Intersection segment: " << s->source() << ", " << s->target() << std::endl;
+            return true;
+          }
+          else if (const Triangle_3* tt = boost::get<Triangle_3>(&*result))
+          {
+            std::cout << "    Intersection triangle: " << (*tt)[0] << ", " << (*tt)[1] << ", " << (*tt)[2] << std::endl;
+          }
+          else if (const std::vector<Point_3>* v = boost::get<std::vector<Point_3> >(&*result))
+          {
+            std::cout << "    Intersection vector of points" << std::endl;
+          }
+          else
+          {
+            std::cout << "    Unknown intersection type" << std::endl;
+            return true;
+          }
+        }
+      }
+
+
+    } while (c != start);
+
+    return false;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static std::string list_self_intersections(Polyhedron& p)
+  {
+    typedef typename Polyhedron::Facet_handle Facet_handle;
+    // typedef typename Polyhedron::Traits Polyhedron_traits;
+    std::vector<std::pair<Facet_handle, Facet_handle> > intersections;
+    CGAL::Polygon_mesh_processing::self_intersections(p, std::back_inserter(intersections));
+
+    std::stringstream ss;
+    for (auto iit = intersections.begin(); iit != intersections.end(); iit++)
+    {
+      ss << "Intersection (neighbors: " << (facets_are_neighbors<Polyhedron>(iit->first, iit->second) ? "Yes" : "No") << ")" << std::endl;
+      ss << print_triangle<Polyhedron>(iit->first->halfedge());
+      ss << print_triangle<Polyhedron>(iit->second->halfedge());
+    }
+
+    return ss.str();
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static double closest_vertices(const Polyhedron& p)
+  {
+    // TODO: Use a better optimal algorithm for closest pair problem
+    std::cout << "Computing closest vertices" << std::endl;
+    double min_distance = std::numeric_limits<double>::max();
+
+    std::size_t counter = 0;
+    std::cout << "Vertices: " << p.size_of_vertices() << std::endl;
+    for (typename Polyhedron::Vertex_const_iterator v1 = p.vertices_begin();
+         v1 != p.vertices_end(); v1++)
+    {
+      if (counter % 1000 == 0)
+        std::cout << counter << std::endl;
+
+      typename Polyhedron::Vertex_const_handle v2 = v1;
+      v2++;
+      std::size_t counter2 = 0;
+      for (;v2 != p.vertices_end(); v2++)
+      {
+        min_distance = std::min(min_distance,
+                                CGAL::to_double(CGAL::squared_distance(v1->point(), v2->point())));
+
+        if (min_distance == 0)
+          return 0.0;
+
+        counter2++;
+      }
+
+      counter++;
+    }
+
+    std::cout << "  Done computing closest" << std::endl;
+    return min_distance;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static std::size_t min_vertex_degree(const Polyhedron& p)
+  {
+    std::size_t min_degree = std::numeric_limits<std::size_t>::max();
+    for (typename Polyhedron::Vertex_const_iterator it = p.vertices_begin();
+         it != p.vertices_end(); it++)
+    {
+      if (!vertex_is_border<Polyhedron>(it))
+      {
+        min_degree = std::min(min_degree, it->vertex_degree());
+      }
+    }
+    return min_degree;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void remove_vertex(Polyhedron& P, typename Polyhedron::Vertex_handle v)
+  {
+    typedef typename Polyhedron::Halfedge_around_vertex_circulator Vertex_circulator;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+
+    // std::cout << "Removing vertex" << std::endl;
+
+    Vertex_circulator h = v->vertex_begin();
+    Vertex_circulator start = h;
+
+    std::vector<Halfedge_handle> to_be_removed;
+
+    do
+    {
+      if (!h->is_border())
+        to_be_removed.push_back(h);
+
+      h++;
+    } while (h != start);
+
+
+    // std::cout << "Removing " << to_be_removed.size() << " halfedges" << std::endl;
+    for (auto it = to_be_removed.begin(); it != to_be_removed.end(); it++)
+    {
+      P.erase_facet(*it);
+    }
+
+    // std::cout << "  done removing vertex" << std::endl;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static std::size_t remove_self_intersections(Polyhedron& P)
+  {
+    std::size_t removed = 0;
+
+    // typedef typename Polyhedron::Traits Polyhedron_traits;
+    typedef typename Polyhedron::Facet_handle Facet_handle;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    std::vector<std::pair<Facet_handle, Facet_handle> > intersections;
+    CGAL::Polygon_mesh_processing::self_intersections(P, std::back_inserter(intersections));
+
+    /* if (intersections.size() > 0) */
+    /*   std::cout << "Removing self intersections" << std::endl; */
+
+    while (intersections.size() > 0)
+    {
+      const typename Polyhedron::Facet_handle f1 = intersections.front().first;
+      const typename Polyhedron::Facet_handle f2 = intersections.front().second;
+
+      std::deque<Facet_handle> queue1;
+      queue1.push_back(f1);
+
+      std::deque<Facet_handle> queue2;
+      queue2.push_back(f2);
+
+      std::set<Facet_handle> to_be_removed1;
+      to_be_removed1.insert(f1);
+
+      std::set<Facet_handle> to_be_removed2;
+      to_be_removed2.insert(f2);
+
+      while (true)
+      {
+        bool done = false;
+
+        // Pop from queue 1
+        if (queue1.size() > 0)
+        {
+          to_be_removed1.insert(queue1.front());
+          Halfedge_handle start = queue1.front()->halfedge();
+
+          queue1.pop_front();
+          Halfedge_handle current = start;
+
+          do
+          {
+            // std::cout << "Spreading out" << std::endl;
+            if (!current->is_border_edge())
+            {
+              if (to_be_removed2.count(current->opposite()->facet()) > 0)
+              {
+                done = true;
+                break;
+              }
+              else
+              {
+                queue1.push_back(current->opposite()->facet());
+              }
+            }
+            current = current->next();
+          } while (current != start);
+        }
+        else
+        {
+          done = true;
+        }
+
+        if (done)
+          break;
+
+
+        // Pop from queue 2
+        if (queue2.size() > 0)
+        {
+          to_be_removed2.insert(queue2.front());
+          Halfedge_handle start = queue2.front()->halfedge();
+          queue2.pop_front();
+          Halfedge_handle current = start;
+
+          do
+          {
+            // std::cout << "Spreading out" << std::endl;
+            if (!current->is_border_edge())
+            {
+              if (to_be_removed1.count(current->opposite()->facet()) > 0)
+              {
+                done = true;
+                break;
+              }
+              else
+              {
+                queue2.push_back(current->opposite()->facet());
+              }
+            }
+            current = current->next();
+          } while (current != start);
+        }
+        else
+        {
+          done = true;
+        }
+
+        if (done)
+          break;
+      }
+
+      // std::cout << "To be removed 1: " << to_be_removed1.size() << std::endl;
+      for (typename Polyhedron::Face_handle f : to_be_removed1)
+      {
+        P.erase_facet(f->halfedge());
+        dolfin_assert(P.is_valid());
+        removed++;
+      }
+
+      // std::cout << "To be removed 2: " << to_be_removed2.size() << std::endl;
+      for (typename Polyhedron::Face_handle f : to_be_removed2)
+      {
+        P.erase_facet(f->halfedge());
+        dolfin_assert(P.is_valid());
+        removed++;
+      }
+
+      dolfin_assert(P.is_valid());
+
+      intersections.clear();
+      //CGAL::self_intersect<Polyhedron_traits>(P, std::back_inserter(intersections));
+    }
+
+    return removed;
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void filter_sharp_features(Polyhedron& P, int start_facet, double tolerance)
+  {
+    typedef typename Polyhedron::Facet_iterator Facet_iterator;
+    typedef typename Polyhedron::Facet_handle Facet_handle;
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Triangle_3 Triangle_3;
+
+    /* { */
+    /*   std::ofstream outfile("before_filtering.off"); */
+    /*   outfile << P; */
+    /* } */
+
+    /* std::cout << "Filter sharp features" << std::endl; */
+
+    const double cos_tolerance = std::cos(tolerance);
+    // std::cout << "tolerance: " << cos_tolerance << std::endl;
+    Facet_iterator fit = P.facets_begin();
+    for (int i = 0; i < start_facet; i++)
+      fit++;
+
+    std::deque<Facet_handle> queue;
+    {
+      Halfedge_handle h = fit->halfedge();
+      // std::cout << "Starting facet: Triangle " << h->vertex()->point() << ", ";
+      h = h->next();
+      // std::cout << h->vertex()->point() << ", ";
+      h = h->next();
+      // std::cout << h->vertex()->point() << std::endl;
+    }
+
+    std::set<Facet_handle> visited;
+    std::set<Facet_handle> to_be_removed;
+    for (Facet_iterator fit = P.facets_begin(); fit != P.facets_end(); fit++)
+      to_be_removed.insert(fit);
+
+    // std::cout << "Number of facets: " << P.size_of_facets() << std::endl;
+
+    queue.push_back(fit);
+    while (!queue.empty())
+    {
+      // std::cout << "In queue" << std::endl;
+      Facet_handle f = queue.front();
+      queue.pop_front();
+
+      if (visited.count(f) > 0)
+      {
+        // std::cout << "Already handled" << std::endl;
+        continue;
+      }
+
+      visited.insert(f);
+      to_be_removed.erase(f);
+
+      const Halfedge_handle start = f->halfedge();
+      Halfedge_handle current = start;
+      do
+      {
+        // std::cout << "Exploring neighbor" << std::endl;
+        if (!current->opposite()->is_border())
+        {
+
+          Triangle_3 t1 = get_facet_triangle<Polyhedron>(current);
+          Triangle_3 t2 = get_facet_triangle<Polyhedron>(current->opposite());
+          if (get_triangle_cos_angle(t1, t2) > cos_tolerance)
+          {
+            queue.push_back(current->opposite()->facet());
+          }
+        }
+
+        current = current->next();
+      } while (current != start);
+    }
+
+    // std::cout << "Remove " << to_be_removed.size() << " facets" << std::endl;
+
+    for (auto fit = to_be_removed.begin(); fit != to_be_removed.end(); fit++)
+    {
+      P.erase_facet( (*fit)->halfedge() );
+    }
+
+    /* { */
+    /*   std::ofstream outfile("after_filtering.off"); */
+    /*   outfile << P; */
+    /* } */
+  }
+
+//-----------------------------------------------------------------------------
+  template <typename Polyhedron>
+  static std::pair<typename Polyhedron::Traits::Point_3, typename Polyhedron::Traits::Point_3>
+  get_aabb(const Polyhedron& P)
+  {
+    typedef typename Polyhedron::Vertex_const_iterator Vertex_const_iterator;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::FT FT;
+    Vertex_const_iterator it = P.vertices_begin();
+
+    FT x_min = it->point().x();
+    FT y_min = it->point().y();;
+    FT z_min = it->point().z();
+    FT x_max = x_min;
+    FT y_max = y_min;
+    FT z_max = z_min;
+    it++;
+
+    for (;it != P.vertices_end(); it++)
+    {
+      const Point_3& current = it->point();
+      x_min = std::min(x_min, current.x());
+      y_min = std::min(y_min, current.y());
+      z_min = std::min(z_min, current.z());
+
+      x_max = std::max(x_max, current.x());
+      y_max = std::max(y_max, current.y());
+      z_max = std::max(z_max, current.z());
+    }
+
+    return std::make_pair(Point_3(x_min, y_min, z_min),
+                          Point_3(x_max, y_max, z_max));
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static double sharpest_edge(const Polyhedron& P)
+  {
+    typedef typename Polyhedron::Traits Kernel;
+    typedef typename Polyhedron::Edge_const_iterator Edge_const_iterator;
+    typedef typename Kernel::Vector_3 Vector_3;
+
+    double min_cos = 1.0;
+    for (Edge_const_iterator it = P.edges_begin(); it != P.edges_end(); it++)
+    {
+      //const Point_3 a = it->vertex()->point();
+      const Vector_3 n1 = CGAL::normal<Kernel>(it->vertex()->point(),
+                                               it->next()->vertex()->point(),
+                                               it->next()->next()->vertex()->point());
+      const Vector_3 n2 = CGAL::normal<Kernel>(it->opposite()->vertex()->point(),
+                                               it->opposite()->next()->vertex()->point(),
+                                               it->opposite()->next()->next()->vertex()->point());
+      min_cos = std::min(min_cos,
+                         CGAL::to_double(n1*n2)/sqrt(CGAL::to_double(n1.squared_length()*n2.squared_length())));
+    }
+
+    return acos(min_cos);
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void center_vertex_refinement(Polyhedron& P)
+  {
+    // Precollect facet handles since we are adding facets within the loop
+    std::vector<typename Polyhedron::Facet_handle> facets;
+    facets.reserve(P.size_of_facets());
+    for (typename Polyhedron::Facet_iterator fit = P.facets_begin();
+         fit != P.facets_end();
+         fit++)
+    {
+      facets.push_back(fit);
+    }
+
+    for (typename Polyhedron::Facet_handle f : facets)
+    {
+      typename Polyhedron::Halfedge_handle h = f->halfedge();
+      typename Polyhedron::Traits::Point_3 c = CGAL::centroid(h->vertex()->point(),
+                                                              h->next()->vertex()->point(),
+                                                              h->next()->next()->vertex()->point());
+      c.exact();
+      typename Polyhedron::Halfedge_handle h_new = P.create_center_vertex(h);
+      h_new->vertex()->point() = c;
+    }
+  }
+  //-----------------------------------------------------------------------------
+  template<typename Polyhedron>
+  static void split_edge_refinement(Polyhedron& P)
+  {
+    typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+
+    // Collect vertices from the original
+    std::set<Halfedge_handle> facets;
+    // facets.reserve(P.size_of_facets());
+    for (typename Polyhedron::Facet_iterator fit = P.facets_begin();
+         fit != P.facets_end();
+         fit++)
+    {
+      const Halfedge_handle h = fit->halfedge();
+      facets.insert(h);
+    }
+
+    // Split all edges
+    {
+      std::vector<Halfedge_handle> edges;
+      for (typename Polyhedron::Edge_iterator eit = P.edges_begin();
+           eit != P.edges_end(); eit++)
+      {
+        edges.push_back(eit);
+      }
+
+      for (Halfedge_handle h : edges)
+      {
+        const Point_3 p = CGAL::midpoint(h->vertex()->point(),
+                                         h->opposite()->vertex()->point());
+        Halfedge_handle opposite = h->opposite();
+        Halfedge_handle h_new = P.split_edge(h);
+        h_new->vertex()->point() = p;
+
+        // This is suboptimal, but split_edge(h) changes h->opposite() to point
+        // to the newly inserted vertex, so we have to check and update if
+        // h->opposite() is stored in facets
+        if (facets.erase(opposite))
+        {
+          facets.insert(h_new->opposite());
+        }
+      }
+    }
+
+    for (Halfedge_handle h : facets)
+    {
+      Halfedge_handle h2 = h->next()->next();
+      Halfedge_handle h3 = h2->next()->next();
+      P.split_facet(h->next(), h->prev());
+      P.split_facet(h2->next(), h2->prev());
+      P.split_facet(h3->next(), h3->prev());
+    }
+  }
+};
+  //-----------------------------------------------------------------------------
+// Taken from demo/Polyhedron/Scene_nef_polyhedron_item.cpp in the
+// CGAL source tree.
+// Quick hacks to convert polyhedra from exact to inexact and
+// vice-versa
+template <class Polyhedron_input, class Polyhedron_output>
+struct Copy_polyhedron_to
+  : public CGAL::Modifier_base<typename Polyhedron_output::HalfedgeDS>
+{
+  Copy_polyhedron_to(const Polyhedron_input& in_poly)
+    : _in_poly(in_poly) {}
+
+  void operator()(typename Polyhedron_output::HalfedgeDS& out_hds)
+  {
+    typedef typename Polyhedron_output::HalfedgeDS Output_HDS;
+    //typedef typename Polyhedron_input::HalfedgeDS Input_HDS;
+
+    CGAL::Polyhedron_incremental_builder_3<Output_HDS> builder(out_hds);
+
+    typedef typename Polyhedron_input::Vertex_const_iterator Vertex_const_iterator;
+    typedef typename Polyhedron_input::Facet_const_iterator  Facet_const_iterator;
+    typedef typename Polyhedron_input::Halfedge_around_facet_const_circulator HFCC;
+
+    builder.begin_surface(_in_poly.size_of_vertices(),
+      _in_poly.size_of_facets(),
+      _in_poly.size_of_halfedges());
+
+    for(Vertex_const_iterator
+      vi = _in_poly.vertices_begin(), end = _in_poly.vertices_end();
+      vi != end ; ++vi)
+    {
+      typename Polyhedron_output::Point_3 p(::CGAL::to_double( vi->point().x()),
+	::CGAL::to_double( vi->point().y()),
+	::CGAL::to_double( vi->point().z()));
+      builder.add_vertex(p);
+    }
+
+    typedef CGAL::Inverse_index<Vertex_const_iterator> Index;
+    Index index(_in_poly.vertices_begin(), _in_poly.vertices_end());
+
+    for(Facet_const_iterator
+      fi = _in_poly.facets_begin(), end = _in_poly.facets_end();
+      fi != end; ++fi)
+    {
+      HFCC hc = fi->facet_begin();
+      HFCC hc_end = hc;
+      //     std::size_t n = circulator_size( hc);
+      //     CGAL_assertion( n >= 3);
+      builder.begin_facet ();
+      do
+      {
+        builder.add_vertex_to_facet(index[hc->vertex()]);
+        ++hc;
+      } while( hc != hc_end);
+      builder.end_facet();
+    }
+    builder.end_surface();
+  } // end operator()(..)
+private:
+  const Polyhedron_input& _in_poly;
+}; // end Copy_polyhedron_to<>
+
+template <class Poly_A, class Poly_B>
+void copy_to(const Poly_A& poly_a, Poly_B& poly_b)
+{
+  Copy_polyhedron_to<Poly_A, Poly_B> modifier(poly_a);
+  poly_b.delegate(modifier);
+  // CGAL_assertion(poly_b.is_valid());
+}
+}
 
 #endif
diff --git a/src/STLFileReader.cpp b/src/STLFileReader.cpp
index 997fc26..b1f972c 100644
--- a/src/STLFileReader.cpp
+++ b/src/STLFileReader.cpp
@@ -6,18 +6,18 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 //
 
 #include <mshr/STLFileReader.h>
-#include "Point3FuzzyStrictlyLess.h"
+#include "FuzzyPointLocator.h"
 
 #include <dolfin/geometry/Point.h>
 #include <dolfin/common/constants.h>
@@ -39,20 +39,25 @@
 
 namespace
 {
-  inline double strToDouble(const std::string& s)
-  {
-    std::istringstream is(s);
-    double val;
-    is >> val;
-
-    return val;
-  }
+inline double strToDouble(const std::string& s)
+{
+  std::istringstream is(s);
+  double val;
+  is >> val;
 
+  return val;
+}
 
+// get next line of file and trim away whitespace
 inline void get_next_line(std::ifstream& file, std::string& line, std::size_t &lineno)
 {
-  std::getline(file, line);
-  lineno++;
+  // Skip white
+  do
+  {
+    std::getline(file, line);
+    boost::algorithm::trim(line);
+    lineno++;
+  } while (file.good() && line.size() == 0);
 }
 
 } // end anonymous namespace
@@ -62,30 +67,32 @@ namespace mshr
 
 void STLFileReader::read(const std::string filename,
                          std::vector<std::array<double, 3> >& vertices,
-                         std::vector<std::vector<std::size_t> >& facets)
+                         std::vector<std::array<std::size_t, 3> >& facets)
 {
 
   dolfin::log(dolfin:: TRACE, "Reading surface from %s ", filename.c_str());
 
+  // vertices.clear();
+  facets.clear();
+
   typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
 
   std::ifstream file(filename.c_str());
   if (!file.is_open())
   {
-    dolfin::dolfin_error("PolyhedronUtils.cpp",
+    dolfin::dolfin_error("STLFileReader.cpp",
                          "open .stl file to read 3D surface",
                          "Failed to open file");
   }
 
-  std::size_t num_vertices = 0;
-  std::map<std::array<double, 3>, std::size_t, Point3FuzzyStrictlyLess<std::array<double, 3> > > vertex_map;
+  FuzzyPointMap vertex_map(1e-10);
+
   std::string line;
   std::size_t lineno = 0;
   const boost::char_separator<char> sep(" ");
 
   // Read the first line and trim away whitespaces
   get_next_line(file, line, lineno);
-  boost::algorithm::trim(line);
 
   if (line.substr(0, 5) != "solid")
   {
@@ -94,9 +101,13 @@ void STLFileReader::read(const std::string filename,
                          "File does not start with \"solid\" (line %u", lineno);
   }
 
-  // TODO: Read name of solid  
-  get_next_line(file, line, lineno);
-  boost::algorithm::trim(line);
+  // TODO: Read name of solid
+
+  do
+  {
+    // Some files contain color information before the vertex information
+    get_next_line(file, line, lineno);
+  } while (line.substr(0, 5) != "facet");
 
   while (file.good())
   {
@@ -124,7 +135,7 @@ void STLFileReader::read(const std::string filename,
         ++tok_iter;
 
         //dolfin::cout << "Read line: " << line << dolfin::endl;
-        
+
         for (std::size_t i = 0; i < 3; ++i)
         {
           normal[i] = strToDouble(*tok_iter);
@@ -133,9 +144,9 @@ void STLFileReader::read(const std::string filename,
 
         if (normal.norm() > DOLFIN_EPS)
           has_normal = true;
-        
+
         if (tok_iter != tokens.end())
-          dolfin::dolfin_error("PolyhedronUtils.cpp",
+          dolfin::dolfin_error("STLFileReader.cpp",
                                "open .stl file to read 3D surface",
                                "Expected end of line (line %u)", lineno);
       }
@@ -149,24 +160,22 @@ void STLFileReader::read(const std::string filename,
 
     // Read "outer loop" line
     get_next_line(file, line, lineno);
-    boost::algorithm::trim(line);
 
     if (line != "outer loop")
-      dolfin::dolfin_error("PolyhedronUtils.cpp",
+      dolfin::dolfin_error("STLFileReader.cpp",
                            "open .stl file to read 3D surface",
                            "Expected keyword 'outer loop' (line %u)", lineno);
 
-    std::vector<std::size_t> v_indices;
+    std::array<std::size_t, 3> v_indices;
 
     get_next_line(file, line, lineno);
-    boost::algorithm::trim(line);
 
     tokenizer tokens(line, sep);
     tokenizer::iterator tok_iter = tokens.begin();
 
     if (*tok_iter != "vertex")
     {
-      dolfin::dolfin_error("PolyhedronUtils.cpp",
+      dolfin::dolfin_error("STLFileReader.cpp",
                            "open .stl file to read 3D surface",
                            "Expected keyword vertex (line %u)", lineno);
     }
@@ -176,6 +185,9 @@ void STLFileReader::read(const std::string filename,
     // Read lines with vertices
     do
     {
+      // Only support for triangulated surfaces for now
+      dolfin_assert(counter < 3);
+
       // Advance to next
       ++tok_iter;
 
@@ -183,23 +195,14 @@ void STLFileReader::read(const std::string filename,
       const double y = strToDouble(*tok_iter); ++tok_iter;
       const double z = strToDouble(*tok_iter); ++tok_iter;
 
-      std::array<double, 3> vertex = {{x, y, z}};
+      const std::array<double, 3> vertex = {{x, y, z}};
 
-      // TODO: Use std::map::find()
-      // (to avoid two queries)
-      if (vertex_map.count(vertex) > 0)
-        v_indices.push_back(vertex_map[vertex]);
-      else
-      {
-        vertex_map[vertex] = num_vertices;
-        v_indices.push_back(num_vertices);
-        vertices.push_back(vertex);
-        num_vertices++;
-      }
+      // Insert point and get index. vertex_map takes care of merging close
+      // vertices
+      v_indices[counter] = vertex_map.insert_point(vertex);
 
       // Get next line
       get_next_line(file, line, lineno);
-      boost::algorithm::trim(line);
 
       tokens = tokenizer(line, sep);
       tok_iter = tokens.begin();
@@ -208,7 +211,6 @@ void STLFileReader::read(const std::string filename,
     } while (*tok_iter == "vertex");
 
     // Read 'endloop' line
-    boost::algorithm::trim(line);
     if (line != "endloop")
     {
       dolfin::dolfin_error("STLFileReader.cpp",
@@ -217,7 +219,6 @@ void STLFileReader::read(const std::string filename,
     }
 
     get_next_line(file, line, lineno);
-    boost::algorithm::trim(line);
     if (line != "endfacet")
     {
       dolfin::dolfin_error("STLFileReader.cpp",
@@ -229,12 +230,12 @@ void STLFileReader::read(const std::string filename,
     facets.push_back(v_indices);
 
     // Get orientation right if normal is given
-    if (has_normal) 
+    if (has_normal)
     {
       // Compute normal
-      const dolfin::Point v1(3, vertices[v_indices[0]].data());
-      const dolfin::Point v2(3, vertices[v_indices[1]].data());
-      const dolfin::Point v3(3, vertices[v_indices[2]].data());
+      const dolfin::Point v1(3, vertex_map[v_indices[0]].data());
+      const dolfin::Point v2(3, vertex_map[v_indices[1]].data());
+      const dolfin::Point v3(3, vertex_map[v_indices[2]].data());
 
       const dolfin::Point a = v2-v1;
       const dolfin::Point b = v3-v1;
@@ -247,10 +248,9 @@ void STLFileReader::read(const std::string filename,
       //   dolfin::cout << "Diff: " << (n - normal).norm() << dolfin::endl;
     }
 
-    // Get next line 
+    // Get next line
     // either start of next facet or endsolid
     get_next_line(file, line, lineno);
-    boost::algorithm::trim(line);
 
     if (line.substr(0, 5) != "facet")
       break;
@@ -262,15 +262,18 @@ void STLFileReader::read(const std::string filename,
 
   if (*tok_iter != "endsolid")
   {
-    dolfin::dolfin_error("PolyhedronUtils.cpp",
+    dolfin::dolfin_error("STLFileReader.cpp",
                          "open .stl file to read 3D surface",
                          "Expected keyword endsolid at line %u", lineno);
   }
   ++tok_iter;
 
-  // TODO: Check name of solid
+  vertices = vertex_map.get_points();
 
+  // TODO: Check name of solid
   dolfin::log(dolfin::TRACE, "Done reading surface");
+
+  // closest_vertices(vertex_map);
 }
 
 }
diff --git a/src/SurfaceConsistency.cpp b/src/SurfaceConsistency.cpp
index 28228d7..50cebbb 100644
--- a/src/SurfaceConsistency.cpp
+++ b/src/SurfaceConsistency.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Benjamin Kehlet
+// Copyright (C) 2014-2016 Benjamin Kehlet
 //
 // This file is part of mshr.
 //
@@ -18,46 +18,286 @@
 // OBS! Experimental code
 
 #include <mshr/SurfaceConsistency.h>
+#include "FuzzyPointLocator.h"
 
 #include <dolfin/log/log.h>
 #include <vector>
 #include <map>
+#include <deque>
 #include <iostream>
+#include <limits>
+
+// #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+// typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+// typedef Kernel::Point_3 Point_3;
+// typedef Kernel::Triangle_3 Triangle_3;
+
+// namespace
+// {
+// inline bool triangles_intersect(const std::vector<std::array<double, 3> >& vertices,
+//                                 const std::vector<std::array<std::size_t, 3> >& facets,
+//                                 std::size_t a,
+//                                 std::size_t b)
+// {
+//   const std::array<std::size_t, 3>& ta = facets[a];
+//   const std::array<std::size_t, 3>& tb = facets[b];
+
+//   std::cout << "  Intersection test: " << std::endl;
+//   std::cout << "    Facet " << a << ": (" << ta[0] << ", " << ta[1] << ", " << ta[2] << ")" << std::endl;
+//   std::cout << "    Facet " << b << ": (" << tb[0] << ", " << tb[1] << ", " << tb[2] << ")" << std::endl;
+
+//   for (std::size_t i = 0; i < 3; i++)
+//   {
+//     for (std::size_t j = 0; j < 3; j++)
+//     {
+//       if (ta[i] == tb[j] || (ta[i] == tb[(j+1)%3] && ta[(i+1)%3] == tb[j]))
+//       {
+//         std::cout << "    Neighbor" << std::endl;
+//         return false;
+//       }
+//     }
+//   }
+
+//   Triangle_3 t1(Point_3(vertices[ta[0]][0], vertices[ta[0]][1], vertices[ta[0]][2]),
+//                 Point_3(vertices[ta[1]][0], vertices[ta[1]][1], vertices[ta[1]][2]),
+//                 Point_3(vertices[ta[2]][0], vertices[ta[2]][1], vertices[ta[2]][2]));
+
+//   Triangle_3 t2(Point_3(vertices[tb[0]][0], vertices[tb[0]][1], vertices[tb[0]][2]),
+//                 Point_3(vertices[tb[1]][0], vertices[tb[1]][1], vertices[tb[1]][2]),
+//                 Point_3(vertices[tb[2]][0], vertices[tb[2]][1], vertices[tb[2]][2]));
+
+//   const bool i = CGAL::do_intersect(t1, t2);
+//   std::cout << "    Result: " << (i ? "True" : "False") << std::endl;
+//   return i;
+// }
+// }
 
 namespace mshr
 {
 
-void SurfaceConsistency::checkConnectivity(const std::vector<std::vector<std::size_t> >& facets)
+void SurfaceConsistency::checkConnectivity(std::vector<std::array<std::size_t, 3> >& facets,
+                                           std::set<std::size_t>& duplicating,
+                                           bool error)
 {
-  // Store all halfedges
+  log(dolfin::TRACE, "Checking connectivity");
+
+  // Store halfedges
   std::map<std::pair<std::size_t, std::size_t>, std::size_t> halfedges;
 
-  std::size_t facet_no = 0;
-  for (auto it = facets.begin(); it != facets.end(); ++it)
+  for (std::size_t facet_no = 0; facet_no < facets.size(); facet_no++)
   {
+    std::array<std::size_t, 3>& f = facets[facet_no];
     // Check for (topologically) degenerate facets
-    if ( (*it)[0] == (*it)[1] || (*it)[0] == (*it)[2] || (*it)[1] == (*it)[2] )
+    if ( f[0] == f[1] || f[0] == f[2] || f[1] == f[2] )
       dolfin::dolfin_error("SurfaceConsistency.cpp",
                            "confirm surface connectivity",
-                           "Facet %d is degenerate", facet_no);
+                           "Facet %d is topologically degenerate", facet_no);
 
+    if (halfedges.count(std::make_pair(f[0], f[1])) > 0 ||
+        halfedges.count(std::make_pair(f[1], f[2])) > 0 ||
+        halfedges.count(std::make_pair(f[2], f[0])) > 0)
+    {
+      duplicating.insert(facet_no);
+    }
+    else
+    {
+      halfedges[std::make_pair(f[0], f[1])] = facet_no;
+      halfedges[std::make_pair(f[1], f[2])] = facet_no;
+      halfedges[std::make_pair(f[2], f[0])] = facet_no;
+    }
+  }
+}
+//-----------------------------------------------------------------------------
+void SurfaceConsistency::filterFacets(const std::vector<std::array<std::size_t, 3> >& facets,
+                                      const std::vector<std::array<double, 3> >& vertices,
+                                      std::size_t start, std::set<std::size_t>& skip)
+{
+  // Map egdes (ordered pairs of vertices) to facets
+  std::map<std::pair<std::size_t, std::size_t>, std::size_t> edge_map;
 
-    for (int i = 0; i < 3; i++)
+  for (std::size_t i = 0; i < facets.size(); i++)
+  {
+    const std::array<std::size_t, 3>& facet = facets[i];
+    std::size_t prev = facet[facet.size()-1];
+    for (auto vit = facet.begin(); vit != facet.end(); vit++)
+    {
+      const std::pair<std::size_t, std::size_t> e(prev, *vit);
+      edge_map[e] = i;
+      prev = *vit;
+    }
+    
+    skip.insert(i);
+  }
+
+  // const std::size_t global_max = skip.size();
+
+  std::set<std::size_t> visited;
+  //std::vector<std::size_t> included;
+  std::deque<std::size_t> queue;
+  if (skip.count(start) > 0)
+    queue.push_front(start);
+  // else
+  //   std::cout << "  Already added" << std::endl;
+
+  std::size_t global_count = 0;
+  while (!queue.empty())
+  {
+    // dolfin_assert(global_count <= global_max);
+
+    std::size_t current = queue.front();
+    queue.pop_front();
+
+    const std::array<size_t, 3>& current_facet = facets[current];
+    // std::cout << "-- Processing " << current << ", vertices: " << current_facet[0] << ", " << current_facet[1] << ", " << current_facet[2] << std::endl;
+
+    visited.insert(current);
+
+    // don't skip this facet
+    if (skip.count(current) > 0)
     {
-      std::pair<std::size_t, std::size_t> e( (*it)[i], (*it)[(i+1)%3] );
-      if (halfedges.count( e ) > 0 )
+      // bool intersects = false;
+      // for (auto it = included.begin(); it != included.end(); it++)
+      // {
+      //   if (triangles_intersect(vertices, facets, current, *it))
+      //   {
+      //     intersects = true;
+      //     break;
+      //   }
+      // }
+
+      // if (intersects)
+      // {
+      //   std::cout << " SKIPPING" << std::endl;
+      //   {int tmp; std::cin >> tmp;}
+      //   continue;
+      // }
+
+      skip.erase(current);
+      //included.push_back(current);
+
+      std::size_t prev = current_facet[2];
+      for (auto fit = current_facet.begin(); fit != current_facet.end(); fit++)
       {
-        dolfin::dolfin_error("SurfaceConsistency.cpp",
-                             "confirm halfedge connectivity",
-                             "Facet %d and %d share halfedge", halfedges[e], facet_no);
+        const std::pair<std::size_t, std::size_t> opposite(*fit, prev);
+        // std::cout << "  opposite: " << opposite.first << " " << opposite.second << std::endl;
+        if (edge_map.count(opposite) > 0)
+        {
+          std::size_t opposite_facet = edge_map[opposite];
+          if (visited.count(opposite_facet) == 0)
+          {
+            queue.push_back(opposite_facet);
+            //std::cout << "  pushing: " << edge_map[opposite] << std::endl;
+          }
+        }
+        prev = *fit;
       }
 
-      halfedges[e] = facet_no;
+      // std::cout << "Size of skip: " << skip.size() << ", size of queue: " << queue.size() << ", current: " << current << std::endl;
+      // {int tmp; std::cin >> tmp;}
+      global_count++;
     }
-    facet_no++;
   }
+}
+//-----------------------------------------------------------------------------
+std::pair<std::unique_ptr<std::vector<std::array<double, 3> > >,
+          std::unique_ptr<std::vector<std::array<std::size_t, 3> > > >
+SurfaceConsistency::merge_close_vertices(const std::vector<std::array<std::size_t, 3> >& facets,
+                                         const std::vector<std::array<double, 3> >& vertices,
+                                         double tolerance)
+{
+  FuzzyPointMap point_map(tolerance);
+  std::vector<std::size_t> vertex_mapping;
+  vertex_mapping.reserve(vertices.size());
+
+
+  for (std::size_t i = 0; i < vertices.size(); i++)
+  {
+    const std::array<double, 3>& v = vertices[i];
+    const std::size_t new_index = point_map.insert_point(v);
+    vertex_mapping.push_back(new_index);
+  }
+
+  // std::cout << "Distinct vertices: " << point_map.size() << std::endl;
 
-  // TODO: Check for border edges
+  std::unique_ptr<std::vector<std::array<double, 3> > > new_vertices(new std::vector<std::array<double, 3> >(point_map.get_points()));
+  std::unique_ptr<std::vector<std::array<std::size_t, 3> > > new_facets(new std::vector<std::array<std::size_t, 3> >);
+  for (const std::array<std::size_t, 3>& t : facets)
+  {
+    new_facets->push_back({ {vertex_mapping[t[0]], vertex_mapping[t[1]], vertex_mapping[t[2]]} });
+  }
+
+  return std::make_pair(std::move(new_vertices), std::move(new_facets));
+}
+//-----------------------------------------------------------------------------
+void SurfaceConsistency::orient_component(std::vector<std::array<std::size_t, 3> >& facets,
+                                          std::size_t start)
+{
+  log(dolfin::TRACE, "Checking facet orientation");
+
+  // Map from edge (pair of vertices) to two triangles
+  std::map<std::pair<std::size_t, std::size_t>, std::pair<std::size_t, std::size_t> > edge_map;
+  for (std::size_t i = 0; i < facets.size(); i++)
+  {
+    const std::array<std::size_t, 3>& f = facets[i];
+    for (std::size_t j = 0; j < 3; j++)
+    {
+      auto edge = std::make_pair(std::min(f[j], f[(j+1)%3]), std::max(f[j], f[(j+1)%3]));
+      if (edge_map.count(edge) > 0)
+        edge_map[edge].second = i;
+      else
+        edge_map[edge] = std::make_pair(i, std::numeric_limits<std::size_t>::max());
+    }
+  }
+
+  std::deque<std::size_t> queue;
+  std::set<std::size_t> visited;
+  queue.push_back(start);
+
+  std::size_t counter = 0;
+  std::size_t flipped = 0;
+  while (!queue.empty())
+  {
+    std::size_t current = queue.front();
+    const std::array<std::size_t, 3>& current_facet = facets[current];
+    queue.pop_front();
+
+    if (visited.count(current) == 0)
+    {
+      counter++;
+      visited.insert(current);
+      
+      for (std::size_t j = 0; j < 3; j++)
+      {
+        auto edge = std::make_pair(std::min(current_facet[j], current_facet[(j+1)%3]), std::max(current_facet[j], current_facet[(j+1)%3]));
+        dolfin_assert(edge_map.count(edge) > 0);
+
+        auto facet_pair = edge_map[edge];
+        const std::size_t opposite = facet_pair.first == current ? facet_pair.second : facet_pair.first;
+
+        if (opposite != std::numeric_limits<std::size_t>::max() && visited.count(opposite) == 0)
+        {
+          dolfin_assert(opposite != current);
+          
+          std::array<std::size_t, 3>& opposite_facet = facets[opposite];
+          for (std::size_t k = 0; k < 3; k++)
+          {
+            const std::size_t a = opposite_facet[k];
+            const std::size_t b = opposite_facet[(k+1)%3];
+            if ( (a == current_facet[0] && b == current_facet[1]) ||
+                 (a == current_facet[1] && b == current_facet[2]) ||
+                 (a == current_facet[2] && b == current_facet[0]))
+            {
+              flipped++;
+              std::swap(opposite_facet[0], opposite_facet[1]);
+              break;
+            }
+          }
+          queue.push_back(opposite);
+        }
+      }
+    }
+  }
+  log(dolfin::TRACE, "Flipped %u triangles", flipped);
 }
 }
 
diff --git a/src/SurfaceReconstruction.cpp b/src/SurfaceReconstruction.cpp
new file mode 100644
index 0000000..977c772
--- /dev/null
+++ b/src/SurfaceReconstruction.cpp
@@ -0,0 +1,264 @@
+// Copyright (C) 2015 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#include <mshr/SurfaceReconstruction.h>
+#include <dolfin/log/log.h>
+
+#define CGAL_EIGEN3_ENABLED true
+#include <CGAL/trace.h>
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Polyhedron_3.h>
+#include <CGAL/IO/Polyhedron_iostream.h>
+#include <CGAL/Surface_mesh_default_triangulation_3.h>
+#include <CGAL/make_surface_mesh.h>
+#include <CGAL/Implicit_surface_3.h>
+#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
+#include <CGAL/Poisson_reconstruction_function.h>
+#include <CGAL/Point_with_normal_3.h>
+#include <CGAL/property_map.h>
+#include <CGAL/IO/read_xyz_points.h>
+#include <CGAL/compute_average_spacing.h>
+
+// Based on CGAL/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
+typedef Kernel::Sphere_3 Sphere;
+typedef std::vector<Point_with_normal> PointList;
+typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
+typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
+typedef CGAL::Surface_mesh_default_triangulation_3 STr;
+typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
+typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
+typedef typename C2t3::Triangulation Tr;
+typedef typename Tr::Vertex_handle Vertex_handle;
+typedef typename Tr::Edge Edge;
+typedef typename Tr::Facet Facet;
+typedef typename Tr::Finite_facets_iterator Finite_facets_iterator;
+
+
+namespace
+{
+
+template <class Vertex_handle>
+std::size_t get_vertex_index(std::vector<std::array<double, 3>>& vertices,
+                             Vertex_handle vh,
+                             std::map<Vertex_handle, std::size_t>& V,
+                             std::size_t& inum)
+{
+  typedef typename std::map<Vertex_handle, std::size_t>::iterator map_iterator;
+  std::pair<map_iterator,bool> insert_res = V.insert( std::make_pair(vh,inum) );
+  if ( insert_res.second )
+  {
+    typename Tr::Point p = static_cast<typename Tr::Point>(vh->point());
+    vertices.push_back({ {CGAL::to_double(p[0]),
+                          CGAL::to_double(p[1]),
+                          CGAL::to_double(p[2])} });
+    ++inum;
+  }
+  return insert_res.first->second;
+}
+//-----------------------------------------------------------------------------
+void export_triangulation(const C2t3& c2t3,
+                          std::vector<std::array<double, 3>>& vertices,
+                          std::vector<std::array<std::size_t, 3>>& facets)
+{
+  const Tr& tr = c2t3.triangulation();
+  const typename Tr::size_type number_of_facets = c2t3.number_of_facets();
+
+  vertices.reserve(tr.number_of_vertices());
+  facets.reserve(number_of_facets);
+
+  // Finite vertices coordinates.
+  Finite_facets_iterator fit = tr.finite_facets_begin();
+  std::set<Facet> oriented_set;
+  std::stack<Facet> stack;
+
+  //CGAL_assertion_code(typename Tr::size_type nb_facets = 0; )
+
+  while (oriented_set.size() != number_of_facets)
+  {
+    while ( fit->first->is_facet_on_surface(fit->second) == false ||
+            oriented_set.find(*fit) != oriented_set.end() ||
+            oriented_set.find(c2t3.opposite_facet(*fit)) != oriented_set.end() )
+    {
+      ++fit;
+    }
+    oriented_set.insert(*fit);
+    stack.push(*fit);
+    while(! stack.empty() )
+    {
+      Facet f = stack.top();
+      stack.pop();
+      for(int ih = 0 ; ih < 3 ; ++ih)
+      {
+        const int i1  = tr.vertex_triple_index(f.second, tr. cw(ih));
+        const int i2  = tr.vertex_triple_index(f.second, tr.ccw(ih));
+        if( c2t3.face_status(Edge(f.first, i1, i2)) == C2t3::REGULAR )
+        {
+          Facet fn = c2t3.neighbor(f, ih);
+          if (oriented_set.find(fn) == oriented_set.end() &&
+              oriented_set.find(c2t3.opposite_facet(fn)) == oriented_set.end())
+          {
+            oriented_set.insert(fn);
+            stack.push(fn);
+          }
+        } // end "if the edge is regular"
+      } // end "for each neighbor of f"
+    } // end "stack non empty"
+  } // end "oriented_set not full"
+
+  // Orients the whole mesh towards outside:
+  // - find the facet with max z
+  typename std::set<Facet>::const_iterator top_facet = oriented_set.begin();
+  for(typename std::set<Facet>::const_iterator fit = oriented_set.begin();
+      fit != oriented_set.end();
+      ++fit)
+  {
+    double top_z =
+      (top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0))->point().z()
+       + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1))->point().z()
+       + top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2))->point().z())/3.;
+    double z =
+      (fit->first->vertex(tr.vertex_triple_index(fit->second, 0))->point().z()
+       + fit->first->vertex(tr.vertex_triple_index(fit->second, 1))->point().z()
+       + fit->first->vertex(tr.vertex_triple_index(fit->second, 2))->point().z())/3.;
+    if (top_z < z)
+      top_facet = fit;
+  }
+
+  // - orient the facet with max z towards +Z axis
+  Vertex_handle v0 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 0));
+  Vertex_handle v1 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 1));
+  Vertex_handle v2 = top_facet->first->vertex(tr.vertex_triple_index(top_facet->second, 2));
+  Vector normal = cross_product(v1->point()-v0->point(), v2->point()-v1->point());
+  const Vector Z(0, 0, 1);
+  bool regular_orientation = (Z * normal >= 0);
+
+  // used to set indices of vertices
+  std::map<Vertex_handle, std::size_t> V;
+  std::size_t inum = 0;
+
+  for(typename std::set<Facet>::const_iterator fit =
+        oriented_set.begin();
+      fit != oriented_set.end();
+      ++fit)
+  {
+    std::size_t indices[3];
+    std::size_t index = 0;
+    for (std::size_t i = 0; i<3; i++)
+    {
+      indices[index++] = get_vertex_index(vertices,
+                                          fit->first->vertex(tr.vertex_triple_index(fit->second, i)),
+                                          V,
+                                          inum);
+    }
+
+    facets.push_back({ {indices[0],
+                       regular_orientation ? indices[1] : indices[2],
+                       regular_orientation ? indices[2] : indices[1]} });
+  }
+}
+}
+//-----------------------------------------------------------------------------
+void mshr::SurfaceReconstruction::reconstruct(const std::vector<double>& vertices,
+                                              const std::vector<std::size_t>& facets,
+                                              std::vector<std::array<double, 3>>& reconstructed_vertices,
+                                              std::vector<std::array<std::size_t, 3>>& reconstructed_facets)
+{
+  // Poisson options
+  FT sm_angle = 20.0; // Min triangle angle in degrees.
+  FT sm_radius = 10; // Max triangle size w.r.t. point set average spacing.
+  FT sm_distance = 0.10; // Surface Approximation error w.r.t. point set average spacing.
+
+  // Reads the point set file in points[].
+  // Note: read_xyz_points_and_normals() requires an iterator over points
+  // + property maps to access each point's position and normal.
+  // The position property map can be omitted here as we use iterators over Point_3 elements.
+  PointList points;
+  for (std::size_t i = 0; i < facets.size(); i += 3)
+  {
+    const Point a(vertices[facets[i]*3],   vertices[facets[i]*3+1],   vertices[facets[i]*3+2]);
+    const Point b(vertices[facets[i+1]*3], vertices[facets[i+1]*3+1], vertices[facets[i+1]*3+2]);
+    const Point c(vertices[facets[i+2]*3], vertices[facets[i+2]*3+1], vertices[facets[i+2]*3+2]);
+
+    // compute normal
+    const Vector normal = CGAL::cross_product(b-a, c-a);
+    const Point centroid = CGAL::ORIGIN + ((a-CGAL::ORIGIN)+(b-CGAL::ORIGIN)+(c-CGAL::ORIGIN))/3.0;
+    Point_with_normal pm( centroid,
+                          normal/std::sqrt(normal.squared_length()));
+    points.push_back(pm);
+  }
+
+  // Creates implicit function from the read points using the default solver.
+  // Note: this method requires an iterator over points
+  // + property maps to access each point's position and normal.
+  // The position property map can be omitted here as we use iterators over Point_3 elements.
+  log(dolfin::TRACE, "Construct implicit function");
+  Poisson_reconstruction_function function(points.begin(), points.end(),
+                                           CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()) );
+  log(dolfin::TRACE, "Compute Poisson indicator function");
+  // Computes the Poisson indicator function f()
+  // at each vertex of the triangulation.
+  if ( ! function.compute_implicit_function() )
+  {
+    dolfin::dolfin_error("SurfaceReconstruction.cpp",
+                         "reconstruct surface",
+                         "couldn't compute implicit function");
+  }
+  // Computes average spacing
+  log(dolfin::TRACE, "Compute average spacing");
+  FT average_spacing = CGAL::compute_average_spacing<CGAL::Sequential_tag>(points.begin(), points.end(),
+                                                     6 /* knn = 1 ring */);
+  // Gets one point inside the implicit surface
+  // and computes implicit function bounding sphere radius.
+  Point inner_point = function.get_inner_point();
+  Sphere bsphere = function.bounding_sphere();
+  FT radius = std::sqrt(bsphere.squared_radius());
+  // Defines the implicit surface: requires defining a
+  // conservative bounding sphere centered at inner point.
+  FT sm_sphere_radius = 5.0 * radius;
+  FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
+  Surface_3 surface(function,
+                    Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
+                    sm_dichotomy_error/sm_sphere_radius);
+
+  // Defines surface mesh generation criteria
+  CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle,  // Min triangle angle (degrees)
+                                                      sm_radius*average_spacing,  // Max triangle size
+                                                      sm_distance*average_spacing); // Approximation error
+  // Generates surface mesh with manifold option
+  log(dolfin::TRACE, "Invoke surface mesher");
+  STr tr; // 3D Delaunay triangulation for surface mesh generation
+  C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
+  CGAL::make_surface_mesh(c2t3,                                 // reconstructed mesh
+                          surface,                              // implicit surface
+                          criteria,                             // meshing criteria
+                          CGAL::Manifold_with_boundary_tag());  // require manifold mesh
+  if(tr.number_of_vertices() == 0)
+    dolfin::dolfin_error("SurfaceReconstruction.cpp",
+                         "reconstruct surface from point set",
+                         "Couldn't reconstruct surface");
+
+  export_triangulation(c2t3,
+                       reconstructed_vertices,
+                       reconstructed_facets);
+}
+
diff --git a/src/TetgenFileWriter.cpp b/src/TetgenFileWriter.cpp
deleted file mode 100644
index 66f419b..0000000
--- a/src/TetgenFileWriter.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2014 Benjamin Kehlet
-//
-// This file is part of mshr.
-//
-// mshr is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// mshr is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <mshr/TetgenFileWriter.h>
-#include <mshr/CSGCGALDomain3D.h>
-
-#include <fstream>
-
-namespace mshr
-{
-
-void TetgenFileWriter::write(const CSGCGALDomain3D &domain, std::string filename)
-{
-  std::vector<dolfin::Point> vertices;
-  domain.get_vertices(vertices);
-
-  std::vector<std::array<std::size_t, 3> > facets;
-  domain.get_facets(facets);
-
-  write(vertices, facets, filename);
-
-}
-//-----------------------------------------------------------------------------
-void TetgenFileWriter::write(const std::vector<dolfin::Point> &vertices,
-                             const std::vector<std::array<std::size_t, 3> > &facets,
-                             std::string filename)
-{
-  std::ofstream ofile(filename.c_str());
-
-  // Write the node list
-  ofile << "# node count, 3 dim, no attribute, no boundary marker" << std::endl;
-  ofile << vertices.size() << " 3 0 0 " << std::endl;
-  for (auto it = vertices.begin(); it != vertices.end(); it++)
-  {
-    ofile << std::distance(vertices.begin(), it) << " "
-          << it->x() << " " 
-          << it->y() << " "
-          << it->z() << std::endl;
-  }
-
-  // Write the facet list
-  ofile << "# facet count, no boundary markers" << std::endl;
-  ofile << facets.size() << " 0" << std::endl;
-  for (auto it = facets.begin(); it != facets.end(); it++)
-  {
-    ofile << "1 # 1 polygon, no hole, no boundary marker" << std::endl;
-    ofile << "3 " 
-          << (*it)[0] << " " 
-          << (*it)[1] << " " 
-          << (*it)[2] << std::endl;
-    
-  }
-}
-
-}
diff --git a/src/TetgenMeshGenerator3D.cpp b/src/TetgenMeshGenerator3D.cpp
index b3d300b..b685d5f 100644
--- a/src/TetgenMeshGenerator3D.cpp
+++ b/src/TetgenMeshGenerator3D.cpp
@@ -6,12 +6,12 @@
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // (at your option) any later version.
-// 
+//
 // mshr is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with mshr.  If not, see <http://www.gnu.org/licenses/>.
 //
@@ -38,7 +38,8 @@ namespace
 void build_dolfin_mesh(const tetgenio& tetgenmesh, dolfin::Mesh& dolfinmesh)
 {
   // Clear mesh
-  dolfinmesh.clear();
+  // dolfin::Mesh::clear has been removed
+  // dolfinmesh.clear();
 
   // Create and initialize mesh editor
   dolfin::MeshEditor mesh_editor;
@@ -47,11 +48,11 @@ void build_dolfin_mesh(const tetgenio& tetgenmesh, dolfin::Mesh& dolfinmesh)
 
   const int offset = tetgenmesh.firstnumber;
 
-  for (int i = 0; i < tetgenmesh.numberofpoints; i++) 
+  for (int i = 0; i < tetgenmesh.numberofpoints; i++)
   {
 
-    dolfin::Point p(tetgenmesh.pointlist[i * 3], 
-                    tetgenmesh.pointlist[i * 3 + 1], 
+    dolfin::Point p(tetgenmesh.pointlist[i * 3],
+                    tetgenmesh.pointlist[i * 3 + 1],
                     tetgenmesh.pointlist[i * 3 + 2]);
     mesh_editor.add_vertex(i, p);
   }
@@ -60,7 +61,7 @@ void build_dolfin_mesh(const tetgenio& tetgenmesh, dolfin::Mesh& dolfinmesh)
   mesh_editor.init_cells(tetgenmesh.numberoftetrahedra);
   dolfin_assert(tetgenmesh.numberofcorners == 4);
 
-  for (int i = 0; i < tetgenmesh.numberoftetrahedra; i++) 
+  for (int i = 0; i < tetgenmesh.numberoftetrahedra; i++)
   {
     mesh_editor.add_cell(i,
                          tetgenmesh.tetrahedronlist[i*4 + 0]-offset,
@@ -73,7 +74,7 @@ void build_dolfin_mesh(const tetgenio& tetgenmesh, dolfin::Mesh& dolfinmesh)
   mesh_editor.close();
 }
 //-----------------------------------------------------------------------------
-double bounding_sphere_radius(const std::vector<dolfin::Point>& vertices)
+double bounding_sphere_radius(const std::vector<double>& vertices)
 {
   typedef double FT;
   typedef CGAL::Cartesian<FT> K;
@@ -83,12 +84,11 @@ double bounding_sphere_radius(const std::vector<dolfin::Point>& vertices)
 
   std::vector<Sphere> S;
 
-  for (std::vector<dolfin::Point>::const_iterator it = vertices.begin();
-       it != vertices.end(); ++it)
+  for (std::size_t i = 0; i < vertices.size(); i += 3)
   {
-    S.push_back(Sphere(K::Point_3(it->x(),
-                                  it->y(),
-                                  it->z()), 0.0));
+    S.push_back(Sphere(K::Point_3( vertices[i],
+                                   vertices[i+1],
+                                   vertices[i+2]), 0.0));
   }
 
   Min_sphere ms(S.begin(), S.end());
@@ -111,65 +111,49 @@ TetgenMeshGenerator3D::~TetgenMeshGenerator3D()
 {
 }
 //-----------------------------------------------------------------------------
-void TetgenMeshGenerator3D::generate(const CSGGeometry& geometry, dolfin::Mesh& mesh) const
-{
-  std::shared_ptr<CSGCGALDomain3D> exact_domain( new CSGCGALDomain3D(geometry) );
-  exact_domain->ensure_meshing_preconditions();
-
-  generate(std::move(exact_domain), mesh);
-}
-
-//-----------------------------------------------------------------------------
-void TetgenMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> domain, dolfin::Mesh& mesh) const
+std::shared_ptr<dolfin::Mesh>
+TetgenMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> domain) const
 {
-  std::vector<dolfin::Point> vertices;
-  std::vector<std::array<std::size_t, 3> > facets;
-
-  domain->get_vertices(vertices);
-  domain->get_facets(facets);
-
   tetgenio in;
 
-  // Copy the vertices to the tetgen structure
+  double r;
   {
-    in.numberofpoints = vertices.size();
+    // Copy the vertices to the tetgen structure
+    dolfin::log(dolfin::TRACE, "Copying vertices");
+    std::unique_ptr<const std::vector<double>> vertices = domain->get_vertices();
+    r = bounding_sphere_radius(*vertices);
+
+    in.numberofpoints = vertices->size()/3;
     in.pointlist = new REAL[in.numberofpoints * 3];
 
-    std::size_t i = 0;
-    for (std::vector<dolfin::Point>::const_iterator it = vertices.begin();
-         it != vertices.end(); it++)
+    for (std::size_t i = 0; i < vertices->size(); i++)
     {
-      in.pointlist[i*3 + 0] = it->x();
-      in.pointlist[i*3 + 1] = it->y();
-      in.pointlist[i*3 + 2] = it->z();
-
-      i++;
+      in.pointlist[i] = (*vertices)[i];
     }
   }
-  
+
   // Copy the facets to the tetgen structure
   {
-    in.numberoffacets = facets.size();
+    dolfin::log(dolfin::TRACE, "Copying facets");
+    std::unique_ptr<const std::vector<std::size_t>> facets = domain->get_facets();
+
+    in.numberoffacets = facets->size()/3;
     in.facetlist = new tetgenio::facet[in.numberoffacets];
     //in.facetmarkerlist = new int[in.numberoffacets];
 
-    std::size_t i = 0;
-    for (std::vector<std::array<std::size_t, 3> >::const_iterator it = facets.begin();
-         it != facets.end(); it++)
+    for (std::size_t i = 0; i*3 < facets->size(); i++)
     {
-      tetgenio::facet *f = &in.facetlist[i];
-      f->numberofpolygons = 1;
-      f->polygonlist = new tetgenio::polygon[f->numberofpolygons];
-      f->numberofholes = 0;
-      f->holelist = NULL;
-      tetgenio::polygon *p = &f->polygonlist[0];
-      p->numberofvertices = 3;
-      p->vertexlist = new int[p->numberofvertices];
-      p->vertexlist[0] = (*it)[0];
-      p->vertexlist[1] = (*it)[1];
-      p->vertexlist[2] = (*it)[2];
-
-      i++;
+      tetgenio::facet& f = in.facetlist[i];
+      f.numberofpolygons = 1;
+      f.polygonlist = new tetgenio::polygon[f.numberofpolygons];
+      f.numberofholes = 0;
+      f.holelist = NULL;
+      tetgenio::polygon& p = f.polygonlist[0];
+      p.numberofvertices = 3;
+      p.vertexlist = new int[p.numberofvertices];
+      p.vertexlist[0] = (*facets)[i*3];
+      p.vertexlist[1] = (*facets)[i*3+1];
+      p.vertexlist[2] = (*facets)[i*3+2];
     }
   }
 
@@ -177,10 +161,10 @@ void TetgenMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> doma
   // TODO: Check if there are more than one disconnected part
   // before creating the query structure.
   {
+    dolfin::log(dolfin::TRACE, "Marking holes");
     std::vector<dolfin::Point> holes;
     std::shared_ptr<CSGCGALDomain3DQueryStructure> qs = domain->get_query_structure();
-    domain->get_points_in_holes(holes,
-                                qs);
+    domain->get_points_in_holes(holes, qs);
 
     in.numberofholes = holes.size();
     in.holelist = new REAL[in.numberofholes*3];
@@ -224,7 +208,7 @@ void TetgenMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> doma
       const double resolution = parameters["mesh_resolution"];
 
       // try to compute reasonable parameters
-      const double r = bounding_sphere_radius(vertices);
+      //const double r = bounding_sphere_radius(vertices);
       const double cell_size = r/static_cast<double>(resolution)*2.0;
       tetgenparams << cell_size;
     }
@@ -253,7 +237,9 @@ void TetgenMeshGenerator3D::generate(std::shared_ptr<const CSGCGALDomain3D> doma
   tetgenio out;
   tetrahedralize(writable.get(), &in, &out);
 
-  build_dolfin_mesh(out, mesh);
+  std::shared_ptr<dolfin::Mesh> mesh(new dolfin::Mesh());
+  build_dolfin_mesh(out, *mesh);
+  return mesh;
 }
 //-----------------------------------------------------------------------------
 } // end namespace mshr
diff --git a/src/VTPFileReader.cpp b/src/VTPFileReader.cpp
index bb5ad37..68bc902 100644
--- a/src/VTPFileReader.cpp
+++ b/src/VTPFileReader.cpp
@@ -30,7 +30,7 @@ namespace mshr
 {
 void VTPFileReader::read(const std::string filename, 
                          std::vector<std::array<double, 3> >& vertices,
-                         std::vector<std::vector<std::size_t> >& facets)
+                         std::vector<std::array<std::size_t, 3> >& facets)
 {
 
 #ifdef MSHR_HAS_VTK
@@ -48,7 +48,7 @@ void VTPFileReader::read(const std::string filename,
   for(vtkIdType i = 0; i < num_points; i++)
     polydata->GetPoint(i, vertices[i].data());
 
-  log(dolfin::TRACE, "Read %d points from vtp file", num_points);
+  log(dolfin::TRACE, "Read %d vertices from vtp file", num_points);
 
   const vtkIdType num_polys = polydata->GetNumberOfPolys();
   facets.resize(num_polys);
@@ -61,14 +61,13 @@ void VTPFileReader::read(const std::string filename,
   while(TriangleCells->GetNextCell(npts, pts))
   {
     dolfin_assert(npts == 3);
-    facets[facet_counter].resize(3);
     for (int i = 0; i < 3; i++)
       (facets[facet_counter])[i] = pts[i];
 
     facet_counter++;
   }
 
-  log(dolfin::TRACE, "Read %d triangles from vtp file", facet_counter);
+  log(dolfin::TRACE, "Read %d triangular facets from vtp file", facet_counter);
   dolfin_assert(facet_counter == num_polys);
 
 #else
diff --git a/src/make_multicomponent_mesh_3.h b/src/make_multicomponent_mesh_3.h
index a22f2eb..0d6a2db 100644
--- a/src/make_multicomponent_mesh_3.h
+++ b/src/make_multicomponent_mesh_3.h
@@ -49,7 +49,7 @@ void make_multicomponent_mesh_3_impl(C3T3& c3t3,
   // std::cout << "Number of vertices after features: " << c3t3.triangulation().number_of_vertices() << std::endl;
   
   // Inserts points from all connected components to the mesh
-  CGAL::internal::Mesh_3::init_c3t3(c3t3, domain, criteria);
+  CGAL::internal::Mesh_3::init_c3t3(c3t3, domain, criteria, 0);
   // std::cout << "Number of vertices before meshing: " << c3t3.triangulation().number_of_vertices() << std::endl;
   
   // Build mesher and launch refinement process
diff --git a/src/meshclean.h b/src/meshclean.h
index 1cd0a13..da7310f 100644
--- a/src/meshclean.h
+++ b/src/meshclean.h
@@ -24,6 +24,7 @@
 #include <CGAL/Triangle_3.h>
 
 //-----------------------------------------------------------------------------
+// Get squared edge length
 template<typename Polyhedron>
 inline double
 get_edge_length(typename Polyhedron::Halfedge_const_handle halfedge)
@@ -199,12 +200,12 @@ void print_facet(const Polyhedron& p, typename Polyhedron::Halfedge_const_handle
 //-----------------------------------------------------------------------------
 template<typename Polyhedron>
 inline bool facet_is_degenerate(typename Polyhedron::Facet_const_handle facet,
-                         const double tolerance)
+                                typename Polyhedron::Traits::FT tol_sq)
 {
   dolfin_assert(facet->is_triangle());
 
-  return get_min_edge_length<Polyhedron>(facet) < tolerance 
-    || triangle_projection<Polyhedron>(facet) < tolerance;
+  return get_min_edge_length<Polyhedron>(facet) < tol_sq
+    || triangle_projection<Polyhedron>(facet) < tol_sq;
 }
 //-----------------------------------------------------------------------------
 template <typename Polyhedron>
@@ -241,7 +242,25 @@ inline bool has_slivers(const Polyhedron& p)
   for (typename Polyhedron::Vertex_const_iterator vit = p.vertices_begin(); vit != p.vertices_end(); vit++)
   {
     if (vit->vertex_degree() < 3)
-      return true;
+    {
+      // Check that this is not on a border (we can have borders eg. when
+      // reading files that must be repaired
+      const typename Polyhedron::Halfedge_around_vertex_const_circulator first = vit->vertex_begin();
+      typename Polyhedron::Halfedge_around_vertex_const_circulator current = first;
+      
+      bool is_border = false;
+
+      do
+      {
+        if ( !current->is_border() )
+          is_border = true;
+
+        current++;
+      } while (current != first);
+
+      if (!is_border)
+        return true;
+    }
   }
 
   /* for (typename Polyhedron::Halfedge_const_iterator it = p.halfedges_begin(); */
@@ -269,11 +288,26 @@ inline bool has_degree3_neighbors(const Polyhedron& p)
   return false;
 }
 //-----------------------------------------------------------------------------
+template<typename Polyhedron>
+inline std::size_t min_vertex_degree(const Polyhedron& p)
+{
+  typename Polyhedron::Vertex_const_iterator vit = p.vertices_begin();
+  std::size_t min_degree = vit->vertex_degree();
+  vit++;
+
+  for (; vit != p.vertices_end(); vit++)
+    min_degree = std::min(min_degree, vit->vertex_degree());
+
+  return min_degree;
+}
+//-----------------------------------------------------------------------------
 #define ASSERT_GOOD_STATE(p) do             \
 {                                           \
   dolfin_assert(p.is_valid());              \
   dolfin_assert(p.is_pure_triangle());      \
   dolfin_assert(!has_slivers(p));           \
+  dolfin_assert(p.is_closed());             \
+  dolfin_assert(min_vertex_degree(p) > 2);  \
   dolfin_assert(p.size_of_vertices() < 5 || !has_degree3_neighbors(p)); \
 } while(false);
 //-----------------------------------------------------------------------------
@@ -289,7 +323,8 @@ inline void remove_degree3_center_vertex(Polyhedron& p,
 }
 //-----------------------------------------------------------------------------
 template<typename Polyhedron>
-inline bool remove_degree3_with_short_edges(Polyhedron& p, double tolerance)
+inline bool remove_degree3_with_short_edges(Polyhedron& p,
+                                            typename Polyhedron::Traits::FT tol_sq)
 {
   bool removed = false;
 
@@ -298,12 +333,14 @@ inline bool remove_degree3_with_short_edges(Polyhedron& p, double tolerance)
   {
     if (it->vertex_degree() < 4)
     {
+      if (!it->is_trivalent())
+        std::cout << "Strange! Degree: " << it->vertex_degree() << std::endl;
       dolfin_assert(it->is_trivalent());
 
       typename Polyhedron::Halfedge_handle h = it->halfedge();
-      if (get_edge_length<Polyhedron>(h) < tolerance ||
-          get_edge_length<Polyhedron>(h->next()) < tolerance ||
-          get_edge_length<Polyhedron>(h->prev()) < tolerance)
+      if (get_edge_length<Polyhedron>(h) < tol_sq ||
+          get_edge_length<Polyhedron>(h->next()) < tol_sq ||
+          get_edge_length<Polyhedron>(h->prev()) < tol_sq)
       {
 
         // std::cout << "Removing degree 3 with short edges" << std::endl;
@@ -360,6 +397,7 @@ inline void collapse_edge(Polyhedron& p,
     }
 
     ASSERT_GOOD_STATE(p);
+    dolfin_assert(edge->vertex()->vertex_degree() > 3);
     
     edge = p.join_facet(edge->next());
     dolfin_assert(p.is_valid());
@@ -381,14 +419,15 @@ inline void collapse_edge(Polyhedron& p,
 //-----------------------------------------------------------------------------
 // FIXME: Return the number of edges collapsed
 template <typename Polyhedron>
-bool collapse_short_edges(Polyhedron& p, const double tolerance)
+bool collapse_short_edges(Polyhedron& p,
+                          typename Polyhedron::Traits::FT tol_sq)
 {
   // Degree 3 vertices with short incident edges causes problems when collapsing
   // short edges. The very ad hoc solution that has shown to work is to remove
   // these center vertices (and by that the short edges)  before collapsing short
   // edges.
 
-  bool edges_removed = remove_degree3_with_short_edges(p, tolerance);
+  bool edges_removed = remove_degree3_with_short_edges(p, tol_sq);
 
   bool removed;
 
@@ -399,10 +438,11 @@ bool collapse_short_edges(Polyhedron& p, const double tolerance)
     for (typename Polyhedron::Halfedge_iterator halfedge = p.halfedges_begin();
 	 halfedge != p.halfedges_end(); halfedge++)
     {
-      if (get_edge_length<Polyhedron>(halfedge) < tolerance)
+      if (get_edge_length<Polyhedron>(halfedge) < tol_sq)
       {
 	collapse_edge<Polyhedron>(p, halfedge);
-        remove_degree3_with_short_edges(p, tolerance);
+        ASSERT_GOOD_STATE(p);
+        remove_degree3_with_short_edges(p, tol_sq);
         removed = true;
         edges_removed = true;
 	break;
@@ -415,7 +455,7 @@ bool collapse_short_edges(Polyhedron& p, const double tolerance)
 //-----------------------------------------------------------------------------
 template<typename Polyhedron>
 bool flip_edges(Polyhedron& p,
-                double tolerance)
+                typename Polyhedron::Traits::FT tol_sq)
 {
   typedef typename Polyhedron::Traits::Line_3 Line_3;
   typedef typename Polyhedron::Traits::Point_3 Point_3;
@@ -432,22 +472,35 @@ bool flip_edges(Polyhedron& p,
          facet != p.facets_end(); facet++)
     {
       dolfin_assert(facet->is_triangle());
-      if (triangle_projection<Polyhedron>(facet) < tolerance)
+      if (triangle_projection<Polyhedron>(facet) < tol_sq)
       {
+        dolfin_assert(p.is_pure_triangle());
+        dolfin_assert(p.is_closed());
+
         typename Polyhedron::Halfedge_handle longest 
           = get_longest_edge<Polyhedron>(facet);
 
-        Line_3 l(longest->vertex()->point(),
-                 longest->opposite()->vertex()->point());
-        Point_3 newpoint = l.projection(longest->next()->vertex()->point());
-        Halfedge_handle flipped = p.flip_edge(longest);
-        flipped->vertex()->point() = newpoint;
+        if (longest->vertex()->is_trivalent())
+          remove_degree3_center_vertex(p, longest);
+        else if (longest->opposite()->vertex()->is_trivalent())
+          remove_degree3_center_vertex(p, longest->opposite());
+        else
+        {
         
-        // TODO: Check length of newly created edge and
-        // collapse if necessary.
-        collapse_short_edges(p, tolerance);
-        done = false;
-        edge_flipped = true;
+          Line_3 l(longest->vertex()->point(),
+                   longest->opposite()->vertex()->point());
+          Point_3 newpoint = l.projection(longest->next()->vertex()->point());
+          Halfedge_handle flipped = p.flip_edge(longest);
+          flipped->vertex()->point() = newpoint;
+
+          ASSERT_GOOD_STATE(p);
+
+          // TODO: Check length of newly created edge and
+          // collapse if necessary.
+          collapse_short_edges(p, tol_sq);
+          done = false;
+          edge_flipped = true;
+        }
       }
     }
   } while (!done);
@@ -457,13 +510,13 @@ bool flip_edges(Polyhedron& p,
 //-----------------------------------------------------------------------------
 template<typename Polyhedron>
 bool has_degenerate_facets(const Polyhedron& p,
-                           double tolerance)
+                           typename Polyhedron::Traits::FT tol_sq)
 {
   for (typename Polyhedron::Facet_const_iterator facet = p.facets_begin();
        facet != p.facets_end(); facet++)
   {
     dolfin_assert(facet->is_triangle());
-    if (facet_is_degenerate<Polyhedron>(facet, tolerance))
+    if (facet_is_degenerate<Polyhedron>(facet, tol_sq))
       return true;
   }
   return false;
@@ -477,20 +530,30 @@ bool has_degenerate_facets(const Polyhedron& p,
 template<typename Polyhedron>
 bool remove_degenerate(Polyhedron &p, double tolerance)
 {
+  log(dolfin::TRACE, "Cleaning degenerate facets");
   dolfin_assert(p.is_pure_triangle());
+
+  // Compute squared tolerance
+  typename Polyhedron::Traits::FT tol_sq(tolerance);
+  tol_sq *= tol_sq;
+
+  const bool edges_removed = remove_degree3_with_short_edges(p, tol_sq);
+  if (edges_removed)
+    std::cout << "Remove degree 3 vertices" << std::endl;
+
   ASSERT_GOOD_STATE(p);
-  log(dolfin::TRACE, "Cleaning degenerate facets");
+
 
   log(dolfin::TRACE, "  Collapsing short edges");
-  const bool collapsed = collapse_short_edges(p, tolerance);
+  const bool collapsed = collapse_short_edges(p, tol_sq);
   ASSERT_GOOD_STATE(p);
 
   // log(dolfin::TRACE, "Shortest edge: %f", shortest_edge());
   log(dolfin::TRACE, "  Removing colinear facets by edge flipping");
-  const bool flipped = flip_edges(p, tolerance);
+  const bool flipped = flip_edges(p, tol_sq);
   ASSERT_GOOD_STATE(p);
 
-  dolfin_assert(!has_degenerate_facets(p, tolerance));
+  dolfin_assert(!has_degenerate_facets(p, tol_sq));
 
   return collapsed || flipped;
 }
diff --git a/src/smoothing.h b/src/smoothing.h
new file mode 100644
index 0000000..63a89c0
--- /dev/null
+++ b/src/smoothing.h
@@ -0,0 +1,73 @@
+// Copyright (C) 2016 Benjamin Kehlet
+//
+// This file is part of mshr.
+//
+// mshr is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// mshr is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with mshr. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef __SMOOTHING_H
+#define __SMOOTHING_H
+
+namespace mshr
+{
+
+class LaplacianSmoothing
+{
+ public:
+  template<typename Polyhedron>
+  static void smooth(Polyhedron& p, double c=1.0)
+  {
+    typedef typename Polyhedron::Vertex_handle Vertex_handle;
+    typedef typename Polyhedron::Traits::Point_3 Point_3;
+    typedef typename Polyhedron::Traits::Vector_3 Vector_3;
+    typedef typename Polyhedron::Halfedge_around_vertex_const_circulator HV_const_circulator;
+
+    assert(p.is_valid());
+
+    std::vector<std::pair<Vertex_handle, Point_3>> smoothed;
+
+    for (typename Polyhedron::Vertex_iterator vit = p.vertices_begin();
+         vit != p.vertices_end();
+         vit++)
+    {
+      const Point_3 current = vit->point();
+
+      Vector_3 delta;
+
+      const HV_const_circulator h_start = vit->vertex_begin();
+      HV_const_circulator h_current = h_start;
+      do
+      {
+        delta = delta + (h_current->opposite()->vertex()->point()-current);
+        h_current++;
+      } while (h_current != h_start);
+
+      Point_3 p = current + c*delta/vit->vertex_degree();
+
+      // Evaluate exact value to reduce memory usage
+      p.exact();
+
+      smoothed.push_back(std::make_pair(Vertex_handle(vit), p));
+    }
+
+    // Apply the smoothing
+    for (const std::pair<Vertex_handle, Point_3>& s : smoothed)
+    {
+      s.first->point() = s.second;
+    }
+  }
+};
+
+}
+#endif
diff --git a/src/triangulate_polyhedron.h b/src/triangulate_polyhedron.h
deleted file mode 100644
index 3285937..0000000
--- a/src/triangulate_polyhedron.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2014 Benjamin Kehlet
-//
-// This file is part of mshr.
-//
-// mshr is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// mshr is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with mshr.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef _H_TRIANGULATE_POLYHEDRON__
-#define _H_TRIANGULATE_POLYHEDRON__
-
-namespace 
-{
-template <class Polyhedron>
-  inline void triangulate_facet(Polyhedron &p,
-                                typename Polyhedron::Facet_handle f)
-  {
-    if (f->facet_degree() > 4)
-      dolfin::dolfin_error("triangulate_polyhedron.h",
-                   "Triangulate polyhedron",
-                   "Triangulation of facets with degree > 4 not implemented");
-
-
-    typename Polyhedron::Halfedge_handle h = f->halfedge();
-
-    if (f->facet_degree() == 4)
-    {
-      p.split_facet(h, h->next()->next());
-    }
-
-  }
-}
-
-namespace mshr
-{
-
-template <class Polyhedron>
-void triangulate_polyhedron(Polyhedron &p)
-{
-  for (typename Polyhedron::Facet_iterator it = p.facets_begin();
-       it != p.facets_end(); it++)
-  {
-    triangulate_facet(p, it);
-
-  }
-
-}
-
-}
-#endif
diff --git a/swig/mshr.i b/swig/mshr.i
index 7fef68b..528c52b 100644
--- a/swig/mshr.i
+++ b/swig/mshr.i
@@ -1,6 +1,7 @@
  %module mshr
  %{
     #include <numpy/arrayobject.h>
+    #include <vector>
 
     #include <dolfin/common/types.h>
     #include <dolfin/mesh/MeshFunction.h>
@@ -11,6 +12,7 @@
     #include <mshr/CSGPrimitives3D.h>
     #include <mshr/CSGCGALDomain2D.h>
     #include <mshr/CSGCGALDomain3D.h>
+    #include <mshr/TetgenMeshGenerator3D.h>
 
     #include <mshr/CSGGeometry.h>
     #include <mshr/CSGGeometries3D.h>
@@ -20,7 +22,6 @@
     #include <mshr/CSGCGALMeshGenerator3D.h>
     #include <mshr/DolfinMeshUtils.h>
     #include <mshr/Meshes.h>
-
  %}
 
 %init
@@ -59,6 +60,9 @@
 %import "dolfin/swig/mesh/pre.i"
 %import(module="dolfin") "dolfin/mesh/Mesh.h"
 
+%import "dolfin/swig/geometry/pre.i"
+%import(module="dolfin") "dolfin/geometry/Point.h"
+
 %ignore mshr::CSGGeometry::getType;
 %ignore mshr::CSGUnion::_g0;
 %ignore mshr::CSGUnion::_g1;
@@ -80,6 +84,11 @@
 %ignore mshr::PSLG;
 %ignore mshr::CSGCGALDomain3DQueryStructure::CSGCGALDomain3DQueryStructure;
 %ignore mshr::CSGCGALDomain3DQueryStructure::impl;
+%ignore mshr::CSGCGALDomain3D::impl;
+
+// These are reimplemented to return numpy arrays
+%ignore mshr::CSGCGALDomain3D::get_facets() const;
+%ignore mshr::CSGCGALDomain3D::get_vertices() const;
 
 %shared_ptr(mshr::CSGGeometry)
 %shared_ptr(mshr::CSGPrimitive)
@@ -103,16 +112,90 @@
 %shared_ptr(mshr::Tetrahedron)
 %shared_ptr(mshr::Ellipsoid)
 %shared_ptr(mshr::Surface3D)
+%shared_ptr(mshr::Extrude2D)
 %shared_ptr(mshr::CSGCGALMeshGenerator2D)
 %shared_ptr(mshr::CSGCGALMeshGenerator3D)
+%shared_ptr(mshr::TetgenMeshGenerator3D)
 %shared_ptr(mshr::CSGCGALDomain2D)
 %shared_ptr(mshr::CSGCGALDomain3D)
 %shared_ptr(mshr::UnitSphereMesh)
 %shared_ptr(mshr::CSGCGALDomain3DQueryStructure)
 
-%rename(_generate) mshr::generate;
 %ignore mshr::get_boundary_mesh;
 
+%typemap (in) std::vector<std::array<double, 3>>&
+    (std::vector<std::array<double, 3>> tmp)
+{
+  if (!PyArray_Check($input))
+  {
+    SWIG_exception(SWIG_TypeError, "numpy array expected.");
+  }
+
+  PyArrayObject* array = reinterpret_cast<PyArrayObject*>($input);
+
+  if (PyArray_TYPE(array) != NPY_DOUBLE)
+  {
+    SWIG_exception(SWIG_TypeError, "numpy array of doubles expected.");
+  }
+
+  npy_intp* shape = PyArray_DIMS(array);
+  tmp.resize(shape[0]);
+  double* in_data = static_cast<double*>(PyArray_DATA(array));
+  const std::size_t size = PyArray_SIZE(array);
+  double* out_data = reinterpret_cast<double*>(&tmp[0]);
+  if (PyArray_ISCONTIGUOUS(array))
+  {
+    std::copy_n(in_data, shape[0]*shape[1], out_data);
+  }
+  else
+  {
+    const npy_intp strides = PyArray_STRIDE(array, 0)/sizeof(double);
+    for (std::size_t i = 0; i < size; i++)
+      out_data[i] = in_data[i*strides];
+  }
+
+  $1 = &tmp;
+}
+
+%typemap (in) std::vector<std::array<std::size_t, 3>>&
+    (std::vector<std::array<std::size_t, 3>> tmp)
+{
+  if (!PyArray_Check($input))
+  {
+    SWIG_exception(SWIG_TypeError, "numpy array expected.");
+  }
+
+  PyArrayObject* array = reinterpret_cast<PyArrayObject*>($input);
+
+  if (PyArray_TYPE(array) != NPY_INT64)
+  {
+    SWIG_exception(SWIG_TypeError, "numpy array of ints expected.");
+  }
+
+  npy_intp* shape = PyArray_DIMS(array);
+  tmp.resize(shape[0]);
+  long* in_data = static_cast<long*>(PyArray_DATA(array));
+
+  const std::size_t size = PyArray_SIZE(array);
+  std::size_t* out_data = reinterpret_cast<std::size_t*>(&tmp[0]);
+  if (PyArray_ISCONTIGUOUS(array))
+  {
+    for (std::size_t i = 0; i < size; i++)
+      out_data[i] = static_cast<std::size_t>(in_data[i]);
+
+  }
+  else
+  {
+    const npy_intp strides = PyArray_STRIDE(array, 0)/sizeof(std::size_t);
+    for (std::size_t i = 0; i < size; i++)
+      out_data[i] = static_cast<std::size_t>(in_data[i*strides]);
+  }
+
+  $1 = &tmp;
+}
+
+
+
 %include <mshr/CSGGeometry.h>
 %include <mshr/CSGPrimitive.h>
 %include <mshr/CSGOperators.h>
@@ -123,6 +206,7 @@
 %include <mshr/MeshGenerator.h>
 %include <mshr/CSGCGALMeshGenerator2D.h>
 %include <mshr/CSGCGALMeshGenerator3D.h>
+%include <mshr/TetgenMeshGenerator3D.h>
 %include <mshr/CSGGeometries3D.h>
 %include <mshr/DolfinMeshUtils.h>
 %include <mshr/Meshes.h>
@@ -148,11 +232,37 @@
   %}
  }
 
-// Declare the generate function here. The signature must
-// be in sync with mshr/MeshGenerator.h:generate()
-%pythoncode %{
-def generate_mesh(geometry, resolution, backend="cgal") :
-    m = dolfin.Mesh()
-    _generate(m, geometry, resolution, backend)
-    return m
-%}
+%extend mshr::CSGCGALDomain3D
+{
+  PyObject* get_vertices()
+  {
+    npy_intp adims[2] = {static_cast<npy_intp>(self->num_vertices()), 3};
+    PyArrayObject* array = reinterpret_cast<PyArrayObject*>(PyArray_EMPTY(2,
+                                                                          adims,
+                                                                          NPY_DOUBLE,
+                                                                          0));
+    double* data = static_cast<double*>(PyArray_DATA(array));
+    const std::unique_ptr<const std::vector<double>> vertices(self->get_vertices());
+    std::copy_n(vertices->begin(), vertices->size(), data);
+
+    return reinterpret_cast<PyObject*>(array);
+  }
+
+  PyObject* get_facets()
+  {
+    npy_intp adims[2] = {static_cast<npy_intp>(self->num_facets()), 3};
+    PyArrayObject* array = reinterpret_cast<PyArrayObject*>(PyArray_EMPTY(2,         // Num dimensions
+                                                                          adims,     // shape
+                                                                          NPY_UINTP, // number type
+                                                                          0));       // Fortran type storage
+
+    const std::unique_ptr<const std::vector<std::size_t>> facets(self->get_facets());
+    std::size_t* array_data = static_cast<std::size_t*>(PyArray_DATA(array));
+    std::copy_n(facets->begin(), facets->size(), array_data);
+    
+    return reinterpret_cast<PyObject*>(array);
+  }
+
+  // PyObject* convex_hull
+}
+
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 88f8613..cc1d2b3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -43,16 +43,37 @@ set_property(TEST "Python-CSGOperators" PROPERTY
     ENVIRONMENT "PYTHONPATH=${PYTHON_ENVIR}"
 )
 
+############# Test the fuzzy point map ########################################################
+add_test("Python-FuzzyPointMap" "python" "${CMAKE_SOURCE_DIR}/test/test-fuzzypointmap.py")
+set_property(TEST "Python-FuzzyPointMap" PROPERTY
+    ENVIRONMENT "PYTHONPATH=${PYTHON_ENVIR}"
+)
+
+############# Test the mesh generation ########################################################
+add_test("Python-MeshGeneration" "python" "${CMAKE_SOURCE_DIR}/test/test-mesh-generation.py")
+set_property(TEST "Python-MeshGeneration" PROPERTY
+    ENVIRONMENT "PYTHONPATH=${PYTHON_ENVIR}"
+)
+
+############# Test the predefined meshes ##########################################################
+add_test("Python-Meshes" "python" "${CMAKE_SOURCE_DIR}/test/test-meshes.py")
+set_property(TEST "Python-Meshes" PROPERTY
+    ENVIRONMENT "PYTHONPATH=${PYTHON_ENVIR}"
+)
+
+
 
 
 ############# Try meshing some surface files found in the cgal source ########################
 # TODO: Print mesh quality measure from program and check the value
-set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/3rdparty/CGAL-4.6/demo/Polyhedron/data")
+set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/3rdparty/CGAL-4.8/demo/Polyhedron/data")
 
 # Files that should pass
-set(TESTFILES_VALID "anchor.off;couplingdown.off;cross.off;cube.off;dragknob.off;elephant.off;ellipsoid.off;handle.off;icosahedron.off;joint.off;knot1.off;knot2.off;pinion.off;pipe.off;pyramid.off;rotor.off;sphere.off;spool.off;star.off;translated-cube.off;tripod.off")
+# Note elephant.off is valid a should passes but takes a very long (so test slave may time out)
+set(TESTFILES_VALID "anchor.off;couplingdown.off;cross.off;cube.off;dragknob.off;ellipsoid.off;handle.off;icosahedron.off;joint.off;knot1.off;knot2.off;pinion.off;pipe.off;rotor.off;sphere.off;spool.off;star.off;translated-cube.off;tripod.off")
 set(TESTFILES_SELFINTERSECTING "bones.off;cow.off;man.off;oblong.ogg")
 set(TESTFILES_NOTCLOSED "cube-ouvert.off;mushroom.off")
+set(TESTFILES_NOTTRIANGULAR "pyramid.off")
 
 foreach(CURRENT_DATA_FILE IN LISTS TESTFILES_VALID)
   message(STATUS "Adding test: ${CURRENT_DATA_FILE}")
diff --git a/test/test-fuzzypointmap.py b/test/test-fuzzypointmap.py
new file mode 100644
index 0000000..8067a4f
--- /dev/null
+++ b/test/test-fuzzypointmap.py
@@ -0,0 +1,108 @@
+import mshr
+import tempfile, os, sys
+
+# A simple unit cube but with some vertices perturbed slightly to test the FuzzyPointMap
+cube = """
+solid ascii
+facet normal 0 0 0
+  outer loop
+    vertex 1e-12 0 1
+    vertex 0 1 0
+    vertex 0 -1e-11 0
+  endloop
+endfacet
+
+facet normal 0 0 0
+outer loop
+  vertex 0 0 1
+  vertex 0 1 1
+  vertex 0 1 1e-13
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 0 0 1
+  vertex 1 0 1
+  vertex 0 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 0 1
+  vertex 1 1 1
+  vertex 0 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 0 1
+  vertex 1 0 0
+  vertex 1 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 0 0
+  vertex 1 1 0
+  vertex 1 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 0 0
+  vertex 0 0 0
+  vertex 1 1 0
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 0 0 0
+  vertex 0 1 0
+  vertex 1 1 0
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 1 1
+  vertex 1 1 0
+  vertex 0 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 1 1 0
+  vertex 0 1 0
+  vertex 0 1 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 0 0 1
+  vertex 0 0 0
+  vertex 1 0 1
+endloop
+endfacet
+facet normal 0 0 0
+outer loop
+  vertex 0 0 0
+  vertex 1 0 0
+  vertex 1 0 1
+endloop
+endfacet
+endsolid
+"""
+
+# In python 3 convert the text from unicode to a "classic" str
+if sys.version_info[0] >= 3 :
+    cube = cube.encode("ascii")
+
+fd, filename = tempfile.mkstemp(suffix=".stl")
+os.write(fd, cube)
+os.close(fd)
+
+s = mshr.Surface3D(filename)
+d = mshr.CSGCGALDomain3D(s)
+
+os.remove(filename)
+
+assert d.num_holes() == 0
diff --git a/test/test-mesh-generation.py b/test/test-mesh-generation.py
new file mode 100644
index 0000000..7c6cfba
--- /dev/null
+++ b/test/test-mesh-generation.py
@@ -0,0 +1,10 @@
+import mshr
+from dolfin import *
+
+# issue 37
+g = mshr.Rectangle(Point(0.0, 0.0), Point(2.2, .41)) - mshr.Circle(Point(.2, .2), .05, 40)
+m = mshr.generate_mesh(g, 50)
+
+# issue 41 (failed only in parallel)
+c = mshr.Extrude2D(mshr.Circle(Point(0, 0, 0), 1), 1)
+m = mshr.generate_mesh(c, 10)
diff --git a/test/test-meshes.py b/test/test-meshes.py
new file mode 100644
index 0000000..20be703
--- /dev/null
+++ b/test/test-meshes.py
@@ -0,0 +1,6 @@
+from dolfin import *
+import mshr
+
+# Unit sphere mesh
+m = mshr.UnitSphereMesh(4)
+m = mshr.UnitSphereMesh(10) 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/fenics/mshr.git



More information about the debian-science-commits mailing list